diff --git a/.nx/version-plans/version-plan-1763101098136.md b/.nx/version-plans/version-plan-1763101098136.md new file mode 100644 index 000000000..c5e2cedd5 --- /dev/null +++ b/.nx/version-plans/version-plan-1763101098136.md @@ -0,0 +1,5 @@ +--- +ability-hyperliquid: minor +--- + +Add Vincent builders fee to spot sell and perp long and short trades. diff --git a/packages/apps/ability-hyperliquid/src/generated/lit-action.js b/packages/apps/ability-hyperliquid/src/generated/lit-action.js index be28d88aa..2c9970a77 100644 --- a/packages/apps/ability-hyperliquid/src/generated/lit-action.js +++ b/packages/apps/ability-hyperliquid/src/generated/lit-action.js @@ -2,8 +2,8 @@ * DO NOT EDIT THIS FILE. IT IS GENERATED ON BUILD. * @type {string} */ -const code = ";(()=>{try{const g=globalThis;const D=(g.Deno=g.Deno||{});const B=(D.build=D.build||{});if(B.os==null){B.os=\"linux\";}}catch{}})();\n\"use strict\";\n(() => {\n var __create = Object.create;\n var __defProp = Object.defineProperty;\n var __getOwnPropDesc = Object.getOwnPropertyDescriptor;\n var __getOwnPropNames = Object.getOwnPropertyNames;\n var __getProtoOf = Object.getPrototypeOf;\n var __hasOwnProp = Object.prototype.hasOwnProperty;\n var __esm = (fn, res) => function __init() {\n return fn && (res = (0, fn[__getOwnPropNames(fn)[0]])(fn = 0)), res;\n };\n var __commonJS = (cb, mod3) => function __require() {\n return mod3 || (0, cb[__getOwnPropNames(cb)[0]])((mod3 = { exports: {} }).exports, mod3), mod3.exports;\n };\n var __export = (target, all) => {\n for (var name in all)\n __defProp(target, name, { get: all[name], enumerable: true });\n };\n var __copyProps = (to, from14, except, desc) => {\n if (from14 && typeof from14 === \"object\" || typeof from14 === \"function\") {\n for (let key of __getOwnPropNames(from14))\n if (!__hasOwnProp.call(to, key) && key !== except)\n __defProp(to, key, { get: () => from14[key], enumerable: !(desc = __getOwnPropDesc(from14, key)) || desc.enumerable });\n }\n return to;\n };\n var __toESM = (mod3, isNodeMode, target) => (target = mod3 != null ? __create(__getProtoOf(mod3)) : {}, __copyProps(\n // If the importer is in node compatibility mode or this is not an ESM\n // file that has been converted to a CommonJS file using a Babel-\n // compatible transform (i.e. \"__esModule\" has not been set), then set\n // \"default\" to the CommonJS \"module.exports\" for node compatibility.\n isNodeMode || !mod3 || !mod3.__esModule ? __defProp(target, \"default\", { value: mod3, enumerable: true }) : target,\n mod3\n ));\n var __toCommonJS = (mod3) => __copyProps(__defProp({}, \"__esModule\", { value: true }), mod3);\n\n // ../../../node_modules/.pnpm/@lit-protocol+esbuild-plugin-polyfill-node@0.3.0_esbuild@0.19.12/node_modules/@lit-protocol/esbuild-plugin-polyfill-node/polyfills/__dirname.js\n var init_dirname = __esm({\n \"../../../node_modules/.pnpm/@lit-protocol+esbuild-plugin-polyfill-node@0.3.0_esbuild@0.19.12/node_modules/@lit-protocol/esbuild-plugin-polyfill-node/polyfills/__dirname.js\"() {\n \"use strict\";\n }\n });\n\n // ../../../node_modules/.pnpm/@jspm+core@2.1.0/node_modules/@jspm/core/nodelibs/browser/process.js\n var process_exports = {};\n __export(process_exports, {\n _debugEnd: () => _debugEnd,\n _debugProcess: () => _debugProcess,\n _events: () => _events,\n _eventsCount: () => _eventsCount,\n _exiting: () => _exiting,\n _fatalExceptions: () => _fatalExceptions,\n _getActiveHandles: () => _getActiveHandles,\n _getActiveRequests: () => _getActiveRequests,\n _kill: () => _kill,\n _linkedBinding: () => _linkedBinding,\n _maxListeners: () => _maxListeners,\n _preload_modules: () => _preload_modules,\n _rawDebug: () => _rawDebug,\n _startProfilerIdleNotifier: () => _startProfilerIdleNotifier,\n _stopProfilerIdleNotifier: () => _stopProfilerIdleNotifier,\n _tickCallback: () => _tickCallback,\n abort: () => abort,\n addListener: () => addListener,\n allowedNodeEnvironmentFlags: () => allowedNodeEnvironmentFlags,\n arch: () => arch,\n argv: () => argv,\n argv0: () => argv0,\n assert: () => assert,\n binding: () => binding,\n browser: () => browser,\n chdir: () => chdir,\n config: () => config,\n cpuUsage: () => cpuUsage,\n cwd: () => cwd,\n debugPort: () => debugPort,\n default: () => process,\n dlopen: () => dlopen,\n domain: () => domain,\n emit: () => emit,\n emitWarning: () => emitWarning,\n env: () => env,\n execArgv: () => execArgv,\n execPath: () => execPath,\n exit: () => exit,\n features: () => features,\n hasUncaughtExceptionCaptureCallback: () => hasUncaughtExceptionCaptureCallback,\n hrtime: () => hrtime,\n kill: () => kill,\n listeners: () => listeners,\n memoryUsage: () => memoryUsage,\n moduleLoadList: () => moduleLoadList,\n nextTick: () => nextTick,\n off: () => off,\n on: () => on,\n once: () => once,\n openStdin: () => openStdin,\n pid: () => pid,\n platform: () => platform,\n ppid: () => ppid,\n prependListener: () => prependListener,\n prependOnceListener: () => prependOnceListener,\n reallyExit: () => reallyExit,\n release: () => release,\n removeAllListeners: () => removeAllListeners,\n removeListener: () => removeListener,\n resourceUsage: () => resourceUsage,\n setSourceMapsEnabled: () => setSourceMapsEnabled,\n setUncaughtExceptionCaptureCallback: () => setUncaughtExceptionCaptureCallback,\n stderr: () => stderr,\n stdin: () => stdin,\n stdout: () => stdout,\n title: () => title,\n umask: () => umask,\n uptime: () => uptime,\n version: () => version,\n versions: () => versions\n });\n function unimplemented(name) {\n throw new Error(\"Node.js process \" + name + \" is not supported by JSPM core outside of Node.js\");\n }\n function cleanUpNextTick() {\n if (!draining || !currentQueue)\n return;\n draining = false;\n if (currentQueue.length) {\n queue = currentQueue.concat(queue);\n } else {\n queueIndex = -1;\n }\n if (queue.length)\n drainQueue();\n }\n function drainQueue() {\n if (draining)\n return;\n var timeout = setTimeout(cleanUpNextTick, 0);\n draining = true;\n var len = queue.length;\n while (len) {\n currentQueue = queue;\n queue = [];\n while (++queueIndex < len) {\n if (currentQueue)\n currentQueue[queueIndex].run();\n }\n queueIndex = -1;\n len = queue.length;\n }\n currentQueue = null;\n draining = false;\n clearTimeout(timeout);\n }\n function nextTick(fun) {\n var args = new Array(arguments.length - 1);\n if (arguments.length > 1) {\n for (var i3 = 1; i3 < arguments.length; i3++)\n args[i3 - 1] = arguments[i3];\n }\n queue.push(new Item(fun, args));\n if (queue.length === 1 && !draining)\n setTimeout(drainQueue, 0);\n }\n function Item(fun, array2) {\n this.fun = fun;\n this.array = array2;\n }\n function noop() {\n }\n function _linkedBinding(name) {\n unimplemented(\"_linkedBinding\");\n }\n function dlopen(name) {\n unimplemented(\"dlopen\");\n }\n function _getActiveRequests() {\n return [];\n }\n function _getActiveHandles() {\n return [];\n }\n function assert(condition, message) {\n if (!condition)\n throw new Error(message || \"assertion error\");\n }\n function hasUncaughtExceptionCaptureCallback() {\n return false;\n }\n function uptime() {\n return _performance.now() / 1e3;\n }\n function hrtime(previousTimestamp) {\n var baseNow = Math.floor((Date.now() - _performance.now()) * 1e-3);\n var clocktime = _performance.now() * 1e-3;\n var seconds = Math.floor(clocktime) + baseNow;\n var nanoseconds = Math.floor(clocktime % 1 * 1e9);\n if (previousTimestamp) {\n seconds = seconds - previousTimestamp[0];\n nanoseconds = nanoseconds - previousTimestamp[1];\n if (nanoseconds < 0) {\n seconds--;\n nanoseconds += nanoPerSec;\n }\n }\n return [seconds, nanoseconds];\n }\n function on() {\n return process;\n }\n function listeners(name) {\n return [];\n }\n var queue, draining, currentQueue, queueIndex, title, arch, platform, env, argv, execArgv, version, versions, emitWarning, binding, umask, cwd, chdir, release, browser, _rawDebug, moduleLoadList, domain, _exiting, config, reallyExit, _kill, cpuUsage, resourceUsage, memoryUsage, kill, exit, openStdin, allowedNodeEnvironmentFlags, features, _fatalExceptions, setUncaughtExceptionCaptureCallback, _tickCallback, _debugProcess, _debugEnd, _startProfilerIdleNotifier, _stopProfilerIdleNotifier, stdout, stderr, stdin, abort, pid, ppid, execPath, debugPort, argv0, _preload_modules, setSourceMapsEnabled, _performance, nowOffset, nanoPerSec, _maxListeners, _events, _eventsCount, addListener, once, off, removeListener, removeAllListeners, emit, prependListener, prependOnceListener, process;\n var init_process = __esm({\n \"../../../node_modules/.pnpm/@jspm+core@2.1.0/node_modules/@jspm/core/nodelibs/browser/process.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n queue = [];\n draining = false;\n queueIndex = -1;\n Item.prototype.run = function() {\n this.fun.apply(null, this.array);\n };\n title = \"browser\";\n arch = \"x64\";\n platform = \"browser\";\n env = {\n PATH: \"/usr/bin\",\n LANG: typeof navigator !== \"undefined\" ? navigator.language + \".UTF-8\" : void 0,\n PWD: \"/\",\n HOME: \"/home\",\n TMP: \"/tmp\"\n };\n argv = [\"/usr/bin/node\"];\n execArgv = [];\n version = \"v16.8.0\";\n versions = {};\n emitWarning = function(message, type) {\n console.warn((type ? type + \": \" : \"\") + message);\n };\n binding = function(name) {\n unimplemented(\"binding\");\n };\n umask = function(mask) {\n return 0;\n };\n cwd = function() {\n return \"/\";\n };\n chdir = function(dir) {\n };\n release = {\n name: \"node\",\n sourceUrl: \"\",\n headersUrl: \"\",\n libUrl: \"\"\n };\n browser = true;\n _rawDebug = noop;\n moduleLoadList = [];\n domain = {};\n _exiting = false;\n config = {};\n reallyExit = noop;\n _kill = noop;\n cpuUsage = function() {\n return {};\n };\n resourceUsage = cpuUsage;\n memoryUsage = cpuUsage;\n kill = noop;\n exit = noop;\n openStdin = noop;\n allowedNodeEnvironmentFlags = {};\n features = {\n inspector: false,\n debug: false,\n uv: false,\n ipv6: false,\n tls_alpn: false,\n tls_sni: false,\n tls_ocsp: false,\n tls: false,\n cached_builtins: true\n };\n _fatalExceptions = noop;\n setUncaughtExceptionCaptureCallback = noop;\n _tickCallback = noop;\n _debugProcess = noop;\n _debugEnd = noop;\n _startProfilerIdleNotifier = noop;\n _stopProfilerIdleNotifier = noop;\n stdout = void 0;\n stderr = void 0;\n stdin = void 0;\n abort = noop;\n pid = 2;\n ppid = 1;\n execPath = \"/bin/usr/node\";\n debugPort = 9229;\n argv0 = \"node\";\n _preload_modules = [];\n setSourceMapsEnabled = noop;\n _performance = {\n now: typeof performance !== \"undefined\" ? performance.now.bind(performance) : void 0,\n timing: typeof performance !== \"undefined\" ? performance.timing : void 0\n };\n if (_performance.now === void 0) {\n nowOffset = Date.now();\n if (_performance.timing && _performance.timing.navigationStart) {\n nowOffset = _performance.timing.navigationStart;\n }\n _performance.now = () => Date.now() - nowOffset;\n }\n nanoPerSec = 1e9;\n hrtime.bigint = function(time) {\n var diff = hrtime(time);\n if (typeof BigInt === \"undefined\") {\n return diff[0] * nanoPerSec + diff[1];\n }\n return BigInt(diff[0] * nanoPerSec) + BigInt(diff[1]);\n };\n _maxListeners = 10;\n _events = {};\n _eventsCount = 0;\n addListener = on;\n once = on;\n off = on;\n removeListener = on;\n removeAllListeners = on;\n emit = noop;\n prependListener = on;\n prependOnceListener = on;\n process = {\n version,\n versions,\n arch,\n platform,\n browser,\n release,\n _rawDebug,\n moduleLoadList,\n binding,\n _linkedBinding,\n _events,\n _eventsCount,\n _maxListeners,\n on,\n addListener,\n once,\n off,\n removeListener,\n removeAllListeners,\n emit,\n prependListener,\n prependOnceListener,\n listeners,\n domain,\n _exiting,\n config,\n dlopen,\n uptime,\n _getActiveRequests,\n _getActiveHandles,\n reallyExit,\n _kill,\n cpuUsage,\n resourceUsage,\n memoryUsage,\n kill,\n exit,\n openStdin,\n allowedNodeEnvironmentFlags,\n assert,\n features,\n _fatalExceptions,\n setUncaughtExceptionCaptureCallback,\n hasUncaughtExceptionCaptureCallback,\n emitWarning,\n nextTick,\n _tickCallback,\n _debugProcess,\n _debugEnd,\n _startProfilerIdleNotifier,\n _stopProfilerIdleNotifier,\n stdout,\n stdin,\n stderr,\n abort,\n umask,\n chdir,\n cwd,\n env,\n title,\n argv,\n execArgv,\n pid,\n ppid,\n execPath,\n debugPort,\n hrtime,\n argv0,\n _preload_modules,\n setSourceMapsEnabled\n };\n }\n });\n\n // ../../../node_modules/.pnpm/@lit-protocol+esbuild-plugin-polyfill-node@0.3.0_esbuild@0.19.12/node_modules/@lit-protocol/esbuild-plugin-polyfill-node/polyfills/process.js\n var init_process2 = __esm({\n \"../../../node_modules/.pnpm/@lit-protocol+esbuild-plugin-polyfill-node@0.3.0_esbuild@0.19.12/node_modules/@lit-protocol/esbuild-plugin-polyfill-node/polyfills/process.js\"() {\n \"use strict\";\n init_process();\n }\n });\n\n // ../../../node_modules/.pnpm/@jspm+core@2.1.0/node_modules/@jspm/core/nodelibs/browser/chunk-DtuTasat.js\n function dew$2() {\n if (_dewExec$2)\n return exports$2;\n _dewExec$2 = true;\n exports$2.byteLength = byteLength;\n exports$2.toByteArray = toByteArray;\n exports$2.fromByteArray = fromByteArray;\n var lookup = [];\n var revLookup = [];\n var Arr = typeof Uint8Array !== \"undefined\" ? Uint8Array : Array;\n var code = \"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/\";\n for (var i3 = 0, len = code.length; i3 < len; ++i3) {\n lookup[i3] = code[i3];\n revLookup[code.charCodeAt(i3)] = i3;\n }\n revLookup[\"-\".charCodeAt(0)] = 62;\n revLookup[\"_\".charCodeAt(0)] = 63;\n function getLens(b64) {\n var len2 = b64.length;\n if (len2 % 4 > 0) {\n throw new Error(\"Invalid string. Length must be a multiple of 4\");\n }\n var validLen = b64.indexOf(\"=\");\n if (validLen === -1)\n validLen = len2;\n var placeHoldersLen = validLen === len2 ? 0 : 4 - validLen % 4;\n return [validLen, placeHoldersLen];\n }\n function byteLength(b64) {\n var lens = getLens(b64);\n var validLen = lens[0];\n var placeHoldersLen = lens[1];\n return (validLen + placeHoldersLen) * 3 / 4 - placeHoldersLen;\n }\n function _byteLength(b64, validLen, placeHoldersLen) {\n return (validLen + placeHoldersLen) * 3 / 4 - placeHoldersLen;\n }\n function toByteArray(b64) {\n var tmp;\n var lens = getLens(b64);\n var validLen = lens[0];\n var placeHoldersLen = lens[1];\n var arr = new Arr(_byteLength(b64, validLen, placeHoldersLen));\n var curByte = 0;\n var len2 = placeHoldersLen > 0 ? validLen - 4 : validLen;\n var i4;\n for (i4 = 0; i4 < len2; i4 += 4) {\n tmp = revLookup[b64.charCodeAt(i4)] << 18 | revLookup[b64.charCodeAt(i4 + 1)] << 12 | revLookup[b64.charCodeAt(i4 + 2)] << 6 | revLookup[b64.charCodeAt(i4 + 3)];\n arr[curByte++] = tmp >> 16 & 255;\n arr[curByte++] = tmp >> 8 & 255;\n arr[curByte++] = tmp & 255;\n }\n if (placeHoldersLen === 2) {\n tmp = revLookup[b64.charCodeAt(i4)] << 2 | revLookup[b64.charCodeAt(i4 + 1)] >> 4;\n arr[curByte++] = tmp & 255;\n }\n if (placeHoldersLen === 1) {\n tmp = revLookup[b64.charCodeAt(i4)] << 10 | revLookup[b64.charCodeAt(i4 + 1)] << 4 | revLookup[b64.charCodeAt(i4 + 2)] >> 2;\n arr[curByte++] = tmp >> 8 & 255;\n arr[curByte++] = tmp & 255;\n }\n return arr;\n }\n function tripletToBase64(num2) {\n return lookup[num2 >> 18 & 63] + lookup[num2 >> 12 & 63] + lookup[num2 >> 6 & 63] + lookup[num2 & 63];\n }\n function encodeChunk(uint8, start, end) {\n var tmp;\n var output = [];\n for (var i4 = start; i4 < end; i4 += 3) {\n tmp = (uint8[i4] << 16 & 16711680) + (uint8[i4 + 1] << 8 & 65280) + (uint8[i4 + 2] & 255);\n output.push(tripletToBase64(tmp));\n }\n return output.join(\"\");\n }\n function fromByteArray(uint8) {\n var tmp;\n var len2 = uint8.length;\n var extraBytes = len2 % 3;\n var parts = [];\n var maxChunkLength = 16383;\n for (var i4 = 0, len22 = len2 - extraBytes; i4 < len22; i4 += maxChunkLength) {\n parts.push(encodeChunk(uint8, i4, i4 + maxChunkLength > len22 ? len22 : i4 + maxChunkLength));\n }\n if (extraBytes === 1) {\n tmp = uint8[len2 - 1];\n parts.push(lookup[tmp >> 2] + lookup[tmp << 4 & 63] + \"==\");\n } else if (extraBytes === 2) {\n tmp = (uint8[len2 - 2] << 8) + uint8[len2 - 1];\n parts.push(lookup[tmp >> 10] + lookup[tmp >> 4 & 63] + lookup[tmp << 2 & 63] + \"=\");\n }\n return parts.join(\"\");\n }\n return exports$2;\n }\n function dew$1() {\n if (_dewExec$1)\n return exports$1;\n _dewExec$1 = true;\n exports$1.read = function(buffer2, offset, isLE3, mLen, nBytes) {\n var e3, m2;\n var eLen = nBytes * 8 - mLen - 1;\n var eMax = (1 << eLen) - 1;\n var eBias = eMax >> 1;\n var nBits = -7;\n var i3 = isLE3 ? nBytes - 1 : 0;\n var d5 = isLE3 ? -1 : 1;\n var s4 = buffer2[offset + i3];\n i3 += d5;\n e3 = s4 & (1 << -nBits) - 1;\n s4 >>= -nBits;\n nBits += eLen;\n for (; nBits > 0; e3 = e3 * 256 + buffer2[offset + i3], i3 += d5, nBits -= 8) {\n }\n m2 = e3 & (1 << -nBits) - 1;\n e3 >>= -nBits;\n nBits += mLen;\n for (; nBits > 0; m2 = m2 * 256 + buffer2[offset + i3], i3 += d5, nBits -= 8) {\n }\n if (e3 === 0) {\n e3 = 1 - eBias;\n } else if (e3 === eMax) {\n return m2 ? NaN : (s4 ? -1 : 1) * Infinity;\n } else {\n m2 = m2 + Math.pow(2, mLen);\n e3 = e3 - eBias;\n }\n return (s4 ? -1 : 1) * m2 * Math.pow(2, e3 - mLen);\n };\n exports$1.write = function(buffer2, value, offset, isLE3, mLen, nBytes) {\n var e3, m2, c4;\n var eLen = nBytes * 8 - mLen - 1;\n var eMax = (1 << eLen) - 1;\n var eBias = eMax >> 1;\n var rt = mLen === 23 ? Math.pow(2, -24) - Math.pow(2, -77) : 0;\n var i3 = isLE3 ? 0 : nBytes - 1;\n var d5 = isLE3 ? 1 : -1;\n var s4 = value < 0 || value === 0 && 1 / value < 0 ? 1 : 0;\n value = Math.abs(value);\n if (isNaN(value) || value === Infinity) {\n m2 = isNaN(value) ? 1 : 0;\n e3 = eMax;\n } else {\n e3 = Math.floor(Math.log(value) / Math.LN2);\n if (value * (c4 = Math.pow(2, -e3)) < 1) {\n e3--;\n c4 *= 2;\n }\n if (e3 + eBias >= 1) {\n value += rt / c4;\n } else {\n value += rt * Math.pow(2, 1 - eBias);\n }\n if (value * c4 >= 2) {\n e3++;\n c4 /= 2;\n }\n if (e3 + eBias >= eMax) {\n m2 = 0;\n e3 = eMax;\n } else if (e3 + eBias >= 1) {\n m2 = (value * c4 - 1) * Math.pow(2, mLen);\n e3 = e3 + eBias;\n } else {\n m2 = value * Math.pow(2, eBias - 1) * Math.pow(2, mLen);\n e3 = 0;\n }\n }\n for (; mLen >= 8; buffer2[offset + i3] = m2 & 255, i3 += d5, m2 /= 256, mLen -= 8) {\n }\n e3 = e3 << mLen | m2;\n eLen += mLen;\n for (; eLen > 0; buffer2[offset + i3] = e3 & 255, i3 += d5, e3 /= 256, eLen -= 8) {\n }\n buffer2[offset + i3 - d5] |= s4 * 128;\n };\n return exports$1;\n }\n function dew() {\n if (_dewExec)\n return exports;\n _dewExec = true;\n const base64 = dew$2();\n const ieee754 = dew$1();\n const customInspectSymbol = typeof Symbol === \"function\" && typeof Symbol[\"for\"] === \"function\" ? Symbol[\"for\"](\"nodejs.util.inspect.custom\") : null;\n exports.Buffer = Buffer3;\n exports.SlowBuffer = SlowBuffer;\n exports.INSPECT_MAX_BYTES = 50;\n const K_MAX_LENGTH = 2147483647;\n exports.kMaxLength = K_MAX_LENGTH;\n Buffer3.TYPED_ARRAY_SUPPORT = typedArraySupport();\n if (!Buffer3.TYPED_ARRAY_SUPPORT && typeof console !== \"undefined\" && typeof console.error === \"function\") {\n console.error(\"This browser lacks typed array (Uint8Array) support which is required by `buffer` v5.x. Use `buffer` v4.x if you require old browser support.\");\n }\n function typedArraySupport() {\n try {\n const arr = new Uint8Array(1);\n const proto = {\n foo: function() {\n return 42;\n }\n };\n Object.setPrototypeOf(proto, Uint8Array.prototype);\n Object.setPrototypeOf(arr, proto);\n return arr.foo() === 42;\n } catch (e3) {\n return false;\n }\n }\n Object.defineProperty(Buffer3.prototype, \"parent\", {\n enumerable: true,\n get: function() {\n if (!Buffer3.isBuffer(this))\n return void 0;\n return this.buffer;\n }\n });\n Object.defineProperty(Buffer3.prototype, \"offset\", {\n enumerable: true,\n get: function() {\n if (!Buffer3.isBuffer(this))\n return void 0;\n return this.byteOffset;\n }\n });\n function createBuffer(length2) {\n if (length2 > K_MAX_LENGTH) {\n throw new RangeError('The value \"' + length2 + '\" is invalid for option \"size\"');\n }\n const buf = new Uint8Array(length2);\n Object.setPrototypeOf(buf, Buffer3.prototype);\n return buf;\n }\n function Buffer3(arg, encodingOrOffset, length2) {\n if (typeof arg === \"number\") {\n if (typeof encodingOrOffset === \"string\") {\n throw new TypeError('The \"string\" argument must be of type string. Received type number');\n }\n return allocUnsafe(arg);\n }\n return from14(arg, encodingOrOffset, length2);\n }\n Buffer3.poolSize = 8192;\n function from14(value, encodingOrOffset, length2) {\n if (typeof value === \"string\") {\n return fromString5(value, encodingOrOffset);\n }\n if (ArrayBuffer.isView(value)) {\n return fromArrayView(value);\n }\n if (value == null) {\n throw new TypeError(\"The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type \" + typeof value);\n }\n if (isInstance(value, ArrayBuffer) || value && isInstance(value.buffer, ArrayBuffer)) {\n return fromArrayBuffer(value, encodingOrOffset, length2);\n }\n if (typeof SharedArrayBuffer !== \"undefined\" && (isInstance(value, SharedArrayBuffer) || value && isInstance(value.buffer, SharedArrayBuffer))) {\n return fromArrayBuffer(value, encodingOrOffset, length2);\n }\n if (typeof value === \"number\") {\n throw new TypeError('The \"value\" argument must not be of type number. Received type number');\n }\n const valueOf = value.valueOf && value.valueOf();\n if (valueOf != null && valueOf !== value) {\n return Buffer3.from(valueOf, encodingOrOffset, length2);\n }\n const b4 = fromObject(value);\n if (b4)\n return b4;\n if (typeof Symbol !== \"undefined\" && Symbol.toPrimitive != null && typeof value[Symbol.toPrimitive] === \"function\") {\n return Buffer3.from(value[Symbol.toPrimitive](\"string\"), encodingOrOffset, length2);\n }\n throw new TypeError(\"The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type \" + typeof value);\n }\n Buffer3.from = function(value, encodingOrOffset, length2) {\n return from14(value, encodingOrOffset, length2);\n };\n Object.setPrototypeOf(Buffer3.prototype, Uint8Array.prototype);\n Object.setPrototypeOf(Buffer3, Uint8Array);\n function assertSize6(size6) {\n if (typeof size6 !== \"number\") {\n throw new TypeError('\"size\" argument must be of type number');\n } else if (size6 < 0) {\n throw new RangeError('The value \"' + size6 + '\" is invalid for option \"size\"');\n }\n }\n function alloc(size6, fill, encoding) {\n assertSize6(size6);\n if (size6 <= 0) {\n return createBuffer(size6);\n }\n if (fill !== void 0) {\n return typeof encoding === \"string\" ? createBuffer(size6).fill(fill, encoding) : createBuffer(size6).fill(fill);\n }\n return createBuffer(size6);\n }\n Buffer3.alloc = function(size6, fill, encoding) {\n return alloc(size6, fill, encoding);\n };\n function allocUnsafe(size6) {\n assertSize6(size6);\n return createBuffer(size6 < 0 ? 0 : checked(size6) | 0);\n }\n Buffer3.allocUnsafe = function(size6) {\n return allocUnsafe(size6);\n };\n Buffer3.allocUnsafeSlow = function(size6) {\n return allocUnsafe(size6);\n };\n function fromString5(string2, encoding) {\n if (typeof encoding !== \"string\" || encoding === \"\") {\n encoding = \"utf8\";\n }\n if (!Buffer3.isEncoding(encoding)) {\n throw new TypeError(\"Unknown encoding: \" + encoding);\n }\n const length2 = byteLength(string2, encoding) | 0;\n let buf = createBuffer(length2);\n const actual = buf.write(string2, encoding);\n if (actual !== length2) {\n buf = buf.slice(0, actual);\n }\n return buf;\n }\n function fromArrayLike(array2) {\n const length2 = array2.length < 0 ? 0 : checked(array2.length) | 0;\n const buf = createBuffer(length2);\n for (let i3 = 0; i3 < length2; i3 += 1) {\n buf[i3] = array2[i3] & 255;\n }\n return buf;\n }\n function fromArrayView(arrayView) {\n if (isInstance(arrayView, Uint8Array)) {\n const copy = new Uint8Array(arrayView);\n return fromArrayBuffer(copy.buffer, copy.byteOffset, copy.byteLength);\n }\n return fromArrayLike(arrayView);\n }\n function fromArrayBuffer(array2, byteOffset, length2) {\n if (byteOffset < 0 || array2.byteLength < byteOffset) {\n throw new RangeError('\"offset\" is outside of buffer bounds');\n }\n if (array2.byteLength < byteOffset + (length2 || 0)) {\n throw new RangeError('\"length\" is outside of buffer bounds');\n }\n let buf;\n if (byteOffset === void 0 && length2 === void 0) {\n buf = new Uint8Array(array2);\n } else if (length2 === void 0) {\n buf = new Uint8Array(array2, byteOffset);\n } else {\n buf = new Uint8Array(array2, byteOffset, length2);\n }\n Object.setPrototypeOf(buf, Buffer3.prototype);\n return buf;\n }\n function fromObject(obj) {\n if (Buffer3.isBuffer(obj)) {\n const len = checked(obj.length) | 0;\n const buf = createBuffer(len);\n if (buf.length === 0) {\n return buf;\n }\n obj.copy(buf, 0, 0, len);\n return buf;\n }\n if (obj.length !== void 0) {\n if (typeof obj.length !== \"number\" || numberIsNaN(obj.length)) {\n return createBuffer(0);\n }\n return fromArrayLike(obj);\n }\n if (obj.type === \"Buffer\" && Array.isArray(obj.data)) {\n return fromArrayLike(obj.data);\n }\n }\n function checked(length2) {\n if (length2 >= K_MAX_LENGTH) {\n throw new RangeError(\"Attempt to allocate Buffer larger than maximum size: 0x\" + K_MAX_LENGTH.toString(16) + \" bytes\");\n }\n return length2 | 0;\n }\n function SlowBuffer(length2) {\n if (+length2 != length2) {\n length2 = 0;\n }\n return Buffer3.alloc(+length2);\n }\n Buffer3.isBuffer = function isBuffer(b4) {\n return b4 != null && b4._isBuffer === true && b4 !== Buffer3.prototype;\n };\n Buffer3.compare = function compare(a3, b4) {\n if (isInstance(a3, Uint8Array))\n a3 = Buffer3.from(a3, a3.offset, a3.byteLength);\n if (isInstance(b4, Uint8Array))\n b4 = Buffer3.from(b4, b4.offset, b4.byteLength);\n if (!Buffer3.isBuffer(a3) || !Buffer3.isBuffer(b4)) {\n throw new TypeError('The \"buf1\", \"buf2\" arguments must be one of type Buffer or Uint8Array');\n }\n if (a3 === b4)\n return 0;\n let x4 = a3.length;\n let y6 = b4.length;\n for (let i3 = 0, len = Math.min(x4, y6); i3 < len; ++i3) {\n if (a3[i3] !== b4[i3]) {\n x4 = a3[i3];\n y6 = b4[i3];\n break;\n }\n }\n if (x4 < y6)\n return -1;\n if (y6 < x4)\n return 1;\n return 0;\n };\n Buffer3.isEncoding = function isEncoding(encoding) {\n switch (String(encoding).toLowerCase()) {\n case \"hex\":\n case \"utf8\":\n case \"utf-8\":\n case \"ascii\":\n case \"latin1\":\n case \"binary\":\n case \"base64\":\n case \"ucs2\":\n case \"ucs-2\":\n case \"utf16le\":\n case \"utf-16le\":\n return true;\n default:\n return false;\n }\n };\n Buffer3.concat = function concat5(list, length2) {\n if (!Array.isArray(list)) {\n throw new TypeError('\"list\" argument must be an Array of Buffers');\n }\n if (list.length === 0) {\n return Buffer3.alloc(0);\n }\n let i3;\n if (length2 === void 0) {\n length2 = 0;\n for (i3 = 0; i3 < list.length; ++i3) {\n length2 += list[i3].length;\n }\n }\n const buffer2 = Buffer3.allocUnsafe(length2);\n let pos = 0;\n for (i3 = 0; i3 < list.length; ++i3) {\n let buf = list[i3];\n if (isInstance(buf, Uint8Array)) {\n if (pos + buf.length > buffer2.length) {\n if (!Buffer3.isBuffer(buf))\n buf = Buffer3.from(buf);\n buf.copy(buffer2, pos);\n } else {\n Uint8Array.prototype.set.call(buffer2, buf, pos);\n }\n } else if (!Buffer3.isBuffer(buf)) {\n throw new TypeError('\"list\" argument must be an Array of Buffers');\n } else {\n buf.copy(buffer2, pos);\n }\n pos += buf.length;\n }\n return buffer2;\n };\n function byteLength(string2, encoding) {\n if (Buffer3.isBuffer(string2)) {\n return string2.length;\n }\n if (ArrayBuffer.isView(string2) || isInstance(string2, ArrayBuffer)) {\n return string2.byteLength;\n }\n if (typeof string2 !== \"string\") {\n throw new TypeError('The \"string\" argument must be one of type string, Buffer, or ArrayBuffer. Received type ' + typeof string2);\n }\n const len = string2.length;\n const mustMatch = arguments.length > 2 && arguments[2] === true;\n if (!mustMatch && len === 0)\n return 0;\n let loweredCase = false;\n for (; ; ) {\n switch (encoding) {\n case \"ascii\":\n case \"latin1\":\n case \"binary\":\n return len;\n case \"utf8\":\n case \"utf-8\":\n return utf8ToBytes3(string2).length;\n case \"ucs2\":\n case \"ucs-2\":\n case \"utf16le\":\n case \"utf-16le\":\n return len * 2;\n case \"hex\":\n return len >>> 1;\n case \"base64\":\n return base64ToBytes(string2).length;\n default:\n if (loweredCase) {\n return mustMatch ? -1 : utf8ToBytes3(string2).length;\n }\n encoding = (\"\" + encoding).toLowerCase();\n loweredCase = true;\n }\n }\n }\n Buffer3.byteLength = byteLength;\n function slowToString(encoding, start, end) {\n let loweredCase = false;\n if (start === void 0 || start < 0) {\n start = 0;\n }\n if (start > this.length) {\n return \"\";\n }\n if (end === void 0 || end > this.length) {\n end = this.length;\n }\n if (end <= 0) {\n return \"\";\n }\n end >>>= 0;\n start >>>= 0;\n if (end <= start) {\n return \"\";\n }\n if (!encoding)\n encoding = \"utf8\";\n while (true) {\n switch (encoding) {\n case \"hex\":\n return hexSlice(this, start, end);\n case \"utf8\":\n case \"utf-8\":\n return utf8Slice(this, start, end);\n case \"ascii\":\n return asciiSlice(this, start, end);\n case \"latin1\":\n case \"binary\":\n return latin1Slice(this, start, end);\n case \"base64\":\n return base64Slice(this, start, end);\n case \"ucs2\":\n case \"ucs-2\":\n case \"utf16le\":\n case \"utf-16le\":\n return utf16leSlice(this, start, end);\n default:\n if (loweredCase)\n throw new TypeError(\"Unknown encoding: \" + encoding);\n encoding = (encoding + \"\").toLowerCase();\n loweredCase = true;\n }\n }\n }\n Buffer3.prototype._isBuffer = true;\n function swap(b4, n2, m2) {\n const i3 = b4[n2];\n b4[n2] = b4[m2];\n b4[m2] = i3;\n }\n Buffer3.prototype.swap16 = function swap16() {\n const len = this.length;\n if (len % 2 !== 0) {\n throw new RangeError(\"Buffer size must be a multiple of 16-bits\");\n }\n for (let i3 = 0; i3 < len; i3 += 2) {\n swap(this, i3, i3 + 1);\n }\n return this;\n };\n Buffer3.prototype.swap32 = function swap32() {\n const len = this.length;\n if (len % 4 !== 0) {\n throw new RangeError(\"Buffer size must be a multiple of 32-bits\");\n }\n for (let i3 = 0; i3 < len; i3 += 4) {\n swap(this, i3, i3 + 3);\n swap(this, i3 + 1, i3 + 2);\n }\n return this;\n };\n Buffer3.prototype.swap64 = function swap64() {\n const len = this.length;\n if (len % 8 !== 0) {\n throw new RangeError(\"Buffer size must be a multiple of 64-bits\");\n }\n for (let i3 = 0; i3 < len; i3 += 8) {\n swap(this, i3, i3 + 7);\n swap(this, i3 + 1, i3 + 6);\n swap(this, i3 + 2, i3 + 5);\n swap(this, i3 + 3, i3 + 4);\n }\n return this;\n };\n Buffer3.prototype.toString = function toString2() {\n const length2 = this.length;\n if (length2 === 0)\n return \"\";\n if (arguments.length === 0)\n return utf8Slice(this, 0, length2);\n return slowToString.apply(this, arguments);\n };\n Buffer3.prototype.toLocaleString = Buffer3.prototype.toString;\n Buffer3.prototype.equals = function equals(b4) {\n if (!Buffer3.isBuffer(b4))\n throw new TypeError(\"Argument must be a Buffer\");\n if (this === b4)\n return true;\n return Buffer3.compare(this, b4) === 0;\n };\n Buffer3.prototype.inspect = function inspect() {\n let str = \"\";\n const max = exports.INSPECT_MAX_BYTES;\n str = this.toString(\"hex\", 0, max).replace(/(.{2})/g, \"$1 \").trim();\n if (this.length > max)\n str += \" ... \";\n return \"\";\n };\n if (customInspectSymbol) {\n Buffer3.prototype[customInspectSymbol] = Buffer3.prototype.inspect;\n }\n Buffer3.prototype.compare = function compare(target, start, end, thisStart, thisEnd) {\n if (isInstance(target, Uint8Array)) {\n target = Buffer3.from(target, target.offset, target.byteLength);\n }\n if (!Buffer3.isBuffer(target)) {\n throw new TypeError('The \"target\" argument must be one of type Buffer or Uint8Array. Received type ' + typeof target);\n }\n if (start === void 0) {\n start = 0;\n }\n if (end === void 0) {\n end = target ? target.length : 0;\n }\n if (thisStart === void 0) {\n thisStart = 0;\n }\n if (thisEnd === void 0) {\n thisEnd = this.length;\n }\n if (start < 0 || end > target.length || thisStart < 0 || thisEnd > this.length) {\n throw new RangeError(\"out of range index\");\n }\n if (thisStart >= thisEnd && start >= end) {\n return 0;\n }\n if (thisStart >= thisEnd) {\n return -1;\n }\n if (start >= end) {\n return 1;\n }\n start >>>= 0;\n end >>>= 0;\n thisStart >>>= 0;\n thisEnd >>>= 0;\n if (this === target)\n return 0;\n let x4 = thisEnd - thisStart;\n let y6 = end - start;\n const len = Math.min(x4, y6);\n const thisCopy = this.slice(thisStart, thisEnd);\n const targetCopy = target.slice(start, end);\n for (let i3 = 0; i3 < len; ++i3) {\n if (thisCopy[i3] !== targetCopy[i3]) {\n x4 = thisCopy[i3];\n y6 = targetCopy[i3];\n break;\n }\n }\n if (x4 < y6)\n return -1;\n if (y6 < x4)\n return 1;\n return 0;\n };\n function bidirectionalIndexOf(buffer2, val, byteOffset, encoding, dir) {\n if (buffer2.length === 0)\n return -1;\n if (typeof byteOffset === \"string\") {\n encoding = byteOffset;\n byteOffset = 0;\n } else if (byteOffset > 2147483647) {\n byteOffset = 2147483647;\n } else if (byteOffset < -2147483648) {\n byteOffset = -2147483648;\n }\n byteOffset = +byteOffset;\n if (numberIsNaN(byteOffset)) {\n byteOffset = dir ? 0 : buffer2.length - 1;\n }\n if (byteOffset < 0)\n byteOffset = buffer2.length + byteOffset;\n if (byteOffset >= buffer2.length) {\n if (dir)\n return -1;\n else\n byteOffset = buffer2.length - 1;\n } else if (byteOffset < 0) {\n if (dir)\n byteOffset = 0;\n else\n return -1;\n }\n if (typeof val === \"string\") {\n val = Buffer3.from(val, encoding);\n }\n if (Buffer3.isBuffer(val)) {\n if (val.length === 0) {\n return -1;\n }\n return arrayIndexOf(buffer2, val, byteOffset, encoding, dir);\n } else if (typeof val === \"number\") {\n val = val & 255;\n if (typeof Uint8Array.prototype.indexOf === \"function\") {\n if (dir) {\n return Uint8Array.prototype.indexOf.call(buffer2, val, byteOffset);\n } else {\n return Uint8Array.prototype.lastIndexOf.call(buffer2, val, byteOffset);\n }\n }\n return arrayIndexOf(buffer2, [val], byteOffset, encoding, dir);\n }\n throw new TypeError(\"val must be string, number or Buffer\");\n }\n function arrayIndexOf(arr, val, byteOffset, encoding, dir) {\n let indexSize = 1;\n let arrLength = arr.length;\n let valLength = val.length;\n if (encoding !== void 0) {\n encoding = String(encoding).toLowerCase();\n if (encoding === \"ucs2\" || encoding === \"ucs-2\" || encoding === \"utf16le\" || encoding === \"utf-16le\") {\n if (arr.length < 2 || val.length < 2) {\n return -1;\n }\n indexSize = 2;\n arrLength /= 2;\n valLength /= 2;\n byteOffset /= 2;\n }\n }\n function read(buf, i4) {\n if (indexSize === 1) {\n return buf[i4];\n } else {\n return buf.readUInt16BE(i4 * indexSize);\n }\n }\n let i3;\n if (dir) {\n let foundIndex = -1;\n for (i3 = byteOffset; i3 < arrLength; i3++) {\n if (read(arr, i3) === read(val, foundIndex === -1 ? 0 : i3 - foundIndex)) {\n if (foundIndex === -1)\n foundIndex = i3;\n if (i3 - foundIndex + 1 === valLength)\n return foundIndex * indexSize;\n } else {\n if (foundIndex !== -1)\n i3 -= i3 - foundIndex;\n foundIndex = -1;\n }\n }\n } else {\n if (byteOffset + valLength > arrLength)\n byteOffset = arrLength - valLength;\n for (i3 = byteOffset; i3 >= 0; i3--) {\n let found = true;\n for (let j2 = 0; j2 < valLength; j2++) {\n if (read(arr, i3 + j2) !== read(val, j2)) {\n found = false;\n break;\n }\n }\n if (found)\n return i3;\n }\n }\n return -1;\n }\n Buffer3.prototype.includes = function includes(val, byteOffset, encoding) {\n return this.indexOf(val, byteOffset, encoding) !== -1;\n };\n Buffer3.prototype.indexOf = function indexOf(val, byteOffset, encoding) {\n return bidirectionalIndexOf(this, val, byteOffset, encoding, true);\n };\n Buffer3.prototype.lastIndexOf = function lastIndexOf(val, byteOffset, encoding) {\n return bidirectionalIndexOf(this, val, byteOffset, encoding, false);\n };\n function hexWrite(buf, string2, offset, length2) {\n offset = Number(offset) || 0;\n const remaining = buf.length - offset;\n if (!length2) {\n length2 = remaining;\n } else {\n length2 = Number(length2);\n if (length2 > remaining) {\n length2 = remaining;\n }\n }\n const strLen = string2.length;\n if (length2 > strLen / 2) {\n length2 = strLen / 2;\n }\n let i3;\n for (i3 = 0; i3 < length2; ++i3) {\n const parsed = parseInt(string2.substr(i3 * 2, 2), 16);\n if (numberIsNaN(parsed))\n return i3;\n buf[offset + i3] = parsed;\n }\n return i3;\n }\n function utf8Write(buf, string2, offset, length2) {\n return blitBuffer(utf8ToBytes3(string2, buf.length - offset), buf, offset, length2);\n }\n function asciiWrite(buf, string2, offset, length2) {\n return blitBuffer(asciiToBytes(string2), buf, offset, length2);\n }\n function base64Write(buf, string2, offset, length2) {\n return blitBuffer(base64ToBytes(string2), buf, offset, length2);\n }\n function ucs2Write(buf, string2, offset, length2) {\n return blitBuffer(utf16leToBytes(string2, buf.length - offset), buf, offset, length2);\n }\n Buffer3.prototype.write = function write(string2, offset, length2, encoding) {\n if (offset === void 0) {\n encoding = \"utf8\";\n length2 = this.length;\n offset = 0;\n } else if (length2 === void 0 && typeof offset === \"string\") {\n encoding = offset;\n length2 = this.length;\n offset = 0;\n } else if (isFinite(offset)) {\n offset = offset >>> 0;\n if (isFinite(length2)) {\n length2 = length2 >>> 0;\n if (encoding === void 0)\n encoding = \"utf8\";\n } else {\n encoding = length2;\n length2 = void 0;\n }\n } else {\n throw new Error(\"Buffer.write(string, encoding, offset[, length]) is no longer supported\");\n }\n const remaining = this.length - offset;\n if (length2 === void 0 || length2 > remaining)\n length2 = remaining;\n if (string2.length > 0 && (length2 < 0 || offset < 0) || offset > this.length) {\n throw new RangeError(\"Attempt to write outside buffer bounds\");\n }\n if (!encoding)\n encoding = \"utf8\";\n let loweredCase = false;\n for (; ; ) {\n switch (encoding) {\n case \"hex\":\n return hexWrite(this, string2, offset, length2);\n case \"utf8\":\n case \"utf-8\":\n return utf8Write(this, string2, offset, length2);\n case \"ascii\":\n case \"latin1\":\n case \"binary\":\n return asciiWrite(this, string2, offset, length2);\n case \"base64\":\n return base64Write(this, string2, offset, length2);\n case \"ucs2\":\n case \"ucs-2\":\n case \"utf16le\":\n case \"utf-16le\":\n return ucs2Write(this, string2, offset, length2);\n default:\n if (loweredCase)\n throw new TypeError(\"Unknown encoding: \" + encoding);\n encoding = (\"\" + encoding).toLowerCase();\n loweredCase = true;\n }\n }\n };\n Buffer3.prototype.toJSON = function toJSON() {\n return {\n type: \"Buffer\",\n data: Array.prototype.slice.call(this._arr || this, 0)\n };\n };\n function base64Slice(buf, start, end) {\n if (start === 0 && end === buf.length) {\n return base64.fromByteArray(buf);\n } else {\n return base64.fromByteArray(buf.slice(start, end));\n }\n }\n function utf8Slice(buf, start, end) {\n end = Math.min(buf.length, end);\n const res = [];\n let i3 = start;\n while (i3 < end) {\n const firstByte = buf[i3];\n let codePoint = null;\n let bytesPerSequence = firstByte > 239 ? 4 : firstByte > 223 ? 3 : firstByte > 191 ? 2 : 1;\n if (i3 + bytesPerSequence <= end) {\n let secondByte, thirdByte, fourthByte, tempCodePoint;\n switch (bytesPerSequence) {\n case 1:\n if (firstByte < 128) {\n codePoint = firstByte;\n }\n break;\n case 2:\n secondByte = buf[i3 + 1];\n if ((secondByte & 192) === 128) {\n tempCodePoint = (firstByte & 31) << 6 | secondByte & 63;\n if (tempCodePoint > 127) {\n codePoint = tempCodePoint;\n }\n }\n break;\n case 3:\n secondByte = buf[i3 + 1];\n thirdByte = buf[i3 + 2];\n if ((secondByte & 192) === 128 && (thirdByte & 192) === 128) {\n tempCodePoint = (firstByte & 15) << 12 | (secondByte & 63) << 6 | thirdByte & 63;\n if (tempCodePoint > 2047 && (tempCodePoint < 55296 || tempCodePoint > 57343)) {\n codePoint = tempCodePoint;\n }\n }\n break;\n case 4:\n secondByte = buf[i3 + 1];\n thirdByte = buf[i3 + 2];\n fourthByte = buf[i3 + 3];\n if ((secondByte & 192) === 128 && (thirdByte & 192) === 128 && (fourthByte & 192) === 128) {\n tempCodePoint = (firstByte & 15) << 18 | (secondByte & 63) << 12 | (thirdByte & 63) << 6 | fourthByte & 63;\n if (tempCodePoint > 65535 && tempCodePoint < 1114112) {\n codePoint = tempCodePoint;\n }\n }\n }\n }\n if (codePoint === null) {\n codePoint = 65533;\n bytesPerSequence = 1;\n } else if (codePoint > 65535) {\n codePoint -= 65536;\n res.push(codePoint >>> 10 & 1023 | 55296);\n codePoint = 56320 | codePoint & 1023;\n }\n res.push(codePoint);\n i3 += bytesPerSequence;\n }\n return decodeCodePointsArray(res);\n }\n const MAX_ARGUMENTS_LENGTH = 4096;\n function decodeCodePointsArray(codePoints) {\n const len = codePoints.length;\n if (len <= MAX_ARGUMENTS_LENGTH) {\n return String.fromCharCode.apply(String, codePoints);\n }\n let res = \"\";\n let i3 = 0;\n while (i3 < len) {\n res += String.fromCharCode.apply(String, codePoints.slice(i3, i3 += MAX_ARGUMENTS_LENGTH));\n }\n return res;\n }\n function asciiSlice(buf, start, end) {\n let ret = \"\";\n end = Math.min(buf.length, end);\n for (let i3 = start; i3 < end; ++i3) {\n ret += String.fromCharCode(buf[i3] & 127);\n }\n return ret;\n }\n function latin1Slice(buf, start, end) {\n let ret = \"\";\n end = Math.min(buf.length, end);\n for (let i3 = start; i3 < end; ++i3) {\n ret += String.fromCharCode(buf[i3]);\n }\n return ret;\n }\n function hexSlice(buf, start, end) {\n const len = buf.length;\n if (!start || start < 0)\n start = 0;\n if (!end || end < 0 || end > len)\n end = len;\n let out = \"\";\n for (let i3 = start; i3 < end; ++i3) {\n out += hexSliceLookupTable[buf[i3]];\n }\n return out;\n }\n function utf16leSlice(buf, start, end) {\n const bytes = buf.slice(start, end);\n let res = \"\";\n for (let i3 = 0; i3 < bytes.length - 1; i3 += 2) {\n res += String.fromCharCode(bytes[i3] + bytes[i3 + 1] * 256);\n }\n return res;\n }\n Buffer3.prototype.slice = function slice4(start, end) {\n const len = this.length;\n start = ~~start;\n end = end === void 0 ? len : ~~end;\n if (start < 0) {\n start += len;\n if (start < 0)\n start = 0;\n } else if (start > len) {\n start = len;\n }\n if (end < 0) {\n end += len;\n if (end < 0)\n end = 0;\n } else if (end > len) {\n end = len;\n }\n if (end < start)\n end = start;\n const newBuf = this.subarray(start, end);\n Object.setPrototypeOf(newBuf, Buffer3.prototype);\n return newBuf;\n };\n function checkOffset(offset, ext, length2) {\n if (offset % 1 !== 0 || offset < 0)\n throw new RangeError(\"offset is not uint\");\n if (offset + ext > length2)\n throw new RangeError(\"Trying to access beyond buffer length\");\n }\n Buffer3.prototype.readUintLE = Buffer3.prototype.readUIntLE = function readUIntLE(offset, byteLength2, noAssert) {\n offset = offset >>> 0;\n byteLength2 = byteLength2 >>> 0;\n if (!noAssert)\n checkOffset(offset, byteLength2, this.length);\n let val = this[offset];\n let mul = 1;\n let i3 = 0;\n while (++i3 < byteLength2 && (mul *= 256)) {\n val += this[offset + i3] * mul;\n }\n return val;\n };\n Buffer3.prototype.readUintBE = Buffer3.prototype.readUIntBE = function readUIntBE(offset, byteLength2, noAssert) {\n offset = offset >>> 0;\n byteLength2 = byteLength2 >>> 0;\n if (!noAssert) {\n checkOffset(offset, byteLength2, this.length);\n }\n let val = this[offset + --byteLength2];\n let mul = 1;\n while (byteLength2 > 0 && (mul *= 256)) {\n val += this[offset + --byteLength2] * mul;\n }\n return val;\n };\n Buffer3.prototype.readUint8 = Buffer3.prototype.readUInt8 = function readUInt8(offset, noAssert) {\n offset = offset >>> 0;\n if (!noAssert)\n checkOffset(offset, 1, this.length);\n return this[offset];\n };\n Buffer3.prototype.readUint16LE = Buffer3.prototype.readUInt16LE = function readUInt16LE(offset, noAssert) {\n offset = offset >>> 0;\n if (!noAssert)\n checkOffset(offset, 2, this.length);\n return this[offset] | this[offset + 1] << 8;\n };\n Buffer3.prototype.readUint16BE = Buffer3.prototype.readUInt16BE = function readUInt16BE(offset, noAssert) {\n offset = offset >>> 0;\n if (!noAssert)\n checkOffset(offset, 2, this.length);\n return this[offset] << 8 | this[offset + 1];\n };\n Buffer3.prototype.readUint32LE = Buffer3.prototype.readUInt32LE = function readUInt32LE(offset, noAssert) {\n offset = offset >>> 0;\n if (!noAssert)\n checkOffset(offset, 4, this.length);\n return (this[offset] | this[offset + 1] << 8 | this[offset + 2] << 16) + this[offset + 3] * 16777216;\n };\n Buffer3.prototype.readUint32BE = Buffer3.prototype.readUInt32BE = function readUInt32BE(offset, noAssert) {\n offset = offset >>> 0;\n if (!noAssert)\n checkOffset(offset, 4, this.length);\n return this[offset] * 16777216 + (this[offset + 1] << 16 | this[offset + 2] << 8 | this[offset + 3]);\n };\n Buffer3.prototype.readBigUInt64LE = defineBigIntMethod(function readBigUInt64LE(offset) {\n offset = offset >>> 0;\n validateNumber(offset, \"offset\");\n const first = this[offset];\n const last = this[offset + 7];\n if (first === void 0 || last === void 0) {\n boundsError(offset, this.length - 8);\n }\n const lo = first + this[++offset] * 2 ** 8 + this[++offset] * 2 ** 16 + this[++offset] * 2 ** 24;\n const hi = this[++offset] + this[++offset] * 2 ** 8 + this[++offset] * 2 ** 16 + last * 2 ** 24;\n return BigInt(lo) + (BigInt(hi) << BigInt(32));\n });\n Buffer3.prototype.readBigUInt64BE = defineBigIntMethod(function readBigUInt64BE(offset) {\n offset = offset >>> 0;\n validateNumber(offset, \"offset\");\n const first = this[offset];\n const last = this[offset + 7];\n if (first === void 0 || last === void 0) {\n boundsError(offset, this.length - 8);\n }\n const hi = first * 2 ** 24 + this[++offset] * 2 ** 16 + this[++offset] * 2 ** 8 + this[++offset];\n const lo = this[++offset] * 2 ** 24 + this[++offset] * 2 ** 16 + this[++offset] * 2 ** 8 + last;\n return (BigInt(hi) << BigInt(32)) + BigInt(lo);\n });\n Buffer3.prototype.readIntLE = function readIntLE(offset, byteLength2, noAssert) {\n offset = offset >>> 0;\n byteLength2 = byteLength2 >>> 0;\n if (!noAssert)\n checkOffset(offset, byteLength2, this.length);\n let val = this[offset];\n let mul = 1;\n let i3 = 0;\n while (++i3 < byteLength2 && (mul *= 256)) {\n val += this[offset + i3] * mul;\n }\n mul *= 128;\n if (val >= mul)\n val -= Math.pow(2, 8 * byteLength2);\n return val;\n };\n Buffer3.prototype.readIntBE = function readIntBE(offset, byteLength2, noAssert) {\n offset = offset >>> 0;\n byteLength2 = byteLength2 >>> 0;\n if (!noAssert)\n checkOffset(offset, byteLength2, this.length);\n let i3 = byteLength2;\n let mul = 1;\n let val = this[offset + --i3];\n while (i3 > 0 && (mul *= 256)) {\n val += this[offset + --i3] * mul;\n }\n mul *= 128;\n if (val >= mul)\n val -= Math.pow(2, 8 * byteLength2);\n return val;\n };\n Buffer3.prototype.readInt8 = function readInt8(offset, noAssert) {\n offset = offset >>> 0;\n if (!noAssert)\n checkOffset(offset, 1, this.length);\n if (!(this[offset] & 128))\n return this[offset];\n return (255 - this[offset] + 1) * -1;\n };\n Buffer3.prototype.readInt16LE = function readInt16LE(offset, noAssert) {\n offset = offset >>> 0;\n if (!noAssert)\n checkOffset(offset, 2, this.length);\n const val = this[offset] | this[offset + 1] << 8;\n return val & 32768 ? val | 4294901760 : val;\n };\n Buffer3.prototype.readInt16BE = function readInt16BE(offset, noAssert) {\n offset = offset >>> 0;\n if (!noAssert)\n checkOffset(offset, 2, this.length);\n const val = this[offset + 1] | this[offset] << 8;\n return val & 32768 ? val | 4294901760 : val;\n };\n Buffer3.prototype.readInt32LE = function readInt32LE(offset, noAssert) {\n offset = offset >>> 0;\n if (!noAssert)\n checkOffset(offset, 4, this.length);\n return this[offset] | this[offset + 1] << 8 | this[offset + 2] << 16 | this[offset + 3] << 24;\n };\n Buffer3.prototype.readInt32BE = function readInt32BE(offset, noAssert) {\n offset = offset >>> 0;\n if (!noAssert)\n checkOffset(offset, 4, this.length);\n return this[offset] << 24 | this[offset + 1] << 16 | this[offset + 2] << 8 | this[offset + 3];\n };\n Buffer3.prototype.readBigInt64LE = defineBigIntMethod(function readBigInt64LE(offset) {\n offset = offset >>> 0;\n validateNumber(offset, \"offset\");\n const first = this[offset];\n const last = this[offset + 7];\n if (first === void 0 || last === void 0) {\n boundsError(offset, this.length - 8);\n }\n const val = this[offset + 4] + this[offset + 5] * 2 ** 8 + this[offset + 6] * 2 ** 16 + (last << 24);\n return (BigInt(val) << BigInt(32)) + BigInt(first + this[++offset] * 2 ** 8 + this[++offset] * 2 ** 16 + this[++offset] * 2 ** 24);\n });\n Buffer3.prototype.readBigInt64BE = defineBigIntMethod(function readBigInt64BE(offset) {\n offset = offset >>> 0;\n validateNumber(offset, \"offset\");\n const first = this[offset];\n const last = this[offset + 7];\n if (first === void 0 || last === void 0) {\n boundsError(offset, this.length - 8);\n }\n const val = (first << 24) + // Overflow\n this[++offset] * 2 ** 16 + this[++offset] * 2 ** 8 + this[++offset];\n return (BigInt(val) << BigInt(32)) + BigInt(this[++offset] * 2 ** 24 + this[++offset] * 2 ** 16 + this[++offset] * 2 ** 8 + last);\n });\n Buffer3.prototype.readFloatLE = function readFloatLE(offset, noAssert) {\n offset = offset >>> 0;\n if (!noAssert)\n checkOffset(offset, 4, this.length);\n return ieee754.read(this, offset, true, 23, 4);\n };\n Buffer3.prototype.readFloatBE = function readFloatBE(offset, noAssert) {\n offset = offset >>> 0;\n if (!noAssert)\n checkOffset(offset, 4, this.length);\n return ieee754.read(this, offset, false, 23, 4);\n };\n Buffer3.prototype.readDoubleLE = function readDoubleLE(offset, noAssert) {\n offset = offset >>> 0;\n if (!noAssert)\n checkOffset(offset, 8, this.length);\n return ieee754.read(this, offset, true, 52, 8);\n };\n Buffer3.prototype.readDoubleBE = function readDoubleBE(offset, noAssert) {\n offset = offset >>> 0;\n if (!noAssert)\n checkOffset(offset, 8, this.length);\n return ieee754.read(this, offset, false, 52, 8);\n };\n function checkInt(buf, value, offset, ext, max, min) {\n if (!Buffer3.isBuffer(buf))\n throw new TypeError('\"buffer\" argument must be a Buffer instance');\n if (value > max || value < min)\n throw new RangeError('\"value\" argument is out of bounds');\n if (offset + ext > buf.length)\n throw new RangeError(\"Index out of range\");\n }\n Buffer3.prototype.writeUintLE = Buffer3.prototype.writeUIntLE = function writeUIntLE(value, offset, byteLength2, noAssert) {\n value = +value;\n offset = offset >>> 0;\n byteLength2 = byteLength2 >>> 0;\n if (!noAssert) {\n const maxBytes = Math.pow(2, 8 * byteLength2) - 1;\n checkInt(this, value, offset, byteLength2, maxBytes, 0);\n }\n let mul = 1;\n let i3 = 0;\n this[offset] = value & 255;\n while (++i3 < byteLength2 && (mul *= 256)) {\n this[offset + i3] = value / mul & 255;\n }\n return offset + byteLength2;\n };\n Buffer3.prototype.writeUintBE = Buffer3.prototype.writeUIntBE = function writeUIntBE(value, offset, byteLength2, noAssert) {\n value = +value;\n offset = offset >>> 0;\n byteLength2 = byteLength2 >>> 0;\n if (!noAssert) {\n const maxBytes = Math.pow(2, 8 * byteLength2) - 1;\n checkInt(this, value, offset, byteLength2, maxBytes, 0);\n }\n let i3 = byteLength2 - 1;\n let mul = 1;\n this[offset + i3] = value & 255;\n while (--i3 >= 0 && (mul *= 256)) {\n this[offset + i3] = value / mul & 255;\n }\n return offset + byteLength2;\n };\n Buffer3.prototype.writeUint8 = Buffer3.prototype.writeUInt8 = function writeUInt8(value, offset, noAssert) {\n value = +value;\n offset = offset >>> 0;\n if (!noAssert)\n checkInt(this, value, offset, 1, 255, 0);\n this[offset] = value & 255;\n return offset + 1;\n };\n Buffer3.prototype.writeUint16LE = Buffer3.prototype.writeUInt16LE = function writeUInt16LE(value, offset, noAssert) {\n value = +value;\n offset = offset >>> 0;\n if (!noAssert)\n checkInt(this, value, offset, 2, 65535, 0);\n this[offset] = value & 255;\n this[offset + 1] = value >>> 8;\n return offset + 2;\n };\n Buffer3.prototype.writeUint16BE = Buffer3.prototype.writeUInt16BE = function writeUInt16BE(value, offset, noAssert) {\n value = +value;\n offset = offset >>> 0;\n if (!noAssert)\n checkInt(this, value, offset, 2, 65535, 0);\n this[offset] = value >>> 8;\n this[offset + 1] = value & 255;\n return offset + 2;\n };\n Buffer3.prototype.writeUint32LE = Buffer3.prototype.writeUInt32LE = function writeUInt32LE(value, offset, noAssert) {\n value = +value;\n offset = offset >>> 0;\n if (!noAssert)\n checkInt(this, value, offset, 4, 4294967295, 0);\n this[offset + 3] = value >>> 24;\n this[offset + 2] = value >>> 16;\n this[offset + 1] = value >>> 8;\n this[offset] = value & 255;\n return offset + 4;\n };\n Buffer3.prototype.writeUint32BE = Buffer3.prototype.writeUInt32BE = function writeUInt32BE(value, offset, noAssert) {\n value = +value;\n offset = offset >>> 0;\n if (!noAssert)\n checkInt(this, value, offset, 4, 4294967295, 0);\n this[offset] = value >>> 24;\n this[offset + 1] = value >>> 16;\n this[offset + 2] = value >>> 8;\n this[offset + 3] = value & 255;\n return offset + 4;\n };\n function wrtBigUInt64LE(buf, value, offset, min, max) {\n checkIntBI(value, min, max, buf, offset, 7);\n let lo = Number(value & BigInt(4294967295));\n buf[offset++] = lo;\n lo = lo >> 8;\n buf[offset++] = lo;\n lo = lo >> 8;\n buf[offset++] = lo;\n lo = lo >> 8;\n buf[offset++] = lo;\n let hi = Number(value >> BigInt(32) & BigInt(4294967295));\n buf[offset++] = hi;\n hi = hi >> 8;\n buf[offset++] = hi;\n hi = hi >> 8;\n buf[offset++] = hi;\n hi = hi >> 8;\n buf[offset++] = hi;\n return offset;\n }\n function wrtBigUInt64BE(buf, value, offset, min, max) {\n checkIntBI(value, min, max, buf, offset, 7);\n let lo = Number(value & BigInt(4294967295));\n buf[offset + 7] = lo;\n lo = lo >> 8;\n buf[offset + 6] = lo;\n lo = lo >> 8;\n buf[offset + 5] = lo;\n lo = lo >> 8;\n buf[offset + 4] = lo;\n let hi = Number(value >> BigInt(32) & BigInt(4294967295));\n buf[offset + 3] = hi;\n hi = hi >> 8;\n buf[offset + 2] = hi;\n hi = hi >> 8;\n buf[offset + 1] = hi;\n hi = hi >> 8;\n buf[offset] = hi;\n return offset + 8;\n }\n Buffer3.prototype.writeBigUInt64LE = defineBigIntMethod(function writeBigUInt64LE(value, offset = 0) {\n return wrtBigUInt64LE(this, value, offset, BigInt(0), BigInt(\"0xffffffffffffffff\"));\n });\n Buffer3.prototype.writeBigUInt64BE = defineBigIntMethod(function writeBigUInt64BE(value, offset = 0) {\n return wrtBigUInt64BE(this, value, offset, BigInt(0), BigInt(\"0xffffffffffffffff\"));\n });\n Buffer3.prototype.writeIntLE = function writeIntLE(value, offset, byteLength2, noAssert) {\n value = +value;\n offset = offset >>> 0;\n if (!noAssert) {\n const limit = Math.pow(2, 8 * byteLength2 - 1);\n checkInt(this, value, offset, byteLength2, limit - 1, -limit);\n }\n let i3 = 0;\n let mul = 1;\n let sub = 0;\n this[offset] = value & 255;\n while (++i3 < byteLength2 && (mul *= 256)) {\n if (value < 0 && sub === 0 && this[offset + i3 - 1] !== 0) {\n sub = 1;\n }\n this[offset + i3] = (value / mul >> 0) - sub & 255;\n }\n return offset + byteLength2;\n };\n Buffer3.prototype.writeIntBE = function writeIntBE(value, offset, byteLength2, noAssert) {\n value = +value;\n offset = offset >>> 0;\n if (!noAssert) {\n const limit = Math.pow(2, 8 * byteLength2 - 1);\n checkInt(this, value, offset, byteLength2, limit - 1, -limit);\n }\n let i3 = byteLength2 - 1;\n let mul = 1;\n let sub = 0;\n this[offset + i3] = value & 255;\n while (--i3 >= 0 && (mul *= 256)) {\n if (value < 0 && sub === 0 && this[offset + i3 + 1] !== 0) {\n sub = 1;\n }\n this[offset + i3] = (value / mul >> 0) - sub & 255;\n }\n return offset + byteLength2;\n };\n Buffer3.prototype.writeInt8 = function writeInt8(value, offset, noAssert) {\n value = +value;\n offset = offset >>> 0;\n if (!noAssert)\n checkInt(this, value, offset, 1, 127, -128);\n if (value < 0)\n value = 255 + value + 1;\n this[offset] = value & 255;\n return offset + 1;\n };\n Buffer3.prototype.writeInt16LE = function writeInt16LE(value, offset, noAssert) {\n value = +value;\n offset = offset >>> 0;\n if (!noAssert)\n checkInt(this, value, offset, 2, 32767, -32768);\n this[offset] = value & 255;\n this[offset + 1] = value >>> 8;\n return offset + 2;\n };\n Buffer3.prototype.writeInt16BE = function writeInt16BE(value, offset, noAssert) {\n value = +value;\n offset = offset >>> 0;\n if (!noAssert)\n checkInt(this, value, offset, 2, 32767, -32768);\n this[offset] = value >>> 8;\n this[offset + 1] = value & 255;\n return offset + 2;\n };\n Buffer3.prototype.writeInt32LE = function writeInt32LE(value, offset, noAssert) {\n value = +value;\n offset = offset >>> 0;\n if (!noAssert)\n checkInt(this, value, offset, 4, 2147483647, -2147483648);\n this[offset] = value & 255;\n this[offset + 1] = value >>> 8;\n this[offset + 2] = value >>> 16;\n this[offset + 3] = value >>> 24;\n return offset + 4;\n };\n Buffer3.prototype.writeInt32BE = function writeInt32BE(value, offset, noAssert) {\n value = +value;\n offset = offset >>> 0;\n if (!noAssert)\n checkInt(this, value, offset, 4, 2147483647, -2147483648);\n if (value < 0)\n value = 4294967295 + value + 1;\n this[offset] = value >>> 24;\n this[offset + 1] = value >>> 16;\n this[offset + 2] = value >>> 8;\n this[offset + 3] = value & 255;\n return offset + 4;\n };\n Buffer3.prototype.writeBigInt64LE = defineBigIntMethod(function writeBigInt64LE(value, offset = 0) {\n return wrtBigUInt64LE(this, value, offset, -BigInt(\"0x8000000000000000\"), BigInt(\"0x7fffffffffffffff\"));\n });\n Buffer3.prototype.writeBigInt64BE = defineBigIntMethod(function writeBigInt64BE(value, offset = 0) {\n return wrtBigUInt64BE(this, value, offset, -BigInt(\"0x8000000000000000\"), BigInt(\"0x7fffffffffffffff\"));\n });\n function checkIEEE754(buf, value, offset, ext, max, min) {\n if (offset + ext > buf.length)\n throw new RangeError(\"Index out of range\");\n if (offset < 0)\n throw new RangeError(\"Index out of range\");\n }\n function writeFloat(buf, value, offset, littleEndian, noAssert) {\n value = +value;\n offset = offset >>> 0;\n if (!noAssert) {\n checkIEEE754(buf, value, offset, 4);\n }\n ieee754.write(buf, value, offset, littleEndian, 23, 4);\n return offset + 4;\n }\n Buffer3.prototype.writeFloatLE = function writeFloatLE(value, offset, noAssert) {\n return writeFloat(this, value, offset, true, noAssert);\n };\n Buffer3.prototype.writeFloatBE = function writeFloatBE(value, offset, noAssert) {\n return writeFloat(this, value, offset, false, noAssert);\n };\n function writeDouble(buf, value, offset, littleEndian, noAssert) {\n value = +value;\n offset = offset >>> 0;\n if (!noAssert) {\n checkIEEE754(buf, value, offset, 8);\n }\n ieee754.write(buf, value, offset, littleEndian, 52, 8);\n return offset + 8;\n }\n Buffer3.prototype.writeDoubleLE = function writeDoubleLE(value, offset, noAssert) {\n return writeDouble(this, value, offset, true, noAssert);\n };\n Buffer3.prototype.writeDoubleBE = function writeDoubleBE(value, offset, noAssert) {\n return writeDouble(this, value, offset, false, noAssert);\n };\n Buffer3.prototype.copy = function copy(target, targetStart, start, end) {\n if (!Buffer3.isBuffer(target))\n throw new TypeError(\"argument should be a Buffer\");\n if (!start)\n start = 0;\n if (!end && end !== 0)\n end = this.length;\n if (targetStart >= target.length)\n targetStart = target.length;\n if (!targetStart)\n targetStart = 0;\n if (end > 0 && end < start)\n end = start;\n if (end === start)\n return 0;\n if (target.length === 0 || this.length === 0)\n return 0;\n if (targetStart < 0) {\n throw new RangeError(\"targetStart out of bounds\");\n }\n if (start < 0 || start >= this.length)\n throw new RangeError(\"Index out of range\");\n if (end < 0)\n throw new RangeError(\"sourceEnd out of bounds\");\n if (end > this.length)\n end = this.length;\n if (target.length - targetStart < end - start) {\n end = target.length - targetStart + start;\n }\n const len = end - start;\n if (this === target && typeof Uint8Array.prototype.copyWithin === \"function\") {\n this.copyWithin(targetStart, start, end);\n } else {\n Uint8Array.prototype.set.call(target, this.subarray(start, end), targetStart);\n }\n return len;\n };\n Buffer3.prototype.fill = function fill(val, start, end, encoding) {\n if (typeof val === \"string\") {\n if (typeof start === \"string\") {\n encoding = start;\n start = 0;\n end = this.length;\n } else if (typeof end === \"string\") {\n encoding = end;\n end = this.length;\n }\n if (encoding !== void 0 && typeof encoding !== \"string\") {\n throw new TypeError(\"encoding must be a string\");\n }\n if (typeof encoding === \"string\" && !Buffer3.isEncoding(encoding)) {\n throw new TypeError(\"Unknown encoding: \" + encoding);\n }\n if (val.length === 1) {\n const code = val.charCodeAt(0);\n if (encoding === \"utf8\" && code < 128 || encoding === \"latin1\") {\n val = code;\n }\n }\n } else if (typeof val === \"number\") {\n val = val & 255;\n } else if (typeof val === \"boolean\") {\n val = Number(val);\n }\n if (start < 0 || this.length < start || this.length < end) {\n throw new RangeError(\"Out of range index\");\n }\n if (end <= start) {\n return this;\n }\n start = start >>> 0;\n end = end === void 0 ? this.length : end >>> 0;\n if (!val)\n val = 0;\n let i3;\n if (typeof val === \"number\") {\n for (i3 = start; i3 < end; ++i3) {\n this[i3] = val;\n }\n } else {\n const bytes = Buffer3.isBuffer(val) ? val : Buffer3.from(val, encoding);\n const len = bytes.length;\n if (len === 0) {\n throw new TypeError('The value \"' + val + '\" is invalid for argument \"value\"');\n }\n for (i3 = 0; i3 < end - start; ++i3) {\n this[i3 + start] = bytes[i3 % len];\n }\n }\n return this;\n };\n const errors = {};\n function E2(sym, getMessage, Base) {\n errors[sym] = class NodeError extends Base {\n constructor() {\n super();\n Object.defineProperty(this, \"message\", {\n value: getMessage.apply(this, arguments),\n writable: true,\n configurable: true\n });\n this.name = `${this.name} [${sym}]`;\n this.stack;\n delete this.name;\n }\n get code() {\n return sym;\n }\n set code(value) {\n Object.defineProperty(this, \"code\", {\n configurable: true,\n enumerable: true,\n value,\n writable: true\n });\n }\n toString() {\n return `${this.name} [${sym}]: ${this.message}`;\n }\n };\n }\n E2(\"ERR_BUFFER_OUT_OF_BOUNDS\", function(name) {\n if (name) {\n return `${name} is outside of buffer bounds`;\n }\n return \"Attempt to access memory outside buffer bounds\";\n }, RangeError);\n E2(\"ERR_INVALID_ARG_TYPE\", function(name, actual) {\n return `The \"${name}\" argument must be of type number. Received type ${typeof actual}`;\n }, TypeError);\n E2(\"ERR_OUT_OF_RANGE\", function(str, range, input) {\n let msg = `The value of \"${str}\" is out of range.`;\n let received = input;\n if (Number.isInteger(input) && Math.abs(input) > 2 ** 32) {\n received = addNumericalSeparator(String(input));\n } else if (typeof input === \"bigint\") {\n received = String(input);\n if (input > BigInt(2) ** BigInt(32) || input < -(BigInt(2) ** BigInt(32))) {\n received = addNumericalSeparator(received);\n }\n received += \"n\";\n }\n msg += ` It must be ${range}. Received ${received}`;\n return msg;\n }, RangeError);\n function addNumericalSeparator(val) {\n let res = \"\";\n let i3 = val.length;\n const start = val[0] === \"-\" ? 1 : 0;\n for (; i3 >= start + 4; i3 -= 3) {\n res = `_${val.slice(i3 - 3, i3)}${res}`;\n }\n return `${val.slice(0, i3)}${res}`;\n }\n function checkBounds(buf, offset, byteLength2) {\n validateNumber(offset, \"offset\");\n if (buf[offset] === void 0 || buf[offset + byteLength2] === void 0) {\n boundsError(offset, buf.length - (byteLength2 + 1));\n }\n }\n function checkIntBI(value, min, max, buf, offset, byteLength2) {\n if (value > max || value < min) {\n const n2 = typeof min === \"bigint\" ? \"n\" : \"\";\n let range;\n {\n if (min === 0 || min === BigInt(0)) {\n range = `>= 0${n2} and < 2${n2} ** ${(byteLength2 + 1) * 8}${n2}`;\n } else {\n range = `>= -(2${n2} ** ${(byteLength2 + 1) * 8 - 1}${n2}) and < 2 ** ${(byteLength2 + 1) * 8 - 1}${n2}`;\n }\n }\n throw new errors.ERR_OUT_OF_RANGE(\"value\", range, value);\n }\n checkBounds(buf, offset, byteLength2);\n }\n function validateNumber(value, name) {\n if (typeof value !== \"number\") {\n throw new errors.ERR_INVALID_ARG_TYPE(name, \"number\", value);\n }\n }\n function boundsError(value, length2, type) {\n if (Math.floor(value) !== value) {\n validateNumber(value, type);\n throw new errors.ERR_OUT_OF_RANGE(\"offset\", \"an integer\", value);\n }\n if (length2 < 0) {\n throw new errors.ERR_BUFFER_OUT_OF_BOUNDS();\n }\n throw new errors.ERR_OUT_OF_RANGE(\"offset\", `>= ${0} and <= ${length2}`, value);\n }\n const INVALID_BASE64_RE = /[^+/0-9A-Za-z-_]/g;\n function base64clean(str) {\n str = str.split(\"=\")[0];\n str = str.trim().replace(INVALID_BASE64_RE, \"\");\n if (str.length < 2)\n return \"\";\n while (str.length % 4 !== 0) {\n str = str + \"=\";\n }\n return str;\n }\n function utf8ToBytes3(string2, units) {\n units = units || Infinity;\n let codePoint;\n const length2 = string2.length;\n let leadSurrogate = null;\n const bytes = [];\n for (let i3 = 0; i3 < length2; ++i3) {\n codePoint = string2.charCodeAt(i3);\n if (codePoint > 55295 && codePoint < 57344) {\n if (!leadSurrogate) {\n if (codePoint > 56319) {\n if ((units -= 3) > -1)\n bytes.push(239, 191, 189);\n continue;\n } else if (i3 + 1 === length2) {\n if ((units -= 3) > -1)\n bytes.push(239, 191, 189);\n continue;\n }\n leadSurrogate = codePoint;\n continue;\n }\n if (codePoint < 56320) {\n if ((units -= 3) > -1)\n bytes.push(239, 191, 189);\n leadSurrogate = codePoint;\n continue;\n }\n codePoint = (leadSurrogate - 55296 << 10 | codePoint - 56320) + 65536;\n } else if (leadSurrogate) {\n if ((units -= 3) > -1)\n bytes.push(239, 191, 189);\n }\n leadSurrogate = null;\n if (codePoint < 128) {\n if ((units -= 1) < 0)\n break;\n bytes.push(codePoint);\n } else if (codePoint < 2048) {\n if ((units -= 2) < 0)\n break;\n bytes.push(codePoint >> 6 | 192, codePoint & 63 | 128);\n } else if (codePoint < 65536) {\n if ((units -= 3) < 0)\n break;\n bytes.push(codePoint >> 12 | 224, codePoint >> 6 & 63 | 128, codePoint & 63 | 128);\n } else if (codePoint < 1114112) {\n if ((units -= 4) < 0)\n break;\n bytes.push(codePoint >> 18 | 240, codePoint >> 12 & 63 | 128, codePoint >> 6 & 63 | 128, codePoint & 63 | 128);\n } else {\n throw new Error(\"Invalid code point\");\n }\n }\n return bytes;\n }\n function asciiToBytes(str) {\n const byteArray = [];\n for (let i3 = 0; i3 < str.length; ++i3) {\n byteArray.push(str.charCodeAt(i3) & 255);\n }\n return byteArray;\n }\n function utf16leToBytes(str, units) {\n let c4, hi, lo;\n const byteArray = [];\n for (let i3 = 0; i3 < str.length; ++i3) {\n if ((units -= 2) < 0)\n break;\n c4 = str.charCodeAt(i3);\n hi = c4 >> 8;\n lo = c4 % 256;\n byteArray.push(lo);\n byteArray.push(hi);\n }\n return byteArray;\n }\n function base64ToBytes(str) {\n return base64.toByteArray(base64clean(str));\n }\n function blitBuffer(src, dst, offset, length2) {\n let i3;\n for (i3 = 0; i3 < length2; ++i3) {\n if (i3 + offset >= dst.length || i3 >= src.length)\n break;\n dst[i3 + offset] = src[i3];\n }\n return i3;\n }\n function isInstance(obj, type) {\n return obj instanceof type || obj != null && obj.constructor != null && obj.constructor.name != null && obj.constructor.name === type.name;\n }\n function numberIsNaN(obj) {\n return obj !== obj;\n }\n const hexSliceLookupTable = function() {\n const alphabet2 = \"0123456789abcdef\";\n const table = new Array(256);\n for (let i3 = 0; i3 < 16; ++i3) {\n const i16 = i3 * 16;\n for (let j2 = 0; j2 < 16; ++j2) {\n table[i16 + j2] = alphabet2[i3] + alphabet2[j2];\n }\n }\n return table;\n }();\n function defineBigIntMethod(fn) {\n return typeof BigInt === \"undefined\" ? BufferBigIntNotDefined : fn;\n }\n function BufferBigIntNotDefined() {\n throw new Error(\"BigInt not supported\");\n }\n return exports;\n }\n var exports$2, _dewExec$2, exports$1, _dewExec$1, exports, _dewExec;\n var init_chunk_DtuTasat = __esm({\n \"../../../node_modules/.pnpm/@jspm+core@2.1.0/node_modules/@jspm/core/nodelibs/browser/chunk-DtuTasat.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n exports$2 = {};\n _dewExec$2 = false;\n exports$1 = {};\n _dewExec$1 = false;\n exports = {};\n _dewExec = false;\n }\n });\n\n // ../../../node_modules/.pnpm/@jspm+core@2.1.0/node_modules/@jspm/core/nodelibs/browser/buffer.js\n var buffer_exports = {};\n __export(buffer_exports, {\n Buffer: () => Buffer2,\n INSPECT_MAX_BYTES: () => INSPECT_MAX_BYTES,\n default: () => exports2,\n kMaxLength: () => kMaxLength\n });\n var exports2, Buffer2, INSPECT_MAX_BYTES, kMaxLength;\n var init_buffer = __esm({\n \"../../../node_modules/.pnpm/@jspm+core@2.1.0/node_modules/@jspm/core/nodelibs/browser/buffer.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_chunk_DtuTasat();\n exports2 = dew();\n exports2[\"Buffer\"];\n exports2[\"SlowBuffer\"];\n exports2[\"INSPECT_MAX_BYTES\"];\n exports2[\"kMaxLength\"];\n Buffer2 = exports2.Buffer;\n INSPECT_MAX_BYTES = exports2.INSPECT_MAX_BYTES;\n kMaxLength = exports2.kMaxLength;\n }\n });\n\n // ../../../node_modules/.pnpm/@lit-protocol+esbuild-plugin-polyfill-node@0.3.0_esbuild@0.19.12/node_modules/@lit-protocol/esbuild-plugin-polyfill-node/polyfills/buffer.js\n var init_buffer2 = __esm({\n \"../../../node_modules/.pnpm/@lit-protocol+esbuild-plugin-polyfill-node@0.3.0_esbuild@0.19.12/node_modules/@lit-protocol/esbuild-plugin-polyfill-node/polyfills/buffer.js\"() {\n \"use strict\";\n init_buffer();\n }\n });\n\n // ../../../node_modules/.pnpm/zod@3.25.64/node_modules/zod/dist/cjs/v3/helpers/util.js\n var require_util = __commonJS({\n \"../../../node_modules/.pnpm/zod@3.25.64/node_modules/zod/dist/cjs/v3/helpers/util.js\"(exports3) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n Object.defineProperty(exports3, \"__esModule\", { value: true });\n exports3.getParsedType = exports3.ZodParsedType = exports3.objectUtil = exports3.util = void 0;\n var util2;\n (function(util3) {\n util3.assertEqual = (_2) => {\n };\n function assertIs(_arg) {\n }\n util3.assertIs = assertIs;\n function assertNever2(_x) {\n throw new Error();\n }\n util3.assertNever = assertNever2;\n util3.arrayToEnum = (items) => {\n const obj = {};\n for (const item of items) {\n obj[item] = item;\n }\n return obj;\n };\n util3.getValidEnumValues = (obj) => {\n const validKeys = util3.objectKeys(obj).filter((k4) => typeof obj[obj[k4]] !== \"number\");\n const filtered = {};\n for (const k4 of validKeys) {\n filtered[k4] = obj[k4];\n }\n return util3.objectValues(filtered);\n };\n util3.objectValues = (obj) => {\n return util3.objectKeys(obj).map(function(e3) {\n return obj[e3];\n });\n };\n util3.objectKeys = typeof Object.keys === \"function\" ? (obj) => Object.keys(obj) : (object2) => {\n const keys = [];\n for (const key in object2) {\n if (Object.prototype.hasOwnProperty.call(object2, key)) {\n keys.push(key);\n }\n }\n return keys;\n };\n util3.find = (arr, checker) => {\n for (const item of arr) {\n if (checker(item))\n return item;\n }\n return void 0;\n };\n util3.isInteger = typeof Number.isInteger === \"function\" ? (val) => Number.isInteger(val) : (val) => typeof val === \"number\" && Number.isFinite(val) && Math.floor(val) === val;\n function joinValues(array2, separator = \" | \") {\n return array2.map((val) => typeof val === \"string\" ? `'${val}'` : val).join(separator);\n }\n util3.joinValues = joinValues;\n util3.jsonStringifyReplacer = (_2, value) => {\n if (typeof value === \"bigint\") {\n return value.toString();\n }\n return value;\n };\n })(util2 || (exports3.util = util2 = {}));\n var objectUtil2;\n (function(objectUtil3) {\n objectUtil3.mergeShapes = (first, second) => {\n return {\n ...first,\n ...second\n // second overwrites first\n };\n };\n })(objectUtil2 || (exports3.objectUtil = objectUtil2 = {}));\n exports3.ZodParsedType = util2.arrayToEnum([\n \"string\",\n \"nan\",\n \"number\",\n \"integer\",\n \"float\",\n \"boolean\",\n \"date\",\n \"bigint\",\n \"symbol\",\n \"function\",\n \"undefined\",\n \"null\",\n \"array\",\n \"object\",\n \"unknown\",\n \"promise\",\n \"void\",\n \"never\",\n \"map\",\n \"set\"\n ]);\n var getParsedType2 = (data) => {\n const t3 = typeof data;\n switch (t3) {\n case \"undefined\":\n return exports3.ZodParsedType.undefined;\n case \"string\":\n return exports3.ZodParsedType.string;\n case \"number\":\n return Number.isNaN(data) ? exports3.ZodParsedType.nan : exports3.ZodParsedType.number;\n case \"boolean\":\n return exports3.ZodParsedType.boolean;\n case \"function\":\n return exports3.ZodParsedType.function;\n case \"bigint\":\n return exports3.ZodParsedType.bigint;\n case \"symbol\":\n return exports3.ZodParsedType.symbol;\n case \"object\":\n if (Array.isArray(data)) {\n return exports3.ZodParsedType.array;\n }\n if (data === null) {\n return exports3.ZodParsedType.null;\n }\n if (data.then && typeof data.then === \"function\" && data.catch && typeof data.catch === \"function\") {\n return exports3.ZodParsedType.promise;\n }\n if (typeof Map !== \"undefined\" && data instanceof Map) {\n return exports3.ZodParsedType.map;\n }\n if (typeof Set !== \"undefined\" && data instanceof Set) {\n return exports3.ZodParsedType.set;\n }\n if (typeof Date !== \"undefined\" && data instanceof Date) {\n return exports3.ZodParsedType.date;\n }\n return exports3.ZodParsedType.object;\n default:\n return exports3.ZodParsedType.unknown;\n }\n };\n exports3.getParsedType = getParsedType2;\n }\n });\n\n // ../../../node_modules/.pnpm/zod@3.25.64/node_modules/zod/dist/cjs/v3/ZodError.js\n var require_ZodError = __commonJS({\n \"../../../node_modules/.pnpm/zod@3.25.64/node_modules/zod/dist/cjs/v3/ZodError.js\"(exports3) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n Object.defineProperty(exports3, \"__esModule\", { value: true });\n exports3.ZodError = exports3.quotelessJson = exports3.ZodIssueCode = void 0;\n var util_js_1 = require_util();\n exports3.ZodIssueCode = util_js_1.util.arrayToEnum([\n \"invalid_type\",\n \"invalid_literal\",\n \"custom\",\n \"invalid_union\",\n \"invalid_union_discriminator\",\n \"invalid_enum_value\",\n \"unrecognized_keys\",\n \"invalid_arguments\",\n \"invalid_return_type\",\n \"invalid_date\",\n \"invalid_string\",\n \"too_small\",\n \"too_big\",\n \"invalid_intersection_types\",\n \"not_multiple_of\",\n \"not_finite\"\n ]);\n var quotelessJson2 = (obj) => {\n const json = JSON.stringify(obj, null, 2);\n return json.replace(/\"([^\"]+)\":/g, \"$1:\");\n };\n exports3.quotelessJson = quotelessJson2;\n var ZodError2 = class _ZodError extends Error {\n get errors() {\n return this.issues;\n }\n constructor(issues) {\n super();\n this.issues = [];\n this.addIssue = (sub) => {\n this.issues = [...this.issues, sub];\n };\n this.addIssues = (subs = []) => {\n this.issues = [...this.issues, ...subs];\n };\n const actualProto = new.target.prototype;\n if (Object.setPrototypeOf) {\n Object.setPrototypeOf(this, actualProto);\n } else {\n this.__proto__ = actualProto;\n }\n this.name = \"ZodError\";\n this.issues = issues;\n }\n format(_mapper) {\n const mapper = _mapper || function(issue) {\n return issue.message;\n };\n const fieldErrors = { _errors: [] };\n const processError = (error) => {\n for (const issue of error.issues) {\n if (issue.code === \"invalid_union\") {\n issue.unionErrors.map(processError);\n } else if (issue.code === \"invalid_return_type\") {\n processError(issue.returnTypeError);\n } else if (issue.code === \"invalid_arguments\") {\n processError(issue.argumentsError);\n } else if (issue.path.length === 0) {\n fieldErrors._errors.push(mapper(issue));\n } else {\n let curr = fieldErrors;\n let i3 = 0;\n while (i3 < issue.path.length) {\n const el = issue.path[i3];\n const terminal = i3 === issue.path.length - 1;\n if (!terminal) {\n curr[el] = curr[el] || { _errors: [] };\n } else {\n curr[el] = curr[el] || { _errors: [] };\n curr[el]._errors.push(mapper(issue));\n }\n curr = curr[el];\n i3++;\n }\n }\n }\n };\n processError(this);\n return fieldErrors;\n }\n static assert(value) {\n if (!(value instanceof _ZodError)) {\n throw new Error(`Not a ZodError: ${value}`);\n }\n }\n toString() {\n return this.message;\n }\n get message() {\n return JSON.stringify(this.issues, util_js_1.util.jsonStringifyReplacer, 2);\n }\n get isEmpty() {\n return this.issues.length === 0;\n }\n flatten(mapper = (issue) => issue.message) {\n const fieldErrors = {};\n const formErrors = [];\n for (const sub of this.issues) {\n if (sub.path.length > 0) {\n fieldErrors[sub.path[0]] = fieldErrors[sub.path[0]] || [];\n fieldErrors[sub.path[0]].push(mapper(sub));\n } else {\n formErrors.push(mapper(sub));\n }\n }\n return { formErrors, fieldErrors };\n }\n get formErrors() {\n return this.flatten();\n }\n };\n exports3.ZodError = ZodError2;\n ZodError2.create = (issues) => {\n const error = new ZodError2(issues);\n return error;\n };\n }\n });\n\n // ../../../node_modules/.pnpm/zod@3.25.64/node_modules/zod/dist/cjs/v3/locales/en.js\n var require_en = __commonJS({\n \"../../../node_modules/.pnpm/zod@3.25.64/node_modules/zod/dist/cjs/v3/locales/en.js\"(exports3) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n Object.defineProperty(exports3, \"__esModule\", { value: true });\n var ZodError_js_1 = require_ZodError();\n var util_js_1 = require_util();\n var errorMap2 = (issue, _ctx) => {\n let message;\n switch (issue.code) {\n case ZodError_js_1.ZodIssueCode.invalid_type:\n if (issue.received === util_js_1.ZodParsedType.undefined) {\n message = \"Required\";\n } else {\n message = `Expected ${issue.expected}, received ${issue.received}`;\n }\n break;\n case ZodError_js_1.ZodIssueCode.invalid_literal:\n message = `Invalid literal value, expected ${JSON.stringify(issue.expected, util_js_1.util.jsonStringifyReplacer)}`;\n break;\n case ZodError_js_1.ZodIssueCode.unrecognized_keys:\n message = `Unrecognized key(s) in object: ${util_js_1.util.joinValues(issue.keys, \", \")}`;\n break;\n case ZodError_js_1.ZodIssueCode.invalid_union:\n message = `Invalid input`;\n break;\n case ZodError_js_1.ZodIssueCode.invalid_union_discriminator:\n message = `Invalid discriminator value. Expected ${util_js_1.util.joinValues(issue.options)}`;\n break;\n case ZodError_js_1.ZodIssueCode.invalid_enum_value:\n message = `Invalid enum value. Expected ${util_js_1.util.joinValues(issue.options)}, received '${issue.received}'`;\n break;\n case ZodError_js_1.ZodIssueCode.invalid_arguments:\n message = `Invalid function arguments`;\n break;\n case ZodError_js_1.ZodIssueCode.invalid_return_type:\n message = `Invalid function return type`;\n break;\n case ZodError_js_1.ZodIssueCode.invalid_date:\n message = `Invalid date`;\n break;\n case ZodError_js_1.ZodIssueCode.invalid_string:\n if (typeof issue.validation === \"object\") {\n if (\"includes\" in issue.validation) {\n message = `Invalid input: must include \"${issue.validation.includes}\"`;\n if (typeof issue.validation.position === \"number\") {\n message = `${message} at one or more positions greater than or equal to ${issue.validation.position}`;\n }\n } else if (\"startsWith\" in issue.validation) {\n message = `Invalid input: must start with \"${issue.validation.startsWith}\"`;\n } else if (\"endsWith\" in issue.validation) {\n message = `Invalid input: must end with \"${issue.validation.endsWith}\"`;\n } else {\n util_js_1.util.assertNever(issue.validation);\n }\n } else if (issue.validation !== \"regex\") {\n message = `Invalid ${issue.validation}`;\n } else {\n message = \"Invalid\";\n }\n break;\n case ZodError_js_1.ZodIssueCode.too_small:\n if (issue.type === \"array\")\n message = `Array must contain ${issue.exact ? \"exactly\" : issue.inclusive ? `at least` : `more than`} ${issue.minimum} element(s)`;\n else if (issue.type === \"string\")\n message = `String must contain ${issue.exact ? \"exactly\" : issue.inclusive ? `at least` : `over`} ${issue.minimum} character(s)`;\n else if (issue.type === \"number\")\n message = `Number must be ${issue.exact ? `exactly equal to ` : issue.inclusive ? `greater than or equal to ` : `greater than `}${issue.minimum}`;\n else if (issue.type === \"date\")\n message = `Date must be ${issue.exact ? `exactly equal to ` : issue.inclusive ? `greater than or equal to ` : `greater than `}${new Date(Number(issue.minimum))}`;\n else\n message = \"Invalid input\";\n break;\n case ZodError_js_1.ZodIssueCode.too_big:\n if (issue.type === \"array\")\n message = `Array must contain ${issue.exact ? `exactly` : issue.inclusive ? `at most` : `less than`} ${issue.maximum} element(s)`;\n else if (issue.type === \"string\")\n message = `String must contain ${issue.exact ? `exactly` : issue.inclusive ? `at most` : `under`} ${issue.maximum} character(s)`;\n else if (issue.type === \"number\")\n message = `Number must be ${issue.exact ? `exactly` : issue.inclusive ? `less than or equal to` : `less than`} ${issue.maximum}`;\n else if (issue.type === \"bigint\")\n message = `BigInt must be ${issue.exact ? `exactly` : issue.inclusive ? `less than or equal to` : `less than`} ${issue.maximum}`;\n else if (issue.type === \"date\")\n message = `Date must be ${issue.exact ? `exactly` : issue.inclusive ? `smaller than or equal to` : `smaller than`} ${new Date(Number(issue.maximum))}`;\n else\n message = \"Invalid input\";\n break;\n case ZodError_js_1.ZodIssueCode.custom:\n message = `Invalid input`;\n break;\n case ZodError_js_1.ZodIssueCode.invalid_intersection_types:\n message = `Intersection results could not be merged`;\n break;\n case ZodError_js_1.ZodIssueCode.not_multiple_of:\n message = `Number must be a multiple of ${issue.multipleOf}`;\n break;\n case ZodError_js_1.ZodIssueCode.not_finite:\n message = \"Number must be finite\";\n break;\n default:\n message = _ctx.defaultError;\n util_js_1.util.assertNever(issue);\n }\n return { message };\n };\n exports3.default = errorMap2;\n }\n });\n\n // ../../../node_modules/.pnpm/zod@3.25.64/node_modules/zod/dist/cjs/v3/errors.js\n var require_errors = __commonJS({\n \"../../../node_modules/.pnpm/zod@3.25.64/node_modules/zod/dist/cjs/v3/errors.js\"(exports3) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n var __importDefault3 = exports3 && exports3.__importDefault || function(mod3) {\n return mod3 && mod3.__esModule ? mod3 : { \"default\": mod3 };\n };\n Object.defineProperty(exports3, \"__esModule\", { value: true });\n exports3.defaultErrorMap = void 0;\n exports3.setErrorMap = setErrorMap2;\n exports3.getErrorMap = getErrorMap2;\n var en_js_1 = __importDefault3(require_en());\n exports3.defaultErrorMap = en_js_1.default;\n var overrideErrorMap2 = en_js_1.default;\n function setErrorMap2(map) {\n overrideErrorMap2 = map;\n }\n function getErrorMap2() {\n return overrideErrorMap2;\n }\n }\n });\n\n // ../../../node_modules/.pnpm/zod@3.25.64/node_modules/zod/dist/cjs/v3/helpers/parseUtil.js\n var require_parseUtil = __commonJS({\n \"../../../node_modules/.pnpm/zod@3.25.64/node_modules/zod/dist/cjs/v3/helpers/parseUtil.js\"(exports3) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n var __importDefault3 = exports3 && exports3.__importDefault || function(mod3) {\n return mod3 && mod3.__esModule ? mod3 : { \"default\": mod3 };\n };\n Object.defineProperty(exports3, \"__esModule\", { value: true });\n exports3.isAsync = exports3.isValid = exports3.isDirty = exports3.isAborted = exports3.OK = exports3.DIRTY = exports3.INVALID = exports3.ParseStatus = exports3.EMPTY_PATH = exports3.makeIssue = void 0;\n exports3.addIssueToContext = addIssueToContext2;\n var errors_js_1 = require_errors();\n var en_js_1 = __importDefault3(require_en());\n var makeIssue2 = (params) => {\n const { data, path, errorMaps, issueData } = params;\n const fullPath = [...path, ...issueData.path || []];\n const fullIssue = {\n ...issueData,\n path: fullPath\n };\n if (issueData.message !== void 0) {\n return {\n ...issueData,\n path: fullPath,\n message: issueData.message\n };\n }\n let errorMessage = \"\";\n const maps = errorMaps.filter((m2) => !!m2).slice().reverse();\n for (const map of maps) {\n errorMessage = map(fullIssue, { data, defaultError: errorMessage }).message;\n }\n return {\n ...issueData,\n path: fullPath,\n message: errorMessage\n };\n };\n exports3.makeIssue = makeIssue2;\n exports3.EMPTY_PATH = [];\n function addIssueToContext2(ctx, issueData) {\n const overrideMap = (0, errors_js_1.getErrorMap)();\n const issue = (0, exports3.makeIssue)({\n issueData,\n data: ctx.data,\n path: ctx.path,\n errorMaps: [\n ctx.common.contextualErrorMap,\n // contextual error map is first priority\n ctx.schemaErrorMap,\n // then schema-bound map if available\n overrideMap,\n // then global override map\n overrideMap === en_js_1.default ? void 0 : en_js_1.default\n // then global default map\n ].filter((x4) => !!x4)\n });\n ctx.common.issues.push(issue);\n }\n var ParseStatus2 = class _ParseStatus {\n constructor() {\n this.value = \"valid\";\n }\n dirty() {\n if (this.value === \"valid\")\n this.value = \"dirty\";\n }\n abort() {\n if (this.value !== \"aborted\")\n this.value = \"aborted\";\n }\n static mergeArray(status, results) {\n const arrayValue = [];\n for (const s4 of results) {\n if (s4.status === \"aborted\")\n return exports3.INVALID;\n if (s4.status === \"dirty\")\n status.dirty();\n arrayValue.push(s4.value);\n }\n return { status: status.value, value: arrayValue };\n }\n static async mergeObjectAsync(status, pairs) {\n const syncPairs = [];\n for (const pair of pairs) {\n const key = await pair.key;\n const value = await pair.value;\n syncPairs.push({\n key,\n value\n });\n }\n return _ParseStatus.mergeObjectSync(status, syncPairs);\n }\n static mergeObjectSync(status, pairs) {\n const finalObject = {};\n for (const pair of pairs) {\n const { key, value } = pair;\n if (key.status === \"aborted\")\n return exports3.INVALID;\n if (value.status === \"aborted\")\n return exports3.INVALID;\n if (key.status === \"dirty\")\n status.dirty();\n if (value.status === \"dirty\")\n status.dirty();\n if (key.value !== \"__proto__\" && (typeof value.value !== \"undefined\" || pair.alwaysSet)) {\n finalObject[key.value] = value.value;\n }\n }\n return { status: status.value, value: finalObject };\n }\n };\n exports3.ParseStatus = ParseStatus2;\n exports3.INVALID = Object.freeze({\n status: \"aborted\"\n });\n var DIRTY2 = (value) => ({ status: \"dirty\", value });\n exports3.DIRTY = DIRTY2;\n var OK2 = (value) => ({ status: \"valid\", value });\n exports3.OK = OK2;\n var isAborted2 = (x4) => x4.status === \"aborted\";\n exports3.isAborted = isAborted2;\n var isDirty2 = (x4) => x4.status === \"dirty\";\n exports3.isDirty = isDirty2;\n var isValid2 = (x4) => x4.status === \"valid\";\n exports3.isValid = isValid2;\n var isAsync2 = (x4) => typeof Promise !== \"undefined\" && x4 instanceof Promise;\n exports3.isAsync = isAsync2;\n }\n });\n\n // ../../../node_modules/.pnpm/zod@3.25.64/node_modules/zod/dist/cjs/v3/helpers/typeAliases.js\n var require_typeAliases = __commonJS({\n \"../../../node_modules/.pnpm/zod@3.25.64/node_modules/zod/dist/cjs/v3/helpers/typeAliases.js\"(exports3) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n Object.defineProperty(exports3, \"__esModule\", { value: true });\n }\n });\n\n // ../../../node_modules/.pnpm/zod@3.25.64/node_modules/zod/dist/cjs/v3/helpers/errorUtil.js\n var require_errorUtil = __commonJS({\n \"../../../node_modules/.pnpm/zod@3.25.64/node_modules/zod/dist/cjs/v3/helpers/errorUtil.js\"(exports3) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n Object.defineProperty(exports3, \"__esModule\", { value: true });\n exports3.errorUtil = void 0;\n var errorUtil2;\n (function(errorUtil3) {\n errorUtil3.errToObj = (message) => typeof message === \"string\" ? { message } : message || {};\n errorUtil3.toString = (message) => typeof message === \"string\" ? message : message?.message;\n })(errorUtil2 || (exports3.errorUtil = errorUtil2 = {}));\n }\n });\n\n // ../../../node_modules/.pnpm/zod@3.25.64/node_modules/zod/dist/cjs/v3/types.js\n var require_types = __commonJS({\n \"../../../node_modules/.pnpm/zod@3.25.64/node_modules/zod/dist/cjs/v3/types.js\"(exports3) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n Object.defineProperty(exports3, \"__esModule\", { value: true });\n exports3.discriminatedUnion = exports3.date = exports3.boolean = exports3.bigint = exports3.array = exports3.any = exports3.coerce = exports3.ZodFirstPartyTypeKind = exports3.late = exports3.ZodSchema = exports3.Schema = exports3.ZodReadonly = exports3.ZodPipeline = exports3.ZodBranded = exports3.BRAND = exports3.ZodNaN = exports3.ZodCatch = exports3.ZodDefault = exports3.ZodNullable = exports3.ZodOptional = exports3.ZodTransformer = exports3.ZodEffects = exports3.ZodPromise = exports3.ZodNativeEnum = exports3.ZodEnum = exports3.ZodLiteral = exports3.ZodLazy = exports3.ZodFunction = exports3.ZodSet = exports3.ZodMap = exports3.ZodRecord = exports3.ZodTuple = exports3.ZodIntersection = exports3.ZodDiscriminatedUnion = exports3.ZodUnion = exports3.ZodObject = exports3.ZodArray = exports3.ZodVoid = exports3.ZodNever = exports3.ZodUnknown = exports3.ZodAny = exports3.ZodNull = exports3.ZodUndefined = exports3.ZodSymbol = exports3.ZodDate = exports3.ZodBoolean = exports3.ZodBigInt = exports3.ZodNumber = exports3.ZodString = exports3.ZodType = void 0;\n exports3.NEVER = exports3.void = exports3.unknown = exports3.union = exports3.undefined = exports3.tuple = exports3.transformer = exports3.symbol = exports3.string = exports3.strictObject = exports3.set = exports3.record = exports3.promise = exports3.preprocess = exports3.pipeline = exports3.ostring = exports3.optional = exports3.onumber = exports3.oboolean = exports3.object = exports3.number = exports3.nullable = exports3.null = exports3.never = exports3.nativeEnum = exports3.nan = exports3.map = exports3.literal = exports3.lazy = exports3.intersection = exports3.instanceof = exports3.function = exports3.enum = exports3.effect = void 0;\n exports3.datetimeRegex = datetimeRegex2;\n exports3.custom = custom3;\n var ZodError_js_1 = require_ZodError();\n var errors_js_1 = require_errors();\n var errorUtil_js_1 = require_errorUtil();\n var parseUtil_js_1 = require_parseUtil();\n var util_js_1 = require_util();\n var ParseInputLazyPath2 = class {\n constructor(parent, value, path, key) {\n this._cachedPath = [];\n this.parent = parent;\n this.data = value;\n this._path = path;\n this._key = key;\n }\n get path() {\n if (!this._cachedPath.length) {\n if (Array.isArray(this._key)) {\n this._cachedPath.push(...this._path, ...this._key);\n } else {\n this._cachedPath.push(...this._path, this._key);\n }\n }\n return this._cachedPath;\n }\n };\n var handleResult2 = (ctx, result) => {\n if ((0, parseUtil_js_1.isValid)(result)) {\n return { success: true, data: result.value };\n } else {\n if (!ctx.common.issues.length) {\n throw new Error(\"Validation failed but no issues detected.\");\n }\n return {\n success: false,\n get error() {\n if (this._error)\n return this._error;\n const error = new ZodError_js_1.ZodError(ctx.common.issues);\n this._error = error;\n return this._error;\n }\n };\n }\n };\n function processCreateParams2(params) {\n if (!params)\n return {};\n const { errorMap: errorMap2, invalid_type_error, required_error, description: description2 } = params;\n if (errorMap2 && (invalid_type_error || required_error)) {\n throw new Error(`Can't use \"invalid_type_error\" or \"required_error\" in conjunction with custom error map.`);\n }\n if (errorMap2)\n return { errorMap: errorMap2, description: description2 };\n const customMap = (iss, ctx) => {\n const { message } = params;\n if (iss.code === \"invalid_enum_value\") {\n return { message: message ?? ctx.defaultError };\n }\n if (typeof ctx.data === \"undefined\") {\n return { message: message ?? required_error ?? ctx.defaultError };\n }\n if (iss.code !== \"invalid_type\")\n return { message: ctx.defaultError };\n return { message: message ?? invalid_type_error ?? ctx.defaultError };\n };\n return { errorMap: customMap, description: description2 };\n }\n var ZodType2 = class {\n get description() {\n return this._def.description;\n }\n _getType(input) {\n return (0, util_js_1.getParsedType)(input.data);\n }\n _getOrReturnCtx(input, ctx) {\n return ctx || {\n common: input.parent.common,\n data: input.data,\n parsedType: (0, util_js_1.getParsedType)(input.data),\n schemaErrorMap: this._def.errorMap,\n path: input.path,\n parent: input.parent\n };\n }\n _processInputParams(input) {\n return {\n status: new parseUtil_js_1.ParseStatus(),\n ctx: {\n common: input.parent.common,\n data: input.data,\n parsedType: (0, util_js_1.getParsedType)(input.data),\n schemaErrorMap: this._def.errorMap,\n path: input.path,\n parent: input.parent\n }\n };\n }\n _parseSync(input) {\n const result = this._parse(input);\n if ((0, parseUtil_js_1.isAsync)(result)) {\n throw new Error(\"Synchronous parse encountered promise.\");\n }\n return result;\n }\n _parseAsync(input) {\n const result = this._parse(input);\n return Promise.resolve(result);\n }\n parse(data, params) {\n const result = this.safeParse(data, params);\n if (result.success)\n return result.data;\n throw result.error;\n }\n safeParse(data, params) {\n const ctx = {\n common: {\n issues: [],\n async: params?.async ?? false,\n contextualErrorMap: params?.errorMap\n },\n path: params?.path || [],\n schemaErrorMap: this._def.errorMap,\n parent: null,\n data,\n parsedType: (0, util_js_1.getParsedType)(data)\n };\n const result = this._parseSync({ data, path: ctx.path, parent: ctx });\n return handleResult2(ctx, result);\n }\n \"~validate\"(data) {\n const ctx = {\n common: {\n issues: [],\n async: !!this[\"~standard\"].async\n },\n path: [],\n schemaErrorMap: this._def.errorMap,\n parent: null,\n data,\n parsedType: (0, util_js_1.getParsedType)(data)\n };\n if (!this[\"~standard\"].async) {\n try {\n const result = this._parseSync({ data, path: [], parent: ctx });\n return (0, parseUtil_js_1.isValid)(result) ? {\n value: result.value\n } : {\n issues: ctx.common.issues\n };\n } catch (err) {\n if (err?.message?.toLowerCase()?.includes(\"encountered\")) {\n this[\"~standard\"].async = true;\n }\n ctx.common = {\n issues: [],\n async: true\n };\n }\n }\n return this._parseAsync({ data, path: [], parent: ctx }).then((result) => (0, parseUtil_js_1.isValid)(result) ? {\n value: result.value\n } : {\n issues: ctx.common.issues\n });\n }\n async parseAsync(data, params) {\n const result = await this.safeParseAsync(data, params);\n if (result.success)\n return result.data;\n throw result.error;\n }\n async safeParseAsync(data, params) {\n const ctx = {\n common: {\n issues: [],\n contextualErrorMap: params?.errorMap,\n async: true\n },\n path: params?.path || [],\n schemaErrorMap: this._def.errorMap,\n parent: null,\n data,\n parsedType: (0, util_js_1.getParsedType)(data)\n };\n const maybeAsyncResult = this._parse({ data, path: ctx.path, parent: ctx });\n const result = await ((0, parseUtil_js_1.isAsync)(maybeAsyncResult) ? maybeAsyncResult : Promise.resolve(maybeAsyncResult));\n return handleResult2(ctx, result);\n }\n refine(check, message) {\n const getIssueProperties = (val) => {\n if (typeof message === \"string\" || typeof message === \"undefined\") {\n return { message };\n } else if (typeof message === \"function\") {\n return message(val);\n } else {\n return message;\n }\n };\n return this._refinement((val, ctx) => {\n const result = check(val);\n const setError = () => ctx.addIssue({\n code: ZodError_js_1.ZodIssueCode.custom,\n ...getIssueProperties(val)\n });\n if (typeof Promise !== \"undefined\" && result instanceof Promise) {\n return result.then((data) => {\n if (!data) {\n setError();\n return false;\n } else {\n return true;\n }\n });\n }\n if (!result) {\n setError();\n return false;\n } else {\n return true;\n }\n });\n }\n refinement(check, refinementData) {\n return this._refinement((val, ctx) => {\n if (!check(val)) {\n ctx.addIssue(typeof refinementData === \"function\" ? refinementData(val, ctx) : refinementData);\n return false;\n } else {\n return true;\n }\n });\n }\n _refinement(refinement) {\n return new ZodEffects2({\n schema: this,\n typeName: ZodFirstPartyTypeKind2.ZodEffects,\n effect: { type: \"refinement\", refinement }\n });\n }\n superRefine(refinement) {\n return this._refinement(refinement);\n }\n constructor(def) {\n this.spa = this.safeParseAsync;\n this._def = def;\n this.parse = this.parse.bind(this);\n this.safeParse = this.safeParse.bind(this);\n this.parseAsync = this.parseAsync.bind(this);\n this.safeParseAsync = this.safeParseAsync.bind(this);\n this.spa = this.spa.bind(this);\n this.refine = this.refine.bind(this);\n this.refinement = this.refinement.bind(this);\n this.superRefine = this.superRefine.bind(this);\n this.optional = this.optional.bind(this);\n this.nullable = this.nullable.bind(this);\n this.nullish = this.nullish.bind(this);\n this.array = this.array.bind(this);\n this.promise = this.promise.bind(this);\n this.or = this.or.bind(this);\n this.and = this.and.bind(this);\n this.transform = this.transform.bind(this);\n this.brand = this.brand.bind(this);\n this.default = this.default.bind(this);\n this.catch = this.catch.bind(this);\n this.describe = this.describe.bind(this);\n this.pipe = this.pipe.bind(this);\n this.readonly = this.readonly.bind(this);\n this.isNullable = this.isNullable.bind(this);\n this.isOptional = this.isOptional.bind(this);\n this[\"~standard\"] = {\n version: 1,\n vendor: \"zod\",\n validate: (data) => this[\"~validate\"](data)\n };\n }\n optional() {\n return ZodOptional2.create(this, this._def);\n }\n nullable() {\n return ZodNullable2.create(this, this._def);\n }\n nullish() {\n return this.nullable().optional();\n }\n array() {\n return ZodArray2.create(this);\n }\n promise() {\n return ZodPromise2.create(this, this._def);\n }\n or(option) {\n return ZodUnion2.create([this, option], this._def);\n }\n and(incoming) {\n return ZodIntersection2.create(this, incoming, this._def);\n }\n transform(transform2) {\n return new ZodEffects2({\n ...processCreateParams2(this._def),\n schema: this,\n typeName: ZodFirstPartyTypeKind2.ZodEffects,\n effect: { type: \"transform\", transform: transform2 }\n });\n }\n default(def) {\n const defaultValueFunc = typeof def === \"function\" ? def : () => def;\n return new ZodDefault2({\n ...processCreateParams2(this._def),\n innerType: this,\n defaultValue: defaultValueFunc,\n typeName: ZodFirstPartyTypeKind2.ZodDefault\n });\n }\n brand() {\n return new ZodBranded2({\n typeName: ZodFirstPartyTypeKind2.ZodBranded,\n type: this,\n ...processCreateParams2(this._def)\n });\n }\n catch(def) {\n const catchValueFunc = typeof def === \"function\" ? def : () => def;\n return new ZodCatch2({\n ...processCreateParams2(this._def),\n innerType: this,\n catchValue: catchValueFunc,\n typeName: ZodFirstPartyTypeKind2.ZodCatch\n });\n }\n describe(description2) {\n const This = this.constructor;\n return new This({\n ...this._def,\n description: description2\n });\n }\n pipe(target) {\n return ZodPipeline2.create(this, target);\n }\n readonly() {\n return ZodReadonly2.create(this);\n }\n isOptional() {\n return this.safeParse(void 0).success;\n }\n isNullable() {\n return this.safeParse(null).success;\n }\n };\n exports3.ZodType = ZodType2;\n exports3.Schema = ZodType2;\n exports3.ZodSchema = ZodType2;\n var cuidRegex2 = /^c[^\\s-]{8,}$/i;\n var cuid2Regex2 = /^[0-9a-z]+$/;\n var ulidRegex2 = /^[0-9A-HJKMNP-TV-Z]{26}$/i;\n var uuidRegex2 = /^[0-9a-fA-F]{8}\\b-[0-9a-fA-F]{4}\\b-[0-9a-fA-F]{4}\\b-[0-9a-fA-F]{4}\\b-[0-9a-fA-F]{12}$/i;\n var nanoidRegex2 = /^[a-z0-9_-]{21}$/i;\n var jwtRegex2 = /^[A-Za-z0-9-_]+\\.[A-Za-z0-9-_]+\\.[A-Za-z0-9-_]*$/;\n var durationRegex2 = /^[-+]?P(?!$)(?:(?:[-+]?\\d+Y)|(?:[-+]?\\d+[.,]\\d+Y$))?(?:(?:[-+]?\\d+M)|(?:[-+]?\\d+[.,]\\d+M$))?(?:(?:[-+]?\\d+W)|(?:[-+]?\\d+[.,]\\d+W$))?(?:(?:[-+]?\\d+D)|(?:[-+]?\\d+[.,]\\d+D$))?(?:T(?=[\\d+-])(?:(?:[-+]?\\d+H)|(?:[-+]?\\d+[.,]\\d+H$))?(?:(?:[-+]?\\d+M)|(?:[-+]?\\d+[.,]\\d+M$))?(?:[-+]?\\d+(?:[.,]\\d+)?S)?)??$/;\n var emailRegex2 = /^(?!\\.)(?!.*\\.\\.)([A-Z0-9_'+\\-\\.]*)[A-Z0-9_+-]@([A-Z0-9][A-Z0-9\\-]*\\.)+[A-Z]{2,}$/i;\n var _emojiRegex2 = `^(\\\\p{Extended_Pictographic}|\\\\p{Emoji_Component})+$`;\n var emojiRegex2;\n var ipv4Regex2 = /^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\\.){3}(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])$/;\n var ipv4CidrRegex2 = /^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\\.){3}(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\\/(3[0-2]|[12]?[0-9])$/;\n var ipv6Regex2 = /^(([0-9a-fA-F]{1,4}:){7,7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:)|fe80:(:[0-9a-fA-F]{0,4}){0,4}%[0-9a-zA-Z]{1,}|::(ffff(:0{1,4}){0,1}:){0,1}((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])|([0-9a-fA-F]{1,4}:){1,4}:((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9]))$/;\n var ipv6CidrRegex2 = /^(([0-9a-fA-F]{1,4}:){7,7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:)|fe80:(:[0-9a-fA-F]{0,4}){0,4}%[0-9a-zA-Z]{1,}|::(ffff(:0{1,4}){0,1}:){0,1}((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])|([0-9a-fA-F]{1,4}:){1,4}:((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9]))\\/(12[0-8]|1[01][0-9]|[1-9]?[0-9])$/;\n var base64Regex3 = /^([0-9a-zA-Z+/]{4})*(([0-9a-zA-Z+/]{2}==)|([0-9a-zA-Z+/]{3}=))?$/;\n var base64urlRegex2 = /^([0-9a-zA-Z-_]{4})*(([0-9a-zA-Z-_]{2}(==)?)|([0-9a-zA-Z-_]{3}(=)?))?$/;\n var dateRegexSource2 = `((\\\\d\\\\d[2468][048]|\\\\d\\\\d[13579][26]|\\\\d\\\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\\\d{4}-((0[13578]|1[02])-(0[1-9]|[12]\\\\d|3[01])|(0[469]|11)-(0[1-9]|[12]\\\\d|30)|(02)-(0[1-9]|1\\\\d|2[0-8])))`;\n var dateRegex2 = new RegExp(`^${dateRegexSource2}$`);\n function timeRegexSource2(args) {\n let secondsRegexSource = `[0-5]\\\\d`;\n if (args.precision) {\n secondsRegexSource = `${secondsRegexSource}\\\\.\\\\d{${args.precision}}`;\n } else if (args.precision == null) {\n secondsRegexSource = `${secondsRegexSource}(\\\\.\\\\d+)?`;\n }\n const secondsQuantifier = args.precision ? \"+\" : \"?\";\n return `([01]\\\\d|2[0-3]):[0-5]\\\\d(:${secondsRegexSource})${secondsQuantifier}`;\n }\n function timeRegex2(args) {\n return new RegExp(`^${timeRegexSource2(args)}$`);\n }\n function datetimeRegex2(args) {\n let regex2 = `${dateRegexSource2}T${timeRegexSource2(args)}`;\n const opts = [];\n opts.push(args.local ? `Z?` : `Z`);\n if (args.offset)\n opts.push(`([+-]\\\\d{2}:?\\\\d{2})`);\n regex2 = `${regex2}(${opts.join(\"|\")})`;\n return new RegExp(`^${regex2}$`);\n }\n function isValidIP2(ip, version6) {\n if ((version6 === \"v4\" || !version6) && ipv4Regex2.test(ip)) {\n return true;\n }\n if ((version6 === \"v6\" || !version6) && ipv6Regex2.test(ip)) {\n return true;\n }\n return false;\n }\n function isValidJWT2(jwt, alg) {\n if (!jwtRegex2.test(jwt))\n return false;\n try {\n const [header] = jwt.split(\".\");\n const base64 = header.replace(/-/g, \"+\").replace(/_/g, \"/\").padEnd(header.length + (4 - header.length % 4) % 4, \"=\");\n const decoded = JSON.parse(atob(base64));\n if (typeof decoded !== \"object\" || decoded === null)\n return false;\n if (\"typ\" in decoded && decoded?.typ !== \"JWT\")\n return false;\n if (!decoded.alg)\n return false;\n if (alg && decoded.alg !== alg)\n return false;\n return true;\n } catch {\n return false;\n }\n }\n function isValidCidr2(ip, version6) {\n if ((version6 === \"v4\" || !version6) && ipv4CidrRegex2.test(ip)) {\n return true;\n }\n if ((version6 === \"v6\" || !version6) && ipv6CidrRegex2.test(ip)) {\n return true;\n }\n return false;\n }\n var ZodString2 = class _ZodString extends ZodType2 {\n _parse(input) {\n if (this._def.coerce) {\n input.data = String(input.data);\n }\n const parsedType = this._getType(input);\n if (parsedType !== util_js_1.ZodParsedType.string) {\n const ctx2 = this._getOrReturnCtx(input);\n (0, parseUtil_js_1.addIssueToContext)(ctx2, {\n code: ZodError_js_1.ZodIssueCode.invalid_type,\n expected: util_js_1.ZodParsedType.string,\n received: ctx2.parsedType\n });\n return parseUtil_js_1.INVALID;\n }\n const status = new parseUtil_js_1.ParseStatus();\n let ctx = void 0;\n for (const check of this._def.checks) {\n if (check.kind === \"min\") {\n if (input.data.length < check.value) {\n ctx = this._getOrReturnCtx(input, ctx);\n (0, parseUtil_js_1.addIssueToContext)(ctx, {\n code: ZodError_js_1.ZodIssueCode.too_small,\n minimum: check.value,\n type: \"string\",\n inclusive: true,\n exact: false,\n message: check.message\n });\n status.dirty();\n }\n } else if (check.kind === \"max\") {\n if (input.data.length > check.value) {\n ctx = this._getOrReturnCtx(input, ctx);\n (0, parseUtil_js_1.addIssueToContext)(ctx, {\n code: ZodError_js_1.ZodIssueCode.too_big,\n maximum: check.value,\n type: \"string\",\n inclusive: true,\n exact: false,\n message: check.message\n });\n status.dirty();\n }\n } else if (check.kind === \"length\") {\n const tooBig = input.data.length > check.value;\n const tooSmall = input.data.length < check.value;\n if (tooBig || tooSmall) {\n ctx = this._getOrReturnCtx(input, ctx);\n if (tooBig) {\n (0, parseUtil_js_1.addIssueToContext)(ctx, {\n code: ZodError_js_1.ZodIssueCode.too_big,\n maximum: check.value,\n type: \"string\",\n inclusive: true,\n exact: true,\n message: check.message\n });\n } else if (tooSmall) {\n (0, parseUtil_js_1.addIssueToContext)(ctx, {\n code: ZodError_js_1.ZodIssueCode.too_small,\n minimum: check.value,\n type: \"string\",\n inclusive: true,\n exact: true,\n message: check.message\n });\n }\n status.dirty();\n }\n } else if (check.kind === \"email\") {\n if (!emailRegex2.test(input.data)) {\n ctx = this._getOrReturnCtx(input, ctx);\n (0, parseUtil_js_1.addIssueToContext)(ctx, {\n validation: \"email\",\n code: ZodError_js_1.ZodIssueCode.invalid_string,\n message: check.message\n });\n status.dirty();\n }\n } else if (check.kind === \"emoji\") {\n if (!emojiRegex2) {\n emojiRegex2 = new RegExp(_emojiRegex2, \"u\");\n }\n if (!emojiRegex2.test(input.data)) {\n ctx = this._getOrReturnCtx(input, ctx);\n (0, parseUtil_js_1.addIssueToContext)(ctx, {\n validation: \"emoji\",\n code: ZodError_js_1.ZodIssueCode.invalid_string,\n message: check.message\n });\n status.dirty();\n }\n } else if (check.kind === \"uuid\") {\n if (!uuidRegex2.test(input.data)) {\n ctx = this._getOrReturnCtx(input, ctx);\n (0, parseUtil_js_1.addIssueToContext)(ctx, {\n validation: \"uuid\",\n code: ZodError_js_1.ZodIssueCode.invalid_string,\n message: check.message\n });\n status.dirty();\n }\n } else if (check.kind === \"nanoid\") {\n if (!nanoidRegex2.test(input.data)) {\n ctx = this._getOrReturnCtx(input, ctx);\n (0, parseUtil_js_1.addIssueToContext)(ctx, {\n validation: \"nanoid\",\n code: ZodError_js_1.ZodIssueCode.invalid_string,\n message: check.message\n });\n status.dirty();\n }\n } else if (check.kind === \"cuid\") {\n if (!cuidRegex2.test(input.data)) {\n ctx = this._getOrReturnCtx(input, ctx);\n (0, parseUtil_js_1.addIssueToContext)(ctx, {\n validation: \"cuid\",\n code: ZodError_js_1.ZodIssueCode.invalid_string,\n message: check.message\n });\n status.dirty();\n }\n } else if (check.kind === \"cuid2\") {\n if (!cuid2Regex2.test(input.data)) {\n ctx = this._getOrReturnCtx(input, ctx);\n (0, parseUtil_js_1.addIssueToContext)(ctx, {\n validation: \"cuid2\",\n code: ZodError_js_1.ZodIssueCode.invalid_string,\n message: check.message\n });\n status.dirty();\n }\n } else if (check.kind === \"ulid\") {\n if (!ulidRegex2.test(input.data)) {\n ctx = this._getOrReturnCtx(input, ctx);\n (0, parseUtil_js_1.addIssueToContext)(ctx, {\n validation: \"ulid\",\n code: ZodError_js_1.ZodIssueCode.invalid_string,\n message: check.message\n });\n status.dirty();\n }\n } else if (check.kind === \"url\") {\n try {\n new URL(input.data);\n } catch {\n ctx = this._getOrReturnCtx(input, ctx);\n (0, parseUtil_js_1.addIssueToContext)(ctx, {\n validation: \"url\",\n code: ZodError_js_1.ZodIssueCode.invalid_string,\n message: check.message\n });\n status.dirty();\n }\n } else if (check.kind === \"regex\") {\n check.regex.lastIndex = 0;\n const testResult = check.regex.test(input.data);\n if (!testResult) {\n ctx = this._getOrReturnCtx(input, ctx);\n (0, parseUtil_js_1.addIssueToContext)(ctx, {\n validation: \"regex\",\n code: ZodError_js_1.ZodIssueCode.invalid_string,\n message: check.message\n });\n status.dirty();\n }\n } else if (check.kind === \"trim\") {\n input.data = input.data.trim();\n } else if (check.kind === \"includes\") {\n if (!input.data.includes(check.value, check.position)) {\n ctx = this._getOrReturnCtx(input, ctx);\n (0, parseUtil_js_1.addIssueToContext)(ctx, {\n code: ZodError_js_1.ZodIssueCode.invalid_string,\n validation: { includes: check.value, position: check.position },\n message: check.message\n });\n status.dirty();\n }\n } else if (check.kind === \"toLowerCase\") {\n input.data = input.data.toLowerCase();\n } else if (check.kind === \"toUpperCase\") {\n input.data = input.data.toUpperCase();\n } else if (check.kind === \"startsWith\") {\n if (!input.data.startsWith(check.value)) {\n ctx = this._getOrReturnCtx(input, ctx);\n (0, parseUtil_js_1.addIssueToContext)(ctx, {\n code: ZodError_js_1.ZodIssueCode.invalid_string,\n validation: { startsWith: check.value },\n message: check.message\n });\n status.dirty();\n }\n } else if (check.kind === \"endsWith\") {\n if (!input.data.endsWith(check.value)) {\n ctx = this._getOrReturnCtx(input, ctx);\n (0, parseUtil_js_1.addIssueToContext)(ctx, {\n code: ZodError_js_1.ZodIssueCode.invalid_string,\n validation: { endsWith: check.value },\n message: check.message\n });\n status.dirty();\n }\n } else if (check.kind === \"datetime\") {\n const regex2 = datetimeRegex2(check);\n if (!regex2.test(input.data)) {\n ctx = this._getOrReturnCtx(input, ctx);\n (0, parseUtil_js_1.addIssueToContext)(ctx, {\n code: ZodError_js_1.ZodIssueCode.invalid_string,\n validation: \"datetime\",\n message: check.message\n });\n status.dirty();\n }\n } else if (check.kind === \"date\") {\n const regex2 = dateRegex2;\n if (!regex2.test(input.data)) {\n ctx = this._getOrReturnCtx(input, ctx);\n (0, parseUtil_js_1.addIssueToContext)(ctx, {\n code: ZodError_js_1.ZodIssueCode.invalid_string,\n validation: \"date\",\n message: check.message\n });\n status.dirty();\n }\n } else if (check.kind === \"time\") {\n const regex2 = timeRegex2(check);\n if (!regex2.test(input.data)) {\n ctx = this._getOrReturnCtx(input, ctx);\n (0, parseUtil_js_1.addIssueToContext)(ctx, {\n code: ZodError_js_1.ZodIssueCode.invalid_string,\n validation: \"time\",\n message: check.message\n });\n status.dirty();\n }\n } else if (check.kind === \"duration\") {\n if (!durationRegex2.test(input.data)) {\n ctx = this._getOrReturnCtx(input, ctx);\n (0, parseUtil_js_1.addIssueToContext)(ctx, {\n validation: \"duration\",\n code: ZodError_js_1.ZodIssueCode.invalid_string,\n message: check.message\n });\n status.dirty();\n }\n } else if (check.kind === \"ip\") {\n if (!isValidIP2(input.data, check.version)) {\n ctx = this._getOrReturnCtx(input, ctx);\n (0, parseUtil_js_1.addIssueToContext)(ctx, {\n validation: \"ip\",\n code: ZodError_js_1.ZodIssueCode.invalid_string,\n message: check.message\n });\n status.dirty();\n }\n } else if (check.kind === \"jwt\") {\n if (!isValidJWT2(input.data, check.alg)) {\n ctx = this._getOrReturnCtx(input, ctx);\n (0, parseUtil_js_1.addIssueToContext)(ctx, {\n validation: \"jwt\",\n code: ZodError_js_1.ZodIssueCode.invalid_string,\n message: check.message\n });\n status.dirty();\n }\n } else if (check.kind === \"cidr\") {\n if (!isValidCidr2(input.data, check.version)) {\n ctx = this._getOrReturnCtx(input, ctx);\n (0, parseUtil_js_1.addIssueToContext)(ctx, {\n validation: \"cidr\",\n code: ZodError_js_1.ZodIssueCode.invalid_string,\n message: check.message\n });\n status.dirty();\n }\n } else if (check.kind === \"base64\") {\n if (!base64Regex3.test(input.data)) {\n ctx = this._getOrReturnCtx(input, ctx);\n (0, parseUtil_js_1.addIssueToContext)(ctx, {\n validation: \"base64\",\n code: ZodError_js_1.ZodIssueCode.invalid_string,\n message: check.message\n });\n status.dirty();\n }\n } else if (check.kind === \"base64url\") {\n if (!base64urlRegex2.test(input.data)) {\n ctx = this._getOrReturnCtx(input, ctx);\n (0, parseUtil_js_1.addIssueToContext)(ctx, {\n validation: \"base64url\",\n code: ZodError_js_1.ZodIssueCode.invalid_string,\n message: check.message\n });\n status.dirty();\n }\n } else {\n util_js_1.util.assertNever(check);\n }\n }\n return { status: status.value, value: input.data };\n }\n _regex(regex2, validation, message) {\n return this.refinement((data) => regex2.test(data), {\n validation,\n code: ZodError_js_1.ZodIssueCode.invalid_string,\n ...errorUtil_js_1.errorUtil.errToObj(message)\n });\n }\n _addCheck(check) {\n return new _ZodString({\n ...this._def,\n checks: [...this._def.checks, check]\n });\n }\n email(message) {\n return this._addCheck({ kind: \"email\", ...errorUtil_js_1.errorUtil.errToObj(message) });\n }\n url(message) {\n return this._addCheck({ kind: \"url\", ...errorUtil_js_1.errorUtil.errToObj(message) });\n }\n emoji(message) {\n return this._addCheck({ kind: \"emoji\", ...errorUtil_js_1.errorUtil.errToObj(message) });\n }\n uuid(message) {\n return this._addCheck({ kind: \"uuid\", ...errorUtil_js_1.errorUtil.errToObj(message) });\n }\n nanoid(message) {\n return this._addCheck({ kind: \"nanoid\", ...errorUtil_js_1.errorUtil.errToObj(message) });\n }\n cuid(message) {\n return this._addCheck({ kind: \"cuid\", ...errorUtil_js_1.errorUtil.errToObj(message) });\n }\n cuid2(message) {\n return this._addCheck({ kind: \"cuid2\", ...errorUtil_js_1.errorUtil.errToObj(message) });\n }\n ulid(message) {\n return this._addCheck({ kind: \"ulid\", ...errorUtil_js_1.errorUtil.errToObj(message) });\n }\n base64(message) {\n return this._addCheck({ kind: \"base64\", ...errorUtil_js_1.errorUtil.errToObj(message) });\n }\n base64url(message) {\n return this._addCheck({\n kind: \"base64url\",\n ...errorUtil_js_1.errorUtil.errToObj(message)\n });\n }\n jwt(options) {\n return this._addCheck({ kind: \"jwt\", ...errorUtil_js_1.errorUtil.errToObj(options) });\n }\n ip(options) {\n return this._addCheck({ kind: \"ip\", ...errorUtil_js_1.errorUtil.errToObj(options) });\n }\n cidr(options) {\n return this._addCheck({ kind: \"cidr\", ...errorUtil_js_1.errorUtil.errToObj(options) });\n }\n datetime(options) {\n if (typeof options === \"string\") {\n return this._addCheck({\n kind: \"datetime\",\n precision: null,\n offset: false,\n local: false,\n message: options\n });\n }\n return this._addCheck({\n kind: \"datetime\",\n precision: typeof options?.precision === \"undefined\" ? null : options?.precision,\n offset: options?.offset ?? false,\n local: options?.local ?? false,\n ...errorUtil_js_1.errorUtil.errToObj(options?.message)\n });\n }\n date(message) {\n return this._addCheck({ kind: \"date\", message });\n }\n time(options) {\n if (typeof options === \"string\") {\n return this._addCheck({\n kind: \"time\",\n precision: null,\n message: options\n });\n }\n return this._addCheck({\n kind: \"time\",\n precision: typeof options?.precision === \"undefined\" ? null : options?.precision,\n ...errorUtil_js_1.errorUtil.errToObj(options?.message)\n });\n }\n duration(message) {\n return this._addCheck({ kind: \"duration\", ...errorUtil_js_1.errorUtil.errToObj(message) });\n }\n regex(regex2, message) {\n return this._addCheck({\n kind: \"regex\",\n regex: regex2,\n ...errorUtil_js_1.errorUtil.errToObj(message)\n });\n }\n includes(value, options) {\n return this._addCheck({\n kind: \"includes\",\n value,\n position: options?.position,\n ...errorUtil_js_1.errorUtil.errToObj(options?.message)\n });\n }\n startsWith(value, message) {\n return this._addCheck({\n kind: \"startsWith\",\n value,\n ...errorUtil_js_1.errorUtil.errToObj(message)\n });\n }\n endsWith(value, message) {\n return this._addCheck({\n kind: \"endsWith\",\n value,\n ...errorUtil_js_1.errorUtil.errToObj(message)\n });\n }\n min(minLength2, message) {\n return this._addCheck({\n kind: \"min\",\n value: minLength2,\n ...errorUtil_js_1.errorUtil.errToObj(message)\n });\n }\n max(maxLength, message) {\n return this._addCheck({\n kind: \"max\",\n value: maxLength,\n ...errorUtil_js_1.errorUtil.errToObj(message)\n });\n }\n length(len, message) {\n return this._addCheck({\n kind: \"length\",\n value: len,\n ...errorUtil_js_1.errorUtil.errToObj(message)\n });\n }\n /**\n * Equivalent to `.min(1)`\n */\n nonempty(message) {\n return this.min(1, errorUtil_js_1.errorUtil.errToObj(message));\n }\n trim() {\n return new _ZodString({\n ...this._def,\n checks: [...this._def.checks, { kind: \"trim\" }]\n });\n }\n toLowerCase() {\n return new _ZodString({\n ...this._def,\n checks: [...this._def.checks, { kind: \"toLowerCase\" }]\n });\n }\n toUpperCase() {\n return new _ZodString({\n ...this._def,\n checks: [...this._def.checks, { kind: \"toUpperCase\" }]\n });\n }\n get isDatetime() {\n return !!this._def.checks.find((ch) => ch.kind === \"datetime\");\n }\n get isDate() {\n return !!this._def.checks.find((ch) => ch.kind === \"date\");\n }\n get isTime() {\n return !!this._def.checks.find((ch) => ch.kind === \"time\");\n }\n get isDuration() {\n return !!this._def.checks.find((ch) => ch.kind === \"duration\");\n }\n get isEmail() {\n return !!this._def.checks.find((ch) => ch.kind === \"email\");\n }\n get isURL() {\n return !!this._def.checks.find((ch) => ch.kind === \"url\");\n }\n get isEmoji() {\n return !!this._def.checks.find((ch) => ch.kind === \"emoji\");\n }\n get isUUID() {\n return !!this._def.checks.find((ch) => ch.kind === \"uuid\");\n }\n get isNANOID() {\n return !!this._def.checks.find((ch) => ch.kind === \"nanoid\");\n }\n get isCUID() {\n return !!this._def.checks.find((ch) => ch.kind === \"cuid\");\n }\n get isCUID2() {\n return !!this._def.checks.find((ch) => ch.kind === \"cuid2\");\n }\n get isULID() {\n return !!this._def.checks.find((ch) => ch.kind === \"ulid\");\n }\n get isIP() {\n return !!this._def.checks.find((ch) => ch.kind === \"ip\");\n }\n get isCIDR() {\n return !!this._def.checks.find((ch) => ch.kind === \"cidr\");\n }\n get isBase64() {\n return !!this._def.checks.find((ch) => ch.kind === \"base64\");\n }\n get isBase64url() {\n return !!this._def.checks.find((ch) => ch.kind === \"base64url\");\n }\n get minLength() {\n let min = null;\n for (const ch of this._def.checks) {\n if (ch.kind === \"min\") {\n if (min === null || ch.value > min)\n min = ch.value;\n }\n }\n return min;\n }\n get maxLength() {\n let max = null;\n for (const ch of this._def.checks) {\n if (ch.kind === \"max\") {\n if (max === null || ch.value < max)\n max = ch.value;\n }\n }\n return max;\n }\n };\n exports3.ZodString = ZodString2;\n ZodString2.create = (params) => {\n return new ZodString2({\n checks: [],\n typeName: ZodFirstPartyTypeKind2.ZodString,\n coerce: params?.coerce ?? false,\n ...processCreateParams2(params)\n });\n };\n function floatSafeRemainder2(val, step) {\n const valDecCount = (val.toString().split(\".\")[1] || \"\").length;\n const stepDecCount = (step.toString().split(\".\")[1] || \"\").length;\n const decCount = valDecCount > stepDecCount ? valDecCount : stepDecCount;\n const valInt = Number.parseInt(val.toFixed(decCount).replace(\".\", \"\"));\n const stepInt = Number.parseInt(step.toFixed(decCount).replace(\".\", \"\"));\n return valInt % stepInt / 10 ** decCount;\n }\n var ZodNumber2 = class _ZodNumber extends ZodType2 {\n constructor() {\n super(...arguments);\n this.min = this.gte;\n this.max = this.lte;\n this.step = this.multipleOf;\n }\n _parse(input) {\n if (this._def.coerce) {\n input.data = Number(input.data);\n }\n const parsedType = this._getType(input);\n if (parsedType !== util_js_1.ZodParsedType.number) {\n const ctx2 = this._getOrReturnCtx(input);\n (0, parseUtil_js_1.addIssueToContext)(ctx2, {\n code: ZodError_js_1.ZodIssueCode.invalid_type,\n expected: util_js_1.ZodParsedType.number,\n received: ctx2.parsedType\n });\n return parseUtil_js_1.INVALID;\n }\n let ctx = void 0;\n const status = new parseUtil_js_1.ParseStatus();\n for (const check of this._def.checks) {\n if (check.kind === \"int\") {\n if (!util_js_1.util.isInteger(input.data)) {\n ctx = this._getOrReturnCtx(input, ctx);\n (0, parseUtil_js_1.addIssueToContext)(ctx, {\n code: ZodError_js_1.ZodIssueCode.invalid_type,\n expected: \"integer\",\n received: \"float\",\n message: check.message\n });\n status.dirty();\n }\n } else if (check.kind === \"min\") {\n const tooSmall = check.inclusive ? input.data < check.value : input.data <= check.value;\n if (tooSmall) {\n ctx = this._getOrReturnCtx(input, ctx);\n (0, parseUtil_js_1.addIssueToContext)(ctx, {\n code: ZodError_js_1.ZodIssueCode.too_small,\n minimum: check.value,\n type: \"number\",\n inclusive: check.inclusive,\n exact: false,\n message: check.message\n });\n status.dirty();\n }\n } else if (check.kind === \"max\") {\n const tooBig = check.inclusive ? input.data > check.value : input.data >= check.value;\n if (tooBig) {\n ctx = this._getOrReturnCtx(input, ctx);\n (0, parseUtil_js_1.addIssueToContext)(ctx, {\n code: ZodError_js_1.ZodIssueCode.too_big,\n maximum: check.value,\n type: \"number\",\n inclusive: check.inclusive,\n exact: false,\n message: check.message\n });\n status.dirty();\n }\n } else if (check.kind === \"multipleOf\") {\n if (floatSafeRemainder2(input.data, check.value) !== 0) {\n ctx = this._getOrReturnCtx(input, ctx);\n (0, parseUtil_js_1.addIssueToContext)(ctx, {\n code: ZodError_js_1.ZodIssueCode.not_multiple_of,\n multipleOf: check.value,\n message: check.message\n });\n status.dirty();\n }\n } else if (check.kind === \"finite\") {\n if (!Number.isFinite(input.data)) {\n ctx = this._getOrReturnCtx(input, ctx);\n (0, parseUtil_js_1.addIssueToContext)(ctx, {\n code: ZodError_js_1.ZodIssueCode.not_finite,\n message: check.message\n });\n status.dirty();\n }\n } else {\n util_js_1.util.assertNever(check);\n }\n }\n return { status: status.value, value: input.data };\n }\n gte(value, message) {\n return this.setLimit(\"min\", value, true, errorUtil_js_1.errorUtil.toString(message));\n }\n gt(value, message) {\n return this.setLimit(\"min\", value, false, errorUtil_js_1.errorUtil.toString(message));\n }\n lte(value, message) {\n return this.setLimit(\"max\", value, true, errorUtil_js_1.errorUtil.toString(message));\n }\n lt(value, message) {\n return this.setLimit(\"max\", value, false, errorUtil_js_1.errorUtil.toString(message));\n }\n setLimit(kind, value, inclusive, message) {\n return new _ZodNumber({\n ...this._def,\n checks: [\n ...this._def.checks,\n {\n kind,\n value,\n inclusive,\n message: errorUtil_js_1.errorUtil.toString(message)\n }\n ]\n });\n }\n _addCheck(check) {\n return new _ZodNumber({\n ...this._def,\n checks: [...this._def.checks, check]\n });\n }\n int(message) {\n return this._addCheck({\n kind: \"int\",\n message: errorUtil_js_1.errorUtil.toString(message)\n });\n }\n positive(message) {\n return this._addCheck({\n kind: \"min\",\n value: 0,\n inclusive: false,\n message: errorUtil_js_1.errorUtil.toString(message)\n });\n }\n negative(message) {\n return this._addCheck({\n kind: \"max\",\n value: 0,\n inclusive: false,\n message: errorUtil_js_1.errorUtil.toString(message)\n });\n }\n nonpositive(message) {\n return this._addCheck({\n kind: \"max\",\n value: 0,\n inclusive: true,\n message: errorUtil_js_1.errorUtil.toString(message)\n });\n }\n nonnegative(message) {\n return this._addCheck({\n kind: \"min\",\n value: 0,\n inclusive: true,\n message: errorUtil_js_1.errorUtil.toString(message)\n });\n }\n multipleOf(value, message) {\n return this._addCheck({\n kind: \"multipleOf\",\n value,\n message: errorUtil_js_1.errorUtil.toString(message)\n });\n }\n finite(message) {\n return this._addCheck({\n kind: \"finite\",\n message: errorUtil_js_1.errorUtil.toString(message)\n });\n }\n safe(message) {\n return this._addCheck({\n kind: \"min\",\n inclusive: true,\n value: Number.MIN_SAFE_INTEGER,\n message: errorUtil_js_1.errorUtil.toString(message)\n })._addCheck({\n kind: \"max\",\n inclusive: true,\n value: Number.MAX_SAFE_INTEGER,\n message: errorUtil_js_1.errorUtil.toString(message)\n });\n }\n get minValue() {\n let min = null;\n for (const ch of this._def.checks) {\n if (ch.kind === \"min\") {\n if (min === null || ch.value > min)\n min = ch.value;\n }\n }\n return min;\n }\n get maxValue() {\n let max = null;\n for (const ch of this._def.checks) {\n if (ch.kind === \"max\") {\n if (max === null || ch.value < max)\n max = ch.value;\n }\n }\n return max;\n }\n get isInt() {\n return !!this._def.checks.find((ch) => ch.kind === \"int\" || ch.kind === \"multipleOf\" && util_js_1.util.isInteger(ch.value));\n }\n get isFinite() {\n let max = null;\n let min = null;\n for (const ch of this._def.checks) {\n if (ch.kind === \"finite\" || ch.kind === \"int\" || ch.kind === \"multipleOf\") {\n return true;\n } else if (ch.kind === \"min\") {\n if (min === null || ch.value > min)\n min = ch.value;\n } else if (ch.kind === \"max\") {\n if (max === null || ch.value < max)\n max = ch.value;\n }\n }\n return Number.isFinite(min) && Number.isFinite(max);\n }\n };\n exports3.ZodNumber = ZodNumber2;\n ZodNumber2.create = (params) => {\n return new ZodNumber2({\n checks: [],\n typeName: ZodFirstPartyTypeKind2.ZodNumber,\n coerce: params?.coerce || false,\n ...processCreateParams2(params)\n });\n };\n var ZodBigInt2 = class _ZodBigInt extends ZodType2 {\n constructor() {\n super(...arguments);\n this.min = this.gte;\n this.max = this.lte;\n }\n _parse(input) {\n if (this._def.coerce) {\n try {\n input.data = BigInt(input.data);\n } catch {\n return this._getInvalidInput(input);\n }\n }\n const parsedType = this._getType(input);\n if (parsedType !== util_js_1.ZodParsedType.bigint) {\n return this._getInvalidInput(input);\n }\n let ctx = void 0;\n const status = new parseUtil_js_1.ParseStatus();\n for (const check of this._def.checks) {\n if (check.kind === \"min\") {\n const tooSmall = check.inclusive ? input.data < check.value : input.data <= check.value;\n if (tooSmall) {\n ctx = this._getOrReturnCtx(input, ctx);\n (0, parseUtil_js_1.addIssueToContext)(ctx, {\n code: ZodError_js_1.ZodIssueCode.too_small,\n type: \"bigint\",\n minimum: check.value,\n inclusive: check.inclusive,\n message: check.message\n });\n status.dirty();\n }\n } else if (check.kind === \"max\") {\n const tooBig = check.inclusive ? input.data > check.value : input.data >= check.value;\n if (tooBig) {\n ctx = this._getOrReturnCtx(input, ctx);\n (0, parseUtil_js_1.addIssueToContext)(ctx, {\n code: ZodError_js_1.ZodIssueCode.too_big,\n type: \"bigint\",\n maximum: check.value,\n inclusive: check.inclusive,\n message: check.message\n });\n status.dirty();\n }\n } else if (check.kind === \"multipleOf\") {\n if (input.data % check.value !== BigInt(0)) {\n ctx = this._getOrReturnCtx(input, ctx);\n (0, parseUtil_js_1.addIssueToContext)(ctx, {\n code: ZodError_js_1.ZodIssueCode.not_multiple_of,\n multipleOf: check.value,\n message: check.message\n });\n status.dirty();\n }\n } else {\n util_js_1.util.assertNever(check);\n }\n }\n return { status: status.value, value: input.data };\n }\n _getInvalidInput(input) {\n const ctx = this._getOrReturnCtx(input);\n (0, parseUtil_js_1.addIssueToContext)(ctx, {\n code: ZodError_js_1.ZodIssueCode.invalid_type,\n expected: util_js_1.ZodParsedType.bigint,\n received: ctx.parsedType\n });\n return parseUtil_js_1.INVALID;\n }\n gte(value, message) {\n return this.setLimit(\"min\", value, true, errorUtil_js_1.errorUtil.toString(message));\n }\n gt(value, message) {\n return this.setLimit(\"min\", value, false, errorUtil_js_1.errorUtil.toString(message));\n }\n lte(value, message) {\n return this.setLimit(\"max\", value, true, errorUtil_js_1.errorUtil.toString(message));\n }\n lt(value, message) {\n return this.setLimit(\"max\", value, false, errorUtil_js_1.errorUtil.toString(message));\n }\n setLimit(kind, value, inclusive, message) {\n return new _ZodBigInt({\n ...this._def,\n checks: [\n ...this._def.checks,\n {\n kind,\n value,\n inclusive,\n message: errorUtil_js_1.errorUtil.toString(message)\n }\n ]\n });\n }\n _addCheck(check) {\n return new _ZodBigInt({\n ...this._def,\n checks: [...this._def.checks, check]\n });\n }\n positive(message) {\n return this._addCheck({\n kind: \"min\",\n value: BigInt(0),\n inclusive: false,\n message: errorUtil_js_1.errorUtil.toString(message)\n });\n }\n negative(message) {\n return this._addCheck({\n kind: \"max\",\n value: BigInt(0),\n inclusive: false,\n message: errorUtil_js_1.errorUtil.toString(message)\n });\n }\n nonpositive(message) {\n return this._addCheck({\n kind: \"max\",\n value: BigInt(0),\n inclusive: true,\n message: errorUtil_js_1.errorUtil.toString(message)\n });\n }\n nonnegative(message) {\n return this._addCheck({\n kind: \"min\",\n value: BigInt(0),\n inclusive: true,\n message: errorUtil_js_1.errorUtil.toString(message)\n });\n }\n multipleOf(value, message) {\n return this._addCheck({\n kind: \"multipleOf\",\n value,\n message: errorUtil_js_1.errorUtil.toString(message)\n });\n }\n get minValue() {\n let min = null;\n for (const ch of this._def.checks) {\n if (ch.kind === \"min\") {\n if (min === null || ch.value > min)\n min = ch.value;\n }\n }\n return min;\n }\n get maxValue() {\n let max = null;\n for (const ch of this._def.checks) {\n if (ch.kind === \"max\") {\n if (max === null || ch.value < max)\n max = ch.value;\n }\n }\n return max;\n }\n };\n exports3.ZodBigInt = ZodBigInt2;\n ZodBigInt2.create = (params) => {\n return new ZodBigInt2({\n checks: [],\n typeName: ZodFirstPartyTypeKind2.ZodBigInt,\n coerce: params?.coerce ?? false,\n ...processCreateParams2(params)\n });\n };\n var ZodBoolean2 = class extends ZodType2 {\n _parse(input) {\n if (this._def.coerce) {\n input.data = Boolean(input.data);\n }\n const parsedType = this._getType(input);\n if (parsedType !== util_js_1.ZodParsedType.boolean) {\n const ctx = this._getOrReturnCtx(input);\n (0, parseUtil_js_1.addIssueToContext)(ctx, {\n code: ZodError_js_1.ZodIssueCode.invalid_type,\n expected: util_js_1.ZodParsedType.boolean,\n received: ctx.parsedType\n });\n return parseUtil_js_1.INVALID;\n }\n return (0, parseUtil_js_1.OK)(input.data);\n }\n };\n exports3.ZodBoolean = ZodBoolean2;\n ZodBoolean2.create = (params) => {\n return new ZodBoolean2({\n typeName: ZodFirstPartyTypeKind2.ZodBoolean,\n coerce: params?.coerce || false,\n ...processCreateParams2(params)\n });\n };\n var ZodDate2 = class _ZodDate extends ZodType2 {\n _parse(input) {\n if (this._def.coerce) {\n input.data = new Date(input.data);\n }\n const parsedType = this._getType(input);\n if (parsedType !== util_js_1.ZodParsedType.date) {\n const ctx2 = this._getOrReturnCtx(input);\n (0, parseUtil_js_1.addIssueToContext)(ctx2, {\n code: ZodError_js_1.ZodIssueCode.invalid_type,\n expected: util_js_1.ZodParsedType.date,\n received: ctx2.parsedType\n });\n return parseUtil_js_1.INVALID;\n }\n if (Number.isNaN(input.data.getTime())) {\n const ctx2 = this._getOrReturnCtx(input);\n (0, parseUtil_js_1.addIssueToContext)(ctx2, {\n code: ZodError_js_1.ZodIssueCode.invalid_date\n });\n return parseUtil_js_1.INVALID;\n }\n const status = new parseUtil_js_1.ParseStatus();\n let ctx = void 0;\n for (const check of this._def.checks) {\n if (check.kind === \"min\") {\n if (input.data.getTime() < check.value) {\n ctx = this._getOrReturnCtx(input, ctx);\n (0, parseUtil_js_1.addIssueToContext)(ctx, {\n code: ZodError_js_1.ZodIssueCode.too_small,\n message: check.message,\n inclusive: true,\n exact: false,\n minimum: check.value,\n type: \"date\"\n });\n status.dirty();\n }\n } else if (check.kind === \"max\") {\n if (input.data.getTime() > check.value) {\n ctx = this._getOrReturnCtx(input, ctx);\n (0, parseUtil_js_1.addIssueToContext)(ctx, {\n code: ZodError_js_1.ZodIssueCode.too_big,\n message: check.message,\n inclusive: true,\n exact: false,\n maximum: check.value,\n type: \"date\"\n });\n status.dirty();\n }\n } else {\n util_js_1.util.assertNever(check);\n }\n }\n return {\n status: status.value,\n value: new Date(input.data.getTime())\n };\n }\n _addCheck(check) {\n return new _ZodDate({\n ...this._def,\n checks: [...this._def.checks, check]\n });\n }\n min(minDate, message) {\n return this._addCheck({\n kind: \"min\",\n value: minDate.getTime(),\n message: errorUtil_js_1.errorUtil.toString(message)\n });\n }\n max(maxDate, message) {\n return this._addCheck({\n kind: \"max\",\n value: maxDate.getTime(),\n message: errorUtil_js_1.errorUtil.toString(message)\n });\n }\n get minDate() {\n let min = null;\n for (const ch of this._def.checks) {\n if (ch.kind === \"min\") {\n if (min === null || ch.value > min)\n min = ch.value;\n }\n }\n return min != null ? new Date(min) : null;\n }\n get maxDate() {\n let max = null;\n for (const ch of this._def.checks) {\n if (ch.kind === \"max\") {\n if (max === null || ch.value < max)\n max = ch.value;\n }\n }\n return max != null ? new Date(max) : null;\n }\n };\n exports3.ZodDate = ZodDate2;\n ZodDate2.create = (params) => {\n return new ZodDate2({\n checks: [],\n coerce: params?.coerce || false,\n typeName: ZodFirstPartyTypeKind2.ZodDate,\n ...processCreateParams2(params)\n });\n };\n var ZodSymbol2 = class extends ZodType2 {\n _parse(input) {\n const parsedType = this._getType(input);\n if (parsedType !== util_js_1.ZodParsedType.symbol) {\n const ctx = this._getOrReturnCtx(input);\n (0, parseUtil_js_1.addIssueToContext)(ctx, {\n code: ZodError_js_1.ZodIssueCode.invalid_type,\n expected: util_js_1.ZodParsedType.symbol,\n received: ctx.parsedType\n });\n return parseUtil_js_1.INVALID;\n }\n return (0, parseUtil_js_1.OK)(input.data);\n }\n };\n exports3.ZodSymbol = ZodSymbol2;\n ZodSymbol2.create = (params) => {\n return new ZodSymbol2({\n typeName: ZodFirstPartyTypeKind2.ZodSymbol,\n ...processCreateParams2(params)\n });\n };\n var ZodUndefined2 = class extends ZodType2 {\n _parse(input) {\n const parsedType = this._getType(input);\n if (parsedType !== util_js_1.ZodParsedType.undefined) {\n const ctx = this._getOrReturnCtx(input);\n (0, parseUtil_js_1.addIssueToContext)(ctx, {\n code: ZodError_js_1.ZodIssueCode.invalid_type,\n expected: util_js_1.ZodParsedType.undefined,\n received: ctx.parsedType\n });\n return parseUtil_js_1.INVALID;\n }\n return (0, parseUtil_js_1.OK)(input.data);\n }\n };\n exports3.ZodUndefined = ZodUndefined2;\n ZodUndefined2.create = (params) => {\n return new ZodUndefined2({\n typeName: ZodFirstPartyTypeKind2.ZodUndefined,\n ...processCreateParams2(params)\n });\n };\n var ZodNull2 = class extends ZodType2 {\n _parse(input) {\n const parsedType = this._getType(input);\n if (parsedType !== util_js_1.ZodParsedType.null) {\n const ctx = this._getOrReturnCtx(input);\n (0, parseUtil_js_1.addIssueToContext)(ctx, {\n code: ZodError_js_1.ZodIssueCode.invalid_type,\n expected: util_js_1.ZodParsedType.null,\n received: ctx.parsedType\n });\n return parseUtil_js_1.INVALID;\n }\n return (0, parseUtil_js_1.OK)(input.data);\n }\n };\n exports3.ZodNull = ZodNull2;\n ZodNull2.create = (params) => {\n return new ZodNull2({\n typeName: ZodFirstPartyTypeKind2.ZodNull,\n ...processCreateParams2(params)\n });\n };\n var ZodAny2 = class extends ZodType2 {\n constructor() {\n super(...arguments);\n this._any = true;\n }\n _parse(input) {\n return (0, parseUtil_js_1.OK)(input.data);\n }\n };\n exports3.ZodAny = ZodAny2;\n ZodAny2.create = (params) => {\n return new ZodAny2({\n typeName: ZodFirstPartyTypeKind2.ZodAny,\n ...processCreateParams2(params)\n });\n };\n var ZodUnknown2 = class extends ZodType2 {\n constructor() {\n super(...arguments);\n this._unknown = true;\n }\n _parse(input) {\n return (0, parseUtil_js_1.OK)(input.data);\n }\n };\n exports3.ZodUnknown = ZodUnknown2;\n ZodUnknown2.create = (params) => {\n return new ZodUnknown2({\n typeName: ZodFirstPartyTypeKind2.ZodUnknown,\n ...processCreateParams2(params)\n });\n };\n var ZodNever2 = class extends ZodType2 {\n _parse(input) {\n const ctx = this._getOrReturnCtx(input);\n (0, parseUtil_js_1.addIssueToContext)(ctx, {\n code: ZodError_js_1.ZodIssueCode.invalid_type,\n expected: util_js_1.ZodParsedType.never,\n received: ctx.parsedType\n });\n return parseUtil_js_1.INVALID;\n }\n };\n exports3.ZodNever = ZodNever2;\n ZodNever2.create = (params) => {\n return new ZodNever2({\n typeName: ZodFirstPartyTypeKind2.ZodNever,\n ...processCreateParams2(params)\n });\n };\n var ZodVoid2 = class extends ZodType2 {\n _parse(input) {\n const parsedType = this._getType(input);\n if (parsedType !== util_js_1.ZodParsedType.undefined) {\n const ctx = this._getOrReturnCtx(input);\n (0, parseUtil_js_1.addIssueToContext)(ctx, {\n code: ZodError_js_1.ZodIssueCode.invalid_type,\n expected: util_js_1.ZodParsedType.void,\n received: ctx.parsedType\n });\n return parseUtil_js_1.INVALID;\n }\n return (0, parseUtil_js_1.OK)(input.data);\n }\n };\n exports3.ZodVoid = ZodVoid2;\n ZodVoid2.create = (params) => {\n return new ZodVoid2({\n typeName: ZodFirstPartyTypeKind2.ZodVoid,\n ...processCreateParams2(params)\n });\n };\n var ZodArray2 = class _ZodArray extends ZodType2 {\n _parse(input) {\n const { ctx, status } = this._processInputParams(input);\n const def = this._def;\n if (ctx.parsedType !== util_js_1.ZodParsedType.array) {\n (0, parseUtil_js_1.addIssueToContext)(ctx, {\n code: ZodError_js_1.ZodIssueCode.invalid_type,\n expected: util_js_1.ZodParsedType.array,\n received: ctx.parsedType\n });\n return parseUtil_js_1.INVALID;\n }\n if (def.exactLength !== null) {\n const tooBig = ctx.data.length > def.exactLength.value;\n const tooSmall = ctx.data.length < def.exactLength.value;\n if (tooBig || tooSmall) {\n (0, parseUtil_js_1.addIssueToContext)(ctx, {\n code: tooBig ? ZodError_js_1.ZodIssueCode.too_big : ZodError_js_1.ZodIssueCode.too_small,\n minimum: tooSmall ? def.exactLength.value : void 0,\n maximum: tooBig ? def.exactLength.value : void 0,\n type: \"array\",\n inclusive: true,\n exact: true,\n message: def.exactLength.message\n });\n status.dirty();\n }\n }\n if (def.minLength !== null) {\n if (ctx.data.length < def.minLength.value) {\n (0, parseUtil_js_1.addIssueToContext)(ctx, {\n code: ZodError_js_1.ZodIssueCode.too_small,\n minimum: def.minLength.value,\n type: \"array\",\n inclusive: true,\n exact: false,\n message: def.minLength.message\n });\n status.dirty();\n }\n }\n if (def.maxLength !== null) {\n if (ctx.data.length > def.maxLength.value) {\n (0, parseUtil_js_1.addIssueToContext)(ctx, {\n code: ZodError_js_1.ZodIssueCode.too_big,\n maximum: def.maxLength.value,\n type: \"array\",\n inclusive: true,\n exact: false,\n message: def.maxLength.message\n });\n status.dirty();\n }\n }\n if (ctx.common.async) {\n return Promise.all([...ctx.data].map((item, i3) => {\n return def.type._parseAsync(new ParseInputLazyPath2(ctx, item, ctx.path, i3));\n })).then((result2) => {\n return parseUtil_js_1.ParseStatus.mergeArray(status, result2);\n });\n }\n const result = [...ctx.data].map((item, i3) => {\n return def.type._parseSync(new ParseInputLazyPath2(ctx, item, ctx.path, i3));\n });\n return parseUtil_js_1.ParseStatus.mergeArray(status, result);\n }\n get element() {\n return this._def.type;\n }\n min(minLength2, message) {\n return new _ZodArray({\n ...this._def,\n minLength: { value: minLength2, message: errorUtil_js_1.errorUtil.toString(message) }\n });\n }\n max(maxLength, message) {\n return new _ZodArray({\n ...this._def,\n maxLength: { value: maxLength, message: errorUtil_js_1.errorUtil.toString(message) }\n });\n }\n length(len, message) {\n return new _ZodArray({\n ...this._def,\n exactLength: { value: len, message: errorUtil_js_1.errorUtil.toString(message) }\n });\n }\n nonempty(message) {\n return this.min(1, message);\n }\n };\n exports3.ZodArray = ZodArray2;\n ZodArray2.create = (schema, params) => {\n return new ZodArray2({\n type: schema,\n minLength: null,\n maxLength: null,\n exactLength: null,\n typeName: ZodFirstPartyTypeKind2.ZodArray,\n ...processCreateParams2(params)\n });\n };\n function deepPartialify2(schema) {\n if (schema instanceof ZodObject2) {\n const newShape = {};\n for (const key in schema.shape) {\n const fieldSchema = schema.shape[key];\n newShape[key] = ZodOptional2.create(deepPartialify2(fieldSchema));\n }\n return new ZodObject2({\n ...schema._def,\n shape: () => newShape\n });\n } else if (schema instanceof ZodArray2) {\n return new ZodArray2({\n ...schema._def,\n type: deepPartialify2(schema.element)\n });\n } else if (schema instanceof ZodOptional2) {\n return ZodOptional2.create(deepPartialify2(schema.unwrap()));\n } else if (schema instanceof ZodNullable2) {\n return ZodNullable2.create(deepPartialify2(schema.unwrap()));\n } else if (schema instanceof ZodTuple2) {\n return ZodTuple2.create(schema.items.map((item) => deepPartialify2(item)));\n } else {\n return schema;\n }\n }\n var ZodObject2 = class _ZodObject extends ZodType2 {\n constructor() {\n super(...arguments);\n this._cached = null;\n this.nonstrict = this.passthrough;\n this.augment = this.extend;\n }\n _getCached() {\n if (this._cached !== null)\n return this._cached;\n const shape3 = this._def.shape();\n const keys = util_js_1.util.objectKeys(shape3);\n this._cached = { shape: shape3, keys };\n return this._cached;\n }\n _parse(input) {\n const parsedType = this._getType(input);\n if (parsedType !== util_js_1.ZodParsedType.object) {\n const ctx2 = this._getOrReturnCtx(input);\n (0, parseUtil_js_1.addIssueToContext)(ctx2, {\n code: ZodError_js_1.ZodIssueCode.invalid_type,\n expected: util_js_1.ZodParsedType.object,\n received: ctx2.parsedType\n });\n return parseUtil_js_1.INVALID;\n }\n const { status, ctx } = this._processInputParams(input);\n const { shape: shape3, keys: shapeKeys } = this._getCached();\n const extraKeys = [];\n if (!(this._def.catchall instanceof ZodNever2 && this._def.unknownKeys === \"strip\")) {\n for (const key in ctx.data) {\n if (!shapeKeys.includes(key)) {\n extraKeys.push(key);\n }\n }\n }\n const pairs = [];\n for (const key of shapeKeys) {\n const keyValidator = shape3[key];\n const value = ctx.data[key];\n pairs.push({\n key: { status: \"valid\", value: key },\n value: keyValidator._parse(new ParseInputLazyPath2(ctx, value, ctx.path, key)),\n alwaysSet: key in ctx.data\n });\n }\n if (this._def.catchall instanceof ZodNever2) {\n const unknownKeys = this._def.unknownKeys;\n if (unknownKeys === \"passthrough\") {\n for (const key of extraKeys) {\n pairs.push({\n key: { status: \"valid\", value: key },\n value: { status: \"valid\", value: ctx.data[key] }\n });\n }\n } else if (unknownKeys === \"strict\") {\n if (extraKeys.length > 0) {\n (0, parseUtil_js_1.addIssueToContext)(ctx, {\n code: ZodError_js_1.ZodIssueCode.unrecognized_keys,\n keys: extraKeys\n });\n status.dirty();\n }\n } else if (unknownKeys === \"strip\") {\n } else {\n throw new Error(`Internal ZodObject error: invalid unknownKeys value.`);\n }\n } else {\n const catchall = this._def.catchall;\n for (const key of extraKeys) {\n const value = ctx.data[key];\n pairs.push({\n key: { status: \"valid\", value: key },\n value: catchall._parse(\n new ParseInputLazyPath2(ctx, value, ctx.path, key)\n //, ctx.child(key), value, getParsedType(value)\n ),\n alwaysSet: key in ctx.data\n });\n }\n }\n if (ctx.common.async) {\n return Promise.resolve().then(async () => {\n const syncPairs = [];\n for (const pair of pairs) {\n const key = await pair.key;\n const value = await pair.value;\n syncPairs.push({\n key,\n value,\n alwaysSet: pair.alwaysSet\n });\n }\n return syncPairs;\n }).then((syncPairs) => {\n return parseUtil_js_1.ParseStatus.mergeObjectSync(status, syncPairs);\n });\n } else {\n return parseUtil_js_1.ParseStatus.mergeObjectSync(status, pairs);\n }\n }\n get shape() {\n return this._def.shape();\n }\n strict(message) {\n errorUtil_js_1.errorUtil.errToObj;\n return new _ZodObject({\n ...this._def,\n unknownKeys: \"strict\",\n ...message !== void 0 ? {\n errorMap: (issue, ctx) => {\n const defaultError = this._def.errorMap?.(issue, ctx).message ?? ctx.defaultError;\n if (issue.code === \"unrecognized_keys\")\n return {\n message: errorUtil_js_1.errorUtil.errToObj(message).message ?? defaultError\n };\n return {\n message: defaultError\n };\n }\n } : {}\n });\n }\n strip() {\n return new _ZodObject({\n ...this._def,\n unknownKeys: \"strip\"\n });\n }\n passthrough() {\n return new _ZodObject({\n ...this._def,\n unknownKeys: \"passthrough\"\n });\n }\n // const AugmentFactory =\n // (def: Def) =>\n // (\n // augmentation: Augmentation\n // ): ZodObject<\n // extendShape, Augmentation>,\n // Def[\"unknownKeys\"],\n // Def[\"catchall\"]\n // > => {\n // return new ZodObject({\n // ...def,\n // shape: () => ({\n // ...def.shape(),\n // ...augmentation,\n // }),\n // }) as any;\n // };\n extend(augmentation) {\n return new _ZodObject({\n ...this._def,\n shape: () => ({\n ...this._def.shape(),\n ...augmentation\n })\n });\n }\n /**\n * Prior to zod@1.0.12 there was a bug in the\n * inferred type of merged objects. Please\n * upgrade if you are experiencing issues.\n */\n merge(merging) {\n const merged = new _ZodObject({\n unknownKeys: merging._def.unknownKeys,\n catchall: merging._def.catchall,\n shape: () => ({\n ...this._def.shape(),\n ...merging._def.shape()\n }),\n typeName: ZodFirstPartyTypeKind2.ZodObject\n });\n return merged;\n }\n // merge<\n // Incoming extends AnyZodObject,\n // Augmentation extends Incoming[\"shape\"],\n // NewOutput extends {\n // [k in keyof Augmentation | keyof Output]: k extends keyof Augmentation\n // ? Augmentation[k][\"_output\"]\n // : k extends keyof Output\n // ? Output[k]\n // : never;\n // },\n // NewInput extends {\n // [k in keyof Augmentation | keyof Input]: k extends keyof Augmentation\n // ? Augmentation[k][\"_input\"]\n // : k extends keyof Input\n // ? Input[k]\n // : never;\n // }\n // >(\n // merging: Incoming\n // ): ZodObject<\n // extendShape>,\n // Incoming[\"_def\"][\"unknownKeys\"],\n // Incoming[\"_def\"][\"catchall\"],\n // NewOutput,\n // NewInput\n // > {\n // const merged: any = new ZodObject({\n // unknownKeys: merging._def.unknownKeys,\n // catchall: merging._def.catchall,\n // shape: () =>\n // objectUtil.mergeShapes(this._def.shape(), merging._def.shape()),\n // typeName: ZodFirstPartyTypeKind.ZodObject,\n // }) as any;\n // return merged;\n // }\n setKey(key, schema) {\n return this.augment({ [key]: schema });\n }\n // merge(\n // merging: Incoming\n // ): //ZodObject = (merging) => {\n // ZodObject<\n // extendShape>,\n // Incoming[\"_def\"][\"unknownKeys\"],\n // Incoming[\"_def\"][\"catchall\"]\n // > {\n // // const mergedShape = objectUtil.mergeShapes(\n // // this._def.shape(),\n // // merging._def.shape()\n // // );\n // const merged: any = new ZodObject({\n // unknownKeys: merging._def.unknownKeys,\n // catchall: merging._def.catchall,\n // shape: () =>\n // objectUtil.mergeShapes(this._def.shape(), merging._def.shape()),\n // typeName: ZodFirstPartyTypeKind.ZodObject,\n // }) as any;\n // return merged;\n // }\n catchall(index2) {\n return new _ZodObject({\n ...this._def,\n catchall: index2\n });\n }\n pick(mask) {\n const shape3 = {};\n for (const key of util_js_1.util.objectKeys(mask)) {\n if (mask[key] && this.shape[key]) {\n shape3[key] = this.shape[key];\n }\n }\n return new _ZodObject({\n ...this._def,\n shape: () => shape3\n });\n }\n omit(mask) {\n const shape3 = {};\n for (const key of util_js_1.util.objectKeys(this.shape)) {\n if (!mask[key]) {\n shape3[key] = this.shape[key];\n }\n }\n return new _ZodObject({\n ...this._def,\n shape: () => shape3\n });\n }\n /**\n * @deprecated\n */\n deepPartial() {\n return deepPartialify2(this);\n }\n partial(mask) {\n const newShape = {};\n for (const key of util_js_1.util.objectKeys(this.shape)) {\n const fieldSchema = this.shape[key];\n if (mask && !mask[key]) {\n newShape[key] = fieldSchema;\n } else {\n newShape[key] = fieldSchema.optional();\n }\n }\n return new _ZodObject({\n ...this._def,\n shape: () => newShape\n });\n }\n required(mask) {\n const newShape = {};\n for (const key of util_js_1.util.objectKeys(this.shape)) {\n if (mask && !mask[key]) {\n newShape[key] = this.shape[key];\n } else {\n const fieldSchema = this.shape[key];\n let newField = fieldSchema;\n while (newField instanceof ZodOptional2) {\n newField = newField._def.innerType;\n }\n newShape[key] = newField;\n }\n }\n return new _ZodObject({\n ...this._def,\n shape: () => newShape\n });\n }\n keyof() {\n return createZodEnum2(util_js_1.util.objectKeys(this.shape));\n }\n };\n exports3.ZodObject = ZodObject2;\n ZodObject2.create = (shape3, params) => {\n return new ZodObject2({\n shape: () => shape3,\n unknownKeys: \"strip\",\n catchall: ZodNever2.create(),\n typeName: ZodFirstPartyTypeKind2.ZodObject,\n ...processCreateParams2(params)\n });\n };\n ZodObject2.strictCreate = (shape3, params) => {\n return new ZodObject2({\n shape: () => shape3,\n unknownKeys: \"strict\",\n catchall: ZodNever2.create(),\n typeName: ZodFirstPartyTypeKind2.ZodObject,\n ...processCreateParams2(params)\n });\n };\n ZodObject2.lazycreate = (shape3, params) => {\n return new ZodObject2({\n shape: shape3,\n unknownKeys: \"strip\",\n catchall: ZodNever2.create(),\n typeName: ZodFirstPartyTypeKind2.ZodObject,\n ...processCreateParams2(params)\n });\n };\n var ZodUnion2 = class extends ZodType2 {\n _parse(input) {\n const { ctx } = this._processInputParams(input);\n const options = this._def.options;\n function handleResults(results) {\n for (const result of results) {\n if (result.result.status === \"valid\") {\n return result.result;\n }\n }\n for (const result of results) {\n if (result.result.status === \"dirty\") {\n ctx.common.issues.push(...result.ctx.common.issues);\n return result.result;\n }\n }\n const unionErrors = results.map((result) => new ZodError_js_1.ZodError(result.ctx.common.issues));\n (0, parseUtil_js_1.addIssueToContext)(ctx, {\n code: ZodError_js_1.ZodIssueCode.invalid_union,\n unionErrors\n });\n return parseUtil_js_1.INVALID;\n }\n if (ctx.common.async) {\n return Promise.all(options.map(async (option) => {\n const childCtx = {\n ...ctx,\n common: {\n ...ctx.common,\n issues: []\n },\n parent: null\n };\n return {\n result: await option._parseAsync({\n data: ctx.data,\n path: ctx.path,\n parent: childCtx\n }),\n ctx: childCtx\n };\n })).then(handleResults);\n } else {\n let dirty = void 0;\n const issues = [];\n for (const option of options) {\n const childCtx = {\n ...ctx,\n common: {\n ...ctx.common,\n issues: []\n },\n parent: null\n };\n const result = option._parseSync({\n data: ctx.data,\n path: ctx.path,\n parent: childCtx\n });\n if (result.status === \"valid\") {\n return result;\n } else if (result.status === \"dirty\" && !dirty) {\n dirty = { result, ctx: childCtx };\n }\n if (childCtx.common.issues.length) {\n issues.push(childCtx.common.issues);\n }\n }\n if (dirty) {\n ctx.common.issues.push(...dirty.ctx.common.issues);\n return dirty.result;\n }\n const unionErrors = issues.map((issues2) => new ZodError_js_1.ZodError(issues2));\n (0, parseUtil_js_1.addIssueToContext)(ctx, {\n code: ZodError_js_1.ZodIssueCode.invalid_union,\n unionErrors\n });\n return parseUtil_js_1.INVALID;\n }\n }\n get options() {\n return this._def.options;\n }\n };\n exports3.ZodUnion = ZodUnion2;\n ZodUnion2.create = (types, params) => {\n return new ZodUnion2({\n options: types,\n typeName: ZodFirstPartyTypeKind2.ZodUnion,\n ...processCreateParams2(params)\n });\n };\n var getDiscriminator2 = (type) => {\n if (type instanceof ZodLazy2) {\n return getDiscriminator2(type.schema);\n } else if (type instanceof ZodEffects2) {\n return getDiscriminator2(type.innerType());\n } else if (type instanceof ZodLiteral2) {\n return [type.value];\n } else if (type instanceof ZodEnum2) {\n return type.options;\n } else if (type instanceof ZodNativeEnum2) {\n return util_js_1.util.objectValues(type.enum);\n } else if (type instanceof ZodDefault2) {\n return getDiscriminator2(type._def.innerType);\n } else if (type instanceof ZodUndefined2) {\n return [void 0];\n } else if (type instanceof ZodNull2) {\n return [null];\n } else if (type instanceof ZodOptional2) {\n return [void 0, ...getDiscriminator2(type.unwrap())];\n } else if (type instanceof ZodNullable2) {\n return [null, ...getDiscriminator2(type.unwrap())];\n } else if (type instanceof ZodBranded2) {\n return getDiscriminator2(type.unwrap());\n } else if (type instanceof ZodReadonly2) {\n return getDiscriminator2(type.unwrap());\n } else if (type instanceof ZodCatch2) {\n return getDiscriminator2(type._def.innerType);\n } else {\n return [];\n }\n };\n var ZodDiscriminatedUnion2 = class _ZodDiscriminatedUnion extends ZodType2 {\n _parse(input) {\n const { ctx } = this._processInputParams(input);\n if (ctx.parsedType !== util_js_1.ZodParsedType.object) {\n (0, parseUtil_js_1.addIssueToContext)(ctx, {\n code: ZodError_js_1.ZodIssueCode.invalid_type,\n expected: util_js_1.ZodParsedType.object,\n received: ctx.parsedType\n });\n return parseUtil_js_1.INVALID;\n }\n const discriminator = this.discriminator;\n const discriminatorValue = ctx.data[discriminator];\n const option = this.optionsMap.get(discriminatorValue);\n if (!option) {\n (0, parseUtil_js_1.addIssueToContext)(ctx, {\n code: ZodError_js_1.ZodIssueCode.invalid_union_discriminator,\n options: Array.from(this.optionsMap.keys()),\n path: [discriminator]\n });\n return parseUtil_js_1.INVALID;\n }\n if (ctx.common.async) {\n return option._parseAsync({\n data: ctx.data,\n path: ctx.path,\n parent: ctx\n });\n } else {\n return option._parseSync({\n data: ctx.data,\n path: ctx.path,\n parent: ctx\n });\n }\n }\n get discriminator() {\n return this._def.discriminator;\n }\n get options() {\n return this._def.options;\n }\n get optionsMap() {\n return this._def.optionsMap;\n }\n /**\n * The constructor of the discriminated union schema. Its behaviour is very similar to that of the normal z.union() constructor.\n * However, it only allows a union of objects, all of which need to share a discriminator property. This property must\n * have a different value for each object in the union.\n * @param discriminator the name of the discriminator property\n * @param types an array of object schemas\n * @param params\n */\n static create(discriminator, options, params) {\n const optionsMap = /* @__PURE__ */ new Map();\n for (const type of options) {\n const discriminatorValues = getDiscriminator2(type.shape[discriminator]);\n if (!discriminatorValues.length) {\n throw new Error(`A discriminator value for key \\`${discriminator}\\` could not be extracted from all schema options`);\n }\n for (const value of discriminatorValues) {\n if (optionsMap.has(value)) {\n throw new Error(`Discriminator property ${String(discriminator)} has duplicate value ${String(value)}`);\n }\n optionsMap.set(value, type);\n }\n }\n return new _ZodDiscriminatedUnion({\n typeName: ZodFirstPartyTypeKind2.ZodDiscriminatedUnion,\n discriminator,\n options,\n optionsMap,\n ...processCreateParams2(params)\n });\n }\n };\n exports3.ZodDiscriminatedUnion = ZodDiscriminatedUnion2;\n function mergeValues2(a3, b4) {\n const aType = (0, util_js_1.getParsedType)(a3);\n const bType = (0, util_js_1.getParsedType)(b4);\n if (a3 === b4) {\n return { valid: true, data: a3 };\n } else if (aType === util_js_1.ZodParsedType.object && bType === util_js_1.ZodParsedType.object) {\n const bKeys = util_js_1.util.objectKeys(b4);\n const sharedKeys = util_js_1.util.objectKeys(a3).filter((key) => bKeys.indexOf(key) !== -1);\n const newObj = { ...a3, ...b4 };\n for (const key of sharedKeys) {\n const sharedValue = mergeValues2(a3[key], b4[key]);\n if (!sharedValue.valid) {\n return { valid: false };\n }\n newObj[key] = sharedValue.data;\n }\n return { valid: true, data: newObj };\n } else if (aType === util_js_1.ZodParsedType.array && bType === util_js_1.ZodParsedType.array) {\n if (a3.length !== b4.length) {\n return { valid: false };\n }\n const newArray = [];\n for (let index2 = 0; index2 < a3.length; index2++) {\n const itemA = a3[index2];\n const itemB = b4[index2];\n const sharedValue = mergeValues2(itemA, itemB);\n if (!sharedValue.valid) {\n return { valid: false };\n }\n newArray.push(sharedValue.data);\n }\n return { valid: true, data: newArray };\n } else if (aType === util_js_1.ZodParsedType.date && bType === util_js_1.ZodParsedType.date && +a3 === +b4) {\n return { valid: true, data: a3 };\n } else {\n return { valid: false };\n }\n }\n var ZodIntersection2 = class extends ZodType2 {\n _parse(input) {\n const { status, ctx } = this._processInputParams(input);\n const handleParsed = (parsedLeft, parsedRight) => {\n if ((0, parseUtil_js_1.isAborted)(parsedLeft) || (0, parseUtil_js_1.isAborted)(parsedRight)) {\n return parseUtil_js_1.INVALID;\n }\n const merged = mergeValues2(parsedLeft.value, parsedRight.value);\n if (!merged.valid) {\n (0, parseUtil_js_1.addIssueToContext)(ctx, {\n code: ZodError_js_1.ZodIssueCode.invalid_intersection_types\n });\n return parseUtil_js_1.INVALID;\n }\n if ((0, parseUtil_js_1.isDirty)(parsedLeft) || (0, parseUtil_js_1.isDirty)(parsedRight)) {\n status.dirty();\n }\n return { status: status.value, value: merged.data };\n };\n if (ctx.common.async) {\n return Promise.all([\n this._def.left._parseAsync({\n data: ctx.data,\n path: ctx.path,\n parent: ctx\n }),\n this._def.right._parseAsync({\n data: ctx.data,\n path: ctx.path,\n parent: ctx\n })\n ]).then(([left, right]) => handleParsed(left, right));\n } else {\n return handleParsed(this._def.left._parseSync({\n data: ctx.data,\n path: ctx.path,\n parent: ctx\n }), this._def.right._parseSync({\n data: ctx.data,\n path: ctx.path,\n parent: ctx\n }));\n }\n }\n };\n exports3.ZodIntersection = ZodIntersection2;\n ZodIntersection2.create = (left, right, params) => {\n return new ZodIntersection2({\n left,\n right,\n typeName: ZodFirstPartyTypeKind2.ZodIntersection,\n ...processCreateParams2(params)\n });\n };\n var ZodTuple2 = class _ZodTuple extends ZodType2 {\n _parse(input) {\n const { status, ctx } = this._processInputParams(input);\n if (ctx.parsedType !== util_js_1.ZodParsedType.array) {\n (0, parseUtil_js_1.addIssueToContext)(ctx, {\n code: ZodError_js_1.ZodIssueCode.invalid_type,\n expected: util_js_1.ZodParsedType.array,\n received: ctx.parsedType\n });\n return parseUtil_js_1.INVALID;\n }\n if (ctx.data.length < this._def.items.length) {\n (0, parseUtil_js_1.addIssueToContext)(ctx, {\n code: ZodError_js_1.ZodIssueCode.too_small,\n minimum: this._def.items.length,\n inclusive: true,\n exact: false,\n type: \"array\"\n });\n return parseUtil_js_1.INVALID;\n }\n const rest = this._def.rest;\n if (!rest && ctx.data.length > this._def.items.length) {\n (0, parseUtil_js_1.addIssueToContext)(ctx, {\n code: ZodError_js_1.ZodIssueCode.too_big,\n maximum: this._def.items.length,\n inclusive: true,\n exact: false,\n type: \"array\"\n });\n status.dirty();\n }\n const items = [...ctx.data].map((item, itemIndex) => {\n const schema = this._def.items[itemIndex] || this._def.rest;\n if (!schema)\n return null;\n return schema._parse(new ParseInputLazyPath2(ctx, item, ctx.path, itemIndex));\n }).filter((x4) => !!x4);\n if (ctx.common.async) {\n return Promise.all(items).then((results) => {\n return parseUtil_js_1.ParseStatus.mergeArray(status, results);\n });\n } else {\n return parseUtil_js_1.ParseStatus.mergeArray(status, items);\n }\n }\n get items() {\n return this._def.items;\n }\n rest(rest) {\n return new _ZodTuple({\n ...this._def,\n rest\n });\n }\n };\n exports3.ZodTuple = ZodTuple2;\n ZodTuple2.create = (schemas, params) => {\n if (!Array.isArray(schemas)) {\n throw new Error(\"You must pass an array of schemas to z.tuple([ ... ])\");\n }\n return new ZodTuple2({\n items: schemas,\n typeName: ZodFirstPartyTypeKind2.ZodTuple,\n rest: null,\n ...processCreateParams2(params)\n });\n };\n var ZodRecord2 = class _ZodRecord extends ZodType2 {\n get keySchema() {\n return this._def.keyType;\n }\n get valueSchema() {\n return this._def.valueType;\n }\n _parse(input) {\n const { status, ctx } = this._processInputParams(input);\n if (ctx.parsedType !== util_js_1.ZodParsedType.object) {\n (0, parseUtil_js_1.addIssueToContext)(ctx, {\n code: ZodError_js_1.ZodIssueCode.invalid_type,\n expected: util_js_1.ZodParsedType.object,\n received: ctx.parsedType\n });\n return parseUtil_js_1.INVALID;\n }\n const pairs = [];\n const keyType = this._def.keyType;\n const valueType = this._def.valueType;\n for (const key in ctx.data) {\n pairs.push({\n key: keyType._parse(new ParseInputLazyPath2(ctx, key, ctx.path, key)),\n value: valueType._parse(new ParseInputLazyPath2(ctx, ctx.data[key], ctx.path, key)),\n alwaysSet: key in ctx.data\n });\n }\n if (ctx.common.async) {\n return parseUtil_js_1.ParseStatus.mergeObjectAsync(status, pairs);\n } else {\n return parseUtil_js_1.ParseStatus.mergeObjectSync(status, pairs);\n }\n }\n get element() {\n return this._def.valueType;\n }\n static create(first, second, third) {\n if (second instanceof ZodType2) {\n return new _ZodRecord({\n keyType: first,\n valueType: second,\n typeName: ZodFirstPartyTypeKind2.ZodRecord,\n ...processCreateParams2(third)\n });\n }\n return new _ZodRecord({\n keyType: ZodString2.create(),\n valueType: first,\n typeName: ZodFirstPartyTypeKind2.ZodRecord,\n ...processCreateParams2(second)\n });\n }\n };\n exports3.ZodRecord = ZodRecord2;\n var ZodMap2 = class extends ZodType2 {\n get keySchema() {\n return this._def.keyType;\n }\n get valueSchema() {\n return this._def.valueType;\n }\n _parse(input) {\n const { status, ctx } = this._processInputParams(input);\n if (ctx.parsedType !== util_js_1.ZodParsedType.map) {\n (0, parseUtil_js_1.addIssueToContext)(ctx, {\n code: ZodError_js_1.ZodIssueCode.invalid_type,\n expected: util_js_1.ZodParsedType.map,\n received: ctx.parsedType\n });\n return parseUtil_js_1.INVALID;\n }\n const keyType = this._def.keyType;\n const valueType = this._def.valueType;\n const pairs = [...ctx.data.entries()].map(([key, value], index2) => {\n return {\n key: keyType._parse(new ParseInputLazyPath2(ctx, key, ctx.path, [index2, \"key\"])),\n value: valueType._parse(new ParseInputLazyPath2(ctx, value, ctx.path, [index2, \"value\"]))\n };\n });\n if (ctx.common.async) {\n const finalMap = /* @__PURE__ */ new Map();\n return Promise.resolve().then(async () => {\n for (const pair of pairs) {\n const key = await pair.key;\n const value = await pair.value;\n if (key.status === \"aborted\" || value.status === \"aborted\") {\n return parseUtil_js_1.INVALID;\n }\n if (key.status === \"dirty\" || value.status === \"dirty\") {\n status.dirty();\n }\n finalMap.set(key.value, value.value);\n }\n return { status: status.value, value: finalMap };\n });\n } else {\n const finalMap = /* @__PURE__ */ new Map();\n for (const pair of pairs) {\n const key = pair.key;\n const value = pair.value;\n if (key.status === \"aborted\" || value.status === \"aborted\") {\n return parseUtil_js_1.INVALID;\n }\n if (key.status === \"dirty\" || value.status === \"dirty\") {\n status.dirty();\n }\n finalMap.set(key.value, value.value);\n }\n return { status: status.value, value: finalMap };\n }\n }\n };\n exports3.ZodMap = ZodMap2;\n ZodMap2.create = (keyType, valueType, params) => {\n return new ZodMap2({\n valueType,\n keyType,\n typeName: ZodFirstPartyTypeKind2.ZodMap,\n ...processCreateParams2(params)\n });\n };\n var ZodSet2 = class _ZodSet extends ZodType2 {\n _parse(input) {\n const { status, ctx } = this._processInputParams(input);\n if (ctx.parsedType !== util_js_1.ZodParsedType.set) {\n (0, parseUtil_js_1.addIssueToContext)(ctx, {\n code: ZodError_js_1.ZodIssueCode.invalid_type,\n expected: util_js_1.ZodParsedType.set,\n received: ctx.parsedType\n });\n return parseUtil_js_1.INVALID;\n }\n const def = this._def;\n if (def.minSize !== null) {\n if (ctx.data.size < def.minSize.value) {\n (0, parseUtil_js_1.addIssueToContext)(ctx, {\n code: ZodError_js_1.ZodIssueCode.too_small,\n minimum: def.minSize.value,\n type: \"set\",\n inclusive: true,\n exact: false,\n message: def.minSize.message\n });\n status.dirty();\n }\n }\n if (def.maxSize !== null) {\n if (ctx.data.size > def.maxSize.value) {\n (0, parseUtil_js_1.addIssueToContext)(ctx, {\n code: ZodError_js_1.ZodIssueCode.too_big,\n maximum: def.maxSize.value,\n type: \"set\",\n inclusive: true,\n exact: false,\n message: def.maxSize.message\n });\n status.dirty();\n }\n }\n const valueType = this._def.valueType;\n function finalizeSet(elements2) {\n const parsedSet = /* @__PURE__ */ new Set();\n for (const element of elements2) {\n if (element.status === \"aborted\")\n return parseUtil_js_1.INVALID;\n if (element.status === \"dirty\")\n status.dirty();\n parsedSet.add(element.value);\n }\n return { status: status.value, value: parsedSet };\n }\n const elements = [...ctx.data.values()].map((item, i3) => valueType._parse(new ParseInputLazyPath2(ctx, item, ctx.path, i3)));\n if (ctx.common.async) {\n return Promise.all(elements).then((elements2) => finalizeSet(elements2));\n } else {\n return finalizeSet(elements);\n }\n }\n min(minSize, message) {\n return new _ZodSet({\n ...this._def,\n minSize: { value: minSize, message: errorUtil_js_1.errorUtil.toString(message) }\n });\n }\n max(maxSize, message) {\n return new _ZodSet({\n ...this._def,\n maxSize: { value: maxSize, message: errorUtil_js_1.errorUtil.toString(message) }\n });\n }\n size(size6, message) {\n return this.min(size6, message).max(size6, message);\n }\n nonempty(message) {\n return this.min(1, message);\n }\n };\n exports3.ZodSet = ZodSet2;\n ZodSet2.create = (valueType, params) => {\n return new ZodSet2({\n valueType,\n minSize: null,\n maxSize: null,\n typeName: ZodFirstPartyTypeKind2.ZodSet,\n ...processCreateParams2(params)\n });\n };\n var ZodFunction2 = class _ZodFunction extends ZodType2 {\n constructor() {\n super(...arguments);\n this.validate = this.implement;\n }\n _parse(input) {\n const { ctx } = this._processInputParams(input);\n if (ctx.parsedType !== util_js_1.ZodParsedType.function) {\n (0, parseUtil_js_1.addIssueToContext)(ctx, {\n code: ZodError_js_1.ZodIssueCode.invalid_type,\n expected: util_js_1.ZodParsedType.function,\n received: ctx.parsedType\n });\n return parseUtil_js_1.INVALID;\n }\n function makeArgsIssue(args, error) {\n return (0, parseUtil_js_1.makeIssue)({\n data: args,\n path: ctx.path,\n errorMaps: [ctx.common.contextualErrorMap, ctx.schemaErrorMap, (0, errors_js_1.getErrorMap)(), errors_js_1.defaultErrorMap].filter((x4) => !!x4),\n issueData: {\n code: ZodError_js_1.ZodIssueCode.invalid_arguments,\n argumentsError: error\n }\n });\n }\n function makeReturnsIssue(returns, error) {\n return (0, parseUtil_js_1.makeIssue)({\n data: returns,\n path: ctx.path,\n errorMaps: [ctx.common.contextualErrorMap, ctx.schemaErrorMap, (0, errors_js_1.getErrorMap)(), errors_js_1.defaultErrorMap].filter((x4) => !!x4),\n issueData: {\n code: ZodError_js_1.ZodIssueCode.invalid_return_type,\n returnTypeError: error\n }\n });\n }\n const params = { errorMap: ctx.common.contextualErrorMap };\n const fn = ctx.data;\n if (this._def.returns instanceof ZodPromise2) {\n const me = this;\n return (0, parseUtil_js_1.OK)(async function(...args) {\n const error = new ZodError_js_1.ZodError([]);\n const parsedArgs = await me._def.args.parseAsync(args, params).catch((e3) => {\n error.addIssue(makeArgsIssue(args, e3));\n throw error;\n });\n const result = await Reflect.apply(fn, this, parsedArgs);\n const parsedReturns = await me._def.returns._def.type.parseAsync(result, params).catch((e3) => {\n error.addIssue(makeReturnsIssue(result, e3));\n throw error;\n });\n return parsedReturns;\n });\n } else {\n const me = this;\n return (0, parseUtil_js_1.OK)(function(...args) {\n const parsedArgs = me._def.args.safeParse(args, params);\n if (!parsedArgs.success) {\n throw new ZodError_js_1.ZodError([makeArgsIssue(args, parsedArgs.error)]);\n }\n const result = Reflect.apply(fn, this, parsedArgs.data);\n const parsedReturns = me._def.returns.safeParse(result, params);\n if (!parsedReturns.success) {\n throw new ZodError_js_1.ZodError([makeReturnsIssue(result, parsedReturns.error)]);\n }\n return parsedReturns.data;\n });\n }\n }\n parameters() {\n return this._def.args;\n }\n returnType() {\n return this._def.returns;\n }\n args(...items) {\n return new _ZodFunction({\n ...this._def,\n args: ZodTuple2.create(items).rest(ZodUnknown2.create())\n });\n }\n returns(returnType) {\n return new _ZodFunction({\n ...this._def,\n returns: returnType\n });\n }\n implement(func) {\n const validatedFunc = this.parse(func);\n return validatedFunc;\n }\n strictImplement(func) {\n const validatedFunc = this.parse(func);\n return validatedFunc;\n }\n static create(args, returns, params) {\n return new _ZodFunction({\n args: args ? args : ZodTuple2.create([]).rest(ZodUnknown2.create()),\n returns: returns || ZodUnknown2.create(),\n typeName: ZodFirstPartyTypeKind2.ZodFunction,\n ...processCreateParams2(params)\n });\n }\n };\n exports3.ZodFunction = ZodFunction2;\n var ZodLazy2 = class extends ZodType2 {\n get schema() {\n return this._def.getter();\n }\n _parse(input) {\n const { ctx } = this._processInputParams(input);\n const lazySchema = this._def.getter();\n return lazySchema._parse({ data: ctx.data, path: ctx.path, parent: ctx });\n }\n };\n exports3.ZodLazy = ZodLazy2;\n ZodLazy2.create = (getter, params) => {\n return new ZodLazy2({\n getter,\n typeName: ZodFirstPartyTypeKind2.ZodLazy,\n ...processCreateParams2(params)\n });\n };\n var ZodLiteral2 = class extends ZodType2 {\n _parse(input) {\n if (input.data !== this._def.value) {\n const ctx = this._getOrReturnCtx(input);\n (0, parseUtil_js_1.addIssueToContext)(ctx, {\n received: ctx.data,\n code: ZodError_js_1.ZodIssueCode.invalid_literal,\n expected: this._def.value\n });\n return parseUtil_js_1.INVALID;\n }\n return { status: \"valid\", value: input.data };\n }\n get value() {\n return this._def.value;\n }\n };\n exports3.ZodLiteral = ZodLiteral2;\n ZodLiteral2.create = (value, params) => {\n return new ZodLiteral2({\n value,\n typeName: ZodFirstPartyTypeKind2.ZodLiteral,\n ...processCreateParams2(params)\n });\n };\n function createZodEnum2(values, params) {\n return new ZodEnum2({\n values,\n typeName: ZodFirstPartyTypeKind2.ZodEnum,\n ...processCreateParams2(params)\n });\n }\n var ZodEnum2 = class _ZodEnum extends ZodType2 {\n _parse(input) {\n if (typeof input.data !== \"string\") {\n const ctx = this._getOrReturnCtx(input);\n const expectedValues = this._def.values;\n (0, parseUtil_js_1.addIssueToContext)(ctx, {\n expected: util_js_1.util.joinValues(expectedValues),\n received: ctx.parsedType,\n code: ZodError_js_1.ZodIssueCode.invalid_type\n });\n return parseUtil_js_1.INVALID;\n }\n if (!this._cache) {\n this._cache = new Set(this._def.values);\n }\n if (!this._cache.has(input.data)) {\n const ctx = this._getOrReturnCtx(input);\n const expectedValues = this._def.values;\n (0, parseUtil_js_1.addIssueToContext)(ctx, {\n received: ctx.data,\n code: ZodError_js_1.ZodIssueCode.invalid_enum_value,\n options: expectedValues\n });\n return parseUtil_js_1.INVALID;\n }\n return (0, parseUtil_js_1.OK)(input.data);\n }\n get options() {\n return this._def.values;\n }\n get enum() {\n const enumValues = {};\n for (const val of this._def.values) {\n enumValues[val] = val;\n }\n return enumValues;\n }\n get Values() {\n const enumValues = {};\n for (const val of this._def.values) {\n enumValues[val] = val;\n }\n return enumValues;\n }\n get Enum() {\n const enumValues = {};\n for (const val of this._def.values) {\n enumValues[val] = val;\n }\n return enumValues;\n }\n extract(values, newDef = this._def) {\n return _ZodEnum.create(values, {\n ...this._def,\n ...newDef\n });\n }\n exclude(values, newDef = this._def) {\n return _ZodEnum.create(this.options.filter((opt) => !values.includes(opt)), {\n ...this._def,\n ...newDef\n });\n }\n };\n exports3.ZodEnum = ZodEnum2;\n ZodEnum2.create = createZodEnum2;\n var ZodNativeEnum2 = class extends ZodType2 {\n _parse(input) {\n const nativeEnumValues = util_js_1.util.getValidEnumValues(this._def.values);\n const ctx = this._getOrReturnCtx(input);\n if (ctx.parsedType !== util_js_1.ZodParsedType.string && ctx.parsedType !== util_js_1.ZodParsedType.number) {\n const expectedValues = util_js_1.util.objectValues(nativeEnumValues);\n (0, parseUtil_js_1.addIssueToContext)(ctx, {\n expected: util_js_1.util.joinValues(expectedValues),\n received: ctx.parsedType,\n code: ZodError_js_1.ZodIssueCode.invalid_type\n });\n return parseUtil_js_1.INVALID;\n }\n if (!this._cache) {\n this._cache = new Set(util_js_1.util.getValidEnumValues(this._def.values));\n }\n if (!this._cache.has(input.data)) {\n const expectedValues = util_js_1.util.objectValues(nativeEnumValues);\n (0, parseUtil_js_1.addIssueToContext)(ctx, {\n received: ctx.data,\n code: ZodError_js_1.ZodIssueCode.invalid_enum_value,\n options: expectedValues\n });\n return parseUtil_js_1.INVALID;\n }\n return (0, parseUtil_js_1.OK)(input.data);\n }\n get enum() {\n return this._def.values;\n }\n };\n exports3.ZodNativeEnum = ZodNativeEnum2;\n ZodNativeEnum2.create = (values, params) => {\n return new ZodNativeEnum2({\n values,\n typeName: ZodFirstPartyTypeKind2.ZodNativeEnum,\n ...processCreateParams2(params)\n });\n };\n var ZodPromise2 = class extends ZodType2 {\n unwrap() {\n return this._def.type;\n }\n _parse(input) {\n const { ctx } = this._processInputParams(input);\n if (ctx.parsedType !== util_js_1.ZodParsedType.promise && ctx.common.async === false) {\n (0, parseUtil_js_1.addIssueToContext)(ctx, {\n code: ZodError_js_1.ZodIssueCode.invalid_type,\n expected: util_js_1.ZodParsedType.promise,\n received: ctx.parsedType\n });\n return parseUtil_js_1.INVALID;\n }\n const promisified = ctx.parsedType === util_js_1.ZodParsedType.promise ? ctx.data : Promise.resolve(ctx.data);\n return (0, parseUtil_js_1.OK)(promisified.then((data) => {\n return this._def.type.parseAsync(data, {\n path: ctx.path,\n errorMap: ctx.common.contextualErrorMap\n });\n }));\n }\n };\n exports3.ZodPromise = ZodPromise2;\n ZodPromise2.create = (schema, params) => {\n return new ZodPromise2({\n type: schema,\n typeName: ZodFirstPartyTypeKind2.ZodPromise,\n ...processCreateParams2(params)\n });\n };\n var ZodEffects2 = class extends ZodType2 {\n innerType() {\n return this._def.schema;\n }\n sourceType() {\n return this._def.schema._def.typeName === ZodFirstPartyTypeKind2.ZodEffects ? this._def.schema.sourceType() : this._def.schema;\n }\n _parse(input) {\n const { status, ctx } = this._processInputParams(input);\n const effect = this._def.effect || null;\n const checkCtx = {\n addIssue: (arg) => {\n (0, parseUtil_js_1.addIssueToContext)(ctx, arg);\n if (arg.fatal) {\n status.abort();\n } else {\n status.dirty();\n }\n },\n get path() {\n return ctx.path;\n }\n };\n checkCtx.addIssue = checkCtx.addIssue.bind(checkCtx);\n if (effect.type === \"preprocess\") {\n const processed = effect.transform(ctx.data, checkCtx);\n if (ctx.common.async) {\n return Promise.resolve(processed).then(async (processed2) => {\n if (status.value === \"aborted\")\n return parseUtil_js_1.INVALID;\n const result = await this._def.schema._parseAsync({\n data: processed2,\n path: ctx.path,\n parent: ctx\n });\n if (result.status === \"aborted\")\n return parseUtil_js_1.INVALID;\n if (result.status === \"dirty\")\n return (0, parseUtil_js_1.DIRTY)(result.value);\n if (status.value === \"dirty\")\n return (0, parseUtil_js_1.DIRTY)(result.value);\n return result;\n });\n } else {\n if (status.value === \"aborted\")\n return parseUtil_js_1.INVALID;\n const result = this._def.schema._parseSync({\n data: processed,\n path: ctx.path,\n parent: ctx\n });\n if (result.status === \"aborted\")\n return parseUtil_js_1.INVALID;\n if (result.status === \"dirty\")\n return (0, parseUtil_js_1.DIRTY)(result.value);\n if (status.value === \"dirty\")\n return (0, parseUtil_js_1.DIRTY)(result.value);\n return result;\n }\n }\n if (effect.type === \"refinement\") {\n const executeRefinement = (acc) => {\n const result = effect.refinement(acc, checkCtx);\n if (ctx.common.async) {\n return Promise.resolve(result);\n }\n if (result instanceof Promise) {\n throw new Error(\"Async refinement encountered during synchronous parse operation. Use .parseAsync instead.\");\n }\n return acc;\n };\n if (ctx.common.async === false) {\n const inner = this._def.schema._parseSync({\n data: ctx.data,\n path: ctx.path,\n parent: ctx\n });\n if (inner.status === \"aborted\")\n return parseUtil_js_1.INVALID;\n if (inner.status === \"dirty\")\n status.dirty();\n executeRefinement(inner.value);\n return { status: status.value, value: inner.value };\n } else {\n return this._def.schema._parseAsync({ data: ctx.data, path: ctx.path, parent: ctx }).then((inner) => {\n if (inner.status === \"aborted\")\n return parseUtil_js_1.INVALID;\n if (inner.status === \"dirty\")\n status.dirty();\n return executeRefinement(inner.value).then(() => {\n return { status: status.value, value: inner.value };\n });\n });\n }\n }\n if (effect.type === \"transform\") {\n if (ctx.common.async === false) {\n const base4 = this._def.schema._parseSync({\n data: ctx.data,\n path: ctx.path,\n parent: ctx\n });\n if (!(0, parseUtil_js_1.isValid)(base4))\n return parseUtil_js_1.INVALID;\n const result = effect.transform(base4.value, checkCtx);\n if (result instanceof Promise) {\n throw new Error(`Asynchronous transform encountered during synchronous parse operation. Use .parseAsync instead.`);\n }\n return { status: status.value, value: result };\n } else {\n return this._def.schema._parseAsync({ data: ctx.data, path: ctx.path, parent: ctx }).then((base4) => {\n if (!(0, parseUtil_js_1.isValid)(base4))\n return parseUtil_js_1.INVALID;\n return Promise.resolve(effect.transform(base4.value, checkCtx)).then((result) => ({\n status: status.value,\n value: result\n }));\n });\n }\n }\n util_js_1.util.assertNever(effect);\n }\n };\n exports3.ZodEffects = ZodEffects2;\n exports3.ZodTransformer = ZodEffects2;\n ZodEffects2.create = (schema, effect, params) => {\n return new ZodEffects2({\n schema,\n typeName: ZodFirstPartyTypeKind2.ZodEffects,\n effect,\n ...processCreateParams2(params)\n });\n };\n ZodEffects2.createWithPreprocess = (preprocess, schema, params) => {\n return new ZodEffects2({\n schema,\n effect: { type: \"preprocess\", transform: preprocess },\n typeName: ZodFirstPartyTypeKind2.ZodEffects,\n ...processCreateParams2(params)\n });\n };\n var ZodOptional2 = class extends ZodType2 {\n _parse(input) {\n const parsedType = this._getType(input);\n if (parsedType === util_js_1.ZodParsedType.undefined) {\n return (0, parseUtil_js_1.OK)(void 0);\n }\n return this._def.innerType._parse(input);\n }\n unwrap() {\n return this._def.innerType;\n }\n };\n exports3.ZodOptional = ZodOptional2;\n ZodOptional2.create = (type, params) => {\n return new ZodOptional2({\n innerType: type,\n typeName: ZodFirstPartyTypeKind2.ZodOptional,\n ...processCreateParams2(params)\n });\n };\n var ZodNullable2 = class extends ZodType2 {\n _parse(input) {\n const parsedType = this._getType(input);\n if (parsedType === util_js_1.ZodParsedType.null) {\n return (0, parseUtil_js_1.OK)(null);\n }\n return this._def.innerType._parse(input);\n }\n unwrap() {\n return this._def.innerType;\n }\n };\n exports3.ZodNullable = ZodNullable2;\n ZodNullable2.create = (type, params) => {\n return new ZodNullable2({\n innerType: type,\n typeName: ZodFirstPartyTypeKind2.ZodNullable,\n ...processCreateParams2(params)\n });\n };\n var ZodDefault2 = class extends ZodType2 {\n _parse(input) {\n const { ctx } = this._processInputParams(input);\n let data = ctx.data;\n if (ctx.parsedType === util_js_1.ZodParsedType.undefined) {\n data = this._def.defaultValue();\n }\n return this._def.innerType._parse({\n data,\n path: ctx.path,\n parent: ctx\n });\n }\n removeDefault() {\n return this._def.innerType;\n }\n };\n exports3.ZodDefault = ZodDefault2;\n ZodDefault2.create = (type, params) => {\n return new ZodDefault2({\n innerType: type,\n typeName: ZodFirstPartyTypeKind2.ZodDefault,\n defaultValue: typeof params.default === \"function\" ? params.default : () => params.default,\n ...processCreateParams2(params)\n });\n };\n var ZodCatch2 = class extends ZodType2 {\n _parse(input) {\n const { ctx } = this._processInputParams(input);\n const newCtx = {\n ...ctx,\n common: {\n ...ctx.common,\n issues: []\n }\n };\n const result = this._def.innerType._parse({\n data: newCtx.data,\n path: newCtx.path,\n parent: {\n ...newCtx\n }\n });\n if ((0, parseUtil_js_1.isAsync)(result)) {\n return result.then((result2) => {\n return {\n status: \"valid\",\n value: result2.status === \"valid\" ? result2.value : this._def.catchValue({\n get error() {\n return new ZodError_js_1.ZodError(newCtx.common.issues);\n },\n input: newCtx.data\n })\n };\n });\n } else {\n return {\n status: \"valid\",\n value: result.status === \"valid\" ? result.value : this._def.catchValue({\n get error() {\n return new ZodError_js_1.ZodError(newCtx.common.issues);\n },\n input: newCtx.data\n })\n };\n }\n }\n removeCatch() {\n return this._def.innerType;\n }\n };\n exports3.ZodCatch = ZodCatch2;\n ZodCatch2.create = (type, params) => {\n return new ZodCatch2({\n innerType: type,\n typeName: ZodFirstPartyTypeKind2.ZodCatch,\n catchValue: typeof params.catch === \"function\" ? params.catch : () => params.catch,\n ...processCreateParams2(params)\n });\n };\n var ZodNaN2 = class extends ZodType2 {\n _parse(input) {\n const parsedType = this._getType(input);\n if (parsedType !== util_js_1.ZodParsedType.nan) {\n const ctx = this._getOrReturnCtx(input);\n (0, parseUtil_js_1.addIssueToContext)(ctx, {\n code: ZodError_js_1.ZodIssueCode.invalid_type,\n expected: util_js_1.ZodParsedType.nan,\n received: ctx.parsedType\n });\n return parseUtil_js_1.INVALID;\n }\n return { status: \"valid\", value: input.data };\n }\n };\n exports3.ZodNaN = ZodNaN2;\n ZodNaN2.create = (params) => {\n return new ZodNaN2({\n typeName: ZodFirstPartyTypeKind2.ZodNaN,\n ...processCreateParams2(params)\n });\n };\n exports3.BRAND = Symbol(\"zod_brand\");\n var ZodBranded2 = class extends ZodType2 {\n _parse(input) {\n const { ctx } = this._processInputParams(input);\n const data = ctx.data;\n return this._def.type._parse({\n data,\n path: ctx.path,\n parent: ctx\n });\n }\n unwrap() {\n return this._def.type;\n }\n };\n exports3.ZodBranded = ZodBranded2;\n var ZodPipeline2 = class _ZodPipeline extends ZodType2 {\n _parse(input) {\n const { status, ctx } = this._processInputParams(input);\n if (ctx.common.async) {\n const handleAsync = async () => {\n const inResult = await this._def.in._parseAsync({\n data: ctx.data,\n path: ctx.path,\n parent: ctx\n });\n if (inResult.status === \"aborted\")\n return parseUtil_js_1.INVALID;\n if (inResult.status === \"dirty\") {\n status.dirty();\n return (0, parseUtil_js_1.DIRTY)(inResult.value);\n } else {\n return this._def.out._parseAsync({\n data: inResult.value,\n path: ctx.path,\n parent: ctx\n });\n }\n };\n return handleAsync();\n } else {\n const inResult = this._def.in._parseSync({\n data: ctx.data,\n path: ctx.path,\n parent: ctx\n });\n if (inResult.status === \"aborted\")\n return parseUtil_js_1.INVALID;\n if (inResult.status === \"dirty\") {\n status.dirty();\n return {\n status: \"dirty\",\n value: inResult.value\n };\n } else {\n return this._def.out._parseSync({\n data: inResult.value,\n path: ctx.path,\n parent: ctx\n });\n }\n }\n }\n static create(a3, b4) {\n return new _ZodPipeline({\n in: a3,\n out: b4,\n typeName: ZodFirstPartyTypeKind2.ZodPipeline\n });\n }\n };\n exports3.ZodPipeline = ZodPipeline2;\n var ZodReadonly2 = class extends ZodType2 {\n _parse(input) {\n const result = this._def.innerType._parse(input);\n const freeze = (data) => {\n if ((0, parseUtil_js_1.isValid)(data)) {\n data.value = Object.freeze(data.value);\n }\n return data;\n };\n return (0, parseUtil_js_1.isAsync)(result) ? result.then((data) => freeze(data)) : freeze(result);\n }\n unwrap() {\n return this._def.innerType;\n }\n };\n exports3.ZodReadonly = ZodReadonly2;\n ZodReadonly2.create = (type, params) => {\n return new ZodReadonly2({\n innerType: type,\n typeName: ZodFirstPartyTypeKind2.ZodReadonly,\n ...processCreateParams2(params)\n });\n };\n function cleanParams2(params, data) {\n const p4 = typeof params === \"function\" ? params(data) : typeof params === \"string\" ? { message: params } : params;\n const p22 = typeof p4 === \"string\" ? { message: p4 } : p4;\n return p22;\n }\n function custom3(check, _params = {}, fatal) {\n if (check)\n return ZodAny2.create().superRefine((data, ctx) => {\n const r2 = check(data);\n if (r2 instanceof Promise) {\n return r2.then((r3) => {\n if (!r3) {\n const params = cleanParams2(_params, data);\n const _fatal = params.fatal ?? fatal ?? true;\n ctx.addIssue({ code: \"custom\", ...params, fatal: _fatal });\n }\n });\n }\n if (!r2) {\n const params = cleanParams2(_params, data);\n const _fatal = params.fatal ?? fatal ?? true;\n ctx.addIssue({ code: \"custom\", ...params, fatal: _fatal });\n }\n return;\n });\n return ZodAny2.create();\n }\n exports3.late = {\n object: ZodObject2.lazycreate\n };\n var ZodFirstPartyTypeKind2;\n (function(ZodFirstPartyTypeKind3) {\n ZodFirstPartyTypeKind3[\"ZodString\"] = \"ZodString\";\n ZodFirstPartyTypeKind3[\"ZodNumber\"] = \"ZodNumber\";\n ZodFirstPartyTypeKind3[\"ZodNaN\"] = \"ZodNaN\";\n ZodFirstPartyTypeKind3[\"ZodBigInt\"] = \"ZodBigInt\";\n ZodFirstPartyTypeKind3[\"ZodBoolean\"] = \"ZodBoolean\";\n ZodFirstPartyTypeKind3[\"ZodDate\"] = \"ZodDate\";\n ZodFirstPartyTypeKind3[\"ZodSymbol\"] = \"ZodSymbol\";\n ZodFirstPartyTypeKind3[\"ZodUndefined\"] = \"ZodUndefined\";\n ZodFirstPartyTypeKind3[\"ZodNull\"] = \"ZodNull\";\n ZodFirstPartyTypeKind3[\"ZodAny\"] = \"ZodAny\";\n ZodFirstPartyTypeKind3[\"ZodUnknown\"] = \"ZodUnknown\";\n ZodFirstPartyTypeKind3[\"ZodNever\"] = \"ZodNever\";\n ZodFirstPartyTypeKind3[\"ZodVoid\"] = \"ZodVoid\";\n ZodFirstPartyTypeKind3[\"ZodArray\"] = \"ZodArray\";\n ZodFirstPartyTypeKind3[\"ZodObject\"] = \"ZodObject\";\n ZodFirstPartyTypeKind3[\"ZodUnion\"] = \"ZodUnion\";\n ZodFirstPartyTypeKind3[\"ZodDiscriminatedUnion\"] = \"ZodDiscriminatedUnion\";\n ZodFirstPartyTypeKind3[\"ZodIntersection\"] = \"ZodIntersection\";\n ZodFirstPartyTypeKind3[\"ZodTuple\"] = \"ZodTuple\";\n ZodFirstPartyTypeKind3[\"ZodRecord\"] = \"ZodRecord\";\n ZodFirstPartyTypeKind3[\"ZodMap\"] = \"ZodMap\";\n ZodFirstPartyTypeKind3[\"ZodSet\"] = \"ZodSet\";\n ZodFirstPartyTypeKind3[\"ZodFunction\"] = \"ZodFunction\";\n ZodFirstPartyTypeKind3[\"ZodLazy\"] = \"ZodLazy\";\n ZodFirstPartyTypeKind3[\"ZodLiteral\"] = \"ZodLiteral\";\n ZodFirstPartyTypeKind3[\"ZodEnum\"] = \"ZodEnum\";\n ZodFirstPartyTypeKind3[\"ZodEffects\"] = \"ZodEffects\";\n ZodFirstPartyTypeKind3[\"ZodNativeEnum\"] = \"ZodNativeEnum\";\n ZodFirstPartyTypeKind3[\"ZodOptional\"] = \"ZodOptional\";\n ZodFirstPartyTypeKind3[\"ZodNullable\"] = \"ZodNullable\";\n ZodFirstPartyTypeKind3[\"ZodDefault\"] = \"ZodDefault\";\n ZodFirstPartyTypeKind3[\"ZodCatch\"] = \"ZodCatch\";\n ZodFirstPartyTypeKind3[\"ZodPromise\"] = \"ZodPromise\";\n ZodFirstPartyTypeKind3[\"ZodBranded\"] = \"ZodBranded\";\n ZodFirstPartyTypeKind3[\"ZodPipeline\"] = \"ZodPipeline\";\n ZodFirstPartyTypeKind3[\"ZodReadonly\"] = \"ZodReadonly\";\n })(ZodFirstPartyTypeKind2 || (exports3.ZodFirstPartyTypeKind = ZodFirstPartyTypeKind2 = {}));\n var instanceOfType2 = (cls, params = {\n message: `Input not instance of ${cls.name}`\n }) => custom3((data) => data instanceof cls, params);\n exports3.instanceof = instanceOfType2;\n var stringType2 = ZodString2.create;\n exports3.string = stringType2;\n var numberType2 = ZodNumber2.create;\n exports3.number = numberType2;\n var nanType2 = ZodNaN2.create;\n exports3.nan = nanType2;\n var bigIntType2 = ZodBigInt2.create;\n exports3.bigint = bigIntType2;\n var booleanType2 = ZodBoolean2.create;\n exports3.boolean = booleanType2;\n var dateType2 = ZodDate2.create;\n exports3.date = dateType2;\n var symbolType2 = ZodSymbol2.create;\n exports3.symbol = symbolType2;\n var undefinedType2 = ZodUndefined2.create;\n exports3.undefined = undefinedType2;\n var nullType2 = ZodNull2.create;\n exports3.null = nullType2;\n var anyType2 = ZodAny2.create;\n exports3.any = anyType2;\n var unknownType2 = ZodUnknown2.create;\n exports3.unknown = unknownType2;\n var neverType2 = ZodNever2.create;\n exports3.never = neverType2;\n var voidType2 = ZodVoid2.create;\n exports3.void = voidType2;\n var arrayType2 = ZodArray2.create;\n exports3.array = arrayType2;\n var objectType2 = ZodObject2.create;\n exports3.object = objectType2;\n var strictObjectType2 = ZodObject2.strictCreate;\n exports3.strictObject = strictObjectType2;\n var unionType2 = ZodUnion2.create;\n exports3.union = unionType2;\n var discriminatedUnionType2 = ZodDiscriminatedUnion2.create;\n exports3.discriminatedUnion = discriminatedUnionType2;\n var intersectionType2 = ZodIntersection2.create;\n exports3.intersection = intersectionType2;\n var tupleType2 = ZodTuple2.create;\n exports3.tuple = tupleType2;\n var recordType2 = ZodRecord2.create;\n exports3.record = recordType2;\n var mapType2 = ZodMap2.create;\n exports3.map = mapType2;\n var setType2 = ZodSet2.create;\n exports3.set = setType2;\n var functionType2 = ZodFunction2.create;\n exports3.function = functionType2;\n var lazyType2 = ZodLazy2.create;\n exports3.lazy = lazyType2;\n var literalType2 = ZodLiteral2.create;\n exports3.literal = literalType2;\n var enumType2 = ZodEnum2.create;\n exports3.enum = enumType2;\n var nativeEnumType2 = ZodNativeEnum2.create;\n exports3.nativeEnum = nativeEnumType2;\n var promiseType2 = ZodPromise2.create;\n exports3.promise = promiseType2;\n var effectsType2 = ZodEffects2.create;\n exports3.effect = effectsType2;\n exports3.transformer = effectsType2;\n var optionalType2 = ZodOptional2.create;\n exports3.optional = optionalType2;\n var nullableType2 = ZodNullable2.create;\n exports3.nullable = nullableType2;\n var preprocessType2 = ZodEffects2.createWithPreprocess;\n exports3.preprocess = preprocessType2;\n var pipelineType2 = ZodPipeline2.create;\n exports3.pipeline = pipelineType2;\n var ostring2 = () => stringType2().optional();\n exports3.ostring = ostring2;\n var onumber2 = () => numberType2().optional();\n exports3.onumber = onumber2;\n var oboolean2 = () => booleanType2().optional();\n exports3.oboolean = oboolean2;\n exports3.coerce = {\n string: (arg) => ZodString2.create({ ...arg, coerce: true }),\n number: (arg) => ZodNumber2.create({ ...arg, coerce: true }),\n boolean: (arg) => ZodBoolean2.create({\n ...arg,\n coerce: true\n }),\n bigint: (arg) => ZodBigInt2.create({ ...arg, coerce: true }),\n date: (arg) => ZodDate2.create({ ...arg, coerce: true })\n };\n exports3.NEVER = parseUtil_js_1.INVALID;\n }\n });\n\n // ../../../node_modules/.pnpm/zod@3.25.64/node_modules/zod/dist/cjs/v3/external.js\n var require_external = __commonJS({\n \"../../../node_modules/.pnpm/zod@3.25.64/node_modules/zod/dist/cjs/v3/external.js\"(exports3) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n var __createBinding3 = exports3 && exports3.__createBinding || (Object.create ? function(o5, m2, k4, k22) {\n if (k22 === void 0)\n k22 = k4;\n var desc = Object.getOwnPropertyDescriptor(m2, k4);\n if (!desc || (\"get\" in desc ? !m2.__esModule : desc.writable || desc.configurable)) {\n desc = { enumerable: true, get: function() {\n return m2[k4];\n } };\n }\n Object.defineProperty(o5, k22, desc);\n } : function(o5, m2, k4, k22) {\n if (k22 === void 0)\n k22 = k4;\n o5[k22] = m2[k4];\n });\n var __exportStar3 = exports3 && exports3.__exportStar || function(m2, exports4) {\n for (var p4 in m2)\n if (p4 !== \"default\" && !Object.prototype.hasOwnProperty.call(exports4, p4))\n __createBinding3(exports4, m2, p4);\n };\n Object.defineProperty(exports3, \"__esModule\", { value: true });\n __exportStar3(require_errors(), exports3);\n __exportStar3(require_parseUtil(), exports3);\n __exportStar3(require_typeAliases(), exports3);\n __exportStar3(require_util(), exports3);\n __exportStar3(require_types(), exports3);\n __exportStar3(require_ZodError(), exports3);\n }\n });\n\n // ../../../node_modules/.pnpm/zod@3.25.64/node_modules/zod/dist/cjs/v3/index.js\n var require_v3 = __commonJS({\n \"../../../node_modules/.pnpm/zod@3.25.64/node_modules/zod/dist/cjs/v3/index.js\"(exports3) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n var __createBinding3 = exports3 && exports3.__createBinding || (Object.create ? function(o5, m2, k4, k22) {\n if (k22 === void 0)\n k22 = k4;\n var desc = Object.getOwnPropertyDescriptor(m2, k4);\n if (!desc || (\"get\" in desc ? !m2.__esModule : desc.writable || desc.configurable)) {\n desc = { enumerable: true, get: function() {\n return m2[k4];\n } };\n }\n Object.defineProperty(o5, k22, desc);\n } : function(o5, m2, k4, k22) {\n if (k22 === void 0)\n k22 = k4;\n o5[k22] = m2[k4];\n });\n var __setModuleDefault3 = exports3 && exports3.__setModuleDefault || (Object.create ? function(o5, v2) {\n Object.defineProperty(o5, \"default\", { enumerable: true, value: v2 });\n } : function(o5, v2) {\n o5[\"default\"] = v2;\n });\n var __importStar3 = exports3 && exports3.__importStar || function(mod3) {\n if (mod3 && mod3.__esModule)\n return mod3;\n var result = {};\n if (mod3 != null) {\n for (var k4 in mod3)\n if (k4 !== \"default\" && Object.prototype.hasOwnProperty.call(mod3, k4))\n __createBinding3(result, mod3, k4);\n }\n __setModuleDefault3(result, mod3);\n return result;\n };\n var __exportStar3 = exports3 && exports3.__exportStar || function(m2, exports4) {\n for (var p4 in m2)\n if (p4 !== \"default\" && !Object.prototype.hasOwnProperty.call(exports4, p4))\n __createBinding3(exports4, m2, p4);\n };\n Object.defineProperty(exports3, \"__esModule\", { value: true });\n exports3.z = void 0;\n var z2 = __importStar3(require_external());\n exports3.z = z2;\n __exportStar3(require_external(), exports3);\n exports3.default = z2;\n }\n });\n\n // ../../../node_modules/.pnpm/zod@3.25.64/node_modules/zod/dist/cjs/index.js\n var require_cjs = __commonJS({\n \"../../../node_modules/.pnpm/zod@3.25.64/node_modules/zod/dist/cjs/index.js\"(exports3) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n var __createBinding3 = exports3 && exports3.__createBinding || (Object.create ? function(o5, m2, k4, k22) {\n if (k22 === void 0)\n k22 = k4;\n var desc = Object.getOwnPropertyDescriptor(m2, k4);\n if (!desc || (\"get\" in desc ? !m2.__esModule : desc.writable || desc.configurable)) {\n desc = { enumerable: true, get: function() {\n return m2[k4];\n } };\n }\n Object.defineProperty(o5, k22, desc);\n } : function(o5, m2, k4, k22) {\n if (k22 === void 0)\n k22 = k4;\n o5[k22] = m2[k4];\n });\n var __exportStar3 = exports3 && exports3.__exportStar || function(m2, exports4) {\n for (var p4 in m2)\n if (p4 !== \"default\" && !Object.prototype.hasOwnProperty.call(exports4, p4))\n __createBinding3(exports4, m2, p4);\n };\n var __importDefault3 = exports3 && exports3.__importDefault || function(mod3) {\n return mod3 && mod3.__esModule ? mod3 : { \"default\": mod3 };\n };\n Object.defineProperty(exports3, \"__esModule\", { value: true });\n var index_js_1 = __importDefault3(require_v3());\n __exportStar3(require_v3(), exports3);\n exports3.default = index_js_1.default;\n }\n });\n\n // ../../../node_modules/.pnpm/semver@7.7.2/node_modules/semver/internal/constants.js\n var require_constants = __commonJS({\n \"../../../node_modules/.pnpm/semver@7.7.2/node_modules/semver/internal/constants.js\"(exports3, module) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n var SEMVER_SPEC_VERSION = \"2.0.0\";\n var MAX_LENGTH = 256;\n var MAX_SAFE_INTEGER = Number.MAX_SAFE_INTEGER || /* istanbul ignore next */\n 9007199254740991;\n var MAX_SAFE_COMPONENT_LENGTH = 16;\n var MAX_SAFE_BUILD_LENGTH = MAX_LENGTH - 6;\n var RELEASE_TYPES = [\n \"major\",\n \"premajor\",\n \"minor\",\n \"preminor\",\n \"patch\",\n \"prepatch\",\n \"prerelease\"\n ];\n module.exports = {\n MAX_LENGTH,\n MAX_SAFE_COMPONENT_LENGTH,\n MAX_SAFE_BUILD_LENGTH,\n MAX_SAFE_INTEGER,\n RELEASE_TYPES,\n SEMVER_SPEC_VERSION,\n FLAG_INCLUDE_PRERELEASE: 1,\n FLAG_LOOSE: 2\n };\n }\n });\n\n // ../../../node_modules/.pnpm/semver@7.7.2/node_modules/semver/internal/debug.js\n var require_debug = __commonJS({\n \"../../../node_modules/.pnpm/semver@7.7.2/node_modules/semver/internal/debug.js\"(exports3, module) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n var debug = typeof process_exports === \"object\" && process_exports.env && process_exports.env.NODE_DEBUG && /\\bsemver\\b/i.test(process_exports.env.NODE_DEBUG) ? (...args) => console.error(\"SEMVER\", ...args) : () => {\n };\n module.exports = debug;\n }\n });\n\n // ../../../node_modules/.pnpm/semver@7.7.2/node_modules/semver/internal/re.js\n var require_re = __commonJS({\n \"../../../node_modules/.pnpm/semver@7.7.2/node_modules/semver/internal/re.js\"(exports3, module) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n var {\n MAX_SAFE_COMPONENT_LENGTH,\n MAX_SAFE_BUILD_LENGTH,\n MAX_LENGTH\n } = require_constants();\n var debug = require_debug();\n exports3 = module.exports = {};\n var re = exports3.re = [];\n var safeRe = exports3.safeRe = [];\n var src = exports3.src = [];\n var safeSrc = exports3.safeSrc = [];\n var t3 = exports3.t = {};\n var R3 = 0;\n var LETTERDASHNUMBER = \"[a-zA-Z0-9-]\";\n var safeRegexReplacements = [\n [\"\\\\s\", 1],\n [\"\\\\d\", MAX_LENGTH],\n [LETTERDASHNUMBER, MAX_SAFE_BUILD_LENGTH]\n ];\n var makeSafeRegex = (value) => {\n for (const [token, max] of safeRegexReplacements) {\n value = value.split(`${token}*`).join(`${token}{0,${max}}`).split(`${token}+`).join(`${token}{1,${max}}`);\n }\n return value;\n };\n var createToken = (name, value, isGlobal) => {\n const safe = makeSafeRegex(value);\n const index2 = R3++;\n debug(name, index2, value);\n t3[name] = index2;\n src[index2] = value;\n safeSrc[index2] = safe;\n re[index2] = new RegExp(value, isGlobal ? \"g\" : void 0);\n safeRe[index2] = new RegExp(safe, isGlobal ? \"g\" : void 0);\n };\n createToken(\"NUMERICIDENTIFIER\", \"0|[1-9]\\\\d*\");\n createToken(\"NUMERICIDENTIFIERLOOSE\", \"\\\\d+\");\n createToken(\"NONNUMERICIDENTIFIER\", `\\\\d*[a-zA-Z-]${LETTERDASHNUMBER}*`);\n createToken(\"MAINVERSION\", `(${src[t3.NUMERICIDENTIFIER]})\\\\.(${src[t3.NUMERICIDENTIFIER]})\\\\.(${src[t3.NUMERICIDENTIFIER]})`);\n createToken(\"MAINVERSIONLOOSE\", `(${src[t3.NUMERICIDENTIFIERLOOSE]})\\\\.(${src[t3.NUMERICIDENTIFIERLOOSE]})\\\\.(${src[t3.NUMERICIDENTIFIERLOOSE]})`);\n createToken(\"PRERELEASEIDENTIFIER\", `(?:${src[t3.NONNUMERICIDENTIFIER]}|${src[t3.NUMERICIDENTIFIER]})`);\n createToken(\"PRERELEASEIDENTIFIERLOOSE\", `(?:${src[t3.NONNUMERICIDENTIFIER]}|${src[t3.NUMERICIDENTIFIERLOOSE]})`);\n createToken(\"PRERELEASE\", `(?:-(${src[t3.PRERELEASEIDENTIFIER]}(?:\\\\.${src[t3.PRERELEASEIDENTIFIER]})*))`);\n createToken(\"PRERELEASELOOSE\", `(?:-?(${src[t3.PRERELEASEIDENTIFIERLOOSE]}(?:\\\\.${src[t3.PRERELEASEIDENTIFIERLOOSE]})*))`);\n createToken(\"BUILDIDENTIFIER\", `${LETTERDASHNUMBER}+`);\n createToken(\"BUILD\", `(?:\\\\+(${src[t3.BUILDIDENTIFIER]}(?:\\\\.${src[t3.BUILDIDENTIFIER]})*))`);\n createToken(\"FULLPLAIN\", `v?${src[t3.MAINVERSION]}${src[t3.PRERELEASE]}?${src[t3.BUILD]}?`);\n createToken(\"FULL\", `^${src[t3.FULLPLAIN]}$`);\n createToken(\"LOOSEPLAIN\", `[v=\\\\s]*${src[t3.MAINVERSIONLOOSE]}${src[t3.PRERELEASELOOSE]}?${src[t3.BUILD]}?`);\n createToken(\"LOOSE\", `^${src[t3.LOOSEPLAIN]}$`);\n createToken(\"GTLT\", \"((?:<|>)?=?)\");\n createToken(\"XRANGEIDENTIFIERLOOSE\", `${src[t3.NUMERICIDENTIFIERLOOSE]}|x|X|\\\\*`);\n createToken(\"XRANGEIDENTIFIER\", `${src[t3.NUMERICIDENTIFIER]}|x|X|\\\\*`);\n createToken(\"XRANGEPLAIN\", `[v=\\\\s]*(${src[t3.XRANGEIDENTIFIER]})(?:\\\\.(${src[t3.XRANGEIDENTIFIER]})(?:\\\\.(${src[t3.XRANGEIDENTIFIER]})(?:${src[t3.PRERELEASE]})?${src[t3.BUILD]}?)?)?`);\n createToken(\"XRANGEPLAINLOOSE\", `[v=\\\\s]*(${src[t3.XRANGEIDENTIFIERLOOSE]})(?:\\\\.(${src[t3.XRANGEIDENTIFIERLOOSE]})(?:\\\\.(${src[t3.XRANGEIDENTIFIERLOOSE]})(?:${src[t3.PRERELEASELOOSE]})?${src[t3.BUILD]}?)?)?`);\n createToken(\"XRANGE\", `^${src[t3.GTLT]}\\\\s*${src[t3.XRANGEPLAIN]}$`);\n createToken(\"XRANGELOOSE\", `^${src[t3.GTLT]}\\\\s*${src[t3.XRANGEPLAINLOOSE]}$`);\n createToken(\"COERCEPLAIN\", `${\"(^|[^\\\\d])(\\\\d{1,\"}${MAX_SAFE_COMPONENT_LENGTH}})(?:\\\\.(\\\\d{1,${MAX_SAFE_COMPONENT_LENGTH}}))?(?:\\\\.(\\\\d{1,${MAX_SAFE_COMPONENT_LENGTH}}))?`);\n createToken(\"COERCE\", `${src[t3.COERCEPLAIN]}(?:$|[^\\\\d])`);\n createToken(\"COERCEFULL\", src[t3.COERCEPLAIN] + `(?:${src[t3.PRERELEASE]})?(?:${src[t3.BUILD]})?(?:$|[^\\\\d])`);\n createToken(\"COERCERTL\", src[t3.COERCE], true);\n createToken(\"COERCERTLFULL\", src[t3.COERCEFULL], true);\n createToken(\"LONETILDE\", \"(?:~>?)\");\n createToken(\"TILDETRIM\", `(\\\\s*)${src[t3.LONETILDE]}\\\\s+`, true);\n exports3.tildeTrimReplace = \"$1~\";\n createToken(\"TILDE\", `^${src[t3.LONETILDE]}${src[t3.XRANGEPLAIN]}$`);\n createToken(\"TILDELOOSE\", `^${src[t3.LONETILDE]}${src[t3.XRANGEPLAINLOOSE]}$`);\n createToken(\"LONECARET\", \"(?:\\\\^)\");\n createToken(\"CARETTRIM\", `(\\\\s*)${src[t3.LONECARET]}\\\\s+`, true);\n exports3.caretTrimReplace = \"$1^\";\n createToken(\"CARET\", `^${src[t3.LONECARET]}${src[t3.XRANGEPLAIN]}$`);\n createToken(\"CARETLOOSE\", `^${src[t3.LONECARET]}${src[t3.XRANGEPLAINLOOSE]}$`);\n createToken(\"COMPARATORLOOSE\", `^${src[t3.GTLT]}\\\\s*(${src[t3.LOOSEPLAIN]})$|^$`);\n createToken(\"COMPARATOR\", `^${src[t3.GTLT]}\\\\s*(${src[t3.FULLPLAIN]})$|^$`);\n createToken(\"COMPARATORTRIM\", `(\\\\s*)${src[t3.GTLT]}\\\\s*(${src[t3.LOOSEPLAIN]}|${src[t3.XRANGEPLAIN]})`, true);\n exports3.comparatorTrimReplace = \"$1$2$3\";\n createToken(\"HYPHENRANGE\", `^\\\\s*(${src[t3.XRANGEPLAIN]})\\\\s+-\\\\s+(${src[t3.XRANGEPLAIN]})\\\\s*$`);\n createToken(\"HYPHENRANGELOOSE\", `^\\\\s*(${src[t3.XRANGEPLAINLOOSE]})\\\\s+-\\\\s+(${src[t3.XRANGEPLAINLOOSE]})\\\\s*$`);\n createToken(\"STAR\", \"(<|>)?=?\\\\s*\\\\*\");\n createToken(\"GTE0\", \"^\\\\s*>=\\\\s*0\\\\.0\\\\.0\\\\s*$\");\n createToken(\"GTE0PRE\", \"^\\\\s*>=\\\\s*0\\\\.0\\\\.0-0\\\\s*$\");\n }\n });\n\n // ../../../node_modules/.pnpm/semver@7.7.2/node_modules/semver/internal/parse-options.js\n var require_parse_options = __commonJS({\n \"../../../node_modules/.pnpm/semver@7.7.2/node_modules/semver/internal/parse-options.js\"(exports3, module) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n var looseOption = Object.freeze({ loose: true });\n var emptyOpts = Object.freeze({});\n var parseOptions = (options) => {\n if (!options) {\n return emptyOpts;\n }\n if (typeof options !== \"object\") {\n return looseOption;\n }\n return options;\n };\n module.exports = parseOptions;\n }\n });\n\n // ../../../node_modules/.pnpm/semver@7.7.2/node_modules/semver/internal/identifiers.js\n var require_identifiers = __commonJS({\n \"../../../node_modules/.pnpm/semver@7.7.2/node_modules/semver/internal/identifiers.js\"(exports3, module) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n var numeric = /^[0-9]+$/;\n var compareIdentifiers = (a3, b4) => {\n const anum2 = numeric.test(a3);\n const bnum = numeric.test(b4);\n if (anum2 && bnum) {\n a3 = +a3;\n b4 = +b4;\n }\n return a3 === b4 ? 0 : anum2 && !bnum ? -1 : bnum && !anum2 ? 1 : a3 < b4 ? -1 : 1;\n };\n var rcompareIdentifiers = (a3, b4) => compareIdentifiers(b4, a3);\n module.exports = {\n compareIdentifiers,\n rcompareIdentifiers\n };\n }\n });\n\n // ../../../node_modules/.pnpm/semver@7.7.2/node_modules/semver/classes/semver.js\n var require_semver = __commonJS({\n \"../../../node_modules/.pnpm/semver@7.7.2/node_modules/semver/classes/semver.js\"(exports3, module) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n var debug = require_debug();\n var { MAX_LENGTH, MAX_SAFE_INTEGER } = require_constants();\n var { safeRe: re, t: t3 } = require_re();\n var parseOptions = require_parse_options();\n var { compareIdentifiers } = require_identifiers();\n var SemVer = class _SemVer {\n constructor(version6, options) {\n options = parseOptions(options);\n if (version6 instanceof _SemVer) {\n if (version6.loose === !!options.loose && version6.includePrerelease === !!options.includePrerelease) {\n return version6;\n } else {\n version6 = version6.version;\n }\n } else if (typeof version6 !== \"string\") {\n throw new TypeError(`Invalid version. Must be a string. Got type \"${typeof version6}\".`);\n }\n if (version6.length > MAX_LENGTH) {\n throw new TypeError(\n `version is longer than ${MAX_LENGTH} characters`\n );\n }\n debug(\"SemVer\", version6, options);\n this.options = options;\n this.loose = !!options.loose;\n this.includePrerelease = !!options.includePrerelease;\n const m2 = version6.trim().match(options.loose ? re[t3.LOOSE] : re[t3.FULL]);\n if (!m2) {\n throw new TypeError(`Invalid Version: ${version6}`);\n }\n this.raw = version6;\n this.major = +m2[1];\n this.minor = +m2[2];\n this.patch = +m2[3];\n if (this.major > MAX_SAFE_INTEGER || this.major < 0) {\n throw new TypeError(\"Invalid major version\");\n }\n if (this.minor > MAX_SAFE_INTEGER || this.minor < 0) {\n throw new TypeError(\"Invalid minor version\");\n }\n if (this.patch > MAX_SAFE_INTEGER || this.patch < 0) {\n throw new TypeError(\"Invalid patch version\");\n }\n if (!m2[4]) {\n this.prerelease = [];\n } else {\n this.prerelease = m2[4].split(\".\").map((id) => {\n if (/^[0-9]+$/.test(id)) {\n const num2 = +id;\n if (num2 >= 0 && num2 < MAX_SAFE_INTEGER) {\n return num2;\n }\n }\n return id;\n });\n }\n this.build = m2[5] ? m2[5].split(\".\") : [];\n this.format();\n }\n format() {\n this.version = `${this.major}.${this.minor}.${this.patch}`;\n if (this.prerelease.length) {\n this.version += `-${this.prerelease.join(\".\")}`;\n }\n return this.version;\n }\n toString() {\n return this.version;\n }\n compare(other) {\n debug(\"SemVer.compare\", this.version, this.options, other);\n if (!(other instanceof _SemVer)) {\n if (typeof other === \"string\" && other === this.version) {\n return 0;\n }\n other = new _SemVer(other, this.options);\n }\n if (other.version === this.version) {\n return 0;\n }\n return this.compareMain(other) || this.comparePre(other);\n }\n compareMain(other) {\n if (!(other instanceof _SemVer)) {\n other = new _SemVer(other, this.options);\n }\n return compareIdentifiers(this.major, other.major) || compareIdentifiers(this.minor, other.minor) || compareIdentifiers(this.patch, other.patch);\n }\n comparePre(other) {\n if (!(other instanceof _SemVer)) {\n other = new _SemVer(other, this.options);\n }\n if (this.prerelease.length && !other.prerelease.length) {\n return -1;\n } else if (!this.prerelease.length && other.prerelease.length) {\n return 1;\n } else if (!this.prerelease.length && !other.prerelease.length) {\n return 0;\n }\n let i3 = 0;\n do {\n const a3 = this.prerelease[i3];\n const b4 = other.prerelease[i3];\n debug(\"prerelease compare\", i3, a3, b4);\n if (a3 === void 0 && b4 === void 0) {\n return 0;\n } else if (b4 === void 0) {\n return 1;\n } else if (a3 === void 0) {\n return -1;\n } else if (a3 === b4) {\n continue;\n } else {\n return compareIdentifiers(a3, b4);\n }\n } while (++i3);\n }\n compareBuild(other) {\n if (!(other instanceof _SemVer)) {\n other = new _SemVer(other, this.options);\n }\n let i3 = 0;\n do {\n const a3 = this.build[i3];\n const b4 = other.build[i3];\n debug(\"build compare\", i3, a3, b4);\n if (a3 === void 0 && b4 === void 0) {\n return 0;\n } else if (b4 === void 0) {\n return 1;\n } else if (a3 === void 0) {\n return -1;\n } else if (a3 === b4) {\n continue;\n } else {\n return compareIdentifiers(a3, b4);\n }\n } while (++i3);\n }\n // preminor will bump the version up to the next minor release, and immediately\n // down to pre-release. premajor and prepatch work the same way.\n inc(release2, identifier, identifierBase) {\n if (release2.startsWith(\"pre\")) {\n if (!identifier && identifierBase === false) {\n throw new Error(\"invalid increment argument: identifier is empty\");\n }\n if (identifier) {\n const match = `-${identifier}`.match(this.options.loose ? re[t3.PRERELEASELOOSE] : re[t3.PRERELEASE]);\n if (!match || match[1] !== identifier) {\n throw new Error(`invalid identifier: ${identifier}`);\n }\n }\n }\n switch (release2) {\n case \"premajor\":\n this.prerelease.length = 0;\n this.patch = 0;\n this.minor = 0;\n this.major++;\n this.inc(\"pre\", identifier, identifierBase);\n break;\n case \"preminor\":\n this.prerelease.length = 0;\n this.patch = 0;\n this.minor++;\n this.inc(\"pre\", identifier, identifierBase);\n break;\n case \"prepatch\":\n this.prerelease.length = 0;\n this.inc(\"patch\", identifier, identifierBase);\n this.inc(\"pre\", identifier, identifierBase);\n break;\n case \"prerelease\":\n if (this.prerelease.length === 0) {\n this.inc(\"patch\", identifier, identifierBase);\n }\n this.inc(\"pre\", identifier, identifierBase);\n break;\n case \"release\":\n if (this.prerelease.length === 0) {\n throw new Error(`version ${this.raw} is not a prerelease`);\n }\n this.prerelease.length = 0;\n break;\n case \"major\":\n if (this.minor !== 0 || this.patch !== 0 || this.prerelease.length === 0) {\n this.major++;\n }\n this.minor = 0;\n this.patch = 0;\n this.prerelease = [];\n break;\n case \"minor\":\n if (this.patch !== 0 || this.prerelease.length === 0) {\n this.minor++;\n }\n this.patch = 0;\n this.prerelease = [];\n break;\n case \"patch\":\n if (this.prerelease.length === 0) {\n this.patch++;\n }\n this.prerelease = [];\n break;\n case \"pre\": {\n const base4 = Number(identifierBase) ? 1 : 0;\n if (this.prerelease.length === 0) {\n this.prerelease = [base4];\n } else {\n let i3 = this.prerelease.length;\n while (--i3 >= 0) {\n if (typeof this.prerelease[i3] === \"number\") {\n this.prerelease[i3]++;\n i3 = -2;\n }\n }\n if (i3 === -1) {\n if (identifier === this.prerelease.join(\".\") && identifierBase === false) {\n throw new Error(\"invalid increment argument: identifier already exists\");\n }\n this.prerelease.push(base4);\n }\n }\n if (identifier) {\n let prerelease = [identifier, base4];\n if (identifierBase === false) {\n prerelease = [identifier];\n }\n if (compareIdentifiers(this.prerelease[0], identifier) === 0) {\n if (isNaN(this.prerelease[1])) {\n this.prerelease = prerelease;\n }\n } else {\n this.prerelease = prerelease;\n }\n }\n break;\n }\n default:\n throw new Error(`invalid increment argument: ${release2}`);\n }\n this.raw = this.format();\n if (this.build.length) {\n this.raw += `+${this.build.join(\".\")}`;\n }\n return this;\n }\n };\n module.exports = SemVer;\n }\n });\n\n // ../../../node_modules/.pnpm/semver@7.7.2/node_modules/semver/functions/parse.js\n var require_parse = __commonJS({\n \"../../../node_modules/.pnpm/semver@7.7.2/node_modules/semver/functions/parse.js\"(exports3, module) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n var SemVer = require_semver();\n var parse = (version6, options, throwErrors = false) => {\n if (version6 instanceof SemVer) {\n return version6;\n }\n try {\n return new SemVer(version6, options);\n } catch (er) {\n if (!throwErrors) {\n return null;\n }\n throw er;\n }\n };\n module.exports = parse;\n }\n });\n\n // ../../../node_modules/.pnpm/semver@7.7.2/node_modules/semver/functions/valid.js\n var require_valid = __commonJS({\n \"../../../node_modules/.pnpm/semver@7.7.2/node_modules/semver/functions/valid.js\"(exports3, module) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n var parse = require_parse();\n var valid = (version6, options) => {\n const v2 = parse(version6, options);\n return v2 ? v2.version : null;\n };\n module.exports = valid;\n }\n });\n\n // ../../../node_modules/.pnpm/semver@7.7.2/node_modules/semver/functions/clean.js\n var require_clean = __commonJS({\n \"../../../node_modules/.pnpm/semver@7.7.2/node_modules/semver/functions/clean.js\"(exports3, module) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n var parse = require_parse();\n var clean3 = (version6, options) => {\n const s4 = parse(version6.trim().replace(/^[=v]+/, \"\"), options);\n return s4 ? s4.version : null;\n };\n module.exports = clean3;\n }\n });\n\n // ../../../node_modules/.pnpm/semver@7.7.2/node_modules/semver/functions/inc.js\n var require_inc = __commonJS({\n \"../../../node_modules/.pnpm/semver@7.7.2/node_modules/semver/functions/inc.js\"(exports3, module) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n var SemVer = require_semver();\n var inc = (version6, release2, options, identifier, identifierBase) => {\n if (typeof options === \"string\") {\n identifierBase = identifier;\n identifier = options;\n options = void 0;\n }\n try {\n return new SemVer(\n version6 instanceof SemVer ? version6.version : version6,\n options\n ).inc(release2, identifier, identifierBase).version;\n } catch (er) {\n return null;\n }\n };\n module.exports = inc;\n }\n });\n\n // ../../../node_modules/.pnpm/semver@7.7.2/node_modules/semver/functions/diff.js\n var require_diff = __commonJS({\n \"../../../node_modules/.pnpm/semver@7.7.2/node_modules/semver/functions/diff.js\"(exports3, module) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n var parse = require_parse();\n var diff = (version1, version22) => {\n const v1 = parse(version1, null, true);\n const v2 = parse(version22, null, true);\n const comparison = v1.compare(v2);\n if (comparison === 0) {\n return null;\n }\n const v1Higher = comparison > 0;\n const highVersion = v1Higher ? v1 : v2;\n const lowVersion = v1Higher ? v2 : v1;\n const highHasPre = !!highVersion.prerelease.length;\n const lowHasPre = !!lowVersion.prerelease.length;\n if (lowHasPre && !highHasPre) {\n if (!lowVersion.patch && !lowVersion.minor) {\n return \"major\";\n }\n if (lowVersion.compareMain(highVersion) === 0) {\n if (lowVersion.minor && !lowVersion.patch) {\n return \"minor\";\n }\n return \"patch\";\n }\n }\n const prefix = highHasPre ? \"pre\" : \"\";\n if (v1.major !== v2.major) {\n return prefix + \"major\";\n }\n if (v1.minor !== v2.minor) {\n return prefix + \"minor\";\n }\n if (v1.patch !== v2.patch) {\n return prefix + \"patch\";\n }\n return \"prerelease\";\n };\n module.exports = diff;\n }\n });\n\n // ../../../node_modules/.pnpm/semver@7.7.2/node_modules/semver/functions/major.js\n var require_major = __commonJS({\n \"../../../node_modules/.pnpm/semver@7.7.2/node_modules/semver/functions/major.js\"(exports3, module) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n var SemVer = require_semver();\n var major = (a3, loose) => new SemVer(a3, loose).major;\n module.exports = major;\n }\n });\n\n // ../../../node_modules/.pnpm/semver@7.7.2/node_modules/semver/functions/minor.js\n var require_minor = __commonJS({\n \"../../../node_modules/.pnpm/semver@7.7.2/node_modules/semver/functions/minor.js\"(exports3, module) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n var SemVer = require_semver();\n var minor = (a3, loose) => new SemVer(a3, loose).minor;\n module.exports = minor;\n }\n });\n\n // ../../../node_modules/.pnpm/semver@7.7.2/node_modules/semver/functions/patch.js\n var require_patch = __commonJS({\n \"../../../node_modules/.pnpm/semver@7.7.2/node_modules/semver/functions/patch.js\"(exports3, module) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n var SemVer = require_semver();\n var patch = (a3, loose) => new SemVer(a3, loose).patch;\n module.exports = patch;\n }\n });\n\n // ../../../node_modules/.pnpm/semver@7.7.2/node_modules/semver/functions/prerelease.js\n var require_prerelease = __commonJS({\n \"../../../node_modules/.pnpm/semver@7.7.2/node_modules/semver/functions/prerelease.js\"(exports3, module) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n var parse = require_parse();\n var prerelease = (version6, options) => {\n const parsed = parse(version6, options);\n return parsed && parsed.prerelease.length ? parsed.prerelease : null;\n };\n module.exports = prerelease;\n }\n });\n\n // ../../../node_modules/.pnpm/semver@7.7.2/node_modules/semver/functions/compare.js\n var require_compare = __commonJS({\n \"../../../node_modules/.pnpm/semver@7.7.2/node_modules/semver/functions/compare.js\"(exports3, module) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n var SemVer = require_semver();\n var compare = (a3, b4, loose) => new SemVer(a3, loose).compare(new SemVer(b4, loose));\n module.exports = compare;\n }\n });\n\n // ../../../node_modules/.pnpm/semver@7.7.2/node_modules/semver/functions/rcompare.js\n var require_rcompare = __commonJS({\n \"../../../node_modules/.pnpm/semver@7.7.2/node_modules/semver/functions/rcompare.js\"(exports3, module) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n var compare = require_compare();\n var rcompare = (a3, b4, loose) => compare(b4, a3, loose);\n module.exports = rcompare;\n }\n });\n\n // ../../../node_modules/.pnpm/semver@7.7.2/node_modules/semver/functions/compare-loose.js\n var require_compare_loose = __commonJS({\n \"../../../node_modules/.pnpm/semver@7.7.2/node_modules/semver/functions/compare-loose.js\"(exports3, module) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n var compare = require_compare();\n var compareLoose = (a3, b4) => compare(a3, b4, true);\n module.exports = compareLoose;\n }\n });\n\n // ../../../node_modules/.pnpm/semver@7.7.2/node_modules/semver/functions/compare-build.js\n var require_compare_build = __commonJS({\n \"../../../node_modules/.pnpm/semver@7.7.2/node_modules/semver/functions/compare-build.js\"(exports3, module) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n var SemVer = require_semver();\n var compareBuild = (a3, b4, loose) => {\n const versionA = new SemVer(a3, loose);\n const versionB = new SemVer(b4, loose);\n return versionA.compare(versionB) || versionA.compareBuild(versionB);\n };\n module.exports = compareBuild;\n }\n });\n\n // ../../../node_modules/.pnpm/semver@7.7.2/node_modules/semver/functions/sort.js\n var require_sort = __commonJS({\n \"../../../node_modules/.pnpm/semver@7.7.2/node_modules/semver/functions/sort.js\"(exports3, module) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n var compareBuild = require_compare_build();\n var sort = (list, loose) => list.sort((a3, b4) => compareBuild(a3, b4, loose));\n module.exports = sort;\n }\n });\n\n // ../../../node_modules/.pnpm/semver@7.7.2/node_modules/semver/functions/rsort.js\n var require_rsort = __commonJS({\n \"../../../node_modules/.pnpm/semver@7.7.2/node_modules/semver/functions/rsort.js\"(exports3, module) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n var compareBuild = require_compare_build();\n var rsort = (list, loose) => list.sort((a3, b4) => compareBuild(b4, a3, loose));\n module.exports = rsort;\n }\n });\n\n // ../../../node_modules/.pnpm/semver@7.7.2/node_modules/semver/functions/gt.js\n var require_gt = __commonJS({\n \"../../../node_modules/.pnpm/semver@7.7.2/node_modules/semver/functions/gt.js\"(exports3, module) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n var compare = require_compare();\n var gt = (a3, b4, loose) => compare(a3, b4, loose) > 0;\n module.exports = gt;\n }\n });\n\n // ../../../node_modules/.pnpm/semver@7.7.2/node_modules/semver/functions/lt.js\n var require_lt = __commonJS({\n \"../../../node_modules/.pnpm/semver@7.7.2/node_modules/semver/functions/lt.js\"(exports3, module) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n var compare = require_compare();\n var lt = (a3, b4, loose) => compare(a3, b4, loose) < 0;\n module.exports = lt;\n }\n });\n\n // ../../../node_modules/.pnpm/semver@7.7.2/node_modules/semver/functions/eq.js\n var require_eq = __commonJS({\n \"../../../node_modules/.pnpm/semver@7.7.2/node_modules/semver/functions/eq.js\"(exports3, module) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n var compare = require_compare();\n var eq = (a3, b4, loose) => compare(a3, b4, loose) === 0;\n module.exports = eq;\n }\n });\n\n // ../../../node_modules/.pnpm/semver@7.7.2/node_modules/semver/functions/neq.js\n var require_neq = __commonJS({\n \"../../../node_modules/.pnpm/semver@7.7.2/node_modules/semver/functions/neq.js\"(exports3, module) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n var compare = require_compare();\n var neq = (a3, b4, loose) => compare(a3, b4, loose) !== 0;\n module.exports = neq;\n }\n });\n\n // ../../../node_modules/.pnpm/semver@7.7.2/node_modules/semver/functions/gte.js\n var require_gte = __commonJS({\n \"../../../node_modules/.pnpm/semver@7.7.2/node_modules/semver/functions/gte.js\"(exports3, module) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n var compare = require_compare();\n var gte = (a3, b4, loose) => compare(a3, b4, loose) >= 0;\n module.exports = gte;\n }\n });\n\n // ../../../node_modules/.pnpm/semver@7.7.2/node_modules/semver/functions/lte.js\n var require_lte = __commonJS({\n \"../../../node_modules/.pnpm/semver@7.7.2/node_modules/semver/functions/lte.js\"(exports3, module) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n var compare = require_compare();\n var lte = (a3, b4, loose) => compare(a3, b4, loose) <= 0;\n module.exports = lte;\n }\n });\n\n // ../../../node_modules/.pnpm/semver@7.7.2/node_modules/semver/functions/cmp.js\n var require_cmp = __commonJS({\n \"../../../node_modules/.pnpm/semver@7.7.2/node_modules/semver/functions/cmp.js\"(exports3, module) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n var eq = require_eq();\n var neq = require_neq();\n var gt = require_gt();\n var gte = require_gte();\n var lt = require_lt();\n var lte = require_lte();\n var cmp = (a3, op, b4, loose) => {\n switch (op) {\n case \"===\":\n if (typeof a3 === \"object\") {\n a3 = a3.version;\n }\n if (typeof b4 === \"object\") {\n b4 = b4.version;\n }\n return a3 === b4;\n case \"!==\":\n if (typeof a3 === \"object\") {\n a3 = a3.version;\n }\n if (typeof b4 === \"object\") {\n b4 = b4.version;\n }\n return a3 !== b4;\n case \"\":\n case \"=\":\n case \"==\":\n return eq(a3, b4, loose);\n case \"!=\":\n return neq(a3, b4, loose);\n case \">\":\n return gt(a3, b4, loose);\n case \">=\":\n return gte(a3, b4, loose);\n case \"<\":\n return lt(a3, b4, loose);\n case \"<=\":\n return lte(a3, b4, loose);\n default:\n throw new TypeError(`Invalid operator: ${op}`);\n }\n };\n module.exports = cmp;\n }\n });\n\n // ../../../node_modules/.pnpm/semver@7.7.2/node_modules/semver/functions/coerce.js\n var require_coerce = __commonJS({\n \"../../../node_modules/.pnpm/semver@7.7.2/node_modules/semver/functions/coerce.js\"(exports3, module) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n var SemVer = require_semver();\n var parse = require_parse();\n var { safeRe: re, t: t3 } = require_re();\n var coerce2 = (version6, options) => {\n if (version6 instanceof SemVer) {\n return version6;\n }\n if (typeof version6 === \"number\") {\n version6 = String(version6);\n }\n if (typeof version6 !== \"string\") {\n return null;\n }\n options = options || {};\n let match = null;\n if (!options.rtl) {\n match = version6.match(options.includePrerelease ? re[t3.COERCEFULL] : re[t3.COERCE]);\n } else {\n const coerceRtlRegex = options.includePrerelease ? re[t3.COERCERTLFULL] : re[t3.COERCERTL];\n let next;\n while ((next = coerceRtlRegex.exec(version6)) && (!match || match.index + match[0].length !== version6.length)) {\n if (!match || next.index + next[0].length !== match.index + match[0].length) {\n match = next;\n }\n coerceRtlRegex.lastIndex = next.index + next[1].length + next[2].length;\n }\n coerceRtlRegex.lastIndex = -1;\n }\n if (match === null) {\n return null;\n }\n const major = match[2];\n const minor = match[3] || \"0\";\n const patch = match[4] || \"0\";\n const prerelease = options.includePrerelease && match[5] ? `-${match[5]}` : \"\";\n const build = options.includePrerelease && match[6] ? `+${match[6]}` : \"\";\n return parse(`${major}.${minor}.${patch}${prerelease}${build}`, options);\n };\n module.exports = coerce2;\n }\n });\n\n // ../../../node_modules/.pnpm/semver@7.7.2/node_modules/semver/internal/lrucache.js\n var require_lrucache = __commonJS({\n \"../../../node_modules/.pnpm/semver@7.7.2/node_modules/semver/internal/lrucache.js\"(exports3, module) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n var LRUCache = class {\n constructor() {\n this.max = 1e3;\n this.map = /* @__PURE__ */ new Map();\n }\n get(key) {\n const value = this.map.get(key);\n if (value === void 0) {\n return void 0;\n } else {\n this.map.delete(key);\n this.map.set(key, value);\n return value;\n }\n }\n delete(key) {\n return this.map.delete(key);\n }\n set(key, value) {\n const deleted = this.delete(key);\n if (!deleted && value !== void 0) {\n if (this.map.size >= this.max) {\n const firstKey = this.map.keys().next().value;\n this.delete(firstKey);\n }\n this.map.set(key, value);\n }\n return this;\n }\n };\n module.exports = LRUCache;\n }\n });\n\n // ../../../node_modules/.pnpm/semver@7.7.2/node_modules/semver/classes/range.js\n var require_range = __commonJS({\n \"../../../node_modules/.pnpm/semver@7.7.2/node_modules/semver/classes/range.js\"(exports3, module) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n var SPACE_CHARACTERS = /\\s+/g;\n var Range = class _Range {\n constructor(range, options) {\n options = parseOptions(options);\n if (range instanceof _Range) {\n if (range.loose === !!options.loose && range.includePrerelease === !!options.includePrerelease) {\n return range;\n } else {\n return new _Range(range.raw, options);\n }\n }\n if (range instanceof Comparator) {\n this.raw = range.value;\n this.set = [[range]];\n this.formatted = void 0;\n return this;\n }\n this.options = options;\n this.loose = !!options.loose;\n this.includePrerelease = !!options.includePrerelease;\n this.raw = range.trim().replace(SPACE_CHARACTERS, \" \");\n this.set = this.raw.split(\"||\").map((r2) => this.parseRange(r2.trim())).filter((c4) => c4.length);\n if (!this.set.length) {\n throw new TypeError(`Invalid SemVer Range: ${this.raw}`);\n }\n if (this.set.length > 1) {\n const first = this.set[0];\n this.set = this.set.filter((c4) => !isNullSet(c4[0]));\n if (this.set.length === 0) {\n this.set = [first];\n } else if (this.set.length > 1) {\n for (const c4 of this.set) {\n if (c4.length === 1 && isAny(c4[0])) {\n this.set = [c4];\n break;\n }\n }\n }\n }\n this.formatted = void 0;\n }\n get range() {\n if (this.formatted === void 0) {\n this.formatted = \"\";\n for (let i3 = 0; i3 < this.set.length; i3++) {\n if (i3 > 0) {\n this.formatted += \"||\";\n }\n const comps = this.set[i3];\n for (let k4 = 0; k4 < comps.length; k4++) {\n if (k4 > 0) {\n this.formatted += \" \";\n }\n this.formatted += comps[k4].toString().trim();\n }\n }\n }\n return this.formatted;\n }\n format() {\n return this.range;\n }\n toString() {\n return this.range;\n }\n parseRange(range) {\n const memoOpts = (this.options.includePrerelease && FLAG_INCLUDE_PRERELEASE) | (this.options.loose && FLAG_LOOSE);\n const memoKey = memoOpts + \":\" + range;\n const cached = cache.get(memoKey);\n if (cached) {\n return cached;\n }\n const loose = this.options.loose;\n const hr = loose ? re[t3.HYPHENRANGELOOSE] : re[t3.HYPHENRANGE];\n range = range.replace(hr, hyphenReplace(this.options.includePrerelease));\n debug(\"hyphen replace\", range);\n range = range.replace(re[t3.COMPARATORTRIM], comparatorTrimReplace);\n debug(\"comparator trim\", range);\n range = range.replace(re[t3.TILDETRIM], tildeTrimReplace);\n debug(\"tilde trim\", range);\n range = range.replace(re[t3.CARETTRIM], caretTrimReplace);\n debug(\"caret trim\", range);\n let rangeList = range.split(\" \").map((comp) => parseComparator(comp, this.options)).join(\" \").split(/\\s+/).map((comp) => replaceGTE0(comp, this.options));\n if (loose) {\n rangeList = rangeList.filter((comp) => {\n debug(\"loose invalid filter\", comp, this.options);\n return !!comp.match(re[t3.COMPARATORLOOSE]);\n });\n }\n debug(\"range list\", rangeList);\n const rangeMap = /* @__PURE__ */ new Map();\n const comparators = rangeList.map((comp) => new Comparator(comp, this.options));\n for (const comp of comparators) {\n if (isNullSet(comp)) {\n return [comp];\n }\n rangeMap.set(comp.value, comp);\n }\n if (rangeMap.size > 1 && rangeMap.has(\"\")) {\n rangeMap.delete(\"\");\n }\n const result = [...rangeMap.values()];\n cache.set(memoKey, result);\n return result;\n }\n intersects(range, options) {\n if (!(range instanceof _Range)) {\n throw new TypeError(\"a Range is required\");\n }\n return this.set.some((thisComparators) => {\n return isSatisfiable(thisComparators, options) && range.set.some((rangeComparators) => {\n return isSatisfiable(rangeComparators, options) && thisComparators.every((thisComparator) => {\n return rangeComparators.every((rangeComparator) => {\n return thisComparator.intersects(rangeComparator, options);\n });\n });\n });\n });\n }\n // if ANY of the sets match ALL of its comparators, then pass\n test(version6) {\n if (!version6) {\n return false;\n }\n if (typeof version6 === \"string\") {\n try {\n version6 = new SemVer(version6, this.options);\n } catch (er) {\n return false;\n }\n }\n for (let i3 = 0; i3 < this.set.length; i3++) {\n if (testSet(this.set[i3], version6, this.options)) {\n return true;\n }\n }\n return false;\n }\n };\n module.exports = Range;\n var LRU = require_lrucache();\n var cache = new LRU();\n var parseOptions = require_parse_options();\n var Comparator = require_comparator();\n var debug = require_debug();\n var SemVer = require_semver();\n var {\n safeRe: re,\n t: t3,\n comparatorTrimReplace,\n tildeTrimReplace,\n caretTrimReplace\n } = require_re();\n var { FLAG_INCLUDE_PRERELEASE, FLAG_LOOSE } = require_constants();\n var isNullSet = (c4) => c4.value === \"<0.0.0-0\";\n var isAny = (c4) => c4.value === \"\";\n var isSatisfiable = (comparators, options) => {\n let result = true;\n const remainingComparators = comparators.slice();\n let testComparator = remainingComparators.pop();\n while (result && remainingComparators.length) {\n result = remainingComparators.every((otherComparator) => {\n return testComparator.intersects(otherComparator, options);\n });\n testComparator = remainingComparators.pop();\n }\n return result;\n };\n var parseComparator = (comp, options) => {\n debug(\"comp\", comp, options);\n comp = replaceCarets(comp, options);\n debug(\"caret\", comp);\n comp = replaceTildes(comp, options);\n debug(\"tildes\", comp);\n comp = replaceXRanges(comp, options);\n debug(\"xrange\", comp);\n comp = replaceStars(comp, options);\n debug(\"stars\", comp);\n return comp;\n };\n var isX = (id) => !id || id.toLowerCase() === \"x\" || id === \"*\";\n var replaceTildes = (comp, options) => {\n return comp.trim().split(/\\s+/).map((c4) => replaceTilde(c4, options)).join(\" \");\n };\n var replaceTilde = (comp, options) => {\n const r2 = options.loose ? re[t3.TILDELOOSE] : re[t3.TILDE];\n return comp.replace(r2, (_2, M2, m2, p4, pr) => {\n debug(\"tilde\", comp, _2, M2, m2, p4, pr);\n let ret;\n if (isX(M2)) {\n ret = \"\";\n } else if (isX(m2)) {\n ret = `>=${M2}.0.0 <${+M2 + 1}.0.0-0`;\n } else if (isX(p4)) {\n ret = `>=${M2}.${m2}.0 <${M2}.${+m2 + 1}.0-0`;\n } else if (pr) {\n debug(\"replaceTilde pr\", pr);\n ret = `>=${M2}.${m2}.${p4}-${pr} <${M2}.${+m2 + 1}.0-0`;\n } else {\n ret = `>=${M2}.${m2}.${p4} <${M2}.${+m2 + 1}.0-0`;\n }\n debug(\"tilde return\", ret);\n return ret;\n });\n };\n var replaceCarets = (comp, options) => {\n return comp.trim().split(/\\s+/).map((c4) => replaceCaret(c4, options)).join(\" \");\n };\n var replaceCaret = (comp, options) => {\n debug(\"caret\", comp, options);\n const r2 = options.loose ? re[t3.CARETLOOSE] : re[t3.CARET];\n const z2 = options.includePrerelease ? \"-0\" : \"\";\n return comp.replace(r2, (_2, M2, m2, p4, pr) => {\n debug(\"caret\", comp, _2, M2, m2, p4, pr);\n let ret;\n if (isX(M2)) {\n ret = \"\";\n } else if (isX(m2)) {\n ret = `>=${M2}.0.0${z2} <${+M2 + 1}.0.0-0`;\n } else if (isX(p4)) {\n if (M2 === \"0\") {\n ret = `>=${M2}.${m2}.0${z2} <${M2}.${+m2 + 1}.0-0`;\n } else {\n ret = `>=${M2}.${m2}.0${z2} <${+M2 + 1}.0.0-0`;\n }\n } else if (pr) {\n debug(\"replaceCaret pr\", pr);\n if (M2 === \"0\") {\n if (m2 === \"0\") {\n ret = `>=${M2}.${m2}.${p4}-${pr} <${M2}.${m2}.${+p4 + 1}-0`;\n } else {\n ret = `>=${M2}.${m2}.${p4}-${pr} <${M2}.${+m2 + 1}.0-0`;\n }\n } else {\n ret = `>=${M2}.${m2}.${p4}-${pr} <${+M2 + 1}.0.0-0`;\n }\n } else {\n debug(\"no pr\");\n if (M2 === \"0\") {\n if (m2 === \"0\") {\n ret = `>=${M2}.${m2}.${p4}${z2} <${M2}.${m2}.${+p4 + 1}-0`;\n } else {\n ret = `>=${M2}.${m2}.${p4}${z2} <${M2}.${+m2 + 1}.0-0`;\n }\n } else {\n ret = `>=${M2}.${m2}.${p4} <${+M2 + 1}.0.0-0`;\n }\n }\n debug(\"caret return\", ret);\n return ret;\n });\n };\n var replaceXRanges = (comp, options) => {\n debug(\"replaceXRanges\", comp, options);\n return comp.split(/\\s+/).map((c4) => replaceXRange(c4, options)).join(\" \");\n };\n var replaceXRange = (comp, options) => {\n comp = comp.trim();\n const r2 = options.loose ? re[t3.XRANGELOOSE] : re[t3.XRANGE];\n return comp.replace(r2, (ret, gtlt, M2, m2, p4, pr) => {\n debug(\"xRange\", comp, ret, gtlt, M2, m2, p4, pr);\n const xM = isX(M2);\n const xm = xM || isX(m2);\n const xp = xm || isX(p4);\n const anyX = xp;\n if (gtlt === \"=\" && anyX) {\n gtlt = \"\";\n }\n pr = options.includePrerelease ? \"-0\" : \"\";\n if (xM) {\n if (gtlt === \">\" || gtlt === \"<\") {\n ret = \"<0.0.0-0\";\n } else {\n ret = \"*\";\n }\n } else if (gtlt && anyX) {\n if (xm) {\n m2 = 0;\n }\n p4 = 0;\n if (gtlt === \">\") {\n gtlt = \">=\";\n if (xm) {\n M2 = +M2 + 1;\n m2 = 0;\n p4 = 0;\n } else {\n m2 = +m2 + 1;\n p4 = 0;\n }\n } else if (gtlt === \"<=\") {\n gtlt = \"<\";\n if (xm) {\n M2 = +M2 + 1;\n } else {\n m2 = +m2 + 1;\n }\n }\n if (gtlt === \"<\") {\n pr = \"-0\";\n }\n ret = `${gtlt + M2}.${m2}.${p4}${pr}`;\n } else if (xm) {\n ret = `>=${M2}.0.0${pr} <${+M2 + 1}.0.0-0`;\n } else if (xp) {\n ret = `>=${M2}.${m2}.0${pr} <${M2}.${+m2 + 1}.0-0`;\n }\n debug(\"xRange return\", ret);\n return ret;\n });\n };\n var replaceStars = (comp, options) => {\n debug(\"replaceStars\", comp, options);\n return comp.trim().replace(re[t3.STAR], \"\");\n };\n var replaceGTE0 = (comp, options) => {\n debug(\"replaceGTE0\", comp, options);\n return comp.trim().replace(re[options.includePrerelease ? t3.GTE0PRE : t3.GTE0], \"\");\n };\n var hyphenReplace = (incPr) => ($0, from14, fM, fm, fp, fpr, fb, to, tM, tm, tp, tpr) => {\n if (isX(fM)) {\n from14 = \"\";\n } else if (isX(fm)) {\n from14 = `>=${fM}.0.0${incPr ? \"-0\" : \"\"}`;\n } else if (isX(fp)) {\n from14 = `>=${fM}.${fm}.0${incPr ? \"-0\" : \"\"}`;\n } else if (fpr) {\n from14 = `>=${from14}`;\n } else {\n from14 = `>=${from14}${incPr ? \"-0\" : \"\"}`;\n }\n if (isX(tM)) {\n to = \"\";\n } else if (isX(tm)) {\n to = `<${+tM + 1}.0.0-0`;\n } else if (isX(tp)) {\n to = `<${tM}.${+tm + 1}.0-0`;\n } else if (tpr) {\n to = `<=${tM}.${tm}.${tp}-${tpr}`;\n } else if (incPr) {\n to = `<${tM}.${tm}.${+tp + 1}-0`;\n } else {\n to = `<=${to}`;\n }\n return `${from14} ${to}`.trim();\n };\n var testSet = (set, version6, options) => {\n for (let i3 = 0; i3 < set.length; i3++) {\n if (!set[i3].test(version6)) {\n return false;\n }\n }\n if (version6.prerelease.length && !options.includePrerelease) {\n for (let i3 = 0; i3 < set.length; i3++) {\n debug(set[i3].semver);\n if (set[i3].semver === Comparator.ANY) {\n continue;\n }\n if (set[i3].semver.prerelease.length > 0) {\n const allowed = set[i3].semver;\n if (allowed.major === version6.major && allowed.minor === version6.minor && allowed.patch === version6.patch) {\n return true;\n }\n }\n }\n return false;\n }\n return true;\n };\n }\n });\n\n // ../../../node_modules/.pnpm/semver@7.7.2/node_modules/semver/classes/comparator.js\n var require_comparator = __commonJS({\n \"../../../node_modules/.pnpm/semver@7.7.2/node_modules/semver/classes/comparator.js\"(exports3, module) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n var ANY = Symbol(\"SemVer ANY\");\n var Comparator = class _Comparator {\n static get ANY() {\n return ANY;\n }\n constructor(comp, options) {\n options = parseOptions(options);\n if (comp instanceof _Comparator) {\n if (comp.loose === !!options.loose) {\n return comp;\n } else {\n comp = comp.value;\n }\n }\n comp = comp.trim().split(/\\s+/).join(\" \");\n debug(\"comparator\", comp, options);\n this.options = options;\n this.loose = !!options.loose;\n this.parse(comp);\n if (this.semver === ANY) {\n this.value = \"\";\n } else {\n this.value = this.operator + this.semver.version;\n }\n debug(\"comp\", this);\n }\n parse(comp) {\n const r2 = this.options.loose ? re[t3.COMPARATORLOOSE] : re[t3.COMPARATOR];\n const m2 = comp.match(r2);\n if (!m2) {\n throw new TypeError(`Invalid comparator: ${comp}`);\n }\n this.operator = m2[1] !== void 0 ? m2[1] : \"\";\n if (this.operator === \"=\") {\n this.operator = \"\";\n }\n if (!m2[2]) {\n this.semver = ANY;\n } else {\n this.semver = new SemVer(m2[2], this.options.loose);\n }\n }\n toString() {\n return this.value;\n }\n test(version6) {\n debug(\"Comparator.test\", version6, this.options.loose);\n if (this.semver === ANY || version6 === ANY) {\n return true;\n }\n if (typeof version6 === \"string\") {\n try {\n version6 = new SemVer(version6, this.options);\n } catch (er) {\n return false;\n }\n }\n return cmp(version6, this.operator, this.semver, this.options);\n }\n intersects(comp, options) {\n if (!(comp instanceof _Comparator)) {\n throw new TypeError(\"a Comparator is required\");\n }\n if (this.operator === \"\") {\n if (this.value === \"\") {\n return true;\n }\n return new Range(comp.value, options).test(this.value);\n } else if (comp.operator === \"\") {\n if (comp.value === \"\") {\n return true;\n }\n return new Range(this.value, options).test(comp.semver);\n }\n options = parseOptions(options);\n if (options.includePrerelease && (this.value === \"<0.0.0-0\" || comp.value === \"<0.0.0-0\")) {\n return false;\n }\n if (!options.includePrerelease && (this.value.startsWith(\"<0.0.0\") || comp.value.startsWith(\"<0.0.0\"))) {\n return false;\n }\n if (this.operator.startsWith(\">\") && comp.operator.startsWith(\">\")) {\n return true;\n }\n if (this.operator.startsWith(\"<\") && comp.operator.startsWith(\"<\")) {\n return true;\n }\n if (this.semver.version === comp.semver.version && this.operator.includes(\"=\") && comp.operator.includes(\"=\")) {\n return true;\n }\n if (cmp(this.semver, \"<\", comp.semver, options) && this.operator.startsWith(\">\") && comp.operator.startsWith(\"<\")) {\n return true;\n }\n if (cmp(this.semver, \">\", comp.semver, options) && this.operator.startsWith(\"<\") && comp.operator.startsWith(\">\")) {\n return true;\n }\n return false;\n }\n };\n module.exports = Comparator;\n var parseOptions = require_parse_options();\n var { safeRe: re, t: t3 } = require_re();\n var cmp = require_cmp();\n var debug = require_debug();\n var SemVer = require_semver();\n var Range = require_range();\n }\n });\n\n // ../../../node_modules/.pnpm/semver@7.7.2/node_modules/semver/functions/satisfies.js\n var require_satisfies = __commonJS({\n \"../../../node_modules/.pnpm/semver@7.7.2/node_modules/semver/functions/satisfies.js\"(exports3, module) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n var Range = require_range();\n var satisfies = (version6, range, options) => {\n try {\n range = new Range(range, options);\n } catch (er) {\n return false;\n }\n return range.test(version6);\n };\n module.exports = satisfies;\n }\n });\n\n // ../../../node_modules/.pnpm/semver@7.7.2/node_modules/semver/ranges/to-comparators.js\n var require_to_comparators = __commonJS({\n \"../../../node_modules/.pnpm/semver@7.7.2/node_modules/semver/ranges/to-comparators.js\"(exports3, module) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n var Range = require_range();\n var toComparators = (range, options) => new Range(range, options).set.map((comp) => comp.map((c4) => c4.value).join(\" \").trim().split(\" \"));\n module.exports = toComparators;\n }\n });\n\n // ../../../node_modules/.pnpm/semver@7.7.2/node_modules/semver/ranges/max-satisfying.js\n var require_max_satisfying = __commonJS({\n \"../../../node_modules/.pnpm/semver@7.7.2/node_modules/semver/ranges/max-satisfying.js\"(exports3, module) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n var SemVer = require_semver();\n var Range = require_range();\n var maxSatisfying = (versions2, range, options) => {\n let max = null;\n let maxSV = null;\n let rangeObj = null;\n try {\n rangeObj = new Range(range, options);\n } catch (er) {\n return null;\n }\n versions2.forEach((v2) => {\n if (rangeObj.test(v2)) {\n if (!max || maxSV.compare(v2) === -1) {\n max = v2;\n maxSV = new SemVer(max, options);\n }\n }\n });\n return max;\n };\n module.exports = maxSatisfying;\n }\n });\n\n // ../../../node_modules/.pnpm/semver@7.7.2/node_modules/semver/ranges/min-satisfying.js\n var require_min_satisfying = __commonJS({\n \"../../../node_modules/.pnpm/semver@7.7.2/node_modules/semver/ranges/min-satisfying.js\"(exports3, module) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n var SemVer = require_semver();\n var Range = require_range();\n var minSatisfying = (versions2, range, options) => {\n let min = null;\n let minSV = null;\n let rangeObj = null;\n try {\n rangeObj = new Range(range, options);\n } catch (er) {\n return null;\n }\n versions2.forEach((v2) => {\n if (rangeObj.test(v2)) {\n if (!min || minSV.compare(v2) === 1) {\n min = v2;\n minSV = new SemVer(min, options);\n }\n }\n });\n return min;\n };\n module.exports = minSatisfying;\n }\n });\n\n // ../../../node_modules/.pnpm/semver@7.7.2/node_modules/semver/ranges/min-version.js\n var require_min_version = __commonJS({\n \"../../../node_modules/.pnpm/semver@7.7.2/node_modules/semver/ranges/min-version.js\"(exports3, module) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n var SemVer = require_semver();\n var Range = require_range();\n var gt = require_gt();\n var minVersion = (range, loose) => {\n range = new Range(range, loose);\n let minver = new SemVer(\"0.0.0\");\n if (range.test(minver)) {\n return minver;\n }\n minver = new SemVer(\"0.0.0-0\");\n if (range.test(minver)) {\n return minver;\n }\n minver = null;\n for (let i3 = 0; i3 < range.set.length; ++i3) {\n const comparators = range.set[i3];\n let setMin = null;\n comparators.forEach((comparator) => {\n const compver = new SemVer(comparator.semver.version);\n switch (comparator.operator) {\n case \">\":\n if (compver.prerelease.length === 0) {\n compver.patch++;\n } else {\n compver.prerelease.push(0);\n }\n compver.raw = compver.format();\n case \"\":\n case \">=\":\n if (!setMin || gt(compver, setMin)) {\n setMin = compver;\n }\n break;\n case \"<\":\n case \"<=\":\n break;\n default:\n throw new Error(`Unexpected operation: ${comparator.operator}`);\n }\n });\n if (setMin && (!minver || gt(minver, setMin))) {\n minver = setMin;\n }\n }\n if (minver && range.test(minver)) {\n return minver;\n }\n return null;\n };\n module.exports = minVersion;\n }\n });\n\n // ../../../node_modules/.pnpm/semver@7.7.2/node_modules/semver/ranges/valid.js\n var require_valid2 = __commonJS({\n \"../../../node_modules/.pnpm/semver@7.7.2/node_modules/semver/ranges/valid.js\"(exports3, module) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n var Range = require_range();\n var validRange = (range, options) => {\n try {\n return new Range(range, options).range || \"*\";\n } catch (er) {\n return null;\n }\n };\n module.exports = validRange;\n }\n });\n\n // ../../../node_modules/.pnpm/semver@7.7.2/node_modules/semver/ranges/outside.js\n var require_outside = __commonJS({\n \"../../../node_modules/.pnpm/semver@7.7.2/node_modules/semver/ranges/outside.js\"(exports3, module) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n var SemVer = require_semver();\n var Comparator = require_comparator();\n var { ANY } = Comparator;\n var Range = require_range();\n var satisfies = require_satisfies();\n var gt = require_gt();\n var lt = require_lt();\n var lte = require_lte();\n var gte = require_gte();\n var outside = (version6, range, hilo, options) => {\n version6 = new SemVer(version6, options);\n range = new Range(range, options);\n let gtfn, ltefn, ltfn, comp, ecomp;\n switch (hilo) {\n case \">\":\n gtfn = gt;\n ltefn = lte;\n ltfn = lt;\n comp = \">\";\n ecomp = \">=\";\n break;\n case \"<\":\n gtfn = lt;\n ltefn = gte;\n ltfn = gt;\n comp = \"<\";\n ecomp = \"<=\";\n break;\n default:\n throw new TypeError('Must provide a hilo val of \"<\" or \">\"');\n }\n if (satisfies(version6, range, options)) {\n return false;\n }\n for (let i3 = 0; i3 < range.set.length; ++i3) {\n const comparators = range.set[i3];\n let high = null;\n let low = null;\n comparators.forEach((comparator) => {\n if (comparator.semver === ANY) {\n comparator = new Comparator(\">=0.0.0\");\n }\n high = high || comparator;\n low = low || comparator;\n if (gtfn(comparator.semver, high.semver, options)) {\n high = comparator;\n } else if (ltfn(comparator.semver, low.semver, options)) {\n low = comparator;\n }\n });\n if (high.operator === comp || high.operator === ecomp) {\n return false;\n }\n if ((!low.operator || low.operator === comp) && ltefn(version6, low.semver)) {\n return false;\n } else if (low.operator === ecomp && ltfn(version6, low.semver)) {\n return false;\n }\n }\n return true;\n };\n module.exports = outside;\n }\n });\n\n // ../../../node_modules/.pnpm/semver@7.7.2/node_modules/semver/ranges/gtr.js\n var require_gtr = __commonJS({\n \"../../../node_modules/.pnpm/semver@7.7.2/node_modules/semver/ranges/gtr.js\"(exports3, module) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n var outside = require_outside();\n var gtr = (version6, range, options) => outside(version6, range, \">\", options);\n module.exports = gtr;\n }\n });\n\n // ../../../node_modules/.pnpm/semver@7.7.2/node_modules/semver/ranges/ltr.js\n var require_ltr = __commonJS({\n \"../../../node_modules/.pnpm/semver@7.7.2/node_modules/semver/ranges/ltr.js\"(exports3, module) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n var outside = require_outside();\n var ltr = (version6, range, options) => outside(version6, range, \"<\", options);\n module.exports = ltr;\n }\n });\n\n // ../../../node_modules/.pnpm/semver@7.7.2/node_modules/semver/ranges/intersects.js\n var require_intersects = __commonJS({\n \"../../../node_modules/.pnpm/semver@7.7.2/node_modules/semver/ranges/intersects.js\"(exports3, module) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n var Range = require_range();\n var intersects = (r1, r2, options) => {\n r1 = new Range(r1, options);\n r2 = new Range(r2, options);\n return r1.intersects(r2, options);\n };\n module.exports = intersects;\n }\n });\n\n // ../../../node_modules/.pnpm/semver@7.7.2/node_modules/semver/ranges/simplify.js\n var require_simplify = __commonJS({\n \"../../../node_modules/.pnpm/semver@7.7.2/node_modules/semver/ranges/simplify.js\"(exports3, module) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n var satisfies = require_satisfies();\n var compare = require_compare();\n module.exports = (versions2, range, options) => {\n const set = [];\n let first = null;\n let prev = null;\n const v2 = versions2.sort((a3, b4) => compare(a3, b4, options));\n for (const version6 of v2) {\n const included = satisfies(version6, range, options);\n if (included) {\n prev = version6;\n if (!first) {\n first = version6;\n }\n } else {\n if (prev) {\n set.push([first, prev]);\n }\n prev = null;\n first = null;\n }\n }\n if (first) {\n set.push([first, null]);\n }\n const ranges = [];\n for (const [min, max] of set) {\n if (min === max) {\n ranges.push(min);\n } else if (!max && min === v2[0]) {\n ranges.push(\"*\");\n } else if (!max) {\n ranges.push(`>=${min}`);\n } else if (min === v2[0]) {\n ranges.push(`<=${max}`);\n } else {\n ranges.push(`${min} - ${max}`);\n }\n }\n const simplified = ranges.join(\" || \");\n const original = typeof range.raw === \"string\" ? range.raw : String(range);\n return simplified.length < original.length ? simplified : range;\n };\n }\n });\n\n // ../../../node_modules/.pnpm/semver@7.7.2/node_modules/semver/ranges/subset.js\n var require_subset = __commonJS({\n \"../../../node_modules/.pnpm/semver@7.7.2/node_modules/semver/ranges/subset.js\"(exports3, module) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n var Range = require_range();\n var Comparator = require_comparator();\n var { ANY } = Comparator;\n var satisfies = require_satisfies();\n var compare = require_compare();\n var subset = (sub, dom, options = {}) => {\n if (sub === dom) {\n return true;\n }\n sub = new Range(sub, options);\n dom = new Range(dom, options);\n let sawNonNull = false;\n OUTER:\n for (const simpleSub of sub.set) {\n for (const simpleDom of dom.set) {\n const isSub = simpleSubset(simpleSub, simpleDom, options);\n sawNonNull = sawNonNull || isSub !== null;\n if (isSub) {\n continue OUTER;\n }\n }\n if (sawNonNull) {\n return false;\n }\n }\n return true;\n };\n var minimumVersionWithPreRelease = [new Comparator(\">=0.0.0-0\")];\n var minimumVersion = [new Comparator(\">=0.0.0\")];\n var simpleSubset = (sub, dom, options) => {\n if (sub === dom) {\n return true;\n }\n if (sub.length === 1 && sub[0].semver === ANY) {\n if (dom.length === 1 && dom[0].semver === ANY) {\n return true;\n } else if (options.includePrerelease) {\n sub = minimumVersionWithPreRelease;\n } else {\n sub = minimumVersion;\n }\n }\n if (dom.length === 1 && dom[0].semver === ANY) {\n if (options.includePrerelease) {\n return true;\n } else {\n dom = minimumVersion;\n }\n }\n const eqSet = /* @__PURE__ */ new Set();\n let gt, lt;\n for (const c4 of sub) {\n if (c4.operator === \">\" || c4.operator === \">=\") {\n gt = higherGT(gt, c4, options);\n } else if (c4.operator === \"<\" || c4.operator === \"<=\") {\n lt = lowerLT(lt, c4, options);\n } else {\n eqSet.add(c4.semver);\n }\n }\n if (eqSet.size > 1) {\n return null;\n }\n let gtltComp;\n if (gt && lt) {\n gtltComp = compare(gt.semver, lt.semver, options);\n if (gtltComp > 0) {\n return null;\n } else if (gtltComp === 0 && (gt.operator !== \">=\" || lt.operator !== \"<=\")) {\n return null;\n }\n }\n for (const eq of eqSet) {\n if (gt && !satisfies(eq, String(gt), options)) {\n return null;\n }\n if (lt && !satisfies(eq, String(lt), options)) {\n return null;\n }\n for (const c4 of dom) {\n if (!satisfies(eq, String(c4), options)) {\n return false;\n }\n }\n return true;\n }\n let higher, lower;\n let hasDomLT, hasDomGT;\n let needDomLTPre = lt && !options.includePrerelease && lt.semver.prerelease.length ? lt.semver : false;\n let needDomGTPre = gt && !options.includePrerelease && gt.semver.prerelease.length ? gt.semver : false;\n if (needDomLTPre && needDomLTPre.prerelease.length === 1 && lt.operator === \"<\" && needDomLTPre.prerelease[0] === 0) {\n needDomLTPre = false;\n }\n for (const c4 of dom) {\n hasDomGT = hasDomGT || c4.operator === \">\" || c4.operator === \">=\";\n hasDomLT = hasDomLT || c4.operator === \"<\" || c4.operator === \"<=\";\n if (gt) {\n if (needDomGTPre) {\n if (c4.semver.prerelease && c4.semver.prerelease.length && c4.semver.major === needDomGTPre.major && c4.semver.minor === needDomGTPre.minor && c4.semver.patch === needDomGTPre.patch) {\n needDomGTPre = false;\n }\n }\n if (c4.operator === \">\" || c4.operator === \">=\") {\n higher = higherGT(gt, c4, options);\n if (higher === c4 && higher !== gt) {\n return false;\n }\n } else if (gt.operator === \">=\" && !satisfies(gt.semver, String(c4), options)) {\n return false;\n }\n }\n if (lt) {\n if (needDomLTPre) {\n if (c4.semver.prerelease && c4.semver.prerelease.length && c4.semver.major === needDomLTPre.major && c4.semver.minor === needDomLTPre.minor && c4.semver.patch === needDomLTPre.patch) {\n needDomLTPre = false;\n }\n }\n if (c4.operator === \"<\" || c4.operator === \"<=\") {\n lower = lowerLT(lt, c4, options);\n if (lower === c4 && lower !== lt) {\n return false;\n }\n } else if (lt.operator === \"<=\" && !satisfies(lt.semver, String(c4), options)) {\n return false;\n }\n }\n if (!c4.operator && (lt || gt) && gtltComp !== 0) {\n return false;\n }\n }\n if (gt && hasDomLT && !lt && gtltComp !== 0) {\n return false;\n }\n if (lt && hasDomGT && !gt && gtltComp !== 0) {\n return false;\n }\n if (needDomGTPre || needDomLTPre) {\n return false;\n }\n return true;\n };\n var higherGT = (a3, b4, options) => {\n if (!a3) {\n return b4;\n }\n const comp = compare(a3.semver, b4.semver, options);\n return comp > 0 ? a3 : comp < 0 ? b4 : b4.operator === \">\" && a3.operator === \">=\" ? b4 : a3;\n };\n var lowerLT = (a3, b4, options) => {\n if (!a3) {\n return b4;\n }\n const comp = compare(a3.semver, b4.semver, options);\n return comp < 0 ? a3 : comp > 0 ? b4 : b4.operator === \"<\" && a3.operator === \"<=\" ? b4 : a3;\n };\n module.exports = subset;\n }\n });\n\n // ../../../node_modules/.pnpm/semver@7.7.2/node_modules/semver/index.js\n var require_semver2 = __commonJS({\n \"../../../node_modules/.pnpm/semver@7.7.2/node_modules/semver/index.js\"(exports3, module) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n var internalRe = require_re();\n var constants = require_constants();\n var SemVer = require_semver();\n var identifiers = require_identifiers();\n var parse = require_parse();\n var valid = require_valid();\n var clean3 = require_clean();\n var inc = require_inc();\n var diff = require_diff();\n var major = require_major();\n var minor = require_minor();\n var patch = require_patch();\n var prerelease = require_prerelease();\n var compare = require_compare();\n var rcompare = require_rcompare();\n var compareLoose = require_compare_loose();\n var compareBuild = require_compare_build();\n var sort = require_sort();\n var rsort = require_rsort();\n var gt = require_gt();\n var lt = require_lt();\n var eq = require_eq();\n var neq = require_neq();\n var gte = require_gte();\n var lte = require_lte();\n var cmp = require_cmp();\n var coerce2 = require_coerce();\n var Comparator = require_comparator();\n var Range = require_range();\n var satisfies = require_satisfies();\n var toComparators = require_to_comparators();\n var maxSatisfying = require_max_satisfying();\n var minSatisfying = require_min_satisfying();\n var minVersion = require_min_version();\n var validRange = require_valid2();\n var outside = require_outside();\n var gtr = require_gtr();\n var ltr = require_ltr();\n var intersects = require_intersects();\n var simplifyRange = require_simplify();\n var subset = require_subset();\n module.exports = {\n parse,\n valid,\n clean: clean3,\n inc,\n diff,\n major,\n minor,\n patch,\n prerelease,\n compare,\n rcompare,\n compareLoose,\n compareBuild,\n sort,\n rsort,\n gt,\n lt,\n eq,\n neq,\n gte,\n lte,\n cmp,\n coerce: coerce2,\n Comparator,\n Range,\n satisfies,\n toComparators,\n maxSatisfying,\n minSatisfying,\n minVersion,\n validRange,\n outside,\n gtr,\n ltr,\n intersects,\n simplifyRange,\n subset,\n SemVer,\n re: internalRe.re,\n src: internalRe.src,\n tokens: internalRe.t,\n SEMVER_SPEC_VERSION: constants.SEMVER_SPEC_VERSION,\n RELEASE_TYPES: constants.RELEASE_TYPES,\n compareIdentifiers: identifiers.compareIdentifiers,\n rcompareIdentifiers: identifiers.rcompareIdentifiers\n };\n }\n });\n\n // ../../libs/ability-sdk/dist/src/lib/constants.js\n var require_constants2 = __commonJS({\n \"../../libs/ability-sdk/dist/src/lib/constants.js\"(exports3) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n Object.defineProperty(exports3, \"__esModule\", { value: true });\n exports3.VINCENT_TOOL_API_VERSION = void 0;\n exports3.VINCENT_TOOL_API_VERSION = \"2.0.0\";\n }\n });\n\n // ../../libs/ability-sdk/dist/src/lib/assertSupportedAbilityVersion.js\n var require_assertSupportedAbilityVersion = __commonJS({\n \"../../libs/ability-sdk/dist/src/lib/assertSupportedAbilityVersion.js\"(exports3) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n Object.defineProperty(exports3, \"__esModule\", { value: true });\n exports3.assertSupportedAbilityVersion = assertSupportedAbilityVersion;\n var semver_1 = require_semver2();\n var constants_1 = require_constants2();\n function assertSupportedAbilityVersion(abilityVersionSemver) {\n if (!abilityVersionSemver) {\n throw new Error(\"Ability version is required\");\n }\n if ((0, semver_1.major)(abilityVersionSemver) !== (0, semver_1.major)(constants_1.VINCENT_TOOL_API_VERSION)) {\n throw new Error(`Ability version ${abilityVersionSemver} is not supported. Current version: ${constants_1.VINCENT_TOOL_API_VERSION}. Major versions must match.`);\n }\n }\n }\n });\n\n // ../../libs/ability-sdk/dist/src/lib/utils.js\n var require_utils = __commonJS({\n \"../../libs/ability-sdk/dist/src/lib/utils.js\"(exports3) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n Object.defineProperty(exports3, \"__esModule\", { value: true });\n exports3.bigintReplacer = void 0;\n var bigintReplacer = (key, value) => {\n return typeof value === \"bigint\" ? value.toString() : value;\n };\n exports3.bigintReplacer = bigintReplacer;\n }\n });\n\n // ../../libs/ability-sdk/dist/src/lib/policyCore/helpers/resultCreators.js\n var require_resultCreators = __commonJS({\n \"../../libs/ability-sdk/dist/src/lib/policyCore/helpers/resultCreators.js\"(exports3) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n Object.defineProperty(exports3, \"__esModule\", { value: true });\n exports3.createDenyResult = createDenyResult;\n exports3.createDenyNoResult = createDenyNoResult;\n exports3.createAllowResult = createAllowResult;\n exports3.createAllowEvaluationResult = createAllowEvaluationResult;\n exports3.createDenyEvaluationResult = createDenyEvaluationResult;\n exports3.wrapAllow = wrapAllow;\n exports3.wrapDeny = wrapDeny;\n exports3.returnNoResultDeny = returnNoResultDeny;\n exports3.isTypedAllowResponse = isTypedAllowResponse;\n function createDenyResult(params) {\n if (params.result === void 0) {\n return {\n allow: false,\n runtimeError: params.runtimeError,\n result: void 0,\n ...params.schemaValidationError ? { schemaValidationError: params.schemaValidationError } : {}\n };\n }\n return {\n allow: false,\n runtimeError: params.runtimeError,\n result: params.result,\n ...params.schemaValidationError ? { schemaValidationError: params.schemaValidationError } : {}\n };\n }\n function createDenyNoResult(runtimeError, schemaValidationError) {\n return createDenyResult({ runtimeError, schemaValidationError });\n }\n function createAllowResult(params) {\n if (params.result === void 0) {\n return {\n allow: true,\n result: void 0\n };\n }\n return {\n allow: true,\n result: params.result\n };\n }\n function createAllowEvaluationResult(params) {\n return {\n allow: true,\n evaluatedPolicies: params.evaluatedPolicies,\n allowedPolicies: params.allowedPolicies,\n deniedPolicy: void 0\n // important for union discrimination\n };\n }\n function createDenyEvaluationResult(params) {\n return {\n allow: false,\n evaluatedPolicies: params.evaluatedPolicies,\n allowedPolicies: params.allowedPolicies,\n deniedPolicy: params.deniedPolicy\n };\n }\n function wrapAllow(value) {\n return createAllowResult({ result: value });\n }\n function wrapDeny(runtimeError, result, schemaValidationError) {\n return createDenyResult({ runtimeError, result, schemaValidationError });\n }\n function returnNoResultDeny(runtimeError, schemaValidationError) {\n return createDenyNoResult(runtimeError, schemaValidationError);\n }\n function isTypedAllowResponse(val) {\n return typeof val === \"object\" && val !== null && val.allow === true;\n }\n }\n });\n\n // ../../libs/ability-sdk/dist/src/lib/policyCore/helpers/typeGuards.js\n var require_typeGuards = __commonJS({\n \"../../libs/ability-sdk/dist/src/lib/policyCore/helpers/typeGuards.js\"(exports3) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n Object.defineProperty(exports3, \"__esModule\", { value: true });\n exports3.isZodValidationDenyResult = isZodValidationDenyResult;\n exports3.isPolicyDenyResponse = isPolicyDenyResponse;\n exports3.isPolicyAllowResponse = isPolicyAllowResponse;\n exports3.isPolicyResponse = isPolicyResponse;\n function isZodValidationDenyResult(result) {\n return typeof result === \"object\" && result !== null && \"zodError\" in result;\n }\n function isPolicyDenyResponse(val) {\n return typeof val === \"object\" && val !== null && val.allow === false;\n }\n function isPolicyAllowResponse(val) {\n return typeof val === \"object\" && val !== null && val.allow === true;\n }\n function isPolicyResponse(value) {\n return typeof value === \"object\" && value !== null && \"allow\" in value && typeof value.allow === \"boolean\";\n }\n }\n });\n\n // ../../libs/ability-sdk/dist/src/lib/policyCore/helpers/zod.js\n var require_zod = __commonJS({\n \"../../libs/ability-sdk/dist/src/lib/policyCore/helpers/zod.js\"(exports3) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n Object.defineProperty(exports3, \"__esModule\", { value: true });\n exports3.PolicyResponseShape = void 0;\n exports3.validateOrDeny = validateOrDeny;\n exports3.getValidatedParamsOrDeny = getValidatedParamsOrDeny;\n exports3.getSchemaForPolicyResponseResult = getSchemaForPolicyResponseResult;\n var zod_1 = require_cjs();\n var utils_1 = require_utils();\n var resultCreators_1 = require_resultCreators();\n var typeGuards_1 = require_typeGuards();\n exports3.PolicyResponseShape = zod_1.z.object({\n allow: zod_1.z.boolean(),\n result: zod_1.z.unknown()\n });\n function validateOrDeny(value, schema, phase, stage) {\n const parsed = schema.safeParse(value);\n if (!parsed.success) {\n const descriptor = stage === \"input\" ? \"parameters\" : \"result\";\n const message = `Invalid ${phase} ${descriptor}.`;\n return (0, resultCreators_1.createDenyResult)({\n runtimeError: message,\n schemaValidationError: {\n zodError: parsed.error,\n phase,\n stage\n }\n });\n }\n return parsed.data;\n }\n function getValidatedParamsOrDeny({ rawAbilityParams, rawUserParams, abilityParamsSchema: abilityParamsSchema2, userParamsSchema, phase }) {\n const abilityParams2 = validateOrDeny(rawAbilityParams, abilityParamsSchema2, phase, \"input\");\n if ((0, typeGuards_1.isPolicyDenyResponse)(abilityParams2)) {\n return abilityParams2;\n }\n const userParams = validateOrDeny(rawUserParams, userParamsSchema, phase, \"input\");\n if ((0, typeGuards_1.isPolicyDenyResponse)(userParams)) {\n return userParams;\n }\n return {\n abilityParams: abilityParams2,\n userParams\n };\n }\n function getSchemaForPolicyResponseResult({ value, allowResultSchema, denyResultSchema }) {\n if (!(0, typeGuards_1.isPolicyResponse)(value)) {\n console.log(\"getSchemaForPolicyResponseResult !isPolicyResponse\", JSON.stringify(value, utils_1.bigintReplacer));\n return {\n schemaToUse: exports3.PolicyResponseShape,\n parsedType: \"unknown\"\n };\n }\n console.log(\"getSchemaForPolicyResponseResult value is\", JSON.stringify(value, utils_1.bigintReplacer));\n return {\n schemaToUse: value.allow ? allowResultSchema : denyResultSchema,\n parsedType: value.allow ? \"allow\" : \"deny\"\n };\n }\n }\n });\n\n // ../../libs/ability-sdk/dist/src/lib/policyCore/helpers/index.js\n var require_helpers = __commonJS({\n \"../../libs/ability-sdk/dist/src/lib/policyCore/helpers/index.js\"(exports3) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n Object.defineProperty(exports3, \"__esModule\", { value: true });\n exports3.getSchemaForPolicyResponseResult = exports3.getValidatedParamsOrDeny = exports3.validateOrDeny = exports3.isPolicyDenyResponse = exports3.isPolicyAllowResponse = exports3.isPolicyResponse = exports3.createDenyResult = void 0;\n var resultCreators_1 = require_resultCreators();\n Object.defineProperty(exports3, \"createDenyResult\", { enumerable: true, get: function() {\n return resultCreators_1.createDenyResult;\n } });\n var typeGuards_1 = require_typeGuards();\n Object.defineProperty(exports3, \"isPolicyResponse\", { enumerable: true, get: function() {\n return typeGuards_1.isPolicyResponse;\n } });\n Object.defineProperty(exports3, \"isPolicyAllowResponse\", { enumerable: true, get: function() {\n return typeGuards_1.isPolicyAllowResponse;\n } });\n Object.defineProperty(exports3, \"isPolicyDenyResponse\", { enumerable: true, get: function() {\n return typeGuards_1.isPolicyDenyResponse;\n } });\n var zod_1 = require_zod();\n Object.defineProperty(exports3, \"validateOrDeny\", { enumerable: true, get: function() {\n return zod_1.validateOrDeny;\n } });\n Object.defineProperty(exports3, \"getValidatedParamsOrDeny\", { enumerable: true, get: function() {\n return zod_1.getValidatedParamsOrDeny;\n } });\n var zod_2 = require_zod();\n Object.defineProperty(exports3, \"getSchemaForPolicyResponseResult\", { enumerable: true, get: function() {\n return zod_2.getSchemaForPolicyResponseResult;\n } });\n }\n });\n\n // ../../libs/ability-sdk/dist/src/lib/policyCore/policyConfig/context/resultCreators.js\n var require_resultCreators2 = __commonJS({\n \"../../libs/ability-sdk/dist/src/lib/policyCore/policyConfig/context/resultCreators.js\"(exports3) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n Object.defineProperty(exports3, \"__esModule\", { value: true });\n exports3.createAllow = createAllow;\n exports3.createAllowNoResult = createAllowNoResult;\n exports3.createDeny = createDeny;\n exports3.createDenyNoResult = createDenyNoResult;\n function createAllow(result) {\n return {\n allow: true,\n result\n };\n }\n function createAllowNoResult() {\n return {\n allow: true\n };\n }\n function createDeny(result) {\n return {\n allow: false,\n result\n };\n }\n function createDenyNoResult() {\n return {\n allow: false,\n result: void 0\n };\n }\n }\n });\n\n // ../../libs/ability-sdk/dist/src/lib/policyCore/policyConfig/context/policyConfigContext.js\n var require_policyConfigContext = __commonJS({\n \"../../libs/ability-sdk/dist/src/lib/policyCore/policyConfig/context/policyConfigContext.js\"(exports3) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n Object.defineProperty(exports3, \"__esModule\", { value: true });\n exports3.createPolicyContext = createPolicyContext;\n var resultCreators_1 = require_resultCreators2();\n function createPolicyContext({ baseContext }) {\n return {\n ...baseContext,\n allow: resultCreators_1.createAllow,\n deny: resultCreators_1.createDeny\n };\n }\n }\n });\n\n // ../../libs/ability-sdk/dist/src/lib/policyCore/vincentPolicy.js\n var require_vincentPolicy = __commonJS({\n \"../../libs/ability-sdk/dist/src/lib/policyCore/vincentPolicy.js\"(exports3) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n Object.defineProperty(exports3, \"__esModule\", { value: true });\n exports3.createVincentPolicy = createVincentPolicy;\n exports3.createVincentAbilityPolicy = createVincentAbilityPolicy;\n var zod_1 = require_cjs();\n var assertSupportedAbilityVersion_1 = require_assertSupportedAbilityVersion();\n var utils_1 = require_utils();\n var helpers_1 = require_helpers();\n var resultCreators_1 = require_resultCreators();\n var policyConfigContext_1 = require_policyConfigContext();\n function createVincentPolicy(PolicyConfig) {\n if (PolicyConfig.commitParamsSchema && !PolicyConfig.commit) {\n throw new Error(\"Policy defines commitParamsSchema but is missing commit function\");\n }\n const userParamsSchema = PolicyConfig.userParamsSchema ?? zod_1.z.undefined();\n const evalAllowSchema = PolicyConfig.evalAllowResultSchema ?? zod_1.z.undefined();\n const evalDenySchema = PolicyConfig.evalDenyResultSchema ?? zod_1.z.undefined();\n const evaluate = async (args, baseContext) => {\n try {\n const context2 = (0, policyConfigContext_1.createPolicyContext)({\n baseContext\n });\n const paramsOrDeny = (0, helpers_1.getValidatedParamsOrDeny)({\n rawAbilityParams: args.abilityParams,\n rawUserParams: args.userParams,\n abilityParamsSchema: PolicyConfig.abilityParamsSchema,\n userParamsSchema,\n phase: \"evaluate\"\n });\n if ((0, helpers_1.isPolicyDenyResponse)(paramsOrDeny)) {\n return paramsOrDeny;\n }\n const { abilityParams: abilityParams2, userParams } = paramsOrDeny;\n const result = await PolicyConfig.evaluate({ abilityParams: abilityParams2, userParams }, context2);\n const { schemaToUse } = (0, helpers_1.getSchemaForPolicyResponseResult)({\n value: result,\n allowResultSchema: evalAllowSchema,\n denyResultSchema: evalDenySchema\n });\n const resultOrDeny = (0, helpers_1.validateOrDeny)(result.result, schemaToUse, \"evaluate\", \"output\");\n if ((0, helpers_1.isPolicyDenyResponse)(resultOrDeny)) {\n return resultOrDeny;\n }\n if ((0, helpers_1.isPolicyDenyResponse)(result)) {\n return (0, helpers_1.createDenyResult)({\n result: resultOrDeny\n });\n }\n return (0, resultCreators_1.wrapAllow)(resultOrDeny);\n } catch (err) {\n return (0, resultCreators_1.returnNoResultDeny)(err instanceof Error ? err.message : \"Unknown error\");\n }\n };\n const precheckAllowSchema = PolicyConfig.precheckAllowResultSchema ?? zod_1.z.undefined();\n const precheckDenySchema = PolicyConfig.precheckDenyResultSchema ?? zod_1.z.undefined();\n const precheck = PolicyConfig.precheck ? async (args, baseContext) => {\n try {\n const context2 = (0, policyConfigContext_1.createPolicyContext)({\n baseContext\n });\n const { precheck: precheckFn } = PolicyConfig;\n if (!precheckFn) {\n throw new Error(\"precheck function unexpectedly missing\");\n }\n const paramsOrDeny = (0, helpers_1.getValidatedParamsOrDeny)({\n rawAbilityParams: args.abilityParams,\n rawUserParams: args.userParams,\n abilityParamsSchema: PolicyConfig.abilityParamsSchema,\n userParamsSchema,\n phase: \"precheck\"\n });\n if ((0, helpers_1.isPolicyDenyResponse)(paramsOrDeny)) {\n return paramsOrDeny;\n }\n const result = await precheckFn(args, context2);\n const { schemaToUse } = (0, helpers_1.getSchemaForPolicyResponseResult)({\n value: result,\n allowResultSchema: precheckAllowSchema,\n denyResultSchema: precheckDenySchema\n });\n const resultOrDeny = (0, helpers_1.validateOrDeny)(result.result, schemaToUse, \"precheck\", \"output\");\n if ((0, helpers_1.isPolicyDenyResponse)(resultOrDeny)) {\n return resultOrDeny;\n }\n if ((0, helpers_1.isPolicyDenyResponse)(result)) {\n return (0, helpers_1.createDenyResult)({\n result: resultOrDeny\n });\n }\n return (0, resultCreators_1.createAllowResult)({ result: resultOrDeny });\n } catch (err) {\n return (0, resultCreators_1.createDenyNoResult)(err instanceof Error ? err.message : \"Unknown error\");\n }\n } : void 0;\n const commitAllowSchema = PolicyConfig.commitAllowResultSchema ?? zod_1.z.undefined();\n const commitDenySchema = PolicyConfig.commitDenyResultSchema ?? zod_1.z.undefined();\n const commitParamsSchema = PolicyConfig.commitParamsSchema ?? zod_1.z.undefined();\n const commit = PolicyConfig.commit ? async (args, baseContext) => {\n try {\n const context2 = (0, policyConfigContext_1.createPolicyContext)({\n baseContext\n });\n const { commit: commitFn } = PolicyConfig;\n if (!commitFn) {\n throw new Error(\"commit function unexpectedly missing\");\n }\n console.log(\"commit\", JSON.stringify({ args, context: context2 }, utils_1.bigintReplacer, 2));\n const paramsOrDeny = (0, helpers_1.validateOrDeny)(args, commitParamsSchema, \"commit\", \"input\");\n if ((0, helpers_1.isPolicyDenyResponse)(paramsOrDeny)) {\n return paramsOrDeny;\n }\n const result = await commitFn(args, context2);\n const { schemaToUse } = (0, helpers_1.getSchemaForPolicyResponseResult)({\n value: result,\n allowResultSchema: commitAllowSchema,\n denyResultSchema: commitDenySchema\n });\n const resultOrDeny = (0, helpers_1.validateOrDeny)(result.result, schemaToUse, \"commit\", \"output\");\n if ((0, helpers_1.isPolicyDenyResponse)(resultOrDeny)) {\n return resultOrDeny;\n }\n if ((0, helpers_1.isPolicyDenyResponse)(result)) {\n return (0, helpers_1.createDenyResult)({\n result: resultOrDeny\n });\n }\n return (0, resultCreators_1.createAllowResult)({ result: resultOrDeny });\n } catch (err) {\n return (0, resultCreators_1.createDenyNoResult)(err instanceof Error ? err.message : \"Unknown error\");\n }\n } : void 0;\n const vincentPolicy = {\n ...PolicyConfig,\n evaluate,\n precheck,\n commit\n };\n return vincentPolicy;\n }\n function createVincentAbilityPolicy(config2) {\n const { bundledVincentPolicy: { vincentPolicy, ipfsCid, vincentAbilityApiVersion: vincentAbilityApiVersion2 } } = config2;\n (0, assertSupportedAbilityVersion_1.assertSupportedAbilityVersion)(vincentAbilityApiVersion2);\n const result = {\n vincentPolicy,\n ipfsCid,\n vincentAbilityApiVersion: vincentAbilityApiVersion2,\n abilityParameterMappings: config2.abilityParameterMappings,\n // Explicitly include schema types in the returned object for type inference\n /** @hidden */\n __schemaTypes: {\n policyAbilityParamsSchema: vincentPolicy.abilityParamsSchema,\n userParamsSchema: vincentPolicy.userParamsSchema,\n evalAllowResultSchema: vincentPolicy.evalAllowResultSchema,\n evalDenyResultSchema: vincentPolicy.evalDenyResultSchema,\n commitParamsSchema: vincentPolicy.commitParamsSchema,\n precheckAllowResultSchema: vincentPolicy.precheckAllowResultSchema,\n precheckDenyResultSchema: vincentPolicy.precheckDenyResultSchema,\n commitAllowResultSchema: vincentPolicy.commitAllowResultSchema,\n commitDenyResultSchema: vincentPolicy.commitDenyResultSchema,\n // Explicit function types\n evaluate: vincentPolicy.evaluate,\n precheck: vincentPolicy.precheck,\n commit: vincentPolicy.commit\n }\n };\n return result;\n }\n }\n });\n\n // ../../libs/ability-sdk/dist/src/lib/abilityCore/abilityConfig/context/types.js\n var require_types2 = __commonJS({\n \"../../libs/ability-sdk/dist/src/lib/abilityCore/abilityConfig/context/types.js\"(exports3) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n Object.defineProperty(exports3, \"__esModule\", { value: true });\n exports3.YouMustCallContextSucceedOrFail = void 0;\n exports3.YouMustCallContextSucceedOrFail = Symbol(\"ExecuteAbilityResult must come from context.succeed() or context.fail()\");\n }\n });\n\n // ../../libs/ability-sdk/dist/src/lib/abilityCore/abilityConfig/context/resultCreators.js\n var require_resultCreators3 = __commonJS({\n \"../../libs/ability-sdk/dist/src/lib/abilityCore/abilityConfig/context/resultCreators.js\"(exports3) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n Object.defineProperty(exports3, \"__esModule\", { value: true });\n exports3.createSuccess = createSuccess;\n exports3.createSuccessNoResult = createSuccessNoResult;\n exports3.createFailure = createFailure;\n exports3.createFailureNoResult = createFailureNoResult;\n var types_1 = require_types2();\n function createSuccess(result) {\n return {\n success: true,\n result,\n [types_1.YouMustCallContextSucceedOrFail]: \"AbilityResult\"\n };\n }\n function createSuccessNoResult() {\n return {\n success: true,\n [types_1.YouMustCallContextSucceedOrFail]: \"AbilityResult\"\n };\n }\n function createFailure(result) {\n return {\n success: false,\n result,\n [types_1.YouMustCallContextSucceedOrFail]: \"AbilityResult\"\n };\n }\n function createFailureNoResult() {\n return {\n success: false,\n result: void 0,\n [types_1.YouMustCallContextSucceedOrFail]: \"AbilityResult\"\n };\n }\n }\n });\n\n // ../../libs/ability-sdk/dist/src/lib/abilityCore/abilityConfig/context/abilityContext.js\n var require_abilityContext = __commonJS({\n \"../../libs/ability-sdk/dist/src/lib/abilityCore/abilityConfig/context/abilityContext.js\"(exports3) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n Object.defineProperty(exports3, \"__esModule\", { value: true });\n exports3.createExecutionAbilityContext = createExecutionAbilityContext;\n exports3.createPrecheckAbilityContext = createPrecheckAbilityContext;\n var resultCreators_1 = require_resultCreators3();\n function createExecutionAbilityContext(params) {\n const { baseContext, policiesByPackageName } = params;\n const allowedPolicies = {};\n for (const key of Object.keys(policiesByPackageName)) {\n const k4 = key;\n const entry = baseContext.policiesContext.allowedPolicies[k4];\n if (!entry)\n continue;\n allowedPolicies[k4] = {\n ...entry\n };\n }\n const upgradedPoliciesContext = {\n evaluatedPolicies: baseContext.policiesContext.evaluatedPolicies,\n allow: true,\n deniedPolicy: void 0,\n allowedPolicies\n };\n return {\n ...baseContext,\n policiesContext: upgradedPoliciesContext,\n succeed: resultCreators_1.createSuccess,\n fail: resultCreators_1.createFailure\n };\n }\n function createPrecheckAbilityContext(params) {\n const { baseContext } = params;\n return {\n ...baseContext,\n succeed: resultCreators_1.createSuccess,\n fail: resultCreators_1.createFailure\n };\n }\n }\n });\n\n // ../../libs/ability-sdk/dist/src/lib/abilityCore/helpers/resultCreators.js\n var require_resultCreators4 = __commonJS({\n \"../../libs/ability-sdk/dist/src/lib/abilityCore/helpers/resultCreators.js\"(exports3) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n Object.defineProperty(exports3, \"__esModule\", { value: true });\n exports3.createAbilitySuccessResult = createAbilitySuccessResult;\n exports3.createAbilityFailureResult = createAbilityFailureResult;\n exports3.createAbilityFailureNoResult = createAbilityFailureNoResult;\n exports3.wrapFailure = wrapFailure;\n exports3.wrapNoResultFailure = wrapNoResultFailure;\n exports3.wrapSuccess = wrapSuccess;\n exports3.wrapNoResultSuccess = wrapNoResultSuccess;\n function createAbilitySuccessResult(args) {\n if (!args || args.result === void 0) {\n return { success: true };\n }\n return { success: true, result: args.result };\n }\n function createAbilityFailureResult({ runtimeError, result, schemaValidationError }) {\n if (result === void 0) {\n return {\n success: false,\n runtimeError,\n result: void 0,\n ...schemaValidationError ? { schemaValidationError } : {}\n };\n }\n return {\n success: false,\n runtimeError,\n result,\n ...schemaValidationError ? { schemaValidationError } : {}\n };\n }\n function createAbilityFailureNoResult(runtimeError, schemaValidationError) {\n return createAbilityFailureResult({ runtimeError, schemaValidationError });\n }\n function wrapFailure(value, runtimeError, schemaValidationError) {\n return createAbilityFailureResult({ result: value, runtimeError, schemaValidationError });\n }\n function wrapNoResultFailure(runtimeError, schemaValidationError) {\n return createAbilityFailureNoResult(runtimeError, schemaValidationError);\n }\n function wrapSuccess(value) {\n return createAbilitySuccessResult({ result: value });\n }\n function wrapNoResultSuccess() {\n return createAbilitySuccessResult();\n }\n }\n });\n\n // ../../libs/ability-sdk/dist/src/lib/abilityCore/helpers/typeGuards.js\n var require_typeGuards2 = __commonJS({\n \"../../libs/ability-sdk/dist/src/lib/abilityCore/helpers/typeGuards.js\"(exports3) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n Object.defineProperty(exports3, \"__esModule\", { value: true });\n exports3.isAbilitySuccessResult = isAbilitySuccessResult;\n exports3.isAbilityFailureResult = isAbilityFailureResult;\n exports3.isAbilityResult = isAbilityResult;\n function isAbilitySuccessResult(value) {\n return typeof value === \"object\" && value !== null && \"success\" in value && value.success === true;\n }\n function isAbilityFailureResult(value) {\n return typeof value === \"object\" && value !== null && \"success\" in value && value.success === false;\n }\n function isAbilityResult(value) {\n return typeof value === \"object\" && value !== null && \"success\" in value && typeof value.success === \"boolean\";\n }\n }\n });\n\n // ../../libs/ability-sdk/dist/src/lib/abilityCore/helpers/zod.js\n var require_zod2 = __commonJS({\n \"../../libs/ability-sdk/dist/src/lib/abilityCore/helpers/zod.js\"(exports3) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n Object.defineProperty(exports3, \"__esModule\", { value: true });\n exports3.AbilityResultShape = void 0;\n exports3.validateOrFail = validateOrFail;\n exports3.getSchemaForAbilityResult = getSchemaForAbilityResult;\n var zod_1 = require_cjs();\n var resultCreators_1 = require_resultCreators4();\n var typeGuards_1 = require_typeGuards2();\n exports3.AbilityResultShape = zod_1.z.object({\n success: zod_1.z.boolean(),\n result: zod_1.z.unknown()\n });\n var mustBeUndefinedSchema = zod_1.z.undefined();\n function validateOrFail(value, schema, phase, stage) {\n const effectiveSchema = schema ?? mustBeUndefinedSchema;\n const parsed = effectiveSchema.safeParse(value);\n if (!parsed.success) {\n const descriptor = stage === \"input\" ? \"parameters\" : \"result\";\n const message = `Invalid ${phase} ${descriptor}.`;\n return (0, resultCreators_1.createAbilityFailureResult)({\n runtimeError: message,\n schemaValidationError: {\n zodError: parsed.error,\n phase,\n stage\n }\n });\n }\n return parsed.data;\n }\n function getSchemaForAbilityResult({ value, successResultSchema, failureResultSchema }) {\n if (!(0, typeGuards_1.isAbilityResult)(value)) {\n return {\n schemaToUse: exports3.AbilityResultShape,\n parsedType: \"unknown\"\n };\n }\n const schemaToUse = value.success ? successResultSchema ?? zod_1.z.undefined() : failureResultSchema ?? zod_1.z.undefined();\n return {\n schemaToUse,\n parsedType: value.success ? \"success\" : \"failure\"\n };\n }\n }\n });\n\n // ../../libs/ability-sdk/dist/src/lib/abilityCore/vincentAbility.js\n var require_vincentAbility = __commonJS({\n \"../../libs/ability-sdk/dist/src/lib/abilityCore/vincentAbility.js\"(exports3) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n Object.defineProperty(exports3, \"__esModule\", { value: true });\n exports3.createVincentAbility = createVincentAbility2;\n var zod_1 = require_cjs();\n var assertSupportedAbilityVersion_1 = require_assertSupportedAbilityVersion();\n var constants_1 = require_constants2();\n var utils_1 = require_utils();\n var abilityContext_1 = require_abilityContext();\n var resultCreators_1 = require_resultCreators4();\n var typeGuards_1 = require_typeGuards2();\n var zod_2 = require_zod2();\n function createVincentAbility2(AbilityConfig) {\n const { policyByPackageName, policyByIpfsCid } = AbilityConfig.supportedPolicies;\n for (const policyId in policyByIpfsCid) {\n const policy = policyByIpfsCid[policyId];\n const { vincentAbilityApiVersion: vincentAbilityApiVersion2 } = policy;\n (0, assertSupportedAbilityVersion_1.assertSupportedAbilityVersion)(vincentAbilityApiVersion2);\n }\n const executeSuccessSchema2 = AbilityConfig.executeSuccessSchema ?? zod_1.z.undefined();\n const executeFailSchema2 = AbilityConfig.executeFailSchema ?? zod_1.z.undefined();\n const execute = async ({ abilityParams: abilityParams2 }, baseAbilityContext) => {\n try {\n const context2 = (0, abilityContext_1.createExecutionAbilityContext)({\n baseContext: baseAbilityContext,\n policiesByPackageName: policyByPackageName\n });\n const parsedAbilityParams = (0, zod_2.validateOrFail)(abilityParams2, AbilityConfig.abilityParamsSchema, \"execute\", \"input\");\n if ((0, typeGuards_1.isAbilityFailureResult)(parsedAbilityParams)) {\n return parsedAbilityParams;\n }\n const result = await AbilityConfig.execute({ abilityParams: parsedAbilityParams }, {\n ...context2,\n policiesContext: { ...context2.policiesContext, allow: true }\n });\n console.log(\"AbilityConfig execute result\", JSON.stringify(result, utils_1.bigintReplacer));\n const { schemaToUse } = (0, zod_2.getSchemaForAbilityResult)({\n value: result,\n successResultSchema: executeSuccessSchema2,\n failureResultSchema: executeFailSchema2\n });\n const resultOrFailure = (0, zod_2.validateOrFail)(result.result, schemaToUse, \"execute\", \"output\");\n if ((0, typeGuards_1.isAbilityFailureResult)(resultOrFailure)) {\n return resultOrFailure;\n }\n if ((0, typeGuards_1.isAbilityFailureResult)(result)) {\n return (0, resultCreators_1.wrapFailure)(resultOrFailure);\n }\n return (0, resultCreators_1.wrapSuccess)(resultOrFailure);\n } catch (err) {\n return (0, resultCreators_1.wrapNoResultFailure)(err instanceof Error ? err.message : \"Unknown error\");\n }\n };\n const precheckSuccessSchema2 = AbilityConfig.precheckSuccessSchema ?? zod_1.z.undefined();\n const precheckFailSchema2 = AbilityConfig.precheckFailSchema ?? zod_1.z.undefined();\n const { precheck: precheckFn } = AbilityConfig;\n const precheck = precheckFn ? async ({ abilityParams: abilityParams2 }, baseAbilityContext) => {\n try {\n const context2 = (0, abilityContext_1.createPrecheckAbilityContext)({\n baseContext: baseAbilityContext\n });\n const parsedAbilityParams = (0, zod_2.validateOrFail)(abilityParams2, AbilityConfig.abilityParamsSchema, \"precheck\", \"input\");\n if ((0, typeGuards_1.isAbilityFailureResult)(parsedAbilityParams)) {\n return parsedAbilityParams;\n }\n const result = await precheckFn({ abilityParams: abilityParams2 }, context2);\n console.log(\"AbilityConfig precheck result\", JSON.stringify(result, utils_1.bigintReplacer));\n const { schemaToUse } = (0, zod_2.getSchemaForAbilityResult)({\n value: result,\n successResultSchema: precheckSuccessSchema2,\n failureResultSchema: precheckFailSchema2\n });\n const resultOrFailure = (0, zod_2.validateOrFail)(result.result, schemaToUse, \"precheck\", \"output\");\n if ((0, typeGuards_1.isAbilityFailureResult)(resultOrFailure)) {\n return resultOrFailure;\n }\n if ((0, typeGuards_1.isAbilityFailureResult)(result)) {\n return (0, resultCreators_1.wrapFailure)(resultOrFailure, result.runtimeError);\n }\n return (0, resultCreators_1.wrapSuccess)(resultOrFailure);\n } catch (err) {\n return (0, resultCreators_1.wrapNoResultFailure)(err instanceof Error ? err.message : \"Unknown error\");\n }\n } : void 0;\n return {\n packageName: AbilityConfig.packageName,\n vincentAbilityApiVersion: constants_1.VINCENT_TOOL_API_VERSION,\n abilityDescription: AbilityConfig.abilityDescription,\n execute,\n precheck,\n supportedPolicies: AbilityConfig.supportedPolicies,\n policyByPackageName,\n abilityParamsSchema: AbilityConfig.abilityParamsSchema,\n /** @hidden */\n __schemaTypes: {\n precheckSuccessSchema: AbilityConfig.precheckSuccessSchema,\n precheckFailSchema: AbilityConfig.precheckFailSchema,\n executeSuccessSchema: AbilityConfig.executeSuccessSchema,\n executeFailSchema: AbilityConfig.executeFailSchema\n }\n };\n }\n }\n });\n\n // ../../../node_modules/.pnpm/bn.js@5.2.2/node_modules/bn.js/lib/bn.js\n var require_bn = __commonJS({\n \"../../../node_modules/.pnpm/bn.js@5.2.2/node_modules/bn.js/lib/bn.js\"(exports3, module) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n (function(module2, exports4) {\n \"use strict\";\n function assert9(val, msg) {\n if (!val)\n throw new Error(msg || \"Assertion failed\");\n }\n function inherits(ctor, superCtor) {\n ctor.super_ = superCtor;\n var TempCtor = function() {\n };\n TempCtor.prototype = superCtor.prototype;\n ctor.prototype = new TempCtor();\n ctor.prototype.constructor = ctor;\n }\n function BN(number2, base4, endian) {\n if (BN.isBN(number2)) {\n return number2;\n }\n this.negative = 0;\n this.words = null;\n this.length = 0;\n this.red = null;\n if (number2 !== null) {\n if (base4 === \"le\" || base4 === \"be\") {\n endian = base4;\n base4 = 10;\n }\n this._init(number2 || 0, base4 || 10, endian || \"be\");\n }\n }\n if (typeof module2 === \"object\") {\n module2.exports = BN;\n } else {\n exports4.BN = BN;\n }\n BN.BN = BN;\n BN.wordSize = 26;\n var Buffer3;\n try {\n if (typeof window !== \"undefined\" && typeof window.Buffer !== \"undefined\") {\n Buffer3 = window.Buffer;\n } else {\n Buffer3 = (init_buffer(), __toCommonJS(buffer_exports)).Buffer;\n }\n } catch (e3) {\n }\n BN.isBN = function isBN(num2) {\n if (num2 instanceof BN) {\n return true;\n }\n return num2 !== null && typeof num2 === \"object\" && num2.constructor.wordSize === BN.wordSize && Array.isArray(num2.words);\n };\n BN.max = function max(left, right) {\n if (left.cmp(right) > 0)\n return left;\n return right;\n };\n BN.min = function min(left, right) {\n if (left.cmp(right) < 0)\n return left;\n return right;\n };\n BN.prototype._init = function init(number2, base4, endian) {\n if (typeof number2 === \"number\") {\n return this._initNumber(number2, base4, endian);\n }\n if (typeof number2 === \"object\") {\n return this._initArray(number2, base4, endian);\n }\n if (base4 === \"hex\") {\n base4 = 16;\n }\n assert9(base4 === (base4 | 0) && base4 >= 2 && base4 <= 36);\n number2 = number2.toString().replace(/\\s+/g, \"\");\n var start = 0;\n if (number2[0] === \"-\") {\n start++;\n this.negative = 1;\n }\n if (start < number2.length) {\n if (base4 === 16) {\n this._parseHex(number2, start, endian);\n } else {\n this._parseBase(number2, base4, start);\n if (endian === \"le\") {\n this._initArray(this.toArray(), base4, endian);\n }\n }\n }\n };\n BN.prototype._initNumber = function _initNumber(number2, base4, endian) {\n if (number2 < 0) {\n this.negative = 1;\n number2 = -number2;\n }\n if (number2 < 67108864) {\n this.words = [number2 & 67108863];\n this.length = 1;\n } else if (number2 < 4503599627370496) {\n this.words = [\n number2 & 67108863,\n number2 / 67108864 & 67108863\n ];\n this.length = 2;\n } else {\n assert9(number2 < 9007199254740992);\n this.words = [\n number2 & 67108863,\n number2 / 67108864 & 67108863,\n 1\n ];\n this.length = 3;\n }\n if (endian !== \"le\")\n return;\n this._initArray(this.toArray(), base4, endian);\n };\n BN.prototype._initArray = function _initArray(number2, base4, endian) {\n assert9(typeof number2.length === \"number\");\n if (number2.length <= 0) {\n this.words = [0];\n this.length = 1;\n return this;\n }\n this.length = Math.ceil(number2.length / 3);\n this.words = new Array(this.length);\n for (var i3 = 0; i3 < this.length; i3++) {\n this.words[i3] = 0;\n }\n var j2, w3;\n var off2 = 0;\n if (endian === \"be\") {\n for (i3 = number2.length - 1, j2 = 0; i3 >= 0; i3 -= 3) {\n w3 = number2[i3] | number2[i3 - 1] << 8 | number2[i3 - 2] << 16;\n this.words[j2] |= w3 << off2 & 67108863;\n this.words[j2 + 1] = w3 >>> 26 - off2 & 67108863;\n off2 += 24;\n if (off2 >= 26) {\n off2 -= 26;\n j2++;\n }\n }\n } else if (endian === \"le\") {\n for (i3 = 0, j2 = 0; i3 < number2.length; i3 += 3) {\n w3 = number2[i3] | number2[i3 + 1] << 8 | number2[i3 + 2] << 16;\n this.words[j2] |= w3 << off2 & 67108863;\n this.words[j2 + 1] = w3 >>> 26 - off2 & 67108863;\n off2 += 24;\n if (off2 >= 26) {\n off2 -= 26;\n j2++;\n }\n }\n }\n return this._strip();\n };\n function parseHex4Bits(string2, index2) {\n var c4 = string2.charCodeAt(index2);\n if (c4 >= 48 && c4 <= 57) {\n return c4 - 48;\n } else if (c4 >= 65 && c4 <= 70) {\n return c4 - 55;\n } else if (c4 >= 97 && c4 <= 102) {\n return c4 - 87;\n } else {\n assert9(false, \"Invalid character in \" + string2);\n }\n }\n function parseHexByte(string2, lowerBound, index2) {\n var r2 = parseHex4Bits(string2, index2);\n if (index2 - 1 >= lowerBound) {\n r2 |= parseHex4Bits(string2, index2 - 1) << 4;\n }\n return r2;\n }\n BN.prototype._parseHex = function _parseHex(number2, start, endian) {\n this.length = Math.ceil((number2.length - start) / 6);\n this.words = new Array(this.length);\n for (var i3 = 0; i3 < this.length; i3++) {\n this.words[i3] = 0;\n }\n var off2 = 0;\n var j2 = 0;\n var w3;\n if (endian === \"be\") {\n for (i3 = number2.length - 1; i3 >= start; i3 -= 2) {\n w3 = parseHexByte(number2, start, i3) << off2;\n this.words[j2] |= w3 & 67108863;\n if (off2 >= 18) {\n off2 -= 18;\n j2 += 1;\n this.words[j2] |= w3 >>> 26;\n } else {\n off2 += 8;\n }\n }\n } else {\n var parseLength = number2.length - start;\n for (i3 = parseLength % 2 === 0 ? start + 1 : start; i3 < number2.length; i3 += 2) {\n w3 = parseHexByte(number2, start, i3) << off2;\n this.words[j2] |= w3 & 67108863;\n if (off2 >= 18) {\n off2 -= 18;\n j2 += 1;\n this.words[j2] |= w3 >>> 26;\n } else {\n off2 += 8;\n }\n }\n }\n this._strip();\n };\n function parseBase(str, start, end, mul) {\n var r2 = 0;\n var b4 = 0;\n var len = Math.min(str.length, end);\n for (var i3 = start; i3 < len; i3++) {\n var c4 = str.charCodeAt(i3) - 48;\n r2 *= mul;\n if (c4 >= 49) {\n b4 = c4 - 49 + 10;\n } else if (c4 >= 17) {\n b4 = c4 - 17 + 10;\n } else {\n b4 = c4;\n }\n assert9(c4 >= 0 && b4 < mul, \"Invalid character\");\n r2 += b4;\n }\n return r2;\n }\n BN.prototype._parseBase = function _parseBase(number2, base4, start) {\n this.words = [0];\n this.length = 1;\n for (var limbLen = 0, limbPow = 1; limbPow <= 67108863; limbPow *= base4) {\n limbLen++;\n }\n limbLen--;\n limbPow = limbPow / base4 | 0;\n var total = number2.length - start;\n var mod3 = total % limbLen;\n var end = Math.min(total, total - mod3) + start;\n var word = 0;\n for (var i3 = start; i3 < end; i3 += limbLen) {\n word = parseBase(number2, i3, i3 + limbLen, base4);\n this.imuln(limbPow);\n if (this.words[0] + word < 67108864) {\n this.words[0] += word;\n } else {\n this._iaddn(word);\n }\n }\n if (mod3 !== 0) {\n var pow = 1;\n word = parseBase(number2, i3, number2.length, base4);\n for (i3 = 0; i3 < mod3; i3++) {\n pow *= base4;\n }\n this.imuln(pow);\n if (this.words[0] + word < 67108864) {\n this.words[0] += word;\n } else {\n this._iaddn(word);\n }\n }\n this._strip();\n };\n BN.prototype.copy = function copy(dest) {\n dest.words = new Array(this.length);\n for (var i3 = 0; i3 < this.length; i3++) {\n dest.words[i3] = this.words[i3];\n }\n dest.length = this.length;\n dest.negative = this.negative;\n dest.red = this.red;\n };\n function move(dest, src) {\n dest.words = src.words;\n dest.length = src.length;\n dest.negative = src.negative;\n dest.red = src.red;\n }\n BN.prototype._move = function _move(dest) {\n move(dest, this);\n };\n BN.prototype.clone = function clone() {\n var r2 = new BN(null);\n this.copy(r2);\n return r2;\n };\n BN.prototype._expand = function _expand(size6) {\n while (this.length < size6) {\n this.words[this.length++] = 0;\n }\n return this;\n };\n BN.prototype._strip = function strip() {\n while (this.length > 1 && this.words[this.length - 1] === 0) {\n this.length--;\n }\n return this._normSign();\n };\n BN.prototype._normSign = function _normSign() {\n if (this.length === 1 && this.words[0] === 0) {\n this.negative = 0;\n }\n return this;\n };\n if (typeof Symbol !== \"undefined\" && typeof Symbol.for === \"function\") {\n try {\n BN.prototype[Symbol.for(\"nodejs.util.inspect.custom\")] = inspect;\n } catch (e3) {\n BN.prototype.inspect = inspect;\n }\n } else {\n BN.prototype.inspect = inspect;\n }\n function inspect() {\n return (this.red ? \"\";\n }\n var zeros = [\n \"\",\n \"0\",\n \"00\",\n \"000\",\n \"0000\",\n \"00000\",\n \"000000\",\n \"0000000\",\n \"00000000\",\n \"000000000\",\n \"0000000000\",\n \"00000000000\",\n \"000000000000\",\n \"0000000000000\",\n \"00000000000000\",\n \"000000000000000\",\n \"0000000000000000\",\n \"00000000000000000\",\n \"000000000000000000\",\n \"0000000000000000000\",\n \"00000000000000000000\",\n \"000000000000000000000\",\n \"0000000000000000000000\",\n \"00000000000000000000000\",\n \"000000000000000000000000\",\n \"0000000000000000000000000\"\n ];\n var groupSizes = [\n 0,\n 0,\n 25,\n 16,\n 12,\n 11,\n 10,\n 9,\n 8,\n 8,\n 7,\n 7,\n 7,\n 7,\n 6,\n 6,\n 6,\n 6,\n 6,\n 6,\n 6,\n 5,\n 5,\n 5,\n 5,\n 5,\n 5,\n 5,\n 5,\n 5,\n 5,\n 5,\n 5,\n 5,\n 5,\n 5,\n 5\n ];\n var groupBases = [\n 0,\n 0,\n 33554432,\n 43046721,\n 16777216,\n 48828125,\n 60466176,\n 40353607,\n 16777216,\n 43046721,\n 1e7,\n 19487171,\n 35831808,\n 62748517,\n 7529536,\n 11390625,\n 16777216,\n 24137569,\n 34012224,\n 47045881,\n 64e6,\n 4084101,\n 5153632,\n 6436343,\n 7962624,\n 9765625,\n 11881376,\n 14348907,\n 17210368,\n 20511149,\n 243e5,\n 28629151,\n 33554432,\n 39135393,\n 45435424,\n 52521875,\n 60466176\n ];\n BN.prototype.toString = function toString2(base4, padding) {\n base4 = base4 || 10;\n padding = padding | 0 || 1;\n var out;\n if (base4 === 16 || base4 === \"hex\") {\n out = \"\";\n var off2 = 0;\n var carry = 0;\n for (var i3 = 0; i3 < this.length; i3++) {\n var w3 = this.words[i3];\n var word = ((w3 << off2 | carry) & 16777215).toString(16);\n carry = w3 >>> 24 - off2 & 16777215;\n off2 += 2;\n if (off2 >= 26) {\n off2 -= 26;\n i3--;\n }\n if (carry !== 0 || i3 !== this.length - 1) {\n out = zeros[6 - word.length] + word + out;\n } else {\n out = word + out;\n }\n }\n if (carry !== 0) {\n out = carry.toString(16) + out;\n }\n while (out.length % padding !== 0) {\n out = \"0\" + out;\n }\n if (this.negative !== 0) {\n out = \"-\" + out;\n }\n return out;\n }\n if (base4 === (base4 | 0) && base4 >= 2 && base4 <= 36) {\n var groupSize = groupSizes[base4];\n var groupBase = groupBases[base4];\n out = \"\";\n var c4 = this.clone();\n c4.negative = 0;\n while (!c4.isZero()) {\n var r2 = c4.modrn(groupBase).toString(base4);\n c4 = c4.idivn(groupBase);\n if (!c4.isZero()) {\n out = zeros[groupSize - r2.length] + r2 + out;\n } else {\n out = r2 + out;\n }\n }\n if (this.isZero()) {\n out = \"0\" + out;\n }\n while (out.length % padding !== 0) {\n out = \"0\" + out;\n }\n if (this.negative !== 0) {\n out = \"-\" + out;\n }\n return out;\n }\n assert9(false, \"Base should be between 2 and 36\");\n };\n BN.prototype.toNumber = function toNumber4() {\n var ret = this.words[0];\n if (this.length === 2) {\n ret += this.words[1] * 67108864;\n } else if (this.length === 3 && this.words[2] === 1) {\n ret += 4503599627370496 + this.words[1] * 67108864;\n } else if (this.length > 2) {\n assert9(false, \"Number can only safely store up to 53 bits\");\n }\n return this.negative !== 0 ? -ret : ret;\n };\n BN.prototype.toJSON = function toJSON() {\n return this.toString(16, 2);\n };\n if (Buffer3) {\n BN.prototype.toBuffer = function toBuffer(endian, length2) {\n return this.toArrayLike(Buffer3, endian, length2);\n };\n }\n BN.prototype.toArray = function toArray(endian, length2) {\n return this.toArrayLike(Array, endian, length2);\n };\n var allocate = function allocate2(ArrayType, size6) {\n if (ArrayType.allocUnsafe) {\n return ArrayType.allocUnsafe(size6);\n }\n return new ArrayType(size6);\n };\n BN.prototype.toArrayLike = function toArrayLike(ArrayType, endian, length2) {\n this._strip();\n var byteLength = this.byteLength();\n var reqLength = length2 || Math.max(1, byteLength);\n assert9(byteLength <= reqLength, \"byte array longer than desired length\");\n assert9(reqLength > 0, \"Requested array length <= 0\");\n var res = allocate(ArrayType, reqLength);\n var postfix = endian === \"le\" ? \"LE\" : \"BE\";\n this[\"_toArrayLike\" + postfix](res, byteLength);\n return res;\n };\n BN.prototype._toArrayLikeLE = function _toArrayLikeLE(res, byteLength) {\n var position = 0;\n var carry = 0;\n for (var i3 = 0, shift = 0; i3 < this.length; i3++) {\n var word = this.words[i3] << shift | carry;\n res[position++] = word & 255;\n if (position < res.length) {\n res[position++] = word >> 8 & 255;\n }\n if (position < res.length) {\n res[position++] = word >> 16 & 255;\n }\n if (shift === 6) {\n if (position < res.length) {\n res[position++] = word >> 24 & 255;\n }\n carry = 0;\n shift = 0;\n } else {\n carry = word >>> 24;\n shift += 2;\n }\n }\n if (position < res.length) {\n res[position++] = carry;\n while (position < res.length) {\n res[position++] = 0;\n }\n }\n };\n BN.prototype._toArrayLikeBE = function _toArrayLikeBE(res, byteLength) {\n var position = res.length - 1;\n var carry = 0;\n for (var i3 = 0, shift = 0; i3 < this.length; i3++) {\n var word = this.words[i3] << shift | carry;\n res[position--] = word & 255;\n if (position >= 0) {\n res[position--] = word >> 8 & 255;\n }\n if (position >= 0) {\n res[position--] = word >> 16 & 255;\n }\n if (shift === 6) {\n if (position >= 0) {\n res[position--] = word >> 24 & 255;\n }\n carry = 0;\n shift = 0;\n } else {\n carry = word >>> 24;\n shift += 2;\n }\n }\n if (position >= 0) {\n res[position--] = carry;\n while (position >= 0) {\n res[position--] = 0;\n }\n }\n };\n if (Math.clz32) {\n BN.prototype._countBits = function _countBits(w3) {\n return 32 - Math.clz32(w3);\n };\n } else {\n BN.prototype._countBits = function _countBits(w3) {\n var t3 = w3;\n var r2 = 0;\n if (t3 >= 4096) {\n r2 += 13;\n t3 >>>= 13;\n }\n if (t3 >= 64) {\n r2 += 7;\n t3 >>>= 7;\n }\n if (t3 >= 8) {\n r2 += 4;\n t3 >>>= 4;\n }\n if (t3 >= 2) {\n r2 += 2;\n t3 >>>= 2;\n }\n return r2 + t3;\n };\n }\n BN.prototype._zeroBits = function _zeroBits(w3) {\n if (w3 === 0)\n return 26;\n var t3 = w3;\n var r2 = 0;\n if ((t3 & 8191) === 0) {\n r2 += 13;\n t3 >>>= 13;\n }\n if ((t3 & 127) === 0) {\n r2 += 7;\n t3 >>>= 7;\n }\n if ((t3 & 15) === 0) {\n r2 += 4;\n t3 >>>= 4;\n }\n if ((t3 & 3) === 0) {\n r2 += 2;\n t3 >>>= 2;\n }\n if ((t3 & 1) === 0) {\n r2++;\n }\n return r2;\n };\n BN.prototype.bitLength = function bitLength() {\n var w3 = this.words[this.length - 1];\n var hi = this._countBits(w3);\n return (this.length - 1) * 26 + hi;\n };\n function toBitArray(num2) {\n var w3 = new Array(num2.bitLength());\n for (var bit = 0; bit < w3.length; bit++) {\n var off2 = bit / 26 | 0;\n var wbit = bit % 26;\n w3[bit] = num2.words[off2] >>> wbit & 1;\n }\n return w3;\n }\n BN.prototype.zeroBits = function zeroBits() {\n if (this.isZero())\n return 0;\n var r2 = 0;\n for (var i3 = 0; i3 < this.length; i3++) {\n var b4 = this._zeroBits(this.words[i3]);\n r2 += b4;\n if (b4 !== 26)\n break;\n }\n return r2;\n };\n BN.prototype.byteLength = function byteLength() {\n return Math.ceil(this.bitLength() / 8);\n };\n BN.prototype.toTwos = function toTwos(width) {\n if (this.negative !== 0) {\n return this.abs().inotn(width).iaddn(1);\n }\n return this.clone();\n };\n BN.prototype.fromTwos = function fromTwos(width) {\n if (this.testn(width - 1)) {\n return this.notn(width).iaddn(1).ineg();\n }\n return this.clone();\n };\n BN.prototype.isNeg = function isNeg() {\n return this.negative !== 0;\n };\n BN.prototype.neg = function neg() {\n return this.clone().ineg();\n };\n BN.prototype.ineg = function ineg() {\n if (!this.isZero()) {\n this.negative ^= 1;\n }\n return this;\n };\n BN.prototype.iuor = function iuor(num2) {\n while (this.length < num2.length) {\n this.words[this.length++] = 0;\n }\n for (var i3 = 0; i3 < num2.length; i3++) {\n this.words[i3] = this.words[i3] | num2.words[i3];\n }\n return this._strip();\n };\n BN.prototype.ior = function ior(num2) {\n assert9((this.negative | num2.negative) === 0);\n return this.iuor(num2);\n };\n BN.prototype.or = function or(num2) {\n if (this.length > num2.length)\n return this.clone().ior(num2);\n return num2.clone().ior(this);\n };\n BN.prototype.uor = function uor(num2) {\n if (this.length > num2.length)\n return this.clone().iuor(num2);\n return num2.clone().iuor(this);\n };\n BN.prototype.iuand = function iuand(num2) {\n var b4;\n if (this.length > num2.length) {\n b4 = num2;\n } else {\n b4 = this;\n }\n for (var i3 = 0; i3 < b4.length; i3++) {\n this.words[i3] = this.words[i3] & num2.words[i3];\n }\n this.length = b4.length;\n return this._strip();\n };\n BN.prototype.iand = function iand(num2) {\n assert9((this.negative | num2.negative) === 0);\n return this.iuand(num2);\n };\n BN.prototype.and = function and(num2) {\n if (this.length > num2.length)\n return this.clone().iand(num2);\n return num2.clone().iand(this);\n };\n BN.prototype.uand = function uand(num2) {\n if (this.length > num2.length)\n return this.clone().iuand(num2);\n return num2.clone().iuand(this);\n };\n BN.prototype.iuxor = function iuxor(num2) {\n var a3;\n var b4;\n if (this.length > num2.length) {\n a3 = this;\n b4 = num2;\n } else {\n a3 = num2;\n b4 = this;\n }\n for (var i3 = 0; i3 < b4.length; i3++) {\n this.words[i3] = a3.words[i3] ^ b4.words[i3];\n }\n if (this !== a3) {\n for (; i3 < a3.length; i3++) {\n this.words[i3] = a3.words[i3];\n }\n }\n this.length = a3.length;\n return this._strip();\n };\n BN.prototype.ixor = function ixor(num2) {\n assert9((this.negative | num2.negative) === 0);\n return this.iuxor(num2);\n };\n BN.prototype.xor = function xor(num2) {\n if (this.length > num2.length)\n return this.clone().ixor(num2);\n return num2.clone().ixor(this);\n };\n BN.prototype.uxor = function uxor(num2) {\n if (this.length > num2.length)\n return this.clone().iuxor(num2);\n return num2.clone().iuxor(this);\n };\n BN.prototype.inotn = function inotn(width) {\n assert9(typeof width === \"number\" && width >= 0);\n var bytesNeeded = Math.ceil(width / 26) | 0;\n var bitsLeft = width % 26;\n this._expand(bytesNeeded);\n if (bitsLeft > 0) {\n bytesNeeded--;\n }\n for (var i3 = 0; i3 < bytesNeeded; i3++) {\n this.words[i3] = ~this.words[i3] & 67108863;\n }\n if (bitsLeft > 0) {\n this.words[i3] = ~this.words[i3] & 67108863 >> 26 - bitsLeft;\n }\n return this._strip();\n };\n BN.prototype.notn = function notn(width) {\n return this.clone().inotn(width);\n };\n BN.prototype.setn = function setn(bit, val) {\n assert9(typeof bit === \"number\" && bit >= 0);\n var off2 = bit / 26 | 0;\n var wbit = bit % 26;\n this._expand(off2 + 1);\n if (val) {\n this.words[off2] = this.words[off2] | 1 << wbit;\n } else {\n this.words[off2] = this.words[off2] & ~(1 << wbit);\n }\n return this._strip();\n };\n BN.prototype.iadd = function iadd(num2) {\n var r2;\n if (this.negative !== 0 && num2.negative === 0) {\n this.negative = 0;\n r2 = this.isub(num2);\n this.negative ^= 1;\n return this._normSign();\n } else if (this.negative === 0 && num2.negative !== 0) {\n num2.negative = 0;\n r2 = this.isub(num2);\n num2.negative = 1;\n return r2._normSign();\n }\n var a3, b4;\n if (this.length > num2.length) {\n a3 = this;\n b4 = num2;\n } else {\n a3 = num2;\n b4 = this;\n }\n var carry = 0;\n for (var i3 = 0; i3 < b4.length; i3++) {\n r2 = (a3.words[i3] | 0) + (b4.words[i3] | 0) + carry;\n this.words[i3] = r2 & 67108863;\n carry = r2 >>> 26;\n }\n for (; carry !== 0 && i3 < a3.length; i3++) {\n r2 = (a3.words[i3] | 0) + carry;\n this.words[i3] = r2 & 67108863;\n carry = r2 >>> 26;\n }\n this.length = a3.length;\n if (carry !== 0) {\n this.words[this.length] = carry;\n this.length++;\n } else if (a3 !== this) {\n for (; i3 < a3.length; i3++) {\n this.words[i3] = a3.words[i3];\n }\n }\n return this;\n };\n BN.prototype.add = function add2(num2) {\n var res;\n if (num2.negative !== 0 && this.negative === 0) {\n num2.negative = 0;\n res = this.sub(num2);\n num2.negative ^= 1;\n return res;\n } else if (num2.negative === 0 && this.negative !== 0) {\n this.negative = 0;\n res = num2.sub(this);\n this.negative = 1;\n return res;\n }\n if (this.length > num2.length)\n return this.clone().iadd(num2);\n return num2.clone().iadd(this);\n };\n BN.prototype.isub = function isub(num2) {\n if (num2.negative !== 0) {\n num2.negative = 0;\n var r2 = this.iadd(num2);\n num2.negative = 1;\n return r2._normSign();\n } else if (this.negative !== 0) {\n this.negative = 0;\n this.iadd(num2);\n this.negative = 1;\n return this._normSign();\n }\n var cmp = this.cmp(num2);\n if (cmp === 0) {\n this.negative = 0;\n this.length = 1;\n this.words[0] = 0;\n return this;\n }\n var a3, b4;\n if (cmp > 0) {\n a3 = this;\n b4 = num2;\n } else {\n a3 = num2;\n b4 = this;\n }\n var carry = 0;\n for (var i3 = 0; i3 < b4.length; i3++) {\n r2 = (a3.words[i3] | 0) - (b4.words[i3] | 0) + carry;\n carry = r2 >> 26;\n this.words[i3] = r2 & 67108863;\n }\n for (; carry !== 0 && i3 < a3.length; i3++) {\n r2 = (a3.words[i3] | 0) + carry;\n carry = r2 >> 26;\n this.words[i3] = r2 & 67108863;\n }\n if (carry === 0 && i3 < a3.length && a3 !== this) {\n for (; i3 < a3.length; i3++) {\n this.words[i3] = a3.words[i3];\n }\n }\n this.length = Math.max(this.length, i3);\n if (a3 !== this) {\n this.negative = 1;\n }\n return this._strip();\n };\n BN.prototype.sub = function sub(num2) {\n return this.clone().isub(num2);\n };\n function smallMulTo(self2, num2, out) {\n out.negative = num2.negative ^ self2.negative;\n var len = self2.length + num2.length | 0;\n out.length = len;\n len = len - 1 | 0;\n var a3 = self2.words[0] | 0;\n var b4 = num2.words[0] | 0;\n var r2 = a3 * b4;\n var lo = r2 & 67108863;\n var carry = r2 / 67108864 | 0;\n out.words[0] = lo;\n for (var k4 = 1; k4 < len; k4++) {\n var ncarry = carry >>> 26;\n var rword = carry & 67108863;\n var maxJ = Math.min(k4, num2.length - 1);\n for (var j2 = Math.max(0, k4 - self2.length + 1); j2 <= maxJ; j2++) {\n var i3 = k4 - j2 | 0;\n a3 = self2.words[i3] | 0;\n b4 = num2.words[j2] | 0;\n r2 = a3 * b4 + rword;\n ncarry += r2 / 67108864 | 0;\n rword = r2 & 67108863;\n }\n out.words[k4] = rword | 0;\n carry = ncarry | 0;\n }\n if (carry !== 0) {\n out.words[k4] = carry | 0;\n } else {\n out.length--;\n }\n return out._strip();\n }\n var comb10MulTo = function comb10MulTo2(self2, num2, out) {\n var a3 = self2.words;\n var b4 = num2.words;\n var o5 = out.words;\n var c4 = 0;\n var lo;\n var mid;\n var hi;\n var a0 = a3[0] | 0;\n var al0 = a0 & 8191;\n var ah0 = a0 >>> 13;\n var a1 = a3[1] | 0;\n var al1 = a1 & 8191;\n var ah1 = a1 >>> 13;\n var a22 = a3[2] | 0;\n var al2 = a22 & 8191;\n var ah2 = a22 >>> 13;\n var a32 = a3[3] | 0;\n var al3 = a32 & 8191;\n var ah3 = a32 >>> 13;\n var a4 = a3[4] | 0;\n var al4 = a4 & 8191;\n var ah4 = a4 >>> 13;\n var a5 = a3[5] | 0;\n var al5 = a5 & 8191;\n var ah5 = a5 >>> 13;\n var a6 = a3[6] | 0;\n var al6 = a6 & 8191;\n var ah6 = a6 >>> 13;\n var a7 = a3[7] | 0;\n var al7 = a7 & 8191;\n var ah7 = a7 >>> 13;\n var a8 = a3[8] | 0;\n var al8 = a8 & 8191;\n var ah8 = a8 >>> 13;\n var a9 = a3[9] | 0;\n var al9 = a9 & 8191;\n var ah9 = a9 >>> 13;\n var b0 = b4[0] | 0;\n var bl0 = b0 & 8191;\n var bh0 = b0 >>> 13;\n var b1 = b4[1] | 0;\n var bl1 = b1 & 8191;\n var bh1 = b1 >>> 13;\n var b22 = b4[2] | 0;\n var bl2 = b22 & 8191;\n var bh2 = b22 >>> 13;\n var b32 = b4[3] | 0;\n var bl3 = b32 & 8191;\n var bh3 = b32 >>> 13;\n var b42 = b4[4] | 0;\n var bl4 = b42 & 8191;\n var bh4 = b42 >>> 13;\n var b5 = b4[5] | 0;\n var bl5 = b5 & 8191;\n var bh5 = b5 >>> 13;\n var b6 = b4[6] | 0;\n var bl6 = b6 & 8191;\n var bh6 = b6 >>> 13;\n var b7 = b4[7] | 0;\n var bl7 = b7 & 8191;\n var bh7 = b7 >>> 13;\n var b8 = b4[8] | 0;\n var bl8 = b8 & 8191;\n var bh8 = b8 >>> 13;\n var b9 = b4[9] | 0;\n var bl9 = b9 & 8191;\n var bh9 = b9 >>> 13;\n out.negative = self2.negative ^ num2.negative;\n out.length = 19;\n lo = Math.imul(al0, bl0);\n mid = Math.imul(al0, bh0);\n mid = mid + Math.imul(ah0, bl0) | 0;\n hi = Math.imul(ah0, bh0);\n var w0 = (c4 + lo | 0) + ((mid & 8191) << 13) | 0;\n c4 = (hi + (mid >>> 13) | 0) + (w0 >>> 26) | 0;\n w0 &= 67108863;\n lo = Math.imul(al1, bl0);\n mid = Math.imul(al1, bh0);\n mid = mid + Math.imul(ah1, bl0) | 0;\n hi = Math.imul(ah1, bh0);\n lo = lo + Math.imul(al0, bl1) | 0;\n mid = mid + Math.imul(al0, bh1) | 0;\n mid = mid + Math.imul(ah0, bl1) | 0;\n hi = hi + Math.imul(ah0, bh1) | 0;\n var w1 = (c4 + lo | 0) + ((mid & 8191) << 13) | 0;\n c4 = (hi + (mid >>> 13) | 0) + (w1 >>> 26) | 0;\n w1 &= 67108863;\n lo = Math.imul(al2, bl0);\n mid = Math.imul(al2, bh0);\n mid = mid + Math.imul(ah2, bl0) | 0;\n hi = Math.imul(ah2, bh0);\n lo = lo + Math.imul(al1, bl1) | 0;\n mid = mid + Math.imul(al1, bh1) | 0;\n mid = mid + Math.imul(ah1, bl1) | 0;\n hi = hi + Math.imul(ah1, bh1) | 0;\n lo = lo + Math.imul(al0, bl2) | 0;\n mid = mid + Math.imul(al0, bh2) | 0;\n mid = mid + Math.imul(ah0, bl2) | 0;\n hi = hi + Math.imul(ah0, bh2) | 0;\n var w22 = (c4 + lo | 0) + ((mid & 8191) << 13) | 0;\n c4 = (hi + (mid >>> 13) | 0) + (w22 >>> 26) | 0;\n w22 &= 67108863;\n lo = Math.imul(al3, bl0);\n mid = Math.imul(al3, bh0);\n mid = mid + Math.imul(ah3, bl0) | 0;\n hi = Math.imul(ah3, bh0);\n lo = lo + Math.imul(al2, bl1) | 0;\n mid = mid + Math.imul(al2, bh1) | 0;\n mid = mid + Math.imul(ah2, bl1) | 0;\n hi = hi + Math.imul(ah2, bh1) | 0;\n lo = lo + Math.imul(al1, bl2) | 0;\n mid = mid + Math.imul(al1, bh2) | 0;\n mid = mid + Math.imul(ah1, bl2) | 0;\n hi = hi + Math.imul(ah1, bh2) | 0;\n lo = lo + Math.imul(al0, bl3) | 0;\n mid = mid + Math.imul(al0, bh3) | 0;\n mid = mid + Math.imul(ah0, bl3) | 0;\n hi = hi + Math.imul(ah0, bh3) | 0;\n var w3 = (c4 + lo | 0) + ((mid & 8191) << 13) | 0;\n c4 = (hi + (mid >>> 13) | 0) + (w3 >>> 26) | 0;\n w3 &= 67108863;\n lo = Math.imul(al4, bl0);\n mid = Math.imul(al4, bh0);\n mid = mid + Math.imul(ah4, bl0) | 0;\n hi = Math.imul(ah4, bh0);\n lo = lo + Math.imul(al3, bl1) | 0;\n mid = mid + Math.imul(al3, bh1) | 0;\n mid = mid + Math.imul(ah3, bl1) | 0;\n hi = hi + Math.imul(ah3, bh1) | 0;\n lo = lo + Math.imul(al2, bl2) | 0;\n mid = mid + Math.imul(al2, bh2) | 0;\n mid = mid + Math.imul(ah2, bl2) | 0;\n hi = hi + Math.imul(ah2, bh2) | 0;\n lo = lo + Math.imul(al1, bl3) | 0;\n mid = mid + Math.imul(al1, bh3) | 0;\n mid = mid + Math.imul(ah1, bl3) | 0;\n hi = hi + Math.imul(ah1, bh3) | 0;\n lo = lo + Math.imul(al0, bl4) | 0;\n mid = mid + Math.imul(al0, bh4) | 0;\n mid = mid + Math.imul(ah0, bl4) | 0;\n hi = hi + Math.imul(ah0, bh4) | 0;\n var w4 = (c4 + lo | 0) + ((mid & 8191) << 13) | 0;\n c4 = (hi + (mid >>> 13) | 0) + (w4 >>> 26) | 0;\n w4 &= 67108863;\n lo = Math.imul(al5, bl0);\n mid = Math.imul(al5, bh0);\n mid = mid + Math.imul(ah5, bl0) | 0;\n hi = Math.imul(ah5, bh0);\n lo = lo + Math.imul(al4, bl1) | 0;\n mid = mid + Math.imul(al4, bh1) | 0;\n mid = mid + Math.imul(ah4, bl1) | 0;\n hi = hi + Math.imul(ah4, bh1) | 0;\n lo = lo + Math.imul(al3, bl2) | 0;\n mid = mid + Math.imul(al3, bh2) | 0;\n mid = mid + Math.imul(ah3, bl2) | 0;\n hi = hi + Math.imul(ah3, bh2) | 0;\n lo = lo + Math.imul(al2, bl3) | 0;\n mid = mid + Math.imul(al2, bh3) | 0;\n mid = mid + Math.imul(ah2, bl3) | 0;\n hi = hi + Math.imul(ah2, bh3) | 0;\n lo = lo + Math.imul(al1, bl4) | 0;\n mid = mid + Math.imul(al1, bh4) | 0;\n mid = mid + Math.imul(ah1, bl4) | 0;\n hi = hi + Math.imul(ah1, bh4) | 0;\n lo = lo + Math.imul(al0, bl5) | 0;\n mid = mid + Math.imul(al0, bh5) | 0;\n mid = mid + Math.imul(ah0, bl5) | 0;\n hi = hi + Math.imul(ah0, bh5) | 0;\n var w5 = (c4 + lo | 0) + ((mid & 8191) << 13) | 0;\n c4 = (hi + (mid >>> 13) | 0) + (w5 >>> 26) | 0;\n w5 &= 67108863;\n lo = Math.imul(al6, bl0);\n mid = Math.imul(al6, bh0);\n mid = mid + Math.imul(ah6, bl0) | 0;\n hi = Math.imul(ah6, bh0);\n lo = lo + Math.imul(al5, bl1) | 0;\n mid = mid + Math.imul(al5, bh1) | 0;\n mid = mid + Math.imul(ah5, bl1) | 0;\n hi = hi + Math.imul(ah5, bh1) | 0;\n lo = lo + Math.imul(al4, bl2) | 0;\n mid = mid + Math.imul(al4, bh2) | 0;\n mid = mid + Math.imul(ah4, bl2) | 0;\n hi = hi + Math.imul(ah4, bh2) | 0;\n lo = lo + Math.imul(al3, bl3) | 0;\n mid = mid + Math.imul(al3, bh3) | 0;\n mid = mid + Math.imul(ah3, bl3) | 0;\n hi = hi + Math.imul(ah3, bh3) | 0;\n lo = lo + Math.imul(al2, bl4) | 0;\n mid = mid + Math.imul(al2, bh4) | 0;\n mid = mid + Math.imul(ah2, bl4) | 0;\n hi = hi + Math.imul(ah2, bh4) | 0;\n lo = lo + Math.imul(al1, bl5) | 0;\n mid = mid + Math.imul(al1, bh5) | 0;\n mid = mid + Math.imul(ah1, bl5) | 0;\n hi = hi + Math.imul(ah1, bh5) | 0;\n lo = lo + Math.imul(al0, bl6) | 0;\n mid = mid + Math.imul(al0, bh6) | 0;\n mid = mid + Math.imul(ah0, bl6) | 0;\n hi = hi + Math.imul(ah0, bh6) | 0;\n var w6 = (c4 + lo | 0) + ((mid & 8191) << 13) | 0;\n c4 = (hi + (mid >>> 13) | 0) + (w6 >>> 26) | 0;\n w6 &= 67108863;\n lo = Math.imul(al7, bl0);\n mid = Math.imul(al7, bh0);\n mid = mid + Math.imul(ah7, bl0) | 0;\n hi = Math.imul(ah7, bh0);\n lo = lo + Math.imul(al6, bl1) | 0;\n mid = mid + Math.imul(al6, bh1) | 0;\n mid = mid + Math.imul(ah6, bl1) | 0;\n hi = hi + Math.imul(ah6, bh1) | 0;\n lo = lo + Math.imul(al5, bl2) | 0;\n mid = mid + Math.imul(al5, bh2) | 0;\n mid = mid + Math.imul(ah5, bl2) | 0;\n hi = hi + Math.imul(ah5, bh2) | 0;\n lo = lo + Math.imul(al4, bl3) | 0;\n mid = mid + Math.imul(al4, bh3) | 0;\n mid = mid + Math.imul(ah4, bl3) | 0;\n hi = hi + Math.imul(ah4, bh3) | 0;\n lo = lo + Math.imul(al3, bl4) | 0;\n mid = mid + Math.imul(al3, bh4) | 0;\n mid = mid + Math.imul(ah3, bl4) | 0;\n hi = hi + Math.imul(ah3, bh4) | 0;\n lo = lo + Math.imul(al2, bl5) | 0;\n mid = mid + Math.imul(al2, bh5) | 0;\n mid = mid + Math.imul(ah2, bl5) | 0;\n hi = hi + Math.imul(ah2, bh5) | 0;\n lo = lo + Math.imul(al1, bl6) | 0;\n mid = mid + Math.imul(al1, bh6) | 0;\n mid = mid + Math.imul(ah1, bl6) | 0;\n hi = hi + Math.imul(ah1, bh6) | 0;\n lo = lo + Math.imul(al0, bl7) | 0;\n mid = mid + Math.imul(al0, bh7) | 0;\n mid = mid + Math.imul(ah0, bl7) | 0;\n hi = hi + Math.imul(ah0, bh7) | 0;\n var w7 = (c4 + lo | 0) + ((mid & 8191) << 13) | 0;\n c4 = (hi + (mid >>> 13) | 0) + (w7 >>> 26) | 0;\n w7 &= 67108863;\n lo = Math.imul(al8, bl0);\n mid = Math.imul(al8, bh0);\n mid = mid + Math.imul(ah8, bl0) | 0;\n hi = Math.imul(ah8, bh0);\n lo = lo + Math.imul(al7, bl1) | 0;\n mid = mid + Math.imul(al7, bh1) | 0;\n mid = mid + Math.imul(ah7, bl1) | 0;\n hi = hi + Math.imul(ah7, bh1) | 0;\n lo = lo + Math.imul(al6, bl2) | 0;\n mid = mid + Math.imul(al6, bh2) | 0;\n mid = mid + Math.imul(ah6, bl2) | 0;\n hi = hi + Math.imul(ah6, bh2) | 0;\n lo = lo + Math.imul(al5, bl3) | 0;\n mid = mid + Math.imul(al5, bh3) | 0;\n mid = mid + Math.imul(ah5, bl3) | 0;\n hi = hi + Math.imul(ah5, bh3) | 0;\n lo = lo + Math.imul(al4, bl4) | 0;\n mid = mid + Math.imul(al4, bh4) | 0;\n mid = mid + Math.imul(ah4, bl4) | 0;\n hi = hi + Math.imul(ah4, bh4) | 0;\n lo = lo + Math.imul(al3, bl5) | 0;\n mid = mid + Math.imul(al3, bh5) | 0;\n mid = mid + Math.imul(ah3, bl5) | 0;\n hi = hi + Math.imul(ah3, bh5) | 0;\n lo = lo + Math.imul(al2, bl6) | 0;\n mid = mid + Math.imul(al2, bh6) | 0;\n mid = mid + Math.imul(ah2, bl6) | 0;\n hi = hi + Math.imul(ah2, bh6) | 0;\n lo = lo + Math.imul(al1, bl7) | 0;\n mid = mid + Math.imul(al1, bh7) | 0;\n mid = mid + Math.imul(ah1, bl7) | 0;\n hi = hi + Math.imul(ah1, bh7) | 0;\n lo = lo + Math.imul(al0, bl8) | 0;\n mid = mid + Math.imul(al0, bh8) | 0;\n mid = mid + Math.imul(ah0, bl8) | 0;\n hi = hi + Math.imul(ah0, bh8) | 0;\n var w8 = (c4 + lo | 0) + ((mid & 8191) << 13) | 0;\n c4 = (hi + (mid >>> 13) | 0) + (w8 >>> 26) | 0;\n w8 &= 67108863;\n lo = Math.imul(al9, bl0);\n mid = Math.imul(al9, bh0);\n mid = mid + Math.imul(ah9, bl0) | 0;\n hi = Math.imul(ah9, bh0);\n lo = lo + Math.imul(al8, bl1) | 0;\n mid = mid + Math.imul(al8, bh1) | 0;\n mid = mid + Math.imul(ah8, bl1) | 0;\n hi = hi + Math.imul(ah8, bh1) | 0;\n lo = lo + Math.imul(al7, bl2) | 0;\n mid = mid + Math.imul(al7, bh2) | 0;\n mid = mid + Math.imul(ah7, bl2) | 0;\n hi = hi + Math.imul(ah7, bh2) | 0;\n lo = lo + Math.imul(al6, bl3) | 0;\n mid = mid + Math.imul(al6, bh3) | 0;\n mid = mid + Math.imul(ah6, bl3) | 0;\n hi = hi + Math.imul(ah6, bh3) | 0;\n lo = lo + Math.imul(al5, bl4) | 0;\n mid = mid + Math.imul(al5, bh4) | 0;\n mid = mid + Math.imul(ah5, bl4) | 0;\n hi = hi + Math.imul(ah5, bh4) | 0;\n lo = lo + Math.imul(al4, bl5) | 0;\n mid = mid + Math.imul(al4, bh5) | 0;\n mid = mid + Math.imul(ah4, bl5) | 0;\n hi = hi + Math.imul(ah4, bh5) | 0;\n lo = lo + Math.imul(al3, bl6) | 0;\n mid = mid + Math.imul(al3, bh6) | 0;\n mid = mid + Math.imul(ah3, bl6) | 0;\n hi = hi + Math.imul(ah3, bh6) | 0;\n lo = lo + Math.imul(al2, bl7) | 0;\n mid = mid + Math.imul(al2, bh7) | 0;\n mid = mid + Math.imul(ah2, bl7) | 0;\n hi = hi + Math.imul(ah2, bh7) | 0;\n lo = lo + Math.imul(al1, bl8) | 0;\n mid = mid + Math.imul(al1, bh8) | 0;\n mid = mid + Math.imul(ah1, bl8) | 0;\n hi = hi + Math.imul(ah1, bh8) | 0;\n lo = lo + Math.imul(al0, bl9) | 0;\n mid = mid + Math.imul(al0, bh9) | 0;\n mid = mid + Math.imul(ah0, bl9) | 0;\n hi = hi + Math.imul(ah0, bh9) | 0;\n var w9 = (c4 + lo | 0) + ((mid & 8191) << 13) | 0;\n c4 = (hi + (mid >>> 13) | 0) + (w9 >>> 26) | 0;\n w9 &= 67108863;\n lo = Math.imul(al9, bl1);\n mid = Math.imul(al9, bh1);\n mid = mid + Math.imul(ah9, bl1) | 0;\n hi = Math.imul(ah9, bh1);\n lo = lo + Math.imul(al8, bl2) | 0;\n mid = mid + Math.imul(al8, bh2) | 0;\n mid = mid + Math.imul(ah8, bl2) | 0;\n hi = hi + Math.imul(ah8, bh2) | 0;\n lo = lo + Math.imul(al7, bl3) | 0;\n mid = mid + Math.imul(al7, bh3) | 0;\n mid = mid + Math.imul(ah7, bl3) | 0;\n hi = hi + Math.imul(ah7, bh3) | 0;\n lo = lo + Math.imul(al6, bl4) | 0;\n mid = mid + Math.imul(al6, bh4) | 0;\n mid = mid + Math.imul(ah6, bl4) | 0;\n hi = hi + Math.imul(ah6, bh4) | 0;\n lo = lo + Math.imul(al5, bl5) | 0;\n mid = mid + Math.imul(al5, bh5) | 0;\n mid = mid + Math.imul(ah5, bl5) | 0;\n hi = hi + Math.imul(ah5, bh5) | 0;\n lo = lo + Math.imul(al4, bl6) | 0;\n mid = mid + Math.imul(al4, bh6) | 0;\n mid = mid + Math.imul(ah4, bl6) | 0;\n hi = hi + Math.imul(ah4, bh6) | 0;\n lo = lo + Math.imul(al3, bl7) | 0;\n mid = mid + Math.imul(al3, bh7) | 0;\n mid = mid + Math.imul(ah3, bl7) | 0;\n hi = hi + Math.imul(ah3, bh7) | 0;\n lo = lo + Math.imul(al2, bl8) | 0;\n mid = mid + Math.imul(al2, bh8) | 0;\n mid = mid + Math.imul(ah2, bl8) | 0;\n hi = hi + Math.imul(ah2, bh8) | 0;\n lo = lo + Math.imul(al1, bl9) | 0;\n mid = mid + Math.imul(al1, bh9) | 0;\n mid = mid + Math.imul(ah1, bl9) | 0;\n hi = hi + Math.imul(ah1, bh9) | 0;\n var w10 = (c4 + lo | 0) + ((mid & 8191) << 13) | 0;\n c4 = (hi + (mid >>> 13) | 0) + (w10 >>> 26) | 0;\n w10 &= 67108863;\n lo = Math.imul(al9, bl2);\n mid = Math.imul(al9, bh2);\n mid = mid + Math.imul(ah9, bl2) | 0;\n hi = Math.imul(ah9, bh2);\n lo = lo + Math.imul(al8, bl3) | 0;\n mid = mid + Math.imul(al8, bh3) | 0;\n mid = mid + Math.imul(ah8, bl3) | 0;\n hi = hi + Math.imul(ah8, bh3) | 0;\n lo = lo + Math.imul(al7, bl4) | 0;\n mid = mid + Math.imul(al7, bh4) | 0;\n mid = mid + Math.imul(ah7, bl4) | 0;\n hi = hi + Math.imul(ah7, bh4) | 0;\n lo = lo + Math.imul(al6, bl5) | 0;\n mid = mid + Math.imul(al6, bh5) | 0;\n mid = mid + Math.imul(ah6, bl5) | 0;\n hi = hi + Math.imul(ah6, bh5) | 0;\n lo = lo + Math.imul(al5, bl6) | 0;\n mid = mid + Math.imul(al5, bh6) | 0;\n mid = mid + Math.imul(ah5, bl6) | 0;\n hi = hi + Math.imul(ah5, bh6) | 0;\n lo = lo + Math.imul(al4, bl7) | 0;\n mid = mid + Math.imul(al4, bh7) | 0;\n mid = mid + Math.imul(ah4, bl7) | 0;\n hi = hi + Math.imul(ah4, bh7) | 0;\n lo = lo + Math.imul(al3, bl8) | 0;\n mid = mid + Math.imul(al3, bh8) | 0;\n mid = mid + Math.imul(ah3, bl8) | 0;\n hi = hi + Math.imul(ah3, bh8) | 0;\n lo = lo + Math.imul(al2, bl9) | 0;\n mid = mid + Math.imul(al2, bh9) | 0;\n mid = mid + Math.imul(ah2, bl9) | 0;\n hi = hi + Math.imul(ah2, bh9) | 0;\n var w11 = (c4 + lo | 0) + ((mid & 8191) << 13) | 0;\n c4 = (hi + (mid >>> 13) | 0) + (w11 >>> 26) | 0;\n w11 &= 67108863;\n lo = Math.imul(al9, bl3);\n mid = Math.imul(al9, bh3);\n mid = mid + Math.imul(ah9, bl3) | 0;\n hi = Math.imul(ah9, bh3);\n lo = lo + Math.imul(al8, bl4) | 0;\n mid = mid + Math.imul(al8, bh4) | 0;\n mid = mid + Math.imul(ah8, bl4) | 0;\n hi = hi + Math.imul(ah8, bh4) | 0;\n lo = lo + Math.imul(al7, bl5) | 0;\n mid = mid + Math.imul(al7, bh5) | 0;\n mid = mid + Math.imul(ah7, bl5) | 0;\n hi = hi + Math.imul(ah7, bh5) | 0;\n lo = lo + Math.imul(al6, bl6) | 0;\n mid = mid + Math.imul(al6, bh6) | 0;\n mid = mid + Math.imul(ah6, bl6) | 0;\n hi = hi + Math.imul(ah6, bh6) | 0;\n lo = lo + Math.imul(al5, bl7) | 0;\n mid = mid + Math.imul(al5, bh7) | 0;\n mid = mid + Math.imul(ah5, bl7) | 0;\n hi = hi + Math.imul(ah5, bh7) | 0;\n lo = lo + Math.imul(al4, bl8) | 0;\n mid = mid + Math.imul(al4, bh8) | 0;\n mid = mid + Math.imul(ah4, bl8) | 0;\n hi = hi + Math.imul(ah4, bh8) | 0;\n lo = lo + Math.imul(al3, bl9) | 0;\n mid = mid + Math.imul(al3, bh9) | 0;\n mid = mid + Math.imul(ah3, bl9) | 0;\n hi = hi + Math.imul(ah3, bh9) | 0;\n var w12 = (c4 + lo | 0) + ((mid & 8191) << 13) | 0;\n c4 = (hi + (mid >>> 13) | 0) + (w12 >>> 26) | 0;\n w12 &= 67108863;\n lo = Math.imul(al9, bl4);\n mid = Math.imul(al9, bh4);\n mid = mid + Math.imul(ah9, bl4) | 0;\n hi = Math.imul(ah9, bh4);\n lo = lo + Math.imul(al8, bl5) | 0;\n mid = mid + Math.imul(al8, bh5) | 0;\n mid = mid + Math.imul(ah8, bl5) | 0;\n hi = hi + Math.imul(ah8, bh5) | 0;\n lo = lo + Math.imul(al7, bl6) | 0;\n mid = mid + Math.imul(al7, bh6) | 0;\n mid = mid + Math.imul(ah7, bl6) | 0;\n hi = hi + Math.imul(ah7, bh6) | 0;\n lo = lo + Math.imul(al6, bl7) | 0;\n mid = mid + Math.imul(al6, bh7) | 0;\n mid = mid + Math.imul(ah6, bl7) | 0;\n hi = hi + Math.imul(ah6, bh7) | 0;\n lo = lo + Math.imul(al5, bl8) | 0;\n mid = mid + Math.imul(al5, bh8) | 0;\n mid = mid + Math.imul(ah5, bl8) | 0;\n hi = hi + Math.imul(ah5, bh8) | 0;\n lo = lo + Math.imul(al4, bl9) | 0;\n mid = mid + Math.imul(al4, bh9) | 0;\n mid = mid + Math.imul(ah4, bl9) | 0;\n hi = hi + Math.imul(ah4, bh9) | 0;\n var w13 = (c4 + lo | 0) + ((mid & 8191) << 13) | 0;\n c4 = (hi + (mid >>> 13) | 0) + (w13 >>> 26) | 0;\n w13 &= 67108863;\n lo = Math.imul(al9, bl5);\n mid = Math.imul(al9, bh5);\n mid = mid + Math.imul(ah9, bl5) | 0;\n hi = Math.imul(ah9, bh5);\n lo = lo + Math.imul(al8, bl6) | 0;\n mid = mid + Math.imul(al8, bh6) | 0;\n mid = mid + Math.imul(ah8, bl6) | 0;\n hi = hi + Math.imul(ah8, bh6) | 0;\n lo = lo + Math.imul(al7, bl7) | 0;\n mid = mid + Math.imul(al7, bh7) | 0;\n mid = mid + Math.imul(ah7, bl7) | 0;\n hi = hi + Math.imul(ah7, bh7) | 0;\n lo = lo + Math.imul(al6, bl8) | 0;\n mid = mid + Math.imul(al6, bh8) | 0;\n mid = mid + Math.imul(ah6, bl8) | 0;\n hi = hi + Math.imul(ah6, bh8) | 0;\n lo = lo + Math.imul(al5, bl9) | 0;\n mid = mid + Math.imul(al5, bh9) | 0;\n mid = mid + Math.imul(ah5, bl9) | 0;\n hi = hi + Math.imul(ah5, bh9) | 0;\n var w14 = (c4 + lo | 0) + ((mid & 8191) << 13) | 0;\n c4 = (hi + (mid >>> 13) | 0) + (w14 >>> 26) | 0;\n w14 &= 67108863;\n lo = Math.imul(al9, bl6);\n mid = Math.imul(al9, bh6);\n mid = mid + Math.imul(ah9, bl6) | 0;\n hi = Math.imul(ah9, bh6);\n lo = lo + Math.imul(al8, bl7) | 0;\n mid = mid + Math.imul(al8, bh7) | 0;\n mid = mid + Math.imul(ah8, bl7) | 0;\n hi = hi + Math.imul(ah8, bh7) | 0;\n lo = lo + Math.imul(al7, bl8) | 0;\n mid = mid + Math.imul(al7, bh8) | 0;\n mid = mid + Math.imul(ah7, bl8) | 0;\n hi = hi + Math.imul(ah7, bh8) | 0;\n lo = lo + Math.imul(al6, bl9) | 0;\n mid = mid + Math.imul(al6, bh9) | 0;\n mid = mid + Math.imul(ah6, bl9) | 0;\n hi = hi + Math.imul(ah6, bh9) | 0;\n var w15 = (c4 + lo | 0) + ((mid & 8191) << 13) | 0;\n c4 = (hi + (mid >>> 13) | 0) + (w15 >>> 26) | 0;\n w15 &= 67108863;\n lo = Math.imul(al9, bl7);\n mid = Math.imul(al9, bh7);\n mid = mid + Math.imul(ah9, bl7) | 0;\n hi = Math.imul(ah9, bh7);\n lo = lo + Math.imul(al8, bl8) | 0;\n mid = mid + Math.imul(al8, bh8) | 0;\n mid = mid + Math.imul(ah8, bl8) | 0;\n hi = hi + Math.imul(ah8, bh8) | 0;\n lo = lo + Math.imul(al7, bl9) | 0;\n mid = mid + Math.imul(al7, bh9) | 0;\n mid = mid + Math.imul(ah7, bl9) | 0;\n hi = hi + Math.imul(ah7, bh9) | 0;\n var w16 = (c4 + lo | 0) + ((mid & 8191) << 13) | 0;\n c4 = (hi + (mid >>> 13) | 0) + (w16 >>> 26) | 0;\n w16 &= 67108863;\n lo = Math.imul(al9, bl8);\n mid = Math.imul(al9, bh8);\n mid = mid + Math.imul(ah9, bl8) | 0;\n hi = Math.imul(ah9, bh8);\n lo = lo + Math.imul(al8, bl9) | 0;\n mid = mid + Math.imul(al8, bh9) | 0;\n mid = mid + Math.imul(ah8, bl9) | 0;\n hi = hi + Math.imul(ah8, bh9) | 0;\n var w17 = (c4 + lo | 0) + ((mid & 8191) << 13) | 0;\n c4 = (hi + (mid >>> 13) | 0) + (w17 >>> 26) | 0;\n w17 &= 67108863;\n lo = Math.imul(al9, bl9);\n mid = Math.imul(al9, bh9);\n mid = mid + Math.imul(ah9, bl9) | 0;\n hi = Math.imul(ah9, bh9);\n var w18 = (c4 + lo | 0) + ((mid & 8191) << 13) | 0;\n c4 = (hi + (mid >>> 13) | 0) + (w18 >>> 26) | 0;\n w18 &= 67108863;\n o5[0] = w0;\n o5[1] = w1;\n o5[2] = w22;\n o5[3] = w3;\n o5[4] = w4;\n o5[5] = w5;\n o5[6] = w6;\n o5[7] = w7;\n o5[8] = w8;\n o5[9] = w9;\n o5[10] = w10;\n o5[11] = w11;\n o5[12] = w12;\n o5[13] = w13;\n o5[14] = w14;\n o5[15] = w15;\n o5[16] = w16;\n o5[17] = w17;\n o5[18] = w18;\n if (c4 !== 0) {\n o5[19] = c4;\n out.length++;\n }\n return out;\n };\n if (!Math.imul) {\n comb10MulTo = smallMulTo;\n }\n function bigMulTo(self2, num2, out) {\n out.negative = num2.negative ^ self2.negative;\n out.length = self2.length + num2.length;\n var carry = 0;\n var hncarry = 0;\n for (var k4 = 0; k4 < out.length - 1; k4++) {\n var ncarry = hncarry;\n hncarry = 0;\n var rword = carry & 67108863;\n var maxJ = Math.min(k4, num2.length - 1);\n for (var j2 = Math.max(0, k4 - self2.length + 1); j2 <= maxJ; j2++) {\n var i3 = k4 - j2;\n var a3 = self2.words[i3] | 0;\n var b4 = num2.words[j2] | 0;\n var r2 = a3 * b4;\n var lo = r2 & 67108863;\n ncarry = ncarry + (r2 / 67108864 | 0) | 0;\n lo = lo + rword | 0;\n rword = lo & 67108863;\n ncarry = ncarry + (lo >>> 26) | 0;\n hncarry += ncarry >>> 26;\n ncarry &= 67108863;\n }\n out.words[k4] = rword;\n carry = ncarry;\n ncarry = hncarry;\n }\n if (carry !== 0) {\n out.words[k4] = carry;\n } else {\n out.length--;\n }\n return out._strip();\n }\n function jumboMulTo(self2, num2, out) {\n return bigMulTo(self2, num2, out);\n }\n BN.prototype.mulTo = function mulTo(num2, out) {\n var res;\n var len = this.length + num2.length;\n if (this.length === 10 && num2.length === 10) {\n res = comb10MulTo(this, num2, out);\n } else if (len < 63) {\n res = smallMulTo(this, num2, out);\n } else if (len < 1024) {\n res = bigMulTo(this, num2, out);\n } else {\n res = jumboMulTo(this, num2, out);\n }\n return res;\n };\n function FFTM(x4, y6) {\n this.x = x4;\n this.y = y6;\n }\n FFTM.prototype.makeRBT = function makeRBT(N4) {\n var t3 = new Array(N4);\n var l6 = BN.prototype._countBits(N4) - 1;\n for (var i3 = 0; i3 < N4; i3++) {\n t3[i3] = this.revBin(i3, l6, N4);\n }\n return t3;\n };\n FFTM.prototype.revBin = function revBin(x4, l6, N4) {\n if (x4 === 0 || x4 === N4 - 1)\n return x4;\n var rb = 0;\n for (var i3 = 0; i3 < l6; i3++) {\n rb |= (x4 & 1) << l6 - i3 - 1;\n x4 >>= 1;\n }\n return rb;\n };\n FFTM.prototype.permute = function permute(rbt, rws, iws, rtws, itws, N4) {\n for (var i3 = 0; i3 < N4; i3++) {\n rtws[i3] = rws[rbt[i3]];\n itws[i3] = iws[rbt[i3]];\n }\n };\n FFTM.prototype.transform = function transform2(rws, iws, rtws, itws, N4, rbt) {\n this.permute(rbt, rws, iws, rtws, itws, N4);\n for (var s4 = 1; s4 < N4; s4 <<= 1) {\n var l6 = s4 << 1;\n var rtwdf = Math.cos(2 * Math.PI / l6);\n var itwdf = Math.sin(2 * Math.PI / l6);\n for (var p4 = 0; p4 < N4; p4 += l6) {\n var rtwdf_ = rtwdf;\n var itwdf_ = itwdf;\n for (var j2 = 0; j2 < s4; j2++) {\n var re = rtws[p4 + j2];\n var ie = itws[p4 + j2];\n var ro = rtws[p4 + j2 + s4];\n var io = itws[p4 + j2 + s4];\n var rx = rtwdf_ * ro - itwdf_ * io;\n io = rtwdf_ * io + itwdf_ * ro;\n ro = rx;\n rtws[p4 + j2] = re + ro;\n itws[p4 + j2] = ie + io;\n rtws[p4 + j2 + s4] = re - ro;\n itws[p4 + j2 + s4] = ie - io;\n if (j2 !== l6) {\n rx = rtwdf * rtwdf_ - itwdf * itwdf_;\n itwdf_ = rtwdf * itwdf_ + itwdf * rtwdf_;\n rtwdf_ = rx;\n }\n }\n }\n }\n };\n FFTM.prototype.guessLen13b = function guessLen13b(n2, m2) {\n var N4 = Math.max(m2, n2) | 1;\n var odd = N4 & 1;\n var i3 = 0;\n for (N4 = N4 / 2 | 0; N4; N4 = N4 >>> 1) {\n i3++;\n }\n return 1 << i3 + 1 + odd;\n };\n FFTM.prototype.conjugate = function conjugate(rws, iws, N4) {\n if (N4 <= 1)\n return;\n for (var i3 = 0; i3 < N4 / 2; i3++) {\n var t3 = rws[i3];\n rws[i3] = rws[N4 - i3 - 1];\n rws[N4 - i3 - 1] = t3;\n t3 = iws[i3];\n iws[i3] = -iws[N4 - i3 - 1];\n iws[N4 - i3 - 1] = -t3;\n }\n };\n FFTM.prototype.normalize13b = function normalize13b(ws, N4) {\n var carry = 0;\n for (var i3 = 0; i3 < N4 / 2; i3++) {\n var w3 = Math.round(ws[2 * i3 + 1] / N4) * 8192 + Math.round(ws[2 * i3] / N4) + carry;\n ws[i3] = w3 & 67108863;\n if (w3 < 67108864) {\n carry = 0;\n } else {\n carry = w3 / 67108864 | 0;\n }\n }\n return ws;\n };\n FFTM.prototype.convert13b = function convert13b(ws, len, rws, N4) {\n var carry = 0;\n for (var i3 = 0; i3 < len; i3++) {\n carry = carry + (ws[i3] | 0);\n rws[2 * i3] = carry & 8191;\n carry = carry >>> 13;\n rws[2 * i3 + 1] = carry & 8191;\n carry = carry >>> 13;\n }\n for (i3 = 2 * len; i3 < N4; ++i3) {\n rws[i3] = 0;\n }\n assert9(carry === 0);\n assert9((carry & ~8191) === 0);\n };\n FFTM.prototype.stub = function stub(N4) {\n var ph = new Array(N4);\n for (var i3 = 0; i3 < N4; i3++) {\n ph[i3] = 0;\n }\n return ph;\n };\n FFTM.prototype.mulp = function mulp(x4, y6, out) {\n var N4 = 2 * this.guessLen13b(x4.length, y6.length);\n var rbt = this.makeRBT(N4);\n var _2 = this.stub(N4);\n var rws = new Array(N4);\n var rwst = new Array(N4);\n var iwst = new Array(N4);\n var nrws = new Array(N4);\n var nrwst = new Array(N4);\n var niwst = new Array(N4);\n var rmws = out.words;\n rmws.length = N4;\n this.convert13b(x4.words, x4.length, rws, N4);\n this.convert13b(y6.words, y6.length, nrws, N4);\n this.transform(rws, _2, rwst, iwst, N4, rbt);\n this.transform(nrws, _2, nrwst, niwst, N4, rbt);\n for (var i3 = 0; i3 < N4; i3++) {\n var rx = rwst[i3] * nrwst[i3] - iwst[i3] * niwst[i3];\n iwst[i3] = rwst[i3] * niwst[i3] + iwst[i3] * nrwst[i3];\n rwst[i3] = rx;\n }\n this.conjugate(rwst, iwst, N4);\n this.transform(rwst, iwst, rmws, _2, N4, rbt);\n this.conjugate(rmws, _2, N4);\n this.normalize13b(rmws, N4);\n out.negative = x4.negative ^ y6.negative;\n out.length = x4.length + y6.length;\n return out._strip();\n };\n BN.prototype.mul = function mul(num2) {\n var out = new BN(null);\n out.words = new Array(this.length + num2.length);\n return this.mulTo(num2, out);\n };\n BN.prototype.mulf = function mulf(num2) {\n var out = new BN(null);\n out.words = new Array(this.length + num2.length);\n return jumboMulTo(this, num2, out);\n };\n BN.prototype.imul = function imul(num2) {\n return this.clone().mulTo(num2, this);\n };\n BN.prototype.imuln = function imuln(num2) {\n var isNegNum = num2 < 0;\n if (isNegNum)\n num2 = -num2;\n assert9(typeof num2 === \"number\");\n assert9(num2 < 67108864);\n var carry = 0;\n for (var i3 = 0; i3 < this.length; i3++) {\n var w3 = (this.words[i3] | 0) * num2;\n var lo = (w3 & 67108863) + (carry & 67108863);\n carry >>= 26;\n carry += w3 / 67108864 | 0;\n carry += lo >>> 26;\n this.words[i3] = lo & 67108863;\n }\n if (carry !== 0) {\n this.words[i3] = carry;\n this.length++;\n }\n this.length = num2 === 0 ? 1 : this.length;\n return isNegNum ? this.ineg() : this;\n };\n BN.prototype.muln = function muln(num2) {\n return this.clone().imuln(num2);\n };\n BN.prototype.sqr = function sqr() {\n return this.mul(this);\n };\n BN.prototype.isqr = function isqr() {\n return this.imul(this.clone());\n };\n BN.prototype.pow = function pow(num2) {\n var w3 = toBitArray(num2);\n if (w3.length === 0)\n return new BN(1);\n var res = this;\n for (var i3 = 0; i3 < w3.length; i3++, res = res.sqr()) {\n if (w3[i3] !== 0)\n break;\n }\n if (++i3 < w3.length) {\n for (var q3 = res.sqr(); i3 < w3.length; i3++, q3 = q3.sqr()) {\n if (w3[i3] === 0)\n continue;\n res = res.mul(q3);\n }\n }\n return res;\n };\n BN.prototype.iushln = function iushln(bits) {\n assert9(typeof bits === \"number\" && bits >= 0);\n var r2 = bits % 26;\n var s4 = (bits - r2) / 26;\n var carryMask = 67108863 >>> 26 - r2 << 26 - r2;\n var i3;\n if (r2 !== 0) {\n var carry = 0;\n for (i3 = 0; i3 < this.length; i3++) {\n var newCarry = this.words[i3] & carryMask;\n var c4 = (this.words[i3] | 0) - newCarry << r2;\n this.words[i3] = c4 | carry;\n carry = newCarry >>> 26 - r2;\n }\n if (carry) {\n this.words[i3] = carry;\n this.length++;\n }\n }\n if (s4 !== 0) {\n for (i3 = this.length - 1; i3 >= 0; i3--) {\n this.words[i3 + s4] = this.words[i3];\n }\n for (i3 = 0; i3 < s4; i3++) {\n this.words[i3] = 0;\n }\n this.length += s4;\n }\n return this._strip();\n };\n BN.prototype.ishln = function ishln(bits) {\n assert9(this.negative === 0);\n return this.iushln(bits);\n };\n BN.prototype.iushrn = function iushrn(bits, hint, extended) {\n assert9(typeof bits === \"number\" && bits >= 0);\n var h4;\n if (hint) {\n h4 = (hint - hint % 26) / 26;\n } else {\n h4 = 0;\n }\n var r2 = bits % 26;\n var s4 = Math.min((bits - r2) / 26, this.length);\n var mask = 67108863 ^ 67108863 >>> r2 << r2;\n var maskedWords = extended;\n h4 -= s4;\n h4 = Math.max(0, h4);\n if (maskedWords) {\n for (var i3 = 0; i3 < s4; i3++) {\n maskedWords.words[i3] = this.words[i3];\n }\n maskedWords.length = s4;\n }\n if (s4 === 0) {\n } else if (this.length > s4) {\n this.length -= s4;\n for (i3 = 0; i3 < this.length; i3++) {\n this.words[i3] = this.words[i3 + s4];\n }\n } else {\n this.words[0] = 0;\n this.length = 1;\n }\n var carry = 0;\n for (i3 = this.length - 1; i3 >= 0 && (carry !== 0 || i3 >= h4); i3--) {\n var word = this.words[i3] | 0;\n this.words[i3] = carry << 26 - r2 | word >>> r2;\n carry = word & mask;\n }\n if (maskedWords && carry !== 0) {\n maskedWords.words[maskedWords.length++] = carry;\n }\n if (this.length === 0) {\n this.words[0] = 0;\n this.length = 1;\n }\n return this._strip();\n };\n BN.prototype.ishrn = function ishrn(bits, hint, extended) {\n assert9(this.negative === 0);\n return this.iushrn(bits, hint, extended);\n };\n BN.prototype.shln = function shln(bits) {\n return this.clone().ishln(bits);\n };\n BN.prototype.ushln = function ushln(bits) {\n return this.clone().iushln(bits);\n };\n BN.prototype.shrn = function shrn(bits) {\n return this.clone().ishrn(bits);\n };\n BN.prototype.ushrn = function ushrn(bits) {\n return this.clone().iushrn(bits);\n };\n BN.prototype.testn = function testn(bit) {\n assert9(typeof bit === \"number\" && bit >= 0);\n var r2 = bit % 26;\n var s4 = (bit - r2) / 26;\n var q3 = 1 << r2;\n if (this.length <= s4)\n return false;\n var w3 = this.words[s4];\n return !!(w3 & q3);\n };\n BN.prototype.imaskn = function imaskn(bits) {\n assert9(typeof bits === \"number\" && bits >= 0);\n var r2 = bits % 26;\n var s4 = (bits - r2) / 26;\n assert9(this.negative === 0, \"imaskn works only with positive numbers\");\n if (this.length <= s4) {\n return this;\n }\n if (r2 !== 0) {\n s4++;\n }\n this.length = Math.min(s4, this.length);\n if (r2 !== 0) {\n var mask = 67108863 ^ 67108863 >>> r2 << r2;\n this.words[this.length - 1] &= mask;\n }\n return this._strip();\n };\n BN.prototype.maskn = function maskn(bits) {\n return this.clone().imaskn(bits);\n };\n BN.prototype.iaddn = function iaddn(num2) {\n assert9(typeof num2 === \"number\");\n assert9(num2 < 67108864);\n if (num2 < 0)\n return this.isubn(-num2);\n if (this.negative !== 0) {\n if (this.length === 1 && (this.words[0] | 0) <= num2) {\n this.words[0] = num2 - (this.words[0] | 0);\n this.negative = 0;\n return this;\n }\n this.negative = 0;\n this.isubn(num2);\n this.negative = 1;\n return this;\n }\n return this._iaddn(num2);\n };\n BN.prototype._iaddn = function _iaddn(num2) {\n this.words[0] += num2;\n for (var i3 = 0; i3 < this.length && this.words[i3] >= 67108864; i3++) {\n this.words[i3] -= 67108864;\n if (i3 === this.length - 1) {\n this.words[i3 + 1] = 1;\n } else {\n this.words[i3 + 1]++;\n }\n }\n this.length = Math.max(this.length, i3 + 1);\n return this;\n };\n BN.prototype.isubn = function isubn(num2) {\n assert9(typeof num2 === \"number\");\n assert9(num2 < 67108864);\n if (num2 < 0)\n return this.iaddn(-num2);\n if (this.negative !== 0) {\n this.negative = 0;\n this.iaddn(num2);\n this.negative = 1;\n return this;\n }\n this.words[0] -= num2;\n if (this.length === 1 && this.words[0] < 0) {\n this.words[0] = -this.words[0];\n this.negative = 1;\n } else {\n for (var i3 = 0; i3 < this.length && this.words[i3] < 0; i3++) {\n this.words[i3] += 67108864;\n this.words[i3 + 1] -= 1;\n }\n }\n return this._strip();\n };\n BN.prototype.addn = function addn(num2) {\n return this.clone().iaddn(num2);\n };\n BN.prototype.subn = function subn(num2) {\n return this.clone().isubn(num2);\n };\n BN.prototype.iabs = function iabs() {\n this.negative = 0;\n return this;\n };\n BN.prototype.abs = function abs() {\n return this.clone().iabs();\n };\n BN.prototype._ishlnsubmul = function _ishlnsubmul(num2, mul, shift) {\n var len = num2.length + shift;\n var i3;\n this._expand(len);\n var w3;\n var carry = 0;\n for (i3 = 0; i3 < num2.length; i3++) {\n w3 = (this.words[i3 + shift] | 0) + carry;\n var right = (num2.words[i3] | 0) * mul;\n w3 -= right & 67108863;\n carry = (w3 >> 26) - (right / 67108864 | 0);\n this.words[i3 + shift] = w3 & 67108863;\n }\n for (; i3 < this.length - shift; i3++) {\n w3 = (this.words[i3 + shift] | 0) + carry;\n carry = w3 >> 26;\n this.words[i3 + shift] = w3 & 67108863;\n }\n if (carry === 0)\n return this._strip();\n assert9(carry === -1);\n carry = 0;\n for (i3 = 0; i3 < this.length; i3++) {\n w3 = -(this.words[i3] | 0) + carry;\n carry = w3 >> 26;\n this.words[i3] = w3 & 67108863;\n }\n this.negative = 1;\n return this._strip();\n };\n BN.prototype._wordDiv = function _wordDiv(num2, mode) {\n var shift = this.length - num2.length;\n var a3 = this.clone();\n var b4 = num2;\n var bhi = b4.words[b4.length - 1] | 0;\n var bhiBits = this._countBits(bhi);\n shift = 26 - bhiBits;\n if (shift !== 0) {\n b4 = b4.ushln(shift);\n a3.iushln(shift);\n bhi = b4.words[b4.length - 1] | 0;\n }\n var m2 = a3.length - b4.length;\n var q3;\n if (mode !== \"mod\") {\n q3 = new BN(null);\n q3.length = m2 + 1;\n q3.words = new Array(q3.length);\n for (var i3 = 0; i3 < q3.length; i3++) {\n q3.words[i3] = 0;\n }\n }\n var diff = a3.clone()._ishlnsubmul(b4, 1, m2);\n if (diff.negative === 0) {\n a3 = diff;\n if (q3) {\n q3.words[m2] = 1;\n }\n }\n for (var j2 = m2 - 1; j2 >= 0; j2--) {\n var qj = (a3.words[b4.length + j2] | 0) * 67108864 + (a3.words[b4.length + j2 - 1] | 0);\n qj = Math.min(qj / bhi | 0, 67108863);\n a3._ishlnsubmul(b4, qj, j2);\n while (a3.negative !== 0) {\n qj--;\n a3.negative = 0;\n a3._ishlnsubmul(b4, 1, j2);\n if (!a3.isZero()) {\n a3.negative ^= 1;\n }\n }\n if (q3) {\n q3.words[j2] = qj;\n }\n }\n if (q3) {\n q3._strip();\n }\n a3._strip();\n if (mode !== \"div\" && shift !== 0) {\n a3.iushrn(shift);\n }\n return {\n div: q3 || null,\n mod: a3\n };\n };\n BN.prototype.divmod = function divmod(num2, mode, positive) {\n assert9(!num2.isZero());\n if (this.isZero()) {\n return {\n div: new BN(0),\n mod: new BN(0)\n };\n }\n var div, mod3, res;\n if (this.negative !== 0 && num2.negative === 0) {\n res = this.neg().divmod(num2, mode);\n if (mode !== \"mod\") {\n div = res.div.neg();\n }\n if (mode !== \"div\") {\n mod3 = res.mod.neg();\n if (positive && mod3.negative !== 0) {\n mod3.iadd(num2);\n }\n }\n return {\n div,\n mod: mod3\n };\n }\n if (this.negative === 0 && num2.negative !== 0) {\n res = this.divmod(num2.neg(), mode);\n if (mode !== \"mod\") {\n div = res.div.neg();\n }\n return {\n div,\n mod: res.mod\n };\n }\n if ((this.negative & num2.negative) !== 0) {\n res = this.neg().divmod(num2.neg(), mode);\n if (mode !== \"div\") {\n mod3 = res.mod.neg();\n if (positive && mod3.negative !== 0) {\n mod3.isub(num2);\n }\n }\n return {\n div: res.div,\n mod: mod3\n };\n }\n if (num2.length > this.length || this.cmp(num2) < 0) {\n return {\n div: new BN(0),\n mod: this\n };\n }\n if (num2.length === 1) {\n if (mode === \"div\") {\n return {\n div: this.divn(num2.words[0]),\n mod: null\n };\n }\n if (mode === \"mod\") {\n return {\n div: null,\n mod: new BN(this.modrn(num2.words[0]))\n };\n }\n return {\n div: this.divn(num2.words[0]),\n mod: new BN(this.modrn(num2.words[0]))\n };\n }\n return this._wordDiv(num2, mode);\n };\n BN.prototype.div = function div(num2) {\n return this.divmod(num2, \"div\", false).div;\n };\n BN.prototype.mod = function mod3(num2) {\n return this.divmod(num2, \"mod\", false).mod;\n };\n BN.prototype.umod = function umod(num2) {\n return this.divmod(num2, \"mod\", true).mod;\n };\n BN.prototype.divRound = function divRound(num2) {\n var dm = this.divmod(num2);\n if (dm.mod.isZero())\n return dm.div;\n var mod3 = dm.div.negative !== 0 ? dm.mod.isub(num2) : dm.mod;\n var half = num2.ushrn(1);\n var r2 = num2.andln(1);\n var cmp = mod3.cmp(half);\n if (cmp < 0 || r2 === 1 && cmp === 0)\n return dm.div;\n return dm.div.negative !== 0 ? dm.div.isubn(1) : dm.div.iaddn(1);\n };\n BN.prototype.modrn = function modrn(num2) {\n var isNegNum = num2 < 0;\n if (isNegNum)\n num2 = -num2;\n assert9(num2 <= 67108863);\n var p4 = (1 << 26) % num2;\n var acc = 0;\n for (var i3 = this.length - 1; i3 >= 0; i3--) {\n acc = (p4 * acc + (this.words[i3] | 0)) % num2;\n }\n return isNegNum ? -acc : acc;\n };\n BN.prototype.modn = function modn(num2) {\n return this.modrn(num2);\n };\n BN.prototype.idivn = function idivn(num2) {\n var isNegNum = num2 < 0;\n if (isNegNum)\n num2 = -num2;\n assert9(num2 <= 67108863);\n var carry = 0;\n for (var i3 = this.length - 1; i3 >= 0; i3--) {\n var w3 = (this.words[i3] | 0) + carry * 67108864;\n this.words[i3] = w3 / num2 | 0;\n carry = w3 % num2;\n }\n this._strip();\n return isNegNum ? this.ineg() : this;\n };\n BN.prototype.divn = function divn(num2) {\n return this.clone().idivn(num2);\n };\n BN.prototype.egcd = function egcd(p4) {\n assert9(p4.negative === 0);\n assert9(!p4.isZero());\n var x4 = this;\n var y6 = p4.clone();\n if (x4.negative !== 0) {\n x4 = x4.umod(p4);\n } else {\n x4 = x4.clone();\n }\n var A4 = new BN(1);\n var B2 = new BN(0);\n var C = new BN(0);\n var D2 = new BN(1);\n var g4 = 0;\n while (x4.isEven() && y6.isEven()) {\n x4.iushrn(1);\n y6.iushrn(1);\n ++g4;\n }\n var yp = y6.clone();\n var xp = x4.clone();\n while (!x4.isZero()) {\n for (var i3 = 0, im = 1; (x4.words[0] & im) === 0 && i3 < 26; ++i3, im <<= 1)\n ;\n if (i3 > 0) {\n x4.iushrn(i3);\n while (i3-- > 0) {\n if (A4.isOdd() || B2.isOdd()) {\n A4.iadd(yp);\n B2.isub(xp);\n }\n A4.iushrn(1);\n B2.iushrn(1);\n }\n }\n for (var j2 = 0, jm = 1; (y6.words[0] & jm) === 0 && j2 < 26; ++j2, jm <<= 1)\n ;\n if (j2 > 0) {\n y6.iushrn(j2);\n while (j2-- > 0) {\n if (C.isOdd() || D2.isOdd()) {\n C.iadd(yp);\n D2.isub(xp);\n }\n C.iushrn(1);\n D2.iushrn(1);\n }\n }\n if (x4.cmp(y6) >= 0) {\n x4.isub(y6);\n A4.isub(C);\n B2.isub(D2);\n } else {\n y6.isub(x4);\n C.isub(A4);\n D2.isub(B2);\n }\n }\n return {\n a: C,\n b: D2,\n gcd: y6.iushln(g4)\n };\n };\n BN.prototype._invmp = function _invmp(p4) {\n assert9(p4.negative === 0);\n assert9(!p4.isZero());\n var a3 = this;\n var b4 = p4.clone();\n if (a3.negative !== 0) {\n a3 = a3.umod(p4);\n } else {\n a3 = a3.clone();\n }\n var x1 = new BN(1);\n var x22 = new BN(0);\n var delta = b4.clone();\n while (a3.cmpn(1) > 0 && b4.cmpn(1) > 0) {\n for (var i3 = 0, im = 1; (a3.words[0] & im) === 0 && i3 < 26; ++i3, im <<= 1)\n ;\n if (i3 > 0) {\n a3.iushrn(i3);\n while (i3-- > 0) {\n if (x1.isOdd()) {\n x1.iadd(delta);\n }\n x1.iushrn(1);\n }\n }\n for (var j2 = 0, jm = 1; (b4.words[0] & jm) === 0 && j2 < 26; ++j2, jm <<= 1)\n ;\n if (j2 > 0) {\n b4.iushrn(j2);\n while (j2-- > 0) {\n if (x22.isOdd()) {\n x22.iadd(delta);\n }\n x22.iushrn(1);\n }\n }\n if (a3.cmp(b4) >= 0) {\n a3.isub(b4);\n x1.isub(x22);\n } else {\n b4.isub(a3);\n x22.isub(x1);\n }\n }\n var res;\n if (a3.cmpn(1) === 0) {\n res = x1;\n } else {\n res = x22;\n }\n if (res.cmpn(0) < 0) {\n res.iadd(p4);\n }\n return res;\n };\n BN.prototype.gcd = function gcd(num2) {\n if (this.isZero())\n return num2.abs();\n if (num2.isZero())\n return this.abs();\n var a3 = this.clone();\n var b4 = num2.clone();\n a3.negative = 0;\n b4.negative = 0;\n for (var shift = 0; a3.isEven() && b4.isEven(); shift++) {\n a3.iushrn(1);\n b4.iushrn(1);\n }\n do {\n while (a3.isEven()) {\n a3.iushrn(1);\n }\n while (b4.isEven()) {\n b4.iushrn(1);\n }\n var r2 = a3.cmp(b4);\n if (r2 < 0) {\n var t3 = a3;\n a3 = b4;\n b4 = t3;\n } else if (r2 === 0 || b4.cmpn(1) === 0) {\n break;\n }\n a3.isub(b4);\n } while (true);\n return b4.iushln(shift);\n };\n BN.prototype.invm = function invm(num2) {\n return this.egcd(num2).a.umod(num2);\n };\n BN.prototype.isEven = function isEven() {\n return (this.words[0] & 1) === 0;\n };\n BN.prototype.isOdd = function isOdd() {\n return (this.words[0] & 1) === 1;\n };\n BN.prototype.andln = function andln(num2) {\n return this.words[0] & num2;\n };\n BN.prototype.bincn = function bincn(bit) {\n assert9(typeof bit === \"number\");\n var r2 = bit % 26;\n var s4 = (bit - r2) / 26;\n var q3 = 1 << r2;\n if (this.length <= s4) {\n this._expand(s4 + 1);\n this.words[s4] |= q3;\n return this;\n }\n var carry = q3;\n for (var i3 = s4; carry !== 0 && i3 < this.length; i3++) {\n var w3 = this.words[i3] | 0;\n w3 += carry;\n carry = w3 >>> 26;\n w3 &= 67108863;\n this.words[i3] = w3;\n }\n if (carry !== 0) {\n this.words[i3] = carry;\n this.length++;\n }\n return this;\n };\n BN.prototype.isZero = function isZero() {\n return this.length === 1 && this.words[0] === 0;\n };\n BN.prototype.cmpn = function cmpn(num2) {\n var negative = num2 < 0;\n if (this.negative !== 0 && !negative)\n return -1;\n if (this.negative === 0 && negative)\n return 1;\n this._strip();\n var res;\n if (this.length > 1) {\n res = 1;\n } else {\n if (negative) {\n num2 = -num2;\n }\n assert9(num2 <= 67108863, \"Number is too big\");\n var w3 = this.words[0] | 0;\n res = w3 === num2 ? 0 : w3 < num2 ? -1 : 1;\n }\n if (this.negative !== 0)\n return -res | 0;\n return res;\n };\n BN.prototype.cmp = function cmp(num2) {\n if (this.negative !== 0 && num2.negative === 0)\n return -1;\n if (this.negative === 0 && num2.negative !== 0)\n return 1;\n var res = this.ucmp(num2);\n if (this.negative !== 0)\n return -res | 0;\n return res;\n };\n BN.prototype.ucmp = function ucmp(num2) {\n if (this.length > num2.length)\n return 1;\n if (this.length < num2.length)\n return -1;\n var res = 0;\n for (var i3 = this.length - 1; i3 >= 0; i3--) {\n var a3 = this.words[i3] | 0;\n var b4 = num2.words[i3] | 0;\n if (a3 === b4)\n continue;\n if (a3 < b4) {\n res = -1;\n } else if (a3 > b4) {\n res = 1;\n }\n break;\n }\n return res;\n };\n BN.prototype.gtn = function gtn(num2) {\n return this.cmpn(num2) === 1;\n };\n BN.prototype.gt = function gt(num2) {\n return this.cmp(num2) === 1;\n };\n BN.prototype.gten = function gten(num2) {\n return this.cmpn(num2) >= 0;\n };\n BN.prototype.gte = function gte(num2) {\n return this.cmp(num2) >= 0;\n };\n BN.prototype.ltn = function ltn(num2) {\n return this.cmpn(num2) === -1;\n };\n BN.prototype.lt = function lt(num2) {\n return this.cmp(num2) === -1;\n };\n BN.prototype.lten = function lten(num2) {\n return this.cmpn(num2) <= 0;\n };\n BN.prototype.lte = function lte(num2) {\n return this.cmp(num2) <= 0;\n };\n BN.prototype.eqn = function eqn(num2) {\n return this.cmpn(num2) === 0;\n };\n BN.prototype.eq = function eq(num2) {\n return this.cmp(num2) === 0;\n };\n BN.red = function red(num2) {\n return new Red(num2);\n };\n BN.prototype.toRed = function toRed(ctx) {\n assert9(!this.red, \"Already a number in reduction context\");\n assert9(this.negative === 0, \"red works only with positives\");\n return ctx.convertTo(this)._forceRed(ctx);\n };\n BN.prototype.fromRed = function fromRed() {\n assert9(this.red, \"fromRed works only with numbers in reduction context\");\n return this.red.convertFrom(this);\n };\n BN.prototype._forceRed = function _forceRed(ctx) {\n this.red = ctx;\n return this;\n };\n BN.prototype.forceRed = function forceRed(ctx) {\n assert9(!this.red, \"Already a number in reduction context\");\n return this._forceRed(ctx);\n };\n BN.prototype.redAdd = function redAdd(num2) {\n assert9(this.red, \"redAdd works only with red numbers\");\n return this.red.add(this, num2);\n };\n BN.prototype.redIAdd = function redIAdd(num2) {\n assert9(this.red, \"redIAdd works only with red numbers\");\n return this.red.iadd(this, num2);\n };\n BN.prototype.redSub = function redSub(num2) {\n assert9(this.red, \"redSub works only with red numbers\");\n return this.red.sub(this, num2);\n };\n BN.prototype.redISub = function redISub(num2) {\n assert9(this.red, \"redISub works only with red numbers\");\n return this.red.isub(this, num2);\n };\n BN.prototype.redShl = function redShl(num2) {\n assert9(this.red, \"redShl works only with red numbers\");\n return this.red.shl(this, num2);\n };\n BN.prototype.redMul = function redMul(num2) {\n assert9(this.red, \"redMul works only with red numbers\");\n this.red._verify2(this, num2);\n return this.red.mul(this, num2);\n };\n BN.prototype.redIMul = function redIMul(num2) {\n assert9(this.red, \"redMul works only with red numbers\");\n this.red._verify2(this, num2);\n return this.red.imul(this, num2);\n };\n BN.prototype.redSqr = function redSqr() {\n assert9(this.red, \"redSqr works only with red numbers\");\n this.red._verify1(this);\n return this.red.sqr(this);\n };\n BN.prototype.redISqr = function redISqr() {\n assert9(this.red, \"redISqr works only with red numbers\");\n this.red._verify1(this);\n return this.red.isqr(this);\n };\n BN.prototype.redSqrt = function redSqrt() {\n assert9(this.red, \"redSqrt works only with red numbers\");\n this.red._verify1(this);\n return this.red.sqrt(this);\n };\n BN.prototype.redInvm = function redInvm() {\n assert9(this.red, \"redInvm works only with red numbers\");\n this.red._verify1(this);\n return this.red.invm(this);\n };\n BN.prototype.redNeg = function redNeg() {\n assert9(this.red, \"redNeg works only with red numbers\");\n this.red._verify1(this);\n return this.red.neg(this);\n };\n BN.prototype.redPow = function redPow(num2) {\n assert9(this.red && !num2.red, \"redPow(normalNum)\");\n this.red._verify1(this);\n return this.red.pow(this, num2);\n };\n var primes = {\n k256: null,\n p224: null,\n p192: null,\n p25519: null\n };\n function MPrime(name, p4) {\n this.name = name;\n this.p = new BN(p4, 16);\n this.n = this.p.bitLength();\n this.k = new BN(1).iushln(this.n).isub(this.p);\n this.tmp = this._tmp();\n }\n MPrime.prototype._tmp = function _tmp() {\n var tmp = new BN(null);\n tmp.words = new Array(Math.ceil(this.n / 13));\n return tmp;\n };\n MPrime.prototype.ireduce = function ireduce(num2) {\n var r2 = num2;\n var rlen;\n do {\n this.split(r2, this.tmp);\n r2 = this.imulK(r2);\n r2 = r2.iadd(this.tmp);\n rlen = r2.bitLength();\n } while (rlen > this.n);\n var cmp = rlen < this.n ? -1 : r2.ucmp(this.p);\n if (cmp === 0) {\n r2.words[0] = 0;\n r2.length = 1;\n } else if (cmp > 0) {\n r2.isub(this.p);\n } else {\n if (r2.strip !== void 0) {\n r2.strip();\n } else {\n r2._strip();\n }\n }\n return r2;\n };\n MPrime.prototype.split = function split4(input, out) {\n input.iushrn(this.n, 0, out);\n };\n MPrime.prototype.imulK = function imulK(num2) {\n return num2.imul(this.k);\n };\n function K256() {\n MPrime.call(\n this,\n \"k256\",\n \"ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe fffffc2f\"\n );\n }\n inherits(K256, MPrime);\n K256.prototype.split = function split4(input, output) {\n var mask = 4194303;\n var outLen = Math.min(input.length, 9);\n for (var i3 = 0; i3 < outLen; i3++) {\n output.words[i3] = input.words[i3];\n }\n output.length = outLen;\n if (input.length <= 9) {\n input.words[0] = 0;\n input.length = 1;\n return;\n }\n var prev = input.words[9];\n output.words[output.length++] = prev & mask;\n for (i3 = 10; i3 < input.length; i3++) {\n var next = input.words[i3] | 0;\n input.words[i3 - 10] = (next & mask) << 4 | prev >>> 22;\n prev = next;\n }\n prev >>>= 22;\n input.words[i3 - 10] = prev;\n if (prev === 0 && input.length > 10) {\n input.length -= 10;\n } else {\n input.length -= 9;\n }\n };\n K256.prototype.imulK = function imulK(num2) {\n num2.words[num2.length] = 0;\n num2.words[num2.length + 1] = 0;\n num2.length += 2;\n var lo = 0;\n for (var i3 = 0; i3 < num2.length; i3++) {\n var w3 = num2.words[i3] | 0;\n lo += w3 * 977;\n num2.words[i3] = lo & 67108863;\n lo = w3 * 64 + (lo / 67108864 | 0);\n }\n if (num2.words[num2.length - 1] === 0) {\n num2.length--;\n if (num2.words[num2.length - 1] === 0) {\n num2.length--;\n }\n }\n return num2;\n };\n function P224() {\n MPrime.call(\n this,\n \"p224\",\n \"ffffffff ffffffff ffffffff ffffffff 00000000 00000000 00000001\"\n );\n }\n inherits(P224, MPrime);\n function P192() {\n MPrime.call(\n this,\n \"p192\",\n \"ffffffff ffffffff ffffffff fffffffe ffffffff ffffffff\"\n );\n }\n inherits(P192, MPrime);\n function P25519() {\n MPrime.call(\n this,\n \"25519\",\n \"7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed\"\n );\n }\n inherits(P25519, MPrime);\n P25519.prototype.imulK = function imulK(num2) {\n var carry = 0;\n for (var i3 = 0; i3 < num2.length; i3++) {\n var hi = (num2.words[i3] | 0) * 19 + carry;\n var lo = hi & 67108863;\n hi >>>= 26;\n num2.words[i3] = lo;\n carry = hi;\n }\n if (carry !== 0) {\n num2.words[num2.length++] = carry;\n }\n return num2;\n };\n BN._prime = function prime(name) {\n if (primes[name])\n return primes[name];\n var prime2;\n if (name === \"k256\") {\n prime2 = new K256();\n } else if (name === \"p224\") {\n prime2 = new P224();\n } else if (name === \"p192\") {\n prime2 = new P192();\n } else if (name === \"p25519\") {\n prime2 = new P25519();\n } else {\n throw new Error(\"Unknown prime \" + name);\n }\n primes[name] = prime2;\n return prime2;\n };\n function Red(m2) {\n if (typeof m2 === \"string\") {\n var prime = BN._prime(m2);\n this.m = prime.p;\n this.prime = prime;\n } else {\n assert9(m2.gtn(1), \"modulus must be greater than 1\");\n this.m = m2;\n this.prime = null;\n }\n }\n Red.prototype._verify1 = function _verify1(a3) {\n assert9(a3.negative === 0, \"red works only with positives\");\n assert9(a3.red, \"red works only with red numbers\");\n };\n Red.prototype._verify2 = function _verify2(a3, b4) {\n assert9((a3.negative | b4.negative) === 0, \"red works only with positives\");\n assert9(\n a3.red && a3.red === b4.red,\n \"red works only with red numbers\"\n );\n };\n Red.prototype.imod = function imod(a3) {\n if (this.prime)\n return this.prime.ireduce(a3)._forceRed(this);\n move(a3, a3.umod(this.m)._forceRed(this));\n return a3;\n };\n Red.prototype.neg = function neg(a3) {\n if (a3.isZero()) {\n return a3.clone();\n }\n return this.m.sub(a3)._forceRed(this);\n };\n Red.prototype.add = function add2(a3, b4) {\n this._verify2(a3, b4);\n var res = a3.add(b4);\n if (res.cmp(this.m) >= 0) {\n res.isub(this.m);\n }\n return res._forceRed(this);\n };\n Red.prototype.iadd = function iadd(a3, b4) {\n this._verify2(a3, b4);\n var res = a3.iadd(b4);\n if (res.cmp(this.m) >= 0) {\n res.isub(this.m);\n }\n return res;\n };\n Red.prototype.sub = function sub(a3, b4) {\n this._verify2(a3, b4);\n var res = a3.sub(b4);\n if (res.cmpn(0) < 0) {\n res.iadd(this.m);\n }\n return res._forceRed(this);\n };\n Red.prototype.isub = function isub(a3, b4) {\n this._verify2(a3, b4);\n var res = a3.isub(b4);\n if (res.cmpn(0) < 0) {\n res.iadd(this.m);\n }\n return res;\n };\n Red.prototype.shl = function shl(a3, num2) {\n this._verify1(a3);\n return this.imod(a3.ushln(num2));\n };\n Red.prototype.imul = function imul(a3, b4) {\n this._verify2(a3, b4);\n return this.imod(a3.imul(b4));\n };\n Red.prototype.mul = function mul(a3, b4) {\n this._verify2(a3, b4);\n return this.imod(a3.mul(b4));\n };\n Red.prototype.isqr = function isqr(a3) {\n return this.imul(a3, a3.clone());\n };\n Red.prototype.sqr = function sqr(a3) {\n return this.mul(a3, a3);\n };\n Red.prototype.sqrt = function sqrt(a3) {\n if (a3.isZero())\n return a3.clone();\n var mod3 = this.m.andln(3);\n assert9(mod3 % 2 === 1);\n if (mod3 === 3) {\n var pow = this.m.add(new BN(1)).iushrn(2);\n return this.pow(a3, pow);\n }\n var q3 = this.m.subn(1);\n var s4 = 0;\n while (!q3.isZero() && q3.andln(1) === 0) {\n s4++;\n q3.iushrn(1);\n }\n assert9(!q3.isZero());\n var one = new BN(1).toRed(this);\n var nOne = one.redNeg();\n var lpow = this.m.subn(1).iushrn(1);\n var z2 = this.m.bitLength();\n z2 = new BN(2 * z2 * z2).toRed(this);\n while (this.pow(z2, lpow).cmp(nOne) !== 0) {\n z2.redIAdd(nOne);\n }\n var c4 = this.pow(z2, q3);\n var r2 = this.pow(a3, q3.addn(1).iushrn(1));\n var t3 = this.pow(a3, q3);\n var m2 = s4;\n while (t3.cmp(one) !== 0) {\n var tmp = t3;\n for (var i3 = 0; tmp.cmp(one) !== 0; i3++) {\n tmp = tmp.redSqr();\n }\n assert9(i3 < m2);\n var b4 = this.pow(c4, new BN(1).iushln(m2 - i3 - 1));\n r2 = r2.redMul(b4);\n c4 = b4.redSqr();\n t3 = t3.redMul(c4);\n m2 = i3;\n }\n return r2;\n };\n Red.prototype.invm = function invm(a3) {\n var inv = a3._invmp(this.m);\n if (inv.negative !== 0) {\n inv.negative = 0;\n return this.imod(inv).redNeg();\n } else {\n return this.imod(inv);\n }\n };\n Red.prototype.pow = function pow(a3, num2) {\n if (num2.isZero())\n return new BN(1).toRed(this);\n if (num2.cmpn(1) === 0)\n return a3.clone();\n var windowSize = 4;\n var wnd = new Array(1 << windowSize);\n wnd[0] = new BN(1).toRed(this);\n wnd[1] = a3;\n for (var i3 = 2; i3 < wnd.length; i3++) {\n wnd[i3] = this.mul(wnd[i3 - 1], a3);\n }\n var res = wnd[0];\n var current = 0;\n var currentLen = 0;\n var start = num2.bitLength() % 26;\n if (start === 0) {\n start = 26;\n }\n for (i3 = num2.length - 1; i3 >= 0; i3--) {\n var word = num2.words[i3];\n for (var j2 = start - 1; j2 >= 0; j2--) {\n var bit = word >> j2 & 1;\n if (res !== wnd[0]) {\n res = this.sqr(res);\n }\n if (bit === 0 && current === 0) {\n currentLen = 0;\n continue;\n }\n current <<= 1;\n current |= bit;\n currentLen++;\n if (currentLen !== windowSize && (i3 !== 0 || j2 !== 0))\n continue;\n res = this.mul(res, wnd[current]);\n currentLen = 0;\n current = 0;\n }\n start = 26;\n }\n return res;\n };\n Red.prototype.convertTo = function convertTo(num2) {\n var r2 = num2.umod(this.m);\n return r2 === num2 ? r2.clone() : r2;\n };\n Red.prototype.convertFrom = function convertFrom(num2) {\n var res = num2.clone();\n res.red = null;\n return res;\n };\n BN.mont = function mont(num2) {\n return new Mont(num2);\n };\n function Mont(m2) {\n Red.call(this, m2);\n this.shift = this.m.bitLength();\n if (this.shift % 26 !== 0) {\n this.shift += 26 - this.shift % 26;\n }\n this.r = new BN(1).iushln(this.shift);\n this.r2 = this.imod(this.r.sqr());\n this.rinv = this.r._invmp(this.m);\n this.minv = this.rinv.mul(this.r).isubn(1).div(this.m);\n this.minv = this.minv.umod(this.r);\n this.minv = this.r.sub(this.minv);\n }\n inherits(Mont, Red);\n Mont.prototype.convertTo = function convertTo(num2) {\n return this.imod(num2.ushln(this.shift));\n };\n Mont.prototype.convertFrom = function convertFrom(num2) {\n var r2 = this.imod(num2.mul(this.rinv));\n r2.red = null;\n return r2;\n };\n Mont.prototype.imul = function imul(a3, b4) {\n if (a3.isZero() || b4.isZero()) {\n a3.words[0] = 0;\n a3.length = 1;\n return a3;\n }\n var t3 = a3.imul(b4);\n var c4 = t3.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m);\n var u2 = t3.isub(c4).iushrn(this.shift);\n var res = u2;\n if (u2.cmp(this.m) >= 0) {\n res = u2.isub(this.m);\n } else if (u2.cmpn(0) < 0) {\n res = u2.iadd(this.m);\n }\n return res._forceRed(this);\n };\n Mont.prototype.mul = function mul(a3, b4) {\n if (a3.isZero() || b4.isZero())\n return new BN(0)._forceRed(this);\n var t3 = a3.mul(b4);\n var c4 = t3.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m);\n var u2 = t3.isub(c4).iushrn(this.shift);\n var res = u2;\n if (u2.cmp(this.m) >= 0) {\n res = u2.isub(this.m);\n } else if (u2.cmpn(0) < 0) {\n res = u2.iadd(this.m);\n }\n return res._forceRed(this);\n };\n Mont.prototype.invm = function invm(a3) {\n var res = this.imod(a3._invmp(this.m).mul(this.r2));\n return res._forceRed(this);\n };\n })(typeof module === \"undefined\" || module, exports3);\n }\n });\n\n // ../../../node_modules/.pnpm/@ethersproject+logger@5.8.0/node_modules/@ethersproject/logger/lib/_version.js\n var require_version = __commonJS({\n \"../../../node_modules/.pnpm/@ethersproject+logger@5.8.0/node_modules/@ethersproject/logger/lib/_version.js\"(exports3) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n Object.defineProperty(exports3, \"__esModule\", { value: true });\n exports3.version = void 0;\n exports3.version = \"logger/5.8.0\";\n }\n });\n\n // ../../../node_modules/.pnpm/@ethersproject+logger@5.8.0/node_modules/@ethersproject/logger/lib/index.js\n var require_lib = __commonJS({\n \"../../../node_modules/.pnpm/@ethersproject+logger@5.8.0/node_modules/@ethersproject/logger/lib/index.js\"(exports3) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n Object.defineProperty(exports3, \"__esModule\", { value: true });\n exports3.Logger = exports3.ErrorCode = exports3.LogLevel = void 0;\n var _permanentCensorErrors = false;\n var _censorErrors = false;\n var LogLevels = { debug: 1, \"default\": 2, info: 2, warning: 3, error: 4, off: 5 };\n var _logLevel = LogLevels[\"default\"];\n var _version_1 = require_version();\n var _globalLogger = null;\n function _checkNormalize() {\n try {\n var missing_1 = [];\n [\"NFD\", \"NFC\", \"NFKD\", \"NFKC\"].forEach(function(form) {\n try {\n if (\"test\".normalize(form) !== \"test\") {\n throw new Error(\"bad normalize\");\n }\n ;\n } catch (error) {\n missing_1.push(form);\n }\n });\n if (missing_1.length) {\n throw new Error(\"missing \" + missing_1.join(\", \"));\n }\n if (String.fromCharCode(233).normalize(\"NFD\") !== String.fromCharCode(101, 769)) {\n throw new Error(\"broken implementation\");\n }\n } catch (error) {\n return error.message;\n }\n return null;\n }\n var _normalizeError = _checkNormalize();\n var LogLevel2;\n (function(LogLevel3) {\n LogLevel3[\"DEBUG\"] = \"DEBUG\";\n LogLevel3[\"INFO\"] = \"INFO\";\n LogLevel3[\"WARNING\"] = \"WARNING\";\n LogLevel3[\"ERROR\"] = \"ERROR\";\n LogLevel3[\"OFF\"] = \"OFF\";\n })(LogLevel2 = exports3.LogLevel || (exports3.LogLevel = {}));\n var ErrorCode;\n (function(ErrorCode2) {\n ErrorCode2[\"UNKNOWN_ERROR\"] = \"UNKNOWN_ERROR\";\n ErrorCode2[\"NOT_IMPLEMENTED\"] = \"NOT_IMPLEMENTED\";\n ErrorCode2[\"UNSUPPORTED_OPERATION\"] = \"UNSUPPORTED_OPERATION\";\n ErrorCode2[\"NETWORK_ERROR\"] = \"NETWORK_ERROR\";\n ErrorCode2[\"SERVER_ERROR\"] = \"SERVER_ERROR\";\n ErrorCode2[\"TIMEOUT\"] = \"TIMEOUT\";\n ErrorCode2[\"BUFFER_OVERRUN\"] = \"BUFFER_OVERRUN\";\n ErrorCode2[\"NUMERIC_FAULT\"] = \"NUMERIC_FAULT\";\n ErrorCode2[\"MISSING_NEW\"] = \"MISSING_NEW\";\n ErrorCode2[\"INVALID_ARGUMENT\"] = \"INVALID_ARGUMENT\";\n ErrorCode2[\"MISSING_ARGUMENT\"] = \"MISSING_ARGUMENT\";\n ErrorCode2[\"UNEXPECTED_ARGUMENT\"] = \"UNEXPECTED_ARGUMENT\";\n ErrorCode2[\"CALL_EXCEPTION\"] = \"CALL_EXCEPTION\";\n ErrorCode2[\"INSUFFICIENT_FUNDS\"] = \"INSUFFICIENT_FUNDS\";\n ErrorCode2[\"NONCE_EXPIRED\"] = \"NONCE_EXPIRED\";\n ErrorCode2[\"REPLACEMENT_UNDERPRICED\"] = \"REPLACEMENT_UNDERPRICED\";\n ErrorCode2[\"UNPREDICTABLE_GAS_LIMIT\"] = \"UNPREDICTABLE_GAS_LIMIT\";\n ErrorCode2[\"TRANSACTION_REPLACED\"] = \"TRANSACTION_REPLACED\";\n ErrorCode2[\"ACTION_REJECTED\"] = \"ACTION_REJECTED\";\n })(ErrorCode = exports3.ErrorCode || (exports3.ErrorCode = {}));\n var HEX = \"0123456789abcdef\";\n var Logger2 = (\n /** @class */\n function() {\n function Logger3(version6) {\n Object.defineProperty(this, \"version\", {\n enumerable: true,\n value: version6,\n writable: false\n });\n }\n Logger3.prototype._log = function(logLevel, args) {\n var level = logLevel.toLowerCase();\n if (LogLevels[level] == null) {\n this.throwArgumentError(\"invalid log level name\", \"logLevel\", logLevel);\n }\n if (_logLevel > LogLevels[level]) {\n return;\n }\n console.log.apply(console, args);\n };\n Logger3.prototype.debug = function() {\n var args = [];\n for (var _i = 0; _i < arguments.length; _i++) {\n args[_i] = arguments[_i];\n }\n this._log(Logger3.levels.DEBUG, args);\n };\n Logger3.prototype.info = function() {\n var args = [];\n for (var _i = 0; _i < arguments.length; _i++) {\n args[_i] = arguments[_i];\n }\n this._log(Logger3.levels.INFO, args);\n };\n Logger3.prototype.warn = function() {\n var args = [];\n for (var _i = 0; _i < arguments.length; _i++) {\n args[_i] = arguments[_i];\n }\n this._log(Logger3.levels.WARNING, args);\n };\n Logger3.prototype.makeError = function(message, code, params) {\n if (_censorErrors) {\n return this.makeError(\"censored error\", code, {});\n }\n if (!code) {\n code = Logger3.errors.UNKNOWN_ERROR;\n }\n if (!params) {\n params = {};\n }\n var messageDetails = [];\n Object.keys(params).forEach(function(key) {\n var value = params[key];\n try {\n if (value instanceof Uint8Array) {\n var hex = \"\";\n for (var i3 = 0; i3 < value.length; i3++) {\n hex += HEX[value[i3] >> 4];\n hex += HEX[value[i3] & 15];\n }\n messageDetails.push(key + \"=Uint8Array(0x\" + hex + \")\");\n } else {\n messageDetails.push(key + \"=\" + JSON.stringify(value));\n }\n } catch (error2) {\n messageDetails.push(key + \"=\" + JSON.stringify(params[key].toString()));\n }\n });\n messageDetails.push(\"code=\" + code);\n messageDetails.push(\"version=\" + this.version);\n var reason = message;\n var url = \"\";\n switch (code) {\n case ErrorCode.NUMERIC_FAULT: {\n url = \"NUMERIC_FAULT\";\n var fault = message;\n switch (fault) {\n case \"overflow\":\n case \"underflow\":\n case \"division-by-zero\":\n url += \"-\" + fault;\n break;\n case \"negative-power\":\n case \"negative-width\":\n url += \"-unsupported\";\n break;\n case \"unbound-bitwise-result\":\n url += \"-unbound-result\";\n break;\n }\n break;\n }\n case ErrorCode.CALL_EXCEPTION:\n case ErrorCode.INSUFFICIENT_FUNDS:\n case ErrorCode.MISSING_NEW:\n case ErrorCode.NONCE_EXPIRED:\n case ErrorCode.REPLACEMENT_UNDERPRICED:\n case ErrorCode.TRANSACTION_REPLACED:\n case ErrorCode.UNPREDICTABLE_GAS_LIMIT:\n url = code;\n break;\n }\n if (url) {\n message += \" [ See: https://links.ethers.org/v5-errors-\" + url + \" ]\";\n }\n if (messageDetails.length) {\n message += \" (\" + messageDetails.join(\", \") + \")\";\n }\n var error = new Error(message);\n error.reason = reason;\n error.code = code;\n Object.keys(params).forEach(function(key) {\n error[key] = params[key];\n });\n return error;\n };\n Logger3.prototype.throwError = function(message, code, params) {\n throw this.makeError(message, code, params);\n };\n Logger3.prototype.throwArgumentError = function(message, name, value) {\n return this.throwError(message, Logger3.errors.INVALID_ARGUMENT, {\n argument: name,\n value\n });\n };\n Logger3.prototype.assert = function(condition, message, code, params) {\n if (!!condition) {\n return;\n }\n this.throwError(message, code, params);\n };\n Logger3.prototype.assertArgument = function(condition, message, name, value) {\n if (!!condition) {\n return;\n }\n this.throwArgumentError(message, name, value);\n };\n Logger3.prototype.checkNormalize = function(message) {\n if (message == null) {\n message = \"platform missing String.prototype.normalize\";\n }\n if (_normalizeError) {\n this.throwError(\"platform missing String.prototype.normalize\", Logger3.errors.UNSUPPORTED_OPERATION, {\n operation: \"String.prototype.normalize\",\n form: _normalizeError\n });\n }\n };\n Logger3.prototype.checkSafeUint53 = function(value, message) {\n if (typeof value !== \"number\") {\n return;\n }\n if (message == null) {\n message = \"value not safe\";\n }\n if (value < 0 || value >= 9007199254740991) {\n this.throwError(message, Logger3.errors.NUMERIC_FAULT, {\n operation: \"checkSafeInteger\",\n fault: \"out-of-safe-range\",\n value\n });\n }\n if (value % 1) {\n this.throwError(message, Logger3.errors.NUMERIC_FAULT, {\n operation: \"checkSafeInteger\",\n fault: \"non-integer\",\n value\n });\n }\n };\n Logger3.prototype.checkArgumentCount = function(count, expectedCount, message) {\n if (message) {\n message = \": \" + message;\n } else {\n message = \"\";\n }\n if (count < expectedCount) {\n this.throwError(\"missing argument\" + message, Logger3.errors.MISSING_ARGUMENT, {\n count,\n expectedCount\n });\n }\n if (count > expectedCount) {\n this.throwError(\"too many arguments\" + message, Logger3.errors.UNEXPECTED_ARGUMENT, {\n count,\n expectedCount\n });\n }\n };\n Logger3.prototype.checkNew = function(target, kind) {\n if (target === Object || target == null) {\n this.throwError(\"missing new\", Logger3.errors.MISSING_NEW, { name: kind.name });\n }\n };\n Logger3.prototype.checkAbstract = function(target, kind) {\n if (target === kind) {\n this.throwError(\"cannot instantiate abstract class \" + JSON.stringify(kind.name) + \" directly; use a sub-class\", Logger3.errors.UNSUPPORTED_OPERATION, { name: target.name, operation: \"new\" });\n } else if (target === Object || target == null) {\n this.throwError(\"missing new\", Logger3.errors.MISSING_NEW, { name: kind.name });\n }\n };\n Logger3.globalLogger = function() {\n if (!_globalLogger) {\n _globalLogger = new Logger3(_version_1.version);\n }\n return _globalLogger;\n };\n Logger3.setCensorship = function(censorship, permanent) {\n if (!censorship && permanent) {\n this.globalLogger().throwError(\"cannot permanently disable censorship\", Logger3.errors.UNSUPPORTED_OPERATION, {\n operation: \"setCensorship\"\n });\n }\n if (_permanentCensorErrors) {\n if (!censorship) {\n return;\n }\n this.globalLogger().throwError(\"error censorship permanent\", Logger3.errors.UNSUPPORTED_OPERATION, {\n operation: \"setCensorship\"\n });\n }\n _censorErrors = !!censorship;\n _permanentCensorErrors = !!permanent;\n };\n Logger3.setLogLevel = function(logLevel) {\n var level = LogLevels[logLevel.toLowerCase()];\n if (level == null) {\n Logger3.globalLogger().warn(\"invalid log level - \" + logLevel);\n return;\n }\n _logLevel = level;\n };\n Logger3.from = function(version6) {\n return new Logger3(version6);\n };\n Logger3.errors = ErrorCode;\n Logger3.levels = LogLevel2;\n return Logger3;\n }()\n );\n exports3.Logger = Logger2;\n }\n });\n\n // ../../../node_modules/.pnpm/@ethersproject+bytes@5.8.0/node_modules/@ethersproject/bytes/lib/_version.js\n var require_version2 = __commonJS({\n \"../../../node_modules/.pnpm/@ethersproject+bytes@5.8.0/node_modules/@ethersproject/bytes/lib/_version.js\"(exports3) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n Object.defineProperty(exports3, \"__esModule\", { value: true });\n exports3.version = void 0;\n exports3.version = \"bytes/5.8.0\";\n }\n });\n\n // ../../../node_modules/.pnpm/@ethersproject+bytes@5.8.0/node_modules/@ethersproject/bytes/lib/index.js\n var require_lib2 = __commonJS({\n \"../../../node_modules/.pnpm/@ethersproject+bytes@5.8.0/node_modules/@ethersproject/bytes/lib/index.js\"(exports3) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n Object.defineProperty(exports3, \"__esModule\", { value: true });\n exports3.joinSignature = exports3.splitSignature = exports3.hexZeroPad = exports3.hexStripZeros = exports3.hexValue = exports3.hexConcat = exports3.hexDataSlice = exports3.hexDataLength = exports3.hexlify = exports3.isHexString = exports3.zeroPad = exports3.stripZeros = exports3.concat = exports3.arrayify = exports3.isBytes = exports3.isBytesLike = void 0;\n var logger_1 = require_lib();\n var _version_1 = require_version2();\n var logger = new logger_1.Logger(_version_1.version);\n function isHexable(value) {\n return !!value.toHexString;\n }\n function addSlice(array2) {\n if (array2.slice) {\n return array2;\n }\n array2.slice = function() {\n var args = Array.prototype.slice.call(arguments);\n return addSlice(new Uint8Array(Array.prototype.slice.apply(array2, args)));\n };\n return array2;\n }\n function isBytesLike(value) {\n return isHexString(value) && !(value.length % 2) || isBytes6(value);\n }\n exports3.isBytesLike = isBytesLike;\n function isInteger(value) {\n return typeof value === \"number\" && value == value && value % 1 === 0;\n }\n function isBytes6(value) {\n if (value == null) {\n return false;\n }\n if (value.constructor === Uint8Array) {\n return true;\n }\n if (typeof value === \"string\") {\n return false;\n }\n if (!isInteger(value.length) || value.length < 0) {\n return false;\n }\n for (var i3 = 0; i3 < value.length; i3++) {\n var v2 = value[i3];\n if (!isInteger(v2) || v2 < 0 || v2 >= 256) {\n return false;\n }\n }\n return true;\n }\n exports3.isBytes = isBytes6;\n function arrayify(value, options) {\n if (!options) {\n options = {};\n }\n if (typeof value === \"number\") {\n logger.checkSafeUint53(value, \"invalid arrayify value\");\n var result = [];\n while (value) {\n result.unshift(value & 255);\n value = parseInt(String(value / 256));\n }\n if (result.length === 0) {\n result.push(0);\n }\n return addSlice(new Uint8Array(result));\n }\n if (options.allowMissingPrefix && typeof value === \"string\" && value.substring(0, 2) !== \"0x\") {\n value = \"0x\" + value;\n }\n if (isHexable(value)) {\n value = value.toHexString();\n }\n if (isHexString(value)) {\n var hex = value.substring(2);\n if (hex.length % 2) {\n if (options.hexPad === \"left\") {\n hex = \"0\" + hex;\n } else if (options.hexPad === \"right\") {\n hex += \"0\";\n } else {\n logger.throwArgumentError(\"hex data is odd-length\", \"value\", value);\n }\n }\n var result = [];\n for (var i3 = 0; i3 < hex.length; i3 += 2) {\n result.push(parseInt(hex.substring(i3, i3 + 2), 16));\n }\n return addSlice(new Uint8Array(result));\n }\n if (isBytes6(value)) {\n return addSlice(new Uint8Array(value));\n }\n return logger.throwArgumentError(\"invalid arrayify value\", \"value\", value);\n }\n exports3.arrayify = arrayify;\n function concat5(items) {\n var objects = items.map(function(item) {\n return arrayify(item);\n });\n var length2 = objects.reduce(function(accum, item) {\n return accum + item.length;\n }, 0);\n var result = new Uint8Array(length2);\n objects.reduce(function(offset, object2) {\n result.set(object2, offset);\n return offset + object2.length;\n }, 0);\n return addSlice(result);\n }\n exports3.concat = concat5;\n function stripZeros(value) {\n var result = arrayify(value);\n if (result.length === 0) {\n return result;\n }\n var start = 0;\n while (start < result.length && result[start] === 0) {\n start++;\n }\n if (start) {\n result = result.slice(start);\n }\n return result;\n }\n exports3.stripZeros = stripZeros;\n function zeroPad(value, length2) {\n value = arrayify(value);\n if (value.length > length2) {\n logger.throwArgumentError(\"value out of range\", \"value\", arguments[0]);\n }\n var result = new Uint8Array(length2);\n result.set(value, length2 - value.length);\n return addSlice(result);\n }\n exports3.zeroPad = zeroPad;\n function isHexString(value, length2) {\n if (typeof value !== \"string\" || !value.match(/^0x[0-9A-Fa-f]*$/)) {\n return false;\n }\n if (length2 && value.length !== 2 + 2 * length2) {\n return false;\n }\n return true;\n }\n exports3.isHexString = isHexString;\n var HexCharacters = \"0123456789abcdef\";\n function hexlify(value, options) {\n if (!options) {\n options = {};\n }\n if (typeof value === \"number\") {\n logger.checkSafeUint53(value, \"invalid hexlify value\");\n var hex = \"\";\n while (value) {\n hex = HexCharacters[value & 15] + hex;\n value = Math.floor(value / 16);\n }\n if (hex.length) {\n if (hex.length % 2) {\n hex = \"0\" + hex;\n }\n return \"0x\" + hex;\n }\n return \"0x00\";\n }\n if (typeof value === \"bigint\") {\n value = value.toString(16);\n if (value.length % 2) {\n return \"0x0\" + value;\n }\n return \"0x\" + value;\n }\n if (options.allowMissingPrefix && typeof value === \"string\" && value.substring(0, 2) !== \"0x\") {\n value = \"0x\" + value;\n }\n if (isHexable(value)) {\n return value.toHexString();\n }\n if (isHexString(value)) {\n if (value.length % 2) {\n if (options.hexPad === \"left\") {\n value = \"0x0\" + value.substring(2);\n } else if (options.hexPad === \"right\") {\n value += \"0\";\n } else {\n logger.throwArgumentError(\"hex data is odd-length\", \"value\", value);\n }\n }\n return value.toLowerCase();\n }\n if (isBytes6(value)) {\n var result = \"0x\";\n for (var i3 = 0; i3 < value.length; i3++) {\n var v2 = value[i3];\n result += HexCharacters[(v2 & 240) >> 4] + HexCharacters[v2 & 15];\n }\n return result;\n }\n return logger.throwArgumentError(\"invalid hexlify value\", \"value\", value);\n }\n exports3.hexlify = hexlify;\n function hexDataLength(data) {\n if (typeof data !== \"string\") {\n data = hexlify(data);\n } else if (!isHexString(data) || data.length % 2) {\n return null;\n }\n return (data.length - 2) / 2;\n }\n exports3.hexDataLength = hexDataLength;\n function hexDataSlice(data, offset, endOffset) {\n if (typeof data !== \"string\") {\n data = hexlify(data);\n } else if (!isHexString(data) || data.length % 2) {\n logger.throwArgumentError(\"invalid hexData\", \"value\", data);\n }\n offset = 2 + 2 * offset;\n if (endOffset != null) {\n return \"0x\" + data.substring(offset, 2 + 2 * endOffset);\n }\n return \"0x\" + data.substring(offset);\n }\n exports3.hexDataSlice = hexDataSlice;\n function hexConcat(items) {\n var result = \"0x\";\n items.forEach(function(item) {\n result += hexlify(item).substring(2);\n });\n return result;\n }\n exports3.hexConcat = hexConcat;\n function hexValue(value) {\n var trimmed = hexStripZeros(hexlify(value, { hexPad: \"left\" }));\n if (trimmed === \"0x\") {\n return \"0x0\";\n }\n return trimmed;\n }\n exports3.hexValue = hexValue;\n function hexStripZeros(value) {\n if (typeof value !== \"string\") {\n value = hexlify(value);\n }\n if (!isHexString(value)) {\n logger.throwArgumentError(\"invalid hex string\", \"value\", value);\n }\n value = value.substring(2);\n var offset = 0;\n while (offset < value.length && value[offset] === \"0\") {\n offset++;\n }\n return \"0x\" + value.substring(offset);\n }\n exports3.hexStripZeros = hexStripZeros;\n function hexZeroPad(value, length2) {\n if (typeof value !== \"string\") {\n value = hexlify(value);\n } else if (!isHexString(value)) {\n logger.throwArgumentError(\"invalid hex string\", \"value\", value);\n }\n if (value.length > 2 * length2 + 2) {\n logger.throwArgumentError(\"value out of range\", \"value\", arguments[1]);\n }\n while (value.length < 2 * length2 + 2) {\n value = \"0x0\" + value.substring(2);\n }\n return value;\n }\n exports3.hexZeroPad = hexZeroPad;\n function splitSignature2(signature) {\n var result = {\n r: \"0x\",\n s: \"0x\",\n _vs: \"0x\",\n recoveryParam: 0,\n v: 0,\n yParityAndS: \"0x\",\n compact: \"0x\"\n };\n if (isBytesLike(signature)) {\n var bytes = arrayify(signature);\n if (bytes.length === 64) {\n result.v = 27 + (bytes[32] >> 7);\n bytes[32] &= 127;\n result.r = hexlify(bytes.slice(0, 32));\n result.s = hexlify(bytes.slice(32, 64));\n } else if (bytes.length === 65) {\n result.r = hexlify(bytes.slice(0, 32));\n result.s = hexlify(bytes.slice(32, 64));\n result.v = bytes[64];\n } else {\n logger.throwArgumentError(\"invalid signature string\", \"signature\", signature);\n }\n if (result.v < 27) {\n if (result.v === 0 || result.v === 1) {\n result.v += 27;\n } else {\n logger.throwArgumentError(\"signature invalid v byte\", \"signature\", signature);\n }\n }\n result.recoveryParam = 1 - result.v % 2;\n if (result.recoveryParam) {\n bytes[32] |= 128;\n }\n result._vs = hexlify(bytes.slice(32, 64));\n } else {\n result.r = signature.r;\n result.s = signature.s;\n result.v = signature.v;\n result.recoveryParam = signature.recoveryParam;\n result._vs = signature._vs;\n if (result._vs != null) {\n var vs_1 = zeroPad(arrayify(result._vs), 32);\n result._vs = hexlify(vs_1);\n var recoveryParam = vs_1[0] >= 128 ? 1 : 0;\n if (result.recoveryParam == null) {\n result.recoveryParam = recoveryParam;\n } else if (result.recoveryParam !== recoveryParam) {\n logger.throwArgumentError(\"signature recoveryParam mismatch _vs\", \"signature\", signature);\n }\n vs_1[0] &= 127;\n var s4 = hexlify(vs_1);\n if (result.s == null) {\n result.s = s4;\n } else if (result.s !== s4) {\n logger.throwArgumentError(\"signature v mismatch _vs\", \"signature\", signature);\n }\n }\n if (result.recoveryParam == null) {\n if (result.v == null) {\n logger.throwArgumentError(\"signature missing v and recoveryParam\", \"signature\", signature);\n } else if (result.v === 0 || result.v === 1) {\n result.recoveryParam = result.v;\n } else {\n result.recoveryParam = 1 - result.v % 2;\n }\n } else {\n if (result.v == null) {\n result.v = 27 + result.recoveryParam;\n } else {\n var recId = result.v === 0 || result.v === 1 ? result.v : 1 - result.v % 2;\n if (result.recoveryParam !== recId) {\n logger.throwArgumentError(\"signature recoveryParam mismatch v\", \"signature\", signature);\n }\n }\n }\n if (result.r == null || !isHexString(result.r)) {\n logger.throwArgumentError(\"signature missing or invalid r\", \"signature\", signature);\n } else {\n result.r = hexZeroPad(result.r, 32);\n }\n if (result.s == null || !isHexString(result.s)) {\n logger.throwArgumentError(\"signature missing or invalid s\", \"signature\", signature);\n } else {\n result.s = hexZeroPad(result.s, 32);\n }\n var vs = arrayify(result.s);\n if (vs[0] >= 128) {\n logger.throwArgumentError(\"signature s out of range\", \"signature\", signature);\n }\n if (result.recoveryParam) {\n vs[0] |= 128;\n }\n var _vs = hexlify(vs);\n if (result._vs) {\n if (!isHexString(result._vs)) {\n logger.throwArgumentError(\"signature invalid _vs\", \"signature\", signature);\n }\n result._vs = hexZeroPad(result._vs, 32);\n }\n if (result._vs == null) {\n result._vs = _vs;\n } else if (result._vs !== _vs) {\n logger.throwArgumentError(\"signature _vs mismatch v and s\", \"signature\", signature);\n }\n }\n result.yParityAndS = result._vs;\n result.compact = result.r + result.yParityAndS.substring(2);\n return result;\n }\n exports3.splitSignature = splitSignature2;\n function joinSignature(signature) {\n signature = splitSignature2(signature);\n return hexlify(concat5([\n signature.r,\n signature.s,\n signature.recoveryParam ? \"0x1c\" : \"0x1b\"\n ]));\n }\n exports3.joinSignature = joinSignature;\n }\n });\n\n // ../../../node_modules/.pnpm/@ethersproject+bignumber@5.8.0/node_modules/@ethersproject/bignumber/lib/_version.js\n var require_version3 = __commonJS({\n \"../../../node_modules/.pnpm/@ethersproject+bignumber@5.8.0/node_modules/@ethersproject/bignumber/lib/_version.js\"(exports3) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n Object.defineProperty(exports3, \"__esModule\", { value: true });\n exports3.version = void 0;\n exports3.version = \"bignumber/5.8.0\";\n }\n });\n\n // ../../../node_modules/.pnpm/@ethersproject+bignumber@5.8.0/node_modules/@ethersproject/bignumber/lib/bignumber.js\n var require_bignumber = __commonJS({\n \"../../../node_modules/.pnpm/@ethersproject+bignumber@5.8.0/node_modules/@ethersproject/bignumber/lib/bignumber.js\"(exports3) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n var __importDefault3 = exports3 && exports3.__importDefault || function(mod3) {\n return mod3 && mod3.__esModule ? mod3 : { \"default\": mod3 };\n };\n Object.defineProperty(exports3, \"__esModule\", { value: true });\n exports3._base16To36 = exports3._base36To16 = exports3.BigNumber = exports3.isBigNumberish = void 0;\n var bn_js_1 = __importDefault3(require_bn());\n var BN = bn_js_1.default.BN;\n var bytes_1 = require_lib2();\n var logger_1 = require_lib();\n var _version_1 = require_version3();\n var logger = new logger_1.Logger(_version_1.version);\n var _constructorGuard = {};\n var MAX_SAFE = 9007199254740991;\n function isBigNumberish2(value) {\n return value != null && (BigNumber.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));\n }\n exports3.isBigNumberish = isBigNumberish2;\n var _warnedToStringRadix = false;\n var BigNumber = (\n /** @class */\n function() {\n function BigNumber2(constructorGuard, hex) {\n if (constructorGuard !== _constructorGuard) {\n logger.throwError(\"cannot call constructor directly; use BigNumber.from\", logger_1.Logger.errors.UNSUPPORTED_OPERATION, {\n operation: \"new (BigNumber)\"\n });\n }\n this._hex = hex;\n this._isBigNumber = true;\n Object.freeze(this);\n }\n BigNumber2.prototype.fromTwos = function(value) {\n return toBigNumber(toBN(this).fromTwos(value));\n };\n BigNumber2.prototype.toTwos = function(value) {\n return toBigNumber(toBN(this).toTwos(value));\n };\n BigNumber2.prototype.abs = function() {\n if (this._hex[0] === \"-\") {\n return BigNumber2.from(this._hex.substring(1));\n }\n return this;\n };\n BigNumber2.prototype.add = function(other) {\n return toBigNumber(toBN(this).add(toBN(other)));\n };\n BigNumber2.prototype.sub = function(other) {\n return toBigNumber(toBN(this).sub(toBN(other)));\n };\n BigNumber2.prototype.div = function(other) {\n var o5 = BigNumber2.from(other);\n if (o5.isZero()) {\n throwFault(\"division-by-zero\", \"div\");\n }\n return toBigNumber(toBN(this).div(toBN(other)));\n };\n BigNumber2.prototype.mul = function(other) {\n return toBigNumber(toBN(this).mul(toBN(other)));\n };\n BigNumber2.prototype.mod = function(other) {\n var value = toBN(other);\n if (value.isNeg()) {\n throwFault(\"division-by-zero\", \"mod\");\n }\n return toBigNumber(toBN(this).umod(value));\n };\n BigNumber2.prototype.pow = function(other) {\n var value = toBN(other);\n if (value.isNeg()) {\n throwFault(\"negative-power\", \"pow\");\n }\n return toBigNumber(toBN(this).pow(value));\n };\n BigNumber2.prototype.and = function(other) {\n var value = toBN(other);\n if (this.isNegative() || value.isNeg()) {\n throwFault(\"unbound-bitwise-result\", \"and\");\n }\n return toBigNumber(toBN(this).and(value));\n };\n BigNumber2.prototype.or = function(other) {\n var value = toBN(other);\n if (this.isNegative() || value.isNeg()) {\n throwFault(\"unbound-bitwise-result\", \"or\");\n }\n return toBigNumber(toBN(this).or(value));\n };\n BigNumber2.prototype.xor = function(other) {\n var value = toBN(other);\n if (this.isNegative() || value.isNeg()) {\n throwFault(\"unbound-bitwise-result\", \"xor\");\n }\n return toBigNumber(toBN(this).xor(value));\n };\n BigNumber2.prototype.mask = function(value) {\n if (this.isNegative() || value < 0) {\n throwFault(\"negative-width\", \"mask\");\n }\n return toBigNumber(toBN(this).maskn(value));\n };\n BigNumber2.prototype.shl = function(value) {\n if (this.isNegative() || value < 0) {\n throwFault(\"negative-width\", \"shl\");\n }\n return toBigNumber(toBN(this).shln(value));\n };\n BigNumber2.prototype.shr = function(value) {\n if (this.isNegative() || value < 0) {\n throwFault(\"negative-width\", \"shr\");\n }\n return toBigNumber(toBN(this).shrn(value));\n };\n BigNumber2.prototype.eq = function(other) {\n return toBN(this).eq(toBN(other));\n };\n BigNumber2.prototype.lt = function(other) {\n return toBN(this).lt(toBN(other));\n };\n BigNumber2.prototype.lte = function(other) {\n return toBN(this).lte(toBN(other));\n };\n BigNumber2.prototype.gt = function(other) {\n return toBN(this).gt(toBN(other));\n };\n BigNumber2.prototype.gte = function(other) {\n return toBN(this).gte(toBN(other));\n };\n BigNumber2.prototype.isNegative = function() {\n return this._hex[0] === \"-\";\n };\n BigNumber2.prototype.isZero = function() {\n return toBN(this).isZero();\n };\n BigNumber2.prototype.toNumber = function() {\n try {\n return toBN(this).toNumber();\n } catch (error) {\n throwFault(\"overflow\", \"toNumber\", this.toString());\n }\n return null;\n };\n BigNumber2.prototype.toBigInt = function() {\n try {\n return BigInt(this.toString());\n } catch (e3) {\n }\n return logger.throwError(\"this platform does not support BigInt\", logger_1.Logger.errors.UNSUPPORTED_OPERATION, {\n value: this.toString()\n });\n };\n BigNumber2.prototype.toString = function() {\n if (arguments.length > 0) {\n if (arguments[0] === 10) {\n if (!_warnedToStringRadix) {\n _warnedToStringRadix = true;\n logger.warn(\"BigNumber.toString does not accept any parameters; base-10 is assumed\");\n }\n } else if (arguments[0] === 16) {\n logger.throwError(\"BigNumber.toString does not accept any parameters; use bigNumber.toHexString()\", logger_1.Logger.errors.UNEXPECTED_ARGUMENT, {});\n } else {\n logger.throwError(\"BigNumber.toString does not accept parameters\", logger_1.Logger.errors.UNEXPECTED_ARGUMENT, {});\n }\n }\n return toBN(this).toString(10);\n };\n BigNumber2.prototype.toHexString = function() {\n return this._hex;\n };\n BigNumber2.prototype.toJSON = function(key) {\n return { type: \"BigNumber\", hex: this.toHexString() };\n };\n BigNumber2.from = function(value) {\n if (value instanceof BigNumber2) {\n return value;\n }\n if (typeof value === \"string\") {\n if (value.match(/^-?0x[0-9a-f]+$/i)) {\n return new BigNumber2(_constructorGuard, toHex3(value));\n }\n if (value.match(/^-?[0-9]+$/)) {\n return new BigNumber2(_constructorGuard, toHex3(new BN(value)));\n }\n return logger.throwArgumentError(\"invalid BigNumber string\", \"value\", value);\n }\n if (typeof value === \"number\") {\n if (value % 1) {\n throwFault(\"underflow\", \"BigNumber.from\", value);\n }\n if (value >= MAX_SAFE || value <= -MAX_SAFE) {\n throwFault(\"overflow\", \"BigNumber.from\", value);\n }\n return BigNumber2.from(String(value));\n }\n var anyValue = value;\n if (typeof anyValue === \"bigint\") {\n return BigNumber2.from(anyValue.toString());\n }\n if ((0, bytes_1.isBytes)(anyValue)) {\n return BigNumber2.from((0, bytes_1.hexlify)(anyValue));\n }\n if (anyValue) {\n if (anyValue.toHexString) {\n var hex = anyValue.toHexString();\n if (typeof hex === \"string\") {\n return BigNumber2.from(hex);\n }\n } else {\n var hex = anyValue._hex;\n if (hex == null && anyValue.type === \"BigNumber\") {\n hex = anyValue.hex;\n }\n if (typeof hex === \"string\") {\n if ((0, bytes_1.isHexString)(hex) || hex[0] === \"-\" && (0, bytes_1.isHexString)(hex.substring(1))) {\n return BigNumber2.from(hex);\n }\n }\n }\n }\n return logger.throwArgumentError(\"invalid BigNumber value\", \"value\", value);\n };\n BigNumber2.isBigNumber = function(value) {\n return !!(value && value._isBigNumber);\n };\n return BigNumber2;\n }()\n );\n exports3.BigNumber = BigNumber;\n function toHex3(value) {\n if (typeof value !== \"string\") {\n return toHex3(value.toString(16));\n }\n if (value[0] === \"-\") {\n value = value.substring(1);\n if (value[0] === \"-\") {\n logger.throwArgumentError(\"invalid hex\", \"value\", value);\n }\n value = toHex3(value);\n if (value === \"0x00\") {\n return value;\n }\n return \"-\" + value;\n }\n if (value.substring(0, 2) !== \"0x\") {\n value = \"0x\" + value;\n }\n if (value === \"0x\") {\n return \"0x00\";\n }\n if (value.length % 2) {\n value = \"0x0\" + value.substring(2);\n }\n while (value.length > 4 && value.substring(0, 4) === \"0x00\") {\n value = \"0x\" + value.substring(4);\n }\n return value;\n }\n function toBigNumber(value) {\n return BigNumber.from(toHex3(value));\n }\n function toBN(value) {\n var hex = BigNumber.from(value).toHexString();\n if (hex[0] === \"-\") {\n return new BN(\"-\" + hex.substring(3), 16);\n }\n return new BN(hex.substring(2), 16);\n }\n function throwFault(fault, operation, value) {\n var params = { fault, operation };\n if (value != null) {\n params.value = value;\n }\n return logger.throwError(fault, logger_1.Logger.errors.NUMERIC_FAULT, params);\n }\n function _base36To16(value) {\n return new BN(value, 36).toString(16);\n }\n exports3._base36To16 = _base36To16;\n function _base16To36(value) {\n return new BN(value, 16).toString(36);\n }\n exports3._base16To36 = _base16To36;\n }\n });\n\n // ../../../node_modules/.pnpm/@ethersproject+bignumber@5.8.0/node_modules/@ethersproject/bignumber/lib/fixednumber.js\n var require_fixednumber = __commonJS({\n \"../../../node_modules/.pnpm/@ethersproject+bignumber@5.8.0/node_modules/@ethersproject/bignumber/lib/fixednumber.js\"(exports3) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n Object.defineProperty(exports3, \"__esModule\", { value: true });\n exports3.FixedNumber = exports3.FixedFormat = exports3.parseFixed = exports3.formatFixed = void 0;\n var bytes_1 = require_lib2();\n var logger_1 = require_lib();\n var _version_1 = require_version3();\n var logger = new logger_1.Logger(_version_1.version);\n var bignumber_1 = require_bignumber();\n var _constructorGuard = {};\n var Zero = bignumber_1.BigNumber.from(0);\n var NegativeOne = bignumber_1.BigNumber.from(-1);\n function throwFault(message, fault, operation, value) {\n var params = { fault, operation };\n if (value !== void 0) {\n params.value = value;\n }\n return logger.throwError(message, logger_1.Logger.errors.NUMERIC_FAULT, params);\n }\n var zeros = \"0\";\n while (zeros.length < 256) {\n zeros += zeros;\n }\n function getMultiplier(decimals) {\n if (typeof decimals !== \"number\") {\n try {\n decimals = bignumber_1.BigNumber.from(decimals).toNumber();\n } catch (e3) {\n }\n }\n if (typeof decimals === \"number\" && decimals >= 0 && decimals <= 256 && !(decimals % 1)) {\n return \"1\" + zeros.substring(0, decimals);\n }\n return logger.throwArgumentError(\"invalid decimal size\", \"decimals\", decimals);\n }\n function formatFixed(value, decimals) {\n if (decimals == null) {\n decimals = 0;\n }\n var multiplier = getMultiplier(decimals);\n value = bignumber_1.BigNumber.from(value);\n var negative = value.lt(Zero);\n if (negative) {\n value = value.mul(NegativeOne);\n }\n var fraction = value.mod(multiplier).toString();\n while (fraction.length < multiplier.length - 1) {\n fraction = \"0\" + fraction;\n }\n fraction = fraction.match(/^([0-9]*[1-9]|0)(0*)/)[1];\n var whole = value.div(multiplier).toString();\n if (multiplier.length === 1) {\n value = whole;\n } else {\n value = whole + \".\" + fraction;\n }\n if (negative) {\n value = \"-\" + value;\n }\n return value;\n }\n exports3.formatFixed = formatFixed;\n function parseFixed(value, decimals) {\n if (decimals == null) {\n decimals = 0;\n }\n var multiplier = getMultiplier(decimals);\n if (typeof value !== \"string\" || !value.match(/^-?[0-9.]+$/)) {\n logger.throwArgumentError(\"invalid decimal value\", \"value\", value);\n }\n var negative = value.substring(0, 1) === \"-\";\n if (negative) {\n value = value.substring(1);\n }\n if (value === \".\") {\n logger.throwArgumentError(\"missing value\", \"value\", value);\n }\n var comps = value.split(\".\");\n if (comps.length > 2) {\n logger.throwArgumentError(\"too many decimal points\", \"value\", value);\n }\n var whole = comps[0], fraction = comps[1];\n if (!whole) {\n whole = \"0\";\n }\n if (!fraction) {\n fraction = \"0\";\n }\n while (fraction[fraction.length - 1] === \"0\") {\n fraction = fraction.substring(0, fraction.length - 1);\n }\n if (fraction.length > multiplier.length - 1) {\n throwFault(\"fractional component exceeds decimals\", \"underflow\", \"parseFixed\");\n }\n if (fraction === \"\") {\n fraction = \"0\";\n }\n while (fraction.length < multiplier.length - 1) {\n fraction += \"0\";\n }\n var wholeValue = bignumber_1.BigNumber.from(whole);\n var fractionValue = bignumber_1.BigNumber.from(fraction);\n var wei = wholeValue.mul(multiplier).add(fractionValue);\n if (negative) {\n wei = wei.mul(NegativeOne);\n }\n return wei;\n }\n exports3.parseFixed = parseFixed;\n var FixedFormat = (\n /** @class */\n function() {\n function FixedFormat2(constructorGuard, signed, width, decimals) {\n if (constructorGuard !== _constructorGuard) {\n logger.throwError(\"cannot use FixedFormat constructor; use FixedFormat.from\", logger_1.Logger.errors.UNSUPPORTED_OPERATION, {\n operation: \"new FixedFormat\"\n });\n }\n this.signed = signed;\n this.width = width;\n this.decimals = decimals;\n this.name = (signed ? \"\" : \"u\") + \"fixed\" + String(width) + \"x\" + String(decimals);\n this._multiplier = getMultiplier(decimals);\n Object.freeze(this);\n }\n FixedFormat2.from = function(value) {\n if (value instanceof FixedFormat2) {\n return value;\n }\n if (typeof value === \"number\") {\n value = \"fixed128x\" + value;\n }\n var signed = true;\n var width = 128;\n var decimals = 18;\n if (typeof value === \"string\") {\n if (value === \"fixed\") {\n } else if (value === \"ufixed\") {\n signed = false;\n } else {\n var match = value.match(/^(u?)fixed([0-9]+)x([0-9]+)$/);\n if (!match) {\n logger.throwArgumentError(\"invalid fixed format\", \"format\", value);\n }\n signed = match[1] !== \"u\";\n width = parseInt(match[2]);\n decimals = parseInt(match[3]);\n }\n } else if (value) {\n var check = function(key, type, defaultValue) {\n if (value[key] == null) {\n return defaultValue;\n }\n if (typeof value[key] !== type) {\n logger.throwArgumentError(\"invalid fixed format (\" + key + \" not \" + type + \")\", \"format.\" + key, value[key]);\n }\n return value[key];\n };\n signed = check(\"signed\", \"boolean\", signed);\n width = check(\"width\", \"number\", width);\n decimals = check(\"decimals\", \"number\", decimals);\n }\n if (width % 8) {\n logger.throwArgumentError(\"invalid fixed format width (not byte aligned)\", \"format.width\", width);\n }\n if (decimals > 80) {\n logger.throwArgumentError(\"invalid fixed format (decimals too large)\", \"format.decimals\", decimals);\n }\n return new FixedFormat2(_constructorGuard, signed, width, decimals);\n };\n return FixedFormat2;\n }()\n );\n exports3.FixedFormat = FixedFormat;\n var FixedNumber = (\n /** @class */\n function() {\n function FixedNumber2(constructorGuard, hex, value, format) {\n if (constructorGuard !== _constructorGuard) {\n logger.throwError(\"cannot use FixedNumber constructor; use FixedNumber.from\", logger_1.Logger.errors.UNSUPPORTED_OPERATION, {\n operation: \"new FixedFormat\"\n });\n }\n this.format = format;\n this._hex = hex;\n this._value = value;\n this._isFixedNumber = true;\n Object.freeze(this);\n }\n FixedNumber2.prototype._checkFormat = function(other) {\n if (this.format.name !== other.format.name) {\n logger.throwArgumentError(\"incompatible format; use fixedNumber.toFormat\", \"other\", other);\n }\n };\n FixedNumber2.prototype.addUnsafe = function(other) {\n this._checkFormat(other);\n var a3 = parseFixed(this._value, this.format.decimals);\n var b4 = parseFixed(other._value, other.format.decimals);\n return FixedNumber2.fromValue(a3.add(b4), this.format.decimals, this.format);\n };\n FixedNumber2.prototype.subUnsafe = function(other) {\n this._checkFormat(other);\n var a3 = parseFixed(this._value, this.format.decimals);\n var b4 = parseFixed(other._value, other.format.decimals);\n return FixedNumber2.fromValue(a3.sub(b4), this.format.decimals, this.format);\n };\n FixedNumber2.prototype.mulUnsafe = function(other) {\n this._checkFormat(other);\n var a3 = parseFixed(this._value, this.format.decimals);\n var b4 = parseFixed(other._value, other.format.decimals);\n return FixedNumber2.fromValue(a3.mul(b4).div(this.format._multiplier), this.format.decimals, this.format);\n };\n FixedNumber2.prototype.divUnsafe = function(other) {\n this._checkFormat(other);\n var a3 = parseFixed(this._value, this.format.decimals);\n var b4 = parseFixed(other._value, other.format.decimals);\n return FixedNumber2.fromValue(a3.mul(this.format._multiplier).div(b4), this.format.decimals, this.format);\n };\n FixedNumber2.prototype.floor = function() {\n var comps = this.toString().split(\".\");\n if (comps.length === 1) {\n comps.push(\"0\");\n }\n var result = FixedNumber2.from(comps[0], this.format);\n var hasFraction = !comps[1].match(/^(0*)$/);\n if (this.isNegative() && hasFraction) {\n result = result.subUnsafe(ONE.toFormat(result.format));\n }\n return result;\n };\n FixedNumber2.prototype.ceiling = function() {\n var comps = this.toString().split(\".\");\n if (comps.length === 1) {\n comps.push(\"0\");\n }\n var result = FixedNumber2.from(comps[0], this.format);\n var hasFraction = !comps[1].match(/^(0*)$/);\n if (!this.isNegative() && hasFraction) {\n result = result.addUnsafe(ONE.toFormat(result.format));\n }\n return result;\n };\n FixedNumber2.prototype.round = function(decimals) {\n if (decimals == null) {\n decimals = 0;\n }\n var comps = this.toString().split(\".\");\n if (comps.length === 1) {\n comps.push(\"0\");\n }\n if (decimals < 0 || decimals > 80 || decimals % 1) {\n logger.throwArgumentError(\"invalid decimal count\", \"decimals\", decimals);\n }\n if (comps[1].length <= decimals) {\n return this;\n }\n var factor = FixedNumber2.from(\"1\" + zeros.substring(0, decimals), this.format);\n var bump = BUMP.toFormat(this.format);\n return this.mulUnsafe(factor).addUnsafe(bump).floor().divUnsafe(factor);\n };\n FixedNumber2.prototype.isZero = function() {\n return this._value === \"0.0\" || this._value === \"0\";\n };\n FixedNumber2.prototype.isNegative = function() {\n return this._value[0] === \"-\";\n };\n FixedNumber2.prototype.toString = function() {\n return this._value;\n };\n FixedNumber2.prototype.toHexString = function(width) {\n if (width == null) {\n return this._hex;\n }\n if (width % 8) {\n logger.throwArgumentError(\"invalid byte width\", \"width\", width);\n }\n var hex = bignumber_1.BigNumber.from(this._hex).fromTwos(this.format.width).toTwos(width).toHexString();\n return (0, bytes_1.hexZeroPad)(hex, width / 8);\n };\n FixedNumber2.prototype.toUnsafeFloat = function() {\n return parseFloat(this.toString());\n };\n FixedNumber2.prototype.toFormat = function(format) {\n return FixedNumber2.fromString(this._value, format);\n };\n FixedNumber2.fromValue = function(value, decimals, format) {\n if (format == null && decimals != null && !(0, bignumber_1.isBigNumberish)(decimals)) {\n format = decimals;\n decimals = null;\n }\n if (decimals == null) {\n decimals = 0;\n }\n if (format == null) {\n format = \"fixed\";\n }\n return FixedNumber2.fromString(formatFixed(value, decimals), FixedFormat.from(format));\n };\n FixedNumber2.fromString = function(value, format) {\n if (format == null) {\n format = \"fixed\";\n }\n var fixedFormat = FixedFormat.from(format);\n var numeric = parseFixed(value, fixedFormat.decimals);\n if (!fixedFormat.signed && numeric.lt(Zero)) {\n throwFault(\"unsigned value cannot be negative\", \"overflow\", \"value\", value);\n }\n var hex = null;\n if (fixedFormat.signed) {\n hex = numeric.toTwos(fixedFormat.width).toHexString();\n } else {\n hex = numeric.toHexString();\n hex = (0, bytes_1.hexZeroPad)(hex, fixedFormat.width / 8);\n }\n var decimal = formatFixed(numeric, fixedFormat.decimals);\n return new FixedNumber2(_constructorGuard, hex, decimal, fixedFormat);\n };\n FixedNumber2.fromBytes = function(value, format) {\n if (format == null) {\n format = \"fixed\";\n }\n var fixedFormat = FixedFormat.from(format);\n if ((0, bytes_1.arrayify)(value).length > fixedFormat.width / 8) {\n throw new Error(\"overflow\");\n }\n var numeric = bignumber_1.BigNumber.from(value);\n if (fixedFormat.signed) {\n numeric = numeric.fromTwos(fixedFormat.width);\n }\n var hex = numeric.toTwos((fixedFormat.signed ? 0 : 1) + fixedFormat.width).toHexString();\n var decimal = formatFixed(numeric, fixedFormat.decimals);\n return new FixedNumber2(_constructorGuard, hex, decimal, fixedFormat);\n };\n FixedNumber2.from = function(value, format) {\n if (typeof value === \"string\") {\n return FixedNumber2.fromString(value, format);\n }\n if ((0, bytes_1.isBytes)(value)) {\n return FixedNumber2.fromBytes(value, format);\n }\n try {\n return FixedNumber2.fromValue(value, 0, format);\n } catch (error) {\n if (error.code !== logger_1.Logger.errors.INVALID_ARGUMENT) {\n throw error;\n }\n }\n return logger.throwArgumentError(\"invalid FixedNumber value\", \"value\", value);\n };\n FixedNumber2.isFixedNumber = function(value) {\n return !!(value && value._isFixedNumber);\n };\n return FixedNumber2;\n }()\n );\n exports3.FixedNumber = FixedNumber;\n var ONE = FixedNumber.from(1);\n var BUMP = FixedNumber.from(\"0.5\");\n }\n });\n\n // ../../../node_modules/.pnpm/@ethersproject+bignumber@5.8.0/node_modules/@ethersproject/bignumber/lib/index.js\n var require_lib3 = __commonJS({\n \"../../../node_modules/.pnpm/@ethersproject+bignumber@5.8.0/node_modules/@ethersproject/bignumber/lib/index.js\"(exports3) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n Object.defineProperty(exports3, \"__esModule\", { value: true });\n exports3._base36To16 = exports3._base16To36 = exports3.parseFixed = exports3.FixedNumber = exports3.FixedFormat = exports3.formatFixed = exports3.BigNumber = void 0;\n var bignumber_1 = require_bignumber();\n Object.defineProperty(exports3, \"BigNumber\", { enumerable: true, get: function() {\n return bignumber_1.BigNumber;\n } });\n var fixednumber_1 = require_fixednumber();\n Object.defineProperty(exports3, \"formatFixed\", { enumerable: true, get: function() {\n return fixednumber_1.formatFixed;\n } });\n Object.defineProperty(exports3, \"FixedFormat\", { enumerable: true, get: function() {\n return fixednumber_1.FixedFormat;\n } });\n Object.defineProperty(exports3, \"FixedNumber\", { enumerable: true, get: function() {\n return fixednumber_1.FixedNumber;\n } });\n Object.defineProperty(exports3, \"parseFixed\", { enumerable: true, get: function() {\n return fixednumber_1.parseFixed;\n } });\n var bignumber_2 = require_bignumber();\n Object.defineProperty(exports3, \"_base16To36\", { enumerable: true, get: function() {\n return bignumber_2._base16To36;\n } });\n Object.defineProperty(exports3, \"_base36To16\", { enumerable: true, get: function() {\n return bignumber_2._base36To16;\n } });\n }\n });\n\n // ../../../node_modules/.pnpm/@ethersproject+properties@5.8.0/node_modules/@ethersproject/properties/lib/_version.js\n var require_version4 = __commonJS({\n \"../../../node_modules/.pnpm/@ethersproject+properties@5.8.0/node_modules/@ethersproject/properties/lib/_version.js\"(exports3) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n Object.defineProperty(exports3, \"__esModule\", { value: true });\n exports3.version = void 0;\n exports3.version = \"properties/5.8.0\";\n }\n });\n\n // ../../../node_modules/.pnpm/@ethersproject+properties@5.8.0/node_modules/@ethersproject/properties/lib/index.js\n var require_lib4 = __commonJS({\n \"../../../node_modules/.pnpm/@ethersproject+properties@5.8.0/node_modules/@ethersproject/properties/lib/index.js\"(exports3) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n var __awaiter3 = exports3 && exports3.__awaiter || function(thisArg, _arguments, P2, generator) {\n function adopt(value) {\n return value instanceof P2 ? value : new P2(function(resolve) {\n resolve(value);\n });\n }\n return new (P2 || (P2 = Promise))(function(resolve, reject) {\n function fulfilled(value) {\n try {\n step(generator.next(value));\n } catch (e3) {\n reject(e3);\n }\n }\n function rejected(value) {\n try {\n step(generator[\"throw\"](value));\n } catch (e3) {\n reject(e3);\n }\n }\n function step(result) {\n result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected);\n }\n step((generator = generator.apply(thisArg, _arguments || [])).next());\n });\n };\n var __generator3 = exports3 && exports3.__generator || function(thisArg, body) {\n var _2 = { label: 0, sent: function() {\n if (t3[0] & 1)\n throw t3[1];\n return t3[1];\n }, trys: [], ops: [] }, f6, y6, t3, g4;\n return g4 = { next: verb(0), \"throw\": verb(1), \"return\": verb(2) }, typeof Symbol === \"function\" && (g4[Symbol.iterator] = function() {\n return this;\n }), g4;\n function verb(n2) {\n return function(v2) {\n return step([n2, v2]);\n };\n }\n function step(op) {\n if (f6)\n throw new TypeError(\"Generator is already executing.\");\n while (_2)\n try {\n if (f6 = 1, y6 && (t3 = op[0] & 2 ? y6[\"return\"] : op[0] ? y6[\"throw\"] || ((t3 = y6[\"return\"]) && t3.call(y6), 0) : y6.next) && !(t3 = t3.call(y6, op[1])).done)\n return t3;\n if (y6 = 0, t3)\n op = [op[0] & 2, t3.value];\n switch (op[0]) {\n case 0:\n case 1:\n t3 = op;\n break;\n case 4:\n _2.label++;\n return { value: op[1], done: false };\n case 5:\n _2.label++;\n y6 = op[1];\n op = [0];\n continue;\n case 7:\n op = _2.ops.pop();\n _2.trys.pop();\n continue;\n default:\n if (!(t3 = _2.trys, t3 = t3.length > 0 && t3[t3.length - 1]) && (op[0] === 6 || op[0] === 2)) {\n _2 = 0;\n continue;\n }\n if (op[0] === 3 && (!t3 || op[1] > t3[0] && op[1] < t3[3])) {\n _2.label = op[1];\n break;\n }\n if (op[0] === 6 && _2.label < t3[1]) {\n _2.label = t3[1];\n t3 = op;\n break;\n }\n if (t3 && _2.label < t3[2]) {\n _2.label = t3[2];\n _2.ops.push(op);\n break;\n }\n if (t3[2])\n _2.ops.pop();\n _2.trys.pop();\n continue;\n }\n op = body.call(thisArg, _2);\n } catch (e3) {\n op = [6, e3];\n y6 = 0;\n } finally {\n f6 = t3 = 0;\n }\n if (op[0] & 5)\n throw op[1];\n return { value: op[0] ? op[1] : void 0, done: true };\n }\n };\n Object.defineProperty(exports3, \"__esModule\", { value: true });\n exports3.Description = exports3.deepCopy = exports3.shallowCopy = exports3.checkProperties = exports3.resolveProperties = exports3.getStatic = exports3.defineReadOnly = void 0;\n var logger_1 = require_lib();\n var _version_1 = require_version4();\n var logger = new logger_1.Logger(_version_1.version);\n function defineReadOnly(object2, name, value) {\n Object.defineProperty(object2, name, {\n enumerable: true,\n value,\n writable: false\n });\n }\n exports3.defineReadOnly = defineReadOnly;\n function getStatic(ctor, key) {\n for (var i3 = 0; i3 < 32; i3++) {\n if (ctor[key]) {\n return ctor[key];\n }\n if (!ctor.prototype || typeof ctor.prototype !== \"object\") {\n break;\n }\n ctor = Object.getPrototypeOf(ctor.prototype).constructor;\n }\n return null;\n }\n exports3.getStatic = getStatic;\n function resolveProperties2(object2) {\n return __awaiter3(this, void 0, void 0, function() {\n var promises, results;\n return __generator3(this, function(_a) {\n switch (_a.label) {\n case 0:\n promises = Object.keys(object2).map(function(key) {\n var value = object2[key];\n return Promise.resolve(value).then(function(v2) {\n return { key, value: v2 };\n });\n });\n return [4, Promise.all(promises)];\n case 1:\n results = _a.sent();\n return [2, results.reduce(function(accum, result) {\n accum[result.key] = result.value;\n return accum;\n }, {})];\n }\n });\n });\n }\n exports3.resolveProperties = resolveProperties2;\n function checkProperties(object2, properties) {\n if (!object2 || typeof object2 !== \"object\") {\n logger.throwArgumentError(\"invalid object\", \"object\", object2);\n }\n Object.keys(object2).forEach(function(key) {\n if (!properties[key]) {\n logger.throwArgumentError(\"invalid object key - \" + key, \"transaction:\" + key, object2);\n }\n });\n }\n exports3.checkProperties = checkProperties;\n function shallowCopy(object2) {\n var result = {};\n for (var key in object2) {\n result[key] = object2[key];\n }\n return result;\n }\n exports3.shallowCopy = shallowCopy;\n var opaque = { bigint: true, boolean: true, \"function\": true, number: true, string: true };\n function _isFrozen(object2) {\n if (object2 === void 0 || object2 === null || opaque[typeof object2]) {\n return true;\n }\n if (Array.isArray(object2) || typeof object2 === \"object\") {\n if (!Object.isFrozen(object2)) {\n return false;\n }\n var keys = Object.keys(object2);\n for (var i3 = 0; i3 < keys.length; i3++) {\n var value = null;\n try {\n value = object2[keys[i3]];\n } catch (error) {\n continue;\n }\n if (!_isFrozen(value)) {\n return false;\n }\n }\n return true;\n }\n return logger.throwArgumentError(\"Cannot deepCopy \" + typeof object2, \"object\", object2);\n }\n function _deepCopy(object2) {\n if (_isFrozen(object2)) {\n return object2;\n }\n if (Array.isArray(object2)) {\n return Object.freeze(object2.map(function(item) {\n return deepCopy(item);\n }));\n }\n if (typeof object2 === \"object\") {\n var result = {};\n for (var key in object2) {\n var value = object2[key];\n if (value === void 0) {\n continue;\n }\n defineReadOnly(result, key, deepCopy(value));\n }\n return result;\n }\n return logger.throwArgumentError(\"Cannot deepCopy \" + typeof object2, \"object\", object2);\n }\n function deepCopy(object2) {\n return _deepCopy(object2);\n }\n exports3.deepCopy = deepCopy;\n var Description = (\n /** @class */\n /* @__PURE__ */ function() {\n function Description2(info) {\n for (var key in info) {\n this[key] = deepCopy(info[key]);\n }\n }\n return Description2;\n }()\n );\n exports3.Description = Description;\n }\n });\n\n // ../../../node_modules/.pnpm/@ethersproject+abi@5.8.0/node_modules/@ethersproject/abi/lib/_version.js\n var require_version5 = __commonJS({\n \"../../../node_modules/.pnpm/@ethersproject+abi@5.8.0/node_modules/@ethersproject/abi/lib/_version.js\"(exports3) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n Object.defineProperty(exports3, \"__esModule\", { value: true });\n exports3.version = void 0;\n exports3.version = \"abi/5.8.0\";\n }\n });\n\n // ../../../node_modules/.pnpm/@ethersproject+abi@5.8.0/node_modules/@ethersproject/abi/lib/fragments.js\n var require_fragments = __commonJS({\n \"../../../node_modules/.pnpm/@ethersproject+abi@5.8.0/node_modules/@ethersproject/abi/lib/fragments.js\"(exports3) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n var __extends3 = exports3 && exports3.__extends || /* @__PURE__ */ function() {\n var extendStatics3 = function(d5, b4) {\n extendStatics3 = Object.setPrototypeOf || { __proto__: [] } instanceof Array && function(d6, b5) {\n d6.__proto__ = b5;\n } || function(d6, b5) {\n for (var p4 in b5)\n if (Object.prototype.hasOwnProperty.call(b5, p4))\n d6[p4] = b5[p4];\n };\n return extendStatics3(d5, b4);\n };\n return function(d5, b4) {\n if (typeof b4 !== \"function\" && b4 !== null)\n throw new TypeError(\"Class extends value \" + String(b4) + \" is not a constructor or null\");\n extendStatics3(d5, b4);\n function __() {\n this.constructor = d5;\n }\n d5.prototype = b4 === null ? Object.create(b4) : (__.prototype = b4.prototype, new __());\n };\n }();\n Object.defineProperty(exports3, \"__esModule\", { value: true });\n exports3.ErrorFragment = exports3.FunctionFragment = exports3.ConstructorFragment = exports3.EventFragment = exports3.Fragment = exports3.ParamType = exports3.FormatTypes = void 0;\n var bignumber_1 = require_lib3();\n var properties_1 = require_lib4();\n var logger_1 = require_lib();\n var _version_1 = require_version5();\n var logger = new logger_1.Logger(_version_1.version);\n var _constructorGuard = {};\n var ModifiersBytes = { calldata: true, memory: true, storage: true };\n var ModifiersNest = { calldata: true, memory: true };\n function checkModifier(type, name) {\n if (type === \"bytes\" || type === \"string\") {\n if (ModifiersBytes[name]) {\n return true;\n }\n } else if (type === \"address\") {\n if (name === \"payable\") {\n return true;\n }\n } else if (type.indexOf(\"[\") >= 0 || type === \"tuple\") {\n if (ModifiersNest[name]) {\n return true;\n }\n }\n if (ModifiersBytes[name] || name === \"payable\") {\n logger.throwArgumentError(\"invalid modifier\", \"name\", name);\n }\n return false;\n }\n function parseParamType(param, allowIndexed) {\n var originalParam = param;\n function throwError(i4) {\n logger.throwArgumentError(\"unexpected character at position \" + i4, \"param\", param);\n }\n param = param.replace(/\\s/g, \" \");\n function newNode(parent2) {\n var node2 = { type: \"\", name: \"\", parent: parent2, state: { allowType: true } };\n if (allowIndexed) {\n node2.indexed = false;\n }\n return node2;\n }\n var parent = { type: \"\", name: \"\", state: { allowType: true } };\n var node = parent;\n for (var i3 = 0; i3 < param.length; i3++) {\n var c4 = param[i3];\n switch (c4) {\n case \"(\":\n if (node.state.allowType && node.type === \"\") {\n node.type = \"tuple\";\n } else if (!node.state.allowParams) {\n throwError(i3);\n }\n node.state.allowType = false;\n node.type = verifyType(node.type);\n node.components = [newNode(node)];\n node = node.components[0];\n break;\n case \")\":\n delete node.state;\n if (node.name === \"indexed\") {\n if (!allowIndexed) {\n throwError(i3);\n }\n node.indexed = true;\n node.name = \"\";\n }\n if (checkModifier(node.type, node.name)) {\n node.name = \"\";\n }\n node.type = verifyType(node.type);\n var child = node;\n node = node.parent;\n if (!node) {\n throwError(i3);\n }\n delete child.parent;\n node.state.allowParams = false;\n node.state.allowName = true;\n node.state.allowArray = true;\n break;\n case \",\":\n delete node.state;\n if (node.name === \"indexed\") {\n if (!allowIndexed) {\n throwError(i3);\n }\n node.indexed = true;\n node.name = \"\";\n }\n if (checkModifier(node.type, node.name)) {\n node.name = \"\";\n }\n node.type = verifyType(node.type);\n var sibling = newNode(node.parent);\n node.parent.components.push(sibling);\n delete node.parent;\n node = sibling;\n break;\n case \" \":\n if (node.state.allowType) {\n if (node.type !== \"\") {\n node.type = verifyType(node.type);\n delete node.state.allowType;\n node.state.allowName = true;\n node.state.allowParams = true;\n }\n }\n if (node.state.allowName) {\n if (node.name !== \"\") {\n if (node.name === \"indexed\") {\n if (!allowIndexed) {\n throwError(i3);\n }\n if (node.indexed) {\n throwError(i3);\n }\n node.indexed = true;\n node.name = \"\";\n } else if (checkModifier(node.type, node.name)) {\n node.name = \"\";\n } else {\n node.state.allowName = false;\n }\n }\n }\n break;\n case \"[\":\n if (!node.state.allowArray) {\n throwError(i3);\n }\n node.type += c4;\n node.state.allowArray = false;\n node.state.allowName = false;\n node.state.readArray = true;\n break;\n case \"]\":\n if (!node.state.readArray) {\n throwError(i3);\n }\n node.type += c4;\n node.state.readArray = false;\n node.state.allowArray = true;\n node.state.allowName = true;\n break;\n default:\n if (node.state.allowType) {\n node.type += c4;\n node.state.allowParams = true;\n node.state.allowArray = true;\n } else if (node.state.allowName) {\n node.name += c4;\n delete node.state.allowArray;\n } else if (node.state.readArray) {\n node.type += c4;\n } else {\n throwError(i3);\n }\n }\n }\n if (node.parent) {\n logger.throwArgumentError(\"unexpected eof\", \"param\", param);\n }\n delete parent.state;\n if (node.name === \"indexed\") {\n if (!allowIndexed) {\n throwError(originalParam.length - 7);\n }\n if (node.indexed) {\n throwError(originalParam.length - 7);\n }\n node.indexed = true;\n node.name = \"\";\n } else if (checkModifier(node.type, node.name)) {\n node.name = \"\";\n }\n parent.type = verifyType(parent.type);\n return parent;\n }\n function populate(object2, params) {\n for (var key in params) {\n (0, properties_1.defineReadOnly)(object2, key, params[key]);\n }\n }\n exports3.FormatTypes = Object.freeze({\n // Bare formatting, as is needed for computing a sighash of an event or function\n sighash: \"sighash\",\n // Human-Readable with Minimal spacing and without names (compact human-readable)\n minimal: \"minimal\",\n // Human-Readable with nice spacing, including all names\n full: \"full\",\n // JSON-format a la Solidity\n json: \"json\"\n });\n var paramTypeArray = new RegExp(/^(.*)\\[([0-9]*)\\]$/);\n var ParamType = (\n /** @class */\n function() {\n function ParamType2(constructorGuard, params) {\n if (constructorGuard !== _constructorGuard) {\n logger.throwError(\"use fromString\", logger_1.Logger.errors.UNSUPPORTED_OPERATION, {\n operation: \"new ParamType()\"\n });\n }\n populate(this, params);\n var match = this.type.match(paramTypeArray);\n if (match) {\n populate(this, {\n arrayLength: parseInt(match[2] || \"-1\"),\n arrayChildren: ParamType2.fromObject({\n type: match[1],\n components: this.components\n }),\n baseType: \"array\"\n });\n } else {\n populate(this, {\n arrayLength: null,\n arrayChildren: null,\n baseType: this.components != null ? \"tuple\" : this.type\n });\n }\n this._isParamType = true;\n Object.freeze(this);\n }\n ParamType2.prototype.format = function(format) {\n if (!format) {\n format = exports3.FormatTypes.sighash;\n }\n if (!exports3.FormatTypes[format]) {\n logger.throwArgumentError(\"invalid format type\", \"format\", format);\n }\n if (format === exports3.FormatTypes.json) {\n var result_1 = {\n type: this.baseType === \"tuple\" ? \"tuple\" : this.type,\n name: this.name || void 0\n };\n if (typeof this.indexed === \"boolean\") {\n result_1.indexed = this.indexed;\n }\n if (this.components) {\n result_1.components = this.components.map(function(comp) {\n return JSON.parse(comp.format(format));\n });\n }\n return JSON.stringify(result_1);\n }\n var result = \"\";\n if (this.baseType === \"array\") {\n result += this.arrayChildren.format(format);\n result += \"[\" + (this.arrayLength < 0 ? \"\" : String(this.arrayLength)) + \"]\";\n } else {\n if (this.baseType === \"tuple\") {\n if (format !== exports3.FormatTypes.sighash) {\n result += this.type;\n }\n result += \"(\" + this.components.map(function(comp) {\n return comp.format(format);\n }).join(format === exports3.FormatTypes.full ? \", \" : \",\") + \")\";\n } else {\n result += this.type;\n }\n }\n if (format !== exports3.FormatTypes.sighash) {\n if (this.indexed === true) {\n result += \" indexed\";\n }\n if (format === exports3.FormatTypes.full && this.name) {\n result += \" \" + this.name;\n }\n }\n return result;\n };\n ParamType2.from = function(value, allowIndexed) {\n if (typeof value === \"string\") {\n return ParamType2.fromString(value, allowIndexed);\n }\n return ParamType2.fromObject(value);\n };\n ParamType2.fromObject = function(value) {\n if (ParamType2.isParamType(value)) {\n return value;\n }\n return new ParamType2(_constructorGuard, {\n name: value.name || null,\n type: verifyType(value.type),\n indexed: value.indexed == null ? null : !!value.indexed,\n components: value.components ? value.components.map(ParamType2.fromObject) : null\n });\n };\n ParamType2.fromString = function(value, allowIndexed) {\n function ParamTypify(node) {\n return ParamType2.fromObject({\n name: node.name,\n type: node.type,\n indexed: node.indexed,\n components: node.components\n });\n }\n return ParamTypify(parseParamType(value, !!allowIndexed));\n };\n ParamType2.isParamType = function(value) {\n return !!(value != null && value._isParamType);\n };\n return ParamType2;\n }()\n );\n exports3.ParamType = ParamType;\n function parseParams(value, allowIndex) {\n return splitNesting(value).map(function(param) {\n return ParamType.fromString(param, allowIndex);\n });\n }\n var Fragment = (\n /** @class */\n function() {\n function Fragment2(constructorGuard, params) {\n if (constructorGuard !== _constructorGuard) {\n logger.throwError(\"use a static from method\", logger_1.Logger.errors.UNSUPPORTED_OPERATION, {\n operation: \"new Fragment()\"\n });\n }\n populate(this, params);\n this._isFragment = true;\n Object.freeze(this);\n }\n Fragment2.from = function(value) {\n if (Fragment2.isFragment(value)) {\n return value;\n }\n if (typeof value === \"string\") {\n return Fragment2.fromString(value);\n }\n return Fragment2.fromObject(value);\n };\n Fragment2.fromObject = function(value) {\n if (Fragment2.isFragment(value)) {\n return value;\n }\n switch (value.type) {\n case \"function\":\n return FunctionFragment.fromObject(value);\n case \"event\":\n return EventFragment.fromObject(value);\n case \"constructor\":\n return ConstructorFragment.fromObject(value);\n case \"error\":\n return ErrorFragment.fromObject(value);\n case \"fallback\":\n case \"receive\":\n return null;\n }\n return logger.throwArgumentError(\"invalid fragment object\", \"value\", value);\n };\n Fragment2.fromString = function(value) {\n value = value.replace(/\\s/g, \" \");\n value = value.replace(/\\(/g, \" (\").replace(/\\)/g, \") \").replace(/\\s+/g, \" \");\n value = value.trim();\n if (value.split(\" \")[0] === \"event\") {\n return EventFragment.fromString(value.substring(5).trim());\n } else if (value.split(\" \")[0] === \"function\") {\n return FunctionFragment.fromString(value.substring(8).trim());\n } else if (value.split(\"(\")[0].trim() === \"constructor\") {\n return ConstructorFragment.fromString(value.trim());\n } else if (value.split(\" \")[0] === \"error\") {\n return ErrorFragment.fromString(value.substring(5).trim());\n }\n return logger.throwArgumentError(\"unsupported fragment\", \"value\", value);\n };\n Fragment2.isFragment = function(value) {\n return !!(value && value._isFragment);\n };\n return Fragment2;\n }()\n );\n exports3.Fragment = Fragment;\n var EventFragment = (\n /** @class */\n function(_super) {\n __extends3(EventFragment2, _super);\n function EventFragment2() {\n return _super !== null && _super.apply(this, arguments) || this;\n }\n EventFragment2.prototype.format = function(format) {\n if (!format) {\n format = exports3.FormatTypes.sighash;\n }\n if (!exports3.FormatTypes[format]) {\n logger.throwArgumentError(\"invalid format type\", \"format\", format);\n }\n if (format === exports3.FormatTypes.json) {\n return JSON.stringify({\n type: \"event\",\n anonymous: this.anonymous,\n name: this.name,\n inputs: this.inputs.map(function(input) {\n return JSON.parse(input.format(format));\n })\n });\n }\n var result = \"\";\n if (format !== exports3.FormatTypes.sighash) {\n result += \"event \";\n }\n result += this.name + \"(\" + this.inputs.map(function(input) {\n return input.format(format);\n }).join(format === exports3.FormatTypes.full ? \", \" : \",\") + \") \";\n if (format !== exports3.FormatTypes.sighash) {\n if (this.anonymous) {\n result += \"anonymous \";\n }\n }\n return result.trim();\n };\n EventFragment2.from = function(value) {\n if (typeof value === \"string\") {\n return EventFragment2.fromString(value);\n }\n return EventFragment2.fromObject(value);\n };\n EventFragment2.fromObject = function(value) {\n if (EventFragment2.isEventFragment(value)) {\n return value;\n }\n if (value.type !== \"event\") {\n logger.throwArgumentError(\"invalid event object\", \"value\", value);\n }\n var params = {\n name: verifyIdentifier(value.name),\n anonymous: value.anonymous,\n inputs: value.inputs ? value.inputs.map(ParamType.fromObject) : [],\n type: \"event\"\n };\n return new EventFragment2(_constructorGuard, params);\n };\n EventFragment2.fromString = function(value) {\n var match = value.match(regexParen);\n if (!match) {\n logger.throwArgumentError(\"invalid event string\", \"value\", value);\n }\n var anonymous = false;\n match[3].split(\" \").forEach(function(modifier) {\n switch (modifier.trim()) {\n case \"anonymous\":\n anonymous = true;\n break;\n case \"\":\n break;\n default:\n logger.warn(\"unknown modifier: \" + modifier);\n }\n });\n return EventFragment2.fromObject({\n name: match[1].trim(),\n anonymous,\n inputs: parseParams(match[2], true),\n type: \"event\"\n });\n };\n EventFragment2.isEventFragment = function(value) {\n return value && value._isFragment && value.type === \"event\";\n };\n return EventFragment2;\n }(Fragment)\n );\n exports3.EventFragment = EventFragment;\n function parseGas(value, params) {\n params.gas = null;\n var comps = value.split(\"@\");\n if (comps.length !== 1) {\n if (comps.length > 2) {\n logger.throwArgumentError(\"invalid human-readable ABI signature\", \"value\", value);\n }\n if (!comps[1].match(/^[0-9]+$/)) {\n logger.throwArgumentError(\"invalid human-readable ABI signature gas\", \"value\", value);\n }\n params.gas = bignumber_1.BigNumber.from(comps[1]);\n return comps[0];\n }\n return value;\n }\n function parseModifiers(value, params) {\n params.constant = false;\n params.payable = false;\n params.stateMutability = \"nonpayable\";\n value.split(\" \").forEach(function(modifier) {\n switch (modifier.trim()) {\n case \"constant\":\n params.constant = true;\n break;\n case \"payable\":\n params.payable = true;\n params.stateMutability = \"payable\";\n break;\n case \"nonpayable\":\n params.payable = false;\n params.stateMutability = \"nonpayable\";\n break;\n case \"pure\":\n params.constant = true;\n params.stateMutability = \"pure\";\n break;\n case \"view\":\n params.constant = true;\n params.stateMutability = \"view\";\n break;\n case \"external\":\n case \"public\":\n case \"\":\n break;\n default:\n console.log(\"unknown modifier: \" + modifier);\n }\n });\n }\n function verifyState(value) {\n var result = {\n constant: false,\n payable: true,\n stateMutability: \"payable\"\n };\n if (value.stateMutability != null) {\n result.stateMutability = value.stateMutability;\n result.constant = result.stateMutability === \"view\" || result.stateMutability === \"pure\";\n if (value.constant != null) {\n if (!!value.constant !== result.constant) {\n logger.throwArgumentError(\"cannot have constant function with mutability \" + result.stateMutability, \"value\", value);\n }\n }\n result.payable = result.stateMutability === \"payable\";\n if (value.payable != null) {\n if (!!value.payable !== result.payable) {\n logger.throwArgumentError(\"cannot have payable function with mutability \" + result.stateMutability, \"value\", value);\n }\n }\n } else if (value.payable != null) {\n result.payable = !!value.payable;\n if (value.constant == null && !result.payable && value.type !== \"constructor\") {\n logger.throwArgumentError(\"unable to determine stateMutability\", \"value\", value);\n }\n result.constant = !!value.constant;\n if (result.constant) {\n result.stateMutability = \"view\";\n } else {\n result.stateMutability = result.payable ? \"payable\" : \"nonpayable\";\n }\n if (result.payable && result.constant) {\n logger.throwArgumentError(\"cannot have constant payable function\", \"value\", value);\n }\n } else if (value.constant != null) {\n result.constant = !!value.constant;\n result.payable = !result.constant;\n result.stateMutability = result.constant ? \"view\" : \"payable\";\n } else if (value.type !== \"constructor\") {\n logger.throwArgumentError(\"unable to determine stateMutability\", \"value\", value);\n }\n return result;\n }\n var ConstructorFragment = (\n /** @class */\n function(_super) {\n __extends3(ConstructorFragment2, _super);\n function ConstructorFragment2() {\n return _super !== null && _super.apply(this, arguments) || this;\n }\n ConstructorFragment2.prototype.format = function(format) {\n if (!format) {\n format = exports3.FormatTypes.sighash;\n }\n if (!exports3.FormatTypes[format]) {\n logger.throwArgumentError(\"invalid format type\", \"format\", format);\n }\n if (format === exports3.FormatTypes.json) {\n return JSON.stringify({\n type: \"constructor\",\n stateMutability: this.stateMutability !== \"nonpayable\" ? this.stateMutability : void 0,\n payable: this.payable,\n gas: this.gas ? this.gas.toNumber() : void 0,\n inputs: this.inputs.map(function(input) {\n return JSON.parse(input.format(format));\n })\n });\n }\n if (format === exports3.FormatTypes.sighash) {\n logger.throwError(\"cannot format a constructor for sighash\", logger_1.Logger.errors.UNSUPPORTED_OPERATION, {\n operation: \"format(sighash)\"\n });\n }\n var result = \"constructor(\" + this.inputs.map(function(input) {\n return input.format(format);\n }).join(format === exports3.FormatTypes.full ? \", \" : \",\") + \") \";\n if (this.stateMutability && this.stateMutability !== \"nonpayable\") {\n result += this.stateMutability + \" \";\n }\n return result.trim();\n };\n ConstructorFragment2.from = function(value) {\n if (typeof value === \"string\") {\n return ConstructorFragment2.fromString(value);\n }\n return ConstructorFragment2.fromObject(value);\n };\n ConstructorFragment2.fromObject = function(value) {\n if (ConstructorFragment2.isConstructorFragment(value)) {\n return value;\n }\n if (value.type !== \"constructor\") {\n logger.throwArgumentError(\"invalid constructor object\", \"value\", value);\n }\n var state = verifyState(value);\n if (state.constant) {\n logger.throwArgumentError(\"constructor cannot be constant\", \"value\", value);\n }\n var params = {\n name: null,\n type: value.type,\n inputs: value.inputs ? value.inputs.map(ParamType.fromObject) : [],\n payable: state.payable,\n stateMutability: state.stateMutability,\n gas: value.gas ? bignumber_1.BigNumber.from(value.gas) : null\n };\n return new ConstructorFragment2(_constructorGuard, params);\n };\n ConstructorFragment2.fromString = function(value) {\n var params = { type: \"constructor\" };\n value = parseGas(value, params);\n var parens = value.match(regexParen);\n if (!parens || parens[1].trim() !== \"constructor\") {\n logger.throwArgumentError(\"invalid constructor string\", \"value\", value);\n }\n params.inputs = parseParams(parens[2].trim(), false);\n parseModifiers(parens[3].trim(), params);\n return ConstructorFragment2.fromObject(params);\n };\n ConstructorFragment2.isConstructorFragment = function(value) {\n return value && value._isFragment && value.type === \"constructor\";\n };\n return ConstructorFragment2;\n }(Fragment)\n );\n exports3.ConstructorFragment = ConstructorFragment;\n var FunctionFragment = (\n /** @class */\n function(_super) {\n __extends3(FunctionFragment2, _super);\n function FunctionFragment2() {\n return _super !== null && _super.apply(this, arguments) || this;\n }\n FunctionFragment2.prototype.format = function(format) {\n if (!format) {\n format = exports3.FormatTypes.sighash;\n }\n if (!exports3.FormatTypes[format]) {\n logger.throwArgumentError(\"invalid format type\", \"format\", format);\n }\n if (format === exports3.FormatTypes.json) {\n return JSON.stringify({\n type: \"function\",\n name: this.name,\n constant: this.constant,\n stateMutability: this.stateMutability !== \"nonpayable\" ? this.stateMutability : void 0,\n payable: this.payable,\n gas: this.gas ? this.gas.toNumber() : void 0,\n inputs: this.inputs.map(function(input) {\n return JSON.parse(input.format(format));\n }),\n outputs: this.outputs.map(function(output) {\n return JSON.parse(output.format(format));\n })\n });\n }\n var result = \"\";\n if (format !== exports3.FormatTypes.sighash) {\n result += \"function \";\n }\n result += this.name + \"(\" + this.inputs.map(function(input) {\n return input.format(format);\n }).join(format === exports3.FormatTypes.full ? \", \" : \",\") + \") \";\n if (format !== exports3.FormatTypes.sighash) {\n if (this.stateMutability) {\n if (this.stateMutability !== \"nonpayable\") {\n result += this.stateMutability + \" \";\n }\n } else if (this.constant) {\n result += \"view \";\n }\n if (this.outputs && this.outputs.length) {\n result += \"returns (\" + this.outputs.map(function(output) {\n return output.format(format);\n }).join(\", \") + \") \";\n }\n if (this.gas != null) {\n result += \"@\" + this.gas.toString() + \" \";\n }\n }\n return result.trim();\n };\n FunctionFragment2.from = function(value) {\n if (typeof value === \"string\") {\n return FunctionFragment2.fromString(value);\n }\n return FunctionFragment2.fromObject(value);\n };\n FunctionFragment2.fromObject = function(value) {\n if (FunctionFragment2.isFunctionFragment(value)) {\n return value;\n }\n if (value.type !== \"function\") {\n logger.throwArgumentError(\"invalid function object\", \"value\", value);\n }\n var state = verifyState(value);\n var params = {\n type: value.type,\n name: verifyIdentifier(value.name),\n constant: state.constant,\n inputs: value.inputs ? value.inputs.map(ParamType.fromObject) : [],\n outputs: value.outputs ? value.outputs.map(ParamType.fromObject) : [],\n payable: state.payable,\n stateMutability: state.stateMutability,\n gas: value.gas ? bignumber_1.BigNumber.from(value.gas) : null\n };\n return new FunctionFragment2(_constructorGuard, params);\n };\n FunctionFragment2.fromString = function(value) {\n var params = { type: \"function\" };\n value = parseGas(value, params);\n var comps = value.split(\" returns \");\n if (comps.length > 2) {\n logger.throwArgumentError(\"invalid function string\", \"value\", value);\n }\n var parens = comps[0].match(regexParen);\n if (!parens) {\n logger.throwArgumentError(\"invalid function signature\", \"value\", value);\n }\n params.name = parens[1].trim();\n if (params.name) {\n verifyIdentifier(params.name);\n }\n params.inputs = parseParams(parens[2], false);\n parseModifiers(parens[3].trim(), params);\n if (comps.length > 1) {\n var returns = comps[1].match(regexParen);\n if (returns[1].trim() != \"\" || returns[3].trim() != \"\") {\n logger.throwArgumentError(\"unexpected tokens\", \"value\", value);\n }\n params.outputs = parseParams(returns[2], false);\n } else {\n params.outputs = [];\n }\n return FunctionFragment2.fromObject(params);\n };\n FunctionFragment2.isFunctionFragment = function(value) {\n return value && value._isFragment && value.type === \"function\";\n };\n return FunctionFragment2;\n }(ConstructorFragment)\n );\n exports3.FunctionFragment = FunctionFragment;\n function checkForbidden(fragment) {\n var sig = fragment.format();\n if (sig === \"Error(string)\" || sig === \"Panic(uint256)\") {\n logger.throwArgumentError(\"cannot specify user defined \" + sig + \" error\", \"fragment\", fragment);\n }\n return fragment;\n }\n var ErrorFragment = (\n /** @class */\n function(_super) {\n __extends3(ErrorFragment2, _super);\n function ErrorFragment2() {\n return _super !== null && _super.apply(this, arguments) || this;\n }\n ErrorFragment2.prototype.format = function(format) {\n if (!format) {\n format = exports3.FormatTypes.sighash;\n }\n if (!exports3.FormatTypes[format]) {\n logger.throwArgumentError(\"invalid format type\", \"format\", format);\n }\n if (format === exports3.FormatTypes.json) {\n return JSON.stringify({\n type: \"error\",\n name: this.name,\n inputs: this.inputs.map(function(input) {\n return JSON.parse(input.format(format));\n })\n });\n }\n var result = \"\";\n if (format !== exports3.FormatTypes.sighash) {\n result += \"error \";\n }\n result += this.name + \"(\" + this.inputs.map(function(input) {\n return input.format(format);\n }).join(format === exports3.FormatTypes.full ? \", \" : \",\") + \") \";\n return result.trim();\n };\n ErrorFragment2.from = function(value) {\n if (typeof value === \"string\") {\n return ErrorFragment2.fromString(value);\n }\n return ErrorFragment2.fromObject(value);\n };\n ErrorFragment2.fromObject = function(value) {\n if (ErrorFragment2.isErrorFragment(value)) {\n return value;\n }\n if (value.type !== \"error\") {\n logger.throwArgumentError(\"invalid error object\", \"value\", value);\n }\n var params = {\n type: value.type,\n name: verifyIdentifier(value.name),\n inputs: value.inputs ? value.inputs.map(ParamType.fromObject) : []\n };\n return checkForbidden(new ErrorFragment2(_constructorGuard, params));\n };\n ErrorFragment2.fromString = function(value) {\n var params = { type: \"error\" };\n var parens = value.match(regexParen);\n if (!parens) {\n logger.throwArgumentError(\"invalid error signature\", \"value\", value);\n }\n params.name = parens[1].trim();\n if (params.name) {\n verifyIdentifier(params.name);\n }\n params.inputs = parseParams(parens[2], false);\n return checkForbidden(ErrorFragment2.fromObject(params));\n };\n ErrorFragment2.isErrorFragment = function(value) {\n return value && value._isFragment && value.type === \"error\";\n };\n return ErrorFragment2;\n }(Fragment)\n );\n exports3.ErrorFragment = ErrorFragment;\n function verifyType(type) {\n if (type.match(/^uint($|[^1-9])/)) {\n type = \"uint256\" + type.substring(4);\n } else if (type.match(/^int($|[^1-9])/)) {\n type = \"int256\" + type.substring(3);\n }\n return type;\n }\n var regexIdentifier = new RegExp(\"^[a-zA-Z$_][a-zA-Z0-9$_]*$\");\n function verifyIdentifier(value) {\n if (!value || !value.match(regexIdentifier)) {\n logger.throwArgumentError('invalid identifier \"' + value + '\"', \"value\", value);\n }\n return value;\n }\n var regexParen = new RegExp(\"^([^)(]*)\\\\((.*)\\\\)([^)(]*)$\");\n function splitNesting(value) {\n value = value.trim();\n var result = [];\n var accum = \"\";\n var depth = 0;\n for (var offset = 0; offset < value.length; offset++) {\n var c4 = value[offset];\n if (c4 === \",\" && depth === 0) {\n result.push(accum);\n accum = \"\";\n } else {\n accum += c4;\n if (c4 === \"(\") {\n depth++;\n } else if (c4 === \")\") {\n depth--;\n if (depth === -1) {\n logger.throwArgumentError(\"unbalanced parenthesis\", \"value\", value);\n }\n }\n }\n }\n if (accum) {\n result.push(accum);\n }\n return result;\n }\n }\n });\n\n // ../../../node_modules/.pnpm/@ethersproject+abi@5.8.0/node_modules/@ethersproject/abi/lib/coders/abstract-coder.js\n var require_abstract_coder = __commonJS({\n \"../../../node_modules/.pnpm/@ethersproject+abi@5.8.0/node_modules/@ethersproject/abi/lib/coders/abstract-coder.js\"(exports3) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n Object.defineProperty(exports3, \"__esModule\", { value: true });\n exports3.Reader = exports3.Writer = exports3.Coder = exports3.checkResultErrors = void 0;\n var bytes_1 = require_lib2();\n var bignumber_1 = require_lib3();\n var properties_1 = require_lib4();\n var logger_1 = require_lib();\n var _version_1 = require_version5();\n var logger = new logger_1.Logger(_version_1.version);\n function checkResultErrors(result) {\n var errors = [];\n var checkErrors = function(path, object2) {\n if (!Array.isArray(object2)) {\n return;\n }\n for (var key in object2) {\n var childPath = path.slice();\n childPath.push(key);\n try {\n checkErrors(childPath, object2[key]);\n } catch (error) {\n errors.push({ path: childPath, error });\n }\n }\n };\n checkErrors([], result);\n return errors;\n }\n exports3.checkResultErrors = checkResultErrors;\n var Coder = (\n /** @class */\n function() {\n function Coder2(name, type, localName, dynamic) {\n this.name = name;\n this.type = type;\n this.localName = localName;\n this.dynamic = dynamic;\n }\n Coder2.prototype._throwError = function(message, value) {\n logger.throwArgumentError(message, this.localName, value);\n };\n return Coder2;\n }()\n );\n exports3.Coder = Coder;\n var Writer = (\n /** @class */\n function() {\n function Writer2(wordSize) {\n (0, properties_1.defineReadOnly)(this, \"wordSize\", wordSize || 32);\n this._data = [];\n this._dataLength = 0;\n this._padding = new Uint8Array(wordSize);\n }\n Object.defineProperty(Writer2.prototype, \"data\", {\n get: function() {\n return (0, bytes_1.hexConcat)(this._data);\n },\n enumerable: false,\n configurable: true\n });\n Object.defineProperty(Writer2.prototype, \"length\", {\n get: function() {\n return this._dataLength;\n },\n enumerable: false,\n configurable: true\n });\n Writer2.prototype._writeData = function(data) {\n this._data.push(data);\n this._dataLength += data.length;\n return data.length;\n };\n Writer2.prototype.appendWriter = function(writer) {\n return this._writeData((0, bytes_1.concat)(writer._data));\n };\n Writer2.prototype.writeBytes = function(value) {\n var bytes = (0, bytes_1.arrayify)(value);\n var paddingOffset = bytes.length % this.wordSize;\n if (paddingOffset) {\n bytes = (0, bytes_1.concat)([bytes, this._padding.slice(paddingOffset)]);\n }\n return this._writeData(bytes);\n };\n Writer2.prototype._getValue = function(value) {\n var bytes = (0, bytes_1.arrayify)(bignumber_1.BigNumber.from(value));\n if (bytes.length > this.wordSize) {\n logger.throwError(\"value out-of-bounds\", logger_1.Logger.errors.BUFFER_OVERRUN, {\n length: this.wordSize,\n offset: bytes.length\n });\n }\n if (bytes.length % this.wordSize) {\n bytes = (0, bytes_1.concat)([this._padding.slice(bytes.length % this.wordSize), bytes]);\n }\n return bytes;\n };\n Writer2.prototype.writeValue = function(value) {\n return this._writeData(this._getValue(value));\n };\n Writer2.prototype.writeUpdatableValue = function() {\n var _this = this;\n var offset = this._data.length;\n this._data.push(this._padding);\n this._dataLength += this.wordSize;\n return function(value) {\n _this._data[offset] = _this._getValue(value);\n };\n };\n return Writer2;\n }()\n );\n exports3.Writer = Writer;\n var Reader = (\n /** @class */\n function() {\n function Reader2(data, wordSize, coerceFunc, allowLoose) {\n (0, properties_1.defineReadOnly)(this, \"_data\", (0, bytes_1.arrayify)(data));\n (0, properties_1.defineReadOnly)(this, \"wordSize\", wordSize || 32);\n (0, properties_1.defineReadOnly)(this, \"_coerceFunc\", coerceFunc);\n (0, properties_1.defineReadOnly)(this, \"allowLoose\", allowLoose);\n this._offset = 0;\n }\n Object.defineProperty(Reader2.prototype, \"data\", {\n get: function() {\n return (0, bytes_1.hexlify)(this._data);\n },\n enumerable: false,\n configurable: true\n });\n Object.defineProperty(Reader2.prototype, \"consumed\", {\n get: function() {\n return this._offset;\n },\n enumerable: false,\n configurable: true\n });\n Reader2.coerce = function(name, value) {\n var match = name.match(\"^u?int([0-9]+)$\");\n if (match && parseInt(match[1]) <= 48) {\n value = value.toNumber();\n }\n return value;\n };\n Reader2.prototype.coerce = function(name, value) {\n if (this._coerceFunc) {\n return this._coerceFunc(name, value);\n }\n return Reader2.coerce(name, value);\n };\n Reader2.prototype._peekBytes = function(offset, length2, loose) {\n var alignedLength = Math.ceil(length2 / this.wordSize) * this.wordSize;\n if (this._offset + alignedLength > this._data.length) {\n if (this.allowLoose && loose && this._offset + length2 <= this._data.length) {\n alignedLength = length2;\n } else {\n logger.throwError(\"data out-of-bounds\", logger_1.Logger.errors.BUFFER_OVERRUN, {\n length: this._data.length,\n offset: this._offset + alignedLength\n });\n }\n }\n return this._data.slice(this._offset, this._offset + alignedLength);\n };\n Reader2.prototype.subReader = function(offset) {\n return new Reader2(this._data.slice(this._offset + offset), this.wordSize, this._coerceFunc, this.allowLoose);\n };\n Reader2.prototype.readBytes = function(length2, loose) {\n var bytes = this._peekBytes(0, length2, !!loose);\n this._offset += bytes.length;\n return bytes.slice(0, length2);\n };\n Reader2.prototype.readValue = function() {\n return bignumber_1.BigNumber.from(this.readBytes(this.wordSize));\n };\n return Reader2;\n }()\n );\n exports3.Reader = Reader;\n }\n });\n\n // ../../../node_modules/.pnpm/js-sha3@0.8.0/node_modules/js-sha3/src/sha3.js\n var require_sha3 = __commonJS({\n \"../../../node_modules/.pnpm/js-sha3@0.8.0/node_modules/js-sha3/src/sha3.js\"(exports3, module) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n (function() {\n \"use strict\";\n var INPUT_ERROR = \"input is invalid type\";\n var FINALIZE_ERROR = \"finalize already called\";\n var WINDOW = typeof window === \"object\";\n var root = WINDOW ? window : {};\n if (root.JS_SHA3_NO_WINDOW) {\n WINDOW = false;\n }\n var WEB_WORKER = !WINDOW && typeof self === \"object\";\n var NODE_JS = !root.JS_SHA3_NO_NODE_JS && typeof process_exports === \"object\" && process_exports.versions && process_exports.versions.node;\n if (NODE_JS) {\n root = global;\n } else if (WEB_WORKER) {\n root = self;\n }\n var COMMON_JS = !root.JS_SHA3_NO_COMMON_JS && typeof module === \"object\" && module.exports;\n var AMD = typeof define === \"function\" && define.amd;\n var ARRAY_BUFFER = !root.JS_SHA3_NO_ARRAY_BUFFER && typeof ArrayBuffer !== \"undefined\";\n var HEX_CHARS = \"0123456789abcdef\".split(\"\");\n var SHAKE_PADDING = [31, 7936, 2031616, 520093696];\n var CSHAKE_PADDING = [4, 1024, 262144, 67108864];\n var KECCAK_PADDING = [1, 256, 65536, 16777216];\n var PADDING = [6, 1536, 393216, 100663296];\n var SHIFT = [0, 8, 16, 24];\n var RC = [\n 1,\n 0,\n 32898,\n 0,\n 32906,\n 2147483648,\n 2147516416,\n 2147483648,\n 32907,\n 0,\n 2147483649,\n 0,\n 2147516545,\n 2147483648,\n 32777,\n 2147483648,\n 138,\n 0,\n 136,\n 0,\n 2147516425,\n 0,\n 2147483658,\n 0,\n 2147516555,\n 0,\n 139,\n 2147483648,\n 32905,\n 2147483648,\n 32771,\n 2147483648,\n 32770,\n 2147483648,\n 128,\n 2147483648,\n 32778,\n 0,\n 2147483658,\n 2147483648,\n 2147516545,\n 2147483648,\n 32896,\n 2147483648,\n 2147483649,\n 0,\n 2147516424,\n 2147483648\n ];\n var BITS = [224, 256, 384, 512];\n var SHAKE_BITS = [128, 256];\n var OUTPUT_TYPES = [\"hex\", \"buffer\", \"arrayBuffer\", \"array\", \"digest\"];\n var CSHAKE_BYTEPAD = {\n \"128\": 168,\n \"256\": 136\n };\n if (root.JS_SHA3_NO_NODE_JS || !Array.isArray) {\n Array.isArray = function(obj) {\n return Object.prototype.toString.call(obj) === \"[object Array]\";\n };\n }\n if (ARRAY_BUFFER && (root.JS_SHA3_NO_ARRAY_BUFFER_IS_VIEW || !ArrayBuffer.isView)) {\n ArrayBuffer.isView = function(obj) {\n return typeof obj === \"object\" && obj.buffer && obj.buffer.constructor === ArrayBuffer;\n };\n }\n var createOutputMethod = function(bits2, padding, outputType) {\n return function(message) {\n return new Keccak3(bits2, padding, bits2).update(message)[outputType]();\n };\n };\n var createShakeOutputMethod = function(bits2, padding, outputType) {\n return function(message, outputBits) {\n return new Keccak3(bits2, padding, outputBits).update(message)[outputType]();\n };\n };\n var createCshakeOutputMethod = function(bits2, padding, outputType) {\n return function(message, outputBits, n2, s4) {\n return methods[\"cshake\" + bits2].update(message, outputBits, n2, s4)[outputType]();\n };\n };\n var createKmacOutputMethod = function(bits2, padding, outputType) {\n return function(key, message, outputBits, s4) {\n return methods[\"kmac\" + bits2].update(key, message, outputBits, s4)[outputType]();\n };\n };\n var createOutputMethods = function(method, createMethod2, bits2, padding) {\n for (var i4 = 0; i4 < OUTPUT_TYPES.length; ++i4) {\n var type = OUTPUT_TYPES[i4];\n method[type] = createMethod2(bits2, padding, type);\n }\n return method;\n };\n var createMethod = function(bits2, padding) {\n var method = createOutputMethod(bits2, padding, \"hex\");\n method.create = function() {\n return new Keccak3(bits2, padding, bits2);\n };\n method.update = function(message) {\n return method.create().update(message);\n };\n return createOutputMethods(method, createOutputMethod, bits2, padding);\n };\n var createShakeMethod = function(bits2, padding) {\n var method = createShakeOutputMethod(bits2, padding, \"hex\");\n method.create = function(outputBits) {\n return new Keccak3(bits2, padding, outputBits);\n };\n method.update = function(message, outputBits) {\n return method.create(outputBits).update(message);\n };\n return createOutputMethods(method, createShakeOutputMethod, bits2, padding);\n };\n var createCshakeMethod = function(bits2, padding) {\n var w3 = CSHAKE_BYTEPAD[bits2];\n var method = createCshakeOutputMethod(bits2, padding, \"hex\");\n method.create = function(outputBits, n2, s4) {\n if (!n2 && !s4) {\n return methods[\"shake\" + bits2].create(outputBits);\n } else {\n return new Keccak3(bits2, padding, outputBits).bytepad([n2, s4], w3);\n }\n };\n method.update = function(message, outputBits, n2, s4) {\n return method.create(outputBits, n2, s4).update(message);\n };\n return createOutputMethods(method, createCshakeOutputMethod, bits2, padding);\n };\n var createKmacMethod = function(bits2, padding) {\n var w3 = CSHAKE_BYTEPAD[bits2];\n var method = createKmacOutputMethod(bits2, padding, \"hex\");\n method.create = function(key, outputBits, s4) {\n return new Kmac(bits2, padding, outputBits).bytepad([\"KMAC\", s4], w3).bytepad([key], w3);\n };\n method.update = function(key, message, outputBits, s4) {\n return method.create(key, outputBits, s4).update(message);\n };\n return createOutputMethods(method, createKmacOutputMethod, bits2, padding);\n };\n var algorithms = [\n { name: \"keccak\", padding: KECCAK_PADDING, bits: BITS, createMethod },\n { name: \"sha3\", padding: PADDING, bits: BITS, createMethod },\n { name: \"shake\", padding: SHAKE_PADDING, bits: SHAKE_BITS, createMethod: createShakeMethod },\n { name: \"cshake\", padding: CSHAKE_PADDING, bits: SHAKE_BITS, createMethod: createCshakeMethod },\n { name: \"kmac\", padding: CSHAKE_PADDING, bits: SHAKE_BITS, createMethod: createKmacMethod }\n ];\n var methods = {}, methodNames = [];\n for (var i3 = 0; i3 < algorithms.length; ++i3) {\n var algorithm = algorithms[i3];\n var bits = algorithm.bits;\n for (var j2 = 0; j2 < bits.length; ++j2) {\n var methodName = algorithm.name + \"_\" + bits[j2];\n methodNames.push(methodName);\n methods[methodName] = algorithm.createMethod(bits[j2], algorithm.padding);\n if (algorithm.name !== \"sha3\") {\n var newMethodName = algorithm.name + bits[j2];\n methodNames.push(newMethodName);\n methods[newMethodName] = methods[methodName];\n }\n }\n }\n function Keccak3(bits2, padding, outputBits) {\n this.blocks = [];\n this.s = [];\n this.padding = padding;\n this.outputBits = outputBits;\n this.reset = true;\n this.finalized = false;\n this.block = 0;\n this.start = 0;\n this.blockCount = 1600 - (bits2 << 1) >> 5;\n this.byteCount = this.blockCount << 2;\n this.outputBlocks = outputBits >> 5;\n this.extraBytes = (outputBits & 31) >> 3;\n for (var i4 = 0; i4 < 50; ++i4) {\n this.s[i4] = 0;\n }\n }\n Keccak3.prototype.update = function(message) {\n if (this.finalized) {\n throw new Error(FINALIZE_ERROR);\n }\n var notString, type = typeof message;\n if (type !== \"string\") {\n if (type === \"object\") {\n if (message === null) {\n throw new Error(INPUT_ERROR);\n } else if (ARRAY_BUFFER && message.constructor === ArrayBuffer) {\n message = new Uint8Array(message);\n } else if (!Array.isArray(message)) {\n if (!ARRAY_BUFFER || !ArrayBuffer.isView(message)) {\n throw new Error(INPUT_ERROR);\n }\n }\n } else {\n throw new Error(INPUT_ERROR);\n }\n notString = true;\n }\n var blocks = this.blocks, byteCount = this.byteCount, length2 = message.length, blockCount = this.blockCount, index2 = 0, s4 = this.s, i4, code;\n while (index2 < length2) {\n if (this.reset) {\n this.reset = false;\n blocks[0] = this.block;\n for (i4 = 1; i4 < blockCount + 1; ++i4) {\n blocks[i4] = 0;\n }\n }\n if (notString) {\n for (i4 = this.start; index2 < length2 && i4 < byteCount; ++index2) {\n blocks[i4 >> 2] |= message[index2] << SHIFT[i4++ & 3];\n }\n } else {\n for (i4 = this.start; index2 < length2 && i4 < byteCount; ++index2) {\n code = message.charCodeAt(index2);\n if (code < 128) {\n blocks[i4 >> 2] |= code << SHIFT[i4++ & 3];\n } else if (code < 2048) {\n blocks[i4 >> 2] |= (192 | code >> 6) << SHIFT[i4++ & 3];\n blocks[i4 >> 2] |= (128 | code & 63) << SHIFT[i4++ & 3];\n } else if (code < 55296 || code >= 57344) {\n blocks[i4 >> 2] |= (224 | code >> 12) << SHIFT[i4++ & 3];\n blocks[i4 >> 2] |= (128 | code >> 6 & 63) << SHIFT[i4++ & 3];\n blocks[i4 >> 2] |= (128 | code & 63) << SHIFT[i4++ & 3];\n } else {\n code = 65536 + ((code & 1023) << 10 | message.charCodeAt(++index2) & 1023);\n blocks[i4 >> 2] |= (240 | code >> 18) << SHIFT[i4++ & 3];\n blocks[i4 >> 2] |= (128 | code >> 12 & 63) << SHIFT[i4++ & 3];\n blocks[i4 >> 2] |= (128 | code >> 6 & 63) << SHIFT[i4++ & 3];\n blocks[i4 >> 2] |= (128 | code & 63) << SHIFT[i4++ & 3];\n }\n }\n }\n this.lastByteIndex = i4;\n if (i4 >= byteCount) {\n this.start = i4 - byteCount;\n this.block = blocks[blockCount];\n for (i4 = 0; i4 < blockCount; ++i4) {\n s4[i4] ^= blocks[i4];\n }\n f6(s4);\n this.reset = true;\n } else {\n this.start = i4;\n }\n }\n return this;\n };\n Keccak3.prototype.encode = function(x4, right) {\n var o5 = x4 & 255, n2 = 1;\n var bytes = [o5];\n x4 = x4 >> 8;\n o5 = x4 & 255;\n while (o5 > 0) {\n bytes.unshift(o5);\n x4 = x4 >> 8;\n o5 = x4 & 255;\n ++n2;\n }\n if (right) {\n bytes.push(n2);\n } else {\n bytes.unshift(n2);\n }\n this.update(bytes);\n return bytes.length;\n };\n Keccak3.prototype.encodeString = function(str) {\n var notString, type = typeof str;\n if (type !== \"string\") {\n if (type === \"object\") {\n if (str === null) {\n throw new Error(INPUT_ERROR);\n } else if (ARRAY_BUFFER && str.constructor === ArrayBuffer) {\n str = new Uint8Array(str);\n } else if (!Array.isArray(str)) {\n if (!ARRAY_BUFFER || !ArrayBuffer.isView(str)) {\n throw new Error(INPUT_ERROR);\n }\n }\n } else {\n throw new Error(INPUT_ERROR);\n }\n notString = true;\n }\n var bytes = 0, length2 = str.length;\n if (notString) {\n bytes = length2;\n } else {\n for (var i4 = 0; i4 < str.length; ++i4) {\n var code = str.charCodeAt(i4);\n if (code < 128) {\n bytes += 1;\n } else if (code < 2048) {\n bytes += 2;\n } else if (code < 55296 || code >= 57344) {\n bytes += 3;\n } else {\n code = 65536 + ((code & 1023) << 10 | str.charCodeAt(++i4) & 1023);\n bytes += 4;\n }\n }\n }\n bytes += this.encode(bytes * 8);\n this.update(str);\n return bytes;\n };\n Keccak3.prototype.bytepad = function(strs, w3) {\n var bytes = this.encode(w3);\n for (var i4 = 0; i4 < strs.length; ++i4) {\n bytes += this.encodeString(strs[i4]);\n }\n var paddingBytes = w3 - bytes % w3;\n var zeros = [];\n zeros.length = paddingBytes;\n this.update(zeros);\n return this;\n };\n Keccak3.prototype.finalize = function() {\n if (this.finalized) {\n return;\n }\n this.finalized = true;\n var blocks = this.blocks, i4 = this.lastByteIndex, blockCount = this.blockCount, s4 = this.s;\n blocks[i4 >> 2] |= this.padding[i4 & 3];\n if (this.lastByteIndex === this.byteCount) {\n blocks[0] = blocks[blockCount];\n for (i4 = 1; i4 < blockCount + 1; ++i4) {\n blocks[i4] = 0;\n }\n }\n blocks[blockCount - 1] |= 2147483648;\n for (i4 = 0; i4 < blockCount; ++i4) {\n s4[i4] ^= blocks[i4];\n }\n f6(s4);\n };\n Keccak3.prototype.toString = Keccak3.prototype.hex = function() {\n this.finalize();\n var blockCount = this.blockCount, s4 = this.s, outputBlocks = this.outputBlocks, extraBytes = this.extraBytes, i4 = 0, j3 = 0;\n var hex = \"\", block;\n while (j3 < outputBlocks) {\n for (i4 = 0; i4 < blockCount && j3 < outputBlocks; ++i4, ++j3) {\n block = s4[i4];\n hex += HEX_CHARS[block >> 4 & 15] + HEX_CHARS[block & 15] + HEX_CHARS[block >> 12 & 15] + HEX_CHARS[block >> 8 & 15] + HEX_CHARS[block >> 20 & 15] + HEX_CHARS[block >> 16 & 15] + HEX_CHARS[block >> 28 & 15] + HEX_CHARS[block >> 24 & 15];\n }\n if (j3 % blockCount === 0) {\n f6(s4);\n i4 = 0;\n }\n }\n if (extraBytes) {\n block = s4[i4];\n hex += HEX_CHARS[block >> 4 & 15] + HEX_CHARS[block & 15];\n if (extraBytes > 1) {\n hex += HEX_CHARS[block >> 12 & 15] + HEX_CHARS[block >> 8 & 15];\n }\n if (extraBytes > 2) {\n hex += HEX_CHARS[block >> 20 & 15] + HEX_CHARS[block >> 16 & 15];\n }\n }\n return hex;\n };\n Keccak3.prototype.arrayBuffer = function() {\n this.finalize();\n var blockCount = this.blockCount, s4 = this.s, outputBlocks = this.outputBlocks, extraBytes = this.extraBytes, i4 = 0, j3 = 0;\n var bytes = this.outputBits >> 3;\n var buffer2;\n if (extraBytes) {\n buffer2 = new ArrayBuffer(outputBlocks + 1 << 2);\n } else {\n buffer2 = new ArrayBuffer(bytes);\n }\n var array2 = new Uint32Array(buffer2);\n while (j3 < outputBlocks) {\n for (i4 = 0; i4 < blockCount && j3 < outputBlocks; ++i4, ++j3) {\n array2[j3] = s4[i4];\n }\n if (j3 % blockCount === 0) {\n f6(s4);\n }\n }\n if (extraBytes) {\n array2[i4] = s4[i4];\n buffer2 = buffer2.slice(0, bytes);\n }\n return buffer2;\n };\n Keccak3.prototype.buffer = Keccak3.prototype.arrayBuffer;\n Keccak3.prototype.digest = Keccak3.prototype.array = function() {\n this.finalize();\n var blockCount = this.blockCount, s4 = this.s, outputBlocks = this.outputBlocks, extraBytes = this.extraBytes, i4 = 0, j3 = 0;\n var array2 = [], offset, block;\n while (j3 < outputBlocks) {\n for (i4 = 0; i4 < blockCount && j3 < outputBlocks; ++i4, ++j3) {\n offset = j3 << 2;\n block = s4[i4];\n array2[offset] = block & 255;\n array2[offset + 1] = block >> 8 & 255;\n array2[offset + 2] = block >> 16 & 255;\n array2[offset + 3] = block >> 24 & 255;\n }\n if (j3 % blockCount === 0) {\n f6(s4);\n }\n }\n if (extraBytes) {\n offset = j3 << 2;\n block = s4[i4];\n array2[offset] = block & 255;\n if (extraBytes > 1) {\n array2[offset + 1] = block >> 8 & 255;\n }\n if (extraBytes > 2) {\n array2[offset + 2] = block >> 16 & 255;\n }\n }\n return array2;\n };\n function Kmac(bits2, padding, outputBits) {\n Keccak3.call(this, bits2, padding, outputBits);\n }\n Kmac.prototype = new Keccak3();\n Kmac.prototype.finalize = function() {\n this.encode(this.outputBits, true);\n return Keccak3.prototype.finalize.call(this);\n };\n var f6 = function(s4) {\n var h4, l6, n2, c0, c1, c22, c32, c4, c5, c6, c7, c8, c9, b0, b1, b22, b32, b4, b5, b6, b7, b8, b9, b10, b11, b12, b13, b14, b15, b16, b17, b18, b19, b20, b21, b222, b23, b24, b25, b26, b27, b28, b29, b30, b31, b322, b33, b34, b35, b36, b37, b38, b39, b40, b41, b42, b43, b44, b45, b46, b47, b48, b49;\n for (n2 = 0; n2 < 48; n2 += 2) {\n c0 = s4[0] ^ s4[10] ^ s4[20] ^ s4[30] ^ s4[40];\n c1 = s4[1] ^ s4[11] ^ s4[21] ^ s4[31] ^ s4[41];\n c22 = s4[2] ^ s4[12] ^ s4[22] ^ s4[32] ^ s4[42];\n c32 = s4[3] ^ s4[13] ^ s4[23] ^ s4[33] ^ s4[43];\n c4 = s4[4] ^ s4[14] ^ s4[24] ^ s4[34] ^ s4[44];\n c5 = s4[5] ^ s4[15] ^ s4[25] ^ s4[35] ^ s4[45];\n c6 = s4[6] ^ s4[16] ^ s4[26] ^ s4[36] ^ s4[46];\n c7 = s4[7] ^ s4[17] ^ s4[27] ^ s4[37] ^ s4[47];\n c8 = s4[8] ^ s4[18] ^ s4[28] ^ s4[38] ^ s4[48];\n c9 = s4[9] ^ s4[19] ^ s4[29] ^ s4[39] ^ s4[49];\n h4 = c8 ^ (c22 << 1 | c32 >>> 31);\n l6 = c9 ^ (c32 << 1 | c22 >>> 31);\n s4[0] ^= h4;\n s4[1] ^= l6;\n s4[10] ^= h4;\n s4[11] ^= l6;\n s4[20] ^= h4;\n s4[21] ^= l6;\n s4[30] ^= h4;\n s4[31] ^= l6;\n s4[40] ^= h4;\n s4[41] ^= l6;\n h4 = c0 ^ (c4 << 1 | c5 >>> 31);\n l6 = c1 ^ (c5 << 1 | c4 >>> 31);\n s4[2] ^= h4;\n s4[3] ^= l6;\n s4[12] ^= h4;\n s4[13] ^= l6;\n s4[22] ^= h4;\n s4[23] ^= l6;\n s4[32] ^= h4;\n s4[33] ^= l6;\n s4[42] ^= h4;\n s4[43] ^= l6;\n h4 = c22 ^ (c6 << 1 | c7 >>> 31);\n l6 = c32 ^ (c7 << 1 | c6 >>> 31);\n s4[4] ^= h4;\n s4[5] ^= l6;\n s4[14] ^= h4;\n s4[15] ^= l6;\n s4[24] ^= h4;\n s4[25] ^= l6;\n s4[34] ^= h4;\n s4[35] ^= l6;\n s4[44] ^= h4;\n s4[45] ^= l6;\n h4 = c4 ^ (c8 << 1 | c9 >>> 31);\n l6 = c5 ^ (c9 << 1 | c8 >>> 31);\n s4[6] ^= h4;\n s4[7] ^= l6;\n s4[16] ^= h4;\n s4[17] ^= l6;\n s4[26] ^= h4;\n s4[27] ^= l6;\n s4[36] ^= h4;\n s4[37] ^= l6;\n s4[46] ^= h4;\n s4[47] ^= l6;\n h4 = c6 ^ (c0 << 1 | c1 >>> 31);\n l6 = c7 ^ (c1 << 1 | c0 >>> 31);\n s4[8] ^= h4;\n s4[9] ^= l6;\n s4[18] ^= h4;\n s4[19] ^= l6;\n s4[28] ^= h4;\n s4[29] ^= l6;\n s4[38] ^= h4;\n s4[39] ^= l6;\n s4[48] ^= h4;\n s4[49] ^= l6;\n b0 = s4[0];\n b1 = s4[1];\n b322 = s4[11] << 4 | s4[10] >>> 28;\n b33 = s4[10] << 4 | s4[11] >>> 28;\n b14 = s4[20] << 3 | s4[21] >>> 29;\n b15 = s4[21] << 3 | s4[20] >>> 29;\n b46 = s4[31] << 9 | s4[30] >>> 23;\n b47 = s4[30] << 9 | s4[31] >>> 23;\n b28 = s4[40] << 18 | s4[41] >>> 14;\n b29 = s4[41] << 18 | s4[40] >>> 14;\n b20 = s4[2] << 1 | s4[3] >>> 31;\n b21 = s4[3] << 1 | s4[2] >>> 31;\n b22 = s4[13] << 12 | s4[12] >>> 20;\n b32 = s4[12] << 12 | s4[13] >>> 20;\n b34 = s4[22] << 10 | s4[23] >>> 22;\n b35 = s4[23] << 10 | s4[22] >>> 22;\n b16 = s4[33] << 13 | s4[32] >>> 19;\n b17 = s4[32] << 13 | s4[33] >>> 19;\n b48 = s4[42] << 2 | s4[43] >>> 30;\n b49 = s4[43] << 2 | s4[42] >>> 30;\n b40 = s4[5] << 30 | s4[4] >>> 2;\n b41 = s4[4] << 30 | s4[5] >>> 2;\n b222 = s4[14] << 6 | s4[15] >>> 26;\n b23 = s4[15] << 6 | s4[14] >>> 26;\n b4 = s4[25] << 11 | s4[24] >>> 21;\n b5 = s4[24] << 11 | s4[25] >>> 21;\n b36 = s4[34] << 15 | s4[35] >>> 17;\n b37 = s4[35] << 15 | s4[34] >>> 17;\n b18 = s4[45] << 29 | s4[44] >>> 3;\n b19 = s4[44] << 29 | s4[45] >>> 3;\n b10 = s4[6] << 28 | s4[7] >>> 4;\n b11 = s4[7] << 28 | s4[6] >>> 4;\n b42 = s4[17] << 23 | s4[16] >>> 9;\n b43 = s4[16] << 23 | s4[17] >>> 9;\n b24 = s4[26] << 25 | s4[27] >>> 7;\n b25 = s4[27] << 25 | s4[26] >>> 7;\n b6 = s4[36] << 21 | s4[37] >>> 11;\n b7 = s4[37] << 21 | s4[36] >>> 11;\n b38 = s4[47] << 24 | s4[46] >>> 8;\n b39 = s4[46] << 24 | s4[47] >>> 8;\n b30 = s4[8] << 27 | s4[9] >>> 5;\n b31 = s4[9] << 27 | s4[8] >>> 5;\n b12 = s4[18] << 20 | s4[19] >>> 12;\n b13 = s4[19] << 20 | s4[18] >>> 12;\n b44 = s4[29] << 7 | s4[28] >>> 25;\n b45 = s4[28] << 7 | s4[29] >>> 25;\n b26 = s4[38] << 8 | s4[39] >>> 24;\n b27 = s4[39] << 8 | s4[38] >>> 24;\n b8 = s4[48] << 14 | s4[49] >>> 18;\n b9 = s4[49] << 14 | s4[48] >>> 18;\n s4[0] = b0 ^ ~b22 & b4;\n s4[1] = b1 ^ ~b32 & b5;\n s4[10] = b10 ^ ~b12 & b14;\n s4[11] = b11 ^ ~b13 & b15;\n s4[20] = b20 ^ ~b222 & b24;\n s4[21] = b21 ^ ~b23 & b25;\n s4[30] = b30 ^ ~b322 & b34;\n s4[31] = b31 ^ ~b33 & b35;\n s4[40] = b40 ^ ~b42 & b44;\n s4[41] = b41 ^ ~b43 & b45;\n s4[2] = b22 ^ ~b4 & b6;\n s4[3] = b32 ^ ~b5 & b7;\n s4[12] = b12 ^ ~b14 & b16;\n s4[13] = b13 ^ ~b15 & b17;\n s4[22] = b222 ^ ~b24 & b26;\n s4[23] = b23 ^ ~b25 & b27;\n s4[32] = b322 ^ ~b34 & b36;\n s4[33] = b33 ^ ~b35 & b37;\n s4[42] = b42 ^ ~b44 & b46;\n s4[43] = b43 ^ ~b45 & b47;\n s4[4] = b4 ^ ~b6 & b8;\n s4[5] = b5 ^ ~b7 & b9;\n s4[14] = b14 ^ ~b16 & b18;\n s4[15] = b15 ^ ~b17 & b19;\n s4[24] = b24 ^ ~b26 & b28;\n s4[25] = b25 ^ ~b27 & b29;\n s4[34] = b34 ^ ~b36 & b38;\n s4[35] = b35 ^ ~b37 & b39;\n s4[44] = b44 ^ ~b46 & b48;\n s4[45] = b45 ^ ~b47 & b49;\n s4[6] = b6 ^ ~b8 & b0;\n s4[7] = b7 ^ ~b9 & b1;\n s4[16] = b16 ^ ~b18 & b10;\n s4[17] = b17 ^ ~b19 & b11;\n s4[26] = b26 ^ ~b28 & b20;\n s4[27] = b27 ^ ~b29 & b21;\n s4[36] = b36 ^ ~b38 & b30;\n s4[37] = b37 ^ ~b39 & b31;\n s4[46] = b46 ^ ~b48 & b40;\n s4[47] = b47 ^ ~b49 & b41;\n s4[8] = b8 ^ ~b0 & b22;\n s4[9] = b9 ^ ~b1 & b32;\n s4[18] = b18 ^ ~b10 & b12;\n s4[19] = b19 ^ ~b11 & b13;\n s4[28] = b28 ^ ~b20 & b222;\n s4[29] = b29 ^ ~b21 & b23;\n s4[38] = b38 ^ ~b30 & b322;\n s4[39] = b39 ^ ~b31 & b33;\n s4[48] = b48 ^ ~b40 & b42;\n s4[49] = b49 ^ ~b41 & b43;\n s4[0] ^= RC[n2];\n s4[1] ^= RC[n2 + 1];\n }\n };\n if (COMMON_JS) {\n module.exports = methods;\n } else {\n for (i3 = 0; i3 < methodNames.length; ++i3) {\n root[methodNames[i3]] = methods[methodNames[i3]];\n }\n if (AMD) {\n define(function() {\n return methods;\n });\n }\n }\n })();\n }\n });\n\n // ../../../node_modules/.pnpm/@ethersproject+keccak256@5.8.0/node_modules/@ethersproject/keccak256/lib/index.js\n var require_lib5 = __commonJS({\n \"../../../node_modules/.pnpm/@ethersproject+keccak256@5.8.0/node_modules/@ethersproject/keccak256/lib/index.js\"(exports3) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n var __importDefault3 = exports3 && exports3.__importDefault || function(mod3) {\n return mod3 && mod3.__esModule ? mod3 : { \"default\": mod3 };\n };\n Object.defineProperty(exports3, \"__esModule\", { value: true });\n exports3.keccak256 = void 0;\n var js_sha3_1 = __importDefault3(require_sha3());\n var bytes_1 = require_lib2();\n function keccak2563(data) {\n return \"0x\" + js_sha3_1.default.keccak_256((0, bytes_1.arrayify)(data));\n }\n exports3.keccak256 = keccak2563;\n }\n });\n\n // ../../../node_modules/.pnpm/@ethersproject+rlp@5.8.0/node_modules/@ethersproject/rlp/lib/_version.js\n var require_version6 = __commonJS({\n \"../../../node_modules/.pnpm/@ethersproject+rlp@5.8.0/node_modules/@ethersproject/rlp/lib/_version.js\"(exports3) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n Object.defineProperty(exports3, \"__esModule\", { value: true });\n exports3.version = void 0;\n exports3.version = \"rlp/5.8.0\";\n }\n });\n\n // ../../../node_modules/.pnpm/@ethersproject+rlp@5.8.0/node_modules/@ethersproject/rlp/lib/index.js\n var require_lib6 = __commonJS({\n \"../../../node_modules/.pnpm/@ethersproject+rlp@5.8.0/node_modules/@ethersproject/rlp/lib/index.js\"(exports3) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n Object.defineProperty(exports3, \"__esModule\", { value: true });\n exports3.decode = exports3.encode = void 0;\n var bytes_1 = require_lib2();\n var logger_1 = require_lib();\n var _version_1 = require_version6();\n var logger = new logger_1.Logger(_version_1.version);\n function arrayifyInteger(value) {\n var result = [];\n while (value) {\n result.unshift(value & 255);\n value >>= 8;\n }\n return result;\n }\n function unarrayifyInteger(data, offset, length2) {\n var result = 0;\n for (var i3 = 0; i3 < length2; i3++) {\n result = result * 256 + data[offset + i3];\n }\n return result;\n }\n function _encode(object2) {\n if (Array.isArray(object2)) {\n var payload_1 = [];\n object2.forEach(function(child) {\n payload_1 = payload_1.concat(_encode(child));\n });\n if (payload_1.length <= 55) {\n payload_1.unshift(192 + payload_1.length);\n return payload_1;\n }\n var length_1 = arrayifyInteger(payload_1.length);\n length_1.unshift(247 + length_1.length);\n return length_1.concat(payload_1);\n }\n if (!(0, bytes_1.isBytesLike)(object2)) {\n logger.throwArgumentError(\"RLP object must be BytesLike\", \"object\", object2);\n }\n var data = Array.prototype.slice.call((0, bytes_1.arrayify)(object2));\n if (data.length === 1 && data[0] <= 127) {\n return data;\n } else if (data.length <= 55) {\n data.unshift(128 + data.length);\n return data;\n }\n var length2 = arrayifyInteger(data.length);\n length2.unshift(183 + length2.length);\n return length2.concat(data);\n }\n function encode6(object2) {\n return (0, bytes_1.hexlify)(_encode(object2));\n }\n exports3.encode = encode6;\n function _decodeChildren(data, offset, childOffset, length2) {\n var result = [];\n while (childOffset < offset + 1 + length2) {\n var decoded = _decode(data, childOffset);\n result.push(decoded.result);\n childOffset += decoded.consumed;\n if (childOffset > offset + 1 + length2) {\n logger.throwError(\"child data too short\", logger_1.Logger.errors.BUFFER_OVERRUN, {});\n }\n }\n return { consumed: 1 + length2, result };\n }\n function _decode(data, offset) {\n if (data.length === 0) {\n logger.throwError(\"data too short\", logger_1.Logger.errors.BUFFER_OVERRUN, {});\n }\n if (data[offset] >= 248) {\n var lengthLength = data[offset] - 247;\n if (offset + 1 + lengthLength > data.length) {\n logger.throwError(\"data short segment too short\", logger_1.Logger.errors.BUFFER_OVERRUN, {});\n }\n var length_2 = unarrayifyInteger(data, offset + 1, lengthLength);\n if (offset + 1 + lengthLength + length_2 > data.length) {\n logger.throwError(\"data long segment too short\", logger_1.Logger.errors.BUFFER_OVERRUN, {});\n }\n return _decodeChildren(data, offset, offset + 1 + lengthLength, lengthLength + length_2);\n } else if (data[offset] >= 192) {\n var length_3 = data[offset] - 192;\n if (offset + 1 + length_3 > data.length) {\n logger.throwError(\"data array too short\", logger_1.Logger.errors.BUFFER_OVERRUN, {});\n }\n return _decodeChildren(data, offset, offset + 1, length_3);\n } else if (data[offset] >= 184) {\n var lengthLength = data[offset] - 183;\n if (offset + 1 + lengthLength > data.length) {\n logger.throwError(\"data array too short\", logger_1.Logger.errors.BUFFER_OVERRUN, {});\n }\n var length_4 = unarrayifyInteger(data, offset + 1, lengthLength);\n if (offset + 1 + lengthLength + length_4 > data.length) {\n logger.throwError(\"data array too short\", logger_1.Logger.errors.BUFFER_OVERRUN, {});\n }\n var result = (0, bytes_1.hexlify)(data.slice(offset + 1 + lengthLength, offset + 1 + lengthLength + length_4));\n return { consumed: 1 + lengthLength + length_4, result };\n } else if (data[offset] >= 128) {\n var length_5 = data[offset] - 128;\n if (offset + 1 + length_5 > data.length) {\n logger.throwError(\"data too short\", logger_1.Logger.errors.BUFFER_OVERRUN, {});\n }\n var result = (0, bytes_1.hexlify)(data.slice(offset + 1, offset + 1 + length_5));\n return { consumed: 1 + length_5, result };\n }\n return { consumed: 1, result: (0, bytes_1.hexlify)(data[offset]) };\n }\n function decode2(data) {\n var bytes = (0, bytes_1.arrayify)(data);\n var decoded = _decode(bytes, 0);\n if (decoded.consumed !== bytes.length) {\n logger.throwArgumentError(\"invalid rlp data\", \"data\", data);\n }\n return decoded.result;\n }\n exports3.decode = decode2;\n }\n });\n\n // ../../../node_modules/.pnpm/@ethersproject+address@5.8.0/node_modules/@ethersproject/address/lib/_version.js\n var require_version7 = __commonJS({\n \"../../../node_modules/.pnpm/@ethersproject+address@5.8.0/node_modules/@ethersproject/address/lib/_version.js\"(exports3) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n Object.defineProperty(exports3, \"__esModule\", { value: true });\n exports3.version = void 0;\n exports3.version = \"address/5.8.0\";\n }\n });\n\n // ../../../node_modules/.pnpm/@ethersproject+address@5.8.0/node_modules/@ethersproject/address/lib/index.js\n var require_lib7 = __commonJS({\n \"../../../node_modules/.pnpm/@ethersproject+address@5.8.0/node_modules/@ethersproject/address/lib/index.js\"(exports3) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n Object.defineProperty(exports3, \"__esModule\", { value: true });\n exports3.getCreate2Address = exports3.getContractAddress = exports3.getIcapAddress = exports3.isAddress = exports3.getAddress = void 0;\n var bytes_1 = require_lib2();\n var bignumber_1 = require_lib3();\n var keccak256_1 = require_lib5();\n var rlp_1 = require_lib6();\n var logger_1 = require_lib();\n var _version_1 = require_version7();\n var logger = new logger_1.Logger(_version_1.version);\n function getChecksumAddress(address) {\n if (!(0, bytes_1.isHexString)(address, 20)) {\n logger.throwArgumentError(\"invalid address\", \"address\", address);\n }\n address = address.toLowerCase();\n var chars = address.substring(2).split(\"\");\n var expanded = new Uint8Array(40);\n for (var i4 = 0; i4 < 40; i4++) {\n expanded[i4] = chars[i4].charCodeAt(0);\n }\n var hashed = (0, bytes_1.arrayify)((0, keccak256_1.keccak256)(expanded));\n for (var i4 = 0; i4 < 40; i4 += 2) {\n if (hashed[i4 >> 1] >> 4 >= 8) {\n chars[i4] = chars[i4].toUpperCase();\n }\n if ((hashed[i4 >> 1] & 15) >= 8) {\n chars[i4 + 1] = chars[i4 + 1].toUpperCase();\n }\n }\n return \"0x\" + chars.join(\"\");\n }\n var MAX_SAFE_INTEGER = 9007199254740991;\n function log10(x4) {\n if (Math.log10) {\n return Math.log10(x4);\n }\n return Math.log(x4) / Math.LN10;\n }\n var ibanLookup = {};\n for (i3 = 0; i3 < 10; i3++) {\n ibanLookup[String(i3)] = String(i3);\n }\n var i3;\n for (i3 = 0; i3 < 26; i3++) {\n ibanLookup[String.fromCharCode(65 + i3)] = String(10 + i3);\n }\n var i3;\n var safeDigits = Math.floor(log10(MAX_SAFE_INTEGER));\n function ibanChecksum(address) {\n address = address.toUpperCase();\n address = address.substring(4) + address.substring(0, 2) + \"00\";\n var expanded = address.split(\"\").map(function(c4) {\n return ibanLookup[c4];\n }).join(\"\");\n while (expanded.length >= safeDigits) {\n var block = expanded.substring(0, safeDigits);\n expanded = parseInt(block, 10) % 97 + expanded.substring(block.length);\n }\n var checksum4 = String(98 - parseInt(expanded, 10) % 97);\n while (checksum4.length < 2) {\n checksum4 = \"0\" + checksum4;\n }\n return checksum4;\n }\n function getAddress3(address) {\n var result = null;\n if (typeof address !== \"string\") {\n logger.throwArgumentError(\"invalid address\", \"address\", address);\n }\n if (address.match(/^(0x)?[0-9a-fA-F]{40}$/)) {\n if (address.substring(0, 2) !== \"0x\") {\n address = \"0x\" + address;\n }\n result = getChecksumAddress(address);\n if (address.match(/([A-F].*[a-f])|([a-f].*[A-F])/) && result !== address) {\n logger.throwArgumentError(\"bad address checksum\", \"address\", address);\n }\n } else if (address.match(/^XE[0-9]{2}[0-9A-Za-z]{30,31}$/)) {\n if (address.substring(2, 4) !== ibanChecksum(address)) {\n logger.throwArgumentError(\"bad icap checksum\", \"address\", address);\n }\n result = (0, bignumber_1._base36To16)(address.substring(4));\n while (result.length < 40) {\n result = \"0\" + result;\n }\n result = getChecksumAddress(\"0x\" + result);\n } else {\n logger.throwArgumentError(\"invalid address\", \"address\", address);\n }\n return result;\n }\n exports3.getAddress = getAddress3;\n function isAddress2(address) {\n try {\n getAddress3(address);\n return true;\n } catch (error) {\n }\n return false;\n }\n exports3.isAddress = isAddress2;\n function getIcapAddress(address) {\n var base36 = (0, bignumber_1._base16To36)(getAddress3(address).substring(2)).toUpperCase();\n while (base36.length < 30) {\n base36 = \"0\" + base36;\n }\n return \"XE\" + ibanChecksum(\"XE00\" + base36) + base36;\n }\n exports3.getIcapAddress = getIcapAddress;\n function getContractAddress3(transaction) {\n var from14 = null;\n try {\n from14 = getAddress3(transaction.from);\n } catch (error) {\n logger.throwArgumentError(\"missing from address\", \"transaction\", transaction);\n }\n var nonce = (0, bytes_1.stripZeros)((0, bytes_1.arrayify)(bignumber_1.BigNumber.from(transaction.nonce).toHexString()));\n return getAddress3((0, bytes_1.hexDataSlice)((0, keccak256_1.keccak256)((0, rlp_1.encode)([from14, nonce])), 12));\n }\n exports3.getContractAddress = getContractAddress3;\n function getCreate2Address2(from14, salt, initCodeHash) {\n if ((0, bytes_1.hexDataLength)(salt) !== 32) {\n logger.throwArgumentError(\"salt must be 32 bytes\", \"salt\", salt);\n }\n if ((0, bytes_1.hexDataLength)(initCodeHash) !== 32) {\n logger.throwArgumentError(\"initCodeHash must be 32 bytes\", \"initCodeHash\", initCodeHash);\n }\n return getAddress3((0, bytes_1.hexDataSlice)((0, keccak256_1.keccak256)((0, bytes_1.concat)([\"0xff\", getAddress3(from14), salt, initCodeHash])), 12));\n }\n exports3.getCreate2Address = getCreate2Address2;\n }\n });\n\n // ../../../node_modules/.pnpm/@ethersproject+abi@5.8.0/node_modules/@ethersproject/abi/lib/coders/address.js\n var require_address = __commonJS({\n \"../../../node_modules/.pnpm/@ethersproject+abi@5.8.0/node_modules/@ethersproject/abi/lib/coders/address.js\"(exports3) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n var __extends3 = exports3 && exports3.__extends || /* @__PURE__ */ function() {\n var extendStatics3 = function(d5, b4) {\n extendStatics3 = Object.setPrototypeOf || { __proto__: [] } instanceof Array && function(d6, b5) {\n d6.__proto__ = b5;\n } || function(d6, b5) {\n for (var p4 in b5)\n if (Object.prototype.hasOwnProperty.call(b5, p4))\n d6[p4] = b5[p4];\n };\n return extendStatics3(d5, b4);\n };\n return function(d5, b4) {\n if (typeof b4 !== \"function\" && b4 !== null)\n throw new TypeError(\"Class extends value \" + String(b4) + \" is not a constructor or null\");\n extendStatics3(d5, b4);\n function __() {\n this.constructor = d5;\n }\n d5.prototype = b4 === null ? Object.create(b4) : (__.prototype = b4.prototype, new __());\n };\n }();\n Object.defineProperty(exports3, \"__esModule\", { value: true });\n exports3.AddressCoder = void 0;\n var address_1 = require_lib7();\n var bytes_1 = require_lib2();\n var abstract_coder_1 = require_abstract_coder();\n var AddressCoder = (\n /** @class */\n function(_super) {\n __extends3(AddressCoder2, _super);\n function AddressCoder2(localName) {\n return _super.call(this, \"address\", \"address\", localName, false) || this;\n }\n AddressCoder2.prototype.defaultValue = function() {\n return \"0x0000000000000000000000000000000000000000\";\n };\n AddressCoder2.prototype.encode = function(writer, value) {\n try {\n value = (0, address_1.getAddress)(value);\n } catch (error) {\n this._throwError(error.message, value);\n }\n return writer.writeValue(value);\n };\n AddressCoder2.prototype.decode = function(reader) {\n return (0, address_1.getAddress)((0, bytes_1.hexZeroPad)(reader.readValue().toHexString(), 20));\n };\n return AddressCoder2;\n }(abstract_coder_1.Coder)\n );\n exports3.AddressCoder = AddressCoder;\n }\n });\n\n // ../../../node_modules/.pnpm/@ethersproject+abi@5.8.0/node_modules/@ethersproject/abi/lib/coders/anonymous.js\n var require_anonymous = __commonJS({\n \"../../../node_modules/.pnpm/@ethersproject+abi@5.8.0/node_modules/@ethersproject/abi/lib/coders/anonymous.js\"(exports3) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n var __extends3 = exports3 && exports3.__extends || /* @__PURE__ */ function() {\n var extendStatics3 = function(d5, b4) {\n extendStatics3 = Object.setPrototypeOf || { __proto__: [] } instanceof Array && function(d6, b5) {\n d6.__proto__ = b5;\n } || function(d6, b5) {\n for (var p4 in b5)\n if (Object.prototype.hasOwnProperty.call(b5, p4))\n d6[p4] = b5[p4];\n };\n return extendStatics3(d5, b4);\n };\n return function(d5, b4) {\n if (typeof b4 !== \"function\" && b4 !== null)\n throw new TypeError(\"Class extends value \" + String(b4) + \" is not a constructor or null\");\n extendStatics3(d5, b4);\n function __() {\n this.constructor = d5;\n }\n d5.prototype = b4 === null ? Object.create(b4) : (__.prototype = b4.prototype, new __());\n };\n }();\n Object.defineProperty(exports3, \"__esModule\", { value: true });\n exports3.AnonymousCoder = void 0;\n var abstract_coder_1 = require_abstract_coder();\n var AnonymousCoder = (\n /** @class */\n function(_super) {\n __extends3(AnonymousCoder2, _super);\n function AnonymousCoder2(coder) {\n var _this = _super.call(this, coder.name, coder.type, void 0, coder.dynamic) || this;\n _this.coder = coder;\n return _this;\n }\n AnonymousCoder2.prototype.defaultValue = function() {\n return this.coder.defaultValue();\n };\n AnonymousCoder2.prototype.encode = function(writer, value) {\n return this.coder.encode(writer, value);\n };\n AnonymousCoder2.prototype.decode = function(reader) {\n return this.coder.decode(reader);\n };\n return AnonymousCoder2;\n }(abstract_coder_1.Coder)\n );\n exports3.AnonymousCoder = AnonymousCoder;\n }\n });\n\n // ../../../node_modules/.pnpm/@ethersproject+abi@5.8.0/node_modules/@ethersproject/abi/lib/coders/array.js\n var require_array = __commonJS({\n \"../../../node_modules/.pnpm/@ethersproject+abi@5.8.0/node_modules/@ethersproject/abi/lib/coders/array.js\"(exports3) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n var __extends3 = exports3 && exports3.__extends || /* @__PURE__ */ function() {\n var extendStatics3 = function(d5, b4) {\n extendStatics3 = Object.setPrototypeOf || { __proto__: [] } instanceof Array && function(d6, b5) {\n d6.__proto__ = b5;\n } || function(d6, b5) {\n for (var p4 in b5)\n if (Object.prototype.hasOwnProperty.call(b5, p4))\n d6[p4] = b5[p4];\n };\n return extendStatics3(d5, b4);\n };\n return function(d5, b4) {\n if (typeof b4 !== \"function\" && b4 !== null)\n throw new TypeError(\"Class extends value \" + String(b4) + \" is not a constructor or null\");\n extendStatics3(d5, b4);\n function __() {\n this.constructor = d5;\n }\n d5.prototype = b4 === null ? Object.create(b4) : (__.prototype = b4.prototype, new __());\n };\n }();\n Object.defineProperty(exports3, \"__esModule\", { value: true });\n exports3.ArrayCoder = exports3.unpack = exports3.pack = void 0;\n var logger_1 = require_lib();\n var _version_1 = require_version5();\n var logger = new logger_1.Logger(_version_1.version);\n var abstract_coder_1 = require_abstract_coder();\n var anonymous_1 = require_anonymous();\n function pack(writer, coders, values) {\n var arrayValues = null;\n if (Array.isArray(values)) {\n arrayValues = values;\n } else if (values && typeof values === \"object\") {\n var unique_1 = {};\n arrayValues = coders.map(function(coder) {\n var name = coder.localName;\n if (!name) {\n logger.throwError(\"cannot encode object for signature with missing names\", logger_1.Logger.errors.INVALID_ARGUMENT, {\n argument: \"values\",\n coder,\n value: values\n });\n }\n if (unique_1[name]) {\n logger.throwError(\"cannot encode object for signature with duplicate names\", logger_1.Logger.errors.INVALID_ARGUMENT, {\n argument: \"values\",\n coder,\n value: values\n });\n }\n unique_1[name] = true;\n return values[name];\n });\n } else {\n logger.throwArgumentError(\"invalid tuple value\", \"tuple\", values);\n }\n if (coders.length !== arrayValues.length) {\n logger.throwArgumentError(\"types/value length mismatch\", \"tuple\", values);\n }\n var staticWriter = new abstract_coder_1.Writer(writer.wordSize);\n var dynamicWriter = new abstract_coder_1.Writer(writer.wordSize);\n var updateFuncs = [];\n coders.forEach(function(coder, index2) {\n var value = arrayValues[index2];\n if (coder.dynamic) {\n var dynamicOffset_1 = dynamicWriter.length;\n coder.encode(dynamicWriter, value);\n var updateFunc_1 = staticWriter.writeUpdatableValue();\n updateFuncs.push(function(baseOffset) {\n updateFunc_1(baseOffset + dynamicOffset_1);\n });\n } else {\n coder.encode(staticWriter, value);\n }\n });\n updateFuncs.forEach(function(func) {\n func(staticWriter.length);\n });\n var length2 = writer.appendWriter(staticWriter);\n length2 += writer.appendWriter(dynamicWriter);\n return length2;\n }\n exports3.pack = pack;\n function unpack(reader, coders) {\n var values = [];\n var baseReader = reader.subReader(0);\n coders.forEach(function(coder) {\n var value = null;\n if (coder.dynamic) {\n var offset = reader.readValue();\n var offsetReader = baseReader.subReader(offset.toNumber());\n try {\n value = coder.decode(offsetReader);\n } catch (error) {\n if (error.code === logger_1.Logger.errors.BUFFER_OVERRUN) {\n throw error;\n }\n value = error;\n value.baseType = coder.name;\n value.name = coder.localName;\n value.type = coder.type;\n }\n } else {\n try {\n value = coder.decode(reader);\n } catch (error) {\n if (error.code === logger_1.Logger.errors.BUFFER_OVERRUN) {\n throw error;\n }\n value = error;\n value.baseType = coder.name;\n value.name = coder.localName;\n value.type = coder.type;\n }\n }\n if (value != void 0) {\n values.push(value);\n }\n });\n var uniqueNames = coders.reduce(function(accum, coder) {\n var name = coder.localName;\n if (name) {\n if (!accum[name]) {\n accum[name] = 0;\n }\n accum[name]++;\n }\n return accum;\n }, {});\n coders.forEach(function(coder, index2) {\n var name = coder.localName;\n if (!name || uniqueNames[name] !== 1) {\n return;\n }\n if (name === \"length\") {\n name = \"_length\";\n }\n if (values[name] != null) {\n return;\n }\n var value = values[index2];\n if (value instanceof Error) {\n Object.defineProperty(values, name, {\n enumerable: true,\n get: function() {\n throw value;\n }\n });\n } else {\n values[name] = value;\n }\n });\n var _loop_1 = function(i4) {\n var value = values[i4];\n if (value instanceof Error) {\n Object.defineProperty(values, i4, {\n enumerable: true,\n get: function() {\n throw value;\n }\n });\n }\n };\n for (var i3 = 0; i3 < values.length; i3++) {\n _loop_1(i3);\n }\n return Object.freeze(values);\n }\n exports3.unpack = unpack;\n var ArrayCoder = (\n /** @class */\n function(_super) {\n __extends3(ArrayCoder2, _super);\n function ArrayCoder2(coder, length2, localName) {\n var _this = this;\n var type = coder.type + \"[\" + (length2 >= 0 ? length2 : \"\") + \"]\";\n var dynamic = length2 === -1 || coder.dynamic;\n _this = _super.call(this, \"array\", type, localName, dynamic) || this;\n _this.coder = coder;\n _this.length = length2;\n return _this;\n }\n ArrayCoder2.prototype.defaultValue = function() {\n var defaultChild = this.coder.defaultValue();\n var result = [];\n for (var i3 = 0; i3 < this.length; i3++) {\n result.push(defaultChild);\n }\n return result;\n };\n ArrayCoder2.prototype.encode = function(writer, value) {\n if (!Array.isArray(value)) {\n this._throwError(\"expected array value\", value);\n }\n var count = this.length;\n if (count === -1) {\n count = value.length;\n writer.writeValue(value.length);\n }\n logger.checkArgumentCount(value.length, count, \"coder array\" + (this.localName ? \" \" + this.localName : \"\"));\n var coders = [];\n for (var i3 = 0; i3 < value.length; i3++) {\n coders.push(this.coder);\n }\n return pack(writer, coders, value);\n };\n ArrayCoder2.prototype.decode = function(reader) {\n var count = this.length;\n if (count === -1) {\n count = reader.readValue().toNumber();\n if (count * 32 > reader._data.length) {\n logger.throwError(\"insufficient data length\", logger_1.Logger.errors.BUFFER_OVERRUN, {\n length: reader._data.length,\n count\n });\n }\n }\n var coders = [];\n for (var i3 = 0; i3 < count; i3++) {\n coders.push(new anonymous_1.AnonymousCoder(this.coder));\n }\n return reader.coerce(this.name, unpack(reader, coders));\n };\n return ArrayCoder2;\n }(abstract_coder_1.Coder)\n );\n exports3.ArrayCoder = ArrayCoder;\n }\n });\n\n // ../../../node_modules/.pnpm/@ethersproject+abi@5.8.0/node_modules/@ethersproject/abi/lib/coders/boolean.js\n var require_boolean = __commonJS({\n \"../../../node_modules/.pnpm/@ethersproject+abi@5.8.0/node_modules/@ethersproject/abi/lib/coders/boolean.js\"(exports3) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n var __extends3 = exports3 && exports3.__extends || /* @__PURE__ */ function() {\n var extendStatics3 = function(d5, b4) {\n extendStatics3 = Object.setPrototypeOf || { __proto__: [] } instanceof Array && function(d6, b5) {\n d6.__proto__ = b5;\n } || function(d6, b5) {\n for (var p4 in b5)\n if (Object.prototype.hasOwnProperty.call(b5, p4))\n d6[p4] = b5[p4];\n };\n return extendStatics3(d5, b4);\n };\n return function(d5, b4) {\n if (typeof b4 !== \"function\" && b4 !== null)\n throw new TypeError(\"Class extends value \" + String(b4) + \" is not a constructor or null\");\n extendStatics3(d5, b4);\n function __() {\n this.constructor = d5;\n }\n d5.prototype = b4 === null ? Object.create(b4) : (__.prototype = b4.prototype, new __());\n };\n }();\n Object.defineProperty(exports3, \"__esModule\", { value: true });\n exports3.BooleanCoder = void 0;\n var abstract_coder_1 = require_abstract_coder();\n var BooleanCoder = (\n /** @class */\n function(_super) {\n __extends3(BooleanCoder2, _super);\n function BooleanCoder2(localName) {\n return _super.call(this, \"bool\", \"bool\", localName, false) || this;\n }\n BooleanCoder2.prototype.defaultValue = function() {\n return false;\n };\n BooleanCoder2.prototype.encode = function(writer, value) {\n return writer.writeValue(value ? 1 : 0);\n };\n BooleanCoder2.prototype.decode = function(reader) {\n return reader.coerce(this.type, !reader.readValue().isZero());\n };\n return BooleanCoder2;\n }(abstract_coder_1.Coder)\n );\n exports3.BooleanCoder = BooleanCoder;\n }\n });\n\n // ../../../node_modules/.pnpm/@ethersproject+abi@5.8.0/node_modules/@ethersproject/abi/lib/coders/bytes.js\n var require_bytes = __commonJS({\n \"../../../node_modules/.pnpm/@ethersproject+abi@5.8.0/node_modules/@ethersproject/abi/lib/coders/bytes.js\"(exports3) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n var __extends3 = exports3 && exports3.__extends || /* @__PURE__ */ function() {\n var extendStatics3 = function(d5, b4) {\n extendStatics3 = Object.setPrototypeOf || { __proto__: [] } instanceof Array && function(d6, b5) {\n d6.__proto__ = b5;\n } || function(d6, b5) {\n for (var p4 in b5)\n if (Object.prototype.hasOwnProperty.call(b5, p4))\n d6[p4] = b5[p4];\n };\n return extendStatics3(d5, b4);\n };\n return function(d5, b4) {\n if (typeof b4 !== \"function\" && b4 !== null)\n throw new TypeError(\"Class extends value \" + String(b4) + \" is not a constructor or null\");\n extendStatics3(d5, b4);\n function __() {\n this.constructor = d5;\n }\n d5.prototype = b4 === null ? Object.create(b4) : (__.prototype = b4.prototype, new __());\n };\n }();\n Object.defineProperty(exports3, \"__esModule\", { value: true });\n exports3.BytesCoder = exports3.DynamicBytesCoder = void 0;\n var bytes_1 = require_lib2();\n var abstract_coder_1 = require_abstract_coder();\n var DynamicBytesCoder = (\n /** @class */\n function(_super) {\n __extends3(DynamicBytesCoder2, _super);\n function DynamicBytesCoder2(type, localName) {\n return _super.call(this, type, type, localName, true) || this;\n }\n DynamicBytesCoder2.prototype.defaultValue = function() {\n return \"0x\";\n };\n DynamicBytesCoder2.prototype.encode = function(writer, value) {\n value = (0, bytes_1.arrayify)(value);\n var length2 = writer.writeValue(value.length);\n length2 += writer.writeBytes(value);\n return length2;\n };\n DynamicBytesCoder2.prototype.decode = function(reader) {\n return reader.readBytes(reader.readValue().toNumber(), true);\n };\n return DynamicBytesCoder2;\n }(abstract_coder_1.Coder)\n );\n exports3.DynamicBytesCoder = DynamicBytesCoder;\n var BytesCoder = (\n /** @class */\n function(_super) {\n __extends3(BytesCoder2, _super);\n function BytesCoder2(localName) {\n return _super.call(this, \"bytes\", localName) || this;\n }\n BytesCoder2.prototype.decode = function(reader) {\n return reader.coerce(this.name, (0, bytes_1.hexlify)(_super.prototype.decode.call(this, reader)));\n };\n return BytesCoder2;\n }(DynamicBytesCoder)\n );\n exports3.BytesCoder = BytesCoder;\n }\n });\n\n // ../../../node_modules/.pnpm/@ethersproject+abi@5.8.0/node_modules/@ethersproject/abi/lib/coders/fixed-bytes.js\n var require_fixed_bytes = __commonJS({\n \"../../../node_modules/.pnpm/@ethersproject+abi@5.8.0/node_modules/@ethersproject/abi/lib/coders/fixed-bytes.js\"(exports3) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n var __extends3 = exports3 && exports3.__extends || /* @__PURE__ */ function() {\n var extendStatics3 = function(d5, b4) {\n extendStatics3 = Object.setPrototypeOf || { __proto__: [] } instanceof Array && function(d6, b5) {\n d6.__proto__ = b5;\n } || function(d6, b5) {\n for (var p4 in b5)\n if (Object.prototype.hasOwnProperty.call(b5, p4))\n d6[p4] = b5[p4];\n };\n return extendStatics3(d5, b4);\n };\n return function(d5, b4) {\n if (typeof b4 !== \"function\" && b4 !== null)\n throw new TypeError(\"Class extends value \" + String(b4) + \" is not a constructor or null\");\n extendStatics3(d5, b4);\n function __() {\n this.constructor = d5;\n }\n d5.prototype = b4 === null ? Object.create(b4) : (__.prototype = b4.prototype, new __());\n };\n }();\n Object.defineProperty(exports3, \"__esModule\", { value: true });\n exports3.FixedBytesCoder = void 0;\n var bytes_1 = require_lib2();\n var abstract_coder_1 = require_abstract_coder();\n var FixedBytesCoder = (\n /** @class */\n function(_super) {\n __extends3(FixedBytesCoder2, _super);\n function FixedBytesCoder2(size6, localName) {\n var _this = this;\n var name = \"bytes\" + String(size6);\n _this = _super.call(this, name, name, localName, false) || this;\n _this.size = size6;\n return _this;\n }\n FixedBytesCoder2.prototype.defaultValue = function() {\n return \"0x0000000000000000000000000000000000000000000000000000000000000000\".substring(0, 2 + this.size * 2);\n };\n FixedBytesCoder2.prototype.encode = function(writer, value) {\n var data = (0, bytes_1.arrayify)(value);\n if (data.length !== this.size) {\n this._throwError(\"incorrect data length\", value);\n }\n return writer.writeBytes(data);\n };\n FixedBytesCoder2.prototype.decode = function(reader) {\n return reader.coerce(this.name, (0, bytes_1.hexlify)(reader.readBytes(this.size)));\n };\n return FixedBytesCoder2;\n }(abstract_coder_1.Coder)\n );\n exports3.FixedBytesCoder = FixedBytesCoder;\n }\n });\n\n // ../../../node_modules/.pnpm/@ethersproject+abi@5.8.0/node_modules/@ethersproject/abi/lib/coders/null.js\n var require_null = __commonJS({\n \"../../../node_modules/.pnpm/@ethersproject+abi@5.8.0/node_modules/@ethersproject/abi/lib/coders/null.js\"(exports3) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n var __extends3 = exports3 && exports3.__extends || /* @__PURE__ */ function() {\n var extendStatics3 = function(d5, b4) {\n extendStatics3 = Object.setPrototypeOf || { __proto__: [] } instanceof Array && function(d6, b5) {\n d6.__proto__ = b5;\n } || function(d6, b5) {\n for (var p4 in b5)\n if (Object.prototype.hasOwnProperty.call(b5, p4))\n d6[p4] = b5[p4];\n };\n return extendStatics3(d5, b4);\n };\n return function(d5, b4) {\n if (typeof b4 !== \"function\" && b4 !== null)\n throw new TypeError(\"Class extends value \" + String(b4) + \" is not a constructor or null\");\n extendStatics3(d5, b4);\n function __() {\n this.constructor = d5;\n }\n d5.prototype = b4 === null ? Object.create(b4) : (__.prototype = b4.prototype, new __());\n };\n }();\n Object.defineProperty(exports3, \"__esModule\", { value: true });\n exports3.NullCoder = void 0;\n var abstract_coder_1 = require_abstract_coder();\n var NullCoder = (\n /** @class */\n function(_super) {\n __extends3(NullCoder2, _super);\n function NullCoder2(localName) {\n return _super.call(this, \"null\", \"\", localName, false) || this;\n }\n NullCoder2.prototype.defaultValue = function() {\n return null;\n };\n NullCoder2.prototype.encode = function(writer, value) {\n if (value != null) {\n this._throwError(\"not null\", value);\n }\n return writer.writeBytes([]);\n };\n NullCoder2.prototype.decode = function(reader) {\n reader.readBytes(0);\n return reader.coerce(this.name, null);\n };\n return NullCoder2;\n }(abstract_coder_1.Coder)\n );\n exports3.NullCoder = NullCoder;\n }\n });\n\n // ../../../node_modules/.pnpm/@ethersproject+constants@5.8.0/node_modules/@ethersproject/constants/lib/addresses.js\n var require_addresses = __commonJS({\n \"../../../node_modules/.pnpm/@ethersproject+constants@5.8.0/node_modules/@ethersproject/constants/lib/addresses.js\"(exports3) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n Object.defineProperty(exports3, \"__esModule\", { value: true });\n exports3.AddressZero = void 0;\n exports3.AddressZero = \"0x0000000000000000000000000000000000000000\";\n }\n });\n\n // ../../../node_modules/.pnpm/@ethersproject+constants@5.8.0/node_modules/@ethersproject/constants/lib/bignumbers.js\n var require_bignumbers = __commonJS({\n \"../../../node_modules/.pnpm/@ethersproject+constants@5.8.0/node_modules/@ethersproject/constants/lib/bignumbers.js\"(exports3) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n Object.defineProperty(exports3, \"__esModule\", { value: true });\n exports3.MaxInt256 = exports3.MinInt256 = exports3.MaxUint256 = exports3.WeiPerEther = exports3.Two = exports3.One = exports3.Zero = exports3.NegativeOne = void 0;\n var bignumber_1 = require_lib3();\n var NegativeOne = /* @__PURE__ */ bignumber_1.BigNumber.from(-1);\n exports3.NegativeOne = NegativeOne;\n var Zero = /* @__PURE__ */ bignumber_1.BigNumber.from(0);\n exports3.Zero = Zero;\n var One = /* @__PURE__ */ bignumber_1.BigNumber.from(1);\n exports3.One = One;\n var Two = /* @__PURE__ */ bignumber_1.BigNumber.from(2);\n exports3.Two = Two;\n var WeiPerEther = /* @__PURE__ */ bignumber_1.BigNumber.from(\"1000000000000000000\");\n exports3.WeiPerEther = WeiPerEther;\n var MaxUint256 = /* @__PURE__ */ bignumber_1.BigNumber.from(\"0xffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff\");\n exports3.MaxUint256 = MaxUint256;\n var MinInt256 = /* @__PURE__ */ bignumber_1.BigNumber.from(\"-0x8000000000000000000000000000000000000000000000000000000000000000\");\n exports3.MinInt256 = MinInt256;\n var MaxInt256 = /* @__PURE__ */ bignumber_1.BigNumber.from(\"0x7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff\");\n exports3.MaxInt256 = MaxInt256;\n }\n });\n\n // ../../../node_modules/.pnpm/@ethersproject+constants@5.8.0/node_modules/@ethersproject/constants/lib/hashes.js\n var require_hashes = __commonJS({\n \"../../../node_modules/.pnpm/@ethersproject+constants@5.8.0/node_modules/@ethersproject/constants/lib/hashes.js\"(exports3) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n Object.defineProperty(exports3, \"__esModule\", { value: true });\n exports3.HashZero = void 0;\n exports3.HashZero = \"0x0000000000000000000000000000000000000000000000000000000000000000\";\n }\n });\n\n // ../../../node_modules/.pnpm/@ethersproject+constants@5.8.0/node_modules/@ethersproject/constants/lib/strings.js\n var require_strings = __commonJS({\n \"../../../node_modules/.pnpm/@ethersproject+constants@5.8.0/node_modules/@ethersproject/constants/lib/strings.js\"(exports3) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n Object.defineProperty(exports3, \"__esModule\", { value: true });\n exports3.EtherSymbol = void 0;\n exports3.EtherSymbol = \"\\u039E\";\n }\n });\n\n // ../../../node_modules/.pnpm/@ethersproject+constants@5.8.0/node_modules/@ethersproject/constants/lib/index.js\n var require_lib8 = __commonJS({\n \"../../../node_modules/.pnpm/@ethersproject+constants@5.8.0/node_modules/@ethersproject/constants/lib/index.js\"(exports3) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n Object.defineProperty(exports3, \"__esModule\", { value: true });\n exports3.EtherSymbol = exports3.HashZero = exports3.MaxInt256 = exports3.MinInt256 = exports3.MaxUint256 = exports3.WeiPerEther = exports3.Two = exports3.One = exports3.Zero = exports3.NegativeOne = exports3.AddressZero = void 0;\n var addresses_1 = require_addresses();\n Object.defineProperty(exports3, \"AddressZero\", { enumerable: true, get: function() {\n return addresses_1.AddressZero;\n } });\n var bignumbers_1 = require_bignumbers();\n Object.defineProperty(exports3, \"NegativeOne\", { enumerable: true, get: function() {\n return bignumbers_1.NegativeOne;\n } });\n Object.defineProperty(exports3, \"Zero\", { enumerable: true, get: function() {\n return bignumbers_1.Zero;\n } });\n Object.defineProperty(exports3, \"One\", { enumerable: true, get: function() {\n return bignumbers_1.One;\n } });\n Object.defineProperty(exports3, \"Two\", { enumerable: true, get: function() {\n return bignumbers_1.Two;\n } });\n Object.defineProperty(exports3, \"WeiPerEther\", { enumerable: true, get: function() {\n return bignumbers_1.WeiPerEther;\n } });\n Object.defineProperty(exports3, \"MaxUint256\", { enumerable: true, get: function() {\n return bignumbers_1.MaxUint256;\n } });\n Object.defineProperty(exports3, \"MinInt256\", { enumerable: true, get: function() {\n return bignumbers_1.MinInt256;\n } });\n Object.defineProperty(exports3, \"MaxInt256\", { enumerable: true, get: function() {\n return bignumbers_1.MaxInt256;\n } });\n var hashes_1 = require_hashes();\n Object.defineProperty(exports3, \"HashZero\", { enumerable: true, get: function() {\n return hashes_1.HashZero;\n } });\n var strings_1 = require_strings();\n Object.defineProperty(exports3, \"EtherSymbol\", { enumerable: true, get: function() {\n return strings_1.EtherSymbol;\n } });\n }\n });\n\n // ../../../node_modules/.pnpm/@ethersproject+abi@5.8.0/node_modules/@ethersproject/abi/lib/coders/number.js\n var require_number = __commonJS({\n \"../../../node_modules/.pnpm/@ethersproject+abi@5.8.0/node_modules/@ethersproject/abi/lib/coders/number.js\"(exports3) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n var __extends3 = exports3 && exports3.__extends || /* @__PURE__ */ function() {\n var extendStatics3 = function(d5, b4) {\n extendStatics3 = Object.setPrototypeOf || { __proto__: [] } instanceof Array && function(d6, b5) {\n d6.__proto__ = b5;\n } || function(d6, b5) {\n for (var p4 in b5)\n if (Object.prototype.hasOwnProperty.call(b5, p4))\n d6[p4] = b5[p4];\n };\n return extendStatics3(d5, b4);\n };\n return function(d5, b4) {\n if (typeof b4 !== \"function\" && b4 !== null)\n throw new TypeError(\"Class extends value \" + String(b4) + \" is not a constructor or null\");\n extendStatics3(d5, b4);\n function __() {\n this.constructor = d5;\n }\n d5.prototype = b4 === null ? Object.create(b4) : (__.prototype = b4.prototype, new __());\n };\n }();\n Object.defineProperty(exports3, \"__esModule\", { value: true });\n exports3.NumberCoder = void 0;\n var bignumber_1 = require_lib3();\n var constants_1 = require_lib8();\n var abstract_coder_1 = require_abstract_coder();\n var NumberCoder = (\n /** @class */\n function(_super) {\n __extends3(NumberCoder2, _super);\n function NumberCoder2(size6, signed, localName) {\n var _this = this;\n var name = (signed ? \"int\" : \"uint\") + size6 * 8;\n _this = _super.call(this, name, name, localName, false) || this;\n _this.size = size6;\n _this.signed = signed;\n return _this;\n }\n NumberCoder2.prototype.defaultValue = function() {\n return 0;\n };\n NumberCoder2.prototype.encode = function(writer, value) {\n var v2 = bignumber_1.BigNumber.from(value);\n var maxUintValue = constants_1.MaxUint256.mask(writer.wordSize * 8);\n if (this.signed) {\n var bounds = maxUintValue.mask(this.size * 8 - 1);\n if (v2.gt(bounds) || v2.lt(bounds.add(constants_1.One).mul(constants_1.NegativeOne))) {\n this._throwError(\"value out-of-bounds\", value);\n }\n } else if (v2.lt(constants_1.Zero) || v2.gt(maxUintValue.mask(this.size * 8))) {\n this._throwError(\"value out-of-bounds\", value);\n }\n v2 = v2.toTwos(this.size * 8).mask(this.size * 8);\n if (this.signed) {\n v2 = v2.fromTwos(this.size * 8).toTwos(8 * writer.wordSize);\n }\n return writer.writeValue(v2);\n };\n NumberCoder2.prototype.decode = function(reader) {\n var value = reader.readValue().mask(this.size * 8);\n if (this.signed) {\n value = value.fromTwos(this.size * 8);\n }\n return reader.coerce(this.name, value);\n };\n return NumberCoder2;\n }(abstract_coder_1.Coder)\n );\n exports3.NumberCoder = NumberCoder;\n }\n });\n\n // ../../../node_modules/.pnpm/@ethersproject+strings@5.8.0/node_modules/@ethersproject/strings/lib/_version.js\n var require_version8 = __commonJS({\n \"../../../node_modules/.pnpm/@ethersproject+strings@5.8.0/node_modules/@ethersproject/strings/lib/_version.js\"(exports3) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n Object.defineProperty(exports3, \"__esModule\", { value: true });\n exports3.version = void 0;\n exports3.version = \"strings/5.8.0\";\n }\n });\n\n // ../../../node_modules/.pnpm/@ethersproject+strings@5.8.0/node_modules/@ethersproject/strings/lib/utf8.js\n var require_utf8 = __commonJS({\n \"../../../node_modules/.pnpm/@ethersproject+strings@5.8.0/node_modules/@ethersproject/strings/lib/utf8.js\"(exports3) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n Object.defineProperty(exports3, \"__esModule\", { value: true });\n exports3.toUtf8CodePoints = exports3.toUtf8String = exports3._toUtf8String = exports3._toEscapedUtf8String = exports3.toUtf8Bytes = exports3.Utf8ErrorFuncs = exports3.Utf8ErrorReason = exports3.UnicodeNormalizationForm = void 0;\n var bytes_1 = require_lib2();\n var logger_1 = require_lib();\n var _version_1 = require_version8();\n var logger = new logger_1.Logger(_version_1.version);\n var UnicodeNormalizationForm;\n (function(UnicodeNormalizationForm2) {\n UnicodeNormalizationForm2[\"current\"] = \"\";\n UnicodeNormalizationForm2[\"NFC\"] = \"NFC\";\n UnicodeNormalizationForm2[\"NFD\"] = \"NFD\";\n UnicodeNormalizationForm2[\"NFKC\"] = \"NFKC\";\n UnicodeNormalizationForm2[\"NFKD\"] = \"NFKD\";\n })(UnicodeNormalizationForm = exports3.UnicodeNormalizationForm || (exports3.UnicodeNormalizationForm = {}));\n var Utf8ErrorReason;\n (function(Utf8ErrorReason2) {\n Utf8ErrorReason2[\"UNEXPECTED_CONTINUE\"] = \"unexpected continuation byte\";\n Utf8ErrorReason2[\"BAD_PREFIX\"] = \"bad codepoint prefix\";\n Utf8ErrorReason2[\"OVERRUN\"] = \"string overrun\";\n Utf8ErrorReason2[\"MISSING_CONTINUE\"] = \"missing continuation byte\";\n Utf8ErrorReason2[\"OUT_OF_RANGE\"] = \"out of UTF-8 range\";\n Utf8ErrorReason2[\"UTF16_SURROGATE\"] = \"UTF-16 surrogate\";\n Utf8ErrorReason2[\"OVERLONG\"] = \"overlong representation\";\n })(Utf8ErrorReason = exports3.Utf8ErrorReason || (exports3.Utf8ErrorReason = {}));\n function errorFunc(reason, offset, bytes, output, badCodepoint) {\n return logger.throwArgumentError(\"invalid codepoint at offset \" + offset + \"; \" + reason, \"bytes\", bytes);\n }\n function ignoreFunc(reason, offset, bytes, output, badCodepoint) {\n if (reason === Utf8ErrorReason.BAD_PREFIX || reason === Utf8ErrorReason.UNEXPECTED_CONTINUE) {\n var i3 = 0;\n for (var o5 = offset + 1; o5 < bytes.length; o5++) {\n if (bytes[o5] >> 6 !== 2) {\n break;\n }\n i3++;\n }\n return i3;\n }\n if (reason === Utf8ErrorReason.OVERRUN) {\n return bytes.length - offset - 1;\n }\n return 0;\n }\n function replaceFunc(reason, offset, bytes, output, badCodepoint) {\n if (reason === Utf8ErrorReason.OVERLONG) {\n output.push(badCodepoint);\n return 0;\n }\n output.push(65533);\n return ignoreFunc(reason, offset, bytes, output, badCodepoint);\n }\n exports3.Utf8ErrorFuncs = Object.freeze({\n error: errorFunc,\n ignore: ignoreFunc,\n replace: replaceFunc\n });\n function getUtf8CodePoints(bytes, onError) {\n if (onError == null) {\n onError = exports3.Utf8ErrorFuncs.error;\n }\n bytes = (0, bytes_1.arrayify)(bytes);\n var result = [];\n var i3 = 0;\n while (i3 < bytes.length) {\n var c4 = bytes[i3++];\n if (c4 >> 7 === 0) {\n result.push(c4);\n continue;\n }\n var extraLength = null;\n var overlongMask = null;\n if ((c4 & 224) === 192) {\n extraLength = 1;\n overlongMask = 127;\n } else if ((c4 & 240) === 224) {\n extraLength = 2;\n overlongMask = 2047;\n } else if ((c4 & 248) === 240) {\n extraLength = 3;\n overlongMask = 65535;\n } else {\n if ((c4 & 192) === 128) {\n i3 += onError(Utf8ErrorReason.UNEXPECTED_CONTINUE, i3 - 1, bytes, result);\n } else {\n i3 += onError(Utf8ErrorReason.BAD_PREFIX, i3 - 1, bytes, result);\n }\n continue;\n }\n if (i3 - 1 + extraLength >= bytes.length) {\n i3 += onError(Utf8ErrorReason.OVERRUN, i3 - 1, bytes, result);\n continue;\n }\n var res = c4 & (1 << 8 - extraLength - 1) - 1;\n for (var j2 = 0; j2 < extraLength; j2++) {\n var nextChar = bytes[i3];\n if ((nextChar & 192) != 128) {\n i3 += onError(Utf8ErrorReason.MISSING_CONTINUE, i3, bytes, result);\n res = null;\n break;\n }\n ;\n res = res << 6 | nextChar & 63;\n i3++;\n }\n if (res === null) {\n continue;\n }\n if (res > 1114111) {\n i3 += onError(Utf8ErrorReason.OUT_OF_RANGE, i3 - 1 - extraLength, bytes, result, res);\n continue;\n }\n if (res >= 55296 && res <= 57343) {\n i3 += onError(Utf8ErrorReason.UTF16_SURROGATE, i3 - 1 - extraLength, bytes, result, res);\n continue;\n }\n if (res <= overlongMask) {\n i3 += onError(Utf8ErrorReason.OVERLONG, i3 - 1 - extraLength, bytes, result, res);\n continue;\n }\n result.push(res);\n }\n return result;\n }\n function toUtf8Bytes(str, form) {\n if (form === void 0) {\n form = UnicodeNormalizationForm.current;\n }\n if (form != UnicodeNormalizationForm.current) {\n logger.checkNormalize();\n str = str.normalize(form);\n }\n var result = [];\n for (var i3 = 0; i3 < str.length; i3++) {\n var c4 = str.charCodeAt(i3);\n if (c4 < 128) {\n result.push(c4);\n } else if (c4 < 2048) {\n result.push(c4 >> 6 | 192);\n result.push(c4 & 63 | 128);\n } else if ((c4 & 64512) == 55296) {\n i3++;\n var c22 = str.charCodeAt(i3);\n if (i3 >= str.length || (c22 & 64512) !== 56320) {\n throw new Error(\"invalid utf-8 string\");\n }\n var pair = 65536 + ((c4 & 1023) << 10) + (c22 & 1023);\n result.push(pair >> 18 | 240);\n result.push(pair >> 12 & 63 | 128);\n result.push(pair >> 6 & 63 | 128);\n result.push(pair & 63 | 128);\n } else {\n result.push(c4 >> 12 | 224);\n result.push(c4 >> 6 & 63 | 128);\n result.push(c4 & 63 | 128);\n }\n }\n return (0, bytes_1.arrayify)(result);\n }\n exports3.toUtf8Bytes = toUtf8Bytes;\n function escapeChar(value) {\n var hex = \"0000\" + value.toString(16);\n return \"\\\\u\" + hex.substring(hex.length - 4);\n }\n function _toEscapedUtf8String(bytes, onError) {\n return '\"' + getUtf8CodePoints(bytes, onError).map(function(codePoint) {\n if (codePoint < 256) {\n switch (codePoint) {\n case 8:\n return \"\\\\b\";\n case 9:\n return \"\\\\t\";\n case 10:\n return \"\\\\n\";\n case 13:\n return \"\\\\r\";\n case 34:\n return '\\\\\"';\n case 92:\n return \"\\\\\\\\\";\n }\n if (codePoint >= 32 && codePoint < 127) {\n return String.fromCharCode(codePoint);\n }\n }\n if (codePoint <= 65535) {\n return escapeChar(codePoint);\n }\n codePoint -= 65536;\n return escapeChar((codePoint >> 10 & 1023) + 55296) + escapeChar((codePoint & 1023) + 56320);\n }).join(\"\") + '\"';\n }\n exports3._toEscapedUtf8String = _toEscapedUtf8String;\n function _toUtf8String(codePoints) {\n return codePoints.map(function(codePoint) {\n if (codePoint <= 65535) {\n return String.fromCharCode(codePoint);\n }\n codePoint -= 65536;\n return String.fromCharCode((codePoint >> 10 & 1023) + 55296, (codePoint & 1023) + 56320);\n }).join(\"\");\n }\n exports3._toUtf8String = _toUtf8String;\n function toUtf8String(bytes, onError) {\n return _toUtf8String(getUtf8CodePoints(bytes, onError));\n }\n exports3.toUtf8String = toUtf8String;\n function toUtf8CodePoints(str, form) {\n if (form === void 0) {\n form = UnicodeNormalizationForm.current;\n }\n return getUtf8CodePoints(toUtf8Bytes(str, form));\n }\n exports3.toUtf8CodePoints = toUtf8CodePoints;\n }\n });\n\n // ../../../node_modules/.pnpm/@ethersproject+strings@5.8.0/node_modules/@ethersproject/strings/lib/bytes32.js\n var require_bytes32 = __commonJS({\n \"../../../node_modules/.pnpm/@ethersproject+strings@5.8.0/node_modules/@ethersproject/strings/lib/bytes32.js\"(exports3) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n Object.defineProperty(exports3, \"__esModule\", { value: true });\n exports3.parseBytes32String = exports3.formatBytes32String = void 0;\n var constants_1 = require_lib8();\n var bytes_1 = require_lib2();\n var utf8_1 = require_utf8();\n function formatBytes32String(text) {\n var bytes = (0, utf8_1.toUtf8Bytes)(text);\n if (bytes.length > 31) {\n throw new Error(\"bytes32 string must be less than 32 bytes\");\n }\n return (0, bytes_1.hexlify)((0, bytes_1.concat)([bytes, constants_1.HashZero]).slice(0, 32));\n }\n exports3.formatBytes32String = formatBytes32String;\n function parseBytes32String(bytes) {\n var data = (0, bytes_1.arrayify)(bytes);\n if (data.length !== 32) {\n throw new Error(\"invalid bytes32 - not 32 bytes long\");\n }\n if (data[31] !== 0) {\n throw new Error(\"invalid bytes32 string - no null terminator\");\n }\n var length2 = 31;\n while (data[length2 - 1] === 0) {\n length2--;\n }\n return (0, utf8_1.toUtf8String)(data.slice(0, length2));\n }\n exports3.parseBytes32String = parseBytes32String;\n }\n });\n\n // ../../../node_modules/.pnpm/@ethersproject+strings@5.8.0/node_modules/@ethersproject/strings/lib/idna.js\n var require_idna = __commonJS({\n \"../../../node_modules/.pnpm/@ethersproject+strings@5.8.0/node_modules/@ethersproject/strings/lib/idna.js\"(exports3) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n Object.defineProperty(exports3, \"__esModule\", { value: true });\n exports3.nameprep = exports3._nameprepTableC = exports3._nameprepTableB2 = exports3._nameprepTableA1 = void 0;\n var utf8_1 = require_utf8();\n function bytes2(data) {\n if (data.length % 4 !== 0) {\n throw new Error(\"bad data\");\n }\n var result = [];\n for (var i3 = 0; i3 < data.length; i3 += 4) {\n result.push(parseInt(data.substring(i3, i3 + 4), 16));\n }\n return result;\n }\n function createTable(data, func) {\n if (!func) {\n func = function(value) {\n return [parseInt(value, 16)];\n };\n }\n var lo = 0;\n var result = {};\n data.split(\",\").forEach(function(pair) {\n var comps = pair.split(\":\");\n lo += parseInt(comps[0], 16);\n result[lo] = func(comps[1]);\n });\n return result;\n }\n function createRangeTable(data) {\n var hi = 0;\n return data.split(\",\").map(function(v2) {\n var comps = v2.split(\"-\");\n if (comps.length === 1) {\n comps[1] = \"0\";\n } else if (comps[1] === \"\") {\n comps[1] = \"1\";\n }\n var lo = hi + parseInt(comps[0], 16);\n hi = parseInt(comps[1], 16);\n return { l: lo, h: hi };\n });\n }\n function matchMap(value, ranges) {\n var lo = 0;\n for (var i3 = 0; i3 < ranges.length; i3++) {\n var range = ranges[i3];\n lo += range.l;\n if (value >= lo && value <= lo + range.h && (value - lo) % (range.d || 1) === 0) {\n if (range.e && range.e.indexOf(value - lo) !== -1) {\n continue;\n }\n return range;\n }\n }\n return null;\n }\n var Table_A_1_ranges = createRangeTable(\"221,13-1b,5f-,40-10,51-f,11-3,3-3,2-2,2-4,8,2,15,2d,28-8,88,48,27-,3-5,11-20,27-,8,28,3-5,12,18,b-a,1c-4,6-16,2-d,2-2,2,1b-4,17-9,8f-,10,f,1f-2,1c-34,33-14e,4,36-,13-,6-2,1a-f,4,9-,3-,17,8,2-2,5-,2,8-,3-,4-8,2-3,3,6-,16-6,2-,7-3,3-,17,8,3,3,3-,2,6-3,3-,4-a,5,2-6,10-b,4,8,2,4,17,8,3,6-,b,4,4-,2-e,2-4,b-10,4,9-,3-,17,8,3-,5-,9-2,3-,4-7,3-3,3,4-3,c-10,3,7-2,4,5-2,3,2,3-2,3-2,4-2,9,4-3,6-2,4,5-8,2-e,d-d,4,9,4,18,b,6-3,8,4,5-6,3-8,3-3,b-11,3,9,4,18,b,6-3,8,4,5-6,3-6,2,3-3,b-11,3,9,4,18,11-3,7-,4,5-8,2-7,3-3,b-11,3,13-2,19,a,2-,8-2,2-3,7,2,9-11,4-b,3b-3,1e-24,3,2-,3,2-,2-5,5,8,4,2,2-,3,e,4-,6,2,7-,b-,3-21,49,23-5,1c-3,9,25,10-,2-2f,23,6,3,8-2,5-5,1b-45,27-9,2a-,2-3,5b-4,45-4,53-5,8,40,2,5-,8,2,5-,28,2,5-,20,2,5-,8,2,5-,8,8,18,20,2,5-,8,28,14-5,1d-22,56-b,277-8,1e-2,52-e,e,8-a,18-8,15-b,e,4,3-b,5e-2,b-15,10,b-5,59-7,2b-555,9d-3,5b-5,17-,7-,27-,7-,9,2,2,2,20-,36,10,f-,7,14-,4,a,54-3,2-6,6-5,9-,1c-10,13-1d,1c-14,3c-,10-6,32-b,240-30,28-18,c-14,a0,115-,3,66-,b-76,5,5-,1d,24,2,5-2,2,8-,35-2,19,f-10,1d-3,311-37f,1b,5a-b,d7-19,d-3,41,57-,68-4,29-3,5f,29-37,2e-2,25-c,2c-2,4e-3,30,78-3,64-,20,19b7-49,51a7-59,48e-2,38-738,2ba5-5b,222f-,3c-94,8-b,6-4,1b,6,2,3,3,6d-20,16e-f,41-,37-7,2e-2,11-f,5-b,18-,b,14,5-3,6,88-,2,bf-2,7-,7-,7-,4-2,8,8-9,8-2ff,20,5-b,1c-b4,27-,27-cbb1,f7-9,28-2,b5-221,56,48,3-,2-,3-,5,d,2,5,3,42,5-,9,8,1d,5,6,2-2,8,153-3,123-3,33-27fd,a6da-5128,21f-5df,3-fffd,3-fffd,3-fffd,3-fffd,3-fffd,3-fffd,3-fffd,3-fffd,3-fffd,3-fffd,3-fffd,3,2-1d,61-ff7d\");\n var Table_B_1_flags = \"ad,34f,1806,180b,180c,180d,200b,200c,200d,2060,feff\".split(\",\").map(function(v2) {\n return parseInt(v2, 16);\n });\n var Table_B_2_ranges = [\n { h: 25, s: 32, l: 65 },\n { h: 30, s: 32, e: [23], l: 127 },\n { h: 54, s: 1, e: [48], l: 64, d: 2 },\n { h: 14, s: 1, l: 57, d: 2 },\n { h: 44, s: 1, l: 17, d: 2 },\n { h: 10, s: 1, e: [2, 6, 8], l: 61, d: 2 },\n { h: 16, s: 1, l: 68, d: 2 },\n { h: 84, s: 1, e: [18, 24, 66], l: 19, d: 2 },\n { h: 26, s: 32, e: [17], l: 435 },\n { h: 22, s: 1, l: 71, d: 2 },\n { h: 15, s: 80, l: 40 },\n { h: 31, s: 32, l: 16 },\n { h: 32, s: 1, l: 80, d: 2 },\n { h: 52, s: 1, l: 42, d: 2 },\n { h: 12, s: 1, l: 55, d: 2 },\n { h: 40, s: 1, e: [38], l: 15, d: 2 },\n { h: 14, s: 1, l: 48, d: 2 },\n { h: 37, s: 48, l: 49 },\n { h: 148, s: 1, l: 6351, d: 2 },\n { h: 88, s: 1, l: 160, d: 2 },\n { h: 15, s: 16, l: 704 },\n { h: 25, s: 26, l: 854 },\n { h: 25, s: 32, l: 55915 },\n { h: 37, s: 40, l: 1247 },\n { h: 25, s: -119711, l: 53248 },\n { h: 25, s: -119763, l: 52 },\n { h: 25, s: -119815, l: 52 },\n { h: 25, s: -119867, e: [1, 4, 5, 7, 8, 11, 12, 17], l: 52 },\n { h: 25, s: -119919, l: 52 },\n { h: 24, s: -119971, e: [2, 7, 8, 17], l: 52 },\n { h: 24, s: -120023, e: [2, 7, 13, 15, 16, 17], l: 52 },\n { h: 25, s: -120075, l: 52 },\n { h: 25, s: -120127, l: 52 },\n { h: 25, s: -120179, l: 52 },\n { h: 25, s: -120231, l: 52 },\n { h: 25, s: -120283, l: 52 },\n { h: 25, s: -120335, l: 52 },\n { h: 24, s: -119543, e: [17], l: 56 },\n { h: 24, s: -119601, e: [17], l: 58 },\n { h: 24, s: -119659, e: [17], l: 58 },\n { h: 24, s: -119717, e: [17], l: 58 },\n { h: 24, s: -119775, e: [17], l: 58 }\n ];\n var Table_B_2_lut_abs = createTable(\"b5:3bc,c3:ff,7:73,2:253,5:254,3:256,1:257,5:259,1:25b,3:260,1:263,2:269,1:268,5:26f,1:272,2:275,7:280,3:283,5:288,3:28a,1:28b,5:292,3f:195,1:1bf,29:19e,125:3b9,8b:3b2,1:3b8,1:3c5,3:3c6,1:3c0,1a:3ba,1:3c1,1:3c3,2:3b8,1:3b5,1bc9:3b9,1c:1f76,1:1f77,f:1f7a,1:1f7b,d:1f78,1:1f79,1:1f7c,1:1f7d,107:63,5:25b,4:68,1:68,1:68,3:69,1:69,1:6c,3:6e,4:70,1:71,1:72,1:72,1:72,7:7a,2:3c9,2:7a,2:6b,1:e5,1:62,1:63,3:65,1:66,2:6d,b:3b3,1:3c0,6:64,1b574:3b8,1a:3c3,20:3b8,1a:3c3,20:3b8,1a:3c3,20:3b8,1a:3c3,20:3b8,1a:3c3\");\n var Table_B_2_lut_rel = createTable(\"179:1,2:1,2:1,5:1,2:1,a:4f,a:1,8:1,2:1,2:1,3:1,5:1,3:1,4:1,2:1,3:1,4:1,8:2,1:1,2:2,1:1,2:2,27:2,195:26,2:25,1:25,1:25,2:40,2:3f,1:3f,33:1,11:-6,1:-9,1ac7:-3a,6d:-8,1:-8,1:-8,1:-8,1:-8,1:-8,1:-8,1:-8,9:-8,1:-8,1:-8,1:-8,1:-8,1:-8,b:-8,1:-8,1:-8,1:-8,1:-8,1:-8,1:-8,1:-8,9:-8,1:-8,1:-8,1:-8,1:-8,1:-8,1:-8,1:-8,9:-8,1:-8,1:-8,1:-8,1:-8,1:-8,c:-8,2:-8,2:-8,2:-8,9:-8,1:-8,1:-8,1:-8,1:-8,1:-8,1:-8,1:-8,49:-8,1:-8,1:-4a,1:-4a,d:-56,1:-56,1:-56,1:-56,d:-8,1:-8,f:-8,1:-8,3:-7\");\n var Table_B_2_complex = createTable(\"df:00730073,51:00690307,19:02BC006E,a7:006A030C,18a:002003B9,16:03B903080301,20:03C503080301,1d7:05650582,190f:00680331,1:00740308,1:0077030A,1:0079030A,1:006102BE,b6:03C50313,2:03C503130300,2:03C503130301,2:03C503130342,2a:1F0003B9,1:1F0103B9,1:1F0203B9,1:1F0303B9,1:1F0403B9,1:1F0503B9,1:1F0603B9,1:1F0703B9,1:1F0003B9,1:1F0103B9,1:1F0203B9,1:1F0303B9,1:1F0403B9,1:1F0503B9,1:1F0603B9,1:1F0703B9,1:1F2003B9,1:1F2103B9,1:1F2203B9,1:1F2303B9,1:1F2403B9,1:1F2503B9,1:1F2603B9,1:1F2703B9,1:1F2003B9,1:1F2103B9,1:1F2203B9,1:1F2303B9,1:1F2403B9,1:1F2503B9,1:1F2603B9,1:1F2703B9,1:1F6003B9,1:1F6103B9,1:1F6203B9,1:1F6303B9,1:1F6403B9,1:1F6503B9,1:1F6603B9,1:1F6703B9,1:1F6003B9,1:1F6103B9,1:1F6203B9,1:1F6303B9,1:1F6403B9,1:1F6503B9,1:1F6603B9,1:1F6703B9,3:1F7003B9,1:03B103B9,1:03AC03B9,2:03B10342,1:03B1034203B9,5:03B103B9,6:1F7403B9,1:03B703B9,1:03AE03B9,2:03B70342,1:03B7034203B9,5:03B703B9,6:03B903080300,1:03B903080301,3:03B90342,1:03B903080342,b:03C503080300,1:03C503080301,1:03C10313,2:03C50342,1:03C503080342,b:1F7C03B9,1:03C903B9,1:03CE03B9,2:03C90342,1:03C9034203B9,5:03C903B9,ac:00720073,5b:00B00063,6:00B00066,d:006E006F,a:0073006D,1:00740065006C,1:0074006D,124f:006800700061,2:00610075,2:006F0076,b:00700061,1:006E0061,1:03BC0061,1:006D0061,1:006B0061,1:006B0062,1:006D0062,1:00670062,3:00700066,1:006E0066,1:03BC0066,4:0068007A,1:006B0068007A,1:006D0068007A,1:00670068007A,1:00740068007A,15:00700061,1:006B00700061,1:006D00700061,1:006700700061,8:00700076,1:006E0076,1:03BC0076,1:006D0076,1:006B0076,1:006D0076,1:00700077,1:006E0077,1:03BC0077,1:006D0077,1:006B0077,1:006D0077,1:006B03C9,1:006D03C9,2:00620071,3:00632215006B0067,1:0063006F002E,1:00640062,1:00670079,2:00680070,2:006B006B,1:006B006D,9:00700068,2:00700070006D,1:00700072,2:00730076,1:00770062,c723:00660066,1:00660069,1:0066006C,1:006600660069,1:00660066006C,1:00730074,1:00730074,d:05740576,1:05740565,1:0574056B,1:057E0576,1:0574056D\", bytes2);\n var Table_C_ranges = createRangeTable(\"80-20,2a0-,39c,32,f71,18e,7f2-f,19-7,30-4,7-5,f81-b,5,a800-20ff,4d1-1f,110,fa-6,d174-7,2e84-,ffff-,ffff-,ffff-,ffff-,ffff-,ffff-,ffff-,ffff-,ffff-,ffff-,ffff-,ffff-,2,1f-5f,ff7f-20001\");\n function flatten(values) {\n return values.reduce(function(accum, value) {\n value.forEach(function(value2) {\n accum.push(value2);\n });\n return accum;\n }, []);\n }\n function _nameprepTableA1(codepoint) {\n return !!matchMap(codepoint, Table_A_1_ranges);\n }\n exports3._nameprepTableA1 = _nameprepTableA1;\n function _nameprepTableB2(codepoint) {\n var range = matchMap(codepoint, Table_B_2_ranges);\n if (range) {\n return [codepoint + range.s];\n }\n var codes = Table_B_2_lut_abs[codepoint];\n if (codes) {\n return codes;\n }\n var shift = Table_B_2_lut_rel[codepoint];\n if (shift) {\n return [codepoint + shift[0]];\n }\n var complex = Table_B_2_complex[codepoint];\n if (complex) {\n return complex;\n }\n return null;\n }\n exports3._nameprepTableB2 = _nameprepTableB2;\n function _nameprepTableC(codepoint) {\n return !!matchMap(codepoint, Table_C_ranges);\n }\n exports3._nameprepTableC = _nameprepTableC;\n function nameprep(value) {\n if (value.match(/^[a-z0-9-]*$/i) && value.length <= 59) {\n return value.toLowerCase();\n }\n var codes = (0, utf8_1.toUtf8CodePoints)(value);\n codes = flatten(codes.map(function(code) {\n if (Table_B_1_flags.indexOf(code) >= 0) {\n return [];\n }\n if (code >= 65024 && code <= 65039) {\n return [];\n }\n var codesTableB2 = _nameprepTableB2(code);\n if (codesTableB2) {\n return codesTableB2;\n }\n return [code];\n }));\n codes = (0, utf8_1.toUtf8CodePoints)((0, utf8_1._toUtf8String)(codes), utf8_1.UnicodeNormalizationForm.NFKC);\n codes.forEach(function(code) {\n if (_nameprepTableC(code)) {\n throw new Error(\"STRINGPREP_CONTAINS_PROHIBITED\");\n }\n });\n codes.forEach(function(code) {\n if (_nameprepTableA1(code)) {\n throw new Error(\"STRINGPREP_CONTAINS_UNASSIGNED\");\n }\n });\n var name = (0, utf8_1._toUtf8String)(codes);\n if (name.substring(0, 1) === \"-\" || name.substring(2, 4) === \"--\" || name.substring(name.length - 1) === \"-\") {\n throw new Error(\"invalid hyphen\");\n }\n return name;\n }\n exports3.nameprep = nameprep;\n }\n });\n\n // ../../../node_modules/.pnpm/@ethersproject+strings@5.8.0/node_modules/@ethersproject/strings/lib/index.js\n var require_lib9 = __commonJS({\n \"../../../node_modules/.pnpm/@ethersproject+strings@5.8.0/node_modules/@ethersproject/strings/lib/index.js\"(exports3) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n Object.defineProperty(exports3, \"__esModule\", { value: true });\n exports3.nameprep = exports3.parseBytes32String = exports3.formatBytes32String = exports3.UnicodeNormalizationForm = exports3.Utf8ErrorReason = exports3.Utf8ErrorFuncs = exports3.toUtf8String = exports3.toUtf8CodePoints = exports3.toUtf8Bytes = exports3._toEscapedUtf8String = void 0;\n var bytes32_1 = require_bytes32();\n Object.defineProperty(exports3, \"formatBytes32String\", { enumerable: true, get: function() {\n return bytes32_1.formatBytes32String;\n } });\n Object.defineProperty(exports3, \"parseBytes32String\", { enumerable: true, get: function() {\n return bytes32_1.parseBytes32String;\n } });\n var idna_1 = require_idna();\n Object.defineProperty(exports3, \"nameprep\", { enumerable: true, get: function() {\n return idna_1.nameprep;\n } });\n var utf8_1 = require_utf8();\n Object.defineProperty(exports3, \"_toEscapedUtf8String\", { enumerable: true, get: function() {\n return utf8_1._toEscapedUtf8String;\n } });\n Object.defineProperty(exports3, \"toUtf8Bytes\", { enumerable: true, get: function() {\n return utf8_1.toUtf8Bytes;\n } });\n Object.defineProperty(exports3, \"toUtf8CodePoints\", { enumerable: true, get: function() {\n return utf8_1.toUtf8CodePoints;\n } });\n Object.defineProperty(exports3, \"toUtf8String\", { enumerable: true, get: function() {\n return utf8_1.toUtf8String;\n } });\n Object.defineProperty(exports3, \"UnicodeNormalizationForm\", { enumerable: true, get: function() {\n return utf8_1.UnicodeNormalizationForm;\n } });\n Object.defineProperty(exports3, \"Utf8ErrorFuncs\", { enumerable: true, get: function() {\n return utf8_1.Utf8ErrorFuncs;\n } });\n Object.defineProperty(exports3, \"Utf8ErrorReason\", { enumerable: true, get: function() {\n return utf8_1.Utf8ErrorReason;\n } });\n }\n });\n\n // ../../../node_modules/.pnpm/@ethersproject+abi@5.8.0/node_modules/@ethersproject/abi/lib/coders/string.js\n var require_string = __commonJS({\n \"../../../node_modules/.pnpm/@ethersproject+abi@5.8.0/node_modules/@ethersproject/abi/lib/coders/string.js\"(exports3) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n var __extends3 = exports3 && exports3.__extends || /* @__PURE__ */ function() {\n var extendStatics3 = function(d5, b4) {\n extendStatics3 = Object.setPrototypeOf || { __proto__: [] } instanceof Array && function(d6, b5) {\n d6.__proto__ = b5;\n } || function(d6, b5) {\n for (var p4 in b5)\n if (Object.prototype.hasOwnProperty.call(b5, p4))\n d6[p4] = b5[p4];\n };\n return extendStatics3(d5, b4);\n };\n return function(d5, b4) {\n if (typeof b4 !== \"function\" && b4 !== null)\n throw new TypeError(\"Class extends value \" + String(b4) + \" is not a constructor or null\");\n extendStatics3(d5, b4);\n function __() {\n this.constructor = d5;\n }\n d5.prototype = b4 === null ? Object.create(b4) : (__.prototype = b4.prototype, new __());\n };\n }();\n Object.defineProperty(exports3, \"__esModule\", { value: true });\n exports3.StringCoder = void 0;\n var strings_1 = require_lib9();\n var bytes_1 = require_bytes();\n var StringCoder = (\n /** @class */\n function(_super) {\n __extends3(StringCoder2, _super);\n function StringCoder2(localName) {\n return _super.call(this, \"string\", localName) || this;\n }\n StringCoder2.prototype.defaultValue = function() {\n return \"\";\n };\n StringCoder2.prototype.encode = function(writer, value) {\n return _super.prototype.encode.call(this, writer, (0, strings_1.toUtf8Bytes)(value));\n };\n StringCoder2.prototype.decode = function(reader) {\n return (0, strings_1.toUtf8String)(_super.prototype.decode.call(this, reader));\n };\n return StringCoder2;\n }(bytes_1.DynamicBytesCoder)\n );\n exports3.StringCoder = StringCoder;\n }\n });\n\n // ../../../node_modules/.pnpm/@ethersproject+abi@5.8.0/node_modules/@ethersproject/abi/lib/coders/tuple.js\n var require_tuple = __commonJS({\n \"../../../node_modules/.pnpm/@ethersproject+abi@5.8.0/node_modules/@ethersproject/abi/lib/coders/tuple.js\"(exports3) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n var __extends3 = exports3 && exports3.__extends || /* @__PURE__ */ function() {\n var extendStatics3 = function(d5, b4) {\n extendStatics3 = Object.setPrototypeOf || { __proto__: [] } instanceof Array && function(d6, b5) {\n d6.__proto__ = b5;\n } || function(d6, b5) {\n for (var p4 in b5)\n if (Object.prototype.hasOwnProperty.call(b5, p4))\n d6[p4] = b5[p4];\n };\n return extendStatics3(d5, b4);\n };\n return function(d5, b4) {\n if (typeof b4 !== \"function\" && b4 !== null)\n throw new TypeError(\"Class extends value \" + String(b4) + \" is not a constructor or null\");\n extendStatics3(d5, b4);\n function __() {\n this.constructor = d5;\n }\n d5.prototype = b4 === null ? Object.create(b4) : (__.prototype = b4.prototype, new __());\n };\n }();\n Object.defineProperty(exports3, \"__esModule\", { value: true });\n exports3.TupleCoder = void 0;\n var abstract_coder_1 = require_abstract_coder();\n var array_1 = require_array();\n var TupleCoder = (\n /** @class */\n function(_super) {\n __extends3(TupleCoder2, _super);\n function TupleCoder2(coders, localName) {\n var _this = this;\n var dynamic = false;\n var types = [];\n coders.forEach(function(coder) {\n if (coder.dynamic) {\n dynamic = true;\n }\n types.push(coder.type);\n });\n var type = \"tuple(\" + types.join(\",\") + \")\";\n _this = _super.call(this, \"tuple\", type, localName, dynamic) || this;\n _this.coders = coders;\n return _this;\n }\n TupleCoder2.prototype.defaultValue = function() {\n var values = [];\n this.coders.forEach(function(coder) {\n values.push(coder.defaultValue());\n });\n var uniqueNames = this.coders.reduce(function(accum, coder) {\n var name = coder.localName;\n if (name) {\n if (!accum[name]) {\n accum[name] = 0;\n }\n accum[name]++;\n }\n return accum;\n }, {});\n this.coders.forEach(function(coder, index2) {\n var name = coder.localName;\n if (!name || uniqueNames[name] !== 1) {\n return;\n }\n if (name === \"length\") {\n name = \"_length\";\n }\n if (values[name] != null) {\n return;\n }\n values[name] = values[index2];\n });\n return Object.freeze(values);\n };\n TupleCoder2.prototype.encode = function(writer, value) {\n return (0, array_1.pack)(writer, this.coders, value);\n };\n TupleCoder2.prototype.decode = function(reader) {\n return reader.coerce(this.name, (0, array_1.unpack)(reader, this.coders));\n };\n return TupleCoder2;\n }(abstract_coder_1.Coder)\n );\n exports3.TupleCoder = TupleCoder;\n }\n });\n\n // ../../../node_modules/.pnpm/@ethersproject+abi@5.8.0/node_modules/@ethersproject/abi/lib/abi-coder.js\n var require_abi_coder = __commonJS({\n \"../../../node_modules/.pnpm/@ethersproject+abi@5.8.0/node_modules/@ethersproject/abi/lib/abi-coder.js\"(exports3) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n Object.defineProperty(exports3, \"__esModule\", { value: true });\n exports3.defaultAbiCoder = exports3.AbiCoder = void 0;\n var bytes_1 = require_lib2();\n var properties_1 = require_lib4();\n var logger_1 = require_lib();\n var _version_1 = require_version5();\n var logger = new logger_1.Logger(_version_1.version);\n var abstract_coder_1 = require_abstract_coder();\n var address_1 = require_address();\n var array_1 = require_array();\n var boolean_1 = require_boolean();\n var bytes_2 = require_bytes();\n var fixed_bytes_1 = require_fixed_bytes();\n var null_1 = require_null();\n var number_1 = require_number();\n var string_1 = require_string();\n var tuple_1 = require_tuple();\n var fragments_1 = require_fragments();\n var paramTypeBytes = new RegExp(/^bytes([0-9]*)$/);\n var paramTypeNumber = new RegExp(/^(u?int)([0-9]*)$/);\n var AbiCoder = (\n /** @class */\n function() {\n function AbiCoder2(coerceFunc) {\n (0, properties_1.defineReadOnly)(this, \"coerceFunc\", coerceFunc || null);\n }\n AbiCoder2.prototype._getCoder = function(param) {\n var _this = this;\n switch (param.baseType) {\n case \"address\":\n return new address_1.AddressCoder(param.name);\n case \"bool\":\n return new boolean_1.BooleanCoder(param.name);\n case \"string\":\n return new string_1.StringCoder(param.name);\n case \"bytes\":\n return new bytes_2.BytesCoder(param.name);\n case \"array\":\n return new array_1.ArrayCoder(this._getCoder(param.arrayChildren), param.arrayLength, param.name);\n case \"tuple\":\n return new tuple_1.TupleCoder((param.components || []).map(function(component) {\n return _this._getCoder(component);\n }), param.name);\n case \"\":\n return new null_1.NullCoder(param.name);\n }\n var match = param.type.match(paramTypeNumber);\n if (match) {\n var size6 = parseInt(match[2] || \"256\");\n if (size6 === 0 || size6 > 256 || size6 % 8 !== 0) {\n logger.throwArgumentError(\"invalid \" + match[1] + \" bit length\", \"param\", param);\n }\n return new number_1.NumberCoder(size6 / 8, match[1] === \"int\", param.name);\n }\n match = param.type.match(paramTypeBytes);\n if (match) {\n var size6 = parseInt(match[1]);\n if (size6 === 0 || size6 > 32) {\n logger.throwArgumentError(\"invalid bytes length\", \"param\", param);\n }\n return new fixed_bytes_1.FixedBytesCoder(size6, param.name);\n }\n return logger.throwArgumentError(\"invalid type\", \"type\", param.type);\n };\n AbiCoder2.prototype._getWordSize = function() {\n return 32;\n };\n AbiCoder2.prototype._getReader = function(data, allowLoose) {\n return new abstract_coder_1.Reader(data, this._getWordSize(), this.coerceFunc, allowLoose);\n };\n AbiCoder2.prototype._getWriter = function() {\n return new abstract_coder_1.Writer(this._getWordSize());\n };\n AbiCoder2.prototype.getDefaultValue = function(types) {\n var _this = this;\n var coders = types.map(function(type) {\n return _this._getCoder(fragments_1.ParamType.from(type));\n });\n var coder = new tuple_1.TupleCoder(coders, \"_\");\n return coder.defaultValue();\n };\n AbiCoder2.prototype.encode = function(types, values) {\n var _this = this;\n if (types.length !== values.length) {\n logger.throwError(\"types/values length mismatch\", logger_1.Logger.errors.INVALID_ARGUMENT, {\n count: { types: types.length, values: values.length },\n value: { types, values }\n });\n }\n var coders = types.map(function(type) {\n return _this._getCoder(fragments_1.ParamType.from(type));\n });\n var coder = new tuple_1.TupleCoder(coders, \"_\");\n var writer = this._getWriter();\n coder.encode(writer, values);\n return writer.data;\n };\n AbiCoder2.prototype.decode = function(types, data, loose) {\n var _this = this;\n var coders = types.map(function(type) {\n return _this._getCoder(fragments_1.ParamType.from(type));\n });\n var coder = new tuple_1.TupleCoder(coders, \"_\");\n return coder.decode(this._getReader((0, bytes_1.arrayify)(data), loose));\n };\n return AbiCoder2;\n }()\n );\n exports3.AbiCoder = AbiCoder;\n exports3.defaultAbiCoder = new AbiCoder();\n }\n });\n\n // ../../../node_modules/.pnpm/@ethersproject+hash@5.8.0/node_modules/@ethersproject/hash/lib/id.js\n var require_id = __commonJS({\n \"../../../node_modules/.pnpm/@ethersproject+hash@5.8.0/node_modules/@ethersproject/hash/lib/id.js\"(exports3) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n Object.defineProperty(exports3, \"__esModule\", { value: true });\n exports3.id = void 0;\n var keccak256_1 = require_lib5();\n var strings_1 = require_lib9();\n function id(text) {\n return (0, keccak256_1.keccak256)((0, strings_1.toUtf8Bytes)(text));\n }\n exports3.id = id;\n }\n });\n\n // ../../../node_modules/.pnpm/@ethersproject+hash@5.8.0/node_modules/@ethersproject/hash/lib/_version.js\n var require_version9 = __commonJS({\n \"../../../node_modules/.pnpm/@ethersproject+hash@5.8.0/node_modules/@ethersproject/hash/lib/_version.js\"(exports3) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n Object.defineProperty(exports3, \"__esModule\", { value: true });\n exports3.version = void 0;\n exports3.version = \"hash/5.8.0\";\n }\n });\n\n // ../../../node_modules/.pnpm/@ethersproject+base64@5.8.0/node_modules/@ethersproject/base64/lib/browser-base64.js\n var require_browser_base64 = __commonJS({\n \"../../../node_modules/.pnpm/@ethersproject+base64@5.8.0/node_modules/@ethersproject/base64/lib/browser-base64.js\"(exports3) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n Object.defineProperty(exports3, \"__esModule\", { value: true });\n exports3.encode = exports3.decode = void 0;\n var bytes_1 = require_lib2();\n function decode2(textData) {\n textData = atob(textData);\n var data = [];\n for (var i3 = 0; i3 < textData.length; i3++) {\n data.push(textData.charCodeAt(i3));\n }\n return (0, bytes_1.arrayify)(data);\n }\n exports3.decode = decode2;\n function encode6(data) {\n data = (0, bytes_1.arrayify)(data);\n var textData = \"\";\n for (var i3 = 0; i3 < data.length; i3++) {\n textData += String.fromCharCode(data[i3]);\n }\n return btoa(textData);\n }\n exports3.encode = encode6;\n }\n });\n\n // ../../../node_modules/.pnpm/@ethersproject+base64@5.8.0/node_modules/@ethersproject/base64/lib/index.js\n var require_lib10 = __commonJS({\n \"../../../node_modules/.pnpm/@ethersproject+base64@5.8.0/node_modules/@ethersproject/base64/lib/index.js\"(exports3) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n Object.defineProperty(exports3, \"__esModule\", { value: true });\n exports3.encode = exports3.decode = void 0;\n var base64_1 = require_browser_base64();\n Object.defineProperty(exports3, \"decode\", { enumerable: true, get: function() {\n return base64_1.decode;\n } });\n Object.defineProperty(exports3, \"encode\", { enumerable: true, get: function() {\n return base64_1.encode;\n } });\n }\n });\n\n // ../../../node_modules/.pnpm/@ethersproject+hash@5.8.0/node_modules/@ethersproject/hash/lib/ens-normalize/decoder.js\n var require_decoder = __commonJS({\n \"../../../node_modules/.pnpm/@ethersproject+hash@5.8.0/node_modules/@ethersproject/hash/lib/ens-normalize/decoder.js\"(exports3) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n Object.defineProperty(exports3, \"__esModule\", { value: true });\n exports3.read_emoji_trie = exports3.read_zero_terminated_array = exports3.read_mapped_map = exports3.read_member_array = exports3.signed = exports3.read_compressed_payload = exports3.read_payload = exports3.decode_arithmetic = void 0;\n function flat(array2, depth) {\n if (depth == null) {\n depth = 1;\n }\n var result = [];\n var forEach = result.forEach;\n var flatDeep = function(arr, depth2) {\n forEach.call(arr, function(val) {\n if (depth2 > 0 && Array.isArray(val)) {\n flatDeep(val, depth2 - 1);\n } else {\n result.push(val);\n }\n });\n };\n flatDeep(array2, depth);\n return result;\n }\n function fromEntries(array2) {\n var result = {};\n for (var i3 = 0; i3 < array2.length; i3++) {\n var value = array2[i3];\n result[value[0]] = value[1];\n }\n return result;\n }\n function decode_arithmetic(bytes) {\n var pos = 0;\n function u16() {\n return bytes[pos++] << 8 | bytes[pos++];\n }\n var symbol_count = u16();\n var total = 1;\n var acc = [0, 1];\n for (var i3 = 1; i3 < symbol_count; i3++) {\n acc.push(total += u16());\n }\n var skip = u16();\n var pos_payload = pos;\n pos += skip;\n var read_width = 0;\n var read_buffer = 0;\n function read_bit() {\n if (read_width == 0) {\n read_buffer = read_buffer << 8 | bytes[pos++];\n read_width = 8;\n }\n return read_buffer >> --read_width & 1;\n }\n var N4 = 31;\n var FULL = Math.pow(2, N4);\n var HALF = FULL >>> 1;\n var QRTR = HALF >> 1;\n var MASK = FULL - 1;\n var register = 0;\n for (var i3 = 0; i3 < N4; i3++)\n register = register << 1 | read_bit();\n var symbols = [];\n var low = 0;\n var range = FULL;\n while (true) {\n var value = Math.floor(((register - low + 1) * total - 1) / range);\n var start = 0;\n var end = symbol_count;\n while (end - start > 1) {\n var mid = start + end >>> 1;\n if (value < acc[mid]) {\n end = mid;\n } else {\n start = mid;\n }\n }\n if (start == 0)\n break;\n symbols.push(start);\n var a3 = low + Math.floor(range * acc[start] / total);\n var b4 = low + Math.floor(range * acc[start + 1] / total) - 1;\n while (((a3 ^ b4) & HALF) == 0) {\n register = register << 1 & MASK | read_bit();\n a3 = a3 << 1 & MASK;\n b4 = b4 << 1 & MASK | 1;\n }\n while (a3 & ~b4 & QRTR) {\n register = register & HALF | register << 1 & MASK >>> 1 | read_bit();\n a3 = a3 << 1 ^ HALF;\n b4 = (b4 ^ HALF) << 1 | HALF | 1;\n }\n low = a3;\n range = 1 + b4 - a3;\n }\n var offset = symbol_count - 4;\n return symbols.map(function(x4) {\n switch (x4 - offset) {\n case 3:\n return offset + 65792 + (bytes[pos_payload++] << 16 | bytes[pos_payload++] << 8 | bytes[pos_payload++]);\n case 2:\n return offset + 256 + (bytes[pos_payload++] << 8 | bytes[pos_payload++]);\n case 1:\n return offset + bytes[pos_payload++];\n default:\n return x4 - 1;\n }\n });\n }\n exports3.decode_arithmetic = decode_arithmetic;\n function read_payload(v2) {\n var pos = 0;\n return function() {\n return v2[pos++];\n };\n }\n exports3.read_payload = read_payload;\n function read_compressed_payload(bytes) {\n return read_payload(decode_arithmetic(bytes));\n }\n exports3.read_compressed_payload = read_compressed_payload;\n function signed(i3) {\n return i3 & 1 ? ~i3 >> 1 : i3 >> 1;\n }\n exports3.signed = signed;\n function read_counts(n2, next) {\n var v2 = Array(n2);\n for (var i3 = 0; i3 < n2; i3++)\n v2[i3] = 1 + next();\n return v2;\n }\n function read_ascending(n2, next) {\n var v2 = Array(n2);\n for (var i3 = 0, x4 = -1; i3 < n2; i3++)\n v2[i3] = x4 += 1 + next();\n return v2;\n }\n function read_deltas(n2, next) {\n var v2 = Array(n2);\n for (var i3 = 0, x4 = 0; i3 < n2; i3++)\n v2[i3] = x4 += signed(next());\n return v2;\n }\n function read_member_array(next, lookup) {\n var v2 = read_ascending(next(), next);\n var n2 = next();\n var vX = read_ascending(n2, next);\n var vN = read_counts(n2, next);\n for (var i3 = 0; i3 < n2; i3++) {\n for (var j2 = 0; j2 < vN[i3]; j2++) {\n v2.push(vX[i3] + j2);\n }\n }\n return lookup ? v2.map(function(x4) {\n return lookup[x4];\n }) : v2;\n }\n exports3.read_member_array = read_member_array;\n function read_mapped_map(next) {\n var ret = [];\n while (true) {\n var w3 = next();\n if (w3 == 0)\n break;\n ret.push(read_linear_table(w3, next));\n }\n while (true) {\n var w3 = next() - 1;\n if (w3 < 0)\n break;\n ret.push(read_replacement_table(w3, next));\n }\n return fromEntries(flat(ret));\n }\n exports3.read_mapped_map = read_mapped_map;\n function read_zero_terminated_array(next) {\n var v2 = [];\n while (true) {\n var i3 = next();\n if (i3 == 0)\n break;\n v2.push(i3);\n }\n return v2;\n }\n exports3.read_zero_terminated_array = read_zero_terminated_array;\n function read_transposed(n2, w3, next) {\n var m2 = Array(n2).fill(void 0).map(function() {\n return [];\n });\n for (var i3 = 0; i3 < w3; i3++) {\n read_deltas(n2, next).forEach(function(x4, j2) {\n return m2[j2].push(x4);\n });\n }\n return m2;\n }\n function read_linear_table(w3, next) {\n var dx = 1 + next();\n var dy = next();\n var vN = read_zero_terminated_array(next);\n var m2 = read_transposed(vN.length, 1 + w3, next);\n return flat(m2.map(function(v2, i3) {\n var x4 = v2[0], ys = v2.slice(1);\n return Array(vN[i3]).fill(void 0).map(function(_2, j2) {\n var j_dy = j2 * dy;\n return [x4 + j2 * dx, ys.map(function(y6) {\n return y6 + j_dy;\n })];\n });\n }));\n }\n function read_replacement_table(w3, next) {\n var n2 = 1 + next();\n var m2 = read_transposed(n2, 1 + w3, next);\n return m2.map(function(v2) {\n return [v2[0], v2.slice(1)];\n });\n }\n function read_emoji_trie(next) {\n var sorted = read_member_array(next).sort(function(a3, b4) {\n return a3 - b4;\n });\n return read();\n function read() {\n var branches = [];\n while (true) {\n var keys = read_member_array(next, sorted);\n if (keys.length == 0)\n break;\n branches.push({ set: new Set(keys), node: read() });\n }\n branches.sort(function(a3, b4) {\n return b4.set.size - a3.set.size;\n });\n var temp = next();\n var valid = temp % 3;\n temp = temp / 3 | 0;\n var fe0f = !!(temp & 1);\n temp >>= 1;\n var save = temp == 1;\n var check = temp == 2;\n return { branches, valid, fe0f, save, check };\n }\n }\n exports3.read_emoji_trie = read_emoji_trie;\n }\n });\n\n // ../../../node_modules/.pnpm/@ethersproject+hash@5.8.0/node_modules/@ethersproject/hash/lib/ens-normalize/include.js\n var require_include = __commonJS({\n \"../../../node_modules/.pnpm/@ethersproject+hash@5.8.0/node_modules/@ethersproject/hash/lib/ens-normalize/include.js\"(exports3) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n Object.defineProperty(exports3, \"__esModule\", { value: true });\n exports3.getData = void 0;\n var base64_1 = require_lib10();\n var decoder_js_1 = require_decoder();\n function getData() {\n return (0, decoder_js_1.read_compressed_payload)((0, base64_1.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==\"));\n }\n exports3.getData = getData;\n }\n });\n\n // ../../../node_modules/.pnpm/@ethersproject+hash@5.8.0/node_modules/@ethersproject/hash/lib/ens-normalize/lib.js\n var require_lib11 = __commonJS({\n \"../../../node_modules/.pnpm/@ethersproject+hash@5.8.0/node_modules/@ethersproject/hash/lib/ens-normalize/lib.js\"(exports3) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n Object.defineProperty(exports3, \"__esModule\", { value: true });\n exports3.ens_normalize = exports3.ens_normalize_post_check = void 0;\n var strings_1 = require_lib9();\n var include_js_1 = require_include();\n var r2 = (0, include_js_1.getData)();\n var decoder_js_1 = require_decoder();\n var VALID = new Set((0, decoder_js_1.read_member_array)(r2));\n var IGNORED = new Set((0, decoder_js_1.read_member_array)(r2));\n var MAPPED = (0, decoder_js_1.read_mapped_map)(r2);\n var EMOJI_ROOT = (0, decoder_js_1.read_emoji_trie)(r2);\n var HYPHEN = 45;\n var UNDERSCORE = 95;\n function explode_cp(name) {\n return (0, strings_1.toUtf8CodePoints)(name);\n }\n function filter_fe0f(cps) {\n return cps.filter(function(cp) {\n return cp != 65039;\n });\n }\n function ens_normalize_post_check(name) {\n for (var _i = 0, _a = name.split(\".\"); _i < _a.length; _i++) {\n var label = _a[_i];\n var cps = explode_cp(label);\n try {\n for (var i3 = cps.lastIndexOf(UNDERSCORE) - 1; i3 >= 0; i3--) {\n if (cps[i3] !== UNDERSCORE) {\n throw new Error(\"underscore only allowed at start\");\n }\n }\n if (cps.length >= 4 && cps.every(function(cp) {\n return cp < 128;\n }) && cps[2] === HYPHEN && cps[3] === HYPHEN) {\n throw new Error(\"invalid label extension\");\n }\n } catch (err) {\n throw new Error('Invalid label \"' + label + '\": ' + err.message);\n }\n }\n return name;\n }\n exports3.ens_normalize_post_check = ens_normalize_post_check;\n function ens_normalize(name) {\n return ens_normalize_post_check(normalize2(name, filter_fe0f));\n }\n exports3.ens_normalize = ens_normalize;\n function normalize2(name, emoji_filter) {\n var input = explode_cp(name).reverse();\n var output = [];\n while (input.length) {\n var emoji = consume_emoji_reversed(input);\n if (emoji) {\n output.push.apply(output, emoji_filter(emoji));\n continue;\n }\n var cp = input.pop();\n if (VALID.has(cp)) {\n output.push(cp);\n continue;\n }\n if (IGNORED.has(cp)) {\n continue;\n }\n var cps = MAPPED[cp];\n if (cps) {\n output.push.apply(output, cps);\n continue;\n }\n throw new Error(\"Disallowed codepoint: 0x\" + cp.toString(16).toUpperCase());\n }\n return ens_normalize_post_check(nfc(String.fromCodePoint.apply(String, output)));\n }\n function nfc(s4) {\n return s4.normalize(\"NFC\");\n }\n function consume_emoji_reversed(cps, eaten) {\n var _a;\n var node = EMOJI_ROOT;\n var emoji;\n var saved;\n var stack = [];\n var pos = cps.length;\n if (eaten)\n eaten.length = 0;\n var _loop_1 = function() {\n var cp = cps[--pos];\n node = (_a = node.branches.find(function(x4) {\n return x4.set.has(cp);\n })) === null || _a === void 0 ? void 0 : _a.node;\n if (!node)\n return \"break\";\n if (node.save) {\n saved = cp;\n } else if (node.check) {\n if (cp === saved)\n return \"break\";\n }\n stack.push(cp);\n if (node.fe0f) {\n stack.push(65039);\n if (pos > 0 && cps[pos - 1] == 65039)\n pos--;\n }\n if (node.valid) {\n emoji = stack.slice();\n if (node.valid == 2)\n emoji.splice(1, 1);\n if (eaten)\n eaten.push.apply(eaten, cps.slice(pos).reverse());\n cps.length = pos;\n }\n };\n while (pos) {\n var state_1 = _loop_1();\n if (state_1 === \"break\")\n break;\n }\n return emoji;\n }\n }\n });\n\n // ../../../node_modules/.pnpm/@ethersproject+hash@5.8.0/node_modules/@ethersproject/hash/lib/namehash.js\n var require_namehash = __commonJS({\n \"../../../node_modules/.pnpm/@ethersproject+hash@5.8.0/node_modules/@ethersproject/hash/lib/namehash.js\"(exports3) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n Object.defineProperty(exports3, \"__esModule\", { value: true });\n exports3.dnsEncode = exports3.namehash = exports3.isValidName = exports3.ensNormalize = void 0;\n var bytes_1 = require_lib2();\n var strings_1 = require_lib9();\n var keccak256_1 = require_lib5();\n var logger_1 = require_lib();\n var _version_1 = require_version9();\n var logger = new logger_1.Logger(_version_1.version);\n var lib_1 = require_lib11();\n var Zeros = new Uint8Array(32);\n Zeros.fill(0);\n function checkComponent(comp) {\n if (comp.length === 0) {\n throw new Error(\"invalid ENS name; empty component\");\n }\n return comp;\n }\n function ensNameSplit(name) {\n var bytes = (0, strings_1.toUtf8Bytes)((0, lib_1.ens_normalize)(name));\n var comps = [];\n if (name.length === 0) {\n return comps;\n }\n var last = 0;\n for (var i3 = 0; i3 < bytes.length; i3++) {\n var d5 = bytes[i3];\n if (d5 === 46) {\n comps.push(checkComponent(bytes.slice(last, i3)));\n last = i3 + 1;\n }\n }\n if (last >= bytes.length) {\n throw new Error(\"invalid ENS name; empty component\");\n }\n comps.push(checkComponent(bytes.slice(last)));\n return comps;\n }\n function ensNormalize(name) {\n return ensNameSplit(name).map(function(comp) {\n return (0, strings_1.toUtf8String)(comp);\n }).join(\".\");\n }\n exports3.ensNormalize = ensNormalize;\n function isValidName(name) {\n try {\n return ensNameSplit(name).length !== 0;\n } catch (error) {\n }\n return false;\n }\n exports3.isValidName = isValidName;\n function namehash2(name) {\n if (typeof name !== \"string\") {\n logger.throwArgumentError(\"invalid ENS name; not a string\", \"name\", name);\n }\n var result = Zeros;\n var comps = ensNameSplit(name);\n while (comps.length) {\n result = (0, keccak256_1.keccak256)((0, bytes_1.concat)([result, (0, keccak256_1.keccak256)(comps.pop())]));\n }\n return (0, bytes_1.hexlify)(result);\n }\n exports3.namehash = namehash2;\n function dnsEncode(name) {\n return (0, bytes_1.hexlify)((0, bytes_1.concat)(ensNameSplit(name).map(function(comp) {\n if (comp.length > 63) {\n throw new Error(\"invalid DNS encoded entry; length exceeds 63 bytes\");\n }\n var bytes = new Uint8Array(comp.length + 1);\n bytes.set(comp, 1);\n bytes[0] = bytes.length - 1;\n return bytes;\n }))) + \"00\";\n }\n exports3.dnsEncode = dnsEncode;\n }\n });\n\n // ../../../node_modules/.pnpm/@ethersproject+hash@5.8.0/node_modules/@ethersproject/hash/lib/message.js\n var require_message = __commonJS({\n \"../../../node_modules/.pnpm/@ethersproject+hash@5.8.0/node_modules/@ethersproject/hash/lib/message.js\"(exports3) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n Object.defineProperty(exports3, \"__esModule\", { value: true });\n exports3.hashMessage = exports3.messagePrefix = void 0;\n var bytes_1 = require_lib2();\n var keccak256_1 = require_lib5();\n var strings_1 = require_lib9();\n exports3.messagePrefix = \"\u0019Ethereum Signed Message:\\n\";\n function hashMessage2(message) {\n if (typeof message === \"string\") {\n message = (0, strings_1.toUtf8Bytes)(message);\n }\n return (0, keccak256_1.keccak256)((0, bytes_1.concat)([\n (0, strings_1.toUtf8Bytes)(exports3.messagePrefix),\n (0, strings_1.toUtf8Bytes)(String(message.length)),\n message\n ]));\n }\n exports3.hashMessage = hashMessage2;\n }\n });\n\n // ../../../node_modules/.pnpm/@ethersproject+hash@5.8.0/node_modules/@ethersproject/hash/lib/typed-data.js\n var require_typed_data = __commonJS({\n \"../../../node_modules/.pnpm/@ethersproject+hash@5.8.0/node_modules/@ethersproject/hash/lib/typed-data.js\"(exports3) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n var __awaiter3 = exports3 && exports3.__awaiter || function(thisArg, _arguments, P2, generator) {\n function adopt(value) {\n return value instanceof P2 ? value : new P2(function(resolve) {\n resolve(value);\n });\n }\n return new (P2 || (P2 = Promise))(function(resolve, reject) {\n function fulfilled(value) {\n try {\n step(generator.next(value));\n } catch (e3) {\n reject(e3);\n }\n }\n function rejected(value) {\n try {\n step(generator[\"throw\"](value));\n } catch (e3) {\n reject(e3);\n }\n }\n function step(result) {\n result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected);\n }\n step((generator = generator.apply(thisArg, _arguments || [])).next());\n });\n };\n var __generator3 = exports3 && exports3.__generator || function(thisArg, body) {\n var _2 = { label: 0, sent: function() {\n if (t3[0] & 1)\n throw t3[1];\n return t3[1];\n }, trys: [], ops: [] }, f6, y6, t3, g4;\n return g4 = { next: verb(0), \"throw\": verb(1), \"return\": verb(2) }, typeof Symbol === \"function\" && (g4[Symbol.iterator] = function() {\n return this;\n }), g4;\n function verb(n2) {\n return function(v2) {\n return step([n2, v2]);\n };\n }\n function step(op) {\n if (f6)\n throw new TypeError(\"Generator is already executing.\");\n while (_2)\n try {\n if (f6 = 1, y6 && (t3 = op[0] & 2 ? y6[\"return\"] : op[0] ? y6[\"throw\"] || ((t3 = y6[\"return\"]) && t3.call(y6), 0) : y6.next) && !(t3 = t3.call(y6, op[1])).done)\n return t3;\n if (y6 = 0, t3)\n op = [op[0] & 2, t3.value];\n switch (op[0]) {\n case 0:\n case 1:\n t3 = op;\n break;\n case 4:\n _2.label++;\n return { value: op[1], done: false };\n case 5:\n _2.label++;\n y6 = op[1];\n op = [0];\n continue;\n case 7:\n op = _2.ops.pop();\n _2.trys.pop();\n continue;\n default:\n if (!(t3 = _2.trys, t3 = t3.length > 0 && t3[t3.length - 1]) && (op[0] === 6 || op[0] === 2)) {\n _2 = 0;\n continue;\n }\n if (op[0] === 3 && (!t3 || op[1] > t3[0] && op[1] < t3[3])) {\n _2.label = op[1];\n break;\n }\n if (op[0] === 6 && _2.label < t3[1]) {\n _2.label = t3[1];\n t3 = op;\n break;\n }\n if (t3 && _2.label < t3[2]) {\n _2.label = t3[2];\n _2.ops.push(op);\n break;\n }\n if (t3[2])\n _2.ops.pop();\n _2.trys.pop();\n continue;\n }\n op = body.call(thisArg, _2);\n } catch (e3) {\n op = [6, e3];\n y6 = 0;\n } finally {\n f6 = t3 = 0;\n }\n if (op[0] & 5)\n throw op[1];\n return { value: op[0] ? op[1] : void 0, done: true };\n }\n };\n Object.defineProperty(exports3, \"__esModule\", { value: true });\n exports3.TypedDataEncoder = void 0;\n var address_1 = require_lib7();\n var bignumber_1 = require_lib3();\n var bytes_1 = require_lib2();\n var keccak256_1 = require_lib5();\n var properties_1 = require_lib4();\n var logger_1 = require_lib();\n var _version_1 = require_version9();\n var logger = new logger_1.Logger(_version_1.version);\n var id_1 = require_id();\n var padding = new Uint8Array(32);\n padding.fill(0);\n var NegativeOne = bignumber_1.BigNumber.from(-1);\n var Zero = bignumber_1.BigNumber.from(0);\n var One = bignumber_1.BigNumber.from(1);\n var MaxUint256 = bignumber_1.BigNumber.from(\"0xffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff\");\n function hexPadRight(value) {\n var bytes = (0, bytes_1.arrayify)(value);\n var padOffset = bytes.length % 32;\n if (padOffset) {\n return (0, bytes_1.hexConcat)([bytes, padding.slice(padOffset)]);\n }\n return (0, bytes_1.hexlify)(bytes);\n }\n var hexTrue = (0, bytes_1.hexZeroPad)(One.toHexString(), 32);\n var hexFalse = (0, bytes_1.hexZeroPad)(Zero.toHexString(), 32);\n var domainFieldTypes = {\n name: \"string\",\n version: \"string\",\n chainId: \"uint256\",\n verifyingContract: \"address\",\n salt: \"bytes32\"\n };\n var domainFieldNames = [\n \"name\",\n \"version\",\n \"chainId\",\n \"verifyingContract\",\n \"salt\"\n ];\n function checkString(key) {\n return function(value) {\n if (typeof value !== \"string\") {\n logger.throwArgumentError(\"invalid domain value for \" + JSON.stringify(key), \"domain.\" + key, value);\n }\n return value;\n };\n }\n var domainChecks = {\n name: checkString(\"name\"),\n version: checkString(\"version\"),\n chainId: function(value) {\n try {\n return bignumber_1.BigNumber.from(value).toString();\n } catch (error) {\n }\n return logger.throwArgumentError('invalid domain value for \"chainId\"', \"domain.chainId\", value);\n },\n verifyingContract: function(value) {\n try {\n return (0, address_1.getAddress)(value).toLowerCase();\n } catch (error) {\n }\n return logger.throwArgumentError('invalid domain value \"verifyingContract\"', \"domain.verifyingContract\", value);\n },\n salt: function(value) {\n try {\n var bytes = (0, bytes_1.arrayify)(value);\n if (bytes.length !== 32) {\n throw new Error(\"bad length\");\n }\n return (0, bytes_1.hexlify)(bytes);\n } catch (error) {\n }\n return logger.throwArgumentError('invalid domain value \"salt\"', \"domain.salt\", value);\n }\n };\n function getBaseEncoder(type) {\n {\n var match = type.match(/^(u?)int(\\d*)$/);\n if (match) {\n var signed = match[1] === \"\";\n var width = parseInt(match[2] || \"256\");\n if (width % 8 !== 0 || width > 256 || match[2] && match[2] !== String(width)) {\n logger.throwArgumentError(\"invalid numeric width\", \"type\", type);\n }\n var boundsUpper_1 = MaxUint256.mask(signed ? width - 1 : width);\n var boundsLower_1 = signed ? boundsUpper_1.add(One).mul(NegativeOne) : Zero;\n return function(value) {\n var v2 = bignumber_1.BigNumber.from(value);\n if (v2.lt(boundsLower_1) || v2.gt(boundsUpper_1)) {\n logger.throwArgumentError(\"value out-of-bounds for \" + type, \"value\", value);\n }\n return (0, bytes_1.hexZeroPad)(v2.toTwos(256).toHexString(), 32);\n };\n }\n }\n {\n var match = type.match(/^bytes(\\d+)$/);\n if (match) {\n var width_1 = parseInt(match[1]);\n if (width_1 === 0 || width_1 > 32 || match[1] !== String(width_1)) {\n logger.throwArgumentError(\"invalid bytes width\", \"type\", type);\n }\n return function(value) {\n var bytes = (0, bytes_1.arrayify)(value);\n if (bytes.length !== width_1) {\n logger.throwArgumentError(\"invalid length for \" + type, \"value\", value);\n }\n return hexPadRight(value);\n };\n }\n }\n switch (type) {\n case \"address\":\n return function(value) {\n return (0, bytes_1.hexZeroPad)((0, address_1.getAddress)(value), 32);\n };\n case \"bool\":\n return function(value) {\n return !value ? hexFalse : hexTrue;\n };\n case \"bytes\":\n return function(value) {\n return (0, keccak256_1.keccak256)(value);\n };\n case \"string\":\n return function(value) {\n return (0, id_1.id)(value);\n };\n }\n return null;\n }\n function encodeType2(name, fields) {\n return name + \"(\" + fields.map(function(_a) {\n var name2 = _a.name, type = _a.type;\n return type + \" \" + name2;\n }).join(\",\") + \")\";\n }\n var TypedDataEncoder = (\n /** @class */\n function() {\n function TypedDataEncoder2(types) {\n (0, properties_1.defineReadOnly)(this, \"types\", Object.freeze((0, properties_1.deepCopy)(types)));\n (0, properties_1.defineReadOnly)(this, \"_encoderCache\", {});\n (0, properties_1.defineReadOnly)(this, \"_types\", {});\n var links = {};\n var parents = {};\n var subtypes = {};\n Object.keys(types).forEach(function(type) {\n links[type] = {};\n parents[type] = [];\n subtypes[type] = {};\n });\n var _loop_1 = function(name_12) {\n var uniqueNames = {};\n types[name_12].forEach(function(field) {\n if (uniqueNames[field.name]) {\n logger.throwArgumentError(\"duplicate variable name \" + JSON.stringify(field.name) + \" in \" + JSON.stringify(name_12), \"types\", types);\n }\n uniqueNames[field.name] = true;\n var baseType = field.type.match(/^([^\\x5b]*)(\\x5b|$)/)[1];\n if (baseType === name_12) {\n logger.throwArgumentError(\"circular type reference to \" + JSON.stringify(baseType), \"types\", types);\n }\n var encoder6 = getBaseEncoder(baseType);\n if (encoder6) {\n return;\n }\n if (!parents[baseType]) {\n logger.throwArgumentError(\"unknown type \" + JSON.stringify(baseType), \"types\", types);\n }\n parents[baseType].push(name_12);\n links[name_12][baseType] = true;\n });\n };\n for (var name_1 in types) {\n _loop_1(name_1);\n }\n var primaryTypes = Object.keys(parents).filter(function(n2) {\n return parents[n2].length === 0;\n });\n if (primaryTypes.length === 0) {\n logger.throwArgumentError(\"missing primary type\", \"types\", types);\n } else if (primaryTypes.length > 1) {\n logger.throwArgumentError(\"ambiguous primary types or unused types: \" + primaryTypes.map(function(t3) {\n return JSON.stringify(t3);\n }).join(\", \"), \"types\", types);\n }\n (0, properties_1.defineReadOnly)(this, \"primaryType\", primaryTypes[0]);\n function checkCircular(type, found) {\n if (found[type]) {\n logger.throwArgumentError(\"circular type reference to \" + JSON.stringify(type), \"types\", types);\n }\n found[type] = true;\n Object.keys(links[type]).forEach(function(child) {\n if (!parents[child]) {\n return;\n }\n checkCircular(child, found);\n Object.keys(found).forEach(function(subtype) {\n subtypes[subtype][child] = true;\n });\n });\n delete found[type];\n }\n checkCircular(this.primaryType, {});\n for (var name_2 in subtypes) {\n var st = Object.keys(subtypes[name_2]);\n st.sort();\n this._types[name_2] = encodeType2(name_2, types[name_2]) + st.map(function(t3) {\n return encodeType2(t3, types[t3]);\n }).join(\"\");\n }\n }\n TypedDataEncoder2.prototype.getEncoder = function(type) {\n var encoder6 = this._encoderCache[type];\n if (!encoder6) {\n encoder6 = this._encoderCache[type] = this._getEncoder(type);\n }\n return encoder6;\n };\n TypedDataEncoder2.prototype._getEncoder = function(type) {\n var _this = this;\n {\n var encoder6 = getBaseEncoder(type);\n if (encoder6) {\n return encoder6;\n }\n }\n var match = type.match(/^(.*)(\\x5b(\\d*)\\x5d)$/);\n if (match) {\n var subtype_1 = match[1];\n var subEncoder_1 = this.getEncoder(subtype_1);\n var length_1 = parseInt(match[3]);\n return function(value) {\n if (length_1 >= 0 && value.length !== length_1) {\n logger.throwArgumentError(\"array length mismatch; expected length ${ arrayLength }\", \"value\", value);\n }\n var result = value.map(subEncoder_1);\n if (_this._types[subtype_1]) {\n result = result.map(keccak256_1.keccak256);\n }\n return (0, keccak256_1.keccak256)((0, bytes_1.hexConcat)(result));\n };\n }\n var fields = this.types[type];\n if (fields) {\n var encodedType_1 = (0, id_1.id)(this._types[type]);\n return function(value) {\n var values = fields.map(function(_a) {\n var name = _a.name, type2 = _a.type;\n var result = _this.getEncoder(type2)(value[name]);\n if (_this._types[type2]) {\n return (0, keccak256_1.keccak256)(result);\n }\n return result;\n });\n values.unshift(encodedType_1);\n return (0, bytes_1.hexConcat)(values);\n };\n }\n return logger.throwArgumentError(\"unknown type: \" + type, \"type\", type);\n };\n TypedDataEncoder2.prototype.encodeType = function(name) {\n var result = this._types[name];\n if (!result) {\n logger.throwArgumentError(\"unknown type: \" + JSON.stringify(name), \"name\", name);\n }\n return result;\n };\n TypedDataEncoder2.prototype.encodeData = function(type, value) {\n return this.getEncoder(type)(value);\n };\n TypedDataEncoder2.prototype.hashStruct = function(name, value) {\n return (0, keccak256_1.keccak256)(this.encodeData(name, value));\n };\n TypedDataEncoder2.prototype.encode = function(value) {\n return this.encodeData(this.primaryType, value);\n };\n TypedDataEncoder2.prototype.hash = function(value) {\n return this.hashStruct(this.primaryType, value);\n };\n TypedDataEncoder2.prototype._visit = function(type, value, callback) {\n var _this = this;\n {\n var encoder6 = getBaseEncoder(type);\n if (encoder6) {\n return callback(type, value);\n }\n }\n var match = type.match(/^(.*)(\\x5b(\\d*)\\x5d)$/);\n if (match) {\n var subtype_2 = match[1];\n var length_2 = parseInt(match[3]);\n if (length_2 >= 0 && value.length !== length_2) {\n logger.throwArgumentError(\"array length mismatch; expected length ${ arrayLength }\", \"value\", value);\n }\n return value.map(function(v2) {\n return _this._visit(subtype_2, v2, callback);\n });\n }\n var fields = this.types[type];\n if (fields) {\n return fields.reduce(function(accum, _a) {\n var name = _a.name, type2 = _a.type;\n accum[name] = _this._visit(type2, value[name], callback);\n return accum;\n }, {});\n }\n return logger.throwArgumentError(\"unknown type: \" + type, \"type\", type);\n };\n TypedDataEncoder2.prototype.visit = function(value, callback) {\n return this._visit(this.primaryType, value, callback);\n };\n TypedDataEncoder2.from = function(types) {\n return new TypedDataEncoder2(types);\n };\n TypedDataEncoder2.getPrimaryType = function(types) {\n return TypedDataEncoder2.from(types).primaryType;\n };\n TypedDataEncoder2.hashStruct = function(name, types, value) {\n return TypedDataEncoder2.from(types).hashStruct(name, value);\n };\n TypedDataEncoder2.hashDomain = function(domain2) {\n var domainFields = [];\n for (var name_3 in domain2) {\n var type = domainFieldTypes[name_3];\n if (!type) {\n logger.throwArgumentError(\"invalid typed-data domain key: \" + JSON.stringify(name_3), \"domain\", domain2);\n }\n domainFields.push({ name: name_3, type });\n }\n domainFields.sort(function(a3, b4) {\n return domainFieldNames.indexOf(a3.name) - domainFieldNames.indexOf(b4.name);\n });\n return TypedDataEncoder2.hashStruct(\"EIP712Domain\", { EIP712Domain: domainFields }, domain2);\n };\n TypedDataEncoder2.encode = function(domain2, types, value) {\n return (0, bytes_1.hexConcat)([\n \"0x1901\",\n TypedDataEncoder2.hashDomain(domain2),\n TypedDataEncoder2.from(types).hash(value)\n ]);\n };\n TypedDataEncoder2.hash = function(domain2, types, value) {\n return (0, keccak256_1.keccak256)(TypedDataEncoder2.encode(domain2, types, value));\n };\n TypedDataEncoder2.resolveNames = function(domain2, types, value, resolveName) {\n return __awaiter3(this, void 0, void 0, function() {\n var ensCache, encoder6, _a, _b, _i, name_4, _c, _d;\n return __generator3(this, function(_e) {\n switch (_e.label) {\n case 0:\n domain2 = (0, properties_1.shallowCopy)(domain2);\n ensCache = {};\n if (domain2.verifyingContract && !(0, bytes_1.isHexString)(domain2.verifyingContract, 20)) {\n ensCache[domain2.verifyingContract] = \"0x\";\n }\n encoder6 = TypedDataEncoder2.from(types);\n encoder6.visit(value, function(type, value2) {\n if (type === \"address\" && !(0, bytes_1.isHexString)(value2, 20)) {\n ensCache[value2] = \"0x\";\n }\n return value2;\n });\n _a = [];\n for (_b in ensCache)\n _a.push(_b);\n _i = 0;\n _e.label = 1;\n case 1:\n if (!(_i < _a.length))\n return [3, 4];\n name_4 = _a[_i];\n _c = ensCache;\n _d = name_4;\n return [4, resolveName(name_4)];\n case 2:\n _c[_d] = _e.sent();\n _e.label = 3;\n case 3:\n _i++;\n return [3, 1];\n case 4:\n if (domain2.verifyingContract && ensCache[domain2.verifyingContract]) {\n domain2.verifyingContract = ensCache[domain2.verifyingContract];\n }\n value = encoder6.visit(value, function(type, value2) {\n if (type === \"address\" && ensCache[value2]) {\n return ensCache[value2];\n }\n return value2;\n });\n return [2, { domain: domain2, value }];\n }\n });\n });\n };\n TypedDataEncoder2.getPayload = function(domain2, types, value) {\n TypedDataEncoder2.hashDomain(domain2);\n var domainValues = {};\n var domainTypes = [];\n domainFieldNames.forEach(function(name) {\n var value2 = domain2[name];\n if (value2 == null) {\n return;\n }\n domainValues[name] = domainChecks[name](value2);\n domainTypes.push({ name, type: domainFieldTypes[name] });\n });\n var encoder6 = TypedDataEncoder2.from(types);\n var typesWithDomain = (0, properties_1.shallowCopy)(types);\n if (typesWithDomain.EIP712Domain) {\n logger.throwArgumentError(\"types must not contain EIP712Domain type\", \"types.EIP712Domain\", types);\n } else {\n typesWithDomain.EIP712Domain = domainTypes;\n }\n encoder6.encode(value);\n return {\n types: typesWithDomain,\n domain: domainValues,\n primaryType: encoder6.primaryType,\n message: encoder6.visit(value, function(type, value2) {\n if (type.match(/^bytes(\\d*)/)) {\n return (0, bytes_1.hexlify)((0, bytes_1.arrayify)(value2));\n }\n if (type.match(/^u?int/)) {\n return bignumber_1.BigNumber.from(value2).toString();\n }\n switch (type) {\n case \"address\":\n return value2.toLowerCase();\n case \"bool\":\n return !!value2;\n case \"string\":\n if (typeof value2 !== \"string\") {\n logger.throwArgumentError(\"invalid string\", \"value\", value2);\n }\n return value2;\n }\n return logger.throwArgumentError(\"unsupported type\", \"type\", type);\n })\n };\n };\n return TypedDataEncoder2;\n }()\n );\n exports3.TypedDataEncoder = TypedDataEncoder;\n }\n });\n\n // ../../../node_modules/.pnpm/@ethersproject+hash@5.8.0/node_modules/@ethersproject/hash/lib/index.js\n var require_lib12 = __commonJS({\n \"../../../node_modules/.pnpm/@ethersproject+hash@5.8.0/node_modules/@ethersproject/hash/lib/index.js\"(exports3) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n Object.defineProperty(exports3, \"__esModule\", { value: true });\n exports3._TypedDataEncoder = exports3.hashMessage = exports3.messagePrefix = exports3.ensNormalize = exports3.isValidName = exports3.namehash = exports3.dnsEncode = exports3.id = void 0;\n var id_1 = require_id();\n Object.defineProperty(exports3, \"id\", { enumerable: true, get: function() {\n return id_1.id;\n } });\n var namehash_1 = require_namehash();\n Object.defineProperty(exports3, \"dnsEncode\", { enumerable: true, get: function() {\n return namehash_1.dnsEncode;\n } });\n Object.defineProperty(exports3, \"isValidName\", { enumerable: true, get: function() {\n return namehash_1.isValidName;\n } });\n Object.defineProperty(exports3, \"namehash\", { enumerable: true, get: function() {\n return namehash_1.namehash;\n } });\n var message_1 = require_message();\n Object.defineProperty(exports3, \"hashMessage\", { enumerable: true, get: function() {\n return message_1.hashMessage;\n } });\n Object.defineProperty(exports3, \"messagePrefix\", { enumerable: true, get: function() {\n return message_1.messagePrefix;\n } });\n var namehash_2 = require_namehash();\n Object.defineProperty(exports3, \"ensNormalize\", { enumerable: true, get: function() {\n return namehash_2.ensNormalize;\n } });\n var typed_data_1 = require_typed_data();\n Object.defineProperty(exports3, \"_TypedDataEncoder\", { enumerable: true, get: function() {\n return typed_data_1.TypedDataEncoder;\n } });\n }\n });\n\n // ../../../node_modules/.pnpm/@ethersproject+abi@5.8.0/node_modules/@ethersproject/abi/lib/interface.js\n var require_interface = __commonJS({\n \"../../../node_modules/.pnpm/@ethersproject+abi@5.8.0/node_modules/@ethersproject/abi/lib/interface.js\"(exports3) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n var __extends3 = exports3 && exports3.__extends || /* @__PURE__ */ function() {\n var extendStatics3 = function(d5, b4) {\n extendStatics3 = Object.setPrototypeOf || { __proto__: [] } instanceof Array && function(d6, b5) {\n d6.__proto__ = b5;\n } || function(d6, b5) {\n for (var p4 in b5)\n if (Object.prototype.hasOwnProperty.call(b5, p4))\n d6[p4] = b5[p4];\n };\n return extendStatics3(d5, b4);\n };\n return function(d5, b4) {\n if (typeof b4 !== \"function\" && b4 !== null)\n throw new TypeError(\"Class extends value \" + String(b4) + \" is not a constructor or null\");\n extendStatics3(d5, b4);\n function __() {\n this.constructor = d5;\n }\n d5.prototype = b4 === null ? Object.create(b4) : (__.prototype = b4.prototype, new __());\n };\n }();\n Object.defineProperty(exports3, \"__esModule\", { value: true });\n exports3.Interface = exports3.Indexed = exports3.ErrorDescription = exports3.TransactionDescription = exports3.LogDescription = exports3.checkResultErrors = void 0;\n var address_1 = require_lib7();\n var bignumber_1 = require_lib3();\n var bytes_1 = require_lib2();\n var hash_1 = require_lib12();\n var keccak256_1 = require_lib5();\n var properties_1 = require_lib4();\n var abi_coder_1 = require_abi_coder();\n var abstract_coder_1 = require_abstract_coder();\n Object.defineProperty(exports3, \"checkResultErrors\", { enumerable: true, get: function() {\n return abstract_coder_1.checkResultErrors;\n } });\n var fragments_1 = require_fragments();\n var logger_1 = require_lib();\n var _version_1 = require_version5();\n var logger = new logger_1.Logger(_version_1.version);\n var LogDescription = (\n /** @class */\n function(_super) {\n __extends3(LogDescription2, _super);\n function LogDescription2() {\n return _super !== null && _super.apply(this, arguments) || this;\n }\n return LogDescription2;\n }(properties_1.Description)\n );\n exports3.LogDescription = LogDescription;\n var TransactionDescription = (\n /** @class */\n function(_super) {\n __extends3(TransactionDescription2, _super);\n function TransactionDescription2() {\n return _super !== null && _super.apply(this, arguments) || this;\n }\n return TransactionDescription2;\n }(properties_1.Description)\n );\n exports3.TransactionDescription = TransactionDescription;\n var ErrorDescription = (\n /** @class */\n function(_super) {\n __extends3(ErrorDescription2, _super);\n function ErrorDescription2() {\n return _super !== null && _super.apply(this, arguments) || this;\n }\n return ErrorDescription2;\n }(properties_1.Description)\n );\n exports3.ErrorDescription = ErrorDescription;\n var Indexed = (\n /** @class */\n function(_super) {\n __extends3(Indexed2, _super);\n function Indexed2() {\n return _super !== null && _super.apply(this, arguments) || this;\n }\n Indexed2.isIndexed = function(value) {\n return !!(value && value._isIndexed);\n };\n return Indexed2;\n }(properties_1.Description)\n );\n exports3.Indexed = Indexed;\n var BuiltinErrors = {\n \"0x08c379a0\": { signature: \"Error(string)\", name: \"Error\", inputs: [\"string\"], reason: true },\n \"0x4e487b71\": { signature: \"Panic(uint256)\", name: \"Panic\", inputs: [\"uint256\"] }\n };\n function wrapAccessError(property, error) {\n var wrap3 = new Error(\"deferred error during ABI decoding triggered accessing \" + property);\n wrap3.error = error;\n return wrap3;\n }\n var Interface = (\n /** @class */\n function() {\n function Interface2(fragments) {\n var _newTarget = this.constructor;\n var _this = this;\n var abi2 = [];\n if (typeof fragments === \"string\") {\n abi2 = JSON.parse(fragments);\n } else {\n abi2 = fragments;\n }\n (0, properties_1.defineReadOnly)(this, \"fragments\", abi2.map(function(fragment) {\n return fragments_1.Fragment.from(fragment);\n }).filter(function(fragment) {\n return fragment != null;\n }));\n (0, properties_1.defineReadOnly)(this, \"_abiCoder\", (0, properties_1.getStatic)(_newTarget, \"getAbiCoder\")());\n (0, properties_1.defineReadOnly)(this, \"functions\", {});\n (0, properties_1.defineReadOnly)(this, \"errors\", {});\n (0, properties_1.defineReadOnly)(this, \"events\", {});\n (0, properties_1.defineReadOnly)(this, \"structs\", {});\n this.fragments.forEach(function(fragment) {\n var bucket = null;\n switch (fragment.type) {\n case \"constructor\":\n if (_this.deploy) {\n logger.warn(\"duplicate definition - constructor\");\n return;\n }\n (0, properties_1.defineReadOnly)(_this, \"deploy\", fragment);\n return;\n case \"function\":\n bucket = _this.functions;\n break;\n case \"event\":\n bucket = _this.events;\n break;\n case \"error\":\n bucket = _this.errors;\n break;\n default:\n return;\n }\n var signature = fragment.format();\n if (bucket[signature]) {\n logger.warn(\"duplicate definition - \" + signature);\n return;\n }\n bucket[signature] = fragment;\n });\n if (!this.deploy) {\n (0, properties_1.defineReadOnly)(this, \"deploy\", fragments_1.ConstructorFragment.from({\n payable: false,\n type: \"constructor\"\n }));\n }\n (0, properties_1.defineReadOnly)(this, \"_isInterface\", true);\n }\n Interface2.prototype.format = function(format) {\n if (!format) {\n format = fragments_1.FormatTypes.full;\n }\n if (format === fragments_1.FormatTypes.sighash) {\n logger.throwArgumentError(\"interface does not support formatting sighash\", \"format\", format);\n }\n var abi2 = this.fragments.map(function(fragment) {\n return fragment.format(format);\n });\n if (format === fragments_1.FormatTypes.json) {\n return JSON.stringify(abi2.map(function(j2) {\n return JSON.parse(j2);\n }));\n }\n return abi2;\n };\n Interface2.getAbiCoder = function() {\n return abi_coder_1.defaultAbiCoder;\n };\n Interface2.getAddress = function(address) {\n return (0, address_1.getAddress)(address);\n };\n Interface2.getSighash = function(fragment) {\n return (0, bytes_1.hexDataSlice)((0, hash_1.id)(fragment.format()), 0, 4);\n };\n Interface2.getEventTopic = function(eventFragment) {\n return (0, hash_1.id)(eventFragment.format());\n };\n Interface2.prototype.getFunction = function(nameOrSignatureOrSighash) {\n if ((0, bytes_1.isHexString)(nameOrSignatureOrSighash)) {\n for (var name_1 in this.functions) {\n if (nameOrSignatureOrSighash === this.getSighash(name_1)) {\n return this.functions[name_1];\n }\n }\n logger.throwArgumentError(\"no matching function\", \"sighash\", nameOrSignatureOrSighash);\n }\n if (nameOrSignatureOrSighash.indexOf(\"(\") === -1) {\n var name_2 = nameOrSignatureOrSighash.trim();\n var matching = Object.keys(this.functions).filter(function(f6) {\n return f6.split(\n \"(\"\n /* fix:) */\n )[0] === name_2;\n });\n if (matching.length === 0) {\n logger.throwArgumentError(\"no matching function\", \"name\", name_2);\n } else if (matching.length > 1) {\n logger.throwArgumentError(\"multiple matching functions\", \"name\", name_2);\n }\n return this.functions[matching[0]];\n }\n var result = this.functions[fragments_1.FunctionFragment.fromString(nameOrSignatureOrSighash).format()];\n if (!result) {\n logger.throwArgumentError(\"no matching function\", \"signature\", nameOrSignatureOrSighash);\n }\n return result;\n };\n Interface2.prototype.getEvent = function(nameOrSignatureOrTopic) {\n if ((0, bytes_1.isHexString)(nameOrSignatureOrTopic)) {\n var topichash = nameOrSignatureOrTopic.toLowerCase();\n for (var name_3 in this.events) {\n if (topichash === this.getEventTopic(name_3)) {\n return this.events[name_3];\n }\n }\n logger.throwArgumentError(\"no matching event\", \"topichash\", topichash);\n }\n if (nameOrSignatureOrTopic.indexOf(\"(\") === -1) {\n var name_4 = nameOrSignatureOrTopic.trim();\n var matching = Object.keys(this.events).filter(function(f6) {\n return f6.split(\n \"(\"\n /* fix:) */\n )[0] === name_4;\n });\n if (matching.length === 0) {\n logger.throwArgumentError(\"no matching event\", \"name\", name_4);\n } else if (matching.length > 1) {\n logger.throwArgumentError(\"multiple matching events\", \"name\", name_4);\n }\n return this.events[matching[0]];\n }\n var result = this.events[fragments_1.EventFragment.fromString(nameOrSignatureOrTopic).format()];\n if (!result) {\n logger.throwArgumentError(\"no matching event\", \"signature\", nameOrSignatureOrTopic);\n }\n return result;\n };\n Interface2.prototype.getError = function(nameOrSignatureOrSighash) {\n if ((0, bytes_1.isHexString)(nameOrSignatureOrSighash)) {\n var getSighash = (0, properties_1.getStatic)(this.constructor, \"getSighash\");\n for (var name_5 in this.errors) {\n var error = this.errors[name_5];\n if (nameOrSignatureOrSighash === getSighash(error)) {\n return this.errors[name_5];\n }\n }\n logger.throwArgumentError(\"no matching error\", \"sighash\", nameOrSignatureOrSighash);\n }\n if (nameOrSignatureOrSighash.indexOf(\"(\") === -1) {\n var name_6 = nameOrSignatureOrSighash.trim();\n var matching = Object.keys(this.errors).filter(function(f6) {\n return f6.split(\n \"(\"\n /* fix:) */\n )[0] === name_6;\n });\n if (matching.length === 0) {\n logger.throwArgumentError(\"no matching error\", \"name\", name_6);\n } else if (matching.length > 1) {\n logger.throwArgumentError(\"multiple matching errors\", \"name\", name_6);\n }\n return this.errors[matching[0]];\n }\n var result = this.errors[fragments_1.FunctionFragment.fromString(nameOrSignatureOrSighash).format()];\n if (!result) {\n logger.throwArgumentError(\"no matching error\", \"signature\", nameOrSignatureOrSighash);\n }\n return result;\n };\n Interface2.prototype.getSighash = function(fragment) {\n if (typeof fragment === \"string\") {\n try {\n fragment = this.getFunction(fragment);\n } catch (error) {\n try {\n fragment = this.getError(fragment);\n } catch (_2) {\n throw error;\n }\n }\n }\n return (0, properties_1.getStatic)(this.constructor, \"getSighash\")(fragment);\n };\n Interface2.prototype.getEventTopic = function(eventFragment) {\n if (typeof eventFragment === \"string\") {\n eventFragment = this.getEvent(eventFragment);\n }\n return (0, properties_1.getStatic)(this.constructor, \"getEventTopic\")(eventFragment);\n };\n Interface2.prototype._decodeParams = function(params, data) {\n return this._abiCoder.decode(params, data);\n };\n Interface2.prototype._encodeParams = function(params, values) {\n return this._abiCoder.encode(params, values);\n };\n Interface2.prototype.encodeDeploy = function(values) {\n return this._encodeParams(this.deploy.inputs, values || []);\n };\n Interface2.prototype.decodeErrorResult = function(fragment, data) {\n if (typeof fragment === \"string\") {\n fragment = this.getError(fragment);\n }\n var bytes = (0, bytes_1.arrayify)(data);\n if ((0, bytes_1.hexlify)(bytes.slice(0, 4)) !== this.getSighash(fragment)) {\n logger.throwArgumentError(\"data signature does not match error \" + fragment.name + \".\", \"data\", (0, bytes_1.hexlify)(bytes));\n }\n return this._decodeParams(fragment.inputs, bytes.slice(4));\n };\n Interface2.prototype.encodeErrorResult = function(fragment, values) {\n if (typeof fragment === \"string\") {\n fragment = this.getError(fragment);\n }\n return (0, bytes_1.hexlify)((0, bytes_1.concat)([\n this.getSighash(fragment),\n this._encodeParams(fragment.inputs, values || [])\n ]));\n };\n Interface2.prototype.decodeFunctionData = function(functionFragment, data) {\n if (typeof functionFragment === \"string\") {\n functionFragment = this.getFunction(functionFragment);\n }\n var bytes = (0, bytes_1.arrayify)(data);\n if ((0, bytes_1.hexlify)(bytes.slice(0, 4)) !== this.getSighash(functionFragment)) {\n logger.throwArgumentError(\"data signature does not match function \" + functionFragment.name + \".\", \"data\", (0, bytes_1.hexlify)(bytes));\n }\n return this._decodeParams(functionFragment.inputs, bytes.slice(4));\n };\n Interface2.prototype.encodeFunctionData = function(functionFragment, values) {\n if (typeof functionFragment === \"string\") {\n functionFragment = this.getFunction(functionFragment);\n }\n return (0, bytes_1.hexlify)((0, bytes_1.concat)([\n this.getSighash(functionFragment),\n this._encodeParams(functionFragment.inputs, values || [])\n ]));\n };\n Interface2.prototype.decodeFunctionResult = function(functionFragment, data) {\n if (typeof functionFragment === \"string\") {\n functionFragment = this.getFunction(functionFragment);\n }\n var bytes = (0, bytes_1.arrayify)(data);\n var reason = null;\n var message = \"\";\n var errorArgs = null;\n var errorName = null;\n var errorSignature = null;\n switch (bytes.length % this._abiCoder._getWordSize()) {\n case 0:\n try {\n return this._abiCoder.decode(functionFragment.outputs, bytes);\n } catch (error2) {\n }\n break;\n case 4: {\n var selector = (0, bytes_1.hexlify)(bytes.slice(0, 4));\n var builtin = BuiltinErrors[selector];\n if (builtin) {\n errorArgs = this._abiCoder.decode(builtin.inputs, bytes.slice(4));\n errorName = builtin.name;\n errorSignature = builtin.signature;\n if (builtin.reason) {\n reason = errorArgs[0];\n }\n if (errorName === \"Error\") {\n message = \"; VM Exception while processing transaction: reverted with reason string \" + JSON.stringify(errorArgs[0]);\n } else if (errorName === \"Panic\") {\n message = \"; VM Exception while processing transaction: reverted with panic code \" + errorArgs[0];\n }\n } else {\n try {\n var error = this.getError(selector);\n errorArgs = this._abiCoder.decode(error.inputs, bytes.slice(4));\n errorName = error.name;\n errorSignature = error.format();\n } catch (error2) {\n }\n }\n break;\n }\n }\n return logger.throwError(\"call revert exception\" + message, logger_1.Logger.errors.CALL_EXCEPTION, {\n method: functionFragment.format(),\n data: (0, bytes_1.hexlify)(data),\n errorArgs,\n errorName,\n errorSignature,\n reason\n });\n };\n Interface2.prototype.encodeFunctionResult = function(functionFragment, values) {\n if (typeof functionFragment === \"string\") {\n functionFragment = this.getFunction(functionFragment);\n }\n return (0, bytes_1.hexlify)(this._abiCoder.encode(functionFragment.outputs, values || []));\n };\n Interface2.prototype.encodeFilterTopics = function(eventFragment, values) {\n var _this = this;\n if (typeof eventFragment === \"string\") {\n eventFragment = this.getEvent(eventFragment);\n }\n if (values.length > eventFragment.inputs.length) {\n logger.throwError(\"too many arguments for \" + eventFragment.format(), logger_1.Logger.errors.UNEXPECTED_ARGUMENT, {\n argument: \"values\",\n value: values\n });\n }\n var topics = [];\n if (!eventFragment.anonymous) {\n topics.push(this.getEventTopic(eventFragment));\n }\n var encodeTopic = function(param, value) {\n if (param.type === \"string\") {\n return (0, hash_1.id)(value);\n } else if (param.type === \"bytes\") {\n return (0, keccak256_1.keccak256)((0, bytes_1.hexlify)(value));\n }\n if (param.type === \"bool\" && typeof value === \"boolean\") {\n value = value ? \"0x01\" : \"0x00\";\n }\n if (param.type.match(/^u?int/)) {\n value = bignumber_1.BigNumber.from(value).toHexString();\n }\n if (param.type === \"address\") {\n _this._abiCoder.encode([\"address\"], [value]);\n }\n return (0, bytes_1.hexZeroPad)((0, bytes_1.hexlify)(value), 32);\n };\n values.forEach(function(value, index2) {\n var param = eventFragment.inputs[index2];\n if (!param.indexed) {\n if (value != null) {\n logger.throwArgumentError(\"cannot filter non-indexed parameters; must be null\", \"contract.\" + param.name, value);\n }\n return;\n }\n if (value == null) {\n topics.push(null);\n } else if (param.baseType === \"array\" || param.baseType === \"tuple\") {\n logger.throwArgumentError(\"filtering with tuples or arrays not supported\", \"contract.\" + param.name, value);\n } else if (Array.isArray(value)) {\n topics.push(value.map(function(value2) {\n return encodeTopic(param, value2);\n }));\n } else {\n topics.push(encodeTopic(param, value));\n }\n });\n while (topics.length && topics[topics.length - 1] === null) {\n topics.pop();\n }\n return topics;\n };\n Interface2.prototype.encodeEventLog = function(eventFragment, values) {\n var _this = this;\n if (typeof eventFragment === \"string\") {\n eventFragment = this.getEvent(eventFragment);\n }\n var topics = [];\n var dataTypes = [];\n var dataValues = [];\n if (!eventFragment.anonymous) {\n topics.push(this.getEventTopic(eventFragment));\n }\n if (values.length !== eventFragment.inputs.length) {\n logger.throwArgumentError(\"event arguments/values mismatch\", \"values\", values);\n }\n eventFragment.inputs.forEach(function(param, index2) {\n var value = values[index2];\n if (param.indexed) {\n if (param.type === \"string\") {\n topics.push((0, hash_1.id)(value));\n } else if (param.type === \"bytes\") {\n topics.push((0, keccak256_1.keccak256)(value));\n } else if (param.baseType === \"tuple\" || param.baseType === \"array\") {\n throw new Error(\"not implemented\");\n } else {\n topics.push(_this._abiCoder.encode([param.type], [value]));\n }\n } else {\n dataTypes.push(param);\n dataValues.push(value);\n }\n });\n return {\n data: this._abiCoder.encode(dataTypes, dataValues),\n topics\n };\n };\n Interface2.prototype.decodeEventLog = function(eventFragment, data, topics) {\n if (typeof eventFragment === \"string\") {\n eventFragment = this.getEvent(eventFragment);\n }\n if (topics != null && !eventFragment.anonymous) {\n var topicHash = this.getEventTopic(eventFragment);\n if (!(0, bytes_1.isHexString)(topics[0], 32) || topics[0].toLowerCase() !== topicHash) {\n logger.throwError(\"fragment/topic mismatch\", logger_1.Logger.errors.INVALID_ARGUMENT, { argument: \"topics[0]\", expected: topicHash, value: topics[0] });\n }\n topics = topics.slice(1);\n }\n var indexed = [];\n var nonIndexed = [];\n var dynamic = [];\n eventFragment.inputs.forEach(function(param, index2) {\n if (param.indexed) {\n if (param.type === \"string\" || param.type === \"bytes\" || param.baseType === \"tuple\" || param.baseType === \"array\") {\n indexed.push(fragments_1.ParamType.fromObject({ type: \"bytes32\", name: param.name }));\n dynamic.push(true);\n } else {\n indexed.push(param);\n dynamic.push(false);\n }\n } else {\n nonIndexed.push(param);\n dynamic.push(false);\n }\n });\n var resultIndexed = topics != null ? this._abiCoder.decode(indexed, (0, bytes_1.concat)(topics)) : null;\n var resultNonIndexed = this._abiCoder.decode(nonIndexed, data, true);\n var result = [];\n var nonIndexedIndex = 0, indexedIndex = 0;\n eventFragment.inputs.forEach(function(param, index2) {\n if (param.indexed) {\n if (resultIndexed == null) {\n result[index2] = new Indexed({ _isIndexed: true, hash: null });\n } else if (dynamic[index2]) {\n result[index2] = new Indexed({ _isIndexed: true, hash: resultIndexed[indexedIndex++] });\n } else {\n try {\n result[index2] = resultIndexed[indexedIndex++];\n } catch (error) {\n result[index2] = error;\n }\n }\n } else {\n try {\n result[index2] = resultNonIndexed[nonIndexedIndex++];\n } catch (error) {\n result[index2] = error;\n }\n }\n if (param.name && result[param.name] == null) {\n var value_1 = result[index2];\n if (value_1 instanceof Error) {\n Object.defineProperty(result, param.name, {\n enumerable: true,\n get: function() {\n throw wrapAccessError(\"property \" + JSON.stringify(param.name), value_1);\n }\n });\n } else {\n result[param.name] = value_1;\n }\n }\n });\n var _loop_1 = function(i4) {\n var value = result[i4];\n if (value instanceof Error) {\n Object.defineProperty(result, i4, {\n enumerable: true,\n get: function() {\n throw wrapAccessError(\"index \" + i4, value);\n }\n });\n }\n };\n for (var i3 = 0; i3 < result.length; i3++) {\n _loop_1(i3);\n }\n return Object.freeze(result);\n };\n Interface2.prototype.parseTransaction = function(tx) {\n var fragment = this.getFunction(tx.data.substring(0, 10).toLowerCase());\n if (!fragment) {\n return null;\n }\n return new TransactionDescription({\n args: this._abiCoder.decode(fragment.inputs, \"0x\" + tx.data.substring(10)),\n functionFragment: fragment,\n name: fragment.name,\n signature: fragment.format(),\n sighash: this.getSighash(fragment),\n value: bignumber_1.BigNumber.from(tx.value || \"0\")\n });\n };\n Interface2.prototype.parseLog = function(log) {\n var fragment = this.getEvent(log.topics[0]);\n if (!fragment || fragment.anonymous) {\n return null;\n }\n return new LogDescription({\n eventFragment: fragment,\n name: fragment.name,\n signature: fragment.format(),\n topic: this.getEventTopic(fragment),\n args: this.decodeEventLog(fragment, log.data, log.topics)\n });\n };\n Interface2.prototype.parseError = function(data) {\n var hexData = (0, bytes_1.hexlify)(data);\n var fragment = this.getError(hexData.substring(0, 10).toLowerCase());\n if (!fragment) {\n return null;\n }\n return new ErrorDescription({\n args: this._abiCoder.decode(fragment.inputs, \"0x\" + hexData.substring(10)),\n errorFragment: fragment,\n name: fragment.name,\n signature: fragment.format(),\n sighash: this.getSighash(fragment)\n });\n };\n Interface2.isInterface = function(value) {\n return !!(value && value._isInterface);\n };\n return Interface2;\n }()\n );\n exports3.Interface = Interface;\n }\n });\n\n // ../../../node_modules/.pnpm/@ethersproject+abi@5.8.0/node_modules/@ethersproject/abi/lib/index.js\n var require_lib13 = __commonJS({\n \"../../../node_modules/.pnpm/@ethersproject+abi@5.8.0/node_modules/@ethersproject/abi/lib/index.js\"(exports3) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n Object.defineProperty(exports3, \"__esModule\", { value: true });\n exports3.TransactionDescription = exports3.LogDescription = exports3.checkResultErrors = exports3.Indexed = exports3.Interface = exports3.defaultAbiCoder = exports3.AbiCoder = exports3.FormatTypes = exports3.ParamType = exports3.FunctionFragment = exports3.Fragment = exports3.EventFragment = exports3.ErrorFragment = exports3.ConstructorFragment = void 0;\n var fragments_1 = require_fragments();\n Object.defineProperty(exports3, \"ConstructorFragment\", { enumerable: true, get: function() {\n return fragments_1.ConstructorFragment;\n } });\n Object.defineProperty(exports3, \"ErrorFragment\", { enumerable: true, get: function() {\n return fragments_1.ErrorFragment;\n } });\n Object.defineProperty(exports3, \"EventFragment\", { enumerable: true, get: function() {\n return fragments_1.EventFragment;\n } });\n Object.defineProperty(exports3, \"FormatTypes\", { enumerable: true, get: function() {\n return fragments_1.FormatTypes;\n } });\n Object.defineProperty(exports3, \"Fragment\", { enumerable: true, get: function() {\n return fragments_1.Fragment;\n } });\n Object.defineProperty(exports3, \"FunctionFragment\", { enumerable: true, get: function() {\n return fragments_1.FunctionFragment;\n } });\n Object.defineProperty(exports3, \"ParamType\", { enumerable: true, get: function() {\n return fragments_1.ParamType;\n } });\n var abi_coder_1 = require_abi_coder();\n Object.defineProperty(exports3, \"AbiCoder\", { enumerable: true, get: function() {\n return abi_coder_1.AbiCoder;\n } });\n Object.defineProperty(exports3, \"defaultAbiCoder\", { enumerable: true, get: function() {\n return abi_coder_1.defaultAbiCoder;\n } });\n var interface_1 = require_interface();\n Object.defineProperty(exports3, \"checkResultErrors\", { enumerable: true, get: function() {\n return interface_1.checkResultErrors;\n } });\n Object.defineProperty(exports3, \"Indexed\", { enumerable: true, get: function() {\n return interface_1.Indexed;\n } });\n Object.defineProperty(exports3, \"Interface\", { enumerable: true, get: function() {\n return interface_1.Interface;\n } });\n Object.defineProperty(exports3, \"LogDescription\", { enumerable: true, get: function() {\n return interface_1.LogDescription;\n } });\n Object.defineProperty(exports3, \"TransactionDescription\", { enumerable: true, get: function() {\n return interface_1.TransactionDescription;\n } });\n }\n });\n\n // ../../../node_modules/.pnpm/@ethersproject+abstract-provider@5.8.0/node_modules/@ethersproject/abstract-provider/lib/_version.js\n var require_version10 = __commonJS({\n \"../../../node_modules/.pnpm/@ethersproject+abstract-provider@5.8.0/node_modules/@ethersproject/abstract-provider/lib/_version.js\"(exports3) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n Object.defineProperty(exports3, \"__esModule\", { value: true });\n exports3.version = void 0;\n exports3.version = \"abstract-provider/5.8.0\";\n }\n });\n\n // ../../../node_modules/.pnpm/@ethersproject+abstract-provider@5.8.0/node_modules/@ethersproject/abstract-provider/lib/index.js\n var require_lib14 = __commonJS({\n \"../../../node_modules/.pnpm/@ethersproject+abstract-provider@5.8.0/node_modules/@ethersproject/abstract-provider/lib/index.js\"(exports3) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n var __extends3 = exports3 && exports3.__extends || /* @__PURE__ */ function() {\n var extendStatics3 = function(d5, b4) {\n extendStatics3 = Object.setPrototypeOf || { __proto__: [] } instanceof Array && function(d6, b5) {\n d6.__proto__ = b5;\n } || function(d6, b5) {\n for (var p4 in b5)\n if (Object.prototype.hasOwnProperty.call(b5, p4))\n d6[p4] = b5[p4];\n };\n return extendStatics3(d5, b4);\n };\n return function(d5, b4) {\n if (typeof b4 !== \"function\" && b4 !== null)\n throw new TypeError(\"Class extends value \" + String(b4) + \" is not a constructor or null\");\n extendStatics3(d5, b4);\n function __() {\n this.constructor = d5;\n }\n d5.prototype = b4 === null ? Object.create(b4) : (__.prototype = b4.prototype, new __());\n };\n }();\n var __awaiter3 = exports3 && exports3.__awaiter || function(thisArg, _arguments, P2, generator) {\n function adopt(value) {\n return value instanceof P2 ? value : new P2(function(resolve) {\n resolve(value);\n });\n }\n return new (P2 || (P2 = Promise))(function(resolve, reject) {\n function fulfilled(value) {\n try {\n step(generator.next(value));\n } catch (e3) {\n reject(e3);\n }\n }\n function rejected(value) {\n try {\n step(generator[\"throw\"](value));\n } catch (e3) {\n reject(e3);\n }\n }\n function step(result) {\n result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected);\n }\n step((generator = generator.apply(thisArg, _arguments || [])).next());\n });\n };\n var __generator3 = exports3 && exports3.__generator || function(thisArg, body) {\n var _2 = { label: 0, sent: function() {\n if (t3[0] & 1)\n throw t3[1];\n return t3[1];\n }, trys: [], ops: [] }, f6, y6, t3, g4;\n return g4 = { next: verb(0), \"throw\": verb(1), \"return\": verb(2) }, typeof Symbol === \"function\" && (g4[Symbol.iterator] = function() {\n return this;\n }), g4;\n function verb(n2) {\n return function(v2) {\n return step([n2, v2]);\n };\n }\n function step(op) {\n if (f6)\n throw new TypeError(\"Generator is already executing.\");\n while (_2)\n try {\n if (f6 = 1, y6 && (t3 = op[0] & 2 ? y6[\"return\"] : op[0] ? y6[\"throw\"] || ((t3 = y6[\"return\"]) && t3.call(y6), 0) : y6.next) && !(t3 = t3.call(y6, op[1])).done)\n return t3;\n if (y6 = 0, t3)\n op = [op[0] & 2, t3.value];\n switch (op[0]) {\n case 0:\n case 1:\n t3 = op;\n break;\n case 4:\n _2.label++;\n return { value: op[1], done: false };\n case 5:\n _2.label++;\n y6 = op[1];\n op = [0];\n continue;\n case 7:\n op = _2.ops.pop();\n _2.trys.pop();\n continue;\n default:\n if (!(t3 = _2.trys, t3 = t3.length > 0 && t3[t3.length - 1]) && (op[0] === 6 || op[0] === 2)) {\n _2 = 0;\n continue;\n }\n if (op[0] === 3 && (!t3 || op[1] > t3[0] && op[1] < t3[3])) {\n _2.label = op[1];\n break;\n }\n if (op[0] === 6 && _2.label < t3[1]) {\n _2.label = t3[1];\n t3 = op;\n break;\n }\n if (t3 && _2.label < t3[2]) {\n _2.label = t3[2];\n _2.ops.push(op);\n break;\n }\n if (t3[2])\n _2.ops.pop();\n _2.trys.pop();\n continue;\n }\n op = body.call(thisArg, _2);\n } catch (e3) {\n op = [6, e3];\n y6 = 0;\n } finally {\n f6 = t3 = 0;\n }\n if (op[0] & 5)\n throw op[1];\n return { value: op[0] ? op[1] : void 0, done: true };\n }\n };\n Object.defineProperty(exports3, \"__esModule\", { value: true });\n exports3.Provider = exports3.TransactionOrderForkEvent = exports3.TransactionForkEvent = exports3.BlockForkEvent = exports3.ForkEvent = void 0;\n var bignumber_1 = require_lib3();\n var bytes_1 = require_lib2();\n var properties_1 = require_lib4();\n var logger_1 = require_lib();\n var _version_1 = require_version10();\n var logger = new logger_1.Logger(_version_1.version);\n var ForkEvent = (\n /** @class */\n function(_super) {\n __extends3(ForkEvent2, _super);\n function ForkEvent2() {\n return _super !== null && _super.apply(this, arguments) || this;\n }\n ForkEvent2.isForkEvent = function(value) {\n return !!(value && value._isForkEvent);\n };\n return ForkEvent2;\n }(properties_1.Description)\n );\n exports3.ForkEvent = ForkEvent;\n var BlockForkEvent = (\n /** @class */\n function(_super) {\n __extends3(BlockForkEvent2, _super);\n function BlockForkEvent2(blockHash, expiry) {\n var _this = this;\n if (!(0, bytes_1.isHexString)(blockHash, 32)) {\n logger.throwArgumentError(\"invalid blockHash\", \"blockHash\", blockHash);\n }\n _this = _super.call(this, {\n _isForkEvent: true,\n _isBlockForkEvent: true,\n expiry: expiry || 0,\n blockHash\n }) || this;\n return _this;\n }\n return BlockForkEvent2;\n }(ForkEvent)\n );\n exports3.BlockForkEvent = BlockForkEvent;\n var TransactionForkEvent = (\n /** @class */\n function(_super) {\n __extends3(TransactionForkEvent2, _super);\n function TransactionForkEvent2(hash3, expiry) {\n var _this = this;\n if (!(0, bytes_1.isHexString)(hash3, 32)) {\n logger.throwArgumentError(\"invalid transaction hash\", \"hash\", hash3);\n }\n _this = _super.call(this, {\n _isForkEvent: true,\n _isTransactionForkEvent: true,\n expiry: expiry || 0,\n hash: hash3\n }) || this;\n return _this;\n }\n return TransactionForkEvent2;\n }(ForkEvent)\n );\n exports3.TransactionForkEvent = TransactionForkEvent;\n var TransactionOrderForkEvent = (\n /** @class */\n function(_super) {\n __extends3(TransactionOrderForkEvent2, _super);\n function TransactionOrderForkEvent2(beforeHash, afterHash, expiry) {\n var _this = this;\n if (!(0, bytes_1.isHexString)(beforeHash, 32)) {\n logger.throwArgumentError(\"invalid transaction hash\", \"beforeHash\", beforeHash);\n }\n if (!(0, bytes_1.isHexString)(afterHash, 32)) {\n logger.throwArgumentError(\"invalid transaction hash\", \"afterHash\", afterHash);\n }\n _this = _super.call(this, {\n _isForkEvent: true,\n _isTransactionOrderForkEvent: true,\n expiry: expiry || 0,\n beforeHash,\n afterHash\n }) || this;\n return _this;\n }\n return TransactionOrderForkEvent2;\n }(ForkEvent)\n );\n exports3.TransactionOrderForkEvent = TransactionOrderForkEvent;\n var Provider = (\n /** @class */\n function() {\n function Provider2() {\n var _newTarget = this.constructor;\n logger.checkAbstract(_newTarget, Provider2);\n (0, properties_1.defineReadOnly)(this, \"_isProvider\", true);\n }\n Provider2.prototype.getFeeData = function() {\n return __awaiter3(this, void 0, void 0, function() {\n var _a, block, gasPrice, lastBaseFeePerGas, maxFeePerGas, maxPriorityFeePerGas;\n return __generator3(this, function(_b) {\n switch (_b.label) {\n case 0:\n return [4, (0, properties_1.resolveProperties)({\n block: this.getBlock(\"latest\"),\n gasPrice: this.getGasPrice().catch(function(error) {\n return null;\n })\n })];\n case 1:\n _a = _b.sent(), block = _a.block, gasPrice = _a.gasPrice;\n lastBaseFeePerGas = null, maxFeePerGas = null, maxPriorityFeePerGas = null;\n if (block && block.baseFeePerGas) {\n lastBaseFeePerGas = block.baseFeePerGas;\n maxPriorityFeePerGas = bignumber_1.BigNumber.from(\"1500000000\");\n maxFeePerGas = block.baseFeePerGas.mul(2).add(maxPriorityFeePerGas);\n }\n return [2, { lastBaseFeePerGas, maxFeePerGas, maxPriorityFeePerGas, gasPrice }];\n }\n });\n });\n };\n Provider2.prototype.addListener = function(eventName, listener) {\n return this.on(eventName, listener);\n };\n Provider2.prototype.removeListener = function(eventName, listener) {\n return this.off(eventName, listener);\n };\n Provider2.isProvider = function(value) {\n return !!(value && value._isProvider);\n };\n return Provider2;\n }()\n );\n exports3.Provider = Provider;\n }\n });\n\n // ../../../node_modules/.pnpm/@ethersproject+abstract-signer@5.8.0/node_modules/@ethersproject/abstract-signer/lib/_version.js\n var require_version11 = __commonJS({\n \"../../../node_modules/.pnpm/@ethersproject+abstract-signer@5.8.0/node_modules/@ethersproject/abstract-signer/lib/_version.js\"(exports3) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n Object.defineProperty(exports3, \"__esModule\", { value: true });\n exports3.version = void 0;\n exports3.version = \"abstract-signer/5.8.0\";\n }\n });\n\n // ../../../node_modules/.pnpm/@ethersproject+abstract-signer@5.8.0/node_modules/@ethersproject/abstract-signer/lib/index.js\n var require_lib15 = __commonJS({\n \"../../../node_modules/.pnpm/@ethersproject+abstract-signer@5.8.0/node_modules/@ethersproject/abstract-signer/lib/index.js\"(exports3) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n var __extends3 = exports3 && exports3.__extends || /* @__PURE__ */ function() {\n var extendStatics3 = function(d5, b4) {\n extendStatics3 = Object.setPrototypeOf || { __proto__: [] } instanceof Array && function(d6, b5) {\n d6.__proto__ = b5;\n } || function(d6, b5) {\n for (var p4 in b5)\n if (Object.prototype.hasOwnProperty.call(b5, p4))\n d6[p4] = b5[p4];\n };\n return extendStatics3(d5, b4);\n };\n return function(d5, b4) {\n if (typeof b4 !== \"function\" && b4 !== null)\n throw new TypeError(\"Class extends value \" + String(b4) + \" is not a constructor or null\");\n extendStatics3(d5, b4);\n function __() {\n this.constructor = d5;\n }\n d5.prototype = b4 === null ? Object.create(b4) : (__.prototype = b4.prototype, new __());\n };\n }();\n var __awaiter3 = exports3 && exports3.__awaiter || function(thisArg, _arguments, P2, generator) {\n function adopt(value) {\n return value instanceof P2 ? value : new P2(function(resolve) {\n resolve(value);\n });\n }\n return new (P2 || (P2 = Promise))(function(resolve, reject) {\n function fulfilled(value) {\n try {\n step(generator.next(value));\n } catch (e3) {\n reject(e3);\n }\n }\n function rejected(value) {\n try {\n step(generator[\"throw\"](value));\n } catch (e3) {\n reject(e3);\n }\n }\n function step(result) {\n result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected);\n }\n step((generator = generator.apply(thisArg, _arguments || [])).next());\n });\n };\n var __generator3 = exports3 && exports3.__generator || function(thisArg, body) {\n var _2 = { label: 0, sent: function() {\n if (t3[0] & 1)\n throw t3[1];\n return t3[1];\n }, trys: [], ops: [] }, f6, y6, t3, g4;\n return g4 = { next: verb(0), \"throw\": verb(1), \"return\": verb(2) }, typeof Symbol === \"function\" && (g4[Symbol.iterator] = function() {\n return this;\n }), g4;\n function verb(n2) {\n return function(v2) {\n return step([n2, v2]);\n };\n }\n function step(op) {\n if (f6)\n throw new TypeError(\"Generator is already executing.\");\n while (_2)\n try {\n if (f6 = 1, y6 && (t3 = op[0] & 2 ? y6[\"return\"] : op[0] ? y6[\"throw\"] || ((t3 = y6[\"return\"]) && t3.call(y6), 0) : y6.next) && !(t3 = t3.call(y6, op[1])).done)\n return t3;\n if (y6 = 0, t3)\n op = [op[0] & 2, t3.value];\n switch (op[0]) {\n case 0:\n case 1:\n t3 = op;\n break;\n case 4:\n _2.label++;\n return { value: op[1], done: false };\n case 5:\n _2.label++;\n y6 = op[1];\n op = [0];\n continue;\n case 7:\n op = _2.ops.pop();\n _2.trys.pop();\n continue;\n default:\n if (!(t3 = _2.trys, t3 = t3.length > 0 && t3[t3.length - 1]) && (op[0] === 6 || op[0] === 2)) {\n _2 = 0;\n continue;\n }\n if (op[0] === 3 && (!t3 || op[1] > t3[0] && op[1] < t3[3])) {\n _2.label = op[1];\n break;\n }\n if (op[0] === 6 && _2.label < t3[1]) {\n _2.label = t3[1];\n t3 = op;\n break;\n }\n if (t3 && _2.label < t3[2]) {\n _2.label = t3[2];\n _2.ops.push(op);\n break;\n }\n if (t3[2])\n _2.ops.pop();\n _2.trys.pop();\n continue;\n }\n op = body.call(thisArg, _2);\n } catch (e3) {\n op = [6, e3];\n y6 = 0;\n } finally {\n f6 = t3 = 0;\n }\n if (op[0] & 5)\n throw op[1];\n return { value: op[0] ? op[1] : void 0, done: true };\n }\n };\n Object.defineProperty(exports3, \"__esModule\", { value: true });\n exports3.VoidSigner = exports3.Signer = void 0;\n var properties_1 = require_lib4();\n var logger_1 = require_lib();\n var _version_1 = require_version11();\n var logger = new logger_1.Logger(_version_1.version);\n var allowedTransactionKeys = [\n \"accessList\",\n \"ccipReadEnabled\",\n \"chainId\",\n \"customData\",\n \"data\",\n \"from\",\n \"gasLimit\",\n \"gasPrice\",\n \"maxFeePerGas\",\n \"maxPriorityFeePerGas\",\n \"nonce\",\n \"to\",\n \"type\",\n \"value\"\n ];\n var forwardErrors = [\n logger_1.Logger.errors.INSUFFICIENT_FUNDS,\n logger_1.Logger.errors.NONCE_EXPIRED,\n logger_1.Logger.errors.REPLACEMENT_UNDERPRICED\n ];\n var Signer = (\n /** @class */\n function() {\n function Signer2() {\n var _newTarget = this.constructor;\n logger.checkAbstract(_newTarget, Signer2);\n (0, properties_1.defineReadOnly)(this, \"_isSigner\", true);\n }\n Signer2.prototype.getBalance = function(blockTag) {\n return __awaiter3(this, void 0, void 0, function() {\n return __generator3(this, function(_a) {\n switch (_a.label) {\n case 0:\n this._checkProvider(\"getBalance\");\n return [4, this.provider.getBalance(this.getAddress(), blockTag)];\n case 1:\n return [2, _a.sent()];\n }\n });\n });\n };\n Signer2.prototype.getTransactionCount = function(blockTag) {\n return __awaiter3(this, void 0, void 0, function() {\n return __generator3(this, function(_a) {\n switch (_a.label) {\n case 0:\n this._checkProvider(\"getTransactionCount\");\n return [4, this.provider.getTransactionCount(this.getAddress(), blockTag)];\n case 1:\n return [2, _a.sent()];\n }\n });\n });\n };\n Signer2.prototype.estimateGas = function(transaction) {\n return __awaiter3(this, void 0, void 0, function() {\n var tx;\n return __generator3(this, function(_a) {\n switch (_a.label) {\n case 0:\n this._checkProvider(\"estimateGas\");\n return [4, (0, properties_1.resolveProperties)(this.checkTransaction(transaction))];\n case 1:\n tx = _a.sent();\n return [4, this.provider.estimateGas(tx)];\n case 2:\n return [2, _a.sent()];\n }\n });\n });\n };\n Signer2.prototype.call = function(transaction, blockTag) {\n return __awaiter3(this, void 0, void 0, function() {\n var tx;\n return __generator3(this, function(_a) {\n switch (_a.label) {\n case 0:\n this._checkProvider(\"call\");\n return [4, (0, properties_1.resolveProperties)(this.checkTransaction(transaction))];\n case 1:\n tx = _a.sent();\n return [4, this.provider.call(tx, blockTag)];\n case 2:\n return [2, _a.sent()];\n }\n });\n });\n };\n Signer2.prototype.sendTransaction = function(transaction) {\n return __awaiter3(this, void 0, void 0, function() {\n var tx, signedTx;\n return __generator3(this, function(_a) {\n switch (_a.label) {\n case 0:\n this._checkProvider(\"sendTransaction\");\n return [4, this.populateTransaction(transaction)];\n case 1:\n tx = _a.sent();\n return [4, this.signTransaction(tx)];\n case 2:\n signedTx = _a.sent();\n return [4, this.provider.sendTransaction(signedTx)];\n case 3:\n return [2, _a.sent()];\n }\n });\n });\n };\n Signer2.prototype.getChainId = function() {\n return __awaiter3(this, void 0, void 0, function() {\n var network;\n return __generator3(this, function(_a) {\n switch (_a.label) {\n case 0:\n this._checkProvider(\"getChainId\");\n return [4, this.provider.getNetwork()];\n case 1:\n network = _a.sent();\n return [2, network.chainId];\n }\n });\n });\n };\n Signer2.prototype.getGasPrice = function() {\n return __awaiter3(this, void 0, void 0, function() {\n return __generator3(this, function(_a) {\n switch (_a.label) {\n case 0:\n this._checkProvider(\"getGasPrice\");\n return [4, this.provider.getGasPrice()];\n case 1:\n return [2, _a.sent()];\n }\n });\n });\n };\n Signer2.prototype.getFeeData = function() {\n return __awaiter3(this, void 0, void 0, function() {\n return __generator3(this, function(_a) {\n switch (_a.label) {\n case 0:\n this._checkProvider(\"getFeeData\");\n return [4, this.provider.getFeeData()];\n case 1:\n return [2, _a.sent()];\n }\n });\n });\n };\n Signer2.prototype.resolveName = function(name) {\n return __awaiter3(this, void 0, void 0, function() {\n return __generator3(this, function(_a) {\n switch (_a.label) {\n case 0:\n this._checkProvider(\"resolveName\");\n return [4, this.provider.resolveName(name)];\n case 1:\n return [2, _a.sent()];\n }\n });\n });\n };\n Signer2.prototype.checkTransaction = function(transaction) {\n for (var key in transaction) {\n if (allowedTransactionKeys.indexOf(key) === -1) {\n logger.throwArgumentError(\"invalid transaction key: \" + key, \"transaction\", transaction);\n }\n }\n var tx = (0, properties_1.shallowCopy)(transaction);\n if (tx.from == null) {\n tx.from = this.getAddress();\n } else {\n tx.from = Promise.all([\n Promise.resolve(tx.from),\n this.getAddress()\n ]).then(function(result) {\n if (result[0].toLowerCase() !== result[1].toLowerCase()) {\n logger.throwArgumentError(\"from address mismatch\", \"transaction\", transaction);\n }\n return result[0];\n });\n }\n return tx;\n };\n Signer2.prototype.populateTransaction = function(transaction) {\n return __awaiter3(this, void 0, void 0, function() {\n var tx, hasEip1559, feeData, gasPrice;\n var _this = this;\n return __generator3(this, function(_a) {\n switch (_a.label) {\n case 0:\n return [4, (0, properties_1.resolveProperties)(this.checkTransaction(transaction))];\n case 1:\n tx = _a.sent();\n if (tx.to != null) {\n tx.to = Promise.resolve(tx.to).then(function(to) {\n return __awaiter3(_this, void 0, void 0, function() {\n var address;\n return __generator3(this, function(_a2) {\n switch (_a2.label) {\n case 0:\n if (to == null) {\n return [2, null];\n }\n return [4, this.resolveName(to)];\n case 1:\n address = _a2.sent();\n if (address == null) {\n logger.throwArgumentError(\"provided ENS name resolves to null\", \"tx.to\", to);\n }\n return [2, address];\n }\n });\n });\n });\n tx.to.catch(function(error) {\n });\n }\n hasEip1559 = tx.maxFeePerGas != null || tx.maxPriorityFeePerGas != null;\n if (tx.gasPrice != null && (tx.type === 2 || hasEip1559)) {\n logger.throwArgumentError(\"eip-1559 transaction do not support gasPrice\", \"transaction\", transaction);\n } else if ((tx.type === 0 || tx.type === 1) && hasEip1559) {\n logger.throwArgumentError(\"pre-eip-1559 transaction do not support maxFeePerGas/maxPriorityFeePerGas\", \"transaction\", transaction);\n }\n if (!((tx.type === 2 || tx.type == null) && (tx.maxFeePerGas != null && tx.maxPriorityFeePerGas != null)))\n return [3, 2];\n tx.type = 2;\n return [3, 5];\n case 2:\n if (!(tx.type === 0 || tx.type === 1))\n return [3, 3];\n if (tx.gasPrice == null) {\n tx.gasPrice = this.getGasPrice();\n }\n return [3, 5];\n case 3:\n return [4, this.getFeeData()];\n case 4:\n feeData = _a.sent();\n if (tx.type == null) {\n if (feeData.maxFeePerGas != null && feeData.maxPriorityFeePerGas != null) {\n tx.type = 2;\n if (tx.gasPrice != null) {\n gasPrice = tx.gasPrice;\n delete tx.gasPrice;\n tx.maxFeePerGas = gasPrice;\n tx.maxPriorityFeePerGas = gasPrice;\n } else {\n if (tx.maxFeePerGas == null) {\n tx.maxFeePerGas = feeData.maxFeePerGas;\n }\n if (tx.maxPriorityFeePerGas == null) {\n tx.maxPriorityFeePerGas = feeData.maxPriorityFeePerGas;\n }\n }\n } else if (feeData.gasPrice != null) {\n if (hasEip1559) {\n logger.throwError(\"network does not support EIP-1559\", logger_1.Logger.errors.UNSUPPORTED_OPERATION, {\n operation: \"populateTransaction\"\n });\n }\n if (tx.gasPrice == null) {\n tx.gasPrice = feeData.gasPrice;\n }\n tx.type = 0;\n } else {\n logger.throwError(\"failed to get consistent fee data\", logger_1.Logger.errors.UNSUPPORTED_OPERATION, {\n operation: \"signer.getFeeData\"\n });\n }\n } else if (tx.type === 2) {\n if (tx.maxFeePerGas == null) {\n tx.maxFeePerGas = feeData.maxFeePerGas;\n }\n if (tx.maxPriorityFeePerGas == null) {\n tx.maxPriorityFeePerGas = feeData.maxPriorityFeePerGas;\n }\n }\n _a.label = 5;\n case 5:\n if (tx.nonce == null) {\n tx.nonce = this.getTransactionCount(\"pending\");\n }\n if (tx.gasLimit == null) {\n tx.gasLimit = this.estimateGas(tx).catch(function(error) {\n if (forwardErrors.indexOf(error.code) >= 0) {\n throw error;\n }\n return logger.throwError(\"cannot estimate gas; transaction may fail or may require manual gas limit\", logger_1.Logger.errors.UNPREDICTABLE_GAS_LIMIT, {\n error,\n tx\n });\n });\n }\n if (tx.chainId == null) {\n tx.chainId = this.getChainId();\n } else {\n tx.chainId = Promise.all([\n Promise.resolve(tx.chainId),\n this.getChainId()\n ]).then(function(results) {\n if (results[1] !== 0 && results[0] !== results[1]) {\n logger.throwArgumentError(\"chainId address mismatch\", \"transaction\", transaction);\n }\n return results[0];\n });\n }\n return [4, (0, properties_1.resolveProperties)(tx)];\n case 6:\n return [2, _a.sent()];\n }\n });\n });\n };\n Signer2.prototype._checkProvider = function(operation) {\n if (!this.provider) {\n logger.throwError(\"missing provider\", logger_1.Logger.errors.UNSUPPORTED_OPERATION, {\n operation: operation || \"_checkProvider\"\n });\n }\n };\n Signer2.isSigner = function(value) {\n return !!(value && value._isSigner);\n };\n return Signer2;\n }()\n );\n exports3.Signer = Signer;\n var VoidSigner = (\n /** @class */\n function(_super) {\n __extends3(VoidSigner2, _super);\n function VoidSigner2(address, provider) {\n var _this = _super.call(this) || this;\n (0, properties_1.defineReadOnly)(_this, \"address\", address);\n (0, properties_1.defineReadOnly)(_this, \"provider\", provider || null);\n return _this;\n }\n VoidSigner2.prototype.getAddress = function() {\n return Promise.resolve(this.address);\n };\n VoidSigner2.prototype._fail = function(message, operation) {\n return Promise.resolve().then(function() {\n logger.throwError(message, logger_1.Logger.errors.UNSUPPORTED_OPERATION, { operation });\n });\n };\n VoidSigner2.prototype.signMessage = function(message) {\n return this._fail(\"VoidSigner cannot sign messages\", \"signMessage\");\n };\n VoidSigner2.prototype.signTransaction = function(transaction) {\n return this._fail(\"VoidSigner cannot sign transactions\", \"signTransaction\");\n };\n VoidSigner2.prototype._signTypedData = function(domain2, types, value) {\n return this._fail(\"VoidSigner cannot sign typed data\", \"signTypedData\");\n };\n VoidSigner2.prototype.connect = function(provider) {\n return new VoidSigner2(this.address, provider);\n };\n return VoidSigner2;\n }(Signer)\n );\n exports3.VoidSigner = VoidSigner;\n }\n });\n\n // ../../../node_modules/.pnpm/elliptic@6.6.1/node_modules/elliptic/package.json\n var require_package = __commonJS({\n \"../../../node_modules/.pnpm/elliptic@6.6.1/node_modules/elliptic/package.json\"(exports3, module) {\n module.exports = {\n name: \"elliptic\",\n version: \"6.6.1\",\n description: \"EC cryptography\",\n main: \"lib/elliptic.js\",\n files: [\n \"lib\"\n ],\n scripts: {\n lint: \"eslint lib test\",\n \"lint:fix\": \"npm run lint -- --fix\",\n unit: \"istanbul test _mocha --reporter=spec test/index.js\",\n test: \"npm run lint && npm run unit\",\n version: \"grunt dist && git add dist/\"\n },\n repository: {\n type: \"git\",\n url: \"git@github.com:indutny/elliptic\"\n },\n keywords: [\n \"EC\",\n \"Elliptic\",\n \"curve\",\n \"Cryptography\"\n ],\n author: \"Fedor Indutny \",\n license: \"MIT\",\n bugs: {\n url: \"https://github.com/indutny/elliptic/issues\"\n },\n homepage: \"https://github.com/indutny/elliptic\",\n devDependencies: {\n brfs: \"^2.0.2\",\n coveralls: \"^3.1.0\",\n eslint: \"^7.6.0\",\n grunt: \"^1.2.1\",\n \"grunt-browserify\": \"^5.3.0\",\n \"grunt-cli\": \"^1.3.2\",\n \"grunt-contrib-connect\": \"^3.0.0\",\n \"grunt-contrib-copy\": \"^1.0.0\",\n \"grunt-contrib-uglify\": \"^5.0.0\",\n \"grunt-mocha-istanbul\": \"^5.0.2\",\n \"grunt-saucelabs\": \"^9.0.1\",\n istanbul: \"^0.4.5\",\n mocha: \"^8.0.1\"\n },\n dependencies: {\n \"bn.js\": \"^4.11.9\",\n brorand: \"^1.1.0\",\n \"hash.js\": \"^1.0.0\",\n \"hmac-drbg\": \"^1.0.1\",\n inherits: \"^2.0.4\",\n \"minimalistic-assert\": \"^1.0.1\",\n \"minimalistic-crypto-utils\": \"^1.0.1\"\n }\n };\n }\n });\n\n // ../../../node_modules/.pnpm/bn.js@4.12.2/node_modules/bn.js/lib/bn.js\n var require_bn2 = __commonJS({\n \"../../../node_modules/.pnpm/bn.js@4.12.2/node_modules/bn.js/lib/bn.js\"(exports3, module) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n (function(module2, exports4) {\n \"use strict\";\n function assert9(val, msg) {\n if (!val)\n throw new Error(msg || \"Assertion failed\");\n }\n function inherits(ctor, superCtor) {\n ctor.super_ = superCtor;\n var TempCtor = function() {\n };\n TempCtor.prototype = superCtor.prototype;\n ctor.prototype = new TempCtor();\n ctor.prototype.constructor = ctor;\n }\n function BN(number2, base4, endian) {\n if (BN.isBN(number2)) {\n return number2;\n }\n this.negative = 0;\n this.words = null;\n this.length = 0;\n this.red = null;\n if (number2 !== null) {\n if (base4 === \"le\" || base4 === \"be\") {\n endian = base4;\n base4 = 10;\n }\n this._init(number2 || 0, base4 || 10, endian || \"be\");\n }\n }\n if (typeof module2 === \"object\") {\n module2.exports = BN;\n } else {\n exports4.BN = BN;\n }\n BN.BN = BN;\n BN.wordSize = 26;\n var Buffer3;\n try {\n if (typeof window !== \"undefined\" && typeof window.Buffer !== \"undefined\") {\n Buffer3 = window.Buffer;\n } else {\n Buffer3 = (init_buffer(), __toCommonJS(buffer_exports)).Buffer;\n }\n } catch (e3) {\n }\n BN.isBN = function isBN(num2) {\n if (num2 instanceof BN) {\n return true;\n }\n return num2 !== null && typeof num2 === \"object\" && num2.constructor.wordSize === BN.wordSize && Array.isArray(num2.words);\n };\n BN.max = function max(left, right) {\n if (left.cmp(right) > 0)\n return left;\n return right;\n };\n BN.min = function min(left, right) {\n if (left.cmp(right) < 0)\n return left;\n return right;\n };\n BN.prototype._init = function init(number2, base4, endian) {\n if (typeof number2 === \"number\") {\n return this._initNumber(number2, base4, endian);\n }\n if (typeof number2 === \"object\") {\n return this._initArray(number2, base4, endian);\n }\n if (base4 === \"hex\") {\n base4 = 16;\n }\n assert9(base4 === (base4 | 0) && base4 >= 2 && base4 <= 36);\n number2 = number2.toString().replace(/\\s+/g, \"\");\n var start = 0;\n if (number2[0] === \"-\") {\n start++;\n this.negative = 1;\n }\n if (start < number2.length) {\n if (base4 === 16) {\n this._parseHex(number2, start, endian);\n } else {\n this._parseBase(number2, base4, start);\n if (endian === \"le\") {\n this._initArray(this.toArray(), base4, endian);\n }\n }\n }\n };\n BN.prototype._initNumber = function _initNumber(number2, base4, endian) {\n if (number2 < 0) {\n this.negative = 1;\n number2 = -number2;\n }\n if (number2 < 67108864) {\n this.words = [number2 & 67108863];\n this.length = 1;\n } else if (number2 < 4503599627370496) {\n this.words = [\n number2 & 67108863,\n number2 / 67108864 & 67108863\n ];\n this.length = 2;\n } else {\n assert9(number2 < 9007199254740992);\n this.words = [\n number2 & 67108863,\n number2 / 67108864 & 67108863,\n 1\n ];\n this.length = 3;\n }\n if (endian !== \"le\")\n return;\n this._initArray(this.toArray(), base4, endian);\n };\n BN.prototype._initArray = function _initArray(number2, base4, endian) {\n assert9(typeof number2.length === \"number\");\n if (number2.length <= 0) {\n this.words = [0];\n this.length = 1;\n return this;\n }\n this.length = Math.ceil(number2.length / 3);\n this.words = new Array(this.length);\n for (var i3 = 0; i3 < this.length; i3++) {\n this.words[i3] = 0;\n }\n var j2, w3;\n var off2 = 0;\n if (endian === \"be\") {\n for (i3 = number2.length - 1, j2 = 0; i3 >= 0; i3 -= 3) {\n w3 = number2[i3] | number2[i3 - 1] << 8 | number2[i3 - 2] << 16;\n this.words[j2] |= w3 << off2 & 67108863;\n this.words[j2 + 1] = w3 >>> 26 - off2 & 67108863;\n off2 += 24;\n if (off2 >= 26) {\n off2 -= 26;\n j2++;\n }\n }\n } else if (endian === \"le\") {\n for (i3 = 0, j2 = 0; i3 < number2.length; i3 += 3) {\n w3 = number2[i3] | number2[i3 + 1] << 8 | number2[i3 + 2] << 16;\n this.words[j2] |= w3 << off2 & 67108863;\n this.words[j2 + 1] = w3 >>> 26 - off2 & 67108863;\n off2 += 24;\n if (off2 >= 26) {\n off2 -= 26;\n j2++;\n }\n }\n }\n return this.strip();\n };\n function parseHex4Bits(string2, index2) {\n var c4 = string2.charCodeAt(index2);\n if (c4 >= 65 && c4 <= 70) {\n return c4 - 55;\n } else if (c4 >= 97 && c4 <= 102) {\n return c4 - 87;\n } else {\n return c4 - 48 & 15;\n }\n }\n function parseHexByte(string2, lowerBound, index2) {\n var r2 = parseHex4Bits(string2, index2);\n if (index2 - 1 >= lowerBound) {\n r2 |= parseHex4Bits(string2, index2 - 1) << 4;\n }\n return r2;\n }\n BN.prototype._parseHex = function _parseHex(number2, start, endian) {\n this.length = Math.ceil((number2.length - start) / 6);\n this.words = new Array(this.length);\n for (var i3 = 0; i3 < this.length; i3++) {\n this.words[i3] = 0;\n }\n var off2 = 0;\n var j2 = 0;\n var w3;\n if (endian === \"be\") {\n for (i3 = number2.length - 1; i3 >= start; i3 -= 2) {\n w3 = parseHexByte(number2, start, i3) << off2;\n this.words[j2] |= w3 & 67108863;\n if (off2 >= 18) {\n off2 -= 18;\n j2 += 1;\n this.words[j2] |= w3 >>> 26;\n } else {\n off2 += 8;\n }\n }\n } else {\n var parseLength = number2.length - start;\n for (i3 = parseLength % 2 === 0 ? start + 1 : start; i3 < number2.length; i3 += 2) {\n w3 = parseHexByte(number2, start, i3) << off2;\n this.words[j2] |= w3 & 67108863;\n if (off2 >= 18) {\n off2 -= 18;\n j2 += 1;\n this.words[j2] |= w3 >>> 26;\n } else {\n off2 += 8;\n }\n }\n }\n this.strip();\n };\n function parseBase(str, start, end, mul) {\n var r2 = 0;\n var len = Math.min(str.length, end);\n for (var i3 = start; i3 < len; i3++) {\n var c4 = str.charCodeAt(i3) - 48;\n r2 *= mul;\n if (c4 >= 49) {\n r2 += c4 - 49 + 10;\n } else if (c4 >= 17) {\n r2 += c4 - 17 + 10;\n } else {\n r2 += c4;\n }\n }\n return r2;\n }\n BN.prototype._parseBase = function _parseBase(number2, base4, start) {\n this.words = [0];\n this.length = 1;\n for (var limbLen = 0, limbPow = 1; limbPow <= 67108863; limbPow *= base4) {\n limbLen++;\n }\n limbLen--;\n limbPow = limbPow / base4 | 0;\n var total = number2.length - start;\n var mod3 = total % limbLen;\n var end = Math.min(total, total - mod3) + start;\n var word = 0;\n for (var i3 = start; i3 < end; i3 += limbLen) {\n word = parseBase(number2, i3, i3 + limbLen, base4);\n this.imuln(limbPow);\n if (this.words[0] + word < 67108864) {\n this.words[0] += word;\n } else {\n this._iaddn(word);\n }\n }\n if (mod3 !== 0) {\n var pow = 1;\n word = parseBase(number2, i3, number2.length, base4);\n for (i3 = 0; i3 < mod3; i3++) {\n pow *= base4;\n }\n this.imuln(pow);\n if (this.words[0] + word < 67108864) {\n this.words[0] += word;\n } else {\n this._iaddn(word);\n }\n }\n this.strip();\n };\n BN.prototype.copy = function copy(dest) {\n dest.words = new Array(this.length);\n for (var i3 = 0; i3 < this.length; i3++) {\n dest.words[i3] = this.words[i3];\n }\n dest.length = this.length;\n dest.negative = this.negative;\n dest.red = this.red;\n };\n BN.prototype.clone = function clone() {\n var r2 = new BN(null);\n this.copy(r2);\n return r2;\n };\n BN.prototype._expand = function _expand(size6) {\n while (this.length < size6) {\n this.words[this.length++] = 0;\n }\n return this;\n };\n BN.prototype.strip = function strip() {\n while (this.length > 1 && this.words[this.length - 1] === 0) {\n this.length--;\n }\n return this._normSign();\n };\n BN.prototype._normSign = function _normSign() {\n if (this.length === 1 && this.words[0] === 0) {\n this.negative = 0;\n }\n return this;\n };\n BN.prototype.inspect = function inspect() {\n return (this.red ? \"\";\n };\n var zeros = [\n \"\",\n \"0\",\n \"00\",\n \"000\",\n \"0000\",\n \"00000\",\n \"000000\",\n \"0000000\",\n \"00000000\",\n \"000000000\",\n \"0000000000\",\n \"00000000000\",\n \"000000000000\",\n \"0000000000000\",\n \"00000000000000\",\n \"000000000000000\",\n \"0000000000000000\",\n \"00000000000000000\",\n \"000000000000000000\",\n \"0000000000000000000\",\n \"00000000000000000000\",\n \"000000000000000000000\",\n \"0000000000000000000000\",\n \"00000000000000000000000\",\n \"000000000000000000000000\",\n \"0000000000000000000000000\"\n ];\n var groupSizes = [\n 0,\n 0,\n 25,\n 16,\n 12,\n 11,\n 10,\n 9,\n 8,\n 8,\n 7,\n 7,\n 7,\n 7,\n 6,\n 6,\n 6,\n 6,\n 6,\n 6,\n 6,\n 5,\n 5,\n 5,\n 5,\n 5,\n 5,\n 5,\n 5,\n 5,\n 5,\n 5,\n 5,\n 5,\n 5,\n 5,\n 5\n ];\n var groupBases = [\n 0,\n 0,\n 33554432,\n 43046721,\n 16777216,\n 48828125,\n 60466176,\n 40353607,\n 16777216,\n 43046721,\n 1e7,\n 19487171,\n 35831808,\n 62748517,\n 7529536,\n 11390625,\n 16777216,\n 24137569,\n 34012224,\n 47045881,\n 64e6,\n 4084101,\n 5153632,\n 6436343,\n 7962624,\n 9765625,\n 11881376,\n 14348907,\n 17210368,\n 20511149,\n 243e5,\n 28629151,\n 33554432,\n 39135393,\n 45435424,\n 52521875,\n 60466176\n ];\n BN.prototype.toString = function toString2(base4, padding) {\n base4 = base4 || 10;\n padding = padding | 0 || 1;\n var out;\n if (base4 === 16 || base4 === \"hex\") {\n out = \"\";\n var off2 = 0;\n var carry = 0;\n for (var i3 = 0; i3 < this.length; i3++) {\n var w3 = this.words[i3];\n var word = ((w3 << off2 | carry) & 16777215).toString(16);\n carry = w3 >>> 24 - off2 & 16777215;\n off2 += 2;\n if (off2 >= 26) {\n off2 -= 26;\n i3--;\n }\n if (carry !== 0 || i3 !== this.length - 1) {\n out = zeros[6 - word.length] + word + out;\n } else {\n out = word + out;\n }\n }\n if (carry !== 0) {\n out = carry.toString(16) + out;\n }\n while (out.length % padding !== 0) {\n out = \"0\" + out;\n }\n if (this.negative !== 0) {\n out = \"-\" + out;\n }\n return out;\n }\n if (base4 === (base4 | 0) && base4 >= 2 && base4 <= 36) {\n var groupSize = groupSizes[base4];\n var groupBase = groupBases[base4];\n out = \"\";\n var c4 = this.clone();\n c4.negative = 0;\n while (!c4.isZero()) {\n var r2 = c4.modn(groupBase).toString(base4);\n c4 = c4.idivn(groupBase);\n if (!c4.isZero()) {\n out = zeros[groupSize - r2.length] + r2 + out;\n } else {\n out = r2 + out;\n }\n }\n if (this.isZero()) {\n out = \"0\" + out;\n }\n while (out.length % padding !== 0) {\n out = \"0\" + out;\n }\n if (this.negative !== 0) {\n out = \"-\" + out;\n }\n return out;\n }\n assert9(false, \"Base should be between 2 and 36\");\n };\n BN.prototype.toNumber = function toNumber4() {\n var ret = this.words[0];\n if (this.length === 2) {\n ret += this.words[1] * 67108864;\n } else if (this.length === 3 && this.words[2] === 1) {\n ret += 4503599627370496 + this.words[1] * 67108864;\n } else if (this.length > 2) {\n assert9(false, \"Number can only safely store up to 53 bits\");\n }\n return this.negative !== 0 ? -ret : ret;\n };\n BN.prototype.toJSON = function toJSON() {\n return this.toString(16);\n };\n BN.prototype.toBuffer = function toBuffer(endian, length2) {\n assert9(typeof Buffer3 !== \"undefined\");\n return this.toArrayLike(Buffer3, endian, length2);\n };\n BN.prototype.toArray = function toArray(endian, length2) {\n return this.toArrayLike(Array, endian, length2);\n };\n BN.prototype.toArrayLike = function toArrayLike(ArrayType, endian, length2) {\n var byteLength = this.byteLength();\n var reqLength = length2 || Math.max(1, byteLength);\n assert9(byteLength <= reqLength, \"byte array longer than desired length\");\n assert9(reqLength > 0, \"Requested array length <= 0\");\n this.strip();\n var littleEndian = endian === \"le\";\n var res = new ArrayType(reqLength);\n var b4, i3;\n var q3 = this.clone();\n if (!littleEndian) {\n for (i3 = 0; i3 < reqLength - byteLength; i3++) {\n res[i3] = 0;\n }\n for (i3 = 0; !q3.isZero(); i3++) {\n b4 = q3.andln(255);\n q3.iushrn(8);\n res[reqLength - i3 - 1] = b4;\n }\n } else {\n for (i3 = 0; !q3.isZero(); i3++) {\n b4 = q3.andln(255);\n q3.iushrn(8);\n res[i3] = b4;\n }\n for (; i3 < reqLength; i3++) {\n res[i3] = 0;\n }\n }\n return res;\n };\n if (Math.clz32) {\n BN.prototype._countBits = function _countBits(w3) {\n return 32 - Math.clz32(w3);\n };\n } else {\n BN.prototype._countBits = function _countBits(w3) {\n var t3 = w3;\n var r2 = 0;\n if (t3 >= 4096) {\n r2 += 13;\n t3 >>>= 13;\n }\n if (t3 >= 64) {\n r2 += 7;\n t3 >>>= 7;\n }\n if (t3 >= 8) {\n r2 += 4;\n t3 >>>= 4;\n }\n if (t3 >= 2) {\n r2 += 2;\n t3 >>>= 2;\n }\n return r2 + t3;\n };\n }\n BN.prototype._zeroBits = function _zeroBits(w3) {\n if (w3 === 0)\n return 26;\n var t3 = w3;\n var r2 = 0;\n if ((t3 & 8191) === 0) {\n r2 += 13;\n t3 >>>= 13;\n }\n if ((t3 & 127) === 0) {\n r2 += 7;\n t3 >>>= 7;\n }\n if ((t3 & 15) === 0) {\n r2 += 4;\n t3 >>>= 4;\n }\n if ((t3 & 3) === 0) {\n r2 += 2;\n t3 >>>= 2;\n }\n if ((t3 & 1) === 0) {\n r2++;\n }\n return r2;\n };\n BN.prototype.bitLength = function bitLength() {\n var w3 = this.words[this.length - 1];\n var hi = this._countBits(w3);\n return (this.length - 1) * 26 + hi;\n };\n function toBitArray(num2) {\n var w3 = new Array(num2.bitLength());\n for (var bit = 0; bit < w3.length; bit++) {\n var off2 = bit / 26 | 0;\n var wbit = bit % 26;\n w3[bit] = (num2.words[off2] & 1 << wbit) >>> wbit;\n }\n return w3;\n }\n BN.prototype.zeroBits = function zeroBits() {\n if (this.isZero())\n return 0;\n var r2 = 0;\n for (var i3 = 0; i3 < this.length; i3++) {\n var b4 = this._zeroBits(this.words[i3]);\n r2 += b4;\n if (b4 !== 26)\n break;\n }\n return r2;\n };\n BN.prototype.byteLength = function byteLength() {\n return Math.ceil(this.bitLength() / 8);\n };\n BN.prototype.toTwos = function toTwos(width) {\n if (this.negative !== 0) {\n return this.abs().inotn(width).iaddn(1);\n }\n return this.clone();\n };\n BN.prototype.fromTwos = function fromTwos(width) {\n if (this.testn(width - 1)) {\n return this.notn(width).iaddn(1).ineg();\n }\n return this.clone();\n };\n BN.prototype.isNeg = function isNeg() {\n return this.negative !== 0;\n };\n BN.prototype.neg = function neg() {\n return this.clone().ineg();\n };\n BN.prototype.ineg = function ineg() {\n if (!this.isZero()) {\n this.negative ^= 1;\n }\n return this;\n };\n BN.prototype.iuor = function iuor(num2) {\n while (this.length < num2.length) {\n this.words[this.length++] = 0;\n }\n for (var i3 = 0; i3 < num2.length; i3++) {\n this.words[i3] = this.words[i3] | num2.words[i3];\n }\n return this.strip();\n };\n BN.prototype.ior = function ior(num2) {\n assert9((this.negative | num2.negative) === 0);\n return this.iuor(num2);\n };\n BN.prototype.or = function or(num2) {\n if (this.length > num2.length)\n return this.clone().ior(num2);\n return num2.clone().ior(this);\n };\n BN.prototype.uor = function uor(num2) {\n if (this.length > num2.length)\n return this.clone().iuor(num2);\n return num2.clone().iuor(this);\n };\n BN.prototype.iuand = function iuand(num2) {\n var b4;\n if (this.length > num2.length) {\n b4 = num2;\n } else {\n b4 = this;\n }\n for (var i3 = 0; i3 < b4.length; i3++) {\n this.words[i3] = this.words[i3] & num2.words[i3];\n }\n this.length = b4.length;\n return this.strip();\n };\n BN.prototype.iand = function iand(num2) {\n assert9((this.negative | num2.negative) === 0);\n return this.iuand(num2);\n };\n BN.prototype.and = function and(num2) {\n if (this.length > num2.length)\n return this.clone().iand(num2);\n return num2.clone().iand(this);\n };\n BN.prototype.uand = function uand(num2) {\n if (this.length > num2.length)\n return this.clone().iuand(num2);\n return num2.clone().iuand(this);\n };\n BN.prototype.iuxor = function iuxor(num2) {\n var a3;\n var b4;\n if (this.length > num2.length) {\n a3 = this;\n b4 = num2;\n } else {\n a3 = num2;\n b4 = this;\n }\n for (var i3 = 0; i3 < b4.length; i3++) {\n this.words[i3] = a3.words[i3] ^ b4.words[i3];\n }\n if (this !== a3) {\n for (; i3 < a3.length; i3++) {\n this.words[i3] = a3.words[i3];\n }\n }\n this.length = a3.length;\n return this.strip();\n };\n BN.prototype.ixor = function ixor(num2) {\n assert9((this.negative | num2.negative) === 0);\n return this.iuxor(num2);\n };\n BN.prototype.xor = function xor(num2) {\n if (this.length > num2.length)\n return this.clone().ixor(num2);\n return num2.clone().ixor(this);\n };\n BN.prototype.uxor = function uxor(num2) {\n if (this.length > num2.length)\n return this.clone().iuxor(num2);\n return num2.clone().iuxor(this);\n };\n BN.prototype.inotn = function inotn(width) {\n assert9(typeof width === \"number\" && width >= 0);\n var bytesNeeded = Math.ceil(width / 26) | 0;\n var bitsLeft = width % 26;\n this._expand(bytesNeeded);\n if (bitsLeft > 0) {\n bytesNeeded--;\n }\n for (var i3 = 0; i3 < bytesNeeded; i3++) {\n this.words[i3] = ~this.words[i3] & 67108863;\n }\n if (bitsLeft > 0) {\n this.words[i3] = ~this.words[i3] & 67108863 >> 26 - bitsLeft;\n }\n return this.strip();\n };\n BN.prototype.notn = function notn(width) {\n return this.clone().inotn(width);\n };\n BN.prototype.setn = function setn(bit, val) {\n assert9(typeof bit === \"number\" && bit >= 0);\n var off2 = bit / 26 | 0;\n var wbit = bit % 26;\n this._expand(off2 + 1);\n if (val) {\n this.words[off2] = this.words[off2] | 1 << wbit;\n } else {\n this.words[off2] = this.words[off2] & ~(1 << wbit);\n }\n return this.strip();\n };\n BN.prototype.iadd = function iadd(num2) {\n var r2;\n if (this.negative !== 0 && num2.negative === 0) {\n this.negative = 0;\n r2 = this.isub(num2);\n this.negative ^= 1;\n return this._normSign();\n } else if (this.negative === 0 && num2.negative !== 0) {\n num2.negative = 0;\n r2 = this.isub(num2);\n num2.negative = 1;\n return r2._normSign();\n }\n var a3, b4;\n if (this.length > num2.length) {\n a3 = this;\n b4 = num2;\n } else {\n a3 = num2;\n b4 = this;\n }\n var carry = 0;\n for (var i3 = 0; i3 < b4.length; i3++) {\n r2 = (a3.words[i3] | 0) + (b4.words[i3] | 0) + carry;\n this.words[i3] = r2 & 67108863;\n carry = r2 >>> 26;\n }\n for (; carry !== 0 && i3 < a3.length; i3++) {\n r2 = (a3.words[i3] | 0) + carry;\n this.words[i3] = r2 & 67108863;\n carry = r2 >>> 26;\n }\n this.length = a3.length;\n if (carry !== 0) {\n this.words[this.length] = carry;\n this.length++;\n } else if (a3 !== this) {\n for (; i3 < a3.length; i3++) {\n this.words[i3] = a3.words[i3];\n }\n }\n return this;\n };\n BN.prototype.add = function add2(num2) {\n var res;\n if (num2.negative !== 0 && this.negative === 0) {\n num2.negative = 0;\n res = this.sub(num2);\n num2.negative ^= 1;\n return res;\n } else if (num2.negative === 0 && this.negative !== 0) {\n this.negative = 0;\n res = num2.sub(this);\n this.negative = 1;\n return res;\n }\n if (this.length > num2.length)\n return this.clone().iadd(num2);\n return num2.clone().iadd(this);\n };\n BN.prototype.isub = function isub(num2) {\n if (num2.negative !== 0) {\n num2.negative = 0;\n var r2 = this.iadd(num2);\n num2.negative = 1;\n return r2._normSign();\n } else if (this.negative !== 0) {\n this.negative = 0;\n this.iadd(num2);\n this.negative = 1;\n return this._normSign();\n }\n var cmp = this.cmp(num2);\n if (cmp === 0) {\n this.negative = 0;\n this.length = 1;\n this.words[0] = 0;\n return this;\n }\n var a3, b4;\n if (cmp > 0) {\n a3 = this;\n b4 = num2;\n } else {\n a3 = num2;\n b4 = this;\n }\n var carry = 0;\n for (var i3 = 0; i3 < b4.length; i3++) {\n r2 = (a3.words[i3] | 0) - (b4.words[i3] | 0) + carry;\n carry = r2 >> 26;\n this.words[i3] = r2 & 67108863;\n }\n for (; carry !== 0 && i3 < a3.length; i3++) {\n r2 = (a3.words[i3] | 0) + carry;\n carry = r2 >> 26;\n this.words[i3] = r2 & 67108863;\n }\n if (carry === 0 && i3 < a3.length && a3 !== this) {\n for (; i3 < a3.length; i3++) {\n this.words[i3] = a3.words[i3];\n }\n }\n this.length = Math.max(this.length, i3);\n if (a3 !== this) {\n this.negative = 1;\n }\n return this.strip();\n };\n BN.prototype.sub = function sub(num2) {\n return this.clone().isub(num2);\n };\n function smallMulTo(self2, num2, out) {\n out.negative = num2.negative ^ self2.negative;\n var len = self2.length + num2.length | 0;\n out.length = len;\n len = len - 1 | 0;\n var a3 = self2.words[0] | 0;\n var b4 = num2.words[0] | 0;\n var r2 = a3 * b4;\n var lo = r2 & 67108863;\n var carry = r2 / 67108864 | 0;\n out.words[0] = lo;\n for (var k4 = 1; k4 < len; k4++) {\n var ncarry = carry >>> 26;\n var rword = carry & 67108863;\n var maxJ = Math.min(k4, num2.length - 1);\n for (var j2 = Math.max(0, k4 - self2.length + 1); j2 <= maxJ; j2++) {\n var i3 = k4 - j2 | 0;\n a3 = self2.words[i3] | 0;\n b4 = num2.words[j2] | 0;\n r2 = a3 * b4 + rword;\n ncarry += r2 / 67108864 | 0;\n rword = r2 & 67108863;\n }\n out.words[k4] = rword | 0;\n carry = ncarry | 0;\n }\n if (carry !== 0) {\n out.words[k4] = carry | 0;\n } else {\n out.length--;\n }\n return out.strip();\n }\n var comb10MulTo = function comb10MulTo2(self2, num2, out) {\n var a3 = self2.words;\n var b4 = num2.words;\n var o5 = out.words;\n var c4 = 0;\n var lo;\n var mid;\n var hi;\n var a0 = a3[0] | 0;\n var al0 = a0 & 8191;\n var ah0 = a0 >>> 13;\n var a1 = a3[1] | 0;\n var al1 = a1 & 8191;\n var ah1 = a1 >>> 13;\n var a22 = a3[2] | 0;\n var al2 = a22 & 8191;\n var ah2 = a22 >>> 13;\n var a32 = a3[3] | 0;\n var al3 = a32 & 8191;\n var ah3 = a32 >>> 13;\n var a4 = a3[4] | 0;\n var al4 = a4 & 8191;\n var ah4 = a4 >>> 13;\n var a5 = a3[5] | 0;\n var al5 = a5 & 8191;\n var ah5 = a5 >>> 13;\n var a6 = a3[6] | 0;\n var al6 = a6 & 8191;\n var ah6 = a6 >>> 13;\n var a7 = a3[7] | 0;\n var al7 = a7 & 8191;\n var ah7 = a7 >>> 13;\n var a8 = a3[8] | 0;\n var al8 = a8 & 8191;\n var ah8 = a8 >>> 13;\n var a9 = a3[9] | 0;\n var al9 = a9 & 8191;\n var ah9 = a9 >>> 13;\n var b0 = b4[0] | 0;\n var bl0 = b0 & 8191;\n var bh0 = b0 >>> 13;\n var b1 = b4[1] | 0;\n var bl1 = b1 & 8191;\n var bh1 = b1 >>> 13;\n var b22 = b4[2] | 0;\n var bl2 = b22 & 8191;\n var bh2 = b22 >>> 13;\n var b32 = b4[3] | 0;\n var bl3 = b32 & 8191;\n var bh3 = b32 >>> 13;\n var b42 = b4[4] | 0;\n var bl4 = b42 & 8191;\n var bh4 = b42 >>> 13;\n var b5 = b4[5] | 0;\n var bl5 = b5 & 8191;\n var bh5 = b5 >>> 13;\n var b6 = b4[6] | 0;\n var bl6 = b6 & 8191;\n var bh6 = b6 >>> 13;\n var b7 = b4[7] | 0;\n var bl7 = b7 & 8191;\n var bh7 = b7 >>> 13;\n var b8 = b4[8] | 0;\n var bl8 = b8 & 8191;\n var bh8 = b8 >>> 13;\n var b9 = b4[9] | 0;\n var bl9 = b9 & 8191;\n var bh9 = b9 >>> 13;\n out.negative = self2.negative ^ num2.negative;\n out.length = 19;\n lo = Math.imul(al0, bl0);\n mid = Math.imul(al0, bh0);\n mid = mid + Math.imul(ah0, bl0) | 0;\n hi = Math.imul(ah0, bh0);\n var w0 = (c4 + lo | 0) + ((mid & 8191) << 13) | 0;\n c4 = (hi + (mid >>> 13) | 0) + (w0 >>> 26) | 0;\n w0 &= 67108863;\n lo = Math.imul(al1, bl0);\n mid = Math.imul(al1, bh0);\n mid = mid + Math.imul(ah1, bl0) | 0;\n hi = Math.imul(ah1, bh0);\n lo = lo + Math.imul(al0, bl1) | 0;\n mid = mid + Math.imul(al0, bh1) | 0;\n mid = mid + Math.imul(ah0, bl1) | 0;\n hi = hi + Math.imul(ah0, bh1) | 0;\n var w1 = (c4 + lo | 0) + ((mid & 8191) << 13) | 0;\n c4 = (hi + (mid >>> 13) | 0) + (w1 >>> 26) | 0;\n w1 &= 67108863;\n lo = Math.imul(al2, bl0);\n mid = Math.imul(al2, bh0);\n mid = mid + Math.imul(ah2, bl0) | 0;\n hi = Math.imul(ah2, bh0);\n lo = lo + Math.imul(al1, bl1) | 0;\n mid = mid + Math.imul(al1, bh1) | 0;\n mid = mid + Math.imul(ah1, bl1) | 0;\n hi = hi + Math.imul(ah1, bh1) | 0;\n lo = lo + Math.imul(al0, bl2) | 0;\n mid = mid + Math.imul(al0, bh2) | 0;\n mid = mid + Math.imul(ah0, bl2) | 0;\n hi = hi + Math.imul(ah0, bh2) | 0;\n var w22 = (c4 + lo | 0) + ((mid & 8191) << 13) | 0;\n c4 = (hi + (mid >>> 13) | 0) + (w22 >>> 26) | 0;\n w22 &= 67108863;\n lo = Math.imul(al3, bl0);\n mid = Math.imul(al3, bh0);\n mid = mid + Math.imul(ah3, bl0) | 0;\n hi = Math.imul(ah3, bh0);\n lo = lo + Math.imul(al2, bl1) | 0;\n mid = mid + Math.imul(al2, bh1) | 0;\n mid = mid + Math.imul(ah2, bl1) | 0;\n hi = hi + Math.imul(ah2, bh1) | 0;\n lo = lo + Math.imul(al1, bl2) | 0;\n mid = mid + Math.imul(al1, bh2) | 0;\n mid = mid + Math.imul(ah1, bl2) | 0;\n hi = hi + Math.imul(ah1, bh2) | 0;\n lo = lo + Math.imul(al0, bl3) | 0;\n mid = mid + Math.imul(al0, bh3) | 0;\n mid = mid + Math.imul(ah0, bl3) | 0;\n hi = hi + Math.imul(ah0, bh3) | 0;\n var w3 = (c4 + lo | 0) + ((mid & 8191) << 13) | 0;\n c4 = (hi + (mid >>> 13) | 0) + (w3 >>> 26) | 0;\n w3 &= 67108863;\n lo = Math.imul(al4, bl0);\n mid = Math.imul(al4, bh0);\n mid = mid + Math.imul(ah4, bl0) | 0;\n hi = Math.imul(ah4, bh0);\n lo = lo + Math.imul(al3, bl1) | 0;\n mid = mid + Math.imul(al3, bh1) | 0;\n mid = mid + Math.imul(ah3, bl1) | 0;\n hi = hi + Math.imul(ah3, bh1) | 0;\n lo = lo + Math.imul(al2, bl2) | 0;\n mid = mid + Math.imul(al2, bh2) | 0;\n mid = mid + Math.imul(ah2, bl2) | 0;\n hi = hi + Math.imul(ah2, bh2) | 0;\n lo = lo + Math.imul(al1, bl3) | 0;\n mid = mid + Math.imul(al1, bh3) | 0;\n mid = mid + Math.imul(ah1, bl3) | 0;\n hi = hi + Math.imul(ah1, bh3) | 0;\n lo = lo + Math.imul(al0, bl4) | 0;\n mid = mid + Math.imul(al0, bh4) | 0;\n mid = mid + Math.imul(ah0, bl4) | 0;\n hi = hi + Math.imul(ah0, bh4) | 0;\n var w4 = (c4 + lo | 0) + ((mid & 8191) << 13) | 0;\n c4 = (hi + (mid >>> 13) | 0) + (w4 >>> 26) | 0;\n w4 &= 67108863;\n lo = Math.imul(al5, bl0);\n mid = Math.imul(al5, bh0);\n mid = mid + Math.imul(ah5, bl0) | 0;\n hi = Math.imul(ah5, bh0);\n lo = lo + Math.imul(al4, bl1) | 0;\n mid = mid + Math.imul(al4, bh1) | 0;\n mid = mid + Math.imul(ah4, bl1) | 0;\n hi = hi + Math.imul(ah4, bh1) | 0;\n lo = lo + Math.imul(al3, bl2) | 0;\n mid = mid + Math.imul(al3, bh2) | 0;\n mid = mid + Math.imul(ah3, bl2) | 0;\n hi = hi + Math.imul(ah3, bh2) | 0;\n lo = lo + Math.imul(al2, bl3) | 0;\n mid = mid + Math.imul(al2, bh3) | 0;\n mid = mid + Math.imul(ah2, bl3) | 0;\n hi = hi + Math.imul(ah2, bh3) | 0;\n lo = lo + Math.imul(al1, bl4) | 0;\n mid = mid + Math.imul(al1, bh4) | 0;\n mid = mid + Math.imul(ah1, bl4) | 0;\n hi = hi + Math.imul(ah1, bh4) | 0;\n lo = lo + Math.imul(al0, bl5) | 0;\n mid = mid + Math.imul(al0, bh5) | 0;\n mid = mid + Math.imul(ah0, bl5) | 0;\n hi = hi + Math.imul(ah0, bh5) | 0;\n var w5 = (c4 + lo | 0) + ((mid & 8191) << 13) | 0;\n c4 = (hi + (mid >>> 13) | 0) + (w5 >>> 26) | 0;\n w5 &= 67108863;\n lo = Math.imul(al6, bl0);\n mid = Math.imul(al6, bh0);\n mid = mid + Math.imul(ah6, bl0) | 0;\n hi = Math.imul(ah6, bh0);\n lo = lo + Math.imul(al5, bl1) | 0;\n mid = mid + Math.imul(al5, bh1) | 0;\n mid = mid + Math.imul(ah5, bl1) | 0;\n hi = hi + Math.imul(ah5, bh1) | 0;\n lo = lo + Math.imul(al4, bl2) | 0;\n mid = mid + Math.imul(al4, bh2) | 0;\n mid = mid + Math.imul(ah4, bl2) | 0;\n hi = hi + Math.imul(ah4, bh2) | 0;\n lo = lo + Math.imul(al3, bl3) | 0;\n mid = mid + Math.imul(al3, bh3) | 0;\n mid = mid + Math.imul(ah3, bl3) | 0;\n hi = hi + Math.imul(ah3, bh3) | 0;\n lo = lo + Math.imul(al2, bl4) | 0;\n mid = mid + Math.imul(al2, bh4) | 0;\n mid = mid + Math.imul(ah2, bl4) | 0;\n hi = hi + Math.imul(ah2, bh4) | 0;\n lo = lo + Math.imul(al1, bl5) | 0;\n mid = mid + Math.imul(al1, bh5) | 0;\n mid = mid + Math.imul(ah1, bl5) | 0;\n hi = hi + Math.imul(ah1, bh5) | 0;\n lo = lo + Math.imul(al0, bl6) | 0;\n mid = mid + Math.imul(al0, bh6) | 0;\n mid = mid + Math.imul(ah0, bl6) | 0;\n hi = hi + Math.imul(ah0, bh6) | 0;\n var w6 = (c4 + lo | 0) + ((mid & 8191) << 13) | 0;\n c4 = (hi + (mid >>> 13) | 0) + (w6 >>> 26) | 0;\n w6 &= 67108863;\n lo = Math.imul(al7, bl0);\n mid = Math.imul(al7, bh0);\n mid = mid + Math.imul(ah7, bl0) | 0;\n hi = Math.imul(ah7, bh0);\n lo = lo + Math.imul(al6, bl1) | 0;\n mid = mid + Math.imul(al6, bh1) | 0;\n mid = mid + Math.imul(ah6, bl1) | 0;\n hi = hi + Math.imul(ah6, bh1) | 0;\n lo = lo + Math.imul(al5, bl2) | 0;\n mid = mid + Math.imul(al5, bh2) | 0;\n mid = mid + Math.imul(ah5, bl2) | 0;\n hi = hi + Math.imul(ah5, bh2) | 0;\n lo = lo + Math.imul(al4, bl3) | 0;\n mid = mid + Math.imul(al4, bh3) | 0;\n mid = mid + Math.imul(ah4, bl3) | 0;\n hi = hi + Math.imul(ah4, bh3) | 0;\n lo = lo + Math.imul(al3, bl4) | 0;\n mid = mid + Math.imul(al3, bh4) | 0;\n mid = mid + Math.imul(ah3, bl4) | 0;\n hi = hi + Math.imul(ah3, bh4) | 0;\n lo = lo + Math.imul(al2, bl5) | 0;\n mid = mid + Math.imul(al2, bh5) | 0;\n mid = mid + Math.imul(ah2, bl5) | 0;\n hi = hi + Math.imul(ah2, bh5) | 0;\n lo = lo + Math.imul(al1, bl6) | 0;\n mid = mid + Math.imul(al1, bh6) | 0;\n mid = mid + Math.imul(ah1, bl6) | 0;\n hi = hi + Math.imul(ah1, bh6) | 0;\n lo = lo + Math.imul(al0, bl7) | 0;\n mid = mid + Math.imul(al0, bh7) | 0;\n mid = mid + Math.imul(ah0, bl7) | 0;\n hi = hi + Math.imul(ah0, bh7) | 0;\n var w7 = (c4 + lo | 0) + ((mid & 8191) << 13) | 0;\n c4 = (hi + (mid >>> 13) | 0) + (w7 >>> 26) | 0;\n w7 &= 67108863;\n lo = Math.imul(al8, bl0);\n mid = Math.imul(al8, bh0);\n mid = mid + Math.imul(ah8, bl0) | 0;\n hi = Math.imul(ah8, bh0);\n lo = lo + Math.imul(al7, bl1) | 0;\n mid = mid + Math.imul(al7, bh1) | 0;\n mid = mid + Math.imul(ah7, bl1) | 0;\n hi = hi + Math.imul(ah7, bh1) | 0;\n lo = lo + Math.imul(al6, bl2) | 0;\n mid = mid + Math.imul(al6, bh2) | 0;\n mid = mid + Math.imul(ah6, bl2) | 0;\n hi = hi + Math.imul(ah6, bh2) | 0;\n lo = lo + Math.imul(al5, bl3) | 0;\n mid = mid + Math.imul(al5, bh3) | 0;\n mid = mid + Math.imul(ah5, bl3) | 0;\n hi = hi + Math.imul(ah5, bh3) | 0;\n lo = lo + Math.imul(al4, bl4) | 0;\n mid = mid + Math.imul(al4, bh4) | 0;\n mid = mid + Math.imul(ah4, bl4) | 0;\n hi = hi + Math.imul(ah4, bh4) | 0;\n lo = lo + Math.imul(al3, bl5) | 0;\n mid = mid + Math.imul(al3, bh5) | 0;\n mid = mid + Math.imul(ah3, bl5) | 0;\n hi = hi + Math.imul(ah3, bh5) | 0;\n lo = lo + Math.imul(al2, bl6) | 0;\n mid = mid + Math.imul(al2, bh6) | 0;\n mid = mid + Math.imul(ah2, bl6) | 0;\n hi = hi + Math.imul(ah2, bh6) | 0;\n lo = lo + Math.imul(al1, bl7) | 0;\n mid = mid + Math.imul(al1, bh7) | 0;\n mid = mid + Math.imul(ah1, bl7) | 0;\n hi = hi + Math.imul(ah1, bh7) | 0;\n lo = lo + Math.imul(al0, bl8) | 0;\n mid = mid + Math.imul(al0, bh8) | 0;\n mid = mid + Math.imul(ah0, bl8) | 0;\n hi = hi + Math.imul(ah0, bh8) | 0;\n var w8 = (c4 + lo | 0) + ((mid & 8191) << 13) | 0;\n c4 = (hi + (mid >>> 13) | 0) + (w8 >>> 26) | 0;\n w8 &= 67108863;\n lo = Math.imul(al9, bl0);\n mid = Math.imul(al9, bh0);\n mid = mid + Math.imul(ah9, bl0) | 0;\n hi = Math.imul(ah9, bh0);\n lo = lo + Math.imul(al8, bl1) | 0;\n mid = mid + Math.imul(al8, bh1) | 0;\n mid = mid + Math.imul(ah8, bl1) | 0;\n hi = hi + Math.imul(ah8, bh1) | 0;\n lo = lo + Math.imul(al7, bl2) | 0;\n mid = mid + Math.imul(al7, bh2) | 0;\n mid = mid + Math.imul(ah7, bl2) | 0;\n hi = hi + Math.imul(ah7, bh2) | 0;\n lo = lo + Math.imul(al6, bl3) | 0;\n mid = mid + Math.imul(al6, bh3) | 0;\n mid = mid + Math.imul(ah6, bl3) | 0;\n hi = hi + Math.imul(ah6, bh3) | 0;\n lo = lo + Math.imul(al5, bl4) | 0;\n mid = mid + Math.imul(al5, bh4) | 0;\n mid = mid + Math.imul(ah5, bl4) | 0;\n hi = hi + Math.imul(ah5, bh4) | 0;\n lo = lo + Math.imul(al4, bl5) | 0;\n mid = mid + Math.imul(al4, bh5) | 0;\n mid = mid + Math.imul(ah4, bl5) | 0;\n hi = hi + Math.imul(ah4, bh5) | 0;\n lo = lo + Math.imul(al3, bl6) | 0;\n mid = mid + Math.imul(al3, bh6) | 0;\n mid = mid + Math.imul(ah3, bl6) | 0;\n hi = hi + Math.imul(ah3, bh6) | 0;\n lo = lo + Math.imul(al2, bl7) | 0;\n mid = mid + Math.imul(al2, bh7) | 0;\n mid = mid + Math.imul(ah2, bl7) | 0;\n hi = hi + Math.imul(ah2, bh7) | 0;\n lo = lo + Math.imul(al1, bl8) | 0;\n mid = mid + Math.imul(al1, bh8) | 0;\n mid = mid + Math.imul(ah1, bl8) | 0;\n hi = hi + Math.imul(ah1, bh8) | 0;\n lo = lo + Math.imul(al0, bl9) | 0;\n mid = mid + Math.imul(al0, bh9) | 0;\n mid = mid + Math.imul(ah0, bl9) | 0;\n hi = hi + Math.imul(ah0, bh9) | 0;\n var w9 = (c4 + lo | 0) + ((mid & 8191) << 13) | 0;\n c4 = (hi + (mid >>> 13) | 0) + (w9 >>> 26) | 0;\n w9 &= 67108863;\n lo = Math.imul(al9, bl1);\n mid = Math.imul(al9, bh1);\n mid = mid + Math.imul(ah9, bl1) | 0;\n hi = Math.imul(ah9, bh1);\n lo = lo + Math.imul(al8, bl2) | 0;\n mid = mid + Math.imul(al8, bh2) | 0;\n mid = mid + Math.imul(ah8, bl2) | 0;\n hi = hi + Math.imul(ah8, bh2) | 0;\n lo = lo + Math.imul(al7, bl3) | 0;\n mid = mid + Math.imul(al7, bh3) | 0;\n mid = mid + Math.imul(ah7, bl3) | 0;\n hi = hi + Math.imul(ah7, bh3) | 0;\n lo = lo + Math.imul(al6, bl4) | 0;\n mid = mid + Math.imul(al6, bh4) | 0;\n mid = mid + Math.imul(ah6, bl4) | 0;\n hi = hi + Math.imul(ah6, bh4) | 0;\n lo = lo + Math.imul(al5, bl5) | 0;\n mid = mid + Math.imul(al5, bh5) | 0;\n mid = mid + Math.imul(ah5, bl5) | 0;\n hi = hi + Math.imul(ah5, bh5) | 0;\n lo = lo + Math.imul(al4, bl6) | 0;\n mid = mid + Math.imul(al4, bh6) | 0;\n mid = mid + Math.imul(ah4, bl6) | 0;\n hi = hi + Math.imul(ah4, bh6) | 0;\n lo = lo + Math.imul(al3, bl7) | 0;\n mid = mid + Math.imul(al3, bh7) | 0;\n mid = mid + Math.imul(ah3, bl7) | 0;\n hi = hi + Math.imul(ah3, bh7) | 0;\n lo = lo + Math.imul(al2, bl8) | 0;\n mid = mid + Math.imul(al2, bh8) | 0;\n mid = mid + Math.imul(ah2, bl8) | 0;\n hi = hi + Math.imul(ah2, bh8) | 0;\n lo = lo + Math.imul(al1, bl9) | 0;\n mid = mid + Math.imul(al1, bh9) | 0;\n mid = mid + Math.imul(ah1, bl9) | 0;\n hi = hi + Math.imul(ah1, bh9) | 0;\n var w10 = (c4 + lo | 0) + ((mid & 8191) << 13) | 0;\n c4 = (hi + (mid >>> 13) | 0) + (w10 >>> 26) | 0;\n w10 &= 67108863;\n lo = Math.imul(al9, bl2);\n mid = Math.imul(al9, bh2);\n mid = mid + Math.imul(ah9, bl2) | 0;\n hi = Math.imul(ah9, bh2);\n lo = lo + Math.imul(al8, bl3) | 0;\n mid = mid + Math.imul(al8, bh3) | 0;\n mid = mid + Math.imul(ah8, bl3) | 0;\n hi = hi + Math.imul(ah8, bh3) | 0;\n lo = lo + Math.imul(al7, bl4) | 0;\n mid = mid + Math.imul(al7, bh4) | 0;\n mid = mid + Math.imul(ah7, bl4) | 0;\n hi = hi + Math.imul(ah7, bh4) | 0;\n lo = lo + Math.imul(al6, bl5) | 0;\n mid = mid + Math.imul(al6, bh5) | 0;\n mid = mid + Math.imul(ah6, bl5) | 0;\n hi = hi + Math.imul(ah6, bh5) | 0;\n lo = lo + Math.imul(al5, bl6) | 0;\n mid = mid + Math.imul(al5, bh6) | 0;\n mid = mid + Math.imul(ah5, bl6) | 0;\n hi = hi + Math.imul(ah5, bh6) | 0;\n lo = lo + Math.imul(al4, bl7) | 0;\n mid = mid + Math.imul(al4, bh7) | 0;\n mid = mid + Math.imul(ah4, bl7) | 0;\n hi = hi + Math.imul(ah4, bh7) | 0;\n lo = lo + Math.imul(al3, bl8) | 0;\n mid = mid + Math.imul(al3, bh8) | 0;\n mid = mid + Math.imul(ah3, bl8) | 0;\n hi = hi + Math.imul(ah3, bh8) | 0;\n lo = lo + Math.imul(al2, bl9) | 0;\n mid = mid + Math.imul(al2, bh9) | 0;\n mid = mid + Math.imul(ah2, bl9) | 0;\n hi = hi + Math.imul(ah2, bh9) | 0;\n var w11 = (c4 + lo | 0) + ((mid & 8191) << 13) | 0;\n c4 = (hi + (mid >>> 13) | 0) + (w11 >>> 26) | 0;\n w11 &= 67108863;\n lo = Math.imul(al9, bl3);\n mid = Math.imul(al9, bh3);\n mid = mid + Math.imul(ah9, bl3) | 0;\n hi = Math.imul(ah9, bh3);\n lo = lo + Math.imul(al8, bl4) | 0;\n mid = mid + Math.imul(al8, bh4) | 0;\n mid = mid + Math.imul(ah8, bl4) | 0;\n hi = hi + Math.imul(ah8, bh4) | 0;\n lo = lo + Math.imul(al7, bl5) | 0;\n mid = mid + Math.imul(al7, bh5) | 0;\n mid = mid + Math.imul(ah7, bl5) | 0;\n hi = hi + Math.imul(ah7, bh5) | 0;\n lo = lo + Math.imul(al6, bl6) | 0;\n mid = mid + Math.imul(al6, bh6) | 0;\n mid = mid + Math.imul(ah6, bl6) | 0;\n hi = hi + Math.imul(ah6, bh6) | 0;\n lo = lo + Math.imul(al5, bl7) | 0;\n mid = mid + Math.imul(al5, bh7) | 0;\n mid = mid + Math.imul(ah5, bl7) | 0;\n hi = hi + Math.imul(ah5, bh7) | 0;\n lo = lo + Math.imul(al4, bl8) | 0;\n mid = mid + Math.imul(al4, bh8) | 0;\n mid = mid + Math.imul(ah4, bl8) | 0;\n hi = hi + Math.imul(ah4, bh8) | 0;\n lo = lo + Math.imul(al3, bl9) | 0;\n mid = mid + Math.imul(al3, bh9) | 0;\n mid = mid + Math.imul(ah3, bl9) | 0;\n hi = hi + Math.imul(ah3, bh9) | 0;\n var w12 = (c4 + lo | 0) + ((mid & 8191) << 13) | 0;\n c4 = (hi + (mid >>> 13) | 0) + (w12 >>> 26) | 0;\n w12 &= 67108863;\n lo = Math.imul(al9, bl4);\n mid = Math.imul(al9, bh4);\n mid = mid + Math.imul(ah9, bl4) | 0;\n hi = Math.imul(ah9, bh4);\n lo = lo + Math.imul(al8, bl5) | 0;\n mid = mid + Math.imul(al8, bh5) | 0;\n mid = mid + Math.imul(ah8, bl5) | 0;\n hi = hi + Math.imul(ah8, bh5) | 0;\n lo = lo + Math.imul(al7, bl6) | 0;\n mid = mid + Math.imul(al7, bh6) | 0;\n mid = mid + Math.imul(ah7, bl6) | 0;\n hi = hi + Math.imul(ah7, bh6) | 0;\n lo = lo + Math.imul(al6, bl7) | 0;\n mid = mid + Math.imul(al6, bh7) | 0;\n mid = mid + Math.imul(ah6, bl7) | 0;\n hi = hi + Math.imul(ah6, bh7) | 0;\n lo = lo + Math.imul(al5, bl8) | 0;\n mid = mid + Math.imul(al5, bh8) | 0;\n mid = mid + Math.imul(ah5, bl8) | 0;\n hi = hi + Math.imul(ah5, bh8) | 0;\n lo = lo + Math.imul(al4, bl9) | 0;\n mid = mid + Math.imul(al4, bh9) | 0;\n mid = mid + Math.imul(ah4, bl9) | 0;\n hi = hi + Math.imul(ah4, bh9) | 0;\n var w13 = (c4 + lo | 0) + ((mid & 8191) << 13) | 0;\n c4 = (hi + (mid >>> 13) | 0) + (w13 >>> 26) | 0;\n w13 &= 67108863;\n lo = Math.imul(al9, bl5);\n mid = Math.imul(al9, bh5);\n mid = mid + Math.imul(ah9, bl5) | 0;\n hi = Math.imul(ah9, bh5);\n lo = lo + Math.imul(al8, bl6) | 0;\n mid = mid + Math.imul(al8, bh6) | 0;\n mid = mid + Math.imul(ah8, bl6) | 0;\n hi = hi + Math.imul(ah8, bh6) | 0;\n lo = lo + Math.imul(al7, bl7) | 0;\n mid = mid + Math.imul(al7, bh7) | 0;\n mid = mid + Math.imul(ah7, bl7) | 0;\n hi = hi + Math.imul(ah7, bh7) | 0;\n lo = lo + Math.imul(al6, bl8) | 0;\n mid = mid + Math.imul(al6, bh8) | 0;\n mid = mid + Math.imul(ah6, bl8) | 0;\n hi = hi + Math.imul(ah6, bh8) | 0;\n lo = lo + Math.imul(al5, bl9) | 0;\n mid = mid + Math.imul(al5, bh9) | 0;\n mid = mid + Math.imul(ah5, bl9) | 0;\n hi = hi + Math.imul(ah5, bh9) | 0;\n var w14 = (c4 + lo | 0) + ((mid & 8191) << 13) | 0;\n c4 = (hi + (mid >>> 13) | 0) + (w14 >>> 26) | 0;\n w14 &= 67108863;\n lo = Math.imul(al9, bl6);\n mid = Math.imul(al9, bh6);\n mid = mid + Math.imul(ah9, bl6) | 0;\n hi = Math.imul(ah9, bh6);\n lo = lo + Math.imul(al8, bl7) | 0;\n mid = mid + Math.imul(al8, bh7) | 0;\n mid = mid + Math.imul(ah8, bl7) | 0;\n hi = hi + Math.imul(ah8, bh7) | 0;\n lo = lo + Math.imul(al7, bl8) | 0;\n mid = mid + Math.imul(al7, bh8) | 0;\n mid = mid + Math.imul(ah7, bl8) | 0;\n hi = hi + Math.imul(ah7, bh8) | 0;\n lo = lo + Math.imul(al6, bl9) | 0;\n mid = mid + Math.imul(al6, bh9) | 0;\n mid = mid + Math.imul(ah6, bl9) | 0;\n hi = hi + Math.imul(ah6, bh9) | 0;\n var w15 = (c4 + lo | 0) + ((mid & 8191) << 13) | 0;\n c4 = (hi + (mid >>> 13) | 0) + (w15 >>> 26) | 0;\n w15 &= 67108863;\n lo = Math.imul(al9, bl7);\n mid = Math.imul(al9, bh7);\n mid = mid + Math.imul(ah9, bl7) | 0;\n hi = Math.imul(ah9, bh7);\n lo = lo + Math.imul(al8, bl8) | 0;\n mid = mid + Math.imul(al8, bh8) | 0;\n mid = mid + Math.imul(ah8, bl8) | 0;\n hi = hi + Math.imul(ah8, bh8) | 0;\n lo = lo + Math.imul(al7, bl9) | 0;\n mid = mid + Math.imul(al7, bh9) | 0;\n mid = mid + Math.imul(ah7, bl9) | 0;\n hi = hi + Math.imul(ah7, bh9) | 0;\n var w16 = (c4 + lo | 0) + ((mid & 8191) << 13) | 0;\n c4 = (hi + (mid >>> 13) | 0) + (w16 >>> 26) | 0;\n w16 &= 67108863;\n lo = Math.imul(al9, bl8);\n mid = Math.imul(al9, bh8);\n mid = mid + Math.imul(ah9, bl8) | 0;\n hi = Math.imul(ah9, bh8);\n lo = lo + Math.imul(al8, bl9) | 0;\n mid = mid + Math.imul(al8, bh9) | 0;\n mid = mid + Math.imul(ah8, bl9) | 0;\n hi = hi + Math.imul(ah8, bh9) | 0;\n var w17 = (c4 + lo | 0) + ((mid & 8191) << 13) | 0;\n c4 = (hi + (mid >>> 13) | 0) + (w17 >>> 26) | 0;\n w17 &= 67108863;\n lo = Math.imul(al9, bl9);\n mid = Math.imul(al9, bh9);\n mid = mid + Math.imul(ah9, bl9) | 0;\n hi = Math.imul(ah9, bh9);\n var w18 = (c4 + lo | 0) + ((mid & 8191) << 13) | 0;\n c4 = (hi + (mid >>> 13) | 0) + (w18 >>> 26) | 0;\n w18 &= 67108863;\n o5[0] = w0;\n o5[1] = w1;\n o5[2] = w22;\n o5[3] = w3;\n o5[4] = w4;\n o5[5] = w5;\n o5[6] = w6;\n o5[7] = w7;\n o5[8] = w8;\n o5[9] = w9;\n o5[10] = w10;\n o5[11] = w11;\n o5[12] = w12;\n o5[13] = w13;\n o5[14] = w14;\n o5[15] = w15;\n o5[16] = w16;\n o5[17] = w17;\n o5[18] = w18;\n if (c4 !== 0) {\n o5[19] = c4;\n out.length++;\n }\n return out;\n };\n if (!Math.imul) {\n comb10MulTo = smallMulTo;\n }\n function bigMulTo(self2, num2, out) {\n out.negative = num2.negative ^ self2.negative;\n out.length = self2.length + num2.length;\n var carry = 0;\n var hncarry = 0;\n for (var k4 = 0; k4 < out.length - 1; k4++) {\n var ncarry = hncarry;\n hncarry = 0;\n var rword = carry & 67108863;\n var maxJ = Math.min(k4, num2.length - 1);\n for (var j2 = Math.max(0, k4 - self2.length + 1); j2 <= maxJ; j2++) {\n var i3 = k4 - j2;\n var a3 = self2.words[i3] | 0;\n var b4 = num2.words[j2] | 0;\n var r2 = a3 * b4;\n var lo = r2 & 67108863;\n ncarry = ncarry + (r2 / 67108864 | 0) | 0;\n lo = lo + rword | 0;\n rword = lo & 67108863;\n ncarry = ncarry + (lo >>> 26) | 0;\n hncarry += ncarry >>> 26;\n ncarry &= 67108863;\n }\n out.words[k4] = rword;\n carry = ncarry;\n ncarry = hncarry;\n }\n if (carry !== 0) {\n out.words[k4] = carry;\n } else {\n out.length--;\n }\n return out.strip();\n }\n function jumboMulTo(self2, num2, out) {\n var fftm = new FFTM();\n return fftm.mulp(self2, num2, out);\n }\n BN.prototype.mulTo = function mulTo(num2, out) {\n var res;\n var len = this.length + num2.length;\n if (this.length === 10 && num2.length === 10) {\n res = comb10MulTo(this, num2, out);\n } else if (len < 63) {\n res = smallMulTo(this, num2, out);\n } else if (len < 1024) {\n res = bigMulTo(this, num2, out);\n } else {\n res = jumboMulTo(this, num2, out);\n }\n return res;\n };\n function FFTM(x4, y6) {\n this.x = x4;\n this.y = y6;\n }\n FFTM.prototype.makeRBT = function makeRBT(N4) {\n var t3 = new Array(N4);\n var l6 = BN.prototype._countBits(N4) - 1;\n for (var i3 = 0; i3 < N4; i3++) {\n t3[i3] = this.revBin(i3, l6, N4);\n }\n return t3;\n };\n FFTM.prototype.revBin = function revBin(x4, l6, N4) {\n if (x4 === 0 || x4 === N4 - 1)\n return x4;\n var rb = 0;\n for (var i3 = 0; i3 < l6; i3++) {\n rb |= (x4 & 1) << l6 - i3 - 1;\n x4 >>= 1;\n }\n return rb;\n };\n FFTM.prototype.permute = function permute(rbt, rws, iws, rtws, itws, N4) {\n for (var i3 = 0; i3 < N4; i3++) {\n rtws[i3] = rws[rbt[i3]];\n itws[i3] = iws[rbt[i3]];\n }\n };\n FFTM.prototype.transform = function transform2(rws, iws, rtws, itws, N4, rbt) {\n this.permute(rbt, rws, iws, rtws, itws, N4);\n for (var s4 = 1; s4 < N4; s4 <<= 1) {\n var l6 = s4 << 1;\n var rtwdf = Math.cos(2 * Math.PI / l6);\n var itwdf = Math.sin(2 * Math.PI / l6);\n for (var p4 = 0; p4 < N4; p4 += l6) {\n var rtwdf_ = rtwdf;\n var itwdf_ = itwdf;\n for (var j2 = 0; j2 < s4; j2++) {\n var re = rtws[p4 + j2];\n var ie = itws[p4 + j2];\n var ro = rtws[p4 + j2 + s4];\n var io = itws[p4 + j2 + s4];\n var rx = rtwdf_ * ro - itwdf_ * io;\n io = rtwdf_ * io + itwdf_ * ro;\n ro = rx;\n rtws[p4 + j2] = re + ro;\n itws[p4 + j2] = ie + io;\n rtws[p4 + j2 + s4] = re - ro;\n itws[p4 + j2 + s4] = ie - io;\n if (j2 !== l6) {\n rx = rtwdf * rtwdf_ - itwdf * itwdf_;\n itwdf_ = rtwdf * itwdf_ + itwdf * rtwdf_;\n rtwdf_ = rx;\n }\n }\n }\n }\n };\n FFTM.prototype.guessLen13b = function guessLen13b(n2, m2) {\n var N4 = Math.max(m2, n2) | 1;\n var odd = N4 & 1;\n var i3 = 0;\n for (N4 = N4 / 2 | 0; N4; N4 = N4 >>> 1) {\n i3++;\n }\n return 1 << i3 + 1 + odd;\n };\n FFTM.prototype.conjugate = function conjugate(rws, iws, N4) {\n if (N4 <= 1)\n return;\n for (var i3 = 0; i3 < N4 / 2; i3++) {\n var t3 = rws[i3];\n rws[i3] = rws[N4 - i3 - 1];\n rws[N4 - i3 - 1] = t3;\n t3 = iws[i3];\n iws[i3] = -iws[N4 - i3 - 1];\n iws[N4 - i3 - 1] = -t3;\n }\n };\n FFTM.prototype.normalize13b = function normalize13b(ws, N4) {\n var carry = 0;\n for (var i3 = 0; i3 < N4 / 2; i3++) {\n var w3 = Math.round(ws[2 * i3 + 1] / N4) * 8192 + Math.round(ws[2 * i3] / N4) + carry;\n ws[i3] = w3 & 67108863;\n if (w3 < 67108864) {\n carry = 0;\n } else {\n carry = w3 / 67108864 | 0;\n }\n }\n return ws;\n };\n FFTM.prototype.convert13b = function convert13b(ws, len, rws, N4) {\n var carry = 0;\n for (var i3 = 0; i3 < len; i3++) {\n carry = carry + (ws[i3] | 0);\n rws[2 * i3] = carry & 8191;\n carry = carry >>> 13;\n rws[2 * i3 + 1] = carry & 8191;\n carry = carry >>> 13;\n }\n for (i3 = 2 * len; i3 < N4; ++i3) {\n rws[i3] = 0;\n }\n assert9(carry === 0);\n assert9((carry & ~8191) === 0);\n };\n FFTM.prototype.stub = function stub(N4) {\n var ph = new Array(N4);\n for (var i3 = 0; i3 < N4; i3++) {\n ph[i3] = 0;\n }\n return ph;\n };\n FFTM.prototype.mulp = function mulp(x4, y6, out) {\n var N4 = 2 * this.guessLen13b(x4.length, y6.length);\n var rbt = this.makeRBT(N4);\n var _2 = this.stub(N4);\n var rws = new Array(N4);\n var rwst = new Array(N4);\n var iwst = new Array(N4);\n var nrws = new Array(N4);\n var nrwst = new Array(N4);\n var niwst = new Array(N4);\n var rmws = out.words;\n rmws.length = N4;\n this.convert13b(x4.words, x4.length, rws, N4);\n this.convert13b(y6.words, y6.length, nrws, N4);\n this.transform(rws, _2, rwst, iwst, N4, rbt);\n this.transform(nrws, _2, nrwst, niwst, N4, rbt);\n for (var i3 = 0; i3 < N4; i3++) {\n var rx = rwst[i3] * nrwst[i3] - iwst[i3] * niwst[i3];\n iwst[i3] = rwst[i3] * niwst[i3] + iwst[i3] * nrwst[i3];\n rwst[i3] = rx;\n }\n this.conjugate(rwst, iwst, N4);\n this.transform(rwst, iwst, rmws, _2, N4, rbt);\n this.conjugate(rmws, _2, N4);\n this.normalize13b(rmws, N4);\n out.negative = x4.negative ^ y6.negative;\n out.length = x4.length + y6.length;\n return out.strip();\n };\n BN.prototype.mul = function mul(num2) {\n var out = new BN(null);\n out.words = new Array(this.length + num2.length);\n return this.mulTo(num2, out);\n };\n BN.prototype.mulf = function mulf(num2) {\n var out = new BN(null);\n out.words = new Array(this.length + num2.length);\n return jumboMulTo(this, num2, out);\n };\n BN.prototype.imul = function imul(num2) {\n return this.clone().mulTo(num2, this);\n };\n BN.prototype.imuln = function imuln(num2) {\n assert9(typeof num2 === \"number\");\n assert9(num2 < 67108864);\n var carry = 0;\n for (var i3 = 0; i3 < this.length; i3++) {\n var w3 = (this.words[i3] | 0) * num2;\n var lo = (w3 & 67108863) + (carry & 67108863);\n carry >>= 26;\n carry += w3 / 67108864 | 0;\n carry += lo >>> 26;\n this.words[i3] = lo & 67108863;\n }\n if (carry !== 0) {\n this.words[i3] = carry;\n this.length++;\n }\n this.length = num2 === 0 ? 1 : this.length;\n return this;\n };\n BN.prototype.muln = function muln(num2) {\n return this.clone().imuln(num2);\n };\n BN.prototype.sqr = function sqr() {\n return this.mul(this);\n };\n BN.prototype.isqr = function isqr() {\n return this.imul(this.clone());\n };\n BN.prototype.pow = function pow(num2) {\n var w3 = toBitArray(num2);\n if (w3.length === 0)\n return new BN(1);\n var res = this;\n for (var i3 = 0; i3 < w3.length; i3++, res = res.sqr()) {\n if (w3[i3] !== 0)\n break;\n }\n if (++i3 < w3.length) {\n for (var q3 = res.sqr(); i3 < w3.length; i3++, q3 = q3.sqr()) {\n if (w3[i3] === 0)\n continue;\n res = res.mul(q3);\n }\n }\n return res;\n };\n BN.prototype.iushln = function iushln(bits) {\n assert9(typeof bits === \"number\" && bits >= 0);\n var r2 = bits % 26;\n var s4 = (bits - r2) / 26;\n var carryMask = 67108863 >>> 26 - r2 << 26 - r2;\n var i3;\n if (r2 !== 0) {\n var carry = 0;\n for (i3 = 0; i3 < this.length; i3++) {\n var newCarry = this.words[i3] & carryMask;\n var c4 = (this.words[i3] | 0) - newCarry << r2;\n this.words[i3] = c4 | carry;\n carry = newCarry >>> 26 - r2;\n }\n if (carry) {\n this.words[i3] = carry;\n this.length++;\n }\n }\n if (s4 !== 0) {\n for (i3 = this.length - 1; i3 >= 0; i3--) {\n this.words[i3 + s4] = this.words[i3];\n }\n for (i3 = 0; i3 < s4; i3++) {\n this.words[i3] = 0;\n }\n this.length += s4;\n }\n return this.strip();\n };\n BN.prototype.ishln = function ishln(bits) {\n assert9(this.negative === 0);\n return this.iushln(bits);\n };\n BN.prototype.iushrn = function iushrn(bits, hint, extended) {\n assert9(typeof bits === \"number\" && bits >= 0);\n var h4;\n if (hint) {\n h4 = (hint - hint % 26) / 26;\n } else {\n h4 = 0;\n }\n var r2 = bits % 26;\n var s4 = Math.min((bits - r2) / 26, this.length);\n var mask = 67108863 ^ 67108863 >>> r2 << r2;\n var maskedWords = extended;\n h4 -= s4;\n h4 = Math.max(0, h4);\n if (maskedWords) {\n for (var i3 = 0; i3 < s4; i3++) {\n maskedWords.words[i3] = this.words[i3];\n }\n maskedWords.length = s4;\n }\n if (s4 === 0) {\n } else if (this.length > s4) {\n this.length -= s4;\n for (i3 = 0; i3 < this.length; i3++) {\n this.words[i3] = this.words[i3 + s4];\n }\n } else {\n this.words[0] = 0;\n this.length = 1;\n }\n var carry = 0;\n for (i3 = this.length - 1; i3 >= 0 && (carry !== 0 || i3 >= h4); i3--) {\n var word = this.words[i3] | 0;\n this.words[i3] = carry << 26 - r2 | word >>> r2;\n carry = word & mask;\n }\n if (maskedWords && carry !== 0) {\n maskedWords.words[maskedWords.length++] = carry;\n }\n if (this.length === 0) {\n this.words[0] = 0;\n this.length = 1;\n }\n return this.strip();\n };\n BN.prototype.ishrn = function ishrn(bits, hint, extended) {\n assert9(this.negative === 0);\n return this.iushrn(bits, hint, extended);\n };\n BN.prototype.shln = function shln(bits) {\n return this.clone().ishln(bits);\n };\n BN.prototype.ushln = function ushln(bits) {\n return this.clone().iushln(bits);\n };\n BN.prototype.shrn = function shrn(bits) {\n return this.clone().ishrn(bits);\n };\n BN.prototype.ushrn = function ushrn(bits) {\n return this.clone().iushrn(bits);\n };\n BN.prototype.testn = function testn(bit) {\n assert9(typeof bit === \"number\" && bit >= 0);\n var r2 = bit % 26;\n var s4 = (bit - r2) / 26;\n var q3 = 1 << r2;\n if (this.length <= s4)\n return false;\n var w3 = this.words[s4];\n return !!(w3 & q3);\n };\n BN.prototype.imaskn = function imaskn(bits) {\n assert9(typeof bits === \"number\" && bits >= 0);\n var r2 = bits % 26;\n var s4 = (bits - r2) / 26;\n assert9(this.negative === 0, \"imaskn works only with positive numbers\");\n if (this.length <= s4) {\n return this;\n }\n if (r2 !== 0) {\n s4++;\n }\n this.length = Math.min(s4, this.length);\n if (r2 !== 0) {\n var mask = 67108863 ^ 67108863 >>> r2 << r2;\n this.words[this.length - 1] &= mask;\n }\n return this.strip();\n };\n BN.prototype.maskn = function maskn(bits) {\n return this.clone().imaskn(bits);\n };\n BN.prototype.iaddn = function iaddn(num2) {\n assert9(typeof num2 === \"number\");\n assert9(num2 < 67108864);\n if (num2 < 0)\n return this.isubn(-num2);\n if (this.negative !== 0) {\n if (this.length === 1 && (this.words[0] | 0) < num2) {\n this.words[0] = num2 - (this.words[0] | 0);\n this.negative = 0;\n return this;\n }\n this.negative = 0;\n this.isubn(num2);\n this.negative = 1;\n return this;\n }\n return this._iaddn(num2);\n };\n BN.prototype._iaddn = function _iaddn(num2) {\n this.words[0] += num2;\n for (var i3 = 0; i3 < this.length && this.words[i3] >= 67108864; i3++) {\n this.words[i3] -= 67108864;\n if (i3 === this.length - 1) {\n this.words[i3 + 1] = 1;\n } else {\n this.words[i3 + 1]++;\n }\n }\n this.length = Math.max(this.length, i3 + 1);\n return this;\n };\n BN.prototype.isubn = function isubn(num2) {\n assert9(typeof num2 === \"number\");\n assert9(num2 < 67108864);\n if (num2 < 0)\n return this.iaddn(-num2);\n if (this.negative !== 0) {\n this.negative = 0;\n this.iaddn(num2);\n this.negative = 1;\n return this;\n }\n this.words[0] -= num2;\n if (this.length === 1 && this.words[0] < 0) {\n this.words[0] = -this.words[0];\n this.negative = 1;\n } else {\n for (var i3 = 0; i3 < this.length && this.words[i3] < 0; i3++) {\n this.words[i3] += 67108864;\n this.words[i3 + 1] -= 1;\n }\n }\n return this.strip();\n };\n BN.prototype.addn = function addn(num2) {\n return this.clone().iaddn(num2);\n };\n BN.prototype.subn = function subn(num2) {\n return this.clone().isubn(num2);\n };\n BN.prototype.iabs = function iabs() {\n this.negative = 0;\n return this;\n };\n BN.prototype.abs = function abs() {\n return this.clone().iabs();\n };\n BN.prototype._ishlnsubmul = function _ishlnsubmul(num2, mul, shift) {\n var len = num2.length + shift;\n var i3;\n this._expand(len);\n var w3;\n var carry = 0;\n for (i3 = 0; i3 < num2.length; i3++) {\n w3 = (this.words[i3 + shift] | 0) + carry;\n var right = (num2.words[i3] | 0) * mul;\n w3 -= right & 67108863;\n carry = (w3 >> 26) - (right / 67108864 | 0);\n this.words[i3 + shift] = w3 & 67108863;\n }\n for (; i3 < this.length - shift; i3++) {\n w3 = (this.words[i3 + shift] | 0) + carry;\n carry = w3 >> 26;\n this.words[i3 + shift] = w3 & 67108863;\n }\n if (carry === 0)\n return this.strip();\n assert9(carry === -1);\n carry = 0;\n for (i3 = 0; i3 < this.length; i3++) {\n w3 = -(this.words[i3] | 0) + carry;\n carry = w3 >> 26;\n this.words[i3] = w3 & 67108863;\n }\n this.negative = 1;\n return this.strip();\n };\n BN.prototype._wordDiv = function _wordDiv(num2, mode) {\n var shift = this.length - num2.length;\n var a3 = this.clone();\n var b4 = num2;\n var bhi = b4.words[b4.length - 1] | 0;\n var bhiBits = this._countBits(bhi);\n shift = 26 - bhiBits;\n if (shift !== 0) {\n b4 = b4.ushln(shift);\n a3.iushln(shift);\n bhi = b4.words[b4.length - 1] | 0;\n }\n var m2 = a3.length - b4.length;\n var q3;\n if (mode !== \"mod\") {\n q3 = new BN(null);\n q3.length = m2 + 1;\n q3.words = new Array(q3.length);\n for (var i3 = 0; i3 < q3.length; i3++) {\n q3.words[i3] = 0;\n }\n }\n var diff = a3.clone()._ishlnsubmul(b4, 1, m2);\n if (diff.negative === 0) {\n a3 = diff;\n if (q3) {\n q3.words[m2] = 1;\n }\n }\n for (var j2 = m2 - 1; j2 >= 0; j2--) {\n var qj = (a3.words[b4.length + j2] | 0) * 67108864 + (a3.words[b4.length + j2 - 1] | 0);\n qj = Math.min(qj / bhi | 0, 67108863);\n a3._ishlnsubmul(b4, qj, j2);\n while (a3.negative !== 0) {\n qj--;\n a3.negative = 0;\n a3._ishlnsubmul(b4, 1, j2);\n if (!a3.isZero()) {\n a3.negative ^= 1;\n }\n }\n if (q3) {\n q3.words[j2] = qj;\n }\n }\n if (q3) {\n q3.strip();\n }\n a3.strip();\n if (mode !== \"div\" && shift !== 0) {\n a3.iushrn(shift);\n }\n return {\n div: q3 || null,\n mod: a3\n };\n };\n BN.prototype.divmod = function divmod(num2, mode, positive) {\n assert9(!num2.isZero());\n if (this.isZero()) {\n return {\n div: new BN(0),\n mod: new BN(0)\n };\n }\n var div, mod3, res;\n if (this.negative !== 0 && num2.negative === 0) {\n res = this.neg().divmod(num2, mode);\n if (mode !== \"mod\") {\n div = res.div.neg();\n }\n if (mode !== \"div\") {\n mod3 = res.mod.neg();\n if (positive && mod3.negative !== 0) {\n mod3.iadd(num2);\n }\n }\n return {\n div,\n mod: mod3\n };\n }\n if (this.negative === 0 && num2.negative !== 0) {\n res = this.divmod(num2.neg(), mode);\n if (mode !== \"mod\") {\n div = res.div.neg();\n }\n return {\n div,\n mod: res.mod\n };\n }\n if ((this.negative & num2.negative) !== 0) {\n res = this.neg().divmod(num2.neg(), mode);\n if (mode !== \"div\") {\n mod3 = res.mod.neg();\n if (positive && mod3.negative !== 0) {\n mod3.isub(num2);\n }\n }\n return {\n div: res.div,\n mod: mod3\n };\n }\n if (num2.length > this.length || this.cmp(num2) < 0) {\n return {\n div: new BN(0),\n mod: this\n };\n }\n if (num2.length === 1) {\n if (mode === \"div\") {\n return {\n div: this.divn(num2.words[0]),\n mod: null\n };\n }\n if (mode === \"mod\") {\n return {\n div: null,\n mod: new BN(this.modn(num2.words[0]))\n };\n }\n return {\n div: this.divn(num2.words[0]),\n mod: new BN(this.modn(num2.words[0]))\n };\n }\n return this._wordDiv(num2, mode);\n };\n BN.prototype.div = function div(num2) {\n return this.divmod(num2, \"div\", false).div;\n };\n BN.prototype.mod = function mod3(num2) {\n return this.divmod(num2, \"mod\", false).mod;\n };\n BN.prototype.umod = function umod(num2) {\n return this.divmod(num2, \"mod\", true).mod;\n };\n BN.prototype.divRound = function divRound(num2) {\n var dm = this.divmod(num2);\n if (dm.mod.isZero())\n return dm.div;\n var mod3 = dm.div.negative !== 0 ? dm.mod.isub(num2) : dm.mod;\n var half = num2.ushrn(1);\n var r2 = num2.andln(1);\n var cmp = mod3.cmp(half);\n if (cmp < 0 || r2 === 1 && cmp === 0)\n return dm.div;\n return dm.div.negative !== 0 ? dm.div.isubn(1) : dm.div.iaddn(1);\n };\n BN.prototype.modn = function modn(num2) {\n assert9(num2 <= 67108863);\n var p4 = (1 << 26) % num2;\n var acc = 0;\n for (var i3 = this.length - 1; i3 >= 0; i3--) {\n acc = (p4 * acc + (this.words[i3] | 0)) % num2;\n }\n return acc;\n };\n BN.prototype.idivn = function idivn(num2) {\n assert9(num2 <= 67108863);\n var carry = 0;\n for (var i3 = this.length - 1; i3 >= 0; i3--) {\n var w3 = (this.words[i3] | 0) + carry * 67108864;\n this.words[i3] = w3 / num2 | 0;\n carry = w3 % num2;\n }\n return this.strip();\n };\n BN.prototype.divn = function divn(num2) {\n return this.clone().idivn(num2);\n };\n BN.prototype.egcd = function egcd(p4) {\n assert9(p4.negative === 0);\n assert9(!p4.isZero());\n var x4 = this;\n var y6 = p4.clone();\n if (x4.negative !== 0) {\n x4 = x4.umod(p4);\n } else {\n x4 = x4.clone();\n }\n var A4 = new BN(1);\n var B2 = new BN(0);\n var C = new BN(0);\n var D2 = new BN(1);\n var g4 = 0;\n while (x4.isEven() && y6.isEven()) {\n x4.iushrn(1);\n y6.iushrn(1);\n ++g4;\n }\n var yp = y6.clone();\n var xp = x4.clone();\n while (!x4.isZero()) {\n for (var i3 = 0, im = 1; (x4.words[0] & im) === 0 && i3 < 26; ++i3, im <<= 1)\n ;\n if (i3 > 0) {\n x4.iushrn(i3);\n while (i3-- > 0) {\n if (A4.isOdd() || B2.isOdd()) {\n A4.iadd(yp);\n B2.isub(xp);\n }\n A4.iushrn(1);\n B2.iushrn(1);\n }\n }\n for (var j2 = 0, jm = 1; (y6.words[0] & jm) === 0 && j2 < 26; ++j2, jm <<= 1)\n ;\n if (j2 > 0) {\n y6.iushrn(j2);\n while (j2-- > 0) {\n if (C.isOdd() || D2.isOdd()) {\n C.iadd(yp);\n D2.isub(xp);\n }\n C.iushrn(1);\n D2.iushrn(1);\n }\n }\n if (x4.cmp(y6) >= 0) {\n x4.isub(y6);\n A4.isub(C);\n B2.isub(D2);\n } else {\n y6.isub(x4);\n C.isub(A4);\n D2.isub(B2);\n }\n }\n return {\n a: C,\n b: D2,\n gcd: y6.iushln(g4)\n };\n };\n BN.prototype._invmp = function _invmp(p4) {\n assert9(p4.negative === 0);\n assert9(!p4.isZero());\n var a3 = this;\n var b4 = p4.clone();\n if (a3.negative !== 0) {\n a3 = a3.umod(p4);\n } else {\n a3 = a3.clone();\n }\n var x1 = new BN(1);\n var x22 = new BN(0);\n var delta = b4.clone();\n while (a3.cmpn(1) > 0 && b4.cmpn(1) > 0) {\n for (var i3 = 0, im = 1; (a3.words[0] & im) === 0 && i3 < 26; ++i3, im <<= 1)\n ;\n if (i3 > 0) {\n a3.iushrn(i3);\n while (i3-- > 0) {\n if (x1.isOdd()) {\n x1.iadd(delta);\n }\n x1.iushrn(1);\n }\n }\n for (var j2 = 0, jm = 1; (b4.words[0] & jm) === 0 && j2 < 26; ++j2, jm <<= 1)\n ;\n if (j2 > 0) {\n b4.iushrn(j2);\n while (j2-- > 0) {\n if (x22.isOdd()) {\n x22.iadd(delta);\n }\n x22.iushrn(1);\n }\n }\n if (a3.cmp(b4) >= 0) {\n a3.isub(b4);\n x1.isub(x22);\n } else {\n b4.isub(a3);\n x22.isub(x1);\n }\n }\n var res;\n if (a3.cmpn(1) === 0) {\n res = x1;\n } else {\n res = x22;\n }\n if (res.cmpn(0) < 0) {\n res.iadd(p4);\n }\n return res;\n };\n BN.prototype.gcd = function gcd(num2) {\n if (this.isZero())\n return num2.abs();\n if (num2.isZero())\n return this.abs();\n var a3 = this.clone();\n var b4 = num2.clone();\n a3.negative = 0;\n b4.negative = 0;\n for (var shift = 0; a3.isEven() && b4.isEven(); shift++) {\n a3.iushrn(1);\n b4.iushrn(1);\n }\n do {\n while (a3.isEven()) {\n a3.iushrn(1);\n }\n while (b4.isEven()) {\n b4.iushrn(1);\n }\n var r2 = a3.cmp(b4);\n if (r2 < 0) {\n var t3 = a3;\n a3 = b4;\n b4 = t3;\n } else if (r2 === 0 || b4.cmpn(1) === 0) {\n break;\n }\n a3.isub(b4);\n } while (true);\n return b4.iushln(shift);\n };\n BN.prototype.invm = function invm(num2) {\n return this.egcd(num2).a.umod(num2);\n };\n BN.prototype.isEven = function isEven() {\n return (this.words[0] & 1) === 0;\n };\n BN.prototype.isOdd = function isOdd() {\n return (this.words[0] & 1) === 1;\n };\n BN.prototype.andln = function andln(num2) {\n return this.words[0] & num2;\n };\n BN.prototype.bincn = function bincn(bit) {\n assert9(typeof bit === \"number\");\n var r2 = bit % 26;\n var s4 = (bit - r2) / 26;\n var q3 = 1 << r2;\n if (this.length <= s4) {\n this._expand(s4 + 1);\n this.words[s4] |= q3;\n return this;\n }\n var carry = q3;\n for (var i3 = s4; carry !== 0 && i3 < this.length; i3++) {\n var w3 = this.words[i3] | 0;\n w3 += carry;\n carry = w3 >>> 26;\n w3 &= 67108863;\n this.words[i3] = w3;\n }\n if (carry !== 0) {\n this.words[i3] = carry;\n this.length++;\n }\n return this;\n };\n BN.prototype.isZero = function isZero() {\n return this.length === 1 && this.words[0] === 0;\n };\n BN.prototype.cmpn = function cmpn(num2) {\n var negative = num2 < 0;\n if (this.negative !== 0 && !negative)\n return -1;\n if (this.negative === 0 && negative)\n return 1;\n this.strip();\n var res;\n if (this.length > 1) {\n res = 1;\n } else {\n if (negative) {\n num2 = -num2;\n }\n assert9(num2 <= 67108863, \"Number is too big\");\n var w3 = this.words[0] | 0;\n res = w3 === num2 ? 0 : w3 < num2 ? -1 : 1;\n }\n if (this.negative !== 0)\n return -res | 0;\n return res;\n };\n BN.prototype.cmp = function cmp(num2) {\n if (this.negative !== 0 && num2.negative === 0)\n return -1;\n if (this.negative === 0 && num2.negative !== 0)\n return 1;\n var res = this.ucmp(num2);\n if (this.negative !== 0)\n return -res | 0;\n return res;\n };\n BN.prototype.ucmp = function ucmp(num2) {\n if (this.length > num2.length)\n return 1;\n if (this.length < num2.length)\n return -1;\n var res = 0;\n for (var i3 = this.length - 1; i3 >= 0; i3--) {\n var a3 = this.words[i3] | 0;\n var b4 = num2.words[i3] | 0;\n if (a3 === b4)\n continue;\n if (a3 < b4) {\n res = -1;\n } else if (a3 > b4) {\n res = 1;\n }\n break;\n }\n return res;\n };\n BN.prototype.gtn = function gtn(num2) {\n return this.cmpn(num2) === 1;\n };\n BN.prototype.gt = function gt(num2) {\n return this.cmp(num2) === 1;\n };\n BN.prototype.gten = function gten(num2) {\n return this.cmpn(num2) >= 0;\n };\n BN.prototype.gte = function gte(num2) {\n return this.cmp(num2) >= 0;\n };\n BN.prototype.ltn = function ltn(num2) {\n return this.cmpn(num2) === -1;\n };\n BN.prototype.lt = function lt(num2) {\n return this.cmp(num2) === -1;\n };\n BN.prototype.lten = function lten(num2) {\n return this.cmpn(num2) <= 0;\n };\n BN.prototype.lte = function lte(num2) {\n return this.cmp(num2) <= 0;\n };\n BN.prototype.eqn = function eqn(num2) {\n return this.cmpn(num2) === 0;\n };\n BN.prototype.eq = function eq(num2) {\n return this.cmp(num2) === 0;\n };\n BN.red = function red(num2) {\n return new Red(num2);\n };\n BN.prototype.toRed = function toRed(ctx) {\n assert9(!this.red, \"Already a number in reduction context\");\n assert9(this.negative === 0, \"red works only with positives\");\n return ctx.convertTo(this)._forceRed(ctx);\n };\n BN.prototype.fromRed = function fromRed() {\n assert9(this.red, \"fromRed works only with numbers in reduction context\");\n return this.red.convertFrom(this);\n };\n BN.prototype._forceRed = function _forceRed(ctx) {\n this.red = ctx;\n return this;\n };\n BN.prototype.forceRed = function forceRed(ctx) {\n assert9(!this.red, \"Already a number in reduction context\");\n return this._forceRed(ctx);\n };\n BN.prototype.redAdd = function redAdd(num2) {\n assert9(this.red, \"redAdd works only with red numbers\");\n return this.red.add(this, num2);\n };\n BN.prototype.redIAdd = function redIAdd(num2) {\n assert9(this.red, \"redIAdd works only with red numbers\");\n return this.red.iadd(this, num2);\n };\n BN.prototype.redSub = function redSub(num2) {\n assert9(this.red, \"redSub works only with red numbers\");\n return this.red.sub(this, num2);\n };\n BN.prototype.redISub = function redISub(num2) {\n assert9(this.red, \"redISub works only with red numbers\");\n return this.red.isub(this, num2);\n };\n BN.prototype.redShl = function redShl(num2) {\n assert9(this.red, \"redShl works only with red numbers\");\n return this.red.shl(this, num2);\n };\n BN.prototype.redMul = function redMul(num2) {\n assert9(this.red, \"redMul works only with red numbers\");\n this.red._verify2(this, num2);\n return this.red.mul(this, num2);\n };\n BN.prototype.redIMul = function redIMul(num2) {\n assert9(this.red, \"redMul works only with red numbers\");\n this.red._verify2(this, num2);\n return this.red.imul(this, num2);\n };\n BN.prototype.redSqr = function redSqr() {\n assert9(this.red, \"redSqr works only with red numbers\");\n this.red._verify1(this);\n return this.red.sqr(this);\n };\n BN.prototype.redISqr = function redISqr() {\n assert9(this.red, \"redISqr works only with red numbers\");\n this.red._verify1(this);\n return this.red.isqr(this);\n };\n BN.prototype.redSqrt = function redSqrt() {\n assert9(this.red, \"redSqrt works only with red numbers\");\n this.red._verify1(this);\n return this.red.sqrt(this);\n };\n BN.prototype.redInvm = function redInvm() {\n assert9(this.red, \"redInvm works only with red numbers\");\n this.red._verify1(this);\n return this.red.invm(this);\n };\n BN.prototype.redNeg = function redNeg() {\n assert9(this.red, \"redNeg works only with red numbers\");\n this.red._verify1(this);\n return this.red.neg(this);\n };\n BN.prototype.redPow = function redPow(num2) {\n assert9(this.red && !num2.red, \"redPow(normalNum)\");\n this.red._verify1(this);\n return this.red.pow(this, num2);\n };\n var primes = {\n k256: null,\n p224: null,\n p192: null,\n p25519: null\n };\n function MPrime(name, p4) {\n this.name = name;\n this.p = new BN(p4, 16);\n this.n = this.p.bitLength();\n this.k = new BN(1).iushln(this.n).isub(this.p);\n this.tmp = this._tmp();\n }\n MPrime.prototype._tmp = function _tmp() {\n var tmp = new BN(null);\n tmp.words = new Array(Math.ceil(this.n / 13));\n return tmp;\n };\n MPrime.prototype.ireduce = function ireduce(num2) {\n var r2 = num2;\n var rlen;\n do {\n this.split(r2, this.tmp);\n r2 = this.imulK(r2);\n r2 = r2.iadd(this.tmp);\n rlen = r2.bitLength();\n } while (rlen > this.n);\n var cmp = rlen < this.n ? -1 : r2.ucmp(this.p);\n if (cmp === 0) {\n r2.words[0] = 0;\n r2.length = 1;\n } else if (cmp > 0) {\n r2.isub(this.p);\n } else {\n if (r2.strip !== void 0) {\n r2.strip();\n } else {\n r2._strip();\n }\n }\n return r2;\n };\n MPrime.prototype.split = function split4(input, out) {\n input.iushrn(this.n, 0, out);\n };\n MPrime.prototype.imulK = function imulK(num2) {\n return num2.imul(this.k);\n };\n function K256() {\n MPrime.call(\n this,\n \"k256\",\n \"ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe fffffc2f\"\n );\n }\n inherits(K256, MPrime);\n K256.prototype.split = function split4(input, output) {\n var mask = 4194303;\n var outLen = Math.min(input.length, 9);\n for (var i3 = 0; i3 < outLen; i3++) {\n output.words[i3] = input.words[i3];\n }\n output.length = outLen;\n if (input.length <= 9) {\n input.words[0] = 0;\n input.length = 1;\n return;\n }\n var prev = input.words[9];\n output.words[output.length++] = prev & mask;\n for (i3 = 10; i3 < input.length; i3++) {\n var next = input.words[i3] | 0;\n input.words[i3 - 10] = (next & mask) << 4 | prev >>> 22;\n prev = next;\n }\n prev >>>= 22;\n input.words[i3 - 10] = prev;\n if (prev === 0 && input.length > 10) {\n input.length -= 10;\n } else {\n input.length -= 9;\n }\n };\n K256.prototype.imulK = function imulK(num2) {\n num2.words[num2.length] = 0;\n num2.words[num2.length + 1] = 0;\n num2.length += 2;\n var lo = 0;\n for (var i3 = 0; i3 < num2.length; i3++) {\n var w3 = num2.words[i3] | 0;\n lo += w3 * 977;\n num2.words[i3] = lo & 67108863;\n lo = w3 * 64 + (lo / 67108864 | 0);\n }\n if (num2.words[num2.length - 1] === 0) {\n num2.length--;\n if (num2.words[num2.length - 1] === 0) {\n num2.length--;\n }\n }\n return num2;\n };\n function P224() {\n MPrime.call(\n this,\n \"p224\",\n \"ffffffff ffffffff ffffffff ffffffff 00000000 00000000 00000001\"\n );\n }\n inherits(P224, MPrime);\n function P192() {\n MPrime.call(\n this,\n \"p192\",\n \"ffffffff ffffffff ffffffff fffffffe ffffffff ffffffff\"\n );\n }\n inherits(P192, MPrime);\n function P25519() {\n MPrime.call(\n this,\n \"25519\",\n \"7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed\"\n );\n }\n inherits(P25519, MPrime);\n P25519.prototype.imulK = function imulK(num2) {\n var carry = 0;\n for (var i3 = 0; i3 < num2.length; i3++) {\n var hi = (num2.words[i3] | 0) * 19 + carry;\n var lo = hi & 67108863;\n hi >>>= 26;\n num2.words[i3] = lo;\n carry = hi;\n }\n if (carry !== 0) {\n num2.words[num2.length++] = carry;\n }\n return num2;\n };\n BN._prime = function prime(name) {\n if (primes[name])\n return primes[name];\n var prime2;\n if (name === \"k256\") {\n prime2 = new K256();\n } else if (name === \"p224\") {\n prime2 = new P224();\n } else if (name === \"p192\") {\n prime2 = new P192();\n } else if (name === \"p25519\") {\n prime2 = new P25519();\n } else {\n throw new Error(\"Unknown prime \" + name);\n }\n primes[name] = prime2;\n return prime2;\n };\n function Red(m2) {\n if (typeof m2 === \"string\") {\n var prime = BN._prime(m2);\n this.m = prime.p;\n this.prime = prime;\n } else {\n assert9(m2.gtn(1), \"modulus must be greater than 1\");\n this.m = m2;\n this.prime = null;\n }\n }\n Red.prototype._verify1 = function _verify1(a3) {\n assert9(a3.negative === 0, \"red works only with positives\");\n assert9(a3.red, \"red works only with red numbers\");\n };\n Red.prototype._verify2 = function _verify2(a3, b4) {\n assert9((a3.negative | b4.negative) === 0, \"red works only with positives\");\n assert9(\n a3.red && a3.red === b4.red,\n \"red works only with red numbers\"\n );\n };\n Red.prototype.imod = function imod(a3) {\n if (this.prime)\n return this.prime.ireduce(a3)._forceRed(this);\n return a3.umod(this.m)._forceRed(this);\n };\n Red.prototype.neg = function neg(a3) {\n if (a3.isZero()) {\n return a3.clone();\n }\n return this.m.sub(a3)._forceRed(this);\n };\n Red.prototype.add = function add2(a3, b4) {\n this._verify2(a3, b4);\n var res = a3.add(b4);\n if (res.cmp(this.m) >= 0) {\n res.isub(this.m);\n }\n return res._forceRed(this);\n };\n Red.prototype.iadd = function iadd(a3, b4) {\n this._verify2(a3, b4);\n var res = a3.iadd(b4);\n if (res.cmp(this.m) >= 0) {\n res.isub(this.m);\n }\n return res;\n };\n Red.prototype.sub = function sub(a3, b4) {\n this._verify2(a3, b4);\n var res = a3.sub(b4);\n if (res.cmpn(0) < 0) {\n res.iadd(this.m);\n }\n return res._forceRed(this);\n };\n Red.prototype.isub = function isub(a3, b4) {\n this._verify2(a3, b4);\n var res = a3.isub(b4);\n if (res.cmpn(0) < 0) {\n res.iadd(this.m);\n }\n return res;\n };\n Red.prototype.shl = function shl(a3, num2) {\n this._verify1(a3);\n return this.imod(a3.ushln(num2));\n };\n Red.prototype.imul = function imul(a3, b4) {\n this._verify2(a3, b4);\n return this.imod(a3.imul(b4));\n };\n Red.prototype.mul = function mul(a3, b4) {\n this._verify2(a3, b4);\n return this.imod(a3.mul(b4));\n };\n Red.prototype.isqr = function isqr(a3) {\n return this.imul(a3, a3.clone());\n };\n Red.prototype.sqr = function sqr(a3) {\n return this.mul(a3, a3);\n };\n Red.prototype.sqrt = function sqrt(a3) {\n if (a3.isZero())\n return a3.clone();\n var mod3 = this.m.andln(3);\n assert9(mod3 % 2 === 1);\n if (mod3 === 3) {\n var pow = this.m.add(new BN(1)).iushrn(2);\n return this.pow(a3, pow);\n }\n var q3 = this.m.subn(1);\n var s4 = 0;\n while (!q3.isZero() && q3.andln(1) === 0) {\n s4++;\n q3.iushrn(1);\n }\n assert9(!q3.isZero());\n var one = new BN(1).toRed(this);\n var nOne = one.redNeg();\n var lpow = this.m.subn(1).iushrn(1);\n var z2 = this.m.bitLength();\n z2 = new BN(2 * z2 * z2).toRed(this);\n while (this.pow(z2, lpow).cmp(nOne) !== 0) {\n z2.redIAdd(nOne);\n }\n var c4 = this.pow(z2, q3);\n var r2 = this.pow(a3, q3.addn(1).iushrn(1));\n var t3 = this.pow(a3, q3);\n var m2 = s4;\n while (t3.cmp(one) !== 0) {\n var tmp = t3;\n for (var i3 = 0; tmp.cmp(one) !== 0; i3++) {\n tmp = tmp.redSqr();\n }\n assert9(i3 < m2);\n var b4 = this.pow(c4, new BN(1).iushln(m2 - i3 - 1));\n r2 = r2.redMul(b4);\n c4 = b4.redSqr();\n t3 = t3.redMul(c4);\n m2 = i3;\n }\n return r2;\n };\n Red.prototype.invm = function invm(a3) {\n var inv = a3._invmp(this.m);\n if (inv.negative !== 0) {\n inv.negative = 0;\n return this.imod(inv).redNeg();\n } else {\n return this.imod(inv);\n }\n };\n Red.prototype.pow = function pow(a3, num2) {\n if (num2.isZero())\n return new BN(1).toRed(this);\n if (num2.cmpn(1) === 0)\n return a3.clone();\n var windowSize = 4;\n var wnd = new Array(1 << windowSize);\n wnd[0] = new BN(1).toRed(this);\n wnd[1] = a3;\n for (var i3 = 2; i3 < wnd.length; i3++) {\n wnd[i3] = this.mul(wnd[i3 - 1], a3);\n }\n var res = wnd[0];\n var current = 0;\n var currentLen = 0;\n var start = num2.bitLength() % 26;\n if (start === 0) {\n start = 26;\n }\n for (i3 = num2.length - 1; i3 >= 0; i3--) {\n var word = num2.words[i3];\n for (var j2 = start - 1; j2 >= 0; j2--) {\n var bit = word >> j2 & 1;\n if (res !== wnd[0]) {\n res = this.sqr(res);\n }\n if (bit === 0 && current === 0) {\n currentLen = 0;\n continue;\n }\n current <<= 1;\n current |= bit;\n currentLen++;\n if (currentLen !== windowSize && (i3 !== 0 || j2 !== 0))\n continue;\n res = this.mul(res, wnd[current]);\n currentLen = 0;\n current = 0;\n }\n start = 26;\n }\n return res;\n };\n Red.prototype.convertTo = function convertTo(num2) {\n var r2 = num2.umod(this.m);\n return r2 === num2 ? r2.clone() : r2;\n };\n Red.prototype.convertFrom = function convertFrom(num2) {\n var res = num2.clone();\n res.red = null;\n return res;\n };\n BN.mont = function mont(num2) {\n return new Mont(num2);\n };\n function Mont(m2) {\n Red.call(this, m2);\n this.shift = this.m.bitLength();\n if (this.shift % 26 !== 0) {\n this.shift += 26 - this.shift % 26;\n }\n this.r = new BN(1).iushln(this.shift);\n this.r2 = this.imod(this.r.sqr());\n this.rinv = this.r._invmp(this.m);\n this.minv = this.rinv.mul(this.r).isubn(1).div(this.m);\n this.minv = this.minv.umod(this.r);\n this.minv = this.r.sub(this.minv);\n }\n inherits(Mont, Red);\n Mont.prototype.convertTo = function convertTo(num2) {\n return this.imod(num2.ushln(this.shift));\n };\n Mont.prototype.convertFrom = function convertFrom(num2) {\n var r2 = this.imod(num2.mul(this.rinv));\n r2.red = null;\n return r2;\n };\n Mont.prototype.imul = function imul(a3, b4) {\n if (a3.isZero() || b4.isZero()) {\n a3.words[0] = 0;\n a3.length = 1;\n return a3;\n }\n var t3 = a3.imul(b4);\n var c4 = t3.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m);\n var u2 = t3.isub(c4).iushrn(this.shift);\n var res = u2;\n if (u2.cmp(this.m) >= 0) {\n res = u2.isub(this.m);\n } else if (u2.cmpn(0) < 0) {\n res = u2.iadd(this.m);\n }\n return res._forceRed(this);\n };\n Mont.prototype.mul = function mul(a3, b4) {\n if (a3.isZero() || b4.isZero())\n return new BN(0)._forceRed(this);\n var t3 = a3.mul(b4);\n var c4 = t3.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m);\n var u2 = t3.isub(c4).iushrn(this.shift);\n var res = u2;\n if (u2.cmp(this.m) >= 0) {\n res = u2.isub(this.m);\n } else if (u2.cmpn(0) < 0) {\n res = u2.iadd(this.m);\n }\n return res._forceRed(this);\n };\n Mont.prototype.invm = function invm(a3) {\n var res = this.imod(a3._invmp(this.m).mul(this.r2));\n return res._forceRed(this);\n };\n })(typeof module === \"undefined\" || module, exports3);\n }\n });\n\n // ../../../node_modules/.pnpm/minimalistic-assert@1.0.1/node_modules/minimalistic-assert/index.js\n var require_minimalistic_assert = __commonJS({\n \"../../../node_modules/.pnpm/minimalistic-assert@1.0.1/node_modules/minimalistic-assert/index.js\"(exports3, module) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n module.exports = assert9;\n function assert9(val, msg) {\n if (!val)\n throw new Error(msg || \"Assertion failed\");\n }\n assert9.equal = function assertEqual(l6, r2, msg) {\n if (l6 != r2)\n throw new Error(msg || \"Assertion failed: \" + l6 + \" != \" + r2);\n };\n }\n });\n\n // ../../../node_modules/.pnpm/minimalistic-crypto-utils@1.0.1/node_modules/minimalistic-crypto-utils/lib/utils.js\n var require_utils2 = __commonJS({\n \"../../../node_modules/.pnpm/minimalistic-crypto-utils@1.0.1/node_modules/minimalistic-crypto-utils/lib/utils.js\"(exports3) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n var utils = exports3;\n function toArray(msg, enc) {\n if (Array.isArray(msg))\n return msg.slice();\n if (!msg)\n return [];\n var res = [];\n if (typeof msg !== \"string\") {\n for (var i3 = 0; i3 < msg.length; i3++)\n res[i3] = msg[i3] | 0;\n return res;\n }\n if (enc === \"hex\") {\n msg = msg.replace(/[^a-z0-9]+/ig, \"\");\n if (msg.length % 2 !== 0)\n msg = \"0\" + msg;\n for (var i3 = 0; i3 < msg.length; i3 += 2)\n res.push(parseInt(msg[i3] + msg[i3 + 1], 16));\n } else {\n for (var i3 = 0; i3 < msg.length; i3++) {\n var c4 = msg.charCodeAt(i3);\n var hi = c4 >> 8;\n var lo = c4 & 255;\n if (hi)\n res.push(hi, lo);\n else\n res.push(lo);\n }\n }\n return res;\n }\n utils.toArray = toArray;\n function zero2(word) {\n if (word.length === 1)\n return \"0\" + word;\n else\n return word;\n }\n utils.zero2 = zero2;\n function toHex3(msg) {\n var res = \"\";\n for (var i3 = 0; i3 < msg.length; i3++)\n res += zero2(msg[i3].toString(16));\n return res;\n }\n utils.toHex = toHex3;\n utils.encode = function encode6(arr, enc) {\n if (enc === \"hex\")\n return toHex3(arr);\n else\n return arr;\n };\n }\n });\n\n // ../../../node_modules/.pnpm/elliptic@6.6.1/node_modules/elliptic/lib/elliptic/utils.js\n var require_utils3 = __commonJS({\n \"../../../node_modules/.pnpm/elliptic@6.6.1/node_modules/elliptic/lib/elliptic/utils.js\"(exports3) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n var utils = exports3;\n var BN = require_bn2();\n var minAssert = require_minimalistic_assert();\n var minUtils = require_utils2();\n utils.assert = minAssert;\n utils.toArray = minUtils.toArray;\n utils.zero2 = minUtils.zero2;\n utils.toHex = minUtils.toHex;\n utils.encode = minUtils.encode;\n function getNAF(num2, w3, bits) {\n var naf = new Array(Math.max(num2.bitLength(), bits) + 1);\n var i3;\n for (i3 = 0; i3 < naf.length; i3 += 1) {\n naf[i3] = 0;\n }\n var ws = 1 << w3 + 1;\n var k4 = num2.clone();\n for (i3 = 0; i3 < naf.length; i3++) {\n var z2;\n var mod3 = k4.andln(ws - 1);\n if (k4.isOdd()) {\n if (mod3 > (ws >> 1) - 1)\n z2 = (ws >> 1) - mod3;\n else\n z2 = mod3;\n k4.isubn(z2);\n } else {\n z2 = 0;\n }\n naf[i3] = z2;\n k4.iushrn(1);\n }\n return naf;\n }\n utils.getNAF = getNAF;\n function getJSF(k1, k22) {\n var jsf = [\n [],\n []\n ];\n k1 = k1.clone();\n k22 = k22.clone();\n var d1 = 0;\n var d22 = 0;\n var m8;\n while (k1.cmpn(-d1) > 0 || k22.cmpn(-d22) > 0) {\n var m14 = k1.andln(3) + d1 & 3;\n var m24 = k22.andln(3) + d22 & 3;\n if (m14 === 3)\n m14 = -1;\n if (m24 === 3)\n m24 = -1;\n var u1;\n if ((m14 & 1) === 0) {\n u1 = 0;\n } else {\n m8 = k1.andln(7) + d1 & 7;\n if ((m8 === 3 || m8 === 5) && m24 === 2)\n u1 = -m14;\n else\n u1 = m14;\n }\n jsf[0].push(u1);\n var u2;\n if ((m24 & 1) === 0) {\n u2 = 0;\n } else {\n m8 = k22.andln(7) + d22 & 7;\n if ((m8 === 3 || m8 === 5) && m14 === 2)\n u2 = -m24;\n else\n u2 = m24;\n }\n jsf[1].push(u2);\n if (2 * d1 === u1 + 1)\n d1 = 1 - d1;\n if (2 * d22 === u2 + 1)\n d22 = 1 - d22;\n k1.iushrn(1);\n k22.iushrn(1);\n }\n return jsf;\n }\n utils.getJSF = getJSF;\n function cachedProperty(obj, name, computer) {\n var key = \"_\" + name;\n obj.prototype[name] = function cachedProperty2() {\n return this[key] !== void 0 ? this[key] : this[key] = computer.call(this);\n };\n }\n utils.cachedProperty = cachedProperty;\n function parseBytes(bytes) {\n return typeof bytes === \"string\" ? utils.toArray(bytes, \"hex\") : bytes;\n }\n utils.parseBytes = parseBytes;\n function intFromLE(bytes) {\n return new BN(bytes, \"hex\", \"le\");\n }\n utils.intFromLE = intFromLE;\n }\n });\n\n // ../../../node_modules/.pnpm/@lit-protocol+esbuild-plugin-polyfill-node@0.3.0_esbuild@0.19.12/node_modules/@lit-protocol/esbuild-plugin-polyfill-node/polyfills/empty.js\n var empty_exports = {};\n __export(empty_exports, {\n default: () => empty_default\n });\n var empty_default;\n var init_empty = __esm({\n \"../../../node_modules/.pnpm/@lit-protocol+esbuild-plugin-polyfill-node@0.3.0_esbuild@0.19.12/node_modules/@lit-protocol/esbuild-plugin-polyfill-node/polyfills/empty.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n empty_default = {};\n }\n });\n\n // ../../../node_modules/.pnpm/brorand@1.1.0/node_modules/brorand/index.js\n var require_brorand = __commonJS({\n \"../../../node_modules/.pnpm/brorand@1.1.0/node_modules/brorand/index.js\"(exports3, module) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n var r2;\n module.exports = function rand(len) {\n if (!r2)\n r2 = new Rand(null);\n return r2.generate(len);\n };\n function Rand(rand) {\n this.rand = rand;\n }\n module.exports.Rand = Rand;\n Rand.prototype.generate = function generate(len) {\n return this._rand(len);\n };\n Rand.prototype._rand = function _rand(n2) {\n if (this.rand.getBytes)\n return this.rand.getBytes(n2);\n var res = new Uint8Array(n2);\n for (var i3 = 0; i3 < res.length; i3++)\n res[i3] = this.rand.getByte();\n return res;\n };\n if (typeof self === \"object\") {\n if (self.crypto && self.crypto.getRandomValues) {\n Rand.prototype._rand = function _rand(n2) {\n var arr = new Uint8Array(n2);\n self.crypto.getRandomValues(arr);\n return arr;\n };\n } else if (self.msCrypto && self.msCrypto.getRandomValues) {\n Rand.prototype._rand = function _rand(n2) {\n var arr = new Uint8Array(n2);\n self.msCrypto.getRandomValues(arr);\n return arr;\n };\n } else if (typeof window === \"object\") {\n Rand.prototype._rand = function() {\n throw new Error(\"Not implemented yet\");\n };\n }\n } else {\n try {\n crypto3 = (init_empty(), __toCommonJS(empty_exports));\n if (typeof crypto3.randomBytes !== \"function\")\n throw new Error(\"Not supported\");\n Rand.prototype._rand = function _rand(n2) {\n return crypto3.randomBytes(n2);\n };\n } catch (e3) {\n }\n }\n var crypto3;\n }\n });\n\n // ../../../node_modules/.pnpm/elliptic@6.6.1/node_modules/elliptic/lib/elliptic/curve/base.js\n var require_base = __commonJS({\n \"../../../node_modules/.pnpm/elliptic@6.6.1/node_modules/elliptic/lib/elliptic/curve/base.js\"(exports3, module) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n var BN = require_bn2();\n var utils = require_utils3();\n var getNAF = utils.getNAF;\n var getJSF = utils.getJSF;\n var assert9 = utils.assert;\n function BaseCurve(type, conf) {\n this.type = type;\n this.p = new BN(conf.p, 16);\n this.red = conf.prime ? BN.red(conf.prime) : BN.mont(this.p);\n this.zero = new BN(0).toRed(this.red);\n this.one = new BN(1).toRed(this.red);\n this.two = new BN(2).toRed(this.red);\n this.n = conf.n && new BN(conf.n, 16);\n this.g = conf.g && this.pointFromJSON(conf.g, conf.gRed);\n this._wnafT1 = new Array(4);\n this._wnafT2 = new Array(4);\n this._wnafT3 = new Array(4);\n this._wnafT4 = new Array(4);\n this._bitLength = this.n ? this.n.bitLength() : 0;\n var adjustCount = this.n && this.p.div(this.n);\n if (!adjustCount || adjustCount.cmpn(100) > 0) {\n this.redN = null;\n } else {\n this._maxwellTrick = true;\n this.redN = this.n.toRed(this.red);\n }\n }\n module.exports = BaseCurve;\n BaseCurve.prototype.point = function point() {\n throw new Error(\"Not implemented\");\n };\n BaseCurve.prototype.validate = function validate6() {\n throw new Error(\"Not implemented\");\n };\n BaseCurve.prototype._fixedNafMul = function _fixedNafMul(p4, k4) {\n assert9(p4.precomputed);\n var doubles = p4._getDoubles();\n var naf = getNAF(k4, 1, this._bitLength);\n var I2 = (1 << doubles.step + 1) - (doubles.step % 2 === 0 ? 2 : 1);\n I2 /= 3;\n var repr = [];\n var j2;\n var nafW;\n for (j2 = 0; j2 < naf.length; j2 += doubles.step) {\n nafW = 0;\n for (var l6 = j2 + doubles.step - 1; l6 >= j2; l6--)\n nafW = (nafW << 1) + naf[l6];\n repr.push(nafW);\n }\n var a3 = this.jpoint(null, null, null);\n var b4 = this.jpoint(null, null, null);\n for (var i3 = I2; i3 > 0; i3--) {\n for (j2 = 0; j2 < repr.length; j2++) {\n nafW = repr[j2];\n if (nafW === i3)\n b4 = b4.mixedAdd(doubles.points[j2]);\n else if (nafW === -i3)\n b4 = b4.mixedAdd(doubles.points[j2].neg());\n }\n a3 = a3.add(b4);\n }\n return a3.toP();\n };\n BaseCurve.prototype._wnafMul = function _wnafMul(p4, k4) {\n var w3 = 4;\n var nafPoints = p4._getNAFPoints(w3);\n w3 = nafPoints.wnd;\n var wnd = nafPoints.points;\n var naf = getNAF(k4, w3, this._bitLength);\n var acc = this.jpoint(null, null, null);\n for (var i3 = naf.length - 1; i3 >= 0; i3--) {\n for (var l6 = 0; i3 >= 0 && naf[i3] === 0; i3--)\n l6++;\n if (i3 >= 0)\n l6++;\n acc = acc.dblp(l6);\n if (i3 < 0)\n break;\n var z2 = naf[i3];\n assert9(z2 !== 0);\n if (p4.type === \"affine\") {\n if (z2 > 0)\n acc = acc.mixedAdd(wnd[z2 - 1 >> 1]);\n else\n acc = acc.mixedAdd(wnd[-z2 - 1 >> 1].neg());\n } else {\n if (z2 > 0)\n acc = acc.add(wnd[z2 - 1 >> 1]);\n else\n acc = acc.add(wnd[-z2 - 1 >> 1].neg());\n }\n }\n return p4.type === \"affine\" ? acc.toP() : acc;\n };\n BaseCurve.prototype._wnafMulAdd = function _wnafMulAdd(defW, points, coeffs, len, jacobianResult) {\n var wndWidth = this._wnafT1;\n var wnd = this._wnafT2;\n var naf = this._wnafT3;\n var max = 0;\n var i3;\n var j2;\n var p4;\n for (i3 = 0; i3 < len; i3++) {\n p4 = points[i3];\n var nafPoints = p4._getNAFPoints(defW);\n wndWidth[i3] = nafPoints.wnd;\n wnd[i3] = nafPoints.points;\n }\n for (i3 = len - 1; i3 >= 1; i3 -= 2) {\n var a3 = i3 - 1;\n var b4 = i3;\n if (wndWidth[a3] !== 1 || wndWidth[b4] !== 1) {\n naf[a3] = getNAF(coeffs[a3], wndWidth[a3], this._bitLength);\n naf[b4] = getNAF(coeffs[b4], wndWidth[b4], this._bitLength);\n max = Math.max(naf[a3].length, max);\n max = Math.max(naf[b4].length, max);\n continue;\n }\n var comb = [\n points[a3],\n /* 1 */\n null,\n /* 3 */\n null,\n /* 5 */\n points[b4]\n /* 7 */\n ];\n if (points[a3].y.cmp(points[b4].y) === 0) {\n comb[1] = points[a3].add(points[b4]);\n comb[2] = points[a3].toJ().mixedAdd(points[b4].neg());\n } else if (points[a3].y.cmp(points[b4].y.redNeg()) === 0) {\n comb[1] = points[a3].toJ().mixedAdd(points[b4]);\n comb[2] = points[a3].add(points[b4].neg());\n } else {\n comb[1] = points[a3].toJ().mixedAdd(points[b4]);\n comb[2] = points[a3].toJ().mixedAdd(points[b4].neg());\n }\n var index2 = [\n -3,\n /* -1 -1 */\n -1,\n /* -1 0 */\n -5,\n /* -1 1 */\n -7,\n /* 0 -1 */\n 0,\n /* 0 0 */\n 7,\n /* 0 1 */\n 5,\n /* 1 -1 */\n 1,\n /* 1 0 */\n 3\n /* 1 1 */\n ];\n var jsf = getJSF(coeffs[a3], coeffs[b4]);\n max = Math.max(jsf[0].length, max);\n naf[a3] = new Array(max);\n naf[b4] = new Array(max);\n for (j2 = 0; j2 < max; j2++) {\n var ja = jsf[0][j2] | 0;\n var jb = jsf[1][j2] | 0;\n naf[a3][j2] = index2[(ja + 1) * 3 + (jb + 1)];\n naf[b4][j2] = 0;\n wnd[a3] = comb;\n }\n }\n var acc = this.jpoint(null, null, null);\n var tmp = this._wnafT4;\n for (i3 = max; i3 >= 0; i3--) {\n var k4 = 0;\n while (i3 >= 0) {\n var zero = true;\n for (j2 = 0; j2 < len; j2++) {\n tmp[j2] = naf[j2][i3] | 0;\n if (tmp[j2] !== 0)\n zero = false;\n }\n if (!zero)\n break;\n k4++;\n i3--;\n }\n if (i3 >= 0)\n k4++;\n acc = acc.dblp(k4);\n if (i3 < 0)\n break;\n for (j2 = 0; j2 < len; j2++) {\n var z2 = tmp[j2];\n p4;\n if (z2 === 0)\n continue;\n else if (z2 > 0)\n p4 = wnd[j2][z2 - 1 >> 1];\n else if (z2 < 0)\n p4 = wnd[j2][-z2 - 1 >> 1].neg();\n if (p4.type === \"affine\")\n acc = acc.mixedAdd(p4);\n else\n acc = acc.add(p4);\n }\n }\n for (i3 = 0; i3 < len; i3++)\n wnd[i3] = null;\n if (jacobianResult)\n return acc;\n else\n return acc.toP();\n };\n function BasePoint(curve, type) {\n this.curve = curve;\n this.type = type;\n this.precomputed = null;\n }\n BaseCurve.BasePoint = BasePoint;\n BasePoint.prototype.eq = function eq() {\n throw new Error(\"Not implemented\");\n };\n BasePoint.prototype.validate = function validate6() {\n return this.curve.validate(this);\n };\n BaseCurve.prototype.decodePoint = function decodePoint(bytes, enc) {\n bytes = utils.toArray(bytes, enc);\n var len = this.p.byteLength();\n if ((bytes[0] === 4 || bytes[0] === 6 || bytes[0] === 7) && bytes.length - 1 === 2 * len) {\n if (bytes[0] === 6)\n assert9(bytes[bytes.length - 1] % 2 === 0);\n else if (bytes[0] === 7)\n assert9(bytes[bytes.length - 1] % 2 === 1);\n var res = this.point(\n bytes.slice(1, 1 + len),\n bytes.slice(1 + len, 1 + 2 * len)\n );\n return res;\n } else if ((bytes[0] === 2 || bytes[0] === 3) && bytes.length - 1 === len) {\n return this.pointFromX(bytes.slice(1, 1 + len), bytes[0] === 3);\n }\n throw new Error(\"Unknown point format\");\n };\n BasePoint.prototype.encodeCompressed = function encodeCompressed(enc) {\n return this.encode(enc, true);\n };\n BasePoint.prototype._encode = function _encode(compact) {\n var len = this.curve.p.byteLength();\n var x4 = this.getX().toArray(\"be\", len);\n if (compact)\n return [this.getY().isEven() ? 2 : 3].concat(x4);\n return [4].concat(x4, this.getY().toArray(\"be\", len));\n };\n BasePoint.prototype.encode = function encode6(enc, compact) {\n return utils.encode(this._encode(compact), enc);\n };\n BasePoint.prototype.precompute = function precompute(power) {\n if (this.precomputed)\n return this;\n var precomputed = {\n doubles: null,\n naf: null,\n beta: null\n };\n precomputed.naf = this._getNAFPoints(8);\n precomputed.doubles = this._getDoubles(4, power);\n precomputed.beta = this._getBeta();\n this.precomputed = precomputed;\n return this;\n };\n BasePoint.prototype._hasDoubles = function _hasDoubles(k4) {\n if (!this.precomputed)\n return false;\n var doubles = this.precomputed.doubles;\n if (!doubles)\n return false;\n return doubles.points.length >= Math.ceil((k4.bitLength() + 1) / doubles.step);\n };\n BasePoint.prototype._getDoubles = function _getDoubles(step, power) {\n if (this.precomputed && this.precomputed.doubles)\n return this.precomputed.doubles;\n var doubles = [this];\n var acc = this;\n for (var i3 = 0; i3 < power; i3 += step) {\n for (var j2 = 0; j2 < step; j2++)\n acc = acc.dbl();\n doubles.push(acc);\n }\n return {\n step,\n points: doubles\n };\n };\n BasePoint.prototype._getNAFPoints = function _getNAFPoints(wnd) {\n if (this.precomputed && this.precomputed.naf)\n return this.precomputed.naf;\n var res = [this];\n var max = (1 << wnd) - 1;\n var dbl = max === 1 ? null : this.dbl();\n for (var i3 = 1; i3 < max; i3++)\n res[i3] = res[i3 - 1].add(dbl);\n return {\n wnd,\n points: res\n };\n };\n BasePoint.prototype._getBeta = function _getBeta() {\n return null;\n };\n BasePoint.prototype.dblp = function dblp(k4) {\n var r2 = this;\n for (var i3 = 0; i3 < k4; i3++)\n r2 = r2.dbl();\n return r2;\n };\n }\n });\n\n // ../../../node_modules/.pnpm/inherits@2.0.4/node_modules/inherits/inherits_browser.js\n var require_inherits_browser = __commonJS({\n \"../../../node_modules/.pnpm/inherits@2.0.4/node_modules/inherits/inherits_browser.js\"(exports3, module) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n if (typeof Object.create === \"function\") {\n module.exports = function inherits(ctor, superCtor) {\n if (superCtor) {\n ctor.super_ = superCtor;\n ctor.prototype = Object.create(superCtor.prototype, {\n constructor: {\n value: ctor,\n enumerable: false,\n writable: true,\n configurable: true\n }\n });\n }\n };\n } else {\n module.exports = function inherits(ctor, superCtor) {\n if (superCtor) {\n ctor.super_ = superCtor;\n var TempCtor = function() {\n };\n TempCtor.prototype = superCtor.prototype;\n ctor.prototype = new TempCtor();\n ctor.prototype.constructor = ctor;\n }\n };\n }\n }\n });\n\n // ../../../node_modules/.pnpm/elliptic@6.6.1/node_modules/elliptic/lib/elliptic/curve/short.js\n var require_short = __commonJS({\n \"../../../node_modules/.pnpm/elliptic@6.6.1/node_modules/elliptic/lib/elliptic/curve/short.js\"(exports3, module) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n var utils = require_utils3();\n var BN = require_bn2();\n var inherits = require_inherits_browser();\n var Base = require_base();\n var assert9 = utils.assert;\n function ShortCurve(conf) {\n Base.call(this, \"short\", conf);\n this.a = new BN(conf.a, 16).toRed(this.red);\n this.b = new BN(conf.b, 16).toRed(this.red);\n this.tinv = this.two.redInvm();\n this.zeroA = this.a.fromRed().cmpn(0) === 0;\n this.threeA = this.a.fromRed().sub(this.p).cmpn(-3) === 0;\n this.endo = this._getEndomorphism(conf);\n this._endoWnafT1 = new Array(4);\n this._endoWnafT2 = new Array(4);\n }\n inherits(ShortCurve, Base);\n module.exports = ShortCurve;\n ShortCurve.prototype._getEndomorphism = function _getEndomorphism(conf) {\n if (!this.zeroA || !this.g || !this.n || this.p.modn(3) !== 1)\n return;\n var beta;\n var lambda;\n if (conf.beta) {\n beta = new BN(conf.beta, 16).toRed(this.red);\n } else {\n var betas = this._getEndoRoots(this.p);\n beta = betas[0].cmp(betas[1]) < 0 ? betas[0] : betas[1];\n beta = beta.toRed(this.red);\n }\n if (conf.lambda) {\n lambda = new BN(conf.lambda, 16);\n } else {\n var lambdas = this._getEndoRoots(this.n);\n if (this.g.mul(lambdas[0]).x.cmp(this.g.x.redMul(beta)) === 0) {\n lambda = lambdas[0];\n } else {\n lambda = lambdas[1];\n assert9(this.g.mul(lambda).x.cmp(this.g.x.redMul(beta)) === 0);\n }\n }\n var basis;\n if (conf.basis) {\n basis = conf.basis.map(function(vec) {\n return {\n a: new BN(vec.a, 16),\n b: new BN(vec.b, 16)\n };\n });\n } else {\n basis = this._getEndoBasis(lambda);\n }\n return {\n beta,\n lambda,\n basis\n };\n };\n ShortCurve.prototype._getEndoRoots = function _getEndoRoots(num2) {\n var red = num2 === this.p ? this.red : BN.mont(num2);\n var tinv = new BN(2).toRed(red).redInvm();\n var ntinv = tinv.redNeg();\n var s4 = new BN(3).toRed(red).redNeg().redSqrt().redMul(tinv);\n var l1 = ntinv.redAdd(s4).fromRed();\n var l22 = ntinv.redSub(s4).fromRed();\n return [l1, l22];\n };\n ShortCurve.prototype._getEndoBasis = function _getEndoBasis(lambda) {\n var aprxSqrt = this.n.ushrn(Math.floor(this.n.bitLength() / 2));\n var u2 = lambda;\n var v2 = this.n.clone();\n var x1 = new BN(1);\n var y1 = new BN(0);\n var x22 = new BN(0);\n var y22 = new BN(1);\n var a0;\n var b0;\n var a1;\n var b1;\n var a22;\n var b22;\n var prevR;\n var i3 = 0;\n var r2;\n var x4;\n while (u2.cmpn(0) !== 0) {\n var q3 = v2.div(u2);\n r2 = v2.sub(q3.mul(u2));\n x4 = x22.sub(q3.mul(x1));\n var y6 = y22.sub(q3.mul(y1));\n if (!a1 && r2.cmp(aprxSqrt) < 0) {\n a0 = prevR.neg();\n b0 = x1;\n a1 = r2.neg();\n b1 = x4;\n } else if (a1 && ++i3 === 2) {\n break;\n }\n prevR = r2;\n v2 = u2;\n u2 = r2;\n x22 = x1;\n x1 = x4;\n y22 = y1;\n y1 = y6;\n }\n a22 = r2.neg();\n b22 = x4;\n var len1 = a1.sqr().add(b1.sqr());\n var len2 = a22.sqr().add(b22.sqr());\n if (len2.cmp(len1) >= 0) {\n a22 = a0;\n b22 = b0;\n }\n if (a1.negative) {\n a1 = a1.neg();\n b1 = b1.neg();\n }\n if (a22.negative) {\n a22 = a22.neg();\n b22 = b22.neg();\n }\n return [\n { a: a1, b: b1 },\n { a: a22, b: b22 }\n ];\n };\n ShortCurve.prototype._endoSplit = function _endoSplit(k4) {\n var basis = this.endo.basis;\n var v1 = basis[0];\n var v2 = basis[1];\n var c1 = v2.b.mul(k4).divRound(this.n);\n var c22 = v1.b.neg().mul(k4).divRound(this.n);\n var p1 = c1.mul(v1.a);\n var p22 = c22.mul(v2.a);\n var q1 = c1.mul(v1.b);\n var q22 = c22.mul(v2.b);\n var k1 = k4.sub(p1).sub(p22);\n var k22 = q1.add(q22).neg();\n return { k1, k2: k22 };\n };\n ShortCurve.prototype.pointFromX = function pointFromX(x4, odd) {\n x4 = new BN(x4, 16);\n if (!x4.red)\n x4 = x4.toRed(this.red);\n var y22 = x4.redSqr().redMul(x4).redIAdd(x4.redMul(this.a)).redIAdd(this.b);\n var y6 = y22.redSqrt();\n if (y6.redSqr().redSub(y22).cmp(this.zero) !== 0)\n throw new Error(\"invalid point\");\n var isOdd = y6.fromRed().isOdd();\n if (odd && !isOdd || !odd && isOdd)\n y6 = y6.redNeg();\n return this.point(x4, y6);\n };\n ShortCurve.prototype.validate = function validate6(point) {\n if (point.inf)\n return true;\n var x4 = point.x;\n var y6 = point.y;\n var ax = this.a.redMul(x4);\n var rhs = x4.redSqr().redMul(x4).redIAdd(ax).redIAdd(this.b);\n return y6.redSqr().redISub(rhs).cmpn(0) === 0;\n };\n ShortCurve.prototype._endoWnafMulAdd = function _endoWnafMulAdd(points, coeffs, jacobianResult) {\n var npoints = this._endoWnafT1;\n var ncoeffs = this._endoWnafT2;\n for (var i3 = 0; i3 < points.length; i3++) {\n var split4 = this._endoSplit(coeffs[i3]);\n var p4 = points[i3];\n var beta = p4._getBeta();\n if (split4.k1.negative) {\n split4.k1.ineg();\n p4 = p4.neg(true);\n }\n if (split4.k2.negative) {\n split4.k2.ineg();\n beta = beta.neg(true);\n }\n npoints[i3 * 2] = p4;\n npoints[i3 * 2 + 1] = beta;\n ncoeffs[i3 * 2] = split4.k1;\n ncoeffs[i3 * 2 + 1] = split4.k2;\n }\n var res = this._wnafMulAdd(1, npoints, ncoeffs, i3 * 2, jacobianResult);\n for (var j2 = 0; j2 < i3 * 2; j2++) {\n npoints[j2] = null;\n ncoeffs[j2] = null;\n }\n return res;\n };\n function Point3(curve, x4, y6, isRed) {\n Base.BasePoint.call(this, curve, \"affine\");\n if (x4 === null && y6 === null) {\n this.x = null;\n this.y = null;\n this.inf = true;\n } else {\n this.x = new BN(x4, 16);\n this.y = new BN(y6, 16);\n if (isRed) {\n this.x.forceRed(this.curve.red);\n this.y.forceRed(this.curve.red);\n }\n if (!this.x.red)\n this.x = this.x.toRed(this.curve.red);\n if (!this.y.red)\n this.y = this.y.toRed(this.curve.red);\n this.inf = false;\n }\n }\n inherits(Point3, Base.BasePoint);\n ShortCurve.prototype.point = function point(x4, y6, isRed) {\n return new Point3(this, x4, y6, isRed);\n };\n ShortCurve.prototype.pointFromJSON = function pointFromJSON(obj, red) {\n return Point3.fromJSON(this, obj, red);\n };\n Point3.prototype._getBeta = function _getBeta() {\n if (!this.curve.endo)\n return;\n var pre = this.precomputed;\n if (pre && pre.beta)\n return pre.beta;\n var beta = this.curve.point(this.x.redMul(this.curve.endo.beta), this.y);\n if (pre) {\n var curve = this.curve;\n var endoMul = function(p4) {\n return curve.point(p4.x.redMul(curve.endo.beta), p4.y);\n };\n pre.beta = beta;\n beta.precomputed = {\n beta: null,\n naf: pre.naf && {\n wnd: pre.naf.wnd,\n points: pre.naf.points.map(endoMul)\n },\n doubles: pre.doubles && {\n step: pre.doubles.step,\n points: pre.doubles.points.map(endoMul)\n }\n };\n }\n return beta;\n };\n Point3.prototype.toJSON = function toJSON() {\n if (!this.precomputed)\n return [this.x, this.y];\n return [this.x, this.y, this.precomputed && {\n doubles: this.precomputed.doubles && {\n step: this.precomputed.doubles.step,\n points: this.precomputed.doubles.points.slice(1)\n },\n naf: this.precomputed.naf && {\n wnd: this.precomputed.naf.wnd,\n points: this.precomputed.naf.points.slice(1)\n }\n }];\n };\n Point3.fromJSON = function fromJSON(curve, obj, red) {\n if (typeof obj === \"string\")\n obj = JSON.parse(obj);\n var res = curve.point(obj[0], obj[1], red);\n if (!obj[2])\n return res;\n function obj2point(obj2) {\n return curve.point(obj2[0], obj2[1], red);\n }\n var pre = obj[2];\n res.precomputed = {\n beta: null,\n doubles: pre.doubles && {\n step: pre.doubles.step,\n points: [res].concat(pre.doubles.points.map(obj2point))\n },\n naf: pre.naf && {\n wnd: pre.naf.wnd,\n points: [res].concat(pre.naf.points.map(obj2point))\n }\n };\n return res;\n };\n Point3.prototype.inspect = function inspect() {\n if (this.isInfinity())\n return \"\";\n return \"\";\n };\n Point3.prototype.isInfinity = function isInfinity() {\n return this.inf;\n };\n Point3.prototype.add = function add2(p4) {\n if (this.inf)\n return p4;\n if (p4.inf)\n return this;\n if (this.eq(p4))\n return this.dbl();\n if (this.neg().eq(p4))\n return this.curve.point(null, null);\n if (this.x.cmp(p4.x) === 0)\n return this.curve.point(null, null);\n var c4 = this.y.redSub(p4.y);\n if (c4.cmpn(0) !== 0)\n c4 = c4.redMul(this.x.redSub(p4.x).redInvm());\n var nx = c4.redSqr().redISub(this.x).redISub(p4.x);\n var ny = c4.redMul(this.x.redSub(nx)).redISub(this.y);\n return this.curve.point(nx, ny);\n };\n Point3.prototype.dbl = function dbl() {\n if (this.inf)\n return this;\n var ys1 = this.y.redAdd(this.y);\n if (ys1.cmpn(0) === 0)\n return this.curve.point(null, null);\n var a3 = this.curve.a;\n var x22 = this.x.redSqr();\n var dyinv = ys1.redInvm();\n var c4 = x22.redAdd(x22).redIAdd(x22).redIAdd(a3).redMul(dyinv);\n var nx = c4.redSqr().redISub(this.x.redAdd(this.x));\n var ny = c4.redMul(this.x.redSub(nx)).redISub(this.y);\n return this.curve.point(nx, ny);\n };\n Point3.prototype.getX = function getX() {\n return this.x.fromRed();\n };\n Point3.prototype.getY = function getY() {\n return this.y.fromRed();\n };\n Point3.prototype.mul = function mul(k4) {\n k4 = new BN(k4, 16);\n if (this.isInfinity())\n return this;\n else if (this._hasDoubles(k4))\n return this.curve._fixedNafMul(this, k4);\n else if (this.curve.endo)\n return this.curve._endoWnafMulAdd([this], [k4]);\n else\n return this.curve._wnafMul(this, k4);\n };\n Point3.prototype.mulAdd = function mulAdd(k1, p22, k22) {\n var points = [this, p22];\n var coeffs = [k1, k22];\n if (this.curve.endo)\n return this.curve._endoWnafMulAdd(points, coeffs);\n else\n return this.curve._wnafMulAdd(1, points, coeffs, 2);\n };\n Point3.prototype.jmulAdd = function jmulAdd(k1, p22, k22) {\n var points = [this, p22];\n var coeffs = [k1, k22];\n if (this.curve.endo)\n return this.curve._endoWnafMulAdd(points, coeffs, true);\n else\n return this.curve._wnafMulAdd(1, points, coeffs, 2, true);\n };\n Point3.prototype.eq = function eq(p4) {\n return this === p4 || this.inf === p4.inf && (this.inf || this.x.cmp(p4.x) === 0 && this.y.cmp(p4.y) === 0);\n };\n Point3.prototype.neg = function neg(_precompute) {\n if (this.inf)\n return this;\n var res = this.curve.point(this.x, this.y.redNeg());\n if (_precompute && this.precomputed) {\n var pre = this.precomputed;\n var negate = function(p4) {\n return p4.neg();\n };\n res.precomputed = {\n naf: pre.naf && {\n wnd: pre.naf.wnd,\n points: pre.naf.points.map(negate)\n },\n doubles: pre.doubles && {\n step: pre.doubles.step,\n points: pre.doubles.points.map(negate)\n }\n };\n }\n return res;\n };\n Point3.prototype.toJ = function toJ() {\n if (this.inf)\n return this.curve.jpoint(null, null, null);\n var res = this.curve.jpoint(this.x, this.y, this.curve.one);\n return res;\n };\n function JPoint(curve, x4, y6, z2) {\n Base.BasePoint.call(this, curve, \"jacobian\");\n if (x4 === null && y6 === null && z2 === null) {\n this.x = this.curve.one;\n this.y = this.curve.one;\n this.z = new BN(0);\n } else {\n this.x = new BN(x4, 16);\n this.y = new BN(y6, 16);\n this.z = new BN(z2, 16);\n }\n if (!this.x.red)\n this.x = this.x.toRed(this.curve.red);\n if (!this.y.red)\n this.y = this.y.toRed(this.curve.red);\n if (!this.z.red)\n this.z = this.z.toRed(this.curve.red);\n this.zOne = this.z === this.curve.one;\n }\n inherits(JPoint, Base.BasePoint);\n ShortCurve.prototype.jpoint = function jpoint(x4, y6, z2) {\n return new JPoint(this, x4, y6, z2);\n };\n JPoint.prototype.toP = function toP() {\n if (this.isInfinity())\n return this.curve.point(null, null);\n var zinv = this.z.redInvm();\n var zinv2 = zinv.redSqr();\n var ax = this.x.redMul(zinv2);\n var ay = this.y.redMul(zinv2).redMul(zinv);\n return this.curve.point(ax, ay);\n };\n JPoint.prototype.neg = function neg() {\n return this.curve.jpoint(this.x, this.y.redNeg(), this.z);\n };\n JPoint.prototype.add = function add2(p4) {\n if (this.isInfinity())\n return p4;\n if (p4.isInfinity())\n return this;\n var pz2 = p4.z.redSqr();\n var z2 = this.z.redSqr();\n var u1 = this.x.redMul(pz2);\n var u2 = p4.x.redMul(z2);\n var s1 = this.y.redMul(pz2.redMul(p4.z));\n var s22 = p4.y.redMul(z2.redMul(this.z));\n var h4 = u1.redSub(u2);\n var r2 = s1.redSub(s22);\n if (h4.cmpn(0) === 0) {\n if (r2.cmpn(0) !== 0)\n return this.curve.jpoint(null, null, null);\n else\n return this.dbl();\n }\n var h22 = h4.redSqr();\n var h32 = h22.redMul(h4);\n var v2 = u1.redMul(h22);\n var nx = r2.redSqr().redIAdd(h32).redISub(v2).redISub(v2);\n var ny = r2.redMul(v2.redISub(nx)).redISub(s1.redMul(h32));\n var nz = this.z.redMul(p4.z).redMul(h4);\n return this.curve.jpoint(nx, ny, nz);\n };\n JPoint.prototype.mixedAdd = function mixedAdd(p4) {\n if (this.isInfinity())\n return p4.toJ();\n if (p4.isInfinity())\n return this;\n var z2 = this.z.redSqr();\n var u1 = this.x;\n var u2 = p4.x.redMul(z2);\n var s1 = this.y;\n var s22 = p4.y.redMul(z2).redMul(this.z);\n var h4 = u1.redSub(u2);\n var r2 = s1.redSub(s22);\n if (h4.cmpn(0) === 0) {\n if (r2.cmpn(0) !== 0)\n return this.curve.jpoint(null, null, null);\n else\n return this.dbl();\n }\n var h22 = h4.redSqr();\n var h32 = h22.redMul(h4);\n var v2 = u1.redMul(h22);\n var nx = r2.redSqr().redIAdd(h32).redISub(v2).redISub(v2);\n var ny = r2.redMul(v2.redISub(nx)).redISub(s1.redMul(h32));\n var nz = this.z.redMul(h4);\n return this.curve.jpoint(nx, ny, nz);\n };\n JPoint.prototype.dblp = function dblp(pow) {\n if (pow === 0)\n return this;\n if (this.isInfinity())\n return this;\n if (!pow)\n return this.dbl();\n var i3;\n if (this.curve.zeroA || this.curve.threeA) {\n var r2 = this;\n for (i3 = 0; i3 < pow; i3++)\n r2 = r2.dbl();\n return r2;\n }\n var a3 = this.curve.a;\n var tinv = this.curve.tinv;\n var jx = this.x;\n var jy = this.y;\n var jz = this.z;\n var jz4 = jz.redSqr().redSqr();\n var jyd = jy.redAdd(jy);\n for (i3 = 0; i3 < pow; i3++) {\n var jx2 = jx.redSqr();\n var jyd2 = jyd.redSqr();\n var jyd4 = jyd2.redSqr();\n var c4 = jx2.redAdd(jx2).redIAdd(jx2).redIAdd(a3.redMul(jz4));\n var t1 = jx.redMul(jyd2);\n var nx = c4.redSqr().redISub(t1.redAdd(t1));\n var t22 = t1.redISub(nx);\n var dny = c4.redMul(t22);\n dny = dny.redIAdd(dny).redISub(jyd4);\n var nz = jyd.redMul(jz);\n if (i3 + 1 < pow)\n jz4 = jz4.redMul(jyd4);\n jx = nx;\n jz = nz;\n jyd = dny;\n }\n return this.curve.jpoint(jx, jyd.redMul(tinv), jz);\n };\n JPoint.prototype.dbl = function dbl() {\n if (this.isInfinity())\n return this;\n if (this.curve.zeroA)\n return this._zeroDbl();\n else if (this.curve.threeA)\n return this._threeDbl();\n else\n return this._dbl();\n };\n JPoint.prototype._zeroDbl = function _zeroDbl() {\n var nx;\n var ny;\n var nz;\n if (this.zOne) {\n var xx = this.x.redSqr();\n var yy = this.y.redSqr();\n var yyyy = yy.redSqr();\n var s4 = this.x.redAdd(yy).redSqr().redISub(xx).redISub(yyyy);\n s4 = s4.redIAdd(s4);\n var m2 = xx.redAdd(xx).redIAdd(xx);\n var t3 = m2.redSqr().redISub(s4).redISub(s4);\n var yyyy8 = yyyy.redIAdd(yyyy);\n yyyy8 = yyyy8.redIAdd(yyyy8);\n yyyy8 = yyyy8.redIAdd(yyyy8);\n nx = t3;\n ny = m2.redMul(s4.redISub(t3)).redISub(yyyy8);\n nz = this.y.redAdd(this.y);\n } else {\n var a3 = this.x.redSqr();\n var b4 = this.y.redSqr();\n var c4 = b4.redSqr();\n var d5 = this.x.redAdd(b4).redSqr().redISub(a3).redISub(c4);\n d5 = d5.redIAdd(d5);\n var e3 = a3.redAdd(a3).redIAdd(a3);\n var f6 = e3.redSqr();\n var c8 = c4.redIAdd(c4);\n c8 = c8.redIAdd(c8);\n c8 = c8.redIAdd(c8);\n nx = f6.redISub(d5).redISub(d5);\n ny = e3.redMul(d5.redISub(nx)).redISub(c8);\n nz = this.y.redMul(this.z);\n nz = nz.redIAdd(nz);\n }\n return this.curve.jpoint(nx, ny, nz);\n };\n JPoint.prototype._threeDbl = function _threeDbl() {\n var nx;\n var ny;\n var nz;\n if (this.zOne) {\n var xx = this.x.redSqr();\n var yy = this.y.redSqr();\n var yyyy = yy.redSqr();\n var s4 = this.x.redAdd(yy).redSqr().redISub(xx).redISub(yyyy);\n s4 = s4.redIAdd(s4);\n var m2 = xx.redAdd(xx).redIAdd(xx).redIAdd(this.curve.a);\n var t3 = m2.redSqr().redISub(s4).redISub(s4);\n nx = t3;\n var yyyy8 = yyyy.redIAdd(yyyy);\n yyyy8 = yyyy8.redIAdd(yyyy8);\n yyyy8 = yyyy8.redIAdd(yyyy8);\n ny = m2.redMul(s4.redISub(t3)).redISub(yyyy8);\n nz = this.y.redAdd(this.y);\n } else {\n var delta = this.z.redSqr();\n var gamma = this.y.redSqr();\n var beta = this.x.redMul(gamma);\n var alpha = this.x.redSub(delta).redMul(this.x.redAdd(delta));\n alpha = alpha.redAdd(alpha).redIAdd(alpha);\n var beta4 = beta.redIAdd(beta);\n beta4 = beta4.redIAdd(beta4);\n var beta8 = beta4.redAdd(beta4);\n nx = alpha.redSqr().redISub(beta8);\n nz = this.y.redAdd(this.z).redSqr().redISub(gamma).redISub(delta);\n var ggamma8 = gamma.redSqr();\n ggamma8 = ggamma8.redIAdd(ggamma8);\n ggamma8 = ggamma8.redIAdd(ggamma8);\n ggamma8 = ggamma8.redIAdd(ggamma8);\n ny = alpha.redMul(beta4.redISub(nx)).redISub(ggamma8);\n }\n return this.curve.jpoint(nx, ny, nz);\n };\n JPoint.prototype._dbl = function _dbl() {\n var a3 = this.curve.a;\n var jx = this.x;\n var jy = this.y;\n var jz = this.z;\n var jz4 = jz.redSqr().redSqr();\n var jx2 = jx.redSqr();\n var jy2 = jy.redSqr();\n var c4 = jx2.redAdd(jx2).redIAdd(jx2).redIAdd(a3.redMul(jz4));\n var jxd4 = jx.redAdd(jx);\n jxd4 = jxd4.redIAdd(jxd4);\n var t1 = jxd4.redMul(jy2);\n var nx = c4.redSqr().redISub(t1.redAdd(t1));\n var t22 = t1.redISub(nx);\n var jyd8 = jy2.redSqr();\n jyd8 = jyd8.redIAdd(jyd8);\n jyd8 = jyd8.redIAdd(jyd8);\n jyd8 = jyd8.redIAdd(jyd8);\n var ny = c4.redMul(t22).redISub(jyd8);\n var nz = jy.redAdd(jy).redMul(jz);\n return this.curve.jpoint(nx, ny, nz);\n };\n JPoint.prototype.trpl = function trpl() {\n if (!this.curve.zeroA)\n return this.dbl().add(this);\n var xx = this.x.redSqr();\n var yy = this.y.redSqr();\n var zz = this.z.redSqr();\n var yyyy = yy.redSqr();\n var m2 = xx.redAdd(xx).redIAdd(xx);\n var mm = m2.redSqr();\n var e3 = this.x.redAdd(yy).redSqr().redISub(xx).redISub(yyyy);\n e3 = e3.redIAdd(e3);\n e3 = e3.redAdd(e3).redIAdd(e3);\n e3 = e3.redISub(mm);\n var ee = e3.redSqr();\n var t3 = yyyy.redIAdd(yyyy);\n t3 = t3.redIAdd(t3);\n t3 = t3.redIAdd(t3);\n t3 = t3.redIAdd(t3);\n var u2 = m2.redIAdd(e3).redSqr().redISub(mm).redISub(ee).redISub(t3);\n var yyu4 = yy.redMul(u2);\n yyu4 = yyu4.redIAdd(yyu4);\n yyu4 = yyu4.redIAdd(yyu4);\n var nx = this.x.redMul(ee).redISub(yyu4);\n nx = nx.redIAdd(nx);\n nx = nx.redIAdd(nx);\n var ny = this.y.redMul(u2.redMul(t3.redISub(u2)).redISub(e3.redMul(ee)));\n ny = ny.redIAdd(ny);\n ny = ny.redIAdd(ny);\n ny = ny.redIAdd(ny);\n var nz = this.z.redAdd(e3).redSqr().redISub(zz).redISub(ee);\n return this.curve.jpoint(nx, ny, nz);\n };\n JPoint.prototype.mul = function mul(k4, kbase) {\n k4 = new BN(k4, kbase);\n return this.curve._wnafMul(this, k4);\n };\n JPoint.prototype.eq = function eq(p4) {\n if (p4.type === \"affine\")\n return this.eq(p4.toJ());\n if (this === p4)\n return true;\n var z2 = this.z.redSqr();\n var pz2 = p4.z.redSqr();\n if (this.x.redMul(pz2).redISub(p4.x.redMul(z2)).cmpn(0) !== 0)\n return false;\n var z3 = z2.redMul(this.z);\n var pz3 = pz2.redMul(p4.z);\n return this.y.redMul(pz3).redISub(p4.y.redMul(z3)).cmpn(0) === 0;\n };\n JPoint.prototype.eqXToP = function eqXToP(x4) {\n var zs = this.z.redSqr();\n var rx = x4.toRed(this.curve.red).redMul(zs);\n if (this.x.cmp(rx) === 0)\n return true;\n var xc = x4.clone();\n var t3 = this.curve.redN.redMul(zs);\n for (; ; ) {\n xc.iadd(this.curve.n);\n if (xc.cmp(this.curve.p) >= 0)\n return false;\n rx.redIAdd(t3);\n if (this.x.cmp(rx) === 0)\n return true;\n }\n };\n JPoint.prototype.inspect = function inspect() {\n if (this.isInfinity())\n return \"\";\n return \"\";\n };\n JPoint.prototype.isInfinity = function isInfinity() {\n return this.z.cmpn(0) === 0;\n };\n }\n });\n\n // ../../../node_modules/.pnpm/elliptic@6.6.1/node_modules/elliptic/lib/elliptic/curve/mont.js\n var require_mont = __commonJS({\n \"../../../node_modules/.pnpm/elliptic@6.6.1/node_modules/elliptic/lib/elliptic/curve/mont.js\"(exports3, module) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n var BN = require_bn2();\n var inherits = require_inherits_browser();\n var Base = require_base();\n var utils = require_utils3();\n function MontCurve(conf) {\n Base.call(this, \"mont\", conf);\n this.a = new BN(conf.a, 16).toRed(this.red);\n this.b = new BN(conf.b, 16).toRed(this.red);\n this.i4 = new BN(4).toRed(this.red).redInvm();\n this.two = new BN(2).toRed(this.red);\n this.a24 = this.i4.redMul(this.a.redAdd(this.two));\n }\n inherits(MontCurve, Base);\n module.exports = MontCurve;\n MontCurve.prototype.validate = function validate6(point) {\n var x4 = point.normalize().x;\n var x22 = x4.redSqr();\n var rhs = x22.redMul(x4).redAdd(x22.redMul(this.a)).redAdd(x4);\n var y6 = rhs.redSqrt();\n return y6.redSqr().cmp(rhs) === 0;\n };\n function Point3(curve, x4, z2) {\n Base.BasePoint.call(this, curve, \"projective\");\n if (x4 === null && z2 === null) {\n this.x = this.curve.one;\n this.z = this.curve.zero;\n } else {\n this.x = new BN(x4, 16);\n this.z = new BN(z2, 16);\n if (!this.x.red)\n this.x = this.x.toRed(this.curve.red);\n if (!this.z.red)\n this.z = this.z.toRed(this.curve.red);\n }\n }\n inherits(Point3, Base.BasePoint);\n MontCurve.prototype.decodePoint = function decodePoint(bytes, enc) {\n return this.point(utils.toArray(bytes, enc), 1);\n };\n MontCurve.prototype.point = function point(x4, z2) {\n return new Point3(this, x4, z2);\n };\n MontCurve.prototype.pointFromJSON = function pointFromJSON(obj) {\n return Point3.fromJSON(this, obj);\n };\n Point3.prototype.precompute = function precompute() {\n };\n Point3.prototype._encode = function _encode() {\n return this.getX().toArray(\"be\", this.curve.p.byteLength());\n };\n Point3.fromJSON = function fromJSON(curve, obj) {\n return new Point3(curve, obj[0], obj[1] || curve.one);\n };\n Point3.prototype.inspect = function inspect() {\n if (this.isInfinity())\n return \"\";\n return \"\";\n };\n Point3.prototype.isInfinity = function isInfinity() {\n return this.z.cmpn(0) === 0;\n };\n Point3.prototype.dbl = function dbl() {\n var a3 = this.x.redAdd(this.z);\n var aa = a3.redSqr();\n var b4 = this.x.redSub(this.z);\n var bb = b4.redSqr();\n var c4 = aa.redSub(bb);\n var nx = aa.redMul(bb);\n var nz = c4.redMul(bb.redAdd(this.curve.a24.redMul(c4)));\n return this.curve.point(nx, nz);\n };\n Point3.prototype.add = function add2() {\n throw new Error(\"Not supported on Montgomery curve\");\n };\n Point3.prototype.diffAdd = function diffAdd(p4, diff) {\n var a3 = this.x.redAdd(this.z);\n var b4 = this.x.redSub(this.z);\n var c4 = p4.x.redAdd(p4.z);\n var d5 = p4.x.redSub(p4.z);\n var da = d5.redMul(a3);\n var cb = c4.redMul(b4);\n var nx = diff.z.redMul(da.redAdd(cb).redSqr());\n var nz = diff.x.redMul(da.redISub(cb).redSqr());\n return this.curve.point(nx, nz);\n };\n Point3.prototype.mul = function mul(k4) {\n var t3 = k4.clone();\n var a3 = this;\n var b4 = this.curve.point(null, null);\n var c4 = this;\n for (var bits = []; t3.cmpn(0) !== 0; t3.iushrn(1))\n bits.push(t3.andln(1));\n for (var i3 = bits.length - 1; i3 >= 0; i3--) {\n if (bits[i3] === 0) {\n a3 = a3.diffAdd(b4, c4);\n b4 = b4.dbl();\n } else {\n b4 = a3.diffAdd(b4, c4);\n a3 = a3.dbl();\n }\n }\n return b4;\n };\n Point3.prototype.mulAdd = function mulAdd() {\n throw new Error(\"Not supported on Montgomery curve\");\n };\n Point3.prototype.jumlAdd = function jumlAdd() {\n throw new Error(\"Not supported on Montgomery curve\");\n };\n Point3.prototype.eq = function eq(other) {\n return this.getX().cmp(other.getX()) === 0;\n };\n Point3.prototype.normalize = function normalize2() {\n this.x = this.x.redMul(this.z.redInvm());\n this.z = this.curve.one;\n return this;\n };\n Point3.prototype.getX = function getX() {\n this.normalize();\n return this.x.fromRed();\n };\n }\n });\n\n // ../../../node_modules/.pnpm/elliptic@6.6.1/node_modules/elliptic/lib/elliptic/curve/edwards.js\n var require_edwards = __commonJS({\n \"../../../node_modules/.pnpm/elliptic@6.6.1/node_modules/elliptic/lib/elliptic/curve/edwards.js\"(exports3, module) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n var utils = require_utils3();\n var BN = require_bn2();\n var inherits = require_inherits_browser();\n var Base = require_base();\n var assert9 = utils.assert;\n function EdwardsCurve(conf) {\n this.twisted = (conf.a | 0) !== 1;\n this.mOneA = this.twisted && (conf.a | 0) === -1;\n this.extended = this.mOneA;\n Base.call(this, \"edwards\", conf);\n this.a = new BN(conf.a, 16).umod(this.red.m);\n this.a = this.a.toRed(this.red);\n this.c = new BN(conf.c, 16).toRed(this.red);\n this.c2 = this.c.redSqr();\n this.d = new BN(conf.d, 16).toRed(this.red);\n this.dd = this.d.redAdd(this.d);\n assert9(!this.twisted || this.c.fromRed().cmpn(1) === 0);\n this.oneC = (conf.c | 0) === 1;\n }\n inherits(EdwardsCurve, Base);\n module.exports = EdwardsCurve;\n EdwardsCurve.prototype._mulA = function _mulA(num2) {\n if (this.mOneA)\n return num2.redNeg();\n else\n return this.a.redMul(num2);\n };\n EdwardsCurve.prototype._mulC = function _mulC(num2) {\n if (this.oneC)\n return num2;\n else\n return this.c.redMul(num2);\n };\n EdwardsCurve.prototype.jpoint = function jpoint(x4, y6, z2, t3) {\n return this.point(x4, y6, z2, t3);\n };\n EdwardsCurve.prototype.pointFromX = function pointFromX(x4, odd) {\n x4 = new BN(x4, 16);\n if (!x4.red)\n x4 = x4.toRed(this.red);\n var x22 = x4.redSqr();\n var rhs = this.c2.redSub(this.a.redMul(x22));\n var lhs = this.one.redSub(this.c2.redMul(this.d).redMul(x22));\n var y22 = rhs.redMul(lhs.redInvm());\n var y6 = y22.redSqrt();\n if (y6.redSqr().redSub(y22).cmp(this.zero) !== 0)\n throw new Error(\"invalid point\");\n var isOdd = y6.fromRed().isOdd();\n if (odd && !isOdd || !odd && isOdd)\n y6 = y6.redNeg();\n return this.point(x4, y6);\n };\n EdwardsCurve.prototype.pointFromY = function pointFromY(y6, odd) {\n y6 = new BN(y6, 16);\n if (!y6.red)\n y6 = y6.toRed(this.red);\n var y22 = y6.redSqr();\n var lhs = y22.redSub(this.c2);\n var rhs = y22.redMul(this.d).redMul(this.c2).redSub(this.a);\n var x22 = lhs.redMul(rhs.redInvm());\n if (x22.cmp(this.zero) === 0) {\n if (odd)\n throw new Error(\"invalid point\");\n else\n return this.point(this.zero, y6);\n }\n var x4 = x22.redSqrt();\n if (x4.redSqr().redSub(x22).cmp(this.zero) !== 0)\n throw new Error(\"invalid point\");\n if (x4.fromRed().isOdd() !== odd)\n x4 = x4.redNeg();\n return this.point(x4, y6);\n };\n EdwardsCurve.prototype.validate = function validate6(point) {\n if (point.isInfinity())\n return true;\n point.normalize();\n var x22 = point.x.redSqr();\n var y22 = point.y.redSqr();\n var lhs = x22.redMul(this.a).redAdd(y22);\n var rhs = this.c2.redMul(this.one.redAdd(this.d.redMul(x22).redMul(y22)));\n return lhs.cmp(rhs) === 0;\n };\n function Point3(curve, x4, y6, z2, t3) {\n Base.BasePoint.call(this, curve, \"projective\");\n if (x4 === null && y6 === null && z2 === null) {\n this.x = this.curve.zero;\n this.y = this.curve.one;\n this.z = this.curve.one;\n this.t = this.curve.zero;\n this.zOne = true;\n } else {\n this.x = new BN(x4, 16);\n this.y = new BN(y6, 16);\n this.z = z2 ? new BN(z2, 16) : this.curve.one;\n this.t = t3 && new BN(t3, 16);\n if (!this.x.red)\n this.x = this.x.toRed(this.curve.red);\n if (!this.y.red)\n this.y = this.y.toRed(this.curve.red);\n if (!this.z.red)\n this.z = this.z.toRed(this.curve.red);\n if (this.t && !this.t.red)\n this.t = this.t.toRed(this.curve.red);\n this.zOne = this.z === this.curve.one;\n if (this.curve.extended && !this.t) {\n this.t = this.x.redMul(this.y);\n if (!this.zOne)\n this.t = this.t.redMul(this.z.redInvm());\n }\n }\n }\n inherits(Point3, Base.BasePoint);\n EdwardsCurve.prototype.pointFromJSON = function pointFromJSON(obj) {\n return Point3.fromJSON(this, obj);\n };\n EdwardsCurve.prototype.point = function point(x4, y6, z2, t3) {\n return new Point3(this, x4, y6, z2, t3);\n };\n Point3.fromJSON = function fromJSON(curve, obj) {\n return new Point3(curve, obj[0], obj[1], obj[2]);\n };\n Point3.prototype.inspect = function inspect() {\n if (this.isInfinity())\n return \"\";\n return \"\";\n };\n Point3.prototype.isInfinity = function isInfinity() {\n return this.x.cmpn(0) === 0 && (this.y.cmp(this.z) === 0 || this.zOne && this.y.cmp(this.curve.c) === 0);\n };\n Point3.prototype._extDbl = function _extDbl() {\n var a3 = this.x.redSqr();\n var b4 = this.y.redSqr();\n var c4 = this.z.redSqr();\n c4 = c4.redIAdd(c4);\n var d5 = this.curve._mulA(a3);\n var e3 = this.x.redAdd(this.y).redSqr().redISub(a3).redISub(b4);\n var g4 = d5.redAdd(b4);\n var f6 = g4.redSub(c4);\n var h4 = d5.redSub(b4);\n var nx = e3.redMul(f6);\n var ny = g4.redMul(h4);\n var nt = e3.redMul(h4);\n var nz = f6.redMul(g4);\n return this.curve.point(nx, ny, nz, nt);\n };\n Point3.prototype._projDbl = function _projDbl() {\n var b4 = this.x.redAdd(this.y).redSqr();\n var c4 = this.x.redSqr();\n var d5 = this.y.redSqr();\n var nx;\n var ny;\n var nz;\n var e3;\n var h4;\n var j2;\n if (this.curve.twisted) {\n e3 = this.curve._mulA(c4);\n var f6 = e3.redAdd(d5);\n if (this.zOne) {\n nx = b4.redSub(c4).redSub(d5).redMul(f6.redSub(this.curve.two));\n ny = f6.redMul(e3.redSub(d5));\n nz = f6.redSqr().redSub(f6).redSub(f6);\n } else {\n h4 = this.z.redSqr();\n j2 = f6.redSub(h4).redISub(h4);\n nx = b4.redSub(c4).redISub(d5).redMul(j2);\n ny = f6.redMul(e3.redSub(d5));\n nz = f6.redMul(j2);\n }\n } else {\n e3 = c4.redAdd(d5);\n h4 = this.curve._mulC(this.z).redSqr();\n j2 = e3.redSub(h4).redSub(h4);\n nx = this.curve._mulC(b4.redISub(e3)).redMul(j2);\n ny = this.curve._mulC(e3).redMul(c4.redISub(d5));\n nz = e3.redMul(j2);\n }\n return this.curve.point(nx, ny, nz);\n };\n Point3.prototype.dbl = function dbl() {\n if (this.isInfinity())\n return this;\n if (this.curve.extended)\n return this._extDbl();\n else\n return this._projDbl();\n };\n Point3.prototype._extAdd = function _extAdd(p4) {\n var a3 = this.y.redSub(this.x).redMul(p4.y.redSub(p4.x));\n var b4 = this.y.redAdd(this.x).redMul(p4.y.redAdd(p4.x));\n var c4 = this.t.redMul(this.curve.dd).redMul(p4.t);\n var d5 = this.z.redMul(p4.z.redAdd(p4.z));\n var e3 = b4.redSub(a3);\n var f6 = d5.redSub(c4);\n var g4 = d5.redAdd(c4);\n var h4 = b4.redAdd(a3);\n var nx = e3.redMul(f6);\n var ny = g4.redMul(h4);\n var nt = e3.redMul(h4);\n var nz = f6.redMul(g4);\n return this.curve.point(nx, ny, nz, nt);\n };\n Point3.prototype._projAdd = function _projAdd(p4) {\n var a3 = this.z.redMul(p4.z);\n var b4 = a3.redSqr();\n var c4 = this.x.redMul(p4.x);\n var d5 = this.y.redMul(p4.y);\n var e3 = this.curve.d.redMul(c4).redMul(d5);\n var f6 = b4.redSub(e3);\n var g4 = b4.redAdd(e3);\n var tmp = this.x.redAdd(this.y).redMul(p4.x.redAdd(p4.y)).redISub(c4).redISub(d5);\n var nx = a3.redMul(f6).redMul(tmp);\n var ny;\n var nz;\n if (this.curve.twisted) {\n ny = a3.redMul(g4).redMul(d5.redSub(this.curve._mulA(c4)));\n nz = f6.redMul(g4);\n } else {\n ny = a3.redMul(g4).redMul(d5.redSub(c4));\n nz = this.curve._mulC(f6).redMul(g4);\n }\n return this.curve.point(nx, ny, nz);\n };\n Point3.prototype.add = function add2(p4) {\n if (this.isInfinity())\n return p4;\n if (p4.isInfinity())\n return this;\n if (this.curve.extended)\n return this._extAdd(p4);\n else\n return this._projAdd(p4);\n };\n Point3.prototype.mul = function mul(k4) {\n if (this._hasDoubles(k4))\n return this.curve._fixedNafMul(this, k4);\n else\n return this.curve._wnafMul(this, k4);\n };\n Point3.prototype.mulAdd = function mulAdd(k1, p4, k22) {\n return this.curve._wnafMulAdd(1, [this, p4], [k1, k22], 2, false);\n };\n Point3.prototype.jmulAdd = function jmulAdd(k1, p4, k22) {\n return this.curve._wnafMulAdd(1, [this, p4], [k1, k22], 2, true);\n };\n Point3.prototype.normalize = function normalize2() {\n if (this.zOne)\n return this;\n var zi = this.z.redInvm();\n this.x = this.x.redMul(zi);\n this.y = this.y.redMul(zi);\n if (this.t)\n this.t = this.t.redMul(zi);\n this.z = this.curve.one;\n this.zOne = true;\n return this;\n };\n Point3.prototype.neg = function neg() {\n return this.curve.point(\n this.x.redNeg(),\n this.y,\n this.z,\n this.t && this.t.redNeg()\n );\n };\n Point3.prototype.getX = function getX() {\n this.normalize();\n return this.x.fromRed();\n };\n Point3.prototype.getY = function getY() {\n this.normalize();\n return this.y.fromRed();\n };\n Point3.prototype.eq = function eq(other) {\n return this === other || this.getX().cmp(other.getX()) === 0 && this.getY().cmp(other.getY()) === 0;\n };\n Point3.prototype.eqXToP = function eqXToP(x4) {\n var rx = x4.toRed(this.curve.red).redMul(this.z);\n if (this.x.cmp(rx) === 0)\n return true;\n var xc = x4.clone();\n var t3 = this.curve.redN.redMul(this.z);\n for (; ; ) {\n xc.iadd(this.curve.n);\n if (xc.cmp(this.curve.p) >= 0)\n return false;\n rx.redIAdd(t3);\n if (this.x.cmp(rx) === 0)\n return true;\n }\n };\n Point3.prototype.toP = Point3.prototype.normalize;\n Point3.prototype.mixedAdd = Point3.prototype.add;\n }\n });\n\n // ../../../node_modules/.pnpm/elliptic@6.6.1/node_modules/elliptic/lib/elliptic/curve/index.js\n var require_curve = __commonJS({\n \"../../../node_modules/.pnpm/elliptic@6.6.1/node_modules/elliptic/lib/elliptic/curve/index.js\"(exports3) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n var curve = exports3;\n curve.base = require_base();\n curve.short = require_short();\n curve.mont = require_mont();\n curve.edwards = require_edwards();\n }\n });\n\n // ../../../node_modules/.pnpm/hash.js@1.1.7/node_modules/hash.js/lib/hash/utils.js\n var require_utils4 = __commonJS({\n \"../../../node_modules/.pnpm/hash.js@1.1.7/node_modules/hash.js/lib/hash/utils.js\"(exports3) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n var assert9 = require_minimalistic_assert();\n var inherits = require_inherits_browser();\n exports3.inherits = inherits;\n function isSurrogatePair(msg, i3) {\n if ((msg.charCodeAt(i3) & 64512) !== 55296) {\n return false;\n }\n if (i3 < 0 || i3 + 1 >= msg.length) {\n return false;\n }\n return (msg.charCodeAt(i3 + 1) & 64512) === 56320;\n }\n function toArray(msg, enc) {\n if (Array.isArray(msg))\n return msg.slice();\n if (!msg)\n return [];\n var res = [];\n if (typeof msg === \"string\") {\n if (!enc) {\n var p4 = 0;\n for (var i3 = 0; i3 < msg.length; i3++) {\n var c4 = msg.charCodeAt(i3);\n if (c4 < 128) {\n res[p4++] = c4;\n } else if (c4 < 2048) {\n res[p4++] = c4 >> 6 | 192;\n res[p4++] = c4 & 63 | 128;\n } else if (isSurrogatePair(msg, i3)) {\n c4 = 65536 + ((c4 & 1023) << 10) + (msg.charCodeAt(++i3) & 1023);\n res[p4++] = c4 >> 18 | 240;\n res[p4++] = c4 >> 12 & 63 | 128;\n res[p4++] = c4 >> 6 & 63 | 128;\n res[p4++] = c4 & 63 | 128;\n } else {\n res[p4++] = c4 >> 12 | 224;\n res[p4++] = c4 >> 6 & 63 | 128;\n res[p4++] = c4 & 63 | 128;\n }\n }\n } else if (enc === \"hex\") {\n msg = msg.replace(/[^a-z0-9]+/ig, \"\");\n if (msg.length % 2 !== 0)\n msg = \"0\" + msg;\n for (i3 = 0; i3 < msg.length; i3 += 2)\n res.push(parseInt(msg[i3] + msg[i3 + 1], 16));\n }\n } else {\n for (i3 = 0; i3 < msg.length; i3++)\n res[i3] = msg[i3] | 0;\n }\n return res;\n }\n exports3.toArray = toArray;\n function toHex3(msg) {\n var res = \"\";\n for (var i3 = 0; i3 < msg.length; i3++)\n res += zero2(msg[i3].toString(16));\n return res;\n }\n exports3.toHex = toHex3;\n function htonl(w3) {\n var res = w3 >>> 24 | w3 >>> 8 & 65280 | w3 << 8 & 16711680 | (w3 & 255) << 24;\n return res >>> 0;\n }\n exports3.htonl = htonl;\n function toHex32(msg, endian) {\n var res = \"\";\n for (var i3 = 0; i3 < msg.length; i3++) {\n var w3 = msg[i3];\n if (endian === \"little\")\n w3 = htonl(w3);\n res += zero8(w3.toString(16));\n }\n return res;\n }\n exports3.toHex32 = toHex32;\n function zero2(word) {\n if (word.length === 1)\n return \"0\" + word;\n else\n return word;\n }\n exports3.zero2 = zero2;\n function zero8(word) {\n if (word.length === 7)\n return \"0\" + word;\n else if (word.length === 6)\n return \"00\" + word;\n else if (word.length === 5)\n return \"000\" + word;\n else if (word.length === 4)\n return \"0000\" + word;\n else if (word.length === 3)\n return \"00000\" + word;\n else if (word.length === 2)\n return \"000000\" + word;\n else if (word.length === 1)\n return \"0000000\" + word;\n else\n return word;\n }\n exports3.zero8 = zero8;\n function join32(msg, start, end, endian) {\n var len = end - start;\n assert9(len % 4 === 0);\n var res = new Array(len / 4);\n for (var i3 = 0, k4 = start; i3 < res.length; i3++, k4 += 4) {\n var w3;\n if (endian === \"big\")\n w3 = msg[k4] << 24 | msg[k4 + 1] << 16 | msg[k4 + 2] << 8 | msg[k4 + 3];\n else\n w3 = msg[k4 + 3] << 24 | msg[k4 + 2] << 16 | msg[k4 + 1] << 8 | msg[k4];\n res[i3] = w3 >>> 0;\n }\n return res;\n }\n exports3.join32 = join32;\n function split32(msg, endian) {\n var res = new Array(msg.length * 4);\n for (var i3 = 0, k4 = 0; i3 < msg.length; i3++, k4 += 4) {\n var m2 = msg[i3];\n if (endian === \"big\") {\n res[k4] = m2 >>> 24;\n res[k4 + 1] = m2 >>> 16 & 255;\n res[k4 + 2] = m2 >>> 8 & 255;\n res[k4 + 3] = m2 & 255;\n } else {\n res[k4 + 3] = m2 >>> 24;\n res[k4 + 2] = m2 >>> 16 & 255;\n res[k4 + 1] = m2 >>> 8 & 255;\n res[k4] = m2 & 255;\n }\n }\n return res;\n }\n exports3.split32 = split32;\n function rotr32(w3, b4) {\n return w3 >>> b4 | w3 << 32 - b4;\n }\n exports3.rotr32 = rotr32;\n function rotl32(w3, b4) {\n return w3 << b4 | w3 >>> 32 - b4;\n }\n exports3.rotl32 = rotl32;\n function sum32(a3, b4) {\n return a3 + b4 >>> 0;\n }\n exports3.sum32 = sum32;\n function sum32_3(a3, b4, c4) {\n return a3 + b4 + c4 >>> 0;\n }\n exports3.sum32_3 = sum32_3;\n function sum32_4(a3, b4, c4, d5) {\n return a3 + b4 + c4 + d5 >>> 0;\n }\n exports3.sum32_4 = sum32_4;\n function sum32_5(a3, b4, c4, d5, e3) {\n return a3 + b4 + c4 + d5 + e3 >>> 0;\n }\n exports3.sum32_5 = sum32_5;\n function sum64(buf, pos, ah, al) {\n var bh = buf[pos];\n var bl = buf[pos + 1];\n var lo = al + bl >>> 0;\n var hi = (lo < al ? 1 : 0) + ah + bh;\n buf[pos] = hi >>> 0;\n buf[pos + 1] = lo;\n }\n exports3.sum64 = sum64;\n function sum64_hi(ah, al, bh, bl) {\n var lo = al + bl >>> 0;\n var hi = (lo < al ? 1 : 0) + ah + bh;\n return hi >>> 0;\n }\n exports3.sum64_hi = sum64_hi;\n function sum64_lo(ah, al, bh, bl) {\n var lo = al + bl;\n return lo >>> 0;\n }\n exports3.sum64_lo = sum64_lo;\n function sum64_4_hi(ah, al, bh, bl, ch, cl, dh, dl) {\n var carry = 0;\n var lo = al;\n lo = lo + bl >>> 0;\n carry += lo < al ? 1 : 0;\n lo = lo + cl >>> 0;\n carry += lo < cl ? 1 : 0;\n lo = lo + dl >>> 0;\n carry += lo < dl ? 1 : 0;\n var hi = ah + bh + ch + dh + carry;\n return hi >>> 0;\n }\n exports3.sum64_4_hi = sum64_4_hi;\n function sum64_4_lo(ah, al, bh, bl, ch, cl, dh, dl) {\n var lo = al + bl + cl + dl;\n return lo >>> 0;\n }\n exports3.sum64_4_lo = sum64_4_lo;\n function sum64_5_hi(ah, al, bh, bl, ch, cl, dh, dl, eh, el) {\n var carry = 0;\n var lo = al;\n lo = lo + bl >>> 0;\n carry += lo < al ? 1 : 0;\n lo = lo + cl >>> 0;\n carry += lo < cl ? 1 : 0;\n lo = lo + dl >>> 0;\n carry += lo < dl ? 1 : 0;\n lo = lo + el >>> 0;\n carry += lo < el ? 1 : 0;\n var hi = ah + bh + ch + dh + eh + carry;\n return hi >>> 0;\n }\n exports3.sum64_5_hi = sum64_5_hi;\n function sum64_5_lo(ah, al, bh, bl, ch, cl, dh, dl, eh, el) {\n var lo = al + bl + cl + dl + el;\n return lo >>> 0;\n }\n exports3.sum64_5_lo = sum64_5_lo;\n function rotr64_hi(ah, al, num2) {\n var r2 = al << 32 - num2 | ah >>> num2;\n return r2 >>> 0;\n }\n exports3.rotr64_hi = rotr64_hi;\n function rotr64_lo(ah, al, num2) {\n var r2 = ah << 32 - num2 | al >>> num2;\n return r2 >>> 0;\n }\n exports3.rotr64_lo = rotr64_lo;\n function shr64_hi(ah, al, num2) {\n return ah >>> num2;\n }\n exports3.shr64_hi = shr64_hi;\n function shr64_lo(ah, al, num2) {\n var r2 = ah << 32 - num2 | al >>> num2;\n return r2 >>> 0;\n }\n exports3.shr64_lo = shr64_lo;\n }\n });\n\n // ../../../node_modules/.pnpm/hash.js@1.1.7/node_modules/hash.js/lib/hash/common.js\n var require_common = __commonJS({\n \"../../../node_modules/.pnpm/hash.js@1.1.7/node_modules/hash.js/lib/hash/common.js\"(exports3) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n var utils = require_utils4();\n var assert9 = require_minimalistic_assert();\n function BlockHash() {\n this.pending = null;\n this.pendingTotal = 0;\n this.blockSize = this.constructor.blockSize;\n this.outSize = this.constructor.outSize;\n this.hmacStrength = this.constructor.hmacStrength;\n this.padLength = this.constructor.padLength / 8;\n this.endian = \"big\";\n this._delta8 = this.blockSize / 8;\n this._delta32 = this.blockSize / 32;\n }\n exports3.BlockHash = BlockHash;\n BlockHash.prototype.update = function update(msg, enc) {\n msg = utils.toArray(msg, enc);\n if (!this.pending)\n this.pending = msg;\n else\n this.pending = this.pending.concat(msg);\n this.pendingTotal += msg.length;\n if (this.pending.length >= this._delta8) {\n msg = this.pending;\n var r2 = msg.length % this._delta8;\n this.pending = msg.slice(msg.length - r2, msg.length);\n if (this.pending.length === 0)\n this.pending = null;\n msg = utils.join32(msg, 0, msg.length - r2, this.endian);\n for (var i3 = 0; i3 < msg.length; i3 += this._delta32)\n this._update(msg, i3, i3 + this._delta32);\n }\n return this;\n };\n BlockHash.prototype.digest = function digest(enc) {\n this.update(this._pad());\n assert9(this.pending === null);\n return this._digest(enc);\n };\n BlockHash.prototype._pad = function pad6() {\n var len = this.pendingTotal;\n var bytes = this._delta8;\n var k4 = bytes - (len + this.padLength) % bytes;\n var res = new Array(k4 + this.padLength);\n res[0] = 128;\n for (var i3 = 1; i3 < k4; i3++)\n res[i3] = 0;\n len <<= 3;\n if (this.endian === \"big\") {\n for (var t3 = 8; t3 < this.padLength; t3++)\n res[i3++] = 0;\n res[i3++] = 0;\n res[i3++] = 0;\n res[i3++] = 0;\n res[i3++] = 0;\n res[i3++] = len >>> 24 & 255;\n res[i3++] = len >>> 16 & 255;\n res[i3++] = len >>> 8 & 255;\n res[i3++] = len & 255;\n } else {\n res[i3++] = len & 255;\n res[i3++] = len >>> 8 & 255;\n res[i3++] = len >>> 16 & 255;\n res[i3++] = len >>> 24 & 255;\n res[i3++] = 0;\n res[i3++] = 0;\n res[i3++] = 0;\n res[i3++] = 0;\n for (t3 = 8; t3 < this.padLength; t3++)\n res[i3++] = 0;\n }\n return res;\n };\n }\n });\n\n // ../../../node_modules/.pnpm/hash.js@1.1.7/node_modules/hash.js/lib/hash/sha/common.js\n var require_common2 = __commonJS({\n \"../../../node_modules/.pnpm/hash.js@1.1.7/node_modules/hash.js/lib/hash/sha/common.js\"(exports3) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n var utils = require_utils4();\n var rotr32 = utils.rotr32;\n function ft_1(s4, x4, y6, z2) {\n if (s4 === 0)\n return ch32(x4, y6, z2);\n if (s4 === 1 || s4 === 3)\n return p32(x4, y6, z2);\n if (s4 === 2)\n return maj32(x4, y6, z2);\n }\n exports3.ft_1 = ft_1;\n function ch32(x4, y6, z2) {\n return x4 & y6 ^ ~x4 & z2;\n }\n exports3.ch32 = ch32;\n function maj32(x4, y6, z2) {\n return x4 & y6 ^ x4 & z2 ^ y6 & z2;\n }\n exports3.maj32 = maj32;\n function p32(x4, y6, z2) {\n return x4 ^ y6 ^ z2;\n }\n exports3.p32 = p32;\n function s0_256(x4) {\n return rotr32(x4, 2) ^ rotr32(x4, 13) ^ rotr32(x4, 22);\n }\n exports3.s0_256 = s0_256;\n function s1_256(x4) {\n return rotr32(x4, 6) ^ rotr32(x4, 11) ^ rotr32(x4, 25);\n }\n exports3.s1_256 = s1_256;\n function g0_256(x4) {\n return rotr32(x4, 7) ^ rotr32(x4, 18) ^ x4 >>> 3;\n }\n exports3.g0_256 = g0_256;\n function g1_256(x4) {\n return rotr32(x4, 17) ^ rotr32(x4, 19) ^ x4 >>> 10;\n }\n exports3.g1_256 = g1_256;\n }\n });\n\n // ../../../node_modules/.pnpm/hash.js@1.1.7/node_modules/hash.js/lib/hash/sha/1.js\n var require__ = __commonJS({\n \"../../../node_modules/.pnpm/hash.js@1.1.7/node_modules/hash.js/lib/hash/sha/1.js\"(exports3, module) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n var utils = require_utils4();\n var common = require_common();\n var shaCommon = require_common2();\n var rotl32 = utils.rotl32;\n var sum32 = utils.sum32;\n var sum32_5 = utils.sum32_5;\n var ft_1 = shaCommon.ft_1;\n var BlockHash = common.BlockHash;\n var sha1_K = [\n 1518500249,\n 1859775393,\n 2400959708,\n 3395469782\n ];\n function SHA1() {\n if (!(this instanceof SHA1))\n return new SHA1();\n BlockHash.call(this);\n this.h = [\n 1732584193,\n 4023233417,\n 2562383102,\n 271733878,\n 3285377520\n ];\n this.W = new Array(80);\n }\n utils.inherits(SHA1, BlockHash);\n module.exports = SHA1;\n SHA1.blockSize = 512;\n SHA1.outSize = 160;\n SHA1.hmacStrength = 80;\n SHA1.padLength = 64;\n SHA1.prototype._update = function _update(msg, start) {\n var W = this.W;\n for (var i3 = 0; i3 < 16; i3++)\n W[i3] = msg[start + i3];\n for (; i3 < W.length; i3++)\n W[i3] = rotl32(W[i3 - 3] ^ W[i3 - 8] ^ W[i3 - 14] ^ W[i3 - 16], 1);\n var a3 = this.h[0];\n var b4 = this.h[1];\n var c4 = this.h[2];\n var d5 = this.h[3];\n var e3 = this.h[4];\n for (i3 = 0; i3 < W.length; i3++) {\n var s4 = ~~(i3 / 20);\n var t3 = sum32_5(rotl32(a3, 5), ft_1(s4, b4, c4, d5), e3, W[i3], sha1_K[s4]);\n e3 = d5;\n d5 = c4;\n c4 = rotl32(b4, 30);\n b4 = a3;\n a3 = t3;\n }\n this.h[0] = sum32(this.h[0], a3);\n this.h[1] = sum32(this.h[1], b4);\n this.h[2] = sum32(this.h[2], c4);\n this.h[3] = sum32(this.h[3], d5);\n this.h[4] = sum32(this.h[4], e3);\n };\n SHA1.prototype._digest = function digest(enc) {\n if (enc === \"hex\")\n return utils.toHex32(this.h, \"big\");\n else\n return utils.split32(this.h, \"big\");\n };\n }\n });\n\n // ../../../node_modules/.pnpm/hash.js@1.1.7/node_modules/hash.js/lib/hash/sha/256.js\n var require__2 = __commonJS({\n \"../../../node_modules/.pnpm/hash.js@1.1.7/node_modules/hash.js/lib/hash/sha/256.js\"(exports3, module) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n var utils = require_utils4();\n var common = require_common();\n var shaCommon = require_common2();\n var assert9 = require_minimalistic_assert();\n var sum32 = utils.sum32;\n var sum32_4 = utils.sum32_4;\n var sum32_5 = utils.sum32_5;\n var ch32 = shaCommon.ch32;\n var maj32 = shaCommon.maj32;\n var s0_256 = shaCommon.s0_256;\n var s1_256 = shaCommon.s1_256;\n var g0_256 = shaCommon.g0_256;\n var g1_256 = shaCommon.g1_256;\n var BlockHash = common.BlockHash;\n var sha256_K = [\n 1116352408,\n 1899447441,\n 3049323471,\n 3921009573,\n 961987163,\n 1508970993,\n 2453635748,\n 2870763221,\n 3624381080,\n 310598401,\n 607225278,\n 1426881987,\n 1925078388,\n 2162078206,\n 2614888103,\n 3248222580,\n 3835390401,\n 4022224774,\n 264347078,\n 604807628,\n 770255983,\n 1249150122,\n 1555081692,\n 1996064986,\n 2554220882,\n 2821834349,\n 2952996808,\n 3210313671,\n 3336571891,\n 3584528711,\n 113926993,\n 338241895,\n 666307205,\n 773529912,\n 1294757372,\n 1396182291,\n 1695183700,\n 1986661051,\n 2177026350,\n 2456956037,\n 2730485921,\n 2820302411,\n 3259730800,\n 3345764771,\n 3516065817,\n 3600352804,\n 4094571909,\n 275423344,\n 430227734,\n 506948616,\n 659060556,\n 883997877,\n 958139571,\n 1322822218,\n 1537002063,\n 1747873779,\n 1955562222,\n 2024104815,\n 2227730452,\n 2361852424,\n 2428436474,\n 2756734187,\n 3204031479,\n 3329325298\n ];\n function SHA2562() {\n if (!(this instanceof SHA2562))\n return new SHA2562();\n BlockHash.call(this);\n this.h = [\n 1779033703,\n 3144134277,\n 1013904242,\n 2773480762,\n 1359893119,\n 2600822924,\n 528734635,\n 1541459225\n ];\n this.k = sha256_K;\n this.W = new Array(64);\n }\n utils.inherits(SHA2562, BlockHash);\n module.exports = SHA2562;\n SHA2562.blockSize = 512;\n SHA2562.outSize = 256;\n SHA2562.hmacStrength = 192;\n SHA2562.padLength = 64;\n SHA2562.prototype._update = function _update(msg, start) {\n var W = this.W;\n for (var i3 = 0; i3 < 16; i3++)\n W[i3] = msg[start + i3];\n for (; i3 < W.length; i3++)\n W[i3] = sum32_4(g1_256(W[i3 - 2]), W[i3 - 7], g0_256(W[i3 - 15]), W[i3 - 16]);\n var a3 = this.h[0];\n var b4 = this.h[1];\n var c4 = this.h[2];\n var d5 = this.h[3];\n var e3 = this.h[4];\n var f6 = this.h[5];\n var g4 = this.h[6];\n var h4 = this.h[7];\n assert9(this.k.length === W.length);\n for (i3 = 0; i3 < W.length; i3++) {\n var T1 = sum32_5(h4, s1_256(e3), ch32(e3, f6, g4), this.k[i3], W[i3]);\n var T22 = sum32(s0_256(a3), maj32(a3, b4, c4));\n h4 = g4;\n g4 = f6;\n f6 = e3;\n e3 = sum32(d5, T1);\n d5 = c4;\n c4 = b4;\n b4 = a3;\n a3 = sum32(T1, T22);\n }\n this.h[0] = sum32(this.h[0], a3);\n this.h[1] = sum32(this.h[1], b4);\n this.h[2] = sum32(this.h[2], c4);\n this.h[3] = sum32(this.h[3], d5);\n this.h[4] = sum32(this.h[4], e3);\n this.h[5] = sum32(this.h[5], f6);\n this.h[6] = sum32(this.h[6], g4);\n this.h[7] = sum32(this.h[7], h4);\n };\n SHA2562.prototype._digest = function digest(enc) {\n if (enc === \"hex\")\n return utils.toHex32(this.h, \"big\");\n else\n return utils.split32(this.h, \"big\");\n };\n }\n });\n\n // ../../../node_modules/.pnpm/hash.js@1.1.7/node_modules/hash.js/lib/hash/sha/224.js\n var require__3 = __commonJS({\n \"../../../node_modules/.pnpm/hash.js@1.1.7/node_modules/hash.js/lib/hash/sha/224.js\"(exports3, module) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n var utils = require_utils4();\n var SHA2562 = require__2();\n function SHA2242() {\n if (!(this instanceof SHA2242))\n return new SHA2242();\n SHA2562.call(this);\n this.h = [\n 3238371032,\n 914150663,\n 812702999,\n 4144912697,\n 4290775857,\n 1750603025,\n 1694076839,\n 3204075428\n ];\n }\n utils.inherits(SHA2242, SHA2562);\n module.exports = SHA2242;\n SHA2242.blockSize = 512;\n SHA2242.outSize = 224;\n SHA2242.hmacStrength = 192;\n SHA2242.padLength = 64;\n SHA2242.prototype._digest = function digest(enc) {\n if (enc === \"hex\")\n return utils.toHex32(this.h.slice(0, 7), \"big\");\n else\n return utils.split32(this.h.slice(0, 7), \"big\");\n };\n }\n });\n\n // ../../../node_modules/.pnpm/hash.js@1.1.7/node_modules/hash.js/lib/hash/sha/512.js\n var require__4 = __commonJS({\n \"../../../node_modules/.pnpm/hash.js@1.1.7/node_modules/hash.js/lib/hash/sha/512.js\"(exports3, module) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n var utils = require_utils4();\n var common = require_common();\n var assert9 = require_minimalistic_assert();\n var rotr64_hi = utils.rotr64_hi;\n var rotr64_lo = utils.rotr64_lo;\n var shr64_hi = utils.shr64_hi;\n var shr64_lo = utils.shr64_lo;\n var sum64 = utils.sum64;\n var sum64_hi = utils.sum64_hi;\n var sum64_lo = utils.sum64_lo;\n var sum64_4_hi = utils.sum64_4_hi;\n var sum64_4_lo = utils.sum64_4_lo;\n var sum64_5_hi = utils.sum64_5_hi;\n var sum64_5_lo = utils.sum64_5_lo;\n var BlockHash = common.BlockHash;\n var sha512_K = [\n 1116352408,\n 3609767458,\n 1899447441,\n 602891725,\n 3049323471,\n 3964484399,\n 3921009573,\n 2173295548,\n 961987163,\n 4081628472,\n 1508970993,\n 3053834265,\n 2453635748,\n 2937671579,\n 2870763221,\n 3664609560,\n 3624381080,\n 2734883394,\n 310598401,\n 1164996542,\n 607225278,\n 1323610764,\n 1426881987,\n 3590304994,\n 1925078388,\n 4068182383,\n 2162078206,\n 991336113,\n 2614888103,\n 633803317,\n 3248222580,\n 3479774868,\n 3835390401,\n 2666613458,\n 4022224774,\n 944711139,\n 264347078,\n 2341262773,\n 604807628,\n 2007800933,\n 770255983,\n 1495990901,\n 1249150122,\n 1856431235,\n 1555081692,\n 3175218132,\n 1996064986,\n 2198950837,\n 2554220882,\n 3999719339,\n 2821834349,\n 766784016,\n 2952996808,\n 2566594879,\n 3210313671,\n 3203337956,\n 3336571891,\n 1034457026,\n 3584528711,\n 2466948901,\n 113926993,\n 3758326383,\n 338241895,\n 168717936,\n 666307205,\n 1188179964,\n 773529912,\n 1546045734,\n 1294757372,\n 1522805485,\n 1396182291,\n 2643833823,\n 1695183700,\n 2343527390,\n 1986661051,\n 1014477480,\n 2177026350,\n 1206759142,\n 2456956037,\n 344077627,\n 2730485921,\n 1290863460,\n 2820302411,\n 3158454273,\n 3259730800,\n 3505952657,\n 3345764771,\n 106217008,\n 3516065817,\n 3606008344,\n 3600352804,\n 1432725776,\n 4094571909,\n 1467031594,\n 275423344,\n 851169720,\n 430227734,\n 3100823752,\n 506948616,\n 1363258195,\n 659060556,\n 3750685593,\n 883997877,\n 3785050280,\n 958139571,\n 3318307427,\n 1322822218,\n 3812723403,\n 1537002063,\n 2003034995,\n 1747873779,\n 3602036899,\n 1955562222,\n 1575990012,\n 2024104815,\n 1125592928,\n 2227730452,\n 2716904306,\n 2361852424,\n 442776044,\n 2428436474,\n 593698344,\n 2756734187,\n 3733110249,\n 3204031479,\n 2999351573,\n 3329325298,\n 3815920427,\n 3391569614,\n 3928383900,\n 3515267271,\n 566280711,\n 3940187606,\n 3454069534,\n 4118630271,\n 4000239992,\n 116418474,\n 1914138554,\n 174292421,\n 2731055270,\n 289380356,\n 3203993006,\n 460393269,\n 320620315,\n 685471733,\n 587496836,\n 852142971,\n 1086792851,\n 1017036298,\n 365543100,\n 1126000580,\n 2618297676,\n 1288033470,\n 3409855158,\n 1501505948,\n 4234509866,\n 1607167915,\n 987167468,\n 1816402316,\n 1246189591\n ];\n function SHA5122() {\n if (!(this instanceof SHA5122))\n return new SHA5122();\n BlockHash.call(this);\n this.h = [\n 1779033703,\n 4089235720,\n 3144134277,\n 2227873595,\n 1013904242,\n 4271175723,\n 2773480762,\n 1595750129,\n 1359893119,\n 2917565137,\n 2600822924,\n 725511199,\n 528734635,\n 4215389547,\n 1541459225,\n 327033209\n ];\n this.k = sha512_K;\n this.W = new Array(160);\n }\n utils.inherits(SHA5122, BlockHash);\n module.exports = SHA5122;\n SHA5122.blockSize = 1024;\n SHA5122.outSize = 512;\n SHA5122.hmacStrength = 192;\n SHA5122.padLength = 128;\n SHA5122.prototype._prepareBlock = function _prepareBlock(msg, start) {\n var W = this.W;\n for (var i3 = 0; i3 < 32; i3++)\n W[i3] = msg[start + i3];\n for (; i3 < W.length; i3 += 2) {\n var c0_hi = g1_512_hi(W[i3 - 4], W[i3 - 3]);\n var c0_lo = g1_512_lo(W[i3 - 4], W[i3 - 3]);\n var c1_hi = W[i3 - 14];\n var c1_lo = W[i3 - 13];\n var c2_hi = g0_512_hi(W[i3 - 30], W[i3 - 29]);\n var c2_lo = g0_512_lo(W[i3 - 30], W[i3 - 29]);\n var c3_hi = W[i3 - 32];\n var c3_lo = W[i3 - 31];\n W[i3] = sum64_4_hi(\n c0_hi,\n c0_lo,\n c1_hi,\n c1_lo,\n c2_hi,\n c2_lo,\n c3_hi,\n c3_lo\n );\n W[i3 + 1] = sum64_4_lo(\n c0_hi,\n c0_lo,\n c1_hi,\n c1_lo,\n c2_hi,\n c2_lo,\n c3_hi,\n c3_lo\n );\n }\n };\n SHA5122.prototype._update = function _update(msg, start) {\n this._prepareBlock(msg, start);\n var W = this.W;\n var ah = this.h[0];\n var al = this.h[1];\n var bh = this.h[2];\n var bl = this.h[3];\n var ch = this.h[4];\n var cl = this.h[5];\n var dh = this.h[6];\n var dl = this.h[7];\n var eh = this.h[8];\n var el = this.h[9];\n var fh = this.h[10];\n var fl = this.h[11];\n var gh = this.h[12];\n var gl = this.h[13];\n var hh = this.h[14];\n var hl = this.h[15];\n assert9(this.k.length === W.length);\n for (var i3 = 0; i3 < W.length; i3 += 2) {\n var c0_hi = hh;\n var c0_lo = hl;\n var c1_hi = s1_512_hi(eh, el);\n var c1_lo = s1_512_lo(eh, el);\n var c2_hi = ch64_hi(eh, el, fh, fl, gh, gl);\n var c2_lo = ch64_lo(eh, el, fh, fl, gh, gl);\n var c3_hi = this.k[i3];\n var c3_lo = this.k[i3 + 1];\n var c4_hi = W[i3];\n var c4_lo = W[i3 + 1];\n var T1_hi = sum64_5_hi(\n c0_hi,\n c0_lo,\n c1_hi,\n c1_lo,\n c2_hi,\n c2_lo,\n c3_hi,\n c3_lo,\n c4_hi,\n c4_lo\n );\n var T1_lo = sum64_5_lo(\n c0_hi,\n c0_lo,\n c1_hi,\n c1_lo,\n c2_hi,\n c2_lo,\n c3_hi,\n c3_lo,\n c4_hi,\n c4_lo\n );\n c0_hi = s0_512_hi(ah, al);\n c0_lo = s0_512_lo(ah, al);\n c1_hi = maj64_hi(ah, al, bh, bl, ch, cl);\n c1_lo = maj64_lo(ah, al, bh, bl, ch, cl);\n var T2_hi = sum64_hi(c0_hi, c0_lo, c1_hi, c1_lo);\n var T2_lo = sum64_lo(c0_hi, c0_lo, c1_hi, c1_lo);\n hh = gh;\n hl = gl;\n gh = fh;\n gl = fl;\n fh = eh;\n fl = el;\n eh = sum64_hi(dh, dl, T1_hi, T1_lo);\n el = sum64_lo(dl, dl, T1_hi, T1_lo);\n dh = ch;\n dl = cl;\n ch = bh;\n cl = bl;\n bh = ah;\n bl = al;\n ah = sum64_hi(T1_hi, T1_lo, T2_hi, T2_lo);\n al = sum64_lo(T1_hi, T1_lo, T2_hi, T2_lo);\n }\n sum64(this.h, 0, ah, al);\n sum64(this.h, 2, bh, bl);\n sum64(this.h, 4, ch, cl);\n sum64(this.h, 6, dh, dl);\n sum64(this.h, 8, eh, el);\n sum64(this.h, 10, fh, fl);\n sum64(this.h, 12, gh, gl);\n sum64(this.h, 14, hh, hl);\n };\n SHA5122.prototype._digest = function digest(enc) {\n if (enc === \"hex\")\n return utils.toHex32(this.h, \"big\");\n else\n return utils.split32(this.h, \"big\");\n };\n function ch64_hi(xh, xl, yh, yl, zh) {\n var r2 = xh & yh ^ ~xh & zh;\n if (r2 < 0)\n r2 += 4294967296;\n return r2;\n }\n function ch64_lo(xh, xl, yh, yl, zh, zl) {\n var r2 = xl & yl ^ ~xl & zl;\n if (r2 < 0)\n r2 += 4294967296;\n return r2;\n }\n function maj64_hi(xh, xl, yh, yl, zh) {\n var r2 = xh & yh ^ xh & zh ^ yh & zh;\n if (r2 < 0)\n r2 += 4294967296;\n return r2;\n }\n function maj64_lo(xh, xl, yh, yl, zh, zl) {\n var r2 = xl & yl ^ xl & zl ^ yl & zl;\n if (r2 < 0)\n r2 += 4294967296;\n return r2;\n }\n function s0_512_hi(xh, xl) {\n var c0_hi = rotr64_hi(xh, xl, 28);\n var c1_hi = rotr64_hi(xl, xh, 2);\n var c2_hi = rotr64_hi(xl, xh, 7);\n var r2 = c0_hi ^ c1_hi ^ c2_hi;\n if (r2 < 0)\n r2 += 4294967296;\n return r2;\n }\n function s0_512_lo(xh, xl) {\n var c0_lo = rotr64_lo(xh, xl, 28);\n var c1_lo = rotr64_lo(xl, xh, 2);\n var c2_lo = rotr64_lo(xl, xh, 7);\n var r2 = c0_lo ^ c1_lo ^ c2_lo;\n if (r2 < 0)\n r2 += 4294967296;\n return r2;\n }\n function s1_512_hi(xh, xl) {\n var c0_hi = rotr64_hi(xh, xl, 14);\n var c1_hi = rotr64_hi(xh, xl, 18);\n var c2_hi = rotr64_hi(xl, xh, 9);\n var r2 = c0_hi ^ c1_hi ^ c2_hi;\n if (r2 < 0)\n r2 += 4294967296;\n return r2;\n }\n function s1_512_lo(xh, xl) {\n var c0_lo = rotr64_lo(xh, xl, 14);\n var c1_lo = rotr64_lo(xh, xl, 18);\n var c2_lo = rotr64_lo(xl, xh, 9);\n var r2 = c0_lo ^ c1_lo ^ c2_lo;\n if (r2 < 0)\n r2 += 4294967296;\n return r2;\n }\n function g0_512_hi(xh, xl) {\n var c0_hi = rotr64_hi(xh, xl, 1);\n var c1_hi = rotr64_hi(xh, xl, 8);\n var c2_hi = shr64_hi(xh, xl, 7);\n var r2 = c0_hi ^ c1_hi ^ c2_hi;\n if (r2 < 0)\n r2 += 4294967296;\n return r2;\n }\n function g0_512_lo(xh, xl) {\n var c0_lo = rotr64_lo(xh, xl, 1);\n var c1_lo = rotr64_lo(xh, xl, 8);\n var c2_lo = shr64_lo(xh, xl, 7);\n var r2 = c0_lo ^ c1_lo ^ c2_lo;\n if (r2 < 0)\n r2 += 4294967296;\n return r2;\n }\n function g1_512_hi(xh, xl) {\n var c0_hi = rotr64_hi(xh, xl, 19);\n var c1_hi = rotr64_hi(xl, xh, 29);\n var c2_hi = shr64_hi(xh, xl, 6);\n var r2 = c0_hi ^ c1_hi ^ c2_hi;\n if (r2 < 0)\n r2 += 4294967296;\n return r2;\n }\n function g1_512_lo(xh, xl) {\n var c0_lo = rotr64_lo(xh, xl, 19);\n var c1_lo = rotr64_lo(xl, xh, 29);\n var c2_lo = shr64_lo(xh, xl, 6);\n var r2 = c0_lo ^ c1_lo ^ c2_lo;\n if (r2 < 0)\n r2 += 4294967296;\n return r2;\n }\n }\n });\n\n // ../../../node_modules/.pnpm/hash.js@1.1.7/node_modules/hash.js/lib/hash/sha/384.js\n var require__5 = __commonJS({\n \"../../../node_modules/.pnpm/hash.js@1.1.7/node_modules/hash.js/lib/hash/sha/384.js\"(exports3, module) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n var utils = require_utils4();\n var SHA5122 = require__4();\n function SHA3842() {\n if (!(this instanceof SHA3842))\n return new SHA3842();\n SHA5122.call(this);\n this.h = [\n 3418070365,\n 3238371032,\n 1654270250,\n 914150663,\n 2438529370,\n 812702999,\n 355462360,\n 4144912697,\n 1731405415,\n 4290775857,\n 2394180231,\n 1750603025,\n 3675008525,\n 1694076839,\n 1203062813,\n 3204075428\n ];\n }\n utils.inherits(SHA3842, SHA5122);\n module.exports = SHA3842;\n SHA3842.blockSize = 1024;\n SHA3842.outSize = 384;\n SHA3842.hmacStrength = 192;\n SHA3842.padLength = 128;\n SHA3842.prototype._digest = function digest(enc) {\n if (enc === \"hex\")\n return utils.toHex32(this.h.slice(0, 12), \"big\");\n else\n return utils.split32(this.h.slice(0, 12), \"big\");\n };\n }\n });\n\n // ../../../node_modules/.pnpm/hash.js@1.1.7/node_modules/hash.js/lib/hash/sha.js\n var require_sha = __commonJS({\n \"../../../node_modules/.pnpm/hash.js@1.1.7/node_modules/hash.js/lib/hash/sha.js\"(exports3) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n exports3.sha1 = require__();\n exports3.sha224 = require__3();\n exports3.sha256 = require__2();\n exports3.sha384 = require__5();\n exports3.sha512 = require__4();\n }\n });\n\n // ../../../node_modules/.pnpm/hash.js@1.1.7/node_modules/hash.js/lib/hash/ripemd.js\n var require_ripemd = __commonJS({\n \"../../../node_modules/.pnpm/hash.js@1.1.7/node_modules/hash.js/lib/hash/ripemd.js\"(exports3) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n var utils = require_utils4();\n var common = require_common();\n var rotl32 = utils.rotl32;\n var sum32 = utils.sum32;\n var sum32_3 = utils.sum32_3;\n var sum32_4 = utils.sum32_4;\n var BlockHash = common.BlockHash;\n function RIPEMD1602() {\n if (!(this instanceof RIPEMD1602))\n return new RIPEMD1602();\n BlockHash.call(this);\n this.h = [1732584193, 4023233417, 2562383102, 271733878, 3285377520];\n this.endian = \"little\";\n }\n utils.inherits(RIPEMD1602, BlockHash);\n exports3.ripemd160 = RIPEMD1602;\n RIPEMD1602.blockSize = 512;\n RIPEMD1602.outSize = 160;\n RIPEMD1602.hmacStrength = 192;\n RIPEMD1602.padLength = 64;\n RIPEMD1602.prototype._update = function update(msg, start) {\n var A4 = this.h[0];\n var B2 = this.h[1];\n var C = this.h[2];\n var D2 = this.h[3];\n var E2 = this.h[4];\n var Ah = A4;\n var Bh = B2;\n var Ch = C;\n var Dh = D2;\n var Eh = E2;\n for (var j2 = 0; j2 < 80; j2++) {\n var T4 = sum32(\n rotl32(\n sum32_4(A4, f6(j2, B2, C, D2), msg[r2[j2] + start], K2(j2)),\n s4[j2]\n ),\n E2\n );\n A4 = E2;\n E2 = D2;\n D2 = rotl32(C, 10);\n C = B2;\n B2 = T4;\n T4 = sum32(\n rotl32(\n sum32_4(Ah, f6(79 - j2, Bh, Ch, Dh), msg[rh[j2] + start], Kh(j2)),\n sh[j2]\n ),\n Eh\n );\n Ah = Eh;\n Eh = Dh;\n Dh = rotl32(Ch, 10);\n Ch = Bh;\n Bh = T4;\n }\n T4 = sum32_3(this.h[1], C, Dh);\n this.h[1] = sum32_3(this.h[2], D2, Eh);\n this.h[2] = sum32_3(this.h[3], E2, Ah);\n this.h[3] = sum32_3(this.h[4], A4, Bh);\n this.h[4] = sum32_3(this.h[0], B2, Ch);\n this.h[0] = T4;\n };\n RIPEMD1602.prototype._digest = function digest(enc) {\n if (enc === \"hex\")\n return utils.toHex32(this.h, \"little\");\n else\n return utils.split32(this.h, \"little\");\n };\n function f6(j2, x4, y6, z2) {\n if (j2 <= 15)\n return x4 ^ y6 ^ z2;\n else if (j2 <= 31)\n return x4 & y6 | ~x4 & z2;\n else if (j2 <= 47)\n return (x4 | ~y6) ^ z2;\n else if (j2 <= 63)\n return x4 & z2 | y6 & ~z2;\n else\n return x4 ^ (y6 | ~z2);\n }\n function K2(j2) {\n if (j2 <= 15)\n return 0;\n else if (j2 <= 31)\n return 1518500249;\n else if (j2 <= 47)\n return 1859775393;\n else if (j2 <= 63)\n return 2400959708;\n else\n return 2840853838;\n }\n function Kh(j2) {\n if (j2 <= 15)\n return 1352829926;\n else if (j2 <= 31)\n return 1548603684;\n else if (j2 <= 47)\n return 1836072691;\n else if (j2 <= 63)\n return 2053994217;\n else\n return 0;\n }\n var r2 = [\n 0,\n 1,\n 2,\n 3,\n 4,\n 5,\n 6,\n 7,\n 8,\n 9,\n 10,\n 11,\n 12,\n 13,\n 14,\n 15,\n 7,\n 4,\n 13,\n 1,\n 10,\n 6,\n 15,\n 3,\n 12,\n 0,\n 9,\n 5,\n 2,\n 14,\n 11,\n 8,\n 3,\n 10,\n 14,\n 4,\n 9,\n 15,\n 8,\n 1,\n 2,\n 7,\n 0,\n 6,\n 13,\n 11,\n 5,\n 12,\n 1,\n 9,\n 11,\n 10,\n 0,\n 8,\n 12,\n 4,\n 13,\n 3,\n 7,\n 15,\n 14,\n 5,\n 6,\n 2,\n 4,\n 0,\n 5,\n 9,\n 7,\n 12,\n 2,\n 10,\n 14,\n 1,\n 3,\n 8,\n 11,\n 6,\n 15,\n 13\n ];\n var rh = [\n 5,\n 14,\n 7,\n 0,\n 9,\n 2,\n 11,\n 4,\n 13,\n 6,\n 15,\n 8,\n 1,\n 10,\n 3,\n 12,\n 6,\n 11,\n 3,\n 7,\n 0,\n 13,\n 5,\n 10,\n 14,\n 15,\n 8,\n 12,\n 4,\n 9,\n 1,\n 2,\n 15,\n 5,\n 1,\n 3,\n 7,\n 14,\n 6,\n 9,\n 11,\n 8,\n 12,\n 2,\n 10,\n 0,\n 4,\n 13,\n 8,\n 6,\n 4,\n 1,\n 3,\n 11,\n 15,\n 0,\n 5,\n 12,\n 2,\n 13,\n 9,\n 7,\n 10,\n 14,\n 12,\n 15,\n 10,\n 4,\n 1,\n 5,\n 8,\n 7,\n 6,\n 2,\n 13,\n 14,\n 0,\n 3,\n 9,\n 11\n ];\n var s4 = [\n 11,\n 14,\n 15,\n 12,\n 5,\n 8,\n 7,\n 9,\n 11,\n 13,\n 14,\n 15,\n 6,\n 7,\n 9,\n 8,\n 7,\n 6,\n 8,\n 13,\n 11,\n 9,\n 7,\n 15,\n 7,\n 12,\n 15,\n 9,\n 11,\n 7,\n 13,\n 12,\n 11,\n 13,\n 6,\n 7,\n 14,\n 9,\n 13,\n 15,\n 14,\n 8,\n 13,\n 6,\n 5,\n 12,\n 7,\n 5,\n 11,\n 12,\n 14,\n 15,\n 14,\n 15,\n 9,\n 8,\n 9,\n 14,\n 5,\n 6,\n 8,\n 6,\n 5,\n 12,\n 9,\n 15,\n 5,\n 11,\n 6,\n 8,\n 13,\n 12,\n 5,\n 12,\n 13,\n 14,\n 11,\n 8,\n 5,\n 6\n ];\n var sh = [\n 8,\n 9,\n 9,\n 11,\n 13,\n 15,\n 15,\n 5,\n 7,\n 7,\n 8,\n 11,\n 14,\n 14,\n 12,\n 6,\n 9,\n 13,\n 15,\n 7,\n 12,\n 8,\n 9,\n 11,\n 7,\n 7,\n 12,\n 7,\n 6,\n 15,\n 13,\n 11,\n 9,\n 7,\n 15,\n 11,\n 8,\n 6,\n 6,\n 14,\n 12,\n 13,\n 5,\n 14,\n 13,\n 13,\n 7,\n 5,\n 15,\n 5,\n 8,\n 11,\n 14,\n 14,\n 6,\n 14,\n 6,\n 9,\n 12,\n 9,\n 12,\n 5,\n 15,\n 8,\n 8,\n 5,\n 12,\n 9,\n 12,\n 5,\n 14,\n 6,\n 8,\n 13,\n 6,\n 5,\n 15,\n 13,\n 11,\n 11\n ];\n }\n });\n\n // ../../../node_modules/.pnpm/hash.js@1.1.7/node_modules/hash.js/lib/hash/hmac.js\n var require_hmac = __commonJS({\n \"../../../node_modules/.pnpm/hash.js@1.1.7/node_modules/hash.js/lib/hash/hmac.js\"(exports3, module) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n var utils = require_utils4();\n var assert9 = require_minimalistic_assert();\n function Hmac(hash3, key, enc) {\n if (!(this instanceof Hmac))\n return new Hmac(hash3, key, enc);\n this.Hash = hash3;\n this.blockSize = hash3.blockSize / 8;\n this.outSize = hash3.outSize / 8;\n this.inner = null;\n this.outer = null;\n this._init(utils.toArray(key, enc));\n }\n module.exports = Hmac;\n Hmac.prototype._init = function init(key) {\n if (key.length > this.blockSize)\n key = new this.Hash().update(key).digest();\n assert9(key.length <= this.blockSize);\n for (var i3 = key.length; i3 < this.blockSize; i3++)\n key.push(0);\n for (i3 = 0; i3 < key.length; i3++)\n key[i3] ^= 54;\n this.inner = new this.Hash().update(key);\n for (i3 = 0; i3 < key.length; i3++)\n key[i3] ^= 106;\n this.outer = new this.Hash().update(key);\n };\n Hmac.prototype.update = function update(msg, enc) {\n this.inner.update(msg, enc);\n return this;\n };\n Hmac.prototype.digest = function digest(enc) {\n this.outer.update(this.inner.digest());\n return this.outer.digest(enc);\n };\n }\n });\n\n // ../../../node_modules/.pnpm/hash.js@1.1.7/node_modules/hash.js/lib/hash.js\n var require_hash = __commonJS({\n \"../../../node_modules/.pnpm/hash.js@1.1.7/node_modules/hash.js/lib/hash.js\"(exports3) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n var hash3 = exports3;\n hash3.utils = require_utils4();\n hash3.common = require_common();\n hash3.sha = require_sha();\n hash3.ripemd = require_ripemd();\n hash3.hmac = require_hmac();\n hash3.sha1 = hash3.sha.sha1;\n hash3.sha256 = hash3.sha.sha256;\n hash3.sha224 = hash3.sha.sha224;\n hash3.sha384 = hash3.sha.sha384;\n hash3.sha512 = hash3.sha.sha512;\n hash3.ripemd160 = hash3.ripemd.ripemd160;\n }\n });\n\n // ../../../node_modules/.pnpm/elliptic@6.6.1/node_modules/elliptic/lib/elliptic/precomputed/secp256k1.js\n var require_secp256k1 = __commonJS({\n \"../../../node_modules/.pnpm/elliptic@6.6.1/node_modules/elliptic/lib/elliptic/precomputed/secp256k1.js\"(exports3, module) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n module.exports = {\n doubles: {\n step: 4,\n points: [\n [\n \"e60fce93b59e9ec53011aabc21c23e97b2a31369b87a5ae9c44ee89e2a6dec0a\",\n \"f7e3507399e595929db99f34f57937101296891e44d23f0be1f32cce69616821\"\n ],\n [\n \"8282263212c609d9ea2a6e3e172de238d8c39cabd5ac1ca10646e23fd5f51508\",\n \"11f8a8098557dfe45e8256e830b60ace62d613ac2f7b17bed31b6eaff6e26caf\"\n ],\n [\n \"175e159f728b865a72f99cc6c6fc846de0b93833fd2222ed73fce5b551e5b739\",\n \"d3506e0d9e3c79eba4ef97a51ff71f5eacb5955add24345c6efa6ffee9fed695\"\n ],\n [\n \"363d90d447b00c9c99ceac05b6262ee053441c7e55552ffe526bad8f83ff4640\",\n \"4e273adfc732221953b445397f3363145b9a89008199ecb62003c7f3bee9de9\"\n ],\n [\n \"8b4b5f165df3c2be8c6244b5b745638843e4a781a15bcd1b69f79a55dffdf80c\",\n \"4aad0a6f68d308b4b3fbd7813ab0da04f9e336546162ee56b3eff0c65fd4fd36\"\n ],\n [\n \"723cbaa6e5db996d6bf771c00bd548c7b700dbffa6c0e77bcb6115925232fcda\",\n \"96e867b5595cc498a921137488824d6e2660a0653779494801dc069d9eb39f5f\"\n ],\n [\n \"eebfa4d493bebf98ba5feec812c2d3b50947961237a919839a533eca0e7dd7fa\",\n \"5d9a8ca3970ef0f269ee7edaf178089d9ae4cdc3a711f712ddfd4fdae1de8999\"\n ],\n [\n \"100f44da696e71672791d0a09b7bde459f1215a29b3c03bfefd7835b39a48db0\",\n \"cdd9e13192a00b772ec8f3300c090666b7ff4a18ff5195ac0fbd5cd62bc65a09\"\n ],\n [\n \"e1031be262c7ed1b1dc9227a4a04c017a77f8d4464f3b3852c8acde6e534fd2d\",\n \"9d7061928940405e6bb6a4176597535af292dd419e1ced79a44f18f29456a00d\"\n ],\n [\n \"feea6cae46d55b530ac2839f143bd7ec5cf8b266a41d6af52d5e688d9094696d\",\n \"e57c6b6c97dce1bab06e4e12bf3ecd5c981c8957cc41442d3155debf18090088\"\n ],\n [\n \"da67a91d91049cdcb367be4be6ffca3cfeed657d808583de33fa978bc1ec6cb1\",\n \"9bacaa35481642bc41f463f7ec9780e5dec7adc508f740a17e9ea8e27a68be1d\"\n ],\n [\n \"53904faa0b334cdda6e000935ef22151ec08d0f7bb11069f57545ccc1a37b7c0\",\n \"5bc087d0bc80106d88c9eccac20d3c1c13999981e14434699dcb096b022771c8\"\n ],\n [\n \"8e7bcd0bd35983a7719cca7764ca906779b53a043a9b8bcaeff959f43ad86047\",\n \"10b7770b2a3da4b3940310420ca9514579e88e2e47fd68b3ea10047e8460372a\"\n ],\n [\n \"385eed34c1cdff21e6d0818689b81bde71a7f4f18397e6690a841e1599c43862\",\n \"283bebc3e8ea23f56701de19e9ebf4576b304eec2086dc8cc0458fe5542e5453\"\n ],\n [\n \"6f9d9b803ecf191637c73a4413dfa180fddf84a5947fbc9c606ed86c3fac3a7\",\n \"7c80c68e603059ba69b8e2a30e45c4d47ea4dd2f5c281002d86890603a842160\"\n ],\n [\n \"3322d401243c4e2582a2147c104d6ecbf774d163db0f5e5313b7e0e742d0e6bd\",\n \"56e70797e9664ef5bfb019bc4ddaf9b72805f63ea2873af624f3a2e96c28b2a0\"\n ],\n [\n \"85672c7d2de0b7da2bd1770d89665868741b3f9af7643397721d74d28134ab83\",\n \"7c481b9b5b43b2eb6374049bfa62c2e5e77f17fcc5298f44c8e3094f790313a6\"\n ],\n [\n \"948bf809b1988a46b06c9f1919413b10f9226c60f668832ffd959af60c82a0a\",\n \"53a562856dcb6646dc6b74c5d1c3418c6d4dff08c97cd2bed4cb7f88d8c8e589\"\n ],\n [\n \"6260ce7f461801c34f067ce0f02873a8f1b0e44dfc69752accecd819f38fd8e8\",\n \"bc2da82b6fa5b571a7f09049776a1ef7ecd292238051c198c1a84e95b2b4ae17\"\n ],\n [\n \"e5037de0afc1d8d43d8348414bbf4103043ec8f575bfdc432953cc8d2037fa2d\",\n \"4571534baa94d3b5f9f98d09fb990bddbd5f5b03ec481f10e0e5dc841d755bda\"\n ],\n [\n \"e06372b0f4a207adf5ea905e8f1771b4e7e8dbd1c6a6c5b725866a0ae4fce725\",\n \"7a908974bce18cfe12a27bb2ad5a488cd7484a7787104870b27034f94eee31dd\"\n ],\n [\n \"213c7a715cd5d45358d0bbf9dc0ce02204b10bdde2a3f58540ad6908d0559754\",\n \"4b6dad0b5ae462507013ad06245ba190bb4850f5f36a7eeddff2c27534b458f2\"\n ],\n [\n \"4e7c272a7af4b34e8dbb9352a5419a87e2838c70adc62cddf0cc3a3b08fbd53c\",\n \"17749c766c9d0b18e16fd09f6def681b530b9614bff7dd33e0b3941817dcaae6\"\n ],\n [\n \"fea74e3dbe778b1b10f238ad61686aa5c76e3db2be43057632427e2840fb27b6\",\n \"6e0568db9b0b13297cf674deccb6af93126b596b973f7b77701d3db7f23cb96f\"\n ],\n [\n \"76e64113f677cf0e10a2570d599968d31544e179b760432952c02a4417bdde39\",\n \"c90ddf8dee4e95cf577066d70681f0d35e2a33d2b56d2032b4b1752d1901ac01\"\n ],\n [\n \"c738c56b03b2abe1e8281baa743f8f9a8f7cc643df26cbee3ab150242bcbb891\",\n \"893fb578951ad2537f718f2eacbfbbbb82314eef7880cfe917e735d9699a84c3\"\n ],\n [\n \"d895626548b65b81e264c7637c972877d1d72e5f3a925014372e9f6588f6c14b\",\n \"febfaa38f2bc7eae728ec60818c340eb03428d632bb067e179363ed75d7d991f\"\n ],\n [\n \"b8da94032a957518eb0f6433571e8761ceffc73693e84edd49150a564f676e03\",\n \"2804dfa44805a1e4d7c99cc9762808b092cc584d95ff3b511488e4e74efdf6e7\"\n ],\n [\n \"e80fea14441fb33a7d8adab9475d7fab2019effb5156a792f1a11778e3c0df5d\",\n \"eed1de7f638e00771e89768ca3ca94472d155e80af322ea9fcb4291b6ac9ec78\"\n ],\n [\n \"a301697bdfcd704313ba48e51d567543f2a182031efd6915ddc07bbcc4e16070\",\n \"7370f91cfb67e4f5081809fa25d40f9b1735dbf7c0a11a130c0d1a041e177ea1\"\n ],\n [\n \"90ad85b389d6b936463f9d0512678de208cc330b11307fffab7ac63e3fb04ed4\",\n \"e507a3620a38261affdcbd9427222b839aefabe1582894d991d4d48cb6ef150\"\n ],\n [\n \"8f68b9d2f63b5f339239c1ad981f162ee88c5678723ea3351b7b444c9ec4c0da\",\n \"662a9f2dba063986de1d90c2b6be215dbbea2cfe95510bfdf23cbf79501fff82\"\n ],\n [\n \"e4f3fb0176af85d65ff99ff9198c36091f48e86503681e3e6686fd5053231e11\",\n \"1e63633ad0ef4f1c1661a6d0ea02b7286cc7e74ec951d1c9822c38576feb73bc\"\n ],\n [\n \"8c00fa9b18ebf331eb961537a45a4266c7034f2f0d4e1d0716fb6eae20eae29e\",\n \"efa47267fea521a1a9dc343a3736c974c2fadafa81e36c54e7d2a4c66702414b\"\n ],\n [\n \"e7a26ce69dd4829f3e10cec0a9e98ed3143d084f308b92c0997fddfc60cb3e41\",\n \"2a758e300fa7984b471b006a1aafbb18d0a6b2c0420e83e20e8a9421cf2cfd51\"\n ],\n [\n \"b6459e0ee3662ec8d23540c223bcbdc571cbcb967d79424f3cf29eb3de6b80ef\",\n \"67c876d06f3e06de1dadf16e5661db3c4b3ae6d48e35b2ff30bf0b61a71ba45\"\n ],\n [\n \"d68a80c8280bb840793234aa118f06231d6f1fc67e73c5a5deda0f5b496943e8\",\n \"db8ba9fff4b586d00c4b1f9177b0e28b5b0e7b8f7845295a294c84266b133120\"\n ],\n [\n \"324aed7df65c804252dc0270907a30b09612aeb973449cea4095980fc28d3d5d\",\n \"648a365774b61f2ff130c0c35aec1f4f19213b0c7e332843967224af96ab7c84\"\n ],\n [\n \"4df9c14919cde61f6d51dfdbe5fee5dceec4143ba8d1ca888e8bd373fd054c96\",\n \"35ec51092d8728050974c23a1d85d4b5d506cdc288490192ebac06cad10d5d\"\n ],\n [\n \"9c3919a84a474870faed8a9c1cc66021523489054d7f0308cbfc99c8ac1f98cd\",\n \"ddb84f0f4a4ddd57584f044bf260e641905326f76c64c8e6be7e5e03d4fc599d\"\n ],\n [\n \"6057170b1dd12fdf8de05f281d8e06bb91e1493a8b91d4cc5a21382120a959e5\",\n \"9a1af0b26a6a4807add9a2daf71df262465152bc3ee24c65e899be932385a2a8\"\n ],\n [\n \"a576df8e23a08411421439a4518da31880cef0fba7d4df12b1a6973eecb94266\",\n \"40a6bf20e76640b2c92b97afe58cd82c432e10a7f514d9f3ee8be11ae1b28ec8\"\n ],\n [\n \"7778a78c28dec3e30a05fe9629de8c38bb30d1f5cf9a3a208f763889be58ad71\",\n \"34626d9ab5a5b22ff7098e12f2ff580087b38411ff24ac563b513fc1fd9f43ac\"\n ],\n [\n \"928955ee637a84463729fd30e7afd2ed5f96274e5ad7e5cb09eda9c06d903ac\",\n \"c25621003d3f42a827b78a13093a95eeac3d26efa8a8d83fc5180e935bcd091f\"\n ],\n [\n \"85d0fef3ec6db109399064f3a0e3b2855645b4a907ad354527aae75163d82751\",\n \"1f03648413a38c0be29d496e582cf5663e8751e96877331582c237a24eb1f962\"\n ],\n [\n \"ff2b0dce97eece97c1c9b6041798b85dfdfb6d8882da20308f5404824526087e\",\n \"493d13fef524ba188af4c4dc54d07936c7b7ed6fb90e2ceb2c951e01f0c29907\"\n ],\n [\n \"827fbbe4b1e880ea9ed2b2e6301b212b57f1ee148cd6dd28780e5e2cf856e241\",\n \"c60f9c923c727b0b71bef2c67d1d12687ff7a63186903166d605b68baec293ec\"\n ],\n [\n \"eaa649f21f51bdbae7be4ae34ce6e5217a58fdce7f47f9aa7f3b58fa2120e2b3\",\n \"be3279ed5bbbb03ac69a80f89879aa5a01a6b965f13f7e59d47a5305ba5ad93d\"\n ],\n [\n \"e4a42d43c5cf169d9391df6decf42ee541b6d8f0c9a137401e23632dda34d24f\",\n \"4d9f92e716d1c73526fc99ccfb8ad34ce886eedfa8d8e4f13a7f7131deba9414\"\n ],\n [\n \"1ec80fef360cbdd954160fadab352b6b92b53576a88fea4947173b9d4300bf19\",\n \"aeefe93756b5340d2f3a4958a7abbf5e0146e77f6295a07b671cdc1cc107cefd\"\n ],\n [\n \"146a778c04670c2f91b00af4680dfa8bce3490717d58ba889ddb5928366642be\",\n \"b318e0ec3354028add669827f9d4b2870aaa971d2f7e5ed1d0b297483d83efd0\"\n ],\n [\n \"fa50c0f61d22e5f07e3acebb1aa07b128d0012209a28b9776d76a8793180eef9\",\n \"6b84c6922397eba9b72cd2872281a68a5e683293a57a213b38cd8d7d3f4f2811\"\n ],\n [\n \"da1d61d0ca721a11b1a5bf6b7d88e8421a288ab5d5bba5220e53d32b5f067ec2\",\n \"8157f55a7c99306c79c0766161c91e2966a73899d279b48a655fba0f1ad836f1\"\n ],\n [\n \"a8e282ff0c9706907215ff98e8fd416615311de0446f1e062a73b0610d064e13\",\n \"7f97355b8db81c09abfb7f3c5b2515888b679a3e50dd6bd6cef7c73111f4cc0c\"\n ],\n [\n \"174a53b9c9a285872d39e56e6913cab15d59b1fa512508c022f382de8319497c\",\n \"ccc9dc37abfc9c1657b4155f2c47f9e6646b3a1d8cb9854383da13ac079afa73\"\n ],\n [\n \"959396981943785c3d3e57edf5018cdbe039e730e4918b3d884fdff09475b7ba\",\n \"2e7e552888c331dd8ba0386a4b9cd6849c653f64c8709385e9b8abf87524f2fd\"\n ],\n [\n \"d2a63a50ae401e56d645a1153b109a8fcca0a43d561fba2dbb51340c9d82b151\",\n \"e82d86fb6443fcb7565aee58b2948220a70f750af484ca52d4142174dcf89405\"\n ],\n [\n \"64587e2335471eb890ee7896d7cfdc866bacbdbd3839317b3436f9b45617e073\",\n \"d99fcdd5bf6902e2ae96dd6447c299a185b90a39133aeab358299e5e9faf6589\"\n ],\n [\n \"8481bde0e4e4d885b3a546d3e549de042f0aa6cea250e7fd358d6c86dd45e458\",\n \"38ee7b8cba5404dd84a25bf39cecb2ca900a79c42b262e556d64b1b59779057e\"\n ],\n [\n \"13464a57a78102aa62b6979ae817f4637ffcfed3c4b1ce30bcd6303f6caf666b\",\n \"69be159004614580ef7e433453ccb0ca48f300a81d0942e13f495a907f6ecc27\"\n ],\n [\n \"bc4a9df5b713fe2e9aef430bcc1dc97a0cd9ccede2f28588cada3a0d2d83f366\",\n \"d3a81ca6e785c06383937adf4b798caa6e8a9fbfa547b16d758d666581f33c1\"\n ],\n [\n \"8c28a97bf8298bc0d23d8c749452a32e694b65e30a9472a3954ab30fe5324caa\",\n \"40a30463a3305193378fedf31f7cc0eb7ae784f0451cb9459e71dc73cbef9482\"\n ],\n [\n \"8ea9666139527a8c1dd94ce4f071fd23c8b350c5a4bb33748c4ba111faccae0\",\n \"620efabbc8ee2782e24e7c0cfb95c5d735b783be9cf0f8e955af34a30e62b945\"\n ],\n [\n \"dd3625faef5ba06074669716bbd3788d89bdde815959968092f76cc4eb9a9787\",\n \"7a188fa3520e30d461da2501045731ca941461982883395937f68d00c644a573\"\n ],\n [\n \"f710d79d9eb962297e4f6232b40e8f7feb2bc63814614d692c12de752408221e\",\n \"ea98e67232d3b3295d3b535532115ccac8612c721851617526ae47a9c77bfc82\"\n ]\n ]\n },\n naf: {\n wnd: 7,\n points: [\n [\n \"f9308a019258c31049344f85f89d5229b531c845836f99b08601f113bce036f9\",\n \"388f7b0f632de8140fe337e62a37f3566500a99934c2231b6cb9fd7584b8e672\"\n ],\n [\n \"2f8bde4d1a07209355b4a7250a5c5128e88b84bddc619ab7cba8d569b240efe4\",\n \"d8ac222636e5e3d6d4dba9dda6c9c426f788271bab0d6840dca87d3aa6ac62d6\"\n ],\n [\n \"5cbdf0646e5db4eaa398f365f2ea7a0e3d419b7e0330e39ce92bddedcac4f9bc\",\n \"6aebca40ba255960a3178d6d861a54dba813d0b813fde7b5a5082628087264da\"\n ],\n [\n \"acd484e2f0c7f65309ad178a9f559abde09796974c57e714c35f110dfc27ccbe\",\n \"cc338921b0a7d9fd64380971763b61e9add888a4375f8e0f05cc262ac64f9c37\"\n ],\n [\n \"774ae7f858a9411e5ef4246b70c65aac5649980be5c17891bbec17895da008cb\",\n \"d984a032eb6b5e190243dd56d7b7b365372db1e2dff9d6a8301d74c9c953c61b\"\n ],\n [\n \"f28773c2d975288bc7d1d205c3748651b075fbc6610e58cddeeddf8f19405aa8\",\n \"ab0902e8d880a89758212eb65cdaf473a1a06da521fa91f29b5cb52db03ed81\"\n ],\n [\n \"d7924d4f7d43ea965a465ae3095ff41131e5946f3c85f79e44adbcf8e27e080e\",\n \"581e2872a86c72a683842ec228cc6defea40af2bd896d3a5c504dc9ff6a26b58\"\n ],\n [\n \"defdea4cdb677750a420fee807eacf21eb9898ae79b9768766e4faa04a2d4a34\",\n \"4211ab0694635168e997b0ead2a93daeced1f4a04a95c0f6cfb199f69e56eb77\"\n ],\n [\n \"2b4ea0a797a443d293ef5cff444f4979f06acfebd7e86d277475656138385b6c\",\n \"85e89bc037945d93b343083b5a1c86131a01f60c50269763b570c854e5c09b7a\"\n ],\n [\n \"352bbf4a4cdd12564f93fa332ce333301d9ad40271f8107181340aef25be59d5\",\n \"321eb4075348f534d59c18259dda3e1f4a1b3b2e71b1039c67bd3d8bcf81998c\"\n ],\n [\n \"2fa2104d6b38d11b0230010559879124e42ab8dfeff5ff29dc9cdadd4ecacc3f\",\n \"2de1068295dd865b64569335bd5dd80181d70ecfc882648423ba76b532b7d67\"\n ],\n [\n \"9248279b09b4d68dab21a9b066edda83263c3d84e09572e269ca0cd7f5453714\",\n \"73016f7bf234aade5d1aa71bdea2b1ff3fc0de2a887912ffe54a32ce97cb3402\"\n ],\n [\n \"daed4f2be3a8bf278e70132fb0beb7522f570e144bf615c07e996d443dee8729\",\n \"a69dce4a7d6c98e8d4a1aca87ef8d7003f83c230f3afa726ab40e52290be1c55\"\n ],\n [\n \"c44d12c7065d812e8acf28d7cbb19f9011ecd9e9fdf281b0e6a3b5e87d22e7db\",\n \"2119a460ce326cdc76c45926c982fdac0e106e861edf61c5a039063f0e0e6482\"\n ],\n [\n \"6a245bf6dc698504c89a20cfded60853152b695336c28063b61c65cbd269e6b4\",\n \"e022cf42c2bd4a708b3f5126f16a24ad8b33ba48d0423b6efd5e6348100d8a82\"\n ],\n [\n \"1697ffa6fd9de627c077e3d2fe541084ce13300b0bec1146f95ae57f0d0bd6a5\",\n \"b9c398f186806f5d27561506e4557433a2cf15009e498ae7adee9d63d01b2396\"\n ],\n [\n \"605bdb019981718b986d0f07e834cb0d9deb8360ffb7f61df982345ef27a7479\",\n \"2972d2de4f8d20681a78d93ec96fe23c26bfae84fb14db43b01e1e9056b8c49\"\n ],\n [\n \"62d14dab4150bf497402fdc45a215e10dcb01c354959b10cfe31c7e9d87ff33d\",\n \"80fc06bd8cc5b01098088a1950eed0db01aa132967ab472235f5642483b25eaf\"\n ],\n [\n \"80c60ad0040f27dade5b4b06c408e56b2c50e9f56b9b8b425e555c2f86308b6f\",\n \"1c38303f1cc5c30f26e66bad7fe72f70a65eed4cbe7024eb1aa01f56430bd57a\"\n ],\n [\n \"7a9375ad6167ad54aa74c6348cc54d344cc5dc9487d847049d5eabb0fa03c8fb\",\n \"d0e3fa9eca8726909559e0d79269046bdc59ea10c70ce2b02d499ec224dc7f7\"\n ],\n [\n \"d528ecd9b696b54c907a9ed045447a79bb408ec39b68df504bb51f459bc3ffc9\",\n \"eecf41253136e5f99966f21881fd656ebc4345405c520dbc063465b521409933\"\n ],\n [\n \"49370a4b5f43412ea25f514e8ecdad05266115e4a7ecb1387231808f8b45963\",\n \"758f3f41afd6ed428b3081b0512fd62a54c3f3afbb5b6764b653052a12949c9a\"\n ],\n [\n \"77f230936ee88cbbd73df930d64702ef881d811e0e1498e2f1c13eb1fc345d74\",\n \"958ef42a7886b6400a08266e9ba1b37896c95330d97077cbbe8eb3c7671c60d6\"\n ],\n [\n \"f2dac991cc4ce4b9ea44887e5c7c0bce58c80074ab9d4dbaeb28531b7739f530\",\n \"e0dedc9b3b2f8dad4da1f32dec2531df9eb5fbeb0598e4fd1a117dba703a3c37\"\n ],\n [\n \"463b3d9f662621fb1b4be8fbbe2520125a216cdfc9dae3debcba4850c690d45b\",\n \"5ed430d78c296c3543114306dd8622d7c622e27c970a1de31cb377b01af7307e\"\n ],\n [\n \"f16f804244e46e2a09232d4aff3b59976b98fac14328a2d1a32496b49998f247\",\n \"cedabd9b82203f7e13d206fcdf4e33d92a6c53c26e5cce26d6579962c4e31df6\"\n ],\n [\n \"caf754272dc84563b0352b7a14311af55d245315ace27c65369e15f7151d41d1\",\n \"cb474660ef35f5f2a41b643fa5e460575f4fa9b7962232a5c32f908318a04476\"\n ],\n [\n \"2600ca4b282cb986f85d0f1709979d8b44a09c07cb86d7c124497bc86f082120\",\n \"4119b88753c15bd6a693b03fcddbb45d5ac6be74ab5f0ef44b0be9475a7e4b40\"\n ],\n [\n \"7635ca72d7e8432c338ec53cd12220bc01c48685e24f7dc8c602a7746998e435\",\n \"91b649609489d613d1d5e590f78e6d74ecfc061d57048bad9e76f302c5b9c61\"\n ],\n [\n \"754e3239f325570cdbbf4a87deee8a66b7f2b33479d468fbc1a50743bf56cc18\",\n \"673fb86e5bda30fb3cd0ed304ea49a023ee33d0197a695d0c5d98093c536683\"\n ],\n [\n \"e3e6bd1071a1e96aff57859c82d570f0330800661d1c952f9fe2694691d9b9e8\",\n \"59c9e0bba394e76f40c0aa58379a3cb6a5a2283993e90c4167002af4920e37f5\"\n ],\n [\n \"186b483d056a033826ae73d88f732985c4ccb1f32ba35f4b4cc47fdcf04aa6eb\",\n \"3b952d32c67cf77e2e17446e204180ab21fb8090895138b4a4a797f86e80888b\"\n ],\n [\n \"df9d70a6b9876ce544c98561f4be4f725442e6d2b737d9c91a8321724ce0963f\",\n \"55eb2dafd84d6ccd5f862b785dc39d4ab157222720ef9da217b8c45cf2ba2417\"\n ],\n [\n \"5edd5cc23c51e87a497ca815d5dce0f8ab52554f849ed8995de64c5f34ce7143\",\n \"efae9c8dbc14130661e8cec030c89ad0c13c66c0d17a2905cdc706ab7399a868\"\n ],\n [\n \"290798c2b6476830da12fe02287e9e777aa3fba1c355b17a722d362f84614fba\",\n \"e38da76dcd440621988d00bcf79af25d5b29c094db2a23146d003afd41943e7a\"\n ],\n [\n \"af3c423a95d9f5b3054754efa150ac39cd29552fe360257362dfdecef4053b45\",\n \"f98a3fd831eb2b749a93b0e6f35cfb40c8cd5aa667a15581bc2feded498fd9c6\"\n ],\n [\n \"766dbb24d134e745cccaa28c99bf274906bb66b26dcf98df8d2fed50d884249a\",\n \"744b1152eacbe5e38dcc887980da38b897584a65fa06cedd2c924f97cbac5996\"\n ],\n [\n \"59dbf46f8c94759ba21277c33784f41645f7b44f6c596a58ce92e666191abe3e\",\n \"c534ad44175fbc300f4ea6ce648309a042ce739a7919798cd85e216c4a307f6e\"\n ],\n [\n \"f13ada95103c4537305e691e74e9a4a8dd647e711a95e73cb62dc6018cfd87b8\",\n \"e13817b44ee14de663bf4bc808341f326949e21a6a75c2570778419bdaf5733d\"\n ],\n [\n \"7754b4fa0e8aced06d4167a2c59cca4cda1869c06ebadfb6488550015a88522c\",\n \"30e93e864e669d82224b967c3020b8fa8d1e4e350b6cbcc537a48b57841163a2\"\n ],\n [\n \"948dcadf5990e048aa3874d46abef9d701858f95de8041d2a6828c99e2262519\",\n \"e491a42537f6e597d5d28a3224b1bc25df9154efbd2ef1d2cbba2cae5347d57e\"\n ],\n [\n \"7962414450c76c1689c7b48f8202ec37fb224cf5ac0bfa1570328a8a3d7c77ab\",\n \"100b610ec4ffb4760d5c1fc133ef6f6b12507a051f04ac5760afa5b29db83437\"\n ],\n [\n \"3514087834964b54b15b160644d915485a16977225b8847bb0dd085137ec47ca\",\n \"ef0afbb2056205448e1652c48e8127fc6039e77c15c2378b7e7d15a0de293311\"\n ],\n [\n \"d3cc30ad6b483e4bc79ce2c9dd8bc54993e947eb8df787b442943d3f7b527eaf\",\n \"8b378a22d827278d89c5e9be8f9508ae3c2ad46290358630afb34db04eede0a4\"\n ],\n [\n \"1624d84780732860ce1c78fcbfefe08b2b29823db913f6493975ba0ff4847610\",\n \"68651cf9b6da903e0914448c6cd9d4ca896878f5282be4c8cc06e2a404078575\"\n ],\n [\n \"733ce80da955a8a26902c95633e62a985192474b5af207da6df7b4fd5fc61cd4\",\n \"f5435a2bd2badf7d485a4d8b8db9fcce3e1ef8e0201e4578c54673bc1dc5ea1d\"\n ],\n [\n \"15d9441254945064cf1a1c33bbd3b49f8966c5092171e699ef258dfab81c045c\",\n \"d56eb30b69463e7234f5137b73b84177434800bacebfc685fc37bbe9efe4070d\"\n ],\n [\n \"a1d0fcf2ec9de675b612136e5ce70d271c21417c9d2b8aaaac138599d0717940\",\n \"edd77f50bcb5a3cab2e90737309667f2641462a54070f3d519212d39c197a629\"\n ],\n [\n \"e22fbe15c0af8ccc5780c0735f84dbe9a790badee8245c06c7ca37331cb36980\",\n \"a855babad5cd60c88b430a69f53a1a7a38289154964799be43d06d77d31da06\"\n ],\n [\n \"311091dd9860e8e20ee13473c1155f5f69635e394704eaa74009452246cfa9b3\",\n \"66db656f87d1f04fffd1f04788c06830871ec5a64feee685bd80f0b1286d8374\"\n ],\n [\n \"34c1fd04d301be89b31c0442d3e6ac24883928b45a9340781867d4232ec2dbdf\",\n \"9414685e97b1b5954bd46f730174136d57f1ceeb487443dc5321857ba73abee\"\n ],\n [\n \"f219ea5d6b54701c1c14de5b557eb42a8d13f3abbcd08affcc2a5e6b049b8d63\",\n \"4cb95957e83d40b0f73af4544cccf6b1f4b08d3c07b27fb8d8c2962a400766d1\"\n ],\n [\n \"d7b8740f74a8fbaab1f683db8f45de26543a5490bca627087236912469a0b448\",\n \"fa77968128d9c92ee1010f337ad4717eff15db5ed3c049b3411e0315eaa4593b\"\n ],\n [\n \"32d31c222f8f6f0ef86f7c98d3a3335ead5bcd32abdd94289fe4d3091aa824bf\",\n \"5f3032f5892156e39ccd3d7915b9e1da2e6dac9e6f26e961118d14b8462e1661\"\n ],\n [\n \"7461f371914ab32671045a155d9831ea8793d77cd59592c4340f86cbc18347b5\",\n \"8ec0ba238b96bec0cbdddcae0aa442542eee1ff50c986ea6b39847b3cc092ff6\"\n ],\n [\n \"ee079adb1df1860074356a25aa38206a6d716b2c3e67453d287698bad7b2b2d6\",\n \"8dc2412aafe3be5c4c5f37e0ecc5f9f6a446989af04c4e25ebaac479ec1c8c1e\"\n ],\n [\n \"16ec93e447ec83f0467b18302ee620f7e65de331874c9dc72bfd8616ba9da6b5\",\n \"5e4631150e62fb40d0e8c2a7ca5804a39d58186a50e497139626778e25b0674d\"\n ],\n [\n \"eaa5f980c245f6f038978290afa70b6bd8855897f98b6aa485b96065d537bd99\",\n \"f65f5d3e292c2e0819a528391c994624d784869d7e6ea67fb18041024edc07dc\"\n ],\n [\n \"78c9407544ac132692ee1910a02439958ae04877151342ea96c4b6b35a49f51\",\n \"f3e0319169eb9b85d5404795539a5e68fa1fbd583c064d2462b675f194a3ddb4\"\n ],\n [\n \"494f4be219a1a77016dcd838431aea0001cdc8ae7a6fc688726578d9702857a5\",\n \"42242a969283a5f339ba7f075e36ba2af925ce30d767ed6e55f4b031880d562c\"\n ],\n [\n \"a598a8030da6d86c6bc7f2f5144ea549d28211ea58faa70ebf4c1e665c1fe9b5\",\n \"204b5d6f84822c307e4b4a7140737aec23fc63b65b35f86a10026dbd2d864e6b\"\n ],\n [\n \"c41916365abb2b5d09192f5f2dbeafec208f020f12570a184dbadc3e58595997\",\n \"4f14351d0087efa49d245b328984989d5caf9450f34bfc0ed16e96b58fa9913\"\n ],\n [\n \"841d6063a586fa475a724604da03bc5b92a2e0d2e0a36acfe4c73a5514742881\",\n \"73867f59c0659e81904f9a1c7543698e62562d6744c169ce7a36de01a8d6154\"\n ],\n [\n \"5e95bb399a6971d376026947f89bde2f282b33810928be4ded112ac4d70e20d5\",\n \"39f23f366809085beebfc71181313775a99c9aed7d8ba38b161384c746012865\"\n ],\n [\n \"36e4641a53948fd476c39f8a99fd974e5ec07564b5315d8bf99471bca0ef2f66\",\n \"d2424b1b1abe4eb8164227b085c9aa9456ea13493fd563e06fd51cf5694c78fc\"\n ],\n [\n \"336581ea7bfbbb290c191a2f507a41cf5643842170e914faeab27c2c579f726\",\n \"ead12168595fe1be99252129b6e56b3391f7ab1410cd1e0ef3dcdcabd2fda224\"\n ],\n [\n \"8ab89816dadfd6b6a1f2634fcf00ec8403781025ed6890c4849742706bd43ede\",\n \"6fdcef09f2f6d0a044e654aef624136f503d459c3e89845858a47a9129cdd24e\"\n ],\n [\n \"1e33f1a746c9c5778133344d9299fcaa20b0938e8acff2544bb40284b8c5fb94\",\n \"60660257dd11b3aa9c8ed618d24edff2306d320f1d03010e33a7d2057f3b3b6\"\n ],\n [\n \"85b7c1dcb3cec1b7ee7f30ded79dd20a0ed1f4cc18cbcfcfa410361fd8f08f31\",\n \"3d98a9cdd026dd43f39048f25a8847f4fcafad1895d7a633c6fed3c35e999511\"\n ],\n [\n \"29df9fbd8d9e46509275f4b125d6d45d7fbe9a3b878a7af872a2800661ac5f51\",\n \"b4c4fe99c775a606e2d8862179139ffda61dc861c019e55cd2876eb2a27d84b\"\n ],\n [\n \"a0b1cae06b0a847a3fea6e671aaf8adfdfe58ca2f768105c8082b2e449fce252\",\n \"ae434102edde0958ec4b19d917a6a28e6b72da1834aff0e650f049503a296cf2\"\n ],\n [\n \"4e8ceafb9b3e9a136dc7ff67e840295b499dfb3b2133e4ba113f2e4c0e121e5\",\n \"cf2174118c8b6d7a4b48f6d534ce5c79422c086a63460502b827ce62a326683c\"\n ],\n [\n \"d24a44e047e19b6f5afb81c7ca2f69080a5076689a010919f42725c2b789a33b\",\n \"6fb8d5591b466f8fc63db50f1c0f1c69013f996887b8244d2cdec417afea8fa3\"\n ],\n [\n \"ea01606a7a6c9cdd249fdfcfacb99584001edd28abbab77b5104e98e8e3b35d4\",\n \"322af4908c7312b0cfbfe369f7a7b3cdb7d4494bc2823700cfd652188a3ea98d\"\n ],\n [\n \"af8addbf2b661c8a6c6328655eb96651252007d8c5ea31be4ad196de8ce2131f\",\n \"6749e67c029b85f52a034eafd096836b2520818680e26ac8f3dfbcdb71749700\"\n ],\n [\n \"e3ae1974566ca06cc516d47e0fb165a674a3dabcfca15e722f0e3450f45889\",\n \"2aeabe7e4531510116217f07bf4d07300de97e4874f81f533420a72eeb0bd6a4\"\n ],\n [\n \"591ee355313d99721cf6993ffed1e3e301993ff3ed258802075ea8ced397e246\",\n \"b0ea558a113c30bea60fc4775460c7901ff0b053d25ca2bdeee98f1a4be5d196\"\n ],\n [\n \"11396d55fda54c49f19aa97318d8da61fa8584e47b084945077cf03255b52984\",\n \"998c74a8cd45ac01289d5833a7beb4744ff536b01b257be4c5767bea93ea57a4\"\n ],\n [\n \"3c5d2a1ba39c5a1790000738c9e0c40b8dcdfd5468754b6405540157e017aa7a\",\n \"b2284279995a34e2f9d4de7396fc18b80f9b8b9fdd270f6661f79ca4c81bd257\"\n ],\n [\n \"cc8704b8a60a0defa3a99a7299f2e9c3fbc395afb04ac078425ef8a1793cc030\",\n \"bdd46039feed17881d1e0862db347f8cf395b74fc4bcdc4e940b74e3ac1f1b13\"\n ],\n [\n \"c533e4f7ea8555aacd9777ac5cad29b97dd4defccc53ee7ea204119b2889b197\",\n \"6f0a256bc5efdf429a2fb6242f1a43a2d9b925bb4a4b3a26bb8e0f45eb596096\"\n ],\n [\n \"c14f8f2ccb27d6f109f6d08d03cc96a69ba8c34eec07bbcf566d48e33da6593\",\n \"c359d6923bb398f7fd4473e16fe1c28475b740dd098075e6c0e8649113dc3a38\"\n ],\n [\n \"a6cbc3046bc6a450bac24789fa17115a4c9739ed75f8f21ce441f72e0b90e6ef\",\n \"21ae7f4680e889bb130619e2c0f95a360ceb573c70603139862afd617fa9b9f\"\n ],\n [\n \"347d6d9a02c48927ebfb86c1359b1caf130a3c0267d11ce6344b39f99d43cc38\",\n \"60ea7f61a353524d1c987f6ecec92f086d565ab687870cb12689ff1e31c74448\"\n ],\n [\n \"da6545d2181db8d983f7dcb375ef5866d47c67b1bf31c8cf855ef7437b72656a\",\n \"49b96715ab6878a79e78f07ce5680c5d6673051b4935bd897fea824b77dc208a\"\n ],\n [\n \"c40747cc9d012cb1a13b8148309c6de7ec25d6945d657146b9d5994b8feb1111\",\n \"5ca560753be2a12fc6de6caf2cb489565db936156b9514e1bb5e83037e0fa2d4\"\n ],\n [\n \"4e42c8ec82c99798ccf3a610be870e78338c7f713348bd34c8203ef4037f3502\",\n \"7571d74ee5e0fb92a7a8b33a07783341a5492144cc54bcc40a94473693606437\"\n ],\n [\n \"3775ab7089bc6af823aba2e1af70b236d251cadb0c86743287522a1b3b0dedea\",\n \"be52d107bcfa09d8bcb9736a828cfa7fac8db17bf7a76a2c42ad961409018cf7\"\n ],\n [\n \"cee31cbf7e34ec379d94fb814d3d775ad954595d1314ba8846959e3e82f74e26\",\n \"8fd64a14c06b589c26b947ae2bcf6bfa0149ef0be14ed4d80f448a01c43b1c6d\"\n ],\n [\n \"b4f9eaea09b6917619f6ea6a4eb5464efddb58fd45b1ebefcdc1a01d08b47986\",\n \"39e5c9925b5a54b07433a4f18c61726f8bb131c012ca542eb24a8ac07200682a\"\n ],\n [\n \"d4263dfc3d2df923a0179a48966d30ce84e2515afc3dccc1b77907792ebcc60e\",\n \"62dfaf07a0f78feb30e30d6295853ce189e127760ad6cf7fae164e122a208d54\"\n ],\n [\n \"48457524820fa65a4f8d35eb6930857c0032acc0a4a2de422233eeda897612c4\",\n \"25a748ab367979d98733c38a1fa1c2e7dc6cc07db2d60a9ae7a76aaa49bd0f77\"\n ],\n [\n \"dfeeef1881101f2cb11644f3a2afdfc2045e19919152923f367a1767c11cceda\",\n \"ecfb7056cf1de042f9420bab396793c0c390bde74b4bbdff16a83ae09a9a7517\"\n ],\n [\n \"6d7ef6b17543f8373c573f44e1f389835d89bcbc6062ced36c82df83b8fae859\",\n \"cd450ec335438986dfefa10c57fea9bcc521a0959b2d80bbf74b190dca712d10\"\n ],\n [\n \"e75605d59102a5a2684500d3b991f2e3f3c88b93225547035af25af66e04541f\",\n \"f5c54754a8f71ee540b9b48728473e314f729ac5308b06938360990e2bfad125\"\n ],\n [\n \"eb98660f4c4dfaa06a2be453d5020bc99a0c2e60abe388457dd43fefb1ed620c\",\n \"6cb9a8876d9cb8520609af3add26cd20a0a7cd8a9411131ce85f44100099223e\"\n ],\n [\n \"13e87b027d8514d35939f2e6892b19922154596941888336dc3563e3b8dba942\",\n \"fef5a3c68059a6dec5d624114bf1e91aac2b9da568d6abeb2570d55646b8adf1\"\n ],\n [\n \"ee163026e9fd6fe017c38f06a5be6fc125424b371ce2708e7bf4491691e5764a\",\n \"1acb250f255dd61c43d94ccc670d0f58f49ae3fa15b96623e5430da0ad6c62b2\"\n ],\n [\n \"b268f5ef9ad51e4d78de3a750c2dc89b1e626d43505867999932e5db33af3d80\",\n \"5f310d4b3c99b9ebb19f77d41c1dee018cf0d34fd4191614003e945a1216e423\"\n ],\n [\n \"ff07f3118a9df035e9fad85eb6c7bfe42b02f01ca99ceea3bf7ffdba93c4750d\",\n \"438136d603e858a3a5c440c38eccbaddc1d2942114e2eddd4740d098ced1f0d8\"\n ],\n [\n \"8d8b9855c7c052a34146fd20ffb658bea4b9f69e0d825ebec16e8c3ce2b526a1\",\n \"cdb559eedc2d79f926baf44fb84ea4d44bcf50fee51d7ceb30e2e7f463036758\"\n ],\n [\n \"52db0b5384dfbf05bfa9d472d7ae26dfe4b851ceca91b1eba54263180da32b63\",\n \"c3b997d050ee5d423ebaf66a6db9f57b3180c902875679de924b69d84a7b375\"\n ],\n [\n \"e62f9490d3d51da6395efd24e80919cc7d0f29c3f3fa48c6fff543becbd43352\",\n \"6d89ad7ba4876b0b22c2ca280c682862f342c8591f1daf5170e07bfd9ccafa7d\"\n ],\n [\n \"7f30ea2476b399b4957509c88f77d0191afa2ff5cb7b14fd6d8e7d65aaab1193\",\n \"ca5ef7d4b231c94c3b15389a5f6311e9daff7bb67b103e9880ef4bff637acaec\"\n ],\n [\n \"5098ff1e1d9f14fb46a210fada6c903fef0fb7b4a1dd1d9ac60a0361800b7a00\",\n \"9731141d81fc8f8084d37c6e7542006b3ee1b40d60dfe5362a5b132fd17ddc0\"\n ],\n [\n \"32b78c7de9ee512a72895be6b9cbefa6e2f3c4ccce445c96b9f2c81e2778ad58\",\n \"ee1849f513df71e32efc3896ee28260c73bb80547ae2275ba497237794c8753c\"\n ],\n [\n \"e2cb74fddc8e9fbcd076eef2a7c72b0ce37d50f08269dfc074b581550547a4f7\",\n \"d3aa2ed71c9dd2247a62df062736eb0baddea9e36122d2be8641abcb005cc4a4\"\n ],\n [\n \"8438447566d4d7bedadc299496ab357426009a35f235cb141be0d99cd10ae3a8\",\n \"c4e1020916980a4da5d01ac5e6ad330734ef0d7906631c4f2390426b2edd791f\"\n ],\n [\n \"4162d488b89402039b584c6fc6c308870587d9c46f660b878ab65c82c711d67e\",\n \"67163e903236289f776f22c25fb8a3afc1732f2b84b4e95dbda47ae5a0852649\"\n ],\n [\n \"3fad3fa84caf0f34f0f89bfd2dcf54fc175d767aec3e50684f3ba4a4bf5f683d\",\n \"cd1bc7cb6cc407bb2f0ca647c718a730cf71872e7d0d2a53fa20efcdfe61826\"\n ],\n [\n \"674f2600a3007a00568c1a7ce05d0816c1fb84bf1370798f1c69532faeb1a86b\",\n \"299d21f9413f33b3edf43b257004580b70db57da0b182259e09eecc69e0d38a5\"\n ],\n [\n \"d32f4da54ade74abb81b815ad1fb3b263d82d6c692714bcff87d29bd5ee9f08f\",\n \"f9429e738b8e53b968e99016c059707782e14f4535359d582fc416910b3eea87\"\n ],\n [\n \"30e4e670435385556e593657135845d36fbb6931f72b08cb1ed954f1e3ce3ff6\",\n \"462f9bce619898638499350113bbc9b10a878d35da70740dc695a559eb88db7b\"\n ],\n [\n \"be2062003c51cc3004682904330e4dee7f3dcd10b01e580bf1971b04d4cad297\",\n \"62188bc49d61e5428573d48a74e1c655b1c61090905682a0d5558ed72dccb9bc\"\n ],\n [\n \"93144423ace3451ed29e0fb9ac2af211cb6e84a601df5993c419859fff5df04a\",\n \"7c10dfb164c3425f5c71a3f9d7992038f1065224f72bb9d1d902a6d13037b47c\"\n ],\n [\n \"b015f8044f5fcbdcf21ca26d6c34fb8197829205c7b7d2a7cb66418c157b112c\",\n \"ab8c1e086d04e813744a655b2df8d5f83b3cdc6faa3088c1d3aea1454e3a1d5f\"\n ],\n [\n \"d5e9e1da649d97d89e4868117a465a3a4f8a18de57a140d36b3f2af341a21b52\",\n \"4cb04437f391ed73111a13cc1d4dd0db1693465c2240480d8955e8592f27447a\"\n ],\n [\n \"d3ae41047dd7ca065dbf8ed77b992439983005cd72e16d6f996a5316d36966bb\",\n \"bd1aeb21ad22ebb22a10f0303417c6d964f8cdd7df0aca614b10dc14d125ac46\"\n ],\n [\n \"463e2763d885f958fc66cdd22800f0a487197d0a82e377b49f80af87c897b065\",\n \"bfefacdb0e5d0fd7df3a311a94de062b26b80c61fbc97508b79992671ef7ca7f\"\n ],\n [\n \"7985fdfd127c0567c6f53ec1bb63ec3158e597c40bfe747c83cddfc910641917\",\n \"603c12daf3d9862ef2b25fe1de289aed24ed291e0ec6708703a5bd567f32ed03\"\n ],\n [\n \"74a1ad6b5f76e39db2dd249410eac7f99e74c59cb83d2d0ed5ff1543da7703e9\",\n \"cc6157ef18c9c63cd6193d83631bbea0093e0968942e8c33d5737fd790e0db08\"\n ],\n [\n \"30682a50703375f602d416664ba19b7fc9bab42c72747463a71d0896b22f6da3\",\n \"553e04f6b018b4fa6c8f39e7f311d3176290d0e0f19ca73f17714d9977a22ff8\"\n ],\n [\n \"9e2158f0d7c0d5f26c3791efefa79597654e7a2b2464f52b1ee6c1347769ef57\",\n \"712fcdd1b9053f09003a3481fa7762e9ffd7c8ef35a38509e2fbf2629008373\"\n ],\n [\n \"176e26989a43c9cfeba4029c202538c28172e566e3c4fce7322857f3be327d66\",\n \"ed8cc9d04b29eb877d270b4878dc43c19aefd31f4eee09ee7b47834c1fa4b1c3\"\n ],\n [\n \"75d46efea3771e6e68abb89a13ad747ecf1892393dfc4f1b7004788c50374da8\",\n \"9852390a99507679fd0b86fd2b39a868d7efc22151346e1a3ca4726586a6bed8\"\n ],\n [\n \"809a20c67d64900ffb698c4c825f6d5f2310fb0451c869345b7319f645605721\",\n \"9e994980d9917e22b76b061927fa04143d096ccc54963e6a5ebfa5f3f8e286c1\"\n ],\n [\n \"1b38903a43f7f114ed4500b4eac7083fdefece1cf29c63528d563446f972c180\",\n \"4036edc931a60ae889353f77fd53de4a2708b26b6f5da72ad3394119daf408f9\"\n ]\n ]\n }\n };\n }\n });\n\n // ../../../node_modules/.pnpm/elliptic@6.6.1/node_modules/elliptic/lib/elliptic/curves.js\n var require_curves = __commonJS({\n \"../../../node_modules/.pnpm/elliptic@6.6.1/node_modules/elliptic/lib/elliptic/curves.js\"(exports3) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n var curves = exports3;\n var hash3 = require_hash();\n var curve = require_curve();\n var utils = require_utils3();\n var assert9 = utils.assert;\n function PresetCurve(options) {\n if (options.type === \"short\")\n this.curve = new curve.short(options);\n else if (options.type === \"edwards\")\n this.curve = new curve.edwards(options);\n else\n this.curve = new curve.mont(options);\n this.g = this.curve.g;\n this.n = this.curve.n;\n this.hash = options.hash;\n assert9(this.g.validate(), \"Invalid curve\");\n assert9(this.g.mul(this.n).isInfinity(), \"Invalid curve, G*N != O\");\n }\n curves.PresetCurve = PresetCurve;\n function defineCurve(name, options) {\n Object.defineProperty(curves, name, {\n configurable: true,\n enumerable: true,\n get: function() {\n var curve2 = new PresetCurve(options);\n Object.defineProperty(curves, name, {\n configurable: true,\n enumerable: true,\n value: curve2\n });\n return curve2;\n }\n });\n }\n defineCurve(\"p192\", {\n type: \"short\",\n prime: \"p192\",\n p: \"ffffffff ffffffff ffffffff fffffffe ffffffff ffffffff\",\n a: \"ffffffff ffffffff ffffffff fffffffe ffffffff fffffffc\",\n b: \"64210519 e59c80e7 0fa7e9ab 72243049 feb8deec c146b9b1\",\n n: \"ffffffff ffffffff ffffffff 99def836 146bc9b1 b4d22831\",\n hash: hash3.sha256,\n gRed: false,\n g: [\n \"188da80e b03090f6 7cbf20eb 43a18800 f4ff0afd 82ff1012\",\n \"07192b95 ffc8da78 631011ed 6b24cdd5 73f977a1 1e794811\"\n ]\n });\n defineCurve(\"p224\", {\n type: \"short\",\n prime: \"p224\",\n p: \"ffffffff ffffffff ffffffff ffffffff 00000000 00000000 00000001\",\n a: \"ffffffff ffffffff ffffffff fffffffe ffffffff ffffffff fffffffe\",\n b: \"b4050a85 0c04b3ab f5413256 5044b0b7 d7bfd8ba 270b3943 2355ffb4\",\n n: \"ffffffff ffffffff ffffffff ffff16a2 e0b8f03e 13dd2945 5c5c2a3d\",\n hash: hash3.sha256,\n gRed: false,\n g: [\n \"b70e0cbd 6bb4bf7f 321390b9 4a03c1d3 56c21122 343280d6 115c1d21\",\n \"bd376388 b5f723fb 4c22dfe6 cd4375a0 5a074764 44d58199 85007e34\"\n ]\n });\n defineCurve(\"p256\", {\n type: \"short\",\n prime: null,\n p: \"ffffffff 00000001 00000000 00000000 00000000 ffffffff ffffffff ffffffff\",\n a: \"ffffffff 00000001 00000000 00000000 00000000 ffffffff ffffffff fffffffc\",\n b: \"5ac635d8 aa3a93e7 b3ebbd55 769886bc 651d06b0 cc53b0f6 3bce3c3e 27d2604b\",\n n: \"ffffffff 00000000 ffffffff ffffffff bce6faad a7179e84 f3b9cac2 fc632551\",\n hash: hash3.sha256,\n gRed: false,\n g: [\n \"6b17d1f2 e12c4247 f8bce6e5 63a440f2 77037d81 2deb33a0 f4a13945 d898c296\",\n \"4fe342e2 fe1a7f9b 8ee7eb4a 7c0f9e16 2bce3357 6b315ece cbb64068 37bf51f5\"\n ]\n });\n defineCurve(\"p384\", {\n type: \"short\",\n prime: null,\n p: \"ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe ffffffff 00000000 00000000 ffffffff\",\n a: \"ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe ffffffff 00000000 00000000 fffffffc\",\n b: \"b3312fa7 e23ee7e4 988e056b e3f82d19 181d9c6e fe814112 0314088f 5013875a c656398d 8a2ed19d 2a85c8ed d3ec2aef\",\n n: \"ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff c7634d81 f4372ddf 581a0db2 48b0a77a ecec196a ccc52973\",\n hash: hash3.sha384,\n gRed: false,\n g: [\n \"aa87ca22 be8b0537 8eb1c71e f320ad74 6e1d3b62 8ba79b98 59f741e0 82542a38 5502f25d bf55296c 3a545e38 72760ab7\",\n \"3617de4a 96262c6f 5d9e98bf 9292dc29 f8f41dbd 289a147c e9da3113 b5f0b8c0 0a60b1ce 1d7e819d 7a431d7c 90ea0e5f\"\n ]\n });\n defineCurve(\"p521\", {\n type: \"short\",\n prime: null,\n p: \"000001ff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff\",\n a: \"000001ff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffc\",\n b: \"00000051 953eb961 8e1c9a1f 929a21a0 b68540ee a2da725b 99b315f3 b8b48991 8ef109e1 56193951 ec7e937b 1652c0bd 3bb1bf07 3573df88 3d2c34f1 ef451fd4 6b503f00\",\n n: \"000001ff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffa 51868783 bf2f966b 7fcc0148 f709a5d0 3bb5c9b8 899c47ae bb6fb71e 91386409\",\n hash: hash3.sha512,\n gRed: false,\n g: [\n \"000000c6 858e06b7 0404e9cd 9e3ecb66 2395b442 9c648139 053fb521 f828af60 6b4d3dba a14b5e77 efe75928 fe1dc127 a2ffa8de 3348b3c1 856a429b f97e7e31 c2e5bd66\",\n \"00000118 39296a78 9a3bc004 5c8a5fb4 2c7d1bd9 98f54449 579b4468 17afbd17 273e662c 97ee7299 5ef42640 c550b901 3fad0761 353c7086 a272c240 88be9476 9fd16650\"\n ]\n });\n defineCurve(\"curve25519\", {\n type: \"mont\",\n prime: \"p25519\",\n p: \"7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed\",\n a: \"76d06\",\n b: \"1\",\n n: \"1000000000000000 0000000000000000 14def9dea2f79cd6 5812631a5cf5d3ed\",\n hash: hash3.sha256,\n gRed: false,\n g: [\n \"9\"\n ]\n });\n defineCurve(\"ed25519\", {\n type: \"edwards\",\n prime: \"p25519\",\n p: \"7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed\",\n a: \"-1\",\n c: \"1\",\n // -121665 * (121666^(-1)) (mod P)\n d: \"52036cee2b6ffe73 8cc740797779e898 00700a4d4141d8ab 75eb4dca135978a3\",\n n: \"1000000000000000 0000000000000000 14def9dea2f79cd6 5812631a5cf5d3ed\",\n hash: hash3.sha256,\n gRed: false,\n g: [\n \"216936d3cd6e53fec0a4e231fdd6dc5c692cc7609525a7b2c9562d608f25d51a\",\n // 4/5\n \"6666666666666666666666666666666666666666666666666666666666666658\"\n ]\n });\n var pre;\n try {\n pre = require_secp256k1();\n } catch (e3) {\n pre = void 0;\n }\n defineCurve(\"secp256k1\", {\n type: \"short\",\n prime: \"k256\",\n p: \"ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe fffffc2f\",\n a: \"0\",\n b: \"7\",\n n: \"ffffffff ffffffff ffffffff fffffffe baaedce6 af48a03b bfd25e8c d0364141\",\n h: \"1\",\n hash: hash3.sha256,\n // Precomputed endomorphism\n beta: \"7ae96a2b657c07106e64479eac3434e99cf0497512f58995c1396c28719501ee\",\n lambda: \"5363ad4cc05c30e0a5261c028812645a122e22ea20816678df02967c1b23bd72\",\n basis: [\n {\n a: \"3086d221a7d46bcde86c90e49284eb15\",\n b: \"-e4437ed6010e88286f547fa90abfe4c3\"\n },\n {\n a: \"114ca50f7a8e2f3f657c1108d9d44cfd8\",\n b: \"3086d221a7d46bcde86c90e49284eb15\"\n }\n ],\n gRed: false,\n g: [\n \"79be667ef9dcbbac55a06295ce870b07029bfcdb2dce28d959f2815b16f81798\",\n \"483ada7726a3c4655da4fbfc0e1108a8fd17b448a68554199c47d08ffb10d4b8\",\n pre\n ]\n });\n }\n });\n\n // ../../../node_modules/.pnpm/hmac-drbg@1.0.1/node_modules/hmac-drbg/lib/hmac-drbg.js\n var require_hmac_drbg = __commonJS({\n \"../../../node_modules/.pnpm/hmac-drbg@1.0.1/node_modules/hmac-drbg/lib/hmac-drbg.js\"(exports3, module) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n var hash3 = require_hash();\n var utils = require_utils2();\n var assert9 = require_minimalistic_assert();\n function HmacDRBG(options) {\n if (!(this instanceof HmacDRBG))\n return new HmacDRBG(options);\n this.hash = options.hash;\n this.predResist = !!options.predResist;\n this.outLen = this.hash.outSize;\n this.minEntropy = options.minEntropy || this.hash.hmacStrength;\n this._reseed = null;\n this.reseedInterval = null;\n this.K = null;\n this.V = null;\n var entropy = utils.toArray(options.entropy, options.entropyEnc || \"hex\");\n var nonce = utils.toArray(options.nonce, options.nonceEnc || \"hex\");\n var pers = utils.toArray(options.pers, options.persEnc || \"hex\");\n assert9(\n entropy.length >= this.minEntropy / 8,\n \"Not enough entropy. Minimum is: \" + this.minEntropy + \" bits\"\n );\n this._init(entropy, nonce, pers);\n }\n module.exports = HmacDRBG;\n HmacDRBG.prototype._init = function init(entropy, nonce, pers) {\n var seed = entropy.concat(nonce).concat(pers);\n this.K = new Array(this.outLen / 8);\n this.V = new Array(this.outLen / 8);\n for (var i3 = 0; i3 < this.V.length; i3++) {\n this.K[i3] = 0;\n this.V[i3] = 1;\n }\n this._update(seed);\n this._reseed = 1;\n this.reseedInterval = 281474976710656;\n };\n HmacDRBG.prototype._hmac = function hmac2() {\n return new hash3.hmac(this.hash, this.K);\n };\n HmacDRBG.prototype._update = function update(seed) {\n var kmac = this._hmac().update(this.V).update([0]);\n if (seed)\n kmac = kmac.update(seed);\n this.K = kmac.digest();\n this.V = this._hmac().update(this.V).digest();\n if (!seed)\n return;\n this.K = this._hmac().update(this.V).update([1]).update(seed).digest();\n this.V = this._hmac().update(this.V).digest();\n };\n HmacDRBG.prototype.reseed = function reseed(entropy, entropyEnc, add2, addEnc) {\n if (typeof entropyEnc !== \"string\") {\n addEnc = add2;\n add2 = entropyEnc;\n entropyEnc = null;\n }\n entropy = utils.toArray(entropy, entropyEnc);\n add2 = utils.toArray(add2, addEnc);\n assert9(\n entropy.length >= this.minEntropy / 8,\n \"Not enough entropy. Minimum is: \" + this.minEntropy + \" bits\"\n );\n this._update(entropy.concat(add2 || []));\n this._reseed = 1;\n };\n HmacDRBG.prototype.generate = function generate(len, enc, add2, addEnc) {\n if (this._reseed > this.reseedInterval)\n throw new Error(\"Reseed is required\");\n if (typeof enc !== \"string\") {\n addEnc = add2;\n add2 = enc;\n enc = null;\n }\n if (add2) {\n add2 = utils.toArray(add2, addEnc || \"hex\");\n this._update(add2);\n }\n var temp = [];\n while (temp.length < len) {\n this.V = this._hmac().update(this.V).digest();\n temp = temp.concat(this.V);\n }\n var res = temp.slice(0, len);\n this._update(add2);\n this._reseed++;\n return utils.encode(res, enc);\n };\n }\n });\n\n // ../../../node_modules/.pnpm/elliptic@6.6.1/node_modules/elliptic/lib/elliptic/ec/key.js\n var require_key = __commonJS({\n \"../../../node_modules/.pnpm/elliptic@6.6.1/node_modules/elliptic/lib/elliptic/ec/key.js\"(exports3, module) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n var BN = require_bn2();\n var utils = require_utils3();\n var assert9 = utils.assert;\n function KeyPair(ec, options) {\n this.ec = ec;\n this.priv = null;\n this.pub = null;\n if (options.priv)\n this._importPrivate(options.priv, options.privEnc);\n if (options.pub)\n this._importPublic(options.pub, options.pubEnc);\n }\n module.exports = KeyPair;\n KeyPair.fromPublic = function fromPublic(ec, pub, enc) {\n if (pub instanceof KeyPair)\n return pub;\n return new KeyPair(ec, {\n pub,\n pubEnc: enc\n });\n };\n KeyPair.fromPrivate = function fromPrivate(ec, priv, enc) {\n if (priv instanceof KeyPair)\n return priv;\n return new KeyPair(ec, {\n priv,\n privEnc: enc\n });\n };\n KeyPair.prototype.validate = function validate6() {\n var pub = this.getPublic();\n if (pub.isInfinity())\n return { result: false, reason: \"Invalid public key\" };\n if (!pub.validate())\n return { result: false, reason: \"Public key is not a point\" };\n if (!pub.mul(this.ec.curve.n).isInfinity())\n return { result: false, reason: \"Public key * N != O\" };\n return { result: true, reason: null };\n };\n KeyPair.prototype.getPublic = function getPublic(compact, enc) {\n if (typeof compact === \"string\") {\n enc = compact;\n compact = null;\n }\n if (!this.pub)\n this.pub = this.ec.g.mul(this.priv);\n if (!enc)\n return this.pub;\n return this.pub.encode(enc, compact);\n };\n KeyPair.prototype.getPrivate = function getPrivate(enc) {\n if (enc === \"hex\")\n return this.priv.toString(16, 2);\n else\n return this.priv;\n };\n KeyPair.prototype._importPrivate = function _importPrivate(key, enc) {\n this.priv = new BN(key, enc || 16);\n this.priv = this.priv.umod(this.ec.curve.n);\n };\n KeyPair.prototype._importPublic = function _importPublic(key, enc) {\n if (key.x || key.y) {\n if (this.ec.curve.type === \"mont\") {\n assert9(key.x, \"Need x coordinate\");\n } else if (this.ec.curve.type === \"short\" || this.ec.curve.type === \"edwards\") {\n assert9(key.x && key.y, \"Need both x and y coordinate\");\n }\n this.pub = this.ec.curve.point(key.x, key.y);\n return;\n }\n this.pub = this.ec.curve.decodePoint(key, enc);\n };\n KeyPair.prototype.derive = function derive(pub) {\n if (!pub.validate()) {\n assert9(pub.validate(), \"public point not validated\");\n }\n return pub.mul(this.priv).getX();\n };\n KeyPair.prototype.sign = function sign3(msg, enc, options) {\n return this.ec.sign(msg, this, enc, options);\n };\n KeyPair.prototype.verify = function verify(msg, signature, options) {\n return this.ec.verify(msg, signature, this, void 0, options);\n };\n KeyPair.prototype.inspect = function inspect() {\n return \"\";\n };\n }\n });\n\n // ../../../node_modules/.pnpm/elliptic@6.6.1/node_modules/elliptic/lib/elliptic/ec/signature.js\n var require_signature = __commonJS({\n \"../../../node_modules/.pnpm/elliptic@6.6.1/node_modules/elliptic/lib/elliptic/ec/signature.js\"(exports3, module) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n var BN = require_bn2();\n var utils = require_utils3();\n var assert9 = utils.assert;\n function Signature2(options, enc) {\n if (options instanceof Signature2)\n return options;\n if (this._importDER(options, enc))\n return;\n assert9(options.r && options.s, \"Signature without r or s\");\n this.r = new BN(options.r, 16);\n this.s = new BN(options.s, 16);\n if (options.recoveryParam === void 0)\n this.recoveryParam = null;\n else\n this.recoveryParam = options.recoveryParam;\n }\n module.exports = Signature2;\n function Position() {\n this.place = 0;\n }\n function getLength(buf, p4) {\n var initial = buf[p4.place++];\n if (!(initial & 128)) {\n return initial;\n }\n var octetLen = initial & 15;\n if (octetLen === 0 || octetLen > 4) {\n return false;\n }\n if (buf[p4.place] === 0) {\n return false;\n }\n var val = 0;\n for (var i3 = 0, off2 = p4.place; i3 < octetLen; i3++, off2++) {\n val <<= 8;\n val |= buf[off2];\n val >>>= 0;\n }\n if (val <= 127) {\n return false;\n }\n p4.place = off2;\n return val;\n }\n function rmPadding(buf) {\n var i3 = 0;\n var len = buf.length - 1;\n while (!buf[i3] && !(buf[i3 + 1] & 128) && i3 < len) {\n i3++;\n }\n if (i3 === 0) {\n return buf;\n }\n return buf.slice(i3);\n }\n Signature2.prototype._importDER = function _importDER(data, enc) {\n data = utils.toArray(data, enc);\n var p4 = new Position();\n if (data[p4.place++] !== 48) {\n return false;\n }\n var len = getLength(data, p4);\n if (len === false) {\n return false;\n }\n if (len + p4.place !== data.length) {\n return false;\n }\n if (data[p4.place++] !== 2) {\n return false;\n }\n var rlen = getLength(data, p4);\n if (rlen === false) {\n return false;\n }\n if ((data[p4.place] & 128) !== 0) {\n return false;\n }\n var r2 = data.slice(p4.place, rlen + p4.place);\n p4.place += rlen;\n if (data[p4.place++] !== 2) {\n return false;\n }\n var slen = getLength(data, p4);\n if (slen === false) {\n return false;\n }\n if (data.length !== slen + p4.place) {\n return false;\n }\n if ((data[p4.place] & 128) !== 0) {\n return false;\n }\n var s4 = data.slice(p4.place, slen + p4.place);\n if (r2[0] === 0) {\n if (r2[1] & 128) {\n r2 = r2.slice(1);\n } else {\n return false;\n }\n }\n if (s4[0] === 0) {\n if (s4[1] & 128) {\n s4 = s4.slice(1);\n } else {\n return false;\n }\n }\n this.r = new BN(r2);\n this.s = new BN(s4);\n this.recoveryParam = null;\n return true;\n };\n function constructLength(arr, len) {\n if (len < 128) {\n arr.push(len);\n return;\n }\n var octets = 1 + (Math.log(len) / Math.LN2 >>> 3);\n arr.push(octets | 128);\n while (--octets) {\n arr.push(len >>> (octets << 3) & 255);\n }\n arr.push(len);\n }\n Signature2.prototype.toDER = function toDER(enc) {\n var r2 = this.r.toArray();\n var s4 = this.s.toArray();\n if (r2[0] & 128)\n r2 = [0].concat(r2);\n if (s4[0] & 128)\n s4 = [0].concat(s4);\n r2 = rmPadding(r2);\n s4 = rmPadding(s4);\n while (!s4[0] && !(s4[1] & 128)) {\n s4 = s4.slice(1);\n }\n var arr = [2];\n constructLength(arr, r2.length);\n arr = arr.concat(r2);\n arr.push(2);\n constructLength(arr, s4.length);\n var backHalf = arr.concat(s4);\n var res = [48];\n constructLength(res, backHalf.length);\n res = res.concat(backHalf);\n return utils.encode(res, enc);\n };\n }\n });\n\n // ../../../node_modules/.pnpm/elliptic@6.6.1/node_modules/elliptic/lib/elliptic/ec/index.js\n var require_ec = __commonJS({\n \"../../../node_modules/.pnpm/elliptic@6.6.1/node_modules/elliptic/lib/elliptic/ec/index.js\"(exports3, module) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n var BN = require_bn2();\n var HmacDRBG = require_hmac_drbg();\n var utils = require_utils3();\n var curves = require_curves();\n var rand = require_brorand();\n var assert9 = utils.assert;\n var KeyPair = require_key();\n var Signature2 = require_signature();\n function EC(options) {\n if (!(this instanceof EC))\n return new EC(options);\n if (typeof options === \"string\") {\n assert9(\n Object.prototype.hasOwnProperty.call(curves, options),\n \"Unknown curve \" + options\n );\n options = curves[options];\n }\n if (options instanceof curves.PresetCurve)\n options = { curve: options };\n this.curve = options.curve.curve;\n this.n = this.curve.n;\n this.nh = this.n.ushrn(1);\n this.g = this.curve.g;\n this.g = options.curve.g;\n this.g.precompute(options.curve.n.bitLength() + 1);\n this.hash = options.hash || options.curve.hash;\n }\n module.exports = EC;\n EC.prototype.keyPair = function keyPair(options) {\n return new KeyPair(this, options);\n };\n EC.prototype.keyFromPrivate = function keyFromPrivate(priv, enc) {\n return KeyPair.fromPrivate(this, priv, enc);\n };\n EC.prototype.keyFromPublic = function keyFromPublic(pub, enc) {\n return KeyPair.fromPublic(this, pub, enc);\n };\n EC.prototype.genKeyPair = function genKeyPair(options) {\n if (!options)\n options = {};\n var drbg = new HmacDRBG({\n hash: this.hash,\n pers: options.pers,\n persEnc: options.persEnc || \"utf8\",\n entropy: options.entropy || rand(this.hash.hmacStrength),\n entropyEnc: options.entropy && options.entropyEnc || \"utf8\",\n nonce: this.n.toArray()\n });\n var bytes = this.n.byteLength();\n var ns2 = this.n.sub(new BN(2));\n for (; ; ) {\n var priv = new BN(drbg.generate(bytes));\n if (priv.cmp(ns2) > 0)\n continue;\n priv.iaddn(1);\n return this.keyFromPrivate(priv);\n }\n };\n EC.prototype._truncateToN = function _truncateToN(msg, truncOnly, bitLength) {\n var byteLength;\n if (BN.isBN(msg) || typeof msg === \"number\") {\n msg = new BN(msg, 16);\n byteLength = msg.byteLength();\n } else if (typeof msg === \"object\") {\n byteLength = msg.length;\n msg = new BN(msg, 16);\n } else {\n var str = msg.toString();\n byteLength = str.length + 1 >>> 1;\n msg = new BN(str, 16);\n }\n if (typeof bitLength !== \"number\") {\n bitLength = byteLength * 8;\n }\n var delta = bitLength - this.n.bitLength();\n if (delta > 0)\n msg = msg.ushrn(delta);\n if (!truncOnly && msg.cmp(this.n) >= 0)\n return msg.sub(this.n);\n else\n return msg;\n };\n EC.prototype.sign = function sign3(msg, key, enc, options) {\n if (typeof enc === \"object\") {\n options = enc;\n enc = null;\n }\n if (!options)\n options = {};\n if (typeof msg !== \"string\" && typeof msg !== \"number\" && !BN.isBN(msg)) {\n assert9(\n typeof msg === \"object\" && msg && typeof msg.length === \"number\",\n \"Expected message to be an array-like, a hex string, or a BN instance\"\n );\n assert9(msg.length >>> 0 === msg.length);\n for (var i3 = 0; i3 < msg.length; i3++)\n assert9((msg[i3] & 255) === msg[i3]);\n }\n key = this.keyFromPrivate(key, enc);\n msg = this._truncateToN(msg, false, options.msgBitLength);\n assert9(!msg.isNeg(), \"Can not sign a negative message\");\n var bytes = this.n.byteLength();\n var bkey = key.getPrivate().toArray(\"be\", bytes);\n var nonce = msg.toArray(\"be\", bytes);\n assert9(new BN(nonce).eq(msg), \"Can not sign message\");\n var drbg = new HmacDRBG({\n hash: this.hash,\n entropy: bkey,\n nonce,\n pers: options.pers,\n persEnc: options.persEnc || \"utf8\"\n });\n var ns1 = this.n.sub(new BN(1));\n for (var iter = 0; ; iter++) {\n var k4 = options.k ? options.k(iter) : new BN(drbg.generate(this.n.byteLength()));\n k4 = this._truncateToN(k4, true);\n if (k4.cmpn(1) <= 0 || k4.cmp(ns1) >= 0)\n continue;\n var kp = this.g.mul(k4);\n if (kp.isInfinity())\n continue;\n var kpX = kp.getX();\n var r2 = kpX.umod(this.n);\n if (r2.cmpn(0) === 0)\n continue;\n var s4 = k4.invm(this.n).mul(r2.mul(key.getPrivate()).iadd(msg));\n s4 = s4.umod(this.n);\n if (s4.cmpn(0) === 0)\n continue;\n var recoveryParam = (kp.getY().isOdd() ? 1 : 0) | (kpX.cmp(r2) !== 0 ? 2 : 0);\n if (options.canonical && s4.cmp(this.nh) > 0) {\n s4 = this.n.sub(s4);\n recoveryParam ^= 1;\n }\n return new Signature2({ r: r2, s: s4, recoveryParam });\n }\n };\n EC.prototype.verify = function verify(msg, signature, key, enc, options) {\n if (!options)\n options = {};\n msg = this._truncateToN(msg, false, options.msgBitLength);\n key = this.keyFromPublic(key, enc);\n signature = new Signature2(signature, \"hex\");\n var r2 = signature.r;\n var s4 = signature.s;\n if (r2.cmpn(1) < 0 || r2.cmp(this.n) >= 0)\n return false;\n if (s4.cmpn(1) < 0 || s4.cmp(this.n) >= 0)\n return false;\n var sinv = s4.invm(this.n);\n var u1 = sinv.mul(msg).umod(this.n);\n var u2 = sinv.mul(r2).umod(this.n);\n var p4;\n if (!this.curve._maxwellTrick) {\n p4 = this.g.mulAdd(u1, key.getPublic(), u2);\n if (p4.isInfinity())\n return false;\n return p4.getX().umod(this.n).cmp(r2) === 0;\n }\n p4 = this.g.jmulAdd(u1, key.getPublic(), u2);\n if (p4.isInfinity())\n return false;\n return p4.eqXToP(r2);\n };\n EC.prototype.recoverPubKey = function(msg, signature, j2, enc) {\n assert9((3 & j2) === j2, \"The recovery param is more than two bits\");\n signature = new Signature2(signature, enc);\n var n2 = this.n;\n var e3 = new BN(msg);\n var r2 = signature.r;\n var s4 = signature.s;\n var isYOdd = j2 & 1;\n var isSecondKey = j2 >> 1;\n if (r2.cmp(this.curve.p.umod(this.curve.n)) >= 0 && isSecondKey)\n throw new Error(\"Unable to find sencond key candinate\");\n if (isSecondKey)\n r2 = this.curve.pointFromX(r2.add(this.curve.n), isYOdd);\n else\n r2 = this.curve.pointFromX(r2, isYOdd);\n var rInv = signature.r.invm(n2);\n var s1 = n2.sub(e3).mul(rInv).umod(n2);\n var s22 = s4.mul(rInv).umod(n2);\n return this.g.mulAdd(s1, r2, s22);\n };\n EC.prototype.getKeyRecoveryParam = function(e3, signature, Q2, enc) {\n signature = new Signature2(signature, enc);\n if (signature.recoveryParam !== null)\n return signature.recoveryParam;\n for (var i3 = 0; i3 < 4; i3++) {\n var Qprime;\n try {\n Qprime = this.recoverPubKey(e3, signature, i3);\n } catch (e4) {\n continue;\n }\n if (Qprime.eq(Q2))\n return i3;\n }\n throw new Error(\"Unable to find valid recovery factor\");\n };\n }\n });\n\n // ../../../node_modules/.pnpm/elliptic@6.6.1/node_modules/elliptic/lib/elliptic/eddsa/key.js\n var require_key2 = __commonJS({\n \"../../../node_modules/.pnpm/elliptic@6.6.1/node_modules/elliptic/lib/elliptic/eddsa/key.js\"(exports3, module) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n var utils = require_utils3();\n var assert9 = utils.assert;\n var parseBytes = utils.parseBytes;\n var cachedProperty = utils.cachedProperty;\n function KeyPair(eddsa, params) {\n this.eddsa = eddsa;\n this._secret = parseBytes(params.secret);\n if (eddsa.isPoint(params.pub))\n this._pub = params.pub;\n else\n this._pubBytes = parseBytes(params.pub);\n }\n KeyPair.fromPublic = function fromPublic(eddsa, pub) {\n if (pub instanceof KeyPair)\n return pub;\n return new KeyPair(eddsa, { pub });\n };\n KeyPair.fromSecret = function fromSecret(eddsa, secret) {\n if (secret instanceof KeyPair)\n return secret;\n return new KeyPair(eddsa, { secret });\n };\n KeyPair.prototype.secret = function secret() {\n return this._secret;\n };\n cachedProperty(KeyPair, \"pubBytes\", function pubBytes() {\n return this.eddsa.encodePoint(this.pub());\n });\n cachedProperty(KeyPair, \"pub\", function pub() {\n if (this._pubBytes)\n return this.eddsa.decodePoint(this._pubBytes);\n return this.eddsa.g.mul(this.priv());\n });\n cachedProperty(KeyPair, \"privBytes\", function privBytes() {\n var eddsa = this.eddsa;\n var hash3 = this.hash();\n var lastIx = eddsa.encodingLength - 1;\n var a3 = hash3.slice(0, eddsa.encodingLength);\n a3[0] &= 248;\n a3[lastIx] &= 127;\n a3[lastIx] |= 64;\n return a3;\n });\n cachedProperty(KeyPair, \"priv\", function priv() {\n return this.eddsa.decodeInt(this.privBytes());\n });\n cachedProperty(KeyPair, \"hash\", function hash3() {\n return this.eddsa.hash().update(this.secret()).digest();\n });\n cachedProperty(KeyPair, \"messagePrefix\", function messagePrefix() {\n return this.hash().slice(this.eddsa.encodingLength);\n });\n KeyPair.prototype.sign = function sign3(message) {\n assert9(this._secret, \"KeyPair can only verify\");\n return this.eddsa.sign(message, this);\n };\n KeyPair.prototype.verify = function verify(message, sig) {\n return this.eddsa.verify(message, sig, this);\n };\n KeyPair.prototype.getSecret = function getSecret(enc) {\n assert9(this._secret, \"KeyPair is public only\");\n return utils.encode(this.secret(), enc);\n };\n KeyPair.prototype.getPublic = function getPublic(enc) {\n return utils.encode(this.pubBytes(), enc);\n };\n module.exports = KeyPair;\n }\n });\n\n // ../../../node_modules/.pnpm/elliptic@6.6.1/node_modules/elliptic/lib/elliptic/eddsa/signature.js\n var require_signature2 = __commonJS({\n \"../../../node_modules/.pnpm/elliptic@6.6.1/node_modules/elliptic/lib/elliptic/eddsa/signature.js\"(exports3, module) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n var BN = require_bn2();\n var utils = require_utils3();\n var assert9 = utils.assert;\n var cachedProperty = utils.cachedProperty;\n var parseBytes = utils.parseBytes;\n function Signature2(eddsa, sig) {\n this.eddsa = eddsa;\n if (typeof sig !== \"object\")\n sig = parseBytes(sig);\n if (Array.isArray(sig)) {\n assert9(sig.length === eddsa.encodingLength * 2, \"Signature has invalid size\");\n sig = {\n R: sig.slice(0, eddsa.encodingLength),\n S: sig.slice(eddsa.encodingLength)\n };\n }\n assert9(sig.R && sig.S, \"Signature without R or S\");\n if (eddsa.isPoint(sig.R))\n this._R = sig.R;\n if (sig.S instanceof BN)\n this._S = sig.S;\n this._Rencoded = Array.isArray(sig.R) ? sig.R : sig.Rencoded;\n this._Sencoded = Array.isArray(sig.S) ? sig.S : sig.Sencoded;\n }\n cachedProperty(Signature2, \"S\", function S3() {\n return this.eddsa.decodeInt(this.Sencoded());\n });\n cachedProperty(Signature2, \"R\", function R3() {\n return this.eddsa.decodePoint(this.Rencoded());\n });\n cachedProperty(Signature2, \"Rencoded\", function Rencoded() {\n return this.eddsa.encodePoint(this.R());\n });\n cachedProperty(Signature2, \"Sencoded\", function Sencoded() {\n return this.eddsa.encodeInt(this.S());\n });\n Signature2.prototype.toBytes = function toBytes5() {\n return this.Rencoded().concat(this.Sencoded());\n };\n Signature2.prototype.toHex = function toHex3() {\n return utils.encode(this.toBytes(), \"hex\").toUpperCase();\n };\n module.exports = Signature2;\n }\n });\n\n // ../../../node_modules/.pnpm/elliptic@6.6.1/node_modules/elliptic/lib/elliptic/eddsa/index.js\n var require_eddsa = __commonJS({\n \"../../../node_modules/.pnpm/elliptic@6.6.1/node_modules/elliptic/lib/elliptic/eddsa/index.js\"(exports3, module) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n var hash3 = require_hash();\n var curves = require_curves();\n var utils = require_utils3();\n var assert9 = utils.assert;\n var parseBytes = utils.parseBytes;\n var KeyPair = require_key2();\n var Signature2 = require_signature2();\n function EDDSA(curve) {\n assert9(curve === \"ed25519\", \"only tested with ed25519 so far\");\n if (!(this instanceof EDDSA))\n return new EDDSA(curve);\n curve = curves[curve].curve;\n this.curve = curve;\n this.g = curve.g;\n this.g.precompute(curve.n.bitLength() + 1);\n this.pointClass = curve.point().constructor;\n this.encodingLength = Math.ceil(curve.n.bitLength() / 8);\n this.hash = hash3.sha512;\n }\n module.exports = EDDSA;\n EDDSA.prototype.sign = function sign3(message, secret) {\n message = parseBytes(message);\n var key = this.keyFromSecret(secret);\n var r2 = this.hashInt(key.messagePrefix(), message);\n var R3 = this.g.mul(r2);\n var Rencoded = this.encodePoint(R3);\n var s_ = this.hashInt(Rencoded, key.pubBytes(), message).mul(key.priv());\n var S3 = r2.add(s_).umod(this.curve.n);\n return this.makeSignature({ R: R3, S: S3, Rencoded });\n };\n EDDSA.prototype.verify = function verify(message, sig, pub) {\n message = parseBytes(message);\n sig = this.makeSignature(sig);\n if (sig.S().gte(sig.eddsa.curve.n) || sig.S().isNeg()) {\n return false;\n }\n var key = this.keyFromPublic(pub);\n var h4 = this.hashInt(sig.Rencoded(), key.pubBytes(), message);\n var SG = this.g.mul(sig.S());\n var RplusAh = sig.R().add(key.pub().mul(h4));\n return RplusAh.eq(SG);\n };\n EDDSA.prototype.hashInt = function hashInt() {\n var hash4 = this.hash();\n for (var i3 = 0; i3 < arguments.length; i3++)\n hash4.update(arguments[i3]);\n return utils.intFromLE(hash4.digest()).umod(this.curve.n);\n };\n EDDSA.prototype.keyFromPublic = function keyFromPublic(pub) {\n return KeyPair.fromPublic(this, pub);\n };\n EDDSA.prototype.keyFromSecret = function keyFromSecret(secret) {\n return KeyPair.fromSecret(this, secret);\n };\n EDDSA.prototype.makeSignature = function makeSignature(sig) {\n if (sig instanceof Signature2)\n return sig;\n return new Signature2(this, sig);\n };\n EDDSA.prototype.encodePoint = function encodePoint(point) {\n var enc = point.getY().toArray(\"le\", this.encodingLength);\n enc[this.encodingLength - 1] |= point.getX().isOdd() ? 128 : 0;\n return enc;\n };\n EDDSA.prototype.decodePoint = function decodePoint(bytes) {\n bytes = utils.parseBytes(bytes);\n var lastIx = bytes.length - 1;\n var normed = bytes.slice(0, lastIx).concat(bytes[lastIx] & ~128);\n var xIsOdd = (bytes[lastIx] & 128) !== 0;\n var y6 = utils.intFromLE(normed);\n return this.curve.pointFromY(y6, xIsOdd);\n };\n EDDSA.prototype.encodeInt = function encodeInt(num2) {\n return num2.toArray(\"le\", this.encodingLength);\n };\n EDDSA.prototype.decodeInt = function decodeInt(bytes) {\n return utils.intFromLE(bytes);\n };\n EDDSA.prototype.isPoint = function isPoint(val) {\n return val instanceof this.pointClass;\n };\n }\n });\n\n // ../../../node_modules/.pnpm/elliptic@6.6.1/node_modules/elliptic/lib/elliptic.js\n var require_elliptic = __commonJS({\n \"../../../node_modules/.pnpm/elliptic@6.6.1/node_modules/elliptic/lib/elliptic.js\"(exports3) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n var elliptic = exports3;\n elliptic.version = require_package().version;\n elliptic.utils = require_utils3();\n elliptic.rand = require_brorand();\n elliptic.curve = require_curve();\n elliptic.curves = require_curves();\n elliptic.ec = require_ec();\n elliptic.eddsa = require_eddsa();\n }\n });\n\n // ../../../node_modules/.pnpm/@ethersproject+signing-key@5.8.0/node_modules/@ethersproject/signing-key/lib/elliptic.js\n var require_elliptic2 = __commonJS({\n \"../../../node_modules/.pnpm/@ethersproject+signing-key@5.8.0/node_modules/@ethersproject/signing-key/lib/elliptic.js\"(exports3) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n var __importDefault3 = exports3 && exports3.__importDefault || function(mod3) {\n return mod3 && mod3.__esModule ? mod3 : { \"default\": mod3 };\n };\n Object.defineProperty(exports3, \"__esModule\", { value: true });\n exports3.EC = void 0;\n var elliptic_1 = __importDefault3(require_elliptic());\n var EC = elliptic_1.default.ec;\n exports3.EC = EC;\n }\n });\n\n // ../../../node_modules/.pnpm/@ethersproject+signing-key@5.8.0/node_modules/@ethersproject/signing-key/lib/_version.js\n var require_version12 = __commonJS({\n \"../../../node_modules/.pnpm/@ethersproject+signing-key@5.8.0/node_modules/@ethersproject/signing-key/lib/_version.js\"(exports3) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n Object.defineProperty(exports3, \"__esModule\", { value: true });\n exports3.version = void 0;\n exports3.version = \"signing-key/5.8.0\";\n }\n });\n\n // ../../../node_modules/.pnpm/@ethersproject+signing-key@5.8.0/node_modules/@ethersproject/signing-key/lib/index.js\n var require_lib16 = __commonJS({\n \"../../../node_modules/.pnpm/@ethersproject+signing-key@5.8.0/node_modules/@ethersproject/signing-key/lib/index.js\"(exports3) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n Object.defineProperty(exports3, \"__esModule\", { value: true });\n exports3.computePublicKey = exports3.recoverPublicKey = exports3.SigningKey = void 0;\n var elliptic_1 = require_elliptic2();\n var bytes_1 = require_lib2();\n var properties_1 = require_lib4();\n var logger_1 = require_lib();\n var _version_1 = require_version12();\n var logger = new logger_1.Logger(_version_1.version);\n var _curve = null;\n function getCurve() {\n if (!_curve) {\n _curve = new elliptic_1.EC(\"secp256k1\");\n }\n return _curve;\n }\n var SigningKey = (\n /** @class */\n function() {\n function SigningKey2(privateKey) {\n (0, properties_1.defineReadOnly)(this, \"curve\", \"secp256k1\");\n (0, properties_1.defineReadOnly)(this, \"privateKey\", (0, bytes_1.hexlify)(privateKey));\n if ((0, bytes_1.hexDataLength)(this.privateKey) !== 32) {\n logger.throwArgumentError(\"invalid private key\", \"privateKey\", \"[[ REDACTED ]]\");\n }\n var keyPair = getCurve().keyFromPrivate((0, bytes_1.arrayify)(this.privateKey));\n (0, properties_1.defineReadOnly)(this, \"publicKey\", \"0x\" + keyPair.getPublic(false, \"hex\"));\n (0, properties_1.defineReadOnly)(this, \"compressedPublicKey\", \"0x\" + keyPair.getPublic(true, \"hex\"));\n (0, properties_1.defineReadOnly)(this, \"_isSigningKey\", true);\n }\n SigningKey2.prototype._addPoint = function(other) {\n var p0 = getCurve().keyFromPublic((0, bytes_1.arrayify)(this.publicKey));\n var p1 = getCurve().keyFromPublic((0, bytes_1.arrayify)(other));\n return \"0x\" + p0.pub.add(p1.pub).encodeCompressed(\"hex\");\n };\n SigningKey2.prototype.signDigest = function(digest) {\n var keyPair = getCurve().keyFromPrivate((0, bytes_1.arrayify)(this.privateKey));\n var digestBytes = (0, bytes_1.arrayify)(digest);\n if (digestBytes.length !== 32) {\n logger.throwArgumentError(\"bad digest length\", \"digest\", digest);\n }\n var signature = keyPair.sign(digestBytes, { canonical: true });\n return (0, bytes_1.splitSignature)({\n recoveryParam: signature.recoveryParam,\n r: (0, bytes_1.hexZeroPad)(\"0x\" + signature.r.toString(16), 32),\n s: (0, bytes_1.hexZeroPad)(\"0x\" + signature.s.toString(16), 32)\n });\n };\n SigningKey2.prototype.computeSharedSecret = function(otherKey) {\n var keyPair = getCurve().keyFromPrivate((0, bytes_1.arrayify)(this.privateKey));\n var otherKeyPair = getCurve().keyFromPublic((0, bytes_1.arrayify)(computePublicKey(otherKey)));\n return (0, bytes_1.hexZeroPad)(\"0x\" + keyPair.derive(otherKeyPair.getPublic()).toString(16), 32);\n };\n SigningKey2.isSigningKey = function(value) {\n return !!(value && value._isSigningKey);\n };\n return SigningKey2;\n }()\n );\n exports3.SigningKey = SigningKey;\n function recoverPublicKey3(digest, signature) {\n var sig = (0, bytes_1.splitSignature)(signature);\n var rs = { r: (0, bytes_1.arrayify)(sig.r), s: (0, bytes_1.arrayify)(sig.s) };\n return \"0x\" + getCurve().recoverPubKey((0, bytes_1.arrayify)(digest), rs, sig.recoveryParam).encode(\"hex\", false);\n }\n exports3.recoverPublicKey = recoverPublicKey3;\n function computePublicKey(key, compressed) {\n var bytes = (0, bytes_1.arrayify)(key);\n if (bytes.length === 32) {\n var signingKey = new SigningKey(bytes);\n if (compressed) {\n return \"0x\" + getCurve().keyFromPrivate(bytes).getPublic(true, \"hex\");\n }\n return signingKey.publicKey;\n } else if (bytes.length === 33) {\n if (compressed) {\n return (0, bytes_1.hexlify)(bytes);\n }\n return \"0x\" + getCurve().keyFromPublic(bytes).getPublic(false, \"hex\");\n } else if (bytes.length === 65) {\n if (!compressed) {\n return (0, bytes_1.hexlify)(bytes);\n }\n return \"0x\" + getCurve().keyFromPublic(bytes).getPublic(true, \"hex\");\n }\n return logger.throwArgumentError(\"invalid public or private key\", \"key\", \"[REDACTED]\");\n }\n exports3.computePublicKey = computePublicKey;\n }\n });\n\n // ../../../node_modules/.pnpm/@ethersproject+transactions@5.8.0/node_modules/@ethersproject/transactions/lib/_version.js\n var require_version13 = __commonJS({\n \"../../../node_modules/.pnpm/@ethersproject+transactions@5.8.0/node_modules/@ethersproject/transactions/lib/_version.js\"(exports3) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n Object.defineProperty(exports3, \"__esModule\", { value: true });\n exports3.version = void 0;\n exports3.version = \"transactions/5.8.0\";\n }\n });\n\n // ../../../node_modules/.pnpm/@ethersproject+transactions@5.8.0/node_modules/@ethersproject/transactions/lib/index.js\n var require_lib17 = __commonJS({\n \"../../../node_modules/.pnpm/@ethersproject+transactions@5.8.0/node_modules/@ethersproject/transactions/lib/index.js\"(exports3) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n var __createBinding3 = exports3 && exports3.__createBinding || (Object.create ? function(o5, m2, k4, k22) {\n if (k22 === void 0)\n k22 = k4;\n Object.defineProperty(o5, k22, { enumerable: true, get: function() {\n return m2[k4];\n } });\n } : function(o5, m2, k4, k22) {\n if (k22 === void 0)\n k22 = k4;\n o5[k22] = m2[k4];\n });\n var __setModuleDefault3 = exports3 && exports3.__setModuleDefault || (Object.create ? function(o5, v2) {\n Object.defineProperty(o5, \"default\", { enumerable: true, value: v2 });\n } : function(o5, v2) {\n o5[\"default\"] = v2;\n });\n var __importStar3 = exports3 && exports3.__importStar || function(mod3) {\n if (mod3 && mod3.__esModule)\n return mod3;\n var result = {};\n if (mod3 != null) {\n for (var k4 in mod3)\n if (k4 !== \"default\" && Object.prototype.hasOwnProperty.call(mod3, k4))\n __createBinding3(result, mod3, k4);\n }\n __setModuleDefault3(result, mod3);\n return result;\n };\n Object.defineProperty(exports3, \"__esModule\", { value: true });\n exports3.parse = exports3.serialize = exports3.accessListify = exports3.recoverAddress = exports3.computeAddress = exports3.TransactionTypes = void 0;\n var address_1 = require_lib7();\n var bignumber_1 = require_lib3();\n var bytes_1 = require_lib2();\n var constants_1 = require_lib8();\n var keccak256_1 = require_lib5();\n var properties_1 = require_lib4();\n var RLP = __importStar3(require_lib6());\n var signing_key_1 = require_lib16();\n var logger_1 = require_lib();\n var _version_1 = require_version13();\n var logger = new logger_1.Logger(_version_1.version);\n var TransactionTypes;\n (function(TransactionTypes2) {\n TransactionTypes2[TransactionTypes2[\"legacy\"] = 0] = \"legacy\";\n TransactionTypes2[TransactionTypes2[\"eip2930\"] = 1] = \"eip2930\";\n TransactionTypes2[TransactionTypes2[\"eip1559\"] = 2] = \"eip1559\";\n })(TransactionTypes = exports3.TransactionTypes || (exports3.TransactionTypes = {}));\n function handleAddress(value) {\n if (value === \"0x\") {\n return null;\n }\n return (0, address_1.getAddress)(value);\n }\n function handleNumber(value) {\n if (value === \"0x\") {\n return constants_1.Zero;\n }\n return bignumber_1.BigNumber.from(value);\n }\n var transactionFields = [\n { name: \"nonce\", maxLength: 32, numeric: true },\n { name: \"gasPrice\", maxLength: 32, numeric: true },\n { name: \"gasLimit\", maxLength: 32, numeric: true },\n { name: \"to\", length: 20 },\n { name: \"value\", maxLength: 32, numeric: true },\n { name: \"data\" }\n ];\n var allowedTransactionKeys = {\n chainId: true,\n data: true,\n gasLimit: true,\n gasPrice: true,\n nonce: true,\n to: true,\n type: true,\n value: true\n };\n function computeAddress(key) {\n var publicKey = (0, signing_key_1.computePublicKey)(key);\n return (0, address_1.getAddress)((0, bytes_1.hexDataSlice)((0, keccak256_1.keccak256)((0, bytes_1.hexDataSlice)(publicKey, 1)), 12));\n }\n exports3.computeAddress = computeAddress;\n function recoverAddress3(digest, signature) {\n return computeAddress((0, signing_key_1.recoverPublicKey)((0, bytes_1.arrayify)(digest), signature));\n }\n exports3.recoverAddress = recoverAddress3;\n function formatNumber(value, name) {\n var result = (0, bytes_1.stripZeros)(bignumber_1.BigNumber.from(value).toHexString());\n if (result.length > 32) {\n logger.throwArgumentError(\"invalid length for \" + name, \"transaction:\" + name, value);\n }\n return result;\n }\n function accessSetify(addr, storageKeys) {\n return {\n address: (0, address_1.getAddress)(addr),\n storageKeys: (storageKeys || []).map(function(storageKey, index2) {\n if ((0, bytes_1.hexDataLength)(storageKey) !== 32) {\n logger.throwArgumentError(\"invalid access list storageKey\", \"accessList[\" + addr + \":\" + index2 + \"]\", storageKey);\n }\n return storageKey.toLowerCase();\n })\n };\n }\n function accessListify(value) {\n if (Array.isArray(value)) {\n return value.map(function(set, index2) {\n if (Array.isArray(set)) {\n if (set.length > 2) {\n logger.throwArgumentError(\"access list expected to be [ address, storageKeys[] ]\", \"value[\" + index2 + \"]\", set);\n }\n return accessSetify(set[0], set[1]);\n }\n return accessSetify(set.address, set.storageKeys);\n });\n }\n var result = Object.keys(value).map(function(addr) {\n var storageKeys = value[addr].reduce(function(accum, storageKey) {\n accum[storageKey] = true;\n return accum;\n }, {});\n return accessSetify(addr, Object.keys(storageKeys).sort());\n });\n result.sort(function(a3, b4) {\n return a3.address.localeCompare(b4.address);\n });\n return result;\n }\n exports3.accessListify = accessListify;\n function formatAccessList(value) {\n return accessListify(value).map(function(set) {\n return [set.address, set.storageKeys];\n });\n }\n function _serializeEip1559(transaction, signature) {\n if (transaction.gasPrice != null) {\n var gasPrice = bignumber_1.BigNumber.from(transaction.gasPrice);\n var maxFeePerGas = bignumber_1.BigNumber.from(transaction.maxFeePerGas || 0);\n if (!gasPrice.eq(maxFeePerGas)) {\n logger.throwArgumentError(\"mismatch EIP-1559 gasPrice != maxFeePerGas\", \"tx\", {\n gasPrice,\n maxFeePerGas\n });\n }\n }\n var fields = [\n formatNumber(transaction.chainId || 0, \"chainId\"),\n formatNumber(transaction.nonce || 0, \"nonce\"),\n formatNumber(transaction.maxPriorityFeePerGas || 0, \"maxPriorityFeePerGas\"),\n formatNumber(transaction.maxFeePerGas || 0, \"maxFeePerGas\"),\n formatNumber(transaction.gasLimit || 0, \"gasLimit\"),\n transaction.to != null ? (0, address_1.getAddress)(transaction.to) : \"0x\",\n formatNumber(transaction.value || 0, \"value\"),\n transaction.data || \"0x\",\n formatAccessList(transaction.accessList || [])\n ];\n if (signature) {\n var sig = (0, bytes_1.splitSignature)(signature);\n fields.push(formatNumber(sig.recoveryParam, \"recoveryParam\"));\n fields.push((0, bytes_1.stripZeros)(sig.r));\n fields.push((0, bytes_1.stripZeros)(sig.s));\n }\n return (0, bytes_1.hexConcat)([\"0x02\", RLP.encode(fields)]);\n }\n function _serializeEip2930(transaction, signature) {\n var fields = [\n formatNumber(transaction.chainId || 0, \"chainId\"),\n formatNumber(transaction.nonce || 0, \"nonce\"),\n formatNumber(transaction.gasPrice || 0, \"gasPrice\"),\n formatNumber(transaction.gasLimit || 0, \"gasLimit\"),\n transaction.to != null ? (0, address_1.getAddress)(transaction.to) : \"0x\",\n formatNumber(transaction.value || 0, \"value\"),\n transaction.data || \"0x\",\n formatAccessList(transaction.accessList || [])\n ];\n if (signature) {\n var sig = (0, bytes_1.splitSignature)(signature);\n fields.push(formatNumber(sig.recoveryParam, \"recoveryParam\"));\n fields.push((0, bytes_1.stripZeros)(sig.r));\n fields.push((0, bytes_1.stripZeros)(sig.s));\n }\n return (0, bytes_1.hexConcat)([\"0x01\", RLP.encode(fields)]);\n }\n function _serialize(transaction, signature) {\n (0, properties_1.checkProperties)(transaction, allowedTransactionKeys);\n var raw = [];\n transactionFields.forEach(function(fieldInfo) {\n var value = transaction[fieldInfo.name] || [];\n var options = {};\n if (fieldInfo.numeric) {\n options.hexPad = \"left\";\n }\n value = (0, bytes_1.arrayify)((0, bytes_1.hexlify)(value, options));\n if (fieldInfo.length && value.length !== fieldInfo.length && value.length > 0) {\n logger.throwArgumentError(\"invalid length for \" + fieldInfo.name, \"transaction:\" + fieldInfo.name, value);\n }\n if (fieldInfo.maxLength) {\n value = (0, bytes_1.stripZeros)(value);\n if (value.length > fieldInfo.maxLength) {\n logger.throwArgumentError(\"invalid length for \" + fieldInfo.name, \"transaction:\" + fieldInfo.name, value);\n }\n }\n raw.push((0, bytes_1.hexlify)(value));\n });\n var chainId = 0;\n if (transaction.chainId != null) {\n chainId = transaction.chainId;\n if (typeof chainId !== \"number\") {\n logger.throwArgumentError(\"invalid transaction.chainId\", \"transaction\", transaction);\n }\n } else if (signature && !(0, bytes_1.isBytesLike)(signature) && signature.v > 28) {\n chainId = Math.floor((signature.v - 35) / 2);\n }\n if (chainId !== 0) {\n raw.push((0, bytes_1.hexlify)(chainId));\n raw.push(\"0x\");\n raw.push(\"0x\");\n }\n if (!signature) {\n return RLP.encode(raw);\n }\n var sig = (0, bytes_1.splitSignature)(signature);\n var v2 = 27 + sig.recoveryParam;\n if (chainId !== 0) {\n raw.pop();\n raw.pop();\n raw.pop();\n v2 += chainId * 2 + 8;\n if (sig.v > 28 && sig.v !== v2) {\n logger.throwArgumentError(\"transaction.chainId/signature.v mismatch\", \"signature\", signature);\n }\n } else if (sig.v !== v2) {\n logger.throwArgumentError(\"transaction.chainId/signature.v mismatch\", \"signature\", signature);\n }\n raw.push((0, bytes_1.hexlify)(v2));\n raw.push((0, bytes_1.stripZeros)((0, bytes_1.arrayify)(sig.r)));\n raw.push((0, bytes_1.stripZeros)((0, bytes_1.arrayify)(sig.s)));\n return RLP.encode(raw);\n }\n function serialize(transaction, signature) {\n if (transaction.type == null || transaction.type === 0) {\n if (transaction.accessList != null) {\n logger.throwArgumentError(\"untyped transactions do not support accessList; include type: 1\", \"transaction\", transaction);\n }\n return _serialize(transaction, signature);\n }\n switch (transaction.type) {\n case 1:\n return _serializeEip2930(transaction, signature);\n case 2:\n return _serializeEip1559(transaction, signature);\n default:\n break;\n }\n return logger.throwError(\"unsupported transaction type: \" + transaction.type, logger_1.Logger.errors.UNSUPPORTED_OPERATION, {\n operation: \"serializeTransaction\",\n transactionType: transaction.type\n });\n }\n exports3.serialize = serialize;\n function _parseEipSignature(tx, fields, serialize2) {\n try {\n var recid = handleNumber(fields[0]).toNumber();\n if (recid !== 0 && recid !== 1) {\n throw new Error(\"bad recid\");\n }\n tx.v = recid;\n } catch (error) {\n logger.throwArgumentError(\"invalid v for transaction type: 1\", \"v\", fields[0]);\n }\n tx.r = (0, bytes_1.hexZeroPad)(fields[1], 32);\n tx.s = (0, bytes_1.hexZeroPad)(fields[2], 32);\n try {\n var digest = (0, keccak256_1.keccak256)(serialize2(tx));\n tx.from = recoverAddress3(digest, { r: tx.r, s: tx.s, recoveryParam: tx.v });\n } catch (error) {\n }\n }\n function _parseEip1559(payload) {\n var transaction = RLP.decode(payload.slice(1));\n if (transaction.length !== 9 && transaction.length !== 12) {\n logger.throwArgumentError(\"invalid component count for transaction type: 2\", \"payload\", (0, bytes_1.hexlify)(payload));\n }\n var maxPriorityFeePerGas = handleNumber(transaction[2]);\n var maxFeePerGas = handleNumber(transaction[3]);\n var tx = {\n type: 2,\n chainId: handleNumber(transaction[0]).toNumber(),\n nonce: handleNumber(transaction[1]).toNumber(),\n maxPriorityFeePerGas,\n maxFeePerGas,\n gasPrice: null,\n gasLimit: handleNumber(transaction[4]),\n to: handleAddress(transaction[5]),\n value: handleNumber(transaction[6]),\n data: transaction[7],\n accessList: accessListify(transaction[8])\n };\n if (transaction.length === 9) {\n return tx;\n }\n tx.hash = (0, keccak256_1.keccak256)(payload);\n _parseEipSignature(tx, transaction.slice(9), _serializeEip1559);\n return tx;\n }\n function _parseEip2930(payload) {\n var transaction = RLP.decode(payload.slice(1));\n if (transaction.length !== 8 && transaction.length !== 11) {\n logger.throwArgumentError(\"invalid component count for transaction type: 1\", \"payload\", (0, bytes_1.hexlify)(payload));\n }\n var tx = {\n type: 1,\n chainId: handleNumber(transaction[0]).toNumber(),\n nonce: handleNumber(transaction[1]).toNumber(),\n gasPrice: handleNumber(transaction[2]),\n gasLimit: handleNumber(transaction[3]),\n to: handleAddress(transaction[4]),\n value: handleNumber(transaction[5]),\n data: transaction[6],\n accessList: accessListify(transaction[7])\n };\n if (transaction.length === 8) {\n return tx;\n }\n tx.hash = (0, keccak256_1.keccak256)(payload);\n _parseEipSignature(tx, transaction.slice(8), _serializeEip2930);\n return tx;\n }\n function _parse(rawTransaction) {\n var transaction = RLP.decode(rawTransaction);\n if (transaction.length !== 9 && transaction.length !== 6) {\n logger.throwArgumentError(\"invalid raw transaction\", \"rawTransaction\", rawTransaction);\n }\n var tx = {\n nonce: handleNumber(transaction[0]).toNumber(),\n gasPrice: handleNumber(transaction[1]),\n gasLimit: handleNumber(transaction[2]),\n to: handleAddress(transaction[3]),\n value: handleNumber(transaction[4]),\n data: transaction[5],\n chainId: 0\n };\n if (transaction.length === 6) {\n return tx;\n }\n try {\n tx.v = bignumber_1.BigNumber.from(transaction[6]).toNumber();\n } catch (error) {\n return tx;\n }\n tx.r = (0, bytes_1.hexZeroPad)(transaction[7], 32);\n tx.s = (0, bytes_1.hexZeroPad)(transaction[8], 32);\n if (bignumber_1.BigNumber.from(tx.r).isZero() && bignumber_1.BigNumber.from(tx.s).isZero()) {\n tx.chainId = tx.v;\n tx.v = 0;\n } else {\n tx.chainId = Math.floor((tx.v - 35) / 2);\n if (tx.chainId < 0) {\n tx.chainId = 0;\n }\n var recoveryParam = tx.v - 27;\n var raw = transaction.slice(0, 6);\n if (tx.chainId !== 0) {\n raw.push((0, bytes_1.hexlify)(tx.chainId));\n raw.push(\"0x\");\n raw.push(\"0x\");\n recoveryParam -= tx.chainId * 2 + 8;\n }\n var digest = (0, keccak256_1.keccak256)(RLP.encode(raw));\n try {\n tx.from = recoverAddress3(digest, { r: (0, bytes_1.hexlify)(tx.r), s: (0, bytes_1.hexlify)(tx.s), recoveryParam });\n } catch (error) {\n }\n tx.hash = (0, keccak256_1.keccak256)(rawTransaction);\n }\n tx.type = null;\n return tx;\n }\n function parse(rawTransaction) {\n var payload = (0, bytes_1.arrayify)(rawTransaction);\n if (payload[0] > 127) {\n return _parse(payload);\n }\n switch (payload[0]) {\n case 1:\n return _parseEip2930(payload);\n case 2:\n return _parseEip1559(payload);\n default:\n break;\n }\n return logger.throwError(\"unsupported transaction type: \" + payload[0], logger_1.Logger.errors.UNSUPPORTED_OPERATION, {\n operation: \"parseTransaction\",\n transactionType: payload[0]\n });\n }\n exports3.parse = parse;\n }\n });\n\n // ../../../node_modules/.pnpm/@ethersproject+contracts@5.8.0/node_modules/@ethersproject/contracts/lib/_version.js\n var require_version14 = __commonJS({\n \"../../../node_modules/.pnpm/@ethersproject+contracts@5.8.0/node_modules/@ethersproject/contracts/lib/_version.js\"(exports3) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n Object.defineProperty(exports3, \"__esModule\", { value: true });\n exports3.version = void 0;\n exports3.version = \"contracts/5.8.0\";\n }\n });\n\n // ../../../node_modules/.pnpm/@ethersproject+contracts@5.8.0/node_modules/@ethersproject/contracts/lib/index.js\n var require_lib18 = __commonJS({\n \"../../../node_modules/.pnpm/@ethersproject+contracts@5.8.0/node_modules/@ethersproject/contracts/lib/index.js\"(exports3) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n var __extends3 = exports3 && exports3.__extends || /* @__PURE__ */ function() {\n var extendStatics3 = function(d5, b4) {\n extendStatics3 = Object.setPrototypeOf || { __proto__: [] } instanceof Array && function(d6, b5) {\n d6.__proto__ = b5;\n } || function(d6, b5) {\n for (var p4 in b5)\n if (Object.prototype.hasOwnProperty.call(b5, p4))\n d6[p4] = b5[p4];\n };\n return extendStatics3(d5, b4);\n };\n return function(d5, b4) {\n if (typeof b4 !== \"function\" && b4 !== null)\n throw new TypeError(\"Class extends value \" + String(b4) + \" is not a constructor or null\");\n extendStatics3(d5, b4);\n function __() {\n this.constructor = d5;\n }\n d5.prototype = b4 === null ? Object.create(b4) : (__.prototype = b4.prototype, new __());\n };\n }();\n var __awaiter3 = exports3 && exports3.__awaiter || function(thisArg, _arguments, P2, generator) {\n function adopt(value) {\n return value instanceof P2 ? value : new P2(function(resolve) {\n resolve(value);\n });\n }\n return new (P2 || (P2 = Promise))(function(resolve, reject) {\n function fulfilled(value) {\n try {\n step(generator.next(value));\n } catch (e3) {\n reject(e3);\n }\n }\n function rejected(value) {\n try {\n step(generator[\"throw\"](value));\n } catch (e3) {\n reject(e3);\n }\n }\n function step(result) {\n result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected);\n }\n step((generator = generator.apply(thisArg, _arguments || [])).next());\n });\n };\n var __generator3 = exports3 && exports3.__generator || function(thisArg, body) {\n var _2 = { label: 0, sent: function() {\n if (t3[0] & 1)\n throw t3[1];\n return t3[1];\n }, trys: [], ops: [] }, f6, y6, t3, g4;\n return g4 = { next: verb(0), \"throw\": verb(1), \"return\": verb(2) }, typeof Symbol === \"function\" && (g4[Symbol.iterator] = function() {\n return this;\n }), g4;\n function verb(n2) {\n return function(v2) {\n return step([n2, v2]);\n };\n }\n function step(op) {\n if (f6)\n throw new TypeError(\"Generator is already executing.\");\n while (_2)\n try {\n if (f6 = 1, y6 && (t3 = op[0] & 2 ? y6[\"return\"] : op[0] ? y6[\"throw\"] || ((t3 = y6[\"return\"]) && t3.call(y6), 0) : y6.next) && !(t3 = t3.call(y6, op[1])).done)\n return t3;\n if (y6 = 0, t3)\n op = [op[0] & 2, t3.value];\n switch (op[0]) {\n case 0:\n case 1:\n t3 = op;\n break;\n case 4:\n _2.label++;\n return { value: op[1], done: false };\n case 5:\n _2.label++;\n y6 = op[1];\n op = [0];\n continue;\n case 7:\n op = _2.ops.pop();\n _2.trys.pop();\n continue;\n default:\n if (!(t3 = _2.trys, t3 = t3.length > 0 && t3[t3.length - 1]) && (op[0] === 6 || op[0] === 2)) {\n _2 = 0;\n continue;\n }\n if (op[0] === 3 && (!t3 || op[1] > t3[0] && op[1] < t3[3])) {\n _2.label = op[1];\n break;\n }\n if (op[0] === 6 && _2.label < t3[1]) {\n _2.label = t3[1];\n t3 = op;\n break;\n }\n if (t3 && _2.label < t3[2]) {\n _2.label = t3[2];\n _2.ops.push(op);\n break;\n }\n if (t3[2])\n _2.ops.pop();\n _2.trys.pop();\n continue;\n }\n op = body.call(thisArg, _2);\n } catch (e3) {\n op = [6, e3];\n y6 = 0;\n } finally {\n f6 = t3 = 0;\n }\n if (op[0] & 5)\n throw op[1];\n return { value: op[0] ? op[1] : void 0, done: true };\n }\n };\n var __spreadArray3 = exports3 && exports3.__spreadArray || function(to, from14, pack) {\n if (pack || arguments.length === 2)\n for (var i3 = 0, l6 = from14.length, ar; i3 < l6; i3++) {\n if (ar || !(i3 in from14)) {\n if (!ar)\n ar = Array.prototype.slice.call(from14, 0, i3);\n ar[i3] = from14[i3];\n }\n }\n return to.concat(ar || Array.prototype.slice.call(from14));\n };\n Object.defineProperty(exports3, \"__esModule\", { value: true });\n exports3.ContractFactory = exports3.Contract = exports3.BaseContract = void 0;\n var abi_1 = require_lib13();\n var abstract_provider_1 = require_lib14();\n var abstract_signer_1 = require_lib15();\n var address_1 = require_lib7();\n var bignumber_1 = require_lib3();\n var bytes_1 = require_lib2();\n var properties_1 = require_lib4();\n var transactions_1 = require_lib17();\n var logger_1 = require_lib();\n var _version_1 = require_version14();\n var logger = new logger_1.Logger(_version_1.version);\n var allowedTransactionKeys = {\n chainId: true,\n data: true,\n from: true,\n gasLimit: true,\n gasPrice: true,\n nonce: true,\n to: true,\n value: true,\n type: true,\n accessList: true,\n maxFeePerGas: true,\n maxPriorityFeePerGas: true,\n customData: true,\n ccipReadEnabled: true\n };\n function resolveName(resolver, nameOrPromise) {\n return __awaiter3(this, void 0, void 0, function() {\n var name, address;\n return __generator3(this, function(_a) {\n switch (_a.label) {\n case 0:\n return [4, nameOrPromise];\n case 1:\n name = _a.sent();\n if (typeof name !== \"string\") {\n logger.throwArgumentError(\"invalid address or ENS name\", \"name\", name);\n }\n try {\n return [2, (0, address_1.getAddress)(name)];\n } catch (error) {\n }\n if (!resolver) {\n logger.throwError(\"a provider or signer is needed to resolve ENS names\", logger_1.Logger.errors.UNSUPPORTED_OPERATION, {\n operation: \"resolveName\"\n });\n }\n return [4, resolver.resolveName(name)];\n case 2:\n address = _a.sent();\n if (address == null) {\n logger.throwArgumentError(\"resolver or addr is not configured for ENS name\", \"name\", name);\n }\n return [2, address];\n }\n });\n });\n }\n function resolveAddresses(resolver, value, paramType) {\n return __awaiter3(this, void 0, void 0, function() {\n return __generator3(this, function(_a) {\n switch (_a.label) {\n case 0:\n if (!Array.isArray(paramType))\n return [3, 2];\n return [4, Promise.all(paramType.map(function(paramType2, index2) {\n return resolveAddresses(resolver, Array.isArray(value) ? value[index2] : value[paramType2.name], paramType2);\n }))];\n case 1:\n return [2, _a.sent()];\n case 2:\n if (!(paramType.type === \"address\"))\n return [3, 4];\n return [4, resolveName(resolver, value)];\n case 3:\n return [2, _a.sent()];\n case 4:\n if (!(paramType.type === \"tuple\"))\n return [3, 6];\n return [4, resolveAddresses(resolver, value, paramType.components)];\n case 5:\n return [2, _a.sent()];\n case 6:\n if (!(paramType.baseType === \"array\"))\n return [3, 8];\n if (!Array.isArray(value)) {\n return [2, Promise.reject(logger.makeError(\"invalid value for array\", logger_1.Logger.errors.INVALID_ARGUMENT, {\n argument: \"value\",\n value\n }))];\n }\n return [4, Promise.all(value.map(function(v2) {\n return resolveAddresses(resolver, v2, paramType.arrayChildren);\n }))];\n case 7:\n return [2, _a.sent()];\n case 8:\n return [2, value];\n }\n });\n });\n }\n function populateTransaction2(contract, fragment, args) {\n return __awaiter3(this, void 0, void 0, function() {\n var overrides, resolved, data, tx, ro, intrinsic, bytes, i3, roValue, leftovers;\n var _this = this;\n return __generator3(this, function(_a) {\n switch (_a.label) {\n case 0:\n overrides = {};\n if (args.length === fragment.inputs.length + 1 && typeof args[args.length - 1] === \"object\") {\n overrides = (0, properties_1.shallowCopy)(args.pop());\n }\n logger.checkArgumentCount(args.length, fragment.inputs.length, \"passed to contract\");\n if (contract.signer) {\n if (overrides.from) {\n overrides.from = (0, properties_1.resolveProperties)({\n override: resolveName(contract.signer, overrides.from),\n signer: contract.signer.getAddress()\n }).then(function(check) {\n return __awaiter3(_this, void 0, void 0, function() {\n return __generator3(this, function(_a2) {\n if ((0, address_1.getAddress)(check.signer) !== check.override) {\n logger.throwError(\"Contract with a Signer cannot override from\", logger_1.Logger.errors.UNSUPPORTED_OPERATION, {\n operation: \"overrides.from\"\n });\n }\n return [2, check.override];\n });\n });\n });\n } else {\n overrides.from = contract.signer.getAddress();\n }\n } else if (overrides.from) {\n overrides.from = resolveName(contract.provider, overrides.from);\n }\n return [4, (0, properties_1.resolveProperties)({\n args: resolveAddresses(contract.signer || contract.provider, args, fragment.inputs),\n address: contract.resolvedAddress,\n overrides: (0, properties_1.resolveProperties)(overrides) || {}\n })];\n case 1:\n resolved = _a.sent();\n data = contract.interface.encodeFunctionData(fragment, resolved.args);\n tx = {\n data,\n to: resolved.address\n };\n ro = resolved.overrides;\n if (ro.nonce != null) {\n tx.nonce = bignumber_1.BigNumber.from(ro.nonce).toNumber();\n }\n if (ro.gasLimit != null) {\n tx.gasLimit = bignumber_1.BigNumber.from(ro.gasLimit);\n }\n if (ro.gasPrice != null) {\n tx.gasPrice = bignumber_1.BigNumber.from(ro.gasPrice);\n }\n if (ro.maxFeePerGas != null) {\n tx.maxFeePerGas = bignumber_1.BigNumber.from(ro.maxFeePerGas);\n }\n if (ro.maxPriorityFeePerGas != null) {\n tx.maxPriorityFeePerGas = bignumber_1.BigNumber.from(ro.maxPriorityFeePerGas);\n }\n if (ro.from != null) {\n tx.from = ro.from;\n }\n if (ro.type != null) {\n tx.type = ro.type;\n }\n if (ro.accessList != null) {\n tx.accessList = (0, transactions_1.accessListify)(ro.accessList);\n }\n if (tx.gasLimit == null && fragment.gas != null) {\n intrinsic = 21e3;\n bytes = (0, bytes_1.arrayify)(data);\n for (i3 = 0; i3 < bytes.length; i3++) {\n intrinsic += 4;\n if (bytes[i3]) {\n intrinsic += 64;\n }\n }\n tx.gasLimit = bignumber_1.BigNumber.from(fragment.gas).add(intrinsic);\n }\n if (ro.value) {\n roValue = bignumber_1.BigNumber.from(ro.value);\n if (!roValue.isZero() && !fragment.payable) {\n logger.throwError(\"non-payable method cannot override value\", logger_1.Logger.errors.UNSUPPORTED_OPERATION, {\n operation: \"overrides.value\",\n value: overrides.value\n });\n }\n tx.value = roValue;\n }\n if (ro.customData) {\n tx.customData = (0, properties_1.shallowCopy)(ro.customData);\n }\n if (ro.ccipReadEnabled) {\n tx.ccipReadEnabled = !!ro.ccipReadEnabled;\n }\n delete overrides.nonce;\n delete overrides.gasLimit;\n delete overrides.gasPrice;\n delete overrides.from;\n delete overrides.value;\n delete overrides.type;\n delete overrides.accessList;\n delete overrides.maxFeePerGas;\n delete overrides.maxPriorityFeePerGas;\n delete overrides.customData;\n delete overrides.ccipReadEnabled;\n leftovers = Object.keys(overrides).filter(function(key) {\n return overrides[key] != null;\n });\n if (leftovers.length) {\n logger.throwError(\"cannot override \" + leftovers.map(function(l6) {\n return JSON.stringify(l6);\n }).join(\",\"), logger_1.Logger.errors.UNSUPPORTED_OPERATION, {\n operation: \"overrides\",\n overrides: leftovers\n });\n }\n return [2, tx];\n }\n });\n });\n }\n function buildPopulate(contract, fragment) {\n return function() {\n var args = [];\n for (var _i = 0; _i < arguments.length; _i++) {\n args[_i] = arguments[_i];\n }\n return populateTransaction2(contract, fragment, args);\n };\n }\n function buildEstimate(contract, fragment) {\n var signerOrProvider = contract.signer || contract.provider;\n return function() {\n var args = [];\n for (var _i = 0; _i < arguments.length; _i++) {\n args[_i] = arguments[_i];\n }\n return __awaiter3(this, void 0, void 0, function() {\n var tx;\n return __generator3(this, function(_a) {\n switch (_a.label) {\n case 0:\n if (!signerOrProvider) {\n logger.throwError(\"estimate require a provider or signer\", logger_1.Logger.errors.UNSUPPORTED_OPERATION, {\n operation: \"estimateGas\"\n });\n }\n return [4, populateTransaction2(contract, fragment, args)];\n case 1:\n tx = _a.sent();\n return [4, signerOrProvider.estimateGas(tx)];\n case 2:\n return [2, _a.sent()];\n }\n });\n });\n };\n }\n function addContractWait(contract, tx) {\n var wait2 = tx.wait.bind(tx);\n tx.wait = function(confirmations) {\n return wait2(confirmations).then(function(receipt) {\n receipt.events = receipt.logs.map(function(log) {\n var event = (0, properties_1.deepCopy)(log);\n var parsed = null;\n try {\n parsed = contract.interface.parseLog(log);\n } catch (e3) {\n }\n if (parsed) {\n event.args = parsed.args;\n event.decode = function(data, topics) {\n return contract.interface.decodeEventLog(parsed.eventFragment, data, topics);\n };\n event.event = parsed.name;\n event.eventSignature = parsed.signature;\n }\n event.removeListener = function() {\n return contract.provider;\n };\n event.getBlock = function() {\n return contract.provider.getBlock(receipt.blockHash);\n };\n event.getTransaction = function() {\n return contract.provider.getTransaction(receipt.transactionHash);\n };\n event.getTransactionReceipt = function() {\n return Promise.resolve(receipt);\n };\n return event;\n });\n return receipt;\n });\n };\n }\n function buildCall(contract, fragment, collapseSimple) {\n var signerOrProvider = contract.signer || contract.provider;\n return function() {\n var args = [];\n for (var _i = 0; _i < arguments.length; _i++) {\n args[_i] = arguments[_i];\n }\n return __awaiter3(this, void 0, void 0, function() {\n var blockTag, overrides, tx, result, value;\n return __generator3(this, function(_a) {\n switch (_a.label) {\n case 0:\n blockTag = void 0;\n if (!(args.length === fragment.inputs.length + 1 && typeof args[args.length - 1] === \"object\"))\n return [3, 3];\n overrides = (0, properties_1.shallowCopy)(args.pop());\n if (!(overrides.blockTag != null))\n return [3, 2];\n return [4, overrides.blockTag];\n case 1:\n blockTag = _a.sent();\n _a.label = 2;\n case 2:\n delete overrides.blockTag;\n args.push(overrides);\n _a.label = 3;\n case 3:\n if (!(contract.deployTransaction != null))\n return [3, 5];\n return [4, contract._deployed(blockTag)];\n case 4:\n _a.sent();\n _a.label = 5;\n case 5:\n return [4, populateTransaction2(contract, fragment, args)];\n case 6:\n tx = _a.sent();\n return [4, signerOrProvider.call(tx, blockTag)];\n case 7:\n result = _a.sent();\n try {\n value = contract.interface.decodeFunctionResult(fragment, result);\n if (collapseSimple && fragment.outputs.length === 1) {\n value = value[0];\n }\n return [2, value];\n } catch (error) {\n if (error.code === logger_1.Logger.errors.CALL_EXCEPTION) {\n error.address = contract.address;\n error.args = args;\n error.transaction = tx;\n }\n throw error;\n }\n return [\n 2\n /*return*/\n ];\n }\n });\n });\n };\n }\n function buildSend(contract, fragment) {\n return function() {\n var args = [];\n for (var _i = 0; _i < arguments.length; _i++) {\n args[_i] = arguments[_i];\n }\n return __awaiter3(this, void 0, void 0, function() {\n var txRequest, tx;\n return __generator3(this, function(_a) {\n switch (_a.label) {\n case 0:\n if (!contract.signer) {\n logger.throwError(\"sending a transaction requires a signer\", logger_1.Logger.errors.UNSUPPORTED_OPERATION, {\n operation: \"sendTransaction\"\n });\n }\n if (!(contract.deployTransaction != null))\n return [3, 2];\n return [4, contract._deployed()];\n case 1:\n _a.sent();\n _a.label = 2;\n case 2:\n return [4, populateTransaction2(contract, fragment, args)];\n case 3:\n txRequest = _a.sent();\n return [4, contract.signer.sendTransaction(txRequest)];\n case 4:\n tx = _a.sent();\n addContractWait(contract, tx);\n return [2, tx];\n }\n });\n });\n };\n }\n function buildDefault(contract, fragment, collapseSimple) {\n if (fragment.constant) {\n return buildCall(contract, fragment, collapseSimple);\n }\n return buildSend(contract, fragment);\n }\n function getEventTag(filter) {\n if (filter.address && (filter.topics == null || filter.topics.length === 0)) {\n return \"*\";\n }\n return (filter.address || \"*\") + \"@\" + (filter.topics ? filter.topics.map(function(topic) {\n if (Array.isArray(topic)) {\n return topic.join(\"|\");\n }\n return topic;\n }).join(\":\") : \"\");\n }\n var RunningEvent = (\n /** @class */\n function() {\n function RunningEvent2(tag, filter) {\n (0, properties_1.defineReadOnly)(this, \"tag\", tag);\n (0, properties_1.defineReadOnly)(this, \"filter\", filter);\n this._listeners = [];\n }\n RunningEvent2.prototype.addListener = function(listener, once2) {\n this._listeners.push({ listener, once: once2 });\n };\n RunningEvent2.prototype.removeListener = function(listener) {\n var done = false;\n this._listeners = this._listeners.filter(function(item) {\n if (done || item.listener !== listener) {\n return true;\n }\n done = true;\n return false;\n });\n };\n RunningEvent2.prototype.removeAllListeners = function() {\n this._listeners = [];\n };\n RunningEvent2.prototype.listeners = function() {\n return this._listeners.map(function(i3) {\n return i3.listener;\n });\n };\n RunningEvent2.prototype.listenerCount = function() {\n return this._listeners.length;\n };\n RunningEvent2.prototype.run = function(args) {\n var _this = this;\n var listenerCount = this.listenerCount();\n this._listeners = this._listeners.filter(function(item) {\n var argsCopy = args.slice();\n setTimeout(function() {\n item.listener.apply(_this, argsCopy);\n }, 0);\n return !item.once;\n });\n return listenerCount;\n };\n RunningEvent2.prototype.prepareEvent = function(event) {\n };\n RunningEvent2.prototype.getEmit = function(event) {\n return [event];\n };\n return RunningEvent2;\n }()\n );\n var ErrorRunningEvent = (\n /** @class */\n function(_super) {\n __extends3(ErrorRunningEvent2, _super);\n function ErrorRunningEvent2() {\n return _super.call(this, \"error\", null) || this;\n }\n return ErrorRunningEvent2;\n }(RunningEvent)\n );\n var FragmentRunningEvent = (\n /** @class */\n function(_super) {\n __extends3(FragmentRunningEvent2, _super);\n function FragmentRunningEvent2(address, contractInterface, fragment, topics) {\n var _this = this;\n var filter = {\n address\n };\n var topic = contractInterface.getEventTopic(fragment);\n if (topics) {\n if (topic !== topics[0]) {\n logger.throwArgumentError(\"topic mismatch\", \"topics\", topics);\n }\n filter.topics = topics.slice();\n } else {\n filter.topics = [topic];\n }\n _this = _super.call(this, getEventTag(filter), filter) || this;\n (0, properties_1.defineReadOnly)(_this, \"address\", address);\n (0, properties_1.defineReadOnly)(_this, \"interface\", contractInterface);\n (0, properties_1.defineReadOnly)(_this, \"fragment\", fragment);\n return _this;\n }\n FragmentRunningEvent2.prototype.prepareEvent = function(event) {\n var _this = this;\n _super.prototype.prepareEvent.call(this, event);\n event.event = this.fragment.name;\n event.eventSignature = this.fragment.format();\n event.decode = function(data, topics) {\n return _this.interface.decodeEventLog(_this.fragment, data, topics);\n };\n try {\n event.args = this.interface.decodeEventLog(this.fragment, event.data, event.topics);\n } catch (error) {\n event.args = null;\n event.decodeError = error;\n }\n };\n FragmentRunningEvent2.prototype.getEmit = function(event) {\n var errors = (0, abi_1.checkResultErrors)(event.args);\n if (errors.length) {\n throw errors[0].error;\n }\n var args = (event.args || []).slice();\n args.push(event);\n return args;\n };\n return FragmentRunningEvent2;\n }(RunningEvent)\n );\n var WildcardRunningEvent = (\n /** @class */\n function(_super) {\n __extends3(WildcardRunningEvent2, _super);\n function WildcardRunningEvent2(address, contractInterface) {\n var _this = _super.call(this, \"*\", { address }) || this;\n (0, properties_1.defineReadOnly)(_this, \"address\", address);\n (0, properties_1.defineReadOnly)(_this, \"interface\", contractInterface);\n return _this;\n }\n WildcardRunningEvent2.prototype.prepareEvent = function(event) {\n var _this = this;\n _super.prototype.prepareEvent.call(this, event);\n try {\n var parsed_1 = this.interface.parseLog(event);\n event.event = parsed_1.name;\n event.eventSignature = parsed_1.signature;\n event.decode = function(data, topics) {\n return _this.interface.decodeEventLog(parsed_1.eventFragment, data, topics);\n };\n event.args = parsed_1.args;\n } catch (error) {\n }\n };\n return WildcardRunningEvent2;\n }(RunningEvent)\n );\n var BaseContract = (\n /** @class */\n function() {\n function BaseContract2(addressOrName, contractInterface, signerOrProvider) {\n var _newTarget = this.constructor;\n var _this = this;\n (0, properties_1.defineReadOnly)(this, \"interface\", (0, properties_1.getStatic)(_newTarget, \"getInterface\")(contractInterface));\n if (signerOrProvider == null) {\n (0, properties_1.defineReadOnly)(this, \"provider\", null);\n (0, properties_1.defineReadOnly)(this, \"signer\", null);\n } else if (abstract_signer_1.Signer.isSigner(signerOrProvider)) {\n (0, properties_1.defineReadOnly)(this, \"provider\", signerOrProvider.provider || null);\n (0, properties_1.defineReadOnly)(this, \"signer\", signerOrProvider);\n } else if (abstract_provider_1.Provider.isProvider(signerOrProvider)) {\n (0, properties_1.defineReadOnly)(this, \"provider\", signerOrProvider);\n (0, properties_1.defineReadOnly)(this, \"signer\", null);\n } else {\n logger.throwArgumentError(\"invalid signer or provider\", \"signerOrProvider\", signerOrProvider);\n }\n (0, properties_1.defineReadOnly)(this, \"callStatic\", {});\n (0, properties_1.defineReadOnly)(this, \"estimateGas\", {});\n (0, properties_1.defineReadOnly)(this, \"functions\", {});\n (0, properties_1.defineReadOnly)(this, \"populateTransaction\", {});\n (0, properties_1.defineReadOnly)(this, \"filters\", {});\n {\n var uniqueFilters_1 = {};\n Object.keys(this.interface.events).forEach(function(eventSignature) {\n var event = _this.interface.events[eventSignature];\n (0, properties_1.defineReadOnly)(_this.filters, eventSignature, function() {\n var args = [];\n for (var _i = 0; _i < arguments.length; _i++) {\n args[_i] = arguments[_i];\n }\n return {\n address: _this.address,\n topics: _this.interface.encodeFilterTopics(event, args)\n };\n });\n if (!uniqueFilters_1[event.name]) {\n uniqueFilters_1[event.name] = [];\n }\n uniqueFilters_1[event.name].push(eventSignature);\n });\n Object.keys(uniqueFilters_1).forEach(function(name) {\n var filters = uniqueFilters_1[name];\n if (filters.length === 1) {\n (0, properties_1.defineReadOnly)(_this.filters, name, _this.filters[filters[0]]);\n } else {\n logger.warn(\"Duplicate definition of \" + name + \" (\" + filters.join(\", \") + \")\");\n }\n });\n }\n (0, properties_1.defineReadOnly)(this, \"_runningEvents\", {});\n (0, properties_1.defineReadOnly)(this, \"_wrappedEmits\", {});\n if (addressOrName == null) {\n logger.throwArgumentError(\"invalid contract address or ENS name\", \"addressOrName\", addressOrName);\n }\n (0, properties_1.defineReadOnly)(this, \"address\", addressOrName);\n if (this.provider) {\n (0, properties_1.defineReadOnly)(this, \"resolvedAddress\", resolveName(this.provider, addressOrName));\n } else {\n try {\n (0, properties_1.defineReadOnly)(this, \"resolvedAddress\", Promise.resolve((0, address_1.getAddress)(addressOrName)));\n } catch (error) {\n logger.throwError(\"provider is required to use ENS name as contract address\", logger_1.Logger.errors.UNSUPPORTED_OPERATION, {\n operation: \"new Contract\"\n });\n }\n }\n this.resolvedAddress.catch(function(e3) {\n });\n var uniqueNames = {};\n var uniqueSignatures = {};\n Object.keys(this.interface.functions).forEach(function(signature) {\n var fragment = _this.interface.functions[signature];\n if (uniqueSignatures[signature]) {\n logger.warn(\"Duplicate ABI entry for \" + JSON.stringify(signature));\n return;\n }\n uniqueSignatures[signature] = true;\n {\n var name_1 = fragment.name;\n if (!uniqueNames[\"%\" + name_1]) {\n uniqueNames[\"%\" + name_1] = [];\n }\n uniqueNames[\"%\" + name_1].push(signature);\n }\n if (_this[signature] == null) {\n (0, properties_1.defineReadOnly)(_this, signature, buildDefault(_this, fragment, true));\n }\n if (_this.functions[signature] == null) {\n (0, properties_1.defineReadOnly)(_this.functions, signature, buildDefault(_this, fragment, false));\n }\n if (_this.callStatic[signature] == null) {\n (0, properties_1.defineReadOnly)(_this.callStatic, signature, buildCall(_this, fragment, true));\n }\n if (_this.populateTransaction[signature] == null) {\n (0, properties_1.defineReadOnly)(_this.populateTransaction, signature, buildPopulate(_this, fragment));\n }\n if (_this.estimateGas[signature] == null) {\n (0, properties_1.defineReadOnly)(_this.estimateGas, signature, buildEstimate(_this, fragment));\n }\n });\n Object.keys(uniqueNames).forEach(function(name) {\n var signatures = uniqueNames[name];\n if (signatures.length > 1) {\n return;\n }\n name = name.substring(1);\n var signature = signatures[0];\n try {\n if (_this[name] == null) {\n (0, properties_1.defineReadOnly)(_this, name, _this[signature]);\n }\n } catch (e3) {\n }\n if (_this.functions[name] == null) {\n (0, properties_1.defineReadOnly)(_this.functions, name, _this.functions[signature]);\n }\n if (_this.callStatic[name] == null) {\n (0, properties_1.defineReadOnly)(_this.callStatic, name, _this.callStatic[signature]);\n }\n if (_this.populateTransaction[name] == null) {\n (0, properties_1.defineReadOnly)(_this.populateTransaction, name, _this.populateTransaction[signature]);\n }\n if (_this.estimateGas[name] == null) {\n (0, properties_1.defineReadOnly)(_this.estimateGas, name, _this.estimateGas[signature]);\n }\n });\n }\n BaseContract2.getContractAddress = function(transaction) {\n return (0, address_1.getContractAddress)(transaction);\n };\n BaseContract2.getInterface = function(contractInterface) {\n if (abi_1.Interface.isInterface(contractInterface)) {\n return contractInterface;\n }\n return new abi_1.Interface(contractInterface);\n };\n BaseContract2.prototype.deployed = function() {\n return this._deployed();\n };\n BaseContract2.prototype._deployed = function(blockTag) {\n var _this = this;\n if (!this._deployedPromise) {\n if (this.deployTransaction) {\n this._deployedPromise = this.deployTransaction.wait().then(function() {\n return _this;\n });\n } else {\n this._deployedPromise = this.provider.getCode(this.address, blockTag).then(function(code) {\n if (code === \"0x\") {\n logger.throwError(\"contract not deployed\", logger_1.Logger.errors.UNSUPPORTED_OPERATION, {\n contractAddress: _this.address,\n operation: \"getDeployed\"\n });\n }\n return _this;\n });\n }\n }\n return this._deployedPromise;\n };\n BaseContract2.prototype.fallback = function(overrides) {\n var _this = this;\n if (!this.signer) {\n logger.throwError(\"sending a transactions require a signer\", logger_1.Logger.errors.UNSUPPORTED_OPERATION, { operation: \"sendTransaction(fallback)\" });\n }\n var tx = (0, properties_1.shallowCopy)(overrides || {});\n [\"from\", \"to\"].forEach(function(key) {\n if (tx[key] == null) {\n return;\n }\n logger.throwError(\"cannot override \" + key, logger_1.Logger.errors.UNSUPPORTED_OPERATION, { operation: key });\n });\n tx.to = this.resolvedAddress;\n return this.deployed().then(function() {\n return _this.signer.sendTransaction(tx);\n });\n };\n BaseContract2.prototype.connect = function(signerOrProvider) {\n if (typeof signerOrProvider === \"string\") {\n signerOrProvider = new abstract_signer_1.VoidSigner(signerOrProvider, this.provider);\n }\n var contract = new this.constructor(this.address, this.interface, signerOrProvider);\n if (this.deployTransaction) {\n (0, properties_1.defineReadOnly)(contract, \"deployTransaction\", this.deployTransaction);\n }\n return contract;\n };\n BaseContract2.prototype.attach = function(addressOrName) {\n return new this.constructor(addressOrName, this.interface, this.signer || this.provider);\n };\n BaseContract2.isIndexed = function(value) {\n return abi_1.Indexed.isIndexed(value);\n };\n BaseContract2.prototype._normalizeRunningEvent = function(runningEvent) {\n if (this._runningEvents[runningEvent.tag]) {\n return this._runningEvents[runningEvent.tag];\n }\n return runningEvent;\n };\n BaseContract2.prototype._getRunningEvent = function(eventName) {\n if (typeof eventName === \"string\") {\n if (eventName === \"error\") {\n return this._normalizeRunningEvent(new ErrorRunningEvent());\n }\n if (eventName === \"event\") {\n return this._normalizeRunningEvent(new RunningEvent(\"event\", null));\n }\n if (eventName === \"*\") {\n return this._normalizeRunningEvent(new WildcardRunningEvent(this.address, this.interface));\n }\n var fragment = this.interface.getEvent(eventName);\n return this._normalizeRunningEvent(new FragmentRunningEvent(this.address, this.interface, fragment));\n }\n if (eventName.topics && eventName.topics.length > 0) {\n try {\n var topic = eventName.topics[0];\n if (typeof topic !== \"string\") {\n throw new Error(\"invalid topic\");\n }\n var fragment = this.interface.getEvent(topic);\n return this._normalizeRunningEvent(new FragmentRunningEvent(this.address, this.interface, fragment, eventName.topics));\n } catch (error) {\n }\n var filter = {\n address: this.address,\n topics: eventName.topics\n };\n return this._normalizeRunningEvent(new RunningEvent(getEventTag(filter), filter));\n }\n return this._normalizeRunningEvent(new WildcardRunningEvent(this.address, this.interface));\n };\n BaseContract2.prototype._checkRunningEvents = function(runningEvent) {\n if (runningEvent.listenerCount() === 0) {\n delete this._runningEvents[runningEvent.tag];\n var emit2 = this._wrappedEmits[runningEvent.tag];\n if (emit2 && runningEvent.filter) {\n this.provider.off(runningEvent.filter, emit2);\n delete this._wrappedEmits[runningEvent.tag];\n }\n }\n };\n BaseContract2.prototype._wrapEvent = function(runningEvent, log, listener) {\n var _this = this;\n var event = (0, properties_1.deepCopy)(log);\n event.removeListener = function() {\n if (!listener) {\n return;\n }\n runningEvent.removeListener(listener);\n _this._checkRunningEvents(runningEvent);\n };\n event.getBlock = function() {\n return _this.provider.getBlock(log.blockHash);\n };\n event.getTransaction = function() {\n return _this.provider.getTransaction(log.transactionHash);\n };\n event.getTransactionReceipt = function() {\n return _this.provider.getTransactionReceipt(log.transactionHash);\n };\n runningEvent.prepareEvent(event);\n return event;\n };\n BaseContract2.prototype._addEventListener = function(runningEvent, listener, once2) {\n var _this = this;\n if (!this.provider) {\n logger.throwError(\"events require a provider or a signer with a provider\", logger_1.Logger.errors.UNSUPPORTED_OPERATION, { operation: \"once\" });\n }\n runningEvent.addListener(listener, once2);\n this._runningEvents[runningEvent.tag] = runningEvent;\n if (!this._wrappedEmits[runningEvent.tag]) {\n var wrappedEmit = function(log) {\n var event = _this._wrapEvent(runningEvent, log, listener);\n if (event.decodeError == null) {\n try {\n var args = runningEvent.getEmit(event);\n _this.emit.apply(_this, __spreadArray3([runningEvent.filter], args, false));\n } catch (error) {\n event.decodeError = error.error;\n }\n }\n if (runningEvent.filter != null) {\n _this.emit(\"event\", event);\n }\n if (event.decodeError != null) {\n _this.emit(\"error\", event.decodeError, event);\n }\n };\n this._wrappedEmits[runningEvent.tag] = wrappedEmit;\n if (runningEvent.filter != null) {\n this.provider.on(runningEvent.filter, wrappedEmit);\n }\n }\n };\n BaseContract2.prototype.queryFilter = function(event, fromBlockOrBlockhash, toBlock) {\n var _this = this;\n var runningEvent = this._getRunningEvent(event);\n var filter = (0, properties_1.shallowCopy)(runningEvent.filter);\n if (typeof fromBlockOrBlockhash === \"string\" && (0, bytes_1.isHexString)(fromBlockOrBlockhash, 32)) {\n if (toBlock != null) {\n logger.throwArgumentError(\"cannot specify toBlock with blockhash\", \"toBlock\", toBlock);\n }\n filter.blockHash = fromBlockOrBlockhash;\n } else {\n filter.fromBlock = fromBlockOrBlockhash != null ? fromBlockOrBlockhash : 0;\n filter.toBlock = toBlock != null ? toBlock : \"latest\";\n }\n return this.provider.getLogs(filter).then(function(logs) {\n return logs.map(function(log) {\n return _this._wrapEvent(runningEvent, log, null);\n });\n });\n };\n BaseContract2.prototype.on = function(event, listener) {\n this._addEventListener(this._getRunningEvent(event), listener, false);\n return this;\n };\n BaseContract2.prototype.once = function(event, listener) {\n this._addEventListener(this._getRunningEvent(event), listener, true);\n return this;\n };\n BaseContract2.prototype.emit = function(eventName) {\n var args = [];\n for (var _i = 1; _i < arguments.length; _i++) {\n args[_i - 1] = arguments[_i];\n }\n if (!this.provider) {\n return false;\n }\n var runningEvent = this._getRunningEvent(eventName);\n var result = runningEvent.run(args) > 0;\n this._checkRunningEvents(runningEvent);\n return result;\n };\n BaseContract2.prototype.listenerCount = function(eventName) {\n var _this = this;\n if (!this.provider) {\n return 0;\n }\n if (eventName == null) {\n return Object.keys(this._runningEvents).reduce(function(accum, key) {\n return accum + _this._runningEvents[key].listenerCount();\n }, 0);\n }\n return this._getRunningEvent(eventName).listenerCount();\n };\n BaseContract2.prototype.listeners = function(eventName) {\n if (!this.provider) {\n return [];\n }\n if (eventName == null) {\n var result_1 = [];\n for (var tag in this._runningEvents) {\n this._runningEvents[tag].listeners().forEach(function(listener) {\n result_1.push(listener);\n });\n }\n return result_1;\n }\n return this._getRunningEvent(eventName).listeners();\n };\n BaseContract2.prototype.removeAllListeners = function(eventName) {\n if (!this.provider) {\n return this;\n }\n if (eventName == null) {\n for (var tag in this._runningEvents) {\n var runningEvent_1 = this._runningEvents[tag];\n runningEvent_1.removeAllListeners();\n this._checkRunningEvents(runningEvent_1);\n }\n return this;\n }\n var runningEvent = this._getRunningEvent(eventName);\n runningEvent.removeAllListeners();\n this._checkRunningEvents(runningEvent);\n return this;\n };\n BaseContract2.prototype.off = function(eventName, listener) {\n if (!this.provider) {\n return this;\n }\n var runningEvent = this._getRunningEvent(eventName);\n runningEvent.removeListener(listener);\n this._checkRunningEvents(runningEvent);\n return this;\n };\n BaseContract2.prototype.removeListener = function(eventName, listener) {\n return this.off(eventName, listener);\n };\n return BaseContract2;\n }()\n );\n exports3.BaseContract = BaseContract;\n var Contract = (\n /** @class */\n function(_super) {\n __extends3(Contract2, _super);\n function Contract2() {\n return _super !== null && _super.apply(this, arguments) || this;\n }\n return Contract2;\n }(BaseContract)\n );\n exports3.Contract = Contract;\n var ContractFactory = (\n /** @class */\n function() {\n function ContractFactory2(contractInterface, bytecode, signer) {\n var _newTarget = this.constructor;\n var bytecodeHex = null;\n if (typeof bytecode === \"string\") {\n bytecodeHex = bytecode;\n } else if ((0, bytes_1.isBytes)(bytecode)) {\n bytecodeHex = (0, bytes_1.hexlify)(bytecode);\n } else if (bytecode && typeof bytecode.object === \"string\") {\n bytecodeHex = bytecode.object;\n } else {\n bytecodeHex = \"!\";\n }\n if (bytecodeHex.substring(0, 2) !== \"0x\") {\n bytecodeHex = \"0x\" + bytecodeHex;\n }\n if (!(0, bytes_1.isHexString)(bytecodeHex) || bytecodeHex.length % 2) {\n logger.throwArgumentError(\"invalid bytecode\", \"bytecode\", bytecode);\n }\n if (signer && !abstract_signer_1.Signer.isSigner(signer)) {\n logger.throwArgumentError(\"invalid signer\", \"signer\", signer);\n }\n (0, properties_1.defineReadOnly)(this, \"bytecode\", bytecodeHex);\n (0, properties_1.defineReadOnly)(this, \"interface\", (0, properties_1.getStatic)(_newTarget, \"getInterface\")(contractInterface));\n (0, properties_1.defineReadOnly)(this, \"signer\", signer || null);\n }\n ContractFactory2.prototype.getDeployTransaction = function() {\n var args = [];\n for (var _i = 0; _i < arguments.length; _i++) {\n args[_i] = arguments[_i];\n }\n var tx = {};\n if (args.length === this.interface.deploy.inputs.length + 1 && typeof args[args.length - 1] === \"object\") {\n tx = (0, properties_1.shallowCopy)(args.pop());\n for (var key in tx) {\n if (!allowedTransactionKeys[key]) {\n throw new Error(\"unknown transaction override \" + key);\n }\n }\n }\n [\"data\", \"from\", \"to\"].forEach(function(key2) {\n if (tx[key2] == null) {\n return;\n }\n logger.throwError(\"cannot override \" + key2, logger_1.Logger.errors.UNSUPPORTED_OPERATION, { operation: key2 });\n });\n if (tx.value) {\n var value = bignumber_1.BigNumber.from(tx.value);\n if (!value.isZero() && !this.interface.deploy.payable) {\n logger.throwError(\"non-payable constructor cannot override value\", logger_1.Logger.errors.UNSUPPORTED_OPERATION, {\n operation: \"overrides.value\",\n value: tx.value\n });\n }\n }\n logger.checkArgumentCount(args.length, this.interface.deploy.inputs.length, \" in Contract constructor\");\n tx.data = (0, bytes_1.hexlify)((0, bytes_1.concat)([\n this.bytecode,\n this.interface.encodeDeploy(args)\n ]));\n return tx;\n };\n ContractFactory2.prototype.deploy = function() {\n var args = [];\n for (var _i = 0; _i < arguments.length; _i++) {\n args[_i] = arguments[_i];\n }\n return __awaiter3(this, void 0, void 0, function() {\n var overrides, params, unsignedTx, tx, address, contract;\n return __generator3(this, function(_a) {\n switch (_a.label) {\n case 0:\n overrides = {};\n if (args.length === this.interface.deploy.inputs.length + 1) {\n overrides = args.pop();\n }\n logger.checkArgumentCount(args.length, this.interface.deploy.inputs.length, \" in Contract constructor\");\n return [4, resolveAddresses(this.signer, args, this.interface.deploy.inputs)];\n case 1:\n params = _a.sent();\n params.push(overrides);\n unsignedTx = this.getDeployTransaction.apply(this, params);\n return [4, this.signer.sendTransaction(unsignedTx)];\n case 2:\n tx = _a.sent();\n address = (0, properties_1.getStatic)(this.constructor, \"getContractAddress\")(tx);\n contract = (0, properties_1.getStatic)(this.constructor, \"getContract\")(address, this.interface, this.signer);\n addContractWait(contract, tx);\n (0, properties_1.defineReadOnly)(contract, \"deployTransaction\", tx);\n return [2, contract];\n }\n });\n });\n };\n ContractFactory2.prototype.attach = function(address) {\n return this.constructor.getContract(address, this.interface, this.signer);\n };\n ContractFactory2.prototype.connect = function(signer) {\n return new this.constructor(this.interface, this.bytecode, signer);\n };\n ContractFactory2.fromSolidity = function(compilerOutput, signer) {\n if (compilerOutput == null) {\n logger.throwError(\"missing compiler output\", logger_1.Logger.errors.MISSING_ARGUMENT, { argument: \"compilerOutput\" });\n }\n if (typeof compilerOutput === \"string\") {\n compilerOutput = JSON.parse(compilerOutput);\n }\n var abi2 = compilerOutput.abi;\n var bytecode = null;\n if (compilerOutput.bytecode) {\n bytecode = compilerOutput.bytecode;\n } else if (compilerOutput.evm && compilerOutput.evm.bytecode) {\n bytecode = compilerOutput.evm.bytecode;\n }\n return new this(abi2, bytecode, signer);\n };\n ContractFactory2.getInterface = function(contractInterface) {\n return Contract.getInterface(contractInterface);\n };\n ContractFactory2.getContractAddress = function(tx) {\n return (0, address_1.getContractAddress)(tx);\n };\n ContractFactory2.getContract = function(address, contractInterface, signer) {\n return new Contract(address, contractInterface, signer);\n };\n return ContractFactory2;\n }()\n );\n exports3.ContractFactory = ContractFactory;\n }\n });\n\n // ../../../node_modules/.pnpm/@ethersproject+basex@5.8.0/node_modules/@ethersproject/basex/lib/index.js\n var require_lib19 = __commonJS({\n \"../../../node_modules/.pnpm/@ethersproject+basex@5.8.0/node_modules/@ethersproject/basex/lib/index.js\"(exports3) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n Object.defineProperty(exports3, \"__esModule\", { value: true });\n exports3.Base58 = exports3.Base32 = exports3.BaseX = void 0;\n var bytes_1 = require_lib2();\n var properties_1 = require_lib4();\n var BaseX = (\n /** @class */\n function() {\n function BaseX2(alphabet2) {\n (0, properties_1.defineReadOnly)(this, \"alphabet\", alphabet2);\n (0, properties_1.defineReadOnly)(this, \"base\", alphabet2.length);\n (0, properties_1.defineReadOnly)(this, \"_alphabetMap\", {});\n (0, properties_1.defineReadOnly)(this, \"_leader\", alphabet2.charAt(0));\n for (var i3 = 0; i3 < alphabet2.length; i3++) {\n this._alphabetMap[alphabet2.charAt(i3)] = i3;\n }\n }\n BaseX2.prototype.encode = function(value) {\n var source = (0, bytes_1.arrayify)(value);\n if (source.length === 0) {\n return \"\";\n }\n var digits = [0];\n for (var i3 = 0; i3 < source.length; ++i3) {\n var carry = source[i3];\n for (var j2 = 0; j2 < digits.length; ++j2) {\n carry += digits[j2] << 8;\n digits[j2] = carry % this.base;\n carry = carry / this.base | 0;\n }\n while (carry > 0) {\n digits.push(carry % this.base);\n carry = carry / this.base | 0;\n }\n }\n var string2 = \"\";\n for (var k4 = 0; source[k4] === 0 && k4 < source.length - 1; ++k4) {\n string2 += this._leader;\n }\n for (var q3 = digits.length - 1; q3 >= 0; --q3) {\n string2 += this.alphabet[digits[q3]];\n }\n return string2;\n };\n BaseX2.prototype.decode = function(value) {\n if (typeof value !== \"string\") {\n throw new TypeError(\"Expected String\");\n }\n var bytes = [];\n if (value.length === 0) {\n return new Uint8Array(bytes);\n }\n bytes.push(0);\n for (var i3 = 0; i3 < value.length; i3++) {\n var byte = this._alphabetMap[value[i3]];\n if (byte === void 0) {\n throw new Error(\"Non-base\" + this.base + \" character\");\n }\n var carry = byte;\n for (var j2 = 0; j2 < bytes.length; ++j2) {\n carry += bytes[j2] * this.base;\n bytes[j2] = carry & 255;\n carry >>= 8;\n }\n while (carry > 0) {\n bytes.push(carry & 255);\n carry >>= 8;\n }\n }\n for (var k4 = 0; value[k4] === this._leader && k4 < value.length - 1; ++k4) {\n bytes.push(0);\n }\n return (0, bytes_1.arrayify)(new Uint8Array(bytes.reverse()));\n };\n return BaseX2;\n }()\n );\n exports3.BaseX = BaseX;\n var Base32 = new BaseX(\"abcdefghijklmnopqrstuvwxyz234567\");\n exports3.Base32 = Base32;\n var Base58 = new BaseX(\"123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz\");\n exports3.Base58 = Base58;\n }\n });\n\n // ../../../node_modules/.pnpm/@ethersproject+sha2@5.8.0/node_modules/@ethersproject/sha2/lib/types.js\n var require_types3 = __commonJS({\n \"../../../node_modules/.pnpm/@ethersproject+sha2@5.8.0/node_modules/@ethersproject/sha2/lib/types.js\"(exports3) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n Object.defineProperty(exports3, \"__esModule\", { value: true });\n exports3.SupportedAlgorithm = void 0;\n var SupportedAlgorithm;\n (function(SupportedAlgorithm2) {\n SupportedAlgorithm2[\"sha256\"] = \"sha256\";\n SupportedAlgorithm2[\"sha512\"] = \"sha512\";\n })(SupportedAlgorithm = exports3.SupportedAlgorithm || (exports3.SupportedAlgorithm = {}));\n }\n });\n\n // ../../../node_modules/.pnpm/@ethersproject+sha2@5.8.0/node_modules/@ethersproject/sha2/lib/_version.js\n var require_version15 = __commonJS({\n \"../../../node_modules/.pnpm/@ethersproject+sha2@5.8.0/node_modules/@ethersproject/sha2/lib/_version.js\"(exports3) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n Object.defineProperty(exports3, \"__esModule\", { value: true });\n exports3.version = void 0;\n exports3.version = \"sha2/5.8.0\";\n }\n });\n\n // ../../../node_modules/.pnpm/@ethersproject+sha2@5.8.0/node_modules/@ethersproject/sha2/lib/browser-sha2.js\n var require_browser_sha2 = __commonJS({\n \"../../../node_modules/.pnpm/@ethersproject+sha2@5.8.0/node_modules/@ethersproject/sha2/lib/browser-sha2.js\"(exports3) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n var __importDefault3 = exports3 && exports3.__importDefault || function(mod3) {\n return mod3 && mod3.__esModule ? mod3 : { \"default\": mod3 };\n };\n Object.defineProperty(exports3, \"__esModule\", { value: true });\n exports3.computeHmac = exports3.sha512 = exports3.sha256 = exports3.ripemd160 = void 0;\n var hash_js_1 = __importDefault3(require_hash());\n var bytes_1 = require_lib2();\n var types_1 = require_types3();\n var logger_1 = require_lib();\n var _version_1 = require_version15();\n var logger = new logger_1.Logger(_version_1.version);\n function ripemd1602(data) {\n return \"0x\" + hash_js_1.default.ripemd160().update((0, bytes_1.arrayify)(data)).digest(\"hex\");\n }\n exports3.ripemd160 = ripemd1602;\n function sha2564(data) {\n return \"0x\" + hash_js_1.default.sha256().update((0, bytes_1.arrayify)(data)).digest(\"hex\");\n }\n exports3.sha256 = sha2564;\n function sha5122(data) {\n return \"0x\" + hash_js_1.default.sha512().update((0, bytes_1.arrayify)(data)).digest(\"hex\");\n }\n exports3.sha512 = sha5122;\n function computeHmac(algorithm, key, data) {\n if (!types_1.SupportedAlgorithm[algorithm]) {\n logger.throwError(\"unsupported algorithm \" + algorithm, logger_1.Logger.errors.UNSUPPORTED_OPERATION, {\n operation: \"hmac\",\n algorithm\n });\n }\n return \"0x\" + hash_js_1.default.hmac(hash_js_1.default[algorithm], (0, bytes_1.arrayify)(key)).update((0, bytes_1.arrayify)(data)).digest(\"hex\");\n }\n exports3.computeHmac = computeHmac;\n }\n });\n\n // ../../../node_modules/.pnpm/@ethersproject+sha2@5.8.0/node_modules/@ethersproject/sha2/lib/index.js\n var require_lib20 = __commonJS({\n \"../../../node_modules/.pnpm/@ethersproject+sha2@5.8.0/node_modules/@ethersproject/sha2/lib/index.js\"(exports3) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n Object.defineProperty(exports3, \"__esModule\", { value: true });\n exports3.SupportedAlgorithm = exports3.sha512 = exports3.sha256 = exports3.ripemd160 = exports3.computeHmac = void 0;\n var sha2_1 = require_browser_sha2();\n Object.defineProperty(exports3, \"computeHmac\", { enumerable: true, get: function() {\n return sha2_1.computeHmac;\n } });\n Object.defineProperty(exports3, \"ripemd160\", { enumerable: true, get: function() {\n return sha2_1.ripemd160;\n } });\n Object.defineProperty(exports3, \"sha256\", { enumerable: true, get: function() {\n return sha2_1.sha256;\n } });\n Object.defineProperty(exports3, \"sha512\", { enumerable: true, get: function() {\n return sha2_1.sha512;\n } });\n var types_1 = require_types3();\n Object.defineProperty(exports3, \"SupportedAlgorithm\", { enumerable: true, get: function() {\n return types_1.SupportedAlgorithm;\n } });\n }\n });\n\n // ../../../node_modules/.pnpm/@ethersproject+pbkdf2@5.8.0/node_modules/@ethersproject/pbkdf2/lib/browser-pbkdf2.js\n var require_browser_pbkdf2 = __commonJS({\n \"../../../node_modules/.pnpm/@ethersproject+pbkdf2@5.8.0/node_modules/@ethersproject/pbkdf2/lib/browser-pbkdf2.js\"(exports3) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n Object.defineProperty(exports3, \"__esModule\", { value: true });\n exports3.pbkdf2 = void 0;\n var bytes_1 = require_lib2();\n var sha2_1 = require_lib20();\n function pbkdf22(password, salt, iterations, keylen, hashAlgorithm) {\n password = (0, bytes_1.arrayify)(password);\n salt = (0, bytes_1.arrayify)(salt);\n var hLen;\n var l6 = 1;\n var DK = new Uint8Array(keylen);\n var block1 = new Uint8Array(salt.length + 4);\n block1.set(salt);\n var r2;\n var T4;\n for (var i3 = 1; i3 <= l6; i3++) {\n block1[salt.length] = i3 >> 24 & 255;\n block1[salt.length + 1] = i3 >> 16 & 255;\n block1[salt.length + 2] = i3 >> 8 & 255;\n block1[salt.length + 3] = i3 & 255;\n var U4 = (0, bytes_1.arrayify)((0, sha2_1.computeHmac)(hashAlgorithm, password, block1));\n if (!hLen) {\n hLen = U4.length;\n T4 = new Uint8Array(hLen);\n l6 = Math.ceil(keylen / hLen);\n r2 = keylen - (l6 - 1) * hLen;\n }\n T4.set(U4);\n for (var j2 = 1; j2 < iterations; j2++) {\n U4 = (0, bytes_1.arrayify)((0, sha2_1.computeHmac)(hashAlgorithm, password, U4));\n for (var k4 = 0; k4 < hLen; k4++)\n T4[k4] ^= U4[k4];\n }\n var destPos = (i3 - 1) * hLen;\n var len = i3 === l6 ? r2 : hLen;\n DK.set((0, bytes_1.arrayify)(T4).slice(0, len), destPos);\n }\n return (0, bytes_1.hexlify)(DK);\n }\n exports3.pbkdf2 = pbkdf22;\n }\n });\n\n // ../../../node_modules/.pnpm/@ethersproject+pbkdf2@5.8.0/node_modules/@ethersproject/pbkdf2/lib/index.js\n var require_lib21 = __commonJS({\n \"../../../node_modules/.pnpm/@ethersproject+pbkdf2@5.8.0/node_modules/@ethersproject/pbkdf2/lib/index.js\"(exports3) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n Object.defineProperty(exports3, \"__esModule\", { value: true });\n exports3.pbkdf2 = void 0;\n var pbkdf2_1 = require_browser_pbkdf2();\n Object.defineProperty(exports3, \"pbkdf2\", { enumerable: true, get: function() {\n return pbkdf2_1.pbkdf2;\n } });\n }\n });\n\n // ../../../node_modules/.pnpm/@ethersproject+wordlists@5.8.0/node_modules/@ethersproject/wordlists/lib/_version.js\n var require_version16 = __commonJS({\n \"../../../node_modules/.pnpm/@ethersproject+wordlists@5.8.0/node_modules/@ethersproject/wordlists/lib/_version.js\"(exports3) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n Object.defineProperty(exports3, \"__esModule\", { value: true });\n exports3.version = void 0;\n exports3.version = \"wordlists/5.8.0\";\n }\n });\n\n // ../../../node_modules/.pnpm/@ethersproject+wordlists@5.8.0/node_modules/@ethersproject/wordlists/lib/wordlist.js\n var require_wordlist = __commonJS({\n \"../../../node_modules/.pnpm/@ethersproject+wordlists@5.8.0/node_modules/@ethersproject/wordlists/lib/wordlist.js\"(exports3) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n Object.defineProperty(exports3, \"__esModule\", { value: true });\n exports3.Wordlist = exports3.logger = void 0;\n var exportWordlist = false;\n var hash_1 = require_lib12();\n var properties_1 = require_lib4();\n var logger_1 = require_lib();\n var _version_1 = require_version16();\n exports3.logger = new logger_1.Logger(_version_1.version);\n var Wordlist = (\n /** @class */\n function() {\n function Wordlist2(locale) {\n var _newTarget = this.constructor;\n exports3.logger.checkAbstract(_newTarget, Wordlist2);\n (0, properties_1.defineReadOnly)(this, \"locale\", locale);\n }\n Wordlist2.prototype.split = function(mnemonic) {\n return mnemonic.toLowerCase().split(/ +/g);\n };\n Wordlist2.prototype.join = function(words) {\n return words.join(\" \");\n };\n Wordlist2.check = function(wordlist) {\n var words = [];\n for (var i3 = 0; i3 < 2048; i3++) {\n var word = wordlist.getWord(i3);\n if (i3 !== wordlist.getWordIndex(word)) {\n return \"0x\";\n }\n words.push(word);\n }\n return (0, hash_1.id)(words.join(\"\\n\") + \"\\n\");\n };\n Wordlist2.register = function(lang, name) {\n if (!name) {\n name = lang.locale;\n }\n if (exportWordlist) {\n try {\n var anyGlobal = window;\n if (anyGlobal._ethers && anyGlobal._ethers.wordlists) {\n if (!anyGlobal._ethers.wordlists[name]) {\n (0, properties_1.defineReadOnly)(anyGlobal._ethers.wordlists, name, lang);\n }\n }\n } catch (error) {\n }\n }\n };\n return Wordlist2;\n }()\n );\n exports3.Wordlist = Wordlist;\n }\n });\n\n // ../../../node_modules/.pnpm/@ethersproject+wordlists@5.8.0/node_modules/@ethersproject/wordlists/lib/lang-cz.js\n var require_lang_cz = __commonJS({\n \"../../../node_modules/.pnpm/@ethersproject+wordlists@5.8.0/node_modules/@ethersproject/wordlists/lib/lang-cz.js\"(exports3) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n var __extends3 = exports3 && exports3.__extends || /* @__PURE__ */ function() {\n var extendStatics3 = function(d5, b4) {\n extendStatics3 = Object.setPrototypeOf || { __proto__: [] } instanceof Array && function(d6, b5) {\n d6.__proto__ = b5;\n } || function(d6, b5) {\n for (var p4 in b5)\n if (Object.prototype.hasOwnProperty.call(b5, p4))\n d6[p4] = b5[p4];\n };\n return extendStatics3(d5, b4);\n };\n return function(d5, b4) {\n if (typeof b4 !== \"function\" && b4 !== null)\n throw new TypeError(\"Class extends value \" + String(b4) + \" is not a constructor or null\");\n extendStatics3(d5, b4);\n function __() {\n this.constructor = d5;\n }\n d5.prototype = b4 === null ? Object.create(b4) : (__.prototype = b4.prototype, new __());\n };\n }();\n Object.defineProperty(exports3, \"__esModule\", { value: true });\n exports3.langCz = void 0;\n var wordlist_1 = require_wordlist();\n var words = \"AbdikaceAbecedaAdresaAgreseAkceAktovkaAlejAlkoholAmputaceAnanasAndulkaAnekdotaAnketaAntikaAnulovatArchaAroganceAsfaltAsistentAspiraceAstmaAstronomAtlasAtletikaAtolAutobusAzylBabkaBachorBacilBaculkaBadatelBagetaBagrBahnoBakterieBaladaBaletkaBalkonBalonekBalvanBalzaBambusBankomatBarbarBaretBarmanBarokoBarvaBaterkaBatohBavlnaBazalkaBazilikaBazukaBednaBeranBesedaBestieBetonBezinkaBezmocBeztakBicyklBidloBiftekBikinyBilanceBiografBiologBitvaBizonBlahobytBlatouchBlechaBleduleBleskBlikatBliznaBlokovatBlouditBludBobekBobrBodlinaBodnoutBohatostBojkotBojovatBokorysBolestBorecBoroviceBotaBoubelBouchatBoudaBouleBouratBoxerBradavkaBramboraBrankaBratrBreptaBriketaBrkoBrlohBronzBroskevBrunetkaBrusinkaBrzdaBrzyBublinaBubnovatBuchtaBuditelBudkaBudovaBufetBujarostBukviceBuldokBulvaBundaBunkrBurzaButikBuvolBuzolaBydletBylinaBytovkaBzukotCapartCarevnaCedrCeduleCejchCejnCelaCelerCelkemCelniceCeninaCennostCenovkaCentrumCenzorCestopisCetkaChalupaChapadloCharitaChataChechtatChemieChichotChirurgChladChlebaChlubitChmelChmuraChobotChocholChodbaCholeraChomoutChopitChorobaChovChrapotChrlitChrtChrupChtivostChudinaChutnatChvatChvilkaChvostChybaChystatChytitCibuleCigaretaCihelnaCihlaCinkotCirkusCisternaCitaceCitrusCizinecCizostClonaCokolivCouvatCtitelCtnostCudnostCuketaCukrCupotCvaknoutCvalCvikCvrkotCyklistaDalekoDarebaDatelDatumDceraDebataDechovkaDecibelDeficitDeflaceDeklDekretDemokratDepreseDerbyDeskaDetektivDikobrazDiktovatDiodaDiplomDiskDisplejDivadloDivochDlahaDlouhoDluhopisDnesDobroDobytekDocentDochutitDodnesDohledDohodaDohraDojemDojniceDokladDokolaDoktorDokumentDolarDolevaDolinaDomaDominantDomluvitDomovDonutitDopadDopisDoplnitDoposudDoprovodDopustitDorazitDorostDortDosahDoslovDostatekDosudDosytaDotazDotekDotknoutDoufatDoutnatDovozceDozaduDoznatDozorceDrahotaDrakDramatikDravecDrazeDrdolDrobnostDrogerieDrozdDrsnostDrtitDrzostDubenDuchovnoDudekDuhaDuhovkaDusitDusnoDutostDvojiceDvorecDynamitEkologEkonomieElektronElipsaEmailEmiseEmoceEmpatieEpizodaEpochaEpopejEposEsejEsenceEskortaEskymoEtiketaEuforieEvoluceExekuceExkurzeExpediceExplozeExportExtraktFackaFajfkaFakultaFanatikFantazieFarmacieFavoritFazoleFederaceFejetonFenkaFialkaFigurantFilozofFiltrFinanceFintaFixaceFjordFlanelFlirtFlotilaFondFosforFotbalFotkaFotonFrakceFreskaFrontaFukarFunkceFyzikaGalejeGarantGenetikaGeologGilotinaGlazuraGlejtGolemGolfistaGotikaGrafGramofonGranuleGrepGrilGrogGroteskaGumaHadiceHadrHalaHalenkaHanbaHanopisHarfaHarpunaHavranHebkostHejkalHejnoHejtmanHektarHelmaHematomHerecHernaHesloHezkyHistorikHladovkaHlasivkyHlavaHledatHlenHlodavecHlohHloupostHltatHlubinaHluchotaHmatHmotaHmyzHnisHnojivoHnoutHoblinaHobojHochHodinyHodlatHodnotaHodovatHojnostHokejHolinkaHolkaHolubHomoleHonitbaHonoraceHoralHordaHorizontHorkoHorlivecHormonHorninaHoroskopHorstvoHospodaHostinaHotovostHoubaHoufHoupatHouskaHovorHradbaHraniceHravostHrazdaHrbolekHrdinaHrdloHrdostHrnekHrobkaHromadaHrotHroudaHrozenHrstkaHrubostHryzatHubenostHubnoutHudbaHukotHumrHusitaHustotaHvozdHybnostHydrantHygienaHymnaHysterikIdylkaIhnedIkonaIluzeImunitaInfekceInflaceInkasoInovaceInspekceInternetInvalidaInvestorInzerceIronieJablkoJachtaJahodaJakmileJakostJalovecJantarJarmarkJaroJasanJasnoJatkaJavorJazykJedinecJedleJednatelJehlanJekotJelenJelitoJemnostJenomJepiceJeseterJevitJezdecJezeroJinakJindyJinochJiskraJistotaJitrniceJizvaJmenovatJogurtJurtaKabaretKabelKabinetKachnaKadetKadidloKahanKajakKajutaKakaoKaktusKalamitaKalhotyKalibrKalnostKameraKamkolivKamnaKanibalKanoeKantorKapalinaKapelaKapitolaKapkaKapleKapotaKaprKapustaKapybaraKaramelKarotkaKartonKasaKatalogKatedraKauceKauzaKavalecKazajkaKazetaKazivostKdekolivKdesiKedlubenKempKeramikaKinoKlacekKladivoKlamKlapotKlasikaKlaunKlecKlenbaKlepatKlesnoutKlidKlimaKlisnaKloboukKlokanKlopaKloubKlubovnaKlusatKluzkostKmenKmitatKmotrKnihaKnotKoaliceKoberecKobkaKoblihaKobylaKocourKohoutKojenecKokosKoktejlKolapsKoledaKolizeKoloKomandoKometaKomikKomnataKomoraKompasKomunitaKonatKonceptKondiceKonecKonfeseKongresKoninaKonkursKontaktKonzervaKopanecKopieKopnoutKoprovkaKorbelKorektorKormidloKoroptevKorpusKorunaKorytoKorzetKosatecKostkaKotelKotletaKotoulKoukatKoupelnaKousekKouzloKovbojKozaKozorohKrabiceKrachKrajinaKralovatKrasopisKravataKreditKrejcarKresbaKrevetaKriketKritikKrizeKrkavecKrmelecKrmivoKrocanKrokKronikaKropitKroupaKrovkaKrtekKruhadloKrupiceKrutostKrvinkaKrychleKryptaKrystalKrytKudlankaKufrKujnostKuklaKulajdaKulichKulkaKulometKulturaKunaKupodivuKurtKurzorKutilKvalitaKvasinkaKvestorKynologKyselinaKytaraKyticeKytkaKytovecKyvadloLabradorLachtanLadnostLaikLakomecLamelaLampaLanovkaLasiceLasoLasturaLatinkaLavinaLebkaLeckdyLedenLedniceLedovkaLedvinaLegendaLegieLegraceLehceLehkostLehnoutLektvarLenochodLentilkaLepenkaLepidloLetadloLetecLetmoLetokruhLevhartLevitaceLevobokLibraLichotkaLidojedLidskostLihovinaLijavecLilekLimetkaLinieLinkaLinoleumListopadLitinaLitovatLobistaLodivodLogikaLogopedLokalitaLoketLomcovatLopataLopuchLordLososLotrLoudalLouhLoukaLouskatLovecLstivostLucernaLuciferLumpLuskLustraceLviceLyraLyrikaLysinaMadamMadloMagistrMahagonMajetekMajitelMajoritaMakakMakoviceMakrelaMalbaMalinaMalovatMalviceMaminkaMandleMankoMarnostMasakrMaskotMasopustMaticeMatrikaMaturitaMazanecMazivoMazlitMazurkaMdlobaMechanikMeditaceMedovinaMelasaMelounMentolkaMetlaMetodaMetrMezeraMigraceMihnoutMihuleMikinaMikrofonMilenecMilimetrMilostMimikaMincovnaMinibarMinometMinulostMiskaMistrMixovatMladostMlhaMlhovinaMlokMlsatMluvitMnichMnohemMobilMocnostModelkaModlitbaMohylaMokroMolekulaMomentkaMonarchaMonoklMonstrumMontovatMonzunMosazMoskytMostMotivaceMotorkaMotykaMouchaMoudrostMozaikaMozekMozolMramorMravenecMrkevMrtvolaMrzetMrzutostMstitelMudrcMuflonMulatMumieMuniceMusetMutaceMuzeumMuzikantMyslivecMzdaNabouratNachytatNadaceNadbytekNadhozNadobroNadpisNahlasNahnatNahodileNahraditNaivitaNajednouNajistoNajmoutNaklonitNakonecNakrmitNalevoNamazatNamluvitNanometrNaokoNaopakNaostroNapadatNapevnoNaplnitNapnoutNaposledNaprostoNaroditNarubyNarychloNasaditNasekatNaslepoNastatNatolikNavenekNavrchNavzdoryNazvatNebeNechatNeckyNedalekoNedbatNeduhNegaceNehetNehodaNejenNejprveNeklidNelibostNemilostNemocNeochotaNeonkaNepokojNerostNervNesmyslNesouladNetvorNeuronNevinaNezvykleNicotaNijakNikamNikdyNiklNikterakNitroNoclehNohaviceNominaceNoraNorekNositelNosnostNouzeNovinyNovotaNozdraNudaNudleNugetNutitNutnostNutrieNymfaObalObarvitObavaObdivObecObehnatObejmoutObezitaObhajobaObilniceObjasnitObjektObklopitOblastOblekOblibaOblohaObludaObnosObohatitObojekOboutObrazecObrnaObrubaObrysObsahObsluhaObstaratObuvObvazObvinitObvodObvykleObyvatelObzorOcasOcelOcenitOchladitOchotaOchranaOcitnoutOdbojOdbytOdchodOdcizitOdebratOdeslatOdevzdatOdezvaOdhadceOdhoditOdjetOdjinudOdkazOdkoupitOdlivOdlukaOdmlkaOdolnostOdpadOdpisOdploutOdporOdpustitOdpykatOdrazkaOdsouditOdstupOdsunOdtokOdtudOdvahaOdvetaOdvolatOdvracetOdznakOfinaOfsajdOhlasOhniskoOhradaOhrozitOhryzekOkapOkeniceOklikaOknoOkouzlitOkovyOkrasaOkresOkrsekOkruhOkupantOkurkaOkusitOlejninaOlizovatOmakOmeletaOmezitOmladinaOmlouvatOmluvaOmylOnehdyOpakovatOpasekOperaceOpiceOpilostOpisovatOporaOpoziceOpravduOprotiOrbitalOrchestrOrgieOrliceOrlojOrtelOsadaOschnoutOsikaOsivoOslavaOslepitOslnitOslovitOsnovaOsobaOsolitOspalecOstenOstrahaOstudaOstychOsvojitOteplitOtiskOtopOtrhatOtrlostOtrokOtrubyOtvorOvanoutOvarOvesOvlivnitOvoceOxidOzdobaPachatelPacientPadouchPahorekPaktPalandaPalecPalivoPalubaPamfletPamlsekPanenkaPanikaPannaPanovatPanstvoPantoflePaprikaParketaParodiePartaParukaParybaPasekaPasivitaPastelkaPatentPatronaPavoukPaznehtPazourekPeckaPedagogPejsekPekloPelotonPenaltaPendrekPenzePeriskopPeroPestrostPetardaPeticePetrolejPevninaPexesoPianistaPihaPijavicePiklePiknikPilinaPilnostPilulkaPinzetaPipetaPisatelPistolePitevnaPivnicePivovarPlacentaPlakatPlamenPlanetaPlastikaPlatitPlavidloPlazPlechPlemenoPlentaPlesPletivoPlevelPlivatPlnitPlnoPlochaPlodinaPlombaPloutPlukPlynPobavitPobytPochodPocitPoctivecPodatPodcenitPodepsatPodhledPodivitPodkladPodmanitPodnikPodobaPodporaPodrazPodstataPodvodPodzimPoeziePohankaPohnutkaPohovorPohromaPohybPointaPojistkaPojmoutPokazitPoklesPokojPokrokPokutaPokynPolednePolibekPolknoutPolohaPolynomPomaluPominoutPomlkaPomocPomstaPomysletPonechatPonorkaPonurostPopadatPopelPopisekPoplachPoprositPopsatPopudPoradcePorcePorodPoruchaPoryvPosaditPosedPosilaPoskokPoslanecPosouditPospoluPostavaPosudekPosypPotahPotkanPotleskPotomekPotravaPotupaPotvoraPoukazPoutoPouzdroPovahaPovidlaPovlakPovozPovrchPovstatPovykPovzdechPozdravPozemekPoznatekPozorPozvatPracovatPrahoryPraktikaPralesPraotecPraporekPrasePravdaPrincipPrknoProbuditProcentoProdejProfeseProhraProjektProlomitPromilePronikatPropadProrokProsbaProtonProutekProvazPrskavkaPrstenPrudkostPrutPrvekPrvohoryPsanecPsovodPstruhPtactvoPubertaPuchPudlPukavecPuklinaPukrlePultPumpaPuncPupenPusaPusinkaPustinaPutovatPutykaPyramidaPyskPytelRacekRachotRadiaceRadniceRadonRaftRagbyRaketaRakovinaRamenoRampouchRandeRarachRaritaRasovnaRastrRatolestRazanceRazidloReagovatReakceReceptRedaktorReferentReflexRejnokReklamaRekordRekrutRektorReputaceRevizeRevmaRevolverRezervaRiskovatRizikoRobotikaRodokmenRohovkaRokleRokokoRomanetoRopovodRopuchaRorejsRosolRostlinaRotmistrRotopedRotundaRoubenkaRouchoRoupRouraRovinaRovniceRozborRozchodRozdatRozeznatRozhodceRozinkaRozjezdRozkazRozlohaRozmarRozpadRozruchRozsahRoztokRozumRozvodRubrikaRuchadloRukaviceRukopisRybaRybolovRychlostRydloRypadloRytinaRyzostSadistaSahatSakoSamecSamizdatSamotaSanitkaSardinkaSasankaSatelitSazbaSazeniceSborSchovatSebrankaSeceseSedadloSedimentSedloSehnatSejmoutSekeraSektaSekundaSekvojeSemenoSenoServisSesaditSeshoraSeskokSeslatSestraSesuvSesypatSetbaSetinaSetkatSetnoutSetrvatSeverSeznamShodaShrnoutSifonSilniceSirkaSirotekSirupSituaceSkafandrSkaliskoSkanzenSkautSkeptikSkicaSkladbaSkleniceSkloSkluzSkobaSkokanSkoroSkriptaSkrzSkupinaSkvostSkvrnaSlabikaSladidloSlaninaSlastSlavnostSledovatSlepecSlevaSlezinaSlibSlinaSlizniceSlonSloupekSlovoSluchSluhaSlunceSlupkaSlzaSmaragdSmetanaSmilstvoSmlouvaSmogSmradSmrkSmrtkaSmutekSmyslSnadSnahaSnobSobotaSochaSodovkaSokolSopkaSotvaSoubojSoucitSoudceSouhlasSouladSoumrakSoupravaSousedSoutokSouvisetSpalovnaSpasitelSpisSplavSpodekSpojenecSpoluSponzorSpornostSpoustaSprchaSpustitSrandaSrazSrdceSrnaSrnecSrovnatSrpenSrstSrubStaniceStarostaStatikaStavbaStehnoStezkaStodolaStolekStopaStornoStoupatStrachStresStrhnoutStromStrunaStudnaStupniceStvolStykSubjektSubtropySucharSudostSuknoSundatSunoutSurikataSurovinaSvahSvalstvoSvetrSvatbaSvazekSvisleSvitekSvobodaSvodidloSvorkaSvrabSykavkaSykotSynekSynovecSypatSypkostSyrovostSyselSytostTabletkaTabuleTahounTajemnoTajfunTajgaTajitTajnostTaktikaTamhleTamponTancovatTanecTankerTapetaTaveninaTazatelTechnikaTehdyTekutinaTelefonTemnotaTendenceTenistaTenorTeplotaTepnaTeprveTerapieTermoskaTextilTichoTiskopisTitulekTkadlecTkaninaTlapkaTleskatTlukotTlupaTmelToaletaTopinkaTopolTorzoTouhaToulecTradiceTraktorTrampTrasaTraverzaTrefitTrestTrezorTrhavinaTrhlinaTrochuTrojiceTroskaTroubaTrpceTrpitelTrpkostTrubecTruchlitTruhliceTrusTrvatTudyTuhnoutTuhostTundraTuristaTurnajTuzemskoTvarohTvorbaTvrdostTvrzTygrTykevUbohostUbozeUbratUbrousekUbrusUbytovnaUchoUctivostUdivitUhraditUjednatUjistitUjmoutUkazatelUklidnitUklonitUkotvitUkrojitUliceUlitaUlovitUmyvadloUnavitUniformaUniknoutUpadnoutUplatnitUplynoutUpoutatUpravitUranUrazitUsednoutUsilovatUsmrtitUsnadnitUsnoutUsouditUstlatUstrnoutUtahovatUtkatUtlumitUtonoutUtopenecUtrousitUvalitUvolnitUvozovkaUzdravitUzelUzeninaUzlinaUznatVagonValchaValounVanaVandalVanilkaVaranVarhanyVarovatVcelkuVchodVdovaVedroVegetaceVejceVelbloudVeletrhVelitelVelmocVelrybaVenkovVerandaVerzeVeselkaVeskrzeVesniceVespoduVestaVeterinaVeverkaVibraceVichrVideohraVidinaVidleVilaViniceVisetVitalitaVizeVizitkaVjezdVkladVkusVlajkaVlakVlasecVlevoVlhkostVlivVlnovkaVloupatVnucovatVnukVodaVodivostVodoznakVodstvoVojenskyVojnaVojskoVolantVolbaVolitVolnoVoskovkaVozidloVozovnaVpravoVrabecVracetVrahVrataVrbaVrcholekVrhatVrstvaVrtuleVsaditVstoupitVstupVtipVybavitVybratVychovatVydatVydraVyfotitVyhledatVyhnoutVyhoditVyhraditVyhubitVyjasnitVyjetVyjmoutVyklopitVykonatVylekatVymazatVymezitVymizetVymysletVynechatVynikatVynutitVypadatVyplatitVypravitVypustitVyrazitVyrovnatVyrvatVyslovitVysokoVystavitVysunoutVysypatVytasitVytesatVytratitVyvinoutVyvolatVyvrhelVyzdobitVyznatVzaduVzbuditVzchopitVzdorVzduchVzdychatVzestupVzhledemVzkazVzlykatVznikVzorekVzpouraVztahVztekXylofonZabratZabydletZachovatZadarmoZadusitZafoukatZahltitZahoditZahradaZahynoutZajatecZajetZajistitZaklepatZakoupitZalepitZamezitZamotatZamysletZanechatZanikatZaplatitZapojitZapsatZarazitZastavitZasunoutZatajitZatemnitZatknoutZaujmoutZavalitZaveletZavinitZavolatZavrtatZazvonitZbavitZbrusuZbudovatZbytekZdalekaZdarmaZdatnostZdivoZdobitZdrojZdvihZdymadloZeleninaZemanZeminaZeptatZezaduZezdolaZhatitZhltnoutZhlubokaZhotovitZhrubaZimaZimniceZjemnitZklamatZkoumatZkratkaZkumavkaZlatoZlehkaZlobaZlomZlostZlozvykZmapovatZmarZmatekZmijeZmizetZmocnitZmodratZmrzlinaZmutovatZnakZnalostZnamenatZnovuZobrazitZotavitZoubekZoufaleZploditZpomalitZpravaZprostitZprudkaZprvuZradaZranitZrcadloZrnitostZrnoZrovnaZrychlitZrzavostZtichaZtratitZubovinaZubrZvednoutZvenkuZveselaZvonZvratZvukovodZvyk\";\n var wordlist = null;\n function loadWords(lang) {\n if (wordlist != null) {\n return;\n }\n wordlist = words.replace(/([A-Z])/g, \" $1\").toLowerCase().substring(1).split(\" \");\n if (wordlist_1.Wordlist.check(lang) !== \"0x25f44555f4af25b51a711136e1c7d6e50ce9f8917d39d6b1f076b2bb4d2fac1a\") {\n wordlist = null;\n throw new Error(\"BIP39 Wordlist for en (English) FAILED\");\n }\n }\n var LangCz = (\n /** @class */\n function(_super) {\n __extends3(LangCz2, _super);\n function LangCz2() {\n return _super.call(this, \"cz\") || this;\n }\n LangCz2.prototype.getWord = function(index2) {\n loadWords(this);\n return wordlist[index2];\n };\n LangCz2.prototype.getWordIndex = function(word) {\n loadWords(this);\n return wordlist.indexOf(word);\n };\n return LangCz2;\n }(wordlist_1.Wordlist)\n );\n var langCz = new LangCz();\n exports3.langCz = langCz;\n wordlist_1.Wordlist.register(langCz);\n }\n });\n\n // ../../../node_modules/.pnpm/@ethersproject+wordlists@5.8.0/node_modules/@ethersproject/wordlists/lib/lang-en.js\n var require_lang_en = __commonJS({\n \"../../../node_modules/.pnpm/@ethersproject+wordlists@5.8.0/node_modules/@ethersproject/wordlists/lib/lang-en.js\"(exports3) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n var __extends3 = exports3 && exports3.__extends || /* @__PURE__ */ function() {\n var extendStatics3 = function(d5, b4) {\n extendStatics3 = Object.setPrototypeOf || { __proto__: [] } instanceof Array && function(d6, b5) {\n d6.__proto__ = b5;\n } || function(d6, b5) {\n for (var p4 in b5)\n if (Object.prototype.hasOwnProperty.call(b5, p4))\n d6[p4] = b5[p4];\n };\n return extendStatics3(d5, b4);\n };\n return function(d5, b4) {\n if (typeof b4 !== \"function\" && b4 !== null)\n throw new TypeError(\"Class extends value \" + String(b4) + \" is not a constructor or null\");\n extendStatics3(d5, b4);\n function __() {\n this.constructor = d5;\n }\n d5.prototype = b4 === null ? Object.create(b4) : (__.prototype = b4.prototype, new __());\n };\n }();\n Object.defineProperty(exports3, \"__esModule\", { value: true });\n exports3.langEn = void 0;\n var wordlist_1 = require_wordlist();\n var words = \"AbandonAbilityAbleAboutAboveAbsentAbsorbAbstractAbsurdAbuseAccessAccidentAccountAccuseAchieveAcidAcousticAcquireAcrossActActionActorActressActualAdaptAddAddictAddressAdjustAdmitAdultAdvanceAdviceAerobicAffairAffordAfraidAgainAgeAgentAgreeAheadAimAirAirportAisleAlarmAlbumAlcoholAlertAlienAllAlleyAllowAlmostAloneAlphaAlreadyAlsoAlterAlwaysAmateurAmazingAmongAmountAmusedAnalystAnchorAncientAngerAngleAngryAnimalAnkleAnnounceAnnualAnotherAnswerAntennaAntiqueAnxietyAnyApartApologyAppearAppleApproveAprilArchArcticAreaArenaArgueArmArmedArmorArmyAroundArrangeArrestArriveArrowArtArtefactArtistArtworkAskAspectAssaultAssetAssistAssumeAsthmaAthleteAtomAttackAttendAttitudeAttractAuctionAuditAugustAuntAuthorAutoAutumnAverageAvocadoAvoidAwakeAwareAwayAwesomeAwfulAwkwardAxisBabyBachelorBaconBadgeBagBalanceBalconyBallBambooBananaBannerBarBarelyBargainBarrelBaseBasicBasketBattleBeachBeanBeautyBecauseBecomeBeefBeforeBeginBehaveBehindBelieveBelowBeltBenchBenefitBestBetrayBetterBetweenBeyondBicycleBidBikeBindBiologyBirdBirthBitterBlackBladeBlameBlanketBlastBleakBlessBlindBloodBlossomBlouseBlueBlurBlushBoardBoatBodyBoilBombBoneBonusBookBoostBorderBoringBorrowBossBottomBounceBoxBoyBracketBrainBrandBrassBraveBreadBreezeBrickBridgeBriefBrightBringBriskBroccoliBrokenBronzeBroomBrotherBrownBrushBubbleBuddyBudgetBuffaloBuildBulbBulkBulletBundleBunkerBurdenBurgerBurstBusBusinessBusyButterBuyerBuzzCabbageCabinCableCactusCageCakeCallCalmCameraCampCanCanalCancelCandyCannonCanoeCanvasCanyonCapableCapitalCaptainCarCarbonCardCargoCarpetCarryCartCaseCashCasinoCastleCasualCatCatalogCatchCategoryCattleCaughtCauseCautionCaveCeilingCeleryCementCensusCenturyCerealCertainChairChalkChampionChangeChaosChapterChargeChaseChatCheapCheckCheeseChefCherryChestChickenChiefChildChimneyChoiceChooseChronicChuckleChunkChurnCigarCinnamonCircleCitizenCityCivilClaimClapClarifyClawClayCleanClerkCleverClickClientCliffClimbClinicClipClockClogCloseClothCloudClownClubClumpClusterClutchCoachCoastCoconutCodeCoffeeCoilCoinCollectColorColumnCombineComeComfortComicCommonCompanyConcertConductConfirmCongressConnectConsiderControlConvinceCookCoolCopperCopyCoralCoreCornCorrectCostCottonCouchCountryCoupleCourseCousinCoverCoyoteCrackCradleCraftCramCraneCrashCraterCrawlCrazyCreamCreditCreekCrewCricketCrimeCrispCriticCropCrossCrouchCrowdCrucialCruelCruiseCrumbleCrunchCrushCryCrystalCubeCultureCupCupboardCuriousCurrentCurtainCurveCushionCustomCuteCycleDadDamageDampDanceDangerDaringDashDaughterDawnDayDealDebateDebrisDecadeDecemberDecideDeclineDecorateDecreaseDeerDefenseDefineDefyDegreeDelayDeliverDemandDemiseDenialDentistDenyDepartDependDepositDepthDeputyDeriveDescribeDesertDesignDeskDespairDestroyDetailDetectDevelopDeviceDevoteDiagramDialDiamondDiaryDiceDieselDietDifferDigitalDignityDilemmaDinnerDinosaurDirectDirtDisagreeDiscoverDiseaseDishDismissDisorderDisplayDistanceDivertDivideDivorceDizzyDoctorDocumentDogDollDolphinDomainDonateDonkeyDonorDoorDoseDoubleDoveDraftDragonDramaDrasticDrawDreamDressDriftDrillDrinkDripDriveDropDrumDryDuckDumbDuneDuringDustDutchDutyDwarfDynamicEagerEagleEarlyEarnEarthEasilyEastEasyEchoEcologyEconomyEdgeEditEducateEffortEggEightEitherElbowElderElectricElegantElementElephantElevatorEliteElseEmbarkEmbodyEmbraceEmergeEmotionEmployEmpowerEmptyEnableEnactEndEndlessEndorseEnemyEnergyEnforceEngageEngineEnhanceEnjoyEnlistEnoughEnrichEnrollEnsureEnterEntireEntryEnvelopeEpisodeEqualEquipEraEraseErodeErosionErrorEruptEscapeEssayEssenceEstateEternalEthicsEvidenceEvilEvokeEvolveExactExampleExcessExchangeExciteExcludeExcuseExecuteExerciseExhaustExhibitExileExistExitExoticExpandExpectExpireExplainExposeExpressExtendExtraEyeEyebrowFabricFaceFacultyFadeFaintFaithFallFalseFameFamilyFamousFanFancyFantasyFarmFashionFatFatalFatherFatigueFaultFavoriteFeatureFebruaryFederalFeeFeedFeelFemaleFenceFestivalFetchFeverFewFiberFictionFieldFigureFileFilmFilterFinalFindFineFingerFinishFireFirmFirstFiscalFishFitFitnessFixFlagFlameFlashFlatFlavorFleeFlightFlipFloatFlockFloorFlowerFluidFlushFlyFoamFocusFogFoilFoldFollowFoodFootForceForestForgetForkFortuneForumForwardFossilFosterFoundFoxFragileFrameFrequentFreshFriendFringeFrogFrontFrostFrownFrozenFruitFuelFunFunnyFurnaceFuryFutureGadgetGainGalaxyGalleryGameGapGarageGarbageGardenGarlicGarmentGasGaspGateGatherGaugeGazeGeneralGeniusGenreGentleGenuineGestureGhostGiantGiftGiggleGingerGiraffeGirlGiveGladGlanceGlareGlassGlideGlimpseGlobeGloomGloryGloveGlowGlueGoatGoddessGoldGoodGooseGorillaGospelGossipGovernGownGrabGraceGrainGrantGrapeGrassGravityGreatGreenGridGriefGritGroceryGroupGrowGruntGuardGuessGuideGuiltGuitarGunGymHabitHairHalfHammerHamsterHandHappyHarborHardHarshHarvestHatHaveHawkHazardHeadHealthHeartHeavyHedgehogHeightHelloHelmetHelpHenHeroHiddenHighHillHintHipHireHistoryHobbyHockeyHoldHoleHolidayHollowHomeHoneyHoodHopeHornHorrorHorseHospitalHostHotelHourHoverHubHugeHumanHumbleHumorHundredHungryHuntHurdleHurryHurtHusbandHybridIceIconIdeaIdentifyIdleIgnoreIllIllegalIllnessImageImitateImmenseImmuneImpactImposeImproveImpulseInchIncludeIncomeIncreaseIndexIndicateIndoorIndustryInfantInflictInformInhaleInheritInitialInjectInjuryInmateInnerInnocentInputInquiryInsaneInsectInsideInspireInstallIntactInterestIntoInvestInviteInvolveIronIslandIsolateIssueItemIvoryJacketJaguarJarJazzJealousJeansJellyJewelJobJoinJokeJourneyJoyJudgeJuiceJumpJungleJuniorJunkJustKangarooKeenKeepKetchupKeyKickKidKidneyKindKingdomKissKitKitchenKiteKittenKiwiKneeKnifeKnockKnowLabLabelLaborLadderLadyLakeLampLanguageLaptopLargeLaterLatinLaughLaundryLavaLawLawnLawsuitLayerLazyLeaderLeafLearnLeaveLectureLeftLegLegalLegendLeisureLemonLendLengthLensLeopardLessonLetterLevelLiarLibertyLibraryLicenseLifeLiftLightLikeLimbLimitLinkLionLiquidListLittleLiveLizardLoadLoanLobsterLocalLockLogicLonelyLongLoopLotteryLoudLoungeLoveLoyalLuckyLuggageLumberLunarLunchLuxuryLyricsMachineMadMagicMagnetMaidMailMainMajorMakeMammalManManageMandateMangoMansionManualMapleMarbleMarchMarginMarineMarketMarriageMaskMassMasterMatchMaterialMathMatrixMatterMaximumMazeMeadowMeanMeasureMeatMechanicMedalMediaMelodyMeltMemberMemoryMentionMenuMercyMergeMeritMerryMeshMessageMetalMethodMiddleMidnightMilkMillionMimicMindMinimumMinorMinuteMiracleMirrorMiseryMissMistakeMixMixedMixtureMobileModelModifyMomMomentMonitorMonkeyMonsterMonthMoonMoralMoreMorningMosquitoMotherMotionMotorMountainMouseMoveMovieMuchMuffinMuleMultiplyMuscleMuseumMushroomMusicMustMutualMyselfMysteryMythNaiveNameNapkinNarrowNastyNationNatureNearNeckNeedNegativeNeglectNeitherNephewNerveNestNetNetworkNeutralNeverNewsNextNiceNightNobleNoiseNomineeNoodleNormalNorthNoseNotableNoteNothingNoticeNovelNowNuclearNumberNurseNutOakObeyObjectObligeObscureObserveObtainObviousOccurOceanOctoberOdorOffOfferOfficeOftenOilOkayOldOliveOlympicOmitOnceOneOnionOnlineOnlyOpenOperaOpinionOpposeOptionOrangeOrbitOrchardOrderOrdinaryOrganOrientOriginalOrphanOstrichOtherOutdoorOuterOutputOutsideOvalOvenOverOwnOwnerOxygenOysterOzonePactPaddlePagePairPalacePalmPandaPanelPanicPantherPaperParadeParentParkParrotPartyPassPatchPathPatientPatrolPatternPausePavePaymentPeacePeanutPearPeasantPelicanPenPenaltyPencilPeoplePepperPerfectPermitPersonPetPhonePhotoPhrasePhysicalPianoPicnicPicturePiecePigPigeonPillPilotPinkPioneerPipePistolPitchPizzaPlacePlanetPlasticPlatePlayPleasePledgePluckPlugPlungePoemPoetPointPolarPolePolicePondPonyPoolPopularPortionPositionPossiblePostPotatoPotteryPovertyPowderPowerPracticePraisePredictPreferPreparePresentPrettyPreventPricePridePrimaryPrintPriorityPrisonPrivatePrizeProblemProcessProduceProfitProgramProjectPromoteProofPropertyProsperProtectProudProvidePublicPuddingPullPulpPulsePumpkinPunchPupilPuppyPurchasePurityPurposePursePushPutPuzzlePyramidQualityQuantumQuarterQuestionQuickQuitQuizQuoteRabbitRaccoonRaceRackRadarRadioRailRainRaiseRallyRampRanchRandomRangeRapidRareRateRatherRavenRawRazorReadyRealReasonRebelRebuildRecallReceiveRecipeRecordRecycleReduceReflectReformRefuseRegionRegretRegularRejectRelaxReleaseReliefRelyRemainRememberRemindRemoveRenderRenewRentReopenRepairRepeatReplaceReportRequireRescueResembleResistResourceResponseResultRetireRetreatReturnReunionRevealReviewRewardRhythmRibRibbonRiceRichRideRidgeRifleRightRigidRingRiotRippleRiskRitualRivalRiverRoadRoastRobotRobustRocketRomanceRoofRookieRoomRoseRotateRoughRoundRouteRoyalRubberRudeRugRuleRunRunwayRuralSadSaddleSadnessSafeSailSaladSalmonSalonSaltSaluteSameSampleSandSatisfySatoshiSauceSausageSaveSayScaleScanScareScatterSceneSchemeSchoolScienceScissorsScorpionScoutScrapScreenScriptScrubSeaSearchSeasonSeatSecondSecretSectionSecuritySeedSeekSegmentSelectSellSeminarSeniorSenseSentenceSeriesServiceSessionSettleSetupSevenShadowShaftShallowShareShedShellSheriffShieldShiftShineShipShiverShockShoeShootShopShortShoulderShoveShrimpShrugShuffleShySiblingSickSideSiegeSightSignSilentSilkSillySilverSimilarSimpleSinceSingSirenSisterSituateSixSizeSkateSketchSkiSkillSkinSkirtSkullSlabSlamSleepSlenderSliceSlideSlightSlimSloganSlotSlowSlushSmallSmartSmileSmokeSmoothSnackSnakeSnapSniffSnowSoapSoccerSocialSockSodaSoftSolarSoldierSolidSolutionSolveSomeoneSongSoonSorrySortSoulSoundSoupSourceSouthSpaceSpareSpatialSpawnSpeakSpecialSpeedSpellSpendSphereSpiceSpiderSpikeSpinSpiritSplitSpoilSponsorSpoonSportSpotSpraySpreadSpringSpySquareSqueezeSquirrelStableStadiumStaffStageStairsStampStandStartStateStaySteakSteelStemStepStereoStickStillStingStockStomachStoneStoolStoryStoveStrategyStreetStrikeStrongStruggleStudentStuffStumbleStyleSubjectSubmitSubwaySuccessSuchSuddenSufferSugarSuggestSuitSummerSunSunnySunsetSuperSupplySupremeSureSurfaceSurgeSurpriseSurroundSurveySuspectSustainSwallowSwampSwapSwarmSwearSweetSwiftSwimSwingSwitchSwordSymbolSymptomSyrupSystemTableTackleTagTailTalentTalkTankTapeTargetTaskTasteTattooTaxiTeachTeamTellTenTenantTennisTentTermTestTextThankThatThemeThenTheoryThereTheyThingThisThoughtThreeThriveThrowThumbThunderTicketTideTigerTiltTimberTimeTinyTipTiredTissueTitleToastTobaccoTodayToddlerToeTogetherToiletTokenTomatoTomorrowToneTongueTonightToolToothTopTopicToppleTorchTornadoTortoiseTossTotalTouristTowardTowerTownToyTrackTradeTrafficTragicTrainTransferTrapTrashTravelTrayTreatTreeTrendTrialTribeTrickTriggerTrimTripTrophyTroubleTruckTrueTrulyTrumpetTrustTruthTryTubeTuitionTumbleTunaTunnelTurkeyTurnTurtleTwelveTwentyTwiceTwinTwistTwoTypeTypicalUglyUmbrellaUnableUnawareUncleUncoverUnderUndoUnfairUnfoldUnhappyUniformUniqueUnitUniverseUnknownUnlockUntilUnusualUnveilUpdateUpgradeUpholdUponUpperUpsetUrbanUrgeUsageUseUsedUsefulUselessUsualUtilityVacantVacuumVagueValidValleyValveVanVanishVaporVariousVastVaultVehicleVelvetVendorVentureVenueVerbVerifyVersionVeryVesselVeteranViableVibrantViciousVictoryVideoViewVillageVintageViolinVirtualVirusVisaVisitVisualVitalVividVocalVoiceVoidVolcanoVolumeVoteVoyageWageWagonWaitWalkWallWalnutWantWarfareWarmWarriorWashWaspWasteWaterWaveWayWealthWeaponWearWeaselWeatherWebWeddingWeekendWeirdWelcomeWestWetWhaleWhatWheatWheelWhenWhereWhipWhisperWideWidthWifeWildWillWinWindowWineWingWinkWinnerWinterWireWisdomWiseWishWitnessWolfWomanWonderWoodWoolWordWorkWorldWorryWorthWrapWreckWrestleWristWriteWrongYardYearYellowYouYoungYouthZebraZeroZoneZoo\";\n var wordlist = null;\n function loadWords(lang) {\n if (wordlist != null) {\n return;\n }\n wordlist = words.replace(/([A-Z])/g, \" $1\").toLowerCase().substring(1).split(\" \");\n if (wordlist_1.Wordlist.check(lang) !== \"0x3c8acc1e7b08d8e76f9fda015ef48dc8c710a73cb7e0f77b2c18a9b5a7adde60\") {\n wordlist = null;\n throw new Error(\"BIP39 Wordlist for en (English) FAILED\");\n }\n }\n var LangEn = (\n /** @class */\n function(_super) {\n __extends3(LangEn2, _super);\n function LangEn2() {\n return _super.call(this, \"en\") || this;\n }\n LangEn2.prototype.getWord = function(index2) {\n loadWords(this);\n return wordlist[index2];\n };\n LangEn2.prototype.getWordIndex = function(word) {\n loadWords(this);\n return wordlist.indexOf(word);\n };\n return LangEn2;\n }(wordlist_1.Wordlist)\n );\n var langEn = new LangEn();\n exports3.langEn = langEn;\n wordlist_1.Wordlist.register(langEn);\n }\n });\n\n // ../../../node_modules/.pnpm/@ethersproject+wordlists@5.8.0/node_modules/@ethersproject/wordlists/lib/lang-es.js\n var require_lang_es = __commonJS({\n \"../../../node_modules/.pnpm/@ethersproject+wordlists@5.8.0/node_modules/@ethersproject/wordlists/lib/lang-es.js\"(exports3) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n var __extends3 = exports3 && exports3.__extends || /* @__PURE__ */ function() {\n var extendStatics3 = function(d5, b4) {\n extendStatics3 = Object.setPrototypeOf || { __proto__: [] } instanceof Array && function(d6, b5) {\n d6.__proto__ = b5;\n } || function(d6, b5) {\n for (var p4 in b5)\n if (Object.prototype.hasOwnProperty.call(b5, p4))\n d6[p4] = b5[p4];\n };\n return extendStatics3(d5, b4);\n };\n return function(d5, b4) {\n if (typeof b4 !== \"function\" && b4 !== null)\n throw new TypeError(\"Class extends value \" + String(b4) + \" is not a constructor or null\");\n extendStatics3(d5, b4);\n function __() {\n this.constructor = d5;\n }\n d5.prototype = b4 === null ? Object.create(b4) : (__.prototype = b4.prototype, new __());\n };\n }();\n Object.defineProperty(exports3, \"__esModule\", { value: true });\n exports3.langEs = void 0;\n var strings_1 = require_lib9();\n var wordlist_1 = require_wordlist();\n var words = \"A/bacoAbdomenAbejaAbiertoAbogadoAbonoAbortoAbrazoAbrirAbueloAbusoAcabarAcademiaAccesoAccio/nAceiteAcelgaAcentoAceptarA/cidoAclararAcne/AcogerAcosoActivoActoActrizActuarAcudirAcuerdoAcusarAdictoAdmitirAdoptarAdornoAduanaAdultoAe/reoAfectarAficio/nAfinarAfirmarA/gilAgitarAgoni/aAgostoAgotarAgregarAgrioAguaAgudoA/guilaAgujaAhogoAhorroAireAislarAjedrezAjenoAjusteAlacra/nAlambreAlarmaAlbaA/lbumAlcaldeAldeaAlegreAlejarAlertaAletaAlfilerAlgaAlgodo/nAliadoAlientoAlivioAlmaAlmejaAlmi/barAltarAltezaAltivoAltoAlturaAlumnoAlzarAmableAmanteAmapolaAmargoAmasarA/mbarA/mbitoAmenoAmigoAmistadAmorAmparoAmplioAnchoAncianoAnclaAndarAnde/nAnemiaA/nguloAnilloA/nimoAni/sAnotarAntenaAntiguoAntojoAnualAnularAnuncioA~adirA~ejoA~oApagarAparatoApetitoApioAplicarApodoAporteApoyoAprenderAprobarApuestaApuroAradoAra~aArarA/rbitroA/rbolArbustoArchivoArcoArderArdillaArduoA/reaA/ridoAriesArmoni/aArne/sAromaArpaArpo/nArregloArrozArrugaArteArtistaAsaAsadoAsaltoAscensoAsegurarAseoAsesorAsientoAsiloAsistirAsnoAsombroA/speroAstillaAstroAstutoAsumirAsuntoAtajoAtaqueAtarAtentoAteoA/ticoAtletaA/tomoAtraerAtrozAtu/nAudazAudioAugeAulaAumentoAusenteAutorAvalAvanceAvaroAveAvellanaAvenaAvestruzAvio/nAvisoAyerAyudaAyunoAzafra/nAzarAzoteAzu/carAzufreAzulBabaBaborBacheBahi/aBaileBajarBalanzaBalco/nBaldeBambu/BancoBandaBa~oBarbaBarcoBarnizBarroBa/sculaBasto/nBasuraBatallaBateri/aBatirBatutaBau/lBazarBebe/BebidaBelloBesarBesoBestiaBichoBienBingoBlancoBloqueBlusaBoaBobinaBoboBocaBocinaBodaBodegaBoinaBolaBoleroBolsaBombaBondadBonitoBonoBonsa/iBordeBorrarBosqueBoteBoti/nBo/vedaBozalBravoBrazoBrechaBreveBrilloBrincoBrisaBrocaBromaBronceBroteBrujaBruscoBrutoBuceoBucleBuenoBueyBufandaBufo/nBu/hoBuitreBultoBurbujaBurlaBurroBuscarButacaBuzo/nCaballoCabezaCabinaCabraCacaoCada/verCadenaCaerCafe/Cai/daCaima/nCajaCajo/nCalCalamarCalcioCaldoCalidadCalleCalmaCalorCalvoCamaCambioCamelloCaminoCampoCa/ncerCandilCanelaCanguroCanicaCantoCa~aCa~o/nCaobaCaosCapazCapita/nCapoteCaptarCapuchaCaraCarbo/nCa/rcelCaretaCargaCari~oCarneCarpetaCarroCartaCasaCascoCaseroCaspaCastorCatorceCatreCaudalCausaCazoCebollaCederCedroCeldaCe/lebreCelosoCe/lulaCementoCenizaCentroCercaCerdoCerezaCeroCerrarCertezaCe/spedCetroChacalChalecoChampu/ChanclaChapaCharlaChicoChisteChivoChoqueChozaChuletaChuparCiclo/nCiegoCieloCienCiertoCifraCigarroCimaCincoCineCintaCipre/sCircoCiruelaCisneCitaCiudadClamorClanClaroClaseClaveClienteClimaCli/nicaCobreCoccio/nCochinoCocinaCocoCo/digoCodoCofreCogerCoheteCoji/nCojoColaColchaColegioColgarColinaCollarColmoColumnaCombateComerComidaCo/modoCompraCondeConejoCongaConocerConsejoContarCopaCopiaCorazo/nCorbataCorchoCordo/nCoronaCorrerCoserCosmosCostaCra/neoCra/terCrearCrecerCrei/doCremaCri/aCrimenCriptaCrisisCromoCro/nicaCroquetaCrudoCruzCuadroCuartoCuatroCuboCubrirCucharaCuelloCuentoCuerdaCuestaCuevaCuidarCulebraCulpaCultoCumbreCumplirCunaCunetaCuotaCupo/nCu/pulaCurarCuriosoCursoCurvaCutisDamaDanzaDarDardoDa/tilDeberDe/bilDe/cadaDecirDedoDefensaDefinirDejarDelfi/nDelgadoDelitoDemoraDensoDentalDeporteDerechoDerrotaDesayunoDeseoDesfileDesnudoDestinoDesvi/oDetalleDetenerDeudaDi/aDiabloDiademaDiamanteDianaDiarioDibujoDictarDienteDietaDiezDifi/cilDignoDilemaDiluirDineroDirectoDirigirDiscoDise~oDisfrazDivaDivinoDobleDoceDolorDomingoDonDonarDoradoDormirDorsoDosDosisDrago/nDrogaDuchaDudaDueloDue~oDulceDu/oDuqueDurarDurezaDuroE/banoEbrioEcharEcoEcuadorEdadEdicio/nEdificioEditorEducarEfectoEficazEjeEjemploElefanteElegirElementoElevarElipseE/liteElixirElogioEludirEmbudoEmitirEmocio/nEmpateEmpe~oEmpleoEmpresaEnanoEncargoEnchufeEnci/aEnemigoEneroEnfadoEnfermoEnga~oEnigmaEnlaceEnormeEnredoEnsayoEnse~arEnteroEntrarEnvaseEnvi/oE/pocaEquipoErizoEscalaEscenaEscolarEscribirEscudoEsenciaEsferaEsfuerzoEspadaEspejoEspi/aEsposaEspumaEsqui/EstarEsteEstiloEstufaEtapaEternoE/ticaEtniaEvadirEvaluarEventoEvitarExactoExamenExcesoExcusaExentoExigirExilioExistirE/xitoExpertoExplicarExponerExtremoFa/bricaFa/bulaFachadaFa/cilFactorFaenaFajaFaldaFalloFalsoFaltarFamaFamiliaFamosoFarao/nFarmaciaFarolFarsaFaseFatigaFaunaFavorFaxFebreroFechaFelizFeoFeriaFerozFe/rtilFervorFesti/nFiableFianzaFiarFibraFiccio/nFichaFideoFiebreFielFieraFiestaFiguraFijarFijoFilaFileteFilialFiltroFinFincaFingirFinitoFirmaFlacoFlautaFlechaFlorFlotaFluirFlujoFlu/orFobiaFocaFogataFogo/nFolioFolletoFondoFormaForroFortunaForzarFosaFotoFracasoFra/gilFranjaFraseFraudeFrei/rFrenoFresaFri/oFritoFrutaFuegoFuenteFuerzaFugaFumarFuncio/nFundaFurgo/nFuriaFusilFu/tbolFuturoGacelaGafasGaitaGajoGalaGaleri/aGalloGambaGanarGanchoGangaGansoGarajeGarzaGasolinaGastarGatoGavila/nGemeloGemirGenGe/neroGenioGenteGeranioGerenteGermenGestoGiganteGimnasioGirarGiroGlaciarGloboGloriaGolGolfoGolosoGolpeGomaGordoGorilaGorraGotaGoteoGozarGradaGra/ficoGranoGrasaGratisGraveGrietaGrilloGripeGrisGritoGrosorGru/aGruesoGrumoGrupoGuanteGuapoGuardiaGuerraGui/aGui~oGuionGuisoGuitarraGusanoGustarHaberHa/bilHablarHacerHachaHadaHallarHamacaHarinaHazHaza~aHebillaHebraHechoHeladoHelioHembraHerirHermanoHe/roeHervirHieloHierroHi/gadoHigieneHijoHimnoHistoriaHocicoHogarHogueraHojaHombreHongoHonorHonraHoraHormigaHornoHostilHoyoHuecoHuelgaHuertaHuesoHuevoHuidaHuirHumanoHu/medoHumildeHumoHundirHuraca/nHurtoIconoIdealIdiomaI/doloIglesiaIglu/IgualIlegalIlusio/nImagenIma/nImitarImparImperioImponerImpulsoIncapazI/ndiceInerteInfielInformeIngenioInicioInmensoInmuneInnatoInsectoInstanteIntere/sI/ntimoIntuirInu/tilInviernoIraIrisIroni/aIslaIsloteJabali/Jabo/nJamo/nJarabeJardi/nJarraJaulaJazmi/nJefeJeringaJineteJornadaJorobaJovenJoyaJuergaJuevesJuezJugadorJugoJugueteJuicioJuncoJunglaJunioJuntarJu/piterJurarJustoJuvenilJuzgarKiloKoalaLabioLacioLacraLadoLadro/nLagartoLa/grimaLagunaLaicoLamerLa/minaLa/mparaLanaLanchaLangostaLanzaLa/pizLargoLarvaLa/stimaLataLa/texLatirLaurelLavarLazoLealLeccio/nLecheLectorLeerLegio/nLegumbreLejanoLenguaLentoLe~aLeo/nLeopardoLesio/nLetalLetraLeveLeyendaLibertadLibroLicorLi/derLidiarLienzoLigaLigeroLimaLi/miteLimo/nLimpioLinceLindoLi/neaLingoteLinoLinternaLi/quidoLisoListaLiteraLitioLitroLlagaLlamaLlantoLlaveLlegarLlenarLlevarLlorarLloverLluviaLoboLocio/nLocoLocuraLo/gicaLogroLombrizLomoLonjaLoteLuchaLucirLugarLujoLunaLunesLupaLustroLutoLuzMacetaMachoMaderaMadreMaduroMaestroMafiaMagiaMagoMai/zMaldadMaletaMallaMaloMama/MamboMamutMancoMandoManejarMangaManiqui/ManjarManoMansoMantaMa~anaMapaMa/quinaMarMarcoMareaMarfilMargenMaridoMa/rmolMarro/nMartesMarzoMasaMa/scaraMasivoMatarMateriaMatizMatrizMa/ximoMayorMazorcaMechaMedallaMedioMe/dulaMejillaMejorMelenaMelo/nMemoriaMenorMensajeMenteMenu/MercadoMerengueMe/ritoMesMeso/nMetaMeterMe/todoMetroMezclaMiedoMielMiembroMigaMilMilagroMilitarMillo/nMimoMinaMineroMi/nimoMinutoMiopeMirarMisaMiseriaMisilMismoMitadMitoMochilaMocio/nModaModeloMohoMojarMoldeMolerMolinoMomentoMomiaMonarcaMonedaMonjaMontoMo~oMoradaMorderMorenoMorirMorroMorsaMortalMoscaMostrarMotivoMoverMo/vilMozoMuchoMudarMuebleMuelaMuerteMuestraMugreMujerMulaMuletaMultaMundoMu~ecaMuralMuroMu/sculoMuseoMusgoMu/sicaMusloNa/carNacio/nNadarNaipeNaranjaNarizNarrarNasalNatalNativoNaturalNa/useaNavalNaveNavidadNecioNe/ctarNegarNegocioNegroNeo/nNervioNetoNeutroNevarNeveraNichoNidoNieblaNietoNi~ezNi~oNi/tidoNivelNoblezaNocheNo/minaNoriaNormaNorteNotaNoticiaNovatoNovelaNovioNubeNucaNu/cleoNudilloNudoNueraNueveNuezNuloNu/meroNutriaOasisObesoObispoObjetoObraObreroObservarObtenerObvioOcaOcasoOce/anoOchentaOchoOcioOcreOctavoOctubreOcultoOcuparOcurrirOdiarOdioOdiseaOesteOfensaOfertaOficioOfrecerOgroOi/doOi/rOjoOlaOleadaOlfatoOlivoOllaOlmoOlorOlvidoOmbligoOndaOnzaOpacoOpcio/nO/peraOpinarOponerOptarO/pticaOpuestoOracio/nOradorOralO/rbitaOrcaOrdenOrejaO/rganoOrgi/aOrgulloOrienteOrigenOrillaOroOrquestaOrugaOsadi/aOscuroOseznoOsoOstraOto~oOtroOvejaO/vuloO/xidoOxi/genoOyenteOzonoPactoPadrePaellaPa/ginaPagoPai/sPa/jaroPalabraPalcoPaletaPa/lidoPalmaPalomaPalparPanPanalPa/nicoPanteraPa~ueloPapa/PapelPapillaPaquetePararParcelaParedParirParoPa/rpadoParquePa/rrafoPartePasarPaseoPasio/nPasoPastaPataPatioPatriaPausaPautaPavoPayasoPeato/nPecadoPeceraPechoPedalPedirPegarPeinePelarPelda~oPeleaPeligroPellejoPeloPelucaPenaPensarPe~o/nPeo/nPeorPepinoPeque~oPeraPerchaPerderPerezaPerfilPericoPerlaPermisoPerroPersonaPesaPescaPe/simoPesta~aPe/taloPetro/leoPezPezu~aPicarPicho/nPiePiedraPiernaPiezaPijamaPilarPilotoPimientaPinoPintorPinzaPi~aPiojoPipaPirataPisarPiscinaPisoPistaPito/nPizcaPlacaPlanPlataPlayaPlazaPleitoPlenoPlomoPlumaPluralPobrePocoPoderPodioPoemaPoesi/aPoetaPolenPolici/aPolloPolvoPomadaPomeloPomoPompaPonerPorcio/nPortalPosadaPoseerPosiblePostePotenciaPotroPozoPradoPrecozPreguntaPremioPrensaPresoPrevioPrimoPri/ncipePrisio/nPrivarProaProbarProcesoProductoProezaProfesorProgramaProlePromesaProntoPropioPro/ximoPruebaPu/blicoPucheroPudorPuebloPuertaPuestoPulgaPulirPulmo/nPulpoPulsoPumaPuntoPu~alPu~oPupaPupilaPure/QuedarQuejaQuemarQuererQuesoQuietoQui/micaQuinceQuitarRa/banoRabiaRaboRacio/nRadicalRai/zRamaRampaRanchoRangoRapazRa/pidoRaptoRasgoRaspaRatoRayoRazaRazo/nReaccio/nRealidadReba~oReboteRecaerRecetaRechazoRecogerRecreoRectoRecursoRedRedondoReducirReflejoReformaRefra/nRefugioRegaloRegirReglaRegresoRehe/nReinoRei/rRejaRelatoRelevoRelieveRellenoRelojRemarRemedioRemoRencorRendirRentaRepartoRepetirReposoReptilResRescateResinaRespetoRestoResumenRetiroRetornoRetratoReunirReve/sRevistaReyRezarRicoRiegoRiendaRiesgoRifaRi/gidoRigorRinco/nRi~o/nRi/oRiquezaRisaRitmoRitoRizoRobleRoceRociarRodarRodeoRodillaRoerRojizoRojoRomeroRomperRonRoncoRondaRopaRoperoRosaRoscaRostroRotarRubi/RuborRudoRuedaRugirRuidoRuinaRuletaRuloRumboRumorRupturaRutaRutinaSa/badoSaberSabioSableSacarSagazSagradoSalaSaldoSaleroSalirSalmo/nSalo/nSalsaSaltoSaludSalvarSambaSancio/nSandi/aSanearSangreSanidadSanoSantoSapoSaqueSardinaSarte/nSastreSata/nSaunaSaxofo/nSeccio/nSecoSecretoSectaSedSeguirSeisSelloSelvaSemanaSemillaSendaSensorSe~alSe~orSepararSepiaSequi/aSerSerieSermo/nServirSesentaSesio/nSetaSetentaSeveroSexoSextoSidraSiestaSieteSigloSignoSi/labaSilbarSilencioSillaSi/mboloSimioSirenaSistemaSitioSituarSobreSocioSodioSolSolapaSoldadoSoledadSo/lidoSoltarSolucio/nSombraSondeoSonidoSonoroSonrisaSopaSoplarSoporteSordoSorpresaSorteoSoste/nSo/tanoSuaveSubirSucesoSudorSuegraSueloSue~oSuerteSufrirSujetoSulta/nSumarSuperarSuplirSuponerSupremoSurSurcoSure~oSurgirSustoSutilTabacoTabiqueTablaTabu/TacoTactoTajoTalarTalcoTalentoTallaTalo/nTama~oTamborTangoTanqueTapaTapeteTapiaTapo/nTaquillaTardeTareaTarifaTarjetaTarotTarroTartaTatuajeTauroTazaTazo/nTeatroTechoTeclaTe/cnicaTejadoTejerTejidoTelaTele/fonoTemaTemorTemploTenazTenderTenerTenisTensoTeori/aTerapiaTercoTe/rminoTernuraTerrorTesisTesoroTestigoTeteraTextoTezTibioTiburo/nTiempoTiendaTierraTiesoTigreTijeraTildeTimbreTi/midoTimoTintaTi/oTi/picoTipoTiraTiro/nTita/nTi/tereTi/tuloTizaToallaTobilloTocarTocinoTodoTogaToldoTomarTonoTontoToparTopeToqueTo/raxToreroTormentaTorneoToroTorpedoTorreTorsoTortugaTosToscoToserTo/xicoTrabajoTractorTraerTra/ficoTragoTrajeTramoTranceTratoTraumaTrazarTre/bolTreguaTreintaTrenTreparTresTribuTrigoTripaTristeTriunfoTrofeoTrompaTroncoTropaTroteTrozoTrucoTruenoTrufaTuberi/aTuboTuertoTumbaTumorTu/nelTu/nicaTurbinaTurismoTurnoTutorUbicarU/lceraUmbralUnidadUnirUniversoUnoUntarU~aUrbanoUrbeUrgenteUrnaUsarUsuarioU/tilUtopi/aUvaVacaVaci/oVacunaVagarVagoVainaVajillaValeVa/lidoValleValorVa/lvulaVampiroVaraVariarVaro/nVasoVecinoVectorVehi/culoVeinteVejezVelaVeleroVelozVenaVencerVendaVenenoVengarVenirVentaVenusVerVeranoVerboVerdeVeredaVerjaVersoVerterVi/aViajeVibrarVicioVi/ctimaVidaVi/deoVidrioViejoViernesVigorVilVillaVinagreVinoVi~edoVioli/nViralVirgoVirtudVisorVi/speraVistaVitaminaViudoVivazViveroVivirVivoVolca/nVolumenVolverVorazVotarVotoVozVueloVulgarYacerYateYeguaYemaYernoYesoYodoYogaYogurZafiroZanjaZapatoZarzaZonaZorroZumoZurdo\";\n var lookup = {};\n var wordlist = null;\n function dropDiacritic(word) {\n wordlist_1.logger.checkNormalize();\n return (0, strings_1.toUtf8String)(Array.prototype.filter.call((0, strings_1.toUtf8Bytes)(word.normalize(\"NFD\").toLowerCase()), function(c4) {\n return c4 >= 65 && c4 <= 90 || c4 >= 97 && c4 <= 123;\n }));\n }\n function expand(word) {\n var output = [];\n Array.prototype.forEach.call((0, strings_1.toUtf8Bytes)(word), function(c4) {\n if (c4 === 47) {\n output.push(204);\n output.push(129);\n } else if (c4 === 126) {\n output.push(110);\n output.push(204);\n output.push(131);\n } else {\n output.push(c4);\n }\n });\n return (0, strings_1.toUtf8String)(output);\n }\n function loadWords(lang) {\n if (wordlist != null) {\n return;\n }\n wordlist = words.replace(/([A-Z])/g, \" $1\").toLowerCase().substring(1).split(\" \").map(function(w3) {\n return expand(w3);\n });\n wordlist.forEach(function(word, index2) {\n lookup[dropDiacritic(word)] = index2;\n });\n if (wordlist_1.Wordlist.check(lang) !== \"0xf74fb7092aeacdfbf8959557de22098da512207fb9f109cb526994938cf40300\") {\n wordlist = null;\n throw new Error(\"BIP39 Wordlist for es (Spanish) FAILED\");\n }\n }\n var LangEs = (\n /** @class */\n function(_super) {\n __extends3(LangEs2, _super);\n function LangEs2() {\n return _super.call(this, \"es\") || this;\n }\n LangEs2.prototype.getWord = function(index2) {\n loadWords(this);\n return wordlist[index2];\n };\n LangEs2.prototype.getWordIndex = function(word) {\n loadWords(this);\n return lookup[dropDiacritic(word)];\n };\n return LangEs2;\n }(wordlist_1.Wordlist)\n );\n var langEs = new LangEs();\n exports3.langEs = langEs;\n wordlist_1.Wordlist.register(langEs);\n }\n });\n\n // ../../../node_modules/.pnpm/@ethersproject+wordlists@5.8.0/node_modules/@ethersproject/wordlists/lib/lang-fr.js\n var require_lang_fr = __commonJS({\n \"../../../node_modules/.pnpm/@ethersproject+wordlists@5.8.0/node_modules/@ethersproject/wordlists/lib/lang-fr.js\"(exports3) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n var __extends3 = exports3 && exports3.__extends || /* @__PURE__ */ function() {\n var extendStatics3 = function(d5, b4) {\n extendStatics3 = Object.setPrototypeOf || { __proto__: [] } instanceof Array && function(d6, b5) {\n d6.__proto__ = b5;\n } || function(d6, b5) {\n for (var p4 in b5)\n if (Object.prototype.hasOwnProperty.call(b5, p4))\n d6[p4] = b5[p4];\n };\n return extendStatics3(d5, b4);\n };\n return function(d5, b4) {\n if (typeof b4 !== \"function\" && b4 !== null)\n throw new TypeError(\"Class extends value \" + String(b4) + \" is not a constructor or null\");\n extendStatics3(d5, b4);\n function __() {\n this.constructor = d5;\n }\n d5.prototype = b4 === null ? Object.create(b4) : (__.prototype = b4.prototype, new __());\n };\n }();\n Object.defineProperty(exports3, \"__esModule\", { value: true });\n exports3.langFr = void 0;\n var strings_1 = require_lib9();\n var wordlist_1 = require_wordlist();\n var words = \"AbaisserAbandonAbdiquerAbeilleAbolirAborderAboutirAboyerAbrasifAbreuverAbriterAbrogerAbruptAbsenceAbsoluAbsurdeAbusifAbyssalAcade/mieAcajouAcarienAccablerAccepterAcclamerAccoladeAccrocheAccuserAcerbeAchatAcheterAcidulerAcierAcompteAcque/rirAcronymeActeurActifActuelAdepteAde/quatAdhe/sifAdjectifAdjugerAdmettreAdmirerAdopterAdorerAdoucirAdresseAdroitAdulteAdverbeAe/rerAe/ronefAffaireAffecterAfficheAffreuxAffublerAgacerAgencerAgileAgiterAgraferAgre/ableAgrumeAiderAiguilleAilierAimableAisanceAjouterAjusterAlarmerAlchimieAlerteAlge-breAlgueAlie/nerAlimentAlle/gerAlliageAllouerAllumerAlourdirAlpagaAltesseAlve/oleAmateurAmbiguAmbreAme/nagerAmertumeAmidonAmiralAmorcerAmourAmovibleAmphibieAmpleurAmusantAnalyseAnaphoreAnarchieAnatomieAncienAne/antirAngleAngoisseAnguleuxAnimalAnnexerAnnonceAnnuelAnodinAnomalieAnonymeAnormalAntenneAntidoteAnxieuxApaiserApe/ritifAplanirApologieAppareilAppelerApporterAppuyerAquariumAqueducArbitreArbusteArdeurArdoiseArgentArlequinArmatureArmementArmoireArmureArpenterArracherArriverArroserArsenicArte/rielArticleAspectAsphalteAspirerAssautAsservirAssietteAssocierAssurerAsticotAstreAstuceAtelierAtomeAtriumAtroceAttaqueAttentifAttirerAttraperAubaineAubergeAudaceAudibleAugurerAuroreAutomneAutrucheAvalerAvancerAvariceAvenirAverseAveugleAviateurAvideAvionAviserAvoineAvouerAvrilAxialAxiomeBadgeBafouerBagageBaguetteBaignadeBalancerBalconBaleineBalisageBambinBancaireBandageBanlieueBannie-reBanquierBarbierBarilBaronBarqueBarrageBassinBastionBatailleBateauBatterieBaudrierBavarderBeletteBe/lierBeloteBe/ne/ficeBerceauBergerBerlineBermudaBesaceBesogneBe/tailBeurreBiberonBicycleBiduleBijouBilanBilingueBillardBinaireBiologieBiopsieBiotypeBiscuitBisonBistouriBitumeBizarreBlafardBlagueBlanchirBlessantBlinderBlondBloquerBlousonBobardBobineBoireBoiserBolideBonbonBondirBonheurBonifierBonusBordureBorneBotteBoucleBoueuxBougieBoulonBouquinBourseBoussoleBoutiqueBoxeurBrancheBrasierBraveBrebisBre-cheBreuvageBricolerBrigadeBrillantBriocheBriqueBrochureBroderBronzerBrousseBroyeurBrumeBrusqueBrutalBruyantBuffleBuissonBulletinBureauBurinBustierButinerButoirBuvableBuvetteCabanonCabineCachetteCadeauCadreCafe/ineCaillouCaissonCalculerCalepinCalibreCalmerCalomnieCalvaireCamaradeCame/raCamionCampagneCanalCanetonCanonCantineCanularCapableCaporalCapriceCapsuleCapterCapucheCarabineCarboneCaresserCaribouCarnageCarotteCarreauCartonCascadeCasierCasqueCassureCauserCautionCavalierCaverneCaviarCe/dilleCeintureCe/lesteCelluleCendrierCensurerCentralCercleCe/re/bralCeriseCernerCerveauCesserChagrinChaiseChaleurChambreChanceChapitreCharbonChasseurChatonChaussonChavirerChemiseChenilleChe/quierChercherChevalChienChiffreChignonChime-reChiotChlorureChocolatChoisirChoseChouetteChromeChuteCigareCigogneCimenterCine/maCintrerCirculerCirerCirqueCiterneCitoyenCitronCivilClaironClameurClaquerClasseClavierClientClignerClimatClivageClocheClonageCloporteCobaltCobraCocasseCocotierCoderCodifierCoffreCognerCohe/sionCoifferCoincerCole-reColibriCollineColmaterColonelCombatCome/dieCommandeCompactConcertConduireConfierCongelerConnoterConsonneContactConvexeCopainCopieCorailCorbeauCordageCornicheCorpusCorrectCorte-geCosmiqueCostumeCotonCoudeCoupureCourageCouteauCouvrirCoyoteCrabeCrainteCravateCrayonCre/atureCre/diterCre/meuxCreuserCrevetteCriblerCrierCristalCrite-reCroireCroquerCrotaleCrucialCruelCrypterCubiqueCueillirCuille-reCuisineCuivreCulminerCultiverCumulerCupideCuratifCurseurCyanureCycleCylindreCyniqueDaignerDamierDangerDanseurDauphinDe/battreDe/biterDe/borderDe/briderDe/butantDe/calerDe/cembreDe/chirerDe/ciderDe/clarerDe/corerDe/crireDe/cuplerDe/daleDe/ductifDe/esseDe/fensifDe/filerDe/frayerDe/gagerDe/givrerDe/glutirDe/graferDe/jeunerDe/liceDe/logerDemanderDemeurerDe/molirDe/nicherDe/nouerDentelleDe/nuderDe/partDe/penserDe/phaserDe/placerDe/poserDe/rangerDe/roberDe/sastreDescenteDe/sertDe/signerDe/sobe/irDessinerDestrierDe/tacherDe/testerDe/tourerDe/tresseDevancerDevenirDevinerDevoirDiableDialogueDiamantDicterDiffe/rerDige/rerDigitalDigneDiluerDimancheDiminuerDioxydeDirectifDirigerDiscuterDisposerDissiperDistanceDivertirDiviserDocileDocteurDogmeDoigtDomaineDomicileDompterDonateurDonjonDonnerDopamineDortoirDorureDosageDoseurDossierDotationDouanierDoubleDouceurDouterDoyenDragonDraperDresserDribblerDroitureDuperieDuplexeDurableDurcirDynastieE/blouirE/carterE/charpeE/chelleE/clairerE/clipseE/cloreE/cluseE/coleE/conomieE/corceE/couterE/craserE/cre/merE/crivainE/crouE/cumeE/cureuilE/difierE/duquerEffacerEffectifEffigieEffortEffrayerEffusionE/galiserE/garerE/jecterE/laborerE/largirE/lectronE/le/gantE/le/phantE/le-veE/ligibleE/litismeE/logeE/luciderE/luderEmballerEmbellirEmbryonE/meraudeE/missionEmmenerE/motionE/mouvoirEmpereurEmployerEmporterEmpriseE/mulsionEncadrerEnche-reEnclaveEncocheEndiguerEndosserEndroitEnduireE/nergieEnfanceEnfermerEnfouirEngagerEnginEngloberE/nigmeEnjamberEnjeuEnleverEnnemiEnnuyeuxEnrichirEnrobageEnseigneEntasserEntendreEntierEntourerEntraverE/nume/rerEnvahirEnviableEnvoyerEnzymeE/olienE/paissirE/pargneE/patantE/pauleE/picerieE/pide/mieE/pierE/pilogueE/pineE/pisodeE/pitapheE/poqueE/preuveE/prouverE/puisantE/querreE/quipeE/rigerE/rosionErreurE/ruptionEscalierEspadonEspe-ceEspie-gleEspoirEspritEsquiverEssayerEssenceEssieuEssorerEstimeEstomacEstradeE/tage-reE/talerE/tancheE/tatiqueE/teindreE/tendoirE/ternelE/thanolE/thiqueEthnieE/tirerE/tofferE/toileE/tonnantE/tourdirE/trangeE/troitE/tudeEuphorieE/valuerE/vasionE/ventailE/videnceE/viterE/volutifE/voquerExactExage/rerExaucerExcellerExcitantExclusifExcuseExe/cuterExempleExercerExhalerExhorterExigenceExilerExisterExotiqueExpe/dierExplorerExposerExprimerExquisExtensifExtraireExulterFableFabuleuxFacetteFacileFactureFaiblirFalaiseFameuxFamilleFarceurFarfeluFarineFaroucheFascinerFatalFatigueFauconFautifFaveurFavoriFe/brileFe/conderFe/de/rerFe/linFemmeFe/murFendoirFe/odalFermerFe/roceFerveurFestivalFeuilleFeutreFe/vrierFiascoFicelerFictifFide-leFigureFilatureFiletageFilie-reFilleulFilmerFilouFiltrerFinancerFinirFioleFirmeFissureFixerFlairerFlammeFlasqueFlatteurFle/auFle-cheFleurFlexionFloconFloreFluctuerFluideFluvialFolieFonderieFongibleFontaineForcerForgeronFormulerFortuneFossileFoudreFouge-reFouillerFoulureFourmiFragileFraiseFranchirFrapperFrayeurFre/gateFreinerFrelonFre/mirFre/ne/sieFre-reFriableFrictionFrissonFrivoleFroidFromageFrontalFrotterFruitFugitifFuiteFureurFurieuxFurtifFusionFuturGagnerGalaxieGalerieGambaderGarantirGardienGarnirGarrigueGazelleGazonGe/antGe/latineGe/luleGendarmeGe/ne/ralGe/nieGenouGentilGe/ologieGe/ome-treGe/raniumGermeGestuelGeyserGibierGiclerGirafeGivreGlaceGlaiveGlisserGlobeGloireGlorieuxGolfeurGommeGonflerGorgeGorilleGoudronGouffreGoulotGoupilleGourmandGoutteGraduelGraffitiGraineGrandGrappinGratuitGravirGrenatGriffureGrillerGrimperGrognerGronderGrotteGroupeGrugerGrutierGruye-reGue/pardGuerrierGuideGuimauveGuitareGustatifGymnasteGyrostatHabitudeHachoirHalteHameauHangarHannetonHaricotHarmonieHarponHasardHe/liumHe/matomeHerbeHe/rissonHermineHe/ronHe/siterHeureuxHibernerHibouHilarantHistoireHiverHomardHommageHomoge-neHonneurHonorerHonteuxHordeHorizonHorlogeHormoneHorribleHouleuxHousseHublotHuileuxHumainHumbleHumideHumourHurlerHydromelHygie-neHymneHypnoseIdylleIgnorerIguaneIlliciteIllusionImageImbiberImiterImmenseImmobileImmuableImpactImpe/rialImplorerImposerImprimerImputerIncarnerIncendieIncidentInclinerIncoloreIndexerIndiceInductifIne/ditIneptieInexactInfiniInfligerInformerInfusionInge/rerInhalerInhiberInjecterInjureInnocentInoculerInonderInscrireInsecteInsigneInsoliteInspirerInstinctInsulterIntactIntenseIntimeIntrigueIntuitifInutileInvasionInventerInviterInvoquerIroniqueIrradierIrre/elIrriterIsolerIvoireIvresseJaguarJaillirJambeJanvierJardinJaugerJauneJavelotJetableJetonJeudiJeunesseJoindreJoncherJonglerJoueurJouissifJournalJovialJoyauJoyeuxJubilerJugementJuniorJuponJuristeJusticeJuteuxJuve/nileKayakKimonoKiosqueLabelLabialLabourerLace/rerLactoseLaguneLaineLaisserLaitierLambeauLamelleLampeLanceurLangageLanterneLapinLargeurLarmeLaurierLavaboLavoirLectureLe/galLe/gerLe/gumeLessiveLettreLevierLexiqueLe/zardLiasseLibe/rerLibreLicenceLicorneLie-geLie-vreLigatureLigoterLigueLimerLimiteLimonadeLimpideLine/aireLingotLionceauLiquideLisie-reListerLithiumLitigeLittoralLivreurLogiqueLointainLoisirLombricLoterieLouerLourdLoutreLouveLoyalLubieLucideLucratifLueurLugubreLuisantLumie-reLunaireLundiLuronLutterLuxueuxMachineMagasinMagentaMagiqueMaigreMaillonMaintienMairieMaisonMajorerMalaxerMale/ficeMalheurMaliceMalletteMammouthMandaterManiableManquantManteauManuelMarathonMarbreMarchandMardiMaritimeMarqueurMarronMartelerMascotteMassifMate/rielMatie-reMatraqueMaudireMaussadeMauveMaximalMe/chantMe/connuMe/dailleMe/decinMe/diterMe/duseMeilleurMe/langeMe/lodieMembreMe/moireMenacerMenerMenhirMensongeMentorMercrediMe/riteMerleMessagerMesureMe/talMe/te/oreMe/thodeMe/tierMeubleMiaulerMicrobeMietteMignonMigrerMilieuMillionMimiqueMinceMine/ralMinimalMinorerMinuteMiracleMiroiterMissileMixteMobileModerneMoelleuxMondialMoniteurMonnaieMonotoneMonstreMontagneMonumentMoqueurMorceauMorsureMortierMoteurMotifMoucheMoufleMoulinMoussonMoutonMouvantMultipleMunitionMurailleMure-neMurmureMuscleMuse/umMusicienMutationMuterMutuelMyriadeMyrtilleMyste-reMythiqueNageurNappeNarquoisNarrerNatationNationNatureNaufrageNautiqueNavireNe/buleuxNectarNe/fasteNe/gationNe/gligerNe/gocierNeigeNerveuxNettoyerNeuroneNeutronNeveuNicheNickelNitrateNiveauNobleNocifNocturneNoirceurNoisetteNomadeNombreuxNommerNormatifNotableNotifierNotoireNourrirNouveauNovateurNovembreNoviceNuageNuancerNuireNuisibleNume/roNuptialNuqueNutritifObe/irObjectifObligerObscurObserverObstacleObtenirObturerOccasionOccuperOce/anOctobreOctroyerOctuplerOculaireOdeurOdorantOffenserOfficierOffrirOgiveOiseauOisillonOlfactifOlivierOmbrageOmettreOnctueuxOndulerOne/reuxOniriqueOpaleOpaqueOpe/rerOpinionOpportunOpprimerOpterOptiqueOrageuxOrangeOrbiteOrdonnerOreilleOrganeOrgueilOrificeOrnementOrqueOrtieOscillerOsmoseOssatureOtarieOuraganOursonOutilOutragerOuvrageOvationOxydeOxyge-neOzonePaisiblePalacePalmare-sPalourdePalperPanachePandaPangolinPaniquerPanneauPanoramaPantalonPapayePapierPapoterPapyrusParadoxeParcelleParesseParfumerParlerParoleParrainParsemerPartagerParureParvenirPassionPaste-quePaternelPatiencePatronPavillonPavoiserPayerPaysagePeignePeintrePelagePe/licanPellePelousePeluchePendulePe/ne/trerPe/niblePensifPe/nuriePe/pitePe/plumPerdrixPerforerPe/riodePermuterPerplexePersilPertePeserPe/talePetitPe/trirPeuplePharaonPhobiePhoquePhotonPhrasePhysiquePianoPicturalPie-cePierrePieuvrePilotePinceauPipettePiquerPiroguePiscinePistonPivoterPixelPizzaPlacardPlafondPlaisirPlanerPlaquePlastronPlateauPleurerPlexusPliagePlombPlongerPluiePlumagePochettePoe/siePoe-tePointePoirierPoissonPoivrePolairePolicierPollenPolygonePommadePompierPonctuelPonde/rerPoneyPortiquePositionPosse/derPosturePotagerPoteauPotionPoucePoulainPoumonPourprePoussinPouvoirPrairiePratiquePre/cieuxPre/direPre/fixePre/ludePre/nomPre/sencePre/textePre/voirPrimitifPrincePrisonPriverProble-meProce/derProdigeProfondProgre-sProieProjeterProloguePromenerPropreProspe-reProte/gerProuesseProverbePrudencePruneauPsychosePublicPuceronPuiserPulpePulsarPunaisePunitifPupitrePurifierPuzzlePyramideQuasarQuerelleQuestionQuie/tudeQuitterQuotientRacineRaconterRadieuxRagondinRaideurRaisinRalentirRallongeRamasserRapideRasageRatisserRavagerRavinRayonnerRe/actifRe/agirRe/aliserRe/animerRecevoirRe/citerRe/clamerRe/colterRecruterReculerRecyclerRe/digerRedouterRefaireRe/flexeRe/formerRefrainRefugeRe/galienRe/gionRe/glageRe/gulierRe/ite/rerRejeterRejouerRelatifReleverReliefRemarqueReme-deRemiseRemonterRemplirRemuerRenardRenfortReniflerRenoncerRentrerRenvoiReplierReporterRepriseReptileRequinRe/serveRe/sineuxRe/soudreRespectResterRe/sultatRe/tablirRetenirRe/ticuleRetomberRetracerRe/unionRe/ussirRevancheRevivreRe/volteRe/vulsifRichesseRideauRieurRigideRigolerRincerRiposterRisibleRisqueRituelRivalRivie-reRocheuxRomanceRompreRonceRondinRoseauRosierRotatifRotorRotuleRougeRouilleRouleauRoutineRoyaumeRubanRubisRucheRuelleRugueuxRuinerRuisseauRuserRustiqueRythmeSablerSaboterSabreSacocheSafariSagesseSaisirSaladeSaliveSalonSaluerSamediSanctionSanglierSarcasmeSardineSaturerSaugrenuSaumonSauterSauvageSavantSavonnerScalpelScandaleSce/le/ratSce/narioSceptreSche/maScienceScinderScoreScrutinSculpterSe/anceSe/cableSe/cherSecouerSe/cre/terSe/datifSe/duireSeigneurSe/jourSe/lectifSemaineSemblerSemenceSe/minalSe/nateurSensibleSentenceSe/parerSe/quenceSereinSergentSe/rieuxSerrureSe/rumServiceSe/sameSe/virSevrageSextupleSide/ralSie-cleSie/gerSifflerSigleSignalSilenceSiliciumSimpleSince-reSinistreSiphonSiropSismiqueSituerSkierSocialSocleSodiumSoigneuxSoldatSoleilSolitudeSolubleSombreSommeilSomnolerSondeSongeurSonnetteSonoreSorcierSortirSosieSottiseSoucieuxSoudureSouffleSouleverSoupapeSourceSoutirerSouvenirSpacieuxSpatialSpe/cialSphe-reSpiralStableStationSternumStimulusStipulerStrictStudieuxStupeurStylisteSublimeSubstratSubtilSubvenirSucce-sSucreSuffixeSugge/rerSuiveurSulfateSuperbeSupplierSurfaceSuricateSurmenerSurpriseSursautSurvieSuspectSyllabeSymboleSyme/trieSynapseSyntaxeSyste-meTabacTablierTactileTaillerTalentTalismanTalonnerTambourTamiserTangibleTapisTaquinerTarderTarifTartineTasseTatamiTatouageTaupeTaureauTaxerTe/moinTemporelTenailleTendreTeneurTenirTensionTerminerTerneTerribleTe/tineTexteThe-meThe/orieThe/rapieThoraxTibiaTie-deTimideTirelireTiroirTissuTitaneTitreTituberTobogganTole/rantTomateToniqueTonneauToponymeTorcheTordreTornadeTorpilleTorrentTorseTortueTotemToucherTournageTousserToxineTractionTraficTragiqueTrahirTrainTrancherTravailTre-fleTremperTre/sorTreuilTriageTribunalTricoterTrilogieTriompheTriplerTriturerTrivialTromboneTroncTropicalTroupeauTuileTulipeTumulteTunnelTurbineTuteurTutoyerTuyauTympanTyphonTypiqueTyranUbuesqueUltimeUltrasonUnanimeUnifierUnionUniqueUnitaireUniversUraniumUrbainUrticantUsageUsineUsuelUsureUtileUtopieVacarmeVaccinVagabondVagueVaillantVaincreVaisseauValableValiseVallonValveVampireVanilleVapeurVarierVaseuxVassalVasteVecteurVedetteVe/ge/talVe/hiculeVeinardVe/loceVendrediVe/ne/rerVengerVenimeuxVentouseVerdureVe/rinVernirVerrouVerserVertuVestonVe/te/ranVe/tusteVexantVexerViaducViandeVictoireVidangeVide/oVignetteVigueurVilainVillageVinaigreViolonVipe-reVirementVirtuoseVirusVisageViseurVisionVisqueuxVisuelVitalVitesseViticoleVitrineVivaceVivipareVocationVoguerVoileVoisinVoitureVolailleVolcanVoltigerVolumeVoraceVortexVoterVouloirVoyageVoyelleWagonXe/nonYachtZe-breZe/nithZesteZoologie\";\n var wordlist = null;\n var lookup = {};\n function dropDiacritic(word) {\n wordlist_1.logger.checkNormalize();\n return (0, strings_1.toUtf8String)(Array.prototype.filter.call((0, strings_1.toUtf8Bytes)(word.normalize(\"NFD\").toLowerCase()), function(c4) {\n return c4 >= 65 && c4 <= 90 || c4 >= 97 && c4 <= 123;\n }));\n }\n function expand(word) {\n var output = [];\n Array.prototype.forEach.call((0, strings_1.toUtf8Bytes)(word), function(c4) {\n if (c4 === 47) {\n output.push(204);\n output.push(129);\n } else if (c4 === 45) {\n output.push(204);\n output.push(128);\n } else {\n output.push(c4);\n }\n });\n return (0, strings_1.toUtf8String)(output);\n }\n function loadWords(lang) {\n if (wordlist != null) {\n return;\n }\n wordlist = words.replace(/([A-Z])/g, \" $1\").toLowerCase().substring(1).split(\" \").map(function(w3) {\n return expand(w3);\n });\n wordlist.forEach(function(word, index2) {\n lookup[dropDiacritic(word)] = index2;\n });\n if (wordlist_1.Wordlist.check(lang) !== \"0x51deb7ae009149dc61a6bd18a918eb7ac78d2775726c68e598b92d002519b045\") {\n wordlist = null;\n throw new Error(\"BIP39 Wordlist for fr (French) FAILED\");\n }\n }\n var LangFr = (\n /** @class */\n function(_super) {\n __extends3(LangFr2, _super);\n function LangFr2() {\n return _super.call(this, \"fr\") || this;\n }\n LangFr2.prototype.getWord = function(index2) {\n loadWords(this);\n return wordlist[index2];\n };\n LangFr2.prototype.getWordIndex = function(word) {\n loadWords(this);\n return lookup[dropDiacritic(word)];\n };\n return LangFr2;\n }(wordlist_1.Wordlist)\n );\n var langFr = new LangFr();\n exports3.langFr = langFr;\n wordlist_1.Wordlist.register(langFr);\n }\n });\n\n // ../../../node_modules/.pnpm/@ethersproject+wordlists@5.8.0/node_modules/@ethersproject/wordlists/lib/lang-ja.js\n var require_lang_ja = __commonJS({\n \"../../../node_modules/.pnpm/@ethersproject+wordlists@5.8.0/node_modules/@ethersproject/wordlists/lib/lang-ja.js\"(exports3) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n var __extends3 = exports3 && exports3.__extends || /* @__PURE__ */ function() {\n var extendStatics3 = function(d5, b4) {\n extendStatics3 = Object.setPrototypeOf || { __proto__: [] } instanceof Array && function(d6, b5) {\n d6.__proto__ = b5;\n } || function(d6, b5) {\n for (var p4 in b5)\n if (Object.prototype.hasOwnProperty.call(b5, p4))\n d6[p4] = b5[p4];\n };\n return extendStatics3(d5, b4);\n };\n return function(d5, b4) {\n if (typeof b4 !== \"function\" && b4 !== null)\n throw new TypeError(\"Class extends value \" + String(b4) + \" is not a constructor or null\");\n extendStatics3(d5, b4);\n function __() {\n this.constructor = d5;\n }\n d5.prototype = b4 === null ? Object.create(b4) : (__.prototype = b4.prototype, new __());\n };\n }();\n Object.defineProperty(exports3, \"__esModule\", { value: true });\n exports3.langJa = void 0;\n var bytes_1 = require_lib2();\n var strings_1 = require_lib9();\n var wordlist_1 = require_wordlist();\n var data = [\n // 4-kana words\n \"AQRASRAGBAGUAIRAHBAghAURAdBAdcAnoAMEAFBAFCBKFBQRBSFBCXBCDBCHBGFBEQBpBBpQBIkBHNBeOBgFBVCBhBBhNBmOBmRBiHBiFBUFBZDBvFBsXBkFBlcBjYBwDBMBBTBBTRBWBBWXXaQXaRXQWXSRXCFXYBXpHXOQXHRXhRXuRXmXXbRXlXXwDXTRXrCXWQXWGaBWaKcaYgasFadQalmaMBacAKaRKKBKKXKKjKQRKDRKCYKCRKIDKeVKHcKlXKjHKrYNAHNBWNaRNKcNIBNIONmXNsXNdXNnBNMBNRBNrXNWDNWMNFOQABQAHQBrQXBQXFQaRQKXQKDQKOQKFQNBQNDQQgQCXQCDQGBQGDQGdQYXQpBQpQQpHQLXQHuQgBQhBQhCQuFQmXQiDQUFQZDQsFQdRQkHQbRQlOQlmQPDQjDQwXQMBQMDQcFQTBQTHQrDDXQDNFDGBDGQDGRDpFDhFDmXDZXDbRDMYDRdDTRDrXSAhSBCSBrSGQSEQSHBSVRShYShkSyQSuFSiBSdcSoESocSlmSMBSFBSFKSFNSFdSFcCByCaRCKcCSBCSRCCrCGbCEHCYXCpBCpQCIBCIHCeNCgBCgFCVECVcCmkCmwCZXCZFCdRClOClmClFCjDCjdCnXCwBCwXCcRCFQCFjGXhGNhGDEGDMGCDGCHGIFGgBGVXGVEGVRGmXGsXGdYGoSGbRGnXGwXGwDGWRGFNGFLGFOGFdGFkEABEBDEBFEXOEaBEKSENBENDEYXEIgEIkEgBEgQEgHEhFEudEuFEiBEiHEiFEZDEvBEsXEsFEdXEdREkFEbBEbRElFEPCEfkEFNYAEYAhYBNYQdYDXYSRYCEYYoYgQYgRYuRYmCYZTYdBYbEYlXYjQYRbYWRpKXpQopQnpSFpCXpIBpISphNpdBpdRpbRpcZpFBpFNpFDpFopFrLADLBuLXQLXcLaFLCXLEhLpBLpFLHXLeVLhILdHLdRLoDLbRLrXIABIBQIBCIBsIBoIBMIBRIXaIaRIKYIKRINBINuICDIGBIIDIIkIgRIxFIyQIiHIdRIbYIbRIlHIwRIMYIcRIRVITRIFBIFNIFQOABOAFOBQOaFONBONMOQFOSFOCDOGBOEQOpBOLXOIBOIFOgQOgFOyQOycOmXOsXOdIOkHOMEOMkOWWHBNHXNHXWHNXHDuHDRHSuHSRHHoHhkHmRHdRHkQHlcHlRHwBHWcgAEgAggAkgBNgBQgBEgXOgYcgLXgHjgyQgiBgsFgdagMYgWSgFQgFEVBTVXEVKBVKNVKDVKYVKRVNBVNYVDBVDxVSBVSRVCjVGNVLXVIFVhBVhcVsXVdRVbRVlRhBYhKYhDYhGShxWhmNhdahdkhbRhjohMXhTRxAXxXSxKBxNBxEQxeNxeQxhXxsFxdbxlHxjcxFBxFNxFQxFOxFoyNYyYoybcyMYuBQuBRuBruDMuCouHBudQukkuoBulVuMXuFEmCYmCRmpRmeDmiMmjdmTFmFQiADiBOiaRiKRiNBiNRiSFiGkiGFiERipRiLFiIFihYibHijBijEiMXiWBiFBiFCUBQUXFUaRUNDUNcUNRUNFUDBUSHUCDUGBUGFUEqULNULoUIRUeEUeYUgBUhFUuRUiFUsXUdFUkHUbBUjSUjYUwXUMDUcHURdUTBUrBUrXUrQZAFZXZZaRZKFZNBZQFZCXZGBZYdZpBZLDZIFZHXZHNZeQZVRZVFZmXZiBZvFZdFZkFZbHZbFZwXZcCZcRZRBvBQvBGvBLvBWvCovMYsAFsBDsaRsKFsNFsDrsSHsSFsCXsCRsEBsEHsEfspBsLBsLDsIgsIRseGsbRsFBsFQsFSdNBdSRdCVdGHdYDdHcdVbdySduDdsXdlRdwXdWYdWcdWRkBMkXOkaRkNIkNFkSFkCFkYBkpRkeNkgBkhVkmXksFklVkMBkWDkFNoBNoaQoaFoNBoNXoNaoNEoSRoEroYXoYCoYbopRopFomXojkowXorFbBEbEIbdBbjYlaRlDElMXlFDjKjjSRjGBjYBjYkjpRjLXjIBjOFjeVjbRjwBnXQnSHnpFnLXnINnMBnTRwXBwXNwXYwNFwQFwSBwGFwLXwLDweNwgBwuHwjDwnXMBXMpFMIBMeNMTHcaQcNBcDHcSFcCXcpBcLXcLDcgFcuFcnXcwXccDcTQcrFTQErXNrCHrpFrgFrbFrTHrFcWNYWNbWEHWMXWTR\",\n // 5-kana words\n \"ABGHABIJAEAVAYJQALZJAIaRAHNXAHdcAHbRAZJMAZJRAZTRAdVJAklmAbcNAjdRAMnRAMWYAWpRAWgRAFgBAFhBAFdcBNJBBNJDBQKBBQhcBQlmBDEJBYJkBYJTBpNBBpJFBIJBBIJDBIcABOKXBOEJBOVJBOiJBOZJBepBBeLXBeIFBegBBgGJBVJXBuocBiJRBUJQBlXVBlITBwNFBMYVBcqXBTlmBWNFBWiJBWnRBFGHBFwXXKGJXNJBXNZJXDTTXSHSXSVRXSlHXCJDXGQJXEhXXYQJXYbRXOfXXeNcXVJFXhQJXhEJXdTRXjdXXMhBXcQTXRGBXTEBXTnQXFCXXFOFXFgFaBaFaBNJaBCJaBpBaBwXaNJKaNJDaQIBaDpRaEPDaHMFamDJalEJaMZJaFaFaFNBaFQJaFLDaFVHKBCYKBEBKBHDKXaFKXGdKXEJKXpHKXIBKXZDKXwXKKwLKNacKNYJKNJoKNWcKDGdKDTRKChXKGaRKGhBKGbRKEBTKEaRKEPTKLMDKLWRKOHDKVJcKdBcKlIBKlOPKFSBKFEPKFpFNBNJNJBQNBGHNBEPNBHXNBgFNBVXNBZDNBsXNBwXNNaRNNJDNNJENNJkNDCJNDVDNGJRNJiDNZJNNsCJNJFNNFSBNFCXNFEPNFLXNFIFQJBFQCaRQJEQQLJDQLJFQIaRQOqXQHaFQHHQQVJXQVJDQhNJQmEIQZJFQsJXQJrFQWbRDJABDBYJDXNFDXCXDXLXDXZDDXsJDQqXDSJFDJCXDEPkDEqXDYmQDpSJDOCkDOGQDHEIDVJDDuDuDWEBDJFgSBNDSBSFSBGHSBIBSBTQSKVYSJQNSJQiSJCXSEqXSJYVSIiJSOMYSHAHSHaQSeCFSepQSegBSHdHSHrFShSJSJuHSJUFSkNRSrSrSWEBSFaHSJFQSFCXSFGDSFYXSFODSFgBSFVXSFhBSFxFSFkFSFbBSFMFCADdCJXBCXaFCXKFCXNFCXCXCXGBCXEJCXYBCXLDCXIBCXOPCXHXCXgBCXhBCXiBCXlDCXcHCJNBCJNFCDCJCDGBCDVXCDhBCDiDCDJdCCmNCpJFCIaRCOqXCHCHCHZJCViJCuCuCmddCJiFCdNBCdHhClEJCnUJCreSCWlgCWTRCFBFCFNBCFYBCFVFCFhFCFdSCFTBCFWDGBNBGBQFGJBCGBEqGBpBGBgQGNBEGNJYGNkOGNJRGDUFGJpQGHaBGJeNGJeEGVBlGVKjGiJDGvJHGsVJGkEBGMIJGWjNGFBFGFCXGFGBGFYXGFpBGFMFEASJEAWpEJNFECJVEIXSEIQJEOqXEOcFEeNcEHEJEHlFEJgFEhlmEmDJEmZJEiMBEUqXEoSREPBFEPXFEPKFEPSFEPEFEPpFEPLXEPIBEJPdEPcFEPTBEJnXEqlHEMpREFCXEFODEFcFYASJYJAFYBaBYBVXYXpFYDhBYCJBYJGFYYbRYeNcYJeVYiIJYZJcYvJgYvJRYJsXYsJFYMYMYreVpBNHpBEJpBwXpQxFpYEJpeNDpJeDpeSFpeCHpHUJpHbBpHcHpmUJpiiJpUJrpsJuplITpFaBpFQqpFGBpFEfpFYBpFpBpFLJpFIDpFgBpFVXpFyQpFuFpFlFpFjDpFnXpFwXpJFMpFTBLXCJLXEFLXhFLXUJLXbFLalmLNJBLSJQLCLCLGJBLLDJLHaFLeNFLeSHLeCXLepFLhaRLZsJLsJDLsJrLocaLlLlLMdbLFNBLFSBLFEHLFkFIBBFIBXFIBaQIBKXIBSFIBpHIBLXIBgBIBhBIBuHIBmXIBiFIBZXIBvFIBbFIBjQIBwXIBWFIKTRIQUJIDGFICjQIYSRIINXIJeCIVaRImEkIZJFIvJRIsJXIdCJIJoRIbBQIjYBIcqXITFVIreVIFKFIFSFIFCJIFGFIFLDIFIBIJFOIFgBIFVXIJFhIFxFIFmXIFdHIFbBIJFrIJFWOBGBOQfXOOKjOUqXOfXBOqXEOcqXORVJOFIBOFlDHBIOHXiFHNTRHCJXHIaRHHJDHHEJHVbRHZJYHbIBHRsJHRkDHWlmgBKFgBSBgBCDgBGHgBpBgBIBgBVJgBuBgBvFgKDTgQVXgDUJgGSJgOqXgmUMgZIJgTUJgWIEgFBFgFNBgFDJgFSFgFGBgFYXgJFOgFgQgFVXgFhBgFbHgJFWVJABVQKcVDgFVOfXVeDFVhaRVmGdViJYVMaRVFNHhBNDhBCXhBEqhBpFhBLXhNJBhSJRheVXhhKEhxlmhZIJhdBQhkIJhbMNhMUJhMZJxNJgxQUJxDEkxDdFxSJRxplmxeSBxeCXxeGFxeYXxepQxegBxWVcxFEQxFLXxFIBxFgBxFxDxFZtxFdcxFbBxFwXyDJXyDlcuASJuDJpuDIBuCpJuGSJuIJFueEFuZIJusJXudWEuoIBuWGJuFBcuFKEuFNFuFQFuFDJuFGJuFVJuFUtuFdHuFTBmBYJmNJYmQhkmLJDmLJomIdXmiJYmvJRmsJRmklmmMBymMuCmclmmcnQiJABiJBNiJBDiBSFiBCJiBEFiBYBiBpFiBLXiBTHiJNciDEfiCZJiECJiJEqiOkHiHKFieNDiHJQieQcieDHieSFieCXieGFieEFieIHiegFihUJixNoioNXiFaBiFKFiFNDiFEPiFYXitFOitFHiFgBiFVEiFmXiFitiFbBiFMFiFrFUCXQUIoQUIJcUHQJUeCEUHwXUUJDUUqXUdWcUcqXUrnQUFNDUFSHUFCFUFEfUFLXUtFOZBXOZXSBZXpFZXVXZEQJZEJkZpDJZOqXZeNHZeCDZUqXZFBQZFEHZFLXvBAFvBKFvBCXvBEPvBpHvBIDvBgFvBuHvQNJvFNFvFGBvFIBvJFcsXCDsXLXsXsXsXlFsXcHsQqXsJQFsEqXseIFsFEHsFjDdBxOdNpRdNJRdEJbdpJRdhZJdnSJdrjNdFNJdFQHdFhNkNJDkYaRkHNRkHSRkVbRkuMRkjSJkcqDoSJFoEiJoYZJoOfXohEBoMGQocqXbBAFbBXFbBaFbBNDbBGBbBLXbBTBbBWDbGJYbIJHbFQqbFpQlDgQlOrFlVJRjGEBjZJRnXvJnXbBnEfHnOPDngJRnxfXnUJWwXEJwNpJwDpBwEfXwrEBMDCJMDGHMDIJMLJDcQGDcQpHcqXccqNFcqCXcFCJRBSBRBGBRBEJRBpQTBNFTBQJTBpBTBVXTFABTFSBTFCFTFGBTFMDrXCJrXLDrDNJrEfHrFQJrFitWNjdWNTR\",\n // 6-kana words\n \"AKLJMANOPFASNJIAEJWXAYJNRAIIbRAIcdaAeEfDAgidRAdjNYAMYEJAMIbRAFNJBAFpJFBBIJYBDZJFBSiJhBGdEBBEJfXBEJqXBEJWRBpaUJBLXrXBIYJMBOcfXBeEfFBestXBjNJRBcDJOBFEqXXNvJRXDMBhXCJNYXOAWpXONJWXHDEBXeIaRXhYJDXZJSJXMDJOXcASJXFVJXaBQqXaBZJFasXdQaFSJQaFEfXaFpJHaFOqXKBNSRKXvJBKQJhXKEJQJKEJGFKINJBKIJjNKgJNSKVElmKVhEBKiJGFKlBgJKjnUJKwsJYKMFIJKFNJDKFIJFKFOfXNJBSFNJBCXNBpJFNJBvQNJBMBNJLJXNJOqXNJeCXNJeGFNdsJCNbTKFNwXUJQNFEPQDiJcQDMSJQSFpBQGMQJQJeOcQyCJEQUJEBQJFBrQFEJqDXDJFDJXpBDJXIMDGiJhDIJGRDJeYcDHrDJDVXgFDkAWpDkIgRDjDEqDMvJRDJFNFDJFIBSKclmSJQOFSJQVHSJQjDSJGJBSJGJFSECJoSHEJqSJHTBSJVJDSViJYSZJNBSJsJDSFSJFSFEfXSJFLXCBUJVCJXSBCJXpBCXVJXCJXsXCJXdFCJNJHCLIJgCHiJFCVNJMChCJhCUHEJCsJTRCJdYcCoQJCCFEfXCFIJgCFUJxCFstFGJBaQGJBIDGQJqXGYJNRGJHKFGeQqDGHEJFGJeLXGHIiJGHdBlGUJEBGkIJTGFQPDGJFEqEAGegEJIJBEJVJXEhQJTEiJNcEJZJFEJoEqEjDEqEPDsXEPGJBEPOqXEPeQFEfDiDEJfEFEfepQEfMiJEqXNBEqDIDEqeSFEqVJXEMvJRYXNJDYXEJHYKVJcYYJEBYJeEcYJUqXYFpJFYFstXpAZJMpBSJFpNBNFpeQPDpHLJDpHIJFpHgJFpeitFpHZJFpJFADpFSJFpJFCJpFOqXpFitBpJFZJLXIJFLIJgRLVNJWLVHJMLwNpJLFGJBLFLJDLFOqXLJFUJIBDJXIBGJBIJBYQIJBIBIBOqXIBcqDIEGJFILNJTIIJEBIOiJhIJeNBIJeIBIhiJIIWoTRIJFAHIJFpBIJFuHIFUtFIJFTHOSBYJOEcqXOHEJqOvBpFOkVJrObBVJOncqDOcNJkHhNJRHuHJuHdMhBgBUqXgBsJXgONJBgHNJDgHHJQgJeitgHsJXgJyNagyDJBgZJDrgsVJQgkEJNgkjSJgJFAHgFCJDgFZtMVJXNFVXQfXVJXDJVXoQJVQVJQVDEfXVDvJHVEqNFVeQfXVHpJFVHxfXVVJSRVVmaRVlIJOhCXVJhHjYkhxCJVhWVUJhWiJcxBNJIxeEqDxfXBFxcFEPxFSJFxFYJXyBDQJydaUJyFOPDuYCJYuLvJRuHLJXuZJLDuFOPDuFZJHuFcqXmKHJdmCQJcmOsVJiJAGFitLCFieOfXiestXiZJMEikNJQirXzFiFQqXiFIJFiFZJFiFvtFUHpJFUteIcUteOcUVCJkUhdHcUbEJEUJqXQUMNJhURjYkUFitFZDGJHZJIxDZJVJXZJFDJZJFpQvBNJBvBSJFvJxBrseQqDsVFVJdFLJDkEJNBkmNJYkFLJDoQJOPoGsJRoEAHBoEJfFbBQqDbBZJHbFVJXlFIJBjYIrXjeitcjjCEBjWMNBwXQfXwXOaFwDsJXwCJTRwrCZJMDNJQcDDJFcqDOPRYiJFTBsJXTQIJBTFEfXTFLJDrXEJFrEJXMrFZJFWEJdEWYTlm\",\n // 7-kana words\n \"ABCDEFACNJTRAMBDJdAcNJVXBLNJEBXSIdWRXErNJkXYDJMBXZJCJaXMNJaYKKVJKcKDEJqXKDcNJhKVJrNYKbgJVXKFVJSBNBYBwDNJeQfXNJeEqXNhGJWENJFiJRQlIJbEQJfXxDQqXcfXQFNDEJQFwXUJDYcnUJDJIBgQDIUJTRDJFEqDSJQSJFSJQIJFSOPeZtSJFZJHCJXQfXCTDEqFGJBSJFGJBOfXGJBcqXGJHNJDGJRLiJEJfXEqEJFEJPEFpBEJYJBZJFYBwXUJYiJMEBYJZJyTYTONJXpQMFXFpeGIDdpJFstXpJFcPDLBVSJRLHQJqXLJFZJFIJBNJDIJBUqXIBkFDJIJEJPTIYJGWRIJeQPDIJeEfHIJFsJXOqGDSFHXEJqXgJCsJCgGQJqXgdQYJEgFMFNBgJFcqDVJwXUJVJFZJchIgJCCxOEJqXxOwXUJyDJBVRuscisciJBiJBieUtqXiJFDJkiFsJXQUGEZJcUJFsJXZtXIrXZDZJDrZJFNJDZJFstXvJFQqXvJFCJEsJXQJqkhkNGBbDJdTRbYJMEBlDwXUJMEFiJFcfXNJDRcNJWMTBLJXC\",\n // 8-kana words\n \"BraFUtHBFSJFdbNBLJXVJQoYJNEBSJBEJfHSJHwXUJCJdAZJMGjaFVJXEJPNJBlEJfFiJFpFbFEJqIJBVJCrIBdHiJhOPFChvJVJZJNJWxGFNIFLueIBQJqUHEJfUFstOZJDrlXEASJRlXVJXSFwVJNJWD\",\n // 9-kana words\n \"QJEJNNJDQJEJIBSFQJEJxegBQJEJfHEPSJBmXEJFSJCDEJqXLXNJFQqXIcQsFNJFIFEJqXUJgFsJXIJBUJEJfHNFvJxEqXNJnXUJFQqD\",\n // 10-kana words\n \"IJBEJqXZJ\"\n ];\n var mapping = \"~~AzB~X~a~KN~Q~D~S~C~G~E~Y~p~L~I~O~eH~g~V~hxyumi~~U~~Z~~v~~s~~dkoblPjfnqwMcRTr~W~~~F~~~~~Jt\";\n var wordlist = null;\n function hex(word) {\n return (0, bytes_1.hexlify)((0, strings_1.toUtf8Bytes)(word));\n }\n var KiYoKu = \"0xe3818de38284e3818f\";\n var KyoKu = \"0xe3818de38283e3818f\";\n function loadWords(lang) {\n if (wordlist !== null) {\n return;\n }\n wordlist = [];\n var transform2 = {};\n transform2[(0, strings_1.toUtf8String)([227, 130, 154])] = false;\n transform2[(0, strings_1.toUtf8String)([227, 130, 153])] = false;\n transform2[(0, strings_1.toUtf8String)([227, 130, 133])] = (0, strings_1.toUtf8String)([227, 130, 134]);\n transform2[(0, strings_1.toUtf8String)([227, 129, 163])] = (0, strings_1.toUtf8String)([227, 129, 164]);\n transform2[(0, strings_1.toUtf8String)([227, 130, 131])] = (0, strings_1.toUtf8String)([227, 130, 132]);\n transform2[(0, strings_1.toUtf8String)([227, 130, 135])] = (0, strings_1.toUtf8String)([227, 130, 136]);\n function normalize2(word2) {\n var result = \"\";\n for (var i4 = 0; i4 < word2.length; i4++) {\n var kana = word2[i4];\n var target = transform2[kana];\n if (target === false) {\n continue;\n }\n if (target) {\n kana = target;\n }\n result += kana;\n }\n return result;\n }\n function sortJapanese(a3, b4) {\n a3 = normalize2(a3);\n b4 = normalize2(b4);\n if (a3 < b4) {\n return -1;\n }\n if (a3 > b4) {\n return 1;\n }\n return 0;\n }\n for (var length_1 = 3; length_1 <= 9; length_1++) {\n var d5 = data[length_1 - 3];\n for (var offset = 0; offset < d5.length; offset += length_1) {\n var word = [];\n for (var i3 = 0; i3 < length_1; i3++) {\n var k4 = mapping.indexOf(d5[offset + i3]);\n word.push(227);\n word.push(k4 & 64 ? 130 : 129);\n word.push((k4 & 63) + 128);\n }\n wordlist.push((0, strings_1.toUtf8String)(word));\n }\n }\n wordlist.sort(sortJapanese);\n if (hex(wordlist[442]) === KiYoKu && hex(wordlist[443]) === KyoKu) {\n var tmp = wordlist[442];\n wordlist[442] = wordlist[443];\n wordlist[443] = tmp;\n }\n if (wordlist_1.Wordlist.check(lang) !== \"0xcb36b09e6baa935787fd762ce65e80b0c6a8dabdfbc3a7f86ac0e2c4fd111600\") {\n wordlist = null;\n throw new Error(\"BIP39 Wordlist for ja (Japanese) FAILED\");\n }\n }\n var LangJa = (\n /** @class */\n function(_super) {\n __extends3(LangJa2, _super);\n function LangJa2() {\n return _super.call(this, \"ja\") || this;\n }\n LangJa2.prototype.getWord = function(index2) {\n loadWords(this);\n return wordlist[index2];\n };\n LangJa2.prototype.getWordIndex = function(word) {\n loadWords(this);\n return wordlist.indexOf(word);\n };\n LangJa2.prototype.split = function(mnemonic) {\n wordlist_1.logger.checkNormalize();\n return mnemonic.split(/(?:\\u3000| )+/g);\n };\n LangJa2.prototype.join = function(words) {\n return words.join(\"\\u3000\");\n };\n return LangJa2;\n }(wordlist_1.Wordlist)\n );\n var langJa = new LangJa();\n exports3.langJa = langJa;\n wordlist_1.Wordlist.register(langJa);\n }\n });\n\n // ../../../node_modules/.pnpm/@ethersproject+wordlists@5.8.0/node_modules/@ethersproject/wordlists/lib/lang-ko.js\n var require_lang_ko = __commonJS({\n \"../../../node_modules/.pnpm/@ethersproject+wordlists@5.8.0/node_modules/@ethersproject/wordlists/lib/lang-ko.js\"(exports3) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n var __extends3 = exports3 && exports3.__extends || /* @__PURE__ */ function() {\n var extendStatics3 = function(d5, b4) {\n extendStatics3 = Object.setPrototypeOf || { __proto__: [] } instanceof Array && function(d6, b5) {\n d6.__proto__ = b5;\n } || function(d6, b5) {\n for (var p4 in b5)\n if (Object.prototype.hasOwnProperty.call(b5, p4))\n d6[p4] = b5[p4];\n };\n return extendStatics3(d5, b4);\n };\n return function(d5, b4) {\n if (typeof b4 !== \"function\" && b4 !== null)\n throw new TypeError(\"Class extends value \" + String(b4) + \" is not a constructor or null\");\n extendStatics3(d5, b4);\n function __() {\n this.constructor = d5;\n }\n d5.prototype = b4 === null ? Object.create(b4) : (__.prototype = b4.prototype, new __());\n };\n }();\n Object.defineProperty(exports3, \"__esModule\", { value: true });\n exports3.langKo = void 0;\n var strings_1 = require_lib9();\n var wordlist_1 = require_wordlist();\n var data = [\n \"OYAa\",\n \"ATAZoATBl3ATCTrATCl8ATDloATGg3ATHT8ATJT8ATJl3ATLlvATLn4ATMT8ATMX8ATMboATMgoAToLbAToMTATrHgATvHnAT3AnAT3JbAT3MTAT8DbAT8JTAT8LmAT8MYAT8MbAT#LnAUHT8AUHZvAUJXrAUJX8AULnrAXJnvAXLUoAXLgvAXMn6AXRg3AXrMbAX3JTAX3QbAYLn3AZLgvAZrSUAZvAcAZ8AaAZ8AbAZ8AnAZ8HnAZ8LgAZ8MYAZ8MgAZ8OnAaAboAaDTrAaFTrAaJTrAaJboAaLVoAaMXvAaOl8AaSeoAbAUoAbAg8AbAl4AbGnrAbMT8AbMXrAbMn4AbQb8AbSV8AbvRlAb8AUAb8AnAb8HgAb8JTAb8NTAb8RbAcGboAcLnvAcMT8AcMX8AcSToAcrAaAcrFnAc8AbAc8MgAfGgrAfHboAfJnvAfLV8AfLkoAfMT8AfMnoAfQb8AfScrAfSgrAgAZ8AgFl3AgGX8AgHZvAgHgrAgJXoAgJX8AgJboAgLZoAgLn4AgOX8AgoATAgoAnAgoCUAgoJgAgoLXAgoMYAgoSeAgrDUAgrJTAhrFnAhrLjAhrQgAjAgoAjJnrAkMX8AkOnoAlCTvAlCV8AlClvAlFg4AlFl6AlFn3AloSnAlrAXAlrAfAlrFUAlrFbAlrGgAlrOXAlvKnAlvMTAl3AbAl3MnAnATrAnAcrAnCZ3AnCl8AnDg8AnFboAnFl3AnHX4AnHbrAnHgrAnIl3AnJgvAnLXoAnLX4AnLbrAnLgrAnLhrAnMXoAnMgrAnOn3AnSbrAnSeoAnvLnAn3OnCTGgvCTSlvCTvAUCTvKnCTvNTCT3CZCT3GUCT3MTCT8HnCUCZrCULf8CULnvCU3HnCU3JUCY6NUCbDb8CbFZoCbLnrCboOTCboScCbrFnCbvLnCb8AgCb8HgCb$LnCkLfoClBn3CloDUDTHT8DTLl3DTSU8DTrAaDTrLXDTrLjDTrOYDTrOgDTvFXDTvFnDT3HUDT3LfDUCT9DUDT4DUFVoDUFV8DUFkoDUGgrDUJnrDULl8DUMT8DUMXrDUMX4DUMg8DUOUoDUOgvDUOg8DUSToDUSZ8DbDXoDbDgoDbGT8DbJn3DbLg3DbLn4DbMXrDbMg8DbOToDboJXGTClvGTDT8GTFZrGTLVoGTLlvGTLl3GTMg8GTOTvGTSlrGToCUGTrDgGTrJYGTrScGTtLnGTvAnGTvQgGUCZrGUDTvGUFZoGUHXrGULnvGUMT8GUoMgGXoLnGXrMXGXrMnGXvFnGYLnvGZOnvGZvOnGZ8LaGZ8LmGbAl3GbDYvGbDlrGbHX3GbJl4GbLV8GbLn3GbMn4GboJTGboRfGbvFUGb3GUGb4JnGgDX3GgFl$GgJlrGgLX6GgLZoGgLf8GgOXoGgrAgGgrJXGgrMYGgrScGgvATGgvOYGnAgoGnJgvGnLZoGnLg3GnLnrGnQn8GnSbrGnrMgHTClvHTDToHTFT3HTQT8HToJTHToJgHTrDUHTrMnHTvFYHTvRfHT8MnHT8SUHUAZ8HUBb4HUDTvHUoMYHXFl6HXJX6HXQlrHXrAUHXrMnHXrSbHXvFYHXvKXHX3LjHX3MeHYvQlHZrScHZvDbHbAcrHbFT3HbFl3HbJT8HbLTrHbMT8HbMXrHbMbrHbQb8HbSX3HboDbHboJTHbrFUHbrHgHbrJTHb8JTHb8MnHb8QgHgAlrHgDT3HgGgrHgHgrHgJTrHgJT8HgLX@HgLnrHgMT8HgMX8HgMboHgOnrHgQToHgRg3HgoHgHgrCbHgrFnHgrLVHgvAcHgvAfHnAloHnCTrHnCnvHnGTrHnGZ8HnGnvHnJT8HnLf8HnLkvHnMg8HnRTrITvFUITvFnJTAXrJTCV8JTFT3JTFT8JTFn4JTGgvJTHT8JTJT8JTJXvJTJl3JTJnvJTLX4JTLf8JTLhvJTMT8JTMXrJTMnrJTObrJTQT8JTSlvJT8DUJT8FkJT8MTJT8OXJT8OgJT8QUJT8RfJUHZoJXFT4JXFlrJXGZ8JXGnrJXLV8JXLgvJXMXoJXMX3JXNboJXPlvJXoJTJXoLkJXrAXJXrHUJXrJgJXvJTJXvOnJX4KnJYAl3JYJT8JYLhvJYQToJYrQXJY6NUJbAl3JbCZrJbDloJbGT8JbGgrJbJXvJbJboJbLf8JbLhrJbLl3JbMnvJbRg8JbSZ8JboDbJbrCZJbrSUJb3KnJb8LnJfRn8JgAXrJgCZrJgDTrJgGZrJgGZ8JgHToJgJT8JgJXoJgJgvJgLX4JgLZ3JgLZ8JgLn4JgMgrJgMn4JgOgvJgPX6JgRnvJgSToJgoCZJgoJbJgoMYJgrJXJgrJgJgrLjJg6MTJlCn3JlGgvJlJl8Jl4AnJl8FnJl8HgJnAToJnATrJnAbvJnDUoJnGnrJnJXrJnJXvJnLhvJnLnrJnLnvJnMToJnMT8JnMXvJnMX3JnMg8JnMlrJnMn4JnOX8JnST4JnSX3JnoAgJnoAnJnoJTJnoObJnrAbJnrAkJnrHnJnrJTJnrJYJnrOYJnrScJnvCUJnvFaJnvJgJnvJnJnvOYJnvQUJnvRUJn3FnJn3JTKnFl3KnLT6LTDlvLTMnoLTOn3LTRl3LTSb4LTSlrLToAnLToJgLTrAULTrAcLTrCULTrHgLTrMgLT3JnLULnrLUMX8LUoJgLVATrLVDTrLVLb8LVoJgLV8MgLV8RTLXDg3LXFlrLXrCnLXrLXLX3GTLX4GgLX4OYLZAXrLZAcrLZAgrLZAhrLZDXyLZDlrLZFbrLZFl3LZJX6LZJX8LZLc8LZLnrLZSU8LZoJTLZoJnLZrAgLZrAnLZrJYLZrLULZrMgLZrSkLZvAnLZvGULZvJeLZvOTLZ3FZLZ4JXLZ8STLZ8ScLaAT3LaAl3LaHT8LaJTrLaJT8LaJXrLaJgvLaJl4LaLVoLaMXrLaMXvLaMX8LbClvLbFToLbHlrLbJn4LbLZ3LbLhvLbMXrLbMnoLbvSULcLnrLc8HnLc8MTLdrMnLeAgoLeOgvLeOn3LfAl3LfLnvLfMl3LfOX8Lf8AnLf8JXLf8LXLgJTrLgJXrLgJl8LgMX8LgRZrLhCToLhrAbLhrFULhrJXLhvJYLjHTrLjHX4LjJX8LjLhrLjSX3LjSZ4LkFX4LkGZ8LkGgvLkJTrLkMXoLkSToLkSU8LkSZ8LkoOYLl3FfLl3MgLmAZrLmCbrLmGgrLmHboLmJnoLmJn3LmLfoLmLhrLmSToLnAX6LnAb6LnCZ3LnCb3LnDTvLnDb8LnFl3LnGnrLnHZvLnHgvLnITvLnJT8LnJX8LnJlvLnLf8LnLg6LnLhvLnLnoLnMXrLnMg8LnQlvLnSbrLnrAgLnrAnLnrDbLnrFkLnrJdLnrMULnrOYLnrSTLnvAnLnvDULnvHgLnvOYLnvOnLn3GgLn4DULn4JTLn4JnMTAZoMTAloMTDb8MTFT8MTJnoMTJnrMTLZrMTLhrMTLkvMTMX8MTRTrMToATMTrDnMTrOnMT3JnMT4MnMT8FUMT8FaMT8FlMT8GTMT8GbMT8GnMT8HnMT8JTMT8JbMT8OTMUCl8MUJTrMUJU8MUMX8MURTrMUSToMXAX6MXAb6MXCZoMXFXrMXHXrMXLgvMXOgoMXrAUMXrAnMXrHgMXrJYMXrJnMXrMTMXrMgMXrOYMXrSZMXrSgMXvDUMXvOTMX3JgMX3OTMX4JnMX8DbMX8FnMX8HbMX8HgMX8HnMX8LbMX8MnMX8OnMYAb8MYGboMYHTvMYHX4MYLTrMYLnvMYMToMYOgvMYRg3MYSTrMbAToMbAXrMbAl3MbAn8MbGZ8MbJT8MbJXrMbMXvMbMX8MbMnoMbrMUMb8AfMb8FbMb8FkMcJXoMeLnrMgFl3MgGTvMgGXoMgGgrMgGnrMgHT8MgHZrMgJnoMgLnrMgLnvMgMT8MgQUoMgrHnMgvAnMg8HgMg8JYMg8LfMloJnMl8ATMl8AXMl8JYMnAToMnAT4MnAZ8MnAl3MnAl4MnCl8MnHT8MnHg8MnJnoMnLZoMnLhrMnMXoMnMX3MnMnrMnOgvMnrFbMnrFfMnrFnMnrNTMnvJXNTMl8OTCT3OTFV8OTFn3OTHZvOTJXrOTOl3OT3ATOT3JUOT3LZOT3LeOT3MbOT8ATOT8AbOT8AgOT8MbOUCXvOUMX3OXHXvOXLl3OXrMUOXvDbOX6NUOX8JbOYFZoOYLbrOYLkoOYMg8OYSX3ObHTrObHT4ObJgrObLhrObMX3ObOX8Ob8FnOeAlrOeJT8OeJXrOeJnrOeLToOeMb8OgJXoOgLXoOgMnrOgOXrOgOloOgoAgOgoJbOgoMYOgoSTOg8AbOjLX4OjMnoOjSV8OnLVoOnrAgOn3DUPXQlrPXvFXPbvFTPdAT3PlFn3PnvFbQTLn4QToAgQToMTQULV8QURg8QUoJnQXCXvQbFbrQb8AaQb8AcQb8FbQb8MYQb8ScQeAlrQeLhrQjAn3QlFXoQloJgQloSnRTLnvRTrGURTrJTRUJZrRUoJlRUrQnRZrLmRZrMnRZrSnRZ8ATRZ8JbRZ8ScRbMT8RbST3RfGZrRfMX8RfMgrRfSZrRnAbrRnGT8RnvJgRnvLfRnvMTRn8AaSTClvSTJgrSTOXrSTRg3STRnvSToAcSToAfSToAnSToHnSToLjSToMTSTrAaSTrEUST3BYST8AgST8LmSUAZvSUAgrSUDT4SUDT8SUGgvSUJXoSUJXvSULTrSU8JTSU8LjSV8AnSV8JgSXFToSXLf8SYvAnSZrDUSZrMUSZrMnSZ8HgSZ8JTSZ8JgSZ8MYSZ8QUSaQUoSbCT3SbHToSbQYvSbSl4SboJnSbvFbSb8HbSb8JgSb8OTScGZrScHgrScJTvScMT8ScSToScoHbScrMTScvAnSeAZrSeAcrSeHboSeJUoSeLhrSeMT8SeMXrSe6JgSgHTrSkJnoSkLnvSk8CUSlFl3SlrSnSl8GnSmAboSmGT8SmJU8\",\n \"ATLnDlATrAZoATrJX4ATrMT8ATrMX4ATrRTrATvDl8ATvJUoATvMl8AT3AToAT3MX8AT8CT3AT8DT8AT8HZrAT8HgoAUAgFnAUCTFnAXoMX8AXrAT8AXrGgvAXrJXvAXrOgoAXvLl3AZvAgoAZvFbrAZvJXoAZvJl8AZvJn3AZvMX8AZvSbrAZ8FZoAZ8LZ8AZ8MU8AZ8OTvAZ8SV8AZ8SX3AbAgFZAboJnoAbvGboAb8ATrAb8AZoAb8AgrAb8Al4Ab8Db8Ab8JnoAb8LX4Ab8LZrAb8LhrAb8MT8Ab8OUoAb8Qb8Ab8ST8AcrAUoAcrAc8AcrCZ3AcrFT3AcrFZrAcrJl4AcrJn3AcrMX3AcrOTvAc8AZ8Ac8MT8AfAcJXAgoFn4AgoGgvAgoGnrAgoLc8AgoMXoAgrLnrAkrSZ8AlFXCTAloHboAlrHbrAlrLhrAlrLkoAl3CZrAl3LUoAl3LZrAnrAl4AnrMT8An3HT4BT3IToBX4MnvBb!Ln$CTGXMnCToLZ4CTrHT8CT3JTrCT3RZrCT#GTvCU6GgvCU8Db8CU8GZrCU8HT8CboLl3CbrGgrCbrMU8Cb8DT3Cb8GnrCb8LX4Cb8MT8Cb8ObrCgrGgvCgrKX4Cl8FZoDTrAbvDTrDboDTrGT6DTrJgrDTrMX3DTrRZrDTrRg8DTvAVvDTvFZoDT3DT8DT3Ln3DT4HZrDT4MT8DT8AlrDT8MT8DUAkGbDUDbJnDYLnQlDbDUOYDbMTAnDbMXSnDboAT3DboFn4DboLnvDj6JTrGTCgFTGTGgFnGTJTMnGTLnPlGToJT8GTrCT3GTrLVoGTrLnvGTrMX3GTrMboGTvKl3GZClFnGZrDT3GZ8DTrGZ8FZ8GZ8MXvGZ8On8GZ8ST3GbCnQXGbMbFnGboFboGboJg3GboMXoGb3JTvGb3JboGb3Mn6Gb3Qb8GgDXLjGgMnAUGgrDloGgrHX4GgrSToGgvAXrGgvAZvGgvFbrGgvLl3GgvMnvGnDnLXGnrATrGnrMboGnuLl3HTATMnHTAgCnHTCTCTHTrGTvHTrHTvHTrJX8HTrLl8HTrMT8HTrMgoHTrOTrHTuOn3HTvAZrHTvDTvHTvGboHTvJU8HTvLl3HTvMXrHTvQb4HT4GT6HT4JT8HT4Jb#HT8Al3HT8GZrHT8GgrHT8HX4HT8Jb8HT8JnoHT8LTrHT8LgvHT8SToHT8SV8HUoJUoHUoJX8HUoLnrHXrLZoHXvAl3HX3LnrHX4FkvHX4LhrHX4MXoHX4OnoHZrAZ8HZrDb8HZrGZ8HZrJnrHZvGZ8HZvLnvHZ8JnvHZ8LhrHbCXJlHbMTAnHboJl4HbpLl3HbrJX8HbrLnrHbrMnvHbvRYrHgoSTrHgrFV8HgrGZ8HgrJXoHgrRnvHgvBb!HgvGTrHgvHX4HgvHn!HgvLTrHgvSU8HnDnLbHnFbJbHnvDn8Hn6GgvHn!BTvJTCTLnJTQgFnJTrAnvJTrLX4JTrOUoJTvFn3JTvLnrJTvNToJT3AgoJT3Jn4JT3LhvJT3ObrJT8AcrJT8Al3JT8JT8JT8JnoJT8LX4JT8LnrJT8MX3JT8Rg3JT8Sc8JUoBTvJU8AToJU8GZ8JU8GgvJU8JTrJU8JXrJU8JnrJU8LnvJU8ScvJXHnJlJXrGgvJXrJU8JXrLhrJXrMT8JXrMXrJXrQUoJXvCTvJXvGZ8JXvGgrJXvQT8JX8Ab8JX8DT8JX8GZ8JX8HZvJX8LnrJX8MT8JX8MXoJX8MnvJX8ST3JYGnCTJbAkGbJbCTAnJbLTAcJboDT3JboLb6JbrAnvJbrCn3JbrDl8JbrGboJbrIZoJbrJnvJbrMnvJbrQb4Jb8RZrJeAbAnJgJnFbJgScAnJgrATrJgvHZ8JgvMn4JlJlFbJlLiQXJlLjOnJlRbOlJlvNXoJlvRl3Jl4AcrJl8AUoJl8MnrJnFnMlJnHgGbJnoDT8JnoFV8JnoGgvJnoIT8JnoQToJnoRg3JnrCZ3JnrGgrJnrHTvJnrLf8JnrOX8JnvAT3JnvFZoJnvGT8JnvJl4JnvMT8JnvMX8JnvOXrJnvPX6JnvSX3JnvSZrJn3MT8Jn3MX8Jn3RTrLTATKnLTJnLTLTMXKnLTRTQlLToGb8LTrAZ8LTrCZ8LTrDb8LTrHT8LT3PX6LT4FZoLT$CTvLT$GgrLUvHX3LVoATrLVoAgoLVoJboLVoMX3LVoRg3LV8CZ3LV8FZoLV8GTvLXrDXoLXrFbrLXvAgvLXvFlrLXvLl3LXvRn6LX4Mb8LX8GT8LYCXMnLYrMnrLZoSTvLZrAZvLZrAloLZrFToLZrJXvLZrJboLZrJl4LZrLnrLZrMT8LZrOgvLZrRnvLZrST4LZvMX8LZvSlvLZ8AgoLZ8CT3LZ8JT8LZ8LV8LZ8LZoLZ8Lg8LZ8SV8LZ8SbrLZ$HT8LZ$Mn4La6CTvLbFbMnLbRYFTLbSnFZLboJT8LbrAT9LbrGb3LbrQb8LcrJX8LcrMXrLerHTvLerJbrLerNboLgrDb8LgrGZ8LgrHTrLgrMXrLgrSU8LgvJTrLgvLl3Lg6Ll3LhrLnrLhrMT8LhvAl4LiLnQXLkoAgrLkoJT8LkoJn4LlrSU8Ll3FZoLl3HTrLl3JX8Ll3JnoLl3LToLmLeFbLnDUFbLnLVAnLnrATrLnrAZoLnrAb8LnrAlrLnrGgvLnrJU8LnrLZrLnrLhrLnrMb8LnrOXrLnrSZ8LnvAb4LnvDTrLnvDl8LnvHTrLnvHbrLnvJT8LnvJU8LnvJbrLnvLhvLnvMX8LnvMb8LnvNnoLnvSU8Ln3Al3Ln4FZoLn4GT6Ln4JgvLn4LhrLn4MT8Ln4SToMToCZrMToJX8MToLX4MToLf8MToRg3MTrEloMTvGb6MT3BTrMT3Lb6MT8AcrMT8AgrMT8GZrMT8JnoMT8LnrMT8MX3MUOUAnMXAbFnMXoAloMXoJX8MXoLf8MXoLl8MXrAb8MXrDTvMXrGT8MXrGgrMXrHTrMXrLf8MXrMU8MXrOXvMXrQb8MXvGT8MXvHTrMXvLVoMX3AX3MX3Jn3MX3LhrMX3MX3MX4AlrMX4OboMX8GTvMX8GZrMX8GgrMX8JT8MX8JX8MX8LhrMX8MT8MYDUFbMYMgDbMbGnFfMbvLX4MbvLl3Mb8Mb8Mb8ST4MgGXCnMg8ATrMg8AgoMg8CZrMg8DTrMg8DboMg8HTrMg8JgrMg8LT8MloJXoMl8AhrMl8JT8MnLgAUMnoJXrMnoLX4MnoLhrMnoMT8MnrAl4MnrDb8MnrOTvMnrOgvMnrQb8MnrSU8MnvGgrMnvHZ8Mn3MToMn4DTrMn4LTrMn4Mg8NnBXAnOTFTFnOToAToOTrGgvOTrJX8OT3JXoOT6MTrOT8GgrOT8HTpOT8MToOUoHT8OUoJT8OUoLn3OXrAgoOXrDg8OXrMT8OXvSToOX6CTvOX8CZrOX8OgrOb6HgvOb8AToOb8MT8OcvLZ8OgvAlrOgvHTvOgvJTrOgvJnrOgvLZrOgvLn4OgvMT8OgvRTrOg8AZoOg8DbvOnrOXoOnvJn4OnvLhvOnvRTrOn3GgoOn3JnvOn6JbvOn8OTrPTGYFTPbBnFnPbGnDnPgDYQTPlrAnvPlrETvPlrLnvPlrMXvPlvFX4QTMTAnQTrJU8QYCnJlQYJlQlQbGTQbQb8JnrQb8LZoQb8LnvQb8MT8Qb8Ml8Qb8ST4QloAl4QloHZvQloJX8QloMn8QnJZOlRTrAZvRTrDTrRTvJn4RTvLhvRT4Jb8RZrAZrRZ8AkrRZ8JU8RZ8LV8RZ8LnvRbJlQXRg3GboRg3MnvRg8AZ8Rg8JboRg8Jl4RnLTCbRnvFl3RnvQb8SToAl4SToCZrSToFZoSToHXrSToJU8SToJgvSToJl4SToLhrSToMX3STrAlvSTrCT9STrCgrSTrGgrSTrHXrSTrHboSTrJnoSTrNboSTvLnrST4AZoST8Ab8ST8JT8SUoJn3SU6HZ#SU6JTvSU8Db8SU8HboSU8LgrSV8JT8SZrAcrSZrAl3SZrJT8SZrJnvSZrMT8SZvLUoSZ4FZoSZ8JnoSZ8RZrScoLnrScoMT8ScoMX8ScrAT4ScrAZ8ScrLZ8ScrLkvScvDb8ScvLf8ScvNToSgrFZrShvKnrSloHUoSloLnrSlrMXoSl8HgrSmrJUoSn3BX6\",\n \"ATFlOn3ATLgrDYAT4MTAnAT8LTMnAYJnRTrAbGgJnrAbLV8LnAbvNTAnAeFbLg3AgOYMXoAlQbFboAnDboAfAnJgoJTBToDgAnBUJbAl3BboDUAnCTDlvLnCTFTrSnCYoQTLnDTwAbAnDUDTrSnDUHgHgrDX8LXFnDbJXAcrETvLTLnGTFTQbrGTMnGToGT3DUFbGUJlPX3GbQg8LnGboJbFnGb3GgAYGgAg8ScGgMbAXrGgvAbAnGnJTLnvGnvATFgHTDT6ATHTrDlJnHYLnMn8HZrSbJTHZ8LTFnHbFTJUoHgSeMT8HgrLjAnHgvAbAnHlFUrDlHnDgvAnHnHTFT3HnQTGnrJTAaMXvJTGbCn3JTOgrAnJXvAXMnJbMg8SnJbMnRg3Jb8LTMnJnAl3OnJnGYrQlJnJlQY3LTDlCn3LTJjLg3LTLgvFXLTMg3GTLV8HUOgLXFZLg3LXNXrMnLX8QXFnLX9AlMYLYLXPXrLZAbJU8LZDUJU8LZMXrSnLZ$AgFnLaPXrDULbFYrMnLbMn8LXLboJgJgLeFbLg3LgLZrSnLgOYAgoLhrRnJlLkCTrSnLkOnLhrLnFX%AYLnFZoJXLnHTvJbLnLloAbMTATLf8MTHgJn3MTMXrAXMT3MTFnMUITvFnMXFX%AYMXMXvFbMXrFTDbMYAcMX3MbLf8SnMb8JbFnMgMXrMTMgvAXFnMgvGgCmMnAloSnMnFnJTrOXvMXSnOX8HTMnObJT8ScObLZFl3ObMXCZoPTLgrQXPUFnoQXPU3RXJlPX3RkQXPbrJXQlPlrJbFnQUAhrDbQXGnCXvQYLnHlvQbLfLnvRTOgvJbRXJYrQlRYLnrQlRbLnrQlRlFT8JlRlFnrQXSTClCn3STHTrAnSTLZQlrSTMnGTrSToHgGbSTrGTDnSTvGXCnST3HgFbSU3HXAXSbAnJn3SbFT8LnScLfLnv\",\n \"AT3JgJX8AT8FZoSnAT8JgFV8AT8LhrDbAZ8JT8DbAb8GgLhrAb8SkLnvAe8MT8SnAlMYJXLVAl3GYDTvAl3LfLnvBUDTvLl3CTOn3HTrCT3DUGgrCU8MT8AbCbFTrJUoCgrDb8MTDTLV8JX8DTLnLXQlDT8LZrSnDUQb8FZ8DUST4JnvDb8ScOUoDj6GbJl4GTLfCYMlGToAXvFnGboAXvLnGgAcrJn3GgvFnSToGnLf8JnvGn#HTDToHTLnFXJlHTvATFToHTvHTDToHTvMTAgoHT3STClvHT4AlFl6HT8HTDToHUoDgJTrHUoScMX3HbRZrMXoHboJg8LTHgDb8JTrHgMToLf8HgvLnLnoHnHn3HT4Hn6MgvAnJTJU8ScvJT3AaQT8JT8HTrAnJXrRg8AnJbAloMXoJbrATFToJbvMnoSnJgDb6GgvJgDb8MXoJgSX3JU8JguATFToJlPYLnQlJlQkDnLbJlQlFYJlJl8Lf8OTJnCTFnLbJnLTHXMnJnLXGXCnJnoFfRg3JnrMYRg3Jn3HgFl3KT8Dg8LnLTRlFnPTLTvPbLbvLVoSbrCZLXMY6HT3LXNU7DlrLXNXDTATLX8DX8LnLZDb8JU8LZMnoLhrLZSToJU8LZrLaLnrLZvJn3SnLZ8LhrSnLaJnoMT8LbFlrHTvLbrFTLnrLbvATLlvLb6OTFn3LcLnJZOlLeAT6Mn4LeJT3ObrLg6LXFlrLhrJg8LnLhvDlPX4LhvLfLnvLj6JTFT3LnFbrMXoLnQluCTvLnrQXCY6LnvLfLnvLnvMgLnvLnvSeLf8MTMbrJn3MT3JgST3MT8AnATrMT8LULnrMUMToCZrMUScvLf8MXoDT8SnMX6ATFToMX8AXMT8MX8FkMT8MX8HTrDUMX8ScoSnMYJT6CTvMgAcrMXoMg8SToAfMlvAXLg3MnFl3AnvOT3AnFl3OUoATHT8OU3RnLXrOXrOXrSnObPbvFn6Og8HgrSnOg8OX8DbPTvAgoJgPU3RYLnrPXrDnJZrPb8CTGgvPlrLTDlvPlvFUJnoQUvFXrQlQeMnoAl3QlrQlrSnRTFTrJUoSTDlLiLXSTFg6HT3STJgoMn4STrFTJTrSTrLZFl3ST4FnMXoSUrDlHUoScvHTvSnSfLkvMXo\",\n \"AUoAcrMXoAZ8HboAg8AbOg6ATFgAg8AloMXoAl3AT8JTrAl8MX8MXoCT3SToJU8Cl8Db8MXoDT8HgrATrDboOT8MXoGTOTrATMnGT8LhrAZ8GnvFnGnQXHToGgvAcrHTvAXvLl3HbrAZoMXoHgBlFXLg3HgMnFXrSnHgrSb8JUoHn6HT8LgvITvATrJUoJUoLZrRnvJU8HT8Jb8JXvFX8QT8JXvLToJTrJYrQnGnQXJgrJnoATrJnoJU8ScvJnvMnvMXoLTCTLgrJXLTJlRTvQlLbRnJlQYvLbrMb8LnvLbvFn3RnoLdCVSTGZrLeSTvGXCnLg3MnoLn3MToLlrETvMT8SToAl3MbrDU6GTvMb8LX4LhrPlrLXGXCnSToLf8Rg3STrDb8LTrSTvLTHXMnSb3RYLnMnSgOg6ATFg\",\n \"HUDlGnrQXrJTrHgLnrAcJYMb8DULc8LTvFgGnCk3Mg8JbAnLX4QYvFYHnMXrRUoJnGnvFnRlvFTJlQnoSTrBXHXrLYSUJgLfoMT8Se8DTrHbDb\",\n \"AbDl8SToJU8An3RbAb8ST8DUSTrGnrAgoLbFU6Db8LTrMg8AaHT8Jb8ObDl8SToJU8Pb3RlvFYoJl\"\n ];\n var codes = \"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789!@#$%^&*\";\n function getHangul(code) {\n if (code >= 40) {\n code = code + 168 - 40;\n } else if (code >= 19) {\n code = code + 97 - 19;\n }\n return (0, strings_1.toUtf8String)([225, (code >> 6) + 132, (code & 63) + 128]);\n }\n var wordlist = null;\n function loadWords(lang) {\n if (wordlist != null) {\n return;\n }\n wordlist = [];\n data.forEach(function(data2, length2) {\n length2 += 4;\n for (var i3 = 0; i3 < data2.length; i3 += length2) {\n var word = \"\";\n for (var j2 = 0; j2 < length2; j2++) {\n word += getHangul(codes.indexOf(data2[i3 + j2]));\n }\n wordlist.push(word);\n }\n });\n wordlist.sort();\n if (wordlist_1.Wordlist.check(lang) !== \"0xf9eddeace9c5d3da9c93cf7d3cd38f6a13ed3affb933259ae865714e8a3ae71a\") {\n wordlist = null;\n throw new Error(\"BIP39 Wordlist for ko (Korean) FAILED\");\n }\n }\n var LangKo = (\n /** @class */\n function(_super) {\n __extends3(LangKo2, _super);\n function LangKo2() {\n return _super.call(this, \"ko\") || this;\n }\n LangKo2.prototype.getWord = function(index2) {\n loadWords(this);\n return wordlist[index2];\n };\n LangKo2.prototype.getWordIndex = function(word) {\n loadWords(this);\n return wordlist.indexOf(word);\n };\n return LangKo2;\n }(wordlist_1.Wordlist)\n );\n var langKo = new LangKo();\n exports3.langKo = langKo;\n wordlist_1.Wordlist.register(langKo);\n }\n });\n\n // ../../../node_modules/.pnpm/@ethersproject+wordlists@5.8.0/node_modules/@ethersproject/wordlists/lib/lang-it.js\n var require_lang_it = __commonJS({\n \"../../../node_modules/.pnpm/@ethersproject+wordlists@5.8.0/node_modules/@ethersproject/wordlists/lib/lang-it.js\"(exports3) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n var __extends3 = exports3 && exports3.__extends || /* @__PURE__ */ function() {\n var extendStatics3 = function(d5, b4) {\n extendStatics3 = Object.setPrototypeOf || { __proto__: [] } instanceof Array && function(d6, b5) {\n d6.__proto__ = b5;\n } || function(d6, b5) {\n for (var p4 in b5)\n if (Object.prototype.hasOwnProperty.call(b5, p4))\n d6[p4] = b5[p4];\n };\n return extendStatics3(d5, b4);\n };\n return function(d5, b4) {\n if (typeof b4 !== \"function\" && b4 !== null)\n throw new TypeError(\"Class extends value \" + String(b4) + \" is not a constructor or null\");\n extendStatics3(d5, b4);\n function __() {\n this.constructor = d5;\n }\n d5.prototype = b4 === null ? Object.create(b4) : (__.prototype = b4.prototype, new __());\n };\n }();\n Object.defineProperty(exports3, \"__esModule\", { value: true });\n exports3.langIt = void 0;\n var wordlist_1 = require_wordlist();\n var words = \"AbacoAbbaglioAbbinatoAbeteAbissoAbolireAbrasivoAbrogatoAccadereAccennoAccusatoAcetoneAchilleAcidoAcquaAcreAcrilicoAcrobataAcutoAdagioAddebitoAddomeAdeguatoAderireAdipeAdottareAdulareAffabileAffettoAffissoAffrantoAforismaAfosoAfricanoAgaveAgenteAgevoleAggancioAgireAgitareAgonismoAgricoloAgrumetoAguzzoAlabardaAlatoAlbatroAlberatoAlboAlbumeAlceAlcolicoAlettoneAlfaAlgebraAlianteAlibiAlimentoAllagatoAllegroAllievoAllodolaAllusivoAlmenoAlogenoAlpacaAlpestreAltalenaAlternoAlticcioAltroveAlunnoAlveoloAlzareAmalgamaAmanitaAmarenaAmbitoAmbratoAmebaAmericaAmetistaAmicoAmmassoAmmendaAmmirareAmmonitoAmoreAmpioAmpliareAmuletoAnacardoAnagrafeAnalistaAnarchiaAnatraAncaAncellaAncoraAndareAndreaAnelloAngeloAngolareAngustoAnimaAnnegareAnnidatoAnnoAnnuncioAnonimoAnticipoAnziApaticoAperturaApodeApparireAppetitoAppoggioApprodoAppuntoAprileArabicaArachideAragostaAraldicaArancioAraturaArazzoArbitroArchivioArditoArenileArgentoArgineArgutoAriaArmoniaArneseArredatoArringaArrostoArsenicoArsoArteficeArzilloAsciuttoAscoltoAsepsiAsetticoAsfaltoAsinoAsolaAspiratoAsproAssaggioAsseAssolutoAssurdoAstaAstenutoAsticeAstrattoAtavicoAteismoAtomicoAtonoAttesaAttivareAttornoAttritoAttualeAusilioAustriaAutistaAutonomoAutunnoAvanzatoAvereAvvenireAvvisoAvvolgereAzioneAzotoAzzimoAzzurroBabeleBaccanoBacinoBacoBadessaBadilataBagnatoBaitaBalconeBaldoBalenaBallataBalzanoBambinoBandireBaraondaBarbaroBarcaBaritonoBarlumeBaroccoBasilicoBassoBatostaBattutoBauleBavaBavosaBeccoBeffaBelgioBelvaBendaBenevoleBenignoBenzinaBereBerlinaBetaBibitaBiciBidoneBifidoBigaBilanciaBimboBinocoloBiologoBipedeBipolareBirbanteBirraBiscottoBisestoBisnonnoBisonteBisturiBizzarroBlandoBlattaBollitoBonificoBordoBoscoBotanicoBottinoBozzoloBraccioBradipoBramaBrancaBravuraBretellaBrevettoBrezzaBrigliaBrillanteBrindareBroccoloBrodoBronzinaBrulloBrunoBubboneBucaBudinoBuffoneBuioBulboBuonoBurloneBurrascaBussolaBustaCadettoCaducoCalamaroCalcoloCalesseCalibroCalmoCaloriaCambusaCamerataCamiciaCamminoCamolaCampaleCanapaCandelaCaneCaninoCanottoCantinaCapaceCapelloCapitoloCapogiroCapperoCapraCapsulaCarapaceCarcassaCardoCarismaCarovanaCarrettoCartolinaCasaccioCascataCasermaCasoCassoneCastelloCasualeCatastaCatenaCatrameCautoCavilloCedibileCedrataCefaloCelebreCellulareCenaCenoneCentesimoCeramicaCercareCertoCerumeCervelloCesoiaCespoCetoChelaChiaroChiccaChiedereChimeraChinaChirurgoChitarraCiaoCiclismoCifrareCignoCilindroCiottoloCircaCirrosiCitricoCittadinoCiuffoCivettaCivileClassicoClinicaCloroCoccoCodardoCodiceCoerenteCognomeCollareColmatoColoreColposoColtivatoColzaComaCometaCommandoComodoComputerComuneConcisoCondurreConfermaCongelareConiugeConnessoConoscereConsumoContinuoConvegnoCopertoCopioneCoppiaCopricapoCorazzaCordataCoricatoCorniceCorollaCorpoCorredoCorsiaCorteseCosmicoCostanteCotturaCovatoCratereCravattaCreatoCredereCremosoCrescitaCretaCricetoCrinaleCrisiCriticoCroceCronacaCrostataCrucialeCruscaCucireCuculoCuginoCullatoCupolaCuratoreCursoreCurvoCuscinoCustodeDadoDainoDalmataDamerinoDanielaDannosoDanzareDatatoDavantiDavveroDebuttoDecennioDecisoDeclinoDecolloDecretoDedicatoDefinitoDeformeDegnoDelegareDelfinoDelirioDeltaDemenzaDenotatoDentroDepositoDerapataDerivareDerogaDescrittoDesertoDesiderioDesumereDetersivoDevotoDiametroDicembreDiedroDifesoDiffusoDigerireDigitaleDiluvioDinamicoDinnanziDipintoDiplomaDipoloDiradareDireDirottoDirupoDisagioDiscretoDisfareDisgeloDispostoDistanzaDisumanoDitoDivanoDiveltoDividereDivoratoDobloneDocenteDoganaleDogmaDolceDomatoDomenicaDominareDondoloDonoDormireDoteDottoreDovutoDozzinaDragoDruidoDubbioDubitareDucaleDunaDuomoDupliceDuraturoEbanoEccessoEccoEclissiEconomiaEderaEdicolaEdileEditoriaEducareEgemoniaEgliEgoismoEgregioElaboratoElargireEleganteElencatoElettoElevareElficoElicaElmoElsaElusoEmanatoEmblemaEmessoEmiroEmotivoEmozioneEmpiricoEmuloEndemicoEnduroEnergiaEnfasiEnotecaEntrareEnzimaEpatiteEpilogoEpisodioEpocaleEppureEquatoreErarioErbaErbosoEredeEremitaErigereErmeticoEroeErosivoErranteEsagonoEsameEsanimeEsaudireEscaEsempioEsercitoEsibitoEsigenteEsistereEsitoEsofagoEsortatoEsosoEspansoEspressoEssenzaEssoEstesoEstimareEstoniaEstrosoEsultareEtilicoEtnicoEtruscoEttoEuclideoEuropaEvasoEvidenzaEvitatoEvolutoEvvivaFabbricaFaccendaFachiroFalcoFamigliaFanaleFanfaraFangoFantasmaFareFarfallaFarinosoFarmacoFasciaFastosoFasulloFaticareFatoFavolosoFebbreFecolaFedeFegatoFelpaFeltroFemminaFendereFenomenoFermentoFerroFertileFessuraFestivoFettaFeudoFiabaFiduciaFifaFiguratoFiloFinanzaFinestraFinireFioreFiscaleFisicoFiumeFlaconeFlamencoFleboFlemmaFloridoFluenteFluoroFobicoFocacciaFocosoFoderatoFoglioFolataFolcloreFolgoreFondenteFoneticoFoniaFontanaForbitoForchettaForestaFormicaFornaioForoFortezzaForzareFosfatoFossoFracassoFranaFrassinoFratelloFreccettaFrenataFrescoFrigoFrollinoFrondeFrugaleFruttaFucilataFucsiaFuggenteFulmineFulvoFumanteFumettoFumosoFuneFunzioneFuocoFurboFurgoneFuroreFusoFutileGabbianoGaffeGalateoGallinaGaloppoGamberoGammaGaranziaGarboGarofanoGarzoneGasdottoGasolioGastricoGattoGaudioGazeboGazzellaGecoGelatinaGelsoGemelloGemmatoGeneGenitoreGennaioGenotipoGergoGhepardoGhiaccioGhisaGialloGildaGineproGiocareGioielloGiornoGioveGiratoGironeGittataGiudizioGiuratoGiustoGlobuloGlutineGnomoGobbaGolfGomitoGommoneGonfioGonnaGovernoGracileGradoGraficoGrammoGrandeGrattareGravosoGraziaGrecaGreggeGrifoneGrigioGrinzaGrottaGruppoGuadagnoGuaioGuantoGuardareGufoGuidareIbernatoIconaIdenticoIdillioIdoloIdraIdricoIdrogenoIgieneIgnaroIgnoratoIlareIllesoIllogicoIlludereImballoImbevutoImboccoImbutoImmaneImmersoImmolatoImpaccoImpetoImpiegoImportoImprontaInalareInarcareInattivoIncantoIncendioInchinoIncisivoInclusoIncontroIncrocioIncuboIndagineIndiaIndoleIneditoInfattiInfilareInflittoIngaggioIngegnoIngleseIngordoIngrossoInnescoInodoreInoltrareInondatoInsanoInsettoInsiemeInsonniaInsulinaIntasatoInteroIntonacoIntuitoInumidireInvalidoInveceInvitoIperboleIpnoticoIpotesiIppicaIrideIrlandaIronicoIrrigatoIrrorareIsolatoIsotopoIstericoIstitutoIstriceItaliaIterareLabbroLabirintoLaccaLaceratoLacrimaLacunaLaddoveLagoLampoLancettaLanternaLardosoLargaLaringeLastraLatenzaLatinoLattugaLavagnaLavoroLegaleLeggeroLemboLentezzaLenzaLeoneLepreLesivoLessatoLestoLetteraleLevaLevigatoLiberoLidoLievitoLillaLimaturaLimitareLimpidoLineareLinguaLiquidoLiraLiricaLiscaLiteLitigioLivreaLocandaLodeLogicaLombareLondraLongevoLoquaceLorenzoLotoLotteriaLuceLucidatoLumacaLuminosoLungoLupoLuppoloLusingaLussoLuttoMacabroMacchinaMaceroMacinatoMadamaMagicoMagliaMagneteMagroMaiolicaMalafedeMalgradoMalintesoMalsanoMaltoMalumoreManaManciaMandorlaMangiareManifestoMannaroManovraMansardaMantideManubrioMappaMaratonaMarcireMarettaMarmoMarsupioMascheraMassaiaMastinoMaterassoMatricolaMattoneMaturoMazurcaMeandroMeccanicoMecenateMedesimoMeditareMegaMelassaMelisMelodiaMeningeMenoMensolaMercurioMerendaMerloMeschinoMeseMessereMestoloMetalloMetodoMettereMiagolareMicaMicelioMicheleMicroboMidolloMieleMiglioreMilanoMiliteMimosaMineraleMiniMinoreMirinoMirtilloMiscelaMissivaMistoMisurareMitezzaMitigareMitraMittenteMnemonicoModelloModificaModuloMoganoMogioMoleMolossoMonasteroMoncoMondinaMonetarioMonileMonotonoMonsoneMontatoMonvisoMoraMordereMorsicatoMostroMotivatoMotosegaMottoMovenzaMovimentoMozzoMuccaMucosaMuffaMughettoMugnaioMulattoMulinelloMultiploMummiaMuntoMuovereMuraleMusaMuscoloMusicaMutevoleMutoNababboNaftaNanometroNarcisoNariceNarratoNascereNastrareNaturaleNauticaNaviglioNebulosaNecrosiNegativoNegozioNemmenoNeofitaNerettoNervoNessunoNettunoNeutraleNeveNevroticoNicchiaNinfaNitidoNobileNocivoNodoNomeNominaNordicoNormaleNorvegeseNostranoNotareNotiziaNotturnoNovellaNucleoNullaNumeroNuovoNutrireNuvolaNuzialeOasiObbedireObbligoObeliscoOblioOboloObsoletoOccasioneOcchioOccidenteOccorrereOccultareOcraOculatoOdiernoOdorareOffertaOffrireOffuscatoOggettoOggiOgnunoOlandeseOlfattoOliatoOlivaOlogrammaOltreOmaggioOmbelicoOmbraOmegaOmissioneOndosoOnereOniceOnnivoroOnorevoleOntaOperatoOpinioneOppostoOracoloOrafoOrdineOrecchinoOreficeOrfanoOrganicoOrigineOrizzonteOrmaOrmeggioOrnativoOrologioOrrendoOrribileOrtensiaOrticaOrzataOrzoOsareOscurareOsmosiOspedaleOspiteOssaOssidareOstacoloOsteOtiteOtreOttagonoOttimoOttobreOvaleOvestOvinoOviparoOvocitoOvunqueOvviareOzioPacchettoPacePacificoPadellaPadronePaesePagaPaginaPalazzinaPalesarePallidoPaloPaludePandoroPannelloPaoloPaonazzoPapricaParabolaParcellaParerePargoloPariParlatoParolaPartireParvenzaParzialePassivoPasticcaPataccaPatologiaPattumePavonePeccatoPedalarePedonalePeggioPelosoPenarePendicePenisolaPennutoPenombraPensarePentolaPepePepitaPerbenePercorsoPerdonatoPerforarePergamenaPeriodoPermessoPernoPerplessoPersuasoPertugioPervasoPesatorePesistaPesoPestiferoPetaloPettinePetulantePezzoPiacerePiantaPiattinoPiccinoPicozzaPiegaPietraPifferoPigiamaPigolioPigroPilaPiliferoPillolaPilotaPimpantePinetaPinnaPinoloPioggiaPiomboPiramidePireticoPiritePirolisiPitonePizzicoPlaceboPlanarePlasmaPlatanoPlenarioPochezzaPoderosoPodismoPoesiaPoggiarePolentaPoligonoPollicePolmonitePolpettaPolsoPoltronaPolverePomicePomodoroPontePopolosoPorfidoPorosoPorporaPorrePortataPosaPositivoPossessoPostulatoPotassioPoterePranzoPrassiPraticaPreclusoPredicaPrefissoPregiatoPrelievoPremerePrenotarePreparatoPresenzaPretestoPrevalsoPrimaPrincipePrivatoProblemaProcuraProdurreProfumoProgettoProlungaPromessaPronomePropostaProrogaProtesoProvaPrudentePrugnaPruritoPsichePubblicoPudicaPugilatoPugnoPulcePulitoPulsantePuntarePupazzoPupillaPuroQuadroQualcosaQuasiQuerelaQuotaRaccoltoRaddoppioRadicaleRadunatoRafficaRagazzoRagioneRagnoRamarroRamingoRamoRandagioRantolareRapatoRapinaRappresoRasaturaRaschiatoRasenteRassegnaRastrelloRataRavvedutoRealeRecepireRecintoReclutaReconditoRecuperoRedditoRedimereRegalatoRegistroRegolaRegressoRelazioneRemareRemotoRennaReplicaReprimereReputareResaResidenteResponsoRestauroReteRetinaRetoricaRettificaRevocatoRiassuntoRibadireRibelleRibrezzoRicaricaRiccoRicevereRiciclatoRicordoRicredutoRidicoloRidurreRifasareRiflessoRiformaRifugioRigareRigettatoRighelloRilassatoRilevatoRimanereRimbalzoRimedioRimorchioRinascitaRincaroRinforzoRinnovoRinomatoRinsavitoRintoccoRinunciaRinvenireRiparatoRipetutoRipienoRiportareRipresaRipulireRisataRischioRiservaRisibileRisoRispettoRistoroRisultatoRisvoltoRitardoRitegnoRitmicoRitrovoRiunioneRivaRiversoRivincitaRivoltoRizomaRobaRoboticoRobustoRocciaRocoRodaggioRodereRoditoreRogitoRollioRomanticoRompereRonzioRosolareRospoRotanteRotondoRotulaRovescioRubizzoRubricaRugaRullinoRumineRumorosoRuoloRupeRussareRusticoSabatoSabbiareSabotatoSagomaSalassoSaldaturaSalgemmaSalivareSalmoneSaloneSaltareSalutoSalvoSapereSapidoSaporitoSaracenoSarcasmoSartoSassosoSatelliteSatiraSatolloSaturnoSavanaSavioSaziatoSbadiglioSbalzoSbancatoSbarraSbattereSbavareSbendareSbirciareSbloccatoSbocciatoSbrinareSbruffoneSbuffareScabrosoScadenzaScalaScambiareScandaloScapolaScarsoScatenareScavatoSceltoScenicoScettroSchedaSchienaSciarpaScienzaScindereScippoSciroppoScivoloSclerareScodellaScolpitoScompartoSconfortoScoprireScortaScossoneScozzeseScribaScrollareScrutinioScuderiaScultoreScuolaScuroScusareSdebitareSdoganareSeccaturaSecondoSedanoSeggiolaSegnalatoSegregatoSeguitoSelciatoSelettivoSellaSelvaggioSemaforoSembrareSemeSeminatoSempreSensoSentireSepoltoSequenzaSerataSerbatoSerenoSerioSerpenteSerraglioServireSestinaSetolaSettimanaSfaceloSfaldareSfamatoSfarzosoSfaticatoSferaSfidaSfilatoSfingeSfocatoSfoderareSfogoSfoltireSforzatoSfrattoSfruttatoSfuggitoSfumareSfusoSgabelloSgarbatoSgonfiareSgorbioSgrassatoSguardoSibiloSiccomeSierraSiglaSignoreSilenzioSillabaSimboloSimpaticoSimulatoSinfoniaSingoloSinistroSinoSintesiSinusoideSiparioSismaSistoleSituatoSlittaSlogaturaSlovenoSmarritoSmemoratoSmentitoSmeraldoSmilzoSmontareSmottatoSmussatoSnellireSnervatoSnodoSobbalzoSobrioSoccorsoSocialeSodaleSoffittoSognoSoldatoSolenneSolidoSollazzoSoloSolubileSolventeSomaticoSommaSondaSonettoSonniferoSopireSoppesoSopraSorgereSorpassoSorrisoSorsoSorteggioSorvolatoSospiroSostaSottileSpadaSpallaSpargereSpatolaSpaventoSpazzolaSpecieSpedireSpegnereSpelaturaSperanzaSpessoreSpettraleSpezzatoSpiaSpigolosoSpillatoSpinosoSpiraleSplendidoSportivoSposoSprangaSprecareSpronatoSpruzzoSpuntinoSquilloSradicareSrotolatoStabileStaccoStaffaStagnareStampatoStantioStarnutoStaseraStatutoSteloSteppaSterzoStilettoStimaStirpeStivaleStizzosoStonatoStoricoStrappoStregatoStriduloStrozzareStruttoStuccareStufoStupendoSubentroSuccosoSudoreSuggeritoSugoSultanoSuonareSuperboSupportoSurgelatoSurrogatoSussurroSuturaSvagareSvedeseSveglioSvelareSvenutoSveziaSviluppoSvistaSvizzeraSvoltaSvuotareTabaccoTabulatoTacciareTaciturnoTaleTalismanoTamponeTanninoTaraTardivoTargatoTariffaTarpareTartarugaTastoTatticoTavernaTavolataTazzaTecaTecnicoTelefonoTemerarioTempoTemutoTendoneTeneroTensioneTentacoloTeoremaTermeTerrazzoTerzettoTesiTesseratoTestatoTetroTettoiaTifareTigellaTimbroTintoTipicoTipografoTiraggioTiroTitanioTitoloTitubanteTizioTizzoneToccareTollerareToltoTombolaTomoTonfoTonsillaTopazioTopologiaToppaTorbaTornareTorroneTortoraToscanoTossireTostaturaTotanoTraboccoTracheaTrafilaTragediaTralcioTramontoTransitoTrapanoTrarreTraslocoTrattatoTraveTrecciaTremolioTrespoloTributoTrichecoTrifoglioTrilloTrinceaTrioTristezzaTrituratoTrivellaTrombaTronoTroppoTrottolaTrovareTruccatoTubaturaTuffatoTulipanoTumultoTunisiaTurbareTurchinoTutaTutelaUbicatoUccelloUccisoreUdireUditivoUffaUfficioUgualeUlisseUltimatoUmanoUmileUmorismoUncinettoUngereUnghereseUnicornoUnificatoUnisonoUnitarioUnteUovoUpupaUraganoUrgenzaUrloUsanzaUsatoUscitoUsignoloUsuraioUtensileUtilizzoUtopiaVacanteVaccinatoVagabondoVagliatoValangaValgoValicoVallettaValorosoValutareValvolaVampataVangareVanitosoVanoVantaggioVanveraVaporeVaranoVarcatoVarianteVascaVedettaVedovaVedutoVegetaleVeicoloVelcroVelinaVellutoVeloceVenatoVendemmiaVentoVeraceVerbaleVergognaVerificaVeroVerrucaVerticaleVescicaVessilloVestaleVeteranoVetrinaVetustoViandanteVibranteVicendaVichingoVicinanzaVidimareVigiliaVignetoVigoreVileVillanoViminiVincitoreViolaViperaVirgolaVirologoVirulentoViscosoVisioneVispoVissutoVisuraVitaVitelloVittimaVivandaVividoViziareVoceVogaVolatileVolereVolpeVoragineVulcanoZampognaZannaZappatoZatteraZavorraZefiroZelanteZeloZenzeroZerbinoZibettoZincoZirconeZittoZollaZoticoZuccheroZufoloZuluZuppa\";\n var wordlist = null;\n function loadWords(lang) {\n if (wordlist != null) {\n return;\n }\n wordlist = words.replace(/([A-Z])/g, \" $1\").toLowerCase().substring(1).split(\" \");\n if (wordlist_1.Wordlist.check(lang) !== \"0x5c1362d88fd4cf614a96f3234941d29f7d37c08c5292fde03bf62c2db6ff7620\") {\n wordlist = null;\n throw new Error(\"BIP39 Wordlist for it (Italian) FAILED\");\n }\n }\n var LangIt = (\n /** @class */\n function(_super) {\n __extends3(LangIt2, _super);\n function LangIt2() {\n return _super.call(this, \"it\") || this;\n }\n LangIt2.prototype.getWord = function(index2) {\n loadWords(this);\n return wordlist[index2];\n };\n LangIt2.prototype.getWordIndex = function(word) {\n loadWords(this);\n return wordlist.indexOf(word);\n };\n return LangIt2;\n }(wordlist_1.Wordlist)\n );\n var langIt = new LangIt();\n exports3.langIt = langIt;\n wordlist_1.Wordlist.register(langIt);\n }\n });\n\n // ../../../node_modules/.pnpm/@ethersproject+wordlists@5.8.0/node_modules/@ethersproject/wordlists/lib/lang-zh.js\n var require_lang_zh = __commonJS({\n \"../../../node_modules/.pnpm/@ethersproject+wordlists@5.8.0/node_modules/@ethersproject/wordlists/lib/lang-zh.js\"(exports3) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n var __extends3 = exports3 && exports3.__extends || /* @__PURE__ */ function() {\n var extendStatics3 = function(d5, b4) {\n extendStatics3 = Object.setPrototypeOf || { __proto__: [] } instanceof Array && function(d6, b5) {\n d6.__proto__ = b5;\n } || function(d6, b5) {\n for (var p4 in b5)\n if (Object.prototype.hasOwnProperty.call(b5, p4))\n d6[p4] = b5[p4];\n };\n return extendStatics3(d5, b4);\n };\n return function(d5, b4) {\n if (typeof b4 !== \"function\" && b4 !== null)\n throw new TypeError(\"Class extends value \" + String(b4) + \" is not a constructor or null\");\n extendStatics3(d5, b4);\n function __() {\n this.constructor = d5;\n }\n d5.prototype = b4 === null ? Object.create(b4) : (__.prototype = b4.prototype, new __());\n };\n }();\n Object.defineProperty(exports3, \"__esModule\", { value: true });\n exports3.langZhTw = exports3.langZhCn = void 0;\n var strings_1 = require_lib9();\n var wordlist_1 = require_wordlist();\n var data = \"}aE#4A=Yv&co#4N#6G=cJ&SM#66|/Z#4t&kn~46#4K~4q%b9=IR#7l,mB#7W_X2*dl}Uo~7s}Uf&Iw#9c&cw~6O&H6&wx&IG%v5=IQ~8a&Pv#47$PR&50%Ko&QM&3l#5f,D9#4L|/H&tQ;v0~6n]nN?\";\n function loadWords(lang) {\n if (wordlist[lang.locale] !== null) {\n return;\n }\n wordlist[lang.locale] = [];\n var deltaOffset = 0;\n for (var i3 = 0; i3 < 2048; i3++) {\n var s4 = style.indexOf(data[i3 * 3]);\n var bytes = [\n 228 + (s4 >> 2),\n 128 + codes.indexOf(data[i3 * 3 + 1]),\n 128 + codes.indexOf(data[i3 * 3 + 2])\n ];\n if (lang.locale === \"zh_tw\") {\n var common = s4 % 4;\n for (var i_1 = common; i_1 < 3; i_1++) {\n bytes[i_1] = codes.indexOf(deltaData[deltaOffset++]) + (i_1 == 0 ? 228 : 128);\n }\n }\n wordlist[lang.locale].push((0, strings_1.toUtf8String)(bytes));\n }\n if (wordlist_1.Wordlist.check(lang) !== Checks[lang.locale]) {\n wordlist[lang.locale] = null;\n throw new Error(\"BIP39 Wordlist for \" + lang.locale + \" (Chinese) FAILED\");\n }\n }\n var LangZh = (\n /** @class */\n function(_super) {\n __extends3(LangZh2, _super);\n function LangZh2(country) {\n return _super.call(this, \"zh_\" + country) || this;\n }\n LangZh2.prototype.getWord = function(index2) {\n loadWords(this);\n return wordlist[this.locale][index2];\n };\n LangZh2.prototype.getWordIndex = function(word) {\n loadWords(this);\n return wordlist[this.locale].indexOf(word);\n };\n LangZh2.prototype.split = function(mnemonic) {\n mnemonic = mnemonic.replace(/(?:\\u3000| )+/g, \"\");\n return mnemonic.split(\"\");\n };\n return LangZh2;\n }(wordlist_1.Wordlist)\n );\n var langZhCn = new LangZh(\"cn\");\n exports3.langZhCn = langZhCn;\n wordlist_1.Wordlist.register(langZhCn);\n wordlist_1.Wordlist.register(langZhCn, \"zh\");\n var langZhTw = new LangZh(\"tw\");\n exports3.langZhTw = langZhTw;\n wordlist_1.Wordlist.register(langZhTw);\n }\n });\n\n // ../../../node_modules/.pnpm/@ethersproject+wordlists@5.8.0/node_modules/@ethersproject/wordlists/lib/wordlists.js\n var require_wordlists = __commonJS({\n \"../../../node_modules/.pnpm/@ethersproject+wordlists@5.8.0/node_modules/@ethersproject/wordlists/lib/wordlists.js\"(exports3) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n Object.defineProperty(exports3, \"__esModule\", { value: true });\n exports3.wordlists = void 0;\n var lang_cz_1 = require_lang_cz();\n var lang_en_1 = require_lang_en();\n var lang_es_1 = require_lang_es();\n var lang_fr_1 = require_lang_fr();\n var lang_ja_1 = require_lang_ja();\n var lang_ko_1 = require_lang_ko();\n var lang_it_1 = require_lang_it();\n var lang_zh_1 = require_lang_zh();\n exports3.wordlists = {\n cz: lang_cz_1.langCz,\n en: lang_en_1.langEn,\n es: lang_es_1.langEs,\n fr: lang_fr_1.langFr,\n it: lang_it_1.langIt,\n ja: lang_ja_1.langJa,\n ko: lang_ko_1.langKo,\n zh: lang_zh_1.langZhCn,\n zh_cn: lang_zh_1.langZhCn,\n zh_tw: lang_zh_1.langZhTw\n };\n }\n });\n\n // ../../../node_modules/.pnpm/@ethersproject+wordlists@5.8.0/node_modules/@ethersproject/wordlists/lib/index.js\n var require_lib22 = __commonJS({\n \"../../../node_modules/.pnpm/@ethersproject+wordlists@5.8.0/node_modules/@ethersproject/wordlists/lib/index.js\"(exports3) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n Object.defineProperty(exports3, \"__esModule\", { value: true });\n exports3.wordlists = exports3.Wordlist = exports3.logger = void 0;\n var wordlist_1 = require_wordlist();\n Object.defineProperty(exports3, \"logger\", { enumerable: true, get: function() {\n return wordlist_1.logger;\n } });\n Object.defineProperty(exports3, \"Wordlist\", { enumerable: true, get: function() {\n return wordlist_1.Wordlist;\n } });\n var wordlists_1 = require_wordlists();\n Object.defineProperty(exports3, \"wordlists\", { enumerable: true, get: function() {\n return wordlists_1.wordlists;\n } });\n }\n });\n\n // ../../../node_modules/.pnpm/@ethersproject+hdnode@5.8.0/node_modules/@ethersproject/hdnode/lib/_version.js\n var require_version17 = __commonJS({\n \"../../../node_modules/.pnpm/@ethersproject+hdnode@5.8.0/node_modules/@ethersproject/hdnode/lib/_version.js\"(exports3) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n Object.defineProperty(exports3, \"__esModule\", { value: true });\n exports3.version = void 0;\n exports3.version = \"hdnode/5.8.0\";\n }\n });\n\n // ../../../node_modules/.pnpm/@ethersproject+hdnode@5.8.0/node_modules/@ethersproject/hdnode/lib/index.js\n var require_lib23 = __commonJS({\n \"../../../node_modules/.pnpm/@ethersproject+hdnode@5.8.0/node_modules/@ethersproject/hdnode/lib/index.js\"(exports3) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n Object.defineProperty(exports3, \"__esModule\", { value: true });\n exports3.getAccountPath = exports3.isValidMnemonic = exports3.entropyToMnemonic = exports3.mnemonicToEntropy = exports3.mnemonicToSeed = exports3.HDNode = exports3.defaultPath = void 0;\n var basex_1 = require_lib19();\n var bytes_1 = require_lib2();\n var bignumber_1 = require_lib3();\n var strings_1 = require_lib9();\n var pbkdf2_1 = require_lib21();\n var properties_1 = require_lib4();\n var signing_key_1 = require_lib16();\n var sha2_1 = require_lib20();\n var transactions_1 = require_lib17();\n var wordlists_1 = require_lib22();\n var logger_1 = require_lib();\n var _version_1 = require_version17();\n var logger = new logger_1.Logger(_version_1.version);\n var N4 = bignumber_1.BigNumber.from(\"0xfffffffffffffffffffffffffffffffebaaedce6af48a03bbfd25e8cd0364141\");\n var MasterSecret = (0, strings_1.toUtf8Bytes)(\"Bitcoin seed\");\n var HardenedBit = 2147483648;\n function getUpperMask(bits) {\n return (1 << bits) - 1 << 8 - bits;\n }\n function getLowerMask(bits) {\n return (1 << bits) - 1;\n }\n function bytes32(value) {\n return (0, bytes_1.hexZeroPad)((0, bytes_1.hexlify)(value), 32);\n }\n function base58check2(data) {\n return basex_1.Base58.encode((0, bytes_1.concat)([data, (0, bytes_1.hexDataSlice)((0, sha2_1.sha256)((0, sha2_1.sha256)(data)), 0, 4)]));\n }\n function getWordlist(wordlist) {\n if (wordlist == null) {\n return wordlists_1.wordlists[\"en\"];\n }\n if (typeof wordlist === \"string\") {\n var words = wordlists_1.wordlists[wordlist];\n if (words == null) {\n logger.throwArgumentError(\"unknown locale\", \"wordlist\", wordlist);\n }\n return words;\n }\n return wordlist;\n }\n var _constructorGuard = {};\n exports3.defaultPath = \"m/44'/60'/0'/0/0\";\n var HDNode = (\n /** @class */\n function() {\n function HDNode2(constructorGuard, privateKey, publicKey, parentFingerprint, chainCode, index2, depth, mnemonicOrPath) {\n if (constructorGuard !== _constructorGuard) {\n throw new Error(\"HDNode constructor cannot be called directly\");\n }\n if (privateKey) {\n var signingKey = new signing_key_1.SigningKey(privateKey);\n (0, properties_1.defineReadOnly)(this, \"privateKey\", signingKey.privateKey);\n (0, properties_1.defineReadOnly)(this, \"publicKey\", signingKey.compressedPublicKey);\n } else {\n (0, properties_1.defineReadOnly)(this, \"privateKey\", null);\n (0, properties_1.defineReadOnly)(this, \"publicKey\", (0, bytes_1.hexlify)(publicKey));\n }\n (0, properties_1.defineReadOnly)(this, \"parentFingerprint\", parentFingerprint);\n (0, properties_1.defineReadOnly)(this, \"fingerprint\", (0, bytes_1.hexDataSlice)((0, sha2_1.ripemd160)((0, sha2_1.sha256)(this.publicKey)), 0, 4));\n (0, properties_1.defineReadOnly)(this, \"address\", (0, transactions_1.computeAddress)(this.publicKey));\n (0, properties_1.defineReadOnly)(this, \"chainCode\", chainCode);\n (0, properties_1.defineReadOnly)(this, \"index\", index2);\n (0, properties_1.defineReadOnly)(this, \"depth\", depth);\n if (mnemonicOrPath == null) {\n (0, properties_1.defineReadOnly)(this, \"mnemonic\", null);\n (0, properties_1.defineReadOnly)(this, \"path\", null);\n } else if (typeof mnemonicOrPath === \"string\") {\n (0, properties_1.defineReadOnly)(this, \"mnemonic\", null);\n (0, properties_1.defineReadOnly)(this, \"path\", mnemonicOrPath);\n } else {\n (0, properties_1.defineReadOnly)(this, \"mnemonic\", mnemonicOrPath);\n (0, properties_1.defineReadOnly)(this, \"path\", mnemonicOrPath.path);\n }\n }\n Object.defineProperty(HDNode2.prototype, \"extendedKey\", {\n get: function() {\n if (this.depth >= 256) {\n throw new Error(\"Depth too large!\");\n }\n return base58check2((0, bytes_1.concat)([\n this.privateKey != null ? \"0x0488ADE4\" : \"0x0488B21E\",\n (0, bytes_1.hexlify)(this.depth),\n this.parentFingerprint,\n (0, bytes_1.hexZeroPad)((0, bytes_1.hexlify)(this.index), 4),\n this.chainCode,\n this.privateKey != null ? (0, bytes_1.concat)([\"0x00\", this.privateKey]) : this.publicKey\n ]));\n },\n enumerable: false,\n configurable: true\n });\n HDNode2.prototype.neuter = function() {\n return new HDNode2(_constructorGuard, null, this.publicKey, this.parentFingerprint, this.chainCode, this.index, this.depth, this.path);\n };\n HDNode2.prototype._derive = function(index2) {\n if (index2 > 4294967295) {\n throw new Error(\"invalid index - \" + String(index2));\n }\n var path = this.path;\n if (path) {\n path += \"/\" + (index2 & ~HardenedBit);\n }\n var data = new Uint8Array(37);\n if (index2 & HardenedBit) {\n if (!this.privateKey) {\n throw new Error(\"cannot derive child of neutered node\");\n }\n data.set((0, bytes_1.arrayify)(this.privateKey), 1);\n if (path) {\n path += \"'\";\n }\n } else {\n data.set((0, bytes_1.arrayify)(this.publicKey));\n }\n for (var i3 = 24; i3 >= 0; i3 -= 8) {\n data[33 + (i3 >> 3)] = index2 >> 24 - i3 & 255;\n }\n var I2 = (0, bytes_1.arrayify)((0, sha2_1.computeHmac)(sha2_1.SupportedAlgorithm.sha512, this.chainCode, data));\n var IL = I2.slice(0, 32);\n var IR = I2.slice(32);\n var ki = null;\n var Ki = null;\n if (this.privateKey) {\n ki = bytes32(bignumber_1.BigNumber.from(IL).add(this.privateKey).mod(N4));\n } else {\n var ek = new signing_key_1.SigningKey((0, bytes_1.hexlify)(IL));\n Ki = ek._addPoint(this.publicKey);\n }\n var mnemonicOrPath = path;\n var srcMnemonic = this.mnemonic;\n if (srcMnemonic) {\n mnemonicOrPath = Object.freeze({\n phrase: srcMnemonic.phrase,\n path,\n locale: srcMnemonic.locale || \"en\"\n });\n }\n return new HDNode2(_constructorGuard, ki, Ki, this.fingerprint, bytes32(IR), index2, this.depth + 1, mnemonicOrPath);\n };\n HDNode2.prototype.derivePath = function(path) {\n var components = path.split(\"/\");\n if (components.length === 0 || components[0] === \"m\" && this.depth !== 0) {\n throw new Error(\"invalid path - \" + path);\n }\n if (components[0] === \"m\") {\n components.shift();\n }\n var result = this;\n for (var i3 = 0; i3 < components.length; i3++) {\n var component = components[i3];\n if (component.match(/^[0-9]+'$/)) {\n var index2 = parseInt(component.substring(0, component.length - 1));\n if (index2 >= HardenedBit) {\n throw new Error(\"invalid path index - \" + component);\n }\n result = result._derive(HardenedBit + index2);\n } else if (component.match(/^[0-9]+$/)) {\n var index2 = parseInt(component);\n if (index2 >= HardenedBit) {\n throw new Error(\"invalid path index - \" + component);\n }\n result = result._derive(index2);\n } else {\n throw new Error(\"invalid path component - \" + component);\n }\n }\n return result;\n };\n HDNode2._fromSeed = function(seed, mnemonic) {\n var seedArray = (0, bytes_1.arrayify)(seed);\n if (seedArray.length < 16 || seedArray.length > 64) {\n throw new Error(\"invalid seed\");\n }\n var I2 = (0, bytes_1.arrayify)((0, sha2_1.computeHmac)(sha2_1.SupportedAlgorithm.sha512, MasterSecret, seedArray));\n return new HDNode2(_constructorGuard, bytes32(I2.slice(0, 32)), null, \"0x00000000\", bytes32(I2.slice(32)), 0, 0, mnemonic);\n };\n HDNode2.fromMnemonic = function(mnemonic, password, wordlist) {\n wordlist = getWordlist(wordlist);\n mnemonic = entropyToMnemonic(mnemonicToEntropy(mnemonic, wordlist), wordlist);\n return HDNode2._fromSeed(mnemonicToSeed(mnemonic, password), {\n phrase: mnemonic,\n path: \"m\",\n locale: wordlist.locale\n });\n };\n HDNode2.fromSeed = function(seed) {\n return HDNode2._fromSeed(seed, null);\n };\n HDNode2.fromExtendedKey = function(extendedKey) {\n var bytes = basex_1.Base58.decode(extendedKey);\n if (bytes.length !== 82 || base58check2(bytes.slice(0, 78)) !== extendedKey) {\n logger.throwArgumentError(\"invalid extended key\", \"extendedKey\", \"[REDACTED]\");\n }\n var depth = bytes[4];\n var parentFingerprint = (0, bytes_1.hexlify)(bytes.slice(5, 9));\n var index2 = parseInt((0, bytes_1.hexlify)(bytes.slice(9, 13)).substring(2), 16);\n var chainCode = (0, bytes_1.hexlify)(bytes.slice(13, 45));\n var key = bytes.slice(45, 78);\n switch ((0, bytes_1.hexlify)(bytes.slice(0, 4))) {\n case \"0x0488b21e\":\n case \"0x043587cf\":\n return new HDNode2(_constructorGuard, null, (0, bytes_1.hexlify)(key), parentFingerprint, chainCode, index2, depth, null);\n case \"0x0488ade4\":\n case \"0x04358394 \":\n if (key[0] !== 0) {\n break;\n }\n return new HDNode2(_constructorGuard, (0, bytes_1.hexlify)(key.slice(1)), null, parentFingerprint, chainCode, index2, depth, null);\n }\n return logger.throwArgumentError(\"invalid extended key\", \"extendedKey\", \"[REDACTED]\");\n };\n return HDNode2;\n }()\n );\n exports3.HDNode = HDNode;\n function mnemonicToSeed(mnemonic, password) {\n if (!password) {\n password = \"\";\n }\n var salt = (0, strings_1.toUtf8Bytes)(\"mnemonic\" + password, strings_1.UnicodeNormalizationForm.NFKD);\n return (0, pbkdf2_1.pbkdf2)((0, strings_1.toUtf8Bytes)(mnemonic, strings_1.UnicodeNormalizationForm.NFKD), salt, 2048, 64, \"sha512\");\n }\n exports3.mnemonicToSeed = mnemonicToSeed;\n function mnemonicToEntropy(mnemonic, wordlist) {\n wordlist = getWordlist(wordlist);\n logger.checkNormalize();\n var words = wordlist.split(mnemonic);\n if (words.length % 3 !== 0) {\n throw new Error(\"invalid mnemonic\");\n }\n var entropy = (0, bytes_1.arrayify)(new Uint8Array(Math.ceil(11 * words.length / 8)));\n var offset = 0;\n for (var i3 = 0; i3 < words.length; i3++) {\n var index2 = wordlist.getWordIndex(words[i3].normalize(\"NFKD\"));\n if (index2 === -1) {\n throw new Error(\"invalid mnemonic\");\n }\n for (var bit = 0; bit < 11; bit++) {\n if (index2 & 1 << 10 - bit) {\n entropy[offset >> 3] |= 1 << 7 - offset % 8;\n }\n offset++;\n }\n }\n var entropyBits = 32 * words.length / 3;\n var checksumBits = words.length / 3;\n var checksumMask = getUpperMask(checksumBits);\n var checksum4 = (0, bytes_1.arrayify)((0, sha2_1.sha256)(entropy.slice(0, entropyBits / 8)))[0] & checksumMask;\n if (checksum4 !== (entropy[entropy.length - 1] & checksumMask)) {\n throw new Error(\"invalid checksum\");\n }\n return (0, bytes_1.hexlify)(entropy.slice(0, entropyBits / 8));\n }\n exports3.mnemonicToEntropy = mnemonicToEntropy;\n function entropyToMnemonic(entropy, wordlist) {\n wordlist = getWordlist(wordlist);\n entropy = (0, bytes_1.arrayify)(entropy);\n if (entropy.length % 4 !== 0 || entropy.length < 16 || entropy.length > 32) {\n throw new Error(\"invalid entropy\");\n }\n var indices = [0];\n var remainingBits = 11;\n for (var i3 = 0; i3 < entropy.length; i3++) {\n if (remainingBits > 8) {\n indices[indices.length - 1] <<= 8;\n indices[indices.length - 1] |= entropy[i3];\n remainingBits -= 8;\n } else {\n indices[indices.length - 1] <<= remainingBits;\n indices[indices.length - 1] |= entropy[i3] >> 8 - remainingBits;\n indices.push(entropy[i3] & getLowerMask(8 - remainingBits));\n remainingBits += 3;\n }\n }\n var checksumBits = entropy.length / 4;\n var checksum4 = (0, bytes_1.arrayify)((0, sha2_1.sha256)(entropy))[0] & getUpperMask(checksumBits);\n indices[indices.length - 1] <<= checksumBits;\n indices[indices.length - 1] |= checksum4 >> 8 - checksumBits;\n return wordlist.join(indices.map(function(index2) {\n return wordlist.getWord(index2);\n }));\n }\n exports3.entropyToMnemonic = entropyToMnemonic;\n function isValidMnemonic(mnemonic, wordlist) {\n try {\n mnemonicToEntropy(mnemonic, wordlist);\n return true;\n } catch (error) {\n }\n return false;\n }\n exports3.isValidMnemonic = isValidMnemonic;\n function getAccountPath(index2) {\n if (typeof index2 !== \"number\" || index2 < 0 || index2 >= HardenedBit || index2 % 1) {\n logger.throwArgumentError(\"invalid account index\", \"index\", index2);\n }\n return \"m/44'/60'/\" + index2 + \"'/0/0\";\n }\n exports3.getAccountPath = getAccountPath;\n }\n });\n\n // ../../../node_modules/.pnpm/@ethersproject+random@5.8.0/node_modules/@ethersproject/random/lib/_version.js\n var require_version18 = __commonJS({\n \"../../../node_modules/.pnpm/@ethersproject+random@5.8.0/node_modules/@ethersproject/random/lib/_version.js\"(exports3) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n Object.defineProperty(exports3, \"__esModule\", { value: true });\n exports3.version = void 0;\n exports3.version = \"random/5.8.0\";\n }\n });\n\n // ../../../node_modules/.pnpm/@ethersproject+random@5.8.0/node_modules/@ethersproject/random/lib/browser-random.js\n var require_browser_random = __commonJS({\n \"../../../node_modules/.pnpm/@ethersproject+random@5.8.0/node_modules/@ethersproject/random/lib/browser-random.js\"(exports3) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n Object.defineProperty(exports3, \"__esModule\", { value: true });\n exports3.randomBytes = void 0;\n var bytes_1 = require_lib2();\n var logger_1 = require_lib();\n var _version_1 = require_version18();\n var logger = new logger_1.Logger(_version_1.version);\n function getGlobal() {\n if (typeof self !== \"undefined\") {\n return self;\n }\n if (typeof window !== \"undefined\") {\n return window;\n }\n if (typeof global !== \"undefined\") {\n return global;\n }\n throw new Error(\"unable to locate global object\");\n }\n var anyGlobal = getGlobal();\n var crypto3 = anyGlobal.crypto || anyGlobal.msCrypto;\n if (!crypto3 || !crypto3.getRandomValues) {\n logger.warn(\"WARNING: Missing strong random number source\");\n crypto3 = {\n getRandomValues: function(buffer2) {\n return logger.throwError(\"no secure random source avaialble\", logger_1.Logger.errors.UNSUPPORTED_OPERATION, {\n operation: \"crypto.getRandomValues\"\n });\n }\n };\n }\n function randomBytes2(length2) {\n if (length2 <= 0 || length2 > 1024 || length2 % 1 || length2 != length2) {\n logger.throwArgumentError(\"invalid length\", \"length\", length2);\n }\n var result = new Uint8Array(length2);\n crypto3.getRandomValues(result);\n return (0, bytes_1.arrayify)(result);\n }\n exports3.randomBytes = randomBytes2;\n }\n });\n\n // ../../../node_modules/.pnpm/@ethersproject+random@5.8.0/node_modules/@ethersproject/random/lib/shuffle.js\n var require_shuffle = __commonJS({\n \"../../../node_modules/.pnpm/@ethersproject+random@5.8.0/node_modules/@ethersproject/random/lib/shuffle.js\"(exports3) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n Object.defineProperty(exports3, \"__esModule\", { value: true });\n exports3.shuffled = void 0;\n function shuffled(array2) {\n array2 = array2.slice();\n for (var i3 = array2.length - 1; i3 > 0; i3--) {\n var j2 = Math.floor(Math.random() * (i3 + 1));\n var tmp = array2[i3];\n array2[i3] = array2[j2];\n array2[j2] = tmp;\n }\n return array2;\n }\n exports3.shuffled = shuffled;\n }\n });\n\n // ../../../node_modules/.pnpm/@ethersproject+random@5.8.0/node_modules/@ethersproject/random/lib/index.js\n var require_lib24 = __commonJS({\n \"../../../node_modules/.pnpm/@ethersproject+random@5.8.0/node_modules/@ethersproject/random/lib/index.js\"(exports3) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n Object.defineProperty(exports3, \"__esModule\", { value: true });\n exports3.shuffled = exports3.randomBytes = void 0;\n var random_1 = require_browser_random();\n Object.defineProperty(exports3, \"randomBytes\", { enumerable: true, get: function() {\n return random_1.randomBytes;\n } });\n var shuffle_1 = require_shuffle();\n Object.defineProperty(exports3, \"shuffled\", { enumerable: true, get: function() {\n return shuffle_1.shuffled;\n } });\n }\n });\n\n // ../../../node_modules/.pnpm/aes-js@3.0.0/node_modules/aes-js/index.js\n var require_aes_js = __commonJS({\n \"../../../node_modules/.pnpm/aes-js@3.0.0/node_modules/aes-js/index.js\"(exports3, module) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n (function(root) {\n function checkInt(value) {\n return parseInt(value) === value;\n }\n function checkInts(arrayish) {\n if (!checkInt(arrayish.length)) {\n return false;\n }\n for (var i3 = 0; i3 < arrayish.length; i3++) {\n if (!checkInt(arrayish[i3]) || arrayish[i3] < 0 || arrayish[i3] > 255) {\n return false;\n }\n }\n return true;\n }\n function coerceArray(arg, copy) {\n if (arg.buffer && ArrayBuffer.isView(arg) && arg.name === \"Uint8Array\") {\n if (copy) {\n if (arg.slice) {\n arg = arg.slice();\n } else {\n arg = Array.prototype.slice.call(arg);\n }\n }\n return arg;\n }\n if (Array.isArray(arg)) {\n if (!checkInts(arg)) {\n throw new Error(\"Array contains invalid value: \" + arg);\n }\n return new Uint8Array(arg);\n }\n if (checkInt(arg.length) && checkInts(arg)) {\n return new Uint8Array(arg);\n }\n throw new Error(\"unsupported array-like object\");\n }\n function createArray(length2) {\n return new Uint8Array(length2);\n }\n function copyArray(sourceArray, targetArray, targetStart, sourceStart, sourceEnd) {\n if (sourceStart != null || sourceEnd != null) {\n if (sourceArray.slice) {\n sourceArray = sourceArray.slice(sourceStart, sourceEnd);\n } else {\n sourceArray = Array.prototype.slice.call(sourceArray, sourceStart, sourceEnd);\n }\n }\n targetArray.set(sourceArray, targetStart);\n }\n var convertUtf8 = /* @__PURE__ */ function() {\n function toBytes5(text) {\n var result = [], i3 = 0;\n text = encodeURI(text);\n while (i3 < text.length) {\n var c4 = text.charCodeAt(i3++);\n if (c4 === 37) {\n result.push(parseInt(text.substr(i3, 2), 16));\n i3 += 2;\n } else {\n result.push(c4);\n }\n }\n return coerceArray(result);\n }\n function fromBytes5(bytes) {\n var result = [], i3 = 0;\n while (i3 < bytes.length) {\n var c4 = bytes[i3];\n if (c4 < 128) {\n result.push(String.fromCharCode(c4));\n i3++;\n } else if (c4 > 191 && c4 < 224) {\n result.push(String.fromCharCode((c4 & 31) << 6 | bytes[i3 + 1] & 63));\n i3 += 2;\n } else {\n result.push(String.fromCharCode((c4 & 15) << 12 | (bytes[i3 + 1] & 63) << 6 | bytes[i3 + 2] & 63));\n i3 += 3;\n }\n }\n return result.join(\"\");\n }\n return {\n toBytes: toBytes5,\n fromBytes: fromBytes5\n };\n }();\n var convertHex = /* @__PURE__ */ function() {\n function toBytes5(text) {\n var result = [];\n for (var i3 = 0; i3 < text.length; i3 += 2) {\n result.push(parseInt(text.substr(i3, 2), 16));\n }\n return result;\n }\n var Hex2 = \"0123456789abcdef\";\n function fromBytes5(bytes) {\n var result = [];\n for (var i3 = 0; i3 < bytes.length; i3++) {\n var v2 = bytes[i3];\n result.push(Hex2[(v2 & 240) >> 4] + Hex2[v2 & 15]);\n }\n return result.join(\"\");\n }\n return {\n toBytes: toBytes5,\n fromBytes: fromBytes5\n };\n }();\n var numberOfRounds = { 16: 10, 24: 12, 32: 14 };\n var rcon = [1, 2, 4, 8, 16, 32, 64, 128, 27, 54, 108, 216, 171, 77, 154, 47, 94, 188, 99, 198, 151, 53, 106, 212, 179, 125, 250, 239, 197, 145];\n var S3 = [99, 124, 119, 123, 242, 107, 111, 197, 48, 1, 103, 43, 254, 215, 171, 118, 202, 130, 201, 125, 250, 89, 71, 240, 173, 212, 162, 175, 156, 164, 114, 192, 183, 253, 147, 38, 54, 63, 247, 204, 52, 165, 229, 241, 113, 216, 49, 21, 4, 199, 35, 195, 24, 150, 5, 154, 7, 18, 128, 226, 235, 39, 178, 117, 9, 131, 44, 26, 27, 110, 90, 160, 82, 59, 214, 179, 41, 227, 47, 132, 83, 209, 0, 237, 32, 252, 177, 91, 106, 203, 190, 57, 74, 76, 88, 207, 208, 239, 170, 251, 67, 77, 51, 133, 69, 249, 2, 127, 80, 60, 159, 168, 81, 163, 64, 143, 146, 157, 56, 245, 188, 182, 218, 33, 16, 255, 243, 210, 205, 12, 19, 236, 95, 151, 68, 23, 196, 167, 126, 61, 100, 93, 25, 115, 96, 129, 79, 220, 34, 42, 144, 136, 70, 238, 184, 20, 222, 94, 11, 219, 224, 50, 58, 10, 73, 6, 36, 92, 194, 211, 172, 98, 145, 149, 228, 121, 231, 200, 55, 109, 141, 213, 78, 169, 108, 86, 244, 234, 101, 122, 174, 8, 186, 120, 37, 46, 28, 166, 180, 198, 232, 221, 116, 31, 75, 189, 139, 138, 112, 62, 181, 102, 72, 3, 246, 14, 97, 53, 87, 185, 134, 193, 29, 158, 225, 248, 152, 17, 105, 217, 142, 148, 155, 30, 135, 233, 206, 85, 40, 223, 140, 161, 137, 13, 191, 230, 66, 104, 65, 153, 45, 15, 176, 84, 187, 22];\n var Si = [82, 9, 106, 213, 48, 54, 165, 56, 191, 64, 163, 158, 129, 243, 215, 251, 124, 227, 57, 130, 155, 47, 255, 135, 52, 142, 67, 68, 196, 222, 233, 203, 84, 123, 148, 50, 166, 194, 35, 61, 238, 76, 149, 11, 66, 250, 195, 78, 8, 46, 161, 102, 40, 217, 36, 178, 118, 91, 162, 73, 109, 139, 209, 37, 114, 248, 246, 100, 134, 104, 152, 22, 212, 164, 92, 204, 93, 101, 182, 146, 108, 112, 72, 80, 253, 237, 185, 218, 94, 21, 70, 87, 167, 141, 157, 132, 144, 216, 171, 0, 140, 188, 211, 10, 247, 228, 88, 5, 184, 179, 69, 6, 208, 44, 30, 143, 202, 63, 15, 2, 193, 175, 189, 3, 1, 19, 138, 107, 58, 145, 17, 65, 79, 103, 220, 234, 151, 242, 207, 206, 240, 180, 230, 115, 150, 172, 116, 34, 231, 173, 53, 133, 226, 249, 55, 232, 28, 117, 223, 110, 71, 241, 26, 113, 29, 41, 197, 137, 111, 183, 98, 14, 170, 24, 190, 27, 252, 86, 62, 75, 198, 210, 121, 32, 154, 219, 192, 254, 120, 205, 90, 244, 31, 221, 168, 51, 136, 7, 199, 49, 177, 18, 16, 89, 39, 128, 236, 95, 96, 81, 127, 169, 25, 181, 74, 13, 45, 229, 122, 159, 147, 201, 156, 239, 160, 224, 59, 77, 174, 42, 245, 176, 200, 235, 187, 60, 131, 83, 153, 97, 23, 43, 4, 126, 186, 119, 214, 38, 225, 105, 20, 99, 85, 33, 12, 125];\n var T1 = [3328402341, 4168907908, 4000806809, 4135287693, 4294111757, 3597364157, 3731845041, 2445657428, 1613770832, 33620227, 3462883241, 1445669757, 3892248089, 3050821474, 1303096294, 3967186586, 2412431941, 528646813, 2311702848, 4202528135, 4026202645, 2992200171, 2387036105, 4226871307, 1101901292, 3017069671, 1604494077, 1169141738, 597466303, 1403299063, 3832705686, 2613100635, 1974974402, 3791519004, 1033081774, 1277568618, 1815492186, 2118074177, 4126668546, 2211236943, 1748251740, 1369810420, 3521504564, 4193382664, 3799085459, 2883115123, 1647391059, 706024767, 134480908, 2512897874, 1176707941, 2646852446, 806885416, 932615841, 168101135, 798661301, 235341577, 605164086, 461406363, 3756188221, 3454790438, 1311188841, 2142417613, 3933566367, 302582043, 495158174, 1479289972, 874125870, 907746093, 3698224818, 3025820398, 1537253627, 2756858614, 1983593293, 3084310113, 2108928974, 1378429307, 3722699582, 1580150641, 327451799, 2790478837, 3117535592, 0, 3253595436, 1075847264, 3825007647, 2041688520, 3059440621, 3563743934, 2378943302, 1740553945, 1916352843, 2487896798, 2555137236, 2958579944, 2244988746, 3151024235, 3320835882, 1336584933, 3992714006, 2252555205, 2588757463, 1714631509, 293963156, 2319795663, 3925473552, 67240454, 4269768577, 2689618160, 2017213508, 631218106, 1269344483, 2723238387, 1571005438, 2151694528, 93294474, 1066570413, 563977660, 1882732616, 4059428100, 1673313503, 2008463041, 2950355573, 1109467491, 537923632, 3858759450, 4260623118, 3218264685, 2177748300, 403442708, 638784309, 3287084079, 3193921505, 899127202, 2286175436, 773265209, 2479146071, 1437050866, 4236148354, 2050833735, 3362022572, 3126681063, 840505643, 3866325909, 3227541664, 427917720, 2655997905, 2749160575, 1143087718, 1412049534, 999329963, 193497219, 2353415882, 3354324521, 1807268051, 672404540, 2816401017, 3160301282, 369822493, 2916866934, 3688947771, 1681011286, 1949973070, 336202270, 2454276571, 201721354, 1210328172, 3093060836, 2680341085, 3184776046, 1135389935, 3294782118, 965841320, 831886756, 3554993207, 4068047243, 3588745010, 2345191491, 1849112409, 3664604599, 26054028, 2983581028, 2622377682, 1235855840, 3630984372, 2891339514, 4092916743, 3488279077, 3395642799, 4101667470, 1202630377, 268961816, 1874508501, 4034427016, 1243948399, 1546530418, 941366308, 1470539505, 1941222599, 2546386513, 3421038627, 2715671932, 3899946140, 1042226977, 2521517021, 1639824860, 227249030, 260737669, 3765465232, 2084453954, 1907733956, 3429263018, 2420656344, 100860677, 4160157185, 470683154, 3261161891, 1781871967, 2924959737, 1773779408, 394692241, 2579611992, 974986535, 664706745, 3655459128, 3958962195, 731420851, 571543859, 3530123707, 2849626480, 126783113, 865375399, 765172662, 1008606754, 361203602, 3387549984, 2278477385, 2857719295, 1344809080, 2782912378, 59542671, 1503764984, 160008576, 437062935, 1707065306, 3622233649, 2218934982, 3496503480, 2185314755, 697932208, 1512910199, 504303377, 2075177163, 2824099068, 1841019862, 739644986];\n var T22 = [2781242211, 2230877308, 2582542199, 2381740923, 234877682, 3184946027, 2984144751, 1418839493, 1348481072, 50462977, 2848876391, 2102799147, 434634494, 1656084439, 3863849899, 2599188086, 1167051466, 2636087938, 1082771913, 2281340285, 368048890, 3954334041, 3381544775, 201060592, 3963727277, 1739838676, 4250903202, 3930435503, 3206782108, 4149453988, 2531553906, 1536934080, 3262494647, 484572669, 2923271059, 1783375398, 1517041206, 1098792767, 49674231, 1334037708, 1550332980, 4098991525, 886171109, 150598129, 2481090929, 1940642008, 1398944049, 1059722517, 201851908, 1385547719, 1699095331, 1587397571, 674240536, 2704774806, 252314885, 3039795866, 151914247, 908333586, 2602270848, 1038082786, 651029483, 1766729511, 3447698098, 2682942837, 454166793, 2652734339, 1951935532, 775166490, 758520603, 3000790638, 4004797018, 4217086112, 4137964114, 1299594043, 1639438038, 3464344499, 2068982057, 1054729187, 1901997871, 2534638724, 4121318227, 1757008337, 0, 750906861, 1614815264, 535035132, 3363418545, 3988151131, 3201591914, 1183697867, 3647454910, 1265776953, 3734260298, 3566750796, 3903871064, 1250283471, 1807470800, 717615087, 3847203498, 384695291, 3313910595, 3617213773, 1432761139, 2484176261, 3481945413, 283769337, 100925954, 2180939647, 4037038160, 1148730428, 3123027871, 3813386408, 4087501137, 4267549603, 3229630528, 2315620239, 2906624658, 3156319645, 1215313976, 82966005, 3747855548, 3245848246, 1974459098, 1665278241, 807407632, 451280895, 251524083, 1841287890, 1283575245, 337120268, 891687699, 801369324, 3787349855, 2721421207, 3431482436, 959321879, 1469301956, 4065699751, 2197585534, 1199193405, 2898814052, 3887750493, 724703513, 2514908019, 2696962144, 2551808385, 3516813135, 2141445340, 1715741218, 2119445034, 2872807568, 2198571144, 3398190662, 700968686, 3547052216, 1009259540, 2041044702, 3803995742, 487983883, 1991105499, 1004265696, 1449407026, 1316239930, 504629770, 3683797321, 168560134, 1816667172, 3837287516, 1570751170, 1857934291, 4014189740, 2797888098, 2822345105, 2754712981, 936633572, 2347923833, 852879335, 1133234376, 1500395319, 3084545389, 2348912013, 1689376213, 3533459022, 3762923945, 3034082412, 4205598294, 133428468, 634383082, 2949277029, 2398386810, 3913789102, 403703816, 3580869306, 2297460856, 1867130149, 1918643758, 607656988, 4049053350, 3346248884, 1368901318, 600565992, 2090982877, 2632479860, 557719327, 3717614411, 3697393085, 2249034635, 2232388234, 2430627952, 1115438654, 3295786421, 2865522278, 3633334344, 84280067, 33027830, 303828494, 2747425121, 1600795957, 4188952407, 3496589753, 2434238086, 1486471617, 658119965, 3106381470, 953803233, 334231800, 3005978776, 857870609, 3151128937, 1890179545, 2298973838, 2805175444, 3056442267, 574365214, 2450884487, 550103529, 1233637070, 4289353045, 2018519080, 2057691103, 2399374476, 4166623649, 2148108681, 387583245, 3664101311, 836232934, 3330556482, 3100665960, 3280093505, 2955516313, 2002398509, 287182607, 3413881008, 4238890068, 3597515707, 975967766];\n var T32 = [1671808611, 2089089148, 2006576759, 2072901243, 4061003762, 1807603307, 1873927791, 3310653893, 810573872, 16974337, 1739181671, 729634347, 4263110654, 3613570519, 2883997099, 1989864566, 3393556426, 2191335298, 3376449993, 2106063485, 4195741690, 1508618841, 1204391495, 4027317232, 2917941677, 3563566036, 2734514082, 2951366063, 2629772188, 2767672228, 1922491506, 3227229120, 3082974647, 4246528509, 2477669779, 644500518, 911895606, 1061256767, 4144166391, 3427763148, 878471220, 2784252325, 3845444069, 4043897329, 1905517169, 3631459288, 827548209, 356461077, 67897348, 3344078279, 593839651, 3277757891, 405286936, 2527147926, 84871685, 2595565466, 118033927, 305538066, 2157648768, 3795705826, 3945188843, 661212711, 2999812018, 1973414517, 152769033, 2208177539, 745822252, 439235610, 455947803, 1857215598, 1525593178, 2700827552, 1391895634, 994932283, 3596728278, 3016654259, 695947817, 3812548067, 795958831, 2224493444, 1408607827, 3513301457, 0, 3979133421, 543178784, 4229948412, 2982705585, 1542305371, 1790891114, 3410398667, 3201918910, 961245753, 1256100938, 1289001036, 1491644504, 3477767631, 3496721360, 4012557807, 2867154858, 4212583931, 1137018435, 1305975373, 861234739, 2241073541, 1171229253, 4178635257, 33948674, 2139225727, 1357946960, 1011120188, 2679776671, 2833468328, 1374921297, 2751356323, 1086357568, 2408187279, 2460827538, 2646352285, 944271416, 4110742005, 3168756668, 3066132406, 3665145818, 560153121, 271589392, 4279952895, 4077846003, 3530407890, 3444343245, 202643468, 322250259, 3962553324, 1608629855, 2543990167, 1154254916, 389623319, 3294073796, 2817676711, 2122513534, 1028094525, 1689045092, 1575467613, 422261273, 1939203699, 1621147744, 2174228865, 1339137615, 3699352540, 577127458, 712922154, 2427141008, 2290289544, 1187679302, 3995715566, 3100863416, 339486740, 3732514782, 1591917662, 186455563, 3681988059, 3762019296, 844522546, 978220090, 169743370, 1239126601, 101321734, 611076132, 1558493276, 3260915650, 3547250131, 2901361580, 1655096418, 2443721105, 2510565781, 3828863972, 2039214713, 3878868455, 3359869896, 928607799, 1840765549, 2374762893, 3580146133, 1322425422, 2850048425, 1823791212, 1459268694, 4094161908, 3928346602, 1706019429, 2056189050, 2934523822, 135794696, 3134549946, 2022240376, 628050469, 779246638, 472135708, 2800834470, 3032970164, 3327236038, 3894660072, 3715932637, 1956440180, 522272287, 1272813131, 3185336765, 2340818315, 2323976074, 1888542832, 1044544574, 3049550261, 1722469478, 1222152264, 50660867, 4127324150, 236067854, 1638122081, 895445557, 1475980887, 3117443513, 2257655686, 3243809217, 489110045, 2662934430, 3778599393, 4162055160, 2561878936, 288563729, 1773916777, 3648039385, 2391345038, 2493985684, 2612407707, 505560094, 2274497927, 3911240169, 3460925390, 1442818645, 678973480, 3749357023, 2358182796, 2717407649, 2306869641, 219617805, 3218761151, 3862026214, 1120306242, 1756942440, 1103331905, 2578459033, 762796589, 252780047, 2966125488, 1425844308, 3151392187, 372911126];\n var T4 = [1667474886, 2088535288, 2004326894, 2071694838, 4075949567, 1802223062, 1869591006, 3318043793, 808472672, 16843522, 1734846926, 724270422, 4278065639, 3621216949, 2880169549, 1987484396, 3402253711, 2189597983, 3385409673, 2105378810, 4210693615, 1499065266, 1195886990, 4042263547, 2913856577, 3570689971, 2728590687, 2947541573, 2627518243, 2762274643, 1920112356, 3233831835, 3082273397, 4261223649, 2475929149, 640051788, 909531756, 1061110142, 4160160501, 3435941763, 875846760, 2779116625, 3857003729, 4059105529, 1903268834, 3638064043, 825316194, 353713962, 67374088, 3351728789, 589522246, 3284360861, 404236336, 2526454071, 84217610, 2593830191, 117901582, 303183396, 2155911963, 3806477791, 3958056653, 656894286, 2998062463, 1970642922, 151591698, 2206440989, 741110872, 437923380, 454765878, 1852748508, 1515908788, 2694904667, 1381168804, 993742198, 3604373943, 3014905469, 690584402, 3823320797, 791638366, 2223281939, 1398011302, 3520161977, 0, 3991743681, 538992704, 4244381667, 2981218425, 1532751286, 1785380564, 3419096717, 3200178535, 960056178, 1246420628, 1280103576, 1482221744, 3486468741, 3503319995, 4025428677, 2863326543, 4227536621, 1128514950, 1296947098, 859002214, 2240123921, 1162203018, 4193849577, 33687044, 2139062782, 1347481760, 1010582648, 2678045221, 2829640523, 1364325282, 2745433693, 1077985408, 2408548869, 2459086143, 2644360225, 943212656, 4126475505, 3166494563, 3065430391, 3671750063, 555836226, 269496352, 4294908645, 4092792573, 3537006015, 3452783745, 202118168, 320025894, 3974901699, 1600119230, 2543297077, 1145359496, 387397934, 3301201811, 2812801621, 2122220284, 1027426170, 1684319432, 1566435258, 421079858, 1936954854, 1616945344, 2172753945, 1330631070, 3705438115, 572679748, 707427924, 2425400123, 2290647819, 1179044492, 4008585671, 3099120491, 336870440, 3739122087, 1583276732, 185277718, 3688593069, 3772791771, 842159716, 976899700, 168435220, 1229577106, 101059084, 606366792, 1549591736, 3267517855, 3553849021, 2897014595, 1650632388, 2442242105, 2509612081, 3840161747, 2038008818, 3890688725, 3368567691, 926374254, 1835907034, 2374863873, 3587531953, 1313788572, 2846482505, 1819063512, 1448540844, 4109633523, 3941213647, 1701162954, 2054852340, 2930698567, 134748176, 3132806511, 2021165296, 623210314, 774795868, 471606328, 2795958615, 3031746419, 3334885783, 3907527627, 3722280097, 1953799400, 522133822, 1263263126, 3183336545, 2341176845, 2324333839, 1886425312, 1044267644, 3048588401, 1718004428, 1212733584, 50529542, 4143317495, 235803164, 1633788866, 892690282, 1465383342, 3115962473, 2256965911, 3250673817, 488449850, 2661202215, 3789633753, 4177007595, 2560144171, 286339874, 1768537042, 3654906025, 2391705863, 2492770099, 2610673197, 505291324, 2273808917, 3924369609, 3469625735, 1431699370, 673740880, 3755965093, 2358021891, 2711746649, 2307489801, 218961690, 3217021541, 3873845719, 1111672452, 1751693520, 1094828930, 2576986153, 757954394, 252645662, 2964376443, 1414855848, 3149649517, 370555436];\n var T5 = [1374988112, 2118214995, 437757123, 975658646, 1001089995, 530400753, 2902087851, 1273168787, 540080725, 2910219766, 2295101073, 4110568485, 1340463100, 3307916247, 641025152, 3043140495, 3736164937, 632953703, 1172967064, 1576976609, 3274667266, 2169303058, 2370213795, 1809054150, 59727847, 361929877, 3211623147, 2505202138, 3569255213, 1484005843, 1239443753, 2395588676, 1975683434, 4102977912, 2572697195, 666464733, 3202437046, 4035489047, 3374361702, 2110667444, 1675577880, 3843699074, 2538681184, 1649639237, 2976151520, 3144396420, 4269907996, 4178062228, 1883793496, 2403728665, 2497604743, 1383856311, 2876494627, 1917518562, 3810496343, 1716890410, 3001755655, 800440835, 2261089178, 3543599269, 807962610, 599762354, 33778362, 3977675356, 2328828971, 2809771154, 4077384432, 1315562145, 1708848333, 101039829, 3509871135, 3299278474, 875451293, 2733856160, 92987698, 2767645557, 193195065, 1080094634, 1584504582, 3178106961, 1042385657, 2531067453, 3711829422, 1306967366, 2438237621, 1908694277, 67556463, 1615861247, 429456164, 3602770327, 2302690252, 1742315127, 2968011453, 126454664, 3877198648, 2043211483, 2709260871, 2084704233, 4169408201, 0, 159417987, 841739592, 504459436, 1817866830, 4245618683, 260388950, 1034867998, 908933415, 168810852, 1750902305, 2606453969, 607530554, 202008497, 2472011535, 3035535058, 463180190, 2160117071, 1641816226, 1517767529, 470948374, 3801332234, 3231722213, 1008918595, 303765277, 235474187, 4069246893, 766945465, 337553864, 1475418501, 2943682380, 4003061179, 2743034109, 4144047775, 1551037884, 1147550661, 1543208500, 2336434550, 3408119516, 3069049960, 3102011747, 3610369226, 1113818384, 328671808, 2227573024, 2236228733, 3535486456, 2935566865, 3341394285, 496906059, 3702665459, 226906860, 2009195472, 733156972, 2842737049, 294930682, 1206477858, 2835123396, 2700099354, 1451044056, 573804783, 2269728455, 3644379585, 2362090238, 2564033334, 2801107407, 2776292904, 3669462566, 1068351396, 742039012, 1350078989, 1784663195, 1417561698, 4136440770, 2430122216, 775550814, 2193862645, 2673705150, 1775276924, 1876241833, 3475313331, 3366754619, 270040487, 3902563182, 3678124923, 3441850377, 1851332852, 3969562369, 2203032232, 3868552805, 2868897406, 566021896, 4011190502, 3135740889, 1248802510, 3936291284, 699432150, 832877231, 708780849, 3332740144, 899835584, 1951317047, 4236429990, 3767586992, 866637845, 4043610186, 1106041591, 2144161806, 395441711, 1984812685, 1139781709, 3433712980, 3835036895, 2664543715, 1282050075, 3240894392, 1181045119, 2640243204, 25965917, 4203181171, 4211818798, 3009879386, 2463879762, 3910161971, 1842759443, 2597806476, 933301370, 1509430414, 3943906441, 3467192302, 3076639029, 3776767469, 2051518780, 2631065433, 1441952575, 404016761, 1942435775, 1408749034, 1610459739, 3745345300, 2017778566, 3400528769, 3110650942, 941896748, 3265478751, 371049330, 3168937228, 675039627, 4279080257, 967311729, 135050206, 3635733660, 1683407248, 2076935265, 3576870512, 1215061108, 3501741890];\n var T6 = [1347548327, 1400783205, 3273267108, 2520393566, 3409685355, 4045380933, 2880240216, 2471224067, 1428173050, 4138563181, 2441661558, 636813900, 4233094615, 3620022987, 2149987652, 2411029155, 1239331162, 1730525723, 2554718734, 3781033664, 46346101, 310463728, 2743944855, 3328955385, 3875770207, 2501218972, 3955191162, 3667219033, 768917123, 3545789473, 692707433, 1150208456, 1786102409, 2029293177, 1805211710, 3710368113, 3065962831, 401639597, 1724457132, 3028143674, 409198410, 2196052529, 1620529459, 1164071807, 3769721975, 2226875310, 486441376, 2499348523, 1483753576, 428819965, 2274680428, 3075636216, 598438867, 3799141122, 1474502543, 711349675, 129166120, 53458370, 2592523643, 2782082824, 4063242375, 2988687269, 3120694122, 1559041666, 730517276, 2460449204, 4042459122, 2706270690, 3446004468, 3573941694, 533804130, 2328143614, 2637442643, 2695033685, 839224033, 1973745387, 957055980, 2856345839, 106852767, 1371368976, 4181598602, 1033297158, 2933734917, 1179510461, 3046200461, 91341917, 1862534868, 4284502037, 605657339, 2547432937, 3431546947, 2003294622, 3182487618, 2282195339, 954669403, 3682191598, 1201765386, 3917234703, 3388507166, 0, 2198438022, 1211247597, 2887651696, 1315723890, 4227665663, 1443857720, 507358933, 657861945, 1678381017, 560487590, 3516619604, 975451694, 2970356327, 261314535, 3535072918, 2652609425, 1333838021, 2724322336, 1767536459, 370938394, 182621114, 3854606378, 1128014560, 487725847, 185469197, 2918353863, 3106780840, 3356761769, 2237133081, 1286567175, 3152976349, 4255350624, 2683765030, 3160175349, 3309594171, 878443390, 1988838185, 3704300486, 1756818940, 1673061617, 3403100636, 272786309, 1075025698, 545572369, 2105887268, 4174560061, 296679730, 1841768865, 1260232239, 4091327024, 3960309330, 3497509347, 1814803222, 2578018489, 4195456072, 575138148, 3299409036, 446754879, 3629546796, 4011996048, 3347532110, 3252238545, 4270639778, 915985419, 3483825537, 681933534, 651868046, 2755636671, 3828103837, 223377554, 2607439820, 1649704518, 3270937875, 3901806776, 1580087799, 4118987695, 3198115200, 2087309459, 2842678573, 3016697106, 1003007129, 2802849917, 1860738147, 2077965243, 164439672, 4100872472, 32283319, 2827177882, 1709610350, 2125135846, 136428751, 3874428392, 3652904859, 3460984630, 3572145929, 3593056380, 2939266226, 824852259, 818324884, 3224740454, 930369212, 2801566410, 2967507152, 355706840, 1257309336, 4148292826, 243256656, 790073846, 2373340630, 1296297904, 1422699085, 3756299780, 3818836405, 457992840, 3099667487, 2135319889, 77422314, 1560382517, 1945798516, 788204353, 1521706781, 1385356242, 870912086, 325965383, 2358957921, 2050466060, 2388260884, 2313884476, 4006521127, 901210569, 3990953189, 1014646705, 1503449823, 1062597235, 2031621326, 3212035895, 3931371469, 1533017514, 350174575, 2256028891, 2177544179, 1052338372, 741876788, 1606591296, 1914052035, 213705253, 2334669897, 1107234197, 1899603969, 3725069491, 2631447780, 2422494913, 1635502980, 1893020342, 1950903388, 1120974935];\n var T7 = [2807058932, 1699970625, 2764249623, 1586903591, 1808481195, 1173430173, 1487645946, 59984867, 4199882800, 1844882806, 1989249228, 1277555970, 3623636965, 3419915562, 1149249077, 2744104290, 1514790577, 459744698, 244860394, 3235995134, 1963115311, 4027744588, 2544078150, 4190530515, 1608975247, 2627016082, 2062270317, 1507497298, 2200818878, 567498868, 1764313568, 3359936201, 2305455554, 2037970062, 1047239e3, 1910319033, 1337376481, 2904027272, 2892417312, 984907214, 1243112415, 830661914, 861968209, 2135253587, 2011214180, 2927934315, 2686254721, 731183368, 1750626376, 4246310725, 1820824798, 4172763771, 3542330227, 48394827, 2404901663, 2871682645, 671593195, 3254988725, 2073724613, 145085239, 2280796200, 2779915199, 1790575107, 2187128086, 472615631, 3029510009, 4075877127, 3802222185, 4107101658, 3201631749, 1646252340, 4270507174, 1402811438, 1436590835, 3778151818, 3950355702, 3963161475, 4020912224, 2667994737, 273792366, 2331590177, 104699613, 95345982, 3175501286, 2377486676, 1560637892, 3564045318, 369057872, 4213447064, 3919042237, 1137477952, 2658625497, 1119727848, 2340947849, 1530455833, 4007360968, 172466556, 266959938, 516552836, 0, 2256734592, 3980931627, 1890328081, 1917742170, 4294704398, 945164165, 3575528878, 958871085, 3647212047, 2787207260, 1423022939, 775562294, 1739656202, 3876557655, 2530391278, 2443058075, 3310321856, 547512796, 1265195639, 437656594, 3121275539, 719700128, 3762502690, 387781147, 218828297, 3350065803, 2830708150, 2848461854, 428169201, 122466165, 3720081049, 1627235199, 648017665, 4122762354, 1002783846, 2117360635, 695634755, 3336358691, 4234721005, 4049844452, 3704280881, 2232435299, 574624663, 287343814, 612205898, 1039717051, 840019705, 2708326185, 793451934, 821288114, 1391201670, 3822090177, 376187827, 3113855344, 1224348052, 1679968233, 2361698556, 1058709744, 752375421, 2431590963, 1321699145, 3519142200, 2734591178, 188127444, 2177869557, 3727205754, 2384911031, 3215212461, 2648976442, 2450346104, 3432737375, 1180849278, 331544205, 3102249176, 4150144569, 2952102595, 2159976285, 2474404304, 766078933, 313773861, 2570832044, 2108100632, 1668212892, 3145456443, 2013908262, 418672217, 3070356634, 2594734927, 1852171925, 3867060991, 3473416636, 3907448597, 2614737639, 919489135, 164948639, 2094410160, 2997825956, 590424639, 2486224549, 1723872674, 3157750862, 3399941250, 3501252752, 3625268135, 2555048196, 3673637356, 1343127501, 4130281361, 3599595085, 2957853679, 1297403050, 81781910, 3051593425, 2283490410, 532201772, 1367295589, 3926170974, 895287692, 1953757831, 1093597963, 492483431, 3528626907, 1446242576, 1192455638, 1636604631, 209336225, 344873464, 1015671571, 669961897, 3375740769, 3857572124, 2973530695, 3747192018, 1933530610, 3464042516, 935293895, 3454686199, 2858115069, 1863638845, 3683022916, 4085369519, 3292445032, 875313188, 1080017571, 3279033885, 621591778, 1233856572, 2504130317, 24197544, 3017672716, 3835484340, 3247465558, 2220981195, 3060847922, 1551124588, 1463996600];\n var T8 = [4104605777, 1097159550, 396673818, 660510266, 2875968315, 2638606623, 4200115116, 3808662347, 821712160, 1986918061, 3430322568, 38544885, 3856137295, 718002117, 893681702, 1654886325, 2975484382, 3122358053, 3926825029, 4274053469, 796197571, 1290801793, 1184342925, 3556361835, 2405426947, 2459735317, 1836772287, 1381620373, 3196267988, 1948373848, 3764988233, 3385345166, 3263785589, 2390325492, 1480485785, 3111247143, 3780097726, 2293045232, 548169417, 3459953789, 3746175075, 439452389, 1362321559, 1400849762, 1685577905, 1806599355, 2174754046, 137073913, 1214797936, 1174215055, 3731654548, 2079897426, 1943217067, 1258480242, 529487843, 1437280870, 3945269170, 3049390895, 3313212038, 923313619, 679998e3, 3215307299, 57326082, 377642221, 3474729866, 2041877159, 133361907, 1776460110, 3673476453, 96392454, 878845905, 2801699524, 777231668, 4082475170, 2330014213, 4142626212, 2213296395, 1626319424, 1906247262, 1846563261, 562755902, 3708173718, 1040559837, 3871163981, 1418573201, 3294430577, 114585348, 1343618912, 2566595609, 3186202582, 1078185097, 3651041127, 3896688048, 2307622919, 425408743, 3371096953, 2081048481, 1108339068, 2216610296, 0, 2156299017, 736970802, 292596766, 1517440620, 251657213, 2235061775, 2933202493, 758720310, 265905162, 1554391400, 1532285339, 908999204, 174567692, 1474760595, 4002861748, 2610011675, 3234156416, 3693126241, 2001430874, 303699484, 2478443234, 2687165888, 585122620, 454499602, 151849742, 2345119218, 3064510765, 514443284, 4044981591, 1963412655, 2581445614, 2137062819, 19308535, 1928707164, 1715193156, 4219352155, 1126790795, 600235211, 3992742070, 3841024952, 836553431, 1669664834, 2535604243, 3323011204, 1243905413, 3141400786, 4180808110, 698445255, 2653899549, 2989552604, 2253581325, 3252932727, 3004591147, 1891211689, 2487810577, 3915653703, 4237083816, 4030667424, 2100090966, 865136418, 1229899655, 953270745, 3399679628, 3557504664, 4118925222, 2061379749, 3079546586, 2915017791, 983426092, 2022837584, 1607244650, 2118541908, 2366882550, 3635996816, 972512814, 3283088770, 1568718495, 3499326569, 3576539503, 621982671, 2895723464, 410887952, 2623762152, 1002142683, 645401037, 1494807662, 2595684844, 1335535747, 2507040230, 4293295786, 3167684641, 367585007, 3885750714, 1865862730, 2668221674, 2960971305, 2763173681, 1059270954, 2777952454, 2724642869, 1320957812, 2194319100, 2429595872, 2815956275, 77089521, 3973773121, 3444575871, 2448830231, 1305906550, 4021308739, 2857194700, 2516901860, 3518358430, 1787304780, 740276417, 1699839814, 1592394909, 2352307457, 2272556026, 188821243, 1729977011, 3687994002, 274084841, 3594982253, 3613494426, 2701949495, 4162096729, 322734571, 2837966542, 1640576439, 484830689, 1202797690, 3537852828, 4067639125, 349075736, 3342319475, 4157467219, 4255800159, 1030690015, 1155237496, 2951971274, 1757691577, 607398968, 2738905026, 499347990, 3794078908, 1011452712, 227885567, 2818666809, 213114376, 3034881240, 1455525988, 3414450555, 850817237, 1817998408, 3092726480];\n var U1 = [0, 235474187, 470948374, 303765277, 941896748, 908933415, 607530554, 708780849, 1883793496, 2118214995, 1817866830, 1649639237, 1215061108, 1181045119, 1417561698, 1517767529, 3767586992, 4003061179, 4236429990, 4069246893, 3635733660, 3602770327, 3299278474, 3400528769, 2430122216, 2664543715, 2362090238, 2193862645, 2835123396, 2801107407, 3035535058, 3135740889, 3678124923, 3576870512, 3341394285, 3374361702, 3810496343, 3977675356, 4279080257, 4043610186, 2876494627, 2776292904, 3076639029, 3110650942, 2472011535, 2640243204, 2403728665, 2169303058, 1001089995, 899835584, 666464733, 699432150, 59727847, 226906860, 530400753, 294930682, 1273168787, 1172967064, 1475418501, 1509430414, 1942435775, 2110667444, 1876241833, 1641816226, 2910219766, 2743034109, 2976151520, 3211623147, 2505202138, 2606453969, 2302690252, 2269728455, 3711829422, 3543599269, 3240894392, 3475313331, 3843699074, 3943906441, 4178062228, 4144047775, 1306967366, 1139781709, 1374988112, 1610459739, 1975683434, 2076935265, 1775276924, 1742315127, 1034867998, 866637845, 566021896, 800440835, 92987698, 193195065, 429456164, 395441711, 1984812685, 2017778566, 1784663195, 1683407248, 1315562145, 1080094634, 1383856311, 1551037884, 101039829, 135050206, 437757123, 337553864, 1042385657, 807962610, 573804783, 742039012, 2531067453, 2564033334, 2328828971, 2227573024, 2935566865, 2700099354, 3001755655, 3168937228, 3868552805, 3902563182, 4203181171, 4102977912, 3736164937, 3501741890, 3265478751, 3433712980, 1106041591, 1340463100, 1576976609, 1408749034, 2043211483, 2009195472, 1708848333, 1809054150, 832877231, 1068351396, 766945465, 599762354, 159417987, 126454664, 361929877, 463180190, 2709260871, 2943682380, 3178106961, 3009879386, 2572697195, 2538681184, 2236228733, 2336434550, 3509871135, 3745345300, 3441850377, 3274667266, 3910161971, 3877198648, 4110568485, 4211818798, 2597806476, 2497604743, 2261089178, 2295101073, 2733856160, 2902087851, 3202437046, 2968011453, 3936291284, 3835036895, 4136440770, 4169408201, 3535486456, 3702665459, 3467192302, 3231722213, 2051518780, 1951317047, 1716890410, 1750902305, 1113818384, 1282050075, 1584504582, 1350078989, 168810852, 67556463, 371049330, 404016761, 841739592, 1008918595, 775550814, 540080725, 3969562369, 3801332234, 4035489047, 4269907996, 3569255213, 3669462566, 3366754619, 3332740144, 2631065433, 2463879762, 2160117071, 2395588676, 2767645557, 2868897406, 3102011747, 3069049960, 202008497, 33778362, 270040487, 504459436, 875451293, 975658646, 675039627, 641025152, 2084704233, 1917518562, 1615861247, 1851332852, 1147550661, 1248802510, 1484005843, 1451044056, 933301370, 967311729, 733156972, 632953703, 260388950, 25965917, 328671808, 496906059, 1206477858, 1239443753, 1543208500, 1441952575, 2144161806, 1908694277, 1675577880, 1842759443, 3610369226, 3644379585, 3408119516, 3307916247, 4011190502, 3776767469, 4077384432, 4245618683, 2809771154, 2842737049, 3144396420, 3043140495, 2673705150, 2438237621, 2203032232, 2370213795];\n var U22 = [0, 185469197, 370938394, 487725847, 741876788, 657861945, 975451694, 824852259, 1483753576, 1400783205, 1315723890, 1164071807, 1950903388, 2135319889, 1649704518, 1767536459, 2967507152, 3152976349, 2801566410, 2918353863, 2631447780, 2547432937, 2328143614, 2177544179, 3901806776, 3818836405, 4270639778, 4118987695, 3299409036, 3483825537, 3535072918, 3652904859, 2077965243, 1893020342, 1841768865, 1724457132, 1474502543, 1559041666, 1107234197, 1257309336, 598438867, 681933534, 901210569, 1052338372, 261314535, 77422314, 428819965, 310463728, 3409685355, 3224740454, 3710368113, 3593056380, 3875770207, 3960309330, 4045380933, 4195456072, 2471224067, 2554718734, 2237133081, 2388260884, 3212035895, 3028143674, 2842678573, 2724322336, 4138563181, 4255350624, 3769721975, 3955191162, 3667219033, 3516619604, 3431546947, 3347532110, 2933734917, 2782082824, 3099667487, 3016697106, 2196052529, 2313884476, 2499348523, 2683765030, 1179510461, 1296297904, 1347548327, 1533017514, 1786102409, 1635502980, 2087309459, 2003294622, 507358933, 355706840, 136428751, 53458370, 839224033, 957055980, 605657339, 790073846, 2373340630, 2256028891, 2607439820, 2422494913, 2706270690, 2856345839, 3075636216, 3160175349, 3573941694, 3725069491, 3273267108, 3356761769, 4181598602, 4063242375, 4011996048, 3828103837, 1033297158, 915985419, 730517276, 545572369, 296679730, 446754879, 129166120, 213705253, 1709610350, 1860738147, 1945798516, 2029293177, 1239331162, 1120974935, 1606591296, 1422699085, 4148292826, 4233094615, 3781033664, 3931371469, 3682191598, 3497509347, 3446004468, 3328955385, 2939266226, 2755636671, 3106780840, 2988687269, 2198438022, 2282195339, 2501218972, 2652609425, 1201765386, 1286567175, 1371368976, 1521706781, 1805211710, 1620529459, 2105887268, 1988838185, 533804130, 350174575, 164439672, 46346101, 870912086, 954669403, 636813900, 788204353, 2358957921, 2274680428, 2592523643, 2441661558, 2695033685, 2880240216, 3065962831, 3182487618, 3572145929, 3756299780, 3270937875, 3388507166, 4174560061, 4091327024, 4006521127, 3854606378, 1014646705, 930369212, 711349675, 560487590, 272786309, 457992840, 106852767, 223377554, 1678381017, 1862534868, 1914052035, 2031621326, 1211247597, 1128014560, 1580087799, 1428173050, 32283319, 182621114, 401639597, 486441376, 768917123, 651868046, 1003007129, 818324884, 1503449823, 1385356242, 1333838021, 1150208456, 1973745387, 2125135846, 1673061617, 1756818940, 2970356327, 3120694122, 2802849917, 2887651696, 2637442643, 2520393566, 2334669897, 2149987652, 3917234703, 3799141122, 4284502037, 4100872472, 3309594171, 3460984630, 3545789473, 3629546796, 2050466060, 1899603969, 1814803222, 1730525723, 1443857720, 1560382517, 1075025698, 1260232239, 575138148, 692707433, 878443390, 1062597235, 243256656, 91341917, 409198410, 325965383, 3403100636, 3252238545, 3704300486, 3620022987, 3874428392, 3990953189, 4042459122, 4227665663, 2460449204, 2578018489, 2226875310, 2411029155, 3198115200, 3046200461, 2827177882, 2743944855];\n var U32 = [0, 218828297, 437656594, 387781147, 875313188, 958871085, 775562294, 590424639, 1750626376, 1699970625, 1917742170, 2135253587, 1551124588, 1367295589, 1180849278, 1265195639, 3501252752, 3720081049, 3399941250, 3350065803, 3835484340, 3919042237, 4270507174, 4085369519, 3102249176, 3051593425, 2734591178, 2952102595, 2361698556, 2177869557, 2530391278, 2614737639, 3145456443, 3060847922, 2708326185, 2892417312, 2404901663, 2187128086, 2504130317, 2555048196, 3542330227, 3727205754, 3375740769, 3292445032, 3876557655, 3926170974, 4246310725, 4027744588, 1808481195, 1723872674, 1910319033, 2094410160, 1608975247, 1391201670, 1173430173, 1224348052, 59984867, 244860394, 428169201, 344873464, 935293895, 984907214, 766078933, 547512796, 1844882806, 1627235199, 2011214180, 2062270317, 1507497298, 1423022939, 1137477952, 1321699145, 95345982, 145085239, 532201772, 313773861, 830661914, 1015671571, 731183368, 648017665, 3175501286, 2957853679, 2807058932, 2858115069, 2305455554, 2220981195, 2474404304, 2658625497, 3575528878, 3625268135, 3473416636, 3254988725, 3778151818, 3963161475, 4213447064, 4130281361, 3599595085, 3683022916, 3432737375, 3247465558, 3802222185, 4020912224, 4172763771, 4122762354, 3201631749, 3017672716, 2764249623, 2848461854, 2331590177, 2280796200, 2431590963, 2648976442, 104699613, 188127444, 472615631, 287343814, 840019705, 1058709744, 671593195, 621591778, 1852171925, 1668212892, 1953757831, 2037970062, 1514790577, 1463996600, 1080017571, 1297403050, 3673637356, 3623636965, 3235995134, 3454686199, 4007360968, 3822090177, 4107101658, 4190530515, 2997825956, 3215212461, 2830708150, 2779915199, 2256734592, 2340947849, 2627016082, 2443058075, 172466556, 122466165, 273792366, 492483431, 1047239e3, 861968209, 612205898, 695634755, 1646252340, 1863638845, 2013908262, 1963115311, 1446242576, 1530455833, 1277555970, 1093597963, 1636604631, 1820824798, 2073724613, 1989249228, 1436590835, 1487645946, 1337376481, 1119727848, 164948639, 81781910, 331544205, 516552836, 1039717051, 821288114, 669961897, 719700128, 2973530695, 3157750862, 2871682645, 2787207260, 2232435299, 2283490410, 2667994737, 2450346104, 3647212047, 3564045318, 3279033885, 3464042516, 3980931627, 3762502690, 4150144569, 4199882800, 3070356634, 3121275539, 2904027272, 2686254721, 2200818878, 2384911031, 2570832044, 2486224549, 3747192018, 3528626907, 3310321856, 3359936201, 3950355702, 3867060991, 4049844452, 4234721005, 1739656202, 1790575107, 2108100632, 1890328081, 1402811438, 1586903591, 1233856572, 1149249077, 266959938, 48394827, 369057872, 418672217, 1002783846, 919489135, 567498868, 752375421, 209336225, 24197544, 376187827, 459744698, 945164165, 895287692, 574624663, 793451934, 1679968233, 1764313568, 2117360635, 1933530610, 1343127501, 1560637892, 1243112415, 1192455638, 3704280881, 3519142200, 3336358691, 3419915562, 3907448597, 3857572124, 4075877127, 4294704398, 3029510009, 3113855344, 2927934315, 2744104290, 2159976285, 2377486676, 2594734927, 2544078150];\n var U4 = [0, 151849742, 303699484, 454499602, 607398968, 758720310, 908999204, 1059270954, 1214797936, 1097159550, 1517440620, 1400849762, 1817998408, 1699839814, 2118541908, 2001430874, 2429595872, 2581445614, 2194319100, 2345119218, 3034881240, 3186202582, 2801699524, 2951971274, 3635996816, 3518358430, 3399679628, 3283088770, 4237083816, 4118925222, 4002861748, 3885750714, 1002142683, 850817237, 698445255, 548169417, 529487843, 377642221, 227885567, 77089521, 1943217067, 2061379749, 1640576439, 1757691577, 1474760595, 1592394909, 1174215055, 1290801793, 2875968315, 2724642869, 3111247143, 2960971305, 2405426947, 2253581325, 2638606623, 2487810577, 3808662347, 3926825029, 4044981591, 4162096729, 3342319475, 3459953789, 3576539503, 3693126241, 1986918061, 2137062819, 1685577905, 1836772287, 1381620373, 1532285339, 1078185097, 1229899655, 1040559837, 923313619, 740276417, 621982671, 439452389, 322734571, 137073913, 19308535, 3871163981, 4021308739, 4104605777, 4255800159, 3263785589, 3414450555, 3499326569, 3651041127, 2933202493, 2815956275, 3167684641, 3049390895, 2330014213, 2213296395, 2566595609, 2448830231, 1305906550, 1155237496, 1607244650, 1455525988, 1776460110, 1626319424, 2079897426, 1928707164, 96392454, 213114376, 396673818, 514443284, 562755902, 679998e3, 865136418, 983426092, 3708173718, 3557504664, 3474729866, 3323011204, 4180808110, 4030667424, 3945269170, 3794078908, 2507040230, 2623762152, 2272556026, 2390325492, 2975484382, 3092726480, 2738905026, 2857194700, 3973773121, 3856137295, 4274053469, 4157467219, 3371096953, 3252932727, 3673476453, 3556361835, 2763173681, 2915017791, 3064510765, 3215307299, 2156299017, 2307622919, 2459735317, 2610011675, 2081048481, 1963412655, 1846563261, 1729977011, 1480485785, 1362321559, 1243905413, 1126790795, 878845905, 1030690015, 645401037, 796197571, 274084841, 425408743, 38544885, 188821243, 3613494426, 3731654548, 3313212038, 3430322568, 4082475170, 4200115116, 3780097726, 3896688048, 2668221674, 2516901860, 2366882550, 2216610296, 3141400786, 2989552604, 2837966542, 2687165888, 1202797690, 1320957812, 1437280870, 1554391400, 1669664834, 1787304780, 1906247262, 2022837584, 265905162, 114585348, 499347990, 349075736, 736970802, 585122620, 972512814, 821712160, 2595684844, 2478443234, 2293045232, 2174754046, 3196267988, 3079546586, 2895723464, 2777952454, 3537852828, 3687994002, 3234156416, 3385345166, 4142626212, 4293295786, 3841024952, 3992742070, 174567692, 57326082, 410887952, 292596766, 777231668, 660510266, 1011452712, 893681702, 1108339068, 1258480242, 1343618912, 1494807662, 1715193156, 1865862730, 1948373848, 2100090966, 2701949495, 2818666809, 3004591147, 3122358053, 2235061775, 2352307457, 2535604243, 2653899549, 3915653703, 3764988233, 4219352155, 4067639125, 3444575871, 3294430577, 3746175075, 3594982253, 836553431, 953270745, 600235211, 718002117, 367585007, 484830689, 133361907, 251657213, 2041877159, 1891211689, 1806599355, 1654886325, 1568718495, 1418573201, 1335535747, 1184342925];\n function convertToInt32(bytes) {\n var result = [];\n for (var i3 = 0; i3 < bytes.length; i3 += 4) {\n result.push(\n bytes[i3] << 24 | bytes[i3 + 1] << 16 | bytes[i3 + 2] << 8 | bytes[i3 + 3]\n );\n }\n return result;\n }\n var AES = function(key) {\n if (!(this instanceof AES)) {\n throw Error(\"AES must be instanitated with `new`\");\n }\n Object.defineProperty(this, \"key\", {\n value: coerceArray(key, true)\n });\n this._prepare();\n };\n AES.prototype._prepare = function() {\n var rounds = numberOfRounds[this.key.length];\n if (rounds == null) {\n throw new Error(\"invalid key size (must be 16, 24 or 32 bytes)\");\n }\n this._Ke = [];\n this._Kd = [];\n for (var i3 = 0; i3 <= rounds; i3++) {\n this._Ke.push([0, 0, 0, 0]);\n this._Kd.push([0, 0, 0, 0]);\n }\n var roundKeyCount = (rounds + 1) * 4;\n var KC = this.key.length / 4;\n var tk = convertToInt32(this.key);\n var index2;\n for (var i3 = 0; i3 < KC; i3++) {\n index2 = i3 >> 2;\n this._Ke[index2][i3 % 4] = tk[i3];\n this._Kd[rounds - index2][i3 % 4] = tk[i3];\n }\n var rconpointer = 0;\n var t3 = KC, tt;\n while (t3 < roundKeyCount) {\n tt = tk[KC - 1];\n tk[0] ^= S3[tt >> 16 & 255] << 24 ^ S3[tt >> 8 & 255] << 16 ^ S3[tt & 255] << 8 ^ S3[tt >> 24 & 255] ^ rcon[rconpointer] << 24;\n rconpointer += 1;\n if (KC != 8) {\n for (var i3 = 1; i3 < KC; i3++) {\n tk[i3] ^= tk[i3 - 1];\n }\n } else {\n for (var i3 = 1; i3 < KC / 2; i3++) {\n tk[i3] ^= tk[i3 - 1];\n }\n tt = tk[KC / 2 - 1];\n tk[KC / 2] ^= S3[tt & 255] ^ S3[tt >> 8 & 255] << 8 ^ S3[tt >> 16 & 255] << 16 ^ S3[tt >> 24 & 255] << 24;\n for (var i3 = KC / 2 + 1; i3 < KC; i3++) {\n tk[i3] ^= tk[i3 - 1];\n }\n }\n var i3 = 0, r2, c4;\n while (i3 < KC && t3 < roundKeyCount) {\n r2 = t3 >> 2;\n c4 = t3 % 4;\n this._Ke[r2][c4] = tk[i3];\n this._Kd[rounds - r2][c4] = tk[i3++];\n t3++;\n }\n }\n for (var r2 = 1; r2 < rounds; r2++) {\n for (var c4 = 0; c4 < 4; c4++) {\n tt = this._Kd[r2][c4];\n this._Kd[r2][c4] = U1[tt >> 24 & 255] ^ U22[tt >> 16 & 255] ^ U32[tt >> 8 & 255] ^ U4[tt & 255];\n }\n }\n };\n AES.prototype.encrypt = function(plaintext) {\n if (plaintext.length != 16) {\n throw new Error(\"invalid plaintext size (must be 16 bytes)\");\n }\n var rounds = this._Ke.length - 1;\n var a3 = [0, 0, 0, 0];\n var t3 = convertToInt32(plaintext);\n for (var i3 = 0; i3 < 4; i3++) {\n t3[i3] ^= this._Ke[0][i3];\n }\n for (var r2 = 1; r2 < rounds; r2++) {\n for (var i3 = 0; i3 < 4; i3++) {\n a3[i3] = T1[t3[i3] >> 24 & 255] ^ T22[t3[(i3 + 1) % 4] >> 16 & 255] ^ T32[t3[(i3 + 2) % 4] >> 8 & 255] ^ T4[t3[(i3 + 3) % 4] & 255] ^ this._Ke[r2][i3];\n }\n t3 = a3.slice();\n }\n var result = createArray(16), tt;\n for (var i3 = 0; i3 < 4; i3++) {\n tt = this._Ke[rounds][i3];\n result[4 * i3] = (S3[t3[i3] >> 24 & 255] ^ tt >> 24) & 255;\n result[4 * i3 + 1] = (S3[t3[(i3 + 1) % 4] >> 16 & 255] ^ tt >> 16) & 255;\n result[4 * i3 + 2] = (S3[t3[(i3 + 2) % 4] >> 8 & 255] ^ tt >> 8) & 255;\n result[4 * i3 + 3] = (S3[t3[(i3 + 3) % 4] & 255] ^ tt) & 255;\n }\n return result;\n };\n AES.prototype.decrypt = function(ciphertext) {\n if (ciphertext.length != 16) {\n throw new Error(\"invalid ciphertext size (must be 16 bytes)\");\n }\n var rounds = this._Kd.length - 1;\n var a3 = [0, 0, 0, 0];\n var t3 = convertToInt32(ciphertext);\n for (var i3 = 0; i3 < 4; i3++) {\n t3[i3] ^= this._Kd[0][i3];\n }\n for (var r2 = 1; r2 < rounds; r2++) {\n for (var i3 = 0; i3 < 4; i3++) {\n a3[i3] = T5[t3[i3] >> 24 & 255] ^ T6[t3[(i3 + 3) % 4] >> 16 & 255] ^ T7[t3[(i3 + 2) % 4] >> 8 & 255] ^ T8[t3[(i3 + 1) % 4] & 255] ^ this._Kd[r2][i3];\n }\n t3 = a3.slice();\n }\n var result = createArray(16), tt;\n for (var i3 = 0; i3 < 4; i3++) {\n tt = this._Kd[rounds][i3];\n result[4 * i3] = (Si[t3[i3] >> 24 & 255] ^ tt >> 24) & 255;\n result[4 * i3 + 1] = (Si[t3[(i3 + 3) % 4] >> 16 & 255] ^ tt >> 16) & 255;\n result[4 * i3 + 2] = (Si[t3[(i3 + 2) % 4] >> 8 & 255] ^ tt >> 8) & 255;\n result[4 * i3 + 3] = (Si[t3[(i3 + 1) % 4] & 255] ^ tt) & 255;\n }\n return result;\n };\n var ModeOfOperationECB = function(key) {\n if (!(this instanceof ModeOfOperationECB)) {\n throw Error(\"AES must be instanitated with `new`\");\n }\n this.description = \"Electronic Code Block\";\n this.name = \"ecb\";\n this._aes = new AES(key);\n };\n ModeOfOperationECB.prototype.encrypt = function(plaintext) {\n plaintext = coerceArray(plaintext);\n if (plaintext.length % 16 !== 0) {\n throw new Error(\"invalid plaintext size (must be multiple of 16 bytes)\");\n }\n var ciphertext = createArray(plaintext.length);\n var block = createArray(16);\n for (var i3 = 0; i3 < plaintext.length; i3 += 16) {\n copyArray(plaintext, block, 0, i3, i3 + 16);\n block = this._aes.encrypt(block);\n copyArray(block, ciphertext, i3);\n }\n return ciphertext;\n };\n ModeOfOperationECB.prototype.decrypt = function(ciphertext) {\n ciphertext = coerceArray(ciphertext);\n if (ciphertext.length % 16 !== 0) {\n throw new Error(\"invalid ciphertext size (must be multiple of 16 bytes)\");\n }\n var plaintext = createArray(ciphertext.length);\n var block = createArray(16);\n for (var i3 = 0; i3 < ciphertext.length; i3 += 16) {\n copyArray(ciphertext, block, 0, i3, i3 + 16);\n block = this._aes.decrypt(block);\n copyArray(block, plaintext, i3);\n }\n return plaintext;\n };\n var ModeOfOperationCBC = function(key, iv) {\n if (!(this instanceof ModeOfOperationCBC)) {\n throw Error(\"AES must be instanitated with `new`\");\n }\n this.description = \"Cipher Block Chaining\";\n this.name = \"cbc\";\n if (!iv) {\n iv = createArray(16);\n } else if (iv.length != 16) {\n throw new Error(\"invalid initialation vector size (must be 16 bytes)\");\n }\n this._lastCipherblock = coerceArray(iv, true);\n this._aes = new AES(key);\n };\n ModeOfOperationCBC.prototype.encrypt = function(plaintext) {\n plaintext = coerceArray(plaintext);\n if (plaintext.length % 16 !== 0) {\n throw new Error(\"invalid plaintext size (must be multiple of 16 bytes)\");\n }\n var ciphertext = createArray(plaintext.length);\n var block = createArray(16);\n for (var i3 = 0; i3 < plaintext.length; i3 += 16) {\n copyArray(plaintext, block, 0, i3, i3 + 16);\n for (var j2 = 0; j2 < 16; j2++) {\n block[j2] ^= this._lastCipherblock[j2];\n }\n this._lastCipherblock = this._aes.encrypt(block);\n copyArray(this._lastCipherblock, ciphertext, i3);\n }\n return ciphertext;\n };\n ModeOfOperationCBC.prototype.decrypt = function(ciphertext) {\n ciphertext = coerceArray(ciphertext);\n if (ciphertext.length % 16 !== 0) {\n throw new Error(\"invalid ciphertext size (must be multiple of 16 bytes)\");\n }\n var plaintext = createArray(ciphertext.length);\n var block = createArray(16);\n for (var i3 = 0; i3 < ciphertext.length; i3 += 16) {\n copyArray(ciphertext, block, 0, i3, i3 + 16);\n block = this._aes.decrypt(block);\n for (var j2 = 0; j2 < 16; j2++) {\n plaintext[i3 + j2] = block[j2] ^ this._lastCipherblock[j2];\n }\n copyArray(ciphertext, this._lastCipherblock, 0, i3, i3 + 16);\n }\n return plaintext;\n };\n var ModeOfOperationCFB = function(key, iv, segmentSize) {\n if (!(this instanceof ModeOfOperationCFB)) {\n throw Error(\"AES must be instanitated with `new`\");\n }\n this.description = \"Cipher Feedback\";\n this.name = \"cfb\";\n if (!iv) {\n iv = createArray(16);\n } else if (iv.length != 16) {\n throw new Error(\"invalid initialation vector size (must be 16 size)\");\n }\n if (!segmentSize) {\n segmentSize = 1;\n }\n this.segmentSize = segmentSize;\n this._shiftRegister = coerceArray(iv, true);\n this._aes = new AES(key);\n };\n ModeOfOperationCFB.prototype.encrypt = function(plaintext) {\n if (plaintext.length % this.segmentSize != 0) {\n throw new Error(\"invalid plaintext size (must be segmentSize bytes)\");\n }\n var encrypted = coerceArray(plaintext, true);\n var xorSegment;\n for (var i3 = 0; i3 < encrypted.length; i3 += this.segmentSize) {\n xorSegment = this._aes.encrypt(this._shiftRegister);\n for (var j2 = 0; j2 < this.segmentSize; j2++) {\n encrypted[i3 + j2] ^= xorSegment[j2];\n }\n copyArray(this._shiftRegister, this._shiftRegister, 0, this.segmentSize);\n copyArray(encrypted, this._shiftRegister, 16 - this.segmentSize, i3, i3 + this.segmentSize);\n }\n return encrypted;\n };\n ModeOfOperationCFB.prototype.decrypt = function(ciphertext) {\n if (ciphertext.length % this.segmentSize != 0) {\n throw new Error(\"invalid ciphertext size (must be segmentSize bytes)\");\n }\n var plaintext = coerceArray(ciphertext, true);\n var xorSegment;\n for (var i3 = 0; i3 < plaintext.length; i3 += this.segmentSize) {\n xorSegment = this._aes.encrypt(this._shiftRegister);\n for (var j2 = 0; j2 < this.segmentSize; j2++) {\n plaintext[i3 + j2] ^= xorSegment[j2];\n }\n copyArray(this._shiftRegister, this._shiftRegister, 0, this.segmentSize);\n copyArray(ciphertext, this._shiftRegister, 16 - this.segmentSize, i3, i3 + this.segmentSize);\n }\n return plaintext;\n };\n var ModeOfOperationOFB = function(key, iv) {\n if (!(this instanceof ModeOfOperationOFB)) {\n throw Error(\"AES must be instanitated with `new`\");\n }\n this.description = \"Output Feedback\";\n this.name = \"ofb\";\n if (!iv) {\n iv = createArray(16);\n } else if (iv.length != 16) {\n throw new Error(\"invalid initialation vector size (must be 16 bytes)\");\n }\n this._lastPrecipher = coerceArray(iv, true);\n this._lastPrecipherIndex = 16;\n this._aes = new AES(key);\n };\n ModeOfOperationOFB.prototype.encrypt = function(plaintext) {\n var encrypted = coerceArray(plaintext, true);\n for (var i3 = 0; i3 < encrypted.length; i3++) {\n if (this._lastPrecipherIndex === 16) {\n this._lastPrecipher = this._aes.encrypt(this._lastPrecipher);\n this._lastPrecipherIndex = 0;\n }\n encrypted[i3] ^= this._lastPrecipher[this._lastPrecipherIndex++];\n }\n return encrypted;\n };\n ModeOfOperationOFB.prototype.decrypt = ModeOfOperationOFB.prototype.encrypt;\n var Counter = function(initialValue) {\n if (!(this instanceof Counter)) {\n throw Error(\"Counter must be instanitated with `new`\");\n }\n if (initialValue !== 0 && !initialValue) {\n initialValue = 1;\n }\n if (typeof initialValue === \"number\") {\n this._counter = createArray(16);\n this.setValue(initialValue);\n } else {\n this.setBytes(initialValue);\n }\n };\n Counter.prototype.setValue = function(value) {\n if (typeof value !== \"number\" || parseInt(value) != value) {\n throw new Error(\"invalid counter value (must be an integer)\");\n }\n for (var index2 = 15; index2 >= 0; --index2) {\n this._counter[index2] = value % 256;\n value = value >> 8;\n }\n };\n Counter.prototype.setBytes = function(bytes) {\n bytes = coerceArray(bytes, true);\n if (bytes.length != 16) {\n throw new Error(\"invalid counter bytes size (must be 16 bytes)\");\n }\n this._counter = bytes;\n };\n Counter.prototype.increment = function() {\n for (var i3 = 15; i3 >= 0; i3--) {\n if (this._counter[i3] === 255) {\n this._counter[i3] = 0;\n } else {\n this._counter[i3]++;\n break;\n }\n }\n };\n var ModeOfOperationCTR = function(key, counter) {\n if (!(this instanceof ModeOfOperationCTR)) {\n throw Error(\"AES must be instanitated with `new`\");\n }\n this.description = \"Counter\";\n this.name = \"ctr\";\n if (!(counter instanceof Counter)) {\n counter = new Counter(counter);\n }\n this._counter = counter;\n this._remainingCounter = null;\n this._remainingCounterIndex = 16;\n this._aes = new AES(key);\n };\n ModeOfOperationCTR.prototype.encrypt = function(plaintext) {\n var encrypted = coerceArray(plaintext, true);\n for (var i3 = 0; i3 < encrypted.length; i3++) {\n if (this._remainingCounterIndex === 16) {\n this._remainingCounter = this._aes.encrypt(this._counter._counter);\n this._remainingCounterIndex = 0;\n this._counter.increment();\n }\n encrypted[i3] ^= this._remainingCounter[this._remainingCounterIndex++];\n }\n return encrypted;\n };\n ModeOfOperationCTR.prototype.decrypt = ModeOfOperationCTR.prototype.encrypt;\n function pkcs7pad(data) {\n data = coerceArray(data, true);\n var padder = 16 - data.length % 16;\n var result = createArray(data.length + padder);\n copyArray(data, result);\n for (var i3 = data.length; i3 < result.length; i3++) {\n result[i3] = padder;\n }\n return result;\n }\n function pkcs7strip(data) {\n data = coerceArray(data, true);\n if (data.length < 16) {\n throw new Error(\"PKCS#7 invalid length\");\n }\n var padder = data[data.length - 1];\n if (padder > 16) {\n throw new Error(\"PKCS#7 padding byte out of range\");\n }\n var length2 = data.length - padder;\n for (var i3 = 0; i3 < padder; i3++) {\n if (data[length2 + i3] !== padder) {\n throw new Error(\"PKCS#7 invalid padding byte\");\n }\n }\n var result = createArray(length2);\n copyArray(data, result, 0, 0, length2);\n return result;\n }\n var aesjs = {\n AES,\n Counter,\n ModeOfOperation: {\n ecb: ModeOfOperationECB,\n cbc: ModeOfOperationCBC,\n cfb: ModeOfOperationCFB,\n ofb: ModeOfOperationOFB,\n ctr: ModeOfOperationCTR\n },\n utils: {\n hex: convertHex,\n utf8: convertUtf8\n },\n padding: {\n pkcs7: {\n pad: pkcs7pad,\n strip: pkcs7strip\n }\n },\n _arrayTest: {\n coerceArray,\n createArray,\n copyArray\n }\n };\n if (typeof exports3 !== \"undefined\") {\n module.exports = aesjs;\n } else if (typeof define === \"function\" && define.amd) {\n define(aesjs);\n } else {\n if (root.aesjs) {\n aesjs._aesjs = root.aesjs;\n }\n root.aesjs = aesjs;\n }\n })(exports3);\n }\n });\n\n // ../../../node_modules/.pnpm/@ethersproject+json-wallets@5.8.0/node_modules/@ethersproject/json-wallets/lib/_version.js\n var require_version19 = __commonJS({\n \"../../../node_modules/.pnpm/@ethersproject+json-wallets@5.8.0/node_modules/@ethersproject/json-wallets/lib/_version.js\"(exports3) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n Object.defineProperty(exports3, \"__esModule\", { value: true });\n exports3.version = void 0;\n exports3.version = \"json-wallets/5.8.0\";\n }\n });\n\n // ../../../node_modules/.pnpm/@ethersproject+json-wallets@5.8.0/node_modules/@ethersproject/json-wallets/lib/utils.js\n var require_utils5 = __commonJS({\n \"../../../node_modules/.pnpm/@ethersproject+json-wallets@5.8.0/node_modules/@ethersproject/json-wallets/lib/utils.js\"(exports3) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n Object.defineProperty(exports3, \"__esModule\", { value: true });\n exports3.uuidV4 = exports3.searchPath = exports3.getPassword = exports3.zpad = exports3.looseArrayify = void 0;\n var bytes_1 = require_lib2();\n var strings_1 = require_lib9();\n function looseArrayify(hexString) {\n if (typeof hexString === \"string\" && hexString.substring(0, 2) !== \"0x\") {\n hexString = \"0x\" + hexString;\n }\n return (0, bytes_1.arrayify)(hexString);\n }\n exports3.looseArrayify = looseArrayify;\n function zpad(value, length2) {\n value = String(value);\n while (value.length < length2) {\n value = \"0\" + value;\n }\n return value;\n }\n exports3.zpad = zpad;\n function getPassword(password) {\n if (typeof password === \"string\") {\n return (0, strings_1.toUtf8Bytes)(password, strings_1.UnicodeNormalizationForm.NFKC);\n }\n return (0, bytes_1.arrayify)(password);\n }\n exports3.getPassword = getPassword;\n function searchPath(object2, path) {\n var currentChild = object2;\n var comps = path.toLowerCase().split(\"/\");\n for (var i3 = 0; i3 < comps.length; i3++) {\n var matchingChild = null;\n for (var key in currentChild) {\n if (key.toLowerCase() === comps[i3]) {\n matchingChild = currentChild[key];\n break;\n }\n }\n if (matchingChild === null) {\n return null;\n }\n currentChild = matchingChild;\n }\n return currentChild;\n }\n exports3.searchPath = searchPath;\n function uuidV4(randomBytes2) {\n var bytes = (0, bytes_1.arrayify)(randomBytes2);\n bytes[6] = bytes[6] & 15 | 64;\n bytes[8] = bytes[8] & 63 | 128;\n var value = (0, bytes_1.hexlify)(bytes);\n return [\n value.substring(2, 10),\n value.substring(10, 14),\n value.substring(14, 18),\n value.substring(18, 22),\n value.substring(22, 34)\n ].join(\"-\");\n }\n exports3.uuidV4 = uuidV4;\n }\n });\n\n // ../../../node_modules/.pnpm/@ethersproject+json-wallets@5.8.0/node_modules/@ethersproject/json-wallets/lib/crowdsale.js\n var require_crowdsale = __commonJS({\n \"../../../node_modules/.pnpm/@ethersproject+json-wallets@5.8.0/node_modules/@ethersproject/json-wallets/lib/crowdsale.js\"(exports3) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n var __extends3 = exports3 && exports3.__extends || /* @__PURE__ */ function() {\n var extendStatics3 = function(d5, b4) {\n extendStatics3 = Object.setPrototypeOf || { __proto__: [] } instanceof Array && function(d6, b5) {\n d6.__proto__ = b5;\n } || function(d6, b5) {\n for (var p4 in b5)\n if (Object.prototype.hasOwnProperty.call(b5, p4))\n d6[p4] = b5[p4];\n };\n return extendStatics3(d5, b4);\n };\n return function(d5, b4) {\n if (typeof b4 !== \"function\" && b4 !== null)\n throw new TypeError(\"Class extends value \" + String(b4) + \" is not a constructor or null\");\n extendStatics3(d5, b4);\n function __() {\n this.constructor = d5;\n }\n d5.prototype = b4 === null ? Object.create(b4) : (__.prototype = b4.prototype, new __());\n };\n }();\n var __importDefault3 = exports3 && exports3.__importDefault || function(mod3) {\n return mod3 && mod3.__esModule ? mod3 : { \"default\": mod3 };\n };\n Object.defineProperty(exports3, \"__esModule\", { value: true });\n exports3.decrypt = exports3.CrowdsaleAccount = void 0;\n var aes_js_1 = __importDefault3(require_aes_js());\n var address_1 = require_lib7();\n var bytes_1 = require_lib2();\n var keccak256_1 = require_lib5();\n var pbkdf2_1 = require_lib21();\n var strings_1 = require_lib9();\n var properties_1 = require_lib4();\n var logger_1 = require_lib();\n var _version_1 = require_version19();\n var logger = new logger_1.Logger(_version_1.version);\n var utils_1 = require_utils5();\n var CrowdsaleAccount = (\n /** @class */\n function(_super) {\n __extends3(CrowdsaleAccount2, _super);\n function CrowdsaleAccount2() {\n return _super !== null && _super.apply(this, arguments) || this;\n }\n CrowdsaleAccount2.prototype.isCrowdsaleAccount = function(value) {\n return !!(value && value._isCrowdsaleAccount);\n };\n return CrowdsaleAccount2;\n }(properties_1.Description)\n );\n exports3.CrowdsaleAccount = CrowdsaleAccount;\n function decrypt(json, password) {\n var data = JSON.parse(json);\n password = (0, utils_1.getPassword)(password);\n var ethaddr = (0, address_1.getAddress)((0, utils_1.searchPath)(data, \"ethaddr\"));\n var encseed = (0, utils_1.looseArrayify)((0, utils_1.searchPath)(data, \"encseed\"));\n if (!encseed || encseed.length % 16 !== 0) {\n logger.throwArgumentError(\"invalid encseed\", \"json\", json);\n }\n var key = (0, bytes_1.arrayify)((0, pbkdf2_1.pbkdf2)(password, password, 2e3, 32, \"sha256\")).slice(0, 16);\n var iv = encseed.slice(0, 16);\n var encryptedSeed = encseed.slice(16);\n var aesCbc = new aes_js_1.default.ModeOfOperation.cbc(key, iv);\n var seed = aes_js_1.default.padding.pkcs7.strip((0, bytes_1.arrayify)(aesCbc.decrypt(encryptedSeed)));\n var seedHex = \"\";\n for (var i3 = 0; i3 < seed.length; i3++) {\n seedHex += String.fromCharCode(seed[i3]);\n }\n var seedHexBytes = (0, strings_1.toUtf8Bytes)(seedHex);\n var privateKey = (0, keccak256_1.keccak256)(seedHexBytes);\n return new CrowdsaleAccount({\n _isCrowdsaleAccount: true,\n address: ethaddr,\n privateKey\n });\n }\n exports3.decrypt = decrypt;\n }\n });\n\n // ../../../node_modules/.pnpm/@ethersproject+json-wallets@5.8.0/node_modules/@ethersproject/json-wallets/lib/inspect.js\n var require_inspect = __commonJS({\n \"../../../node_modules/.pnpm/@ethersproject+json-wallets@5.8.0/node_modules/@ethersproject/json-wallets/lib/inspect.js\"(exports3) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n Object.defineProperty(exports3, \"__esModule\", { value: true });\n exports3.getJsonWalletAddress = exports3.isKeystoreWallet = exports3.isCrowdsaleWallet = void 0;\n var address_1 = require_lib7();\n function isCrowdsaleWallet(json) {\n var data = null;\n try {\n data = JSON.parse(json);\n } catch (error) {\n return false;\n }\n return data.encseed && data.ethaddr;\n }\n exports3.isCrowdsaleWallet = isCrowdsaleWallet;\n function isKeystoreWallet(json) {\n var data = null;\n try {\n data = JSON.parse(json);\n } catch (error) {\n return false;\n }\n if (!data.version || parseInt(data.version) !== data.version || parseInt(data.version) !== 3) {\n return false;\n }\n return true;\n }\n exports3.isKeystoreWallet = isKeystoreWallet;\n function getJsonWalletAddress(json) {\n if (isCrowdsaleWallet(json)) {\n try {\n return (0, address_1.getAddress)(JSON.parse(json).ethaddr);\n } catch (error) {\n return null;\n }\n }\n if (isKeystoreWallet(json)) {\n try {\n return (0, address_1.getAddress)(JSON.parse(json).address);\n } catch (error) {\n return null;\n }\n }\n return null;\n }\n exports3.getJsonWalletAddress = getJsonWalletAddress;\n }\n });\n\n // ../../../node_modules/.pnpm/scrypt-js@3.0.1/node_modules/scrypt-js/scrypt.js\n var require_scrypt = __commonJS({\n \"../../../node_modules/.pnpm/scrypt-js@3.0.1/node_modules/scrypt-js/scrypt.js\"(exports3, module) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n (function(root) {\n const MAX_VALUE = 2147483647;\n function SHA2562(m2) {\n const K2 = new Uint32Array([\n 1116352408,\n 1899447441,\n 3049323471,\n 3921009573,\n 961987163,\n 1508970993,\n 2453635748,\n 2870763221,\n 3624381080,\n 310598401,\n 607225278,\n 1426881987,\n 1925078388,\n 2162078206,\n 2614888103,\n 3248222580,\n 3835390401,\n 4022224774,\n 264347078,\n 604807628,\n 770255983,\n 1249150122,\n 1555081692,\n 1996064986,\n 2554220882,\n 2821834349,\n 2952996808,\n 3210313671,\n 3336571891,\n 3584528711,\n 113926993,\n 338241895,\n 666307205,\n 773529912,\n 1294757372,\n 1396182291,\n 1695183700,\n 1986661051,\n 2177026350,\n 2456956037,\n 2730485921,\n 2820302411,\n 3259730800,\n 3345764771,\n 3516065817,\n 3600352804,\n 4094571909,\n 275423344,\n 430227734,\n 506948616,\n 659060556,\n 883997877,\n 958139571,\n 1322822218,\n 1537002063,\n 1747873779,\n 1955562222,\n 2024104815,\n 2227730452,\n 2361852424,\n 2428436474,\n 2756734187,\n 3204031479,\n 3329325298\n ]);\n let h0 = 1779033703, h1 = 3144134277, h22 = 1013904242, h32 = 2773480762;\n let h4 = 1359893119, h5 = 2600822924, h6 = 528734635, h7 = 1541459225;\n const w3 = new Uint32Array(64);\n function blocks(p5) {\n let off2 = 0, len = p5.length;\n while (len >= 64) {\n let a3 = h0, b4 = h1, c4 = h22, d5 = h32, e3 = h4, f6 = h5, g4 = h6, h8 = h7, u2, i4, j2, t1, t22;\n for (i4 = 0; i4 < 16; i4++) {\n j2 = off2 + i4 * 4;\n w3[i4] = (p5[j2] & 255) << 24 | (p5[j2 + 1] & 255) << 16 | (p5[j2 + 2] & 255) << 8 | p5[j2 + 3] & 255;\n }\n for (i4 = 16; i4 < 64; i4++) {\n u2 = w3[i4 - 2];\n t1 = (u2 >>> 17 | u2 << 32 - 17) ^ (u2 >>> 19 | u2 << 32 - 19) ^ u2 >>> 10;\n u2 = w3[i4 - 15];\n t22 = (u2 >>> 7 | u2 << 32 - 7) ^ (u2 >>> 18 | u2 << 32 - 18) ^ u2 >>> 3;\n w3[i4] = (t1 + w3[i4 - 7] | 0) + (t22 + w3[i4 - 16] | 0) | 0;\n }\n for (i4 = 0; i4 < 64; i4++) {\n t1 = (((e3 >>> 6 | e3 << 32 - 6) ^ (e3 >>> 11 | e3 << 32 - 11) ^ (e3 >>> 25 | e3 << 32 - 25)) + (e3 & f6 ^ ~e3 & g4) | 0) + (h8 + (K2[i4] + w3[i4] | 0) | 0) | 0;\n t22 = ((a3 >>> 2 | a3 << 32 - 2) ^ (a3 >>> 13 | a3 << 32 - 13) ^ (a3 >>> 22 | a3 << 32 - 22)) + (a3 & b4 ^ a3 & c4 ^ b4 & c4) | 0;\n h8 = g4;\n g4 = f6;\n f6 = e3;\n e3 = d5 + t1 | 0;\n d5 = c4;\n c4 = b4;\n b4 = a3;\n a3 = t1 + t22 | 0;\n }\n h0 = h0 + a3 | 0;\n h1 = h1 + b4 | 0;\n h22 = h22 + c4 | 0;\n h32 = h32 + d5 | 0;\n h4 = h4 + e3 | 0;\n h5 = h5 + f6 | 0;\n h6 = h6 + g4 | 0;\n h7 = h7 + h8 | 0;\n off2 += 64;\n len -= 64;\n }\n }\n blocks(m2);\n let i3, bytesLeft = m2.length % 64, bitLenHi = m2.length / 536870912 | 0, bitLenLo = m2.length << 3, numZeros = bytesLeft < 56 ? 56 : 120, p4 = m2.slice(m2.length - bytesLeft, m2.length);\n p4.push(128);\n for (i3 = bytesLeft + 1; i3 < numZeros; i3++) {\n p4.push(0);\n }\n p4.push(bitLenHi >>> 24 & 255);\n p4.push(bitLenHi >>> 16 & 255);\n p4.push(bitLenHi >>> 8 & 255);\n p4.push(bitLenHi >>> 0 & 255);\n p4.push(bitLenLo >>> 24 & 255);\n p4.push(bitLenLo >>> 16 & 255);\n p4.push(bitLenLo >>> 8 & 255);\n p4.push(bitLenLo >>> 0 & 255);\n blocks(p4);\n return [\n h0 >>> 24 & 255,\n h0 >>> 16 & 255,\n h0 >>> 8 & 255,\n h0 >>> 0 & 255,\n h1 >>> 24 & 255,\n h1 >>> 16 & 255,\n h1 >>> 8 & 255,\n h1 >>> 0 & 255,\n h22 >>> 24 & 255,\n h22 >>> 16 & 255,\n h22 >>> 8 & 255,\n h22 >>> 0 & 255,\n h32 >>> 24 & 255,\n h32 >>> 16 & 255,\n h32 >>> 8 & 255,\n h32 >>> 0 & 255,\n h4 >>> 24 & 255,\n h4 >>> 16 & 255,\n h4 >>> 8 & 255,\n h4 >>> 0 & 255,\n h5 >>> 24 & 255,\n h5 >>> 16 & 255,\n h5 >>> 8 & 255,\n h5 >>> 0 & 255,\n h6 >>> 24 & 255,\n h6 >>> 16 & 255,\n h6 >>> 8 & 255,\n h6 >>> 0 & 255,\n h7 >>> 24 & 255,\n h7 >>> 16 & 255,\n h7 >>> 8 & 255,\n h7 >>> 0 & 255\n ];\n }\n function PBKDF2_HMAC_SHA256_OneIter(password, salt, dkLen) {\n password = password.length <= 64 ? password : SHA2562(password);\n const innerLen = 64 + salt.length + 4;\n const inner = new Array(innerLen);\n const outerKey = new Array(64);\n let i3;\n let dk = [];\n for (i3 = 0; i3 < 64; i3++) {\n inner[i3] = 54;\n }\n for (i3 = 0; i3 < password.length; i3++) {\n inner[i3] ^= password[i3];\n }\n for (i3 = 0; i3 < salt.length; i3++) {\n inner[64 + i3] = salt[i3];\n }\n for (i3 = innerLen - 4; i3 < innerLen; i3++) {\n inner[i3] = 0;\n }\n for (i3 = 0; i3 < 64; i3++)\n outerKey[i3] = 92;\n for (i3 = 0; i3 < password.length; i3++)\n outerKey[i3] ^= password[i3];\n function incrementCounter() {\n for (let i4 = innerLen - 1; i4 >= innerLen - 4; i4--) {\n inner[i4]++;\n if (inner[i4] <= 255)\n return;\n inner[i4] = 0;\n }\n }\n while (dkLen >= 32) {\n incrementCounter();\n dk = dk.concat(SHA2562(outerKey.concat(SHA2562(inner))));\n dkLen -= 32;\n }\n if (dkLen > 0) {\n incrementCounter();\n dk = dk.concat(SHA2562(outerKey.concat(SHA2562(inner))).slice(0, dkLen));\n }\n return dk;\n }\n function blockmix_salsa8(BY, Yi, r2, x4, _X) {\n let i3;\n arraycopy(BY, (2 * r2 - 1) * 16, _X, 0, 16);\n for (i3 = 0; i3 < 2 * r2; i3++) {\n blockxor(BY, i3 * 16, _X, 16);\n salsa20_8(_X, x4);\n arraycopy(_X, 0, BY, Yi + i3 * 16, 16);\n }\n for (i3 = 0; i3 < r2; i3++) {\n arraycopy(BY, Yi + i3 * 2 * 16, BY, i3 * 16, 16);\n }\n for (i3 = 0; i3 < r2; i3++) {\n arraycopy(BY, Yi + (i3 * 2 + 1) * 16, BY, (i3 + r2) * 16, 16);\n }\n }\n function R3(a3, b4) {\n return a3 << b4 | a3 >>> 32 - b4;\n }\n function salsa20_8(B2, x4) {\n arraycopy(B2, 0, x4, 0, 16);\n for (let i3 = 8; i3 > 0; i3 -= 2) {\n x4[4] ^= R3(x4[0] + x4[12], 7);\n x4[8] ^= R3(x4[4] + x4[0], 9);\n x4[12] ^= R3(x4[8] + x4[4], 13);\n x4[0] ^= R3(x4[12] + x4[8], 18);\n x4[9] ^= R3(x4[5] + x4[1], 7);\n x4[13] ^= R3(x4[9] + x4[5], 9);\n x4[1] ^= R3(x4[13] + x4[9], 13);\n x4[5] ^= R3(x4[1] + x4[13], 18);\n x4[14] ^= R3(x4[10] + x4[6], 7);\n x4[2] ^= R3(x4[14] + x4[10], 9);\n x4[6] ^= R3(x4[2] + x4[14], 13);\n x4[10] ^= R3(x4[6] + x4[2], 18);\n x4[3] ^= R3(x4[15] + x4[11], 7);\n x4[7] ^= R3(x4[3] + x4[15], 9);\n x4[11] ^= R3(x4[7] + x4[3], 13);\n x4[15] ^= R3(x4[11] + x4[7], 18);\n x4[1] ^= R3(x4[0] + x4[3], 7);\n x4[2] ^= R3(x4[1] + x4[0], 9);\n x4[3] ^= R3(x4[2] + x4[1], 13);\n x4[0] ^= R3(x4[3] + x4[2], 18);\n x4[6] ^= R3(x4[5] + x4[4], 7);\n x4[7] ^= R3(x4[6] + x4[5], 9);\n x4[4] ^= R3(x4[7] + x4[6], 13);\n x4[5] ^= R3(x4[4] + x4[7], 18);\n x4[11] ^= R3(x4[10] + x4[9], 7);\n x4[8] ^= R3(x4[11] + x4[10], 9);\n x4[9] ^= R3(x4[8] + x4[11], 13);\n x4[10] ^= R3(x4[9] + x4[8], 18);\n x4[12] ^= R3(x4[15] + x4[14], 7);\n x4[13] ^= R3(x4[12] + x4[15], 9);\n x4[14] ^= R3(x4[13] + x4[12], 13);\n x4[15] ^= R3(x4[14] + x4[13], 18);\n }\n for (let i3 = 0; i3 < 16; ++i3) {\n B2[i3] += x4[i3];\n }\n }\n function blockxor(S3, Si, D2, len) {\n for (let i3 = 0; i3 < len; i3++) {\n D2[i3] ^= S3[Si + i3];\n }\n }\n function arraycopy(src, srcPos, dest, destPos, length2) {\n while (length2--) {\n dest[destPos++] = src[srcPos++];\n }\n }\n function checkBufferish(o5) {\n if (!o5 || typeof o5.length !== \"number\") {\n return false;\n }\n for (let i3 = 0; i3 < o5.length; i3++) {\n const v2 = o5[i3];\n if (typeof v2 !== \"number\" || v2 % 1 || v2 < 0 || v2 >= 256) {\n return false;\n }\n }\n return true;\n }\n function ensureInteger(value, name) {\n if (typeof value !== \"number\" || value % 1) {\n throw new Error(\"invalid \" + name);\n }\n return value;\n }\n function _scrypt(password, salt, N4, r2, p4, dkLen, callback) {\n N4 = ensureInteger(N4, \"N\");\n r2 = ensureInteger(r2, \"r\");\n p4 = ensureInteger(p4, \"p\");\n dkLen = ensureInteger(dkLen, \"dkLen\");\n if (N4 === 0 || (N4 & N4 - 1) !== 0) {\n throw new Error(\"N must be power of 2\");\n }\n if (N4 > MAX_VALUE / 128 / r2) {\n throw new Error(\"N too large\");\n }\n if (r2 > MAX_VALUE / 128 / p4) {\n throw new Error(\"r too large\");\n }\n if (!checkBufferish(password)) {\n throw new Error(\"password must be an array or buffer\");\n }\n password = Array.prototype.slice.call(password);\n if (!checkBufferish(salt)) {\n throw new Error(\"salt must be an array or buffer\");\n }\n salt = Array.prototype.slice.call(salt);\n let b4 = PBKDF2_HMAC_SHA256_OneIter(password, salt, p4 * 128 * r2);\n const B2 = new Uint32Array(p4 * 32 * r2);\n for (let i3 = 0; i3 < B2.length; i3++) {\n const j2 = i3 * 4;\n B2[i3] = (b4[j2 + 3] & 255) << 24 | (b4[j2 + 2] & 255) << 16 | (b4[j2 + 1] & 255) << 8 | (b4[j2 + 0] & 255) << 0;\n }\n const XY = new Uint32Array(64 * r2);\n const V2 = new Uint32Array(32 * r2 * N4);\n const Yi = 32 * r2;\n const x4 = new Uint32Array(16);\n const _X = new Uint32Array(16);\n const totalOps = p4 * N4 * 2;\n let currentOp = 0;\n let lastPercent10 = null;\n let stop = false;\n let state = 0;\n let i0 = 0, i1;\n let Bi;\n const limit = callback ? parseInt(1e3 / r2) : 4294967295;\n const nextTick2 = typeof setImmediate !== \"undefined\" ? setImmediate : setTimeout;\n const incrementalSMix = function() {\n if (stop) {\n return callback(new Error(\"cancelled\"), currentOp / totalOps);\n }\n let steps;\n switch (state) {\n case 0:\n Bi = i0 * 32 * r2;\n arraycopy(B2, Bi, XY, 0, Yi);\n state = 1;\n i1 = 0;\n case 1:\n steps = N4 - i1;\n if (steps > limit) {\n steps = limit;\n }\n for (let i3 = 0; i3 < steps; i3++) {\n arraycopy(XY, 0, V2, (i1 + i3) * Yi, Yi);\n blockmix_salsa8(XY, Yi, r2, x4, _X);\n }\n i1 += steps;\n currentOp += steps;\n if (callback) {\n const percent10 = parseInt(1e3 * currentOp / totalOps);\n if (percent10 !== lastPercent10) {\n stop = callback(null, currentOp / totalOps);\n if (stop) {\n break;\n }\n lastPercent10 = percent10;\n }\n }\n if (i1 < N4) {\n break;\n }\n i1 = 0;\n state = 2;\n case 2:\n steps = N4 - i1;\n if (steps > limit) {\n steps = limit;\n }\n for (let i3 = 0; i3 < steps; i3++) {\n const offset = (2 * r2 - 1) * 16;\n const j2 = XY[offset] & N4 - 1;\n blockxor(V2, j2 * Yi, XY, Yi);\n blockmix_salsa8(XY, Yi, r2, x4, _X);\n }\n i1 += steps;\n currentOp += steps;\n if (callback) {\n const percent10 = parseInt(1e3 * currentOp / totalOps);\n if (percent10 !== lastPercent10) {\n stop = callback(null, currentOp / totalOps);\n if (stop) {\n break;\n }\n lastPercent10 = percent10;\n }\n }\n if (i1 < N4) {\n break;\n }\n arraycopy(XY, 0, B2, Bi, Yi);\n i0++;\n if (i0 < p4) {\n state = 0;\n break;\n }\n b4 = [];\n for (let i3 = 0; i3 < B2.length; i3++) {\n b4.push(B2[i3] >> 0 & 255);\n b4.push(B2[i3] >> 8 & 255);\n b4.push(B2[i3] >> 16 & 255);\n b4.push(B2[i3] >> 24 & 255);\n }\n const derivedKey = PBKDF2_HMAC_SHA256_OneIter(password, b4, dkLen);\n if (callback) {\n callback(null, 1, derivedKey);\n }\n return derivedKey;\n }\n if (callback) {\n nextTick2(incrementalSMix);\n }\n };\n if (!callback) {\n while (true) {\n const derivedKey = incrementalSMix();\n if (derivedKey != void 0) {\n return derivedKey;\n }\n }\n }\n incrementalSMix();\n }\n const lib = {\n scrypt: function(password, salt, N4, r2, p4, dkLen, progressCallback) {\n return new Promise(function(resolve, reject) {\n let lastProgress = 0;\n if (progressCallback) {\n progressCallback(0);\n }\n _scrypt(password, salt, N4, r2, p4, dkLen, function(error, progress, key) {\n if (error) {\n reject(error);\n } else if (key) {\n if (progressCallback && lastProgress !== 1) {\n progressCallback(1);\n }\n resolve(new Uint8Array(key));\n } else if (progressCallback && progress !== lastProgress) {\n lastProgress = progress;\n return progressCallback(progress);\n }\n });\n });\n },\n syncScrypt: function(password, salt, N4, r2, p4, dkLen) {\n return new Uint8Array(_scrypt(password, salt, N4, r2, p4, dkLen));\n }\n };\n if (typeof exports3 !== \"undefined\") {\n module.exports = lib;\n } else if (typeof define === \"function\" && define.amd) {\n define(lib);\n } else if (root) {\n if (root.scrypt) {\n root._scrypt = root.scrypt;\n }\n root.scrypt = lib;\n }\n })(exports3);\n }\n });\n\n // ../../../node_modules/.pnpm/@ethersproject+json-wallets@5.8.0/node_modules/@ethersproject/json-wallets/lib/keystore.js\n var require_keystore = __commonJS({\n \"../../../node_modules/.pnpm/@ethersproject+json-wallets@5.8.0/node_modules/@ethersproject/json-wallets/lib/keystore.js\"(exports3) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n var __extends3 = exports3 && exports3.__extends || /* @__PURE__ */ function() {\n var extendStatics3 = function(d5, b4) {\n extendStatics3 = Object.setPrototypeOf || { __proto__: [] } instanceof Array && function(d6, b5) {\n d6.__proto__ = b5;\n } || function(d6, b5) {\n for (var p4 in b5)\n if (Object.prototype.hasOwnProperty.call(b5, p4))\n d6[p4] = b5[p4];\n };\n return extendStatics3(d5, b4);\n };\n return function(d5, b4) {\n if (typeof b4 !== \"function\" && b4 !== null)\n throw new TypeError(\"Class extends value \" + String(b4) + \" is not a constructor or null\");\n extendStatics3(d5, b4);\n function __() {\n this.constructor = d5;\n }\n d5.prototype = b4 === null ? Object.create(b4) : (__.prototype = b4.prototype, new __());\n };\n }();\n var __awaiter3 = exports3 && exports3.__awaiter || function(thisArg, _arguments, P2, generator) {\n function adopt(value) {\n return value instanceof P2 ? value : new P2(function(resolve) {\n resolve(value);\n });\n }\n return new (P2 || (P2 = Promise))(function(resolve, reject) {\n function fulfilled(value) {\n try {\n step(generator.next(value));\n } catch (e3) {\n reject(e3);\n }\n }\n function rejected(value) {\n try {\n step(generator[\"throw\"](value));\n } catch (e3) {\n reject(e3);\n }\n }\n function step(result) {\n result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected);\n }\n step((generator = generator.apply(thisArg, _arguments || [])).next());\n });\n };\n var __generator3 = exports3 && exports3.__generator || function(thisArg, body) {\n var _2 = { label: 0, sent: function() {\n if (t3[0] & 1)\n throw t3[1];\n return t3[1];\n }, trys: [], ops: [] }, f6, y6, t3, g4;\n return g4 = { next: verb(0), \"throw\": verb(1), \"return\": verb(2) }, typeof Symbol === \"function\" && (g4[Symbol.iterator] = function() {\n return this;\n }), g4;\n function verb(n2) {\n return function(v2) {\n return step([n2, v2]);\n };\n }\n function step(op) {\n if (f6)\n throw new TypeError(\"Generator is already executing.\");\n while (_2)\n try {\n if (f6 = 1, y6 && (t3 = op[0] & 2 ? y6[\"return\"] : op[0] ? y6[\"throw\"] || ((t3 = y6[\"return\"]) && t3.call(y6), 0) : y6.next) && !(t3 = t3.call(y6, op[1])).done)\n return t3;\n if (y6 = 0, t3)\n op = [op[0] & 2, t3.value];\n switch (op[0]) {\n case 0:\n case 1:\n t3 = op;\n break;\n case 4:\n _2.label++;\n return { value: op[1], done: false };\n case 5:\n _2.label++;\n y6 = op[1];\n op = [0];\n continue;\n case 7:\n op = _2.ops.pop();\n _2.trys.pop();\n continue;\n default:\n if (!(t3 = _2.trys, t3 = t3.length > 0 && t3[t3.length - 1]) && (op[0] === 6 || op[0] === 2)) {\n _2 = 0;\n continue;\n }\n if (op[0] === 3 && (!t3 || op[1] > t3[0] && op[1] < t3[3])) {\n _2.label = op[1];\n break;\n }\n if (op[0] === 6 && _2.label < t3[1]) {\n _2.label = t3[1];\n t3 = op;\n break;\n }\n if (t3 && _2.label < t3[2]) {\n _2.label = t3[2];\n _2.ops.push(op);\n break;\n }\n if (t3[2])\n _2.ops.pop();\n _2.trys.pop();\n continue;\n }\n op = body.call(thisArg, _2);\n } catch (e3) {\n op = [6, e3];\n y6 = 0;\n } finally {\n f6 = t3 = 0;\n }\n if (op[0] & 5)\n throw op[1];\n return { value: op[0] ? op[1] : void 0, done: true };\n }\n };\n var __importDefault3 = exports3 && exports3.__importDefault || function(mod3) {\n return mod3 && mod3.__esModule ? mod3 : { \"default\": mod3 };\n };\n Object.defineProperty(exports3, \"__esModule\", { value: true });\n exports3.encrypt = exports3.decrypt = exports3.decryptSync = exports3.KeystoreAccount = void 0;\n var aes_js_1 = __importDefault3(require_aes_js());\n var scrypt_js_1 = __importDefault3(require_scrypt());\n var address_1 = require_lib7();\n var bytes_1 = require_lib2();\n var hdnode_1 = require_lib23();\n var keccak256_1 = require_lib5();\n var pbkdf2_1 = require_lib21();\n var random_1 = require_lib24();\n var properties_1 = require_lib4();\n var transactions_1 = require_lib17();\n var utils_1 = require_utils5();\n var logger_1 = require_lib();\n var _version_1 = require_version19();\n var logger = new logger_1.Logger(_version_1.version);\n function hasMnemonic(value) {\n return value != null && value.mnemonic && value.mnemonic.phrase;\n }\n var KeystoreAccount = (\n /** @class */\n function(_super) {\n __extends3(KeystoreAccount2, _super);\n function KeystoreAccount2() {\n return _super !== null && _super.apply(this, arguments) || this;\n }\n KeystoreAccount2.prototype.isKeystoreAccount = function(value) {\n return !!(value && value._isKeystoreAccount);\n };\n return KeystoreAccount2;\n }(properties_1.Description)\n );\n exports3.KeystoreAccount = KeystoreAccount;\n function _decrypt(data, key, ciphertext) {\n var cipher = (0, utils_1.searchPath)(data, \"crypto/cipher\");\n if (cipher === \"aes-128-ctr\") {\n var iv = (0, utils_1.looseArrayify)((0, utils_1.searchPath)(data, \"crypto/cipherparams/iv\"));\n var counter = new aes_js_1.default.Counter(iv);\n var aesCtr = new aes_js_1.default.ModeOfOperation.ctr(key, counter);\n return (0, bytes_1.arrayify)(aesCtr.decrypt(ciphertext));\n }\n return null;\n }\n function _getAccount(data, key) {\n var ciphertext = (0, utils_1.looseArrayify)((0, utils_1.searchPath)(data, \"crypto/ciphertext\"));\n var computedMAC = (0, bytes_1.hexlify)((0, keccak256_1.keccak256)((0, bytes_1.concat)([key.slice(16, 32), ciphertext]))).substring(2);\n if (computedMAC !== (0, utils_1.searchPath)(data, \"crypto/mac\").toLowerCase()) {\n throw new Error(\"invalid password\");\n }\n var privateKey = _decrypt(data, key.slice(0, 16), ciphertext);\n if (!privateKey) {\n logger.throwError(\"unsupported cipher\", logger_1.Logger.errors.UNSUPPORTED_OPERATION, {\n operation: \"decrypt\"\n });\n }\n var mnemonicKey = key.slice(32, 64);\n var address = (0, transactions_1.computeAddress)(privateKey);\n if (data.address) {\n var check = data.address.toLowerCase();\n if (check.substring(0, 2) !== \"0x\") {\n check = \"0x\" + check;\n }\n if ((0, address_1.getAddress)(check) !== address) {\n throw new Error(\"address mismatch\");\n }\n }\n var account = {\n _isKeystoreAccount: true,\n address,\n privateKey: (0, bytes_1.hexlify)(privateKey)\n };\n if ((0, utils_1.searchPath)(data, \"x-ethers/version\") === \"0.1\") {\n var mnemonicCiphertext = (0, utils_1.looseArrayify)((0, utils_1.searchPath)(data, \"x-ethers/mnemonicCiphertext\"));\n var mnemonicIv = (0, utils_1.looseArrayify)((0, utils_1.searchPath)(data, \"x-ethers/mnemonicCounter\"));\n var mnemonicCounter = new aes_js_1.default.Counter(mnemonicIv);\n var mnemonicAesCtr = new aes_js_1.default.ModeOfOperation.ctr(mnemonicKey, mnemonicCounter);\n var path = (0, utils_1.searchPath)(data, \"x-ethers/path\") || hdnode_1.defaultPath;\n var locale = (0, utils_1.searchPath)(data, \"x-ethers/locale\") || \"en\";\n var entropy = (0, bytes_1.arrayify)(mnemonicAesCtr.decrypt(mnemonicCiphertext));\n try {\n var mnemonic = (0, hdnode_1.entropyToMnemonic)(entropy, locale);\n var node = hdnode_1.HDNode.fromMnemonic(mnemonic, null, locale).derivePath(path);\n if (node.privateKey != account.privateKey) {\n throw new Error(\"mnemonic mismatch\");\n }\n account.mnemonic = node.mnemonic;\n } catch (error) {\n if (error.code !== logger_1.Logger.errors.INVALID_ARGUMENT || error.argument !== \"wordlist\") {\n throw error;\n }\n }\n }\n return new KeystoreAccount(account);\n }\n function pbkdf2Sync(passwordBytes, salt, count, dkLen, prfFunc) {\n return (0, bytes_1.arrayify)((0, pbkdf2_1.pbkdf2)(passwordBytes, salt, count, dkLen, prfFunc));\n }\n function pbkdf22(passwordBytes, salt, count, dkLen, prfFunc) {\n return Promise.resolve(pbkdf2Sync(passwordBytes, salt, count, dkLen, prfFunc));\n }\n function _computeKdfKey(data, password, pbkdf2Func, scryptFunc, progressCallback) {\n var passwordBytes = (0, utils_1.getPassword)(password);\n var kdf = (0, utils_1.searchPath)(data, \"crypto/kdf\");\n if (kdf && typeof kdf === \"string\") {\n var throwError = function(name, value) {\n return logger.throwArgumentError(\"invalid key-derivation function parameters\", name, value);\n };\n if (kdf.toLowerCase() === \"scrypt\") {\n var salt = (0, utils_1.looseArrayify)((0, utils_1.searchPath)(data, \"crypto/kdfparams/salt\"));\n var N4 = parseInt((0, utils_1.searchPath)(data, \"crypto/kdfparams/n\"));\n var r2 = parseInt((0, utils_1.searchPath)(data, \"crypto/kdfparams/r\"));\n var p4 = parseInt((0, utils_1.searchPath)(data, \"crypto/kdfparams/p\"));\n if (!N4 || !r2 || !p4) {\n throwError(\"kdf\", kdf);\n }\n if ((N4 & N4 - 1) !== 0) {\n throwError(\"N\", N4);\n }\n var dkLen = parseInt((0, utils_1.searchPath)(data, \"crypto/kdfparams/dklen\"));\n if (dkLen !== 32) {\n throwError(\"dklen\", dkLen);\n }\n return scryptFunc(passwordBytes, salt, N4, r2, p4, 64, progressCallback);\n } else if (kdf.toLowerCase() === \"pbkdf2\") {\n var salt = (0, utils_1.looseArrayify)((0, utils_1.searchPath)(data, \"crypto/kdfparams/salt\"));\n var prfFunc = null;\n var prf = (0, utils_1.searchPath)(data, \"crypto/kdfparams/prf\");\n if (prf === \"hmac-sha256\") {\n prfFunc = \"sha256\";\n } else if (prf === \"hmac-sha512\") {\n prfFunc = \"sha512\";\n } else {\n throwError(\"prf\", prf);\n }\n var count = parseInt((0, utils_1.searchPath)(data, \"crypto/kdfparams/c\"));\n var dkLen = parseInt((0, utils_1.searchPath)(data, \"crypto/kdfparams/dklen\"));\n if (dkLen !== 32) {\n throwError(\"dklen\", dkLen);\n }\n return pbkdf2Func(passwordBytes, salt, count, dkLen, prfFunc);\n }\n }\n return logger.throwArgumentError(\"unsupported key-derivation function\", \"kdf\", kdf);\n }\n function decryptSync(json, password) {\n var data = JSON.parse(json);\n var key = _computeKdfKey(data, password, pbkdf2Sync, scrypt_js_1.default.syncScrypt);\n return _getAccount(data, key);\n }\n exports3.decryptSync = decryptSync;\n function decrypt(json, password, progressCallback) {\n return __awaiter3(this, void 0, void 0, function() {\n var data, key;\n return __generator3(this, function(_a) {\n switch (_a.label) {\n case 0:\n data = JSON.parse(json);\n return [4, _computeKdfKey(data, password, pbkdf22, scrypt_js_1.default.scrypt, progressCallback)];\n case 1:\n key = _a.sent();\n return [2, _getAccount(data, key)];\n }\n });\n });\n }\n exports3.decrypt = decrypt;\n function encrypt(account, password, options, progressCallback) {\n try {\n if ((0, address_1.getAddress)(account.address) !== (0, transactions_1.computeAddress)(account.privateKey)) {\n throw new Error(\"address/privateKey mismatch\");\n }\n if (hasMnemonic(account)) {\n var mnemonic = account.mnemonic;\n var node = hdnode_1.HDNode.fromMnemonic(mnemonic.phrase, null, mnemonic.locale).derivePath(mnemonic.path || hdnode_1.defaultPath);\n if (node.privateKey != account.privateKey) {\n throw new Error(\"mnemonic mismatch\");\n }\n }\n } catch (e3) {\n return Promise.reject(e3);\n }\n if (typeof options === \"function\" && !progressCallback) {\n progressCallback = options;\n options = {};\n }\n if (!options) {\n options = {};\n }\n var privateKey = (0, bytes_1.arrayify)(account.privateKey);\n var passwordBytes = (0, utils_1.getPassword)(password);\n var entropy = null;\n var path = null;\n var locale = null;\n if (hasMnemonic(account)) {\n var srcMnemonic = account.mnemonic;\n entropy = (0, bytes_1.arrayify)((0, hdnode_1.mnemonicToEntropy)(srcMnemonic.phrase, srcMnemonic.locale || \"en\"));\n path = srcMnemonic.path || hdnode_1.defaultPath;\n locale = srcMnemonic.locale || \"en\";\n }\n var client = options.client;\n if (!client) {\n client = \"ethers.js\";\n }\n var salt = null;\n if (options.salt) {\n salt = (0, bytes_1.arrayify)(options.salt);\n } else {\n salt = (0, random_1.randomBytes)(32);\n ;\n }\n var iv = null;\n if (options.iv) {\n iv = (0, bytes_1.arrayify)(options.iv);\n if (iv.length !== 16) {\n throw new Error(\"invalid iv\");\n }\n } else {\n iv = (0, random_1.randomBytes)(16);\n }\n var uuidRandom = null;\n if (options.uuid) {\n uuidRandom = (0, bytes_1.arrayify)(options.uuid);\n if (uuidRandom.length !== 16) {\n throw new Error(\"invalid uuid\");\n }\n } else {\n uuidRandom = (0, random_1.randomBytes)(16);\n }\n var N4 = 1 << 17, r2 = 8, p4 = 1;\n if (options.scrypt) {\n if (options.scrypt.N) {\n N4 = options.scrypt.N;\n }\n if (options.scrypt.r) {\n r2 = options.scrypt.r;\n }\n if (options.scrypt.p) {\n p4 = options.scrypt.p;\n }\n }\n return scrypt_js_1.default.scrypt(passwordBytes, salt, N4, r2, p4, 64, progressCallback).then(function(key) {\n key = (0, bytes_1.arrayify)(key);\n var derivedKey = key.slice(0, 16);\n var macPrefix = key.slice(16, 32);\n var mnemonicKey = key.slice(32, 64);\n var counter = new aes_js_1.default.Counter(iv);\n var aesCtr = new aes_js_1.default.ModeOfOperation.ctr(derivedKey, counter);\n var ciphertext = (0, bytes_1.arrayify)(aesCtr.encrypt(privateKey));\n var mac = (0, keccak256_1.keccak256)((0, bytes_1.concat)([macPrefix, ciphertext]));\n var data = {\n address: account.address.substring(2).toLowerCase(),\n id: (0, utils_1.uuidV4)(uuidRandom),\n version: 3,\n crypto: {\n cipher: \"aes-128-ctr\",\n cipherparams: {\n iv: (0, bytes_1.hexlify)(iv).substring(2)\n },\n ciphertext: (0, bytes_1.hexlify)(ciphertext).substring(2),\n kdf: \"scrypt\",\n kdfparams: {\n salt: (0, bytes_1.hexlify)(salt).substring(2),\n n: N4,\n dklen: 32,\n p: p4,\n r: r2\n },\n mac: mac.substring(2)\n }\n };\n if (entropy) {\n var mnemonicIv = (0, random_1.randomBytes)(16);\n var mnemonicCounter = new aes_js_1.default.Counter(mnemonicIv);\n var mnemonicAesCtr = new aes_js_1.default.ModeOfOperation.ctr(mnemonicKey, mnemonicCounter);\n var mnemonicCiphertext = (0, bytes_1.arrayify)(mnemonicAesCtr.encrypt(entropy));\n var now = /* @__PURE__ */ new Date();\n var timestamp = now.getUTCFullYear() + \"-\" + (0, utils_1.zpad)(now.getUTCMonth() + 1, 2) + \"-\" + (0, utils_1.zpad)(now.getUTCDate(), 2) + \"T\" + (0, utils_1.zpad)(now.getUTCHours(), 2) + \"-\" + (0, utils_1.zpad)(now.getUTCMinutes(), 2) + \"-\" + (0, utils_1.zpad)(now.getUTCSeconds(), 2) + \".0Z\";\n data[\"x-ethers\"] = {\n client,\n gethFilename: \"UTC--\" + timestamp + \"--\" + data.address,\n mnemonicCounter: (0, bytes_1.hexlify)(mnemonicIv).substring(2),\n mnemonicCiphertext: (0, bytes_1.hexlify)(mnemonicCiphertext).substring(2),\n path,\n locale,\n version: \"0.1\"\n };\n }\n return JSON.stringify(data);\n });\n }\n exports3.encrypt = encrypt;\n }\n });\n\n // ../../../node_modules/.pnpm/@ethersproject+json-wallets@5.8.0/node_modules/@ethersproject/json-wallets/lib/index.js\n var require_lib25 = __commonJS({\n \"../../../node_modules/.pnpm/@ethersproject+json-wallets@5.8.0/node_modules/@ethersproject/json-wallets/lib/index.js\"(exports3) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n Object.defineProperty(exports3, \"__esModule\", { value: true });\n exports3.decryptJsonWalletSync = exports3.decryptJsonWallet = exports3.getJsonWalletAddress = exports3.isKeystoreWallet = exports3.isCrowdsaleWallet = exports3.encryptKeystore = exports3.decryptKeystoreSync = exports3.decryptKeystore = exports3.decryptCrowdsale = void 0;\n var crowdsale_1 = require_crowdsale();\n Object.defineProperty(exports3, \"decryptCrowdsale\", { enumerable: true, get: function() {\n return crowdsale_1.decrypt;\n } });\n var inspect_1 = require_inspect();\n Object.defineProperty(exports3, \"getJsonWalletAddress\", { enumerable: true, get: function() {\n return inspect_1.getJsonWalletAddress;\n } });\n Object.defineProperty(exports3, \"isCrowdsaleWallet\", { enumerable: true, get: function() {\n return inspect_1.isCrowdsaleWallet;\n } });\n Object.defineProperty(exports3, \"isKeystoreWallet\", { enumerable: true, get: function() {\n return inspect_1.isKeystoreWallet;\n } });\n var keystore_1 = require_keystore();\n Object.defineProperty(exports3, \"decryptKeystore\", { enumerable: true, get: function() {\n return keystore_1.decrypt;\n } });\n Object.defineProperty(exports3, \"decryptKeystoreSync\", { enumerable: true, get: function() {\n return keystore_1.decryptSync;\n } });\n Object.defineProperty(exports3, \"encryptKeystore\", { enumerable: true, get: function() {\n return keystore_1.encrypt;\n } });\n function decryptJsonWallet(json, password, progressCallback) {\n if ((0, inspect_1.isCrowdsaleWallet)(json)) {\n if (progressCallback) {\n progressCallback(0);\n }\n var account = (0, crowdsale_1.decrypt)(json, password);\n if (progressCallback) {\n progressCallback(1);\n }\n return Promise.resolve(account);\n }\n if ((0, inspect_1.isKeystoreWallet)(json)) {\n return (0, keystore_1.decrypt)(json, password, progressCallback);\n }\n return Promise.reject(new Error(\"invalid JSON wallet\"));\n }\n exports3.decryptJsonWallet = decryptJsonWallet;\n function decryptJsonWalletSync(json, password) {\n if ((0, inspect_1.isCrowdsaleWallet)(json)) {\n return (0, crowdsale_1.decrypt)(json, password);\n }\n if ((0, inspect_1.isKeystoreWallet)(json)) {\n return (0, keystore_1.decryptSync)(json, password);\n }\n throw new Error(\"invalid JSON wallet\");\n }\n exports3.decryptJsonWalletSync = decryptJsonWalletSync;\n }\n });\n\n // ../../../node_modules/.pnpm/@ethersproject+wallet@5.8.0/node_modules/@ethersproject/wallet/lib/_version.js\n var require_version20 = __commonJS({\n \"../../../node_modules/.pnpm/@ethersproject+wallet@5.8.0/node_modules/@ethersproject/wallet/lib/_version.js\"(exports3) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n Object.defineProperty(exports3, \"__esModule\", { value: true });\n exports3.version = void 0;\n exports3.version = \"wallet/5.8.0\";\n }\n });\n\n // ../../../node_modules/.pnpm/@ethersproject+wallet@5.8.0/node_modules/@ethersproject/wallet/lib/index.js\n var require_lib26 = __commonJS({\n \"../../../node_modules/.pnpm/@ethersproject+wallet@5.8.0/node_modules/@ethersproject/wallet/lib/index.js\"(exports3) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n var __extends3 = exports3 && exports3.__extends || /* @__PURE__ */ function() {\n var extendStatics3 = function(d5, b4) {\n extendStatics3 = Object.setPrototypeOf || { __proto__: [] } instanceof Array && function(d6, b5) {\n d6.__proto__ = b5;\n } || function(d6, b5) {\n for (var p4 in b5)\n if (Object.prototype.hasOwnProperty.call(b5, p4))\n d6[p4] = b5[p4];\n };\n return extendStatics3(d5, b4);\n };\n return function(d5, b4) {\n if (typeof b4 !== \"function\" && b4 !== null)\n throw new TypeError(\"Class extends value \" + String(b4) + \" is not a constructor or null\");\n extendStatics3(d5, b4);\n function __() {\n this.constructor = d5;\n }\n d5.prototype = b4 === null ? Object.create(b4) : (__.prototype = b4.prototype, new __());\n };\n }();\n var __awaiter3 = exports3 && exports3.__awaiter || function(thisArg, _arguments, P2, generator) {\n function adopt(value) {\n return value instanceof P2 ? value : new P2(function(resolve) {\n resolve(value);\n });\n }\n return new (P2 || (P2 = Promise))(function(resolve, reject) {\n function fulfilled(value) {\n try {\n step(generator.next(value));\n } catch (e3) {\n reject(e3);\n }\n }\n function rejected(value) {\n try {\n step(generator[\"throw\"](value));\n } catch (e3) {\n reject(e3);\n }\n }\n function step(result) {\n result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected);\n }\n step((generator = generator.apply(thisArg, _arguments || [])).next());\n });\n };\n var __generator3 = exports3 && exports3.__generator || function(thisArg, body) {\n var _2 = { label: 0, sent: function() {\n if (t3[0] & 1)\n throw t3[1];\n return t3[1];\n }, trys: [], ops: [] }, f6, y6, t3, g4;\n return g4 = { next: verb(0), \"throw\": verb(1), \"return\": verb(2) }, typeof Symbol === \"function\" && (g4[Symbol.iterator] = function() {\n return this;\n }), g4;\n function verb(n2) {\n return function(v2) {\n return step([n2, v2]);\n };\n }\n function step(op) {\n if (f6)\n throw new TypeError(\"Generator is already executing.\");\n while (_2)\n try {\n if (f6 = 1, y6 && (t3 = op[0] & 2 ? y6[\"return\"] : op[0] ? y6[\"throw\"] || ((t3 = y6[\"return\"]) && t3.call(y6), 0) : y6.next) && !(t3 = t3.call(y6, op[1])).done)\n return t3;\n if (y6 = 0, t3)\n op = [op[0] & 2, t3.value];\n switch (op[0]) {\n case 0:\n case 1:\n t3 = op;\n break;\n case 4:\n _2.label++;\n return { value: op[1], done: false };\n case 5:\n _2.label++;\n y6 = op[1];\n op = [0];\n continue;\n case 7:\n op = _2.ops.pop();\n _2.trys.pop();\n continue;\n default:\n if (!(t3 = _2.trys, t3 = t3.length > 0 && t3[t3.length - 1]) && (op[0] === 6 || op[0] === 2)) {\n _2 = 0;\n continue;\n }\n if (op[0] === 3 && (!t3 || op[1] > t3[0] && op[1] < t3[3])) {\n _2.label = op[1];\n break;\n }\n if (op[0] === 6 && _2.label < t3[1]) {\n _2.label = t3[1];\n t3 = op;\n break;\n }\n if (t3 && _2.label < t3[2]) {\n _2.label = t3[2];\n _2.ops.push(op);\n break;\n }\n if (t3[2])\n _2.ops.pop();\n _2.trys.pop();\n continue;\n }\n op = body.call(thisArg, _2);\n } catch (e3) {\n op = [6, e3];\n y6 = 0;\n } finally {\n f6 = t3 = 0;\n }\n if (op[0] & 5)\n throw op[1];\n return { value: op[0] ? op[1] : void 0, done: true };\n }\n };\n Object.defineProperty(exports3, \"__esModule\", { value: true });\n exports3.verifyTypedData = exports3.verifyMessage = exports3.Wallet = void 0;\n var address_1 = require_lib7();\n var abstract_provider_1 = require_lib14();\n var abstract_signer_1 = require_lib15();\n var bytes_1 = require_lib2();\n var hash_1 = require_lib12();\n var hdnode_1 = require_lib23();\n var keccak256_1 = require_lib5();\n var properties_1 = require_lib4();\n var random_1 = require_lib24();\n var signing_key_1 = require_lib16();\n var json_wallets_1 = require_lib25();\n var transactions_1 = require_lib17();\n var logger_1 = require_lib();\n var _version_1 = require_version20();\n var logger = new logger_1.Logger(_version_1.version);\n function isAccount(value) {\n return value != null && (0, bytes_1.isHexString)(value.privateKey, 32) && value.address != null;\n }\n function hasMnemonic(value) {\n var mnemonic = value.mnemonic;\n return mnemonic && mnemonic.phrase;\n }\n var Wallet = (\n /** @class */\n function(_super) {\n __extends3(Wallet2, _super);\n function Wallet2(privateKey, provider) {\n var _this = _super.call(this) || this;\n if (isAccount(privateKey)) {\n var signingKey_1 = new signing_key_1.SigningKey(privateKey.privateKey);\n (0, properties_1.defineReadOnly)(_this, \"_signingKey\", function() {\n return signingKey_1;\n });\n (0, properties_1.defineReadOnly)(_this, \"address\", (0, transactions_1.computeAddress)(_this.publicKey));\n if (_this.address !== (0, address_1.getAddress)(privateKey.address)) {\n logger.throwArgumentError(\"privateKey/address mismatch\", \"privateKey\", \"[REDACTED]\");\n }\n if (hasMnemonic(privateKey)) {\n var srcMnemonic_1 = privateKey.mnemonic;\n (0, properties_1.defineReadOnly)(_this, \"_mnemonic\", function() {\n return {\n phrase: srcMnemonic_1.phrase,\n path: srcMnemonic_1.path || hdnode_1.defaultPath,\n locale: srcMnemonic_1.locale || \"en\"\n };\n });\n var mnemonic = _this.mnemonic;\n var node = hdnode_1.HDNode.fromMnemonic(mnemonic.phrase, null, mnemonic.locale).derivePath(mnemonic.path);\n if ((0, transactions_1.computeAddress)(node.privateKey) !== _this.address) {\n logger.throwArgumentError(\"mnemonic/address mismatch\", \"privateKey\", \"[REDACTED]\");\n }\n } else {\n (0, properties_1.defineReadOnly)(_this, \"_mnemonic\", function() {\n return null;\n });\n }\n } else {\n if (signing_key_1.SigningKey.isSigningKey(privateKey)) {\n if (privateKey.curve !== \"secp256k1\") {\n logger.throwArgumentError(\"unsupported curve; must be secp256k1\", \"privateKey\", \"[REDACTED]\");\n }\n (0, properties_1.defineReadOnly)(_this, \"_signingKey\", function() {\n return privateKey;\n });\n } else {\n if (typeof privateKey === \"string\") {\n if (privateKey.match(/^[0-9a-f]*$/i) && privateKey.length === 64) {\n privateKey = \"0x\" + privateKey;\n }\n }\n var signingKey_2 = new signing_key_1.SigningKey(privateKey);\n (0, properties_1.defineReadOnly)(_this, \"_signingKey\", function() {\n return signingKey_2;\n });\n }\n (0, properties_1.defineReadOnly)(_this, \"_mnemonic\", function() {\n return null;\n });\n (0, properties_1.defineReadOnly)(_this, \"address\", (0, transactions_1.computeAddress)(_this.publicKey));\n }\n if (provider && !abstract_provider_1.Provider.isProvider(provider)) {\n logger.throwArgumentError(\"invalid provider\", \"provider\", provider);\n }\n (0, properties_1.defineReadOnly)(_this, \"provider\", provider || null);\n return _this;\n }\n Object.defineProperty(Wallet2.prototype, \"mnemonic\", {\n get: function() {\n return this._mnemonic();\n },\n enumerable: false,\n configurable: true\n });\n Object.defineProperty(Wallet2.prototype, \"privateKey\", {\n get: function() {\n return this._signingKey().privateKey;\n },\n enumerable: false,\n configurable: true\n });\n Object.defineProperty(Wallet2.prototype, \"publicKey\", {\n get: function() {\n return this._signingKey().publicKey;\n },\n enumerable: false,\n configurable: true\n });\n Wallet2.prototype.getAddress = function() {\n return Promise.resolve(this.address);\n };\n Wallet2.prototype.connect = function(provider) {\n return new Wallet2(this, provider);\n };\n Wallet2.prototype.signTransaction = function(transaction) {\n var _this = this;\n return (0, properties_1.resolveProperties)(transaction).then(function(tx) {\n if (tx.from != null) {\n if ((0, address_1.getAddress)(tx.from) !== _this.address) {\n logger.throwArgumentError(\"transaction from address mismatch\", \"transaction.from\", transaction.from);\n }\n delete tx.from;\n }\n var signature = _this._signingKey().signDigest((0, keccak256_1.keccak256)((0, transactions_1.serialize)(tx)));\n return (0, transactions_1.serialize)(tx, signature);\n });\n };\n Wallet2.prototype.signMessage = function(message) {\n return __awaiter3(this, void 0, void 0, function() {\n return __generator3(this, function(_a) {\n return [2, (0, bytes_1.joinSignature)(this._signingKey().signDigest((0, hash_1.hashMessage)(message)))];\n });\n });\n };\n Wallet2.prototype._signTypedData = function(domain2, types, value) {\n return __awaiter3(this, void 0, void 0, function() {\n var populated;\n var _this = this;\n return __generator3(this, function(_a) {\n switch (_a.label) {\n case 0:\n return [4, hash_1._TypedDataEncoder.resolveNames(domain2, types, value, function(name) {\n if (_this.provider == null) {\n logger.throwError(\"cannot resolve ENS names without a provider\", logger_1.Logger.errors.UNSUPPORTED_OPERATION, {\n operation: \"resolveName\",\n value: name\n });\n }\n return _this.provider.resolveName(name);\n })];\n case 1:\n populated = _a.sent();\n return [2, (0, bytes_1.joinSignature)(this._signingKey().signDigest(hash_1._TypedDataEncoder.hash(populated.domain, types, populated.value)))];\n }\n });\n });\n };\n Wallet2.prototype.encrypt = function(password, options, progressCallback) {\n if (typeof options === \"function\" && !progressCallback) {\n progressCallback = options;\n options = {};\n }\n if (progressCallback && typeof progressCallback !== \"function\") {\n throw new Error(\"invalid callback\");\n }\n if (!options) {\n options = {};\n }\n return (0, json_wallets_1.encryptKeystore)(this, password, options, progressCallback);\n };\n Wallet2.createRandom = function(options) {\n var entropy = (0, random_1.randomBytes)(16);\n if (!options) {\n options = {};\n }\n if (options.extraEntropy) {\n entropy = (0, bytes_1.arrayify)((0, bytes_1.hexDataSlice)((0, keccak256_1.keccak256)((0, bytes_1.concat)([entropy, options.extraEntropy])), 0, 16));\n }\n var mnemonic = (0, hdnode_1.entropyToMnemonic)(entropy, options.locale);\n return Wallet2.fromMnemonic(mnemonic, options.path, options.locale);\n };\n Wallet2.fromEncryptedJson = function(json, password, progressCallback) {\n return (0, json_wallets_1.decryptJsonWallet)(json, password, progressCallback).then(function(account) {\n return new Wallet2(account);\n });\n };\n Wallet2.fromEncryptedJsonSync = function(json, password) {\n return new Wallet2((0, json_wallets_1.decryptJsonWalletSync)(json, password));\n };\n Wallet2.fromMnemonic = function(mnemonic, path, wordlist) {\n if (!path) {\n path = hdnode_1.defaultPath;\n }\n return new Wallet2(hdnode_1.HDNode.fromMnemonic(mnemonic, null, wordlist).derivePath(path));\n };\n return Wallet2;\n }(abstract_signer_1.Signer)\n );\n exports3.Wallet = Wallet;\n function verifyMessage2(message, signature) {\n return (0, transactions_1.recoverAddress)((0, hash_1.hashMessage)(message), signature);\n }\n exports3.verifyMessage = verifyMessage2;\n function verifyTypedData2(domain2, types, value, signature) {\n return (0, transactions_1.recoverAddress)(hash_1._TypedDataEncoder.hash(domain2, types, value), signature);\n }\n exports3.verifyTypedData = verifyTypedData2;\n }\n });\n\n // ../../../node_modules/.pnpm/@ethersproject+networks@5.8.0/node_modules/@ethersproject/networks/lib/_version.js\n var require_version21 = __commonJS({\n \"../../../node_modules/.pnpm/@ethersproject+networks@5.8.0/node_modules/@ethersproject/networks/lib/_version.js\"(exports3) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n Object.defineProperty(exports3, \"__esModule\", { value: true });\n exports3.version = void 0;\n exports3.version = \"networks/5.8.0\";\n }\n });\n\n // ../../../node_modules/.pnpm/@ethersproject+networks@5.8.0/node_modules/@ethersproject/networks/lib/index.js\n var require_lib27 = __commonJS({\n \"../../../node_modules/.pnpm/@ethersproject+networks@5.8.0/node_modules/@ethersproject/networks/lib/index.js\"(exports3) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n Object.defineProperty(exports3, \"__esModule\", { value: true });\n exports3.getNetwork = void 0;\n var logger_1 = require_lib();\n var _version_1 = require_version21();\n var logger = new logger_1.Logger(_version_1.version);\n function isRenetworkable(value) {\n return value && typeof value.renetwork === \"function\";\n }\n function ethDefaultProvider(network) {\n var func = function(providers, options) {\n if (options == null) {\n options = {};\n }\n var providerList = [];\n if (providers.InfuraProvider && options.infura !== \"-\") {\n try {\n providerList.push(new providers.InfuraProvider(network, options.infura));\n } catch (error) {\n }\n }\n if (providers.EtherscanProvider && options.etherscan !== \"-\") {\n try {\n providerList.push(new providers.EtherscanProvider(network, options.etherscan));\n } catch (error) {\n }\n }\n if (providers.AlchemyProvider && options.alchemy !== \"-\") {\n try {\n providerList.push(new providers.AlchemyProvider(network, options.alchemy));\n } catch (error) {\n }\n }\n if (providers.PocketProvider && options.pocket !== \"-\") {\n var skip = [\"goerli\", \"ropsten\", \"rinkeby\", \"sepolia\"];\n try {\n var provider = new providers.PocketProvider(network, options.pocket);\n if (provider.network && skip.indexOf(provider.network.name) === -1) {\n providerList.push(provider);\n }\n } catch (error) {\n }\n }\n if (providers.CloudflareProvider && options.cloudflare !== \"-\") {\n try {\n providerList.push(new providers.CloudflareProvider(network));\n } catch (error) {\n }\n }\n if (providers.AnkrProvider && options.ankr !== \"-\") {\n try {\n var skip = [\"ropsten\"];\n var provider = new providers.AnkrProvider(network, options.ankr);\n if (provider.network && skip.indexOf(provider.network.name) === -1) {\n providerList.push(provider);\n }\n } catch (error) {\n }\n }\n if (providers.QuickNodeProvider && options.quicknode !== \"-\") {\n try {\n providerList.push(new providers.QuickNodeProvider(network, options.quicknode));\n } catch (error) {\n }\n }\n if (providerList.length === 0) {\n return null;\n }\n if (providers.FallbackProvider) {\n var quorum = 1;\n if (options.quorum != null) {\n quorum = options.quorum;\n } else if (network === \"homestead\") {\n quorum = 2;\n }\n return new providers.FallbackProvider(providerList, quorum);\n }\n return providerList[0];\n };\n func.renetwork = function(network2) {\n return ethDefaultProvider(network2);\n };\n return func;\n }\n function etcDefaultProvider(url, network) {\n var func = function(providers, options) {\n if (providers.JsonRpcProvider) {\n return new providers.JsonRpcProvider(url, network);\n }\n return null;\n };\n func.renetwork = function(network2) {\n return etcDefaultProvider(url, network2);\n };\n return func;\n }\n var homestead = {\n chainId: 1,\n ensAddress: \"0x00000000000C2E074eC69A0dFb2997BA6C7d2e1e\",\n name: \"homestead\",\n _defaultProvider: ethDefaultProvider(\"homestead\")\n };\n var ropsten = {\n chainId: 3,\n ensAddress: \"0x00000000000C2E074eC69A0dFb2997BA6C7d2e1e\",\n name: \"ropsten\",\n _defaultProvider: ethDefaultProvider(\"ropsten\")\n };\n var classicMordor = {\n chainId: 63,\n name: \"classicMordor\",\n _defaultProvider: etcDefaultProvider(\"https://www.ethercluster.com/mordor\", \"classicMordor\")\n };\n var networks = {\n unspecified: { chainId: 0, name: \"unspecified\" },\n homestead,\n mainnet: homestead,\n morden: { chainId: 2, name: \"morden\" },\n ropsten,\n testnet: ropsten,\n rinkeby: {\n chainId: 4,\n ensAddress: \"0x00000000000C2E074eC69A0dFb2997BA6C7d2e1e\",\n name: \"rinkeby\",\n _defaultProvider: ethDefaultProvider(\"rinkeby\")\n },\n kovan: {\n chainId: 42,\n name: \"kovan\",\n _defaultProvider: ethDefaultProvider(\"kovan\")\n },\n goerli: {\n chainId: 5,\n ensAddress: \"0x00000000000C2E074eC69A0dFb2997BA6C7d2e1e\",\n name: \"goerli\",\n _defaultProvider: ethDefaultProvider(\"goerli\")\n },\n kintsugi: { chainId: 1337702, name: \"kintsugi\" },\n sepolia: {\n chainId: 11155111,\n ensAddress: \"0x00000000000C2E074eC69A0dFb2997BA6C7d2e1e\",\n name: \"sepolia\",\n _defaultProvider: ethDefaultProvider(\"sepolia\")\n },\n holesky: {\n chainId: 17e3,\n name: \"holesky\",\n _defaultProvider: ethDefaultProvider(\"holesky\")\n },\n // ETC (See: #351)\n classic: {\n chainId: 61,\n name: \"classic\",\n _defaultProvider: etcDefaultProvider(\"https://www.ethercluster.com/etc\", \"classic\")\n },\n classicMorden: { chainId: 62, name: \"classicMorden\" },\n classicMordor,\n classicTestnet: classicMordor,\n classicKotti: {\n chainId: 6,\n name: \"classicKotti\",\n _defaultProvider: etcDefaultProvider(\"https://www.ethercluster.com/kotti\", \"classicKotti\")\n },\n xdai: { chainId: 100, name: \"xdai\" },\n matic: {\n chainId: 137,\n name: \"matic\",\n _defaultProvider: ethDefaultProvider(\"matic\")\n },\n maticmum: {\n chainId: 80001,\n name: \"maticmum\",\n _defaultProvider: ethDefaultProvider(\"maticmum\")\n },\n optimism: {\n chainId: 10,\n name: \"optimism\",\n _defaultProvider: ethDefaultProvider(\"optimism\")\n },\n \"optimism-kovan\": { chainId: 69, name: \"optimism-kovan\" },\n \"optimism-goerli\": { chainId: 420, name: \"optimism-goerli\" },\n \"optimism-sepolia\": { chainId: 11155420, name: \"optimism-sepolia\" },\n arbitrum: { chainId: 42161, name: \"arbitrum\" },\n \"arbitrum-rinkeby\": { chainId: 421611, name: \"arbitrum-rinkeby\" },\n \"arbitrum-goerli\": { chainId: 421613, name: \"arbitrum-goerli\" },\n \"arbitrum-sepolia\": { chainId: 421614, name: \"arbitrum-sepolia\" },\n bnb: { chainId: 56, name: \"bnb\" },\n bnbt: { chainId: 97, name: \"bnbt\" }\n };\n function getNetwork(network) {\n if (network == null) {\n return null;\n }\n if (typeof network === \"number\") {\n for (var name_1 in networks) {\n var standard_1 = networks[name_1];\n if (standard_1.chainId === network) {\n return {\n name: standard_1.name,\n chainId: standard_1.chainId,\n ensAddress: standard_1.ensAddress || null,\n _defaultProvider: standard_1._defaultProvider || null\n };\n }\n }\n return {\n chainId: network,\n name: \"unknown\"\n };\n }\n if (typeof network === \"string\") {\n var standard_2 = networks[network];\n if (standard_2 == null) {\n return null;\n }\n return {\n name: standard_2.name,\n chainId: standard_2.chainId,\n ensAddress: standard_2.ensAddress,\n _defaultProvider: standard_2._defaultProvider || null\n };\n }\n var standard = networks[network.name];\n if (!standard) {\n if (typeof network.chainId !== \"number\") {\n logger.throwArgumentError(\"invalid network chainId\", \"network\", network);\n }\n return network;\n }\n if (network.chainId !== 0 && network.chainId !== standard.chainId) {\n logger.throwArgumentError(\"network chainId mismatch\", \"network\", network);\n }\n var defaultProvider = network._defaultProvider || null;\n if (defaultProvider == null && standard._defaultProvider) {\n if (isRenetworkable(standard._defaultProvider)) {\n defaultProvider = standard._defaultProvider.renetwork(network);\n } else {\n defaultProvider = standard._defaultProvider;\n }\n }\n return {\n name: network.name,\n chainId: standard.chainId,\n ensAddress: network.ensAddress || standard.ensAddress || null,\n _defaultProvider: defaultProvider\n };\n }\n exports3.getNetwork = getNetwork;\n }\n });\n\n // ../../../node_modules/.pnpm/@ethersproject+web@5.8.0/node_modules/@ethersproject/web/lib/_version.js\n var require_version22 = __commonJS({\n \"../../../node_modules/.pnpm/@ethersproject+web@5.8.0/node_modules/@ethersproject/web/lib/_version.js\"(exports3) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n Object.defineProperty(exports3, \"__esModule\", { value: true });\n exports3.version = void 0;\n exports3.version = \"web/5.8.0\";\n }\n });\n\n // ../../../node_modules/.pnpm/@ethersproject+web@5.8.0/node_modules/@ethersproject/web/lib/browser-geturl.js\n var require_browser_geturl = __commonJS({\n \"../../../node_modules/.pnpm/@ethersproject+web@5.8.0/node_modules/@ethersproject/web/lib/browser-geturl.js\"(exports3) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n var __awaiter3 = exports3 && exports3.__awaiter || function(thisArg, _arguments, P2, generator) {\n function adopt(value) {\n return value instanceof P2 ? value : new P2(function(resolve) {\n resolve(value);\n });\n }\n return new (P2 || (P2 = Promise))(function(resolve, reject) {\n function fulfilled(value) {\n try {\n step(generator.next(value));\n } catch (e3) {\n reject(e3);\n }\n }\n function rejected(value) {\n try {\n step(generator[\"throw\"](value));\n } catch (e3) {\n reject(e3);\n }\n }\n function step(result) {\n result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected);\n }\n step((generator = generator.apply(thisArg, _arguments || [])).next());\n });\n };\n var __generator3 = exports3 && exports3.__generator || function(thisArg, body) {\n var _2 = { label: 0, sent: function() {\n if (t3[0] & 1)\n throw t3[1];\n return t3[1];\n }, trys: [], ops: [] }, f6, y6, t3, g4;\n return g4 = { next: verb(0), \"throw\": verb(1), \"return\": verb(2) }, typeof Symbol === \"function\" && (g4[Symbol.iterator] = function() {\n return this;\n }), g4;\n function verb(n2) {\n return function(v2) {\n return step([n2, v2]);\n };\n }\n function step(op) {\n if (f6)\n throw new TypeError(\"Generator is already executing.\");\n while (_2)\n try {\n if (f6 = 1, y6 && (t3 = op[0] & 2 ? y6[\"return\"] : op[0] ? y6[\"throw\"] || ((t3 = y6[\"return\"]) && t3.call(y6), 0) : y6.next) && !(t3 = t3.call(y6, op[1])).done)\n return t3;\n if (y6 = 0, t3)\n op = [op[0] & 2, t3.value];\n switch (op[0]) {\n case 0:\n case 1:\n t3 = op;\n break;\n case 4:\n _2.label++;\n return { value: op[1], done: false };\n case 5:\n _2.label++;\n y6 = op[1];\n op = [0];\n continue;\n case 7:\n op = _2.ops.pop();\n _2.trys.pop();\n continue;\n default:\n if (!(t3 = _2.trys, t3 = t3.length > 0 && t3[t3.length - 1]) && (op[0] === 6 || op[0] === 2)) {\n _2 = 0;\n continue;\n }\n if (op[0] === 3 && (!t3 || op[1] > t3[0] && op[1] < t3[3])) {\n _2.label = op[1];\n break;\n }\n if (op[0] === 6 && _2.label < t3[1]) {\n _2.label = t3[1];\n t3 = op;\n break;\n }\n if (t3 && _2.label < t3[2]) {\n _2.label = t3[2];\n _2.ops.push(op);\n break;\n }\n if (t3[2])\n _2.ops.pop();\n _2.trys.pop();\n continue;\n }\n op = body.call(thisArg, _2);\n } catch (e3) {\n op = [6, e3];\n y6 = 0;\n } finally {\n f6 = t3 = 0;\n }\n if (op[0] & 5)\n throw op[1];\n return { value: op[0] ? op[1] : void 0, done: true };\n }\n };\n Object.defineProperty(exports3, \"__esModule\", { value: true });\n exports3.getUrl = void 0;\n var bytes_1 = require_lib2();\n function getUrl2(href, options) {\n return __awaiter3(this, void 0, void 0, function() {\n var request, opts, response, body, headers;\n return __generator3(this, function(_a) {\n switch (_a.label) {\n case 0:\n if (options == null) {\n options = {};\n }\n request = {\n method: options.method || \"GET\",\n headers: options.headers || {},\n body: options.body || void 0\n };\n if (options.skipFetchSetup !== true) {\n request.mode = \"cors\";\n request.cache = \"no-cache\";\n request.credentials = \"same-origin\";\n request.redirect = \"follow\";\n request.referrer = \"client\";\n }\n ;\n if (options.fetchOptions != null) {\n opts = options.fetchOptions;\n if (opts.mode) {\n request.mode = opts.mode;\n }\n if (opts.cache) {\n request.cache = opts.cache;\n }\n if (opts.credentials) {\n request.credentials = opts.credentials;\n }\n if (opts.redirect) {\n request.redirect = opts.redirect;\n }\n if (opts.referrer) {\n request.referrer = opts.referrer;\n }\n }\n return [4, fetch(href, request)];\n case 1:\n response = _a.sent();\n return [4, response.arrayBuffer()];\n case 2:\n body = _a.sent();\n headers = {};\n if (response.headers.forEach) {\n response.headers.forEach(function(value, key) {\n headers[key.toLowerCase()] = value;\n });\n } else {\n response.headers.keys().forEach(function(key) {\n headers[key.toLowerCase()] = response.headers.get(key);\n });\n }\n return [2, {\n headers,\n statusCode: response.status,\n statusMessage: response.statusText,\n body: (0, bytes_1.arrayify)(new Uint8Array(body))\n }];\n }\n });\n });\n }\n exports3.getUrl = getUrl2;\n }\n });\n\n // ../../../node_modules/.pnpm/@ethersproject+web@5.8.0/node_modules/@ethersproject/web/lib/index.js\n var require_lib28 = __commonJS({\n \"../../../node_modules/.pnpm/@ethersproject+web@5.8.0/node_modules/@ethersproject/web/lib/index.js\"(exports3) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n var __awaiter3 = exports3 && exports3.__awaiter || function(thisArg, _arguments, P2, generator) {\n function adopt(value) {\n return value instanceof P2 ? value : new P2(function(resolve) {\n resolve(value);\n });\n }\n return new (P2 || (P2 = Promise))(function(resolve, reject) {\n function fulfilled(value) {\n try {\n step(generator.next(value));\n } catch (e3) {\n reject(e3);\n }\n }\n function rejected(value) {\n try {\n step(generator[\"throw\"](value));\n } catch (e3) {\n reject(e3);\n }\n }\n function step(result) {\n result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected);\n }\n step((generator = generator.apply(thisArg, _arguments || [])).next());\n });\n };\n var __generator3 = exports3 && exports3.__generator || function(thisArg, body) {\n var _2 = { label: 0, sent: function() {\n if (t3[0] & 1)\n throw t3[1];\n return t3[1];\n }, trys: [], ops: [] }, f6, y6, t3, g4;\n return g4 = { next: verb(0), \"throw\": verb(1), \"return\": verb(2) }, typeof Symbol === \"function\" && (g4[Symbol.iterator] = function() {\n return this;\n }), g4;\n function verb(n2) {\n return function(v2) {\n return step([n2, v2]);\n };\n }\n function step(op) {\n if (f6)\n throw new TypeError(\"Generator is already executing.\");\n while (_2)\n try {\n if (f6 = 1, y6 && (t3 = op[0] & 2 ? y6[\"return\"] : op[0] ? y6[\"throw\"] || ((t3 = y6[\"return\"]) && t3.call(y6), 0) : y6.next) && !(t3 = t3.call(y6, op[1])).done)\n return t3;\n if (y6 = 0, t3)\n op = [op[0] & 2, t3.value];\n switch (op[0]) {\n case 0:\n case 1:\n t3 = op;\n break;\n case 4:\n _2.label++;\n return { value: op[1], done: false };\n case 5:\n _2.label++;\n y6 = op[1];\n op = [0];\n continue;\n case 7:\n op = _2.ops.pop();\n _2.trys.pop();\n continue;\n default:\n if (!(t3 = _2.trys, t3 = t3.length > 0 && t3[t3.length - 1]) && (op[0] === 6 || op[0] === 2)) {\n _2 = 0;\n continue;\n }\n if (op[0] === 3 && (!t3 || op[1] > t3[0] && op[1] < t3[3])) {\n _2.label = op[1];\n break;\n }\n if (op[0] === 6 && _2.label < t3[1]) {\n _2.label = t3[1];\n t3 = op;\n break;\n }\n if (t3 && _2.label < t3[2]) {\n _2.label = t3[2];\n _2.ops.push(op);\n break;\n }\n if (t3[2])\n _2.ops.pop();\n _2.trys.pop();\n continue;\n }\n op = body.call(thisArg, _2);\n } catch (e3) {\n op = [6, e3];\n y6 = 0;\n } finally {\n f6 = t3 = 0;\n }\n if (op[0] & 5)\n throw op[1];\n return { value: op[0] ? op[1] : void 0, done: true };\n }\n };\n Object.defineProperty(exports3, \"__esModule\", { value: true });\n exports3.poll = exports3.fetchJson = exports3._fetchData = void 0;\n var base64_1 = require_lib10();\n var bytes_1 = require_lib2();\n var properties_1 = require_lib4();\n var strings_1 = require_lib9();\n var logger_1 = require_lib();\n var _version_1 = require_version22();\n var logger = new logger_1.Logger(_version_1.version);\n var geturl_1 = require_browser_geturl();\n function staller(duration) {\n return new Promise(function(resolve) {\n setTimeout(resolve, duration);\n });\n }\n function bodyify(value, type) {\n if (value == null) {\n return null;\n }\n if (typeof value === \"string\") {\n return value;\n }\n if ((0, bytes_1.isBytesLike)(value)) {\n if (type && (type.split(\"/\")[0] === \"text\" || type.split(\";\")[0].trim() === \"application/json\")) {\n try {\n return (0, strings_1.toUtf8String)(value);\n } catch (error) {\n }\n ;\n }\n return (0, bytes_1.hexlify)(value);\n }\n return value;\n }\n function unpercent(value) {\n return (0, strings_1.toUtf8Bytes)(value.replace(/%([0-9a-f][0-9a-f])/gi, function(all, code) {\n return String.fromCharCode(parseInt(code, 16));\n }));\n }\n function _fetchData(connection, body, processFunc) {\n var attemptLimit = typeof connection === \"object\" && connection.throttleLimit != null ? connection.throttleLimit : 12;\n logger.assertArgument(attemptLimit > 0 && attemptLimit % 1 === 0, \"invalid connection throttle limit\", \"connection.throttleLimit\", attemptLimit);\n var throttleCallback = typeof connection === \"object\" ? connection.throttleCallback : null;\n var throttleSlotInterval = typeof connection === \"object\" && typeof connection.throttleSlotInterval === \"number\" ? connection.throttleSlotInterval : 100;\n logger.assertArgument(throttleSlotInterval > 0 && throttleSlotInterval % 1 === 0, \"invalid connection throttle slot interval\", \"connection.throttleSlotInterval\", throttleSlotInterval);\n var errorPassThrough = typeof connection === \"object\" ? !!connection.errorPassThrough : false;\n var headers = {};\n var url = null;\n var options = {\n method: \"GET\"\n };\n var allow304 = false;\n var timeout = 2 * 60 * 1e3;\n if (typeof connection === \"string\") {\n url = connection;\n } else if (typeof connection === \"object\") {\n if (connection == null || connection.url == null) {\n logger.throwArgumentError(\"missing URL\", \"connection.url\", connection);\n }\n url = connection.url;\n if (typeof connection.timeout === \"number\" && connection.timeout > 0) {\n timeout = connection.timeout;\n }\n if (connection.headers) {\n for (var key in connection.headers) {\n headers[key.toLowerCase()] = { key, value: String(connection.headers[key]) };\n if ([\"if-none-match\", \"if-modified-since\"].indexOf(key.toLowerCase()) >= 0) {\n allow304 = true;\n }\n }\n }\n options.allowGzip = !!connection.allowGzip;\n if (connection.user != null && connection.password != null) {\n if (url.substring(0, 6) !== \"https:\" && connection.allowInsecureAuthentication !== true) {\n logger.throwError(\"basic authentication requires a secure https url\", logger_1.Logger.errors.INVALID_ARGUMENT, { argument: \"url\", url, user: connection.user, password: \"[REDACTED]\" });\n }\n var authorization = connection.user + \":\" + connection.password;\n headers[\"authorization\"] = {\n key: \"Authorization\",\n value: \"Basic \" + (0, base64_1.encode)((0, strings_1.toUtf8Bytes)(authorization))\n };\n }\n if (connection.skipFetchSetup != null) {\n options.skipFetchSetup = !!connection.skipFetchSetup;\n }\n if (connection.fetchOptions != null) {\n options.fetchOptions = (0, properties_1.shallowCopy)(connection.fetchOptions);\n }\n }\n var reData = new RegExp(\"^data:([^;:]*)?(;base64)?,(.*)$\", \"i\");\n var dataMatch = url ? url.match(reData) : null;\n if (dataMatch) {\n try {\n var response = {\n statusCode: 200,\n statusMessage: \"OK\",\n headers: { \"content-type\": dataMatch[1] || \"text/plain\" },\n body: dataMatch[2] ? (0, base64_1.decode)(dataMatch[3]) : unpercent(dataMatch[3])\n };\n var result = response.body;\n if (processFunc) {\n result = processFunc(response.body, response);\n }\n return Promise.resolve(result);\n } catch (error) {\n logger.throwError(\"processing response error\", logger_1.Logger.errors.SERVER_ERROR, {\n body: bodyify(dataMatch[1], dataMatch[2]),\n error,\n requestBody: null,\n requestMethod: \"GET\",\n url\n });\n }\n }\n if (body) {\n options.method = \"POST\";\n options.body = body;\n if (headers[\"content-type\"] == null) {\n headers[\"content-type\"] = { key: \"Content-Type\", value: \"application/octet-stream\" };\n }\n if (headers[\"content-length\"] == null) {\n headers[\"content-length\"] = { key: \"Content-Length\", value: String(body.length) };\n }\n }\n var flatHeaders = {};\n Object.keys(headers).forEach(function(key2) {\n var header = headers[key2];\n flatHeaders[header.key] = header.value;\n });\n options.headers = flatHeaders;\n var runningTimeout = function() {\n var timer = null;\n var promise = new Promise(function(resolve, reject) {\n if (timeout) {\n timer = setTimeout(function() {\n if (timer == null) {\n return;\n }\n timer = null;\n reject(logger.makeError(\"timeout\", logger_1.Logger.errors.TIMEOUT, {\n requestBody: bodyify(options.body, flatHeaders[\"content-type\"]),\n requestMethod: options.method,\n timeout,\n url\n }));\n }, timeout);\n }\n });\n var cancel2 = function() {\n if (timer == null) {\n return;\n }\n clearTimeout(timer);\n timer = null;\n };\n return { promise, cancel: cancel2 };\n }();\n var runningFetch = function() {\n return __awaiter3(this, void 0, void 0, function() {\n var attempt, response2, location_1, tryAgain, stall, retryAfter, error_1, body_1, result2, error_2, tryAgain, timeout_1;\n return __generator3(this, function(_a) {\n switch (_a.label) {\n case 0:\n attempt = 0;\n _a.label = 1;\n case 1:\n if (!(attempt < attemptLimit))\n return [3, 20];\n response2 = null;\n _a.label = 2;\n case 2:\n _a.trys.push([2, 9, , 10]);\n return [4, (0, geturl_1.getUrl)(url, options)];\n case 3:\n response2 = _a.sent();\n if (!(attempt < attemptLimit))\n return [3, 8];\n if (!(response2.statusCode === 301 || response2.statusCode === 302))\n return [3, 4];\n location_1 = response2.headers.location || \"\";\n if (options.method === \"GET\" && location_1.match(/^https:/)) {\n url = response2.headers.location;\n return [3, 19];\n }\n return [3, 8];\n case 4:\n if (!(response2.statusCode === 429))\n return [3, 8];\n tryAgain = true;\n if (!throttleCallback)\n return [3, 6];\n return [4, throttleCallback(attempt, url)];\n case 5:\n tryAgain = _a.sent();\n _a.label = 6;\n case 6:\n if (!tryAgain)\n return [3, 8];\n stall = 0;\n retryAfter = response2.headers[\"retry-after\"];\n if (typeof retryAfter === \"string\" && retryAfter.match(/^[1-9][0-9]*$/)) {\n stall = parseInt(retryAfter) * 1e3;\n } else {\n stall = throttleSlotInterval * parseInt(String(Math.random() * Math.pow(2, attempt)));\n }\n return [4, staller(stall)];\n case 7:\n _a.sent();\n return [3, 19];\n case 8:\n return [3, 10];\n case 9:\n error_1 = _a.sent();\n response2 = error_1.response;\n if (response2 == null) {\n runningTimeout.cancel();\n logger.throwError(\"missing response\", logger_1.Logger.errors.SERVER_ERROR, {\n requestBody: bodyify(options.body, flatHeaders[\"content-type\"]),\n requestMethod: options.method,\n serverError: error_1,\n url\n });\n }\n return [3, 10];\n case 10:\n body_1 = response2.body;\n if (allow304 && response2.statusCode === 304) {\n body_1 = null;\n } else if (!errorPassThrough && (response2.statusCode < 200 || response2.statusCode >= 300)) {\n runningTimeout.cancel();\n logger.throwError(\"bad response\", logger_1.Logger.errors.SERVER_ERROR, {\n status: response2.statusCode,\n headers: response2.headers,\n body: bodyify(body_1, response2.headers ? response2.headers[\"content-type\"] : null),\n requestBody: bodyify(options.body, flatHeaders[\"content-type\"]),\n requestMethod: options.method,\n url\n });\n }\n if (!processFunc)\n return [3, 18];\n _a.label = 11;\n case 11:\n _a.trys.push([11, 13, , 18]);\n return [4, processFunc(body_1, response2)];\n case 12:\n result2 = _a.sent();\n runningTimeout.cancel();\n return [2, result2];\n case 13:\n error_2 = _a.sent();\n if (!(error_2.throttleRetry && attempt < attemptLimit))\n return [3, 17];\n tryAgain = true;\n if (!throttleCallback)\n return [3, 15];\n return [4, throttleCallback(attempt, url)];\n case 14:\n tryAgain = _a.sent();\n _a.label = 15;\n case 15:\n if (!tryAgain)\n return [3, 17];\n timeout_1 = throttleSlotInterval * parseInt(String(Math.random() * Math.pow(2, attempt)));\n return [4, staller(timeout_1)];\n case 16:\n _a.sent();\n return [3, 19];\n case 17:\n runningTimeout.cancel();\n logger.throwError(\"processing response error\", logger_1.Logger.errors.SERVER_ERROR, {\n body: bodyify(body_1, response2.headers ? response2.headers[\"content-type\"] : null),\n error: error_2,\n requestBody: bodyify(options.body, flatHeaders[\"content-type\"]),\n requestMethod: options.method,\n url\n });\n return [3, 18];\n case 18:\n runningTimeout.cancel();\n return [2, body_1];\n case 19:\n attempt++;\n return [3, 1];\n case 20:\n return [2, logger.throwError(\"failed response\", logger_1.Logger.errors.SERVER_ERROR, {\n requestBody: bodyify(options.body, flatHeaders[\"content-type\"]),\n requestMethod: options.method,\n url\n })];\n }\n });\n });\n }();\n return Promise.race([runningTimeout.promise, runningFetch]);\n }\n exports3._fetchData = _fetchData;\n function fetchJson(connection, json, processFunc) {\n var processJsonFunc = function(value, response) {\n var result = null;\n if (value != null) {\n try {\n result = JSON.parse((0, strings_1.toUtf8String)(value));\n } catch (error) {\n logger.throwError(\"invalid JSON\", logger_1.Logger.errors.SERVER_ERROR, {\n body: value,\n error\n });\n }\n }\n if (processFunc) {\n result = processFunc(result, response);\n }\n return result;\n };\n var body = null;\n if (json != null) {\n body = (0, strings_1.toUtf8Bytes)(json);\n var updated = typeof connection === \"string\" ? { url: connection } : (0, properties_1.shallowCopy)(connection);\n if (updated.headers) {\n var hasContentType = Object.keys(updated.headers).filter(function(k4) {\n return k4.toLowerCase() === \"content-type\";\n }).length !== 0;\n if (!hasContentType) {\n updated.headers = (0, properties_1.shallowCopy)(updated.headers);\n updated.headers[\"content-type\"] = \"application/json\";\n }\n } else {\n updated.headers = { \"content-type\": \"application/json\" };\n }\n connection = updated;\n }\n return _fetchData(connection, body, processJsonFunc);\n }\n exports3.fetchJson = fetchJson;\n function poll2(func, options) {\n if (!options) {\n options = {};\n }\n options = (0, properties_1.shallowCopy)(options);\n if (options.floor == null) {\n options.floor = 0;\n }\n if (options.ceiling == null) {\n options.ceiling = 1e4;\n }\n if (options.interval == null) {\n options.interval = 250;\n }\n return new Promise(function(resolve, reject) {\n var timer = null;\n var done = false;\n var cancel2 = function() {\n if (done) {\n return false;\n }\n done = true;\n if (timer) {\n clearTimeout(timer);\n }\n return true;\n };\n if (options.timeout) {\n timer = setTimeout(function() {\n if (cancel2()) {\n reject(new Error(\"timeout\"));\n }\n }, options.timeout);\n }\n var retryLimit = options.retryLimit;\n var attempt = 0;\n function check() {\n return func().then(function(result) {\n if (result !== void 0) {\n if (cancel2()) {\n resolve(result);\n }\n } else if (options.oncePoll) {\n options.oncePoll.once(\"poll\", check);\n } else if (options.onceBlock) {\n options.onceBlock.once(\"block\", check);\n } else if (!done) {\n attempt++;\n if (attempt > retryLimit) {\n if (cancel2()) {\n reject(new Error(\"retry limit reached\"));\n }\n return;\n }\n var timeout = options.interval * parseInt(String(Math.random() * Math.pow(2, attempt)));\n if (timeout < options.floor) {\n timeout = options.floor;\n }\n if (timeout > options.ceiling) {\n timeout = options.ceiling;\n }\n setTimeout(check, timeout);\n }\n return null;\n }, function(error) {\n if (cancel2()) {\n reject(error);\n }\n });\n }\n check();\n });\n }\n exports3.poll = poll2;\n }\n });\n\n // ../../../node_modules/.pnpm/bech32@1.1.4/node_modules/bech32/index.js\n var require_bech32 = __commonJS({\n \"../../../node_modules/.pnpm/bech32@1.1.4/node_modules/bech32/index.js\"(exports3, module) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n var ALPHABET = \"qpzry9x8gf2tvdw0s3jn54khce6mua7l\";\n var ALPHABET_MAP = {};\n for (z2 = 0; z2 < ALPHABET.length; z2++) {\n x4 = ALPHABET.charAt(z2);\n if (ALPHABET_MAP[x4] !== void 0)\n throw new TypeError(x4 + \" is ambiguous\");\n ALPHABET_MAP[x4] = z2;\n }\n var x4;\n var z2;\n function polymodStep(pre) {\n var b4 = pre >> 25;\n return (pre & 33554431) << 5 ^ -(b4 >> 0 & 1) & 996825010 ^ -(b4 >> 1 & 1) & 642813549 ^ -(b4 >> 2 & 1) & 513874426 ^ -(b4 >> 3 & 1) & 1027748829 ^ -(b4 >> 4 & 1) & 705979059;\n }\n function prefixChk(prefix) {\n var chk = 1;\n for (var i3 = 0; i3 < prefix.length; ++i3) {\n var c4 = prefix.charCodeAt(i3);\n if (c4 < 33 || c4 > 126)\n return \"Invalid prefix (\" + prefix + \")\";\n chk = polymodStep(chk) ^ c4 >> 5;\n }\n chk = polymodStep(chk);\n for (i3 = 0; i3 < prefix.length; ++i3) {\n var v2 = prefix.charCodeAt(i3);\n chk = polymodStep(chk) ^ v2 & 31;\n }\n return chk;\n }\n function encode6(prefix, words, LIMIT) {\n LIMIT = LIMIT || 90;\n if (prefix.length + 7 + words.length > LIMIT)\n throw new TypeError(\"Exceeds length limit\");\n prefix = prefix.toLowerCase();\n var chk = prefixChk(prefix);\n if (typeof chk === \"string\")\n throw new Error(chk);\n var result = prefix + \"1\";\n for (var i3 = 0; i3 < words.length; ++i3) {\n var x5 = words[i3];\n if (x5 >> 5 !== 0)\n throw new Error(\"Non 5-bit word\");\n chk = polymodStep(chk) ^ x5;\n result += ALPHABET.charAt(x5);\n }\n for (i3 = 0; i3 < 6; ++i3) {\n chk = polymodStep(chk);\n }\n chk ^= 1;\n for (i3 = 0; i3 < 6; ++i3) {\n var v2 = chk >> (5 - i3) * 5 & 31;\n result += ALPHABET.charAt(v2);\n }\n return result;\n }\n function __decode(str, LIMIT) {\n LIMIT = LIMIT || 90;\n if (str.length < 8)\n return str + \" too short\";\n if (str.length > LIMIT)\n return \"Exceeds length limit\";\n var lowered = str.toLowerCase();\n var uppered = str.toUpperCase();\n if (str !== lowered && str !== uppered)\n return \"Mixed-case string \" + str;\n str = lowered;\n var split4 = str.lastIndexOf(\"1\");\n if (split4 === -1)\n return \"No separator character for \" + str;\n if (split4 === 0)\n return \"Missing prefix for \" + str;\n var prefix = str.slice(0, split4);\n var wordChars = str.slice(split4 + 1);\n if (wordChars.length < 6)\n return \"Data too short\";\n var chk = prefixChk(prefix);\n if (typeof chk === \"string\")\n return chk;\n var words = [];\n for (var i3 = 0; i3 < wordChars.length; ++i3) {\n var c4 = wordChars.charAt(i3);\n var v2 = ALPHABET_MAP[c4];\n if (v2 === void 0)\n return \"Unknown character \" + c4;\n chk = polymodStep(chk) ^ v2;\n if (i3 + 6 >= wordChars.length)\n continue;\n words.push(v2);\n }\n if (chk !== 1)\n return \"Invalid checksum for \" + str;\n return { prefix, words };\n }\n function decodeUnsafe() {\n var res = __decode.apply(null, arguments);\n if (typeof res === \"object\")\n return res;\n }\n function decode2(str) {\n var res = __decode.apply(null, arguments);\n if (typeof res === \"object\")\n return res;\n throw new Error(res);\n }\n function convert(data, inBits, outBits, pad6) {\n var value = 0;\n var bits = 0;\n var maxV = (1 << outBits) - 1;\n var result = [];\n for (var i3 = 0; i3 < data.length; ++i3) {\n value = value << inBits | data[i3];\n bits += inBits;\n while (bits >= outBits) {\n bits -= outBits;\n result.push(value >> bits & maxV);\n }\n }\n if (pad6) {\n if (bits > 0) {\n result.push(value << outBits - bits & maxV);\n }\n } else {\n if (bits >= inBits)\n return \"Excess padding\";\n if (value << outBits - bits & maxV)\n return \"Non-zero padding\";\n }\n return result;\n }\n function toWordsUnsafe(bytes) {\n var res = convert(bytes, 8, 5, true);\n if (Array.isArray(res))\n return res;\n }\n function toWords(bytes) {\n var res = convert(bytes, 8, 5, true);\n if (Array.isArray(res))\n return res;\n throw new Error(res);\n }\n function fromWordsUnsafe(words) {\n var res = convert(words, 5, 8, false);\n if (Array.isArray(res))\n return res;\n }\n function fromWords(words) {\n var res = convert(words, 5, 8, false);\n if (Array.isArray(res))\n return res;\n throw new Error(res);\n }\n module.exports = {\n decodeUnsafe,\n decode: decode2,\n encode: encode6,\n toWordsUnsafe,\n toWords,\n fromWordsUnsafe,\n fromWords\n };\n }\n });\n\n // ../../../node_modules/.pnpm/@ethersproject+providers@5.8.0_bufferutil@4.0.9_utf-8-validate@5.0.10/node_modules/@ethersproject/providers/lib/_version.js\n var require_version23 = __commonJS({\n \"../../../node_modules/.pnpm/@ethersproject+providers@5.8.0_bufferutil@4.0.9_utf-8-validate@5.0.10/node_modules/@ethersproject/providers/lib/_version.js\"(exports3) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n Object.defineProperty(exports3, \"__esModule\", { value: true });\n exports3.version = void 0;\n exports3.version = \"providers/5.8.0\";\n }\n });\n\n // ../../../node_modules/.pnpm/@ethersproject+providers@5.8.0_bufferutil@4.0.9_utf-8-validate@5.0.10/node_modules/@ethersproject/providers/lib/formatter.js\n var require_formatter = __commonJS({\n \"../../../node_modules/.pnpm/@ethersproject+providers@5.8.0_bufferutil@4.0.9_utf-8-validate@5.0.10/node_modules/@ethersproject/providers/lib/formatter.js\"(exports3) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n Object.defineProperty(exports3, \"__esModule\", { value: true });\n exports3.showThrottleMessage = exports3.isCommunityResource = exports3.isCommunityResourcable = exports3.Formatter = void 0;\n var address_1 = require_lib7();\n var bignumber_1 = require_lib3();\n var bytes_1 = require_lib2();\n var constants_1 = require_lib8();\n var properties_1 = require_lib4();\n var transactions_1 = require_lib17();\n var logger_1 = require_lib();\n var _version_1 = require_version23();\n var logger = new logger_1.Logger(_version_1.version);\n var Formatter = (\n /** @class */\n function() {\n function Formatter2() {\n this.formats = this.getDefaultFormats();\n }\n Formatter2.prototype.getDefaultFormats = function() {\n var _this = this;\n var formats = {};\n var address = this.address.bind(this);\n var bigNumber = this.bigNumber.bind(this);\n var blockTag = this.blockTag.bind(this);\n var data = this.data.bind(this);\n var hash3 = this.hash.bind(this);\n var hex = this.hex.bind(this);\n var number2 = this.number.bind(this);\n var type = this.type.bind(this);\n var strictData = function(v2) {\n return _this.data(v2, true);\n };\n formats.transaction = {\n hash: hash3,\n type,\n accessList: Formatter2.allowNull(this.accessList.bind(this), null),\n blockHash: Formatter2.allowNull(hash3, null),\n blockNumber: Formatter2.allowNull(number2, null),\n transactionIndex: Formatter2.allowNull(number2, null),\n confirmations: Formatter2.allowNull(number2, null),\n from: address,\n // either (gasPrice) or (maxPriorityFeePerGas + maxFeePerGas)\n // must be set\n gasPrice: Formatter2.allowNull(bigNumber),\n maxPriorityFeePerGas: Formatter2.allowNull(bigNumber),\n maxFeePerGas: Formatter2.allowNull(bigNumber),\n gasLimit: bigNumber,\n to: Formatter2.allowNull(address, null),\n value: bigNumber,\n nonce: number2,\n data,\n r: Formatter2.allowNull(this.uint256),\n s: Formatter2.allowNull(this.uint256),\n v: Formatter2.allowNull(number2),\n creates: Formatter2.allowNull(address, null),\n raw: Formatter2.allowNull(data)\n };\n formats.transactionRequest = {\n from: Formatter2.allowNull(address),\n nonce: Formatter2.allowNull(number2),\n gasLimit: Formatter2.allowNull(bigNumber),\n gasPrice: Formatter2.allowNull(bigNumber),\n maxPriorityFeePerGas: Formatter2.allowNull(bigNumber),\n maxFeePerGas: Formatter2.allowNull(bigNumber),\n to: Formatter2.allowNull(address),\n value: Formatter2.allowNull(bigNumber),\n data: Formatter2.allowNull(strictData),\n type: Formatter2.allowNull(number2),\n accessList: Formatter2.allowNull(this.accessList.bind(this), null)\n };\n formats.receiptLog = {\n transactionIndex: number2,\n blockNumber: number2,\n transactionHash: hash3,\n address,\n topics: Formatter2.arrayOf(hash3),\n data,\n logIndex: number2,\n blockHash: hash3\n };\n formats.receipt = {\n to: Formatter2.allowNull(this.address, null),\n from: Formatter2.allowNull(this.address, null),\n contractAddress: Formatter2.allowNull(address, null),\n transactionIndex: number2,\n // should be allowNull(hash), but broken-EIP-658 support is handled in receipt\n root: Formatter2.allowNull(hex),\n gasUsed: bigNumber,\n logsBloom: Formatter2.allowNull(data),\n blockHash: hash3,\n transactionHash: hash3,\n logs: Formatter2.arrayOf(this.receiptLog.bind(this)),\n blockNumber: number2,\n confirmations: Formatter2.allowNull(number2, null),\n cumulativeGasUsed: bigNumber,\n effectiveGasPrice: Formatter2.allowNull(bigNumber),\n status: Formatter2.allowNull(number2),\n type\n };\n formats.block = {\n hash: Formatter2.allowNull(hash3),\n parentHash: hash3,\n number: number2,\n timestamp: number2,\n nonce: Formatter2.allowNull(hex),\n difficulty: this.difficulty.bind(this),\n gasLimit: bigNumber,\n gasUsed: bigNumber,\n miner: Formatter2.allowNull(address),\n extraData: data,\n transactions: Formatter2.allowNull(Formatter2.arrayOf(hash3)),\n baseFeePerGas: Formatter2.allowNull(bigNumber)\n };\n formats.blockWithTransactions = (0, properties_1.shallowCopy)(formats.block);\n formats.blockWithTransactions.transactions = Formatter2.allowNull(Formatter2.arrayOf(this.transactionResponse.bind(this)));\n formats.filter = {\n fromBlock: Formatter2.allowNull(blockTag, void 0),\n toBlock: Formatter2.allowNull(blockTag, void 0),\n blockHash: Formatter2.allowNull(hash3, void 0),\n address: Formatter2.allowNull(address, void 0),\n topics: Formatter2.allowNull(this.topics.bind(this), void 0)\n };\n formats.filterLog = {\n blockNumber: Formatter2.allowNull(number2),\n blockHash: Formatter2.allowNull(hash3),\n transactionIndex: number2,\n removed: Formatter2.allowNull(this.boolean.bind(this)),\n address,\n data: Formatter2.allowFalsish(data, \"0x\"),\n topics: Formatter2.arrayOf(hash3),\n transactionHash: hash3,\n logIndex: number2\n };\n return formats;\n };\n Formatter2.prototype.accessList = function(accessList) {\n return (0, transactions_1.accessListify)(accessList || []);\n };\n Formatter2.prototype.number = function(number2) {\n if (number2 === \"0x\") {\n return 0;\n }\n return bignumber_1.BigNumber.from(number2).toNumber();\n };\n Formatter2.prototype.type = function(number2) {\n if (number2 === \"0x\" || number2 == null) {\n return 0;\n }\n return bignumber_1.BigNumber.from(number2).toNumber();\n };\n Formatter2.prototype.bigNumber = function(value) {\n return bignumber_1.BigNumber.from(value);\n };\n Formatter2.prototype.boolean = function(value) {\n if (typeof value === \"boolean\") {\n return value;\n }\n if (typeof value === \"string\") {\n value = value.toLowerCase();\n if (value === \"true\") {\n return true;\n }\n if (value === \"false\") {\n return false;\n }\n }\n throw new Error(\"invalid boolean - \" + value);\n };\n Formatter2.prototype.hex = function(value, strict) {\n if (typeof value === \"string\") {\n if (!strict && value.substring(0, 2) !== \"0x\") {\n value = \"0x\" + value;\n }\n if ((0, bytes_1.isHexString)(value)) {\n return value.toLowerCase();\n }\n }\n return logger.throwArgumentError(\"invalid hash\", \"value\", value);\n };\n Formatter2.prototype.data = function(value, strict) {\n var result = this.hex(value, strict);\n if (result.length % 2 !== 0) {\n throw new Error(\"invalid data; odd-length - \" + value);\n }\n return result;\n };\n Formatter2.prototype.address = function(value) {\n return (0, address_1.getAddress)(value);\n };\n Formatter2.prototype.callAddress = function(value) {\n if (!(0, bytes_1.isHexString)(value, 32)) {\n return null;\n }\n var address = (0, address_1.getAddress)((0, bytes_1.hexDataSlice)(value, 12));\n return address === constants_1.AddressZero ? null : address;\n };\n Formatter2.prototype.contractAddress = function(value) {\n return (0, address_1.getContractAddress)(value);\n };\n Formatter2.prototype.blockTag = function(blockTag) {\n if (blockTag == null) {\n return \"latest\";\n }\n if (blockTag === \"earliest\") {\n return \"0x0\";\n }\n switch (blockTag) {\n case \"earliest\":\n return \"0x0\";\n case \"latest\":\n case \"pending\":\n case \"safe\":\n case \"finalized\":\n return blockTag;\n }\n if (typeof blockTag === \"number\" || (0, bytes_1.isHexString)(blockTag)) {\n return (0, bytes_1.hexValue)(blockTag);\n }\n throw new Error(\"invalid blockTag\");\n };\n Formatter2.prototype.hash = function(value, strict) {\n var result = this.hex(value, strict);\n if ((0, bytes_1.hexDataLength)(result) !== 32) {\n return logger.throwArgumentError(\"invalid hash\", \"value\", value);\n }\n return result;\n };\n Formatter2.prototype.difficulty = function(value) {\n if (value == null) {\n return null;\n }\n var v2 = bignumber_1.BigNumber.from(value);\n try {\n return v2.toNumber();\n } catch (error) {\n }\n return null;\n };\n Formatter2.prototype.uint256 = function(value) {\n if (!(0, bytes_1.isHexString)(value)) {\n throw new Error(\"invalid uint256\");\n }\n return (0, bytes_1.hexZeroPad)(value, 32);\n };\n Formatter2.prototype._block = function(value, format) {\n if (value.author != null && value.miner == null) {\n value.miner = value.author;\n }\n var difficulty = value._difficulty != null ? value._difficulty : value.difficulty;\n var result = Formatter2.check(format, value);\n result._difficulty = difficulty == null ? null : bignumber_1.BigNumber.from(difficulty);\n return result;\n };\n Formatter2.prototype.block = function(value) {\n return this._block(value, this.formats.block);\n };\n Formatter2.prototype.blockWithTransactions = function(value) {\n return this._block(value, this.formats.blockWithTransactions);\n };\n Formatter2.prototype.transactionRequest = function(value) {\n return Formatter2.check(this.formats.transactionRequest, value);\n };\n Formatter2.prototype.transactionResponse = function(transaction) {\n if (transaction.gas != null && transaction.gasLimit == null) {\n transaction.gasLimit = transaction.gas;\n }\n if (transaction.to && bignumber_1.BigNumber.from(transaction.to).isZero()) {\n transaction.to = \"0x0000000000000000000000000000000000000000\";\n }\n if (transaction.input != null && transaction.data == null) {\n transaction.data = transaction.input;\n }\n if (transaction.to == null && transaction.creates == null) {\n transaction.creates = this.contractAddress(transaction);\n }\n if ((transaction.type === 1 || transaction.type === 2) && transaction.accessList == null) {\n transaction.accessList = [];\n }\n var result = Formatter2.check(this.formats.transaction, transaction);\n if (transaction.chainId != null) {\n var chainId = transaction.chainId;\n if ((0, bytes_1.isHexString)(chainId)) {\n chainId = bignumber_1.BigNumber.from(chainId).toNumber();\n }\n result.chainId = chainId;\n } else {\n var chainId = transaction.networkId;\n if (chainId == null && result.v == null) {\n chainId = transaction.chainId;\n }\n if ((0, bytes_1.isHexString)(chainId)) {\n chainId = bignumber_1.BigNumber.from(chainId).toNumber();\n }\n if (typeof chainId !== \"number\" && result.v != null) {\n chainId = (result.v - 35) / 2;\n if (chainId < 0) {\n chainId = 0;\n }\n chainId = parseInt(chainId);\n }\n if (typeof chainId !== \"number\") {\n chainId = 0;\n }\n result.chainId = chainId;\n }\n if (result.blockHash && result.blockHash.replace(/0/g, \"\") === \"x\") {\n result.blockHash = null;\n }\n return result;\n };\n Formatter2.prototype.transaction = function(value) {\n return (0, transactions_1.parse)(value);\n };\n Formatter2.prototype.receiptLog = function(value) {\n return Formatter2.check(this.formats.receiptLog, value);\n };\n Formatter2.prototype.receipt = function(value) {\n var result = Formatter2.check(this.formats.receipt, value);\n if (result.root != null) {\n if (result.root.length <= 4) {\n var value_1 = bignumber_1.BigNumber.from(result.root).toNumber();\n if (value_1 === 0 || value_1 === 1) {\n if (result.status != null && result.status !== value_1) {\n logger.throwArgumentError(\"alt-root-status/status mismatch\", \"value\", { root: result.root, status: result.status });\n }\n result.status = value_1;\n delete result.root;\n } else {\n logger.throwArgumentError(\"invalid alt-root-status\", \"value.root\", result.root);\n }\n } else if (result.root.length !== 66) {\n logger.throwArgumentError(\"invalid root hash\", \"value.root\", result.root);\n }\n }\n if (result.status != null) {\n result.byzantium = true;\n }\n return result;\n };\n Formatter2.prototype.topics = function(value) {\n var _this = this;\n if (Array.isArray(value)) {\n return value.map(function(v2) {\n return _this.topics(v2);\n });\n } else if (value != null) {\n return this.hash(value, true);\n }\n return null;\n };\n Formatter2.prototype.filter = function(value) {\n return Formatter2.check(this.formats.filter, value);\n };\n Formatter2.prototype.filterLog = function(value) {\n return Formatter2.check(this.formats.filterLog, value);\n };\n Formatter2.check = function(format, object2) {\n var result = {};\n for (var key in format) {\n try {\n var value = format[key](object2[key]);\n if (value !== void 0) {\n result[key] = value;\n }\n } catch (error) {\n error.checkKey = key;\n error.checkValue = object2[key];\n throw error;\n }\n }\n return result;\n };\n Formatter2.allowNull = function(format, nullValue) {\n return function(value) {\n if (value == null) {\n return nullValue;\n }\n return format(value);\n };\n };\n Formatter2.allowFalsish = function(format, replaceValue) {\n return function(value) {\n if (!value) {\n return replaceValue;\n }\n return format(value);\n };\n };\n Formatter2.arrayOf = function(format) {\n return function(array2) {\n if (!Array.isArray(array2)) {\n throw new Error(\"not an array\");\n }\n var result = [];\n array2.forEach(function(value) {\n result.push(format(value));\n });\n return result;\n };\n };\n return Formatter2;\n }()\n );\n exports3.Formatter = Formatter;\n function isCommunityResourcable(value) {\n return value && typeof value.isCommunityResource === \"function\";\n }\n exports3.isCommunityResourcable = isCommunityResourcable;\n function isCommunityResource(value) {\n return isCommunityResourcable(value) && value.isCommunityResource();\n }\n exports3.isCommunityResource = isCommunityResource;\n var throttleMessage = false;\n function showThrottleMessage() {\n if (throttleMessage) {\n return;\n }\n throttleMessage = true;\n console.log(\"========= NOTICE =========\");\n console.log(\"Request-Rate Exceeded (this message will not be repeated)\");\n console.log(\"\");\n console.log(\"The default API keys for each service are provided as a highly-throttled,\");\n console.log(\"community resource for low-traffic projects and early prototyping.\");\n console.log(\"\");\n console.log(\"While your application will continue to function, we highly recommended\");\n console.log(\"signing up for your own API keys to improve performance, increase your\");\n console.log(\"request rate/limit and enable other perks, such as metrics and advanced APIs.\");\n console.log(\"\");\n console.log(\"For more details: https://docs.ethers.io/api-keys/\");\n console.log(\"==========================\");\n }\n exports3.showThrottleMessage = showThrottleMessage;\n }\n });\n\n // ../../../node_modules/.pnpm/@ethersproject+providers@5.8.0_bufferutil@4.0.9_utf-8-validate@5.0.10/node_modules/@ethersproject/providers/lib/base-provider.js\n var require_base_provider = __commonJS({\n \"../../../node_modules/.pnpm/@ethersproject+providers@5.8.0_bufferutil@4.0.9_utf-8-validate@5.0.10/node_modules/@ethersproject/providers/lib/base-provider.js\"(exports3) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n var __extends3 = exports3 && exports3.__extends || /* @__PURE__ */ function() {\n var extendStatics3 = function(d5, b4) {\n extendStatics3 = Object.setPrototypeOf || { __proto__: [] } instanceof Array && function(d6, b5) {\n d6.__proto__ = b5;\n } || function(d6, b5) {\n for (var p4 in b5)\n if (Object.prototype.hasOwnProperty.call(b5, p4))\n d6[p4] = b5[p4];\n };\n return extendStatics3(d5, b4);\n };\n return function(d5, b4) {\n if (typeof b4 !== \"function\" && b4 !== null)\n throw new TypeError(\"Class extends value \" + String(b4) + \" is not a constructor or null\");\n extendStatics3(d5, b4);\n function __() {\n this.constructor = d5;\n }\n d5.prototype = b4 === null ? Object.create(b4) : (__.prototype = b4.prototype, new __());\n };\n }();\n var __awaiter3 = exports3 && exports3.__awaiter || function(thisArg, _arguments, P2, generator) {\n function adopt(value) {\n return value instanceof P2 ? value : new P2(function(resolve) {\n resolve(value);\n });\n }\n return new (P2 || (P2 = Promise))(function(resolve, reject) {\n function fulfilled(value) {\n try {\n step(generator.next(value));\n } catch (e3) {\n reject(e3);\n }\n }\n function rejected(value) {\n try {\n step(generator[\"throw\"](value));\n } catch (e3) {\n reject(e3);\n }\n }\n function step(result) {\n result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected);\n }\n step((generator = generator.apply(thisArg, _arguments || [])).next());\n });\n };\n var __generator3 = exports3 && exports3.__generator || function(thisArg, body) {\n var _2 = { label: 0, sent: function() {\n if (t3[0] & 1)\n throw t3[1];\n return t3[1];\n }, trys: [], ops: [] }, f6, y6, t3, g4;\n return g4 = { next: verb(0), \"throw\": verb(1), \"return\": verb(2) }, typeof Symbol === \"function\" && (g4[Symbol.iterator] = function() {\n return this;\n }), g4;\n function verb(n2) {\n return function(v2) {\n return step([n2, v2]);\n };\n }\n function step(op) {\n if (f6)\n throw new TypeError(\"Generator is already executing.\");\n while (_2)\n try {\n if (f6 = 1, y6 && (t3 = op[0] & 2 ? y6[\"return\"] : op[0] ? y6[\"throw\"] || ((t3 = y6[\"return\"]) && t3.call(y6), 0) : y6.next) && !(t3 = t3.call(y6, op[1])).done)\n return t3;\n if (y6 = 0, t3)\n op = [op[0] & 2, t3.value];\n switch (op[0]) {\n case 0:\n case 1:\n t3 = op;\n break;\n case 4:\n _2.label++;\n return { value: op[1], done: false };\n case 5:\n _2.label++;\n y6 = op[1];\n op = [0];\n continue;\n case 7:\n op = _2.ops.pop();\n _2.trys.pop();\n continue;\n default:\n if (!(t3 = _2.trys, t3 = t3.length > 0 && t3[t3.length - 1]) && (op[0] === 6 || op[0] === 2)) {\n _2 = 0;\n continue;\n }\n if (op[0] === 3 && (!t3 || op[1] > t3[0] && op[1] < t3[3])) {\n _2.label = op[1];\n break;\n }\n if (op[0] === 6 && _2.label < t3[1]) {\n _2.label = t3[1];\n t3 = op;\n break;\n }\n if (t3 && _2.label < t3[2]) {\n _2.label = t3[2];\n _2.ops.push(op);\n break;\n }\n if (t3[2])\n _2.ops.pop();\n _2.trys.pop();\n continue;\n }\n op = body.call(thisArg, _2);\n } catch (e3) {\n op = [6, e3];\n y6 = 0;\n } finally {\n f6 = t3 = 0;\n }\n if (op[0] & 5)\n throw op[1];\n return { value: op[0] ? op[1] : void 0, done: true };\n }\n };\n var __importDefault3 = exports3 && exports3.__importDefault || function(mod3) {\n return mod3 && mod3.__esModule ? mod3 : { \"default\": mod3 };\n };\n Object.defineProperty(exports3, \"__esModule\", { value: true });\n exports3.BaseProvider = exports3.Resolver = exports3.Event = void 0;\n var abstract_provider_1 = require_lib14();\n var base64_1 = require_lib10();\n var basex_1 = require_lib19();\n var bignumber_1 = require_lib3();\n var bytes_1 = require_lib2();\n var constants_1 = require_lib8();\n var hash_1 = require_lib12();\n var networks_1 = require_lib27();\n var properties_1 = require_lib4();\n var sha2_1 = require_lib20();\n var strings_1 = require_lib9();\n var web_1 = require_lib28();\n var bech32_1 = __importDefault3(require_bech32());\n var logger_1 = require_lib();\n var _version_1 = require_version23();\n var logger = new logger_1.Logger(_version_1.version);\n var formatter_1 = require_formatter();\n var MAX_CCIP_REDIRECTS = 10;\n function checkTopic(topic) {\n if (topic == null) {\n return \"null\";\n }\n if ((0, bytes_1.hexDataLength)(topic) !== 32) {\n logger.throwArgumentError(\"invalid topic\", \"topic\", topic);\n }\n return topic.toLowerCase();\n }\n function serializeTopics(topics) {\n topics = topics.slice();\n while (topics.length > 0 && topics[topics.length - 1] == null) {\n topics.pop();\n }\n return topics.map(function(topic) {\n if (Array.isArray(topic)) {\n var unique_1 = {};\n topic.forEach(function(topic2) {\n unique_1[checkTopic(topic2)] = true;\n });\n var sorted = Object.keys(unique_1);\n sorted.sort();\n return sorted.join(\"|\");\n } else {\n return checkTopic(topic);\n }\n }).join(\"&\");\n }\n function deserializeTopics(data) {\n if (data === \"\") {\n return [];\n }\n return data.split(/&/g).map(function(topic) {\n if (topic === \"\") {\n return [];\n }\n var comps = topic.split(\"|\").map(function(topic2) {\n return topic2 === \"null\" ? null : topic2;\n });\n return comps.length === 1 ? comps[0] : comps;\n });\n }\n function getEventTag(eventName) {\n if (typeof eventName === \"string\") {\n eventName = eventName.toLowerCase();\n if ((0, bytes_1.hexDataLength)(eventName) === 32) {\n return \"tx:\" + eventName;\n }\n if (eventName.indexOf(\":\") === -1) {\n return eventName;\n }\n } else if (Array.isArray(eventName)) {\n return \"filter:*:\" + serializeTopics(eventName);\n } else if (abstract_provider_1.ForkEvent.isForkEvent(eventName)) {\n logger.warn(\"not implemented\");\n throw new Error(\"not implemented\");\n } else if (eventName && typeof eventName === \"object\") {\n return \"filter:\" + (eventName.address || \"*\") + \":\" + serializeTopics(eventName.topics || []);\n }\n throw new Error(\"invalid event - \" + eventName);\n }\n function getTime() {\n return (/* @__PURE__ */ new Date()).getTime();\n }\n function stall(duration) {\n return new Promise(function(resolve) {\n setTimeout(resolve, duration);\n });\n }\n var PollableEvents = [\"block\", \"network\", \"pending\", \"poll\"];\n var Event2 = (\n /** @class */\n function() {\n function Event3(tag, listener, once2) {\n (0, properties_1.defineReadOnly)(this, \"tag\", tag);\n (0, properties_1.defineReadOnly)(this, \"listener\", listener);\n (0, properties_1.defineReadOnly)(this, \"once\", once2);\n this._lastBlockNumber = -2;\n this._inflight = false;\n }\n Object.defineProperty(Event3.prototype, \"event\", {\n get: function() {\n switch (this.type) {\n case \"tx\":\n return this.hash;\n case \"filter\":\n return this.filter;\n }\n return this.tag;\n },\n enumerable: false,\n configurable: true\n });\n Object.defineProperty(Event3.prototype, \"type\", {\n get: function() {\n return this.tag.split(\":\")[0];\n },\n enumerable: false,\n configurable: true\n });\n Object.defineProperty(Event3.prototype, \"hash\", {\n get: function() {\n var comps = this.tag.split(\":\");\n if (comps[0] !== \"tx\") {\n return null;\n }\n return comps[1];\n },\n enumerable: false,\n configurable: true\n });\n Object.defineProperty(Event3.prototype, \"filter\", {\n get: function() {\n var comps = this.tag.split(\":\");\n if (comps[0] !== \"filter\") {\n return null;\n }\n var address = comps[1];\n var topics = deserializeTopics(comps[2]);\n var filter = {};\n if (topics.length > 0) {\n filter.topics = topics;\n }\n if (address && address !== \"*\") {\n filter.address = address;\n }\n return filter;\n },\n enumerable: false,\n configurable: true\n });\n Event3.prototype.pollable = function() {\n return this.tag.indexOf(\":\") >= 0 || PollableEvents.indexOf(this.tag) >= 0;\n };\n return Event3;\n }()\n );\n exports3.Event = Event2;\n var coinInfos = {\n \"0\": { symbol: \"btc\", p2pkh: 0, p2sh: 5, prefix: \"bc\" },\n \"2\": { symbol: \"ltc\", p2pkh: 48, p2sh: 50, prefix: \"ltc\" },\n \"3\": { symbol: \"doge\", p2pkh: 30, p2sh: 22 },\n \"60\": { symbol: \"eth\", ilk: \"eth\" },\n \"61\": { symbol: \"etc\", ilk: \"eth\" },\n \"700\": { symbol: \"xdai\", ilk: \"eth\" }\n };\n function bytes32ify(value) {\n return (0, bytes_1.hexZeroPad)(bignumber_1.BigNumber.from(value).toHexString(), 32);\n }\n function base58Encode(data) {\n return basex_1.Base58.encode((0, bytes_1.concat)([data, (0, bytes_1.hexDataSlice)((0, sha2_1.sha256)((0, sha2_1.sha256)(data)), 0, 4)]));\n }\n var matcherIpfs = new RegExp(\"^(ipfs)://(.*)$\", \"i\");\n var matchers = [\n new RegExp(\"^(https)://(.*)$\", \"i\"),\n new RegExp(\"^(data):(.*)$\", \"i\"),\n matcherIpfs,\n new RegExp(\"^eip155:[0-9]+/(erc[0-9]+):(.*)$\", \"i\")\n ];\n function _parseString(result, start) {\n try {\n return (0, strings_1.toUtf8String)(_parseBytes(result, start));\n } catch (error) {\n }\n return null;\n }\n function _parseBytes(result, start) {\n if (result === \"0x\") {\n return null;\n }\n var offset = bignumber_1.BigNumber.from((0, bytes_1.hexDataSlice)(result, start, start + 32)).toNumber();\n var length2 = bignumber_1.BigNumber.from((0, bytes_1.hexDataSlice)(result, offset, offset + 32)).toNumber();\n return (0, bytes_1.hexDataSlice)(result, offset + 32, offset + 32 + length2);\n }\n function getIpfsLink(link) {\n if (link.match(/^ipfs:\\/\\/ipfs\\//i)) {\n link = link.substring(12);\n } else if (link.match(/^ipfs:\\/\\//i)) {\n link = link.substring(7);\n } else {\n logger.throwArgumentError(\"unsupported IPFS format\", \"link\", link);\n }\n return \"https://gateway.ipfs.io/ipfs/\" + link;\n }\n function numPad(value) {\n var result = (0, bytes_1.arrayify)(value);\n if (result.length > 32) {\n throw new Error(\"internal; should not happen\");\n }\n var padded = new Uint8Array(32);\n padded.set(result, 32 - result.length);\n return padded;\n }\n function bytesPad(value) {\n if (value.length % 32 === 0) {\n return value;\n }\n var result = new Uint8Array(Math.ceil(value.length / 32) * 32);\n result.set(value);\n return result;\n }\n function encodeBytes3(datas) {\n var result = [];\n var byteCount = 0;\n for (var i3 = 0; i3 < datas.length; i3++) {\n result.push(null);\n byteCount += 32;\n }\n for (var i3 = 0; i3 < datas.length; i3++) {\n var data = (0, bytes_1.arrayify)(datas[i3]);\n result[i3] = numPad(byteCount);\n result.push(numPad(data.length));\n result.push(bytesPad(data));\n byteCount += 32 + Math.ceil(data.length / 32) * 32;\n }\n return (0, bytes_1.hexConcat)(result);\n }\n var Resolver = (\n /** @class */\n function() {\n function Resolver2(provider, address, name, resolvedAddress) {\n (0, properties_1.defineReadOnly)(this, \"provider\", provider);\n (0, properties_1.defineReadOnly)(this, \"name\", name);\n (0, properties_1.defineReadOnly)(this, \"address\", provider.formatter.address(address));\n (0, properties_1.defineReadOnly)(this, \"_resolvedAddress\", resolvedAddress);\n }\n Resolver2.prototype.supportsWildcard = function() {\n var _this = this;\n if (!this._supportsEip2544) {\n this._supportsEip2544 = this.provider.call({\n to: this.address,\n data: \"0x01ffc9a79061b92300000000000000000000000000000000000000000000000000000000\"\n }).then(function(result) {\n return bignumber_1.BigNumber.from(result).eq(1);\n }).catch(function(error) {\n if (error.code === logger_1.Logger.errors.CALL_EXCEPTION) {\n return false;\n }\n _this._supportsEip2544 = null;\n throw error;\n });\n }\n return this._supportsEip2544;\n };\n Resolver2.prototype._fetch = function(selector, parameters) {\n return __awaiter3(this, void 0, void 0, function() {\n var tx, parseBytes, result, error_1;\n return __generator3(this, function(_a) {\n switch (_a.label) {\n case 0:\n tx = {\n to: this.address,\n ccipReadEnabled: true,\n data: (0, bytes_1.hexConcat)([selector, (0, hash_1.namehash)(this.name), parameters || \"0x\"])\n };\n parseBytes = false;\n return [4, this.supportsWildcard()];\n case 1:\n if (_a.sent()) {\n parseBytes = true;\n tx.data = (0, bytes_1.hexConcat)([\"0x9061b923\", encodeBytes3([(0, hash_1.dnsEncode)(this.name), tx.data])]);\n }\n _a.label = 2;\n case 2:\n _a.trys.push([2, 4, , 5]);\n return [4, this.provider.call(tx)];\n case 3:\n result = _a.sent();\n if ((0, bytes_1.arrayify)(result).length % 32 === 4) {\n logger.throwError(\"resolver threw error\", logger_1.Logger.errors.CALL_EXCEPTION, {\n transaction: tx,\n data: result\n });\n }\n if (parseBytes) {\n result = _parseBytes(result, 0);\n }\n return [2, result];\n case 4:\n error_1 = _a.sent();\n if (error_1.code === logger_1.Logger.errors.CALL_EXCEPTION) {\n return [2, null];\n }\n throw error_1;\n case 5:\n return [\n 2\n /*return*/\n ];\n }\n });\n });\n };\n Resolver2.prototype._fetchBytes = function(selector, parameters) {\n return __awaiter3(this, void 0, void 0, function() {\n var result;\n return __generator3(this, function(_a) {\n switch (_a.label) {\n case 0:\n return [4, this._fetch(selector, parameters)];\n case 1:\n result = _a.sent();\n if (result != null) {\n return [2, _parseBytes(result, 0)];\n }\n return [2, null];\n }\n });\n });\n };\n Resolver2.prototype._getAddress = function(coinType, hexBytes) {\n var coinInfo = coinInfos[String(coinType)];\n if (coinInfo == null) {\n logger.throwError(\"unsupported coin type: \" + coinType, logger_1.Logger.errors.UNSUPPORTED_OPERATION, {\n operation: \"getAddress(\" + coinType + \")\"\n });\n }\n if (coinInfo.ilk === \"eth\") {\n return this.provider.formatter.address(hexBytes);\n }\n var bytes = (0, bytes_1.arrayify)(hexBytes);\n if (coinInfo.p2pkh != null) {\n var p2pkh = hexBytes.match(/^0x76a9([0-9a-f][0-9a-f])([0-9a-f]*)88ac$/);\n if (p2pkh) {\n var length_1 = parseInt(p2pkh[1], 16);\n if (p2pkh[2].length === length_1 * 2 && length_1 >= 1 && length_1 <= 75) {\n return base58Encode((0, bytes_1.concat)([[coinInfo.p2pkh], \"0x\" + p2pkh[2]]));\n }\n }\n }\n if (coinInfo.p2sh != null) {\n var p2sh = hexBytes.match(/^0xa9([0-9a-f][0-9a-f])([0-9a-f]*)87$/);\n if (p2sh) {\n var length_2 = parseInt(p2sh[1], 16);\n if (p2sh[2].length === length_2 * 2 && length_2 >= 1 && length_2 <= 75) {\n return base58Encode((0, bytes_1.concat)([[coinInfo.p2sh], \"0x\" + p2sh[2]]));\n }\n }\n }\n if (coinInfo.prefix != null) {\n var length_3 = bytes[1];\n var version_1 = bytes[0];\n if (version_1 === 0) {\n if (length_3 !== 20 && length_3 !== 32) {\n version_1 = -1;\n }\n } else {\n version_1 = -1;\n }\n if (version_1 >= 0 && bytes.length === 2 + length_3 && length_3 >= 1 && length_3 <= 75) {\n var words = bech32_1.default.toWords(bytes.slice(2));\n words.unshift(version_1);\n return bech32_1.default.encode(coinInfo.prefix, words);\n }\n }\n return null;\n };\n Resolver2.prototype.getAddress = function(coinType) {\n return __awaiter3(this, void 0, void 0, function() {\n var result, error_2, hexBytes, address;\n return __generator3(this, function(_a) {\n switch (_a.label) {\n case 0:\n if (coinType == null) {\n coinType = 60;\n }\n if (!(coinType === 60))\n return [3, 4];\n _a.label = 1;\n case 1:\n _a.trys.push([1, 3, , 4]);\n return [4, this._fetch(\"0x3b3b57de\")];\n case 2:\n result = _a.sent();\n if (result === \"0x\" || result === constants_1.HashZero) {\n return [2, null];\n }\n return [2, this.provider.formatter.callAddress(result)];\n case 3:\n error_2 = _a.sent();\n if (error_2.code === logger_1.Logger.errors.CALL_EXCEPTION) {\n return [2, null];\n }\n throw error_2;\n case 4:\n return [4, this._fetchBytes(\"0xf1cb7e06\", bytes32ify(coinType))];\n case 5:\n hexBytes = _a.sent();\n if (hexBytes == null || hexBytes === \"0x\") {\n return [2, null];\n }\n address = this._getAddress(coinType, hexBytes);\n if (address == null) {\n logger.throwError(\"invalid or unsupported coin data\", logger_1.Logger.errors.UNSUPPORTED_OPERATION, {\n operation: \"getAddress(\" + coinType + \")\",\n coinType,\n data: hexBytes\n });\n }\n return [2, address];\n }\n });\n });\n };\n Resolver2.prototype.getAvatar = function() {\n return __awaiter3(this, void 0, void 0, function() {\n var linkage, avatar, i3, match, scheme, _a, selector, owner, _b, comps, addr, tokenId, tokenOwner, _c, _d, balance, _e, _f, tx, metadataUrl, _g, metadata, imageUrl, ipfs, error_3;\n return __generator3(this, function(_h) {\n switch (_h.label) {\n case 0:\n linkage = [{ type: \"name\", content: this.name }];\n _h.label = 1;\n case 1:\n _h.trys.push([1, 19, , 20]);\n return [4, this.getText(\"avatar\")];\n case 2:\n avatar = _h.sent();\n if (avatar == null) {\n return [2, null];\n }\n i3 = 0;\n _h.label = 3;\n case 3:\n if (!(i3 < matchers.length))\n return [3, 18];\n match = avatar.match(matchers[i3]);\n if (match == null) {\n return [3, 17];\n }\n scheme = match[1].toLowerCase();\n _a = scheme;\n switch (_a) {\n case \"https\":\n return [3, 4];\n case \"data\":\n return [3, 5];\n case \"ipfs\":\n return [3, 6];\n case \"erc721\":\n return [3, 7];\n case \"erc1155\":\n return [3, 7];\n }\n return [3, 17];\n case 4:\n linkage.push({ type: \"url\", content: avatar });\n return [2, { linkage, url: avatar }];\n case 5:\n linkage.push({ type: \"data\", content: avatar });\n return [2, { linkage, url: avatar }];\n case 6:\n linkage.push({ type: \"ipfs\", content: avatar });\n return [2, { linkage, url: getIpfsLink(avatar) }];\n case 7:\n selector = scheme === \"erc721\" ? \"0xc87b56dd\" : \"0x0e89341c\";\n linkage.push({ type: scheme, content: avatar });\n _b = this._resolvedAddress;\n if (_b)\n return [3, 9];\n return [4, this.getAddress()];\n case 8:\n _b = _h.sent();\n _h.label = 9;\n case 9:\n owner = _b;\n comps = (match[2] || \"\").split(\"/\");\n if (comps.length !== 2) {\n return [2, null];\n }\n return [4, this.provider.formatter.address(comps[0])];\n case 10:\n addr = _h.sent();\n tokenId = (0, bytes_1.hexZeroPad)(bignumber_1.BigNumber.from(comps[1]).toHexString(), 32);\n if (!(scheme === \"erc721\"))\n return [3, 12];\n _d = (_c = this.provider.formatter).callAddress;\n return [4, this.provider.call({\n to: addr,\n data: (0, bytes_1.hexConcat)([\"0x6352211e\", tokenId])\n })];\n case 11:\n tokenOwner = _d.apply(_c, [_h.sent()]);\n if (owner !== tokenOwner) {\n return [2, null];\n }\n linkage.push({ type: \"owner\", content: tokenOwner });\n return [3, 14];\n case 12:\n if (!(scheme === \"erc1155\"))\n return [3, 14];\n _f = (_e = bignumber_1.BigNumber).from;\n return [4, this.provider.call({\n to: addr,\n data: (0, bytes_1.hexConcat)([\"0x00fdd58e\", (0, bytes_1.hexZeroPad)(owner, 32), tokenId])\n })];\n case 13:\n balance = _f.apply(_e, [_h.sent()]);\n if (balance.isZero()) {\n return [2, null];\n }\n linkage.push({ type: \"balance\", content: balance.toString() });\n _h.label = 14;\n case 14:\n tx = {\n to: this.provider.formatter.address(comps[0]),\n data: (0, bytes_1.hexConcat)([selector, tokenId])\n };\n _g = _parseString;\n return [4, this.provider.call(tx)];\n case 15:\n metadataUrl = _g.apply(void 0, [_h.sent(), 0]);\n if (metadataUrl == null) {\n return [2, null];\n }\n linkage.push({ type: \"metadata-url-base\", content: metadataUrl });\n if (scheme === \"erc1155\") {\n metadataUrl = metadataUrl.replace(\"{id}\", tokenId.substring(2));\n linkage.push({ type: \"metadata-url-expanded\", content: metadataUrl });\n }\n if (metadataUrl.match(/^ipfs:/i)) {\n metadataUrl = getIpfsLink(metadataUrl);\n }\n linkage.push({ type: \"metadata-url\", content: metadataUrl });\n return [4, (0, web_1.fetchJson)(metadataUrl)];\n case 16:\n metadata = _h.sent();\n if (!metadata) {\n return [2, null];\n }\n linkage.push({ type: \"metadata\", content: JSON.stringify(metadata) });\n imageUrl = metadata.image;\n if (typeof imageUrl !== \"string\") {\n return [2, null];\n }\n if (imageUrl.match(/^(https:\\/\\/|data:)/i)) {\n } else {\n ipfs = imageUrl.match(matcherIpfs);\n if (ipfs == null) {\n return [2, null];\n }\n linkage.push({ type: \"url-ipfs\", content: imageUrl });\n imageUrl = getIpfsLink(imageUrl);\n }\n linkage.push({ type: \"url\", content: imageUrl });\n return [2, { linkage, url: imageUrl }];\n case 17:\n i3++;\n return [3, 3];\n case 18:\n return [3, 20];\n case 19:\n error_3 = _h.sent();\n return [3, 20];\n case 20:\n return [2, null];\n }\n });\n });\n };\n Resolver2.prototype.getContentHash = function() {\n return __awaiter3(this, void 0, void 0, function() {\n var hexBytes, ipfs, length_4, ipns, length_5, swarm, skynet, urlSafe_1, hash3;\n return __generator3(this, function(_a) {\n switch (_a.label) {\n case 0:\n return [4, this._fetchBytes(\"0xbc1c58d1\")];\n case 1:\n hexBytes = _a.sent();\n if (hexBytes == null || hexBytes === \"0x\") {\n return [2, null];\n }\n ipfs = hexBytes.match(/^0xe3010170(([0-9a-f][0-9a-f])([0-9a-f][0-9a-f])([0-9a-f]*))$/);\n if (ipfs) {\n length_4 = parseInt(ipfs[3], 16);\n if (ipfs[4].length === length_4 * 2) {\n return [2, \"ipfs://\" + basex_1.Base58.encode(\"0x\" + ipfs[1])];\n }\n }\n ipns = hexBytes.match(/^0xe5010172(([0-9a-f][0-9a-f])([0-9a-f][0-9a-f])([0-9a-f]*))$/);\n if (ipns) {\n length_5 = parseInt(ipns[3], 16);\n if (ipns[4].length === length_5 * 2) {\n return [2, \"ipns://\" + basex_1.Base58.encode(\"0x\" + ipns[1])];\n }\n }\n swarm = hexBytes.match(/^0xe40101fa011b20([0-9a-f]*)$/);\n if (swarm) {\n if (swarm[1].length === 32 * 2) {\n return [2, \"bzz://\" + swarm[1]];\n }\n }\n skynet = hexBytes.match(/^0x90b2c605([0-9a-f]*)$/);\n if (skynet) {\n if (skynet[1].length === 34 * 2) {\n urlSafe_1 = { \"=\": \"\", \"+\": \"-\", \"/\": \"_\" };\n hash3 = (0, base64_1.encode)(\"0x\" + skynet[1]).replace(/[=+\\/]/g, function(a3) {\n return urlSafe_1[a3];\n });\n return [2, \"sia://\" + hash3];\n }\n }\n return [2, logger.throwError(\"invalid or unsupported content hash data\", logger_1.Logger.errors.UNSUPPORTED_OPERATION, {\n operation: \"getContentHash()\",\n data: hexBytes\n })];\n }\n });\n });\n };\n Resolver2.prototype.getText = function(key) {\n return __awaiter3(this, void 0, void 0, function() {\n var keyBytes, hexBytes;\n return __generator3(this, function(_a) {\n switch (_a.label) {\n case 0:\n keyBytes = (0, strings_1.toUtf8Bytes)(key);\n keyBytes = (0, bytes_1.concat)([bytes32ify(64), bytes32ify(keyBytes.length), keyBytes]);\n if (keyBytes.length % 32 !== 0) {\n keyBytes = (0, bytes_1.concat)([keyBytes, (0, bytes_1.hexZeroPad)(\"0x\", 32 - key.length % 32)]);\n }\n return [4, this._fetchBytes(\"0x59d1d43c\", (0, bytes_1.hexlify)(keyBytes))];\n case 1:\n hexBytes = _a.sent();\n if (hexBytes == null || hexBytes === \"0x\") {\n return [2, null];\n }\n return [2, (0, strings_1.toUtf8String)(hexBytes)];\n }\n });\n });\n };\n return Resolver2;\n }()\n );\n exports3.Resolver = Resolver;\n var defaultFormatter = null;\n var nextPollId = 1;\n var BaseProvider = (\n /** @class */\n function(_super) {\n __extends3(BaseProvider2, _super);\n function BaseProvider2(network) {\n var _newTarget = this.constructor;\n var _this = _super.call(this) || this;\n _this._events = [];\n _this._emitted = { block: -2 };\n _this.disableCcipRead = false;\n _this.formatter = _newTarget.getFormatter();\n (0, properties_1.defineReadOnly)(_this, \"anyNetwork\", network === \"any\");\n if (_this.anyNetwork) {\n network = _this.detectNetwork();\n }\n if (network instanceof Promise) {\n _this._networkPromise = network;\n network.catch(function(error) {\n });\n _this._ready().catch(function(error) {\n });\n } else {\n var knownNetwork = (0, properties_1.getStatic)(_newTarget, \"getNetwork\")(network);\n if (knownNetwork) {\n (0, properties_1.defineReadOnly)(_this, \"_network\", knownNetwork);\n _this.emit(\"network\", knownNetwork, null);\n } else {\n logger.throwArgumentError(\"invalid network\", \"network\", network);\n }\n }\n _this._maxInternalBlockNumber = -1024;\n _this._lastBlockNumber = -2;\n _this._maxFilterBlockRange = 10;\n _this._pollingInterval = 4e3;\n _this._fastQueryDate = 0;\n return _this;\n }\n BaseProvider2.prototype._ready = function() {\n return __awaiter3(this, void 0, void 0, function() {\n var network, error_4;\n return __generator3(this, function(_a) {\n switch (_a.label) {\n case 0:\n if (!(this._network == null))\n return [3, 7];\n network = null;\n if (!this._networkPromise)\n return [3, 4];\n _a.label = 1;\n case 1:\n _a.trys.push([1, 3, , 4]);\n return [4, this._networkPromise];\n case 2:\n network = _a.sent();\n return [3, 4];\n case 3:\n error_4 = _a.sent();\n return [3, 4];\n case 4:\n if (!(network == null))\n return [3, 6];\n return [4, this.detectNetwork()];\n case 5:\n network = _a.sent();\n _a.label = 6;\n case 6:\n if (!network) {\n logger.throwError(\"no network detected\", logger_1.Logger.errors.UNKNOWN_ERROR, {});\n }\n if (this._network == null) {\n if (this.anyNetwork) {\n this._network = network;\n } else {\n (0, properties_1.defineReadOnly)(this, \"_network\", network);\n }\n this.emit(\"network\", network, null);\n }\n _a.label = 7;\n case 7:\n return [2, this._network];\n }\n });\n });\n };\n Object.defineProperty(BaseProvider2.prototype, \"ready\", {\n // This will always return the most recently established network.\n // For \"any\", this can change (a \"network\" event is emitted before\n // any change is reflected); otherwise this cannot change\n get: function() {\n var _this = this;\n return (0, web_1.poll)(function() {\n return _this._ready().then(function(network) {\n return network;\n }, function(error) {\n if (error.code === logger_1.Logger.errors.NETWORK_ERROR && error.event === \"noNetwork\") {\n return void 0;\n }\n throw error;\n });\n });\n },\n enumerable: false,\n configurable: true\n });\n BaseProvider2.getFormatter = function() {\n if (defaultFormatter == null) {\n defaultFormatter = new formatter_1.Formatter();\n }\n return defaultFormatter;\n };\n BaseProvider2.getNetwork = function(network) {\n return (0, networks_1.getNetwork)(network == null ? \"homestead\" : network);\n };\n BaseProvider2.prototype.ccipReadFetch = function(tx, calldata, urls) {\n return __awaiter3(this, void 0, void 0, function() {\n var sender, data, errorMessages, i3, url, href, json, result, errorMessage;\n return __generator3(this, function(_a) {\n switch (_a.label) {\n case 0:\n if (this.disableCcipRead || urls.length === 0) {\n return [2, null];\n }\n sender = tx.to.toLowerCase();\n data = calldata.toLowerCase();\n errorMessages = [];\n i3 = 0;\n _a.label = 1;\n case 1:\n if (!(i3 < urls.length))\n return [3, 4];\n url = urls[i3];\n href = url.replace(\"{sender}\", sender).replace(\"{data}\", data);\n json = url.indexOf(\"{data}\") >= 0 ? null : JSON.stringify({ data, sender });\n return [4, (0, web_1.fetchJson)({ url: href, errorPassThrough: true }, json, function(value, response) {\n value.status = response.statusCode;\n return value;\n })];\n case 2:\n result = _a.sent();\n if (result.data) {\n return [2, result.data];\n }\n errorMessage = result.message || \"unknown error\";\n if (result.status >= 400 && result.status < 500) {\n return [2, logger.throwError(\"response not found during CCIP fetch: \" + errorMessage, logger_1.Logger.errors.SERVER_ERROR, { url, errorMessage })];\n }\n errorMessages.push(errorMessage);\n _a.label = 3;\n case 3:\n i3++;\n return [3, 1];\n case 4:\n return [2, logger.throwError(\"error encountered during CCIP fetch: \" + errorMessages.map(function(m2) {\n return JSON.stringify(m2);\n }).join(\", \"), logger_1.Logger.errors.SERVER_ERROR, {\n urls,\n errorMessages\n })];\n }\n });\n });\n };\n BaseProvider2.prototype._getInternalBlockNumber = function(maxAge) {\n return __awaiter3(this, void 0, void 0, function() {\n var internalBlockNumber, result, error_5, reqTime, checkInternalBlockNumber;\n var _this = this;\n return __generator3(this, function(_a) {\n switch (_a.label) {\n case 0:\n return [4, this._ready()];\n case 1:\n _a.sent();\n if (!(maxAge > 0))\n return [3, 7];\n _a.label = 2;\n case 2:\n if (!this._internalBlockNumber)\n return [3, 7];\n internalBlockNumber = this._internalBlockNumber;\n _a.label = 3;\n case 3:\n _a.trys.push([3, 5, , 6]);\n return [4, internalBlockNumber];\n case 4:\n result = _a.sent();\n if (getTime() - result.respTime <= maxAge) {\n return [2, result.blockNumber];\n }\n return [3, 7];\n case 5:\n error_5 = _a.sent();\n if (this._internalBlockNumber === internalBlockNumber) {\n return [3, 7];\n }\n return [3, 6];\n case 6:\n return [3, 2];\n case 7:\n reqTime = getTime();\n checkInternalBlockNumber = (0, properties_1.resolveProperties)({\n blockNumber: this.perform(\"getBlockNumber\", {}),\n networkError: this.getNetwork().then(function(network) {\n return null;\n }, function(error) {\n return error;\n })\n }).then(function(_a2) {\n var blockNumber = _a2.blockNumber, networkError = _a2.networkError;\n if (networkError) {\n if (_this._internalBlockNumber === checkInternalBlockNumber) {\n _this._internalBlockNumber = null;\n }\n throw networkError;\n }\n var respTime = getTime();\n blockNumber = bignumber_1.BigNumber.from(blockNumber).toNumber();\n if (blockNumber < _this._maxInternalBlockNumber) {\n blockNumber = _this._maxInternalBlockNumber;\n }\n _this._maxInternalBlockNumber = blockNumber;\n _this._setFastBlockNumber(blockNumber);\n return { blockNumber, reqTime, respTime };\n });\n this._internalBlockNumber = checkInternalBlockNumber;\n checkInternalBlockNumber.catch(function(error) {\n if (_this._internalBlockNumber === checkInternalBlockNumber) {\n _this._internalBlockNumber = null;\n }\n });\n return [4, checkInternalBlockNumber];\n case 8:\n return [2, _a.sent().blockNumber];\n }\n });\n });\n };\n BaseProvider2.prototype.poll = function() {\n return __awaiter3(this, void 0, void 0, function() {\n var pollId, runners, blockNumber, error_6, i3;\n var _this = this;\n return __generator3(this, function(_a) {\n switch (_a.label) {\n case 0:\n pollId = nextPollId++;\n runners = [];\n blockNumber = null;\n _a.label = 1;\n case 1:\n _a.trys.push([1, 3, , 4]);\n return [4, this._getInternalBlockNumber(100 + this.pollingInterval / 2)];\n case 2:\n blockNumber = _a.sent();\n return [3, 4];\n case 3:\n error_6 = _a.sent();\n this.emit(\"error\", error_6);\n return [\n 2\n /*return*/\n ];\n case 4:\n this._setFastBlockNumber(blockNumber);\n this.emit(\"poll\", pollId, blockNumber);\n if (blockNumber === this._lastBlockNumber) {\n this.emit(\"didPoll\", pollId);\n return [\n 2\n /*return*/\n ];\n }\n if (this._emitted.block === -2) {\n this._emitted.block = blockNumber - 1;\n }\n if (Math.abs(this._emitted.block - blockNumber) > 1e3) {\n logger.warn(\"network block skew detected; skipping block events (emitted=\" + this._emitted.block + \" blockNumber\" + blockNumber + \")\");\n this.emit(\"error\", logger.makeError(\"network block skew detected\", logger_1.Logger.errors.NETWORK_ERROR, {\n blockNumber,\n event: \"blockSkew\",\n previousBlockNumber: this._emitted.block\n }));\n this.emit(\"block\", blockNumber);\n } else {\n for (i3 = this._emitted.block + 1; i3 <= blockNumber; i3++) {\n this.emit(\"block\", i3);\n }\n }\n if (this._emitted.block !== blockNumber) {\n this._emitted.block = blockNumber;\n Object.keys(this._emitted).forEach(function(key) {\n if (key === \"block\") {\n return;\n }\n var eventBlockNumber = _this._emitted[key];\n if (eventBlockNumber === \"pending\") {\n return;\n }\n if (blockNumber - eventBlockNumber > 12) {\n delete _this._emitted[key];\n }\n });\n }\n if (this._lastBlockNumber === -2) {\n this._lastBlockNumber = blockNumber - 1;\n }\n this._events.forEach(function(event) {\n switch (event.type) {\n case \"tx\": {\n var hash_2 = event.hash;\n var runner = _this.getTransactionReceipt(hash_2).then(function(receipt) {\n if (!receipt || receipt.blockNumber == null) {\n return null;\n }\n _this._emitted[\"t:\" + hash_2] = receipt.blockNumber;\n _this.emit(hash_2, receipt);\n return null;\n }).catch(function(error) {\n _this.emit(\"error\", error);\n });\n runners.push(runner);\n break;\n }\n case \"filter\": {\n if (!event._inflight) {\n event._inflight = true;\n if (event._lastBlockNumber === -2) {\n event._lastBlockNumber = blockNumber - 1;\n }\n var filter_1 = event.filter;\n filter_1.fromBlock = event._lastBlockNumber + 1;\n filter_1.toBlock = blockNumber;\n var minFromBlock = filter_1.toBlock - _this._maxFilterBlockRange;\n if (minFromBlock > filter_1.fromBlock) {\n filter_1.fromBlock = minFromBlock;\n }\n if (filter_1.fromBlock < 0) {\n filter_1.fromBlock = 0;\n }\n var runner = _this.getLogs(filter_1).then(function(logs) {\n event._inflight = false;\n if (logs.length === 0) {\n return;\n }\n logs.forEach(function(log) {\n if (log.blockNumber > event._lastBlockNumber) {\n event._lastBlockNumber = log.blockNumber;\n }\n _this._emitted[\"b:\" + log.blockHash] = log.blockNumber;\n _this._emitted[\"t:\" + log.transactionHash] = log.blockNumber;\n _this.emit(filter_1, log);\n });\n }).catch(function(error) {\n _this.emit(\"error\", error);\n event._inflight = false;\n });\n runners.push(runner);\n }\n break;\n }\n }\n });\n this._lastBlockNumber = blockNumber;\n Promise.all(runners).then(function() {\n _this.emit(\"didPoll\", pollId);\n }).catch(function(error) {\n _this.emit(\"error\", error);\n });\n return [\n 2\n /*return*/\n ];\n }\n });\n });\n };\n BaseProvider2.prototype.resetEventsBlock = function(blockNumber) {\n this._lastBlockNumber = blockNumber - 1;\n if (this.polling) {\n this.poll();\n }\n };\n Object.defineProperty(BaseProvider2.prototype, \"network\", {\n get: function() {\n return this._network;\n },\n enumerable: false,\n configurable: true\n });\n BaseProvider2.prototype.detectNetwork = function() {\n return __awaiter3(this, void 0, void 0, function() {\n return __generator3(this, function(_a) {\n return [2, logger.throwError(\"provider does not support network detection\", logger_1.Logger.errors.UNSUPPORTED_OPERATION, {\n operation: \"provider.detectNetwork\"\n })];\n });\n });\n };\n BaseProvider2.prototype.getNetwork = function() {\n return __awaiter3(this, void 0, void 0, function() {\n var network, currentNetwork, error;\n return __generator3(this, function(_a) {\n switch (_a.label) {\n case 0:\n return [4, this._ready()];\n case 1:\n network = _a.sent();\n return [4, this.detectNetwork()];\n case 2:\n currentNetwork = _a.sent();\n if (!(network.chainId !== currentNetwork.chainId))\n return [3, 5];\n if (!this.anyNetwork)\n return [3, 4];\n this._network = currentNetwork;\n this._lastBlockNumber = -2;\n this._fastBlockNumber = null;\n this._fastBlockNumberPromise = null;\n this._fastQueryDate = 0;\n this._emitted.block = -2;\n this._maxInternalBlockNumber = -1024;\n this._internalBlockNumber = null;\n this.emit(\"network\", currentNetwork, network);\n return [4, stall(0)];\n case 3:\n _a.sent();\n return [2, this._network];\n case 4:\n error = logger.makeError(\"underlying network changed\", logger_1.Logger.errors.NETWORK_ERROR, {\n event: \"changed\",\n network,\n detectedNetwork: currentNetwork\n });\n this.emit(\"error\", error);\n throw error;\n case 5:\n return [2, network];\n }\n });\n });\n };\n Object.defineProperty(BaseProvider2.prototype, \"blockNumber\", {\n get: function() {\n var _this = this;\n this._getInternalBlockNumber(100 + this.pollingInterval / 2).then(function(blockNumber) {\n _this._setFastBlockNumber(blockNumber);\n }, function(error) {\n });\n return this._fastBlockNumber != null ? this._fastBlockNumber : -1;\n },\n enumerable: false,\n configurable: true\n });\n Object.defineProperty(BaseProvider2.prototype, \"polling\", {\n get: function() {\n return this._poller != null;\n },\n set: function(value) {\n var _this = this;\n if (value && !this._poller) {\n this._poller = setInterval(function() {\n _this.poll();\n }, this.pollingInterval);\n if (!this._bootstrapPoll) {\n this._bootstrapPoll = setTimeout(function() {\n _this.poll();\n _this._bootstrapPoll = setTimeout(function() {\n if (!_this._poller) {\n _this.poll();\n }\n _this._bootstrapPoll = null;\n }, _this.pollingInterval);\n }, 0);\n }\n } else if (!value && this._poller) {\n clearInterval(this._poller);\n this._poller = null;\n }\n },\n enumerable: false,\n configurable: true\n });\n Object.defineProperty(BaseProvider2.prototype, \"pollingInterval\", {\n get: function() {\n return this._pollingInterval;\n },\n set: function(value) {\n var _this = this;\n if (typeof value !== \"number\" || value <= 0 || parseInt(String(value)) != value) {\n throw new Error(\"invalid polling interval\");\n }\n this._pollingInterval = value;\n if (this._poller) {\n clearInterval(this._poller);\n this._poller = setInterval(function() {\n _this.poll();\n }, this._pollingInterval);\n }\n },\n enumerable: false,\n configurable: true\n });\n BaseProvider2.prototype._getFastBlockNumber = function() {\n var _this = this;\n var now = getTime();\n if (now - this._fastQueryDate > 2 * this._pollingInterval) {\n this._fastQueryDate = now;\n this._fastBlockNumberPromise = this.getBlockNumber().then(function(blockNumber) {\n if (_this._fastBlockNumber == null || blockNumber > _this._fastBlockNumber) {\n _this._fastBlockNumber = blockNumber;\n }\n return _this._fastBlockNumber;\n });\n }\n return this._fastBlockNumberPromise;\n };\n BaseProvider2.prototype._setFastBlockNumber = function(blockNumber) {\n if (this._fastBlockNumber != null && blockNumber < this._fastBlockNumber) {\n return;\n }\n this._fastQueryDate = getTime();\n if (this._fastBlockNumber == null || blockNumber > this._fastBlockNumber) {\n this._fastBlockNumber = blockNumber;\n this._fastBlockNumberPromise = Promise.resolve(blockNumber);\n }\n };\n BaseProvider2.prototype.waitForTransaction = function(transactionHash, confirmations, timeout) {\n return __awaiter3(this, void 0, void 0, function() {\n return __generator3(this, function(_a) {\n return [2, this._waitForTransaction(transactionHash, confirmations == null ? 1 : confirmations, timeout || 0, null)];\n });\n });\n };\n BaseProvider2.prototype._waitForTransaction = function(transactionHash, confirmations, timeout, replaceable) {\n return __awaiter3(this, void 0, void 0, function() {\n var receipt;\n var _this = this;\n return __generator3(this, function(_a) {\n switch (_a.label) {\n case 0:\n return [4, this.getTransactionReceipt(transactionHash)];\n case 1:\n receipt = _a.sent();\n if ((receipt ? receipt.confirmations : 0) >= confirmations) {\n return [2, receipt];\n }\n return [2, new Promise(function(resolve, reject) {\n var cancelFuncs = [];\n var done = false;\n var alreadyDone = function() {\n if (done) {\n return true;\n }\n done = true;\n cancelFuncs.forEach(function(func) {\n func();\n });\n return false;\n };\n var minedHandler = function(receipt2) {\n if (receipt2.confirmations < confirmations) {\n return;\n }\n if (alreadyDone()) {\n return;\n }\n resolve(receipt2);\n };\n _this.on(transactionHash, minedHandler);\n cancelFuncs.push(function() {\n _this.removeListener(transactionHash, minedHandler);\n });\n if (replaceable) {\n var lastBlockNumber_1 = replaceable.startBlock;\n var scannedBlock_1 = null;\n var replaceHandler_1 = function(blockNumber) {\n return __awaiter3(_this, void 0, void 0, function() {\n var _this2 = this;\n return __generator3(this, function(_a2) {\n switch (_a2.label) {\n case 0:\n if (done) {\n return [\n 2\n /*return*/\n ];\n }\n return [4, stall(1e3)];\n case 1:\n _a2.sent();\n this.getTransactionCount(replaceable.from).then(function(nonce) {\n return __awaiter3(_this2, void 0, void 0, function() {\n var mined, block, ti, tx, receipt_1, reason;\n return __generator3(this, function(_a3) {\n switch (_a3.label) {\n case 0:\n if (done) {\n return [\n 2\n /*return*/\n ];\n }\n if (!(nonce <= replaceable.nonce))\n return [3, 1];\n lastBlockNumber_1 = blockNumber;\n return [3, 9];\n case 1:\n return [4, this.getTransaction(transactionHash)];\n case 2:\n mined = _a3.sent();\n if (mined && mined.blockNumber != null) {\n return [\n 2\n /*return*/\n ];\n }\n if (scannedBlock_1 == null) {\n scannedBlock_1 = lastBlockNumber_1 - 3;\n if (scannedBlock_1 < replaceable.startBlock) {\n scannedBlock_1 = replaceable.startBlock;\n }\n }\n _a3.label = 3;\n case 3:\n if (!(scannedBlock_1 <= blockNumber))\n return [3, 9];\n if (done) {\n return [\n 2\n /*return*/\n ];\n }\n return [4, this.getBlockWithTransactions(scannedBlock_1)];\n case 4:\n block = _a3.sent();\n ti = 0;\n _a3.label = 5;\n case 5:\n if (!(ti < block.transactions.length))\n return [3, 8];\n tx = block.transactions[ti];\n if (tx.hash === transactionHash) {\n return [\n 2\n /*return*/\n ];\n }\n if (!(tx.from === replaceable.from && tx.nonce === replaceable.nonce))\n return [3, 7];\n if (done) {\n return [\n 2\n /*return*/\n ];\n }\n return [4, this.waitForTransaction(tx.hash, confirmations)];\n case 6:\n receipt_1 = _a3.sent();\n if (alreadyDone()) {\n return [\n 2\n /*return*/\n ];\n }\n reason = \"replaced\";\n if (tx.data === replaceable.data && tx.to === replaceable.to && tx.value.eq(replaceable.value)) {\n reason = \"repriced\";\n } else if (tx.data === \"0x\" && tx.from === tx.to && tx.value.isZero()) {\n reason = \"cancelled\";\n }\n reject(logger.makeError(\"transaction was replaced\", logger_1.Logger.errors.TRANSACTION_REPLACED, {\n cancelled: reason === \"replaced\" || reason === \"cancelled\",\n reason,\n replacement: this._wrapTransaction(tx),\n hash: transactionHash,\n receipt: receipt_1\n }));\n return [\n 2\n /*return*/\n ];\n case 7:\n ti++;\n return [3, 5];\n case 8:\n scannedBlock_1++;\n return [3, 3];\n case 9:\n if (done) {\n return [\n 2\n /*return*/\n ];\n }\n this.once(\"block\", replaceHandler_1);\n return [\n 2\n /*return*/\n ];\n }\n });\n });\n }, function(error) {\n if (done) {\n return;\n }\n _this2.once(\"block\", replaceHandler_1);\n });\n return [\n 2\n /*return*/\n ];\n }\n });\n });\n };\n if (done) {\n return;\n }\n _this.once(\"block\", replaceHandler_1);\n cancelFuncs.push(function() {\n _this.removeListener(\"block\", replaceHandler_1);\n });\n }\n if (typeof timeout === \"number\" && timeout > 0) {\n var timer_1 = setTimeout(function() {\n if (alreadyDone()) {\n return;\n }\n reject(logger.makeError(\"timeout exceeded\", logger_1.Logger.errors.TIMEOUT, { timeout }));\n }, timeout);\n if (timer_1.unref) {\n timer_1.unref();\n }\n cancelFuncs.push(function() {\n clearTimeout(timer_1);\n });\n }\n })];\n }\n });\n });\n };\n BaseProvider2.prototype.getBlockNumber = function() {\n return __awaiter3(this, void 0, void 0, function() {\n return __generator3(this, function(_a) {\n return [2, this._getInternalBlockNumber(0)];\n });\n });\n };\n BaseProvider2.prototype.getGasPrice = function() {\n return __awaiter3(this, void 0, void 0, function() {\n var result;\n return __generator3(this, function(_a) {\n switch (_a.label) {\n case 0:\n return [4, this.getNetwork()];\n case 1:\n _a.sent();\n return [4, this.perform(\"getGasPrice\", {})];\n case 2:\n result = _a.sent();\n try {\n return [2, bignumber_1.BigNumber.from(result)];\n } catch (error) {\n return [2, logger.throwError(\"bad result from backend\", logger_1.Logger.errors.SERVER_ERROR, {\n method: \"getGasPrice\",\n result,\n error\n })];\n }\n return [\n 2\n /*return*/\n ];\n }\n });\n });\n };\n BaseProvider2.prototype.getBalance = function(addressOrName, blockTag) {\n return __awaiter3(this, void 0, void 0, function() {\n var params, result;\n return __generator3(this, function(_a) {\n switch (_a.label) {\n case 0:\n return [4, this.getNetwork()];\n case 1:\n _a.sent();\n return [4, (0, properties_1.resolveProperties)({\n address: this._getAddress(addressOrName),\n blockTag: this._getBlockTag(blockTag)\n })];\n case 2:\n params = _a.sent();\n return [4, this.perform(\"getBalance\", params)];\n case 3:\n result = _a.sent();\n try {\n return [2, bignumber_1.BigNumber.from(result)];\n } catch (error) {\n return [2, logger.throwError(\"bad result from backend\", logger_1.Logger.errors.SERVER_ERROR, {\n method: \"getBalance\",\n params,\n result,\n error\n })];\n }\n return [\n 2\n /*return*/\n ];\n }\n });\n });\n };\n BaseProvider2.prototype.getTransactionCount = function(addressOrName, blockTag) {\n return __awaiter3(this, void 0, void 0, function() {\n var params, result;\n return __generator3(this, function(_a) {\n switch (_a.label) {\n case 0:\n return [4, this.getNetwork()];\n case 1:\n _a.sent();\n return [4, (0, properties_1.resolveProperties)({\n address: this._getAddress(addressOrName),\n blockTag: this._getBlockTag(blockTag)\n })];\n case 2:\n params = _a.sent();\n return [4, this.perform(\"getTransactionCount\", params)];\n case 3:\n result = _a.sent();\n try {\n return [2, bignumber_1.BigNumber.from(result).toNumber()];\n } catch (error) {\n return [2, logger.throwError(\"bad result from backend\", logger_1.Logger.errors.SERVER_ERROR, {\n method: \"getTransactionCount\",\n params,\n result,\n error\n })];\n }\n return [\n 2\n /*return*/\n ];\n }\n });\n });\n };\n BaseProvider2.prototype.getCode = function(addressOrName, blockTag) {\n return __awaiter3(this, void 0, void 0, function() {\n var params, result;\n return __generator3(this, function(_a) {\n switch (_a.label) {\n case 0:\n return [4, this.getNetwork()];\n case 1:\n _a.sent();\n return [4, (0, properties_1.resolveProperties)({\n address: this._getAddress(addressOrName),\n blockTag: this._getBlockTag(blockTag)\n })];\n case 2:\n params = _a.sent();\n return [4, this.perform(\"getCode\", params)];\n case 3:\n result = _a.sent();\n try {\n return [2, (0, bytes_1.hexlify)(result)];\n } catch (error) {\n return [2, logger.throwError(\"bad result from backend\", logger_1.Logger.errors.SERVER_ERROR, {\n method: \"getCode\",\n params,\n result,\n error\n })];\n }\n return [\n 2\n /*return*/\n ];\n }\n });\n });\n };\n BaseProvider2.prototype.getStorageAt = function(addressOrName, position, blockTag) {\n return __awaiter3(this, void 0, void 0, function() {\n var params, result;\n return __generator3(this, function(_a) {\n switch (_a.label) {\n case 0:\n return [4, this.getNetwork()];\n case 1:\n _a.sent();\n return [4, (0, properties_1.resolveProperties)({\n address: this._getAddress(addressOrName),\n blockTag: this._getBlockTag(blockTag),\n position: Promise.resolve(position).then(function(p4) {\n return (0, bytes_1.hexValue)(p4);\n })\n })];\n case 2:\n params = _a.sent();\n return [4, this.perform(\"getStorageAt\", params)];\n case 3:\n result = _a.sent();\n try {\n return [2, (0, bytes_1.hexlify)(result)];\n } catch (error) {\n return [2, logger.throwError(\"bad result from backend\", logger_1.Logger.errors.SERVER_ERROR, {\n method: \"getStorageAt\",\n params,\n result,\n error\n })];\n }\n return [\n 2\n /*return*/\n ];\n }\n });\n });\n };\n BaseProvider2.prototype._wrapTransaction = function(tx, hash3, startBlock) {\n var _this = this;\n if (hash3 != null && (0, bytes_1.hexDataLength)(hash3) !== 32) {\n throw new Error(\"invalid response - sendTransaction\");\n }\n var result = tx;\n if (hash3 != null && tx.hash !== hash3) {\n logger.throwError(\"Transaction hash mismatch from Provider.sendTransaction.\", logger_1.Logger.errors.UNKNOWN_ERROR, { expectedHash: tx.hash, returnedHash: hash3 });\n }\n result.wait = function(confirms, timeout) {\n return __awaiter3(_this, void 0, void 0, function() {\n var replacement, receipt;\n return __generator3(this, function(_a) {\n switch (_a.label) {\n case 0:\n if (confirms == null) {\n confirms = 1;\n }\n if (timeout == null) {\n timeout = 0;\n }\n replacement = void 0;\n if (confirms !== 0 && startBlock != null) {\n replacement = {\n data: tx.data,\n from: tx.from,\n nonce: tx.nonce,\n to: tx.to,\n value: tx.value,\n startBlock\n };\n }\n return [4, this._waitForTransaction(tx.hash, confirms, timeout, replacement)];\n case 1:\n receipt = _a.sent();\n if (receipt == null && confirms === 0) {\n return [2, null];\n }\n this._emitted[\"t:\" + tx.hash] = receipt.blockNumber;\n if (receipt.status === 0) {\n logger.throwError(\"transaction failed\", logger_1.Logger.errors.CALL_EXCEPTION, {\n transactionHash: tx.hash,\n transaction: tx,\n receipt\n });\n }\n return [2, receipt];\n }\n });\n });\n };\n return result;\n };\n BaseProvider2.prototype.sendTransaction = function(signedTransaction) {\n return __awaiter3(this, void 0, void 0, function() {\n var hexTx, tx, blockNumber, hash3, error_7;\n return __generator3(this, function(_a) {\n switch (_a.label) {\n case 0:\n return [4, this.getNetwork()];\n case 1:\n _a.sent();\n return [4, Promise.resolve(signedTransaction).then(function(t3) {\n return (0, bytes_1.hexlify)(t3);\n })];\n case 2:\n hexTx = _a.sent();\n tx = this.formatter.transaction(signedTransaction);\n if (tx.confirmations == null) {\n tx.confirmations = 0;\n }\n return [4, this._getInternalBlockNumber(100 + 2 * this.pollingInterval)];\n case 3:\n blockNumber = _a.sent();\n _a.label = 4;\n case 4:\n _a.trys.push([4, 6, , 7]);\n return [4, this.perform(\"sendTransaction\", { signedTransaction: hexTx })];\n case 5:\n hash3 = _a.sent();\n return [2, this._wrapTransaction(tx, hash3, blockNumber)];\n case 6:\n error_7 = _a.sent();\n error_7.transaction = tx;\n error_7.transactionHash = tx.hash;\n throw error_7;\n case 7:\n return [\n 2\n /*return*/\n ];\n }\n });\n });\n };\n BaseProvider2.prototype._getTransactionRequest = function(transaction) {\n return __awaiter3(this, void 0, void 0, function() {\n var values, tx, _a, _b;\n var _this = this;\n return __generator3(this, function(_c) {\n switch (_c.label) {\n case 0:\n return [4, transaction];\n case 1:\n values = _c.sent();\n tx = {};\n [\"from\", \"to\"].forEach(function(key) {\n if (values[key] == null) {\n return;\n }\n tx[key] = Promise.resolve(values[key]).then(function(v2) {\n return v2 ? _this._getAddress(v2) : null;\n });\n });\n [\"gasLimit\", \"gasPrice\", \"maxFeePerGas\", \"maxPriorityFeePerGas\", \"value\"].forEach(function(key) {\n if (values[key] == null) {\n return;\n }\n tx[key] = Promise.resolve(values[key]).then(function(v2) {\n return v2 ? bignumber_1.BigNumber.from(v2) : null;\n });\n });\n [\"type\"].forEach(function(key) {\n if (values[key] == null) {\n return;\n }\n tx[key] = Promise.resolve(values[key]).then(function(v2) {\n return v2 != null ? v2 : null;\n });\n });\n if (values.accessList) {\n tx.accessList = this.formatter.accessList(values.accessList);\n }\n [\"data\"].forEach(function(key) {\n if (values[key] == null) {\n return;\n }\n tx[key] = Promise.resolve(values[key]).then(function(v2) {\n return v2 ? (0, bytes_1.hexlify)(v2) : null;\n });\n });\n _b = (_a = this.formatter).transactionRequest;\n return [4, (0, properties_1.resolveProperties)(tx)];\n case 2:\n return [2, _b.apply(_a, [_c.sent()])];\n }\n });\n });\n };\n BaseProvider2.prototype._getFilter = function(filter) {\n return __awaiter3(this, void 0, void 0, function() {\n var result, _a, _b;\n var _this = this;\n return __generator3(this, function(_c) {\n switch (_c.label) {\n case 0:\n return [4, filter];\n case 1:\n filter = _c.sent();\n result = {};\n if (filter.address != null) {\n result.address = this._getAddress(filter.address);\n }\n [\"blockHash\", \"topics\"].forEach(function(key) {\n if (filter[key] == null) {\n return;\n }\n result[key] = filter[key];\n });\n [\"fromBlock\", \"toBlock\"].forEach(function(key) {\n if (filter[key] == null) {\n return;\n }\n result[key] = _this._getBlockTag(filter[key]);\n });\n _b = (_a = this.formatter).filter;\n return [4, (0, properties_1.resolveProperties)(result)];\n case 2:\n return [2, _b.apply(_a, [_c.sent()])];\n }\n });\n });\n };\n BaseProvider2.prototype._call = function(transaction, blockTag, attempt) {\n return __awaiter3(this, void 0, void 0, function() {\n var txSender, result, data, sender, urls, urlsOffset, urlsLength, urlsData, u2, url, calldata, callbackSelector, extraData, ccipResult, tx, error_8;\n return __generator3(this, function(_a) {\n switch (_a.label) {\n case 0:\n if (attempt >= MAX_CCIP_REDIRECTS) {\n logger.throwError(\"CCIP read exceeded maximum redirections\", logger_1.Logger.errors.SERVER_ERROR, {\n redirects: attempt,\n transaction\n });\n }\n txSender = transaction.to;\n return [4, this.perform(\"call\", { transaction, blockTag })];\n case 1:\n result = _a.sent();\n if (!(attempt >= 0 && blockTag === \"latest\" && txSender != null && result.substring(0, 10) === \"0x556f1830\" && (0, bytes_1.hexDataLength)(result) % 32 === 4))\n return [3, 5];\n _a.label = 2;\n case 2:\n _a.trys.push([2, 4, , 5]);\n data = (0, bytes_1.hexDataSlice)(result, 4);\n sender = (0, bytes_1.hexDataSlice)(data, 0, 32);\n if (!bignumber_1.BigNumber.from(sender).eq(txSender)) {\n logger.throwError(\"CCIP Read sender did not match\", logger_1.Logger.errors.CALL_EXCEPTION, {\n name: \"OffchainLookup\",\n signature: \"OffchainLookup(address,string[],bytes,bytes4,bytes)\",\n transaction,\n data: result\n });\n }\n urls = [];\n urlsOffset = bignumber_1.BigNumber.from((0, bytes_1.hexDataSlice)(data, 32, 64)).toNumber();\n urlsLength = bignumber_1.BigNumber.from((0, bytes_1.hexDataSlice)(data, urlsOffset, urlsOffset + 32)).toNumber();\n urlsData = (0, bytes_1.hexDataSlice)(data, urlsOffset + 32);\n for (u2 = 0; u2 < urlsLength; u2++) {\n url = _parseString(urlsData, u2 * 32);\n if (url == null) {\n logger.throwError(\"CCIP Read contained corrupt URL string\", logger_1.Logger.errors.CALL_EXCEPTION, {\n name: \"OffchainLookup\",\n signature: \"OffchainLookup(address,string[],bytes,bytes4,bytes)\",\n transaction,\n data: result\n });\n }\n urls.push(url);\n }\n calldata = _parseBytes(data, 64);\n if (!bignumber_1.BigNumber.from((0, bytes_1.hexDataSlice)(data, 100, 128)).isZero()) {\n logger.throwError(\"CCIP Read callback selector included junk\", logger_1.Logger.errors.CALL_EXCEPTION, {\n name: \"OffchainLookup\",\n signature: \"OffchainLookup(address,string[],bytes,bytes4,bytes)\",\n transaction,\n data: result\n });\n }\n callbackSelector = (0, bytes_1.hexDataSlice)(data, 96, 100);\n extraData = _parseBytes(data, 128);\n return [4, this.ccipReadFetch(transaction, calldata, urls)];\n case 3:\n ccipResult = _a.sent();\n if (ccipResult == null) {\n logger.throwError(\"CCIP Read disabled or provided no URLs\", logger_1.Logger.errors.CALL_EXCEPTION, {\n name: \"OffchainLookup\",\n signature: \"OffchainLookup(address,string[],bytes,bytes4,bytes)\",\n transaction,\n data: result\n });\n }\n tx = {\n to: txSender,\n data: (0, bytes_1.hexConcat)([callbackSelector, encodeBytes3([ccipResult, extraData])])\n };\n return [2, this._call(tx, blockTag, attempt + 1)];\n case 4:\n error_8 = _a.sent();\n if (error_8.code === logger_1.Logger.errors.SERVER_ERROR) {\n throw error_8;\n }\n return [3, 5];\n case 5:\n try {\n return [2, (0, bytes_1.hexlify)(result)];\n } catch (error) {\n return [2, logger.throwError(\"bad result from backend\", logger_1.Logger.errors.SERVER_ERROR, {\n method: \"call\",\n params: { transaction, blockTag },\n result,\n error\n })];\n }\n return [\n 2\n /*return*/\n ];\n }\n });\n });\n };\n BaseProvider2.prototype.call = function(transaction, blockTag) {\n return __awaiter3(this, void 0, void 0, function() {\n var resolved;\n return __generator3(this, function(_a) {\n switch (_a.label) {\n case 0:\n return [4, this.getNetwork()];\n case 1:\n _a.sent();\n return [4, (0, properties_1.resolveProperties)({\n transaction: this._getTransactionRequest(transaction),\n blockTag: this._getBlockTag(blockTag),\n ccipReadEnabled: Promise.resolve(transaction.ccipReadEnabled)\n })];\n case 2:\n resolved = _a.sent();\n return [2, this._call(resolved.transaction, resolved.blockTag, resolved.ccipReadEnabled ? 0 : -1)];\n }\n });\n });\n };\n BaseProvider2.prototype.estimateGas = function(transaction) {\n return __awaiter3(this, void 0, void 0, function() {\n var params, result;\n return __generator3(this, function(_a) {\n switch (_a.label) {\n case 0:\n return [4, this.getNetwork()];\n case 1:\n _a.sent();\n return [4, (0, properties_1.resolveProperties)({\n transaction: this._getTransactionRequest(transaction)\n })];\n case 2:\n params = _a.sent();\n return [4, this.perform(\"estimateGas\", params)];\n case 3:\n result = _a.sent();\n try {\n return [2, bignumber_1.BigNumber.from(result)];\n } catch (error) {\n return [2, logger.throwError(\"bad result from backend\", logger_1.Logger.errors.SERVER_ERROR, {\n method: \"estimateGas\",\n params,\n result,\n error\n })];\n }\n return [\n 2\n /*return*/\n ];\n }\n });\n });\n };\n BaseProvider2.prototype._getAddress = function(addressOrName) {\n return __awaiter3(this, void 0, void 0, function() {\n var address;\n return __generator3(this, function(_a) {\n switch (_a.label) {\n case 0:\n return [4, addressOrName];\n case 1:\n addressOrName = _a.sent();\n if (typeof addressOrName !== \"string\") {\n logger.throwArgumentError(\"invalid address or ENS name\", \"name\", addressOrName);\n }\n return [4, this.resolveName(addressOrName)];\n case 2:\n address = _a.sent();\n if (address == null) {\n logger.throwError(\"ENS name not configured\", logger_1.Logger.errors.UNSUPPORTED_OPERATION, {\n operation: \"resolveName(\" + JSON.stringify(addressOrName) + \")\"\n });\n }\n return [2, address];\n }\n });\n });\n };\n BaseProvider2.prototype._getBlock = function(blockHashOrBlockTag, includeTransactions) {\n return __awaiter3(this, void 0, void 0, function() {\n var blockNumber, params, _a, error_9;\n var _this = this;\n return __generator3(this, function(_b) {\n switch (_b.label) {\n case 0:\n return [4, this.getNetwork()];\n case 1:\n _b.sent();\n return [4, blockHashOrBlockTag];\n case 2:\n blockHashOrBlockTag = _b.sent();\n blockNumber = -128;\n params = {\n includeTransactions: !!includeTransactions\n };\n if (!(0, bytes_1.isHexString)(blockHashOrBlockTag, 32))\n return [3, 3];\n params.blockHash = blockHashOrBlockTag;\n return [3, 6];\n case 3:\n _b.trys.push([3, 5, , 6]);\n _a = params;\n return [4, this._getBlockTag(blockHashOrBlockTag)];\n case 4:\n _a.blockTag = _b.sent();\n if ((0, bytes_1.isHexString)(params.blockTag)) {\n blockNumber = parseInt(params.blockTag.substring(2), 16);\n }\n return [3, 6];\n case 5:\n error_9 = _b.sent();\n logger.throwArgumentError(\"invalid block hash or block tag\", \"blockHashOrBlockTag\", blockHashOrBlockTag);\n return [3, 6];\n case 6:\n return [2, (0, web_1.poll)(function() {\n return __awaiter3(_this, void 0, void 0, function() {\n var block, blockNumber_1, i3, tx, confirmations, blockWithTxs;\n var _this2 = this;\n return __generator3(this, function(_a2) {\n switch (_a2.label) {\n case 0:\n return [4, this.perform(\"getBlock\", params)];\n case 1:\n block = _a2.sent();\n if (block == null) {\n if (params.blockHash != null) {\n if (this._emitted[\"b:\" + params.blockHash] == null) {\n return [2, null];\n }\n }\n if (params.blockTag != null) {\n if (blockNumber > this._emitted.block) {\n return [2, null];\n }\n }\n return [2, void 0];\n }\n if (!includeTransactions)\n return [3, 8];\n blockNumber_1 = null;\n i3 = 0;\n _a2.label = 2;\n case 2:\n if (!(i3 < block.transactions.length))\n return [3, 7];\n tx = block.transactions[i3];\n if (!(tx.blockNumber == null))\n return [3, 3];\n tx.confirmations = 0;\n return [3, 6];\n case 3:\n if (!(tx.confirmations == null))\n return [3, 6];\n if (!(blockNumber_1 == null))\n return [3, 5];\n return [4, this._getInternalBlockNumber(100 + 2 * this.pollingInterval)];\n case 4:\n blockNumber_1 = _a2.sent();\n _a2.label = 5;\n case 5:\n confirmations = blockNumber_1 - tx.blockNumber + 1;\n if (confirmations <= 0) {\n confirmations = 1;\n }\n tx.confirmations = confirmations;\n _a2.label = 6;\n case 6:\n i3++;\n return [3, 2];\n case 7:\n blockWithTxs = this.formatter.blockWithTransactions(block);\n blockWithTxs.transactions = blockWithTxs.transactions.map(function(tx2) {\n return _this2._wrapTransaction(tx2);\n });\n return [2, blockWithTxs];\n case 8:\n return [2, this.formatter.block(block)];\n }\n });\n });\n }, { oncePoll: this })];\n }\n });\n });\n };\n BaseProvider2.prototype.getBlock = function(blockHashOrBlockTag) {\n return this._getBlock(blockHashOrBlockTag, false);\n };\n BaseProvider2.prototype.getBlockWithTransactions = function(blockHashOrBlockTag) {\n return this._getBlock(blockHashOrBlockTag, true);\n };\n BaseProvider2.prototype.getTransaction = function(transactionHash) {\n return __awaiter3(this, void 0, void 0, function() {\n var params;\n var _this = this;\n return __generator3(this, function(_a) {\n switch (_a.label) {\n case 0:\n return [4, this.getNetwork()];\n case 1:\n _a.sent();\n return [4, transactionHash];\n case 2:\n transactionHash = _a.sent();\n params = { transactionHash: this.formatter.hash(transactionHash, true) };\n return [2, (0, web_1.poll)(function() {\n return __awaiter3(_this, void 0, void 0, function() {\n var result, tx, blockNumber, confirmations;\n return __generator3(this, function(_a2) {\n switch (_a2.label) {\n case 0:\n return [4, this.perform(\"getTransaction\", params)];\n case 1:\n result = _a2.sent();\n if (result == null) {\n if (this._emitted[\"t:\" + transactionHash] == null) {\n return [2, null];\n }\n return [2, void 0];\n }\n tx = this.formatter.transactionResponse(result);\n if (!(tx.blockNumber == null))\n return [3, 2];\n tx.confirmations = 0;\n return [3, 4];\n case 2:\n if (!(tx.confirmations == null))\n return [3, 4];\n return [4, this._getInternalBlockNumber(100 + 2 * this.pollingInterval)];\n case 3:\n blockNumber = _a2.sent();\n confirmations = blockNumber - tx.blockNumber + 1;\n if (confirmations <= 0) {\n confirmations = 1;\n }\n tx.confirmations = confirmations;\n _a2.label = 4;\n case 4:\n return [2, this._wrapTransaction(tx)];\n }\n });\n });\n }, { oncePoll: this })];\n }\n });\n });\n };\n BaseProvider2.prototype.getTransactionReceipt = function(transactionHash) {\n return __awaiter3(this, void 0, void 0, function() {\n var params;\n var _this = this;\n return __generator3(this, function(_a) {\n switch (_a.label) {\n case 0:\n return [4, this.getNetwork()];\n case 1:\n _a.sent();\n return [4, transactionHash];\n case 2:\n transactionHash = _a.sent();\n params = { transactionHash: this.formatter.hash(transactionHash, true) };\n return [2, (0, web_1.poll)(function() {\n return __awaiter3(_this, void 0, void 0, function() {\n var result, receipt, blockNumber, confirmations;\n return __generator3(this, function(_a2) {\n switch (_a2.label) {\n case 0:\n return [4, this.perform(\"getTransactionReceipt\", params)];\n case 1:\n result = _a2.sent();\n if (result == null) {\n if (this._emitted[\"t:\" + transactionHash] == null) {\n return [2, null];\n }\n return [2, void 0];\n }\n if (result.blockHash == null) {\n return [2, void 0];\n }\n receipt = this.formatter.receipt(result);\n if (!(receipt.blockNumber == null))\n return [3, 2];\n receipt.confirmations = 0;\n return [3, 4];\n case 2:\n if (!(receipt.confirmations == null))\n return [3, 4];\n return [4, this._getInternalBlockNumber(100 + 2 * this.pollingInterval)];\n case 3:\n blockNumber = _a2.sent();\n confirmations = blockNumber - receipt.blockNumber + 1;\n if (confirmations <= 0) {\n confirmations = 1;\n }\n receipt.confirmations = confirmations;\n _a2.label = 4;\n case 4:\n return [2, receipt];\n }\n });\n });\n }, { oncePoll: this })];\n }\n });\n });\n };\n BaseProvider2.prototype.getLogs = function(filter) {\n return __awaiter3(this, void 0, void 0, function() {\n var params, logs;\n return __generator3(this, function(_a) {\n switch (_a.label) {\n case 0:\n return [4, this.getNetwork()];\n case 1:\n _a.sent();\n return [4, (0, properties_1.resolveProperties)({ filter: this._getFilter(filter) })];\n case 2:\n params = _a.sent();\n return [4, this.perform(\"getLogs\", params)];\n case 3:\n logs = _a.sent();\n logs.forEach(function(log) {\n if (log.removed == null) {\n log.removed = false;\n }\n });\n return [2, formatter_1.Formatter.arrayOf(this.formatter.filterLog.bind(this.formatter))(logs)];\n }\n });\n });\n };\n BaseProvider2.prototype.getEtherPrice = function() {\n return __awaiter3(this, void 0, void 0, function() {\n return __generator3(this, function(_a) {\n switch (_a.label) {\n case 0:\n return [4, this.getNetwork()];\n case 1:\n _a.sent();\n return [2, this.perform(\"getEtherPrice\", {})];\n }\n });\n });\n };\n BaseProvider2.prototype._getBlockTag = function(blockTag) {\n return __awaiter3(this, void 0, void 0, function() {\n var blockNumber;\n return __generator3(this, function(_a) {\n switch (_a.label) {\n case 0:\n return [4, blockTag];\n case 1:\n blockTag = _a.sent();\n if (!(typeof blockTag === \"number\" && blockTag < 0))\n return [3, 3];\n if (blockTag % 1) {\n logger.throwArgumentError(\"invalid BlockTag\", \"blockTag\", blockTag);\n }\n return [4, this._getInternalBlockNumber(100 + 2 * this.pollingInterval)];\n case 2:\n blockNumber = _a.sent();\n blockNumber += blockTag;\n if (blockNumber < 0) {\n blockNumber = 0;\n }\n return [2, this.formatter.blockTag(blockNumber)];\n case 3:\n return [2, this.formatter.blockTag(blockTag)];\n }\n });\n });\n };\n BaseProvider2.prototype.getResolver = function(name) {\n return __awaiter3(this, void 0, void 0, function() {\n var currentName, addr, resolver, _a;\n return __generator3(this, function(_b) {\n switch (_b.label) {\n case 0:\n currentName = name;\n _b.label = 1;\n case 1:\n if (false)\n return [3, 6];\n if (currentName === \"\" || currentName === \".\") {\n return [2, null];\n }\n if (name !== \"eth\" && currentName === \"eth\") {\n return [2, null];\n }\n return [4, this._getResolver(currentName, \"getResolver\")];\n case 2:\n addr = _b.sent();\n if (!(addr != null))\n return [3, 5];\n resolver = new Resolver(this, addr, name);\n _a = currentName !== name;\n if (!_a)\n return [3, 4];\n return [4, resolver.supportsWildcard()];\n case 3:\n _a = !_b.sent();\n _b.label = 4;\n case 4:\n if (_a) {\n return [2, null];\n }\n return [2, resolver];\n case 5:\n currentName = currentName.split(\".\").slice(1).join(\".\");\n return [3, 1];\n case 6:\n return [\n 2\n /*return*/\n ];\n }\n });\n });\n };\n BaseProvider2.prototype._getResolver = function(name, operation) {\n return __awaiter3(this, void 0, void 0, function() {\n var network, addrData, error_10;\n return __generator3(this, function(_a) {\n switch (_a.label) {\n case 0:\n if (operation == null) {\n operation = \"ENS\";\n }\n return [4, this.getNetwork()];\n case 1:\n network = _a.sent();\n if (!network.ensAddress) {\n logger.throwError(\"network does not support ENS\", logger_1.Logger.errors.UNSUPPORTED_OPERATION, { operation, network: network.name });\n }\n _a.label = 2;\n case 2:\n _a.trys.push([2, 4, , 5]);\n return [4, this.call({\n to: network.ensAddress,\n data: \"0x0178b8bf\" + (0, hash_1.namehash)(name).substring(2)\n })];\n case 3:\n addrData = _a.sent();\n return [2, this.formatter.callAddress(addrData)];\n case 4:\n error_10 = _a.sent();\n return [3, 5];\n case 5:\n return [2, null];\n }\n });\n });\n };\n BaseProvider2.prototype.resolveName = function(name) {\n return __awaiter3(this, void 0, void 0, function() {\n var resolver;\n return __generator3(this, function(_a) {\n switch (_a.label) {\n case 0:\n return [4, name];\n case 1:\n name = _a.sent();\n try {\n return [2, Promise.resolve(this.formatter.address(name))];\n } catch (error) {\n if ((0, bytes_1.isHexString)(name)) {\n throw error;\n }\n }\n if (typeof name !== \"string\") {\n logger.throwArgumentError(\"invalid ENS name\", \"name\", name);\n }\n return [4, this.getResolver(name)];\n case 2:\n resolver = _a.sent();\n if (!resolver) {\n return [2, null];\n }\n return [4, resolver.getAddress()];\n case 3:\n return [2, _a.sent()];\n }\n });\n });\n };\n BaseProvider2.prototype.lookupAddress = function(address) {\n return __awaiter3(this, void 0, void 0, function() {\n var node, resolverAddr, name, _a, addr;\n return __generator3(this, function(_b) {\n switch (_b.label) {\n case 0:\n return [4, address];\n case 1:\n address = _b.sent();\n address = this.formatter.address(address);\n node = address.substring(2).toLowerCase() + \".addr.reverse\";\n return [4, this._getResolver(node, \"lookupAddress\")];\n case 2:\n resolverAddr = _b.sent();\n if (resolverAddr == null) {\n return [2, null];\n }\n _a = _parseString;\n return [4, this.call({\n to: resolverAddr,\n data: \"0x691f3431\" + (0, hash_1.namehash)(node).substring(2)\n })];\n case 3:\n name = _a.apply(void 0, [_b.sent(), 0]);\n return [4, this.resolveName(name)];\n case 4:\n addr = _b.sent();\n if (addr != address) {\n return [2, null];\n }\n return [2, name];\n }\n });\n });\n };\n BaseProvider2.prototype.getAvatar = function(nameOrAddress) {\n return __awaiter3(this, void 0, void 0, function() {\n var resolver, address, node, resolverAddress, avatar_1, error_11, name_1, _a, error_12, avatar;\n return __generator3(this, function(_b) {\n switch (_b.label) {\n case 0:\n resolver = null;\n if (!(0, bytes_1.isHexString)(nameOrAddress))\n return [3, 10];\n address = this.formatter.address(nameOrAddress);\n node = address.substring(2).toLowerCase() + \".addr.reverse\";\n return [4, this._getResolver(node, \"getAvatar\")];\n case 1:\n resolverAddress = _b.sent();\n if (!resolverAddress) {\n return [2, null];\n }\n resolver = new Resolver(this, resolverAddress, node);\n _b.label = 2;\n case 2:\n _b.trys.push([2, 4, , 5]);\n return [4, resolver.getAvatar()];\n case 3:\n avatar_1 = _b.sent();\n if (avatar_1) {\n return [2, avatar_1.url];\n }\n return [3, 5];\n case 4:\n error_11 = _b.sent();\n if (error_11.code !== logger_1.Logger.errors.CALL_EXCEPTION) {\n throw error_11;\n }\n return [3, 5];\n case 5:\n _b.trys.push([5, 8, , 9]);\n _a = _parseString;\n return [4, this.call({\n to: resolverAddress,\n data: \"0x691f3431\" + (0, hash_1.namehash)(node).substring(2)\n })];\n case 6:\n name_1 = _a.apply(void 0, [_b.sent(), 0]);\n return [4, this.getResolver(name_1)];\n case 7:\n resolver = _b.sent();\n return [3, 9];\n case 8:\n error_12 = _b.sent();\n if (error_12.code !== logger_1.Logger.errors.CALL_EXCEPTION) {\n throw error_12;\n }\n return [2, null];\n case 9:\n return [3, 12];\n case 10:\n return [4, this.getResolver(nameOrAddress)];\n case 11:\n resolver = _b.sent();\n if (!resolver) {\n return [2, null];\n }\n _b.label = 12;\n case 12:\n return [4, resolver.getAvatar()];\n case 13:\n avatar = _b.sent();\n if (avatar == null) {\n return [2, null];\n }\n return [2, avatar.url];\n }\n });\n });\n };\n BaseProvider2.prototype.perform = function(method, params) {\n return logger.throwError(method + \" not implemented\", logger_1.Logger.errors.NOT_IMPLEMENTED, { operation: method });\n };\n BaseProvider2.prototype._startEvent = function(event) {\n this.polling = this._events.filter(function(e3) {\n return e3.pollable();\n }).length > 0;\n };\n BaseProvider2.prototype._stopEvent = function(event) {\n this.polling = this._events.filter(function(e3) {\n return e3.pollable();\n }).length > 0;\n };\n BaseProvider2.prototype._addEventListener = function(eventName, listener, once2) {\n var event = new Event2(getEventTag(eventName), listener, once2);\n this._events.push(event);\n this._startEvent(event);\n return this;\n };\n BaseProvider2.prototype.on = function(eventName, listener) {\n return this._addEventListener(eventName, listener, false);\n };\n BaseProvider2.prototype.once = function(eventName, listener) {\n return this._addEventListener(eventName, listener, true);\n };\n BaseProvider2.prototype.emit = function(eventName) {\n var _this = this;\n var args = [];\n for (var _i = 1; _i < arguments.length; _i++) {\n args[_i - 1] = arguments[_i];\n }\n var result = false;\n var stopped = [];\n var eventTag = getEventTag(eventName);\n this._events = this._events.filter(function(event) {\n if (event.tag !== eventTag) {\n return true;\n }\n setTimeout(function() {\n event.listener.apply(_this, args);\n }, 0);\n result = true;\n if (event.once) {\n stopped.push(event);\n return false;\n }\n return true;\n });\n stopped.forEach(function(event) {\n _this._stopEvent(event);\n });\n return result;\n };\n BaseProvider2.prototype.listenerCount = function(eventName) {\n if (!eventName) {\n return this._events.length;\n }\n var eventTag = getEventTag(eventName);\n return this._events.filter(function(event) {\n return event.tag === eventTag;\n }).length;\n };\n BaseProvider2.prototype.listeners = function(eventName) {\n if (eventName == null) {\n return this._events.map(function(event) {\n return event.listener;\n });\n }\n var eventTag = getEventTag(eventName);\n return this._events.filter(function(event) {\n return event.tag === eventTag;\n }).map(function(event) {\n return event.listener;\n });\n };\n BaseProvider2.prototype.off = function(eventName, listener) {\n var _this = this;\n if (listener == null) {\n return this.removeAllListeners(eventName);\n }\n var stopped = [];\n var found = false;\n var eventTag = getEventTag(eventName);\n this._events = this._events.filter(function(event) {\n if (event.tag !== eventTag || event.listener != listener) {\n return true;\n }\n if (found) {\n return true;\n }\n found = true;\n stopped.push(event);\n return false;\n });\n stopped.forEach(function(event) {\n _this._stopEvent(event);\n });\n return this;\n };\n BaseProvider2.prototype.removeAllListeners = function(eventName) {\n var _this = this;\n var stopped = [];\n if (eventName == null) {\n stopped = this._events;\n this._events = [];\n } else {\n var eventTag_1 = getEventTag(eventName);\n this._events = this._events.filter(function(event) {\n if (event.tag !== eventTag_1) {\n return true;\n }\n stopped.push(event);\n return false;\n });\n }\n stopped.forEach(function(event) {\n _this._stopEvent(event);\n });\n return this;\n };\n return BaseProvider2;\n }(abstract_provider_1.Provider)\n );\n exports3.BaseProvider = BaseProvider;\n }\n });\n\n // ../../../node_modules/.pnpm/@ethersproject+providers@5.8.0_bufferutil@4.0.9_utf-8-validate@5.0.10/node_modules/@ethersproject/providers/lib/json-rpc-provider.js\n var require_json_rpc_provider = __commonJS({\n \"../../../node_modules/.pnpm/@ethersproject+providers@5.8.0_bufferutil@4.0.9_utf-8-validate@5.0.10/node_modules/@ethersproject/providers/lib/json-rpc-provider.js\"(exports3) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n var __extends3 = exports3 && exports3.__extends || /* @__PURE__ */ function() {\n var extendStatics3 = function(d5, b4) {\n extendStatics3 = Object.setPrototypeOf || { __proto__: [] } instanceof Array && function(d6, b5) {\n d6.__proto__ = b5;\n } || function(d6, b5) {\n for (var p4 in b5)\n if (Object.prototype.hasOwnProperty.call(b5, p4))\n d6[p4] = b5[p4];\n };\n return extendStatics3(d5, b4);\n };\n return function(d5, b4) {\n if (typeof b4 !== \"function\" && b4 !== null)\n throw new TypeError(\"Class extends value \" + String(b4) + \" is not a constructor or null\");\n extendStatics3(d5, b4);\n function __() {\n this.constructor = d5;\n }\n d5.prototype = b4 === null ? Object.create(b4) : (__.prototype = b4.prototype, new __());\n };\n }();\n var __awaiter3 = exports3 && exports3.__awaiter || function(thisArg, _arguments, P2, generator) {\n function adopt(value) {\n return value instanceof P2 ? value : new P2(function(resolve) {\n resolve(value);\n });\n }\n return new (P2 || (P2 = Promise))(function(resolve, reject) {\n function fulfilled(value) {\n try {\n step(generator.next(value));\n } catch (e3) {\n reject(e3);\n }\n }\n function rejected(value) {\n try {\n step(generator[\"throw\"](value));\n } catch (e3) {\n reject(e3);\n }\n }\n function step(result) {\n result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected);\n }\n step((generator = generator.apply(thisArg, _arguments || [])).next());\n });\n };\n var __generator3 = exports3 && exports3.__generator || function(thisArg, body) {\n var _2 = { label: 0, sent: function() {\n if (t3[0] & 1)\n throw t3[1];\n return t3[1];\n }, trys: [], ops: [] }, f6, y6, t3, g4;\n return g4 = { next: verb(0), \"throw\": verb(1), \"return\": verb(2) }, typeof Symbol === \"function\" && (g4[Symbol.iterator] = function() {\n return this;\n }), g4;\n function verb(n2) {\n return function(v2) {\n return step([n2, v2]);\n };\n }\n function step(op) {\n if (f6)\n throw new TypeError(\"Generator is already executing.\");\n while (_2)\n try {\n if (f6 = 1, y6 && (t3 = op[0] & 2 ? y6[\"return\"] : op[0] ? y6[\"throw\"] || ((t3 = y6[\"return\"]) && t3.call(y6), 0) : y6.next) && !(t3 = t3.call(y6, op[1])).done)\n return t3;\n if (y6 = 0, t3)\n op = [op[0] & 2, t3.value];\n switch (op[0]) {\n case 0:\n case 1:\n t3 = op;\n break;\n case 4:\n _2.label++;\n return { value: op[1], done: false };\n case 5:\n _2.label++;\n y6 = op[1];\n op = [0];\n continue;\n case 7:\n op = _2.ops.pop();\n _2.trys.pop();\n continue;\n default:\n if (!(t3 = _2.trys, t3 = t3.length > 0 && t3[t3.length - 1]) && (op[0] === 6 || op[0] === 2)) {\n _2 = 0;\n continue;\n }\n if (op[0] === 3 && (!t3 || op[1] > t3[0] && op[1] < t3[3])) {\n _2.label = op[1];\n break;\n }\n if (op[0] === 6 && _2.label < t3[1]) {\n _2.label = t3[1];\n t3 = op;\n break;\n }\n if (t3 && _2.label < t3[2]) {\n _2.label = t3[2];\n _2.ops.push(op);\n break;\n }\n if (t3[2])\n _2.ops.pop();\n _2.trys.pop();\n continue;\n }\n op = body.call(thisArg, _2);\n } catch (e3) {\n op = [6, e3];\n y6 = 0;\n } finally {\n f6 = t3 = 0;\n }\n if (op[0] & 5)\n throw op[1];\n return { value: op[0] ? op[1] : void 0, done: true };\n }\n };\n Object.defineProperty(exports3, \"__esModule\", { value: true });\n exports3.JsonRpcProvider = exports3.JsonRpcSigner = void 0;\n var abstract_signer_1 = require_lib15();\n var bignumber_1 = require_lib3();\n var bytes_1 = require_lib2();\n var hash_1 = require_lib12();\n var properties_1 = require_lib4();\n var strings_1 = require_lib9();\n var transactions_1 = require_lib17();\n var web_1 = require_lib28();\n var logger_1 = require_lib();\n var _version_1 = require_version23();\n var logger = new logger_1.Logger(_version_1.version);\n var base_provider_1 = require_base_provider();\n var errorGas = [\"call\", \"estimateGas\"];\n function spelunk(value, requireData) {\n if (value == null) {\n return null;\n }\n if (typeof value.message === \"string\" && value.message.match(\"reverted\")) {\n var data = (0, bytes_1.isHexString)(value.data) ? value.data : null;\n if (!requireData || data) {\n return { message: value.message, data };\n }\n }\n if (typeof value === \"object\") {\n for (var key in value) {\n var result = spelunk(value[key], requireData);\n if (result) {\n return result;\n }\n }\n return null;\n }\n if (typeof value === \"string\") {\n try {\n return spelunk(JSON.parse(value), requireData);\n } catch (error) {\n }\n }\n return null;\n }\n function checkError(method, error, params) {\n var transaction = params.transaction || params.signedTransaction;\n if (method === \"call\") {\n var result = spelunk(error, true);\n if (result) {\n return result.data;\n }\n logger.throwError(\"missing revert data in call exception; Transaction reverted without a reason string\", logger_1.Logger.errors.CALL_EXCEPTION, {\n data: \"0x\",\n transaction,\n error\n });\n }\n if (method === \"estimateGas\") {\n var result = spelunk(error.body, false);\n if (result == null) {\n result = spelunk(error, false);\n }\n if (result) {\n logger.throwError(\"cannot estimate gas; transaction may fail or may require manual gas limit\", logger_1.Logger.errors.UNPREDICTABLE_GAS_LIMIT, {\n reason: result.message,\n method,\n transaction,\n error\n });\n }\n }\n var message = error.message;\n if (error.code === logger_1.Logger.errors.SERVER_ERROR && error.error && typeof error.error.message === \"string\") {\n message = error.error.message;\n } else if (typeof error.body === \"string\") {\n message = error.body;\n } else if (typeof error.responseText === \"string\") {\n message = error.responseText;\n }\n message = (message || \"\").toLowerCase();\n if (message.match(/insufficient funds|base fee exceeds gas limit|InsufficientFunds/i)) {\n logger.throwError(\"insufficient funds for intrinsic transaction cost\", logger_1.Logger.errors.INSUFFICIENT_FUNDS, {\n error,\n method,\n transaction\n });\n }\n if (message.match(/nonce (is )?too low/i)) {\n logger.throwError(\"nonce has already been used\", logger_1.Logger.errors.NONCE_EXPIRED, {\n error,\n method,\n transaction\n });\n }\n if (message.match(/replacement transaction underpriced|transaction gas price.*too low/i)) {\n logger.throwError(\"replacement fee too low\", logger_1.Logger.errors.REPLACEMENT_UNDERPRICED, {\n error,\n method,\n transaction\n });\n }\n if (message.match(/only replay-protected/i)) {\n logger.throwError(\"legacy pre-eip-155 transactions not supported\", logger_1.Logger.errors.UNSUPPORTED_OPERATION, {\n error,\n method,\n transaction\n });\n }\n if (errorGas.indexOf(method) >= 0 && message.match(/gas required exceeds allowance|always failing transaction|execution reverted|revert/)) {\n logger.throwError(\"cannot estimate gas; transaction may fail or may require manual gas limit\", logger_1.Logger.errors.UNPREDICTABLE_GAS_LIMIT, {\n error,\n method,\n transaction\n });\n }\n throw error;\n }\n function timer(timeout) {\n return new Promise(function(resolve) {\n setTimeout(resolve, timeout);\n });\n }\n function getResult(payload) {\n if (payload.error) {\n var error = new Error(payload.error.message);\n error.code = payload.error.code;\n error.data = payload.error.data;\n throw error;\n }\n return payload.result;\n }\n function getLowerCase(value) {\n if (value) {\n return value.toLowerCase();\n }\n return value;\n }\n var _constructorGuard = {};\n var JsonRpcSigner = (\n /** @class */\n function(_super) {\n __extends3(JsonRpcSigner2, _super);\n function JsonRpcSigner2(constructorGuard, provider, addressOrIndex) {\n var _this = _super.call(this) || this;\n if (constructorGuard !== _constructorGuard) {\n throw new Error(\"do not call the JsonRpcSigner constructor directly; use provider.getSigner\");\n }\n (0, properties_1.defineReadOnly)(_this, \"provider\", provider);\n if (addressOrIndex == null) {\n addressOrIndex = 0;\n }\n if (typeof addressOrIndex === \"string\") {\n (0, properties_1.defineReadOnly)(_this, \"_address\", _this.provider.formatter.address(addressOrIndex));\n (0, properties_1.defineReadOnly)(_this, \"_index\", null);\n } else if (typeof addressOrIndex === \"number\") {\n (0, properties_1.defineReadOnly)(_this, \"_index\", addressOrIndex);\n (0, properties_1.defineReadOnly)(_this, \"_address\", null);\n } else {\n logger.throwArgumentError(\"invalid address or index\", \"addressOrIndex\", addressOrIndex);\n }\n return _this;\n }\n JsonRpcSigner2.prototype.connect = function(provider) {\n return logger.throwError(\"cannot alter JSON-RPC Signer connection\", logger_1.Logger.errors.UNSUPPORTED_OPERATION, {\n operation: \"connect\"\n });\n };\n JsonRpcSigner2.prototype.connectUnchecked = function() {\n return new UncheckedJsonRpcSigner(_constructorGuard, this.provider, this._address || this._index);\n };\n JsonRpcSigner2.prototype.getAddress = function() {\n var _this = this;\n if (this._address) {\n return Promise.resolve(this._address);\n }\n return this.provider.send(\"eth_accounts\", []).then(function(accounts) {\n if (accounts.length <= _this._index) {\n logger.throwError(\"unknown account #\" + _this._index, logger_1.Logger.errors.UNSUPPORTED_OPERATION, {\n operation: \"getAddress\"\n });\n }\n return _this.provider.formatter.address(accounts[_this._index]);\n });\n };\n JsonRpcSigner2.prototype.sendUncheckedTransaction = function(transaction) {\n var _this = this;\n transaction = (0, properties_1.shallowCopy)(transaction);\n var fromAddress = this.getAddress().then(function(address) {\n if (address) {\n address = address.toLowerCase();\n }\n return address;\n });\n if (transaction.gasLimit == null) {\n var estimate = (0, properties_1.shallowCopy)(transaction);\n estimate.from = fromAddress;\n transaction.gasLimit = this.provider.estimateGas(estimate);\n }\n if (transaction.to != null) {\n transaction.to = Promise.resolve(transaction.to).then(function(to) {\n return __awaiter3(_this, void 0, void 0, function() {\n var address;\n return __generator3(this, function(_a) {\n switch (_a.label) {\n case 0:\n if (to == null) {\n return [2, null];\n }\n return [4, this.provider.resolveName(to)];\n case 1:\n address = _a.sent();\n if (address == null) {\n logger.throwArgumentError(\"provided ENS name resolves to null\", \"tx.to\", to);\n }\n return [2, address];\n }\n });\n });\n });\n }\n return (0, properties_1.resolveProperties)({\n tx: (0, properties_1.resolveProperties)(transaction),\n sender: fromAddress\n }).then(function(_a) {\n var tx = _a.tx, sender = _a.sender;\n if (tx.from != null) {\n if (tx.from.toLowerCase() !== sender) {\n logger.throwArgumentError(\"from address mismatch\", \"transaction\", transaction);\n }\n } else {\n tx.from = sender;\n }\n var hexTx = _this.provider.constructor.hexlifyTransaction(tx, { from: true });\n return _this.provider.send(\"eth_sendTransaction\", [hexTx]).then(function(hash3) {\n return hash3;\n }, function(error) {\n if (typeof error.message === \"string\" && error.message.match(/user denied/i)) {\n logger.throwError(\"user rejected transaction\", logger_1.Logger.errors.ACTION_REJECTED, {\n action: \"sendTransaction\",\n transaction: tx\n });\n }\n return checkError(\"sendTransaction\", error, hexTx);\n });\n });\n };\n JsonRpcSigner2.prototype.signTransaction = function(transaction) {\n return logger.throwError(\"signing transactions is unsupported\", logger_1.Logger.errors.UNSUPPORTED_OPERATION, {\n operation: \"signTransaction\"\n });\n };\n JsonRpcSigner2.prototype.sendTransaction = function(transaction) {\n return __awaiter3(this, void 0, void 0, function() {\n var blockNumber, hash3, error_1;\n var _this = this;\n return __generator3(this, function(_a) {\n switch (_a.label) {\n case 0:\n return [4, this.provider._getInternalBlockNumber(100 + 2 * this.provider.pollingInterval)];\n case 1:\n blockNumber = _a.sent();\n return [4, this.sendUncheckedTransaction(transaction)];\n case 2:\n hash3 = _a.sent();\n _a.label = 3;\n case 3:\n _a.trys.push([3, 5, , 6]);\n return [4, (0, web_1.poll)(function() {\n return __awaiter3(_this, void 0, void 0, function() {\n var tx;\n return __generator3(this, function(_a2) {\n switch (_a2.label) {\n case 0:\n return [4, this.provider.getTransaction(hash3)];\n case 1:\n tx = _a2.sent();\n if (tx === null) {\n return [2, void 0];\n }\n return [2, this.provider._wrapTransaction(tx, hash3, blockNumber)];\n }\n });\n });\n }, { oncePoll: this.provider })];\n case 4:\n return [2, _a.sent()];\n case 5:\n error_1 = _a.sent();\n error_1.transactionHash = hash3;\n throw error_1;\n case 6:\n return [\n 2\n /*return*/\n ];\n }\n });\n });\n };\n JsonRpcSigner2.prototype.signMessage = function(message) {\n return __awaiter3(this, void 0, void 0, function() {\n var data, address, error_2;\n return __generator3(this, function(_a) {\n switch (_a.label) {\n case 0:\n data = typeof message === \"string\" ? (0, strings_1.toUtf8Bytes)(message) : message;\n return [4, this.getAddress()];\n case 1:\n address = _a.sent();\n _a.label = 2;\n case 2:\n _a.trys.push([2, 4, , 5]);\n return [4, this.provider.send(\"personal_sign\", [(0, bytes_1.hexlify)(data), address.toLowerCase()])];\n case 3:\n return [2, _a.sent()];\n case 4:\n error_2 = _a.sent();\n if (typeof error_2.message === \"string\" && error_2.message.match(/user denied/i)) {\n logger.throwError(\"user rejected signing\", logger_1.Logger.errors.ACTION_REJECTED, {\n action: \"signMessage\",\n from: address,\n messageData: message\n });\n }\n throw error_2;\n case 5:\n return [\n 2\n /*return*/\n ];\n }\n });\n });\n };\n JsonRpcSigner2.prototype._legacySignMessage = function(message) {\n return __awaiter3(this, void 0, void 0, function() {\n var data, address, error_3;\n return __generator3(this, function(_a) {\n switch (_a.label) {\n case 0:\n data = typeof message === \"string\" ? (0, strings_1.toUtf8Bytes)(message) : message;\n return [4, this.getAddress()];\n case 1:\n address = _a.sent();\n _a.label = 2;\n case 2:\n _a.trys.push([2, 4, , 5]);\n return [4, this.provider.send(\"eth_sign\", [address.toLowerCase(), (0, bytes_1.hexlify)(data)])];\n case 3:\n return [2, _a.sent()];\n case 4:\n error_3 = _a.sent();\n if (typeof error_3.message === \"string\" && error_3.message.match(/user denied/i)) {\n logger.throwError(\"user rejected signing\", logger_1.Logger.errors.ACTION_REJECTED, {\n action: \"_legacySignMessage\",\n from: address,\n messageData: message\n });\n }\n throw error_3;\n case 5:\n return [\n 2\n /*return*/\n ];\n }\n });\n });\n };\n JsonRpcSigner2.prototype._signTypedData = function(domain2, types, value) {\n return __awaiter3(this, void 0, void 0, function() {\n var populated, address, error_4;\n var _this = this;\n return __generator3(this, function(_a) {\n switch (_a.label) {\n case 0:\n return [4, hash_1._TypedDataEncoder.resolveNames(domain2, types, value, function(name) {\n return _this.provider.resolveName(name);\n })];\n case 1:\n populated = _a.sent();\n return [4, this.getAddress()];\n case 2:\n address = _a.sent();\n _a.label = 3;\n case 3:\n _a.trys.push([3, 5, , 6]);\n return [4, this.provider.send(\"eth_signTypedData_v4\", [\n address.toLowerCase(),\n JSON.stringify(hash_1._TypedDataEncoder.getPayload(populated.domain, types, populated.value))\n ])];\n case 4:\n return [2, _a.sent()];\n case 5:\n error_4 = _a.sent();\n if (typeof error_4.message === \"string\" && error_4.message.match(/user denied/i)) {\n logger.throwError(\"user rejected signing\", logger_1.Logger.errors.ACTION_REJECTED, {\n action: \"_signTypedData\",\n from: address,\n messageData: { domain: populated.domain, types, value: populated.value }\n });\n }\n throw error_4;\n case 6:\n return [\n 2\n /*return*/\n ];\n }\n });\n });\n };\n JsonRpcSigner2.prototype.unlock = function(password) {\n return __awaiter3(this, void 0, void 0, function() {\n var provider, address;\n return __generator3(this, function(_a) {\n switch (_a.label) {\n case 0:\n provider = this.provider;\n return [4, this.getAddress()];\n case 1:\n address = _a.sent();\n return [2, provider.send(\"personal_unlockAccount\", [address.toLowerCase(), password, null])];\n }\n });\n });\n };\n return JsonRpcSigner2;\n }(abstract_signer_1.Signer)\n );\n exports3.JsonRpcSigner = JsonRpcSigner;\n var UncheckedJsonRpcSigner = (\n /** @class */\n function(_super) {\n __extends3(UncheckedJsonRpcSigner2, _super);\n function UncheckedJsonRpcSigner2() {\n return _super !== null && _super.apply(this, arguments) || this;\n }\n UncheckedJsonRpcSigner2.prototype.sendTransaction = function(transaction) {\n var _this = this;\n return this.sendUncheckedTransaction(transaction).then(function(hash3) {\n return {\n hash: hash3,\n nonce: null,\n gasLimit: null,\n gasPrice: null,\n data: null,\n value: null,\n chainId: null,\n confirmations: 0,\n from: null,\n wait: function(confirmations) {\n return _this.provider.waitForTransaction(hash3, confirmations);\n }\n };\n });\n };\n return UncheckedJsonRpcSigner2;\n }(JsonRpcSigner)\n );\n var allowedTransactionKeys = {\n chainId: true,\n data: true,\n gasLimit: true,\n gasPrice: true,\n nonce: true,\n to: true,\n value: true,\n type: true,\n accessList: true,\n maxFeePerGas: true,\n maxPriorityFeePerGas: true\n };\n var JsonRpcProvider = (\n /** @class */\n function(_super) {\n __extends3(JsonRpcProvider2, _super);\n function JsonRpcProvider2(url, network) {\n var _this = this;\n var networkOrReady = network;\n if (networkOrReady == null) {\n networkOrReady = new Promise(function(resolve, reject) {\n setTimeout(function() {\n _this.detectNetwork().then(function(network2) {\n resolve(network2);\n }, function(error) {\n reject(error);\n });\n }, 0);\n });\n }\n _this = _super.call(this, networkOrReady) || this;\n if (!url) {\n url = (0, properties_1.getStatic)(_this.constructor, \"defaultUrl\")();\n }\n if (typeof url === \"string\") {\n (0, properties_1.defineReadOnly)(_this, \"connection\", Object.freeze({\n url\n }));\n } else {\n (0, properties_1.defineReadOnly)(_this, \"connection\", Object.freeze((0, properties_1.shallowCopy)(url)));\n }\n _this._nextId = 42;\n return _this;\n }\n Object.defineProperty(JsonRpcProvider2.prototype, \"_cache\", {\n get: function() {\n if (this._eventLoopCache == null) {\n this._eventLoopCache = {};\n }\n return this._eventLoopCache;\n },\n enumerable: false,\n configurable: true\n });\n JsonRpcProvider2.defaultUrl = function() {\n return \"http://localhost:8545\";\n };\n JsonRpcProvider2.prototype.detectNetwork = function() {\n var _this = this;\n if (!this._cache[\"detectNetwork\"]) {\n this._cache[\"detectNetwork\"] = this._uncachedDetectNetwork();\n setTimeout(function() {\n _this._cache[\"detectNetwork\"] = null;\n }, 0);\n }\n return this._cache[\"detectNetwork\"];\n };\n JsonRpcProvider2.prototype._uncachedDetectNetwork = function() {\n return __awaiter3(this, void 0, void 0, function() {\n var chainId, error_5, error_6, getNetwork;\n return __generator3(this, function(_a) {\n switch (_a.label) {\n case 0:\n return [4, timer(0)];\n case 1:\n _a.sent();\n chainId = null;\n _a.label = 2;\n case 2:\n _a.trys.push([2, 4, , 9]);\n return [4, this.send(\"eth_chainId\", [])];\n case 3:\n chainId = _a.sent();\n return [3, 9];\n case 4:\n error_5 = _a.sent();\n _a.label = 5;\n case 5:\n _a.trys.push([5, 7, , 8]);\n return [4, this.send(\"net_version\", [])];\n case 6:\n chainId = _a.sent();\n return [3, 8];\n case 7:\n error_6 = _a.sent();\n return [3, 8];\n case 8:\n return [3, 9];\n case 9:\n if (chainId != null) {\n getNetwork = (0, properties_1.getStatic)(this.constructor, \"getNetwork\");\n try {\n return [2, getNetwork(bignumber_1.BigNumber.from(chainId).toNumber())];\n } catch (error) {\n return [2, logger.throwError(\"could not detect network\", logger_1.Logger.errors.NETWORK_ERROR, {\n chainId,\n event: \"invalidNetwork\",\n serverError: error\n })];\n }\n }\n return [2, logger.throwError(\"could not detect network\", logger_1.Logger.errors.NETWORK_ERROR, {\n event: \"noNetwork\"\n })];\n }\n });\n });\n };\n JsonRpcProvider2.prototype.getSigner = function(addressOrIndex) {\n return new JsonRpcSigner(_constructorGuard, this, addressOrIndex);\n };\n JsonRpcProvider2.prototype.getUncheckedSigner = function(addressOrIndex) {\n return this.getSigner(addressOrIndex).connectUnchecked();\n };\n JsonRpcProvider2.prototype.listAccounts = function() {\n var _this = this;\n return this.send(\"eth_accounts\", []).then(function(accounts) {\n return accounts.map(function(a3) {\n return _this.formatter.address(a3);\n });\n });\n };\n JsonRpcProvider2.prototype.send = function(method, params) {\n var _this = this;\n var request = {\n method,\n params,\n id: this._nextId++,\n jsonrpc: \"2.0\"\n };\n this.emit(\"debug\", {\n action: \"request\",\n request: (0, properties_1.deepCopy)(request),\n provider: this\n });\n var cache = [\"eth_chainId\", \"eth_blockNumber\"].indexOf(method) >= 0;\n if (cache && this._cache[method]) {\n return this._cache[method];\n }\n var result = (0, web_1.fetchJson)(this.connection, JSON.stringify(request), getResult).then(function(result2) {\n _this.emit(\"debug\", {\n action: \"response\",\n request,\n response: result2,\n provider: _this\n });\n return result2;\n }, function(error) {\n _this.emit(\"debug\", {\n action: \"response\",\n error,\n request,\n provider: _this\n });\n throw error;\n });\n if (cache) {\n this._cache[method] = result;\n setTimeout(function() {\n _this._cache[method] = null;\n }, 0);\n }\n return result;\n };\n JsonRpcProvider2.prototype.prepareRequest = function(method, params) {\n switch (method) {\n case \"getBlockNumber\":\n return [\"eth_blockNumber\", []];\n case \"getGasPrice\":\n return [\"eth_gasPrice\", []];\n case \"getBalance\":\n return [\"eth_getBalance\", [getLowerCase(params.address), params.blockTag]];\n case \"getTransactionCount\":\n return [\"eth_getTransactionCount\", [getLowerCase(params.address), params.blockTag]];\n case \"getCode\":\n return [\"eth_getCode\", [getLowerCase(params.address), params.blockTag]];\n case \"getStorageAt\":\n return [\"eth_getStorageAt\", [getLowerCase(params.address), (0, bytes_1.hexZeroPad)(params.position, 32), params.blockTag]];\n case \"sendTransaction\":\n return [\"eth_sendRawTransaction\", [params.signedTransaction]];\n case \"getBlock\":\n if (params.blockTag) {\n return [\"eth_getBlockByNumber\", [params.blockTag, !!params.includeTransactions]];\n } else if (params.blockHash) {\n return [\"eth_getBlockByHash\", [params.blockHash, !!params.includeTransactions]];\n }\n return null;\n case \"getTransaction\":\n return [\"eth_getTransactionByHash\", [params.transactionHash]];\n case \"getTransactionReceipt\":\n return [\"eth_getTransactionReceipt\", [params.transactionHash]];\n case \"call\": {\n var hexlifyTransaction = (0, properties_1.getStatic)(this.constructor, \"hexlifyTransaction\");\n return [\"eth_call\", [hexlifyTransaction(params.transaction, { from: true }), params.blockTag]];\n }\n case \"estimateGas\": {\n var hexlifyTransaction = (0, properties_1.getStatic)(this.constructor, \"hexlifyTransaction\");\n return [\"eth_estimateGas\", [hexlifyTransaction(params.transaction, { from: true })]];\n }\n case \"getLogs\":\n if (params.filter && params.filter.address != null) {\n params.filter.address = getLowerCase(params.filter.address);\n }\n return [\"eth_getLogs\", [params.filter]];\n default:\n break;\n }\n return null;\n };\n JsonRpcProvider2.prototype.perform = function(method, params) {\n return __awaiter3(this, void 0, void 0, function() {\n var tx, feeData, args, error_7;\n return __generator3(this, function(_a) {\n switch (_a.label) {\n case 0:\n if (!(method === \"call\" || method === \"estimateGas\"))\n return [3, 2];\n tx = params.transaction;\n if (!(tx && tx.type != null && bignumber_1.BigNumber.from(tx.type).isZero()))\n return [3, 2];\n if (!(tx.maxFeePerGas == null && tx.maxPriorityFeePerGas == null))\n return [3, 2];\n return [4, this.getFeeData()];\n case 1:\n feeData = _a.sent();\n if (feeData.maxFeePerGas == null && feeData.maxPriorityFeePerGas == null) {\n params = (0, properties_1.shallowCopy)(params);\n params.transaction = (0, properties_1.shallowCopy)(tx);\n delete params.transaction.type;\n }\n _a.label = 2;\n case 2:\n args = this.prepareRequest(method, params);\n if (args == null) {\n logger.throwError(method + \" not implemented\", logger_1.Logger.errors.NOT_IMPLEMENTED, { operation: method });\n }\n _a.label = 3;\n case 3:\n _a.trys.push([3, 5, , 6]);\n return [4, this.send(args[0], args[1])];\n case 4:\n return [2, _a.sent()];\n case 5:\n error_7 = _a.sent();\n return [2, checkError(method, error_7, params)];\n case 6:\n return [\n 2\n /*return*/\n ];\n }\n });\n });\n };\n JsonRpcProvider2.prototype._startEvent = function(event) {\n if (event.tag === \"pending\") {\n this._startPending();\n }\n _super.prototype._startEvent.call(this, event);\n };\n JsonRpcProvider2.prototype._startPending = function() {\n if (this._pendingFilter != null) {\n return;\n }\n var self2 = this;\n var pendingFilter = this.send(\"eth_newPendingTransactionFilter\", []);\n this._pendingFilter = pendingFilter;\n pendingFilter.then(function(filterId) {\n function poll2() {\n self2.send(\"eth_getFilterChanges\", [filterId]).then(function(hashes) {\n if (self2._pendingFilter != pendingFilter) {\n return null;\n }\n var seq = Promise.resolve();\n hashes.forEach(function(hash3) {\n self2._emitted[\"t:\" + hash3.toLowerCase()] = \"pending\";\n seq = seq.then(function() {\n return self2.getTransaction(hash3).then(function(tx) {\n self2.emit(\"pending\", tx);\n return null;\n });\n });\n });\n return seq.then(function() {\n return timer(1e3);\n });\n }).then(function() {\n if (self2._pendingFilter != pendingFilter) {\n self2.send(\"eth_uninstallFilter\", [filterId]);\n return;\n }\n setTimeout(function() {\n poll2();\n }, 0);\n return null;\n }).catch(function(error) {\n });\n }\n poll2();\n return filterId;\n }).catch(function(error) {\n });\n };\n JsonRpcProvider2.prototype._stopEvent = function(event) {\n if (event.tag === \"pending\" && this.listenerCount(\"pending\") === 0) {\n this._pendingFilter = null;\n }\n _super.prototype._stopEvent.call(this, event);\n };\n JsonRpcProvider2.hexlifyTransaction = function(transaction, allowExtra) {\n var allowed = (0, properties_1.shallowCopy)(allowedTransactionKeys);\n if (allowExtra) {\n for (var key in allowExtra) {\n if (allowExtra[key]) {\n allowed[key] = true;\n }\n }\n }\n (0, properties_1.checkProperties)(transaction, allowed);\n var result = {};\n [\"chainId\", \"gasLimit\", \"gasPrice\", \"type\", \"maxFeePerGas\", \"maxPriorityFeePerGas\", \"nonce\", \"value\"].forEach(function(key2) {\n if (transaction[key2] == null) {\n return;\n }\n var value = (0, bytes_1.hexValue)(bignumber_1.BigNumber.from(transaction[key2]));\n if (key2 === \"gasLimit\") {\n key2 = \"gas\";\n }\n result[key2] = value;\n });\n [\"from\", \"to\", \"data\"].forEach(function(key2) {\n if (transaction[key2] == null) {\n return;\n }\n result[key2] = (0, bytes_1.hexlify)(transaction[key2]);\n });\n if (transaction.accessList) {\n result[\"accessList\"] = (0, transactions_1.accessListify)(transaction.accessList);\n }\n return result;\n };\n return JsonRpcProvider2;\n }(base_provider_1.BaseProvider)\n );\n exports3.JsonRpcProvider = JsonRpcProvider;\n }\n });\n\n // ../../../node_modules/.pnpm/@ethersproject+providers@5.8.0_bufferutil@4.0.9_utf-8-validate@5.0.10/node_modules/@ethersproject/providers/lib/browser-ws.js\n var require_browser_ws = __commonJS({\n \"../../../node_modules/.pnpm/@ethersproject+providers@5.8.0_bufferutil@4.0.9_utf-8-validate@5.0.10/node_modules/@ethersproject/providers/lib/browser-ws.js\"(exports3) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n Object.defineProperty(exports3, \"__esModule\", { value: true });\n exports3.WebSocket = void 0;\n var logger_1 = require_lib();\n var _version_1 = require_version23();\n var WS = null;\n exports3.WebSocket = WS;\n try {\n exports3.WebSocket = WS = WebSocket;\n if (WS == null) {\n throw new Error(\"inject please\");\n }\n } catch (error) {\n logger_2 = new logger_1.Logger(_version_1.version);\n exports3.WebSocket = WS = function() {\n logger_2.throwError(\"WebSockets not supported in this environment\", logger_1.Logger.errors.UNSUPPORTED_OPERATION, {\n operation: \"new WebSocket()\"\n });\n };\n }\n var logger_2;\n }\n });\n\n // ../../../node_modules/.pnpm/@ethersproject+providers@5.8.0_bufferutil@4.0.9_utf-8-validate@5.0.10/node_modules/@ethersproject/providers/lib/websocket-provider.js\n var require_websocket_provider = __commonJS({\n \"../../../node_modules/.pnpm/@ethersproject+providers@5.8.0_bufferutil@4.0.9_utf-8-validate@5.0.10/node_modules/@ethersproject/providers/lib/websocket-provider.js\"(exports3) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n var __extends3 = exports3 && exports3.__extends || /* @__PURE__ */ function() {\n var extendStatics3 = function(d5, b4) {\n extendStatics3 = Object.setPrototypeOf || { __proto__: [] } instanceof Array && function(d6, b5) {\n d6.__proto__ = b5;\n } || function(d6, b5) {\n for (var p4 in b5)\n if (Object.prototype.hasOwnProperty.call(b5, p4))\n d6[p4] = b5[p4];\n };\n return extendStatics3(d5, b4);\n };\n return function(d5, b4) {\n if (typeof b4 !== \"function\" && b4 !== null)\n throw new TypeError(\"Class extends value \" + String(b4) + \" is not a constructor or null\");\n extendStatics3(d5, b4);\n function __() {\n this.constructor = d5;\n }\n d5.prototype = b4 === null ? Object.create(b4) : (__.prototype = b4.prototype, new __());\n };\n }();\n var __awaiter3 = exports3 && exports3.__awaiter || function(thisArg, _arguments, P2, generator) {\n function adopt(value) {\n return value instanceof P2 ? value : new P2(function(resolve) {\n resolve(value);\n });\n }\n return new (P2 || (P2 = Promise))(function(resolve, reject) {\n function fulfilled(value) {\n try {\n step(generator.next(value));\n } catch (e3) {\n reject(e3);\n }\n }\n function rejected(value) {\n try {\n step(generator[\"throw\"](value));\n } catch (e3) {\n reject(e3);\n }\n }\n function step(result) {\n result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected);\n }\n step((generator = generator.apply(thisArg, _arguments || [])).next());\n });\n };\n var __generator3 = exports3 && exports3.__generator || function(thisArg, body) {\n var _2 = { label: 0, sent: function() {\n if (t3[0] & 1)\n throw t3[1];\n return t3[1];\n }, trys: [], ops: [] }, f6, y6, t3, g4;\n return g4 = { next: verb(0), \"throw\": verb(1), \"return\": verb(2) }, typeof Symbol === \"function\" && (g4[Symbol.iterator] = function() {\n return this;\n }), g4;\n function verb(n2) {\n return function(v2) {\n return step([n2, v2]);\n };\n }\n function step(op) {\n if (f6)\n throw new TypeError(\"Generator is already executing.\");\n while (_2)\n try {\n if (f6 = 1, y6 && (t3 = op[0] & 2 ? y6[\"return\"] : op[0] ? y6[\"throw\"] || ((t3 = y6[\"return\"]) && t3.call(y6), 0) : y6.next) && !(t3 = t3.call(y6, op[1])).done)\n return t3;\n if (y6 = 0, t3)\n op = [op[0] & 2, t3.value];\n switch (op[0]) {\n case 0:\n case 1:\n t3 = op;\n break;\n case 4:\n _2.label++;\n return { value: op[1], done: false };\n case 5:\n _2.label++;\n y6 = op[1];\n op = [0];\n continue;\n case 7:\n op = _2.ops.pop();\n _2.trys.pop();\n continue;\n default:\n if (!(t3 = _2.trys, t3 = t3.length > 0 && t3[t3.length - 1]) && (op[0] === 6 || op[0] === 2)) {\n _2 = 0;\n continue;\n }\n if (op[0] === 3 && (!t3 || op[1] > t3[0] && op[1] < t3[3])) {\n _2.label = op[1];\n break;\n }\n if (op[0] === 6 && _2.label < t3[1]) {\n _2.label = t3[1];\n t3 = op;\n break;\n }\n if (t3 && _2.label < t3[2]) {\n _2.label = t3[2];\n _2.ops.push(op);\n break;\n }\n if (t3[2])\n _2.ops.pop();\n _2.trys.pop();\n continue;\n }\n op = body.call(thisArg, _2);\n } catch (e3) {\n op = [6, e3];\n y6 = 0;\n } finally {\n f6 = t3 = 0;\n }\n if (op[0] & 5)\n throw op[1];\n return { value: op[0] ? op[1] : void 0, done: true };\n }\n };\n Object.defineProperty(exports3, \"__esModule\", { value: true });\n exports3.WebSocketProvider = void 0;\n var bignumber_1 = require_lib3();\n var properties_1 = require_lib4();\n var json_rpc_provider_1 = require_json_rpc_provider();\n var ws_1 = require_browser_ws();\n var logger_1 = require_lib();\n var _version_1 = require_version23();\n var logger = new logger_1.Logger(_version_1.version);\n var NextId = 1;\n var WebSocketProvider = (\n /** @class */\n function(_super) {\n __extends3(WebSocketProvider2, _super);\n function WebSocketProvider2(url, network) {\n var _this = this;\n if (network === \"any\") {\n logger.throwError(\"WebSocketProvider does not support 'any' network yet\", logger_1.Logger.errors.UNSUPPORTED_OPERATION, {\n operation: \"network:any\"\n });\n }\n if (typeof url === \"string\") {\n _this = _super.call(this, url, network) || this;\n } else {\n _this = _super.call(this, \"_websocket\", network) || this;\n }\n _this._pollingInterval = -1;\n _this._wsReady = false;\n if (typeof url === \"string\") {\n (0, properties_1.defineReadOnly)(_this, \"_websocket\", new ws_1.WebSocket(_this.connection.url));\n } else {\n (0, properties_1.defineReadOnly)(_this, \"_websocket\", url);\n }\n (0, properties_1.defineReadOnly)(_this, \"_requests\", {});\n (0, properties_1.defineReadOnly)(_this, \"_subs\", {});\n (0, properties_1.defineReadOnly)(_this, \"_subIds\", {});\n (0, properties_1.defineReadOnly)(_this, \"_detectNetwork\", _super.prototype.detectNetwork.call(_this));\n _this.websocket.onopen = function() {\n _this._wsReady = true;\n Object.keys(_this._requests).forEach(function(id) {\n _this.websocket.send(_this._requests[id].payload);\n });\n };\n _this.websocket.onmessage = function(messageEvent) {\n var data = messageEvent.data;\n var result = JSON.parse(data);\n if (result.id != null) {\n var id = String(result.id);\n var request = _this._requests[id];\n delete _this._requests[id];\n if (result.result !== void 0) {\n request.callback(null, result.result);\n _this.emit(\"debug\", {\n action: \"response\",\n request: JSON.parse(request.payload),\n response: result.result,\n provider: _this\n });\n } else {\n var error = null;\n if (result.error) {\n error = new Error(result.error.message || \"unknown error\");\n (0, properties_1.defineReadOnly)(error, \"code\", result.error.code || null);\n (0, properties_1.defineReadOnly)(error, \"response\", data);\n } else {\n error = new Error(\"unknown error\");\n }\n request.callback(error, void 0);\n _this.emit(\"debug\", {\n action: \"response\",\n error,\n request: JSON.parse(request.payload),\n provider: _this\n });\n }\n } else if (result.method === \"eth_subscription\") {\n var sub = _this._subs[result.params.subscription];\n if (sub) {\n sub.processFunc(result.params.result);\n }\n } else {\n console.warn(\"this should not happen\");\n }\n };\n var fauxPoll = setInterval(function() {\n _this.emit(\"poll\");\n }, 1e3);\n if (fauxPoll.unref) {\n fauxPoll.unref();\n }\n return _this;\n }\n Object.defineProperty(WebSocketProvider2.prototype, \"websocket\", {\n // Cannot narrow the type of _websocket, as that is not backwards compatible\n // so we add a getter and let the WebSocket be a public API.\n get: function() {\n return this._websocket;\n },\n enumerable: false,\n configurable: true\n });\n WebSocketProvider2.prototype.detectNetwork = function() {\n return this._detectNetwork;\n };\n Object.defineProperty(WebSocketProvider2.prototype, \"pollingInterval\", {\n get: function() {\n return 0;\n },\n set: function(value) {\n logger.throwError(\"cannot set polling interval on WebSocketProvider\", logger_1.Logger.errors.UNSUPPORTED_OPERATION, {\n operation: \"setPollingInterval\"\n });\n },\n enumerable: false,\n configurable: true\n });\n WebSocketProvider2.prototype.resetEventsBlock = function(blockNumber) {\n logger.throwError(\"cannot reset events block on WebSocketProvider\", logger_1.Logger.errors.UNSUPPORTED_OPERATION, {\n operation: \"resetEventBlock\"\n });\n };\n WebSocketProvider2.prototype.poll = function() {\n return __awaiter3(this, void 0, void 0, function() {\n return __generator3(this, function(_a) {\n return [2, null];\n });\n });\n };\n Object.defineProperty(WebSocketProvider2.prototype, \"polling\", {\n set: function(value) {\n if (!value) {\n return;\n }\n logger.throwError(\"cannot set polling on WebSocketProvider\", logger_1.Logger.errors.UNSUPPORTED_OPERATION, {\n operation: \"setPolling\"\n });\n },\n enumerable: false,\n configurable: true\n });\n WebSocketProvider2.prototype.send = function(method, params) {\n var _this = this;\n var rid = NextId++;\n return new Promise(function(resolve, reject) {\n function callback(error, result) {\n if (error) {\n return reject(error);\n }\n return resolve(result);\n }\n var payload = JSON.stringify({\n method,\n params,\n id: rid,\n jsonrpc: \"2.0\"\n });\n _this.emit(\"debug\", {\n action: \"request\",\n request: JSON.parse(payload),\n provider: _this\n });\n _this._requests[String(rid)] = { callback, payload };\n if (_this._wsReady) {\n _this.websocket.send(payload);\n }\n });\n };\n WebSocketProvider2.defaultUrl = function() {\n return \"ws://localhost:8546\";\n };\n WebSocketProvider2.prototype._subscribe = function(tag, param, processFunc) {\n return __awaiter3(this, void 0, void 0, function() {\n var subIdPromise, subId;\n var _this = this;\n return __generator3(this, function(_a) {\n switch (_a.label) {\n case 0:\n subIdPromise = this._subIds[tag];\n if (subIdPromise == null) {\n subIdPromise = Promise.all(param).then(function(param2) {\n return _this.send(\"eth_subscribe\", param2);\n });\n this._subIds[tag] = subIdPromise;\n }\n return [4, subIdPromise];\n case 1:\n subId = _a.sent();\n this._subs[subId] = { tag, processFunc };\n return [\n 2\n /*return*/\n ];\n }\n });\n });\n };\n WebSocketProvider2.prototype._startEvent = function(event) {\n var _this = this;\n switch (event.type) {\n case \"block\":\n this._subscribe(\"block\", [\"newHeads\"], function(result) {\n var blockNumber = bignumber_1.BigNumber.from(result.number).toNumber();\n _this._emitted.block = blockNumber;\n _this.emit(\"block\", blockNumber);\n });\n break;\n case \"pending\":\n this._subscribe(\"pending\", [\"newPendingTransactions\"], function(result) {\n _this.emit(\"pending\", result);\n });\n break;\n case \"filter\":\n this._subscribe(event.tag, [\"logs\", this._getFilter(event.filter)], function(result) {\n if (result.removed == null) {\n result.removed = false;\n }\n _this.emit(event.filter, _this.formatter.filterLog(result));\n });\n break;\n case \"tx\": {\n var emitReceipt_1 = function(event2) {\n var hash3 = event2.hash;\n _this.getTransactionReceipt(hash3).then(function(receipt) {\n if (!receipt) {\n return;\n }\n _this.emit(hash3, receipt);\n });\n };\n emitReceipt_1(event);\n this._subscribe(\"tx\", [\"newHeads\"], function(result) {\n _this._events.filter(function(e3) {\n return e3.type === \"tx\";\n }).forEach(emitReceipt_1);\n });\n break;\n }\n case \"debug\":\n case \"poll\":\n case \"willPoll\":\n case \"didPoll\":\n case \"error\":\n break;\n default:\n console.log(\"unhandled:\", event);\n break;\n }\n };\n WebSocketProvider2.prototype._stopEvent = function(event) {\n var _this = this;\n var tag = event.tag;\n if (event.type === \"tx\") {\n if (this._events.filter(function(e3) {\n return e3.type === \"tx\";\n }).length) {\n return;\n }\n tag = \"tx\";\n } else if (this.listenerCount(event.event)) {\n return;\n }\n var subId = this._subIds[tag];\n if (!subId) {\n return;\n }\n delete this._subIds[tag];\n subId.then(function(subId2) {\n if (!_this._subs[subId2]) {\n return;\n }\n delete _this._subs[subId2];\n _this.send(\"eth_unsubscribe\", [subId2]);\n });\n };\n WebSocketProvider2.prototype.destroy = function() {\n return __awaiter3(this, void 0, void 0, function() {\n var _this = this;\n return __generator3(this, function(_a) {\n switch (_a.label) {\n case 0:\n if (!(this.websocket.readyState === ws_1.WebSocket.CONNECTING))\n return [3, 2];\n return [4, new Promise(function(resolve) {\n _this.websocket.onopen = function() {\n resolve(true);\n };\n _this.websocket.onerror = function() {\n resolve(false);\n };\n })];\n case 1:\n _a.sent();\n _a.label = 2;\n case 2:\n this.websocket.close(1e3);\n return [\n 2\n /*return*/\n ];\n }\n });\n });\n };\n return WebSocketProvider2;\n }(json_rpc_provider_1.JsonRpcProvider)\n );\n exports3.WebSocketProvider = WebSocketProvider;\n }\n });\n\n // ../../../node_modules/.pnpm/@ethersproject+providers@5.8.0_bufferutil@4.0.9_utf-8-validate@5.0.10/node_modules/@ethersproject/providers/lib/url-json-rpc-provider.js\n var require_url_json_rpc_provider = __commonJS({\n \"../../../node_modules/.pnpm/@ethersproject+providers@5.8.0_bufferutil@4.0.9_utf-8-validate@5.0.10/node_modules/@ethersproject/providers/lib/url-json-rpc-provider.js\"(exports3) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n var __extends3 = exports3 && exports3.__extends || /* @__PURE__ */ function() {\n var extendStatics3 = function(d5, b4) {\n extendStatics3 = Object.setPrototypeOf || { __proto__: [] } instanceof Array && function(d6, b5) {\n d6.__proto__ = b5;\n } || function(d6, b5) {\n for (var p4 in b5)\n if (Object.prototype.hasOwnProperty.call(b5, p4))\n d6[p4] = b5[p4];\n };\n return extendStatics3(d5, b4);\n };\n return function(d5, b4) {\n if (typeof b4 !== \"function\" && b4 !== null)\n throw new TypeError(\"Class extends value \" + String(b4) + \" is not a constructor or null\");\n extendStatics3(d5, b4);\n function __() {\n this.constructor = d5;\n }\n d5.prototype = b4 === null ? Object.create(b4) : (__.prototype = b4.prototype, new __());\n };\n }();\n var __awaiter3 = exports3 && exports3.__awaiter || function(thisArg, _arguments, P2, generator) {\n function adopt(value) {\n return value instanceof P2 ? value : new P2(function(resolve) {\n resolve(value);\n });\n }\n return new (P2 || (P2 = Promise))(function(resolve, reject) {\n function fulfilled(value) {\n try {\n step(generator.next(value));\n } catch (e3) {\n reject(e3);\n }\n }\n function rejected(value) {\n try {\n step(generator[\"throw\"](value));\n } catch (e3) {\n reject(e3);\n }\n }\n function step(result) {\n result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected);\n }\n step((generator = generator.apply(thisArg, _arguments || [])).next());\n });\n };\n var __generator3 = exports3 && exports3.__generator || function(thisArg, body) {\n var _2 = { label: 0, sent: function() {\n if (t3[0] & 1)\n throw t3[1];\n return t3[1];\n }, trys: [], ops: [] }, f6, y6, t3, g4;\n return g4 = { next: verb(0), \"throw\": verb(1), \"return\": verb(2) }, typeof Symbol === \"function\" && (g4[Symbol.iterator] = function() {\n return this;\n }), g4;\n function verb(n2) {\n return function(v2) {\n return step([n2, v2]);\n };\n }\n function step(op) {\n if (f6)\n throw new TypeError(\"Generator is already executing.\");\n while (_2)\n try {\n if (f6 = 1, y6 && (t3 = op[0] & 2 ? y6[\"return\"] : op[0] ? y6[\"throw\"] || ((t3 = y6[\"return\"]) && t3.call(y6), 0) : y6.next) && !(t3 = t3.call(y6, op[1])).done)\n return t3;\n if (y6 = 0, t3)\n op = [op[0] & 2, t3.value];\n switch (op[0]) {\n case 0:\n case 1:\n t3 = op;\n break;\n case 4:\n _2.label++;\n return { value: op[1], done: false };\n case 5:\n _2.label++;\n y6 = op[1];\n op = [0];\n continue;\n case 7:\n op = _2.ops.pop();\n _2.trys.pop();\n continue;\n default:\n if (!(t3 = _2.trys, t3 = t3.length > 0 && t3[t3.length - 1]) && (op[0] === 6 || op[0] === 2)) {\n _2 = 0;\n continue;\n }\n if (op[0] === 3 && (!t3 || op[1] > t3[0] && op[1] < t3[3])) {\n _2.label = op[1];\n break;\n }\n if (op[0] === 6 && _2.label < t3[1]) {\n _2.label = t3[1];\n t3 = op;\n break;\n }\n if (t3 && _2.label < t3[2]) {\n _2.label = t3[2];\n _2.ops.push(op);\n break;\n }\n if (t3[2])\n _2.ops.pop();\n _2.trys.pop();\n continue;\n }\n op = body.call(thisArg, _2);\n } catch (e3) {\n op = [6, e3];\n y6 = 0;\n } finally {\n f6 = t3 = 0;\n }\n if (op[0] & 5)\n throw op[1];\n return { value: op[0] ? op[1] : void 0, done: true };\n }\n };\n Object.defineProperty(exports3, \"__esModule\", { value: true });\n exports3.UrlJsonRpcProvider = exports3.StaticJsonRpcProvider = void 0;\n var properties_1 = require_lib4();\n var logger_1 = require_lib();\n var _version_1 = require_version23();\n var logger = new logger_1.Logger(_version_1.version);\n var json_rpc_provider_1 = require_json_rpc_provider();\n var StaticJsonRpcProvider = (\n /** @class */\n function(_super) {\n __extends3(StaticJsonRpcProvider2, _super);\n function StaticJsonRpcProvider2() {\n return _super !== null && _super.apply(this, arguments) || this;\n }\n StaticJsonRpcProvider2.prototype.detectNetwork = function() {\n return __awaiter3(this, void 0, void 0, function() {\n var network;\n return __generator3(this, function(_a) {\n switch (_a.label) {\n case 0:\n network = this.network;\n if (!(network == null))\n return [3, 2];\n return [4, _super.prototype.detectNetwork.call(this)];\n case 1:\n network = _a.sent();\n if (!network) {\n logger.throwError(\"no network detected\", logger_1.Logger.errors.UNKNOWN_ERROR, {});\n }\n if (this._network == null) {\n (0, properties_1.defineReadOnly)(this, \"_network\", network);\n this.emit(\"network\", network, null);\n }\n _a.label = 2;\n case 2:\n return [2, network];\n }\n });\n });\n };\n return StaticJsonRpcProvider2;\n }(json_rpc_provider_1.JsonRpcProvider)\n );\n exports3.StaticJsonRpcProvider = StaticJsonRpcProvider;\n var UrlJsonRpcProvider = (\n /** @class */\n function(_super) {\n __extends3(UrlJsonRpcProvider2, _super);\n function UrlJsonRpcProvider2(network, apiKey) {\n var _newTarget = this.constructor;\n var _this = this;\n logger.checkAbstract(_newTarget, UrlJsonRpcProvider2);\n network = (0, properties_1.getStatic)(_newTarget, \"getNetwork\")(network);\n apiKey = (0, properties_1.getStatic)(_newTarget, \"getApiKey\")(apiKey);\n var connection = (0, properties_1.getStatic)(_newTarget, \"getUrl\")(network, apiKey);\n _this = _super.call(this, connection, network) || this;\n if (typeof apiKey === \"string\") {\n (0, properties_1.defineReadOnly)(_this, \"apiKey\", apiKey);\n } else if (apiKey != null) {\n Object.keys(apiKey).forEach(function(key) {\n (0, properties_1.defineReadOnly)(_this, key, apiKey[key]);\n });\n }\n return _this;\n }\n UrlJsonRpcProvider2.prototype._startPending = function() {\n logger.warn(\"WARNING: API provider does not support pending filters\");\n };\n UrlJsonRpcProvider2.prototype.isCommunityResource = function() {\n return false;\n };\n UrlJsonRpcProvider2.prototype.getSigner = function(address) {\n return logger.throwError(\"API provider does not support signing\", logger_1.Logger.errors.UNSUPPORTED_OPERATION, { operation: \"getSigner\" });\n };\n UrlJsonRpcProvider2.prototype.listAccounts = function() {\n return Promise.resolve([]);\n };\n UrlJsonRpcProvider2.getApiKey = function(apiKey) {\n return apiKey;\n };\n UrlJsonRpcProvider2.getUrl = function(network, apiKey) {\n return logger.throwError(\"not implemented; sub-classes must override getUrl\", logger_1.Logger.errors.NOT_IMPLEMENTED, {\n operation: \"getUrl\"\n });\n };\n return UrlJsonRpcProvider2;\n }(StaticJsonRpcProvider)\n );\n exports3.UrlJsonRpcProvider = UrlJsonRpcProvider;\n }\n });\n\n // ../../../node_modules/.pnpm/@ethersproject+providers@5.8.0_bufferutil@4.0.9_utf-8-validate@5.0.10/node_modules/@ethersproject/providers/lib/alchemy-provider.js\n var require_alchemy_provider = __commonJS({\n \"../../../node_modules/.pnpm/@ethersproject+providers@5.8.0_bufferutil@4.0.9_utf-8-validate@5.0.10/node_modules/@ethersproject/providers/lib/alchemy-provider.js\"(exports3) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n var __extends3 = exports3 && exports3.__extends || /* @__PURE__ */ function() {\n var extendStatics3 = function(d5, b4) {\n extendStatics3 = Object.setPrototypeOf || { __proto__: [] } instanceof Array && function(d6, b5) {\n d6.__proto__ = b5;\n } || function(d6, b5) {\n for (var p4 in b5)\n if (Object.prototype.hasOwnProperty.call(b5, p4))\n d6[p4] = b5[p4];\n };\n return extendStatics3(d5, b4);\n };\n return function(d5, b4) {\n if (typeof b4 !== \"function\" && b4 !== null)\n throw new TypeError(\"Class extends value \" + String(b4) + \" is not a constructor or null\");\n extendStatics3(d5, b4);\n function __() {\n this.constructor = d5;\n }\n d5.prototype = b4 === null ? Object.create(b4) : (__.prototype = b4.prototype, new __());\n };\n }();\n Object.defineProperty(exports3, \"__esModule\", { value: true });\n exports3.AlchemyProvider = exports3.AlchemyWebSocketProvider = void 0;\n var properties_1 = require_lib4();\n var formatter_1 = require_formatter();\n var websocket_provider_1 = require_websocket_provider();\n var logger_1 = require_lib();\n var _version_1 = require_version23();\n var logger = new logger_1.Logger(_version_1.version);\n var url_json_rpc_provider_1 = require_url_json_rpc_provider();\n var defaultApiKey = \"_gg7wSSi0KMBsdKnGVfHDueq6xMB9EkC\";\n var AlchemyWebSocketProvider = (\n /** @class */\n function(_super) {\n __extends3(AlchemyWebSocketProvider2, _super);\n function AlchemyWebSocketProvider2(network, apiKey) {\n var _this = this;\n var provider = new AlchemyProvider(network, apiKey);\n var url = provider.connection.url.replace(/^http/i, \"ws\").replace(\".alchemyapi.\", \".ws.alchemyapi.\");\n _this = _super.call(this, url, provider.network) || this;\n (0, properties_1.defineReadOnly)(_this, \"apiKey\", provider.apiKey);\n return _this;\n }\n AlchemyWebSocketProvider2.prototype.isCommunityResource = function() {\n return this.apiKey === defaultApiKey;\n };\n return AlchemyWebSocketProvider2;\n }(websocket_provider_1.WebSocketProvider)\n );\n exports3.AlchemyWebSocketProvider = AlchemyWebSocketProvider;\n var AlchemyProvider = (\n /** @class */\n function(_super) {\n __extends3(AlchemyProvider2, _super);\n function AlchemyProvider2() {\n return _super !== null && _super.apply(this, arguments) || this;\n }\n AlchemyProvider2.getWebSocketProvider = function(network, apiKey) {\n return new AlchemyWebSocketProvider(network, apiKey);\n };\n AlchemyProvider2.getApiKey = function(apiKey) {\n if (apiKey == null) {\n return defaultApiKey;\n }\n if (apiKey && typeof apiKey !== \"string\") {\n logger.throwArgumentError(\"invalid apiKey\", \"apiKey\", apiKey);\n }\n return apiKey;\n };\n AlchemyProvider2.getUrl = function(network, apiKey) {\n var host = null;\n switch (network.name) {\n case \"homestead\":\n host = \"eth-mainnet.alchemyapi.io/v2/\";\n break;\n case \"goerli\":\n host = \"eth-goerli.g.alchemy.com/v2/\";\n break;\n case \"sepolia\":\n host = \"eth-sepolia.g.alchemy.com/v2/\";\n break;\n case \"matic\":\n host = \"polygon-mainnet.g.alchemy.com/v2/\";\n break;\n case \"maticmum\":\n host = \"polygon-mumbai.g.alchemy.com/v2/\";\n break;\n case \"arbitrum\":\n host = \"arb-mainnet.g.alchemy.com/v2/\";\n break;\n case \"arbitrum-goerli\":\n host = \"arb-goerli.g.alchemy.com/v2/\";\n break;\n case \"arbitrum-sepolia\":\n host = \"arb-sepolia.g.alchemy.com/v2/\";\n break;\n case \"optimism\":\n host = \"opt-mainnet.g.alchemy.com/v2/\";\n break;\n case \"optimism-goerli\":\n host = \"opt-goerli.g.alchemy.com/v2/\";\n break;\n case \"optimism-sepolia\":\n host = \"opt-sepolia.g.alchemy.com/v2/\";\n break;\n default:\n logger.throwArgumentError(\"unsupported network\", \"network\", arguments[0]);\n }\n return {\n allowGzip: true,\n url: \"https://\" + host + apiKey,\n throttleCallback: function(attempt, url) {\n if (apiKey === defaultApiKey) {\n (0, formatter_1.showThrottleMessage)();\n }\n return Promise.resolve(true);\n }\n };\n };\n AlchemyProvider2.prototype.isCommunityResource = function() {\n return this.apiKey === defaultApiKey;\n };\n return AlchemyProvider2;\n }(url_json_rpc_provider_1.UrlJsonRpcProvider)\n );\n exports3.AlchemyProvider = AlchemyProvider;\n }\n });\n\n // ../../../node_modules/.pnpm/@ethersproject+providers@5.8.0_bufferutil@4.0.9_utf-8-validate@5.0.10/node_modules/@ethersproject/providers/lib/ankr-provider.js\n var require_ankr_provider = __commonJS({\n \"../../../node_modules/.pnpm/@ethersproject+providers@5.8.0_bufferutil@4.0.9_utf-8-validate@5.0.10/node_modules/@ethersproject/providers/lib/ankr-provider.js\"(exports3) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n var __extends3 = exports3 && exports3.__extends || /* @__PURE__ */ function() {\n var extendStatics3 = function(d5, b4) {\n extendStatics3 = Object.setPrototypeOf || { __proto__: [] } instanceof Array && function(d6, b5) {\n d6.__proto__ = b5;\n } || function(d6, b5) {\n for (var p4 in b5)\n if (Object.prototype.hasOwnProperty.call(b5, p4))\n d6[p4] = b5[p4];\n };\n return extendStatics3(d5, b4);\n };\n return function(d5, b4) {\n if (typeof b4 !== \"function\" && b4 !== null)\n throw new TypeError(\"Class extends value \" + String(b4) + \" is not a constructor or null\");\n extendStatics3(d5, b4);\n function __() {\n this.constructor = d5;\n }\n d5.prototype = b4 === null ? Object.create(b4) : (__.prototype = b4.prototype, new __());\n };\n }();\n Object.defineProperty(exports3, \"__esModule\", { value: true });\n exports3.AnkrProvider = void 0;\n var formatter_1 = require_formatter();\n var url_json_rpc_provider_1 = require_url_json_rpc_provider();\n var logger_1 = require_lib();\n var _version_1 = require_version23();\n var logger = new logger_1.Logger(_version_1.version);\n var defaultApiKey = \"9f7d929b018cdffb338517efa06f58359e86ff1ffd350bc889738523659e7972\";\n function getHost(name) {\n switch (name) {\n case \"homestead\":\n return \"rpc.ankr.com/eth/\";\n case \"ropsten\":\n return \"rpc.ankr.com/eth_ropsten/\";\n case \"rinkeby\":\n return \"rpc.ankr.com/eth_rinkeby/\";\n case \"goerli\":\n return \"rpc.ankr.com/eth_goerli/\";\n case \"sepolia\":\n return \"rpc.ankr.com/eth_sepolia/\";\n case \"matic\":\n return \"rpc.ankr.com/polygon/\";\n case \"maticmum\":\n return \"rpc.ankr.com/polygon_mumbai/\";\n case \"optimism\":\n return \"rpc.ankr.com/optimism/\";\n case \"optimism-goerli\":\n return \"rpc.ankr.com/optimism_testnet/\";\n case \"optimism-sepolia\":\n return \"rpc.ankr.com/optimism_sepolia/\";\n case \"arbitrum\":\n return \"rpc.ankr.com/arbitrum/\";\n }\n return logger.throwArgumentError(\"unsupported network\", \"name\", name);\n }\n var AnkrProvider = (\n /** @class */\n function(_super) {\n __extends3(AnkrProvider2, _super);\n function AnkrProvider2() {\n return _super !== null && _super.apply(this, arguments) || this;\n }\n AnkrProvider2.prototype.isCommunityResource = function() {\n return this.apiKey === defaultApiKey;\n };\n AnkrProvider2.getApiKey = function(apiKey) {\n if (apiKey == null) {\n return defaultApiKey;\n }\n return apiKey;\n };\n AnkrProvider2.getUrl = function(network, apiKey) {\n if (apiKey == null) {\n apiKey = defaultApiKey;\n }\n var connection = {\n allowGzip: true,\n url: \"https://\" + getHost(network.name) + apiKey,\n throttleCallback: function(attempt, url) {\n if (apiKey.apiKey === defaultApiKey) {\n (0, formatter_1.showThrottleMessage)();\n }\n return Promise.resolve(true);\n }\n };\n if (apiKey.projectSecret != null) {\n connection.user = \"\";\n connection.password = apiKey.projectSecret;\n }\n return connection;\n };\n return AnkrProvider2;\n }(url_json_rpc_provider_1.UrlJsonRpcProvider)\n );\n exports3.AnkrProvider = AnkrProvider;\n }\n });\n\n // ../../../node_modules/.pnpm/@ethersproject+providers@5.8.0_bufferutil@4.0.9_utf-8-validate@5.0.10/node_modules/@ethersproject/providers/lib/cloudflare-provider.js\n var require_cloudflare_provider = __commonJS({\n \"../../../node_modules/.pnpm/@ethersproject+providers@5.8.0_bufferutil@4.0.9_utf-8-validate@5.0.10/node_modules/@ethersproject/providers/lib/cloudflare-provider.js\"(exports3) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n var __extends3 = exports3 && exports3.__extends || /* @__PURE__ */ function() {\n var extendStatics3 = function(d5, b4) {\n extendStatics3 = Object.setPrototypeOf || { __proto__: [] } instanceof Array && function(d6, b5) {\n d6.__proto__ = b5;\n } || function(d6, b5) {\n for (var p4 in b5)\n if (Object.prototype.hasOwnProperty.call(b5, p4))\n d6[p4] = b5[p4];\n };\n return extendStatics3(d5, b4);\n };\n return function(d5, b4) {\n if (typeof b4 !== \"function\" && b4 !== null)\n throw new TypeError(\"Class extends value \" + String(b4) + \" is not a constructor or null\");\n extendStatics3(d5, b4);\n function __() {\n this.constructor = d5;\n }\n d5.prototype = b4 === null ? Object.create(b4) : (__.prototype = b4.prototype, new __());\n };\n }();\n var __awaiter3 = exports3 && exports3.__awaiter || function(thisArg, _arguments, P2, generator) {\n function adopt(value) {\n return value instanceof P2 ? value : new P2(function(resolve) {\n resolve(value);\n });\n }\n return new (P2 || (P2 = Promise))(function(resolve, reject) {\n function fulfilled(value) {\n try {\n step(generator.next(value));\n } catch (e3) {\n reject(e3);\n }\n }\n function rejected(value) {\n try {\n step(generator[\"throw\"](value));\n } catch (e3) {\n reject(e3);\n }\n }\n function step(result) {\n result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected);\n }\n step((generator = generator.apply(thisArg, _arguments || [])).next());\n });\n };\n var __generator3 = exports3 && exports3.__generator || function(thisArg, body) {\n var _2 = { label: 0, sent: function() {\n if (t3[0] & 1)\n throw t3[1];\n return t3[1];\n }, trys: [], ops: [] }, f6, y6, t3, g4;\n return g4 = { next: verb(0), \"throw\": verb(1), \"return\": verb(2) }, typeof Symbol === \"function\" && (g4[Symbol.iterator] = function() {\n return this;\n }), g4;\n function verb(n2) {\n return function(v2) {\n return step([n2, v2]);\n };\n }\n function step(op) {\n if (f6)\n throw new TypeError(\"Generator is already executing.\");\n while (_2)\n try {\n if (f6 = 1, y6 && (t3 = op[0] & 2 ? y6[\"return\"] : op[0] ? y6[\"throw\"] || ((t3 = y6[\"return\"]) && t3.call(y6), 0) : y6.next) && !(t3 = t3.call(y6, op[1])).done)\n return t3;\n if (y6 = 0, t3)\n op = [op[0] & 2, t3.value];\n switch (op[0]) {\n case 0:\n case 1:\n t3 = op;\n break;\n case 4:\n _2.label++;\n return { value: op[1], done: false };\n case 5:\n _2.label++;\n y6 = op[1];\n op = [0];\n continue;\n case 7:\n op = _2.ops.pop();\n _2.trys.pop();\n continue;\n default:\n if (!(t3 = _2.trys, t3 = t3.length > 0 && t3[t3.length - 1]) && (op[0] === 6 || op[0] === 2)) {\n _2 = 0;\n continue;\n }\n if (op[0] === 3 && (!t3 || op[1] > t3[0] && op[1] < t3[3])) {\n _2.label = op[1];\n break;\n }\n if (op[0] === 6 && _2.label < t3[1]) {\n _2.label = t3[1];\n t3 = op;\n break;\n }\n if (t3 && _2.label < t3[2]) {\n _2.label = t3[2];\n _2.ops.push(op);\n break;\n }\n if (t3[2])\n _2.ops.pop();\n _2.trys.pop();\n continue;\n }\n op = body.call(thisArg, _2);\n } catch (e3) {\n op = [6, e3];\n y6 = 0;\n } finally {\n f6 = t3 = 0;\n }\n if (op[0] & 5)\n throw op[1];\n return { value: op[0] ? op[1] : void 0, done: true };\n }\n };\n Object.defineProperty(exports3, \"__esModule\", { value: true });\n exports3.CloudflareProvider = void 0;\n var url_json_rpc_provider_1 = require_url_json_rpc_provider();\n var logger_1 = require_lib();\n var _version_1 = require_version23();\n var logger = new logger_1.Logger(_version_1.version);\n var CloudflareProvider = (\n /** @class */\n function(_super) {\n __extends3(CloudflareProvider2, _super);\n function CloudflareProvider2() {\n return _super !== null && _super.apply(this, arguments) || this;\n }\n CloudflareProvider2.getApiKey = function(apiKey) {\n if (apiKey != null) {\n logger.throwArgumentError(\"apiKey not supported for cloudflare\", \"apiKey\", apiKey);\n }\n return null;\n };\n CloudflareProvider2.getUrl = function(network, apiKey) {\n var host = null;\n switch (network.name) {\n case \"homestead\":\n host = \"https://cloudflare-eth.com/\";\n break;\n default:\n logger.throwArgumentError(\"unsupported network\", \"network\", arguments[0]);\n }\n return host;\n };\n CloudflareProvider2.prototype.perform = function(method, params) {\n return __awaiter3(this, void 0, void 0, function() {\n var block;\n return __generator3(this, function(_a) {\n switch (_a.label) {\n case 0:\n if (!(method === \"getBlockNumber\"))\n return [3, 2];\n return [4, _super.prototype.perform.call(this, \"getBlock\", { blockTag: \"latest\" })];\n case 1:\n block = _a.sent();\n return [2, block.number];\n case 2:\n return [2, _super.prototype.perform.call(this, method, params)];\n }\n });\n });\n };\n return CloudflareProvider2;\n }(url_json_rpc_provider_1.UrlJsonRpcProvider)\n );\n exports3.CloudflareProvider = CloudflareProvider;\n }\n });\n\n // ../../../node_modules/.pnpm/@ethersproject+providers@5.8.0_bufferutil@4.0.9_utf-8-validate@5.0.10/node_modules/@ethersproject/providers/lib/etherscan-provider.js\n var require_etherscan_provider = __commonJS({\n \"../../../node_modules/.pnpm/@ethersproject+providers@5.8.0_bufferutil@4.0.9_utf-8-validate@5.0.10/node_modules/@ethersproject/providers/lib/etherscan-provider.js\"(exports3) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n var __extends3 = exports3 && exports3.__extends || /* @__PURE__ */ function() {\n var extendStatics3 = function(d5, b4) {\n extendStatics3 = Object.setPrototypeOf || { __proto__: [] } instanceof Array && function(d6, b5) {\n d6.__proto__ = b5;\n } || function(d6, b5) {\n for (var p4 in b5)\n if (Object.prototype.hasOwnProperty.call(b5, p4))\n d6[p4] = b5[p4];\n };\n return extendStatics3(d5, b4);\n };\n return function(d5, b4) {\n if (typeof b4 !== \"function\" && b4 !== null)\n throw new TypeError(\"Class extends value \" + String(b4) + \" is not a constructor or null\");\n extendStatics3(d5, b4);\n function __() {\n this.constructor = d5;\n }\n d5.prototype = b4 === null ? Object.create(b4) : (__.prototype = b4.prototype, new __());\n };\n }();\n var __awaiter3 = exports3 && exports3.__awaiter || function(thisArg, _arguments, P2, generator) {\n function adopt(value) {\n return value instanceof P2 ? value : new P2(function(resolve) {\n resolve(value);\n });\n }\n return new (P2 || (P2 = Promise))(function(resolve, reject) {\n function fulfilled(value) {\n try {\n step(generator.next(value));\n } catch (e3) {\n reject(e3);\n }\n }\n function rejected(value) {\n try {\n step(generator[\"throw\"](value));\n } catch (e3) {\n reject(e3);\n }\n }\n function step(result) {\n result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected);\n }\n step((generator = generator.apply(thisArg, _arguments || [])).next());\n });\n };\n var __generator3 = exports3 && exports3.__generator || function(thisArg, body) {\n var _2 = { label: 0, sent: function() {\n if (t3[0] & 1)\n throw t3[1];\n return t3[1];\n }, trys: [], ops: [] }, f6, y6, t3, g4;\n return g4 = { next: verb(0), \"throw\": verb(1), \"return\": verb(2) }, typeof Symbol === \"function\" && (g4[Symbol.iterator] = function() {\n return this;\n }), g4;\n function verb(n2) {\n return function(v2) {\n return step([n2, v2]);\n };\n }\n function step(op) {\n if (f6)\n throw new TypeError(\"Generator is already executing.\");\n while (_2)\n try {\n if (f6 = 1, y6 && (t3 = op[0] & 2 ? y6[\"return\"] : op[0] ? y6[\"throw\"] || ((t3 = y6[\"return\"]) && t3.call(y6), 0) : y6.next) && !(t3 = t3.call(y6, op[1])).done)\n return t3;\n if (y6 = 0, t3)\n op = [op[0] & 2, t3.value];\n switch (op[0]) {\n case 0:\n case 1:\n t3 = op;\n break;\n case 4:\n _2.label++;\n return { value: op[1], done: false };\n case 5:\n _2.label++;\n y6 = op[1];\n op = [0];\n continue;\n case 7:\n op = _2.ops.pop();\n _2.trys.pop();\n continue;\n default:\n if (!(t3 = _2.trys, t3 = t3.length > 0 && t3[t3.length - 1]) && (op[0] === 6 || op[0] === 2)) {\n _2 = 0;\n continue;\n }\n if (op[0] === 3 && (!t3 || op[1] > t3[0] && op[1] < t3[3])) {\n _2.label = op[1];\n break;\n }\n if (op[0] === 6 && _2.label < t3[1]) {\n _2.label = t3[1];\n t3 = op;\n break;\n }\n if (t3 && _2.label < t3[2]) {\n _2.label = t3[2];\n _2.ops.push(op);\n break;\n }\n if (t3[2])\n _2.ops.pop();\n _2.trys.pop();\n continue;\n }\n op = body.call(thisArg, _2);\n } catch (e3) {\n op = [6, e3];\n y6 = 0;\n } finally {\n f6 = t3 = 0;\n }\n if (op[0] & 5)\n throw op[1];\n return { value: op[0] ? op[1] : void 0, done: true };\n }\n };\n Object.defineProperty(exports3, \"__esModule\", { value: true });\n exports3.EtherscanProvider = void 0;\n var bytes_1 = require_lib2();\n var properties_1 = require_lib4();\n var transactions_1 = require_lib17();\n var web_1 = require_lib28();\n var formatter_1 = require_formatter();\n var logger_1 = require_lib();\n var _version_1 = require_version23();\n var logger = new logger_1.Logger(_version_1.version);\n var base_provider_1 = require_base_provider();\n function getTransactionPostData(transaction) {\n var result = {};\n for (var key in transaction) {\n if (transaction[key] == null) {\n continue;\n }\n var value = transaction[key];\n if (key === \"type\" && value === 0) {\n continue;\n }\n if ({ type: true, gasLimit: true, gasPrice: true, maxFeePerGs: true, maxPriorityFeePerGas: true, nonce: true, value: true }[key]) {\n value = (0, bytes_1.hexValue)((0, bytes_1.hexlify)(value));\n } else if (key === \"accessList\") {\n value = \"[\" + (0, transactions_1.accessListify)(value).map(function(set) {\n return '{address:\"' + set.address + '\",storageKeys:[\"' + set.storageKeys.join('\",\"') + '\"]}';\n }).join(\",\") + \"]\";\n } else {\n value = (0, bytes_1.hexlify)(value);\n }\n result[key] = value;\n }\n return result;\n }\n function getResult(result) {\n if (result.status == 0 && (result.message === \"No records found\" || result.message === \"No transactions found\")) {\n return result.result;\n }\n if (result.status != 1 || typeof result.message !== \"string\" || !result.message.match(/^OK/)) {\n var error = new Error(\"invalid response\");\n error.result = JSON.stringify(result);\n if ((result.result || \"\").toLowerCase().indexOf(\"rate limit\") >= 0) {\n error.throttleRetry = true;\n }\n throw error;\n }\n return result.result;\n }\n function getJsonResult(result) {\n if (result && result.status == 0 && result.message == \"NOTOK\" && (result.result || \"\").toLowerCase().indexOf(\"rate limit\") >= 0) {\n var error = new Error(\"throttled response\");\n error.result = JSON.stringify(result);\n error.throttleRetry = true;\n throw error;\n }\n if (result.jsonrpc != \"2.0\") {\n var error = new Error(\"invalid response\");\n error.result = JSON.stringify(result);\n throw error;\n }\n if (result.error) {\n var error = new Error(result.error.message || \"unknown error\");\n if (result.error.code) {\n error.code = result.error.code;\n }\n if (result.error.data) {\n error.data = result.error.data;\n }\n throw error;\n }\n return result.result;\n }\n function checkLogTag(blockTag) {\n if (blockTag === \"pending\") {\n throw new Error(\"pending not supported\");\n }\n if (blockTag === \"latest\") {\n return blockTag;\n }\n return parseInt(blockTag.substring(2), 16);\n }\n function checkError(method, error, transaction) {\n if (method === \"call\" && error.code === logger_1.Logger.errors.SERVER_ERROR) {\n var e3 = error.error;\n if (e3 && (e3.message.match(/reverted/i) || e3.message.match(/VM execution error/i))) {\n var data = e3.data;\n if (data) {\n data = \"0x\" + data.replace(/^.*0x/i, \"\");\n }\n if ((0, bytes_1.isHexString)(data)) {\n return data;\n }\n logger.throwError(\"missing revert data in call exception\", logger_1.Logger.errors.CALL_EXCEPTION, {\n error,\n data: \"0x\"\n });\n }\n }\n var message = error.message;\n if (error.code === logger_1.Logger.errors.SERVER_ERROR) {\n if (error.error && typeof error.error.message === \"string\") {\n message = error.error.message;\n } else if (typeof error.body === \"string\") {\n message = error.body;\n } else if (typeof error.responseText === \"string\") {\n message = error.responseText;\n }\n }\n message = (message || \"\").toLowerCase();\n if (message.match(/insufficient funds/)) {\n logger.throwError(\"insufficient funds for intrinsic transaction cost\", logger_1.Logger.errors.INSUFFICIENT_FUNDS, {\n error,\n method,\n transaction\n });\n }\n if (message.match(/same hash was already imported|transaction nonce is too low|nonce too low/)) {\n logger.throwError(\"nonce has already been used\", logger_1.Logger.errors.NONCE_EXPIRED, {\n error,\n method,\n transaction\n });\n }\n if (message.match(/another transaction with same nonce/)) {\n logger.throwError(\"replacement fee too low\", logger_1.Logger.errors.REPLACEMENT_UNDERPRICED, {\n error,\n method,\n transaction\n });\n }\n if (message.match(/execution failed due to an exception|execution reverted/)) {\n logger.throwError(\"cannot estimate gas; transaction may fail or may require manual gas limit\", logger_1.Logger.errors.UNPREDICTABLE_GAS_LIMIT, {\n error,\n method,\n transaction\n });\n }\n throw error;\n }\n var EtherscanProvider = (\n /** @class */\n function(_super) {\n __extends3(EtherscanProvider2, _super);\n function EtherscanProvider2(network, apiKey) {\n var _this = _super.call(this, network) || this;\n (0, properties_1.defineReadOnly)(_this, \"baseUrl\", _this.getBaseUrl());\n (0, properties_1.defineReadOnly)(_this, \"apiKey\", apiKey || null);\n return _this;\n }\n EtherscanProvider2.prototype.getBaseUrl = function() {\n switch (this.network ? this.network.name : \"invalid\") {\n case \"homestead\":\n return \"https://api.etherscan.io\";\n case \"goerli\":\n return \"https://api-goerli.etherscan.io\";\n case \"sepolia\":\n return \"https://api-sepolia.etherscan.io\";\n case \"matic\":\n return \"https://api.polygonscan.com\";\n case \"maticmum\":\n return \"https://api-testnet.polygonscan.com\";\n case \"arbitrum\":\n return \"https://api.arbiscan.io\";\n case \"arbitrum-goerli\":\n return \"https://api-goerli.arbiscan.io\";\n case \"optimism\":\n return \"https://api-optimistic.etherscan.io\";\n case \"optimism-goerli\":\n return \"https://api-goerli-optimistic.etherscan.io\";\n default:\n }\n return logger.throwArgumentError(\"unsupported network\", \"network\", this.network.name);\n };\n EtherscanProvider2.prototype.getUrl = function(module2, params) {\n var query = Object.keys(params).reduce(function(accum, key) {\n var value = params[key];\n if (value != null) {\n accum += \"&\" + key + \"=\" + value;\n }\n return accum;\n }, \"\");\n var apiKey = this.apiKey ? \"&apikey=\" + this.apiKey : \"\";\n return this.baseUrl + \"/api?module=\" + module2 + query + apiKey;\n };\n EtherscanProvider2.prototype.getPostUrl = function() {\n return this.baseUrl + \"/api\";\n };\n EtherscanProvider2.prototype.getPostData = function(module2, params) {\n params.module = module2;\n params.apikey = this.apiKey;\n return params;\n };\n EtherscanProvider2.prototype.fetch = function(module2, params, post) {\n return __awaiter3(this, void 0, void 0, function() {\n var url, payload, procFunc, connection, payloadStr, result;\n var _this = this;\n return __generator3(this, function(_a) {\n switch (_a.label) {\n case 0:\n url = post ? this.getPostUrl() : this.getUrl(module2, params);\n payload = post ? this.getPostData(module2, params) : null;\n procFunc = module2 === \"proxy\" ? getJsonResult : getResult;\n this.emit(\"debug\", {\n action: \"request\",\n request: url,\n provider: this\n });\n connection = {\n url,\n throttleSlotInterval: 1e3,\n throttleCallback: function(attempt, url2) {\n if (_this.isCommunityResource()) {\n (0, formatter_1.showThrottleMessage)();\n }\n return Promise.resolve(true);\n }\n };\n payloadStr = null;\n if (payload) {\n connection.headers = { \"content-type\": \"application/x-www-form-urlencoded; charset=UTF-8\" };\n payloadStr = Object.keys(payload).map(function(key) {\n return key + \"=\" + payload[key];\n }).join(\"&\");\n }\n return [4, (0, web_1.fetchJson)(connection, payloadStr, procFunc || getJsonResult)];\n case 1:\n result = _a.sent();\n this.emit(\"debug\", {\n action: \"response\",\n request: url,\n response: (0, properties_1.deepCopy)(result),\n provider: this\n });\n return [2, result];\n }\n });\n });\n };\n EtherscanProvider2.prototype.detectNetwork = function() {\n return __awaiter3(this, void 0, void 0, function() {\n return __generator3(this, function(_a) {\n return [2, this.network];\n });\n });\n };\n EtherscanProvider2.prototype.perform = function(method, params) {\n return __awaiter3(this, void 0, void 0, function() {\n var _a, postData, error_1, postData, error_2, args, topic0, logs, blocks, i3, log, block, _b;\n return __generator3(this, function(_c) {\n switch (_c.label) {\n case 0:\n _a = method;\n switch (_a) {\n case \"getBlockNumber\":\n return [3, 1];\n case \"getGasPrice\":\n return [3, 2];\n case \"getBalance\":\n return [3, 3];\n case \"getTransactionCount\":\n return [3, 4];\n case \"getCode\":\n return [3, 5];\n case \"getStorageAt\":\n return [3, 6];\n case \"sendTransaction\":\n return [3, 7];\n case \"getBlock\":\n return [3, 8];\n case \"getTransaction\":\n return [3, 9];\n case \"getTransactionReceipt\":\n return [3, 10];\n case \"call\":\n return [3, 11];\n case \"estimateGas\":\n return [3, 15];\n case \"getLogs\":\n return [3, 19];\n case \"getEtherPrice\":\n return [3, 26];\n }\n return [3, 28];\n case 1:\n return [2, this.fetch(\"proxy\", { action: \"eth_blockNumber\" })];\n case 2:\n return [2, this.fetch(\"proxy\", { action: \"eth_gasPrice\" })];\n case 3:\n return [2, this.fetch(\"account\", {\n action: \"balance\",\n address: params.address,\n tag: params.blockTag\n })];\n case 4:\n return [2, this.fetch(\"proxy\", {\n action: \"eth_getTransactionCount\",\n address: params.address,\n tag: params.blockTag\n })];\n case 5:\n return [2, this.fetch(\"proxy\", {\n action: \"eth_getCode\",\n address: params.address,\n tag: params.blockTag\n })];\n case 6:\n return [2, this.fetch(\"proxy\", {\n action: \"eth_getStorageAt\",\n address: params.address,\n position: params.position,\n tag: params.blockTag\n })];\n case 7:\n return [2, this.fetch(\"proxy\", {\n action: \"eth_sendRawTransaction\",\n hex: params.signedTransaction\n }, true).catch(function(error) {\n return checkError(\"sendTransaction\", error, params.signedTransaction);\n })];\n case 8:\n if (params.blockTag) {\n return [2, this.fetch(\"proxy\", {\n action: \"eth_getBlockByNumber\",\n tag: params.blockTag,\n boolean: params.includeTransactions ? \"true\" : \"false\"\n })];\n }\n throw new Error(\"getBlock by blockHash not implemented\");\n case 9:\n return [2, this.fetch(\"proxy\", {\n action: \"eth_getTransactionByHash\",\n txhash: params.transactionHash\n })];\n case 10:\n return [2, this.fetch(\"proxy\", {\n action: \"eth_getTransactionReceipt\",\n txhash: params.transactionHash\n })];\n case 11:\n if (params.blockTag !== \"latest\") {\n throw new Error(\"EtherscanProvider does not support blockTag for call\");\n }\n postData = getTransactionPostData(params.transaction);\n postData.module = \"proxy\";\n postData.action = \"eth_call\";\n _c.label = 12;\n case 12:\n _c.trys.push([12, 14, , 15]);\n return [4, this.fetch(\"proxy\", postData, true)];\n case 13:\n return [2, _c.sent()];\n case 14:\n error_1 = _c.sent();\n return [2, checkError(\"call\", error_1, params.transaction)];\n case 15:\n postData = getTransactionPostData(params.transaction);\n postData.module = \"proxy\";\n postData.action = \"eth_estimateGas\";\n _c.label = 16;\n case 16:\n _c.trys.push([16, 18, , 19]);\n return [4, this.fetch(\"proxy\", postData, true)];\n case 17:\n return [2, _c.sent()];\n case 18:\n error_2 = _c.sent();\n return [2, checkError(\"estimateGas\", error_2, params.transaction)];\n case 19:\n args = { action: \"getLogs\" };\n if (params.filter.fromBlock) {\n args.fromBlock = checkLogTag(params.filter.fromBlock);\n }\n if (params.filter.toBlock) {\n args.toBlock = checkLogTag(params.filter.toBlock);\n }\n if (params.filter.address) {\n args.address = params.filter.address;\n }\n if (params.filter.topics && params.filter.topics.length > 0) {\n if (params.filter.topics.length > 1) {\n logger.throwError(\"unsupported topic count\", logger_1.Logger.errors.UNSUPPORTED_OPERATION, { topics: params.filter.topics });\n }\n if (params.filter.topics.length === 1) {\n topic0 = params.filter.topics[0];\n if (typeof topic0 !== \"string\" || topic0.length !== 66) {\n logger.throwError(\"unsupported topic format\", logger_1.Logger.errors.UNSUPPORTED_OPERATION, { topic0 });\n }\n args.topic0 = topic0;\n }\n }\n return [4, this.fetch(\"logs\", args)];\n case 20:\n logs = _c.sent();\n blocks = {};\n i3 = 0;\n _c.label = 21;\n case 21:\n if (!(i3 < logs.length))\n return [3, 25];\n log = logs[i3];\n if (log.blockHash != null) {\n return [3, 24];\n }\n if (!(blocks[log.blockNumber] == null))\n return [3, 23];\n return [4, this.getBlock(log.blockNumber)];\n case 22:\n block = _c.sent();\n if (block) {\n blocks[log.blockNumber] = block.hash;\n }\n _c.label = 23;\n case 23:\n log.blockHash = blocks[log.blockNumber];\n _c.label = 24;\n case 24:\n i3++;\n return [3, 21];\n case 25:\n return [2, logs];\n case 26:\n if (this.network.name !== \"homestead\") {\n return [2, 0];\n }\n _b = parseFloat;\n return [4, this.fetch(\"stats\", { action: \"ethprice\" })];\n case 27:\n return [2, _b.apply(void 0, [_c.sent().ethusd])];\n case 28:\n return [3, 29];\n case 29:\n return [2, _super.prototype.perform.call(this, method, params)];\n }\n });\n });\n };\n EtherscanProvider2.prototype.getHistory = function(addressOrName, startBlock, endBlock) {\n return __awaiter3(this, void 0, void 0, function() {\n var params, result;\n var _a;\n var _this = this;\n return __generator3(this, function(_b) {\n switch (_b.label) {\n case 0:\n _a = {\n action: \"txlist\"\n };\n return [4, this.resolveName(addressOrName)];\n case 1:\n params = (_a.address = _b.sent(), _a.startblock = startBlock == null ? 0 : startBlock, _a.endblock = endBlock == null ? 99999999 : endBlock, _a.sort = \"asc\", _a);\n return [4, this.fetch(\"account\", params)];\n case 2:\n result = _b.sent();\n return [2, result.map(function(tx) {\n [\"contractAddress\", \"to\"].forEach(function(key) {\n if (tx[key] == \"\") {\n delete tx[key];\n }\n });\n if (tx.creates == null && tx.contractAddress != null) {\n tx.creates = tx.contractAddress;\n }\n var item = _this.formatter.transactionResponse(tx);\n if (tx.timeStamp) {\n item.timestamp = parseInt(tx.timeStamp);\n }\n return item;\n })];\n }\n });\n });\n };\n EtherscanProvider2.prototype.isCommunityResource = function() {\n return this.apiKey == null;\n };\n return EtherscanProvider2;\n }(base_provider_1.BaseProvider)\n );\n exports3.EtherscanProvider = EtherscanProvider;\n }\n });\n\n // ../../../node_modules/.pnpm/@ethersproject+providers@5.8.0_bufferutil@4.0.9_utf-8-validate@5.0.10/node_modules/@ethersproject/providers/lib/fallback-provider.js\n var require_fallback_provider = __commonJS({\n \"../../../node_modules/.pnpm/@ethersproject+providers@5.8.0_bufferutil@4.0.9_utf-8-validate@5.0.10/node_modules/@ethersproject/providers/lib/fallback-provider.js\"(exports3) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n var __extends3 = exports3 && exports3.__extends || /* @__PURE__ */ function() {\n var extendStatics3 = function(d5, b4) {\n extendStatics3 = Object.setPrototypeOf || { __proto__: [] } instanceof Array && function(d6, b5) {\n d6.__proto__ = b5;\n } || function(d6, b5) {\n for (var p4 in b5)\n if (Object.prototype.hasOwnProperty.call(b5, p4))\n d6[p4] = b5[p4];\n };\n return extendStatics3(d5, b4);\n };\n return function(d5, b4) {\n if (typeof b4 !== \"function\" && b4 !== null)\n throw new TypeError(\"Class extends value \" + String(b4) + \" is not a constructor or null\");\n extendStatics3(d5, b4);\n function __() {\n this.constructor = d5;\n }\n d5.prototype = b4 === null ? Object.create(b4) : (__.prototype = b4.prototype, new __());\n };\n }();\n var __awaiter3 = exports3 && exports3.__awaiter || function(thisArg, _arguments, P2, generator) {\n function adopt(value) {\n return value instanceof P2 ? value : new P2(function(resolve) {\n resolve(value);\n });\n }\n return new (P2 || (P2 = Promise))(function(resolve, reject) {\n function fulfilled(value) {\n try {\n step(generator.next(value));\n } catch (e3) {\n reject(e3);\n }\n }\n function rejected(value) {\n try {\n step(generator[\"throw\"](value));\n } catch (e3) {\n reject(e3);\n }\n }\n function step(result) {\n result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected);\n }\n step((generator = generator.apply(thisArg, _arguments || [])).next());\n });\n };\n var __generator3 = exports3 && exports3.__generator || function(thisArg, body) {\n var _2 = { label: 0, sent: function() {\n if (t3[0] & 1)\n throw t3[1];\n return t3[1];\n }, trys: [], ops: [] }, f6, y6, t3, g4;\n return g4 = { next: verb(0), \"throw\": verb(1), \"return\": verb(2) }, typeof Symbol === \"function\" && (g4[Symbol.iterator] = function() {\n return this;\n }), g4;\n function verb(n2) {\n return function(v2) {\n return step([n2, v2]);\n };\n }\n function step(op) {\n if (f6)\n throw new TypeError(\"Generator is already executing.\");\n while (_2)\n try {\n if (f6 = 1, y6 && (t3 = op[0] & 2 ? y6[\"return\"] : op[0] ? y6[\"throw\"] || ((t3 = y6[\"return\"]) && t3.call(y6), 0) : y6.next) && !(t3 = t3.call(y6, op[1])).done)\n return t3;\n if (y6 = 0, t3)\n op = [op[0] & 2, t3.value];\n switch (op[0]) {\n case 0:\n case 1:\n t3 = op;\n break;\n case 4:\n _2.label++;\n return { value: op[1], done: false };\n case 5:\n _2.label++;\n y6 = op[1];\n op = [0];\n continue;\n case 7:\n op = _2.ops.pop();\n _2.trys.pop();\n continue;\n default:\n if (!(t3 = _2.trys, t3 = t3.length > 0 && t3[t3.length - 1]) && (op[0] === 6 || op[0] === 2)) {\n _2 = 0;\n continue;\n }\n if (op[0] === 3 && (!t3 || op[1] > t3[0] && op[1] < t3[3])) {\n _2.label = op[1];\n break;\n }\n if (op[0] === 6 && _2.label < t3[1]) {\n _2.label = t3[1];\n t3 = op;\n break;\n }\n if (t3 && _2.label < t3[2]) {\n _2.label = t3[2];\n _2.ops.push(op);\n break;\n }\n if (t3[2])\n _2.ops.pop();\n _2.trys.pop();\n continue;\n }\n op = body.call(thisArg, _2);\n } catch (e3) {\n op = [6, e3];\n y6 = 0;\n } finally {\n f6 = t3 = 0;\n }\n if (op[0] & 5)\n throw op[1];\n return { value: op[0] ? op[1] : void 0, done: true };\n }\n };\n Object.defineProperty(exports3, \"__esModule\", { value: true });\n exports3.FallbackProvider = void 0;\n var abstract_provider_1 = require_lib14();\n var bignumber_1 = require_lib3();\n var bytes_1 = require_lib2();\n var properties_1 = require_lib4();\n var random_1 = require_lib24();\n var web_1 = require_lib28();\n var base_provider_1 = require_base_provider();\n var formatter_1 = require_formatter();\n var logger_1 = require_lib();\n var _version_1 = require_version23();\n var logger = new logger_1.Logger(_version_1.version);\n function now() {\n return (/* @__PURE__ */ new Date()).getTime();\n }\n function checkNetworks(networks) {\n var result = null;\n for (var i3 = 0; i3 < networks.length; i3++) {\n var network = networks[i3];\n if (network == null) {\n return null;\n }\n if (result) {\n if (!(result.name === network.name && result.chainId === network.chainId && (result.ensAddress === network.ensAddress || result.ensAddress == null && network.ensAddress == null))) {\n logger.throwArgumentError(\"provider mismatch\", \"networks\", networks);\n }\n } else {\n result = network;\n }\n }\n return result;\n }\n function median(values, maxDelta) {\n values = values.slice().sort();\n var middle = Math.floor(values.length / 2);\n if (values.length % 2) {\n return values[middle];\n }\n var a3 = values[middle - 1], b4 = values[middle];\n if (maxDelta != null && Math.abs(a3 - b4) > maxDelta) {\n return null;\n }\n return (a3 + b4) / 2;\n }\n function serialize(value) {\n if (value === null) {\n return \"null\";\n } else if (typeof value === \"number\" || typeof value === \"boolean\") {\n return JSON.stringify(value);\n } else if (typeof value === \"string\") {\n return value;\n } else if (bignumber_1.BigNumber.isBigNumber(value)) {\n return value.toString();\n } else if (Array.isArray(value)) {\n return JSON.stringify(value.map(function(i3) {\n return serialize(i3);\n }));\n } else if (typeof value === \"object\") {\n var keys = Object.keys(value);\n keys.sort();\n return \"{\" + keys.map(function(key) {\n var v2 = value[key];\n if (typeof v2 === \"function\") {\n v2 = \"[function]\";\n } else {\n v2 = serialize(v2);\n }\n return JSON.stringify(key) + \":\" + v2;\n }).join(\",\") + \"}\";\n }\n throw new Error(\"unknown value type: \" + typeof value);\n }\n var nextRid = 1;\n function stall(duration) {\n var cancel2 = null;\n var timer = null;\n var promise = new Promise(function(resolve) {\n cancel2 = function() {\n if (timer) {\n clearTimeout(timer);\n timer = null;\n }\n resolve();\n };\n timer = setTimeout(cancel2, duration);\n });\n var wait2 = function(func) {\n promise = promise.then(func);\n return promise;\n };\n function getPromise() {\n return promise;\n }\n return { cancel: cancel2, getPromise, wait: wait2 };\n }\n var ForwardErrors = [\n logger_1.Logger.errors.CALL_EXCEPTION,\n logger_1.Logger.errors.INSUFFICIENT_FUNDS,\n logger_1.Logger.errors.NONCE_EXPIRED,\n logger_1.Logger.errors.REPLACEMENT_UNDERPRICED,\n logger_1.Logger.errors.UNPREDICTABLE_GAS_LIMIT\n ];\n var ForwardProperties = [\n \"address\",\n \"args\",\n \"errorArgs\",\n \"errorSignature\",\n \"method\",\n \"transaction\"\n ];\n function exposeDebugConfig(config2, now2) {\n var result = {\n weight: config2.weight\n };\n Object.defineProperty(result, \"provider\", { get: function() {\n return config2.provider;\n } });\n if (config2.start) {\n result.start = config2.start;\n }\n if (now2) {\n result.duration = now2 - config2.start;\n }\n if (config2.done) {\n if (config2.error) {\n result.error = config2.error;\n } else {\n result.result = config2.result || null;\n }\n }\n return result;\n }\n function normalizedTally(normalize2, quorum) {\n return function(configs) {\n var tally = {};\n configs.forEach(function(c4) {\n var value = normalize2(c4.result);\n if (!tally[value]) {\n tally[value] = { count: 0, result: c4.result };\n }\n tally[value].count++;\n });\n var keys = Object.keys(tally);\n for (var i3 = 0; i3 < keys.length; i3++) {\n var check = tally[keys[i3]];\n if (check.count >= quorum) {\n return check.result;\n }\n }\n return void 0;\n };\n }\n function getProcessFunc(provider, method, params) {\n var normalize2 = serialize;\n switch (method) {\n case \"getBlockNumber\":\n return function(configs) {\n var values = configs.map(function(c4) {\n return c4.result;\n });\n var blockNumber = median(configs.map(function(c4) {\n return c4.result;\n }), 2);\n if (blockNumber == null) {\n return void 0;\n }\n blockNumber = Math.ceil(blockNumber);\n if (values.indexOf(blockNumber + 1) >= 0) {\n blockNumber++;\n }\n if (blockNumber >= provider._highestBlockNumber) {\n provider._highestBlockNumber = blockNumber;\n }\n return provider._highestBlockNumber;\n };\n case \"getGasPrice\":\n return function(configs) {\n var values = configs.map(function(c4) {\n return c4.result;\n });\n values.sort();\n return values[Math.floor(values.length / 2)];\n };\n case \"getEtherPrice\":\n return function(configs) {\n return median(configs.map(function(c4) {\n return c4.result;\n }));\n };\n case \"getBalance\":\n case \"getTransactionCount\":\n case \"getCode\":\n case \"getStorageAt\":\n case \"call\":\n case \"estimateGas\":\n case \"getLogs\":\n break;\n case \"getTransaction\":\n case \"getTransactionReceipt\":\n normalize2 = function(tx) {\n if (tx == null) {\n return null;\n }\n tx = (0, properties_1.shallowCopy)(tx);\n tx.confirmations = -1;\n return serialize(tx);\n };\n break;\n case \"getBlock\":\n if (params.includeTransactions) {\n normalize2 = function(block) {\n if (block == null) {\n return null;\n }\n block = (0, properties_1.shallowCopy)(block);\n block.transactions = block.transactions.map(function(tx) {\n tx = (0, properties_1.shallowCopy)(tx);\n tx.confirmations = -1;\n return tx;\n });\n return serialize(block);\n };\n } else {\n normalize2 = function(block) {\n if (block == null) {\n return null;\n }\n return serialize(block);\n };\n }\n break;\n default:\n throw new Error(\"unknown method: \" + method);\n }\n return normalizedTally(normalize2, provider.quorum);\n }\n function waitForSync(config2, blockNumber) {\n return __awaiter3(this, void 0, void 0, function() {\n var provider;\n return __generator3(this, function(_a) {\n provider = config2.provider;\n if (provider.blockNumber != null && provider.blockNumber >= blockNumber || blockNumber === -1) {\n return [2, provider];\n }\n return [2, (0, web_1.poll)(function() {\n return new Promise(function(resolve, reject) {\n setTimeout(function() {\n if (provider.blockNumber >= blockNumber) {\n return resolve(provider);\n }\n if (config2.cancelled) {\n return resolve(null);\n }\n return resolve(void 0);\n }, 0);\n });\n }, { oncePoll: provider })];\n });\n });\n }\n function getRunner(config2, currentBlockNumber, method, params) {\n return __awaiter3(this, void 0, void 0, function() {\n var provider, _a, filter;\n return __generator3(this, function(_b) {\n switch (_b.label) {\n case 0:\n provider = config2.provider;\n _a = method;\n switch (_a) {\n case \"getBlockNumber\":\n return [3, 1];\n case \"getGasPrice\":\n return [3, 1];\n case \"getEtherPrice\":\n return [3, 2];\n case \"getBalance\":\n return [3, 3];\n case \"getTransactionCount\":\n return [3, 3];\n case \"getCode\":\n return [3, 3];\n case \"getStorageAt\":\n return [3, 6];\n case \"getBlock\":\n return [3, 9];\n case \"call\":\n return [3, 12];\n case \"estimateGas\":\n return [3, 12];\n case \"getTransaction\":\n return [3, 15];\n case \"getTransactionReceipt\":\n return [3, 15];\n case \"getLogs\":\n return [3, 16];\n }\n return [3, 19];\n case 1:\n return [2, provider[method]()];\n case 2:\n if (provider.getEtherPrice) {\n return [2, provider.getEtherPrice()];\n }\n return [3, 19];\n case 3:\n if (!(params.blockTag && (0, bytes_1.isHexString)(params.blockTag)))\n return [3, 5];\n return [4, waitForSync(config2, currentBlockNumber)];\n case 4:\n provider = _b.sent();\n _b.label = 5;\n case 5:\n return [2, provider[method](params.address, params.blockTag || \"latest\")];\n case 6:\n if (!(params.blockTag && (0, bytes_1.isHexString)(params.blockTag)))\n return [3, 8];\n return [4, waitForSync(config2, currentBlockNumber)];\n case 7:\n provider = _b.sent();\n _b.label = 8;\n case 8:\n return [2, provider.getStorageAt(params.address, params.position, params.blockTag || \"latest\")];\n case 9:\n if (!(params.blockTag && (0, bytes_1.isHexString)(params.blockTag)))\n return [3, 11];\n return [4, waitForSync(config2, currentBlockNumber)];\n case 10:\n provider = _b.sent();\n _b.label = 11;\n case 11:\n return [2, provider[params.includeTransactions ? \"getBlockWithTransactions\" : \"getBlock\"](params.blockTag || params.blockHash)];\n case 12:\n if (!(params.blockTag && (0, bytes_1.isHexString)(params.blockTag)))\n return [3, 14];\n return [4, waitForSync(config2, currentBlockNumber)];\n case 13:\n provider = _b.sent();\n _b.label = 14;\n case 14:\n if (method === \"call\" && params.blockTag) {\n return [2, provider[method](params.transaction, params.blockTag)];\n }\n return [2, provider[method](params.transaction)];\n case 15:\n return [2, provider[method](params.transactionHash)];\n case 16:\n filter = params.filter;\n if (!(filter.fromBlock && (0, bytes_1.isHexString)(filter.fromBlock) || filter.toBlock && (0, bytes_1.isHexString)(filter.toBlock)))\n return [3, 18];\n return [4, waitForSync(config2, currentBlockNumber)];\n case 17:\n provider = _b.sent();\n _b.label = 18;\n case 18:\n return [2, provider.getLogs(filter)];\n case 19:\n return [2, logger.throwError(\"unknown method error\", logger_1.Logger.errors.UNKNOWN_ERROR, {\n method,\n params\n })];\n }\n });\n });\n }\n var FallbackProvider = (\n /** @class */\n function(_super) {\n __extends3(FallbackProvider2, _super);\n function FallbackProvider2(providers, quorum) {\n var _this = this;\n if (providers.length === 0) {\n logger.throwArgumentError(\"missing providers\", \"providers\", providers);\n }\n var providerConfigs = providers.map(function(configOrProvider, index2) {\n if (abstract_provider_1.Provider.isProvider(configOrProvider)) {\n var stallTimeout = (0, formatter_1.isCommunityResource)(configOrProvider) ? 2e3 : 750;\n var priority = 1;\n return Object.freeze({ provider: configOrProvider, weight: 1, stallTimeout, priority });\n }\n var config2 = (0, properties_1.shallowCopy)(configOrProvider);\n if (config2.priority == null) {\n config2.priority = 1;\n }\n if (config2.stallTimeout == null) {\n config2.stallTimeout = (0, formatter_1.isCommunityResource)(configOrProvider) ? 2e3 : 750;\n }\n if (config2.weight == null) {\n config2.weight = 1;\n }\n var weight = config2.weight;\n if (weight % 1 || weight > 512 || weight < 1) {\n logger.throwArgumentError(\"invalid weight; must be integer in [1, 512]\", \"providers[\" + index2 + \"].weight\", weight);\n }\n return Object.freeze(config2);\n });\n var total = providerConfigs.reduce(function(accum, c4) {\n return accum + c4.weight;\n }, 0);\n if (quorum == null) {\n quorum = total / 2;\n } else if (quorum > total) {\n logger.throwArgumentError(\"quorum will always fail; larger than total weight\", \"quorum\", quorum);\n }\n var networkOrReady = checkNetworks(providerConfigs.map(function(c4) {\n return c4.provider.network;\n }));\n if (networkOrReady == null) {\n networkOrReady = new Promise(function(resolve, reject) {\n setTimeout(function() {\n _this.detectNetwork().then(resolve, reject);\n }, 0);\n });\n }\n _this = _super.call(this, networkOrReady) || this;\n (0, properties_1.defineReadOnly)(_this, \"providerConfigs\", Object.freeze(providerConfigs));\n (0, properties_1.defineReadOnly)(_this, \"quorum\", quorum);\n _this._highestBlockNumber = -1;\n return _this;\n }\n FallbackProvider2.prototype.detectNetwork = function() {\n return __awaiter3(this, void 0, void 0, function() {\n var networks;\n return __generator3(this, function(_a) {\n switch (_a.label) {\n case 0:\n return [4, Promise.all(this.providerConfigs.map(function(c4) {\n return c4.provider.getNetwork();\n }))];\n case 1:\n networks = _a.sent();\n return [2, checkNetworks(networks)];\n }\n });\n });\n };\n FallbackProvider2.prototype.perform = function(method, params) {\n return __awaiter3(this, void 0, void 0, function() {\n var results, i_1, result, processFunc, configs, currentBlockNumber, i3, first, _loop_1, this_1, state_1;\n var _this = this;\n return __generator3(this, function(_a) {\n switch (_a.label) {\n case 0:\n if (!(method === \"sendTransaction\"))\n return [3, 2];\n return [4, Promise.all(this.providerConfigs.map(function(c4) {\n return c4.provider.sendTransaction(params.signedTransaction).then(function(result2) {\n return result2.hash;\n }, function(error) {\n return error;\n });\n }))];\n case 1:\n results = _a.sent();\n for (i_1 = 0; i_1 < results.length; i_1++) {\n result = results[i_1];\n if (typeof result === \"string\") {\n return [2, result];\n }\n }\n throw results[0];\n case 2:\n if (!(this._highestBlockNumber === -1 && method !== \"getBlockNumber\"))\n return [3, 4];\n return [4, this.getBlockNumber()];\n case 3:\n _a.sent();\n _a.label = 4;\n case 4:\n processFunc = getProcessFunc(this, method, params);\n configs = (0, random_1.shuffled)(this.providerConfigs.map(properties_1.shallowCopy));\n configs.sort(function(a3, b4) {\n return a3.priority - b4.priority;\n });\n currentBlockNumber = this._highestBlockNumber;\n i3 = 0;\n first = true;\n _loop_1 = function() {\n var t0, inflightWeight, _loop_2, waiting, results2, result2, errors;\n return __generator3(this, function(_b) {\n switch (_b.label) {\n case 0:\n t0 = now();\n inflightWeight = configs.filter(function(c4) {\n return c4.runner && t0 - c4.start < c4.stallTimeout;\n }).reduce(function(accum, c4) {\n return accum + c4.weight;\n }, 0);\n _loop_2 = function() {\n var config2 = configs[i3++];\n var rid = nextRid++;\n config2.start = now();\n config2.staller = stall(config2.stallTimeout);\n config2.staller.wait(function() {\n config2.staller = null;\n });\n config2.runner = getRunner(config2, currentBlockNumber, method, params).then(function(result3) {\n config2.done = true;\n config2.result = result3;\n if (_this.listenerCount(\"debug\")) {\n _this.emit(\"debug\", {\n action: \"request\",\n rid,\n backend: exposeDebugConfig(config2, now()),\n request: { method, params: (0, properties_1.deepCopy)(params) },\n provider: _this\n });\n }\n }, function(error) {\n config2.done = true;\n config2.error = error;\n if (_this.listenerCount(\"debug\")) {\n _this.emit(\"debug\", {\n action: \"request\",\n rid,\n backend: exposeDebugConfig(config2, now()),\n request: { method, params: (0, properties_1.deepCopy)(params) },\n provider: _this\n });\n }\n });\n if (this_1.listenerCount(\"debug\")) {\n this_1.emit(\"debug\", {\n action: \"request\",\n rid,\n backend: exposeDebugConfig(config2, null),\n request: { method, params: (0, properties_1.deepCopy)(params) },\n provider: this_1\n });\n }\n inflightWeight += config2.weight;\n };\n while (inflightWeight < this_1.quorum && i3 < configs.length) {\n _loop_2();\n }\n waiting = [];\n configs.forEach(function(c4) {\n if (c4.done || !c4.runner) {\n return;\n }\n waiting.push(c4.runner);\n if (c4.staller) {\n waiting.push(c4.staller.getPromise());\n }\n });\n if (!waiting.length)\n return [3, 2];\n return [4, Promise.race(waiting)];\n case 1:\n _b.sent();\n _b.label = 2;\n case 2:\n results2 = configs.filter(function(c4) {\n return c4.done && c4.error == null;\n });\n if (!(results2.length >= this_1.quorum))\n return [3, 5];\n result2 = processFunc(results2);\n if (result2 !== void 0) {\n configs.forEach(function(c4) {\n if (c4.staller) {\n c4.staller.cancel();\n }\n c4.cancelled = true;\n });\n return [2, { value: result2 }];\n }\n if (!!first)\n return [3, 4];\n return [4, stall(100).getPromise()];\n case 3:\n _b.sent();\n _b.label = 4;\n case 4:\n first = false;\n _b.label = 5;\n case 5:\n errors = configs.reduce(function(accum, c4) {\n if (!c4.done || c4.error == null) {\n return accum;\n }\n var code = c4.error.code;\n if (ForwardErrors.indexOf(code) >= 0) {\n if (!accum[code]) {\n accum[code] = { error: c4.error, weight: 0 };\n }\n accum[code].weight += c4.weight;\n }\n return accum;\n }, {});\n Object.keys(errors).forEach(function(errorCode) {\n var tally = errors[errorCode];\n if (tally.weight < _this.quorum) {\n return;\n }\n configs.forEach(function(c4) {\n if (c4.staller) {\n c4.staller.cancel();\n }\n c4.cancelled = true;\n });\n var e3 = tally.error;\n var props = {};\n ForwardProperties.forEach(function(name) {\n if (e3[name] == null) {\n return;\n }\n props[name] = e3[name];\n });\n logger.throwError(e3.reason || e3.message, errorCode, props);\n });\n if (configs.filter(function(c4) {\n return !c4.done;\n }).length === 0) {\n return [2, \"break\"];\n }\n return [\n 2\n /*return*/\n ];\n }\n });\n };\n this_1 = this;\n _a.label = 5;\n case 5:\n if (false)\n return [3, 7];\n return [5, _loop_1()];\n case 6:\n state_1 = _a.sent();\n if (typeof state_1 === \"object\")\n return [2, state_1.value];\n if (state_1 === \"break\")\n return [3, 7];\n return [3, 5];\n case 7:\n configs.forEach(function(c4) {\n if (c4.staller) {\n c4.staller.cancel();\n }\n c4.cancelled = true;\n });\n return [2, logger.throwError(\"failed to meet quorum\", logger_1.Logger.errors.SERVER_ERROR, {\n method,\n params,\n //results: configs.map((c) => c.result),\n //errors: configs.map((c) => c.error),\n results: configs.map(function(c4) {\n return exposeDebugConfig(c4);\n }),\n provider: this\n })];\n }\n });\n });\n };\n return FallbackProvider2;\n }(base_provider_1.BaseProvider)\n );\n exports3.FallbackProvider = FallbackProvider;\n }\n });\n\n // ../../../node_modules/.pnpm/@ethersproject+providers@5.8.0_bufferutil@4.0.9_utf-8-validate@5.0.10/node_modules/@ethersproject/providers/lib/browser-ipc-provider.js\n var require_browser_ipc_provider = __commonJS({\n \"../../../node_modules/.pnpm/@ethersproject+providers@5.8.0_bufferutil@4.0.9_utf-8-validate@5.0.10/node_modules/@ethersproject/providers/lib/browser-ipc-provider.js\"(exports3) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n Object.defineProperty(exports3, \"__esModule\", { value: true });\n exports3.IpcProvider = void 0;\n var IpcProvider = null;\n exports3.IpcProvider = IpcProvider;\n }\n });\n\n // ../../../node_modules/.pnpm/@ethersproject+providers@5.8.0_bufferutil@4.0.9_utf-8-validate@5.0.10/node_modules/@ethersproject/providers/lib/infura-provider.js\n var require_infura_provider = __commonJS({\n \"../../../node_modules/.pnpm/@ethersproject+providers@5.8.0_bufferutil@4.0.9_utf-8-validate@5.0.10/node_modules/@ethersproject/providers/lib/infura-provider.js\"(exports3) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n var __extends3 = exports3 && exports3.__extends || /* @__PURE__ */ function() {\n var extendStatics3 = function(d5, b4) {\n extendStatics3 = Object.setPrototypeOf || { __proto__: [] } instanceof Array && function(d6, b5) {\n d6.__proto__ = b5;\n } || function(d6, b5) {\n for (var p4 in b5)\n if (Object.prototype.hasOwnProperty.call(b5, p4))\n d6[p4] = b5[p4];\n };\n return extendStatics3(d5, b4);\n };\n return function(d5, b4) {\n if (typeof b4 !== \"function\" && b4 !== null)\n throw new TypeError(\"Class extends value \" + String(b4) + \" is not a constructor or null\");\n extendStatics3(d5, b4);\n function __() {\n this.constructor = d5;\n }\n d5.prototype = b4 === null ? Object.create(b4) : (__.prototype = b4.prototype, new __());\n };\n }();\n Object.defineProperty(exports3, \"__esModule\", { value: true });\n exports3.InfuraProvider = exports3.InfuraWebSocketProvider = void 0;\n var properties_1 = require_lib4();\n var websocket_provider_1 = require_websocket_provider();\n var formatter_1 = require_formatter();\n var logger_1 = require_lib();\n var _version_1 = require_version23();\n var logger = new logger_1.Logger(_version_1.version);\n var url_json_rpc_provider_1 = require_url_json_rpc_provider();\n var defaultProjectId = \"84842078b09946638c03157f83405213\";\n var InfuraWebSocketProvider = (\n /** @class */\n function(_super) {\n __extends3(InfuraWebSocketProvider2, _super);\n function InfuraWebSocketProvider2(network, apiKey) {\n var _this = this;\n var provider = new InfuraProvider(network, apiKey);\n var connection = provider.connection;\n if (connection.password) {\n logger.throwError(\"INFURA WebSocket project secrets unsupported\", logger_1.Logger.errors.UNSUPPORTED_OPERATION, {\n operation: \"InfuraProvider.getWebSocketProvider()\"\n });\n }\n var url = connection.url.replace(/^http/i, \"ws\").replace(\"/v3/\", \"/ws/v3/\");\n _this = _super.call(this, url, network) || this;\n (0, properties_1.defineReadOnly)(_this, \"apiKey\", provider.projectId);\n (0, properties_1.defineReadOnly)(_this, \"projectId\", provider.projectId);\n (0, properties_1.defineReadOnly)(_this, \"projectSecret\", provider.projectSecret);\n return _this;\n }\n InfuraWebSocketProvider2.prototype.isCommunityResource = function() {\n return this.projectId === defaultProjectId;\n };\n return InfuraWebSocketProvider2;\n }(websocket_provider_1.WebSocketProvider)\n );\n exports3.InfuraWebSocketProvider = InfuraWebSocketProvider;\n var InfuraProvider = (\n /** @class */\n function(_super) {\n __extends3(InfuraProvider2, _super);\n function InfuraProvider2() {\n return _super !== null && _super.apply(this, arguments) || this;\n }\n InfuraProvider2.getWebSocketProvider = function(network, apiKey) {\n return new InfuraWebSocketProvider(network, apiKey);\n };\n InfuraProvider2.getApiKey = function(apiKey) {\n var apiKeyObj = {\n apiKey: defaultProjectId,\n projectId: defaultProjectId,\n projectSecret: null\n };\n if (apiKey == null) {\n return apiKeyObj;\n }\n if (typeof apiKey === \"string\") {\n apiKeyObj.projectId = apiKey;\n } else if (apiKey.projectSecret != null) {\n logger.assertArgument(typeof apiKey.projectId === \"string\", \"projectSecret requires a projectId\", \"projectId\", apiKey.projectId);\n logger.assertArgument(typeof apiKey.projectSecret === \"string\", \"invalid projectSecret\", \"projectSecret\", \"[REDACTED]\");\n apiKeyObj.projectId = apiKey.projectId;\n apiKeyObj.projectSecret = apiKey.projectSecret;\n } else if (apiKey.projectId) {\n apiKeyObj.projectId = apiKey.projectId;\n }\n apiKeyObj.apiKey = apiKeyObj.projectId;\n return apiKeyObj;\n };\n InfuraProvider2.getUrl = function(network, apiKey) {\n var host = null;\n switch (network ? network.name : \"unknown\") {\n case \"homestead\":\n host = \"mainnet.infura.io\";\n break;\n case \"goerli\":\n host = \"goerli.infura.io\";\n break;\n case \"sepolia\":\n host = \"sepolia.infura.io\";\n break;\n case \"matic\":\n host = \"polygon-mainnet.infura.io\";\n break;\n case \"maticmum\":\n host = \"polygon-mumbai.infura.io\";\n break;\n case \"optimism\":\n host = \"optimism-mainnet.infura.io\";\n break;\n case \"optimism-goerli\":\n host = \"optimism-goerli.infura.io\";\n break;\n case \"optimism-sepolia\":\n host = \"optimism-sepolia.infura.io\";\n break;\n case \"arbitrum\":\n host = \"arbitrum-mainnet.infura.io\";\n break;\n case \"arbitrum-goerli\":\n host = \"arbitrum-goerli.infura.io\";\n break;\n case \"arbitrum-sepolia\":\n host = \"arbitrum-sepolia.infura.io\";\n break;\n default:\n logger.throwError(\"unsupported network\", logger_1.Logger.errors.INVALID_ARGUMENT, {\n argument: \"network\",\n value: network\n });\n }\n var connection = {\n allowGzip: true,\n url: \"https://\" + host + \"/v3/\" + apiKey.projectId,\n throttleCallback: function(attempt, url) {\n if (apiKey.projectId === defaultProjectId) {\n (0, formatter_1.showThrottleMessage)();\n }\n return Promise.resolve(true);\n }\n };\n if (apiKey.projectSecret != null) {\n connection.user = \"\";\n connection.password = apiKey.projectSecret;\n }\n return connection;\n };\n InfuraProvider2.prototype.isCommunityResource = function() {\n return this.projectId === defaultProjectId;\n };\n return InfuraProvider2;\n }(url_json_rpc_provider_1.UrlJsonRpcProvider)\n );\n exports3.InfuraProvider = InfuraProvider;\n }\n });\n\n // ../../../node_modules/.pnpm/@ethersproject+providers@5.8.0_bufferutil@4.0.9_utf-8-validate@5.0.10/node_modules/@ethersproject/providers/lib/json-rpc-batch-provider.js\n var require_json_rpc_batch_provider = __commonJS({\n \"../../../node_modules/.pnpm/@ethersproject+providers@5.8.0_bufferutil@4.0.9_utf-8-validate@5.0.10/node_modules/@ethersproject/providers/lib/json-rpc-batch-provider.js\"(exports3) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n var __extends3 = exports3 && exports3.__extends || /* @__PURE__ */ function() {\n var extendStatics3 = function(d5, b4) {\n extendStatics3 = Object.setPrototypeOf || { __proto__: [] } instanceof Array && function(d6, b5) {\n d6.__proto__ = b5;\n } || function(d6, b5) {\n for (var p4 in b5)\n if (Object.prototype.hasOwnProperty.call(b5, p4))\n d6[p4] = b5[p4];\n };\n return extendStatics3(d5, b4);\n };\n return function(d5, b4) {\n if (typeof b4 !== \"function\" && b4 !== null)\n throw new TypeError(\"Class extends value \" + String(b4) + \" is not a constructor or null\");\n extendStatics3(d5, b4);\n function __() {\n this.constructor = d5;\n }\n d5.prototype = b4 === null ? Object.create(b4) : (__.prototype = b4.prototype, new __());\n };\n }();\n Object.defineProperty(exports3, \"__esModule\", { value: true });\n exports3.JsonRpcBatchProvider = void 0;\n var properties_1 = require_lib4();\n var web_1 = require_lib28();\n var json_rpc_provider_1 = require_json_rpc_provider();\n var JsonRpcBatchProvider = (\n /** @class */\n function(_super) {\n __extends3(JsonRpcBatchProvider2, _super);\n function JsonRpcBatchProvider2() {\n return _super !== null && _super.apply(this, arguments) || this;\n }\n JsonRpcBatchProvider2.prototype.send = function(method, params) {\n var _this = this;\n var request = {\n method,\n params,\n id: this._nextId++,\n jsonrpc: \"2.0\"\n };\n if (this._pendingBatch == null) {\n this._pendingBatch = [];\n }\n var inflightRequest = { request, resolve: null, reject: null };\n var promise = new Promise(function(resolve, reject) {\n inflightRequest.resolve = resolve;\n inflightRequest.reject = reject;\n });\n this._pendingBatch.push(inflightRequest);\n if (!this._pendingBatchAggregator) {\n this._pendingBatchAggregator = setTimeout(function() {\n var batch = _this._pendingBatch;\n _this._pendingBatch = null;\n _this._pendingBatchAggregator = null;\n var request2 = batch.map(function(inflight) {\n return inflight.request;\n });\n _this.emit(\"debug\", {\n action: \"requestBatch\",\n request: (0, properties_1.deepCopy)(request2),\n provider: _this\n });\n return (0, web_1.fetchJson)(_this.connection, JSON.stringify(request2)).then(function(result) {\n _this.emit(\"debug\", {\n action: \"response\",\n request: request2,\n response: result,\n provider: _this\n });\n batch.forEach(function(inflightRequest2, index2) {\n var payload = result[index2];\n if (payload.error) {\n var error = new Error(payload.error.message);\n error.code = payload.error.code;\n error.data = payload.error.data;\n inflightRequest2.reject(error);\n } else {\n inflightRequest2.resolve(payload.result);\n }\n });\n }, function(error) {\n _this.emit(\"debug\", {\n action: \"response\",\n error,\n request: request2,\n provider: _this\n });\n batch.forEach(function(inflightRequest2) {\n inflightRequest2.reject(error);\n });\n });\n }, 10);\n }\n return promise;\n };\n return JsonRpcBatchProvider2;\n }(json_rpc_provider_1.JsonRpcProvider)\n );\n exports3.JsonRpcBatchProvider = JsonRpcBatchProvider;\n }\n });\n\n // ../../../node_modules/.pnpm/@ethersproject+providers@5.8.0_bufferutil@4.0.9_utf-8-validate@5.0.10/node_modules/@ethersproject/providers/lib/nodesmith-provider.js\n var require_nodesmith_provider = __commonJS({\n \"../../../node_modules/.pnpm/@ethersproject+providers@5.8.0_bufferutil@4.0.9_utf-8-validate@5.0.10/node_modules/@ethersproject/providers/lib/nodesmith-provider.js\"(exports3) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n var __extends3 = exports3 && exports3.__extends || /* @__PURE__ */ function() {\n var extendStatics3 = function(d5, b4) {\n extendStatics3 = Object.setPrototypeOf || { __proto__: [] } instanceof Array && function(d6, b5) {\n d6.__proto__ = b5;\n } || function(d6, b5) {\n for (var p4 in b5)\n if (Object.prototype.hasOwnProperty.call(b5, p4))\n d6[p4] = b5[p4];\n };\n return extendStatics3(d5, b4);\n };\n return function(d5, b4) {\n if (typeof b4 !== \"function\" && b4 !== null)\n throw new TypeError(\"Class extends value \" + String(b4) + \" is not a constructor or null\");\n extendStatics3(d5, b4);\n function __() {\n this.constructor = d5;\n }\n d5.prototype = b4 === null ? Object.create(b4) : (__.prototype = b4.prototype, new __());\n };\n }();\n Object.defineProperty(exports3, \"__esModule\", { value: true });\n exports3.NodesmithProvider = void 0;\n var url_json_rpc_provider_1 = require_url_json_rpc_provider();\n var logger_1 = require_lib();\n var _version_1 = require_version23();\n var logger = new logger_1.Logger(_version_1.version);\n var defaultApiKey = \"ETHERS_JS_SHARED\";\n var NodesmithProvider = (\n /** @class */\n function(_super) {\n __extends3(NodesmithProvider2, _super);\n function NodesmithProvider2() {\n return _super !== null && _super.apply(this, arguments) || this;\n }\n NodesmithProvider2.getApiKey = function(apiKey) {\n if (apiKey && typeof apiKey !== \"string\") {\n logger.throwArgumentError(\"invalid apiKey\", \"apiKey\", apiKey);\n }\n return apiKey || defaultApiKey;\n };\n NodesmithProvider2.getUrl = function(network, apiKey) {\n logger.warn(\"NodeSmith will be discontinued on 2019-12-20; please migrate to another platform.\");\n var host = null;\n switch (network.name) {\n case \"homestead\":\n host = \"https://ethereum.api.nodesmith.io/v1/mainnet/jsonrpc\";\n break;\n case \"ropsten\":\n host = \"https://ethereum.api.nodesmith.io/v1/ropsten/jsonrpc\";\n break;\n case \"rinkeby\":\n host = \"https://ethereum.api.nodesmith.io/v1/rinkeby/jsonrpc\";\n break;\n case \"goerli\":\n host = \"https://ethereum.api.nodesmith.io/v1/goerli/jsonrpc\";\n break;\n case \"kovan\":\n host = \"https://ethereum.api.nodesmith.io/v1/kovan/jsonrpc\";\n break;\n default:\n logger.throwArgumentError(\"unsupported network\", \"network\", arguments[0]);\n }\n return host + \"?apiKey=\" + apiKey;\n };\n return NodesmithProvider2;\n }(url_json_rpc_provider_1.UrlJsonRpcProvider)\n );\n exports3.NodesmithProvider = NodesmithProvider;\n }\n });\n\n // ../../../node_modules/.pnpm/@ethersproject+providers@5.8.0_bufferutil@4.0.9_utf-8-validate@5.0.10/node_modules/@ethersproject/providers/lib/pocket-provider.js\n var require_pocket_provider = __commonJS({\n \"../../../node_modules/.pnpm/@ethersproject+providers@5.8.0_bufferutil@4.0.9_utf-8-validate@5.0.10/node_modules/@ethersproject/providers/lib/pocket-provider.js\"(exports3) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n var __extends3 = exports3 && exports3.__extends || /* @__PURE__ */ function() {\n var extendStatics3 = function(d5, b4) {\n extendStatics3 = Object.setPrototypeOf || { __proto__: [] } instanceof Array && function(d6, b5) {\n d6.__proto__ = b5;\n } || function(d6, b5) {\n for (var p4 in b5)\n if (Object.prototype.hasOwnProperty.call(b5, p4))\n d6[p4] = b5[p4];\n };\n return extendStatics3(d5, b4);\n };\n return function(d5, b4) {\n if (typeof b4 !== \"function\" && b4 !== null)\n throw new TypeError(\"Class extends value \" + String(b4) + \" is not a constructor or null\");\n extendStatics3(d5, b4);\n function __() {\n this.constructor = d5;\n }\n d5.prototype = b4 === null ? Object.create(b4) : (__.prototype = b4.prototype, new __());\n };\n }();\n Object.defineProperty(exports3, \"__esModule\", { value: true });\n exports3.PocketProvider = void 0;\n var logger_1 = require_lib();\n var _version_1 = require_version23();\n var logger = new logger_1.Logger(_version_1.version);\n var url_json_rpc_provider_1 = require_url_json_rpc_provider();\n var defaultApplicationId = \"62e1ad51b37b8e00394bda3b\";\n var PocketProvider = (\n /** @class */\n function(_super) {\n __extends3(PocketProvider2, _super);\n function PocketProvider2() {\n return _super !== null && _super.apply(this, arguments) || this;\n }\n PocketProvider2.getApiKey = function(apiKey) {\n var apiKeyObj = {\n applicationId: null,\n loadBalancer: true,\n applicationSecretKey: null\n };\n if (apiKey == null) {\n apiKeyObj.applicationId = defaultApplicationId;\n } else if (typeof apiKey === \"string\") {\n apiKeyObj.applicationId = apiKey;\n } else if (apiKey.applicationSecretKey != null) {\n apiKeyObj.applicationId = apiKey.applicationId;\n apiKeyObj.applicationSecretKey = apiKey.applicationSecretKey;\n } else if (apiKey.applicationId) {\n apiKeyObj.applicationId = apiKey.applicationId;\n } else {\n logger.throwArgumentError(\"unsupported PocketProvider apiKey\", \"apiKey\", apiKey);\n }\n return apiKeyObj;\n };\n PocketProvider2.getUrl = function(network, apiKey) {\n var host = null;\n switch (network ? network.name : \"unknown\") {\n case \"goerli\":\n host = \"eth-goerli.gateway.pokt.network\";\n break;\n case \"homestead\":\n host = \"eth-mainnet.gateway.pokt.network\";\n break;\n case \"kovan\":\n host = \"poa-kovan.gateway.pokt.network\";\n break;\n case \"matic\":\n host = \"poly-mainnet.gateway.pokt.network\";\n break;\n case \"maticmum\":\n host = \"polygon-mumbai-rpc.gateway.pokt.network\";\n break;\n case \"rinkeby\":\n host = \"eth-rinkeby.gateway.pokt.network\";\n break;\n case \"ropsten\":\n host = \"eth-ropsten.gateway.pokt.network\";\n break;\n default:\n logger.throwError(\"unsupported network\", logger_1.Logger.errors.INVALID_ARGUMENT, {\n argument: \"network\",\n value: network\n });\n }\n var url = \"https://\" + host + \"/v1/lb/\" + apiKey.applicationId;\n var connection = { headers: {}, url };\n if (apiKey.applicationSecretKey != null) {\n connection.user = \"\";\n connection.password = apiKey.applicationSecretKey;\n }\n return connection;\n };\n PocketProvider2.prototype.isCommunityResource = function() {\n return this.applicationId === defaultApplicationId;\n };\n return PocketProvider2;\n }(url_json_rpc_provider_1.UrlJsonRpcProvider)\n );\n exports3.PocketProvider = PocketProvider;\n }\n });\n\n // ../../../node_modules/.pnpm/@ethersproject+providers@5.8.0_bufferutil@4.0.9_utf-8-validate@5.0.10/node_modules/@ethersproject/providers/lib/quicknode-provider.js\n var require_quicknode_provider = __commonJS({\n \"../../../node_modules/.pnpm/@ethersproject+providers@5.8.0_bufferutil@4.0.9_utf-8-validate@5.0.10/node_modules/@ethersproject/providers/lib/quicknode-provider.js\"(exports3) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n var __extends3 = exports3 && exports3.__extends || /* @__PURE__ */ function() {\n var extendStatics3 = function(d5, b4) {\n extendStatics3 = Object.setPrototypeOf || { __proto__: [] } instanceof Array && function(d6, b5) {\n d6.__proto__ = b5;\n } || function(d6, b5) {\n for (var p4 in b5)\n if (Object.prototype.hasOwnProperty.call(b5, p4))\n d6[p4] = b5[p4];\n };\n return extendStatics3(d5, b4);\n };\n return function(d5, b4) {\n if (typeof b4 !== \"function\" && b4 !== null)\n throw new TypeError(\"Class extends value \" + String(b4) + \" is not a constructor or null\");\n extendStatics3(d5, b4);\n function __() {\n this.constructor = d5;\n }\n d5.prototype = b4 === null ? Object.create(b4) : (__.prototype = b4.prototype, new __());\n };\n }();\n Object.defineProperty(exports3, \"__esModule\", { value: true });\n exports3.QuickNodeProvider = void 0;\n var url_json_rpc_provider_1 = require_url_json_rpc_provider();\n var logger_1 = require_lib();\n var _version_1 = require_version23();\n var logger = new logger_1.Logger(_version_1.version);\n var defaultApiKey = \"919b412a057b5e9c9b6dce193c5a60242d6efadb\";\n var QuickNodeProvider = (\n /** @class */\n function(_super) {\n __extends3(QuickNodeProvider2, _super);\n function QuickNodeProvider2() {\n return _super !== null && _super.apply(this, arguments) || this;\n }\n QuickNodeProvider2.getApiKey = function(apiKey) {\n if (apiKey && typeof apiKey !== \"string\") {\n logger.throwArgumentError(\"invalid apiKey\", \"apiKey\", apiKey);\n }\n return apiKey || defaultApiKey;\n };\n QuickNodeProvider2.getUrl = function(network, apiKey) {\n var host = null;\n switch (network.name) {\n case \"homestead\":\n host = \"ethers.quiknode.pro\";\n break;\n case \"goerli\":\n host = \"ethers.ethereum-goerli.quiknode.pro\";\n break;\n case \"sepolia\":\n host = \"ethers.ethereum-sepolia.quiknode.pro\";\n break;\n case \"holesky\":\n host = \"ethers.ethereum-holesky.quiknode.pro\";\n break;\n case \"arbitrum\":\n host = \"ethers.arbitrum-mainnet.quiknode.pro\";\n break;\n case \"arbitrum-goerli\":\n host = \"ethers.arbitrum-goerli.quiknode.pro\";\n break;\n case \"arbitrum-sepolia\":\n host = \"ethers.arbitrum-sepolia.quiknode.pro\";\n break;\n case \"base\":\n host = \"ethers.base-mainnet.quiknode.pro\";\n break;\n case \"base-goerli\":\n host = \"ethers.base-goerli.quiknode.pro\";\n break;\n case \"base-spolia\":\n host = \"ethers.base-sepolia.quiknode.pro\";\n break;\n case \"bnb\":\n host = \"ethers.bsc.quiknode.pro\";\n break;\n case \"bnbt\":\n host = \"ethers.bsc-testnet.quiknode.pro\";\n break;\n case \"matic\":\n host = \"ethers.matic.quiknode.pro\";\n break;\n case \"maticmum\":\n host = \"ethers.matic-testnet.quiknode.pro\";\n break;\n case \"optimism\":\n host = \"ethers.optimism.quiknode.pro\";\n break;\n case \"optimism-goerli\":\n host = \"ethers.optimism-goerli.quiknode.pro\";\n break;\n case \"optimism-sepolia\":\n host = \"ethers.optimism-sepolia.quiknode.pro\";\n break;\n case \"xdai\":\n host = \"ethers.xdai.quiknode.pro\";\n break;\n default:\n logger.throwArgumentError(\"unsupported network\", \"network\", arguments[0]);\n }\n return \"https://\" + host + \"/\" + apiKey;\n };\n return QuickNodeProvider2;\n }(url_json_rpc_provider_1.UrlJsonRpcProvider)\n );\n exports3.QuickNodeProvider = QuickNodeProvider;\n }\n });\n\n // ../../../node_modules/.pnpm/@ethersproject+providers@5.8.0_bufferutil@4.0.9_utf-8-validate@5.0.10/node_modules/@ethersproject/providers/lib/web3-provider.js\n var require_web3_provider = __commonJS({\n \"../../../node_modules/.pnpm/@ethersproject+providers@5.8.0_bufferutil@4.0.9_utf-8-validate@5.0.10/node_modules/@ethersproject/providers/lib/web3-provider.js\"(exports3) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n var __extends3 = exports3 && exports3.__extends || /* @__PURE__ */ function() {\n var extendStatics3 = function(d5, b4) {\n extendStatics3 = Object.setPrototypeOf || { __proto__: [] } instanceof Array && function(d6, b5) {\n d6.__proto__ = b5;\n } || function(d6, b5) {\n for (var p4 in b5)\n if (Object.prototype.hasOwnProperty.call(b5, p4))\n d6[p4] = b5[p4];\n };\n return extendStatics3(d5, b4);\n };\n return function(d5, b4) {\n if (typeof b4 !== \"function\" && b4 !== null)\n throw new TypeError(\"Class extends value \" + String(b4) + \" is not a constructor or null\");\n extendStatics3(d5, b4);\n function __() {\n this.constructor = d5;\n }\n d5.prototype = b4 === null ? Object.create(b4) : (__.prototype = b4.prototype, new __());\n };\n }();\n Object.defineProperty(exports3, \"__esModule\", { value: true });\n exports3.Web3Provider = void 0;\n var properties_1 = require_lib4();\n var logger_1 = require_lib();\n var _version_1 = require_version23();\n var logger = new logger_1.Logger(_version_1.version);\n var json_rpc_provider_1 = require_json_rpc_provider();\n var _nextId = 1;\n function buildWeb3LegacyFetcher(provider, sendFunc) {\n var fetcher = \"Web3LegacyFetcher\";\n return function(method, params) {\n var _this = this;\n var request = {\n method,\n params,\n id: _nextId++,\n jsonrpc: \"2.0\"\n };\n return new Promise(function(resolve, reject) {\n _this.emit(\"debug\", {\n action: \"request\",\n fetcher,\n request: (0, properties_1.deepCopy)(request),\n provider: _this\n });\n sendFunc(request, function(error, response) {\n if (error) {\n _this.emit(\"debug\", {\n action: \"response\",\n fetcher,\n error,\n request,\n provider: _this\n });\n return reject(error);\n }\n _this.emit(\"debug\", {\n action: \"response\",\n fetcher,\n request,\n response,\n provider: _this\n });\n if (response.error) {\n var error_1 = new Error(response.error.message);\n error_1.code = response.error.code;\n error_1.data = response.error.data;\n return reject(error_1);\n }\n resolve(response.result);\n });\n });\n };\n }\n function buildEip1193Fetcher(provider) {\n return function(method, params) {\n var _this = this;\n if (params == null) {\n params = [];\n }\n var request = { method, params };\n this.emit(\"debug\", {\n action: \"request\",\n fetcher: \"Eip1193Fetcher\",\n request: (0, properties_1.deepCopy)(request),\n provider: this\n });\n return provider.request(request).then(function(response) {\n _this.emit(\"debug\", {\n action: \"response\",\n fetcher: \"Eip1193Fetcher\",\n request,\n response,\n provider: _this\n });\n return response;\n }, function(error) {\n _this.emit(\"debug\", {\n action: \"response\",\n fetcher: \"Eip1193Fetcher\",\n request,\n error,\n provider: _this\n });\n throw error;\n });\n };\n }\n var Web3Provider = (\n /** @class */\n function(_super) {\n __extends3(Web3Provider2, _super);\n function Web3Provider2(provider, network) {\n var _this = this;\n if (provider == null) {\n logger.throwArgumentError(\"missing provider\", \"provider\", provider);\n }\n var path = null;\n var jsonRpcFetchFunc = null;\n var subprovider = null;\n if (typeof provider === \"function\") {\n path = \"unknown:\";\n jsonRpcFetchFunc = provider;\n } else {\n path = provider.host || provider.path || \"\";\n if (!path && provider.isMetaMask) {\n path = \"metamask\";\n }\n subprovider = provider;\n if (provider.request) {\n if (path === \"\") {\n path = \"eip-1193:\";\n }\n jsonRpcFetchFunc = buildEip1193Fetcher(provider);\n } else if (provider.sendAsync) {\n jsonRpcFetchFunc = buildWeb3LegacyFetcher(provider, provider.sendAsync.bind(provider));\n } else if (provider.send) {\n jsonRpcFetchFunc = buildWeb3LegacyFetcher(provider, provider.send.bind(provider));\n } else {\n logger.throwArgumentError(\"unsupported provider\", \"provider\", provider);\n }\n if (!path) {\n path = \"unknown:\";\n }\n }\n _this = _super.call(this, path, network) || this;\n (0, properties_1.defineReadOnly)(_this, \"jsonRpcFetchFunc\", jsonRpcFetchFunc);\n (0, properties_1.defineReadOnly)(_this, \"provider\", subprovider);\n return _this;\n }\n Web3Provider2.prototype.send = function(method, params) {\n return this.jsonRpcFetchFunc(method, params);\n };\n return Web3Provider2;\n }(json_rpc_provider_1.JsonRpcProvider)\n );\n exports3.Web3Provider = Web3Provider;\n }\n });\n\n // ../../../node_modules/.pnpm/@ethersproject+providers@5.8.0_bufferutil@4.0.9_utf-8-validate@5.0.10/node_modules/@ethersproject/providers/lib/index.js\n var require_lib29 = __commonJS({\n \"../../../node_modules/.pnpm/@ethersproject+providers@5.8.0_bufferutil@4.0.9_utf-8-validate@5.0.10/node_modules/@ethersproject/providers/lib/index.js\"(exports3) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n Object.defineProperty(exports3, \"__esModule\", { value: true });\n exports3.Formatter = exports3.showThrottleMessage = exports3.isCommunityResourcable = exports3.isCommunityResource = exports3.getNetwork = exports3.getDefaultProvider = exports3.JsonRpcSigner = exports3.IpcProvider = exports3.WebSocketProvider = exports3.Web3Provider = exports3.StaticJsonRpcProvider = exports3.QuickNodeProvider = exports3.PocketProvider = exports3.NodesmithProvider = exports3.JsonRpcBatchProvider = exports3.JsonRpcProvider = exports3.InfuraWebSocketProvider = exports3.InfuraProvider = exports3.EtherscanProvider = exports3.CloudflareProvider = exports3.AnkrProvider = exports3.AlchemyWebSocketProvider = exports3.AlchemyProvider = exports3.FallbackProvider = exports3.UrlJsonRpcProvider = exports3.Resolver = exports3.BaseProvider = exports3.Provider = void 0;\n var abstract_provider_1 = require_lib14();\n Object.defineProperty(exports3, \"Provider\", { enumerable: true, get: function() {\n return abstract_provider_1.Provider;\n } });\n var networks_1 = require_lib27();\n Object.defineProperty(exports3, \"getNetwork\", { enumerable: true, get: function() {\n return networks_1.getNetwork;\n } });\n var base_provider_1 = require_base_provider();\n Object.defineProperty(exports3, \"BaseProvider\", { enumerable: true, get: function() {\n return base_provider_1.BaseProvider;\n } });\n Object.defineProperty(exports3, \"Resolver\", { enumerable: true, get: function() {\n return base_provider_1.Resolver;\n } });\n var alchemy_provider_1 = require_alchemy_provider();\n Object.defineProperty(exports3, \"AlchemyProvider\", { enumerable: true, get: function() {\n return alchemy_provider_1.AlchemyProvider;\n } });\n Object.defineProperty(exports3, \"AlchemyWebSocketProvider\", { enumerable: true, get: function() {\n return alchemy_provider_1.AlchemyWebSocketProvider;\n } });\n var ankr_provider_1 = require_ankr_provider();\n Object.defineProperty(exports3, \"AnkrProvider\", { enumerable: true, get: function() {\n return ankr_provider_1.AnkrProvider;\n } });\n var cloudflare_provider_1 = require_cloudflare_provider();\n Object.defineProperty(exports3, \"CloudflareProvider\", { enumerable: true, get: function() {\n return cloudflare_provider_1.CloudflareProvider;\n } });\n var etherscan_provider_1 = require_etherscan_provider();\n Object.defineProperty(exports3, \"EtherscanProvider\", { enumerable: true, get: function() {\n return etherscan_provider_1.EtherscanProvider;\n } });\n var fallback_provider_1 = require_fallback_provider();\n Object.defineProperty(exports3, \"FallbackProvider\", { enumerable: true, get: function() {\n return fallback_provider_1.FallbackProvider;\n } });\n var ipc_provider_1 = require_browser_ipc_provider();\n Object.defineProperty(exports3, \"IpcProvider\", { enumerable: true, get: function() {\n return ipc_provider_1.IpcProvider;\n } });\n var infura_provider_1 = require_infura_provider();\n Object.defineProperty(exports3, \"InfuraProvider\", { enumerable: true, get: function() {\n return infura_provider_1.InfuraProvider;\n } });\n Object.defineProperty(exports3, \"InfuraWebSocketProvider\", { enumerable: true, get: function() {\n return infura_provider_1.InfuraWebSocketProvider;\n } });\n var json_rpc_provider_1 = require_json_rpc_provider();\n Object.defineProperty(exports3, \"JsonRpcProvider\", { enumerable: true, get: function() {\n return json_rpc_provider_1.JsonRpcProvider;\n } });\n Object.defineProperty(exports3, \"JsonRpcSigner\", { enumerable: true, get: function() {\n return json_rpc_provider_1.JsonRpcSigner;\n } });\n var json_rpc_batch_provider_1 = require_json_rpc_batch_provider();\n Object.defineProperty(exports3, \"JsonRpcBatchProvider\", { enumerable: true, get: function() {\n return json_rpc_batch_provider_1.JsonRpcBatchProvider;\n } });\n var nodesmith_provider_1 = require_nodesmith_provider();\n Object.defineProperty(exports3, \"NodesmithProvider\", { enumerable: true, get: function() {\n return nodesmith_provider_1.NodesmithProvider;\n } });\n var pocket_provider_1 = require_pocket_provider();\n Object.defineProperty(exports3, \"PocketProvider\", { enumerable: true, get: function() {\n return pocket_provider_1.PocketProvider;\n } });\n var quicknode_provider_1 = require_quicknode_provider();\n Object.defineProperty(exports3, \"QuickNodeProvider\", { enumerable: true, get: function() {\n return quicknode_provider_1.QuickNodeProvider;\n } });\n var url_json_rpc_provider_1 = require_url_json_rpc_provider();\n Object.defineProperty(exports3, \"StaticJsonRpcProvider\", { enumerable: true, get: function() {\n return url_json_rpc_provider_1.StaticJsonRpcProvider;\n } });\n Object.defineProperty(exports3, \"UrlJsonRpcProvider\", { enumerable: true, get: function() {\n return url_json_rpc_provider_1.UrlJsonRpcProvider;\n } });\n var web3_provider_1 = require_web3_provider();\n Object.defineProperty(exports3, \"Web3Provider\", { enumerable: true, get: function() {\n return web3_provider_1.Web3Provider;\n } });\n var websocket_provider_1 = require_websocket_provider();\n Object.defineProperty(exports3, \"WebSocketProvider\", { enumerable: true, get: function() {\n return websocket_provider_1.WebSocketProvider;\n } });\n var formatter_1 = require_formatter();\n Object.defineProperty(exports3, \"Formatter\", { enumerable: true, get: function() {\n return formatter_1.Formatter;\n } });\n Object.defineProperty(exports3, \"isCommunityResourcable\", { enumerable: true, get: function() {\n return formatter_1.isCommunityResourcable;\n } });\n Object.defineProperty(exports3, \"isCommunityResource\", { enumerable: true, get: function() {\n return formatter_1.isCommunityResource;\n } });\n Object.defineProperty(exports3, \"showThrottleMessage\", { enumerable: true, get: function() {\n return formatter_1.showThrottleMessage;\n } });\n var logger_1 = require_lib();\n var _version_1 = require_version23();\n var logger = new logger_1.Logger(_version_1.version);\n function getDefaultProvider(network, options) {\n if (network == null) {\n network = \"homestead\";\n }\n if (typeof network === \"string\") {\n var match = network.match(/^(ws|http)s?:/i);\n if (match) {\n switch (match[1].toLowerCase()) {\n case \"http\":\n case \"https\":\n return new json_rpc_provider_1.JsonRpcProvider(network);\n case \"ws\":\n case \"wss\":\n return new websocket_provider_1.WebSocketProvider(network);\n default:\n logger.throwArgumentError(\"unsupported URL scheme\", \"network\", network);\n }\n }\n }\n var n2 = (0, networks_1.getNetwork)(network);\n if (!n2 || !n2._defaultProvider) {\n logger.throwError(\"unsupported getDefaultProvider network\", logger_1.Logger.errors.NETWORK_ERROR, {\n operation: \"getDefaultProvider\",\n network\n });\n }\n return n2._defaultProvider({\n FallbackProvider: fallback_provider_1.FallbackProvider,\n AlchemyProvider: alchemy_provider_1.AlchemyProvider,\n AnkrProvider: ankr_provider_1.AnkrProvider,\n CloudflareProvider: cloudflare_provider_1.CloudflareProvider,\n EtherscanProvider: etherscan_provider_1.EtherscanProvider,\n InfuraProvider: infura_provider_1.InfuraProvider,\n JsonRpcProvider: json_rpc_provider_1.JsonRpcProvider,\n NodesmithProvider: nodesmith_provider_1.NodesmithProvider,\n PocketProvider: pocket_provider_1.PocketProvider,\n QuickNodeProvider: quicknode_provider_1.QuickNodeProvider,\n Web3Provider: web3_provider_1.Web3Provider,\n IpcProvider: ipc_provider_1.IpcProvider\n }, options);\n }\n exports3.getDefaultProvider = getDefaultProvider;\n }\n });\n\n // ../../../node_modules/.pnpm/@ethersproject+solidity@5.8.0/node_modules/@ethersproject/solidity/lib/_version.js\n var require_version24 = __commonJS({\n \"../../../node_modules/.pnpm/@ethersproject+solidity@5.8.0/node_modules/@ethersproject/solidity/lib/_version.js\"(exports3) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n Object.defineProperty(exports3, \"__esModule\", { value: true });\n exports3.version = void 0;\n exports3.version = \"solidity/5.8.0\";\n }\n });\n\n // ../../../node_modules/.pnpm/@ethersproject+solidity@5.8.0/node_modules/@ethersproject/solidity/lib/index.js\n var require_lib30 = __commonJS({\n \"../../../node_modules/.pnpm/@ethersproject+solidity@5.8.0/node_modules/@ethersproject/solidity/lib/index.js\"(exports3) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n Object.defineProperty(exports3, \"__esModule\", { value: true });\n exports3.sha256 = exports3.keccak256 = exports3.pack = void 0;\n var bignumber_1 = require_lib3();\n var bytes_1 = require_lib2();\n var keccak256_1 = require_lib5();\n var sha2_1 = require_lib20();\n var strings_1 = require_lib9();\n var regexBytes = new RegExp(\"^bytes([0-9]+)$\");\n var regexNumber = new RegExp(\"^(u?int)([0-9]*)$\");\n var regexArray = new RegExp(\"^(.*)\\\\[([0-9]*)\\\\]$\");\n var Zeros = \"0000000000000000000000000000000000000000000000000000000000000000\";\n var logger_1 = require_lib();\n var _version_1 = require_version24();\n var logger = new logger_1.Logger(_version_1.version);\n function _pack(type, value, isArray) {\n switch (type) {\n case \"address\":\n if (isArray) {\n return (0, bytes_1.zeroPad)(value, 32);\n }\n return (0, bytes_1.arrayify)(value);\n case \"string\":\n return (0, strings_1.toUtf8Bytes)(value);\n case \"bytes\":\n return (0, bytes_1.arrayify)(value);\n case \"bool\":\n value = value ? \"0x01\" : \"0x00\";\n if (isArray) {\n return (0, bytes_1.zeroPad)(value, 32);\n }\n return (0, bytes_1.arrayify)(value);\n }\n var match = type.match(regexNumber);\n if (match) {\n var size6 = parseInt(match[2] || \"256\");\n if (match[2] && String(size6) !== match[2] || size6 % 8 !== 0 || size6 === 0 || size6 > 256) {\n logger.throwArgumentError(\"invalid number type\", \"type\", type);\n }\n if (isArray) {\n size6 = 256;\n }\n value = bignumber_1.BigNumber.from(value).toTwos(size6);\n return (0, bytes_1.zeroPad)(value, size6 / 8);\n }\n match = type.match(regexBytes);\n if (match) {\n var size6 = parseInt(match[1]);\n if (String(size6) !== match[1] || size6 === 0 || size6 > 32) {\n logger.throwArgumentError(\"invalid bytes type\", \"type\", type);\n }\n if ((0, bytes_1.arrayify)(value).byteLength !== size6) {\n logger.throwArgumentError(\"invalid value for \" + type, \"value\", value);\n }\n if (isArray) {\n return (0, bytes_1.arrayify)((value + Zeros).substring(0, 66));\n }\n return value;\n }\n match = type.match(regexArray);\n if (match && Array.isArray(value)) {\n var baseType_1 = match[1];\n var count = parseInt(match[2] || String(value.length));\n if (count != value.length) {\n logger.throwArgumentError(\"invalid array length for \" + type, \"value\", value);\n }\n var result_1 = [];\n value.forEach(function(value2) {\n result_1.push(_pack(baseType_1, value2, true));\n });\n return (0, bytes_1.concat)(result_1);\n }\n return logger.throwArgumentError(\"invalid type\", \"type\", type);\n }\n function pack(types, values) {\n if (types.length != values.length) {\n logger.throwArgumentError(\"wrong number of values; expected ${ types.length }\", \"values\", values);\n }\n var tight = [];\n types.forEach(function(type, index2) {\n tight.push(_pack(type, values[index2]));\n });\n return (0, bytes_1.hexlify)((0, bytes_1.concat)(tight));\n }\n exports3.pack = pack;\n function keccak2563(types, values) {\n return (0, keccak256_1.keccak256)(pack(types, values));\n }\n exports3.keccak256 = keccak2563;\n function sha2564(types, values) {\n return (0, sha2_1.sha256)(pack(types, values));\n }\n exports3.sha256 = sha2564;\n }\n });\n\n // ../../../node_modules/.pnpm/@ethersproject+units@5.8.0/node_modules/@ethersproject/units/lib/_version.js\n var require_version25 = __commonJS({\n \"../../../node_modules/.pnpm/@ethersproject+units@5.8.0/node_modules/@ethersproject/units/lib/_version.js\"(exports3) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n Object.defineProperty(exports3, \"__esModule\", { value: true });\n exports3.version = void 0;\n exports3.version = \"units/5.8.0\";\n }\n });\n\n // ../../../node_modules/.pnpm/@ethersproject+units@5.8.0/node_modules/@ethersproject/units/lib/index.js\n var require_lib31 = __commonJS({\n \"../../../node_modules/.pnpm/@ethersproject+units@5.8.0/node_modules/@ethersproject/units/lib/index.js\"(exports3) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n Object.defineProperty(exports3, \"__esModule\", { value: true });\n exports3.parseEther = exports3.formatEther = exports3.parseUnits = exports3.formatUnits = exports3.commify = void 0;\n var bignumber_1 = require_lib3();\n var logger_1 = require_lib();\n var _version_1 = require_version25();\n var logger = new logger_1.Logger(_version_1.version);\n var names = [\n \"wei\",\n \"kwei\",\n \"mwei\",\n \"gwei\",\n \"szabo\",\n \"finney\",\n \"ether\"\n ];\n function commify(value) {\n var comps = String(value).split(\".\");\n if (comps.length > 2 || !comps[0].match(/^-?[0-9]*$/) || comps[1] && !comps[1].match(/^[0-9]*$/) || value === \".\" || value === \"-.\") {\n logger.throwArgumentError(\"invalid value\", \"value\", value);\n }\n var whole = comps[0];\n var negative = \"\";\n if (whole.substring(0, 1) === \"-\") {\n negative = \"-\";\n whole = whole.substring(1);\n }\n while (whole.substring(0, 1) === \"0\") {\n whole = whole.substring(1);\n }\n if (whole === \"\") {\n whole = \"0\";\n }\n var suffix = \"\";\n if (comps.length === 2) {\n suffix = \".\" + (comps[1] || \"0\");\n }\n while (suffix.length > 2 && suffix[suffix.length - 1] === \"0\") {\n suffix = suffix.substring(0, suffix.length - 1);\n }\n var formatted = [];\n while (whole.length) {\n if (whole.length <= 3) {\n formatted.unshift(whole);\n break;\n } else {\n var index2 = whole.length - 3;\n formatted.unshift(whole.substring(index2));\n whole = whole.substring(0, index2);\n }\n }\n return negative + formatted.join(\",\") + suffix;\n }\n exports3.commify = commify;\n function formatUnits2(value, unitName) {\n if (typeof unitName === \"string\") {\n var index2 = names.indexOf(unitName);\n if (index2 !== -1) {\n unitName = 3 * index2;\n }\n }\n return (0, bignumber_1.formatFixed)(value, unitName != null ? unitName : 18);\n }\n exports3.formatUnits = formatUnits2;\n function parseUnits(value, unitName) {\n if (typeof value !== \"string\") {\n logger.throwArgumentError(\"value must be a string\", \"value\", value);\n }\n if (typeof unitName === \"string\") {\n var index2 = names.indexOf(unitName);\n if (index2 !== -1) {\n unitName = 3 * index2;\n }\n }\n return (0, bignumber_1.parseFixed)(value, unitName != null ? unitName : 18);\n }\n exports3.parseUnits = parseUnits;\n function formatEther2(wei) {\n return formatUnits2(wei, 18);\n }\n exports3.formatEther = formatEther2;\n function parseEther(ether) {\n return parseUnits(ether, 18);\n }\n exports3.parseEther = parseEther;\n }\n });\n\n // ../../../node_modules/.pnpm/ethers@5.8.0_bufferutil@4.0.9_utf-8-validate@5.0.10/node_modules/ethers/lib/utils.js\n var require_utils6 = __commonJS({\n \"../../../node_modules/.pnpm/ethers@5.8.0_bufferutil@4.0.9_utf-8-validate@5.0.10/node_modules/ethers/lib/utils.js\"(exports3) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n var __createBinding3 = exports3 && exports3.__createBinding || (Object.create ? function(o5, m2, k4, k22) {\n if (k22 === void 0)\n k22 = k4;\n Object.defineProperty(o5, k22, { enumerable: true, get: function() {\n return m2[k4];\n } });\n } : function(o5, m2, k4, k22) {\n if (k22 === void 0)\n k22 = k4;\n o5[k22] = m2[k4];\n });\n var __setModuleDefault3 = exports3 && exports3.__setModuleDefault || (Object.create ? function(o5, v2) {\n Object.defineProperty(o5, \"default\", { enumerable: true, value: v2 });\n } : function(o5, v2) {\n o5[\"default\"] = v2;\n });\n var __importStar3 = exports3 && exports3.__importStar || function(mod3) {\n if (mod3 && mod3.__esModule)\n return mod3;\n var result = {};\n if (mod3 != null) {\n for (var k4 in mod3)\n if (k4 !== \"default\" && Object.prototype.hasOwnProperty.call(mod3, k4))\n __createBinding3(result, mod3, k4);\n }\n __setModuleDefault3(result, mod3);\n return result;\n };\n Object.defineProperty(exports3, \"__esModule\", { value: true });\n exports3.formatBytes32String = exports3.Utf8ErrorFuncs = exports3.toUtf8String = exports3.toUtf8CodePoints = exports3.toUtf8Bytes = exports3._toEscapedUtf8String = exports3.nameprep = exports3.hexDataSlice = exports3.hexDataLength = exports3.hexZeroPad = exports3.hexValue = exports3.hexStripZeros = exports3.hexConcat = exports3.isHexString = exports3.hexlify = exports3.base64 = exports3.base58 = exports3.TransactionDescription = exports3.LogDescription = exports3.Interface = exports3.SigningKey = exports3.HDNode = exports3.defaultPath = exports3.isBytesLike = exports3.isBytes = exports3.zeroPad = exports3.stripZeros = exports3.concat = exports3.arrayify = exports3.shallowCopy = exports3.resolveProperties = exports3.getStatic = exports3.defineReadOnly = exports3.deepCopy = exports3.checkProperties = exports3.poll = exports3.fetchJson = exports3._fetchData = exports3.RLP = exports3.Logger = exports3.checkResultErrors = exports3.FormatTypes = exports3.ParamType = exports3.FunctionFragment = exports3.EventFragment = exports3.ErrorFragment = exports3.ConstructorFragment = exports3.Fragment = exports3.defaultAbiCoder = exports3.AbiCoder = void 0;\n exports3.Indexed = exports3.Utf8ErrorReason = exports3.UnicodeNormalizationForm = exports3.SupportedAlgorithm = exports3.mnemonicToSeed = exports3.isValidMnemonic = exports3.entropyToMnemonic = exports3.mnemonicToEntropy = exports3.getAccountPath = exports3.verifyTypedData = exports3.verifyMessage = exports3.recoverPublicKey = exports3.computePublicKey = exports3.recoverAddress = exports3.computeAddress = exports3.getJsonWalletAddress = exports3.TransactionTypes = exports3.serializeTransaction = exports3.parseTransaction = exports3.accessListify = exports3.joinSignature = exports3.splitSignature = exports3.soliditySha256 = exports3.solidityKeccak256 = exports3.solidityPack = exports3.shuffled = exports3.randomBytes = exports3.sha512 = exports3.sha256 = exports3.ripemd160 = exports3.keccak256 = exports3.computeHmac = exports3.commify = exports3.parseUnits = exports3.formatUnits = exports3.parseEther = exports3.formatEther = exports3.isAddress = exports3.getCreate2Address = exports3.getContractAddress = exports3.getIcapAddress = exports3.getAddress = exports3._TypedDataEncoder = exports3.id = exports3.isValidName = exports3.namehash = exports3.hashMessage = exports3.dnsEncode = exports3.parseBytes32String = void 0;\n var abi_1 = require_lib13();\n Object.defineProperty(exports3, \"AbiCoder\", { enumerable: true, get: function() {\n return abi_1.AbiCoder;\n } });\n Object.defineProperty(exports3, \"checkResultErrors\", { enumerable: true, get: function() {\n return abi_1.checkResultErrors;\n } });\n Object.defineProperty(exports3, \"ConstructorFragment\", { enumerable: true, get: function() {\n return abi_1.ConstructorFragment;\n } });\n Object.defineProperty(exports3, \"defaultAbiCoder\", { enumerable: true, get: function() {\n return abi_1.defaultAbiCoder;\n } });\n Object.defineProperty(exports3, \"ErrorFragment\", { enumerable: true, get: function() {\n return abi_1.ErrorFragment;\n } });\n Object.defineProperty(exports3, \"EventFragment\", { enumerable: true, get: function() {\n return abi_1.EventFragment;\n } });\n Object.defineProperty(exports3, \"FormatTypes\", { enumerable: true, get: function() {\n return abi_1.FormatTypes;\n } });\n Object.defineProperty(exports3, \"Fragment\", { enumerable: true, get: function() {\n return abi_1.Fragment;\n } });\n Object.defineProperty(exports3, \"FunctionFragment\", { enumerable: true, get: function() {\n return abi_1.FunctionFragment;\n } });\n Object.defineProperty(exports3, \"Indexed\", { enumerable: true, get: function() {\n return abi_1.Indexed;\n } });\n Object.defineProperty(exports3, \"Interface\", { enumerable: true, get: function() {\n return abi_1.Interface;\n } });\n Object.defineProperty(exports3, \"LogDescription\", { enumerable: true, get: function() {\n return abi_1.LogDescription;\n } });\n Object.defineProperty(exports3, \"ParamType\", { enumerable: true, get: function() {\n return abi_1.ParamType;\n } });\n Object.defineProperty(exports3, \"TransactionDescription\", { enumerable: true, get: function() {\n return abi_1.TransactionDescription;\n } });\n var address_1 = require_lib7();\n Object.defineProperty(exports3, \"getAddress\", { enumerable: true, get: function() {\n return address_1.getAddress;\n } });\n Object.defineProperty(exports3, \"getCreate2Address\", { enumerable: true, get: function() {\n return address_1.getCreate2Address;\n } });\n Object.defineProperty(exports3, \"getContractAddress\", { enumerable: true, get: function() {\n return address_1.getContractAddress;\n } });\n Object.defineProperty(exports3, \"getIcapAddress\", { enumerable: true, get: function() {\n return address_1.getIcapAddress;\n } });\n Object.defineProperty(exports3, \"isAddress\", { enumerable: true, get: function() {\n return address_1.isAddress;\n } });\n var base64 = __importStar3(require_lib10());\n exports3.base64 = base64;\n var basex_1 = require_lib19();\n Object.defineProperty(exports3, \"base58\", { enumerable: true, get: function() {\n return basex_1.Base58;\n } });\n var bytes_1 = require_lib2();\n Object.defineProperty(exports3, \"arrayify\", { enumerable: true, get: function() {\n return bytes_1.arrayify;\n } });\n Object.defineProperty(exports3, \"concat\", { enumerable: true, get: function() {\n return bytes_1.concat;\n } });\n Object.defineProperty(exports3, \"hexConcat\", { enumerable: true, get: function() {\n return bytes_1.hexConcat;\n } });\n Object.defineProperty(exports3, \"hexDataSlice\", { enumerable: true, get: function() {\n return bytes_1.hexDataSlice;\n } });\n Object.defineProperty(exports3, \"hexDataLength\", { enumerable: true, get: function() {\n return bytes_1.hexDataLength;\n } });\n Object.defineProperty(exports3, \"hexlify\", { enumerable: true, get: function() {\n return bytes_1.hexlify;\n } });\n Object.defineProperty(exports3, \"hexStripZeros\", { enumerable: true, get: function() {\n return bytes_1.hexStripZeros;\n } });\n Object.defineProperty(exports3, \"hexValue\", { enumerable: true, get: function() {\n return bytes_1.hexValue;\n } });\n Object.defineProperty(exports3, \"hexZeroPad\", { enumerable: true, get: function() {\n return bytes_1.hexZeroPad;\n } });\n Object.defineProperty(exports3, \"isBytes\", { enumerable: true, get: function() {\n return bytes_1.isBytes;\n } });\n Object.defineProperty(exports3, \"isBytesLike\", { enumerable: true, get: function() {\n return bytes_1.isBytesLike;\n } });\n Object.defineProperty(exports3, \"isHexString\", { enumerable: true, get: function() {\n return bytes_1.isHexString;\n } });\n Object.defineProperty(exports3, \"joinSignature\", { enumerable: true, get: function() {\n return bytes_1.joinSignature;\n } });\n Object.defineProperty(exports3, \"zeroPad\", { enumerable: true, get: function() {\n return bytes_1.zeroPad;\n } });\n Object.defineProperty(exports3, \"splitSignature\", { enumerable: true, get: function() {\n return bytes_1.splitSignature;\n } });\n Object.defineProperty(exports3, \"stripZeros\", { enumerable: true, get: function() {\n return bytes_1.stripZeros;\n } });\n var hash_1 = require_lib12();\n Object.defineProperty(exports3, \"_TypedDataEncoder\", { enumerable: true, get: function() {\n return hash_1._TypedDataEncoder;\n } });\n Object.defineProperty(exports3, \"dnsEncode\", { enumerable: true, get: function() {\n return hash_1.dnsEncode;\n } });\n Object.defineProperty(exports3, \"hashMessage\", { enumerable: true, get: function() {\n return hash_1.hashMessage;\n } });\n Object.defineProperty(exports3, \"id\", { enumerable: true, get: function() {\n return hash_1.id;\n } });\n Object.defineProperty(exports3, \"isValidName\", { enumerable: true, get: function() {\n return hash_1.isValidName;\n } });\n Object.defineProperty(exports3, \"namehash\", { enumerable: true, get: function() {\n return hash_1.namehash;\n } });\n var hdnode_1 = require_lib23();\n Object.defineProperty(exports3, \"defaultPath\", { enumerable: true, get: function() {\n return hdnode_1.defaultPath;\n } });\n Object.defineProperty(exports3, \"entropyToMnemonic\", { enumerable: true, get: function() {\n return hdnode_1.entropyToMnemonic;\n } });\n Object.defineProperty(exports3, \"getAccountPath\", { enumerable: true, get: function() {\n return hdnode_1.getAccountPath;\n } });\n Object.defineProperty(exports3, \"HDNode\", { enumerable: true, get: function() {\n return hdnode_1.HDNode;\n } });\n Object.defineProperty(exports3, \"isValidMnemonic\", { enumerable: true, get: function() {\n return hdnode_1.isValidMnemonic;\n } });\n Object.defineProperty(exports3, \"mnemonicToEntropy\", { enumerable: true, get: function() {\n return hdnode_1.mnemonicToEntropy;\n } });\n Object.defineProperty(exports3, \"mnemonicToSeed\", { enumerable: true, get: function() {\n return hdnode_1.mnemonicToSeed;\n } });\n var json_wallets_1 = require_lib25();\n Object.defineProperty(exports3, \"getJsonWalletAddress\", { enumerable: true, get: function() {\n return json_wallets_1.getJsonWalletAddress;\n } });\n var keccak256_1 = require_lib5();\n Object.defineProperty(exports3, \"keccak256\", { enumerable: true, get: function() {\n return keccak256_1.keccak256;\n } });\n var logger_1 = require_lib();\n Object.defineProperty(exports3, \"Logger\", { enumerable: true, get: function() {\n return logger_1.Logger;\n } });\n var sha2_1 = require_lib20();\n Object.defineProperty(exports3, \"computeHmac\", { enumerable: true, get: function() {\n return sha2_1.computeHmac;\n } });\n Object.defineProperty(exports3, \"ripemd160\", { enumerable: true, get: function() {\n return sha2_1.ripemd160;\n } });\n Object.defineProperty(exports3, \"sha256\", { enumerable: true, get: function() {\n return sha2_1.sha256;\n } });\n Object.defineProperty(exports3, \"sha512\", { enumerable: true, get: function() {\n return sha2_1.sha512;\n } });\n var solidity_1 = require_lib30();\n Object.defineProperty(exports3, \"solidityKeccak256\", { enumerable: true, get: function() {\n return solidity_1.keccak256;\n } });\n Object.defineProperty(exports3, \"solidityPack\", { enumerable: true, get: function() {\n return solidity_1.pack;\n } });\n Object.defineProperty(exports3, \"soliditySha256\", { enumerable: true, get: function() {\n return solidity_1.sha256;\n } });\n var random_1 = require_lib24();\n Object.defineProperty(exports3, \"randomBytes\", { enumerable: true, get: function() {\n return random_1.randomBytes;\n } });\n Object.defineProperty(exports3, \"shuffled\", { enumerable: true, get: function() {\n return random_1.shuffled;\n } });\n var properties_1 = require_lib4();\n Object.defineProperty(exports3, \"checkProperties\", { enumerable: true, get: function() {\n return properties_1.checkProperties;\n } });\n Object.defineProperty(exports3, \"deepCopy\", { enumerable: true, get: function() {\n return properties_1.deepCopy;\n } });\n Object.defineProperty(exports3, \"defineReadOnly\", { enumerable: true, get: function() {\n return properties_1.defineReadOnly;\n } });\n Object.defineProperty(exports3, \"getStatic\", { enumerable: true, get: function() {\n return properties_1.getStatic;\n } });\n Object.defineProperty(exports3, \"resolveProperties\", { enumerable: true, get: function() {\n return properties_1.resolveProperties;\n } });\n Object.defineProperty(exports3, \"shallowCopy\", { enumerable: true, get: function() {\n return properties_1.shallowCopy;\n } });\n var RLP = __importStar3(require_lib6());\n exports3.RLP = RLP;\n var signing_key_1 = require_lib16();\n Object.defineProperty(exports3, \"computePublicKey\", { enumerable: true, get: function() {\n return signing_key_1.computePublicKey;\n } });\n Object.defineProperty(exports3, \"recoverPublicKey\", { enumerable: true, get: function() {\n return signing_key_1.recoverPublicKey;\n } });\n Object.defineProperty(exports3, \"SigningKey\", { enumerable: true, get: function() {\n return signing_key_1.SigningKey;\n } });\n var strings_1 = require_lib9();\n Object.defineProperty(exports3, \"formatBytes32String\", { enumerable: true, get: function() {\n return strings_1.formatBytes32String;\n } });\n Object.defineProperty(exports3, \"nameprep\", { enumerable: true, get: function() {\n return strings_1.nameprep;\n } });\n Object.defineProperty(exports3, \"parseBytes32String\", { enumerable: true, get: function() {\n return strings_1.parseBytes32String;\n } });\n Object.defineProperty(exports3, \"_toEscapedUtf8String\", { enumerable: true, get: function() {\n return strings_1._toEscapedUtf8String;\n } });\n Object.defineProperty(exports3, \"toUtf8Bytes\", { enumerable: true, get: function() {\n return strings_1.toUtf8Bytes;\n } });\n Object.defineProperty(exports3, \"toUtf8CodePoints\", { enumerable: true, get: function() {\n return strings_1.toUtf8CodePoints;\n } });\n Object.defineProperty(exports3, \"toUtf8String\", { enumerable: true, get: function() {\n return strings_1.toUtf8String;\n } });\n Object.defineProperty(exports3, \"Utf8ErrorFuncs\", { enumerable: true, get: function() {\n return strings_1.Utf8ErrorFuncs;\n } });\n var transactions_1 = require_lib17();\n Object.defineProperty(exports3, \"accessListify\", { enumerable: true, get: function() {\n return transactions_1.accessListify;\n } });\n Object.defineProperty(exports3, \"computeAddress\", { enumerable: true, get: function() {\n return transactions_1.computeAddress;\n } });\n Object.defineProperty(exports3, \"parseTransaction\", { enumerable: true, get: function() {\n return transactions_1.parse;\n } });\n Object.defineProperty(exports3, \"recoverAddress\", { enumerable: true, get: function() {\n return transactions_1.recoverAddress;\n } });\n Object.defineProperty(exports3, \"serializeTransaction\", { enumerable: true, get: function() {\n return transactions_1.serialize;\n } });\n Object.defineProperty(exports3, \"TransactionTypes\", { enumerable: true, get: function() {\n return transactions_1.TransactionTypes;\n } });\n var units_1 = require_lib31();\n Object.defineProperty(exports3, \"commify\", { enumerable: true, get: function() {\n return units_1.commify;\n } });\n Object.defineProperty(exports3, \"formatEther\", { enumerable: true, get: function() {\n return units_1.formatEther;\n } });\n Object.defineProperty(exports3, \"parseEther\", { enumerable: true, get: function() {\n return units_1.parseEther;\n } });\n Object.defineProperty(exports3, \"formatUnits\", { enumerable: true, get: function() {\n return units_1.formatUnits;\n } });\n Object.defineProperty(exports3, \"parseUnits\", { enumerable: true, get: function() {\n return units_1.parseUnits;\n } });\n var wallet_1 = require_lib26();\n Object.defineProperty(exports3, \"verifyMessage\", { enumerable: true, get: function() {\n return wallet_1.verifyMessage;\n } });\n Object.defineProperty(exports3, \"verifyTypedData\", { enumerable: true, get: function() {\n return wallet_1.verifyTypedData;\n } });\n var web_1 = require_lib28();\n Object.defineProperty(exports3, \"_fetchData\", { enumerable: true, get: function() {\n return web_1._fetchData;\n } });\n Object.defineProperty(exports3, \"fetchJson\", { enumerable: true, get: function() {\n return web_1.fetchJson;\n } });\n Object.defineProperty(exports3, \"poll\", { enumerable: true, get: function() {\n return web_1.poll;\n } });\n var sha2_2 = require_lib20();\n Object.defineProperty(exports3, \"SupportedAlgorithm\", { enumerable: true, get: function() {\n return sha2_2.SupportedAlgorithm;\n } });\n var strings_2 = require_lib9();\n Object.defineProperty(exports3, \"UnicodeNormalizationForm\", { enumerable: true, get: function() {\n return strings_2.UnicodeNormalizationForm;\n } });\n Object.defineProperty(exports3, \"Utf8ErrorReason\", { enumerable: true, get: function() {\n return strings_2.Utf8ErrorReason;\n } });\n }\n });\n\n // ../../../node_modules/.pnpm/ethers@5.8.0_bufferutil@4.0.9_utf-8-validate@5.0.10/node_modules/ethers/lib/_version.js\n var require_version26 = __commonJS({\n \"../../../node_modules/.pnpm/ethers@5.8.0_bufferutil@4.0.9_utf-8-validate@5.0.10/node_modules/ethers/lib/_version.js\"(exports3) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n Object.defineProperty(exports3, \"__esModule\", { value: true });\n exports3.version = void 0;\n exports3.version = \"ethers/5.8.0\";\n }\n });\n\n // ../../../node_modules/.pnpm/ethers@5.8.0_bufferutil@4.0.9_utf-8-validate@5.0.10/node_modules/ethers/lib/ethers.js\n var require_ethers = __commonJS({\n \"../../../node_modules/.pnpm/ethers@5.8.0_bufferutil@4.0.9_utf-8-validate@5.0.10/node_modules/ethers/lib/ethers.js\"(exports3) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n var __createBinding3 = exports3 && exports3.__createBinding || (Object.create ? function(o5, m2, k4, k22) {\n if (k22 === void 0)\n k22 = k4;\n Object.defineProperty(o5, k22, { enumerable: true, get: function() {\n return m2[k4];\n } });\n } : function(o5, m2, k4, k22) {\n if (k22 === void 0)\n k22 = k4;\n o5[k22] = m2[k4];\n });\n var __setModuleDefault3 = exports3 && exports3.__setModuleDefault || (Object.create ? function(o5, v2) {\n Object.defineProperty(o5, \"default\", { enumerable: true, value: v2 });\n } : function(o5, v2) {\n o5[\"default\"] = v2;\n });\n var __importStar3 = exports3 && exports3.__importStar || function(mod3) {\n if (mod3 && mod3.__esModule)\n return mod3;\n var result = {};\n if (mod3 != null) {\n for (var k4 in mod3)\n if (k4 !== \"default\" && Object.prototype.hasOwnProperty.call(mod3, k4))\n __createBinding3(result, mod3, k4);\n }\n __setModuleDefault3(result, mod3);\n return result;\n };\n Object.defineProperty(exports3, \"__esModule\", { value: true });\n exports3.Wordlist = exports3.version = exports3.wordlists = exports3.utils = exports3.logger = exports3.errors = exports3.constants = exports3.FixedNumber = exports3.BigNumber = exports3.ContractFactory = exports3.Contract = exports3.BaseContract = exports3.providers = exports3.getDefaultProvider = exports3.VoidSigner = exports3.Wallet = exports3.Signer = void 0;\n var contracts_1 = require_lib18();\n Object.defineProperty(exports3, \"BaseContract\", { enumerable: true, get: function() {\n return contracts_1.BaseContract;\n } });\n Object.defineProperty(exports3, \"Contract\", { enumerable: true, get: function() {\n return contracts_1.Contract;\n } });\n Object.defineProperty(exports3, \"ContractFactory\", { enumerable: true, get: function() {\n return contracts_1.ContractFactory;\n } });\n var bignumber_1 = require_lib3();\n Object.defineProperty(exports3, \"BigNumber\", { enumerable: true, get: function() {\n return bignumber_1.BigNumber;\n } });\n Object.defineProperty(exports3, \"FixedNumber\", { enumerable: true, get: function() {\n return bignumber_1.FixedNumber;\n } });\n var abstract_signer_1 = require_lib15();\n Object.defineProperty(exports3, \"Signer\", { enumerable: true, get: function() {\n return abstract_signer_1.Signer;\n } });\n Object.defineProperty(exports3, \"VoidSigner\", { enumerable: true, get: function() {\n return abstract_signer_1.VoidSigner;\n } });\n var wallet_1 = require_lib26();\n Object.defineProperty(exports3, \"Wallet\", { enumerable: true, get: function() {\n return wallet_1.Wallet;\n } });\n var constants = __importStar3(require_lib8());\n exports3.constants = constants;\n var providers = __importStar3(require_lib29());\n exports3.providers = providers;\n var providers_1 = require_lib29();\n Object.defineProperty(exports3, \"getDefaultProvider\", { enumerable: true, get: function() {\n return providers_1.getDefaultProvider;\n } });\n var wordlists_1 = require_lib22();\n Object.defineProperty(exports3, \"Wordlist\", { enumerable: true, get: function() {\n return wordlists_1.Wordlist;\n } });\n Object.defineProperty(exports3, \"wordlists\", { enumerable: true, get: function() {\n return wordlists_1.wordlists;\n } });\n var utils = __importStar3(require_utils6());\n exports3.utils = utils;\n var logger_1 = require_lib();\n Object.defineProperty(exports3, \"errors\", { enumerable: true, get: function() {\n return logger_1.ErrorCode;\n } });\n var _version_1 = require_version26();\n Object.defineProperty(exports3, \"version\", { enumerable: true, get: function() {\n return _version_1.version;\n } });\n var logger = new logger_1.Logger(_version_1.version);\n exports3.logger = logger;\n }\n });\n\n // ../../../node_modules/.pnpm/ethers@5.8.0_bufferutil@4.0.9_utf-8-validate@5.0.10/node_modules/ethers/lib/index.js\n var require_lib32 = __commonJS({\n \"../../../node_modules/.pnpm/ethers@5.8.0_bufferutil@4.0.9_utf-8-validate@5.0.10/node_modules/ethers/lib/index.js\"(exports3) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n var __createBinding3 = exports3 && exports3.__createBinding || (Object.create ? function(o5, m2, k4, k22) {\n if (k22 === void 0)\n k22 = k4;\n Object.defineProperty(o5, k22, { enumerable: true, get: function() {\n return m2[k4];\n } });\n } : function(o5, m2, k4, k22) {\n if (k22 === void 0)\n k22 = k4;\n o5[k22] = m2[k4];\n });\n var __setModuleDefault3 = exports3 && exports3.__setModuleDefault || (Object.create ? function(o5, v2) {\n Object.defineProperty(o5, \"default\", { enumerable: true, value: v2 });\n } : function(o5, v2) {\n o5[\"default\"] = v2;\n });\n var __importStar3 = exports3 && exports3.__importStar || function(mod3) {\n if (mod3 && mod3.__esModule)\n return mod3;\n var result = {};\n if (mod3 != null) {\n for (var k4 in mod3)\n if (k4 !== \"default\" && Object.prototype.hasOwnProperty.call(mod3, k4))\n __createBinding3(result, mod3, k4);\n }\n __setModuleDefault3(result, mod3);\n return result;\n };\n Object.defineProperty(exports3, \"__esModule\", { value: true });\n exports3.Wordlist = exports3.version = exports3.wordlists = exports3.utils = exports3.logger = exports3.errors = exports3.constants = exports3.FixedNumber = exports3.BigNumber = exports3.ContractFactory = exports3.Contract = exports3.BaseContract = exports3.providers = exports3.getDefaultProvider = exports3.VoidSigner = exports3.Wallet = exports3.Signer = exports3.ethers = void 0;\n var ethers16 = __importStar3(require_ethers());\n exports3.ethers = ethers16;\n try {\n anyGlobal = window;\n if (anyGlobal._ethers == null) {\n anyGlobal._ethers = ethers16;\n }\n } catch (error) {\n }\n var anyGlobal;\n var ethers_1 = require_ethers();\n Object.defineProperty(exports3, \"Signer\", { enumerable: true, get: function() {\n return ethers_1.Signer;\n } });\n Object.defineProperty(exports3, \"Wallet\", { enumerable: true, get: function() {\n return ethers_1.Wallet;\n } });\n Object.defineProperty(exports3, \"VoidSigner\", { enumerable: true, get: function() {\n return ethers_1.VoidSigner;\n } });\n Object.defineProperty(exports3, \"getDefaultProvider\", { enumerable: true, get: function() {\n return ethers_1.getDefaultProvider;\n } });\n Object.defineProperty(exports3, \"providers\", { enumerable: true, get: function() {\n return ethers_1.providers;\n } });\n Object.defineProperty(exports3, \"BaseContract\", { enumerable: true, get: function() {\n return ethers_1.BaseContract;\n } });\n Object.defineProperty(exports3, \"Contract\", { enumerable: true, get: function() {\n return ethers_1.Contract;\n } });\n Object.defineProperty(exports3, \"ContractFactory\", { enumerable: true, get: function() {\n return ethers_1.ContractFactory;\n } });\n Object.defineProperty(exports3, \"BigNumber\", { enumerable: true, get: function() {\n return ethers_1.BigNumber;\n } });\n Object.defineProperty(exports3, \"FixedNumber\", { enumerable: true, get: function() {\n return ethers_1.FixedNumber;\n } });\n Object.defineProperty(exports3, \"constants\", { enumerable: true, get: function() {\n return ethers_1.constants;\n } });\n Object.defineProperty(exports3, \"errors\", { enumerable: true, get: function() {\n return ethers_1.errors;\n } });\n Object.defineProperty(exports3, \"logger\", { enumerable: true, get: function() {\n return ethers_1.logger;\n } });\n Object.defineProperty(exports3, \"utils\", { enumerable: true, get: function() {\n return ethers_1.utils;\n } });\n Object.defineProperty(exports3, \"wordlists\", { enumerable: true, get: function() {\n return ethers_1.wordlists;\n } });\n Object.defineProperty(exports3, \"version\", { enumerable: true, get: function() {\n return ethers_1.version;\n } });\n Object.defineProperty(exports3, \"Wordlist\", { enumerable: true, get: function() {\n return ethers_1.Wordlist;\n } });\n }\n });\n\n // ../../libs/ability-sdk/dist/src/lib/abilityCore/helpers/getMappedAbilityPolicyParams.js\n var require_getMappedAbilityPolicyParams = __commonJS({\n \"../../libs/ability-sdk/dist/src/lib/abilityCore/helpers/getMappedAbilityPolicyParams.js\"(exports3) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n Object.defineProperty(exports3, \"__esModule\", { value: true });\n exports3.getMappedAbilityPolicyParams = getMappedAbilityPolicyParams;\n function getMappedAbilityPolicyParams({ abilityParameterMappings, parsedAbilityParams }) {\n const mappedAbilityParams = {};\n for (const [abilityParamKey, policyParamKey] of Object.entries(abilityParameterMappings)) {\n if (!policyParamKey) {\n throw new Error(`Missing policy param key for ability param \"${abilityParamKey}\" (evaluateSupportedPolicies)`);\n }\n if (!(abilityParamKey in parsedAbilityParams)) {\n throw new Error(`Ability param \"${abilityParamKey}\" expected in abilityParams but was not provided`);\n }\n mappedAbilityParams[policyParamKey] = parsedAbilityParams[abilityParamKey];\n }\n return mappedAbilityParams;\n }\n }\n });\n\n // ../../libs/ability-sdk/dist/src/lib/abilityCore/helpers/getPkpInfo.js\n var require_getPkpInfo = __commonJS({\n \"../../libs/ability-sdk/dist/src/lib/abilityCore/helpers/getPkpInfo.js\"(exports3) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n Object.defineProperty(exports3, \"__esModule\", { value: true });\n exports3.getPkpInfo = void 0;\n var ethers_1 = require_lib32();\n var getPkpInfo = async ({ litPubkeyRouterAddress, yellowstoneRpcUrl, pkpEthAddress }) => {\n try {\n const PUBKEY_ROUTER_ABI = [\n \"function ethAddressToPkpId(address ethAddress) public view returns (uint256)\",\n \"function getPubkey(uint256 tokenId) public view returns (bytes memory)\"\n ];\n const pubkeyRouter = new ethers_1.ethers.Contract(litPubkeyRouterAddress, PUBKEY_ROUTER_ABI, new ethers_1.ethers.providers.StaticJsonRpcProvider(yellowstoneRpcUrl));\n const pkpTokenId = await pubkeyRouter.ethAddressToPkpId(pkpEthAddress);\n const publicKey = await pubkeyRouter.getPubkey(pkpTokenId);\n return {\n tokenId: pkpTokenId.toString(),\n ethAddress: pkpEthAddress,\n publicKey: publicKey.toString(\"hex\")\n };\n } catch (error) {\n throw new Error(`Error getting PKP info for PKP Eth Address: ${pkpEthAddress} using Lit Pubkey Router: ${litPubkeyRouterAddress} and Yellowstone RPC URL: ${yellowstoneRpcUrl}: ${error instanceof Error ? error.message : String(error)}`);\n }\n };\n exports3.getPkpInfo = getPkpInfo;\n }\n });\n\n // ../../libs/ability-sdk/dist/src/lib/abilityCore/helpers/supportedPoliciesForAbility.js\n var require_supportedPoliciesForAbility = __commonJS({\n \"../../libs/ability-sdk/dist/src/lib/abilityCore/helpers/supportedPoliciesForAbility.js\"(exports3) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n Object.defineProperty(exports3, \"__esModule\", { value: true });\n exports3.supportedPoliciesForAbility = supportedPoliciesForAbility2;\n var assertSupportedAbilityVersion_1 = require_assertSupportedAbilityVersion();\n function supportedPoliciesForAbility2(policies) {\n const policyByPackageName = {};\n const policyByIpfsCid = {};\n const cidToPackageName = /* @__PURE__ */ new Map();\n const packageNameToCid = /* @__PURE__ */ new Map();\n for (const policy of policies) {\n const { vincentAbilityApiVersion: vincentAbilityApiVersion2 } = policy;\n (0, assertSupportedAbilityVersion_1.assertSupportedAbilityVersion)(vincentAbilityApiVersion2);\n const pkg = policy.vincentPolicy.packageName;\n const cid = policy.ipfsCid;\n if (!pkg)\n throw new Error(\"Missing policy packageName\");\n if (pkg in policyByPackageName) {\n throw new Error(`Duplicate policy packageName: ${pkg}`);\n }\n policyByPackageName[pkg] = policy;\n policyByIpfsCid[cid] = policy;\n cidToPackageName.set(cid, pkg);\n packageNameToCid.set(pkg, cid);\n }\n return {\n policyByPackageName,\n policyByIpfsCid,\n cidToPackageName,\n packageNameToCid\n };\n }\n }\n });\n\n // ../../libs/ability-sdk/dist/src/lib/abilityCore/helpers/index.js\n var require_helpers2 = __commonJS({\n \"../../libs/ability-sdk/dist/src/lib/abilityCore/helpers/index.js\"(exports3) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n Object.defineProperty(exports3, \"__esModule\", { value: true });\n exports3.supportedPoliciesForAbility = exports3.getPkpInfo = exports3.getMappedAbilityPolicyParams = void 0;\n var getMappedAbilityPolicyParams_1 = require_getMappedAbilityPolicyParams();\n Object.defineProperty(exports3, \"getMappedAbilityPolicyParams\", { enumerable: true, get: function() {\n return getMappedAbilityPolicyParams_1.getMappedAbilityPolicyParams;\n } });\n var getPkpInfo_1 = require_getPkpInfo();\n Object.defineProperty(exports3, \"getPkpInfo\", { enumerable: true, get: function() {\n return getPkpInfo_1.getPkpInfo;\n } });\n var supportedPoliciesForAbility_1 = require_supportedPoliciesForAbility();\n Object.defineProperty(exports3, \"supportedPoliciesForAbility\", { enumerable: true, get: function() {\n return supportedPoliciesForAbility_1.supportedPoliciesForAbility;\n } });\n }\n });\n\n // ../../../node_modules/.pnpm/tslib@2.8.1/node_modules/tslib/tslib.es6.mjs\n var tslib_es6_exports = {};\n __export(tslib_es6_exports, {\n __addDisposableResource: () => __addDisposableResource,\n __assign: () => __assign,\n __asyncDelegator: () => __asyncDelegator,\n __asyncGenerator: () => __asyncGenerator,\n __asyncValues: () => __asyncValues,\n __await: () => __await,\n __awaiter: () => __awaiter,\n __classPrivateFieldGet: () => __classPrivateFieldGet,\n __classPrivateFieldIn: () => __classPrivateFieldIn,\n __classPrivateFieldSet: () => __classPrivateFieldSet,\n __createBinding: () => __createBinding,\n __decorate: () => __decorate,\n __disposeResources: () => __disposeResources,\n __esDecorate: () => __esDecorate,\n __exportStar: () => __exportStar,\n __extends: () => __extends,\n __generator: () => __generator,\n __importDefault: () => __importDefault,\n __importStar: () => __importStar,\n __makeTemplateObject: () => __makeTemplateObject,\n __metadata: () => __metadata,\n __param: () => __param,\n __propKey: () => __propKey,\n __read: () => __read,\n __rest: () => __rest,\n __rewriteRelativeImportExtension: () => __rewriteRelativeImportExtension,\n __runInitializers: () => __runInitializers,\n __setFunctionName: () => __setFunctionName,\n __spread: () => __spread,\n __spreadArray: () => __spreadArray,\n __spreadArrays: () => __spreadArrays,\n __values: () => __values,\n default: () => tslib_es6_default\n });\n function __extends(d5, b4) {\n if (typeof b4 !== \"function\" && b4 !== null)\n throw new TypeError(\"Class extends value \" + String(b4) + \" is not a constructor or null\");\n extendStatics(d5, b4);\n function __() {\n this.constructor = d5;\n }\n d5.prototype = b4 === null ? Object.create(b4) : (__.prototype = b4.prototype, new __());\n }\n function __rest(s4, e3) {\n var t3 = {};\n for (var p4 in s4)\n if (Object.prototype.hasOwnProperty.call(s4, p4) && e3.indexOf(p4) < 0)\n t3[p4] = s4[p4];\n if (s4 != null && typeof Object.getOwnPropertySymbols === \"function\")\n for (var i3 = 0, p4 = Object.getOwnPropertySymbols(s4); i3 < p4.length; i3++) {\n if (e3.indexOf(p4[i3]) < 0 && Object.prototype.propertyIsEnumerable.call(s4, p4[i3]))\n t3[p4[i3]] = s4[p4[i3]];\n }\n return t3;\n }\n function __decorate(decorators, target, key, desc) {\n var c4 = arguments.length, r2 = c4 < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d5;\n if (typeof Reflect === \"object\" && typeof Reflect.decorate === \"function\")\n r2 = Reflect.decorate(decorators, target, key, desc);\n else\n for (var i3 = decorators.length - 1; i3 >= 0; i3--)\n if (d5 = decorators[i3])\n r2 = (c4 < 3 ? d5(r2) : c4 > 3 ? d5(target, key, r2) : d5(target, key)) || r2;\n return c4 > 3 && r2 && Object.defineProperty(target, key, r2), r2;\n }\n function __param(paramIndex, decorator) {\n return function(target, key) {\n decorator(target, key, paramIndex);\n };\n }\n function __esDecorate(ctor, descriptorIn, decorators, contextIn, initializers, extraInitializers) {\n function accept(f6) {\n if (f6 !== void 0 && typeof f6 !== \"function\")\n throw new TypeError(\"Function expected\");\n return f6;\n }\n var kind = contextIn.kind, key = kind === \"getter\" ? \"get\" : kind === \"setter\" ? \"set\" : \"value\";\n var target = !descriptorIn && ctor ? contextIn[\"static\"] ? ctor : ctor.prototype : null;\n var descriptor = descriptorIn || (target ? Object.getOwnPropertyDescriptor(target, contextIn.name) : {});\n var _2, done = false;\n for (var i3 = decorators.length - 1; i3 >= 0; i3--) {\n var context2 = {};\n for (var p4 in contextIn)\n context2[p4] = p4 === \"access\" ? {} : contextIn[p4];\n for (var p4 in contextIn.access)\n context2.access[p4] = contextIn.access[p4];\n context2.addInitializer = function(f6) {\n if (done)\n throw new TypeError(\"Cannot add initializers after decoration has completed\");\n extraInitializers.push(accept(f6 || null));\n };\n var result = (0, decorators[i3])(kind === \"accessor\" ? { get: descriptor.get, set: descriptor.set } : descriptor[key], context2);\n if (kind === \"accessor\") {\n if (result === void 0)\n continue;\n if (result === null || typeof result !== \"object\")\n throw new TypeError(\"Object expected\");\n if (_2 = accept(result.get))\n descriptor.get = _2;\n if (_2 = accept(result.set))\n descriptor.set = _2;\n if (_2 = accept(result.init))\n initializers.unshift(_2);\n } else if (_2 = accept(result)) {\n if (kind === \"field\")\n initializers.unshift(_2);\n else\n descriptor[key] = _2;\n }\n }\n if (target)\n Object.defineProperty(target, contextIn.name, descriptor);\n done = true;\n }\n function __runInitializers(thisArg, initializers, value) {\n var useValue = arguments.length > 2;\n for (var i3 = 0; i3 < initializers.length; i3++) {\n value = useValue ? initializers[i3].call(thisArg, value) : initializers[i3].call(thisArg);\n }\n return useValue ? value : void 0;\n }\n function __propKey(x4) {\n return typeof x4 === \"symbol\" ? x4 : \"\".concat(x4);\n }\n function __setFunctionName(f6, name, prefix) {\n if (typeof name === \"symbol\")\n name = name.description ? \"[\".concat(name.description, \"]\") : \"\";\n return Object.defineProperty(f6, \"name\", { configurable: true, value: prefix ? \"\".concat(prefix, \" \", name) : name });\n }\n function __metadata(metadataKey, metadataValue) {\n if (typeof Reflect === \"object\" && typeof Reflect.metadata === \"function\")\n return Reflect.metadata(metadataKey, metadataValue);\n }\n function __awaiter(thisArg, _arguments, P2, generator) {\n function adopt(value) {\n return value instanceof P2 ? value : new P2(function(resolve) {\n resolve(value);\n });\n }\n return new (P2 || (P2 = Promise))(function(resolve, reject) {\n function fulfilled(value) {\n try {\n step(generator.next(value));\n } catch (e3) {\n reject(e3);\n }\n }\n function rejected(value) {\n try {\n step(generator[\"throw\"](value));\n } catch (e3) {\n reject(e3);\n }\n }\n function step(result) {\n result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected);\n }\n step((generator = generator.apply(thisArg, _arguments || [])).next());\n });\n }\n function __generator(thisArg, body) {\n var _2 = { label: 0, sent: function() {\n if (t3[0] & 1)\n throw t3[1];\n return t3[1];\n }, trys: [], ops: [] }, f6, y6, t3, g4 = Object.create((typeof Iterator === \"function\" ? Iterator : Object).prototype);\n return g4.next = verb(0), g4[\"throw\"] = verb(1), g4[\"return\"] = verb(2), typeof Symbol === \"function\" && (g4[Symbol.iterator] = function() {\n return this;\n }), g4;\n function verb(n2) {\n return function(v2) {\n return step([n2, v2]);\n };\n }\n function step(op) {\n if (f6)\n throw new TypeError(\"Generator is already executing.\");\n while (g4 && (g4 = 0, op[0] && (_2 = 0)), _2)\n try {\n if (f6 = 1, y6 && (t3 = op[0] & 2 ? y6[\"return\"] : op[0] ? y6[\"throw\"] || ((t3 = y6[\"return\"]) && t3.call(y6), 0) : y6.next) && !(t3 = t3.call(y6, op[1])).done)\n return t3;\n if (y6 = 0, t3)\n op = [op[0] & 2, t3.value];\n switch (op[0]) {\n case 0:\n case 1:\n t3 = op;\n break;\n case 4:\n _2.label++;\n return { value: op[1], done: false };\n case 5:\n _2.label++;\n y6 = op[1];\n op = [0];\n continue;\n case 7:\n op = _2.ops.pop();\n _2.trys.pop();\n continue;\n default:\n if (!(t3 = _2.trys, t3 = t3.length > 0 && t3[t3.length - 1]) && (op[0] === 6 || op[0] === 2)) {\n _2 = 0;\n continue;\n }\n if (op[0] === 3 && (!t3 || op[1] > t3[0] && op[1] < t3[3])) {\n _2.label = op[1];\n break;\n }\n if (op[0] === 6 && _2.label < t3[1]) {\n _2.label = t3[1];\n t3 = op;\n break;\n }\n if (t3 && _2.label < t3[2]) {\n _2.label = t3[2];\n _2.ops.push(op);\n break;\n }\n if (t3[2])\n _2.ops.pop();\n _2.trys.pop();\n continue;\n }\n op = body.call(thisArg, _2);\n } catch (e3) {\n op = [6, e3];\n y6 = 0;\n } finally {\n f6 = t3 = 0;\n }\n if (op[0] & 5)\n throw op[1];\n return { value: op[0] ? op[1] : void 0, done: true };\n }\n }\n function __exportStar(m2, o5) {\n for (var p4 in m2)\n if (p4 !== \"default\" && !Object.prototype.hasOwnProperty.call(o5, p4))\n __createBinding(o5, m2, p4);\n }\n function __values(o5) {\n var s4 = typeof Symbol === \"function\" && Symbol.iterator, m2 = s4 && o5[s4], i3 = 0;\n if (m2)\n return m2.call(o5);\n if (o5 && typeof o5.length === \"number\")\n return {\n next: function() {\n if (o5 && i3 >= o5.length)\n o5 = void 0;\n return { value: o5 && o5[i3++], done: !o5 };\n }\n };\n throw new TypeError(s4 ? \"Object is not iterable.\" : \"Symbol.iterator is not defined.\");\n }\n function __read(o5, n2) {\n var m2 = typeof Symbol === \"function\" && o5[Symbol.iterator];\n if (!m2)\n return o5;\n var i3 = m2.call(o5), r2, ar = [], e3;\n try {\n while ((n2 === void 0 || n2-- > 0) && !(r2 = i3.next()).done)\n ar.push(r2.value);\n } catch (error) {\n e3 = { error };\n } finally {\n try {\n if (r2 && !r2.done && (m2 = i3[\"return\"]))\n m2.call(i3);\n } finally {\n if (e3)\n throw e3.error;\n }\n }\n return ar;\n }\n function __spread() {\n for (var ar = [], i3 = 0; i3 < arguments.length; i3++)\n ar = ar.concat(__read(arguments[i3]));\n return ar;\n }\n function __spreadArrays() {\n for (var s4 = 0, i3 = 0, il = arguments.length; i3 < il; i3++)\n s4 += arguments[i3].length;\n for (var r2 = Array(s4), k4 = 0, i3 = 0; i3 < il; i3++)\n for (var a3 = arguments[i3], j2 = 0, jl = a3.length; j2 < jl; j2++, k4++)\n r2[k4] = a3[j2];\n return r2;\n }\n function __spreadArray(to, from14, pack) {\n if (pack || arguments.length === 2)\n for (var i3 = 0, l6 = from14.length, ar; i3 < l6; i3++) {\n if (ar || !(i3 in from14)) {\n if (!ar)\n ar = Array.prototype.slice.call(from14, 0, i3);\n ar[i3] = from14[i3];\n }\n }\n return to.concat(ar || Array.prototype.slice.call(from14));\n }\n function __await(v2) {\n return this instanceof __await ? (this.v = v2, this) : new __await(v2);\n }\n function __asyncGenerator(thisArg, _arguments, generator) {\n if (!Symbol.asyncIterator)\n throw new TypeError(\"Symbol.asyncIterator is not defined.\");\n var g4 = generator.apply(thisArg, _arguments || []), i3, q3 = [];\n return i3 = Object.create((typeof AsyncIterator === \"function\" ? AsyncIterator : Object).prototype), verb(\"next\"), verb(\"throw\"), verb(\"return\", awaitReturn), i3[Symbol.asyncIterator] = function() {\n return this;\n }, i3;\n function awaitReturn(f6) {\n return function(v2) {\n return Promise.resolve(v2).then(f6, reject);\n };\n }\n function verb(n2, f6) {\n if (g4[n2]) {\n i3[n2] = function(v2) {\n return new Promise(function(a3, b4) {\n q3.push([n2, v2, a3, b4]) > 1 || resume(n2, v2);\n });\n };\n if (f6)\n i3[n2] = f6(i3[n2]);\n }\n }\n function resume(n2, v2) {\n try {\n step(g4[n2](v2));\n } catch (e3) {\n settle(q3[0][3], e3);\n }\n }\n function step(r2) {\n r2.value instanceof __await ? Promise.resolve(r2.value.v).then(fulfill, reject) : settle(q3[0][2], r2);\n }\n function fulfill(value) {\n resume(\"next\", value);\n }\n function reject(value) {\n resume(\"throw\", value);\n }\n function settle(f6, v2) {\n if (f6(v2), q3.shift(), q3.length)\n resume(q3[0][0], q3[0][1]);\n }\n }\n function __asyncDelegator(o5) {\n var i3, p4;\n return i3 = {}, verb(\"next\"), verb(\"throw\", function(e3) {\n throw e3;\n }), verb(\"return\"), i3[Symbol.iterator] = function() {\n return this;\n }, i3;\n function verb(n2, f6) {\n i3[n2] = o5[n2] ? function(v2) {\n return (p4 = !p4) ? { value: __await(o5[n2](v2)), done: false } : f6 ? f6(v2) : v2;\n } : f6;\n }\n }\n function __asyncValues(o5) {\n if (!Symbol.asyncIterator)\n throw new TypeError(\"Symbol.asyncIterator is not defined.\");\n var m2 = o5[Symbol.asyncIterator], i3;\n return m2 ? m2.call(o5) : (o5 = typeof __values === \"function\" ? __values(o5) : o5[Symbol.iterator](), i3 = {}, verb(\"next\"), verb(\"throw\"), verb(\"return\"), i3[Symbol.asyncIterator] = function() {\n return this;\n }, i3);\n function verb(n2) {\n i3[n2] = o5[n2] && function(v2) {\n return new Promise(function(resolve, reject) {\n v2 = o5[n2](v2), settle(resolve, reject, v2.done, v2.value);\n });\n };\n }\n function settle(resolve, reject, d5, v2) {\n Promise.resolve(v2).then(function(v3) {\n resolve({ value: v3, done: d5 });\n }, reject);\n }\n }\n function __makeTemplateObject(cooked, raw) {\n if (Object.defineProperty) {\n Object.defineProperty(cooked, \"raw\", { value: raw });\n } else {\n cooked.raw = raw;\n }\n return cooked;\n }\n function __importStar(mod3) {\n if (mod3 && mod3.__esModule)\n return mod3;\n var result = {};\n if (mod3 != null) {\n for (var k4 = ownKeys(mod3), i3 = 0; i3 < k4.length; i3++)\n if (k4[i3] !== \"default\")\n __createBinding(result, mod3, k4[i3]);\n }\n __setModuleDefault(result, mod3);\n return result;\n }\n function __importDefault(mod3) {\n return mod3 && mod3.__esModule ? mod3 : { default: mod3 };\n }\n function __classPrivateFieldGet(receiver, state, kind, f6) {\n if (kind === \"a\" && !f6)\n throw new TypeError(\"Private accessor was defined without a getter\");\n if (typeof state === \"function\" ? receiver !== state || !f6 : !state.has(receiver))\n throw new TypeError(\"Cannot read private member from an object whose class did not declare it\");\n return kind === \"m\" ? f6 : kind === \"a\" ? f6.call(receiver) : f6 ? f6.value : state.get(receiver);\n }\n function __classPrivateFieldSet(receiver, state, value, kind, f6) {\n if (kind === \"m\")\n throw new TypeError(\"Private method is not writable\");\n if (kind === \"a\" && !f6)\n throw new TypeError(\"Private accessor was defined without a setter\");\n if (typeof state === \"function\" ? receiver !== state || !f6 : !state.has(receiver))\n throw new TypeError(\"Cannot write private member to an object whose class did not declare it\");\n return kind === \"a\" ? f6.call(receiver, value) : f6 ? f6.value = value : state.set(receiver, value), value;\n }\n function __classPrivateFieldIn(state, receiver) {\n if (receiver === null || typeof receiver !== \"object\" && typeof receiver !== \"function\")\n throw new TypeError(\"Cannot use 'in' operator on non-object\");\n return typeof state === \"function\" ? receiver === state : state.has(receiver);\n }\n function __addDisposableResource(env2, value, async) {\n if (value !== null && value !== void 0) {\n if (typeof value !== \"object\" && typeof value !== \"function\")\n throw new TypeError(\"Object expected.\");\n var dispose, inner;\n if (async) {\n if (!Symbol.asyncDispose)\n throw new TypeError(\"Symbol.asyncDispose is not defined.\");\n dispose = value[Symbol.asyncDispose];\n }\n if (dispose === void 0) {\n if (!Symbol.dispose)\n throw new TypeError(\"Symbol.dispose is not defined.\");\n dispose = value[Symbol.dispose];\n if (async)\n inner = dispose;\n }\n if (typeof dispose !== \"function\")\n throw new TypeError(\"Object not disposable.\");\n if (inner)\n dispose = function() {\n try {\n inner.call(this);\n } catch (e3) {\n return Promise.reject(e3);\n }\n };\n env2.stack.push({ value, dispose, async });\n } else if (async) {\n env2.stack.push({ async: true });\n }\n return value;\n }\n function __disposeResources(env2) {\n function fail(e3) {\n env2.error = env2.hasError ? new _SuppressedError(e3, env2.error, \"An error was suppressed during disposal.\") : e3;\n env2.hasError = true;\n }\n var r2, s4 = 0;\n function next() {\n while (r2 = env2.stack.pop()) {\n try {\n if (!r2.async && s4 === 1)\n return s4 = 0, env2.stack.push(r2), Promise.resolve().then(next);\n if (r2.dispose) {\n var result = r2.dispose.call(r2.value);\n if (r2.async)\n return s4 |= 2, Promise.resolve(result).then(next, function(e3) {\n fail(e3);\n return next();\n });\n } else\n s4 |= 1;\n } catch (e3) {\n fail(e3);\n }\n }\n if (s4 === 1)\n return env2.hasError ? Promise.reject(env2.error) : Promise.resolve();\n if (env2.hasError)\n throw env2.error;\n }\n return next();\n }\n function __rewriteRelativeImportExtension(path, preserveJsx) {\n if (typeof path === \"string\" && /^\\.\\.?\\//.test(path)) {\n return path.replace(/\\.(tsx)$|((?:\\.d)?)((?:\\.[^./]+?)?)\\.([cm]?)ts$/i, function(m2, tsx, d5, ext, cm) {\n return tsx ? preserveJsx ? \".jsx\" : \".js\" : d5 && (!ext || !cm) ? m2 : d5 + ext + \".\" + cm.toLowerCase() + \"js\";\n });\n }\n return path;\n }\n var extendStatics, __assign, __createBinding, __setModuleDefault, ownKeys, _SuppressedError, tslib_es6_default;\n var init_tslib_es6 = __esm({\n \"../../../node_modules/.pnpm/tslib@2.8.1/node_modules/tslib/tslib.es6.mjs\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n extendStatics = function(d5, b4) {\n extendStatics = Object.setPrototypeOf || { __proto__: [] } instanceof Array && function(d6, b5) {\n d6.__proto__ = b5;\n } || function(d6, b5) {\n for (var p4 in b5)\n if (Object.prototype.hasOwnProperty.call(b5, p4))\n d6[p4] = b5[p4];\n };\n return extendStatics(d5, b4);\n };\n __assign = function() {\n __assign = Object.assign || function __assign3(t3) {\n for (var s4, i3 = 1, n2 = arguments.length; i3 < n2; i3++) {\n s4 = arguments[i3];\n for (var p4 in s4)\n if (Object.prototype.hasOwnProperty.call(s4, p4))\n t3[p4] = s4[p4];\n }\n return t3;\n };\n return __assign.apply(this, arguments);\n };\n __createBinding = Object.create ? function(o5, m2, k4, k22) {\n if (k22 === void 0)\n k22 = k4;\n var desc = Object.getOwnPropertyDescriptor(m2, k4);\n if (!desc || (\"get\" in desc ? !m2.__esModule : desc.writable || desc.configurable)) {\n desc = { enumerable: true, get: function() {\n return m2[k4];\n } };\n }\n Object.defineProperty(o5, k22, desc);\n } : function(o5, m2, k4, k22) {\n if (k22 === void 0)\n k22 = k4;\n o5[k22] = m2[k4];\n };\n __setModuleDefault = Object.create ? function(o5, v2) {\n Object.defineProperty(o5, \"default\", { enumerable: true, value: v2 });\n } : function(o5, v2) {\n o5[\"default\"] = v2;\n };\n ownKeys = function(o5) {\n ownKeys = Object.getOwnPropertyNames || function(o6) {\n var ar = [];\n for (var k4 in o6)\n if (Object.prototype.hasOwnProperty.call(o6, k4))\n ar[ar.length] = k4;\n return ar;\n };\n return ownKeys(o5);\n };\n _SuppressedError = typeof SuppressedError === \"function\" ? SuppressedError : function(error, suppressed, message) {\n var e3 = new Error(message);\n return e3.name = \"SuppressedError\", e3.error = error, e3.suppressed = suppressed, e3;\n };\n tslib_es6_default = {\n __extends,\n __assign,\n __rest,\n __decorate,\n __param,\n __esDecorate,\n __runInitializers,\n __propKey,\n __setFunctionName,\n __metadata,\n __awaiter,\n __generator,\n __createBinding,\n __exportStar,\n __values,\n __read,\n __spread,\n __spreadArrays,\n __spreadArray,\n __await,\n __asyncGenerator,\n __asyncDelegator,\n __asyncValues,\n __makeTemplateObject,\n __importStar,\n __importDefault,\n __classPrivateFieldGet,\n __classPrivateFieldSet,\n __classPrivateFieldIn,\n __addDisposableResource,\n __disposeResources,\n __rewriteRelativeImportExtension\n };\n }\n });\n\n // ../../libs/contracts-sdk/dist/abis/VincentAppFacet.abi.json\n var require_VincentAppFacet_abi = __commonJS({\n \"../../libs/contracts-sdk/dist/abis/VincentAppFacet.abi.json\"(exports3, module) {\n module.exports = [\n {\n type: \"function\",\n name: \"addDelegatee\",\n inputs: [\n {\n name: \"appId\",\n type: \"uint40\",\n internalType: \"uint40\"\n },\n {\n name: \"delegatee\",\n type: \"address\",\n internalType: \"address\"\n }\n ],\n outputs: [],\n stateMutability: \"nonpayable\"\n },\n {\n type: \"function\",\n name: \"deleteApp\",\n inputs: [\n {\n name: \"appId\",\n type: \"uint40\",\n internalType: \"uint40\"\n }\n ],\n outputs: [],\n stateMutability: \"nonpayable\"\n },\n {\n type: \"function\",\n name: \"enableAppVersion\",\n inputs: [\n {\n name: \"appId\",\n type: \"uint40\",\n internalType: \"uint40\"\n },\n {\n name: \"appVersion\",\n type: \"uint24\",\n internalType: \"uint24\"\n },\n {\n name: \"enabled\",\n type: \"bool\",\n internalType: \"bool\"\n }\n ],\n outputs: [],\n stateMutability: \"nonpayable\"\n },\n {\n type: \"function\",\n name: \"registerApp\",\n inputs: [\n {\n name: \"appId\",\n type: \"uint40\",\n internalType: \"uint40\"\n },\n {\n name: \"delegatees\",\n type: \"address[]\",\n internalType: \"address[]\"\n },\n {\n name: \"versionAbilities\",\n type: \"tuple\",\n internalType: \"struct VincentAppFacet.AppVersionAbilities\",\n components: [\n {\n name: \"abilityIpfsCids\",\n type: \"string[]\",\n internalType: \"string[]\"\n },\n {\n name: \"abilityPolicies\",\n type: \"string[][]\",\n internalType: \"string[][]\"\n }\n ]\n }\n ],\n outputs: [\n {\n name: \"newAppVersion\",\n type: \"uint24\",\n internalType: \"uint24\"\n }\n ],\n stateMutability: \"nonpayable\"\n },\n {\n type: \"function\",\n name: \"registerNextAppVersion\",\n inputs: [\n {\n name: \"appId\",\n type: \"uint40\",\n internalType: \"uint40\"\n },\n {\n name: \"versionAbilities\",\n type: \"tuple\",\n internalType: \"struct VincentAppFacet.AppVersionAbilities\",\n components: [\n {\n name: \"abilityIpfsCids\",\n type: \"string[]\",\n internalType: \"string[]\"\n },\n {\n name: \"abilityPolicies\",\n type: \"string[][]\",\n internalType: \"string[][]\"\n }\n ]\n }\n ],\n outputs: [\n {\n name: \"newAppVersion\",\n type: \"uint24\",\n internalType: \"uint24\"\n }\n ],\n stateMutability: \"nonpayable\"\n },\n {\n type: \"function\",\n name: \"removeDelegatee\",\n inputs: [\n {\n name: \"appId\",\n type: \"uint40\",\n internalType: \"uint40\"\n },\n {\n name: \"delegatee\",\n type: \"address\",\n internalType: \"address\"\n }\n ],\n outputs: [],\n stateMutability: \"nonpayable\"\n },\n {\n type: \"function\",\n name: \"setDelegatee\",\n inputs: [\n {\n name: \"appId\",\n type: \"uint40\",\n internalType: \"uint40\"\n },\n {\n name: \"delegatees\",\n type: \"address[]\",\n internalType: \"address[]\"\n }\n ],\n outputs: [],\n stateMutability: \"nonpayable\"\n },\n {\n type: \"function\",\n name: \"undeleteApp\",\n inputs: [\n {\n name: \"appId\",\n type: \"uint40\",\n internalType: \"uint40\"\n }\n ],\n outputs: [],\n stateMutability: \"nonpayable\"\n },\n {\n type: \"event\",\n name: \"AppDeleted\",\n inputs: [\n {\n name: \"appId\",\n type: \"uint40\",\n indexed: true,\n internalType: \"uint40\"\n }\n ],\n anonymous: false\n },\n {\n type: \"event\",\n name: \"AppEnabled\",\n inputs: [\n {\n name: \"appId\",\n type: \"uint40\",\n indexed: true,\n internalType: \"uint40\"\n },\n {\n name: \"appVersion\",\n type: \"uint24\",\n indexed: true,\n internalType: \"uint24\"\n },\n {\n name: \"enabled\",\n type: \"bool\",\n indexed: true,\n internalType: \"bool\"\n }\n ],\n anonymous: false\n },\n {\n type: \"event\",\n name: \"AppUndeleted\",\n inputs: [\n {\n name: \"appId\",\n type: \"uint40\",\n indexed: true,\n internalType: \"uint40\"\n }\n ],\n anonymous: false\n },\n {\n type: \"event\",\n name: \"DelegateeAdded\",\n inputs: [\n {\n name: \"appId\",\n type: \"uint40\",\n indexed: true,\n internalType: \"uint40\"\n },\n {\n name: \"delegatee\",\n type: \"address\",\n indexed: true,\n internalType: \"address\"\n }\n ],\n anonymous: false\n },\n {\n type: \"event\",\n name: \"DelegateeRemoved\",\n inputs: [\n {\n name: \"appId\",\n type: \"uint40\",\n indexed: true,\n internalType: \"uint40\"\n },\n {\n name: \"delegatee\",\n type: \"address\",\n indexed: true,\n internalType: \"address\"\n }\n ],\n anonymous: false\n },\n {\n type: \"event\",\n name: \"NewAppRegistered\",\n inputs: [\n {\n name: \"appId\",\n type: \"uint40\",\n indexed: true,\n internalType: \"uint40\"\n },\n {\n name: \"manager\",\n type: \"address\",\n indexed: true,\n internalType: \"address\"\n }\n ],\n anonymous: false\n },\n {\n type: \"event\",\n name: \"NewAppVersionRegistered\",\n inputs: [\n {\n name: \"appId\",\n type: \"uint40\",\n indexed: true,\n internalType: \"uint40\"\n },\n {\n name: \"appVersion\",\n type: \"uint24\",\n indexed: true,\n internalType: \"uint24\"\n },\n {\n name: \"manager\",\n type: \"address\",\n indexed: true,\n internalType: \"address\"\n }\n ],\n anonymous: false\n },\n {\n type: \"event\",\n name: \"NewLitActionRegistered\",\n inputs: [\n {\n name: \"litActionIpfsCidHash\",\n type: \"bytes32\",\n indexed: true,\n internalType: \"bytes32\"\n }\n ],\n anonymous: false\n },\n {\n type: \"error\",\n name: \"AbilityArrayDimensionMismatch\",\n inputs: [\n {\n name: \"abilitiesLength\",\n type: \"uint256\",\n internalType: \"uint256\"\n },\n {\n name: \"policiesLength\",\n type: \"uint256\",\n internalType: \"uint256\"\n }\n ]\n },\n {\n type: \"error\",\n name: \"AppAlreadyDeleted\",\n inputs: [\n {\n name: \"appId\",\n type: \"uint40\",\n internalType: \"uint40\"\n }\n ]\n },\n {\n type: \"error\",\n name: \"AppAlreadyRegistered\",\n inputs: [\n {\n name: \"appId\",\n type: \"uint40\",\n internalType: \"uint40\"\n }\n ]\n },\n {\n type: \"error\",\n name: \"AppAlreadyUndeleted\",\n inputs: [\n {\n name: \"appId\",\n type: \"uint40\",\n internalType: \"uint40\"\n }\n ]\n },\n {\n type: \"error\",\n name: \"AppHasBeenDeleted\",\n inputs: [\n {\n name: \"appId\",\n type: \"uint40\",\n internalType: \"uint40\"\n }\n ]\n },\n {\n type: \"error\",\n name: \"AppNotRegistered\",\n inputs: [\n {\n name: \"appId\",\n type: \"uint40\",\n internalType: \"uint40\"\n }\n ]\n },\n {\n type: \"error\",\n name: \"AppVersionAlreadyInRequestedState\",\n inputs: [\n {\n name: \"appId\",\n type: \"uint40\",\n internalType: \"uint40\"\n },\n {\n name: \"appVersion\",\n type: \"uint24\",\n internalType: \"uint24\"\n },\n {\n name: \"enabled\",\n type: \"bool\",\n internalType: \"bool\"\n }\n ]\n },\n {\n type: \"error\",\n name: \"AppVersionNotEnabled\",\n inputs: [\n {\n name: \"appId\",\n type: \"uint40\",\n internalType: \"uint40\"\n },\n {\n name: \"appVersion\",\n type: \"uint24\",\n internalType: \"uint24\"\n }\n ]\n },\n {\n type: \"error\",\n name: \"AppVersionNotRegistered\",\n inputs: [\n {\n name: \"appId\",\n type: \"uint40\",\n internalType: \"uint40\"\n },\n {\n name: \"appVersion\",\n type: \"uint24\",\n internalType: \"uint24\"\n }\n ]\n },\n {\n type: \"error\",\n name: \"DelegateeAlreadyRegisteredToApp\",\n inputs: [\n {\n name: \"appId\",\n type: \"uint40\",\n internalType: \"uint40\"\n },\n {\n name: \"delegatee\",\n type: \"address\",\n internalType: \"address\"\n }\n ]\n },\n {\n type: \"error\",\n name: \"DelegateeNotRegisteredToApp\",\n inputs: [\n {\n name: \"appId\",\n type: \"uint40\",\n internalType: \"uint40\"\n },\n {\n name: \"delegatee\",\n type: \"address\",\n internalType: \"address\"\n }\n ]\n },\n {\n type: \"error\",\n name: \"DuplicateAbilityIpfsCidNotAllowed\",\n inputs: [\n {\n name: \"appId\",\n type: \"uint40\",\n internalType: \"uint40\"\n },\n {\n name: \"abilityIndex\",\n type: \"uint256\",\n internalType: \"uint256\"\n }\n ]\n },\n {\n type: \"error\",\n name: \"DuplicateAbilityPolicyIpfsCidNotAllowed\",\n inputs: [\n {\n name: \"appId\",\n type: \"uint40\",\n internalType: \"uint40\"\n },\n {\n name: \"abilityIndex\",\n type: \"uint256\",\n internalType: \"uint256\"\n },\n {\n name: \"policyIndex\",\n type: \"uint256\",\n internalType: \"uint256\"\n }\n ]\n },\n {\n type: \"error\",\n name: \"EmptyAbilityIpfsCidNotAllowed\",\n inputs: [\n {\n name: \"appId\",\n type: \"uint40\",\n internalType: \"uint40\"\n },\n {\n name: \"abilityIndex\",\n type: \"uint256\",\n internalType: \"uint256\"\n }\n ]\n },\n {\n type: \"error\",\n name: \"EmptyPolicyIpfsCidNotAllowed\",\n inputs: [\n {\n name: \"appId\",\n type: \"uint40\",\n internalType: \"uint40\"\n },\n {\n name: \"abilityIndex\",\n type: \"uint256\",\n internalType: \"uint256\"\n }\n ]\n },\n {\n type: \"error\",\n name: \"InvalidOffset\",\n inputs: [\n {\n name: \"offset\",\n type: \"uint256\",\n internalType: \"uint256\"\n },\n {\n name: \"totalCount\",\n type: \"uint256\",\n internalType: \"uint256\"\n }\n ]\n },\n {\n type: \"error\",\n name: \"NoAbilitiesProvided\",\n inputs: [\n {\n name: \"appId\",\n type: \"uint40\",\n internalType: \"uint40\"\n }\n ]\n },\n {\n type: \"error\",\n name: \"NotAppManager\",\n inputs: [\n {\n name: \"appId\",\n type: \"uint40\",\n internalType: \"uint40\"\n },\n {\n name: \"msgSender\",\n type: \"address\",\n internalType: \"address\"\n }\n ]\n },\n {\n type: \"error\",\n name: \"ZeroAddressDelegateeNotAllowed\",\n inputs: []\n },\n {\n type: \"error\",\n name: \"ZeroAppIdNotAllowed\",\n inputs: []\n }\n ];\n }\n });\n\n // ../../libs/contracts-sdk/dist/abis/VincentAppViewFacet.abi.json\n var require_VincentAppViewFacet_abi = __commonJS({\n \"../../libs/contracts-sdk/dist/abis/VincentAppViewFacet.abi.json\"(exports3, module) {\n module.exports = [\n {\n type: \"function\",\n name: \"APP_PAGE_SIZE\",\n inputs: [],\n outputs: [\n {\n name: \"\",\n type: \"uint256\",\n internalType: \"uint256\"\n }\n ],\n stateMutability: \"view\"\n },\n {\n type: \"function\",\n name: \"getAppByDelegatee\",\n inputs: [\n {\n name: \"delegatee\",\n type: \"address\",\n internalType: \"address\"\n }\n ],\n outputs: [\n {\n name: \"app\",\n type: \"tuple\",\n internalType: \"struct VincentAppViewFacet.App\",\n components: [\n {\n name: \"id\",\n type: \"uint40\",\n internalType: \"uint40\"\n },\n {\n name: \"isDeleted\",\n type: \"bool\",\n internalType: \"bool\"\n },\n {\n name: \"manager\",\n type: \"address\",\n internalType: \"address\"\n },\n {\n name: \"latestVersion\",\n type: \"uint24\",\n internalType: \"uint24\"\n },\n {\n name: \"delegatees\",\n type: \"address[]\",\n internalType: \"address[]\"\n }\n ]\n }\n ],\n stateMutability: \"view\"\n },\n {\n type: \"function\",\n name: \"getAppById\",\n inputs: [\n {\n name: \"appId\",\n type: \"uint40\",\n internalType: \"uint40\"\n }\n ],\n outputs: [\n {\n name: \"app\",\n type: \"tuple\",\n internalType: \"struct VincentAppViewFacet.App\",\n components: [\n {\n name: \"id\",\n type: \"uint40\",\n internalType: \"uint40\"\n },\n {\n name: \"isDeleted\",\n type: \"bool\",\n internalType: \"bool\"\n },\n {\n name: \"manager\",\n type: \"address\",\n internalType: \"address\"\n },\n {\n name: \"latestVersion\",\n type: \"uint24\",\n internalType: \"uint24\"\n },\n {\n name: \"delegatees\",\n type: \"address[]\",\n internalType: \"address[]\"\n }\n ]\n }\n ],\n stateMutability: \"view\"\n },\n {\n type: \"function\",\n name: \"getAppVersion\",\n inputs: [\n {\n name: \"appId\",\n type: \"uint40\",\n internalType: \"uint40\"\n },\n {\n name: \"version\",\n type: \"uint24\",\n internalType: \"uint24\"\n }\n ],\n outputs: [\n {\n name: \"appVersion\",\n type: \"tuple\",\n internalType: \"struct VincentAppViewFacet.AppVersion\",\n components: [\n {\n name: \"version\",\n type: \"uint24\",\n internalType: \"uint24\"\n },\n {\n name: \"enabled\",\n type: \"bool\",\n internalType: \"bool\"\n },\n {\n name: \"delegatedAgentPkpTokenIds\",\n type: \"uint256[]\",\n internalType: \"uint256[]\"\n },\n {\n name: \"abilities\",\n type: \"tuple[]\",\n internalType: \"struct VincentAppViewFacet.Ability[]\",\n components: [\n {\n name: \"abilityIpfsCid\",\n type: \"string\",\n internalType: \"string\"\n },\n {\n name: \"policyIpfsCids\",\n type: \"string[]\",\n internalType: \"string[]\"\n }\n ]\n }\n ]\n }\n ],\n stateMutability: \"view\"\n },\n {\n type: \"function\",\n name: \"getAppsByManager\",\n inputs: [\n {\n name: \"manager\",\n type: \"address\",\n internalType: \"address\"\n },\n {\n name: \"offset\",\n type: \"uint256\",\n internalType: \"uint256\"\n }\n ],\n outputs: [\n {\n name: \"appIds\",\n type: \"uint40[]\",\n internalType: \"uint40[]\"\n },\n {\n name: \"appVersionCounts\",\n type: \"uint24[]\",\n internalType: \"uint24[]\"\n }\n ],\n stateMutability: \"view\"\n },\n {\n type: \"function\",\n name: \"getDelegatedAgentPkpTokenIds\",\n inputs: [\n {\n name: \"appId\",\n type: \"uint40\",\n internalType: \"uint40\"\n },\n {\n name: \"version\",\n type: \"uint24\",\n internalType: \"uint24\"\n },\n {\n name: \"offset\",\n type: \"uint256\",\n internalType: \"uint256\"\n }\n ],\n outputs: [\n {\n name: \"delegatedAgentPkpTokenIds\",\n type: \"uint256[]\",\n internalType: \"uint256[]\"\n }\n ],\n stateMutability: \"view\"\n },\n {\n type: \"error\",\n name: \"AppHasBeenDeleted\",\n inputs: [\n {\n name: \"appId\",\n type: \"uint40\",\n internalType: \"uint40\"\n }\n ]\n },\n {\n type: \"error\",\n name: \"AppNotRegistered\",\n inputs: [\n {\n name: \"appId\",\n type: \"uint40\",\n internalType: \"uint40\"\n }\n ]\n },\n {\n type: \"error\",\n name: \"AppVersionNotEnabled\",\n inputs: [\n {\n name: \"appId\",\n type: \"uint40\",\n internalType: \"uint40\"\n },\n {\n name: \"appVersion\",\n type: \"uint24\",\n internalType: \"uint24\"\n }\n ]\n },\n {\n type: \"error\",\n name: \"AppVersionNotRegistered\",\n inputs: [\n {\n name: \"appId\",\n type: \"uint40\",\n internalType: \"uint40\"\n },\n {\n name: \"appVersion\",\n type: \"uint24\",\n internalType: \"uint24\"\n }\n ]\n },\n {\n type: \"error\",\n name: \"DelegateeNotRegistered\",\n inputs: [\n {\n name: \"delegatee\",\n type: \"address\",\n internalType: \"address\"\n }\n ]\n },\n {\n type: \"error\",\n name: \"InvalidOffset\",\n inputs: [\n {\n name: \"offset\",\n type: \"uint256\",\n internalType: \"uint256\"\n },\n {\n name: \"totalCount\",\n type: \"uint256\",\n internalType: \"uint256\"\n }\n ]\n },\n {\n type: \"error\",\n name: \"NoAppsFoundForManager\",\n inputs: [\n {\n name: \"manager\",\n type: \"address\",\n internalType: \"address\"\n }\n ]\n },\n {\n type: \"error\",\n name: \"NoDelegatedAgentPkpsFound\",\n inputs: [\n {\n name: \"appId\",\n type: \"uint40\",\n internalType: \"uint40\"\n },\n {\n name: \"version\",\n type: \"uint24\",\n internalType: \"uint24\"\n }\n ]\n },\n {\n type: \"error\",\n name: \"ZeroAddressNotAllowed\",\n inputs: []\n }\n ];\n }\n });\n\n // ../../libs/contracts-sdk/dist/abis/VincentUserFacet.abi.json\n var require_VincentUserFacet_abi = __commonJS({\n \"../../libs/contracts-sdk/dist/abis/VincentUserFacet.abi.json\"(exports3, module) {\n module.exports = [\n {\n type: \"function\",\n name: \"permitAppVersion\",\n inputs: [\n {\n name: \"pkpTokenId\",\n type: \"uint256\",\n internalType: \"uint256\"\n },\n {\n name: \"appId\",\n type: \"uint40\",\n internalType: \"uint40\"\n },\n {\n name: \"appVersion\",\n type: \"uint24\",\n internalType: \"uint24\"\n },\n {\n name: \"abilityIpfsCids\",\n type: \"string[]\",\n internalType: \"string[]\"\n },\n {\n name: \"policyIpfsCids\",\n type: \"string[][]\",\n internalType: \"string[][]\"\n },\n {\n name: \"policyParameterValues\",\n type: \"bytes[][]\",\n internalType: \"bytes[][]\"\n }\n ],\n outputs: [],\n stateMutability: \"nonpayable\"\n },\n {\n type: \"function\",\n name: \"rePermitApp\",\n inputs: [\n {\n name: \"pkpTokenId\",\n type: \"uint256\",\n internalType: \"uint256\"\n },\n {\n name: \"appId\",\n type: \"uint40\",\n internalType: \"uint40\"\n }\n ],\n outputs: [],\n stateMutability: \"nonpayable\"\n },\n {\n type: \"function\",\n name: \"setAbilityPolicyParameters\",\n inputs: [\n {\n name: \"pkpTokenId\",\n type: \"uint256\",\n internalType: \"uint256\"\n },\n {\n name: \"appId\",\n type: \"uint40\",\n internalType: \"uint40\"\n },\n {\n name: \"appVersion\",\n type: \"uint24\",\n internalType: \"uint24\"\n },\n {\n name: \"abilityIpfsCids\",\n type: \"string[]\",\n internalType: \"string[]\"\n },\n {\n name: \"policyIpfsCids\",\n type: \"string[][]\",\n internalType: \"string[][]\"\n },\n {\n name: \"policyParameterValues\",\n type: \"bytes[][]\",\n internalType: \"bytes[][]\"\n }\n ],\n outputs: [],\n stateMutability: \"nonpayable\"\n },\n {\n type: \"function\",\n name: \"unPermitAppVersion\",\n inputs: [\n {\n name: \"pkpTokenId\",\n type: \"uint256\",\n internalType: \"uint256\"\n },\n {\n name: \"appId\",\n type: \"uint40\",\n internalType: \"uint40\"\n },\n {\n name: \"appVersion\",\n type: \"uint24\",\n internalType: \"uint24\"\n }\n ],\n outputs: [],\n stateMutability: \"nonpayable\"\n },\n {\n type: \"event\",\n name: \"AbilityPolicyParametersSet\",\n inputs: [\n {\n name: \"pkpTokenId\",\n type: \"uint256\",\n indexed: true,\n internalType: \"uint256\"\n },\n {\n name: \"appId\",\n type: \"uint40\",\n indexed: true,\n internalType: \"uint40\"\n },\n {\n name: \"appVersion\",\n type: \"uint24\",\n indexed: true,\n internalType: \"uint24\"\n },\n {\n name: \"hashedAbilityIpfsCid\",\n type: \"bytes32\",\n indexed: false,\n internalType: \"bytes32\"\n },\n {\n name: \"hashedAbilityPolicyIpfsCid\",\n type: \"bytes32\",\n indexed: false,\n internalType: \"bytes32\"\n },\n {\n name: \"policyParameterValues\",\n type: \"bytes\",\n indexed: false,\n internalType: \"bytes\"\n }\n ],\n anonymous: false\n },\n {\n type: \"event\",\n name: \"AppVersionPermitted\",\n inputs: [\n {\n name: \"pkpTokenId\",\n type: \"uint256\",\n indexed: true,\n internalType: \"uint256\"\n },\n {\n name: \"appId\",\n type: \"uint40\",\n indexed: true,\n internalType: \"uint40\"\n },\n {\n name: \"appVersion\",\n type: \"uint24\",\n indexed: true,\n internalType: \"uint24\"\n }\n ],\n anonymous: false\n },\n {\n type: \"event\",\n name: \"AppVersionRePermitted\",\n inputs: [\n {\n name: \"pkpTokenId\",\n type: \"uint256\",\n indexed: true,\n internalType: \"uint256\"\n },\n {\n name: \"appId\",\n type: \"uint40\",\n indexed: true,\n internalType: \"uint40\"\n },\n {\n name: \"appVersion\",\n type: \"uint24\",\n indexed: true,\n internalType: \"uint24\"\n }\n ],\n anonymous: false\n },\n {\n type: \"event\",\n name: \"AppVersionUnPermitted\",\n inputs: [\n {\n name: \"pkpTokenId\",\n type: \"uint256\",\n indexed: true,\n internalType: \"uint256\"\n },\n {\n name: \"appId\",\n type: \"uint40\",\n indexed: true,\n internalType: \"uint40\"\n },\n {\n name: \"appVersion\",\n type: \"uint24\",\n indexed: true,\n internalType: \"uint24\"\n }\n ],\n anonymous: false\n },\n {\n type: \"event\",\n name: \"NewUserAgentPkpRegistered\",\n inputs: [\n {\n name: \"userAddress\",\n type: \"address\",\n indexed: true,\n internalType: \"address\"\n },\n {\n name: \"pkpTokenId\",\n type: \"uint256\",\n indexed: true,\n internalType: \"uint256\"\n }\n ],\n anonymous: false\n },\n {\n type: \"error\",\n name: \"AbilitiesAndPoliciesLengthMismatch\",\n inputs: []\n },\n {\n type: \"error\",\n name: \"AbilityNotRegisteredForAppVersion\",\n inputs: [\n {\n name: \"appId\",\n type: \"uint40\",\n internalType: \"uint40\"\n },\n {\n name: \"appVersion\",\n type: \"uint24\",\n internalType: \"uint24\"\n },\n {\n name: \"abilityIpfsCid\",\n type: \"string\",\n internalType: \"string\"\n }\n ]\n },\n {\n type: \"error\",\n name: \"AbilityPolicyNotRegisteredForAppVersion\",\n inputs: [\n {\n name: \"appId\",\n type: \"uint40\",\n internalType: \"uint40\"\n },\n {\n name: \"appVersion\",\n type: \"uint24\",\n internalType: \"uint24\"\n },\n {\n name: \"abilityIpfsCid\",\n type: \"string\",\n internalType: \"string\"\n },\n {\n name: \"abilityPolicyIpfsCid\",\n type: \"string\",\n internalType: \"string\"\n }\n ]\n },\n {\n type: \"error\",\n name: \"AppHasBeenDeleted\",\n inputs: [\n {\n name: \"appId\",\n type: \"uint40\",\n internalType: \"uint40\"\n }\n ]\n },\n {\n type: \"error\",\n name: \"AppNeverPermitted\",\n inputs: [\n {\n name: \"pkpTokenId\",\n type: \"uint256\",\n internalType: \"uint256\"\n },\n {\n name: \"appId\",\n type: \"uint40\",\n internalType: \"uint40\"\n },\n {\n name: \"appVersion\",\n type: \"uint24\",\n internalType: \"uint24\"\n }\n ]\n },\n {\n type: \"error\",\n name: \"AppNotRegistered\",\n inputs: [\n {\n name: \"appId\",\n type: \"uint40\",\n internalType: \"uint40\"\n }\n ]\n },\n {\n type: \"error\",\n name: \"AppVersionAlreadyPermitted\",\n inputs: [\n {\n name: \"pkpTokenId\",\n type: \"uint256\",\n internalType: \"uint256\"\n },\n {\n name: \"appId\",\n type: \"uint40\",\n internalType: \"uint40\"\n },\n {\n name: \"appVersion\",\n type: \"uint24\",\n internalType: \"uint24\"\n }\n ]\n },\n {\n type: \"error\",\n name: \"AppVersionNotEnabled\",\n inputs: [\n {\n name: \"appId\",\n type: \"uint40\",\n internalType: \"uint40\"\n },\n {\n name: \"appVersion\",\n type: \"uint24\",\n internalType: \"uint24\"\n }\n ]\n },\n {\n type: \"error\",\n name: \"AppVersionNotEnabled\",\n inputs: [\n {\n name: \"appId\",\n type: \"uint40\",\n internalType: \"uint40\"\n },\n {\n name: \"appVersion\",\n type: \"uint24\",\n internalType: \"uint24\"\n }\n ]\n },\n {\n type: \"error\",\n name: \"AppVersionNotPermitted\",\n inputs: [\n {\n name: \"pkpTokenId\",\n type: \"uint256\",\n internalType: \"uint256\"\n },\n {\n name: \"appId\",\n type: \"uint40\",\n internalType: \"uint40\"\n },\n {\n name: \"appVersion\",\n type: \"uint24\",\n internalType: \"uint24\"\n }\n ]\n },\n {\n type: \"error\",\n name: \"AppVersionNotRegistered\",\n inputs: [\n {\n name: \"appId\",\n type: \"uint40\",\n internalType: \"uint40\"\n },\n {\n name: \"appVersion\",\n type: \"uint24\",\n internalType: \"uint24\"\n }\n ]\n },\n {\n type: \"error\",\n name: \"DuplicateAbilityIpfsCid\",\n inputs: [\n {\n name: \"appId\",\n type: \"uint40\",\n internalType: \"uint40\"\n },\n {\n name: \"appVersion\",\n type: \"uint24\",\n internalType: \"uint24\"\n },\n {\n name: \"abilityIpfsCid\",\n type: \"string\",\n internalType: \"string\"\n }\n ]\n },\n {\n type: \"error\",\n name: \"DuplicateAbilityPolicyIpfsCid\",\n inputs: [\n {\n name: \"appId\",\n type: \"uint40\",\n internalType: \"uint40\"\n },\n {\n name: \"appVersion\",\n type: \"uint24\",\n internalType: \"uint24\"\n },\n {\n name: \"abilityIpfsCid\",\n type: \"string\",\n internalType: \"string\"\n },\n {\n name: \"abilityPolicyIpfsCid\",\n type: \"string\",\n internalType: \"string\"\n }\n ]\n },\n {\n type: \"error\",\n name: \"EmptyAbilityIpfsCid\",\n inputs: []\n },\n {\n type: \"error\",\n name: \"EmptyPolicyIpfsCid\",\n inputs: []\n },\n {\n type: \"error\",\n name: \"InvalidInput\",\n inputs: []\n },\n {\n type: \"error\",\n name: \"InvalidOffset\",\n inputs: [\n {\n name: \"offset\",\n type: \"uint256\",\n internalType: \"uint256\"\n },\n {\n name: \"totalCount\",\n type: \"uint256\",\n internalType: \"uint256\"\n }\n ]\n },\n {\n type: \"error\",\n name: \"NotAllRegisteredAbilitiesProvided\",\n inputs: [\n {\n name: \"appId\",\n type: \"uint40\",\n internalType: \"uint40\"\n },\n {\n name: \"appVersion\",\n type: \"uint24\",\n internalType: \"uint24\"\n }\n ]\n },\n {\n type: \"error\",\n name: \"NotPkpOwner\",\n inputs: [\n {\n name: \"pkpTokenId\",\n type: \"uint256\",\n internalType: \"uint256\"\n },\n {\n name: \"msgSender\",\n type: \"address\",\n internalType: \"address\"\n }\n ]\n },\n {\n type: \"error\",\n name: \"PkpTokenDoesNotExist\",\n inputs: [\n {\n name: \"pkpTokenId\",\n type: \"uint256\",\n internalType: \"uint256\"\n }\n ]\n },\n {\n type: \"error\",\n name: \"PolicyArrayLengthMismatch\",\n inputs: [\n {\n name: \"abilityIndex\",\n type: \"uint256\",\n internalType: \"uint256\"\n },\n {\n name: \"policiesLength\",\n type: \"uint256\",\n internalType: \"uint256\"\n },\n {\n name: \"paramValuesLength\",\n type: \"uint256\",\n internalType: \"uint256\"\n }\n ]\n },\n {\n type: \"error\",\n name: \"ZeroPkpTokenId\",\n inputs: []\n }\n ];\n }\n });\n\n // ../../libs/contracts-sdk/dist/abis/VincentUserViewFacet.abi.json\n var require_VincentUserViewFacet_abi = __commonJS({\n \"../../libs/contracts-sdk/dist/abis/VincentUserViewFacet.abi.json\"(exports3, module) {\n module.exports = [\n {\n type: \"function\",\n name: \"AGENT_PAGE_SIZE\",\n inputs: [],\n outputs: [\n {\n name: \"\",\n type: \"uint256\",\n internalType: \"uint256\"\n }\n ],\n stateMutability: \"view\"\n },\n {\n type: \"function\",\n name: \"getAllAbilitiesAndPoliciesForApp\",\n inputs: [\n {\n name: \"pkpTokenId\",\n type: \"uint256\",\n internalType: \"uint256\"\n },\n {\n name: \"appId\",\n type: \"uint40\",\n internalType: \"uint40\"\n }\n ],\n outputs: [\n {\n name: \"abilities\",\n type: \"tuple[]\",\n internalType: \"struct VincentUserViewFacet.AbilityWithPolicies[]\",\n components: [\n {\n name: \"abilityIpfsCid\",\n type: \"string\",\n internalType: \"string\"\n },\n {\n name: \"policies\",\n type: \"tuple[]\",\n internalType: \"struct VincentUserViewFacet.PolicyWithParameters[]\",\n components: [\n {\n name: \"policyIpfsCid\",\n type: \"string\",\n internalType: \"string\"\n },\n {\n name: \"policyParameterValues\",\n type: \"bytes\",\n internalType: \"bytes\"\n }\n ]\n }\n ]\n }\n ],\n stateMutability: \"view\"\n },\n {\n type: \"function\",\n name: \"getAllPermittedAppIdsForPkp\",\n inputs: [\n {\n name: \"pkpTokenId\",\n type: \"uint256\",\n internalType: \"uint256\"\n },\n {\n name: \"offset\",\n type: \"uint256\",\n internalType: \"uint256\"\n }\n ],\n outputs: [\n {\n name: \"\",\n type: \"uint40[]\",\n internalType: \"uint40[]\"\n }\n ],\n stateMutability: \"view\"\n },\n {\n type: \"function\",\n name: \"getAllRegisteredAgentPkps\",\n inputs: [\n {\n name: \"userAddress\",\n type: \"address\",\n internalType: \"address\"\n },\n {\n name: \"offset\",\n type: \"uint256\",\n internalType: \"uint256\"\n }\n ],\n outputs: [\n {\n name: \"\",\n type: \"uint256[]\",\n internalType: \"uint256[]\"\n }\n ],\n stateMutability: \"view\"\n },\n {\n type: \"function\",\n name: \"getLastPermittedAppVersionForPkp\",\n inputs: [\n {\n name: \"pkpTokenId\",\n type: \"uint256\",\n internalType: \"uint256\"\n },\n {\n name: \"appId\",\n type: \"uint40\",\n internalType: \"uint40\"\n }\n ],\n outputs: [\n {\n name: \"\",\n type: \"uint24\",\n internalType: \"uint24\"\n }\n ],\n stateMutability: \"view\"\n },\n {\n type: \"function\",\n name: \"getPermittedAppVersionForPkp\",\n inputs: [\n {\n name: \"pkpTokenId\",\n type: \"uint256\",\n internalType: \"uint256\"\n },\n {\n name: \"appId\",\n type: \"uint40\",\n internalType: \"uint40\"\n }\n ],\n outputs: [\n {\n name: \"\",\n type: \"uint24\",\n internalType: \"uint24\"\n }\n ],\n stateMutability: \"view\"\n },\n {\n type: \"function\",\n name: \"getPermittedAppsForPkps\",\n inputs: [\n {\n name: \"pkpTokenIds\",\n type: \"uint256[]\",\n internalType: \"uint256[]\"\n },\n {\n name: \"offset\",\n type: \"uint256\",\n internalType: \"uint256\"\n },\n {\n name: \"pageSize\",\n type: \"uint256\",\n internalType: \"uint256\"\n }\n ],\n outputs: [\n {\n name: \"results\",\n type: \"tuple[]\",\n internalType: \"struct VincentUserViewFacet.PkpPermittedApps[]\",\n components: [\n {\n name: \"pkpTokenId\",\n type: \"uint256\",\n internalType: \"uint256\"\n },\n {\n name: \"permittedApps\",\n type: \"tuple[]\",\n internalType: \"struct VincentUserViewFacet.PermittedApp[]\",\n components: [\n {\n name: \"appId\",\n type: \"uint40\",\n internalType: \"uint40\"\n },\n {\n name: \"version\",\n type: \"uint24\",\n internalType: \"uint24\"\n },\n {\n name: \"versionEnabled\",\n type: \"bool\",\n internalType: \"bool\"\n },\n {\n name: \"isDeleted\",\n type: \"bool\",\n internalType: \"bool\"\n }\n ]\n }\n ]\n }\n ],\n stateMutability: \"view\"\n },\n {\n type: \"function\",\n name: \"getUnpermittedAppsForPkps\",\n inputs: [\n {\n name: \"pkpTokenIds\",\n type: \"uint256[]\",\n internalType: \"uint256[]\"\n },\n {\n name: \"offset\",\n type: \"uint256\",\n internalType: \"uint256\"\n }\n ],\n outputs: [\n {\n name: \"results\",\n type: \"tuple[]\",\n internalType: \"struct VincentUserViewFacet.PkpUnpermittedApps[]\",\n components: [\n {\n name: \"pkpTokenId\",\n type: \"uint256\",\n internalType: \"uint256\"\n },\n {\n name: \"unpermittedApps\",\n type: \"tuple[]\",\n internalType: \"struct VincentUserViewFacet.UnpermittedApp[]\",\n components: [\n {\n name: \"appId\",\n type: \"uint40\",\n internalType: \"uint40\"\n },\n {\n name: \"previousPermittedVersion\",\n type: \"uint24\",\n internalType: \"uint24\"\n },\n {\n name: \"versionEnabled\",\n type: \"bool\",\n internalType: \"bool\"\n },\n {\n name: \"isDeleted\",\n type: \"bool\",\n internalType: \"bool\"\n }\n ]\n }\n ]\n }\n ],\n stateMutability: \"view\"\n },\n {\n type: \"function\",\n name: \"isDelegateePermitted\",\n inputs: [\n {\n name: \"delegatee\",\n type: \"address\",\n internalType: \"address\"\n },\n {\n name: \"pkpTokenId\",\n type: \"uint256\",\n internalType: \"uint256\"\n },\n {\n name: \"abilityIpfsCid\",\n type: \"string\",\n internalType: \"string\"\n }\n ],\n outputs: [\n {\n name: \"isPermitted\",\n type: \"bool\",\n internalType: \"bool\"\n }\n ],\n stateMutability: \"view\"\n },\n {\n type: \"function\",\n name: \"validateAbilityExecutionAndGetPolicies\",\n inputs: [\n {\n name: \"delegatee\",\n type: \"address\",\n internalType: \"address\"\n },\n {\n name: \"pkpTokenId\",\n type: \"uint256\",\n internalType: \"uint256\"\n },\n {\n name: \"abilityIpfsCid\",\n type: \"string\",\n internalType: \"string\"\n }\n ],\n outputs: [\n {\n name: \"validation\",\n type: \"tuple\",\n internalType: \"struct VincentUserViewFacet.AbilityExecutionValidation\",\n components: [\n {\n name: \"isPermitted\",\n type: \"bool\",\n internalType: \"bool\"\n },\n {\n name: \"appId\",\n type: \"uint40\",\n internalType: \"uint40\"\n },\n {\n name: \"appVersion\",\n type: \"uint24\",\n internalType: \"uint24\"\n },\n {\n name: \"policies\",\n type: \"tuple[]\",\n internalType: \"struct VincentUserViewFacet.PolicyWithParameters[]\",\n components: [\n {\n name: \"policyIpfsCid\",\n type: \"string\",\n internalType: \"string\"\n },\n {\n name: \"policyParameterValues\",\n type: \"bytes\",\n internalType: \"bytes\"\n }\n ]\n }\n ]\n }\n ],\n stateMutability: \"view\"\n },\n {\n type: \"error\",\n name: \"AppHasBeenDeleted\",\n inputs: [\n {\n name: \"appId\",\n type: \"uint40\",\n internalType: \"uint40\"\n }\n ]\n },\n {\n type: \"error\",\n name: \"AppNotRegistered\",\n inputs: [\n {\n name: \"appId\",\n type: \"uint40\",\n internalType: \"uint40\"\n }\n ]\n },\n {\n type: \"error\",\n name: \"AppVersionNotEnabled\",\n inputs: [\n {\n name: \"appId\",\n type: \"uint40\",\n internalType: \"uint40\"\n },\n {\n name: \"appVersion\",\n type: \"uint24\",\n internalType: \"uint24\"\n }\n ]\n },\n {\n type: \"error\",\n name: \"AppVersionNotRegistered\",\n inputs: [\n {\n name: \"appId\",\n type: \"uint40\",\n internalType: \"uint40\"\n },\n {\n name: \"appVersion\",\n type: \"uint24\",\n internalType: \"uint24\"\n }\n ]\n },\n {\n type: \"error\",\n name: \"DelegateeNotAssociatedWithApp\",\n inputs: [\n {\n name: \"delegatee\",\n type: \"address\",\n internalType: \"address\"\n }\n ]\n },\n {\n type: \"error\",\n name: \"EmptyAbilityIpfsCid\",\n inputs: []\n },\n {\n type: \"error\",\n name: \"InvalidAppId\",\n inputs: []\n },\n {\n type: \"error\",\n name: \"InvalidOffset\",\n inputs: [\n {\n name: \"offset\",\n type: \"uint256\",\n internalType: \"uint256\"\n },\n {\n name: \"totalCount\",\n type: \"uint256\",\n internalType: \"uint256\"\n }\n ]\n },\n {\n type: \"error\",\n name: \"InvalidPkpTokenId\",\n inputs: []\n },\n {\n type: \"error\",\n name: \"NoRegisteredPkpsFound\",\n inputs: [\n {\n name: \"userAddress\",\n type: \"address\",\n internalType: \"address\"\n }\n ]\n },\n {\n type: \"error\",\n name: \"PkpNotPermittedForAppVersion\",\n inputs: [\n {\n name: \"pkpTokenId\",\n type: \"uint256\",\n internalType: \"uint256\"\n },\n {\n name: \"appId\",\n type: \"uint40\",\n internalType: \"uint40\"\n },\n {\n name: \"appVersion\",\n type: \"uint24\",\n internalType: \"uint24\"\n }\n ]\n },\n {\n type: \"error\",\n name: \"PolicyParameterNotSetForPkp\",\n inputs: [\n {\n name: \"pkpTokenId\",\n type: \"uint256\",\n internalType: \"uint256\"\n },\n {\n name: \"appId\",\n type: \"uint40\",\n internalType: \"uint40\"\n },\n {\n name: \"appVersion\",\n type: \"uint24\",\n internalType: \"uint24\"\n },\n {\n name: \"policyIpfsCid\",\n type: \"string\",\n internalType: \"string\"\n },\n {\n name: \"parameterName\",\n type: \"string\",\n internalType: \"string\"\n }\n ]\n },\n {\n type: \"error\",\n name: \"ZeroAddressNotAllowed\",\n inputs: []\n }\n ];\n }\n });\n\n // ../../libs/contracts-sdk/dist/src/buildDiamondInterface.js\n var require_buildDiamondInterface = __commonJS({\n \"../../libs/contracts-sdk/dist/src/buildDiamondInterface.js\"(exports3) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n Object.defineProperty(exports3, \"__esModule\", { value: true });\n exports3.buildDiamondInterface = buildDiamondInterface;\n var utils_1 = require_utils6();\n function dedupeAbiFragments(abis) {\n const seen = /* @__PURE__ */ new Set();\n const deduped = [];\n for (const entry of abis) {\n try {\n const fragment = utils_1.Fragment.from(entry);\n const signature = fragment.format();\n if (!seen.has(signature)) {\n seen.add(signature);\n const jsonFragment = typeof entry === \"string\" ? JSON.parse(fragment.format(\"json\")) : entry;\n deduped.push(jsonFragment);\n }\n } catch {\n const fallbackKey = typeof entry === \"string\" ? entry : JSON.stringify(entry);\n if (!seen.has(fallbackKey)) {\n seen.add(fallbackKey);\n deduped.push(entry);\n }\n }\n }\n return deduped;\n }\n function buildDiamondInterface(facets) {\n const flattened = facets.flat();\n const deduped = dedupeAbiFragments(flattened);\n return new utils_1.Interface(deduped);\n }\n }\n });\n\n // ../../libs/contracts-sdk/dist/src/constants.js\n var require_constants3 = __commonJS({\n \"../../libs/contracts-sdk/dist/src/constants.js\"(exports3) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n Object.defineProperty(exports3, \"__esModule\", { value: true });\n exports3.DEFAULT_PAGE_SIZE = exports3.GAS_ADJUSTMENT_PERCENT = exports3.COMBINED_ABI = exports3.VINCENT_DIAMOND_CONTRACT_ADDRESS_PROD = exports3.VINCENT_DIAMOND_CONTRACT_ADDRESS_DEV = void 0;\n var tslib_1 = (init_tslib_es6(), __toCommonJS(tslib_es6_exports));\n var VincentAppFacet_abi_json_1 = tslib_1.__importDefault(require_VincentAppFacet_abi());\n var VincentAppViewFacet_abi_json_1 = tslib_1.__importDefault(require_VincentAppViewFacet_abi());\n var VincentUserFacet_abi_json_1 = tslib_1.__importDefault(require_VincentUserFacet_abi());\n var VincentUserViewFacet_abi_json_1 = tslib_1.__importDefault(require_VincentUserViewFacet_abi());\n var buildDiamondInterface_1 = require_buildDiamondInterface();\n exports3.VINCENT_DIAMOND_CONTRACT_ADDRESS_DEV = \"0x57f75581e0c9e51594C8080EcC833A3592A50df8\";\n exports3.VINCENT_DIAMOND_CONTRACT_ADDRESS_PROD = \"0xa3a602F399E9663279cdF63a290101cB6560A87e\";\n exports3.COMBINED_ABI = (0, buildDiamondInterface_1.buildDiamondInterface)([\n VincentAppFacet_abi_json_1.default,\n VincentAppViewFacet_abi_json_1.default,\n VincentUserFacet_abi_json_1.default,\n VincentUserViewFacet_abi_json_1.default\n ]);\n exports3.GAS_ADJUSTMENT_PERCENT = 120;\n exports3.DEFAULT_PAGE_SIZE = \"50\";\n }\n });\n\n // ../../libs/contracts-sdk/dist/src/utils.js\n var require_utils7 = __commonJS({\n \"../../libs/contracts-sdk/dist/src/utils.js\"(exports3) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n Object.defineProperty(exports3, \"__esModule\", { value: true });\n exports3.createContract = createContract;\n exports3.findEventByName = findEventByName;\n exports3.gasAdjustedOverrides = gasAdjustedOverrides;\n exports3.decodeContractError = decodeContractError;\n var ethers_1 = require_lib32();\n var constants_1 = require_constants3();\n function createContract({ signer, contractAddress }) {\n return new ethers_1.Contract(contractAddress, constants_1.COMBINED_ABI, signer);\n }\n function findEventByName(contract, logs, eventName) {\n return logs.find((log) => {\n try {\n const parsed = contract.interface.parseLog(log);\n return parsed?.name === eventName;\n } catch {\n return false;\n }\n });\n }\n async function gasAdjustedOverrides(contract, methodName, args, overrides = {}) {\n if (!overrides?.gasLimit) {\n const estimatedGas = await contract.estimateGas[methodName](...args, overrides);\n console.log(\"Auto estimatedGas: \", estimatedGas);\n return {\n ...overrides,\n gasLimit: estimatedGas.mul(constants_1.GAS_ADJUSTMENT_PERCENT).div(100)\n };\n }\n return overrides;\n }\n function isBigNumberOrBigInt(arg) {\n return typeof arg === \"bigint\" || ethers_1.BigNumber.isBigNumber(arg);\n }\n function decodeContractError(error, contract) {\n try {\n if (error.code === \"CALL_EXCEPTION\" || error.code === \"UNPREDICTABLE_GAS_LIMIT\") {\n let errorData = error.data;\n if (!errorData && error.error && error.error.data) {\n errorData = error.error.data;\n }\n if (!errorData && error.error && error.error.body) {\n try {\n const body = JSON.parse(error.error.body);\n if (body.error && body.error.data) {\n errorData = body.error.data;\n }\n } catch {\n }\n }\n if (errorData) {\n try {\n const decodedError = contract.interface.parseError(errorData);\n if (decodedError) {\n const formattedArgs = decodedError.args.map((arg) => {\n if (isBigNumberOrBigInt(arg)) {\n return arg.toString();\n }\n return arg;\n });\n return `Contract Error: ${decodedError.name} - ${JSON.stringify(formattedArgs)}`;\n }\n } catch {\n if (error.reason) {\n return `Contract Error: ${error.reason}`;\n }\n }\n }\n if (error.reason) {\n return `Contract Error: ${error.reason}`;\n }\n }\n if (error.transaction) {\n try {\n const decodedError = contract.interface.parseError(error.data);\n if (decodedError) {\n const formattedArgs = decodedError.args.map((arg) => {\n if (isBigNumberOrBigInt(arg)) {\n return arg.toString();\n }\n return arg;\n });\n return `Transaction Error: ${decodedError.name} - ${JSON.stringify(formattedArgs)}`;\n }\n } catch {\n }\n }\n if (error.code === \"UNPREDICTABLE_GAS_LIMIT\") {\n let errorData = error.data;\n if (!errorData && error.error && error.error.data) {\n errorData = error.error.data;\n }\n if (!errorData && error.error && error.error.body) {\n try {\n const body = JSON.parse(error.error.body);\n if (body.error && body.error.data) {\n errorData = body.error.data;\n }\n } catch {\n }\n }\n if (errorData) {\n try {\n const decodedError = contract.interface.parseError(errorData);\n if (decodedError) {\n const formattedArgs = decodedError.args.map((arg) => {\n if (isBigNumberOrBigInt(arg)) {\n return arg.toString();\n }\n return arg;\n });\n return `Gas Estimation Error: ${decodedError.name} - ${JSON.stringify(formattedArgs)}`;\n }\n } catch {\n return `Gas Estimation Error: ${error.error?.message || error.message}`;\n }\n }\n return `Gas Estimation Error: ${error.error?.message || error.message}`;\n }\n if (error.errorArgs && Array.isArray(error.errorArgs)) {\n return `Contract Error: ${error.errorSignature || \"Unknown\"} - ${JSON.stringify(error.errorArgs)}`;\n }\n return error.message || \"Unknown contract error\";\n } catch {\n return error.message || \"Unknown error\";\n }\n }\n }\n });\n\n // ../../libs/contracts-sdk/dist/src/internal/app/App.js\n var require_App = __commonJS({\n \"../../libs/contracts-sdk/dist/src/internal/app/App.js\"(exports3) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n Object.defineProperty(exports3, \"__esModule\", { value: true });\n exports3.registerApp = registerApp;\n exports3.registerNextVersion = registerNextVersion;\n exports3.enableAppVersion = enableAppVersion;\n exports3.addDelegatee = addDelegatee;\n exports3.removeDelegatee = removeDelegatee;\n exports3.setDelegatee = setDelegatee;\n exports3.deleteApp = deleteApp;\n exports3.undeleteApp = undeleteApp;\n var utils_1 = require_utils7();\n async function registerApp(params) {\n const { contract, args: { appId, delegateeAddresses, versionAbilities }, overrides } = params;\n try {\n const adjustedOverrides = await (0, utils_1.gasAdjustedOverrides)(contract, \"registerApp\", [appId, delegateeAddresses, versionAbilities], overrides);\n const tx = await contract.registerApp(appId, delegateeAddresses, versionAbilities, {\n ...adjustedOverrides\n });\n await tx.wait();\n return {\n txHash: tx.hash\n };\n } catch (error) {\n const decodedError = (0, utils_1.decodeContractError)(error, contract);\n throw new Error(`Failed to Register App: ${decodedError}`);\n }\n }\n async function registerNextVersion(params) {\n const { contract, args: { appId, versionAbilities }, overrides } = params;\n try {\n const adjustedOverrides = await (0, utils_1.gasAdjustedOverrides)(contract, \"registerNextAppVersion\", [appId, versionAbilities], overrides);\n const tx = await contract.registerNextAppVersion(appId, versionAbilities, {\n ...adjustedOverrides\n });\n const receipt = await tx.wait();\n const event = (0, utils_1.findEventByName)(contract, receipt.logs, \"NewAppVersionRegistered\");\n if (!event) {\n throw new Error(\"NewAppVersionRegistered event not found\");\n }\n const newAppVersion = contract.interface.parseLog(event)?.args?.appVersion;\n if (!newAppVersion) {\n throw new Error(\"NewAppVersionRegistered event does not contain appVersion argument\");\n }\n return {\n txHash: tx.hash,\n newAppVersion\n };\n } catch (error) {\n const decodedError = (0, utils_1.decodeContractError)(error, contract);\n throw new Error(`Failed to Register Next Version: ${decodedError}`);\n }\n }\n async function enableAppVersion(params) {\n const { contract, args: { appId, appVersion, enabled }, overrides } = params;\n try {\n const adjustedOverrides = await (0, utils_1.gasAdjustedOverrides)(contract, \"enableAppVersion\", [appId, appVersion, enabled], overrides);\n const tx = await contract.enableAppVersion(appId, appVersion, enabled, {\n ...adjustedOverrides\n });\n await tx.wait();\n return {\n txHash: tx.hash\n };\n } catch (error) {\n const decodedError = (0, utils_1.decodeContractError)(error, contract);\n throw new Error(`Failed to Enable App Version: ${decodedError}`);\n }\n }\n async function addDelegatee(params) {\n const { contract, args: { appId, delegateeAddress }, overrides } = params;\n try {\n const adjustedOverrides = await (0, utils_1.gasAdjustedOverrides)(contract, \"addDelegatee\", [appId, delegateeAddress], overrides);\n const tx = await contract.addDelegatee(appId, delegateeAddress, {\n ...adjustedOverrides\n });\n await tx.wait();\n return {\n txHash: tx.hash\n };\n } catch (error) {\n const decodedError = (0, utils_1.decodeContractError)(error, contract);\n throw new Error(`Failed to Add Delegatee: ${decodedError}`);\n }\n }\n async function removeDelegatee(params) {\n const { contract, args: { appId, delegateeAddress }, overrides } = params;\n try {\n const adjustedOverrides = await (0, utils_1.gasAdjustedOverrides)(contract, \"removeDelegatee\", [appId, delegateeAddress], overrides);\n const tx = await contract.removeDelegatee(appId, delegateeAddress, {\n ...adjustedOverrides\n });\n await tx.wait();\n return {\n txHash: tx.hash\n };\n } catch (error) {\n const decodedError = (0, utils_1.decodeContractError)(error, contract);\n throw new Error(`Failed to Remove Delegatee: ${decodedError}`);\n }\n }\n async function setDelegatee(params) {\n const { contract, args: { appId, delegateeAddresses }, overrides } = params;\n try {\n const adjustedOverrides = await (0, utils_1.gasAdjustedOverrides)(contract, \"setDelegatee\", [appId, delegateeAddresses], overrides);\n const tx = await contract.setDelegatee(appId, delegateeAddresses, {\n ...adjustedOverrides\n });\n await tx.wait();\n return {\n txHash: tx.hash\n };\n } catch (error) {\n const decodedError = (0, utils_1.decodeContractError)(error, contract);\n throw new Error(`Failed to Set Delegatee: ${decodedError}`);\n }\n }\n async function deleteApp(params) {\n const { contract, args: { appId }, overrides } = params;\n try {\n const adjustedOverrides = await (0, utils_1.gasAdjustedOverrides)(contract, \"deleteApp\", [appId], overrides);\n const tx = await contract.deleteApp(appId, {\n ...adjustedOverrides\n });\n await tx.wait();\n return {\n txHash: tx.hash\n };\n } catch (error) {\n const decodedError = (0, utils_1.decodeContractError)(error, contract);\n throw new Error(`Failed to Delete App: ${decodedError}`);\n }\n }\n async function undeleteApp(params) {\n const { contract, args: { appId }, overrides } = params;\n try {\n const adjustedOverrides = await (0, utils_1.gasAdjustedOverrides)(contract, \"undeleteApp\", [appId], overrides);\n const tx = await contract.undeleteApp(appId, {\n ...adjustedOverrides\n });\n await tx.wait();\n return {\n txHash: tx.hash\n };\n } catch (error) {\n const decodedError = (0, utils_1.decodeContractError)(error, contract);\n throw new Error(`Failed to Undelete App: ${decodedError}`);\n }\n }\n }\n });\n\n // ../../libs/contracts-sdk/dist/src/utils/pkpInfo.js\n var require_pkpInfo = __commonJS({\n \"../../libs/contracts-sdk/dist/src/utils/pkpInfo.js\"(exports3) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n Object.defineProperty(exports3, \"__esModule\", { value: true });\n exports3.getPkpTokenId = getPkpTokenId;\n exports3.getPkpEthAddress = getPkpEthAddress;\n var ethers_1 = require_lib32();\n var DATIL_PUBKEY_ROUTER_ADDRESS = \"0xF182d6bEf16Ba77e69372dD096D8B70Bc3d5B475\";\n var PUBKEY_ROUTER_ABI = [\n \"function ethAddressToPkpId(address ethAddress) public view returns (uint256)\",\n \"function getEthAddress(uint256 tokenId) public view returns (address)\"\n ];\n async function getPkpTokenId({ pkpEthAddress, signer }) {\n if (!ethers_1.ethers.utils.isAddress(pkpEthAddress)) {\n throw new Error(`Invalid Ethereum address: ${pkpEthAddress}`);\n }\n const pubkeyRouter = new ethers_1.ethers.Contract(DATIL_PUBKEY_ROUTER_ADDRESS, PUBKEY_ROUTER_ABI, signer.provider);\n return await pubkeyRouter.ethAddressToPkpId(pkpEthAddress);\n }\n async function getPkpEthAddress({ tokenId, signer }) {\n const tokenIdBN = ethers_1.ethers.BigNumber.from(tokenId);\n if (tokenIdBN.isZero()) {\n throw new Error(\"Invalid token ID: Token ID cannot be zero\");\n }\n const pubkeyRouter = new ethers_1.ethers.Contract(DATIL_PUBKEY_ROUTER_ADDRESS, PUBKEY_ROUTER_ABI, signer.provider);\n return await pubkeyRouter.getEthAddress(tokenIdBN);\n }\n }\n });\n\n // ../../libs/contracts-sdk/dist/src/internal/app/AppView.js\n var require_AppView = __commonJS({\n \"../../libs/contracts-sdk/dist/src/internal/app/AppView.js\"(exports3) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n Object.defineProperty(exports3, \"__esModule\", { value: true });\n exports3.getAppById = getAppById;\n exports3.getAppIdByDelegatee = getAppIdByDelegatee;\n exports3.getAppVersion = getAppVersion;\n exports3.getAppsByManagerAddress = getAppsByManagerAddress;\n exports3.getAppByDelegateeAddress = getAppByDelegateeAddress;\n exports3.getDelegatedPkpEthAddresses = getDelegatedPkpEthAddresses;\n var utils_1 = require_utils7();\n var pkpInfo_1 = require_pkpInfo();\n async function getAppById(params) {\n const { args: { appId }, contract } = params;\n try {\n const chainApp = await contract.getAppById(appId);\n const { delegatees, ...app } = chainApp;\n return {\n ...app,\n id: app.id,\n latestVersion: app.latestVersion,\n delegateeAddresses: delegatees\n };\n } catch (error) {\n const decodedError = (0, utils_1.decodeContractError)(error, contract);\n if (decodedError.includes(\"AppNotRegistered\")) {\n return null;\n }\n throw new Error(`Failed to Get App By ID: ${decodedError}`);\n }\n }\n async function getAppIdByDelegatee(params) {\n const { args: { delegateeAddress }, contract } = params;\n try {\n const app = await contract.getAppByDelegatee(delegateeAddress);\n return app.id;\n } catch (error) {\n const decodedError = error instanceof Error ? error.message : String(error);\n if (decodedError.includes(\"DelegateeNotRegistered\")) {\n return null;\n }\n throw new Error(`Failed to Get App ID By Delegatee: ${decodedError}`);\n }\n }\n async function getAppVersion(params) {\n const { args: { appId, version: version6 }, contract } = params;\n try {\n const appVersion = await contract.getAppVersion(appId, version6);\n const convertedAppVersion = {\n version: appVersion.version,\n enabled: appVersion.enabled,\n abilities: appVersion.abilities.map((ability) => ({\n abilityIpfsCid: ability.abilityIpfsCid,\n policyIpfsCids: ability.policyIpfsCids\n }))\n };\n return {\n appVersion: convertedAppVersion\n };\n } catch (error) {\n const decodedError = (0, utils_1.decodeContractError)(error, contract);\n if (decodedError.includes(\"AppVersionNotRegistered\") || decodedError.includes(\"AppNotRegistered\")) {\n return null;\n }\n throw new Error(`Failed to Get App Version: ${decodedError}`);\n }\n }\n async function getAppsByManagerAddress(params) {\n const { args: { managerAddress, offset }, contract } = params;\n try {\n const [appIds, appVersionCounts] = await contract.getAppsByManager(managerAddress, offset);\n return appIds.map((id, idx) => ({\n id,\n versionCount: appVersionCounts[idx]\n }));\n } catch (error) {\n const decodedError = (0, utils_1.decodeContractError)(error, contract);\n if (decodedError.includes(\"NoAppsFoundForManager\")) {\n return [];\n }\n throw new Error(`Failed to Get Apps By Manager: ${decodedError}`);\n }\n }\n async function getAppByDelegateeAddress(params) {\n const { args: { delegateeAddress }, contract } = params;\n try {\n const chainApp = await contract.getAppByDelegatee(delegateeAddress);\n const { delegatees, ...app } = chainApp;\n return {\n ...app,\n delegateeAddresses: delegatees,\n id: app.id,\n latestVersion: app.latestVersion\n };\n } catch (error) {\n const decodedError = (0, utils_1.decodeContractError)(error, contract);\n if (decodedError.includes(\"DelegateeNotRegistered\")) {\n return null;\n }\n throw new Error(`Failed to Get App By Delegatee: ${decodedError}`);\n }\n }\n async function getDelegatedPkpEthAddresses(params) {\n const { args: { appId, offset, version: version6 }, contract } = params;\n try {\n const delegatedAgentPkpTokenIds = await contract.getDelegatedAgentPkpTokenIds(appId, version6, offset);\n const delegatedAgentPkpEthAddresses = [];\n for (const tokenId of delegatedAgentPkpTokenIds) {\n const ethAddress2 = await (0, pkpInfo_1.getPkpEthAddress)({ tokenId, signer: contract.signer });\n delegatedAgentPkpEthAddresses.push(ethAddress2);\n }\n return delegatedAgentPkpEthAddresses;\n } catch (error) {\n const decodedError = (0, utils_1.decodeContractError)(error, contract);\n throw new Error(`Failed to Get Delegated Agent PKP Token IDs: ${decodedError}`);\n }\n }\n }\n });\n\n // ../../../node_modules/.pnpm/cbor2@2.0.1/node_modules/cbor2/lib/constants.js\n var f, I, o, T, N, S;\n var init_constants = __esm({\n \"../../../node_modules/.pnpm/cbor2@2.0.1/node_modules/cbor2/lib/constants.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n f = { POS_INT: 0, NEG_INT: 1, BYTE_STRING: 2, UTF8_STRING: 3, ARRAY: 4, MAP: 5, TAG: 6, SIMPLE_FLOAT: 7 };\n I = { DATE_STRING: 0, DATE_EPOCH: 1, POS_BIGINT: 2, NEG_BIGINT: 3, DECIMAL_FRAC: 4, BIGFLOAT: 5, BASE64URL_EXPECTED: 21, BASE64_EXPECTED: 22, BASE16_EXPECTED: 23, CBOR: 24, URI: 32, BASE64URL: 33, BASE64: 34, MIME: 36, SET: 258, JSON: 262, WTF8: 273, REGEXP: 21066, SELF_DESCRIBED: 55799, INVALID_16: 65535, INVALID_32: 4294967295, INVALID_64: 0xffffffffffffffffn };\n o = { ZERO: 0, ONE: 24, TWO: 25, FOUR: 26, EIGHT: 27, INDEFINITE: 31 };\n T = { FALSE: 20, TRUE: 21, NULL: 22, UNDEFINED: 23 };\n N = class {\n static BREAK = Symbol.for(\"github.com/hildjj/cbor2/break\");\n static ENCODED = Symbol.for(\"github.com/hildjj/cbor2/cbor-encoded\");\n static LENGTH = Symbol.for(\"github.com/hildjj/cbor2/length\");\n };\n S = { MIN: -(2n ** 63n), MAX: 2n ** 64n - 1n };\n }\n });\n\n // ../../../node_modules/.pnpm/cbor2@2.0.1/node_modules/cbor2/lib/tag.js\n var i;\n var init_tag = __esm({\n \"../../../node_modules/.pnpm/cbor2@2.0.1/node_modules/cbor2/lib/tag.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n i = class _i {\n static #e = /* @__PURE__ */ new Map();\n tag;\n contents;\n constructor(e3, t3 = void 0) {\n this.tag = e3, this.contents = t3;\n }\n get noChildren() {\n return !!_i.#e.get(this.tag)?.noChildren;\n }\n static registerDecoder(e3, t3, n2) {\n const o5 = this.#e.get(e3);\n return this.#e.set(e3, t3), o5 && (\"comment\" in t3 || (t3.comment = o5.comment), \"noChildren\" in t3 || (t3.noChildren = o5.noChildren)), n2 && !t3.comment && (t3.comment = () => `(${n2})`), o5;\n }\n static clearDecoder(e3) {\n const t3 = this.#e.get(e3);\n return this.#e.delete(e3), t3;\n }\n static getDecoder(e3) {\n return this.#e.get(e3);\n }\n static getAllDecoders() {\n return new Map(this.#e);\n }\n *[Symbol.iterator]() {\n yield this.contents;\n }\n push(e3) {\n return this.contents = e3, 1;\n }\n decode(e3) {\n const t3 = e3?.tags?.get(this.tag) ?? _i.#e.get(this.tag);\n return t3 ? t3(this, e3) : this;\n }\n comment(e3, t3) {\n const n2 = e3?.tags?.get(this.tag) ?? _i.#e.get(this.tag);\n if (n2?.comment)\n return n2.comment(this, e3, t3);\n }\n toCBOR() {\n return [this.tag, this.contents];\n }\n [Symbol.for(\"nodejs.util.inspect.custom\")](e3, t3, n2) {\n return `${this.tag}(${n2(this.contents, t3)})`;\n }\n };\n }\n });\n\n // ../../../node_modules/.pnpm/cbor2@2.0.1/node_modules/cbor2/lib/box.js\n function f2(n2) {\n if (n2 != null && typeof n2 == \"object\")\n return n2[N.ENCODED];\n }\n function s(n2) {\n if (n2 != null && typeof n2 == \"object\")\n return n2[N.LENGTH];\n }\n function u(n2, e3) {\n Object.defineProperty(n2, N.ENCODED, { configurable: true, enumerable: false, value: e3 });\n }\n function l(n2, e3) {\n Object.defineProperty(n2, N.LENGTH, { configurable: true, enumerable: false, value: e3 });\n }\n function d(n2, e3) {\n const r2 = Object(n2);\n return u(r2, e3), r2;\n }\n function t(n2) {\n if (!n2 || typeof n2 != \"object\")\n return n2;\n switch (n2.constructor) {\n case BigInt:\n case Boolean:\n case Number:\n case String:\n case Symbol:\n return n2.valueOf();\n case Array:\n return n2.map((e3) => t(e3));\n case Map: {\n const e3 = t([...n2.entries()]);\n return e3.every(([r2]) => typeof r2 == \"string\") ? Object.fromEntries(e3) : new Map(e3);\n }\n case i:\n return new i(t(n2.tag), t(n2.contents));\n case Object: {\n const e3 = {};\n for (const [r2, a3] of Object.entries(n2))\n e3[r2] = t(a3);\n return e3;\n }\n }\n return n2;\n }\n var init_box = __esm({\n \"../../../node_modules/.pnpm/cbor2@2.0.1/node_modules/cbor2/lib/box.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_constants();\n init_tag();\n }\n });\n\n // ../../../node_modules/.pnpm/cbor2@2.0.1/node_modules/cbor2/lib/utils.js\n function c(r2, n2) {\n Object.defineProperty(r2, g, { configurable: false, enumerable: false, writable: false, value: n2 });\n }\n function f3(r2) {\n return r2[g];\n }\n function l2(r2) {\n return f3(r2) !== void 0;\n }\n function R(r2, n2 = 0, t3 = r2.length - 1) {\n const o5 = r2.subarray(n2, t3), a3 = f3(r2);\n if (a3) {\n const s4 = [];\n for (const e3 of a3)\n if (e3[0] >= n2 && e3[0] + e3[1] <= t3) {\n const i3 = [...e3];\n i3[0] -= n2, s4.push(i3);\n }\n s4.length && c(o5, s4);\n }\n return o5;\n }\n function b(r2) {\n let n2 = Math.ceil(r2.length / 2);\n const t3 = new Uint8Array(n2);\n n2--;\n for (let o5 = r2.length, a3 = o5 - 2; o5 >= 0; o5 = a3, a3 -= 2, n2--)\n t3[n2] = parseInt(r2.substring(a3, o5), 16);\n return t3;\n }\n function A(r2) {\n return r2.reduce((n2, t3) => n2 + t3.toString(16).padStart(2, \"0\"), \"\");\n }\n function d2(r2) {\n const n2 = r2.reduce((e3, i3) => e3 + i3.length, 0), t3 = r2.some((e3) => l2(e3)), o5 = [], a3 = new Uint8Array(n2);\n let s4 = 0;\n for (const e3 of r2) {\n if (!(e3 instanceof Uint8Array))\n throw new TypeError(`Invalid array: ${e3}`);\n if (a3.set(e3, s4), t3) {\n const i3 = e3[g] ?? [[0, e3.length]];\n for (const u2 of i3)\n u2[0] += s4;\n o5.push(...i3);\n }\n s4 += e3.length;\n }\n return t3 && c(a3, o5), a3;\n }\n function y(r2) {\n const n2 = atob(r2);\n return Uint8Array.from(n2, (t3) => t3.codePointAt(0));\n }\n function x(r2) {\n const n2 = r2.replace(/[_-]/g, (t3) => p[t3]);\n return y(n2.padEnd(Math.ceil(n2.length / 4) * 4, \"=\"));\n }\n function h() {\n const r2 = new Uint8Array(4), n2 = new Uint32Array(r2.buffer);\n return !((n2[0] = 1) & r2[0]);\n }\n function U(r2) {\n let n2 = \"\";\n for (const t3 of r2) {\n const o5 = t3.codePointAt(0)?.toString(16).padStart(4, \"0\");\n n2 && (n2 += \", \"), n2 += `U+${o5}`;\n }\n return n2;\n }\n var g, p;\n var init_utils = __esm({\n \"../../../node_modules/.pnpm/cbor2@2.0.1/node_modules/cbor2/lib/utils.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n g = Symbol(\"CBOR_RANGES\");\n p = { \"-\": \"+\", _: \"/\" };\n }\n });\n\n // ../../../node_modules/.pnpm/cbor2@2.0.1/node_modules/cbor2/lib/typeEncoderMap.js\n var s2;\n var init_typeEncoderMap = __esm({\n \"../../../node_modules/.pnpm/cbor2@2.0.1/node_modules/cbor2/lib/typeEncoderMap.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n s2 = class {\n #e = /* @__PURE__ */ new Map();\n registerEncoder(e3, t3) {\n const n2 = this.#e.get(e3);\n return this.#e.set(e3, t3), n2;\n }\n get(e3) {\n return this.#e.get(e3);\n }\n delete(e3) {\n return this.#e.delete(e3);\n }\n clear() {\n this.#e.clear();\n }\n };\n }\n });\n\n // ../../../node_modules/.pnpm/cbor2@2.0.1/node_modules/cbor2/lib/sorts.js\n function f4(c4, d5) {\n const [u2, a3, n2] = c4, [l6, s4, t3] = d5, r2 = Math.min(n2.length, t3.length);\n for (let o5 = 0; o5 < r2; o5++) {\n const e3 = n2[o5] - t3[o5];\n if (e3 !== 0)\n return e3;\n }\n return 0;\n }\n var init_sorts = __esm({\n \"../../../node_modules/.pnpm/cbor2@2.0.1/node_modules/cbor2/lib/sorts.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n }\n });\n\n // ../../../node_modules/.pnpm/cbor2@2.0.1/node_modules/cbor2/lib/writer.js\n var e;\n var init_writer = __esm({\n \"../../../node_modules/.pnpm/cbor2@2.0.1/node_modules/cbor2/lib/writer.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n e = class _e {\n static defaultOptions = { chunkSize: 4096 };\n #r;\n #i = [];\n #s = null;\n #t = 0;\n #a = 0;\n constructor(t3 = {}) {\n if (this.#r = { ..._e.defaultOptions, ...t3 }, this.#r.chunkSize < 8)\n throw new RangeError(`Expected size >= 8, got ${this.#r.chunkSize}`);\n this.#n();\n }\n get length() {\n return this.#a;\n }\n read() {\n this.#o();\n const t3 = new Uint8Array(this.#a);\n let i3 = 0;\n for (const s4 of this.#i)\n t3.set(s4, i3), i3 += s4.length;\n return this.#n(), t3;\n }\n write(t3) {\n const i3 = t3.length;\n i3 > this.#l() ? (this.#o(), i3 > this.#r.chunkSize ? (this.#i.push(t3), this.#n()) : (this.#n(), this.#i[this.#i.length - 1].set(t3), this.#t = i3)) : (this.#i[this.#i.length - 1].set(t3, this.#t), this.#t += i3), this.#a += i3;\n }\n writeUint8(t3) {\n this.#e(1), this.#s.setUint8(this.#t, t3), this.#h(1);\n }\n writeUint16(t3, i3 = false) {\n this.#e(2), this.#s.setUint16(this.#t, t3, i3), this.#h(2);\n }\n writeUint32(t3, i3 = false) {\n this.#e(4), this.#s.setUint32(this.#t, t3, i3), this.#h(4);\n }\n writeBigUint64(t3, i3 = false) {\n this.#e(8), this.#s.setBigUint64(this.#t, t3, i3), this.#h(8);\n }\n writeInt16(t3, i3 = false) {\n this.#e(2), this.#s.setInt16(this.#t, t3, i3), this.#h(2);\n }\n writeInt32(t3, i3 = false) {\n this.#e(4), this.#s.setInt32(this.#t, t3, i3), this.#h(4);\n }\n writeBigInt64(t3, i3 = false) {\n this.#e(8), this.#s.setBigInt64(this.#t, t3, i3), this.#h(8);\n }\n writeFloat32(t3, i3 = false) {\n this.#e(4), this.#s.setFloat32(this.#t, t3, i3), this.#h(4);\n }\n writeFloat64(t3, i3 = false) {\n this.#e(8), this.#s.setFloat64(this.#t, t3, i3), this.#h(8);\n }\n clear() {\n this.#a = 0, this.#i = [], this.#n();\n }\n #n() {\n const t3 = new Uint8Array(this.#r.chunkSize);\n this.#i.push(t3), this.#t = 0, this.#s = new DataView(t3.buffer, t3.byteOffset, t3.byteLength);\n }\n #o() {\n if (this.#t === 0) {\n this.#i.pop();\n return;\n }\n const t3 = this.#i.length - 1;\n this.#i[t3] = this.#i[t3].subarray(0, this.#t), this.#t = 0, this.#s = null;\n }\n #l() {\n const t3 = this.#i.length - 1;\n return this.#i[t3].length - this.#t;\n }\n #e(t3) {\n this.#l() < t3 && (this.#o(), this.#n());\n }\n #h(t3) {\n this.#t += t3, this.#a += t3;\n }\n };\n }\n });\n\n // ../../../node_modules/.pnpm/cbor2@2.0.1/node_modules/cbor2/lib/float.js\n function o2(e3, n2 = 0, t3 = false) {\n const r2 = e3[n2] & 128 ? -1 : 1, f6 = (e3[n2] & 124) >> 2, a3 = (e3[n2] & 3) << 8 | e3[n2 + 1];\n if (f6 === 0) {\n if (t3 && a3 !== 0)\n throw new Error(`Unwanted subnormal: ${r2 * 5960464477539063e-23 * a3}`);\n return r2 * 5960464477539063e-23 * a3;\n } else if (f6 === 31)\n return a3 ? NaN : r2 * (1 / 0);\n return r2 * 2 ** (f6 - 25) * (1024 + a3);\n }\n function s3(e3) {\n const n2 = new DataView(new ArrayBuffer(4));\n n2.setFloat32(0, e3, false);\n const t3 = n2.getUint32(0, false);\n if ((t3 & 8191) !== 0)\n return null;\n let r2 = t3 >> 16 & 32768;\n const f6 = t3 >> 23 & 255, a3 = t3 & 8388607;\n if (!(f6 === 0 && a3 === 0))\n if (f6 >= 113 && f6 <= 142)\n r2 += (f6 - 112 << 10) + (a3 >> 13);\n else if (f6 >= 103 && f6 < 113) {\n if (a3 & (1 << 126 - f6) - 1)\n return null;\n r2 += a3 + 8388608 >> 126 - f6;\n } else if (f6 === 255)\n r2 |= 31744, r2 |= a3 >> 13;\n else\n return null;\n return r2;\n }\n function i2(e3) {\n if (e3 !== 0) {\n const n2 = new ArrayBuffer(8), t3 = new DataView(n2);\n t3.setFloat64(0, e3, false);\n const r2 = t3.getBigUint64(0, false);\n if ((r2 & 0x7ff0000000000000n) === 0n)\n return r2 & 0x8000000000000000n ? -0 : 0;\n }\n return e3;\n }\n function l3(e3) {\n switch (e3.length) {\n case 2:\n o2(e3, 0, true);\n break;\n case 4: {\n const n2 = new DataView(e3.buffer, e3.byteOffset, e3.byteLength), t3 = n2.getUint32(0, false);\n if ((t3 & 2139095040) === 0 && t3 & 8388607)\n throw new Error(`Unwanted subnormal: ${n2.getFloat32(0, false)}`);\n break;\n }\n case 8: {\n const n2 = new DataView(e3.buffer, e3.byteOffset, e3.byteLength), t3 = n2.getBigUint64(0, false);\n if ((t3 & 0x7ff0000000000000n) === 0n && t3 & 0x000fffffffffffn)\n throw new Error(`Unwanted subnormal: ${n2.getFloat64(0, false)}`);\n break;\n }\n default:\n throw new TypeError(`Bad input to isSubnormal: ${e3}`);\n }\n }\n var init_float = __esm({\n \"../../../node_modules/.pnpm/cbor2@2.0.1/node_modules/cbor2/lib/float.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n }\n });\n\n // ../../../node_modules/.pnpm/@cto.af+wtf8@0.0.2/node_modules/@cto.af/wtf8/lib/errors.js\n var DecodeError, InvalidEncodingError;\n var init_errors = __esm({\n \"../../../node_modules/.pnpm/@cto.af+wtf8@0.0.2/node_modules/@cto.af/wtf8/lib/errors.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n DecodeError = class extends TypeError {\n code = \"ERR_ENCODING_INVALID_ENCODED_DATA\";\n constructor() {\n super(\"The encoded data was not valid for encoding wtf-8\");\n }\n };\n InvalidEncodingError = class extends RangeError {\n code = \"ERR_ENCODING_NOT_SUPPORTED\";\n constructor(label) {\n super(`Invalid encoding: \"${label}\"`);\n }\n };\n }\n });\n\n // ../../../node_modules/.pnpm/@cto.af+wtf8@0.0.2/node_modules/@cto.af/wtf8/lib/const.js\n var BOM, EMPTY, MIN_HIGH_SURROGATE, MIN_LOW_SURROGATE, REPLACEMENT, WTF8;\n var init_const = __esm({\n \"../../../node_modules/.pnpm/@cto.af+wtf8@0.0.2/node_modules/@cto.af/wtf8/lib/const.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n BOM = 65279;\n EMPTY = new Uint8Array(0);\n MIN_HIGH_SURROGATE = 55296;\n MIN_LOW_SURROGATE = 56320;\n REPLACEMENT = 65533;\n WTF8 = \"wtf-8\";\n }\n });\n\n // ../../../node_modules/.pnpm/@cto.af+wtf8@0.0.2/node_modules/@cto.af/wtf8/lib/decode.js\n function isArrayBufferView(input) {\n return input && !(input instanceof ArrayBuffer) && input.buffer instanceof ArrayBuffer;\n }\n function getUint8(input) {\n if (!input) {\n return EMPTY;\n }\n if (input instanceof Uint8Array) {\n return input;\n }\n if (isArrayBufferView(input)) {\n return new Uint8Array(input.buffer, input.byteOffset, input.byteLength);\n }\n return new Uint8Array(input);\n }\n var REMAINDER, Wtf8Decoder;\n var init_decode = __esm({\n \"../../../node_modules/.pnpm/@cto.af+wtf8@0.0.2/node_modules/@cto.af/wtf8/lib/decode.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_const();\n init_errors();\n REMAINDER = [\n 0,\n 0,\n 0,\n 0,\n 0,\n 0,\n 0,\n 0,\n -1,\n -1,\n -1,\n -1,\n 1,\n 1,\n 2,\n 3\n ];\n Wtf8Decoder = class _Wtf8Decoder {\n static DEFAULT_BUFFERSIZE = 4096;\n encoding = WTF8;\n fatal;\n ignoreBOM;\n bufferSize;\n #left = 0;\n #cur = 0;\n #pending = 0;\n #first = true;\n #buf;\n constructor(label = \"wtf8\", options = void 0) {\n if (label.toLowerCase().replace(\"-\", \"\") !== \"wtf8\") {\n throw new InvalidEncodingError(label);\n }\n this.fatal = Boolean(options?.fatal);\n this.ignoreBOM = Boolean(options?.ignoreBOM);\n this.bufferSize = Math.floor(options?.bufferSize ?? _Wtf8Decoder.DEFAULT_BUFFERSIZE);\n if (isNaN(this.bufferSize) || this.bufferSize < 1) {\n throw new RangeError(`Invalid buffer size: ${options?.bufferSize}`);\n }\n this.#buf = new Uint16Array(this.bufferSize);\n }\n decode(input, options) {\n const streaming = Boolean(options?.stream);\n const bytes = getUint8(input);\n const res = [];\n const out = this.#buf;\n const maxSize = this.bufferSize - 3;\n let pos = 0;\n const fatal = () => {\n this.#cur = 0;\n this.#left = 0;\n this.#pending = 0;\n if (this.fatal) {\n throw new DecodeError();\n }\n out[pos++] = REPLACEMENT;\n };\n const fatals = () => {\n const p4 = this.#pending;\n for (let i3 = 0; i3 < p4; i3++) {\n fatal();\n }\n };\n const oneByte = (b4) => {\n if (this.#left === 0) {\n const n2 = REMAINDER[b4 >> 4];\n switch (n2) {\n case -1:\n fatal();\n break;\n case 0:\n out[pos++] = b4;\n break;\n case 1:\n this.#cur = b4 & 31;\n if ((this.#cur & 30) === 0) {\n fatal();\n } else {\n this.#left = 1;\n this.#pending = 1;\n }\n break;\n case 2:\n this.#cur = b4 & 15;\n this.#left = 2;\n this.#pending = 1;\n break;\n case 3:\n if (b4 & 8) {\n fatal();\n } else {\n this.#cur = b4 & 7;\n this.#left = 3;\n this.#pending = 1;\n }\n break;\n }\n } else {\n if ((b4 & 192) !== 128) {\n fatals();\n return oneByte(b4);\n }\n if (this.#pending === 1 && this.#left === 2 && this.#cur === 0 && (b4 & 32) === 0) {\n fatals();\n return oneByte(b4);\n }\n if (this.#left === 3 && this.#cur === 0 && (b4 & 48) === 0) {\n fatals();\n return oneByte(b4);\n }\n this.#cur = this.#cur << 6 | b4 & 63;\n this.#pending++;\n if (--this.#left === 0) {\n if (this.ignoreBOM || !this.#first || this.#cur !== BOM) {\n if (this.#cur < 65536) {\n out[pos++] = this.#cur;\n } else {\n const cp = this.#cur - 65536;\n out[pos++] = cp >>> 10 & 1023 | MIN_HIGH_SURROGATE;\n out[pos++] = cp & 1023 | MIN_LOW_SURROGATE;\n }\n }\n this.#cur = 0;\n this.#pending = 0;\n this.#first = false;\n }\n }\n };\n for (const b4 of bytes) {\n if (pos >= maxSize) {\n res.push(String.fromCharCode.apply(null, out.subarray(0, pos)));\n pos = 0;\n }\n oneByte(b4);\n }\n if (!streaming) {\n this.#first = true;\n if (this.#cur || this.#left) {\n fatals();\n }\n }\n if (pos > 0) {\n res.push(String.fromCharCode.apply(null, out.subarray(0, pos)));\n }\n return res.join(\"\");\n }\n };\n }\n });\n\n // ../../../node_modules/.pnpm/@cto.af+wtf8@0.0.2/node_modules/@cto.af/wtf8/lib/encode.js\n function utf8length(str) {\n let len = 0;\n for (const s4 of str) {\n const cp = s4.codePointAt(0);\n if (cp < 128) {\n len++;\n } else if (cp < 2048) {\n len += 2;\n } else if (cp < 65536) {\n len += 3;\n } else {\n len += 4;\n }\n }\n return len;\n }\n var Wtf8Encoder;\n var init_encode = __esm({\n \"../../../node_modules/.pnpm/@cto.af+wtf8@0.0.2/node_modules/@cto.af/wtf8/lib/encode.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_const();\n Wtf8Encoder = class {\n encoding = WTF8;\n encode(input) {\n if (!input) {\n return EMPTY;\n }\n const buf = new Uint8Array(utf8length(String(input)));\n this.encodeInto(input, buf);\n return buf;\n }\n encodeInto(source, destination) {\n const str = String(source);\n const len = str.length;\n const outLen = destination.length;\n let written = 0;\n let read = 0;\n for (read = 0; read < len; read++) {\n const c4 = str.codePointAt(read);\n if (c4 < 128) {\n if (written >= outLen) {\n break;\n }\n destination[written++] = c4;\n } else if (c4 < 2048) {\n if (written >= outLen - 1) {\n break;\n }\n destination[written++] = 192 | c4 >> 6;\n destination[written++] = 128 | c4 & 63;\n } else if (c4 < 65536) {\n if (written >= outLen - 2) {\n break;\n }\n destination[written++] = 224 | c4 >> 12;\n destination[written++] = 128 | c4 >> 6 & 63;\n destination[written++] = 128 | c4 & 63;\n } else {\n if (written >= outLen - 3) {\n break;\n }\n destination[written++] = 240 | c4 >> 18;\n destination[written++] = 128 | c4 >> 12 & 63;\n destination[written++] = 128 | c4 >> 6 & 63;\n destination[written++] = 128 | c4 & 63;\n read++;\n }\n }\n return {\n read,\n written\n };\n }\n };\n }\n });\n\n // ../../../node_modules/.pnpm/@cto.af+wtf8@0.0.2/node_modules/@cto.af/wtf8/lib/decodeStream.js\n var init_decodeStream = __esm({\n \"../../../node_modules/.pnpm/@cto.af+wtf8@0.0.2/node_modules/@cto.af/wtf8/lib/decodeStream.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_decode();\n }\n });\n\n // ../../../node_modules/.pnpm/@cto.af+wtf8@0.0.2/node_modules/@cto.af/wtf8/lib/encodeStream.js\n var init_encodeStream = __esm({\n \"../../../node_modules/.pnpm/@cto.af+wtf8@0.0.2/node_modules/@cto.af/wtf8/lib/encodeStream.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_const();\n init_encode();\n }\n });\n\n // ../../../node_modules/.pnpm/@cto.af+wtf8@0.0.2/node_modules/@cto.af/wtf8/lib/index.js\n var init_lib = __esm({\n \"../../../node_modules/.pnpm/@cto.af+wtf8@0.0.2/node_modules/@cto.af/wtf8/lib/index.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_errors();\n init_decode();\n init_encode();\n init_decodeStream();\n init_encodeStream();\n }\n });\n\n // ../../../node_modules/.pnpm/cbor2@2.0.1/node_modules/cbor2/lib/encoder.js\n function y2(e3) {\n const n2 = e3 < 0;\n return typeof e3 == \"bigint\" ? [n2 ? -e3 - 1n : e3, n2] : [n2 ? -e3 - 1 : e3, n2];\n }\n function T2(e3, n2, t3) {\n if (t3.rejectFloats)\n throw new Error(`Attempt to encode an unwanted floating point number: ${e3}`);\n if (isNaN(e3))\n n2.writeUint8(U2), n2.writeUint16(32256);\n else if (!t3.float64 && Math.fround(e3) === e3) {\n const r2 = s3(e3);\n r2 === null ? (n2.writeUint8(h2), n2.writeFloat32(e3)) : (n2.writeUint8(U2), n2.writeUint16(r2));\n } else\n n2.writeUint8(B), n2.writeFloat64(e3);\n }\n function a(e3, n2, t3) {\n const [r2, i3] = y2(e3);\n if (i3 && t3)\n throw new TypeError(`Negative size: ${e3}`);\n t3 ??= i3 ? f.NEG_INT : f.POS_INT, t3 <<= 5, r2 < 24 ? n2.writeUint8(t3 | r2) : r2 <= 255 ? (n2.writeUint8(t3 | o.ONE), n2.writeUint8(r2)) : r2 <= 65535 ? (n2.writeUint8(t3 | o.TWO), n2.writeUint16(r2)) : r2 <= 4294967295 ? (n2.writeUint8(t3 | o.FOUR), n2.writeUint32(r2)) : (n2.writeUint8(t3 | o.EIGHT), n2.writeBigUint64(BigInt(r2)));\n }\n function p2(e3, n2, t3) {\n typeof e3 == \"number\" ? a(e3, n2, f.TAG) : typeof e3 == \"object\" && !t3.ignoreOriginalEncoding && N.ENCODED in e3 ? n2.write(e3[N.ENCODED]) : e3 <= Number.MAX_SAFE_INTEGER ? a(Number(e3), n2, f.TAG) : (n2.writeUint8(f.TAG << 5 | o.EIGHT), n2.writeBigUint64(BigInt(e3)));\n }\n function N2(e3, n2, t3) {\n const [r2, i3] = y2(e3);\n if (t3.collapseBigInts && (!t3.largeNegativeAsBigInt || e3 >= -0x8000000000000000n)) {\n if (r2 <= 0xffffffffn) {\n a(Number(e3), n2);\n return;\n }\n if (r2 <= 0xffffffffffffffffn) {\n const E2 = (i3 ? f.NEG_INT : f.POS_INT) << 5;\n n2.writeUint8(E2 | o.EIGHT), n2.writeBigUint64(r2);\n return;\n }\n }\n if (t3.rejectBigInts)\n throw new Error(`Attempt to encode unwanted bigint: ${e3}`);\n const o5 = i3 ? I.NEG_BIGINT : I.POS_BIGINT, c4 = r2.toString(16), s4 = c4.length % 2 ? \"0\" : \"\";\n p2(o5, n2, t3);\n const u2 = b(s4 + c4);\n a(u2.length, n2, f.BYTE_STRING), n2.write(u2);\n }\n function Y(e3, n2, t3) {\n t3.flushToZero && (e3 = i2(e3)), Object.is(e3, -0) ? t3.simplifyNegativeZero ? t3.avoidInts ? T2(0, n2, t3) : a(0, n2) : T2(e3, n2, t3) : !t3.avoidInts && Number.isSafeInteger(e3) ? a(e3, n2) : t3.reduceUnsafeNumbers && Math.floor(e3) === e3 && e3 >= S.MIN && e3 <= S.MAX ? N2(BigInt(e3), n2, t3) : T2(e3, n2, t3);\n }\n function Z(e3, n2, t3) {\n const r2 = t3.stringNormalization ? e3.normalize(t3.stringNormalization) : e3;\n if (t3.wtf8 && !e3.isWellFormed()) {\n const i3 = K.encode(r2);\n p2(I.WTF8, n2, t3), a(i3.length, n2, f.BYTE_STRING), n2.write(i3);\n } else {\n const i3 = z.encode(r2);\n a(i3.length, n2, f.UTF8_STRING), n2.write(i3);\n }\n }\n function J(e3, n2, t3) {\n const r2 = e3;\n R2(r2, r2.length, f.ARRAY, n2, t3);\n for (const i3 of r2)\n g2(i3, n2, t3);\n }\n function V(e3, n2) {\n a(e3.length, n2, f.BYTE_STRING), n2.write(e3);\n }\n function ce(e3, n2) {\n return b2.registerEncoder(e3, n2);\n }\n function R2(e3, n2, t3, r2, i3) {\n const o5 = s(e3);\n o5 && !i3.ignoreOriginalEncoding ? r2.write(o5) : a(n2, r2, t3);\n }\n function X(e3, n2, t3) {\n if (e3 === null) {\n n2.writeUint8(q);\n return;\n }\n if (!t3.ignoreOriginalEncoding && N.ENCODED in e3) {\n n2.write(e3[N.ENCODED]);\n return;\n }\n const r2 = e3.constructor;\n if (r2) {\n const o5 = t3.types?.get(r2) ?? b2.get(r2);\n if (o5) {\n const c4 = o5(e3, n2, t3);\n if (c4 !== void 0) {\n if (!Array.isArray(c4) || c4.length !== 2)\n throw new Error(\"Invalid encoder return value\");\n (typeof c4[0] == \"bigint\" || isFinite(Number(c4[0]))) && p2(c4[0], n2, t3), g2(c4[1], n2, t3);\n }\n return;\n }\n }\n if (typeof e3.toCBOR == \"function\") {\n const o5 = e3.toCBOR(n2, t3);\n o5 && ((typeof o5[0] == \"bigint\" || isFinite(Number(o5[0]))) && p2(o5[0], n2, t3), g2(o5[1], n2, t3));\n return;\n }\n if (typeof e3.toJSON == \"function\") {\n g2(e3.toJSON(), n2, t3);\n return;\n }\n const i3 = Object.entries(e3).map((o5) => [o5[0], o5[1], Q(o5[0], t3)]);\n t3.sortKeys && i3.sort(t3.sortKeys), R2(e3, i3.length, f.MAP, n2, t3);\n for (const [o5, c4, s4] of i3)\n n2.write(s4), g2(c4, n2, t3);\n }\n function g2(e3, n2, t3) {\n switch (typeof e3) {\n case \"number\":\n Y(e3, n2, t3);\n break;\n case \"bigint\":\n N2(e3, n2, t3);\n break;\n case \"string\":\n Z(e3, n2, t3);\n break;\n case \"boolean\":\n n2.writeUint8(e3 ? j : P);\n break;\n case \"undefined\":\n if (t3.rejectUndefined)\n throw new Error(\"Attempt to encode unwanted undefined.\");\n n2.writeUint8($);\n break;\n case \"object\":\n X(e3, n2, t3);\n break;\n case \"symbol\":\n throw new TypeError(`Unknown symbol: ${e3.toString()}`);\n default:\n throw new TypeError(`Unknown type: ${typeof e3}, ${String(e3)}`);\n }\n }\n function Q(e3, n2 = {}) {\n const t3 = { ...k };\n n2.dcbor ? Object.assign(t3, H) : n2.cde && Object.assign(t3, F), Object.assign(t3, n2);\n const r2 = new e(t3);\n return g2(e3, r2, t3), r2.read();\n }\n function de(e3, n2, t3 = f.POS_INT) {\n n2 || (n2 = \"f\");\n const r2 = { ...k, collapseBigInts: false, chunkSize: 10, simplifyNegativeZero: false }, i3 = new e(r2), o5 = Number(e3);\n function c4(s4) {\n if (Object.is(e3, -0))\n throw new Error(\"Invalid integer: -0\");\n const [u2, E2] = y2(e3);\n if (E2 && t3 !== f.POS_INT)\n throw new Error(\"Invalid major type combination\");\n const w3 = typeof s4 == \"number\" && isFinite(s4);\n if (w3 && !Number.isSafeInteger(o5))\n throw new TypeError(`Unsafe number for ${n2}: ${e3}`);\n if (u2 > s4)\n throw new TypeError(`Undersized encoding ${n2} for: ${e3}`);\n const A4 = (E2 ? f.NEG_INT : t3) << 5;\n return w3 ? [A4, Number(u2)] : [A4, u2];\n }\n switch (n2) {\n case \"bigint\":\n if (Object.is(e3, -0))\n throw new TypeError(\"Invalid bigint: -0\");\n e3 = BigInt(e3), N2(e3, i3, r2);\n break;\n case \"f\":\n T2(o5, i3, r2);\n break;\n case \"f16\": {\n const s4 = s3(o5);\n if (s4 === null)\n throw new TypeError(`Invalid f16: ${e3}`);\n i3.writeUint8(U2), i3.writeUint16(s4);\n break;\n }\n case \"f32\":\n if (!isNaN(o5) && Math.fround(o5) !== o5)\n throw new TypeError(`Invalid f32: ${e3}`);\n i3.writeUint8(h2), i3.writeFloat32(o5);\n break;\n case \"f64\":\n i3.writeUint8(B), i3.writeFloat64(o5);\n break;\n case \"i\":\n if (Object.is(e3, -0))\n throw new Error(\"Invalid integer: -0\");\n if (Number.isSafeInteger(o5))\n a(o5, i3, e3 < 0 ? void 0 : t3);\n else {\n const [s4, u2] = c4(1 / 0);\n u2 > 0xffffffffffffffffn ? (e3 = BigInt(e3), N2(e3, i3, r2)) : (i3.writeUint8(s4 | o.EIGHT), i3.writeBigUint64(BigInt(u2)));\n }\n break;\n case \"i0\": {\n const [s4, u2] = c4(23);\n i3.writeUint8(s4 | u2);\n break;\n }\n case \"i8\": {\n const [s4, u2] = c4(255);\n i3.writeUint8(s4 | o.ONE), i3.writeUint8(u2);\n break;\n }\n case \"i16\": {\n const [s4, u2] = c4(65535);\n i3.writeUint8(s4 | o.TWO), i3.writeUint16(u2);\n break;\n }\n case \"i32\": {\n const [s4, u2] = c4(4294967295);\n i3.writeUint8(s4 | o.FOUR), i3.writeUint32(u2);\n break;\n }\n case \"i64\": {\n const [s4, u2] = c4(0xffffffffffffffffn);\n i3.writeUint8(s4 | o.EIGHT), i3.writeBigUint64(BigInt(u2));\n break;\n }\n default:\n throw new TypeError(`Invalid number encoding: \"${n2}\"`);\n }\n return d(e3, i3.read());\n }\n var se, U2, h2, B, j, P, $, q, z, K, k, F, H, b2;\n var init_encoder = __esm({\n \"../../../node_modules/.pnpm/cbor2@2.0.1/node_modules/cbor2/lib/encoder.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_typeEncoderMap();\n init_constants();\n init_sorts();\n init_writer();\n init_box();\n init_float();\n init_lib();\n init_utils();\n ({ ENCODED: se } = N);\n U2 = f.SIMPLE_FLOAT << 5 | o.TWO;\n h2 = f.SIMPLE_FLOAT << 5 | o.FOUR;\n B = f.SIMPLE_FLOAT << 5 | o.EIGHT;\n j = f.SIMPLE_FLOAT << 5 | T.TRUE;\n P = f.SIMPLE_FLOAT << 5 | T.FALSE;\n $ = f.SIMPLE_FLOAT << 5 | T.UNDEFINED;\n q = f.SIMPLE_FLOAT << 5 | T.NULL;\n z = new TextEncoder();\n K = new Wtf8Encoder();\n k = { ...e.defaultOptions, avoidInts: false, cde: false, collapseBigInts: true, dcbor: false, float64: false, flushToZero: false, forceEndian: null, ignoreOriginalEncoding: false, largeNegativeAsBigInt: false, reduceUnsafeNumbers: false, rejectBigInts: false, rejectCustomSimples: false, rejectDuplicateKeys: false, rejectFloats: false, rejectUndefined: false, simplifyNegativeZero: false, sortKeys: null, stringNormalization: null, types: null, wtf8: false };\n F = { cde: true, ignoreOriginalEncoding: true, sortKeys: f4 };\n H = { ...F, dcbor: true, largeNegativeAsBigInt: true, reduceUnsafeNumbers: true, rejectCustomSimples: true, rejectDuplicateKeys: true, rejectUndefined: true, simplifyNegativeZero: true, stringNormalization: \"NFC\" };\n b2 = new s2();\n b2.registerEncoder(Array, J), b2.registerEncoder(Uint8Array, V);\n }\n });\n\n // ../../../node_modules/.pnpm/cbor2@2.0.1/node_modules/cbor2/lib/options.js\n var o3;\n var init_options = __esm({\n \"../../../node_modules/.pnpm/cbor2@2.0.1/node_modules/cbor2/lib/options.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n o3 = ((e3) => (e3[e3.NEVER = -1] = \"NEVER\", e3[e3.PREFERRED = 0] = \"PREFERRED\", e3[e3.ALWAYS = 1] = \"ALWAYS\", e3))(o3 || {});\n }\n });\n\n // ../../../node_modules/.pnpm/cbor2@2.0.1/node_modules/cbor2/lib/simple.js\n var t2;\n var init_simple = __esm({\n \"../../../node_modules/.pnpm/cbor2@2.0.1/node_modules/cbor2/lib/simple.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_constants();\n init_encoder();\n t2 = class _t {\n static KnownSimple = /* @__PURE__ */ new Map([[T.FALSE, false], [T.TRUE, true], [T.NULL, null], [T.UNDEFINED, void 0]]);\n value;\n constructor(e3) {\n this.value = e3;\n }\n static create(e3) {\n return _t.KnownSimple.has(e3) ? _t.KnownSimple.get(e3) : new _t(e3);\n }\n toCBOR(e3, i3) {\n if (i3.rejectCustomSimples)\n throw new Error(`Cannot encode non-standard Simple value: ${this.value}`);\n a(this.value, e3, f.SIMPLE_FLOAT);\n }\n toString() {\n return `simple(${this.value})`;\n }\n decode() {\n return _t.KnownSimple.has(this.value) ? _t.KnownSimple.get(this.value) : this;\n }\n [Symbol.for(\"nodejs.util.inspect.custom\")](e3, i3, r2) {\n return `simple(${r2(this.value, i3)})`;\n }\n };\n }\n });\n\n // ../../../node_modules/.pnpm/cbor2@2.0.1/node_modules/cbor2/lib/decodeStream.js\n var p3, y3;\n var init_decodeStream2 = __esm({\n \"../../../node_modules/.pnpm/cbor2@2.0.1/node_modules/cbor2/lib/decodeStream.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_constants();\n init_utils();\n init_simple();\n init_float();\n p3 = new TextDecoder(\"utf8\", { fatal: true, ignoreBOM: true });\n y3 = class _y {\n static defaultOptions = { maxDepth: 1024, encoding: \"hex\", requirePreferred: false };\n #t;\n #r;\n #e = 0;\n #i;\n constructor(t3, r2) {\n if (this.#i = { ..._y.defaultOptions, ...r2 }, typeof t3 == \"string\")\n switch (this.#i.encoding) {\n case \"hex\":\n this.#t = b(t3);\n break;\n case \"base64\":\n this.#t = y(t3);\n break;\n default:\n throw new TypeError(`Encoding not implemented: \"${this.#i.encoding}\"`);\n }\n else\n this.#t = t3;\n this.#r = new DataView(this.#t.buffer, this.#t.byteOffset, this.#t.byteLength);\n }\n toHere(t3) {\n return R(this.#t, t3, this.#e);\n }\n *[Symbol.iterator]() {\n if (yield* this.#n(0), this.#e !== this.#t.length)\n throw new Error(\"Extra data in input\");\n }\n *seq() {\n for (; this.#e < this.#t.length; )\n yield* this.#n(0);\n }\n *#n(t3) {\n if (t3++ > this.#i.maxDepth)\n throw new Error(`Maximum depth ${this.#i.maxDepth} exceeded`);\n const r2 = this.#e, c4 = this.#r.getUint8(this.#e++), i3 = c4 >> 5, n2 = c4 & 31;\n let e3 = n2, f6 = false, a3 = 0;\n switch (n2) {\n case o.ONE:\n if (a3 = 1, e3 = this.#r.getUint8(this.#e), i3 === f.SIMPLE_FLOAT) {\n if (e3 < 32)\n throw new Error(`Invalid simple encoding in extra byte: ${e3}`);\n f6 = true;\n } else if (this.#i.requirePreferred && e3 < 24)\n throw new Error(`Unexpectedly long integer encoding (1) for ${e3}`);\n break;\n case o.TWO:\n if (a3 = 2, i3 === f.SIMPLE_FLOAT)\n e3 = o2(this.#t, this.#e);\n else if (e3 = this.#r.getUint16(this.#e, false), this.#i.requirePreferred && e3 <= 255)\n throw new Error(`Unexpectedly long integer encoding (2) for ${e3}`);\n break;\n case o.FOUR:\n if (a3 = 4, i3 === f.SIMPLE_FLOAT)\n e3 = this.#r.getFloat32(this.#e, false);\n else if (e3 = this.#r.getUint32(this.#e, false), this.#i.requirePreferred && e3 <= 65535)\n throw new Error(`Unexpectedly long integer encoding (4) for ${e3}`);\n break;\n case o.EIGHT: {\n if (a3 = 8, i3 === f.SIMPLE_FLOAT)\n e3 = this.#r.getFloat64(this.#e, false);\n else if (e3 = this.#r.getBigUint64(this.#e, false), e3 <= Number.MAX_SAFE_INTEGER && (e3 = Number(e3)), this.#i.requirePreferred && e3 <= 4294967295)\n throw new Error(`Unexpectedly long integer encoding (8) for ${e3}`);\n break;\n }\n case 28:\n case 29:\n case 30:\n throw new Error(`Additional info not implemented: ${n2}`);\n case o.INDEFINITE:\n switch (i3) {\n case f.POS_INT:\n case f.NEG_INT:\n case f.TAG:\n throw new Error(`Invalid indefinite encoding for MT ${i3}`);\n case f.SIMPLE_FLOAT:\n yield [i3, n2, N.BREAK, r2, 0];\n return;\n }\n e3 = 1 / 0;\n break;\n default:\n f6 = true;\n }\n switch (this.#e += a3, i3) {\n case f.POS_INT:\n yield [i3, n2, e3, r2, a3];\n break;\n case f.NEG_INT:\n yield [i3, n2, typeof e3 == \"bigint\" ? -1n - e3 : -1 - Number(e3), r2, a3];\n break;\n case f.BYTE_STRING:\n e3 === 1 / 0 ? yield* this.#s(i3, t3, r2) : yield [i3, n2, this.#a(e3), r2, e3];\n break;\n case f.UTF8_STRING:\n e3 === 1 / 0 ? yield* this.#s(i3, t3, r2) : yield [i3, n2, p3.decode(this.#a(e3)), r2, e3];\n break;\n case f.ARRAY:\n if (e3 === 1 / 0)\n yield* this.#s(i3, t3, r2, false);\n else {\n const o5 = Number(e3);\n yield [i3, n2, o5, r2, a3];\n for (let h4 = 0; h4 < o5; h4++)\n yield* this.#n(t3 + 1);\n }\n break;\n case f.MAP:\n if (e3 === 1 / 0)\n yield* this.#s(i3, t3, r2, false);\n else {\n const o5 = Number(e3);\n yield [i3, n2, o5, r2, a3];\n for (let h4 = 0; h4 < o5; h4++)\n yield* this.#n(t3), yield* this.#n(t3);\n }\n break;\n case f.TAG:\n yield [i3, n2, e3, r2, a3], yield* this.#n(t3);\n break;\n case f.SIMPLE_FLOAT: {\n const o5 = e3;\n f6 && (e3 = t2.create(Number(e3))), yield [i3, n2, e3, r2, o5];\n break;\n }\n }\n }\n #a(t3) {\n const r2 = R(this.#t, this.#e, this.#e += t3);\n if (r2.length !== t3)\n throw new Error(`Unexpected end of stream reading ${t3} bytes, got ${r2.length}`);\n return r2;\n }\n *#s(t3, r2, c4, i3 = true) {\n for (yield [t3, o.INDEFINITE, 1 / 0, c4, 1 / 0]; ; ) {\n const n2 = this.#n(r2), e3 = n2.next(), [f6, a3, o5] = e3.value;\n if (o5 === N.BREAK) {\n yield e3.value, n2.next();\n return;\n }\n if (i3) {\n if (f6 !== t3)\n throw new Error(`Unmatched major type. Expected ${t3}, got ${f6}.`);\n if (a3 === o.INDEFINITE)\n throw new Error(\"New stream started in typed stream\");\n }\n yield e3.value, yield* n2;\n }\n }\n };\n }\n });\n\n // ../../../node_modules/.pnpm/cbor2@2.0.1/node_modules/cbor2/lib/container.js\n function k2(d5, r2) {\n return !r2.boxed && !r2.preferMap && d5.every(([i3]) => typeof i3 == \"string\") ? Object.fromEntries(d5) : new Map(d5);\n }\n var v, A2, w;\n var init_container = __esm({\n \"../../../node_modules/.pnpm/cbor2@2.0.1/node_modules/cbor2/lib/container.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_constants();\n init_options();\n init_sorts();\n init_box();\n init_encoder();\n init_utils();\n init_decodeStream2();\n init_simple();\n init_tag();\n init_float();\n v = /* @__PURE__ */ new Map([[o.ZERO, 1], [o.ONE, 2], [o.TWO, 3], [o.FOUR, 5], [o.EIGHT, 9]]);\n A2 = new Uint8Array(0);\n w = class _w {\n static defaultDecodeOptions = { ...y3.defaultOptions, ParentType: _w, boxed: false, cde: false, dcbor: false, diagnosticSizes: o3.PREFERRED, convertUnsafeIntsToFloat: false, createObject: k2, pretty: false, preferMap: false, rejectLargeNegatives: false, rejectBigInts: false, rejectDuplicateKeys: false, rejectFloats: false, rejectInts: false, rejectLongLoundNaN: false, rejectLongFloats: false, rejectNegativeZero: false, rejectSimple: false, rejectStreaming: false, rejectStringsNotNormalizedAs: null, rejectSubnormals: false, rejectUndefined: false, rejectUnsafeFloatInts: false, saveOriginal: false, sortKeys: null, tags: null };\n static cdeDecodeOptions = { cde: true, rejectStreaming: true, requirePreferred: true, sortKeys: f4 };\n static dcborDecodeOptions = { ...this.cdeDecodeOptions, dcbor: true, convertUnsafeIntsToFloat: true, rejectDuplicateKeys: true, rejectLargeNegatives: true, rejectLongLoundNaN: true, rejectLongFloats: true, rejectNegativeZero: true, rejectSimple: true, rejectUndefined: true, rejectUnsafeFloatInts: true, rejectStringsNotNormalizedAs: \"NFC\" };\n parent;\n mt;\n ai;\n left;\n offset;\n count = 0;\n children = [];\n depth = 0;\n #e;\n #t = null;\n constructor(r2, i3, e3, t3) {\n if ([this.mt, this.ai, , this.offset] = r2, this.left = i3, this.parent = e3, this.#e = t3, e3 && (this.depth = e3.depth + 1), this.mt === f.MAP && (this.#e.sortKeys || this.#e.rejectDuplicateKeys) && (this.#t = []), this.#e.rejectStreaming && this.ai === o.INDEFINITE)\n throw new Error(\"Streaming not supported\");\n }\n get isStreaming() {\n return this.left === 1 / 0;\n }\n get done() {\n return this.left === 0;\n }\n static create(r2, i3, e3, t3) {\n const [s4, l6, n2, c4] = r2;\n switch (s4) {\n case f.POS_INT:\n case f.NEG_INT: {\n if (e3.rejectInts)\n throw new Error(`Unexpected integer: ${n2}`);\n if (e3.rejectLargeNegatives && n2 < -0x8000000000000000n)\n throw new Error(`Invalid 65bit negative number: ${n2}`);\n let o5 = n2;\n return e3.convertUnsafeIntsToFloat && o5 >= S.MIN && o5 <= S.MAX && (o5 = Number(n2)), e3.boxed ? d(o5, t3.toHere(c4)) : o5;\n }\n case f.SIMPLE_FLOAT:\n if (l6 > o.ONE) {\n if (e3.rejectFloats)\n throw new Error(`Decoding unwanted floating point number: ${n2}`);\n if (e3.rejectNegativeZero && Object.is(n2, -0))\n throw new Error(\"Decoding negative zero\");\n if (e3.rejectLongLoundNaN && isNaN(n2)) {\n const o5 = t3.toHere(c4);\n if (o5.length !== 3 || o5[1] !== 126 || o5[2] !== 0)\n throw new Error(`Invalid NaN encoding: \"${A(o5)}\"`);\n }\n if (e3.rejectSubnormals && l3(t3.toHere(c4 + 1)), e3.rejectLongFloats) {\n const o5 = Q(n2, { chunkSize: 9, reduceUnsafeNumbers: e3.rejectUnsafeFloatInts });\n if (o5[0] >> 5 !== s4)\n throw new Error(`Should have been encoded as int, not float: ${n2}`);\n if (o5.length < v.get(l6))\n throw new Error(`Number should have been encoded shorter: ${n2}`);\n }\n if (typeof n2 == \"number\" && e3.boxed)\n return d(n2, t3.toHere(c4));\n } else {\n if (e3.rejectSimple && n2 instanceof t2)\n throw new Error(`Invalid simple value: ${n2}`);\n if (e3.rejectUndefined && n2 === void 0)\n throw new Error(\"Unexpected undefined\");\n }\n return n2;\n case f.BYTE_STRING:\n case f.UTF8_STRING:\n if (n2 === 1 / 0)\n return new e3.ParentType(r2, 1 / 0, i3, e3);\n if (e3.rejectStringsNotNormalizedAs && typeof n2 == \"string\") {\n const o5 = n2.normalize(e3.rejectStringsNotNormalizedAs);\n if (n2 !== o5)\n throw new Error(`String not normalized as \"${e3.rejectStringsNotNormalizedAs}\", got [${U(n2)}] instead of [${U(o5)}]`);\n }\n return e3.boxed ? d(n2, t3.toHere(c4)) : n2;\n case f.ARRAY:\n return new e3.ParentType(r2, n2, i3, e3);\n case f.MAP:\n return new e3.ParentType(r2, n2 * 2, i3, e3);\n case f.TAG: {\n const o5 = new e3.ParentType(r2, 1, i3, e3);\n return o5.children = new i(n2), o5;\n }\n }\n throw new TypeError(`Invalid major type: ${s4}`);\n }\n static decodeToEncodeOpts(r2) {\n return { ...k, avoidInts: r2.rejectInts, float64: !r2.rejectLongFloats, flushToZero: r2.rejectSubnormals, largeNegativeAsBigInt: r2.rejectLargeNegatives, sortKeys: r2.sortKeys };\n }\n push(r2, i3, e3) {\n if (this.children.push(r2), this.#t) {\n const t3 = f2(r2) || i3.toHere(e3);\n this.#t.push(t3);\n }\n return --this.left;\n }\n replaceLast(r2, i3, e3) {\n let t3, s4 = -1 / 0;\n if (this.children instanceof i ? (s4 = 0, t3 = this.children.contents, this.children.contents = r2) : (s4 = this.children.length - 1, t3 = this.children[s4], this.children[s4] = r2), this.#t) {\n const l6 = f2(r2) || e3.toHere(i3.offset);\n this.#t[s4] = l6;\n }\n return t3;\n }\n convert(r2) {\n let i3;\n switch (this.mt) {\n case f.ARRAY:\n i3 = this.children;\n break;\n case f.MAP: {\n const e3 = this.#r();\n if (this.#e.sortKeys) {\n let t3;\n for (const s4 of e3) {\n if (t3 && this.#e.sortKeys(t3, s4) >= 0)\n throw new Error(`Duplicate or out of order key: \"0x${s4[2]}\"`);\n t3 = s4;\n }\n } else if (this.#e.rejectDuplicateKeys) {\n const t3 = /* @__PURE__ */ new Set();\n for (const [s4, l6, n2] of e3) {\n const c4 = A(n2);\n if (t3.has(c4))\n throw new Error(`Duplicate key: \"0x${c4}\"`);\n t3.add(c4);\n }\n }\n i3 = this.#e.createObject(e3, this.#e);\n break;\n }\n case f.BYTE_STRING:\n return d2(this.children);\n case f.UTF8_STRING: {\n const e3 = this.children.join(\"\");\n i3 = this.#e.boxed ? d(e3, r2.toHere(this.offset)) : e3;\n break;\n }\n case f.TAG:\n i3 = this.children.decode(this.#e);\n break;\n default:\n throw new TypeError(`Invalid mt on convert: ${this.mt}`);\n }\n return this.#e.saveOriginal && i3 && typeof i3 == \"object\" && u(i3, r2.toHere(this.offset)), i3;\n }\n #r() {\n const r2 = this.children, i3 = r2.length;\n if (i3 % 2)\n throw new Error(\"Missing map value\");\n const e3 = new Array(i3 / 2);\n if (this.#t)\n for (let t3 = 0; t3 < i3; t3 += 2)\n e3[t3 >> 1] = [r2[t3], r2[t3 + 1], this.#t[t3]];\n else\n for (let t3 = 0; t3 < i3; t3 += 2)\n e3[t3 >> 1] = [r2[t3], r2[t3 + 1], A2];\n return e3;\n }\n };\n }\n });\n\n // ../../../node_modules/.pnpm/cbor2@2.0.1/node_modules/cbor2/lib/diagnostic.js\n function a2(m2, l6, n2, p4) {\n let t3 = \"\";\n if (l6 === o.INDEFINITE)\n t3 += \"_\";\n else {\n if (p4.diagnosticSizes === o3.NEVER)\n return \"\";\n {\n let r2 = p4.diagnosticSizes === o3.ALWAYS;\n if (!r2) {\n let e3 = o.ZERO;\n if (Object.is(n2, -0))\n e3 = o.TWO;\n else if (m2 === f.POS_INT || m2 === f.NEG_INT) {\n const T4 = n2 < 0, u2 = typeof n2 == \"bigint\" ? 1n : 1, o5 = T4 ? -n2 - u2 : n2;\n o5 <= 23 ? e3 = Number(o5) : o5 <= 255 ? e3 = o.ONE : o5 <= 65535 ? e3 = o.TWO : o5 <= 4294967295 ? e3 = o.FOUR : e3 = o.EIGHT;\n } else\n isFinite(n2) ? Math.fround(n2) === n2 ? s3(n2) == null ? e3 = o.FOUR : e3 = o.TWO : e3 = o.EIGHT : e3 = o.TWO;\n r2 = e3 !== l6;\n }\n r2 && (t3 += \"_\", l6 < o.ONE ? t3 += \"i\" : t3 += String(l6 - 24));\n }\n }\n return t3;\n }\n function M(m2, l6) {\n const n2 = { ...w.defaultDecodeOptions, ...l6, ParentType: g3 }, p4 = new y3(m2, n2);\n let t3, r2, e3 = \"\";\n for (const T4 of p4) {\n const [u2, o5, i3] = T4;\n switch (t3 && (t3.count > 0 && i3 !== N.BREAK && (t3.mt === f.MAP && t3.count % 2 ? e3 += \": \" : (e3 += \",\", n2.pretty || (e3 += \" \"))), n2.pretty && (t3.mt !== f.MAP || t3.count % 2 === 0) && (e3 += `\n${O.repeat(t3.depth + 1)}`)), r2 = w.create(T4, t3, n2, p4), u2) {\n case f.POS_INT:\n case f.NEG_INT:\n e3 += String(i3), e3 += a2(u2, o5, i3, n2);\n break;\n case f.SIMPLE_FLOAT:\n if (i3 !== N.BREAK)\n if (typeof i3 == \"number\") {\n const c4 = Object.is(i3, -0) ? \"-0.0\" : String(i3);\n e3 += c4, isFinite(i3) && !/[.e]/.test(c4) && (e3 += \".0\"), e3 += a2(u2, o5, i3, n2);\n } else\n i3 instanceof t2 ? (e3 += \"simple(\", e3 += String(i3.value), e3 += a2(f.POS_INT, o5, i3.value, n2), e3 += \")\") : e3 += String(i3);\n break;\n case f.BYTE_STRING:\n i3 === 1 / 0 ? (e3 += \"(_ \", r2.close = \")\", r2.quote = \"'\") : (e3 += \"h'\", e3 += A(i3), e3 += \"'\", e3 += a2(f.POS_INT, o5, i3.length, n2));\n break;\n case f.UTF8_STRING:\n i3 === 1 / 0 ? (e3 += \"(_ \", r2.close = \")\") : (e3 += JSON.stringify(i3), e3 += a2(f.POS_INT, o5, y4.encode(i3).length, n2));\n break;\n case f.ARRAY: {\n e3 += \"[\";\n const c4 = a2(f.POS_INT, o5, i3, n2);\n e3 += c4, c4 && (e3 += \" \"), n2.pretty && i3 ? r2.close = `\n${O.repeat(r2.depth)}]` : r2.close = \"]\";\n break;\n }\n case f.MAP: {\n e3 += \"{\";\n const c4 = a2(f.POS_INT, o5, i3, n2);\n e3 += c4, c4 && (e3 += \" \"), n2.pretty && i3 ? r2.close = `\n${O.repeat(r2.depth)}}` : r2.close = \"}\";\n break;\n }\n case f.TAG:\n e3 += String(i3), e3 += a2(f.POS_INT, o5, i3, n2), e3 += \"(\", r2.close = \")\";\n break;\n }\n if (r2 === N.BREAK)\n if (t3?.isStreaming)\n t3.left = 0;\n else\n throw new Error(\"Unexpected BREAK\");\n else\n t3 && (t3.count++, t3.left--);\n for (r2 instanceof g3 && (t3 = r2); t3?.done; ) {\n if (t3.isEmptyStream)\n e3 = e3.slice(0, -3), e3 += `${t3.quote}${t3.quote}_`;\n else {\n if (t3.mt === f.MAP && t3.count % 2 !== 0)\n throw new Error(`Odd streaming map size: ${t3.count}`);\n e3 += t3.close;\n }\n t3 = t3.parent;\n }\n }\n return e3;\n }\n var O, y4, g3;\n var init_diagnostic = __esm({\n \"../../../node_modules/.pnpm/cbor2@2.0.1/node_modules/cbor2/lib/diagnostic.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_options();\n init_constants();\n init_container();\n init_decodeStream2();\n init_simple();\n init_float();\n init_utils();\n O = \" \";\n y4 = new TextEncoder();\n g3 = class extends w {\n close = \"\";\n quote = '\"';\n get isEmptyStream() {\n return (this.mt === f.UTF8_STRING || this.mt === f.BYTE_STRING) && this.count === 0;\n }\n };\n }\n });\n\n // ../../../node_modules/.pnpm/cbor2@2.0.1/node_modules/cbor2/lib/comment.js\n function k3(t3) {\n return t3 instanceof A3;\n }\n function O2(t3, a3) {\n return t3 === 1 / 0 ? \"Indefinite\" : a3 ? `${t3} ${a3}${t3 !== 1 && t3 !== 1n ? \"s\" : \"\"}` : String(t3);\n }\n function y5(t3) {\n return \"\".padStart(t3, \" \");\n }\n function x2(t3, a3, f6) {\n let e3 = \"\";\n e3 += y5(t3.depth * 2);\n const n2 = f2(t3);\n e3 += A(n2.subarray(0, 1));\n const r2 = t3.numBytes();\n r2 && (e3 += \" \", e3 += A(n2.subarray(1, r2 + 1))), e3 = e3.padEnd(a3.minCol + 1, \" \"), e3 += \"-- \", f6 !== void 0 && (e3 += y5(t3.depth * 2), f6 !== \"\" && (e3 += `[${f6}] `));\n let p4 = false;\n const [s4] = t3.children;\n switch (t3.mt) {\n case f.POS_INT:\n e3 += `Unsigned: ${s4}`, typeof s4 == \"bigint\" && (e3 += \"n\");\n break;\n case f.NEG_INT:\n e3 += `Negative: ${s4}`, typeof s4 == \"bigint\" && (e3 += \"n\");\n break;\n case f.BYTE_STRING:\n e3 += `Bytes (Length: ${O2(t3.length)})`;\n break;\n case f.UTF8_STRING:\n e3 += `UTF8 (Length: ${O2(t3.length)})`, t3.length !== 1 / 0 && (e3 += `: ${JSON.stringify(s4)}`);\n break;\n case f.ARRAY:\n e3 += `Array (Length: ${O2(t3.value, \"item\")})`;\n break;\n case f.MAP:\n e3 += `Map (Length: ${O2(t3.value, \"pair\")})`;\n break;\n case f.TAG: {\n e3 += `Tag #${t3.value}`;\n const o5 = t3.children, [m2] = o5.contents.children, i3 = new i(o5.tag, m2);\n u(i3, n2);\n const l6 = i3.comment(a3, t3.depth);\n l6 && (e3 += \": \", e3 += l6), p4 ||= i3.noChildren;\n break;\n }\n case f.SIMPLE_FLOAT:\n s4 === N.BREAK ? e3 += \"BREAK\" : t3.ai > o.ONE ? Object.is(s4, -0) ? e3 += \"Float: -0\" : e3 += `Float: ${s4}` : (e3 += \"Simple: \", s4 instanceof t2 ? e3 += s4.value : e3 += s4);\n break;\n }\n if (!p4)\n if (t3.leaf) {\n if (e3 += `\n`, n2.length > r2 + 1) {\n const o5 = y5((t3.depth + 1) * 2), m2 = f3(n2);\n if (m2?.length) {\n m2.sort((l6, c4) => {\n const g4 = l6[0] - c4[0];\n return g4 || c4[1] - l6[1];\n });\n let i3 = 0;\n for (const [l6, c4, g4] of m2)\n if (!(l6 < i3)) {\n if (i3 = l6 + c4, g4 === \"<<\") {\n e3 += y5(a3.minCol + 1), e3 += \"--\", e3 += o5, e3 += \"<< \";\n const d5 = R(n2, l6, l6 + c4), h4 = f3(d5);\n if (h4) {\n const $3 = h4.findIndex(([w3, D2, v2]) => w3 === 0 && D2 === c4 && v2 === \"<<\");\n $3 >= 0 && h4.splice($3, 1);\n }\n e3 += M(d5), e3 += ` >>\n`, e3 += L(d5, { initialDepth: t3.depth + 1, minCol: a3.minCol, noPrefixHex: true });\n continue;\n } else\n g4 === \"'\" && (e3 += y5(a3.minCol + 1), e3 += \"--\", e3 += o5, e3 += \"'\", e3 += H2.decode(n2.subarray(l6, l6 + c4)), e3 += `'\n`);\n if (l6 > r2)\n for (let d5 = l6; d5 < l6 + c4; d5 += 8) {\n const h4 = Math.min(d5 + 8, l6 + c4);\n e3 += o5, e3 += A(n2.subarray(d5, h4)), e3 += `\n`;\n }\n }\n } else\n for (let i3 = r2 + 1; i3 < n2.length; i3 += 8)\n e3 += o5, e3 += A(n2.subarray(i3, i3 + 8)), e3 += `\n`;\n }\n } else {\n e3 += `\n`;\n let o5 = 0;\n for (const m2 of t3.children) {\n if (k3(m2)) {\n let i3 = String(o5);\n t3.mt === f.MAP ? i3 = o5 % 2 ? `val ${(o5 - 1) / 2}` : `key ${o5 / 2}` : t3.mt === f.TAG && (i3 = \"\"), e3 += x2(m2, a3, i3);\n }\n o5++;\n }\n }\n return e3;\n }\n function L(t3, a3) {\n const f6 = { ...q2, ...a3, ParentType: A3, saveOriginal: true }, e3 = new y3(t3, f6);\n let n2, r2;\n for (const s4 of e3) {\n if (r2 = w.create(s4, n2, f6, e3), s4[2] === N.BREAK)\n if (n2?.isStreaming)\n n2.left = 1;\n else\n throw new Error(\"Unexpected BREAK\");\n if (!k3(r2)) {\n const i3 = new A3(s4, 0, n2, f6);\n i3.leaf = true, i3.children.push(r2), u(i3, e3.toHere(s4[3])), r2 = i3;\n }\n let o5 = (r2.depth + 1) * 2;\n const m2 = r2.numBytes();\n for (m2 && (o5 += 1, o5 += m2 * 2), f6.minCol = Math.max(f6.minCol, o5), n2 && n2.push(r2, e3, s4[3]), n2 = r2; n2?.done; )\n r2 = n2, r2.leaf || u(r2, e3.toHere(r2.offset)), { parent: n2 } = n2;\n }\n a3 && (a3.minCol = f6.minCol);\n let p4 = f6.noPrefixHex ? \"\" : `0x${A(e3.toHere(0))}\n`;\n return p4 += x2(r2, f6), p4;\n }\n var H2, A3, q2;\n var init_comment = __esm({\n \"../../../node_modules/.pnpm/cbor2@2.0.1/node_modules/cbor2/lib/comment.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_constants();\n init_box();\n init_utils();\n init_container();\n init_decodeStream2();\n init_simple();\n init_tag();\n init_diagnostic();\n H2 = new TextDecoder();\n A3 = class extends w {\n depth = 0;\n leaf = false;\n value;\n length;\n [N.ENCODED];\n constructor(a3, f6, e3, n2) {\n super(a3, f6, e3, n2), this.parent ? this.depth = this.parent.depth + 1 : this.depth = n2.initialDepth, [, , this.value, , this.length] = a3;\n }\n numBytes() {\n switch (this.ai) {\n case o.ONE:\n return 1;\n case o.TWO:\n return 2;\n case o.FOUR:\n return 4;\n case o.EIGHT:\n return 8;\n }\n return 0;\n }\n };\n q2 = { ...w.defaultDecodeOptions, initialDepth: 0, noPrefixHex: false, minCol: 0 };\n }\n });\n\n // ../../../node_modules/.pnpm/cbor2@2.0.1/node_modules/cbor2/lib/types.js\n function O3(e3) {\n if (typeof e3 == \"object\" && e3) {\n if (e3.constructor !== Number)\n throw new Error(`Expected number: ${e3}`);\n } else if (typeof e3 != \"number\")\n throw new Error(`Expected number: ${e3}`);\n }\n function E(e3) {\n if (typeof e3 == \"object\" && e3) {\n if (e3.constructor !== String)\n throw new Error(`Expected string: ${e3}`);\n } else if (typeof e3 != \"string\")\n throw new Error(`Expected string: ${e3}`);\n }\n function f5(e3) {\n if (!(e3 instanceof Uint8Array))\n throw new Error(`Expected Uint8Array: ${e3}`);\n }\n function U3(e3) {\n if (!Array.isArray(e3))\n throw new Error(`Expected Array: ${e3}`);\n }\n function h3(e3) {\n return E(e3.contents), new Date(e3.contents);\n }\n function N3(e3) {\n return O3(e3.contents), new Date(e3.contents * 1e3);\n }\n function T3(e3, r2, n2) {\n if (f5(r2.contents), n2.rejectBigInts)\n throw new Error(`Decoding unwanted big integer: ${r2}(h'${A(r2.contents)}')`);\n if (n2.requirePreferred && r2.contents[0] === 0)\n throw new Error(`Decoding overly-large bigint: ${r2.tag}(h'${A(r2.contents)})`);\n let t3 = r2.contents.reduce((o5, d5) => o5 << 8n | BigInt(d5), 0n);\n if (e3 && (t3 = -1n - t3), n2.requirePreferred && t3 >= Number.MIN_SAFE_INTEGER && t3 <= Number.MAX_SAFE_INTEGER)\n throw new Error(`Decoding bigint that could have been int: ${t3}n`);\n return n2.boxed ? d(t3, r2.contents) : t3;\n }\n function D(e3, r2) {\n return f5(e3.contents), e3;\n }\n function c2(e3, r2, n2) {\n f5(e3.contents);\n let t3 = e3.contents.length;\n if (t3 % r2.BYTES_PER_ELEMENT !== 0)\n throw new Error(`Number of bytes must be divisible by ${r2.BYTES_PER_ELEMENT}, got: ${t3}`);\n t3 /= r2.BYTES_PER_ELEMENT;\n const o5 = new r2(t3), d5 = new DataView(e3.contents.buffer, e3.contents.byteOffset, e3.contents.byteLength), u2 = d5[`get${r2.name.replace(/Array/, \"\")}`].bind(d5);\n for (let y6 = 0; y6 < t3; y6++)\n o5[y6] = u2(y6 * r2.BYTES_PER_ELEMENT, n2);\n return o5;\n }\n function l4(e3, r2, n2, t3, o5) {\n const d5 = o5.forceEndian ?? S2;\n if (p2(d5 ? r2 : n2, e3, o5), a(t3.byteLength, e3, f.BYTE_STRING), S2 === d5)\n e3.write(new Uint8Array(t3.buffer, t3.byteOffset, t3.byteLength));\n else {\n const y6 = `write${t3.constructor.name.replace(/Array/, \"\")}`, g4 = e3[y6].bind(e3);\n for (const p4 of t3)\n g4(p4, d5);\n }\n }\n function x3(e3) {\n return f5(e3.contents), new Wtf8Decoder().decode(e3.contents);\n }\n function w2(e3) {\n throw new Error(`Encoding ${e3.constructor.name} intentionally unimplmented. It is not concrete enough to interoperate. Convert to Uint8Array first.`);\n }\n function m(e3) {\n return [NaN, e3.valueOf()];\n }\n var S2, _, $2;\n var init_types = __esm({\n \"../../../node_modules/.pnpm/cbor2@2.0.1/node_modules/cbor2/lib/types.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_constants();\n init_box();\n init_utils();\n init_encoder();\n init_container();\n init_tag();\n init_lib();\n init_comment();\n S2 = !h();\n ce(Map, (e3, r2, n2) => {\n const t3 = [...e3.entries()].map((o5) => [o5[0], o5[1], Q(o5[0], n2)]);\n if (n2.rejectDuplicateKeys) {\n const o5 = /* @__PURE__ */ new Set();\n for (const [d5, u2, y6] of t3) {\n const g4 = A(y6);\n if (o5.has(g4))\n throw new Error(`Duplicate map key: 0x${g4}`);\n o5.add(g4);\n }\n }\n n2.sortKeys && t3.sort(n2.sortKeys), R2(e3, e3.size, f.MAP, r2, n2);\n for (const [o5, d5, u2] of t3)\n r2.write(u2), g2(d5, r2, n2);\n });\n h3.comment = (e3) => (E(e3.contents), `(String Date) ${new Date(e3.contents).toISOString()}`), i.registerDecoder(I.DATE_STRING, h3);\n N3.comment = (e3) => (O3(e3.contents), `(Epoch Date) ${new Date(e3.contents * 1e3).toISOString()}`), i.registerDecoder(I.DATE_EPOCH, N3), ce(Date, (e3) => [I.DATE_EPOCH, e3.valueOf() / 1e3]);\n _ = T3.bind(null, false);\n $2 = T3.bind(null, true);\n _.comment = (e3, r2) => `(Positive BigInt) ${T3(false, e3, r2)}n`, $2.comment = (e3, r2) => `(Negative BigInt) ${T3(true, e3, r2)}n`, i.registerDecoder(I.POS_BIGINT, _), i.registerDecoder(I.NEG_BIGINT, $2);\n D.comment = (e3, r2, n2) => {\n f5(e3.contents);\n const t3 = { ...r2, initialDepth: n2 + 2, noPrefixHex: true }, o5 = f2(e3);\n let u2 = 2 ** ((o5[0] & 31) - 24) + 1;\n const y6 = o5[u2] & 31;\n let g4 = A(o5.subarray(u2, ++u2));\n y6 >= 24 && (g4 += \" \", g4 += A(o5.subarray(u2, u2 + 2 ** (y6 - 24)))), t3.minCol = Math.max(t3.minCol, (n2 + 1) * 2 + g4.length);\n const p4 = L(e3.contents, t3);\n let I2 = `Embedded CBOR\n`;\n return I2 += `${\"\".padStart((n2 + 1) * 2, \" \")}${g4}`.padEnd(t3.minCol + 1, \" \"), I2 += `-- Bytes (Length: ${e3.contents.length})\n`, I2 += p4, I2;\n }, D.noChildren = true, i.registerDecoder(I.CBOR, D), i.registerDecoder(I.URI, (e3) => (E(e3.contents), new URL(e3.contents)), \"URI\"), ce(URL, (e3) => [I.URI, e3.toString()]), i.registerDecoder(I.BASE64URL, (e3) => (E(e3.contents), x(e3.contents)), \"Base64url-encoded\"), i.registerDecoder(I.BASE64, (e3) => (E(e3.contents), y(e3.contents)), \"Base64-encoded\"), i.registerDecoder(35, (e3) => (E(e3.contents), new RegExp(e3.contents)), \"RegExp\"), i.registerDecoder(21065, (e3) => {\n E(e3.contents);\n const r2 = `^(?:${e3.contents})$`;\n return new RegExp(r2, \"u\");\n }, \"I-RegExp\"), i.registerDecoder(I.REGEXP, (e3) => {\n if (U3(e3.contents), e3.contents.length < 1 || e3.contents.length > 2)\n throw new Error(`Invalid RegExp Array: ${e3.contents}`);\n return new RegExp(e3.contents[0], e3.contents[1]);\n }, \"RegExp\"), ce(RegExp, (e3) => [I.REGEXP, [e3.source, e3.flags]]), i.registerDecoder(64, (e3) => (f5(e3.contents), e3.contents), \"uint8 Typed Array\");\n i.registerDecoder(65, (e3) => c2(e3, Uint16Array, false), \"uint16, big endian, Typed Array\"), i.registerDecoder(66, (e3) => c2(e3, Uint32Array, false), \"uint32, big endian, Typed Array\"), i.registerDecoder(67, (e3) => c2(e3, BigUint64Array, false), \"uint64, big endian, Typed Array\"), i.registerDecoder(68, (e3) => (f5(e3.contents), new Uint8ClampedArray(e3.contents)), \"uint8 Typed Array, clamped arithmetic\"), ce(Uint8ClampedArray, (e3) => [68, new Uint8Array(e3.buffer, e3.byteOffset, e3.byteLength)]), i.registerDecoder(69, (e3) => c2(e3, Uint16Array, true), \"uint16, little endian, Typed Array\"), ce(Uint16Array, (e3, r2, n2) => l4(r2, 69, 65, e3, n2)), i.registerDecoder(70, (e3) => c2(e3, Uint32Array, true), \"uint32, little endian, Typed Array\"), ce(Uint32Array, (e3, r2, n2) => l4(r2, 70, 66, e3, n2)), i.registerDecoder(71, (e3) => c2(e3, BigUint64Array, true), \"uint64, little endian, Typed Array\"), ce(BigUint64Array, (e3, r2, n2) => l4(r2, 71, 67, e3, n2)), i.registerDecoder(72, (e3) => (f5(e3.contents), new Int8Array(e3.contents)), \"sint8 Typed Array\"), ce(Int8Array, (e3) => [72, new Uint8Array(e3.buffer, e3.byteOffset, e3.byteLength)]), i.registerDecoder(73, (e3) => c2(e3, Int16Array, false), \"sint16, big endian, Typed Array\"), i.registerDecoder(74, (e3) => c2(e3, Int32Array, false), \"sint32, big endian, Typed Array\"), i.registerDecoder(75, (e3) => c2(e3, BigInt64Array, false), \"sint64, big endian, Typed Array\"), i.registerDecoder(77, (e3) => c2(e3, Int16Array, true), \"sint16, little endian, Typed Array\"), ce(Int16Array, (e3, r2, n2) => l4(r2, 77, 73, e3, n2)), i.registerDecoder(78, (e3) => c2(e3, Int32Array, true), \"sint32, little endian, Typed Array\"), ce(Int32Array, (e3, r2, n2) => l4(r2, 78, 74, e3, n2)), i.registerDecoder(79, (e3) => c2(e3, BigInt64Array, true), \"sint64, little endian, Typed Array\"), ce(BigInt64Array, (e3, r2, n2) => l4(r2, 79, 75, e3, n2)), i.registerDecoder(81, (e3) => c2(e3, Float32Array, false), \"IEEE 754 binary32, big endian, Typed Array\"), i.registerDecoder(82, (e3) => c2(e3, Float64Array, false), \"IEEE 754 binary64, big endian, Typed Array\"), i.registerDecoder(85, (e3) => c2(e3, Float32Array, true), \"IEEE 754 binary32, little endian, Typed Array\"), ce(Float32Array, (e3, r2, n2) => l4(r2, 85, 81, e3, n2)), i.registerDecoder(86, (e3) => c2(e3, Float64Array, true), \"IEEE 754 binary64, big endian, Typed Array\"), ce(Float64Array, (e3, r2, n2) => l4(r2, 86, 82, e3, n2)), i.registerDecoder(I.SET, (e3, r2) => {\n if (U3(e3.contents), r2.sortKeys) {\n const n2 = w.decodeToEncodeOpts(r2);\n let t3 = null;\n for (const o5 of e3.contents) {\n const d5 = [o5, void 0, Q(o5, n2)];\n if (t3 && r2.sortKeys(t3, d5) >= 0)\n throw new Error(`Set items out of order in tag #${I.SET}`);\n t3 = d5;\n }\n }\n return new Set(e3.contents);\n }, \"Set\"), ce(Set, (e3, r2, n2) => {\n let t3 = [...e3];\n if (n2.sortKeys) {\n const o5 = t3.map((d5) => [d5, void 0, Q(d5, n2)]);\n o5.sort(n2.sortKeys), t3 = o5.map(([d5]) => d5);\n }\n return [I.SET, t3];\n }), i.registerDecoder(I.JSON, (e3) => (E(e3.contents), JSON.parse(e3.contents)), \"JSON-encoded\");\n x3.comment = (e3) => {\n f5(e3.contents);\n const r2 = new Wtf8Decoder();\n return `(WTF8 string): ${JSON.stringify(r2.decode(e3.contents))}`;\n }, i.registerDecoder(I.WTF8, x3), i.registerDecoder(I.SELF_DESCRIBED, (e3) => e3.contents, \"Self-Described\"), i.registerDecoder(I.INVALID_16, () => {\n throw new Error(`Tag always invalid: ${I.INVALID_16}`);\n }, \"Invalid\"), i.registerDecoder(I.INVALID_32, () => {\n throw new Error(`Tag always invalid: ${I.INVALID_32}`);\n }, \"Invalid\"), i.registerDecoder(I.INVALID_64, () => {\n throw new Error(`Tag always invalid: ${I.INVALID_64}`);\n }, \"Invalid\");\n ce(ArrayBuffer, w2), ce(DataView, w2), typeof SharedArrayBuffer < \"u\" && ce(SharedArrayBuffer, w2);\n ce(Boolean, m), ce(Number, m), ce(String, m), ce(BigInt, m);\n }\n });\n\n // ../../../node_modules/.pnpm/cbor2@2.0.1/node_modules/cbor2/lib/version.js\n var o4;\n var init_version = __esm({\n \"../../../node_modules/.pnpm/cbor2@2.0.1/node_modules/cbor2/lib/version.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n o4 = \"2.0.1\";\n }\n });\n\n // ../../../node_modules/.pnpm/cbor2@2.0.1/node_modules/cbor2/lib/decoder.js\n function c3(i3) {\n const e3 = { ...w.defaultDecodeOptions };\n if (i3.dcbor ? Object.assign(e3, w.dcborDecodeOptions) : i3.cde && Object.assign(e3, w.cdeDecodeOptions), Object.assign(e3, i3), Object.hasOwn(e3, \"rejectLongNumbers\"))\n throw new TypeError(\"rejectLongNumbers has changed to requirePreferred\");\n return e3.boxed && (e3.saveOriginal = true), e3;\n }\n function l5(i3, e3 = {}) {\n const n2 = c3(e3), t3 = new y3(i3, n2), r2 = new d3();\n for (const o5 of t3)\n r2.step(o5, n2, t3);\n return r2.ret;\n }\n function* b3(i3, e3 = {}) {\n const n2 = c3(e3), t3 = new y3(i3, n2), r2 = new d3();\n for (const o5 of t3.seq())\n r2.step(o5, n2, t3), r2.parent || (yield r2.ret);\n }\n var d3, O4;\n var init_decoder = __esm({\n \"../../../node_modules/.pnpm/cbor2@2.0.1/node_modules/cbor2/lib/decoder.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_decodeStream2();\n init_container();\n init_constants();\n d3 = class {\n parent = void 0;\n ret = void 0;\n step(e3, n2, t3) {\n if (this.ret = w.create(e3, this.parent, n2, t3), e3[2] === N.BREAK)\n if (this.parent?.isStreaming)\n this.parent.left = 0;\n else\n throw new Error(\"Unexpected BREAK\");\n else\n this.parent && this.parent.push(this.ret, t3, e3[3]);\n for (this.ret instanceof w && (this.parent = this.ret); this.parent?.done; ) {\n this.ret = this.parent.convert(t3);\n const r2 = this.parent.parent;\n r2?.replaceLast(this.ret, this.parent, t3), this.parent = r2;\n }\n }\n };\n O4 = class {\n #t;\n #e;\n constructor(e3, n2 = {}) {\n const t3 = new y3(e3, c3(n2));\n this.#t = t3.seq();\n }\n peek() {\n return this.#e || (this.#e = this.#n()), this.#e;\n }\n read() {\n const e3 = this.#e ?? this.#n();\n return this.#e = void 0, e3;\n }\n *[Symbol.iterator]() {\n for (; ; ) {\n const e3 = this.read();\n if (!e3)\n return;\n yield e3;\n }\n }\n #n() {\n const { value: e3, done: n2 } = this.#t.next();\n if (!n2)\n return e3;\n }\n };\n }\n });\n\n // ../../../node_modules/.pnpm/cbor2@2.0.1/node_modules/cbor2/lib/index.js\n var lib_exports = {};\n __export(lib_exports, {\n DiagnosticSizes: () => o3,\n SequenceEvents: () => O4,\n Simple: () => t2,\n Tag: () => i,\n TypeEncoderMap: () => s2,\n Writer: () => e,\n cdeDecodeOptions: () => r,\n cdeEncodeOptions: () => F,\n comment: () => L,\n dcborDecodeOptions: () => n,\n dcborEncodeOptions: () => H,\n decode: () => l5,\n decodeSequence: () => b3,\n defaultDecodeOptions: () => d4,\n defaultEncodeOptions: () => k,\n diagnose: () => M,\n encode: () => Q,\n encodedNumber: () => de,\n getEncoded: () => f2,\n saveEncoded: () => u,\n saveEncodedLength: () => l,\n unbox: () => t,\n version: () => o4\n });\n var r, n, d4;\n var init_lib2 = __esm({\n \"../../../node_modules/.pnpm/cbor2@2.0.1/node_modules/cbor2/lib/index.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_types();\n init_version();\n init_container();\n init_options();\n init_decoder();\n init_diagnostic();\n init_comment();\n init_encoder();\n init_simple();\n init_tag();\n init_writer();\n init_box();\n init_typeEncoderMap();\n ({ cdeDecodeOptions: r, dcborDecodeOptions: n, defaultDecodeOptions: d4 } = w);\n }\n });\n\n // ../../libs/contracts-sdk/dist/src/utils/policyParams.js\n var require_policyParams = __commonJS({\n \"../../libs/contracts-sdk/dist/src/utils/policyParams.js\"(exports3) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n Object.defineProperty(exports3, \"__esModule\", { value: true });\n exports3.encodePermissionDataForChain = encodePermissionDataForChain;\n exports3.decodePolicyParametersFromChain = decodePolicyParametersFromChain;\n exports3.decodePermissionDataFromChain = decodePermissionDataFromChain;\n exports3.decodePolicyParametersForOneAbility = decodePolicyParametersForOneAbility;\n var cbor2_1 = (init_lib2(), __toCommonJS(lib_exports));\n var utils_1 = require_utils6();\n function encodePermissionDataForChain(permissionData, deletePermissionData) {\n const abilityIpfsCids = [];\n const policyIpfsCids = [];\n const policyParameterValues = [];\n const safePermissionData = permissionData ?? {};\n if (deletePermissionData) {\n for (const abilityIpfsCid of Object.keys(deletePermissionData)) {\n if (safePermissionData[abilityIpfsCid]) {\n throw new Error(`deletePermissionData contains ability ${abilityIpfsCid} which also exists in permissionData. Please separate updates and deletes by ability.`);\n }\n }\n }\n const abilityKeys = [\n ...Object.keys(safePermissionData),\n ...deletePermissionData ? Object.keys(deletePermissionData) : []\n ];\n abilityKeys.forEach((abilityIpfsCid) => {\n abilityIpfsCids.push(abilityIpfsCid);\n const abilityPolicies = safePermissionData[abilityIpfsCid];\n const policiesToDelete = deletePermissionData?.[abilityIpfsCid];\n const abilityPolicyIpfsCids = [];\n const abilityPolicyParameterValues = [];\n if (abilityPolicies) {\n Object.keys(abilityPolicies).forEach((policyIpfsCid) => {\n abilityPolicyIpfsCids.push(policyIpfsCid);\n const policyParams = abilityPolicies[policyIpfsCid];\n const encodedParams = (0, cbor2_1.encode)(policyParams, { collapseBigInts: false });\n abilityPolicyParameterValues.push((0, utils_1.hexlify)(encodedParams));\n });\n } else if (policiesToDelete && policiesToDelete.length > 0) {\n for (const policyIpfsCid of policiesToDelete) {\n abilityPolicyIpfsCids.push(policyIpfsCid);\n abilityPolicyParameterValues.push(\"0x\");\n }\n }\n policyIpfsCids.push(abilityPolicyIpfsCids);\n policyParameterValues.push(abilityPolicyParameterValues);\n });\n return {\n abilityIpfsCids,\n policyIpfsCids,\n policyParameterValues\n };\n }\n function decodePolicyParametersFromChain(policy) {\n const encodedParams = policy.policyParameterValues;\n try {\n const byteArray = (0, utils_1.arrayify)(encodedParams);\n return (0, cbor2_1.decode)(byteArray);\n } catch (error) {\n console.error(\"Error decoding policy parameters:\", error);\n throw error;\n }\n }\n function decodePermissionDataFromChain(abilitiesWithPolicies) {\n const permissionData = {};\n for (const ability of abilitiesWithPolicies) {\n const { abilityIpfsCid, policies } = ability;\n permissionData[abilityIpfsCid] = decodePolicyParametersForOneAbility({ policies });\n }\n return permissionData;\n }\n function decodePolicyParametersForOneAbility({ policies }) {\n const policyParamsDict = {};\n for (const policy of policies) {\n const { policyIpfsCid, policyParameterValues } = policy;\n if (!policyParameterValues || policyParameterValues === \"0x\") {\n continue;\n }\n policyParamsDict[policyIpfsCid] = decodePolicyParametersFromChain(policy);\n }\n return policyParamsDict;\n }\n }\n });\n\n // ../../libs/contracts-sdk/dist/src/internal/user/User.js\n var require_User = __commonJS({\n \"../../libs/contracts-sdk/dist/src/internal/user/User.js\"(exports3) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n Object.defineProperty(exports3, \"__esModule\", { value: true });\n exports3.permitApp = permitApp;\n exports3.unPermitApp = unPermitApp;\n exports3.rePermitApp = rePermitApp;\n exports3.setAbilityPolicyParameters = setAbilityPolicyParameters;\n var utils_1 = require_utils7();\n var pkpInfo_1 = require_pkpInfo();\n var policyParams_1 = require_policyParams();\n async function permitApp(params) {\n const { contract, args: { pkpEthAddress, appId, appVersion, permissionData }, overrides } = params;\n try {\n const pkpTokenId = await (0, pkpInfo_1.getPkpTokenId)({ pkpEthAddress, signer: contract.signer });\n const flattenedParams = (0, policyParams_1.encodePermissionDataForChain)(permissionData);\n const adjustedOverrides = await (0, utils_1.gasAdjustedOverrides)(contract, \"permitAppVersion\", [\n pkpTokenId,\n appId,\n appVersion,\n flattenedParams.abilityIpfsCids,\n flattenedParams.policyIpfsCids,\n flattenedParams.policyParameterValues\n ], overrides);\n const tx = await contract.permitAppVersion(pkpTokenId, appId, appVersion, flattenedParams.abilityIpfsCids, flattenedParams.policyIpfsCids, flattenedParams.policyParameterValues, {\n ...adjustedOverrides\n });\n await tx.wait();\n return {\n txHash: tx.hash\n };\n } catch (error) {\n const decodedError = (0, utils_1.decodeContractError)(error, contract);\n throw new Error(`Failed to Permit App: ${decodedError}`);\n }\n }\n async function unPermitApp({ contract, args: { pkpEthAddress, appId, appVersion }, overrides }) {\n try {\n const pkpTokenId = await (0, pkpInfo_1.getPkpTokenId)({ pkpEthAddress, signer: contract.signer });\n const adjustedOverrides = await (0, utils_1.gasAdjustedOverrides)(contract, \"unPermitAppVersion\", [pkpTokenId, appId, appVersion], overrides);\n const tx = await contract.unPermitAppVersion(pkpTokenId, appId, appVersion, {\n ...adjustedOverrides\n });\n await tx.wait();\n return {\n txHash: tx.hash\n };\n } catch (error) {\n const decodedError = (0, utils_1.decodeContractError)(error, contract);\n throw new Error(`Failed to UnPermit App: ${decodedError}`);\n }\n }\n async function rePermitApp(params) {\n const { contract, args: { pkpEthAddress, appId }, overrides } = params;\n try {\n const pkpTokenId = await (0, pkpInfo_1.getPkpTokenId)({ pkpEthAddress, signer: contract.signer });\n const adjustedOverrides = await (0, utils_1.gasAdjustedOverrides)(contract, \"rePermitApp\", [pkpTokenId, appId], overrides);\n const tx = await contract.rePermitApp(pkpTokenId, appId, {\n ...adjustedOverrides\n });\n await tx.wait();\n return {\n txHash: tx.hash\n };\n } catch (error) {\n const decodedError = (0, utils_1.decodeContractError)(error, contract);\n throw new Error(`Failed to Re-Permit App: ${decodedError}`);\n }\n }\n async function setAbilityPolicyParameters(params) {\n const { contract, args: { appId, appVersion, pkpEthAddress, policyParams, deletePermissionData }, overrides } = params;\n try {\n const pkpTokenId = await (0, pkpInfo_1.getPkpTokenId)({ pkpEthAddress, signer: contract.signer });\n const flattenedParams = (0, policyParams_1.encodePermissionDataForChain)(policyParams, deletePermissionData);\n const adjustedOverrides = await (0, utils_1.gasAdjustedOverrides)(contract, \"setAbilityPolicyParameters\", [\n pkpTokenId,\n appId,\n appVersion,\n flattenedParams.abilityIpfsCids,\n flattenedParams.policyIpfsCids,\n flattenedParams.policyParameterValues\n ], overrides);\n const tx = await contract.setAbilityPolicyParameters(pkpTokenId, appId, appVersion, flattenedParams.abilityIpfsCids, flattenedParams.policyIpfsCids, flattenedParams.policyParameterValues, {\n ...adjustedOverrides\n });\n await tx.wait();\n return {\n txHash: tx.hash\n };\n } catch (error) {\n const decodedError = (0, utils_1.decodeContractError)(error, contract);\n throw new Error(`Failed to Set Ability Policy Parameters: ${decodedError}`);\n }\n }\n }\n });\n\n // ../../libs/contracts-sdk/dist/src/internal/user/UserView.js\n var require_UserView = __commonJS({\n \"../../libs/contracts-sdk/dist/src/internal/user/UserView.js\"(exports3) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n Object.defineProperty(exports3, \"__esModule\", { value: true });\n exports3.getAllRegisteredAgentPkpEthAddresses = getAllRegisteredAgentPkpEthAddresses;\n exports3.getPermittedAppVersionForPkp = getPermittedAppVersionForPkp;\n exports3.getAllPermittedAppIdsForPkp = getAllPermittedAppIdsForPkp;\n exports3.getPermittedAppsForPkps = getPermittedAppsForPkps;\n exports3.getAllAbilitiesAndPoliciesForApp = getAllAbilitiesAndPoliciesForApp;\n exports3.validateAbilityExecutionAndGetPolicies = validateAbilityExecutionAndGetPolicies;\n exports3.getLastPermittedAppVersionForPkp = getLastPermittedAppVersionForPkp;\n exports3.getUnpermittedAppsForPkps = getUnpermittedAppsForPkps;\n exports3.isDelegateePermitted = isDelegateePermitted;\n var constants_1 = require_constants3();\n var utils_1 = require_utils7();\n var pkpInfo_1 = require_pkpInfo();\n var policyParams_1 = require_policyParams();\n async function getAllRegisteredAgentPkpEthAddresses(params) {\n const { contract, args: { userPkpAddress, offset } } = params;\n try {\n const pkpTokenIds = await contract.getAllRegisteredAgentPkps(userPkpAddress, offset);\n const pkpEthAdddresses = [];\n for (const tokenId of pkpTokenIds) {\n const pkpEthAddress = await (0, pkpInfo_1.getPkpEthAddress)({ signer: contract.signer, tokenId });\n pkpEthAdddresses.push(pkpEthAddress);\n }\n return pkpEthAdddresses;\n } catch (error) {\n const decodedError = (0, utils_1.decodeContractError)(error, contract);\n if (decodedError.includes(\"NoRegisteredPkpsFound\")) {\n return [];\n }\n throw new Error(`Failed to Get All Registered Agent PKPs: ${decodedError}`);\n }\n }\n async function getPermittedAppVersionForPkp(params) {\n const { contract, args: { pkpEthAddress, appId } } = params;\n try {\n const pkpTokenId = await (0, pkpInfo_1.getPkpTokenId)({ pkpEthAddress, signer: contract.signer });\n const appVersion = await contract.getPermittedAppVersionForPkp(pkpTokenId, appId);\n if (!appVersion)\n return null;\n return appVersion;\n } catch (error) {\n const decodedError = (0, utils_1.decodeContractError)(error, contract);\n throw new Error(`Failed to Get Permitted App Version For PKP: ${decodedError}`);\n }\n }\n async function getAllPermittedAppIdsForPkp(params) {\n const { contract, args: { pkpEthAddress, offset } } = params;\n try {\n const pkpTokenId = await (0, pkpInfo_1.getPkpTokenId)({ pkpEthAddress, signer: contract.signer });\n const appIds = await contract.getAllPermittedAppIdsForPkp(pkpTokenId, offset);\n return appIds.map((id) => id);\n } catch (error) {\n const decodedError = (0, utils_1.decodeContractError)(error, contract);\n throw new Error(`Failed to Get All Permitted App IDs For PKP: ${decodedError}`);\n }\n }\n async function getPermittedAppsForPkps(params) {\n const { contract, args: { pkpEthAddresses, offset, pageSize = constants_1.DEFAULT_PAGE_SIZE } } = params;\n try {\n const pkpTokenIds = [];\n for (const pkpEthAddress of pkpEthAddresses) {\n const pkpTokenId = await (0, pkpInfo_1.getPkpTokenId)({ pkpEthAddress, signer: contract.signer });\n pkpTokenIds.push(pkpTokenId);\n }\n const results = await contract.getPermittedAppsForPkps(pkpTokenIds, offset, pageSize);\n return results.map((result) => ({\n pkpTokenId: result.pkpTokenId.toString(),\n permittedApps: result.permittedApps.map((app) => ({\n appId: app.appId,\n version: app.version,\n versionEnabled: app.versionEnabled,\n isDeleted: app.isDeleted\n }))\n }));\n } catch (error) {\n const decodedError = (0, utils_1.decodeContractError)(error, contract);\n throw new Error(`Failed to Get Permitted Apps For PKPs: ${decodedError}`);\n }\n }\n async function getAllAbilitiesAndPoliciesForApp(params) {\n const { contract, args: { pkpEthAddress, appId } } = params;\n try {\n const pkpTokenId = await (0, pkpInfo_1.getPkpTokenId)({ pkpEthAddress, signer: contract.signer });\n const abilities = await contract.getAllAbilitiesAndPoliciesForApp(pkpTokenId, appId);\n return (0, policyParams_1.decodePermissionDataFromChain)(abilities);\n } catch (error) {\n const decodedError = (0, utils_1.decodeContractError)(error, contract);\n throw new Error(`Failed to Get All Abilities And Policies For App: ${decodedError}`);\n }\n }\n async function validateAbilityExecutionAndGetPolicies(params) {\n const { contract, args: { delegateeAddress, pkpEthAddress, abilityIpfsCid } } = params;\n try {\n const pkpTokenId = await (0, pkpInfo_1.getPkpTokenId)({ pkpEthAddress, signer: contract.signer });\n const validationResult = await contract.validateAbilityExecutionAndGetPolicies(delegateeAddress, pkpTokenId, abilityIpfsCid);\n const { policies } = validationResult;\n const decodedPolicies = (0, policyParams_1.decodePolicyParametersForOneAbility)({ policies });\n return {\n ...validationResult,\n appId: validationResult.appId,\n appVersion: validationResult.appVersion,\n decodedPolicies\n };\n } catch (error) {\n const decodedError = (0, utils_1.decodeContractError)(error, contract);\n throw new Error(`Failed to Validate Ability Execution And Get Policies: ${decodedError}`);\n }\n }\n async function getLastPermittedAppVersionForPkp(params) {\n const { contract, args: { pkpEthAddress, appId } } = params;\n try {\n const pkpTokenId = await (0, pkpInfo_1.getPkpTokenId)({ pkpEthAddress, signer: contract.signer });\n const lastPermittedVersion = await contract.getLastPermittedAppVersionForPkp(pkpTokenId, appId);\n if (!lastPermittedVersion)\n return null;\n return lastPermittedVersion;\n } catch (error) {\n const decodedError = (0, utils_1.decodeContractError)(error, contract);\n throw new Error(`Failed to Get Last Permitted App Version: ${decodedError}`);\n }\n }\n async function getUnpermittedAppsForPkps(params) {\n const { contract, args: { pkpEthAddresses, offset } } = params;\n try {\n const pkpTokenIds = [];\n for (const pkpEthAddress of pkpEthAddresses) {\n const pkpTokenId = await (0, pkpInfo_1.getPkpTokenId)({ pkpEthAddress, signer: contract.signer });\n pkpTokenIds.push(pkpTokenId);\n }\n const results = await contract.getUnpermittedAppsForPkps(pkpTokenIds, offset);\n return results.map((result) => ({\n pkpTokenId: result.pkpTokenId.toString(),\n unpermittedApps: result.unpermittedApps.map((app) => ({\n appId: app.appId,\n previousPermittedVersion: app.previousPermittedVersion,\n versionEnabled: app.versionEnabled,\n isDeleted: app.isDeleted\n }))\n }));\n } catch (error) {\n const decodedError = (0, utils_1.decodeContractError)(error, contract);\n throw new Error(`Failed to Get Unpermitted Apps For PKPs: ${decodedError}`);\n }\n }\n async function isDelegateePermitted(params) {\n const { contract, args: { delegateeAddress, pkpEthAddress, abilityIpfsCid } } = params;\n try {\n const pkpTokenId = await (0, pkpInfo_1.getPkpTokenId)({ pkpEthAddress, signer: contract.signer });\n const isPermitted = await contract.isDelegateePermitted(delegateeAddress, pkpTokenId, abilityIpfsCid);\n return isPermitted;\n } catch (error) {\n const decodedError = (0, utils_1.decodeContractError)(error, contract);\n throw new Error(`Failed to Check If Delegatee Is Permitted: ${decodedError}`);\n }\n }\n }\n });\n\n // ../../libs/contracts-sdk/dist/src/contractClient.js\n var require_contractClient = __commonJS({\n \"../../libs/contracts-sdk/dist/src/contractClient.js\"(exports3) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n Object.defineProperty(exports3, \"__esModule\", { value: true });\n exports3.clientFromContract = clientFromContract;\n exports3.getTestClient = getTestClient;\n exports3.getClient = getClient;\n var constants_1 = require_constants3();\n var App_1 = require_App();\n var AppView_1 = require_AppView();\n var User_1 = require_User();\n var UserView_1 = require_UserView();\n var utils_1 = require_utils7();\n function clientFromContract({ contract }) {\n return {\n // App write methods\n registerApp: (params, overrides) => (0, App_1.registerApp)({ contract, args: params, overrides }),\n registerNextVersion: (params, overrides) => (0, App_1.registerNextVersion)({ contract, args: params, overrides }),\n enableAppVersion: (params, overrides) => (0, App_1.enableAppVersion)({ contract, args: params, overrides }),\n addDelegatee: (params, overrides) => (0, App_1.addDelegatee)({ contract, args: params, overrides }),\n removeDelegatee: (params, overrides) => (0, App_1.removeDelegatee)({ contract, args: params, overrides }),\n setDelegatee: (params, overrides) => (0, App_1.setDelegatee)({ contract, args: params, overrides }),\n deleteApp: (params, overrides) => (0, App_1.deleteApp)({ contract, args: params, overrides }),\n undeleteApp: (params, overrides) => (0, App_1.undeleteApp)({ contract, args: params, overrides }),\n // App view methods\n getAppById: (params) => (0, AppView_1.getAppById)({ contract, args: params }),\n getAppIdByDelegatee: (params) => (0, AppView_1.getAppIdByDelegatee)({ contract, args: params }),\n getAppVersion: (params) => (0, AppView_1.getAppVersion)({ contract, args: params }),\n getAppsByManagerAddress: (params) => (0, AppView_1.getAppsByManagerAddress)({ contract, args: params }),\n getAppByDelegateeAddress: (params) => (0, AppView_1.getAppByDelegateeAddress)({ contract, args: params }),\n getDelegatedPkpEthAddresses: (params) => (0, AppView_1.getDelegatedPkpEthAddresses)({ contract, args: params }),\n // User write methods\n permitApp: (params, overrides) => (0, User_1.permitApp)({ contract, args: params, overrides }),\n unPermitApp: (params, overrides) => (0, User_1.unPermitApp)({ contract, args: params, overrides }),\n rePermitApp: (params, overrides) => (0, User_1.rePermitApp)({ contract, args: params, overrides }),\n setAbilityPolicyParameters: (params, overrides) => (0, User_1.setAbilityPolicyParameters)({ contract, args: params, overrides }),\n // User view methods\n getAllRegisteredAgentPkpEthAddresses: (params) => (0, UserView_1.getAllRegisteredAgentPkpEthAddresses)({ contract, args: params }),\n getPermittedAppVersionForPkp: (params) => (0, UserView_1.getPermittedAppVersionForPkp)({ contract, args: params }),\n getAllPermittedAppIdsForPkp: (params) => (0, UserView_1.getAllPermittedAppIdsForPkp)({ contract, args: params }),\n getPermittedAppsForPkps: (params) => (0, UserView_1.getPermittedAppsForPkps)({ contract, args: params }),\n getAllAbilitiesAndPoliciesForApp: (params) => (0, UserView_1.getAllAbilitiesAndPoliciesForApp)({ contract, args: params }),\n validateAbilityExecutionAndGetPolicies: (params) => (0, UserView_1.validateAbilityExecutionAndGetPolicies)({ contract, args: params }),\n isDelegateePermitted: (params) => (0, UserView_1.isDelegateePermitted)({ contract, args: params }),\n getLastPermittedAppVersionForPkp: (params) => (0, UserView_1.getLastPermittedAppVersionForPkp)({ contract, args: params }),\n getUnpermittedAppsForPkps: (params) => (0, UserView_1.getUnpermittedAppsForPkps)({ contract, args: params })\n };\n }\n function getTestClient({ signer }) {\n const contract = (0, utils_1.createContract)({\n signer,\n contractAddress: constants_1.VINCENT_DIAMOND_CONTRACT_ADDRESS_DEV\n });\n return clientFromContract({ contract });\n }\n function getClient({ signer }) {\n const contract = (0, utils_1.createContract)({\n signer,\n contractAddress: constants_1.VINCENT_DIAMOND_CONTRACT_ADDRESS_PROD\n });\n return clientFromContract({ contract });\n }\n }\n });\n\n // ../../libs/contracts-sdk/dist/src/index.js\n var require_src = __commonJS({\n \"../../libs/contracts-sdk/dist/src/index.js\"(exports3) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n Object.defineProperty(exports3, \"__esModule\", { value: true });\n exports3.COMBINED_ABI = exports3.VINCENT_DIAMOND_CONTRACT_ADDRESS_PROD = exports3.getPkpTokenId = exports3.createContract = exports3.getClient = exports3.clientFromContract = exports3.getTestClient = void 0;\n var contractClient_1 = require_contractClient();\n Object.defineProperty(exports3, \"getTestClient\", { enumerable: true, get: function() {\n return contractClient_1.getTestClient;\n } });\n Object.defineProperty(exports3, \"clientFromContract\", { enumerable: true, get: function() {\n return contractClient_1.clientFromContract;\n } });\n Object.defineProperty(exports3, \"getClient\", { enumerable: true, get: function() {\n return contractClient_1.getClient;\n } });\n var utils_1 = require_utils7();\n Object.defineProperty(exports3, \"createContract\", { enumerable: true, get: function() {\n return utils_1.createContract;\n } });\n var pkpInfo_1 = require_pkpInfo();\n Object.defineProperty(exports3, \"getPkpTokenId\", { enumerable: true, get: function() {\n return pkpInfo_1.getPkpTokenId;\n } });\n var constants_1 = require_constants3();\n Object.defineProperty(exports3, \"VINCENT_DIAMOND_CONTRACT_ADDRESS_PROD\", { enumerable: true, get: function() {\n return constants_1.VINCENT_DIAMOND_CONTRACT_ADDRESS_PROD;\n } });\n Object.defineProperty(exports3, \"COMBINED_ABI\", { enumerable: true, get: function() {\n return constants_1.COMBINED_ABI;\n } });\n }\n });\n\n // ../../libs/ability-sdk/dist/src/lib/policyCore/policyParameters/getOnchainPolicyParams.js\n var require_getOnchainPolicyParams = __commonJS({\n \"../../libs/ability-sdk/dist/src/lib/policyCore/policyParameters/getOnchainPolicyParams.js\"(exports3) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n Object.defineProperty(exports3, \"__esModule\", { value: true });\n exports3.getPoliciesAndAppVersion = exports3.getDecodedPolicyParams = void 0;\n var ethers_1 = require_lib32();\n var vincent_contracts_sdk_1 = require_src();\n var utils_1 = require_utils();\n var getDecodedPolicyParams = async ({ decodedPolicies, policyIpfsCid }) => {\n console.log(\"All on-chain policy params:\", JSON.stringify(decodedPolicies, utils_1.bigintReplacer));\n const policyParams = decodedPolicies[policyIpfsCid];\n if (policyParams) {\n return policyParams;\n }\n console.log(\"Found no on-chain parameters for policy IPFS CID:\", policyIpfsCid);\n return void 0;\n };\n exports3.getDecodedPolicyParams = getDecodedPolicyParams;\n var getPoliciesAndAppVersion = async ({ delegationRpcUrl, appDelegateeAddress, agentWalletPkpEthAddress, abilityIpfsCid }) => {\n console.log(\"getPoliciesAndAppVersion\", {\n delegationRpcUrl,\n appDelegateeAddress,\n agentWalletPkpEthAddress,\n abilityIpfsCid\n });\n try {\n const signer = ethers_1.ethers.Wallet.createRandom().connect(new ethers_1.ethers.providers.StaticJsonRpcProvider(delegationRpcUrl));\n const contractClient = (0, vincent_contracts_sdk_1.getClient)({\n signer\n });\n const validationResult = await contractClient.validateAbilityExecutionAndGetPolicies({\n delegateeAddress: appDelegateeAddress,\n pkpEthAddress: agentWalletPkpEthAddress,\n abilityIpfsCid\n });\n if (!validationResult.isPermitted) {\n throw new Error(`App Delegatee: ${appDelegateeAddress} is not permitted to execute Vincent Ability: ${abilityIpfsCid} for App ID: ${validationResult.appId} App Version: ${validationResult.appVersion} using Agent Wallet PKP Address: ${agentWalletPkpEthAddress}`);\n }\n return {\n appId: ethers_1.ethers.BigNumber.from(validationResult.appId),\n appVersion: ethers_1.ethers.BigNumber.from(validationResult.appVersion),\n decodedPolicies: validationResult.decodedPolicies\n };\n } catch (error) {\n throw new Error(`Error getting on-chain policy parameters from Vincent contract using App Delegatee: ${appDelegateeAddress} and Agent Wallet PKP Address: ${agentWalletPkpEthAddress} and Vincent Ability: ${abilityIpfsCid}: ${error instanceof Error ? error.message : String(error)}`);\n }\n };\n exports3.getPoliciesAndAppVersion = getPoliciesAndAppVersion;\n }\n });\n\n // ../../libs/ability-sdk/dist/src/lib/handlers/constants.js\n var require_constants4 = __commonJS({\n \"../../libs/ability-sdk/dist/src/lib/handlers/constants.js\"(exports3) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n Object.defineProperty(exports3, \"__esModule\", { value: true });\n exports3.LIT_DATIL_PUBKEY_ROUTER_ADDRESS = void 0;\n exports3.LIT_DATIL_PUBKEY_ROUTER_ADDRESS = \"0xF182d6bEf16Ba77e69372dD096D8B70Bc3d5B475\";\n }\n });\n\n // ../../libs/ability-sdk/dist/src/lib/handlers/vincentPolicyHandler.js\n var require_vincentPolicyHandler = __commonJS({\n \"../../libs/ability-sdk/dist/src/lib/handlers/vincentPolicyHandler.js\"(exports3) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n Object.defineProperty(exports3, \"__esModule\", { value: true });\n exports3.vincentPolicyHandler = vincentPolicyHandler;\n var ethers_1 = require_lib32();\n var helpers_1 = require_helpers2();\n var assertSupportedAbilityVersion_1 = require_assertSupportedAbilityVersion();\n var helpers_2 = require_helpers();\n var getOnchainPolicyParams_1 = require_getOnchainPolicyParams();\n var utils_1 = require_utils();\n var constants_1 = require_constants4();\n async function vincentPolicyHandler({ vincentPolicy, context: context2, abilityParams: abilityParams2 }) {\n (0, assertSupportedAbilityVersion_1.assertSupportedAbilityVersion)(vincentAbilityApiVersion);\n const { delegatorPkpEthAddress, abilityIpfsCid } = context2;\n console.log(\"actionIpfsIds:\", LitAuth.actionIpfsIds.join(\",\"));\n const policyIpfsCid = LitAuth.actionIpfsIds[0];\n console.log(\"context:\", JSON.stringify(context2, utils_1.bigintReplacer));\n try {\n const delegationRpcUrl = await Lit.Actions.getRpcUrl({\n chain: \"yellowstone\"\n });\n const userPkpInfo = await (0, helpers_1.getPkpInfo)({\n litPubkeyRouterAddress: constants_1.LIT_DATIL_PUBKEY_ROUTER_ADDRESS,\n yellowstoneRpcUrl: delegationRpcUrl,\n pkpEthAddress: delegatorPkpEthAddress\n });\n const appDelegateeAddress = ethers_1.ethers.utils.getAddress(LitAuth.authSigAddress);\n console.log(\"appDelegateeAddress\", appDelegateeAddress);\n const { decodedPolicies, appId, appVersion } = await (0, getOnchainPolicyParams_1.getPoliciesAndAppVersion)({\n delegationRpcUrl,\n appDelegateeAddress,\n agentWalletPkpEthAddress: delegatorPkpEthAddress,\n abilityIpfsCid\n });\n const baseContext = {\n delegation: {\n delegateeAddress: appDelegateeAddress,\n delegatorPkpInfo: userPkpInfo\n },\n abilityIpfsCid,\n appId: appId.toNumber(),\n appVersion: appVersion.toNumber()\n };\n const onChainPolicyParams = await (0, getOnchainPolicyParams_1.getDecodedPolicyParams)({\n decodedPolicies,\n policyIpfsCid\n });\n console.log(\"onChainPolicyParams:\", JSON.stringify(onChainPolicyParams, utils_1.bigintReplacer));\n const evaluateResult = await vincentPolicy.evaluate({\n abilityParams: abilityParams2,\n userParams: onChainPolicyParams\n }, baseContext);\n console.log(\"evaluateResult:\", JSON.stringify(evaluateResult, utils_1.bigintReplacer));\n Lit.Actions.setResponse({\n response: JSON.stringify({\n ...evaluateResult\n })\n });\n } catch (error) {\n console.log(\"Policy evaluation failed:\", error.message, error.stack);\n Lit.Actions.setResponse({\n response: JSON.stringify((0, helpers_2.createDenyResult)({\n runtimeError: error instanceof Error ? error.message : String(error)\n }))\n });\n }\n }\n }\n });\n\n // ../../libs/ability-sdk/dist/src/lib/abilityCore/helpers/validatePolicies.js\n var require_validatePolicies = __commonJS({\n \"../../libs/ability-sdk/dist/src/lib/abilityCore/helpers/validatePolicies.js\"(exports3) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n Object.defineProperty(exports3, \"__esModule\", { value: true });\n exports3.validatePolicies = validatePolicies;\n var getMappedAbilityPolicyParams_1 = require_getMappedAbilityPolicyParams();\n async function validatePolicies({ decodedPolicies, vincentAbility: vincentAbility2, abilityIpfsCid, parsedAbilityParams }) {\n const validatedPolicies = [];\n for (const policyIpfsCid of Object.keys(decodedPolicies)) {\n const abilityPolicy = vincentAbility2.supportedPolicies.policyByIpfsCid[policyIpfsCid];\n console.log(\"vincentAbility.supportedPolicies\", Object.keys(vincentAbility2.supportedPolicies.policyByIpfsCid));\n if (!abilityPolicy) {\n throw new Error(`Policy with IPFS CID ${policyIpfsCid} is registered on-chain but not supported by this ability. Vincent Ability: ${abilityIpfsCid}`);\n }\n const policyPackageName = abilityPolicy.vincentPolicy.packageName;\n if (!abilityPolicy.abilityParameterMappings) {\n throw new Error(\"abilityParameterMappings missing on policy\");\n }\n console.log(\"abilityPolicy.abilityParameterMappings\", JSON.stringify(abilityPolicy.abilityParameterMappings));\n const abilityPolicyParams = (0, getMappedAbilityPolicyParams_1.getMappedAbilityPolicyParams)({\n abilityParameterMappings: abilityPolicy.abilityParameterMappings,\n parsedAbilityParams\n });\n validatedPolicies.push({\n parameters: decodedPolicies[policyIpfsCid] || {},\n policyPackageName,\n abilityPolicyParams\n });\n }\n return validatedPolicies;\n }\n }\n });\n\n // ../../libs/ability-sdk/dist/src/lib/handlers/evaluatePolicies.js\n var require_evaluatePolicies = __commonJS({\n \"../../libs/ability-sdk/dist/src/lib/handlers/evaluatePolicies.js\"(exports3) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n Object.defineProperty(exports3, \"__esModule\", { value: true });\n exports3.evaluatePolicies = evaluatePolicies;\n var zod_1 = require_cjs();\n var helpers_1 = require_helpers();\n var resultCreators_1 = require_resultCreators();\n async function evaluatePolicies({ vincentAbility: vincentAbility2, context: context2, validatedPolicies, vincentAbilityApiVersion: vincentAbilityApiVersion2 }) {\n const evaluatedPolicies = [];\n let policyDeniedResult = void 0;\n const rawAllowedPolicies = {};\n for (const { policyPackageName, abilityPolicyParams } of validatedPolicies) {\n evaluatedPolicies.push(policyPackageName);\n const policy = vincentAbility2.supportedPolicies.policyByPackageName[policyPackageName];\n try {\n const litActionResponse = await Lit.Actions.call({\n ipfsId: policy.ipfsCid,\n params: {\n abilityParams: abilityPolicyParams,\n context: {\n abilityIpfsCid: context2.abilityIpfsCid,\n delegatorPkpEthAddress: context2.delegation.delegatorPkpInfo.ethAddress\n },\n vincentAbilityApiVersion: vincentAbilityApiVersion2\n }\n });\n console.log(`evaluated ${String(policyPackageName)} policy, result is:`, JSON.stringify(litActionResponse));\n const result = parseAndValidateEvaluateResult({\n litActionResponse,\n vincentPolicy: policy.vincentPolicy\n });\n if ((0, helpers_1.isPolicyDenyResponse)(result)) {\n policyDeniedResult = {\n ...result,\n packageName: policyPackageName\n };\n } else {\n rawAllowedPolicies[policyPackageName] = {\n result: result.result\n };\n }\n } catch (err) {\n const denyResult = (0, helpers_1.createDenyResult)({\n runtimeError: err instanceof Error ? err.message : \"Unknown error\"\n });\n policyDeniedResult = { ...denyResult, packageName: policyPackageName };\n }\n }\n if (policyDeniedResult) {\n return (0, resultCreators_1.createDenyEvaluationResult)({\n allowedPolicies: rawAllowedPolicies,\n evaluatedPolicies,\n deniedPolicy: policyDeniedResult\n });\n }\n return (0, resultCreators_1.createAllowEvaluationResult)({\n evaluatedPolicies,\n allowedPolicies: rawAllowedPolicies\n });\n }\n function parseAndValidateEvaluateResult({ litActionResponse, vincentPolicy }) {\n let parsedLitActionResponse;\n try {\n parsedLitActionResponse = JSON.parse(litActionResponse);\n } catch (error) {\n console.log(\"rawLitActionResponse (parsePolicyExecutionResult)\", litActionResponse);\n throw new Error(`Failed to JSON parse Lit Action Response: ${error instanceof Error ? error.message : String(error)}. rawLitActionResponse in request logs (parsePolicyExecutionResult)`);\n }\n try {\n console.log(\"parseAndValidateEvaluateResult\", JSON.stringify(parsedLitActionResponse));\n if ((0, helpers_1.isPolicyDenyResponse)(parsedLitActionResponse) && (parsedLitActionResponse.schemaValidationError || parsedLitActionResponse.runtimeError)) {\n console.log(\"parsedLitActionResponse is a deny response with a runtime error or schema validation error; skipping schema validation\");\n return parsedLitActionResponse;\n }\n if (!(0, helpers_1.isPolicyResponse)(parsedLitActionResponse)) {\n throw new Error(`Invalid response from policy: ${JSON.stringify(parsedLitActionResponse)}`);\n }\n const { schemaToUse, parsedType } = (0, helpers_1.getSchemaForPolicyResponseResult)({\n value: parsedLitActionResponse,\n denyResultSchema: vincentPolicy.evalDenyResultSchema || zod_1.z.undefined(),\n allowResultSchema: vincentPolicy.evalAllowResultSchema || zod_1.z.undefined()\n });\n console.log(\"parsedType\", parsedType);\n const parsedResult = (0, helpers_1.validateOrDeny)(parsedLitActionResponse.result, schemaToUse, \"evaluate\", \"output\");\n if ((0, helpers_1.isPolicyDenyResponse)(parsedResult)) {\n return parsedResult;\n }\n if ((0, helpers_1.isPolicyDenyResponse)(parsedLitActionResponse)) {\n return (0, helpers_1.createDenyResult)({\n runtimeError: parsedLitActionResponse.runtimeError,\n schemaValidationError: parsedLitActionResponse.schemaValidationError,\n result: parsedResult\n });\n }\n return (0, resultCreators_1.createAllowResult)({\n result: parsedResult\n });\n } catch (err) {\n console.log(\"parseAndValidateEvaluateResult error; returning noResultDeny\", err.message, err.stack);\n return (0, resultCreators_1.returnNoResultDeny)(err instanceof Error ? err.message : \"Unknown error\");\n }\n }\n }\n });\n\n // ../../libs/ability-sdk/dist/src/lib/handlers/vincentAbilityHandler.js\n var require_vincentAbilityHandler = __commonJS({\n \"../../libs/ability-sdk/dist/src/lib/handlers/vincentAbilityHandler.js\"(exports3) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n Object.defineProperty(exports3, \"__esModule\", { value: true });\n exports3.vincentAbilityHandler = void 0;\n exports3.createAbilityExecutionContext = createAbilityExecutionContext;\n var ethers_1 = require_lib32();\n var helpers_1 = require_helpers2();\n var typeGuards_1 = require_typeGuards2();\n var validatePolicies_1 = require_validatePolicies();\n var zod_1 = require_zod2();\n var assertSupportedAbilityVersion_1 = require_assertSupportedAbilityVersion();\n var getOnchainPolicyParams_1 = require_getOnchainPolicyParams();\n var utils_1 = require_utils();\n var constants_1 = require_constants4();\n var evaluatePolicies_1 = require_evaluatePolicies();\n function createAbilityExecutionContext({ vincentAbility: vincentAbility2, policyEvaluationResults, baseContext }) {\n if (!policyEvaluationResults.allow) {\n throw new Error(\"Received denied policies to createAbilityExecutionContext()\");\n }\n const newContext = {\n allow: true,\n evaluatedPolicies: policyEvaluationResults.evaluatedPolicies,\n allowedPolicies: {}\n };\n const policyByPackageName = vincentAbility2.supportedPolicies.policyByPackageName;\n const allowedKeys = Object.keys(policyEvaluationResults.allowedPolicies);\n for (const packageName of allowedKeys) {\n const entry = policyEvaluationResults.allowedPolicies[packageName];\n const policy = policyByPackageName[packageName];\n const vincentPolicy = policy.vincentPolicy;\n if (!entry) {\n throw new Error(`Missing entry on allowedPolicies for policy: ${packageName}`);\n }\n const resultWrapper = {\n result: entry.result\n };\n if (vincentPolicy.commit) {\n const commitFn = vincentPolicy.commit;\n resultWrapper.commit = (commitParams) => {\n return commitFn(commitParams, baseContext);\n };\n }\n newContext.allowedPolicies[packageName] = resultWrapper;\n }\n return newContext;\n }\n var vincentAbilityHandler2 = ({ vincentAbility: vincentAbility2, abilityParams: abilityParams2, context: context2 }) => {\n return async () => {\n (0, assertSupportedAbilityVersion_1.assertSupportedAbilityVersion)(vincentAbilityApiVersion);\n let policyEvalResults = void 0;\n const abilityIpfsCid = LitAuth.actionIpfsIds[0];\n const appDelegateeAddress = ethers_1.ethers.utils.getAddress(LitAuth.authSigAddress);\n const baseContext = {\n delegation: {\n delegateeAddress: appDelegateeAddress\n // delegatorPkpInfo: null,\n },\n abilityIpfsCid\n // appId: undefined,\n // appVersion: undefined,\n };\n try {\n const delegationRpcUrl = await Lit.Actions.getRpcUrl({ chain: \"yellowstone\" });\n const parsedOrFail = (0, zod_1.validateOrFail)(abilityParams2, vincentAbility2.abilityParamsSchema, \"execute\", \"input\");\n if ((0, typeGuards_1.isAbilityFailureResult)(parsedOrFail)) {\n Lit.Actions.setResponse({\n response: JSON.stringify({\n abilityExecutionResult: parsedOrFail\n })\n });\n return;\n }\n const userPkpInfo = await (0, helpers_1.getPkpInfo)({\n litPubkeyRouterAddress: constants_1.LIT_DATIL_PUBKEY_ROUTER_ADDRESS,\n yellowstoneRpcUrl: delegationRpcUrl,\n pkpEthAddress: context2.delegatorPkpEthAddress\n });\n baseContext.delegation.delegatorPkpInfo = userPkpInfo;\n const { decodedPolicies, appId, appVersion } = await (0, getOnchainPolicyParams_1.getPoliciesAndAppVersion)({\n delegationRpcUrl,\n appDelegateeAddress,\n agentWalletPkpEthAddress: context2.delegatorPkpEthAddress,\n abilityIpfsCid\n });\n baseContext.appId = appId.toNumber();\n baseContext.appVersion = appVersion.toNumber();\n const validatedPolicies = await (0, validatePolicies_1.validatePolicies)({\n decodedPolicies,\n vincentAbility: vincentAbility2,\n parsedAbilityParams: parsedOrFail,\n abilityIpfsCid\n });\n console.log(\"validatedPolicies\", JSON.stringify(validatedPolicies, utils_1.bigintReplacer));\n const policyEvaluationResults = await (0, evaluatePolicies_1.evaluatePolicies)({\n validatedPolicies,\n vincentAbility: vincentAbility2,\n context: baseContext,\n vincentAbilityApiVersion\n });\n console.log(\"policyEvaluationResults\", JSON.stringify(policyEvaluationResults, utils_1.bigintReplacer));\n policyEvalResults = policyEvaluationResults;\n if (!policyEvalResults.allow) {\n Lit.Actions.setResponse({\n response: JSON.stringify({\n abilityContext: {\n ...baseContext,\n policiesContext: policyEvaluationResults\n },\n abilityExecutionResult: {\n success: false\n }\n })\n });\n return;\n }\n const executeContext = createAbilityExecutionContext({\n vincentAbility: vincentAbility2,\n policyEvaluationResults,\n baseContext\n });\n const abilityExecutionResult = await vincentAbility2.execute({\n abilityParams: parsedOrFail\n }, {\n ...baseContext,\n policiesContext: executeContext\n });\n console.log(\"abilityExecutionResult\", JSON.stringify(abilityExecutionResult, utils_1.bigintReplacer));\n Lit.Actions.setResponse({\n response: JSON.stringify({\n abilityExecutionResult,\n abilityContext: {\n ...baseContext,\n policiesContext: policyEvaluationResults\n }\n })\n });\n } catch (err) {\n Lit.Actions.setResponse({\n response: JSON.stringify({\n abilityContext: {\n ...baseContext,\n policiesContext: policyEvalResults\n },\n abilityExecutionResult: {\n success: false,\n runtimeError: err instanceof Error ? err.message : String(err)\n }\n })\n });\n }\n };\n };\n exports3.vincentAbilityHandler = vincentAbilityHandler2;\n }\n });\n\n // ../../libs/ability-sdk/dist/src/lib/abilityCore/bundledAbility/bundledAbility.js\n var require_bundledAbility = __commonJS({\n \"../../libs/ability-sdk/dist/src/lib/abilityCore/bundledAbility/bundledAbility.js\"(exports3) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n Object.defineProperty(exports3, \"__esModule\", { value: true });\n exports3.asBundledVincentAbility = asBundledVincentAbility;\n var constants_1 = require_constants2();\n function asBundledVincentAbility(vincentAbility2, ipfsCid) {\n const bundledAbility = {\n ipfsCid,\n vincentAbility: vincentAbility2\n };\n Object.defineProperty(bundledAbility, \"vincentAbilityApiVersion\", {\n value: constants_1.VINCENT_TOOL_API_VERSION,\n writable: false,\n enumerable: true,\n configurable: false\n });\n return bundledAbility;\n }\n }\n });\n\n // ../../libs/ability-sdk/dist/src/lib/policyCore/bundledPolicy/bundledPolicy.js\n var require_bundledPolicy = __commonJS({\n \"../../libs/ability-sdk/dist/src/lib/policyCore/bundledPolicy/bundledPolicy.js\"(exports3) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n Object.defineProperty(exports3, \"__esModule\", { value: true });\n exports3.asBundledVincentPolicy = asBundledVincentPolicy;\n var constants_1 = require_constants2();\n function asBundledVincentPolicy(vincentPolicy, ipfsCid) {\n const bundledPolicy = {\n ipfsCid,\n vincentPolicy\n };\n Object.defineProperty(bundledPolicy, \"vincentAbilityApiVersion\", {\n value: constants_1.VINCENT_TOOL_API_VERSION,\n writable: false,\n enumerable: true,\n configurable: false\n });\n return bundledPolicy;\n }\n }\n });\n\n // ../../../node_modules/.pnpm/tslib@2.7.0/node_modules/tslib/tslib.es6.mjs\n var tslib_es6_exports2 = {};\n __export(tslib_es6_exports2, {\n __addDisposableResource: () => __addDisposableResource2,\n __assign: () => __assign2,\n __asyncDelegator: () => __asyncDelegator2,\n __asyncGenerator: () => __asyncGenerator2,\n __asyncValues: () => __asyncValues2,\n __await: () => __await2,\n __awaiter: () => __awaiter2,\n __classPrivateFieldGet: () => __classPrivateFieldGet2,\n __classPrivateFieldIn: () => __classPrivateFieldIn2,\n __classPrivateFieldSet: () => __classPrivateFieldSet2,\n __createBinding: () => __createBinding2,\n __decorate: () => __decorate2,\n __disposeResources: () => __disposeResources2,\n __esDecorate: () => __esDecorate2,\n __exportStar: () => __exportStar2,\n __extends: () => __extends2,\n __generator: () => __generator2,\n __importDefault: () => __importDefault2,\n __importStar: () => __importStar2,\n __makeTemplateObject: () => __makeTemplateObject2,\n __metadata: () => __metadata2,\n __param: () => __param2,\n __propKey: () => __propKey2,\n __read: () => __read2,\n __rest: () => __rest2,\n __runInitializers: () => __runInitializers2,\n __setFunctionName: () => __setFunctionName2,\n __spread: () => __spread2,\n __spreadArray: () => __spreadArray2,\n __spreadArrays: () => __spreadArrays2,\n __values: () => __values2,\n default: () => tslib_es6_default2\n });\n function __extends2(d5, b4) {\n if (typeof b4 !== \"function\" && b4 !== null)\n throw new TypeError(\"Class extends value \" + String(b4) + \" is not a constructor or null\");\n extendStatics2(d5, b4);\n function __() {\n this.constructor = d5;\n }\n d5.prototype = b4 === null ? Object.create(b4) : (__.prototype = b4.prototype, new __());\n }\n function __rest2(s4, e3) {\n var t3 = {};\n for (var p4 in s4)\n if (Object.prototype.hasOwnProperty.call(s4, p4) && e3.indexOf(p4) < 0)\n t3[p4] = s4[p4];\n if (s4 != null && typeof Object.getOwnPropertySymbols === \"function\")\n for (var i3 = 0, p4 = Object.getOwnPropertySymbols(s4); i3 < p4.length; i3++) {\n if (e3.indexOf(p4[i3]) < 0 && Object.prototype.propertyIsEnumerable.call(s4, p4[i3]))\n t3[p4[i3]] = s4[p4[i3]];\n }\n return t3;\n }\n function __decorate2(decorators, target, key, desc) {\n var c4 = arguments.length, r2 = c4 < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d5;\n if (typeof Reflect === \"object\" && typeof Reflect.decorate === \"function\")\n r2 = Reflect.decorate(decorators, target, key, desc);\n else\n for (var i3 = decorators.length - 1; i3 >= 0; i3--)\n if (d5 = decorators[i3])\n r2 = (c4 < 3 ? d5(r2) : c4 > 3 ? d5(target, key, r2) : d5(target, key)) || r2;\n return c4 > 3 && r2 && Object.defineProperty(target, key, r2), r2;\n }\n function __param2(paramIndex, decorator) {\n return function(target, key) {\n decorator(target, key, paramIndex);\n };\n }\n function __esDecorate2(ctor, descriptorIn, decorators, contextIn, initializers, extraInitializers) {\n function accept(f6) {\n if (f6 !== void 0 && typeof f6 !== \"function\")\n throw new TypeError(\"Function expected\");\n return f6;\n }\n var kind = contextIn.kind, key = kind === \"getter\" ? \"get\" : kind === \"setter\" ? \"set\" : \"value\";\n var target = !descriptorIn && ctor ? contextIn[\"static\"] ? ctor : ctor.prototype : null;\n var descriptor = descriptorIn || (target ? Object.getOwnPropertyDescriptor(target, contextIn.name) : {});\n var _2, done = false;\n for (var i3 = decorators.length - 1; i3 >= 0; i3--) {\n var context2 = {};\n for (var p4 in contextIn)\n context2[p4] = p4 === \"access\" ? {} : contextIn[p4];\n for (var p4 in contextIn.access)\n context2.access[p4] = contextIn.access[p4];\n context2.addInitializer = function(f6) {\n if (done)\n throw new TypeError(\"Cannot add initializers after decoration has completed\");\n extraInitializers.push(accept(f6 || null));\n };\n var result = (0, decorators[i3])(kind === \"accessor\" ? { get: descriptor.get, set: descriptor.set } : descriptor[key], context2);\n if (kind === \"accessor\") {\n if (result === void 0)\n continue;\n if (result === null || typeof result !== \"object\")\n throw new TypeError(\"Object expected\");\n if (_2 = accept(result.get))\n descriptor.get = _2;\n if (_2 = accept(result.set))\n descriptor.set = _2;\n if (_2 = accept(result.init))\n initializers.unshift(_2);\n } else if (_2 = accept(result)) {\n if (kind === \"field\")\n initializers.unshift(_2);\n else\n descriptor[key] = _2;\n }\n }\n if (target)\n Object.defineProperty(target, contextIn.name, descriptor);\n done = true;\n }\n function __runInitializers2(thisArg, initializers, value) {\n var useValue = arguments.length > 2;\n for (var i3 = 0; i3 < initializers.length; i3++) {\n value = useValue ? initializers[i3].call(thisArg, value) : initializers[i3].call(thisArg);\n }\n return useValue ? value : void 0;\n }\n function __propKey2(x4) {\n return typeof x4 === \"symbol\" ? x4 : \"\".concat(x4);\n }\n function __setFunctionName2(f6, name, prefix) {\n if (typeof name === \"symbol\")\n name = name.description ? \"[\".concat(name.description, \"]\") : \"\";\n return Object.defineProperty(f6, \"name\", { configurable: true, value: prefix ? \"\".concat(prefix, \" \", name) : name });\n }\n function __metadata2(metadataKey, metadataValue) {\n if (typeof Reflect === \"object\" && typeof Reflect.metadata === \"function\")\n return Reflect.metadata(metadataKey, metadataValue);\n }\n function __awaiter2(thisArg, _arguments, P2, generator) {\n function adopt(value) {\n return value instanceof P2 ? value : new P2(function(resolve) {\n resolve(value);\n });\n }\n return new (P2 || (P2 = Promise))(function(resolve, reject) {\n function fulfilled(value) {\n try {\n step(generator.next(value));\n } catch (e3) {\n reject(e3);\n }\n }\n function rejected(value) {\n try {\n step(generator[\"throw\"](value));\n } catch (e3) {\n reject(e3);\n }\n }\n function step(result) {\n result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected);\n }\n step((generator = generator.apply(thisArg, _arguments || [])).next());\n });\n }\n function __generator2(thisArg, body) {\n var _2 = { label: 0, sent: function() {\n if (t3[0] & 1)\n throw t3[1];\n return t3[1];\n }, trys: [], ops: [] }, f6, y6, t3, g4 = Object.create((typeof Iterator === \"function\" ? Iterator : Object).prototype);\n return g4.next = verb(0), g4[\"throw\"] = verb(1), g4[\"return\"] = verb(2), typeof Symbol === \"function\" && (g4[Symbol.iterator] = function() {\n return this;\n }), g4;\n function verb(n2) {\n return function(v2) {\n return step([n2, v2]);\n };\n }\n function step(op) {\n if (f6)\n throw new TypeError(\"Generator is already executing.\");\n while (g4 && (g4 = 0, op[0] && (_2 = 0)), _2)\n try {\n if (f6 = 1, y6 && (t3 = op[0] & 2 ? y6[\"return\"] : op[0] ? y6[\"throw\"] || ((t3 = y6[\"return\"]) && t3.call(y6), 0) : y6.next) && !(t3 = t3.call(y6, op[1])).done)\n return t3;\n if (y6 = 0, t3)\n op = [op[0] & 2, t3.value];\n switch (op[0]) {\n case 0:\n case 1:\n t3 = op;\n break;\n case 4:\n _2.label++;\n return { value: op[1], done: false };\n case 5:\n _2.label++;\n y6 = op[1];\n op = [0];\n continue;\n case 7:\n op = _2.ops.pop();\n _2.trys.pop();\n continue;\n default:\n if (!(t3 = _2.trys, t3 = t3.length > 0 && t3[t3.length - 1]) && (op[0] === 6 || op[0] === 2)) {\n _2 = 0;\n continue;\n }\n if (op[0] === 3 && (!t3 || op[1] > t3[0] && op[1] < t3[3])) {\n _2.label = op[1];\n break;\n }\n if (op[0] === 6 && _2.label < t3[1]) {\n _2.label = t3[1];\n t3 = op;\n break;\n }\n if (t3 && _2.label < t3[2]) {\n _2.label = t3[2];\n _2.ops.push(op);\n break;\n }\n if (t3[2])\n _2.ops.pop();\n _2.trys.pop();\n continue;\n }\n op = body.call(thisArg, _2);\n } catch (e3) {\n op = [6, e3];\n y6 = 0;\n } finally {\n f6 = t3 = 0;\n }\n if (op[0] & 5)\n throw op[1];\n return { value: op[0] ? op[1] : void 0, done: true };\n }\n }\n function __exportStar2(m2, o5) {\n for (var p4 in m2)\n if (p4 !== \"default\" && !Object.prototype.hasOwnProperty.call(o5, p4))\n __createBinding2(o5, m2, p4);\n }\n function __values2(o5) {\n var s4 = typeof Symbol === \"function\" && Symbol.iterator, m2 = s4 && o5[s4], i3 = 0;\n if (m2)\n return m2.call(o5);\n if (o5 && typeof o5.length === \"number\")\n return {\n next: function() {\n if (o5 && i3 >= o5.length)\n o5 = void 0;\n return { value: o5 && o5[i3++], done: !o5 };\n }\n };\n throw new TypeError(s4 ? \"Object is not iterable.\" : \"Symbol.iterator is not defined.\");\n }\n function __read2(o5, n2) {\n var m2 = typeof Symbol === \"function\" && o5[Symbol.iterator];\n if (!m2)\n return o5;\n var i3 = m2.call(o5), r2, ar = [], e3;\n try {\n while ((n2 === void 0 || n2-- > 0) && !(r2 = i3.next()).done)\n ar.push(r2.value);\n } catch (error) {\n e3 = { error };\n } finally {\n try {\n if (r2 && !r2.done && (m2 = i3[\"return\"]))\n m2.call(i3);\n } finally {\n if (e3)\n throw e3.error;\n }\n }\n return ar;\n }\n function __spread2() {\n for (var ar = [], i3 = 0; i3 < arguments.length; i3++)\n ar = ar.concat(__read2(arguments[i3]));\n return ar;\n }\n function __spreadArrays2() {\n for (var s4 = 0, i3 = 0, il = arguments.length; i3 < il; i3++)\n s4 += arguments[i3].length;\n for (var r2 = Array(s4), k4 = 0, i3 = 0; i3 < il; i3++)\n for (var a3 = arguments[i3], j2 = 0, jl = a3.length; j2 < jl; j2++, k4++)\n r2[k4] = a3[j2];\n return r2;\n }\n function __spreadArray2(to, from14, pack) {\n if (pack || arguments.length === 2)\n for (var i3 = 0, l6 = from14.length, ar; i3 < l6; i3++) {\n if (ar || !(i3 in from14)) {\n if (!ar)\n ar = Array.prototype.slice.call(from14, 0, i3);\n ar[i3] = from14[i3];\n }\n }\n return to.concat(ar || Array.prototype.slice.call(from14));\n }\n function __await2(v2) {\n return this instanceof __await2 ? (this.v = v2, this) : new __await2(v2);\n }\n function __asyncGenerator2(thisArg, _arguments, generator) {\n if (!Symbol.asyncIterator)\n throw new TypeError(\"Symbol.asyncIterator is not defined.\");\n var g4 = generator.apply(thisArg, _arguments || []), i3, q3 = [];\n return i3 = Object.create((typeof AsyncIterator === \"function\" ? AsyncIterator : Object).prototype), verb(\"next\"), verb(\"throw\"), verb(\"return\", awaitReturn), i3[Symbol.asyncIterator] = function() {\n return this;\n }, i3;\n function awaitReturn(f6) {\n return function(v2) {\n return Promise.resolve(v2).then(f6, reject);\n };\n }\n function verb(n2, f6) {\n if (g4[n2]) {\n i3[n2] = function(v2) {\n return new Promise(function(a3, b4) {\n q3.push([n2, v2, a3, b4]) > 1 || resume(n2, v2);\n });\n };\n if (f6)\n i3[n2] = f6(i3[n2]);\n }\n }\n function resume(n2, v2) {\n try {\n step(g4[n2](v2));\n } catch (e3) {\n settle(q3[0][3], e3);\n }\n }\n function step(r2) {\n r2.value instanceof __await2 ? Promise.resolve(r2.value.v).then(fulfill, reject) : settle(q3[0][2], r2);\n }\n function fulfill(value) {\n resume(\"next\", value);\n }\n function reject(value) {\n resume(\"throw\", value);\n }\n function settle(f6, v2) {\n if (f6(v2), q3.shift(), q3.length)\n resume(q3[0][0], q3[0][1]);\n }\n }\n function __asyncDelegator2(o5) {\n var i3, p4;\n return i3 = {}, verb(\"next\"), verb(\"throw\", function(e3) {\n throw e3;\n }), verb(\"return\"), i3[Symbol.iterator] = function() {\n return this;\n }, i3;\n function verb(n2, f6) {\n i3[n2] = o5[n2] ? function(v2) {\n return (p4 = !p4) ? { value: __await2(o5[n2](v2)), done: false } : f6 ? f6(v2) : v2;\n } : f6;\n }\n }\n function __asyncValues2(o5) {\n if (!Symbol.asyncIterator)\n throw new TypeError(\"Symbol.asyncIterator is not defined.\");\n var m2 = o5[Symbol.asyncIterator], i3;\n return m2 ? m2.call(o5) : (o5 = typeof __values2 === \"function\" ? __values2(o5) : o5[Symbol.iterator](), i3 = {}, verb(\"next\"), verb(\"throw\"), verb(\"return\"), i3[Symbol.asyncIterator] = function() {\n return this;\n }, i3);\n function verb(n2) {\n i3[n2] = o5[n2] && function(v2) {\n return new Promise(function(resolve, reject) {\n v2 = o5[n2](v2), settle(resolve, reject, v2.done, v2.value);\n });\n };\n }\n function settle(resolve, reject, d5, v2) {\n Promise.resolve(v2).then(function(v3) {\n resolve({ value: v3, done: d5 });\n }, reject);\n }\n }\n function __makeTemplateObject2(cooked, raw) {\n if (Object.defineProperty) {\n Object.defineProperty(cooked, \"raw\", { value: raw });\n } else {\n cooked.raw = raw;\n }\n return cooked;\n }\n function __importStar2(mod3) {\n if (mod3 && mod3.__esModule)\n return mod3;\n var result = {};\n if (mod3 != null) {\n for (var k4 in mod3)\n if (k4 !== \"default\" && Object.prototype.hasOwnProperty.call(mod3, k4))\n __createBinding2(result, mod3, k4);\n }\n __setModuleDefault2(result, mod3);\n return result;\n }\n function __importDefault2(mod3) {\n return mod3 && mod3.__esModule ? mod3 : { default: mod3 };\n }\n function __classPrivateFieldGet2(receiver, state, kind, f6) {\n if (kind === \"a\" && !f6)\n throw new TypeError(\"Private accessor was defined without a getter\");\n if (typeof state === \"function\" ? receiver !== state || !f6 : !state.has(receiver))\n throw new TypeError(\"Cannot read private member from an object whose class did not declare it\");\n return kind === \"m\" ? f6 : kind === \"a\" ? f6.call(receiver) : f6 ? f6.value : state.get(receiver);\n }\n function __classPrivateFieldSet2(receiver, state, value, kind, f6) {\n if (kind === \"m\")\n throw new TypeError(\"Private method is not writable\");\n if (kind === \"a\" && !f6)\n throw new TypeError(\"Private accessor was defined without a setter\");\n if (typeof state === \"function\" ? receiver !== state || !f6 : !state.has(receiver))\n throw new TypeError(\"Cannot write private member to an object whose class did not declare it\");\n return kind === \"a\" ? f6.call(receiver, value) : f6 ? f6.value = value : state.set(receiver, value), value;\n }\n function __classPrivateFieldIn2(state, receiver) {\n if (receiver === null || typeof receiver !== \"object\" && typeof receiver !== \"function\")\n throw new TypeError(\"Cannot use 'in' operator on non-object\");\n return typeof state === \"function\" ? receiver === state : state.has(receiver);\n }\n function __addDisposableResource2(env2, value, async) {\n if (value !== null && value !== void 0) {\n if (typeof value !== \"object\" && typeof value !== \"function\")\n throw new TypeError(\"Object expected.\");\n var dispose, inner;\n if (async) {\n if (!Symbol.asyncDispose)\n throw new TypeError(\"Symbol.asyncDispose is not defined.\");\n dispose = value[Symbol.asyncDispose];\n }\n if (dispose === void 0) {\n if (!Symbol.dispose)\n throw new TypeError(\"Symbol.dispose is not defined.\");\n dispose = value[Symbol.dispose];\n if (async)\n inner = dispose;\n }\n if (typeof dispose !== \"function\")\n throw new TypeError(\"Object not disposable.\");\n if (inner)\n dispose = function() {\n try {\n inner.call(this);\n } catch (e3) {\n return Promise.reject(e3);\n }\n };\n env2.stack.push({ value, dispose, async });\n } else if (async) {\n env2.stack.push({ async: true });\n }\n return value;\n }\n function __disposeResources2(env2) {\n function fail(e3) {\n env2.error = env2.hasError ? new _SuppressedError2(e3, env2.error, \"An error was suppressed during disposal.\") : e3;\n env2.hasError = true;\n }\n var r2, s4 = 0;\n function next() {\n while (r2 = env2.stack.pop()) {\n try {\n if (!r2.async && s4 === 1)\n return s4 = 0, env2.stack.push(r2), Promise.resolve().then(next);\n if (r2.dispose) {\n var result = r2.dispose.call(r2.value);\n if (r2.async)\n return s4 |= 2, Promise.resolve(result).then(next, function(e3) {\n fail(e3);\n return next();\n });\n } else\n s4 |= 1;\n } catch (e3) {\n fail(e3);\n }\n }\n if (s4 === 1)\n return env2.hasError ? Promise.reject(env2.error) : Promise.resolve();\n if (env2.hasError)\n throw env2.error;\n }\n return next();\n }\n var extendStatics2, __assign2, __createBinding2, __setModuleDefault2, _SuppressedError2, tslib_es6_default2;\n var init_tslib_es62 = __esm({\n \"../../../node_modules/.pnpm/tslib@2.7.0/node_modules/tslib/tslib.es6.mjs\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n extendStatics2 = function(d5, b4) {\n extendStatics2 = Object.setPrototypeOf || { __proto__: [] } instanceof Array && function(d6, b5) {\n d6.__proto__ = b5;\n } || function(d6, b5) {\n for (var p4 in b5)\n if (Object.prototype.hasOwnProperty.call(b5, p4))\n d6[p4] = b5[p4];\n };\n return extendStatics2(d5, b4);\n };\n __assign2 = function() {\n __assign2 = Object.assign || function __assign3(t3) {\n for (var s4, i3 = 1, n2 = arguments.length; i3 < n2; i3++) {\n s4 = arguments[i3];\n for (var p4 in s4)\n if (Object.prototype.hasOwnProperty.call(s4, p4))\n t3[p4] = s4[p4];\n }\n return t3;\n };\n return __assign2.apply(this, arguments);\n };\n __createBinding2 = Object.create ? function(o5, m2, k4, k22) {\n if (k22 === void 0)\n k22 = k4;\n var desc = Object.getOwnPropertyDescriptor(m2, k4);\n if (!desc || (\"get\" in desc ? !m2.__esModule : desc.writable || desc.configurable)) {\n desc = { enumerable: true, get: function() {\n return m2[k4];\n } };\n }\n Object.defineProperty(o5, k22, desc);\n } : function(o5, m2, k4, k22) {\n if (k22 === void 0)\n k22 = k4;\n o5[k22] = m2[k4];\n };\n __setModuleDefault2 = Object.create ? function(o5, v2) {\n Object.defineProperty(o5, \"default\", { enumerable: true, value: v2 });\n } : function(o5, v2) {\n o5[\"default\"] = v2;\n };\n _SuppressedError2 = typeof SuppressedError === \"function\" ? SuppressedError : function(error, suppressed, message) {\n var e3 = new Error(message);\n return e3.name = \"SuppressedError\", e3.error = error, e3.suppressed = suppressed, e3;\n };\n tslib_es6_default2 = {\n __extends: __extends2,\n __assign: __assign2,\n __rest: __rest2,\n __decorate: __decorate2,\n __param: __param2,\n __metadata: __metadata2,\n __awaiter: __awaiter2,\n __generator: __generator2,\n __createBinding: __createBinding2,\n __exportStar: __exportStar2,\n __values: __values2,\n __read: __read2,\n __spread: __spread2,\n __spreadArrays: __spreadArrays2,\n __spreadArray: __spreadArray2,\n __await: __await2,\n __asyncGenerator: __asyncGenerator2,\n __asyncDelegator: __asyncDelegator2,\n __asyncValues: __asyncValues2,\n __makeTemplateObject: __makeTemplateObject2,\n __importStar: __importStar2,\n __importDefault: __importDefault2,\n __classPrivateFieldGet: __classPrivateFieldGet2,\n __classPrivateFieldSet: __classPrivateFieldSet2,\n __classPrivateFieldIn: __classPrivateFieldIn2,\n __addDisposableResource: __addDisposableResource2,\n __disposeResources: __disposeResources2\n };\n }\n });\n\n // ../../../node_modules/.pnpm/ethers@6.15.0_bufferutil@4.0.9_utf-8-validate@5.0.10/node_modules/ethers/lib.commonjs/_version.js\n var require_version27 = __commonJS({\n \"../../../node_modules/.pnpm/ethers@6.15.0_bufferutil@4.0.9_utf-8-validate@5.0.10/node_modules/ethers/lib.commonjs/_version.js\"(exports3) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n Object.defineProperty(exports3, \"__esModule\", { value: true });\n exports3.version = void 0;\n exports3.version = \"6.15.0\";\n }\n });\n\n // ../../../node_modules/.pnpm/ethers@6.15.0_bufferutil@4.0.9_utf-8-validate@5.0.10/node_modules/ethers/lib.commonjs/utils/properties.js\n var require_properties = __commonJS({\n \"../../../node_modules/.pnpm/ethers@6.15.0_bufferutil@4.0.9_utf-8-validate@5.0.10/node_modules/ethers/lib.commonjs/utils/properties.js\"(exports3) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n Object.defineProperty(exports3, \"__esModule\", { value: true });\n exports3.defineProperties = exports3.resolveProperties = void 0;\n function checkType(value, type, name) {\n const types = type.split(\"|\").map((t3) => t3.trim());\n for (let i3 = 0; i3 < types.length; i3++) {\n switch (type) {\n case \"any\":\n return;\n case \"bigint\":\n case \"boolean\":\n case \"number\":\n case \"string\":\n if (typeof value === type) {\n return;\n }\n }\n }\n const error = new Error(`invalid value for type ${type}`);\n error.code = \"INVALID_ARGUMENT\";\n error.argument = `value.${name}`;\n error.value = value;\n throw error;\n }\n async function resolveProperties2(value) {\n const keys = Object.keys(value);\n const results = await Promise.all(keys.map((k4) => Promise.resolve(value[k4])));\n return results.reduce((accum, v2, index2) => {\n accum[keys[index2]] = v2;\n return accum;\n }, {});\n }\n exports3.resolveProperties = resolveProperties2;\n function defineProperties(target, values, types) {\n for (let key in values) {\n let value = values[key];\n const type = types ? types[key] : null;\n if (type) {\n checkType(value, type, key);\n }\n Object.defineProperty(target, key, { enumerable: true, value, writable: false });\n }\n }\n exports3.defineProperties = defineProperties;\n }\n });\n\n // ../../../node_modules/.pnpm/ethers@6.15.0_bufferutil@4.0.9_utf-8-validate@5.0.10/node_modules/ethers/lib.commonjs/utils/errors.js\n var require_errors2 = __commonJS({\n \"../../../node_modules/.pnpm/ethers@6.15.0_bufferutil@4.0.9_utf-8-validate@5.0.10/node_modules/ethers/lib.commonjs/utils/errors.js\"(exports3) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n Object.defineProperty(exports3, \"__esModule\", { value: true });\n exports3.assertPrivate = exports3.assertNormalize = exports3.assertArgumentCount = exports3.assertArgument = exports3.assert = exports3.makeError = exports3.isCallException = exports3.isError = void 0;\n var _version_js_1 = require_version27();\n var properties_js_1 = require_properties();\n function stringify3(value, seen) {\n if (value == null) {\n return \"null\";\n }\n if (seen == null) {\n seen = /* @__PURE__ */ new Set();\n }\n if (typeof value === \"object\") {\n if (seen.has(value)) {\n return \"[Circular]\";\n }\n seen.add(value);\n }\n if (Array.isArray(value)) {\n return \"[ \" + value.map((v2) => stringify3(v2, seen)).join(\", \") + \" ]\";\n }\n if (value instanceof Uint8Array) {\n const HEX = \"0123456789abcdef\";\n let result = \"0x\";\n for (let i3 = 0; i3 < value.length; i3++) {\n result += HEX[value[i3] >> 4];\n result += HEX[value[i3] & 15];\n }\n return result;\n }\n if (typeof value === \"object\" && typeof value.toJSON === \"function\") {\n return stringify3(value.toJSON(), seen);\n }\n switch (typeof value) {\n case \"boolean\":\n case \"number\":\n case \"symbol\":\n return value.toString();\n case \"bigint\":\n return BigInt(value).toString();\n case \"string\":\n return JSON.stringify(value);\n case \"object\": {\n const keys = Object.keys(value);\n keys.sort();\n return \"{ \" + keys.map((k4) => `${stringify3(k4, seen)}: ${stringify3(value[k4], seen)}`).join(\", \") + \" }\";\n }\n }\n return `[ COULD NOT SERIALIZE ]`;\n }\n function isError(error, code) {\n return error && error.code === code;\n }\n exports3.isError = isError;\n function isCallException(error) {\n return isError(error, \"CALL_EXCEPTION\");\n }\n exports3.isCallException = isCallException;\n function makeError(message, code, info) {\n let shortMessage = message;\n {\n const details = [];\n if (info) {\n if (\"message\" in info || \"code\" in info || \"name\" in info) {\n throw new Error(`value will overwrite populated values: ${stringify3(info)}`);\n }\n for (const key in info) {\n if (key === \"shortMessage\") {\n continue;\n }\n const value = info[key];\n details.push(key + \"=\" + stringify3(value));\n }\n }\n details.push(`code=${code}`);\n details.push(`version=${_version_js_1.version}`);\n if (details.length) {\n message += \" (\" + details.join(\", \") + \")\";\n }\n }\n let error;\n switch (code) {\n case \"INVALID_ARGUMENT\":\n error = new TypeError(message);\n break;\n case \"NUMERIC_FAULT\":\n case \"BUFFER_OVERRUN\":\n error = new RangeError(message);\n break;\n default:\n error = new Error(message);\n }\n (0, properties_js_1.defineProperties)(error, { code });\n if (info) {\n Object.assign(error, info);\n }\n if (error.shortMessage == null) {\n (0, properties_js_1.defineProperties)(error, { shortMessage });\n }\n return error;\n }\n exports3.makeError = makeError;\n function assert9(check, message, code, info) {\n if (!check) {\n throw makeError(message, code, info);\n }\n }\n exports3.assert = assert9;\n function assertArgument(check, message, name, value) {\n assert9(check, message, \"INVALID_ARGUMENT\", { argument: name, value });\n }\n exports3.assertArgument = assertArgument;\n function assertArgumentCount(count, expectedCount, message) {\n if (message == null) {\n message = \"\";\n }\n if (message) {\n message = \": \" + message;\n }\n assert9(count >= expectedCount, \"missing argument\" + message, \"MISSING_ARGUMENT\", {\n count,\n expectedCount\n });\n assert9(count <= expectedCount, \"too many arguments\" + message, \"UNEXPECTED_ARGUMENT\", {\n count,\n expectedCount\n });\n }\n exports3.assertArgumentCount = assertArgumentCount;\n var _normalizeForms = [\"NFD\", \"NFC\", \"NFKD\", \"NFKC\"].reduce((accum, form) => {\n try {\n if (\"test\".normalize(form) !== \"test\") {\n throw new Error(\"bad\");\n }\n ;\n if (form === \"NFD\") {\n const check = String.fromCharCode(233).normalize(\"NFD\");\n const expected = String.fromCharCode(101, 769);\n if (check !== expected) {\n throw new Error(\"broken\");\n }\n }\n accum.push(form);\n } catch (error) {\n }\n return accum;\n }, []);\n function assertNormalize(form) {\n assert9(_normalizeForms.indexOf(form) >= 0, \"platform missing String.prototype.normalize\", \"UNSUPPORTED_OPERATION\", {\n operation: \"String.prototype.normalize\",\n info: { form }\n });\n }\n exports3.assertNormalize = assertNormalize;\n function assertPrivate(givenGuard, guard, className) {\n if (className == null) {\n className = \"\";\n }\n if (givenGuard !== guard) {\n let method = className, operation = \"new\";\n if (className) {\n method += \".\";\n operation += \" \" + className;\n }\n assert9(false, `private constructor; use ${method}from* methods`, \"UNSUPPORTED_OPERATION\", {\n operation\n });\n }\n }\n exports3.assertPrivate = assertPrivate;\n }\n });\n\n // ../../../node_modules/.pnpm/ethers@6.15.0_bufferutil@4.0.9_utf-8-validate@5.0.10/node_modules/ethers/lib.commonjs/utils/data.js\n var require_data = __commonJS({\n \"../../../node_modules/.pnpm/ethers@6.15.0_bufferutil@4.0.9_utf-8-validate@5.0.10/node_modules/ethers/lib.commonjs/utils/data.js\"(exports3) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n Object.defineProperty(exports3, \"__esModule\", { value: true });\n exports3.zeroPadBytes = exports3.zeroPadValue = exports3.stripZerosLeft = exports3.dataSlice = exports3.dataLength = exports3.concat = exports3.hexlify = exports3.isBytesLike = exports3.isHexString = exports3.getBytesCopy = exports3.getBytes = void 0;\n var errors_js_1 = require_errors2();\n function _getBytes(value, name, copy) {\n if (value instanceof Uint8Array) {\n if (copy) {\n return new Uint8Array(value);\n }\n return value;\n }\n if (typeof value === \"string\" && value.match(/^0x(?:[0-9a-f][0-9a-f])*$/i)) {\n const result = new Uint8Array((value.length - 2) / 2);\n let offset = 2;\n for (let i3 = 0; i3 < result.length; i3++) {\n result[i3] = parseInt(value.substring(offset, offset + 2), 16);\n offset += 2;\n }\n return result;\n }\n (0, errors_js_1.assertArgument)(false, \"invalid BytesLike value\", name || \"value\", value);\n }\n function getBytes(value, name) {\n return _getBytes(value, name, false);\n }\n exports3.getBytes = getBytes;\n function getBytesCopy(value, name) {\n return _getBytes(value, name, true);\n }\n exports3.getBytesCopy = getBytesCopy;\n function isHexString(value, length2) {\n if (typeof value !== \"string\" || !value.match(/^0x[0-9A-Fa-f]*$/)) {\n return false;\n }\n if (typeof length2 === \"number\" && value.length !== 2 + 2 * length2) {\n return false;\n }\n if (length2 === true && value.length % 2 !== 0) {\n return false;\n }\n return true;\n }\n exports3.isHexString = isHexString;\n function isBytesLike(value) {\n return isHexString(value, true) || value instanceof Uint8Array;\n }\n exports3.isBytesLike = isBytesLike;\n var HexCharacters = \"0123456789abcdef\";\n function hexlify(data) {\n const bytes = getBytes(data);\n let result = \"0x\";\n for (let i3 = 0; i3 < bytes.length; i3++) {\n const v2 = bytes[i3];\n result += HexCharacters[(v2 & 240) >> 4] + HexCharacters[v2 & 15];\n }\n return result;\n }\n exports3.hexlify = hexlify;\n function concat5(datas) {\n return \"0x\" + datas.map((d5) => hexlify(d5).substring(2)).join(\"\");\n }\n exports3.concat = concat5;\n function dataLength(data) {\n if (isHexString(data, true)) {\n return (data.length - 2) / 2;\n }\n return getBytes(data).length;\n }\n exports3.dataLength = dataLength;\n function dataSlice(data, start, end) {\n const bytes = getBytes(data);\n if (end != null && end > bytes.length) {\n (0, errors_js_1.assert)(false, \"cannot slice beyond data bounds\", \"BUFFER_OVERRUN\", {\n buffer: bytes,\n length: bytes.length,\n offset: end\n });\n }\n return hexlify(bytes.slice(start == null ? 0 : start, end == null ? bytes.length : end));\n }\n exports3.dataSlice = dataSlice;\n function stripZerosLeft(data) {\n let bytes = hexlify(data).substring(2);\n while (bytes.startsWith(\"00\")) {\n bytes = bytes.substring(2);\n }\n return \"0x\" + bytes;\n }\n exports3.stripZerosLeft = stripZerosLeft;\n function zeroPad(data, length2, left) {\n const bytes = getBytes(data);\n (0, errors_js_1.assert)(length2 >= bytes.length, \"padding exceeds data length\", \"BUFFER_OVERRUN\", {\n buffer: new Uint8Array(bytes),\n length: length2,\n offset: length2 + 1\n });\n const result = new Uint8Array(length2);\n result.fill(0);\n if (left) {\n result.set(bytes, length2 - bytes.length);\n } else {\n result.set(bytes, 0);\n }\n return hexlify(result);\n }\n function zeroPadValue(data, length2) {\n return zeroPad(data, length2, true);\n }\n exports3.zeroPadValue = zeroPadValue;\n function zeroPadBytes(data, length2) {\n return zeroPad(data, length2, false);\n }\n exports3.zeroPadBytes = zeroPadBytes;\n }\n });\n\n // ../../../node_modules/.pnpm/ethers@6.15.0_bufferutil@4.0.9_utf-8-validate@5.0.10/node_modules/ethers/lib.commonjs/utils/maths.js\n var require_maths = __commonJS({\n \"../../../node_modules/.pnpm/ethers@6.15.0_bufferutil@4.0.9_utf-8-validate@5.0.10/node_modules/ethers/lib.commonjs/utils/maths.js\"(exports3) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n Object.defineProperty(exports3, \"__esModule\", { value: true });\n exports3.toQuantity = exports3.toBeArray = exports3.toBeHex = exports3.toNumber = exports3.getNumber = exports3.toBigInt = exports3.getUint = exports3.getBigInt = exports3.mask = exports3.toTwos = exports3.fromTwos = void 0;\n var data_js_1 = require_data();\n var errors_js_1 = require_errors2();\n var BN_0 = BigInt(0);\n var BN_1 = BigInt(1);\n var maxValue = 9007199254740991;\n function fromTwos(_value, _width) {\n const value = getUint(_value, \"value\");\n const width = BigInt(getNumber(_width, \"width\"));\n (0, errors_js_1.assert)(value >> width === BN_0, \"overflow\", \"NUMERIC_FAULT\", {\n operation: \"fromTwos\",\n fault: \"overflow\",\n value: _value\n });\n if (value >> width - BN_1) {\n const mask2 = (BN_1 << width) - BN_1;\n return -((~value & mask2) + BN_1);\n }\n return value;\n }\n exports3.fromTwos = fromTwos;\n function toTwos(_value, _width) {\n let value = getBigInt(_value, \"value\");\n const width = BigInt(getNumber(_width, \"width\"));\n const limit = BN_1 << width - BN_1;\n if (value < BN_0) {\n value = -value;\n (0, errors_js_1.assert)(value <= limit, \"too low\", \"NUMERIC_FAULT\", {\n operation: \"toTwos\",\n fault: \"overflow\",\n value: _value\n });\n const mask2 = (BN_1 << width) - BN_1;\n return (~value & mask2) + BN_1;\n } else {\n (0, errors_js_1.assert)(value < limit, \"too high\", \"NUMERIC_FAULT\", {\n operation: \"toTwos\",\n fault: \"overflow\",\n value: _value\n });\n }\n return value;\n }\n exports3.toTwos = toTwos;\n function mask(_value, _bits) {\n const value = getUint(_value, \"value\");\n const bits = BigInt(getNumber(_bits, \"bits\"));\n return value & (BN_1 << bits) - BN_1;\n }\n exports3.mask = mask;\n function getBigInt(value, name) {\n switch (typeof value) {\n case \"bigint\":\n return value;\n case \"number\":\n (0, errors_js_1.assertArgument)(Number.isInteger(value), \"underflow\", name || \"value\", value);\n (0, errors_js_1.assertArgument)(value >= -maxValue && value <= maxValue, \"overflow\", name || \"value\", value);\n return BigInt(value);\n case \"string\":\n try {\n if (value === \"\") {\n throw new Error(\"empty string\");\n }\n if (value[0] === \"-\" && value[1] !== \"-\") {\n return -BigInt(value.substring(1));\n }\n return BigInt(value);\n } catch (e3) {\n (0, errors_js_1.assertArgument)(false, `invalid BigNumberish string: ${e3.message}`, name || \"value\", value);\n }\n }\n (0, errors_js_1.assertArgument)(false, \"invalid BigNumberish value\", name || \"value\", value);\n }\n exports3.getBigInt = getBigInt;\n function getUint(value, name) {\n const result = getBigInt(value, name);\n (0, errors_js_1.assert)(result >= BN_0, \"unsigned value cannot be negative\", \"NUMERIC_FAULT\", {\n fault: \"overflow\",\n operation: \"getUint\",\n value\n });\n return result;\n }\n exports3.getUint = getUint;\n var Nibbles = \"0123456789abcdef\";\n function toBigInt4(value) {\n if (value instanceof Uint8Array) {\n let result = \"0x0\";\n for (const v2 of value) {\n result += Nibbles[v2 >> 4];\n result += Nibbles[v2 & 15];\n }\n return BigInt(result);\n }\n return getBigInt(value);\n }\n exports3.toBigInt = toBigInt4;\n function getNumber(value, name) {\n switch (typeof value) {\n case \"bigint\":\n (0, errors_js_1.assertArgument)(value >= -maxValue && value <= maxValue, \"overflow\", name || \"value\", value);\n return Number(value);\n case \"number\":\n (0, errors_js_1.assertArgument)(Number.isInteger(value), \"underflow\", name || \"value\", value);\n (0, errors_js_1.assertArgument)(value >= -maxValue && value <= maxValue, \"overflow\", name || \"value\", value);\n return value;\n case \"string\":\n try {\n if (value === \"\") {\n throw new Error(\"empty string\");\n }\n return getNumber(BigInt(value), name);\n } catch (e3) {\n (0, errors_js_1.assertArgument)(false, `invalid numeric string: ${e3.message}`, name || \"value\", value);\n }\n }\n (0, errors_js_1.assertArgument)(false, \"invalid numeric value\", name || \"value\", value);\n }\n exports3.getNumber = getNumber;\n function toNumber4(value) {\n return getNumber(toBigInt4(value));\n }\n exports3.toNumber = toNumber4;\n function toBeHex(_value, _width) {\n const value = getUint(_value, \"value\");\n let result = value.toString(16);\n if (_width == null) {\n if (result.length % 2) {\n result = \"0\" + result;\n }\n } else {\n const width = getNumber(_width, \"width\");\n (0, errors_js_1.assert)(width * 2 >= result.length, `value exceeds width (${width} bytes)`, \"NUMERIC_FAULT\", {\n operation: \"toBeHex\",\n fault: \"overflow\",\n value: _value\n });\n while (result.length < width * 2) {\n result = \"0\" + result;\n }\n }\n return \"0x\" + result;\n }\n exports3.toBeHex = toBeHex;\n function toBeArray(_value) {\n const value = getUint(_value, \"value\");\n if (value === BN_0) {\n return new Uint8Array([]);\n }\n let hex = value.toString(16);\n if (hex.length % 2) {\n hex = \"0\" + hex;\n }\n const result = new Uint8Array(hex.length / 2);\n for (let i3 = 0; i3 < result.length; i3++) {\n const offset = i3 * 2;\n result[i3] = parseInt(hex.substring(offset, offset + 2), 16);\n }\n return result;\n }\n exports3.toBeArray = toBeArray;\n function toQuantity(value) {\n let result = (0, data_js_1.hexlify)((0, data_js_1.isBytesLike)(value) ? value : toBeArray(value)).substring(2);\n while (result.startsWith(\"0\")) {\n result = result.substring(1);\n }\n if (result === \"\") {\n result = \"0\";\n }\n return \"0x\" + result;\n }\n exports3.toQuantity = toQuantity;\n }\n });\n\n // ../../../node_modules/.pnpm/ethers@6.15.0_bufferutil@4.0.9_utf-8-validate@5.0.10/node_modules/ethers/lib.commonjs/utils/base58.js\n var require_base58 = __commonJS({\n \"../../../node_modules/.pnpm/ethers@6.15.0_bufferutil@4.0.9_utf-8-validate@5.0.10/node_modules/ethers/lib.commonjs/utils/base58.js\"(exports3) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n Object.defineProperty(exports3, \"__esModule\", { value: true });\n exports3.decodeBase58 = exports3.encodeBase58 = void 0;\n var data_js_1 = require_data();\n var errors_js_1 = require_errors2();\n var maths_js_1 = require_maths();\n var Alphabet = \"123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz\";\n var Lookup = null;\n function getAlpha(letter) {\n if (Lookup == null) {\n Lookup = {};\n for (let i3 = 0; i3 < Alphabet.length; i3++) {\n Lookup[Alphabet[i3]] = BigInt(i3);\n }\n }\n const result = Lookup[letter];\n (0, errors_js_1.assertArgument)(result != null, `invalid base58 value`, \"letter\", letter);\n return result;\n }\n var BN_0 = BigInt(0);\n var BN_58 = BigInt(58);\n function encodeBase58(_value) {\n const bytes = (0, data_js_1.getBytes)(_value);\n let value = (0, maths_js_1.toBigInt)(bytes);\n let result = \"\";\n while (value) {\n result = Alphabet[Number(value % BN_58)] + result;\n value /= BN_58;\n }\n for (let i3 = 0; i3 < bytes.length; i3++) {\n if (bytes[i3]) {\n break;\n }\n result = Alphabet[0] + result;\n }\n return result;\n }\n exports3.encodeBase58 = encodeBase58;\n function decodeBase58(value) {\n let result = BN_0;\n for (let i3 = 0; i3 < value.length; i3++) {\n result *= BN_58;\n result += getAlpha(value[i3]);\n }\n return result;\n }\n exports3.decodeBase58 = decodeBase58;\n }\n });\n\n // ../../../node_modules/.pnpm/ethers@6.15.0_bufferutil@4.0.9_utf-8-validate@5.0.10/node_modules/ethers/lib.commonjs/utils/base64-browser.js\n var require_base64_browser = __commonJS({\n \"../../../node_modules/.pnpm/ethers@6.15.0_bufferutil@4.0.9_utf-8-validate@5.0.10/node_modules/ethers/lib.commonjs/utils/base64-browser.js\"(exports3) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n Object.defineProperty(exports3, \"__esModule\", { value: true });\n exports3.encodeBase64 = exports3.decodeBase64 = void 0;\n var data_js_1 = require_data();\n function decodeBase64(textData) {\n textData = atob(textData);\n const data = new Uint8Array(textData.length);\n for (let i3 = 0; i3 < textData.length; i3++) {\n data[i3] = textData.charCodeAt(i3);\n }\n return (0, data_js_1.getBytes)(data);\n }\n exports3.decodeBase64 = decodeBase64;\n function encodeBase64(_data) {\n const data = (0, data_js_1.getBytes)(_data);\n let textData = \"\";\n for (let i3 = 0; i3 < data.length; i3++) {\n textData += String.fromCharCode(data[i3]);\n }\n return btoa(textData);\n }\n exports3.encodeBase64 = encodeBase64;\n }\n });\n\n // ../../../node_modules/.pnpm/ethers@6.15.0_bufferutil@4.0.9_utf-8-validate@5.0.10/node_modules/ethers/lib.commonjs/utils/events.js\n var require_events = __commonJS({\n \"../../../node_modules/.pnpm/ethers@6.15.0_bufferutil@4.0.9_utf-8-validate@5.0.10/node_modules/ethers/lib.commonjs/utils/events.js\"(exports3) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n Object.defineProperty(exports3, \"__esModule\", { value: true });\n exports3.EventPayload = void 0;\n var properties_js_1 = require_properties();\n var EventPayload = class {\n /**\n * The event filter.\n */\n filter;\n /**\n * The **EventEmitterable**.\n */\n emitter;\n #listener;\n /**\n * Create a new **EventPayload** for %%emitter%% with\n * the %%listener%% and for %%filter%%.\n */\n constructor(emitter, listener, filter) {\n this.#listener = listener;\n (0, properties_js_1.defineProperties)(this, { emitter, filter });\n }\n /**\n * Unregister the triggered listener for future events.\n */\n async removeListener() {\n if (this.#listener == null) {\n return;\n }\n await this.emitter.off(this.filter, this.#listener);\n }\n };\n exports3.EventPayload = EventPayload;\n }\n });\n\n // ../../../node_modules/.pnpm/ethers@6.15.0_bufferutil@4.0.9_utf-8-validate@5.0.10/node_modules/ethers/lib.commonjs/utils/utf8.js\n var require_utf82 = __commonJS({\n \"../../../node_modules/.pnpm/ethers@6.15.0_bufferutil@4.0.9_utf-8-validate@5.0.10/node_modules/ethers/lib.commonjs/utils/utf8.js\"(exports3) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n Object.defineProperty(exports3, \"__esModule\", { value: true });\n exports3.toUtf8CodePoints = exports3.toUtf8String = exports3.toUtf8Bytes = exports3.Utf8ErrorFuncs = void 0;\n var data_js_1 = require_data();\n var errors_js_1 = require_errors2();\n function errorFunc(reason, offset, bytes, output, badCodepoint) {\n (0, errors_js_1.assertArgument)(false, `invalid codepoint at offset ${offset}; ${reason}`, \"bytes\", bytes);\n }\n function ignoreFunc(reason, offset, bytes, output, badCodepoint) {\n if (reason === \"BAD_PREFIX\" || reason === \"UNEXPECTED_CONTINUE\") {\n let i3 = 0;\n for (let o5 = offset + 1; o5 < bytes.length; o5++) {\n if (bytes[o5] >> 6 !== 2) {\n break;\n }\n i3++;\n }\n return i3;\n }\n if (reason === \"OVERRUN\") {\n return bytes.length - offset - 1;\n }\n return 0;\n }\n function replaceFunc(reason, offset, bytes, output, badCodepoint) {\n if (reason === \"OVERLONG\") {\n (0, errors_js_1.assertArgument)(typeof badCodepoint === \"number\", \"invalid bad code point for replacement\", \"badCodepoint\", badCodepoint);\n output.push(badCodepoint);\n return 0;\n }\n output.push(65533);\n return ignoreFunc(reason, offset, bytes, output, badCodepoint);\n }\n exports3.Utf8ErrorFuncs = Object.freeze({\n error: errorFunc,\n ignore: ignoreFunc,\n replace: replaceFunc\n });\n function getUtf8CodePoints(_bytes, onError) {\n if (onError == null) {\n onError = exports3.Utf8ErrorFuncs.error;\n }\n const bytes = (0, data_js_1.getBytes)(_bytes, \"bytes\");\n const result = [];\n let i3 = 0;\n while (i3 < bytes.length) {\n const c4 = bytes[i3++];\n if (c4 >> 7 === 0) {\n result.push(c4);\n continue;\n }\n let extraLength = null;\n let overlongMask = null;\n if ((c4 & 224) === 192) {\n extraLength = 1;\n overlongMask = 127;\n } else if ((c4 & 240) === 224) {\n extraLength = 2;\n overlongMask = 2047;\n } else if ((c4 & 248) === 240) {\n extraLength = 3;\n overlongMask = 65535;\n } else {\n if ((c4 & 192) === 128) {\n i3 += onError(\"UNEXPECTED_CONTINUE\", i3 - 1, bytes, result);\n } else {\n i3 += onError(\"BAD_PREFIX\", i3 - 1, bytes, result);\n }\n continue;\n }\n if (i3 - 1 + extraLength >= bytes.length) {\n i3 += onError(\"OVERRUN\", i3 - 1, bytes, result);\n continue;\n }\n let res = c4 & (1 << 8 - extraLength - 1) - 1;\n for (let j2 = 0; j2 < extraLength; j2++) {\n let nextChar = bytes[i3];\n if ((nextChar & 192) != 128) {\n i3 += onError(\"MISSING_CONTINUE\", i3, bytes, result);\n res = null;\n break;\n }\n ;\n res = res << 6 | nextChar & 63;\n i3++;\n }\n if (res === null) {\n continue;\n }\n if (res > 1114111) {\n i3 += onError(\"OUT_OF_RANGE\", i3 - 1 - extraLength, bytes, result, res);\n continue;\n }\n if (res >= 55296 && res <= 57343) {\n i3 += onError(\"UTF16_SURROGATE\", i3 - 1 - extraLength, bytes, result, res);\n continue;\n }\n if (res <= overlongMask) {\n i3 += onError(\"OVERLONG\", i3 - 1 - extraLength, bytes, result, res);\n continue;\n }\n result.push(res);\n }\n return result;\n }\n function toUtf8Bytes(str, form) {\n (0, errors_js_1.assertArgument)(typeof str === \"string\", \"invalid string value\", \"str\", str);\n if (form != null) {\n (0, errors_js_1.assertNormalize)(form);\n str = str.normalize(form);\n }\n let result = [];\n for (let i3 = 0; i3 < str.length; i3++) {\n const c4 = str.charCodeAt(i3);\n if (c4 < 128) {\n result.push(c4);\n } else if (c4 < 2048) {\n result.push(c4 >> 6 | 192);\n result.push(c4 & 63 | 128);\n } else if ((c4 & 64512) == 55296) {\n i3++;\n const c22 = str.charCodeAt(i3);\n (0, errors_js_1.assertArgument)(i3 < str.length && (c22 & 64512) === 56320, \"invalid surrogate pair\", \"str\", str);\n const pair = 65536 + ((c4 & 1023) << 10) + (c22 & 1023);\n result.push(pair >> 18 | 240);\n result.push(pair >> 12 & 63 | 128);\n result.push(pair >> 6 & 63 | 128);\n result.push(pair & 63 | 128);\n } else {\n result.push(c4 >> 12 | 224);\n result.push(c4 >> 6 & 63 | 128);\n result.push(c4 & 63 | 128);\n }\n }\n return new Uint8Array(result);\n }\n exports3.toUtf8Bytes = toUtf8Bytes;\n function _toUtf8String(codePoints) {\n return codePoints.map((codePoint) => {\n if (codePoint <= 65535) {\n return String.fromCharCode(codePoint);\n }\n codePoint -= 65536;\n return String.fromCharCode((codePoint >> 10 & 1023) + 55296, (codePoint & 1023) + 56320);\n }).join(\"\");\n }\n function toUtf8String(bytes, onError) {\n return _toUtf8String(getUtf8CodePoints(bytes, onError));\n }\n exports3.toUtf8String = toUtf8String;\n function toUtf8CodePoints(str, form) {\n return getUtf8CodePoints(toUtf8Bytes(str, form));\n }\n exports3.toUtf8CodePoints = toUtf8CodePoints;\n }\n });\n\n // ../../../node_modules/.pnpm/ethers@6.15.0_bufferutil@4.0.9_utf-8-validate@5.0.10/node_modules/ethers/lib.commonjs/utils/geturl-browser.js\n var require_geturl_browser = __commonJS({\n \"../../../node_modules/.pnpm/ethers@6.15.0_bufferutil@4.0.9_utf-8-validate@5.0.10/node_modules/ethers/lib.commonjs/utils/geturl-browser.js\"(exports3) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n Object.defineProperty(exports3, \"__esModule\", { value: true });\n exports3.getUrl = exports3.createGetUrl = void 0;\n var errors_js_1 = require_errors2();\n function createGetUrl(options) {\n async function getUrl3(req, _signal) {\n (0, errors_js_1.assert)(_signal == null || !_signal.cancelled, \"request cancelled before sending\", \"CANCELLED\");\n const protocol = req.url.split(\":\")[0].toLowerCase();\n (0, errors_js_1.assert)(protocol === \"http\" || protocol === \"https\", `unsupported protocol ${protocol}`, \"UNSUPPORTED_OPERATION\", {\n info: { protocol },\n operation: \"request\"\n });\n (0, errors_js_1.assert)(protocol === \"https\" || !req.credentials || req.allowInsecureAuthentication, \"insecure authorized connections unsupported\", \"UNSUPPORTED_OPERATION\", {\n operation: \"request\"\n });\n let error = null;\n const controller = new AbortController();\n const timer = setTimeout(() => {\n error = (0, errors_js_1.makeError)(\"request timeout\", \"TIMEOUT\");\n controller.abort();\n }, req.timeout);\n if (_signal) {\n _signal.addListener(() => {\n error = (0, errors_js_1.makeError)(\"request cancelled\", \"CANCELLED\");\n controller.abort();\n });\n }\n const init = Object.assign({}, options, {\n method: req.method,\n headers: new Headers(Array.from(req)),\n body: req.body || void 0,\n signal: controller.signal\n });\n let resp;\n try {\n resp = await fetch(req.url, init);\n } catch (_error) {\n clearTimeout(timer);\n if (error) {\n throw error;\n }\n throw _error;\n }\n clearTimeout(timer);\n const headers = {};\n resp.headers.forEach((value, key) => {\n headers[key.toLowerCase()] = value;\n });\n const respBody = await resp.arrayBuffer();\n const body = respBody == null ? null : new Uint8Array(respBody);\n return {\n statusCode: resp.status,\n statusMessage: resp.statusText,\n headers,\n body\n };\n }\n return getUrl3;\n }\n exports3.createGetUrl = createGetUrl;\n var defaultGetUrl = createGetUrl({});\n async function getUrl2(req, _signal) {\n return defaultGetUrl(req, _signal);\n }\n exports3.getUrl = getUrl2;\n }\n });\n\n // ../../../node_modules/.pnpm/ethers@6.15.0_bufferutil@4.0.9_utf-8-validate@5.0.10/node_modules/ethers/lib.commonjs/utils/fetch.js\n var require_fetch = __commonJS({\n \"../../../node_modules/.pnpm/ethers@6.15.0_bufferutil@4.0.9_utf-8-validate@5.0.10/node_modules/ethers/lib.commonjs/utils/fetch.js\"(exports3) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n Object.defineProperty(exports3, \"__esModule\", { value: true });\n exports3.FetchResponse = exports3.FetchRequest = exports3.FetchCancelSignal = void 0;\n var base64_js_1 = require_base64_browser();\n var data_js_1 = require_data();\n var errors_js_1 = require_errors2();\n var properties_js_1 = require_properties();\n var utf8_js_1 = require_utf82();\n var geturl_js_1 = require_geturl_browser();\n var MAX_ATTEMPTS = 12;\n var SLOT_INTERVAL = 250;\n var defaultGetUrlFunc = (0, geturl_js_1.createGetUrl)();\n var reData = new RegExp(\"^data:([^;:]*)?(;base64)?,(.*)$\", \"i\");\n var reIpfs = new RegExp(\"^ipfs://(ipfs/)?(.*)$\", \"i\");\n var locked = false;\n async function dataGatewayFunc(url, signal) {\n try {\n const match = url.match(reData);\n if (!match) {\n throw new Error(\"invalid data\");\n }\n return new FetchResponse(200, \"OK\", {\n \"content-type\": match[1] || \"text/plain\"\n }, match[2] ? (0, base64_js_1.decodeBase64)(match[3]) : unpercent(match[3]));\n } catch (error) {\n return new FetchResponse(599, \"BAD REQUEST (invalid data: URI)\", {}, null, new FetchRequest(url));\n }\n }\n function getIpfsGatewayFunc(baseUrl) {\n async function gatewayIpfs(url, signal) {\n try {\n const match = url.match(reIpfs);\n if (!match) {\n throw new Error(\"invalid link\");\n }\n return new FetchRequest(`${baseUrl}${match[2]}`);\n } catch (error) {\n return new FetchResponse(599, \"BAD REQUEST (invalid IPFS URI)\", {}, null, new FetchRequest(url));\n }\n }\n return gatewayIpfs;\n }\n var Gateways = {\n \"data\": dataGatewayFunc,\n \"ipfs\": getIpfsGatewayFunc(\"https://gateway.ipfs.io/ipfs/\")\n };\n var fetchSignals = /* @__PURE__ */ new WeakMap();\n var FetchCancelSignal = class {\n #listeners;\n #cancelled;\n constructor(request) {\n this.#listeners = [];\n this.#cancelled = false;\n fetchSignals.set(request, () => {\n if (this.#cancelled) {\n return;\n }\n this.#cancelled = true;\n for (const listener of this.#listeners) {\n setTimeout(() => {\n listener();\n }, 0);\n }\n this.#listeners = [];\n });\n }\n addListener(listener) {\n (0, errors_js_1.assert)(!this.#cancelled, \"singal already cancelled\", \"UNSUPPORTED_OPERATION\", {\n operation: \"fetchCancelSignal.addCancelListener\"\n });\n this.#listeners.push(listener);\n }\n get cancelled() {\n return this.#cancelled;\n }\n checkSignal() {\n (0, errors_js_1.assert)(!this.cancelled, \"cancelled\", \"CANCELLED\", {});\n }\n };\n exports3.FetchCancelSignal = FetchCancelSignal;\n function checkSignal(signal) {\n if (signal == null) {\n throw new Error(\"missing signal; should not happen\");\n }\n signal.checkSignal();\n return signal;\n }\n var FetchRequest = class _FetchRequest {\n #allowInsecure;\n #gzip;\n #headers;\n #method;\n #timeout;\n #url;\n #body;\n #bodyType;\n #creds;\n // Hooks\n #preflight;\n #process;\n #retry;\n #signal;\n #throttle;\n #getUrlFunc;\n /**\n * The fetch URL to request.\n */\n get url() {\n return this.#url;\n }\n set url(url) {\n this.#url = String(url);\n }\n /**\n * The fetch body, if any, to send as the request body. //(default: null)//\n *\n * When setting a body, the intrinsic ``Content-Type`` is automatically\n * set and will be used if **not overridden** by setting a custom\n * header.\n *\n * If %%body%% is null, the body is cleared (along with the\n * intrinsic ``Content-Type``).\n *\n * If %%body%% is a string, the intrinsic ``Content-Type`` is set to\n * ``text/plain``.\n *\n * If %%body%% is a Uint8Array, the intrinsic ``Content-Type`` is set to\n * ``application/octet-stream``.\n *\n * If %%body%% is any other object, the intrinsic ``Content-Type`` is\n * set to ``application/json``.\n */\n get body() {\n if (this.#body == null) {\n return null;\n }\n return new Uint8Array(this.#body);\n }\n set body(body) {\n if (body == null) {\n this.#body = void 0;\n this.#bodyType = void 0;\n } else if (typeof body === \"string\") {\n this.#body = (0, utf8_js_1.toUtf8Bytes)(body);\n this.#bodyType = \"text/plain\";\n } else if (body instanceof Uint8Array) {\n this.#body = body;\n this.#bodyType = \"application/octet-stream\";\n } else if (typeof body === \"object\") {\n this.#body = (0, utf8_js_1.toUtf8Bytes)(JSON.stringify(body));\n this.#bodyType = \"application/json\";\n } else {\n throw new Error(\"invalid body\");\n }\n }\n /**\n * Returns true if the request has a body.\n */\n hasBody() {\n return this.#body != null;\n }\n /**\n * The HTTP method to use when requesting the URI. If no method\n * has been explicitly set, then ``GET`` is used if the body is\n * null and ``POST`` otherwise.\n */\n get method() {\n if (this.#method) {\n return this.#method;\n }\n if (this.hasBody()) {\n return \"POST\";\n }\n return \"GET\";\n }\n set method(method) {\n if (method == null) {\n method = \"\";\n }\n this.#method = String(method).toUpperCase();\n }\n /**\n * The headers that will be used when requesting the URI. All\n * keys are lower-case.\n *\n * This object is a copy, so any changes will **NOT** be reflected\n * in the ``FetchRequest``.\n *\n * To set a header entry, use the ``setHeader`` method.\n */\n get headers() {\n const headers = Object.assign({}, this.#headers);\n if (this.#creds) {\n headers[\"authorization\"] = `Basic ${(0, base64_js_1.encodeBase64)((0, utf8_js_1.toUtf8Bytes)(this.#creds))}`;\n }\n ;\n if (this.allowGzip) {\n headers[\"accept-encoding\"] = \"gzip\";\n }\n if (headers[\"content-type\"] == null && this.#bodyType) {\n headers[\"content-type\"] = this.#bodyType;\n }\n if (this.body) {\n headers[\"content-length\"] = String(this.body.length);\n }\n return headers;\n }\n /**\n * Get the header for %%key%%, ignoring case.\n */\n getHeader(key) {\n return this.headers[key.toLowerCase()];\n }\n /**\n * Set the header for %%key%% to %%value%%. All values are coerced\n * to a string.\n */\n setHeader(key, value) {\n this.#headers[String(key).toLowerCase()] = String(value);\n }\n /**\n * Clear all headers, resetting all intrinsic headers.\n */\n clearHeaders() {\n this.#headers = {};\n }\n [Symbol.iterator]() {\n const headers = this.headers;\n const keys = Object.keys(headers);\n let index2 = 0;\n return {\n next: () => {\n if (index2 < keys.length) {\n const key = keys[index2++];\n return {\n value: [key, headers[key]],\n done: false\n };\n }\n return { value: void 0, done: true };\n }\n };\n }\n /**\n * The value that will be sent for the ``Authorization`` header.\n *\n * To set the credentials, use the ``setCredentials`` method.\n */\n get credentials() {\n return this.#creds || null;\n }\n /**\n * Sets an ``Authorization`` for %%username%% with %%password%%.\n */\n setCredentials(username, password) {\n (0, errors_js_1.assertArgument)(!username.match(/:/), \"invalid basic authentication username\", \"username\", \"[REDACTED]\");\n this.#creds = `${username}:${password}`;\n }\n /**\n * Enable and request gzip-encoded responses. The response will\n * automatically be decompressed. //(default: true)//\n */\n get allowGzip() {\n return this.#gzip;\n }\n set allowGzip(value) {\n this.#gzip = !!value;\n }\n /**\n * Allow ``Authentication`` credentials to be sent over insecure\n * channels. //(default: false)//\n */\n get allowInsecureAuthentication() {\n return !!this.#allowInsecure;\n }\n set allowInsecureAuthentication(value) {\n this.#allowInsecure = !!value;\n }\n /**\n * The timeout (in milliseconds) to wait for a complete response.\n * //(default: 5 minutes)//\n */\n get timeout() {\n return this.#timeout;\n }\n set timeout(timeout) {\n (0, errors_js_1.assertArgument)(timeout >= 0, \"timeout must be non-zero\", \"timeout\", timeout);\n this.#timeout = timeout;\n }\n /**\n * This function is called prior to each request, for example\n * during a redirection or retry in case of server throttling.\n *\n * This offers an opportunity to populate headers or update\n * content before sending a request.\n */\n get preflightFunc() {\n return this.#preflight || null;\n }\n set preflightFunc(preflight) {\n this.#preflight = preflight;\n }\n /**\n * This function is called after each response, offering an\n * opportunity to provide client-level throttling or updating\n * response data.\n *\n * Any error thrown in this causes the ``send()`` to throw.\n *\n * To schedule a retry attempt (assuming the maximum retry limit\n * has not been reached), use [[response.throwThrottleError]].\n */\n get processFunc() {\n return this.#process || null;\n }\n set processFunc(process2) {\n this.#process = process2;\n }\n /**\n * This function is called on each retry attempt.\n */\n get retryFunc() {\n return this.#retry || null;\n }\n set retryFunc(retry) {\n this.#retry = retry;\n }\n /**\n * This function is called to fetch content from HTTP and\n * HTTPS URLs and is platform specific (e.g. nodejs vs\n * browsers).\n *\n * This is by default the currently registered global getUrl\n * function, which can be changed using [[registerGetUrl]].\n * If this has been set, setting is to ``null`` will cause\n * this FetchRequest (and any future clones) to revert back to\n * using the currently registered global getUrl function.\n *\n * Setting this is generally not necessary, but may be useful\n * for developers that wish to intercept requests or to\n * configurege a proxy or other agent.\n */\n get getUrlFunc() {\n return this.#getUrlFunc || defaultGetUrlFunc;\n }\n set getUrlFunc(value) {\n this.#getUrlFunc = value;\n }\n /**\n * Create a new FetchRequest instance with default values.\n *\n * Once created, each property may be set before issuing a\n * ``.send()`` to make the request.\n */\n constructor(url) {\n this.#url = String(url);\n this.#allowInsecure = false;\n this.#gzip = true;\n this.#headers = {};\n this.#method = \"\";\n this.#timeout = 3e5;\n this.#throttle = {\n slotInterval: SLOT_INTERVAL,\n maxAttempts: MAX_ATTEMPTS\n };\n this.#getUrlFunc = null;\n }\n toString() {\n return ``;\n }\n /**\n * Update the throttle parameters used to determine maximum\n * attempts and exponential-backoff properties.\n */\n setThrottleParams(params) {\n if (params.slotInterval != null) {\n this.#throttle.slotInterval = params.slotInterval;\n }\n if (params.maxAttempts != null) {\n this.#throttle.maxAttempts = params.maxAttempts;\n }\n }\n async #send(attempt, expires, delay, _request, _response) {\n if (attempt >= this.#throttle.maxAttempts) {\n return _response.makeServerError(\"exceeded maximum retry limit\");\n }\n (0, errors_js_1.assert)(getTime() <= expires, \"timeout\", \"TIMEOUT\", {\n operation: \"request.send\",\n reason: \"timeout\",\n request: _request\n });\n if (delay > 0) {\n await wait2(delay);\n }\n let req = this.clone();\n const scheme = (req.url.split(\":\")[0] || \"\").toLowerCase();\n if (scheme in Gateways) {\n const result = await Gateways[scheme](req.url, checkSignal(_request.#signal));\n if (result instanceof FetchResponse) {\n let response2 = result;\n if (this.processFunc) {\n checkSignal(_request.#signal);\n try {\n response2 = await this.processFunc(req, response2);\n } catch (error) {\n if (error.throttle == null || typeof error.stall !== \"number\") {\n response2.makeServerError(\"error in post-processing function\", error).assertOk();\n }\n }\n }\n return response2;\n }\n req = result;\n }\n if (this.preflightFunc) {\n req = await this.preflightFunc(req);\n }\n const resp = await this.getUrlFunc(req, checkSignal(_request.#signal));\n let response = new FetchResponse(resp.statusCode, resp.statusMessage, resp.headers, resp.body, _request);\n if (response.statusCode === 301 || response.statusCode === 302) {\n try {\n const location = response.headers.location || \"\";\n return req.redirect(location).#send(attempt + 1, expires, 0, _request, response);\n } catch (error) {\n }\n return response;\n } else if (response.statusCode === 429) {\n if (this.retryFunc == null || await this.retryFunc(req, response, attempt)) {\n const retryAfter = response.headers[\"retry-after\"];\n let delay2 = this.#throttle.slotInterval * Math.trunc(Math.random() * Math.pow(2, attempt));\n if (typeof retryAfter === \"string\" && retryAfter.match(/^[1-9][0-9]*$/)) {\n delay2 = parseInt(retryAfter);\n }\n return req.clone().#send(attempt + 1, expires, delay2, _request, response);\n }\n }\n if (this.processFunc) {\n checkSignal(_request.#signal);\n try {\n response = await this.processFunc(req, response);\n } catch (error) {\n if (error.throttle == null || typeof error.stall !== \"number\") {\n response.makeServerError(\"error in post-processing function\", error).assertOk();\n }\n let delay2 = this.#throttle.slotInterval * Math.trunc(Math.random() * Math.pow(2, attempt));\n ;\n if (error.stall >= 0) {\n delay2 = error.stall;\n }\n return req.clone().#send(attempt + 1, expires, delay2, _request, response);\n }\n }\n return response;\n }\n /**\n * Resolves to the response by sending the request.\n */\n send() {\n (0, errors_js_1.assert)(this.#signal == null, \"request already sent\", \"UNSUPPORTED_OPERATION\", { operation: \"fetchRequest.send\" });\n this.#signal = new FetchCancelSignal(this);\n return this.#send(0, getTime() + this.timeout, 0, this, new FetchResponse(0, \"\", {}, null, this));\n }\n /**\n * Cancels the inflight response, causing a ``CANCELLED``\n * error to be rejected from the [[send]].\n */\n cancel() {\n (0, errors_js_1.assert)(this.#signal != null, \"request has not been sent\", \"UNSUPPORTED_OPERATION\", { operation: \"fetchRequest.cancel\" });\n const signal = fetchSignals.get(this);\n if (!signal) {\n throw new Error(\"missing signal; should not happen\");\n }\n signal();\n }\n /**\n * Returns a new [[FetchRequest]] that represents the redirection\n * to %%location%%.\n */\n redirect(location) {\n const current = this.url.split(\":\")[0].toLowerCase();\n const target = location.split(\":\")[0].toLowerCase();\n (0, errors_js_1.assert)(this.method === \"GET\" && (current !== \"https\" || target !== \"http\") && location.match(/^https?:/), `unsupported redirect`, \"UNSUPPORTED_OPERATION\", {\n operation: `redirect(${this.method} ${JSON.stringify(this.url)} => ${JSON.stringify(location)})`\n });\n const req = new _FetchRequest(location);\n req.method = \"GET\";\n req.allowGzip = this.allowGzip;\n req.timeout = this.timeout;\n req.#headers = Object.assign({}, this.#headers);\n if (this.#body) {\n req.#body = new Uint8Array(this.#body);\n }\n req.#bodyType = this.#bodyType;\n return req;\n }\n /**\n * Create a new copy of this request.\n */\n clone() {\n const clone = new _FetchRequest(this.url);\n clone.#method = this.#method;\n if (this.#body) {\n clone.#body = this.#body;\n }\n clone.#bodyType = this.#bodyType;\n clone.#headers = Object.assign({}, this.#headers);\n clone.#creds = this.#creds;\n if (this.allowGzip) {\n clone.allowGzip = true;\n }\n clone.timeout = this.timeout;\n if (this.allowInsecureAuthentication) {\n clone.allowInsecureAuthentication = true;\n }\n clone.#preflight = this.#preflight;\n clone.#process = this.#process;\n clone.#retry = this.#retry;\n clone.#throttle = Object.assign({}, this.#throttle);\n clone.#getUrlFunc = this.#getUrlFunc;\n return clone;\n }\n /**\n * Locks all static configuration for gateways and FetchGetUrlFunc\n * registration.\n */\n static lockConfig() {\n locked = true;\n }\n /**\n * Get the current Gateway function for %%scheme%%.\n */\n static getGateway(scheme) {\n return Gateways[scheme.toLowerCase()] || null;\n }\n /**\n * Use the %%func%% when fetching URIs using %%scheme%%.\n *\n * This method affects all requests globally.\n *\n * If [[lockConfig]] has been called, no change is made and this\n * throws.\n */\n static registerGateway(scheme, func) {\n scheme = scheme.toLowerCase();\n if (scheme === \"http\" || scheme === \"https\") {\n throw new Error(`cannot intercept ${scheme}; use registerGetUrl`);\n }\n if (locked) {\n throw new Error(\"gateways locked\");\n }\n Gateways[scheme] = func;\n }\n /**\n * Use %%getUrl%% when fetching URIs over HTTP and HTTPS requests.\n *\n * This method affects all requests globally.\n *\n * If [[lockConfig]] has been called, no change is made and this\n * throws.\n */\n static registerGetUrl(getUrl2) {\n if (locked) {\n throw new Error(\"gateways locked\");\n }\n defaultGetUrlFunc = getUrl2;\n }\n /**\n * Creates a getUrl function that fetches content from HTTP and\n * HTTPS URLs.\n *\n * The available %%options%% are dependent on the platform\n * implementation of the default getUrl function.\n *\n * This is not generally something that is needed, but is useful\n * when trying to customize simple behaviour when fetching HTTP\n * content.\n */\n static createGetUrlFunc(options) {\n return (0, geturl_js_1.createGetUrl)(options);\n }\n /**\n * Creates a function that can \"fetch\" data URIs.\n *\n * Note that this is automatically done internally to support\n * data URIs, so it is not necessary to register it.\n *\n * This is not generally something that is needed, but may\n * be useful in a wrapper to perfom custom data URI functionality.\n */\n static createDataGateway() {\n return dataGatewayFunc;\n }\n /**\n * Creates a function that will fetch IPFS (unvalidated) from\n * a custom gateway baseUrl.\n *\n * The default IPFS gateway used internally is\n * ``\"https:/\\/gateway.ipfs.io/ipfs/\"``.\n */\n static createIpfsGatewayFunc(baseUrl) {\n return getIpfsGatewayFunc(baseUrl);\n }\n };\n exports3.FetchRequest = FetchRequest;\n var FetchResponse = class _FetchResponse {\n #statusCode;\n #statusMessage;\n #headers;\n #body;\n #request;\n #error;\n toString() {\n return ``;\n }\n /**\n * The response status code.\n */\n get statusCode() {\n return this.#statusCode;\n }\n /**\n * The response status message.\n */\n get statusMessage() {\n return this.#statusMessage;\n }\n /**\n * The response headers. All keys are lower-case.\n */\n get headers() {\n return Object.assign({}, this.#headers);\n }\n /**\n * The response body, or ``null`` if there was no body.\n */\n get body() {\n return this.#body == null ? null : new Uint8Array(this.#body);\n }\n /**\n * The response body as a UTF-8 encoded string, or the empty\n * string (i.e. ``\"\"``) if there was no body.\n *\n * An error is thrown if the body is invalid UTF-8 data.\n */\n get bodyText() {\n try {\n return this.#body == null ? \"\" : (0, utf8_js_1.toUtf8String)(this.#body);\n } catch (error) {\n (0, errors_js_1.assert)(false, \"response body is not valid UTF-8 data\", \"UNSUPPORTED_OPERATION\", {\n operation: \"bodyText\",\n info: { response: this }\n });\n }\n }\n /**\n * The response body, decoded as JSON.\n *\n * An error is thrown if the body is invalid JSON-encoded data\n * or if there was no body.\n */\n get bodyJson() {\n try {\n return JSON.parse(this.bodyText);\n } catch (error) {\n (0, errors_js_1.assert)(false, \"response body is not valid JSON\", \"UNSUPPORTED_OPERATION\", {\n operation: \"bodyJson\",\n info: { response: this }\n });\n }\n }\n [Symbol.iterator]() {\n const headers = this.headers;\n const keys = Object.keys(headers);\n let index2 = 0;\n return {\n next: () => {\n if (index2 < keys.length) {\n const key = keys[index2++];\n return {\n value: [key, headers[key]],\n done: false\n };\n }\n return { value: void 0, done: true };\n }\n };\n }\n constructor(statusCode, statusMessage, headers, body, request) {\n this.#statusCode = statusCode;\n this.#statusMessage = statusMessage;\n this.#headers = Object.keys(headers).reduce((accum, k4) => {\n accum[k4.toLowerCase()] = String(headers[k4]);\n return accum;\n }, {});\n this.#body = body == null ? null : new Uint8Array(body);\n this.#request = request || null;\n this.#error = { message: \"\" };\n }\n /**\n * Return a Response with matching headers and body, but with\n * an error status code (i.e. 599) and %%message%% with an\n * optional %%error%%.\n */\n makeServerError(message, error) {\n let statusMessage;\n if (!message) {\n message = `${this.statusCode} ${this.statusMessage}`;\n statusMessage = `CLIENT ESCALATED SERVER ERROR (${message})`;\n } else {\n statusMessage = `CLIENT ESCALATED SERVER ERROR (${this.statusCode} ${this.statusMessage}; ${message})`;\n }\n const response = new _FetchResponse(599, statusMessage, this.headers, this.body, this.#request || void 0);\n response.#error = { message, error };\n return response;\n }\n /**\n * If called within a [request.processFunc](FetchRequest-processFunc)\n * call, causes the request to retry as if throttled for %%stall%%\n * milliseconds.\n */\n throwThrottleError(message, stall) {\n if (stall == null) {\n stall = -1;\n } else {\n (0, errors_js_1.assertArgument)(Number.isInteger(stall) && stall >= 0, \"invalid stall timeout\", \"stall\", stall);\n }\n const error = new Error(message || \"throttling requests\");\n (0, properties_js_1.defineProperties)(error, { stall, throttle: true });\n throw error;\n }\n /**\n * Get the header value for %%key%%, ignoring case.\n */\n getHeader(key) {\n return this.headers[key.toLowerCase()];\n }\n /**\n * Returns true if the response has a body.\n */\n hasBody() {\n return this.#body != null;\n }\n /**\n * The request made for this response.\n */\n get request() {\n return this.#request;\n }\n /**\n * Returns true if this response was a success statusCode.\n */\n ok() {\n return this.#error.message === \"\" && this.statusCode >= 200 && this.statusCode < 300;\n }\n /**\n * Throws a ``SERVER_ERROR`` if this response is not ok.\n */\n assertOk() {\n if (this.ok()) {\n return;\n }\n let { message, error } = this.#error;\n if (message === \"\") {\n message = `server response ${this.statusCode} ${this.statusMessage}`;\n }\n let requestUrl = null;\n if (this.request) {\n requestUrl = this.request.url;\n }\n let responseBody = null;\n try {\n if (this.#body) {\n responseBody = (0, utf8_js_1.toUtf8String)(this.#body);\n }\n } catch (e3) {\n }\n (0, errors_js_1.assert)(false, message, \"SERVER_ERROR\", {\n request: this.request || \"unknown request\",\n response: this,\n error,\n info: {\n requestUrl,\n responseBody,\n responseStatus: `${this.statusCode} ${this.statusMessage}`\n }\n });\n }\n };\n exports3.FetchResponse = FetchResponse;\n function getTime() {\n return (/* @__PURE__ */ new Date()).getTime();\n }\n function unpercent(value) {\n return (0, utf8_js_1.toUtf8Bytes)(value.replace(/%([0-9a-f][0-9a-f])/gi, (all, code) => {\n return String.fromCharCode(parseInt(code, 16));\n }));\n }\n function wait2(delay) {\n return new Promise((resolve) => setTimeout(resolve, delay));\n }\n }\n });\n\n // ../../../node_modules/.pnpm/ethers@6.15.0_bufferutil@4.0.9_utf-8-validate@5.0.10/node_modules/ethers/lib.commonjs/utils/fixednumber.js\n var require_fixednumber2 = __commonJS({\n \"../../../node_modules/.pnpm/ethers@6.15.0_bufferutil@4.0.9_utf-8-validate@5.0.10/node_modules/ethers/lib.commonjs/utils/fixednumber.js\"(exports3) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n Object.defineProperty(exports3, \"__esModule\", { value: true });\n exports3.FixedNumber = void 0;\n var data_js_1 = require_data();\n var errors_js_1 = require_errors2();\n var maths_js_1 = require_maths();\n var properties_js_1 = require_properties();\n var BN_N1 = BigInt(-1);\n var BN_0 = BigInt(0);\n var BN_1 = BigInt(1);\n var BN_5 = BigInt(5);\n var _guard = {};\n var Zeros = \"0000\";\n while (Zeros.length < 80) {\n Zeros += Zeros;\n }\n function getTens(decimals) {\n let result = Zeros;\n while (result.length < decimals) {\n result += result;\n }\n return BigInt(\"1\" + result.substring(0, decimals));\n }\n function checkValue(val, format, safeOp) {\n const width = BigInt(format.width);\n if (format.signed) {\n const limit = BN_1 << width - BN_1;\n (0, errors_js_1.assert)(safeOp == null || val >= -limit && val < limit, \"overflow\", \"NUMERIC_FAULT\", {\n operation: safeOp,\n fault: \"overflow\",\n value: val\n });\n if (val > BN_0) {\n val = (0, maths_js_1.fromTwos)((0, maths_js_1.mask)(val, width), width);\n } else {\n val = -(0, maths_js_1.fromTwos)((0, maths_js_1.mask)(-val, width), width);\n }\n } else {\n const limit = BN_1 << width;\n (0, errors_js_1.assert)(safeOp == null || val >= 0 && val < limit, \"overflow\", \"NUMERIC_FAULT\", {\n operation: safeOp,\n fault: \"overflow\",\n value: val\n });\n val = (val % limit + limit) % limit & limit - BN_1;\n }\n return val;\n }\n function getFormat(value) {\n if (typeof value === \"number\") {\n value = `fixed128x${value}`;\n }\n let signed = true;\n let width = 128;\n let decimals = 18;\n if (typeof value === \"string\") {\n if (value === \"fixed\") {\n } else if (value === \"ufixed\") {\n signed = false;\n } else {\n const match = value.match(/^(u?)fixed([0-9]+)x([0-9]+)$/);\n (0, errors_js_1.assertArgument)(match, \"invalid fixed format\", \"format\", value);\n signed = match[1] !== \"u\";\n width = parseInt(match[2]);\n decimals = parseInt(match[3]);\n }\n } else if (value) {\n const v2 = value;\n const check = (key, type, defaultValue) => {\n if (v2[key] == null) {\n return defaultValue;\n }\n (0, errors_js_1.assertArgument)(typeof v2[key] === type, \"invalid fixed format (\" + key + \" not \" + type + \")\", \"format.\" + key, v2[key]);\n return v2[key];\n };\n signed = check(\"signed\", \"boolean\", signed);\n width = check(\"width\", \"number\", width);\n decimals = check(\"decimals\", \"number\", decimals);\n }\n (0, errors_js_1.assertArgument)(width % 8 === 0, \"invalid FixedNumber width (not byte aligned)\", \"format.width\", width);\n (0, errors_js_1.assertArgument)(decimals <= 80, \"invalid FixedNumber decimals (too large)\", \"format.decimals\", decimals);\n const name = (signed ? \"\" : \"u\") + \"fixed\" + String(width) + \"x\" + String(decimals);\n return { signed, width, decimals, name };\n }\n function toString2(val, decimals) {\n let negative = \"\";\n if (val < BN_0) {\n negative = \"-\";\n val *= BN_N1;\n }\n let str = val.toString();\n if (decimals === 0) {\n return negative + str;\n }\n while (str.length <= decimals) {\n str = Zeros + str;\n }\n const index2 = str.length - decimals;\n str = str.substring(0, index2) + \".\" + str.substring(index2);\n while (str[0] === \"0\" && str[1] !== \".\") {\n str = str.substring(1);\n }\n while (str[str.length - 1] === \"0\" && str[str.length - 2] !== \".\") {\n str = str.substring(0, str.length - 1);\n }\n return negative + str;\n }\n var FixedNumber = class _FixedNumber {\n /**\n * The specific fixed-point arithmetic field for this value.\n */\n format;\n #format;\n // The actual value (accounting for decimals)\n #val;\n // A base-10 value to multiple values by to maintain the magnitude\n #tens;\n /**\n * This is a property so console.log shows a human-meaningful value.\n *\n * @private\n */\n _value;\n // Use this when changing this file to get some typing info,\n // but then switch to any to mask the internal type\n //constructor(guard: any, value: bigint, format: _FixedFormat) {\n /**\n * @private\n */\n constructor(guard, value, format) {\n (0, errors_js_1.assertPrivate)(guard, _guard, \"FixedNumber\");\n this.#val = value;\n this.#format = format;\n const _value = toString2(value, format.decimals);\n (0, properties_js_1.defineProperties)(this, { format: format.name, _value });\n this.#tens = getTens(format.decimals);\n }\n /**\n * If true, negative values are permitted, otherwise only\n * positive values and zero are allowed.\n */\n get signed() {\n return this.#format.signed;\n }\n /**\n * The number of bits available to store the value.\n */\n get width() {\n return this.#format.width;\n }\n /**\n * The number of decimal places in the fixed-point arithment field.\n */\n get decimals() {\n return this.#format.decimals;\n }\n /**\n * The value as an integer, based on the smallest unit the\n * [[decimals]] allow.\n */\n get value() {\n return this.#val;\n }\n #checkFormat(other) {\n (0, errors_js_1.assertArgument)(this.format === other.format, \"incompatible format; use fixedNumber.toFormat\", \"other\", other);\n }\n #checkValue(val, safeOp) {\n val = checkValue(val, this.#format, safeOp);\n return new _FixedNumber(_guard, val, this.#format);\n }\n #add(o5, safeOp) {\n this.#checkFormat(o5);\n return this.#checkValue(this.#val + o5.#val, safeOp);\n }\n /**\n * Returns a new [[FixedNumber]] with the result of %%this%% added\n * to %%other%%, ignoring overflow.\n */\n addUnsafe(other) {\n return this.#add(other);\n }\n /**\n * Returns a new [[FixedNumber]] with the result of %%this%% added\n * to %%other%%. A [[NumericFaultError]] is thrown if overflow\n * occurs.\n */\n add(other) {\n return this.#add(other, \"add\");\n }\n #sub(o5, safeOp) {\n this.#checkFormat(o5);\n return this.#checkValue(this.#val - o5.#val, safeOp);\n }\n /**\n * Returns a new [[FixedNumber]] with the result of %%other%% subtracted\n * from %%this%%, ignoring overflow.\n */\n subUnsafe(other) {\n return this.#sub(other);\n }\n /**\n * Returns a new [[FixedNumber]] with the result of %%other%% subtracted\n * from %%this%%. A [[NumericFaultError]] is thrown if overflow\n * occurs.\n */\n sub(other) {\n return this.#sub(other, \"sub\");\n }\n #mul(o5, safeOp) {\n this.#checkFormat(o5);\n return this.#checkValue(this.#val * o5.#val / this.#tens, safeOp);\n }\n /**\n * Returns a new [[FixedNumber]] with the result of %%this%% multiplied\n * by %%other%%, ignoring overflow and underflow (precision loss).\n */\n mulUnsafe(other) {\n return this.#mul(other);\n }\n /**\n * Returns a new [[FixedNumber]] with the result of %%this%% multiplied\n * by %%other%%. A [[NumericFaultError]] is thrown if overflow\n * occurs.\n */\n mul(other) {\n return this.#mul(other, \"mul\");\n }\n /**\n * Returns a new [[FixedNumber]] with the result of %%this%% multiplied\n * by %%other%%. A [[NumericFaultError]] is thrown if overflow\n * occurs or if underflow (precision loss) occurs.\n */\n mulSignal(other) {\n this.#checkFormat(other);\n const value = this.#val * other.#val;\n (0, errors_js_1.assert)(value % this.#tens === BN_0, \"precision lost during signalling mul\", \"NUMERIC_FAULT\", {\n operation: \"mulSignal\",\n fault: \"underflow\",\n value: this\n });\n return this.#checkValue(value / this.#tens, \"mulSignal\");\n }\n #div(o5, safeOp) {\n (0, errors_js_1.assert)(o5.#val !== BN_0, \"division by zero\", \"NUMERIC_FAULT\", {\n operation: \"div\",\n fault: \"divide-by-zero\",\n value: this\n });\n this.#checkFormat(o5);\n return this.#checkValue(this.#val * this.#tens / o5.#val, safeOp);\n }\n /**\n * Returns a new [[FixedNumber]] with the result of %%this%% divided\n * by %%other%%, ignoring underflow (precision loss). A\n * [[NumericFaultError]] is thrown if overflow occurs.\n */\n divUnsafe(other) {\n return this.#div(other);\n }\n /**\n * Returns a new [[FixedNumber]] with the result of %%this%% divided\n * by %%other%%, ignoring underflow (precision loss). A\n * [[NumericFaultError]] is thrown if overflow occurs.\n */\n div(other) {\n return this.#div(other, \"div\");\n }\n /**\n * Returns a new [[FixedNumber]] with the result of %%this%% divided\n * by %%other%%. A [[NumericFaultError]] is thrown if underflow\n * (precision loss) occurs.\n */\n divSignal(other) {\n (0, errors_js_1.assert)(other.#val !== BN_0, \"division by zero\", \"NUMERIC_FAULT\", {\n operation: \"div\",\n fault: \"divide-by-zero\",\n value: this\n });\n this.#checkFormat(other);\n const value = this.#val * this.#tens;\n (0, errors_js_1.assert)(value % other.#val === BN_0, \"precision lost during signalling div\", \"NUMERIC_FAULT\", {\n operation: \"divSignal\",\n fault: \"underflow\",\n value: this\n });\n return this.#checkValue(value / other.#val, \"divSignal\");\n }\n /**\n * Returns a comparison result between %%this%% and %%other%%.\n *\n * This is suitable for use in sorting, where ``-1`` implies %%this%%\n * is smaller, ``1`` implies %%this%% is larger and ``0`` implies\n * both are equal.\n */\n cmp(other) {\n let a3 = this.value, b4 = other.value;\n const delta = this.decimals - other.decimals;\n if (delta > 0) {\n b4 *= getTens(delta);\n } else if (delta < 0) {\n a3 *= getTens(-delta);\n }\n if (a3 < b4) {\n return -1;\n }\n if (a3 > b4) {\n return 1;\n }\n return 0;\n }\n /**\n * Returns true if %%other%% is equal to %%this%%.\n */\n eq(other) {\n return this.cmp(other) === 0;\n }\n /**\n * Returns true if %%other%% is less than to %%this%%.\n */\n lt(other) {\n return this.cmp(other) < 0;\n }\n /**\n * Returns true if %%other%% is less than or equal to %%this%%.\n */\n lte(other) {\n return this.cmp(other) <= 0;\n }\n /**\n * Returns true if %%other%% is greater than to %%this%%.\n */\n gt(other) {\n return this.cmp(other) > 0;\n }\n /**\n * Returns true if %%other%% is greater than or equal to %%this%%.\n */\n gte(other) {\n return this.cmp(other) >= 0;\n }\n /**\n * Returns a new [[FixedNumber]] which is the largest **integer**\n * that is less than or equal to %%this%%.\n *\n * The decimal component of the result will always be ``0``.\n */\n floor() {\n let val = this.#val;\n if (this.#val < BN_0) {\n val -= this.#tens - BN_1;\n }\n val = this.#val / this.#tens * this.#tens;\n return this.#checkValue(val, \"floor\");\n }\n /**\n * Returns a new [[FixedNumber]] which is the smallest **integer**\n * that is greater than or equal to %%this%%.\n *\n * The decimal component of the result will always be ``0``.\n */\n ceiling() {\n let val = this.#val;\n if (this.#val > BN_0) {\n val += this.#tens - BN_1;\n }\n val = this.#val / this.#tens * this.#tens;\n return this.#checkValue(val, \"ceiling\");\n }\n /**\n * Returns a new [[FixedNumber]] with the decimal component\n * rounded up on ties at %%decimals%% places.\n */\n round(decimals) {\n if (decimals == null) {\n decimals = 0;\n }\n if (decimals >= this.decimals) {\n return this;\n }\n const delta = this.decimals - decimals;\n const bump = BN_5 * getTens(delta - 1);\n let value = this.value + bump;\n const tens = getTens(delta);\n value = value / tens * tens;\n checkValue(value, this.#format, \"round\");\n return new _FixedNumber(_guard, value, this.#format);\n }\n /**\n * Returns true if %%this%% is equal to ``0``.\n */\n isZero() {\n return this.#val === BN_0;\n }\n /**\n * Returns true if %%this%% is less than ``0``.\n */\n isNegative() {\n return this.#val < BN_0;\n }\n /**\n * Returns the string representation of %%this%%.\n */\n toString() {\n return this._value;\n }\n /**\n * Returns a float approximation.\n *\n * Due to IEEE 754 precission (or lack thereof), this function\n * can only return an approximation and most values will contain\n * rounding errors.\n */\n toUnsafeFloat() {\n return parseFloat(this.toString());\n }\n /**\n * Return a new [[FixedNumber]] with the same value but has had\n * its field set to %%format%%.\n *\n * This will throw if the value cannot fit into %%format%%.\n */\n toFormat(format) {\n return _FixedNumber.fromString(this.toString(), format);\n }\n /**\n * Creates a new [[FixedNumber]] for %%value%% divided by\n * %%decimal%% places with %%format%%.\n *\n * This will throw a [[NumericFaultError]] if %%value%% (once adjusted\n * for %%decimals%%) cannot fit in %%format%%, either due to overflow\n * or underflow (precision loss).\n */\n static fromValue(_value, _decimals, _format) {\n const decimals = _decimals == null ? 0 : (0, maths_js_1.getNumber)(_decimals);\n const format = getFormat(_format);\n let value = (0, maths_js_1.getBigInt)(_value, \"value\");\n const delta = decimals - format.decimals;\n if (delta > 0) {\n const tens = getTens(delta);\n (0, errors_js_1.assert)(value % tens === BN_0, \"value loses precision for format\", \"NUMERIC_FAULT\", {\n operation: \"fromValue\",\n fault: \"underflow\",\n value: _value\n });\n value /= tens;\n } else if (delta < 0) {\n value *= getTens(-delta);\n }\n checkValue(value, format, \"fromValue\");\n return new _FixedNumber(_guard, value, format);\n }\n /**\n * Creates a new [[FixedNumber]] for %%value%% with %%format%%.\n *\n * This will throw a [[NumericFaultError]] if %%value%% cannot fit\n * in %%format%%, either due to overflow or underflow (precision loss).\n */\n static fromString(_value, _format) {\n const match = _value.match(/^(-?)([0-9]*)\\.?([0-9]*)$/);\n (0, errors_js_1.assertArgument)(match && match[2].length + match[3].length > 0, \"invalid FixedNumber string value\", \"value\", _value);\n const format = getFormat(_format);\n let whole = match[2] || \"0\", decimal = match[3] || \"\";\n while (decimal.length < format.decimals) {\n decimal += Zeros;\n }\n (0, errors_js_1.assert)(decimal.substring(format.decimals).match(/^0*$/), \"too many decimals for format\", \"NUMERIC_FAULT\", {\n operation: \"fromString\",\n fault: \"underflow\",\n value: _value\n });\n decimal = decimal.substring(0, format.decimals);\n const value = BigInt(match[1] + whole + decimal);\n checkValue(value, format, \"fromString\");\n return new _FixedNumber(_guard, value, format);\n }\n /**\n * Creates a new [[FixedNumber]] with the big-endian representation\n * %%value%% with %%format%%.\n *\n * This will throw a [[NumericFaultError]] if %%value%% cannot fit\n * in %%format%% due to overflow.\n */\n static fromBytes(_value, _format) {\n let value = (0, maths_js_1.toBigInt)((0, data_js_1.getBytes)(_value, \"value\"));\n const format = getFormat(_format);\n if (format.signed) {\n value = (0, maths_js_1.fromTwos)(value, format.width);\n }\n checkValue(value, format, \"fromBytes\");\n return new _FixedNumber(_guard, value, format);\n }\n };\n exports3.FixedNumber = FixedNumber;\n }\n });\n\n // ../../../node_modules/.pnpm/ethers@6.15.0_bufferutil@4.0.9_utf-8-validate@5.0.10/node_modules/ethers/lib.commonjs/utils/rlp-decode.js\n var require_rlp_decode = __commonJS({\n \"../../../node_modules/.pnpm/ethers@6.15.0_bufferutil@4.0.9_utf-8-validate@5.0.10/node_modules/ethers/lib.commonjs/utils/rlp-decode.js\"(exports3) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n Object.defineProperty(exports3, \"__esModule\", { value: true });\n exports3.decodeRlp = void 0;\n var data_js_1 = require_data();\n var errors_js_1 = require_errors2();\n var data_js_2 = require_data();\n function hexlifyByte(value) {\n let result = value.toString(16);\n while (result.length < 2) {\n result = \"0\" + result;\n }\n return \"0x\" + result;\n }\n function unarrayifyInteger(data, offset, length2) {\n let result = 0;\n for (let i3 = 0; i3 < length2; i3++) {\n result = result * 256 + data[offset + i3];\n }\n return result;\n }\n function _decodeChildren(data, offset, childOffset, length2) {\n const result = [];\n while (childOffset < offset + 1 + length2) {\n const decoded = _decode(data, childOffset);\n result.push(decoded.result);\n childOffset += decoded.consumed;\n (0, errors_js_1.assert)(childOffset <= offset + 1 + length2, \"child data too short\", \"BUFFER_OVERRUN\", {\n buffer: data,\n length: length2,\n offset\n });\n }\n return { consumed: 1 + length2, result };\n }\n function _decode(data, offset) {\n (0, errors_js_1.assert)(data.length !== 0, \"data too short\", \"BUFFER_OVERRUN\", {\n buffer: data,\n length: 0,\n offset: 1\n });\n const checkOffset = (offset2) => {\n (0, errors_js_1.assert)(offset2 <= data.length, \"data short segment too short\", \"BUFFER_OVERRUN\", {\n buffer: data,\n length: data.length,\n offset: offset2\n });\n };\n if (data[offset] >= 248) {\n const lengthLength = data[offset] - 247;\n checkOffset(offset + 1 + lengthLength);\n const length2 = unarrayifyInteger(data, offset + 1, lengthLength);\n checkOffset(offset + 1 + lengthLength + length2);\n return _decodeChildren(data, offset, offset + 1 + lengthLength, lengthLength + length2);\n } else if (data[offset] >= 192) {\n const length2 = data[offset] - 192;\n checkOffset(offset + 1 + length2);\n return _decodeChildren(data, offset, offset + 1, length2);\n } else if (data[offset] >= 184) {\n const lengthLength = data[offset] - 183;\n checkOffset(offset + 1 + lengthLength);\n const length2 = unarrayifyInteger(data, offset + 1, lengthLength);\n checkOffset(offset + 1 + lengthLength + length2);\n const result = (0, data_js_1.hexlify)(data.slice(offset + 1 + lengthLength, offset + 1 + lengthLength + length2));\n return { consumed: 1 + lengthLength + length2, result };\n } else if (data[offset] >= 128) {\n const length2 = data[offset] - 128;\n checkOffset(offset + 1 + length2);\n const result = (0, data_js_1.hexlify)(data.slice(offset + 1, offset + 1 + length2));\n return { consumed: 1 + length2, result };\n }\n return { consumed: 1, result: hexlifyByte(data[offset]) };\n }\n function decodeRlp(_data) {\n const data = (0, data_js_2.getBytes)(_data, \"data\");\n const decoded = _decode(data, 0);\n (0, errors_js_1.assertArgument)(decoded.consumed === data.length, \"unexpected junk after rlp payload\", \"data\", _data);\n return decoded.result;\n }\n exports3.decodeRlp = decodeRlp;\n }\n });\n\n // ../../../node_modules/.pnpm/ethers@6.15.0_bufferutil@4.0.9_utf-8-validate@5.0.10/node_modules/ethers/lib.commonjs/utils/rlp-encode.js\n var require_rlp_encode = __commonJS({\n \"../../../node_modules/.pnpm/ethers@6.15.0_bufferutil@4.0.9_utf-8-validate@5.0.10/node_modules/ethers/lib.commonjs/utils/rlp-encode.js\"(exports3) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n Object.defineProperty(exports3, \"__esModule\", { value: true });\n exports3.encodeRlp = void 0;\n var data_js_1 = require_data();\n function arrayifyInteger(value) {\n const result = [];\n while (value) {\n result.unshift(value & 255);\n value >>= 8;\n }\n return result;\n }\n function _encode(object2) {\n if (Array.isArray(object2)) {\n let payload = [];\n object2.forEach(function(child) {\n payload = payload.concat(_encode(child));\n });\n if (payload.length <= 55) {\n payload.unshift(192 + payload.length);\n return payload;\n }\n const length3 = arrayifyInteger(payload.length);\n length3.unshift(247 + length3.length);\n return length3.concat(payload);\n }\n const data = Array.prototype.slice.call((0, data_js_1.getBytes)(object2, \"object\"));\n if (data.length === 1 && data[0] <= 127) {\n return data;\n } else if (data.length <= 55) {\n data.unshift(128 + data.length);\n return data;\n }\n const length2 = arrayifyInteger(data.length);\n length2.unshift(183 + length2.length);\n return length2.concat(data);\n }\n var nibbles = \"0123456789abcdef\";\n function encodeRlp(object2) {\n let result = \"0x\";\n for (const v2 of _encode(object2)) {\n result += nibbles[v2 >> 4];\n result += nibbles[v2 & 15];\n }\n return result;\n }\n exports3.encodeRlp = encodeRlp;\n }\n });\n\n // ../../../node_modules/.pnpm/ethers@6.15.0_bufferutil@4.0.9_utf-8-validate@5.0.10/node_modules/ethers/lib.commonjs/utils/units.js\n var require_units = __commonJS({\n \"../../../node_modules/.pnpm/ethers@6.15.0_bufferutil@4.0.9_utf-8-validate@5.0.10/node_modules/ethers/lib.commonjs/utils/units.js\"(exports3) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n Object.defineProperty(exports3, \"__esModule\", { value: true });\n exports3.parseEther = exports3.formatEther = exports3.parseUnits = exports3.formatUnits = void 0;\n var errors_js_1 = require_errors2();\n var fixednumber_js_1 = require_fixednumber2();\n var maths_js_1 = require_maths();\n var names = [\n \"wei\",\n \"kwei\",\n \"mwei\",\n \"gwei\",\n \"szabo\",\n \"finney\",\n \"ether\"\n ];\n function formatUnits2(value, unit) {\n let decimals = 18;\n if (typeof unit === \"string\") {\n const index2 = names.indexOf(unit);\n (0, errors_js_1.assertArgument)(index2 >= 0, \"invalid unit\", \"unit\", unit);\n decimals = 3 * index2;\n } else if (unit != null) {\n decimals = (0, maths_js_1.getNumber)(unit, \"unit\");\n }\n return fixednumber_js_1.FixedNumber.fromValue(value, decimals, { decimals, width: 512 }).toString();\n }\n exports3.formatUnits = formatUnits2;\n function parseUnits(value, unit) {\n (0, errors_js_1.assertArgument)(typeof value === \"string\", \"value must be a string\", \"value\", value);\n let decimals = 18;\n if (typeof unit === \"string\") {\n const index2 = names.indexOf(unit);\n (0, errors_js_1.assertArgument)(index2 >= 0, \"invalid unit\", \"unit\", unit);\n decimals = 3 * index2;\n } else if (unit != null) {\n decimals = (0, maths_js_1.getNumber)(unit, \"unit\");\n }\n return fixednumber_js_1.FixedNumber.fromString(value, { decimals, width: 512 }).value;\n }\n exports3.parseUnits = parseUnits;\n function formatEther2(wei) {\n return formatUnits2(wei, 18);\n }\n exports3.formatEther = formatEther2;\n function parseEther(ether) {\n return parseUnits(ether, 18);\n }\n exports3.parseEther = parseEther;\n }\n });\n\n // ../../../node_modules/.pnpm/ethers@6.15.0_bufferutil@4.0.9_utf-8-validate@5.0.10/node_modules/ethers/lib.commonjs/utils/uuid.js\n var require_uuid = __commonJS({\n \"../../../node_modules/.pnpm/ethers@6.15.0_bufferutil@4.0.9_utf-8-validate@5.0.10/node_modules/ethers/lib.commonjs/utils/uuid.js\"(exports3) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n Object.defineProperty(exports3, \"__esModule\", { value: true });\n exports3.uuidV4 = void 0;\n var data_js_1 = require_data();\n function uuidV4(randomBytes2) {\n const bytes = (0, data_js_1.getBytes)(randomBytes2, \"randomBytes\");\n bytes[6] = bytes[6] & 15 | 64;\n bytes[8] = bytes[8] & 63 | 128;\n const value = (0, data_js_1.hexlify)(bytes);\n return [\n value.substring(2, 10),\n value.substring(10, 14),\n value.substring(14, 18),\n value.substring(18, 22),\n value.substring(22, 34)\n ].join(\"-\");\n }\n exports3.uuidV4 = uuidV4;\n }\n });\n\n // ../../../node_modules/.pnpm/ethers@6.15.0_bufferutil@4.0.9_utf-8-validate@5.0.10/node_modules/ethers/lib.commonjs/utils/index.js\n var require_utils8 = __commonJS({\n \"../../../node_modules/.pnpm/ethers@6.15.0_bufferutil@4.0.9_utf-8-validate@5.0.10/node_modules/ethers/lib.commonjs/utils/index.js\"(exports3) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n Object.defineProperty(exports3, \"__esModule\", { value: true });\n exports3.toUtf8String = exports3.toUtf8CodePoints = exports3.toUtf8Bytes = exports3.parseUnits = exports3.formatUnits = exports3.parseEther = exports3.formatEther = exports3.encodeRlp = exports3.decodeRlp = exports3.defineProperties = exports3.resolveProperties = exports3.toQuantity = exports3.toBeArray = exports3.toBeHex = exports3.toNumber = exports3.toBigInt = exports3.getUint = exports3.getNumber = exports3.getBigInt = exports3.mask = exports3.toTwos = exports3.fromTwos = exports3.FixedNumber = exports3.FetchCancelSignal = exports3.FetchResponse = exports3.FetchRequest = exports3.EventPayload = exports3.makeError = exports3.assertNormalize = exports3.assertPrivate = exports3.assertArgumentCount = exports3.assertArgument = exports3.assert = exports3.isError = exports3.isCallException = exports3.zeroPadBytes = exports3.zeroPadValue = exports3.stripZerosLeft = exports3.dataSlice = exports3.dataLength = exports3.concat = exports3.hexlify = exports3.isBytesLike = exports3.isHexString = exports3.getBytesCopy = exports3.getBytes = exports3.encodeBase64 = exports3.decodeBase64 = exports3.encodeBase58 = exports3.decodeBase58 = void 0;\n exports3.uuidV4 = exports3.Utf8ErrorFuncs = void 0;\n var base58_js_1 = require_base58();\n Object.defineProperty(exports3, \"decodeBase58\", { enumerable: true, get: function() {\n return base58_js_1.decodeBase58;\n } });\n Object.defineProperty(exports3, \"encodeBase58\", { enumerable: true, get: function() {\n return base58_js_1.encodeBase58;\n } });\n var base64_js_1 = require_base64_browser();\n Object.defineProperty(exports3, \"decodeBase64\", { enumerable: true, get: function() {\n return base64_js_1.decodeBase64;\n } });\n Object.defineProperty(exports3, \"encodeBase64\", { enumerable: true, get: function() {\n return base64_js_1.encodeBase64;\n } });\n var data_js_1 = require_data();\n Object.defineProperty(exports3, \"getBytes\", { enumerable: true, get: function() {\n return data_js_1.getBytes;\n } });\n Object.defineProperty(exports3, \"getBytesCopy\", { enumerable: true, get: function() {\n return data_js_1.getBytesCopy;\n } });\n Object.defineProperty(exports3, \"isHexString\", { enumerable: true, get: function() {\n return data_js_1.isHexString;\n } });\n Object.defineProperty(exports3, \"isBytesLike\", { enumerable: true, get: function() {\n return data_js_1.isBytesLike;\n } });\n Object.defineProperty(exports3, \"hexlify\", { enumerable: true, get: function() {\n return data_js_1.hexlify;\n } });\n Object.defineProperty(exports3, \"concat\", { enumerable: true, get: function() {\n return data_js_1.concat;\n } });\n Object.defineProperty(exports3, \"dataLength\", { enumerable: true, get: function() {\n return data_js_1.dataLength;\n } });\n Object.defineProperty(exports3, \"dataSlice\", { enumerable: true, get: function() {\n return data_js_1.dataSlice;\n } });\n Object.defineProperty(exports3, \"stripZerosLeft\", { enumerable: true, get: function() {\n return data_js_1.stripZerosLeft;\n } });\n Object.defineProperty(exports3, \"zeroPadValue\", { enumerable: true, get: function() {\n return data_js_1.zeroPadValue;\n } });\n Object.defineProperty(exports3, \"zeroPadBytes\", { enumerable: true, get: function() {\n return data_js_1.zeroPadBytes;\n } });\n var errors_js_1 = require_errors2();\n Object.defineProperty(exports3, \"isCallException\", { enumerable: true, get: function() {\n return errors_js_1.isCallException;\n } });\n Object.defineProperty(exports3, \"isError\", { enumerable: true, get: function() {\n return errors_js_1.isError;\n } });\n Object.defineProperty(exports3, \"assert\", { enumerable: true, get: function() {\n return errors_js_1.assert;\n } });\n Object.defineProperty(exports3, \"assertArgument\", { enumerable: true, get: function() {\n return errors_js_1.assertArgument;\n } });\n Object.defineProperty(exports3, \"assertArgumentCount\", { enumerable: true, get: function() {\n return errors_js_1.assertArgumentCount;\n } });\n Object.defineProperty(exports3, \"assertPrivate\", { enumerable: true, get: function() {\n return errors_js_1.assertPrivate;\n } });\n Object.defineProperty(exports3, \"assertNormalize\", { enumerable: true, get: function() {\n return errors_js_1.assertNormalize;\n } });\n Object.defineProperty(exports3, \"makeError\", { enumerable: true, get: function() {\n return errors_js_1.makeError;\n } });\n var events_js_1 = require_events();\n Object.defineProperty(exports3, \"EventPayload\", { enumerable: true, get: function() {\n return events_js_1.EventPayload;\n } });\n var fetch_js_1 = require_fetch();\n Object.defineProperty(exports3, \"FetchRequest\", { enumerable: true, get: function() {\n return fetch_js_1.FetchRequest;\n } });\n Object.defineProperty(exports3, \"FetchResponse\", { enumerable: true, get: function() {\n return fetch_js_1.FetchResponse;\n } });\n Object.defineProperty(exports3, \"FetchCancelSignal\", { enumerable: true, get: function() {\n return fetch_js_1.FetchCancelSignal;\n } });\n var fixednumber_js_1 = require_fixednumber2();\n Object.defineProperty(exports3, \"FixedNumber\", { enumerable: true, get: function() {\n return fixednumber_js_1.FixedNumber;\n } });\n var maths_js_1 = require_maths();\n Object.defineProperty(exports3, \"fromTwos\", { enumerable: true, get: function() {\n return maths_js_1.fromTwos;\n } });\n Object.defineProperty(exports3, \"toTwos\", { enumerable: true, get: function() {\n return maths_js_1.toTwos;\n } });\n Object.defineProperty(exports3, \"mask\", { enumerable: true, get: function() {\n return maths_js_1.mask;\n } });\n Object.defineProperty(exports3, \"getBigInt\", { enumerable: true, get: function() {\n return maths_js_1.getBigInt;\n } });\n Object.defineProperty(exports3, \"getNumber\", { enumerable: true, get: function() {\n return maths_js_1.getNumber;\n } });\n Object.defineProperty(exports3, \"getUint\", { enumerable: true, get: function() {\n return maths_js_1.getUint;\n } });\n Object.defineProperty(exports3, \"toBigInt\", { enumerable: true, get: function() {\n return maths_js_1.toBigInt;\n } });\n Object.defineProperty(exports3, \"toNumber\", { enumerable: true, get: function() {\n return maths_js_1.toNumber;\n } });\n Object.defineProperty(exports3, \"toBeHex\", { enumerable: true, get: function() {\n return maths_js_1.toBeHex;\n } });\n Object.defineProperty(exports3, \"toBeArray\", { enumerable: true, get: function() {\n return maths_js_1.toBeArray;\n } });\n Object.defineProperty(exports3, \"toQuantity\", { enumerable: true, get: function() {\n return maths_js_1.toQuantity;\n } });\n var properties_js_1 = require_properties();\n Object.defineProperty(exports3, \"resolveProperties\", { enumerable: true, get: function() {\n return properties_js_1.resolveProperties;\n } });\n Object.defineProperty(exports3, \"defineProperties\", { enumerable: true, get: function() {\n return properties_js_1.defineProperties;\n } });\n var rlp_decode_js_1 = require_rlp_decode();\n Object.defineProperty(exports3, \"decodeRlp\", { enumerable: true, get: function() {\n return rlp_decode_js_1.decodeRlp;\n } });\n var rlp_encode_js_1 = require_rlp_encode();\n Object.defineProperty(exports3, \"encodeRlp\", { enumerable: true, get: function() {\n return rlp_encode_js_1.encodeRlp;\n } });\n var units_js_1 = require_units();\n Object.defineProperty(exports3, \"formatEther\", { enumerable: true, get: function() {\n return units_js_1.formatEther;\n } });\n Object.defineProperty(exports3, \"parseEther\", { enumerable: true, get: function() {\n return units_js_1.parseEther;\n } });\n Object.defineProperty(exports3, \"formatUnits\", { enumerable: true, get: function() {\n return units_js_1.formatUnits;\n } });\n Object.defineProperty(exports3, \"parseUnits\", { enumerable: true, get: function() {\n return units_js_1.parseUnits;\n } });\n var utf8_js_1 = require_utf82();\n Object.defineProperty(exports3, \"toUtf8Bytes\", { enumerable: true, get: function() {\n return utf8_js_1.toUtf8Bytes;\n } });\n Object.defineProperty(exports3, \"toUtf8CodePoints\", { enumerable: true, get: function() {\n return utf8_js_1.toUtf8CodePoints;\n } });\n Object.defineProperty(exports3, \"toUtf8String\", { enumerable: true, get: function() {\n return utf8_js_1.toUtf8String;\n } });\n Object.defineProperty(exports3, \"Utf8ErrorFuncs\", { enumerable: true, get: function() {\n return utf8_js_1.Utf8ErrorFuncs;\n } });\n var uuid_js_1 = require_uuid();\n Object.defineProperty(exports3, \"uuidV4\", { enumerable: true, get: function() {\n return uuid_js_1.uuidV4;\n } });\n }\n });\n\n // ../../../node_modules/.pnpm/ethers@6.15.0_bufferutil@4.0.9_utf-8-validate@5.0.10/node_modules/ethers/lib.commonjs/abi/coders/abstract-coder.js\n var require_abstract_coder2 = __commonJS({\n \"../../../node_modules/.pnpm/ethers@6.15.0_bufferutil@4.0.9_utf-8-validate@5.0.10/node_modules/ethers/lib.commonjs/abi/coders/abstract-coder.js\"(exports3) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n Object.defineProperty(exports3, \"__esModule\", { value: true });\n exports3.Reader = exports3.Writer = exports3.Coder = exports3.checkResultErrors = exports3.Result = exports3.WordSize = void 0;\n var index_js_1 = require_utils8();\n exports3.WordSize = 32;\n var Padding = new Uint8Array(exports3.WordSize);\n var passProperties = [\"then\"];\n var _guard = {};\n var resultNames = /* @__PURE__ */ new WeakMap();\n function getNames(result) {\n return resultNames.get(result);\n }\n function setNames(result, names) {\n resultNames.set(result, names);\n }\n function throwError(name, error) {\n const wrapped = new Error(`deferred error during ABI decoding triggered accessing ${name}`);\n wrapped.error = error;\n throw wrapped;\n }\n function toObject(names, items, deep) {\n if (names.indexOf(null) >= 0) {\n return items.map((item, index2) => {\n if (item instanceof Result) {\n return toObject(getNames(item), item, deep);\n }\n return item;\n });\n }\n return names.reduce((accum, name, index2) => {\n let item = items.getValue(name);\n if (!(name in accum)) {\n if (deep && item instanceof Result) {\n item = toObject(getNames(item), item, deep);\n }\n accum[name] = item;\n }\n return accum;\n }, {});\n }\n var Result = class _Result extends Array {\n // No longer used; but cannot be removed as it will remove the\n // #private field from the .d.ts which may break backwards\n // compatibility\n #names;\n /**\n * @private\n */\n constructor(...args) {\n const guard = args[0];\n let items = args[1];\n let names = (args[2] || []).slice();\n let wrap3 = true;\n if (guard !== _guard) {\n items = args;\n names = [];\n wrap3 = false;\n }\n super(items.length);\n items.forEach((item, index2) => {\n this[index2] = item;\n });\n const nameCounts = names.reduce((accum, name) => {\n if (typeof name === \"string\") {\n accum.set(name, (accum.get(name) || 0) + 1);\n }\n return accum;\n }, /* @__PURE__ */ new Map());\n setNames(this, Object.freeze(items.map((item, index2) => {\n const name = names[index2];\n if (name != null && nameCounts.get(name) === 1) {\n return name;\n }\n return null;\n })));\n this.#names = [];\n if (this.#names == null) {\n void this.#names;\n }\n if (!wrap3) {\n return;\n }\n Object.freeze(this);\n const proxy = new Proxy(this, {\n get: (target, prop, receiver) => {\n if (typeof prop === \"string\") {\n if (prop.match(/^[0-9]+$/)) {\n const index2 = (0, index_js_1.getNumber)(prop, \"%index\");\n if (index2 < 0 || index2 >= this.length) {\n throw new RangeError(\"out of result range\");\n }\n const item = target[index2];\n if (item instanceof Error) {\n throwError(`index ${index2}`, item);\n }\n return item;\n }\n if (passProperties.indexOf(prop) >= 0) {\n return Reflect.get(target, prop, receiver);\n }\n const value = target[prop];\n if (value instanceof Function) {\n return function(...args2) {\n return value.apply(this === receiver ? target : this, args2);\n };\n } else if (!(prop in target)) {\n return target.getValue.apply(this === receiver ? target : this, [prop]);\n }\n }\n return Reflect.get(target, prop, receiver);\n }\n });\n setNames(proxy, getNames(this));\n return proxy;\n }\n /**\n * Returns the Result as a normal Array. If %%deep%%, any children\n * which are Result objects are also converted to a normal Array.\n *\n * This will throw if there are any outstanding deferred\n * errors.\n */\n toArray(deep) {\n const result = [];\n this.forEach((item, index2) => {\n if (item instanceof Error) {\n throwError(`index ${index2}`, item);\n }\n if (deep && item instanceof _Result) {\n item = item.toArray(deep);\n }\n result.push(item);\n });\n return result;\n }\n /**\n * Returns the Result as an Object with each name-value pair. If\n * %%deep%%, any children which are Result objects are also\n * converted to an Object.\n *\n * This will throw if any value is unnamed, or if there are\n * any outstanding deferred errors.\n */\n toObject(deep) {\n const names = getNames(this);\n return names.reduce((accum, name, index2) => {\n (0, index_js_1.assert)(name != null, `value at index ${index2} unnamed`, \"UNSUPPORTED_OPERATION\", {\n operation: \"toObject()\"\n });\n return toObject(names, this, deep);\n }, {});\n }\n /**\n * @_ignore\n */\n slice(start, end) {\n if (start == null) {\n start = 0;\n }\n if (start < 0) {\n start += this.length;\n if (start < 0) {\n start = 0;\n }\n }\n if (end == null) {\n end = this.length;\n }\n if (end < 0) {\n end += this.length;\n if (end < 0) {\n end = 0;\n }\n }\n if (end > this.length) {\n end = this.length;\n }\n const _names = getNames(this);\n const result = [], names = [];\n for (let i3 = start; i3 < end; i3++) {\n result.push(this[i3]);\n names.push(_names[i3]);\n }\n return new _Result(_guard, result, names);\n }\n /**\n * @_ignore\n */\n filter(callback, thisArg) {\n const _names = getNames(this);\n const result = [], names = [];\n for (let i3 = 0; i3 < this.length; i3++) {\n const item = this[i3];\n if (item instanceof Error) {\n throwError(`index ${i3}`, item);\n }\n if (callback.call(thisArg, item, i3, this)) {\n result.push(item);\n names.push(_names[i3]);\n }\n }\n return new _Result(_guard, result, names);\n }\n /**\n * @_ignore\n */\n map(callback, thisArg) {\n const result = [];\n for (let i3 = 0; i3 < this.length; i3++) {\n const item = this[i3];\n if (item instanceof Error) {\n throwError(`index ${i3}`, item);\n }\n result.push(callback.call(thisArg, item, i3, this));\n }\n return result;\n }\n /**\n * Returns the value for %%name%%.\n *\n * Since it is possible to have a key whose name conflicts with\n * a method on a [[Result]] or its superclass Array, or any\n * JavaScript keyword, this ensures all named values are still\n * accessible by name.\n */\n getValue(name) {\n const index2 = getNames(this).indexOf(name);\n if (index2 === -1) {\n return void 0;\n }\n const value = this[index2];\n if (value instanceof Error) {\n throwError(`property ${JSON.stringify(name)}`, value.error);\n }\n return value;\n }\n /**\n * Creates a new [[Result]] for %%items%% with each entry\n * also accessible by its corresponding name in %%keys%%.\n */\n static fromItems(items, keys) {\n return new _Result(_guard, items, keys);\n }\n };\n exports3.Result = Result;\n function checkResultErrors(result) {\n const errors = [];\n const checkErrors = function(path, object2) {\n if (!Array.isArray(object2)) {\n return;\n }\n for (let key in object2) {\n const childPath = path.slice();\n childPath.push(key);\n try {\n checkErrors(childPath, object2[key]);\n } catch (error) {\n errors.push({ path: childPath, error });\n }\n }\n };\n checkErrors([], result);\n return errors;\n }\n exports3.checkResultErrors = checkResultErrors;\n function getValue(value) {\n let bytes = (0, index_js_1.toBeArray)(value);\n (0, index_js_1.assert)(bytes.length <= exports3.WordSize, \"value out-of-bounds\", \"BUFFER_OVERRUN\", { buffer: bytes, length: exports3.WordSize, offset: bytes.length });\n if (bytes.length !== exports3.WordSize) {\n bytes = (0, index_js_1.getBytesCopy)((0, index_js_1.concat)([Padding.slice(bytes.length % exports3.WordSize), bytes]));\n }\n return bytes;\n }\n var Coder = class {\n // The coder name:\n // - address, uint256, tuple, array, etc.\n name;\n // The fully expanded type, including composite types:\n // - address, uint256, tuple(address,bytes), uint256[3][4][], etc.\n type;\n // The localName bound in the signature, in this example it is \"baz\":\n // - tuple(address foo, uint bar) baz\n localName;\n // Whether this type is dynamic:\n // - Dynamic: bytes, string, address[], tuple(boolean[]), etc.\n // - Not Dynamic: address, uint256, boolean[3], tuple(address, uint8)\n dynamic;\n constructor(name, type, localName, dynamic) {\n (0, index_js_1.defineProperties)(this, { name, type, localName, dynamic }, {\n name: \"string\",\n type: \"string\",\n localName: \"string\",\n dynamic: \"boolean\"\n });\n }\n _throwError(message, value) {\n (0, index_js_1.assertArgument)(false, message, this.localName, value);\n }\n };\n exports3.Coder = Coder;\n var Writer = class {\n // An array of WordSize lengthed objects to concatenation\n #data;\n #dataLength;\n constructor() {\n this.#data = [];\n this.#dataLength = 0;\n }\n get data() {\n return (0, index_js_1.concat)(this.#data);\n }\n get length() {\n return this.#dataLength;\n }\n #writeData(data) {\n this.#data.push(data);\n this.#dataLength += data.length;\n return data.length;\n }\n appendWriter(writer) {\n return this.#writeData((0, index_js_1.getBytesCopy)(writer.data));\n }\n // Arrayish item; pad on the right to *nearest* WordSize\n writeBytes(value) {\n let bytes = (0, index_js_1.getBytesCopy)(value);\n const paddingOffset = bytes.length % exports3.WordSize;\n if (paddingOffset) {\n bytes = (0, index_js_1.getBytesCopy)((0, index_js_1.concat)([bytes, Padding.slice(paddingOffset)]));\n }\n return this.#writeData(bytes);\n }\n // Numeric item; pad on the left *to* WordSize\n writeValue(value) {\n return this.#writeData(getValue(value));\n }\n // Inserts a numeric place-holder, returning a callback that can\n // be used to asjust the value later\n writeUpdatableValue() {\n const offset = this.#data.length;\n this.#data.push(Padding);\n this.#dataLength += exports3.WordSize;\n return (value) => {\n this.#data[offset] = getValue(value);\n };\n }\n };\n exports3.Writer = Writer;\n var Reader = class _Reader {\n // Allows incomplete unpadded data to be read; otherwise an error\n // is raised if attempting to overrun the buffer. This is required\n // to deal with an old Solidity bug, in which event data for\n // external (not public thoguh) was tightly packed.\n allowLoose;\n #data;\n #offset;\n #bytesRead;\n #parent;\n #maxInflation;\n constructor(data, allowLoose, maxInflation) {\n (0, index_js_1.defineProperties)(this, { allowLoose: !!allowLoose });\n this.#data = (0, index_js_1.getBytesCopy)(data);\n this.#bytesRead = 0;\n this.#parent = null;\n this.#maxInflation = maxInflation != null ? maxInflation : 1024;\n this.#offset = 0;\n }\n get data() {\n return (0, index_js_1.hexlify)(this.#data);\n }\n get dataLength() {\n return this.#data.length;\n }\n get consumed() {\n return this.#offset;\n }\n get bytes() {\n return new Uint8Array(this.#data);\n }\n #incrementBytesRead(count) {\n if (this.#parent) {\n return this.#parent.#incrementBytesRead(count);\n }\n this.#bytesRead += count;\n (0, index_js_1.assert)(this.#maxInflation < 1 || this.#bytesRead <= this.#maxInflation * this.dataLength, `compressed ABI data exceeds inflation ratio of ${this.#maxInflation} ( see: https://github.com/ethers-io/ethers.js/issues/4537 )`, \"BUFFER_OVERRUN\", {\n buffer: (0, index_js_1.getBytesCopy)(this.#data),\n offset: this.#offset,\n length: count,\n info: {\n bytesRead: this.#bytesRead,\n dataLength: this.dataLength\n }\n });\n }\n #peekBytes(offset, length2, loose) {\n let alignedLength = Math.ceil(length2 / exports3.WordSize) * exports3.WordSize;\n if (this.#offset + alignedLength > this.#data.length) {\n if (this.allowLoose && loose && this.#offset + length2 <= this.#data.length) {\n alignedLength = length2;\n } else {\n (0, index_js_1.assert)(false, \"data out-of-bounds\", \"BUFFER_OVERRUN\", {\n buffer: (0, index_js_1.getBytesCopy)(this.#data),\n length: this.#data.length,\n offset: this.#offset + alignedLength\n });\n }\n }\n return this.#data.slice(this.#offset, this.#offset + alignedLength);\n }\n // Create a sub-reader with the same underlying data, but offset\n subReader(offset) {\n const reader = new _Reader(this.#data.slice(this.#offset + offset), this.allowLoose, this.#maxInflation);\n reader.#parent = this;\n return reader;\n }\n // Read bytes\n readBytes(length2, loose) {\n let bytes = this.#peekBytes(0, length2, !!loose);\n this.#incrementBytesRead(length2);\n this.#offset += bytes.length;\n return bytes.slice(0, length2);\n }\n // Read a numeric values\n readValue() {\n return (0, index_js_1.toBigInt)(this.readBytes(exports3.WordSize));\n }\n readIndex() {\n return (0, index_js_1.toNumber)(this.readBytes(exports3.WordSize));\n }\n };\n exports3.Reader = Reader;\n }\n });\n\n // ../../../node_modules/.pnpm/@noble+hashes@1.3.2/node_modules/@noble/hashes/_assert.js\n var require_assert = __commonJS({\n \"../../../node_modules/.pnpm/@noble+hashes@1.3.2/node_modules/@noble/hashes/_assert.js\"(exports3) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n Object.defineProperty(exports3, \"__esModule\", { value: true });\n exports3.output = exports3.exists = exports3.hash = exports3.bytes = exports3.bool = exports3.number = void 0;\n function number2(n2) {\n if (!Number.isSafeInteger(n2) || n2 < 0)\n throw new Error(`Wrong positive integer: ${n2}`);\n }\n exports3.number = number2;\n function bool(b4) {\n if (typeof b4 !== \"boolean\")\n throw new Error(`Expected boolean, not ${b4}`);\n }\n exports3.bool = bool;\n function bytes(b4, ...lengths) {\n if (!(b4 instanceof Uint8Array))\n throw new Error(\"Expected Uint8Array\");\n if (lengths.length > 0 && !lengths.includes(b4.length))\n throw new Error(`Expected Uint8Array of length ${lengths}, not of length=${b4.length}`);\n }\n exports3.bytes = bytes;\n function hash3(hash4) {\n if (typeof hash4 !== \"function\" || typeof hash4.create !== \"function\")\n throw new Error(\"Hash should be wrapped by utils.wrapConstructor\");\n number2(hash4.outputLen);\n number2(hash4.blockLen);\n }\n exports3.hash = hash3;\n function exists(instance, checkFinished = true) {\n if (instance.destroyed)\n throw new Error(\"Hash instance has been destroyed\");\n if (checkFinished && instance.finished)\n throw new Error(\"Hash#digest() has already been called\");\n }\n exports3.exists = exists;\n function output(out, instance) {\n bytes(out);\n const min = instance.outputLen;\n if (out.length < min) {\n throw new Error(`digestInto() expects output buffer of length at least ${min}`);\n }\n }\n exports3.output = output;\n var assert9 = { number: number2, bool, bytes, hash: hash3, exists, output };\n exports3.default = assert9;\n }\n });\n\n // ../../../node_modules/.pnpm/@noble+hashes@1.3.2/node_modules/@noble/hashes/crypto.js\n var require_crypto = __commonJS({\n \"../../../node_modules/.pnpm/@noble+hashes@1.3.2/node_modules/@noble/hashes/crypto.js\"(exports3) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n Object.defineProperty(exports3, \"__esModule\", { value: true });\n exports3.crypto = void 0;\n exports3.crypto = typeof globalThis === \"object\" && \"crypto\" in globalThis ? globalThis.crypto : void 0;\n }\n });\n\n // ../../../node_modules/.pnpm/@noble+hashes@1.3.2/node_modules/@noble/hashes/utils.js\n var require_utils9 = __commonJS({\n \"../../../node_modules/.pnpm/@noble+hashes@1.3.2/node_modules/@noble/hashes/utils.js\"(exports3) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n Object.defineProperty(exports3, \"__esModule\", { value: true });\n exports3.randomBytes = exports3.wrapXOFConstructorWithOpts = exports3.wrapConstructorWithOpts = exports3.wrapConstructor = exports3.checkOpts = exports3.Hash = exports3.concatBytes = exports3.toBytes = exports3.utf8ToBytes = exports3.asyncLoop = exports3.nextTick = exports3.hexToBytes = exports3.bytesToHex = exports3.isLE = exports3.rotr = exports3.createView = exports3.u32 = exports3.u8 = void 0;\n var crypto_1 = require_crypto();\n var u8a = (a3) => a3 instanceof Uint8Array;\n var u8 = (arr) => new Uint8Array(arr.buffer, arr.byteOffset, arr.byteLength);\n exports3.u8 = u8;\n var u323 = (arr) => new Uint32Array(arr.buffer, arr.byteOffset, Math.floor(arr.byteLength / 4));\n exports3.u32 = u323;\n var createView2 = (arr) => new DataView(arr.buffer, arr.byteOffset, arr.byteLength);\n exports3.createView = createView2;\n var rotr2 = (word, shift) => word << 32 - shift | word >>> shift;\n exports3.rotr = rotr2;\n exports3.isLE = new Uint8Array(new Uint32Array([287454020]).buffer)[0] === 68;\n if (!exports3.isLE)\n throw new Error(\"Non little-endian hardware is not supported\");\n var hexes7 = /* @__PURE__ */ Array.from({ length: 256 }, (_2, i3) => i3.toString(16).padStart(2, \"0\"));\n function bytesToHex6(bytes) {\n if (!u8a(bytes))\n throw new Error(\"Uint8Array expected\");\n let hex = \"\";\n for (let i3 = 0; i3 < bytes.length; i3++) {\n hex += hexes7[bytes[i3]];\n }\n return hex;\n }\n exports3.bytesToHex = bytesToHex6;\n function hexToBytes6(hex) {\n if (typeof hex !== \"string\")\n throw new Error(\"hex string expected, got \" + typeof hex);\n const len = hex.length;\n if (len % 2)\n throw new Error(\"padded hex string expected, got unpadded hex of length \" + len);\n const array2 = new Uint8Array(len / 2);\n for (let i3 = 0; i3 < array2.length; i3++) {\n const j2 = i3 * 2;\n const hexByte = hex.slice(j2, j2 + 2);\n const byte = Number.parseInt(hexByte, 16);\n if (Number.isNaN(byte) || byte < 0)\n throw new Error(\"Invalid byte sequence\");\n array2[i3] = byte;\n }\n return array2;\n }\n exports3.hexToBytes = hexToBytes6;\n var nextTick2 = async () => {\n };\n exports3.nextTick = nextTick2;\n async function asyncLoop2(iters, tick, cb) {\n let ts = Date.now();\n for (let i3 = 0; i3 < iters; i3++) {\n cb(i3);\n const diff = Date.now() - ts;\n if (diff >= 0 && diff < tick)\n continue;\n await (0, exports3.nextTick)();\n ts += diff;\n }\n }\n exports3.asyncLoop = asyncLoop2;\n function utf8ToBytes3(str) {\n if (typeof str !== \"string\")\n throw new Error(`utf8ToBytes expected string, got ${typeof str}`);\n return new Uint8Array(new TextEncoder().encode(str));\n }\n exports3.utf8ToBytes = utf8ToBytes3;\n function toBytes5(data) {\n if (typeof data === \"string\")\n data = utf8ToBytes3(data);\n if (!u8a(data))\n throw new Error(`expected Uint8Array, got ${typeof data}`);\n return data;\n }\n exports3.toBytes = toBytes5;\n function concatBytes5(...arrays) {\n const r2 = new Uint8Array(arrays.reduce((sum, a3) => sum + a3.length, 0));\n let pad6 = 0;\n arrays.forEach((a3) => {\n if (!u8a(a3))\n throw new Error(\"Uint8Array expected\");\n r2.set(a3, pad6);\n pad6 += a3.length;\n });\n return r2;\n }\n exports3.concatBytes = concatBytes5;\n var Hash2 = class {\n // Safe version that clones internal state\n clone() {\n return this._cloneInto();\n }\n };\n exports3.Hash = Hash2;\n var toStr = {}.toString;\n function checkOpts2(defaults, opts) {\n if (opts !== void 0 && toStr.call(opts) !== \"[object Object]\")\n throw new Error(\"Options should be object or undefined\");\n const merged = Object.assign(defaults, opts);\n return merged;\n }\n exports3.checkOpts = checkOpts2;\n function wrapConstructor(hashCons) {\n const hashC = (msg) => hashCons().update(toBytes5(msg)).digest();\n const tmp = hashCons();\n hashC.outputLen = tmp.outputLen;\n hashC.blockLen = tmp.blockLen;\n hashC.create = () => hashCons();\n return hashC;\n }\n exports3.wrapConstructor = wrapConstructor;\n function wrapConstructorWithOpts(hashCons) {\n const hashC = (msg, opts) => hashCons(opts).update(toBytes5(msg)).digest();\n const tmp = hashCons({});\n hashC.outputLen = tmp.outputLen;\n hashC.blockLen = tmp.blockLen;\n hashC.create = (opts) => hashCons(opts);\n return hashC;\n }\n exports3.wrapConstructorWithOpts = wrapConstructorWithOpts;\n function wrapXOFConstructorWithOpts(hashCons) {\n const hashC = (msg, opts) => hashCons(opts).update(toBytes5(msg)).digest();\n const tmp = hashCons({});\n hashC.outputLen = tmp.outputLen;\n hashC.blockLen = tmp.blockLen;\n hashC.create = (opts) => hashCons(opts);\n return hashC;\n }\n exports3.wrapXOFConstructorWithOpts = wrapXOFConstructorWithOpts;\n function randomBytes2(bytesLength = 32) {\n if (crypto_1.crypto && typeof crypto_1.crypto.getRandomValues === \"function\") {\n return crypto_1.crypto.getRandomValues(new Uint8Array(bytesLength));\n }\n throw new Error(\"crypto.getRandomValues must be defined\");\n }\n exports3.randomBytes = randomBytes2;\n }\n });\n\n // ../../../node_modules/.pnpm/@noble+hashes@1.3.2/node_modules/@noble/hashes/hmac.js\n var require_hmac2 = __commonJS({\n \"../../../node_modules/.pnpm/@noble+hashes@1.3.2/node_modules/@noble/hashes/hmac.js\"(exports3) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n Object.defineProperty(exports3, \"__esModule\", { value: true });\n exports3.hmac = exports3.HMAC = void 0;\n var _assert_js_1 = require_assert();\n var utils_js_1 = require_utils9();\n var HMAC2 = class extends utils_js_1.Hash {\n constructor(hash3, _key) {\n super();\n this.finished = false;\n this.destroyed = false;\n (0, _assert_js_1.hash)(hash3);\n const key = (0, utils_js_1.toBytes)(_key);\n this.iHash = hash3.create();\n if (typeof this.iHash.update !== \"function\")\n throw new Error(\"Expected instance of class which extends utils.Hash\");\n this.blockLen = this.iHash.blockLen;\n this.outputLen = this.iHash.outputLen;\n const blockLen = this.blockLen;\n const pad6 = new Uint8Array(blockLen);\n pad6.set(key.length > blockLen ? hash3.create().update(key).digest() : key);\n for (let i3 = 0; i3 < pad6.length; i3++)\n pad6[i3] ^= 54;\n this.iHash.update(pad6);\n this.oHash = hash3.create();\n for (let i3 = 0; i3 < pad6.length; i3++)\n pad6[i3] ^= 54 ^ 92;\n this.oHash.update(pad6);\n pad6.fill(0);\n }\n update(buf) {\n (0, _assert_js_1.exists)(this);\n this.iHash.update(buf);\n return this;\n }\n digestInto(out) {\n (0, _assert_js_1.exists)(this);\n (0, _assert_js_1.bytes)(out, this.outputLen);\n this.finished = true;\n this.iHash.digestInto(out);\n this.oHash.update(out);\n this.oHash.digestInto(out);\n this.destroy();\n }\n digest() {\n const out = new Uint8Array(this.oHash.outputLen);\n this.digestInto(out);\n return out;\n }\n _cloneInto(to) {\n to || (to = Object.create(Object.getPrototypeOf(this), {}));\n const { oHash, iHash, finished, destroyed, blockLen, outputLen } = this;\n to = to;\n to.finished = finished;\n to.destroyed = destroyed;\n to.blockLen = blockLen;\n to.outputLen = outputLen;\n to.oHash = oHash._cloneInto(to.oHash);\n to.iHash = iHash._cloneInto(to.iHash);\n return to;\n }\n destroy() {\n this.destroyed = true;\n this.oHash.destroy();\n this.iHash.destroy();\n }\n };\n exports3.HMAC = HMAC2;\n var hmac2 = (hash3, key, message) => new HMAC2(hash3, key).update(message).digest();\n exports3.hmac = hmac2;\n exports3.hmac.create = (hash3, key) => new HMAC2(hash3, key);\n }\n });\n\n // ../../../node_modules/.pnpm/@noble+hashes@1.3.2/node_modules/@noble/hashes/pbkdf2.js\n var require_pbkdf2 = __commonJS({\n \"../../../node_modules/.pnpm/@noble+hashes@1.3.2/node_modules/@noble/hashes/pbkdf2.js\"(exports3) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n Object.defineProperty(exports3, \"__esModule\", { value: true });\n exports3.pbkdf2Async = exports3.pbkdf2 = void 0;\n var _assert_js_1 = require_assert();\n var hmac_js_1 = require_hmac2();\n var utils_js_1 = require_utils9();\n function pbkdf2Init2(hash3, _password, _salt, _opts) {\n (0, _assert_js_1.hash)(hash3);\n const opts = (0, utils_js_1.checkOpts)({ dkLen: 32, asyncTick: 10 }, _opts);\n const { c: c4, dkLen, asyncTick } = opts;\n (0, _assert_js_1.number)(c4);\n (0, _assert_js_1.number)(dkLen);\n (0, _assert_js_1.number)(asyncTick);\n if (c4 < 1)\n throw new Error(\"PBKDF2: iterations (c) should be >= 1\");\n const password = (0, utils_js_1.toBytes)(_password);\n const salt = (0, utils_js_1.toBytes)(_salt);\n const DK = new Uint8Array(dkLen);\n const PRF = hmac_js_1.hmac.create(hash3, password);\n const PRFSalt = PRF._cloneInto().update(salt);\n return { c: c4, dkLen, asyncTick, DK, PRF, PRFSalt };\n }\n function pbkdf2Output2(PRF, PRFSalt, DK, prfW, u2) {\n PRF.destroy();\n PRFSalt.destroy();\n if (prfW)\n prfW.destroy();\n u2.fill(0);\n return DK;\n }\n function pbkdf22(hash3, password, salt, opts) {\n const { c: c4, dkLen, DK, PRF, PRFSalt } = pbkdf2Init2(hash3, password, salt, opts);\n let prfW;\n const arr = new Uint8Array(4);\n const view = (0, utils_js_1.createView)(arr);\n const u2 = new Uint8Array(PRF.outputLen);\n for (let ti = 1, pos = 0; pos < dkLen; ti++, pos += PRF.outputLen) {\n const Ti = DK.subarray(pos, pos + PRF.outputLen);\n view.setInt32(0, ti, false);\n (prfW = PRFSalt._cloneInto(prfW)).update(arr).digestInto(u2);\n Ti.set(u2.subarray(0, Ti.length));\n for (let ui = 1; ui < c4; ui++) {\n PRF._cloneInto(prfW).update(u2).digestInto(u2);\n for (let i3 = 0; i3 < Ti.length; i3++)\n Ti[i3] ^= u2[i3];\n }\n }\n return pbkdf2Output2(PRF, PRFSalt, DK, prfW, u2);\n }\n exports3.pbkdf2 = pbkdf22;\n async function pbkdf2Async2(hash3, password, salt, opts) {\n const { c: c4, dkLen, asyncTick, DK, PRF, PRFSalt } = pbkdf2Init2(hash3, password, salt, opts);\n let prfW;\n const arr = new Uint8Array(4);\n const view = (0, utils_js_1.createView)(arr);\n const u2 = new Uint8Array(PRF.outputLen);\n for (let ti = 1, pos = 0; pos < dkLen; ti++, pos += PRF.outputLen) {\n const Ti = DK.subarray(pos, pos + PRF.outputLen);\n view.setInt32(0, ti, false);\n (prfW = PRFSalt._cloneInto(prfW)).update(arr).digestInto(u2);\n Ti.set(u2.subarray(0, Ti.length));\n await (0, utils_js_1.asyncLoop)(c4 - 1, asyncTick, () => {\n PRF._cloneInto(prfW).update(u2).digestInto(u2);\n for (let i3 = 0; i3 < Ti.length; i3++)\n Ti[i3] ^= u2[i3];\n });\n }\n return pbkdf2Output2(PRF, PRFSalt, DK, prfW, u2);\n }\n exports3.pbkdf2Async = pbkdf2Async2;\n }\n });\n\n // ../../../node_modules/.pnpm/@noble+hashes@1.3.2/node_modules/@noble/hashes/_sha2.js\n var require_sha2 = __commonJS({\n \"../../../node_modules/.pnpm/@noble+hashes@1.3.2/node_modules/@noble/hashes/_sha2.js\"(exports3) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n Object.defineProperty(exports3, \"__esModule\", { value: true });\n exports3.SHA2 = void 0;\n var _assert_js_1 = require_assert();\n var utils_js_1 = require_utils9();\n function setBigUint642(view, byteOffset, value, isLE3) {\n if (typeof view.setBigUint64 === \"function\")\n return view.setBigUint64(byteOffset, value, isLE3);\n const _32n3 = BigInt(32);\n const _u32_max = BigInt(4294967295);\n const wh = Number(value >> _32n3 & _u32_max);\n const wl = Number(value & _u32_max);\n const h4 = isLE3 ? 4 : 0;\n const l6 = isLE3 ? 0 : 4;\n view.setUint32(byteOffset + h4, wh, isLE3);\n view.setUint32(byteOffset + l6, wl, isLE3);\n }\n var SHA2 = class extends utils_js_1.Hash {\n constructor(blockLen, outputLen, padOffset, isLE3) {\n super();\n this.blockLen = blockLen;\n this.outputLen = outputLen;\n this.padOffset = padOffset;\n this.isLE = isLE3;\n this.finished = false;\n this.length = 0;\n this.pos = 0;\n this.destroyed = false;\n this.buffer = new Uint8Array(blockLen);\n this.view = (0, utils_js_1.createView)(this.buffer);\n }\n update(data) {\n (0, _assert_js_1.exists)(this);\n const { view, buffer: buffer2, blockLen } = this;\n data = (0, utils_js_1.toBytes)(data);\n const len = data.length;\n for (let pos = 0; pos < len; ) {\n const take = Math.min(blockLen - this.pos, len - pos);\n if (take === blockLen) {\n const dataView = (0, utils_js_1.createView)(data);\n for (; blockLen <= len - pos; pos += blockLen)\n this.process(dataView, pos);\n continue;\n }\n buffer2.set(data.subarray(pos, pos + take), this.pos);\n this.pos += take;\n pos += take;\n if (this.pos === blockLen) {\n this.process(view, 0);\n this.pos = 0;\n }\n }\n this.length += data.length;\n this.roundClean();\n return this;\n }\n digestInto(out) {\n (0, _assert_js_1.exists)(this);\n (0, _assert_js_1.output)(out, this);\n this.finished = true;\n const { buffer: buffer2, view, blockLen, isLE: isLE3 } = this;\n let { pos } = this;\n buffer2[pos++] = 128;\n this.buffer.subarray(pos).fill(0);\n if (this.padOffset > blockLen - pos) {\n this.process(view, 0);\n pos = 0;\n }\n for (let i3 = pos; i3 < blockLen; i3++)\n buffer2[i3] = 0;\n setBigUint642(view, blockLen - 8, BigInt(this.length * 8), isLE3);\n this.process(view, 0);\n const oview = (0, utils_js_1.createView)(out);\n const len = this.outputLen;\n if (len % 4)\n throw new Error(\"_sha2: outputLen should be aligned to 32bit\");\n const outLen = len / 4;\n const state = this.get();\n if (outLen > state.length)\n throw new Error(\"_sha2: outputLen bigger than state\");\n for (let i3 = 0; i3 < outLen; i3++)\n oview.setUint32(4 * i3, state[i3], isLE3);\n }\n digest() {\n const { buffer: buffer2, outputLen } = this;\n this.digestInto(buffer2);\n const res = buffer2.slice(0, outputLen);\n this.destroy();\n return res;\n }\n _cloneInto(to) {\n to || (to = new this.constructor());\n to.set(...this.get());\n const { blockLen, buffer: buffer2, length: length2, finished, destroyed, pos } = this;\n to.length = length2;\n to.pos = pos;\n to.finished = finished;\n to.destroyed = destroyed;\n if (length2 % blockLen)\n to.buffer.set(buffer2);\n return to;\n }\n };\n exports3.SHA2 = SHA2;\n }\n });\n\n // ../../../node_modules/.pnpm/@noble+hashes@1.3.2/node_modules/@noble/hashes/sha256.js\n var require_sha256 = __commonJS({\n \"../../../node_modules/.pnpm/@noble+hashes@1.3.2/node_modules/@noble/hashes/sha256.js\"(exports3) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n Object.defineProperty(exports3, \"__esModule\", { value: true });\n exports3.sha224 = exports3.sha256 = void 0;\n var _sha2_js_1 = require_sha2();\n var utils_js_1 = require_utils9();\n var Chi2 = (a3, b4, c4) => a3 & b4 ^ ~a3 & c4;\n var Maj2 = (a3, b4, c4) => a3 & b4 ^ a3 & c4 ^ b4 & c4;\n var SHA256_K2 = /* @__PURE__ */ new Uint32Array([\n 1116352408,\n 1899447441,\n 3049323471,\n 3921009573,\n 961987163,\n 1508970993,\n 2453635748,\n 2870763221,\n 3624381080,\n 310598401,\n 607225278,\n 1426881987,\n 1925078388,\n 2162078206,\n 2614888103,\n 3248222580,\n 3835390401,\n 4022224774,\n 264347078,\n 604807628,\n 770255983,\n 1249150122,\n 1555081692,\n 1996064986,\n 2554220882,\n 2821834349,\n 2952996808,\n 3210313671,\n 3336571891,\n 3584528711,\n 113926993,\n 338241895,\n 666307205,\n 773529912,\n 1294757372,\n 1396182291,\n 1695183700,\n 1986661051,\n 2177026350,\n 2456956037,\n 2730485921,\n 2820302411,\n 3259730800,\n 3345764771,\n 3516065817,\n 3600352804,\n 4094571909,\n 275423344,\n 430227734,\n 506948616,\n 659060556,\n 883997877,\n 958139571,\n 1322822218,\n 1537002063,\n 1747873779,\n 1955562222,\n 2024104815,\n 2227730452,\n 2361852424,\n 2428436474,\n 2756734187,\n 3204031479,\n 3329325298\n ]);\n var IV = /* @__PURE__ */ new Uint32Array([\n 1779033703,\n 3144134277,\n 1013904242,\n 2773480762,\n 1359893119,\n 2600822924,\n 528734635,\n 1541459225\n ]);\n var SHA256_W2 = /* @__PURE__ */ new Uint32Array(64);\n var SHA2562 = class extends _sha2_js_1.SHA2 {\n constructor() {\n super(64, 32, 8, false);\n this.A = IV[0] | 0;\n this.B = IV[1] | 0;\n this.C = IV[2] | 0;\n this.D = IV[3] | 0;\n this.E = IV[4] | 0;\n this.F = IV[5] | 0;\n this.G = IV[6] | 0;\n this.H = IV[7] | 0;\n }\n get() {\n const { A: A4, B: B2, C, D: D2, E: E2, F: F2, G, H: H3 } = this;\n return [A4, B2, C, D2, E2, F2, G, H3];\n }\n // prettier-ignore\n set(A4, B2, C, D2, E2, F2, G, H3) {\n this.A = A4 | 0;\n this.B = B2 | 0;\n this.C = C | 0;\n this.D = D2 | 0;\n this.E = E2 | 0;\n this.F = F2 | 0;\n this.G = G | 0;\n this.H = H3 | 0;\n }\n process(view, offset) {\n for (let i3 = 0; i3 < 16; i3++, offset += 4)\n SHA256_W2[i3] = view.getUint32(offset, false);\n for (let i3 = 16; i3 < 64; i3++) {\n const W15 = SHA256_W2[i3 - 15];\n const W2 = SHA256_W2[i3 - 2];\n const s0 = (0, utils_js_1.rotr)(W15, 7) ^ (0, utils_js_1.rotr)(W15, 18) ^ W15 >>> 3;\n const s1 = (0, utils_js_1.rotr)(W2, 17) ^ (0, utils_js_1.rotr)(W2, 19) ^ W2 >>> 10;\n SHA256_W2[i3] = s1 + SHA256_W2[i3 - 7] + s0 + SHA256_W2[i3 - 16] | 0;\n }\n let { A: A4, B: B2, C, D: D2, E: E2, F: F2, G, H: H3 } = this;\n for (let i3 = 0; i3 < 64; i3++) {\n const sigma1 = (0, utils_js_1.rotr)(E2, 6) ^ (0, utils_js_1.rotr)(E2, 11) ^ (0, utils_js_1.rotr)(E2, 25);\n const T1 = H3 + sigma1 + Chi2(E2, F2, G) + SHA256_K2[i3] + SHA256_W2[i3] | 0;\n const sigma0 = (0, utils_js_1.rotr)(A4, 2) ^ (0, utils_js_1.rotr)(A4, 13) ^ (0, utils_js_1.rotr)(A4, 22);\n const T22 = sigma0 + Maj2(A4, B2, C) | 0;\n H3 = G;\n G = F2;\n F2 = E2;\n E2 = D2 + T1 | 0;\n D2 = C;\n C = B2;\n B2 = A4;\n A4 = T1 + T22 | 0;\n }\n A4 = A4 + this.A | 0;\n B2 = B2 + this.B | 0;\n C = C + this.C | 0;\n D2 = D2 + this.D | 0;\n E2 = E2 + this.E | 0;\n F2 = F2 + this.F | 0;\n G = G + this.G | 0;\n H3 = H3 + this.H | 0;\n this.set(A4, B2, C, D2, E2, F2, G, H3);\n }\n roundClean() {\n SHA256_W2.fill(0);\n }\n destroy() {\n this.set(0, 0, 0, 0, 0, 0, 0, 0);\n this.buffer.fill(0);\n }\n };\n var SHA2242 = class extends SHA2562 {\n constructor() {\n super();\n this.A = 3238371032 | 0;\n this.B = 914150663 | 0;\n this.C = 812702999 | 0;\n this.D = 4144912697 | 0;\n this.E = 4290775857 | 0;\n this.F = 1750603025 | 0;\n this.G = 1694076839 | 0;\n this.H = 3204075428 | 0;\n this.outputLen = 28;\n }\n };\n exports3.sha256 = (0, utils_js_1.wrapConstructor)(() => new SHA2562());\n exports3.sha224 = (0, utils_js_1.wrapConstructor)(() => new SHA2242());\n }\n });\n\n // ../../../node_modules/.pnpm/@noble+hashes@1.3.2/node_modules/@noble/hashes/_u64.js\n var require_u64 = __commonJS({\n \"../../../node_modules/.pnpm/@noble+hashes@1.3.2/node_modules/@noble/hashes/_u64.js\"(exports3) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n Object.defineProperty(exports3, \"__esModule\", { value: true });\n exports3.add5L = exports3.add5H = exports3.add4H = exports3.add4L = exports3.add3H = exports3.add3L = exports3.add = exports3.rotlBL = exports3.rotlBH = exports3.rotlSL = exports3.rotlSH = exports3.rotr32L = exports3.rotr32H = exports3.rotrBL = exports3.rotrBH = exports3.rotrSL = exports3.rotrSH = exports3.shrSL = exports3.shrSH = exports3.toBig = exports3.split = exports3.fromBig = void 0;\n var U32_MASK643 = /* @__PURE__ */ BigInt(2 ** 32 - 1);\n var _32n3 = /* @__PURE__ */ BigInt(32);\n function fromBig3(n2, le = false) {\n if (le)\n return { h: Number(n2 & U32_MASK643), l: Number(n2 >> _32n3 & U32_MASK643) };\n return { h: Number(n2 >> _32n3 & U32_MASK643) | 0, l: Number(n2 & U32_MASK643) | 0 };\n }\n exports3.fromBig = fromBig3;\n function split4(lst, le = false) {\n let Ah = new Uint32Array(lst.length);\n let Al = new Uint32Array(lst.length);\n for (let i3 = 0; i3 < lst.length; i3++) {\n const { h: h4, l: l6 } = fromBig3(lst[i3], le);\n [Ah[i3], Al[i3]] = [h4, l6];\n }\n return [Ah, Al];\n }\n exports3.split = split4;\n var toBig = (h4, l6) => BigInt(h4 >>> 0) << _32n3 | BigInt(l6 >>> 0);\n exports3.toBig = toBig;\n var shrSH2 = (h4, _l, s4) => h4 >>> s4;\n exports3.shrSH = shrSH2;\n var shrSL2 = (h4, l6, s4) => h4 << 32 - s4 | l6 >>> s4;\n exports3.shrSL = shrSL2;\n var rotrSH2 = (h4, l6, s4) => h4 >>> s4 | l6 << 32 - s4;\n exports3.rotrSH = rotrSH2;\n var rotrSL2 = (h4, l6, s4) => h4 << 32 - s4 | l6 >>> s4;\n exports3.rotrSL = rotrSL2;\n var rotrBH2 = (h4, l6, s4) => h4 << 64 - s4 | l6 >>> s4 - 32;\n exports3.rotrBH = rotrBH2;\n var rotrBL2 = (h4, l6, s4) => h4 >>> s4 - 32 | l6 << 64 - s4;\n exports3.rotrBL = rotrBL2;\n var rotr32H = (_h, l6) => l6;\n exports3.rotr32H = rotr32H;\n var rotr32L = (h4, _l) => h4;\n exports3.rotr32L = rotr32L;\n var rotlSH3 = (h4, l6, s4) => h4 << s4 | l6 >>> 32 - s4;\n exports3.rotlSH = rotlSH3;\n var rotlSL3 = (h4, l6, s4) => l6 << s4 | h4 >>> 32 - s4;\n exports3.rotlSL = rotlSL3;\n var rotlBH3 = (h4, l6, s4) => l6 << s4 - 32 | h4 >>> 64 - s4;\n exports3.rotlBH = rotlBH3;\n var rotlBL3 = (h4, l6, s4) => h4 << s4 - 32 | l6 >>> 64 - s4;\n exports3.rotlBL = rotlBL3;\n function add2(Ah, Al, Bh, Bl) {\n const l6 = (Al >>> 0) + (Bl >>> 0);\n return { h: Ah + Bh + (l6 / 2 ** 32 | 0) | 0, l: l6 | 0 };\n }\n exports3.add = add2;\n var add3L2 = (Al, Bl, Cl) => (Al >>> 0) + (Bl >>> 0) + (Cl >>> 0);\n exports3.add3L = add3L2;\n var add3H2 = (low, Ah, Bh, Ch) => Ah + Bh + Ch + (low / 2 ** 32 | 0) | 0;\n exports3.add3H = add3H2;\n var add4L2 = (Al, Bl, Cl, Dl) => (Al >>> 0) + (Bl >>> 0) + (Cl >>> 0) + (Dl >>> 0);\n exports3.add4L = add4L2;\n var add4H2 = (low, Ah, Bh, Ch, Dh) => Ah + Bh + Ch + Dh + (low / 2 ** 32 | 0) | 0;\n exports3.add4H = add4H2;\n var add5L2 = (Al, Bl, Cl, Dl, El) => (Al >>> 0) + (Bl >>> 0) + (Cl >>> 0) + (Dl >>> 0) + (El >>> 0);\n exports3.add5L = add5L2;\n var add5H2 = (low, Ah, Bh, Ch, Dh, Eh) => Ah + Bh + Ch + Dh + Eh + (low / 2 ** 32 | 0) | 0;\n exports3.add5H = add5H2;\n var u64 = {\n fromBig: fromBig3,\n split: split4,\n toBig,\n shrSH: shrSH2,\n shrSL: shrSL2,\n rotrSH: rotrSH2,\n rotrSL: rotrSL2,\n rotrBH: rotrBH2,\n rotrBL: rotrBL2,\n rotr32H,\n rotr32L,\n rotlSH: rotlSH3,\n rotlSL: rotlSL3,\n rotlBH: rotlBH3,\n rotlBL: rotlBL3,\n add: add2,\n add3L: add3L2,\n add3H: add3H2,\n add4L: add4L2,\n add4H: add4H2,\n add5H: add5H2,\n add5L: add5L2\n };\n exports3.default = u64;\n }\n });\n\n // ../../../node_modules/.pnpm/@noble+hashes@1.3.2/node_modules/@noble/hashes/sha512.js\n var require_sha512 = __commonJS({\n \"../../../node_modules/.pnpm/@noble+hashes@1.3.2/node_modules/@noble/hashes/sha512.js\"(exports3) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n Object.defineProperty(exports3, \"__esModule\", { value: true });\n exports3.sha384 = exports3.sha512_256 = exports3.sha512_224 = exports3.sha512 = exports3.SHA512 = void 0;\n var _sha2_js_1 = require_sha2();\n var _u64_js_1 = require_u64();\n var utils_js_1 = require_utils9();\n var [SHA512_Kh2, SHA512_Kl2] = /* @__PURE__ */ (() => _u64_js_1.default.split([\n \"0x428a2f98d728ae22\",\n \"0x7137449123ef65cd\",\n \"0xb5c0fbcfec4d3b2f\",\n \"0xe9b5dba58189dbbc\",\n \"0x3956c25bf348b538\",\n \"0x59f111f1b605d019\",\n \"0x923f82a4af194f9b\",\n \"0xab1c5ed5da6d8118\",\n \"0xd807aa98a3030242\",\n \"0x12835b0145706fbe\",\n \"0x243185be4ee4b28c\",\n \"0x550c7dc3d5ffb4e2\",\n \"0x72be5d74f27b896f\",\n \"0x80deb1fe3b1696b1\",\n \"0x9bdc06a725c71235\",\n \"0xc19bf174cf692694\",\n \"0xe49b69c19ef14ad2\",\n \"0xefbe4786384f25e3\",\n \"0x0fc19dc68b8cd5b5\",\n \"0x240ca1cc77ac9c65\",\n \"0x2de92c6f592b0275\",\n \"0x4a7484aa6ea6e483\",\n \"0x5cb0a9dcbd41fbd4\",\n \"0x76f988da831153b5\",\n \"0x983e5152ee66dfab\",\n \"0xa831c66d2db43210\",\n \"0xb00327c898fb213f\",\n \"0xbf597fc7beef0ee4\",\n \"0xc6e00bf33da88fc2\",\n \"0xd5a79147930aa725\",\n \"0x06ca6351e003826f\",\n \"0x142929670a0e6e70\",\n \"0x27b70a8546d22ffc\",\n \"0x2e1b21385c26c926\",\n \"0x4d2c6dfc5ac42aed\",\n \"0x53380d139d95b3df\",\n \"0x650a73548baf63de\",\n \"0x766a0abb3c77b2a8\",\n \"0x81c2c92e47edaee6\",\n \"0x92722c851482353b\",\n \"0xa2bfe8a14cf10364\",\n \"0xa81a664bbc423001\",\n \"0xc24b8b70d0f89791\",\n \"0xc76c51a30654be30\",\n \"0xd192e819d6ef5218\",\n \"0xd69906245565a910\",\n \"0xf40e35855771202a\",\n \"0x106aa07032bbd1b8\",\n \"0x19a4c116b8d2d0c8\",\n \"0x1e376c085141ab53\",\n \"0x2748774cdf8eeb99\",\n \"0x34b0bcb5e19b48a8\",\n \"0x391c0cb3c5c95a63\",\n \"0x4ed8aa4ae3418acb\",\n \"0x5b9cca4f7763e373\",\n \"0x682e6ff3d6b2b8a3\",\n \"0x748f82ee5defb2fc\",\n \"0x78a5636f43172f60\",\n \"0x84c87814a1f0ab72\",\n \"0x8cc702081a6439ec\",\n \"0x90befffa23631e28\",\n \"0xa4506cebde82bde9\",\n \"0xbef9a3f7b2c67915\",\n \"0xc67178f2e372532b\",\n \"0xca273eceea26619c\",\n \"0xd186b8c721c0c207\",\n \"0xeada7dd6cde0eb1e\",\n \"0xf57d4f7fee6ed178\",\n \"0x06f067aa72176fba\",\n \"0x0a637dc5a2c898a6\",\n \"0x113f9804bef90dae\",\n \"0x1b710b35131c471b\",\n \"0x28db77f523047d84\",\n \"0x32caab7b40c72493\",\n \"0x3c9ebe0a15c9bebc\",\n \"0x431d67c49c100d4c\",\n \"0x4cc5d4becb3e42b6\",\n \"0x597f299cfc657e2a\",\n \"0x5fcb6fab3ad6faec\",\n \"0x6c44198c4a475817\"\n ].map((n2) => BigInt(n2))))();\n var SHA512_W_H2 = /* @__PURE__ */ new Uint32Array(80);\n var SHA512_W_L2 = /* @__PURE__ */ new Uint32Array(80);\n var SHA5122 = class extends _sha2_js_1.SHA2 {\n constructor() {\n super(128, 64, 16, false);\n this.Ah = 1779033703 | 0;\n this.Al = 4089235720 | 0;\n this.Bh = 3144134277 | 0;\n this.Bl = 2227873595 | 0;\n this.Ch = 1013904242 | 0;\n this.Cl = 4271175723 | 0;\n this.Dh = 2773480762 | 0;\n this.Dl = 1595750129 | 0;\n this.Eh = 1359893119 | 0;\n this.El = 2917565137 | 0;\n this.Fh = 2600822924 | 0;\n this.Fl = 725511199 | 0;\n this.Gh = 528734635 | 0;\n this.Gl = 4215389547 | 0;\n this.Hh = 1541459225 | 0;\n this.Hl = 327033209 | 0;\n }\n // prettier-ignore\n get() {\n const { Ah, Al, Bh, Bl, Ch, Cl, Dh, Dl, Eh, El, Fh, Fl, Gh, Gl, Hh, Hl } = this;\n return [Ah, Al, Bh, Bl, Ch, Cl, Dh, Dl, Eh, El, Fh, Fl, Gh, Gl, Hh, Hl];\n }\n // prettier-ignore\n set(Ah, Al, Bh, Bl, Ch, Cl, Dh, Dl, Eh, El, Fh, Fl, Gh, Gl, Hh, Hl) {\n this.Ah = Ah | 0;\n this.Al = Al | 0;\n this.Bh = Bh | 0;\n this.Bl = Bl | 0;\n this.Ch = Ch | 0;\n this.Cl = Cl | 0;\n this.Dh = Dh | 0;\n this.Dl = Dl | 0;\n this.Eh = Eh | 0;\n this.El = El | 0;\n this.Fh = Fh | 0;\n this.Fl = Fl | 0;\n this.Gh = Gh | 0;\n this.Gl = Gl | 0;\n this.Hh = Hh | 0;\n this.Hl = Hl | 0;\n }\n process(view, offset) {\n for (let i3 = 0; i3 < 16; i3++, offset += 4) {\n SHA512_W_H2[i3] = view.getUint32(offset);\n SHA512_W_L2[i3] = view.getUint32(offset += 4);\n }\n for (let i3 = 16; i3 < 80; i3++) {\n const W15h = SHA512_W_H2[i3 - 15] | 0;\n const W15l = SHA512_W_L2[i3 - 15] | 0;\n const s0h = _u64_js_1.default.rotrSH(W15h, W15l, 1) ^ _u64_js_1.default.rotrSH(W15h, W15l, 8) ^ _u64_js_1.default.shrSH(W15h, W15l, 7);\n const s0l = _u64_js_1.default.rotrSL(W15h, W15l, 1) ^ _u64_js_1.default.rotrSL(W15h, W15l, 8) ^ _u64_js_1.default.shrSL(W15h, W15l, 7);\n const W2h = SHA512_W_H2[i3 - 2] | 0;\n const W2l = SHA512_W_L2[i3 - 2] | 0;\n const s1h = _u64_js_1.default.rotrSH(W2h, W2l, 19) ^ _u64_js_1.default.rotrBH(W2h, W2l, 61) ^ _u64_js_1.default.shrSH(W2h, W2l, 6);\n const s1l = _u64_js_1.default.rotrSL(W2h, W2l, 19) ^ _u64_js_1.default.rotrBL(W2h, W2l, 61) ^ _u64_js_1.default.shrSL(W2h, W2l, 6);\n const SUMl = _u64_js_1.default.add4L(s0l, s1l, SHA512_W_L2[i3 - 7], SHA512_W_L2[i3 - 16]);\n const SUMh = _u64_js_1.default.add4H(SUMl, s0h, s1h, SHA512_W_H2[i3 - 7], SHA512_W_H2[i3 - 16]);\n SHA512_W_H2[i3] = SUMh | 0;\n SHA512_W_L2[i3] = SUMl | 0;\n }\n let { Ah, Al, Bh, Bl, Ch, Cl, Dh, Dl, Eh, El, Fh, Fl, Gh, Gl, Hh, Hl } = this;\n for (let i3 = 0; i3 < 80; i3++) {\n const sigma1h = _u64_js_1.default.rotrSH(Eh, El, 14) ^ _u64_js_1.default.rotrSH(Eh, El, 18) ^ _u64_js_1.default.rotrBH(Eh, El, 41);\n const sigma1l = _u64_js_1.default.rotrSL(Eh, El, 14) ^ _u64_js_1.default.rotrSL(Eh, El, 18) ^ _u64_js_1.default.rotrBL(Eh, El, 41);\n const CHIh = Eh & Fh ^ ~Eh & Gh;\n const CHIl = El & Fl ^ ~El & Gl;\n const T1ll = _u64_js_1.default.add5L(Hl, sigma1l, CHIl, SHA512_Kl2[i3], SHA512_W_L2[i3]);\n const T1h = _u64_js_1.default.add5H(T1ll, Hh, sigma1h, CHIh, SHA512_Kh2[i3], SHA512_W_H2[i3]);\n const T1l = T1ll | 0;\n const sigma0h = _u64_js_1.default.rotrSH(Ah, Al, 28) ^ _u64_js_1.default.rotrBH(Ah, Al, 34) ^ _u64_js_1.default.rotrBH(Ah, Al, 39);\n const sigma0l = _u64_js_1.default.rotrSL(Ah, Al, 28) ^ _u64_js_1.default.rotrBL(Ah, Al, 34) ^ _u64_js_1.default.rotrBL(Ah, Al, 39);\n const MAJh = Ah & Bh ^ Ah & Ch ^ Bh & Ch;\n const MAJl = Al & Bl ^ Al & Cl ^ Bl & Cl;\n Hh = Gh | 0;\n Hl = Gl | 0;\n Gh = Fh | 0;\n Gl = Fl | 0;\n Fh = Eh | 0;\n Fl = El | 0;\n ({ h: Eh, l: El } = _u64_js_1.default.add(Dh | 0, Dl | 0, T1h | 0, T1l | 0));\n Dh = Ch | 0;\n Dl = Cl | 0;\n Ch = Bh | 0;\n Cl = Bl | 0;\n Bh = Ah | 0;\n Bl = Al | 0;\n const All = _u64_js_1.default.add3L(T1l, sigma0l, MAJl);\n Ah = _u64_js_1.default.add3H(All, T1h, sigma0h, MAJh);\n Al = All | 0;\n }\n ({ h: Ah, l: Al } = _u64_js_1.default.add(this.Ah | 0, this.Al | 0, Ah | 0, Al | 0));\n ({ h: Bh, l: Bl } = _u64_js_1.default.add(this.Bh | 0, this.Bl | 0, Bh | 0, Bl | 0));\n ({ h: Ch, l: Cl } = _u64_js_1.default.add(this.Ch | 0, this.Cl | 0, Ch | 0, Cl | 0));\n ({ h: Dh, l: Dl } = _u64_js_1.default.add(this.Dh | 0, this.Dl | 0, Dh | 0, Dl | 0));\n ({ h: Eh, l: El } = _u64_js_1.default.add(this.Eh | 0, this.El | 0, Eh | 0, El | 0));\n ({ h: Fh, l: Fl } = _u64_js_1.default.add(this.Fh | 0, this.Fl | 0, Fh | 0, Fl | 0));\n ({ h: Gh, l: Gl } = _u64_js_1.default.add(this.Gh | 0, this.Gl | 0, Gh | 0, Gl | 0));\n ({ h: Hh, l: Hl } = _u64_js_1.default.add(this.Hh | 0, this.Hl | 0, Hh | 0, Hl | 0));\n this.set(Ah, Al, Bh, Bl, Ch, Cl, Dh, Dl, Eh, El, Fh, Fl, Gh, Gl, Hh, Hl);\n }\n roundClean() {\n SHA512_W_H2.fill(0);\n SHA512_W_L2.fill(0);\n }\n destroy() {\n this.buffer.fill(0);\n this.set(0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0);\n }\n };\n exports3.SHA512 = SHA5122;\n var SHA512_224 = class extends SHA5122 {\n constructor() {\n super();\n this.Ah = 2352822216 | 0;\n this.Al = 424955298 | 0;\n this.Bh = 1944164710 | 0;\n this.Bl = 2312950998 | 0;\n this.Ch = 502970286 | 0;\n this.Cl = 855612546 | 0;\n this.Dh = 1738396948 | 0;\n this.Dl = 1479516111 | 0;\n this.Eh = 258812777 | 0;\n this.El = 2077511080 | 0;\n this.Fh = 2011393907 | 0;\n this.Fl = 79989058 | 0;\n this.Gh = 1067287976 | 0;\n this.Gl = 1780299464 | 0;\n this.Hh = 286451373 | 0;\n this.Hl = 2446758561 | 0;\n this.outputLen = 28;\n }\n };\n var SHA512_256 = class extends SHA5122 {\n constructor() {\n super();\n this.Ah = 573645204 | 0;\n this.Al = 4230739756 | 0;\n this.Bh = 2673172387 | 0;\n this.Bl = 3360449730 | 0;\n this.Ch = 596883563 | 0;\n this.Cl = 1867755857 | 0;\n this.Dh = 2520282905 | 0;\n this.Dl = 1497426621 | 0;\n this.Eh = 2519219938 | 0;\n this.El = 2827943907 | 0;\n this.Fh = 3193839141 | 0;\n this.Fl = 1401305490 | 0;\n this.Gh = 721525244 | 0;\n this.Gl = 746961066 | 0;\n this.Hh = 246885852 | 0;\n this.Hl = 2177182882 | 0;\n this.outputLen = 32;\n }\n };\n var SHA3842 = class extends SHA5122 {\n constructor() {\n super();\n this.Ah = 3418070365 | 0;\n this.Al = 3238371032 | 0;\n this.Bh = 1654270250 | 0;\n this.Bl = 914150663 | 0;\n this.Ch = 2438529370 | 0;\n this.Cl = 812702999 | 0;\n this.Dh = 355462360 | 0;\n this.Dl = 4144912697 | 0;\n this.Eh = 1731405415 | 0;\n this.El = 4290775857 | 0;\n this.Fh = 2394180231 | 0;\n this.Fl = 1750603025 | 0;\n this.Gh = 3675008525 | 0;\n this.Gl = 1694076839 | 0;\n this.Hh = 1203062813 | 0;\n this.Hl = 3204075428 | 0;\n this.outputLen = 48;\n }\n };\n exports3.sha512 = (0, utils_js_1.wrapConstructor)(() => new SHA5122());\n exports3.sha512_224 = (0, utils_js_1.wrapConstructor)(() => new SHA512_224());\n exports3.sha512_256 = (0, utils_js_1.wrapConstructor)(() => new SHA512_256());\n exports3.sha384 = (0, utils_js_1.wrapConstructor)(() => new SHA3842());\n }\n });\n\n // ../../../node_modules/.pnpm/ethers@6.15.0_bufferutil@4.0.9_utf-8-validate@5.0.10/node_modules/ethers/lib.commonjs/crypto/crypto-browser.js\n var require_crypto_browser = __commonJS({\n \"../../../node_modules/.pnpm/ethers@6.15.0_bufferutil@4.0.9_utf-8-validate@5.0.10/node_modules/ethers/lib.commonjs/crypto/crypto-browser.js\"(exports3) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n Object.defineProperty(exports3, \"__esModule\", { value: true });\n exports3.randomBytes = exports3.pbkdf2Sync = exports3.createHmac = exports3.createHash = void 0;\n var hmac_1 = require_hmac2();\n var pbkdf2_1 = require_pbkdf2();\n var sha256_1 = require_sha256();\n var sha512_1 = require_sha512();\n var index_js_1 = require_utils8();\n function getGlobal() {\n if (typeof self !== \"undefined\") {\n return self;\n }\n if (typeof window !== \"undefined\") {\n return window;\n }\n if (typeof global !== \"undefined\") {\n return global;\n }\n throw new Error(\"unable to locate global object\");\n }\n var anyGlobal = getGlobal();\n var crypto3 = anyGlobal.crypto || anyGlobal.msCrypto;\n function createHash(algo) {\n switch (algo) {\n case \"sha256\":\n return sha256_1.sha256.create();\n case \"sha512\":\n return sha512_1.sha512.create();\n }\n (0, index_js_1.assertArgument)(false, \"invalid hashing algorithm name\", \"algorithm\", algo);\n }\n exports3.createHash = createHash;\n function createHmac(_algo, key) {\n const algo = { sha256: sha256_1.sha256, sha512: sha512_1.sha512 }[_algo];\n (0, index_js_1.assertArgument)(algo != null, \"invalid hmac algorithm\", \"algorithm\", _algo);\n return hmac_1.hmac.create(algo, key);\n }\n exports3.createHmac = createHmac;\n function pbkdf2Sync(password, salt, iterations, keylen, _algo) {\n const algo = { sha256: sha256_1.sha256, sha512: sha512_1.sha512 }[_algo];\n (0, index_js_1.assertArgument)(algo != null, \"invalid pbkdf2 algorithm\", \"algorithm\", _algo);\n return (0, pbkdf2_1.pbkdf2)(algo, password, salt, { c: iterations, dkLen: keylen });\n }\n exports3.pbkdf2Sync = pbkdf2Sync;\n function randomBytes2(length2) {\n (0, index_js_1.assert)(crypto3 != null, \"platform does not support secure random numbers\", \"UNSUPPORTED_OPERATION\", {\n operation: \"randomBytes\"\n });\n (0, index_js_1.assertArgument)(Number.isInteger(length2) && length2 > 0 && length2 <= 1024, \"invalid length\", \"length\", length2);\n const result = new Uint8Array(length2);\n crypto3.getRandomValues(result);\n return result;\n }\n exports3.randomBytes = randomBytes2;\n }\n });\n\n // ../../../node_modules/.pnpm/ethers@6.15.0_bufferutil@4.0.9_utf-8-validate@5.0.10/node_modules/ethers/lib.commonjs/crypto/hmac.js\n var require_hmac3 = __commonJS({\n \"../../../node_modules/.pnpm/ethers@6.15.0_bufferutil@4.0.9_utf-8-validate@5.0.10/node_modules/ethers/lib.commonjs/crypto/hmac.js\"(exports3) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n Object.defineProperty(exports3, \"__esModule\", { value: true });\n exports3.computeHmac = void 0;\n var crypto_js_1 = require_crypto_browser();\n var index_js_1 = require_utils8();\n var locked = false;\n var _computeHmac = function(algorithm, key, data) {\n return (0, crypto_js_1.createHmac)(algorithm, key).update(data).digest();\n };\n var __computeHmac = _computeHmac;\n function computeHmac(algorithm, _key, _data) {\n const key = (0, index_js_1.getBytes)(_key, \"key\");\n const data = (0, index_js_1.getBytes)(_data, \"data\");\n return (0, index_js_1.hexlify)(__computeHmac(algorithm, key, data));\n }\n exports3.computeHmac = computeHmac;\n computeHmac._ = _computeHmac;\n computeHmac.lock = function() {\n locked = true;\n };\n computeHmac.register = function(func) {\n if (locked) {\n throw new Error(\"computeHmac is locked\");\n }\n __computeHmac = func;\n };\n Object.freeze(computeHmac);\n }\n });\n\n // ../../../node_modules/.pnpm/@noble+hashes@1.3.2/node_modules/@noble/hashes/sha3.js\n var require_sha32 = __commonJS({\n \"../../../node_modules/.pnpm/@noble+hashes@1.3.2/node_modules/@noble/hashes/sha3.js\"(exports3) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n Object.defineProperty(exports3, \"__esModule\", { value: true });\n exports3.shake256 = exports3.shake128 = exports3.keccak_512 = exports3.keccak_384 = exports3.keccak_256 = exports3.keccak_224 = exports3.sha3_512 = exports3.sha3_384 = exports3.sha3_256 = exports3.sha3_224 = exports3.Keccak = exports3.keccakP = void 0;\n var _assert_js_1 = require_assert();\n var _u64_js_1 = require_u64();\n var utils_js_1 = require_utils9();\n var [SHA3_PI3, SHA3_ROTL3, _SHA3_IOTA3] = [[], [], []];\n var _0n12 = /* @__PURE__ */ BigInt(0);\n var _1n12 = /* @__PURE__ */ BigInt(1);\n var _2n9 = /* @__PURE__ */ BigInt(2);\n var _7n4 = /* @__PURE__ */ BigInt(7);\n var _256n3 = /* @__PURE__ */ BigInt(256);\n var _0x71n3 = /* @__PURE__ */ BigInt(113);\n for (let round = 0, R3 = _1n12, x4 = 1, y6 = 0; round < 24; round++) {\n [x4, y6] = [y6, (2 * x4 + 3 * y6) % 5];\n SHA3_PI3.push(2 * (5 * y6 + x4));\n SHA3_ROTL3.push((round + 1) * (round + 2) / 2 % 64);\n let t3 = _0n12;\n for (let j2 = 0; j2 < 7; j2++) {\n R3 = (R3 << _1n12 ^ (R3 >> _7n4) * _0x71n3) % _256n3;\n if (R3 & _2n9)\n t3 ^= _1n12 << (_1n12 << /* @__PURE__ */ BigInt(j2)) - _1n12;\n }\n _SHA3_IOTA3.push(t3);\n }\n var [SHA3_IOTA_H3, SHA3_IOTA_L3] = /* @__PURE__ */ (0, _u64_js_1.split)(_SHA3_IOTA3, true);\n var rotlH3 = (h4, l6, s4) => s4 > 32 ? (0, _u64_js_1.rotlBH)(h4, l6, s4) : (0, _u64_js_1.rotlSH)(h4, l6, s4);\n var rotlL3 = (h4, l6, s4) => s4 > 32 ? (0, _u64_js_1.rotlBL)(h4, l6, s4) : (0, _u64_js_1.rotlSL)(h4, l6, s4);\n function keccakP3(s4, rounds = 24) {\n const B2 = new Uint32Array(5 * 2);\n for (let round = 24 - rounds; round < 24; round++) {\n for (let x4 = 0; x4 < 10; x4++)\n B2[x4] = s4[x4] ^ s4[x4 + 10] ^ s4[x4 + 20] ^ s4[x4 + 30] ^ s4[x4 + 40];\n for (let x4 = 0; x4 < 10; x4 += 2) {\n const idx1 = (x4 + 8) % 10;\n const idx0 = (x4 + 2) % 10;\n const B0 = B2[idx0];\n const B1 = B2[idx0 + 1];\n const Th = rotlH3(B0, B1, 1) ^ B2[idx1];\n const Tl = rotlL3(B0, B1, 1) ^ B2[idx1 + 1];\n for (let y6 = 0; y6 < 50; y6 += 10) {\n s4[x4 + y6] ^= Th;\n s4[x4 + y6 + 1] ^= Tl;\n }\n }\n let curH = s4[2];\n let curL = s4[3];\n for (let t3 = 0; t3 < 24; t3++) {\n const shift = SHA3_ROTL3[t3];\n const Th = rotlH3(curH, curL, shift);\n const Tl = rotlL3(curH, curL, shift);\n const PI = SHA3_PI3[t3];\n curH = s4[PI];\n curL = s4[PI + 1];\n s4[PI] = Th;\n s4[PI + 1] = Tl;\n }\n for (let y6 = 0; y6 < 50; y6 += 10) {\n for (let x4 = 0; x4 < 10; x4++)\n B2[x4] = s4[y6 + x4];\n for (let x4 = 0; x4 < 10; x4++)\n s4[y6 + x4] ^= ~B2[(x4 + 2) % 10] & B2[(x4 + 4) % 10];\n }\n s4[0] ^= SHA3_IOTA_H3[round];\n s4[1] ^= SHA3_IOTA_L3[round];\n }\n B2.fill(0);\n }\n exports3.keccakP = keccakP3;\n var Keccak3 = class _Keccak extends utils_js_1.Hash {\n // NOTE: we accept arguments in bytes instead of bits here.\n constructor(blockLen, suffix, outputLen, enableXOF = false, rounds = 24) {\n super();\n this.blockLen = blockLen;\n this.suffix = suffix;\n this.outputLen = outputLen;\n this.enableXOF = enableXOF;\n this.rounds = rounds;\n this.pos = 0;\n this.posOut = 0;\n this.finished = false;\n this.destroyed = false;\n (0, _assert_js_1.number)(outputLen);\n if (0 >= this.blockLen || this.blockLen >= 200)\n throw new Error(\"Sha3 supports only keccak-f1600 function\");\n this.state = new Uint8Array(200);\n this.state32 = (0, utils_js_1.u32)(this.state);\n }\n keccak() {\n keccakP3(this.state32, this.rounds);\n this.posOut = 0;\n this.pos = 0;\n }\n update(data) {\n (0, _assert_js_1.exists)(this);\n const { blockLen, state } = this;\n data = (0, utils_js_1.toBytes)(data);\n const len = data.length;\n for (let pos = 0; pos < len; ) {\n const take = Math.min(blockLen - this.pos, len - pos);\n for (let i3 = 0; i3 < take; i3++)\n state[this.pos++] ^= data[pos++];\n if (this.pos === blockLen)\n this.keccak();\n }\n return this;\n }\n finish() {\n if (this.finished)\n return;\n this.finished = true;\n const { state, suffix, pos, blockLen } = this;\n state[pos] ^= suffix;\n if ((suffix & 128) !== 0 && pos === blockLen - 1)\n this.keccak();\n state[blockLen - 1] ^= 128;\n this.keccak();\n }\n writeInto(out) {\n (0, _assert_js_1.exists)(this, false);\n (0, _assert_js_1.bytes)(out);\n this.finish();\n const bufferOut = this.state;\n const { blockLen } = this;\n for (let pos = 0, len = out.length; pos < len; ) {\n if (this.posOut >= blockLen)\n this.keccak();\n const take = Math.min(blockLen - this.posOut, len - pos);\n out.set(bufferOut.subarray(this.posOut, this.posOut + take), pos);\n this.posOut += take;\n pos += take;\n }\n return out;\n }\n xofInto(out) {\n if (!this.enableXOF)\n throw new Error(\"XOF is not possible for this instance\");\n return this.writeInto(out);\n }\n xof(bytes) {\n (0, _assert_js_1.number)(bytes);\n return this.xofInto(new Uint8Array(bytes));\n }\n digestInto(out) {\n (0, _assert_js_1.output)(out, this);\n if (this.finished)\n throw new Error(\"digest() was already called\");\n this.writeInto(out);\n this.destroy();\n return out;\n }\n digest() {\n return this.digestInto(new Uint8Array(this.outputLen));\n }\n destroy() {\n this.destroyed = true;\n this.state.fill(0);\n }\n _cloneInto(to) {\n const { blockLen, suffix, outputLen, rounds, enableXOF } = this;\n to || (to = new _Keccak(blockLen, suffix, outputLen, enableXOF, rounds));\n to.state32.set(this.state32);\n to.pos = this.pos;\n to.posOut = this.posOut;\n to.finished = this.finished;\n to.rounds = rounds;\n to.suffix = suffix;\n to.outputLen = outputLen;\n to.enableXOF = enableXOF;\n to.destroyed = this.destroyed;\n return to;\n }\n };\n exports3.Keccak = Keccak3;\n var gen2 = (suffix, blockLen, outputLen) => (0, utils_js_1.wrapConstructor)(() => new Keccak3(blockLen, suffix, outputLen));\n exports3.sha3_224 = gen2(6, 144, 224 / 8);\n exports3.sha3_256 = gen2(6, 136, 256 / 8);\n exports3.sha3_384 = gen2(6, 104, 384 / 8);\n exports3.sha3_512 = gen2(6, 72, 512 / 8);\n exports3.keccak_224 = gen2(1, 144, 224 / 8);\n exports3.keccak_256 = gen2(1, 136, 256 / 8);\n exports3.keccak_384 = gen2(1, 104, 384 / 8);\n exports3.keccak_512 = gen2(1, 72, 512 / 8);\n var genShake = (suffix, blockLen, outputLen) => (0, utils_js_1.wrapXOFConstructorWithOpts)((opts = {}) => new Keccak3(blockLen, suffix, opts.dkLen === void 0 ? outputLen : opts.dkLen, true));\n exports3.shake128 = genShake(31, 168, 128 / 8);\n exports3.shake256 = genShake(31, 136, 256 / 8);\n }\n });\n\n // ../../../node_modules/.pnpm/ethers@6.15.0_bufferutil@4.0.9_utf-8-validate@5.0.10/node_modules/ethers/lib.commonjs/crypto/keccak.js\n var require_keccak = __commonJS({\n \"../../../node_modules/.pnpm/ethers@6.15.0_bufferutil@4.0.9_utf-8-validate@5.0.10/node_modules/ethers/lib.commonjs/crypto/keccak.js\"(exports3) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n Object.defineProperty(exports3, \"__esModule\", { value: true });\n exports3.keccak256 = void 0;\n var sha3_1 = require_sha32();\n var index_js_1 = require_utils8();\n var locked = false;\n var _keccak256 = function(data) {\n return (0, sha3_1.keccak_256)(data);\n };\n var __keccak256 = _keccak256;\n function keccak2563(_data) {\n const data = (0, index_js_1.getBytes)(_data, \"data\");\n return (0, index_js_1.hexlify)(__keccak256(data));\n }\n exports3.keccak256 = keccak2563;\n keccak2563._ = _keccak256;\n keccak2563.lock = function() {\n locked = true;\n };\n keccak2563.register = function(func) {\n if (locked) {\n throw new TypeError(\"keccak256 is locked\");\n }\n __keccak256 = func;\n };\n Object.freeze(keccak2563);\n }\n });\n\n // ../../../node_modules/.pnpm/@noble+hashes@1.3.2/node_modules/@noble/hashes/ripemd160.js\n var require_ripemd160 = __commonJS({\n \"../../../node_modules/.pnpm/@noble+hashes@1.3.2/node_modules/@noble/hashes/ripemd160.js\"(exports3) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n Object.defineProperty(exports3, \"__esModule\", { value: true });\n exports3.ripemd160 = exports3.RIPEMD160 = void 0;\n var _sha2_js_1 = require_sha2();\n var utils_js_1 = require_utils9();\n var Rho = /* @__PURE__ */ new Uint8Array([7, 4, 13, 1, 10, 6, 15, 3, 12, 0, 9, 5, 2, 14, 11, 8]);\n var Id = /* @__PURE__ */ Uint8Array.from({ length: 16 }, (_2, i3) => i3);\n var Pi = /* @__PURE__ */ Id.map((i3) => (9 * i3 + 5) % 16);\n var idxL2 = [Id];\n var idxR2 = [Pi];\n for (let i3 = 0; i3 < 4; i3++)\n for (let j2 of [idxL2, idxR2])\n j2.push(j2[i3].map((k4) => Rho[k4]));\n var shifts = /* @__PURE__ */ [\n [11, 14, 15, 12, 5, 8, 7, 9, 11, 13, 14, 15, 6, 7, 9, 8],\n [12, 13, 11, 15, 6, 9, 9, 7, 12, 15, 11, 13, 7, 8, 7, 7],\n [13, 15, 14, 11, 7, 7, 6, 8, 13, 14, 13, 12, 5, 5, 6, 9],\n [14, 11, 12, 14, 8, 6, 5, 5, 15, 12, 15, 14, 9, 9, 8, 6],\n [15, 12, 13, 13, 9, 5, 8, 6, 14, 11, 12, 11, 8, 6, 5, 5]\n ].map((i3) => new Uint8Array(i3));\n var shiftsL = /* @__PURE__ */ idxL2.map((idx, i3) => idx.map((j2) => shifts[i3][j2]));\n var shiftsR = /* @__PURE__ */ idxR2.map((idx, i3) => idx.map((j2) => shifts[i3][j2]));\n var Kl = /* @__PURE__ */ new Uint32Array([\n 0,\n 1518500249,\n 1859775393,\n 2400959708,\n 2840853838\n ]);\n var Kr = /* @__PURE__ */ new Uint32Array([\n 1352829926,\n 1548603684,\n 1836072691,\n 2053994217,\n 0\n ]);\n var rotl2 = (word, shift) => word << shift | word >>> 32 - shift;\n function f6(group, x4, y6, z2) {\n if (group === 0)\n return x4 ^ y6 ^ z2;\n else if (group === 1)\n return x4 & y6 | ~x4 & z2;\n else if (group === 2)\n return (x4 | ~y6) ^ z2;\n else if (group === 3)\n return x4 & z2 | y6 & ~z2;\n else\n return x4 ^ (y6 | ~z2);\n }\n var BUF = /* @__PURE__ */ new Uint32Array(16);\n var RIPEMD1602 = class extends _sha2_js_1.SHA2 {\n constructor() {\n super(64, 20, 8, true);\n this.h0 = 1732584193 | 0;\n this.h1 = 4023233417 | 0;\n this.h2 = 2562383102 | 0;\n this.h3 = 271733878 | 0;\n this.h4 = 3285377520 | 0;\n }\n get() {\n const { h0, h1, h2: h22, h3: h32, h4 } = this;\n return [h0, h1, h22, h32, h4];\n }\n set(h0, h1, h22, h32, h4) {\n this.h0 = h0 | 0;\n this.h1 = h1 | 0;\n this.h2 = h22 | 0;\n this.h3 = h32 | 0;\n this.h4 = h4 | 0;\n }\n process(view, offset) {\n for (let i3 = 0; i3 < 16; i3++, offset += 4)\n BUF[i3] = view.getUint32(offset, true);\n let al = this.h0 | 0, ar = al, bl = this.h1 | 0, br = bl, cl = this.h2 | 0, cr = cl, dl = this.h3 | 0, dr = dl, el = this.h4 | 0, er = el;\n for (let group = 0; group < 5; group++) {\n const rGroup = 4 - group;\n const hbl = Kl[group], hbr = Kr[group];\n const rl = idxL2[group], rr = idxR2[group];\n const sl = shiftsL[group], sr = shiftsR[group];\n for (let i3 = 0; i3 < 16; i3++) {\n const tl = rotl2(al + f6(group, bl, cl, dl) + BUF[rl[i3]] + hbl, sl[i3]) + el | 0;\n al = el, el = dl, dl = rotl2(cl, 10) | 0, cl = bl, bl = tl;\n }\n for (let i3 = 0; i3 < 16; i3++) {\n const tr = rotl2(ar + f6(rGroup, br, cr, dr) + BUF[rr[i3]] + hbr, sr[i3]) + er | 0;\n ar = er, er = dr, dr = rotl2(cr, 10) | 0, cr = br, br = tr;\n }\n }\n this.set(this.h1 + cl + dr | 0, this.h2 + dl + er | 0, this.h3 + el + ar | 0, this.h4 + al + br | 0, this.h0 + bl + cr | 0);\n }\n roundClean() {\n BUF.fill(0);\n }\n destroy() {\n this.destroyed = true;\n this.buffer.fill(0);\n this.set(0, 0, 0, 0, 0);\n }\n };\n exports3.RIPEMD160 = RIPEMD1602;\n exports3.ripemd160 = (0, utils_js_1.wrapConstructor)(() => new RIPEMD1602());\n }\n });\n\n // ../../../node_modules/.pnpm/ethers@6.15.0_bufferutil@4.0.9_utf-8-validate@5.0.10/node_modules/ethers/lib.commonjs/crypto/ripemd160.js\n var require_ripemd1602 = __commonJS({\n \"../../../node_modules/.pnpm/ethers@6.15.0_bufferutil@4.0.9_utf-8-validate@5.0.10/node_modules/ethers/lib.commonjs/crypto/ripemd160.js\"(exports3) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n Object.defineProperty(exports3, \"__esModule\", { value: true });\n exports3.ripemd160 = void 0;\n var ripemd160_1 = require_ripemd160();\n var index_js_1 = require_utils8();\n var locked = false;\n var _ripemd160 = function(data) {\n return (0, ripemd160_1.ripemd160)(data);\n };\n var __ripemd160 = _ripemd160;\n function ripemd1602(_data) {\n const data = (0, index_js_1.getBytes)(_data, \"data\");\n return (0, index_js_1.hexlify)(__ripemd160(data));\n }\n exports3.ripemd160 = ripemd1602;\n ripemd1602._ = _ripemd160;\n ripemd1602.lock = function() {\n locked = true;\n };\n ripemd1602.register = function(func) {\n if (locked) {\n throw new TypeError(\"ripemd160 is locked\");\n }\n __ripemd160 = func;\n };\n Object.freeze(ripemd1602);\n }\n });\n\n // ../../../node_modules/.pnpm/ethers@6.15.0_bufferutil@4.0.9_utf-8-validate@5.0.10/node_modules/ethers/lib.commonjs/crypto/pbkdf2.js\n var require_pbkdf22 = __commonJS({\n \"../../../node_modules/.pnpm/ethers@6.15.0_bufferutil@4.0.9_utf-8-validate@5.0.10/node_modules/ethers/lib.commonjs/crypto/pbkdf2.js\"(exports3) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n Object.defineProperty(exports3, \"__esModule\", { value: true });\n exports3.pbkdf2 = void 0;\n var crypto_js_1 = require_crypto_browser();\n var index_js_1 = require_utils8();\n var locked = false;\n var _pbkdf2 = function(password, salt, iterations, keylen, algo) {\n return (0, crypto_js_1.pbkdf2Sync)(password, salt, iterations, keylen, algo);\n };\n var __pbkdf2 = _pbkdf2;\n function pbkdf22(_password, _salt, iterations, keylen, algo) {\n const password = (0, index_js_1.getBytes)(_password, \"password\");\n const salt = (0, index_js_1.getBytes)(_salt, \"salt\");\n return (0, index_js_1.hexlify)(__pbkdf2(password, salt, iterations, keylen, algo));\n }\n exports3.pbkdf2 = pbkdf22;\n pbkdf22._ = _pbkdf2;\n pbkdf22.lock = function() {\n locked = true;\n };\n pbkdf22.register = function(func) {\n if (locked) {\n throw new Error(\"pbkdf2 is locked\");\n }\n __pbkdf2 = func;\n };\n Object.freeze(pbkdf22);\n }\n });\n\n // ../../../node_modules/.pnpm/ethers@6.15.0_bufferutil@4.0.9_utf-8-validate@5.0.10/node_modules/ethers/lib.commonjs/crypto/random.js\n var require_random = __commonJS({\n \"../../../node_modules/.pnpm/ethers@6.15.0_bufferutil@4.0.9_utf-8-validate@5.0.10/node_modules/ethers/lib.commonjs/crypto/random.js\"(exports3) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n Object.defineProperty(exports3, \"__esModule\", { value: true });\n exports3.randomBytes = void 0;\n var crypto_js_1 = require_crypto_browser();\n var locked = false;\n var _randomBytes = function(length2) {\n return new Uint8Array((0, crypto_js_1.randomBytes)(length2));\n };\n var __randomBytes = _randomBytes;\n function randomBytes2(length2) {\n return __randomBytes(length2);\n }\n exports3.randomBytes = randomBytes2;\n randomBytes2._ = _randomBytes;\n randomBytes2.lock = function() {\n locked = true;\n };\n randomBytes2.register = function(func) {\n if (locked) {\n throw new Error(\"randomBytes is locked\");\n }\n __randomBytes = func;\n };\n Object.freeze(randomBytes2);\n }\n });\n\n // ../../../node_modules/.pnpm/@noble+hashes@1.3.2/node_modules/@noble/hashes/scrypt.js\n var require_scrypt2 = __commonJS({\n \"../../../node_modules/.pnpm/@noble+hashes@1.3.2/node_modules/@noble/hashes/scrypt.js\"(exports3) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n Object.defineProperty(exports3, \"__esModule\", { value: true });\n exports3.scryptAsync = exports3.scrypt = void 0;\n var _assert_js_1 = require_assert();\n var sha256_js_1 = require_sha256();\n var pbkdf2_js_1 = require_pbkdf2();\n var utils_js_1 = require_utils9();\n var rotl2 = (a3, b4) => a3 << b4 | a3 >>> 32 - b4;\n function XorAndSalsa(prev, pi, input, ii, out, oi) {\n let y00 = prev[pi++] ^ input[ii++], y01 = prev[pi++] ^ input[ii++];\n let y02 = prev[pi++] ^ input[ii++], y03 = prev[pi++] ^ input[ii++];\n let y04 = prev[pi++] ^ input[ii++], y05 = prev[pi++] ^ input[ii++];\n let y06 = prev[pi++] ^ input[ii++], y07 = prev[pi++] ^ input[ii++];\n let y08 = prev[pi++] ^ input[ii++], y09 = prev[pi++] ^ input[ii++];\n let y10 = prev[pi++] ^ input[ii++], y11 = prev[pi++] ^ input[ii++];\n let y12 = prev[pi++] ^ input[ii++], y13 = prev[pi++] ^ input[ii++];\n let y14 = prev[pi++] ^ input[ii++], y15 = prev[pi++] ^ input[ii++];\n let x00 = y00, x01 = y01, x02 = y02, x03 = y03, x04 = y04, x05 = y05, x06 = y06, x07 = y07, x08 = y08, x09 = y09, x10 = y10, x11 = y11, x12 = y12, x13 = y13, x14 = y14, x15 = y15;\n for (let i3 = 0; i3 < 8; i3 += 2) {\n x04 ^= rotl2(x00 + x12 | 0, 7);\n x08 ^= rotl2(x04 + x00 | 0, 9);\n x12 ^= rotl2(x08 + x04 | 0, 13);\n x00 ^= rotl2(x12 + x08 | 0, 18);\n x09 ^= rotl2(x05 + x01 | 0, 7);\n x13 ^= rotl2(x09 + x05 | 0, 9);\n x01 ^= rotl2(x13 + x09 | 0, 13);\n x05 ^= rotl2(x01 + x13 | 0, 18);\n x14 ^= rotl2(x10 + x06 | 0, 7);\n x02 ^= rotl2(x14 + x10 | 0, 9);\n x06 ^= rotl2(x02 + x14 | 0, 13);\n x10 ^= rotl2(x06 + x02 | 0, 18);\n x03 ^= rotl2(x15 + x11 | 0, 7);\n x07 ^= rotl2(x03 + x15 | 0, 9);\n x11 ^= rotl2(x07 + x03 | 0, 13);\n x15 ^= rotl2(x11 + x07 | 0, 18);\n x01 ^= rotl2(x00 + x03 | 0, 7);\n x02 ^= rotl2(x01 + x00 | 0, 9);\n x03 ^= rotl2(x02 + x01 | 0, 13);\n x00 ^= rotl2(x03 + x02 | 0, 18);\n x06 ^= rotl2(x05 + x04 | 0, 7);\n x07 ^= rotl2(x06 + x05 | 0, 9);\n x04 ^= rotl2(x07 + x06 | 0, 13);\n x05 ^= rotl2(x04 + x07 | 0, 18);\n x11 ^= rotl2(x10 + x09 | 0, 7);\n x08 ^= rotl2(x11 + x10 | 0, 9);\n x09 ^= rotl2(x08 + x11 | 0, 13);\n x10 ^= rotl2(x09 + x08 | 0, 18);\n x12 ^= rotl2(x15 + x14 | 0, 7);\n x13 ^= rotl2(x12 + x15 | 0, 9);\n x14 ^= rotl2(x13 + x12 | 0, 13);\n x15 ^= rotl2(x14 + x13 | 0, 18);\n }\n out[oi++] = y00 + x00 | 0;\n out[oi++] = y01 + x01 | 0;\n out[oi++] = y02 + x02 | 0;\n out[oi++] = y03 + x03 | 0;\n out[oi++] = y04 + x04 | 0;\n out[oi++] = y05 + x05 | 0;\n out[oi++] = y06 + x06 | 0;\n out[oi++] = y07 + x07 | 0;\n out[oi++] = y08 + x08 | 0;\n out[oi++] = y09 + x09 | 0;\n out[oi++] = y10 + x10 | 0;\n out[oi++] = y11 + x11 | 0;\n out[oi++] = y12 + x12 | 0;\n out[oi++] = y13 + x13 | 0;\n out[oi++] = y14 + x14 | 0;\n out[oi++] = y15 + x15 | 0;\n }\n function BlockMix(input, ii, out, oi, r2) {\n let head = oi + 0;\n let tail = oi + 16 * r2;\n for (let i3 = 0; i3 < 16; i3++)\n out[tail + i3] = input[ii + (2 * r2 - 1) * 16 + i3];\n for (let i3 = 0; i3 < r2; i3++, head += 16, ii += 16) {\n XorAndSalsa(out, tail, input, ii, out, head);\n if (i3 > 0)\n tail += 16;\n XorAndSalsa(out, head, input, ii += 16, out, tail);\n }\n }\n function scryptInit(password, salt, _opts) {\n const opts = (0, utils_js_1.checkOpts)({\n dkLen: 32,\n asyncTick: 10,\n maxmem: 1024 ** 3 + 1024\n }, _opts);\n const { N: N4, r: r2, p: p4, dkLen, asyncTick, maxmem, onProgress } = opts;\n (0, _assert_js_1.number)(N4);\n (0, _assert_js_1.number)(r2);\n (0, _assert_js_1.number)(p4);\n (0, _assert_js_1.number)(dkLen);\n (0, _assert_js_1.number)(asyncTick);\n (0, _assert_js_1.number)(maxmem);\n if (onProgress !== void 0 && typeof onProgress !== \"function\")\n throw new Error(\"progressCb should be function\");\n const blockSize = 128 * r2;\n const blockSize32 = blockSize / 4;\n if (N4 <= 1 || (N4 & N4 - 1) !== 0 || N4 >= 2 ** (blockSize / 8) || N4 > 2 ** 32) {\n throw new Error(\"Scrypt: N must be larger than 1, a power of 2, less than 2^(128 * r / 8) and less than 2^32\");\n }\n if (p4 < 0 || p4 > (2 ** 32 - 1) * 32 / blockSize) {\n throw new Error(\"Scrypt: p must be a positive integer less than or equal to ((2^32 - 1) * 32) / (128 * r)\");\n }\n if (dkLen < 0 || dkLen > (2 ** 32 - 1) * 32) {\n throw new Error(\"Scrypt: dkLen should be positive integer less than or equal to (2^32 - 1) * 32\");\n }\n const memUsed = blockSize * (N4 + p4);\n if (memUsed > maxmem) {\n throw new Error(`Scrypt: parameters too large, ${memUsed} (128 * r * (N + p)) > ${maxmem} (maxmem)`);\n }\n const B2 = (0, pbkdf2_js_1.pbkdf2)(sha256_js_1.sha256, password, salt, { c: 1, dkLen: blockSize * p4 });\n const B32 = (0, utils_js_1.u32)(B2);\n const V2 = (0, utils_js_1.u32)(new Uint8Array(blockSize * N4));\n const tmp = (0, utils_js_1.u32)(new Uint8Array(blockSize));\n let blockMixCb = () => {\n };\n if (onProgress) {\n const totalBlockMix = 2 * N4 * p4;\n const callbackPer = Math.max(Math.floor(totalBlockMix / 1e4), 1);\n let blockMixCnt = 0;\n blockMixCb = () => {\n blockMixCnt++;\n if (onProgress && (!(blockMixCnt % callbackPer) || blockMixCnt === totalBlockMix))\n onProgress(blockMixCnt / totalBlockMix);\n };\n }\n return { N: N4, r: r2, p: p4, dkLen, blockSize32, V: V2, B32, B: B2, tmp, blockMixCb, asyncTick };\n }\n function scryptOutput(password, dkLen, B2, V2, tmp) {\n const res = (0, pbkdf2_js_1.pbkdf2)(sha256_js_1.sha256, password, B2, { c: 1, dkLen });\n B2.fill(0);\n V2.fill(0);\n tmp.fill(0);\n return res;\n }\n function scrypt(password, salt, opts) {\n const { N: N4, r: r2, p: p4, dkLen, blockSize32, V: V2, B32, B: B2, tmp, blockMixCb } = scryptInit(password, salt, opts);\n for (let pi = 0; pi < p4; pi++) {\n const Pi = blockSize32 * pi;\n for (let i3 = 0; i3 < blockSize32; i3++)\n V2[i3] = B32[Pi + i3];\n for (let i3 = 0, pos = 0; i3 < N4 - 1; i3++) {\n BlockMix(V2, pos, V2, pos += blockSize32, r2);\n blockMixCb();\n }\n BlockMix(V2, (N4 - 1) * blockSize32, B32, Pi, r2);\n blockMixCb();\n for (let i3 = 0; i3 < N4; i3++) {\n const j2 = B32[Pi + blockSize32 - 16] % N4;\n for (let k4 = 0; k4 < blockSize32; k4++)\n tmp[k4] = B32[Pi + k4] ^ V2[j2 * blockSize32 + k4];\n BlockMix(tmp, 0, B32, Pi, r2);\n blockMixCb();\n }\n }\n return scryptOutput(password, dkLen, B2, V2, tmp);\n }\n exports3.scrypt = scrypt;\n async function scryptAsync(password, salt, opts) {\n const { N: N4, r: r2, p: p4, dkLen, blockSize32, V: V2, B32, B: B2, tmp, blockMixCb, asyncTick } = scryptInit(password, salt, opts);\n for (let pi = 0; pi < p4; pi++) {\n const Pi = blockSize32 * pi;\n for (let i3 = 0; i3 < blockSize32; i3++)\n V2[i3] = B32[Pi + i3];\n let pos = 0;\n await (0, utils_js_1.asyncLoop)(N4 - 1, asyncTick, () => {\n BlockMix(V2, pos, V2, pos += blockSize32, r2);\n blockMixCb();\n });\n BlockMix(V2, (N4 - 1) * blockSize32, B32, Pi, r2);\n blockMixCb();\n await (0, utils_js_1.asyncLoop)(N4, asyncTick, () => {\n const j2 = B32[Pi + blockSize32 - 16] % N4;\n for (let k4 = 0; k4 < blockSize32; k4++)\n tmp[k4] = B32[Pi + k4] ^ V2[j2 * blockSize32 + k4];\n BlockMix(tmp, 0, B32, Pi, r2);\n blockMixCb();\n });\n }\n return scryptOutput(password, dkLen, B2, V2, tmp);\n }\n exports3.scryptAsync = scryptAsync;\n }\n });\n\n // ../../../node_modules/.pnpm/ethers@6.15.0_bufferutil@4.0.9_utf-8-validate@5.0.10/node_modules/ethers/lib.commonjs/crypto/scrypt.js\n var require_scrypt3 = __commonJS({\n \"../../../node_modules/.pnpm/ethers@6.15.0_bufferutil@4.0.9_utf-8-validate@5.0.10/node_modules/ethers/lib.commonjs/crypto/scrypt.js\"(exports3) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n Object.defineProperty(exports3, \"__esModule\", { value: true });\n exports3.scryptSync = exports3.scrypt = void 0;\n var scrypt_1 = require_scrypt2();\n var index_js_1 = require_utils8();\n var lockedSync = false;\n var lockedAsync = false;\n var _scryptAsync = async function(passwd, salt, N4, r2, p4, dkLen, onProgress) {\n return await (0, scrypt_1.scryptAsync)(passwd, salt, { N: N4, r: r2, p: p4, dkLen, onProgress });\n };\n var _scryptSync = function(passwd, salt, N4, r2, p4, dkLen) {\n return (0, scrypt_1.scrypt)(passwd, salt, { N: N4, r: r2, p: p4, dkLen });\n };\n var __scryptAsync = _scryptAsync;\n var __scryptSync = _scryptSync;\n async function scrypt(_passwd, _salt, N4, r2, p4, dkLen, progress) {\n const passwd = (0, index_js_1.getBytes)(_passwd, \"passwd\");\n const salt = (0, index_js_1.getBytes)(_salt, \"salt\");\n return (0, index_js_1.hexlify)(await __scryptAsync(passwd, salt, N4, r2, p4, dkLen, progress));\n }\n exports3.scrypt = scrypt;\n scrypt._ = _scryptAsync;\n scrypt.lock = function() {\n lockedAsync = true;\n };\n scrypt.register = function(func) {\n if (lockedAsync) {\n throw new Error(\"scrypt is locked\");\n }\n __scryptAsync = func;\n };\n Object.freeze(scrypt);\n function scryptSync(_passwd, _salt, N4, r2, p4, dkLen) {\n const passwd = (0, index_js_1.getBytes)(_passwd, \"passwd\");\n const salt = (0, index_js_1.getBytes)(_salt, \"salt\");\n return (0, index_js_1.hexlify)(__scryptSync(passwd, salt, N4, r2, p4, dkLen));\n }\n exports3.scryptSync = scryptSync;\n scryptSync._ = _scryptSync;\n scryptSync.lock = function() {\n lockedSync = true;\n };\n scryptSync.register = function(func) {\n if (lockedSync) {\n throw new Error(\"scryptSync is locked\");\n }\n __scryptSync = func;\n };\n Object.freeze(scryptSync);\n }\n });\n\n // ../../../node_modules/.pnpm/ethers@6.15.0_bufferutil@4.0.9_utf-8-validate@5.0.10/node_modules/ethers/lib.commonjs/crypto/sha2.js\n var require_sha22 = __commonJS({\n \"../../../node_modules/.pnpm/ethers@6.15.0_bufferutil@4.0.9_utf-8-validate@5.0.10/node_modules/ethers/lib.commonjs/crypto/sha2.js\"(exports3) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n Object.defineProperty(exports3, \"__esModule\", { value: true });\n exports3.sha512 = exports3.sha256 = void 0;\n var crypto_js_1 = require_crypto_browser();\n var index_js_1 = require_utils8();\n var _sha256 = function(data) {\n return (0, crypto_js_1.createHash)(\"sha256\").update(data).digest();\n };\n var _sha512 = function(data) {\n return (0, crypto_js_1.createHash)(\"sha512\").update(data).digest();\n };\n var __sha256 = _sha256;\n var __sha512 = _sha512;\n var locked256 = false;\n var locked512 = false;\n function sha2564(_data) {\n const data = (0, index_js_1.getBytes)(_data, \"data\");\n return (0, index_js_1.hexlify)(__sha256(data));\n }\n exports3.sha256 = sha2564;\n sha2564._ = _sha256;\n sha2564.lock = function() {\n locked256 = true;\n };\n sha2564.register = function(func) {\n if (locked256) {\n throw new Error(\"sha256 is locked\");\n }\n __sha256 = func;\n };\n Object.freeze(sha2564);\n function sha5122(_data) {\n const data = (0, index_js_1.getBytes)(_data, \"data\");\n return (0, index_js_1.hexlify)(__sha512(data));\n }\n exports3.sha512 = sha5122;\n sha5122._ = _sha512;\n sha5122.lock = function() {\n locked512 = true;\n };\n sha5122.register = function(func) {\n if (locked512) {\n throw new Error(\"sha512 is locked\");\n }\n __sha512 = func;\n };\n Object.freeze(sha2564);\n }\n });\n\n // ../../../node_modules/.pnpm/@noble+curves@1.2.0/node_modules/@noble/curves/abstract/utils.js\n var require_utils10 = __commonJS({\n \"../../../node_modules/.pnpm/@noble+curves@1.2.0/node_modules/@noble/curves/abstract/utils.js\"(exports3) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n Object.defineProperty(exports3, \"__esModule\", { value: true });\n exports3.validateObject = exports3.createHmacDrbg = exports3.bitMask = exports3.bitSet = exports3.bitGet = exports3.bitLen = exports3.utf8ToBytes = exports3.equalBytes = exports3.concatBytes = exports3.ensureBytes = exports3.numberToVarBytesBE = exports3.numberToBytesLE = exports3.numberToBytesBE = exports3.bytesToNumberLE = exports3.bytesToNumberBE = exports3.hexToBytes = exports3.hexToNumber = exports3.numberToHexUnpadded = exports3.bytesToHex = void 0;\n var _0n12 = BigInt(0);\n var _1n12 = BigInt(1);\n var _2n9 = BigInt(2);\n var u8a = (a3) => a3 instanceof Uint8Array;\n var hexes7 = /* @__PURE__ */ Array.from({ length: 256 }, (_2, i3) => i3.toString(16).padStart(2, \"0\"));\n function bytesToHex6(bytes) {\n if (!u8a(bytes))\n throw new Error(\"Uint8Array expected\");\n let hex = \"\";\n for (let i3 = 0; i3 < bytes.length; i3++) {\n hex += hexes7[bytes[i3]];\n }\n return hex;\n }\n exports3.bytesToHex = bytesToHex6;\n function numberToHexUnpadded3(num2) {\n const hex = num2.toString(16);\n return hex.length & 1 ? `0${hex}` : hex;\n }\n exports3.numberToHexUnpadded = numberToHexUnpadded3;\n function hexToNumber4(hex) {\n if (typeof hex !== \"string\")\n throw new Error(\"hex string expected, got \" + typeof hex);\n return BigInt(hex === \"\" ? \"0\" : `0x${hex}`);\n }\n exports3.hexToNumber = hexToNumber4;\n function hexToBytes6(hex) {\n if (typeof hex !== \"string\")\n throw new Error(\"hex string expected, got \" + typeof hex);\n const len = hex.length;\n if (len % 2)\n throw new Error(\"padded hex string expected, got unpadded hex of length \" + len);\n const array2 = new Uint8Array(len / 2);\n for (let i3 = 0; i3 < array2.length; i3++) {\n const j2 = i3 * 2;\n const hexByte = hex.slice(j2, j2 + 2);\n const byte = Number.parseInt(hexByte, 16);\n if (Number.isNaN(byte) || byte < 0)\n throw new Error(\"Invalid byte sequence\");\n array2[i3] = byte;\n }\n return array2;\n }\n exports3.hexToBytes = hexToBytes6;\n function bytesToNumberBE3(bytes) {\n return hexToNumber4(bytesToHex6(bytes));\n }\n exports3.bytesToNumberBE = bytesToNumberBE3;\n function bytesToNumberLE3(bytes) {\n if (!u8a(bytes))\n throw new Error(\"Uint8Array expected\");\n return hexToNumber4(bytesToHex6(Uint8Array.from(bytes).reverse()));\n }\n exports3.bytesToNumberLE = bytesToNumberLE3;\n function numberToBytesBE3(n2, len) {\n return hexToBytes6(n2.toString(16).padStart(len * 2, \"0\"));\n }\n exports3.numberToBytesBE = numberToBytesBE3;\n function numberToBytesLE3(n2, len) {\n return numberToBytesBE3(n2, len).reverse();\n }\n exports3.numberToBytesLE = numberToBytesLE3;\n function numberToVarBytesBE(n2) {\n return hexToBytes6(numberToHexUnpadded3(n2));\n }\n exports3.numberToVarBytesBE = numberToVarBytesBE;\n function ensureBytes3(title2, hex, expectedLength) {\n let res;\n if (typeof hex === \"string\") {\n try {\n res = hexToBytes6(hex);\n } catch (e3) {\n throw new Error(`${title2} must be valid hex string, got \"${hex}\". Cause: ${e3}`);\n }\n } else if (u8a(hex)) {\n res = Uint8Array.from(hex);\n } else {\n throw new Error(`${title2} must be hex string or Uint8Array`);\n }\n const len = res.length;\n if (typeof expectedLength === \"number\" && len !== expectedLength)\n throw new Error(`${title2} expected ${expectedLength} bytes, got ${len}`);\n return res;\n }\n exports3.ensureBytes = ensureBytes3;\n function concatBytes5(...arrays) {\n const r2 = new Uint8Array(arrays.reduce((sum, a3) => sum + a3.length, 0));\n let pad6 = 0;\n arrays.forEach((a3) => {\n if (!u8a(a3))\n throw new Error(\"Uint8Array expected\");\n r2.set(a3, pad6);\n pad6 += a3.length;\n });\n return r2;\n }\n exports3.concatBytes = concatBytes5;\n function equalBytes(b1, b22) {\n if (b1.length !== b22.length)\n return false;\n for (let i3 = 0; i3 < b1.length; i3++)\n if (b1[i3] !== b22[i3])\n return false;\n return true;\n }\n exports3.equalBytes = equalBytes;\n function utf8ToBytes3(str) {\n if (typeof str !== \"string\")\n throw new Error(`utf8ToBytes expected string, got ${typeof str}`);\n return new Uint8Array(new TextEncoder().encode(str));\n }\n exports3.utf8ToBytes = utf8ToBytes3;\n function bitLen3(n2) {\n let len;\n for (len = 0; n2 > _0n12; n2 >>= _1n12, len += 1)\n ;\n return len;\n }\n exports3.bitLen = bitLen3;\n function bitGet(n2, pos) {\n return n2 >> BigInt(pos) & _1n12;\n }\n exports3.bitGet = bitGet;\n var bitSet = (n2, pos, value) => {\n return n2 | (value ? _1n12 : _0n12) << BigInt(pos);\n };\n exports3.bitSet = bitSet;\n var bitMask3 = (n2) => (_2n9 << BigInt(n2 - 1)) - _1n12;\n exports3.bitMask = bitMask3;\n var u8n2 = (data) => new Uint8Array(data);\n var u8fr2 = (arr) => Uint8Array.from(arr);\n function createHmacDrbg3(hashLen, qByteLen, hmacFn) {\n if (typeof hashLen !== \"number\" || hashLen < 2)\n throw new Error(\"hashLen must be a number\");\n if (typeof qByteLen !== \"number\" || qByteLen < 2)\n throw new Error(\"qByteLen must be a number\");\n if (typeof hmacFn !== \"function\")\n throw new Error(\"hmacFn must be a function\");\n let v2 = u8n2(hashLen);\n let k4 = u8n2(hashLen);\n let i3 = 0;\n const reset = () => {\n v2.fill(1);\n k4.fill(0);\n i3 = 0;\n };\n const h4 = (...b4) => hmacFn(k4, v2, ...b4);\n const reseed = (seed = u8n2()) => {\n k4 = h4(u8fr2([0]), seed);\n v2 = h4();\n if (seed.length === 0)\n return;\n k4 = h4(u8fr2([1]), seed);\n v2 = h4();\n };\n const gen2 = () => {\n if (i3++ >= 1e3)\n throw new Error(\"drbg: tried 1000 values\");\n let len = 0;\n const out = [];\n while (len < qByteLen) {\n v2 = h4();\n const sl = v2.slice();\n out.push(sl);\n len += v2.length;\n }\n return concatBytes5(...out);\n };\n const genUntil = (seed, pred) => {\n reset();\n reseed(seed);\n let res = void 0;\n while (!(res = pred(gen2())))\n reseed();\n reset();\n return res;\n };\n return genUntil;\n }\n exports3.createHmacDrbg = createHmacDrbg3;\n var validatorFns2 = {\n bigint: (val) => typeof val === \"bigint\",\n function: (val) => typeof val === \"function\",\n boolean: (val) => typeof val === \"boolean\",\n string: (val) => typeof val === \"string\",\n stringOrUint8Array: (val) => typeof val === \"string\" || val instanceof Uint8Array,\n isSafeInteger: (val) => Number.isSafeInteger(val),\n array: (val) => Array.isArray(val),\n field: (val, object2) => object2.Fp.isValid(val),\n hash: (val) => typeof val === \"function\" && Number.isSafeInteger(val.outputLen)\n };\n function validateObject3(object2, validators, optValidators = {}) {\n const checkField = (fieldName, type, isOptional) => {\n const checkVal = validatorFns2[type];\n if (typeof checkVal !== \"function\")\n throw new Error(`Invalid validator \"${type}\", expected function`);\n const val = object2[fieldName];\n if (isOptional && val === void 0)\n return;\n if (!checkVal(val, object2)) {\n throw new Error(`Invalid param ${String(fieldName)}=${val} (${typeof val}), expected ${type}`);\n }\n };\n for (const [fieldName, type] of Object.entries(validators))\n checkField(fieldName, type, false);\n for (const [fieldName, type] of Object.entries(optValidators))\n checkField(fieldName, type, true);\n return object2;\n }\n exports3.validateObject = validateObject3;\n }\n });\n\n // ../../../node_modules/.pnpm/@noble+curves@1.2.0/node_modules/@noble/curves/abstract/modular.js\n var require_modular = __commonJS({\n \"../../../node_modules/.pnpm/@noble+curves@1.2.0/node_modules/@noble/curves/abstract/modular.js\"(exports3) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n Object.defineProperty(exports3, \"__esModule\", { value: true });\n exports3.mapHashToField = exports3.getMinHashLength = exports3.getFieldBytesLength = exports3.hashToPrivateScalar = exports3.FpSqrtEven = exports3.FpSqrtOdd = exports3.Field = exports3.nLength = exports3.FpIsSquare = exports3.FpDiv = exports3.FpInvertBatch = exports3.FpPow = exports3.validateField = exports3.isNegativeLE = exports3.FpSqrt = exports3.tonelliShanks = exports3.invert = exports3.pow2 = exports3.pow = exports3.mod = void 0;\n var utils_js_1 = require_utils10();\n var _0n12 = BigInt(0);\n var _1n12 = BigInt(1);\n var _2n9 = BigInt(2);\n var _3n5 = BigInt(3);\n var _4n5 = BigInt(4);\n var _5n3 = BigInt(5);\n var _8n3 = BigInt(8);\n var _9n2 = BigInt(9);\n var _16n2 = BigInt(16);\n function mod3(a3, b4) {\n const result = a3 % b4;\n return result >= _0n12 ? result : b4 + result;\n }\n exports3.mod = mod3;\n function pow(num2, power, modulo) {\n if (modulo <= _0n12 || power < _0n12)\n throw new Error(\"Expected power/modulo > 0\");\n if (modulo === _1n12)\n return _0n12;\n let res = _1n12;\n while (power > _0n12) {\n if (power & _1n12)\n res = res * num2 % modulo;\n num2 = num2 * num2 % modulo;\n power >>= _1n12;\n }\n return res;\n }\n exports3.pow = pow;\n function pow23(x4, power, modulo) {\n let res = x4;\n while (power-- > _0n12) {\n res *= res;\n res %= modulo;\n }\n return res;\n }\n exports3.pow2 = pow23;\n function invert3(number2, modulo) {\n if (number2 === _0n12 || modulo <= _0n12) {\n throw new Error(`invert: expected positive integers, got n=${number2} mod=${modulo}`);\n }\n let a3 = mod3(number2, modulo);\n let b4 = modulo;\n let x4 = _0n12, y6 = _1n12, u2 = _1n12, v2 = _0n12;\n while (a3 !== _0n12) {\n const q3 = b4 / a3;\n const r2 = b4 % a3;\n const m2 = x4 - u2 * q3;\n const n2 = y6 - v2 * q3;\n b4 = a3, a3 = r2, x4 = u2, y6 = v2, u2 = m2, v2 = n2;\n }\n const gcd = b4;\n if (gcd !== _1n12)\n throw new Error(\"invert: does not exist\");\n return mod3(x4, modulo);\n }\n exports3.invert = invert3;\n function tonelliShanks3(P2) {\n const legendreC = (P2 - _1n12) / _2n9;\n let Q2, S3, Z2;\n for (Q2 = P2 - _1n12, S3 = 0; Q2 % _2n9 === _0n12; Q2 /= _2n9, S3++)\n ;\n for (Z2 = _2n9; Z2 < P2 && pow(Z2, legendreC, P2) !== P2 - _1n12; Z2++)\n ;\n if (S3 === 1) {\n const p1div4 = (P2 + _1n12) / _4n5;\n return function tonelliFast(Fp, n2) {\n const root = Fp.pow(n2, p1div4);\n if (!Fp.eql(Fp.sqr(root), n2))\n throw new Error(\"Cannot find square root\");\n return root;\n };\n }\n const Q1div2 = (Q2 + _1n12) / _2n9;\n return function tonelliSlow(Fp, n2) {\n if (Fp.pow(n2, legendreC) === Fp.neg(Fp.ONE))\n throw new Error(\"Cannot find square root\");\n let r2 = S3;\n let g4 = Fp.pow(Fp.mul(Fp.ONE, Z2), Q2);\n let x4 = Fp.pow(n2, Q1div2);\n let b4 = Fp.pow(n2, Q2);\n while (!Fp.eql(b4, Fp.ONE)) {\n if (Fp.eql(b4, Fp.ZERO))\n return Fp.ZERO;\n let m2 = 1;\n for (let t22 = Fp.sqr(b4); m2 < r2; m2++) {\n if (Fp.eql(t22, Fp.ONE))\n break;\n t22 = Fp.sqr(t22);\n }\n const ge = Fp.pow(g4, _1n12 << BigInt(r2 - m2 - 1));\n g4 = Fp.sqr(ge);\n x4 = Fp.mul(x4, ge);\n b4 = Fp.mul(b4, g4);\n r2 = m2;\n }\n return x4;\n };\n }\n exports3.tonelliShanks = tonelliShanks3;\n function FpSqrt3(P2) {\n if (P2 % _4n5 === _3n5) {\n const p1div4 = (P2 + _1n12) / _4n5;\n return function sqrt3mod43(Fp, n2) {\n const root = Fp.pow(n2, p1div4);\n if (!Fp.eql(Fp.sqr(root), n2))\n throw new Error(\"Cannot find square root\");\n return root;\n };\n }\n if (P2 % _8n3 === _5n3) {\n const c1 = (P2 - _5n3) / _8n3;\n return function sqrt5mod83(Fp, n2) {\n const n22 = Fp.mul(n2, _2n9);\n const v2 = Fp.pow(n22, c1);\n const nv = Fp.mul(n2, v2);\n const i3 = Fp.mul(Fp.mul(nv, _2n9), v2);\n const root = Fp.mul(nv, Fp.sub(i3, Fp.ONE));\n if (!Fp.eql(Fp.sqr(root), n2))\n throw new Error(\"Cannot find square root\");\n return root;\n };\n }\n if (P2 % _16n2 === _9n2) {\n }\n return tonelliShanks3(P2);\n }\n exports3.FpSqrt = FpSqrt3;\n var isNegativeLE = (num2, modulo) => (mod3(num2, modulo) & _1n12) === _1n12;\n exports3.isNegativeLE = isNegativeLE;\n var FIELD_FIELDS3 = [\n \"create\",\n \"isValid\",\n \"is0\",\n \"neg\",\n \"inv\",\n \"sqrt\",\n \"sqr\",\n \"eql\",\n \"add\",\n \"sub\",\n \"mul\",\n \"pow\",\n \"div\",\n \"addN\",\n \"subN\",\n \"mulN\",\n \"sqrN\"\n ];\n function validateField3(field) {\n const initial = {\n ORDER: \"bigint\",\n MASK: \"bigint\",\n BYTES: \"isSafeInteger\",\n BITS: \"isSafeInteger\"\n };\n const opts = FIELD_FIELDS3.reduce((map, val) => {\n map[val] = \"function\";\n return map;\n }, initial);\n return (0, utils_js_1.validateObject)(field, opts);\n }\n exports3.validateField = validateField3;\n function FpPow3(f6, num2, power) {\n if (power < _0n12)\n throw new Error(\"Expected power > 0\");\n if (power === _0n12)\n return f6.ONE;\n if (power === _1n12)\n return num2;\n let p4 = f6.ONE;\n let d5 = num2;\n while (power > _0n12) {\n if (power & _1n12)\n p4 = f6.mul(p4, d5);\n d5 = f6.sqr(d5);\n power >>= _1n12;\n }\n return p4;\n }\n exports3.FpPow = FpPow3;\n function FpInvertBatch3(f6, nums) {\n const tmp = new Array(nums.length);\n const lastMultiplied = nums.reduce((acc, num2, i3) => {\n if (f6.is0(num2))\n return acc;\n tmp[i3] = acc;\n return f6.mul(acc, num2);\n }, f6.ONE);\n const inverted = f6.inv(lastMultiplied);\n nums.reduceRight((acc, num2, i3) => {\n if (f6.is0(num2))\n return acc;\n tmp[i3] = f6.mul(acc, tmp[i3]);\n return f6.mul(acc, num2);\n }, inverted);\n return tmp;\n }\n exports3.FpInvertBatch = FpInvertBatch3;\n function FpDiv(f6, lhs, rhs) {\n return f6.mul(lhs, typeof rhs === \"bigint\" ? invert3(rhs, f6.ORDER) : f6.inv(rhs));\n }\n exports3.FpDiv = FpDiv;\n function FpIsSquare(f6) {\n const legendreConst = (f6.ORDER - _1n12) / _2n9;\n return (x4) => {\n const p4 = f6.pow(x4, legendreConst);\n return f6.eql(p4, f6.ZERO) || f6.eql(p4, f6.ONE);\n };\n }\n exports3.FpIsSquare = FpIsSquare;\n function nLength3(n2, nBitLength) {\n const _nBitLength = nBitLength !== void 0 ? nBitLength : n2.toString(2).length;\n const nByteLength = Math.ceil(_nBitLength / 8);\n return { nBitLength: _nBitLength, nByteLength };\n }\n exports3.nLength = nLength3;\n function Field3(ORDER, bitLen3, isLE3 = false, redef = {}) {\n if (ORDER <= _0n12)\n throw new Error(`Expected Field ORDER > 0, got ${ORDER}`);\n const { nBitLength: BITS, nByteLength: BYTES } = nLength3(ORDER, bitLen3);\n if (BYTES > 2048)\n throw new Error(\"Field lengths over 2048 bytes are not supported\");\n const sqrtP = FpSqrt3(ORDER);\n const f6 = Object.freeze({\n ORDER,\n BITS,\n BYTES,\n MASK: (0, utils_js_1.bitMask)(BITS),\n ZERO: _0n12,\n ONE: _1n12,\n create: (num2) => mod3(num2, ORDER),\n isValid: (num2) => {\n if (typeof num2 !== \"bigint\")\n throw new Error(`Invalid field element: expected bigint, got ${typeof num2}`);\n return _0n12 <= num2 && num2 < ORDER;\n },\n is0: (num2) => num2 === _0n12,\n isOdd: (num2) => (num2 & _1n12) === _1n12,\n neg: (num2) => mod3(-num2, ORDER),\n eql: (lhs, rhs) => lhs === rhs,\n sqr: (num2) => mod3(num2 * num2, ORDER),\n add: (lhs, rhs) => mod3(lhs + rhs, ORDER),\n sub: (lhs, rhs) => mod3(lhs - rhs, ORDER),\n mul: (lhs, rhs) => mod3(lhs * rhs, ORDER),\n pow: (num2, power) => FpPow3(f6, num2, power),\n div: (lhs, rhs) => mod3(lhs * invert3(rhs, ORDER), ORDER),\n // Same as above, but doesn't normalize\n sqrN: (num2) => num2 * num2,\n addN: (lhs, rhs) => lhs + rhs,\n subN: (lhs, rhs) => lhs - rhs,\n mulN: (lhs, rhs) => lhs * rhs,\n inv: (num2) => invert3(num2, ORDER),\n sqrt: redef.sqrt || ((n2) => sqrtP(f6, n2)),\n invertBatch: (lst) => FpInvertBatch3(f6, lst),\n // TODO: do we really need constant cmov?\n // We don't have const-time bigints anyway, so probably will be not very useful\n cmov: (a3, b4, c4) => c4 ? b4 : a3,\n toBytes: (num2) => isLE3 ? (0, utils_js_1.numberToBytesLE)(num2, BYTES) : (0, utils_js_1.numberToBytesBE)(num2, BYTES),\n fromBytes: (bytes) => {\n if (bytes.length !== BYTES)\n throw new Error(`Fp.fromBytes: expected ${BYTES}, got ${bytes.length}`);\n return isLE3 ? (0, utils_js_1.bytesToNumberLE)(bytes) : (0, utils_js_1.bytesToNumberBE)(bytes);\n }\n });\n return Object.freeze(f6);\n }\n exports3.Field = Field3;\n function FpSqrtOdd(Fp, elm) {\n if (!Fp.isOdd)\n throw new Error(`Field doesn't have isOdd`);\n const root = Fp.sqrt(elm);\n return Fp.isOdd(root) ? root : Fp.neg(root);\n }\n exports3.FpSqrtOdd = FpSqrtOdd;\n function FpSqrtEven(Fp, elm) {\n if (!Fp.isOdd)\n throw new Error(`Field doesn't have isOdd`);\n const root = Fp.sqrt(elm);\n return Fp.isOdd(root) ? Fp.neg(root) : root;\n }\n exports3.FpSqrtEven = FpSqrtEven;\n function hashToPrivateScalar(hash3, groupOrder, isLE3 = false) {\n hash3 = (0, utils_js_1.ensureBytes)(\"privateHash\", hash3);\n const hashLen = hash3.length;\n const minLen = nLength3(groupOrder).nByteLength + 8;\n if (minLen < 24 || hashLen < minLen || hashLen > 1024)\n throw new Error(`hashToPrivateScalar: expected ${minLen}-1024 bytes of input, got ${hashLen}`);\n const num2 = isLE3 ? (0, utils_js_1.bytesToNumberLE)(hash3) : (0, utils_js_1.bytesToNumberBE)(hash3);\n return mod3(num2, groupOrder - _1n12) + _1n12;\n }\n exports3.hashToPrivateScalar = hashToPrivateScalar;\n function getFieldBytesLength3(fieldOrder) {\n if (typeof fieldOrder !== \"bigint\")\n throw new Error(\"field order must be bigint\");\n const bitLength = fieldOrder.toString(2).length;\n return Math.ceil(bitLength / 8);\n }\n exports3.getFieldBytesLength = getFieldBytesLength3;\n function getMinHashLength3(fieldOrder) {\n const length2 = getFieldBytesLength3(fieldOrder);\n return length2 + Math.ceil(length2 / 2);\n }\n exports3.getMinHashLength = getMinHashLength3;\n function mapHashToField3(key, fieldOrder, isLE3 = false) {\n const len = key.length;\n const fieldLen = getFieldBytesLength3(fieldOrder);\n const minLen = getMinHashLength3(fieldOrder);\n if (len < 16 || len < minLen || len > 1024)\n throw new Error(`expected ${minLen}-1024 bytes of input, got ${len}`);\n const num2 = isLE3 ? (0, utils_js_1.bytesToNumberBE)(key) : (0, utils_js_1.bytesToNumberLE)(key);\n const reduced = mod3(num2, fieldOrder - _1n12) + _1n12;\n return isLE3 ? (0, utils_js_1.numberToBytesLE)(reduced, fieldLen) : (0, utils_js_1.numberToBytesBE)(reduced, fieldLen);\n }\n exports3.mapHashToField = mapHashToField3;\n }\n });\n\n // ../../../node_modules/.pnpm/@noble+curves@1.2.0/node_modules/@noble/curves/abstract/curve.js\n var require_curve2 = __commonJS({\n \"../../../node_modules/.pnpm/@noble+curves@1.2.0/node_modules/@noble/curves/abstract/curve.js\"(exports3) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n Object.defineProperty(exports3, \"__esModule\", { value: true });\n exports3.validateBasic = exports3.wNAF = void 0;\n var modular_js_1 = require_modular();\n var utils_js_1 = require_utils10();\n var _0n12 = BigInt(0);\n var _1n12 = BigInt(1);\n function wNAF3(c4, bits) {\n const constTimeNegate2 = (condition, item) => {\n const neg = item.negate();\n return condition ? neg : item;\n };\n const opts = (W) => {\n const windows = Math.ceil(bits / W) + 1;\n const windowSize = 2 ** (W - 1);\n return { windows, windowSize };\n };\n return {\n constTimeNegate: constTimeNegate2,\n // non-const time multiplication ladder\n unsafeLadder(elm, n2) {\n let p4 = c4.ZERO;\n let d5 = elm;\n while (n2 > _0n12) {\n if (n2 & _1n12)\n p4 = p4.add(d5);\n d5 = d5.double();\n n2 >>= _1n12;\n }\n return p4;\n },\n /**\n * Creates a wNAF precomputation window. Used for caching.\n * Default window size is set by `utils.precompute()` and is equal to 8.\n * Number of precomputed points depends on the curve size:\n * 2^(𝑊−1) * (Math.ceil(𝑛 / 𝑊) + 1), where:\n * - 𝑊 is the window size\n * - 𝑛 is the bitlength of the curve order.\n * For a 256-bit curve and window size 8, the number of precomputed points is 128 * 33 = 4224.\n * @returns precomputed point tables flattened to a single array\n */\n precomputeWindow(elm, W) {\n const { windows, windowSize } = opts(W);\n const points = [];\n let p4 = elm;\n let base4 = p4;\n for (let window2 = 0; window2 < windows; window2++) {\n base4 = p4;\n points.push(base4);\n for (let i3 = 1; i3 < windowSize; i3++) {\n base4 = base4.add(p4);\n points.push(base4);\n }\n p4 = base4.double();\n }\n return points;\n },\n /**\n * Implements ec multiplication using precomputed tables and w-ary non-adjacent form.\n * @param W window size\n * @param precomputes precomputed tables\n * @param n scalar (we don't check here, but should be less than curve order)\n * @returns real and fake (for const-time) points\n */\n wNAF(W, precomputes, n2) {\n const { windows, windowSize } = opts(W);\n let p4 = c4.ZERO;\n let f6 = c4.BASE;\n const mask = BigInt(2 ** W - 1);\n const maxNumber = 2 ** W;\n const shiftBy = BigInt(W);\n for (let window2 = 0; window2 < windows; window2++) {\n const offset = window2 * windowSize;\n let wbits = Number(n2 & mask);\n n2 >>= shiftBy;\n if (wbits > windowSize) {\n wbits -= maxNumber;\n n2 += _1n12;\n }\n const offset1 = offset;\n const offset2 = offset + Math.abs(wbits) - 1;\n const cond1 = window2 % 2 !== 0;\n const cond2 = wbits < 0;\n if (wbits === 0) {\n f6 = f6.add(constTimeNegate2(cond1, precomputes[offset1]));\n } else {\n p4 = p4.add(constTimeNegate2(cond2, precomputes[offset2]));\n }\n }\n return { p: p4, f: f6 };\n },\n wNAFCached(P2, precomputesMap, n2, transform2) {\n const W = P2._WINDOW_SIZE || 1;\n let comp = precomputesMap.get(P2);\n if (!comp) {\n comp = this.precomputeWindow(P2, W);\n if (W !== 1) {\n precomputesMap.set(P2, transform2(comp));\n }\n }\n return this.wNAF(W, comp, n2);\n }\n };\n }\n exports3.wNAF = wNAF3;\n function validateBasic2(curve) {\n (0, modular_js_1.validateField)(curve.Fp);\n (0, utils_js_1.validateObject)(curve, {\n n: \"bigint\",\n h: \"bigint\",\n Gx: \"field\",\n Gy: \"field\"\n }, {\n nBitLength: \"isSafeInteger\",\n nByteLength: \"isSafeInteger\"\n });\n return Object.freeze({\n ...(0, modular_js_1.nLength)(curve.n, curve.nBitLength),\n ...curve,\n ...{ p: curve.Fp.ORDER }\n });\n }\n exports3.validateBasic = validateBasic2;\n }\n });\n\n // ../../../node_modules/.pnpm/@noble+curves@1.2.0/node_modules/@noble/curves/abstract/weierstrass.js\n var require_weierstrass = __commonJS({\n \"../../../node_modules/.pnpm/@noble+curves@1.2.0/node_modules/@noble/curves/abstract/weierstrass.js\"(exports3) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n Object.defineProperty(exports3, \"__esModule\", { value: true });\n exports3.mapToCurveSimpleSWU = exports3.SWUFpSqrtRatio = exports3.weierstrass = exports3.weierstrassPoints = exports3.DER = void 0;\n var mod3 = require_modular();\n var ut = require_utils10();\n var utils_js_1 = require_utils10();\n var curve_js_1 = require_curve2();\n function validatePointOpts2(curve) {\n const opts = (0, curve_js_1.validateBasic)(curve);\n ut.validateObject(opts, {\n a: \"field\",\n b: \"field\"\n }, {\n allowedPrivateKeyLengths: \"array\",\n wrapPrivateKey: \"boolean\",\n isTorsionFree: \"function\",\n clearCofactor: \"function\",\n allowInfinityPoint: \"boolean\",\n fromBytes: \"function\",\n toBytes: \"function\"\n });\n const { endo, Fp, a: a3 } = opts;\n if (endo) {\n if (!Fp.eql(a3, Fp.ZERO)) {\n throw new Error(\"Endomorphism can only be defined for Koblitz curves that have a=0\");\n }\n if (typeof endo !== \"object\" || typeof endo.beta !== \"bigint\" || typeof endo.splitScalar !== \"function\") {\n throw new Error(\"Expected endomorphism with beta: bigint and splitScalar: function\");\n }\n }\n return Object.freeze({ ...opts });\n }\n var { bytesToNumberBE: b2n, hexToBytes: h2b } = ut;\n exports3.DER = {\n // asn.1 DER encoding utils\n Err: class DERErr extends Error {\n constructor(m2 = \"\") {\n super(m2);\n }\n },\n _parseInt(data) {\n const { Err: E2 } = exports3.DER;\n if (data.length < 2 || data[0] !== 2)\n throw new E2(\"Invalid signature integer tag\");\n const len = data[1];\n const res = data.subarray(2, len + 2);\n if (!len || res.length !== len)\n throw new E2(\"Invalid signature integer: wrong length\");\n if (res[0] & 128)\n throw new E2(\"Invalid signature integer: negative\");\n if (res[0] === 0 && !(res[1] & 128))\n throw new E2(\"Invalid signature integer: unnecessary leading zero\");\n return { d: b2n(res), l: data.subarray(len + 2) };\n },\n toSig(hex) {\n const { Err: E2 } = exports3.DER;\n const data = typeof hex === \"string\" ? h2b(hex) : hex;\n if (!(data instanceof Uint8Array))\n throw new Error(\"ui8a expected\");\n let l6 = data.length;\n if (l6 < 2 || data[0] != 48)\n throw new E2(\"Invalid signature tag\");\n if (data[1] !== l6 - 2)\n throw new E2(\"Invalid signature: incorrect length\");\n const { d: r2, l: sBytes } = exports3.DER._parseInt(data.subarray(2));\n const { d: s4, l: rBytesLeft } = exports3.DER._parseInt(sBytes);\n if (rBytesLeft.length)\n throw new E2(\"Invalid signature: left bytes after parsing\");\n return { r: r2, s: s4 };\n },\n hexFromSig(sig) {\n const slice4 = (s5) => Number.parseInt(s5[0], 16) & 8 ? \"00\" + s5 : s5;\n const h4 = (num2) => {\n const hex = num2.toString(16);\n return hex.length & 1 ? `0${hex}` : hex;\n };\n const s4 = slice4(h4(sig.s));\n const r2 = slice4(h4(sig.r));\n const shl = s4.length / 2;\n const rhl = r2.length / 2;\n const sl = h4(shl);\n const rl = h4(rhl);\n return `30${h4(rhl + shl + 4)}02${rl}${r2}02${sl}${s4}`;\n }\n };\n var _0n12 = BigInt(0);\n var _1n12 = BigInt(1);\n var _2n9 = BigInt(2);\n var _3n5 = BigInt(3);\n var _4n5 = BigInt(4);\n function weierstrassPoints2(opts) {\n const CURVE = validatePointOpts2(opts);\n const { Fp } = CURVE;\n const toBytes5 = CURVE.toBytes || ((_c, point, _isCompressed) => {\n const a3 = point.toAffine();\n return ut.concatBytes(Uint8Array.from([4]), Fp.toBytes(a3.x), Fp.toBytes(a3.y));\n });\n const fromBytes5 = CURVE.fromBytes || ((bytes) => {\n const tail = bytes.subarray(1);\n const x4 = Fp.fromBytes(tail.subarray(0, Fp.BYTES));\n const y6 = Fp.fromBytes(tail.subarray(Fp.BYTES, 2 * Fp.BYTES));\n return { x: x4, y: y6 };\n });\n function weierstrassEquation(x4) {\n const { a: a3, b: b4 } = CURVE;\n const x22 = Fp.sqr(x4);\n const x32 = Fp.mul(x22, x4);\n return Fp.add(Fp.add(x32, Fp.mul(x4, a3)), b4);\n }\n if (!Fp.eql(Fp.sqr(CURVE.Gy), weierstrassEquation(CURVE.Gx)))\n throw new Error(\"bad generator point: equation left != right\");\n function isWithinCurveOrder(num2) {\n return typeof num2 === \"bigint\" && _0n12 < num2 && num2 < CURVE.n;\n }\n function assertGE(num2) {\n if (!isWithinCurveOrder(num2))\n throw new Error(\"Expected valid bigint: 0 < bigint < curve.n\");\n }\n function normPrivateKeyToScalar(key) {\n const { allowedPrivateKeyLengths: lengths, nByteLength, wrapPrivateKey, n: n2 } = CURVE;\n if (lengths && typeof key !== \"bigint\") {\n if (key instanceof Uint8Array)\n key = ut.bytesToHex(key);\n if (typeof key !== \"string\" || !lengths.includes(key.length))\n throw new Error(\"Invalid key\");\n key = key.padStart(nByteLength * 2, \"0\");\n }\n let num2;\n try {\n num2 = typeof key === \"bigint\" ? key : ut.bytesToNumberBE((0, utils_js_1.ensureBytes)(\"private key\", key, nByteLength));\n } catch (error) {\n throw new Error(`private key must be ${nByteLength} bytes, hex or bigint, not ${typeof key}`);\n }\n if (wrapPrivateKey)\n num2 = mod3.mod(num2, n2);\n assertGE(num2);\n return num2;\n }\n const pointPrecomputes3 = /* @__PURE__ */ new Map();\n function assertPrjPoint(other) {\n if (!(other instanceof Point3))\n throw new Error(\"ProjectivePoint expected\");\n }\n class Point3 {\n constructor(px, py, pz) {\n this.px = px;\n this.py = py;\n this.pz = pz;\n if (px == null || !Fp.isValid(px))\n throw new Error(\"x required\");\n if (py == null || !Fp.isValid(py))\n throw new Error(\"y required\");\n if (pz == null || !Fp.isValid(pz))\n throw new Error(\"z required\");\n }\n // Does not validate if the point is on-curve.\n // Use fromHex instead, or call assertValidity() later.\n static fromAffine(p4) {\n const { x: x4, y: y6 } = p4 || {};\n if (!p4 || !Fp.isValid(x4) || !Fp.isValid(y6))\n throw new Error(\"invalid affine point\");\n if (p4 instanceof Point3)\n throw new Error(\"projective point not allowed\");\n const is0 = (i3) => Fp.eql(i3, Fp.ZERO);\n if (is0(x4) && is0(y6))\n return Point3.ZERO;\n return new Point3(x4, y6, Fp.ONE);\n }\n get x() {\n return this.toAffine().x;\n }\n get y() {\n return this.toAffine().y;\n }\n /**\n * Takes a bunch of Projective Points but executes only one\n * inversion on all of them. Inversion is very slow operation,\n * so this improves performance massively.\n * Optimization: converts a list of projective points to a list of identical points with Z=1.\n */\n static normalizeZ(points) {\n const toInv = Fp.invertBatch(points.map((p4) => p4.pz));\n return points.map((p4, i3) => p4.toAffine(toInv[i3])).map(Point3.fromAffine);\n }\n /**\n * Converts hash string or Uint8Array to Point.\n * @param hex short/long ECDSA hex\n */\n static fromHex(hex) {\n const P2 = Point3.fromAffine(fromBytes5((0, utils_js_1.ensureBytes)(\"pointHex\", hex)));\n P2.assertValidity();\n return P2;\n }\n // Multiplies generator point by privateKey.\n static fromPrivateKey(privateKey) {\n return Point3.BASE.multiply(normPrivateKeyToScalar(privateKey));\n }\n // \"Private method\", don't use it directly\n _setWindowSize(windowSize) {\n this._WINDOW_SIZE = windowSize;\n pointPrecomputes3.delete(this);\n }\n // A point on curve is valid if it conforms to equation.\n assertValidity() {\n if (this.is0()) {\n if (CURVE.allowInfinityPoint && !Fp.is0(this.py))\n return;\n throw new Error(\"bad point: ZERO\");\n }\n const { x: x4, y: y6 } = this.toAffine();\n if (!Fp.isValid(x4) || !Fp.isValid(y6))\n throw new Error(\"bad point: x or y not FE\");\n const left = Fp.sqr(y6);\n const right = weierstrassEquation(x4);\n if (!Fp.eql(left, right))\n throw new Error(\"bad point: equation left != right\");\n if (!this.isTorsionFree())\n throw new Error(\"bad point: not in prime-order subgroup\");\n }\n hasEvenY() {\n const { y: y6 } = this.toAffine();\n if (Fp.isOdd)\n return !Fp.isOdd(y6);\n throw new Error(\"Field doesn't support isOdd\");\n }\n /**\n * Compare one point to another.\n */\n equals(other) {\n assertPrjPoint(other);\n const { px: X1, py: Y1, pz: Z1 } = this;\n const { px: X2, py: Y2, pz: Z2 } = other;\n const U1 = Fp.eql(Fp.mul(X1, Z2), Fp.mul(X2, Z1));\n const U22 = Fp.eql(Fp.mul(Y1, Z2), Fp.mul(Y2, Z1));\n return U1 && U22;\n }\n /**\n * Flips point to one corresponding to (x, -y) in Affine coordinates.\n */\n negate() {\n return new Point3(this.px, Fp.neg(this.py), this.pz);\n }\n // Renes-Costello-Batina exception-free doubling formula.\n // There is 30% faster Jacobian formula, but it is not complete.\n // https://eprint.iacr.org/2015/1060, algorithm 3\n // Cost: 8M + 3S + 3*a + 2*b3 + 15add.\n double() {\n const { a: a3, b: b4 } = CURVE;\n const b32 = Fp.mul(b4, _3n5);\n const { px: X1, py: Y1, pz: Z1 } = this;\n let X3 = Fp.ZERO, Y3 = Fp.ZERO, Z3 = Fp.ZERO;\n let t0 = Fp.mul(X1, X1);\n let t1 = Fp.mul(Y1, Y1);\n let t22 = Fp.mul(Z1, Z1);\n let t3 = Fp.mul(X1, Y1);\n t3 = Fp.add(t3, t3);\n Z3 = Fp.mul(X1, Z1);\n Z3 = Fp.add(Z3, Z3);\n X3 = Fp.mul(a3, Z3);\n Y3 = Fp.mul(b32, t22);\n Y3 = Fp.add(X3, Y3);\n X3 = Fp.sub(t1, Y3);\n Y3 = Fp.add(t1, Y3);\n Y3 = Fp.mul(X3, Y3);\n X3 = Fp.mul(t3, X3);\n Z3 = Fp.mul(b32, Z3);\n t22 = Fp.mul(a3, t22);\n t3 = Fp.sub(t0, t22);\n t3 = Fp.mul(a3, t3);\n t3 = Fp.add(t3, Z3);\n Z3 = Fp.add(t0, t0);\n t0 = Fp.add(Z3, t0);\n t0 = Fp.add(t0, t22);\n t0 = Fp.mul(t0, t3);\n Y3 = Fp.add(Y3, t0);\n t22 = Fp.mul(Y1, Z1);\n t22 = Fp.add(t22, t22);\n t0 = Fp.mul(t22, t3);\n X3 = Fp.sub(X3, t0);\n Z3 = Fp.mul(t22, t1);\n Z3 = Fp.add(Z3, Z3);\n Z3 = Fp.add(Z3, Z3);\n return new Point3(X3, Y3, Z3);\n }\n // Renes-Costello-Batina exception-free addition formula.\n // There is 30% faster Jacobian formula, but it is not complete.\n // https://eprint.iacr.org/2015/1060, algorithm 1\n // Cost: 12M + 0S + 3*a + 3*b3 + 23add.\n add(other) {\n assertPrjPoint(other);\n const { px: X1, py: Y1, pz: Z1 } = this;\n const { px: X2, py: Y2, pz: Z2 } = other;\n let X3 = Fp.ZERO, Y3 = Fp.ZERO, Z3 = Fp.ZERO;\n const a3 = CURVE.a;\n const b32 = Fp.mul(CURVE.b, _3n5);\n let t0 = Fp.mul(X1, X2);\n let t1 = Fp.mul(Y1, Y2);\n let t22 = Fp.mul(Z1, Z2);\n let t3 = Fp.add(X1, Y1);\n let t4 = Fp.add(X2, Y2);\n t3 = Fp.mul(t3, t4);\n t4 = Fp.add(t0, t1);\n t3 = Fp.sub(t3, t4);\n t4 = Fp.add(X1, Z1);\n let t5 = Fp.add(X2, Z2);\n t4 = Fp.mul(t4, t5);\n t5 = Fp.add(t0, t22);\n t4 = Fp.sub(t4, t5);\n t5 = Fp.add(Y1, Z1);\n X3 = Fp.add(Y2, Z2);\n t5 = Fp.mul(t5, X3);\n X3 = Fp.add(t1, t22);\n t5 = Fp.sub(t5, X3);\n Z3 = Fp.mul(a3, t4);\n X3 = Fp.mul(b32, t22);\n Z3 = Fp.add(X3, Z3);\n X3 = Fp.sub(t1, Z3);\n Z3 = Fp.add(t1, Z3);\n Y3 = Fp.mul(X3, Z3);\n t1 = Fp.add(t0, t0);\n t1 = Fp.add(t1, t0);\n t22 = Fp.mul(a3, t22);\n t4 = Fp.mul(b32, t4);\n t1 = Fp.add(t1, t22);\n t22 = Fp.sub(t0, t22);\n t22 = Fp.mul(a3, t22);\n t4 = Fp.add(t4, t22);\n t0 = Fp.mul(t1, t4);\n Y3 = Fp.add(Y3, t0);\n t0 = Fp.mul(t5, t4);\n X3 = Fp.mul(t3, X3);\n X3 = Fp.sub(X3, t0);\n t0 = Fp.mul(t3, t1);\n Z3 = Fp.mul(t5, Z3);\n Z3 = Fp.add(Z3, t0);\n return new Point3(X3, Y3, Z3);\n }\n subtract(other) {\n return this.add(other.negate());\n }\n is0() {\n return this.equals(Point3.ZERO);\n }\n wNAF(n2) {\n return wnaf.wNAFCached(this, pointPrecomputes3, n2, (comp) => {\n const toInv = Fp.invertBatch(comp.map((p4) => p4.pz));\n return comp.map((p4, i3) => p4.toAffine(toInv[i3])).map(Point3.fromAffine);\n });\n }\n /**\n * Non-constant-time multiplication. Uses double-and-add algorithm.\n * It's faster, but should only be used when you don't care about\n * an exposed private key e.g. sig verification, which works over *public* keys.\n */\n multiplyUnsafe(n2) {\n const I2 = Point3.ZERO;\n if (n2 === _0n12)\n return I2;\n assertGE(n2);\n if (n2 === _1n12)\n return this;\n const { endo } = CURVE;\n if (!endo)\n return wnaf.unsafeLadder(this, n2);\n let { k1neg, k1, k2neg, k2: k22 } = endo.splitScalar(n2);\n let k1p = I2;\n let k2p = I2;\n let d5 = this;\n while (k1 > _0n12 || k22 > _0n12) {\n if (k1 & _1n12)\n k1p = k1p.add(d5);\n if (k22 & _1n12)\n k2p = k2p.add(d5);\n d5 = d5.double();\n k1 >>= _1n12;\n k22 >>= _1n12;\n }\n if (k1neg)\n k1p = k1p.negate();\n if (k2neg)\n k2p = k2p.negate();\n k2p = new Point3(Fp.mul(k2p.px, endo.beta), k2p.py, k2p.pz);\n return k1p.add(k2p);\n }\n /**\n * Constant time multiplication.\n * Uses wNAF method. Windowed method may be 10% faster,\n * but takes 2x longer to generate and consumes 2x memory.\n * Uses precomputes when available.\n * Uses endomorphism for Koblitz curves.\n * @param scalar by which the point would be multiplied\n * @returns New point\n */\n multiply(scalar) {\n assertGE(scalar);\n let n2 = scalar;\n let point, fake;\n const { endo } = CURVE;\n if (endo) {\n const { k1neg, k1, k2neg, k2: k22 } = endo.splitScalar(n2);\n let { p: k1p, f: f1p } = this.wNAF(k1);\n let { p: k2p, f: f2p } = this.wNAF(k22);\n k1p = wnaf.constTimeNegate(k1neg, k1p);\n k2p = wnaf.constTimeNegate(k2neg, k2p);\n k2p = new Point3(Fp.mul(k2p.px, endo.beta), k2p.py, k2p.pz);\n point = k1p.add(k2p);\n fake = f1p.add(f2p);\n } else {\n const { p: p4, f: f6 } = this.wNAF(n2);\n point = p4;\n fake = f6;\n }\n return Point3.normalizeZ([point, fake])[0];\n }\n /**\n * Efficiently calculate `aP + bQ`. Unsafe, can expose private key, if used incorrectly.\n * Not using Strauss-Shamir trick: precomputation tables are faster.\n * The trick could be useful if both P and Q are not G (not in our case).\n * @returns non-zero affine point\n */\n multiplyAndAddUnsafe(Q2, a3, b4) {\n const G = Point3.BASE;\n const mul = (P2, a4) => a4 === _0n12 || a4 === _1n12 || !P2.equals(G) ? P2.multiplyUnsafe(a4) : P2.multiply(a4);\n const sum = mul(this, a3).add(mul(Q2, b4));\n return sum.is0() ? void 0 : sum;\n }\n // Converts Projective point to affine (x, y) coordinates.\n // Can accept precomputed Z^-1 - for example, from invertBatch.\n // (x, y, z) ∋ (x=x/z, y=y/z)\n toAffine(iz) {\n const { px: x4, py: y6, pz: z2 } = this;\n const is0 = this.is0();\n if (iz == null)\n iz = is0 ? Fp.ONE : Fp.inv(z2);\n const ax = Fp.mul(x4, iz);\n const ay = Fp.mul(y6, iz);\n const zz = Fp.mul(z2, iz);\n if (is0)\n return { x: Fp.ZERO, y: Fp.ZERO };\n if (!Fp.eql(zz, Fp.ONE))\n throw new Error(\"invZ was invalid\");\n return { x: ax, y: ay };\n }\n isTorsionFree() {\n const { h: cofactor, isTorsionFree } = CURVE;\n if (cofactor === _1n12)\n return true;\n if (isTorsionFree)\n return isTorsionFree(Point3, this);\n throw new Error(\"isTorsionFree() has not been declared for the elliptic curve\");\n }\n clearCofactor() {\n const { h: cofactor, clearCofactor } = CURVE;\n if (cofactor === _1n12)\n return this;\n if (clearCofactor)\n return clearCofactor(Point3, this);\n return this.multiplyUnsafe(CURVE.h);\n }\n toRawBytes(isCompressed = true) {\n this.assertValidity();\n return toBytes5(Point3, this, isCompressed);\n }\n toHex(isCompressed = true) {\n return ut.bytesToHex(this.toRawBytes(isCompressed));\n }\n }\n Point3.BASE = new Point3(CURVE.Gx, CURVE.Gy, Fp.ONE);\n Point3.ZERO = new Point3(Fp.ZERO, Fp.ONE, Fp.ZERO);\n const _bits = CURVE.nBitLength;\n const wnaf = (0, curve_js_1.wNAF)(Point3, CURVE.endo ? Math.ceil(_bits / 2) : _bits);\n return {\n CURVE,\n ProjectivePoint: Point3,\n normPrivateKeyToScalar,\n weierstrassEquation,\n isWithinCurveOrder\n };\n }\n exports3.weierstrassPoints = weierstrassPoints2;\n function validateOpts2(curve) {\n const opts = (0, curve_js_1.validateBasic)(curve);\n ut.validateObject(opts, {\n hash: \"hash\",\n hmac: \"function\",\n randomBytes: \"function\"\n }, {\n bits2int: \"function\",\n bits2int_modN: \"function\",\n lowS: \"boolean\"\n });\n return Object.freeze({ lowS: true, ...opts });\n }\n function weierstrass3(curveDef) {\n const CURVE = validateOpts2(curveDef);\n const { Fp, n: CURVE_ORDER } = CURVE;\n const compressedLen = Fp.BYTES + 1;\n const uncompressedLen = 2 * Fp.BYTES + 1;\n function isValidFieldElement(num2) {\n return _0n12 < num2 && num2 < Fp.ORDER;\n }\n function modN2(a3) {\n return mod3.mod(a3, CURVE_ORDER);\n }\n function invN(a3) {\n return mod3.invert(a3, CURVE_ORDER);\n }\n const { ProjectivePoint: Point3, normPrivateKeyToScalar, weierstrassEquation, isWithinCurveOrder } = weierstrassPoints2({\n ...CURVE,\n toBytes(_c, point, isCompressed) {\n const a3 = point.toAffine();\n const x4 = Fp.toBytes(a3.x);\n const cat = ut.concatBytes;\n if (isCompressed) {\n return cat(Uint8Array.from([point.hasEvenY() ? 2 : 3]), x4);\n } else {\n return cat(Uint8Array.from([4]), x4, Fp.toBytes(a3.y));\n }\n },\n fromBytes(bytes) {\n const len = bytes.length;\n const head = bytes[0];\n const tail = bytes.subarray(1);\n if (len === compressedLen && (head === 2 || head === 3)) {\n const x4 = ut.bytesToNumberBE(tail);\n if (!isValidFieldElement(x4))\n throw new Error(\"Point is not on curve\");\n const y22 = weierstrassEquation(x4);\n let y6 = Fp.sqrt(y22);\n const isYOdd = (y6 & _1n12) === _1n12;\n const isHeadOdd = (head & 1) === 1;\n if (isHeadOdd !== isYOdd)\n y6 = Fp.neg(y6);\n return { x: x4, y: y6 };\n } else if (len === uncompressedLen && head === 4) {\n const x4 = Fp.fromBytes(tail.subarray(0, Fp.BYTES));\n const y6 = Fp.fromBytes(tail.subarray(Fp.BYTES, 2 * Fp.BYTES));\n return { x: x4, y: y6 };\n } else {\n throw new Error(`Point of length ${len} was invalid. Expected ${compressedLen} compressed bytes or ${uncompressedLen} uncompressed bytes`);\n }\n }\n });\n const numToNByteStr = (num2) => ut.bytesToHex(ut.numberToBytesBE(num2, CURVE.nByteLength));\n function isBiggerThanHalfOrder(number2) {\n const HALF = CURVE_ORDER >> _1n12;\n return number2 > HALF;\n }\n function normalizeS(s4) {\n return isBiggerThanHalfOrder(s4) ? modN2(-s4) : s4;\n }\n const slcNum = (b4, from14, to) => ut.bytesToNumberBE(b4.slice(from14, to));\n class Signature2 {\n constructor(r2, s4, recovery) {\n this.r = r2;\n this.s = s4;\n this.recovery = recovery;\n this.assertValidity();\n }\n // pair (bytes of r, bytes of s)\n static fromCompact(hex) {\n const l6 = CURVE.nByteLength;\n hex = (0, utils_js_1.ensureBytes)(\"compactSignature\", hex, l6 * 2);\n return new Signature2(slcNum(hex, 0, l6), slcNum(hex, l6, 2 * l6));\n }\n // DER encoded ECDSA signature\n // https://bitcoin.stackexchange.com/questions/57644/what-are-the-parts-of-a-bitcoin-transaction-input-script\n static fromDER(hex) {\n const { r: r2, s: s4 } = exports3.DER.toSig((0, utils_js_1.ensureBytes)(\"DER\", hex));\n return new Signature2(r2, s4);\n }\n assertValidity() {\n if (!isWithinCurveOrder(this.r))\n throw new Error(\"r must be 0 < r < CURVE.n\");\n if (!isWithinCurveOrder(this.s))\n throw new Error(\"s must be 0 < s < CURVE.n\");\n }\n addRecoveryBit(recovery) {\n return new Signature2(this.r, this.s, recovery);\n }\n recoverPublicKey(msgHash) {\n const { r: r2, s: s4, recovery: rec } = this;\n const h4 = bits2int_modN((0, utils_js_1.ensureBytes)(\"msgHash\", msgHash));\n if (rec == null || ![0, 1, 2, 3].includes(rec))\n throw new Error(\"recovery id invalid\");\n const radj = rec === 2 || rec === 3 ? r2 + CURVE.n : r2;\n if (radj >= Fp.ORDER)\n throw new Error(\"recovery id 2 or 3 invalid\");\n const prefix = (rec & 1) === 0 ? \"02\" : \"03\";\n const R3 = Point3.fromHex(prefix + numToNByteStr(radj));\n const ir = invN(radj);\n const u1 = modN2(-h4 * ir);\n const u2 = modN2(s4 * ir);\n const Q2 = Point3.BASE.multiplyAndAddUnsafe(R3, u1, u2);\n if (!Q2)\n throw new Error(\"point at infinify\");\n Q2.assertValidity();\n return Q2;\n }\n // Signatures should be low-s, to prevent malleability.\n hasHighS() {\n return isBiggerThanHalfOrder(this.s);\n }\n normalizeS() {\n return this.hasHighS() ? new Signature2(this.r, modN2(-this.s), this.recovery) : this;\n }\n // DER-encoded\n toDERRawBytes() {\n return ut.hexToBytes(this.toDERHex());\n }\n toDERHex() {\n return exports3.DER.hexFromSig({ r: this.r, s: this.s });\n }\n // padded bytes of r, then padded bytes of s\n toCompactRawBytes() {\n return ut.hexToBytes(this.toCompactHex());\n }\n toCompactHex() {\n return numToNByteStr(this.r) + numToNByteStr(this.s);\n }\n }\n const utils = {\n isValidPrivateKey(privateKey) {\n try {\n normPrivateKeyToScalar(privateKey);\n return true;\n } catch (error) {\n return false;\n }\n },\n normPrivateKeyToScalar,\n /**\n * Produces cryptographically secure private key from random of size\n * (groupLen + ceil(groupLen / 2)) with modulo bias being negligible.\n */\n randomPrivateKey: () => {\n const length2 = mod3.getMinHashLength(CURVE.n);\n return mod3.mapHashToField(CURVE.randomBytes(length2), CURVE.n);\n },\n /**\n * Creates precompute table for an arbitrary EC point. Makes point \"cached\".\n * Allows to massively speed-up `point.multiply(scalar)`.\n * @returns cached point\n * @example\n * const fast = utils.precompute(8, ProjectivePoint.fromHex(someonesPubKey));\n * fast.multiply(privKey); // much faster ECDH now\n */\n precompute(windowSize = 8, point = Point3.BASE) {\n point._setWindowSize(windowSize);\n point.multiply(BigInt(3));\n return point;\n }\n };\n function getPublicKey(privateKey, isCompressed = true) {\n return Point3.fromPrivateKey(privateKey).toRawBytes(isCompressed);\n }\n function isProbPub(item) {\n const arr = item instanceof Uint8Array;\n const str = typeof item === \"string\";\n const len = (arr || str) && item.length;\n if (arr)\n return len === compressedLen || len === uncompressedLen;\n if (str)\n return len === 2 * compressedLen || len === 2 * uncompressedLen;\n if (item instanceof Point3)\n return true;\n return false;\n }\n function getSharedSecret(privateA, publicB, isCompressed = true) {\n if (isProbPub(privateA))\n throw new Error(\"first arg must be private key\");\n if (!isProbPub(publicB))\n throw new Error(\"second arg must be public key\");\n const b4 = Point3.fromHex(publicB);\n return b4.multiply(normPrivateKeyToScalar(privateA)).toRawBytes(isCompressed);\n }\n const bits2int = CURVE.bits2int || function(bytes) {\n const num2 = ut.bytesToNumberBE(bytes);\n const delta = bytes.length * 8 - CURVE.nBitLength;\n return delta > 0 ? num2 >> BigInt(delta) : num2;\n };\n const bits2int_modN = CURVE.bits2int_modN || function(bytes) {\n return modN2(bits2int(bytes));\n };\n const ORDER_MASK = ut.bitMask(CURVE.nBitLength);\n function int2octets(num2) {\n if (typeof num2 !== \"bigint\")\n throw new Error(\"bigint expected\");\n if (!(_0n12 <= num2 && num2 < ORDER_MASK))\n throw new Error(`bigint expected < 2^${CURVE.nBitLength}`);\n return ut.numberToBytesBE(num2, CURVE.nByteLength);\n }\n function prepSig(msgHash, privateKey, opts = defaultSigOpts) {\n if ([\"recovered\", \"canonical\"].some((k4) => k4 in opts))\n throw new Error(\"sign() legacy options not supported\");\n const { hash: hash3, randomBytes: randomBytes2 } = CURVE;\n let { lowS, prehash, extraEntropy: ent } = opts;\n if (lowS == null)\n lowS = true;\n msgHash = (0, utils_js_1.ensureBytes)(\"msgHash\", msgHash);\n if (prehash)\n msgHash = (0, utils_js_1.ensureBytes)(\"prehashed msgHash\", hash3(msgHash));\n const h1int = bits2int_modN(msgHash);\n const d5 = normPrivateKeyToScalar(privateKey);\n const seedArgs = [int2octets(d5), int2octets(h1int)];\n if (ent != null) {\n const e3 = ent === true ? randomBytes2(Fp.BYTES) : ent;\n seedArgs.push((0, utils_js_1.ensureBytes)(\"extraEntropy\", e3));\n }\n const seed = ut.concatBytes(...seedArgs);\n const m2 = h1int;\n function k2sig(kBytes) {\n const k4 = bits2int(kBytes);\n if (!isWithinCurveOrder(k4))\n return;\n const ik = invN(k4);\n const q3 = Point3.BASE.multiply(k4).toAffine();\n const r2 = modN2(q3.x);\n if (r2 === _0n12)\n return;\n const s4 = modN2(ik * modN2(m2 + r2 * d5));\n if (s4 === _0n12)\n return;\n let recovery = (q3.x === r2 ? 0 : 2) | Number(q3.y & _1n12);\n let normS = s4;\n if (lowS && isBiggerThanHalfOrder(s4)) {\n normS = normalizeS(s4);\n recovery ^= 1;\n }\n return new Signature2(r2, normS, recovery);\n }\n return { seed, k2sig };\n }\n const defaultSigOpts = { lowS: CURVE.lowS, prehash: false };\n const defaultVerOpts = { lowS: CURVE.lowS, prehash: false };\n function sign3(msgHash, privKey, opts = defaultSigOpts) {\n const { seed, k2sig } = prepSig(msgHash, privKey, opts);\n const C = CURVE;\n const drbg = ut.createHmacDrbg(C.hash.outputLen, C.nByteLength, C.hmac);\n return drbg(seed, k2sig);\n }\n Point3.BASE._setWindowSize(8);\n function verify(signature, msgHash, publicKey, opts = defaultVerOpts) {\n const sg = signature;\n msgHash = (0, utils_js_1.ensureBytes)(\"msgHash\", msgHash);\n publicKey = (0, utils_js_1.ensureBytes)(\"publicKey\", publicKey);\n if (\"strict\" in opts)\n throw new Error(\"options.strict was renamed to lowS\");\n const { lowS, prehash } = opts;\n let _sig = void 0;\n let P2;\n try {\n if (typeof sg === \"string\" || sg instanceof Uint8Array) {\n try {\n _sig = Signature2.fromDER(sg);\n } catch (derError) {\n if (!(derError instanceof exports3.DER.Err))\n throw derError;\n _sig = Signature2.fromCompact(sg);\n }\n } else if (typeof sg === \"object\" && typeof sg.r === \"bigint\" && typeof sg.s === \"bigint\") {\n const { r: r3, s: s5 } = sg;\n _sig = new Signature2(r3, s5);\n } else {\n throw new Error(\"PARSE\");\n }\n P2 = Point3.fromHex(publicKey);\n } catch (error) {\n if (error.message === \"PARSE\")\n throw new Error(`signature must be Signature instance, Uint8Array or hex string`);\n return false;\n }\n if (lowS && _sig.hasHighS())\n return false;\n if (prehash)\n msgHash = CURVE.hash(msgHash);\n const { r: r2, s: s4 } = _sig;\n const h4 = bits2int_modN(msgHash);\n const is = invN(s4);\n const u1 = modN2(h4 * is);\n const u2 = modN2(r2 * is);\n const R3 = Point3.BASE.multiplyAndAddUnsafe(P2, u1, u2)?.toAffine();\n if (!R3)\n return false;\n const v2 = modN2(R3.x);\n return v2 === r2;\n }\n return {\n CURVE,\n getPublicKey,\n getSharedSecret,\n sign: sign3,\n verify,\n ProjectivePoint: Point3,\n Signature: Signature2,\n utils\n };\n }\n exports3.weierstrass = weierstrass3;\n function SWUFpSqrtRatio2(Fp, Z2) {\n const q3 = Fp.ORDER;\n let l6 = _0n12;\n for (let o5 = q3 - _1n12; o5 % _2n9 === _0n12; o5 /= _2n9)\n l6 += _1n12;\n const c1 = l6;\n const _2n_pow_c1_1 = _2n9 << c1 - _1n12 - _1n12;\n const _2n_pow_c1 = _2n_pow_c1_1 * _2n9;\n const c22 = (q3 - _1n12) / _2n_pow_c1;\n const c32 = (c22 - _1n12) / _2n9;\n const c4 = _2n_pow_c1 - _1n12;\n const c5 = _2n_pow_c1_1;\n const c6 = Fp.pow(Z2, c22);\n const c7 = Fp.pow(Z2, (c22 + _1n12) / _2n9);\n let sqrtRatio = (u2, v2) => {\n let tv1 = c6;\n let tv2 = Fp.pow(v2, c4);\n let tv3 = Fp.sqr(tv2);\n tv3 = Fp.mul(tv3, v2);\n let tv5 = Fp.mul(u2, tv3);\n tv5 = Fp.pow(tv5, c32);\n tv5 = Fp.mul(tv5, tv2);\n tv2 = Fp.mul(tv5, v2);\n tv3 = Fp.mul(tv5, u2);\n let tv4 = Fp.mul(tv3, tv2);\n tv5 = Fp.pow(tv4, c5);\n let isQR = Fp.eql(tv5, Fp.ONE);\n tv2 = Fp.mul(tv3, c7);\n tv5 = Fp.mul(tv4, tv1);\n tv3 = Fp.cmov(tv2, tv3, isQR);\n tv4 = Fp.cmov(tv5, tv4, isQR);\n for (let i3 = c1; i3 > _1n12; i3--) {\n let tv52 = i3 - _2n9;\n tv52 = _2n9 << tv52 - _1n12;\n let tvv5 = Fp.pow(tv4, tv52);\n const e1 = Fp.eql(tvv5, Fp.ONE);\n tv2 = Fp.mul(tv3, tv1);\n tv1 = Fp.mul(tv1, tv1);\n tvv5 = Fp.mul(tv4, tv1);\n tv3 = Fp.cmov(tv2, tv3, e1);\n tv4 = Fp.cmov(tvv5, tv4, e1);\n }\n return { isValid: isQR, value: tv3 };\n };\n if (Fp.ORDER % _4n5 === _3n5) {\n const c12 = (Fp.ORDER - _3n5) / _4n5;\n const c23 = Fp.sqrt(Fp.neg(Z2));\n sqrtRatio = (u2, v2) => {\n let tv1 = Fp.sqr(v2);\n const tv2 = Fp.mul(u2, v2);\n tv1 = Fp.mul(tv1, tv2);\n let y1 = Fp.pow(tv1, c12);\n y1 = Fp.mul(y1, tv2);\n const y22 = Fp.mul(y1, c23);\n const tv3 = Fp.mul(Fp.sqr(y1), v2);\n const isQR = Fp.eql(tv3, u2);\n let y6 = Fp.cmov(y22, y1, isQR);\n return { isValid: isQR, value: y6 };\n };\n }\n return sqrtRatio;\n }\n exports3.SWUFpSqrtRatio = SWUFpSqrtRatio2;\n function mapToCurveSimpleSWU2(Fp, opts) {\n mod3.validateField(Fp);\n if (!Fp.isValid(opts.A) || !Fp.isValid(opts.B) || !Fp.isValid(opts.Z))\n throw new Error(\"mapToCurveSimpleSWU: invalid opts\");\n const sqrtRatio = SWUFpSqrtRatio2(Fp, opts.Z);\n if (!Fp.isOdd)\n throw new Error(\"Fp.isOdd is not implemented!\");\n return (u2) => {\n let tv1, tv2, tv3, tv4, tv5, tv6, x4, y6;\n tv1 = Fp.sqr(u2);\n tv1 = Fp.mul(tv1, opts.Z);\n tv2 = Fp.sqr(tv1);\n tv2 = Fp.add(tv2, tv1);\n tv3 = Fp.add(tv2, Fp.ONE);\n tv3 = Fp.mul(tv3, opts.B);\n tv4 = Fp.cmov(opts.Z, Fp.neg(tv2), !Fp.eql(tv2, Fp.ZERO));\n tv4 = Fp.mul(tv4, opts.A);\n tv2 = Fp.sqr(tv3);\n tv6 = Fp.sqr(tv4);\n tv5 = Fp.mul(tv6, opts.A);\n tv2 = Fp.add(tv2, tv5);\n tv2 = Fp.mul(tv2, tv3);\n tv6 = Fp.mul(tv6, tv4);\n tv5 = Fp.mul(tv6, opts.B);\n tv2 = Fp.add(tv2, tv5);\n x4 = Fp.mul(tv1, tv3);\n const { isValid: isValid2, value } = sqrtRatio(tv2, tv6);\n y6 = Fp.mul(tv1, u2);\n y6 = Fp.mul(y6, value);\n x4 = Fp.cmov(x4, tv3, isValid2);\n y6 = Fp.cmov(y6, value, isValid2);\n const e1 = Fp.isOdd(u2) === Fp.isOdd(y6);\n y6 = Fp.cmov(Fp.neg(y6), y6, e1);\n x4 = Fp.div(x4, tv4);\n return { x: x4, y: y6 };\n };\n }\n exports3.mapToCurveSimpleSWU = mapToCurveSimpleSWU2;\n }\n });\n\n // ../../../node_modules/.pnpm/@noble+curves@1.2.0/node_modules/@noble/curves/abstract/hash-to-curve.js\n var require_hash_to_curve = __commonJS({\n \"../../../node_modules/.pnpm/@noble+curves@1.2.0/node_modules/@noble/curves/abstract/hash-to-curve.js\"(exports3) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n Object.defineProperty(exports3, \"__esModule\", { value: true });\n exports3.createHasher = exports3.isogenyMap = exports3.hash_to_field = exports3.expand_message_xof = exports3.expand_message_xmd = void 0;\n var modular_js_1 = require_modular();\n var utils_js_1 = require_utils10();\n function validateDST(dst) {\n if (dst instanceof Uint8Array)\n return dst;\n if (typeof dst === \"string\")\n return (0, utils_js_1.utf8ToBytes)(dst);\n throw new Error(\"DST must be Uint8Array or string\");\n }\n var os2ip2 = utils_js_1.bytesToNumberBE;\n function i2osp2(value, length2) {\n if (value < 0 || value >= 1 << 8 * length2) {\n throw new Error(`bad I2OSP call: value=${value} length=${length2}`);\n }\n const res = Array.from({ length: length2 }).fill(0);\n for (let i3 = length2 - 1; i3 >= 0; i3--) {\n res[i3] = value & 255;\n value >>>= 8;\n }\n return new Uint8Array(res);\n }\n function strxor2(a3, b4) {\n const arr = new Uint8Array(a3.length);\n for (let i3 = 0; i3 < a3.length; i3++) {\n arr[i3] = a3[i3] ^ b4[i3];\n }\n return arr;\n }\n function isBytes6(item) {\n if (!(item instanceof Uint8Array))\n throw new Error(\"Uint8Array expected\");\n }\n function isNum(item) {\n if (!Number.isSafeInteger(item))\n throw new Error(\"number expected\");\n }\n function expand_message_xmd2(msg, DST, lenInBytes, H3) {\n isBytes6(msg);\n isBytes6(DST);\n isNum(lenInBytes);\n if (DST.length > 255)\n DST = H3((0, utils_js_1.concatBytes)((0, utils_js_1.utf8ToBytes)(\"H2C-OVERSIZE-DST-\"), DST));\n const { outputLen: b_in_bytes, blockLen: r_in_bytes } = H3;\n const ell = Math.ceil(lenInBytes / b_in_bytes);\n if (ell > 255)\n throw new Error(\"Invalid xmd length\");\n const DST_prime = (0, utils_js_1.concatBytes)(DST, i2osp2(DST.length, 1));\n const Z_pad = i2osp2(0, r_in_bytes);\n const l_i_b_str = i2osp2(lenInBytes, 2);\n const b4 = new Array(ell);\n const b_0 = H3((0, utils_js_1.concatBytes)(Z_pad, msg, l_i_b_str, i2osp2(0, 1), DST_prime));\n b4[0] = H3((0, utils_js_1.concatBytes)(b_0, i2osp2(1, 1), DST_prime));\n for (let i3 = 1; i3 <= ell; i3++) {\n const args = [strxor2(b_0, b4[i3 - 1]), i2osp2(i3 + 1, 1), DST_prime];\n b4[i3] = H3((0, utils_js_1.concatBytes)(...args));\n }\n const pseudo_random_bytes = (0, utils_js_1.concatBytes)(...b4);\n return pseudo_random_bytes.slice(0, lenInBytes);\n }\n exports3.expand_message_xmd = expand_message_xmd2;\n function expand_message_xof2(msg, DST, lenInBytes, k4, H3) {\n isBytes6(msg);\n isBytes6(DST);\n isNum(lenInBytes);\n if (DST.length > 255) {\n const dkLen = Math.ceil(2 * k4 / 8);\n DST = H3.create({ dkLen }).update((0, utils_js_1.utf8ToBytes)(\"H2C-OVERSIZE-DST-\")).update(DST).digest();\n }\n if (lenInBytes > 65535 || DST.length > 255)\n throw new Error(\"expand_message_xof: invalid lenInBytes\");\n return H3.create({ dkLen: lenInBytes }).update(msg).update(i2osp2(lenInBytes, 2)).update(DST).update(i2osp2(DST.length, 1)).digest();\n }\n exports3.expand_message_xof = expand_message_xof2;\n function hash_to_field2(msg, count, options) {\n (0, utils_js_1.validateObject)(options, {\n DST: \"stringOrUint8Array\",\n p: \"bigint\",\n m: \"isSafeInteger\",\n k: \"isSafeInteger\",\n hash: \"hash\"\n });\n const { p: p4, k: k4, m: m2, hash: hash3, expand, DST: _DST } = options;\n isBytes6(msg);\n isNum(count);\n const DST = validateDST(_DST);\n const log2p = p4.toString(2).length;\n const L2 = Math.ceil((log2p + k4) / 8);\n const len_in_bytes = count * m2 * L2;\n let prb;\n if (expand === \"xmd\") {\n prb = expand_message_xmd2(msg, DST, len_in_bytes, hash3);\n } else if (expand === \"xof\") {\n prb = expand_message_xof2(msg, DST, len_in_bytes, k4, hash3);\n } else if (expand === \"_internal_pass\") {\n prb = msg;\n } else {\n throw new Error('expand must be \"xmd\" or \"xof\"');\n }\n const u2 = new Array(count);\n for (let i3 = 0; i3 < count; i3++) {\n const e3 = new Array(m2);\n for (let j2 = 0; j2 < m2; j2++) {\n const elm_offset = L2 * (j2 + i3 * m2);\n const tv = prb.subarray(elm_offset, elm_offset + L2);\n e3[j2] = (0, modular_js_1.mod)(os2ip2(tv), p4);\n }\n u2[i3] = e3;\n }\n return u2;\n }\n exports3.hash_to_field = hash_to_field2;\n function isogenyMap2(field, map) {\n const COEFF = map.map((i3) => Array.from(i3).reverse());\n return (x4, y6) => {\n const [xNum, xDen, yNum, yDen] = COEFF.map((val) => val.reduce((acc, i3) => field.add(field.mul(acc, x4), i3)));\n x4 = field.div(xNum, xDen);\n y6 = field.mul(y6, field.div(yNum, yDen));\n return { x: x4, y: y6 };\n };\n }\n exports3.isogenyMap = isogenyMap2;\n function createHasher4(Point3, mapToCurve, def) {\n if (typeof mapToCurve !== \"function\")\n throw new Error(\"mapToCurve() must be defined\");\n return {\n // Encodes byte string to elliptic curve.\n // hash_to_curve from https://www.rfc-editor.org/rfc/rfc9380#section-3\n hashToCurve(msg, options) {\n const u2 = hash_to_field2(msg, 2, { ...def, DST: def.DST, ...options });\n const u0 = Point3.fromAffine(mapToCurve(u2[0]));\n const u1 = Point3.fromAffine(mapToCurve(u2[1]));\n const P2 = u0.add(u1).clearCofactor();\n P2.assertValidity();\n return P2;\n },\n // Encodes byte string to elliptic curve.\n // encode_to_curve from https://www.rfc-editor.org/rfc/rfc9380#section-3\n encodeToCurve(msg, options) {\n const u2 = hash_to_field2(msg, 1, { ...def, DST: def.encodeDST, ...options });\n const P2 = Point3.fromAffine(mapToCurve(u2[0])).clearCofactor();\n P2.assertValidity();\n return P2;\n }\n };\n }\n exports3.createHasher = createHasher4;\n }\n });\n\n // ../../../node_modules/.pnpm/@noble+curves@1.2.0/node_modules/@noble/curves/_shortw_utils.js\n var require_shortw_utils = __commonJS({\n \"../../../node_modules/.pnpm/@noble+curves@1.2.0/node_modules/@noble/curves/_shortw_utils.js\"(exports3) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n Object.defineProperty(exports3, \"__esModule\", { value: true });\n exports3.createCurve = exports3.getHash = void 0;\n var hmac_1 = require_hmac2();\n var utils_1 = require_utils9();\n var weierstrass_js_1 = require_weierstrass();\n function getHash2(hash3) {\n return {\n hash: hash3,\n hmac: (key, ...msgs) => (0, hmac_1.hmac)(hash3, key, (0, utils_1.concatBytes)(...msgs)),\n randomBytes: utils_1.randomBytes\n };\n }\n exports3.getHash = getHash2;\n function createCurve3(curveDef, defHash) {\n const create2 = (hash3) => (0, weierstrass_js_1.weierstrass)({ ...curveDef, ...getHash2(hash3) });\n return Object.freeze({ ...create2(defHash), create: create2 });\n }\n exports3.createCurve = createCurve3;\n }\n });\n\n // ../../../node_modules/.pnpm/@noble+curves@1.2.0/node_modules/@noble/curves/secp256k1.js\n var require_secp256k12 = __commonJS({\n \"../../../node_modules/.pnpm/@noble+curves@1.2.0/node_modules/@noble/curves/secp256k1.js\"(exports3) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n Object.defineProperty(exports3, \"__esModule\", { value: true });\n exports3.encodeToCurve = exports3.hashToCurve = exports3.schnorr = exports3.secp256k1 = void 0;\n var sha256_1 = require_sha256();\n var utils_1 = require_utils9();\n var modular_js_1 = require_modular();\n var weierstrass_js_1 = require_weierstrass();\n var utils_js_1 = require_utils10();\n var hash_to_curve_js_1 = require_hash_to_curve();\n var _shortw_utils_js_1 = require_shortw_utils();\n var secp256k1P2 = BigInt(\"0xfffffffffffffffffffffffffffffffffffffffffffffffffffffffefffffc2f\");\n var secp256k1N2 = BigInt(\"0xfffffffffffffffffffffffffffffffebaaedce6af48a03bbfd25e8cd0364141\");\n var _1n12 = BigInt(1);\n var _2n9 = BigInt(2);\n var divNearest3 = (a3, b4) => (a3 + b4 / _2n9) / b4;\n function sqrtMod3(y6) {\n const P2 = secp256k1P2;\n const _3n5 = BigInt(3), _6n = BigInt(6), _11n = BigInt(11), _22n = BigInt(22);\n const _23n = BigInt(23), _44n = BigInt(44), _88n = BigInt(88);\n const b22 = y6 * y6 * y6 % P2;\n const b32 = b22 * b22 * y6 % P2;\n const b6 = (0, modular_js_1.pow2)(b32, _3n5, P2) * b32 % P2;\n const b9 = (0, modular_js_1.pow2)(b6, _3n5, P2) * b32 % P2;\n const b11 = (0, modular_js_1.pow2)(b9, _2n9, P2) * b22 % P2;\n const b222 = (0, modular_js_1.pow2)(b11, _11n, P2) * b11 % P2;\n const b44 = (0, modular_js_1.pow2)(b222, _22n, P2) * b222 % P2;\n const b88 = (0, modular_js_1.pow2)(b44, _44n, P2) * b44 % P2;\n const b176 = (0, modular_js_1.pow2)(b88, _88n, P2) * b88 % P2;\n const b220 = (0, modular_js_1.pow2)(b176, _44n, P2) * b44 % P2;\n const b223 = (0, modular_js_1.pow2)(b220, _3n5, P2) * b32 % P2;\n const t1 = (0, modular_js_1.pow2)(b223, _23n, P2) * b222 % P2;\n const t22 = (0, modular_js_1.pow2)(t1, _6n, P2) * b22 % P2;\n const root = (0, modular_js_1.pow2)(t22, _2n9, P2);\n if (!Fp.eql(Fp.sqr(root), y6))\n throw new Error(\"Cannot find square root\");\n return root;\n }\n var Fp = (0, modular_js_1.Field)(secp256k1P2, void 0, void 0, { sqrt: sqrtMod3 });\n exports3.secp256k1 = (0, _shortw_utils_js_1.createCurve)({\n a: BigInt(0),\n b: BigInt(7),\n Fp,\n n: secp256k1N2,\n // Base point (x, y) aka generator point\n Gx: BigInt(\"55066263022277343669578718895168534326250603453777594175500187360389116729240\"),\n Gy: BigInt(\"32670510020758816978083085130507043184471273380659243275938904335757337482424\"),\n h: BigInt(1),\n lowS: true,\n /**\n * secp256k1 belongs to Koblitz curves: it has efficiently computable endomorphism.\n * Endomorphism uses 2x less RAM, speeds up precomputation by 2x and ECDH / key recovery by 20%.\n * For precomputed wNAF it trades off 1/2 init time & 1/3 ram for 20% perf hit.\n * Explanation: https://gist.github.com/paulmillr/eb670806793e84df628a7c434a873066\n */\n endo: {\n beta: BigInt(\"0x7ae96a2b657c07106e64479eac3434e99cf0497512f58995c1396c28719501ee\"),\n splitScalar: (k4) => {\n const n2 = secp256k1N2;\n const a1 = BigInt(\"0x3086d221a7d46bcde86c90e49284eb15\");\n const b1 = -_1n12 * BigInt(\"0xe4437ed6010e88286f547fa90abfe4c3\");\n const a22 = BigInt(\"0x114ca50f7a8e2f3f657c1108d9d44cfd8\");\n const b22 = a1;\n const POW_2_128 = BigInt(\"0x100000000000000000000000000000000\");\n const c1 = divNearest3(b22 * k4, n2);\n const c22 = divNearest3(-b1 * k4, n2);\n let k1 = (0, modular_js_1.mod)(k4 - c1 * a1 - c22 * a22, n2);\n let k22 = (0, modular_js_1.mod)(-c1 * b1 - c22 * b22, n2);\n const k1neg = k1 > POW_2_128;\n const k2neg = k22 > POW_2_128;\n if (k1neg)\n k1 = n2 - k1;\n if (k2neg)\n k22 = n2 - k22;\n if (k1 > POW_2_128 || k22 > POW_2_128) {\n throw new Error(\"splitScalar: Endomorphism failed, k=\" + k4);\n }\n return { k1neg, k1, k2neg, k2: k22 };\n }\n }\n }, sha256_1.sha256);\n var _0n12 = BigInt(0);\n var fe = (x4) => typeof x4 === \"bigint\" && _0n12 < x4 && x4 < secp256k1P2;\n var ge = (x4) => typeof x4 === \"bigint\" && _0n12 < x4 && x4 < secp256k1N2;\n var TAGGED_HASH_PREFIXES2 = {};\n function taggedHash2(tag, ...messages) {\n let tagP = TAGGED_HASH_PREFIXES2[tag];\n if (tagP === void 0) {\n const tagH = (0, sha256_1.sha256)(Uint8Array.from(tag, (c4) => c4.charCodeAt(0)));\n tagP = (0, utils_js_1.concatBytes)(tagH, tagH);\n TAGGED_HASH_PREFIXES2[tag] = tagP;\n }\n return (0, sha256_1.sha256)((0, utils_js_1.concatBytes)(tagP, ...messages));\n }\n var pointToBytes2 = (point) => point.toRawBytes(true).slice(1);\n var numTo32b2 = (n2) => (0, utils_js_1.numberToBytesBE)(n2, 32);\n var modP2 = (x4) => (0, modular_js_1.mod)(x4, secp256k1P2);\n var modN2 = (x4) => (0, modular_js_1.mod)(x4, secp256k1N2);\n var Point3 = exports3.secp256k1.ProjectivePoint;\n var GmulAdd2 = (Q2, a3, b4) => Point3.BASE.multiplyAndAddUnsafe(Q2, a3, b4);\n function schnorrGetExtPubKey2(priv) {\n let d_ = exports3.secp256k1.utils.normPrivateKeyToScalar(priv);\n let p4 = Point3.fromPrivateKey(d_);\n const scalar = p4.hasEvenY() ? d_ : modN2(-d_);\n return { scalar, bytes: pointToBytes2(p4) };\n }\n function lift_x2(x4) {\n if (!fe(x4))\n throw new Error(\"bad x: need 0 < x < p\");\n const xx = modP2(x4 * x4);\n const c4 = modP2(xx * x4 + BigInt(7));\n let y6 = sqrtMod3(c4);\n if (y6 % _2n9 !== _0n12)\n y6 = modP2(-y6);\n const p4 = new Point3(x4, y6, _1n12);\n p4.assertValidity();\n return p4;\n }\n function challenge2(...args) {\n return modN2((0, utils_js_1.bytesToNumberBE)(taggedHash2(\"BIP0340/challenge\", ...args)));\n }\n function schnorrGetPublicKey2(privateKey) {\n return schnorrGetExtPubKey2(privateKey).bytes;\n }\n function schnorrSign2(message, privateKey, auxRand = (0, utils_1.randomBytes)(32)) {\n const m2 = (0, utils_js_1.ensureBytes)(\"message\", message);\n const { bytes: px, scalar: d5 } = schnorrGetExtPubKey2(privateKey);\n const a3 = (0, utils_js_1.ensureBytes)(\"auxRand\", auxRand, 32);\n const t3 = numTo32b2(d5 ^ (0, utils_js_1.bytesToNumberBE)(taggedHash2(\"BIP0340/aux\", a3)));\n const rand = taggedHash2(\"BIP0340/nonce\", t3, px, m2);\n const k_ = modN2((0, utils_js_1.bytesToNumberBE)(rand));\n if (k_ === _0n12)\n throw new Error(\"sign failed: k is zero\");\n const { bytes: rx, scalar: k4 } = schnorrGetExtPubKey2(k_);\n const e3 = challenge2(rx, px, m2);\n const sig = new Uint8Array(64);\n sig.set(rx, 0);\n sig.set(numTo32b2(modN2(k4 + e3 * d5)), 32);\n if (!schnorrVerify2(sig, m2, px))\n throw new Error(\"sign: Invalid signature produced\");\n return sig;\n }\n function schnorrVerify2(signature, message, publicKey) {\n const sig = (0, utils_js_1.ensureBytes)(\"signature\", signature, 64);\n const m2 = (0, utils_js_1.ensureBytes)(\"message\", message);\n const pub = (0, utils_js_1.ensureBytes)(\"publicKey\", publicKey, 32);\n try {\n const P2 = lift_x2((0, utils_js_1.bytesToNumberBE)(pub));\n const r2 = (0, utils_js_1.bytesToNumberBE)(sig.subarray(0, 32));\n if (!fe(r2))\n return false;\n const s4 = (0, utils_js_1.bytesToNumberBE)(sig.subarray(32, 64));\n if (!ge(s4))\n return false;\n const e3 = challenge2(numTo32b2(r2), pointToBytes2(P2), m2);\n const R3 = GmulAdd2(P2, s4, modN2(-e3));\n if (!R3 || !R3.hasEvenY() || R3.toAffine().x !== r2)\n return false;\n return true;\n } catch (error) {\n return false;\n }\n }\n exports3.schnorr = (() => ({\n getPublicKey: schnorrGetPublicKey2,\n sign: schnorrSign2,\n verify: schnorrVerify2,\n utils: {\n randomPrivateKey: exports3.secp256k1.utils.randomPrivateKey,\n lift_x: lift_x2,\n pointToBytes: pointToBytes2,\n numberToBytesBE: utils_js_1.numberToBytesBE,\n bytesToNumberBE: utils_js_1.bytesToNumberBE,\n taggedHash: taggedHash2,\n mod: modular_js_1.mod\n }\n }))();\n var isoMap2 = /* @__PURE__ */ (() => (0, hash_to_curve_js_1.isogenyMap)(Fp, [\n // xNum\n [\n \"0x8e38e38e38e38e38e38e38e38e38e38e38e38e38e38e38e38e38e38daaaaa8c7\",\n \"0x7d3d4c80bc321d5b9f315cea7fd44c5d595d2fc0bf63b92dfff1044f17c6581\",\n \"0x534c328d23f234e6e2a413deca25caece4506144037c40314ecbd0b53d9dd262\",\n \"0x8e38e38e38e38e38e38e38e38e38e38e38e38e38e38e38e38e38e38daaaaa88c\"\n ],\n // xDen\n [\n \"0xd35771193d94918a9ca34ccbb7b640dd86cd409542f8487d9fe6b745781eb49b\",\n \"0xedadc6f64383dc1df7c4b2d51b54225406d36b641f5e41bbc52a56612a8c6d14\",\n \"0x0000000000000000000000000000000000000000000000000000000000000001\"\n // LAST 1\n ],\n // yNum\n [\n \"0x4bda12f684bda12f684bda12f684bda12f684bda12f684bda12f684b8e38e23c\",\n \"0xc75e0c32d5cb7c0fa9d0a54b12a0a6d5647ab046d686da6fdffc90fc201d71a3\",\n \"0x29a6194691f91a73715209ef6512e576722830a201be2018a765e85a9ecee931\",\n \"0x2f684bda12f684bda12f684bda12f684bda12f684bda12f684bda12f38e38d84\"\n ],\n // yDen\n [\n \"0xfffffffffffffffffffffffffffffffffffffffffffffffffffffffefffff93b\",\n \"0x7a06534bb8bdb49fd5e9e6632722c2989467c1bfc8e8d978dfb425d2685c2573\",\n \"0x6484aa716545ca2cf3a70c3fa8fe337e0a3d21162f0d6299a7bf8192bfd2a76f\",\n \"0x0000000000000000000000000000000000000000000000000000000000000001\"\n // LAST 1\n ]\n ].map((i3) => i3.map((j2) => BigInt(j2)))))();\n var mapSWU2 = /* @__PURE__ */ (() => (0, weierstrass_js_1.mapToCurveSimpleSWU)(Fp, {\n A: BigInt(\"0x3f8731abdd661adca08a5558f0f5d272e953d363cb6f0e5d405447c01a444533\"),\n B: BigInt(\"1771\"),\n Z: Fp.create(BigInt(\"-11\"))\n }))();\n var htf = /* @__PURE__ */ (() => (0, hash_to_curve_js_1.createHasher)(exports3.secp256k1.ProjectivePoint, (scalars) => {\n const { x: x4, y: y6 } = mapSWU2(Fp.create(scalars[0]));\n return isoMap2(x4, y6);\n }, {\n DST: \"secp256k1_XMD:SHA-256_SSWU_RO_\",\n encodeDST: \"secp256k1_XMD:SHA-256_SSWU_NU_\",\n p: Fp.ORDER,\n m: 1,\n k: 128,\n expand: \"xmd\",\n hash: sha256_1.sha256\n }))();\n exports3.hashToCurve = (() => htf.hashToCurve)();\n exports3.encodeToCurve = (() => htf.encodeToCurve)();\n }\n });\n\n // ../../../node_modules/.pnpm/ethers@6.15.0_bufferutil@4.0.9_utf-8-validate@5.0.10/node_modules/ethers/lib.commonjs/constants/addresses.js\n var require_addresses2 = __commonJS({\n \"../../../node_modules/.pnpm/ethers@6.15.0_bufferutil@4.0.9_utf-8-validate@5.0.10/node_modules/ethers/lib.commonjs/constants/addresses.js\"(exports3) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n Object.defineProperty(exports3, \"__esModule\", { value: true });\n exports3.ZeroAddress = void 0;\n exports3.ZeroAddress = \"0x0000000000000000000000000000000000000000\";\n }\n });\n\n // ../../../node_modules/.pnpm/ethers@6.15.0_bufferutil@4.0.9_utf-8-validate@5.0.10/node_modules/ethers/lib.commonjs/constants/hashes.js\n var require_hashes2 = __commonJS({\n \"../../../node_modules/.pnpm/ethers@6.15.0_bufferutil@4.0.9_utf-8-validate@5.0.10/node_modules/ethers/lib.commonjs/constants/hashes.js\"(exports3) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n Object.defineProperty(exports3, \"__esModule\", { value: true });\n exports3.ZeroHash = void 0;\n exports3.ZeroHash = \"0x0000000000000000000000000000000000000000000000000000000000000000\";\n }\n });\n\n // ../../../node_modules/.pnpm/ethers@6.15.0_bufferutil@4.0.9_utf-8-validate@5.0.10/node_modules/ethers/lib.commonjs/constants/numbers.js\n var require_numbers = __commonJS({\n \"../../../node_modules/.pnpm/ethers@6.15.0_bufferutil@4.0.9_utf-8-validate@5.0.10/node_modules/ethers/lib.commonjs/constants/numbers.js\"(exports3) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n Object.defineProperty(exports3, \"__esModule\", { value: true });\n exports3.MaxInt256 = exports3.MinInt256 = exports3.MaxUint256 = exports3.WeiPerEther = exports3.N = void 0;\n exports3.N = BigInt(\"0xfffffffffffffffffffffffffffffffebaaedce6af48a03bbfd25e8cd0364141\");\n exports3.WeiPerEther = BigInt(\"1000000000000000000\");\n exports3.MaxUint256 = BigInt(\"0xffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff\");\n exports3.MinInt256 = BigInt(\"0x8000000000000000000000000000000000000000000000000000000000000000\") * BigInt(-1);\n exports3.MaxInt256 = BigInt(\"0x7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff\");\n }\n });\n\n // ../../../node_modules/.pnpm/ethers@6.15.0_bufferutil@4.0.9_utf-8-validate@5.0.10/node_modules/ethers/lib.commonjs/constants/strings.js\n var require_strings2 = __commonJS({\n \"../../../node_modules/.pnpm/ethers@6.15.0_bufferutil@4.0.9_utf-8-validate@5.0.10/node_modules/ethers/lib.commonjs/constants/strings.js\"(exports3) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n Object.defineProperty(exports3, \"__esModule\", { value: true });\n exports3.MessagePrefix = exports3.EtherSymbol = void 0;\n exports3.EtherSymbol = \"\\u039E\";\n exports3.MessagePrefix = \"\u0019Ethereum Signed Message:\\n\";\n }\n });\n\n // ../../../node_modules/.pnpm/ethers@6.15.0_bufferutil@4.0.9_utf-8-validate@5.0.10/node_modules/ethers/lib.commonjs/constants/index.js\n var require_constants5 = __commonJS({\n \"../../../node_modules/.pnpm/ethers@6.15.0_bufferutil@4.0.9_utf-8-validate@5.0.10/node_modules/ethers/lib.commonjs/constants/index.js\"(exports3) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n Object.defineProperty(exports3, \"__esModule\", { value: true });\n exports3.MessagePrefix = exports3.EtherSymbol = exports3.MaxInt256 = exports3.MinInt256 = exports3.MaxUint256 = exports3.WeiPerEther = exports3.N = exports3.ZeroHash = exports3.ZeroAddress = void 0;\n var addresses_js_1 = require_addresses2();\n Object.defineProperty(exports3, \"ZeroAddress\", { enumerable: true, get: function() {\n return addresses_js_1.ZeroAddress;\n } });\n var hashes_js_1 = require_hashes2();\n Object.defineProperty(exports3, \"ZeroHash\", { enumerable: true, get: function() {\n return hashes_js_1.ZeroHash;\n } });\n var numbers_js_1 = require_numbers();\n Object.defineProperty(exports3, \"N\", { enumerable: true, get: function() {\n return numbers_js_1.N;\n } });\n Object.defineProperty(exports3, \"WeiPerEther\", { enumerable: true, get: function() {\n return numbers_js_1.WeiPerEther;\n } });\n Object.defineProperty(exports3, \"MaxUint256\", { enumerable: true, get: function() {\n return numbers_js_1.MaxUint256;\n } });\n Object.defineProperty(exports3, \"MinInt256\", { enumerable: true, get: function() {\n return numbers_js_1.MinInt256;\n } });\n Object.defineProperty(exports3, \"MaxInt256\", { enumerable: true, get: function() {\n return numbers_js_1.MaxInt256;\n } });\n var strings_js_1 = require_strings2();\n Object.defineProperty(exports3, \"EtherSymbol\", { enumerable: true, get: function() {\n return strings_js_1.EtherSymbol;\n } });\n Object.defineProperty(exports3, \"MessagePrefix\", { enumerable: true, get: function() {\n return strings_js_1.MessagePrefix;\n } });\n }\n });\n\n // ../../../node_modules/.pnpm/ethers@6.15.0_bufferutil@4.0.9_utf-8-validate@5.0.10/node_modules/ethers/lib.commonjs/crypto/signature.js\n var require_signature3 = __commonJS({\n \"../../../node_modules/.pnpm/ethers@6.15.0_bufferutil@4.0.9_utf-8-validate@5.0.10/node_modules/ethers/lib.commonjs/crypto/signature.js\"(exports3) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n Object.defineProperty(exports3, \"__esModule\", { value: true });\n exports3.Signature = void 0;\n var index_js_1 = require_constants5();\n var index_js_2 = require_utils8();\n var BN_0 = BigInt(0);\n var BN_1 = BigInt(1);\n var BN_2 = BigInt(2);\n var BN_27 = BigInt(27);\n var BN_28 = BigInt(28);\n var BN_35 = BigInt(35);\n var _guard = {};\n function toUint256(value) {\n return (0, index_js_2.zeroPadValue)((0, index_js_2.toBeArray)(value), 32);\n }\n var Signature2 = class _Signature {\n #r;\n #s;\n #v;\n #networkV;\n /**\n * The ``r`` value for a signature.\n *\n * This represents the ``x`` coordinate of a \"reference\" or\n * challenge point, from which the ``y`` can be computed.\n */\n get r() {\n return this.#r;\n }\n set r(value) {\n (0, index_js_2.assertArgument)((0, index_js_2.dataLength)(value) === 32, \"invalid r\", \"value\", value);\n this.#r = (0, index_js_2.hexlify)(value);\n }\n /**\n * The ``s`` value for a signature.\n */\n get s() {\n (0, index_js_2.assertArgument)(parseInt(this.#s.substring(0, 3)) < 8, \"non-canonical s; use ._s\", \"s\", this.#s);\n return this.#s;\n }\n set s(_value) {\n (0, index_js_2.assertArgument)((0, index_js_2.dataLength)(_value) === 32, \"invalid s\", \"value\", _value);\n this.#s = (0, index_js_2.hexlify)(_value);\n }\n /**\n * Return the s value, unchecked for EIP-2 compliance.\n *\n * This should generally not be used and is for situations where\n * a non-canonical S value might be relevant, such as Frontier blocks\n * that were mined prior to EIP-2 or invalid Authorization List\n * signatures.\n */\n get _s() {\n return this.#s;\n }\n /**\n * Returns true if the Signature is valid for [[link-eip-2]] signatures.\n */\n isValid() {\n return parseInt(this.#s.substring(0, 3)) < 8;\n }\n /**\n * The ``v`` value for a signature.\n *\n * Since a given ``x`` value for ``r`` has two possible values for\n * its correspondin ``y``, the ``v`` indicates which of the two ``y``\n * values to use.\n *\n * It is normalized to the values ``27`` or ``28`` for legacy\n * purposes.\n */\n get v() {\n return this.#v;\n }\n set v(value) {\n const v2 = (0, index_js_2.getNumber)(value, \"value\");\n (0, index_js_2.assertArgument)(v2 === 27 || v2 === 28, \"invalid v\", \"v\", value);\n this.#v = v2;\n }\n /**\n * The EIP-155 ``v`` for legacy transactions. For non-legacy\n * transactions, this value is ``null``.\n */\n get networkV() {\n return this.#networkV;\n }\n /**\n * The chain ID for EIP-155 legacy transactions. For non-legacy\n * transactions, this value is ``null``.\n */\n get legacyChainId() {\n const v2 = this.networkV;\n if (v2 == null) {\n return null;\n }\n return _Signature.getChainId(v2);\n }\n /**\n * The ``yParity`` for the signature.\n *\n * See ``v`` for more details on how this value is used.\n */\n get yParity() {\n return this.v === 27 ? 0 : 1;\n }\n /**\n * The [[link-eip-2098]] compact representation of the ``yParity``\n * and ``s`` compacted into a single ``bytes32``.\n */\n get yParityAndS() {\n const yParityAndS = (0, index_js_2.getBytes)(this.s);\n if (this.yParity) {\n yParityAndS[0] |= 128;\n }\n return (0, index_js_2.hexlify)(yParityAndS);\n }\n /**\n * The [[link-eip-2098]] compact representation.\n */\n get compactSerialized() {\n return (0, index_js_2.concat)([this.r, this.yParityAndS]);\n }\n /**\n * The serialized representation.\n */\n get serialized() {\n return (0, index_js_2.concat)([this.r, this.s, this.yParity ? \"0x1c\" : \"0x1b\"]);\n }\n /**\n * @private\n */\n constructor(guard, r2, s4, v2) {\n (0, index_js_2.assertPrivate)(guard, _guard, \"Signature\");\n this.#r = r2;\n this.#s = s4;\n this.#v = v2;\n this.#networkV = null;\n }\n [Symbol.for(\"nodejs.util.inspect.custom\")]() {\n return `Signature { r: \"${this.r}\", s: \"${this._s}\"${this.isValid() ? \"\" : ', valid: \"false\"'}, yParity: ${this.yParity}, networkV: ${this.networkV} }`;\n }\n /**\n * Returns a new identical [[Signature]].\n */\n clone() {\n const clone = new _Signature(_guard, this.r, this._s, this.v);\n if (this.networkV) {\n clone.#networkV = this.networkV;\n }\n return clone;\n }\n /**\n * Returns a representation that is compatible with ``JSON.stringify``.\n */\n toJSON() {\n const networkV = this.networkV;\n return {\n _type: \"signature\",\n networkV: networkV != null ? networkV.toString() : null,\n r: this.r,\n s: this._s,\n v: this.v\n };\n }\n /**\n * Compute the chain ID from the ``v`` in a legacy EIP-155 transactions.\n *\n * @example:\n * Signature.getChainId(45)\n * //_result:\n *\n * Signature.getChainId(46)\n * //_result:\n */\n static getChainId(v2) {\n const bv = (0, index_js_2.getBigInt)(v2, \"v\");\n if (bv == BN_27 || bv == BN_28) {\n return BN_0;\n }\n (0, index_js_2.assertArgument)(bv >= BN_35, \"invalid EIP-155 v\", \"v\", v2);\n return (bv - BN_35) / BN_2;\n }\n /**\n * Compute the ``v`` for a chain ID for a legacy EIP-155 transactions.\n *\n * Legacy transactions which use [[link-eip-155]] hijack the ``v``\n * property to include the chain ID.\n *\n * @example:\n * Signature.getChainIdV(5, 27)\n * //_result:\n *\n * Signature.getChainIdV(5, 28)\n * //_result:\n *\n */\n static getChainIdV(chainId, v2) {\n return (0, index_js_2.getBigInt)(chainId) * BN_2 + BigInt(35 + v2 - 27);\n }\n /**\n * Compute the normalized legacy transaction ``v`` from a ``yParirty``,\n * a legacy transaction ``v`` or a legacy [[link-eip-155]] transaction.\n *\n * @example:\n * // The values 0 and 1 imply v is actually yParity\n * Signature.getNormalizedV(0)\n * //_result:\n *\n * // Legacy non-EIP-1559 transaction (i.e. 27 or 28)\n * Signature.getNormalizedV(27)\n * //_result:\n *\n * // Legacy EIP-155 transaction (i.e. >= 35)\n * Signature.getNormalizedV(46)\n * //_result:\n *\n * // Invalid values throw\n * Signature.getNormalizedV(5)\n * //_error:\n */\n static getNormalizedV(v2) {\n const bv = (0, index_js_2.getBigInt)(v2);\n if (bv === BN_0 || bv === BN_27) {\n return 27;\n }\n if (bv === BN_1 || bv === BN_28) {\n return 28;\n }\n (0, index_js_2.assertArgument)(bv >= BN_35, \"invalid v\", \"v\", v2);\n return bv & BN_1 ? 27 : 28;\n }\n /**\n * Creates a new [[Signature]].\n *\n * If no %%sig%% is provided, a new [[Signature]] is created\n * with default values.\n *\n * If %%sig%% is a string, it is parsed.\n */\n static from(sig) {\n function assertError(check, message) {\n (0, index_js_2.assertArgument)(check, message, \"signature\", sig);\n }\n ;\n if (sig == null) {\n return new _Signature(_guard, index_js_1.ZeroHash, index_js_1.ZeroHash, 27);\n }\n if (typeof sig === \"string\") {\n const bytes = (0, index_js_2.getBytes)(sig, \"signature\");\n if (bytes.length === 64) {\n const r3 = (0, index_js_2.hexlify)(bytes.slice(0, 32));\n const s5 = bytes.slice(32, 64);\n const v3 = s5[0] & 128 ? 28 : 27;\n s5[0] &= 127;\n return new _Signature(_guard, r3, (0, index_js_2.hexlify)(s5), v3);\n }\n if (bytes.length === 65) {\n const r3 = (0, index_js_2.hexlify)(bytes.slice(0, 32));\n const s5 = (0, index_js_2.hexlify)(bytes.slice(32, 64));\n const v3 = _Signature.getNormalizedV(bytes[64]);\n return new _Signature(_guard, r3, s5, v3);\n }\n assertError(false, \"invalid raw signature length\");\n }\n if (sig instanceof _Signature) {\n return sig.clone();\n }\n const _r = sig.r;\n assertError(_r != null, \"missing r\");\n const r2 = toUint256(_r);\n const s4 = function(s5, yParityAndS) {\n if (s5 != null) {\n return toUint256(s5);\n }\n if (yParityAndS != null) {\n assertError((0, index_js_2.isHexString)(yParityAndS, 32), \"invalid yParityAndS\");\n const bytes = (0, index_js_2.getBytes)(yParityAndS);\n bytes[0] &= 127;\n return (0, index_js_2.hexlify)(bytes);\n }\n assertError(false, \"missing s\");\n }(sig.s, sig.yParityAndS);\n const { networkV, v: v2 } = function(_v, yParityAndS, yParity) {\n if (_v != null) {\n const v3 = (0, index_js_2.getBigInt)(_v);\n return {\n networkV: v3 >= BN_35 ? v3 : void 0,\n v: _Signature.getNormalizedV(v3)\n };\n }\n if (yParityAndS != null) {\n assertError((0, index_js_2.isHexString)(yParityAndS, 32), \"invalid yParityAndS\");\n return { v: (0, index_js_2.getBytes)(yParityAndS)[0] & 128 ? 28 : 27 };\n }\n if (yParity != null) {\n switch ((0, index_js_2.getNumber)(yParity, \"sig.yParity\")) {\n case 0:\n return { v: 27 };\n case 1:\n return { v: 28 };\n }\n assertError(false, \"invalid yParity\");\n }\n assertError(false, \"missing v\");\n }(sig.v, sig.yParityAndS, sig.yParity);\n const result = new _Signature(_guard, r2, s4, v2);\n if (networkV) {\n result.#networkV = networkV;\n }\n assertError(sig.yParity == null || (0, index_js_2.getNumber)(sig.yParity, \"sig.yParity\") === result.yParity, \"yParity mismatch\");\n assertError(sig.yParityAndS == null || sig.yParityAndS === result.yParityAndS, \"yParityAndS mismatch\");\n return result;\n }\n };\n exports3.Signature = Signature2;\n }\n });\n\n // ../../../node_modules/.pnpm/ethers@6.15.0_bufferutil@4.0.9_utf-8-validate@5.0.10/node_modules/ethers/lib.commonjs/crypto/signing-key.js\n var require_signing_key = __commonJS({\n \"../../../node_modules/.pnpm/ethers@6.15.0_bufferutil@4.0.9_utf-8-validate@5.0.10/node_modules/ethers/lib.commonjs/crypto/signing-key.js\"(exports3) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n Object.defineProperty(exports3, \"__esModule\", { value: true });\n exports3.SigningKey = void 0;\n var secp256k1_1 = require_secp256k12();\n var index_js_1 = require_utils8();\n var signature_js_1 = require_signature3();\n var SigningKey = class _SigningKey {\n #privateKey;\n /**\n * Creates a new **SigningKey** for %%privateKey%%.\n */\n constructor(privateKey) {\n (0, index_js_1.assertArgument)((0, index_js_1.dataLength)(privateKey) === 32, \"invalid private key\", \"privateKey\", \"[REDACTED]\");\n this.#privateKey = (0, index_js_1.hexlify)(privateKey);\n }\n /**\n * The private key.\n */\n get privateKey() {\n return this.#privateKey;\n }\n /**\n * The uncompressed public key.\n *\n * This will always begin with the prefix ``0x04`` and be 132\n * characters long (the ``0x`` prefix and 130 hexadecimal nibbles).\n */\n get publicKey() {\n return _SigningKey.computePublicKey(this.#privateKey);\n }\n /**\n * The compressed public key.\n *\n * This will always begin with either the prefix ``0x02`` or ``0x03``\n * and be 68 characters long (the ``0x`` prefix and 33 hexadecimal\n * nibbles)\n */\n get compressedPublicKey() {\n return _SigningKey.computePublicKey(this.#privateKey, true);\n }\n /**\n * Return the signature of the signed %%digest%%.\n */\n sign(digest) {\n (0, index_js_1.assertArgument)((0, index_js_1.dataLength)(digest) === 32, \"invalid digest length\", \"digest\", digest);\n const sig = secp256k1_1.secp256k1.sign((0, index_js_1.getBytesCopy)(digest), (0, index_js_1.getBytesCopy)(this.#privateKey), {\n lowS: true\n });\n return signature_js_1.Signature.from({\n r: (0, index_js_1.toBeHex)(sig.r, 32),\n s: (0, index_js_1.toBeHex)(sig.s, 32),\n v: sig.recovery ? 28 : 27\n });\n }\n /**\n * Returns the [[link-wiki-ecdh]] shared secret between this\n * private key and the %%other%% key.\n *\n * The %%other%% key may be any type of key, a raw public key,\n * a compressed/uncompressed pubic key or aprivate key.\n *\n * Best practice is usually to use a cryptographic hash on the\n * returned value before using it as a symetric secret.\n *\n * @example:\n * sign1 = new SigningKey(id(\"some-secret-1\"))\n * sign2 = new SigningKey(id(\"some-secret-2\"))\n *\n * // Notice that privA.computeSharedSecret(pubB)...\n * sign1.computeSharedSecret(sign2.publicKey)\n * //_result:\n *\n * // ...is equal to privB.computeSharedSecret(pubA).\n * sign2.computeSharedSecret(sign1.publicKey)\n * //_result:\n */\n computeSharedSecret(other) {\n const pubKey = _SigningKey.computePublicKey(other);\n return (0, index_js_1.hexlify)(secp256k1_1.secp256k1.getSharedSecret((0, index_js_1.getBytesCopy)(this.#privateKey), (0, index_js_1.getBytes)(pubKey), false));\n }\n /**\n * Compute the public key for %%key%%, optionally %%compressed%%.\n *\n * The %%key%% may be any type of key, a raw public key, a\n * compressed/uncompressed public key or private key.\n *\n * @example:\n * sign = new SigningKey(id(\"some-secret\"));\n *\n * // Compute the uncompressed public key for a private key\n * SigningKey.computePublicKey(sign.privateKey)\n * //_result:\n *\n * // Compute the compressed public key for a private key\n * SigningKey.computePublicKey(sign.privateKey, true)\n * //_result:\n *\n * // Compute the uncompressed public key\n * SigningKey.computePublicKey(sign.publicKey, false);\n * //_result:\n *\n * // Compute the Compressed a public key\n * SigningKey.computePublicKey(sign.publicKey, true);\n * //_result:\n */\n static computePublicKey(key, compressed) {\n let bytes = (0, index_js_1.getBytes)(key, \"key\");\n if (bytes.length === 32) {\n const pubKey = secp256k1_1.secp256k1.getPublicKey(bytes, !!compressed);\n return (0, index_js_1.hexlify)(pubKey);\n }\n if (bytes.length === 64) {\n const pub = new Uint8Array(65);\n pub[0] = 4;\n pub.set(bytes, 1);\n bytes = pub;\n }\n const point = secp256k1_1.secp256k1.ProjectivePoint.fromHex(bytes);\n return (0, index_js_1.hexlify)(point.toRawBytes(compressed));\n }\n /**\n * Returns the public key for the private key which produced the\n * %%signature%% for the given %%digest%%.\n *\n * @example:\n * key = new SigningKey(id(\"some-secret\"))\n * digest = id(\"hello world\")\n * sig = key.sign(digest)\n *\n * // Notice the signer public key...\n * key.publicKey\n * //_result:\n *\n * // ...is equal to the recovered public key\n * SigningKey.recoverPublicKey(digest, sig)\n * //_result:\n *\n */\n static recoverPublicKey(digest, signature) {\n (0, index_js_1.assertArgument)((0, index_js_1.dataLength)(digest) === 32, \"invalid digest length\", \"digest\", digest);\n const sig = signature_js_1.Signature.from(signature);\n let secpSig = secp256k1_1.secp256k1.Signature.fromCompact((0, index_js_1.getBytesCopy)((0, index_js_1.concat)([sig.r, sig.s])));\n secpSig = secpSig.addRecoveryBit(sig.yParity);\n const pubKey = secpSig.recoverPublicKey((0, index_js_1.getBytesCopy)(digest));\n (0, index_js_1.assertArgument)(pubKey != null, \"invalid signature for digest\", \"signature\", signature);\n return \"0x\" + pubKey.toHex(false);\n }\n /**\n * Returns the point resulting from adding the ellipic curve points\n * %%p0%% and %%p1%%.\n *\n * This is not a common function most developers should require, but\n * can be useful for certain privacy-specific techniques.\n *\n * For example, it is used by [[HDNodeWallet]] to compute child\n * addresses from parent public keys and chain codes.\n */\n static addPoints(p0, p1, compressed) {\n const pub0 = secp256k1_1.secp256k1.ProjectivePoint.fromHex(_SigningKey.computePublicKey(p0).substring(2));\n const pub1 = secp256k1_1.secp256k1.ProjectivePoint.fromHex(_SigningKey.computePublicKey(p1).substring(2));\n return \"0x\" + pub0.add(pub1).toHex(!!compressed);\n }\n };\n exports3.SigningKey = SigningKey;\n }\n });\n\n // ../../../node_modules/.pnpm/ethers@6.15.0_bufferutil@4.0.9_utf-8-validate@5.0.10/node_modules/ethers/lib.commonjs/crypto/index.js\n var require_crypto2 = __commonJS({\n \"../../../node_modules/.pnpm/ethers@6.15.0_bufferutil@4.0.9_utf-8-validate@5.0.10/node_modules/ethers/lib.commonjs/crypto/index.js\"(exports3) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n Object.defineProperty(exports3, \"__esModule\", { value: true });\n exports3.lock = exports3.Signature = exports3.SigningKey = exports3.scryptSync = exports3.scrypt = exports3.pbkdf2 = exports3.sha512 = exports3.sha256 = exports3.ripemd160 = exports3.keccak256 = exports3.randomBytes = exports3.computeHmac = void 0;\n var hmac_js_1 = require_hmac3();\n Object.defineProperty(exports3, \"computeHmac\", { enumerable: true, get: function() {\n return hmac_js_1.computeHmac;\n } });\n var keccak_js_1 = require_keccak();\n Object.defineProperty(exports3, \"keccak256\", { enumerable: true, get: function() {\n return keccak_js_1.keccak256;\n } });\n var ripemd160_js_1 = require_ripemd1602();\n Object.defineProperty(exports3, \"ripemd160\", { enumerable: true, get: function() {\n return ripemd160_js_1.ripemd160;\n } });\n var pbkdf2_js_1 = require_pbkdf22();\n Object.defineProperty(exports3, \"pbkdf2\", { enumerable: true, get: function() {\n return pbkdf2_js_1.pbkdf2;\n } });\n var random_js_1 = require_random();\n Object.defineProperty(exports3, \"randomBytes\", { enumerable: true, get: function() {\n return random_js_1.randomBytes;\n } });\n var scrypt_js_1 = require_scrypt3();\n Object.defineProperty(exports3, \"scrypt\", { enumerable: true, get: function() {\n return scrypt_js_1.scrypt;\n } });\n Object.defineProperty(exports3, \"scryptSync\", { enumerable: true, get: function() {\n return scrypt_js_1.scryptSync;\n } });\n var sha2_js_1 = require_sha22();\n Object.defineProperty(exports3, \"sha256\", { enumerable: true, get: function() {\n return sha2_js_1.sha256;\n } });\n Object.defineProperty(exports3, \"sha512\", { enumerable: true, get: function() {\n return sha2_js_1.sha512;\n } });\n var signing_key_js_1 = require_signing_key();\n Object.defineProperty(exports3, \"SigningKey\", { enumerable: true, get: function() {\n return signing_key_js_1.SigningKey;\n } });\n var signature_js_1 = require_signature3();\n Object.defineProperty(exports3, \"Signature\", { enumerable: true, get: function() {\n return signature_js_1.Signature;\n } });\n function lock() {\n hmac_js_1.computeHmac.lock();\n keccak_js_1.keccak256.lock();\n pbkdf2_js_1.pbkdf2.lock();\n random_js_1.randomBytes.lock();\n ripemd160_js_1.ripemd160.lock();\n scrypt_js_1.scrypt.lock();\n scrypt_js_1.scryptSync.lock();\n sha2_js_1.sha256.lock();\n sha2_js_1.sha512.lock();\n random_js_1.randomBytes.lock();\n }\n exports3.lock = lock;\n }\n });\n\n // ../../../node_modules/.pnpm/ethers@6.15.0_bufferutil@4.0.9_utf-8-validate@5.0.10/node_modules/ethers/lib.commonjs/address/address.js\n var require_address2 = __commonJS({\n \"../../../node_modules/.pnpm/ethers@6.15.0_bufferutil@4.0.9_utf-8-validate@5.0.10/node_modules/ethers/lib.commonjs/address/address.js\"(exports3) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n Object.defineProperty(exports3, \"__esModule\", { value: true });\n exports3.getIcapAddress = exports3.getAddress = void 0;\n var index_js_1 = require_crypto2();\n var index_js_2 = require_utils8();\n var BN_0 = BigInt(0);\n var BN_36 = BigInt(36);\n function getChecksumAddress(address) {\n address = address.toLowerCase();\n const chars = address.substring(2).split(\"\");\n const expanded = new Uint8Array(40);\n for (let i3 = 0; i3 < 40; i3++) {\n expanded[i3] = chars[i3].charCodeAt(0);\n }\n const hashed = (0, index_js_2.getBytes)((0, index_js_1.keccak256)(expanded));\n for (let i3 = 0; i3 < 40; i3 += 2) {\n if (hashed[i3 >> 1] >> 4 >= 8) {\n chars[i3] = chars[i3].toUpperCase();\n }\n if ((hashed[i3 >> 1] & 15) >= 8) {\n chars[i3 + 1] = chars[i3 + 1].toUpperCase();\n }\n }\n return \"0x\" + chars.join(\"\");\n }\n var ibanLookup = {};\n for (let i3 = 0; i3 < 10; i3++) {\n ibanLookup[String(i3)] = String(i3);\n }\n for (let i3 = 0; i3 < 26; i3++) {\n ibanLookup[String.fromCharCode(65 + i3)] = String(10 + i3);\n }\n var safeDigits = 15;\n function ibanChecksum(address) {\n address = address.toUpperCase();\n address = address.substring(4) + address.substring(0, 2) + \"00\";\n let expanded = address.split(\"\").map((c4) => {\n return ibanLookup[c4];\n }).join(\"\");\n while (expanded.length >= safeDigits) {\n let block = expanded.substring(0, safeDigits);\n expanded = parseInt(block, 10) % 97 + expanded.substring(block.length);\n }\n let checksum4 = String(98 - parseInt(expanded, 10) % 97);\n while (checksum4.length < 2) {\n checksum4 = \"0\" + checksum4;\n }\n return checksum4;\n }\n var Base36 = function() {\n ;\n const result = {};\n for (let i3 = 0; i3 < 36; i3++) {\n const key = \"0123456789abcdefghijklmnopqrstuvwxyz\"[i3];\n result[key] = BigInt(i3);\n }\n return result;\n }();\n function fromBase36(value) {\n value = value.toLowerCase();\n let result = BN_0;\n for (let i3 = 0; i3 < value.length; i3++) {\n result = result * BN_36 + Base36[value[i3]];\n }\n return result;\n }\n function getAddress3(address) {\n (0, index_js_2.assertArgument)(typeof address === \"string\", \"invalid address\", \"address\", address);\n if (address.match(/^(0x)?[0-9a-fA-F]{40}$/)) {\n if (!address.startsWith(\"0x\")) {\n address = \"0x\" + address;\n }\n const result = getChecksumAddress(address);\n (0, index_js_2.assertArgument)(!address.match(/([A-F].*[a-f])|([a-f].*[A-F])/) || result === address, \"bad address checksum\", \"address\", address);\n return result;\n }\n if (address.match(/^XE[0-9]{2}[0-9A-Za-z]{30,31}$/)) {\n (0, index_js_2.assertArgument)(address.substring(2, 4) === ibanChecksum(address), \"bad icap checksum\", \"address\", address);\n let result = fromBase36(address.substring(4)).toString(16);\n while (result.length < 40) {\n result = \"0\" + result;\n }\n return getChecksumAddress(\"0x\" + result);\n }\n (0, index_js_2.assertArgument)(false, \"invalid address\", \"address\", address);\n }\n exports3.getAddress = getAddress3;\n function getIcapAddress(address) {\n let base36 = BigInt(getAddress3(address)).toString(36).toUpperCase();\n while (base36.length < 30) {\n base36 = \"0\" + base36;\n }\n return \"XE\" + ibanChecksum(\"XE00\" + base36) + base36;\n }\n exports3.getIcapAddress = getIcapAddress;\n }\n });\n\n // ../../../node_modules/.pnpm/ethers@6.15.0_bufferutil@4.0.9_utf-8-validate@5.0.10/node_modules/ethers/lib.commonjs/address/contract-address.js\n var require_contract_address = __commonJS({\n \"../../../node_modules/.pnpm/ethers@6.15.0_bufferutil@4.0.9_utf-8-validate@5.0.10/node_modules/ethers/lib.commonjs/address/contract-address.js\"(exports3) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n Object.defineProperty(exports3, \"__esModule\", { value: true });\n exports3.getCreate2Address = exports3.getCreateAddress = void 0;\n var index_js_1 = require_crypto2();\n var index_js_2 = require_utils8();\n var address_js_1 = require_address2();\n function getCreateAddress2(tx) {\n const from14 = (0, address_js_1.getAddress)(tx.from);\n const nonce = (0, index_js_2.getBigInt)(tx.nonce, \"tx.nonce\");\n let nonceHex = nonce.toString(16);\n if (nonceHex === \"0\") {\n nonceHex = \"0x\";\n } else if (nonceHex.length % 2) {\n nonceHex = \"0x0\" + nonceHex;\n } else {\n nonceHex = \"0x\" + nonceHex;\n }\n return (0, address_js_1.getAddress)((0, index_js_2.dataSlice)((0, index_js_1.keccak256)((0, index_js_2.encodeRlp)([from14, nonceHex])), 12));\n }\n exports3.getCreateAddress = getCreateAddress2;\n function getCreate2Address2(_from, _salt, _initCodeHash) {\n const from14 = (0, address_js_1.getAddress)(_from);\n const salt = (0, index_js_2.getBytes)(_salt, \"salt\");\n const initCodeHash = (0, index_js_2.getBytes)(_initCodeHash, \"initCodeHash\");\n (0, index_js_2.assertArgument)(salt.length === 32, \"salt must be 32 bytes\", \"salt\", _salt);\n (0, index_js_2.assertArgument)(initCodeHash.length === 32, \"initCodeHash must be 32 bytes\", \"initCodeHash\", _initCodeHash);\n return (0, address_js_1.getAddress)((0, index_js_2.dataSlice)((0, index_js_1.keccak256)((0, index_js_2.concat)([\"0xff\", from14, salt, initCodeHash])), 12));\n }\n exports3.getCreate2Address = getCreate2Address2;\n }\n });\n\n // ../../../node_modules/.pnpm/ethers@6.15.0_bufferutil@4.0.9_utf-8-validate@5.0.10/node_modules/ethers/lib.commonjs/address/checks.js\n var require_checks = __commonJS({\n \"../../../node_modules/.pnpm/ethers@6.15.0_bufferutil@4.0.9_utf-8-validate@5.0.10/node_modules/ethers/lib.commonjs/address/checks.js\"(exports3) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n Object.defineProperty(exports3, \"__esModule\", { value: true });\n exports3.resolveAddress = exports3.isAddress = exports3.isAddressable = void 0;\n var index_js_1 = require_utils8();\n var address_js_1 = require_address2();\n function isAddressable(value) {\n return value && typeof value.getAddress === \"function\";\n }\n exports3.isAddressable = isAddressable;\n function isAddress2(value) {\n try {\n (0, address_js_1.getAddress)(value);\n return true;\n } catch (error) {\n }\n return false;\n }\n exports3.isAddress = isAddress2;\n async function checkAddress(target, promise) {\n const result = await promise;\n if (result == null || result === \"0x0000000000000000000000000000000000000000\") {\n (0, index_js_1.assert)(typeof target !== \"string\", \"unconfigured name\", \"UNCONFIGURED_NAME\", { value: target });\n (0, index_js_1.assertArgument)(false, \"invalid AddressLike value; did not resolve to a value address\", \"target\", target);\n }\n return (0, address_js_1.getAddress)(result);\n }\n function resolveAddress(target, resolver) {\n if (typeof target === \"string\") {\n if (target.match(/^0x[0-9a-f]{40}$/i)) {\n return (0, address_js_1.getAddress)(target);\n }\n (0, index_js_1.assert)(resolver != null, \"ENS resolution requires a provider\", \"UNSUPPORTED_OPERATION\", { operation: \"resolveName\" });\n return checkAddress(target, resolver.resolveName(target));\n } else if (isAddressable(target)) {\n return checkAddress(target, target.getAddress());\n } else if (target && typeof target.then === \"function\") {\n return checkAddress(target, target);\n }\n (0, index_js_1.assertArgument)(false, \"unsupported addressable value\", \"target\", target);\n }\n exports3.resolveAddress = resolveAddress;\n }\n });\n\n // ../../../node_modules/.pnpm/ethers@6.15.0_bufferutil@4.0.9_utf-8-validate@5.0.10/node_modules/ethers/lib.commonjs/address/index.js\n var require_address3 = __commonJS({\n \"../../../node_modules/.pnpm/ethers@6.15.0_bufferutil@4.0.9_utf-8-validate@5.0.10/node_modules/ethers/lib.commonjs/address/index.js\"(exports3) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n Object.defineProperty(exports3, \"__esModule\", { value: true });\n exports3.resolveAddress = exports3.isAddress = exports3.isAddressable = exports3.getCreate2Address = exports3.getCreateAddress = exports3.getIcapAddress = exports3.getAddress = void 0;\n var address_js_1 = require_address2();\n Object.defineProperty(exports3, \"getAddress\", { enumerable: true, get: function() {\n return address_js_1.getAddress;\n } });\n Object.defineProperty(exports3, \"getIcapAddress\", { enumerable: true, get: function() {\n return address_js_1.getIcapAddress;\n } });\n var contract_address_js_1 = require_contract_address();\n Object.defineProperty(exports3, \"getCreateAddress\", { enumerable: true, get: function() {\n return contract_address_js_1.getCreateAddress;\n } });\n Object.defineProperty(exports3, \"getCreate2Address\", { enumerable: true, get: function() {\n return contract_address_js_1.getCreate2Address;\n } });\n var checks_js_1 = require_checks();\n Object.defineProperty(exports3, \"isAddressable\", { enumerable: true, get: function() {\n return checks_js_1.isAddressable;\n } });\n Object.defineProperty(exports3, \"isAddress\", { enumerable: true, get: function() {\n return checks_js_1.isAddress;\n } });\n Object.defineProperty(exports3, \"resolveAddress\", { enumerable: true, get: function() {\n return checks_js_1.resolveAddress;\n } });\n }\n });\n\n // ../../../node_modules/.pnpm/ethers@6.15.0_bufferutil@4.0.9_utf-8-validate@5.0.10/node_modules/ethers/lib.commonjs/abi/typed.js\n var require_typed = __commonJS({\n \"../../../node_modules/.pnpm/ethers@6.15.0_bufferutil@4.0.9_utf-8-validate@5.0.10/node_modules/ethers/lib.commonjs/abi/typed.js\"(exports3) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n Object.defineProperty(exports3, \"__esModule\", { value: true });\n exports3.Typed = void 0;\n var index_js_1 = require_utils8();\n var _gaurd = {};\n function n2(value, width) {\n let signed = false;\n if (width < 0) {\n signed = true;\n width *= -1;\n }\n return new Typed(_gaurd, `${signed ? \"\" : \"u\"}int${width}`, value, { signed, width });\n }\n function b4(value, size6) {\n return new Typed(_gaurd, `bytes${size6 ? size6 : \"\"}`, value, { size: size6 });\n }\n var _typedSymbol = Symbol.for(\"_ethers_typed\");\n var Typed = class _Typed {\n /**\n * The type, as a Solidity-compatible type.\n */\n type;\n /**\n * The actual value.\n */\n value;\n #options;\n /**\n * @_ignore:\n */\n _typedSymbol;\n /**\n * @_ignore:\n */\n constructor(gaurd, type, value, options) {\n if (options == null) {\n options = null;\n }\n (0, index_js_1.assertPrivate)(_gaurd, gaurd, \"Typed\");\n (0, index_js_1.defineProperties)(this, { _typedSymbol, type, value });\n this.#options = options;\n this.format();\n }\n /**\n * Format the type as a Human-Readable type.\n */\n format() {\n if (this.type === \"array\") {\n throw new Error(\"\");\n } else if (this.type === \"dynamicArray\") {\n throw new Error(\"\");\n } else if (this.type === \"tuple\") {\n return `tuple(${this.value.map((v2) => v2.format()).join(\",\")})`;\n }\n return this.type;\n }\n /**\n * The default value returned by this type.\n */\n defaultValue() {\n return 0;\n }\n /**\n * The minimum value for numeric types.\n */\n minValue() {\n return 0;\n }\n /**\n * The maximum value for numeric types.\n */\n maxValue() {\n return 0;\n }\n /**\n * Returns ``true`` and provides a type guard is this is a [[TypedBigInt]].\n */\n isBigInt() {\n return !!this.type.match(/^u?int[0-9]+$/);\n }\n /**\n * Returns ``true`` and provides a type guard is this is a [[TypedData]].\n */\n isData() {\n return this.type.startsWith(\"bytes\");\n }\n /**\n * Returns ``true`` and provides a type guard is this is a [[TypedString]].\n */\n isString() {\n return this.type === \"string\";\n }\n /**\n * Returns the tuple name, if this is a tuple. Throws otherwise.\n */\n get tupleName() {\n if (this.type !== \"tuple\") {\n throw TypeError(\"not a tuple\");\n }\n return this.#options;\n }\n // Returns the length of this type as an array\n // - `null` indicates the length is unforced, it could be dynamic\n // - `-1` indicates the length is dynamic\n // - any other value indicates it is a static array and is its length\n /**\n * Returns the length of the array type or ``-1`` if it is dynamic.\n *\n * Throws if the type is not an array.\n */\n get arrayLength() {\n if (this.type !== \"array\") {\n throw TypeError(\"not an array\");\n }\n if (this.#options === true) {\n return -1;\n }\n if (this.#options === false) {\n return this.value.length;\n }\n return null;\n }\n /**\n * Returns a new **Typed** of %%type%% with the %%value%%.\n */\n static from(type, value) {\n return new _Typed(_gaurd, type, value);\n }\n /**\n * Return a new ``uint8`` type for %%v%%.\n */\n static uint8(v2) {\n return n2(v2, 8);\n }\n /**\n * Return a new ``uint16`` type for %%v%%.\n */\n static uint16(v2) {\n return n2(v2, 16);\n }\n /**\n * Return a new ``uint24`` type for %%v%%.\n */\n static uint24(v2) {\n return n2(v2, 24);\n }\n /**\n * Return a new ``uint32`` type for %%v%%.\n */\n static uint32(v2) {\n return n2(v2, 32);\n }\n /**\n * Return a new ``uint40`` type for %%v%%.\n */\n static uint40(v2) {\n return n2(v2, 40);\n }\n /**\n * Return a new ``uint48`` type for %%v%%.\n */\n static uint48(v2) {\n return n2(v2, 48);\n }\n /**\n * Return a new ``uint56`` type for %%v%%.\n */\n static uint56(v2) {\n return n2(v2, 56);\n }\n /**\n * Return a new ``uint64`` type for %%v%%.\n */\n static uint64(v2) {\n return n2(v2, 64);\n }\n /**\n * Return a new ``uint72`` type for %%v%%.\n */\n static uint72(v2) {\n return n2(v2, 72);\n }\n /**\n * Return a new ``uint80`` type for %%v%%.\n */\n static uint80(v2) {\n return n2(v2, 80);\n }\n /**\n * Return a new ``uint88`` type for %%v%%.\n */\n static uint88(v2) {\n return n2(v2, 88);\n }\n /**\n * Return a new ``uint96`` type for %%v%%.\n */\n static uint96(v2) {\n return n2(v2, 96);\n }\n /**\n * Return a new ``uint104`` type for %%v%%.\n */\n static uint104(v2) {\n return n2(v2, 104);\n }\n /**\n * Return a new ``uint112`` type for %%v%%.\n */\n static uint112(v2) {\n return n2(v2, 112);\n }\n /**\n * Return a new ``uint120`` type for %%v%%.\n */\n static uint120(v2) {\n return n2(v2, 120);\n }\n /**\n * Return a new ``uint128`` type for %%v%%.\n */\n static uint128(v2) {\n return n2(v2, 128);\n }\n /**\n * Return a new ``uint136`` type for %%v%%.\n */\n static uint136(v2) {\n return n2(v2, 136);\n }\n /**\n * Return a new ``uint144`` type for %%v%%.\n */\n static uint144(v2) {\n return n2(v2, 144);\n }\n /**\n * Return a new ``uint152`` type for %%v%%.\n */\n static uint152(v2) {\n return n2(v2, 152);\n }\n /**\n * Return a new ``uint160`` type for %%v%%.\n */\n static uint160(v2) {\n return n2(v2, 160);\n }\n /**\n * Return a new ``uint168`` type for %%v%%.\n */\n static uint168(v2) {\n return n2(v2, 168);\n }\n /**\n * Return a new ``uint176`` type for %%v%%.\n */\n static uint176(v2) {\n return n2(v2, 176);\n }\n /**\n * Return a new ``uint184`` type for %%v%%.\n */\n static uint184(v2) {\n return n2(v2, 184);\n }\n /**\n * Return a new ``uint192`` type for %%v%%.\n */\n static uint192(v2) {\n return n2(v2, 192);\n }\n /**\n * Return a new ``uint200`` type for %%v%%.\n */\n static uint200(v2) {\n return n2(v2, 200);\n }\n /**\n * Return a new ``uint208`` type for %%v%%.\n */\n static uint208(v2) {\n return n2(v2, 208);\n }\n /**\n * Return a new ``uint216`` type for %%v%%.\n */\n static uint216(v2) {\n return n2(v2, 216);\n }\n /**\n * Return a new ``uint224`` type for %%v%%.\n */\n static uint224(v2) {\n return n2(v2, 224);\n }\n /**\n * Return a new ``uint232`` type for %%v%%.\n */\n static uint232(v2) {\n return n2(v2, 232);\n }\n /**\n * Return a new ``uint240`` type for %%v%%.\n */\n static uint240(v2) {\n return n2(v2, 240);\n }\n /**\n * Return a new ``uint248`` type for %%v%%.\n */\n static uint248(v2) {\n return n2(v2, 248);\n }\n /**\n * Return a new ``uint256`` type for %%v%%.\n */\n static uint256(v2) {\n return n2(v2, 256);\n }\n /**\n * Return a new ``uint256`` type for %%v%%.\n */\n static uint(v2) {\n return n2(v2, 256);\n }\n /**\n * Return a new ``int8`` type for %%v%%.\n */\n static int8(v2) {\n return n2(v2, -8);\n }\n /**\n * Return a new ``int16`` type for %%v%%.\n */\n static int16(v2) {\n return n2(v2, -16);\n }\n /**\n * Return a new ``int24`` type for %%v%%.\n */\n static int24(v2) {\n return n2(v2, -24);\n }\n /**\n * Return a new ``int32`` type for %%v%%.\n */\n static int32(v2) {\n return n2(v2, -32);\n }\n /**\n * Return a new ``int40`` type for %%v%%.\n */\n static int40(v2) {\n return n2(v2, -40);\n }\n /**\n * Return a new ``int48`` type for %%v%%.\n */\n static int48(v2) {\n return n2(v2, -48);\n }\n /**\n * Return a new ``int56`` type for %%v%%.\n */\n static int56(v2) {\n return n2(v2, -56);\n }\n /**\n * Return a new ``int64`` type for %%v%%.\n */\n static int64(v2) {\n return n2(v2, -64);\n }\n /**\n * Return a new ``int72`` type for %%v%%.\n */\n static int72(v2) {\n return n2(v2, -72);\n }\n /**\n * Return a new ``int80`` type for %%v%%.\n */\n static int80(v2) {\n return n2(v2, -80);\n }\n /**\n * Return a new ``int88`` type for %%v%%.\n */\n static int88(v2) {\n return n2(v2, -88);\n }\n /**\n * Return a new ``int96`` type for %%v%%.\n */\n static int96(v2) {\n return n2(v2, -96);\n }\n /**\n * Return a new ``int104`` type for %%v%%.\n */\n static int104(v2) {\n return n2(v2, -104);\n }\n /**\n * Return a new ``int112`` type for %%v%%.\n */\n static int112(v2) {\n return n2(v2, -112);\n }\n /**\n * Return a new ``int120`` type for %%v%%.\n */\n static int120(v2) {\n return n2(v2, -120);\n }\n /**\n * Return a new ``int128`` type for %%v%%.\n */\n static int128(v2) {\n return n2(v2, -128);\n }\n /**\n * Return a new ``int136`` type for %%v%%.\n */\n static int136(v2) {\n return n2(v2, -136);\n }\n /**\n * Return a new ``int144`` type for %%v%%.\n */\n static int144(v2) {\n return n2(v2, -144);\n }\n /**\n * Return a new ``int52`` type for %%v%%.\n */\n static int152(v2) {\n return n2(v2, -152);\n }\n /**\n * Return a new ``int160`` type for %%v%%.\n */\n static int160(v2) {\n return n2(v2, -160);\n }\n /**\n * Return a new ``int168`` type for %%v%%.\n */\n static int168(v2) {\n return n2(v2, -168);\n }\n /**\n * Return a new ``int176`` type for %%v%%.\n */\n static int176(v2) {\n return n2(v2, -176);\n }\n /**\n * Return a new ``int184`` type for %%v%%.\n */\n static int184(v2) {\n return n2(v2, -184);\n }\n /**\n * Return a new ``int92`` type for %%v%%.\n */\n static int192(v2) {\n return n2(v2, -192);\n }\n /**\n * Return a new ``int200`` type for %%v%%.\n */\n static int200(v2) {\n return n2(v2, -200);\n }\n /**\n * Return a new ``int208`` type for %%v%%.\n */\n static int208(v2) {\n return n2(v2, -208);\n }\n /**\n * Return a new ``int216`` type for %%v%%.\n */\n static int216(v2) {\n return n2(v2, -216);\n }\n /**\n * Return a new ``int224`` type for %%v%%.\n */\n static int224(v2) {\n return n2(v2, -224);\n }\n /**\n * Return a new ``int232`` type for %%v%%.\n */\n static int232(v2) {\n return n2(v2, -232);\n }\n /**\n * Return a new ``int240`` type for %%v%%.\n */\n static int240(v2) {\n return n2(v2, -240);\n }\n /**\n * Return a new ``int248`` type for %%v%%.\n */\n static int248(v2) {\n return n2(v2, -248);\n }\n /**\n * Return a new ``int256`` type for %%v%%.\n */\n static int256(v2) {\n return n2(v2, -256);\n }\n /**\n * Return a new ``int256`` type for %%v%%.\n */\n static int(v2) {\n return n2(v2, -256);\n }\n /**\n * Return a new ``bytes1`` type for %%v%%.\n */\n static bytes1(v2) {\n return b4(v2, 1);\n }\n /**\n * Return a new ``bytes2`` type for %%v%%.\n */\n static bytes2(v2) {\n return b4(v2, 2);\n }\n /**\n * Return a new ``bytes3`` type for %%v%%.\n */\n static bytes3(v2) {\n return b4(v2, 3);\n }\n /**\n * Return a new ``bytes4`` type for %%v%%.\n */\n static bytes4(v2) {\n return b4(v2, 4);\n }\n /**\n * Return a new ``bytes5`` type for %%v%%.\n */\n static bytes5(v2) {\n return b4(v2, 5);\n }\n /**\n * Return a new ``bytes6`` type for %%v%%.\n */\n static bytes6(v2) {\n return b4(v2, 6);\n }\n /**\n * Return a new ``bytes7`` type for %%v%%.\n */\n static bytes7(v2) {\n return b4(v2, 7);\n }\n /**\n * Return a new ``bytes8`` type for %%v%%.\n */\n static bytes8(v2) {\n return b4(v2, 8);\n }\n /**\n * Return a new ``bytes9`` type for %%v%%.\n */\n static bytes9(v2) {\n return b4(v2, 9);\n }\n /**\n * Return a new ``bytes10`` type for %%v%%.\n */\n static bytes10(v2) {\n return b4(v2, 10);\n }\n /**\n * Return a new ``bytes11`` type for %%v%%.\n */\n static bytes11(v2) {\n return b4(v2, 11);\n }\n /**\n * Return a new ``bytes12`` type for %%v%%.\n */\n static bytes12(v2) {\n return b4(v2, 12);\n }\n /**\n * Return a new ``bytes13`` type for %%v%%.\n */\n static bytes13(v2) {\n return b4(v2, 13);\n }\n /**\n * Return a new ``bytes14`` type for %%v%%.\n */\n static bytes14(v2) {\n return b4(v2, 14);\n }\n /**\n * Return a new ``bytes15`` type for %%v%%.\n */\n static bytes15(v2) {\n return b4(v2, 15);\n }\n /**\n * Return a new ``bytes16`` type for %%v%%.\n */\n static bytes16(v2) {\n return b4(v2, 16);\n }\n /**\n * Return a new ``bytes17`` type for %%v%%.\n */\n static bytes17(v2) {\n return b4(v2, 17);\n }\n /**\n * Return a new ``bytes18`` type for %%v%%.\n */\n static bytes18(v2) {\n return b4(v2, 18);\n }\n /**\n * Return a new ``bytes19`` type for %%v%%.\n */\n static bytes19(v2) {\n return b4(v2, 19);\n }\n /**\n * Return a new ``bytes20`` type for %%v%%.\n */\n static bytes20(v2) {\n return b4(v2, 20);\n }\n /**\n * Return a new ``bytes21`` type for %%v%%.\n */\n static bytes21(v2) {\n return b4(v2, 21);\n }\n /**\n * Return a new ``bytes22`` type for %%v%%.\n */\n static bytes22(v2) {\n return b4(v2, 22);\n }\n /**\n * Return a new ``bytes23`` type for %%v%%.\n */\n static bytes23(v2) {\n return b4(v2, 23);\n }\n /**\n * Return a new ``bytes24`` type for %%v%%.\n */\n static bytes24(v2) {\n return b4(v2, 24);\n }\n /**\n * Return a new ``bytes25`` type for %%v%%.\n */\n static bytes25(v2) {\n return b4(v2, 25);\n }\n /**\n * Return a new ``bytes26`` type for %%v%%.\n */\n static bytes26(v2) {\n return b4(v2, 26);\n }\n /**\n * Return a new ``bytes27`` type for %%v%%.\n */\n static bytes27(v2) {\n return b4(v2, 27);\n }\n /**\n * Return a new ``bytes28`` type for %%v%%.\n */\n static bytes28(v2) {\n return b4(v2, 28);\n }\n /**\n * Return a new ``bytes29`` type for %%v%%.\n */\n static bytes29(v2) {\n return b4(v2, 29);\n }\n /**\n * Return a new ``bytes30`` type for %%v%%.\n */\n static bytes30(v2) {\n return b4(v2, 30);\n }\n /**\n * Return a new ``bytes31`` type for %%v%%.\n */\n static bytes31(v2) {\n return b4(v2, 31);\n }\n /**\n * Return a new ``bytes32`` type for %%v%%.\n */\n static bytes32(v2) {\n return b4(v2, 32);\n }\n /**\n * Return a new ``address`` type for %%v%%.\n */\n static address(v2) {\n return new _Typed(_gaurd, \"address\", v2);\n }\n /**\n * Return a new ``bool`` type for %%v%%.\n */\n static bool(v2) {\n return new _Typed(_gaurd, \"bool\", !!v2);\n }\n /**\n * Return a new ``bytes`` type for %%v%%.\n */\n static bytes(v2) {\n return new _Typed(_gaurd, \"bytes\", v2);\n }\n /**\n * Return a new ``string`` type for %%v%%.\n */\n static string(v2) {\n return new _Typed(_gaurd, \"string\", v2);\n }\n /**\n * Return a new ``array`` type for %%v%%, allowing %%dynamic%% length.\n */\n static array(v2, dynamic) {\n throw new Error(\"not implemented yet\");\n return new _Typed(_gaurd, \"array\", v2, dynamic);\n }\n /**\n * Return a new ``tuple`` type for %%v%%, with the optional %%name%%.\n */\n static tuple(v2, name) {\n throw new Error(\"not implemented yet\");\n return new _Typed(_gaurd, \"tuple\", v2, name);\n }\n /**\n * Return a new ``uint8`` type for %%v%%.\n */\n static overrides(v2) {\n return new _Typed(_gaurd, \"overrides\", Object.assign({}, v2));\n }\n /**\n * Returns true only if %%value%% is a [[Typed]] instance.\n */\n static isTyped(value) {\n return value && typeof value === \"object\" && \"_typedSymbol\" in value && value._typedSymbol === _typedSymbol;\n }\n /**\n * If the value is a [[Typed]] instance, validates the underlying value\n * and returns it, otherwise returns value directly.\n *\n * This is useful for functions that with to accept either a [[Typed]]\n * object or values.\n */\n static dereference(value, type) {\n if (_Typed.isTyped(value)) {\n if (value.type !== type) {\n throw new Error(`invalid type: expecetd ${type}, got ${value.type}`);\n }\n return value.value;\n }\n return value;\n }\n };\n exports3.Typed = Typed;\n }\n });\n\n // ../../../node_modules/.pnpm/ethers@6.15.0_bufferutil@4.0.9_utf-8-validate@5.0.10/node_modules/ethers/lib.commonjs/abi/coders/address.js\n var require_address4 = __commonJS({\n \"../../../node_modules/.pnpm/ethers@6.15.0_bufferutil@4.0.9_utf-8-validate@5.0.10/node_modules/ethers/lib.commonjs/abi/coders/address.js\"(exports3) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n Object.defineProperty(exports3, \"__esModule\", { value: true });\n exports3.AddressCoder = void 0;\n var index_js_1 = require_address3();\n var maths_js_1 = require_maths();\n var typed_js_1 = require_typed();\n var abstract_coder_js_1 = require_abstract_coder2();\n var AddressCoder = class extends abstract_coder_js_1.Coder {\n constructor(localName) {\n super(\"address\", \"address\", localName, false);\n }\n defaultValue() {\n return \"0x0000000000000000000000000000000000000000\";\n }\n encode(writer, _value) {\n let value = typed_js_1.Typed.dereference(_value, \"string\");\n try {\n value = (0, index_js_1.getAddress)(value);\n } catch (error) {\n return this._throwError(error.message, _value);\n }\n return writer.writeValue(value);\n }\n decode(reader) {\n return (0, index_js_1.getAddress)((0, maths_js_1.toBeHex)(reader.readValue(), 20));\n }\n };\n exports3.AddressCoder = AddressCoder;\n }\n });\n\n // ../../../node_modules/.pnpm/ethers@6.15.0_bufferutil@4.0.9_utf-8-validate@5.0.10/node_modules/ethers/lib.commonjs/abi/coders/anonymous.js\n var require_anonymous2 = __commonJS({\n \"../../../node_modules/.pnpm/ethers@6.15.0_bufferutil@4.0.9_utf-8-validate@5.0.10/node_modules/ethers/lib.commonjs/abi/coders/anonymous.js\"(exports3) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n Object.defineProperty(exports3, \"__esModule\", { value: true });\n exports3.AnonymousCoder = void 0;\n var abstract_coder_js_1 = require_abstract_coder2();\n var AnonymousCoder = class extends abstract_coder_js_1.Coder {\n coder;\n constructor(coder) {\n super(coder.name, coder.type, \"_\", coder.dynamic);\n this.coder = coder;\n }\n defaultValue() {\n return this.coder.defaultValue();\n }\n encode(writer, value) {\n return this.coder.encode(writer, value);\n }\n decode(reader) {\n return this.coder.decode(reader);\n }\n };\n exports3.AnonymousCoder = AnonymousCoder;\n }\n });\n\n // ../../../node_modules/.pnpm/ethers@6.15.0_bufferutil@4.0.9_utf-8-validate@5.0.10/node_modules/ethers/lib.commonjs/abi/coders/array.js\n var require_array2 = __commonJS({\n \"../../../node_modules/.pnpm/ethers@6.15.0_bufferutil@4.0.9_utf-8-validate@5.0.10/node_modules/ethers/lib.commonjs/abi/coders/array.js\"(exports3) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n Object.defineProperty(exports3, \"__esModule\", { value: true });\n exports3.ArrayCoder = exports3.unpack = exports3.pack = void 0;\n var index_js_1 = require_utils8();\n var typed_js_1 = require_typed();\n var abstract_coder_js_1 = require_abstract_coder2();\n var anonymous_js_1 = require_anonymous2();\n function pack(writer, coders, values) {\n let arrayValues = [];\n if (Array.isArray(values)) {\n arrayValues = values;\n } else if (values && typeof values === \"object\") {\n let unique = {};\n arrayValues = coders.map((coder) => {\n const name = coder.localName;\n (0, index_js_1.assert)(name, \"cannot encode object for signature with missing names\", \"INVALID_ARGUMENT\", { argument: \"values\", info: { coder }, value: values });\n (0, index_js_1.assert)(!unique[name], \"cannot encode object for signature with duplicate names\", \"INVALID_ARGUMENT\", { argument: \"values\", info: { coder }, value: values });\n unique[name] = true;\n return values[name];\n });\n } else {\n (0, index_js_1.assertArgument)(false, \"invalid tuple value\", \"tuple\", values);\n }\n (0, index_js_1.assertArgument)(coders.length === arrayValues.length, \"types/value length mismatch\", \"tuple\", values);\n let staticWriter = new abstract_coder_js_1.Writer();\n let dynamicWriter = new abstract_coder_js_1.Writer();\n let updateFuncs = [];\n coders.forEach((coder, index2) => {\n let value = arrayValues[index2];\n if (coder.dynamic) {\n let dynamicOffset = dynamicWriter.length;\n coder.encode(dynamicWriter, value);\n let updateFunc = staticWriter.writeUpdatableValue();\n updateFuncs.push((baseOffset) => {\n updateFunc(baseOffset + dynamicOffset);\n });\n } else {\n coder.encode(staticWriter, value);\n }\n });\n updateFuncs.forEach((func) => {\n func(staticWriter.length);\n });\n let length2 = writer.appendWriter(staticWriter);\n length2 += writer.appendWriter(dynamicWriter);\n return length2;\n }\n exports3.pack = pack;\n function unpack(reader, coders) {\n let values = [];\n let keys = [];\n let baseReader = reader.subReader(0);\n coders.forEach((coder) => {\n let value = null;\n if (coder.dynamic) {\n let offset = reader.readIndex();\n let offsetReader = baseReader.subReader(offset);\n try {\n value = coder.decode(offsetReader);\n } catch (error) {\n if ((0, index_js_1.isError)(error, \"BUFFER_OVERRUN\")) {\n throw error;\n }\n value = error;\n value.baseType = coder.name;\n value.name = coder.localName;\n value.type = coder.type;\n }\n } else {\n try {\n value = coder.decode(reader);\n } catch (error) {\n if ((0, index_js_1.isError)(error, \"BUFFER_OVERRUN\")) {\n throw error;\n }\n value = error;\n value.baseType = coder.name;\n value.name = coder.localName;\n value.type = coder.type;\n }\n }\n if (value == void 0) {\n throw new Error(\"investigate\");\n }\n values.push(value);\n keys.push(coder.localName || null);\n });\n return abstract_coder_js_1.Result.fromItems(values, keys);\n }\n exports3.unpack = unpack;\n var ArrayCoder = class extends abstract_coder_js_1.Coder {\n coder;\n length;\n constructor(coder, length2, localName) {\n const type = coder.type + \"[\" + (length2 >= 0 ? length2 : \"\") + \"]\";\n const dynamic = length2 === -1 || coder.dynamic;\n super(\"array\", type, localName, dynamic);\n (0, index_js_1.defineProperties)(this, { coder, length: length2 });\n }\n defaultValue() {\n const defaultChild = this.coder.defaultValue();\n const result = [];\n for (let i3 = 0; i3 < this.length; i3++) {\n result.push(defaultChild);\n }\n return result;\n }\n encode(writer, _value) {\n const value = typed_js_1.Typed.dereference(_value, \"array\");\n if (!Array.isArray(value)) {\n this._throwError(\"expected array value\", value);\n }\n let count = this.length;\n if (count === -1) {\n count = value.length;\n writer.writeValue(value.length);\n }\n (0, index_js_1.assertArgumentCount)(value.length, count, \"coder array\" + (this.localName ? \" \" + this.localName : \"\"));\n let coders = [];\n for (let i3 = 0; i3 < value.length; i3++) {\n coders.push(this.coder);\n }\n return pack(writer, coders, value);\n }\n decode(reader) {\n let count = this.length;\n if (count === -1) {\n count = reader.readIndex();\n (0, index_js_1.assert)(count * abstract_coder_js_1.WordSize <= reader.dataLength, \"insufficient data length\", \"BUFFER_OVERRUN\", { buffer: reader.bytes, offset: count * abstract_coder_js_1.WordSize, length: reader.dataLength });\n }\n let coders = [];\n for (let i3 = 0; i3 < count; i3++) {\n coders.push(new anonymous_js_1.AnonymousCoder(this.coder));\n }\n return unpack(reader, coders);\n }\n };\n exports3.ArrayCoder = ArrayCoder;\n }\n });\n\n // ../../../node_modules/.pnpm/ethers@6.15.0_bufferutil@4.0.9_utf-8-validate@5.0.10/node_modules/ethers/lib.commonjs/abi/coders/boolean.js\n var require_boolean2 = __commonJS({\n \"../../../node_modules/.pnpm/ethers@6.15.0_bufferutil@4.0.9_utf-8-validate@5.0.10/node_modules/ethers/lib.commonjs/abi/coders/boolean.js\"(exports3) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n Object.defineProperty(exports3, \"__esModule\", { value: true });\n exports3.BooleanCoder = void 0;\n var typed_js_1 = require_typed();\n var abstract_coder_js_1 = require_abstract_coder2();\n var BooleanCoder = class extends abstract_coder_js_1.Coder {\n constructor(localName) {\n super(\"bool\", \"bool\", localName, false);\n }\n defaultValue() {\n return false;\n }\n encode(writer, _value) {\n const value = typed_js_1.Typed.dereference(_value, \"bool\");\n return writer.writeValue(value ? 1 : 0);\n }\n decode(reader) {\n return !!reader.readValue();\n }\n };\n exports3.BooleanCoder = BooleanCoder;\n }\n });\n\n // ../../../node_modules/.pnpm/ethers@6.15.0_bufferutil@4.0.9_utf-8-validate@5.0.10/node_modules/ethers/lib.commonjs/abi/coders/bytes.js\n var require_bytes2 = __commonJS({\n \"../../../node_modules/.pnpm/ethers@6.15.0_bufferutil@4.0.9_utf-8-validate@5.0.10/node_modules/ethers/lib.commonjs/abi/coders/bytes.js\"(exports3) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n Object.defineProperty(exports3, \"__esModule\", { value: true });\n exports3.BytesCoder = exports3.DynamicBytesCoder = void 0;\n var index_js_1 = require_utils8();\n var abstract_coder_js_1 = require_abstract_coder2();\n var DynamicBytesCoder = class extends abstract_coder_js_1.Coder {\n constructor(type, localName) {\n super(type, type, localName, true);\n }\n defaultValue() {\n return \"0x\";\n }\n encode(writer, value) {\n value = (0, index_js_1.getBytesCopy)(value);\n let length2 = writer.writeValue(value.length);\n length2 += writer.writeBytes(value);\n return length2;\n }\n decode(reader) {\n return reader.readBytes(reader.readIndex(), true);\n }\n };\n exports3.DynamicBytesCoder = DynamicBytesCoder;\n var BytesCoder = class extends DynamicBytesCoder {\n constructor(localName) {\n super(\"bytes\", localName);\n }\n decode(reader) {\n return (0, index_js_1.hexlify)(super.decode(reader));\n }\n };\n exports3.BytesCoder = BytesCoder;\n }\n });\n\n // ../../../node_modules/.pnpm/ethers@6.15.0_bufferutil@4.0.9_utf-8-validate@5.0.10/node_modules/ethers/lib.commonjs/abi/coders/fixed-bytes.js\n var require_fixed_bytes2 = __commonJS({\n \"../../../node_modules/.pnpm/ethers@6.15.0_bufferutil@4.0.9_utf-8-validate@5.0.10/node_modules/ethers/lib.commonjs/abi/coders/fixed-bytes.js\"(exports3) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n Object.defineProperty(exports3, \"__esModule\", { value: true });\n exports3.FixedBytesCoder = void 0;\n var index_js_1 = require_utils8();\n var typed_js_1 = require_typed();\n var abstract_coder_js_1 = require_abstract_coder2();\n var FixedBytesCoder = class extends abstract_coder_js_1.Coder {\n size;\n constructor(size6, localName) {\n let name = \"bytes\" + String(size6);\n super(name, name, localName, false);\n (0, index_js_1.defineProperties)(this, { size: size6 }, { size: \"number\" });\n }\n defaultValue() {\n return \"0x0000000000000000000000000000000000000000000000000000000000000000\".substring(0, 2 + this.size * 2);\n }\n encode(writer, _value) {\n let data = (0, index_js_1.getBytesCopy)(typed_js_1.Typed.dereference(_value, this.type));\n if (data.length !== this.size) {\n this._throwError(\"incorrect data length\", _value);\n }\n return writer.writeBytes(data);\n }\n decode(reader) {\n return (0, index_js_1.hexlify)(reader.readBytes(this.size));\n }\n };\n exports3.FixedBytesCoder = FixedBytesCoder;\n }\n });\n\n // ../../../node_modules/.pnpm/ethers@6.15.0_bufferutil@4.0.9_utf-8-validate@5.0.10/node_modules/ethers/lib.commonjs/abi/coders/null.js\n var require_null2 = __commonJS({\n \"../../../node_modules/.pnpm/ethers@6.15.0_bufferutil@4.0.9_utf-8-validate@5.0.10/node_modules/ethers/lib.commonjs/abi/coders/null.js\"(exports3) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n Object.defineProperty(exports3, \"__esModule\", { value: true });\n exports3.NullCoder = void 0;\n var abstract_coder_js_1 = require_abstract_coder2();\n var Empty = new Uint8Array([]);\n var NullCoder = class extends abstract_coder_js_1.Coder {\n constructor(localName) {\n super(\"null\", \"\", localName, false);\n }\n defaultValue() {\n return null;\n }\n encode(writer, value) {\n if (value != null) {\n this._throwError(\"not null\", value);\n }\n return writer.writeBytes(Empty);\n }\n decode(reader) {\n reader.readBytes(0);\n return null;\n }\n };\n exports3.NullCoder = NullCoder;\n }\n });\n\n // ../../../node_modules/.pnpm/ethers@6.15.0_bufferutil@4.0.9_utf-8-validate@5.0.10/node_modules/ethers/lib.commonjs/abi/coders/number.js\n var require_number2 = __commonJS({\n \"../../../node_modules/.pnpm/ethers@6.15.0_bufferutil@4.0.9_utf-8-validate@5.0.10/node_modules/ethers/lib.commonjs/abi/coders/number.js\"(exports3) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n Object.defineProperty(exports3, \"__esModule\", { value: true });\n exports3.NumberCoder = void 0;\n var index_js_1 = require_utils8();\n var typed_js_1 = require_typed();\n var abstract_coder_js_1 = require_abstract_coder2();\n var BN_0 = BigInt(0);\n var BN_1 = BigInt(1);\n var BN_MAX_UINT256 = BigInt(\"0xffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff\");\n var NumberCoder = class extends abstract_coder_js_1.Coder {\n size;\n signed;\n constructor(size6, signed, localName) {\n const name = (signed ? \"int\" : \"uint\") + size6 * 8;\n super(name, name, localName, false);\n (0, index_js_1.defineProperties)(this, { size: size6, signed }, { size: \"number\", signed: \"boolean\" });\n }\n defaultValue() {\n return 0;\n }\n encode(writer, _value) {\n let value = (0, index_js_1.getBigInt)(typed_js_1.Typed.dereference(_value, this.type));\n let maxUintValue = (0, index_js_1.mask)(BN_MAX_UINT256, abstract_coder_js_1.WordSize * 8);\n if (this.signed) {\n let bounds = (0, index_js_1.mask)(maxUintValue, this.size * 8 - 1);\n if (value > bounds || value < -(bounds + BN_1)) {\n this._throwError(\"value out-of-bounds\", _value);\n }\n value = (0, index_js_1.toTwos)(value, 8 * abstract_coder_js_1.WordSize);\n } else if (value < BN_0 || value > (0, index_js_1.mask)(maxUintValue, this.size * 8)) {\n this._throwError(\"value out-of-bounds\", _value);\n }\n return writer.writeValue(value);\n }\n decode(reader) {\n let value = (0, index_js_1.mask)(reader.readValue(), this.size * 8);\n if (this.signed) {\n value = (0, index_js_1.fromTwos)(value, this.size * 8);\n }\n return value;\n }\n };\n exports3.NumberCoder = NumberCoder;\n }\n });\n\n // ../../../node_modules/.pnpm/ethers@6.15.0_bufferutil@4.0.9_utf-8-validate@5.0.10/node_modules/ethers/lib.commonjs/abi/coders/string.js\n var require_string2 = __commonJS({\n \"../../../node_modules/.pnpm/ethers@6.15.0_bufferutil@4.0.9_utf-8-validate@5.0.10/node_modules/ethers/lib.commonjs/abi/coders/string.js\"(exports3) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n Object.defineProperty(exports3, \"__esModule\", { value: true });\n exports3.StringCoder = void 0;\n var utf8_js_1 = require_utf82();\n var typed_js_1 = require_typed();\n var bytes_js_1 = require_bytes2();\n var StringCoder = class extends bytes_js_1.DynamicBytesCoder {\n constructor(localName) {\n super(\"string\", localName);\n }\n defaultValue() {\n return \"\";\n }\n encode(writer, _value) {\n return super.encode(writer, (0, utf8_js_1.toUtf8Bytes)(typed_js_1.Typed.dereference(_value, \"string\")));\n }\n decode(reader) {\n return (0, utf8_js_1.toUtf8String)(super.decode(reader));\n }\n };\n exports3.StringCoder = StringCoder;\n }\n });\n\n // ../../../node_modules/.pnpm/ethers@6.15.0_bufferutil@4.0.9_utf-8-validate@5.0.10/node_modules/ethers/lib.commonjs/abi/coders/tuple.js\n var require_tuple2 = __commonJS({\n \"../../../node_modules/.pnpm/ethers@6.15.0_bufferutil@4.0.9_utf-8-validate@5.0.10/node_modules/ethers/lib.commonjs/abi/coders/tuple.js\"(exports3) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n Object.defineProperty(exports3, \"__esModule\", { value: true });\n exports3.TupleCoder = void 0;\n var properties_js_1 = require_properties();\n var typed_js_1 = require_typed();\n var abstract_coder_js_1 = require_abstract_coder2();\n var array_js_1 = require_array2();\n var TupleCoder = class extends abstract_coder_js_1.Coder {\n coders;\n constructor(coders, localName) {\n let dynamic = false;\n const types = [];\n coders.forEach((coder) => {\n if (coder.dynamic) {\n dynamic = true;\n }\n types.push(coder.type);\n });\n const type = \"tuple(\" + types.join(\",\") + \")\";\n super(\"tuple\", type, localName, dynamic);\n (0, properties_js_1.defineProperties)(this, { coders: Object.freeze(coders.slice()) });\n }\n defaultValue() {\n const values = [];\n this.coders.forEach((coder) => {\n values.push(coder.defaultValue());\n });\n const uniqueNames = this.coders.reduce((accum, coder) => {\n const name = coder.localName;\n if (name) {\n if (!accum[name]) {\n accum[name] = 0;\n }\n accum[name]++;\n }\n return accum;\n }, {});\n this.coders.forEach((coder, index2) => {\n let name = coder.localName;\n if (!name || uniqueNames[name] !== 1) {\n return;\n }\n if (name === \"length\") {\n name = \"_length\";\n }\n if (values[name] != null) {\n return;\n }\n values[name] = values[index2];\n });\n return Object.freeze(values);\n }\n encode(writer, _value) {\n const value = typed_js_1.Typed.dereference(_value, \"tuple\");\n return (0, array_js_1.pack)(writer, this.coders, value);\n }\n decode(reader) {\n return (0, array_js_1.unpack)(reader, this.coders);\n }\n };\n exports3.TupleCoder = TupleCoder;\n }\n });\n\n // ../../../node_modules/.pnpm/ethers@6.15.0_bufferutil@4.0.9_utf-8-validate@5.0.10/node_modules/ethers/lib.commonjs/transaction/accesslist.js\n var require_accesslist = __commonJS({\n \"../../../node_modules/.pnpm/ethers@6.15.0_bufferutil@4.0.9_utf-8-validate@5.0.10/node_modules/ethers/lib.commonjs/transaction/accesslist.js\"(exports3) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n Object.defineProperty(exports3, \"__esModule\", { value: true });\n exports3.accessListify = void 0;\n var index_js_1 = require_address3();\n var index_js_2 = require_utils8();\n function accessSetify(addr, storageKeys) {\n return {\n address: (0, index_js_1.getAddress)(addr),\n storageKeys: storageKeys.map((storageKey, index2) => {\n (0, index_js_2.assertArgument)((0, index_js_2.isHexString)(storageKey, 32), \"invalid slot\", `storageKeys[${index2}]`, storageKey);\n return storageKey.toLowerCase();\n })\n };\n }\n function accessListify(value) {\n if (Array.isArray(value)) {\n return value.map((set, index2) => {\n if (Array.isArray(set)) {\n (0, index_js_2.assertArgument)(set.length === 2, \"invalid slot set\", `value[${index2}]`, set);\n return accessSetify(set[0], set[1]);\n }\n (0, index_js_2.assertArgument)(set != null && typeof set === \"object\", \"invalid address-slot set\", \"value\", value);\n return accessSetify(set.address, set.storageKeys);\n });\n }\n (0, index_js_2.assertArgument)(value != null && typeof value === \"object\", \"invalid access list\", \"value\", value);\n const result = Object.keys(value).map((addr) => {\n const storageKeys = value[addr].reduce((accum, storageKey) => {\n accum[storageKey] = true;\n return accum;\n }, {});\n return accessSetify(addr, Object.keys(storageKeys).sort());\n });\n result.sort((a3, b4) => a3.address.localeCompare(b4.address));\n return result;\n }\n exports3.accessListify = accessListify;\n }\n });\n\n // ../../../node_modules/.pnpm/ethers@6.15.0_bufferutil@4.0.9_utf-8-validate@5.0.10/node_modules/ethers/lib.commonjs/transaction/authorization.js\n var require_authorization = __commonJS({\n \"../../../node_modules/.pnpm/ethers@6.15.0_bufferutil@4.0.9_utf-8-validate@5.0.10/node_modules/ethers/lib.commonjs/transaction/authorization.js\"(exports3) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n Object.defineProperty(exports3, \"__esModule\", { value: true });\n exports3.authorizationify = void 0;\n var index_js_1 = require_address3();\n var index_js_2 = require_crypto2();\n var index_js_3 = require_utils8();\n function authorizationify(auth) {\n return {\n address: (0, index_js_1.getAddress)(auth.address),\n nonce: (0, index_js_3.getBigInt)(auth.nonce != null ? auth.nonce : 0),\n chainId: (0, index_js_3.getBigInt)(auth.chainId != null ? auth.chainId : 0),\n signature: index_js_2.Signature.from(auth.signature)\n };\n }\n exports3.authorizationify = authorizationify;\n }\n });\n\n // ../../../node_modules/.pnpm/ethers@6.15.0_bufferutil@4.0.9_utf-8-validate@5.0.10/node_modules/ethers/lib.commonjs/transaction/address.js\n var require_address5 = __commonJS({\n \"../../../node_modules/.pnpm/ethers@6.15.0_bufferutil@4.0.9_utf-8-validate@5.0.10/node_modules/ethers/lib.commonjs/transaction/address.js\"(exports3) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n Object.defineProperty(exports3, \"__esModule\", { value: true });\n exports3.recoverAddress = exports3.computeAddress = void 0;\n var index_js_1 = require_address3();\n var index_js_2 = require_crypto2();\n function computeAddress(key) {\n let pubkey;\n if (typeof key === \"string\") {\n pubkey = index_js_2.SigningKey.computePublicKey(key, false);\n } else {\n pubkey = key.publicKey;\n }\n return (0, index_js_1.getAddress)((0, index_js_2.keccak256)(\"0x\" + pubkey.substring(4)).substring(26));\n }\n exports3.computeAddress = computeAddress;\n function recoverAddress3(digest, signature) {\n return computeAddress(index_js_2.SigningKey.recoverPublicKey(digest, signature));\n }\n exports3.recoverAddress = recoverAddress3;\n }\n });\n\n // ../../../node_modules/.pnpm/ethers@6.15.0_bufferutil@4.0.9_utf-8-validate@5.0.10/node_modules/ethers/lib.commonjs/transaction/transaction.js\n var require_transaction = __commonJS({\n \"../../../node_modules/.pnpm/ethers@6.15.0_bufferutil@4.0.9_utf-8-validate@5.0.10/node_modules/ethers/lib.commonjs/transaction/transaction.js\"(exports3) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n Object.defineProperty(exports3, \"__esModule\", { value: true });\n exports3.Transaction = void 0;\n var index_js_1 = require_address3();\n var addresses_js_1 = require_addresses2();\n var index_js_2 = require_crypto2();\n var index_js_3 = require_utils8();\n var accesslist_js_1 = require_accesslist();\n var authorization_js_1 = require_authorization();\n var address_js_1 = require_address5();\n var BN_0 = BigInt(0);\n var BN_2 = BigInt(2);\n var BN_27 = BigInt(27);\n var BN_28 = BigInt(28);\n var BN_35 = BigInt(35);\n var BN_MAX_UINT = BigInt(\"0xffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff\");\n var BLOB_SIZE = 4096 * 32;\n function getKzgLibrary(kzg) {\n const blobToKzgCommitment = (blob) => {\n if (\"computeBlobProof\" in kzg) {\n if (\"blobToKzgCommitment\" in kzg && typeof kzg.blobToKzgCommitment === \"function\") {\n return (0, index_js_3.getBytes)(kzg.blobToKzgCommitment((0, index_js_3.hexlify)(blob)));\n }\n } else if (\"blobToKzgCommitment\" in kzg && typeof kzg.blobToKzgCommitment === \"function\") {\n return (0, index_js_3.getBytes)(kzg.blobToKzgCommitment(blob));\n }\n if (\"blobToKZGCommitment\" in kzg && typeof kzg.blobToKZGCommitment === \"function\") {\n return (0, index_js_3.getBytes)(kzg.blobToKZGCommitment((0, index_js_3.hexlify)(blob)));\n }\n (0, index_js_3.assertArgument)(false, \"unsupported KZG library\", \"kzg\", kzg);\n };\n const computeBlobKzgProof = (blob, commitment) => {\n if (\"computeBlobProof\" in kzg && typeof kzg.computeBlobProof === \"function\") {\n return (0, index_js_3.getBytes)(kzg.computeBlobProof((0, index_js_3.hexlify)(blob), (0, index_js_3.hexlify)(commitment)));\n }\n if (\"computeBlobKzgProof\" in kzg && typeof kzg.computeBlobKzgProof === \"function\") {\n return kzg.computeBlobKzgProof(blob, commitment);\n }\n if (\"computeBlobKZGProof\" in kzg && typeof kzg.computeBlobKZGProof === \"function\") {\n return (0, index_js_3.getBytes)(kzg.computeBlobKZGProof((0, index_js_3.hexlify)(blob), (0, index_js_3.hexlify)(commitment)));\n }\n (0, index_js_3.assertArgument)(false, \"unsupported KZG library\", \"kzg\", kzg);\n };\n return { blobToKzgCommitment, computeBlobKzgProof };\n }\n function getVersionedHash(version6, hash3) {\n let versioned = version6.toString(16);\n while (versioned.length < 2) {\n versioned = \"0\" + versioned;\n }\n versioned += (0, index_js_2.sha256)(hash3).substring(4);\n return \"0x\" + versioned;\n }\n function handleAddress(value) {\n if (value === \"0x\") {\n return null;\n }\n return (0, index_js_1.getAddress)(value);\n }\n function handleAccessList(value, param) {\n try {\n return (0, accesslist_js_1.accessListify)(value);\n } catch (error) {\n (0, index_js_3.assertArgument)(false, error.message, param, value);\n }\n }\n function handleAuthorizationList(value, param) {\n try {\n if (!Array.isArray(value)) {\n throw new Error(\"authorizationList: invalid array\");\n }\n const result = [];\n for (let i3 = 0; i3 < value.length; i3++) {\n const auth = value[i3];\n if (!Array.isArray(auth)) {\n throw new Error(`authorization[${i3}]: invalid array`);\n }\n if (auth.length !== 6) {\n throw new Error(`authorization[${i3}]: wrong length`);\n }\n if (!auth[1]) {\n throw new Error(`authorization[${i3}]: null address`);\n }\n result.push({\n address: handleAddress(auth[1]),\n nonce: handleUint(auth[2], \"nonce\"),\n chainId: handleUint(auth[0], \"chainId\"),\n signature: index_js_2.Signature.from({\n yParity: handleNumber(auth[3], \"yParity\"),\n r: (0, index_js_3.zeroPadValue)(auth[4], 32),\n s: (0, index_js_3.zeroPadValue)(auth[5], 32)\n })\n });\n }\n return result;\n } catch (error) {\n (0, index_js_3.assertArgument)(false, error.message, param, value);\n }\n }\n function handleNumber(_value, param) {\n if (_value === \"0x\") {\n return 0;\n }\n return (0, index_js_3.getNumber)(_value, param);\n }\n function handleUint(_value, param) {\n if (_value === \"0x\") {\n return BN_0;\n }\n const value = (0, index_js_3.getBigInt)(_value, param);\n (0, index_js_3.assertArgument)(value <= BN_MAX_UINT, \"value exceeds uint size\", param, value);\n return value;\n }\n function formatNumber(_value, name) {\n const value = (0, index_js_3.getBigInt)(_value, \"value\");\n const result = (0, index_js_3.toBeArray)(value);\n (0, index_js_3.assertArgument)(result.length <= 32, `value too large`, `tx.${name}`, value);\n return result;\n }\n function formatAccessList(value) {\n return (0, accesslist_js_1.accessListify)(value).map((set) => [set.address, set.storageKeys]);\n }\n function formatAuthorizationList3(value) {\n return value.map((a3) => {\n return [\n formatNumber(a3.chainId, \"chainId\"),\n a3.address,\n formatNumber(a3.nonce, \"nonce\"),\n formatNumber(a3.signature.yParity, \"yParity\"),\n (0, index_js_3.toBeArray)(a3.signature.r),\n (0, index_js_3.toBeArray)(a3.signature.s)\n ];\n });\n }\n function formatHashes(value, param) {\n (0, index_js_3.assertArgument)(Array.isArray(value), `invalid ${param}`, \"value\", value);\n for (let i3 = 0; i3 < value.length; i3++) {\n (0, index_js_3.assertArgument)((0, index_js_3.isHexString)(value[i3], 32), \"invalid ${ param } hash\", `value[${i3}]`, value[i3]);\n }\n return value;\n }\n function _parseLegacy(data) {\n const fields = (0, index_js_3.decodeRlp)(data);\n (0, index_js_3.assertArgument)(Array.isArray(fields) && (fields.length === 9 || fields.length === 6), \"invalid field count for legacy transaction\", \"data\", data);\n const tx = {\n type: 0,\n nonce: handleNumber(fields[0], \"nonce\"),\n gasPrice: handleUint(fields[1], \"gasPrice\"),\n gasLimit: handleUint(fields[2], \"gasLimit\"),\n to: handleAddress(fields[3]),\n value: handleUint(fields[4], \"value\"),\n data: (0, index_js_3.hexlify)(fields[5]),\n chainId: BN_0\n };\n if (fields.length === 6) {\n return tx;\n }\n const v2 = handleUint(fields[6], \"v\");\n const r2 = handleUint(fields[7], \"r\");\n const s4 = handleUint(fields[8], \"s\");\n if (r2 === BN_0 && s4 === BN_0) {\n tx.chainId = v2;\n } else {\n let chainId = (v2 - BN_35) / BN_2;\n if (chainId < BN_0) {\n chainId = BN_0;\n }\n tx.chainId = chainId;\n (0, index_js_3.assertArgument)(chainId !== BN_0 || (v2 === BN_27 || v2 === BN_28), \"non-canonical legacy v\", \"v\", fields[6]);\n tx.signature = index_js_2.Signature.from({\n r: (0, index_js_3.zeroPadValue)(fields[7], 32),\n s: (0, index_js_3.zeroPadValue)(fields[8], 32),\n v: v2\n });\n }\n return tx;\n }\n function _serializeLegacy(tx, sig) {\n const fields = [\n formatNumber(tx.nonce, \"nonce\"),\n formatNumber(tx.gasPrice || 0, \"gasPrice\"),\n formatNumber(tx.gasLimit, \"gasLimit\"),\n tx.to || \"0x\",\n formatNumber(tx.value, \"value\"),\n tx.data\n ];\n let chainId = BN_0;\n if (tx.chainId != BN_0) {\n chainId = (0, index_js_3.getBigInt)(tx.chainId, \"tx.chainId\");\n (0, index_js_3.assertArgument)(!sig || sig.networkV == null || sig.legacyChainId === chainId, \"tx.chainId/sig.v mismatch\", \"sig\", sig);\n } else if (tx.signature) {\n const legacy = tx.signature.legacyChainId;\n if (legacy != null) {\n chainId = legacy;\n }\n }\n if (!sig) {\n if (chainId !== BN_0) {\n fields.push((0, index_js_3.toBeArray)(chainId));\n fields.push(\"0x\");\n fields.push(\"0x\");\n }\n return (0, index_js_3.encodeRlp)(fields);\n }\n let v2 = BigInt(27 + sig.yParity);\n if (chainId !== BN_0) {\n v2 = index_js_2.Signature.getChainIdV(chainId, sig.v);\n } else if (BigInt(sig.v) !== v2) {\n (0, index_js_3.assertArgument)(false, \"tx.chainId/sig.v mismatch\", \"sig\", sig);\n }\n fields.push((0, index_js_3.toBeArray)(v2));\n fields.push((0, index_js_3.toBeArray)(sig.r));\n fields.push((0, index_js_3.toBeArray)(sig.s));\n return (0, index_js_3.encodeRlp)(fields);\n }\n function _parseEipSignature(tx, fields) {\n let yParity;\n try {\n yParity = handleNumber(fields[0], \"yParity\");\n if (yParity !== 0 && yParity !== 1) {\n throw new Error(\"bad yParity\");\n }\n } catch (error) {\n (0, index_js_3.assertArgument)(false, \"invalid yParity\", \"yParity\", fields[0]);\n }\n const r2 = (0, index_js_3.zeroPadValue)(fields[1], 32);\n const s4 = (0, index_js_3.zeroPadValue)(fields[2], 32);\n const signature = index_js_2.Signature.from({ r: r2, s: s4, yParity });\n tx.signature = signature;\n }\n function _parseEip1559(data) {\n const fields = (0, index_js_3.decodeRlp)((0, index_js_3.getBytes)(data).slice(1));\n (0, index_js_3.assertArgument)(Array.isArray(fields) && (fields.length === 9 || fields.length === 12), \"invalid field count for transaction type: 2\", \"data\", (0, index_js_3.hexlify)(data));\n const tx = {\n type: 2,\n chainId: handleUint(fields[0], \"chainId\"),\n nonce: handleNumber(fields[1], \"nonce\"),\n maxPriorityFeePerGas: handleUint(fields[2], \"maxPriorityFeePerGas\"),\n maxFeePerGas: handleUint(fields[3], \"maxFeePerGas\"),\n gasPrice: null,\n gasLimit: handleUint(fields[4], \"gasLimit\"),\n to: handleAddress(fields[5]),\n value: handleUint(fields[6], \"value\"),\n data: (0, index_js_3.hexlify)(fields[7]),\n accessList: handleAccessList(fields[8], \"accessList\")\n };\n if (fields.length === 9) {\n return tx;\n }\n _parseEipSignature(tx, fields.slice(9));\n return tx;\n }\n function _serializeEip1559(tx, sig) {\n const fields = [\n formatNumber(tx.chainId, \"chainId\"),\n formatNumber(tx.nonce, \"nonce\"),\n formatNumber(tx.maxPriorityFeePerGas || 0, \"maxPriorityFeePerGas\"),\n formatNumber(tx.maxFeePerGas || 0, \"maxFeePerGas\"),\n formatNumber(tx.gasLimit, \"gasLimit\"),\n tx.to || \"0x\",\n formatNumber(tx.value, \"value\"),\n tx.data,\n formatAccessList(tx.accessList || [])\n ];\n if (sig) {\n fields.push(formatNumber(sig.yParity, \"yParity\"));\n fields.push((0, index_js_3.toBeArray)(sig.r));\n fields.push((0, index_js_3.toBeArray)(sig.s));\n }\n return (0, index_js_3.concat)([\"0x02\", (0, index_js_3.encodeRlp)(fields)]);\n }\n function _parseEip2930(data) {\n const fields = (0, index_js_3.decodeRlp)((0, index_js_3.getBytes)(data).slice(1));\n (0, index_js_3.assertArgument)(Array.isArray(fields) && (fields.length === 8 || fields.length === 11), \"invalid field count for transaction type: 1\", \"data\", (0, index_js_3.hexlify)(data));\n const tx = {\n type: 1,\n chainId: handleUint(fields[0], \"chainId\"),\n nonce: handleNumber(fields[1], \"nonce\"),\n gasPrice: handleUint(fields[2], \"gasPrice\"),\n gasLimit: handleUint(fields[3], \"gasLimit\"),\n to: handleAddress(fields[4]),\n value: handleUint(fields[5], \"value\"),\n data: (0, index_js_3.hexlify)(fields[6]),\n accessList: handleAccessList(fields[7], \"accessList\")\n };\n if (fields.length === 8) {\n return tx;\n }\n _parseEipSignature(tx, fields.slice(8));\n return tx;\n }\n function _serializeEip2930(tx, sig) {\n const fields = [\n formatNumber(tx.chainId, \"chainId\"),\n formatNumber(tx.nonce, \"nonce\"),\n formatNumber(tx.gasPrice || 0, \"gasPrice\"),\n formatNumber(tx.gasLimit, \"gasLimit\"),\n tx.to || \"0x\",\n formatNumber(tx.value, \"value\"),\n tx.data,\n formatAccessList(tx.accessList || [])\n ];\n if (sig) {\n fields.push(formatNumber(sig.yParity, \"recoveryParam\"));\n fields.push((0, index_js_3.toBeArray)(sig.r));\n fields.push((0, index_js_3.toBeArray)(sig.s));\n }\n return (0, index_js_3.concat)([\"0x01\", (0, index_js_3.encodeRlp)(fields)]);\n }\n function _parseEip4844(data) {\n let fields = (0, index_js_3.decodeRlp)((0, index_js_3.getBytes)(data).slice(1));\n let typeName = \"3\";\n let blobs = null;\n if (fields.length === 4 && Array.isArray(fields[0])) {\n typeName = \"3 (network format)\";\n const fBlobs = fields[1], fCommits = fields[2], fProofs = fields[3];\n (0, index_js_3.assertArgument)(Array.isArray(fBlobs), \"invalid network format: blobs not an array\", \"fields[1]\", fBlobs);\n (0, index_js_3.assertArgument)(Array.isArray(fCommits), \"invalid network format: commitments not an array\", \"fields[2]\", fCommits);\n (0, index_js_3.assertArgument)(Array.isArray(fProofs), \"invalid network format: proofs not an array\", \"fields[3]\", fProofs);\n (0, index_js_3.assertArgument)(fBlobs.length === fCommits.length, \"invalid network format: blobs/commitments length mismatch\", \"fields\", fields);\n (0, index_js_3.assertArgument)(fBlobs.length === fProofs.length, \"invalid network format: blobs/proofs length mismatch\", \"fields\", fields);\n blobs = [];\n for (let i3 = 0; i3 < fields[1].length; i3++) {\n blobs.push({\n data: fBlobs[i3],\n commitment: fCommits[i3],\n proof: fProofs[i3]\n });\n }\n fields = fields[0];\n }\n (0, index_js_3.assertArgument)(Array.isArray(fields) && (fields.length === 11 || fields.length === 14), `invalid field count for transaction type: ${typeName}`, \"data\", (0, index_js_3.hexlify)(data));\n const tx = {\n type: 3,\n chainId: handleUint(fields[0], \"chainId\"),\n nonce: handleNumber(fields[1], \"nonce\"),\n maxPriorityFeePerGas: handleUint(fields[2], \"maxPriorityFeePerGas\"),\n maxFeePerGas: handleUint(fields[3], \"maxFeePerGas\"),\n gasPrice: null,\n gasLimit: handleUint(fields[4], \"gasLimit\"),\n to: handleAddress(fields[5]),\n value: handleUint(fields[6], \"value\"),\n data: (0, index_js_3.hexlify)(fields[7]),\n accessList: handleAccessList(fields[8], \"accessList\"),\n maxFeePerBlobGas: handleUint(fields[9], \"maxFeePerBlobGas\"),\n blobVersionedHashes: fields[10]\n };\n if (blobs) {\n tx.blobs = blobs;\n }\n (0, index_js_3.assertArgument)(tx.to != null, `invalid address for transaction type: ${typeName}`, \"data\", data);\n (0, index_js_3.assertArgument)(Array.isArray(tx.blobVersionedHashes), \"invalid blobVersionedHashes: must be an array\", \"data\", data);\n for (let i3 = 0; i3 < tx.blobVersionedHashes.length; i3++) {\n (0, index_js_3.assertArgument)((0, index_js_3.isHexString)(tx.blobVersionedHashes[i3], 32), `invalid blobVersionedHash at index ${i3}: must be length 32`, \"data\", data);\n }\n if (fields.length === 11) {\n return tx;\n }\n _parseEipSignature(tx, fields.slice(11));\n return tx;\n }\n function _serializeEip4844(tx, sig, blobs) {\n const fields = [\n formatNumber(tx.chainId, \"chainId\"),\n formatNumber(tx.nonce, \"nonce\"),\n formatNumber(tx.maxPriorityFeePerGas || 0, \"maxPriorityFeePerGas\"),\n formatNumber(tx.maxFeePerGas || 0, \"maxFeePerGas\"),\n formatNumber(tx.gasLimit, \"gasLimit\"),\n tx.to || addresses_js_1.ZeroAddress,\n formatNumber(tx.value, \"value\"),\n tx.data,\n formatAccessList(tx.accessList || []),\n formatNumber(tx.maxFeePerBlobGas || 0, \"maxFeePerBlobGas\"),\n formatHashes(tx.blobVersionedHashes || [], \"blobVersionedHashes\")\n ];\n if (sig) {\n fields.push(formatNumber(sig.yParity, \"yParity\"));\n fields.push((0, index_js_3.toBeArray)(sig.r));\n fields.push((0, index_js_3.toBeArray)(sig.s));\n if (blobs) {\n return (0, index_js_3.concat)([\n \"0x03\",\n (0, index_js_3.encodeRlp)([\n fields,\n blobs.map((b4) => b4.data),\n blobs.map((b4) => b4.commitment),\n blobs.map((b4) => b4.proof)\n ])\n ]);\n }\n }\n return (0, index_js_3.concat)([\"0x03\", (0, index_js_3.encodeRlp)(fields)]);\n }\n function _parseEip7702(data) {\n const fields = (0, index_js_3.decodeRlp)((0, index_js_3.getBytes)(data).slice(1));\n (0, index_js_3.assertArgument)(Array.isArray(fields) && (fields.length === 10 || fields.length === 13), \"invalid field count for transaction type: 4\", \"data\", (0, index_js_3.hexlify)(data));\n const tx = {\n type: 4,\n chainId: handleUint(fields[0], \"chainId\"),\n nonce: handleNumber(fields[1], \"nonce\"),\n maxPriorityFeePerGas: handleUint(fields[2], \"maxPriorityFeePerGas\"),\n maxFeePerGas: handleUint(fields[3], \"maxFeePerGas\"),\n gasPrice: null,\n gasLimit: handleUint(fields[4], \"gasLimit\"),\n to: handleAddress(fields[5]),\n value: handleUint(fields[6], \"value\"),\n data: (0, index_js_3.hexlify)(fields[7]),\n accessList: handleAccessList(fields[8], \"accessList\"),\n authorizationList: handleAuthorizationList(fields[9], \"authorizationList\")\n };\n if (fields.length === 10) {\n return tx;\n }\n _parseEipSignature(tx, fields.slice(10));\n return tx;\n }\n function _serializeEip7702(tx, sig) {\n const fields = [\n formatNumber(tx.chainId, \"chainId\"),\n formatNumber(tx.nonce, \"nonce\"),\n formatNumber(tx.maxPriorityFeePerGas || 0, \"maxPriorityFeePerGas\"),\n formatNumber(tx.maxFeePerGas || 0, \"maxFeePerGas\"),\n formatNumber(tx.gasLimit, \"gasLimit\"),\n tx.to || \"0x\",\n formatNumber(tx.value, \"value\"),\n tx.data,\n formatAccessList(tx.accessList || []),\n formatAuthorizationList3(tx.authorizationList || [])\n ];\n if (sig) {\n fields.push(formatNumber(sig.yParity, \"yParity\"));\n fields.push((0, index_js_3.toBeArray)(sig.r));\n fields.push((0, index_js_3.toBeArray)(sig.s));\n }\n return (0, index_js_3.concat)([\"0x04\", (0, index_js_3.encodeRlp)(fields)]);\n }\n var Transaction = class _Transaction {\n #type;\n #to;\n #data;\n #nonce;\n #gasLimit;\n #gasPrice;\n #maxPriorityFeePerGas;\n #maxFeePerGas;\n #value;\n #chainId;\n #sig;\n #accessList;\n #maxFeePerBlobGas;\n #blobVersionedHashes;\n #kzg;\n #blobs;\n #auths;\n /**\n * The transaction type.\n *\n * If null, the type will be automatically inferred based on\n * explicit properties.\n */\n get type() {\n return this.#type;\n }\n set type(value) {\n switch (value) {\n case null:\n this.#type = null;\n break;\n case 0:\n case \"legacy\":\n this.#type = 0;\n break;\n case 1:\n case \"berlin\":\n case \"eip-2930\":\n this.#type = 1;\n break;\n case 2:\n case \"london\":\n case \"eip-1559\":\n this.#type = 2;\n break;\n case 3:\n case \"cancun\":\n case \"eip-4844\":\n this.#type = 3;\n break;\n case 4:\n case \"pectra\":\n case \"eip-7702\":\n this.#type = 4;\n break;\n default:\n (0, index_js_3.assertArgument)(false, \"unsupported transaction type\", \"type\", value);\n }\n }\n /**\n * The name of the transaction type.\n */\n get typeName() {\n switch (this.type) {\n case 0:\n return \"legacy\";\n case 1:\n return \"eip-2930\";\n case 2:\n return \"eip-1559\";\n case 3:\n return \"eip-4844\";\n case 4:\n return \"eip-7702\";\n }\n return null;\n }\n /**\n * The ``to`` address for the transaction or ``null`` if the\n * transaction is an ``init`` transaction.\n */\n get to() {\n const value = this.#to;\n if (value == null && this.type === 3) {\n return addresses_js_1.ZeroAddress;\n }\n return value;\n }\n set to(value) {\n this.#to = value == null ? null : (0, index_js_1.getAddress)(value);\n }\n /**\n * The transaction nonce.\n */\n get nonce() {\n return this.#nonce;\n }\n set nonce(value) {\n this.#nonce = (0, index_js_3.getNumber)(value, \"value\");\n }\n /**\n * The gas limit.\n */\n get gasLimit() {\n return this.#gasLimit;\n }\n set gasLimit(value) {\n this.#gasLimit = (0, index_js_3.getBigInt)(value);\n }\n /**\n * The gas price.\n *\n * On legacy networks this defines the fee that will be paid. On\n * EIP-1559 networks, this should be ``null``.\n */\n get gasPrice() {\n const value = this.#gasPrice;\n if (value == null && (this.type === 0 || this.type === 1)) {\n return BN_0;\n }\n return value;\n }\n set gasPrice(value) {\n this.#gasPrice = value == null ? null : (0, index_js_3.getBigInt)(value, \"gasPrice\");\n }\n /**\n * The maximum priority fee per unit of gas to pay. On legacy\n * networks this should be ``null``.\n */\n get maxPriorityFeePerGas() {\n const value = this.#maxPriorityFeePerGas;\n if (value == null) {\n if (this.type === 2 || this.type === 3) {\n return BN_0;\n }\n return null;\n }\n return value;\n }\n set maxPriorityFeePerGas(value) {\n this.#maxPriorityFeePerGas = value == null ? null : (0, index_js_3.getBigInt)(value, \"maxPriorityFeePerGas\");\n }\n /**\n * The maximum total fee per unit of gas to pay. On legacy\n * networks this should be ``null``.\n */\n get maxFeePerGas() {\n const value = this.#maxFeePerGas;\n if (value == null) {\n if (this.type === 2 || this.type === 3) {\n return BN_0;\n }\n return null;\n }\n return value;\n }\n set maxFeePerGas(value) {\n this.#maxFeePerGas = value == null ? null : (0, index_js_3.getBigInt)(value, \"maxFeePerGas\");\n }\n /**\n * The transaction data. For ``init`` transactions this is the\n * deployment code.\n */\n get data() {\n return this.#data;\n }\n set data(value) {\n this.#data = (0, index_js_3.hexlify)(value);\n }\n /**\n * The amount of ether (in wei) to send in this transactions.\n */\n get value() {\n return this.#value;\n }\n set value(value) {\n this.#value = (0, index_js_3.getBigInt)(value, \"value\");\n }\n /**\n * The chain ID this transaction is valid on.\n */\n get chainId() {\n return this.#chainId;\n }\n set chainId(value) {\n this.#chainId = (0, index_js_3.getBigInt)(value);\n }\n /**\n * If signed, the signature for this transaction.\n */\n get signature() {\n return this.#sig || null;\n }\n set signature(value) {\n this.#sig = value == null ? null : index_js_2.Signature.from(value);\n }\n /**\n * The access list.\n *\n * An access list permits discounted (but pre-paid) access to\n * bytecode and state variable access within contract execution.\n */\n get accessList() {\n const value = this.#accessList || null;\n if (value == null) {\n if (this.type === 1 || this.type === 2 || this.type === 3) {\n return [];\n }\n return null;\n }\n return value;\n }\n set accessList(value) {\n this.#accessList = value == null ? null : (0, accesslist_js_1.accessListify)(value);\n }\n get authorizationList() {\n const value = this.#auths || null;\n if (value == null) {\n if (this.type === 4) {\n return [];\n }\n }\n return value;\n }\n set authorizationList(auths) {\n this.#auths = auths == null ? null : auths.map((a3) => (0, authorization_js_1.authorizationify)(a3));\n }\n /**\n * The max fee per blob gas for Cancun transactions.\n */\n get maxFeePerBlobGas() {\n const value = this.#maxFeePerBlobGas;\n if (value == null && this.type === 3) {\n return BN_0;\n }\n return value;\n }\n set maxFeePerBlobGas(value) {\n this.#maxFeePerBlobGas = value == null ? null : (0, index_js_3.getBigInt)(value, \"maxFeePerBlobGas\");\n }\n /**\n * The BLOb versioned hashes for Cancun transactions.\n */\n get blobVersionedHashes() {\n let value = this.#blobVersionedHashes;\n if (value == null && this.type === 3) {\n return [];\n }\n return value;\n }\n set blobVersionedHashes(value) {\n if (value != null) {\n (0, index_js_3.assertArgument)(Array.isArray(value), \"blobVersionedHashes must be an Array\", \"value\", value);\n value = value.slice();\n for (let i3 = 0; i3 < value.length; i3++) {\n (0, index_js_3.assertArgument)((0, index_js_3.isHexString)(value[i3], 32), \"invalid blobVersionedHash\", `value[${i3}]`, value[i3]);\n }\n }\n this.#blobVersionedHashes = value;\n }\n /**\n * The BLObs for the Transaction, if any.\n *\n * If ``blobs`` is non-``null``, then the [[seriailized]]\n * will return the network formatted sidecar, otherwise it\n * will return the standard [[link-eip-2718]] payload. The\n * [[unsignedSerialized]] is unaffected regardless.\n *\n * When setting ``blobs``, either fully valid [[Blob]] objects\n * may be specified (i.e. correctly padded, with correct\n * committments and proofs) or a raw [[BytesLike]] may\n * be provided.\n *\n * If raw [[BytesLike]] are provided, the [[kzg]] property **must**\n * be already set. The blob will be correctly padded and the\n * [[KzgLibrary]] will be used to compute the committment and\n * proof for the blob.\n *\n * A BLOb is a sequence of field elements, each of which must\n * be within the BLS field modulo, so some additional processing\n * may be required to encode arbitrary data to ensure each 32 byte\n * field is within the valid range.\n *\n * Setting this automatically populates [[blobVersionedHashes]],\n * overwriting any existing values. Setting this to ``null``\n * does **not** remove the [[blobVersionedHashes]], leaving them\n * present.\n */\n get blobs() {\n if (this.#blobs == null) {\n return null;\n }\n return this.#blobs.map((b4) => Object.assign({}, b4));\n }\n set blobs(_blobs) {\n if (_blobs == null) {\n this.#blobs = null;\n return;\n }\n const blobs = [];\n const versionedHashes = [];\n for (let i3 = 0; i3 < _blobs.length; i3++) {\n const blob = _blobs[i3];\n if ((0, index_js_3.isBytesLike)(blob)) {\n (0, index_js_3.assert)(this.#kzg, \"adding a raw blob requires a KZG library\", \"UNSUPPORTED_OPERATION\", {\n operation: \"set blobs()\"\n });\n let data = (0, index_js_3.getBytes)(blob);\n (0, index_js_3.assertArgument)(data.length <= BLOB_SIZE, \"blob is too large\", `blobs[${i3}]`, blob);\n if (data.length !== BLOB_SIZE) {\n const padded = new Uint8Array(BLOB_SIZE);\n padded.set(data);\n data = padded;\n }\n const commit = this.#kzg.blobToKzgCommitment(data);\n const proof = (0, index_js_3.hexlify)(this.#kzg.computeBlobKzgProof(data, commit));\n blobs.push({\n data: (0, index_js_3.hexlify)(data),\n commitment: (0, index_js_3.hexlify)(commit),\n proof\n });\n versionedHashes.push(getVersionedHash(1, commit));\n } else {\n const commit = (0, index_js_3.hexlify)(blob.commitment);\n blobs.push({\n data: (0, index_js_3.hexlify)(blob.data),\n commitment: commit,\n proof: (0, index_js_3.hexlify)(blob.proof)\n });\n versionedHashes.push(getVersionedHash(1, commit));\n }\n }\n this.#blobs = blobs;\n this.#blobVersionedHashes = versionedHashes;\n }\n get kzg() {\n return this.#kzg;\n }\n set kzg(kzg) {\n if (kzg == null) {\n this.#kzg = null;\n } else {\n this.#kzg = getKzgLibrary(kzg);\n }\n }\n /**\n * Creates a new Transaction with default values.\n */\n constructor() {\n this.#type = null;\n this.#to = null;\n this.#nonce = 0;\n this.#gasLimit = BN_0;\n this.#gasPrice = null;\n this.#maxPriorityFeePerGas = null;\n this.#maxFeePerGas = null;\n this.#data = \"0x\";\n this.#value = BN_0;\n this.#chainId = BN_0;\n this.#sig = null;\n this.#accessList = null;\n this.#maxFeePerBlobGas = null;\n this.#blobVersionedHashes = null;\n this.#kzg = null;\n this.#blobs = null;\n this.#auths = null;\n }\n /**\n * The transaction hash, if signed. Otherwise, ``null``.\n */\n get hash() {\n if (this.signature == null) {\n return null;\n }\n return (0, index_js_2.keccak256)(this.#getSerialized(true, false));\n }\n /**\n * The pre-image hash of this transaction.\n *\n * This is the digest that a [[Signer]] must sign to authorize\n * this transaction.\n */\n get unsignedHash() {\n return (0, index_js_2.keccak256)(this.unsignedSerialized);\n }\n /**\n * The sending address, if signed. Otherwise, ``null``.\n */\n get from() {\n if (this.signature == null) {\n return null;\n }\n return (0, address_js_1.recoverAddress)(this.unsignedHash, this.signature);\n }\n /**\n * The public key of the sender, if signed. Otherwise, ``null``.\n */\n get fromPublicKey() {\n if (this.signature == null) {\n return null;\n }\n return index_js_2.SigningKey.recoverPublicKey(this.unsignedHash, this.signature);\n }\n /**\n * Returns true if signed.\n *\n * This provides a Type Guard that properties requiring a signed\n * transaction are non-null.\n */\n isSigned() {\n return this.signature != null;\n }\n #getSerialized(signed, sidecar) {\n (0, index_js_3.assert)(!signed || this.signature != null, \"cannot serialize unsigned transaction; maybe you meant .unsignedSerialized\", \"UNSUPPORTED_OPERATION\", { operation: \".serialized\" });\n const sig = signed ? this.signature : null;\n switch (this.inferType()) {\n case 0:\n return _serializeLegacy(this, sig);\n case 1:\n return _serializeEip2930(this, sig);\n case 2:\n return _serializeEip1559(this, sig);\n case 3:\n return _serializeEip4844(this, sig, sidecar ? this.blobs : null);\n case 4:\n return _serializeEip7702(this, sig);\n }\n (0, index_js_3.assert)(false, \"unsupported transaction type\", \"UNSUPPORTED_OPERATION\", { operation: \".serialized\" });\n }\n /**\n * The serialized transaction.\n *\n * This throws if the transaction is unsigned. For the pre-image,\n * use [[unsignedSerialized]].\n */\n get serialized() {\n return this.#getSerialized(true, true);\n }\n /**\n * The transaction pre-image.\n *\n * The hash of this is the digest which needs to be signed to\n * authorize this transaction.\n */\n get unsignedSerialized() {\n return this.#getSerialized(false, false);\n }\n /**\n * Return the most \"likely\" type; currently the highest\n * supported transaction type.\n */\n inferType() {\n const types = this.inferTypes();\n if (types.indexOf(2) >= 0) {\n return 2;\n }\n return types.pop();\n }\n /**\n * Validates the explicit properties and returns a list of compatible\n * transaction types.\n */\n inferTypes() {\n const hasGasPrice = this.gasPrice != null;\n const hasFee = this.maxFeePerGas != null || this.maxPriorityFeePerGas != null;\n const hasAccessList = this.accessList != null;\n const hasBlob = this.#maxFeePerBlobGas != null || this.#blobVersionedHashes;\n if (this.maxFeePerGas != null && this.maxPriorityFeePerGas != null) {\n (0, index_js_3.assert)(this.maxFeePerGas >= this.maxPriorityFeePerGas, \"priorityFee cannot be more than maxFee\", \"BAD_DATA\", { value: this });\n }\n (0, index_js_3.assert)(!hasFee || this.type !== 0 && this.type !== 1, \"transaction type cannot have maxFeePerGas or maxPriorityFeePerGas\", \"BAD_DATA\", { value: this });\n (0, index_js_3.assert)(this.type !== 0 || !hasAccessList, \"legacy transaction cannot have accessList\", \"BAD_DATA\", { value: this });\n const types = [];\n if (this.type != null) {\n types.push(this.type);\n } else {\n if (this.authorizationList && this.authorizationList.length) {\n types.push(4);\n } else if (hasFee) {\n types.push(2);\n } else if (hasGasPrice) {\n types.push(1);\n if (!hasAccessList) {\n types.push(0);\n }\n } else if (hasAccessList) {\n types.push(1);\n types.push(2);\n } else if (hasBlob && this.to) {\n types.push(3);\n } else {\n types.push(0);\n types.push(1);\n types.push(2);\n types.push(3);\n }\n }\n types.sort();\n return types;\n }\n /**\n * Returns true if this transaction is a legacy transaction (i.e.\n * ``type === 0``).\n *\n * This provides a Type Guard that the related properties are\n * non-null.\n */\n isLegacy() {\n return this.type === 0;\n }\n /**\n * Returns true if this transaction is berlin hardform transaction (i.e.\n * ``type === 1``).\n *\n * This provides a Type Guard that the related properties are\n * non-null.\n */\n isBerlin() {\n return this.type === 1;\n }\n /**\n * Returns true if this transaction is london hardform transaction (i.e.\n * ``type === 2``).\n *\n * This provides a Type Guard that the related properties are\n * non-null.\n */\n isLondon() {\n return this.type === 2;\n }\n /**\n * Returns true if this transaction is an [[link-eip-4844]] BLOB\n * transaction.\n *\n * This provides a Type Guard that the related properties are\n * non-null.\n */\n isCancun() {\n return this.type === 3;\n }\n /**\n * Create a copy of this transaciton.\n */\n clone() {\n return _Transaction.from(this);\n }\n /**\n * Return a JSON-friendly object.\n */\n toJSON() {\n const s4 = (v2) => {\n if (v2 == null) {\n return null;\n }\n return v2.toString();\n };\n return {\n type: this.type,\n to: this.to,\n // from: this.from,\n data: this.data,\n nonce: this.nonce,\n gasLimit: s4(this.gasLimit),\n gasPrice: s4(this.gasPrice),\n maxPriorityFeePerGas: s4(this.maxPriorityFeePerGas),\n maxFeePerGas: s4(this.maxFeePerGas),\n value: s4(this.value),\n chainId: s4(this.chainId),\n sig: this.signature ? this.signature.toJSON() : null,\n accessList: this.accessList\n };\n }\n /**\n * Create a **Transaction** from a serialized transaction or a\n * Transaction-like object.\n */\n static from(tx) {\n if (tx == null) {\n return new _Transaction();\n }\n if (typeof tx === \"string\") {\n const payload = (0, index_js_3.getBytes)(tx);\n if (payload[0] >= 127) {\n return _Transaction.from(_parseLegacy(payload));\n }\n switch (payload[0]) {\n case 1:\n return _Transaction.from(_parseEip2930(payload));\n case 2:\n return _Transaction.from(_parseEip1559(payload));\n case 3:\n return _Transaction.from(_parseEip4844(payload));\n case 4:\n return _Transaction.from(_parseEip7702(payload));\n }\n (0, index_js_3.assert)(false, \"unsupported transaction type\", \"UNSUPPORTED_OPERATION\", { operation: \"from\" });\n }\n const result = new _Transaction();\n if (tx.type != null) {\n result.type = tx.type;\n }\n if (tx.to != null) {\n result.to = tx.to;\n }\n if (tx.nonce != null) {\n result.nonce = tx.nonce;\n }\n if (tx.gasLimit != null) {\n result.gasLimit = tx.gasLimit;\n }\n if (tx.gasPrice != null) {\n result.gasPrice = tx.gasPrice;\n }\n if (tx.maxPriorityFeePerGas != null) {\n result.maxPriorityFeePerGas = tx.maxPriorityFeePerGas;\n }\n if (tx.maxFeePerGas != null) {\n result.maxFeePerGas = tx.maxFeePerGas;\n }\n if (tx.maxFeePerBlobGas != null) {\n result.maxFeePerBlobGas = tx.maxFeePerBlobGas;\n }\n if (tx.data != null) {\n result.data = tx.data;\n }\n if (tx.value != null) {\n result.value = tx.value;\n }\n if (tx.chainId != null) {\n result.chainId = tx.chainId;\n }\n if (tx.signature != null) {\n result.signature = index_js_2.Signature.from(tx.signature);\n }\n if (tx.accessList != null) {\n result.accessList = tx.accessList;\n }\n if (tx.authorizationList != null) {\n result.authorizationList = tx.authorizationList;\n }\n if (tx.blobVersionedHashes != null) {\n result.blobVersionedHashes = tx.blobVersionedHashes;\n }\n if (tx.kzg != null) {\n result.kzg = tx.kzg;\n }\n if (tx.blobs != null) {\n result.blobs = tx.blobs;\n }\n if (tx.hash != null) {\n (0, index_js_3.assertArgument)(result.isSigned(), \"unsigned transaction cannot define '.hash'\", \"tx\", tx);\n (0, index_js_3.assertArgument)(result.hash === tx.hash, \"hash mismatch\", \"tx\", tx);\n }\n if (tx.from != null) {\n (0, index_js_3.assertArgument)(result.isSigned(), \"unsigned transaction cannot define '.from'\", \"tx\", tx);\n (0, index_js_3.assertArgument)(result.from.toLowerCase() === (tx.from || \"\").toLowerCase(), \"from mismatch\", \"tx\", tx);\n }\n return result;\n }\n };\n exports3.Transaction = Transaction;\n }\n });\n\n // ../../../node_modules/.pnpm/ethers@6.15.0_bufferutil@4.0.9_utf-8-validate@5.0.10/node_modules/ethers/lib.commonjs/transaction/index.js\n var require_transaction2 = __commonJS({\n \"../../../node_modules/.pnpm/ethers@6.15.0_bufferutil@4.0.9_utf-8-validate@5.0.10/node_modules/ethers/lib.commonjs/transaction/index.js\"(exports3) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n Object.defineProperty(exports3, \"__esModule\", { value: true });\n exports3.Transaction = exports3.recoverAddress = exports3.computeAddress = exports3.authorizationify = exports3.accessListify = void 0;\n var accesslist_js_1 = require_accesslist();\n Object.defineProperty(exports3, \"accessListify\", { enumerable: true, get: function() {\n return accesslist_js_1.accessListify;\n } });\n var authorization_js_1 = require_authorization();\n Object.defineProperty(exports3, \"authorizationify\", { enumerable: true, get: function() {\n return authorization_js_1.authorizationify;\n } });\n var address_js_1 = require_address5();\n Object.defineProperty(exports3, \"computeAddress\", { enumerable: true, get: function() {\n return address_js_1.computeAddress;\n } });\n Object.defineProperty(exports3, \"recoverAddress\", { enumerable: true, get: function() {\n return address_js_1.recoverAddress;\n } });\n var transaction_js_1 = require_transaction();\n Object.defineProperty(exports3, \"Transaction\", { enumerable: true, get: function() {\n return transaction_js_1.Transaction;\n } });\n }\n });\n\n // ../../../node_modules/.pnpm/ethers@6.15.0_bufferutil@4.0.9_utf-8-validate@5.0.10/node_modules/ethers/lib.commonjs/hash/authorization.js\n var require_authorization2 = __commonJS({\n \"../../../node_modules/.pnpm/ethers@6.15.0_bufferutil@4.0.9_utf-8-validate@5.0.10/node_modules/ethers/lib.commonjs/hash/authorization.js\"(exports3) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n Object.defineProperty(exports3, \"__esModule\", { value: true });\n exports3.verifyAuthorization = exports3.hashAuthorization = void 0;\n var index_js_1 = require_address3();\n var index_js_2 = require_crypto2();\n var index_js_3 = require_transaction2();\n var index_js_4 = require_utils8();\n function hashAuthorization2(auth) {\n (0, index_js_4.assertArgument)(typeof auth.address === \"string\", \"invalid address for hashAuthorization\", \"auth.address\", auth);\n return (0, index_js_2.keccak256)((0, index_js_4.concat)([\n \"0x05\",\n (0, index_js_4.encodeRlp)([\n auth.chainId != null ? (0, index_js_4.toBeArray)(auth.chainId) : \"0x\",\n (0, index_js_1.getAddress)(auth.address),\n auth.nonce != null ? (0, index_js_4.toBeArray)(auth.nonce) : \"0x\"\n ])\n ]));\n }\n exports3.hashAuthorization = hashAuthorization2;\n function verifyAuthorization2(auth, sig) {\n return (0, index_js_3.recoverAddress)(hashAuthorization2(auth), sig);\n }\n exports3.verifyAuthorization = verifyAuthorization2;\n }\n });\n\n // ../../../node_modules/.pnpm/ethers@6.15.0_bufferutil@4.0.9_utf-8-validate@5.0.10/node_modules/ethers/lib.commonjs/hash/id.js\n var require_id2 = __commonJS({\n \"../../../node_modules/.pnpm/ethers@6.15.0_bufferutil@4.0.9_utf-8-validate@5.0.10/node_modules/ethers/lib.commonjs/hash/id.js\"(exports3) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n Object.defineProperty(exports3, \"__esModule\", { value: true });\n exports3.id = void 0;\n var index_js_1 = require_crypto2();\n var index_js_2 = require_utils8();\n function id(value) {\n return (0, index_js_1.keccak256)((0, index_js_2.toUtf8Bytes)(value));\n }\n exports3.id = id;\n }\n });\n\n // ../../../node_modules/.pnpm/@adraffy+ens-normalize@1.10.1/node_modules/@adraffy/ens-normalize/dist/index.cjs\n var require_dist = __commonJS({\n \"../../../node_modules/.pnpm/@adraffy+ens-normalize@1.10.1/node_modules/@adraffy/ens-normalize/dist/index.cjs\"(exports3) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n var COMPRESSED$1 = \"AEEUdwmgDS8BxQKKAP4BOgDjATAAngDUAIMAoABoAOAAagCOAEQAhABMAHIAOwA9ACsANgAmAGIAHgAuACgAJwAXAC0AGgAjAB8ALwAUACkAEgAeAAkAGwARABkAFgA5ACgALQArADcAFQApABAAHgAiABAAGgAeABMAGAUhBe8BFxREN8sF2wC5AK5HAW8ArQkDzQCuhzc3NzcBP68NEfMABQdHBuw5BV8FYAA9MzkI9r4ZBg7QyQAWA9CeOwLNCjcCjqkChuA/lm+RAsXTAoP6ASfnEQDytQFJAjWVCkeXAOsA6godAB/cwdAUE0WlBCN/AQUCQRjFD/MRBjHxDQSJbw0jBzUAswBxme+tnIcAYwabAysG8QAjAEMMmxcDqgPKQyDXCMMxA7kUQwD3NXOrAKmFIAAfBC0D3x4BJQDBGdUFAhEgVD8JnwmQJiNWYUzrg0oAGwAUAB0AFnNcACkAFgBP9h3gPfsDOWDKneY2ChglX1UDYD30ABsAFAAdABZzIGRAnwDD8wAjAEEMzRbDqgMB2sAFYwXqAtCnAsS4AwpUJKRtFHsadUz9AMMVbwLpABM1NJEX0ZkCgYMBEyMAxRVvAukAEzUBUFAtmUwSAy4DBTER33EftQHfSwB5MxJ/AjkWKQLzL8E/cwBB6QH9LQDPDtO9ASNriQC5DQANAwCK21EFI91zHwCoL9kBqQcHBwcHKzUDowBvAQohPvU3fAQgHwCyAc8CKQMA5zMSezr7ULgFmDp/LzVQBgEGAi8FYQVgt8AFcTtlQhpCWEmfe5tmZ6IAExsDzQ8t+X8rBKtTAltbAn0jsy8Bl6utPWMDTR8Ei2kRANkDBrNHNysDBzECQWUAcwFpJ3kAiyUhAJ0BUb8AL3EfAbfNAz81KUsFWwF3YQZtAm0A+VEfAzEJDQBRSQCzAQBlAHsAM70GD/v3IZWHBwARKQAxALsjTwHZAeMPEzmXgIHwABIAGQA8AEUAQDt3gdvIEGcQZAkGTRFMdEIVEwK0D64L7REdDNkq09PgADSxB/MDWwfzA1sDWwfzB/MDWwfzA1sDWwNbA1scEvAi28gQZw9QBHUFlgWTBN4IiyZREYkHMAjaVBV0JhxPA00BBCMtSSQ7mzMTJUpMFE0LCAQ2SmyvfUADTzGzVP2QqgPTMlc5dAkGHnkSqAAyD3skNb1OhnpPcagKU0+2tYdJak5vAsY6sEAACikJm2/Dd1YGRRAfJ6kQ+ww3AbkBPw3xS9wE9QY/BM0fgRkdD9GVoAipLeEM8SbnLqWAXiP5KocF8Uv4POELUVFsD10LaQnnOmeBUgMlAREijwrhDT0IcRD3Cs1vDekRSQc9A9lJngCpBwULFR05FbkmFGKwCw05ewb/GvoLkyazEy17AAXXGiUGUQEtGwMA0y7rhbRaNVwgT2MGBwspI8sUrFAkDSlAu3hMGh8HGSWtApVDdEqLUToelyH6PEENai4XUYAH+TwJGVMLhTyiRq9FEhHWPpE9TCJNTDAEOYMsMyePCdMPiQy9fHYBXQklCbUMdRM1ERs3yQg9Bx0xlygnGQglRplgngT7owP3E9UDDwVDCUUHFwO5HDETMhUtBRGBKNsC9zbZLrcCk1aEARsFzw8pH+MQVEfkDu0InwJpA4cl7wAxFSUAGyKfCEdnAGOP3FMJLs8Iy2pwI3gDaxTrZRF3B5UOWwerHDcVwxzlcMxeD4YMKKezCV8BeQmdAWME5wgNNV+MpCBFZ1eLXBifIGVBQ14AAjUMaRWjRMGHfAKPD28SHwE5AXcHPQ0FAnsR8RFvEJkI74YINbkz/DopBFMhhyAVCisDU2zSCysm/Qz8bQGnEmYDEDRBd/Jnr2C6KBgBBx0yyUFkIfULlk/RDKAaxRhGVDIZ6AfDA/ca9yfuQVsGAwOnBxc6UTPyBMELbQiPCUMATQ6nGwfbGG4KdYzUATWPAbudA1uVhwJzkwY7Bw8Aaw+LBX3pACECqwinAAkA0wNbAD0CsQehAB0AiUUBQQMrMwEl6QKTA5cINc8BmTMB9y0EH8cMGQD7O25OAsO1AoBuZqYF4VwCkgJNOQFRKQQJUktVA7N15QDfAE8GF+NLARmvTs8e50cB43MvAMsA/wAJOQcJRQHRAfdxALsBYws1Caa3uQFR7S0AhwAZbwHbAo0A4QA5AIP1AVcAUQVd/QXXAlNNARU1HC9bZQG/AyMBNwERAH0Gz5GpzQsjBHEH1wIQHxXlAu8yB7kFAyLjE9FCyQK94lkAMhoKPAqrCqpgX2Q3CjV2PVQAEh+sPss/UgVVO1c7XDtXO1w7VztcO1c7XDtXO1wDm8Pmw+YKcF9JYe8Mqg3YRMw6TRPfYFVgNhPMLbsUxRXSJVoZQRrAJwkl6FUNDwgt12Y0CDA0eRfAAEMpbINFY4oeNApPHOtTlVT8LR8AtUumM7MNsBsZREQFS3XxYi4WEgomAmSFAmJGX1GzAV83JAKh+wJonAJmDQKfiDgfDwJmPwJmKgRyBIMDfxcDfpY5Cjl7GzmGOicnAmwhAjI6OA4CbcsCbbLzjgM3a0kvAWsA4gDlAE4JB5wMkQECD8YAEbkCdzMCdqZDAnlPRwJ4viFg30WyRvcCfEMCeswCfQ0CfPRIBEiBZygALxlJXEpfGRtK0ALRBQLQ0EsrA4hTA4fqRMmRNgLypV0HAwOyS9JMMSkH001QTbMCi0MCitzFHwshR2sJuwKOOwKOYESbhQKO3QKOYHxRuFM5AQ5S2FSJApP/ApMQAO0AIFUiVbNV1AosHymZijLleGpFPz0Cl6MC77ZYJawAXSkClpMCloCgAK1ZsFoNhVEAPwKWuQKWUlxIXNUCmc8CmWhczl0LHQKcnznGOqECnBoCn58CnryOACETNS4TAp31Ap6WALlBYThh8wKe1wKgcgGtAp6jIwKeUqljzGQrKS8CJ7MCJoICoP8CoFDbAqYzAqXSAqgDAIECp/ZogGi1AAdNaiBq1QKs5wKssgKtawKtBgJXIQJV4AKx5dsDH1JsmwKywRECsuwbbORtZ21MYwMl0QK2YD9DbpQDKUkCuGICuUsZArkue3A6cOUCvR0DLbYDMhUCvoxyBgMzdQK+HnMmc1MCw88CwwhzhnRPOUl05AM8qwEDPJ4DPcMCxYACxksCxhSNAshtVQLISALJUwLJMgJkoQLd1nh9ZXiyeSlL1AMYp2cGAmH4GfeVKHsPXpZevxUCz28Cz3AzT1fW9xejAMqxAs93AS3uA04Wfk8JAtwrAtuOAtJTA1JgA1NjAQUDVZCAjUMEzxrxZEl5A4LSg5EC2ssC2eKEFIRNp0ADhqkAMwNkEoZ1Xf0AWQLfaQLevHd7AuIz7RgB8zQrAfSfAfLWiwLr9wLpdH0DAur9AuroAP1LAb0C7o0C66CWrpcHAu5DA4XkmH1w5HGlAvMHAG0DjhqZlwL3FwORcgOSiwL3nAL53QL4apogmq+/O5siA52HAv7+AR8APZ8gAZ+3AwWRA6ZuA6bdANXJAwZuoYyiCQ0DDE0BEwEjB3EGZb1rCQC/BG/DFY8etxEAG3k9ACcDNxJRA42DAWcrJQCM8wAlAOanC6OVCLsGI6fJBgCvBRnDBvElRUYFFoAFcD9GSDNCKUK8X3kZX8QAls0FOgCQVCGbwTsuYDoZutcONxjOGJHJ/gVfBWAFXwVgBWsFYAVfBWAFXwVgBV8FYAVfBWBOHQjfjW8KCgoKbF7xMwTRA7kGN8PDAMMEr8MA70gxFroFTj5xPnhCR0K+X30/X/AAWBkzswCNBsxzzASm70aCRS4rDDMeLz49fnXfcsH5GcoscQFz13Y4HwVnBXLJycnACNdRYwgICAqEXoWTxgA7P4kACxbZBu21Kw0AjMsTAwkVAOVtJUUsJ1JCuULESUArXy9gPi9AKwnJRQYKTD9LPoA+iT54PnkCkULEUUpDX9NWV3JVEjQAc1w3A3IBE3YnX+g7QiMJb6MKaiszRCUuQrNCxDPMCcwEX9EWJzYREBEEBwIHKn6l33JCNVIfybPJtAltydPUCmhBZw/tEKsZAJOVJU1CLRuxbUHOQAo7P0s+eEJHHA8SJVRPdGM0NVrpvBoKhfUlM0JHHGUQUhEWO1xLSj8MO0ucNAqJIzVCRxv9EFsqKyA4OQgNj2nwZgp5ZNFgE2A1K3YHS2AhQQojJmC7DgpzGG1WYFUZCQYHZO9gHWCdYIVgu2BTYJlwFh8GvRbcXbG8YgtDHrMBwzPVyQonHQgkCyYBgQJ0Ajc4nVqIAwGSCsBPIgDsK3SWEtIVBa5N8gGjAo+kVwVIZwD/AEUSCDweX4ITrRQsJ8K3TwBXFDwEAB0TvzVcAtoTS20RIwDgVgZ9BBImYgA5AL4Coi8LFnezOkCnIQFjAY4KBAPh9RcGsgZSBsEAJctdsWIRu2kTkQstRw7DAcMBKgpPBGIGMDAwKCYnKTQaLg4AKRSVAFwCdl+YUZ0JdicFD3lPAdt1F9ZZKCGxuE3yBxkFVGcA/wBFEgiCBwAOLHQSjxOtQDg1z7deFRMAZ8QTAGtKb1ApIiPHADkAvgKiLy1DFtYCmBiDAlDDWNB0eo7fpaMO/aEVRRv0ATEQZBIODyMEAc8JQhCbDRgzFD4TAEMAu9YBCgCsAOkAm5I3ABwAYxvONnR+MhXJAxgKQyxL2+kkJhMbhQKDBMkSsvF0AD9BNQ6uQC7WqSQHwxEAEEIu1hkhAH2z4iQPwyJPHNWpdyYBRSpnJALzoBAEVPPsH20MxA0CCEQKRgAFyAtFAlMNwwjEDUQJRArELtapMg7DDZgJIw+TGukEIwvDFkMAqAtDEMMMBhioe+QAO3MMRAACrgnEBSPY9Q0FDnbSBoMAB8MSYxkSxAEJAPIJAAB8FWMOFtMc/HcXwxhDAC7DAvOowwAewwJdKDKHAAHDAALrFUQVwwAbwyvzpWMWv8wA/ABpAy++bcYDUKPD0KhDCwKmJ1MAAmMA5+UZwxAagwipBRL/eADfw6fDGOMCGsOjk3l6BwOpo4sAEsMOGxMAA5sAbcMOAAvDp0MJGkMDwgipnNIPAwfIqUMGAOGDAAPzABXDAAcDAAnDAGmTABrDAA7DChjDjnEWAwABYwAOcwAuUyYABsMAF8MIKQANUgC6wy4AA8MADqMq8wCyYgAcIwAB8wqpAAXOCx0V4wAHowBCwwEKAGnDAAuDAB3DAAjDCakABdIAbqcZ3QCZCCkABdIAAAFDAAfjAB2jCCkABqIACYMAGzMAbSMA5sOIAAhjAAhDABTDBAkpAAbSAOOTAAlDC6kOzPtnAAdDAG6kQFAATwAKwwwAA0MACbUDPwAHIwAZgwACE6cDAAojAApDAAoDp/MGwwAJIwADEwAQQwgAFEMAEXMAD5MADfMADcMAGRMOFiMAFUMAbqMWuwHDAMIAE0MLAGkzEgDhUwACQwAEWgAXgwUjAAbYABjDBSYBgzBaAEFNALcQBxUMegAwMngBrA0IZgJ0KxQHBREPd1N0ZzKRJwaIHAZqNT4DqQq8BwngAB4DAwt2AX56T1ocKQNXAh1GATQGC3tOxYNagkgAMQA5CQADAQEAWxLjAIOYNAEzAH7tFRk6TglSAF8NAAlYAQ+S1ACAQwQorQBiAN4dAJ1wPyeTANVzuQDX3AIeEMp9eyMgXiUAEdkBkJizKltbVVAaRMqRAAEAhyQ/SDEz6BmfVwB6ATEsOClKIRcDOF0E/832AFNt5AByAnkCRxGCOs94NjXdAwINGBonDBwPALW2AwICAgAAAAAAAAYDBQMDARrUAwAtAAAAAgEGBgYGBgYFBQUFBQUEBQYHCAkEBQUFBQQAAAICAAAAIgCNAJAAlT0A6gC7ANwApEQAwgCyAK0AqADuAKYA2gCjAOcBCAEDAMcAgQBiANIA1AEDAN4A8gCQAKkBMQDqAN8A3AsBCQ8yO9ra2tq8xuLT1tRJOB0BUgFcNU0BWgFpAWgBWwFMUUlLbhMBUxsNEAs6PhMOACcUKy0vMj5AQENDQ0RFFEYGJFdXV1dZWVhZL1pbXVxcI2NnZ2ZoZypsbnZ1eHh4eHh4enp6enp6enp6enp8fH18e2IARPIASQCaAHgAMgBm+ACOAFcAVwA3AnbvAIsABfj4AGQAk/IAnwBPAGIAZP//sACFAIUAaQBWALEAJAC2AIMCQAJDAPwA5wD+AP4A6AD/AOkA6QDoAOYALwJ7AVEBQAE+AVQBPgE+AT4BOQE4ATgBOAEcAVgXADEQCAEAUx8SHgsdHhYAjgCWAKYAUQBqIAIxAHYAbwCXAxUDJzIDIUlGTzEAkQJPAMcCVwKkAMAClgKWApYClgKWApYCiwKWApYClgKWApYClgKVApUCmAKgApcClgKWApQClAKUApQCkgKVAnUB1AKXAp8ClgKWApUeAIETBQD+DQOfAmECOh8BVBg9AuIZEjMbAU4/G1WZAXusRAFpYQEFA0FPAQYAmTEeIJdyADFoAHEANgCRA5zMk/C2jGINwjMWygIZCaXdfDILBCs5dAE7YnQBugDlhoiHhoiGiYqKhouOjIaNkI6Ij4qQipGGkoaThpSSlYaWhpeKmIaZhpqGm4aci52QnoqfhuIC4XTpAt90AIp0LHSoAIsAdHQEQwRABEIERQRDBEkERgRBBEcESQRIBEQERgRJAJ5udACrA490ALxuAQ10ANFZdHQA13QCFHQA/mJ0AP4BIQD+APwA/AD9APwDhGZ03ASMK23HAP4A/AD8AP0A/CR0dACRYnQA/gCRASEA/gCRAvQA/gCRA4RmdNwEjCttxyR0AP9idAEhAP4A/gD8APwA/QD8AP8A/AD8AP0A/AOEZnTcBIwrbcckdHQAkWJ0ASEA/gCRAP4AkQL0AP4AkQOEZnTcBIwrbcckdAJLAT50AlIBQXQCU8l0dAJfdHQDpgL0A6YDpgOnA6cDpwOnA4RmdNwEjCttxyR0dACRYnQBIQOmAJEDpgCRAvQDpgCRA4RmdNwEjCttxyR0BDh0AJEEOQCRDpU5dSgCADR03gV2CwArdAEFAM5iCnR0AF1iAAYcOgp0dACRCnQAXAEIwWZ0CnRmdHQAkWZ0CnRmdEXgAFF03gp0dEY0tlT2u3SOAQTwscwhjZZKrhYcBSfFp9XNbKiVDOD2b+cpe4/Z17mQnbtzzhaeQtE2GGj0IDNTjRUSyTxxw/RPHW/+vS7d1NfRt9z9QPZg4X7QFfhCnkvgNPIItOsC2eV6hPannZNHlZ9xrwZXIMOlu3jSoQSq78WEjwLjw1ELSlF1aBvfzwk5ZX7AUvQzjPQKbDuQ+sm4wNOp4A6AdVuRS0t1y/DZpg4R6m7FNjM9HgvW7Bi88zaMjOo6lM8wtBBdj8LP4ylv3zCXPhebMKJc066o9sF71oFW/8JXu86HJbwDID5lzw5GWLR/LhT0Qqnp2JQxNZNfcbLIzPy+YypqRm/lBmGmex+82+PisxUumSeJkALIT6rJezxMH+CTJmQtt5uwTVbL3ptmjDUQzlSIvWi8Tl7ng1NpuRn1Ng4n14Qc+3Iil7OwkvNWogLSPkn3pihIFytyIGmMhOe3n1tWsuMy9BdKyqF4Z3v2SgggTL9KVvMXPnCbRe+oOuFFP3HejBG/w9gvmfNYvg6JuWia2lcSSN1uIjBktzoIazOHPJZ7kKHPz8mRWVdW3lA8WGF9dQF6Bm673boov3BUWDU2JNcahR23GtfHKLOz/viZ+rYnZFaIznXO67CYEJ1fXuTRpZhYZkKe54xeoagkNGLs+NTZHE0rX45/XvQ2RGADX6vcAvdxIUBV27wxGm2zjZo4X3ILgAlrOFheuZ6wtsvaIj4yLY7qqawlliaIcrz2G+c3vscAnCkCuMzMmZvMfu9lLwTvfX+3cVSyPdN9ZwgDZhfjRgNJcLiJ67b9xx8JHswprbiE3v9UphotAPIgnXVIN5KmMc0piXhc6cChPnN+MRhG9adtdttQTTwSIpl8I4/j//d3sz1326qTBTpPRM/Hgh3kzqEXs8ZAk4ErQhNO8hzrQ0DLkWMA/N+91tn2MdOJnWC2FCZehkQrwzwbKOjhvZsbM95QoeL9skYyMf4srVPVJSgg7pOLUtr/n9eT99oe9nLtFRpjA9okV2Kj8h9k5HaC0oivRD8VyXkJ81tcd4fHNXPCfloIQasxsuO18/46dR2jgul/UIet2G0kRvnyONMKhHs6J26FEoqSqd+rfYjeEGwHWVDpX1fh1jBBcKGMqRepju9Y00mDVHC+Xdij/j44rKfvfjGinNs1jO/0F3jB83XCDINN/HB84axlP+3E/klktRo+vl3U/aiyMJbIodE1XSsDn6UAzIoMtUObY2+k/4gY/l+AkZJ5Sj2vQrkyLm3FoxjhDX+31UXBFf9XrAH31fFqoBmDEZvhvvpnZ87N+oZEu7U9O/nnk+QWj3x8uyoRbEnf+O5UMr9i0nHP38IF5AvzrBW8YWBUR0mIAzIvndQq9N3v/Jto3aPjPXUPl8ASdPPyAp7jENf8bk7VMM9ol9XGmlBmeDMuGqt+WzuL6CXAxXjIhCPM5vACchgMJ/8XBGLO/D1isVvGhwwHHr1DLaI5mn2Jr/b1pUD90uciDaS8cXNDzCWvNmT/PhQe5e8nTnnnkt8Ds/SIjibcum/fqDhKopxAY8AkSrPn+IGDEKOO+U3XOP6djFs2H5N9+orhOahiQk5KnEUWa+CzkVzhp8bMHRbg81qhjjXuIKbHjSLSIBKWqockGtKinY+z4/RdBUF6pcc3JmnlxVcNgrI4SEzKUZSwcD2QCyxzKve+gAmg6ZuSRkpPFa6mfThu7LJNu3H5K42uCpNvPAsoedolKV/LHe/eJ+BbaG5MG0NaSGVPRUmNFMFFSSpXEcXwbVh7UETOZZtoVNRGOIbbkig3McEtR68cG0RZAoJevWYo7Dg/lZ1CQzblWeUvVHmr8fY4Nqd9JJiH/zEX24mJviH60fAyFr0A3c4bC1j3yZU60VgJxXn8JgJXLUIsiBnmKmMYz+7yBQFBvqb2eYnuW59joZBf56/wXvWIR4R8wTmV80i1mZy+S4+BUES+hzjk0uXpC///z/IlqHZ1monzlXp8aCfhGKMti73FI1KbL1q6IKO4fuBuZ59gagjn5xU79muMpHXg6S+e+gDM/U9BKLHbl9l6o8czQKl4RUkJJiqftQG2i3BMg/TQlUYFkJDYBOOvAugYuzYSDnZbDDd/aSd9x0Oe6F+bJcHfl9+gp6L5/TgA+BdFFovbfCrQ40s5vMPw8866pNX8zyFGeFWdxIpPVp9Rg1UPOVFbFZrvaFq/YAzHQgqMWpahMYfqHpmwXfHL1/kpYmGuHFwT55mQu0dylfNuq2Oq0hTMCPwqfxnuBIPLXfci4Y1ANy+1CUipQxld/izVh16WyG2Q0CQQ9NqtAnx1HCHwDj7sYxOSB0wopZSnOzxQOcExmxrVTF2BkOthVpGfuhaGECfCJpJKpjnihY+xOT2QJxN61+9K6QSqtv2Shr82I3jgJrqBg0wELFZPjvHpvzTtaJnLK6Vb97Yn933koO/saN7fsjwNKzp4l2lJVx2orjCGzC/4ZL4zCver6aQYtC5sdoychuFE6ufOiog+VWi5UDkbmvmtah/3aArEBIi39s5ILUnlFLgilcGuz9CQshEY7fw2ouoILAYPVT/gyAIq3TFAIwVsl+ktkRz/qGfnCDGrm5gsl/l9QdvCWGsjPz3dU7XuqKfdUrr/6XIgjp4rey6AJBmCmUJMjITHVdFb5m1p+dLMCL8t55zD42cmftmLEJC0Da04YiRCVUBLLa8D071/N5UBNBXDh0LFsmhV/5B5ExOB4j3WVG/S3lfK5o+V6ELHvy6RR9n4ac+VsK4VE4yphPvV+kG9FegTBH4ZRXL2HytUHCduJazB/KykjfetYxOXTLws267aGOd+I+JhKP//+VnXmS90OD/jvLcVu0asyqcuYN1mSb6XTlCkqv1vigZPIYwNF/zpWcT1GR/6aEIRjkh0yhg4LXJfaGobYJTY4JI58KiAKgmmgAKWdl5nYCeLqavRJGQNuYuZtZFGx+IkI4w4NS2xwbetNMunOjBu/hmKCI/w7tfiiyUd//4rbTeWt4izBY8YvGIN6vyKYmP/8X8wHKCeN+WRcKM70+tXKNGyevU9H2Dg5BsljnTf8YbsJ1TmMs74Ce2XlHisleguhyeg44rQOHZuw/6HTkhnnurK2d62q6yS7210SsAIaR+jXMQA+svkrLpsUY+F30Uw89uOdGAR6vo4FIME0EfVVeHTu6eKicfhSqOeXJhbftcd08sWEnNUL1C9fnprTgd83IMut8onVUF0hvqzZfHduPjbjwEXIcoYmy+P6tcJZHmeOv6VrvEdkHDJecjHuHeWANe79VG662qTjA/HCvumVv3qL+LrOcpqGps2ZGwQdFJ7PU4iuyRlBrwfO+xnPyr47s2cXVbWzAyznDiBGjCM3ksxjjqM62GE9C8f5U38kB3VjtabKp/nRdvMESPGDG90bWRLAt1Qk5DyLuazRR1YzdC1c+hZXvAWV8xA72S4A8B67vjVhbba3MMop293FeEXpe7zItMWrJG/LOH9ByOXmYnNJfjmfuX9KbrpgLOba4nZ+fl8Gbdv/ihv+6wFGKHCYrVwmhFC0J3V2bn2tIB1wCc1CST3d3X2OyxhguXcs4sm679UngzofuSeBewMFJboIQHbUh/m2JhW2hG9DIvG2t7yZIzKBTz9wBtnNC+2pCRYhSIuQ1j8xsz5VvqnyUIthvuoyyu7fNIrg/KQUVmGQaqkqZk/Vx5b33/gsEs8yX7SC1J+NV4icz6bvIE7C5G6McBaI8rVg56q5QBJWxn/87Q1sPK4+sQa8fLU5gXo4paaq4cOcQ4wR0VBHPGjKh+UlPCbA1nLXyEUX45qZ8J7/Ln4FPJE2TdzD0Z8MLSNQiykMMmSyOCiFfy84Rq60emYB2vD09KjYwsoIpeDcBDTElBbXxND72yhd9pC/1CMid/5HUMvAL27OtcIJDzNKpRPNqPOpyt2aPGz9QWIs9hQ9LiX5s8m9hjTUu/f7MyIatjjd+tSfQ3ufZxPpmJhTaBtZtKLUcfOCUqADuO+QoH8B9v6U+P0HV1GLQmtoNFTb3s74ivZgjES0qfK+8RdGgBbcCMSy8eBvh98+et1KIFqSe1KQPyXULBMTsIYnysIwiZBJYdI20vseV+wuJkcqGemehKjaAb9L57xZm3g2zX0bZ2xk/fU+bCo7TlnbW7JuF1YdURo/2Gw7VclDG1W7LOtas2LX4upifZ/23rzpsnY/ALfRgrcWP5hYmV9VxVOQA1fZvp9F2UNU+7d7xRyVm5wiLp3/0dlV7vdw1PMiZrbDAYzIVqEjRY2YU03sJhPnlwIPcZUG5ltL6S8XCxU1eYS5cjr34veBmXAvy7yN4ZjArIG0dfD/5UpBNlX1ZPoxJOwyqRi3wQWtOzd4oNKh0LkoTm8cwqgIfKhqqGOhwo71I+zXnMemTv2B2AUzABWyFztGgGULjDDzWYwJUVBTjKCn5K2QGMK1CQT7SzziOjo+BhAmqBjzuc3xYym2eedGeOIRJVyTwDw37iCMe4g5Vbnsb5ZBdxOAnMT7HU4DHpxWGuQ7GeiY30Cpbvzss55+5Km1YsbD5ea3NI9QNYIXol5apgSu9dZ8f8xS5dtHpido5BclDuLWY4lhik0tbJa07yJhH0BOyEut/GRbYTS6RfiTYWGMCkNpfSHi7HvdiTglEVHKZXaVhezH4kkXiIvKopYAlPusftpE4a5IZwvw1x/eLvoDIh/zpo9FiQInsTb2SAkKHV42XYBjpJDg4374XiVb3ws4qM0s9eSQ5HzsMU4OZJKuopFjBM+dAZEl8RUMx5uU2N486Kr141tVsGQfGjORYMCJAMsxELeNT4RmWjRcpdTGBwcx6XN9drWqPmJzcrGrH4+DRc7+n1w3kPZwu0BkNr6hQrqgo7JTB9A5kdJ/H7P4cWBMwsmuixAzJB3yrQpnGIq90lxAXLzDCdn1LPibsRt7rHNjgQBklRgPZ8vTbjXdgXrTWQsK5MdrXXQVPp0Rinq3frzZKJ0qD6Qhc40VzAraUXlob1gvkhK3vpmHgI6FRlQZNx6eRqkp0zy4AQlX813fAPtL3jMRaitGFFjo0zmErloC+h+YYdVQ6k4F/epxAoF0BmqEoKNTt6j4vQZNQ2BoqF9Vj53TOIoNmDiu9Xp15RkIgQIGcoLpfoIbenzpGUAtqFJp5W+LLnx38jHeECTJ/navKY1NWfN0sY1T8/pB8kIH3DU3DX+u6W3YwpypBMYOhbSxGjq84RZ84fWJow8pyHqn4S/9J15EcCMsXqrfwyd9mhiu3+rEo9pPpoJkdZqHjra4NvzFwuThNKy6hao/SlLw3ZADUcUp3w3SRVfW2rhl80zOgTYnKE0Hs2qp1J6H3xqPqIkvUDRMFDYyRbsFI3M9MEyovPk8rlw7/0a81cDVLmBsR2ze2pBuKb23fbeZC0uXoIvDppfTwIDxk1Oq2dGesGc+oJXWJLGkOha3CX+DUnzgAp9HGH9RsPZN63Hn4RMA5eSVhPHO+9RcRb/IOgtW31V1Q5IPGtoxPjC+MEJbVlIMYADd9aHYWUIQKopuPOHmoqSkubnAKnzgKHqgIOfW5RdAgotN6BN+O2ZYHkuemLnvQ8U9THVrS1RtLmKbcC7PeeDsYznvqzeg6VCNwmr0Yyx1wnLjyT84BZz3EJyCptD3yeueAyDWIs0L2qs/VQ3HUyqfrja0V1LdDzqAikeWuV4sc7RLIB69jEIBjCkyZedoUHqCrOvShVzyd73OdrJW0hPOuQv2qOoHDc9xVb6Yu6uq3Xqp2ZaH46A7lzevbxQEmfrzvAYSJuZ4WDk1Hz3QX1LVdiUK0EvlAGAYlG3Md30r7dcPN63yqBCIj25prpvZP0nI4+EgWoFG95V596CurXpKRBGRjQlHCvy5Ib/iW8nZJWwrET3mgd6mEhfP4KCuaLjopWs7h+MdXFdIv8dHQJgg1xi1eYqB0uDYjxwVmri0Sv5XKut/onqapC+FQiC2C1lvYJ9MVco6yDYsS3AANUfMtvtbYI2hfwZatiSsnoUeMZd34GVjkMMKA+XnjJpXgRW2SHTZplVowPmJsvXy6w3cfO1AK2dvtZEKTkC/TY9LFiKHCG0DnrMQdGm2lzlBHM9iEYynH2UcVMhUEjsc0oDBTgo2ZSQ1gzkAHeWeBXYFjYLuuf8yzTCy7/RFR81WDjXMbq2BOH5dURnxo6oivmxL3cKzKInlZkD31nvpHB9Kk7GfcfE1t+1V64b9LtgeJGlpRFxQCAqWJ5DoY77ski8gsOEOr2uywZaoO/NGa0X0y1pNQHBi3b2SUGNpcZxDT7rLbBf1FSnQ8guxGW3W+36BW0gBje4DOz6Ba6SVk0xiKgt+q2JOFyr4SYfnu+Ic1QZYIuwHBrgzr6UvOcSCzPTOo7D6IC4ISeS7zkl4h+2VoeHpnG/uWR3+ysNgPcOIXQbv0n4mr3BwQcdKJxgPSeyuP/z1Jjg4e9nUvoXegqQVIE30EHx5GHv+FAVUNTowYDJgyFhf5IvlYmEqRif6+WN1MkEJmDcQITx9FX23a4mxy1AQRsOHO/+eImX9l8EMJI3oPWzVXxSOeHU1dUWYr2uAA7AMb+vAEZSbU3qob9ibCyXeypEMpZ6863o6QPqlqGHZkuWABSTVNd4cOh9hv3qEpSx2Zy/DJMP6cItEmiBJ5PFqQnDEIt3NrA3COlOSgz43D7gpNFNJ5MBh4oFzhDPiglC2ypsNU4ISywY2erkyb1NC3Qh/IfWj0eDgZI4/ln8WPfBsT3meTjq1Uqt1E7Zl/qftqkx6aM9KueMCekSnMrcHj1CqTWWzEzPsZGcDe3Ue4Ws+XFYVxNbOFF8ezkvQGR6ZOtOLU2lQEnMBStx47vE6Pb7AYMBRj2OOfZXfisjJnpTfSNjo6sZ6qSvNxZNmDeS7Gk3yYyCk1HtKN2UnhMIjOXUzAqDv90lx9O/q/AT1ZMnit5XQe9wmQxnE/WSH0CqZ9/2Hy+Sfmpeg8RwsHI5Z8kC8H293m/LHVVM/BA7HaTJYg5Enk7M/xWpq0192ACfBai2LA/qrCjCr6Dh1BIMzMXINBmX96MJ5Hn2nxln/RXPFhwHxUmSV0EV2V0jm86/dxxuYSU1W7sVkEbN9EzkG0QFwPhyHKyb3t+Fj5WoUUTErcazE/N6EW6Lvp0d//SDPj7EV9UdJN+Amnf3Wwk3A0SlJ9Z00yvXZ7n3z70G47Hfsow8Wq1JXcfwnA+Yxa5mFsgV464KKP4T31wqIgzFPd3eCe3j5ory5fBF2hgCFyVFrLzI9eetNXvM7oQqyFgDo4CTp/hDV9NMX9JDHQ/nyHTLvZLNLF6ftn2OxjGm8+PqOwhxnPHWipkE/8wbtyri80Sr7pMNkQGMfo4ZYK9OcCC4ESVFFbLMIvlxSoRqWie0wxqnLfcLSXMSpMMQEJYDVObYsXIQNv4TGNwjq1kvT1UOkicTrG3IaBZ3XdScS3u8sgeZPVpOLkbiF940FjbCeNRINNvDbd01EPBrTCPpm12m43ze1bBB59Ia6Ovhnur/Nvx3IxwSWol+3H2qfCJR8df6aQf4v6WiONxkK+IqT4pKQrZK/LplgDI/PJZbOep8dtbV7oCr6CgfpWa8NczOkPx81iSHbsNhVSJBOtrLIMrL31LK9TqHqAbAHe0RLmmV806kRLDLNEhUEJfm9u0sxpkL93Zgd6rw+tqBfTMi59xqXHLXSHwSbSBl0EK0+loECOPtrl+/nsaFe197di4yUgoe4jKoAJDXc6DGDjrQOoFDWZJ9HXwt8xDrQP+7aRwWKWI1GF8s8O4KzxWBBcwnl3vnl1Oez3oh6Ea1vjR7/z7DDTrFtqU2W/KAEzAuXDNZ7MY73MF216dzdSbWmUp4lcm7keJfWaMHgut9x5C9mj66Z0lJ+yhsjVvyiWrfk1lzPOTdhG15Y7gQlXtacvI7qv/XNSscDwqkgwHT/gUsD5yB7LdRRvJxQGYINn9hTpodKFVSTPrtGvyQw+HlRFXIkodErAGu9Iy1YpfSPc3jkFh5CX3lPxv7aqjE/JAfTIpEjGb/H7MO0e2vsViSW1qa/Lmi4/n4DEI3g7lYrcanspDfEpKkdV1OjSLOy0BCUqVoECaB55vs06rXl4jqmLsPsFM/7vYJ0vrBhDCm/00A/H81l1uekJ/6Lml3Hb9+NKiLqATJmDpyzfYZFHumEjC662L0Bwkxi7E9U4cQA0XMVDuMYAIeLMPgQaMVOd8fmt5SflFIfuBoszeAw7ow5gXPE2Y/yBc/7jExARUf/BxIHQBF5Sn3i61w4z5xJdCyO1F1X3+3ax+JSvMeZ7S6QSKp1Fp/sjYz6Z+VgCZzibGeEoujryfMulH7Rai5kAft9ebcW50DyJr2uo2z97mTWIu45YsSnNSMrrNUuG1XsYBtD9TDYzQffKB87vWbkM4EbPAFgoBV4GQS+vtFDUqOFAoi1nTtmIOvg38N4hT2Sn8r8clmBCXspBlMBYTnrqFJGBT3wZOzAyJDre9dHH7+x7qaaKDOB4UQALD5ecS0DE4obubQEiuJZ0EpBVpLuYcce8Aa4PYd/V4DLDAJBYKQPCWTcrEaZ5HYbJi11Gd6hjGom1ii18VHYnG28NKpkz2UKVPxlhYSp8uZr367iOmoy7zsxehW9wzcy2zG0a80PBMCRQMb32hnaHeOR8fnNDzZhaNYhkOdDsBUZ3loDMa1YP0uS0cjUP3b/6DBlqmZOeNABDsLl5BI5QJups8uxAuWJdkUB/pO6Zax6tsg7fN5mjjDgMGngO+DPcKqiHIDbFIGudxtPTIyDi9SFMKBDcfdGQRv41q1AqmxgkVfJMnP8w/Bc7N9/TR6C7mGObFqFkIEom8sKi2xYqJLTCHK7cxzaZvqODo22c3wisBCP4HeAgcRbNPAsBkNRhSmD48dHupdBRw4mIvtS5oeF6zeT1KMCyhMnmhpkFAGWnGscoNkwvQ8ZM5lE/vgTHFYL99OuNxdFBxTEDd5v2qLR8y9WkXsWgG6kZNndFG+pO/UAkOCipqIhL3hq7cRSdrCq7YhUsTocEcnaFa6nVkhnSeRYUA1YO0z5itF9Sly3VlxYDw239TJJH6f3EUfYO5lb7bcFcz8Bp7Oo8QmnsUHOz/fagVUBtKEw1iT88j+aKkv8cscKNkMxjYr8344D1kFoZ7/td1W6LCNYN594301tUGRmFjAzeRg5vyoM1F6+bJZ/Q54jN/k8SFd3DxPTYaAUsivsBfgTn7Mx8H2SpPt4GOdYRnEJOH6jHM2p6SgB0gzIRq6fHxGMmSmqaPCmlfwxiuloaVIitLGN8wie2CDWhkzLoCJcODh7KIOAqbHEvXdUxaS4TTTs07Clzj/6GmVs9kiZDerMxEnhUB6QQPlcfqkG9882RqHoLiHGBoHfQuXIsAG8GTAtao2KVwRnvvam8jo1e312GQAKWEa4sUVEAMG4G6ckcONDwRcg1e2D3+ohXgY4UAWF8wHKQMrSnzCgfFpsxh+aHXMGtPQroQasRY4U6UdG0rz1Vjbka0MekOGRZQEvqQFlxseFor8zWFgHek3v29+WqN6gaK5gZOTOMZzpQIC1201LkMCXild3vWXSc5UX9xcFYfbRPzGFa1FDcPfPB/jUEq/FeGt419CI3YmBlVoHsa4KdcwQP5ZSwHHhFJ7/Ph/Rap/4vmG91eDwPP0lDfCDRCLszTqfzM71xpmiKi2HwS4WlqvGNwtvwF5Dqpn6KTq8ax00UMPkxDcZrEEEsIvHiUXXEphdb4GB4FymlPwBz4Gperqq5pW7TQ6/yNRhW8VT5NhuP0udlxo4gILq5ZxAZk8ZGh3g4CqxJlPKY7AQxupfUcVpWT5VItp1+30UqoyP4wWsRo3olRRgkWZZ2ZN6VC3OZFeXB8NbnUrSdikNptD1QiGuKkr8EmSR/AK9Rw+FF3s5uwuPbvHGiPeFOViltMK7AUaOsq9+x9cndk3iJEE5LKZRlWJbKOZweROzmPNVPkjE3K/TyA57Rs68TkZ3MR8akKpm7cFjnjPd/DdkWjgYoKHSr5Wu5ssoBYU4acRs5g2DHxUmdq8VXOXRbunD8QN0LhgkssgahcdoYsNvuXGUK/KXD/7oFb+VGdhqIn02veuM5bLudJOc2Ky0GMaG4W/xWBxIJcL7yliJOXOpx0AkBqUgzlDczmLT4iILXDxxtRR1oZa2JWFgiAb43obrJnG/TZC2KSK2wqOzRZTXavZZFMb1f3bXvVaNaK828w9TO610gk8JNf3gMfETzXXsbcvRGCG9JWQZ6+cDPqc4466Yo2RcKH+PILeKOqtnlbInR3MmBeGG3FH10yzkybuqEC2HSQwpA0An7d9+73BkDUTm30bZmoP/RGbgFN+GrCOfADgqr0WbI1a1okpFms8iHYw9hm0zUvlEMivBRxModrbJJ+9/p3jUdQQ9BCtQdxnOGrT5dzRUmw0593/mbRSdBg0nRvRZM5/E16m7ZHmDEtWhwvfdZCZ8J8M12W0yRMszXamWfQTwIZ4ayYktrnscQuWr8idp3PjT2eF/jmtdhIfcpMnb+IfZY2FebW6UY/AK3jP4u3Tu4zE4qlnQgLFbM19EBIsNf7KhjdbqQ/D6yiDb+NlEi2SKD+ivXVUK8ib0oBo366gXkR8ZxGjpJIDcEgZPa9TcYe0TIbiPl/rPUQDu3XBJ9X/GNq3FAUsKsll57DzaGMrjcT+gctp+9MLYXCq+sqP81eVQ0r9lt+gcQfZbACRbEjvlMskztZG8gbC8Qn9tt26Q7y7nDrbZq/LEz7kR6Jc6pg3N9rVX8Y5MJrGlML9p9lU4jbTkKqCveeZUJjHB03m2KRKR2TytoFkTXOLg7keU1s1lrPMQJpoOKLuAAC+y1HlJucU6ysB5hsXhvSPPLq5J7JtnqHKZ4vYjC4Vy8153QY+6780xDuGARsGbOs1WqzH0QS765rnSKEbbKlkO8oI/VDwUd0is13tKpqILu1mDJFNy/iJAWcvDgjxvusIT+PGz3ST/J9r9Mtfd0jpaGeiLYIqXc7DiHSS8TcjFVksi66PEkxW1z6ujbLLUGNNYnzOWpH8BZGK4bCK7iR+MbIv8ncDAz1u4StN3vTTzewr9IQjk9wxFxn+6N1ddKs0vffJiS08N3a4G1SVrlZ97Q/M+8G9fe5AP6d9/Qq4WRnORVhofPIKEdCr3llspUfE0oKIIYoByBRPh+bX1HLS3JWGJRhIvE1aW4NTd8ePi4Z+kXb+Z8snYfSNcqijhAgVsx4RCM54cXUiYkjeBmmC4ajOHrChoELscJJC7+9jjMjw5BagZKlgRMiSNYz7h7vvZIoQqbtQmspc0cUk1G/73iXtSpROl5wtLgQi0mW2Ex8i3WULhcggx6E1LMVHUsdc9GHI1PH3U2Ko0PyGdn9KdVOLm7FPBui0i9a0HpA60MsewVE4z8CAt5d401Gv6zXlIT5Ybit1VIA0FCs7wtvYreru1fUyW3oLAZ/+aTnZrOcYRNVA8spoRtlRoWflsRClFcgzkqiHOrf0/SVw+EpVaFlJ0g4Kxq1MMOmiQdpMNpte8lMMQqm6cIFXlnGbfJllysKDi+0JJMotkqgIxOSQgU9dn/lWkeVf8nUm3iwX2Nl3WDw9i6AUK3vBAbZZrcJpDQ/N64AVwjT07Jef30GSSmtNu2WlW7YoyW2FlWfZFQUwk867EdLYKk9VG6JgEnBiBxkY7LMo4YLQJJlAo9l/oTvJkSARDF/XtyAzM8O2t3eT/iXa6wDN3WewNmQHdPfsxChU/KtLG2Mn8i4ZqKdSlIaBZadxJmRzVS/o4yA65RTSViq60oa395Lqw0pzY4SipwE0SXXsKV+GZraGSkr/RW08wPRvqvSUkYBMA9lPx4m24az+IHmCbXA+0faxTRE9wuGeO06DIXa6QlKJ3puIyiuAVfPr736vzo2pBirS+Vxel3TMm3JKhz9o2ZoRvaFVpIkykb0Hcm4oHFBMcNSNj7/4GJt43ogonY2Vg4nsDQIWxAcorpXACzgBqQPjYsE/VUpXpwNManEru4NwMCFPkXvMoqvoeLN3qyu/N1eWEHttMD65v19l/0kH2mR35iv/FI+yjoHJ9gPMz67af3Mq/BoWXqu3rphiWMXVkmnPSEkpGpUI2h1MThideGFEOK6YZHPwYzMBvpNC7+ZHxPb7epfefGyIB4JzO9DTNEYnDLVVHdQyvOEVefrk6Uv5kTQYVYWWdqrdcIl7yljwwIWdfQ/y+2QB3eR/qxYObuYyB4gTbo2in4PzarU1sO9nETkmj9/AoxDA+JM3GMqQtJR4jtduHtnoCLxd1gQUscHRB/MoRYIEsP2pDZ9KvHgtlk1iTbWWbHhohwFEYX7y51fUV2nuUmnoUcqnWIQAAgl9LTVX+Bc0QGNEhChxHR4YjfE51PUdGfsSFE6ck7BL3/hTf9jLq4G1IafINxOLKeAtO7quulYvH5YOBc+zX7CrMgWnW47/jfRsWnJjYYoE7xMfWV2HN2iyIqLI\";\n var FENCED = /* @__PURE__ */ new Map([[8217, \"apostrophe\"], [8260, \"fraction slash\"], [12539, \"middle dot\"]]);\n var NSM_MAX = 4;\n function decode_arithmetic(bytes) {\n let pos = 0;\n function u16() {\n return bytes[pos++] << 8 | bytes[pos++];\n }\n let symbol_count = u16();\n let total = 1;\n let acc = [0, 1];\n for (let i3 = 1; i3 < symbol_count; i3++) {\n acc.push(total += u16());\n }\n let skip = u16();\n let pos_payload = pos;\n pos += skip;\n let read_width = 0;\n let read_buffer = 0;\n function read_bit() {\n if (read_width == 0) {\n read_buffer = read_buffer << 8 | bytes[pos++];\n read_width = 8;\n }\n return read_buffer >> --read_width & 1;\n }\n const N4 = 31;\n const FULL = 2 ** N4;\n const HALF = FULL >>> 1;\n const QRTR = HALF >> 1;\n const MASK = FULL - 1;\n let register = 0;\n for (let i3 = 0; i3 < N4; i3++)\n register = register << 1 | read_bit();\n let symbols = [];\n let low = 0;\n let range = FULL;\n while (true) {\n let value = Math.floor(((register - low + 1) * total - 1) / range);\n let start = 0;\n let end = symbol_count;\n while (end - start > 1) {\n let mid = start + end >>> 1;\n if (value < acc[mid]) {\n end = mid;\n } else {\n start = mid;\n }\n }\n if (start == 0)\n break;\n symbols.push(start);\n let a3 = low + Math.floor(range * acc[start] / total);\n let b4 = low + Math.floor(range * acc[start + 1] / total) - 1;\n while (((a3 ^ b4) & HALF) == 0) {\n register = register << 1 & MASK | read_bit();\n a3 = a3 << 1 & MASK;\n b4 = b4 << 1 & MASK | 1;\n }\n while (a3 & ~b4 & QRTR) {\n register = register & HALF | register << 1 & MASK >>> 1 | read_bit();\n a3 = a3 << 1 ^ HALF;\n b4 = (b4 ^ HALF) << 1 | HALF | 1;\n }\n low = a3;\n range = 1 + b4 - a3;\n }\n let offset = symbol_count - 4;\n return symbols.map((x4) => {\n switch (x4 - offset) {\n case 3:\n return offset + 65792 + (bytes[pos_payload++] << 16 | bytes[pos_payload++] << 8 | bytes[pos_payload++]);\n case 2:\n return offset + 256 + (bytes[pos_payload++] << 8 | bytes[pos_payload++]);\n case 1:\n return offset + bytes[pos_payload++];\n default:\n return x4 - 1;\n }\n });\n }\n function read_payload(v2) {\n let pos = 0;\n return () => v2[pos++];\n }\n function read_compressed_payload(s4) {\n return read_payload(decode_arithmetic(unsafe_atob(s4)));\n }\n function unsafe_atob(s4) {\n let lookup = [];\n [...\"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/\"].forEach((c4, i3) => lookup[c4.charCodeAt(0)] = i3);\n let n2 = s4.length;\n let ret = new Uint8Array(6 * n2 >> 3);\n for (let i3 = 0, pos = 0, width = 0, carry = 0; i3 < n2; i3++) {\n carry = carry << 6 | lookup[s4.charCodeAt(i3)];\n width += 6;\n if (width >= 8) {\n ret[pos++] = carry >> (width -= 8);\n }\n }\n return ret;\n }\n function signed(i3) {\n return i3 & 1 ? ~i3 >> 1 : i3 >> 1;\n }\n function read_deltas(n2, next) {\n let v2 = Array(n2);\n for (let i3 = 0, x4 = 0; i3 < n2; i3++)\n v2[i3] = x4 += signed(next());\n return v2;\n }\n function read_sorted(next, prev = 0) {\n let ret = [];\n while (true) {\n let x4 = next();\n let n2 = next();\n if (!n2)\n break;\n prev += x4;\n for (let i3 = 0; i3 < n2; i3++) {\n ret.push(prev + i3);\n }\n prev += n2 + 1;\n }\n return ret;\n }\n function read_sorted_arrays(next) {\n return read_array_while(() => {\n let v2 = read_sorted(next);\n if (v2.length)\n return v2;\n });\n }\n function read_mapped(next) {\n let ret = [];\n while (true) {\n let w3 = next();\n if (w3 == 0)\n break;\n ret.push(read_linear_table(w3, next));\n }\n while (true) {\n let w3 = next() - 1;\n if (w3 < 0)\n break;\n ret.push(read_replacement_table(w3, next));\n }\n return ret.flat();\n }\n function read_array_while(next) {\n let v2 = [];\n while (true) {\n let x4 = next(v2.length);\n if (!x4)\n break;\n v2.push(x4);\n }\n return v2;\n }\n function read_transposed(n2, w3, next) {\n let m2 = Array(n2).fill().map(() => []);\n for (let i3 = 0; i3 < w3; i3++) {\n read_deltas(n2, next).forEach((x4, j2) => m2[j2].push(x4));\n }\n return m2;\n }\n function read_linear_table(w3, next) {\n let dx = 1 + next();\n let dy = next();\n let vN = read_array_while(next);\n let m2 = read_transposed(vN.length, 1 + w3, next);\n return m2.flatMap((v2, i3) => {\n let [x4, ...ys] = v2;\n return Array(vN[i3]).fill().map((_2, j2) => {\n let j_dy = j2 * dy;\n return [x4 + j2 * dx, ys.map((y6) => y6 + j_dy)];\n });\n });\n }\n function read_replacement_table(w3, next) {\n let n2 = 1 + next();\n let m2 = read_transposed(n2, 1 + w3, next);\n return m2.map((v2) => [v2[0], v2.slice(1)]);\n }\n function read_trie(next) {\n let ret = [];\n let sorted = read_sorted(next);\n expand(decode2([]), []);\n return ret;\n function decode2(Q2) {\n let S3 = next();\n let B2 = read_array_while(() => {\n let cps = read_sorted(next).map((i3) => sorted[i3]);\n if (cps.length)\n return decode2(cps);\n });\n return { S: S3, B: B2, Q: Q2 };\n }\n function expand({ S: S3, B: B2 }, cps, saved) {\n if (S3 & 4 && saved === cps[cps.length - 1])\n return;\n if (S3 & 2)\n saved = cps[cps.length - 1];\n if (S3 & 1)\n ret.push(cps);\n for (let br of B2) {\n for (let cp of br.Q) {\n expand(br, [...cps, cp], saved);\n }\n }\n }\n }\n function hex_cp(cp) {\n return cp.toString(16).toUpperCase().padStart(2, \"0\");\n }\n function quote_cp(cp) {\n return `{${hex_cp(cp)}}`;\n }\n function explode_cp(s4) {\n let cps = [];\n for (let pos = 0, len = s4.length; pos < len; ) {\n let cp = s4.codePointAt(pos);\n pos += cp < 65536 ? 1 : 2;\n cps.push(cp);\n }\n return cps;\n }\n function str_from_cps(cps) {\n const chunk = 4096;\n let len = cps.length;\n if (len < chunk)\n return String.fromCodePoint(...cps);\n let buf = [];\n for (let i3 = 0; i3 < len; ) {\n buf.push(String.fromCodePoint(...cps.slice(i3, i3 += chunk)));\n }\n return buf.join(\"\");\n }\n function compare_arrays(a3, b4) {\n let n2 = a3.length;\n let c4 = n2 - b4.length;\n for (let i3 = 0; c4 == 0 && i3 < n2; i3++)\n c4 = a3[i3] - b4[i3];\n return c4;\n }\n var COMPRESSED = \"AEUDTAHBCFQATQDRADAAcgAgADQAFAAsABQAHwAOACQADQARAAoAFwAHABIACAAPAAUACwAFAAwABAAQAAMABwAEAAoABQAIAAIACgABAAQAFAALAAIACwABAAIAAQAHAAMAAwAEAAsADAAMAAwACgANAA0AAwAKAAkABAAdAAYAZwDSAdsDJgC0CkMB8xhZAqfoC190UGcThgBurwf7PT09Pb09AjgJum8OjDllxHYUKXAPxzq6tABAxgK8ysUvWAgMPT09PT09PSs6LT2HcgWXWwFLoSMEEEl5RFVMKvO0XQ8ExDdJMnIgsj26PTQyy8FfEQ8AY8IPAGcEbwRwBHEEcgRzBHQEdQR2BHcEeAR6BHsEfAR+BIAEgfndBQoBYgULAWIFDAFiBNcE2ATZBRAFEQUvBdALFAsVDPcNBw13DYcOMA4xDjMB4BllHI0B2grbAMDpHLkQ7QHVAPRNQQFnGRUEg0yEB2uaJF8AJpIBpob5AERSMAKNoAXqaQLUBMCzEiACnwRZEkkVsS7tANAsBG0RuAQLEPABv9HICTUBXigPZwRBApMDOwAamhtaABqEAY8KvKx3LQ4ArAB8UhwEBAVSagD8AEFZADkBIadVj2UMUgx5Il4ANQC9AxIB1BlbEPMAs30CGxlXAhwZKQIECBc6EbsCoxngzv7UzRQA8M0BawL6ZwkN7wABAD33OQRcsgLJCjMCjqUChtw/km+NAsXPAoP2BT84PwURAK0RAvptb6cApQS/OMMey5HJS84UdxpxTPkCogVFITaTOwERAK5pAvkNBOVyA7q3BKlOJSALAgUIBRcEdASpBXqzABXFSWZOawLCOqw//AolCZdvv3dSBkEQGyelEPcMMwG1ATsN7UvYBPEGOwTJH30ZGQ/NlZwIpS3dDO0m4y6hgFoj9SqDBe1L9DzdC01RaA9ZC2UJ4zpjgU4DIQENIosK3Q05CG0Q8wrJaw3lEUUHOQPVSZoApQcBCxEdNRW1JhBirAsJOXcG+xr2C48mrxMpevwF0xohBk0BKRr/AM8u54WwWjFcHE9fBgMLJSPHFKhQIA0lQLd4SBobBxUlqQKRQ3BKh1E2HpMh9jw9DWYuE1F8B/U8BRlPC4E8nkarRQ4R0j6NPUgiSUwsBDV/LC8niwnPD4UMuXxyAVkJIQmxDHETMREXN8UIOQcZLZckJxUIIUaVYJoE958D8xPRAwsFPwlBBxMDtRwtEy4VKQUNgSTXAvM21S6zAo9WgAEXBcsPJR/fEFBH4A7pCJsCZQODJesALRUhABcimwhDYwBfj9hTBS7LCMdqbCN0A2cU52ERcweRDlcHpxwzFb8c4XDIXguGCCijrwlbAXUJmQFfBOMICTVbjKAgQWdTi1gYmyBhQT9d/AIxDGUVn0S9h3gCiw9rEhsBNQFzBzkNAQJ3Ee0RaxCVCOuGBDW1M/g6JQRPIYMgEQonA09szgsnJvkM+GkBoxJiAww0PXfuZ6tgtiQX/QcZMsVBYCHxC5JPzQycGsEYQlQuGeQHvwPzGvMn6kFXBf8DowMTOk0z7gS9C2kIiwk/AEkOoxcH1xhqCnGM0AExiwG3mQNXkYMCb48GNwcLAGcLhwV55QAdAqcIowAFAM8DVwA5Aq0HnQAZAIVBAT0DJy8BIeUCjwOTCDHLAZUvAfMpBBvDDBUA9zduSgLDsQKAamaiBd1YAo4CSTUBTSUEBU5HUQOvceEA2wBLBhPfRwEVq0rLGuNDAd9vKwDHAPsABTUHBUEBzQHzbQC3AV8LMQmis7UBTekpAIMAFWsB1wKJAN0ANQB/8QFTAE0FWfkF0wJPSQERMRgrV2EBuwMfATMBDQB5BsuNpckHHwRtB9MCEBsV4QLvLge1AQMi3xPNQsUCvd5VoWACZIECYkJbTa9bNyACofcCaJgCZgkCn4Q4GwsCZjsCZiYEbgR/A38TA36SOQY5dxc5gjojIwJsHQIyNjgKAm3HAm2u74ozZ0UrAWcA3gDhAEoFB5gMjQD+C8IADbUCdy8CdqI/AnlLQwJ4uh1c20WuRtcCfD8CesgCfQkCfPAFWQUgSABIfWMkAoFtAoAAAoAFAn+uSVhKWxUXSswC0QEC0MxLJwOITwOH5kTFkTIC8qFdAwMDrkvOTC0lA89NTE2vAos/AorYwRsHHUNnBbcCjjcCjlxAl4ECjtkCjlx4UbRTNQpS1FSFApP7ApMMAOkAHFUeVa9V0AYsGymVhjLheGZFOzkCl58C77JYIagAWSUClo8ClnycAKlZrFoJgU0AOwKWtQKWTlxEXNECmcsCmWRcyl0HGQKcmznCOp0CnBYCn5sCnriKAB0PMSoPAp3xAp6SALU9YTRh7wKe0wKgbgGpAp6fHwKeTqVjyGQnJSsCJ68CJn4CoPsCoEwCot0CocQCpi8Cpc4Cp/8AfQKn8mh8aLEAA0lqHGrRAqzjAqyuAq1nAq0CAlcdAlXcArHh1wMfTmyXArK9DQKy6Bds4G1jbUhfAyXNArZcOz9ukAMpRQK4XgK5RxUCuSp3cDZw4QK9GQK72nCWAzIRAr6IcgIDM3ECvhpzInNPAsPLAsMEc4J0SzVFdOADPKcDPJoDPb8CxXwCxkcCxhCJAshpUQLIRALJTwLJLgJknQLd0nh5YXiueSVL0AMYo2cCAmH0GfOVJHsLXpJeuxECz2sCz2wvS1PS8xOfAMatAs9zASnqA04SfksFAtwnAtuKAtJPA1JcA1NfAQEDVYyAiT8AyxbtYEWCHILTgs6DjQLaxwLZ3oQQhEmnPAOGpQAvA2QOhnFZ+QBVAt9lAt64c3cC4i/tFAHzMCcB9JsB8tKHAuvzAulweQLq+QLq5AD5RwG5Au6JAuuclqqXAwLuPwOF4Jh5cOBxoQLzAwBpA44WmZMC9xMDkW4DkocC95gC+dkC+GaaHJqruzebHgOdgwL++gEbADmfHJ+zAwWNA6ZqA6bZANHFAwZqoYiiBQkDDEkCwAA/AwDhQRdTARHzA2sHl2cFAJMtK7evvdsBiZkUfxEEOQH7KQUhDp0JnwCS/SlXxQL3AZ0AtwW5AG8LbUEuFCaNLgFDAYD8AbUmAHUDDgRtACwCFgyhAAAKAj0CagPdA34EkQEgRQUhfAoABQBEABMANhICdwEABdUDa+8KxQIA9wqfJ7+xt+UBkSFBQgHpFH8RNMCJAAQAGwBaAkUChIsABjpTOpSNbQC4Oo860ACNOME63AClAOgAywE6gTo7Ofw5+Tt2iTpbO56JOm85GAFWATMBbAUvNV01njWtNWY1dTW2NcU1gjWRNdI14TWeNa017jX9NbI1wTYCNhE1xjXVNhY2JzXeNe02LjY9Ni41LSE2OjY9Njw2yTcIBJA8VzY4Nt03IDcPNsogN4k3MAoEsDxnNiQ3GTdsOo03IULUQwdC4EMLHA8PCZsobShRVQYA6X8A6bABFCnXAukBowC9BbcAbwNzBL8MDAMMAQgDAAkKCwsLCQoGBAVVBI/DvwDz9b29kaUCb0QtsRTNLt4eGBcSHAMZFhYZEhYEARAEBUEcQRxBHEEcQRxBHEEaQRxBHEFCSTxBPElISUhBNkM2QTYbNklISVmBVIgBFLWZAu0BhQCjBcEAbykBvwGJAaQcEZ0ePCklMAAhMvAIMAL54gC7Bm8EescjzQMpARQpKgDUABavAj626xQAJP0A3etzuf4NNRA7efy2Z9NQrCnC0OSyANz5BBIbJ5IFDR6miIavYS6tprjjmuKebxm5C74Q225X1pkaYYPb6f1DK4k3xMEBb9S2WMjEibTNWhsRJIA+vwNVEiXTE5iXs/wezV66oFLfp9NZGYW+Gk19J2+bCT6Ye2w6LDYdgzKMUabk595eLBCXANz9HUpWbATq9vqXVx9XDg+Pc9Xp4+bsS005SVM/BJBM4687WUuf+Uj9dEi8aDNaPxtpbDxcG1THTImUMZq4UCaaNYpsVqraNyKLJXDYsFZ/5jl7bLRtO88t7P3xZaAxhb5OdPMXqsSkp1WCieG8jXm1U99+blvLlXzPCS+M93VnJCiK+09LfaSaBAVBomyDgJua8dfUzR7ga34IvR2Nvj+A9heJ6lsl1KG4NkI1032Cnff1m1wof2B9oHJK4bi6JkEdSqeNeiuo6QoZZincoc73/TH9SXF8sCE7XyuYyW8WSgbGFCjPV0ihLKhdPs08Tx82fYAkLLc4I2wdl4apY7GU5lHRFzRWJep7Ww3wbeA3qmd59/86P4xuNaqDpygXt6M85glSBHOCGgJDnt+pN9bK7HApMguX6+06RZNjzVmcZJ+wcUrJ9//bpRNxNuKpNl9uFds+S9tdx7LaM5ZkIrPj6nIU9mnbFtVbs9s/uLgl8MVczAwet+iOEzzBlYW7RCMgE6gyNLeq6+1tIx4dpgZnd0DksJS5f+JNDpwwcPNXaaVspq1fbQajOrJgK0ofKtJ1Ne90L6VO4MOl5S886p7u6xo7OLjG8TGL+HU1JXGJgppg4nNbNJ5nlzSpuPYy21JUEcUA94PoFiZfjZue+QnyQ80ekOuZVkxx4g+cvhJfHgNl4hy1/a6+RKcKlar/J29y//EztlbVPHVUeQ1zX86eQVAjR/M3dA9w4W8LfaXp4EgM85wOWasli837PzVMOnsLzR+k3o75/lRPAJSE1xAKQzEi5v10ke+VBvRt1cwQRMd+U5mLCTGVd6XiZtgBG5cDi0w22GKcVNvHiu5LQbZEDVtz0onn7k5+heuKXVsZtSzilkLRAUmjMXEMB3J9YC50XBxPiz53SC+EhnPl9WsKCv92SM/OFFIMJZYfl0WW8tIO3UxYcwdMAj7FSmgrsZ2aAZO03BOhP1bNNZItyXYQFTpC3SG1VuPDqH9GkiCDmE+JwxyIVSO5siDErAOpEXFgjy6PQtOVDj+s6e1r8heWVvmZnTciuf4EiNZzCAd7SOMhXERIOlsHIMG399i9aLTy3m2hRLZjJVDNLS53iGIK11dPqQt0zBDyg6qc7YqkDm2M5Ve6dCWCaCbTXX2rToaIgz6+zh4lYUi/+6nqcFMAkQJKHYLK0wYk5N9szV6xihDbDDFr45lN1K4aCXBq/FitPSud9gLt5ZVn+ZqGX7cwm2z5EGMgfFpIFyhGGuDPmso6TItTMwny+7uPnLCf4W6goFQFV0oQSsc9VfMmVLcLr6ZetDZbaSFTLqnSO/bIPjA3/zAUoqgGFAEQS4IhuMzEp2I3jJzbzkk/IEmyax+rhZTwd6f+CGtwPixu8IvzACquPWPREu9ZvGkUzpRwvRRuaNN6cr0W1wWits9ICdYJ7ltbgMiSL3sTPeufgNcVqMVWFkCPDH4jG2jA0XcVgQj62Cb29v9f/z/+2KbYvIv/zzjpQAPkliaVDzNrW57TZ/ZOyZD0nlfMmAIBIAGAI0D3k/mdN4xr9v85ZbZbbqfH2jGd5hUqNZWwl5SPfoGmfElmazUIeNL1j/mkF7VNAzTq4jNt8JoQ11NQOcmhprXoxSxfRGJ9LDEOAQ+dmxAQH90iti9e2u/MoeuaGcDTHoC+xsmEeWmxEKefQuIzHbpw5Tc5cEocboAD09oipWQhtTO1wivf/O+DRe2rpl/E9wlrzBorjJsOeG1B/XPW4EaJEFdNlECEZga5ZoGRHXgYouGRuVkm8tDESiEyFNo+3s5M5puSdTyUL2llnINVHEt91XUNW4ewdMgJ4boJfEyt/iY5WXqbA+A2Fkt5Z0lutiWhe9nZIyIUjyXDC3UsaG1t+eNx6z4W/OYoTB7A6x+dNSTOi9AInctbESqm5gvOLww7OWXPrmHwVZasrl4eD113pm+JtT7JVOvnCXqdzzdTRHgJ0PiGTFYW5Gvt9R9LD6Lzfs0v/TZZHSmyVNq7viIHE6DBK7Qp07Iz55EM8SYtQvZf/obBniTWi5C2/ovHfw4VndkE5XYdjOhCMRjDeOEfXeN/CwfGduiUIfsoFeUxXeQXba7c7972XNv8w+dTjjUM0QeNAReW+J014dKAD/McQYXT7c0GQPIkn3Ll6R7gGjuiQoZD0TEeEqQpKoZ15g/0OPQI17QiSv9AUROa/V/TQN3dvLArec3RrsYlvBm1b8LWzltdugsC50lNKYLEp2a+ZZYqPejULRlOJh5zj/LVMyTDvwKhMxxwuDkxJ1QpoNI0OTWLom4Z71SNzI9TV1iXJrIu9Wcnd+MCaAw8o1jSXd94YU/1gnkrC9BUEOtQvEIQ7g0i6h+KL2JKk8Ydl7HruvgWMSAmNe+LshGhV4qnWHhO9/RIPQzY1tHRj2VqOyNsDpK0cww+56AdDC4gsWwY0XxoucIWIqs/GcwnWqlaT0KPr8mbK5U94/301i1WLt4YINTVvCFBrFZbIbY8eycOdeJ2teD5IfPLCRg7jjcFTwlMFNl9zdh/o3E/hHPwj7BWg0MU09pPrBLbrCgm54A6H+I6v27+jL5gkjWg/iYdks9jbfVP5y/n0dlgWEMlKasl7JvFZd56LfybW1eeaVO0gxTfXZwD8G4SI116yx7UKVRgui6Ya1YpixqXeNLc8IxtAwCU5IhwQgn+NqHnRaDv61CxKhOq4pOX7M6pkA+Pmpd4j1vn6ACUALoLLc4vpXci8VidLxzm7qFBe7s+quuJs6ETYmnpgS3LwSZxPIltgBDXz8M1k/W2ySNv2f9/NPhxLGK2D21dkHeSGmenRT3Yqcdl0m/h3OYr8V+lXNYGf8aCCpd4bWjE4QIPj7vUKN4Nrfs7ML6Y2OyS830JCnofg/k7lpFpt4SqZc5HGg1HCOrHvOdC8bP6FGDbE/VV0mX4IakzbdS/op+Kt3G24/8QbBV7y86sGSQ/vZzU8FXs7u6jIvwchsEP2BpIhW3G8uWNwa3HmjfH/ZjhhCWvluAcF+nMf14ClKg5hGgtPLJ98ueNAkc5Hs2WZlk2QHvfreCK1CCGO6nMZVSb99VM/ajr8WHTte9JSmkXq/i/U943HEbdzW6Re/S88dKgg8pGOLlAeNiqrcLkUR3/aClFpMXcOUP3rmETcWSfMXZE3TUOi8i+fqRnTYLflVx/Vb/6GJ7eIRZUA6k3RYR3iFSK9c4iDdNwJuZL2FKz/IK5VimcNWEqdXjSoxSgmF0UPlDoUlNrPcM7ftmA8Y9gKiqKEHuWN+AZRIwtVSxye2Kf8rM3lhJ5XcBXU9n4v0Oy1RU2M+4qM8AQPVwse8ErNSob5oFPWxuqZnVzo1qB/IBxkM3EVUKFUUlO3e51259GgNcJbCmlvrdjtoTW7rChm1wyCKzpCTwozUUEOIcWLneRLgMXh+SjGSFkAllzbGS5HK7LlfCMRNRDSvbQPjcXaenNYxCvu2Qyznz6StuxVj66SgI0T8B6/sfHAJYZaZ78thjOSIFumNWLQbeZixDCCC+v0YBtkxiBB3jefHqZ/dFHU+crbj6OvS1x/JDD7vlm7zOVPwpUC01nhxZuY/63E7g\";\n var S0 = 44032;\n var L0 = 4352;\n var V0 = 4449;\n var T0 = 4519;\n var L_COUNT = 19;\n var V_COUNT = 21;\n var T_COUNT = 28;\n var N_COUNT = V_COUNT * T_COUNT;\n var S_COUNT = L_COUNT * N_COUNT;\n var S1 = S0 + S_COUNT;\n var L1 = L0 + L_COUNT;\n var V1 = V0 + V_COUNT;\n var T1 = T0 + T_COUNT;\n function unpack_cc(packed) {\n return packed >> 24 & 255;\n }\n function unpack_cp(packed) {\n return packed & 16777215;\n }\n var SHIFTED_RANK;\n var EXCLUSIONS;\n var DECOMP;\n var RECOMP;\n function init$1() {\n let r2 = read_compressed_payload(COMPRESSED);\n SHIFTED_RANK = new Map(read_sorted_arrays(r2).flatMap((v2, i3) => v2.map((x4) => [x4, i3 + 1 << 24])));\n EXCLUSIONS = new Set(read_sorted(r2));\n DECOMP = /* @__PURE__ */ new Map();\n RECOMP = /* @__PURE__ */ new Map();\n for (let [cp, cps] of read_mapped(r2)) {\n if (!EXCLUSIONS.has(cp) && cps.length == 2) {\n let [a3, b4] = cps;\n let bucket = RECOMP.get(a3);\n if (!bucket) {\n bucket = /* @__PURE__ */ new Map();\n RECOMP.set(a3, bucket);\n }\n bucket.set(b4, cp);\n }\n DECOMP.set(cp, cps.reverse());\n }\n }\n function is_hangul(cp) {\n return cp >= S0 && cp < S1;\n }\n function compose_pair(a3, b4) {\n if (a3 >= L0 && a3 < L1 && b4 >= V0 && b4 < V1) {\n return S0 + (a3 - L0) * N_COUNT + (b4 - V0) * T_COUNT;\n } else if (is_hangul(a3) && b4 > T0 && b4 < T1 && (a3 - S0) % T_COUNT == 0) {\n return a3 + (b4 - T0);\n } else {\n let recomp = RECOMP.get(a3);\n if (recomp) {\n recomp = recomp.get(b4);\n if (recomp) {\n return recomp;\n }\n }\n return -1;\n }\n }\n function decomposed(cps) {\n if (!SHIFTED_RANK)\n init$1();\n let ret = [];\n let buf = [];\n let check_order = false;\n function add2(cp) {\n let cc = SHIFTED_RANK.get(cp);\n if (cc) {\n check_order = true;\n cp |= cc;\n }\n ret.push(cp);\n }\n for (let cp of cps) {\n while (true) {\n if (cp < 128) {\n ret.push(cp);\n } else if (is_hangul(cp)) {\n let s_index = cp - S0;\n let l_index = s_index / N_COUNT | 0;\n let v_index = s_index % N_COUNT / T_COUNT | 0;\n let t_index = s_index % T_COUNT;\n add2(L0 + l_index);\n add2(V0 + v_index);\n if (t_index > 0)\n add2(T0 + t_index);\n } else {\n let mapped = DECOMP.get(cp);\n if (mapped) {\n buf.push(...mapped);\n } else {\n add2(cp);\n }\n }\n if (!buf.length)\n break;\n cp = buf.pop();\n }\n }\n if (check_order && ret.length > 1) {\n let prev_cc = unpack_cc(ret[0]);\n for (let i3 = 1; i3 < ret.length; i3++) {\n let cc = unpack_cc(ret[i3]);\n if (cc == 0 || prev_cc <= cc) {\n prev_cc = cc;\n continue;\n }\n let j2 = i3 - 1;\n while (true) {\n let tmp = ret[j2 + 1];\n ret[j2 + 1] = ret[j2];\n ret[j2] = tmp;\n if (!j2)\n break;\n prev_cc = unpack_cc(ret[--j2]);\n if (prev_cc <= cc)\n break;\n }\n prev_cc = unpack_cc(ret[i3]);\n }\n }\n return ret;\n }\n function composed_from_decomposed(v2) {\n let ret = [];\n let stack = [];\n let prev_cp = -1;\n let prev_cc = 0;\n for (let packed of v2) {\n let cc = unpack_cc(packed);\n let cp = unpack_cp(packed);\n if (prev_cp == -1) {\n if (cc == 0) {\n prev_cp = cp;\n } else {\n ret.push(cp);\n }\n } else if (prev_cc > 0 && prev_cc >= cc) {\n if (cc == 0) {\n ret.push(prev_cp, ...stack);\n stack.length = 0;\n prev_cp = cp;\n } else {\n stack.push(cp);\n }\n prev_cc = cc;\n } else {\n let composed = compose_pair(prev_cp, cp);\n if (composed >= 0) {\n prev_cp = composed;\n } else if (prev_cc == 0 && cc == 0) {\n ret.push(prev_cp);\n prev_cp = cp;\n } else {\n stack.push(cp);\n prev_cc = cc;\n }\n }\n }\n if (prev_cp >= 0) {\n ret.push(prev_cp, ...stack);\n }\n return ret;\n }\n function nfd(cps) {\n return decomposed(cps).map(unpack_cp);\n }\n function nfc(cps) {\n return composed_from_decomposed(decomposed(cps));\n }\n var HYPHEN = 45;\n var STOP = 46;\n var STOP_CH = \".\";\n var FE0F = 65039;\n var UNIQUE_PH = 1;\n var Array_from = (x4) => Array.from(x4);\n function group_has_cp(g4, cp) {\n return g4.P.has(cp) || g4.Q.has(cp);\n }\n var Emoji = class extends Array {\n get is_emoji() {\n return true;\n }\n // free tagging system\n };\n var MAPPED;\n var IGNORED;\n var CM;\n var NSM;\n var ESCAPE;\n var NFC_CHECK;\n var GROUPS;\n var WHOLE_VALID;\n var WHOLE_MAP;\n var VALID;\n var EMOJI_LIST;\n var EMOJI_ROOT;\n function init() {\n if (MAPPED)\n return;\n let r2 = read_compressed_payload(COMPRESSED$1);\n const read_sorted_array = () => read_sorted(r2);\n const read_sorted_set = () => new Set(read_sorted_array());\n const set_add_many = (set, v2) => v2.forEach((x4) => set.add(x4));\n MAPPED = new Map(read_mapped(r2));\n IGNORED = read_sorted_set();\n CM = read_sorted_array();\n NSM = new Set(read_sorted_array().map((i3) => CM[i3]));\n CM = new Set(CM);\n ESCAPE = read_sorted_set();\n NFC_CHECK = read_sorted_set();\n let chunks = read_sorted_arrays(r2);\n let unrestricted = r2();\n const read_chunked = () => {\n let set = /* @__PURE__ */ new Set();\n read_sorted_array().forEach((i3) => set_add_many(set, chunks[i3]));\n set_add_many(set, read_sorted_array());\n return set;\n };\n GROUPS = read_array_while((i3) => {\n let N4 = read_array_while(r2).map((x4) => x4 + 96);\n if (N4.length) {\n let R3 = i3 >= unrestricted;\n N4[0] -= 32;\n N4 = str_from_cps(N4);\n if (R3)\n N4 = `Restricted[${N4}]`;\n let P2 = read_chunked();\n let Q2 = read_chunked();\n let M2 = !r2();\n return { N: N4, P: P2, Q: Q2, M: M2, R: R3 };\n }\n });\n WHOLE_VALID = read_sorted_set();\n WHOLE_MAP = /* @__PURE__ */ new Map();\n let wholes = read_sorted_array().concat(Array_from(WHOLE_VALID)).sort((a3, b4) => a3 - b4);\n wholes.forEach((cp, i3) => {\n let d5 = r2();\n let w3 = wholes[i3] = d5 ? wholes[i3 - d5] : { V: [], M: /* @__PURE__ */ new Map() };\n w3.V.push(cp);\n if (!WHOLE_VALID.has(cp)) {\n WHOLE_MAP.set(cp, w3);\n }\n });\n for (let { V: V2, M: M2 } of new Set(WHOLE_MAP.values())) {\n let recs = [];\n for (let cp of V2) {\n let gs = GROUPS.filter((g4) => group_has_cp(g4, cp));\n let rec = recs.find(({ G }) => gs.some((g4) => G.has(g4)));\n if (!rec) {\n rec = { G: /* @__PURE__ */ new Set(), V: [] };\n recs.push(rec);\n }\n rec.V.push(cp);\n set_add_many(rec.G, gs);\n }\n let union2 = recs.flatMap((x4) => Array_from(x4.G));\n for (let { G, V: V3 } of recs) {\n let complement = new Set(union2.filter((g4) => !G.has(g4)));\n for (let cp of V3) {\n M2.set(cp, complement);\n }\n }\n }\n VALID = /* @__PURE__ */ new Set();\n let multi = /* @__PURE__ */ new Set();\n const add_to_union = (cp) => VALID.has(cp) ? multi.add(cp) : VALID.add(cp);\n for (let g4 of GROUPS) {\n for (let cp of g4.P)\n add_to_union(cp);\n for (let cp of g4.Q)\n add_to_union(cp);\n }\n for (let cp of VALID) {\n if (!WHOLE_MAP.has(cp) && !multi.has(cp)) {\n WHOLE_MAP.set(cp, UNIQUE_PH);\n }\n }\n set_add_many(VALID, nfd(VALID));\n EMOJI_LIST = read_trie(r2).map((v2) => Emoji.from(v2)).sort(compare_arrays);\n EMOJI_ROOT = /* @__PURE__ */ new Map();\n for (let cps of EMOJI_LIST) {\n let prev = [EMOJI_ROOT];\n for (let cp of cps) {\n let next = prev.map((node) => {\n let child = node.get(cp);\n if (!child) {\n child = /* @__PURE__ */ new Map();\n node.set(cp, child);\n }\n return child;\n });\n if (cp === FE0F) {\n prev.push(...next);\n } else {\n prev = next;\n }\n }\n for (let x4 of prev) {\n x4.V = cps;\n }\n }\n }\n function quoted_cp(cp) {\n return (should_escape(cp) ? \"\" : `${bidi_qq(safe_str_from_cps([cp]))} `) + quote_cp(cp);\n }\n function bidi_qq(s4) {\n return `\"${s4}\"\\u200E`;\n }\n function check_label_extension(cps) {\n if (cps.length >= 4 && cps[2] == HYPHEN && cps[3] == HYPHEN) {\n throw new Error(`invalid label extension: \"${str_from_cps(cps.slice(0, 4))}\"`);\n }\n }\n function check_leading_underscore(cps) {\n const UNDERSCORE = 95;\n for (let i3 = cps.lastIndexOf(UNDERSCORE); i3 > 0; ) {\n if (cps[--i3] !== UNDERSCORE) {\n throw new Error(\"underscore allowed only at start\");\n }\n }\n }\n function check_fenced(cps) {\n let cp = cps[0];\n let prev = FENCED.get(cp);\n if (prev)\n throw error_placement(`leading ${prev}`);\n let n2 = cps.length;\n let last = -1;\n for (let i3 = 1; i3 < n2; i3++) {\n cp = cps[i3];\n let match = FENCED.get(cp);\n if (match) {\n if (last == i3)\n throw error_placement(`${prev} + ${match}`);\n last = i3 + 1;\n prev = match;\n }\n }\n if (last == n2)\n throw error_placement(`trailing ${prev}`);\n }\n function safe_str_from_cps(cps, max = Infinity, quoter = quote_cp) {\n let buf = [];\n if (is_combining_mark(cps[0]))\n buf.push(\"\\u25CC\");\n if (cps.length > max) {\n max >>= 1;\n cps = [...cps.slice(0, max), 8230, ...cps.slice(-max)];\n }\n let prev = 0;\n let n2 = cps.length;\n for (let i3 = 0; i3 < n2; i3++) {\n let cp = cps[i3];\n if (should_escape(cp)) {\n buf.push(str_from_cps(cps.slice(prev, i3)));\n buf.push(quoter(cp));\n prev = i3 + 1;\n }\n }\n buf.push(str_from_cps(cps.slice(prev, n2)));\n return buf.join(\"\");\n }\n function is_combining_mark(cp) {\n init();\n return CM.has(cp);\n }\n function should_escape(cp) {\n init();\n return ESCAPE.has(cp);\n }\n function ens_emoji() {\n init();\n return EMOJI_LIST.map((x4) => x4.slice());\n }\n function ens_normalize_fragment(frag, decompose) {\n init();\n let nf = decompose ? nfd : nfc;\n return frag.split(STOP_CH).map((label) => str_from_cps(tokens_from_str(explode_cp(label), nf, filter_fe0f).flat())).join(STOP_CH);\n }\n function ens_normalize(name) {\n return flatten(split4(name, nfc, filter_fe0f));\n }\n function ens_beautify(name) {\n let labels = split4(name, nfc, (x4) => x4);\n for (let { type, output, error } of labels) {\n if (error)\n break;\n if (type !== \"Greek\")\n array_replace(output, 958, 926);\n }\n return flatten(labels);\n }\n function array_replace(v2, a3, b4) {\n let prev = 0;\n while (true) {\n let next = v2.indexOf(a3, prev);\n if (next < 0)\n break;\n v2[next] = b4;\n prev = next + 1;\n }\n }\n function ens_split(name, preserve_emoji) {\n return split4(name, nfc, preserve_emoji ? (x4) => x4.slice() : filter_fe0f);\n }\n function split4(name, nf, ef) {\n if (!name)\n return [];\n init();\n let offset = 0;\n return name.split(STOP_CH).map((label) => {\n let input = explode_cp(label);\n let info = {\n input,\n offset\n // codepoint, not substring!\n };\n offset += input.length + 1;\n try {\n let tokens = info.tokens = tokens_from_str(input, nf, ef);\n let token_count = tokens.length;\n let type;\n if (!token_count) {\n throw new Error(`empty label`);\n }\n let norm = info.output = tokens.flat();\n check_leading_underscore(norm);\n let emoji = info.emoji = token_count > 1 || tokens[0].is_emoji;\n if (!emoji && norm.every((cp) => cp < 128)) {\n check_label_extension(norm);\n type = \"ASCII\";\n } else {\n let chars = tokens.flatMap((x4) => x4.is_emoji ? [] : x4);\n if (!chars.length) {\n type = \"Emoji\";\n } else {\n if (CM.has(norm[0]))\n throw error_placement(\"leading combining mark\");\n for (let i3 = 1; i3 < token_count; i3++) {\n let cps = tokens[i3];\n if (!cps.is_emoji && CM.has(cps[0])) {\n throw error_placement(`emoji + combining mark: \"${str_from_cps(tokens[i3 - 1])} + ${safe_str_from_cps([cps[0]])}\"`);\n }\n }\n check_fenced(norm);\n let unique = Array_from(new Set(chars));\n let [g4] = determine_group(unique);\n check_group(g4, chars);\n check_whole(g4, unique);\n type = g4.N;\n }\n }\n info.type = type;\n } catch (err) {\n info.error = err;\n }\n return info;\n });\n }\n function check_whole(group, unique) {\n let maker;\n let shared = [];\n for (let cp of unique) {\n let whole = WHOLE_MAP.get(cp);\n if (whole === UNIQUE_PH)\n return;\n if (whole) {\n let set = whole.M.get(cp);\n maker = maker ? maker.filter((g4) => set.has(g4)) : Array_from(set);\n if (!maker.length)\n return;\n } else {\n shared.push(cp);\n }\n }\n if (maker) {\n for (let g4 of maker) {\n if (shared.every((cp) => group_has_cp(g4, cp))) {\n throw new Error(`whole-script confusable: ${group.N}/${g4.N}`);\n }\n }\n }\n }\n function determine_group(unique) {\n let groups = GROUPS;\n for (let cp of unique) {\n let gs = groups.filter((g4) => group_has_cp(g4, cp));\n if (!gs.length) {\n if (!GROUPS.some((g4) => group_has_cp(g4, cp))) {\n throw error_disallowed(cp);\n } else {\n throw error_group_member(groups[0], cp);\n }\n }\n groups = gs;\n if (gs.length == 1)\n break;\n }\n return groups;\n }\n function flatten(split5) {\n return split5.map(({ input, error, output }) => {\n if (error) {\n let msg = error.message;\n throw new Error(split5.length == 1 ? msg : `Invalid label ${bidi_qq(safe_str_from_cps(input, 63))}: ${msg}`);\n }\n return str_from_cps(output);\n }).join(STOP_CH);\n }\n function error_disallowed(cp) {\n return new Error(`disallowed character: ${quoted_cp(cp)}`);\n }\n function error_group_member(g4, cp) {\n let quoted = quoted_cp(cp);\n let gg = GROUPS.find((g5) => g5.P.has(cp));\n if (gg) {\n quoted = `${gg.N} ${quoted}`;\n }\n return new Error(`illegal mixture: ${g4.N} + ${quoted}`);\n }\n function error_placement(where) {\n return new Error(`illegal placement: ${where}`);\n }\n function check_group(g4, cps) {\n for (let cp of cps) {\n if (!group_has_cp(g4, cp)) {\n throw error_group_member(g4, cp);\n }\n }\n if (g4.M) {\n let decomposed2 = nfd(cps);\n for (let i3 = 1, e3 = decomposed2.length; i3 < e3; i3++) {\n if (NSM.has(decomposed2[i3])) {\n let j2 = i3 + 1;\n for (let cp; j2 < e3 && NSM.has(cp = decomposed2[j2]); j2++) {\n for (let k4 = i3; k4 < j2; k4++) {\n if (decomposed2[k4] == cp) {\n throw new Error(`duplicate non-spacing marks: ${quoted_cp(cp)}`);\n }\n }\n }\n if (j2 - i3 > NSM_MAX) {\n throw new Error(`excessive non-spacing marks: ${bidi_qq(safe_str_from_cps(decomposed2.slice(i3 - 1, j2)))} (${j2 - i3}/${NSM_MAX})`);\n }\n i3 = j2;\n }\n }\n }\n }\n function tokens_from_str(input, nf, ef) {\n let ret = [];\n let chars = [];\n input = input.slice().reverse();\n while (input.length) {\n let emoji = consume_emoji_reversed(input);\n if (emoji) {\n if (chars.length) {\n ret.push(nf(chars));\n chars = [];\n }\n ret.push(ef(emoji));\n } else {\n let cp = input.pop();\n if (VALID.has(cp)) {\n chars.push(cp);\n } else {\n let cps = MAPPED.get(cp);\n if (cps) {\n chars.push(...cps);\n } else if (!IGNORED.has(cp)) {\n throw error_disallowed(cp);\n }\n }\n }\n }\n if (chars.length) {\n ret.push(nf(chars));\n }\n return ret;\n }\n function filter_fe0f(cps) {\n return cps.filter((cp) => cp != FE0F);\n }\n function consume_emoji_reversed(cps, eaten) {\n let node = EMOJI_ROOT;\n let emoji;\n let pos = cps.length;\n while (pos) {\n node = node.get(cps[--pos]);\n if (!node)\n break;\n let { V: V2 } = node;\n if (V2) {\n emoji = V2;\n if (eaten)\n eaten.push(...cps.slice(pos).reverse());\n cps.length = pos;\n }\n }\n return emoji;\n }\n var TY_VALID = \"valid\";\n var TY_MAPPED = \"mapped\";\n var TY_IGNORED = \"ignored\";\n var TY_DISALLOWED = \"disallowed\";\n var TY_EMOJI = \"emoji\";\n var TY_NFC = \"nfc\";\n var TY_STOP = \"stop\";\n function ens_tokenize(name, {\n nf = true\n // collapse unnormalized runs into a single token\n } = {}) {\n init();\n let input = explode_cp(name).reverse();\n let eaten = [];\n let tokens = [];\n while (input.length) {\n let emoji = consume_emoji_reversed(input, eaten);\n if (emoji) {\n tokens.push({\n type: TY_EMOJI,\n emoji: emoji.slice(),\n // copy emoji\n input: eaten,\n cps: filter_fe0f(emoji)\n });\n eaten = [];\n } else {\n let cp = input.pop();\n if (cp == STOP) {\n tokens.push({ type: TY_STOP, cp });\n } else if (VALID.has(cp)) {\n tokens.push({ type: TY_VALID, cps: [cp] });\n } else if (IGNORED.has(cp)) {\n tokens.push({ type: TY_IGNORED, cp });\n } else {\n let cps = MAPPED.get(cp);\n if (cps) {\n tokens.push({ type: TY_MAPPED, cp, cps: cps.slice() });\n } else {\n tokens.push({ type: TY_DISALLOWED, cp });\n }\n }\n }\n }\n if (nf) {\n for (let i3 = 0, start = -1; i3 < tokens.length; i3++) {\n let token = tokens[i3];\n if (is_valid_or_mapped(token.type)) {\n if (requires_check(token.cps)) {\n let end = i3 + 1;\n for (let pos = end; pos < tokens.length; pos++) {\n let { type, cps: cps2 } = tokens[pos];\n if (is_valid_or_mapped(type)) {\n if (!requires_check(cps2))\n break;\n end = pos + 1;\n } else if (type !== TY_IGNORED) {\n break;\n }\n }\n if (start < 0)\n start = i3;\n let slice4 = tokens.slice(start, end);\n let cps0 = slice4.flatMap((x4) => is_valid_or_mapped(x4.type) ? x4.cps : []);\n let cps = nfc(cps0);\n if (compare_arrays(cps, cps0)) {\n tokens.splice(start, end - start, {\n type: TY_NFC,\n input: cps0,\n // there are 3 states: tokens0 ==(process)=> input ==(nfc)=> tokens/cps\n cps,\n tokens0: collapse_valid_tokens(slice4),\n tokens: ens_tokenize(str_from_cps(cps), { nf: false })\n });\n i3 = start;\n } else {\n i3 = end - 1;\n }\n start = -1;\n } else {\n start = i3;\n }\n } else if (token.type !== TY_IGNORED) {\n start = -1;\n }\n }\n }\n return collapse_valid_tokens(tokens);\n }\n function is_valid_or_mapped(type) {\n return type == TY_VALID || type == TY_MAPPED;\n }\n function requires_check(cps) {\n return cps.some((cp) => NFC_CHECK.has(cp));\n }\n function collapse_valid_tokens(tokens) {\n for (let i3 = 0; i3 < tokens.length; i3++) {\n if (tokens[i3].type == TY_VALID) {\n let j2 = i3 + 1;\n while (j2 < tokens.length && tokens[j2].type == TY_VALID)\n j2++;\n tokens.splice(i3, j2 - i3, { type: TY_VALID, cps: tokens.slice(i3, j2).flatMap((x4) => x4.cps) });\n }\n }\n return tokens;\n }\n exports3.ens_beautify = ens_beautify;\n exports3.ens_emoji = ens_emoji;\n exports3.ens_normalize = ens_normalize;\n exports3.ens_normalize_fragment = ens_normalize_fragment;\n exports3.ens_split = ens_split;\n exports3.ens_tokenize = ens_tokenize;\n exports3.is_combining_mark = is_combining_mark;\n exports3.nfc = nfc;\n exports3.nfd = nfd;\n exports3.safe_str_from_cps = safe_str_from_cps;\n exports3.should_escape = should_escape;\n }\n });\n\n // ../../../node_modules/.pnpm/ethers@6.15.0_bufferutil@4.0.9_utf-8-validate@5.0.10/node_modules/ethers/lib.commonjs/hash/namehash.js\n var require_namehash2 = __commonJS({\n \"../../../node_modules/.pnpm/ethers@6.15.0_bufferutil@4.0.9_utf-8-validate@5.0.10/node_modules/ethers/lib.commonjs/hash/namehash.js\"(exports3) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n Object.defineProperty(exports3, \"__esModule\", { value: true });\n exports3.dnsEncode = exports3.namehash = exports3.isValidName = exports3.ensNormalize = void 0;\n var index_js_1 = require_crypto2();\n var index_js_2 = require_utils8();\n var ens_normalize_1 = require_dist();\n var Zeros = new Uint8Array(32);\n Zeros.fill(0);\n function checkComponent(comp) {\n (0, index_js_2.assertArgument)(comp.length !== 0, \"invalid ENS name; empty component\", \"comp\", comp);\n return comp;\n }\n function ensNameSplit(name) {\n const bytes = (0, index_js_2.toUtf8Bytes)(ensNormalize(name));\n const comps = [];\n if (name.length === 0) {\n return comps;\n }\n let last = 0;\n for (let i3 = 0; i3 < bytes.length; i3++) {\n const d5 = bytes[i3];\n if (d5 === 46) {\n comps.push(checkComponent(bytes.slice(last, i3)));\n last = i3 + 1;\n }\n }\n (0, index_js_2.assertArgument)(last < bytes.length, \"invalid ENS name; empty component\", \"name\", name);\n comps.push(checkComponent(bytes.slice(last)));\n return comps;\n }\n function ensNormalize(name) {\n try {\n if (name.length === 0) {\n throw new Error(\"empty label\");\n }\n return (0, ens_normalize_1.ens_normalize)(name);\n } catch (error) {\n (0, index_js_2.assertArgument)(false, `invalid ENS name (${error.message})`, \"name\", name);\n }\n }\n exports3.ensNormalize = ensNormalize;\n function isValidName(name) {\n try {\n return ensNameSplit(name).length !== 0;\n } catch (error) {\n }\n return false;\n }\n exports3.isValidName = isValidName;\n function namehash2(name) {\n (0, index_js_2.assertArgument)(typeof name === \"string\", \"invalid ENS name; not a string\", \"name\", name);\n (0, index_js_2.assertArgument)(name.length, `invalid ENS name (empty label)`, \"name\", name);\n let result = Zeros;\n const comps = ensNameSplit(name);\n while (comps.length) {\n result = (0, index_js_1.keccak256)((0, index_js_2.concat)([result, (0, index_js_1.keccak256)(comps.pop())]));\n }\n return (0, index_js_2.hexlify)(result);\n }\n exports3.namehash = namehash2;\n function dnsEncode(name, _maxLength) {\n const length2 = _maxLength != null ? _maxLength : 63;\n (0, index_js_2.assertArgument)(length2 <= 255, \"DNS encoded label cannot exceed 255\", \"length\", length2);\n return (0, index_js_2.hexlify)((0, index_js_2.concat)(ensNameSplit(name).map((comp) => {\n (0, index_js_2.assertArgument)(comp.length <= length2, `label ${JSON.stringify(name)} exceeds ${length2} bytes`, \"name\", name);\n const bytes = new Uint8Array(comp.length + 1);\n bytes.set(comp, 1);\n bytes[0] = bytes.length - 1;\n return bytes;\n }))) + \"00\";\n }\n exports3.dnsEncode = dnsEncode;\n }\n });\n\n // ../../../node_modules/.pnpm/ethers@6.15.0_bufferutil@4.0.9_utf-8-validate@5.0.10/node_modules/ethers/lib.commonjs/hash/message.js\n var require_message2 = __commonJS({\n \"../../../node_modules/.pnpm/ethers@6.15.0_bufferutil@4.0.9_utf-8-validate@5.0.10/node_modules/ethers/lib.commonjs/hash/message.js\"(exports3) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n Object.defineProperty(exports3, \"__esModule\", { value: true });\n exports3.verifyMessage = exports3.hashMessage = void 0;\n var index_js_1 = require_crypto2();\n var index_js_2 = require_constants5();\n var index_js_3 = require_transaction2();\n var index_js_4 = require_utils8();\n function hashMessage2(message) {\n if (typeof message === \"string\") {\n message = (0, index_js_4.toUtf8Bytes)(message);\n }\n return (0, index_js_1.keccak256)((0, index_js_4.concat)([\n (0, index_js_4.toUtf8Bytes)(index_js_2.MessagePrefix),\n (0, index_js_4.toUtf8Bytes)(String(message.length)),\n message\n ]));\n }\n exports3.hashMessage = hashMessage2;\n function verifyMessage2(message, sig) {\n const digest = hashMessage2(message);\n return (0, index_js_3.recoverAddress)(digest, sig);\n }\n exports3.verifyMessage = verifyMessage2;\n }\n });\n\n // ../../../node_modules/.pnpm/ethers@6.15.0_bufferutil@4.0.9_utf-8-validate@5.0.10/node_modules/ethers/lib.commonjs/hash/solidity.js\n var require_solidity = __commonJS({\n \"../../../node_modules/.pnpm/ethers@6.15.0_bufferutil@4.0.9_utf-8-validate@5.0.10/node_modules/ethers/lib.commonjs/hash/solidity.js\"(exports3) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n Object.defineProperty(exports3, \"__esModule\", { value: true });\n exports3.solidityPackedSha256 = exports3.solidityPackedKeccak256 = exports3.solidityPacked = void 0;\n var index_js_1 = require_address3();\n var index_js_2 = require_crypto2();\n var index_js_3 = require_utils8();\n var regexBytes = new RegExp(\"^bytes([0-9]+)$\");\n var regexNumber = new RegExp(\"^(u?int)([0-9]*)$\");\n var regexArray = new RegExp(\"^(.*)\\\\[([0-9]*)\\\\]$\");\n function _pack(type, value, isArray) {\n switch (type) {\n case \"address\":\n if (isArray) {\n return (0, index_js_3.getBytes)((0, index_js_3.zeroPadValue)(value, 32));\n }\n return (0, index_js_3.getBytes)((0, index_js_1.getAddress)(value));\n case \"string\":\n return (0, index_js_3.toUtf8Bytes)(value);\n case \"bytes\":\n return (0, index_js_3.getBytes)(value);\n case \"bool\":\n value = !!value ? \"0x01\" : \"0x00\";\n if (isArray) {\n return (0, index_js_3.getBytes)((0, index_js_3.zeroPadValue)(value, 32));\n }\n return (0, index_js_3.getBytes)(value);\n }\n let match = type.match(regexNumber);\n if (match) {\n let signed = match[1] === \"int\";\n let size6 = parseInt(match[2] || \"256\");\n (0, index_js_3.assertArgument)((!match[2] || match[2] === String(size6)) && size6 % 8 === 0 && size6 !== 0 && size6 <= 256, \"invalid number type\", \"type\", type);\n if (isArray) {\n size6 = 256;\n }\n if (signed) {\n value = (0, index_js_3.toTwos)(value, size6);\n }\n return (0, index_js_3.getBytes)((0, index_js_3.zeroPadValue)((0, index_js_3.toBeArray)(value), size6 / 8));\n }\n match = type.match(regexBytes);\n if (match) {\n const size6 = parseInt(match[1]);\n (0, index_js_3.assertArgument)(String(size6) === match[1] && size6 !== 0 && size6 <= 32, \"invalid bytes type\", \"type\", type);\n (0, index_js_3.assertArgument)((0, index_js_3.dataLength)(value) === size6, `invalid value for ${type}`, \"value\", value);\n if (isArray) {\n return (0, index_js_3.getBytes)((0, index_js_3.zeroPadBytes)(value, 32));\n }\n return value;\n }\n match = type.match(regexArray);\n if (match && Array.isArray(value)) {\n const baseType = match[1];\n const count = parseInt(match[2] || String(value.length));\n (0, index_js_3.assertArgument)(count === value.length, `invalid array length for ${type}`, \"value\", value);\n const result = [];\n value.forEach(function(value2) {\n result.push(_pack(baseType, value2, true));\n });\n return (0, index_js_3.getBytes)((0, index_js_3.concat)(result));\n }\n (0, index_js_3.assertArgument)(false, \"invalid type\", \"type\", type);\n }\n function solidityPacked(types, values) {\n (0, index_js_3.assertArgument)(types.length === values.length, \"wrong number of values; expected ${ types.length }\", \"values\", values);\n const tight = [];\n types.forEach(function(type, index2) {\n tight.push(_pack(type, values[index2]));\n });\n return (0, index_js_3.hexlify)((0, index_js_3.concat)(tight));\n }\n exports3.solidityPacked = solidityPacked;\n function solidityPackedKeccak256(types, values) {\n return (0, index_js_2.keccak256)(solidityPacked(types, values));\n }\n exports3.solidityPackedKeccak256 = solidityPackedKeccak256;\n function solidityPackedSha256(types, values) {\n return (0, index_js_2.sha256)(solidityPacked(types, values));\n }\n exports3.solidityPackedSha256 = solidityPackedSha256;\n }\n });\n\n // ../../../node_modules/.pnpm/ethers@6.15.0_bufferutil@4.0.9_utf-8-validate@5.0.10/node_modules/ethers/lib.commonjs/hash/typed-data.js\n var require_typed_data2 = __commonJS({\n \"../../../node_modules/.pnpm/ethers@6.15.0_bufferutil@4.0.9_utf-8-validate@5.0.10/node_modules/ethers/lib.commonjs/hash/typed-data.js\"(exports3) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n Object.defineProperty(exports3, \"__esModule\", { value: true });\n exports3.verifyTypedData = exports3.TypedDataEncoder = void 0;\n var index_js_1 = require_address3();\n var index_js_2 = require_crypto2();\n var index_js_3 = require_transaction2();\n var index_js_4 = require_utils8();\n var id_js_1 = require_id2();\n var padding = new Uint8Array(32);\n padding.fill(0);\n var BN__1 = BigInt(-1);\n var BN_0 = BigInt(0);\n var BN_1 = BigInt(1);\n var BN_MAX_UINT256 = BigInt(\"0xffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff\");\n function hexPadRight(value) {\n const bytes = (0, index_js_4.getBytes)(value);\n const padOffset = bytes.length % 32;\n if (padOffset) {\n return (0, index_js_4.concat)([bytes, padding.slice(padOffset)]);\n }\n return (0, index_js_4.hexlify)(bytes);\n }\n var hexTrue = (0, index_js_4.toBeHex)(BN_1, 32);\n var hexFalse = (0, index_js_4.toBeHex)(BN_0, 32);\n var domainFieldTypes = {\n name: \"string\",\n version: \"string\",\n chainId: \"uint256\",\n verifyingContract: \"address\",\n salt: \"bytes32\"\n };\n var domainFieldNames = [\n \"name\",\n \"version\",\n \"chainId\",\n \"verifyingContract\",\n \"salt\"\n ];\n function checkString(key) {\n return function(value) {\n (0, index_js_4.assertArgument)(typeof value === \"string\", `invalid domain value for ${JSON.stringify(key)}`, `domain.${key}`, value);\n return value;\n };\n }\n var domainChecks = {\n name: checkString(\"name\"),\n version: checkString(\"version\"),\n chainId: function(_value) {\n const value = (0, index_js_4.getBigInt)(_value, \"domain.chainId\");\n (0, index_js_4.assertArgument)(value >= 0, \"invalid chain ID\", \"domain.chainId\", _value);\n if (Number.isSafeInteger(value)) {\n return Number(value);\n }\n return (0, index_js_4.toQuantity)(value);\n },\n verifyingContract: function(value) {\n try {\n return (0, index_js_1.getAddress)(value).toLowerCase();\n } catch (error) {\n }\n (0, index_js_4.assertArgument)(false, `invalid domain value \"verifyingContract\"`, \"domain.verifyingContract\", value);\n },\n salt: function(value) {\n const bytes = (0, index_js_4.getBytes)(value, \"domain.salt\");\n (0, index_js_4.assertArgument)(bytes.length === 32, `invalid domain value \"salt\"`, \"domain.salt\", value);\n return (0, index_js_4.hexlify)(bytes);\n }\n };\n function getBaseEncoder(type) {\n {\n const match = type.match(/^(u?)int(\\d+)$/);\n if (match) {\n const signed = match[1] === \"\";\n const width = parseInt(match[2]);\n (0, index_js_4.assertArgument)(width % 8 === 0 && width !== 0 && width <= 256 && match[2] === String(width), \"invalid numeric width\", \"type\", type);\n const boundsUpper = (0, index_js_4.mask)(BN_MAX_UINT256, signed ? width - 1 : width);\n const boundsLower = signed ? (boundsUpper + BN_1) * BN__1 : BN_0;\n return function(_value) {\n const value = (0, index_js_4.getBigInt)(_value, \"value\");\n (0, index_js_4.assertArgument)(value >= boundsLower && value <= boundsUpper, `value out-of-bounds for ${type}`, \"value\", value);\n return (0, index_js_4.toBeHex)(signed ? (0, index_js_4.toTwos)(value, 256) : value, 32);\n };\n }\n }\n {\n const match = type.match(/^bytes(\\d+)$/);\n if (match) {\n const width = parseInt(match[1]);\n (0, index_js_4.assertArgument)(width !== 0 && width <= 32 && match[1] === String(width), \"invalid bytes width\", \"type\", type);\n return function(value) {\n const bytes = (0, index_js_4.getBytes)(value);\n (0, index_js_4.assertArgument)(bytes.length === width, `invalid length for ${type}`, \"value\", value);\n return hexPadRight(value);\n };\n }\n }\n switch (type) {\n case \"address\":\n return function(value) {\n return (0, index_js_4.zeroPadValue)((0, index_js_1.getAddress)(value), 32);\n };\n case \"bool\":\n return function(value) {\n return !value ? hexFalse : hexTrue;\n };\n case \"bytes\":\n return function(value) {\n return (0, index_js_2.keccak256)(value);\n };\n case \"string\":\n return function(value) {\n return (0, id_js_1.id)(value);\n };\n }\n return null;\n }\n function encodeType2(name, fields) {\n return `${name}(${fields.map(({ name: name2, type }) => type + \" \" + name2).join(\",\")})`;\n }\n function splitArray(type) {\n const match = type.match(/^([^\\x5b]*)((\\x5b\\d*\\x5d)*)(\\x5b(\\d*)\\x5d)$/);\n if (match) {\n return {\n base: match[1],\n index: match[2] + match[4],\n array: {\n base: match[1],\n prefix: match[1] + match[2],\n count: match[5] ? parseInt(match[5]) : -1\n }\n };\n }\n return { base: type };\n }\n var TypedDataEncoder = class _TypedDataEncoder {\n /**\n * The primary type for the structured [[types]].\n *\n * This is derived automatically from the [[types]], since no\n * recursion is possible, once the DAG for the types is consturcted\n * internally, the primary type must be the only remaining type with\n * no parent nodes.\n */\n primaryType;\n #types;\n /**\n * The types.\n */\n get types() {\n return JSON.parse(this.#types);\n }\n #fullTypes;\n #encoderCache;\n /**\n * Create a new **TypedDataEncoder** for %%types%%.\n *\n * This performs all necessary checking that types are valid and\n * do not violate the [[link-eip-712]] structural constraints as\n * well as computes the [[primaryType]].\n */\n constructor(_types) {\n this.#fullTypes = /* @__PURE__ */ new Map();\n this.#encoderCache = /* @__PURE__ */ new Map();\n const links = /* @__PURE__ */ new Map();\n const parents = /* @__PURE__ */ new Map();\n const subtypes = /* @__PURE__ */ new Map();\n const types = {};\n Object.keys(_types).forEach((type) => {\n types[type] = _types[type].map(({ name, type: type2 }) => {\n let { base: base4, index: index2 } = splitArray(type2);\n if (base4 === \"int\" && !_types[\"int\"]) {\n base4 = \"int256\";\n }\n if (base4 === \"uint\" && !_types[\"uint\"]) {\n base4 = \"uint256\";\n }\n return { name, type: base4 + (index2 || \"\") };\n });\n links.set(type, /* @__PURE__ */ new Set());\n parents.set(type, []);\n subtypes.set(type, /* @__PURE__ */ new Set());\n });\n this.#types = JSON.stringify(types);\n for (const name in types) {\n const uniqueNames = /* @__PURE__ */ new Set();\n for (const field of types[name]) {\n (0, index_js_4.assertArgument)(!uniqueNames.has(field.name), `duplicate variable name ${JSON.stringify(field.name)} in ${JSON.stringify(name)}`, \"types\", _types);\n uniqueNames.add(field.name);\n const baseType = splitArray(field.type).base;\n (0, index_js_4.assertArgument)(baseType !== name, `circular type reference to ${JSON.stringify(baseType)}`, \"types\", _types);\n const encoder6 = getBaseEncoder(baseType);\n if (encoder6) {\n continue;\n }\n (0, index_js_4.assertArgument)(parents.has(baseType), `unknown type ${JSON.stringify(baseType)}`, \"types\", _types);\n parents.get(baseType).push(name);\n links.get(name).add(baseType);\n }\n }\n const primaryTypes = Array.from(parents.keys()).filter((n2) => parents.get(n2).length === 0);\n (0, index_js_4.assertArgument)(primaryTypes.length !== 0, \"missing primary type\", \"types\", _types);\n (0, index_js_4.assertArgument)(primaryTypes.length === 1, `ambiguous primary types or unused types: ${primaryTypes.map((t3) => JSON.stringify(t3)).join(\", \")}`, \"types\", _types);\n (0, index_js_4.defineProperties)(this, { primaryType: primaryTypes[0] });\n function checkCircular(type, found) {\n (0, index_js_4.assertArgument)(!found.has(type), `circular type reference to ${JSON.stringify(type)}`, \"types\", _types);\n found.add(type);\n for (const child of links.get(type)) {\n if (!parents.has(child)) {\n continue;\n }\n checkCircular(child, found);\n for (const subtype of found) {\n subtypes.get(subtype).add(child);\n }\n }\n found.delete(type);\n }\n checkCircular(this.primaryType, /* @__PURE__ */ new Set());\n for (const [name, set] of subtypes) {\n const st = Array.from(set);\n st.sort();\n this.#fullTypes.set(name, encodeType2(name, types[name]) + st.map((t3) => encodeType2(t3, types[t3])).join(\"\"));\n }\n }\n /**\n * Returnthe encoder for the specific %%type%%.\n */\n getEncoder(type) {\n let encoder6 = this.#encoderCache.get(type);\n if (!encoder6) {\n encoder6 = this.#getEncoder(type);\n this.#encoderCache.set(type, encoder6);\n }\n return encoder6;\n }\n #getEncoder(type) {\n {\n const encoder6 = getBaseEncoder(type);\n if (encoder6) {\n return encoder6;\n }\n }\n const array2 = splitArray(type).array;\n if (array2) {\n const subtype = array2.prefix;\n const subEncoder = this.getEncoder(subtype);\n return (value) => {\n (0, index_js_4.assertArgument)(array2.count === -1 || array2.count === value.length, `array length mismatch; expected length ${array2.count}`, \"value\", value);\n let result = value.map(subEncoder);\n if (this.#fullTypes.has(subtype)) {\n result = result.map(index_js_2.keccak256);\n }\n return (0, index_js_2.keccak256)((0, index_js_4.concat)(result));\n };\n }\n const fields = this.types[type];\n if (fields) {\n const encodedType = (0, id_js_1.id)(this.#fullTypes.get(type));\n return (value) => {\n const values = fields.map(({ name, type: type2 }) => {\n const result = this.getEncoder(type2)(value[name]);\n if (this.#fullTypes.has(type2)) {\n return (0, index_js_2.keccak256)(result);\n }\n return result;\n });\n values.unshift(encodedType);\n return (0, index_js_4.concat)(values);\n };\n }\n (0, index_js_4.assertArgument)(false, `unknown type: ${type}`, \"type\", type);\n }\n /**\n * Return the full type for %%name%%.\n */\n encodeType(name) {\n const result = this.#fullTypes.get(name);\n (0, index_js_4.assertArgument)(result, `unknown type: ${JSON.stringify(name)}`, \"name\", name);\n return result;\n }\n /**\n * Return the encoded %%value%% for the %%type%%.\n */\n encodeData(type, value) {\n return this.getEncoder(type)(value);\n }\n /**\n * Returns the hash of %%value%% for the type of %%name%%.\n */\n hashStruct(name, value) {\n return (0, index_js_2.keccak256)(this.encodeData(name, value));\n }\n /**\n * Return the fulled encoded %%value%% for the [[types]].\n */\n encode(value) {\n return this.encodeData(this.primaryType, value);\n }\n /**\n * Return the hash of the fully encoded %%value%% for the [[types]].\n */\n hash(value) {\n return this.hashStruct(this.primaryType, value);\n }\n /**\n * @_ignore:\n */\n _visit(type, value, callback) {\n {\n const encoder6 = getBaseEncoder(type);\n if (encoder6) {\n return callback(type, value);\n }\n }\n const array2 = splitArray(type).array;\n if (array2) {\n (0, index_js_4.assertArgument)(array2.count === -1 || array2.count === value.length, `array length mismatch; expected length ${array2.count}`, \"value\", value);\n return value.map((v2) => this._visit(array2.prefix, v2, callback));\n }\n const fields = this.types[type];\n if (fields) {\n return fields.reduce((accum, { name, type: type2 }) => {\n accum[name] = this._visit(type2, value[name], callback);\n return accum;\n }, {});\n }\n (0, index_js_4.assertArgument)(false, `unknown type: ${type}`, \"type\", type);\n }\n /**\n * Call %%calback%% for each value in %%value%%, passing the type and\n * component within %%value%%.\n *\n * This is useful for replacing addresses or other transformation that\n * may be desired on each component, based on its type.\n */\n visit(value, callback) {\n return this._visit(this.primaryType, value, callback);\n }\n /**\n * Create a new **TypedDataEncoder** for %%types%%.\n */\n static from(types) {\n return new _TypedDataEncoder(types);\n }\n /**\n * Return the primary type for %%types%%.\n */\n static getPrimaryType(types) {\n return _TypedDataEncoder.from(types).primaryType;\n }\n /**\n * Return the hashed struct for %%value%% using %%types%% and %%name%%.\n */\n static hashStruct(name, types, value) {\n return _TypedDataEncoder.from(types).hashStruct(name, value);\n }\n /**\n * Return the domain hash for %%domain%%.\n */\n static hashDomain(domain2) {\n const domainFields = [];\n for (const name in domain2) {\n if (domain2[name] == null) {\n continue;\n }\n const type = domainFieldTypes[name];\n (0, index_js_4.assertArgument)(type, `invalid typed-data domain key: ${JSON.stringify(name)}`, \"domain\", domain2);\n domainFields.push({ name, type });\n }\n domainFields.sort((a3, b4) => {\n return domainFieldNames.indexOf(a3.name) - domainFieldNames.indexOf(b4.name);\n });\n return _TypedDataEncoder.hashStruct(\"EIP712Domain\", { EIP712Domain: domainFields }, domain2);\n }\n /**\n * Return the fully encoded [[link-eip-712]] %%value%% for %%types%% with %%domain%%.\n */\n static encode(domain2, types, value) {\n return (0, index_js_4.concat)([\n \"0x1901\",\n _TypedDataEncoder.hashDomain(domain2),\n _TypedDataEncoder.from(types).hash(value)\n ]);\n }\n /**\n * Return the hash of the fully encoded [[link-eip-712]] %%value%% for %%types%% with %%domain%%.\n */\n static hash(domain2, types, value) {\n return (0, index_js_2.keccak256)(_TypedDataEncoder.encode(domain2, types, value));\n }\n // Replaces all address types with ENS names with their looked up address\n /**\n * Resolves to the value from resolving all addresses in %%value%% for\n * %%types%% and the %%domain%%.\n */\n static async resolveNames(domain2, types, value, resolveName) {\n domain2 = Object.assign({}, domain2);\n for (const key in domain2) {\n if (domain2[key] == null) {\n delete domain2[key];\n }\n }\n const ensCache = {};\n if (domain2.verifyingContract && !(0, index_js_4.isHexString)(domain2.verifyingContract, 20)) {\n ensCache[domain2.verifyingContract] = \"0x\";\n }\n const encoder6 = _TypedDataEncoder.from(types);\n encoder6.visit(value, (type, value2) => {\n if (type === \"address\" && !(0, index_js_4.isHexString)(value2, 20)) {\n ensCache[value2] = \"0x\";\n }\n return value2;\n });\n for (const name in ensCache) {\n ensCache[name] = await resolveName(name);\n }\n if (domain2.verifyingContract && ensCache[domain2.verifyingContract]) {\n domain2.verifyingContract = ensCache[domain2.verifyingContract];\n }\n value = encoder6.visit(value, (type, value2) => {\n if (type === \"address\" && ensCache[value2]) {\n return ensCache[value2];\n }\n return value2;\n });\n return { domain: domain2, value };\n }\n /**\n * Returns the JSON-encoded payload expected by nodes which implement\n * the JSON-RPC [[link-eip-712]] method.\n */\n static getPayload(domain2, types, value) {\n _TypedDataEncoder.hashDomain(domain2);\n const domainValues = {};\n const domainTypes = [];\n domainFieldNames.forEach((name) => {\n const value2 = domain2[name];\n if (value2 == null) {\n return;\n }\n domainValues[name] = domainChecks[name](value2);\n domainTypes.push({ name, type: domainFieldTypes[name] });\n });\n const encoder6 = _TypedDataEncoder.from(types);\n types = encoder6.types;\n const typesWithDomain = Object.assign({}, types);\n (0, index_js_4.assertArgument)(typesWithDomain.EIP712Domain == null, \"types must not contain EIP712Domain type\", \"types.EIP712Domain\", types);\n typesWithDomain.EIP712Domain = domainTypes;\n encoder6.encode(value);\n return {\n types: typesWithDomain,\n domain: domainValues,\n primaryType: encoder6.primaryType,\n message: encoder6.visit(value, (type, value2) => {\n if (type.match(/^bytes(\\d*)/)) {\n return (0, index_js_4.hexlify)((0, index_js_4.getBytes)(value2));\n }\n if (type.match(/^u?int/)) {\n return (0, index_js_4.getBigInt)(value2).toString();\n }\n switch (type) {\n case \"address\":\n return value2.toLowerCase();\n case \"bool\":\n return !!value2;\n case \"string\":\n (0, index_js_4.assertArgument)(typeof value2 === \"string\", \"invalid string\", \"value\", value2);\n return value2;\n }\n (0, index_js_4.assertArgument)(false, \"unsupported type\", \"type\", type);\n })\n };\n }\n };\n exports3.TypedDataEncoder = TypedDataEncoder;\n function verifyTypedData2(domain2, types, value, signature) {\n return (0, index_js_3.recoverAddress)(TypedDataEncoder.hash(domain2, types, value), signature);\n }\n exports3.verifyTypedData = verifyTypedData2;\n }\n });\n\n // ../../../node_modules/.pnpm/ethers@6.15.0_bufferutil@4.0.9_utf-8-validate@5.0.10/node_modules/ethers/lib.commonjs/hash/index.js\n var require_hash2 = __commonJS({\n \"../../../node_modules/.pnpm/ethers@6.15.0_bufferutil@4.0.9_utf-8-validate@5.0.10/node_modules/ethers/lib.commonjs/hash/index.js\"(exports3) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n Object.defineProperty(exports3, \"__esModule\", { value: true });\n exports3.verifyTypedData = exports3.TypedDataEncoder = exports3.solidityPackedSha256 = exports3.solidityPackedKeccak256 = exports3.solidityPacked = exports3.verifyMessage = exports3.hashMessage = exports3.dnsEncode = exports3.namehash = exports3.isValidName = exports3.ensNormalize = exports3.id = exports3.verifyAuthorization = exports3.hashAuthorization = void 0;\n var authorization_js_1 = require_authorization2();\n Object.defineProperty(exports3, \"hashAuthorization\", { enumerable: true, get: function() {\n return authorization_js_1.hashAuthorization;\n } });\n Object.defineProperty(exports3, \"verifyAuthorization\", { enumerable: true, get: function() {\n return authorization_js_1.verifyAuthorization;\n } });\n var id_js_1 = require_id2();\n Object.defineProperty(exports3, \"id\", { enumerable: true, get: function() {\n return id_js_1.id;\n } });\n var namehash_js_1 = require_namehash2();\n Object.defineProperty(exports3, \"ensNormalize\", { enumerable: true, get: function() {\n return namehash_js_1.ensNormalize;\n } });\n Object.defineProperty(exports3, \"isValidName\", { enumerable: true, get: function() {\n return namehash_js_1.isValidName;\n } });\n Object.defineProperty(exports3, \"namehash\", { enumerable: true, get: function() {\n return namehash_js_1.namehash;\n } });\n Object.defineProperty(exports3, \"dnsEncode\", { enumerable: true, get: function() {\n return namehash_js_1.dnsEncode;\n } });\n var message_js_1 = require_message2();\n Object.defineProperty(exports3, \"hashMessage\", { enumerable: true, get: function() {\n return message_js_1.hashMessage;\n } });\n Object.defineProperty(exports3, \"verifyMessage\", { enumerable: true, get: function() {\n return message_js_1.verifyMessage;\n } });\n var solidity_js_1 = require_solidity();\n Object.defineProperty(exports3, \"solidityPacked\", { enumerable: true, get: function() {\n return solidity_js_1.solidityPacked;\n } });\n Object.defineProperty(exports3, \"solidityPackedKeccak256\", { enumerable: true, get: function() {\n return solidity_js_1.solidityPackedKeccak256;\n } });\n Object.defineProperty(exports3, \"solidityPackedSha256\", { enumerable: true, get: function() {\n return solidity_js_1.solidityPackedSha256;\n } });\n var typed_data_js_1 = require_typed_data2();\n Object.defineProperty(exports3, \"TypedDataEncoder\", { enumerable: true, get: function() {\n return typed_data_js_1.TypedDataEncoder;\n } });\n Object.defineProperty(exports3, \"verifyTypedData\", { enumerable: true, get: function() {\n return typed_data_js_1.verifyTypedData;\n } });\n }\n });\n\n // ../../../node_modules/.pnpm/ethers@6.15.0_bufferutil@4.0.9_utf-8-validate@5.0.10/node_modules/ethers/lib.commonjs/abi/fragments.js\n var require_fragments2 = __commonJS({\n \"../../../node_modules/.pnpm/ethers@6.15.0_bufferutil@4.0.9_utf-8-validate@5.0.10/node_modules/ethers/lib.commonjs/abi/fragments.js\"(exports3) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n Object.defineProperty(exports3, \"__esModule\", { value: true });\n exports3.StructFragment = exports3.FunctionFragment = exports3.FallbackFragment = exports3.ConstructorFragment = exports3.EventFragment = exports3.ErrorFragment = exports3.NamedFragment = exports3.Fragment = exports3.ParamType = void 0;\n var index_js_1 = require_utils8();\n var index_js_2 = require_hash2();\n function setify(items) {\n const result = /* @__PURE__ */ new Set();\n items.forEach((k4) => result.add(k4));\n return Object.freeze(result);\n }\n var _kwVisibDeploy = \"external public payable override\";\n var KwVisibDeploy = setify(_kwVisibDeploy.split(\" \"));\n var _kwVisib = \"constant external internal payable private public pure view override\";\n var KwVisib = setify(_kwVisib.split(\" \"));\n var _kwTypes = \"constructor error event fallback function receive struct\";\n var KwTypes = setify(_kwTypes.split(\" \"));\n var _kwModifiers = \"calldata memory storage payable indexed\";\n var KwModifiers = setify(_kwModifiers.split(\" \"));\n var _kwOther = \"tuple returns\";\n var _keywords = [_kwTypes, _kwModifiers, _kwOther, _kwVisib].join(\" \");\n var Keywords = setify(_keywords.split(\" \"));\n var SimpleTokens = {\n \"(\": \"OPEN_PAREN\",\n \")\": \"CLOSE_PAREN\",\n \"[\": \"OPEN_BRACKET\",\n \"]\": \"CLOSE_BRACKET\",\n \",\": \"COMMA\",\n \"@\": \"AT\"\n };\n var regexWhitespacePrefix = new RegExp(\"^(\\\\s*)\");\n var regexNumberPrefix = new RegExp(\"^([0-9]+)\");\n var regexIdPrefix = new RegExp(\"^([a-zA-Z$_][a-zA-Z0-9$_]*)\");\n var regexId = new RegExp(\"^([a-zA-Z$_][a-zA-Z0-9$_]*)$\");\n var regexType = new RegExp(\"^(address|bool|bytes([0-9]*)|string|u?int([0-9]*))$\");\n var TokenString = class _TokenString {\n #offset;\n #tokens;\n get offset() {\n return this.#offset;\n }\n get length() {\n return this.#tokens.length - this.#offset;\n }\n constructor(tokens) {\n this.#offset = 0;\n this.#tokens = tokens.slice();\n }\n clone() {\n return new _TokenString(this.#tokens);\n }\n reset() {\n this.#offset = 0;\n }\n #subTokenString(from14 = 0, to = 0) {\n return new _TokenString(this.#tokens.slice(from14, to).map((t3) => {\n return Object.freeze(Object.assign({}, t3, {\n match: t3.match - from14,\n linkBack: t3.linkBack - from14,\n linkNext: t3.linkNext - from14\n }));\n }));\n }\n // Pops and returns the value of the next token, if it is a keyword in allowed; throws if out of tokens\n popKeyword(allowed) {\n const top = this.peek();\n if (top.type !== \"KEYWORD\" || !allowed.has(top.text)) {\n throw new Error(`expected keyword ${top.text}`);\n }\n return this.pop().text;\n }\n // Pops and returns the value of the next token if it is `type`; throws if out of tokens\n popType(type) {\n if (this.peek().type !== type) {\n const top = this.peek();\n throw new Error(`expected ${type}; got ${top.type} ${JSON.stringify(top.text)}`);\n }\n return this.pop().text;\n }\n // Pops and returns a \"(\" TOKENS \")\"\n popParen() {\n const top = this.peek();\n if (top.type !== \"OPEN_PAREN\") {\n throw new Error(\"bad start\");\n }\n const result = this.#subTokenString(this.#offset + 1, top.match + 1);\n this.#offset = top.match + 1;\n return result;\n }\n // Pops and returns the items within \"(\" ITEM1 \",\" ITEM2 \",\" ... \")\"\n popParams() {\n const top = this.peek();\n if (top.type !== \"OPEN_PAREN\") {\n throw new Error(\"bad start\");\n }\n const result = [];\n while (this.#offset < top.match - 1) {\n const link = this.peek().linkNext;\n result.push(this.#subTokenString(this.#offset + 1, link));\n this.#offset = link;\n }\n this.#offset = top.match + 1;\n return result;\n }\n // Returns the top Token, throwing if out of tokens\n peek() {\n if (this.#offset >= this.#tokens.length) {\n throw new Error(\"out-of-bounds\");\n }\n return this.#tokens[this.#offset];\n }\n // Returns the next value, if it is a keyword in `allowed`\n peekKeyword(allowed) {\n const top = this.peekType(\"KEYWORD\");\n return top != null && allowed.has(top) ? top : null;\n }\n // Returns the value of the next token if it is `type`\n peekType(type) {\n if (this.length === 0) {\n return null;\n }\n const top = this.peek();\n return top.type === type ? top.text : null;\n }\n // Returns the next token; throws if out of tokens\n pop() {\n const result = this.peek();\n this.#offset++;\n return result;\n }\n toString() {\n const tokens = [];\n for (let i3 = this.#offset; i3 < this.#tokens.length; i3++) {\n const token = this.#tokens[i3];\n tokens.push(`${token.type}:${token.text}`);\n }\n return ``;\n }\n };\n function lex(text) {\n const tokens = [];\n const throwError = (message) => {\n const token = offset < text.length ? JSON.stringify(text[offset]) : \"$EOI\";\n throw new Error(`invalid token ${token} at ${offset}: ${message}`);\n };\n let brackets = [];\n let commas = [];\n let offset = 0;\n while (offset < text.length) {\n let cur = text.substring(offset);\n let match = cur.match(regexWhitespacePrefix);\n if (match) {\n offset += match[1].length;\n cur = text.substring(offset);\n }\n const token = { depth: brackets.length, linkBack: -1, linkNext: -1, match: -1, type: \"\", text: \"\", offset, value: -1 };\n tokens.push(token);\n let type = SimpleTokens[cur[0]] || \"\";\n if (type) {\n token.type = type;\n token.text = cur[0];\n offset++;\n if (type === \"OPEN_PAREN\") {\n brackets.push(tokens.length - 1);\n commas.push(tokens.length - 1);\n } else if (type == \"CLOSE_PAREN\") {\n if (brackets.length === 0) {\n throwError(\"no matching open bracket\");\n }\n token.match = brackets.pop();\n tokens[token.match].match = tokens.length - 1;\n token.depth--;\n token.linkBack = commas.pop();\n tokens[token.linkBack].linkNext = tokens.length - 1;\n } else if (type === \"COMMA\") {\n token.linkBack = commas.pop();\n tokens[token.linkBack].linkNext = tokens.length - 1;\n commas.push(tokens.length - 1);\n } else if (type === \"OPEN_BRACKET\") {\n token.type = \"BRACKET\";\n } else if (type === \"CLOSE_BRACKET\") {\n let suffix = tokens.pop().text;\n if (tokens.length > 0 && tokens[tokens.length - 1].type === \"NUMBER\") {\n const value = tokens.pop().text;\n suffix = value + suffix;\n tokens[tokens.length - 1].value = (0, index_js_1.getNumber)(value);\n }\n if (tokens.length === 0 || tokens[tokens.length - 1].type !== \"BRACKET\") {\n throw new Error(\"missing opening bracket\");\n }\n tokens[tokens.length - 1].text += suffix;\n }\n continue;\n }\n match = cur.match(regexIdPrefix);\n if (match) {\n token.text = match[1];\n offset += token.text.length;\n if (Keywords.has(token.text)) {\n token.type = \"KEYWORD\";\n continue;\n }\n if (token.text.match(regexType)) {\n token.type = \"TYPE\";\n continue;\n }\n token.type = \"ID\";\n continue;\n }\n match = cur.match(regexNumberPrefix);\n if (match) {\n token.text = match[1];\n token.type = \"NUMBER\";\n offset += token.text.length;\n continue;\n }\n throw new Error(`unexpected token ${JSON.stringify(cur[0])} at position ${offset}`);\n }\n return new TokenString(tokens.map((t3) => Object.freeze(t3)));\n }\n function allowSingle(set, allowed) {\n let included = [];\n for (const key in allowed.keys()) {\n if (set.has(key)) {\n included.push(key);\n }\n }\n if (included.length > 1) {\n throw new Error(`conflicting types: ${included.join(\", \")}`);\n }\n }\n function consumeName(type, tokens) {\n if (tokens.peekKeyword(KwTypes)) {\n const keyword = tokens.pop().text;\n if (keyword !== type) {\n throw new Error(`expected ${type}, got ${keyword}`);\n }\n }\n return tokens.popType(\"ID\");\n }\n function consumeKeywords(tokens, allowed) {\n const keywords = /* @__PURE__ */ new Set();\n while (true) {\n const keyword = tokens.peekType(\"KEYWORD\");\n if (keyword == null || allowed && !allowed.has(keyword)) {\n break;\n }\n tokens.pop();\n if (keywords.has(keyword)) {\n throw new Error(`duplicate keywords: ${JSON.stringify(keyword)}`);\n }\n keywords.add(keyword);\n }\n return Object.freeze(keywords);\n }\n function consumeMutability(tokens) {\n let modifiers2 = consumeKeywords(tokens, KwVisib);\n allowSingle(modifiers2, setify(\"constant payable nonpayable\".split(\" \")));\n allowSingle(modifiers2, setify(\"pure view payable nonpayable\".split(\" \")));\n if (modifiers2.has(\"view\")) {\n return \"view\";\n }\n if (modifiers2.has(\"pure\")) {\n return \"pure\";\n }\n if (modifiers2.has(\"payable\")) {\n return \"payable\";\n }\n if (modifiers2.has(\"nonpayable\")) {\n return \"nonpayable\";\n }\n if (modifiers2.has(\"constant\")) {\n return \"view\";\n }\n return \"nonpayable\";\n }\n function consumeParams(tokens, allowIndexed) {\n return tokens.popParams().map((t3) => ParamType.from(t3, allowIndexed));\n }\n function consumeGas(tokens) {\n if (tokens.peekType(\"AT\")) {\n tokens.pop();\n if (tokens.peekType(\"NUMBER\")) {\n return (0, index_js_1.getBigInt)(tokens.pop().text);\n }\n throw new Error(\"invalid gas\");\n }\n return null;\n }\n function consumeEoi(tokens) {\n if (tokens.length) {\n throw new Error(`unexpected tokens at offset ${tokens.offset}: ${tokens.toString()}`);\n }\n }\n var regexArrayType = new RegExp(/^(.*)\\[([0-9]*)\\]$/);\n function verifyBasicType(type) {\n const match = type.match(regexType);\n (0, index_js_1.assertArgument)(match, \"invalid type\", \"type\", type);\n if (type === \"uint\") {\n return \"uint256\";\n }\n if (type === \"int\") {\n return \"int256\";\n }\n if (match[2]) {\n const length2 = parseInt(match[2]);\n (0, index_js_1.assertArgument)(length2 !== 0 && length2 <= 32, \"invalid bytes length\", \"type\", type);\n } else if (match[3]) {\n const size6 = parseInt(match[3]);\n (0, index_js_1.assertArgument)(size6 !== 0 && size6 <= 256 && size6 % 8 === 0, \"invalid numeric width\", \"type\", type);\n }\n return type;\n }\n var _guard = {};\n var internal = Symbol.for(\"_ethers_internal\");\n var ParamTypeInternal = \"_ParamTypeInternal\";\n var ErrorFragmentInternal = \"_ErrorInternal\";\n var EventFragmentInternal = \"_EventInternal\";\n var ConstructorFragmentInternal = \"_ConstructorInternal\";\n var FallbackFragmentInternal = \"_FallbackInternal\";\n var FunctionFragmentInternal = \"_FunctionInternal\";\n var StructFragmentInternal = \"_StructInternal\";\n var ParamType = class _ParamType {\n /**\n * The local name of the parameter (or ``\"\"`` if unbound)\n */\n name;\n /**\n * The fully qualified type (e.g. ``\"address\"``, ``\"tuple(address)\"``,\n * ``\"uint256[3][]\"``)\n */\n type;\n /**\n * The base type (e.g. ``\"address\"``, ``\"tuple\"``, ``\"array\"``)\n */\n baseType;\n /**\n * True if the parameters is indexed.\n *\n * For non-indexable types this is ``null``.\n */\n indexed;\n /**\n * The components for the tuple.\n *\n * For non-tuple types this is ``null``.\n */\n components;\n /**\n * The array length, or ``-1`` for dynamic-lengthed arrays.\n *\n * For non-array types this is ``null``.\n */\n arrayLength;\n /**\n * The type of each child in the array.\n *\n * For non-array types this is ``null``.\n */\n arrayChildren;\n /**\n * @private\n */\n constructor(guard, name, type, baseType, indexed, components, arrayLength, arrayChildren) {\n (0, index_js_1.assertPrivate)(guard, _guard, \"ParamType\");\n Object.defineProperty(this, internal, { value: ParamTypeInternal });\n if (components) {\n components = Object.freeze(components.slice());\n }\n if (baseType === \"array\") {\n if (arrayLength == null || arrayChildren == null) {\n throw new Error(\"\");\n }\n } else if (arrayLength != null || arrayChildren != null) {\n throw new Error(\"\");\n }\n if (baseType === \"tuple\") {\n if (components == null) {\n throw new Error(\"\");\n }\n } else if (components != null) {\n throw new Error(\"\");\n }\n (0, index_js_1.defineProperties)(this, {\n name,\n type,\n baseType,\n indexed,\n components,\n arrayLength,\n arrayChildren\n });\n }\n /**\n * Return a string representation of this type.\n *\n * For example,\n *\n * ``sighash\" => \"(uint256,address)\"``\n *\n * ``\"minimal\" => \"tuple(uint256,address) indexed\"``\n *\n * ``\"full\" => \"tuple(uint256 foo, address bar) indexed baz\"``\n */\n format(format) {\n if (format == null) {\n format = \"sighash\";\n }\n if (format === \"json\") {\n const name = this.name || \"\";\n if (this.isArray()) {\n const result3 = JSON.parse(this.arrayChildren.format(\"json\"));\n result3.name = name;\n result3.type += `[${this.arrayLength < 0 ? \"\" : String(this.arrayLength)}]`;\n return JSON.stringify(result3);\n }\n const result2 = {\n type: this.baseType === \"tuple\" ? \"tuple\" : this.type,\n name\n };\n if (typeof this.indexed === \"boolean\") {\n result2.indexed = this.indexed;\n }\n if (this.isTuple()) {\n result2.components = this.components.map((c4) => JSON.parse(c4.format(format)));\n }\n return JSON.stringify(result2);\n }\n let result = \"\";\n if (this.isArray()) {\n result += this.arrayChildren.format(format);\n result += `[${this.arrayLength < 0 ? \"\" : String(this.arrayLength)}]`;\n } else {\n if (this.isTuple()) {\n result += \"(\" + this.components.map((comp) => comp.format(format)).join(format === \"full\" ? \", \" : \",\") + \")\";\n } else {\n result += this.type;\n }\n }\n if (format !== \"sighash\") {\n if (this.indexed === true) {\n result += \" indexed\";\n }\n if (format === \"full\" && this.name) {\n result += \" \" + this.name;\n }\n }\n return result;\n }\n /**\n * Returns true if %%this%% is an Array type.\n *\n * This provides a type gaurd ensuring that [[arrayChildren]]\n * and [[arrayLength]] are non-null.\n */\n isArray() {\n return this.baseType === \"array\";\n }\n /**\n * Returns true if %%this%% is a Tuple type.\n *\n * This provides a type gaurd ensuring that [[components]]\n * is non-null.\n */\n isTuple() {\n return this.baseType === \"tuple\";\n }\n /**\n * Returns true if %%this%% is an Indexable type.\n *\n * This provides a type gaurd ensuring that [[indexed]]\n * is non-null.\n */\n isIndexable() {\n return this.indexed != null;\n }\n /**\n * Walks the **ParamType** with %%value%%, calling %%process%%\n * on each type, destructing the %%value%% recursively.\n */\n walk(value, process2) {\n if (this.isArray()) {\n if (!Array.isArray(value)) {\n throw new Error(\"invalid array value\");\n }\n if (this.arrayLength !== -1 && value.length !== this.arrayLength) {\n throw new Error(\"array is wrong length\");\n }\n const _this = this;\n return value.map((v2) => _this.arrayChildren.walk(v2, process2));\n }\n if (this.isTuple()) {\n if (!Array.isArray(value)) {\n throw new Error(\"invalid tuple value\");\n }\n if (value.length !== this.components.length) {\n throw new Error(\"array is wrong length\");\n }\n const _this = this;\n return value.map((v2, i3) => _this.components[i3].walk(v2, process2));\n }\n return process2(this.type, value);\n }\n #walkAsync(promises, value, process2, setValue) {\n if (this.isArray()) {\n if (!Array.isArray(value)) {\n throw new Error(\"invalid array value\");\n }\n if (this.arrayLength !== -1 && value.length !== this.arrayLength) {\n throw new Error(\"array is wrong length\");\n }\n const childType = this.arrayChildren;\n const result2 = value.slice();\n result2.forEach((value2, index2) => {\n childType.#walkAsync(promises, value2, process2, (value3) => {\n result2[index2] = value3;\n });\n });\n setValue(result2);\n return;\n }\n if (this.isTuple()) {\n const components = this.components;\n let result2;\n if (Array.isArray(value)) {\n result2 = value.slice();\n } else {\n if (value == null || typeof value !== \"object\") {\n throw new Error(\"invalid tuple value\");\n }\n result2 = components.map((param) => {\n if (!param.name) {\n throw new Error(\"cannot use object value with unnamed components\");\n }\n if (!(param.name in value)) {\n throw new Error(`missing value for component ${param.name}`);\n }\n return value[param.name];\n });\n }\n if (result2.length !== this.components.length) {\n throw new Error(\"array is wrong length\");\n }\n result2.forEach((value2, index2) => {\n components[index2].#walkAsync(promises, value2, process2, (value3) => {\n result2[index2] = value3;\n });\n });\n setValue(result2);\n return;\n }\n const result = process2(this.type, value);\n if (result.then) {\n promises.push(async function() {\n setValue(await result);\n }());\n } else {\n setValue(result);\n }\n }\n /**\n * Walks the **ParamType** with %%value%%, asynchronously calling\n * %%process%% on each type, destructing the %%value%% recursively.\n *\n * This can be used to resolve ENS names by walking and resolving each\n * ``\"address\"`` type.\n */\n async walkAsync(value, process2) {\n const promises = [];\n const result = [value];\n this.#walkAsync(promises, value, process2, (value2) => {\n result[0] = value2;\n });\n if (promises.length) {\n await Promise.all(promises);\n }\n return result[0];\n }\n /**\n * Creates a new **ParamType** for %%obj%%.\n *\n * If %%allowIndexed%% then the ``indexed`` keyword is permitted,\n * otherwise the ``indexed`` keyword will throw an error.\n */\n static from(obj, allowIndexed) {\n if (_ParamType.isParamType(obj)) {\n return obj;\n }\n if (typeof obj === \"string\") {\n try {\n return _ParamType.from(lex(obj), allowIndexed);\n } catch (error) {\n (0, index_js_1.assertArgument)(false, \"invalid param type\", \"obj\", obj);\n }\n } else if (obj instanceof TokenString) {\n let type2 = \"\", baseType = \"\";\n let comps = null;\n if (consumeKeywords(obj, setify([\"tuple\"])).has(\"tuple\") || obj.peekType(\"OPEN_PAREN\")) {\n baseType = \"tuple\";\n comps = obj.popParams().map((t3) => _ParamType.from(t3));\n type2 = `tuple(${comps.map((c4) => c4.format()).join(\",\")})`;\n } else {\n type2 = verifyBasicType(obj.popType(\"TYPE\"));\n baseType = type2;\n }\n let arrayChildren = null;\n let arrayLength = null;\n while (obj.length && obj.peekType(\"BRACKET\")) {\n const bracket = obj.pop();\n arrayChildren = new _ParamType(_guard, \"\", type2, baseType, null, comps, arrayLength, arrayChildren);\n arrayLength = bracket.value;\n type2 += bracket.text;\n baseType = \"array\";\n comps = null;\n }\n let indexed2 = null;\n const keywords = consumeKeywords(obj, KwModifiers);\n if (keywords.has(\"indexed\")) {\n if (!allowIndexed) {\n throw new Error(\"\");\n }\n indexed2 = true;\n }\n const name2 = obj.peekType(\"ID\") ? obj.pop().text : \"\";\n if (obj.length) {\n throw new Error(\"leftover tokens\");\n }\n return new _ParamType(_guard, name2, type2, baseType, indexed2, comps, arrayLength, arrayChildren);\n }\n const name = obj.name;\n (0, index_js_1.assertArgument)(!name || typeof name === \"string\" && name.match(regexId), \"invalid name\", \"obj.name\", name);\n let indexed = obj.indexed;\n if (indexed != null) {\n (0, index_js_1.assertArgument)(allowIndexed, \"parameter cannot be indexed\", \"obj.indexed\", obj.indexed);\n indexed = !!indexed;\n }\n let type = obj.type;\n let arrayMatch = type.match(regexArrayType);\n if (arrayMatch) {\n const arrayLength = parseInt(arrayMatch[2] || \"-1\");\n const arrayChildren = _ParamType.from({\n type: arrayMatch[1],\n components: obj.components\n });\n return new _ParamType(_guard, name || \"\", type, \"array\", indexed, null, arrayLength, arrayChildren);\n }\n if (type === \"tuple\" || type.startsWith(\n \"tuple(\"\n /* fix: ) */\n ) || type.startsWith(\n \"(\"\n /* fix: ) */\n )) {\n const comps = obj.components != null ? obj.components.map((c4) => _ParamType.from(c4)) : null;\n const tuple2 = new _ParamType(_guard, name || \"\", type, \"tuple\", indexed, comps, null, null);\n return tuple2;\n }\n type = verifyBasicType(obj.type);\n return new _ParamType(_guard, name || \"\", type, type, indexed, null, null, null);\n }\n /**\n * Returns true if %%value%% is a **ParamType**.\n */\n static isParamType(value) {\n return value && value[internal] === ParamTypeInternal;\n }\n };\n exports3.ParamType = ParamType;\n var Fragment = class _Fragment {\n /**\n * The type of the fragment.\n */\n type;\n /**\n * The inputs for the fragment.\n */\n inputs;\n /**\n * @private\n */\n constructor(guard, type, inputs) {\n (0, index_js_1.assertPrivate)(guard, _guard, \"Fragment\");\n inputs = Object.freeze(inputs.slice());\n (0, index_js_1.defineProperties)(this, { type, inputs });\n }\n /**\n * Creates a new **Fragment** for %%obj%%, wich can be any supported\n * ABI frgament type.\n */\n static from(obj) {\n if (typeof obj === \"string\") {\n try {\n _Fragment.from(JSON.parse(obj));\n } catch (e3) {\n }\n return _Fragment.from(lex(obj));\n }\n if (obj instanceof TokenString) {\n const type = obj.peekKeyword(KwTypes);\n switch (type) {\n case \"constructor\":\n return ConstructorFragment.from(obj);\n case \"error\":\n return ErrorFragment.from(obj);\n case \"event\":\n return EventFragment.from(obj);\n case \"fallback\":\n case \"receive\":\n return FallbackFragment.from(obj);\n case \"function\":\n return FunctionFragment.from(obj);\n case \"struct\":\n return StructFragment.from(obj);\n }\n } else if (typeof obj === \"object\") {\n switch (obj.type) {\n case \"constructor\":\n return ConstructorFragment.from(obj);\n case \"error\":\n return ErrorFragment.from(obj);\n case \"event\":\n return EventFragment.from(obj);\n case \"fallback\":\n case \"receive\":\n return FallbackFragment.from(obj);\n case \"function\":\n return FunctionFragment.from(obj);\n case \"struct\":\n return StructFragment.from(obj);\n }\n (0, index_js_1.assert)(false, `unsupported type: ${obj.type}`, \"UNSUPPORTED_OPERATION\", {\n operation: \"Fragment.from\"\n });\n }\n (0, index_js_1.assertArgument)(false, \"unsupported frgament object\", \"obj\", obj);\n }\n /**\n * Returns true if %%value%% is a [[ConstructorFragment]].\n */\n static isConstructor(value) {\n return ConstructorFragment.isFragment(value);\n }\n /**\n * Returns true if %%value%% is an [[ErrorFragment]].\n */\n static isError(value) {\n return ErrorFragment.isFragment(value);\n }\n /**\n * Returns true if %%value%% is an [[EventFragment]].\n */\n static isEvent(value) {\n return EventFragment.isFragment(value);\n }\n /**\n * Returns true if %%value%% is a [[FunctionFragment]].\n */\n static isFunction(value) {\n return FunctionFragment.isFragment(value);\n }\n /**\n * Returns true if %%value%% is a [[StructFragment]].\n */\n static isStruct(value) {\n return StructFragment.isFragment(value);\n }\n };\n exports3.Fragment = Fragment;\n var NamedFragment = class extends Fragment {\n /**\n * The name of the fragment.\n */\n name;\n /**\n * @private\n */\n constructor(guard, type, name, inputs) {\n super(guard, type, inputs);\n (0, index_js_1.assertArgument)(typeof name === \"string\" && name.match(regexId), \"invalid identifier\", \"name\", name);\n inputs = Object.freeze(inputs.slice());\n (0, index_js_1.defineProperties)(this, { name });\n }\n };\n exports3.NamedFragment = NamedFragment;\n function joinParams(format, params) {\n return \"(\" + params.map((p4) => p4.format(format)).join(format === \"full\" ? \", \" : \",\") + \")\";\n }\n var ErrorFragment = class _ErrorFragment extends NamedFragment {\n /**\n * @private\n */\n constructor(guard, name, inputs) {\n super(guard, \"error\", name, inputs);\n Object.defineProperty(this, internal, { value: ErrorFragmentInternal });\n }\n /**\n * The Custom Error selector.\n */\n get selector() {\n return (0, index_js_2.id)(this.format(\"sighash\")).substring(0, 10);\n }\n /**\n * Returns a string representation of this fragment as %%format%%.\n */\n format(format) {\n if (format == null) {\n format = \"sighash\";\n }\n if (format === \"json\") {\n return JSON.stringify({\n type: \"error\",\n name: this.name,\n inputs: this.inputs.map((input) => JSON.parse(input.format(format)))\n });\n }\n const result = [];\n if (format !== \"sighash\") {\n result.push(\"error\");\n }\n result.push(this.name + joinParams(format, this.inputs));\n return result.join(\" \");\n }\n /**\n * Returns a new **ErrorFragment** for %%obj%%.\n */\n static from(obj) {\n if (_ErrorFragment.isFragment(obj)) {\n return obj;\n }\n if (typeof obj === \"string\") {\n return _ErrorFragment.from(lex(obj));\n } else if (obj instanceof TokenString) {\n const name = consumeName(\"error\", obj);\n const inputs = consumeParams(obj);\n consumeEoi(obj);\n return new _ErrorFragment(_guard, name, inputs);\n }\n return new _ErrorFragment(_guard, obj.name, obj.inputs ? obj.inputs.map(ParamType.from) : []);\n }\n /**\n * Returns ``true`` and provides a type guard if %%value%% is an\n * **ErrorFragment**.\n */\n static isFragment(value) {\n return value && value[internal] === ErrorFragmentInternal;\n }\n };\n exports3.ErrorFragment = ErrorFragment;\n var EventFragment = class _EventFragment extends NamedFragment {\n /**\n * Whether this event is anonymous.\n */\n anonymous;\n /**\n * @private\n */\n constructor(guard, name, inputs, anonymous) {\n super(guard, \"event\", name, inputs);\n Object.defineProperty(this, internal, { value: EventFragmentInternal });\n (0, index_js_1.defineProperties)(this, { anonymous });\n }\n /**\n * The Event topic hash.\n */\n get topicHash() {\n return (0, index_js_2.id)(this.format(\"sighash\"));\n }\n /**\n * Returns a string representation of this event as %%format%%.\n */\n format(format) {\n if (format == null) {\n format = \"sighash\";\n }\n if (format === \"json\") {\n return JSON.stringify({\n type: \"event\",\n anonymous: this.anonymous,\n name: this.name,\n inputs: this.inputs.map((i3) => JSON.parse(i3.format(format)))\n });\n }\n const result = [];\n if (format !== \"sighash\") {\n result.push(\"event\");\n }\n result.push(this.name + joinParams(format, this.inputs));\n if (format !== \"sighash\" && this.anonymous) {\n result.push(\"anonymous\");\n }\n return result.join(\" \");\n }\n /**\n * Return the topic hash for an event with %%name%% and %%params%%.\n */\n static getTopicHash(name, params) {\n params = (params || []).map((p4) => ParamType.from(p4));\n const fragment = new _EventFragment(_guard, name, params, false);\n return fragment.topicHash;\n }\n /**\n * Returns a new **EventFragment** for %%obj%%.\n */\n static from(obj) {\n if (_EventFragment.isFragment(obj)) {\n return obj;\n }\n if (typeof obj === \"string\") {\n try {\n return _EventFragment.from(lex(obj));\n } catch (error) {\n (0, index_js_1.assertArgument)(false, \"invalid event fragment\", \"obj\", obj);\n }\n } else if (obj instanceof TokenString) {\n const name = consumeName(\"event\", obj);\n const inputs = consumeParams(obj, true);\n const anonymous = !!consumeKeywords(obj, setify([\"anonymous\"])).has(\"anonymous\");\n consumeEoi(obj);\n return new _EventFragment(_guard, name, inputs, anonymous);\n }\n return new _EventFragment(_guard, obj.name, obj.inputs ? obj.inputs.map((p4) => ParamType.from(p4, true)) : [], !!obj.anonymous);\n }\n /**\n * Returns ``true`` and provides a type guard if %%value%% is an\n * **EventFragment**.\n */\n static isFragment(value) {\n return value && value[internal] === EventFragmentInternal;\n }\n };\n exports3.EventFragment = EventFragment;\n var ConstructorFragment = class _ConstructorFragment extends Fragment {\n /**\n * Whether the constructor can receive an endowment.\n */\n payable;\n /**\n * The recommended gas limit for deployment or ``null``.\n */\n gas;\n /**\n * @private\n */\n constructor(guard, type, inputs, payable, gas) {\n super(guard, type, inputs);\n Object.defineProperty(this, internal, { value: ConstructorFragmentInternal });\n (0, index_js_1.defineProperties)(this, { payable, gas });\n }\n /**\n * Returns a string representation of this constructor as %%format%%.\n */\n format(format) {\n (0, index_js_1.assert)(format != null && format !== \"sighash\", \"cannot format a constructor for sighash\", \"UNSUPPORTED_OPERATION\", { operation: \"format(sighash)\" });\n if (format === \"json\") {\n return JSON.stringify({\n type: \"constructor\",\n stateMutability: this.payable ? \"payable\" : \"undefined\",\n payable: this.payable,\n gas: this.gas != null ? this.gas : void 0,\n inputs: this.inputs.map((i3) => JSON.parse(i3.format(format)))\n });\n }\n const result = [`constructor${joinParams(format, this.inputs)}`];\n if (this.payable) {\n result.push(\"payable\");\n }\n if (this.gas != null) {\n result.push(`@${this.gas.toString()}`);\n }\n return result.join(\" \");\n }\n /**\n * Returns a new **ConstructorFragment** for %%obj%%.\n */\n static from(obj) {\n if (_ConstructorFragment.isFragment(obj)) {\n return obj;\n }\n if (typeof obj === \"string\") {\n try {\n return _ConstructorFragment.from(lex(obj));\n } catch (error) {\n (0, index_js_1.assertArgument)(false, \"invalid constuctor fragment\", \"obj\", obj);\n }\n } else if (obj instanceof TokenString) {\n consumeKeywords(obj, setify([\"constructor\"]));\n const inputs = consumeParams(obj);\n const payable = !!consumeKeywords(obj, KwVisibDeploy).has(\"payable\");\n const gas = consumeGas(obj);\n consumeEoi(obj);\n return new _ConstructorFragment(_guard, \"constructor\", inputs, payable, gas);\n }\n return new _ConstructorFragment(_guard, \"constructor\", obj.inputs ? obj.inputs.map(ParamType.from) : [], !!obj.payable, obj.gas != null ? obj.gas : null);\n }\n /**\n * Returns ``true`` and provides a type guard if %%value%% is a\n * **ConstructorFragment**.\n */\n static isFragment(value) {\n return value && value[internal] === ConstructorFragmentInternal;\n }\n };\n exports3.ConstructorFragment = ConstructorFragment;\n var FallbackFragment = class _FallbackFragment extends Fragment {\n /**\n * If the function can be sent value during invocation.\n */\n payable;\n constructor(guard, inputs, payable) {\n super(guard, \"fallback\", inputs);\n Object.defineProperty(this, internal, { value: FallbackFragmentInternal });\n (0, index_js_1.defineProperties)(this, { payable });\n }\n /**\n * Returns a string representation of this fallback as %%format%%.\n */\n format(format) {\n const type = this.inputs.length === 0 ? \"receive\" : \"fallback\";\n if (format === \"json\") {\n const stateMutability = this.payable ? \"payable\" : \"nonpayable\";\n return JSON.stringify({ type, stateMutability });\n }\n return `${type}()${this.payable ? \" payable\" : \"\"}`;\n }\n /**\n * Returns a new **FallbackFragment** for %%obj%%.\n */\n static from(obj) {\n if (_FallbackFragment.isFragment(obj)) {\n return obj;\n }\n if (typeof obj === \"string\") {\n try {\n return _FallbackFragment.from(lex(obj));\n } catch (error) {\n (0, index_js_1.assertArgument)(false, \"invalid fallback fragment\", \"obj\", obj);\n }\n } else if (obj instanceof TokenString) {\n const errorObj = obj.toString();\n const topIsValid = obj.peekKeyword(setify([\"fallback\", \"receive\"]));\n (0, index_js_1.assertArgument)(topIsValid, \"type must be fallback or receive\", \"obj\", errorObj);\n const type = obj.popKeyword(setify([\"fallback\", \"receive\"]));\n if (type === \"receive\") {\n const inputs2 = consumeParams(obj);\n (0, index_js_1.assertArgument)(inputs2.length === 0, `receive cannot have arguments`, \"obj.inputs\", inputs2);\n consumeKeywords(obj, setify([\"payable\"]));\n consumeEoi(obj);\n return new _FallbackFragment(_guard, [], true);\n }\n let inputs = consumeParams(obj);\n if (inputs.length) {\n (0, index_js_1.assertArgument)(inputs.length === 1 && inputs[0].type === \"bytes\", \"invalid fallback inputs\", \"obj.inputs\", inputs.map((i3) => i3.format(\"minimal\")).join(\", \"));\n } else {\n inputs = [ParamType.from(\"bytes\")];\n }\n const mutability = consumeMutability(obj);\n (0, index_js_1.assertArgument)(mutability === \"nonpayable\" || mutability === \"payable\", \"fallback cannot be constants\", \"obj.stateMutability\", mutability);\n if (consumeKeywords(obj, setify([\"returns\"])).has(\"returns\")) {\n const outputs = consumeParams(obj);\n (0, index_js_1.assertArgument)(outputs.length === 1 && outputs[0].type === \"bytes\", \"invalid fallback outputs\", \"obj.outputs\", outputs.map((i3) => i3.format(\"minimal\")).join(\", \"));\n }\n consumeEoi(obj);\n return new _FallbackFragment(_guard, inputs, mutability === \"payable\");\n }\n if (obj.type === \"receive\") {\n return new _FallbackFragment(_guard, [], true);\n }\n if (obj.type === \"fallback\") {\n const inputs = [ParamType.from(\"bytes\")];\n const payable = obj.stateMutability === \"payable\";\n return new _FallbackFragment(_guard, inputs, payable);\n }\n (0, index_js_1.assertArgument)(false, \"invalid fallback description\", \"obj\", obj);\n }\n /**\n * Returns ``true`` and provides a type guard if %%value%% is a\n * **FallbackFragment**.\n */\n static isFragment(value) {\n return value && value[internal] === FallbackFragmentInternal;\n }\n };\n exports3.FallbackFragment = FallbackFragment;\n var FunctionFragment = class _FunctionFragment extends NamedFragment {\n /**\n * If the function is constant (e.g. ``pure`` or ``view`` functions).\n */\n constant;\n /**\n * The returned types for the result of calling this function.\n */\n outputs;\n /**\n * The state mutability (e.g. ``payable``, ``nonpayable``, ``view``\n * or ``pure``)\n */\n stateMutability;\n /**\n * If the function can be sent value during invocation.\n */\n payable;\n /**\n * The recommended gas limit to send when calling this function.\n */\n gas;\n /**\n * @private\n */\n constructor(guard, name, stateMutability, inputs, outputs, gas) {\n super(guard, \"function\", name, inputs);\n Object.defineProperty(this, internal, { value: FunctionFragmentInternal });\n outputs = Object.freeze(outputs.slice());\n const constant = stateMutability === \"view\" || stateMutability === \"pure\";\n const payable = stateMutability === \"payable\";\n (0, index_js_1.defineProperties)(this, { constant, gas, outputs, payable, stateMutability });\n }\n /**\n * The Function selector.\n */\n get selector() {\n return (0, index_js_2.id)(this.format(\"sighash\")).substring(0, 10);\n }\n /**\n * Returns a string representation of this function as %%format%%.\n */\n format(format) {\n if (format == null) {\n format = \"sighash\";\n }\n if (format === \"json\") {\n return JSON.stringify({\n type: \"function\",\n name: this.name,\n constant: this.constant,\n stateMutability: this.stateMutability !== \"nonpayable\" ? this.stateMutability : void 0,\n payable: this.payable,\n gas: this.gas != null ? this.gas : void 0,\n inputs: this.inputs.map((i3) => JSON.parse(i3.format(format))),\n outputs: this.outputs.map((o5) => JSON.parse(o5.format(format)))\n });\n }\n const result = [];\n if (format !== \"sighash\") {\n result.push(\"function\");\n }\n result.push(this.name + joinParams(format, this.inputs));\n if (format !== \"sighash\") {\n if (this.stateMutability !== \"nonpayable\") {\n result.push(this.stateMutability);\n }\n if (this.outputs && this.outputs.length) {\n result.push(\"returns\");\n result.push(joinParams(format, this.outputs));\n }\n if (this.gas != null) {\n result.push(`@${this.gas.toString()}`);\n }\n }\n return result.join(\" \");\n }\n /**\n * Return the selector for a function with %%name%% and %%params%%.\n */\n static getSelector(name, params) {\n params = (params || []).map((p4) => ParamType.from(p4));\n const fragment = new _FunctionFragment(_guard, name, \"view\", params, [], null);\n return fragment.selector;\n }\n /**\n * Returns a new **FunctionFragment** for %%obj%%.\n */\n static from(obj) {\n if (_FunctionFragment.isFragment(obj)) {\n return obj;\n }\n if (typeof obj === \"string\") {\n try {\n return _FunctionFragment.from(lex(obj));\n } catch (error) {\n (0, index_js_1.assertArgument)(false, \"invalid function fragment\", \"obj\", obj);\n }\n } else if (obj instanceof TokenString) {\n const name = consumeName(\"function\", obj);\n const inputs = consumeParams(obj);\n const mutability = consumeMutability(obj);\n let outputs = [];\n if (consumeKeywords(obj, setify([\"returns\"])).has(\"returns\")) {\n outputs = consumeParams(obj);\n }\n const gas = consumeGas(obj);\n consumeEoi(obj);\n return new _FunctionFragment(_guard, name, mutability, inputs, outputs, gas);\n }\n let stateMutability = obj.stateMutability;\n if (stateMutability == null) {\n stateMutability = \"payable\";\n if (typeof obj.constant === \"boolean\") {\n stateMutability = \"view\";\n if (!obj.constant) {\n stateMutability = \"payable\";\n if (typeof obj.payable === \"boolean\" && !obj.payable) {\n stateMutability = \"nonpayable\";\n }\n }\n } else if (typeof obj.payable === \"boolean\" && !obj.payable) {\n stateMutability = \"nonpayable\";\n }\n }\n return new _FunctionFragment(_guard, obj.name, stateMutability, obj.inputs ? obj.inputs.map(ParamType.from) : [], obj.outputs ? obj.outputs.map(ParamType.from) : [], obj.gas != null ? obj.gas : null);\n }\n /**\n * Returns ``true`` and provides a type guard if %%value%% is a\n * **FunctionFragment**.\n */\n static isFragment(value) {\n return value && value[internal] === FunctionFragmentInternal;\n }\n };\n exports3.FunctionFragment = FunctionFragment;\n var StructFragment = class _StructFragment extends NamedFragment {\n /**\n * @private\n */\n constructor(guard, name, inputs) {\n super(guard, \"struct\", name, inputs);\n Object.defineProperty(this, internal, { value: StructFragmentInternal });\n }\n /**\n * Returns a string representation of this struct as %%format%%.\n */\n format() {\n throw new Error(\"@TODO\");\n }\n /**\n * Returns a new **StructFragment** for %%obj%%.\n */\n static from(obj) {\n if (typeof obj === \"string\") {\n try {\n return _StructFragment.from(lex(obj));\n } catch (error) {\n (0, index_js_1.assertArgument)(false, \"invalid struct fragment\", \"obj\", obj);\n }\n } else if (obj instanceof TokenString) {\n const name = consumeName(\"struct\", obj);\n const inputs = consumeParams(obj);\n consumeEoi(obj);\n return new _StructFragment(_guard, name, inputs);\n }\n return new _StructFragment(_guard, obj.name, obj.inputs ? obj.inputs.map(ParamType.from) : []);\n }\n // @TODO: fix this return type\n /**\n * Returns ``true`` and provides a type guard if %%value%% is a\n * **StructFragment**.\n */\n static isFragment(value) {\n return value && value[internal] === StructFragmentInternal;\n }\n };\n exports3.StructFragment = StructFragment;\n }\n });\n\n // ../../../node_modules/.pnpm/ethers@6.15.0_bufferutil@4.0.9_utf-8-validate@5.0.10/node_modules/ethers/lib.commonjs/abi/abi-coder.js\n var require_abi_coder2 = __commonJS({\n \"../../../node_modules/.pnpm/ethers@6.15.0_bufferutil@4.0.9_utf-8-validate@5.0.10/node_modules/ethers/lib.commonjs/abi/abi-coder.js\"(exports3) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n Object.defineProperty(exports3, \"__esModule\", { value: true });\n exports3.AbiCoder = void 0;\n var index_js_1 = require_utils8();\n var abstract_coder_js_1 = require_abstract_coder2();\n var address_js_1 = require_address4();\n var array_js_1 = require_array2();\n var boolean_js_1 = require_boolean2();\n var bytes_js_1 = require_bytes2();\n var fixed_bytes_js_1 = require_fixed_bytes2();\n var null_js_1 = require_null2();\n var number_js_1 = require_number2();\n var string_js_1 = require_string2();\n var tuple_js_1 = require_tuple2();\n var fragments_js_1 = require_fragments2();\n var index_js_2 = require_address3();\n var index_js_3 = require_utils8();\n var PanicReasons = /* @__PURE__ */ new Map();\n PanicReasons.set(0, \"GENERIC_PANIC\");\n PanicReasons.set(1, \"ASSERT_FALSE\");\n PanicReasons.set(17, \"OVERFLOW\");\n PanicReasons.set(18, \"DIVIDE_BY_ZERO\");\n PanicReasons.set(33, \"ENUM_RANGE_ERROR\");\n PanicReasons.set(34, \"BAD_STORAGE_DATA\");\n PanicReasons.set(49, \"STACK_UNDERFLOW\");\n PanicReasons.set(50, \"ARRAY_RANGE_ERROR\");\n PanicReasons.set(65, \"OUT_OF_MEMORY\");\n PanicReasons.set(81, \"UNINITIALIZED_FUNCTION_CALL\");\n var paramTypeBytes = new RegExp(/^bytes([0-9]*)$/);\n var paramTypeNumber = new RegExp(/^(u?int)([0-9]*)$/);\n var defaultCoder = null;\n var defaultMaxInflation = 1024;\n function getBuiltinCallException(action, tx, data, abiCoder) {\n let message = \"missing revert data\";\n let reason = null;\n const invocation = null;\n let revert = null;\n if (data) {\n message = \"execution reverted\";\n const bytes = (0, index_js_3.getBytes)(data);\n data = (0, index_js_3.hexlify)(data);\n if (bytes.length === 0) {\n message += \" (no data present; likely require(false) occurred\";\n reason = \"require(false)\";\n } else if (bytes.length % 32 !== 4) {\n message += \" (could not decode reason; invalid data length)\";\n } else if ((0, index_js_3.hexlify)(bytes.slice(0, 4)) === \"0x08c379a0\") {\n try {\n reason = abiCoder.decode([\"string\"], bytes.slice(4))[0];\n revert = {\n signature: \"Error(string)\",\n name: \"Error\",\n args: [reason]\n };\n message += `: ${JSON.stringify(reason)}`;\n } catch (error) {\n message += \" (could not decode reason; invalid string data)\";\n }\n } else if ((0, index_js_3.hexlify)(bytes.slice(0, 4)) === \"0x4e487b71\") {\n try {\n const code = Number(abiCoder.decode([\"uint256\"], bytes.slice(4))[0]);\n revert = {\n signature: \"Panic(uint256)\",\n name: \"Panic\",\n args: [code]\n };\n reason = `Panic due to ${PanicReasons.get(code) || \"UNKNOWN\"}(${code})`;\n message += `: ${reason}`;\n } catch (error) {\n message += \" (could not decode panic code)\";\n }\n } else {\n message += \" (unknown custom error)\";\n }\n }\n const transaction = {\n to: tx.to ? (0, index_js_2.getAddress)(tx.to) : null,\n data: tx.data || \"0x\"\n };\n if (tx.from) {\n transaction.from = (0, index_js_2.getAddress)(tx.from);\n }\n return (0, index_js_3.makeError)(message, \"CALL_EXCEPTION\", {\n action,\n data,\n reason,\n transaction,\n invocation,\n revert\n });\n }\n var AbiCoder = class _AbiCoder {\n #getCoder(param) {\n if (param.isArray()) {\n return new array_js_1.ArrayCoder(this.#getCoder(param.arrayChildren), param.arrayLength, param.name);\n }\n if (param.isTuple()) {\n return new tuple_js_1.TupleCoder(param.components.map((c4) => this.#getCoder(c4)), param.name);\n }\n switch (param.baseType) {\n case \"address\":\n return new address_js_1.AddressCoder(param.name);\n case \"bool\":\n return new boolean_js_1.BooleanCoder(param.name);\n case \"string\":\n return new string_js_1.StringCoder(param.name);\n case \"bytes\":\n return new bytes_js_1.BytesCoder(param.name);\n case \"\":\n return new null_js_1.NullCoder(param.name);\n }\n let match = param.type.match(paramTypeNumber);\n if (match) {\n let size6 = parseInt(match[2] || \"256\");\n (0, index_js_1.assertArgument)(size6 !== 0 && size6 <= 256 && size6 % 8 === 0, \"invalid \" + match[1] + \" bit length\", \"param\", param);\n return new number_js_1.NumberCoder(size6 / 8, match[1] === \"int\", param.name);\n }\n match = param.type.match(paramTypeBytes);\n if (match) {\n let size6 = parseInt(match[1]);\n (0, index_js_1.assertArgument)(size6 !== 0 && size6 <= 32, \"invalid bytes length\", \"param\", param);\n return new fixed_bytes_js_1.FixedBytesCoder(size6, param.name);\n }\n (0, index_js_1.assertArgument)(false, \"invalid type\", \"type\", param.type);\n }\n /**\n * Get the default values for the given %%types%%.\n *\n * For example, a ``uint`` is by default ``0`` and ``bool``\n * is by default ``false``.\n */\n getDefaultValue(types) {\n const coders = types.map((type) => this.#getCoder(fragments_js_1.ParamType.from(type)));\n const coder = new tuple_js_1.TupleCoder(coders, \"_\");\n return coder.defaultValue();\n }\n /**\n * Encode the %%values%% as the %%types%% into ABI data.\n *\n * @returns DataHexstring\n */\n encode(types, values) {\n (0, index_js_1.assertArgumentCount)(values.length, types.length, \"types/values length mismatch\");\n const coders = types.map((type) => this.#getCoder(fragments_js_1.ParamType.from(type)));\n const coder = new tuple_js_1.TupleCoder(coders, \"_\");\n const writer = new abstract_coder_js_1.Writer();\n coder.encode(writer, values);\n return writer.data;\n }\n /**\n * Decode the ABI %%data%% as the %%types%% into values.\n *\n * If %%loose%% decoding is enabled, then strict padding is\n * not enforced. Some older versions of Solidity incorrectly\n * padded event data emitted from ``external`` functions.\n */\n decode(types, data, loose) {\n const coders = types.map((type) => this.#getCoder(fragments_js_1.ParamType.from(type)));\n const coder = new tuple_js_1.TupleCoder(coders, \"_\");\n return coder.decode(new abstract_coder_js_1.Reader(data, loose, defaultMaxInflation));\n }\n static _setDefaultMaxInflation(value) {\n (0, index_js_1.assertArgument)(typeof value === \"number\" && Number.isInteger(value), \"invalid defaultMaxInflation factor\", \"value\", value);\n defaultMaxInflation = value;\n }\n /**\n * Returns the shared singleton instance of a default [[AbiCoder]].\n *\n * On the first call, the instance is created internally.\n */\n static defaultAbiCoder() {\n if (defaultCoder == null) {\n defaultCoder = new _AbiCoder();\n }\n return defaultCoder;\n }\n /**\n * Returns an ethers-compatible [[CallExceptionError]] Error for the given\n * result %%data%% for the [[CallExceptionAction]] %%action%% against\n * the Transaction %%tx%%.\n */\n static getBuiltinCallException(action, tx, data) {\n return getBuiltinCallException(action, tx, data, _AbiCoder.defaultAbiCoder());\n }\n };\n exports3.AbiCoder = AbiCoder;\n }\n });\n\n // ../../../node_modules/.pnpm/ethers@6.15.0_bufferutil@4.0.9_utf-8-validate@5.0.10/node_modules/ethers/lib.commonjs/abi/bytes32.js\n var require_bytes322 = __commonJS({\n \"../../../node_modules/.pnpm/ethers@6.15.0_bufferutil@4.0.9_utf-8-validate@5.0.10/node_modules/ethers/lib.commonjs/abi/bytes32.js\"(exports3) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n Object.defineProperty(exports3, \"__esModule\", { value: true });\n exports3.decodeBytes32String = exports3.encodeBytes32String = void 0;\n var index_js_1 = require_utils8();\n function encodeBytes32String(text) {\n const bytes = (0, index_js_1.toUtf8Bytes)(text);\n if (bytes.length > 31) {\n throw new Error(\"bytes32 string must be less than 32 bytes\");\n }\n return (0, index_js_1.zeroPadBytes)(bytes, 32);\n }\n exports3.encodeBytes32String = encodeBytes32String;\n function decodeBytes32String(_bytes) {\n const data = (0, index_js_1.getBytes)(_bytes, \"bytes\");\n if (data.length !== 32) {\n throw new Error(\"invalid bytes32 - not 32 bytes long\");\n }\n if (data[31] !== 0) {\n throw new Error(\"invalid bytes32 string - no null terminator\");\n }\n let length2 = 31;\n while (data[length2 - 1] === 0) {\n length2--;\n }\n return (0, index_js_1.toUtf8String)(data.slice(0, length2));\n }\n exports3.decodeBytes32String = decodeBytes32String;\n }\n });\n\n // ../../../node_modules/.pnpm/ethers@6.15.0_bufferutil@4.0.9_utf-8-validate@5.0.10/node_modules/ethers/lib.commonjs/abi/interface.js\n var require_interface2 = __commonJS({\n \"../../../node_modules/.pnpm/ethers@6.15.0_bufferutil@4.0.9_utf-8-validate@5.0.10/node_modules/ethers/lib.commonjs/abi/interface.js\"(exports3) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n Object.defineProperty(exports3, \"__esModule\", { value: true });\n exports3.Interface = exports3.Indexed = exports3.ErrorDescription = exports3.TransactionDescription = exports3.LogDescription = exports3.Result = exports3.checkResultErrors = void 0;\n var index_js_1 = require_crypto2();\n var index_js_2 = require_hash2();\n var index_js_3 = require_utils8();\n var abi_coder_js_1 = require_abi_coder2();\n var abstract_coder_js_1 = require_abstract_coder2();\n Object.defineProperty(exports3, \"checkResultErrors\", { enumerable: true, get: function() {\n return abstract_coder_js_1.checkResultErrors;\n } });\n Object.defineProperty(exports3, \"Result\", { enumerable: true, get: function() {\n return abstract_coder_js_1.Result;\n } });\n var fragments_js_1 = require_fragments2();\n var typed_js_1 = require_typed();\n var LogDescription = class {\n /**\n * The matching fragment for the ``topic0``.\n */\n fragment;\n /**\n * The name of the Event.\n */\n name;\n /**\n * The full Event signature.\n */\n signature;\n /**\n * The topic hash for the Event.\n */\n topic;\n /**\n * The arguments passed into the Event with ``emit``.\n */\n args;\n /**\n * @_ignore:\n */\n constructor(fragment, topic, args) {\n const name = fragment.name, signature = fragment.format();\n (0, index_js_3.defineProperties)(this, {\n fragment,\n name,\n signature,\n topic,\n args\n });\n }\n };\n exports3.LogDescription = LogDescription;\n var TransactionDescription = class {\n /**\n * The matching fragment from the transaction ``data``.\n */\n fragment;\n /**\n * The name of the Function from the transaction ``data``.\n */\n name;\n /**\n * The arguments passed to the Function from the transaction ``data``.\n */\n args;\n /**\n * The full Function signature from the transaction ``data``.\n */\n signature;\n /**\n * The selector for the Function from the transaction ``data``.\n */\n selector;\n /**\n * The ``value`` (in wei) from the transaction.\n */\n value;\n /**\n * @_ignore:\n */\n constructor(fragment, selector, args, value) {\n const name = fragment.name, signature = fragment.format();\n (0, index_js_3.defineProperties)(this, {\n fragment,\n name,\n args,\n signature,\n selector,\n value\n });\n }\n };\n exports3.TransactionDescription = TransactionDescription;\n var ErrorDescription = class {\n /**\n * The matching fragment.\n */\n fragment;\n /**\n * The name of the Error.\n */\n name;\n /**\n * The arguments passed to the Error with ``revert``.\n */\n args;\n /**\n * The full Error signature.\n */\n signature;\n /**\n * The selector for the Error.\n */\n selector;\n /**\n * @_ignore:\n */\n constructor(fragment, selector, args) {\n const name = fragment.name, signature = fragment.format();\n (0, index_js_3.defineProperties)(this, {\n fragment,\n name,\n args,\n signature,\n selector\n });\n }\n };\n exports3.ErrorDescription = ErrorDescription;\n var Indexed = class {\n /**\n * The ``keccak256`` of the value logged.\n */\n hash;\n /**\n * @_ignore:\n */\n _isIndexed;\n /**\n * Returns ``true`` if %%value%% is an **Indexed**.\n *\n * This provides a Type Guard for property access.\n */\n static isIndexed(value) {\n return !!(value && value._isIndexed);\n }\n /**\n * @_ignore:\n */\n constructor(hash3) {\n (0, index_js_3.defineProperties)(this, { hash: hash3, _isIndexed: true });\n }\n };\n exports3.Indexed = Indexed;\n var PanicReasons = {\n \"0\": \"generic panic\",\n \"1\": \"assert(false)\",\n \"17\": \"arithmetic overflow\",\n \"18\": \"division or modulo by zero\",\n \"33\": \"enum overflow\",\n \"34\": \"invalid encoded storage byte array accessed\",\n \"49\": \"out-of-bounds array access; popping on an empty array\",\n \"50\": \"out-of-bounds access of an array or bytesN\",\n \"65\": \"out of memory\",\n \"81\": \"uninitialized function\"\n };\n var BuiltinErrors = {\n \"0x08c379a0\": {\n signature: \"Error(string)\",\n name: \"Error\",\n inputs: [\"string\"],\n reason: (message) => {\n return `reverted with reason string ${JSON.stringify(message)}`;\n }\n },\n \"0x4e487b71\": {\n signature: \"Panic(uint256)\",\n name: \"Panic\",\n inputs: [\"uint256\"],\n reason: (code) => {\n let reason = \"unknown panic code\";\n if (code >= 0 && code <= 255 && PanicReasons[code.toString()]) {\n reason = PanicReasons[code.toString()];\n }\n return `reverted with panic code 0x${code.toString(16)} (${reason})`;\n }\n }\n };\n var Interface = class _Interface {\n /**\n * All the Contract ABI members (i.e. methods, events, errors, etc).\n */\n fragments;\n /**\n * The Contract constructor.\n */\n deploy;\n /**\n * The Fallback method, if any.\n */\n fallback;\n /**\n * If receiving ether is supported.\n */\n receive;\n #errors;\n #events;\n #functions;\n // #structs: Map;\n #abiCoder;\n /**\n * Create a new Interface for the %%fragments%%.\n */\n constructor(fragments) {\n let abi2 = [];\n if (typeof fragments === \"string\") {\n abi2 = JSON.parse(fragments);\n } else {\n abi2 = fragments;\n }\n this.#functions = /* @__PURE__ */ new Map();\n this.#errors = /* @__PURE__ */ new Map();\n this.#events = /* @__PURE__ */ new Map();\n const frags = [];\n for (const a3 of abi2) {\n try {\n frags.push(fragments_js_1.Fragment.from(a3));\n } catch (error) {\n console.log(`[Warning] Invalid Fragment ${JSON.stringify(a3)}:`, error.message);\n }\n }\n (0, index_js_3.defineProperties)(this, {\n fragments: Object.freeze(frags)\n });\n let fallback = null;\n let receive = false;\n this.#abiCoder = this.getAbiCoder();\n this.fragments.forEach((fragment, index2) => {\n let bucket;\n switch (fragment.type) {\n case \"constructor\":\n if (this.deploy) {\n console.log(\"duplicate definition - constructor\");\n return;\n }\n (0, index_js_3.defineProperties)(this, { deploy: fragment });\n return;\n case \"fallback\":\n if (fragment.inputs.length === 0) {\n receive = true;\n } else {\n (0, index_js_3.assertArgument)(!fallback || fragment.payable !== fallback.payable, \"conflicting fallback fragments\", `fragments[${index2}]`, fragment);\n fallback = fragment;\n receive = fallback.payable;\n }\n return;\n case \"function\":\n bucket = this.#functions;\n break;\n case \"event\":\n bucket = this.#events;\n break;\n case \"error\":\n bucket = this.#errors;\n break;\n default:\n return;\n }\n const signature = fragment.format();\n if (bucket.has(signature)) {\n return;\n }\n bucket.set(signature, fragment);\n });\n if (!this.deploy) {\n (0, index_js_3.defineProperties)(this, {\n deploy: fragments_js_1.ConstructorFragment.from(\"constructor()\")\n });\n }\n (0, index_js_3.defineProperties)(this, { fallback, receive });\n }\n /**\n * Returns the entire Human-Readable ABI, as an array of\n * signatures, optionally as %%minimal%% strings, which\n * removes parameter names and unneceesary spaces.\n */\n format(minimal) {\n const format = minimal ? \"minimal\" : \"full\";\n const abi2 = this.fragments.map((f6) => f6.format(format));\n return abi2;\n }\n /**\n * Return the JSON-encoded ABI. This is the format Solidiy\n * returns.\n */\n formatJson() {\n const abi2 = this.fragments.map((f6) => f6.format(\"json\"));\n return JSON.stringify(abi2.map((j2) => JSON.parse(j2)));\n }\n /**\n * The ABI coder that will be used to encode and decode binary\n * data.\n */\n getAbiCoder() {\n return abi_coder_js_1.AbiCoder.defaultAbiCoder();\n }\n // Find a function definition by any means necessary (unless it is ambiguous)\n #getFunction(key, values, forceUnique) {\n if ((0, index_js_3.isHexString)(key)) {\n const selector = key.toLowerCase();\n for (const fragment of this.#functions.values()) {\n if (selector === fragment.selector) {\n return fragment;\n }\n }\n return null;\n }\n if (key.indexOf(\"(\") === -1) {\n const matching = [];\n for (const [name, fragment] of this.#functions) {\n if (name.split(\n \"(\"\n /* fix:) */\n )[0] === key) {\n matching.push(fragment);\n }\n }\n if (values) {\n const lastValue = values.length > 0 ? values[values.length - 1] : null;\n let valueLength = values.length;\n let allowOptions = true;\n if (typed_js_1.Typed.isTyped(lastValue) && lastValue.type === \"overrides\") {\n allowOptions = false;\n valueLength--;\n }\n for (let i3 = matching.length - 1; i3 >= 0; i3--) {\n const inputs = matching[i3].inputs.length;\n if (inputs !== valueLength && (!allowOptions || inputs !== valueLength - 1)) {\n matching.splice(i3, 1);\n }\n }\n for (let i3 = matching.length - 1; i3 >= 0; i3--) {\n const inputs = matching[i3].inputs;\n for (let j2 = 0; j2 < values.length; j2++) {\n if (!typed_js_1.Typed.isTyped(values[j2])) {\n continue;\n }\n if (j2 >= inputs.length) {\n if (values[j2].type === \"overrides\") {\n continue;\n }\n matching.splice(i3, 1);\n break;\n }\n if (values[j2].type !== inputs[j2].baseType) {\n matching.splice(i3, 1);\n break;\n }\n }\n }\n }\n if (matching.length === 1 && values && values.length !== matching[0].inputs.length) {\n const lastArg = values[values.length - 1];\n if (lastArg == null || Array.isArray(lastArg) || typeof lastArg !== \"object\") {\n matching.splice(0, 1);\n }\n }\n if (matching.length === 0) {\n return null;\n }\n if (matching.length > 1 && forceUnique) {\n const matchStr = matching.map((m2) => JSON.stringify(m2.format())).join(\", \");\n (0, index_js_3.assertArgument)(false, `ambiguous function description (i.e. matches ${matchStr})`, \"key\", key);\n }\n return matching[0];\n }\n const result = this.#functions.get(fragments_js_1.FunctionFragment.from(key).format());\n if (result) {\n return result;\n }\n return null;\n }\n /**\n * Get the function name for %%key%%, which may be a function selector,\n * function name or function signature that belongs to the ABI.\n */\n getFunctionName(key) {\n const fragment = this.#getFunction(key, null, false);\n (0, index_js_3.assertArgument)(fragment, \"no matching function\", \"key\", key);\n return fragment.name;\n }\n /**\n * Returns true if %%key%% (a function selector, function name or\n * function signature) is present in the ABI.\n *\n * In the case of a function name, the name may be ambiguous, so\n * accessing the [[FunctionFragment]] may require refinement.\n */\n hasFunction(key) {\n return !!this.#getFunction(key, null, false);\n }\n /**\n * Get the [[FunctionFragment]] for %%key%%, which may be a function\n * selector, function name or function signature that belongs to the ABI.\n *\n * If %%values%% is provided, it will use the Typed API to handle\n * ambiguous cases where multiple functions match by name.\n *\n * If the %%key%% and %%values%% do not refine to a single function in\n * the ABI, this will throw.\n */\n getFunction(key, values) {\n return this.#getFunction(key, values || null, true);\n }\n /**\n * Iterate over all functions, calling %%callback%%, sorted by their name.\n */\n forEachFunction(callback) {\n const names = Array.from(this.#functions.keys());\n names.sort((a3, b4) => a3.localeCompare(b4));\n for (let i3 = 0; i3 < names.length; i3++) {\n const name = names[i3];\n callback(this.#functions.get(name), i3);\n }\n }\n // Find an event definition by any means necessary (unless it is ambiguous)\n #getEvent(key, values, forceUnique) {\n if ((0, index_js_3.isHexString)(key)) {\n const eventTopic = key.toLowerCase();\n for (const fragment of this.#events.values()) {\n if (eventTopic === fragment.topicHash) {\n return fragment;\n }\n }\n return null;\n }\n if (key.indexOf(\"(\") === -1) {\n const matching = [];\n for (const [name, fragment] of this.#events) {\n if (name.split(\n \"(\"\n /* fix:) */\n )[0] === key) {\n matching.push(fragment);\n }\n }\n if (values) {\n for (let i3 = matching.length - 1; i3 >= 0; i3--) {\n if (matching[i3].inputs.length < values.length) {\n matching.splice(i3, 1);\n }\n }\n for (let i3 = matching.length - 1; i3 >= 0; i3--) {\n const inputs = matching[i3].inputs;\n for (let j2 = 0; j2 < values.length; j2++) {\n if (!typed_js_1.Typed.isTyped(values[j2])) {\n continue;\n }\n if (values[j2].type !== inputs[j2].baseType) {\n matching.splice(i3, 1);\n break;\n }\n }\n }\n }\n if (matching.length === 0) {\n return null;\n }\n if (matching.length > 1 && forceUnique) {\n const matchStr = matching.map((m2) => JSON.stringify(m2.format())).join(\", \");\n (0, index_js_3.assertArgument)(false, `ambiguous event description (i.e. matches ${matchStr})`, \"key\", key);\n }\n return matching[0];\n }\n const result = this.#events.get(fragments_js_1.EventFragment.from(key).format());\n if (result) {\n return result;\n }\n return null;\n }\n /**\n * Get the event name for %%key%%, which may be a topic hash,\n * event name or event signature that belongs to the ABI.\n */\n getEventName(key) {\n const fragment = this.#getEvent(key, null, false);\n (0, index_js_3.assertArgument)(fragment, \"no matching event\", \"key\", key);\n return fragment.name;\n }\n /**\n * Returns true if %%key%% (an event topic hash, event name or\n * event signature) is present in the ABI.\n *\n * In the case of an event name, the name may be ambiguous, so\n * accessing the [[EventFragment]] may require refinement.\n */\n hasEvent(key) {\n return !!this.#getEvent(key, null, false);\n }\n /**\n * Get the [[EventFragment]] for %%key%%, which may be a topic hash,\n * event name or event signature that belongs to the ABI.\n *\n * If %%values%% is provided, it will use the Typed API to handle\n * ambiguous cases where multiple events match by name.\n *\n * If the %%key%% and %%values%% do not refine to a single event in\n * the ABI, this will throw.\n */\n getEvent(key, values) {\n return this.#getEvent(key, values || null, true);\n }\n /**\n * Iterate over all events, calling %%callback%%, sorted by their name.\n */\n forEachEvent(callback) {\n const names = Array.from(this.#events.keys());\n names.sort((a3, b4) => a3.localeCompare(b4));\n for (let i3 = 0; i3 < names.length; i3++) {\n const name = names[i3];\n callback(this.#events.get(name), i3);\n }\n }\n /**\n * Get the [[ErrorFragment]] for %%key%%, which may be an error\n * selector, error name or error signature that belongs to the ABI.\n *\n * If %%values%% is provided, it will use the Typed API to handle\n * ambiguous cases where multiple errors match by name.\n *\n * If the %%key%% and %%values%% do not refine to a single error in\n * the ABI, this will throw.\n */\n getError(key, values) {\n if ((0, index_js_3.isHexString)(key)) {\n const selector = key.toLowerCase();\n if (BuiltinErrors[selector]) {\n return fragments_js_1.ErrorFragment.from(BuiltinErrors[selector].signature);\n }\n for (const fragment of this.#errors.values()) {\n if (selector === fragment.selector) {\n return fragment;\n }\n }\n return null;\n }\n if (key.indexOf(\"(\") === -1) {\n const matching = [];\n for (const [name, fragment] of this.#errors) {\n if (name.split(\n \"(\"\n /* fix:) */\n )[0] === key) {\n matching.push(fragment);\n }\n }\n if (matching.length === 0) {\n if (key === \"Error\") {\n return fragments_js_1.ErrorFragment.from(\"error Error(string)\");\n }\n if (key === \"Panic\") {\n return fragments_js_1.ErrorFragment.from(\"error Panic(uint256)\");\n }\n return null;\n } else if (matching.length > 1) {\n const matchStr = matching.map((m2) => JSON.stringify(m2.format())).join(\", \");\n (0, index_js_3.assertArgument)(false, `ambiguous error description (i.e. ${matchStr})`, \"name\", key);\n }\n return matching[0];\n }\n key = fragments_js_1.ErrorFragment.from(key).format();\n if (key === \"Error(string)\") {\n return fragments_js_1.ErrorFragment.from(\"error Error(string)\");\n }\n if (key === \"Panic(uint256)\") {\n return fragments_js_1.ErrorFragment.from(\"error Panic(uint256)\");\n }\n const result = this.#errors.get(key);\n if (result) {\n return result;\n }\n return null;\n }\n /**\n * Iterate over all errors, calling %%callback%%, sorted by their name.\n */\n forEachError(callback) {\n const names = Array.from(this.#errors.keys());\n names.sort((a3, b4) => a3.localeCompare(b4));\n for (let i3 = 0; i3 < names.length; i3++) {\n const name = names[i3];\n callback(this.#errors.get(name), i3);\n }\n }\n // Get the 4-byte selector used by Solidity to identify a function\n /*\n getSelector(fragment: ErrorFragment | FunctionFragment): string {\n if (typeof(fragment) === \"string\") {\n const matches: Array = [ ];\n \n try { matches.push(this.getFunction(fragment)); } catch (error) { }\n try { matches.push(this.getError(fragment)); } catch (_) { }\n \n if (matches.length === 0) {\n logger.throwArgumentError(\"unknown fragment\", \"key\", fragment);\n } else if (matches.length > 1) {\n logger.throwArgumentError(\"ambiguous fragment matches function and error\", \"key\", fragment);\n }\n \n fragment = matches[0];\n }\n \n return dataSlice(id(fragment.format()), 0, 4);\n }\n */\n // Get the 32-byte topic hash used by Solidity to identify an event\n /*\n getEventTopic(fragment: EventFragment): string {\n //if (typeof(fragment) === \"string\") { fragment = this.getEvent(eventFragment); }\n return id(fragment.format());\n }\n */\n _decodeParams(params, data) {\n return this.#abiCoder.decode(params, data);\n }\n _encodeParams(params, values) {\n return this.#abiCoder.encode(params, values);\n }\n /**\n * Encodes a ``tx.data`` object for deploying the Contract with\n * the %%values%% as the constructor arguments.\n */\n encodeDeploy(values) {\n return this._encodeParams(this.deploy.inputs, values || []);\n }\n /**\n * Decodes the result %%data%% (e.g. from an ``eth_call``) for the\n * specified error (see [[getError]] for valid values for\n * %%key%%).\n *\n * Most developers should prefer the [[parseCallResult]] method instead,\n * which will automatically detect a ``CALL_EXCEPTION`` and throw the\n * corresponding error.\n */\n decodeErrorResult(fragment, data) {\n if (typeof fragment === \"string\") {\n const f6 = this.getError(fragment);\n (0, index_js_3.assertArgument)(f6, \"unknown error\", \"fragment\", fragment);\n fragment = f6;\n }\n (0, index_js_3.assertArgument)((0, index_js_3.dataSlice)(data, 0, 4) === fragment.selector, `data signature does not match error ${fragment.name}.`, \"data\", data);\n return this._decodeParams(fragment.inputs, (0, index_js_3.dataSlice)(data, 4));\n }\n /**\n * Encodes the transaction revert data for a call result that\n * reverted from the the Contract with the sepcified %%error%%\n * (see [[getError]] for valid values for %%fragment%%) with the %%values%%.\n *\n * This is generally not used by most developers, unless trying to mock\n * a result from a Contract.\n */\n encodeErrorResult(fragment, values) {\n if (typeof fragment === \"string\") {\n const f6 = this.getError(fragment);\n (0, index_js_3.assertArgument)(f6, \"unknown error\", \"fragment\", fragment);\n fragment = f6;\n }\n return (0, index_js_3.concat)([\n fragment.selector,\n this._encodeParams(fragment.inputs, values || [])\n ]);\n }\n /**\n * Decodes the %%data%% from a transaction ``tx.data`` for\n * the function specified (see [[getFunction]] for valid values\n * for %%fragment%%).\n *\n * Most developers should prefer the [[parseTransaction]] method\n * instead, which will automatically detect the fragment.\n */\n decodeFunctionData(fragment, data) {\n if (typeof fragment === \"string\") {\n const f6 = this.getFunction(fragment);\n (0, index_js_3.assertArgument)(f6, \"unknown function\", \"fragment\", fragment);\n fragment = f6;\n }\n (0, index_js_3.assertArgument)((0, index_js_3.dataSlice)(data, 0, 4) === fragment.selector, `data signature does not match function ${fragment.name}.`, \"data\", data);\n return this._decodeParams(fragment.inputs, (0, index_js_3.dataSlice)(data, 4));\n }\n /**\n * Encodes the ``tx.data`` for a transaction that calls the function\n * specified (see [[getFunction]] for valid values for %%fragment%%) with\n * the %%values%%.\n */\n encodeFunctionData(fragment, values) {\n if (typeof fragment === \"string\") {\n const f6 = this.getFunction(fragment);\n (0, index_js_3.assertArgument)(f6, \"unknown function\", \"fragment\", fragment);\n fragment = f6;\n }\n return (0, index_js_3.concat)([\n fragment.selector,\n this._encodeParams(fragment.inputs, values || [])\n ]);\n }\n /**\n * Decodes the result %%data%% (e.g. from an ``eth_call``) for the\n * specified function (see [[getFunction]] for valid values for\n * %%key%%).\n *\n * Most developers should prefer the [[parseCallResult]] method instead,\n * which will automatically detect a ``CALL_EXCEPTION`` and throw the\n * corresponding error.\n */\n decodeFunctionResult(fragment, data) {\n if (typeof fragment === \"string\") {\n const f6 = this.getFunction(fragment);\n (0, index_js_3.assertArgument)(f6, \"unknown function\", \"fragment\", fragment);\n fragment = f6;\n }\n let message = \"invalid length for result data\";\n const bytes = (0, index_js_3.getBytesCopy)(data);\n if (bytes.length % 32 === 0) {\n try {\n return this.#abiCoder.decode(fragment.outputs, bytes);\n } catch (error) {\n message = \"could not decode result data\";\n }\n }\n (0, index_js_3.assert)(false, message, \"BAD_DATA\", {\n value: (0, index_js_3.hexlify)(bytes),\n info: { method: fragment.name, signature: fragment.format() }\n });\n }\n makeError(_data, tx) {\n const data = (0, index_js_3.getBytes)(_data, \"data\");\n const error = abi_coder_js_1.AbiCoder.getBuiltinCallException(\"call\", tx, data);\n const customPrefix = \"execution reverted (unknown custom error)\";\n if (error.message.startsWith(customPrefix)) {\n const selector = (0, index_js_3.hexlify)(data.slice(0, 4));\n const ef = this.getError(selector);\n if (ef) {\n try {\n const args = this.#abiCoder.decode(ef.inputs, data.slice(4));\n error.revert = {\n name: ef.name,\n signature: ef.format(),\n args\n };\n error.reason = error.revert.signature;\n error.message = `execution reverted: ${error.reason}`;\n } catch (e3) {\n error.message = `execution reverted (coult not decode custom error)`;\n }\n }\n }\n const parsed = this.parseTransaction(tx);\n if (parsed) {\n error.invocation = {\n method: parsed.name,\n signature: parsed.signature,\n args: parsed.args\n };\n }\n return error;\n }\n /**\n * Encodes the result data (e.g. from an ``eth_call``) for the\n * specified function (see [[getFunction]] for valid values\n * for %%fragment%%) with %%values%%.\n *\n * This is generally not used by most developers, unless trying to mock\n * a result from a Contract.\n */\n encodeFunctionResult(fragment, values) {\n if (typeof fragment === \"string\") {\n const f6 = this.getFunction(fragment);\n (0, index_js_3.assertArgument)(f6, \"unknown function\", \"fragment\", fragment);\n fragment = f6;\n }\n return (0, index_js_3.hexlify)(this.#abiCoder.encode(fragment.outputs, values || []));\n }\n /*\n spelunk(inputs: Array, values: ReadonlyArray, processfunc: (type: string, value: any) => Promise): Promise> {\n const promises: Array> = [ ];\n const process = function(type: ParamType, value: any): any {\n if (type.baseType === \"array\") {\n return descend(type.child\n }\n if (type. === \"address\") {\n }\n };\n \n const descend = function (inputs: Array, values: ReadonlyArray) {\n if (inputs.length !== values.length) { throw new Error(\"length mismatch\"); }\n \n };\n \n const result: Array = [ ];\n values.forEach((value, index) => {\n if (value == null) {\n topics.push(null);\n } else if (param.baseType === \"array\" || param.baseType === \"tuple\") {\n logger.throwArgumentError(\"filtering with tuples or arrays not supported\", (\"contract.\" + param.name), value);\n } else if (Array.isArray(value)) {\n topics.push(value.map((value) => encodeTopic(param, value)));\n } else {\n topics.push(encodeTopic(param, value));\n }\n });\n }\n */\n // Create the filter for the event with search criteria (e.g. for eth_filterLog)\n encodeFilterTopics(fragment, values) {\n if (typeof fragment === \"string\") {\n const f6 = this.getEvent(fragment);\n (0, index_js_3.assertArgument)(f6, \"unknown event\", \"eventFragment\", fragment);\n fragment = f6;\n }\n (0, index_js_3.assert)(values.length <= fragment.inputs.length, `too many arguments for ${fragment.format()}`, \"UNEXPECTED_ARGUMENT\", { count: values.length, expectedCount: fragment.inputs.length });\n const topics = [];\n if (!fragment.anonymous) {\n topics.push(fragment.topicHash);\n }\n const encodeTopic = (param, value) => {\n if (param.type === \"string\") {\n return (0, index_js_2.id)(value);\n } else if (param.type === \"bytes\") {\n return (0, index_js_1.keccak256)((0, index_js_3.hexlify)(value));\n }\n if (param.type === \"bool\" && typeof value === \"boolean\") {\n value = value ? \"0x01\" : \"0x00\";\n } else if (param.type.match(/^u?int/)) {\n value = (0, index_js_3.toBeHex)(value);\n } else if (param.type.match(/^bytes/)) {\n value = (0, index_js_3.zeroPadBytes)(value, 32);\n } else if (param.type === \"address\") {\n this.#abiCoder.encode([\"address\"], [value]);\n }\n return (0, index_js_3.zeroPadValue)((0, index_js_3.hexlify)(value), 32);\n };\n values.forEach((value, index2) => {\n const param = fragment.inputs[index2];\n if (!param.indexed) {\n (0, index_js_3.assertArgument)(value == null, \"cannot filter non-indexed parameters; must be null\", \"contract.\" + param.name, value);\n return;\n }\n if (value == null) {\n topics.push(null);\n } else if (param.baseType === \"array\" || param.baseType === \"tuple\") {\n (0, index_js_3.assertArgument)(false, \"filtering with tuples or arrays not supported\", \"contract.\" + param.name, value);\n } else if (Array.isArray(value)) {\n topics.push(value.map((value2) => encodeTopic(param, value2)));\n } else {\n topics.push(encodeTopic(param, value));\n }\n });\n while (topics.length && topics[topics.length - 1] === null) {\n topics.pop();\n }\n return topics;\n }\n encodeEventLog(fragment, values) {\n if (typeof fragment === \"string\") {\n const f6 = this.getEvent(fragment);\n (0, index_js_3.assertArgument)(f6, \"unknown event\", \"eventFragment\", fragment);\n fragment = f6;\n }\n const topics = [];\n const dataTypes = [];\n const dataValues = [];\n if (!fragment.anonymous) {\n topics.push(fragment.topicHash);\n }\n (0, index_js_3.assertArgument)(values.length === fragment.inputs.length, \"event arguments/values mismatch\", \"values\", values);\n fragment.inputs.forEach((param, index2) => {\n const value = values[index2];\n if (param.indexed) {\n if (param.type === \"string\") {\n topics.push((0, index_js_2.id)(value));\n } else if (param.type === \"bytes\") {\n topics.push((0, index_js_1.keccak256)(value));\n } else if (param.baseType === \"tuple\" || param.baseType === \"array\") {\n throw new Error(\"not implemented\");\n } else {\n topics.push(this.#abiCoder.encode([param.type], [value]));\n }\n } else {\n dataTypes.push(param);\n dataValues.push(value);\n }\n });\n return {\n data: this.#abiCoder.encode(dataTypes, dataValues),\n topics\n };\n }\n // Decode a filter for the event and the search criteria\n decodeEventLog(fragment, data, topics) {\n if (typeof fragment === \"string\") {\n const f6 = this.getEvent(fragment);\n (0, index_js_3.assertArgument)(f6, \"unknown event\", \"eventFragment\", fragment);\n fragment = f6;\n }\n if (topics != null && !fragment.anonymous) {\n const eventTopic = fragment.topicHash;\n (0, index_js_3.assertArgument)((0, index_js_3.isHexString)(topics[0], 32) && topics[0].toLowerCase() === eventTopic, \"fragment/topic mismatch\", \"topics[0]\", topics[0]);\n topics = topics.slice(1);\n }\n const indexed = [];\n const nonIndexed = [];\n const dynamic = [];\n fragment.inputs.forEach((param, index2) => {\n if (param.indexed) {\n if (param.type === \"string\" || param.type === \"bytes\" || param.baseType === \"tuple\" || param.baseType === \"array\") {\n indexed.push(fragments_js_1.ParamType.from({ type: \"bytes32\", name: param.name }));\n dynamic.push(true);\n } else {\n indexed.push(param);\n dynamic.push(false);\n }\n } else {\n nonIndexed.push(param);\n dynamic.push(false);\n }\n });\n const resultIndexed = topics != null ? this.#abiCoder.decode(indexed, (0, index_js_3.concat)(topics)) : null;\n const resultNonIndexed = this.#abiCoder.decode(nonIndexed, data, true);\n const values = [];\n const keys = [];\n let nonIndexedIndex = 0, indexedIndex = 0;\n fragment.inputs.forEach((param, index2) => {\n let value = null;\n if (param.indexed) {\n if (resultIndexed == null) {\n value = new Indexed(null);\n } else if (dynamic[index2]) {\n value = new Indexed(resultIndexed[indexedIndex++]);\n } else {\n try {\n value = resultIndexed[indexedIndex++];\n } catch (error) {\n value = error;\n }\n }\n } else {\n try {\n value = resultNonIndexed[nonIndexedIndex++];\n } catch (error) {\n value = error;\n }\n }\n values.push(value);\n keys.push(param.name || null);\n });\n return abstract_coder_js_1.Result.fromItems(values, keys);\n }\n /**\n * Parses a transaction, finding the matching function and extracts\n * the parameter values along with other useful function details.\n *\n * If the matching function cannot be found, return null.\n */\n parseTransaction(tx) {\n const data = (0, index_js_3.getBytes)(tx.data, \"tx.data\");\n const value = (0, index_js_3.getBigInt)(tx.value != null ? tx.value : 0, \"tx.value\");\n const fragment = this.getFunction((0, index_js_3.hexlify)(data.slice(0, 4)));\n if (!fragment) {\n return null;\n }\n const args = this.#abiCoder.decode(fragment.inputs, data.slice(4));\n return new TransactionDescription(fragment, fragment.selector, args, value);\n }\n parseCallResult(data) {\n throw new Error(\"@TODO\");\n }\n /**\n * Parses a receipt log, finding the matching event and extracts\n * the parameter values along with other useful event details.\n *\n * If the matching event cannot be found, returns null.\n */\n parseLog(log) {\n const fragment = this.getEvent(log.topics[0]);\n if (!fragment || fragment.anonymous) {\n return null;\n }\n return new LogDescription(fragment, fragment.topicHash, this.decodeEventLog(fragment, log.data, log.topics));\n }\n /**\n * Parses a revert data, finding the matching error and extracts\n * the parameter values along with other useful error details.\n *\n * If the matching error cannot be found, returns null.\n */\n parseError(data) {\n const hexData = (0, index_js_3.hexlify)(data);\n const fragment = this.getError((0, index_js_3.dataSlice)(hexData, 0, 4));\n if (!fragment) {\n return null;\n }\n const args = this.#abiCoder.decode(fragment.inputs, (0, index_js_3.dataSlice)(hexData, 4));\n return new ErrorDescription(fragment, fragment.selector, args);\n }\n /**\n * Creates a new [[Interface]] from the ABI %%value%%.\n *\n * The %%value%% may be provided as an existing [[Interface]] object,\n * a JSON-encoded ABI or any Human-Readable ABI format.\n */\n static from(value) {\n if (value instanceof _Interface) {\n return value;\n }\n if (typeof value === \"string\") {\n return new _Interface(JSON.parse(value));\n }\n if (typeof value.formatJson === \"function\") {\n return new _Interface(value.formatJson());\n }\n if (typeof value.format === \"function\") {\n return new _Interface(value.format(\"json\"));\n }\n return new _Interface(value);\n }\n };\n exports3.Interface = Interface;\n }\n });\n\n // ../../../node_modules/.pnpm/ethers@6.15.0_bufferutil@4.0.9_utf-8-validate@5.0.10/node_modules/ethers/lib.commonjs/abi/index.js\n var require_abi = __commonJS({\n \"../../../node_modules/.pnpm/ethers@6.15.0_bufferutil@4.0.9_utf-8-validate@5.0.10/node_modules/ethers/lib.commonjs/abi/index.js\"(exports3) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n Object.defineProperty(exports3, \"__esModule\", { value: true });\n exports3.Typed = exports3.Result = exports3.TransactionDescription = exports3.LogDescription = exports3.ErrorDescription = exports3.Interface = exports3.Indexed = exports3.checkResultErrors = exports3.StructFragment = exports3.ParamType = exports3.NamedFragment = exports3.FunctionFragment = exports3.Fragment = exports3.FallbackFragment = exports3.EventFragment = exports3.ErrorFragment = exports3.ConstructorFragment = exports3.encodeBytes32String = exports3.decodeBytes32String = exports3.AbiCoder = void 0;\n var abi_coder_js_1 = require_abi_coder2();\n Object.defineProperty(exports3, \"AbiCoder\", { enumerable: true, get: function() {\n return abi_coder_js_1.AbiCoder;\n } });\n var bytes32_js_1 = require_bytes322();\n Object.defineProperty(exports3, \"decodeBytes32String\", { enumerable: true, get: function() {\n return bytes32_js_1.decodeBytes32String;\n } });\n Object.defineProperty(exports3, \"encodeBytes32String\", { enumerable: true, get: function() {\n return bytes32_js_1.encodeBytes32String;\n } });\n var fragments_js_1 = require_fragments2();\n Object.defineProperty(exports3, \"ConstructorFragment\", { enumerable: true, get: function() {\n return fragments_js_1.ConstructorFragment;\n } });\n Object.defineProperty(exports3, \"ErrorFragment\", { enumerable: true, get: function() {\n return fragments_js_1.ErrorFragment;\n } });\n Object.defineProperty(exports3, \"EventFragment\", { enumerable: true, get: function() {\n return fragments_js_1.EventFragment;\n } });\n Object.defineProperty(exports3, \"FallbackFragment\", { enumerable: true, get: function() {\n return fragments_js_1.FallbackFragment;\n } });\n Object.defineProperty(exports3, \"Fragment\", { enumerable: true, get: function() {\n return fragments_js_1.Fragment;\n } });\n Object.defineProperty(exports3, \"FunctionFragment\", { enumerable: true, get: function() {\n return fragments_js_1.FunctionFragment;\n } });\n Object.defineProperty(exports3, \"NamedFragment\", { enumerable: true, get: function() {\n return fragments_js_1.NamedFragment;\n } });\n Object.defineProperty(exports3, \"ParamType\", { enumerable: true, get: function() {\n return fragments_js_1.ParamType;\n } });\n Object.defineProperty(exports3, \"StructFragment\", { enumerable: true, get: function() {\n return fragments_js_1.StructFragment;\n } });\n var interface_js_1 = require_interface2();\n Object.defineProperty(exports3, \"checkResultErrors\", { enumerable: true, get: function() {\n return interface_js_1.checkResultErrors;\n } });\n Object.defineProperty(exports3, \"Indexed\", { enumerable: true, get: function() {\n return interface_js_1.Indexed;\n } });\n Object.defineProperty(exports3, \"Interface\", { enumerable: true, get: function() {\n return interface_js_1.Interface;\n } });\n Object.defineProperty(exports3, \"ErrorDescription\", { enumerable: true, get: function() {\n return interface_js_1.ErrorDescription;\n } });\n Object.defineProperty(exports3, \"LogDescription\", { enumerable: true, get: function() {\n return interface_js_1.LogDescription;\n } });\n Object.defineProperty(exports3, \"TransactionDescription\", { enumerable: true, get: function() {\n return interface_js_1.TransactionDescription;\n } });\n Object.defineProperty(exports3, \"Result\", { enumerable: true, get: function() {\n return interface_js_1.Result;\n } });\n var typed_js_1 = require_typed();\n Object.defineProperty(exports3, \"Typed\", { enumerable: true, get: function() {\n return typed_js_1.Typed;\n } });\n }\n });\n\n // ../../../node_modules/.pnpm/ethers@6.15.0_bufferutil@4.0.9_utf-8-validate@5.0.10/node_modules/ethers/lib.commonjs/providers/provider.js\n var require_provider = __commonJS({\n \"../../../node_modules/.pnpm/ethers@6.15.0_bufferutil@4.0.9_utf-8-validate@5.0.10/node_modules/ethers/lib.commonjs/providers/provider.js\"(exports3) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n Object.defineProperty(exports3, \"__esModule\", { value: true });\n exports3.TransactionResponse = exports3.TransactionReceipt = exports3.Log = exports3.Block = exports3.copyRequest = exports3.FeeData = void 0;\n var index_js_1 = require_utils8();\n var index_js_2 = require_transaction2();\n var BN_0 = BigInt(0);\n function getValue(value) {\n if (value == null) {\n return null;\n }\n return value;\n }\n function toJson(value) {\n if (value == null) {\n return null;\n }\n return value.toString();\n }\n var FeeData = class {\n /**\n * The gas price for legacy networks.\n */\n gasPrice;\n /**\n * The maximum fee to pay per gas.\n *\n * The base fee per gas is defined by the network and based on\n * congestion, increasing the cost during times of heavy load\n * and lowering when less busy.\n *\n * The actual fee per gas will be the base fee for the block\n * and the priority fee, up to the max fee per gas.\n *\n * This will be ``null`` on legacy networks (i.e. [pre-EIP-1559](link-eip-1559))\n */\n maxFeePerGas;\n /**\n * The additional amout to pay per gas to encourage a validator\n * to include the transaction.\n *\n * The purpose of this is to compensate the validator for the\n * adjusted risk for including a given transaction.\n *\n * This will be ``null`` on legacy networks (i.e. [pre-EIP-1559](link-eip-1559))\n */\n maxPriorityFeePerGas;\n /**\n * Creates a new FeeData for %%gasPrice%%, %%maxFeePerGas%% and\n * %%maxPriorityFeePerGas%%.\n */\n constructor(gasPrice, maxFeePerGas, maxPriorityFeePerGas) {\n (0, index_js_1.defineProperties)(this, {\n gasPrice: getValue(gasPrice),\n maxFeePerGas: getValue(maxFeePerGas),\n maxPriorityFeePerGas: getValue(maxPriorityFeePerGas)\n });\n }\n /**\n * Returns a JSON-friendly value.\n */\n toJSON() {\n const { gasPrice, maxFeePerGas, maxPriorityFeePerGas } = this;\n return {\n _type: \"FeeData\",\n gasPrice: toJson(gasPrice),\n maxFeePerGas: toJson(maxFeePerGas),\n maxPriorityFeePerGas: toJson(maxPriorityFeePerGas)\n };\n }\n };\n exports3.FeeData = FeeData;\n function copyRequest(req) {\n const result = {};\n if (req.to) {\n result.to = req.to;\n }\n if (req.from) {\n result.from = req.from;\n }\n if (req.data) {\n result.data = (0, index_js_1.hexlify)(req.data);\n }\n const bigIntKeys = \"chainId,gasLimit,gasPrice,maxFeePerBlobGas,maxFeePerGas,maxPriorityFeePerGas,value\".split(/,/);\n for (const key of bigIntKeys) {\n if (!(key in req) || req[key] == null) {\n continue;\n }\n result[key] = (0, index_js_1.getBigInt)(req[key], `request.${key}`);\n }\n const numberKeys = \"type,nonce\".split(/,/);\n for (const key of numberKeys) {\n if (!(key in req) || req[key] == null) {\n continue;\n }\n result[key] = (0, index_js_1.getNumber)(req[key], `request.${key}`);\n }\n if (req.accessList) {\n result.accessList = (0, index_js_2.accessListify)(req.accessList);\n }\n if (req.authorizationList) {\n result.authorizationList = req.authorizationList.slice();\n }\n if (\"blockTag\" in req) {\n result.blockTag = req.blockTag;\n }\n if (\"enableCcipRead\" in req) {\n result.enableCcipRead = !!req.enableCcipRead;\n }\n if (\"customData\" in req) {\n result.customData = req.customData;\n }\n if (\"blobVersionedHashes\" in req && req.blobVersionedHashes) {\n result.blobVersionedHashes = req.blobVersionedHashes.slice();\n }\n if (\"kzg\" in req) {\n result.kzg = req.kzg;\n }\n if (\"blobs\" in req && req.blobs) {\n result.blobs = req.blobs.map((b4) => {\n if ((0, index_js_1.isBytesLike)(b4)) {\n return (0, index_js_1.hexlify)(b4);\n }\n return Object.assign({}, b4);\n });\n }\n return result;\n }\n exports3.copyRequest = copyRequest;\n var Block = class {\n /**\n * The provider connected to the block used to fetch additional details\n * if necessary.\n */\n provider;\n /**\n * The block number, sometimes called the block height. This is a\n * sequential number that is one higher than the parent block.\n */\n number;\n /**\n * The block hash.\n *\n * This hash includes all properties, so can be safely used to identify\n * an exact set of block properties.\n */\n hash;\n /**\n * The timestamp for this block, which is the number of seconds since\n * epoch that this block was included.\n */\n timestamp;\n /**\n * The block hash of the parent block.\n */\n parentHash;\n /**\n * The hash tree root of the parent beacon block for the given\n * execution block. See [[link-eip-4788]].\n */\n parentBeaconBlockRoot;\n /**\n * The nonce.\n *\n * On legacy networks, this is the random number inserted which\n * permitted the difficulty target to be reached.\n */\n nonce;\n /**\n * The difficulty target.\n *\n * On legacy networks, this is the proof-of-work target required\n * for a block to meet the protocol rules to be included.\n *\n * On modern networks, this is a random number arrived at using\n * randao. @TODO: Find links?\n */\n difficulty;\n /**\n * The total gas limit for this block.\n */\n gasLimit;\n /**\n * The total gas used in this block.\n */\n gasUsed;\n /**\n * The root hash for the global state after applying changes\n * in this block.\n */\n stateRoot;\n /**\n * The hash of the transaction receipts trie.\n */\n receiptsRoot;\n /**\n * The total amount of blob gas consumed by the transactions\n * within the block. See [[link-eip-4844]].\n */\n blobGasUsed;\n /**\n * The running total of blob gas consumed in excess of the\n * target, prior to the block. See [[link-eip-4844]].\n */\n excessBlobGas;\n /**\n * The miner coinbase address, wihch receives any subsidies for\n * including this block.\n */\n miner;\n /**\n * The latest RANDAO mix of the post beacon state of\n * the previous block.\n */\n prevRandao;\n /**\n * Any extra data the validator wished to include.\n */\n extraData;\n /**\n * The base fee per gas that all transactions in this block were\n * charged.\n *\n * This adjusts after each block, depending on how congested the network\n * is.\n */\n baseFeePerGas;\n #transactions;\n /**\n * Create a new **Block** object.\n *\n * This should generally not be necessary as the unless implementing a\n * low-level library.\n */\n constructor(block, provider) {\n this.#transactions = block.transactions.map((tx) => {\n if (typeof tx !== \"string\") {\n return new TransactionResponse(tx, provider);\n }\n return tx;\n });\n (0, index_js_1.defineProperties)(this, {\n provider,\n hash: getValue(block.hash),\n number: block.number,\n timestamp: block.timestamp,\n parentHash: block.parentHash,\n parentBeaconBlockRoot: block.parentBeaconBlockRoot,\n nonce: block.nonce,\n difficulty: block.difficulty,\n gasLimit: block.gasLimit,\n gasUsed: block.gasUsed,\n blobGasUsed: block.blobGasUsed,\n excessBlobGas: block.excessBlobGas,\n miner: block.miner,\n prevRandao: getValue(block.prevRandao),\n extraData: block.extraData,\n baseFeePerGas: getValue(block.baseFeePerGas),\n stateRoot: block.stateRoot,\n receiptsRoot: block.receiptsRoot\n });\n }\n /**\n * Returns the list of transaction hashes, in the order\n * they were executed within the block.\n */\n get transactions() {\n return this.#transactions.map((tx) => {\n if (typeof tx === \"string\") {\n return tx;\n }\n return tx.hash;\n });\n }\n /**\n * Returns the complete transactions, in the order they\n * were executed within the block.\n *\n * This is only available for blocks which prefetched\n * transactions, by passing ``true`` to %%prefetchTxs%%\n * into [[Provider-getBlock]].\n */\n get prefetchedTransactions() {\n const txs = this.#transactions.slice();\n if (txs.length === 0) {\n return [];\n }\n (0, index_js_1.assert)(typeof txs[0] === \"object\", \"transactions were not prefetched with block request\", \"UNSUPPORTED_OPERATION\", {\n operation: \"transactionResponses()\"\n });\n return txs;\n }\n /**\n * Returns a JSON-friendly value.\n */\n toJSON() {\n const { baseFeePerGas, difficulty, extraData, gasLimit, gasUsed, hash: hash3, miner, prevRandao, nonce, number: number2, parentHash, parentBeaconBlockRoot, stateRoot, receiptsRoot, timestamp, transactions } = this;\n return {\n _type: \"Block\",\n baseFeePerGas: toJson(baseFeePerGas),\n difficulty: toJson(difficulty),\n extraData,\n gasLimit: toJson(gasLimit),\n gasUsed: toJson(gasUsed),\n blobGasUsed: toJson(this.blobGasUsed),\n excessBlobGas: toJson(this.excessBlobGas),\n hash: hash3,\n miner,\n prevRandao,\n nonce,\n number: number2,\n parentHash,\n timestamp,\n parentBeaconBlockRoot,\n stateRoot,\n receiptsRoot,\n transactions\n };\n }\n [Symbol.iterator]() {\n let index2 = 0;\n const txs = this.transactions;\n return {\n next: () => {\n if (index2 < this.length) {\n return {\n value: txs[index2++],\n done: false\n };\n }\n return { value: void 0, done: true };\n }\n };\n }\n /**\n * The number of transactions in this block.\n */\n get length() {\n return this.#transactions.length;\n }\n /**\n * The [[link-js-date]] this block was included at.\n */\n get date() {\n if (this.timestamp == null) {\n return null;\n }\n return new Date(this.timestamp * 1e3);\n }\n /**\n * Get the transaction at %%indexe%% within this block.\n */\n async getTransaction(indexOrHash) {\n let tx = void 0;\n if (typeof indexOrHash === \"number\") {\n tx = this.#transactions[indexOrHash];\n } else {\n const hash3 = indexOrHash.toLowerCase();\n for (const v2 of this.#transactions) {\n if (typeof v2 === \"string\") {\n if (v2 !== hash3) {\n continue;\n }\n tx = v2;\n break;\n } else {\n if (v2.hash !== hash3) {\n continue;\n }\n tx = v2;\n break;\n }\n }\n }\n if (tx == null) {\n throw new Error(\"no such tx\");\n }\n if (typeof tx === \"string\") {\n return await this.provider.getTransaction(tx);\n } else {\n return tx;\n }\n }\n /**\n * If a **Block** was fetched with a request to include the transactions\n * this will allow synchronous access to those transactions.\n *\n * If the transactions were not prefetched, this will throw.\n */\n getPrefetchedTransaction(indexOrHash) {\n const txs = this.prefetchedTransactions;\n if (typeof indexOrHash === \"number\") {\n return txs[indexOrHash];\n }\n indexOrHash = indexOrHash.toLowerCase();\n for (const tx of txs) {\n if (tx.hash === indexOrHash) {\n return tx;\n }\n }\n (0, index_js_1.assertArgument)(false, \"no matching transaction\", \"indexOrHash\", indexOrHash);\n }\n /**\n * Returns true if this block been mined. This provides a type guard\n * for all properties on a [[MinedBlock]].\n */\n isMined() {\n return !!this.hash;\n }\n /**\n * Returns true if this block is an [[link-eip-2930]] block.\n */\n isLondon() {\n return !!this.baseFeePerGas;\n }\n /**\n * @_ignore:\n */\n orphanedEvent() {\n if (!this.isMined()) {\n throw new Error(\"\");\n }\n return createOrphanedBlockFilter(this);\n }\n };\n exports3.Block = Block;\n var Log = class {\n /**\n * The provider connected to the log used to fetch additional details\n * if necessary.\n */\n provider;\n /**\n * The transaction hash of the transaction this log occurred in. Use the\n * [[Log-getTransaction]] to get the [[TransactionResponse]].\n */\n transactionHash;\n /**\n * The block hash of the block this log occurred in. Use the\n * [[Log-getBlock]] to get the [[Block]].\n */\n blockHash;\n /**\n * The block number of the block this log occurred in. It is preferred\n * to use the [[Block-hash]] when fetching the related [[Block]],\n * since in the case of an orphaned block, the block at that height may\n * have changed.\n */\n blockNumber;\n /**\n * If the **Log** represents a block that was removed due to an orphaned\n * block, this will be true.\n *\n * This can only happen within an orphan event listener.\n */\n removed;\n /**\n * The address of the contract that emitted this log.\n */\n address;\n /**\n * The data included in this log when it was emitted.\n */\n data;\n /**\n * The indexed topics included in this log when it was emitted.\n *\n * All topics are included in the bloom filters, so they can be\n * efficiently filtered using the [[Provider-getLogs]] method.\n */\n topics;\n /**\n * The index within the block this log occurred at. This is generally\n * not useful to developers, but can be used with the various roots\n * to proof inclusion within a block.\n */\n index;\n /**\n * The index within the transaction of this log.\n */\n transactionIndex;\n /**\n * @_ignore:\n */\n constructor(log, provider) {\n this.provider = provider;\n const topics = Object.freeze(log.topics.slice());\n (0, index_js_1.defineProperties)(this, {\n transactionHash: log.transactionHash,\n blockHash: log.blockHash,\n blockNumber: log.blockNumber,\n removed: log.removed,\n address: log.address,\n data: log.data,\n topics,\n index: log.index,\n transactionIndex: log.transactionIndex\n });\n }\n /**\n * Returns a JSON-compatible object.\n */\n toJSON() {\n const { address, blockHash, blockNumber, data, index: index2, removed, topics, transactionHash, transactionIndex } = this;\n return {\n _type: \"log\",\n address,\n blockHash,\n blockNumber,\n data,\n index: index2,\n removed,\n topics,\n transactionHash,\n transactionIndex\n };\n }\n /**\n * Returns the block that this log occurred in.\n */\n async getBlock() {\n const block = await this.provider.getBlock(this.blockHash);\n (0, index_js_1.assert)(!!block, \"failed to find transaction\", \"UNKNOWN_ERROR\", {});\n return block;\n }\n /**\n * Returns the transaction that this log occurred in.\n */\n async getTransaction() {\n const tx = await this.provider.getTransaction(this.transactionHash);\n (0, index_js_1.assert)(!!tx, \"failed to find transaction\", \"UNKNOWN_ERROR\", {});\n return tx;\n }\n /**\n * Returns the transaction receipt fot the transaction that this\n * log occurred in.\n */\n async getTransactionReceipt() {\n const receipt = await this.provider.getTransactionReceipt(this.transactionHash);\n (0, index_js_1.assert)(!!receipt, \"failed to find transaction receipt\", \"UNKNOWN_ERROR\", {});\n return receipt;\n }\n /**\n * @_ignore:\n */\n removedEvent() {\n return createRemovedLogFilter(this);\n }\n };\n exports3.Log = Log;\n var TransactionReceipt = class {\n /**\n * The provider connected to the log used to fetch additional details\n * if necessary.\n */\n provider;\n /**\n * The address the transaction was sent to.\n */\n to;\n /**\n * The sender of the transaction.\n */\n from;\n /**\n * The address of the contract if the transaction was directly\n * responsible for deploying one.\n *\n * This is non-null **only** if the ``to`` is empty and the ``data``\n * was successfully executed as initcode.\n */\n contractAddress;\n /**\n * The transaction hash.\n */\n hash;\n /**\n * The index of this transaction within the block transactions.\n */\n index;\n /**\n * The block hash of the [[Block]] this transaction was included in.\n */\n blockHash;\n /**\n * The block number of the [[Block]] this transaction was included in.\n */\n blockNumber;\n /**\n * The bloom filter bytes that represent all logs that occurred within\n * this transaction. This is generally not useful for most developers,\n * but can be used to validate the included logs.\n */\n logsBloom;\n /**\n * The actual amount of gas used by this transaction.\n *\n * When creating a transaction, the amount of gas that will be used can\n * only be approximated, but the sender must pay the gas fee for the\n * entire gas limit. After the transaction, the difference is refunded.\n */\n gasUsed;\n /**\n * The gas used for BLObs. See [[link-eip-4844]].\n */\n blobGasUsed;\n /**\n * The amount of gas used by all transactions within the block for this\n * and all transactions with a lower ``index``.\n *\n * This is generally not useful for developers but can be used to\n * validate certain aspects of execution.\n */\n cumulativeGasUsed;\n /**\n * The actual gas price used during execution.\n *\n * Due to the complexity of [[link-eip-1559]] this value can only\n * be caluclated after the transaction has been mined, snce the base\n * fee is protocol-enforced.\n */\n gasPrice;\n /**\n * The price paid per BLOB in gas. See [[link-eip-4844]].\n */\n blobGasPrice;\n /**\n * The [[link-eip-2718]] transaction type.\n */\n type;\n //readonly byzantium!: boolean;\n /**\n * The status of this transaction, indicating success (i.e. ``1``) or\n * a revert (i.e. ``0``).\n *\n * This is available in post-byzantium blocks, but some backends may\n * backfill this value.\n */\n status;\n /**\n * The root hash of this transaction.\n *\n * This is no present and was only included in pre-byzantium blocks, but\n * could be used to validate certain parts of the receipt.\n */\n root;\n #logs;\n /**\n * @_ignore:\n */\n constructor(tx, provider) {\n this.#logs = Object.freeze(tx.logs.map((log) => {\n return new Log(log, provider);\n }));\n let gasPrice = BN_0;\n if (tx.effectiveGasPrice != null) {\n gasPrice = tx.effectiveGasPrice;\n } else if (tx.gasPrice != null) {\n gasPrice = tx.gasPrice;\n }\n (0, index_js_1.defineProperties)(this, {\n provider,\n to: tx.to,\n from: tx.from,\n contractAddress: tx.contractAddress,\n hash: tx.hash,\n index: tx.index,\n blockHash: tx.blockHash,\n blockNumber: tx.blockNumber,\n logsBloom: tx.logsBloom,\n gasUsed: tx.gasUsed,\n cumulativeGasUsed: tx.cumulativeGasUsed,\n blobGasUsed: tx.blobGasUsed,\n gasPrice,\n blobGasPrice: tx.blobGasPrice,\n type: tx.type,\n //byzantium: tx.byzantium,\n status: tx.status,\n root: tx.root\n });\n }\n /**\n * The logs for this transaction.\n */\n get logs() {\n return this.#logs;\n }\n /**\n * Returns a JSON-compatible representation.\n */\n toJSON() {\n const {\n to,\n from: from14,\n contractAddress,\n hash: hash3,\n index: index2,\n blockHash,\n blockNumber,\n logsBloom,\n logs,\n //byzantium, \n status,\n root\n } = this;\n return {\n _type: \"TransactionReceipt\",\n blockHash,\n blockNumber,\n //byzantium, \n contractAddress,\n cumulativeGasUsed: toJson(this.cumulativeGasUsed),\n from: from14,\n gasPrice: toJson(this.gasPrice),\n blobGasUsed: toJson(this.blobGasUsed),\n blobGasPrice: toJson(this.blobGasPrice),\n gasUsed: toJson(this.gasUsed),\n hash: hash3,\n index: index2,\n logs,\n logsBloom,\n root,\n status,\n to\n };\n }\n /**\n * @_ignore:\n */\n get length() {\n return this.logs.length;\n }\n [Symbol.iterator]() {\n let index2 = 0;\n return {\n next: () => {\n if (index2 < this.length) {\n return { value: this.logs[index2++], done: false };\n }\n return { value: void 0, done: true };\n }\n };\n }\n /**\n * The total fee for this transaction, in wei.\n */\n get fee() {\n return this.gasUsed * this.gasPrice;\n }\n /**\n * Resolves to the block this transaction occurred in.\n */\n async getBlock() {\n const block = await this.provider.getBlock(this.blockHash);\n if (block == null) {\n throw new Error(\"TODO\");\n }\n return block;\n }\n /**\n * Resolves to the transaction this transaction occurred in.\n */\n async getTransaction() {\n const tx = await this.provider.getTransaction(this.hash);\n if (tx == null) {\n throw new Error(\"TODO\");\n }\n return tx;\n }\n /**\n * Resolves to the return value of the execution of this transaction.\n *\n * Support for this feature is limited, as it requires an archive node\n * with the ``debug_`` or ``trace_`` API enabled.\n */\n async getResult() {\n return await this.provider.getTransactionResult(this.hash);\n }\n /**\n * Resolves to the number of confirmations this transaction has.\n */\n async confirmations() {\n return await this.provider.getBlockNumber() - this.blockNumber + 1;\n }\n /**\n * @_ignore:\n */\n removedEvent() {\n return createRemovedTransactionFilter(this);\n }\n /**\n * @_ignore:\n */\n reorderedEvent(other) {\n (0, index_js_1.assert)(!other || other.isMined(), \"unmined 'other' transction cannot be orphaned\", \"UNSUPPORTED_OPERATION\", { operation: \"reorderedEvent(other)\" });\n return createReorderedTransactionFilter(this, other);\n }\n };\n exports3.TransactionReceipt = TransactionReceipt;\n var TransactionResponse = class _TransactionResponse {\n /**\n * The provider this is connected to, which will influence how its\n * methods will resolve its async inspection methods.\n */\n provider;\n /**\n * The block number of the block that this transaction was included in.\n *\n * This is ``null`` for pending transactions.\n */\n blockNumber;\n /**\n * The blockHash of the block that this transaction was included in.\n *\n * This is ``null`` for pending transactions.\n */\n blockHash;\n /**\n * The index within the block that this transaction resides at.\n */\n index;\n /**\n * The transaction hash.\n */\n hash;\n /**\n * The [[link-eip-2718]] transaction envelope type. This is\n * ``0`` for legacy transactions types.\n */\n type;\n /**\n * The receiver of this transaction.\n *\n * If ``null``, then the transaction is an initcode transaction.\n * This means the result of executing the [[data]] will be deployed\n * as a new contract on chain (assuming it does not revert) and the\n * address may be computed using [[getCreateAddress]].\n */\n to;\n /**\n * The sender of this transaction. It is implicitly computed\n * from the transaction pre-image hash (as the digest) and the\n * [[signature]] using ecrecover.\n */\n from;\n /**\n * The nonce, which is used to prevent replay attacks and offer\n * a method to ensure transactions from a given sender are explicitly\n * ordered.\n *\n * When sending a transaction, this must be equal to the number of\n * transactions ever sent by [[from]].\n */\n nonce;\n /**\n * The maximum units of gas this transaction can consume. If execution\n * exceeds this, the entries transaction is reverted and the sender\n * is charged for the full amount, despite not state changes being made.\n */\n gasLimit;\n /**\n * The gas price can have various values, depending on the network.\n *\n * In modern networks, for transactions that are included this is\n * the //effective gas price// (the fee per gas that was actually\n * charged), while for transactions that have not been included yet\n * is the [[maxFeePerGas]].\n *\n * For legacy transactions, or transactions on legacy networks, this\n * is the fee that will be charged per unit of gas the transaction\n * consumes.\n */\n gasPrice;\n /**\n * The maximum priority fee (per unit of gas) to allow a\n * validator to charge the sender. This is inclusive of the\n * [[maxFeeFeePerGas]].\n */\n maxPriorityFeePerGas;\n /**\n * The maximum fee (per unit of gas) to allow this transaction\n * to charge the sender.\n */\n maxFeePerGas;\n /**\n * The [[link-eip-4844]] max fee per BLOb gas.\n */\n maxFeePerBlobGas;\n /**\n * The data.\n */\n data;\n /**\n * The value, in wei. Use [[formatEther]] to format this value\n * as ether.\n */\n value;\n /**\n * The chain ID.\n */\n chainId;\n /**\n * The signature.\n */\n signature;\n /**\n * The [[link-eip-2930]] access list for transaction types that\n * support it, otherwise ``null``.\n */\n accessList;\n /**\n * The [[link-eip-4844]] BLOb versioned hashes.\n */\n blobVersionedHashes;\n /**\n * The [[link-eip-7702]] authorizations (if any).\n */\n authorizationList;\n #startBlock;\n /**\n * @_ignore:\n */\n constructor(tx, provider) {\n this.provider = provider;\n this.blockNumber = tx.blockNumber != null ? tx.blockNumber : null;\n this.blockHash = tx.blockHash != null ? tx.blockHash : null;\n this.hash = tx.hash;\n this.index = tx.index;\n this.type = tx.type;\n this.from = tx.from;\n this.to = tx.to || null;\n this.gasLimit = tx.gasLimit;\n this.nonce = tx.nonce;\n this.data = tx.data;\n this.value = tx.value;\n this.gasPrice = tx.gasPrice;\n this.maxPriorityFeePerGas = tx.maxPriorityFeePerGas != null ? tx.maxPriorityFeePerGas : null;\n this.maxFeePerGas = tx.maxFeePerGas != null ? tx.maxFeePerGas : null;\n this.maxFeePerBlobGas = tx.maxFeePerBlobGas != null ? tx.maxFeePerBlobGas : null;\n this.chainId = tx.chainId;\n this.signature = tx.signature;\n this.accessList = tx.accessList != null ? tx.accessList : null;\n this.blobVersionedHashes = tx.blobVersionedHashes != null ? tx.blobVersionedHashes : null;\n this.authorizationList = tx.authorizationList != null ? tx.authorizationList : null;\n this.#startBlock = -1;\n }\n /**\n * Returns a JSON-compatible representation of this transaction.\n */\n toJSON() {\n const { blockNumber, blockHash, index: index2, hash: hash3, type, to, from: from14, nonce, data, signature, accessList, blobVersionedHashes } = this;\n return {\n _type: \"TransactionResponse\",\n accessList,\n blockNumber,\n blockHash,\n blobVersionedHashes,\n chainId: toJson(this.chainId),\n data,\n from: from14,\n gasLimit: toJson(this.gasLimit),\n gasPrice: toJson(this.gasPrice),\n hash: hash3,\n maxFeePerGas: toJson(this.maxFeePerGas),\n maxPriorityFeePerGas: toJson(this.maxPriorityFeePerGas),\n maxFeePerBlobGas: toJson(this.maxFeePerBlobGas),\n nonce,\n signature,\n to,\n index: index2,\n type,\n value: toJson(this.value)\n };\n }\n /**\n * Resolves to the Block that this transaction was included in.\n *\n * This will return null if the transaction has not been included yet.\n */\n async getBlock() {\n let blockNumber = this.blockNumber;\n if (blockNumber == null) {\n const tx = await this.getTransaction();\n if (tx) {\n blockNumber = tx.blockNumber;\n }\n }\n if (blockNumber == null) {\n return null;\n }\n const block = this.provider.getBlock(blockNumber);\n if (block == null) {\n throw new Error(\"TODO\");\n }\n return block;\n }\n /**\n * Resolves to this transaction being re-requested from the\n * provider. This can be used if you have an unmined transaction\n * and wish to get an up-to-date populated instance.\n */\n async getTransaction() {\n return this.provider.getTransaction(this.hash);\n }\n /**\n * Resolve to the number of confirmations this transaction has.\n */\n async confirmations() {\n if (this.blockNumber == null) {\n const { tx, blockNumber: blockNumber2 } = await (0, index_js_1.resolveProperties)({\n tx: this.getTransaction(),\n blockNumber: this.provider.getBlockNumber()\n });\n if (tx == null || tx.blockNumber == null) {\n return 0;\n }\n return blockNumber2 - tx.blockNumber + 1;\n }\n const blockNumber = await this.provider.getBlockNumber();\n return blockNumber - this.blockNumber + 1;\n }\n /**\n * Resolves once this transaction has been mined and has\n * %%confirms%% blocks including it (default: ``1``) with an\n * optional %%timeout%%.\n *\n * This can resolve to ``null`` only if %%confirms%% is ``0``\n * and the transaction has not been mined, otherwise this will\n * wait until enough confirmations have completed.\n */\n async wait(_confirms, _timeout) {\n const confirms = _confirms == null ? 1 : _confirms;\n const timeout = _timeout == null ? 0 : _timeout;\n let startBlock = this.#startBlock;\n let nextScan = -1;\n let stopScanning = startBlock === -1 ? true : false;\n const checkReplacement = async () => {\n if (stopScanning) {\n return null;\n }\n const { blockNumber, nonce } = await (0, index_js_1.resolveProperties)({\n blockNumber: this.provider.getBlockNumber(),\n nonce: this.provider.getTransactionCount(this.from)\n });\n if (nonce < this.nonce) {\n startBlock = blockNumber;\n return;\n }\n if (stopScanning) {\n return null;\n }\n const mined = await this.getTransaction();\n if (mined && mined.blockNumber != null) {\n return;\n }\n if (nextScan === -1) {\n nextScan = startBlock - 3;\n if (nextScan < this.#startBlock) {\n nextScan = this.#startBlock;\n }\n }\n while (nextScan <= blockNumber) {\n if (stopScanning) {\n return null;\n }\n const block = await this.provider.getBlock(nextScan, true);\n if (block == null) {\n return;\n }\n for (const hash3 of block) {\n if (hash3 === this.hash) {\n return;\n }\n }\n for (let i3 = 0; i3 < block.length; i3++) {\n const tx = await block.getTransaction(i3);\n if (tx.from === this.from && tx.nonce === this.nonce) {\n if (stopScanning) {\n return null;\n }\n const receipt2 = await this.provider.getTransactionReceipt(tx.hash);\n if (receipt2 == null) {\n return;\n }\n if (blockNumber - receipt2.blockNumber + 1 < confirms) {\n return;\n }\n let reason = \"replaced\";\n if (tx.data === this.data && tx.to === this.to && tx.value === this.value) {\n reason = \"repriced\";\n } else if (tx.data === \"0x\" && tx.from === tx.to && tx.value === BN_0) {\n reason = \"cancelled\";\n }\n (0, index_js_1.assert)(false, \"transaction was replaced\", \"TRANSACTION_REPLACED\", {\n cancelled: reason === \"replaced\" || reason === \"cancelled\",\n reason,\n replacement: tx.replaceableTransaction(startBlock),\n hash: tx.hash,\n receipt: receipt2\n });\n }\n }\n nextScan++;\n }\n return;\n };\n const checkReceipt = (receipt2) => {\n if (receipt2 == null || receipt2.status !== 0) {\n return receipt2;\n }\n (0, index_js_1.assert)(false, \"transaction execution reverted\", \"CALL_EXCEPTION\", {\n action: \"sendTransaction\",\n data: null,\n reason: null,\n invocation: null,\n revert: null,\n transaction: {\n to: receipt2.to,\n from: receipt2.from,\n data: \"\"\n // @TODO: in v7, split out sendTransaction properties\n },\n receipt: receipt2\n });\n };\n const receipt = await this.provider.getTransactionReceipt(this.hash);\n if (confirms === 0) {\n return checkReceipt(receipt);\n }\n if (receipt) {\n if (confirms === 1 || await receipt.confirmations() >= confirms) {\n return checkReceipt(receipt);\n }\n } else {\n await checkReplacement();\n if (confirms === 0) {\n return null;\n }\n }\n const waiter = new Promise((resolve, reject) => {\n const cancellers = [];\n const cancel2 = () => {\n cancellers.forEach((c4) => c4());\n };\n cancellers.push(() => {\n stopScanning = true;\n });\n if (timeout > 0) {\n const timer = setTimeout(() => {\n cancel2();\n reject((0, index_js_1.makeError)(\"wait for transaction timeout\", \"TIMEOUT\"));\n }, timeout);\n cancellers.push(() => {\n clearTimeout(timer);\n });\n }\n const txListener = async (receipt2) => {\n if (await receipt2.confirmations() >= confirms) {\n cancel2();\n try {\n resolve(checkReceipt(receipt2));\n } catch (error) {\n reject(error);\n }\n }\n };\n cancellers.push(() => {\n this.provider.off(this.hash, txListener);\n });\n this.provider.on(this.hash, txListener);\n if (startBlock >= 0) {\n const replaceListener = async () => {\n try {\n await checkReplacement();\n } catch (error) {\n if ((0, index_js_1.isError)(error, \"TRANSACTION_REPLACED\")) {\n cancel2();\n reject(error);\n return;\n }\n }\n if (!stopScanning) {\n this.provider.once(\"block\", replaceListener);\n }\n };\n cancellers.push(() => {\n this.provider.off(\"block\", replaceListener);\n });\n this.provider.once(\"block\", replaceListener);\n }\n });\n return await waiter;\n }\n /**\n * Returns ``true`` if this transaction has been included.\n *\n * This is effective only as of the time the TransactionResponse\n * was instantiated. To get up-to-date information, use\n * [[getTransaction]].\n *\n * This provides a Type Guard that this transaction will have\n * non-null property values for properties that are null for\n * unmined transactions.\n */\n isMined() {\n return this.blockHash != null;\n }\n /**\n * Returns true if the transaction is a legacy (i.e. ``type == 0``)\n * transaction.\n *\n * This provides a Type Guard that this transaction will have\n * the ``null``-ness for hardfork-specific properties set correctly.\n */\n isLegacy() {\n return this.type === 0;\n }\n /**\n * Returns true if the transaction is a Berlin (i.e. ``type == 1``)\n * transaction. See [[link-eip-2070]].\n *\n * This provides a Type Guard that this transaction will have\n * the ``null``-ness for hardfork-specific properties set correctly.\n */\n isBerlin() {\n return this.type === 1;\n }\n /**\n * Returns true if the transaction is a London (i.e. ``type == 2``)\n * transaction. See [[link-eip-1559]].\n *\n * This provides a Type Guard that this transaction will have\n * the ``null``-ness for hardfork-specific properties set correctly.\n */\n isLondon() {\n return this.type === 2;\n }\n /**\n * Returns true if hte transaction is a Cancun (i.e. ``type == 3``)\n * transaction. See [[link-eip-4844]].\n */\n isCancun() {\n return this.type === 3;\n }\n /**\n * Returns a filter which can be used to listen for orphan events\n * that evict this transaction.\n */\n removedEvent() {\n (0, index_js_1.assert)(this.isMined(), \"unmined transaction canot be orphaned\", \"UNSUPPORTED_OPERATION\", { operation: \"removeEvent()\" });\n return createRemovedTransactionFilter(this);\n }\n /**\n * Returns a filter which can be used to listen for orphan events\n * that re-order this event against %%other%%.\n */\n reorderedEvent(other) {\n (0, index_js_1.assert)(this.isMined(), \"unmined transaction canot be orphaned\", \"UNSUPPORTED_OPERATION\", { operation: \"removeEvent()\" });\n (0, index_js_1.assert)(!other || other.isMined(), \"unmined 'other' transaction canot be orphaned\", \"UNSUPPORTED_OPERATION\", { operation: \"removeEvent()\" });\n return createReorderedTransactionFilter(this, other);\n }\n /**\n * Returns a new TransactionResponse instance which has the ability to\n * detect (and throw an error) if the transaction is replaced, which\n * will begin scanning at %%startBlock%%.\n *\n * This should generally not be used by developers and is intended\n * primarily for internal use. Setting an incorrect %%startBlock%% can\n * have devastating performance consequences if used incorrectly.\n */\n replaceableTransaction(startBlock) {\n (0, index_js_1.assertArgument)(Number.isInteger(startBlock) && startBlock >= 0, \"invalid startBlock\", \"startBlock\", startBlock);\n const tx = new _TransactionResponse(this, this.provider);\n tx.#startBlock = startBlock;\n return tx;\n }\n };\n exports3.TransactionResponse = TransactionResponse;\n function createOrphanedBlockFilter(block) {\n return { orphan: \"drop-block\", hash: block.hash, number: block.number };\n }\n function createReorderedTransactionFilter(tx, other) {\n return { orphan: \"reorder-transaction\", tx, other };\n }\n function createRemovedTransactionFilter(tx) {\n return { orphan: \"drop-transaction\", tx };\n }\n function createRemovedLogFilter(log) {\n return { orphan: \"drop-log\", log: {\n transactionHash: log.transactionHash,\n blockHash: log.blockHash,\n blockNumber: log.blockNumber,\n address: log.address,\n data: log.data,\n topics: Object.freeze(log.topics.slice()),\n index: log.index\n } };\n }\n }\n });\n\n // ../../../node_modules/.pnpm/ethers@6.15.0_bufferutil@4.0.9_utf-8-validate@5.0.10/node_modules/ethers/lib.commonjs/contract/wrappers.js\n var require_wrappers = __commonJS({\n \"../../../node_modules/.pnpm/ethers@6.15.0_bufferutil@4.0.9_utf-8-validate@5.0.10/node_modules/ethers/lib.commonjs/contract/wrappers.js\"(exports3) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n Object.defineProperty(exports3, \"__esModule\", { value: true });\n exports3.ContractEventPayload = exports3.ContractUnknownEventPayload = exports3.ContractTransactionResponse = exports3.ContractTransactionReceipt = exports3.UndecodedEventLog = exports3.EventLog = void 0;\n var provider_js_1 = require_provider();\n var index_js_1 = require_utils8();\n var EventLog = class extends provider_js_1.Log {\n /**\n * The Contract Interface.\n */\n interface;\n /**\n * The matching event.\n */\n fragment;\n /**\n * The parsed arguments passed to the event by ``emit``.\n */\n args;\n /**\n * @_ignore:\n */\n constructor(log, iface, fragment) {\n super(log, log.provider);\n const args = iface.decodeEventLog(fragment, log.data, log.topics);\n (0, index_js_1.defineProperties)(this, { args, fragment, interface: iface });\n }\n /**\n * The name of the event.\n */\n get eventName() {\n return this.fragment.name;\n }\n /**\n * The signature of the event.\n */\n get eventSignature() {\n return this.fragment.format();\n }\n };\n exports3.EventLog = EventLog;\n var UndecodedEventLog = class extends provider_js_1.Log {\n /**\n * The error encounted when trying to decode the log.\n */\n error;\n /**\n * @_ignore:\n */\n constructor(log, error) {\n super(log, log.provider);\n (0, index_js_1.defineProperties)(this, { error });\n }\n };\n exports3.UndecodedEventLog = UndecodedEventLog;\n var ContractTransactionReceipt = class extends provider_js_1.TransactionReceipt {\n #iface;\n /**\n * @_ignore:\n */\n constructor(iface, provider, tx) {\n super(tx, provider);\n this.#iface = iface;\n }\n /**\n * The parsed logs for any [[Log]] which has a matching event in the\n * Contract ABI.\n */\n get logs() {\n return super.logs.map((log) => {\n const fragment = log.topics.length ? this.#iface.getEvent(log.topics[0]) : null;\n if (fragment) {\n try {\n return new EventLog(log, this.#iface, fragment);\n } catch (error) {\n return new UndecodedEventLog(log, error);\n }\n }\n return log;\n });\n }\n };\n exports3.ContractTransactionReceipt = ContractTransactionReceipt;\n var ContractTransactionResponse = class extends provider_js_1.TransactionResponse {\n #iface;\n /**\n * @_ignore:\n */\n constructor(iface, provider, tx) {\n super(tx, provider);\n this.#iface = iface;\n }\n /**\n * Resolves once this transaction has been mined and has\n * %%confirms%% blocks including it (default: ``1``) with an\n * optional %%timeout%%.\n *\n * This can resolve to ``null`` only if %%confirms%% is ``0``\n * and the transaction has not been mined, otherwise this will\n * wait until enough confirmations have completed.\n */\n async wait(confirms, timeout) {\n const receipt = await super.wait(confirms, timeout);\n if (receipt == null) {\n return null;\n }\n return new ContractTransactionReceipt(this.#iface, this.provider, receipt);\n }\n };\n exports3.ContractTransactionResponse = ContractTransactionResponse;\n var ContractUnknownEventPayload = class extends index_js_1.EventPayload {\n /**\n * The log with no matching events.\n */\n log;\n /**\n * @_event:\n */\n constructor(contract, listener, filter, log) {\n super(contract, listener, filter);\n (0, index_js_1.defineProperties)(this, { log });\n }\n /**\n * Resolves to the block the event occured in.\n */\n async getBlock() {\n return await this.log.getBlock();\n }\n /**\n * Resolves to the transaction the event occured in.\n */\n async getTransaction() {\n return await this.log.getTransaction();\n }\n /**\n * Resolves to the transaction receipt the event occured in.\n */\n async getTransactionReceipt() {\n return await this.log.getTransactionReceipt();\n }\n };\n exports3.ContractUnknownEventPayload = ContractUnknownEventPayload;\n var ContractEventPayload = class extends ContractUnknownEventPayload {\n /**\n * @_ignore:\n */\n constructor(contract, listener, filter, fragment, _log) {\n super(contract, listener, filter, new EventLog(_log, contract.interface, fragment));\n const args = contract.interface.decodeEventLog(fragment, this.log.data, this.log.topics);\n (0, index_js_1.defineProperties)(this, { args, fragment });\n }\n /**\n * The event name.\n */\n get eventName() {\n return this.fragment.name;\n }\n /**\n * The event signature.\n */\n get eventSignature() {\n return this.fragment.format();\n }\n };\n exports3.ContractEventPayload = ContractEventPayload;\n }\n });\n\n // ../../../node_modules/.pnpm/ethers@6.15.0_bufferutil@4.0.9_utf-8-validate@5.0.10/node_modules/ethers/lib.commonjs/contract/contract.js\n var require_contract = __commonJS({\n \"../../../node_modules/.pnpm/ethers@6.15.0_bufferutil@4.0.9_utf-8-validate@5.0.10/node_modules/ethers/lib.commonjs/contract/contract.js\"(exports3) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n Object.defineProperty(exports3, \"__esModule\", { value: true });\n exports3.Contract = exports3.BaseContract = exports3.resolveArgs = exports3.copyOverrides = void 0;\n var index_js_1 = require_abi();\n var index_js_2 = require_address3();\n var provider_js_1 = require_provider();\n var index_js_3 = require_utils8();\n var wrappers_js_1 = require_wrappers();\n var BN_0 = BigInt(0);\n function canCall(value) {\n return value && typeof value.call === \"function\";\n }\n function canEstimate(value) {\n return value && typeof value.estimateGas === \"function\";\n }\n function canResolve(value) {\n return value && typeof value.resolveName === \"function\";\n }\n function canSend(value) {\n return value && typeof value.sendTransaction === \"function\";\n }\n function getResolver(value) {\n if (value != null) {\n if (canResolve(value)) {\n return value;\n }\n if (value.provider) {\n return value.provider;\n }\n }\n return void 0;\n }\n var PreparedTopicFilter = class {\n #filter;\n fragment;\n constructor(contract, fragment, args) {\n (0, index_js_3.defineProperties)(this, { fragment });\n if (fragment.inputs.length < args.length) {\n throw new Error(\"too many arguments\");\n }\n const runner = getRunner(contract.runner, \"resolveName\");\n const resolver = canResolve(runner) ? runner : null;\n this.#filter = async function() {\n const resolvedArgs = await Promise.all(fragment.inputs.map((param, index2) => {\n const arg = args[index2];\n if (arg == null) {\n return null;\n }\n return param.walkAsync(args[index2], (type, value) => {\n if (type === \"address\") {\n if (Array.isArray(value)) {\n return Promise.all(value.map((v2) => (0, index_js_2.resolveAddress)(v2, resolver)));\n }\n return (0, index_js_2.resolveAddress)(value, resolver);\n }\n return value;\n });\n }));\n return contract.interface.encodeFilterTopics(fragment, resolvedArgs);\n }();\n }\n getTopicFilter() {\n return this.#filter;\n }\n };\n function getRunner(value, feature) {\n if (value == null) {\n return null;\n }\n if (typeof value[feature] === \"function\") {\n return value;\n }\n if (value.provider && typeof value.provider[feature] === \"function\") {\n return value.provider;\n }\n return null;\n }\n function getProvider(value) {\n if (value == null) {\n return null;\n }\n return value.provider || null;\n }\n async function copyOverrides(arg, allowed) {\n const _overrides = index_js_1.Typed.dereference(arg, \"overrides\");\n (0, index_js_3.assertArgument)(typeof _overrides === \"object\", \"invalid overrides parameter\", \"overrides\", arg);\n const overrides = (0, provider_js_1.copyRequest)(_overrides);\n (0, index_js_3.assertArgument)(overrides.to == null || (allowed || []).indexOf(\"to\") >= 0, \"cannot override to\", \"overrides.to\", overrides.to);\n (0, index_js_3.assertArgument)(overrides.data == null || (allowed || []).indexOf(\"data\") >= 0, \"cannot override data\", \"overrides.data\", overrides.data);\n if (overrides.from) {\n overrides.from = overrides.from;\n }\n return overrides;\n }\n exports3.copyOverrides = copyOverrides;\n async function resolveArgs(_runner, inputs, args) {\n const runner = getRunner(_runner, \"resolveName\");\n const resolver = canResolve(runner) ? runner : null;\n return await Promise.all(inputs.map((param, index2) => {\n return param.walkAsync(args[index2], (type, value) => {\n value = index_js_1.Typed.dereference(value, type);\n if (type === \"address\") {\n return (0, index_js_2.resolveAddress)(value, resolver);\n }\n return value;\n });\n }));\n }\n exports3.resolveArgs = resolveArgs;\n function buildWrappedFallback(contract) {\n const populateTransaction2 = async function(overrides) {\n const tx = await copyOverrides(overrides, [\"data\"]);\n tx.to = await contract.getAddress();\n if (tx.from) {\n tx.from = await (0, index_js_2.resolveAddress)(tx.from, getResolver(contract.runner));\n }\n const iface = contract.interface;\n const noValue = (0, index_js_3.getBigInt)(tx.value || BN_0, \"overrides.value\") === BN_0;\n const noData = (tx.data || \"0x\") === \"0x\";\n if (iface.fallback && !iface.fallback.payable && iface.receive && !noData && !noValue) {\n (0, index_js_3.assertArgument)(false, \"cannot send data to receive or send value to non-payable fallback\", \"overrides\", overrides);\n }\n (0, index_js_3.assertArgument)(iface.fallback || noData, \"cannot send data to receive-only contract\", \"overrides.data\", tx.data);\n const payable = iface.receive || iface.fallback && iface.fallback.payable;\n (0, index_js_3.assertArgument)(payable || noValue, \"cannot send value to non-payable fallback\", \"overrides.value\", tx.value);\n (0, index_js_3.assertArgument)(iface.fallback || noData, \"cannot send data to receive-only contract\", \"overrides.data\", tx.data);\n return tx;\n };\n const staticCall = async function(overrides) {\n const runner = getRunner(contract.runner, \"call\");\n (0, index_js_3.assert)(canCall(runner), \"contract runner does not support calling\", \"UNSUPPORTED_OPERATION\", { operation: \"call\" });\n const tx = await populateTransaction2(overrides);\n try {\n return await runner.call(tx);\n } catch (error) {\n if ((0, index_js_3.isCallException)(error) && error.data) {\n throw contract.interface.makeError(error.data, tx);\n }\n throw error;\n }\n };\n const send = async function(overrides) {\n const runner = contract.runner;\n (0, index_js_3.assert)(canSend(runner), \"contract runner does not support sending transactions\", \"UNSUPPORTED_OPERATION\", { operation: \"sendTransaction\" });\n const tx = await runner.sendTransaction(await populateTransaction2(overrides));\n const provider = getProvider(contract.runner);\n return new wrappers_js_1.ContractTransactionResponse(contract.interface, provider, tx);\n };\n const estimateGas2 = async function(overrides) {\n const runner = getRunner(contract.runner, \"estimateGas\");\n (0, index_js_3.assert)(canEstimate(runner), \"contract runner does not support gas estimation\", \"UNSUPPORTED_OPERATION\", { operation: \"estimateGas\" });\n return await runner.estimateGas(await populateTransaction2(overrides));\n };\n const method = async (overrides) => {\n return await send(overrides);\n };\n (0, index_js_3.defineProperties)(method, {\n _contract: contract,\n estimateGas: estimateGas2,\n populateTransaction: populateTransaction2,\n send,\n staticCall\n });\n return method;\n }\n function buildWrappedMethod(contract, key) {\n const getFragment = function(...args) {\n const fragment = contract.interface.getFunction(key, args);\n (0, index_js_3.assert)(fragment, \"no matching fragment\", \"UNSUPPORTED_OPERATION\", {\n operation: \"fragment\",\n info: { key, args }\n });\n return fragment;\n };\n const populateTransaction2 = async function(...args) {\n const fragment = getFragment(...args);\n let overrides = {};\n if (fragment.inputs.length + 1 === args.length) {\n overrides = await copyOverrides(args.pop());\n if (overrides.from) {\n overrides.from = await (0, index_js_2.resolveAddress)(overrides.from, getResolver(contract.runner));\n }\n }\n if (fragment.inputs.length !== args.length) {\n throw new Error(\"internal error: fragment inputs doesn't match arguments; should not happen\");\n }\n const resolvedArgs = await resolveArgs(contract.runner, fragment.inputs, args);\n return Object.assign({}, overrides, await (0, index_js_3.resolveProperties)({\n to: contract.getAddress(),\n data: contract.interface.encodeFunctionData(fragment, resolvedArgs)\n }));\n };\n const staticCall = async function(...args) {\n const result = await staticCallResult(...args);\n if (result.length === 1) {\n return result[0];\n }\n return result;\n };\n const send = async function(...args) {\n const runner = contract.runner;\n (0, index_js_3.assert)(canSend(runner), \"contract runner does not support sending transactions\", \"UNSUPPORTED_OPERATION\", { operation: \"sendTransaction\" });\n const tx = await runner.sendTransaction(await populateTransaction2(...args));\n const provider = getProvider(contract.runner);\n return new wrappers_js_1.ContractTransactionResponse(contract.interface, provider, tx);\n };\n const estimateGas2 = async function(...args) {\n const runner = getRunner(contract.runner, \"estimateGas\");\n (0, index_js_3.assert)(canEstimate(runner), \"contract runner does not support gas estimation\", \"UNSUPPORTED_OPERATION\", { operation: \"estimateGas\" });\n return await runner.estimateGas(await populateTransaction2(...args));\n };\n const staticCallResult = async function(...args) {\n const runner = getRunner(contract.runner, \"call\");\n (0, index_js_3.assert)(canCall(runner), \"contract runner does not support calling\", \"UNSUPPORTED_OPERATION\", { operation: \"call\" });\n const tx = await populateTransaction2(...args);\n let result = \"0x\";\n try {\n result = await runner.call(tx);\n } catch (error) {\n if ((0, index_js_3.isCallException)(error) && error.data) {\n throw contract.interface.makeError(error.data, tx);\n }\n throw error;\n }\n const fragment = getFragment(...args);\n return contract.interface.decodeFunctionResult(fragment, result);\n };\n const method = async (...args) => {\n const fragment = getFragment(...args);\n if (fragment.constant) {\n return await staticCall(...args);\n }\n return await send(...args);\n };\n (0, index_js_3.defineProperties)(method, {\n name: contract.interface.getFunctionName(key),\n _contract: contract,\n _key: key,\n getFragment,\n estimateGas: estimateGas2,\n populateTransaction: populateTransaction2,\n send,\n staticCall,\n staticCallResult\n });\n Object.defineProperty(method, \"fragment\", {\n configurable: false,\n enumerable: true,\n get: () => {\n const fragment = contract.interface.getFunction(key);\n (0, index_js_3.assert)(fragment, \"no matching fragment\", \"UNSUPPORTED_OPERATION\", {\n operation: \"fragment\",\n info: { key }\n });\n return fragment;\n }\n });\n return method;\n }\n function buildWrappedEvent(contract, key) {\n const getFragment = function(...args) {\n const fragment = contract.interface.getEvent(key, args);\n (0, index_js_3.assert)(fragment, \"no matching fragment\", \"UNSUPPORTED_OPERATION\", {\n operation: \"fragment\",\n info: { key, args }\n });\n return fragment;\n };\n const method = function(...args) {\n return new PreparedTopicFilter(contract, getFragment(...args), args);\n };\n (0, index_js_3.defineProperties)(method, {\n name: contract.interface.getEventName(key),\n _contract: contract,\n _key: key,\n getFragment\n });\n Object.defineProperty(method, \"fragment\", {\n configurable: false,\n enumerable: true,\n get: () => {\n const fragment = contract.interface.getEvent(key);\n (0, index_js_3.assert)(fragment, \"no matching fragment\", \"UNSUPPORTED_OPERATION\", {\n operation: \"fragment\",\n info: { key }\n });\n return fragment;\n }\n });\n return method;\n }\n var internal = Symbol.for(\"_ethersInternal_contract\");\n var internalValues = /* @__PURE__ */ new WeakMap();\n function setInternal(contract, values) {\n internalValues.set(contract[internal], values);\n }\n function getInternal(contract) {\n return internalValues.get(contract[internal]);\n }\n function isDeferred(value) {\n return value && typeof value === \"object\" && \"getTopicFilter\" in value && typeof value.getTopicFilter === \"function\" && value.fragment;\n }\n async function getSubInfo(contract, event) {\n let topics;\n let fragment = null;\n if (Array.isArray(event)) {\n const topicHashify = function(name) {\n if ((0, index_js_3.isHexString)(name, 32)) {\n return name;\n }\n const fragment2 = contract.interface.getEvent(name);\n (0, index_js_3.assertArgument)(fragment2, \"unknown fragment\", \"name\", name);\n return fragment2.topicHash;\n };\n topics = event.map((e3) => {\n if (e3 == null) {\n return null;\n }\n if (Array.isArray(e3)) {\n return e3.map(topicHashify);\n }\n return topicHashify(e3);\n });\n } else if (event === \"*\") {\n topics = [null];\n } else if (typeof event === \"string\") {\n if ((0, index_js_3.isHexString)(event, 32)) {\n topics = [event];\n } else {\n fragment = contract.interface.getEvent(event);\n (0, index_js_3.assertArgument)(fragment, \"unknown fragment\", \"event\", event);\n topics = [fragment.topicHash];\n }\n } else if (isDeferred(event)) {\n topics = await event.getTopicFilter();\n } else if (\"fragment\" in event) {\n fragment = event.fragment;\n topics = [fragment.topicHash];\n } else {\n (0, index_js_3.assertArgument)(false, \"unknown event name\", \"event\", event);\n }\n topics = topics.map((t3) => {\n if (t3 == null) {\n return null;\n }\n if (Array.isArray(t3)) {\n const items = Array.from(new Set(t3.map((t4) => t4.toLowerCase())).values());\n if (items.length === 1) {\n return items[0];\n }\n items.sort();\n return items;\n }\n return t3.toLowerCase();\n });\n const tag = topics.map((t3) => {\n if (t3 == null) {\n return \"null\";\n }\n if (Array.isArray(t3)) {\n return t3.join(\"|\");\n }\n return t3;\n }).join(\"&\");\n return { fragment, tag, topics };\n }\n async function hasSub(contract, event) {\n const { subs } = getInternal(contract);\n return subs.get((await getSubInfo(contract, event)).tag) || null;\n }\n async function getSub(contract, operation, event) {\n const provider = getProvider(contract.runner);\n (0, index_js_3.assert)(provider, \"contract runner does not support subscribing\", \"UNSUPPORTED_OPERATION\", { operation });\n const { fragment, tag, topics } = await getSubInfo(contract, event);\n const { addr, subs } = getInternal(contract);\n let sub = subs.get(tag);\n if (!sub) {\n const address = addr ? addr : contract;\n const filter = { address, topics };\n const listener = (log) => {\n let foundFragment = fragment;\n if (foundFragment == null) {\n try {\n foundFragment = contract.interface.getEvent(log.topics[0]);\n } catch (error) {\n }\n }\n if (foundFragment) {\n const _foundFragment = foundFragment;\n const args = fragment ? contract.interface.decodeEventLog(fragment, log.data, log.topics) : [];\n emit2(contract, event, args, (listener2) => {\n return new wrappers_js_1.ContractEventPayload(contract, listener2, event, _foundFragment, log);\n });\n } else {\n emit2(contract, event, [], (listener2) => {\n return new wrappers_js_1.ContractUnknownEventPayload(contract, listener2, event, log);\n });\n }\n };\n let starting = [];\n const start = () => {\n if (starting.length) {\n return;\n }\n starting.push(provider.on(filter, listener));\n };\n const stop = async () => {\n if (starting.length == 0) {\n return;\n }\n let started = starting;\n starting = [];\n await Promise.all(started);\n provider.off(filter, listener);\n };\n sub = { tag, listeners: [], start, stop };\n subs.set(tag, sub);\n }\n return sub;\n }\n var lastEmit = Promise.resolve();\n async function _emit(contract, event, args, payloadFunc) {\n await lastEmit;\n const sub = await hasSub(contract, event);\n if (!sub) {\n return false;\n }\n const count = sub.listeners.length;\n sub.listeners = sub.listeners.filter(({ listener, once: once2 }) => {\n const passArgs = Array.from(args);\n if (payloadFunc) {\n passArgs.push(payloadFunc(once2 ? null : listener));\n }\n try {\n listener.call(contract, ...passArgs);\n } catch (error) {\n }\n return !once2;\n });\n if (sub.listeners.length === 0) {\n sub.stop();\n getInternal(contract).subs.delete(sub.tag);\n }\n return count > 0;\n }\n async function emit2(contract, event, args, payloadFunc) {\n try {\n await lastEmit;\n } catch (error) {\n }\n const resultPromise = _emit(contract, event, args, payloadFunc);\n lastEmit = resultPromise;\n return await resultPromise;\n }\n var passProperties = [\"then\"];\n var BaseContract = class _BaseContract {\n /**\n * The target to connect to.\n *\n * This can be an address, ENS name or any [[Addressable]], such as\n * another contract. To get the resovled address, use the ``getAddress``\n * method.\n */\n target;\n /**\n * The contract Interface.\n */\n interface;\n /**\n * The connected runner. This is generally a [[Provider]] or a\n * [[Signer]], which dictates what operations are supported.\n *\n * For example, a **Contract** connected to a [[Provider]] may\n * only execute read-only operations.\n */\n runner;\n /**\n * All the Events available on this contract.\n */\n filters;\n /**\n * @_ignore:\n */\n [internal];\n /**\n * The fallback or receive function if any.\n */\n fallback;\n /**\n * Creates a new contract connected to %%target%% with the %%abi%% and\n * optionally connected to a %%runner%% to perform operations on behalf\n * of.\n */\n constructor(target, abi2, runner, _deployTx) {\n (0, index_js_3.assertArgument)(typeof target === \"string\" || (0, index_js_2.isAddressable)(target), \"invalid value for Contract target\", \"target\", target);\n if (runner == null) {\n runner = null;\n }\n const iface = index_js_1.Interface.from(abi2);\n (0, index_js_3.defineProperties)(this, { target, runner, interface: iface });\n Object.defineProperty(this, internal, { value: {} });\n let addrPromise;\n let addr = null;\n let deployTx = null;\n if (_deployTx) {\n const provider = getProvider(runner);\n deployTx = new wrappers_js_1.ContractTransactionResponse(this.interface, provider, _deployTx);\n }\n let subs = /* @__PURE__ */ new Map();\n if (typeof target === \"string\") {\n if ((0, index_js_3.isHexString)(target)) {\n addr = target;\n addrPromise = Promise.resolve(target);\n } else {\n const resolver = getRunner(runner, \"resolveName\");\n if (!canResolve(resolver)) {\n throw (0, index_js_3.makeError)(\"contract runner does not support name resolution\", \"UNSUPPORTED_OPERATION\", {\n operation: \"resolveName\"\n });\n }\n addrPromise = resolver.resolveName(target).then((addr2) => {\n if (addr2 == null) {\n throw (0, index_js_3.makeError)(\"an ENS name used for a contract target must be correctly configured\", \"UNCONFIGURED_NAME\", {\n value: target\n });\n }\n getInternal(this).addr = addr2;\n return addr2;\n });\n }\n } else {\n addrPromise = target.getAddress().then((addr2) => {\n if (addr2 == null) {\n throw new Error(\"TODO\");\n }\n getInternal(this).addr = addr2;\n return addr2;\n });\n }\n setInternal(this, { addrPromise, addr, deployTx, subs });\n const filters = new Proxy({}, {\n get: (target2, prop, receiver) => {\n if (typeof prop === \"symbol\" || passProperties.indexOf(prop) >= 0) {\n return Reflect.get(target2, prop, receiver);\n }\n try {\n return this.getEvent(prop);\n } catch (error) {\n if (!(0, index_js_3.isError)(error, \"INVALID_ARGUMENT\") || error.argument !== \"key\") {\n throw error;\n }\n }\n return void 0;\n },\n has: (target2, prop) => {\n if (passProperties.indexOf(prop) >= 0) {\n return Reflect.has(target2, prop);\n }\n return Reflect.has(target2, prop) || this.interface.hasEvent(String(prop));\n }\n });\n (0, index_js_3.defineProperties)(this, { filters });\n (0, index_js_3.defineProperties)(this, {\n fallback: iface.receive || iface.fallback ? buildWrappedFallback(this) : null\n });\n return new Proxy(this, {\n get: (target2, prop, receiver) => {\n if (typeof prop === \"symbol\" || prop in target2 || passProperties.indexOf(prop) >= 0) {\n return Reflect.get(target2, prop, receiver);\n }\n try {\n return target2.getFunction(prop);\n } catch (error) {\n if (!(0, index_js_3.isError)(error, \"INVALID_ARGUMENT\") || error.argument !== \"key\") {\n throw error;\n }\n }\n return void 0;\n },\n has: (target2, prop) => {\n if (typeof prop === \"symbol\" || prop in target2 || passProperties.indexOf(prop) >= 0) {\n return Reflect.has(target2, prop);\n }\n return target2.interface.hasFunction(prop);\n }\n });\n }\n /**\n * Return a new Contract instance with the same target and ABI, but\n * a different %%runner%%.\n */\n connect(runner) {\n return new _BaseContract(this.target, this.interface, runner);\n }\n /**\n * Return a new Contract instance with the same ABI and runner, but\n * a different %%target%%.\n */\n attach(target) {\n return new _BaseContract(target, this.interface, this.runner);\n }\n /**\n * Return the resolved address of this Contract.\n */\n async getAddress() {\n return await getInternal(this).addrPromise;\n }\n /**\n * Return the deployed bytecode or null if no bytecode is found.\n */\n async getDeployedCode() {\n const provider = getProvider(this.runner);\n (0, index_js_3.assert)(provider, \"runner does not support .provider\", \"UNSUPPORTED_OPERATION\", { operation: \"getDeployedCode\" });\n const code = await provider.getCode(await this.getAddress());\n if (code === \"0x\") {\n return null;\n }\n return code;\n }\n /**\n * Resolve to this Contract once the bytecode has been deployed, or\n * resolve immediately if already deployed.\n */\n async waitForDeployment() {\n const deployTx = this.deploymentTransaction();\n if (deployTx) {\n await deployTx.wait();\n return this;\n }\n const code = await this.getDeployedCode();\n if (code != null) {\n return this;\n }\n const provider = getProvider(this.runner);\n (0, index_js_3.assert)(provider != null, \"contract runner does not support .provider\", \"UNSUPPORTED_OPERATION\", { operation: \"waitForDeployment\" });\n return new Promise((resolve, reject) => {\n const checkCode = async () => {\n try {\n const code2 = await this.getDeployedCode();\n if (code2 != null) {\n return resolve(this);\n }\n provider.once(\"block\", checkCode);\n } catch (error) {\n reject(error);\n }\n };\n checkCode();\n });\n }\n /**\n * Return the transaction used to deploy this contract.\n *\n * This is only available if this instance was returned from a\n * [[ContractFactory]].\n */\n deploymentTransaction() {\n return getInternal(this).deployTx;\n }\n /**\n * Return the function for a given name. This is useful when a contract\n * method name conflicts with a JavaScript name such as ``prototype`` or\n * when using a Contract programatically.\n */\n getFunction(key) {\n if (typeof key !== \"string\") {\n key = key.format();\n }\n const func = buildWrappedMethod(this, key);\n return func;\n }\n /**\n * Return the event for a given name. This is useful when a contract\n * event name conflicts with a JavaScript name such as ``prototype`` or\n * when using a Contract programatically.\n */\n getEvent(key) {\n if (typeof key !== \"string\") {\n key = key.format();\n }\n return buildWrappedEvent(this, key);\n }\n /**\n * @_ignore:\n */\n async queryTransaction(hash3) {\n throw new Error(\"@TODO\");\n }\n /*\n // @TODO: this is a non-backwards compatible change, but will be added\n // in v7 and in a potential SmartContract class in an upcoming\n // v6 release\n async getTransactionReceipt(hash: string): Promise {\n const provider = getProvider(this.runner);\n assert(provider, \"contract runner does not have a provider\",\n \"UNSUPPORTED_OPERATION\", { operation: \"queryTransaction\" });\n \n const receipt = await provider.getTransactionReceipt(hash);\n if (receipt == null) { return null; }\n \n return new ContractTransactionReceipt(this.interface, provider, receipt);\n }\n */\n /**\n * Provide historic access to event data for %%event%% in the range\n * %%fromBlock%% (default: ``0``) to %%toBlock%% (default: ``\"latest\"``)\n * inclusive.\n */\n async queryFilter(event, fromBlock, toBlock) {\n if (fromBlock == null) {\n fromBlock = 0;\n }\n if (toBlock == null) {\n toBlock = \"latest\";\n }\n const { addr, addrPromise } = getInternal(this);\n const address = addr ? addr : await addrPromise;\n const { fragment, topics } = await getSubInfo(this, event);\n const filter = { address, topics, fromBlock, toBlock };\n const provider = getProvider(this.runner);\n (0, index_js_3.assert)(provider, \"contract runner does not have a provider\", \"UNSUPPORTED_OPERATION\", { operation: \"queryFilter\" });\n return (await provider.getLogs(filter)).map((log) => {\n let foundFragment = fragment;\n if (foundFragment == null) {\n try {\n foundFragment = this.interface.getEvent(log.topics[0]);\n } catch (error) {\n }\n }\n if (foundFragment) {\n try {\n return new wrappers_js_1.EventLog(log, this.interface, foundFragment);\n } catch (error) {\n return new wrappers_js_1.UndecodedEventLog(log, error);\n }\n }\n return new provider_js_1.Log(log, provider);\n });\n }\n /**\n * Add an event %%listener%% for the %%event%%.\n */\n async on(event, listener) {\n const sub = await getSub(this, \"on\", event);\n sub.listeners.push({ listener, once: false });\n sub.start();\n return this;\n }\n /**\n * Add an event %%listener%% for the %%event%%, but remove the listener\n * after it is fired once.\n */\n async once(event, listener) {\n const sub = await getSub(this, \"once\", event);\n sub.listeners.push({ listener, once: true });\n sub.start();\n return this;\n }\n /**\n * Emit an %%event%% calling all listeners with %%args%%.\n *\n * Resolves to ``true`` if any listeners were called.\n */\n async emit(event, ...args) {\n return await emit2(this, event, args, null);\n }\n /**\n * Resolves to the number of listeners of %%event%% or the total number\n * of listeners if unspecified.\n */\n async listenerCount(event) {\n if (event) {\n const sub = await hasSub(this, event);\n if (!sub) {\n return 0;\n }\n return sub.listeners.length;\n }\n const { subs } = getInternal(this);\n let total = 0;\n for (const { listeners: listeners2 } of subs.values()) {\n total += listeners2.length;\n }\n return total;\n }\n /**\n * Resolves to the listeners subscribed to %%event%% or all listeners\n * if unspecified.\n */\n async listeners(event) {\n if (event) {\n const sub = await hasSub(this, event);\n if (!sub) {\n return [];\n }\n return sub.listeners.map(({ listener }) => listener);\n }\n const { subs } = getInternal(this);\n let result = [];\n for (const { listeners: listeners2 } of subs.values()) {\n result = result.concat(listeners2.map(({ listener }) => listener));\n }\n return result;\n }\n /**\n * Remove the %%listener%% from the listeners for %%event%% or remove\n * all listeners if unspecified.\n */\n async off(event, listener) {\n const sub = await hasSub(this, event);\n if (!sub) {\n return this;\n }\n if (listener) {\n const index2 = sub.listeners.map(({ listener: listener2 }) => listener2).indexOf(listener);\n if (index2 >= 0) {\n sub.listeners.splice(index2, 1);\n }\n }\n if (listener == null || sub.listeners.length === 0) {\n sub.stop();\n getInternal(this).subs.delete(sub.tag);\n }\n return this;\n }\n /**\n * Remove all the listeners for %%event%% or remove all listeners if\n * unspecified.\n */\n async removeAllListeners(event) {\n if (event) {\n const sub = await hasSub(this, event);\n if (!sub) {\n return this;\n }\n sub.stop();\n getInternal(this).subs.delete(sub.tag);\n } else {\n const { subs } = getInternal(this);\n for (const { tag, stop } of subs.values()) {\n stop();\n subs.delete(tag);\n }\n }\n return this;\n }\n /**\n * Alias for [on].\n */\n async addListener(event, listener) {\n return await this.on(event, listener);\n }\n /**\n * Alias for [off].\n */\n async removeListener(event, listener) {\n return await this.off(event, listener);\n }\n /**\n * Create a new Class for the %%abi%%.\n */\n static buildClass(abi2) {\n class CustomContract extends _BaseContract {\n constructor(address, runner = null) {\n super(address, abi2, runner);\n }\n }\n return CustomContract;\n }\n /**\n * Create a new BaseContract with a specified Interface.\n */\n static from(target, abi2, runner) {\n if (runner == null) {\n runner = null;\n }\n const contract = new this(target, abi2, runner);\n return contract;\n }\n };\n exports3.BaseContract = BaseContract;\n function _ContractBase() {\n return BaseContract;\n }\n var Contract = class extends _ContractBase() {\n };\n exports3.Contract = Contract;\n }\n });\n\n // ../../../node_modules/.pnpm/ethers@6.15.0_bufferutil@4.0.9_utf-8-validate@5.0.10/node_modules/ethers/lib.commonjs/contract/factory.js\n var require_factory = __commonJS({\n \"../../../node_modules/.pnpm/ethers@6.15.0_bufferutil@4.0.9_utf-8-validate@5.0.10/node_modules/ethers/lib.commonjs/contract/factory.js\"(exports3) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n Object.defineProperty(exports3, \"__esModule\", { value: true });\n exports3.ContractFactory = void 0;\n var index_js_1 = require_abi();\n var index_js_2 = require_address3();\n var index_js_3 = require_utils8();\n var contract_js_1 = require_contract();\n var ContractFactory = class _ContractFactory {\n /**\n * The Contract Interface.\n */\n interface;\n /**\n * The Contract deployment bytecode. Often called the initcode.\n */\n bytecode;\n /**\n * The ContractRunner to deploy the Contract as.\n */\n runner;\n /**\n * Create a new **ContractFactory** with %%abi%% and %%bytecode%%,\n * optionally connected to %%runner%%.\n *\n * The %%bytecode%% may be the ``bytecode`` property within the\n * standard Solidity JSON output.\n */\n constructor(abi2, bytecode, runner) {\n const iface = index_js_1.Interface.from(abi2);\n if (bytecode instanceof Uint8Array) {\n bytecode = (0, index_js_3.hexlify)((0, index_js_3.getBytes)(bytecode));\n } else {\n if (typeof bytecode === \"object\") {\n bytecode = bytecode.object;\n }\n if (!bytecode.startsWith(\"0x\")) {\n bytecode = \"0x\" + bytecode;\n }\n bytecode = (0, index_js_3.hexlify)((0, index_js_3.getBytes)(bytecode));\n }\n (0, index_js_3.defineProperties)(this, {\n bytecode,\n interface: iface,\n runner: runner || null\n });\n }\n attach(target) {\n return new contract_js_1.BaseContract(target, this.interface, this.runner);\n }\n /**\n * Resolves to the transaction to deploy the contract, passing %%args%%\n * into the constructor.\n */\n async getDeployTransaction(...args) {\n let overrides = {};\n const fragment = this.interface.deploy;\n if (fragment.inputs.length + 1 === args.length) {\n overrides = await (0, contract_js_1.copyOverrides)(args.pop());\n }\n if (fragment.inputs.length !== args.length) {\n throw new Error(\"incorrect number of arguments to constructor\");\n }\n const resolvedArgs = await (0, contract_js_1.resolveArgs)(this.runner, fragment.inputs, args);\n const data = (0, index_js_3.concat)([this.bytecode, this.interface.encodeDeploy(resolvedArgs)]);\n return Object.assign({}, overrides, { data });\n }\n /**\n * Resolves to the Contract deployed by passing %%args%% into the\n * constructor.\n *\n * This will resolve to the Contract before it has been deployed to the\n * network, so the [[BaseContract-waitForDeployment]] should be used before\n * sending any transactions to it.\n */\n async deploy(...args) {\n const tx = await this.getDeployTransaction(...args);\n (0, index_js_3.assert)(this.runner && typeof this.runner.sendTransaction === \"function\", \"factory runner does not support sending transactions\", \"UNSUPPORTED_OPERATION\", {\n operation: \"sendTransaction\"\n });\n const sentTx = await this.runner.sendTransaction(tx);\n const address = (0, index_js_2.getCreateAddress)(sentTx);\n return new contract_js_1.BaseContract(address, this.interface, this.runner, sentTx);\n }\n /**\n * Return a new **ContractFactory** with the same ABI and bytecode,\n * but connected to %%runner%%.\n */\n connect(runner) {\n return new _ContractFactory(this.interface, this.bytecode, runner);\n }\n /**\n * Create a new **ContractFactory** from the standard Solidity JSON output.\n */\n static fromSolidity(output, runner) {\n (0, index_js_3.assertArgument)(output != null, \"bad compiler output\", \"output\", output);\n if (typeof output === \"string\") {\n output = JSON.parse(output);\n }\n const abi2 = output.abi;\n let bytecode = \"\";\n if (output.bytecode) {\n bytecode = output.bytecode;\n } else if (output.evm && output.evm.bytecode) {\n bytecode = output.evm.bytecode;\n }\n return new this(abi2, bytecode, runner);\n }\n };\n exports3.ContractFactory = ContractFactory;\n }\n });\n\n // ../../../node_modules/.pnpm/ethers@6.15.0_bufferutil@4.0.9_utf-8-validate@5.0.10/node_modules/ethers/lib.commonjs/contract/index.js\n var require_contract2 = __commonJS({\n \"../../../node_modules/.pnpm/ethers@6.15.0_bufferutil@4.0.9_utf-8-validate@5.0.10/node_modules/ethers/lib.commonjs/contract/index.js\"(exports3) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n Object.defineProperty(exports3, \"__esModule\", { value: true });\n exports3.UndecodedEventLog = exports3.EventLog = exports3.ContractTransactionResponse = exports3.ContractTransactionReceipt = exports3.ContractUnknownEventPayload = exports3.ContractEventPayload = exports3.ContractFactory = exports3.Contract = exports3.BaseContract = void 0;\n var contract_js_1 = require_contract();\n Object.defineProperty(exports3, \"BaseContract\", { enumerable: true, get: function() {\n return contract_js_1.BaseContract;\n } });\n Object.defineProperty(exports3, \"Contract\", { enumerable: true, get: function() {\n return contract_js_1.Contract;\n } });\n var factory_js_1 = require_factory();\n Object.defineProperty(exports3, \"ContractFactory\", { enumerable: true, get: function() {\n return factory_js_1.ContractFactory;\n } });\n var wrappers_js_1 = require_wrappers();\n Object.defineProperty(exports3, \"ContractEventPayload\", { enumerable: true, get: function() {\n return wrappers_js_1.ContractEventPayload;\n } });\n Object.defineProperty(exports3, \"ContractUnknownEventPayload\", { enumerable: true, get: function() {\n return wrappers_js_1.ContractUnknownEventPayload;\n } });\n Object.defineProperty(exports3, \"ContractTransactionReceipt\", { enumerable: true, get: function() {\n return wrappers_js_1.ContractTransactionReceipt;\n } });\n Object.defineProperty(exports3, \"ContractTransactionResponse\", { enumerable: true, get: function() {\n return wrappers_js_1.ContractTransactionResponse;\n } });\n Object.defineProperty(exports3, \"EventLog\", { enumerable: true, get: function() {\n return wrappers_js_1.EventLog;\n } });\n Object.defineProperty(exports3, \"UndecodedEventLog\", { enumerable: true, get: function() {\n return wrappers_js_1.UndecodedEventLog;\n } });\n }\n });\n\n // ../../../node_modules/.pnpm/ethers@6.15.0_bufferutil@4.0.9_utf-8-validate@5.0.10/node_modules/ethers/lib.commonjs/providers/ens-resolver.js\n var require_ens_resolver = __commonJS({\n \"../../../node_modules/.pnpm/ethers@6.15.0_bufferutil@4.0.9_utf-8-validate@5.0.10/node_modules/ethers/lib.commonjs/providers/ens-resolver.js\"(exports3) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n Object.defineProperty(exports3, \"__esModule\", { value: true });\n exports3.EnsResolver = exports3.BasicMulticoinProviderPlugin = exports3.MulticoinProviderPlugin = void 0;\n var index_js_1 = require_address3();\n var index_js_2 = require_constants5();\n var index_js_3 = require_contract2();\n var index_js_4 = require_hash2();\n var index_js_5 = require_utils8();\n function getIpfsLink(link) {\n if (link.match(/^ipfs:\\/\\/ipfs\\//i)) {\n link = link.substring(12);\n } else if (link.match(/^ipfs:\\/\\//i)) {\n link = link.substring(7);\n } else {\n (0, index_js_5.assertArgument)(false, \"unsupported IPFS format\", \"link\", link);\n }\n return `https://gateway.ipfs.io/ipfs/${link}`;\n }\n var MulticoinProviderPlugin = class {\n /**\n * The name.\n */\n name;\n /**\n * Creates a new **MulticoinProviderPluing** for %%name%%.\n */\n constructor(name) {\n (0, index_js_5.defineProperties)(this, { name });\n }\n connect(proivder) {\n return this;\n }\n /**\n * Returns ``true`` if %%coinType%% is supported by this plugin.\n */\n supportsCoinType(coinType) {\n return false;\n }\n /**\n * Resolves to the encoded %%address%% for %%coinType%%.\n */\n async encodeAddress(coinType, address) {\n throw new Error(\"unsupported coin\");\n }\n /**\n * Resolves to the decoded %%data%% for %%coinType%%.\n */\n async decodeAddress(coinType, data) {\n throw new Error(\"unsupported coin\");\n }\n };\n exports3.MulticoinProviderPlugin = MulticoinProviderPlugin;\n var BasicMulticoinPluginId = \"org.ethers.plugins.provider.BasicMulticoin\";\n var BasicMulticoinProviderPlugin = class extends MulticoinProviderPlugin {\n /**\n * Creates a new **BasicMulticoinProviderPlugin**.\n */\n constructor() {\n super(BasicMulticoinPluginId);\n }\n };\n exports3.BasicMulticoinProviderPlugin = BasicMulticoinProviderPlugin;\n var matcherIpfs = new RegExp(\"^(ipfs)://(.*)$\", \"i\");\n var matchers = [\n new RegExp(\"^(https)://(.*)$\", \"i\"),\n new RegExp(\"^(data):(.*)$\", \"i\"),\n matcherIpfs,\n new RegExp(\"^eip155:[0-9]+/(erc[0-9]+):(.*)$\", \"i\")\n ];\n var EnsResolver = class _EnsResolver {\n /**\n * The connected provider.\n */\n provider;\n /**\n * The address of the resolver.\n */\n address;\n /**\n * The name this resolver was resolved against.\n */\n name;\n // For EIP-2544 names, the ancestor that provided the resolver\n #supports2544;\n #resolver;\n constructor(provider, address, name) {\n (0, index_js_5.defineProperties)(this, { provider, address, name });\n this.#supports2544 = null;\n this.#resolver = new index_js_3.Contract(address, [\n \"function supportsInterface(bytes4) view returns (bool)\",\n \"function resolve(bytes, bytes) view returns (bytes)\",\n \"function addr(bytes32) view returns (address)\",\n \"function addr(bytes32, uint) view returns (bytes)\",\n \"function text(bytes32, string) view returns (string)\",\n \"function contenthash(bytes32) view returns (bytes)\"\n ], provider);\n }\n /**\n * Resolves to true if the resolver supports wildcard resolution.\n */\n async supportsWildcard() {\n if (this.#supports2544 == null) {\n this.#supports2544 = (async () => {\n try {\n return await this.#resolver.supportsInterface(\"0x9061b923\");\n } catch (error) {\n if ((0, index_js_5.isError)(error, \"CALL_EXCEPTION\")) {\n return false;\n }\n this.#supports2544 = null;\n throw error;\n }\n })();\n }\n return await this.#supports2544;\n }\n async #fetch(funcName, params) {\n params = (params || []).slice();\n const iface = this.#resolver.interface;\n params.unshift((0, index_js_4.namehash)(this.name));\n let fragment = null;\n if (await this.supportsWildcard()) {\n fragment = iface.getFunction(funcName);\n (0, index_js_5.assert)(fragment, \"missing fragment\", \"UNKNOWN_ERROR\", {\n info: { funcName }\n });\n params = [\n (0, index_js_4.dnsEncode)(this.name, 255),\n iface.encodeFunctionData(fragment, params)\n ];\n funcName = \"resolve(bytes,bytes)\";\n }\n params.push({\n enableCcipRead: true\n });\n try {\n const result = await this.#resolver[funcName](...params);\n if (fragment) {\n return iface.decodeFunctionResult(fragment, result)[0];\n }\n return result;\n } catch (error) {\n if (!(0, index_js_5.isError)(error, \"CALL_EXCEPTION\")) {\n throw error;\n }\n }\n return null;\n }\n /**\n * Resolves to the address for %%coinType%% or null if the\n * provided %%coinType%% has not been configured.\n */\n async getAddress(coinType) {\n if (coinType == null) {\n coinType = 60;\n }\n if (coinType === 60) {\n try {\n const result = await this.#fetch(\"addr(bytes32)\");\n if (result == null || result === index_js_2.ZeroAddress) {\n return null;\n }\n return result;\n } catch (error) {\n if ((0, index_js_5.isError)(error, \"CALL_EXCEPTION\")) {\n return null;\n }\n throw error;\n }\n }\n if (coinType >= 0 && coinType < 2147483648) {\n let ethCoinType = coinType + 2147483648;\n const data2 = await this.#fetch(\"addr(bytes32,uint)\", [ethCoinType]);\n if ((0, index_js_5.isHexString)(data2, 20)) {\n return (0, index_js_1.getAddress)(data2);\n }\n }\n let coinPlugin = null;\n for (const plugin of this.provider.plugins) {\n if (!(plugin instanceof MulticoinProviderPlugin)) {\n continue;\n }\n if (plugin.supportsCoinType(coinType)) {\n coinPlugin = plugin;\n break;\n }\n }\n if (coinPlugin == null) {\n return null;\n }\n const data = await this.#fetch(\"addr(bytes32,uint)\", [coinType]);\n if (data == null || data === \"0x\") {\n return null;\n }\n const address = await coinPlugin.decodeAddress(coinType, data);\n if (address != null) {\n return address;\n }\n (0, index_js_5.assert)(false, `invalid coin data`, \"UNSUPPORTED_OPERATION\", {\n operation: `getAddress(${coinType})`,\n info: { coinType, data }\n });\n }\n /**\n * Resolves to the EIP-634 text record for %%key%%, or ``null``\n * if unconfigured.\n */\n async getText(key) {\n const data = await this.#fetch(\"text(bytes32,string)\", [key]);\n if (data == null || data === \"0x\") {\n return null;\n }\n return data;\n }\n /**\n * Rsolves to the content-hash or ``null`` if unconfigured.\n */\n async getContentHash() {\n const data = await this.#fetch(\"contenthash(bytes32)\");\n if (data == null || data === \"0x\") {\n return null;\n }\n const ipfs = data.match(/^0x(e3010170|e5010172)(([0-9a-f][0-9a-f])([0-9a-f][0-9a-f])([0-9a-f]*))$/);\n if (ipfs) {\n const scheme = ipfs[1] === \"e3010170\" ? \"ipfs\" : \"ipns\";\n const length2 = parseInt(ipfs[4], 16);\n if (ipfs[5].length === length2 * 2) {\n return `${scheme}://${(0, index_js_5.encodeBase58)(\"0x\" + ipfs[2])}`;\n }\n }\n const swarm = data.match(/^0xe40101fa011b20([0-9a-f]*)$/);\n if (swarm && swarm[1].length === 64) {\n return `bzz://${swarm[1]}`;\n }\n (0, index_js_5.assert)(false, `invalid or unsupported content hash data`, \"UNSUPPORTED_OPERATION\", {\n operation: \"getContentHash()\",\n info: { data }\n });\n }\n /**\n * Resolves to the avatar url or ``null`` if the avatar is either\n * unconfigured or incorrectly configured (e.g. references an NFT\n * not owned by the address).\n *\n * If diagnosing issues with configurations, the [[_getAvatar]]\n * method may be useful.\n */\n async getAvatar() {\n const avatar = await this._getAvatar();\n return avatar.url;\n }\n /**\n * When resolving an avatar, there are many steps involved, such\n * fetching metadata and possibly validating ownership of an\n * NFT.\n *\n * This method can be used to examine each step and the value it\n * was working from.\n */\n async _getAvatar() {\n const linkage = [{ type: \"name\", value: this.name }];\n try {\n const avatar = await this.getText(\"avatar\");\n if (avatar == null) {\n linkage.push({ type: \"!avatar\", value: \"\" });\n return { url: null, linkage };\n }\n linkage.push({ type: \"avatar\", value: avatar });\n for (let i3 = 0; i3 < matchers.length; i3++) {\n const match = avatar.match(matchers[i3]);\n if (match == null) {\n continue;\n }\n const scheme = match[1].toLowerCase();\n switch (scheme) {\n case \"https\":\n case \"data\":\n linkage.push({ type: \"url\", value: avatar });\n return { linkage, url: avatar };\n case \"ipfs\": {\n const url = getIpfsLink(avatar);\n linkage.push({ type: \"ipfs\", value: avatar });\n linkage.push({ type: \"url\", value: url });\n return { linkage, url };\n }\n case \"erc721\":\n case \"erc1155\": {\n const selector = scheme === \"erc721\" ? \"tokenURI(uint256)\" : \"uri(uint256)\";\n linkage.push({ type: scheme, value: avatar });\n const owner = await this.getAddress();\n if (owner == null) {\n linkage.push({ type: \"!owner\", value: \"\" });\n return { url: null, linkage };\n }\n const comps = (match[2] || \"\").split(\"/\");\n if (comps.length !== 2) {\n linkage.push({ type: `!${scheme}caip`, value: match[2] || \"\" });\n return { url: null, linkage };\n }\n const tokenId = comps[1];\n const contract = new index_js_3.Contract(comps[0], [\n // ERC-721\n \"function tokenURI(uint) view returns (string)\",\n \"function ownerOf(uint) view returns (address)\",\n // ERC-1155\n \"function uri(uint) view returns (string)\",\n \"function balanceOf(address, uint256) view returns (uint)\"\n ], this.provider);\n if (scheme === \"erc721\") {\n const tokenOwner = await contract.ownerOf(tokenId);\n if (owner !== tokenOwner) {\n linkage.push({ type: \"!owner\", value: tokenOwner });\n return { url: null, linkage };\n }\n linkage.push({ type: \"owner\", value: tokenOwner });\n } else if (scheme === \"erc1155\") {\n const balance = await contract.balanceOf(owner, tokenId);\n if (!balance) {\n linkage.push({ type: \"!balance\", value: \"0\" });\n return { url: null, linkage };\n }\n linkage.push({ type: \"balance\", value: balance.toString() });\n }\n let metadataUrl = await contract[selector](tokenId);\n if (metadataUrl == null || metadataUrl === \"0x\") {\n linkage.push({ type: \"!metadata-url\", value: \"\" });\n return { url: null, linkage };\n }\n linkage.push({ type: \"metadata-url-base\", value: metadataUrl });\n if (scheme === \"erc1155\") {\n metadataUrl = metadataUrl.replace(\"{id}\", (0, index_js_5.toBeHex)(tokenId, 32).substring(2));\n linkage.push({ type: \"metadata-url-expanded\", value: metadataUrl });\n }\n if (metadataUrl.match(/^ipfs:/i)) {\n metadataUrl = getIpfsLink(metadataUrl);\n }\n linkage.push({ type: \"metadata-url\", value: metadataUrl });\n let metadata = {};\n const response = await new index_js_5.FetchRequest(metadataUrl).send();\n response.assertOk();\n try {\n metadata = response.bodyJson;\n } catch (error) {\n try {\n linkage.push({ type: \"!metadata\", value: response.bodyText });\n } catch (error2) {\n const bytes = response.body;\n if (bytes) {\n linkage.push({ type: \"!metadata\", value: (0, index_js_5.hexlify)(bytes) });\n }\n return { url: null, linkage };\n }\n return { url: null, linkage };\n }\n if (!metadata) {\n linkage.push({ type: \"!metadata\", value: \"\" });\n return { url: null, linkage };\n }\n linkage.push({ type: \"metadata\", value: JSON.stringify(metadata) });\n let imageUrl = metadata.image;\n if (typeof imageUrl !== \"string\") {\n linkage.push({ type: \"!imageUrl\", value: \"\" });\n return { url: null, linkage };\n }\n if (imageUrl.match(/^(https:\\/\\/|data:)/i)) {\n } else {\n const ipfs = imageUrl.match(matcherIpfs);\n if (ipfs == null) {\n linkage.push({ type: \"!imageUrl-ipfs\", value: imageUrl });\n return { url: null, linkage };\n }\n linkage.push({ type: \"imageUrl-ipfs\", value: imageUrl });\n imageUrl = getIpfsLink(imageUrl);\n }\n linkage.push({ type: \"url\", value: imageUrl });\n return { linkage, url: imageUrl };\n }\n }\n }\n } catch (error) {\n }\n return { linkage, url: null };\n }\n static async getEnsAddress(provider) {\n const network = await provider.getNetwork();\n const ensPlugin = network.getPlugin(\"org.ethers.plugins.network.Ens\");\n (0, index_js_5.assert)(ensPlugin, \"network does not support ENS\", \"UNSUPPORTED_OPERATION\", {\n operation: \"getEnsAddress\",\n info: { network }\n });\n return ensPlugin.address;\n }\n static async #getResolver(provider, name) {\n const ensAddr = await _EnsResolver.getEnsAddress(provider);\n try {\n const contract = new index_js_3.Contract(ensAddr, [\n \"function resolver(bytes32) view returns (address)\"\n ], provider);\n const addr = await contract.resolver((0, index_js_4.namehash)(name), {\n enableCcipRead: true\n });\n if (addr === index_js_2.ZeroAddress) {\n return null;\n }\n return addr;\n } catch (error) {\n throw error;\n }\n return null;\n }\n /**\n * Resolve to the ENS resolver for %%name%% using %%provider%% or\n * ``null`` if unconfigured.\n */\n static async fromName(provider, name) {\n let currentName = name;\n while (true) {\n if (currentName === \"\" || currentName === \".\") {\n return null;\n }\n if (name !== \"eth\" && currentName === \"eth\") {\n return null;\n }\n const addr = await _EnsResolver.#getResolver(provider, currentName);\n if (addr != null) {\n const resolver = new _EnsResolver(provider, addr, name);\n if (currentName !== name && !await resolver.supportsWildcard()) {\n return null;\n }\n return resolver;\n }\n currentName = currentName.split(\".\").slice(1).join(\".\");\n }\n }\n };\n exports3.EnsResolver = EnsResolver;\n }\n });\n\n // ../../../node_modules/.pnpm/ethers@6.15.0_bufferutil@4.0.9_utf-8-validate@5.0.10/node_modules/ethers/lib.commonjs/providers/format.js\n var require_format = __commonJS({\n \"../../../node_modules/.pnpm/ethers@6.15.0_bufferutil@4.0.9_utf-8-validate@5.0.10/node_modules/ethers/lib.commonjs/providers/format.js\"(exports3) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n Object.defineProperty(exports3, \"__esModule\", { value: true });\n exports3.formatTransactionResponse = exports3.formatTransactionReceipt = exports3.formatReceiptLog = exports3.formatBlock = exports3.formatLog = exports3.formatUint256 = exports3.formatHash = exports3.formatData = exports3.formatBoolean = exports3.object = exports3.arrayOf = exports3.allowNull = void 0;\n var index_js_1 = require_address3();\n var index_js_2 = require_crypto2();\n var index_js_3 = require_transaction2();\n var index_js_4 = require_utils8();\n var BN_0 = BigInt(0);\n function allowNull(format, nullValue) {\n return function(value) {\n if (value == null) {\n return nullValue;\n }\n return format(value);\n };\n }\n exports3.allowNull = allowNull;\n function arrayOf(format, allowNull2) {\n return (array2) => {\n if (allowNull2 && array2 == null) {\n return null;\n }\n if (!Array.isArray(array2)) {\n throw new Error(\"not an array\");\n }\n return array2.map((i3) => format(i3));\n };\n }\n exports3.arrayOf = arrayOf;\n function object2(format, altNames) {\n return (value) => {\n const result = {};\n for (const key in format) {\n let srcKey = key;\n if (altNames && key in altNames && !(srcKey in value)) {\n for (const altKey of altNames[key]) {\n if (altKey in value) {\n srcKey = altKey;\n break;\n }\n }\n }\n try {\n const nv = format[key](value[srcKey]);\n if (nv !== void 0) {\n result[key] = nv;\n }\n } catch (error) {\n const message = error instanceof Error ? error.message : \"not-an-error\";\n (0, index_js_4.assert)(false, `invalid value for value.${key} (${message})`, \"BAD_DATA\", { value });\n }\n }\n return result;\n };\n }\n exports3.object = object2;\n function formatBoolean(value) {\n switch (value) {\n case true:\n case \"true\":\n return true;\n case false:\n case \"false\":\n return false;\n }\n (0, index_js_4.assertArgument)(false, `invalid boolean; ${JSON.stringify(value)}`, \"value\", value);\n }\n exports3.formatBoolean = formatBoolean;\n function formatData(value) {\n (0, index_js_4.assertArgument)((0, index_js_4.isHexString)(value, true), \"invalid data\", \"value\", value);\n return value;\n }\n exports3.formatData = formatData;\n function formatHash(value) {\n (0, index_js_4.assertArgument)((0, index_js_4.isHexString)(value, 32), \"invalid hash\", \"value\", value);\n return value;\n }\n exports3.formatHash = formatHash;\n function formatUint256(value) {\n if (!(0, index_js_4.isHexString)(value)) {\n throw new Error(\"invalid uint256\");\n }\n return (0, index_js_4.zeroPadValue)(value, 32);\n }\n exports3.formatUint256 = formatUint256;\n var _formatLog = object2({\n address: index_js_1.getAddress,\n blockHash: formatHash,\n blockNumber: index_js_4.getNumber,\n data: formatData,\n index: index_js_4.getNumber,\n removed: allowNull(formatBoolean, false),\n topics: arrayOf(formatHash),\n transactionHash: formatHash,\n transactionIndex: index_js_4.getNumber\n }, {\n index: [\"logIndex\"]\n });\n function formatLog2(value) {\n return _formatLog(value);\n }\n exports3.formatLog = formatLog2;\n var _formatBlock = object2({\n hash: allowNull(formatHash),\n parentHash: formatHash,\n parentBeaconBlockRoot: allowNull(formatHash, null),\n number: index_js_4.getNumber,\n timestamp: index_js_4.getNumber,\n nonce: allowNull(formatData),\n difficulty: index_js_4.getBigInt,\n gasLimit: index_js_4.getBigInt,\n gasUsed: index_js_4.getBigInt,\n stateRoot: allowNull(formatHash, null),\n receiptsRoot: allowNull(formatHash, null),\n blobGasUsed: allowNull(index_js_4.getBigInt, null),\n excessBlobGas: allowNull(index_js_4.getBigInt, null),\n miner: allowNull(index_js_1.getAddress),\n prevRandao: allowNull(formatHash, null),\n extraData: formatData,\n baseFeePerGas: allowNull(index_js_4.getBigInt)\n }, {\n prevRandao: [\"mixHash\"]\n });\n function formatBlock2(value) {\n const result = _formatBlock(value);\n result.transactions = value.transactions.map((tx) => {\n if (typeof tx === \"string\") {\n return tx;\n }\n return formatTransactionResponse(tx);\n });\n return result;\n }\n exports3.formatBlock = formatBlock2;\n var _formatReceiptLog = object2({\n transactionIndex: index_js_4.getNumber,\n blockNumber: index_js_4.getNumber,\n transactionHash: formatHash,\n address: index_js_1.getAddress,\n topics: arrayOf(formatHash),\n data: formatData,\n index: index_js_4.getNumber,\n blockHash: formatHash\n }, {\n index: [\"logIndex\"]\n });\n function formatReceiptLog(value) {\n return _formatReceiptLog(value);\n }\n exports3.formatReceiptLog = formatReceiptLog;\n var _formatTransactionReceipt = object2({\n to: allowNull(index_js_1.getAddress, null),\n from: allowNull(index_js_1.getAddress, null),\n contractAddress: allowNull(index_js_1.getAddress, null),\n // should be allowNull(hash), but broken-EIP-658 support is handled in receipt\n index: index_js_4.getNumber,\n root: allowNull(index_js_4.hexlify),\n gasUsed: index_js_4.getBigInt,\n blobGasUsed: allowNull(index_js_4.getBigInt, null),\n logsBloom: allowNull(formatData),\n blockHash: formatHash,\n hash: formatHash,\n logs: arrayOf(formatReceiptLog),\n blockNumber: index_js_4.getNumber,\n //confirmations: allowNull(getNumber, null),\n cumulativeGasUsed: index_js_4.getBigInt,\n effectiveGasPrice: allowNull(index_js_4.getBigInt),\n blobGasPrice: allowNull(index_js_4.getBigInt, null),\n status: allowNull(index_js_4.getNumber),\n type: allowNull(index_js_4.getNumber, 0)\n }, {\n effectiveGasPrice: [\"gasPrice\"],\n hash: [\"transactionHash\"],\n index: [\"transactionIndex\"]\n });\n function formatTransactionReceipt2(value) {\n return _formatTransactionReceipt(value);\n }\n exports3.formatTransactionReceipt = formatTransactionReceipt2;\n function formatTransactionResponse(value) {\n if (value.to && (0, index_js_4.getBigInt)(value.to) === BN_0) {\n value.to = \"0x0000000000000000000000000000000000000000\";\n }\n const result = object2({\n hash: formatHash,\n // Some nodes do not return this, usually test nodes (like Ganache)\n index: allowNull(index_js_4.getNumber, void 0),\n type: (value2) => {\n if (value2 === \"0x\" || value2 == null) {\n return 0;\n }\n return (0, index_js_4.getNumber)(value2);\n },\n accessList: allowNull(index_js_3.accessListify, null),\n blobVersionedHashes: allowNull(arrayOf(formatHash, true), null),\n authorizationList: allowNull(arrayOf((v2) => {\n let sig;\n if (v2.signature) {\n sig = v2.signature;\n } else {\n let yParity = v2.yParity;\n if (yParity === \"0x1b\") {\n yParity = 0;\n } else if (yParity === \"0x1c\") {\n yParity = 1;\n }\n sig = Object.assign({}, v2, { yParity });\n }\n return {\n address: (0, index_js_1.getAddress)(v2.address),\n chainId: (0, index_js_4.getBigInt)(v2.chainId),\n nonce: (0, index_js_4.getBigInt)(v2.nonce),\n signature: index_js_2.Signature.from(sig)\n };\n }, false), null),\n blockHash: allowNull(formatHash, null),\n blockNumber: allowNull(index_js_4.getNumber, null),\n transactionIndex: allowNull(index_js_4.getNumber, null),\n from: index_js_1.getAddress,\n // either (gasPrice) or (maxPriorityFeePerGas + maxFeePerGas) must be set\n gasPrice: allowNull(index_js_4.getBigInt),\n maxPriorityFeePerGas: allowNull(index_js_4.getBigInt),\n maxFeePerGas: allowNull(index_js_4.getBigInt),\n maxFeePerBlobGas: allowNull(index_js_4.getBigInt, null),\n gasLimit: index_js_4.getBigInt,\n to: allowNull(index_js_1.getAddress, null),\n value: index_js_4.getBigInt,\n nonce: index_js_4.getNumber,\n data: formatData,\n creates: allowNull(index_js_1.getAddress, null),\n chainId: allowNull(index_js_4.getBigInt, null)\n }, {\n data: [\"input\"],\n gasLimit: [\"gas\"],\n index: [\"transactionIndex\"]\n })(value);\n if (result.to == null && result.creates == null) {\n result.creates = (0, index_js_1.getCreateAddress)(result);\n }\n if ((value.type === 1 || value.type === 2) && value.accessList == null) {\n result.accessList = [];\n }\n if (value.signature) {\n result.signature = index_js_2.Signature.from(value.signature);\n } else {\n result.signature = index_js_2.Signature.from(value);\n }\n if (result.chainId == null) {\n const chainId = result.signature.legacyChainId;\n if (chainId != null) {\n result.chainId = chainId;\n }\n }\n if (result.blockHash && (0, index_js_4.getBigInt)(result.blockHash) === BN_0) {\n result.blockHash = null;\n }\n return result;\n }\n exports3.formatTransactionResponse = formatTransactionResponse;\n }\n });\n\n // ../../../node_modules/.pnpm/ethers@6.15.0_bufferutil@4.0.9_utf-8-validate@5.0.10/node_modules/ethers/lib.commonjs/providers/plugins-network.js\n var require_plugins_network = __commonJS({\n \"../../../node_modules/.pnpm/ethers@6.15.0_bufferutil@4.0.9_utf-8-validate@5.0.10/node_modules/ethers/lib.commonjs/providers/plugins-network.js\"(exports3) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n Object.defineProperty(exports3, \"__esModule\", { value: true });\n exports3.FetchUrlFeeDataNetworkPlugin = exports3.FeeDataNetworkPlugin = exports3.EnsPlugin = exports3.GasCostPlugin = exports3.NetworkPlugin = void 0;\n var properties_js_1 = require_properties();\n var index_js_1 = require_utils8();\n var EnsAddress = \"0x00000000000C2E074eC69A0dFb2997BA6C7d2e1e\";\n var NetworkPlugin = class _NetworkPlugin {\n /**\n * The name of the plugin.\n *\n * It is recommended to use reverse-domain-notation, which permits\n * unique names with a known authority as well as hierarchal entries.\n */\n name;\n /**\n * Creates a new **NetworkPlugin**.\n */\n constructor(name) {\n (0, properties_js_1.defineProperties)(this, { name });\n }\n /**\n * Creates a copy of this plugin.\n */\n clone() {\n return new _NetworkPlugin(this.name);\n }\n };\n exports3.NetworkPlugin = NetworkPlugin;\n var GasCostPlugin = class _GasCostPlugin extends NetworkPlugin {\n /**\n * The block number to treat these values as valid from.\n *\n * This allows a hardfork to have updated values included as well as\n * mulutiple hardforks to be supported.\n */\n effectiveBlock;\n /**\n * The transactions base fee.\n */\n txBase;\n /**\n * The fee for creating a new account.\n */\n txCreate;\n /**\n * The fee per zero-byte in the data.\n */\n txDataZero;\n /**\n * The fee per non-zero-byte in the data.\n */\n txDataNonzero;\n /**\n * The fee per storage key in the [[link-eip-2930]] access list.\n */\n txAccessListStorageKey;\n /**\n * The fee per address in the [[link-eip-2930]] access list.\n */\n txAccessListAddress;\n /**\n * Creates a new GasCostPlugin from %%effectiveBlock%% until the\n * latest block or another GasCostPlugin supercedes that block number,\n * with the associated %%costs%%.\n */\n constructor(effectiveBlock, costs) {\n if (effectiveBlock == null) {\n effectiveBlock = 0;\n }\n super(`org.ethers.network.plugins.GasCost#${effectiveBlock || 0}`);\n const props = { effectiveBlock };\n function set(name, nullish2) {\n let value = (costs || {})[name];\n if (value == null) {\n value = nullish2;\n }\n (0, index_js_1.assertArgument)(typeof value === \"number\", `invalud value for ${name}`, \"costs\", costs);\n props[name] = value;\n }\n set(\"txBase\", 21e3);\n set(\"txCreate\", 32e3);\n set(\"txDataZero\", 4);\n set(\"txDataNonzero\", 16);\n set(\"txAccessListStorageKey\", 1900);\n set(\"txAccessListAddress\", 2400);\n (0, properties_js_1.defineProperties)(this, props);\n }\n clone() {\n return new _GasCostPlugin(this.effectiveBlock, this);\n }\n };\n exports3.GasCostPlugin = GasCostPlugin;\n var EnsPlugin = class _EnsPlugin extends NetworkPlugin {\n /**\n * The ENS Registrty Contract address.\n */\n address;\n /**\n * The chain ID that the ENS contract lives on.\n */\n targetNetwork;\n /**\n * Creates a new **EnsPlugin** connected to %%address%% on the\n * %%targetNetwork%%. The default ENS address and mainnet is used\n * if unspecified.\n */\n constructor(address, targetNetwork) {\n super(\"org.ethers.plugins.network.Ens\");\n (0, properties_js_1.defineProperties)(this, {\n address: address || EnsAddress,\n targetNetwork: targetNetwork == null ? 1 : targetNetwork\n });\n }\n clone() {\n return new _EnsPlugin(this.address, this.targetNetwork);\n }\n };\n exports3.EnsPlugin = EnsPlugin;\n var FeeDataNetworkPlugin = class _FeeDataNetworkPlugin extends NetworkPlugin {\n #feeDataFunc;\n /**\n * The fee data function provided to the constructor.\n */\n get feeDataFunc() {\n return this.#feeDataFunc;\n }\n /**\n * Creates a new **FeeDataNetworkPlugin**.\n */\n constructor(feeDataFunc) {\n super(\"org.ethers.plugins.network.FeeData\");\n this.#feeDataFunc = feeDataFunc;\n }\n /**\n * Resolves to the fee data.\n */\n async getFeeData(provider) {\n return await this.#feeDataFunc(provider);\n }\n clone() {\n return new _FeeDataNetworkPlugin(this.#feeDataFunc);\n }\n };\n exports3.FeeDataNetworkPlugin = FeeDataNetworkPlugin;\n var FetchUrlFeeDataNetworkPlugin = class extends NetworkPlugin {\n #url;\n #processFunc;\n /**\n * The URL to initialize the FetchRequest with in %%processFunc%%.\n */\n get url() {\n return this.#url;\n }\n /**\n * The callback to use when computing the FeeData.\n */\n get processFunc() {\n return this.#processFunc;\n }\n /**\n * Creates a new **FetchUrlFeeDataNetworkPlugin** which will\n * be used when computing the fee data for the network.\n */\n constructor(url, processFunc) {\n super(\"org.ethers.plugins.network.FetchUrlFeeDataPlugin\");\n this.#url = url;\n this.#processFunc = processFunc;\n }\n // We are immutable, so we can serve as our own clone\n clone() {\n return this;\n }\n };\n exports3.FetchUrlFeeDataNetworkPlugin = FetchUrlFeeDataNetworkPlugin;\n }\n });\n\n // ../../../node_modules/.pnpm/ethers@6.15.0_bufferutil@4.0.9_utf-8-validate@5.0.10/node_modules/ethers/lib.commonjs/providers/network.js\n var require_network = __commonJS({\n \"../../../node_modules/.pnpm/ethers@6.15.0_bufferutil@4.0.9_utf-8-validate@5.0.10/node_modules/ethers/lib.commonjs/providers/network.js\"(exports3) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n Object.defineProperty(exports3, \"__esModule\", { value: true });\n exports3.Network = void 0;\n var index_js_1 = require_transaction2();\n var index_js_2 = require_utils8();\n var plugins_network_js_1 = require_plugins_network();\n var Networks = /* @__PURE__ */ new Map();\n var Network = class _Network {\n #name;\n #chainId;\n #plugins;\n /**\n * Creates a new **Network** for %%name%% and %%chainId%%.\n */\n constructor(name, chainId) {\n this.#name = name;\n this.#chainId = (0, index_js_2.getBigInt)(chainId);\n this.#plugins = /* @__PURE__ */ new Map();\n }\n /**\n * Returns a JSON-compatible representation of a Network.\n */\n toJSON() {\n return { name: this.name, chainId: String(this.chainId) };\n }\n /**\n * The network common name.\n *\n * This is the canonical name, as networks migh have multiple\n * names.\n */\n get name() {\n return this.#name;\n }\n set name(value) {\n this.#name = value;\n }\n /**\n * The network chain ID.\n */\n get chainId() {\n return this.#chainId;\n }\n set chainId(value) {\n this.#chainId = (0, index_js_2.getBigInt)(value, \"chainId\");\n }\n /**\n * Returns true if %%other%% matches this network. Any chain ID\n * must match, and if no chain ID is present, the name must match.\n *\n * This method does not currently check for additional properties,\n * such as ENS address or plug-in compatibility.\n */\n matches(other) {\n if (other == null) {\n return false;\n }\n if (typeof other === \"string\") {\n try {\n return this.chainId === (0, index_js_2.getBigInt)(other);\n } catch (error) {\n }\n return this.name === other;\n }\n if (typeof other === \"number\" || typeof other === \"bigint\") {\n try {\n return this.chainId === (0, index_js_2.getBigInt)(other);\n } catch (error) {\n }\n return false;\n }\n if (typeof other === \"object\") {\n if (other.chainId != null) {\n try {\n return this.chainId === (0, index_js_2.getBigInt)(other.chainId);\n } catch (error) {\n }\n return false;\n }\n if (other.name != null) {\n return this.name === other.name;\n }\n return false;\n }\n return false;\n }\n /**\n * Returns the list of plugins currently attached to this Network.\n */\n get plugins() {\n return Array.from(this.#plugins.values());\n }\n /**\n * Attach a new %%plugin%% to this Network. The network name\n * must be unique, excluding any fragment.\n */\n attachPlugin(plugin) {\n if (this.#plugins.get(plugin.name)) {\n throw new Error(`cannot replace existing plugin: ${plugin.name} `);\n }\n this.#plugins.set(plugin.name, plugin.clone());\n return this;\n }\n /**\n * Return the plugin, if any, matching %%name%% exactly. Plugins\n * with fragments will not be returned unless %%name%% includes\n * a fragment.\n */\n getPlugin(name) {\n return this.#plugins.get(name) || null;\n }\n /**\n * Gets a list of all plugins that match %%name%%, with otr without\n * a fragment.\n */\n getPlugins(basename) {\n return this.plugins.filter((p4) => p4.name.split(\"#\")[0] === basename);\n }\n /**\n * Create a copy of this Network.\n */\n clone() {\n const clone = new _Network(this.name, this.chainId);\n this.plugins.forEach((plugin) => {\n clone.attachPlugin(plugin.clone());\n });\n return clone;\n }\n /**\n * Compute the intrinsic gas required for a transaction.\n *\n * A GasCostPlugin can be attached to override the default\n * values.\n */\n computeIntrinsicGas(tx) {\n const costs = this.getPlugin(\"org.ethers.plugins.network.GasCost\") || new plugins_network_js_1.GasCostPlugin();\n let gas = costs.txBase;\n if (tx.to == null) {\n gas += costs.txCreate;\n }\n if (tx.data) {\n for (let i3 = 2; i3 < tx.data.length; i3 += 2) {\n if (tx.data.substring(i3, i3 + 2) === \"00\") {\n gas += costs.txDataZero;\n } else {\n gas += costs.txDataNonzero;\n }\n }\n }\n if (tx.accessList) {\n const accessList = (0, index_js_1.accessListify)(tx.accessList);\n for (const addr in accessList) {\n gas += costs.txAccessListAddress + costs.txAccessListStorageKey * accessList[addr].storageKeys.length;\n }\n }\n return gas;\n }\n /**\n * Returns a new Network for the %%network%% name or chainId.\n */\n static from(network) {\n injectCommonNetworks();\n if (network == null) {\n return _Network.from(\"mainnet\");\n }\n if (typeof network === \"number\") {\n network = BigInt(network);\n }\n if (typeof network === \"string\" || typeof network === \"bigint\") {\n const networkFunc = Networks.get(network);\n if (networkFunc) {\n return networkFunc();\n }\n if (typeof network === \"bigint\") {\n return new _Network(\"unknown\", network);\n }\n (0, index_js_2.assertArgument)(false, \"unknown network\", \"network\", network);\n }\n if (typeof network.clone === \"function\") {\n const clone = network.clone();\n return clone;\n }\n if (typeof network === \"object\") {\n (0, index_js_2.assertArgument)(typeof network.name === \"string\" && typeof network.chainId === \"number\", \"invalid network object name or chainId\", \"network\", network);\n const custom3 = new _Network(network.name, network.chainId);\n if (network.ensAddress || network.ensNetwork != null) {\n custom3.attachPlugin(new plugins_network_js_1.EnsPlugin(network.ensAddress, network.ensNetwork));\n }\n return custom3;\n }\n (0, index_js_2.assertArgument)(false, \"invalid network\", \"network\", network);\n }\n /**\n * Register %%nameOrChainId%% with a function which returns\n * an instance of a Network representing that chain.\n */\n static register(nameOrChainId, networkFunc) {\n if (typeof nameOrChainId === \"number\") {\n nameOrChainId = BigInt(nameOrChainId);\n }\n const existing = Networks.get(nameOrChainId);\n if (existing) {\n (0, index_js_2.assertArgument)(false, `conflicting network for ${JSON.stringify(existing.name)}`, \"nameOrChainId\", nameOrChainId);\n }\n Networks.set(nameOrChainId, networkFunc);\n }\n };\n exports3.Network = Network;\n function parseUnits(_value, decimals) {\n const value = String(_value);\n if (!value.match(/^[0-9.]+$/)) {\n throw new Error(`invalid gwei value: ${_value}`);\n }\n const comps = value.split(\".\");\n if (comps.length === 1) {\n comps.push(\"\");\n }\n if (comps.length !== 2) {\n throw new Error(`invalid gwei value: ${_value}`);\n }\n while (comps[1].length < decimals) {\n comps[1] += \"0\";\n }\n if (comps[1].length > 9) {\n let frac = BigInt(comps[1].substring(0, 9));\n if (!comps[1].substring(9).match(/^0+$/)) {\n frac++;\n }\n comps[1] = frac.toString();\n }\n return BigInt(comps[0] + comps[1]);\n }\n function getGasStationPlugin(url) {\n return new plugins_network_js_1.FetchUrlFeeDataNetworkPlugin(url, async (fetchFeeData, provider, request) => {\n request.setHeader(\"User-Agent\", \"ethers\");\n let response;\n try {\n const [_response, _feeData] = await Promise.all([\n request.send(),\n fetchFeeData()\n ]);\n response = _response;\n const payload = response.bodyJson.standard;\n const feeData = {\n gasPrice: _feeData.gasPrice,\n maxFeePerGas: parseUnits(payload.maxFee, 9),\n maxPriorityFeePerGas: parseUnits(payload.maxPriorityFee, 9)\n };\n return feeData;\n } catch (error) {\n (0, index_js_2.assert)(false, `error encountered with polygon gas station (${JSON.stringify(request.url)})`, \"SERVER_ERROR\", { request, response, error });\n }\n });\n }\n var injected = false;\n function injectCommonNetworks() {\n if (injected) {\n return;\n }\n injected = true;\n function registerEth(name, chainId, options) {\n const func = function() {\n const network = new Network(name, chainId);\n if (options.ensNetwork != null) {\n network.attachPlugin(new plugins_network_js_1.EnsPlugin(null, options.ensNetwork));\n }\n network.attachPlugin(new plugins_network_js_1.GasCostPlugin());\n (options.plugins || []).forEach((plugin) => {\n network.attachPlugin(plugin);\n });\n return network;\n };\n Network.register(name, func);\n Network.register(chainId, func);\n if (options.altNames) {\n options.altNames.forEach((name2) => {\n Network.register(name2, func);\n });\n }\n }\n registerEth(\"mainnet\", 1, { ensNetwork: 1, altNames: [\"homestead\"] });\n registerEth(\"ropsten\", 3, { ensNetwork: 3 });\n registerEth(\"rinkeby\", 4, { ensNetwork: 4 });\n registerEth(\"goerli\", 5, { ensNetwork: 5 });\n registerEth(\"kovan\", 42, { ensNetwork: 42 });\n registerEth(\"sepolia\", 11155111, { ensNetwork: 11155111 });\n registerEth(\"holesky\", 17e3, { ensNetwork: 17e3 });\n registerEth(\"classic\", 61, {});\n registerEth(\"classicKotti\", 6, {});\n registerEth(\"arbitrum\", 42161, {\n ensNetwork: 1\n });\n registerEth(\"arbitrum-goerli\", 421613, {});\n registerEth(\"arbitrum-sepolia\", 421614, {});\n registerEth(\"base\", 8453, { ensNetwork: 1 });\n registerEth(\"base-goerli\", 84531, {});\n registerEth(\"base-sepolia\", 84532, {});\n registerEth(\"bnb\", 56, { ensNetwork: 1 });\n registerEth(\"bnbt\", 97, {});\n registerEth(\"linea\", 59144, { ensNetwork: 1 });\n registerEth(\"linea-goerli\", 59140, {});\n registerEth(\"linea-sepolia\", 59141, {});\n registerEth(\"matic\", 137, {\n ensNetwork: 1,\n plugins: [\n getGasStationPlugin(\"https://gasstation.polygon.technology/v2\")\n ]\n });\n registerEth(\"matic-amoy\", 80002, {});\n registerEth(\"matic-mumbai\", 80001, {\n altNames: [\"maticMumbai\", \"maticmum\"],\n plugins: [\n getGasStationPlugin(\"https://gasstation-testnet.polygon.technology/v2\")\n ]\n });\n registerEth(\"optimism\", 10, {\n ensNetwork: 1,\n plugins: []\n });\n registerEth(\"optimism-goerli\", 420, {});\n registerEth(\"optimism-sepolia\", 11155420, {});\n registerEth(\"xdai\", 100, { ensNetwork: 1 });\n }\n }\n });\n\n // ../../../node_modules/.pnpm/ethers@6.15.0_bufferutil@4.0.9_utf-8-validate@5.0.10/node_modules/ethers/lib.commonjs/providers/subscriber-polling.js\n var require_subscriber_polling = __commonJS({\n \"../../../node_modules/.pnpm/ethers@6.15.0_bufferutil@4.0.9_utf-8-validate@5.0.10/node_modules/ethers/lib.commonjs/providers/subscriber-polling.js\"(exports3) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n Object.defineProperty(exports3, \"__esModule\", { value: true });\n exports3.PollingEventSubscriber = exports3.PollingTransactionSubscriber = exports3.PollingOrphanSubscriber = exports3.PollingBlockTagSubscriber = exports3.OnBlockSubscriber = exports3.PollingBlockSubscriber = exports3.getPollingSubscriber = void 0;\n var index_js_1 = require_utils8();\n function copy(obj) {\n return JSON.parse(JSON.stringify(obj));\n }\n function getPollingSubscriber(provider, event) {\n if (event === \"block\") {\n return new PollingBlockSubscriber(provider);\n }\n if ((0, index_js_1.isHexString)(event, 32)) {\n return new PollingTransactionSubscriber(provider, event);\n }\n (0, index_js_1.assert)(false, \"unsupported polling event\", \"UNSUPPORTED_OPERATION\", {\n operation: \"getPollingSubscriber\",\n info: { event }\n });\n }\n exports3.getPollingSubscriber = getPollingSubscriber;\n var PollingBlockSubscriber = class {\n #provider;\n #poller;\n #interval;\n // The most recent block we have scanned for events. The value -2\n // indicates we still need to fetch an initial block number\n #blockNumber;\n /**\n * Create a new **PollingBlockSubscriber** attached to %%provider%%.\n */\n constructor(provider) {\n this.#provider = provider;\n this.#poller = null;\n this.#interval = 4e3;\n this.#blockNumber = -2;\n }\n /**\n * The polling interval.\n */\n get pollingInterval() {\n return this.#interval;\n }\n set pollingInterval(value) {\n this.#interval = value;\n }\n async #poll() {\n try {\n const blockNumber = await this.#provider.getBlockNumber();\n if (this.#blockNumber === -2) {\n this.#blockNumber = blockNumber;\n return;\n }\n if (blockNumber !== this.#blockNumber) {\n for (let b4 = this.#blockNumber + 1; b4 <= blockNumber; b4++) {\n if (this.#poller == null) {\n return;\n }\n await this.#provider.emit(\"block\", b4);\n }\n this.#blockNumber = blockNumber;\n }\n } catch (error) {\n }\n if (this.#poller == null) {\n return;\n }\n this.#poller = this.#provider._setTimeout(this.#poll.bind(this), this.#interval);\n }\n start() {\n if (this.#poller) {\n return;\n }\n this.#poller = this.#provider._setTimeout(this.#poll.bind(this), this.#interval);\n this.#poll();\n }\n stop() {\n if (!this.#poller) {\n return;\n }\n this.#provider._clearTimeout(this.#poller);\n this.#poller = null;\n }\n pause(dropWhilePaused) {\n this.stop();\n if (dropWhilePaused) {\n this.#blockNumber = -2;\n }\n }\n resume() {\n this.start();\n }\n };\n exports3.PollingBlockSubscriber = PollingBlockSubscriber;\n var OnBlockSubscriber = class {\n #provider;\n #poll;\n #running;\n /**\n * Create a new **OnBlockSubscriber** attached to %%provider%%.\n */\n constructor(provider) {\n this.#provider = provider;\n this.#running = false;\n this.#poll = (blockNumber) => {\n this._poll(blockNumber, this.#provider);\n };\n }\n /**\n * Called on every new block.\n */\n async _poll(blockNumber, provider) {\n throw new Error(\"sub-classes must override this\");\n }\n start() {\n if (this.#running) {\n return;\n }\n this.#running = true;\n this.#poll(-2);\n this.#provider.on(\"block\", this.#poll);\n }\n stop() {\n if (!this.#running) {\n return;\n }\n this.#running = false;\n this.#provider.off(\"block\", this.#poll);\n }\n pause(dropWhilePaused) {\n this.stop();\n }\n resume() {\n this.start();\n }\n };\n exports3.OnBlockSubscriber = OnBlockSubscriber;\n var PollingBlockTagSubscriber = class extends OnBlockSubscriber {\n #tag;\n #lastBlock;\n constructor(provider, tag) {\n super(provider);\n this.#tag = tag;\n this.#lastBlock = -2;\n }\n pause(dropWhilePaused) {\n if (dropWhilePaused) {\n this.#lastBlock = -2;\n }\n super.pause(dropWhilePaused);\n }\n async _poll(blockNumber, provider) {\n const block = await provider.getBlock(this.#tag);\n if (block == null) {\n return;\n }\n if (this.#lastBlock === -2) {\n this.#lastBlock = block.number;\n } else if (block.number > this.#lastBlock) {\n provider.emit(this.#tag, block.number);\n this.#lastBlock = block.number;\n }\n }\n };\n exports3.PollingBlockTagSubscriber = PollingBlockTagSubscriber;\n var PollingOrphanSubscriber = class extends OnBlockSubscriber {\n #filter;\n constructor(provider, filter) {\n super(provider);\n this.#filter = copy(filter);\n }\n async _poll(blockNumber, provider) {\n throw new Error(\"@TODO\");\n console.log(this.#filter);\n }\n };\n exports3.PollingOrphanSubscriber = PollingOrphanSubscriber;\n var PollingTransactionSubscriber = class extends OnBlockSubscriber {\n #hash;\n /**\n * Create a new **PollingTransactionSubscriber** attached to\n * %%provider%%, listening for %%hash%%.\n */\n constructor(provider, hash3) {\n super(provider);\n this.#hash = hash3;\n }\n async _poll(blockNumber, provider) {\n const tx = await provider.getTransactionReceipt(this.#hash);\n if (tx) {\n provider.emit(this.#hash, tx);\n }\n }\n };\n exports3.PollingTransactionSubscriber = PollingTransactionSubscriber;\n var PollingEventSubscriber = class {\n #provider;\n #filter;\n #poller;\n #running;\n // The most recent block we have scanned for events. The value -2\n // indicates we still need to fetch an initial block number\n #blockNumber;\n /**\n * Create a new **PollingTransactionSubscriber** attached to\n * %%provider%%, listening for %%filter%%.\n */\n constructor(provider, filter) {\n this.#provider = provider;\n this.#filter = copy(filter);\n this.#poller = this.#poll.bind(this);\n this.#running = false;\n this.#blockNumber = -2;\n }\n async #poll(blockNumber) {\n if (this.#blockNumber === -2) {\n return;\n }\n const filter = copy(this.#filter);\n filter.fromBlock = this.#blockNumber + 1;\n filter.toBlock = blockNumber;\n const logs = await this.#provider.getLogs(filter);\n if (logs.length === 0) {\n if (this.#blockNumber < blockNumber - 60) {\n this.#blockNumber = blockNumber - 60;\n }\n return;\n }\n for (const log of logs) {\n this.#provider.emit(this.#filter, log);\n this.#blockNumber = log.blockNumber;\n }\n }\n start() {\n if (this.#running) {\n return;\n }\n this.#running = true;\n if (this.#blockNumber === -2) {\n this.#provider.getBlockNumber().then((blockNumber) => {\n this.#blockNumber = blockNumber;\n });\n }\n this.#provider.on(\"block\", this.#poller);\n }\n stop() {\n if (!this.#running) {\n return;\n }\n this.#running = false;\n this.#provider.off(\"block\", this.#poller);\n }\n pause(dropWhilePaused) {\n this.stop();\n if (dropWhilePaused) {\n this.#blockNumber = -2;\n }\n }\n resume() {\n this.start();\n }\n };\n exports3.PollingEventSubscriber = PollingEventSubscriber;\n }\n });\n\n // ../../../node_modules/.pnpm/ethers@6.15.0_bufferutil@4.0.9_utf-8-validate@5.0.10/node_modules/ethers/lib.commonjs/providers/abstract-provider.js\n var require_abstract_provider = __commonJS({\n \"../../../node_modules/.pnpm/ethers@6.15.0_bufferutil@4.0.9_utf-8-validate@5.0.10/node_modules/ethers/lib.commonjs/providers/abstract-provider.js\"(exports3) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n Object.defineProperty(exports3, \"__esModule\", { value: true });\n exports3.AbstractProvider = exports3.UnmanagedSubscriber = void 0;\n var index_js_1 = require_address3();\n var index_js_2 = require_constants5();\n var index_js_3 = require_contract2();\n var index_js_4 = require_hash2();\n var index_js_5 = require_transaction2();\n var index_js_6 = require_utils8();\n var ens_resolver_js_1 = require_ens_resolver();\n var format_js_1 = require_format();\n var network_js_1 = require_network();\n var provider_js_1 = require_provider();\n var subscriber_polling_js_1 = require_subscriber_polling();\n var BN_2 = BigInt(2);\n var MAX_CCIP_REDIRECTS = 10;\n function isPromise(value) {\n return value && typeof value.then === \"function\";\n }\n function getTag(prefix, value) {\n return prefix + \":\" + JSON.stringify(value, (k4, v2) => {\n if (v2 == null) {\n return \"null\";\n }\n if (typeof v2 === \"bigint\") {\n return `bigint:${v2.toString()}`;\n }\n if (typeof v2 === \"string\") {\n return v2.toLowerCase();\n }\n if (typeof v2 === \"object\" && !Array.isArray(v2)) {\n const keys = Object.keys(v2);\n keys.sort();\n return keys.reduce((accum, key) => {\n accum[key] = v2[key];\n return accum;\n }, {});\n }\n return v2;\n });\n }\n var UnmanagedSubscriber = class {\n /**\n * The name fof the event.\n */\n name;\n /**\n * Create a new UnmanagedSubscriber with %%name%%.\n */\n constructor(name) {\n (0, index_js_6.defineProperties)(this, { name });\n }\n start() {\n }\n stop() {\n }\n pause(dropWhilePaused) {\n }\n resume() {\n }\n };\n exports3.UnmanagedSubscriber = UnmanagedSubscriber;\n function copy(value) {\n return JSON.parse(JSON.stringify(value));\n }\n function concisify(items) {\n items = Array.from(new Set(items).values());\n items.sort();\n return items;\n }\n async function getSubscription(_event, provider) {\n if (_event == null) {\n throw new Error(\"invalid event\");\n }\n if (Array.isArray(_event)) {\n _event = { topics: _event };\n }\n if (typeof _event === \"string\") {\n switch (_event) {\n case \"block\":\n case \"debug\":\n case \"error\":\n case \"finalized\":\n case \"network\":\n case \"pending\":\n case \"safe\": {\n return { type: _event, tag: _event };\n }\n }\n }\n if ((0, index_js_6.isHexString)(_event, 32)) {\n const hash3 = _event.toLowerCase();\n return { type: \"transaction\", tag: getTag(\"tx\", { hash: hash3 }), hash: hash3 };\n }\n if (_event.orphan) {\n const event = _event;\n return { type: \"orphan\", tag: getTag(\"orphan\", event), filter: copy(event) };\n }\n if (_event.address || _event.topics) {\n const event = _event;\n const filter = {\n topics: (event.topics || []).map((t3) => {\n if (t3 == null) {\n return null;\n }\n if (Array.isArray(t3)) {\n return concisify(t3.map((t4) => t4.toLowerCase()));\n }\n return t3.toLowerCase();\n })\n };\n if (event.address) {\n const addresses4 = [];\n const promises = [];\n const addAddress = (addr) => {\n if ((0, index_js_6.isHexString)(addr)) {\n addresses4.push(addr);\n } else {\n promises.push((async () => {\n addresses4.push(await (0, index_js_1.resolveAddress)(addr, provider));\n })());\n }\n };\n if (Array.isArray(event.address)) {\n event.address.forEach(addAddress);\n } else {\n addAddress(event.address);\n }\n if (promises.length) {\n await Promise.all(promises);\n }\n filter.address = concisify(addresses4.map((a3) => a3.toLowerCase()));\n }\n return { filter, tag: getTag(\"event\", filter), type: \"event\" };\n }\n (0, index_js_6.assertArgument)(false, \"unknown ProviderEvent\", \"event\", _event);\n }\n function getTime() {\n return (/* @__PURE__ */ new Date()).getTime();\n }\n var defaultOptions = {\n cacheTimeout: 250,\n pollingInterval: 4e3\n };\n var AbstractProvider = class {\n #subs;\n #plugins;\n // null=unpaused, true=paused+dropWhilePaused, false=paused\n #pausedState;\n #destroyed;\n #networkPromise;\n #anyNetwork;\n #performCache;\n // The most recent block number if running an event or -1 if no \"block\" event\n #lastBlockNumber;\n #nextTimer;\n #timers;\n #disableCcipRead;\n #options;\n /**\n * Create a new **AbstractProvider** connected to %%network%%, or\n * use the various network detection capabilities to discover the\n * [[Network]] if necessary.\n */\n constructor(_network, options) {\n this.#options = Object.assign({}, defaultOptions, options || {});\n if (_network === \"any\") {\n this.#anyNetwork = true;\n this.#networkPromise = null;\n } else if (_network) {\n const network = network_js_1.Network.from(_network);\n this.#anyNetwork = false;\n this.#networkPromise = Promise.resolve(network);\n setTimeout(() => {\n this.emit(\"network\", network, null);\n }, 0);\n } else {\n this.#anyNetwork = false;\n this.#networkPromise = null;\n }\n this.#lastBlockNumber = -1;\n this.#performCache = /* @__PURE__ */ new Map();\n this.#subs = /* @__PURE__ */ new Map();\n this.#plugins = /* @__PURE__ */ new Map();\n this.#pausedState = null;\n this.#destroyed = false;\n this.#nextTimer = 1;\n this.#timers = /* @__PURE__ */ new Map();\n this.#disableCcipRead = false;\n }\n get pollingInterval() {\n return this.#options.pollingInterval;\n }\n /**\n * Returns ``this``, to allow an **AbstractProvider** to implement\n * the [[ContractRunner]] interface.\n */\n get provider() {\n return this;\n }\n /**\n * Returns all the registered plug-ins.\n */\n get plugins() {\n return Array.from(this.#plugins.values());\n }\n /**\n * Attach a new plug-in.\n */\n attachPlugin(plugin) {\n if (this.#plugins.get(plugin.name)) {\n throw new Error(`cannot replace existing plugin: ${plugin.name} `);\n }\n this.#plugins.set(plugin.name, plugin.connect(this));\n return this;\n }\n /**\n * Get a plugin by name.\n */\n getPlugin(name) {\n return this.#plugins.get(name) || null;\n }\n /**\n * Prevent any CCIP-read operation, regardless of whether requested\n * in a [[call]] using ``enableCcipRead``.\n */\n get disableCcipRead() {\n return this.#disableCcipRead;\n }\n set disableCcipRead(value) {\n this.#disableCcipRead = !!value;\n }\n // Shares multiple identical requests made during the same 250ms\n async #perform(req) {\n const timeout = this.#options.cacheTimeout;\n if (timeout < 0) {\n return await this._perform(req);\n }\n const tag = getTag(req.method, req);\n let perform = this.#performCache.get(tag);\n if (!perform) {\n perform = this._perform(req);\n this.#performCache.set(tag, perform);\n setTimeout(() => {\n if (this.#performCache.get(tag) === perform) {\n this.#performCache.delete(tag);\n }\n }, timeout);\n }\n return await perform;\n }\n /**\n * Resolves to the data for executing the CCIP-read operations.\n */\n async ccipReadFetch(tx, calldata, urls) {\n if (this.disableCcipRead || urls.length === 0 || tx.to == null) {\n return null;\n }\n const sender = tx.to.toLowerCase();\n const data = calldata.toLowerCase();\n const errorMessages = [];\n for (let i3 = 0; i3 < urls.length; i3++) {\n const url = urls[i3];\n const href = url.replace(\"{sender}\", sender).replace(\"{data}\", data);\n const request = new index_js_6.FetchRequest(href);\n if (url.indexOf(\"{data}\") === -1) {\n request.body = { data, sender };\n }\n this.emit(\"debug\", { action: \"sendCcipReadFetchRequest\", request, index: i3, urls });\n let errorMessage = \"unknown error\";\n let resp;\n try {\n resp = await request.send();\n } catch (error) {\n errorMessages.push(error.message);\n this.emit(\"debug\", { action: \"receiveCcipReadFetchError\", request, result: { error } });\n continue;\n }\n try {\n const result = resp.bodyJson;\n if (result.data) {\n this.emit(\"debug\", { action: \"receiveCcipReadFetchResult\", request, result });\n return result.data;\n }\n if (result.message) {\n errorMessage = result.message;\n }\n this.emit(\"debug\", { action: \"receiveCcipReadFetchError\", request, result });\n } catch (error) {\n }\n (0, index_js_6.assert)(resp.statusCode < 400 || resp.statusCode >= 500, `response not found during CCIP fetch: ${errorMessage}`, \"OFFCHAIN_FAULT\", { reason: \"404_MISSING_RESOURCE\", transaction: tx, info: { url, errorMessage } });\n errorMessages.push(errorMessage);\n }\n (0, index_js_6.assert)(false, `error encountered during CCIP fetch: ${errorMessages.map((m2) => JSON.stringify(m2)).join(\", \")}`, \"OFFCHAIN_FAULT\", {\n reason: \"500_SERVER_ERROR\",\n transaction: tx,\n info: { urls, errorMessages }\n });\n }\n /**\n * Provides the opportunity for a sub-class to wrap a block before\n * returning it, to add additional properties or an alternate\n * sub-class of [[Block]].\n */\n _wrapBlock(value, network) {\n return new provider_js_1.Block((0, format_js_1.formatBlock)(value), this);\n }\n /**\n * Provides the opportunity for a sub-class to wrap a log before\n * returning it, to add additional properties or an alternate\n * sub-class of [[Log]].\n */\n _wrapLog(value, network) {\n return new provider_js_1.Log((0, format_js_1.formatLog)(value), this);\n }\n /**\n * Provides the opportunity for a sub-class to wrap a transaction\n * receipt before returning it, to add additional properties or an\n * alternate sub-class of [[TransactionReceipt]].\n */\n _wrapTransactionReceipt(value, network) {\n return new provider_js_1.TransactionReceipt((0, format_js_1.formatTransactionReceipt)(value), this);\n }\n /**\n * Provides the opportunity for a sub-class to wrap a transaction\n * response before returning it, to add additional properties or an\n * alternate sub-class of [[TransactionResponse]].\n */\n _wrapTransactionResponse(tx, network) {\n return new provider_js_1.TransactionResponse((0, format_js_1.formatTransactionResponse)(tx), this);\n }\n /**\n * Resolves to the Network, forcing a network detection using whatever\n * technique the sub-class requires.\n *\n * Sub-classes **must** override this.\n */\n _detectNetwork() {\n (0, index_js_6.assert)(false, \"sub-classes must implement this\", \"UNSUPPORTED_OPERATION\", {\n operation: \"_detectNetwork\"\n });\n }\n /**\n * Sub-classes should use this to perform all built-in operations. All\n * methods sanitizes and normalizes the values passed into this.\n *\n * Sub-classes **must** override this.\n */\n async _perform(req) {\n (0, index_js_6.assert)(false, `unsupported method: ${req.method}`, \"UNSUPPORTED_OPERATION\", {\n operation: req.method,\n info: req\n });\n }\n // State\n async getBlockNumber() {\n const blockNumber = (0, index_js_6.getNumber)(await this.#perform({ method: \"getBlockNumber\" }), \"%response\");\n if (this.#lastBlockNumber >= 0) {\n this.#lastBlockNumber = blockNumber;\n }\n return blockNumber;\n }\n /**\n * Returns or resolves to the address for %%address%%, resolving ENS\n * names and [[Addressable]] objects and returning if already an\n * address.\n */\n _getAddress(address) {\n return (0, index_js_1.resolveAddress)(address, this);\n }\n /**\n * Returns or resolves to a valid block tag for %%blockTag%%, resolving\n * negative values and returning if already a valid block tag.\n */\n _getBlockTag(blockTag) {\n if (blockTag == null) {\n return \"latest\";\n }\n switch (blockTag) {\n case \"earliest\":\n return \"0x0\";\n case \"finalized\":\n case \"latest\":\n case \"pending\":\n case \"safe\":\n return blockTag;\n }\n if ((0, index_js_6.isHexString)(blockTag)) {\n if ((0, index_js_6.isHexString)(blockTag, 32)) {\n return blockTag;\n }\n return (0, index_js_6.toQuantity)(blockTag);\n }\n if (typeof blockTag === \"bigint\") {\n blockTag = (0, index_js_6.getNumber)(blockTag, \"blockTag\");\n }\n if (typeof blockTag === \"number\") {\n if (blockTag >= 0) {\n return (0, index_js_6.toQuantity)(blockTag);\n }\n if (this.#lastBlockNumber >= 0) {\n return (0, index_js_6.toQuantity)(this.#lastBlockNumber + blockTag);\n }\n return this.getBlockNumber().then((b4) => (0, index_js_6.toQuantity)(b4 + blockTag));\n }\n (0, index_js_6.assertArgument)(false, \"invalid blockTag\", \"blockTag\", blockTag);\n }\n /**\n * Returns or resolves to a filter for %%filter%%, resolving any ENS\n * names or [[Addressable]] object and returning if already a valid\n * filter.\n */\n _getFilter(filter) {\n const topics = (filter.topics || []).map((t3) => {\n if (t3 == null) {\n return null;\n }\n if (Array.isArray(t3)) {\n return concisify(t3.map((t4) => t4.toLowerCase()));\n }\n return t3.toLowerCase();\n });\n const blockHash = \"blockHash\" in filter ? filter.blockHash : void 0;\n const resolve = (_address, fromBlock2, toBlock2) => {\n let address2 = void 0;\n switch (_address.length) {\n case 0:\n break;\n case 1:\n address2 = _address[0];\n break;\n default:\n _address.sort();\n address2 = _address;\n }\n if (blockHash) {\n if (fromBlock2 != null || toBlock2 != null) {\n throw new Error(\"invalid filter\");\n }\n }\n const filter2 = {};\n if (address2) {\n filter2.address = address2;\n }\n if (topics.length) {\n filter2.topics = topics;\n }\n if (fromBlock2) {\n filter2.fromBlock = fromBlock2;\n }\n if (toBlock2) {\n filter2.toBlock = toBlock2;\n }\n if (blockHash) {\n filter2.blockHash = blockHash;\n }\n return filter2;\n };\n let address = [];\n if (filter.address) {\n if (Array.isArray(filter.address)) {\n for (const addr of filter.address) {\n address.push(this._getAddress(addr));\n }\n } else {\n address.push(this._getAddress(filter.address));\n }\n }\n let fromBlock = void 0;\n if (\"fromBlock\" in filter) {\n fromBlock = this._getBlockTag(filter.fromBlock);\n }\n let toBlock = void 0;\n if (\"toBlock\" in filter) {\n toBlock = this._getBlockTag(filter.toBlock);\n }\n if (address.filter((a3) => typeof a3 !== \"string\").length || fromBlock != null && typeof fromBlock !== \"string\" || toBlock != null && typeof toBlock !== \"string\") {\n return Promise.all([Promise.all(address), fromBlock, toBlock]).then((result) => {\n return resolve(result[0], result[1], result[2]);\n });\n }\n return resolve(address, fromBlock, toBlock);\n }\n /**\n * Returns or resolves to a transaction for %%request%%, resolving\n * any ENS names or [[Addressable]] and returning if already a valid\n * transaction.\n */\n _getTransactionRequest(_request) {\n const request = (0, provider_js_1.copyRequest)(_request);\n const promises = [];\n [\"to\", \"from\"].forEach((key) => {\n if (request[key] == null) {\n return;\n }\n const addr = (0, index_js_1.resolveAddress)(request[key], this);\n if (isPromise(addr)) {\n promises.push(async function() {\n request[key] = await addr;\n }());\n } else {\n request[key] = addr;\n }\n });\n if (request.blockTag != null) {\n const blockTag = this._getBlockTag(request.blockTag);\n if (isPromise(blockTag)) {\n promises.push(async function() {\n request.blockTag = await blockTag;\n }());\n } else {\n request.blockTag = blockTag;\n }\n }\n if (promises.length) {\n return async function() {\n await Promise.all(promises);\n return request;\n }();\n }\n return request;\n }\n async getNetwork() {\n if (this.#networkPromise == null) {\n const detectNetwork = (async () => {\n try {\n const network = await this._detectNetwork();\n this.emit(\"network\", network, null);\n return network;\n } catch (error) {\n if (this.#networkPromise === detectNetwork) {\n this.#networkPromise = null;\n }\n throw error;\n }\n })();\n this.#networkPromise = detectNetwork;\n return (await detectNetwork).clone();\n }\n const networkPromise = this.#networkPromise;\n const [expected, actual] = await Promise.all([\n networkPromise,\n this._detectNetwork()\n // The actual connected network\n ]);\n if (expected.chainId !== actual.chainId) {\n if (this.#anyNetwork) {\n this.emit(\"network\", actual, expected);\n if (this.#networkPromise === networkPromise) {\n this.#networkPromise = Promise.resolve(actual);\n }\n } else {\n (0, index_js_6.assert)(false, `network changed: ${expected.chainId} => ${actual.chainId} `, \"NETWORK_ERROR\", {\n event: \"changed\"\n });\n }\n }\n return expected.clone();\n }\n async getFeeData() {\n const network = await this.getNetwork();\n const getFeeDataFunc = async () => {\n const { _block, gasPrice, priorityFee } = await (0, index_js_6.resolveProperties)({\n _block: this.#getBlock(\"latest\", false),\n gasPrice: (async () => {\n try {\n const value = await this.#perform({ method: \"getGasPrice\" });\n return (0, index_js_6.getBigInt)(value, \"%response\");\n } catch (error) {\n }\n return null;\n })(),\n priorityFee: (async () => {\n try {\n const value = await this.#perform({ method: \"getPriorityFee\" });\n return (0, index_js_6.getBigInt)(value, \"%response\");\n } catch (error) {\n }\n return null;\n })()\n });\n let maxFeePerGas = null;\n let maxPriorityFeePerGas = null;\n const block = this._wrapBlock(_block, network);\n if (block && block.baseFeePerGas) {\n maxPriorityFeePerGas = priorityFee != null ? priorityFee : BigInt(\"1000000000\");\n maxFeePerGas = block.baseFeePerGas * BN_2 + maxPriorityFeePerGas;\n }\n return new provider_js_1.FeeData(gasPrice, maxFeePerGas, maxPriorityFeePerGas);\n };\n const plugin = network.getPlugin(\"org.ethers.plugins.network.FetchUrlFeeDataPlugin\");\n if (plugin) {\n const req = new index_js_6.FetchRequest(plugin.url);\n const feeData = await plugin.processFunc(getFeeDataFunc, this, req);\n return new provider_js_1.FeeData(feeData.gasPrice, feeData.maxFeePerGas, feeData.maxPriorityFeePerGas);\n }\n return await getFeeDataFunc();\n }\n async estimateGas(_tx) {\n let tx = this._getTransactionRequest(_tx);\n if (isPromise(tx)) {\n tx = await tx;\n }\n return (0, index_js_6.getBigInt)(await this.#perform({\n method: \"estimateGas\",\n transaction: tx\n }), \"%response\");\n }\n async #call(tx, blockTag, attempt) {\n (0, index_js_6.assert)(attempt < MAX_CCIP_REDIRECTS, \"CCIP read exceeded maximum redirections\", \"OFFCHAIN_FAULT\", {\n reason: \"TOO_MANY_REDIRECTS\",\n transaction: Object.assign({}, tx, { blockTag, enableCcipRead: true })\n });\n const transaction = (0, provider_js_1.copyRequest)(tx);\n try {\n return (0, index_js_6.hexlify)(await this._perform({ method: \"call\", transaction, blockTag }));\n } catch (error) {\n if (!this.disableCcipRead && (0, index_js_6.isCallException)(error) && error.data && attempt >= 0 && blockTag === \"latest\" && transaction.to != null && (0, index_js_6.dataSlice)(error.data, 0, 4) === \"0x556f1830\") {\n const data = error.data;\n const txSender = await (0, index_js_1.resolveAddress)(transaction.to, this);\n let ccipArgs;\n try {\n ccipArgs = parseOffchainLookup((0, index_js_6.dataSlice)(error.data, 4));\n } catch (error2) {\n (0, index_js_6.assert)(false, error2.message, \"OFFCHAIN_FAULT\", {\n reason: \"BAD_DATA\",\n transaction,\n info: { data }\n });\n }\n (0, index_js_6.assert)(ccipArgs.sender.toLowerCase() === txSender.toLowerCase(), \"CCIP Read sender mismatch\", \"CALL_EXCEPTION\", {\n action: \"call\",\n data,\n reason: \"OffchainLookup\",\n transaction,\n invocation: null,\n revert: {\n signature: \"OffchainLookup(address,string[],bytes,bytes4,bytes)\",\n name: \"OffchainLookup\",\n args: ccipArgs.errorArgs\n }\n });\n const ccipResult = await this.ccipReadFetch(transaction, ccipArgs.calldata, ccipArgs.urls);\n (0, index_js_6.assert)(ccipResult != null, \"CCIP Read failed to fetch data\", \"OFFCHAIN_FAULT\", {\n reason: \"FETCH_FAILED\",\n transaction,\n info: { data: error.data, errorArgs: ccipArgs.errorArgs }\n });\n const tx2 = {\n to: txSender,\n data: (0, index_js_6.concat)([ccipArgs.selector, encodeBytes3([ccipResult, ccipArgs.extraData])])\n };\n this.emit(\"debug\", { action: \"sendCcipReadCall\", transaction: tx2 });\n try {\n const result = await this.#call(tx2, blockTag, attempt + 1);\n this.emit(\"debug\", { action: \"receiveCcipReadCallResult\", transaction: Object.assign({}, tx2), result });\n return result;\n } catch (error2) {\n this.emit(\"debug\", { action: \"receiveCcipReadCallError\", transaction: Object.assign({}, tx2), error: error2 });\n throw error2;\n }\n }\n throw error;\n }\n }\n async #checkNetwork(promise) {\n const { value } = await (0, index_js_6.resolveProperties)({\n network: this.getNetwork(),\n value: promise\n });\n return value;\n }\n async call(_tx) {\n const { tx, blockTag } = await (0, index_js_6.resolveProperties)({\n tx: this._getTransactionRequest(_tx),\n blockTag: this._getBlockTag(_tx.blockTag)\n });\n return await this.#checkNetwork(this.#call(tx, blockTag, _tx.enableCcipRead ? 0 : -1));\n }\n // Account\n async #getAccountValue(request, _address, _blockTag) {\n let address = this._getAddress(_address);\n let blockTag = this._getBlockTag(_blockTag);\n if (typeof address !== \"string\" || typeof blockTag !== \"string\") {\n [address, blockTag] = await Promise.all([address, blockTag]);\n }\n return await this.#checkNetwork(this.#perform(Object.assign(request, { address, blockTag })));\n }\n async getBalance(address, blockTag) {\n return (0, index_js_6.getBigInt)(await this.#getAccountValue({ method: \"getBalance\" }, address, blockTag), \"%response\");\n }\n async getTransactionCount(address, blockTag) {\n return (0, index_js_6.getNumber)(await this.#getAccountValue({ method: \"getTransactionCount\" }, address, blockTag), \"%response\");\n }\n async getCode(address, blockTag) {\n return (0, index_js_6.hexlify)(await this.#getAccountValue({ method: \"getCode\" }, address, blockTag));\n }\n async getStorage(address, _position, blockTag) {\n const position = (0, index_js_6.getBigInt)(_position, \"position\");\n return (0, index_js_6.hexlify)(await this.#getAccountValue({ method: \"getStorage\", position }, address, blockTag));\n }\n // Write\n async broadcastTransaction(signedTx) {\n const { blockNumber, hash: hash3, network } = await (0, index_js_6.resolveProperties)({\n blockNumber: this.getBlockNumber(),\n hash: this._perform({\n method: \"broadcastTransaction\",\n signedTransaction: signedTx\n }),\n network: this.getNetwork()\n });\n const tx = index_js_5.Transaction.from(signedTx);\n if (tx.hash !== hash3) {\n throw new Error(\"@TODO: the returned hash did not match\");\n }\n return this._wrapTransactionResponse(tx, network).replaceableTransaction(blockNumber);\n }\n async #getBlock(block, includeTransactions) {\n if ((0, index_js_6.isHexString)(block, 32)) {\n return await this.#perform({\n method: \"getBlock\",\n blockHash: block,\n includeTransactions\n });\n }\n let blockTag = this._getBlockTag(block);\n if (typeof blockTag !== \"string\") {\n blockTag = await blockTag;\n }\n return await this.#perform({\n method: \"getBlock\",\n blockTag,\n includeTransactions\n });\n }\n // Queries\n async getBlock(block, prefetchTxs) {\n const { network, params } = await (0, index_js_6.resolveProperties)({\n network: this.getNetwork(),\n params: this.#getBlock(block, !!prefetchTxs)\n });\n if (params == null) {\n return null;\n }\n return this._wrapBlock(params, network);\n }\n async getTransaction(hash3) {\n const { network, params } = await (0, index_js_6.resolveProperties)({\n network: this.getNetwork(),\n params: this.#perform({ method: \"getTransaction\", hash: hash3 })\n });\n if (params == null) {\n return null;\n }\n return this._wrapTransactionResponse(params, network);\n }\n async getTransactionReceipt(hash3) {\n const { network, params } = await (0, index_js_6.resolveProperties)({\n network: this.getNetwork(),\n params: this.#perform({ method: \"getTransactionReceipt\", hash: hash3 })\n });\n if (params == null) {\n return null;\n }\n if (params.gasPrice == null && params.effectiveGasPrice == null) {\n const tx = await this.#perform({ method: \"getTransaction\", hash: hash3 });\n if (tx == null) {\n throw new Error(\"report this; could not find tx or effectiveGasPrice\");\n }\n params.effectiveGasPrice = tx.gasPrice;\n }\n return this._wrapTransactionReceipt(params, network);\n }\n async getTransactionResult(hash3) {\n const { result } = await (0, index_js_6.resolveProperties)({\n network: this.getNetwork(),\n result: this.#perform({ method: \"getTransactionResult\", hash: hash3 })\n });\n if (result == null) {\n return null;\n }\n return (0, index_js_6.hexlify)(result);\n }\n // Bloom-filter Queries\n async getLogs(_filter) {\n let filter = this._getFilter(_filter);\n if (isPromise(filter)) {\n filter = await filter;\n }\n const { network, params } = await (0, index_js_6.resolveProperties)({\n network: this.getNetwork(),\n params: this.#perform({ method: \"getLogs\", filter })\n });\n return params.map((p4) => this._wrapLog(p4, network));\n }\n // ENS\n _getProvider(chainId) {\n (0, index_js_6.assert)(false, \"provider cannot connect to target network\", \"UNSUPPORTED_OPERATION\", {\n operation: \"_getProvider()\"\n });\n }\n async getResolver(name) {\n return await ens_resolver_js_1.EnsResolver.fromName(this, name);\n }\n async getAvatar(name) {\n const resolver = await this.getResolver(name);\n if (resolver) {\n return await resolver.getAvatar();\n }\n return null;\n }\n async resolveName(name) {\n const resolver = await this.getResolver(name);\n if (resolver) {\n return await resolver.getAddress();\n }\n return null;\n }\n async lookupAddress(address) {\n address = (0, index_js_1.getAddress)(address);\n const node = (0, index_js_4.namehash)(address.substring(2).toLowerCase() + \".addr.reverse\");\n try {\n const ensAddr = await ens_resolver_js_1.EnsResolver.getEnsAddress(this);\n const ensContract = new index_js_3.Contract(ensAddr, [\n \"function resolver(bytes32) view returns (address)\"\n ], this);\n const resolver = await ensContract.resolver(node);\n if (resolver == null || resolver === index_js_2.ZeroAddress) {\n return null;\n }\n const resolverContract = new index_js_3.Contract(resolver, [\n \"function name(bytes32) view returns (string)\"\n ], this);\n const name = await resolverContract.name(node);\n const check = await this.resolveName(name);\n if (check !== address) {\n return null;\n }\n return name;\n } catch (error) {\n if ((0, index_js_6.isError)(error, \"BAD_DATA\") && error.value === \"0x\") {\n return null;\n }\n if ((0, index_js_6.isError)(error, \"CALL_EXCEPTION\")) {\n return null;\n }\n throw error;\n }\n return null;\n }\n async waitForTransaction(hash3, _confirms, timeout) {\n const confirms = _confirms != null ? _confirms : 1;\n if (confirms === 0) {\n return this.getTransactionReceipt(hash3);\n }\n return new Promise(async (resolve, reject) => {\n let timer = null;\n const listener = async (blockNumber) => {\n try {\n const receipt = await this.getTransactionReceipt(hash3);\n if (receipt != null) {\n if (blockNumber - receipt.blockNumber + 1 >= confirms) {\n resolve(receipt);\n if (timer) {\n clearTimeout(timer);\n timer = null;\n }\n return;\n }\n }\n } catch (error) {\n console.log(\"EEE\", error);\n }\n this.once(\"block\", listener);\n };\n if (timeout != null) {\n timer = setTimeout(() => {\n if (timer == null) {\n return;\n }\n timer = null;\n this.off(\"block\", listener);\n reject((0, index_js_6.makeError)(\"timeout\", \"TIMEOUT\", { reason: \"timeout\" }));\n }, timeout);\n }\n listener(await this.getBlockNumber());\n });\n }\n async waitForBlock(blockTag) {\n (0, index_js_6.assert)(false, \"not implemented yet\", \"NOT_IMPLEMENTED\", {\n operation: \"waitForBlock\"\n });\n }\n /**\n * Clear a timer created using the [[_setTimeout]] method.\n */\n _clearTimeout(timerId) {\n const timer = this.#timers.get(timerId);\n if (!timer) {\n return;\n }\n if (timer.timer) {\n clearTimeout(timer.timer);\n }\n this.#timers.delete(timerId);\n }\n /**\n * Create a timer that will execute %%func%% after at least %%timeout%%\n * (in ms). If %%timeout%% is unspecified, then %%func%% will execute\n * in the next event loop.\n *\n * [Pausing](AbstractProvider-paused) the provider will pause any\n * associated timers.\n */\n _setTimeout(_func, timeout) {\n if (timeout == null) {\n timeout = 0;\n }\n const timerId = this.#nextTimer++;\n const func = () => {\n this.#timers.delete(timerId);\n _func();\n };\n if (this.paused) {\n this.#timers.set(timerId, { timer: null, func, time: timeout });\n } else {\n const timer = setTimeout(func, timeout);\n this.#timers.set(timerId, { timer, func, time: getTime() });\n }\n return timerId;\n }\n /**\n * Perform %%func%% on each subscriber.\n */\n _forEachSubscriber(func) {\n for (const sub of this.#subs.values()) {\n func(sub.subscriber);\n }\n }\n /**\n * Sub-classes may override this to customize subscription\n * implementations.\n */\n _getSubscriber(sub) {\n switch (sub.type) {\n case \"debug\":\n case \"error\":\n case \"network\":\n return new UnmanagedSubscriber(sub.type);\n case \"block\": {\n const subscriber = new subscriber_polling_js_1.PollingBlockSubscriber(this);\n subscriber.pollingInterval = this.pollingInterval;\n return subscriber;\n }\n case \"safe\":\n case \"finalized\":\n return new subscriber_polling_js_1.PollingBlockTagSubscriber(this, sub.type);\n case \"event\":\n return new subscriber_polling_js_1.PollingEventSubscriber(this, sub.filter);\n case \"transaction\":\n return new subscriber_polling_js_1.PollingTransactionSubscriber(this, sub.hash);\n case \"orphan\":\n return new subscriber_polling_js_1.PollingOrphanSubscriber(this, sub.filter);\n }\n throw new Error(`unsupported event: ${sub.type}`);\n }\n /**\n * If a [[Subscriber]] fails and needs to replace itself, this\n * method may be used.\n *\n * For example, this is used for providers when using the\n * ``eth_getFilterChanges`` method, which can return null if state\n * filters are not supported by the backend, allowing the Subscriber\n * to swap in a [[PollingEventSubscriber]].\n */\n _recoverSubscriber(oldSub, newSub) {\n for (const sub of this.#subs.values()) {\n if (sub.subscriber === oldSub) {\n if (sub.started) {\n sub.subscriber.stop();\n }\n sub.subscriber = newSub;\n if (sub.started) {\n newSub.start();\n }\n if (this.#pausedState != null) {\n newSub.pause(this.#pausedState);\n }\n break;\n }\n }\n }\n async #hasSub(event, emitArgs) {\n let sub = await getSubscription(event, this);\n if (sub.type === \"event\" && emitArgs && emitArgs.length > 0 && emitArgs[0].removed === true) {\n sub = await getSubscription({ orphan: \"drop-log\", log: emitArgs[0] }, this);\n }\n return this.#subs.get(sub.tag) || null;\n }\n async #getSub(event) {\n const subscription = await getSubscription(event, this);\n const tag = subscription.tag;\n let sub = this.#subs.get(tag);\n if (!sub) {\n const subscriber = this._getSubscriber(subscription);\n const addressableMap = /* @__PURE__ */ new WeakMap();\n const nameMap = /* @__PURE__ */ new Map();\n sub = { subscriber, tag, addressableMap, nameMap, started: false, listeners: [] };\n this.#subs.set(tag, sub);\n }\n return sub;\n }\n async on(event, listener) {\n const sub = await this.#getSub(event);\n sub.listeners.push({ listener, once: false });\n if (!sub.started) {\n sub.subscriber.start();\n sub.started = true;\n if (this.#pausedState != null) {\n sub.subscriber.pause(this.#pausedState);\n }\n }\n return this;\n }\n async once(event, listener) {\n const sub = await this.#getSub(event);\n sub.listeners.push({ listener, once: true });\n if (!sub.started) {\n sub.subscriber.start();\n sub.started = true;\n if (this.#pausedState != null) {\n sub.subscriber.pause(this.#pausedState);\n }\n }\n return this;\n }\n async emit(event, ...args) {\n const sub = await this.#hasSub(event, args);\n if (!sub || sub.listeners.length === 0) {\n return false;\n }\n ;\n const count = sub.listeners.length;\n sub.listeners = sub.listeners.filter(({ listener, once: once2 }) => {\n const payload = new index_js_6.EventPayload(this, once2 ? null : listener, event);\n try {\n listener.call(this, ...args, payload);\n } catch (error) {\n }\n return !once2;\n });\n if (sub.listeners.length === 0) {\n if (sub.started) {\n sub.subscriber.stop();\n }\n this.#subs.delete(sub.tag);\n }\n return count > 0;\n }\n async listenerCount(event) {\n if (event) {\n const sub = await this.#hasSub(event);\n if (!sub) {\n return 0;\n }\n return sub.listeners.length;\n }\n let total = 0;\n for (const { listeners: listeners2 } of this.#subs.values()) {\n total += listeners2.length;\n }\n return total;\n }\n async listeners(event) {\n if (event) {\n const sub = await this.#hasSub(event);\n if (!sub) {\n return [];\n }\n return sub.listeners.map(({ listener }) => listener);\n }\n let result = [];\n for (const { listeners: listeners2 } of this.#subs.values()) {\n result = result.concat(listeners2.map(({ listener }) => listener));\n }\n return result;\n }\n async off(event, listener) {\n const sub = await this.#hasSub(event);\n if (!sub) {\n return this;\n }\n if (listener) {\n const index2 = sub.listeners.map(({ listener: listener2 }) => listener2).indexOf(listener);\n if (index2 >= 0) {\n sub.listeners.splice(index2, 1);\n }\n }\n if (!listener || sub.listeners.length === 0) {\n if (sub.started) {\n sub.subscriber.stop();\n }\n this.#subs.delete(sub.tag);\n }\n return this;\n }\n async removeAllListeners(event) {\n if (event) {\n const { tag, started, subscriber } = await this.#getSub(event);\n if (started) {\n subscriber.stop();\n }\n this.#subs.delete(tag);\n } else {\n for (const [tag, { started, subscriber }] of this.#subs) {\n if (started) {\n subscriber.stop();\n }\n this.#subs.delete(tag);\n }\n }\n return this;\n }\n // Alias for \"on\"\n async addListener(event, listener) {\n return await this.on(event, listener);\n }\n // Alias for \"off\"\n async removeListener(event, listener) {\n return this.off(event, listener);\n }\n /**\n * If this provider has been destroyed using the [[destroy]] method.\n *\n * Once destroyed, all resources are reclaimed, internal event loops\n * and timers are cleaned up and no further requests may be sent to\n * the provider.\n */\n get destroyed() {\n return this.#destroyed;\n }\n /**\n * Sub-classes may use this to shutdown any sockets or release their\n * resources and reject any pending requests.\n *\n * Sub-classes **must** call ``super.destroy()``.\n */\n destroy() {\n this.removeAllListeners();\n for (const timerId of this.#timers.keys()) {\n this._clearTimeout(timerId);\n }\n this.#destroyed = true;\n }\n /**\n * Whether the provider is currently paused.\n *\n * A paused provider will not emit any events, and generally should\n * not make any requests to the network, but that is up to sub-classes\n * to manage.\n *\n * Setting ``paused = true`` is identical to calling ``.pause(false)``,\n * which will buffer any events that occur while paused until the\n * provider is unpaused.\n */\n get paused() {\n return this.#pausedState != null;\n }\n set paused(pause) {\n if (!!pause === this.paused) {\n return;\n }\n if (this.paused) {\n this.resume();\n } else {\n this.pause(false);\n }\n }\n /**\n * Pause the provider. If %%dropWhilePaused%%, any events that occur\n * while paused are dropped, otherwise all events will be emitted once\n * the provider is unpaused.\n */\n pause(dropWhilePaused) {\n this.#lastBlockNumber = -1;\n if (this.#pausedState != null) {\n if (this.#pausedState == !!dropWhilePaused) {\n return;\n }\n (0, index_js_6.assert)(false, \"cannot change pause type; resume first\", \"UNSUPPORTED_OPERATION\", {\n operation: \"pause\"\n });\n }\n this._forEachSubscriber((s4) => s4.pause(dropWhilePaused));\n this.#pausedState = !!dropWhilePaused;\n for (const timer of this.#timers.values()) {\n if (timer.timer) {\n clearTimeout(timer.timer);\n }\n timer.time = getTime() - timer.time;\n }\n }\n /**\n * Resume the provider.\n */\n resume() {\n if (this.#pausedState == null) {\n return;\n }\n this._forEachSubscriber((s4) => s4.resume());\n this.#pausedState = null;\n for (const timer of this.#timers.values()) {\n let timeout = timer.time;\n if (timeout < 0) {\n timeout = 0;\n }\n timer.time = getTime();\n setTimeout(timer.func, timeout);\n }\n }\n };\n exports3.AbstractProvider = AbstractProvider;\n function _parseString(result, start) {\n try {\n const bytes = _parseBytes(result, start);\n if (bytes) {\n return (0, index_js_6.toUtf8String)(bytes);\n }\n } catch (error) {\n }\n return null;\n }\n function _parseBytes(result, start) {\n if (result === \"0x\") {\n return null;\n }\n try {\n const offset = (0, index_js_6.getNumber)((0, index_js_6.dataSlice)(result, start, start + 32));\n const length2 = (0, index_js_6.getNumber)((0, index_js_6.dataSlice)(result, offset, offset + 32));\n return (0, index_js_6.dataSlice)(result, offset + 32, offset + 32 + length2);\n } catch (error) {\n }\n return null;\n }\n function numPad(value) {\n const result = (0, index_js_6.toBeArray)(value);\n if (result.length > 32) {\n throw new Error(\"internal; should not happen\");\n }\n const padded = new Uint8Array(32);\n padded.set(result, 32 - result.length);\n return padded;\n }\n function bytesPad(value) {\n if (value.length % 32 === 0) {\n return value;\n }\n const result = new Uint8Array(Math.ceil(value.length / 32) * 32);\n result.set(value);\n return result;\n }\n var empty = new Uint8Array([]);\n function encodeBytes3(datas) {\n const result = [];\n let byteCount = 0;\n for (let i3 = 0; i3 < datas.length; i3++) {\n result.push(empty);\n byteCount += 32;\n }\n for (let i3 = 0; i3 < datas.length; i3++) {\n const data = (0, index_js_6.getBytes)(datas[i3]);\n result[i3] = numPad(byteCount);\n result.push(numPad(data.length));\n result.push(bytesPad(data));\n byteCount += 32 + Math.ceil(data.length / 32) * 32;\n }\n return (0, index_js_6.concat)(result);\n }\n var zeros = \"0x0000000000000000000000000000000000000000000000000000000000000000\";\n function parseOffchainLookup(data) {\n const result = {\n sender: \"\",\n urls: [],\n calldata: \"\",\n selector: \"\",\n extraData: \"\",\n errorArgs: []\n };\n (0, index_js_6.assert)((0, index_js_6.dataLength)(data) >= 5 * 32, \"insufficient OffchainLookup data\", \"OFFCHAIN_FAULT\", {\n reason: \"insufficient OffchainLookup data\"\n });\n const sender = (0, index_js_6.dataSlice)(data, 0, 32);\n (0, index_js_6.assert)((0, index_js_6.dataSlice)(sender, 0, 12) === (0, index_js_6.dataSlice)(zeros, 0, 12), \"corrupt OffchainLookup sender\", \"OFFCHAIN_FAULT\", {\n reason: \"corrupt OffchainLookup sender\"\n });\n result.sender = (0, index_js_6.dataSlice)(sender, 12);\n try {\n const urls = [];\n const urlsOffset = (0, index_js_6.getNumber)((0, index_js_6.dataSlice)(data, 32, 64));\n const urlsLength = (0, index_js_6.getNumber)((0, index_js_6.dataSlice)(data, urlsOffset, urlsOffset + 32));\n const urlsData = (0, index_js_6.dataSlice)(data, urlsOffset + 32);\n for (let u2 = 0; u2 < urlsLength; u2++) {\n const url = _parseString(urlsData, u2 * 32);\n if (url == null) {\n throw new Error(\"abort\");\n }\n urls.push(url);\n }\n result.urls = urls;\n } catch (error) {\n (0, index_js_6.assert)(false, \"corrupt OffchainLookup urls\", \"OFFCHAIN_FAULT\", {\n reason: \"corrupt OffchainLookup urls\"\n });\n }\n try {\n const calldata = _parseBytes(data, 64);\n if (calldata == null) {\n throw new Error(\"abort\");\n }\n result.calldata = calldata;\n } catch (error) {\n (0, index_js_6.assert)(false, \"corrupt OffchainLookup calldata\", \"OFFCHAIN_FAULT\", {\n reason: \"corrupt OffchainLookup calldata\"\n });\n }\n (0, index_js_6.assert)((0, index_js_6.dataSlice)(data, 100, 128) === (0, index_js_6.dataSlice)(zeros, 0, 28), \"corrupt OffchainLookup callbaackSelector\", \"OFFCHAIN_FAULT\", {\n reason: \"corrupt OffchainLookup callbaackSelector\"\n });\n result.selector = (0, index_js_6.dataSlice)(data, 96, 100);\n try {\n const extraData = _parseBytes(data, 128);\n if (extraData == null) {\n throw new Error(\"abort\");\n }\n result.extraData = extraData;\n } catch (error) {\n (0, index_js_6.assert)(false, \"corrupt OffchainLookup extraData\", \"OFFCHAIN_FAULT\", {\n reason: \"corrupt OffchainLookup extraData\"\n });\n }\n result.errorArgs = \"sender,urls,calldata,selector,extraData\".split(/,/).map((k4) => result[k4]);\n return result;\n }\n }\n });\n\n // ../../../node_modules/.pnpm/ethers@6.15.0_bufferutil@4.0.9_utf-8-validate@5.0.10/node_modules/ethers/lib.commonjs/providers/abstract-signer.js\n var require_abstract_signer = __commonJS({\n \"../../../node_modules/.pnpm/ethers@6.15.0_bufferutil@4.0.9_utf-8-validate@5.0.10/node_modules/ethers/lib.commonjs/providers/abstract-signer.js\"(exports3) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n Object.defineProperty(exports3, \"__esModule\", { value: true });\n exports3.VoidSigner = exports3.AbstractSigner = void 0;\n var index_js_1 = require_address3();\n var index_js_2 = require_transaction2();\n var index_js_3 = require_utils8();\n var provider_js_1 = require_provider();\n function checkProvider(signer, operation) {\n if (signer.provider) {\n return signer.provider;\n }\n (0, index_js_3.assert)(false, \"missing provider\", \"UNSUPPORTED_OPERATION\", { operation });\n }\n async function populate(signer, tx) {\n let pop = (0, provider_js_1.copyRequest)(tx);\n if (pop.to != null) {\n pop.to = (0, index_js_1.resolveAddress)(pop.to, signer);\n }\n if (pop.from != null) {\n const from14 = pop.from;\n pop.from = Promise.all([\n signer.getAddress(),\n (0, index_js_1.resolveAddress)(from14, signer)\n ]).then(([address, from15]) => {\n (0, index_js_3.assertArgument)(address.toLowerCase() === from15.toLowerCase(), \"transaction from mismatch\", \"tx.from\", from15);\n return address;\n });\n } else {\n pop.from = signer.getAddress();\n }\n return await (0, index_js_3.resolveProperties)(pop);\n }\n var AbstractSigner = class {\n /**\n * The provider this signer is connected to.\n */\n provider;\n /**\n * Creates a new Signer connected to %%provider%%.\n */\n constructor(provider) {\n (0, index_js_3.defineProperties)(this, { provider: provider || null });\n }\n async getNonce(blockTag) {\n return checkProvider(this, \"getTransactionCount\").getTransactionCount(await this.getAddress(), blockTag);\n }\n async populateCall(tx) {\n const pop = await populate(this, tx);\n return pop;\n }\n async populateTransaction(tx) {\n const provider = checkProvider(this, \"populateTransaction\");\n const pop = await populate(this, tx);\n if (pop.nonce == null) {\n pop.nonce = await this.getNonce(\"pending\");\n }\n if (pop.gasLimit == null) {\n pop.gasLimit = await this.estimateGas(pop);\n }\n const network = await this.provider.getNetwork();\n if (pop.chainId != null) {\n const chainId = (0, index_js_3.getBigInt)(pop.chainId);\n (0, index_js_3.assertArgument)(chainId === network.chainId, \"transaction chainId mismatch\", \"tx.chainId\", tx.chainId);\n } else {\n pop.chainId = network.chainId;\n }\n const hasEip1559 = pop.maxFeePerGas != null || pop.maxPriorityFeePerGas != null;\n if (pop.gasPrice != null && (pop.type === 2 || hasEip1559)) {\n (0, index_js_3.assertArgument)(false, \"eip-1559 transaction do not support gasPrice\", \"tx\", tx);\n } else if ((pop.type === 0 || pop.type === 1) && hasEip1559) {\n (0, index_js_3.assertArgument)(false, \"pre-eip-1559 transaction do not support maxFeePerGas/maxPriorityFeePerGas\", \"tx\", tx);\n }\n if ((pop.type === 2 || pop.type == null) && (pop.maxFeePerGas != null && pop.maxPriorityFeePerGas != null)) {\n pop.type = 2;\n } else if (pop.type === 0 || pop.type === 1) {\n const feeData = await provider.getFeeData();\n (0, index_js_3.assert)(feeData.gasPrice != null, \"network does not support gasPrice\", \"UNSUPPORTED_OPERATION\", {\n operation: \"getGasPrice\"\n });\n if (pop.gasPrice == null) {\n pop.gasPrice = feeData.gasPrice;\n }\n } else {\n const feeData = await provider.getFeeData();\n if (pop.type == null) {\n if (feeData.maxFeePerGas != null && feeData.maxPriorityFeePerGas != null) {\n if (pop.authorizationList && pop.authorizationList.length) {\n pop.type = 4;\n } else {\n pop.type = 2;\n }\n if (pop.gasPrice != null) {\n const gasPrice = pop.gasPrice;\n delete pop.gasPrice;\n pop.maxFeePerGas = gasPrice;\n pop.maxPriorityFeePerGas = gasPrice;\n } else {\n if (pop.maxFeePerGas == null) {\n pop.maxFeePerGas = feeData.maxFeePerGas;\n }\n if (pop.maxPriorityFeePerGas == null) {\n pop.maxPriorityFeePerGas = feeData.maxPriorityFeePerGas;\n }\n }\n } else if (feeData.gasPrice != null) {\n (0, index_js_3.assert)(!hasEip1559, \"network does not support EIP-1559\", \"UNSUPPORTED_OPERATION\", {\n operation: \"populateTransaction\"\n });\n if (pop.gasPrice == null) {\n pop.gasPrice = feeData.gasPrice;\n }\n pop.type = 0;\n } else {\n (0, index_js_3.assert)(false, \"failed to get consistent fee data\", \"UNSUPPORTED_OPERATION\", {\n operation: \"signer.getFeeData\"\n });\n }\n } else if (pop.type === 2 || pop.type === 3 || pop.type === 4) {\n if (pop.maxFeePerGas == null) {\n pop.maxFeePerGas = feeData.maxFeePerGas;\n }\n if (pop.maxPriorityFeePerGas == null) {\n pop.maxPriorityFeePerGas = feeData.maxPriorityFeePerGas;\n }\n }\n }\n return await (0, index_js_3.resolveProperties)(pop);\n }\n async populateAuthorization(_auth) {\n const auth = Object.assign({}, _auth);\n if (auth.chainId == null) {\n auth.chainId = (await checkProvider(this, \"getNetwork\").getNetwork()).chainId;\n }\n if (auth.nonce == null) {\n auth.nonce = await this.getNonce();\n }\n return auth;\n }\n async estimateGas(tx) {\n return checkProvider(this, \"estimateGas\").estimateGas(await this.populateCall(tx));\n }\n async call(tx) {\n return checkProvider(this, \"call\").call(await this.populateCall(tx));\n }\n async resolveName(name) {\n const provider = checkProvider(this, \"resolveName\");\n return await provider.resolveName(name);\n }\n async sendTransaction(tx) {\n const provider = checkProvider(this, \"sendTransaction\");\n const pop = await this.populateTransaction(tx);\n delete pop.from;\n const txObj = index_js_2.Transaction.from(pop);\n return await provider.broadcastTransaction(await this.signTransaction(txObj));\n }\n // @TODO: in v7 move this to be abstract\n authorize(authorization) {\n (0, index_js_3.assert)(false, \"authorization not implemented for this signer\", \"UNSUPPORTED_OPERATION\", { operation: \"authorize\" });\n }\n };\n exports3.AbstractSigner = AbstractSigner;\n var VoidSigner = class _VoidSigner extends AbstractSigner {\n /**\n * The signer address.\n */\n address;\n /**\n * Creates a new **VoidSigner** with %%address%% attached to\n * %%provider%%.\n */\n constructor(address, provider) {\n super(provider);\n (0, index_js_3.defineProperties)(this, { address });\n }\n async getAddress() {\n return this.address;\n }\n connect(provider) {\n return new _VoidSigner(this.address, provider);\n }\n #throwUnsupported(suffix, operation) {\n (0, index_js_3.assert)(false, `VoidSigner cannot sign ${suffix}`, \"UNSUPPORTED_OPERATION\", { operation });\n }\n async signTransaction(tx) {\n this.#throwUnsupported(\"transactions\", \"signTransaction\");\n }\n async signMessage(message) {\n this.#throwUnsupported(\"messages\", \"signMessage\");\n }\n async signTypedData(domain2, types, value) {\n this.#throwUnsupported(\"typed-data\", \"signTypedData\");\n }\n };\n exports3.VoidSigner = VoidSigner;\n }\n });\n\n // ../../../node_modules/.pnpm/ethers@6.15.0_bufferutil@4.0.9_utf-8-validate@5.0.10/node_modules/ethers/lib.commonjs/providers/community.js\n var require_community = __commonJS({\n \"../../../node_modules/.pnpm/ethers@6.15.0_bufferutil@4.0.9_utf-8-validate@5.0.10/node_modules/ethers/lib.commonjs/providers/community.js\"(exports3) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n Object.defineProperty(exports3, \"__esModule\", { value: true });\n exports3.showThrottleMessage = void 0;\n var shown = /* @__PURE__ */ new Set();\n function showThrottleMessage(service) {\n if (shown.has(service)) {\n return;\n }\n shown.add(service);\n console.log(\"========= NOTICE =========\");\n console.log(`Request-Rate Exceeded for ${service} (this message will not be repeated)`);\n console.log(\"\");\n console.log(\"The default API keys for each service are provided as a highly-throttled,\");\n console.log(\"community resource for low-traffic projects and early prototyping.\");\n console.log(\"\");\n console.log(\"While your application will continue to function, we highly recommended\");\n console.log(\"signing up for your own API keys to improve performance, increase your\");\n console.log(\"request rate/limit and enable other perks, such as metrics and advanced APIs.\");\n console.log(\"\");\n console.log(\"For more details: https://docs.ethers.org/api-keys/\");\n console.log(\"==========================\");\n }\n exports3.showThrottleMessage = showThrottleMessage;\n }\n });\n\n // ../../../node_modules/.pnpm/ethers@6.15.0_bufferutil@4.0.9_utf-8-validate@5.0.10/node_modules/ethers/lib.commonjs/providers/subscriber-filterid.js\n var require_subscriber_filterid = __commonJS({\n \"../../../node_modules/.pnpm/ethers@6.15.0_bufferutil@4.0.9_utf-8-validate@5.0.10/node_modules/ethers/lib.commonjs/providers/subscriber-filterid.js\"(exports3) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n Object.defineProperty(exports3, \"__esModule\", { value: true });\n exports3.FilterIdPendingSubscriber = exports3.FilterIdEventSubscriber = exports3.FilterIdSubscriber = void 0;\n var index_js_1 = require_utils8();\n var subscriber_polling_js_1 = require_subscriber_polling();\n function copy(obj) {\n return JSON.parse(JSON.stringify(obj));\n }\n var FilterIdSubscriber = class {\n #provider;\n #filterIdPromise;\n #poller;\n #running;\n #network;\n #hault;\n /**\n * Creates a new **FilterIdSubscriber** which will used [[_subscribe]]\n * and [[_emitResults]] to setup the subscription and provide the event\n * to the %%provider%%.\n */\n constructor(provider) {\n this.#provider = provider;\n this.#filterIdPromise = null;\n this.#poller = this.#poll.bind(this);\n this.#running = false;\n this.#network = null;\n this.#hault = false;\n }\n /**\n * Sub-classes **must** override this to begin the subscription.\n */\n _subscribe(provider) {\n throw new Error(\"subclasses must override this\");\n }\n /**\n * Sub-classes **must** override this handle the events.\n */\n _emitResults(provider, result) {\n throw new Error(\"subclasses must override this\");\n }\n /**\n * Sub-classes **must** override this handle recovery on errors.\n */\n _recover(provider) {\n throw new Error(\"subclasses must override this\");\n }\n async #poll(blockNumber) {\n try {\n if (this.#filterIdPromise == null) {\n this.#filterIdPromise = this._subscribe(this.#provider);\n }\n let filterId = null;\n try {\n filterId = await this.#filterIdPromise;\n } catch (error) {\n if (!(0, index_js_1.isError)(error, \"UNSUPPORTED_OPERATION\") || error.operation !== \"eth_newFilter\") {\n throw error;\n }\n }\n if (filterId == null) {\n this.#filterIdPromise = null;\n this.#provider._recoverSubscriber(this, this._recover(this.#provider));\n return;\n }\n const network = await this.#provider.getNetwork();\n if (!this.#network) {\n this.#network = network;\n }\n if (this.#network.chainId !== network.chainId) {\n throw new Error(\"chaid changed\");\n }\n if (this.#hault) {\n return;\n }\n const result = await this.#provider.send(\"eth_getFilterChanges\", [filterId]);\n await this._emitResults(this.#provider, result);\n } catch (error) {\n console.log(\"@TODO\", error);\n }\n this.#provider.once(\"block\", this.#poller);\n }\n #teardown() {\n const filterIdPromise = this.#filterIdPromise;\n if (filterIdPromise) {\n this.#filterIdPromise = null;\n filterIdPromise.then((filterId) => {\n if (this.#provider.destroyed) {\n return;\n }\n this.#provider.send(\"eth_uninstallFilter\", [filterId]);\n });\n }\n }\n start() {\n if (this.#running) {\n return;\n }\n this.#running = true;\n this.#poll(-2);\n }\n stop() {\n if (!this.#running) {\n return;\n }\n this.#running = false;\n this.#hault = true;\n this.#teardown();\n this.#provider.off(\"block\", this.#poller);\n }\n pause(dropWhilePaused) {\n if (dropWhilePaused) {\n this.#teardown();\n }\n this.#provider.off(\"block\", this.#poller);\n }\n resume() {\n this.start();\n }\n };\n exports3.FilterIdSubscriber = FilterIdSubscriber;\n var FilterIdEventSubscriber = class extends FilterIdSubscriber {\n #event;\n /**\n * Creates a new **FilterIdEventSubscriber** attached to %%provider%%\n * listening for %%filter%%.\n */\n constructor(provider, filter) {\n super(provider);\n this.#event = copy(filter);\n }\n _recover(provider) {\n return new subscriber_polling_js_1.PollingEventSubscriber(provider, this.#event);\n }\n async _subscribe(provider) {\n const filterId = await provider.send(\"eth_newFilter\", [this.#event]);\n return filterId;\n }\n async _emitResults(provider, results) {\n for (const result of results) {\n provider.emit(this.#event, provider._wrapLog(result, provider._network));\n }\n }\n };\n exports3.FilterIdEventSubscriber = FilterIdEventSubscriber;\n var FilterIdPendingSubscriber = class extends FilterIdSubscriber {\n async _subscribe(provider) {\n return await provider.send(\"eth_newPendingTransactionFilter\", []);\n }\n async _emitResults(provider, results) {\n for (const result of results) {\n provider.emit(\"pending\", result);\n }\n }\n };\n exports3.FilterIdPendingSubscriber = FilterIdPendingSubscriber;\n }\n });\n\n // ../../../node_modules/.pnpm/ethers@6.15.0_bufferutil@4.0.9_utf-8-validate@5.0.10/node_modules/ethers/lib.commonjs/providers/provider-jsonrpc.js\n var require_provider_jsonrpc = __commonJS({\n \"../../../node_modules/.pnpm/ethers@6.15.0_bufferutil@4.0.9_utf-8-validate@5.0.10/node_modules/ethers/lib.commonjs/providers/provider-jsonrpc.js\"(exports3) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n Object.defineProperty(exports3, \"__esModule\", { value: true });\n exports3.JsonRpcProvider = exports3.JsonRpcApiPollingProvider = exports3.JsonRpcApiProvider = exports3.JsonRpcSigner = void 0;\n var index_js_1 = require_abi();\n var index_js_2 = require_address3();\n var index_js_3 = require_hash2();\n var index_js_4 = require_transaction2();\n var index_js_5 = require_utils8();\n var abstract_provider_js_1 = require_abstract_provider();\n var abstract_signer_js_1 = require_abstract_signer();\n var network_js_1 = require_network();\n var subscriber_filterid_js_1 = require_subscriber_filterid();\n var subscriber_polling_js_1 = require_subscriber_polling();\n var Primitive = \"bigint,boolean,function,number,string,symbol\".split(/,/g);\n function deepCopy(value) {\n if (value == null || Primitive.indexOf(typeof value) >= 0) {\n return value;\n }\n if (typeof value.getAddress === \"function\") {\n return value;\n }\n if (Array.isArray(value)) {\n return value.map(deepCopy);\n }\n if (typeof value === \"object\") {\n return Object.keys(value).reduce((accum, key) => {\n accum[key] = value[key];\n return accum;\n }, {});\n }\n throw new Error(`should not happen: ${value} (${typeof value})`);\n }\n function stall(duration) {\n return new Promise((resolve) => {\n setTimeout(resolve, duration);\n });\n }\n function getLowerCase(value) {\n if (value) {\n return value.toLowerCase();\n }\n return value;\n }\n function isPollable(value) {\n return value && typeof value.pollingInterval === \"number\";\n }\n var defaultOptions = {\n polling: false,\n staticNetwork: null,\n batchStallTime: 10,\n batchMaxSize: 1 << 20,\n batchMaxCount: 100,\n cacheTimeout: 250,\n pollingInterval: 4e3\n };\n var JsonRpcSigner = class extends abstract_signer_js_1.AbstractSigner {\n address;\n constructor(provider, address) {\n super(provider);\n address = (0, index_js_2.getAddress)(address);\n (0, index_js_5.defineProperties)(this, { address });\n }\n connect(provider) {\n (0, index_js_5.assert)(false, \"cannot reconnect JsonRpcSigner\", \"UNSUPPORTED_OPERATION\", {\n operation: \"signer.connect\"\n });\n }\n async getAddress() {\n return this.address;\n }\n // JSON-RPC will automatially fill in nonce, etc. so we just check from\n async populateTransaction(tx) {\n return await this.populateCall(tx);\n }\n // Returns just the hash of the transaction after sent, which is what\n // the bare JSON-RPC API does;\n async sendUncheckedTransaction(_tx) {\n const tx = deepCopy(_tx);\n const promises = [];\n if (tx.from) {\n const _from = tx.from;\n promises.push((async () => {\n const from14 = await (0, index_js_2.resolveAddress)(_from, this.provider);\n (0, index_js_5.assertArgument)(from14 != null && from14.toLowerCase() === this.address.toLowerCase(), \"from address mismatch\", \"transaction\", _tx);\n tx.from = from14;\n })());\n } else {\n tx.from = this.address;\n }\n if (tx.gasLimit == null) {\n promises.push((async () => {\n tx.gasLimit = await this.provider.estimateGas({ ...tx, from: this.address });\n })());\n }\n if (tx.to != null) {\n const _to = tx.to;\n promises.push((async () => {\n tx.to = await (0, index_js_2.resolveAddress)(_to, this.provider);\n })());\n }\n if (promises.length) {\n await Promise.all(promises);\n }\n const hexTx = this.provider.getRpcTransaction(tx);\n return this.provider.send(\"eth_sendTransaction\", [hexTx]);\n }\n async sendTransaction(tx) {\n const blockNumber = await this.provider.getBlockNumber();\n const hash3 = await this.sendUncheckedTransaction(tx);\n return await new Promise((resolve, reject) => {\n const timeouts = [1e3, 100];\n let invalids = 0;\n const checkTx = async () => {\n try {\n const tx2 = await this.provider.getTransaction(hash3);\n if (tx2 != null) {\n resolve(tx2.replaceableTransaction(blockNumber));\n return;\n }\n } catch (error) {\n if ((0, index_js_5.isError)(error, \"CANCELLED\") || (0, index_js_5.isError)(error, \"BAD_DATA\") || (0, index_js_5.isError)(error, \"NETWORK_ERROR\") || (0, index_js_5.isError)(error, \"UNSUPPORTED_OPERATION\")) {\n if (error.info == null) {\n error.info = {};\n }\n error.info.sendTransactionHash = hash3;\n reject(error);\n return;\n }\n if ((0, index_js_5.isError)(error, \"INVALID_ARGUMENT\")) {\n invalids++;\n if (error.info == null) {\n error.info = {};\n }\n error.info.sendTransactionHash = hash3;\n if (invalids > 10) {\n reject(error);\n return;\n }\n }\n this.provider.emit(\"error\", (0, index_js_5.makeError)(\"failed to fetch transation after sending (will try again)\", \"UNKNOWN_ERROR\", { error }));\n }\n this.provider._setTimeout(() => {\n checkTx();\n }, timeouts.pop() || 4e3);\n };\n checkTx();\n });\n }\n async signTransaction(_tx) {\n const tx = deepCopy(_tx);\n if (tx.from) {\n const from14 = await (0, index_js_2.resolveAddress)(tx.from, this.provider);\n (0, index_js_5.assertArgument)(from14 != null && from14.toLowerCase() === this.address.toLowerCase(), \"from address mismatch\", \"transaction\", _tx);\n tx.from = from14;\n } else {\n tx.from = this.address;\n }\n const hexTx = this.provider.getRpcTransaction(tx);\n return await this.provider.send(\"eth_signTransaction\", [hexTx]);\n }\n async signMessage(_message) {\n const message = typeof _message === \"string\" ? (0, index_js_5.toUtf8Bytes)(_message) : _message;\n return await this.provider.send(\"personal_sign\", [\n (0, index_js_5.hexlify)(message),\n this.address.toLowerCase()\n ]);\n }\n async signTypedData(domain2, types, _value) {\n const value = deepCopy(_value);\n const populated = await index_js_3.TypedDataEncoder.resolveNames(domain2, types, value, async (value2) => {\n const address = await (0, index_js_2.resolveAddress)(value2);\n (0, index_js_5.assertArgument)(address != null, \"TypedData does not support null address\", \"value\", value2);\n return address;\n });\n return await this.provider.send(\"eth_signTypedData_v4\", [\n this.address.toLowerCase(),\n JSON.stringify(index_js_3.TypedDataEncoder.getPayload(populated.domain, types, populated.value))\n ]);\n }\n async unlock(password) {\n return this.provider.send(\"personal_unlockAccount\", [\n this.address.toLowerCase(),\n password,\n null\n ]);\n }\n // https://github.com/ethereum/wiki/wiki/JSON-RPC#eth_sign\n async _legacySignMessage(_message) {\n const message = typeof _message === \"string\" ? (0, index_js_5.toUtf8Bytes)(_message) : _message;\n return await this.provider.send(\"eth_sign\", [\n this.address.toLowerCase(),\n (0, index_js_5.hexlify)(message)\n ]);\n }\n };\n exports3.JsonRpcSigner = JsonRpcSigner;\n var JsonRpcApiProvider = class extends abstract_provider_js_1.AbstractProvider {\n #options;\n // The next ID to use for the JSON-RPC ID field\n #nextId;\n // Payloads are queued and triggered in batches using the drainTimer\n #payloads;\n #drainTimer;\n #notReady;\n #network;\n #pendingDetectNetwork;\n #scheduleDrain() {\n if (this.#drainTimer) {\n return;\n }\n const stallTime = this._getOption(\"batchMaxCount\") === 1 ? 0 : this._getOption(\"batchStallTime\");\n this.#drainTimer = setTimeout(() => {\n this.#drainTimer = null;\n const payloads = this.#payloads;\n this.#payloads = [];\n while (payloads.length) {\n const batch = [payloads.shift()];\n while (payloads.length) {\n if (batch.length === this.#options.batchMaxCount) {\n break;\n }\n batch.push(payloads.shift());\n const bytes = JSON.stringify(batch.map((p4) => p4.payload));\n if (bytes.length > this.#options.batchMaxSize) {\n payloads.unshift(batch.pop());\n break;\n }\n }\n (async () => {\n const payload = batch.length === 1 ? batch[0].payload : batch.map((p4) => p4.payload);\n this.emit(\"debug\", { action: \"sendRpcPayload\", payload });\n try {\n const result = await this._send(payload);\n this.emit(\"debug\", { action: \"receiveRpcResult\", result });\n for (const { resolve, reject, payload: payload2 } of batch) {\n if (this.destroyed) {\n reject((0, index_js_5.makeError)(\"provider destroyed; cancelled request\", \"UNSUPPORTED_OPERATION\", { operation: payload2.method }));\n continue;\n }\n const resp = result.filter((r2) => r2.id === payload2.id)[0];\n if (resp == null) {\n const error = (0, index_js_5.makeError)(\"missing response for request\", \"BAD_DATA\", {\n value: result,\n info: { payload: payload2 }\n });\n this.emit(\"error\", error);\n reject(error);\n continue;\n }\n if (\"error\" in resp) {\n reject(this.getRpcError(payload2, resp));\n continue;\n }\n resolve(resp.result);\n }\n } catch (error) {\n this.emit(\"debug\", { action: \"receiveRpcError\", error });\n for (const { reject } of batch) {\n reject(error);\n }\n }\n })();\n }\n }, stallTime);\n }\n constructor(network, options) {\n super(network, options);\n this.#nextId = 1;\n this.#options = Object.assign({}, defaultOptions, options || {});\n this.#payloads = [];\n this.#drainTimer = null;\n this.#network = null;\n this.#pendingDetectNetwork = null;\n {\n let resolve = null;\n const promise = new Promise((_resolve) => {\n resolve = _resolve;\n });\n this.#notReady = { promise, resolve };\n }\n const staticNetwork = this._getOption(\"staticNetwork\");\n if (typeof staticNetwork === \"boolean\") {\n (0, index_js_5.assertArgument)(!staticNetwork || network !== \"any\", \"staticNetwork cannot be used on special network 'any'\", \"options\", options);\n if (staticNetwork && network != null) {\n this.#network = network_js_1.Network.from(network);\n }\n } else if (staticNetwork) {\n (0, index_js_5.assertArgument)(network == null || staticNetwork.matches(network), \"staticNetwork MUST match network object\", \"options\", options);\n this.#network = staticNetwork;\n }\n }\n /**\n * Returns the value associated with the option %%key%%.\n *\n * Sub-classes can use this to inquire about configuration options.\n */\n _getOption(key) {\n return this.#options[key];\n }\n /**\n * Gets the [[Network]] this provider has committed to. On each call, the network\n * is detected, and if it has changed, the call will reject.\n */\n get _network() {\n (0, index_js_5.assert)(this.#network, \"network is not available yet\", \"NETWORK_ERROR\");\n return this.#network;\n }\n /**\n * Resolves to the non-normalized value by performing %%req%%.\n *\n * Sub-classes may override this to modify behavior of actions,\n * and should generally call ``super._perform`` as a fallback.\n */\n async _perform(req) {\n if (req.method === \"call\" || req.method === \"estimateGas\") {\n let tx = req.transaction;\n if (tx && tx.type != null && (0, index_js_5.getBigInt)(tx.type)) {\n if (tx.maxFeePerGas == null && tx.maxPriorityFeePerGas == null) {\n const feeData = await this.getFeeData();\n if (feeData.maxFeePerGas == null && feeData.maxPriorityFeePerGas == null) {\n req = Object.assign({}, req, {\n transaction: Object.assign({}, tx, { type: void 0 })\n });\n }\n }\n }\n }\n const request = this.getRpcRequest(req);\n if (request != null) {\n return await this.send(request.method, request.args);\n }\n return super._perform(req);\n }\n /**\n * Sub-classes may override this; it detects the *actual* network that\n * we are **currently** connected to.\n *\n * Keep in mind that [[send]] may only be used once [[ready]], otherwise the\n * _send primitive must be used instead.\n */\n async _detectNetwork() {\n const network = this._getOption(\"staticNetwork\");\n if (network) {\n if (network === true) {\n if (this.#network) {\n return this.#network;\n }\n } else {\n return network;\n }\n }\n if (this.#pendingDetectNetwork) {\n return await this.#pendingDetectNetwork;\n }\n if (this.ready) {\n this.#pendingDetectNetwork = (async () => {\n try {\n const result = network_js_1.Network.from((0, index_js_5.getBigInt)(await this.send(\"eth_chainId\", [])));\n this.#pendingDetectNetwork = null;\n return result;\n } catch (error) {\n this.#pendingDetectNetwork = null;\n throw error;\n }\n })();\n return await this.#pendingDetectNetwork;\n }\n this.#pendingDetectNetwork = (async () => {\n const payload = {\n id: this.#nextId++,\n method: \"eth_chainId\",\n params: [],\n jsonrpc: \"2.0\"\n };\n this.emit(\"debug\", { action: \"sendRpcPayload\", payload });\n let result;\n try {\n result = (await this._send(payload))[0];\n this.#pendingDetectNetwork = null;\n } catch (error) {\n this.#pendingDetectNetwork = null;\n this.emit(\"debug\", { action: \"receiveRpcError\", error });\n throw error;\n }\n this.emit(\"debug\", { action: \"receiveRpcResult\", result });\n if (\"result\" in result) {\n return network_js_1.Network.from((0, index_js_5.getBigInt)(result.result));\n }\n throw this.getRpcError(payload, result);\n })();\n return await this.#pendingDetectNetwork;\n }\n /**\n * Sub-classes **MUST** call this. Until [[_start]] has been called, no calls\n * will be passed to [[_send]] from [[send]]. If it is overridden, then\n * ``super._start()`` **MUST** be called.\n *\n * Calling it multiple times is safe and has no effect.\n */\n _start() {\n if (this.#notReady == null || this.#notReady.resolve == null) {\n return;\n }\n this.#notReady.resolve();\n this.#notReady = null;\n (async () => {\n while (this.#network == null && !this.destroyed) {\n try {\n this.#network = await this._detectNetwork();\n } catch (error) {\n if (this.destroyed) {\n break;\n }\n console.log(\"JsonRpcProvider failed to detect network and cannot start up; retry in 1s (perhaps the URL is wrong or the node is not started)\");\n this.emit(\"error\", (0, index_js_5.makeError)(\"failed to bootstrap network detection\", \"NETWORK_ERROR\", { event: \"initial-network-discovery\", info: { error } }));\n await stall(1e3);\n }\n }\n this.#scheduleDrain();\n })();\n }\n /**\n * Resolves once the [[_start]] has been called. This can be used in\n * sub-classes to defer sending data until the connection has been\n * established.\n */\n async _waitUntilReady() {\n if (this.#notReady == null) {\n return;\n }\n return await this.#notReady.promise;\n }\n /**\n * Return a Subscriber that will manage the %%sub%%.\n *\n * Sub-classes may override this to modify the behavior of\n * subscription management.\n */\n _getSubscriber(sub) {\n if (sub.type === \"pending\") {\n return new subscriber_filterid_js_1.FilterIdPendingSubscriber(this);\n }\n if (sub.type === \"event\") {\n if (this._getOption(\"polling\")) {\n return new subscriber_polling_js_1.PollingEventSubscriber(this, sub.filter);\n }\n return new subscriber_filterid_js_1.FilterIdEventSubscriber(this, sub.filter);\n }\n if (sub.type === \"orphan\" && sub.filter.orphan === \"drop-log\") {\n return new abstract_provider_js_1.UnmanagedSubscriber(\"orphan\");\n }\n return super._getSubscriber(sub);\n }\n /**\n * Returns true only if the [[_start]] has been called.\n */\n get ready() {\n return this.#notReady == null;\n }\n /**\n * Returns %%tx%% as a normalized JSON-RPC transaction request,\n * which has all values hexlified and any numeric values converted\n * to Quantity values.\n */\n getRpcTransaction(tx) {\n const result = {};\n [\"chainId\", \"gasLimit\", \"gasPrice\", \"type\", \"maxFeePerGas\", \"maxPriorityFeePerGas\", \"nonce\", \"value\"].forEach((key) => {\n if (tx[key] == null) {\n return;\n }\n let dstKey = key;\n if (key === \"gasLimit\") {\n dstKey = \"gas\";\n }\n result[dstKey] = (0, index_js_5.toQuantity)((0, index_js_5.getBigInt)(tx[key], `tx.${key}`));\n });\n [\"from\", \"to\", \"data\"].forEach((key) => {\n if (tx[key] == null) {\n return;\n }\n result[key] = (0, index_js_5.hexlify)(tx[key]);\n });\n if (tx.accessList) {\n result[\"accessList\"] = (0, index_js_4.accessListify)(tx.accessList);\n }\n if (tx.blobVersionedHashes) {\n result[\"blobVersionedHashes\"] = tx.blobVersionedHashes.map((h4) => h4.toLowerCase());\n }\n if (tx.authorizationList) {\n result[\"authorizationList\"] = tx.authorizationList.map((_a) => {\n const a3 = (0, index_js_4.authorizationify)(_a);\n return {\n address: a3.address,\n nonce: (0, index_js_5.toQuantity)(a3.nonce),\n chainId: (0, index_js_5.toQuantity)(a3.chainId),\n yParity: (0, index_js_5.toQuantity)(a3.signature.yParity),\n r: (0, index_js_5.toQuantity)(a3.signature.r),\n s: (0, index_js_5.toQuantity)(a3.signature.s)\n };\n });\n }\n return result;\n }\n /**\n * Returns the request method and arguments required to perform\n * %%req%%.\n */\n getRpcRequest(req) {\n switch (req.method) {\n case \"chainId\":\n return { method: \"eth_chainId\", args: [] };\n case \"getBlockNumber\":\n return { method: \"eth_blockNumber\", args: [] };\n case \"getGasPrice\":\n return { method: \"eth_gasPrice\", args: [] };\n case \"getPriorityFee\":\n return { method: \"eth_maxPriorityFeePerGas\", args: [] };\n case \"getBalance\":\n return {\n method: \"eth_getBalance\",\n args: [getLowerCase(req.address), req.blockTag]\n };\n case \"getTransactionCount\":\n return {\n method: \"eth_getTransactionCount\",\n args: [getLowerCase(req.address), req.blockTag]\n };\n case \"getCode\":\n return {\n method: \"eth_getCode\",\n args: [getLowerCase(req.address), req.blockTag]\n };\n case \"getStorage\":\n return {\n method: \"eth_getStorageAt\",\n args: [\n getLowerCase(req.address),\n \"0x\" + req.position.toString(16),\n req.blockTag\n ]\n };\n case \"broadcastTransaction\":\n return {\n method: \"eth_sendRawTransaction\",\n args: [req.signedTransaction]\n };\n case \"getBlock\":\n if (\"blockTag\" in req) {\n return {\n method: \"eth_getBlockByNumber\",\n args: [req.blockTag, !!req.includeTransactions]\n };\n } else if (\"blockHash\" in req) {\n return {\n method: \"eth_getBlockByHash\",\n args: [req.blockHash, !!req.includeTransactions]\n };\n }\n break;\n case \"getTransaction\":\n return {\n method: \"eth_getTransactionByHash\",\n args: [req.hash]\n };\n case \"getTransactionReceipt\":\n return {\n method: \"eth_getTransactionReceipt\",\n args: [req.hash]\n };\n case \"call\":\n return {\n method: \"eth_call\",\n args: [this.getRpcTransaction(req.transaction), req.blockTag]\n };\n case \"estimateGas\": {\n return {\n method: \"eth_estimateGas\",\n args: [this.getRpcTransaction(req.transaction)]\n };\n }\n case \"getLogs\":\n if (req.filter && req.filter.address != null) {\n if (Array.isArray(req.filter.address)) {\n req.filter.address = req.filter.address.map(getLowerCase);\n } else {\n req.filter.address = getLowerCase(req.filter.address);\n }\n }\n return { method: \"eth_getLogs\", args: [req.filter] };\n }\n return null;\n }\n /**\n * Returns an ethers-style Error for the given JSON-RPC error\n * %%payload%%, coalescing the various strings and error shapes\n * that different nodes return, coercing them into a machine-readable\n * standardized error.\n */\n getRpcError(payload, _error) {\n const { method } = payload;\n const { error } = _error;\n if (method === \"eth_estimateGas\" && error.message) {\n const msg = error.message;\n if (!msg.match(/revert/i) && msg.match(/insufficient funds/i)) {\n return (0, index_js_5.makeError)(\"insufficient funds\", \"INSUFFICIENT_FUNDS\", {\n transaction: payload.params[0],\n info: { payload, error }\n });\n } else if (msg.match(/nonce/i) && msg.match(/too low/i)) {\n return (0, index_js_5.makeError)(\"nonce has already been used\", \"NONCE_EXPIRED\", {\n transaction: payload.params[0],\n info: { payload, error }\n });\n }\n }\n if (method === \"eth_call\" || method === \"eth_estimateGas\") {\n const result = spelunkData(error);\n const e3 = index_js_1.AbiCoder.getBuiltinCallException(method === \"eth_call\" ? \"call\" : \"estimateGas\", payload.params[0], result ? result.data : null);\n e3.info = { error, payload };\n return e3;\n }\n const message = JSON.stringify(spelunkMessage(error));\n if (typeof error.message === \"string\" && error.message.match(/user denied|ethers-user-denied/i)) {\n const actionMap = {\n eth_sign: \"signMessage\",\n personal_sign: \"signMessage\",\n eth_signTypedData_v4: \"signTypedData\",\n eth_signTransaction: \"signTransaction\",\n eth_sendTransaction: \"sendTransaction\",\n eth_requestAccounts: \"requestAccess\",\n wallet_requestAccounts: \"requestAccess\"\n };\n return (0, index_js_5.makeError)(`user rejected action`, \"ACTION_REJECTED\", {\n action: actionMap[method] || \"unknown\",\n reason: \"rejected\",\n info: { payload, error }\n });\n }\n if (method === \"eth_sendRawTransaction\" || method === \"eth_sendTransaction\") {\n const transaction = payload.params[0];\n if (message.match(/insufficient funds|base fee exceeds gas limit/i)) {\n return (0, index_js_5.makeError)(\"insufficient funds for intrinsic transaction cost\", \"INSUFFICIENT_FUNDS\", {\n transaction,\n info: { error }\n });\n }\n if (message.match(/nonce/i) && message.match(/too low/i)) {\n return (0, index_js_5.makeError)(\"nonce has already been used\", \"NONCE_EXPIRED\", { transaction, info: { error } });\n }\n if (message.match(/replacement transaction/i) && message.match(/underpriced/i)) {\n return (0, index_js_5.makeError)(\"replacement fee too low\", \"REPLACEMENT_UNDERPRICED\", { transaction, info: { error } });\n }\n if (message.match(/only replay-protected/i)) {\n return (0, index_js_5.makeError)(\"legacy pre-eip-155 transactions not supported\", \"UNSUPPORTED_OPERATION\", {\n operation: method,\n info: { transaction, info: { error } }\n });\n }\n }\n let unsupported = !!message.match(/the method .* does not exist/i);\n if (!unsupported) {\n if (error && error.details && error.details.startsWith(\"Unauthorized method:\")) {\n unsupported = true;\n }\n }\n if (unsupported) {\n return (0, index_js_5.makeError)(\"unsupported operation\", \"UNSUPPORTED_OPERATION\", {\n operation: payload.method,\n info: { error, payload }\n });\n }\n return (0, index_js_5.makeError)(\"could not coalesce error\", \"UNKNOWN_ERROR\", { error, payload });\n }\n /**\n * Requests the %%method%% with %%params%% via the JSON-RPC protocol\n * over the underlying channel. This can be used to call methods\n * on the backend that do not have a high-level API within the Provider\n * API.\n *\n * This method queues requests according to the batch constraints\n * in the options, assigns the request a unique ID.\n *\n * **Do NOT override** this method in sub-classes; instead\n * override [[_send]] or force the options values in the\n * call to the constructor to modify this method's behavior.\n */\n send(method, params) {\n if (this.destroyed) {\n return Promise.reject((0, index_js_5.makeError)(\"provider destroyed; cancelled request\", \"UNSUPPORTED_OPERATION\", { operation: method }));\n }\n const id = this.#nextId++;\n const promise = new Promise((resolve, reject) => {\n this.#payloads.push({\n resolve,\n reject,\n payload: { method, params, id, jsonrpc: \"2.0\" }\n });\n });\n this.#scheduleDrain();\n return promise;\n }\n /**\n * Resolves to the [[Signer]] account for %%address%% managed by\n * the client.\n *\n * If the %%address%% is a number, it is used as an index in the\n * the accounts from [[listAccounts]].\n *\n * This can only be used on clients which manage accounts (such as\n * Geth with imported account or MetaMask).\n *\n * Throws if the account doesn't exist.\n */\n async getSigner(address) {\n if (address == null) {\n address = 0;\n }\n const accountsPromise = this.send(\"eth_accounts\", []);\n if (typeof address === \"number\") {\n const accounts2 = await accountsPromise;\n if (address >= accounts2.length) {\n throw new Error(\"no such account\");\n }\n return new JsonRpcSigner(this, accounts2[address]);\n }\n const { accounts } = await (0, index_js_5.resolveProperties)({\n network: this.getNetwork(),\n accounts: accountsPromise\n });\n address = (0, index_js_2.getAddress)(address);\n for (const account of accounts) {\n if ((0, index_js_2.getAddress)(account) === address) {\n return new JsonRpcSigner(this, address);\n }\n }\n throw new Error(\"invalid account\");\n }\n async listAccounts() {\n const accounts = await this.send(\"eth_accounts\", []);\n return accounts.map((a3) => new JsonRpcSigner(this, a3));\n }\n destroy() {\n if (this.#drainTimer) {\n clearTimeout(this.#drainTimer);\n this.#drainTimer = null;\n }\n for (const { payload, reject } of this.#payloads) {\n reject((0, index_js_5.makeError)(\"provider destroyed; cancelled request\", \"UNSUPPORTED_OPERATION\", { operation: payload.method }));\n }\n this.#payloads = [];\n super.destroy();\n }\n };\n exports3.JsonRpcApiProvider = JsonRpcApiProvider;\n var JsonRpcApiPollingProvider = class extends JsonRpcApiProvider {\n #pollingInterval;\n constructor(network, options) {\n super(network, options);\n let pollingInterval = this._getOption(\"pollingInterval\");\n if (pollingInterval == null) {\n pollingInterval = defaultOptions.pollingInterval;\n }\n this.#pollingInterval = pollingInterval;\n }\n _getSubscriber(sub) {\n const subscriber = super._getSubscriber(sub);\n if (isPollable(subscriber)) {\n subscriber.pollingInterval = this.#pollingInterval;\n }\n return subscriber;\n }\n /**\n * The polling interval (default: 4000 ms)\n */\n get pollingInterval() {\n return this.#pollingInterval;\n }\n set pollingInterval(value) {\n if (!Number.isInteger(value) || value < 0) {\n throw new Error(\"invalid interval\");\n }\n this.#pollingInterval = value;\n this._forEachSubscriber((sub) => {\n if (isPollable(sub)) {\n sub.pollingInterval = this.#pollingInterval;\n }\n });\n }\n };\n exports3.JsonRpcApiPollingProvider = JsonRpcApiPollingProvider;\n var JsonRpcProvider = class extends JsonRpcApiPollingProvider {\n #connect;\n constructor(url, network, options) {\n if (url == null) {\n url = \"http://localhost:8545\";\n }\n super(network, options);\n if (typeof url === \"string\") {\n this.#connect = new index_js_5.FetchRequest(url);\n } else {\n this.#connect = url.clone();\n }\n }\n _getConnection() {\n return this.#connect.clone();\n }\n async send(method, params) {\n await this._start();\n return await super.send(method, params);\n }\n async _send(payload) {\n const request = this._getConnection();\n request.body = JSON.stringify(payload);\n request.setHeader(\"content-type\", \"application/json\");\n const response = await request.send();\n response.assertOk();\n let resp = response.bodyJson;\n if (!Array.isArray(resp)) {\n resp = [resp];\n }\n return resp;\n }\n };\n exports3.JsonRpcProvider = JsonRpcProvider;\n function spelunkData(value) {\n if (value == null) {\n return null;\n }\n if (typeof value.message === \"string\" && value.message.match(/revert/i) && (0, index_js_5.isHexString)(value.data)) {\n return { message: value.message, data: value.data };\n }\n if (typeof value === \"object\") {\n for (const key in value) {\n const result = spelunkData(value[key]);\n if (result) {\n return result;\n }\n }\n return null;\n }\n if (typeof value === \"string\") {\n try {\n return spelunkData(JSON.parse(value));\n } catch (error) {\n }\n }\n return null;\n }\n function _spelunkMessage(value, result) {\n if (value == null) {\n return;\n }\n if (typeof value.message === \"string\") {\n result.push(value.message);\n }\n if (typeof value === \"object\") {\n for (const key in value) {\n _spelunkMessage(value[key], result);\n }\n }\n if (typeof value === \"string\") {\n try {\n return _spelunkMessage(JSON.parse(value), result);\n } catch (error) {\n }\n }\n }\n function spelunkMessage(value) {\n const result = [];\n _spelunkMessage(value, result);\n return result;\n }\n }\n });\n\n // ../../../node_modules/.pnpm/ethers@6.15.0_bufferutil@4.0.9_utf-8-validate@5.0.10/node_modules/ethers/lib.commonjs/providers/provider-ankr.js\n var require_provider_ankr = __commonJS({\n \"../../../node_modules/.pnpm/ethers@6.15.0_bufferutil@4.0.9_utf-8-validate@5.0.10/node_modules/ethers/lib.commonjs/providers/provider-ankr.js\"(exports3) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n Object.defineProperty(exports3, \"__esModule\", { value: true });\n exports3.AnkrProvider = void 0;\n var index_js_1 = require_utils8();\n var community_js_1 = require_community();\n var network_js_1 = require_network();\n var provider_jsonrpc_js_1 = require_provider_jsonrpc();\n var defaultApiKey = \"9f7d929b018cdffb338517efa06f58359e86ff1ffd350bc889738523659e7972\";\n function getHost(name) {\n switch (name) {\n case \"mainnet\":\n return \"rpc.ankr.com/eth\";\n case \"goerli\":\n return \"rpc.ankr.com/eth_goerli\";\n case \"sepolia\":\n return \"rpc.ankr.com/eth_sepolia\";\n case \"arbitrum\":\n return \"rpc.ankr.com/arbitrum\";\n case \"base\":\n return \"rpc.ankr.com/base\";\n case \"base-goerli\":\n return \"rpc.ankr.com/base_goerli\";\n case \"base-sepolia\":\n return \"rpc.ankr.com/base_sepolia\";\n case \"bnb\":\n return \"rpc.ankr.com/bsc\";\n case \"bnbt\":\n return \"rpc.ankr.com/bsc_testnet_chapel\";\n case \"matic\":\n return \"rpc.ankr.com/polygon\";\n case \"matic-mumbai\":\n return \"rpc.ankr.com/polygon_mumbai\";\n case \"optimism\":\n return \"rpc.ankr.com/optimism\";\n case \"optimism-goerli\":\n return \"rpc.ankr.com/optimism_testnet\";\n case \"optimism-sepolia\":\n return \"rpc.ankr.com/optimism_sepolia\";\n }\n (0, index_js_1.assertArgument)(false, \"unsupported network\", \"network\", name);\n }\n var AnkrProvider = class _AnkrProvider extends provider_jsonrpc_js_1.JsonRpcProvider {\n /**\n * The API key for the Ankr connection.\n */\n apiKey;\n /**\n * Create a new **AnkrProvider**.\n *\n * By default connecting to ``mainnet`` with a highly throttled\n * API key.\n */\n constructor(_network, apiKey) {\n if (_network == null) {\n _network = \"mainnet\";\n }\n const network = network_js_1.Network.from(_network);\n if (apiKey == null) {\n apiKey = defaultApiKey;\n }\n const options = { polling: true, staticNetwork: network };\n const request = _AnkrProvider.getRequest(network, apiKey);\n super(request, network, options);\n (0, index_js_1.defineProperties)(this, { apiKey });\n }\n _getProvider(chainId) {\n try {\n return new _AnkrProvider(chainId, this.apiKey);\n } catch (error) {\n }\n return super._getProvider(chainId);\n }\n /**\n * Returns a prepared request for connecting to %%network%% with\n * %%apiKey%%.\n */\n static getRequest(network, apiKey) {\n if (apiKey == null) {\n apiKey = defaultApiKey;\n }\n const request = new index_js_1.FetchRequest(`https://${getHost(network.name)}/${apiKey}`);\n request.allowGzip = true;\n if (apiKey === defaultApiKey) {\n request.retryFunc = async (request2, response, attempt) => {\n (0, community_js_1.showThrottleMessage)(\"AnkrProvider\");\n return true;\n };\n }\n return request;\n }\n getRpcError(payload, error) {\n if (payload.method === \"eth_sendRawTransaction\") {\n if (error && error.error && error.error.message === \"INTERNAL_ERROR: could not replace existing tx\") {\n error.error.message = \"replacement transaction underpriced\";\n }\n }\n return super.getRpcError(payload, error);\n }\n isCommunityResource() {\n return this.apiKey === defaultApiKey;\n }\n };\n exports3.AnkrProvider = AnkrProvider;\n }\n });\n\n // ../../../node_modules/.pnpm/ethers@6.15.0_bufferutil@4.0.9_utf-8-validate@5.0.10/node_modules/ethers/lib.commonjs/providers/provider-alchemy.js\n var require_provider_alchemy = __commonJS({\n \"../../../node_modules/.pnpm/ethers@6.15.0_bufferutil@4.0.9_utf-8-validate@5.0.10/node_modules/ethers/lib.commonjs/providers/provider-alchemy.js\"(exports3) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n Object.defineProperty(exports3, \"__esModule\", { value: true });\n exports3.AlchemyProvider = void 0;\n var index_js_1 = require_utils8();\n var community_js_1 = require_community();\n var network_js_1 = require_network();\n var provider_jsonrpc_js_1 = require_provider_jsonrpc();\n var defaultApiKey = \"_gg7wSSi0KMBsdKnGVfHDueq6xMB9EkC\";\n function getHost(name) {\n switch (name) {\n case \"mainnet\":\n return \"eth-mainnet.alchemyapi.io\";\n case \"goerli\":\n return \"eth-goerli.g.alchemy.com\";\n case \"sepolia\":\n return \"eth-sepolia.g.alchemy.com\";\n case \"arbitrum\":\n return \"arb-mainnet.g.alchemy.com\";\n case \"arbitrum-goerli\":\n return \"arb-goerli.g.alchemy.com\";\n case \"arbitrum-sepolia\":\n return \"arb-sepolia.g.alchemy.com\";\n case \"base\":\n return \"base-mainnet.g.alchemy.com\";\n case \"base-goerli\":\n return \"base-goerli.g.alchemy.com\";\n case \"base-sepolia\":\n return \"base-sepolia.g.alchemy.com\";\n case \"matic\":\n return \"polygon-mainnet.g.alchemy.com\";\n case \"matic-amoy\":\n return \"polygon-amoy.g.alchemy.com\";\n case \"matic-mumbai\":\n return \"polygon-mumbai.g.alchemy.com\";\n case \"optimism\":\n return \"opt-mainnet.g.alchemy.com\";\n case \"optimism-goerli\":\n return \"opt-goerli.g.alchemy.com\";\n case \"optimism-sepolia\":\n return \"opt-sepolia.g.alchemy.com\";\n }\n (0, index_js_1.assertArgument)(false, \"unsupported network\", \"network\", name);\n }\n var AlchemyProvider = class _AlchemyProvider extends provider_jsonrpc_js_1.JsonRpcProvider {\n apiKey;\n constructor(_network, apiKey) {\n if (_network == null) {\n _network = \"mainnet\";\n }\n const network = network_js_1.Network.from(_network);\n if (apiKey == null) {\n apiKey = defaultApiKey;\n }\n const request = _AlchemyProvider.getRequest(network, apiKey);\n super(request, network, { staticNetwork: network });\n (0, index_js_1.defineProperties)(this, { apiKey });\n }\n _getProvider(chainId) {\n try {\n return new _AlchemyProvider(chainId, this.apiKey);\n } catch (error) {\n }\n return super._getProvider(chainId);\n }\n async _perform(req) {\n if (req.method === \"getTransactionResult\") {\n const { trace, tx } = await (0, index_js_1.resolveProperties)({\n trace: this.send(\"trace_transaction\", [req.hash]),\n tx: this.getTransaction(req.hash)\n });\n if (trace == null || tx == null) {\n return null;\n }\n let data;\n let error = false;\n try {\n data = trace[0].result.output;\n error = trace[0].error === \"Reverted\";\n } catch (error2) {\n }\n if (data) {\n (0, index_js_1.assert)(!error, \"an error occurred during transaction executions\", \"CALL_EXCEPTION\", {\n action: \"getTransactionResult\",\n data,\n reason: null,\n transaction: tx,\n invocation: null,\n revert: null\n // @TODO\n });\n return data;\n }\n (0, index_js_1.assert)(false, \"could not parse trace result\", \"BAD_DATA\", { value: trace });\n }\n return await super._perform(req);\n }\n isCommunityResource() {\n return this.apiKey === defaultApiKey;\n }\n static getRequest(network, apiKey) {\n if (apiKey == null) {\n apiKey = defaultApiKey;\n }\n const request = new index_js_1.FetchRequest(`https://${getHost(network.name)}/v2/${apiKey}`);\n request.allowGzip = true;\n if (apiKey === defaultApiKey) {\n request.retryFunc = async (request2, response, attempt) => {\n (0, community_js_1.showThrottleMessage)(\"alchemy\");\n return true;\n };\n }\n return request;\n }\n };\n exports3.AlchemyProvider = AlchemyProvider;\n }\n });\n\n // ../../../node_modules/.pnpm/ethers@6.15.0_bufferutil@4.0.9_utf-8-validate@5.0.10/node_modules/ethers/lib.commonjs/providers/provider-chainstack.js\n var require_provider_chainstack = __commonJS({\n \"../../../node_modules/.pnpm/ethers@6.15.0_bufferutil@4.0.9_utf-8-validate@5.0.10/node_modules/ethers/lib.commonjs/providers/provider-chainstack.js\"(exports3) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n Object.defineProperty(exports3, \"__esModule\", { value: true });\n exports3.ChainstackProvider = void 0;\n var index_js_1 = require_utils8();\n var community_js_1 = require_community();\n var network_js_1 = require_network();\n var provider_jsonrpc_js_1 = require_provider_jsonrpc();\n function getApiKey(name) {\n switch (name) {\n case \"mainnet\":\n return \"39f1d67cedf8b7831010a665328c9197\";\n case \"arbitrum\":\n return \"0550c209db33c3abf4cc927e1e18cea1\";\n case \"bnb\":\n return \"98b5a77e531614387366f6fc5da097f8\";\n case \"matic\":\n return \"cd9d4d70377471aa7c142ec4a4205249\";\n }\n (0, index_js_1.assertArgument)(false, \"unsupported network\", \"network\", name);\n }\n function getHost(name) {\n switch (name) {\n case \"mainnet\":\n return \"ethereum-mainnet.core.chainstack.com\";\n case \"arbitrum\":\n return \"arbitrum-mainnet.core.chainstack.com\";\n case \"bnb\":\n return \"bsc-mainnet.core.chainstack.com\";\n case \"matic\":\n return \"polygon-mainnet.core.chainstack.com\";\n }\n (0, index_js_1.assertArgument)(false, \"unsupported network\", \"network\", name);\n }\n var ChainstackProvider = class _ChainstackProvider extends provider_jsonrpc_js_1.JsonRpcProvider {\n /**\n * The API key for the Chainstack connection.\n */\n apiKey;\n /**\n * Creates a new **ChainstackProvider**.\n */\n constructor(_network, apiKey) {\n if (_network == null) {\n _network = \"mainnet\";\n }\n const network = network_js_1.Network.from(_network);\n if (apiKey == null) {\n apiKey = getApiKey(network.name);\n }\n const request = _ChainstackProvider.getRequest(network, apiKey);\n super(request, network, { staticNetwork: network });\n (0, index_js_1.defineProperties)(this, { apiKey });\n }\n _getProvider(chainId) {\n try {\n return new _ChainstackProvider(chainId, this.apiKey);\n } catch (error) {\n }\n return super._getProvider(chainId);\n }\n isCommunityResource() {\n return this.apiKey === getApiKey(this._network.name);\n }\n /**\n * Returns a prepared request for connecting to %%network%%\n * with %%apiKey%% and %%projectSecret%%.\n */\n static getRequest(network, apiKey) {\n if (apiKey == null) {\n apiKey = getApiKey(network.name);\n }\n const request = new index_js_1.FetchRequest(`https://${getHost(network.name)}/${apiKey}`);\n request.allowGzip = true;\n if (apiKey === getApiKey(network.name)) {\n request.retryFunc = async (request2, response, attempt) => {\n (0, community_js_1.showThrottleMessage)(\"ChainstackProvider\");\n return true;\n };\n }\n return request;\n }\n };\n exports3.ChainstackProvider = ChainstackProvider;\n }\n });\n\n // ../../../node_modules/.pnpm/ethers@6.15.0_bufferutil@4.0.9_utf-8-validate@5.0.10/node_modules/ethers/lib.commonjs/providers/provider-cloudflare.js\n var require_provider_cloudflare = __commonJS({\n \"../../../node_modules/.pnpm/ethers@6.15.0_bufferutil@4.0.9_utf-8-validate@5.0.10/node_modules/ethers/lib.commonjs/providers/provider-cloudflare.js\"(exports3) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n Object.defineProperty(exports3, \"__esModule\", { value: true });\n exports3.CloudflareProvider = void 0;\n var index_js_1 = require_utils8();\n var network_js_1 = require_network();\n var provider_jsonrpc_js_1 = require_provider_jsonrpc();\n var CloudflareProvider = class extends provider_jsonrpc_js_1.JsonRpcProvider {\n constructor(_network) {\n if (_network == null) {\n _network = \"mainnet\";\n }\n const network = network_js_1.Network.from(_network);\n (0, index_js_1.assertArgument)(network.name === \"mainnet\", \"unsupported network\", \"network\", _network);\n super(\"https://cloudflare-eth.com/\", network, { staticNetwork: network });\n }\n };\n exports3.CloudflareProvider = CloudflareProvider;\n }\n });\n\n // ../../../node_modules/.pnpm/ethers@6.15.0_bufferutil@4.0.9_utf-8-validate@5.0.10/node_modules/ethers/lib.commonjs/providers/provider-etherscan.js\n var require_provider_etherscan = __commonJS({\n \"../../../node_modules/.pnpm/ethers@6.15.0_bufferutil@4.0.9_utf-8-validate@5.0.10/node_modules/ethers/lib.commonjs/providers/provider-etherscan.js\"(exports3) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n Object.defineProperty(exports3, \"__esModule\", { value: true });\n exports3.EtherscanProvider = exports3.EtherscanPlugin = void 0;\n var index_js_1 = require_abi();\n var index_js_2 = require_contract2();\n var index_js_3 = require_transaction2();\n var index_js_4 = require_utils8();\n var abstract_provider_js_1 = require_abstract_provider();\n var network_js_1 = require_network();\n var plugins_network_js_1 = require_plugins_network();\n var community_js_1 = require_community();\n var THROTTLE = 2e3;\n function isPromise(value) {\n return value && typeof value.then === \"function\";\n }\n var EtherscanPluginId = \"org.ethers.plugins.provider.Etherscan\";\n var EtherscanPlugin = class _EtherscanPlugin extends plugins_network_js_1.NetworkPlugin {\n /**\n * The Etherscan API base URL.\n */\n baseUrl;\n /**\n * Creates a new **EtherscanProvider** which will use\n * %%baseUrl%%.\n */\n constructor(baseUrl) {\n super(EtherscanPluginId);\n (0, index_js_4.defineProperties)(this, { baseUrl });\n }\n clone() {\n return new _EtherscanPlugin(this.baseUrl);\n }\n };\n exports3.EtherscanPlugin = EtherscanPlugin;\n var skipKeys = [\"enableCcipRead\"];\n var nextId = 1;\n var EtherscanProvider = class extends abstract_provider_js_1.AbstractProvider {\n /**\n * The connected network.\n */\n network;\n /**\n * The API key or null if using the community provided bandwidth.\n */\n apiKey;\n #plugin;\n /**\n * Creates a new **EtherscanBaseProvider**.\n */\n constructor(_network, _apiKey) {\n const apiKey = _apiKey != null ? _apiKey : null;\n super();\n const network = network_js_1.Network.from(_network);\n this.#plugin = network.getPlugin(EtherscanPluginId);\n (0, index_js_4.defineProperties)(this, { apiKey, network });\n }\n /**\n * Returns the base URL.\n *\n * If an [[EtherscanPlugin]] is configured on the\n * [[EtherscanBaseProvider_network]], returns the plugin's\n * baseUrl.\n *\n * Deprecated; for Etherscan v2 the base is no longer a simply\n * host, but instead a URL including a chainId parameter. Changing\n * this to return a URL prefix could break some libraries, so it\n * is left intact but will be removed in the future as it is unused.\n */\n getBaseUrl() {\n if (this.#plugin) {\n return this.#plugin.baseUrl;\n }\n switch (this.network.name) {\n case \"mainnet\":\n return \"https://api.etherscan.io\";\n case \"goerli\":\n return \"https://api-goerli.etherscan.io\";\n case \"sepolia\":\n return \"https://api-sepolia.etherscan.io\";\n case \"holesky\":\n return \"https://api-holesky.etherscan.io\";\n case \"arbitrum\":\n return \"https://api.arbiscan.io\";\n case \"arbitrum-goerli\":\n return \"https://api-goerli.arbiscan.io\";\n case \"base\":\n return \"https://api.basescan.org\";\n case \"base-sepolia\":\n return \"https://api-sepolia.basescan.org\";\n case \"bnb\":\n return \"https://api.bscscan.com\";\n case \"bnbt\":\n return \"https://api-testnet.bscscan.com\";\n case \"matic\":\n return \"https://api.polygonscan.com\";\n case \"matic-amoy\":\n return \"https://api-amoy.polygonscan.com\";\n case \"matic-mumbai\":\n return \"https://api-testnet.polygonscan.com\";\n case \"optimism\":\n return \"https://api-optimistic.etherscan.io\";\n case \"optimism-goerli\":\n return \"https://api-goerli-optimistic.etherscan.io\";\n default:\n }\n (0, index_js_4.assertArgument)(false, \"unsupported network\", \"network\", this.network);\n }\n /**\n * Returns the URL for the %%module%% and %%params%%.\n */\n getUrl(module2, params) {\n let query = Object.keys(params).reduce((accum, key) => {\n const value = params[key];\n if (value != null) {\n accum += `&${key}=${value}`;\n }\n return accum;\n }, \"\");\n if (this.apiKey) {\n query += `&apikey=${this.apiKey}`;\n }\n return `https://api.etherscan.io/v2/api?chainid=${this.network.chainId}&module=${module2}${query}`;\n }\n /**\n * Returns the URL for using POST requests.\n */\n getPostUrl() {\n return `https://api.etherscan.io/v2/api?chainid=${this.network.chainId}`;\n }\n /**\n * Returns the parameters for using POST requests.\n */\n getPostData(module2, params) {\n params.module = module2;\n params.apikey = this.apiKey;\n params.chainid = this.network.chainId;\n return params;\n }\n async detectNetwork() {\n return this.network;\n }\n /**\n * Resolves to the result of calling %%module%% with %%params%%.\n *\n * If %%post%%, the request is made as a POST request.\n */\n async fetch(module2, params, post) {\n const id = nextId++;\n const url = post ? this.getPostUrl() : this.getUrl(module2, params);\n const payload = post ? this.getPostData(module2, params) : null;\n this.emit(\"debug\", { action: \"sendRequest\", id, url, payload });\n const request = new index_js_4.FetchRequest(url);\n request.setThrottleParams({ slotInterval: 1e3 });\n request.retryFunc = (req, resp, attempt) => {\n if (this.isCommunityResource()) {\n (0, community_js_1.showThrottleMessage)(\"Etherscan\");\n }\n return Promise.resolve(true);\n };\n request.processFunc = async (request2, response2) => {\n const result2 = response2.hasBody() ? JSON.parse((0, index_js_4.toUtf8String)(response2.body)) : {};\n const throttle = (typeof result2.result === \"string\" ? result2.result : \"\").toLowerCase().indexOf(\"rate limit\") >= 0;\n if (module2 === \"proxy\") {\n if (result2 && result2.status == 0 && result2.message == \"NOTOK\" && throttle) {\n this.emit(\"debug\", { action: \"receiveError\", id, reason: \"proxy-NOTOK\", error: result2 });\n response2.throwThrottleError(result2.result, THROTTLE);\n }\n } else {\n if (throttle) {\n this.emit(\"debug\", { action: \"receiveError\", id, reason: \"null result\", error: result2.result });\n response2.throwThrottleError(result2.result, THROTTLE);\n }\n }\n return response2;\n };\n if (payload) {\n request.setHeader(\"content-type\", \"application/x-www-form-urlencoded; charset=UTF-8\");\n request.body = Object.keys(payload).map((k4) => `${k4}=${payload[k4]}`).join(\"&\");\n }\n const response = await request.send();\n try {\n response.assertOk();\n } catch (error) {\n this.emit(\"debug\", { action: \"receiveError\", id, error, reason: \"assertOk\" });\n (0, index_js_4.assert)(false, \"response error\", \"SERVER_ERROR\", { request, response });\n }\n if (!response.hasBody()) {\n this.emit(\"debug\", { action: \"receiveError\", id, error: \"missing body\", reason: \"null body\" });\n (0, index_js_4.assert)(false, \"missing response\", \"SERVER_ERROR\", { request, response });\n }\n const result = JSON.parse((0, index_js_4.toUtf8String)(response.body));\n if (module2 === \"proxy\") {\n if (result.jsonrpc != \"2.0\") {\n this.emit(\"debug\", { action: \"receiveError\", id, result, reason: \"invalid JSON-RPC\" });\n (0, index_js_4.assert)(false, \"invalid JSON-RPC response (missing jsonrpc='2.0')\", \"SERVER_ERROR\", { request, response, info: { result } });\n }\n if (result.error) {\n this.emit(\"debug\", { action: \"receiveError\", id, result, reason: \"JSON-RPC error\" });\n (0, index_js_4.assert)(false, \"error response\", \"SERVER_ERROR\", { request, response, info: { result } });\n }\n this.emit(\"debug\", { action: \"receiveRequest\", id, result });\n return result.result;\n } else {\n if (result.status == 0 && (result.message === \"No records found\" || result.message === \"No transactions found\")) {\n this.emit(\"debug\", { action: \"receiveRequest\", id, result });\n return result.result;\n }\n if (result.status != 1 || typeof result.message === \"string\" && !result.message.match(/^OK/)) {\n this.emit(\"debug\", { action: \"receiveError\", id, result });\n (0, index_js_4.assert)(false, \"error response\", \"SERVER_ERROR\", { request, response, info: { result } });\n }\n this.emit(\"debug\", { action: \"receiveRequest\", id, result });\n return result.result;\n }\n }\n /**\n * Returns %%transaction%% normalized for the Etherscan API.\n */\n _getTransactionPostData(transaction) {\n const result = {};\n for (let key in transaction) {\n if (skipKeys.indexOf(key) >= 0) {\n continue;\n }\n if (transaction[key] == null) {\n continue;\n }\n let value = transaction[key];\n if (key === \"type\" && value === 0) {\n continue;\n }\n if (key === \"blockTag\" && value === \"latest\") {\n continue;\n }\n if ({ type: true, gasLimit: true, gasPrice: true, maxFeePerGs: true, maxPriorityFeePerGas: true, nonce: true, value: true }[key]) {\n value = (0, index_js_4.toQuantity)(value);\n } else if (key === \"accessList\") {\n value = \"[\" + (0, index_js_3.accessListify)(value).map((set) => {\n return `{address:\"${set.address}\",storageKeys:[\"${set.storageKeys.join('\",\"')}\"]}`;\n }).join(\",\") + \"]\";\n } else if (key === \"blobVersionedHashes\") {\n if (value.length === 0) {\n continue;\n }\n (0, index_js_4.assert)(false, \"Etherscan API does not support blobVersionedHashes\", \"UNSUPPORTED_OPERATION\", {\n operation: \"_getTransactionPostData\",\n info: { transaction }\n });\n } else {\n value = (0, index_js_4.hexlify)(value);\n }\n result[key] = value;\n }\n return result;\n }\n /**\n * Throws the normalized Etherscan error.\n */\n _checkError(req, error, transaction) {\n let message = \"\";\n if ((0, index_js_4.isError)(error, \"SERVER_ERROR\")) {\n try {\n message = error.info.result.error.message;\n } catch (e3) {\n }\n if (!message) {\n try {\n message = error.info.message;\n } catch (e3) {\n }\n }\n }\n if (req.method === \"estimateGas\") {\n if (!message.match(/revert/i) && message.match(/insufficient funds/i)) {\n (0, index_js_4.assert)(false, \"insufficient funds\", \"INSUFFICIENT_FUNDS\", {\n transaction: req.transaction\n });\n }\n }\n if (req.method === \"call\" || req.method === \"estimateGas\") {\n if (message.match(/execution reverted/i)) {\n let data = \"\";\n try {\n data = error.info.result.error.data;\n } catch (error2) {\n }\n const e3 = index_js_1.AbiCoder.getBuiltinCallException(req.method, req.transaction, data);\n e3.info = { request: req, error };\n throw e3;\n }\n }\n if (message) {\n if (req.method === \"broadcastTransaction\") {\n const transaction2 = index_js_3.Transaction.from(req.signedTransaction);\n if (message.match(/replacement/i) && message.match(/underpriced/i)) {\n (0, index_js_4.assert)(false, \"replacement fee too low\", \"REPLACEMENT_UNDERPRICED\", {\n transaction: transaction2\n });\n }\n if (message.match(/insufficient funds/)) {\n (0, index_js_4.assert)(false, \"insufficient funds for intrinsic transaction cost\", \"INSUFFICIENT_FUNDS\", {\n transaction: transaction2\n });\n }\n if (message.match(/same hash was already imported|transaction nonce is too low|nonce too low/)) {\n (0, index_js_4.assert)(false, \"nonce has already been used\", \"NONCE_EXPIRED\", {\n transaction: transaction2\n });\n }\n }\n }\n throw error;\n }\n async _detectNetwork() {\n return this.network;\n }\n async _perform(req) {\n switch (req.method) {\n case \"chainId\":\n return this.network.chainId;\n case \"getBlockNumber\":\n return this.fetch(\"proxy\", { action: \"eth_blockNumber\" });\n case \"getGasPrice\":\n return this.fetch(\"proxy\", { action: \"eth_gasPrice\" });\n case \"getPriorityFee\":\n if (this.network.name === \"mainnet\") {\n return \"1000000000\";\n } else if (this.network.name === \"optimism\") {\n return \"1000000\";\n } else {\n throw new Error(\"fallback onto the AbstractProvider default\");\n }\n case \"getBalance\":\n return this.fetch(\"account\", {\n action: \"balance\",\n address: req.address,\n tag: req.blockTag\n });\n case \"getTransactionCount\":\n return this.fetch(\"proxy\", {\n action: \"eth_getTransactionCount\",\n address: req.address,\n tag: req.blockTag\n });\n case \"getCode\":\n return this.fetch(\"proxy\", {\n action: \"eth_getCode\",\n address: req.address,\n tag: req.blockTag\n });\n case \"getStorage\":\n return this.fetch(\"proxy\", {\n action: \"eth_getStorageAt\",\n address: req.address,\n position: req.position,\n tag: req.blockTag\n });\n case \"broadcastTransaction\":\n return this.fetch(\"proxy\", {\n action: \"eth_sendRawTransaction\",\n hex: req.signedTransaction\n }, true).catch((error) => {\n return this._checkError(req, error, req.signedTransaction);\n });\n case \"getBlock\":\n if (\"blockTag\" in req) {\n return this.fetch(\"proxy\", {\n action: \"eth_getBlockByNumber\",\n tag: req.blockTag,\n boolean: req.includeTransactions ? \"true\" : \"false\"\n });\n }\n (0, index_js_4.assert)(false, \"getBlock by blockHash not supported by Etherscan\", \"UNSUPPORTED_OPERATION\", {\n operation: \"getBlock(blockHash)\"\n });\n case \"getTransaction\":\n return this.fetch(\"proxy\", {\n action: \"eth_getTransactionByHash\",\n txhash: req.hash\n });\n case \"getTransactionReceipt\":\n return this.fetch(\"proxy\", {\n action: \"eth_getTransactionReceipt\",\n txhash: req.hash\n });\n case \"call\": {\n if (req.blockTag !== \"latest\") {\n throw new Error(\"EtherscanProvider does not support blockTag for call\");\n }\n const postData = this._getTransactionPostData(req.transaction);\n postData.module = \"proxy\";\n postData.action = \"eth_call\";\n try {\n return await this.fetch(\"proxy\", postData, true);\n } catch (error) {\n return this._checkError(req, error, req.transaction);\n }\n }\n case \"estimateGas\": {\n const postData = this._getTransactionPostData(req.transaction);\n postData.module = \"proxy\";\n postData.action = \"eth_estimateGas\";\n try {\n return await this.fetch(\"proxy\", postData, true);\n } catch (error) {\n return this._checkError(req, error, req.transaction);\n }\n }\n default:\n break;\n }\n return super._perform(req);\n }\n async getNetwork() {\n return this.network;\n }\n /**\n * Resolves to the current price of ether.\n *\n * This returns ``0`` on any network other than ``mainnet``.\n */\n async getEtherPrice() {\n if (this.network.name !== \"mainnet\") {\n return 0;\n }\n return parseFloat((await this.fetch(\"stats\", { action: \"ethprice\" })).ethusd);\n }\n /**\n * Resolves to a [Contract]] for %%address%%, using the\n * Etherscan API to retreive the Contract ABI.\n */\n async getContract(_address) {\n let address = this._getAddress(_address);\n if (isPromise(address)) {\n address = await address;\n }\n try {\n const resp = await this.fetch(\"contract\", {\n action: \"getabi\",\n address\n });\n const abi2 = JSON.parse(resp);\n return new index_js_2.Contract(address, abi2, this);\n } catch (error) {\n return null;\n }\n }\n isCommunityResource() {\n return this.apiKey == null;\n }\n };\n exports3.EtherscanProvider = EtherscanProvider;\n }\n });\n\n // ../../../node_modules/.pnpm/ethers@6.15.0_bufferutil@4.0.9_utf-8-validate@5.0.10/node_modules/ethers/lib.commonjs/providers/ws-browser.js\n var require_ws_browser = __commonJS({\n \"../../../node_modules/.pnpm/ethers@6.15.0_bufferutil@4.0.9_utf-8-validate@5.0.10/node_modules/ethers/lib.commonjs/providers/ws-browser.js\"(exports3) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n Object.defineProperty(exports3, \"__esModule\", { value: true });\n exports3.WebSocket = void 0;\n function getGlobal() {\n if (typeof self !== \"undefined\") {\n return self;\n }\n if (typeof window !== \"undefined\") {\n return window;\n }\n if (typeof global !== \"undefined\") {\n return global;\n }\n throw new Error(\"unable to locate global object\");\n }\n var _WebSocket = getGlobal().WebSocket;\n exports3.WebSocket = _WebSocket;\n }\n });\n\n // ../../../node_modules/.pnpm/ethers@6.15.0_bufferutil@4.0.9_utf-8-validate@5.0.10/node_modules/ethers/lib.commonjs/providers/provider-socket.js\n var require_provider_socket = __commonJS({\n \"../../../node_modules/.pnpm/ethers@6.15.0_bufferutil@4.0.9_utf-8-validate@5.0.10/node_modules/ethers/lib.commonjs/providers/provider-socket.js\"(exports3) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n Object.defineProperty(exports3, \"__esModule\", { value: true });\n exports3.SocketProvider = exports3.SocketEventSubscriber = exports3.SocketPendingSubscriber = exports3.SocketBlockSubscriber = exports3.SocketSubscriber = void 0;\n var abstract_provider_js_1 = require_abstract_provider();\n var index_js_1 = require_utils8();\n var provider_jsonrpc_js_1 = require_provider_jsonrpc();\n var SocketSubscriber = class {\n #provider;\n #filter;\n /**\n * The filter.\n */\n get filter() {\n return JSON.parse(this.#filter);\n }\n #filterId;\n #paused;\n #emitPromise;\n /**\n * Creates a new **SocketSubscriber** attached to %%provider%% listening\n * to %%filter%%.\n */\n constructor(provider, filter) {\n this.#provider = provider;\n this.#filter = JSON.stringify(filter);\n this.#filterId = null;\n this.#paused = null;\n this.#emitPromise = null;\n }\n start() {\n this.#filterId = this.#provider.send(\"eth_subscribe\", this.filter).then((filterId) => {\n ;\n this.#provider._register(filterId, this);\n return filterId;\n });\n }\n stop() {\n this.#filterId.then((filterId) => {\n if (this.#provider.destroyed) {\n return;\n }\n this.#provider.send(\"eth_unsubscribe\", [filterId]);\n });\n this.#filterId = null;\n }\n // @TODO: pause should trap the current blockNumber, unsub, and on resume use getLogs\n // and resume\n pause(dropWhilePaused) {\n (0, index_js_1.assert)(dropWhilePaused, \"preserve logs while paused not supported by SocketSubscriber yet\", \"UNSUPPORTED_OPERATION\", { operation: \"pause(false)\" });\n this.#paused = !!dropWhilePaused;\n }\n resume() {\n this.#paused = null;\n }\n /**\n * @_ignore:\n */\n _handleMessage(message) {\n if (this.#filterId == null) {\n return;\n }\n if (this.#paused === null) {\n let emitPromise = this.#emitPromise;\n if (emitPromise == null) {\n emitPromise = this._emit(this.#provider, message);\n } else {\n emitPromise = emitPromise.then(async () => {\n await this._emit(this.#provider, message);\n });\n }\n this.#emitPromise = emitPromise.then(() => {\n if (this.#emitPromise === emitPromise) {\n this.#emitPromise = null;\n }\n });\n }\n }\n /**\n * Sub-classes **must** override this to emit the events on the\n * provider.\n */\n async _emit(provider, message) {\n throw new Error(\"sub-classes must implemente this; _emit\");\n }\n };\n exports3.SocketSubscriber = SocketSubscriber;\n var SocketBlockSubscriber = class extends SocketSubscriber {\n /**\n * @_ignore:\n */\n constructor(provider) {\n super(provider, [\"newHeads\"]);\n }\n async _emit(provider, message) {\n provider.emit(\"block\", parseInt(message.number));\n }\n };\n exports3.SocketBlockSubscriber = SocketBlockSubscriber;\n var SocketPendingSubscriber = class extends SocketSubscriber {\n /**\n * @_ignore:\n */\n constructor(provider) {\n super(provider, [\"newPendingTransactions\"]);\n }\n async _emit(provider, message) {\n provider.emit(\"pending\", message);\n }\n };\n exports3.SocketPendingSubscriber = SocketPendingSubscriber;\n var SocketEventSubscriber = class extends SocketSubscriber {\n #logFilter;\n /**\n * The filter.\n */\n get logFilter() {\n return JSON.parse(this.#logFilter);\n }\n /**\n * @_ignore:\n */\n constructor(provider, filter) {\n super(provider, [\"logs\", filter]);\n this.#logFilter = JSON.stringify(filter);\n }\n async _emit(provider, message) {\n provider.emit(this.logFilter, provider._wrapLog(message, provider._network));\n }\n };\n exports3.SocketEventSubscriber = SocketEventSubscriber;\n var SocketProvider = class extends provider_jsonrpc_js_1.JsonRpcApiProvider {\n #callbacks;\n // Maps each filterId to its subscriber\n #subs;\n // If any events come in before a subscriber has finished\n // registering, queue them\n #pending;\n /**\n * Creates a new **SocketProvider** connected to %%network%%.\n *\n * If unspecified, the network will be discovered.\n */\n constructor(network, _options) {\n const options = Object.assign({}, _options != null ? _options : {});\n (0, index_js_1.assertArgument)(options.batchMaxCount == null || options.batchMaxCount === 1, \"sockets-based providers do not support batches\", \"options.batchMaxCount\", _options);\n options.batchMaxCount = 1;\n if (options.staticNetwork == null) {\n options.staticNetwork = true;\n }\n super(network, options);\n this.#callbacks = /* @__PURE__ */ new Map();\n this.#subs = /* @__PURE__ */ new Map();\n this.#pending = /* @__PURE__ */ new Map();\n }\n // This value is only valid after _start has been called\n /*\n get _network(): Network {\n if (this.#network == null) {\n throw new Error(\"this shouldn't happen\");\n }\n return this.#network.clone();\n }\n */\n _getSubscriber(sub) {\n switch (sub.type) {\n case \"close\":\n return new abstract_provider_js_1.UnmanagedSubscriber(\"close\");\n case \"block\":\n return new SocketBlockSubscriber(this);\n case \"pending\":\n return new SocketPendingSubscriber(this);\n case \"event\":\n return new SocketEventSubscriber(this, sub.filter);\n case \"orphan\":\n if (sub.filter.orphan === \"drop-log\") {\n return new abstract_provider_js_1.UnmanagedSubscriber(\"drop-log\");\n }\n }\n return super._getSubscriber(sub);\n }\n /**\n * Register a new subscriber. This is used internalled by Subscribers\n * and generally is unecessary unless extending capabilities.\n */\n _register(filterId, subscriber) {\n this.#subs.set(filterId, subscriber);\n const pending = this.#pending.get(filterId);\n if (pending) {\n for (const message of pending) {\n subscriber._handleMessage(message);\n }\n this.#pending.delete(filterId);\n }\n }\n async _send(payload) {\n (0, index_js_1.assertArgument)(!Array.isArray(payload), \"WebSocket does not support batch send\", \"payload\", payload);\n const promise = new Promise((resolve, reject) => {\n this.#callbacks.set(payload.id, { payload, resolve, reject });\n });\n await this._waitUntilReady();\n await this._write(JSON.stringify(payload));\n return [await promise];\n }\n // Sub-classes must call this once they are connected\n /*\n async _start(): Promise {\n if (this.#ready) { return; }\n \n for (const { payload } of this.#callbacks.values()) {\n await this._write(JSON.stringify(payload));\n }\n \n this.#ready = (async function() {\n await super._start();\n })();\n }\n */\n /**\n * Sub-classes **must** call this with messages received over their\n * transport to be processed and dispatched.\n */\n async _processMessage(message) {\n const result = JSON.parse(message);\n if (result && typeof result === \"object\" && \"id\" in result) {\n const callback = this.#callbacks.get(result.id);\n if (callback == null) {\n this.emit(\"error\", (0, index_js_1.makeError)(\"received result for unknown id\", \"UNKNOWN_ERROR\", {\n reasonCode: \"UNKNOWN_ID\",\n result\n }));\n return;\n }\n this.#callbacks.delete(result.id);\n callback.resolve(result);\n } else if (result && result.method === \"eth_subscription\") {\n const filterId = result.params.subscription;\n const subscriber = this.#subs.get(filterId);\n if (subscriber) {\n subscriber._handleMessage(result.params.result);\n } else {\n let pending = this.#pending.get(filterId);\n if (pending == null) {\n pending = [];\n this.#pending.set(filterId, pending);\n }\n pending.push(result.params.result);\n }\n } else {\n this.emit(\"error\", (0, index_js_1.makeError)(\"received unexpected message\", \"UNKNOWN_ERROR\", {\n reasonCode: \"UNEXPECTED_MESSAGE\",\n result\n }));\n return;\n }\n }\n /**\n * Sub-classes **must** override this to send %%message%% over their\n * transport.\n */\n async _write(message) {\n throw new Error(\"sub-classes must override this\");\n }\n };\n exports3.SocketProvider = SocketProvider;\n }\n });\n\n // ../../../node_modules/.pnpm/ethers@6.15.0_bufferutil@4.0.9_utf-8-validate@5.0.10/node_modules/ethers/lib.commonjs/providers/provider-websocket.js\n var require_provider_websocket = __commonJS({\n \"../../../node_modules/.pnpm/ethers@6.15.0_bufferutil@4.0.9_utf-8-validate@5.0.10/node_modules/ethers/lib.commonjs/providers/provider-websocket.js\"(exports3) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n Object.defineProperty(exports3, \"__esModule\", { value: true });\n exports3.WebSocketProvider = void 0;\n var ws_js_1 = require_ws_browser();\n var provider_socket_js_1 = require_provider_socket();\n var WebSocketProvider = class extends provider_socket_js_1.SocketProvider {\n #connect;\n #websocket;\n get websocket() {\n if (this.#websocket == null) {\n throw new Error(\"websocket closed\");\n }\n return this.#websocket;\n }\n constructor(url, network, options) {\n super(network, options);\n if (typeof url === \"string\") {\n this.#connect = () => {\n return new ws_js_1.WebSocket(url);\n };\n this.#websocket = this.#connect();\n } else if (typeof url === \"function\") {\n this.#connect = url;\n this.#websocket = url();\n } else {\n this.#connect = null;\n this.#websocket = url;\n }\n this.websocket.onopen = async () => {\n try {\n await this._start();\n this.resume();\n } catch (error) {\n console.log(\"failed to start WebsocketProvider\", error);\n }\n };\n this.websocket.onmessage = (message) => {\n this._processMessage(message.data);\n };\n }\n async _write(message) {\n this.websocket.send(message);\n }\n async destroy() {\n if (this.#websocket != null) {\n this.#websocket.close();\n this.#websocket = null;\n }\n super.destroy();\n }\n };\n exports3.WebSocketProvider = WebSocketProvider;\n }\n });\n\n // ../../../node_modules/.pnpm/ethers@6.15.0_bufferutil@4.0.9_utf-8-validate@5.0.10/node_modules/ethers/lib.commonjs/providers/provider-infura.js\n var require_provider_infura = __commonJS({\n \"../../../node_modules/.pnpm/ethers@6.15.0_bufferutil@4.0.9_utf-8-validate@5.0.10/node_modules/ethers/lib.commonjs/providers/provider-infura.js\"(exports3) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n Object.defineProperty(exports3, \"__esModule\", { value: true });\n exports3.InfuraProvider = exports3.InfuraWebSocketProvider = void 0;\n var index_js_1 = require_utils8();\n var community_js_1 = require_community();\n var network_js_1 = require_network();\n var provider_jsonrpc_js_1 = require_provider_jsonrpc();\n var provider_websocket_js_1 = require_provider_websocket();\n var defaultProjectId = \"84842078b09946638c03157f83405213\";\n function getHost(name) {\n switch (name) {\n case \"mainnet\":\n return \"mainnet.infura.io\";\n case \"goerli\":\n return \"goerli.infura.io\";\n case \"sepolia\":\n return \"sepolia.infura.io\";\n case \"arbitrum\":\n return \"arbitrum-mainnet.infura.io\";\n case \"arbitrum-goerli\":\n return \"arbitrum-goerli.infura.io\";\n case \"arbitrum-sepolia\":\n return \"arbitrum-sepolia.infura.io\";\n case \"base\":\n return \"base-mainnet.infura.io\";\n case \"base-goerlia\":\n case \"base-goerli\":\n return \"base-goerli.infura.io\";\n case \"base-sepolia\":\n return \"base-sepolia.infura.io\";\n case \"bnb\":\n return \"bsc-mainnet.infura.io\";\n case \"bnbt\":\n return \"bsc-testnet.infura.io\";\n case \"linea\":\n return \"linea-mainnet.infura.io\";\n case \"linea-goerli\":\n return \"linea-goerli.infura.io\";\n case \"linea-sepolia\":\n return \"linea-sepolia.infura.io\";\n case \"matic\":\n return \"polygon-mainnet.infura.io\";\n case \"matic-amoy\":\n return \"polygon-amoy.infura.io\";\n case \"matic-mumbai\":\n return \"polygon-mumbai.infura.io\";\n case \"optimism\":\n return \"optimism-mainnet.infura.io\";\n case \"optimism-goerli\":\n return \"optimism-goerli.infura.io\";\n case \"optimism-sepolia\":\n return \"optimism-sepolia.infura.io\";\n }\n (0, index_js_1.assertArgument)(false, \"unsupported network\", \"network\", name);\n }\n var InfuraWebSocketProvider = class extends provider_websocket_js_1.WebSocketProvider {\n /**\n * The Project ID for the INFURA connection.\n */\n projectId;\n /**\n * The Project Secret.\n *\n * If null, no authenticated requests are made. This should not\n * be used outside of private contexts.\n */\n projectSecret;\n /**\n * Creates a new **InfuraWebSocketProvider**.\n */\n constructor(network, projectId) {\n const provider = new InfuraProvider(network, projectId);\n const req = provider._getConnection();\n (0, index_js_1.assert)(!req.credentials, \"INFURA WebSocket project secrets unsupported\", \"UNSUPPORTED_OPERATION\", { operation: \"InfuraProvider.getWebSocketProvider()\" });\n const url = req.url.replace(/^http/i, \"ws\").replace(\"/v3/\", \"/ws/v3/\");\n super(url, provider._network);\n (0, index_js_1.defineProperties)(this, {\n projectId: provider.projectId,\n projectSecret: provider.projectSecret\n });\n }\n isCommunityResource() {\n return this.projectId === defaultProjectId;\n }\n };\n exports3.InfuraWebSocketProvider = InfuraWebSocketProvider;\n var InfuraProvider = class _InfuraProvider extends provider_jsonrpc_js_1.JsonRpcProvider {\n /**\n * The Project ID for the INFURA connection.\n */\n projectId;\n /**\n * The Project Secret.\n *\n * If null, no authenticated requests are made. This should not\n * be used outside of private contexts.\n */\n projectSecret;\n /**\n * Creates a new **InfuraProvider**.\n */\n constructor(_network, projectId, projectSecret) {\n if (_network == null) {\n _network = \"mainnet\";\n }\n const network = network_js_1.Network.from(_network);\n if (projectId == null) {\n projectId = defaultProjectId;\n }\n if (projectSecret == null) {\n projectSecret = null;\n }\n const request = _InfuraProvider.getRequest(network, projectId, projectSecret);\n super(request, network, { staticNetwork: network });\n (0, index_js_1.defineProperties)(this, { projectId, projectSecret });\n }\n _getProvider(chainId) {\n try {\n return new _InfuraProvider(chainId, this.projectId, this.projectSecret);\n } catch (error) {\n }\n return super._getProvider(chainId);\n }\n isCommunityResource() {\n return this.projectId === defaultProjectId;\n }\n /**\n * Creates a new **InfuraWebSocketProvider**.\n */\n static getWebSocketProvider(network, projectId) {\n return new InfuraWebSocketProvider(network, projectId);\n }\n /**\n * Returns a prepared request for connecting to %%network%%\n * with %%projectId%% and %%projectSecret%%.\n */\n static getRequest(network, projectId, projectSecret) {\n if (projectId == null) {\n projectId = defaultProjectId;\n }\n if (projectSecret == null) {\n projectSecret = null;\n }\n const request = new index_js_1.FetchRequest(`https://${getHost(network.name)}/v3/${projectId}`);\n request.allowGzip = true;\n if (projectSecret) {\n request.setCredentials(\"\", projectSecret);\n }\n if (projectId === defaultProjectId) {\n request.retryFunc = async (request2, response, attempt) => {\n (0, community_js_1.showThrottleMessage)(\"InfuraProvider\");\n return true;\n };\n }\n return request;\n }\n };\n exports3.InfuraProvider = InfuraProvider;\n }\n });\n\n // ../../../node_modules/.pnpm/ethers@6.15.0_bufferutil@4.0.9_utf-8-validate@5.0.10/node_modules/ethers/lib.commonjs/providers/provider-quicknode.js\n var require_provider_quicknode = __commonJS({\n \"../../../node_modules/.pnpm/ethers@6.15.0_bufferutil@4.0.9_utf-8-validate@5.0.10/node_modules/ethers/lib.commonjs/providers/provider-quicknode.js\"(exports3) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n Object.defineProperty(exports3, \"__esModule\", { value: true });\n exports3.QuickNodeProvider = void 0;\n var index_js_1 = require_utils8();\n var community_js_1 = require_community();\n var network_js_1 = require_network();\n var provider_jsonrpc_js_1 = require_provider_jsonrpc();\n var defaultToken = \"919b412a057b5e9c9b6dce193c5a60242d6efadb\";\n function getHost(name) {\n switch (name) {\n case \"mainnet\":\n return \"ethers.quiknode.pro\";\n case \"goerli\":\n return \"ethers.ethereum-goerli.quiknode.pro\";\n case \"sepolia\":\n return \"ethers.ethereum-sepolia.quiknode.pro\";\n case \"holesky\":\n return \"ethers.ethereum-holesky.quiknode.pro\";\n case \"arbitrum\":\n return \"ethers.arbitrum-mainnet.quiknode.pro\";\n case \"arbitrum-goerli\":\n return \"ethers.arbitrum-goerli.quiknode.pro\";\n case \"arbitrum-sepolia\":\n return \"ethers.arbitrum-sepolia.quiknode.pro\";\n case \"base\":\n return \"ethers.base-mainnet.quiknode.pro\";\n case \"base-goerli\":\n return \"ethers.base-goerli.quiknode.pro\";\n case \"base-spolia\":\n return \"ethers.base-sepolia.quiknode.pro\";\n case \"bnb\":\n return \"ethers.bsc.quiknode.pro\";\n case \"bnbt\":\n return \"ethers.bsc-testnet.quiknode.pro\";\n case \"matic\":\n return \"ethers.matic.quiknode.pro\";\n case \"matic-mumbai\":\n return \"ethers.matic-testnet.quiknode.pro\";\n case \"optimism\":\n return \"ethers.optimism.quiknode.pro\";\n case \"optimism-goerli\":\n return \"ethers.optimism-goerli.quiknode.pro\";\n case \"optimism-sepolia\":\n return \"ethers.optimism-sepolia.quiknode.pro\";\n case \"xdai\":\n return \"ethers.xdai.quiknode.pro\";\n }\n (0, index_js_1.assertArgument)(false, \"unsupported network\", \"network\", name);\n }\n var QuickNodeProvider = class _QuickNodeProvider extends provider_jsonrpc_js_1.JsonRpcProvider {\n /**\n * The API token.\n */\n token;\n /**\n * Creates a new **QuickNodeProvider**.\n */\n constructor(_network, token) {\n if (_network == null) {\n _network = \"mainnet\";\n }\n const network = network_js_1.Network.from(_network);\n if (token == null) {\n token = defaultToken;\n }\n const request = _QuickNodeProvider.getRequest(network, token);\n super(request, network, { staticNetwork: network });\n (0, index_js_1.defineProperties)(this, { token });\n }\n _getProvider(chainId) {\n try {\n return new _QuickNodeProvider(chainId, this.token);\n } catch (error) {\n }\n return super._getProvider(chainId);\n }\n isCommunityResource() {\n return this.token === defaultToken;\n }\n /**\n * Returns a new request prepared for %%network%% and the\n * %%token%%.\n */\n static getRequest(network, token) {\n if (token == null) {\n token = defaultToken;\n }\n const request = new index_js_1.FetchRequest(`https://${getHost(network.name)}/${token}`);\n request.allowGzip = true;\n if (token === defaultToken) {\n request.retryFunc = async (request2, response, attempt) => {\n (0, community_js_1.showThrottleMessage)(\"QuickNodeProvider\");\n return true;\n };\n }\n return request;\n }\n };\n exports3.QuickNodeProvider = QuickNodeProvider;\n }\n });\n\n // ../../../node_modules/.pnpm/ethers@6.15.0_bufferutil@4.0.9_utf-8-validate@5.0.10/node_modules/ethers/lib.commonjs/providers/provider-fallback.js\n var require_provider_fallback = __commonJS({\n \"../../../node_modules/.pnpm/ethers@6.15.0_bufferutil@4.0.9_utf-8-validate@5.0.10/node_modules/ethers/lib.commonjs/providers/provider-fallback.js\"(exports3) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n Object.defineProperty(exports3, \"__esModule\", { value: true });\n exports3.FallbackProvider = void 0;\n var index_js_1 = require_utils8();\n var abstract_provider_js_1 = require_abstract_provider();\n var network_js_1 = require_network();\n var BN_1 = BigInt(\"1\");\n var BN_2 = BigInt(\"2\");\n function shuffle(array2) {\n for (let i3 = array2.length - 1; i3 > 0; i3--) {\n const j2 = Math.floor(Math.random() * (i3 + 1));\n const tmp = array2[i3];\n array2[i3] = array2[j2];\n array2[j2] = tmp;\n }\n }\n function stall(duration) {\n return new Promise((resolve) => {\n setTimeout(resolve, duration);\n });\n }\n function getTime() {\n return (/* @__PURE__ */ new Date()).getTime();\n }\n function stringify3(value) {\n return JSON.stringify(value, (key, value2) => {\n if (typeof value2 === \"bigint\") {\n return { type: \"bigint\", value: value2.toString() };\n }\n return value2;\n });\n }\n var defaultConfig = { stallTimeout: 400, priority: 1, weight: 1 };\n var defaultState = {\n blockNumber: -2,\n requests: 0,\n lateResponses: 0,\n errorResponses: 0,\n outOfSync: -1,\n unsupportedEvents: 0,\n rollingDuration: 0,\n score: 0,\n _network: null,\n _updateNumber: null,\n _totalTime: 0,\n _lastFatalError: null,\n _lastFatalErrorTimestamp: 0\n };\n async function waitForSync(config2, blockNumber) {\n while (config2.blockNumber < 0 || config2.blockNumber < blockNumber) {\n if (!config2._updateNumber) {\n config2._updateNumber = (async () => {\n try {\n const blockNumber2 = await config2.provider.getBlockNumber();\n if (blockNumber2 > config2.blockNumber) {\n config2.blockNumber = blockNumber2;\n }\n } catch (error) {\n config2.blockNumber = -2;\n config2._lastFatalError = error;\n config2._lastFatalErrorTimestamp = getTime();\n }\n config2._updateNumber = null;\n })();\n }\n await config2._updateNumber;\n config2.outOfSync++;\n if (config2._lastFatalError) {\n break;\n }\n }\n }\n function _normalize(value) {\n if (value == null) {\n return \"null\";\n }\n if (Array.isArray(value)) {\n return \"[\" + value.map(_normalize).join(\",\") + \"]\";\n }\n if (typeof value === \"object\" && typeof value.toJSON === \"function\") {\n return _normalize(value.toJSON());\n }\n switch (typeof value) {\n case \"boolean\":\n case \"symbol\":\n return value.toString();\n case \"bigint\":\n case \"number\":\n return BigInt(value).toString();\n case \"string\":\n return JSON.stringify(value);\n case \"object\": {\n const keys = Object.keys(value);\n keys.sort();\n return \"{\" + keys.map((k4) => `${JSON.stringify(k4)}:${_normalize(value[k4])}`).join(\",\") + \"}\";\n }\n }\n console.log(\"Could not serialize\", value);\n throw new Error(\"Hmm...\");\n }\n function normalizeResult(method, value) {\n if (\"error\" in value) {\n const error = value.error;\n let tag;\n if ((0, index_js_1.isError)(error, \"CALL_EXCEPTION\")) {\n tag = _normalize(Object.assign({}, error, {\n shortMessage: void 0,\n reason: void 0,\n info: void 0\n }));\n } else {\n tag = _normalize(error);\n }\n return { tag, value: error };\n }\n const result = value.result;\n return { tag: _normalize(result), value: result };\n }\n function checkQuorum(quorum, results) {\n const tally = /* @__PURE__ */ new Map();\n for (const { value, tag, weight } of results) {\n const t3 = tally.get(tag) || { value, weight: 0 };\n t3.weight += weight;\n tally.set(tag, t3);\n }\n let best = null;\n for (const r2 of tally.values()) {\n if (r2.weight >= quorum && (!best || r2.weight > best.weight)) {\n best = r2;\n }\n }\n if (best) {\n return best.value;\n }\n return void 0;\n }\n function getMedian(quorum, results) {\n let resultWeight = 0;\n const errorMap2 = /* @__PURE__ */ new Map();\n let bestError = null;\n const values = [];\n for (const { value, tag, weight } of results) {\n if (value instanceof Error) {\n const e3 = errorMap2.get(tag) || { value, weight: 0 };\n e3.weight += weight;\n errorMap2.set(tag, e3);\n if (bestError == null || e3.weight > bestError.weight) {\n bestError = e3;\n }\n } else {\n values.push(BigInt(value));\n resultWeight += weight;\n }\n }\n if (resultWeight < quorum) {\n if (bestError && bestError.weight >= quorum) {\n return bestError.value;\n }\n return void 0;\n }\n values.sort((a3, b4) => a3 < b4 ? -1 : b4 > a3 ? 1 : 0);\n const mid = Math.floor(values.length / 2);\n if (values.length % 2) {\n return values[mid];\n }\n return (values[mid - 1] + values[mid] + BN_1) / BN_2;\n }\n function getAnyResult(quorum, results) {\n const result = checkQuorum(quorum, results);\n if (result !== void 0) {\n return result;\n }\n for (const r2 of results) {\n if (r2.value) {\n return r2.value;\n }\n }\n return void 0;\n }\n function getFuzzyMode(quorum, results) {\n if (quorum === 1) {\n return (0, index_js_1.getNumber)(getMedian(quorum, results), \"%internal\");\n }\n const tally = /* @__PURE__ */ new Map();\n const add2 = (result, weight) => {\n const t3 = tally.get(result) || { result, weight: 0 };\n t3.weight += weight;\n tally.set(result, t3);\n };\n for (const { weight, value } of results) {\n const r2 = (0, index_js_1.getNumber)(value);\n add2(r2 - 1, weight);\n add2(r2, weight);\n add2(r2 + 1, weight);\n }\n let bestWeight = 0;\n let bestResult = void 0;\n for (const { weight, result } of tally.values()) {\n if (weight >= quorum && (weight > bestWeight || bestResult != null && weight === bestWeight && result > bestResult)) {\n bestWeight = weight;\n bestResult = result;\n }\n }\n return bestResult;\n }\n var FallbackProvider = class extends abstract_provider_js_1.AbstractProvider {\n /**\n * The number of backends that must agree on a value before it is\n * accpeted.\n */\n quorum;\n /**\n * @_ignore:\n */\n eventQuorum;\n /**\n * @_ignore:\n */\n eventWorkers;\n #configs;\n #height;\n #initialSyncPromise;\n /**\n * Creates a new **FallbackProvider** with %%providers%% connected to\n * %%network%%.\n *\n * If a [[Provider]] is included in %%providers%%, defaults are used\n * for the configuration.\n */\n constructor(providers, network, options) {\n super(network, options);\n this.#configs = providers.map((p4) => {\n if (p4 instanceof abstract_provider_js_1.AbstractProvider) {\n return Object.assign({ provider: p4 }, defaultConfig, defaultState);\n } else {\n return Object.assign({}, defaultConfig, p4, defaultState);\n }\n });\n this.#height = -2;\n this.#initialSyncPromise = null;\n if (options && options.quorum != null) {\n this.quorum = options.quorum;\n } else {\n this.quorum = Math.ceil(this.#configs.reduce((accum, config2) => {\n accum += config2.weight;\n return accum;\n }, 0) / 2);\n }\n this.eventQuorum = 1;\n this.eventWorkers = 1;\n (0, index_js_1.assertArgument)(this.quorum <= this.#configs.reduce((a3, c4) => a3 + c4.weight, 0), \"quorum exceed provider weight\", \"quorum\", this.quorum);\n }\n get providerConfigs() {\n return this.#configs.map((c4) => {\n const result = Object.assign({}, c4);\n for (const key in result) {\n if (key[0] === \"_\") {\n delete result[key];\n }\n }\n return result;\n });\n }\n async _detectNetwork() {\n return network_js_1.Network.from((0, index_js_1.getBigInt)(await this._perform({ method: \"chainId\" })));\n }\n // @TODO: Add support to select providers to be the event subscriber\n //_getSubscriber(sub: Subscription): Subscriber {\n // throw new Error(\"@TODO\");\n //}\n /**\n * Transforms a %%req%% into the correct method call on %%provider%%.\n */\n async _translatePerform(provider, req) {\n switch (req.method) {\n case \"broadcastTransaction\":\n return await provider.broadcastTransaction(req.signedTransaction);\n case \"call\":\n return await provider.call(Object.assign({}, req.transaction, { blockTag: req.blockTag }));\n case \"chainId\":\n return (await provider.getNetwork()).chainId;\n case \"estimateGas\":\n return await provider.estimateGas(req.transaction);\n case \"getBalance\":\n return await provider.getBalance(req.address, req.blockTag);\n case \"getBlock\": {\n const block = \"blockHash\" in req ? req.blockHash : req.blockTag;\n return await provider.getBlock(block, req.includeTransactions);\n }\n case \"getBlockNumber\":\n return await provider.getBlockNumber();\n case \"getCode\":\n return await provider.getCode(req.address, req.blockTag);\n case \"getGasPrice\":\n return (await provider.getFeeData()).gasPrice;\n case \"getPriorityFee\":\n return (await provider.getFeeData()).maxPriorityFeePerGas;\n case \"getLogs\":\n return await provider.getLogs(req.filter);\n case \"getStorage\":\n return await provider.getStorage(req.address, req.position, req.blockTag);\n case \"getTransaction\":\n return await provider.getTransaction(req.hash);\n case \"getTransactionCount\":\n return await provider.getTransactionCount(req.address, req.blockTag);\n case \"getTransactionReceipt\":\n return await provider.getTransactionReceipt(req.hash);\n case \"getTransactionResult\":\n return await provider.getTransactionResult(req.hash);\n }\n }\n // Grab the next (random) config that is not already part of\n // the running set\n #getNextConfig(running) {\n const configs = Array.from(running).map((r2) => r2.config);\n const allConfigs = this.#configs.slice();\n shuffle(allConfigs);\n allConfigs.sort((a3, b4) => a3.priority - b4.priority);\n for (const config2 of allConfigs) {\n if (config2._lastFatalError) {\n continue;\n }\n if (configs.indexOf(config2) === -1) {\n return config2;\n }\n }\n return null;\n }\n // Adds a new runner (if available) to running.\n #addRunner(running, req) {\n const config2 = this.#getNextConfig(running);\n if (config2 == null) {\n return null;\n }\n const runner = {\n config: config2,\n result: null,\n didBump: false,\n perform: null,\n staller: null\n };\n const now = getTime();\n runner.perform = (async () => {\n try {\n config2.requests++;\n const result = await this._translatePerform(config2.provider, req);\n runner.result = { result };\n } catch (error) {\n config2.errorResponses++;\n runner.result = { error };\n }\n const dt = getTime() - now;\n config2._totalTime += dt;\n config2.rollingDuration = 0.95 * config2.rollingDuration + 0.05 * dt;\n runner.perform = null;\n })();\n runner.staller = (async () => {\n await stall(config2.stallTimeout);\n runner.staller = null;\n })();\n running.add(runner);\n return runner;\n }\n // Initializes the blockNumber and network for each runner and\n // blocks until initialized\n async #initialSync() {\n let initialSync = this.#initialSyncPromise;\n if (!initialSync) {\n const promises = [];\n this.#configs.forEach((config2) => {\n promises.push((async () => {\n await waitForSync(config2, 0);\n if (!config2._lastFatalError) {\n config2._network = await config2.provider.getNetwork();\n }\n })());\n });\n this.#initialSyncPromise = initialSync = (async () => {\n await Promise.all(promises);\n let chainId = null;\n for (const config2 of this.#configs) {\n if (config2._lastFatalError) {\n continue;\n }\n const network = config2._network;\n if (chainId == null) {\n chainId = network.chainId;\n } else if (network.chainId !== chainId) {\n (0, index_js_1.assert)(false, \"cannot mix providers on different networks\", \"UNSUPPORTED_OPERATION\", {\n operation: \"new FallbackProvider\"\n });\n }\n }\n })();\n }\n await initialSync;\n }\n async #checkQuorum(running, req) {\n const results = [];\n for (const runner of running) {\n if (runner.result != null) {\n const { tag, value } = normalizeResult(req.method, runner.result);\n results.push({ tag, value, weight: runner.config.weight });\n }\n }\n if (results.reduce((a3, r2) => a3 + r2.weight, 0) < this.quorum) {\n return void 0;\n }\n switch (req.method) {\n case \"getBlockNumber\": {\n if (this.#height === -2) {\n this.#height = Math.ceil((0, index_js_1.getNumber)(getMedian(this.quorum, this.#configs.filter((c4) => !c4._lastFatalError).map((c4) => ({\n value: c4.blockNumber,\n tag: (0, index_js_1.getNumber)(c4.blockNumber).toString(),\n weight: c4.weight\n })))));\n }\n const mode = getFuzzyMode(this.quorum, results);\n if (mode === void 0) {\n return void 0;\n }\n if (mode > this.#height) {\n this.#height = mode;\n }\n return this.#height;\n }\n case \"getGasPrice\":\n case \"getPriorityFee\":\n case \"estimateGas\":\n return getMedian(this.quorum, results);\n case \"getBlock\":\n if (\"blockTag\" in req && req.blockTag === \"pending\") {\n return getAnyResult(this.quorum, results);\n }\n return checkQuorum(this.quorum, results);\n case \"call\":\n case \"chainId\":\n case \"getBalance\":\n case \"getTransactionCount\":\n case \"getCode\":\n case \"getStorage\":\n case \"getTransaction\":\n case \"getTransactionReceipt\":\n case \"getLogs\":\n return checkQuorum(this.quorum, results);\n case \"broadcastTransaction\":\n return getAnyResult(this.quorum, results);\n }\n (0, index_js_1.assert)(false, \"unsupported method\", \"UNSUPPORTED_OPERATION\", {\n operation: `_perform(${stringify3(req.method)})`\n });\n }\n async #waitForQuorum(running, req) {\n if (running.size === 0) {\n throw new Error(\"no runners?!\");\n }\n const interesting = [];\n let newRunners = 0;\n for (const runner of running) {\n if (runner.perform) {\n interesting.push(runner.perform);\n }\n if (runner.staller) {\n interesting.push(runner.staller);\n continue;\n }\n if (runner.didBump) {\n continue;\n }\n runner.didBump = true;\n newRunners++;\n }\n const value = await this.#checkQuorum(running, req);\n if (value !== void 0) {\n if (value instanceof Error) {\n throw value;\n }\n return value;\n }\n for (let i3 = 0; i3 < newRunners; i3++) {\n this.#addRunner(running, req);\n }\n (0, index_js_1.assert)(interesting.length > 0, \"quorum not met\", \"SERVER_ERROR\", {\n request: \"%sub-requests\",\n info: { request: req, results: Array.from(running).map((r2) => stringify3(r2.result)) }\n });\n await Promise.race(interesting);\n return await this.#waitForQuorum(running, req);\n }\n async _perform(req) {\n if (req.method === \"broadcastTransaction\") {\n const results = this.#configs.map((c4) => null);\n const broadcasts = this.#configs.map(async ({ provider, weight }, index2) => {\n try {\n const result3 = await provider._perform(req);\n results[index2] = Object.assign(normalizeResult(req.method, { result: result3 }), { weight });\n } catch (error) {\n results[index2] = Object.assign(normalizeResult(req.method, { error }), { weight });\n }\n });\n while (true) {\n const done = results.filter((r2) => r2 != null);\n for (const { value } of done) {\n if (!(value instanceof Error)) {\n return value;\n }\n }\n const result3 = checkQuorum(this.quorum, results.filter((r2) => r2 != null));\n if ((0, index_js_1.isError)(result3, \"INSUFFICIENT_FUNDS\")) {\n throw result3;\n }\n const waiting = broadcasts.filter((b4, i3) => results[i3] == null);\n if (waiting.length === 0) {\n break;\n }\n await Promise.race(waiting);\n }\n const result2 = getAnyResult(this.quorum, results);\n (0, index_js_1.assert)(result2 !== void 0, \"problem multi-broadcasting\", \"SERVER_ERROR\", {\n request: \"%sub-requests\",\n info: { request: req, results: results.map(stringify3) }\n });\n if (result2 instanceof Error) {\n throw result2;\n }\n return result2;\n }\n await this.#initialSync();\n const running = /* @__PURE__ */ new Set();\n let inflightQuorum = 0;\n while (true) {\n const runner = this.#addRunner(running, req);\n if (runner == null) {\n break;\n }\n inflightQuorum += runner.config.weight;\n if (inflightQuorum >= this.quorum) {\n break;\n }\n }\n const result = await this.#waitForQuorum(running, req);\n for (const runner of running) {\n if (runner.perform && runner.result == null) {\n runner.config.lateResponses++;\n }\n }\n return result;\n }\n async destroy() {\n for (const { provider } of this.#configs) {\n provider.destroy();\n }\n super.destroy();\n }\n };\n exports3.FallbackProvider = FallbackProvider;\n }\n });\n\n // ../../../node_modules/.pnpm/ethers@6.15.0_bufferutil@4.0.9_utf-8-validate@5.0.10/node_modules/ethers/lib.commonjs/providers/default-provider.js\n var require_default_provider = __commonJS({\n \"../../../node_modules/.pnpm/ethers@6.15.0_bufferutil@4.0.9_utf-8-validate@5.0.10/node_modules/ethers/lib.commonjs/providers/default-provider.js\"(exports3) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n Object.defineProperty(exports3, \"__esModule\", { value: true });\n exports3.getDefaultProvider = void 0;\n var index_js_1 = require_utils8();\n var provider_ankr_js_1 = require_provider_ankr();\n var provider_alchemy_js_1 = require_provider_alchemy();\n var provider_chainstack_js_1 = require_provider_chainstack();\n var provider_cloudflare_js_1 = require_provider_cloudflare();\n var provider_etherscan_js_1 = require_provider_etherscan();\n var provider_infura_js_1 = require_provider_infura();\n var provider_quicknode_js_1 = require_provider_quicknode();\n var provider_fallback_js_1 = require_provider_fallback();\n var provider_jsonrpc_js_1 = require_provider_jsonrpc();\n var network_js_1 = require_network();\n var provider_websocket_js_1 = require_provider_websocket();\n function isWebSocketLike(value) {\n return value && typeof value.send === \"function\" && typeof value.close === \"function\";\n }\n var Testnets = \"goerli kovan sepolia classicKotti optimism-goerli arbitrum-goerli matic-mumbai bnbt\".split(\" \");\n function getDefaultProvider(network, options) {\n if (options == null) {\n options = {};\n }\n const allowService = (name) => {\n if (options[name] === \"-\") {\n return false;\n }\n if (typeof options.exclusive === \"string\") {\n return name === options.exclusive;\n }\n if (Array.isArray(options.exclusive)) {\n return options.exclusive.indexOf(name) !== -1;\n }\n return true;\n };\n if (typeof network === \"string\" && network.match(/^https?:/)) {\n return new provider_jsonrpc_js_1.JsonRpcProvider(network);\n }\n if (typeof network === \"string\" && network.match(/^wss?:/) || isWebSocketLike(network)) {\n return new provider_websocket_js_1.WebSocketProvider(network);\n }\n let staticNetwork = null;\n try {\n staticNetwork = network_js_1.Network.from(network);\n } catch (error) {\n }\n const providers = [];\n if (allowService(\"publicPolygon\") && staticNetwork) {\n if (staticNetwork.name === \"matic\") {\n providers.push(new provider_jsonrpc_js_1.JsonRpcProvider(\"https://polygon-rpc.com/\", staticNetwork, { staticNetwork }));\n } else if (staticNetwork.name === \"matic-amoy\") {\n providers.push(new provider_jsonrpc_js_1.JsonRpcProvider(\"https://rpc-amoy.polygon.technology/\", staticNetwork, { staticNetwork }));\n }\n }\n if (allowService(\"alchemy\")) {\n try {\n providers.push(new provider_alchemy_js_1.AlchemyProvider(network, options.alchemy));\n } catch (error) {\n }\n }\n if (allowService(\"ankr\") && options.ankr != null) {\n try {\n providers.push(new provider_ankr_js_1.AnkrProvider(network, options.ankr));\n } catch (error) {\n }\n }\n if (allowService(\"chainstack\")) {\n try {\n providers.push(new provider_chainstack_js_1.ChainstackProvider(network, options.chainstack));\n } catch (error) {\n }\n }\n if (allowService(\"cloudflare\")) {\n try {\n providers.push(new provider_cloudflare_js_1.CloudflareProvider(network));\n } catch (error) {\n }\n }\n if (allowService(\"etherscan\")) {\n try {\n providers.push(new provider_etherscan_js_1.EtherscanProvider(network, options.etherscan));\n } catch (error) {\n }\n }\n if (allowService(\"infura\")) {\n try {\n let projectId = options.infura;\n let projectSecret = void 0;\n if (typeof projectId === \"object\") {\n projectSecret = projectId.projectSecret;\n projectId = projectId.projectId;\n }\n providers.push(new provider_infura_js_1.InfuraProvider(network, projectId, projectSecret));\n } catch (error) {\n }\n }\n if (allowService(\"quicknode\")) {\n try {\n let token = options.quicknode;\n providers.push(new provider_quicknode_js_1.QuickNodeProvider(network, token));\n } catch (error) {\n }\n }\n (0, index_js_1.assert)(providers.length, \"unsupported default network\", \"UNSUPPORTED_OPERATION\", {\n operation: \"getDefaultProvider\"\n });\n if (providers.length === 1) {\n return providers[0];\n }\n let quorum = Math.floor(providers.length / 2);\n if (quorum > 2) {\n quorum = 2;\n }\n if (staticNetwork && Testnets.indexOf(staticNetwork.name) !== -1) {\n quorum = 1;\n }\n if (options && options.quorum) {\n quorum = options.quorum;\n }\n return new provider_fallback_js_1.FallbackProvider(providers, void 0, { quorum });\n }\n exports3.getDefaultProvider = getDefaultProvider;\n }\n });\n\n // ../../../node_modules/.pnpm/ethers@6.15.0_bufferutil@4.0.9_utf-8-validate@5.0.10/node_modules/ethers/lib.commonjs/providers/signer-noncemanager.js\n var require_signer_noncemanager = __commonJS({\n \"../../../node_modules/.pnpm/ethers@6.15.0_bufferutil@4.0.9_utf-8-validate@5.0.10/node_modules/ethers/lib.commonjs/providers/signer-noncemanager.js\"(exports3) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n Object.defineProperty(exports3, \"__esModule\", { value: true });\n exports3.NonceManager = void 0;\n var index_js_1 = require_utils8();\n var abstract_signer_js_1 = require_abstract_signer();\n var NonceManager = class _NonceManager extends abstract_signer_js_1.AbstractSigner {\n /**\n * The Signer being managed.\n */\n signer;\n #noncePromise;\n #delta;\n /**\n * Creates a new **NonceManager** to manage %%signer%%.\n */\n constructor(signer) {\n super(signer.provider);\n (0, index_js_1.defineProperties)(this, { signer });\n this.#noncePromise = null;\n this.#delta = 0;\n }\n async getAddress() {\n return this.signer.getAddress();\n }\n connect(provider) {\n return new _NonceManager(this.signer.connect(provider));\n }\n async getNonce(blockTag) {\n if (blockTag === \"pending\") {\n if (this.#noncePromise == null) {\n this.#noncePromise = super.getNonce(\"pending\");\n }\n const delta = this.#delta;\n return await this.#noncePromise + delta;\n }\n return super.getNonce(blockTag);\n }\n /**\n * Manually increment the nonce. This may be useful when managng\n * offline transactions.\n */\n increment() {\n this.#delta++;\n }\n /**\n * Resets the nonce, causing the **NonceManager** to reload the current\n * nonce from the blockchain on the next transaction.\n */\n reset() {\n this.#delta = 0;\n this.#noncePromise = null;\n }\n async sendTransaction(tx) {\n const noncePromise = this.getNonce(\"pending\");\n this.increment();\n tx = await this.signer.populateTransaction(tx);\n tx.nonce = await noncePromise;\n return await this.signer.sendTransaction(tx);\n }\n signTransaction(tx) {\n return this.signer.signTransaction(tx);\n }\n signMessage(message) {\n return this.signer.signMessage(message);\n }\n signTypedData(domain2, types, value) {\n return this.signer.signTypedData(domain2, types, value);\n }\n };\n exports3.NonceManager = NonceManager;\n }\n });\n\n // ../../../node_modules/.pnpm/ethers@6.15.0_bufferutil@4.0.9_utf-8-validate@5.0.10/node_modules/ethers/lib.commonjs/providers/provider-browser.js\n var require_provider_browser = __commonJS({\n \"../../../node_modules/.pnpm/ethers@6.15.0_bufferutil@4.0.9_utf-8-validate@5.0.10/node_modules/ethers/lib.commonjs/providers/provider-browser.js\"(exports3) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n Object.defineProperty(exports3, \"__esModule\", { value: true });\n exports3.BrowserProvider = void 0;\n var index_js_1 = require_utils8();\n var provider_jsonrpc_js_1 = require_provider_jsonrpc();\n var BrowserProvider = class _BrowserProvider extends provider_jsonrpc_js_1.JsonRpcApiPollingProvider {\n #request;\n #providerInfo;\n /**\n * Connect to the %%ethereum%% provider, optionally forcing the\n * %%network%%.\n */\n constructor(ethereum, network, _options) {\n const options = Object.assign({}, _options != null ? _options : {}, { batchMaxCount: 1 });\n (0, index_js_1.assertArgument)(ethereum && ethereum.request, \"invalid EIP-1193 provider\", \"ethereum\", ethereum);\n super(network, options);\n this.#providerInfo = null;\n if (_options && _options.providerInfo) {\n this.#providerInfo = _options.providerInfo;\n }\n this.#request = async (method, params) => {\n const payload = { method, params };\n this.emit(\"debug\", { action: \"sendEip1193Request\", payload });\n try {\n const result = await ethereum.request(payload);\n this.emit(\"debug\", { action: \"receiveEip1193Result\", result });\n return result;\n } catch (e3) {\n const error = new Error(e3.message);\n error.code = e3.code;\n error.data = e3.data;\n error.payload = payload;\n this.emit(\"debug\", { action: \"receiveEip1193Error\", error });\n throw error;\n }\n };\n }\n get providerInfo() {\n return this.#providerInfo;\n }\n async send(method, params) {\n await this._start();\n return await super.send(method, params);\n }\n async _send(payload) {\n (0, index_js_1.assertArgument)(!Array.isArray(payload), \"EIP-1193 does not support batch request\", \"payload\", payload);\n try {\n const result = await this.#request(payload.method, payload.params || []);\n return [{ id: payload.id, result }];\n } catch (e3) {\n return [{\n id: payload.id,\n error: { code: e3.code, data: e3.data, message: e3.message }\n }];\n }\n }\n getRpcError(payload, error) {\n error = JSON.parse(JSON.stringify(error));\n switch (error.error.code || -1) {\n case 4001:\n error.error.message = `ethers-user-denied: ${error.error.message}`;\n break;\n case 4200:\n error.error.message = `ethers-unsupported: ${error.error.message}`;\n break;\n }\n return super.getRpcError(payload, error);\n }\n /**\n * Resolves to ``true`` if the provider manages the %%address%%.\n */\n async hasSigner(address) {\n if (address == null) {\n address = 0;\n }\n const accounts = await this.send(\"eth_accounts\", []);\n if (typeof address === \"number\") {\n return accounts.length > address;\n }\n address = address.toLowerCase();\n return accounts.filter((a3) => a3.toLowerCase() === address).length !== 0;\n }\n async getSigner(address) {\n if (address == null) {\n address = 0;\n }\n if (!await this.hasSigner(address)) {\n try {\n await this.#request(\"eth_requestAccounts\", []);\n } catch (error) {\n const payload = error.payload;\n throw this.getRpcError(payload, { id: payload.id, error });\n }\n }\n return await super.getSigner(address);\n }\n /**\n * Discover and connect to a Provider in the Browser using the\n * [[link-eip-6963]] discovery mechanism. If no providers are\n * present, ``null`` is resolved.\n */\n static async discover(options) {\n if (options == null) {\n options = {};\n }\n if (options.provider) {\n return new _BrowserProvider(options.provider);\n }\n const context2 = options.window ? options.window : typeof window !== \"undefined\" ? window : null;\n if (context2 == null) {\n return null;\n }\n const anyProvider = options.anyProvider;\n if (anyProvider && context2.ethereum) {\n return new _BrowserProvider(context2.ethereum);\n }\n if (!(\"addEventListener\" in context2 && \"dispatchEvent\" in context2 && \"removeEventListener\" in context2)) {\n return null;\n }\n const timeout = options.timeout ? options.timeout : 300;\n if (timeout === 0) {\n return null;\n }\n return await new Promise((resolve, reject) => {\n let found = [];\n const addProvider = (event) => {\n found.push(event.detail);\n if (anyProvider) {\n finalize();\n }\n };\n const finalize = () => {\n clearTimeout(timer);\n if (found.length) {\n if (options && options.filter) {\n const filtered = options.filter(found.map((i3) => Object.assign({}, i3.info)));\n if (filtered == null) {\n resolve(null);\n } else if (filtered instanceof _BrowserProvider) {\n resolve(filtered);\n } else {\n let match = null;\n if (filtered.uuid) {\n const matches = found.filter((f6) => filtered.uuid === f6.info.uuid);\n match = matches[0];\n }\n if (match) {\n const { provider, info } = match;\n resolve(new _BrowserProvider(provider, void 0, {\n providerInfo: info\n }));\n } else {\n reject((0, index_js_1.makeError)(\"filter returned unknown info\", \"UNSUPPORTED_OPERATION\", {\n value: filtered\n }));\n }\n }\n } else {\n const { provider, info } = found[0];\n resolve(new _BrowserProvider(provider, void 0, {\n providerInfo: info\n }));\n }\n } else {\n resolve(null);\n }\n context2.removeEventListener(\"eip6963:announceProvider\", addProvider);\n };\n const timer = setTimeout(() => {\n finalize();\n }, timeout);\n context2.addEventListener(\"eip6963:announceProvider\", addProvider);\n context2.dispatchEvent(new Event(\"eip6963:requestProvider\"));\n });\n }\n };\n exports3.BrowserProvider = BrowserProvider;\n }\n });\n\n // ../../../node_modules/.pnpm/ethers@6.15.0_bufferutil@4.0.9_utf-8-validate@5.0.10/node_modules/ethers/lib.commonjs/providers/provider-blockscout.js\n var require_provider_blockscout = __commonJS({\n \"../../../node_modules/.pnpm/ethers@6.15.0_bufferutil@4.0.9_utf-8-validate@5.0.10/node_modules/ethers/lib.commonjs/providers/provider-blockscout.js\"(exports3) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n Object.defineProperty(exports3, \"__esModule\", { value: true });\n exports3.BlockscoutProvider = void 0;\n var index_js_1 = require_utils8();\n var network_js_1 = require_network();\n var provider_jsonrpc_js_1 = require_provider_jsonrpc();\n function getUrl2(name) {\n switch (name) {\n case \"mainnet\":\n return \"https://eth.blockscout.com/api/eth-rpc\";\n case \"sepolia\":\n return \"https://eth-sepolia.blockscout.com/api/eth-rpc\";\n case \"holesky\":\n return \"https://eth-holesky.blockscout.com/api/eth-rpc\";\n case \"classic\":\n return \"https://etc.blockscout.com/api/eth-rpc\";\n case \"arbitrum\":\n return \"https://arbitrum.blockscout.com/api/eth-rpc\";\n case \"base\":\n return \"https://base.blockscout.com/api/eth-rpc\";\n case \"base-sepolia\":\n return \"https://base-sepolia.blockscout.com/api/eth-rpc\";\n case \"matic\":\n return \"https://polygon.blockscout.com/api/eth-rpc\";\n case \"optimism\":\n return \"https://optimism.blockscout.com/api/eth-rpc\";\n case \"optimism-sepolia\":\n return \"https://optimism-sepolia.blockscout.com/api/eth-rpc\";\n case \"xdai\":\n return \"https://gnosis.blockscout.com/api/eth-rpc\";\n }\n (0, index_js_1.assertArgument)(false, \"unsupported network\", \"network\", name);\n }\n var BlockscoutProvider = class _BlockscoutProvider extends provider_jsonrpc_js_1.JsonRpcProvider {\n /**\n * The API key.\n */\n apiKey;\n /**\n * Creates a new **BlockscoutProvider**.\n */\n constructor(_network, apiKey) {\n if (_network == null) {\n _network = \"mainnet\";\n }\n const network = network_js_1.Network.from(_network);\n if (apiKey == null) {\n apiKey = null;\n }\n const request = _BlockscoutProvider.getRequest(network);\n super(request, network, { staticNetwork: network });\n (0, index_js_1.defineProperties)(this, { apiKey });\n }\n _getProvider(chainId) {\n try {\n return new _BlockscoutProvider(chainId, this.apiKey);\n } catch (error) {\n }\n return super._getProvider(chainId);\n }\n isCommunityResource() {\n return this.apiKey === null;\n }\n getRpcRequest(req) {\n const resp = super.getRpcRequest(req);\n if (resp && resp.method === \"eth_estimateGas\" && resp.args.length == 1) {\n resp.args = resp.args.slice();\n resp.args.push(\"latest\");\n }\n return resp;\n }\n getRpcError(payload, _error) {\n const error = _error ? _error.error : null;\n if (error && error.code === -32015 && !(0, index_js_1.isHexString)(error.data || \"\", true)) {\n const panicCodes = {\n \"assert(false)\": \"01\",\n \"arithmetic underflow or overflow\": \"11\",\n \"division or modulo by zero\": \"12\",\n \"out-of-bounds array access; popping on an empty array\": \"31\",\n \"out-of-bounds access of an array or bytesN\": \"32\"\n };\n let panicCode = \"\";\n if (error.message === \"VM execution error.\") {\n panicCode = panicCodes[error.data] || \"\";\n } else if (panicCodes[error.message || \"\"]) {\n panicCode = panicCodes[error.message || \"\"];\n }\n if (panicCode) {\n error.message += ` (reverted: ${error.data})`;\n error.data = \"0x4e487b7100000000000000000000000000000000000000000000000000000000000000\" + panicCode;\n }\n } else if (error && error.code === -32e3) {\n if (error.message === \"wrong transaction nonce\") {\n error.message += \" (nonce too low)\";\n }\n }\n return super.getRpcError(payload, _error);\n }\n /**\n * Returns a prepared request for connecting to %%network%%\n * with %%apiKey%%.\n */\n static getRequest(network) {\n const request = new index_js_1.FetchRequest(getUrl2(network.name));\n request.allowGzip = true;\n return request;\n }\n };\n exports3.BlockscoutProvider = BlockscoutProvider;\n }\n });\n\n // ../../../node_modules/.pnpm/ethers@6.15.0_bufferutil@4.0.9_utf-8-validate@5.0.10/node_modules/ethers/lib.commonjs/providers/provider-pocket.js\n var require_provider_pocket = __commonJS({\n \"../../../node_modules/.pnpm/ethers@6.15.0_bufferutil@4.0.9_utf-8-validate@5.0.10/node_modules/ethers/lib.commonjs/providers/provider-pocket.js\"(exports3) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n Object.defineProperty(exports3, \"__esModule\", { value: true });\n exports3.PocketProvider = void 0;\n var index_js_1 = require_utils8();\n var community_js_1 = require_community();\n var network_js_1 = require_network();\n var provider_jsonrpc_js_1 = require_provider_jsonrpc();\n var defaultApplicationId = \"62e1ad51b37b8e00394bda3b\";\n function getHost(name) {\n switch (name) {\n case \"mainnet\":\n return \"eth-mainnet.gateway.pokt.network\";\n case \"goerli\":\n return \"eth-goerli.gateway.pokt.network\";\n case \"matic\":\n return \"poly-mainnet.gateway.pokt.network\";\n case \"matic-mumbai\":\n return \"polygon-mumbai-rpc.gateway.pokt.network\";\n }\n (0, index_js_1.assertArgument)(false, \"unsupported network\", \"network\", name);\n }\n var PocketProvider = class _PocketProvider extends provider_jsonrpc_js_1.JsonRpcProvider {\n /**\n * The Application ID for the Pocket connection.\n */\n applicationId;\n /**\n * The Application Secret for making authenticated requests\n * to the Pocket connection.\n */\n applicationSecret;\n /**\n * Create a new **PocketProvider**.\n *\n * By default connecting to ``mainnet`` with a highly throttled\n * API key.\n */\n constructor(_network, applicationId, applicationSecret) {\n if (_network == null) {\n _network = \"mainnet\";\n }\n const network = network_js_1.Network.from(_network);\n if (applicationId == null) {\n applicationId = defaultApplicationId;\n }\n if (applicationSecret == null) {\n applicationSecret = null;\n }\n const options = { staticNetwork: network };\n const request = _PocketProvider.getRequest(network, applicationId, applicationSecret);\n super(request, network, options);\n (0, index_js_1.defineProperties)(this, { applicationId, applicationSecret });\n }\n _getProvider(chainId) {\n try {\n return new _PocketProvider(chainId, this.applicationId, this.applicationSecret);\n } catch (error) {\n }\n return super._getProvider(chainId);\n }\n /**\n * Returns a prepared request for connecting to %%network%% with\n * %%applicationId%%.\n */\n static getRequest(network, applicationId, applicationSecret) {\n if (applicationId == null) {\n applicationId = defaultApplicationId;\n }\n const request = new index_js_1.FetchRequest(`https://${getHost(network.name)}/v1/lb/${applicationId}`);\n request.allowGzip = true;\n if (applicationSecret) {\n request.setCredentials(\"\", applicationSecret);\n }\n if (applicationId === defaultApplicationId) {\n request.retryFunc = async (request2, response, attempt) => {\n (0, community_js_1.showThrottleMessage)(\"PocketProvider\");\n return true;\n };\n }\n return request;\n }\n isCommunityResource() {\n return this.applicationId === defaultApplicationId;\n }\n };\n exports3.PocketProvider = PocketProvider;\n }\n });\n\n // ../../../node_modules/.pnpm/ethers@6.15.0_bufferutil@4.0.9_utf-8-validate@5.0.10/node_modules/ethers/lib.commonjs/providers/provider-ipcsocket-browser.js\n var require_provider_ipcsocket_browser = __commonJS({\n \"../../../node_modules/.pnpm/ethers@6.15.0_bufferutil@4.0.9_utf-8-validate@5.0.10/node_modules/ethers/lib.commonjs/providers/provider-ipcsocket-browser.js\"(exports3) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n Object.defineProperty(exports3, \"__esModule\", { value: true });\n exports3.IpcSocketProvider = void 0;\n var IpcSocketProvider = void 0;\n exports3.IpcSocketProvider = IpcSocketProvider;\n }\n });\n\n // ../../../node_modules/.pnpm/ethers@6.15.0_bufferutil@4.0.9_utf-8-validate@5.0.10/node_modules/ethers/lib.commonjs/providers/index.js\n var require_providers = __commonJS({\n \"../../../node_modules/.pnpm/ethers@6.15.0_bufferutil@4.0.9_utf-8-validate@5.0.10/node_modules/ethers/lib.commonjs/providers/index.js\"(exports3) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n Object.defineProperty(exports3, \"__esModule\", { value: true });\n exports3.SocketEventSubscriber = exports3.SocketPendingSubscriber = exports3.SocketBlockSubscriber = exports3.SocketSubscriber = exports3.WebSocketProvider = exports3.SocketProvider = exports3.IpcSocketProvider = exports3.QuickNodeProvider = exports3.PocketProvider = exports3.InfuraWebSocketProvider = exports3.InfuraProvider = exports3.EtherscanPlugin = exports3.EtherscanProvider = exports3.ChainstackProvider = exports3.CloudflareProvider = exports3.AnkrProvider = exports3.BlockscoutProvider = exports3.AlchemyProvider = exports3.BrowserProvider = exports3.JsonRpcSigner = exports3.JsonRpcProvider = exports3.JsonRpcApiProvider = exports3.FallbackProvider = exports3.copyRequest = exports3.TransactionResponse = exports3.TransactionReceipt = exports3.Log = exports3.FeeData = exports3.Block = exports3.FetchUrlFeeDataNetworkPlugin = exports3.FeeDataNetworkPlugin = exports3.EnsPlugin = exports3.GasCostPlugin = exports3.NetworkPlugin = exports3.NonceManager = exports3.Network = exports3.MulticoinProviderPlugin = exports3.EnsResolver = exports3.getDefaultProvider = exports3.showThrottleMessage = exports3.VoidSigner = exports3.AbstractSigner = exports3.UnmanagedSubscriber = exports3.AbstractProvider = void 0;\n var abstract_provider_js_1 = require_abstract_provider();\n Object.defineProperty(exports3, \"AbstractProvider\", { enumerable: true, get: function() {\n return abstract_provider_js_1.AbstractProvider;\n } });\n Object.defineProperty(exports3, \"UnmanagedSubscriber\", { enumerable: true, get: function() {\n return abstract_provider_js_1.UnmanagedSubscriber;\n } });\n var abstract_signer_js_1 = require_abstract_signer();\n Object.defineProperty(exports3, \"AbstractSigner\", { enumerable: true, get: function() {\n return abstract_signer_js_1.AbstractSigner;\n } });\n Object.defineProperty(exports3, \"VoidSigner\", { enumerable: true, get: function() {\n return abstract_signer_js_1.VoidSigner;\n } });\n var community_js_1 = require_community();\n Object.defineProperty(exports3, \"showThrottleMessage\", { enumerable: true, get: function() {\n return community_js_1.showThrottleMessage;\n } });\n var default_provider_js_1 = require_default_provider();\n Object.defineProperty(exports3, \"getDefaultProvider\", { enumerable: true, get: function() {\n return default_provider_js_1.getDefaultProvider;\n } });\n var ens_resolver_js_1 = require_ens_resolver();\n Object.defineProperty(exports3, \"EnsResolver\", { enumerable: true, get: function() {\n return ens_resolver_js_1.EnsResolver;\n } });\n Object.defineProperty(exports3, \"MulticoinProviderPlugin\", { enumerable: true, get: function() {\n return ens_resolver_js_1.MulticoinProviderPlugin;\n } });\n var network_js_1 = require_network();\n Object.defineProperty(exports3, \"Network\", { enumerable: true, get: function() {\n return network_js_1.Network;\n } });\n var signer_noncemanager_js_1 = require_signer_noncemanager();\n Object.defineProperty(exports3, \"NonceManager\", { enumerable: true, get: function() {\n return signer_noncemanager_js_1.NonceManager;\n } });\n var plugins_network_js_1 = require_plugins_network();\n Object.defineProperty(exports3, \"NetworkPlugin\", { enumerable: true, get: function() {\n return plugins_network_js_1.NetworkPlugin;\n } });\n Object.defineProperty(exports3, \"GasCostPlugin\", { enumerable: true, get: function() {\n return plugins_network_js_1.GasCostPlugin;\n } });\n Object.defineProperty(exports3, \"EnsPlugin\", { enumerable: true, get: function() {\n return plugins_network_js_1.EnsPlugin;\n } });\n Object.defineProperty(exports3, \"FeeDataNetworkPlugin\", { enumerable: true, get: function() {\n return plugins_network_js_1.FeeDataNetworkPlugin;\n } });\n Object.defineProperty(exports3, \"FetchUrlFeeDataNetworkPlugin\", { enumerable: true, get: function() {\n return plugins_network_js_1.FetchUrlFeeDataNetworkPlugin;\n } });\n var provider_js_1 = require_provider();\n Object.defineProperty(exports3, \"Block\", { enumerable: true, get: function() {\n return provider_js_1.Block;\n } });\n Object.defineProperty(exports3, \"FeeData\", { enumerable: true, get: function() {\n return provider_js_1.FeeData;\n } });\n Object.defineProperty(exports3, \"Log\", { enumerable: true, get: function() {\n return provider_js_1.Log;\n } });\n Object.defineProperty(exports3, \"TransactionReceipt\", { enumerable: true, get: function() {\n return provider_js_1.TransactionReceipt;\n } });\n Object.defineProperty(exports3, \"TransactionResponse\", { enumerable: true, get: function() {\n return provider_js_1.TransactionResponse;\n } });\n Object.defineProperty(exports3, \"copyRequest\", { enumerable: true, get: function() {\n return provider_js_1.copyRequest;\n } });\n var provider_fallback_js_1 = require_provider_fallback();\n Object.defineProperty(exports3, \"FallbackProvider\", { enumerable: true, get: function() {\n return provider_fallback_js_1.FallbackProvider;\n } });\n var provider_jsonrpc_js_1 = require_provider_jsonrpc();\n Object.defineProperty(exports3, \"JsonRpcApiProvider\", { enumerable: true, get: function() {\n return provider_jsonrpc_js_1.JsonRpcApiProvider;\n } });\n Object.defineProperty(exports3, \"JsonRpcProvider\", { enumerable: true, get: function() {\n return provider_jsonrpc_js_1.JsonRpcProvider;\n } });\n Object.defineProperty(exports3, \"JsonRpcSigner\", { enumerable: true, get: function() {\n return provider_jsonrpc_js_1.JsonRpcSigner;\n } });\n var provider_browser_js_1 = require_provider_browser();\n Object.defineProperty(exports3, \"BrowserProvider\", { enumerable: true, get: function() {\n return provider_browser_js_1.BrowserProvider;\n } });\n var provider_alchemy_js_1 = require_provider_alchemy();\n Object.defineProperty(exports3, \"AlchemyProvider\", { enumerable: true, get: function() {\n return provider_alchemy_js_1.AlchemyProvider;\n } });\n var provider_blockscout_js_1 = require_provider_blockscout();\n Object.defineProperty(exports3, \"BlockscoutProvider\", { enumerable: true, get: function() {\n return provider_blockscout_js_1.BlockscoutProvider;\n } });\n var provider_ankr_js_1 = require_provider_ankr();\n Object.defineProperty(exports3, \"AnkrProvider\", { enumerable: true, get: function() {\n return provider_ankr_js_1.AnkrProvider;\n } });\n var provider_cloudflare_js_1 = require_provider_cloudflare();\n Object.defineProperty(exports3, \"CloudflareProvider\", { enumerable: true, get: function() {\n return provider_cloudflare_js_1.CloudflareProvider;\n } });\n var provider_chainstack_js_1 = require_provider_chainstack();\n Object.defineProperty(exports3, \"ChainstackProvider\", { enumerable: true, get: function() {\n return provider_chainstack_js_1.ChainstackProvider;\n } });\n var provider_etherscan_js_1 = require_provider_etherscan();\n Object.defineProperty(exports3, \"EtherscanProvider\", { enumerable: true, get: function() {\n return provider_etherscan_js_1.EtherscanProvider;\n } });\n Object.defineProperty(exports3, \"EtherscanPlugin\", { enumerable: true, get: function() {\n return provider_etherscan_js_1.EtherscanPlugin;\n } });\n var provider_infura_js_1 = require_provider_infura();\n Object.defineProperty(exports3, \"InfuraProvider\", { enumerable: true, get: function() {\n return provider_infura_js_1.InfuraProvider;\n } });\n Object.defineProperty(exports3, \"InfuraWebSocketProvider\", { enumerable: true, get: function() {\n return provider_infura_js_1.InfuraWebSocketProvider;\n } });\n var provider_pocket_js_1 = require_provider_pocket();\n Object.defineProperty(exports3, \"PocketProvider\", { enumerable: true, get: function() {\n return provider_pocket_js_1.PocketProvider;\n } });\n var provider_quicknode_js_1 = require_provider_quicknode();\n Object.defineProperty(exports3, \"QuickNodeProvider\", { enumerable: true, get: function() {\n return provider_quicknode_js_1.QuickNodeProvider;\n } });\n var provider_ipcsocket_js_1 = require_provider_ipcsocket_browser();\n Object.defineProperty(exports3, \"IpcSocketProvider\", { enumerable: true, get: function() {\n return provider_ipcsocket_js_1.IpcSocketProvider;\n } });\n var provider_socket_js_1 = require_provider_socket();\n Object.defineProperty(exports3, \"SocketProvider\", { enumerable: true, get: function() {\n return provider_socket_js_1.SocketProvider;\n } });\n var provider_websocket_js_1 = require_provider_websocket();\n Object.defineProperty(exports3, \"WebSocketProvider\", { enumerable: true, get: function() {\n return provider_websocket_js_1.WebSocketProvider;\n } });\n var provider_socket_js_2 = require_provider_socket();\n Object.defineProperty(exports3, \"SocketSubscriber\", { enumerable: true, get: function() {\n return provider_socket_js_2.SocketSubscriber;\n } });\n Object.defineProperty(exports3, \"SocketBlockSubscriber\", { enumerable: true, get: function() {\n return provider_socket_js_2.SocketBlockSubscriber;\n } });\n Object.defineProperty(exports3, \"SocketPendingSubscriber\", { enumerable: true, get: function() {\n return provider_socket_js_2.SocketPendingSubscriber;\n } });\n Object.defineProperty(exports3, \"SocketEventSubscriber\", { enumerable: true, get: function() {\n return provider_socket_js_2.SocketEventSubscriber;\n } });\n }\n });\n\n // ../../../node_modules/.pnpm/ethers@6.15.0_bufferutil@4.0.9_utf-8-validate@5.0.10/node_modules/ethers/lib.commonjs/wallet/base-wallet.js\n var require_base_wallet = __commonJS({\n \"../../../node_modules/.pnpm/ethers@6.15.0_bufferutil@4.0.9_utf-8-validate@5.0.10/node_modules/ethers/lib.commonjs/wallet/base-wallet.js\"(exports3) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n Object.defineProperty(exports3, \"__esModule\", { value: true });\n exports3.BaseWallet = void 0;\n var index_js_1 = require_address3();\n var index_js_2 = require_hash2();\n var index_js_3 = require_providers();\n var index_js_4 = require_transaction2();\n var index_js_5 = require_utils8();\n var BaseWallet = class _BaseWallet extends index_js_3.AbstractSigner {\n /**\n * The wallet address.\n */\n address;\n #signingKey;\n /**\n * Creates a new BaseWallet for %%privateKey%%, optionally\n * connected to %%provider%%.\n *\n * If %%provider%% is not specified, only offline methods can\n * be used.\n */\n constructor(privateKey, provider) {\n super(provider);\n (0, index_js_5.assertArgument)(privateKey && typeof privateKey.sign === \"function\", \"invalid private key\", \"privateKey\", \"[ REDACTED ]\");\n this.#signingKey = privateKey;\n const address = (0, index_js_4.computeAddress)(this.signingKey.publicKey);\n (0, index_js_5.defineProperties)(this, { address });\n }\n // Store private values behind getters to reduce visibility\n // in console.log\n /**\n * The [[SigningKey]] used for signing payloads.\n */\n get signingKey() {\n return this.#signingKey;\n }\n /**\n * The private key for this wallet.\n */\n get privateKey() {\n return this.signingKey.privateKey;\n }\n async getAddress() {\n return this.address;\n }\n connect(provider) {\n return new _BaseWallet(this.#signingKey, provider);\n }\n async signTransaction(tx) {\n tx = (0, index_js_3.copyRequest)(tx);\n const { to, from: from14 } = await (0, index_js_5.resolveProperties)({\n to: tx.to ? (0, index_js_1.resolveAddress)(tx.to, this) : void 0,\n from: tx.from ? (0, index_js_1.resolveAddress)(tx.from, this) : void 0\n });\n if (to != null) {\n tx.to = to;\n }\n if (from14 != null) {\n tx.from = from14;\n }\n if (tx.from != null) {\n (0, index_js_5.assertArgument)((0, index_js_1.getAddress)(tx.from) === this.address, \"transaction from address mismatch\", \"tx.from\", tx.from);\n delete tx.from;\n }\n const btx = index_js_4.Transaction.from(tx);\n btx.signature = this.signingKey.sign(btx.unsignedHash);\n return btx.serialized;\n }\n async signMessage(message) {\n return this.signMessageSync(message);\n }\n // @TODO: Add a secialized signTx and signTyped sync that enforces\n // all parameters are known?\n /**\n * Returns the signature for %%message%% signed with this wallet.\n */\n signMessageSync(message) {\n return this.signingKey.sign((0, index_js_2.hashMessage)(message)).serialized;\n }\n /**\n * Returns the Authorization for %%auth%%.\n */\n authorizeSync(auth) {\n (0, index_js_5.assertArgument)(typeof auth.address === \"string\", \"invalid address for authorizeSync\", \"auth.address\", auth);\n const signature = this.signingKey.sign((0, index_js_2.hashAuthorization)(auth));\n return Object.assign({}, {\n address: (0, index_js_1.getAddress)(auth.address),\n nonce: (0, index_js_5.getBigInt)(auth.nonce || 0),\n chainId: (0, index_js_5.getBigInt)(auth.chainId || 0)\n }, { signature });\n }\n /**\n * Resolves to the Authorization for %%auth%%.\n */\n async authorize(auth) {\n auth = Object.assign({}, auth, {\n address: await (0, index_js_1.resolveAddress)(auth.address, this)\n });\n return this.authorizeSync(await this.populateAuthorization(auth));\n }\n async signTypedData(domain2, types, value) {\n const populated = await index_js_2.TypedDataEncoder.resolveNames(domain2, types, value, async (name) => {\n (0, index_js_5.assert)(this.provider != null, \"cannot resolve ENS names without a provider\", \"UNSUPPORTED_OPERATION\", {\n operation: \"resolveName\",\n info: { name }\n });\n const address = await this.provider.resolveName(name);\n (0, index_js_5.assert)(address != null, \"unconfigured ENS name\", \"UNCONFIGURED_NAME\", {\n value: name\n });\n return address;\n });\n return this.signingKey.sign(index_js_2.TypedDataEncoder.hash(populated.domain, types, populated.value)).serialized;\n }\n };\n exports3.BaseWallet = BaseWallet;\n }\n });\n\n // ../../../node_modules/.pnpm/ethers@6.15.0_bufferutil@4.0.9_utf-8-validate@5.0.10/node_modules/ethers/lib.commonjs/wordlists/decode-owl.js\n var require_decode_owl = __commonJS({\n \"../../../node_modules/.pnpm/ethers@6.15.0_bufferutil@4.0.9_utf-8-validate@5.0.10/node_modules/ethers/lib.commonjs/wordlists/decode-owl.js\"(exports3) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n Object.defineProperty(exports3, \"__esModule\", { value: true });\n exports3.decodeOwl = exports3.decode = void 0;\n var index_js_1 = require_utils8();\n var subsChrs = \" !#$%&'()*+,-./<=>?@[]^_`{|}~\";\n var Word = /^[a-z]*$/i;\n function unfold(words, sep) {\n let initial = 97;\n return words.reduce((accum, word) => {\n if (word === sep) {\n initial++;\n } else if (word.match(Word)) {\n accum.push(String.fromCharCode(initial) + word);\n } else {\n initial = 97;\n accum.push(word);\n }\n return accum;\n }, []);\n }\n function decode2(data, subs) {\n for (let i3 = subsChrs.length - 1; i3 >= 0; i3--) {\n data = data.split(subsChrs[i3]).join(subs.substring(2 * i3, 2 * i3 + 2));\n }\n const clumps = [];\n const leftover = data.replace(/(:|([0-9])|([A-Z][a-z]*))/g, (all, item, semi, word) => {\n if (semi) {\n for (let i3 = parseInt(semi); i3 >= 0; i3--) {\n clumps.push(\";\");\n }\n } else {\n clumps.push(item.toLowerCase());\n }\n return \"\";\n });\n if (leftover) {\n throw new Error(`leftovers: ${JSON.stringify(leftover)}`);\n }\n return unfold(unfold(clumps, \";\"), \":\");\n }\n exports3.decode = decode2;\n function decodeOwl(data) {\n (0, index_js_1.assertArgument)(data[0] === \"0\", \"unsupported auwl data\", \"data\", data);\n return decode2(data.substring(1 + 2 * subsChrs.length), data.substring(1, 1 + 2 * subsChrs.length));\n }\n exports3.decodeOwl = decodeOwl;\n }\n });\n\n // ../../../node_modules/.pnpm/ethers@6.15.0_bufferutil@4.0.9_utf-8-validate@5.0.10/node_modules/ethers/lib.commonjs/wordlists/wordlist.js\n var require_wordlist2 = __commonJS({\n \"../../../node_modules/.pnpm/ethers@6.15.0_bufferutil@4.0.9_utf-8-validate@5.0.10/node_modules/ethers/lib.commonjs/wordlists/wordlist.js\"(exports3) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n Object.defineProperty(exports3, \"__esModule\", { value: true });\n exports3.Wordlist = void 0;\n var index_js_1 = require_utils8();\n var Wordlist = class {\n locale;\n /**\n * Creates a new Wordlist instance.\n *\n * Sub-classes MUST call this if they provide their own constructor,\n * passing in the locale string of the language.\n *\n * Generally there is no need to create instances of a Wordlist,\n * since each language-specific Wordlist creates an instance and\n * there is no state kept internally, so they are safe to share.\n */\n constructor(locale) {\n (0, index_js_1.defineProperties)(this, { locale });\n }\n /**\n * Sub-classes may override this to provide a language-specific\n * method for spliting %%phrase%% into individual words.\n *\n * By default, %%phrase%% is split using any sequences of\n * white-space as defined by regular expressions (i.e. ``/\\s+/``).\n */\n split(phrase) {\n return phrase.toLowerCase().split(/\\s+/g);\n }\n /**\n * Sub-classes may override this to provider a language-specific\n * method for joining %%words%% into a phrase.\n *\n * By default, %%words%% are joined by a single space.\n */\n join(words) {\n return words.join(\" \");\n }\n };\n exports3.Wordlist = Wordlist;\n }\n });\n\n // ../../../node_modules/.pnpm/ethers@6.15.0_bufferutil@4.0.9_utf-8-validate@5.0.10/node_modules/ethers/lib.commonjs/wordlists/wordlist-owl.js\n var require_wordlist_owl = __commonJS({\n \"../../../node_modules/.pnpm/ethers@6.15.0_bufferutil@4.0.9_utf-8-validate@5.0.10/node_modules/ethers/lib.commonjs/wordlists/wordlist-owl.js\"(exports3) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n Object.defineProperty(exports3, \"__esModule\", { value: true });\n exports3.WordlistOwl = void 0;\n var index_js_1 = require_hash2();\n var index_js_2 = require_utils8();\n var decode_owl_js_1 = require_decode_owl();\n var wordlist_js_1 = require_wordlist2();\n var WordlistOwl = class extends wordlist_js_1.Wordlist {\n #data;\n #checksum;\n /**\n * Creates a new Wordlist for %%locale%% using the OWL %%data%%\n * and validated against the %%checksum%%.\n */\n constructor(locale, data, checksum4) {\n super(locale);\n this.#data = data;\n this.#checksum = checksum4;\n this.#words = null;\n }\n /**\n * The OWL-encoded data.\n */\n get _data() {\n return this.#data;\n }\n /**\n * Decode all the words for the wordlist.\n */\n _decodeWords() {\n return (0, decode_owl_js_1.decodeOwl)(this.#data);\n }\n #words;\n #loadWords() {\n if (this.#words == null) {\n const words = this._decodeWords();\n const checksum4 = (0, index_js_1.id)(words.join(\"\\n\") + \"\\n\");\n if (checksum4 !== this.#checksum) {\n throw new Error(`BIP39 Wordlist for ${this.locale} FAILED`);\n }\n this.#words = words;\n }\n return this.#words;\n }\n getWord(index2) {\n const words = this.#loadWords();\n (0, index_js_2.assertArgument)(index2 >= 0 && index2 < words.length, `invalid word index: ${index2}`, \"index\", index2);\n return words[index2];\n }\n getWordIndex(word) {\n return this.#loadWords().indexOf(word);\n }\n };\n exports3.WordlistOwl = WordlistOwl;\n }\n });\n\n // ../../../node_modules/.pnpm/ethers@6.15.0_bufferutil@4.0.9_utf-8-validate@5.0.10/node_modules/ethers/lib.commonjs/wordlists/lang-en.js\n var require_lang_en2 = __commonJS({\n \"../../../node_modules/.pnpm/ethers@6.15.0_bufferutil@4.0.9_utf-8-validate@5.0.10/node_modules/ethers/lib.commonjs/wordlists/lang-en.js\"(exports3) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n Object.defineProperty(exports3, \"__esModule\", { value: true });\n exports3.LangEn = void 0;\n var wordlist_owl_js_1 = require_wordlist_owl();\n var words = \"0erleonalorenseinceregesticitStanvetearctssi#ch2Athck&tneLl0And#Il.yLeOutO=S|S%b/ra@SurdU'0Ce[Cid|CountCu'Hie=IdOu,-Qui*Ro[TT]T%T*[Tu$0AptDD-tD*[Ju,M.UltV<)Vi)0Rob-0FairF%dRaid0A(EEntRee0Ead0MRRp%tS!_rmBumCoholErtI&LLeyLowMo,O}PhaReadySoT Ways0A>urAz(gOngOuntU'd0Aly,Ch%Ci|G G!GryIm$K!Noun)Nu$O` Sw T&naTiqueXietyY1ArtOlogyPe?P!Pro=Ril1ChCt-EaEnaGueMMedM%MyOundR<+Re,Ri=RowTTefa@Ti,Tw%k0KPe@SaultSetSi,SumeThma0H!>OmTa{T&dT.udeTra@0Ct]D.Gu,NtTh%ToTumn0Era+OcadoOid0AkeA*AyEsomeFulKw?d0Is:ByChel%C#D+GL<)Lc#y~MbooN_{Ad!AftAmA}AshAt AwlAzyEamEd.EekEwI{etImeIspIt-OpO[Ou^OwdUci$UelUi'Umb!Un^UshYY,$2BeLtu*PPbo?dRiousRr|Rta(R=Sh]/omTe3C!:DMa+MpN)Ng R(gShUght WnY3AlBa>BrisCadeCemb CideCl(eC%a>C*a'ErF&'F(eFyG*eLayLiv M3AgramAlAm#dAryCeE'lEtFf G.$Gn.yLemmaNn NosaurRe@RtSag*eScov Sea'ShSmi[S%d Splay/<)V tVideV%)Zzy5Ct%Cum|G~Lph(Ma(Na>NkeyN%OrSeUb!Ve_ftAg#AmaA,-AwEamE[IftIllInkIpI=OpUmY2CkMbNeR(g/T^Ty1Arf1Nam-:G G!RlyRnR`Sily/Sy1HoOlogyOnomy0GeItUca>1F%t0G1GhtTh 2BowD E@r-EgSe0B?kBodyBra)Er+Ot]PloyPow Pty0Ab!A@DD![D%'EmyErgyF%)Ga+G(eH<)JoyLi,OughR-hRollSu*T Ti*TryVelope1Isode0U$Uip0AA'OdeOs]R%Upt0CapeSayS&)Ta>0Ern$H-s1Id&)IlOkeOl=1A@Amp!Ce[Ch<+C.eCludeCu'Ecu>Erci'Hau,Hib.I!I,ItOt-PM&'Mu}Pa@Po'Pro=Pul'0ChCludeComeC*a'DexD-a>Do%Du,ryFN Noc|PutQuirySSue0Em1Ory:CketGu?RZz3AlousAns~yWel9BInKeUr}yY5D+I)MpNg!Ni%Nk/:Ng?oo3EnEpT^upY3CkDD}yNdNgdomSsTT^&TeTt&Wi4EeIfeO{Ow:BBelB%Dd DyKeMpNgua+PtopR+T T(UghUndryVaWWnWsu.Y Zy3Ad AfArnA=Ctu*FtGG$G&dIsu*M#NdNg`NsOp?dSs#Tt Vel3ArB tyBr?yC&'FeFtGhtKeMbM.NkOnQuid/Tt!VeZ?d5AdAnB, C$CkG-NelyNgOpTt yUdUn+VeY$5CkyGga+Mb N?N^Xury3R-s:Ch(eDG-G}tIdIlInJ%KeMm$NNa+Nda>NgoNs]Nu$P!Rb!R^Rg(R(eRketRria+SkSs/ T^T i$ThTrixTt XimumZe3AdowAnAsu*AtCh<-D$DiaLodyLtMb M%yNt]NuRcyR+R.RryShSsa+T$Thod3Dd!DnightLk~]M-NdNimumN%Nu>Rac!Rr%S ySs/akeXXedXtu*5Bi!DelDifyMM|N.%NkeyN, N`OnR$ReRn(gSqu.oTh T]T%Unta(U'VeVie5ChFf(LeLtiplySc!SeumShroomS-/Tu$3Self/ yTh:I=MePk(Rrow/yT]Tu*3ArCkEdGati=G!@I` PhewR=/TTw%kUtr$V WsXt3CeGht5B!I'M(eeOd!Rm$R`SeTab!TeTh(gTi)VelW5C!?Mb R'T:K0EyJe@Li+Scu*S =Ta(Vious0CurEAyEa'Ed+U{UgUn+2EmEtIntL?LeLi)NdNyOlPul?Rt]S.]Ssib!/TatoTt yV tyWd W _@i)Ai'Ed-tEf Epa*Es|EttyEv|I)IdeIm?yIntI%.yIs#Iva>IzeOb!mO)[Odu)Of.OgramOje@Omo>OofOp tyOsp O>@OudOvide2Bl-Dd(g~LpL'Mpk(N^PilPpyR^a'R.yRpo'R'ShTZz!3Ramid:99Al.yAntumArt E,]I{ItIzO>:Bb.Cco#CeCkD?DioIlInI'~yMpN^NdomN+PidReTeTh V&WZ%3AdyAlAs#BelBuildC$lCei=CipeC%dCyc!Du)F!@F%mFu'G]G*tGul?Je@LaxLea'LiefLyMa(Memb M(dMo=Nd NewNtOp&PairPeatPla)P%tQui*ScueSemb!Si,Sour)Sp#'SultTi*T*atTurnUn]Ve$ViewW?d2Y`m0BBb#CeChDeD+F!GhtGidNgOtPp!SkTu$V$V 5AdA,BotBu,CketM<)OfOkieOmSeTa>UghUndU>Y$5Bb DeGLeNNwayR$:DDd!D}[FeIlLadLm#L#LtLu>MeMp!NdTisfyToshiU)Usa+VeY1A!AnA*Att E}HemeHoolI&)I[%sOrp]OutRapRe&RiptRub1AAr^As#AtC#dC*tCt]Cur.yEdEkGm|Le@~M(?Ni%N'Nt&)RiesRvi)Ss]Tt!TupV&_dowAftAllowA*EdEllEriffIeldIftI}IpIv O{OeOotOpOrtOuld O=RimpRugUff!Y0Bl(gCkDeE+GhtGnL|Lk~yLv Mil?Mp!N)NgR&/ Tua>XZe1A>Et^IIllInIrtUll0AbAmEepEnd I)IdeIghtImOgAyEakEelEmEpE*oI{IllIngO{Oma^O}OolOryO=Ra>gyReetRikeR#gRugg!Ud|UffUmb!Y!0Bje@Bm.BwayC)[ChDd&Ff G?G+,ItMm NNnyN'tP PplyP*meReRfa)R+Rpri'RroundR=ySpe@/a(1AllowAmpApArmE?EetIftImIngIt^Ord1MbolMptomRup/em:B!Ck!GIlL|LkNkPeR+tSk/eTtooXi3A^Am~NNGradeHoldOnP Set1BOng::Rd3Ar~ow9UUngU`:3BraRo9NeO\";\n var checksum4 = \"0x3c8acc1e7b08d8e76f9fda015ef48dc8c710a73cb7e0f77b2c18a9b5a7adde60\";\n var wordlist = null;\n var LangEn = class _LangEn extends wordlist_owl_js_1.WordlistOwl {\n /**\n * Creates a new instance of the English language Wordlist.\n *\n * This should be unnecessary most of the time as the exported\n * [[langEn]] should suffice.\n *\n * @_ignore:\n */\n constructor() {\n super(\"en\", words, checksum4);\n }\n /**\n * Returns a singleton instance of a ``LangEn``, creating it\n * if this is the first time being called.\n */\n static wordlist() {\n if (wordlist == null) {\n wordlist = new _LangEn();\n }\n return wordlist;\n }\n };\n exports3.LangEn = LangEn;\n }\n });\n\n // ../../../node_modules/.pnpm/ethers@6.15.0_bufferutil@4.0.9_utf-8-validate@5.0.10/node_modules/ethers/lib.commonjs/wallet/mnemonic.js\n var require_mnemonic = __commonJS({\n \"../../../node_modules/.pnpm/ethers@6.15.0_bufferutil@4.0.9_utf-8-validate@5.0.10/node_modules/ethers/lib.commonjs/wallet/mnemonic.js\"(exports3) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n Object.defineProperty(exports3, \"__esModule\", { value: true });\n exports3.Mnemonic = void 0;\n var index_js_1 = require_crypto2();\n var index_js_2 = require_utils8();\n var lang_en_js_1 = require_lang_en2();\n function getUpperMask(bits) {\n return (1 << bits) - 1 << 8 - bits & 255;\n }\n function getLowerMask(bits) {\n return (1 << bits) - 1 & 255;\n }\n function mnemonicToEntropy(mnemonic, wordlist) {\n (0, index_js_2.assertNormalize)(\"NFKD\");\n if (wordlist == null) {\n wordlist = lang_en_js_1.LangEn.wordlist();\n }\n const words = wordlist.split(mnemonic);\n (0, index_js_2.assertArgument)(words.length % 3 === 0 && words.length >= 12 && words.length <= 24, \"invalid mnemonic length\", \"mnemonic\", \"[ REDACTED ]\");\n const entropy = new Uint8Array(Math.ceil(11 * words.length / 8));\n let offset = 0;\n for (let i3 = 0; i3 < words.length; i3++) {\n let index2 = wordlist.getWordIndex(words[i3].normalize(\"NFKD\"));\n (0, index_js_2.assertArgument)(index2 >= 0, `invalid mnemonic word at index ${i3}`, \"mnemonic\", \"[ REDACTED ]\");\n for (let bit = 0; bit < 11; bit++) {\n if (index2 & 1 << 10 - bit) {\n entropy[offset >> 3] |= 1 << 7 - offset % 8;\n }\n offset++;\n }\n }\n const entropyBits = 32 * words.length / 3;\n const checksumBits = words.length / 3;\n const checksumMask = getUpperMask(checksumBits);\n const checksum4 = (0, index_js_2.getBytes)((0, index_js_1.sha256)(entropy.slice(0, entropyBits / 8)))[0] & checksumMask;\n (0, index_js_2.assertArgument)(checksum4 === (entropy[entropy.length - 1] & checksumMask), \"invalid mnemonic checksum\", \"mnemonic\", \"[ REDACTED ]\");\n return (0, index_js_2.hexlify)(entropy.slice(0, entropyBits / 8));\n }\n function entropyToMnemonic(entropy, wordlist) {\n (0, index_js_2.assertArgument)(entropy.length % 4 === 0 && entropy.length >= 16 && entropy.length <= 32, \"invalid entropy size\", \"entropy\", \"[ REDACTED ]\");\n if (wordlist == null) {\n wordlist = lang_en_js_1.LangEn.wordlist();\n }\n const indices = [0];\n let remainingBits = 11;\n for (let i3 = 0; i3 < entropy.length; i3++) {\n if (remainingBits > 8) {\n indices[indices.length - 1] <<= 8;\n indices[indices.length - 1] |= entropy[i3];\n remainingBits -= 8;\n } else {\n indices[indices.length - 1] <<= remainingBits;\n indices[indices.length - 1] |= entropy[i3] >> 8 - remainingBits;\n indices.push(entropy[i3] & getLowerMask(8 - remainingBits));\n remainingBits += 3;\n }\n }\n const checksumBits = entropy.length / 4;\n const checksum4 = parseInt((0, index_js_1.sha256)(entropy).substring(2, 4), 16) & getUpperMask(checksumBits);\n indices[indices.length - 1] <<= checksumBits;\n indices[indices.length - 1] |= checksum4 >> 8 - checksumBits;\n return wordlist.join(indices.map((index2) => wordlist.getWord(index2)));\n }\n var _guard = {};\n var Mnemonic = class _Mnemonic {\n /**\n * The mnemonic phrase of 12, 15, 18, 21 or 24 words.\n *\n * Use the [[wordlist]] ``split`` method to get the individual words.\n */\n phrase;\n /**\n * The password used for this mnemonic. If no password is used this\n * is the empty string (i.e. ``\"\"``) as per the specification.\n */\n password;\n /**\n * The wordlist for this mnemonic.\n */\n wordlist;\n /**\n * The underlying entropy which the mnemonic encodes.\n */\n entropy;\n /**\n * @private\n */\n constructor(guard, entropy, phrase, password, wordlist) {\n if (password == null) {\n password = \"\";\n }\n if (wordlist == null) {\n wordlist = lang_en_js_1.LangEn.wordlist();\n }\n (0, index_js_2.assertPrivate)(guard, _guard, \"Mnemonic\");\n (0, index_js_2.defineProperties)(this, { phrase, password, wordlist, entropy });\n }\n /**\n * Returns the seed for the mnemonic.\n */\n computeSeed() {\n const salt = (0, index_js_2.toUtf8Bytes)(\"mnemonic\" + this.password, \"NFKD\");\n return (0, index_js_1.pbkdf2)((0, index_js_2.toUtf8Bytes)(this.phrase, \"NFKD\"), salt, 2048, 64, \"sha512\");\n }\n /**\n * Creates a new Mnemonic for the %%phrase%%.\n *\n * The default %%password%% is the empty string and the default\n * wordlist is the [English wordlists](LangEn).\n */\n static fromPhrase(phrase, password, wordlist) {\n const entropy = mnemonicToEntropy(phrase, wordlist);\n phrase = entropyToMnemonic((0, index_js_2.getBytes)(entropy), wordlist);\n return new _Mnemonic(_guard, entropy, phrase, password, wordlist);\n }\n /**\n * Create a new **Mnemonic** from the %%entropy%%.\n *\n * The default %%password%% is the empty string and the default\n * wordlist is the [English wordlists](LangEn).\n */\n static fromEntropy(_entropy, password, wordlist) {\n const entropy = (0, index_js_2.getBytes)(_entropy, \"entropy\");\n const phrase = entropyToMnemonic(entropy, wordlist);\n return new _Mnemonic(_guard, (0, index_js_2.hexlify)(entropy), phrase, password, wordlist);\n }\n /**\n * Returns the phrase for %%mnemonic%%.\n */\n static entropyToPhrase(_entropy, wordlist) {\n const entropy = (0, index_js_2.getBytes)(_entropy, \"entropy\");\n return entropyToMnemonic(entropy, wordlist);\n }\n /**\n * Returns the entropy for %%phrase%%.\n */\n static phraseToEntropy(phrase, wordlist) {\n return mnemonicToEntropy(phrase, wordlist);\n }\n /**\n * Returns true if %%phrase%% is a valid [[link-bip-39]] phrase.\n *\n * This checks all the provided words belong to the %%wordlist%%,\n * that the length is valid and the checksum is correct.\n */\n static isValidMnemonic(phrase, wordlist) {\n try {\n mnemonicToEntropy(phrase, wordlist);\n return true;\n } catch (error) {\n }\n return false;\n }\n };\n exports3.Mnemonic = Mnemonic;\n }\n });\n\n // ../../../node_modules/.pnpm/aes-js@4.0.0-beta.5/node_modules/aes-js/lib.commonjs/aes.js\n var require_aes = __commonJS({\n \"../../../node_modules/.pnpm/aes-js@4.0.0-beta.5/node_modules/aes-js/lib.commonjs/aes.js\"(exports3) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n var __classPrivateFieldGet3 = exports3 && exports3.__classPrivateFieldGet || function(receiver, state, kind, f6) {\n if (kind === \"a\" && !f6)\n throw new TypeError(\"Private accessor was defined without a getter\");\n if (typeof state === \"function\" ? receiver !== state || !f6 : !state.has(receiver))\n throw new TypeError(\"Cannot read private member from an object whose class did not declare it\");\n return kind === \"m\" ? f6 : kind === \"a\" ? f6.call(receiver) : f6 ? f6.value : state.get(receiver);\n };\n var __classPrivateFieldSet3 = exports3 && exports3.__classPrivateFieldSet || function(receiver, state, value, kind, f6) {\n if (kind === \"m\")\n throw new TypeError(\"Private method is not writable\");\n if (kind === \"a\" && !f6)\n throw new TypeError(\"Private accessor was defined without a setter\");\n if (typeof state === \"function\" ? receiver !== state || !f6 : !state.has(receiver))\n throw new TypeError(\"Cannot write private member to an object whose class did not declare it\");\n return kind === \"a\" ? f6.call(receiver, value) : f6 ? f6.value = value : state.set(receiver, value), value;\n };\n var _AES_key;\n var _AES_Kd;\n var _AES_Ke;\n Object.defineProperty(exports3, \"__esModule\", { value: true });\n exports3.AES = void 0;\n var numberOfRounds = { 16: 10, 24: 12, 32: 14 };\n var rcon = [1, 2, 4, 8, 16, 32, 64, 128, 27, 54, 108, 216, 171, 77, 154, 47, 94, 188, 99, 198, 151, 53, 106, 212, 179, 125, 250, 239, 197, 145];\n var S3 = [99, 124, 119, 123, 242, 107, 111, 197, 48, 1, 103, 43, 254, 215, 171, 118, 202, 130, 201, 125, 250, 89, 71, 240, 173, 212, 162, 175, 156, 164, 114, 192, 183, 253, 147, 38, 54, 63, 247, 204, 52, 165, 229, 241, 113, 216, 49, 21, 4, 199, 35, 195, 24, 150, 5, 154, 7, 18, 128, 226, 235, 39, 178, 117, 9, 131, 44, 26, 27, 110, 90, 160, 82, 59, 214, 179, 41, 227, 47, 132, 83, 209, 0, 237, 32, 252, 177, 91, 106, 203, 190, 57, 74, 76, 88, 207, 208, 239, 170, 251, 67, 77, 51, 133, 69, 249, 2, 127, 80, 60, 159, 168, 81, 163, 64, 143, 146, 157, 56, 245, 188, 182, 218, 33, 16, 255, 243, 210, 205, 12, 19, 236, 95, 151, 68, 23, 196, 167, 126, 61, 100, 93, 25, 115, 96, 129, 79, 220, 34, 42, 144, 136, 70, 238, 184, 20, 222, 94, 11, 219, 224, 50, 58, 10, 73, 6, 36, 92, 194, 211, 172, 98, 145, 149, 228, 121, 231, 200, 55, 109, 141, 213, 78, 169, 108, 86, 244, 234, 101, 122, 174, 8, 186, 120, 37, 46, 28, 166, 180, 198, 232, 221, 116, 31, 75, 189, 139, 138, 112, 62, 181, 102, 72, 3, 246, 14, 97, 53, 87, 185, 134, 193, 29, 158, 225, 248, 152, 17, 105, 217, 142, 148, 155, 30, 135, 233, 206, 85, 40, 223, 140, 161, 137, 13, 191, 230, 66, 104, 65, 153, 45, 15, 176, 84, 187, 22];\n var Si = [82, 9, 106, 213, 48, 54, 165, 56, 191, 64, 163, 158, 129, 243, 215, 251, 124, 227, 57, 130, 155, 47, 255, 135, 52, 142, 67, 68, 196, 222, 233, 203, 84, 123, 148, 50, 166, 194, 35, 61, 238, 76, 149, 11, 66, 250, 195, 78, 8, 46, 161, 102, 40, 217, 36, 178, 118, 91, 162, 73, 109, 139, 209, 37, 114, 248, 246, 100, 134, 104, 152, 22, 212, 164, 92, 204, 93, 101, 182, 146, 108, 112, 72, 80, 253, 237, 185, 218, 94, 21, 70, 87, 167, 141, 157, 132, 144, 216, 171, 0, 140, 188, 211, 10, 247, 228, 88, 5, 184, 179, 69, 6, 208, 44, 30, 143, 202, 63, 15, 2, 193, 175, 189, 3, 1, 19, 138, 107, 58, 145, 17, 65, 79, 103, 220, 234, 151, 242, 207, 206, 240, 180, 230, 115, 150, 172, 116, 34, 231, 173, 53, 133, 226, 249, 55, 232, 28, 117, 223, 110, 71, 241, 26, 113, 29, 41, 197, 137, 111, 183, 98, 14, 170, 24, 190, 27, 252, 86, 62, 75, 198, 210, 121, 32, 154, 219, 192, 254, 120, 205, 90, 244, 31, 221, 168, 51, 136, 7, 199, 49, 177, 18, 16, 89, 39, 128, 236, 95, 96, 81, 127, 169, 25, 181, 74, 13, 45, 229, 122, 159, 147, 201, 156, 239, 160, 224, 59, 77, 174, 42, 245, 176, 200, 235, 187, 60, 131, 83, 153, 97, 23, 43, 4, 126, 186, 119, 214, 38, 225, 105, 20, 99, 85, 33, 12, 125];\n var T1 = [3328402341, 4168907908, 4000806809, 4135287693, 4294111757, 3597364157, 3731845041, 2445657428, 1613770832, 33620227, 3462883241, 1445669757, 3892248089, 3050821474, 1303096294, 3967186586, 2412431941, 528646813, 2311702848, 4202528135, 4026202645, 2992200171, 2387036105, 4226871307, 1101901292, 3017069671, 1604494077, 1169141738, 597466303, 1403299063, 3832705686, 2613100635, 1974974402, 3791519004, 1033081774, 1277568618, 1815492186, 2118074177, 4126668546, 2211236943, 1748251740, 1369810420, 3521504564, 4193382664, 3799085459, 2883115123, 1647391059, 706024767, 134480908, 2512897874, 1176707941, 2646852446, 806885416, 932615841, 168101135, 798661301, 235341577, 605164086, 461406363, 3756188221, 3454790438, 1311188841, 2142417613, 3933566367, 302582043, 495158174, 1479289972, 874125870, 907746093, 3698224818, 3025820398, 1537253627, 2756858614, 1983593293, 3084310113, 2108928974, 1378429307, 3722699582, 1580150641, 327451799, 2790478837, 3117535592, 0, 3253595436, 1075847264, 3825007647, 2041688520, 3059440621, 3563743934, 2378943302, 1740553945, 1916352843, 2487896798, 2555137236, 2958579944, 2244988746, 3151024235, 3320835882, 1336584933, 3992714006, 2252555205, 2588757463, 1714631509, 293963156, 2319795663, 3925473552, 67240454, 4269768577, 2689618160, 2017213508, 631218106, 1269344483, 2723238387, 1571005438, 2151694528, 93294474, 1066570413, 563977660, 1882732616, 4059428100, 1673313503, 2008463041, 2950355573, 1109467491, 537923632, 3858759450, 4260623118, 3218264685, 2177748300, 403442708, 638784309, 3287084079, 3193921505, 899127202, 2286175436, 773265209, 2479146071, 1437050866, 4236148354, 2050833735, 3362022572, 3126681063, 840505643, 3866325909, 3227541664, 427917720, 2655997905, 2749160575, 1143087718, 1412049534, 999329963, 193497219, 2353415882, 3354324521, 1807268051, 672404540, 2816401017, 3160301282, 369822493, 2916866934, 3688947771, 1681011286, 1949973070, 336202270, 2454276571, 201721354, 1210328172, 3093060836, 2680341085, 3184776046, 1135389935, 3294782118, 965841320, 831886756, 3554993207, 4068047243, 3588745010, 2345191491, 1849112409, 3664604599, 26054028, 2983581028, 2622377682, 1235855840, 3630984372, 2891339514, 4092916743, 3488279077, 3395642799, 4101667470, 1202630377, 268961816, 1874508501, 4034427016, 1243948399, 1546530418, 941366308, 1470539505, 1941222599, 2546386513, 3421038627, 2715671932, 3899946140, 1042226977, 2521517021, 1639824860, 227249030, 260737669, 3765465232, 2084453954, 1907733956, 3429263018, 2420656344, 100860677, 4160157185, 470683154, 3261161891, 1781871967, 2924959737, 1773779408, 394692241, 2579611992, 974986535, 664706745, 3655459128, 3958962195, 731420851, 571543859, 3530123707, 2849626480, 126783113, 865375399, 765172662, 1008606754, 361203602, 3387549984, 2278477385, 2857719295, 1344809080, 2782912378, 59542671, 1503764984, 160008576, 437062935, 1707065306, 3622233649, 2218934982, 3496503480, 2185314755, 697932208, 1512910199, 504303377, 2075177163, 2824099068, 1841019862, 739644986];\n var T22 = [2781242211, 2230877308, 2582542199, 2381740923, 234877682, 3184946027, 2984144751, 1418839493, 1348481072, 50462977, 2848876391, 2102799147, 434634494, 1656084439, 3863849899, 2599188086, 1167051466, 2636087938, 1082771913, 2281340285, 368048890, 3954334041, 3381544775, 201060592, 3963727277, 1739838676, 4250903202, 3930435503, 3206782108, 4149453988, 2531553906, 1536934080, 3262494647, 484572669, 2923271059, 1783375398, 1517041206, 1098792767, 49674231, 1334037708, 1550332980, 4098991525, 886171109, 150598129, 2481090929, 1940642008, 1398944049, 1059722517, 201851908, 1385547719, 1699095331, 1587397571, 674240536, 2704774806, 252314885, 3039795866, 151914247, 908333586, 2602270848, 1038082786, 651029483, 1766729511, 3447698098, 2682942837, 454166793, 2652734339, 1951935532, 775166490, 758520603, 3000790638, 4004797018, 4217086112, 4137964114, 1299594043, 1639438038, 3464344499, 2068982057, 1054729187, 1901997871, 2534638724, 4121318227, 1757008337, 0, 750906861, 1614815264, 535035132, 3363418545, 3988151131, 3201591914, 1183697867, 3647454910, 1265776953, 3734260298, 3566750796, 3903871064, 1250283471, 1807470800, 717615087, 3847203498, 384695291, 3313910595, 3617213773, 1432761139, 2484176261, 3481945413, 283769337, 100925954, 2180939647, 4037038160, 1148730428, 3123027871, 3813386408, 4087501137, 4267549603, 3229630528, 2315620239, 2906624658, 3156319645, 1215313976, 82966005, 3747855548, 3245848246, 1974459098, 1665278241, 807407632, 451280895, 251524083, 1841287890, 1283575245, 337120268, 891687699, 801369324, 3787349855, 2721421207, 3431482436, 959321879, 1469301956, 4065699751, 2197585534, 1199193405, 2898814052, 3887750493, 724703513, 2514908019, 2696962144, 2551808385, 3516813135, 2141445340, 1715741218, 2119445034, 2872807568, 2198571144, 3398190662, 700968686, 3547052216, 1009259540, 2041044702, 3803995742, 487983883, 1991105499, 1004265696, 1449407026, 1316239930, 504629770, 3683797321, 168560134, 1816667172, 3837287516, 1570751170, 1857934291, 4014189740, 2797888098, 2822345105, 2754712981, 936633572, 2347923833, 852879335, 1133234376, 1500395319, 3084545389, 2348912013, 1689376213, 3533459022, 3762923945, 3034082412, 4205598294, 133428468, 634383082, 2949277029, 2398386810, 3913789102, 403703816, 3580869306, 2297460856, 1867130149, 1918643758, 607656988, 4049053350, 3346248884, 1368901318, 600565992, 2090982877, 2632479860, 557719327, 3717614411, 3697393085, 2249034635, 2232388234, 2430627952, 1115438654, 3295786421, 2865522278, 3633334344, 84280067, 33027830, 303828494, 2747425121, 1600795957, 4188952407, 3496589753, 2434238086, 1486471617, 658119965, 3106381470, 953803233, 334231800, 3005978776, 857870609, 3151128937, 1890179545, 2298973838, 2805175444, 3056442267, 574365214, 2450884487, 550103529, 1233637070, 4289353045, 2018519080, 2057691103, 2399374476, 4166623649, 2148108681, 387583245, 3664101311, 836232934, 3330556482, 3100665960, 3280093505, 2955516313, 2002398509, 287182607, 3413881008, 4238890068, 3597515707, 975967766];\n var T32 = [1671808611, 2089089148, 2006576759, 2072901243, 4061003762, 1807603307, 1873927791, 3310653893, 810573872, 16974337, 1739181671, 729634347, 4263110654, 3613570519, 2883997099, 1989864566, 3393556426, 2191335298, 3376449993, 2106063485, 4195741690, 1508618841, 1204391495, 4027317232, 2917941677, 3563566036, 2734514082, 2951366063, 2629772188, 2767672228, 1922491506, 3227229120, 3082974647, 4246528509, 2477669779, 644500518, 911895606, 1061256767, 4144166391, 3427763148, 878471220, 2784252325, 3845444069, 4043897329, 1905517169, 3631459288, 827548209, 356461077, 67897348, 3344078279, 593839651, 3277757891, 405286936, 2527147926, 84871685, 2595565466, 118033927, 305538066, 2157648768, 3795705826, 3945188843, 661212711, 2999812018, 1973414517, 152769033, 2208177539, 745822252, 439235610, 455947803, 1857215598, 1525593178, 2700827552, 1391895634, 994932283, 3596728278, 3016654259, 695947817, 3812548067, 795958831, 2224493444, 1408607827, 3513301457, 0, 3979133421, 543178784, 4229948412, 2982705585, 1542305371, 1790891114, 3410398667, 3201918910, 961245753, 1256100938, 1289001036, 1491644504, 3477767631, 3496721360, 4012557807, 2867154858, 4212583931, 1137018435, 1305975373, 861234739, 2241073541, 1171229253, 4178635257, 33948674, 2139225727, 1357946960, 1011120188, 2679776671, 2833468328, 1374921297, 2751356323, 1086357568, 2408187279, 2460827538, 2646352285, 944271416, 4110742005, 3168756668, 3066132406, 3665145818, 560153121, 271589392, 4279952895, 4077846003, 3530407890, 3444343245, 202643468, 322250259, 3962553324, 1608629855, 2543990167, 1154254916, 389623319, 3294073796, 2817676711, 2122513534, 1028094525, 1689045092, 1575467613, 422261273, 1939203699, 1621147744, 2174228865, 1339137615, 3699352540, 577127458, 712922154, 2427141008, 2290289544, 1187679302, 3995715566, 3100863416, 339486740, 3732514782, 1591917662, 186455563, 3681988059, 3762019296, 844522546, 978220090, 169743370, 1239126601, 101321734, 611076132, 1558493276, 3260915650, 3547250131, 2901361580, 1655096418, 2443721105, 2510565781, 3828863972, 2039214713, 3878868455, 3359869896, 928607799, 1840765549, 2374762893, 3580146133, 1322425422, 2850048425, 1823791212, 1459268694, 4094161908, 3928346602, 1706019429, 2056189050, 2934523822, 135794696, 3134549946, 2022240376, 628050469, 779246638, 472135708, 2800834470, 3032970164, 3327236038, 3894660072, 3715932637, 1956440180, 522272287, 1272813131, 3185336765, 2340818315, 2323976074, 1888542832, 1044544574, 3049550261, 1722469478, 1222152264, 50660867, 4127324150, 236067854, 1638122081, 895445557, 1475980887, 3117443513, 2257655686, 3243809217, 489110045, 2662934430, 3778599393, 4162055160, 2561878936, 288563729, 1773916777, 3648039385, 2391345038, 2493985684, 2612407707, 505560094, 2274497927, 3911240169, 3460925390, 1442818645, 678973480, 3749357023, 2358182796, 2717407649, 2306869641, 219617805, 3218761151, 3862026214, 1120306242, 1756942440, 1103331905, 2578459033, 762796589, 252780047, 2966125488, 1425844308, 3151392187, 372911126];\n var T4 = [1667474886, 2088535288, 2004326894, 2071694838, 4075949567, 1802223062, 1869591006, 3318043793, 808472672, 16843522, 1734846926, 724270422, 4278065639, 3621216949, 2880169549, 1987484396, 3402253711, 2189597983, 3385409673, 2105378810, 4210693615, 1499065266, 1195886990, 4042263547, 2913856577, 3570689971, 2728590687, 2947541573, 2627518243, 2762274643, 1920112356, 3233831835, 3082273397, 4261223649, 2475929149, 640051788, 909531756, 1061110142, 4160160501, 3435941763, 875846760, 2779116625, 3857003729, 4059105529, 1903268834, 3638064043, 825316194, 353713962, 67374088, 3351728789, 589522246, 3284360861, 404236336, 2526454071, 84217610, 2593830191, 117901582, 303183396, 2155911963, 3806477791, 3958056653, 656894286, 2998062463, 1970642922, 151591698, 2206440989, 741110872, 437923380, 454765878, 1852748508, 1515908788, 2694904667, 1381168804, 993742198, 3604373943, 3014905469, 690584402, 3823320797, 791638366, 2223281939, 1398011302, 3520161977, 0, 3991743681, 538992704, 4244381667, 2981218425, 1532751286, 1785380564, 3419096717, 3200178535, 960056178, 1246420628, 1280103576, 1482221744, 3486468741, 3503319995, 4025428677, 2863326543, 4227536621, 1128514950, 1296947098, 859002214, 2240123921, 1162203018, 4193849577, 33687044, 2139062782, 1347481760, 1010582648, 2678045221, 2829640523, 1364325282, 2745433693, 1077985408, 2408548869, 2459086143, 2644360225, 943212656, 4126475505, 3166494563, 3065430391, 3671750063, 555836226, 269496352, 4294908645, 4092792573, 3537006015, 3452783745, 202118168, 320025894, 3974901699, 1600119230, 2543297077, 1145359496, 387397934, 3301201811, 2812801621, 2122220284, 1027426170, 1684319432, 1566435258, 421079858, 1936954854, 1616945344, 2172753945, 1330631070, 3705438115, 572679748, 707427924, 2425400123, 2290647819, 1179044492, 4008585671, 3099120491, 336870440, 3739122087, 1583276732, 185277718, 3688593069, 3772791771, 842159716, 976899700, 168435220, 1229577106, 101059084, 606366792, 1549591736, 3267517855, 3553849021, 2897014595, 1650632388, 2442242105, 2509612081, 3840161747, 2038008818, 3890688725, 3368567691, 926374254, 1835907034, 2374863873, 3587531953, 1313788572, 2846482505, 1819063512, 1448540844, 4109633523, 3941213647, 1701162954, 2054852340, 2930698567, 134748176, 3132806511, 2021165296, 623210314, 774795868, 471606328, 2795958615, 3031746419, 3334885783, 3907527627, 3722280097, 1953799400, 522133822, 1263263126, 3183336545, 2341176845, 2324333839, 1886425312, 1044267644, 3048588401, 1718004428, 1212733584, 50529542, 4143317495, 235803164, 1633788866, 892690282, 1465383342, 3115962473, 2256965911, 3250673817, 488449850, 2661202215, 3789633753, 4177007595, 2560144171, 286339874, 1768537042, 3654906025, 2391705863, 2492770099, 2610673197, 505291324, 2273808917, 3924369609, 3469625735, 1431699370, 673740880, 3755965093, 2358021891, 2711746649, 2307489801, 218961690, 3217021541, 3873845719, 1111672452, 1751693520, 1094828930, 2576986153, 757954394, 252645662, 2964376443, 1414855848, 3149649517, 370555436];\n var T5 = [1374988112, 2118214995, 437757123, 975658646, 1001089995, 530400753, 2902087851, 1273168787, 540080725, 2910219766, 2295101073, 4110568485, 1340463100, 3307916247, 641025152, 3043140495, 3736164937, 632953703, 1172967064, 1576976609, 3274667266, 2169303058, 2370213795, 1809054150, 59727847, 361929877, 3211623147, 2505202138, 3569255213, 1484005843, 1239443753, 2395588676, 1975683434, 4102977912, 2572697195, 666464733, 3202437046, 4035489047, 3374361702, 2110667444, 1675577880, 3843699074, 2538681184, 1649639237, 2976151520, 3144396420, 4269907996, 4178062228, 1883793496, 2403728665, 2497604743, 1383856311, 2876494627, 1917518562, 3810496343, 1716890410, 3001755655, 800440835, 2261089178, 3543599269, 807962610, 599762354, 33778362, 3977675356, 2328828971, 2809771154, 4077384432, 1315562145, 1708848333, 101039829, 3509871135, 3299278474, 875451293, 2733856160, 92987698, 2767645557, 193195065, 1080094634, 1584504582, 3178106961, 1042385657, 2531067453, 3711829422, 1306967366, 2438237621, 1908694277, 67556463, 1615861247, 429456164, 3602770327, 2302690252, 1742315127, 2968011453, 126454664, 3877198648, 2043211483, 2709260871, 2084704233, 4169408201, 0, 159417987, 841739592, 504459436, 1817866830, 4245618683, 260388950, 1034867998, 908933415, 168810852, 1750902305, 2606453969, 607530554, 202008497, 2472011535, 3035535058, 463180190, 2160117071, 1641816226, 1517767529, 470948374, 3801332234, 3231722213, 1008918595, 303765277, 235474187, 4069246893, 766945465, 337553864, 1475418501, 2943682380, 4003061179, 2743034109, 4144047775, 1551037884, 1147550661, 1543208500, 2336434550, 3408119516, 3069049960, 3102011747, 3610369226, 1113818384, 328671808, 2227573024, 2236228733, 3535486456, 2935566865, 3341394285, 496906059, 3702665459, 226906860, 2009195472, 733156972, 2842737049, 294930682, 1206477858, 2835123396, 2700099354, 1451044056, 573804783, 2269728455, 3644379585, 2362090238, 2564033334, 2801107407, 2776292904, 3669462566, 1068351396, 742039012, 1350078989, 1784663195, 1417561698, 4136440770, 2430122216, 775550814, 2193862645, 2673705150, 1775276924, 1876241833, 3475313331, 3366754619, 270040487, 3902563182, 3678124923, 3441850377, 1851332852, 3969562369, 2203032232, 3868552805, 2868897406, 566021896, 4011190502, 3135740889, 1248802510, 3936291284, 699432150, 832877231, 708780849, 3332740144, 899835584, 1951317047, 4236429990, 3767586992, 866637845, 4043610186, 1106041591, 2144161806, 395441711, 1984812685, 1139781709, 3433712980, 3835036895, 2664543715, 1282050075, 3240894392, 1181045119, 2640243204, 25965917, 4203181171, 4211818798, 3009879386, 2463879762, 3910161971, 1842759443, 2597806476, 933301370, 1509430414, 3943906441, 3467192302, 3076639029, 3776767469, 2051518780, 2631065433, 1441952575, 404016761, 1942435775, 1408749034, 1610459739, 3745345300, 2017778566, 3400528769, 3110650942, 941896748, 3265478751, 371049330, 3168937228, 675039627, 4279080257, 967311729, 135050206, 3635733660, 1683407248, 2076935265, 3576870512, 1215061108, 3501741890];\n var T6 = [1347548327, 1400783205, 3273267108, 2520393566, 3409685355, 4045380933, 2880240216, 2471224067, 1428173050, 4138563181, 2441661558, 636813900, 4233094615, 3620022987, 2149987652, 2411029155, 1239331162, 1730525723, 2554718734, 3781033664, 46346101, 310463728, 2743944855, 3328955385, 3875770207, 2501218972, 3955191162, 3667219033, 768917123, 3545789473, 692707433, 1150208456, 1786102409, 2029293177, 1805211710, 3710368113, 3065962831, 401639597, 1724457132, 3028143674, 409198410, 2196052529, 1620529459, 1164071807, 3769721975, 2226875310, 486441376, 2499348523, 1483753576, 428819965, 2274680428, 3075636216, 598438867, 3799141122, 1474502543, 711349675, 129166120, 53458370, 2592523643, 2782082824, 4063242375, 2988687269, 3120694122, 1559041666, 730517276, 2460449204, 4042459122, 2706270690, 3446004468, 3573941694, 533804130, 2328143614, 2637442643, 2695033685, 839224033, 1973745387, 957055980, 2856345839, 106852767, 1371368976, 4181598602, 1033297158, 2933734917, 1179510461, 3046200461, 91341917, 1862534868, 4284502037, 605657339, 2547432937, 3431546947, 2003294622, 3182487618, 2282195339, 954669403, 3682191598, 1201765386, 3917234703, 3388507166, 0, 2198438022, 1211247597, 2887651696, 1315723890, 4227665663, 1443857720, 507358933, 657861945, 1678381017, 560487590, 3516619604, 975451694, 2970356327, 261314535, 3535072918, 2652609425, 1333838021, 2724322336, 1767536459, 370938394, 182621114, 3854606378, 1128014560, 487725847, 185469197, 2918353863, 3106780840, 3356761769, 2237133081, 1286567175, 3152976349, 4255350624, 2683765030, 3160175349, 3309594171, 878443390, 1988838185, 3704300486, 1756818940, 1673061617, 3403100636, 272786309, 1075025698, 545572369, 2105887268, 4174560061, 296679730, 1841768865, 1260232239, 4091327024, 3960309330, 3497509347, 1814803222, 2578018489, 4195456072, 575138148, 3299409036, 446754879, 3629546796, 4011996048, 3347532110, 3252238545, 4270639778, 915985419, 3483825537, 681933534, 651868046, 2755636671, 3828103837, 223377554, 2607439820, 1649704518, 3270937875, 3901806776, 1580087799, 4118987695, 3198115200, 2087309459, 2842678573, 3016697106, 1003007129, 2802849917, 1860738147, 2077965243, 164439672, 4100872472, 32283319, 2827177882, 1709610350, 2125135846, 136428751, 3874428392, 3652904859, 3460984630, 3572145929, 3593056380, 2939266226, 824852259, 818324884, 3224740454, 930369212, 2801566410, 2967507152, 355706840, 1257309336, 4148292826, 243256656, 790073846, 2373340630, 1296297904, 1422699085, 3756299780, 3818836405, 457992840, 3099667487, 2135319889, 77422314, 1560382517, 1945798516, 788204353, 1521706781, 1385356242, 870912086, 325965383, 2358957921, 2050466060, 2388260884, 2313884476, 4006521127, 901210569, 3990953189, 1014646705, 1503449823, 1062597235, 2031621326, 3212035895, 3931371469, 1533017514, 350174575, 2256028891, 2177544179, 1052338372, 741876788, 1606591296, 1914052035, 213705253, 2334669897, 1107234197, 1899603969, 3725069491, 2631447780, 2422494913, 1635502980, 1893020342, 1950903388, 1120974935];\n var T7 = [2807058932, 1699970625, 2764249623, 1586903591, 1808481195, 1173430173, 1487645946, 59984867, 4199882800, 1844882806, 1989249228, 1277555970, 3623636965, 3419915562, 1149249077, 2744104290, 1514790577, 459744698, 244860394, 3235995134, 1963115311, 4027744588, 2544078150, 4190530515, 1608975247, 2627016082, 2062270317, 1507497298, 2200818878, 567498868, 1764313568, 3359936201, 2305455554, 2037970062, 1047239e3, 1910319033, 1337376481, 2904027272, 2892417312, 984907214, 1243112415, 830661914, 861968209, 2135253587, 2011214180, 2927934315, 2686254721, 731183368, 1750626376, 4246310725, 1820824798, 4172763771, 3542330227, 48394827, 2404901663, 2871682645, 671593195, 3254988725, 2073724613, 145085239, 2280796200, 2779915199, 1790575107, 2187128086, 472615631, 3029510009, 4075877127, 3802222185, 4107101658, 3201631749, 1646252340, 4270507174, 1402811438, 1436590835, 3778151818, 3950355702, 3963161475, 4020912224, 2667994737, 273792366, 2331590177, 104699613, 95345982, 3175501286, 2377486676, 1560637892, 3564045318, 369057872, 4213447064, 3919042237, 1137477952, 2658625497, 1119727848, 2340947849, 1530455833, 4007360968, 172466556, 266959938, 516552836, 0, 2256734592, 3980931627, 1890328081, 1917742170, 4294704398, 945164165, 3575528878, 958871085, 3647212047, 2787207260, 1423022939, 775562294, 1739656202, 3876557655, 2530391278, 2443058075, 3310321856, 547512796, 1265195639, 437656594, 3121275539, 719700128, 3762502690, 387781147, 218828297, 3350065803, 2830708150, 2848461854, 428169201, 122466165, 3720081049, 1627235199, 648017665, 4122762354, 1002783846, 2117360635, 695634755, 3336358691, 4234721005, 4049844452, 3704280881, 2232435299, 574624663, 287343814, 612205898, 1039717051, 840019705, 2708326185, 793451934, 821288114, 1391201670, 3822090177, 376187827, 3113855344, 1224348052, 1679968233, 2361698556, 1058709744, 752375421, 2431590963, 1321699145, 3519142200, 2734591178, 188127444, 2177869557, 3727205754, 2384911031, 3215212461, 2648976442, 2450346104, 3432737375, 1180849278, 331544205, 3102249176, 4150144569, 2952102595, 2159976285, 2474404304, 766078933, 313773861, 2570832044, 2108100632, 1668212892, 3145456443, 2013908262, 418672217, 3070356634, 2594734927, 1852171925, 3867060991, 3473416636, 3907448597, 2614737639, 919489135, 164948639, 2094410160, 2997825956, 590424639, 2486224549, 1723872674, 3157750862, 3399941250, 3501252752, 3625268135, 2555048196, 3673637356, 1343127501, 4130281361, 3599595085, 2957853679, 1297403050, 81781910, 3051593425, 2283490410, 532201772, 1367295589, 3926170974, 895287692, 1953757831, 1093597963, 492483431, 3528626907, 1446242576, 1192455638, 1636604631, 209336225, 344873464, 1015671571, 669961897, 3375740769, 3857572124, 2973530695, 3747192018, 1933530610, 3464042516, 935293895, 3454686199, 2858115069, 1863638845, 3683022916, 4085369519, 3292445032, 875313188, 1080017571, 3279033885, 621591778, 1233856572, 2504130317, 24197544, 3017672716, 3835484340, 3247465558, 2220981195, 3060847922, 1551124588, 1463996600];\n var T8 = [4104605777, 1097159550, 396673818, 660510266, 2875968315, 2638606623, 4200115116, 3808662347, 821712160, 1986918061, 3430322568, 38544885, 3856137295, 718002117, 893681702, 1654886325, 2975484382, 3122358053, 3926825029, 4274053469, 796197571, 1290801793, 1184342925, 3556361835, 2405426947, 2459735317, 1836772287, 1381620373, 3196267988, 1948373848, 3764988233, 3385345166, 3263785589, 2390325492, 1480485785, 3111247143, 3780097726, 2293045232, 548169417, 3459953789, 3746175075, 439452389, 1362321559, 1400849762, 1685577905, 1806599355, 2174754046, 137073913, 1214797936, 1174215055, 3731654548, 2079897426, 1943217067, 1258480242, 529487843, 1437280870, 3945269170, 3049390895, 3313212038, 923313619, 679998e3, 3215307299, 57326082, 377642221, 3474729866, 2041877159, 133361907, 1776460110, 3673476453, 96392454, 878845905, 2801699524, 777231668, 4082475170, 2330014213, 4142626212, 2213296395, 1626319424, 1906247262, 1846563261, 562755902, 3708173718, 1040559837, 3871163981, 1418573201, 3294430577, 114585348, 1343618912, 2566595609, 3186202582, 1078185097, 3651041127, 3896688048, 2307622919, 425408743, 3371096953, 2081048481, 1108339068, 2216610296, 0, 2156299017, 736970802, 292596766, 1517440620, 251657213, 2235061775, 2933202493, 758720310, 265905162, 1554391400, 1532285339, 908999204, 174567692, 1474760595, 4002861748, 2610011675, 3234156416, 3693126241, 2001430874, 303699484, 2478443234, 2687165888, 585122620, 454499602, 151849742, 2345119218, 3064510765, 514443284, 4044981591, 1963412655, 2581445614, 2137062819, 19308535, 1928707164, 1715193156, 4219352155, 1126790795, 600235211, 3992742070, 3841024952, 836553431, 1669664834, 2535604243, 3323011204, 1243905413, 3141400786, 4180808110, 698445255, 2653899549, 2989552604, 2253581325, 3252932727, 3004591147, 1891211689, 2487810577, 3915653703, 4237083816, 4030667424, 2100090966, 865136418, 1229899655, 953270745, 3399679628, 3557504664, 4118925222, 2061379749, 3079546586, 2915017791, 983426092, 2022837584, 1607244650, 2118541908, 2366882550, 3635996816, 972512814, 3283088770, 1568718495, 3499326569, 3576539503, 621982671, 2895723464, 410887952, 2623762152, 1002142683, 645401037, 1494807662, 2595684844, 1335535747, 2507040230, 4293295786, 3167684641, 367585007, 3885750714, 1865862730, 2668221674, 2960971305, 2763173681, 1059270954, 2777952454, 2724642869, 1320957812, 2194319100, 2429595872, 2815956275, 77089521, 3973773121, 3444575871, 2448830231, 1305906550, 4021308739, 2857194700, 2516901860, 3518358430, 1787304780, 740276417, 1699839814, 1592394909, 2352307457, 2272556026, 188821243, 1729977011, 3687994002, 274084841, 3594982253, 3613494426, 2701949495, 4162096729, 322734571, 2837966542, 1640576439, 484830689, 1202797690, 3537852828, 4067639125, 349075736, 3342319475, 4157467219, 4255800159, 1030690015, 1155237496, 2951971274, 1757691577, 607398968, 2738905026, 499347990, 3794078908, 1011452712, 227885567, 2818666809, 213114376, 3034881240, 1455525988, 3414450555, 850817237, 1817998408, 3092726480];\n var U1 = [0, 235474187, 470948374, 303765277, 941896748, 908933415, 607530554, 708780849, 1883793496, 2118214995, 1817866830, 1649639237, 1215061108, 1181045119, 1417561698, 1517767529, 3767586992, 4003061179, 4236429990, 4069246893, 3635733660, 3602770327, 3299278474, 3400528769, 2430122216, 2664543715, 2362090238, 2193862645, 2835123396, 2801107407, 3035535058, 3135740889, 3678124923, 3576870512, 3341394285, 3374361702, 3810496343, 3977675356, 4279080257, 4043610186, 2876494627, 2776292904, 3076639029, 3110650942, 2472011535, 2640243204, 2403728665, 2169303058, 1001089995, 899835584, 666464733, 699432150, 59727847, 226906860, 530400753, 294930682, 1273168787, 1172967064, 1475418501, 1509430414, 1942435775, 2110667444, 1876241833, 1641816226, 2910219766, 2743034109, 2976151520, 3211623147, 2505202138, 2606453969, 2302690252, 2269728455, 3711829422, 3543599269, 3240894392, 3475313331, 3843699074, 3943906441, 4178062228, 4144047775, 1306967366, 1139781709, 1374988112, 1610459739, 1975683434, 2076935265, 1775276924, 1742315127, 1034867998, 866637845, 566021896, 800440835, 92987698, 193195065, 429456164, 395441711, 1984812685, 2017778566, 1784663195, 1683407248, 1315562145, 1080094634, 1383856311, 1551037884, 101039829, 135050206, 437757123, 337553864, 1042385657, 807962610, 573804783, 742039012, 2531067453, 2564033334, 2328828971, 2227573024, 2935566865, 2700099354, 3001755655, 3168937228, 3868552805, 3902563182, 4203181171, 4102977912, 3736164937, 3501741890, 3265478751, 3433712980, 1106041591, 1340463100, 1576976609, 1408749034, 2043211483, 2009195472, 1708848333, 1809054150, 832877231, 1068351396, 766945465, 599762354, 159417987, 126454664, 361929877, 463180190, 2709260871, 2943682380, 3178106961, 3009879386, 2572697195, 2538681184, 2236228733, 2336434550, 3509871135, 3745345300, 3441850377, 3274667266, 3910161971, 3877198648, 4110568485, 4211818798, 2597806476, 2497604743, 2261089178, 2295101073, 2733856160, 2902087851, 3202437046, 2968011453, 3936291284, 3835036895, 4136440770, 4169408201, 3535486456, 3702665459, 3467192302, 3231722213, 2051518780, 1951317047, 1716890410, 1750902305, 1113818384, 1282050075, 1584504582, 1350078989, 168810852, 67556463, 371049330, 404016761, 841739592, 1008918595, 775550814, 540080725, 3969562369, 3801332234, 4035489047, 4269907996, 3569255213, 3669462566, 3366754619, 3332740144, 2631065433, 2463879762, 2160117071, 2395588676, 2767645557, 2868897406, 3102011747, 3069049960, 202008497, 33778362, 270040487, 504459436, 875451293, 975658646, 675039627, 641025152, 2084704233, 1917518562, 1615861247, 1851332852, 1147550661, 1248802510, 1484005843, 1451044056, 933301370, 967311729, 733156972, 632953703, 260388950, 25965917, 328671808, 496906059, 1206477858, 1239443753, 1543208500, 1441952575, 2144161806, 1908694277, 1675577880, 1842759443, 3610369226, 3644379585, 3408119516, 3307916247, 4011190502, 3776767469, 4077384432, 4245618683, 2809771154, 2842737049, 3144396420, 3043140495, 2673705150, 2438237621, 2203032232, 2370213795];\n var U22 = [0, 185469197, 370938394, 487725847, 741876788, 657861945, 975451694, 824852259, 1483753576, 1400783205, 1315723890, 1164071807, 1950903388, 2135319889, 1649704518, 1767536459, 2967507152, 3152976349, 2801566410, 2918353863, 2631447780, 2547432937, 2328143614, 2177544179, 3901806776, 3818836405, 4270639778, 4118987695, 3299409036, 3483825537, 3535072918, 3652904859, 2077965243, 1893020342, 1841768865, 1724457132, 1474502543, 1559041666, 1107234197, 1257309336, 598438867, 681933534, 901210569, 1052338372, 261314535, 77422314, 428819965, 310463728, 3409685355, 3224740454, 3710368113, 3593056380, 3875770207, 3960309330, 4045380933, 4195456072, 2471224067, 2554718734, 2237133081, 2388260884, 3212035895, 3028143674, 2842678573, 2724322336, 4138563181, 4255350624, 3769721975, 3955191162, 3667219033, 3516619604, 3431546947, 3347532110, 2933734917, 2782082824, 3099667487, 3016697106, 2196052529, 2313884476, 2499348523, 2683765030, 1179510461, 1296297904, 1347548327, 1533017514, 1786102409, 1635502980, 2087309459, 2003294622, 507358933, 355706840, 136428751, 53458370, 839224033, 957055980, 605657339, 790073846, 2373340630, 2256028891, 2607439820, 2422494913, 2706270690, 2856345839, 3075636216, 3160175349, 3573941694, 3725069491, 3273267108, 3356761769, 4181598602, 4063242375, 4011996048, 3828103837, 1033297158, 915985419, 730517276, 545572369, 296679730, 446754879, 129166120, 213705253, 1709610350, 1860738147, 1945798516, 2029293177, 1239331162, 1120974935, 1606591296, 1422699085, 4148292826, 4233094615, 3781033664, 3931371469, 3682191598, 3497509347, 3446004468, 3328955385, 2939266226, 2755636671, 3106780840, 2988687269, 2198438022, 2282195339, 2501218972, 2652609425, 1201765386, 1286567175, 1371368976, 1521706781, 1805211710, 1620529459, 2105887268, 1988838185, 533804130, 350174575, 164439672, 46346101, 870912086, 954669403, 636813900, 788204353, 2358957921, 2274680428, 2592523643, 2441661558, 2695033685, 2880240216, 3065962831, 3182487618, 3572145929, 3756299780, 3270937875, 3388507166, 4174560061, 4091327024, 4006521127, 3854606378, 1014646705, 930369212, 711349675, 560487590, 272786309, 457992840, 106852767, 223377554, 1678381017, 1862534868, 1914052035, 2031621326, 1211247597, 1128014560, 1580087799, 1428173050, 32283319, 182621114, 401639597, 486441376, 768917123, 651868046, 1003007129, 818324884, 1503449823, 1385356242, 1333838021, 1150208456, 1973745387, 2125135846, 1673061617, 1756818940, 2970356327, 3120694122, 2802849917, 2887651696, 2637442643, 2520393566, 2334669897, 2149987652, 3917234703, 3799141122, 4284502037, 4100872472, 3309594171, 3460984630, 3545789473, 3629546796, 2050466060, 1899603969, 1814803222, 1730525723, 1443857720, 1560382517, 1075025698, 1260232239, 575138148, 692707433, 878443390, 1062597235, 243256656, 91341917, 409198410, 325965383, 3403100636, 3252238545, 3704300486, 3620022987, 3874428392, 3990953189, 4042459122, 4227665663, 2460449204, 2578018489, 2226875310, 2411029155, 3198115200, 3046200461, 2827177882, 2743944855];\n var U32 = [0, 218828297, 437656594, 387781147, 875313188, 958871085, 775562294, 590424639, 1750626376, 1699970625, 1917742170, 2135253587, 1551124588, 1367295589, 1180849278, 1265195639, 3501252752, 3720081049, 3399941250, 3350065803, 3835484340, 3919042237, 4270507174, 4085369519, 3102249176, 3051593425, 2734591178, 2952102595, 2361698556, 2177869557, 2530391278, 2614737639, 3145456443, 3060847922, 2708326185, 2892417312, 2404901663, 2187128086, 2504130317, 2555048196, 3542330227, 3727205754, 3375740769, 3292445032, 3876557655, 3926170974, 4246310725, 4027744588, 1808481195, 1723872674, 1910319033, 2094410160, 1608975247, 1391201670, 1173430173, 1224348052, 59984867, 244860394, 428169201, 344873464, 935293895, 984907214, 766078933, 547512796, 1844882806, 1627235199, 2011214180, 2062270317, 1507497298, 1423022939, 1137477952, 1321699145, 95345982, 145085239, 532201772, 313773861, 830661914, 1015671571, 731183368, 648017665, 3175501286, 2957853679, 2807058932, 2858115069, 2305455554, 2220981195, 2474404304, 2658625497, 3575528878, 3625268135, 3473416636, 3254988725, 3778151818, 3963161475, 4213447064, 4130281361, 3599595085, 3683022916, 3432737375, 3247465558, 3802222185, 4020912224, 4172763771, 4122762354, 3201631749, 3017672716, 2764249623, 2848461854, 2331590177, 2280796200, 2431590963, 2648976442, 104699613, 188127444, 472615631, 287343814, 840019705, 1058709744, 671593195, 621591778, 1852171925, 1668212892, 1953757831, 2037970062, 1514790577, 1463996600, 1080017571, 1297403050, 3673637356, 3623636965, 3235995134, 3454686199, 4007360968, 3822090177, 4107101658, 4190530515, 2997825956, 3215212461, 2830708150, 2779915199, 2256734592, 2340947849, 2627016082, 2443058075, 172466556, 122466165, 273792366, 492483431, 1047239e3, 861968209, 612205898, 695634755, 1646252340, 1863638845, 2013908262, 1963115311, 1446242576, 1530455833, 1277555970, 1093597963, 1636604631, 1820824798, 2073724613, 1989249228, 1436590835, 1487645946, 1337376481, 1119727848, 164948639, 81781910, 331544205, 516552836, 1039717051, 821288114, 669961897, 719700128, 2973530695, 3157750862, 2871682645, 2787207260, 2232435299, 2283490410, 2667994737, 2450346104, 3647212047, 3564045318, 3279033885, 3464042516, 3980931627, 3762502690, 4150144569, 4199882800, 3070356634, 3121275539, 2904027272, 2686254721, 2200818878, 2384911031, 2570832044, 2486224549, 3747192018, 3528626907, 3310321856, 3359936201, 3950355702, 3867060991, 4049844452, 4234721005, 1739656202, 1790575107, 2108100632, 1890328081, 1402811438, 1586903591, 1233856572, 1149249077, 266959938, 48394827, 369057872, 418672217, 1002783846, 919489135, 567498868, 752375421, 209336225, 24197544, 376187827, 459744698, 945164165, 895287692, 574624663, 793451934, 1679968233, 1764313568, 2117360635, 1933530610, 1343127501, 1560637892, 1243112415, 1192455638, 3704280881, 3519142200, 3336358691, 3419915562, 3907448597, 3857572124, 4075877127, 4294704398, 3029510009, 3113855344, 2927934315, 2744104290, 2159976285, 2377486676, 2594734927, 2544078150];\n var U4 = [0, 151849742, 303699484, 454499602, 607398968, 758720310, 908999204, 1059270954, 1214797936, 1097159550, 1517440620, 1400849762, 1817998408, 1699839814, 2118541908, 2001430874, 2429595872, 2581445614, 2194319100, 2345119218, 3034881240, 3186202582, 2801699524, 2951971274, 3635996816, 3518358430, 3399679628, 3283088770, 4237083816, 4118925222, 4002861748, 3885750714, 1002142683, 850817237, 698445255, 548169417, 529487843, 377642221, 227885567, 77089521, 1943217067, 2061379749, 1640576439, 1757691577, 1474760595, 1592394909, 1174215055, 1290801793, 2875968315, 2724642869, 3111247143, 2960971305, 2405426947, 2253581325, 2638606623, 2487810577, 3808662347, 3926825029, 4044981591, 4162096729, 3342319475, 3459953789, 3576539503, 3693126241, 1986918061, 2137062819, 1685577905, 1836772287, 1381620373, 1532285339, 1078185097, 1229899655, 1040559837, 923313619, 740276417, 621982671, 439452389, 322734571, 137073913, 19308535, 3871163981, 4021308739, 4104605777, 4255800159, 3263785589, 3414450555, 3499326569, 3651041127, 2933202493, 2815956275, 3167684641, 3049390895, 2330014213, 2213296395, 2566595609, 2448830231, 1305906550, 1155237496, 1607244650, 1455525988, 1776460110, 1626319424, 2079897426, 1928707164, 96392454, 213114376, 396673818, 514443284, 562755902, 679998e3, 865136418, 983426092, 3708173718, 3557504664, 3474729866, 3323011204, 4180808110, 4030667424, 3945269170, 3794078908, 2507040230, 2623762152, 2272556026, 2390325492, 2975484382, 3092726480, 2738905026, 2857194700, 3973773121, 3856137295, 4274053469, 4157467219, 3371096953, 3252932727, 3673476453, 3556361835, 2763173681, 2915017791, 3064510765, 3215307299, 2156299017, 2307622919, 2459735317, 2610011675, 2081048481, 1963412655, 1846563261, 1729977011, 1480485785, 1362321559, 1243905413, 1126790795, 878845905, 1030690015, 645401037, 796197571, 274084841, 425408743, 38544885, 188821243, 3613494426, 3731654548, 3313212038, 3430322568, 4082475170, 4200115116, 3780097726, 3896688048, 2668221674, 2516901860, 2366882550, 2216610296, 3141400786, 2989552604, 2837966542, 2687165888, 1202797690, 1320957812, 1437280870, 1554391400, 1669664834, 1787304780, 1906247262, 2022837584, 265905162, 114585348, 499347990, 349075736, 736970802, 585122620, 972512814, 821712160, 2595684844, 2478443234, 2293045232, 2174754046, 3196267988, 3079546586, 2895723464, 2777952454, 3537852828, 3687994002, 3234156416, 3385345166, 4142626212, 4293295786, 3841024952, 3992742070, 174567692, 57326082, 410887952, 292596766, 777231668, 660510266, 1011452712, 893681702, 1108339068, 1258480242, 1343618912, 1494807662, 1715193156, 1865862730, 1948373848, 2100090966, 2701949495, 2818666809, 3004591147, 3122358053, 2235061775, 2352307457, 2535604243, 2653899549, 3915653703, 3764988233, 4219352155, 4067639125, 3444575871, 3294430577, 3746175075, 3594982253, 836553431, 953270745, 600235211, 718002117, 367585007, 484830689, 133361907, 251657213, 2041877159, 1891211689, 1806599355, 1654886325, 1568718495, 1418573201, 1335535747, 1184342925];\n function convertToInt32(bytes) {\n const result = [];\n for (let i3 = 0; i3 < bytes.length; i3 += 4) {\n result.push(bytes[i3] << 24 | bytes[i3 + 1] << 16 | bytes[i3 + 2] << 8 | bytes[i3 + 3]);\n }\n return result;\n }\n var AES = class _AES {\n get key() {\n return __classPrivateFieldGet3(this, _AES_key, \"f\").slice();\n }\n constructor(key) {\n _AES_key.set(this, void 0);\n _AES_Kd.set(this, void 0);\n _AES_Ke.set(this, void 0);\n if (!(this instanceof _AES)) {\n throw Error(\"AES must be instanitated with `new`\");\n }\n __classPrivateFieldSet3(this, _AES_key, new Uint8Array(key), \"f\");\n const rounds = numberOfRounds[this.key.length];\n if (rounds == null) {\n throw new TypeError(\"invalid key size (must be 16, 24 or 32 bytes)\");\n }\n __classPrivateFieldSet3(this, _AES_Ke, [], \"f\");\n __classPrivateFieldSet3(this, _AES_Kd, [], \"f\");\n for (let i3 = 0; i3 <= rounds; i3++) {\n __classPrivateFieldGet3(this, _AES_Ke, \"f\").push([0, 0, 0, 0]);\n __classPrivateFieldGet3(this, _AES_Kd, \"f\").push([0, 0, 0, 0]);\n }\n const roundKeyCount = (rounds + 1) * 4;\n const KC = this.key.length / 4;\n const tk = convertToInt32(this.key);\n let index2;\n for (let i3 = 0; i3 < KC; i3++) {\n index2 = i3 >> 2;\n __classPrivateFieldGet3(this, _AES_Ke, \"f\")[index2][i3 % 4] = tk[i3];\n __classPrivateFieldGet3(this, _AES_Kd, \"f\")[rounds - index2][i3 % 4] = tk[i3];\n }\n let rconpointer = 0;\n let t3 = KC, tt;\n while (t3 < roundKeyCount) {\n tt = tk[KC - 1];\n tk[0] ^= S3[tt >> 16 & 255] << 24 ^ S3[tt >> 8 & 255] << 16 ^ S3[tt & 255] << 8 ^ S3[tt >> 24 & 255] ^ rcon[rconpointer] << 24;\n rconpointer += 1;\n if (KC != 8) {\n for (let i4 = 1; i4 < KC; i4++) {\n tk[i4] ^= tk[i4 - 1];\n }\n } else {\n for (let i4 = 1; i4 < KC / 2; i4++) {\n tk[i4] ^= tk[i4 - 1];\n }\n tt = tk[KC / 2 - 1];\n tk[KC / 2] ^= S3[tt & 255] ^ S3[tt >> 8 & 255] << 8 ^ S3[tt >> 16 & 255] << 16 ^ S3[tt >> 24 & 255] << 24;\n for (let i4 = KC / 2 + 1; i4 < KC; i4++) {\n tk[i4] ^= tk[i4 - 1];\n }\n }\n let i3 = 0, r2, c4;\n while (i3 < KC && t3 < roundKeyCount) {\n r2 = t3 >> 2;\n c4 = t3 % 4;\n __classPrivateFieldGet3(this, _AES_Ke, \"f\")[r2][c4] = tk[i3];\n __classPrivateFieldGet3(this, _AES_Kd, \"f\")[rounds - r2][c4] = tk[i3++];\n t3++;\n }\n }\n for (let r2 = 1; r2 < rounds; r2++) {\n for (let c4 = 0; c4 < 4; c4++) {\n tt = __classPrivateFieldGet3(this, _AES_Kd, \"f\")[r2][c4];\n __classPrivateFieldGet3(this, _AES_Kd, \"f\")[r2][c4] = U1[tt >> 24 & 255] ^ U22[tt >> 16 & 255] ^ U32[tt >> 8 & 255] ^ U4[tt & 255];\n }\n }\n }\n encrypt(plaintext) {\n if (plaintext.length != 16) {\n throw new TypeError(\"invalid plaintext size (must be 16 bytes)\");\n }\n const rounds = __classPrivateFieldGet3(this, _AES_Ke, \"f\").length - 1;\n const a3 = [0, 0, 0, 0];\n let t3 = convertToInt32(plaintext);\n for (let i3 = 0; i3 < 4; i3++) {\n t3[i3] ^= __classPrivateFieldGet3(this, _AES_Ke, \"f\")[0][i3];\n }\n for (let r2 = 1; r2 < rounds; r2++) {\n for (let i3 = 0; i3 < 4; i3++) {\n a3[i3] = T1[t3[i3] >> 24 & 255] ^ T22[t3[(i3 + 1) % 4] >> 16 & 255] ^ T32[t3[(i3 + 2) % 4] >> 8 & 255] ^ T4[t3[(i3 + 3) % 4] & 255] ^ __classPrivateFieldGet3(this, _AES_Ke, \"f\")[r2][i3];\n }\n t3 = a3.slice();\n }\n const result = new Uint8Array(16);\n let tt = 0;\n for (let i3 = 0; i3 < 4; i3++) {\n tt = __classPrivateFieldGet3(this, _AES_Ke, \"f\")[rounds][i3];\n result[4 * i3] = (S3[t3[i3] >> 24 & 255] ^ tt >> 24) & 255;\n result[4 * i3 + 1] = (S3[t3[(i3 + 1) % 4] >> 16 & 255] ^ tt >> 16) & 255;\n result[4 * i3 + 2] = (S3[t3[(i3 + 2) % 4] >> 8 & 255] ^ tt >> 8) & 255;\n result[4 * i3 + 3] = (S3[t3[(i3 + 3) % 4] & 255] ^ tt) & 255;\n }\n return result;\n }\n decrypt(ciphertext) {\n if (ciphertext.length != 16) {\n throw new TypeError(\"invalid ciphertext size (must be 16 bytes)\");\n }\n const rounds = __classPrivateFieldGet3(this, _AES_Kd, \"f\").length - 1;\n const a3 = [0, 0, 0, 0];\n let t3 = convertToInt32(ciphertext);\n for (let i3 = 0; i3 < 4; i3++) {\n t3[i3] ^= __classPrivateFieldGet3(this, _AES_Kd, \"f\")[0][i3];\n }\n for (let r2 = 1; r2 < rounds; r2++) {\n for (let i3 = 0; i3 < 4; i3++) {\n a3[i3] = T5[t3[i3] >> 24 & 255] ^ T6[t3[(i3 + 3) % 4] >> 16 & 255] ^ T7[t3[(i3 + 2) % 4] >> 8 & 255] ^ T8[t3[(i3 + 1) % 4] & 255] ^ __classPrivateFieldGet3(this, _AES_Kd, \"f\")[r2][i3];\n }\n t3 = a3.slice();\n }\n const result = new Uint8Array(16);\n let tt = 0;\n for (let i3 = 0; i3 < 4; i3++) {\n tt = __classPrivateFieldGet3(this, _AES_Kd, \"f\")[rounds][i3];\n result[4 * i3] = (Si[t3[i3] >> 24 & 255] ^ tt >> 24) & 255;\n result[4 * i3 + 1] = (Si[t3[(i3 + 3) % 4] >> 16 & 255] ^ tt >> 16) & 255;\n result[4 * i3 + 2] = (Si[t3[(i3 + 2) % 4] >> 8 & 255] ^ tt >> 8) & 255;\n result[4 * i3 + 3] = (Si[t3[(i3 + 1) % 4] & 255] ^ tt) & 255;\n }\n return result;\n }\n };\n exports3.AES = AES;\n _AES_key = /* @__PURE__ */ new WeakMap(), _AES_Kd = /* @__PURE__ */ new WeakMap(), _AES_Ke = /* @__PURE__ */ new WeakMap();\n }\n });\n\n // ../../../node_modules/.pnpm/aes-js@4.0.0-beta.5/node_modules/aes-js/lib.commonjs/mode.js\n var require_mode = __commonJS({\n \"../../../node_modules/.pnpm/aes-js@4.0.0-beta.5/node_modules/aes-js/lib.commonjs/mode.js\"(exports3) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n Object.defineProperty(exports3, \"__esModule\", { value: true });\n exports3.ModeOfOperation = void 0;\n var aes_js_1 = require_aes();\n var ModeOfOperation = class {\n constructor(name, key, cls) {\n if (cls && !(this instanceof cls)) {\n throw new Error(`${name} must be instantiated with \"new\"`);\n }\n Object.defineProperties(this, {\n aes: { enumerable: true, value: new aes_js_1.AES(key) },\n name: { enumerable: true, value: name }\n });\n }\n };\n exports3.ModeOfOperation = ModeOfOperation;\n }\n });\n\n // ../../../node_modules/.pnpm/aes-js@4.0.0-beta.5/node_modules/aes-js/lib.commonjs/mode-cbc.js\n var require_mode_cbc = __commonJS({\n \"../../../node_modules/.pnpm/aes-js@4.0.0-beta.5/node_modules/aes-js/lib.commonjs/mode-cbc.js\"(exports3) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n var __classPrivateFieldSet3 = exports3 && exports3.__classPrivateFieldSet || function(receiver, state, value, kind, f6) {\n if (kind === \"m\")\n throw new TypeError(\"Private method is not writable\");\n if (kind === \"a\" && !f6)\n throw new TypeError(\"Private accessor was defined without a setter\");\n if (typeof state === \"function\" ? receiver !== state || !f6 : !state.has(receiver))\n throw new TypeError(\"Cannot write private member to an object whose class did not declare it\");\n return kind === \"a\" ? f6.call(receiver, value) : f6 ? f6.value = value : state.set(receiver, value), value;\n };\n var __classPrivateFieldGet3 = exports3 && exports3.__classPrivateFieldGet || function(receiver, state, kind, f6) {\n if (kind === \"a\" && !f6)\n throw new TypeError(\"Private accessor was defined without a getter\");\n if (typeof state === \"function\" ? receiver !== state || !f6 : !state.has(receiver))\n throw new TypeError(\"Cannot read private member from an object whose class did not declare it\");\n return kind === \"m\" ? f6 : kind === \"a\" ? f6.call(receiver) : f6 ? f6.value : state.get(receiver);\n };\n var _CBC_iv;\n var _CBC_lastBlock;\n Object.defineProperty(exports3, \"__esModule\", { value: true });\n exports3.CBC = void 0;\n var mode_js_1 = require_mode();\n var CBC = class _CBC extends mode_js_1.ModeOfOperation {\n constructor(key, iv) {\n super(\"ECC\", key, _CBC);\n _CBC_iv.set(this, void 0);\n _CBC_lastBlock.set(this, void 0);\n if (iv) {\n if (iv.length % 16) {\n throw new TypeError(\"invalid iv size (must be 16 bytes)\");\n }\n __classPrivateFieldSet3(this, _CBC_iv, new Uint8Array(iv), \"f\");\n } else {\n __classPrivateFieldSet3(this, _CBC_iv, new Uint8Array(16), \"f\");\n }\n __classPrivateFieldSet3(this, _CBC_lastBlock, this.iv, \"f\");\n }\n get iv() {\n return new Uint8Array(__classPrivateFieldGet3(this, _CBC_iv, \"f\"));\n }\n encrypt(plaintext) {\n if (plaintext.length % 16) {\n throw new TypeError(\"invalid plaintext size (must be multiple of 16 bytes)\");\n }\n const ciphertext = new Uint8Array(plaintext.length);\n for (let i3 = 0; i3 < plaintext.length; i3 += 16) {\n for (let j2 = 0; j2 < 16; j2++) {\n __classPrivateFieldGet3(this, _CBC_lastBlock, \"f\")[j2] ^= plaintext[i3 + j2];\n }\n __classPrivateFieldSet3(this, _CBC_lastBlock, this.aes.encrypt(__classPrivateFieldGet3(this, _CBC_lastBlock, \"f\")), \"f\");\n ciphertext.set(__classPrivateFieldGet3(this, _CBC_lastBlock, \"f\"), i3);\n }\n return ciphertext;\n }\n decrypt(ciphertext) {\n if (ciphertext.length % 16) {\n throw new TypeError(\"invalid ciphertext size (must be multiple of 16 bytes)\");\n }\n const plaintext = new Uint8Array(ciphertext.length);\n for (let i3 = 0; i3 < ciphertext.length; i3 += 16) {\n const block = this.aes.decrypt(ciphertext.subarray(i3, i3 + 16));\n for (let j2 = 0; j2 < 16; j2++) {\n plaintext[i3 + j2] = block[j2] ^ __classPrivateFieldGet3(this, _CBC_lastBlock, \"f\")[j2];\n __classPrivateFieldGet3(this, _CBC_lastBlock, \"f\")[j2] = ciphertext[i3 + j2];\n }\n }\n return plaintext;\n }\n };\n exports3.CBC = CBC;\n _CBC_iv = /* @__PURE__ */ new WeakMap(), _CBC_lastBlock = /* @__PURE__ */ new WeakMap();\n }\n });\n\n // ../../../node_modules/.pnpm/aes-js@4.0.0-beta.5/node_modules/aes-js/lib.commonjs/mode-cfb.js\n var require_mode_cfb = __commonJS({\n \"../../../node_modules/.pnpm/aes-js@4.0.0-beta.5/node_modules/aes-js/lib.commonjs/mode-cfb.js\"(exports3) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n var __classPrivateFieldSet3 = exports3 && exports3.__classPrivateFieldSet || function(receiver, state, value, kind, f6) {\n if (kind === \"m\")\n throw new TypeError(\"Private method is not writable\");\n if (kind === \"a\" && !f6)\n throw new TypeError(\"Private accessor was defined without a setter\");\n if (typeof state === \"function\" ? receiver !== state || !f6 : !state.has(receiver))\n throw new TypeError(\"Cannot write private member to an object whose class did not declare it\");\n return kind === \"a\" ? f6.call(receiver, value) : f6 ? f6.value = value : state.set(receiver, value), value;\n };\n var __classPrivateFieldGet3 = exports3 && exports3.__classPrivateFieldGet || function(receiver, state, kind, f6) {\n if (kind === \"a\" && !f6)\n throw new TypeError(\"Private accessor was defined without a getter\");\n if (typeof state === \"function\" ? receiver !== state || !f6 : !state.has(receiver))\n throw new TypeError(\"Cannot read private member from an object whose class did not declare it\");\n return kind === \"m\" ? f6 : kind === \"a\" ? f6.call(receiver) : f6 ? f6.value : state.get(receiver);\n };\n var _CFB_instances;\n var _CFB_iv;\n var _CFB_shiftRegister;\n var _CFB_shift;\n Object.defineProperty(exports3, \"__esModule\", { value: true });\n exports3.CFB = void 0;\n var mode_js_1 = require_mode();\n var CFB = class _CFB extends mode_js_1.ModeOfOperation {\n constructor(key, iv, segmentSize = 8) {\n super(\"CFB\", key, _CFB);\n _CFB_instances.add(this);\n _CFB_iv.set(this, void 0);\n _CFB_shiftRegister.set(this, void 0);\n if (!Number.isInteger(segmentSize) || segmentSize % 8) {\n throw new TypeError(\"invalid segmentSize\");\n }\n Object.defineProperties(this, {\n segmentSize: { enumerable: true, value: segmentSize }\n });\n if (iv) {\n if (iv.length % 16) {\n throw new TypeError(\"invalid iv size (must be 16 bytes)\");\n }\n __classPrivateFieldSet3(this, _CFB_iv, new Uint8Array(iv), \"f\");\n } else {\n __classPrivateFieldSet3(this, _CFB_iv, new Uint8Array(16), \"f\");\n }\n __classPrivateFieldSet3(this, _CFB_shiftRegister, this.iv, \"f\");\n }\n get iv() {\n return new Uint8Array(__classPrivateFieldGet3(this, _CFB_iv, \"f\"));\n }\n encrypt(plaintext) {\n if (8 * plaintext.length % this.segmentSize) {\n throw new TypeError(\"invalid plaintext size (must be multiple of segmentSize bytes)\");\n }\n const segmentSize = this.segmentSize / 8;\n const ciphertext = new Uint8Array(plaintext);\n for (let i3 = 0; i3 < ciphertext.length; i3 += segmentSize) {\n const xorSegment = this.aes.encrypt(__classPrivateFieldGet3(this, _CFB_shiftRegister, \"f\"));\n for (let j2 = 0; j2 < segmentSize; j2++) {\n ciphertext[i3 + j2] ^= xorSegment[j2];\n }\n __classPrivateFieldGet3(this, _CFB_instances, \"m\", _CFB_shift).call(this, ciphertext.subarray(i3));\n }\n return ciphertext;\n }\n decrypt(ciphertext) {\n if (8 * ciphertext.length % this.segmentSize) {\n throw new TypeError(\"invalid ciphertext size (must be multiple of segmentSize bytes)\");\n }\n const segmentSize = this.segmentSize / 8;\n const plaintext = new Uint8Array(ciphertext);\n for (let i3 = 0; i3 < plaintext.length; i3 += segmentSize) {\n const xorSegment = this.aes.encrypt(__classPrivateFieldGet3(this, _CFB_shiftRegister, \"f\"));\n for (let j2 = 0; j2 < segmentSize; j2++) {\n plaintext[i3 + j2] ^= xorSegment[j2];\n }\n __classPrivateFieldGet3(this, _CFB_instances, \"m\", _CFB_shift).call(this, ciphertext.subarray(i3));\n }\n return plaintext;\n }\n };\n exports3.CFB = CFB;\n _CFB_iv = /* @__PURE__ */ new WeakMap(), _CFB_shiftRegister = /* @__PURE__ */ new WeakMap(), _CFB_instances = /* @__PURE__ */ new WeakSet(), _CFB_shift = function _CFB_shift2(data) {\n const segmentSize = this.segmentSize / 8;\n __classPrivateFieldGet3(this, _CFB_shiftRegister, \"f\").set(__classPrivateFieldGet3(this, _CFB_shiftRegister, \"f\").subarray(segmentSize));\n __classPrivateFieldGet3(this, _CFB_shiftRegister, \"f\").set(data.subarray(0, segmentSize), 16 - segmentSize);\n };\n }\n });\n\n // ../../../node_modules/.pnpm/aes-js@4.0.0-beta.5/node_modules/aes-js/lib.commonjs/mode-ctr.js\n var require_mode_ctr = __commonJS({\n \"../../../node_modules/.pnpm/aes-js@4.0.0-beta.5/node_modules/aes-js/lib.commonjs/mode-ctr.js\"(exports3) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n var __classPrivateFieldSet3 = exports3 && exports3.__classPrivateFieldSet || function(receiver, state, value, kind, f6) {\n if (kind === \"m\")\n throw new TypeError(\"Private method is not writable\");\n if (kind === \"a\" && !f6)\n throw new TypeError(\"Private accessor was defined without a setter\");\n if (typeof state === \"function\" ? receiver !== state || !f6 : !state.has(receiver))\n throw new TypeError(\"Cannot write private member to an object whose class did not declare it\");\n return kind === \"a\" ? f6.call(receiver, value) : f6 ? f6.value = value : state.set(receiver, value), value;\n };\n var __classPrivateFieldGet3 = exports3 && exports3.__classPrivateFieldGet || function(receiver, state, kind, f6) {\n if (kind === \"a\" && !f6)\n throw new TypeError(\"Private accessor was defined without a getter\");\n if (typeof state === \"function\" ? receiver !== state || !f6 : !state.has(receiver))\n throw new TypeError(\"Cannot read private member from an object whose class did not declare it\");\n return kind === \"m\" ? f6 : kind === \"a\" ? f6.call(receiver) : f6 ? f6.value : state.get(receiver);\n };\n var _CTR_remaining;\n var _CTR_remainingIndex;\n var _CTR_counter;\n Object.defineProperty(exports3, \"__esModule\", { value: true });\n exports3.CTR = void 0;\n var mode_js_1 = require_mode();\n var CTR = class _CTR extends mode_js_1.ModeOfOperation {\n constructor(key, initialValue) {\n super(\"CTR\", key, _CTR);\n _CTR_remaining.set(this, void 0);\n _CTR_remainingIndex.set(this, void 0);\n _CTR_counter.set(this, void 0);\n __classPrivateFieldSet3(this, _CTR_counter, new Uint8Array(16), \"f\");\n __classPrivateFieldGet3(this, _CTR_counter, \"f\").fill(0);\n __classPrivateFieldSet3(this, _CTR_remaining, __classPrivateFieldGet3(this, _CTR_counter, \"f\"), \"f\");\n __classPrivateFieldSet3(this, _CTR_remainingIndex, 16, \"f\");\n if (initialValue == null) {\n initialValue = 1;\n }\n if (typeof initialValue === \"number\") {\n this.setCounterValue(initialValue);\n } else {\n this.setCounterBytes(initialValue);\n }\n }\n get counter() {\n return new Uint8Array(__classPrivateFieldGet3(this, _CTR_counter, \"f\"));\n }\n setCounterValue(value) {\n if (!Number.isInteger(value) || value < 0 || value > Number.MAX_SAFE_INTEGER) {\n throw new TypeError(\"invalid counter initial integer value\");\n }\n for (let index2 = 15; index2 >= 0; --index2) {\n __classPrivateFieldGet3(this, _CTR_counter, \"f\")[index2] = value % 256;\n value = Math.floor(value / 256);\n }\n }\n setCounterBytes(value) {\n if (value.length !== 16) {\n throw new TypeError(\"invalid counter initial Uint8Array value length\");\n }\n __classPrivateFieldGet3(this, _CTR_counter, \"f\").set(value);\n }\n increment() {\n for (let i3 = 15; i3 >= 0; i3--) {\n if (__classPrivateFieldGet3(this, _CTR_counter, \"f\")[i3] === 255) {\n __classPrivateFieldGet3(this, _CTR_counter, \"f\")[i3] = 0;\n } else {\n __classPrivateFieldGet3(this, _CTR_counter, \"f\")[i3]++;\n break;\n }\n }\n }\n encrypt(plaintext) {\n var _a, _b;\n const crypttext = new Uint8Array(plaintext);\n for (let i3 = 0; i3 < crypttext.length; i3++) {\n if (__classPrivateFieldGet3(this, _CTR_remainingIndex, \"f\") === 16) {\n __classPrivateFieldSet3(this, _CTR_remaining, this.aes.encrypt(__classPrivateFieldGet3(this, _CTR_counter, \"f\")), \"f\");\n __classPrivateFieldSet3(this, _CTR_remainingIndex, 0, \"f\");\n this.increment();\n }\n crypttext[i3] ^= __classPrivateFieldGet3(this, _CTR_remaining, \"f\")[__classPrivateFieldSet3(this, _CTR_remainingIndex, (_b = __classPrivateFieldGet3(this, _CTR_remainingIndex, \"f\"), _a = _b++, _b), \"f\"), _a];\n }\n return crypttext;\n }\n decrypt(ciphertext) {\n return this.encrypt(ciphertext);\n }\n };\n exports3.CTR = CTR;\n _CTR_remaining = /* @__PURE__ */ new WeakMap(), _CTR_remainingIndex = /* @__PURE__ */ new WeakMap(), _CTR_counter = /* @__PURE__ */ new WeakMap();\n }\n });\n\n // ../../../node_modules/.pnpm/aes-js@4.0.0-beta.5/node_modules/aes-js/lib.commonjs/mode-ecb.js\n var require_mode_ecb = __commonJS({\n \"../../../node_modules/.pnpm/aes-js@4.0.0-beta.5/node_modules/aes-js/lib.commonjs/mode-ecb.js\"(exports3) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n Object.defineProperty(exports3, \"__esModule\", { value: true });\n exports3.ECB = void 0;\n var mode_js_1 = require_mode();\n var ECB = class _ECB extends mode_js_1.ModeOfOperation {\n constructor(key) {\n super(\"ECB\", key, _ECB);\n }\n encrypt(plaintext) {\n if (plaintext.length % 16) {\n throw new TypeError(\"invalid plaintext size (must be multiple of 16 bytes)\");\n }\n const crypttext = new Uint8Array(plaintext.length);\n for (let i3 = 0; i3 < plaintext.length; i3 += 16) {\n crypttext.set(this.aes.encrypt(plaintext.subarray(i3, i3 + 16)), i3);\n }\n return crypttext;\n }\n decrypt(crypttext) {\n if (crypttext.length % 16) {\n throw new TypeError(\"invalid ciphertext size (must be multiple of 16 bytes)\");\n }\n const plaintext = new Uint8Array(crypttext.length);\n for (let i3 = 0; i3 < crypttext.length; i3 += 16) {\n plaintext.set(this.aes.decrypt(crypttext.subarray(i3, i3 + 16)), i3);\n }\n return plaintext;\n }\n };\n exports3.ECB = ECB;\n }\n });\n\n // ../../../node_modules/.pnpm/aes-js@4.0.0-beta.5/node_modules/aes-js/lib.commonjs/mode-ofb.js\n var require_mode_ofb = __commonJS({\n \"../../../node_modules/.pnpm/aes-js@4.0.0-beta.5/node_modules/aes-js/lib.commonjs/mode-ofb.js\"(exports3) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n var __classPrivateFieldSet3 = exports3 && exports3.__classPrivateFieldSet || function(receiver, state, value, kind, f6) {\n if (kind === \"m\")\n throw new TypeError(\"Private method is not writable\");\n if (kind === \"a\" && !f6)\n throw new TypeError(\"Private accessor was defined without a setter\");\n if (typeof state === \"function\" ? receiver !== state || !f6 : !state.has(receiver))\n throw new TypeError(\"Cannot write private member to an object whose class did not declare it\");\n return kind === \"a\" ? f6.call(receiver, value) : f6 ? f6.value = value : state.set(receiver, value), value;\n };\n var __classPrivateFieldGet3 = exports3 && exports3.__classPrivateFieldGet || function(receiver, state, kind, f6) {\n if (kind === \"a\" && !f6)\n throw new TypeError(\"Private accessor was defined without a getter\");\n if (typeof state === \"function\" ? receiver !== state || !f6 : !state.has(receiver))\n throw new TypeError(\"Cannot read private member from an object whose class did not declare it\");\n return kind === \"m\" ? f6 : kind === \"a\" ? f6.call(receiver) : f6 ? f6.value : state.get(receiver);\n };\n var _OFB_iv;\n var _OFB_lastPrecipher;\n var _OFB_lastPrecipherIndex;\n Object.defineProperty(exports3, \"__esModule\", { value: true });\n exports3.OFB = void 0;\n var mode_js_1 = require_mode();\n var OFB = class _OFB extends mode_js_1.ModeOfOperation {\n constructor(key, iv) {\n super(\"OFB\", key, _OFB);\n _OFB_iv.set(this, void 0);\n _OFB_lastPrecipher.set(this, void 0);\n _OFB_lastPrecipherIndex.set(this, void 0);\n if (iv) {\n if (iv.length % 16) {\n throw new TypeError(\"invalid iv size (must be 16 bytes)\");\n }\n __classPrivateFieldSet3(this, _OFB_iv, new Uint8Array(iv), \"f\");\n } else {\n __classPrivateFieldSet3(this, _OFB_iv, new Uint8Array(16), \"f\");\n }\n __classPrivateFieldSet3(this, _OFB_lastPrecipher, this.iv, \"f\");\n __classPrivateFieldSet3(this, _OFB_lastPrecipherIndex, 16, \"f\");\n }\n get iv() {\n return new Uint8Array(__classPrivateFieldGet3(this, _OFB_iv, \"f\"));\n }\n encrypt(plaintext) {\n var _a, _b;\n if (plaintext.length % 16) {\n throw new TypeError(\"invalid plaintext size (must be multiple of 16 bytes)\");\n }\n const ciphertext = new Uint8Array(plaintext);\n for (let i3 = 0; i3 < ciphertext.length; i3++) {\n if (__classPrivateFieldGet3(this, _OFB_lastPrecipherIndex, \"f\") === 16) {\n __classPrivateFieldSet3(this, _OFB_lastPrecipher, this.aes.encrypt(__classPrivateFieldGet3(this, _OFB_lastPrecipher, \"f\")), \"f\");\n __classPrivateFieldSet3(this, _OFB_lastPrecipherIndex, 0, \"f\");\n }\n ciphertext[i3] ^= __classPrivateFieldGet3(this, _OFB_lastPrecipher, \"f\")[__classPrivateFieldSet3(this, _OFB_lastPrecipherIndex, (_b = __classPrivateFieldGet3(this, _OFB_lastPrecipherIndex, \"f\"), _a = _b++, _b), \"f\"), _a];\n }\n return ciphertext;\n }\n decrypt(ciphertext) {\n if (ciphertext.length % 16) {\n throw new TypeError(\"invalid ciphertext size (must be multiple of 16 bytes)\");\n }\n return this.encrypt(ciphertext);\n }\n };\n exports3.OFB = OFB;\n _OFB_iv = /* @__PURE__ */ new WeakMap(), _OFB_lastPrecipher = /* @__PURE__ */ new WeakMap(), _OFB_lastPrecipherIndex = /* @__PURE__ */ new WeakMap();\n }\n });\n\n // ../../../node_modules/.pnpm/aes-js@4.0.0-beta.5/node_modules/aes-js/lib.commonjs/padding.js\n var require_padding = __commonJS({\n \"../../../node_modules/.pnpm/aes-js@4.0.0-beta.5/node_modules/aes-js/lib.commonjs/padding.js\"(exports3) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n Object.defineProperty(exports3, \"__esModule\", { value: true });\n exports3.pkcs7Strip = exports3.pkcs7Pad = void 0;\n function pkcs7Pad(data) {\n const padder = 16 - data.length % 16;\n const result = new Uint8Array(data.length + padder);\n result.set(data);\n for (let i3 = data.length; i3 < result.length; i3++) {\n result[i3] = padder;\n }\n return result;\n }\n exports3.pkcs7Pad = pkcs7Pad;\n function pkcs7Strip(data) {\n if (data.length < 16) {\n throw new TypeError(\"PKCS#7 invalid length\");\n }\n const padder = data[data.length - 1];\n if (padder > 16) {\n throw new TypeError(\"PKCS#7 padding byte out of range\");\n }\n const length2 = data.length - padder;\n for (let i3 = 0; i3 < padder; i3++) {\n if (data[length2 + i3] !== padder) {\n throw new TypeError(\"PKCS#7 invalid padding byte\");\n }\n }\n return new Uint8Array(data.subarray(0, length2));\n }\n exports3.pkcs7Strip = pkcs7Strip;\n }\n });\n\n // ../../../node_modules/.pnpm/aes-js@4.0.0-beta.5/node_modules/aes-js/lib.commonjs/index.js\n var require_lib33 = __commonJS({\n \"../../../node_modules/.pnpm/aes-js@4.0.0-beta.5/node_modules/aes-js/lib.commonjs/index.js\"(exports3) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n Object.defineProperty(exports3, \"__esModule\", { value: true });\n exports3.pkcs7Strip = exports3.pkcs7Pad = exports3.OFB = exports3.ECB = exports3.CTR = exports3.CFB = exports3.CBC = exports3.ModeOfOperation = exports3.AES = void 0;\n var aes_js_1 = require_aes();\n Object.defineProperty(exports3, \"AES\", { enumerable: true, get: function() {\n return aes_js_1.AES;\n } });\n var mode_js_1 = require_mode();\n Object.defineProperty(exports3, \"ModeOfOperation\", { enumerable: true, get: function() {\n return mode_js_1.ModeOfOperation;\n } });\n var mode_cbc_js_1 = require_mode_cbc();\n Object.defineProperty(exports3, \"CBC\", { enumerable: true, get: function() {\n return mode_cbc_js_1.CBC;\n } });\n var mode_cfb_js_1 = require_mode_cfb();\n Object.defineProperty(exports3, \"CFB\", { enumerable: true, get: function() {\n return mode_cfb_js_1.CFB;\n } });\n var mode_ctr_js_1 = require_mode_ctr();\n Object.defineProperty(exports3, \"CTR\", { enumerable: true, get: function() {\n return mode_ctr_js_1.CTR;\n } });\n var mode_ecb_js_1 = require_mode_ecb();\n Object.defineProperty(exports3, \"ECB\", { enumerable: true, get: function() {\n return mode_ecb_js_1.ECB;\n } });\n var mode_ofb_js_1 = require_mode_ofb();\n Object.defineProperty(exports3, \"OFB\", { enumerable: true, get: function() {\n return mode_ofb_js_1.OFB;\n } });\n var padding_js_1 = require_padding();\n Object.defineProperty(exports3, \"pkcs7Pad\", { enumerable: true, get: function() {\n return padding_js_1.pkcs7Pad;\n } });\n Object.defineProperty(exports3, \"pkcs7Strip\", { enumerable: true, get: function() {\n return padding_js_1.pkcs7Strip;\n } });\n }\n });\n\n // ../../../node_modules/.pnpm/ethers@6.15.0_bufferutil@4.0.9_utf-8-validate@5.0.10/node_modules/ethers/lib.commonjs/wallet/utils.js\n var require_utils11 = __commonJS({\n \"../../../node_modules/.pnpm/ethers@6.15.0_bufferutil@4.0.9_utf-8-validate@5.0.10/node_modules/ethers/lib.commonjs/wallet/utils.js\"(exports3) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n Object.defineProperty(exports3, \"__esModule\", { value: true });\n exports3.spelunk = exports3.getPassword = exports3.zpad = exports3.looseArrayify = void 0;\n var index_js_1 = require_utils8();\n function looseArrayify(hexString) {\n if (typeof hexString === \"string\" && !hexString.startsWith(\"0x\")) {\n hexString = \"0x\" + hexString;\n }\n return (0, index_js_1.getBytesCopy)(hexString);\n }\n exports3.looseArrayify = looseArrayify;\n function zpad(value, length2) {\n value = String(value);\n while (value.length < length2) {\n value = \"0\" + value;\n }\n return value;\n }\n exports3.zpad = zpad;\n function getPassword(password) {\n if (typeof password === \"string\") {\n return (0, index_js_1.toUtf8Bytes)(password, \"NFKC\");\n }\n return (0, index_js_1.getBytesCopy)(password);\n }\n exports3.getPassword = getPassword;\n function spelunk(object2, _path) {\n const match = _path.match(/^([a-z0-9$_.-]*)(:([a-z]+))?(!)?$/i);\n (0, index_js_1.assertArgument)(match != null, \"invalid path\", \"path\", _path);\n const path = match[1];\n const type = match[3];\n const reqd = match[4] === \"!\";\n let cur = object2;\n for (const comp of path.toLowerCase().split(\".\")) {\n if (Array.isArray(cur)) {\n if (!comp.match(/^[0-9]+$/)) {\n break;\n }\n cur = cur[parseInt(comp)];\n } else if (typeof cur === \"object\") {\n let found = null;\n for (const key in cur) {\n if (key.toLowerCase() === comp) {\n found = cur[key];\n break;\n }\n }\n cur = found;\n } else {\n cur = null;\n }\n if (cur == null) {\n break;\n }\n }\n (0, index_js_1.assertArgument)(!reqd || cur != null, \"missing required value\", \"path\", path);\n if (type && cur != null) {\n if (type === \"int\") {\n if (typeof cur === \"string\" && cur.match(/^-?[0-9]+$/)) {\n return parseInt(cur);\n } else if (Number.isSafeInteger(cur)) {\n return cur;\n }\n }\n if (type === \"number\") {\n if (typeof cur === \"string\" && cur.match(/^-?[0-9.]*$/)) {\n return parseFloat(cur);\n }\n }\n if (type === \"data\") {\n if (typeof cur === \"string\") {\n return looseArrayify(cur);\n }\n }\n if (type === \"array\" && Array.isArray(cur)) {\n return cur;\n }\n if (type === typeof cur) {\n return cur;\n }\n (0, index_js_1.assertArgument)(false, `wrong type found for ${type} `, \"path\", path);\n }\n return cur;\n }\n exports3.spelunk = spelunk;\n }\n });\n\n // ../../../node_modules/.pnpm/ethers@6.15.0_bufferutil@4.0.9_utf-8-validate@5.0.10/node_modules/ethers/lib.commonjs/wallet/json-keystore.js\n var require_json_keystore = __commonJS({\n \"../../../node_modules/.pnpm/ethers@6.15.0_bufferutil@4.0.9_utf-8-validate@5.0.10/node_modules/ethers/lib.commonjs/wallet/json-keystore.js\"(exports3) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n Object.defineProperty(exports3, \"__esModule\", { value: true });\n exports3.encryptKeystoreJson = exports3.encryptKeystoreJsonSync = exports3.decryptKeystoreJson = exports3.decryptKeystoreJsonSync = exports3.isKeystoreJson = void 0;\n var aes_js_1 = require_lib33();\n var index_js_1 = require_address3();\n var index_js_2 = require_crypto2();\n var index_js_3 = require_transaction2();\n var index_js_4 = require_utils8();\n var utils_js_1 = require_utils11();\n var _version_js_1 = require_version27();\n var defaultPath = \"m/44'/60'/0'/0/0\";\n function isKeystoreJson(json) {\n try {\n const data = JSON.parse(json);\n const version6 = data.version != null ? parseInt(data.version) : 0;\n if (version6 === 3) {\n return true;\n }\n } catch (error) {\n }\n return false;\n }\n exports3.isKeystoreJson = isKeystoreJson;\n function decrypt(data, key, ciphertext) {\n const cipher = (0, utils_js_1.spelunk)(data, \"crypto.cipher:string\");\n if (cipher === \"aes-128-ctr\") {\n const iv = (0, utils_js_1.spelunk)(data, \"crypto.cipherparams.iv:data!\");\n const aesCtr = new aes_js_1.CTR(key, iv);\n return (0, index_js_4.hexlify)(aesCtr.decrypt(ciphertext));\n }\n (0, index_js_4.assert)(false, \"unsupported cipher\", \"UNSUPPORTED_OPERATION\", {\n operation: \"decrypt\"\n });\n }\n function getAccount(data, _key) {\n const key = (0, index_js_4.getBytes)(_key);\n const ciphertext = (0, utils_js_1.spelunk)(data, \"crypto.ciphertext:data!\");\n const computedMAC = (0, index_js_4.hexlify)((0, index_js_2.keccak256)((0, index_js_4.concat)([key.slice(16, 32), ciphertext]))).substring(2);\n (0, index_js_4.assertArgument)(computedMAC === (0, utils_js_1.spelunk)(data, \"crypto.mac:string!\").toLowerCase(), \"incorrect password\", \"password\", \"[ REDACTED ]\");\n const privateKey = decrypt(data, key.slice(0, 16), ciphertext);\n const address = (0, index_js_3.computeAddress)(privateKey);\n if (data.address) {\n let check = data.address.toLowerCase();\n if (!check.startsWith(\"0x\")) {\n check = \"0x\" + check;\n }\n (0, index_js_4.assertArgument)((0, index_js_1.getAddress)(check) === address, \"keystore address/privateKey mismatch\", \"address\", data.address);\n }\n const account = { address, privateKey };\n const version6 = (0, utils_js_1.spelunk)(data, \"x-ethers.version:string\");\n if (version6 === \"0.1\") {\n const mnemonicKey = key.slice(32, 64);\n const mnemonicCiphertext = (0, utils_js_1.spelunk)(data, \"x-ethers.mnemonicCiphertext:data!\");\n const mnemonicIv = (0, utils_js_1.spelunk)(data, \"x-ethers.mnemonicCounter:data!\");\n const mnemonicAesCtr = new aes_js_1.CTR(mnemonicKey, mnemonicIv);\n account.mnemonic = {\n path: (0, utils_js_1.spelunk)(data, \"x-ethers.path:string\") || defaultPath,\n locale: (0, utils_js_1.spelunk)(data, \"x-ethers.locale:string\") || \"en\",\n entropy: (0, index_js_4.hexlify)((0, index_js_4.getBytes)(mnemonicAesCtr.decrypt(mnemonicCiphertext)))\n };\n }\n return account;\n }\n function getDecryptKdfParams(data) {\n const kdf = (0, utils_js_1.spelunk)(data, \"crypto.kdf:string\");\n if (kdf && typeof kdf === \"string\") {\n if (kdf.toLowerCase() === \"scrypt\") {\n const salt = (0, utils_js_1.spelunk)(data, \"crypto.kdfparams.salt:data!\");\n const N4 = (0, utils_js_1.spelunk)(data, \"crypto.kdfparams.n:int!\");\n const r2 = (0, utils_js_1.spelunk)(data, \"crypto.kdfparams.r:int!\");\n const p4 = (0, utils_js_1.spelunk)(data, \"crypto.kdfparams.p:int!\");\n (0, index_js_4.assertArgument)(N4 > 0 && (N4 & N4 - 1) === 0, \"invalid kdf.N\", \"kdf.N\", N4);\n (0, index_js_4.assertArgument)(r2 > 0 && p4 > 0, \"invalid kdf\", \"kdf\", kdf);\n const dkLen = (0, utils_js_1.spelunk)(data, \"crypto.kdfparams.dklen:int!\");\n (0, index_js_4.assertArgument)(dkLen === 32, \"invalid kdf.dklen\", \"kdf.dflen\", dkLen);\n return { name: \"scrypt\", salt, N: N4, r: r2, p: p4, dkLen: 64 };\n } else if (kdf.toLowerCase() === \"pbkdf2\") {\n const salt = (0, utils_js_1.spelunk)(data, \"crypto.kdfparams.salt:data!\");\n const prf = (0, utils_js_1.spelunk)(data, \"crypto.kdfparams.prf:string!\");\n const algorithm = prf.split(\"-\").pop();\n (0, index_js_4.assertArgument)(algorithm === \"sha256\" || algorithm === \"sha512\", \"invalid kdf.pdf\", \"kdf.pdf\", prf);\n const count = (0, utils_js_1.spelunk)(data, \"crypto.kdfparams.c:int!\");\n const dkLen = (0, utils_js_1.spelunk)(data, \"crypto.kdfparams.dklen:int!\");\n (0, index_js_4.assertArgument)(dkLen === 32, \"invalid kdf.dklen\", \"kdf.dklen\", dkLen);\n return { name: \"pbkdf2\", salt, count, dkLen, algorithm };\n }\n }\n (0, index_js_4.assertArgument)(false, \"unsupported key-derivation function\", \"kdf\", kdf);\n }\n function decryptKeystoreJsonSync(json, _password) {\n const data = JSON.parse(json);\n const password = (0, utils_js_1.getPassword)(_password);\n const params = getDecryptKdfParams(data);\n if (params.name === \"pbkdf2\") {\n const { salt: salt2, count, dkLen: dkLen2, algorithm } = params;\n const key2 = (0, index_js_2.pbkdf2)(password, salt2, count, dkLen2, algorithm);\n return getAccount(data, key2);\n }\n (0, index_js_4.assert)(params.name === \"scrypt\", \"cannot be reached\", \"UNKNOWN_ERROR\", { params });\n const { salt, N: N4, r: r2, p: p4, dkLen } = params;\n const key = (0, index_js_2.scryptSync)(password, salt, N4, r2, p4, dkLen);\n return getAccount(data, key);\n }\n exports3.decryptKeystoreJsonSync = decryptKeystoreJsonSync;\n function stall(duration) {\n return new Promise((resolve) => {\n setTimeout(() => {\n resolve();\n }, duration);\n });\n }\n async function decryptKeystoreJson(json, _password, progress) {\n const data = JSON.parse(json);\n const password = (0, utils_js_1.getPassword)(_password);\n const params = getDecryptKdfParams(data);\n if (params.name === \"pbkdf2\") {\n if (progress) {\n progress(0);\n await stall(0);\n }\n const { salt: salt2, count, dkLen: dkLen2, algorithm } = params;\n const key2 = (0, index_js_2.pbkdf2)(password, salt2, count, dkLen2, algorithm);\n if (progress) {\n progress(1);\n await stall(0);\n }\n return getAccount(data, key2);\n }\n (0, index_js_4.assert)(params.name === \"scrypt\", \"cannot be reached\", \"UNKNOWN_ERROR\", { params });\n const { salt, N: N4, r: r2, p: p4, dkLen } = params;\n const key = await (0, index_js_2.scrypt)(password, salt, N4, r2, p4, dkLen, progress);\n return getAccount(data, key);\n }\n exports3.decryptKeystoreJson = decryptKeystoreJson;\n function getEncryptKdfParams(options) {\n const salt = options.salt != null ? (0, index_js_4.getBytes)(options.salt, \"options.salt\") : (0, index_js_2.randomBytes)(32);\n let N4 = 1 << 17, r2 = 8, p4 = 1;\n if (options.scrypt) {\n if (options.scrypt.N) {\n N4 = options.scrypt.N;\n }\n if (options.scrypt.r) {\n r2 = options.scrypt.r;\n }\n if (options.scrypt.p) {\n p4 = options.scrypt.p;\n }\n }\n (0, index_js_4.assertArgument)(typeof N4 === \"number\" && N4 > 0 && Number.isSafeInteger(N4) && (BigInt(N4) & BigInt(N4 - 1)) === BigInt(0), \"invalid scrypt N parameter\", \"options.N\", N4);\n (0, index_js_4.assertArgument)(typeof r2 === \"number\" && r2 > 0 && Number.isSafeInteger(r2), \"invalid scrypt r parameter\", \"options.r\", r2);\n (0, index_js_4.assertArgument)(typeof p4 === \"number\" && p4 > 0 && Number.isSafeInteger(p4), \"invalid scrypt p parameter\", \"options.p\", p4);\n return { name: \"scrypt\", dkLen: 32, salt, N: N4, r: r2, p: p4 };\n }\n function _encryptKeystore(key, kdf, account, options) {\n const privateKey = (0, index_js_4.getBytes)(account.privateKey, \"privateKey\");\n const iv = options.iv != null ? (0, index_js_4.getBytes)(options.iv, \"options.iv\") : (0, index_js_2.randomBytes)(16);\n (0, index_js_4.assertArgument)(iv.length === 16, \"invalid options.iv length\", \"options.iv\", options.iv);\n const uuidRandom = options.uuid != null ? (0, index_js_4.getBytes)(options.uuid, \"options.uuid\") : (0, index_js_2.randomBytes)(16);\n (0, index_js_4.assertArgument)(uuidRandom.length === 16, \"invalid options.uuid length\", \"options.uuid\", options.iv);\n const derivedKey = key.slice(0, 16);\n const macPrefix = key.slice(16, 32);\n const aesCtr = new aes_js_1.CTR(derivedKey, iv);\n const ciphertext = (0, index_js_4.getBytes)(aesCtr.encrypt(privateKey));\n const mac = (0, index_js_2.keccak256)((0, index_js_4.concat)([macPrefix, ciphertext]));\n const data = {\n address: account.address.substring(2).toLowerCase(),\n id: (0, index_js_4.uuidV4)(uuidRandom),\n version: 3,\n Crypto: {\n cipher: \"aes-128-ctr\",\n cipherparams: {\n iv: (0, index_js_4.hexlify)(iv).substring(2)\n },\n ciphertext: (0, index_js_4.hexlify)(ciphertext).substring(2),\n kdf: \"scrypt\",\n kdfparams: {\n salt: (0, index_js_4.hexlify)(kdf.salt).substring(2),\n n: kdf.N,\n dklen: 32,\n p: kdf.p,\n r: kdf.r\n },\n mac: mac.substring(2)\n }\n };\n if (account.mnemonic) {\n const client = options.client != null ? options.client : `ethers/${_version_js_1.version}`;\n const path = account.mnemonic.path || defaultPath;\n const locale = account.mnemonic.locale || \"en\";\n const mnemonicKey = key.slice(32, 64);\n const entropy = (0, index_js_4.getBytes)(account.mnemonic.entropy, \"account.mnemonic.entropy\");\n const mnemonicIv = (0, index_js_2.randomBytes)(16);\n const mnemonicAesCtr = new aes_js_1.CTR(mnemonicKey, mnemonicIv);\n const mnemonicCiphertext = (0, index_js_4.getBytes)(mnemonicAesCtr.encrypt(entropy));\n const now = /* @__PURE__ */ new Date();\n const timestamp = now.getUTCFullYear() + \"-\" + (0, utils_js_1.zpad)(now.getUTCMonth() + 1, 2) + \"-\" + (0, utils_js_1.zpad)(now.getUTCDate(), 2) + \"T\" + (0, utils_js_1.zpad)(now.getUTCHours(), 2) + \"-\" + (0, utils_js_1.zpad)(now.getUTCMinutes(), 2) + \"-\" + (0, utils_js_1.zpad)(now.getUTCSeconds(), 2) + \".0Z\";\n const gethFilename = \"UTC--\" + timestamp + \"--\" + data.address;\n data[\"x-ethers\"] = {\n client,\n gethFilename,\n path,\n locale,\n mnemonicCounter: (0, index_js_4.hexlify)(mnemonicIv).substring(2),\n mnemonicCiphertext: (0, index_js_4.hexlify)(mnemonicCiphertext).substring(2),\n version: \"0.1\"\n };\n }\n return JSON.stringify(data);\n }\n function encryptKeystoreJsonSync(account, password, options) {\n if (options == null) {\n options = {};\n }\n const passwordBytes = (0, utils_js_1.getPassword)(password);\n const kdf = getEncryptKdfParams(options);\n const key = (0, index_js_2.scryptSync)(passwordBytes, kdf.salt, kdf.N, kdf.r, kdf.p, 64);\n return _encryptKeystore((0, index_js_4.getBytes)(key), kdf, account, options);\n }\n exports3.encryptKeystoreJsonSync = encryptKeystoreJsonSync;\n async function encryptKeystoreJson(account, password, options) {\n if (options == null) {\n options = {};\n }\n const passwordBytes = (0, utils_js_1.getPassword)(password);\n const kdf = getEncryptKdfParams(options);\n const key = await (0, index_js_2.scrypt)(passwordBytes, kdf.salt, kdf.N, kdf.r, kdf.p, 64, options.progressCallback);\n return _encryptKeystore((0, index_js_4.getBytes)(key), kdf, account, options);\n }\n exports3.encryptKeystoreJson = encryptKeystoreJson;\n }\n });\n\n // ../../../node_modules/.pnpm/ethers@6.15.0_bufferutil@4.0.9_utf-8-validate@5.0.10/node_modules/ethers/lib.commonjs/wallet/hdwallet.js\n var require_hdwallet = __commonJS({\n \"../../../node_modules/.pnpm/ethers@6.15.0_bufferutil@4.0.9_utf-8-validate@5.0.10/node_modules/ethers/lib.commonjs/wallet/hdwallet.js\"(exports3) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n Object.defineProperty(exports3, \"__esModule\", { value: true });\n exports3.getIndexedAccountPath = exports3.getAccountPath = exports3.HDNodeVoidWallet = exports3.HDNodeWallet = exports3.defaultPath = void 0;\n var index_js_1 = require_crypto2();\n var index_js_2 = require_providers();\n var index_js_3 = require_transaction2();\n var index_js_4 = require_utils8();\n var lang_en_js_1 = require_lang_en2();\n var base_wallet_js_1 = require_base_wallet();\n var mnemonic_js_1 = require_mnemonic();\n var json_keystore_js_1 = require_json_keystore();\n exports3.defaultPath = \"m/44'/60'/0'/0/0\";\n var MasterSecret = new Uint8Array([66, 105, 116, 99, 111, 105, 110, 32, 115, 101, 101, 100]);\n var HardenedBit = 2147483648;\n var N4 = BigInt(\"0xfffffffffffffffffffffffffffffffebaaedce6af48a03bbfd25e8cd0364141\");\n var Nibbles = \"0123456789abcdef\";\n function zpad(value, length2) {\n let result = \"\";\n while (value) {\n result = Nibbles[value % 16] + result;\n value = Math.trunc(value / 16);\n }\n while (result.length < length2 * 2) {\n result = \"0\" + result;\n }\n return \"0x\" + result;\n }\n function encodeBase58Check(_value) {\n const value = (0, index_js_4.getBytes)(_value);\n const check = (0, index_js_4.dataSlice)((0, index_js_1.sha256)((0, index_js_1.sha256)(value)), 0, 4);\n const bytes = (0, index_js_4.concat)([value, check]);\n return (0, index_js_4.encodeBase58)(bytes);\n }\n var _guard = {};\n function ser_I(index2, chainCode, publicKey, privateKey) {\n const data = new Uint8Array(37);\n if (index2 & HardenedBit) {\n (0, index_js_4.assert)(privateKey != null, \"cannot derive child of neutered node\", \"UNSUPPORTED_OPERATION\", {\n operation: \"deriveChild\"\n });\n data.set((0, index_js_4.getBytes)(privateKey), 1);\n } else {\n data.set((0, index_js_4.getBytes)(publicKey));\n }\n for (let i3 = 24; i3 >= 0; i3 -= 8) {\n data[33 + (i3 >> 3)] = index2 >> 24 - i3 & 255;\n }\n const I2 = (0, index_js_4.getBytes)((0, index_js_1.computeHmac)(\"sha512\", chainCode, data));\n return { IL: I2.slice(0, 32), IR: I2.slice(32) };\n }\n function derivePath(node, path) {\n const components = path.split(\"/\");\n (0, index_js_4.assertArgument)(components.length > 0, \"invalid path\", \"path\", path);\n if (components[0] === \"m\") {\n (0, index_js_4.assertArgument)(node.depth === 0, `cannot derive root path (i.e. path starting with \"m/\") for a node at non-zero depth ${node.depth}`, \"path\", path);\n components.shift();\n }\n let result = node;\n for (let i3 = 0; i3 < components.length; i3++) {\n const component = components[i3];\n if (component.match(/^[0-9]+'$/)) {\n const index2 = parseInt(component.substring(0, component.length - 1));\n (0, index_js_4.assertArgument)(index2 < HardenedBit, \"invalid path index\", `path[${i3}]`, component);\n result = result.deriveChild(HardenedBit + index2);\n } else if (component.match(/^[0-9]+$/)) {\n const index2 = parseInt(component);\n (0, index_js_4.assertArgument)(index2 < HardenedBit, \"invalid path index\", `path[${i3}]`, component);\n result = result.deriveChild(index2);\n } else {\n (0, index_js_4.assertArgument)(false, \"invalid path component\", `path[${i3}]`, component);\n }\n }\n return result;\n }\n var HDNodeWallet = class _HDNodeWallet extends base_wallet_js_1.BaseWallet {\n /**\n * The compressed public key.\n */\n publicKey;\n /**\n * The fingerprint.\n *\n * A fingerprint allows quick qay to detect parent and child nodes,\n * but developers should be prepared to deal with collisions as it\n * is only 4 bytes.\n */\n fingerprint;\n /**\n * The parent fingerprint.\n */\n parentFingerprint;\n /**\n * The mnemonic used to create this HD Node, if available.\n *\n * Sources such as extended keys do not encode the mnemonic, in\n * which case this will be ``null``.\n */\n mnemonic;\n /**\n * The chaincode, which is effectively a public key used\n * to derive children.\n */\n chainCode;\n /**\n * The derivation path of this wallet.\n *\n * Since extended keys do not provide full path details, this\n * may be ``null``, if instantiated from a source that does not\n * encode it.\n */\n path;\n /**\n * The child index of this wallet. Values over ``2 *\\* 31`` indicate\n * the node is hardened.\n */\n index;\n /**\n * The depth of this wallet, which is the number of components\n * in its path.\n */\n depth;\n /**\n * @private\n */\n constructor(guard, signingKey, parentFingerprint, chainCode, path, index2, depth, mnemonic, provider) {\n super(signingKey, provider);\n (0, index_js_4.assertPrivate)(guard, _guard, \"HDNodeWallet\");\n (0, index_js_4.defineProperties)(this, { publicKey: signingKey.compressedPublicKey });\n const fingerprint = (0, index_js_4.dataSlice)((0, index_js_1.ripemd160)((0, index_js_1.sha256)(this.publicKey)), 0, 4);\n (0, index_js_4.defineProperties)(this, {\n parentFingerprint,\n fingerprint,\n chainCode,\n path,\n index: index2,\n depth\n });\n (0, index_js_4.defineProperties)(this, { mnemonic });\n }\n connect(provider) {\n return new _HDNodeWallet(_guard, this.signingKey, this.parentFingerprint, this.chainCode, this.path, this.index, this.depth, this.mnemonic, provider);\n }\n #account() {\n const account = { address: this.address, privateKey: this.privateKey };\n const m2 = this.mnemonic;\n if (this.path && m2 && m2.wordlist.locale === \"en\" && m2.password === \"\") {\n account.mnemonic = {\n path: this.path,\n locale: \"en\",\n entropy: m2.entropy\n };\n }\n return account;\n }\n /**\n * Resolves to a [JSON Keystore Wallet](json-wallets) encrypted with\n * %%password%%.\n *\n * If %%progressCallback%% is specified, it will receive periodic\n * updates as the encryption process progreses.\n */\n async encrypt(password, progressCallback) {\n return await (0, json_keystore_js_1.encryptKeystoreJson)(this.#account(), password, { progressCallback });\n }\n /**\n * Returns a [JSON Keystore Wallet](json-wallets) encryped with\n * %%password%%.\n *\n * It is preferred to use the [async version](encrypt) instead,\n * which allows a [[ProgressCallback]] to keep the user informed.\n *\n * This method will block the event loop (freezing all UI) until\n * it is complete, which may be a non-trivial duration.\n */\n encryptSync(password) {\n return (0, json_keystore_js_1.encryptKeystoreJsonSync)(this.#account(), password);\n }\n /**\n * The extended key.\n *\n * This key will begin with the prefix ``xpriv`` and can be used to\n * reconstruct this HD Node to derive its children.\n */\n get extendedKey() {\n (0, index_js_4.assert)(this.depth < 256, \"Depth too deep\", \"UNSUPPORTED_OPERATION\", { operation: \"extendedKey\" });\n return encodeBase58Check((0, index_js_4.concat)([\n \"0x0488ADE4\",\n zpad(this.depth, 1),\n this.parentFingerprint,\n zpad(this.index, 4),\n this.chainCode,\n (0, index_js_4.concat)([\"0x00\", this.privateKey])\n ]));\n }\n /**\n * Returns true if this wallet has a path, providing a Type Guard\n * that the path is non-null.\n */\n hasPath() {\n return this.path != null;\n }\n /**\n * Returns a neutered HD Node, which removes the private details\n * of an HD Node.\n *\n * A neutered node has no private key, but can be used to derive\n * child addresses and other public data about the HD Node.\n */\n neuter() {\n return new HDNodeVoidWallet(_guard, this.address, this.publicKey, this.parentFingerprint, this.chainCode, this.path, this.index, this.depth, this.provider);\n }\n /**\n * Return the child for %%index%%.\n */\n deriveChild(_index) {\n const index2 = (0, index_js_4.getNumber)(_index, \"index\");\n (0, index_js_4.assertArgument)(index2 <= 4294967295, \"invalid index\", \"index\", index2);\n let path = this.path;\n if (path) {\n path += \"/\" + (index2 & ~HardenedBit);\n if (index2 & HardenedBit) {\n path += \"'\";\n }\n }\n const { IR, IL } = ser_I(index2, this.chainCode, this.publicKey, this.privateKey);\n const ki = new index_js_1.SigningKey((0, index_js_4.toBeHex)(((0, index_js_4.toBigInt)(IL) + BigInt(this.privateKey)) % N4, 32));\n return new _HDNodeWallet(_guard, ki, this.fingerprint, (0, index_js_4.hexlify)(IR), path, index2, this.depth + 1, this.mnemonic, this.provider);\n }\n /**\n * Return the HDNode for %%path%% from this node.\n */\n derivePath(path) {\n return derivePath(this, path);\n }\n static #fromSeed(_seed, mnemonic) {\n (0, index_js_4.assertArgument)((0, index_js_4.isBytesLike)(_seed), \"invalid seed\", \"seed\", \"[REDACTED]\");\n const seed = (0, index_js_4.getBytes)(_seed, \"seed\");\n (0, index_js_4.assertArgument)(seed.length >= 16 && seed.length <= 64, \"invalid seed\", \"seed\", \"[REDACTED]\");\n const I2 = (0, index_js_4.getBytes)((0, index_js_1.computeHmac)(\"sha512\", MasterSecret, seed));\n const signingKey = new index_js_1.SigningKey((0, index_js_4.hexlify)(I2.slice(0, 32)));\n return new _HDNodeWallet(_guard, signingKey, \"0x00000000\", (0, index_js_4.hexlify)(I2.slice(32)), \"m\", 0, 0, mnemonic, null);\n }\n /**\n * Creates a new HD Node from %%extendedKey%%.\n *\n * If the %%extendedKey%% will either have a prefix or ``xpub`` or\n * ``xpriv``, returning a neutered HD Node ([[HDNodeVoidWallet]])\n * or full HD Node ([[HDNodeWallet) respectively.\n */\n static fromExtendedKey(extendedKey) {\n const bytes = (0, index_js_4.toBeArray)((0, index_js_4.decodeBase58)(extendedKey));\n (0, index_js_4.assertArgument)(bytes.length === 82 || encodeBase58Check(bytes.slice(0, 78)) === extendedKey, \"invalid extended key\", \"extendedKey\", \"[ REDACTED ]\");\n const depth = bytes[4];\n const parentFingerprint = (0, index_js_4.hexlify)(bytes.slice(5, 9));\n const index2 = parseInt((0, index_js_4.hexlify)(bytes.slice(9, 13)).substring(2), 16);\n const chainCode = (0, index_js_4.hexlify)(bytes.slice(13, 45));\n const key = bytes.slice(45, 78);\n switch ((0, index_js_4.hexlify)(bytes.slice(0, 4))) {\n case \"0x0488b21e\":\n case \"0x043587cf\": {\n const publicKey = (0, index_js_4.hexlify)(key);\n return new HDNodeVoidWallet(_guard, (0, index_js_3.computeAddress)(publicKey), publicKey, parentFingerprint, chainCode, null, index2, depth, null);\n }\n case \"0x0488ade4\":\n case \"0x04358394 \":\n if (key[0] !== 0) {\n break;\n }\n return new _HDNodeWallet(_guard, new index_js_1.SigningKey(key.slice(1)), parentFingerprint, chainCode, null, index2, depth, null, null);\n }\n (0, index_js_4.assertArgument)(false, \"invalid extended key prefix\", \"extendedKey\", \"[ REDACTED ]\");\n }\n /**\n * Creates a new random HDNode.\n */\n static createRandom(password, path, wordlist) {\n if (password == null) {\n password = \"\";\n }\n if (path == null) {\n path = exports3.defaultPath;\n }\n if (wordlist == null) {\n wordlist = lang_en_js_1.LangEn.wordlist();\n }\n const mnemonic = mnemonic_js_1.Mnemonic.fromEntropy((0, index_js_1.randomBytes)(16), password, wordlist);\n return _HDNodeWallet.#fromSeed(mnemonic.computeSeed(), mnemonic).derivePath(path);\n }\n /**\n * Create an HD Node from %%mnemonic%%.\n */\n static fromMnemonic(mnemonic, path) {\n if (!path) {\n path = exports3.defaultPath;\n }\n return _HDNodeWallet.#fromSeed(mnemonic.computeSeed(), mnemonic).derivePath(path);\n }\n /**\n * Creates an HD Node from a mnemonic %%phrase%%.\n */\n static fromPhrase(phrase, password, path, wordlist) {\n if (password == null) {\n password = \"\";\n }\n if (path == null) {\n path = exports3.defaultPath;\n }\n if (wordlist == null) {\n wordlist = lang_en_js_1.LangEn.wordlist();\n }\n const mnemonic = mnemonic_js_1.Mnemonic.fromPhrase(phrase, password, wordlist);\n return _HDNodeWallet.#fromSeed(mnemonic.computeSeed(), mnemonic).derivePath(path);\n }\n /**\n * Creates an HD Node from a %%seed%%.\n */\n static fromSeed(seed) {\n return _HDNodeWallet.#fromSeed(seed, null);\n }\n };\n exports3.HDNodeWallet = HDNodeWallet;\n var HDNodeVoidWallet = class _HDNodeVoidWallet extends index_js_2.VoidSigner {\n /**\n * The compressed public key.\n */\n publicKey;\n /**\n * The fingerprint.\n *\n * A fingerprint allows quick qay to detect parent and child nodes,\n * but developers should be prepared to deal with collisions as it\n * is only 4 bytes.\n */\n fingerprint;\n /**\n * The parent node fingerprint.\n */\n parentFingerprint;\n /**\n * The chaincode, which is effectively a public key used\n * to derive children.\n */\n chainCode;\n /**\n * The derivation path of this wallet.\n *\n * Since extended keys do not provider full path details, this\n * may be ``null``, if instantiated from a source that does not\n * enocde it.\n */\n path;\n /**\n * The child index of this wallet. Values over ``2 *\\* 31`` indicate\n * the node is hardened.\n */\n index;\n /**\n * The depth of this wallet, which is the number of components\n * in its path.\n */\n depth;\n /**\n * @private\n */\n constructor(guard, address, publicKey, parentFingerprint, chainCode, path, index2, depth, provider) {\n super(address, provider);\n (0, index_js_4.assertPrivate)(guard, _guard, \"HDNodeVoidWallet\");\n (0, index_js_4.defineProperties)(this, { publicKey });\n const fingerprint = (0, index_js_4.dataSlice)((0, index_js_1.ripemd160)((0, index_js_1.sha256)(publicKey)), 0, 4);\n (0, index_js_4.defineProperties)(this, {\n publicKey,\n fingerprint,\n parentFingerprint,\n chainCode,\n path,\n index: index2,\n depth\n });\n }\n connect(provider) {\n return new _HDNodeVoidWallet(_guard, this.address, this.publicKey, this.parentFingerprint, this.chainCode, this.path, this.index, this.depth, provider);\n }\n /**\n * The extended key.\n *\n * This key will begin with the prefix ``xpub`` and can be used to\n * reconstruct this neutered key to derive its children addresses.\n */\n get extendedKey() {\n (0, index_js_4.assert)(this.depth < 256, \"Depth too deep\", \"UNSUPPORTED_OPERATION\", { operation: \"extendedKey\" });\n return encodeBase58Check((0, index_js_4.concat)([\n \"0x0488B21E\",\n zpad(this.depth, 1),\n this.parentFingerprint,\n zpad(this.index, 4),\n this.chainCode,\n this.publicKey\n ]));\n }\n /**\n * Returns true if this wallet has a path, providing a Type Guard\n * that the path is non-null.\n */\n hasPath() {\n return this.path != null;\n }\n /**\n * Return the child for %%index%%.\n */\n deriveChild(_index) {\n const index2 = (0, index_js_4.getNumber)(_index, \"index\");\n (0, index_js_4.assertArgument)(index2 <= 4294967295, \"invalid index\", \"index\", index2);\n let path = this.path;\n if (path) {\n path += \"/\" + (index2 & ~HardenedBit);\n if (index2 & HardenedBit) {\n path += \"'\";\n }\n }\n const { IR, IL } = ser_I(index2, this.chainCode, this.publicKey, null);\n const Ki = index_js_1.SigningKey.addPoints(IL, this.publicKey, true);\n const address = (0, index_js_3.computeAddress)(Ki);\n return new _HDNodeVoidWallet(_guard, address, Ki, this.fingerprint, (0, index_js_4.hexlify)(IR), path, index2, this.depth + 1, this.provider);\n }\n /**\n * Return the signer for %%path%% from this node.\n */\n derivePath(path) {\n return derivePath(this, path);\n }\n };\n exports3.HDNodeVoidWallet = HDNodeVoidWallet;\n function getAccountPath(_index) {\n const index2 = (0, index_js_4.getNumber)(_index, \"index\");\n (0, index_js_4.assertArgument)(index2 >= 0 && index2 < HardenedBit, \"invalid account index\", \"index\", index2);\n return `m/44'/60'/${index2}'/0/0`;\n }\n exports3.getAccountPath = getAccountPath;\n function getIndexedAccountPath(_index) {\n const index2 = (0, index_js_4.getNumber)(_index, \"index\");\n (0, index_js_4.assertArgument)(index2 >= 0 && index2 < HardenedBit, \"invalid account index\", \"index\", index2);\n return `m/44'/60'/0'/0/${index2}`;\n }\n exports3.getIndexedAccountPath = getIndexedAccountPath;\n }\n });\n\n // ../../../node_modules/.pnpm/ethers@6.15.0_bufferutil@4.0.9_utf-8-validate@5.0.10/node_modules/ethers/lib.commonjs/wallet/json-crowdsale.js\n var require_json_crowdsale = __commonJS({\n \"../../../node_modules/.pnpm/ethers@6.15.0_bufferutil@4.0.9_utf-8-validate@5.0.10/node_modules/ethers/lib.commonjs/wallet/json-crowdsale.js\"(exports3) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n Object.defineProperty(exports3, \"__esModule\", { value: true });\n exports3.decryptCrowdsaleJson = exports3.isCrowdsaleJson = void 0;\n var aes_js_1 = require_lib33();\n var index_js_1 = require_address3();\n var index_js_2 = require_crypto2();\n var index_js_3 = require_hash2();\n var index_js_4 = require_utils8();\n var utils_js_1 = require_utils11();\n function isCrowdsaleJson(json) {\n try {\n const data = JSON.parse(json);\n if (data.encseed) {\n return true;\n }\n } catch (error) {\n }\n return false;\n }\n exports3.isCrowdsaleJson = isCrowdsaleJson;\n function decryptCrowdsaleJson(json, _password) {\n const data = JSON.parse(json);\n const password = (0, utils_js_1.getPassword)(_password);\n const address = (0, index_js_1.getAddress)((0, utils_js_1.spelunk)(data, \"ethaddr:string!\"));\n const encseed = (0, utils_js_1.looseArrayify)((0, utils_js_1.spelunk)(data, \"encseed:string!\"));\n (0, index_js_4.assertArgument)(encseed && encseed.length % 16 === 0, \"invalid encseed\", \"json\", json);\n const key = (0, index_js_4.getBytes)((0, index_js_2.pbkdf2)(password, password, 2e3, 32, \"sha256\")).slice(0, 16);\n const iv = encseed.slice(0, 16);\n const encryptedSeed = encseed.slice(16);\n const aesCbc = new aes_js_1.CBC(key, iv);\n const seed = (0, aes_js_1.pkcs7Strip)((0, index_js_4.getBytes)(aesCbc.decrypt(encryptedSeed)));\n let seedHex = \"\";\n for (let i3 = 0; i3 < seed.length; i3++) {\n seedHex += String.fromCharCode(seed[i3]);\n }\n return { address, privateKey: (0, index_js_3.id)(seedHex) };\n }\n exports3.decryptCrowdsaleJson = decryptCrowdsaleJson;\n }\n });\n\n // ../../../node_modules/.pnpm/ethers@6.15.0_bufferutil@4.0.9_utf-8-validate@5.0.10/node_modules/ethers/lib.commonjs/wallet/wallet.js\n var require_wallet = __commonJS({\n \"../../../node_modules/.pnpm/ethers@6.15.0_bufferutil@4.0.9_utf-8-validate@5.0.10/node_modules/ethers/lib.commonjs/wallet/wallet.js\"(exports3) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n Object.defineProperty(exports3, \"__esModule\", { value: true });\n exports3.Wallet = void 0;\n var index_js_1 = require_crypto2();\n var index_js_2 = require_utils8();\n var base_wallet_js_1 = require_base_wallet();\n var hdwallet_js_1 = require_hdwallet();\n var json_crowdsale_js_1 = require_json_crowdsale();\n var json_keystore_js_1 = require_json_keystore();\n var mnemonic_js_1 = require_mnemonic();\n function stall(duration) {\n return new Promise((resolve) => {\n setTimeout(() => {\n resolve();\n }, duration);\n });\n }\n var Wallet = class _Wallet extends base_wallet_js_1.BaseWallet {\n /**\n * Create a new wallet for the private %%key%%, optionally connected\n * to %%provider%%.\n */\n constructor(key, provider) {\n if (typeof key === \"string\" && !key.startsWith(\"0x\")) {\n key = \"0x\" + key;\n }\n let signingKey = typeof key === \"string\" ? new index_js_1.SigningKey(key) : key;\n super(signingKey, provider);\n }\n connect(provider) {\n return new _Wallet(this.signingKey, provider);\n }\n /**\n * Resolves to a [JSON Keystore Wallet](json-wallets) encrypted with\n * %%password%%.\n *\n * If %%progressCallback%% is specified, it will receive periodic\n * updates as the encryption process progreses.\n */\n async encrypt(password, progressCallback) {\n const account = { address: this.address, privateKey: this.privateKey };\n return await (0, json_keystore_js_1.encryptKeystoreJson)(account, password, { progressCallback });\n }\n /**\n * Returns a [JSON Keystore Wallet](json-wallets) encryped with\n * %%password%%.\n *\n * It is preferred to use the [async version](encrypt) instead,\n * which allows a [[ProgressCallback]] to keep the user informed.\n *\n * This method will block the event loop (freezing all UI) until\n * it is complete, which may be a non-trivial duration.\n */\n encryptSync(password) {\n const account = { address: this.address, privateKey: this.privateKey };\n return (0, json_keystore_js_1.encryptKeystoreJsonSync)(account, password);\n }\n static #fromAccount(account) {\n (0, index_js_2.assertArgument)(account, \"invalid JSON wallet\", \"json\", \"[ REDACTED ]\");\n if (\"mnemonic\" in account && account.mnemonic && account.mnemonic.locale === \"en\") {\n const mnemonic = mnemonic_js_1.Mnemonic.fromEntropy(account.mnemonic.entropy);\n const wallet2 = hdwallet_js_1.HDNodeWallet.fromMnemonic(mnemonic, account.mnemonic.path);\n if (wallet2.address === account.address && wallet2.privateKey === account.privateKey) {\n return wallet2;\n }\n console.log(\"WARNING: JSON mismatch address/privateKey != mnemonic; fallback onto private key\");\n }\n const wallet = new _Wallet(account.privateKey);\n (0, index_js_2.assertArgument)(wallet.address === account.address, \"address/privateKey mismatch\", \"json\", \"[ REDACTED ]\");\n return wallet;\n }\n /**\n * Creates (asynchronously) a **Wallet** by decrypting the %%json%%\n * with %%password%%.\n *\n * If %%progress%% is provided, it is called periodically during\n * decryption so that any UI can be updated.\n */\n static async fromEncryptedJson(json, password, progress) {\n let account = null;\n if ((0, json_keystore_js_1.isKeystoreJson)(json)) {\n account = await (0, json_keystore_js_1.decryptKeystoreJson)(json, password, progress);\n } else if ((0, json_crowdsale_js_1.isCrowdsaleJson)(json)) {\n if (progress) {\n progress(0);\n await stall(0);\n }\n account = (0, json_crowdsale_js_1.decryptCrowdsaleJson)(json, password);\n if (progress) {\n progress(1);\n await stall(0);\n }\n }\n return _Wallet.#fromAccount(account);\n }\n /**\n * Creates a **Wallet** by decrypting the %%json%% with %%password%%.\n *\n * The [[fromEncryptedJson]] method is preferred, as this method\n * will lock up and freeze the UI during decryption, which may take\n * some time.\n */\n static fromEncryptedJsonSync(json, password) {\n let account = null;\n if ((0, json_keystore_js_1.isKeystoreJson)(json)) {\n account = (0, json_keystore_js_1.decryptKeystoreJsonSync)(json, password);\n } else if ((0, json_crowdsale_js_1.isCrowdsaleJson)(json)) {\n account = (0, json_crowdsale_js_1.decryptCrowdsaleJson)(json, password);\n } else {\n (0, index_js_2.assertArgument)(false, \"invalid JSON wallet\", \"json\", \"[ REDACTED ]\");\n }\n return _Wallet.#fromAccount(account);\n }\n /**\n * Creates a new random [[HDNodeWallet]] using the available\n * [cryptographic random source](randomBytes).\n *\n * If there is no crytographic random source, this will throw.\n */\n static createRandom(provider) {\n const wallet = hdwallet_js_1.HDNodeWallet.createRandom();\n if (provider) {\n return wallet.connect(provider);\n }\n return wallet;\n }\n /**\n * Creates a [[HDNodeWallet]] for %%phrase%%.\n */\n static fromPhrase(phrase, provider) {\n const wallet = hdwallet_js_1.HDNodeWallet.fromPhrase(phrase);\n if (provider) {\n return wallet.connect(provider);\n }\n return wallet;\n }\n };\n exports3.Wallet = Wallet;\n }\n });\n\n // ../../../node_modules/.pnpm/ethers@6.15.0_bufferutil@4.0.9_utf-8-validate@5.0.10/node_modules/ethers/lib.commonjs/wallet/index.js\n var require_wallet2 = __commonJS({\n \"../../../node_modules/.pnpm/ethers@6.15.0_bufferutil@4.0.9_utf-8-validate@5.0.10/node_modules/ethers/lib.commonjs/wallet/index.js\"(exports3) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n Object.defineProperty(exports3, \"__esModule\", { value: true });\n exports3.Wallet = exports3.Mnemonic = exports3.encryptKeystoreJsonSync = exports3.encryptKeystoreJson = exports3.decryptKeystoreJson = exports3.decryptKeystoreJsonSync = exports3.isKeystoreJson = exports3.decryptCrowdsaleJson = exports3.isCrowdsaleJson = exports3.HDNodeVoidWallet = exports3.HDNodeWallet = exports3.getIndexedAccountPath = exports3.getAccountPath = exports3.defaultPath = exports3.BaseWallet = void 0;\n var base_wallet_js_1 = require_base_wallet();\n Object.defineProperty(exports3, \"BaseWallet\", { enumerable: true, get: function() {\n return base_wallet_js_1.BaseWallet;\n } });\n var hdwallet_js_1 = require_hdwallet();\n Object.defineProperty(exports3, \"defaultPath\", { enumerable: true, get: function() {\n return hdwallet_js_1.defaultPath;\n } });\n Object.defineProperty(exports3, \"getAccountPath\", { enumerable: true, get: function() {\n return hdwallet_js_1.getAccountPath;\n } });\n Object.defineProperty(exports3, \"getIndexedAccountPath\", { enumerable: true, get: function() {\n return hdwallet_js_1.getIndexedAccountPath;\n } });\n Object.defineProperty(exports3, \"HDNodeWallet\", { enumerable: true, get: function() {\n return hdwallet_js_1.HDNodeWallet;\n } });\n Object.defineProperty(exports3, \"HDNodeVoidWallet\", { enumerable: true, get: function() {\n return hdwallet_js_1.HDNodeVoidWallet;\n } });\n var json_crowdsale_js_1 = require_json_crowdsale();\n Object.defineProperty(exports3, \"isCrowdsaleJson\", { enumerable: true, get: function() {\n return json_crowdsale_js_1.isCrowdsaleJson;\n } });\n Object.defineProperty(exports3, \"decryptCrowdsaleJson\", { enumerable: true, get: function() {\n return json_crowdsale_js_1.decryptCrowdsaleJson;\n } });\n var json_keystore_js_1 = require_json_keystore();\n Object.defineProperty(exports3, \"isKeystoreJson\", { enumerable: true, get: function() {\n return json_keystore_js_1.isKeystoreJson;\n } });\n Object.defineProperty(exports3, \"decryptKeystoreJsonSync\", { enumerable: true, get: function() {\n return json_keystore_js_1.decryptKeystoreJsonSync;\n } });\n Object.defineProperty(exports3, \"decryptKeystoreJson\", { enumerable: true, get: function() {\n return json_keystore_js_1.decryptKeystoreJson;\n } });\n Object.defineProperty(exports3, \"encryptKeystoreJson\", { enumerable: true, get: function() {\n return json_keystore_js_1.encryptKeystoreJson;\n } });\n Object.defineProperty(exports3, \"encryptKeystoreJsonSync\", { enumerable: true, get: function() {\n return json_keystore_js_1.encryptKeystoreJsonSync;\n } });\n var mnemonic_js_1 = require_mnemonic();\n Object.defineProperty(exports3, \"Mnemonic\", { enumerable: true, get: function() {\n return mnemonic_js_1.Mnemonic;\n } });\n var wallet_js_1 = require_wallet();\n Object.defineProperty(exports3, \"Wallet\", { enumerable: true, get: function() {\n return wallet_js_1.Wallet;\n } });\n }\n });\n\n // ../../../node_modules/.pnpm/ethers@6.15.0_bufferutil@4.0.9_utf-8-validate@5.0.10/node_modules/ethers/lib.commonjs/wordlists/bit-reader.js\n var require_bit_reader = __commonJS({\n \"../../../node_modules/.pnpm/ethers@6.15.0_bufferutil@4.0.9_utf-8-validate@5.0.10/node_modules/ethers/lib.commonjs/wordlists/bit-reader.js\"(exports3) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n Object.defineProperty(exports3, \"__esModule\", { value: true });\n exports3.decodeBits = void 0;\n var Base64 = \")!@#$%^&*(ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz-_\";\n function decodeBits(width, data) {\n const maxValue = (1 << width) - 1;\n const result = [];\n let accum = 0, bits = 0, flood = 0;\n for (let i3 = 0; i3 < data.length; i3++) {\n accum = accum << 6 | Base64.indexOf(data[i3]);\n bits += 6;\n while (bits >= width) {\n const value = accum >> bits - width;\n accum &= (1 << bits - width) - 1;\n bits -= width;\n if (value === 0) {\n flood += maxValue;\n } else {\n result.push(value + flood);\n flood = 0;\n }\n }\n }\n return result;\n }\n exports3.decodeBits = decodeBits;\n }\n });\n\n // ../../../node_modules/.pnpm/ethers@6.15.0_bufferutil@4.0.9_utf-8-validate@5.0.10/node_modules/ethers/lib.commonjs/wordlists/decode-owla.js\n var require_decode_owla = __commonJS({\n \"../../../node_modules/.pnpm/ethers@6.15.0_bufferutil@4.0.9_utf-8-validate@5.0.10/node_modules/ethers/lib.commonjs/wordlists/decode-owla.js\"(exports3) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n Object.defineProperty(exports3, \"__esModule\", { value: true });\n exports3.decodeOwlA = void 0;\n var index_js_1 = require_utils8();\n var bit_reader_js_1 = require_bit_reader();\n var decode_owl_js_1 = require_decode_owl();\n function decodeOwlA(data, accents) {\n let words = (0, decode_owl_js_1.decodeOwl)(data).join(\",\");\n accents.split(/,/g).forEach((accent) => {\n const match = accent.match(/^([a-z]*)([0-9]+)([0-9])(.*)$/);\n (0, index_js_1.assertArgument)(match !== null, \"internal error parsing accents\", \"accents\", accents);\n let posOffset = 0;\n const positions = (0, bit_reader_js_1.decodeBits)(parseInt(match[3]), match[4]);\n const charCode = parseInt(match[2]);\n const regex2 = new RegExp(`([${match[1]}])`, \"g\");\n words = words.replace(regex2, (all, letter) => {\n const rem = --positions[posOffset];\n if (rem === 0) {\n letter = String.fromCharCode(letter.charCodeAt(0), charCode);\n posOffset++;\n }\n return letter;\n });\n });\n return words.split(\",\");\n }\n exports3.decodeOwlA = decodeOwlA;\n }\n });\n\n // ../../../node_modules/.pnpm/ethers@6.15.0_bufferutil@4.0.9_utf-8-validate@5.0.10/node_modules/ethers/lib.commonjs/wordlists/wordlist-owla.js\n var require_wordlist_owla = __commonJS({\n \"../../../node_modules/.pnpm/ethers@6.15.0_bufferutil@4.0.9_utf-8-validate@5.0.10/node_modules/ethers/lib.commonjs/wordlists/wordlist-owla.js\"(exports3) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n Object.defineProperty(exports3, \"__esModule\", { value: true });\n exports3.WordlistOwlA = void 0;\n var wordlist_owl_js_1 = require_wordlist_owl();\n var decode_owla_js_1 = require_decode_owla();\n var WordlistOwlA = class extends wordlist_owl_js_1.WordlistOwl {\n #accent;\n /**\n * Creates a new Wordlist for %%locale%% using the OWLA %%data%%\n * and %%accent%% data and validated against the %%checksum%%.\n */\n constructor(locale, data, accent, checksum4) {\n super(locale, data, checksum4);\n this.#accent = accent;\n }\n /**\n * The OWLA-encoded accent data.\n */\n get _accent() {\n return this.#accent;\n }\n /**\n * Decode all the words for the wordlist.\n */\n _decodeWords() {\n return (0, decode_owla_js_1.decodeOwlA)(this._data, this._accent);\n }\n };\n exports3.WordlistOwlA = WordlistOwlA;\n }\n });\n\n // ../../../node_modules/.pnpm/ethers@6.15.0_bufferutil@4.0.9_utf-8-validate@5.0.10/node_modules/ethers/lib.commonjs/wordlists/wordlists-browser.js\n var require_wordlists_browser = __commonJS({\n \"../../../node_modules/.pnpm/ethers@6.15.0_bufferutil@4.0.9_utf-8-validate@5.0.10/node_modules/ethers/lib.commonjs/wordlists/wordlists-browser.js\"(exports3) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n Object.defineProperty(exports3, \"__esModule\", { value: true });\n exports3.wordlists = void 0;\n var lang_en_js_1 = require_lang_en2();\n exports3.wordlists = {\n en: lang_en_js_1.LangEn.wordlist()\n };\n }\n });\n\n // ../../../node_modules/.pnpm/ethers@6.15.0_bufferutil@4.0.9_utf-8-validate@5.0.10/node_modules/ethers/lib.commonjs/wordlists/index.js\n var require_wordlists2 = __commonJS({\n \"../../../node_modules/.pnpm/ethers@6.15.0_bufferutil@4.0.9_utf-8-validate@5.0.10/node_modules/ethers/lib.commonjs/wordlists/index.js\"(exports3) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n Object.defineProperty(exports3, \"__esModule\", { value: true });\n exports3.wordlists = exports3.WordlistOwlA = exports3.WordlistOwl = exports3.LangEn = exports3.Wordlist = void 0;\n var wordlist_js_1 = require_wordlist2();\n Object.defineProperty(exports3, \"Wordlist\", { enumerable: true, get: function() {\n return wordlist_js_1.Wordlist;\n } });\n var lang_en_js_1 = require_lang_en2();\n Object.defineProperty(exports3, \"LangEn\", { enumerable: true, get: function() {\n return lang_en_js_1.LangEn;\n } });\n var wordlist_owl_js_1 = require_wordlist_owl();\n Object.defineProperty(exports3, \"WordlistOwl\", { enumerable: true, get: function() {\n return wordlist_owl_js_1.WordlistOwl;\n } });\n var wordlist_owla_js_1 = require_wordlist_owla();\n Object.defineProperty(exports3, \"WordlistOwlA\", { enumerable: true, get: function() {\n return wordlist_owla_js_1.WordlistOwlA;\n } });\n var wordlists_js_1 = require_wordlists_browser();\n Object.defineProperty(exports3, \"wordlists\", { enumerable: true, get: function() {\n return wordlists_js_1.wordlists;\n } });\n }\n });\n\n // ../../../node_modules/.pnpm/ethers@6.15.0_bufferutil@4.0.9_utf-8-validate@5.0.10/node_modules/ethers/lib.commonjs/ethers.js\n var require_ethers2 = __commonJS({\n \"../../../node_modules/.pnpm/ethers@6.15.0_bufferutil@4.0.9_utf-8-validate@5.0.10/node_modules/ethers/lib.commonjs/ethers.js\"(exports3) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n Object.defineProperty(exports3, \"__esModule\", { value: true });\n exports3.ripemd160 = exports3.keccak256 = exports3.randomBytes = exports3.computeHmac = exports3.UndecodedEventLog = exports3.EventLog = exports3.ContractUnknownEventPayload = exports3.ContractTransactionResponse = exports3.ContractTransactionReceipt = exports3.ContractEventPayload = exports3.ContractFactory = exports3.Contract = exports3.BaseContract = exports3.MessagePrefix = exports3.EtherSymbol = exports3.ZeroHash = exports3.N = exports3.MaxInt256 = exports3.MinInt256 = exports3.MaxUint256 = exports3.WeiPerEther = exports3.ZeroAddress = exports3.resolveAddress = exports3.isAddress = exports3.isAddressable = exports3.getCreate2Address = exports3.getCreateAddress = exports3.getIcapAddress = exports3.getAddress = exports3.Typed = exports3.TransactionDescription = exports3.Result = exports3.LogDescription = exports3.Interface = exports3.Indexed = exports3.ErrorDescription = exports3.checkResultErrors = exports3.StructFragment = exports3.ParamType = exports3.NamedFragment = exports3.FunctionFragment = exports3.FallbackFragment = exports3.Fragment = exports3.EventFragment = exports3.ErrorFragment = exports3.ConstructorFragment = exports3.AbiCoder = exports3.encodeBytes32String = exports3.decodeBytes32String = exports3.version = void 0;\n exports3.WebSocketProvider = exports3.SocketProvider = exports3.IpcSocketProvider = exports3.QuickNodeProvider = exports3.PocketProvider = exports3.InfuraWebSocketProvider = exports3.InfuraProvider = exports3.EtherscanProvider = exports3.CloudflareProvider = exports3.ChainstackProvider = exports3.BlockscoutProvider = exports3.AnkrProvider = exports3.AlchemyProvider = exports3.BrowserProvider = exports3.JsonRpcSigner = exports3.JsonRpcProvider = exports3.JsonRpcApiProvider = exports3.FallbackProvider = exports3.AbstractProvider = exports3.VoidSigner = exports3.NonceManager = exports3.AbstractSigner = exports3.TransactionResponse = exports3.TransactionReceipt = exports3.Log = exports3.FeeData = exports3.Block = exports3.getDefaultProvider = exports3.verifyTypedData = exports3.TypedDataEncoder = exports3.solidityPackedSha256 = exports3.solidityPackedKeccak256 = exports3.solidityPacked = exports3.verifyMessage = exports3.hashMessage = exports3.verifyAuthorization = exports3.hashAuthorization = exports3.dnsEncode = exports3.namehash = exports3.isValidName = exports3.ensNormalize = exports3.id = exports3.SigningKey = exports3.Signature = exports3.lock = exports3.scryptSync = exports3.scrypt = exports3.pbkdf2 = exports3.sha512 = exports3.sha256 = void 0;\n exports3.FetchCancelSignal = exports3.FetchResponse = exports3.FetchRequest = exports3.EventPayload = exports3.isError = exports3.isCallException = exports3.makeError = exports3.assertPrivate = exports3.assertNormalize = exports3.assertArgumentCount = exports3.assertArgument = exports3.assert = exports3.resolveProperties = exports3.defineProperties = exports3.zeroPadValue = exports3.zeroPadBytes = exports3.stripZerosLeft = exports3.isBytesLike = exports3.isHexString = exports3.hexlify = exports3.getBytesCopy = exports3.getBytes = exports3.dataSlice = exports3.dataLength = exports3.concat = exports3.encodeBase64 = exports3.decodeBase64 = exports3.encodeBase58 = exports3.decodeBase58 = exports3.Transaction = exports3.recoverAddress = exports3.computeAddress = exports3.authorizationify = exports3.accessListify = exports3.showThrottleMessage = exports3.copyRequest = exports3.UnmanagedSubscriber = exports3.SocketSubscriber = exports3.SocketPendingSubscriber = exports3.SocketEventSubscriber = exports3.SocketBlockSubscriber = exports3.MulticoinProviderPlugin = exports3.NetworkPlugin = exports3.GasCostPlugin = exports3.FetchUrlFeeDataNetworkPlugin = exports3.FeeDataNetworkPlugin = exports3.EtherscanPlugin = exports3.EnsPlugin = exports3.Network = exports3.EnsResolver = void 0;\n exports3.wordlists = exports3.WordlistOwlA = exports3.WordlistOwl = exports3.LangEn = exports3.Wordlist = exports3.encryptKeystoreJsonSync = exports3.encryptKeystoreJson = exports3.decryptKeystoreJson = exports3.decryptKeystoreJsonSync = exports3.decryptCrowdsaleJson = exports3.isKeystoreJson = exports3.isCrowdsaleJson = exports3.getIndexedAccountPath = exports3.getAccountPath = exports3.defaultPath = exports3.Wallet = exports3.HDNodeVoidWallet = exports3.HDNodeWallet = exports3.BaseWallet = exports3.Mnemonic = exports3.uuidV4 = exports3.encodeRlp = exports3.decodeRlp = exports3.Utf8ErrorFuncs = exports3.toUtf8String = exports3.toUtf8CodePoints = exports3.toUtf8Bytes = exports3.parseUnits = exports3.formatUnits = exports3.parseEther = exports3.formatEther = exports3.mask = exports3.toTwos = exports3.fromTwos = exports3.toQuantity = exports3.toNumber = exports3.toBeHex = exports3.toBigInt = exports3.toBeArray = exports3.getUint = exports3.getNumber = exports3.getBigInt = exports3.FixedNumber = void 0;\n var _version_js_1 = require_version27();\n Object.defineProperty(exports3, \"version\", { enumerable: true, get: function() {\n return _version_js_1.version;\n } });\n var index_js_1 = require_abi();\n Object.defineProperty(exports3, \"decodeBytes32String\", { enumerable: true, get: function() {\n return index_js_1.decodeBytes32String;\n } });\n Object.defineProperty(exports3, \"encodeBytes32String\", { enumerable: true, get: function() {\n return index_js_1.encodeBytes32String;\n } });\n Object.defineProperty(exports3, \"AbiCoder\", { enumerable: true, get: function() {\n return index_js_1.AbiCoder;\n } });\n Object.defineProperty(exports3, \"ConstructorFragment\", { enumerable: true, get: function() {\n return index_js_1.ConstructorFragment;\n } });\n Object.defineProperty(exports3, \"ErrorFragment\", { enumerable: true, get: function() {\n return index_js_1.ErrorFragment;\n } });\n Object.defineProperty(exports3, \"EventFragment\", { enumerable: true, get: function() {\n return index_js_1.EventFragment;\n } });\n Object.defineProperty(exports3, \"Fragment\", { enumerable: true, get: function() {\n return index_js_1.Fragment;\n } });\n Object.defineProperty(exports3, \"FallbackFragment\", { enumerable: true, get: function() {\n return index_js_1.FallbackFragment;\n } });\n Object.defineProperty(exports3, \"FunctionFragment\", { enumerable: true, get: function() {\n return index_js_1.FunctionFragment;\n } });\n Object.defineProperty(exports3, \"NamedFragment\", { enumerable: true, get: function() {\n return index_js_1.NamedFragment;\n } });\n Object.defineProperty(exports3, \"ParamType\", { enumerable: true, get: function() {\n return index_js_1.ParamType;\n } });\n Object.defineProperty(exports3, \"StructFragment\", { enumerable: true, get: function() {\n return index_js_1.StructFragment;\n } });\n Object.defineProperty(exports3, \"checkResultErrors\", { enumerable: true, get: function() {\n return index_js_1.checkResultErrors;\n } });\n Object.defineProperty(exports3, \"ErrorDescription\", { enumerable: true, get: function() {\n return index_js_1.ErrorDescription;\n } });\n Object.defineProperty(exports3, \"Indexed\", { enumerable: true, get: function() {\n return index_js_1.Indexed;\n } });\n Object.defineProperty(exports3, \"Interface\", { enumerable: true, get: function() {\n return index_js_1.Interface;\n } });\n Object.defineProperty(exports3, \"LogDescription\", { enumerable: true, get: function() {\n return index_js_1.LogDescription;\n } });\n Object.defineProperty(exports3, \"Result\", { enumerable: true, get: function() {\n return index_js_1.Result;\n } });\n Object.defineProperty(exports3, \"TransactionDescription\", { enumerable: true, get: function() {\n return index_js_1.TransactionDescription;\n } });\n Object.defineProperty(exports3, \"Typed\", { enumerable: true, get: function() {\n return index_js_1.Typed;\n } });\n var index_js_2 = require_address3();\n Object.defineProperty(exports3, \"getAddress\", { enumerable: true, get: function() {\n return index_js_2.getAddress;\n } });\n Object.defineProperty(exports3, \"getIcapAddress\", { enumerable: true, get: function() {\n return index_js_2.getIcapAddress;\n } });\n Object.defineProperty(exports3, \"getCreateAddress\", { enumerable: true, get: function() {\n return index_js_2.getCreateAddress;\n } });\n Object.defineProperty(exports3, \"getCreate2Address\", { enumerable: true, get: function() {\n return index_js_2.getCreate2Address;\n } });\n Object.defineProperty(exports3, \"isAddressable\", { enumerable: true, get: function() {\n return index_js_2.isAddressable;\n } });\n Object.defineProperty(exports3, \"isAddress\", { enumerable: true, get: function() {\n return index_js_2.isAddress;\n } });\n Object.defineProperty(exports3, \"resolveAddress\", { enumerable: true, get: function() {\n return index_js_2.resolveAddress;\n } });\n var index_js_3 = require_constants5();\n Object.defineProperty(exports3, \"ZeroAddress\", { enumerable: true, get: function() {\n return index_js_3.ZeroAddress;\n } });\n Object.defineProperty(exports3, \"WeiPerEther\", { enumerable: true, get: function() {\n return index_js_3.WeiPerEther;\n } });\n Object.defineProperty(exports3, \"MaxUint256\", { enumerable: true, get: function() {\n return index_js_3.MaxUint256;\n } });\n Object.defineProperty(exports3, \"MinInt256\", { enumerable: true, get: function() {\n return index_js_3.MinInt256;\n } });\n Object.defineProperty(exports3, \"MaxInt256\", { enumerable: true, get: function() {\n return index_js_3.MaxInt256;\n } });\n Object.defineProperty(exports3, \"N\", { enumerable: true, get: function() {\n return index_js_3.N;\n } });\n Object.defineProperty(exports3, \"ZeroHash\", { enumerable: true, get: function() {\n return index_js_3.ZeroHash;\n } });\n Object.defineProperty(exports3, \"EtherSymbol\", { enumerable: true, get: function() {\n return index_js_3.EtherSymbol;\n } });\n Object.defineProperty(exports3, \"MessagePrefix\", { enumerable: true, get: function() {\n return index_js_3.MessagePrefix;\n } });\n var index_js_4 = require_contract2();\n Object.defineProperty(exports3, \"BaseContract\", { enumerable: true, get: function() {\n return index_js_4.BaseContract;\n } });\n Object.defineProperty(exports3, \"Contract\", { enumerable: true, get: function() {\n return index_js_4.Contract;\n } });\n Object.defineProperty(exports3, \"ContractFactory\", { enumerable: true, get: function() {\n return index_js_4.ContractFactory;\n } });\n Object.defineProperty(exports3, \"ContractEventPayload\", { enumerable: true, get: function() {\n return index_js_4.ContractEventPayload;\n } });\n Object.defineProperty(exports3, \"ContractTransactionReceipt\", { enumerable: true, get: function() {\n return index_js_4.ContractTransactionReceipt;\n } });\n Object.defineProperty(exports3, \"ContractTransactionResponse\", { enumerable: true, get: function() {\n return index_js_4.ContractTransactionResponse;\n } });\n Object.defineProperty(exports3, \"ContractUnknownEventPayload\", { enumerable: true, get: function() {\n return index_js_4.ContractUnknownEventPayload;\n } });\n Object.defineProperty(exports3, \"EventLog\", { enumerable: true, get: function() {\n return index_js_4.EventLog;\n } });\n Object.defineProperty(exports3, \"UndecodedEventLog\", { enumerable: true, get: function() {\n return index_js_4.UndecodedEventLog;\n } });\n var index_js_5 = require_crypto2();\n Object.defineProperty(exports3, \"computeHmac\", { enumerable: true, get: function() {\n return index_js_5.computeHmac;\n } });\n Object.defineProperty(exports3, \"randomBytes\", { enumerable: true, get: function() {\n return index_js_5.randomBytes;\n } });\n Object.defineProperty(exports3, \"keccak256\", { enumerable: true, get: function() {\n return index_js_5.keccak256;\n } });\n Object.defineProperty(exports3, \"ripemd160\", { enumerable: true, get: function() {\n return index_js_5.ripemd160;\n } });\n Object.defineProperty(exports3, \"sha256\", { enumerable: true, get: function() {\n return index_js_5.sha256;\n } });\n Object.defineProperty(exports3, \"sha512\", { enumerable: true, get: function() {\n return index_js_5.sha512;\n } });\n Object.defineProperty(exports3, \"pbkdf2\", { enumerable: true, get: function() {\n return index_js_5.pbkdf2;\n } });\n Object.defineProperty(exports3, \"scrypt\", { enumerable: true, get: function() {\n return index_js_5.scrypt;\n } });\n Object.defineProperty(exports3, \"scryptSync\", { enumerable: true, get: function() {\n return index_js_5.scryptSync;\n } });\n Object.defineProperty(exports3, \"lock\", { enumerable: true, get: function() {\n return index_js_5.lock;\n } });\n Object.defineProperty(exports3, \"Signature\", { enumerable: true, get: function() {\n return index_js_5.Signature;\n } });\n Object.defineProperty(exports3, \"SigningKey\", { enumerable: true, get: function() {\n return index_js_5.SigningKey;\n } });\n var index_js_6 = require_hash2();\n Object.defineProperty(exports3, \"id\", { enumerable: true, get: function() {\n return index_js_6.id;\n } });\n Object.defineProperty(exports3, \"ensNormalize\", { enumerable: true, get: function() {\n return index_js_6.ensNormalize;\n } });\n Object.defineProperty(exports3, \"isValidName\", { enumerable: true, get: function() {\n return index_js_6.isValidName;\n } });\n Object.defineProperty(exports3, \"namehash\", { enumerable: true, get: function() {\n return index_js_6.namehash;\n } });\n Object.defineProperty(exports3, \"dnsEncode\", { enumerable: true, get: function() {\n return index_js_6.dnsEncode;\n } });\n Object.defineProperty(exports3, \"hashAuthorization\", { enumerable: true, get: function() {\n return index_js_6.hashAuthorization;\n } });\n Object.defineProperty(exports3, \"verifyAuthorization\", { enumerable: true, get: function() {\n return index_js_6.verifyAuthorization;\n } });\n Object.defineProperty(exports3, \"hashMessage\", { enumerable: true, get: function() {\n return index_js_6.hashMessage;\n } });\n Object.defineProperty(exports3, \"verifyMessage\", { enumerable: true, get: function() {\n return index_js_6.verifyMessage;\n } });\n Object.defineProperty(exports3, \"solidityPacked\", { enumerable: true, get: function() {\n return index_js_6.solidityPacked;\n } });\n Object.defineProperty(exports3, \"solidityPackedKeccak256\", { enumerable: true, get: function() {\n return index_js_6.solidityPackedKeccak256;\n } });\n Object.defineProperty(exports3, \"solidityPackedSha256\", { enumerable: true, get: function() {\n return index_js_6.solidityPackedSha256;\n } });\n Object.defineProperty(exports3, \"TypedDataEncoder\", { enumerable: true, get: function() {\n return index_js_6.TypedDataEncoder;\n } });\n Object.defineProperty(exports3, \"verifyTypedData\", { enumerable: true, get: function() {\n return index_js_6.verifyTypedData;\n } });\n var index_js_7 = require_providers();\n Object.defineProperty(exports3, \"getDefaultProvider\", { enumerable: true, get: function() {\n return index_js_7.getDefaultProvider;\n } });\n Object.defineProperty(exports3, \"Block\", { enumerable: true, get: function() {\n return index_js_7.Block;\n } });\n Object.defineProperty(exports3, \"FeeData\", { enumerable: true, get: function() {\n return index_js_7.FeeData;\n } });\n Object.defineProperty(exports3, \"Log\", { enumerable: true, get: function() {\n return index_js_7.Log;\n } });\n Object.defineProperty(exports3, \"TransactionReceipt\", { enumerable: true, get: function() {\n return index_js_7.TransactionReceipt;\n } });\n Object.defineProperty(exports3, \"TransactionResponse\", { enumerable: true, get: function() {\n return index_js_7.TransactionResponse;\n } });\n Object.defineProperty(exports3, \"AbstractSigner\", { enumerable: true, get: function() {\n return index_js_7.AbstractSigner;\n } });\n Object.defineProperty(exports3, \"NonceManager\", { enumerable: true, get: function() {\n return index_js_7.NonceManager;\n } });\n Object.defineProperty(exports3, \"VoidSigner\", { enumerable: true, get: function() {\n return index_js_7.VoidSigner;\n } });\n Object.defineProperty(exports3, \"AbstractProvider\", { enumerable: true, get: function() {\n return index_js_7.AbstractProvider;\n } });\n Object.defineProperty(exports3, \"FallbackProvider\", { enumerable: true, get: function() {\n return index_js_7.FallbackProvider;\n } });\n Object.defineProperty(exports3, \"JsonRpcApiProvider\", { enumerable: true, get: function() {\n return index_js_7.JsonRpcApiProvider;\n } });\n Object.defineProperty(exports3, \"JsonRpcProvider\", { enumerable: true, get: function() {\n return index_js_7.JsonRpcProvider;\n } });\n Object.defineProperty(exports3, \"JsonRpcSigner\", { enumerable: true, get: function() {\n return index_js_7.JsonRpcSigner;\n } });\n Object.defineProperty(exports3, \"BrowserProvider\", { enumerable: true, get: function() {\n return index_js_7.BrowserProvider;\n } });\n Object.defineProperty(exports3, \"AlchemyProvider\", { enumerable: true, get: function() {\n return index_js_7.AlchemyProvider;\n } });\n Object.defineProperty(exports3, \"AnkrProvider\", { enumerable: true, get: function() {\n return index_js_7.AnkrProvider;\n } });\n Object.defineProperty(exports3, \"BlockscoutProvider\", { enumerable: true, get: function() {\n return index_js_7.BlockscoutProvider;\n } });\n Object.defineProperty(exports3, \"ChainstackProvider\", { enumerable: true, get: function() {\n return index_js_7.ChainstackProvider;\n } });\n Object.defineProperty(exports3, \"CloudflareProvider\", { enumerable: true, get: function() {\n return index_js_7.CloudflareProvider;\n } });\n Object.defineProperty(exports3, \"EtherscanProvider\", { enumerable: true, get: function() {\n return index_js_7.EtherscanProvider;\n } });\n Object.defineProperty(exports3, \"InfuraProvider\", { enumerable: true, get: function() {\n return index_js_7.InfuraProvider;\n } });\n Object.defineProperty(exports3, \"InfuraWebSocketProvider\", { enumerable: true, get: function() {\n return index_js_7.InfuraWebSocketProvider;\n } });\n Object.defineProperty(exports3, \"PocketProvider\", { enumerable: true, get: function() {\n return index_js_7.PocketProvider;\n } });\n Object.defineProperty(exports3, \"QuickNodeProvider\", { enumerable: true, get: function() {\n return index_js_7.QuickNodeProvider;\n } });\n Object.defineProperty(exports3, \"IpcSocketProvider\", { enumerable: true, get: function() {\n return index_js_7.IpcSocketProvider;\n } });\n Object.defineProperty(exports3, \"SocketProvider\", { enumerable: true, get: function() {\n return index_js_7.SocketProvider;\n } });\n Object.defineProperty(exports3, \"WebSocketProvider\", { enumerable: true, get: function() {\n return index_js_7.WebSocketProvider;\n } });\n Object.defineProperty(exports3, \"EnsResolver\", { enumerable: true, get: function() {\n return index_js_7.EnsResolver;\n } });\n Object.defineProperty(exports3, \"Network\", { enumerable: true, get: function() {\n return index_js_7.Network;\n } });\n Object.defineProperty(exports3, \"EnsPlugin\", { enumerable: true, get: function() {\n return index_js_7.EnsPlugin;\n } });\n Object.defineProperty(exports3, \"EtherscanPlugin\", { enumerable: true, get: function() {\n return index_js_7.EtherscanPlugin;\n } });\n Object.defineProperty(exports3, \"FeeDataNetworkPlugin\", { enumerable: true, get: function() {\n return index_js_7.FeeDataNetworkPlugin;\n } });\n Object.defineProperty(exports3, \"FetchUrlFeeDataNetworkPlugin\", { enumerable: true, get: function() {\n return index_js_7.FetchUrlFeeDataNetworkPlugin;\n } });\n Object.defineProperty(exports3, \"GasCostPlugin\", { enumerable: true, get: function() {\n return index_js_7.GasCostPlugin;\n } });\n Object.defineProperty(exports3, \"NetworkPlugin\", { enumerable: true, get: function() {\n return index_js_7.NetworkPlugin;\n } });\n Object.defineProperty(exports3, \"MulticoinProviderPlugin\", { enumerable: true, get: function() {\n return index_js_7.MulticoinProviderPlugin;\n } });\n Object.defineProperty(exports3, \"SocketBlockSubscriber\", { enumerable: true, get: function() {\n return index_js_7.SocketBlockSubscriber;\n } });\n Object.defineProperty(exports3, \"SocketEventSubscriber\", { enumerable: true, get: function() {\n return index_js_7.SocketEventSubscriber;\n } });\n Object.defineProperty(exports3, \"SocketPendingSubscriber\", { enumerable: true, get: function() {\n return index_js_7.SocketPendingSubscriber;\n } });\n Object.defineProperty(exports3, \"SocketSubscriber\", { enumerable: true, get: function() {\n return index_js_7.SocketSubscriber;\n } });\n Object.defineProperty(exports3, \"UnmanagedSubscriber\", { enumerable: true, get: function() {\n return index_js_7.UnmanagedSubscriber;\n } });\n Object.defineProperty(exports3, \"copyRequest\", { enumerable: true, get: function() {\n return index_js_7.copyRequest;\n } });\n Object.defineProperty(exports3, \"showThrottleMessage\", { enumerable: true, get: function() {\n return index_js_7.showThrottleMessage;\n } });\n var index_js_8 = require_transaction2();\n Object.defineProperty(exports3, \"accessListify\", { enumerable: true, get: function() {\n return index_js_8.accessListify;\n } });\n Object.defineProperty(exports3, \"authorizationify\", { enumerable: true, get: function() {\n return index_js_8.authorizationify;\n } });\n Object.defineProperty(exports3, \"computeAddress\", { enumerable: true, get: function() {\n return index_js_8.computeAddress;\n } });\n Object.defineProperty(exports3, \"recoverAddress\", { enumerable: true, get: function() {\n return index_js_8.recoverAddress;\n } });\n Object.defineProperty(exports3, \"Transaction\", { enumerable: true, get: function() {\n return index_js_8.Transaction;\n } });\n var index_js_9 = require_utils8();\n Object.defineProperty(exports3, \"decodeBase58\", { enumerable: true, get: function() {\n return index_js_9.decodeBase58;\n } });\n Object.defineProperty(exports3, \"encodeBase58\", { enumerable: true, get: function() {\n return index_js_9.encodeBase58;\n } });\n Object.defineProperty(exports3, \"decodeBase64\", { enumerable: true, get: function() {\n return index_js_9.decodeBase64;\n } });\n Object.defineProperty(exports3, \"encodeBase64\", { enumerable: true, get: function() {\n return index_js_9.encodeBase64;\n } });\n Object.defineProperty(exports3, \"concat\", { enumerable: true, get: function() {\n return index_js_9.concat;\n } });\n Object.defineProperty(exports3, \"dataLength\", { enumerable: true, get: function() {\n return index_js_9.dataLength;\n } });\n Object.defineProperty(exports3, \"dataSlice\", { enumerable: true, get: function() {\n return index_js_9.dataSlice;\n } });\n Object.defineProperty(exports3, \"getBytes\", { enumerable: true, get: function() {\n return index_js_9.getBytes;\n } });\n Object.defineProperty(exports3, \"getBytesCopy\", { enumerable: true, get: function() {\n return index_js_9.getBytesCopy;\n } });\n Object.defineProperty(exports3, \"hexlify\", { enumerable: true, get: function() {\n return index_js_9.hexlify;\n } });\n Object.defineProperty(exports3, \"isHexString\", { enumerable: true, get: function() {\n return index_js_9.isHexString;\n } });\n Object.defineProperty(exports3, \"isBytesLike\", { enumerable: true, get: function() {\n return index_js_9.isBytesLike;\n } });\n Object.defineProperty(exports3, \"stripZerosLeft\", { enumerable: true, get: function() {\n return index_js_9.stripZerosLeft;\n } });\n Object.defineProperty(exports3, \"zeroPadBytes\", { enumerable: true, get: function() {\n return index_js_9.zeroPadBytes;\n } });\n Object.defineProperty(exports3, \"zeroPadValue\", { enumerable: true, get: function() {\n return index_js_9.zeroPadValue;\n } });\n Object.defineProperty(exports3, \"defineProperties\", { enumerable: true, get: function() {\n return index_js_9.defineProperties;\n } });\n Object.defineProperty(exports3, \"resolveProperties\", { enumerable: true, get: function() {\n return index_js_9.resolveProperties;\n } });\n Object.defineProperty(exports3, \"assert\", { enumerable: true, get: function() {\n return index_js_9.assert;\n } });\n Object.defineProperty(exports3, \"assertArgument\", { enumerable: true, get: function() {\n return index_js_9.assertArgument;\n } });\n Object.defineProperty(exports3, \"assertArgumentCount\", { enumerable: true, get: function() {\n return index_js_9.assertArgumentCount;\n } });\n Object.defineProperty(exports3, \"assertNormalize\", { enumerable: true, get: function() {\n return index_js_9.assertNormalize;\n } });\n Object.defineProperty(exports3, \"assertPrivate\", { enumerable: true, get: function() {\n return index_js_9.assertPrivate;\n } });\n Object.defineProperty(exports3, \"makeError\", { enumerable: true, get: function() {\n return index_js_9.makeError;\n } });\n Object.defineProperty(exports3, \"isCallException\", { enumerable: true, get: function() {\n return index_js_9.isCallException;\n } });\n Object.defineProperty(exports3, \"isError\", { enumerable: true, get: function() {\n return index_js_9.isError;\n } });\n Object.defineProperty(exports3, \"EventPayload\", { enumerable: true, get: function() {\n return index_js_9.EventPayload;\n } });\n Object.defineProperty(exports3, \"FetchRequest\", { enumerable: true, get: function() {\n return index_js_9.FetchRequest;\n } });\n Object.defineProperty(exports3, \"FetchResponse\", { enumerable: true, get: function() {\n return index_js_9.FetchResponse;\n } });\n Object.defineProperty(exports3, \"FetchCancelSignal\", { enumerable: true, get: function() {\n return index_js_9.FetchCancelSignal;\n } });\n Object.defineProperty(exports3, \"FixedNumber\", { enumerable: true, get: function() {\n return index_js_9.FixedNumber;\n } });\n Object.defineProperty(exports3, \"getBigInt\", { enumerable: true, get: function() {\n return index_js_9.getBigInt;\n } });\n Object.defineProperty(exports3, \"getNumber\", { enumerable: true, get: function() {\n return index_js_9.getNumber;\n } });\n Object.defineProperty(exports3, \"getUint\", { enumerable: true, get: function() {\n return index_js_9.getUint;\n } });\n Object.defineProperty(exports3, \"toBeArray\", { enumerable: true, get: function() {\n return index_js_9.toBeArray;\n } });\n Object.defineProperty(exports3, \"toBigInt\", { enumerable: true, get: function() {\n return index_js_9.toBigInt;\n } });\n Object.defineProperty(exports3, \"toBeHex\", { enumerable: true, get: function() {\n return index_js_9.toBeHex;\n } });\n Object.defineProperty(exports3, \"toNumber\", { enumerable: true, get: function() {\n return index_js_9.toNumber;\n } });\n Object.defineProperty(exports3, \"toQuantity\", { enumerable: true, get: function() {\n return index_js_9.toQuantity;\n } });\n Object.defineProperty(exports3, \"fromTwos\", { enumerable: true, get: function() {\n return index_js_9.fromTwos;\n } });\n Object.defineProperty(exports3, \"toTwos\", { enumerable: true, get: function() {\n return index_js_9.toTwos;\n } });\n Object.defineProperty(exports3, \"mask\", { enumerable: true, get: function() {\n return index_js_9.mask;\n } });\n Object.defineProperty(exports3, \"formatEther\", { enumerable: true, get: function() {\n return index_js_9.formatEther;\n } });\n Object.defineProperty(exports3, \"parseEther\", { enumerable: true, get: function() {\n return index_js_9.parseEther;\n } });\n Object.defineProperty(exports3, \"formatUnits\", { enumerable: true, get: function() {\n return index_js_9.formatUnits;\n } });\n Object.defineProperty(exports3, \"parseUnits\", { enumerable: true, get: function() {\n return index_js_9.parseUnits;\n } });\n Object.defineProperty(exports3, \"toUtf8Bytes\", { enumerable: true, get: function() {\n return index_js_9.toUtf8Bytes;\n } });\n Object.defineProperty(exports3, \"toUtf8CodePoints\", { enumerable: true, get: function() {\n return index_js_9.toUtf8CodePoints;\n } });\n Object.defineProperty(exports3, \"toUtf8String\", { enumerable: true, get: function() {\n return index_js_9.toUtf8String;\n } });\n Object.defineProperty(exports3, \"Utf8ErrorFuncs\", { enumerable: true, get: function() {\n return index_js_9.Utf8ErrorFuncs;\n } });\n Object.defineProperty(exports3, \"decodeRlp\", { enumerable: true, get: function() {\n return index_js_9.decodeRlp;\n } });\n Object.defineProperty(exports3, \"encodeRlp\", { enumerable: true, get: function() {\n return index_js_9.encodeRlp;\n } });\n Object.defineProperty(exports3, \"uuidV4\", { enumerable: true, get: function() {\n return index_js_9.uuidV4;\n } });\n var index_js_10 = require_wallet2();\n Object.defineProperty(exports3, \"Mnemonic\", { enumerable: true, get: function() {\n return index_js_10.Mnemonic;\n } });\n Object.defineProperty(exports3, \"BaseWallet\", { enumerable: true, get: function() {\n return index_js_10.BaseWallet;\n } });\n Object.defineProperty(exports3, \"HDNodeWallet\", { enumerable: true, get: function() {\n return index_js_10.HDNodeWallet;\n } });\n Object.defineProperty(exports3, \"HDNodeVoidWallet\", { enumerable: true, get: function() {\n return index_js_10.HDNodeVoidWallet;\n } });\n Object.defineProperty(exports3, \"Wallet\", { enumerable: true, get: function() {\n return index_js_10.Wallet;\n } });\n Object.defineProperty(exports3, \"defaultPath\", { enumerable: true, get: function() {\n return index_js_10.defaultPath;\n } });\n Object.defineProperty(exports3, \"getAccountPath\", { enumerable: true, get: function() {\n return index_js_10.getAccountPath;\n } });\n Object.defineProperty(exports3, \"getIndexedAccountPath\", { enumerable: true, get: function() {\n return index_js_10.getIndexedAccountPath;\n } });\n Object.defineProperty(exports3, \"isCrowdsaleJson\", { enumerable: true, get: function() {\n return index_js_10.isCrowdsaleJson;\n } });\n Object.defineProperty(exports3, \"isKeystoreJson\", { enumerable: true, get: function() {\n return index_js_10.isKeystoreJson;\n } });\n Object.defineProperty(exports3, \"decryptCrowdsaleJson\", { enumerable: true, get: function() {\n return index_js_10.decryptCrowdsaleJson;\n } });\n Object.defineProperty(exports3, \"decryptKeystoreJsonSync\", { enumerable: true, get: function() {\n return index_js_10.decryptKeystoreJsonSync;\n } });\n Object.defineProperty(exports3, \"decryptKeystoreJson\", { enumerable: true, get: function() {\n return index_js_10.decryptKeystoreJson;\n } });\n Object.defineProperty(exports3, \"encryptKeystoreJson\", { enumerable: true, get: function() {\n return index_js_10.encryptKeystoreJson;\n } });\n Object.defineProperty(exports3, \"encryptKeystoreJsonSync\", { enumerable: true, get: function() {\n return index_js_10.encryptKeystoreJsonSync;\n } });\n var index_js_11 = require_wordlists2();\n Object.defineProperty(exports3, \"Wordlist\", { enumerable: true, get: function() {\n return index_js_11.Wordlist;\n } });\n Object.defineProperty(exports3, \"LangEn\", { enumerable: true, get: function() {\n return index_js_11.LangEn;\n } });\n Object.defineProperty(exports3, \"WordlistOwl\", { enumerable: true, get: function() {\n return index_js_11.WordlistOwl;\n } });\n Object.defineProperty(exports3, \"WordlistOwlA\", { enumerable: true, get: function() {\n return index_js_11.WordlistOwlA;\n } });\n Object.defineProperty(exports3, \"wordlists\", { enumerable: true, get: function() {\n return index_js_11.wordlists;\n } });\n }\n });\n\n // ../../../node_modules/.pnpm/ethers@6.15.0_bufferutil@4.0.9_utf-8-validate@5.0.10/node_modules/ethers/lib.commonjs/index.js\n var require_lib34 = __commonJS({\n \"../../../node_modules/.pnpm/ethers@6.15.0_bufferutil@4.0.9_utf-8-validate@5.0.10/node_modules/ethers/lib.commonjs/index.js\"(exports3) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n Object.defineProperty(exports3, \"__esModule\", { value: true });\n exports3.ethers = void 0;\n var tslib_1 = (init_tslib_es62(), __toCommonJS(tslib_es6_exports2));\n var ethers16 = tslib_1.__importStar(require_ethers2());\n exports3.ethers = ethers16;\n tslib_1.__exportStar(require_ethers2(), exports3);\n }\n });\n\n // ../../libs/ability-sdk/dist/src/lib/abilityHelpers/populateTransaction.js\n var require_populateTransaction = __commonJS({\n \"../../libs/ability-sdk/dist/src/lib/abilityHelpers/populateTransaction.js\"(exports3) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n Object.defineProperty(exports3, \"__esModule\", { value: true });\n exports3.populateTransaction = void 0;\n var ethers_v6_1 = require_lib34();\n var populateTransaction2 = async ({ to, from: from14, data, value, rpcUrl, chainId, gasBufferPercentage, baseFeePerGasBufferPercentage }) => {\n if (gasBufferPercentage !== void 0 && !Number.isInteger(gasBufferPercentage)) {\n throw new Error(\"[populateTransaction] gasBufferPercentage must be an integer\");\n }\n if (baseFeePerGasBufferPercentage !== void 0 && !Number.isInteger(baseFeePerGasBufferPercentage)) {\n throw new Error(\"[populateTransaction] baseFeePerGasBufferPercentage must be an integer\");\n }\n const provider = new ethers_v6_1.JsonRpcProvider(rpcUrl);\n const signer = new ethers_v6_1.VoidSigner(from14, provider);\n const populatedTx = await signer.populateTransaction({\n to,\n from: from14,\n data,\n value,\n chainId\n });\n if (!populatedTx.gasLimit) {\n throw new Error(`[estimateGas] Unable to estimate gas for transaction: ${JSON.stringify({\n to,\n from: from14,\n data,\n value\n })}`);\n }\n if (gasBufferPercentage !== void 0) {\n populatedTx.gasLimit = BigInt(populatedTx.gasLimit) * BigInt(100 + gasBufferPercentage) / 100n;\n }\n const partialUnsignedTx = {\n to: populatedTx.to ?? void 0,\n nonce: populatedTx.nonce ?? void 0,\n gasLimit: (0, ethers_v6_1.toQuantity)(populatedTx.gasLimit),\n data: populatedTx.data ?? void 0,\n value: populatedTx.value ? (0, ethers_v6_1.toQuantity)(populatedTx.value) : \"0x0\",\n chainId: populatedTx.chainId ? (0, ethers_v6_1.toNumber)(populatedTx.chainId) : void 0,\n // Typed-Transaction features\n type: populatedTx.type ?? void 0,\n // EIP-2930; Type 1 & EIP-1559; Type 2\n accessList: populatedTx.accessList ?? void 0\n };\n if (populatedTx.gasPrice != null) {\n return {\n ...partialUnsignedTx,\n gasPrice: (0, ethers_v6_1.toQuantity)(populatedTx.gasPrice)\n };\n }\n if (populatedTx.maxFeePerGas == null) {\n throw new Error(\"[estimateGas] maxFeePerGas is missing from populated transaction\");\n }\n if (populatedTx.maxPriorityFeePerGas == null) {\n throw new Error(\"[estimateGas] maxPriorityFeePerGas is missing from populated transaction\");\n }\n if (baseFeePerGasBufferPercentage !== void 0) {\n populatedTx.maxFeePerGas = BigInt(populatedTx.maxFeePerGas) * BigInt(100 + baseFeePerGasBufferPercentage) / 100n;\n }\n return {\n ...partialUnsignedTx,\n maxFeePerGas: (0, ethers_v6_1.toQuantity)(populatedTx.maxFeePerGas),\n maxPriorityFeePerGas: (0, ethers_v6_1.toQuantity)(populatedTx.maxPriorityFeePerGas)\n };\n };\n exports3.populateTransaction = populateTransaction2;\n }\n });\n\n // ../../../node_modules/.pnpm/@aa-sdk+core@4.62.0_typescript@5.8.3_viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64_/node_modules/@aa-sdk/core/dist/esm/abis/EntryPointAbi_v6.js\n var EntryPointAbi_v6;\n var init_EntryPointAbi_v6 = __esm({\n \"../../../node_modules/.pnpm/@aa-sdk+core@4.62.0_typescript@5.8.3_viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64_/node_modules/@aa-sdk/core/dist/esm/abis/EntryPointAbi_v6.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n EntryPointAbi_v6 = [\n {\n inputs: [\n {\n internalType: \"uint256\",\n name: \"preOpGas\",\n type: \"uint256\"\n },\n {\n internalType: \"uint256\",\n name: \"paid\",\n type: \"uint256\"\n },\n {\n internalType: \"uint48\",\n name: \"validAfter\",\n type: \"uint48\"\n },\n {\n internalType: \"uint48\",\n name: \"validUntil\",\n type: \"uint48\"\n },\n {\n internalType: \"bool\",\n name: \"targetSuccess\",\n type: \"bool\"\n },\n {\n internalType: \"bytes\",\n name: \"targetResult\",\n type: \"bytes\"\n }\n ],\n name: \"ExecutionResult\",\n type: \"error\"\n },\n {\n inputs: [\n {\n internalType: \"uint256\",\n name: \"opIndex\",\n type: \"uint256\"\n },\n {\n internalType: \"string\",\n name: \"reason\",\n type: \"string\"\n }\n ],\n name: \"FailedOp\",\n type: \"error\"\n },\n {\n inputs: [\n {\n internalType: \"address\",\n name: \"sender\",\n type: \"address\"\n }\n ],\n name: \"SenderAddressResult\",\n type: \"error\"\n },\n {\n inputs: [\n {\n internalType: \"address\",\n name: \"aggregator\",\n type: \"address\"\n }\n ],\n name: \"SignatureValidationFailed\",\n type: \"error\"\n },\n {\n inputs: [\n {\n components: [\n {\n internalType: \"uint256\",\n name: \"preOpGas\",\n type: \"uint256\"\n },\n {\n internalType: \"uint256\",\n name: \"prefund\",\n type: \"uint256\"\n },\n {\n internalType: \"bool\",\n name: \"sigFailed\",\n type: \"bool\"\n },\n {\n internalType: \"uint48\",\n name: \"validAfter\",\n type: \"uint48\"\n },\n {\n internalType: \"uint48\",\n name: \"validUntil\",\n type: \"uint48\"\n },\n {\n internalType: \"bytes\",\n name: \"paymasterContext\",\n type: \"bytes\"\n }\n ],\n internalType: \"struct IEntryPoint.ReturnInfo\",\n name: \"returnInfo\",\n type: \"tuple\"\n },\n {\n components: [\n {\n internalType: \"uint256\",\n name: \"stake\",\n type: \"uint256\"\n },\n {\n internalType: \"uint256\",\n name: \"unstakeDelaySec\",\n type: \"uint256\"\n }\n ],\n internalType: \"struct IStakeManager.StakeInfo\",\n name: \"senderInfo\",\n type: \"tuple\"\n },\n {\n components: [\n {\n internalType: \"uint256\",\n name: \"stake\",\n type: \"uint256\"\n },\n {\n internalType: \"uint256\",\n name: \"unstakeDelaySec\",\n type: \"uint256\"\n }\n ],\n internalType: \"struct IStakeManager.StakeInfo\",\n name: \"factoryInfo\",\n type: \"tuple\"\n },\n {\n components: [\n {\n internalType: \"uint256\",\n name: \"stake\",\n type: \"uint256\"\n },\n {\n internalType: \"uint256\",\n name: \"unstakeDelaySec\",\n type: \"uint256\"\n }\n ],\n internalType: \"struct IStakeManager.StakeInfo\",\n name: \"paymasterInfo\",\n type: \"tuple\"\n }\n ],\n name: \"ValidationResult\",\n type: \"error\"\n },\n {\n inputs: [\n {\n components: [\n {\n internalType: \"uint256\",\n name: \"preOpGas\",\n type: \"uint256\"\n },\n {\n internalType: \"uint256\",\n name: \"prefund\",\n type: \"uint256\"\n },\n {\n internalType: \"bool\",\n name: \"sigFailed\",\n type: \"bool\"\n },\n {\n internalType: \"uint48\",\n name: \"validAfter\",\n type: \"uint48\"\n },\n {\n internalType: \"uint48\",\n name: \"validUntil\",\n type: \"uint48\"\n },\n {\n internalType: \"bytes\",\n name: \"paymasterContext\",\n type: \"bytes\"\n }\n ],\n internalType: \"struct IEntryPoint.ReturnInfo\",\n name: \"returnInfo\",\n type: \"tuple\"\n },\n {\n components: [\n {\n internalType: \"uint256\",\n name: \"stake\",\n type: \"uint256\"\n },\n {\n internalType: \"uint256\",\n name: \"unstakeDelaySec\",\n type: \"uint256\"\n }\n ],\n internalType: \"struct IStakeManager.StakeInfo\",\n name: \"senderInfo\",\n type: \"tuple\"\n },\n {\n components: [\n {\n internalType: \"uint256\",\n name: \"stake\",\n type: \"uint256\"\n },\n {\n internalType: \"uint256\",\n name: \"unstakeDelaySec\",\n type: \"uint256\"\n }\n ],\n internalType: \"struct IStakeManager.StakeInfo\",\n name: \"factoryInfo\",\n type: \"tuple\"\n },\n {\n components: [\n {\n internalType: \"uint256\",\n name: \"stake\",\n type: \"uint256\"\n },\n {\n internalType: \"uint256\",\n name: \"unstakeDelaySec\",\n type: \"uint256\"\n }\n ],\n internalType: \"struct IStakeManager.StakeInfo\",\n name: \"paymasterInfo\",\n type: \"tuple\"\n },\n {\n components: [\n {\n internalType: \"address\",\n name: \"aggregator\",\n type: \"address\"\n },\n {\n components: [\n {\n internalType: \"uint256\",\n name: \"stake\",\n type: \"uint256\"\n },\n {\n internalType: \"uint256\",\n name: \"unstakeDelaySec\",\n type: \"uint256\"\n }\n ],\n internalType: \"struct IStakeManager.StakeInfo\",\n name: \"stakeInfo\",\n type: \"tuple\"\n }\n ],\n internalType: \"struct IEntryPoint.AggregatorStakeInfo\",\n name: \"aggregatorInfo\",\n type: \"tuple\"\n }\n ],\n name: \"ValidationResultWithAggregation\",\n type: \"error\"\n },\n {\n anonymous: false,\n inputs: [\n {\n indexed: true,\n internalType: \"bytes32\",\n name: \"userOpHash\",\n type: \"bytes32\"\n },\n {\n indexed: true,\n internalType: \"address\",\n name: \"sender\",\n type: \"address\"\n },\n {\n indexed: false,\n internalType: \"address\",\n name: \"factory\",\n type: \"address\"\n },\n {\n indexed: false,\n internalType: \"address\",\n name: \"paymaster\",\n type: \"address\"\n }\n ],\n name: \"AccountDeployed\",\n type: \"event\"\n },\n {\n anonymous: false,\n inputs: [],\n name: \"BeforeExecution\",\n type: \"event\"\n },\n {\n anonymous: false,\n inputs: [\n {\n indexed: true,\n internalType: \"address\",\n name: \"account\",\n type: \"address\"\n },\n {\n indexed: false,\n internalType: \"uint256\",\n name: \"totalDeposit\",\n type: \"uint256\"\n }\n ],\n name: \"Deposited\",\n type: \"event\"\n },\n {\n anonymous: false,\n inputs: [\n {\n indexed: true,\n internalType: \"address\",\n name: \"aggregator\",\n type: \"address\"\n }\n ],\n name: \"SignatureAggregatorChanged\",\n type: \"event\"\n },\n {\n anonymous: false,\n inputs: [\n {\n indexed: true,\n internalType: \"address\",\n name: \"account\",\n type: \"address\"\n },\n {\n indexed: false,\n internalType: \"uint256\",\n name: \"totalStaked\",\n type: \"uint256\"\n },\n {\n indexed: false,\n internalType: \"uint256\",\n name: \"unstakeDelaySec\",\n type: \"uint256\"\n }\n ],\n name: \"StakeLocked\",\n type: \"event\"\n },\n {\n anonymous: false,\n inputs: [\n {\n indexed: true,\n internalType: \"address\",\n name: \"account\",\n type: \"address\"\n },\n {\n indexed: false,\n internalType: \"uint256\",\n name: \"withdrawTime\",\n type: \"uint256\"\n }\n ],\n name: \"StakeUnlocked\",\n type: \"event\"\n },\n {\n anonymous: false,\n inputs: [\n {\n indexed: true,\n internalType: \"address\",\n name: \"account\",\n type: \"address\"\n },\n {\n indexed: false,\n internalType: \"address\",\n name: \"withdrawAddress\",\n type: \"address\"\n },\n {\n indexed: false,\n internalType: \"uint256\",\n name: \"amount\",\n type: \"uint256\"\n }\n ],\n name: \"StakeWithdrawn\",\n type: \"event\"\n },\n {\n anonymous: false,\n inputs: [\n {\n indexed: true,\n internalType: \"bytes32\",\n name: \"userOpHash\",\n type: \"bytes32\"\n },\n {\n indexed: true,\n internalType: \"address\",\n name: \"sender\",\n type: \"address\"\n },\n {\n indexed: true,\n internalType: \"address\",\n name: \"paymaster\",\n type: \"address\"\n },\n {\n indexed: false,\n internalType: \"uint256\",\n name: \"nonce\",\n type: \"uint256\"\n },\n {\n indexed: false,\n internalType: \"bool\",\n name: \"success\",\n type: \"bool\"\n },\n {\n indexed: false,\n internalType: \"uint256\",\n name: \"actualGasCost\",\n type: \"uint256\"\n },\n {\n indexed: false,\n internalType: \"uint256\",\n name: \"actualGasUsed\",\n type: \"uint256\"\n }\n ],\n name: \"UserOperationEvent\",\n type: \"event\"\n },\n {\n anonymous: false,\n inputs: [\n {\n indexed: true,\n internalType: \"bytes32\",\n name: \"userOpHash\",\n type: \"bytes32\"\n },\n {\n indexed: true,\n internalType: \"address\",\n name: \"sender\",\n type: \"address\"\n },\n {\n indexed: false,\n internalType: \"uint256\",\n name: \"nonce\",\n type: \"uint256\"\n },\n {\n indexed: false,\n internalType: \"bytes\",\n name: \"revertReason\",\n type: \"bytes\"\n }\n ],\n name: \"UserOperationRevertReason\",\n type: \"event\"\n },\n {\n anonymous: false,\n inputs: [\n {\n indexed: true,\n internalType: \"address\",\n name: \"account\",\n type: \"address\"\n },\n {\n indexed: false,\n internalType: \"address\",\n name: \"withdrawAddress\",\n type: \"address\"\n },\n {\n indexed: false,\n internalType: \"uint256\",\n name: \"amount\",\n type: \"uint256\"\n }\n ],\n name: \"Withdrawn\",\n type: \"event\"\n },\n {\n inputs: [],\n name: \"SIG_VALIDATION_FAILED\",\n outputs: [\n {\n internalType: \"uint256\",\n name: \"\",\n type: \"uint256\"\n }\n ],\n stateMutability: \"view\",\n type: \"function\"\n },\n {\n inputs: [\n {\n internalType: \"bytes\",\n name: \"initCode\",\n type: \"bytes\"\n },\n {\n internalType: \"address\",\n name: \"sender\",\n type: \"address\"\n },\n {\n internalType: \"bytes\",\n name: \"paymasterAndData\",\n type: \"bytes\"\n }\n ],\n name: \"_validateSenderAndPaymaster\",\n outputs: [],\n stateMutability: \"view\",\n type: \"function\"\n },\n {\n inputs: [\n {\n internalType: \"uint32\",\n name: \"unstakeDelaySec\",\n type: \"uint32\"\n }\n ],\n name: \"addStake\",\n outputs: [],\n stateMutability: \"payable\",\n type: \"function\"\n },\n {\n inputs: [\n {\n internalType: \"address\",\n name: \"account\",\n type: \"address\"\n }\n ],\n name: \"balanceOf\",\n outputs: [\n {\n internalType: \"uint256\",\n name: \"\",\n type: \"uint256\"\n }\n ],\n stateMutability: \"view\",\n type: \"function\"\n },\n {\n inputs: [\n {\n internalType: \"address\",\n name: \"account\",\n type: \"address\"\n }\n ],\n name: \"depositTo\",\n outputs: [],\n stateMutability: \"payable\",\n type: \"function\"\n },\n {\n inputs: [\n {\n internalType: \"address\",\n name: \"\",\n type: \"address\"\n }\n ],\n name: \"deposits\",\n outputs: [\n {\n internalType: \"uint112\",\n name: \"deposit\",\n type: \"uint112\"\n },\n {\n internalType: \"bool\",\n name: \"staked\",\n type: \"bool\"\n },\n {\n internalType: \"uint112\",\n name: \"stake\",\n type: \"uint112\"\n },\n {\n internalType: \"uint32\",\n name: \"unstakeDelaySec\",\n type: \"uint32\"\n },\n {\n internalType: \"uint48\",\n name: \"withdrawTime\",\n type: \"uint48\"\n }\n ],\n stateMutability: \"view\",\n type: \"function\"\n },\n {\n inputs: [\n {\n internalType: \"address\",\n name: \"account\",\n type: \"address\"\n }\n ],\n name: \"getDepositInfo\",\n outputs: [\n {\n components: [\n {\n internalType: \"uint112\",\n name: \"deposit\",\n type: \"uint112\"\n },\n {\n internalType: \"bool\",\n name: \"staked\",\n type: \"bool\"\n },\n {\n internalType: \"uint112\",\n name: \"stake\",\n type: \"uint112\"\n },\n {\n internalType: \"uint32\",\n name: \"unstakeDelaySec\",\n type: \"uint32\"\n },\n {\n internalType: \"uint48\",\n name: \"withdrawTime\",\n type: \"uint48\"\n }\n ],\n internalType: \"struct IStakeManager.DepositInfo\",\n name: \"info\",\n type: \"tuple\"\n }\n ],\n stateMutability: \"view\",\n type: \"function\"\n },\n {\n inputs: [\n {\n internalType: \"address\",\n name: \"sender\",\n type: \"address\"\n },\n {\n internalType: \"uint192\",\n name: \"key\",\n type: \"uint192\"\n }\n ],\n name: \"getNonce\",\n outputs: [\n {\n internalType: \"uint256\",\n name: \"nonce\",\n type: \"uint256\"\n }\n ],\n stateMutability: \"view\",\n type: \"function\"\n },\n {\n inputs: [\n {\n internalType: \"bytes\",\n name: \"initCode\",\n type: \"bytes\"\n }\n ],\n name: \"getSenderAddress\",\n outputs: [],\n stateMutability: \"nonpayable\",\n type: \"function\"\n },\n {\n inputs: [\n {\n components: [\n {\n internalType: \"address\",\n name: \"sender\",\n type: \"address\"\n },\n {\n internalType: \"uint256\",\n name: \"nonce\",\n type: \"uint256\"\n },\n {\n internalType: \"bytes\",\n name: \"initCode\",\n type: \"bytes\"\n },\n {\n internalType: \"bytes\",\n name: \"callData\",\n type: \"bytes\"\n },\n {\n internalType: \"uint256\",\n name: \"callGasLimit\",\n type: \"uint256\"\n },\n {\n internalType: \"uint256\",\n name: \"verificationGasLimit\",\n type: \"uint256\"\n },\n {\n internalType: \"uint256\",\n name: \"preVerificationGas\",\n type: \"uint256\"\n },\n {\n internalType: \"uint256\",\n name: \"maxFeePerGas\",\n type: \"uint256\"\n },\n {\n internalType: \"uint256\",\n name: \"maxPriorityFeePerGas\",\n type: \"uint256\"\n },\n {\n internalType: \"bytes\",\n name: \"paymasterAndData\",\n type: \"bytes\"\n },\n {\n internalType: \"bytes\",\n name: \"signature\",\n type: \"bytes\"\n }\n ],\n internalType: \"struct UserOperation\",\n name: \"userOp\",\n type: \"tuple\"\n }\n ],\n name: \"getUserOpHash\",\n outputs: [\n {\n internalType: \"bytes32\",\n name: \"\",\n type: \"bytes32\"\n }\n ],\n stateMutability: \"view\",\n type: \"function\"\n },\n {\n inputs: [\n {\n components: [\n {\n components: [\n {\n internalType: \"address\",\n name: \"sender\",\n type: \"address\"\n },\n {\n internalType: \"uint256\",\n name: \"nonce\",\n type: \"uint256\"\n },\n {\n internalType: \"bytes\",\n name: \"initCode\",\n type: \"bytes\"\n },\n {\n internalType: \"bytes\",\n name: \"callData\",\n type: \"bytes\"\n },\n {\n internalType: \"uint256\",\n name: \"callGasLimit\",\n type: \"uint256\"\n },\n {\n internalType: \"uint256\",\n name: \"verificationGasLimit\",\n type: \"uint256\"\n },\n {\n internalType: \"uint256\",\n name: \"preVerificationGas\",\n type: \"uint256\"\n },\n {\n internalType: \"uint256\",\n name: \"maxFeePerGas\",\n type: \"uint256\"\n },\n {\n internalType: \"uint256\",\n name: \"maxPriorityFeePerGas\",\n type: \"uint256\"\n },\n {\n internalType: \"bytes\",\n name: \"paymasterAndData\",\n type: \"bytes\"\n },\n {\n internalType: \"bytes\",\n name: \"signature\",\n type: \"bytes\"\n }\n ],\n internalType: \"struct UserOperation[]\",\n name: \"userOps\",\n type: \"tuple[]\"\n },\n {\n internalType: \"contract IAggregator\",\n name: \"aggregator\",\n type: \"address\"\n },\n {\n internalType: \"bytes\",\n name: \"signature\",\n type: \"bytes\"\n }\n ],\n internalType: \"struct IEntryPoint.UserOpsPerAggregator[]\",\n name: \"opsPerAggregator\",\n type: \"tuple[]\"\n },\n {\n internalType: \"address payable\",\n name: \"beneficiary\",\n type: \"address\"\n }\n ],\n name: \"handleAggregatedOps\",\n outputs: [],\n stateMutability: \"nonpayable\",\n type: \"function\"\n },\n {\n inputs: [\n {\n components: [\n {\n internalType: \"address\",\n name: \"sender\",\n type: \"address\"\n },\n {\n internalType: \"uint256\",\n name: \"nonce\",\n type: \"uint256\"\n },\n {\n internalType: \"bytes\",\n name: \"initCode\",\n type: \"bytes\"\n },\n {\n internalType: \"bytes\",\n name: \"callData\",\n type: \"bytes\"\n },\n {\n internalType: \"uint256\",\n name: \"callGasLimit\",\n type: \"uint256\"\n },\n {\n internalType: \"uint256\",\n name: \"verificationGasLimit\",\n type: \"uint256\"\n },\n {\n internalType: \"uint256\",\n name: \"preVerificationGas\",\n type: \"uint256\"\n },\n {\n internalType: \"uint256\",\n name: \"maxFeePerGas\",\n type: \"uint256\"\n },\n {\n internalType: \"uint256\",\n name: \"maxPriorityFeePerGas\",\n type: \"uint256\"\n },\n {\n internalType: \"bytes\",\n name: \"paymasterAndData\",\n type: \"bytes\"\n },\n {\n internalType: \"bytes\",\n name: \"signature\",\n type: \"bytes\"\n }\n ],\n internalType: \"struct UserOperation[]\",\n name: \"ops\",\n type: \"tuple[]\"\n },\n {\n internalType: \"address payable\",\n name: \"beneficiary\",\n type: \"address\"\n }\n ],\n name: \"handleOps\",\n outputs: [],\n stateMutability: \"nonpayable\",\n type: \"function\"\n },\n {\n inputs: [\n {\n internalType: \"uint192\",\n name: \"key\",\n type: \"uint192\"\n }\n ],\n name: \"incrementNonce\",\n outputs: [],\n stateMutability: \"nonpayable\",\n type: \"function\"\n },\n {\n inputs: [\n {\n internalType: \"bytes\",\n name: \"callData\",\n type: \"bytes\"\n },\n {\n components: [\n {\n components: [\n {\n internalType: \"address\",\n name: \"sender\",\n type: \"address\"\n },\n {\n internalType: \"uint256\",\n name: \"nonce\",\n type: \"uint256\"\n },\n {\n internalType: \"uint256\",\n name: \"callGasLimit\",\n type: \"uint256\"\n },\n {\n internalType: \"uint256\",\n name: \"verificationGasLimit\",\n type: \"uint256\"\n },\n {\n internalType: \"uint256\",\n name: \"preVerificationGas\",\n type: \"uint256\"\n },\n {\n internalType: \"address\",\n name: \"paymaster\",\n type: \"address\"\n },\n {\n internalType: \"uint256\",\n name: \"maxFeePerGas\",\n type: \"uint256\"\n },\n {\n internalType: \"uint256\",\n name: \"maxPriorityFeePerGas\",\n type: \"uint256\"\n }\n ],\n internalType: \"struct EntryPoint.MemoryUserOp\",\n name: \"mUserOp\",\n type: \"tuple\"\n },\n {\n internalType: \"bytes32\",\n name: \"userOpHash\",\n type: \"bytes32\"\n },\n {\n internalType: \"uint256\",\n name: \"prefund\",\n type: \"uint256\"\n },\n {\n internalType: \"uint256\",\n name: \"contextOffset\",\n type: \"uint256\"\n },\n {\n internalType: \"uint256\",\n name: \"preOpGas\",\n type: \"uint256\"\n }\n ],\n internalType: \"struct EntryPoint.UserOpInfo\",\n name: \"opInfo\",\n type: \"tuple\"\n },\n {\n internalType: \"bytes\",\n name: \"context\",\n type: \"bytes\"\n }\n ],\n name: \"innerHandleOp\",\n outputs: [\n {\n internalType: \"uint256\",\n name: \"actualGasCost\",\n type: \"uint256\"\n }\n ],\n stateMutability: \"nonpayable\",\n type: \"function\"\n },\n {\n inputs: [\n {\n internalType: \"address\",\n name: \"\",\n type: \"address\"\n },\n {\n internalType: \"uint192\",\n name: \"\",\n type: \"uint192\"\n }\n ],\n name: \"nonceSequenceNumber\",\n outputs: [\n {\n internalType: \"uint256\",\n name: \"\",\n type: \"uint256\"\n }\n ],\n stateMutability: \"view\",\n type: \"function\"\n },\n {\n inputs: [\n {\n components: [\n {\n internalType: \"address\",\n name: \"sender\",\n type: \"address\"\n },\n {\n internalType: \"uint256\",\n name: \"nonce\",\n type: \"uint256\"\n },\n {\n internalType: \"bytes\",\n name: \"initCode\",\n type: \"bytes\"\n },\n {\n internalType: \"bytes\",\n name: \"callData\",\n type: \"bytes\"\n },\n {\n internalType: \"uint256\",\n name: \"callGasLimit\",\n type: \"uint256\"\n },\n {\n internalType: \"uint256\",\n name: \"verificationGasLimit\",\n type: \"uint256\"\n },\n {\n internalType: \"uint256\",\n name: \"preVerificationGas\",\n type: \"uint256\"\n },\n {\n internalType: \"uint256\",\n name: \"maxFeePerGas\",\n type: \"uint256\"\n },\n {\n internalType: \"uint256\",\n name: \"maxPriorityFeePerGas\",\n type: \"uint256\"\n },\n {\n internalType: \"bytes\",\n name: \"paymasterAndData\",\n type: \"bytes\"\n },\n {\n internalType: \"bytes\",\n name: \"signature\",\n type: \"bytes\"\n }\n ],\n internalType: \"struct UserOperation\",\n name: \"op\",\n type: \"tuple\"\n },\n {\n internalType: \"address\",\n name: \"target\",\n type: \"address\"\n },\n {\n internalType: \"bytes\",\n name: \"targetCallData\",\n type: \"bytes\"\n }\n ],\n name: \"simulateHandleOp\",\n outputs: [],\n stateMutability: \"nonpayable\",\n type: \"function\"\n },\n {\n inputs: [\n {\n components: [\n {\n internalType: \"address\",\n name: \"sender\",\n type: \"address\"\n },\n {\n internalType: \"uint256\",\n name: \"nonce\",\n type: \"uint256\"\n },\n {\n internalType: \"bytes\",\n name: \"initCode\",\n type: \"bytes\"\n },\n {\n internalType: \"bytes\",\n name: \"callData\",\n type: \"bytes\"\n },\n {\n internalType: \"uint256\",\n name: \"callGasLimit\",\n type: \"uint256\"\n },\n {\n internalType: \"uint256\",\n name: \"verificationGasLimit\",\n type: \"uint256\"\n },\n {\n internalType: \"uint256\",\n name: \"preVerificationGas\",\n type: \"uint256\"\n },\n {\n internalType: \"uint256\",\n name: \"maxFeePerGas\",\n type: \"uint256\"\n },\n {\n internalType: \"uint256\",\n name: \"maxPriorityFeePerGas\",\n type: \"uint256\"\n },\n {\n internalType: \"bytes\",\n name: \"paymasterAndData\",\n type: \"bytes\"\n },\n {\n internalType: \"bytes\",\n name: \"signature\",\n type: \"bytes\"\n }\n ],\n internalType: \"struct UserOperation\",\n name: \"userOp\",\n type: \"tuple\"\n }\n ],\n name: \"simulateValidation\",\n outputs: [],\n stateMutability: \"nonpayable\",\n type: \"function\"\n },\n {\n inputs: [],\n name: \"unlockStake\",\n outputs: [],\n stateMutability: \"nonpayable\",\n type: \"function\"\n },\n {\n inputs: [\n {\n internalType: \"address payable\",\n name: \"withdrawAddress\",\n type: \"address\"\n }\n ],\n name: \"withdrawStake\",\n outputs: [],\n stateMutability: \"nonpayable\",\n type: \"function\"\n },\n {\n inputs: [\n {\n internalType: \"address payable\",\n name: \"withdrawAddress\",\n type: \"address\"\n },\n {\n internalType: \"uint256\",\n name: \"withdrawAmount\",\n type: \"uint256\"\n }\n ],\n name: \"withdrawTo\",\n outputs: [],\n stateMutability: \"nonpayable\",\n type: \"function\"\n },\n {\n stateMutability: \"payable\",\n type: \"receive\"\n }\n ];\n }\n });\n\n // ../../../node_modules/.pnpm/@aa-sdk+core@4.62.0_typescript@5.8.3_viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64_/node_modules/@aa-sdk/core/dist/esm/abis/EntryPointAbi_v7.js\n var EntryPointAbi_v7;\n var init_EntryPointAbi_v7 = __esm({\n \"../../../node_modules/.pnpm/@aa-sdk+core@4.62.0_typescript@5.8.3_viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64_/node_modules/@aa-sdk/core/dist/esm/abis/EntryPointAbi_v7.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n EntryPointAbi_v7 = [\n {\n inputs: [\n { internalType: \"bool\", name: \"success\", type: \"bool\" },\n { internalType: \"bytes\", name: \"ret\", type: \"bytes\" }\n ],\n name: \"DelegateAndRevert\",\n type: \"error\"\n },\n {\n inputs: [\n { internalType: \"uint256\", name: \"opIndex\", type: \"uint256\" },\n { internalType: \"string\", name: \"reason\", type: \"string\" }\n ],\n name: \"FailedOp\",\n type: \"error\"\n },\n {\n inputs: [\n { internalType: \"uint256\", name: \"opIndex\", type: \"uint256\" },\n { internalType: \"string\", name: \"reason\", type: \"string\" },\n { internalType: \"bytes\", name: \"inner\", type: \"bytes\" }\n ],\n name: \"FailedOpWithRevert\",\n type: \"error\"\n },\n {\n inputs: [{ internalType: \"bytes\", name: \"returnData\", type: \"bytes\" }],\n name: \"PostOpReverted\",\n type: \"error\"\n },\n { inputs: [], name: \"ReentrancyGuardReentrantCall\", type: \"error\" },\n {\n inputs: [{ internalType: \"address\", name: \"sender\", type: \"address\" }],\n name: \"SenderAddressResult\",\n type: \"error\"\n },\n {\n inputs: [{ internalType: \"address\", name: \"aggregator\", type: \"address\" }],\n name: \"SignatureValidationFailed\",\n type: \"error\"\n },\n {\n anonymous: false,\n inputs: [\n {\n indexed: true,\n internalType: \"bytes32\",\n name: \"userOpHash\",\n type: \"bytes32\"\n },\n {\n indexed: true,\n internalType: \"address\",\n name: \"sender\",\n type: \"address\"\n },\n {\n indexed: false,\n internalType: \"address\",\n name: \"factory\",\n type: \"address\"\n },\n {\n indexed: false,\n internalType: \"address\",\n name: \"paymaster\",\n type: \"address\"\n }\n ],\n name: \"AccountDeployed\",\n type: \"event\"\n },\n { anonymous: false, inputs: [], name: \"BeforeExecution\", type: \"event\" },\n {\n anonymous: false,\n inputs: [\n {\n indexed: true,\n internalType: \"address\",\n name: \"account\",\n type: \"address\"\n },\n {\n indexed: false,\n internalType: \"uint256\",\n name: \"totalDeposit\",\n type: \"uint256\"\n }\n ],\n name: \"Deposited\",\n type: \"event\"\n },\n {\n anonymous: false,\n inputs: [\n {\n indexed: true,\n internalType: \"bytes32\",\n name: \"userOpHash\",\n type: \"bytes32\"\n },\n {\n indexed: true,\n internalType: \"address\",\n name: \"sender\",\n type: \"address\"\n },\n {\n indexed: false,\n internalType: \"uint256\",\n name: \"nonce\",\n type: \"uint256\"\n },\n {\n indexed: false,\n internalType: \"bytes\",\n name: \"revertReason\",\n type: \"bytes\"\n }\n ],\n name: \"PostOpRevertReason\",\n type: \"event\"\n },\n {\n anonymous: false,\n inputs: [\n {\n indexed: true,\n internalType: \"address\",\n name: \"aggregator\",\n type: \"address\"\n }\n ],\n name: \"SignatureAggregatorChanged\",\n type: \"event\"\n },\n {\n anonymous: false,\n inputs: [\n {\n indexed: true,\n internalType: \"address\",\n name: \"account\",\n type: \"address\"\n },\n {\n indexed: false,\n internalType: \"uint256\",\n name: \"totalStaked\",\n type: \"uint256\"\n },\n {\n indexed: false,\n internalType: \"uint256\",\n name: \"unstakeDelaySec\",\n type: \"uint256\"\n }\n ],\n name: \"StakeLocked\",\n type: \"event\"\n },\n {\n anonymous: false,\n inputs: [\n {\n indexed: true,\n internalType: \"address\",\n name: \"account\",\n type: \"address\"\n },\n {\n indexed: false,\n internalType: \"uint256\",\n name: \"withdrawTime\",\n type: \"uint256\"\n }\n ],\n name: \"StakeUnlocked\",\n type: \"event\"\n },\n {\n anonymous: false,\n inputs: [\n {\n indexed: true,\n internalType: \"address\",\n name: \"account\",\n type: \"address\"\n },\n {\n indexed: false,\n internalType: \"address\",\n name: \"withdrawAddress\",\n type: \"address\"\n },\n {\n indexed: false,\n internalType: \"uint256\",\n name: \"amount\",\n type: \"uint256\"\n }\n ],\n name: \"StakeWithdrawn\",\n type: \"event\"\n },\n {\n anonymous: false,\n inputs: [\n {\n indexed: true,\n internalType: \"bytes32\",\n name: \"userOpHash\",\n type: \"bytes32\"\n },\n {\n indexed: true,\n internalType: \"address\",\n name: \"sender\",\n type: \"address\"\n },\n {\n indexed: true,\n internalType: \"address\",\n name: \"paymaster\",\n type: \"address\"\n },\n {\n indexed: false,\n internalType: \"uint256\",\n name: \"nonce\",\n type: \"uint256\"\n },\n { indexed: false, internalType: \"bool\", name: \"success\", type: \"bool\" },\n {\n indexed: false,\n internalType: \"uint256\",\n name: \"actualGasCost\",\n type: \"uint256\"\n },\n {\n indexed: false,\n internalType: \"uint256\",\n name: \"actualGasUsed\",\n type: \"uint256\"\n }\n ],\n name: \"UserOperationEvent\",\n type: \"event\"\n },\n {\n anonymous: false,\n inputs: [\n {\n indexed: true,\n internalType: \"bytes32\",\n name: \"userOpHash\",\n type: \"bytes32\"\n },\n {\n indexed: true,\n internalType: \"address\",\n name: \"sender\",\n type: \"address\"\n },\n {\n indexed: false,\n internalType: \"uint256\",\n name: \"nonce\",\n type: \"uint256\"\n }\n ],\n name: \"UserOperationPrefundTooLow\",\n type: \"event\"\n },\n {\n anonymous: false,\n inputs: [\n {\n indexed: true,\n internalType: \"bytes32\",\n name: \"userOpHash\",\n type: \"bytes32\"\n },\n {\n indexed: true,\n internalType: \"address\",\n name: \"sender\",\n type: \"address\"\n },\n {\n indexed: false,\n internalType: \"uint256\",\n name: \"nonce\",\n type: \"uint256\"\n },\n {\n indexed: false,\n internalType: \"bytes\",\n name: \"revertReason\",\n type: \"bytes\"\n }\n ],\n name: \"UserOperationRevertReason\",\n type: \"event\"\n },\n {\n anonymous: false,\n inputs: [\n {\n indexed: true,\n internalType: \"address\",\n name: \"account\",\n type: \"address\"\n },\n {\n indexed: false,\n internalType: \"address\",\n name: \"withdrawAddress\",\n type: \"address\"\n },\n {\n indexed: false,\n internalType: \"uint256\",\n name: \"amount\",\n type: \"uint256\"\n }\n ],\n name: \"Withdrawn\",\n type: \"event\"\n },\n {\n inputs: [\n { internalType: \"uint32\", name: \"unstakeDelaySec\", type: \"uint32\" }\n ],\n name: \"addStake\",\n outputs: [],\n stateMutability: \"payable\",\n type: \"function\"\n },\n {\n inputs: [{ internalType: \"address\", name: \"account\", type: \"address\" }],\n name: \"balanceOf\",\n outputs: [{ internalType: \"uint256\", name: \"\", type: \"uint256\" }],\n stateMutability: \"view\",\n type: \"function\"\n },\n {\n inputs: [\n { internalType: \"address\", name: \"target\", type: \"address\" },\n { internalType: \"bytes\", name: \"data\", type: \"bytes\" }\n ],\n name: \"delegateAndRevert\",\n outputs: [],\n stateMutability: \"nonpayable\",\n type: \"function\"\n },\n {\n inputs: [{ internalType: \"address\", name: \"account\", type: \"address\" }],\n name: \"depositTo\",\n outputs: [],\n stateMutability: \"payable\",\n type: \"function\"\n },\n {\n inputs: [{ internalType: \"address\", name: \"\", type: \"address\" }],\n name: \"deposits\",\n outputs: [\n { internalType: \"uint256\", name: \"deposit\", type: \"uint256\" },\n { internalType: \"bool\", name: \"staked\", type: \"bool\" },\n { internalType: \"uint112\", name: \"stake\", type: \"uint112\" },\n { internalType: \"uint32\", name: \"unstakeDelaySec\", type: \"uint32\" },\n { internalType: \"uint48\", name: \"withdrawTime\", type: \"uint48\" }\n ],\n stateMutability: \"view\",\n type: \"function\"\n },\n {\n inputs: [{ internalType: \"address\", name: \"account\", type: \"address\" }],\n name: \"getDepositInfo\",\n outputs: [\n {\n components: [\n { internalType: \"uint256\", name: \"deposit\", type: \"uint256\" },\n { internalType: \"bool\", name: \"staked\", type: \"bool\" },\n { internalType: \"uint112\", name: \"stake\", type: \"uint112\" },\n { internalType: \"uint32\", name: \"unstakeDelaySec\", type: \"uint32\" },\n { internalType: \"uint48\", name: \"withdrawTime\", type: \"uint48\" }\n ],\n internalType: \"struct IStakeManager.DepositInfo\",\n name: \"info\",\n type: \"tuple\"\n }\n ],\n stateMutability: \"view\",\n type: \"function\"\n },\n {\n inputs: [\n { internalType: \"address\", name: \"sender\", type: \"address\" },\n { internalType: \"uint192\", name: \"key\", type: \"uint192\" }\n ],\n name: \"getNonce\",\n outputs: [{ internalType: \"uint256\", name: \"nonce\", type: \"uint256\" }],\n stateMutability: \"view\",\n type: \"function\"\n },\n {\n inputs: [{ internalType: \"bytes\", name: \"initCode\", type: \"bytes\" }],\n name: \"getSenderAddress\",\n outputs: [],\n stateMutability: \"nonpayable\",\n type: \"function\"\n },\n {\n inputs: [\n {\n components: [\n { internalType: \"address\", name: \"sender\", type: \"address\" },\n { internalType: \"uint256\", name: \"nonce\", type: \"uint256\" },\n { internalType: \"bytes\", name: \"initCode\", type: \"bytes\" },\n { internalType: \"bytes\", name: \"callData\", type: \"bytes\" },\n {\n internalType: \"bytes32\",\n name: \"accountGasLimits\",\n type: \"bytes32\"\n },\n {\n internalType: \"uint256\",\n name: \"preVerificationGas\",\n type: \"uint256\"\n },\n { internalType: \"bytes32\", name: \"gasFees\", type: \"bytes32\" },\n { internalType: \"bytes\", name: \"paymasterAndData\", type: \"bytes\" },\n { internalType: \"bytes\", name: \"signature\", type: \"bytes\" }\n ],\n internalType: \"struct PackedUserOperation\",\n name: \"userOp\",\n type: \"tuple\"\n }\n ],\n name: \"getUserOpHash\",\n outputs: [{ internalType: \"bytes32\", name: \"\", type: \"bytes32\" }],\n stateMutability: \"view\",\n type: \"function\"\n },\n {\n inputs: [\n {\n components: [\n {\n components: [\n { internalType: \"address\", name: \"sender\", type: \"address\" },\n { internalType: \"uint256\", name: \"nonce\", type: \"uint256\" },\n { internalType: \"bytes\", name: \"initCode\", type: \"bytes\" },\n { internalType: \"bytes\", name: \"callData\", type: \"bytes\" },\n {\n internalType: \"bytes32\",\n name: \"accountGasLimits\",\n type: \"bytes32\"\n },\n {\n internalType: \"uint256\",\n name: \"preVerificationGas\",\n type: \"uint256\"\n },\n { internalType: \"bytes32\", name: \"gasFees\", type: \"bytes32\" },\n {\n internalType: \"bytes\",\n name: \"paymasterAndData\",\n type: \"bytes\"\n },\n { internalType: \"bytes\", name: \"signature\", type: \"bytes\" }\n ],\n internalType: \"struct PackedUserOperation[]\",\n name: \"userOps\",\n type: \"tuple[]\"\n },\n {\n internalType: \"contract IAggregator\",\n name: \"aggregator\",\n type: \"address\"\n },\n { internalType: \"bytes\", name: \"signature\", type: \"bytes\" }\n ],\n internalType: \"struct IEntryPoint.UserOpsPerAggregator[]\",\n name: \"opsPerAggregator\",\n type: \"tuple[]\"\n },\n { internalType: \"address payable\", name: \"beneficiary\", type: \"address\" }\n ],\n name: \"handleAggregatedOps\",\n outputs: [],\n stateMutability: \"nonpayable\",\n type: \"function\"\n },\n {\n inputs: [\n {\n components: [\n { internalType: \"address\", name: \"sender\", type: \"address\" },\n { internalType: \"uint256\", name: \"nonce\", type: \"uint256\" },\n { internalType: \"bytes\", name: \"initCode\", type: \"bytes\" },\n { internalType: \"bytes\", name: \"callData\", type: \"bytes\" },\n {\n internalType: \"bytes32\",\n name: \"accountGasLimits\",\n type: \"bytes32\"\n },\n {\n internalType: \"uint256\",\n name: \"preVerificationGas\",\n type: \"uint256\"\n },\n { internalType: \"bytes32\", name: \"gasFees\", type: \"bytes32\" },\n { internalType: \"bytes\", name: \"paymasterAndData\", type: \"bytes\" },\n { internalType: \"bytes\", name: \"signature\", type: \"bytes\" }\n ],\n internalType: \"struct PackedUserOperation[]\",\n name: \"ops\",\n type: \"tuple[]\"\n },\n { internalType: \"address payable\", name: \"beneficiary\", type: \"address\" }\n ],\n name: \"handleOps\",\n outputs: [],\n stateMutability: \"nonpayable\",\n type: \"function\"\n },\n {\n inputs: [{ internalType: \"uint192\", name: \"key\", type: \"uint192\" }],\n name: \"incrementNonce\",\n outputs: [],\n stateMutability: \"nonpayable\",\n type: \"function\"\n },\n {\n inputs: [\n { internalType: \"bytes\", name: \"callData\", type: \"bytes\" },\n {\n components: [\n {\n components: [\n { internalType: \"address\", name: \"sender\", type: \"address\" },\n { internalType: \"uint256\", name: \"nonce\", type: \"uint256\" },\n {\n internalType: \"uint256\",\n name: \"verificationGasLimit\",\n type: \"uint256\"\n },\n {\n internalType: \"uint256\",\n name: \"callGasLimit\",\n type: \"uint256\"\n },\n {\n internalType: \"uint256\",\n name: \"paymasterVerificationGasLimit\",\n type: \"uint256\"\n },\n {\n internalType: \"uint256\",\n name: \"paymasterPostOpGasLimit\",\n type: \"uint256\"\n },\n {\n internalType: \"uint256\",\n name: \"preVerificationGas\",\n type: \"uint256\"\n },\n { internalType: \"address\", name: \"paymaster\", type: \"address\" },\n {\n internalType: \"uint256\",\n name: \"maxFeePerGas\",\n type: \"uint256\"\n },\n {\n internalType: \"uint256\",\n name: \"maxPriorityFeePerGas\",\n type: \"uint256\"\n }\n ],\n internalType: \"struct EntryPoint.MemoryUserOp\",\n name: \"mUserOp\",\n type: \"tuple\"\n },\n { internalType: \"bytes32\", name: \"userOpHash\", type: \"bytes32\" },\n { internalType: \"uint256\", name: \"prefund\", type: \"uint256\" },\n { internalType: \"uint256\", name: \"contextOffset\", type: \"uint256\" },\n { internalType: \"uint256\", name: \"preOpGas\", type: \"uint256\" }\n ],\n internalType: \"struct EntryPoint.UserOpInfo\",\n name: \"opInfo\",\n type: \"tuple\"\n },\n { internalType: \"bytes\", name: \"context\", type: \"bytes\" }\n ],\n name: \"innerHandleOp\",\n outputs: [\n { internalType: \"uint256\", name: \"actualGasCost\", type: \"uint256\" }\n ],\n stateMutability: \"nonpayable\",\n type: \"function\"\n },\n {\n inputs: [\n { internalType: \"address\", name: \"\", type: \"address\" },\n { internalType: \"uint192\", name: \"\", type: \"uint192\" }\n ],\n name: \"nonceSequenceNumber\",\n outputs: [{ internalType: \"uint256\", name: \"\", type: \"uint256\" }],\n stateMutability: \"view\",\n type: \"function\"\n },\n {\n inputs: [{ internalType: \"bytes4\", name: \"interfaceId\", type: \"bytes4\" }],\n name: \"supportsInterface\",\n outputs: [{ internalType: \"bool\", name: \"\", type: \"bool\" }],\n stateMutability: \"view\",\n type: \"function\"\n },\n {\n inputs: [],\n name: \"unlockStake\",\n outputs: [],\n stateMutability: \"nonpayable\",\n type: \"function\"\n },\n {\n inputs: [\n {\n internalType: \"address payable\",\n name: \"withdrawAddress\",\n type: \"address\"\n }\n ],\n name: \"withdrawStake\",\n outputs: [],\n stateMutability: \"nonpayable\",\n type: \"function\"\n },\n {\n inputs: [\n {\n internalType: \"address payable\",\n name: \"withdrawAddress\",\n type: \"address\"\n },\n { internalType: \"uint256\", name: \"withdrawAmount\", type: \"uint256\" }\n ],\n name: \"withdrawTo\",\n outputs: [],\n stateMutability: \"nonpayable\",\n type: \"function\"\n },\n { stateMutability: \"payable\", type: \"receive\" }\n ];\n }\n });\n\n // ../../../node_modules/.pnpm/abitype@1.1.0_typescript@5.8.3_zod@3.25.64/node_modules/abitype/dist/esm/version.js\n var version2;\n var init_version2 = __esm({\n \"../../../node_modules/.pnpm/abitype@1.1.0_typescript@5.8.3_zod@3.25.64/node_modules/abitype/dist/esm/version.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n version2 = \"1.1.0\";\n }\n });\n\n // ../../../node_modules/.pnpm/abitype@1.1.0_typescript@5.8.3_zod@3.25.64/node_modules/abitype/dist/esm/errors.js\n var BaseError;\n var init_errors2 = __esm({\n \"../../../node_modules/.pnpm/abitype@1.1.0_typescript@5.8.3_zod@3.25.64/node_modules/abitype/dist/esm/errors.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_version2();\n BaseError = class _BaseError extends Error {\n constructor(shortMessage, args = {}) {\n const details = args.cause instanceof _BaseError ? args.cause.details : args.cause?.message ? args.cause.message : args.details;\n const docsPath8 = args.cause instanceof _BaseError ? args.cause.docsPath || args.docsPath : args.docsPath;\n const message = [\n shortMessage || \"An error occurred.\",\n \"\",\n ...args.metaMessages ? [...args.metaMessages, \"\"] : [],\n ...docsPath8 ? [`Docs: https://abitype.dev${docsPath8}`] : [],\n ...details ? [`Details: ${details}`] : [],\n `Version: abitype@${version2}`\n ].join(\"\\n\");\n super(message);\n Object.defineProperty(this, \"details\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: void 0\n });\n Object.defineProperty(this, \"docsPath\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: void 0\n });\n Object.defineProperty(this, \"metaMessages\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: void 0\n });\n Object.defineProperty(this, \"shortMessage\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: void 0\n });\n Object.defineProperty(this, \"name\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: \"AbiTypeError\"\n });\n if (args.cause)\n this.cause = args.cause;\n this.details = details;\n this.docsPath = docsPath8;\n this.metaMessages = args.metaMessages;\n this.shortMessage = shortMessage;\n }\n };\n }\n });\n\n // ../../../node_modules/.pnpm/abitype@1.1.0_typescript@5.8.3_zod@3.25.64/node_modules/abitype/dist/esm/regex.js\n function execTyped(regex2, string2) {\n const match = regex2.exec(string2);\n return match?.groups;\n }\n var bytesRegex, integerRegex, isTupleRegex;\n var init_regex = __esm({\n \"../../../node_modules/.pnpm/abitype@1.1.0_typescript@5.8.3_zod@3.25.64/node_modules/abitype/dist/esm/regex.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n bytesRegex = /^bytes([1-9]|1[0-9]|2[0-9]|3[0-2])?$/;\n integerRegex = /^u?int(8|16|24|32|40|48|56|64|72|80|88|96|104|112|120|128|136|144|152|160|168|176|184|192|200|208|216|224|232|240|248|256)?$/;\n isTupleRegex = /^\\(.+?\\).*?$/;\n }\n });\n\n // ../../../node_modules/.pnpm/abitype@1.1.0_typescript@5.8.3_zod@3.25.64/node_modules/abitype/dist/esm/human-readable/formatAbiParameter.js\n function formatAbiParameter(abiParameter) {\n let type = abiParameter.type;\n if (tupleRegex.test(abiParameter.type) && \"components\" in abiParameter) {\n type = \"(\";\n const length2 = abiParameter.components.length;\n for (let i3 = 0; i3 < length2; i3++) {\n const component = abiParameter.components[i3];\n type += formatAbiParameter(component);\n if (i3 < length2 - 1)\n type += \", \";\n }\n const result = execTyped(tupleRegex, abiParameter.type);\n type += `)${result?.array ?? \"\"}`;\n return formatAbiParameter({\n ...abiParameter,\n type\n });\n }\n if (\"indexed\" in abiParameter && abiParameter.indexed)\n type = `${type} indexed`;\n if (abiParameter.name)\n return `${type} ${abiParameter.name}`;\n return type;\n }\n var tupleRegex;\n var init_formatAbiParameter = __esm({\n \"../../../node_modules/.pnpm/abitype@1.1.0_typescript@5.8.3_zod@3.25.64/node_modules/abitype/dist/esm/human-readable/formatAbiParameter.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_regex();\n tupleRegex = /^tuple(?(\\[(\\d*)\\])*)$/;\n }\n });\n\n // ../../../node_modules/.pnpm/abitype@1.1.0_typescript@5.8.3_zod@3.25.64/node_modules/abitype/dist/esm/human-readable/formatAbiParameters.js\n function formatAbiParameters(abiParameters) {\n let params = \"\";\n const length2 = abiParameters.length;\n for (let i3 = 0; i3 < length2; i3++) {\n const abiParameter = abiParameters[i3];\n params += formatAbiParameter(abiParameter);\n if (i3 !== length2 - 1)\n params += \", \";\n }\n return params;\n }\n var init_formatAbiParameters = __esm({\n \"../../../node_modules/.pnpm/abitype@1.1.0_typescript@5.8.3_zod@3.25.64/node_modules/abitype/dist/esm/human-readable/formatAbiParameters.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_formatAbiParameter();\n }\n });\n\n // ../../../node_modules/.pnpm/abitype@1.1.0_typescript@5.8.3_zod@3.25.64/node_modules/abitype/dist/esm/human-readable/formatAbiItem.js\n function formatAbiItem(abiItem) {\n if (abiItem.type === \"function\")\n return `function ${abiItem.name}(${formatAbiParameters(abiItem.inputs)})${abiItem.stateMutability && abiItem.stateMutability !== \"nonpayable\" ? ` ${abiItem.stateMutability}` : \"\"}${abiItem.outputs?.length ? ` returns (${formatAbiParameters(abiItem.outputs)})` : \"\"}`;\n if (abiItem.type === \"event\")\n return `event ${abiItem.name}(${formatAbiParameters(abiItem.inputs)})`;\n if (abiItem.type === \"error\")\n return `error ${abiItem.name}(${formatAbiParameters(abiItem.inputs)})`;\n if (abiItem.type === \"constructor\")\n return `constructor(${formatAbiParameters(abiItem.inputs)})${abiItem.stateMutability === \"payable\" ? \" payable\" : \"\"}`;\n if (abiItem.type === \"fallback\")\n return `fallback() external${abiItem.stateMutability === \"payable\" ? \" payable\" : \"\"}`;\n return \"receive() external payable\";\n }\n var init_formatAbiItem = __esm({\n \"../../../node_modules/.pnpm/abitype@1.1.0_typescript@5.8.3_zod@3.25.64/node_modules/abitype/dist/esm/human-readable/formatAbiItem.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_formatAbiParameters();\n }\n });\n\n // ../../../node_modules/.pnpm/abitype@1.1.0_typescript@5.8.3_zod@3.25.64/node_modules/abitype/dist/esm/human-readable/runtime/signatures.js\n function isErrorSignature(signature) {\n return errorSignatureRegex.test(signature);\n }\n function execErrorSignature(signature) {\n return execTyped(errorSignatureRegex, signature);\n }\n function isEventSignature(signature) {\n return eventSignatureRegex.test(signature);\n }\n function execEventSignature(signature) {\n return execTyped(eventSignatureRegex, signature);\n }\n function isFunctionSignature(signature) {\n return functionSignatureRegex.test(signature);\n }\n function execFunctionSignature(signature) {\n return execTyped(functionSignatureRegex, signature);\n }\n function isStructSignature(signature) {\n return structSignatureRegex.test(signature);\n }\n function execStructSignature(signature) {\n return execTyped(structSignatureRegex, signature);\n }\n function isConstructorSignature(signature) {\n return constructorSignatureRegex.test(signature);\n }\n function execConstructorSignature(signature) {\n return execTyped(constructorSignatureRegex, signature);\n }\n function isFallbackSignature(signature) {\n return fallbackSignatureRegex.test(signature);\n }\n function execFallbackSignature(signature) {\n return execTyped(fallbackSignatureRegex, signature);\n }\n function isReceiveSignature(signature) {\n return receiveSignatureRegex.test(signature);\n }\n var errorSignatureRegex, eventSignatureRegex, functionSignatureRegex, structSignatureRegex, constructorSignatureRegex, fallbackSignatureRegex, receiveSignatureRegex, modifiers, eventModifiers, functionModifiers;\n var init_signatures = __esm({\n \"../../../node_modules/.pnpm/abitype@1.1.0_typescript@5.8.3_zod@3.25.64/node_modules/abitype/dist/esm/human-readable/runtime/signatures.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_regex();\n errorSignatureRegex = /^error (?[a-zA-Z$_][a-zA-Z0-9$_]*)\\((?.*?)\\)$/;\n eventSignatureRegex = /^event (?[a-zA-Z$_][a-zA-Z0-9$_]*)\\((?.*?)\\)$/;\n functionSignatureRegex = /^function (?[a-zA-Z$_][a-zA-Z0-9$_]*)\\((?.*?)\\)(?: (?external|public{1}))?(?: (?pure|view|nonpayable|payable{1}))?(?: returns\\s?\\((?.*?)\\))?$/;\n structSignatureRegex = /^struct (?[a-zA-Z$_][a-zA-Z0-9$_]*) \\{(?.*?)\\}$/;\n constructorSignatureRegex = /^constructor\\((?.*?)\\)(?:\\s(?payable{1}))?$/;\n fallbackSignatureRegex = /^fallback\\(\\) external(?:\\s(?payable{1}))?$/;\n receiveSignatureRegex = /^receive\\(\\) external payable$/;\n modifiers = /* @__PURE__ */ new Set([\n \"memory\",\n \"indexed\",\n \"storage\",\n \"calldata\"\n ]);\n eventModifiers = /* @__PURE__ */ new Set([\"indexed\"]);\n functionModifiers = /* @__PURE__ */ new Set([\n \"calldata\",\n \"memory\",\n \"storage\"\n ]);\n }\n });\n\n // ../../../node_modules/.pnpm/abitype@1.1.0_typescript@5.8.3_zod@3.25.64/node_modules/abitype/dist/esm/human-readable/errors/abiItem.js\n var InvalidAbiItemError, UnknownTypeError, UnknownSolidityTypeError;\n var init_abiItem = __esm({\n \"../../../node_modules/.pnpm/abitype@1.1.0_typescript@5.8.3_zod@3.25.64/node_modules/abitype/dist/esm/human-readable/errors/abiItem.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_errors2();\n InvalidAbiItemError = class extends BaseError {\n constructor({ signature }) {\n super(\"Failed to parse ABI item.\", {\n details: `parseAbiItem(${JSON.stringify(signature, null, 2)})`,\n docsPath: \"/api/human#parseabiitem-1\"\n });\n Object.defineProperty(this, \"name\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: \"InvalidAbiItemError\"\n });\n }\n };\n UnknownTypeError = class extends BaseError {\n constructor({ type }) {\n super(\"Unknown type.\", {\n metaMessages: [\n `Type \"${type}\" is not a valid ABI type. Perhaps you forgot to include a struct signature?`\n ]\n });\n Object.defineProperty(this, \"name\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: \"UnknownTypeError\"\n });\n }\n };\n UnknownSolidityTypeError = class extends BaseError {\n constructor({ type }) {\n super(\"Unknown type.\", {\n metaMessages: [`Type \"${type}\" is not a valid ABI type.`]\n });\n Object.defineProperty(this, \"name\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: \"UnknownSolidityTypeError\"\n });\n }\n };\n }\n });\n\n // ../../../node_modules/.pnpm/abitype@1.1.0_typescript@5.8.3_zod@3.25.64/node_modules/abitype/dist/esm/human-readable/errors/abiParameter.js\n var InvalidAbiParametersError, InvalidParameterError, SolidityProtectedKeywordError, InvalidModifierError, InvalidFunctionModifierError, InvalidAbiTypeParameterError;\n var init_abiParameter = __esm({\n \"../../../node_modules/.pnpm/abitype@1.1.0_typescript@5.8.3_zod@3.25.64/node_modules/abitype/dist/esm/human-readable/errors/abiParameter.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_errors2();\n InvalidAbiParametersError = class extends BaseError {\n constructor({ params }) {\n super(\"Failed to parse ABI parameters.\", {\n details: `parseAbiParameters(${JSON.stringify(params, null, 2)})`,\n docsPath: \"/api/human#parseabiparameters-1\"\n });\n Object.defineProperty(this, \"name\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: \"InvalidAbiParametersError\"\n });\n }\n };\n InvalidParameterError = class extends BaseError {\n constructor({ param }) {\n super(\"Invalid ABI parameter.\", {\n details: param\n });\n Object.defineProperty(this, \"name\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: \"InvalidParameterError\"\n });\n }\n };\n SolidityProtectedKeywordError = class extends BaseError {\n constructor({ param, name }) {\n super(\"Invalid ABI parameter.\", {\n details: param,\n metaMessages: [\n `\"${name}\" is a protected Solidity keyword. More info: https://docs.soliditylang.org/en/latest/cheatsheet.html`\n ]\n });\n Object.defineProperty(this, \"name\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: \"SolidityProtectedKeywordError\"\n });\n }\n };\n InvalidModifierError = class extends BaseError {\n constructor({ param, type, modifier }) {\n super(\"Invalid ABI parameter.\", {\n details: param,\n metaMessages: [\n `Modifier \"${modifier}\" not allowed${type ? ` in \"${type}\" type` : \"\"}.`\n ]\n });\n Object.defineProperty(this, \"name\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: \"InvalidModifierError\"\n });\n }\n };\n InvalidFunctionModifierError = class extends BaseError {\n constructor({ param, type, modifier }) {\n super(\"Invalid ABI parameter.\", {\n details: param,\n metaMessages: [\n `Modifier \"${modifier}\" not allowed${type ? ` in \"${type}\" type` : \"\"}.`,\n `Data location can only be specified for array, struct, or mapping types, but \"${modifier}\" was given.`\n ]\n });\n Object.defineProperty(this, \"name\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: \"InvalidFunctionModifierError\"\n });\n }\n };\n InvalidAbiTypeParameterError = class extends BaseError {\n constructor({ abiParameter }) {\n super(\"Invalid ABI parameter.\", {\n details: JSON.stringify(abiParameter, null, 2),\n metaMessages: [\"ABI parameter type is invalid.\"]\n });\n Object.defineProperty(this, \"name\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: \"InvalidAbiTypeParameterError\"\n });\n }\n };\n }\n });\n\n // ../../../node_modules/.pnpm/abitype@1.1.0_typescript@5.8.3_zod@3.25.64/node_modules/abitype/dist/esm/human-readable/errors/signature.js\n var InvalidSignatureError, UnknownSignatureError, InvalidStructSignatureError;\n var init_signature = __esm({\n \"../../../node_modules/.pnpm/abitype@1.1.0_typescript@5.8.3_zod@3.25.64/node_modules/abitype/dist/esm/human-readable/errors/signature.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_errors2();\n InvalidSignatureError = class extends BaseError {\n constructor({ signature, type }) {\n super(`Invalid ${type} signature.`, {\n details: signature\n });\n Object.defineProperty(this, \"name\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: \"InvalidSignatureError\"\n });\n }\n };\n UnknownSignatureError = class extends BaseError {\n constructor({ signature }) {\n super(\"Unknown signature.\", {\n details: signature\n });\n Object.defineProperty(this, \"name\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: \"UnknownSignatureError\"\n });\n }\n };\n InvalidStructSignatureError = class extends BaseError {\n constructor({ signature }) {\n super(\"Invalid struct signature.\", {\n details: signature,\n metaMessages: [\"No properties exist.\"]\n });\n Object.defineProperty(this, \"name\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: \"InvalidStructSignatureError\"\n });\n }\n };\n }\n });\n\n // ../../../node_modules/.pnpm/abitype@1.1.0_typescript@5.8.3_zod@3.25.64/node_modules/abitype/dist/esm/human-readable/errors/struct.js\n var CircularReferenceError;\n var init_struct = __esm({\n \"../../../node_modules/.pnpm/abitype@1.1.0_typescript@5.8.3_zod@3.25.64/node_modules/abitype/dist/esm/human-readable/errors/struct.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_errors2();\n CircularReferenceError = class extends BaseError {\n constructor({ type }) {\n super(\"Circular reference detected.\", {\n metaMessages: [`Struct \"${type}\" is a circular reference.`]\n });\n Object.defineProperty(this, \"name\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: \"CircularReferenceError\"\n });\n }\n };\n }\n });\n\n // ../../../node_modules/.pnpm/abitype@1.1.0_typescript@5.8.3_zod@3.25.64/node_modules/abitype/dist/esm/human-readable/errors/splitParameters.js\n var InvalidParenthesisError;\n var init_splitParameters = __esm({\n \"../../../node_modules/.pnpm/abitype@1.1.0_typescript@5.8.3_zod@3.25.64/node_modules/abitype/dist/esm/human-readable/errors/splitParameters.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_errors2();\n InvalidParenthesisError = class extends BaseError {\n constructor({ current, depth }) {\n super(\"Unbalanced parentheses.\", {\n metaMessages: [\n `\"${current.trim()}\" has too many ${depth > 0 ? \"opening\" : \"closing\"} parentheses.`\n ],\n details: `Depth \"${depth}\"`\n });\n Object.defineProperty(this, \"name\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: \"InvalidParenthesisError\"\n });\n }\n };\n }\n });\n\n // ../../../node_modules/.pnpm/abitype@1.1.0_typescript@5.8.3_zod@3.25.64/node_modules/abitype/dist/esm/human-readable/runtime/cache.js\n function getParameterCacheKey(param, type, structs) {\n let structKey = \"\";\n if (structs)\n for (const struct of Object.entries(structs)) {\n if (!struct)\n continue;\n let propertyKey = \"\";\n for (const property of struct[1]) {\n propertyKey += `[${property.type}${property.name ? `:${property.name}` : \"\"}]`;\n }\n structKey += `(${struct[0]}{${propertyKey}})`;\n }\n if (type)\n return `${type}:${param}${structKey}`;\n return param;\n }\n var parameterCache;\n var init_cache = __esm({\n \"../../../node_modules/.pnpm/abitype@1.1.0_typescript@5.8.3_zod@3.25.64/node_modules/abitype/dist/esm/human-readable/runtime/cache.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n parameterCache = /* @__PURE__ */ new Map([\n // Unnamed\n [\"address\", { type: \"address\" }],\n [\"bool\", { type: \"bool\" }],\n [\"bytes\", { type: \"bytes\" }],\n [\"bytes32\", { type: \"bytes32\" }],\n [\"int\", { type: \"int256\" }],\n [\"int256\", { type: \"int256\" }],\n [\"string\", { type: \"string\" }],\n [\"uint\", { type: \"uint256\" }],\n [\"uint8\", { type: \"uint8\" }],\n [\"uint16\", { type: \"uint16\" }],\n [\"uint24\", { type: \"uint24\" }],\n [\"uint32\", { type: \"uint32\" }],\n [\"uint64\", { type: \"uint64\" }],\n [\"uint96\", { type: \"uint96\" }],\n [\"uint112\", { type: \"uint112\" }],\n [\"uint160\", { type: \"uint160\" }],\n [\"uint192\", { type: \"uint192\" }],\n [\"uint256\", { type: \"uint256\" }],\n // Named\n [\"address owner\", { type: \"address\", name: \"owner\" }],\n [\"address to\", { type: \"address\", name: \"to\" }],\n [\"bool approved\", { type: \"bool\", name: \"approved\" }],\n [\"bytes _data\", { type: \"bytes\", name: \"_data\" }],\n [\"bytes data\", { type: \"bytes\", name: \"data\" }],\n [\"bytes signature\", { type: \"bytes\", name: \"signature\" }],\n [\"bytes32 hash\", { type: \"bytes32\", name: \"hash\" }],\n [\"bytes32 r\", { type: \"bytes32\", name: \"r\" }],\n [\"bytes32 root\", { type: \"bytes32\", name: \"root\" }],\n [\"bytes32 s\", { type: \"bytes32\", name: \"s\" }],\n [\"string name\", { type: \"string\", name: \"name\" }],\n [\"string symbol\", { type: \"string\", name: \"symbol\" }],\n [\"string tokenURI\", { type: \"string\", name: \"tokenURI\" }],\n [\"uint tokenId\", { type: \"uint256\", name: \"tokenId\" }],\n [\"uint8 v\", { type: \"uint8\", name: \"v\" }],\n [\"uint256 balance\", { type: \"uint256\", name: \"balance\" }],\n [\"uint256 tokenId\", { type: \"uint256\", name: \"tokenId\" }],\n [\"uint256 value\", { type: \"uint256\", name: \"value\" }],\n // Indexed\n [\n \"event:address indexed from\",\n { type: \"address\", name: \"from\", indexed: true }\n ],\n [\"event:address indexed to\", { type: \"address\", name: \"to\", indexed: true }],\n [\n \"event:uint indexed tokenId\",\n { type: \"uint256\", name: \"tokenId\", indexed: true }\n ],\n [\n \"event:uint256 indexed tokenId\",\n { type: \"uint256\", name: \"tokenId\", indexed: true }\n ]\n ]);\n }\n });\n\n // ../../../node_modules/.pnpm/abitype@1.1.0_typescript@5.8.3_zod@3.25.64/node_modules/abitype/dist/esm/human-readable/runtime/utils.js\n function parseSignature(signature, structs = {}) {\n if (isFunctionSignature(signature))\n return parseFunctionSignature(signature, structs);\n if (isEventSignature(signature))\n return parseEventSignature(signature, structs);\n if (isErrorSignature(signature))\n return parseErrorSignature(signature, structs);\n if (isConstructorSignature(signature))\n return parseConstructorSignature(signature, structs);\n if (isFallbackSignature(signature))\n return parseFallbackSignature(signature);\n if (isReceiveSignature(signature))\n return {\n type: \"receive\",\n stateMutability: \"payable\"\n };\n throw new UnknownSignatureError({ signature });\n }\n function parseFunctionSignature(signature, structs = {}) {\n const match = execFunctionSignature(signature);\n if (!match)\n throw new InvalidSignatureError({ signature, type: \"function\" });\n const inputParams = splitParameters(match.parameters);\n const inputs = [];\n const inputLength = inputParams.length;\n for (let i3 = 0; i3 < inputLength; i3++) {\n inputs.push(parseAbiParameter(inputParams[i3], {\n modifiers: functionModifiers,\n structs,\n type: \"function\"\n }));\n }\n const outputs = [];\n if (match.returns) {\n const outputParams = splitParameters(match.returns);\n const outputLength = outputParams.length;\n for (let i3 = 0; i3 < outputLength; i3++) {\n outputs.push(parseAbiParameter(outputParams[i3], {\n modifiers: functionModifiers,\n structs,\n type: \"function\"\n }));\n }\n }\n return {\n name: match.name,\n type: \"function\",\n stateMutability: match.stateMutability ?? \"nonpayable\",\n inputs,\n outputs\n };\n }\n function parseEventSignature(signature, structs = {}) {\n const match = execEventSignature(signature);\n if (!match)\n throw new InvalidSignatureError({ signature, type: \"event\" });\n const params = splitParameters(match.parameters);\n const abiParameters = [];\n const length2 = params.length;\n for (let i3 = 0; i3 < length2; i3++)\n abiParameters.push(parseAbiParameter(params[i3], {\n modifiers: eventModifiers,\n structs,\n type: \"event\"\n }));\n return { name: match.name, type: \"event\", inputs: abiParameters };\n }\n function parseErrorSignature(signature, structs = {}) {\n const match = execErrorSignature(signature);\n if (!match)\n throw new InvalidSignatureError({ signature, type: \"error\" });\n const params = splitParameters(match.parameters);\n const abiParameters = [];\n const length2 = params.length;\n for (let i3 = 0; i3 < length2; i3++)\n abiParameters.push(parseAbiParameter(params[i3], { structs, type: \"error\" }));\n return { name: match.name, type: \"error\", inputs: abiParameters };\n }\n function parseConstructorSignature(signature, structs = {}) {\n const match = execConstructorSignature(signature);\n if (!match)\n throw new InvalidSignatureError({ signature, type: \"constructor\" });\n const params = splitParameters(match.parameters);\n const abiParameters = [];\n const length2 = params.length;\n for (let i3 = 0; i3 < length2; i3++)\n abiParameters.push(parseAbiParameter(params[i3], { structs, type: \"constructor\" }));\n return {\n type: \"constructor\",\n stateMutability: match.stateMutability ?? \"nonpayable\",\n inputs: abiParameters\n };\n }\n function parseFallbackSignature(signature) {\n const match = execFallbackSignature(signature);\n if (!match)\n throw new InvalidSignatureError({ signature, type: \"fallback\" });\n return {\n type: \"fallback\",\n stateMutability: match.stateMutability ?? \"nonpayable\"\n };\n }\n function parseAbiParameter(param, options) {\n const parameterCacheKey = getParameterCacheKey(param, options?.type, options?.structs);\n if (parameterCache.has(parameterCacheKey))\n return parameterCache.get(parameterCacheKey);\n const isTuple = isTupleRegex.test(param);\n const match = execTyped(isTuple ? abiParameterWithTupleRegex : abiParameterWithoutTupleRegex, param);\n if (!match)\n throw new InvalidParameterError({ param });\n if (match.name && isSolidityKeyword(match.name))\n throw new SolidityProtectedKeywordError({ param, name: match.name });\n const name = match.name ? { name: match.name } : {};\n const indexed = match.modifier === \"indexed\" ? { indexed: true } : {};\n const structs = options?.structs ?? {};\n let type;\n let components = {};\n if (isTuple) {\n type = \"tuple\";\n const params = splitParameters(match.type);\n const components_ = [];\n const length2 = params.length;\n for (let i3 = 0; i3 < length2; i3++) {\n components_.push(parseAbiParameter(params[i3], { structs }));\n }\n components = { components: components_ };\n } else if (match.type in structs) {\n type = \"tuple\";\n components = { components: structs[match.type] };\n } else if (dynamicIntegerRegex.test(match.type)) {\n type = `${match.type}256`;\n } else if (match.type === \"address payable\") {\n type = \"address\";\n } else {\n type = match.type;\n if (!(options?.type === \"struct\") && !isSolidityType(type))\n throw new UnknownSolidityTypeError({ type });\n }\n if (match.modifier) {\n if (!options?.modifiers?.has?.(match.modifier))\n throw new InvalidModifierError({\n param,\n type: options?.type,\n modifier: match.modifier\n });\n if (functionModifiers.has(match.modifier) && !isValidDataLocation(type, !!match.array))\n throw new InvalidFunctionModifierError({\n param,\n type: options?.type,\n modifier: match.modifier\n });\n }\n const abiParameter = {\n type: `${type}${match.array ?? \"\"}`,\n ...name,\n ...indexed,\n ...components\n };\n parameterCache.set(parameterCacheKey, abiParameter);\n return abiParameter;\n }\n function splitParameters(params, result = [], current = \"\", depth = 0) {\n const length2 = params.trim().length;\n for (let i3 = 0; i3 < length2; i3++) {\n const char = params[i3];\n const tail = params.slice(i3 + 1);\n switch (char) {\n case \",\":\n return depth === 0 ? splitParameters(tail, [...result, current.trim()]) : splitParameters(tail, result, `${current}${char}`, depth);\n case \"(\":\n return splitParameters(tail, result, `${current}${char}`, depth + 1);\n case \")\":\n return splitParameters(tail, result, `${current}${char}`, depth - 1);\n default:\n return splitParameters(tail, result, `${current}${char}`, depth);\n }\n }\n if (current === \"\")\n return result;\n if (depth !== 0)\n throw new InvalidParenthesisError({ current, depth });\n result.push(current.trim());\n return result;\n }\n function isSolidityType(type) {\n return type === \"address\" || type === \"bool\" || type === \"function\" || type === \"string\" || bytesRegex.test(type) || integerRegex.test(type);\n }\n function isSolidityKeyword(name) {\n return name === \"address\" || name === \"bool\" || name === \"function\" || name === \"string\" || name === \"tuple\" || bytesRegex.test(name) || integerRegex.test(name) || protectedKeywordsRegex.test(name);\n }\n function isValidDataLocation(type, isArray) {\n return isArray || type === \"bytes\" || type === \"string\" || type === \"tuple\";\n }\n var abiParameterWithoutTupleRegex, abiParameterWithTupleRegex, dynamicIntegerRegex, protectedKeywordsRegex;\n var init_utils2 = __esm({\n \"../../../node_modules/.pnpm/abitype@1.1.0_typescript@5.8.3_zod@3.25.64/node_modules/abitype/dist/esm/human-readable/runtime/utils.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_regex();\n init_abiItem();\n init_abiParameter();\n init_signature();\n init_splitParameters();\n init_cache();\n init_signatures();\n abiParameterWithoutTupleRegex = /^(?[a-zA-Z$_][a-zA-Z0-9$_]*(?:\\spayable)?)(?(?:\\[\\d*?\\])+?)?(?:\\s(?calldata|indexed|memory|storage{1}))?(?:\\s(?[a-zA-Z$_][a-zA-Z0-9$_]*))?$/;\n abiParameterWithTupleRegex = /^\\((?.+?)\\)(?(?:\\[\\d*?\\])+?)?(?:\\s(?calldata|indexed|memory|storage{1}))?(?:\\s(?[a-zA-Z$_][a-zA-Z0-9$_]*))?$/;\n dynamicIntegerRegex = /^u?int$/;\n protectedKeywordsRegex = /^(?:after|alias|anonymous|apply|auto|byte|calldata|case|catch|constant|copyof|default|defined|error|event|external|false|final|function|immutable|implements|in|indexed|inline|internal|let|mapping|match|memory|mutable|null|of|override|partial|private|promise|public|pure|reference|relocatable|return|returns|sizeof|static|storage|struct|super|supports|switch|this|true|try|typedef|typeof|var|view|virtual)$/;\n }\n });\n\n // ../../../node_modules/.pnpm/abitype@1.1.0_typescript@5.8.3_zod@3.25.64/node_modules/abitype/dist/esm/human-readable/runtime/structs.js\n function parseStructs(signatures) {\n const shallowStructs = {};\n const signaturesLength = signatures.length;\n for (let i3 = 0; i3 < signaturesLength; i3++) {\n const signature = signatures[i3];\n if (!isStructSignature(signature))\n continue;\n const match = execStructSignature(signature);\n if (!match)\n throw new InvalidSignatureError({ signature, type: \"struct\" });\n const properties = match.properties.split(\";\");\n const components = [];\n const propertiesLength = properties.length;\n for (let k4 = 0; k4 < propertiesLength; k4++) {\n const property = properties[k4];\n const trimmed = property.trim();\n if (!trimmed)\n continue;\n const abiParameter = parseAbiParameter(trimmed, {\n type: \"struct\"\n });\n components.push(abiParameter);\n }\n if (!components.length)\n throw new InvalidStructSignatureError({ signature });\n shallowStructs[match.name] = components;\n }\n const resolvedStructs = {};\n const entries = Object.entries(shallowStructs);\n const entriesLength = entries.length;\n for (let i3 = 0; i3 < entriesLength; i3++) {\n const [name, parameters] = entries[i3];\n resolvedStructs[name] = resolveStructs(parameters, shallowStructs);\n }\n return resolvedStructs;\n }\n function resolveStructs(abiParameters, structs, ancestors = /* @__PURE__ */ new Set()) {\n const components = [];\n const length2 = abiParameters.length;\n for (let i3 = 0; i3 < length2; i3++) {\n const abiParameter = abiParameters[i3];\n const isTuple = isTupleRegex.test(abiParameter.type);\n if (isTuple)\n components.push(abiParameter);\n else {\n const match = execTyped(typeWithoutTupleRegex, abiParameter.type);\n if (!match?.type)\n throw new InvalidAbiTypeParameterError({ abiParameter });\n const { array: array2, type } = match;\n if (type in structs) {\n if (ancestors.has(type))\n throw new CircularReferenceError({ type });\n components.push({\n ...abiParameter,\n type: `tuple${array2 ?? \"\"}`,\n components: resolveStructs(structs[type] ?? [], structs, /* @__PURE__ */ new Set([...ancestors, type]))\n });\n } else {\n if (isSolidityType(type))\n components.push(abiParameter);\n else\n throw new UnknownTypeError({ type });\n }\n }\n }\n return components;\n }\n var typeWithoutTupleRegex;\n var init_structs = __esm({\n \"../../../node_modules/.pnpm/abitype@1.1.0_typescript@5.8.3_zod@3.25.64/node_modules/abitype/dist/esm/human-readable/runtime/structs.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_regex();\n init_abiItem();\n init_abiParameter();\n init_signature();\n init_struct();\n init_signatures();\n init_utils2();\n typeWithoutTupleRegex = /^(?[a-zA-Z$_][a-zA-Z0-9$_]*)(?(?:\\[\\d*?\\])+?)?$/;\n }\n });\n\n // ../../../node_modules/.pnpm/abitype@1.1.0_typescript@5.8.3_zod@3.25.64/node_modules/abitype/dist/esm/human-readable/parseAbi.js\n function parseAbi(signatures) {\n const structs = parseStructs(signatures);\n const abi2 = [];\n const length2 = signatures.length;\n for (let i3 = 0; i3 < length2; i3++) {\n const signature = signatures[i3];\n if (isStructSignature(signature))\n continue;\n abi2.push(parseSignature(signature, structs));\n }\n return abi2;\n }\n var init_parseAbi = __esm({\n \"../../../node_modules/.pnpm/abitype@1.1.0_typescript@5.8.3_zod@3.25.64/node_modules/abitype/dist/esm/human-readable/parseAbi.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_signatures();\n init_structs();\n init_utils2();\n }\n });\n\n // ../../../node_modules/.pnpm/abitype@1.1.0_typescript@5.8.3_zod@3.25.64/node_modules/abitype/dist/esm/human-readable/parseAbiItem.js\n function parseAbiItem(signature) {\n let abiItem;\n if (typeof signature === \"string\")\n abiItem = parseSignature(signature);\n else {\n const structs = parseStructs(signature);\n const length2 = signature.length;\n for (let i3 = 0; i3 < length2; i3++) {\n const signature_ = signature[i3];\n if (isStructSignature(signature_))\n continue;\n abiItem = parseSignature(signature_, structs);\n break;\n }\n }\n if (!abiItem)\n throw new InvalidAbiItemError({ signature });\n return abiItem;\n }\n var init_parseAbiItem = __esm({\n \"../../../node_modules/.pnpm/abitype@1.1.0_typescript@5.8.3_zod@3.25.64/node_modules/abitype/dist/esm/human-readable/parseAbiItem.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_abiItem();\n init_signatures();\n init_structs();\n init_utils2();\n }\n });\n\n // ../../../node_modules/.pnpm/abitype@1.1.0_typescript@5.8.3_zod@3.25.64/node_modules/abitype/dist/esm/human-readable/parseAbiParameters.js\n function parseAbiParameters(params) {\n const abiParameters = [];\n if (typeof params === \"string\") {\n const parameters = splitParameters(params);\n const length2 = parameters.length;\n for (let i3 = 0; i3 < length2; i3++) {\n abiParameters.push(parseAbiParameter(parameters[i3], { modifiers }));\n }\n } else {\n const structs = parseStructs(params);\n const length2 = params.length;\n for (let i3 = 0; i3 < length2; i3++) {\n const signature = params[i3];\n if (isStructSignature(signature))\n continue;\n const parameters = splitParameters(signature);\n const length3 = parameters.length;\n for (let k4 = 0; k4 < length3; k4++) {\n abiParameters.push(parseAbiParameter(parameters[k4], { modifiers, structs }));\n }\n }\n }\n if (abiParameters.length === 0)\n throw new InvalidAbiParametersError({ params });\n return abiParameters;\n }\n var init_parseAbiParameters = __esm({\n \"../../../node_modules/.pnpm/abitype@1.1.0_typescript@5.8.3_zod@3.25.64/node_modules/abitype/dist/esm/human-readable/parseAbiParameters.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_abiParameter();\n init_signatures();\n init_structs();\n init_utils2();\n init_utils2();\n }\n });\n\n // ../../../node_modules/.pnpm/abitype@1.1.0_typescript@5.8.3_zod@3.25.64/node_modules/abitype/dist/esm/exports/index.js\n var init_exports = __esm({\n \"../../../node_modules/.pnpm/abitype@1.1.0_typescript@5.8.3_zod@3.25.64/node_modules/abitype/dist/esm/exports/index.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_formatAbiItem();\n init_formatAbiParameters();\n init_parseAbi();\n init_parseAbiItem();\n init_parseAbiParameters();\n }\n });\n\n // ../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/utils/getAction.js\n function getAction(client, actionFn, name) {\n const action_implicit = client[actionFn.name];\n if (typeof action_implicit === \"function\")\n return action_implicit;\n const action_explicit = client[name];\n if (typeof action_explicit === \"function\")\n return action_explicit;\n return (params) => actionFn(client, params);\n }\n var init_getAction = __esm({\n \"../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/utils/getAction.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n }\n });\n\n // ../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/utils/abi/formatAbiItem.js\n function formatAbiItem2(abiItem, { includeName = false } = {}) {\n if (abiItem.type !== \"function\" && abiItem.type !== \"event\" && abiItem.type !== \"error\")\n throw new InvalidDefinitionTypeError(abiItem.type);\n return `${abiItem.name}(${formatAbiParams(abiItem.inputs, { includeName })})`;\n }\n function formatAbiParams(params, { includeName = false } = {}) {\n if (!params)\n return \"\";\n return params.map((param) => formatAbiParam(param, { includeName })).join(includeName ? \", \" : \",\");\n }\n function formatAbiParam(param, { includeName }) {\n if (param.type.startsWith(\"tuple\")) {\n return `(${formatAbiParams(param.components, { includeName })})${param.type.slice(\"tuple\".length)}`;\n }\n return param.type + (includeName && param.name ? ` ${param.name}` : \"\");\n }\n var init_formatAbiItem2 = __esm({\n \"../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/utils/abi/formatAbiItem.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_abi();\n }\n });\n\n // ../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/utils/data/isHex.js\n function isHex(value, { strict = true } = {}) {\n if (!value)\n return false;\n if (typeof value !== \"string\")\n return false;\n return strict ? /^0x[0-9a-fA-F]*$/.test(value) : value.startsWith(\"0x\");\n }\n var init_isHex = __esm({\n \"../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/utils/data/isHex.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n }\n });\n\n // ../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/utils/data/size.js\n function size(value) {\n if (isHex(value, { strict: false }))\n return Math.ceil((value.length - 2) / 2);\n return value.length;\n }\n var init_size = __esm({\n \"../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/utils/data/size.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_isHex();\n }\n });\n\n // ../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/errors/version.js\n var version3;\n var init_version3 = __esm({\n \"../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/errors/version.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n version3 = \"2.38.4\";\n }\n });\n\n // ../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/errors/base.js\n function walk(err, fn) {\n if (fn?.(err))\n return err;\n if (err && typeof err === \"object\" && \"cause\" in err && err.cause !== void 0)\n return walk(err.cause, fn);\n return fn ? null : err;\n }\n var errorConfig, BaseError2;\n var init_base = __esm({\n \"../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/errors/base.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_version3();\n errorConfig = {\n getDocsUrl: ({ docsBaseUrl, docsPath: docsPath8 = \"\", docsSlug }) => docsPath8 ? `${docsBaseUrl ?? \"https://viem.sh\"}${docsPath8}${docsSlug ? `#${docsSlug}` : \"\"}` : void 0,\n version: `viem@${version3}`\n };\n BaseError2 = class _BaseError extends Error {\n constructor(shortMessage, args = {}) {\n const details = (() => {\n if (args.cause instanceof _BaseError)\n return args.cause.details;\n if (args.cause?.message)\n return args.cause.message;\n return args.details;\n })();\n const docsPath8 = (() => {\n if (args.cause instanceof _BaseError)\n return args.cause.docsPath || args.docsPath;\n return args.docsPath;\n })();\n const docsUrl = errorConfig.getDocsUrl?.({ ...args, docsPath: docsPath8 });\n const message = [\n shortMessage || \"An error occurred.\",\n \"\",\n ...args.metaMessages ? [...args.metaMessages, \"\"] : [],\n ...docsUrl ? [`Docs: ${docsUrl}`] : [],\n ...details ? [`Details: ${details}`] : [],\n ...errorConfig.version ? [`Version: ${errorConfig.version}`] : []\n ].join(\"\\n\");\n super(message, args.cause ? { cause: args.cause } : void 0);\n Object.defineProperty(this, \"details\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: void 0\n });\n Object.defineProperty(this, \"docsPath\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: void 0\n });\n Object.defineProperty(this, \"metaMessages\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: void 0\n });\n Object.defineProperty(this, \"shortMessage\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: void 0\n });\n Object.defineProperty(this, \"version\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: void 0\n });\n Object.defineProperty(this, \"name\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: \"BaseError\"\n });\n this.details = details;\n this.docsPath = docsPath8;\n this.metaMessages = args.metaMessages;\n this.name = args.name ?? this.name;\n this.shortMessage = shortMessage;\n this.version = version3;\n }\n walk(fn) {\n return walk(this, fn);\n }\n };\n }\n });\n\n // ../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/errors/abi.js\n var AbiConstructorNotFoundError, AbiConstructorParamsNotFoundError, AbiDecodingDataSizeTooSmallError, AbiDecodingZeroDataError, AbiEncodingArrayLengthMismatchError, AbiEncodingBytesSizeMismatchError, AbiEncodingLengthMismatchError, AbiErrorInputsNotFoundError, AbiErrorNotFoundError, AbiErrorSignatureNotFoundError, AbiEventSignatureEmptyTopicsError, AbiEventSignatureNotFoundError, AbiEventNotFoundError, AbiFunctionNotFoundError, AbiFunctionOutputsNotFoundError, AbiFunctionSignatureNotFoundError, AbiItemAmbiguityError, BytesSizeMismatchError, DecodeLogDataMismatch, DecodeLogTopicsMismatch, InvalidAbiEncodingTypeError, InvalidAbiDecodingTypeError, InvalidArrayError, InvalidDefinitionTypeError, UnsupportedPackedAbiType;\n var init_abi = __esm({\n \"../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/errors/abi.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_formatAbiItem2();\n init_size();\n init_base();\n AbiConstructorNotFoundError = class extends BaseError2 {\n constructor({ docsPath: docsPath8 }) {\n super([\n \"A constructor was not found on the ABI.\",\n \"Make sure you are using the correct ABI and that the constructor exists on it.\"\n ].join(\"\\n\"), {\n docsPath: docsPath8,\n name: \"AbiConstructorNotFoundError\"\n });\n }\n };\n AbiConstructorParamsNotFoundError = class extends BaseError2 {\n constructor({ docsPath: docsPath8 }) {\n super([\n \"Constructor arguments were provided (`args`), but a constructor parameters (`inputs`) were not found on the ABI.\",\n \"Make sure you are using the correct ABI, and that the `inputs` attribute on the constructor exists.\"\n ].join(\"\\n\"), {\n docsPath: docsPath8,\n name: \"AbiConstructorParamsNotFoundError\"\n });\n }\n };\n AbiDecodingDataSizeTooSmallError = class extends BaseError2 {\n constructor({ data, params, size: size6 }) {\n super([`Data size of ${size6} bytes is too small for given parameters.`].join(\"\\n\"), {\n metaMessages: [\n `Params: (${formatAbiParams(params, { includeName: true })})`,\n `Data: ${data} (${size6} bytes)`\n ],\n name: \"AbiDecodingDataSizeTooSmallError\"\n });\n Object.defineProperty(this, \"data\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: void 0\n });\n Object.defineProperty(this, \"params\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: void 0\n });\n Object.defineProperty(this, \"size\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: void 0\n });\n this.data = data;\n this.params = params;\n this.size = size6;\n }\n };\n AbiDecodingZeroDataError = class extends BaseError2 {\n constructor() {\n super('Cannot decode zero data (\"0x\") with ABI parameters.', {\n name: \"AbiDecodingZeroDataError\"\n });\n }\n };\n AbiEncodingArrayLengthMismatchError = class extends BaseError2 {\n constructor({ expectedLength, givenLength, type }) {\n super([\n `ABI encoding array length mismatch for type ${type}.`,\n `Expected length: ${expectedLength}`,\n `Given length: ${givenLength}`\n ].join(\"\\n\"), { name: \"AbiEncodingArrayLengthMismatchError\" });\n }\n };\n AbiEncodingBytesSizeMismatchError = class extends BaseError2 {\n constructor({ expectedSize, value }) {\n super(`Size of bytes \"${value}\" (bytes${size(value)}) does not match expected size (bytes${expectedSize}).`, { name: \"AbiEncodingBytesSizeMismatchError\" });\n }\n };\n AbiEncodingLengthMismatchError = class extends BaseError2 {\n constructor({ expectedLength, givenLength }) {\n super([\n \"ABI encoding params/values length mismatch.\",\n `Expected length (params): ${expectedLength}`,\n `Given length (values): ${givenLength}`\n ].join(\"\\n\"), { name: \"AbiEncodingLengthMismatchError\" });\n }\n };\n AbiErrorInputsNotFoundError = class extends BaseError2 {\n constructor(errorName, { docsPath: docsPath8 }) {\n super([\n `Arguments (\\`args\\`) were provided to \"${errorName}\", but \"${errorName}\" on the ABI does not contain any parameters (\\`inputs\\`).`,\n \"Cannot encode error result without knowing what the parameter types are.\",\n \"Make sure you are using the correct ABI and that the inputs exist on it.\"\n ].join(\"\\n\"), {\n docsPath: docsPath8,\n name: \"AbiErrorInputsNotFoundError\"\n });\n }\n };\n AbiErrorNotFoundError = class extends BaseError2 {\n constructor(errorName, { docsPath: docsPath8 } = {}) {\n super([\n `Error ${errorName ? `\"${errorName}\" ` : \"\"}not found on ABI.`,\n \"Make sure you are using the correct ABI and that the error exists on it.\"\n ].join(\"\\n\"), {\n docsPath: docsPath8,\n name: \"AbiErrorNotFoundError\"\n });\n }\n };\n AbiErrorSignatureNotFoundError = class extends BaseError2 {\n constructor(signature, { docsPath: docsPath8 }) {\n super([\n `Encoded error signature \"${signature}\" not found on ABI.`,\n \"Make sure you are using the correct ABI and that the error exists on it.\",\n `You can look up the decoded signature here: https://openchain.xyz/signatures?query=${signature}.`\n ].join(\"\\n\"), {\n docsPath: docsPath8,\n name: \"AbiErrorSignatureNotFoundError\"\n });\n Object.defineProperty(this, \"signature\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: void 0\n });\n this.signature = signature;\n }\n };\n AbiEventSignatureEmptyTopicsError = class extends BaseError2 {\n constructor({ docsPath: docsPath8 }) {\n super(\"Cannot extract event signature from empty topics.\", {\n docsPath: docsPath8,\n name: \"AbiEventSignatureEmptyTopicsError\"\n });\n }\n };\n AbiEventSignatureNotFoundError = class extends BaseError2 {\n constructor(signature, { docsPath: docsPath8 }) {\n super([\n `Encoded event signature \"${signature}\" not found on ABI.`,\n \"Make sure you are using the correct ABI and that the event exists on it.\",\n `You can look up the signature here: https://openchain.xyz/signatures?query=${signature}.`\n ].join(\"\\n\"), {\n docsPath: docsPath8,\n name: \"AbiEventSignatureNotFoundError\"\n });\n }\n };\n AbiEventNotFoundError = class extends BaseError2 {\n constructor(eventName, { docsPath: docsPath8 } = {}) {\n super([\n `Event ${eventName ? `\"${eventName}\" ` : \"\"}not found on ABI.`,\n \"Make sure you are using the correct ABI and that the event exists on it.\"\n ].join(\"\\n\"), {\n docsPath: docsPath8,\n name: \"AbiEventNotFoundError\"\n });\n }\n };\n AbiFunctionNotFoundError = class extends BaseError2 {\n constructor(functionName, { docsPath: docsPath8 } = {}) {\n super([\n `Function ${functionName ? `\"${functionName}\" ` : \"\"}not found on ABI.`,\n \"Make sure you are using the correct ABI and that the function exists on it.\"\n ].join(\"\\n\"), {\n docsPath: docsPath8,\n name: \"AbiFunctionNotFoundError\"\n });\n }\n };\n AbiFunctionOutputsNotFoundError = class extends BaseError2 {\n constructor(functionName, { docsPath: docsPath8 }) {\n super([\n `Function \"${functionName}\" does not contain any \\`outputs\\` on ABI.`,\n \"Cannot decode function result without knowing what the parameter types are.\",\n \"Make sure you are using the correct ABI and that the function exists on it.\"\n ].join(\"\\n\"), {\n docsPath: docsPath8,\n name: \"AbiFunctionOutputsNotFoundError\"\n });\n }\n };\n AbiFunctionSignatureNotFoundError = class extends BaseError2 {\n constructor(signature, { docsPath: docsPath8 }) {\n super([\n `Encoded function signature \"${signature}\" not found on ABI.`,\n \"Make sure you are using the correct ABI and that the function exists on it.\",\n `You can look up the signature here: https://openchain.xyz/signatures?query=${signature}.`\n ].join(\"\\n\"), {\n docsPath: docsPath8,\n name: \"AbiFunctionSignatureNotFoundError\"\n });\n }\n };\n AbiItemAmbiguityError = class extends BaseError2 {\n constructor(x4, y6) {\n super(\"Found ambiguous types in overloaded ABI items.\", {\n metaMessages: [\n `\\`${x4.type}\\` in \\`${formatAbiItem2(x4.abiItem)}\\`, and`,\n `\\`${y6.type}\\` in \\`${formatAbiItem2(y6.abiItem)}\\``,\n \"\",\n \"These types encode differently and cannot be distinguished at runtime.\",\n \"Remove one of the ambiguous items in the ABI.\"\n ],\n name: \"AbiItemAmbiguityError\"\n });\n }\n };\n BytesSizeMismatchError = class extends BaseError2 {\n constructor({ expectedSize, givenSize }) {\n super(`Expected bytes${expectedSize}, got bytes${givenSize}.`, {\n name: \"BytesSizeMismatchError\"\n });\n }\n };\n DecodeLogDataMismatch = class extends BaseError2 {\n constructor({ abiItem, data, params, size: size6 }) {\n super([\n `Data size of ${size6} bytes is too small for non-indexed event parameters.`\n ].join(\"\\n\"), {\n metaMessages: [\n `Params: (${formatAbiParams(params, { includeName: true })})`,\n `Data: ${data} (${size6} bytes)`\n ],\n name: \"DecodeLogDataMismatch\"\n });\n Object.defineProperty(this, \"abiItem\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: void 0\n });\n Object.defineProperty(this, \"data\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: void 0\n });\n Object.defineProperty(this, \"params\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: void 0\n });\n Object.defineProperty(this, \"size\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: void 0\n });\n this.abiItem = abiItem;\n this.data = data;\n this.params = params;\n this.size = size6;\n }\n };\n DecodeLogTopicsMismatch = class extends BaseError2 {\n constructor({ abiItem, param }) {\n super([\n `Expected a topic for indexed event parameter${param.name ? ` \"${param.name}\"` : \"\"} on event \"${formatAbiItem2(abiItem, { includeName: true })}\".`\n ].join(\"\\n\"), { name: \"DecodeLogTopicsMismatch\" });\n Object.defineProperty(this, \"abiItem\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: void 0\n });\n this.abiItem = abiItem;\n }\n };\n InvalidAbiEncodingTypeError = class extends BaseError2 {\n constructor(type, { docsPath: docsPath8 }) {\n super([\n `Type \"${type}\" is not a valid encoding type.`,\n \"Please provide a valid ABI type.\"\n ].join(\"\\n\"), { docsPath: docsPath8, name: \"InvalidAbiEncodingType\" });\n }\n };\n InvalidAbiDecodingTypeError = class extends BaseError2 {\n constructor(type, { docsPath: docsPath8 }) {\n super([\n `Type \"${type}\" is not a valid decoding type.`,\n \"Please provide a valid ABI type.\"\n ].join(\"\\n\"), { docsPath: docsPath8, name: \"InvalidAbiDecodingType\" });\n }\n };\n InvalidArrayError = class extends BaseError2 {\n constructor(value) {\n super([`Value \"${value}\" is not a valid array.`].join(\"\\n\"), {\n name: \"InvalidArrayError\"\n });\n }\n };\n InvalidDefinitionTypeError = class extends BaseError2 {\n constructor(type) {\n super([\n `\"${type}\" is not a valid definition type.`,\n 'Valid types: \"function\", \"event\", \"error\"'\n ].join(\"\\n\"), { name: \"InvalidDefinitionTypeError\" });\n }\n };\n UnsupportedPackedAbiType = class extends BaseError2 {\n constructor(type) {\n super(`Type \"${type}\" is not supported for packed encoding.`, {\n name: \"UnsupportedPackedAbiType\"\n });\n }\n };\n }\n });\n\n // ../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/errors/log.js\n var FilterTypeNotSupportedError;\n var init_log = __esm({\n \"../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/errors/log.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_base();\n FilterTypeNotSupportedError = class extends BaseError2 {\n constructor(type) {\n super(`Filter type \"${type}\" is not supported.`, {\n name: \"FilterTypeNotSupportedError\"\n });\n }\n };\n }\n });\n\n // ../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/errors/data.js\n var SliceOffsetOutOfBoundsError, SizeExceedsPaddingSizeError, InvalidBytesLengthError;\n var init_data = __esm({\n \"../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/errors/data.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_base();\n SliceOffsetOutOfBoundsError = class extends BaseError2 {\n constructor({ offset, position, size: size6 }) {\n super(`Slice ${position === \"start\" ? \"starting\" : \"ending\"} at offset \"${offset}\" is out-of-bounds (size: ${size6}).`, { name: \"SliceOffsetOutOfBoundsError\" });\n }\n };\n SizeExceedsPaddingSizeError = class extends BaseError2 {\n constructor({ size: size6, targetSize, type }) {\n super(`${type.charAt(0).toUpperCase()}${type.slice(1).toLowerCase()} size (${size6}) exceeds padding size (${targetSize}).`, { name: \"SizeExceedsPaddingSizeError\" });\n }\n };\n InvalidBytesLengthError = class extends BaseError2 {\n constructor({ size: size6, targetSize, type }) {\n super(`${type.charAt(0).toUpperCase()}${type.slice(1).toLowerCase()} is expected to be ${targetSize} ${type} long, but is ${size6} ${type} long.`, { name: \"InvalidBytesLengthError\" });\n }\n };\n }\n });\n\n // ../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/utils/data/pad.js\n function pad(hexOrBytes, { dir, size: size6 = 32 } = {}) {\n if (typeof hexOrBytes === \"string\")\n return padHex(hexOrBytes, { dir, size: size6 });\n return padBytes(hexOrBytes, { dir, size: size6 });\n }\n function padHex(hex_, { dir, size: size6 = 32 } = {}) {\n if (size6 === null)\n return hex_;\n const hex = hex_.replace(\"0x\", \"\");\n if (hex.length > size6 * 2)\n throw new SizeExceedsPaddingSizeError({\n size: Math.ceil(hex.length / 2),\n targetSize: size6,\n type: \"hex\"\n });\n return `0x${hex[dir === \"right\" ? \"padEnd\" : \"padStart\"](size6 * 2, \"0\")}`;\n }\n function padBytes(bytes, { dir, size: size6 = 32 } = {}) {\n if (size6 === null)\n return bytes;\n if (bytes.length > size6)\n throw new SizeExceedsPaddingSizeError({\n size: bytes.length,\n targetSize: size6,\n type: \"bytes\"\n });\n const paddedBytes = new Uint8Array(size6);\n for (let i3 = 0; i3 < size6; i3++) {\n const padEnd = dir === \"right\";\n paddedBytes[padEnd ? i3 : size6 - i3 - 1] = bytes[padEnd ? i3 : bytes.length - i3 - 1];\n }\n return paddedBytes;\n }\n var init_pad = __esm({\n \"../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/utils/data/pad.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_data();\n }\n });\n\n // ../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/errors/encoding.js\n var IntegerOutOfRangeError, InvalidBytesBooleanError, InvalidHexBooleanError, SizeOverflowError;\n var init_encoding = __esm({\n \"../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/errors/encoding.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_base();\n IntegerOutOfRangeError = class extends BaseError2 {\n constructor({ max, min, signed, size: size6, value }) {\n super(`Number \"${value}\" is not in safe ${size6 ? `${size6 * 8}-bit ${signed ? \"signed\" : \"unsigned\"} ` : \"\"}integer range ${max ? `(${min} to ${max})` : `(above ${min})`}`, { name: \"IntegerOutOfRangeError\" });\n }\n };\n InvalidBytesBooleanError = class extends BaseError2 {\n constructor(bytes) {\n super(`Bytes value \"${bytes}\" is not a valid boolean. The bytes array must contain a single byte of either a 0 or 1 value.`, {\n name: \"InvalidBytesBooleanError\"\n });\n }\n };\n InvalidHexBooleanError = class extends BaseError2 {\n constructor(hex) {\n super(`Hex value \"${hex}\" is not a valid boolean. The hex value must be \"0x0\" (false) or \"0x1\" (true).`, { name: \"InvalidHexBooleanError\" });\n }\n };\n SizeOverflowError = class extends BaseError2 {\n constructor({ givenSize, maxSize }) {\n super(`Size cannot exceed ${maxSize} bytes. Given size: ${givenSize} bytes.`, { name: \"SizeOverflowError\" });\n }\n };\n }\n });\n\n // ../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/utils/data/trim.js\n function trim(hexOrBytes, { dir = \"left\" } = {}) {\n let data = typeof hexOrBytes === \"string\" ? hexOrBytes.replace(\"0x\", \"\") : hexOrBytes;\n let sliceLength = 0;\n for (let i3 = 0; i3 < data.length - 1; i3++) {\n if (data[dir === \"left\" ? i3 : data.length - i3 - 1].toString() === \"0\")\n sliceLength++;\n else\n break;\n }\n data = dir === \"left\" ? data.slice(sliceLength) : data.slice(0, data.length - sliceLength);\n if (typeof hexOrBytes === \"string\") {\n if (data.length === 1 && dir === \"right\")\n data = `${data}0`;\n return `0x${data.length % 2 === 1 ? `0${data}` : data}`;\n }\n return data;\n }\n var init_trim = __esm({\n \"../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/utils/data/trim.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n }\n });\n\n // ../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/utils/encoding/fromHex.js\n function assertSize(hexOrBytes, { size: size6 }) {\n if (size(hexOrBytes) > size6)\n throw new SizeOverflowError({\n givenSize: size(hexOrBytes),\n maxSize: size6\n });\n }\n function fromHex(hex, toOrOpts) {\n const opts = typeof toOrOpts === \"string\" ? { to: toOrOpts } : toOrOpts;\n const to = opts.to;\n if (to === \"number\")\n return hexToNumber(hex, opts);\n if (to === \"bigint\")\n return hexToBigInt(hex, opts);\n if (to === \"string\")\n return hexToString(hex, opts);\n if (to === \"boolean\")\n return hexToBool(hex, opts);\n return hexToBytes(hex, opts);\n }\n function hexToBigInt(hex, opts = {}) {\n const { signed } = opts;\n if (opts.size)\n assertSize(hex, { size: opts.size });\n const value = BigInt(hex);\n if (!signed)\n return value;\n const size6 = (hex.length - 2) / 2;\n const max = (1n << BigInt(size6) * 8n - 1n) - 1n;\n if (value <= max)\n return value;\n return value - BigInt(`0x${\"f\".padStart(size6 * 2, \"f\")}`) - 1n;\n }\n function hexToBool(hex_, opts = {}) {\n let hex = hex_;\n if (opts.size) {\n assertSize(hex, { size: opts.size });\n hex = trim(hex);\n }\n if (trim(hex) === \"0x00\")\n return false;\n if (trim(hex) === \"0x01\")\n return true;\n throw new InvalidHexBooleanError(hex);\n }\n function hexToNumber(hex, opts = {}) {\n return Number(hexToBigInt(hex, opts));\n }\n function hexToString(hex, opts = {}) {\n let bytes = hexToBytes(hex);\n if (opts.size) {\n assertSize(bytes, { size: opts.size });\n bytes = trim(bytes, { dir: \"right\" });\n }\n return new TextDecoder().decode(bytes);\n }\n var init_fromHex = __esm({\n \"../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/utils/encoding/fromHex.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_encoding();\n init_size();\n init_trim();\n init_toBytes();\n }\n });\n\n // ../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/utils/encoding/toHex.js\n function toHex(value, opts = {}) {\n if (typeof value === \"number\" || typeof value === \"bigint\")\n return numberToHex(value, opts);\n if (typeof value === \"string\") {\n return stringToHex(value, opts);\n }\n if (typeof value === \"boolean\")\n return boolToHex(value, opts);\n return bytesToHex(value, opts);\n }\n function boolToHex(value, opts = {}) {\n const hex = `0x${Number(value)}`;\n if (typeof opts.size === \"number\") {\n assertSize(hex, { size: opts.size });\n return pad(hex, { size: opts.size });\n }\n return hex;\n }\n function bytesToHex(value, opts = {}) {\n let string2 = \"\";\n for (let i3 = 0; i3 < value.length; i3++) {\n string2 += hexes[value[i3]];\n }\n const hex = `0x${string2}`;\n if (typeof opts.size === \"number\") {\n assertSize(hex, { size: opts.size });\n return pad(hex, { dir: \"right\", size: opts.size });\n }\n return hex;\n }\n function numberToHex(value_, opts = {}) {\n const { signed, size: size6 } = opts;\n const value = BigInt(value_);\n let maxValue;\n if (size6) {\n if (signed)\n maxValue = (1n << BigInt(size6) * 8n - 1n) - 1n;\n else\n maxValue = 2n ** (BigInt(size6) * 8n) - 1n;\n } else if (typeof value_ === \"number\") {\n maxValue = BigInt(Number.MAX_SAFE_INTEGER);\n }\n const minValue2 = typeof maxValue === \"bigint\" && signed ? -maxValue - 1n : 0;\n if (maxValue && value > maxValue || value < minValue2) {\n const suffix = typeof value_ === \"bigint\" ? \"n\" : \"\";\n throw new IntegerOutOfRangeError({\n max: maxValue ? `${maxValue}${suffix}` : void 0,\n min: `${minValue2}${suffix}`,\n signed,\n size: size6,\n value: `${value_}${suffix}`\n });\n }\n const hex = `0x${(signed && value < 0 ? (1n << BigInt(size6 * 8)) + BigInt(value) : value).toString(16)}`;\n if (size6)\n return pad(hex, { size: size6 });\n return hex;\n }\n function stringToHex(value_, opts = {}) {\n const value = encoder.encode(value_);\n return bytesToHex(value, opts);\n }\n var hexes, encoder;\n var init_toHex = __esm({\n \"../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/utils/encoding/toHex.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_encoding();\n init_pad();\n init_fromHex();\n hexes = /* @__PURE__ */ Array.from({ length: 256 }, (_v, i3) => i3.toString(16).padStart(2, \"0\"));\n encoder = /* @__PURE__ */ new TextEncoder();\n }\n });\n\n // ../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/utils/encoding/toBytes.js\n function toBytes(value, opts = {}) {\n if (typeof value === \"number\" || typeof value === \"bigint\")\n return numberToBytes(value, opts);\n if (typeof value === \"boolean\")\n return boolToBytes(value, opts);\n if (isHex(value))\n return hexToBytes(value, opts);\n return stringToBytes(value, opts);\n }\n function boolToBytes(value, opts = {}) {\n const bytes = new Uint8Array(1);\n bytes[0] = Number(value);\n if (typeof opts.size === \"number\") {\n assertSize(bytes, { size: opts.size });\n return pad(bytes, { size: opts.size });\n }\n return bytes;\n }\n function charCodeToBase16(char) {\n if (char >= charCodeMap.zero && char <= charCodeMap.nine)\n return char - charCodeMap.zero;\n if (char >= charCodeMap.A && char <= charCodeMap.F)\n return char - (charCodeMap.A - 10);\n if (char >= charCodeMap.a && char <= charCodeMap.f)\n return char - (charCodeMap.a - 10);\n return void 0;\n }\n function hexToBytes(hex_, opts = {}) {\n let hex = hex_;\n if (opts.size) {\n assertSize(hex, { size: opts.size });\n hex = pad(hex, { dir: \"right\", size: opts.size });\n }\n let hexString = hex.slice(2);\n if (hexString.length % 2)\n hexString = `0${hexString}`;\n const length2 = hexString.length / 2;\n const bytes = new Uint8Array(length2);\n for (let index2 = 0, j2 = 0; index2 < length2; index2++) {\n const nibbleLeft = charCodeToBase16(hexString.charCodeAt(j2++));\n const nibbleRight = charCodeToBase16(hexString.charCodeAt(j2++));\n if (nibbleLeft === void 0 || nibbleRight === void 0) {\n throw new BaseError2(`Invalid byte sequence (\"${hexString[j2 - 2]}${hexString[j2 - 1]}\" in \"${hexString}\").`);\n }\n bytes[index2] = nibbleLeft * 16 + nibbleRight;\n }\n return bytes;\n }\n function numberToBytes(value, opts) {\n const hex = numberToHex(value, opts);\n return hexToBytes(hex);\n }\n function stringToBytes(value, opts = {}) {\n const bytes = encoder2.encode(value);\n if (typeof opts.size === \"number\") {\n assertSize(bytes, { size: opts.size });\n return pad(bytes, { dir: \"right\", size: opts.size });\n }\n return bytes;\n }\n var encoder2, charCodeMap;\n var init_toBytes = __esm({\n \"../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/utils/encoding/toBytes.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_base();\n init_isHex();\n init_pad();\n init_fromHex();\n init_toHex();\n encoder2 = /* @__PURE__ */ new TextEncoder();\n charCodeMap = {\n zero: 48,\n nine: 57,\n A: 65,\n F: 70,\n a: 97,\n f: 102\n };\n }\n });\n\n // ../../../node_modules/.pnpm/@noble+hashes@1.8.0/node_modules/@noble/hashes/esm/_u64.js\n function fromBig(n2, le = false) {\n if (le)\n return { h: Number(n2 & U32_MASK64), l: Number(n2 >> _32n & U32_MASK64) };\n return { h: Number(n2 >> _32n & U32_MASK64) | 0, l: Number(n2 & U32_MASK64) | 0 };\n }\n function split(lst, le = false) {\n const len = lst.length;\n let Ah = new Uint32Array(len);\n let Al = new Uint32Array(len);\n for (let i3 = 0; i3 < len; i3++) {\n const { h: h4, l: l6 } = fromBig(lst[i3], le);\n [Ah[i3], Al[i3]] = [h4, l6];\n }\n return [Ah, Al];\n }\n function add(Ah, Al, Bh, Bl) {\n const l6 = (Al >>> 0) + (Bl >>> 0);\n return { h: Ah + Bh + (l6 / 2 ** 32 | 0) | 0, l: l6 | 0 };\n }\n var U32_MASK64, _32n, shrSH, shrSL, rotrSH, rotrSL, rotrBH, rotrBL, rotlSH, rotlSL, rotlBH, rotlBL, add3L, add3H, add4L, add4H, add5L, add5H;\n var init_u64 = __esm({\n \"../../../node_modules/.pnpm/@noble+hashes@1.8.0/node_modules/@noble/hashes/esm/_u64.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n U32_MASK64 = /* @__PURE__ */ BigInt(2 ** 32 - 1);\n _32n = /* @__PURE__ */ BigInt(32);\n shrSH = (h4, _l, s4) => h4 >>> s4;\n shrSL = (h4, l6, s4) => h4 << 32 - s4 | l6 >>> s4;\n rotrSH = (h4, l6, s4) => h4 >>> s4 | l6 << 32 - s4;\n rotrSL = (h4, l6, s4) => h4 << 32 - s4 | l6 >>> s4;\n rotrBH = (h4, l6, s4) => h4 << 64 - s4 | l6 >>> s4 - 32;\n rotrBL = (h4, l6, s4) => h4 >>> s4 - 32 | l6 << 64 - s4;\n rotlSH = (h4, l6, s4) => h4 << s4 | l6 >>> 32 - s4;\n rotlSL = (h4, l6, s4) => l6 << s4 | h4 >>> 32 - s4;\n rotlBH = (h4, l6, s4) => l6 << s4 - 32 | h4 >>> 64 - s4;\n rotlBL = (h4, l6, s4) => h4 << s4 - 32 | l6 >>> 64 - s4;\n add3L = (Al, Bl, Cl) => (Al >>> 0) + (Bl >>> 0) + (Cl >>> 0);\n add3H = (low, Ah, Bh, Ch) => Ah + Bh + Ch + (low / 2 ** 32 | 0) | 0;\n add4L = (Al, Bl, Cl, Dl) => (Al >>> 0) + (Bl >>> 0) + (Cl >>> 0) + (Dl >>> 0);\n add4H = (low, Ah, Bh, Ch, Dh) => Ah + Bh + Ch + Dh + (low / 2 ** 32 | 0) | 0;\n add5L = (Al, Bl, Cl, Dl, El) => (Al >>> 0) + (Bl >>> 0) + (Cl >>> 0) + (Dl >>> 0) + (El >>> 0);\n add5H = (low, Ah, Bh, Ch, Dh, Eh) => Ah + Bh + Ch + Dh + Eh + (low / 2 ** 32 | 0) | 0;\n }\n });\n\n // ../../../node_modules/.pnpm/@noble+hashes@1.8.0/node_modules/@noble/hashes/esm/crypto.js\n var crypto2;\n var init_crypto = __esm({\n \"../../../node_modules/.pnpm/@noble+hashes@1.8.0/node_modules/@noble/hashes/esm/crypto.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n crypto2 = typeof globalThis === \"object\" && \"crypto\" in globalThis ? globalThis.crypto : void 0;\n }\n });\n\n // ../../../node_modules/.pnpm/@noble+hashes@1.8.0/node_modules/@noble/hashes/esm/utils.js\n function isBytes(a3) {\n return a3 instanceof Uint8Array || ArrayBuffer.isView(a3) && a3.constructor.name === \"Uint8Array\";\n }\n function anumber(n2) {\n if (!Number.isSafeInteger(n2) || n2 < 0)\n throw new Error(\"positive integer expected, got \" + n2);\n }\n function abytes(b4, ...lengths) {\n if (!isBytes(b4))\n throw new Error(\"Uint8Array expected\");\n if (lengths.length > 0 && !lengths.includes(b4.length))\n throw new Error(\"Uint8Array expected of length \" + lengths + \", got length=\" + b4.length);\n }\n function ahash(h4) {\n if (typeof h4 !== \"function\" || typeof h4.create !== \"function\")\n throw new Error(\"Hash should be wrapped by utils.createHasher\");\n anumber(h4.outputLen);\n anumber(h4.blockLen);\n }\n function aexists(instance, checkFinished = true) {\n if (instance.destroyed)\n throw new Error(\"Hash instance has been destroyed\");\n if (checkFinished && instance.finished)\n throw new Error(\"Hash#digest() has already been called\");\n }\n function aoutput(out, instance) {\n abytes(out);\n const min = instance.outputLen;\n if (out.length < min) {\n throw new Error(\"digestInto() expects output buffer of length at least \" + min);\n }\n }\n function u32(arr) {\n return new Uint32Array(arr.buffer, arr.byteOffset, Math.floor(arr.byteLength / 4));\n }\n function clean(...arrays) {\n for (let i3 = 0; i3 < arrays.length; i3++) {\n arrays[i3].fill(0);\n }\n }\n function createView(arr) {\n return new DataView(arr.buffer, arr.byteOffset, arr.byteLength);\n }\n function rotr(word, shift) {\n return word << 32 - shift | word >>> shift;\n }\n function rotl(word, shift) {\n return word << shift | word >>> 32 - shift >>> 0;\n }\n function byteSwap(word) {\n return word << 24 & 4278190080 | word << 8 & 16711680 | word >>> 8 & 65280 | word >>> 24 & 255;\n }\n function byteSwap32(arr) {\n for (let i3 = 0; i3 < arr.length; i3++) {\n arr[i3] = byteSwap(arr[i3]);\n }\n return arr;\n }\n function bytesToHex2(bytes) {\n abytes(bytes);\n if (hasHexBuiltin)\n return bytes.toHex();\n let hex = \"\";\n for (let i3 = 0; i3 < bytes.length; i3++) {\n hex += hexes2[bytes[i3]];\n }\n return hex;\n }\n function asciiToBase16(ch) {\n if (ch >= asciis._0 && ch <= asciis._9)\n return ch - asciis._0;\n if (ch >= asciis.A && ch <= asciis.F)\n return ch - (asciis.A - 10);\n if (ch >= asciis.a && ch <= asciis.f)\n return ch - (asciis.a - 10);\n return;\n }\n function hexToBytes2(hex) {\n if (typeof hex !== \"string\")\n throw new Error(\"hex string expected, got \" + typeof hex);\n if (hasHexBuiltin)\n return Uint8Array.fromHex(hex);\n const hl = hex.length;\n const al = hl / 2;\n if (hl % 2)\n throw new Error(\"hex string expected, got unpadded hex of length \" + hl);\n const array2 = new Uint8Array(al);\n for (let ai = 0, hi = 0; ai < al; ai++, hi += 2) {\n const n1 = asciiToBase16(hex.charCodeAt(hi));\n const n2 = asciiToBase16(hex.charCodeAt(hi + 1));\n if (n1 === void 0 || n2 === void 0) {\n const char = hex[hi] + hex[hi + 1];\n throw new Error('hex string expected, got non-hex character \"' + char + '\" at index ' + hi);\n }\n array2[ai] = n1 * 16 + n2;\n }\n return array2;\n }\n function utf8ToBytes(str) {\n if (typeof str !== \"string\")\n throw new Error(\"string expected\");\n return new Uint8Array(new TextEncoder().encode(str));\n }\n function toBytes2(data) {\n if (typeof data === \"string\")\n data = utf8ToBytes(data);\n abytes(data);\n return data;\n }\n function kdfInputToBytes(data) {\n if (typeof data === \"string\")\n data = utf8ToBytes(data);\n abytes(data);\n return data;\n }\n function concatBytes(...arrays) {\n let sum = 0;\n for (let i3 = 0; i3 < arrays.length; i3++) {\n const a3 = arrays[i3];\n abytes(a3);\n sum += a3.length;\n }\n const res = new Uint8Array(sum);\n for (let i3 = 0, pad6 = 0; i3 < arrays.length; i3++) {\n const a3 = arrays[i3];\n res.set(a3, pad6);\n pad6 += a3.length;\n }\n return res;\n }\n function checkOpts(defaults, opts) {\n if (opts !== void 0 && {}.toString.call(opts) !== \"[object Object]\")\n throw new Error(\"options should be object or undefined\");\n const merged = Object.assign(defaults, opts);\n return merged;\n }\n function createHasher(hashCons) {\n const hashC = (msg) => hashCons().update(toBytes2(msg)).digest();\n const tmp = hashCons();\n hashC.outputLen = tmp.outputLen;\n hashC.blockLen = tmp.blockLen;\n hashC.create = () => hashCons();\n return hashC;\n }\n function randomBytes(bytesLength = 32) {\n if (crypto2 && typeof crypto2.getRandomValues === \"function\") {\n return crypto2.getRandomValues(new Uint8Array(bytesLength));\n }\n if (crypto2 && typeof crypto2.randomBytes === \"function\") {\n return Uint8Array.from(crypto2.randomBytes(bytesLength));\n }\n throw new Error(\"crypto.getRandomValues must be defined\");\n }\n var isLE, swap32IfBE, hasHexBuiltin, hexes2, asciis, Hash;\n var init_utils3 = __esm({\n \"../../../node_modules/.pnpm/@noble+hashes@1.8.0/node_modules/@noble/hashes/esm/utils.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_crypto();\n isLE = /* @__PURE__ */ (() => new Uint8Array(new Uint32Array([287454020]).buffer)[0] === 68)();\n swap32IfBE = isLE ? (u2) => u2 : byteSwap32;\n hasHexBuiltin = /* @__PURE__ */ (() => (\n // @ts-ignore\n typeof Uint8Array.from([]).toHex === \"function\" && typeof Uint8Array.fromHex === \"function\"\n ))();\n hexes2 = /* @__PURE__ */ Array.from({ length: 256 }, (_2, i3) => i3.toString(16).padStart(2, \"0\"));\n asciis = { _0: 48, _9: 57, A: 65, F: 70, a: 97, f: 102 };\n Hash = class {\n };\n }\n });\n\n // ../../../node_modules/.pnpm/@noble+hashes@1.8.0/node_modules/@noble/hashes/esm/sha3.js\n function keccakP(s4, rounds = 24) {\n const B2 = new Uint32Array(5 * 2);\n for (let round = 24 - rounds; round < 24; round++) {\n for (let x4 = 0; x4 < 10; x4++)\n B2[x4] = s4[x4] ^ s4[x4 + 10] ^ s4[x4 + 20] ^ s4[x4 + 30] ^ s4[x4 + 40];\n for (let x4 = 0; x4 < 10; x4 += 2) {\n const idx1 = (x4 + 8) % 10;\n const idx0 = (x4 + 2) % 10;\n const B0 = B2[idx0];\n const B1 = B2[idx0 + 1];\n const Th = rotlH(B0, B1, 1) ^ B2[idx1];\n const Tl = rotlL(B0, B1, 1) ^ B2[idx1 + 1];\n for (let y6 = 0; y6 < 50; y6 += 10) {\n s4[x4 + y6] ^= Th;\n s4[x4 + y6 + 1] ^= Tl;\n }\n }\n let curH = s4[2];\n let curL = s4[3];\n for (let t3 = 0; t3 < 24; t3++) {\n const shift = SHA3_ROTL[t3];\n const Th = rotlH(curH, curL, shift);\n const Tl = rotlL(curH, curL, shift);\n const PI = SHA3_PI[t3];\n curH = s4[PI];\n curL = s4[PI + 1];\n s4[PI] = Th;\n s4[PI + 1] = Tl;\n }\n for (let y6 = 0; y6 < 50; y6 += 10) {\n for (let x4 = 0; x4 < 10; x4++)\n B2[x4] = s4[y6 + x4];\n for (let x4 = 0; x4 < 10; x4++)\n s4[y6 + x4] ^= ~B2[(x4 + 2) % 10] & B2[(x4 + 4) % 10];\n }\n s4[0] ^= SHA3_IOTA_H[round];\n s4[1] ^= SHA3_IOTA_L[round];\n }\n clean(B2);\n }\n var _0n, _1n, _2n, _7n, _256n, _0x71n, SHA3_PI, SHA3_ROTL, _SHA3_IOTA, IOTAS, SHA3_IOTA_H, SHA3_IOTA_L, rotlH, rotlL, Keccak, gen, keccak_256;\n var init_sha3 = __esm({\n \"../../../node_modules/.pnpm/@noble+hashes@1.8.0/node_modules/@noble/hashes/esm/sha3.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_u64();\n init_utils3();\n _0n = BigInt(0);\n _1n = BigInt(1);\n _2n = BigInt(2);\n _7n = BigInt(7);\n _256n = BigInt(256);\n _0x71n = BigInt(113);\n SHA3_PI = [];\n SHA3_ROTL = [];\n _SHA3_IOTA = [];\n for (let round = 0, R3 = _1n, x4 = 1, y6 = 0; round < 24; round++) {\n [x4, y6] = [y6, (2 * x4 + 3 * y6) % 5];\n SHA3_PI.push(2 * (5 * y6 + x4));\n SHA3_ROTL.push((round + 1) * (round + 2) / 2 % 64);\n let t3 = _0n;\n for (let j2 = 0; j2 < 7; j2++) {\n R3 = (R3 << _1n ^ (R3 >> _7n) * _0x71n) % _256n;\n if (R3 & _2n)\n t3 ^= _1n << (_1n << /* @__PURE__ */ BigInt(j2)) - _1n;\n }\n _SHA3_IOTA.push(t3);\n }\n IOTAS = split(_SHA3_IOTA, true);\n SHA3_IOTA_H = IOTAS[0];\n SHA3_IOTA_L = IOTAS[1];\n rotlH = (h4, l6, s4) => s4 > 32 ? rotlBH(h4, l6, s4) : rotlSH(h4, l6, s4);\n rotlL = (h4, l6, s4) => s4 > 32 ? rotlBL(h4, l6, s4) : rotlSL(h4, l6, s4);\n Keccak = class _Keccak extends Hash {\n // NOTE: we accept arguments in bytes instead of bits here.\n constructor(blockLen, suffix, outputLen, enableXOF = false, rounds = 24) {\n super();\n this.pos = 0;\n this.posOut = 0;\n this.finished = false;\n this.destroyed = false;\n this.enableXOF = false;\n this.blockLen = blockLen;\n this.suffix = suffix;\n this.outputLen = outputLen;\n this.enableXOF = enableXOF;\n this.rounds = rounds;\n anumber(outputLen);\n if (!(0 < blockLen && blockLen < 200))\n throw new Error(\"only keccak-f1600 function is supported\");\n this.state = new Uint8Array(200);\n this.state32 = u32(this.state);\n }\n clone() {\n return this._cloneInto();\n }\n keccak() {\n swap32IfBE(this.state32);\n keccakP(this.state32, this.rounds);\n swap32IfBE(this.state32);\n this.posOut = 0;\n this.pos = 0;\n }\n update(data) {\n aexists(this);\n data = toBytes2(data);\n abytes(data);\n const { blockLen, state } = this;\n const len = data.length;\n for (let pos = 0; pos < len; ) {\n const take = Math.min(blockLen - this.pos, len - pos);\n for (let i3 = 0; i3 < take; i3++)\n state[this.pos++] ^= data[pos++];\n if (this.pos === blockLen)\n this.keccak();\n }\n return this;\n }\n finish() {\n if (this.finished)\n return;\n this.finished = true;\n const { state, suffix, pos, blockLen } = this;\n state[pos] ^= suffix;\n if ((suffix & 128) !== 0 && pos === blockLen - 1)\n this.keccak();\n state[blockLen - 1] ^= 128;\n this.keccak();\n }\n writeInto(out) {\n aexists(this, false);\n abytes(out);\n this.finish();\n const bufferOut = this.state;\n const { blockLen } = this;\n for (let pos = 0, len = out.length; pos < len; ) {\n if (this.posOut >= blockLen)\n this.keccak();\n const take = Math.min(blockLen - this.posOut, len - pos);\n out.set(bufferOut.subarray(this.posOut, this.posOut + take), pos);\n this.posOut += take;\n pos += take;\n }\n return out;\n }\n xofInto(out) {\n if (!this.enableXOF)\n throw new Error(\"XOF is not possible for this instance\");\n return this.writeInto(out);\n }\n xof(bytes) {\n anumber(bytes);\n return this.xofInto(new Uint8Array(bytes));\n }\n digestInto(out) {\n aoutput(out, this);\n if (this.finished)\n throw new Error(\"digest() was already called\");\n this.writeInto(out);\n this.destroy();\n return out;\n }\n digest() {\n return this.digestInto(new Uint8Array(this.outputLen));\n }\n destroy() {\n this.destroyed = true;\n clean(this.state);\n }\n _cloneInto(to) {\n const { blockLen, suffix, outputLen, rounds, enableXOF } = this;\n to || (to = new _Keccak(blockLen, suffix, outputLen, enableXOF, rounds));\n to.state32.set(this.state32);\n to.pos = this.pos;\n to.posOut = this.posOut;\n to.finished = this.finished;\n to.rounds = rounds;\n to.suffix = suffix;\n to.outputLen = outputLen;\n to.enableXOF = enableXOF;\n to.destroyed = this.destroyed;\n return to;\n }\n };\n gen = (suffix, blockLen, outputLen) => createHasher(() => new Keccak(blockLen, suffix, outputLen));\n keccak_256 = /* @__PURE__ */ (() => gen(1, 136, 256 / 8))();\n }\n });\n\n // ../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/utils/hash/keccak256.js\n function keccak256(value, to_) {\n const to = to_ || \"hex\";\n const bytes = keccak_256(isHex(value, { strict: false }) ? toBytes(value) : value);\n if (to === \"bytes\")\n return bytes;\n return toHex(bytes);\n }\n var init_keccak256 = __esm({\n \"../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/utils/hash/keccak256.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_sha3();\n init_isHex();\n init_toBytes();\n init_toHex();\n }\n });\n\n // ../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/utils/hash/hashSignature.js\n function hashSignature(sig) {\n return hash(sig);\n }\n var hash;\n var init_hashSignature = __esm({\n \"../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/utils/hash/hashSignature.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_toBytes();\n init_keccak256();\n hash = (value) => keccak256(toBytes(value));\n }\n });\n\n // ../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/utils/hash/normalizeSignature.js\n function normalizeSignature(signature) {\n let active = true;\n let current = \"\";\n let level = 0;\n let result = \"\";\n let valid = false;\n for (let i3 = 0; i3 < signature.length; i3++) {\n const char = signature[i3];\n if ([\"(\", \")\", \",\"].includes(char))\n active = true;\n if (char === \"(\")\n level++;\n if (char === \")\")\n level--;\n if (!active)\n continue;\n if (level === 0) {\n if (char === \" \" && [\"event\", \"function\", \"\"].includes(result))\n result = \"\";\n else {\n result += char;\n if (char === \")\") {\n valid = true;\n break;\n }\n }\n continue;\n }\n if (char === \" \") {\n if (signature[i3 - 1] !== \",\" && current !== \",\" && current !== \",(\") {\n current = \"\";\n active = false;\n }\n continue;\n }\n result += char;\n current += char;\n }\n if (!valid)\n throw new BaseError2(\"Unable to normalize signature.\");\n return result;\n }\n var init_normalizeSignature = __esm({\n \"../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/utils/hash/normalizeSignature.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_base();\n }\n });\n\n // ../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/utils/hash/toSignature.js\n var toSignature;\n var init_toSignature = __esm({\n \"../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/utils/hash/toSignature.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_exports();\n init_normalizeSignature();\n toSignature = (def) => {\n const def_ = (() => {\n if (typeof def === \"string\")\n return def;\n return formatAbiItem(def);\n })();\n return normalizeSignature(def_);\n };\n }\n });\n\n // ../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/utils/hash/toSignatureHash.js\n function toSignatureHash(fn) {\n return hashSignature(toSignature(fn));\n }\n var init_toSignatureHash = __esm({\n \"../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/utils/hash/toSignatureHash.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_hashSignature();\n init_toSignature();\n }\n });\n\n // ../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/utils/hash/toEventSelector.js\n var toEventSelector;\n var init_toEventSelector = __esm({\n \"../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/utils/hash/toEventSelector.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_toSignatureHash();\n toEventSelector = toSignatureHash;\n }\n });\n\n // ../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/errors/address.js\n var InvalidAddressError;\n var init_address = __esm({\n \"../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/errors/address.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_base();\n InvalidAddressError = class extends BaseError2 {\n constructor({ address }) {\n super(`Address \"${address}\" is invalid.`, {\n metaMessages: [\n \"- Address must be a hex value of 20 bytes (40 hex characters).\",\n \"- Address must match its checksum counterpart.\"\n ],\n name: \"InvalidAddressError\"\n });\n }\n };\n }\n });\n\n // ../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/utils/lru.js\n var LruMap;\n var init_lru = __esm({\n \"../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/utils/lru.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n LruMap = class extends Map {\n constructor(size6) {\n super();\n Object.defineProperty(this, \"maxSize\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: void 0\n });\n this.maxSize = size6;\n }\n get(key) {\n const value = super.get(key);\n if (super.has(key) && value !== void 0) {\n this.delete(key);\n super.set(key, value);\n }\n return value;\n }\n set(key, value) {\n super.set(key, value);\n if (this.maxSize && this.size > this.maxSize) {\n const firstKey = this.keys().next().value;\n if (firstKey)\n this.delete(firstKey);\n }\n return this;\n }\n };\n }\n });\n\n // ../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/utils/address/getAddress.js\n function checksumAddress(address_, chainId) {\n if (checksumAddressCache.has(`${address_}.${chainId}`))\n return checksumAddressCache.get(`${address_}.${chainId}`);\n const hexAddress = chainId ? `${chainId}${address_.toLowerCase()}` : address_.substring(2).toLowerCase();\n const hash3 = keccak256(stringToBytes(hexAddress), \"bytes\");\n const address = (chainId ? hexAddress.substring(`${chainId}0x`.length) : hexAddress).split(\"\");\n for (let i3 = 0; i3 < 40; i3 += 2) {\n if (hash3[i3 >> 1] >> 4 >= 8 && address[i3]) {\n address[i3] = address[i3].toUpperCase();\n }\n if ((hash3[i3 >> 1] & 15) >= 8 && address[i3 + 1]) {\n address[i3 + 1] = address[i3 + 1].toUpperCase();\n }\n }\n const result = `0x${address.join(\"\")}`;\n checksumAddressCache.set(`${address_}.${chainId}`, result);\n return result;\n }\n function getAddress(address, chainId) {\n if (!isAddress(address, { strict: false }))\n throw new InvalidAddressError({ address });\n return checksumAddress(address, chainId);\n }\n var checksumAddressCache;\n var init_getAddress = __esm({\n \"../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/utils/address/getAddress.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_address();\n init_toBytes();\n init_keccak256();\n init_lru();\n init_isAddress();\n checksumAddressCache = /* @__PURE__ */ new LruMap(8192);\n }\n });\n\n // ../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/utils/address/isAddress.js\n function isAddress(address, options) {\n const { strict = true } = options ?? {};\n const cacheKey2 = `${address}.${strict}`;\n if (isAddressCache.has(cacheKey2))\n return isAddressCache.get(cacheKey2);\n const result = (() => {\n if (!addressRegex.test(address))\n return false;\n if (address.toLowerCase() === address)\n return true;\n if (strict)\n return checksumAddress(address) === address;\n return true;\n })();\n isAddressCache.set(cacheKey2, result);\n return result;\n }\n var addressRegex, isAddressCache;\n var init_isAddress = __esm({\n \"../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/utils/address/isAddress.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_lru();\n init_getAddress();\n addressRegex = /^0x[a-fA-F0-9]{40}$/;\n isAddressCache = /* @__PURE__ */ new LruMap(8192);\n }\n });\n\n // ../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/utils/data/concat.js\n function concat(values) {\n if (typeof values[0] === \"string\")\n return concatHex(values);\n return concatBytes2(values);\n }\n function concatBytes2(values) {\n let length2 = 0;\n for (const arr of values) {\n length2 += arr.length;\n }\n const result = new Uint8Array(length2);\n let offset = 0;\n for (const arr of values) {\n result.set(arr, offset);\n offset += arr.length;\n }\n return result;\n }\n function concatHex(values) {\n return `0x${values.reduce((acc, x4) => acc + x4.replace(\"0x\", \"\"), \"\")}`;\n }\n var init_concat = __esm({\n \"../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/utils/data/concat.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n }\n });\n\n // ../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/utils/data/slice.js\n function slice(value, start, end, { strict } = {}) {\n if (isHex(value, { strict: false }))\n return sliceHex(value, start, end, {\n strict\n });\n return sliceBytes(value, start, end, {\n strict\n });\n }\n function assertStartOffset(value, start) {\n if (typeof start === \"number\" && start > 0 && start > size(value) - 1)\n throw new SliceOffsetOutOfBoundsError({\n offset: start,\n position: \"start\",\n size: size(value)\n });\n }\n function assertEndOffset(value, start, end) {\n if (typeof start === \"number\" && typeof end === \"number\" && size(value) !== end - start) {\n throw new SliceOffsetOutOfBoundsError({\n offset: end,\n position: \"end\",\n size: size(value)\n });\n }\n }\n function sliceBytes(value_, start, end, { strict } = {}) {\n assertStartOffset(value_, start);\n const value = value_.slice(start, end);\n if (strict)\n assertEndOffset(value, start, end);\n return value;\n }\n function sliceHex(value_, start, end, { strict } = {}) {\n assertStartOffset(value_, start);\n const value = `0x${value_.replace(\"0x\", \"\").slice((start ?? 0) * 2, (end ?? value_.length) * 2)}`;\n if (strict)\n assertEndOffset(value, start, end);\n return value;\n }\n var init_slice = __esm({\n \"../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/utils/data/slice.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_data();\n init_isHex();\n init_size();\n }\n });\n\n // ../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/utils/regex.js\n var arrayRegex, bytesRegex2, integerRegex2;\n var init_regex2 = __esm({\n \"../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/utils/regex.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n arrayRegex = /^(.*)\\[([0-9]*)\\]$/;\n bytesRegex2 = /^bytes([1-9]|1[0-9]|2[0-9]|3[0-2])?$/;\n integerRegex2 = /^(u?int)(8|16|24|32|40|48|56|64|72|80|88|96|104|112|120|128|136|144|152|160|168|176|184|192|200|208|216|224|232|240|248|256)?$/;\n }\n });\n\n // ../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/utils/abi/encodeAbiParameters.js\n function encodeAbiParameters(params, values) {\n if (params.length !== values.length)\n throw new AbiEncodingLengthMismatchError({\n expectedLength: params.length,\n givenLength: values.length\n });\n const preparedParams = prepareParams({\n params,\n values\n });\n const data = encodeParams(preparedParams);\n if (data.length === 0)\n return \"0x\";\n return data;\n }\n function prepareParams({ params, values }) {\n const preparedParams = [];\n for (let i3 = 0; i3 < params.length; i3++) {\n preparedParams.push(prepareParam({ param: params[i3], value: values[i3] }));\n }\n return preparedParams;\n }\n function prepareParam({ param, value }) {\n const arrayComponents = getArrayComponents(param.type);\n if (arrayComponents) {\n const [length2, type] = arrayComponents;\n return encodeArray(value, { length: length2, param: { ...param, type } });\n }\n if (param.type === \"tuple\") {\n return encodeTuple(value, {\n param\n });\n }\n if (param.type === \"address\") {\n return encodeAddress(value);\n }\n if (param.type === \"bool\") {\n return encodeBool(value);\n }\n if (param.type.startsWith(\"uint\") || param.type.startsWith(\"int\")) {\n const signed = param.type.startsWith(\"int\");\n const [, , size6 = \"256\"] = integerRegex2.exec(param.type) ?? [];\n return encodeNumber(value, {\n signed,\n size: Number(size6)\n });\n }\n if (param.type.startsWith(\"bytes\")) {\n return encodeBytes(value, { param });\n }\n if (param.type === \"string\") {\n return encodeString(value);\n }\n throw new InvalidAbiEncodingTypeError(param.type, {\n docsPath: \"/docs/contract/encodeAbiParameters\"\n });\n }\n function encodeParams(preparedParams) {\n let staticSize = 0;\n for (let i3 = 0; i3 < preparedParams.length; i3++) {\n const { dynamic, encoded } = preparedParams[i3];\n if (dynamic)\n staticSize += 32;\n else\n staticSize += size(encoded);\n }\n const staticParams = [];\n const dynamicParams = [];\n let dynamicSize = 0;\n for (let i3 = 0; i3 < preparedParams.length; i3++) {\n const { dynamic, encoded } = preparedParams[i3];\n if (dynamic) {\n staticParams.push(numberToHex(staticSize + dynamicSize, { size: 32 }));\n dynamicParams.push(encoded);\n dynamicSize += size(encoded);\n } else {\n staticParams.push(encoded);\n }\n }\n return concat([...staticParams, ...dynamicParams]);\n }\n function encodeAddress(value) {\n if (!isAddress(value))\n throw new InvalidAddressError({ address: value });\n return { dynamic: false, encoded: padHex(value.toLowerCase()) };\n }\n function encodeArray(value, { length: length2, param }) {\n const dynamic = length2 === null;\n if (!Array.isArray(value))\n throw new InvalidArrayError(value);\n if (!dynamic && value.length !== length2)\n throw new AbiEncodingArrayLengthMismatchError({\n expectedLength: length2,\n givenLength: value.length,\n type: `${param.type}[${length2}]`\n });\n let dynamicChild = false;\n const preparedParams = [];\n for (let i3 = 0; i3 < value.length; i3++) {\n const preparedParam = prepareParam({ param, value: value[i3] });\n if (preparedParam.dynamic)\n dynamicChild = true;\n preparedParams.push(preparedParam);\n }\n if (dynamic || dynamicChild) {\n const data = encodeParams(preparedParams);\n if (dynamic) {\n const length3 = numberToHex(preparedParams.length, { size: 32 });\n return {\n dynamic: true,\n encoded: preparedParams.length > 0 ? concat([length3, data]) : length3\n };\n }\n if (dynamicChild)\n return { dynamic: true, encoded: data };\n }\n return {\n dynamic: false,\n encoded: concat(preparedParams.map(({ encoded }) => encoded))\n };\n }\n function encodeBytes(value, { param }) {\n const [, paramSize] = param.type.split(\"bytes\");\n const bytesSize = size(value);\n if (!paramSize) {\n let value_ = value;\n if (bytesSize % 32 !== 0)\n value_ = padHex(value_, {\n dir: \"right\",\n size: Math.ceil((value.length - 2) / 2 / 32) * 32\n });\n return {\n dynamic: true,\n encoded: concat([padHex(numberToHex(bytesSize, { size: 32 })), value_])\n };\n }\n if (bytesSize !== Number.parseInt(paramSize, 10))\n throw new AbiEncodingBytesSizeMismatchError({\n expectedSize: Number.parseInt(paramSize, 10),\n value\n });\n return { dynamic: false, encoded: padHex(value, { dir: \"right\" }) };\n }\n function encodeBool(value) {\n if (typeof value !== \"boolean\")\n throw new BaseError2(`Invalid boolean value: \"${value}\" (type: ${typeof value}). Expected: \\`true\\` or \\`false\\`.`);\n return { dynamic: false, encoded: padHex(boolToHex(value)) };\n }\n function encodeNumber(value, { signed, size: size6 = 256 }) {\n if (typeof size6 === \"number\") {\n const max = 2n ** (BigInt(size6) - (signed ? 1n : 0n)) - 1n;\n const min = signed ? -max - 1n : 0n;\n if (value > max || value < min)\n throw new IntegerOutOfRangeError({\n max: max.toString(),\n min: min.toString(),\n signed,\n size: size6 / 8,\n value: value.toString()\n });\n }\n return {\n dynamic: false,\n encoded: numberToHex(value, {\n size: 32,\n signed\n })\n };\n }\n function encodeString(value) {\n const hexValue = stringToHex(value);\n const partsLength = Math.ceil(size(hexValue) / 32);\n const parts = [];\n for (let i3 = 0; i3 < partsLength; i3++) {\n parts.push(padHex(slice(hexValue, i3 * 32, (i3 + 1) * 32), {\n dir: \"right\"\n }));\n }\n return {\n dynamic: true,\n encoded: concat([\n padHex(numberToHex(size(hexValue), { size: 32 })),\n ...parts\n ])\n };\n }\n function encodeTuple(value, { param }) {\n let dynamic = false;\n const preparedParams = [];\n for (let i3 = 0; i3 < param.components.length; i3++) {\n const param_ = param.components[i3];\n const index2 = Array.isArray(value) ? i3 : param_.name;\n const preparedParam = prepareParam({\n param: param_,\n value: value[index2]\n });\n preparedParams.push(preparedParam);\n if (preparedParam.dynamic)\n dynamic = true;\n }\n return {\n dynamic,\n encoded: dynamic ? encodeParams(preparedParams) : concat(preparedParams.map(({ encoded }) => encoded))\n };\n }\n function getArrayComponents(type) {\n const matches = type.match(/^(.*)\\[(\\d+)?\\]$/);\n return matches ? (\n // Return `null` if the array is dynamic.\n [matches[2] ? Number(matches[2]) : null, matches[1]]\n ) : void 0;\n }\n var init_encodeAbiParameters = __esm({\n \"../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/utils/abi/encodeAbiParameters.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_abi();\n init_address();\n init_base();\n init_encoding();\n init_isAddress();\n init_concat();\n init_pad();\n init_size();\n init_slice();\n init_toHex();\n init_regex2();\n }\n });\n\n // ../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/utils/hash/toFunctionSelector.js\n var toFunctionSelector;\n var init_toFunctionSelector = __esm({\n \"../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/utils/hash/toFunctionSelector.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_slice();\n init_toSignatureHash();\n toFunctionSelector = (fn) => slice(toSignatureHash(fn), 0, 4);\n }\n });\n\n // ../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/utils/abi/getAbiItem.js\n function getAbiItem(parameters) {\n const { abi: abi2, args = [], name } = parameters;\n const isSelector = isHex(name, { strict: false });\n const abiItems = abi2.filter((abiItem) => {\n if (isSelector) {\n if (abiItem.type === \"function\")\n return toFunctionSelector(abiItem) === name;\n if (abiItem.type === \"event\")\n return toEventSelector(abiItem) === name;\n return false;\n }\n return \"name\" in abiItem && abiItem.name === name;\n });\n if (abiItems.length === 0)\n return void 0;\n if (abiItems.length === 1)\n return abiItems[0];\n let matchedAbiItem;\n for (const abiItem of abiItems) {\n if (!(\"inputs\" in abiItem))\n continue;\n if (!args || args.length === 0) {\n if (!abiItem.inputs || abiItem.inputs.length === 0)\n return abiItem;\n continue;\n }\n if (!abiItem.inputs)\n continue;\n if (abiItem.inputs.length === 0)\n continue;\n if (abiItem.inputs.length !== args.length)\n continue;\n const matched = args.every((arg, index2) => {\n const abiParameter = \"inputs\" in abiItem && abiItem.inputs[index2];\n if (!abiParameter)\n return false;\n return isArgOfType(arg, abiParameter);\n });\n if (matched) {\n if (matchedAbiItem && \"inputs\" in matchedAbiItem && matchedAbiItem.inputs) {\n const ambiguousTypes = getAmbiguousTypes(abiItem.inputs, matchedAbiItem.inputs, args);\n if (ambiguousTypes)\n throw new AbiItemAmbiguityError({\n abiItem,\n type: ambiguousTypes[0]\n }, {\n abiItem: matchedAbiItem,\n type: ambiguousTypes[1]\n });\n }\n matchedAbiItem = abiItem;\n }\n }\n if (matchedAbiItem)\n return matchedAbiItem;\n return abiItems[0];\n }\n function isArgOfType(arg, abiParameter) {\n const argType = typeof arg;\n const abiParameterType = abiParameter.type;\n switch (abiParameterType) {\n case \"address\":\n return isAddress(arg, { strict: false });\n case \"bool\":\n return argType === \"boolean\";\n case \"function\":\n return argType === \"string\";\n case \"string\":\n return argType === \"string\";\n default: {\n if (abiParameterType === \"tuple\" && \"components\" in abiParameter)\n return Object.values(abiParameter.components).every((component, index2) => {\n return isArgOfType(Object.values(arg)[index2], component);\n });\n if (/^u?int(8|16|24|32|40|48|56|64|72|80|88|96|104|112|120|128|136|144|152|160|168|176|184|192|200|208|216|224|232|240|248|256)?$/.test(abiParameterType))\n return argType === \"number\" || argType === \"bigint\";\n if (/^bytes([1-9]|1[0-9]|2[0-9]|3[0-2])?$/.test(abiParameterType))\n return argType === \"string\" || arg instanceof Uint8Array;\n if (/[a-z]+[1-9]{0,3}(\\[[0-9]{0,}\\])+$/.test(abiParameterType)) {\n return Array.isArray(arg) && arg.every((x4) => isArgOfType(x4, {\n ...abiParameter,\n // Pop off `[]` or `[M]` from end of type\n type: abiParameterType.replace(/(\\[[0-9]{0,}\\])$/, \"\")\n }));\n }\n return false;\n }\n }\n }\n function getAmbiguousTypes(sourceParameters, targetParameters, args) {\n for (const parameterIndex in sourceParameters) {\n const sourceParameter = sourceParameters[parameterIndex];\n const targetParameter = targetParameters[parameterIndex];\n if (sourceParameter.type === \"tuple\" && targetParameter.type === \"tuple\" && \"components\" in sourceParameter && \"components\" in targetParameter)\n return getAmbiguousTypes(sourceParameter.components, targetParameter.components, args[parameterIndex]);\n const types = [sourceParameter.type, targetParameter.type];\n const ambiguous = (() => {\n if (types.includes(\"address\") && types.includes(\"bytes20\"))\n return true;\n if (types.includes(\"address\") && types.includes(\"string\"))\n return isAddress(args[parameterIndex], { strict: false });\n if (types.includes(\"address\") && types.includes(\"bytes\"))\n return isAddress(args[parameterIndex], { strict: false });\n return false;\n })();\n if (ambiguous)\n return types;\n }\n return;\n }\n var init_getAbiItem = __esm({\n \"../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/utils/abi/getAbiItem.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_abi();\n init_isHex();\n init_isAddress();\n init_toEventSelector();\n init_toFunctionSelector();\n }\n });\n\n // ../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/utils/abi/encodeEventTopics.js\n function encodeEventTopics(parameters) {\n const { abi: abi2, eventName, args } = parameters;\n let abiItem = abi2[0];\n if (eventName) {\n const item = getAbiItem({ abi: abi2, name: eventName });\n if (!item)\n throw new AbiEventNotFoundError(eventName, { docsPath });\n abiItem = item;\n }\n if (abiItem.type !== \"event\")\n throw new AbiEventNotFoundError(void 0, { docsPath });\n const definition = formatAbiItem2(abiItem);\n const signature = toEventSelector(definition);\n let topics = [];\n if (args && \"inputs\" in abiItem) {\n const indexedInputs = abiItem.inputs?.filter((param) => \"indexed\" in param && param.indexed);\n const args_ = Array.isArray(args) ? args : Object.values(args).length > 0 ? indexedInputs?.map((x4) => args[x4.name]) ?? [] : [];\n if (args_.length > 0) {\n topics = indexedInputs?.map((param, i3) => {\n if (Array.isArray(args_[i3]))\n return args_[i3].map((_2, j2) => encodeArg({ param, value: args_[i3][j2] }));\n return typeof args_[i3] !== \"undefined\" && args_[i3] !== null ? encodeArg({ param, value: args_[i3] }) : null;\n }) ?? [];\n }\n }\n return [signature, ...topics];\n }\n function encodeArg({ param, value }) {\n if (param.type === \"string\" || param.type === \"bytes\")\n return keccak256(toBytes(value));\n if (param.type === \"tuple\" || param.type.match(/^(.*)\\[(\\d+)?\\]$/))\n throw new FilterTypeNotSupportedError(param.type);\n return encodeAbiParameters([param], [value]);\n }\n var docsPath;\n var init_encodeEventTopics = __esm({\n \"../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/utils/abi/encodeEventTopics.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_abi();\n init_log();\n init_toBytes();\n init_keccak256();\n init_toEventSelector();\n init_encodeAbiParameters();\n init_formatAbiItem2();\n init_getAbiItem();\n docsPath = \"/docs/contract/encodeEventTopics\";\n }\n });\n\n // ../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/utils/filters/createFilterRequestScope.js\n function createFilterRequestScope(client, { method }) {\n const requestMap = {};\n if (client.transport.type === \"fallback\")\n client.transport.onResponse?.(({ method: method_, response: id, status, transport }) => {\n if (status === \"success\" && method === method_)\n requestMap[id] = transport.request;\n });\n return (id) => requestMap[id] || client.request;\n }\n var init_createFilterRequestScope = __esm({\n \"../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/utils/filters/createFilterRequestScope.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n }\n });\n\n // ../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/actions/public/createContractEventFilter.js\n async function createContractEventFilter(client, parameters) {\n const { address, abi: abi2, args, eventName, fromBlock, strict, toBlock } = parameters;\n const getRequest = createFilterRequestScope(client, {\n method: \"eth_newFilter\"\n });\n const topics = eventName ? encodeEventTopics({\n abi: abi2,\n args,\n eventName\n }) : void 0;\n const id = await client.request({\n method: \"eth_newFilter\",\n params: [\n {\n address,\n fromBlock: typeof fromBlock === \"bigint\" ? numberToHex(fromBlock) : fromBlock,\n toBlock: typeof toBlock === \"bigint\" ? numberToHex(toBlock) : toBlock,\n topics\n }\n ]\n });\n return {\n abi: abi2,\n args,\n eventName,\n id,\n request: getRequest(id),\n strict: Boolean(strict),\n type: \"event\"\n };\n }\n var init_createContractEventFilter = __esm({\n \"../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/actions/public/createContractEventFilter.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_encodeEventTopics();\n init_toHex();\n init_createFilterRequestScope();\n }\n });\n\n // ../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/accounts/utils/parseAccount.js\n function parseAccount(account) {\n if (typeof account === \"string\")\n return { address: account, type: \"json-rpc\" };\n return account;\n }\n var init_parseAccount = __esm({\n \"../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/accounts/utils/parseAccount.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n }\n });\n\n // ../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/utils/abi/prepareEncodeFunctionData.js\n function prepareEncodeFunctionData(parameters) {\n const { abi: abi2, args, functionName } = parameters;\n let abiItem = abi2[0];\n if (functionName) {\n const item = getAbiItem({\n abi: abi2,\n args,\n name: functionName\n });\n if (!item)\n throw new AbiFunctionNotFoundError(functionName, { docsPath: docsPath2 });\n abiItem = item;\n }\n if (abiItem.type !== \"function\")\n throw new AbiFunctionNotFoundError(void 0, { docsPath: docsPath2 });\n return {\n abi: [abiItem],\n functionName: toFunctionSelector(formatAbiItem2(abiItem))\n };\n }\n var docsPath2;\n var init_prepareEncodeFunctionData = __esm({\n \"../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/utils/abi/prepareEncodeFunctionData.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_abi();\n init_toFunctionSelector();\n init_formatAbiItem2();\n init_getAbiItem();\n docsPath2 = \"/docs/contract/encodeFunctionData\";\n }\n });\n\n // ../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/utils/abi/encodeFunctionData.js\n function encodeFunctionData(parameters) {\n const { args } = parameters;\n const { abi: abi2, functionName } = (() => {\n if (parameters.abi.length === 1 && parameters.functionName?.startsWith(\"0x\"))\n return parameters;\n return prepareEncodeFunctionData(parameters);\n })();\n const abiItem = abi2[0];\n const signature = functionName;\n const data = \"inputs\" in abiItem && abiItem.inputs ? encodeAbiParameters(abiItem.inputs, args ?? []) : void 0;\n return concatHex([signature, data ?? \"0x\"]);\n }\n var init_encodeFunctionData = __esm({\n \"../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/utils/abi/encodeFunctionData.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_concat();\n init_encodeAbiParameters();\n init_prepareEncodeFunctionData();\n }\n });\n\n // ../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/constants/solidity.js\n var panicReasons, solidityError, solidityPanic;\n var init_solidity = __esm({\n \"../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/constants/solidity.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n panicReasons = {\n 1: \"An `assert` condition failed.\",\n 17: \"Arithmetic operation resulted in underflow or overflow.\",\n 18: \"Division or modulo by zero (e.g. `5 / 0` or `23 % 0`).\",\n 33: \"Attempted to convert to an invalid type.\",\n 34: \"Attempted to access a storage byte array that is incorrectly encoded.\",\n 49: \"Performed `.pop()` on an empty array\",\n 50: \"Array index is out of bounds.\",\n 65: \"Allocated too much memory or created an array which is too large.\",\n 81: \"Attempted to call a zero-initialized variable of internal function type.\"\n };\n solidityError = {\n inputs: [\n {\n name: \"message\",\n type: \"string\"\n }\n ],\n name: \"Error\",\n type: \"error\"\n };\n solidityPanic = {\n inputs: [\n {\n name: \"reason\",\n type: \"uint256\"\n }\n ],\n name: \"Panic\",\n type: \"error\"\n };\n }\n });\n\n // ../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/errors/cursor.js\n var NegativeOffsetError, PositionOutOfBoundsError, RecursiveReadLimitExceededError;\n var init_cursor = __esm({\n \"../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/errors/cursor.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_base();\n NegativeOffsetError = class extends BaseError2 {\n constructor({ offset }) {\n super(`Offset \\`${offset}\\` cannot be negative.`, {\n name: \"NegativeOffsetError\"\n });\n }\n };\n PositionOutOfBoundsError = class extends BaseError2 {\n constructor({ length: length2, position }) {\n super(`Position \\`${position}\\` is out of bounds (\\`0 < position < ${length2}\\`).`, { name: \"PositionOutOfBoundsError\" });\n }\n };\n RecursiveReadLimitExceededError = class extends BaseError2 {\n constructor({ count, limit }) {\n super(`Recursive read limit of \\`${limit}\\` exceeded (recursive read count: \\`${count}\\`).`, { name: \"RecursiveReadLimitExceededError\" });\n }\n };\n }\n });\n\n // ../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/utils/cursor.js\n function createCursor(bytes, { recursiveReadLimit = 8192 } = {}) {\n const cursor = Object.create(staticCursor);\n cursor.bytes = bytes;\n cursor.dataView = new DataView(bytes.buffer, bytes.byteOffset, bytes.byteLength);\n cursor.positionReadCount = /* @__PURE__ */ new Map();\n cursor.recursiveReadLimit = recursiveReadLimit;\n return cursor;\n }\n var staticCursor;\n var init_cursor2 = __esm({\n \"../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/utils/cursor.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_cursor();\n staticCursor = {\n bytes: new Uint8Array(),\n dataView: new DataView(new ArrayBuffer(0)),\n position: 0,\n positionReadCount: /* @__PURE__ */ new Map(),\n recursiveReadCount: 0,\n recursiveReadLimit: Number.POSITIVE_INFINITY,\n assertReadLimit() {\n if (this.recursiveReadCount >= this.recursiveReadLimit)\n throw new RecursiveReadLimitExceededError({\n count: this.recursiveReadCount + 1,\n limit: this.recursiveReadLimit\n });\n },\n assertPosition(position) {\n if (position < 0 || position > this.bytes.length - 1)\n throw new PositionOutOfBoundsError({\n length: this.bytes.length,\n position\n });\n },\n decrementPosition(offset) {\n if (offset < 0)\n throw new NegativeOffsetError({ offset });\n const position = this.position - offset;\n this.assertPosition(position);\n this.position = position;\n },\n getReadCount(position) {\n return this.positionReadCount.get(position || this.position) || 0;\n },\n incrementPosition(offset) {\n if (offset < 0)\n throw new NegativeOffsetError({ offset });\n const position = this.position + offset;\n this.assertPosition(position);\n this.position = position;\n },\n inspectByte(position_) {\n const position = position_ ?? this.position;\n this.assertPosition(position);\n return this.bytes[position];\n },\n inspectBytes(length2, position_) {\n const position = position_ ?? this.position;\n this.assertPosition(position + length2 - 1);\n return this.bytes.subarray(position, position + length2);\n },\n inspectUint8(position_) {\n const position = position_ ?? this.position;\n this.assertPosition(position);\n return this.bytes[position];\n },\n inspectUint16(position_) {\n const position = position_ ?? this.position;\n this.assertPosition(position + 1);\n return this.dataView.getUint16(position);\n },\n inspectUint24(position_) {\n const position = position_ ?? this.position;\n this.assertPosition(position + 2);\n return (this.dataView.getUint16(position) << 8) + this.dataView.getUint8(position + 2);\n },\n inspectUint32(position_) {\n const position = position_ ?? this.position;\n this.assertPosition(position + 3);\n return this.dataView.getUint32(position);\n },\n pushByte(byte) {\n this.assertPosition(this.position);\n this.bytes[this.position] = byte;\n this.position++;\n },\n pushBytes(bytes) {\n this.assertPosition(this.position + bytes.length - 1);\n this.bytes.set(bytes, this.position);\n this.position += bytes.length;\n },\n pushUint8(value) {\n this.assertPosition(this.position);\n this.bytes[this.position] = value;\n this.position++;\n },\n pushUint16(value) {\n this.assertPosition(this.position + 1);\n this.dataView.setUint16(this.position, value);\n this.position += 2;\n },\n pushUint24(value) {\n this.assertPosition(this.position + 2);\n this.dataView.setUint16(this.position, value >> 8);\n this.dataView.setUint8(this.position + 2, value & ~4294967040);\n this.position += 3;\n },\n pushUint32(value) {\n this.assertPosition(this.position + 3);\n this.dataView.setUint32(this.position, value);\n this.position += 4;\n },\n readByte() {\n this.assertReadLimit();\n this._touch();\n const value = this.inspectByte();\n this.position++;\n return value;\n },\n readBytes(length2, size6) {\n this.assertReadLimit();\n this._touch();\n const value = this.inspectBytes(length2);\n this.position += size6 ?? length2;\n return value;\n },\n readUint8() {\n this.assertReadLimit();\n this._touch();\n const value = this.inspectUint8();\n this.position += 1;\n return value;\n },\n readUint16() {\n this.assertReadLimit();\n this._touch();\n const value = this.inspectUint16();\n this.position += 2;\n return value;\n },\n readUint24() {\n this.assertReadLimit();\n this._touch();\n const value = this.inspectUint24();\n this.position += 3;\n return value;\n },\n readUint32() {\n this.assertReadLimit();\n this._touch();\n const value = this.inspectUint32();\n this.position += 4;\n return value;\n },\n get remaining() {\n return this.bytes.length - this.position;\n },\n setPosition(position) {\n const oldPosition = this.position;\n this.assertPosition(position);\n this.position = position;\n return () => this.position = oldPosition;\n },\n _touch() {\n if (this.recursiveReadLimit === Number.POSITIVE_INFINITY)\n return;\n const count = this.getReadCount();\n this.positionReadCount.set(this.position, count + 1);\n if (count > 0)\n this.recursiveReadCount++;\n }\n };\n }\n });\n\n // ../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/utils/encoding/fromBytes.js\n function bytesToBigInt(bytes, opts = {}) {\n if (typeof opts.size !== \"undefined\")\n assertSize(bytes, { size: opts.size });\n const hex = bytesToHex(bytes, opts);\n return hexToBigInt(hex, opts);\n }\n function bytesToBool(bytes_, opts = {}) {\n let bytes = bytes_;\n if (typeof opts.size !== \"undefined\") {\n assertSize(bytes, { size: opts.size });\n bytes = trim(bytes);\n }\n if (bytes.length > 1 || bytes[0] > 1)\n throw new InvalidBytesBooleanError(bytes);\n return Boolean(bytes[0]);\n }\n function bytesToNumber(bytes, opts = {}) {\n if (typeof opts.size !== \"undefined\")\n assertSize(bytes, { size: opts.size });\n const hex = bytesToHex(bytes, opts);\n return hexToNumber(hex, opts);\n }\n function bytesToString(bytes_, opts = {}) {\n let bytes = bytes_;\n if (typeof opts.size !== \"undefined\") {\n assertSize(bytes, { size: opts.size });\n bytes = trim(bytes, { dir: \"right\" });\n }\n return new TextDecoder().decode(bytes);\n }\n var init_fromBytes = __esm({\n \"../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/utils/encoding/fromBytes.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_encoding();\n init_trim();\n init_fromHex();\n init_toHex();\n }\n });\n\n // ../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/utils/abi/decodeAbiParameters.js\n function decodeAbiParameters(params, data) {\n const bytes = typeof data === \"string\" ? hexToBytes(data) : data;\n const cursor = createCursor(bytes);\n if (size(bytes) === 0 && params.length > 0)\n throw new AbiDecodingZeroDataError();\n if (size(data) && size(data) < 32)\n throw new AbiDecodingDataSizeTooSmallError({\n data: typeof data === \"string\" ? data : bytesToHex(data),\n params,\n size: size(data)\n });\n let consumed = 0;\n const values = [];\n for (let i3 = 0; i3 < params.length; ++i3) {\n const param = params[i3];\n cursor.setPosition(consumed);\n const [data2, consumed_] = decodeParameter(cursor, param, {\n staticPosition: 0\n });\n consumed += consumed_;\n values.push(data2);\n }\n return values;\n }\n function decodeParameter(cursor, param, { staticPosition }) {\n const arrayComponents = getArrayComponents(param.type);\n if (arrayComponents) {\n const [length2, type] = arrayComponents;\n return decodeArray(cursor, { ...param, type }, { length: length2, staticPosition });\n }\n if (param.type === \"tuple\")\n return decodeTuple(cursor, param, { staticPosition });\n if (param.type === \"address\")\n return decodeAddress(cursor);\n if (param.type === \"bool\")\n return decodeBool(cursor);\n if (param.type.startsWith(\"bytes\"))\n return decodeBytes(cursor, param, { staticPosition });\n if (param.type.startsWith(\"uint\") || param.type.startsWith(\"int\"))\n return decodeNumber(cursor, param);\n if (param.type === \"string\")\n return decodeString(cursor, { staticPosition });\n throw new InvalidAbiDecodingTypeError(param.type, {\n docsPath: \"/docs/contract/decodeAbiParameters\"\n });\n }\n function decodeAddress(cursor) {\n const value = cursor.readBytes(32);\n return [checksumAddress(bytesToHex(sliceBytes(value, -20))), 32];\n }\n function decodeArray(cursor, param, { length: length2, staticPosition }) {\n if (!length2) {\n const offset = bytesToNumber(cursor.readBytes(sizeOfOffset));\n const start = staticPosition + offset;\n const startOfData = start + sizeOfLength;\n cursor.setPosition(start);\n const length3 = bytesToNumber(cursor.readBytes(sizeOfLength));\n const dynamicChild = hasDynamicChild(param);\n let consumed2 = 0;\n const value2 = [];\n for (let i3 = 0; i3 < length3; ++i3) {\n cursor.setPosition(startOfData + (dynamicChild ? i3 * 32 : consumed2));\n const [data, consumed_] = decodeParameter(cursor, param, {\n staticPosition: startOfData\n });\n consumed2 += consumed_;\n value2.push(data);\n }\n cursor.setPosition(staticPosition + 32);\n return [value2, 32];\n }\n if (hasDynamicChild(param)) {\n const offset = bytesToNumber(cursor.readBytes(sizeOfOffset));\n const start = staticPosition + offset;\n const value2 = [];\n for (let i3 = 0; i3 < length2; ++i3) {\n cursor.setPosition(start + i3 * 32);\n const [data] = decodeParameter(cursor, param, {\n staticPosition: start\n });\n value2.push(data);\n }\n cursor.setPosition(staticPosition + 32);\n return [value2, 32];\n }\n let consumed = 0;\n const value = [];\n for (let i3 = 0; i3 < length2; ++i3) {\n const [data, consumed_] = decodeParameter(cursor, param, {\n staticPosition: staticPosition + consumed\n });\n consumed += consumed_;\n value.push(data);\n }\n return [value, consumed];\n }\n function decodeBool(cursor) {\n return [bytesToBool(cursor.readBytes(32), { size: 32 }), 32];\n }\n function decodeBytes(cursor, param, { staticPosition }) {\n const [_2, size6] = param.type.split(\"bytes\");\n if (!size6) {\n const offset = bytesToNumber(cursor.readBytes(32));\n cursor.setPosition(staticPosition + offset);\n const length2 = bytesToNumber(cursor.readBytes(32));\n if (length2 === 0) {\n cursor.setPosition(staticPosition + 32);\n return [\"0x\", 32];\n }\n const data = cursor.readBytes(length2);\n cursor.setPosition(staticPosition + 32);\n return [bytesToHex(data), 32];\n }\n const value = bytesToHex(cursor.readBytes(Number.parseInt(size6, 10), 32));\n return [value, 32];\n }\n function decodeNumber(cursor, param) {\n const signed = param.type.startsWith(\"int\");\n const size6 = Number.parseInt(param.type.split(\"int\")[1] || \"256\", 10);\n const value = cursor.readBytes(32);\n return [\n size6 > 48 ? bytesToBigInt(value, { signed }) : bytesToNumber(value, { signed }),\n 32\n ];\n }\n function decodeTuple(cursor, param, { staticPosition }) {\n const hasUnnamedChild = param.components.length === 0 || param.components.some(({ name }) => !name);\n const value = hasUnnamedChild ? [] : {};\n let consumed = 0;\n if (hasDynamicChild(param)) {\n const offset = bytesToNumber(cursor.readBytes(sizeOfOffset));\n const start = staticPosition + offset;\n for (let i3 = 0; i3 < param.components.length; ++i3) {\n const component = param.components[i3];\n cursor.setPosition(start + consumed);\n const [data, consumed_] = decodeParameter(cursor, component, {\n staticPosition: start\n });\n consumed += consumed_;\n value[hasUnnamedChild ? i3 : component?.name] = data;\n }\n cursor.setPosition(staticPosition + 32);\n return [value, 32];\n }\n for (let i3 = 0; i3 < param.components.length; ++i3) {\n const component = param.components[i3];\n const [data, consumed_] = decodeParameter(cursor, component, {\n staticPosition\n });\n value[hasUnnamedChild ? i3 : component?.name] = data;\n consumed += consumed_;\n }\n return [value, consumed];\n }\n function decodeString(cursor, { staticPosition }) {\n const offset = bytesToNumber(cursor.readBytes(32));\n const start = staticPosition + offset;\n cursor.setPosition(start);\n const length2 = bytesToNumber(cursor.readBytes(32));\n if (length2 === 0) {\n cursor.setPosition(staticPosition + 32);\n return [\"\", 32];\n }\n const data = cursor.readBytes(length2, 32);\n const value = bytesToString(trim(data));\n cursor.setPosition(staticPosition + 32);\n return [value, 32];\n }\n function hasDynamicChild(param) {\n const { type } = param;\n if (type === \"string\")\n return true;\n if (type === \"bytes\")\n return true;\n if (type.endsWith(\"[]\"))\n return true;\n if (type === \"tuple\")\n return param.components?.some(hasDynamicChild);\n const arrayComponents = getArrayComponents(param.type);\n if (arrayComponents && hasDynamicChild({ ...param, type: arrayComponents[1] }))\n return true;\n return false;\n }\n var sizeOfLength, sizeOfOffset;\n var init_decodeAbiParameters = __esm({\n \"../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/utils/abi/decodeAbiParameters.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_abi();\n init_getAddress();\n init_cursor2();\n init_size();\n init_slice();\n init_trim();\n init_fromBytes();\n init_toBytes();\n init_toHex();\n init_encodeAbiParameters();\n sizeOfLength = 32;\n sizeOfOffset = 32;\n }\n });\n\n // ../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/utils/abi/decodeErrorResult.js\n function decodeErrorResult(parameters) {\n const { abi: abi2, data } = parameters;\n const signature = slice(data, 0, 4);\n if (signature === \"0x\")\n throw new AbiDecodingZeroDataError();\n const abi_ = [...abi2 || [], solidityError, solidityPanic];\n const abiItem = abi_.find((x4) => x4.type === \"error\" && signature === toFunctionSelector(formatAbiItem2(x4)));\n if (!abiItem)\n throw new AbiErrorSignatureNotFoundError(signature, {\n docsPath: \"/docs/contract/decodeErrorResult\"\n });\n return {\n abiItem,\n args: \"inputs\" in abiItem && abiItem.inputs && abiItem.inputs.length > 0 ? decodeAbiParameters(abiItem.inputs, slice(data, 4)) : void 0,\n errorName: abiItem.name\n };\n }\n var init_decodeErrorResult = __esm({\n \"../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/utils/abi/decodeErrorResult.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_solidity();\n init_abi();\n init_slice();\n init_toFunctionSelector();\n init_decodeAbiParameters();\n init_formatAbiItem2();\n }\n });\n\n // ../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/utils/stringify.js\n var stringify;\n var init_stringify = __esm({\n \"../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/utils/stringify.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n stringify = (value, replacer, space) => JSON.stringify(value, (key, value_) => {\n const value2 = typeof value_ === \"bigint\" ? value_.toString() : value_;\n return typeof replacer === \"function\" ? replacer(key, value2) : value2;\n }, space);\n }\n });\n\n // ../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/utils/abi/formatAbiItemWithArgs.js\n function formatAbiItemWithArgs({ abiItem, args, includeFunctionName = true, includeName = false }) {\n if (!(\"name\" in abiItem))\n return;\n if (!(\"inputs\" in abiItem))\n return;\n if (!abiItem.inputs)\n return;\n return `${includeFunctionName ? abiItem.name : \"\"}(${abiItem.inputs.map((input, i3) => `${includeName && input.name ? `${input.name}: ` : \"\"}${typeof args[i3] === \"object\" ? stringify(args[i3]) : args[i3]}`).join(\", \")})`;\n }\n var init_formatAbiItemWithArgs = __esm({\n \"../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/utils/abi/formatAbiItemWithArgs.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_stringify();\n }\n });\n\n // ../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/constants/unit.js\n var etherUnits, gweiUnits;\n var init_unit = __esm({\n \"../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/constants/unit.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n etherUnits = {\n gwei: 9,\n wei: 18\n };\n gweiUnits = {\n ether: -9,\n wei: 9\n };\n }\n });\n\n // ../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/utils/unit/formatUnits.js\n function formatUnits(value, decimals) {\n let display = value.toString();\n const negative = display.startsWith(\"-\");\n if (negative)\n display = display.slice(1);\n display = display.padStart(decimals, \"0\");\n let [integer2, fraction] = [\n display.slice(0, display.length - decimals),\n display.slice(display.length - decimals)\n ];\n fraction = fraction.replace(/(0+)$/, \"\");\n return `${negative ? \"-\" : \"\"}${integer2 || \"0\"}${fraction ? `.${fraction}` : \"\"}`;\n }\n var init_formatUnits = __esm({\n \"../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/utils/unit/formatUnits.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n }\n });\n\n // ../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/utils/unit/formatEther.js\n function formatEther(wei, unit = \"wei\") {\n return formatUnits(wei, etherUnits[unit]);\n }\n var init_formatEther = __esm({\n \"../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/utils/unit/formatEther.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_unit();\n init_formatUnits();\n }\n });\n\n // ../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/utils/unit/formatGwei.js\n function formatGwei(wei, unit = \"wei\") {\n return formatUnits(wei, gweiUnits[unit]);\n }\n var init_formatGwei = __esm({\n \"../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/utils/unit/formatGwei.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_unit();\n init_formatUnits();\n }\n });\n\n // ../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/errors/stateOverride.js\n function prettyStateMapping(stateMapping) {\n return stateMapping.reduce((pretty, { slot, value }) => {\n return `${pretty} ${slot}: ${value}\n`;\n }, \"\");\n }\n function prettyStateOverride(stateOverride) {\n return stateOverride.reduce((pretty, { address, ...state }) => {\n let val = `${pretty} ${address}:\n`;\n if (state.nonce)\n val += ` nonce: ${state.nonce}\n`;\n if (state.balance)\n val += ` balance: ${state.balance}\n`;\n if (state.code)\n val += ` code: ${state.code}\n`;\n if (state.state) {\n val += \" state:\\n\";\n val += prettyStateMapping(state.state);\n }\n if (state.stateDiff) {\n val += \" stateDiff:\\n\";\n val += prettyStateMapping(state.stateDiff);\n }\n return val;\n }, \" State Override:\\n\").slice(0, -1);\n }\n var AccountStateConflictError, StateAssignmentConflictError;\n var init_stateOverride = __esm({\n \"../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/errors/stateOverride.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_base();\n AccountStateConflictError = class extends BaseError2 {\n constructor({ address }) {\n super(`State for account \"${address}\" is set multiple times.`, {\n name: \"AccountStateConflictError\"\n });\n }\n };\n StateAssignmentConflictError = class extends BaseError2 {\n constructor() {\n super(\"state and stateDiff are set on the same account.\", {\n name: \"StateAssignmentConflictError\"\n });\n }\n };\n }\n });\n\n // ../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/errors/transaction.js\n function prettyPrint(args) {\n const entries = Object.entries(args).map(([key, value]) => {\n if (value === void 0 || value === false)\n return null;\n return [key, value];\n }).filter(Boolean);\n const maxLength = entries.reduce((acc, [key]) => Math.max(acc, key.length), 0);\n return entries.map(([key, value]) => ` ${`${key}:`.padEnd(maxLength + 1)} ${value}`).join(\"\\n\");\n }\n var FeeConflictError, InvalidLegacyVError, InvalidSerializableTransactionError, InvalidStorageKeySizeError, TransactionExecutionError, TransactionNotFoundError, TransactionReceiptNotFoundError, TransactionReceiptRevertedError, WaitForTransactionReceiptTimeoutError;\n var init_transaction = __esm({\n \"../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/errors/transaction.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_formatEther();\n init_formatGwei();\n init_base();\n FeeConflictError = class extends BaseError2 {\n constructor() {\n super([\n \"Cannot specify both a `gasPrice` and a `maxFeePerGas`/`maxPriorityFeePerGas`.\",\n \"Use `maxFeePerGas`/`maxPriorityFeePerGas` for EIP-1559 compatible networks, and `gasPrice` for others.\"\n ].join(\"\\n\"), { name: \"FeeConflictError\" });\n }\n };\n InvalidLegacyVError = class extends BaseError2 {\n constructor({ v: v2 }) {\n super(`Invalid \\`v\\` value \"${v2}\". Expected 27 or 28.`, {\n name: \"InvalidLegacyVError\"\n });\n }\n };\n InvalidSerializableTransactionError = class extends BaseError2 {\n constructor({ transaction }) {\n super(\"Cannot infer a transaction type from provided transaction.\", {\n metaMessages: [\n \"Provided Transaction:\",\n \"{\",\n prettyPrint(transaction),\n \"}\",\n \"\",\n \"To infer the type, either provide:\",\n \"- a `type` to the Transaction, or\",\n \"- an EIP-1559 Transaction with `maxFeePerGas`, or\",\n \"- an EIP-2930 Transaction with `gasPrice` & `accessList`, or\",\n \"- an EIP-4844 Transaction with `blobs`, `blobVersionedHashes`, `sidecars`, or\",\n \"- an EIP-7702 Transaction with `authorizationList`, or\",\n \"- a Legacy Transaction with `gasPrice`\"\n ],\n name: \"InvalidSerializableTransactionError\"\n });\n }\n };\n InvalidStorageKeySizeError = class extends BaseError2 {\n constructor({ storageKey }) {\n super(`Size for storage key \"${storageKey}\" is invalid. Expected 32 bytes. Got ${Math.floor((storageKey.length - 2) / 2)} bytes.`, { name: \"InvalidStorageKeySizeError\" });\n }\n };\n TransactionExecutionError = class extends BaseError2 {\n constructor(cause, { account, docsPath: docsPath8, chain: chain2, data, gas, gasPrice, maxFeePerGas, maxPriorityFeePerGas, nonce, to, value }) {\n const prettyArgs = prettyPrint({\n chain: chain2 && `${chain2?.name} (id: ${chain2?.id})`,\n from: account?.address,\n to,\n value: typeof value !== \"undefined\" && `${formatEther(value)} ${chain2?.nativeCurrency?.symbol || \"ETH\"}`,\n data,\n gas,\n gasPrice: typeof gasPrice !== \"undefined\" && `${formatGwei(gasPrice)} gwei`,\n maxFeePerGas: typeof maxFeePerGas !== \"undefined\" && `${formatGwei(maxFeePerGas)} gwei`,\n maxPriorityFeePerGas: typeof maxPriorityFeePerGas !== \"undefined\" && `${formatGwei(maxPriorityFeePerGas)} gwei`,\n nonce\n });\n super(cause.shortMessage, {\n cause,\n docsPath: docsPath8,\n metaMessages: [\n ...cause.metaMessages ? [...cause.metaMessages, \" \"] : [],\n \"Request Arguments:\",\n prettyArgs\n ].filter(Boolean),\n name: \"TransactionExecutionError\"\n });\n Object.defineProperty(this, \"cause\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: void 0\n });\n this.cause = cause;\n }\n };\n TransactionNotFoundError = class extends BaseError2 {\n constructor({ blockHash, blockNumber, blockTag, hash: hash3, index: index2 }) {\n let identifier = \"Transaction\";\n if (blockTag && index2 !== void 0)\n identifier = `Transaction at block time \"${blockTag}\" at index \"${index2}\"`;\n if (blockHash && index2 !== void 0)\n identifier = `Transaction at block hash \"${blockHash}\" at index \"${index2}\"`;\n if (blockNumber && index2 !== void 0)\n identifier = `Transaction at block number \"${blockNumber}\" at index \"${index2}\"`;\n if (hash3)\n identifier = `Transaction with hash \"${hash3}\"`;\n super(`${identifier} could not be found.`, {\n name: \"TransactionNotFoundError\"\n });\n }\n };\n TransactionReceiptNotFoundError = class extends BaseError2 {\n constructor({ hash: hash3 }) {\n super(`Transaction receipt with hash \"${hash3}\" could not be found. The Transaction may not be processed on a block yet.`, {\n name: \"TransactionReceiptNotFoundError\"\n });\n }\n };\n TransactionReceiptRevertedError = class extends BaseError2 {\n constructor({ receipt }) {\n super(`Transaction with hash \"${receipt.transactionHash}\" reverted.`, {\n metaMessages: [\n 'The receipt marked the transaction as \"reverted\". This could mean that the function on the contract you are trying to call threw an error.',\n \" \",\n \"You can attempt to extract the revert reason by:\",\n \"- calling the `simulateContract` or `simulateCalls` Action with the `abi` and `functionName` of the contract\",\n \"- using the `call` Action with raw `data`\"\n ],\n name: \"TransactionReceiptRevertedError\"\n });\n Object.defineProperty(this, \"receipt\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: void 0\n });\n this.receipt = receipt;\n }\n };\n WaitForTransactionReceiptTimeoutError = class extends BaseError2 {\n constructor({ hash: hash3 }) {\n super(`Timed out while waiting for transaction with hash \"${hash3}\" to be confirmed.`, { name: \"WaitForTransactionReceiptTimeoutError\" });\n }\n };\n }\n });\n\n // ../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/errors/utils.js\n var getContractAddress, getUrl;\n var init_utils4 = __esm({\n \"../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/errors/utils.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n getContractAddress = (address) => address;\n getUrl = (url) => url;\n }\n });\n\n // ../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/errors/contract.js\n var CallExecutionError, ContractFunctionExecutionError, ContractFunctionRevertedError, ContractFunctionZeroDataError, CounterfactualDeploymentFailedError, RawContractError;\n var init_contract = __esm({\n \"../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/errors/contract.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_parseAccount();\n init_solidity();\n init_decodeErrorResult();\n init_formatAbiItem2();\n init_formatAbiItemWithArgs();\n init_getAbiItem();\n init_formatEther();\n init_formatGwei();\n init_abi();\n init_base();\n init_stateOverride();\n init_transaction();\n init_utils4();\n CallExecutionError = class extends BaseError2 {\n constructor(cause, { account: account_, docsPath: docsPath8, chain: chain2, data, gas, gasPrice, maxFeePerGas, maxPriorityFeePerGas, nonce, to, value, stateOverride }) {\n const account = account_ ? parseAccount(account_) : void 0;\n let prettyArgs = prettyPrint({\n from: account?.address,\n to,\n value: typeof value !== \"undefined\" && `${formatEther(value)} ${chain2?.nativeCurrency?.symbol || \"ETH\"}`,\n data,\n gas,\n gasPrice: typeof gasPrice !== \"undefined\" && `${formatGwei(gasPrice)} gwei`,\n maxFeePerGas: typeof maxFeePerGas !== \"undefined\" && `${formatGwei(maxFeePerGas)} gwei`,\n maxPriorityFeePerGas: typeof maxPriorityFeePerGas !== \"undefined\" && `${formatGwei(maxPriorityFeePerGas)} gwei`,\n nonce\n });\n if (stateOverride) {\n prettyArgs += `\n${prettyStateOverride(stateOverride)}`;\n }\n super(cause.shortMessage, {\n cause,\n docsPath: docsPath8,\n metaMessages: [\n ...cause.metaMessages ? [...cause.metaMessages, \" \"] : [],\n \"Raw Call Arguments:\",\n prettyArgs\n ].filter(Boolean),\n name: \"CallExecutionError\"\n });\n Object.defineProperty(this, \"cause\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: void 0\n });\n this.cause = cause;\n }\n };\n ContractFunctionExecutionError = class extends BaseError2 {\n constructor(cause, { abi: abi2, args, contractAddress, docsPath: docsPath8, functionName, sender }) {\n const abiItem = getAbiItem({ abi: abi2, args, name: functionName });\n const formattedArgs = abiItem ? formatAbiItemWithArgs({\n abiItem,\n args,\n includeFunctionName: false,\n includeName: false\n }) : void 0;\n const functionWithParams = abiItem ? formatAbiItem2(abiItem, { includeName: true }) : void 0;\n const prettyArgs = prettyPrint({\n address: contractAddress && getContractAddress(contractAddress),\n function: functionWithParams,\n args: formattedArgs && formattedArgs !== \"()\" && `${[...Array(functionName?.length ?? 0).keys()].map(() => \" \").join(\"\")}${formattedArgs}`,\n sender\n });\n super(cause.shortMessage || `An unknown error occurred while executing the contract function \"${functionName}\".`, {\n cause,\n docsPath: docsPath8,\n metaMessages: [\n ...cause.metaMessages ? [...cause.metaMessages, \" \"] : [],\n prettyArgs && \"Contract Call:\",\n prettyArgs\n ].filter(Boolean),\n name: \"ContractFunctionExecutionError\"\n });\n Object.defineProperty(this, \"abi\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: void 0\n });\n Object.defineProperty(this, \"args\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: void 0\n });\n Object.defineProperty(this, \"cause\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: void 0\n });\n Object.defineProperty(this, \"contractAddress\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: void 0\n });\n Object.defineProperty(this, \"formattedArgs\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: void 0\n });\n Object.defineProperty(this, \"functionName\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: void 0\n });\n Object.defineProperty(this, \"sender\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: void 0\n });\n this.abi = abi2;\n this.args = args;\n this.cause = cause;\n this.contractAddress = contractAddress;\n this.functionName = functionName;\n this.sender = sender;\n }\n };\n ContractFunctionRevertedError = class extends BaseError2 {\n constructor({ abi: abi2, data, functionName, message }) {\n let cause;\n let decodedData;\n let metaMessages;\n let reason;\n if (data && data !== \"0x\") {\n try {\n decodedData = decodeErrorResult({ abi: abi2, data });\n const { abiItem, errorName, args: errorArgs } = decodedData;\n if (errorName === \"Error\") {\n reason = errorArgs[0];\n } else if (errorName === \"Panic\") {\n const [firstArg] = errorArgs;\n reason = panicReasons[firstArg];\n } else {\n const errorWithParams = abiItem ? formatAbiItem2(abiItem, { includeName: true }) : void 0;\n const formattedArgs = abiItem && errorArgs ? formatAbiItemWithArgs({\n abiItem,\n args: errorArgs,\n includeFunctionName: false,\n includeName: false\n }) : void 0;\n metaMessages = [\n errorWithParams ? `Error: ${errorWithParams}` : \"\",\n formattedArgs && formattedArgs !== \"()\" ? ` ${[...Array(errorName?.length ?? 0).keys()].map(() => \" \").join(\"\")}${formattedArgs}` : \"\"\n ];\n }\n } catch (err) {\n cause = err;\n }\n } else if (message)\n reason = message;\n let signature;\n if (cause instanceof AbiErrorSignatureNotFoundError) {\n signature = cause.signature;\n metaMessages = [\n `Unable to decode signature \"${signature}\" as it was not found on the provided ABI.`,\n \"Make sure you are using the correct ABI and that the error exists on it.\",\n `You can look up the decoded signature here: https://openchain.xyz/signatures?query=${signature}.`\n ];\n }\n super(reason && reason !== \"execution reverted\" || signature ? [\n `The contract function \"${functionName}\" reverted with the following ${signature ? \"signature\" : \"reason\"}:`,\n reason || signature\n ].join(\"\\n\") : `The contract function \"${functionName}\" reverted.`, {\n cause,\n metaMessages,\n name: \"ContractFunctionRevertedError\"\n });\n Object.defineProperty(this, \"data\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: void 0\n });\n Object.defineProperty(this, \"raw\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: void 0\n });\n Object.defineProperty(this, \"reason\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: void 0\n });\n Object.defineProperty(this, \"signature\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: void 0\n });\n this.data = decodedData;\n this.raw = data;\n this.reason = reason;\n this.signature = signature;\n }\n };\n ContractFunctionZeroDataError = class extends BaseError2 {\n constructor({ functionName }) {\n super(`The contract function \"${functionName}\" returned no data (\"0x\").`, {\n metaMessages: [\n \"This could be due to any of the following:\",\n ` - The contract does not have the function \"${functionName}\",`,\n \" - The parameters passed to the contract function may be invalid, or\",\n \" - The address is not a contract.\"\n ],\n name: \"ContractFunctionZeroDataError\"\n });\n }\n };\n CounterfactualDeploymentFailedError = class extends BaseError2 {\n constructor({ factory }) {\n super(`Deployment for counterfactual contract call failed${factory ? ` for factory \"${factory}\".` : \"\"}`, {\n metaMessages: [\n \"Please ensure:\",\n \"- The `factory` is a valid contract deployment factory (ie. Create2 Factory, ERC-4337 Factory, etc).\",\n \"- The `factoryData` is a valid encoded function call for contract deployment function on the factory.\"\n ],\n name: \"CounterfactualDeploymentFailedError\"\n });\n }\n };\n RawContractError = class extends BaseError2 {\n constructor({ data, message }) {\n super(message || \"\", { name: \"RawContractError\" });\n Object.defineProperty(this, \"code\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: 3\n });\n Object.defineProperty(this, \"data\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: void 0\n });\n this.data = data;\n }\n };\n }\n });\n\n // ../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/errors/request.js\n var HttpRequestError, RpcRequestError, TimeoutError;\n var init_request = __esm({\n \"../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/errors/request.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_stringify();\n init_base();\n init_utils4();\n HttpRequestError = class extends BaseError2 {\n constructor({ body, cause, details, headers, status, url }) {\n super(\"HTTP request failed.\", {\n cause,\n details,\n metaMessages: [\n status && `Status: ${status}`,\n `URL: ${getUrl(url)}`,\n body && `Request body: ${stringify(body)}`\n ].filter(Boolean),\n name: \"HttpRequestError\"\n });\n Object.defineProperty(this, \"body\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: void 0\n });\n Object.defineProperty(this, \"headers\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: void 0\n });\n Object.defineProperty(this, \"status\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: void 0\n });\n Object.defineProperty(this, \"url\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: void 0\n });\n this.body = body;\n this.headers = headers;\n this.status = status;\n this.url = url;\n }\n };\n RpcRequestError = class extends BaseError2 {\n constructor({ body, error, url }) {\n super(\"RPC Request failed.\", {\n cause: error,\n details: error.message,\n metaMessages: [`URL: ${getUrl(url)}`, `Request body: ${stringify(body)}`],\n name: \"RpcRequestError\"\n });\n Object.defineProperty(this, \"code\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: void 0\n });\n Object.defineProperty(this, \"data\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: void 0\n });\n this.code = error.code;\n this.data = error.data;\n }\n };\n TimeoutError = class extends BaseError2 {\n constructor({ body, url }) {\n super(\"The request took too long to respond.\", {\n details: \"The request timed out.\",\n metaMessages: [`URL: ${getUrl(url)}`, `Request body: ${stringify(body)}`],\n name: \"TimeoutError\"\n });\n }\n };\n }\n });\n\n // ../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/errors/rpc.js\n var unknownErrorCode, RpcError, ProviderRpcError, ParseRpcError, InvalidRequestRpcError, MethodNotFoundRpcError, InvalidParamsRpcError, InternalRpcError, InvalidInputRpcError, ResourceNotFoundRpcError, ResourceUnavailableRpcError, TransactionRejectedRpcError, MethodNotSupportedRpcError, LimitExceededRpcError, JsonRpcVersionUnsupportedError, UserRejectedRequestError, UnauthorizedProviderError, UnsupportedProviderMethodError, ProviderDisconnectedError, ChainDisconnectedError, SwitchChainError, UnsupportedNonOptionalCapabilityError, UnsupportedChainIdError, DuplicateIdError, UnknownBundleIdError, BundleTooLargeError, AtomicReadyWalletRejectedUpgradeError, AtomicityNotSupportedError, UnknownRpcError;\n var init_rpc = __esm({\n \"../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/errors/rpc.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_base();\n init_request();\n unknownErrorCode = -1;\n RpcError = class extends BaseError2 {\n constructor(cause, { code, docsPath: docsPath8, metaMessages, name, shortMessage }) {\n super(shortMessage, {\n cause,\n docsPath: docsPath8,\n metaMessages: metaMessages || cause?.metaMessages,\n name: name || \"RpcError\"\n });\n Object.defineProperty(this, \"code\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: void 0\n });\n this.name = name || cause.name;\n this.code = cause instanceof RpcRequestError ? cause.code : code ?? unknownErrorCode;\n }\n };\n ProviderRpcError = class extends RpcError {\n constructor(cause, options) {\n super(cause, options);\n Object.defineProperty(this, \"data\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: void 0\n });\n this.data = options.data;\n }\n };\n ParseRpcError = class _ParseRpcError extends RpcError {\n constructor(cause) {\n super(cause, {\n code: _ParseRpcError.code,\n name: \"ParseRpcError\",\n shortMessage: \"Invalid JSON was received by the server. An error occurred on the server while parsing the JSON text.\"\n });\n }\n };\n Object.defineProperty(ParseRpcError, \"code\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: -32700\n });\n InvalidRequestRpcError = class _InvalidRequestRpcError extends RpcError {\n constructor(cause) {\n super(cause, {\n code: _InvalidRequestRpcError.code,\n name: \"InvalidRequestRpcError\",\n shortMessage: \"JSON is not a valid request object.\"\n });\n }\n };\n Object.defineProperty(InvalidRequestRpcError, \"code\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: -32600\n });\n MethodNotFoundRpcError = class _MethodNotFoundRpcError extends RpcError {\n constructor(cause, { method } = {}) {\n super(cause, {\n code: _MethodNotFoundRpcError.code,\n name: \"MethodNotFoundRpcError\",\n shortMessage: `The method${method ? ` \"${method}\"` : \"\"} does not exist / is not available.`\n });\n }\n };\n Object.defineProperty(MethodNotFoundRpcError, \"code\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: -32601\n });\n InvalidParamsRpcError = class _InvalidParamsRpcError extends RpcError {\n constructor(cause) {\n super(cause, {\n code: _InvalidParamsRpcError.code,\n name: \"InvalidParamsRpcError\",\n shortMessage: [\n \"Invalid parameters were provided to the RPC method.\",\n \"Double check you have provided the correct parameters.\"\n ].join(\"\\n\")\n });\n }\n };\n Object.defineProperty(InvalidParamsRpcError, \"code\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: -32602\n });\n InternalRpcError = class _InternalRpcError extends RpcError {\n constructor(cause) {\n super(cause, {\n code: _InternalRpcError.code,\n name: \"InternalRpcError\",\n shortMessage: \"An internal error was received.\"\n });\n }\n };\n Object.defineProperty(InternalRpcError, \"code\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: -32603\n });\n InvalidInputRpcError = class _InvalidInputRpcError extends RpcError {\n constructor(cause) {\n super(cause, {\n code: _InvalidInputRpcError.code,\n name: \"InvalidInputRpcError\",\n shortMessage: [\n \"Missing or invalid parameters.\",\n \"Double check you have provided the correct parameters.\"\n ].join(\"\\n\")\n });\n }\n };\n Object.defineProperty(InvalidInputRpcError, \"code\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: -32e3\n });\n ResourceNotFoundRpcError = class _ResourceNotFoundRpcError extends RpcError {\n constructor(cause) {\n super(cause, {\n code: _ResourceNotFoundRpcError.code,\n name: \"ResourceNotFoundRpcError\",\n shortMessage: \"Requested resource not found.\"\n });\n Object.defineProperty(this, \"name\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: \"ResourceNotFoundRpcError\"\n });\n }\n };\n Object.defineProperty(ResourceNotFoundRpcError, \"code\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: -32001\n });\n ResourceUnavailableRpcError = class _ResourceUnavailableRpcError extends RpcError {\n constructor(cause) {\n super(cause, {\n code: _ResourceUnavailableRpcError.code,\n name: \"ResourceUnavailableRpcError\",\n shortMessage: \"Requested resource not available.\"\n });\n }\n };\n Object.defineProperty(ResourceUnavailableRpcError, \"code\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: -32002\n });\n TransactionRejectedRpcError = class _TransactionRejectedRpcError extends RpcError {\n constructor(cause) {\n super(cause, {\n code: _TransactionRejectedRpcError.code,\n name: \"TransactionRejectedRpcError\",\n shortMessage: \"Transaction creation failed.\"\n });\n }\n };\n Object.defineProperty(TransactionRejectedRpcError, \"code\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: -32003\n });\n MethodNotSupportedRpcError = class _MethodNotSupportedRpcError extends RpcError {\n constructor(cause, { method } = {}) {\n super(cause, {\n code: _MethodNotSupportedRpcError.code,\n name: \"MethodNotSupportedRpcError\",\n shortMessage: `Method${method ? ` \"${method}\"` : \"\"} is not supported.`\n });\n }\n };\n Object.defineProperty(MethodNotSupportedRpcError, \"code\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: -32004\n });\n LimitExceededRpcError = class _LimitExceededRpcError extends RpcError {\n constructor(cause) {\n super(cause, {\n code: _LimitExceededRpcError.code,\n name: \"LimitExceededRpcError\",\n shortMessage: \"Request exceeds defined limit.\"\n });\n }\n };\n Object.defineProperty(LimitExceededRpcError, \"code\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: -32005\n });\n JsonRpcVersionUnsupportedError = class _JsonRpcVersionUnsupportedError extends RpcError {\n constructor(cause) {\n super(cause, {\n code: _JsonRpcVersionUnsupportedError.code,\n name: \"JsonRpcVersionUnsupportedError\",\n shortMessage: \"Version of JSON-RPC protocol is not supported.\"\n });\n }\n };\n Object.defineProperty(JsonRpcVersionUnsupportedError, \"code\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: -32006\n });\n UserRejectedRequestError = class _UserRejectedRequestError extends ProviderRpcError {\n constructor(cause) {\n super(cause, {\n code: _UserRejectedRequestError.code,\n name: \"UserRejectedRequestError\",\n shortMessage: \"User rejected the request.\"\n });\n }\n };\n Object.defineProperty(UserRejectedRequestError, \"code\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: 4001\n });\n UnauthorizedProviderError = class _UnauthorizedProviderError extends ProviderRpcError {\n constructor(cause) {\n super(cause, {\n code: _UnauthorizedProviderError.code,\n name: \"UnauthorizedProviderError\",\n shortMessage: \"The requested method and/or account has not been authorized by the user.\"\n });\n }\n };\n Object.defineProperty(UnauthorizedProviderError, \"code\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: 4100\n });\n UnsupportedProviderMethodError = class _UnsupportedProviderMethodError extends ProviderRpcError {\n constructor(cause, { method } = {}) {\n super(cause, {\n code: _UnsupportedProviderMethodError.code,\n name: \"UnsupportedProviderMethodError\",\n shortMessage: `The Provider does not support the requested method${method ? ` \" ${method}\"` : \"\"}.`\n });\n }\n };\n Object.defineProperty(UnsupportedProviderMethodError, \"code\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: 4200\n });\n ProviderDisconnectedError = class _ProviderDisconnectedError extends ProviderRpcError {\n constructor(cause) {\n super(cause, {\n code: _ProviderDisconnectedError.code,\n name: \"ProviderDisconnectedError\",\n shortMessage: \"The Provider is disconnected from all chains.\"\n });\n }\n };\n Object.defineProperty(ProviderDisconnectedError, \"code\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: 4900\n });\n ChainDisconnectedError = class _ChainDisconnectedError extends ProviderRpcError {\n constructor(cause) {\n super(cause, {\n code: _ChainDisconnectedError.code,\n name: \"ChainDisconnectedError\",\n shortMessage: \"The Provider is not connected to the requested chain.\"\n });\n }\n };\n Object.defineProperty(ChainDisconnectedError, \"code\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: 4901\n });\n SwitchChainError = class _SwitchChainError extends ProviderRpcError {\n constructor(cause) {\n super(cause, {\n code: _SwitchChainError.code,\n name: \"SwitchChainError\",\n shortMessage: \"An error occurred when attempting to switch chain.\"\n });\n }\n };\n Object.defineProperty(SwitchChainError, \"code\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: 4902\n });\n UnsupportedNonOptionalCapabilityError = class _UnsupportedNonOptionalCapabilityError extends ProviderRpcError {\n constructor(cause) {\n super(cause, {\n code: _UnsupportedNonOptionalCapabilityError.code,\n name: \"UnsupportedNonOptionalCapabilityError\",\n shortMessage: \"This Wallet does not support a capability that was not marked as optional.\"\n });\n }\n };\n Object.defineProperty(UnsupportedNonOptionalCapabilityError, \"code\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: 5700\n });\n UnsupportedChainIdError = class _UnsupportedChainIdError extends ProviderRpcError {\n constructor(cause) {\n super(cause, {\n code: _UnsupportedChainIdError.code,\n name: \"UnsupportedChainIdError\",\n shortMessage: \"This Wallet does not support the requested chain ID.\"\n });\n }\n };\n Object.defineProperty(UnsupportedChainIdError, \"code\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: 5710\n });\n DuplicateIdError = class _DuplicateIdError extends ProviderRpcError {\n constructor(cause) {\n super(cause, {\n code: _DuplicateIdError.code,\n name: \"DuplicateIdError\",\n shortMessage: \"There is already a bundle submitted with this ID.\"\n });\n }\n };\n Object.defineProperty(DuplicateIdError, \"code\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: 5720\n });\n UnknownBundleIdError = class _UnknownBundleIdError extends ProviderRpcError {\n constructor(cause) {\n super(cause, {\n code: _UnknownBundleIdError.code,\n name: \"UnknownBundleIdError\",\n shortMessage: \"This bundle id is unknown / has not been submitted\"\n });\n }\n };\n Object.defineProperty(UnknownBundleIdError, \"code\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: 5730\n });\n BundleTooLargeError = class _BundleTooLargeError extends ProviderRpcError {\n constructor(cause) {\n super(cause, {\n code: _BundleTooLargeError.code,\n name: \"BundleTooLargeError\",\n shortMessage: \"The call bundle is too large for the Wallet to process.\"\n });\n }\n };\n Object.defineProperty(BundleTooLargeError, \"code\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: 5740\n });\n AtomicReadyWalletRejectedUpgradeError = class _AtomicReadyWalletRejectedUpgradeError extends ProviderRpcError {\n constructor(cause) {\n super(cause, {\n code: _AtomicReadyWalletRejectedUpgradeError.code,\n name: \"AtomicReadyWalletRejectedUpgradeError\",\n shortMessage: \"The Wallet can support atomicity after an upgrade, but the user rejected the upgrade.\"\n });\n }\n };\n Object.defineProperty(AtomicReadyWalletRejectedUpgradeError, \"code\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: 5750\n });\n AtomicityNotSupportedError = class _AtomicityNotSupportedError extends ProviderRpcError {\n constructor(cause) {\n super(cause, {\n code: _AtomicityNotSupportedError.code,\n name: \"AtomicityNotSupportedError\",\n shortMessage: \"The wallet does not support atomic execution but the request requires it.\"\n });\n }\n };\n Object.defineProperty(AtomicityNotSupportedError, \"code\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: 5760\n });\n UnknownRpcError = class extends RpcError {\n constructor(cause) {\n super(cause, {\n name: \"UnknownRpcError\",\n shortMessage: \"An unknown RPC error occurred.\"\n });\n }\n };\n }\n });\n\n // ../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/utils/errors/getContractError.js\n function getContractError(err, { abi: abi2, address, args, docsPath: docsPath8, functionName, sender }) {\n const error = err instanceof RawContractError ? err : err instanceof BaseError2 ? err.walk((err2) => \"data\" in err2) || err.walk() : {};\n const { code, data, details, message, shortMessage } = error;\n const cause = (() => {\n if (err instanceof AbiDecodingZeroDataError)\n return new ContractFunctionZeroDataError({ functionName });\n if ([EXECUTION_REVERTED_ERROR_CODE, InternalRpcError.code].includes(code) && (data || details || message || shortMessage)) {\n return new ContractFunctionRevertedError({\n abi: abi2,\n data: typeof data === \"object\" ? data.data : data,\n functionName,\n message: error instanceof RpcRequestError ? details : shortMessage ?? message\n });\n }\n return err;\n })();\n return new ContractFunctionExecutionError(cause, {\n abi: abi2,\n args,\n contractAddress: address,\n docsPath: docsPath8,\n functionName,\n sender\n });\n }\n var EXECUTION_REVERTED_ERROR_CODE;\n var init_getContractError = __esm({\n \"../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/utils/errors/getContractError.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_abi();\n init_base();\n init_contract();\n init_request();\n init_rpc();\n EXECUTION_REVERTED_ERROR_CODE = 3;\n }\n });\n\n // ../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/accounts/utils/publicKeyToAddress.js\n function publicKeyToAddress(publicKey) {\n const address = keccak256(`0x${publicKey.substring(4)}`).substring(26);\n return checksumAddress(`0x${address}`);\n }\n var init_publicKeyToAddress = __esm({\n \"../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/accounts/utils/publicKeyToAddress.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_getAddress();\n init_keccak256();\n }\n });\n\n // ../../../node_modules/.pnpm/@noble+hashes@1.8.0/node_modules/@noble/hashes/esm/_md.js\n function setBigUint64(view, byteOffset, value, isLE3) {\n if (typeof view.setBigUint64 === \"function\")\n return view.setBigUint64(byteOffset, value, isLE3);\n const _32n3 = BigInt(32);\n const _u32_max = BigInt(4294967295);\n const wh = Number(value >> _32n3 & _u32_max);\n const wl = Number(value & _u32_max);\n const h4 = isLE3 ? 4 : 0;\n const l6 = isLE3 ? 0 : 4;\n view.setUint32(byteOffset + h4, wh, isLE3);\n view.setUint32(byteOffset + l6, wl, isLE3);\n }\n function Chi(a3, b4, c4) {\n return a3 & b4 ^ ~a3 & c4;\n }\n function Maj(a3, b4, c4) {\n return a3 & b4 ^ a3 & c4 ^ b4 & c4;\n }\n var HashMD, SHA256_IV, SHA384_IV, SHA512_IV;\n var init_md = __esm({\n \"../../../node_modules/.pnpm/@noble+hashes@1.8.0/node_modules/@noble/hashes/esm/_md.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_utils3();\n HashMD = class extends Hash {\n constructor(blockLen, outputLen, padOffset, isLE3) {\n super();\n this.finished = false;\n this.length = 0;\n this.pos = 0;\n this.destroyed = false;\n this.blockLen = blockLen;\n this.outputLen = outputLen;\n this.padOffset = padOffset;\n this.isLE = isLE3;\n this.buffer = new Uint8Array(blockLen);\n this.view = createView(this.buffer);\n }\n update(data) {\n aexists(this);\n data = toBytes2(data);\n abytes(data);\n const { view, buffer: buffer2, blockLen } = this;\n const len = data.length;\n for (let pos = 0; pos < len; ) {\n const take = Math.min(blockLen - this.pos, len - pos);\n if (take === blockLen) {\n const dataView = createView(data);\n for (; blockLen <= len - pos; pos += blockLen)\n this.process(dataView, pos);\n continue;\n }\n buffer2.set(data.subarray(pos, pos + take), this.pos);\n this.pos += take;\n pos += take;\n if (this.pos === blockLen) {\n this.process(view, 0);\n this.pos = 0;\n }\n }\n this.length += data.length;\n this.roundClean();\n return this;\n }\n digestInto(out) {\n aexists(this);\n aoutput(out, this);\n this.finished = true;\n const { buffer: buffer2, view, blockLen, isLE: isLE3 } = this;\n let { pos } = this;\n buffer2[pos++] = 128;\n clean(this.buffer.subarray(pos));\n if (this.padOffset > blockLen - pos) {\n this.process(view, 0);\n pos = 0;\n }\n for (let i3 = pos; i3 < blockLen; i3++)\n buffer2[i3] = 0;\n setBigUint64(view, blockLen - 8, BigInt(this.length * 8), isLE3);\n this.process(view, 0);\n const oview = createView(out);\n const len = this.outputLen;\n if (len % 4)\n throw new Error(\"_sha2: outputLen should be aligned to 32bit\");\n const outLen = len / 4;\n const state = this.get();\n if (outLen > state.length)\n throw new Error(\"_sha2: outputLen bigger than state\");\n for (let i3 = 0; i3 < outLen; i3++)\n oview.setUint32(4 * i3, state[i3], isLE3);\n }\n digest() {\n const { buffer: buffer2, outputLen } = this;\n this.digestInto(buffer2);\n const res = buffer2.slice(0, outputLen);\n this.destroy();\n return res;\n }\n _cloneInto(to) {\n to || (to = new this.constructor());\n to.set(...this.get());\n const { blockLen, buffer: buffer2, length: length2, finished, destroyed, pos } = this;\n to.destroyed = destroyed;\n to.finished = finished;\n to.length = length2;\n to.pos = pos;\n if (length2 % blockLen)\n to.buffer.set(buffer2);\n return to;\n }\n clone() {\n return this._cloneInto();\n }\n };\n SHA256_IV = /* @__PURE__ */ Uint32Array.from([\n 1779033703,\n 3144134277,\n 1013904242,\n 2773480762,\n 1359893119,\n 2600822924,\n 528734635,\n 1541459225\n ]);\n SHA384_IV = /* @__PURE__ */ Uint32Array.from([\n 3418070365,\n 3238371032,\n 1654270250,\n 914150663,\n 2438529370,\n 812702999,\n 355462360,\n 4144912697,\n 1731405415,\n 4290775857,\n 2394180231,\n 1750603025,\n 3675008525,\n 1694076839,\n 1203062813,\n 3204075428\n ]);\n SHA512_IV = /* @__PURE__ */ Uint32Array.from([\n 1779033703,\n 4089235720,\n 3144134277,\n 2227873595,\n 1013904242,\n 4271175723,\n 2773480762,\n 1595750129,\n 1359893119,\n 2917565137,\n 2600822924,\n 725511199,\n 528734635,\n 4215389547,\n 1541459225,\n 327033209\n ]);\n }\n });\n\n // ../../../node_modules/.pnpm/@noble+hashes@1.8.0/node_modules/@noble/hashes/esm/sha2.js\n var SHA256_K, SHA256_W, SHA256, K512, SHA512_Kh, SHA512_Kl, SHA512_W_H, SHA512_W_L, SHA512, SHA384, sha256, sha512, sha384;\n var init_sha2 = __esm({\n \"../../../node_modules/.pnpm/@noble+hashes@1.8.0/node_modules/@noble/hashes/esm/sha2.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_md();\n init_u64();\n init_utils3();\n SHA256_K = /* @__PURE__ */ Uint32Array.from([\n 1116352408,\n 1899447441,\n 3049323471,\n 3921009573,\n 961987163,\n 1508970993,\n 2453635748,\n 2870763221,\n 3624381080,\n 310598401,\n 607225278,\n 1426881987,\n 1925078388,\n 2162078206,\n 2614888103,\n 3248222580,\n 3835390401,\n 4022224774,\n 264347078,\n 604807628,\n 770255983,\n 1249150122,\n 1555081692,\n 1996064986,\n 2554220882,\n 2821834349,\n 2952996808,\n 3210313671,\n 3336571891,\n 3584528711,\n 113926993,\n 338241895,\n 666307205,\n 773529912,\n 1294757372,\n 1396182291,\n 1695183700,\n 1986661051,\n 2177026350,\n 2456956037,\n 2730485921,\n 2820302411,\n 3259730800,\n 3345764771,\n 3516065817,\n 3600352804,\n 4094571909,\n 275423344,\n 430227734,\n 506948616,\n 659060556,\n 883997877,\n 958139571,\n 1322822218,\n 1537002063,\n 1747873779,\n 1955562222,\n 2024104815,\n 2227730452,\n 2361852424,\n 2428436474,\n 2756734187,\n 3204031479,\n 3329325298\n ]);\n SHA256_W = /* @__PURE__ */ new Uint32Array(64);\n SHA256 = class extends HashMD {\n constructor(outputLen = 32) {\n super(64, outputLen, 8, false);\n this.A = SHA256_IV[0] | 0;\n this.B = SHA256_IV[1] | 0;\n this.C = SHA256_IV[2] | 0;\n this.D = SHA256_IV[3] | 0;\n this.E = SHA256_IV[4] | 0;\n this.F = SHA256_IV[5] | 0;\n this.G = SHA256_IV[6] | 0;\n this.H = SHA256_IV[7] | 0;\n }\n get() {\n const { A: A4, B: B2, C, D: D2, E: E2, F: F2, G, H: H3 } = this;\n return [A4, B2, C, D2, E2, F2, G, H3];\n }\n // prettier-ignore\n set(A4, B2, C, D2, E2, F2, G, H3) {\n this.A = A4 | 0;\n this.B = B2 | 0;\n this.C = C | 0;\n this.D = D2 | 0;\n this.E = E2 | 0;\n this.F = F2 | 0;\n this.G = G | 0;\n this.H = H3 | 0;\n }\n process(view, offset) {\n for (let i3 = 0; i3 < 16; i3++, offset += 4)\n SHA256_W[i3] = view.getUint32(offset, false);\n for (let i3 = 16; i3 < 64; i3++) {\n const W15 = SHA256_W[i3 - 15];\n const W2 = SHA256_W[i3 - 2];\n const s0 = rotr(W15, 7) ^ rotr(W15, 18) ^ W15 >>> 3;\n const s1 = rotr(W2, 17) ^ rotr(W2, 19) ^ W2 >>> 10;\n SHA256_W[i3] = s1 + SHA256_W[i3 - 7] + s0 + SHA256_W[i3 - 16] | 0;\n }\n let { A: A4, B: B2, C, D: D2, E: E2, F: F2, G, H: H3 } = this;\n for (let i3 = 0; i3 < 64; i3++) {\n const sigma1 = rotr(E2, 6) ^ rotr(E2, 11) ^ rotr(E2, 25);\n const T1 = H3 + sigma1 + Chi(E2, F2, G) + SHA256_K[i3] + SHA256_W[i3] | 0;\n const sigma0 = rotr(A4, 2) ^ rotr(A4, 13) ^ rotr(A4, 22);\n const T22 = sigma0 + Maj(A4, B2, C) | 0;\n H3 = G;\n G = F2;\n F2 = E2;\n E2 = D2 + T1 | 0;\n D2 = C;\n C = B2;\n B2 = A4;\n A4 = T1 + T22 | 0;\n }\n A4 = A4 + this.A | 0;\n B2 = B2 + this.B | 0;\n C = C + this.C | 0;\n D2 = D2 + this.D | 0;\n E2 = E2 + this.E | 0;\n F2 = F2 + this.F | 0;\n G = G + this.G | 0;\n H3 = H3 + this.H | 0;\n this.set(A4, B2, C, D2, E2, F2, G, H3);\n }\n roundClean() {\n clean(SHA256_W);\n }\n destroy() {\n this.set(0, 0, 0, 0, 0, 0, 0, 0);\n clean(this.buffer);\n }\n };\n K512 = /* @__PURE__ */ (() => split([\n \"0x428a2f98d728ae22\",\n \"0x7137449123ef65cd\",\n \"0xb5c0fbcfec4d3b2f\",\n \"0xe9b5dba58189dbbc\",\n \"0x3956c25bf348b538\",\n \"0x59f111f1b605d019\",\n \"0x923f82a4af194f9b\",\n \"0xab1c5ed5da6d8118\",\n \"0xd807aa98a3030242\",\n \"0x12835b0145706fbe\",\n \"0x243185be4ee4b28c\",\n \"0x550c7dc3d5ffb4e2\",\n \"0x72be5d74f27b896f\",\n \"0x80deb1fe3b1696b1\",\n \"0x9bdc06a725c71235\",\n \"0xc19bf174cf692694\",\n \"0xe49b69c19ef14ad2\",\n \"0xefbe4786384f25e3\",\n \"0x0fc19dc68b8cd5b5\",\n \"0x240ca1cc77ac9c65\",\n \"0x2de92c6f592b0275\",\n \"0x4a7484aa6ea6e483\",\n \"0x5cb0a9dcbd41fbd4\",\n \"0x76f988da831153b5\",\n \"0x983e5152ee66dfab\",\n \"0xa831c66d2db43210\",\n \"0xb00327c898fb213f\",\n \"0xbf597fc7beef0ee4\",\n \"0xc6e00bf33da88fc2\",\n \"0xd5a79147930aa725\",\n \"0x06ca6351e003826f\",\n \"0x142929670a0e6e70\",\n \"0x27b70a8546d22ffc\",\n \"0x2e1b21385c26c926\",\n \"0x4d2c6dfc5ac42aed\",\n \"0x53380d139d95b3df\",\n \"0x650a73548baf63de\",\n \"0x766a0abb3c77b2a8\",\n \"0x81c2c92e47edaee6\",\n \"0x92722c851482353b\",\n \"0xa2bfe8a14cf10364\",\n \"0xa81a664bbc423001\",\n \"0xc24b8b70d0f89791\",\n \"0xc76c51a30654be30\",\n \"0xd192e819d6ef5218\",\n \"0xd69906245565a910\",\n \"0xf40e35855771202a\",\n \"0x106aa07032bbd1b8\",\n \"0x19a4c116b8d2d0c8\",\n \"0x1e376c085141ab53\",\n \"0x2748774cdf8eeb99\",\n \"0x34b0bcb5e19b48a8\",\n \"0x391c0cb3c5c95a63\",\n \"0x4ed8aa4ae3418acb\",\n \"0x5b9cca4f7763e373\",\n \"0x682e6ff3d6b2b8a3\",\n \"0x748f82ee5defb2fc\",\n \"0x78a5636f43172f60\",\n \"0x84c87814a1f0ab72\",\n \"0x8cc702081a6439ec\",\n \"0x90befffa23631e28\",\n \"0xa4506cebde82bde9\",\n \"0xbef9a3f7b2c67915\",\n \"0xc67178f2e372532b\",\n \"0xca273eceea26619c\",\n \"0xd186b8c721c0c207\",\n \"0xeada7dd6cde0eb1e\",\n \"0xf57d4f7fee6ed178\",\n \"0x06f067aa72176fba\",\n \"0x0a637dc5a2c898a6\",\n \"0x113f9804bef90dae\",\n \"0x1b710b35131c471b\",\n \"0x28db77f523047d84\",\n \"0x32caab7b40c72493\",\n \"0x3c9ebe0a15c9bebc\",\n \"0x431d67c49c100d4c\",\n \"0x4cc5d4becb3e42b6\",\n \"0x597f299cfc657e2a\",\n \"0x5fcb6fab3ad6faec\",\n \"0x6c44198c4a475817\"\n ].map((n2) => BigInt(n2))))();\n SHA512_Kh = /* @__PURE__ */ (() => K512[0])();\n SHA512_Kl = /* @__PURE__ */ (() => K512[1])();\n SHA512_W_H = /* @__PURE__ */ new Uint32Array(80);\n SHA512_W_L = /* @__PURE__ */ new Uint32Array(80);\n SHA512 = class extends HashMD {\n constructor(outputLen = 64) {\n super(128, outputLen, 16, false);\n this.Ah = SHA512_IV[0] | 0;\n this.Al = SHA512_IV[1] | 0;\n this.Bh = SHA512_IV[2] | 0;\n this.Bl = SHA512_IV[3] | 0;\n this.Ch = SHA512_IV[4] | 0;\n this.Cl = SHA512_IV[5] | 0;\n this.Dh = SHA512_IV[6] | 0;\n this.Dl = SHA512_IV[7] | 0;\n this.Eh = SHA512_IV[8] | 0;\n this.El = SHA512_IV[9] | 0;\n this.Fh = SHA512_IV[10] | 0;\n this.Fl = SHA512_IV[11] | 0;\n this.Gh = SHA512_IV[12] | 0;\n this.Gl = SHA512_IV[13] | 0;\n this.Hh = SHA512_IV[14] | 0;\n this.Hl = SHA512_IV[15] | 0;\n }\n // prettier-ignore\n get() {\n const { Ah, Al, Bh, Bl, Ch, Cl, Dh, Dl, Eh, El, Fh, Fl, Gh, Gl, Hh, Hl } = this;\n return [Ah, Al, Bh, Bl, Ch, Cl, Dh, Dl, Eh, El, Fh, Fl, Gh, Gl, Hh, Hl];\n }\n // prettier-ignore\n set(Ah, Al, Bh, Bl, Ch, Cl, Dh, Dl, Eh, El, Fh, Fl, Gh, Gl, Hh, Hl) {\n this.Ah = Ah | 0;\n this.Al = Al | 0;\n this.Bh = Bh | 0;\n this.Bl = Bl | 0;\n this.Ch = Ch | 0;\n this.Cl = Cl | 0;\n this.Dh = Dh | 0;\n this.Dl = Dl | 0;\n this.Eh = Eh | 0;\n this.El = El | 0;\n this.Fh = Fh | 0;\n this.Fl = Fl | 0;\n this.Gh = Gh | 0;\n this.Gl = Gl | 0;\n this.Hh = Hh | 0;\n this.Hl = Hl | 0;\n }\n process(view, offset) {\n for (let i3 = 0; i3 < 16; i3++, offset += 4) {\n SHA512_W_H[i3] = view.getUint32(offset);\n SHA512_W_L[i3] = view.getUint32(offset += 4);\n }\n for (let i3 = 16; i3 < 80; i3++) {\n const W15h = SHA512_W_H[i3 - 15] | 0;\n const W15l = SHA512_W_L[i3 - 15] | 0;\n const s0h = rotrSH(W15h, W15l, 1) ^ rotrSH(W15h, W15l, 8) ^ shrSH(W15h, W15l, 7);\n const s0l = rotrSL(W15h, W15l, 1) ^ rotrSL(W15h, W15l, 8) ^ shrSL(W15h, W15l, 7);\n const W2h = SHA512_W_H[i3 - 2] | 0;\n const W2l = SHA512_W_L[i3 - 2] | 0;\n const s1h = rotrSH(W2h, W2l, 19) ^ rotrBH(W2h, W2l, 61) ^ shrSH(W2h, W2l, 6);\n const s1l = rotrSL(W2h, W2l, 19) ^ rotrBL(W2h, W2l, 61) ^ shrSL(W2h, W2l, 6);\n const SUMl = add4L(s0l, s1l, SHA512_W_L[i3 - 7], SHA512_W_L[i3 - 16]);\n const SUMh = add4H(SUMl, s0h, s1h, SHA512_W_H[i3 - 7], SHA512_W_H[i3 - 16]);\n SHA512_W_H[i3] = SUMh | 0;\n SHA512_W_L[i3] = SUMl | 0;\n }\n let { Ah, Al, Bh, Bl, Ch, Cl, Dh, Dl, Eh, El, Fh, Fl, Gh, Gl, Hh, Hl } = this;\n for (let i3 = 0; i3 < 80; i3++) {\n const sigma1h = rotrSH(Eh, El, 14) ^ rotrSH(Eh, El, 18) ^ rotrBH(Eh, El, 41);\n const sigma1l = rotrSL(Eh, El, 14) ^ rotrSL(Eh, El, 18) ^ rotrBL(Eh, El, 41);\n const CHIh = Eh & Fh ^ ~Eh & Gh;\n const CHIl = El & Fl ^ ~El & Gl;\n const T1ll = add5L(Hl, sigma1l, CHIl, SHA512_Kl[i3], SHA512_W_L[i3]);\n const T1h = add5H(T1ll, Hh, sigma1h, CHIh, SHA512_Kh[i3], SHA512_W_H[i3]);\n const T1l = T1ll | 0;\n const sigma0h = rotrSH(Ah, Al, 28) ^ rotrBH(Ah, Al, 34) ^ rotrBH(Ah, Al, 39);\n const sigma0l = rotrSL(Ah, Al, 28) ^ rotrBL(Ah, Al, 34) ^ rotrBL(Ah, Al, 39);\n const MAJh = Ah & Bh ^ Ah & Ch ^ Bh & Ch;\n const MAJl = Al & Bl ^ Al & Cl ^ Bl & Cl;\n Hh = Gh | 0;\n Hl = Gl | 0;\n Gh = Fh | 0;\n Gl = Fl | 0;\n Fh = Eh | 0;\n Fl = El | 0;\n ({ h: Eh, l: El } = add(Dh | 0, Dl | 0, T1h | 0, T1l | 0));\n Dh = Ch | 0;\n Dl = Cl | 0;\n Ch = Bh | 0;\n Cl = Bl | 0;\n Bh = Ah | 0;\n Bl = Al | 0;\n const All = add3L(T1l, sigma0l, MAJl);\n Ah = add3H(All, T1h, sigma0h, MAJh);\n Al = All | 0;\n }\n ({ h: Ah, l: Al } = add(this.Ah | 0, this.Al | 0, Ah | 0, Al | 0));\n ({ h: Bh, l: Bl } = add(this.Bh | 0, this.Bl | 0, Bh | 0, Bl | 0));\n ({ h: Ch, l: Cl } = add(this.Ch | 0, this.Cl | 0, Ch | 0, Cl | 0));\n ({ h: Dh, l: Dl } = add(this.Dh | 0, this.Dl | 0, Dh | 0, Dl | 0));\n ({ h: Eh, l: El } = add(this.Eh | 0, this.El | 0, Eh | 0, El | 0));\n ({ h: Fh, l: Fl } = add(this.Fh | 0, this.Fl | 0, Fh | 0, Fl | 0));\n ({ h: Gh, l: Gl } = add(this.Gh | 0, this.Gl | 0, Gh | 0, Gl | 0));\n ({ h: Hh, l: Hl } = add(this.Hh | 0, this.Hl | 0, Hh | 0, Hl | 0));\n this.set(Ah, Al, Bh, Bl, Ch, Cl, Dh, Dl, Eh, El, Fh, Fl, Gh, Gl, Hh, Hl);\n }\n roundClean() {\n clean(SHA512_W_H, SHA512_W_L);\n }\n destroy() {\n clean(this.buffer);\n this.set(0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0);\n }\n };\n SHA384 = class extends SHA512 {\n constructor() {\n super(48);\n this.Ah = SHA384_IV[0] | 0;\n this.Al = SHA384_IV[1] | 0;\n this.Bh = SHA384_IV[2] | 0;\n this.Bl = SHA384_IV[3] | 0;\n this.Ch = SHA384_IV[4] | 0;\n this.Cl = SHA384_IV[5] | 0;\n this.Dh = SHA384_IV[6] | 0;\n this.Dl = SHA384_IV[7] | 0;\n this.Eh = SHA384_IV[8] | 0;\n this.El = SHA384_IV[9] | 0;\n this.Fh = SHA384_IV[10] | 0;\n this.Fl = SHA384_IV[11] | 0;\n this.Gh = SHA384_IV[12] | 0;\n this.Gl = SHA384_IV[13] | 0;\n this.Hh = SHA384_IV[14] | 0;\n this.Hl = SHA384_IV[15] | 0;\n }\n };\n sha256 = /* @__PURE__ */ createHasher(() => new SHA256());\n sha512 = /* @__PURE__ */ createHasher(() => new SHA512());\n sha384 = /* @__PURE__ */ createHasher(() => new SHA384());\n }\n });\n\n // ../../../node_modules/.pnpm/@noble+hashes@1.8.0/node_modules/@noble/hashes/esm/hmac.js\n var HMAC, hmac;\n var init_hmac = __esm({\n \"../../../node_modules/.pnpm/@noble+hashes@1.8.0/node_modules/@noble/hashes/esm/hmac.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_utils3();\n HMAC = class extends Hash {\n constructor(hash3, _key) {\n super();\n this.finished = false;\n this.destroyed = false;\n ahash(hash3);\n const key = toBytes2(_key);\n this.iHash = hash3.create();\n if (typeof this.iHash.update !== \"function\")\n throw new Error(\"Expected instance of class which extends utils.Hash\");\n this.blockLen = this.iHash.blockLen;\n this.outputLen = this.iHash.outputLen;\n const blockLen = this.blockLen;\n const pad6 = new Uint8Array(blockLen);\n pad6.set(key.length > blockLen ? hash3.create().update(key).digest() : key);\n for (let i3 = 0; i3 < pad6.length; i3++)\n pad6[i3] ^= 54;\n this.iHash.update(pad6);\n this.oHash = hash3.create();\n for (let i3 = 0; i3 < pad6.length; i3++)\n pad6[i3] ^= 54 ^ 92;\n this.oHash.update(pad6);\n clean(pad6);\n }\n update(buf) {\n aexists(this);\n this.iHash.update(buf);\n return this;\n }\n digestInto(out) {\n aexists(this);\n abytes(out, this.outputLen);\n this.finished = true;\n this.iHash.digestInto(out);\n this.oHash.update(out);\n this.oHash.digestInto(out);\n this.destroy();\n }\n digest() {\n const out = new Uint8Array(this.oHash.outputLen);\n this.digestInto(out);\n return out;\n }\n _cloneInto(to) {\n to || (to = Object.create(Object.getPrototypeOf(this), {}));\n const { oHash, iHash, finished, destroyed, blockLen, outputLen } = this;\n to = to;\n to.finished = finished;\n to.destroyed = destroyed;\n to.blockLen = blockLen;\n to.outputLen = outputLen;\n to.oHash = oHash._cloneInto(to.oHash);\n to.iHash = iHash._cloneInto(to.iHash);\n return to;\n }\n clone() {\n return this._cloneInto();\n }\n destroy() {\n this.destroyed = true;\n this.oHash.destroy();\n this.iHash.destroy();\n }\n };\n hmac = (hash3, key, message) => new HMAC(hash3, key).update(message).digest();\n hmac.create = (hash3, key) => new HMAC(hash3, key);\n }\n });\n\n // ../../../node_modules/.pnpm/@noble+curves@1.9.1/node_modules/@noble/curves/esm/abstract/utils.js\n function isBytes2(a3) {\n return a3 instanceof Uint8Array || ArrayBuffer.isView(a3) && a3.constructor.name === \"Uint8Array\";\n }\n function abytes2(item) {\n if (!isBytes2(item))\n throw new Error(\"Uint8Array expected\");\n }\n function abool(title2, value) {\n if (typeof value !== \"boolean\")\n throw new Error(title2 + \" boolean expected, got \" + value);\n }\n function numberToHexUnpadded(num2) {\n const hex = num2.toString(16);\n return hex.length & 1 ? \"0\" + hex : hex;\n }\n function hexToNumber2(hex) {\n if (typeof hex !== \"string\")\n throw new Error(\"hex string expected, got \" + typeof hex);\n return hex === \"\" ? _0n2 : BigInt(\"0x\" + hex);\n }\n function bytesToHex3(bytes) {\n abytes2(bytes);\n if (hasHexBuiltin2)\n return bytes.toHex();\n let hex = \"\";\n for (let i3 = 0; i3 < bytes.length; i3++) {\n hex += hexes3[bytes[i3]];\n }\n return hex;\n }\n function asciiToBase162(ch) {\n if (ch >= asciis2._0 && ch <= asciis2._9)\n return ch - asciis2._0;\n if (ch >= asciis2.A && ch <= asciis2.F)\n return ch - (asciis2.A - 10);\n if (ch >= asciis2.a && ch <= asciis2.f)\n return ch - (asciis2.a - 10);\n return;\n }\n function hexToBytes3(hex) {\n if (typeof hex !== \"string\")\n throw new Error(\"hex string expected, got \" + typeof hex);\n if (hasHexBuiltin2)\n return Uint8Array.fromHex(hex);\n const hl = hex.length;\n const al = hl / 2;\n if (hl % 2)\n throw new Error(\"hex string expected, got unpadded hex of length \" + hl);\n const array2 = new Uint8Array(al);\n for (let ai = 0, hi = 0; ai < al; ai++, hi += 2) {\n const n1 = asciiToBase162(hex.charCodeAt(hi));\n const n2 = asciiToBase162(hex.charCodeAt(hi + 1));\n if (n1 === void 0 || n2 === void 0) {\n const char = hex[hi] + hex[hi + 1];\n throw new Error('hex string expected, got non-hex character \"' + char + '\" at index ' + hi);\n }\n array2[ai] = n1 * 16 + n2;\n }\n return array2;\n }\n function bytesToNumberBE(bytes) {\n return hexToNumber2(bytesToHex3(bytes));\n }\n function bytesToNumberLE(bytes) {\n abytes2(bytes);\n return hexToNumber2(bytesToHex3(Uint8Array.from(bytes).reverse()));\n }\n function numberToBytesBE(n2, len) {\n return hexToBytes3(n2.toString(16).padStart(len * 2, \"0\"));\n }\n function numberToBytesLE(n2, len) {\n return numberToBytesBE(n2, len).reverse();\n }\n function ensureBytes(title2, hex, expectedLength) {\n let res;\n if (typeof hex === \"string\") {\n try {\n res = hexToBytes3(hex);\n } catch (e3) {\n throw new Error(title2 + \" must be hex string or Uint8Array, cause: \" + e3);\n }\n } else if (isBytes2(hex)) {\n res = Uint8Array.from(hex);\n } else {\n throw new Error(title2 + \" must be hex string or Uint8Array\");\n }\n const len = res.length;\n if (typeof expectedLength === \"number\" && len !== expectedLength)\n throw new Error(title2 + \" of length \" + expectedLength + \" expected, got \" + len);\n return res;\n }\n function concatBytes3(...arrays) {\n let sum = 0;\n for (let i3 = 0; i3 < arrays.length; i3++) {\n const a3 = arrays[i3];\n abytes2(a3);\n sum += a3.length;\n }\n const res = new Uint8Array(sum);\n for (let i3 = 0, pad6 = 0; i3 < arrays.length; i3++) {\n const a3 = arrays[i3];\n res.set(a3, pad6);\n pad6 += a3.length;\n }\n return res;\n }\n function utf8ToBytes2(str) {\n if (typeof str !== \"string\")\n throw new Error(\"string expected\");\n return new Uint8Array(new TextEncoder().encode(str));\n }\n function inRange(n2, min, max) {\n return isPosBig(n2) && isPosBig(min) && isPosBig(max) && min <= n2 && n2 < max;\n }\n function aInRange(title2, n2, min, max) {\n if (!inRange(n2, min, max))\n throw new Error(\"expected valid \" + title2 + \": \" + min + \" <= n < \" + max + \", got \" + n2);\n }\n function bitLen(n2) {\n let len;\n for (len = 0; n2 > _0n2; n2 >>= _1n2, len += 1)\n ;\n return len;\n }\n function createHmacDrbg(hashLen, qByteLen, hmacFn) {\n if (typeof hashLen !== \"number\" || hashLen < 2)\n throw new Error(\"hashLen must be a number\");\n if (typeof qByteLen !== \"number\" || qByteLen < 2)\n throw new Error(\"qByteLen must be a number\");\n if (typeof hmacFn !== \"function\")\n throw new Error(\"hmacFn must be a function\");\n let v2 = u8n(hashLen);\n let k4 = u8n(hashLen);\n let i3 = 0;\n const reset = () => {\n v2.fill(1);\n k4.fill(0);\n i3 = 0;\n };\n const h4 = (...b4) => hmacFn(k4, v2, ...b4);\n const reseed = (seed = u8n(0)) => {\n k4 = h4(u8fr([0]), seed);\n v2 = h4();\n if (seed.length === 0)\n return;\n k4 = h4(u8fr([1]), seed);\n v2 = h4();\n };\n const gen2 = () => {\n if (i3++ >= 1e3)\n throw new Error(\"drbg: tried 1000 values\");\n let len = 0;\n const out = [];\n while (len < qByteLen) {\n v2 = h4();\n const sl = v2.slice();\n out.push(sl);\n len += v2.length;\n }\n return concatBytes3(...out);\n };\n const genUntil = (seed, pred) => {\n reset();\n reseed(seed);\n let res = void 0;\n while (!(res = pred(gen2())))\n reseed();\n reset();\n return res;\n };\n return genUntil;\n }\n function validateObject(object2, validators, optValidators = {}) {\n const checkField = (fieldName, type, isOptional) => {\n const checkVal = validatorFns[type];\n if (typeof checkVal !== \"function\")\n throw new Error(\"invalid validator function\");\n const val = object2[fieldName];\n if (isOptional && val === void 0)\n return;\n if (!checkVal(val, object2)) {\n throw new Error(\"param \" + String(fieldName) + \" is invalid. Expected \" + type + \", got \" + val);\n }\n };\n for (const [fieldName, type] of Object.entries(validators))\n checkField(fieldName, type, false);\n for (const [fieldName, type] of Object.entries(optValidators))\n checkField(fieldName, type, true);\n return object2;\n }\n function memoized(fn) {\n const map = /* @__PURE__ */ new WeakMap();\n return (arg, ...args) => {\n const val = map.get(arg);\n if (val !== void 0)\n return val;\n const computed = fn(arg, ...args);\n map.set(arg, computed);\n return computed;\n };\n }\n var _0n2, _1n2, hasHexBuiltin2, hexes3, asciis2, isPosBig, bitMask, u8n, u8fr, validatorFns;\n var init_utils5 = __esm({\n \"../../../node_modules/.pnpm/@noble+curves@1.9.1/node_modules/@noble/curves/esm/abstract/utils.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n _0n2 = /* @__PURE__ */ BigInt(0);\n _1n2 = /* @__PURE__ */ BigInt(1);\n hasHexBuiltin2 = // @ts-ignore\n typeof Uint8Array.from([]).toHex === \"function\" && typeof Uint8Array.fromHex === \"function\";\n hexes3 = /* @__PURE__ */ Array.from({ length: 256 }, (_2, i3) => i3.toString(16).padStart(2, \"0\"));\n asciis2 = { _0: 48, _9: 57, A: 65, F: 70, a: 97, f: 102 };\n isPosBig = (n2) => typeof n2 === \"bigint\" && _0n2 <= n2;\n bitMask = (n2) => (_1n2 << BigInt(n2)) - _1n2;\n u8n = (len) => new Uint8Array(len);\n u8fr = (arr) => Uint8Array.from(arr);\n validatorFns = {\n bigint: (val) => typeof val === \"bigint\",\n function: (val) => typeof val === \"function\",\n boolean: (val) => typeof val === \"boolean\",\n string: (val) => typeof val === \"string\",\n stringOrUint8Array: (val) => typeof val === \"string\" || isBytes2(val),\n isSafeInteger: (val) => Number.isSafeInteger(val),\n array: (val) => Array.isArray(val),\n field: (val, object2) => object2.Fp.isValid(val),\n hash: (val) => typeof val === \"function\" && Number.isSafeInteger(val.outputLen)\n };\n }\n });\n\n // ../../../node_modules/.pnpm/@noble+curves@1.9.1/node_modules/@noble/curves/esm/abstract/modular.js\n function mod(a3, b4) {\n const result = a3 % b4;\n return result >= _0n3 ? result : b4 + result;\n }\n function pow2(x4, power, modulo) {\n let res = x4;\n while (power-- > _0n3) {\n res *= res;\n res %= modulo;\n }\n return res;\n }\n function invert(number2, modulo) {\n if (number2 === _0n3)\n throw new Error(\"invert: expected non-zero number\");\n if (modulo <= _0n3)\n throw new Error(\"invert: expected positive modulus, got \" + modulo);\n let a3 = mod(number2, modulo);\n let b4 = modulo;\n let x4 = _0n3, y6 = _1n3, u2 = _1n3, v2 = _0n3;\n while (a3 !== _0n3) {\n const q3 = b4 / a3;\n const r2 = b4 % a3;\n const m2 = x4 - u2 * q3;\n const n2 = y6 - v2 * q3;\n b4 = a3, a3 = r2, x4 = u2, y6 = v2, u2 = m2, v2 = n2;\n }\n const gcd = b4;\n if (gcd !== _1n3)\n throw new Error(\"invert: does not exist\");\n return mod(x4, modulo);\n }\n function sqrt3mod4(Fp, n2) {\n const p1div4 = (Fp.ORDER + _1n3) / _4n;\n const root = Fp.pow(n2, p1div4);\n if (!Fp.eql(Fp.sqr(root), n2))\n throw new Error(\"Cannot find square root\");\n return root;\n }\n function sqrt5mod8(Fp, n2) {\n const p5div8 = (Fp.ORDER - _5n) / _8n;\n const n22 = Fp.mul(n2, _2n2);\n const v2 = Fp.pow(n22, p5div8);\n const nv = Fp.mul(n2, v2);\n const i3 = Fp.mul(Fp.mul(nv, _2n2), v2);\n const root = Fp.mul(nv, Fp.sub(i3, Fp.ONE));\n if (!Fp.eql(Fp.sqr(root), n2))\n throw new Error(\"Cannot find square root\");\n return root;\n }\n function tonelliShanks(P2) {\n if (P2 < BigInt(3))\n throw new Error(\"sqrt is not defined for small field\");\n let Q2 = P2 - _1n3;\n let S3 = 0;\n while (Q2 % _2n2 === _0n3) {\n Q2 /= _2n2;\n S3++;\n }\n let Z2 = _2n2;\n const _Fp = Field(P2);\n while (FpLegendre(_Fp, Z2) === 1) {\n if (Z2++ > 1e3)\n throw new Error(\"Cannot find square root: probably non-prime P\");\n }\n if (S3 === 1)\n return sqrt3mod4;\n let cc = _Fp.pow(Z2, Q2);\n const Q1div2 = (Q2 + _1n3) / _2n2;\n return function tonelliSlow(Fp, n2) {\n if (Fp.is0(n2))\n return n2;\n if (FpLegendre(Fp, n2) !== 1)\n throw new Error(\"Cannot find square root\");\n let M2 = S3;\n let c4 = Fp.mul(Fp.ONE, cc);\n let t3 = Fp.pow(n2, Q2);\n let R3 = Fp.pow(n2, Q1div2);\n while (!Fp.eql(t3, Fp.ONE)) {\n if (Fp.is0(t3))\n return Fp.ZERO;\n let i3 = 1;\n let t_tmp = Fp.sqr(t3);\n while (!Fp.eql(t_tmp, Fp.ONE)) {\n i3++;\n t_tmp = Fp.sqr(t_tmp);\n if (i3 === M2)\n throw new Error(\"Cannot find square root\");\n }\n const exponent = _1n3 << BigInt(M2 - i3 - 1);\n const b4 = Fp.pow(c4, exponent);\n M2 = i3;\n c4 = Fp.sqr(b4);\n t3 = Fp.mul(t3, c4);\n R3 = Fp.mul(R3, b4);\n }\n return R3;\n };\n }\n function FpSqrt(P2) {\n if (P2 % _4n === _3n)\n return sqrt3mod4;\n if (P2 % _8n === _5n)\n return sqrt5mod8;\n return tonelliShanks(P2);\n }\n function validateField(field) {\n const initial = {\n ORDER: \"bigint\",\n MASK: \"bigint\",\n BYTES: \"isSafeInteger\",\n BITS: \"isSafeInteger\"\n };\n const opts = FIELD_FIELDS.reduce((map, val) => {\n map[val] = \"function\";\n return map;\n }, initial);\n return validateObject(field, opts);\n }\n function FpPow(Fp, num2, power) {\n if (power < _0n3)\n throw new Error(\"invalid exponent, negatives unsupported\");\n if (power === _0n3)\n return Fp.ONE;\n if (power === _1n3)\n return num2;\n let p4 = Fp.ONE;\n let d5 = num2;\n while (power > _0n3) {\n if (power & _1n3)\n p4 = Fp.mul(p4, d5);\n d5 = Fp.sqr(d5);\n power >>= _1n3;\n }\n return p4;\n }\n function FpInvertBatch(Fp, nums, passZero = false) {\n const inverted = new Array(nums.length).fill(passZero ? Fp.ZERO : void 0);\n const multipliedAcc = nums.reduce((acc, num2, i3) => {\n if (Fp.is0(num2))\n return acc;\n inverted[i3] = acc;\n return Fp.mul(acc, num2);\n }, Fp.ONE);\n const invertedAcc = Fp.inv(multipliedAcc);\n nums.reduceRight((acc, num2, i3) => {\n if (Fp.is0(num2))\n return acc;\n inverted[i3] = Fp.mul(acc, inverted[i3]);\n return Fp.mul(acc, num2);\n }, invertedAcc);\n return inverted;\n }\n function FpLegendre(Fp, n2) {\n const p1mod2 = (Fp.ORDER - _1n3) / _2n2;\n const powered = Fp.pow(n2, p1mod2);\n const yes = Fp.eql(powered, Fp.ONE);\n const zero = Fp.eql(powered, Fp.ZERO);\n const no = Fp.eql(powered, Fp.neg(Fp.ONE));\n if (!yes && !zero && !no)\n throw new Error(\"invalid Legendre symbol result\");\n return yes ? 1 : zero ? 0 : -1;\n }\n function nLength(n2, nBitLength) {\n if (nBitLength !== void 0)\n anumber(nBitLength);\n const _nBitLength = nBitLength !== void 0 ? nBitLength : n2.toString(2).length;\n const nByteLength = Math.ceil(_nBitLength / 8);\n return { nBitLength: _nBitLength, nByteLength };\n }\n function Field(ORDER, bitLen3, isLE3 = false, redef = {}) {\n if (ORDER <= _0n3)\n throw new Error(\"invalid field: expected ORDER > 0, got \" + ORDER);\n const { nBitLength: BITS, nByteLength: BYTES } = nLength(ORDER, bitLen3);\n if (BYTES > 2048)\n throw new Error(\"invalid field: expected ORDER of <= 2048 bytes\");\n let sqrtP;\n const f6 = Object.freeze({\n ORDER,\n isLE: isLE3,\n BITS,\n BYTES,\n MASK: bitMask(BITS),\n ZERO: _0n3,\n ONE: _1n3,\n create: (num2) => mod(num2, ORDER),\n isValid: (num2) => {\n if (typeof num2 !== \"bigint\")\n throw new Error(\"invalid field element: expected bigint, got \" + typeof num2);\n return _0n3 <= num2 && num2 < ORDER;\n },\n is0: (num2) => num2 === _0n3,\n isOdd: (num2) => (num2 & _1n3) === _1n3,\n neg: (num2) => mod(-num2, ORDER),\n eql: (lhs, rhs) => lhs === rhs,\n sqr: (num2) => mod(num2 * num2, ORDER),\n add: (lhs, rhs) => mod(lhs + rhs, ORDER),\n sub: (lhs, rhs) => mod(lhs - rhs, ORDER),\n mul: (lhs, rhs) => mod(lhs * rhs, ORDER),\n pow: (num2, power) => FpPow(f6, num2, power),\n div: (lhs, rhs) => mod(lhs * invert(rhs, ORDER), ORDER),\n // Same as above, but doesn't normalize\n sqrN: (num2) => num2 * num2,\n addN: (lhs, rhs) => lhs + rhs,\n subN: (lhs, rhs) => lhs - rhs,\n mulN: (lhs, rhs) => lhs * rhs,\n inv: (num2) => invert(num2, ORDER),\n sqrt: redef.sqrt || ((n2) => {\n if (!sqrtP)\n sqrtP = FpSqrt(ORDER);\n return sqrtP(f6, n2);\n }),\n toBytes: (num2) => isLE3 ? numberToBytesLE(num2, BYTES) : numberToBytesBE(num2, BYTES),\n fromBytes: (bytes) => {\n if (bytes.length !== BYTES)\n throw new Error(\"Field.fromBytes: expected \" + BYTES + \" bytes, got \" + bytes.length);\n return isLE3 ? bytesToNumberLE(bytes) : bytesToNumberBE(bytes);\n },\n // TODO: we don't need it here, move out to separate fn\n invertBatch: (lst) => FpInvertBatch(f6, lst),\n // We can't move this out because Fp6, Fp12 implement it\n // and it's unclear what to return in there.\n cmov: (a3, b4, c4) => c4 ? b4 : a3\n });\n return Object.freeze(f6);\n }\n function getFieldBytesLength(fieldOrder) {\n if (typeof fieldOrder !== \"bigint\")\n throw new Error(\"field order must be bigint\");\n const bitLength = fieldOrder.toString(2).length;\n return Math.ceil(bitLength / 8);\n }\n function getMinHashLength(fieldOrder) {\n const length2 = getFieldBytesLength(fieldOrder);\n return length2 + Math.ceil(length2 / 2);\n }\n function mapHashToField(key, fieldOrder, isLE3 = false) {\n const len = key.length;\n const fieldLen = getFieldBytesLength(fieldOrder);\n const minLen = getMinHashLength(fieldOrder);\n if (len < 16 || len < minLen || len > 1024)\n throw new Error(\"expected \" + minLen + \"-1024 bytes of input, got \" + len);\n const num2 = isLE3 ? bytesToNumberLE(key) : bytesToNumberBE(key);\n const reduced = mod(num2, fieldOrder - _1n3) + _1n3;\n return isLE3 ? numberToBytesLE(reduced, fieldLen) : numberToBytesBE(reduced, fieldLen);\n }\n var _0n3, _1n3, _2n2, _3n, _4n, _5n, _8n, FIELD_FIELDS;\n var init_modular = __esm({\n \"../../../node_modules/.pnpm/@noble+curves@1.9.1/node_modules/@noble/curves/esm/abstract/modular.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_utils3();\n init_utils5();\n _0n3 = BigInt(0);\n _1n3 = BigInt(1);\n _2n2 = /* @__PURE__ */ BigInt(2);\n _3n = /* @__PURE__ */ BigInt(3);\n _4n = /* @__PURE__ */ BigInt(4);\n _5n = /* @__PURE__ */ BigInt(5);\n _8n = /* @__PURE__ */ BigInt(8);\n FIELD_FIELDS = [\n \"create\",\n \"isValid\",\n \"is0\",\n \"neg\",\n \"inv\",\n \"sqrt\",\n \"sqr\",\n \"eql\",\n \"add\",\n \"sub\",\n \"mul\",\n \"pow\",\n \"div\",\n \"addN\",\n \"subN\",\n \"mulN\",\n \"sqrN\"\n ];\n }\n });\n\n // ../../../node_modules/.pnpm/@noble+curves@1.9.1/node_modules/@noble/curves/esm/abstract/curve.js\n function constTimeNegate(condition, item) {\n const neg = item.negate();\n return condition ? neg : item;\n }\n function validateW(W, bits) {\n if (!Number.isSafeInteger(W) || W <= 0 || W > bits)\n throw new Error(\"invalid window size, expected [1..\" + bits + \"], got W=\" + W);\n }\n function calcWOpts(W, scalarBits) {\n validateW(W, scalarBits);\n const windows = Math.ceil(scalarBits / W) + 1;\n const windowSize = 2 ** (W - 1);\n const maxNumber = 2 ** W;\n const mask = bitMask(W);\n const shiftBy = BigInt(W);\n return { windows, windowSize, mask, maxNumber, shiftBy };\n }\n function calcOffsets(n2, window2, wOpts) {\n const { windowSize, mask, maxNumber, shiftBy } = wOpts;\n let wbits = Number(n2 & mask);\n let nextN = n2 >> shiftBy;\n if (wbits > windowSize) {\n wbits -= maxNumber;\n nextN += _1n4;\n }\n const offsetStart = window2 * windowSize;\n const offset = offsetStart + Math.abs(wbits) - 1;\n const isZero = wbits === 0;\n const isNeg = wbits < 0;\n const isNegF = window2 % 2 !== 0;\n const offsetF = offsetStart;\n return { nextN, offset, isZero, isNeg, isNegF, offsetF };\n }\n function validateMSMPoints(points, c4) {\n if (!Array.isArray(points))\n throw new Error(\"array expected\");\n points.forEach((p4, i3) => {\n if (!(p4 instanceof c4))\n throw new Error(\"invalid point at index \" + i3);\n });\n }\n function validateMSMScalars(scalars, field) {\n if (!Array.isArray(scalars))\n throw new Error(\"array of scalars expected\");\n scalars.forEach((s4, i3) => {\n if (!field.isValid(s4))\n throw new Error(\"invalid scalar at index \" + i3);\n });\n }\n function getW(P2) {\n return pointWindowSizes.get(P2) || 1;\n }\n function wNAF(c4, bits) {\n return {\n constTimeNegate,\n hasPrecomputes(elm) {\n return getW(elm) !== 1;\n },\n // non-const time multiplication ladder\n unsafeLadder(elm, n2, p4 = c4.ZERO) {\n let d5 = elm;\n while (n2 > _0n4) {\n if (n2 & _1n4)\n p4 = p4.add(d5);\n d5 = d5.double();\n n2 >>= _1n4;\n }\n return p4;\n },\n /**\n * Creates a wNAF precomputation window. Used for caching.\n * Default window size is set by `utils.precompute()` and is equal to 8.\n * Number of precomputed points depends on the curve size:\n * 2^(𝑊−1) * (Math.ceil(𝑛 / 𝑊) + 1), where:\n * - 𝑊 is the window size\n * - 𝑛 is the bitlength of the curve order.\n * For a 256-bit curve and window size 8, the number of precomputed points is 128 * 33 = 4224.\n * @param elm Point instance\n * @param W window size\n * @returns precomputed point tables flattened to a single array\n */\n precomputeWindow(elm, W) {\n const { windows, windowSize } = calcWOpts(W, bits);\n const points = [];\n let p4 = elm;\n let base4 = p4;\n for (let window2 = 0; window2 < windows; window2++) {\n base4 = p4;\n points.push(base4);\n for (let i3 = 1; i3 < windowSize; i3++) {\n base4 = base4.add(p4);\n points.push(base4);\n }\n p4 = base4.double();\n }\n return points;\n },\n /**\n * Implements ec multiplication using precomputed tables and w-ary non-adjacent form.\n * @param W window size\n * @param precomputes precomputed tables\n * @param n scalar (we don't check here, but should be less than curve order)\n * @returns real and fake (for const-time) points\n */\n wNAF(W, precomputes, n2) {\n let p4 = c4.ZERO;\n let f6 = c4.BASE;\n const wo = calcWOpts(W, bits);\n for (let window2 = 0; window2 < wo.windows; window2++) {\n const { nextN, offset, isZero, isNeg, isNegF, offsetF } = calcOffsets(n2, window2, wo);\n n2 = nextN;\n if (isZero) {\n f6 = f6.add(constTimeNegate(isNegF, precomputes[offsetF]));\n } else {\n p4 = p4.add(constTimeNegate(isNeg, precomputes[offset]));\n }\n }\n return { p: p4, f: f6 };\n },\n /**\n * Implements ec unsafe (non const-time) multiplication using precomputed tables and w-ary non-adjacent form.\n * @param W window size\n * @param precomputes precomputed tables\n * @param n scalar (we don't check here, but should be less than curve order)\n * @param acc accumulator point to add result of multiplication\n * @returns point\n */\n wNAFUnsafe(W, precomputes, n2, acc = c4.ZERO) {\n const wo = calcWOpts(W, bits);\n for (let window2 = 0; window2 < wo.windows; window2++) {\n if (n2 === _0n4)\n break;\n const { nextN, offset, isZero, isNeg } = calcOffsets(n2, window2, wo);\n n2 = nextN;\n if (isZero) {\n continue;\n } else {\n const item = precomputes[offset];\n acc = acc.add(isNeg ? item.negate() : item);\n }\n }\n return acc;\n },\n getPrecomputes(W, P2, transform2) {\n let comp = pointPrecomputes.get(P2);\n if (!comp) {\n comp = this.precomputeWindow(P2, W);\n if (W !== 1)\n pointPrecomputes.set(P2, transform2(comp));\n }\n return comp;\n },\n wNAFCached(P2, n2, transform2) {\n const W = getW(P2);\n return this.wNAF(W, this.getPrecomputes(W, P2, transform2), n2);\n },\n wNAFCachedUnsafe(P2, n2, transform2, prev) {\n const W = getW(P2);\n if (W === 1)\n return this.unsafeLadder(P2, n2, prev);\n return this.wNAFUnsafe(W, this.getPrecomputes(W, P2, transform2), n2, prev);\n },\n // We calculate precomputes for elliptic curve point multiplication\n // using windowed method. This specifies window size and\n // stores precomputed values. Usually only base point would be precomputed.\n setWindowSize(P2, W) {\n validateW(W, bits);\n pointWindowSizes.set(P2, W);\n pointPrecomputes.delete(P2);\n }\n };\n }\n function pippenger(c4, fieldN, points, scalars) {\n validateMSMPoints(points, c4);\n validateMSMScalars(scalars, fieldN);\n const plength = points.length;\n const slength = scalars.length;\n if (plength !== slength)\n throw new Error(\"arrays of points and scalars must have equal length\");\n const zero = c4.ZERO;\n const wbits = bitLen(BigInt(plength));\n let windowSize = 1;\n if (wbits > 12)\n windowSize = wbits - 3;\n else if (wbits > 4)\n windowSize = wbits - 2;\n else if (wbits > 0)\n windowSize = 2;\n const MASK = bitMask(windowSize);\n const buckets = new Array(Number(MASK) + 1).fill(zero);\n const lastBits = Math.floor((fieldN.BITS - 1) / windowSize) * windowSize;\n let sum = zero;\n for (let i3 = lastBits; i3 >= 0; i3 -= windowSize) {\n buckets.fill(zero);\n for (let j2 = 0; j2 < slength; j2++) {\n const scalar = scalars[j2];\n const wbits2 = Number(scalar >> BigInt(i3) & MASK);\n buckets[wbits2] = buckets[wbits2].add(points[j2]);\n }\n let resI = zero;\n for (let j2 = buckets.length - 1, sumI = zero; j2 > 0; j2--) {\n sumI = sumI.add(buckets[j2]);\n resI = resI.add(sumI);\n }\n sum = sum.add(resI);\n if (i3 !== 0)\n for (let j2 = 0; j2 < windowSize; j2++)\n sum = sum.double();\n }\n return sum;\n }\n function validateBasic(curve) {\n validateField(curve.Fp);\n validateObject(curve, {\n n: \"bigint\",\n h: \"bigint\",\n Gx: \"field\",\n Gy: \"field\"\n }, {\n nBitLength: \"isSafeInteger\",\n nByteLength: \"isSafeInteger\"\n });\n return Object.freeze({\n ...nLength(curve.n, curve.nBitLength),\n ...curve,\n ...{ p: curve.Fp.ORDER }\n });\n }\n var _0n4, _1n4, pointPrecomputes, pointWindowSizes;\n var init_curve = __esm({\n \"../../../node_modules/.pnpm/@noble+curves@1.9.1/node_modules/@noble/curves/esm/abstract/curve.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_modular();\n init_utils5();\n _0n4 = BigInt(0);\n _1n4 = BigInt(1);\n pointPrecomputes = /* @__PURE__ */ new WeakMap();\n pointWindowSizes = /* @__PURE__ */ new WeakMap();\n }\n });\n\n // ../../../node_modules/.pnpm/@noble+curves@1.9.1/node_modules/@noble/curves/esm/abstract/weierstrass.js\n function validateSigVerOpts(opts) {\n if (opts.lowS !== void 0)\n abool(\"lowS\", opts.lowS);\n if (opts.prehash !== void 0)\n abool(\"prehash\", opts.prehash);\n }\n function validatePointOpts(curve) {\n const opts = validateBasic(curve);\n validateObject(opts, {\n a: \"field\",\n b: \"field\"\n }, {\n allowInfinityPoint: \"boolean\",\n allowedPrivateKeyLengths: \"array\",\n clearCofactor: \"function\",\n fromBytes: \"function\",\n isTorsionFree: \"function\",\n toBytes: \"function\",\n wrapPrivateKey: \"boolean\"\n });\n const { endo, Fp, a: a3 } = opts;\n if (endo) {\n if (!Fp.eql(a3, Fp.ZERO)) {\n throw new Error(\"invalid endo: CURVE.a must be 0\");\n }\n if (typeof endo !== \"object\" || typeof endo.beta !== \"bigint\" || typeof endo.splitScalar !== \"function\") {\n throw new Error('invalid endo: expected \"beta\": bigint and \"splitScalar\": function');\n }\n }\n return Object.freeze({ ...opts });\n }\n function numToSizedHex(num2, size6) {\n return bytesToHex3(numberToBytesBE(num2, size6));\n }\n function weierstrassPoints(opts) {\n const CURVE = validatePointOpts(opts);\n const { Fp } = CURVE;\n const Fn = Field(CURVE.n, CURVE.nBitLength);\n const toBytes5 = CURVE.toBytes || ((_c, point, _isCompressed) => {\n const a3 = point.toAffine();\n return concatBytes3(Uint8Array.from([4]), Fp.toBytes(a3.x), Fp.toBytes(a3.y));\n });\n const fromBytes5 = CURVE.fromBytes || ((bytes) => {\n const tail = bytes.subarray(1);\n const x4 = Fp.fromBytes(tail.subarray(0, Fp.BYTES));\n const y6 = Fp.fromBytes(tail.subarray(Fp.BYTES, 2 * Fp.BYTES));\n return { x: x4, y: y6 };\n });\n function weierstrassEquation(x4) {\n const { a: a3, b: b4 } = CURVE;\n const x22 = Fp.sqr(x4);\n const x32 = Fp.mul(x22, x4);\n return Fp.add(Fp.add(x32, Fp.mul(x4, a3)), b4);\n }\n function isValidXY(x4, y6) {\n const left = Fp.sqr(y6);\n const right = weierstrassEquation(x4);\n return Fp.eql(left, right);\n }\n if (!isValidXY(CURVE.Gx, CURVE.Gy))\n throw new Error(\"bad curve params: generator point\");\n const _4a3 = Fp.mul(Fp.pow(CURVE.a, _3n2), _4n2);\n const _27b2 = Fp.mul(Fp.sqr(CURVE.b), BigInt(27));\n if (Fp.is0(Fp.add(_4a3, _27b2)))\n throw new Error(\"bad curve params: a or b\");\n function isWithinCurveOrder(num2) {\n return inRange(num2, _1n5, CURVE.n);\n }\n function normPrivateKeyToScalar(key) {\n const { allowedPrivateKeyLengths: lengths, nByteLength, wrapPrivateKey, n: N4 } = CURVE;\n if (lengths && typeof key !== \"bigint\") {\n if (isBytes2(key))\n key = bytesToHex3(key);\n if (typeof key !== \"string\" || !lengths.includes(key.length))\n throw new Error(\"invalid private key\");\n key = key.padStart(nByteLength * 2, \"0\");\n }\n let num2;\n try {\n num2 = typeof key === \"bigint\" ? key : bytesToNumberBE(ensureBytes(\"private key\", key, nByteLength));\n } catch (error) {\n throw new Error(\"invalid private key, expected hex or \" + nByteLength + \" bytes, got \" + typeof key);\n }\n if (wrapPrivateKey)\n num2 = mod(num2, N4);\n aInRange(\"private key\", num2, _1n5, N4);\n return num2;\n }\n function aprjpoint(other) {\n if (!(other instanceof Point3))\n throw new Error(\"ProjectivePoint expected\");\n }\n const toAffineMemo = memoized((p4, iz) => {\n const { px: x4, py: y6, pz: z2 } = p4;\n if (Fp.eql(z2, Fp.ONE))\n return { x: x4, y: y6 };\n const is0 = p4.is0();\n if (iz == null)\n iz = is0 ? Fp.ONE : Fp.inv(z2);\n const ax = Fp.mul(x4, iz);\n const ay = Fp.mul(y6, iz);\n const zz = Fp.mul(z2, iz);\n if (is0)\n return { x: Fp.ZERO, y: Fp.ZERO };\n if (!Fp.eql(zz, Fp.ONE))\n throw new Error(\"invZ was invalid\");\n return { x: ax, y: ay };\n });\n const assertValidMemo = memoized((p4) => {\n if (p4.is0()) {\n if (CURVE.allowInfinityPoint && !Fp.is0(p4.py))\n return;\n throw new Error(\"bad point: ZERO\");\n }\n const { x: x4, y: y6 } = p4.toAffine();\n if (!Fp.isValid(x4) || !Fp.isValid(y6))\n throw new Error(\"bad point: x or y not FE\");\n if (!isValidXY(x4, y6))\n throw new Error(\"bad point: equation left != right\");\n if (!p4.isTorsionFree())\n throw new Error(\"bad point: not in prime-order subgroup\");\n return true;\n });\n class Point3 {\n constructor(px, py, pz) {\n if (px == null || !Fp.isValid(px))\n throw new Error(\"x required\");\n if (py == null || !Fp.isValid(py) || Fp.is0(py))\n throw new Error(\"y required\");\n if (pz == null || !Fp.isValid(pz))\n throw new Error(\"z required\");\n this.px = px;\n this.py = py;\n this.pz = pz;\n Object.freeze(this);\n }\n // Does not validate if the point is on-curve.\n // Use fromHex instead, or call assertValidity() later.\n static fromAffine(p4) {\n const { x: x4, y: y6 } = p4 || {};\n if (!p4 || !Fp.isValid(x4) || !Fp.isValid(y6))\n throw new Error(\"invalid affine point\");\n if (p4 instanceof Point3)\n throw new Error(\"projective point not allowed\");\n const is0 = (i3) => Fp.eql(i3, Fp.ZERO);\n if (is0(x4) && is0(y6))\n return Point3.ZERO;\n return new Point3(x4, y6, Fp.ONE);\n }\n get x() {\n return this.toAffine().x;\n }\n get y() {\n return this.toAffine().y;\n }\n /**\n * Takes a bunch of Projective Points but executes only one\n * inversion on all of them. Inversion is very slow operation,\n * so this improves performance massively.\n * Optimization: converts a list of projective points to a list of identical points with Z=1.\n */\n static normalizeZ(points) {\n const toInv = FpInvertBatch(Fp, points.map((p4) => p4.pz));\n return points.map((p4, i3) => p4.toAffine(toInv[i3])).map(Point3.fromAffine);\n }\n /**\n * Converts hash string or Uint8Array to Point.\n * @param hex short/long ECDSA hex\n */\n static fromHex(hex) {\n const P2 = Point3.fromAffine(fromBytes5(ensureBytes(\"pointHex\", hex)));\n P2.assertValidity();\n return P2;\n }\n // Multiplies generator point by privateKey.\n static fromPrivateKey(privateKey) {\n return Point3.BASE.multiply(normPrivateKeyToScalar(privateKey));\n }\n // Multiscalar Multiplication\n static msm(points, scalars) {\n return pippenger(Point3, Fn, points, scalars);\n }\n // \"Private method\", don't use it directly\n _setWindowSize(windowSize) {\n wnaf.setWindowSize(this, windowSize);\n }\n // A point on curve is valid if it conforms to equation.\n assertValidity() {\n assertValidMemo(this);\n }\n hasEvenY() {\n const { y: y6 } = this.toAffine();\n if (Fp.isOdd)\n return !Fp.isOdd(y6);\n throw new Error(\"Field doesn't support isOdd\");\n }\n /**\n * Compare one point to another.\n */\n equals(other) {\n aprjpoint(other);\n const { px: X1, py: Y1, pz: Z1 } = this;\n const { px: X2, py: Y2, pz: Z2 } = other;\n const U1 = Fp.eql(Fp.mul(X1, Z2), Fp.mul(X2, Z1));\n const U22 = Fp.eql(Fp.mul(Y1, Z2), Fp.mul(Y2, Z1));\n return U1 && U22;\n }\n /**\n * Flips point to one corresponding to (x, -y) in Affine coordinates.\n */\n negate() {\n return new Point3(this.px, Fp.neg(this.py), this.pz);\n }\n // Renes-Costello-Batina exception-free doubling formula.\n // There is 30% faster Jacobian formula, but it is not complete.\n // https://eprint.iacr.org/2015/1060, algorithm 3\n // Cost: 8M + 3S + 3*a + 2*b3 + 15add.\n double() {\n const { a: a3, b: b4 } = CURVE;\n const b32 = Fp.mul(b4, _3n2);\n const { px: X1, py: Y1, pz: Z1 } = this;\n let X3 = Fp.ZERO, Y3 = Fp.ZERO, Z3 = Fp.ZERO;\n let t0 = Fp.mul(X1, X1);\n let t1 = Fp.mul(Y1, Y1);\n let t22 = Fp.mul(Z1, Z1);\n let t3 = Fp.mul(X1, Y1);\n t3 = Fp.add(t3, t3);\n Z3 = Fp.mul(X1, Z1);\n Z3 = Fp.add(Z3, Z3);\n X3 = Fp.mul(a3, Z3);\n Y3 = Fp.mul(b32, t22);\n Y3 = Fp.add(X3, Y3);\n X3 = Fp.sub(t1, Y3);\n Y3 = Fp.add(t1, Y3);\n Y3 = Fp.mul(X3, Y3);\n X3 = Fp.mul(t3, X3);\n Z3 = Fp.mul(b32, Z3);\n t22 = Fp.mul(a3, t22);\n t3 = Fp.sub(t0, t22);\n t3 = Fp.mul(a3, t3);\n t3 = Fp.add(t3, Z3);\n Z3 = Fp.add(t0, t0);\n t0 = Fp.add(Z3, t0);\n t0 = Fp.add(t0, t22);\n t0 = Fp.mul(t0, t3);\n Y3 = Fp.add(Y3, t0);\n t22 = Fp.mul(Y1, Z1);\n t22 = Fp.add(t22, t22);\n t0 = Fp.mul(t22, t3);\n X3 = Fp.sub(X3, t0);\n Z3 = Fp.mul(t22, t1);\n Z3 = Fp.add(Z3, Z3);\n Z3 = Fp.add(Z3, Z3);\n return new Point3(X3, Y3, Z3);\n }\n // Renes-Costello-Batina exception-free addition formula.\n // There is 30% faster Jacobian formula, but it is not complete.\n // https://eprint.iacr.org/2015/1060, algorithm 1\n // Cost: 12M + 0S + 3*a + 3*b3 + 23add.\n add(other) {\n aprjpoint(other);\n const { px: X1, py: Y1, pz: Z1 } = this;\n const { px: X2, py: Y2, pz: Z2 } = other;\n let X3 = Fp.ZERO, Y3 = Fp.ZERO, Z3 = Fp.ZERO;\n const a3 = CURVE.a;\n const b32 = Fp.mul(CURVE.b, _3n2);\n let t0 = Fp.mul(X1, X2);\n let t1 = Fp.mul(Y1, Y2);\n let t22 = Fp.mul(Z1, Z2);\n let t3 = Fp.add(X1, Y1);\n let t4 = Fp.add(X2, Y2);\n t3 = Fp.mul(t3, t4);\n t4 = Fp.add(t0, t1);\n t3 = Fp.sub(t3, t4);\n t4 = Fp.add(X1, Z1);\n let t5 = Fp.add(X2, Z2);\n t4 = Fp.mul(t4, t5);\n t5 = Fp.add(t0, t22);\n t4 = Fp.sub(t4, t5);\n t5 = Fp.add(Y1, Z1);\n X3 = Fp.add(Y2, Z2);\n t5 = Fp.mul(t5, X3);\n X3 = Fp.add(t1, t22);\n t5 = Fp.sub(t5, X3);\n Z3 = Fp.mul(a3, t4);\n X3 = Fp.mul(b32, t22);\n Z3 = Fp.add(X3, Z3);\n X3 = Fp.sub(t1, Z3);\n Z3 = Fp.add(t1, Z3);\n Y3 = Fp.mul(X3, Z3);\n t1 = Fp.add(t0, t0);\n t1 = Fp.add(t1, t0);\n t22 = Fp.mul(a3, t22);\n t4 = Fp.mul(b32, t4);\n t1 = Fp.add(t1, t22);\n t22 = Fp.sub(t0, t22);\n t22 = Fp.mul(a3, t22);\n t4 = Fp.add(t4, t22);\n t0 = Fp.mul(t1, t4);\n Y3 = Fp.add(Y3, t0);\n t0 = Fp.mul(t5, t4);\n X3 = Fp.mul(t3, X3);\n X3 = Fp.sub(X3, t0);\n t0 = Fp.mul(t3, t1);\n Z3 = Fp.mul(t5, Z3);\n Z3 = Fp.add(Z3, t0);\n return new Point3(X3, Y3, Z3);\n }\n subtract(other) {\n return this.add(other.negate());\n }\n is0() {\n return this.equals(Point3.ZERO);\n }\n wNAF(n2) {\n return wnaf.wNAFCached(this, n2, Point3.normalizeZ);\n }\n /**\n * Non-constant-time multiplication. Uses double-and-add algorithm.\n * It's faster, but should only be used when you don't care about\n * an exposed private key e.g. sig verification, which works over *public* keys.\n */\n multiplyUnsafe(sc) {\n const { endo: endo2, n: N4 } = CURVE;\n aInRange(\"scalar\", sc, _0n5, N4);\n const I2 = Point3.ZERO;\n if (sc === _0n5)\n return I2;\n if (this.is0() || sc === _1n5)\n return this;\n if (!endo2 || wnaf.hasPrecomputes(this))\n return wnaf.wNAFCachedUnsafe(this, sc, Point3.normalizeZ);\n let { k1neg, k1, k2neg, k2: k22 } = endo2.splitScalar(sc);\n let k1p = I2;\n let k2p = I2;\n let d5 = this;\n while (k1 > _0n5 || k22 > _0n5) {\n if (k1 & _1n5)\n k1p = k1p.add(d5);\n if (k22 & _1n5)\n k2p = k2p.add(d5);\n d5 = d5.double();\n k1 >>= _1n5;\n k22 >>= _1n5;\n }\n if (k1neg)\n k1p = k1p.negate();\n if (k2neg)\n k2p = k2p.negate();\n k2p = new Point3(Fp.mul(k2p.px, endo2.beta), k2p.py, k2p.pz);\n return k1p.add(k2p);\n }\n /**\n * Constant time multiplication.\n * Uses wNAF method. Windowed method may be 10% faster,\n * but takes 2x longer to generate and consumes 2x memory.\n * Uses precomputes when available.\n * Uses endomorphism for Koblitz curves.\n * @param scalar by which the point would be multiplied\n * @returns New point\n */\n multiply(scalar) {\n const { endo: endo2, n: N4 } = CURVE;\n aInRange(\"scalar\", scalar, _1n5, N4);\n let point, fake;\n if (endo2) {\n const { k1neg, k1, k2neg, k2: k22 } = endo2.splitScalar(scalar);\n let { p: k1p, f: f1p } = this.wNAF(k1);\n let { p: k2p, f: f2p } = this.wNAF(k22);\n k1p = wnaf.constTimeNegate(k1neg, k1p);\n k2p = wnaf.constTimeNegate(k2neg, k2p);\n k2p = new Point3(Fp.mul(k2p.px, endo2.beta), k2p.py, k2p.pz);\n point = k1p.add(k2p);\n fake = f1p.add(f2p);\n } else {\n const { p: p4, f: f6 } = this.wNAF(scalar);\n point = p4;\n fake = f6;\n }\n return Point3.normalizeZ([point, fake])[0];\n }\n /**\n * Efficiently calculate `aP + bQ`. Unsafe, can expose private key, if used incorrectly.\n * Not using Strauss-Shamir trick: precomputation tables are faster.\n * The trick could be useful if both P and Q are not G (not in our case).\n * @returns non-zero affine point\n */\n multiplyAndAddUnsafe(Q2, a3, b4) {\n const G = Point3.BASE;\n const mul = (P2, a4) => a4 === _0n5 || a4 === _1n5 || !P2.equals(G) ? P2.multiplyUnsafe(a4) : P2.multiply(a4);\n const sum = mul(this, a3).add(mul(Q2, b4));\n return sum.is0() ? void 0 : sum;\n }\n // Converts Projective point to affine (x, y) coordinates.\n // Can accept precomputed Z^-1 - for example, from invertBatch.\n // (x, y, z) ∋ (x=x/z, y=y/z)\n toAffine(iz) {\n return toAffineMemo(this, iz);\n }\n isTorsionFree() {\n const { h: cofactor, isTorsionFree } = CURVE;\n if (cofactor === _1n5)\n return true;\n if (isTorsionFree)\n return isTorsionFree(Point3, this);\n throw new Error(\"isTorsionFree() has not been declared for the elliptic curve\");\n }\n clearCofactor() {\n const { h: cofactor, clearCofactor } = CURVE;\n if (cofactor === _1n5)\n return this;\n if (clearCofactor)\n return clearCofactor(Point3, this);\n return this.multiplyUnsafe(CURVE.h);\n }\n toRawBytes(isCompressed = true) {\n abool(\"isCompressed\", isCompressed);\n this.assertValidity();\n return toBytes5(Point3, this, isCompressed);\n }\n toHex(isCompressed = true) {\n abool(\"isCompressed\", isCompressed);\n return bytesToHex3(this.toRawBytes(isCompressed));\n }\n }\n Point3.BASE = new Point3(CURVE.Gx, CURVE.Gy, Fp.ONE);\n Point3.ZERO = new Point3(Fp.ZERO, Fp.ONE, Fp.ZERO);\n const { endo, nBitLength } = CURVE;\n const wnaf = wNAF(Point3, endo ? Math.ceil(nBitLength / 2) : nBitLength);\n return {\n CURVE,\n ProjectivePoint: Point3,\n normPrivateKeyToScalar,\n weierstrassEquation,\n isWithinCurveOrder\n };\n }\n function validateOpts(curve) {\n const opts = validateBasic(curve);\n validateObject(opts, {\n hash: \"hash\",\n hmac: \"function\",\n randomBytes: \"function\"\n }, {\n bits2int: \"function\",\n bits2int_modN: \"function\",\n lowS: \"boolean\"\n });\n return Object.freeze({ lowS: true, ...opts });\n }\n function weierstrass(curveDef) {\n const CURVE = validateOpts(curveDef);\n const { Fp, n: CURVE_ORDER, nByteLength, nBitLength } = CURVE;\n const compressedLen = Fp.BYTES + 1;\n const uncompressedLen = 2 * Fp.BYTES + 1;\n function modN2(a3) {\n return mod(a3, CURVE_ORDER);\n }\n function invN(a3) {\n return invert(a3, CURVE_ORDER);\n }\n const { ProjectivePoint: Point3, normPrivateKeyToScalar, weierstrassEquation, isWithinCurveOrder } = weierstrassPoints({\n ...CURVE,\n toBytes(_c, point, isCompressed) {\n const a3 = point.toAffine();\n const x4 = Fp.toBytes(a3.x);\n const cat = concatBytes3;\n abool(\"isCompressed\", isCompressed);\n if (isCompressed) {\n return cat(Uint8Array.from([point.hasEvenY() ? 2 : 3]), x4);\n } else {\n return cat(Uint8Array.from([4]), x4, Fp.toBytes(a3.y));\n }\n },\n fromBytes(bytes) {\n const len = bytes.length;\n const head = bytes[0];\n const tail = bytes.subarray(1);\n if (len === compressedLen && (head === 2 || head === 3)) {\n const x4 = bytesToNumberBE(tail);\n if (!inRange(x4, _1n5, Fp.ORDER))\n throw new Error(\"Point is not on curve\");\n const y22 = weierstrassEquation(x4);\n let y6;\n try {\n y6 = Fp.sqrt(y22);\n } catch (sqrtError) {\n const suffix = sqrtError instanceof Error ? \": \" + sqrtError.message : \"\";\n throw new Error(\"Point is not on curve\" + suffix);\n }\n const isYOdd = (y6 & _1n5) === _1n5;\n const isHeadOdd = (head & 1) === 1;\n if (isHeadOdd !== isYOdd)\n y6 = Fp.neg(y6);\n return { x: x4, y: y6 };\n } else if (len === uncompressedLen && head === 4) {\n const x4 = Fp.fromBytes(tail.subarray(0, Fp.BYTES));\n const y6 = Fp.fromBytes(tail.subarray(Fp.BYTES, 2 * Fp.BYTES));\n return { x: x4, y: y6 };\n } else {\n const cl = compressedLen;\n const ul = uncompressedLen;\n throw new Error(\"invalid Point, expected length of \" + cl + \", or uncompressed \" + ul + \", got \" + len);\n }\n }\n });\n function isBiggerThanHalfOrder(number2) {\n const HALF = CURVE_ORDER >> _1n5;\n return number2 > HALF;\n }\n function normalizeS(s4) {\n return isBiggerThanHalfOrder(s4) ? modN2(-s4) : s4;\n }\n const slcNum = (b4, from14, to) => bytesToNumberBE(b4.slice(from14, to));\n class Signature2 {\n constructor(r2, s4, recovery) {\n aInRange(\"r\", r2, _1n5, CURVE_ORDER);\n aInRange(\"s\", s4, _1n5, CURVE_ORDER);\n this.r = r2;\n this.s = s4;\n if (recovery != null)\n this.recovery = recovery;\n Object.freeze(this);\n }\n // pair (bytes of r, bytes of s)\n static fromCompact(hex) {\n const l6 = nByteLength;\n hex = ensureBytes(\"compactSignature\", hex, l6 * 2);\n return new Signature2(slcNum(hex, 0, l6), slcNum(hex, l6, 2 * l6));\n }\n // DER encoded ECDSA signature\n // https://bitcoin.stackexchange.com/questions/57644/what-are-the-parts-of-a-bitcoin-transaction-input-script\n static fromDER(hex) {\n const { r: r2, s: s4 } = DER.toSig(ensureBytes(\"DER\", hex));\n return new Signature2(r2, s4);\n }\n /**\n * @todo remove\n * @deprecated\n */\n assertValidity() {\n }\n addRecoveryBit(recovery) {\n return new Signature2(this.r, this.s, recovery);\n }\n recoverPublicKey(msgHash) {\n const { r: r2, s: s4, recovery: rec } = this;\n const h4 = bits2int_modN(ensureBytes(\"msgHash\", msgHash));\n if (rec == null || ![0, 1, 2, 3].includes(rec))\n throw new Error(\"recovery id invalid\");\n const radj = rec === 2 || rec === 3 ? r2 + CURVE.n : r2;\n if (radj >= Fp.ORDER)\n throw new Error(\"recovery id 2 or 3 invalid\");\n const prefix = (rec & 1) === 0 ? \"02\" : \"03\";\n const R3 = Point3.fromHex(prefix + numToSizedHex(radj, Fp.BYTES));\n const ir = invN(radj);\n const u1 = modN2(-h4 * ir);\n const u2 = modN2(s4 * ir);\n const Q2 = Point3.BASE.multiplyAndAddUnsafe(R3, u1, u2);\n if (!Q2)\n throw new Error(\"point at infinify\");\n Q2.assertValidity();\n return Q2;\n }\n // Signatures should be low-s, to prevent malleability.\n hasHighS() {\n return isBiggerThanHalfOrder(this.s);\n }\n normalizeS() {\n return this.hasHighS() ? new Signature2(this.r, modN2(-this.s), this.recovery) : this;\n }\n // DER-encoded\n toDERRawBytes() {\n return hexToBytes3(this.toDERHex());\n }\n toDERHex() {\n return DER.hexFromSig(this);\n }\n // padded bytes of r, then padded bytes of s\n toCompactRawBytes() {\n return hexToBytes3(this.toCompactHex());\n }\n toCompactHex() {\n const l6 = nByteLength;\n return numToSizedHex(this.r, l6) + numToSizedHex(this.s, l6);\n }\n }\n const utils = {\n isValidPrivateKey(privateKey) {\n try {\n normPrivateKeyToScalar(privateKey);\n return true;\n } catch (error) {\n return false;\n }\n },\n normPrivateKeyToScalar,\n /**\n * Produces cryptographically secure private key from random of size\n * (groupLen + ceil(groupLen / 2)) with modulo bias being negligible.\n */\n randomPrivateKey: () => {\n const length2 = getMinHashLength(CURVE.n);\n return mapHashToField(CURVE.randomBytes(length2), CURVE.n);\n },\n /**\n * Creates precompute table for an arbitrary EC point. Makes point \"cached\".\n * Allows to massively speed-up `point.multiply(scalar)`.\n * @returns cached point\n * @example\n * const fast = utils.precompute(8, ProjectivePoint.fromHex(someonesPubKey));\n * fast.multiply(privKey); // much faster ECDH now\n */\n precompute(windowSize = 8, point = Point3.BASE) {\n point._setWindowSize(windowSize);\n point.multiply(BigInt(3));\n return point;\n }\n };\n function getPublicKey(privateKey, isCompressed = true) {\n return Point3.fromPrivateKey(privateKey).toRawBytes(isCompressed);\n }\n function isProbPub(item) {\n if (typeof item === \"bigint\")\n return false;\n if (item instanceof Point3)\n return true;\n const arr = ensureBytes(\"key\", item);\n const len = arr.length;\n const fpl = Fp.BYTES;\n const compLen = fpl + 1;\n const uncompLen = 2 * fpl + 1;\n if (CURVE.allowedPrivateKeyLengths || nByteLength === compLen) {\n return void 0;\n } else {\n return len === compLen || len === uncompLen;\n }\n }\n function getSharedSecret(privateA, publicB, isCompressed = true) {\n if (isProbPub(privateA) === true)\n throw new Error(\"first arg must be private key\");\n if (isProbPub(publicB) === false)\n throw new Error(\"second arg must be public key\");\n const b4 = Point3.fromHex(publicB);\n return b4.multiply(normPrivateKeyToScalar(privateA)).toRawBytes(isCompressed);\n }\n const bits2int = CURVE.bits2int || function(bytes) {\n if (bytes.length > 8192)\n throw new Error(\"input is too large\");\n const num2 = bytesToNumberBE(bytes);\n const delta = bytes.length * 8 - nBitLength;\n return delta > 0 ? num2 >> BigInt(delta) : num2;\n };\n const bits2int_modN = CURVE.bits2int_modN || function(bytes) {\n return modN2(bits2int(bytes));\n };\n const ORDER_MASK = bitMask(nBitLength);\n function int2octets(num2) {\n aInRange(\"num < 2^\" + nBitLength, num2, _0n5, ORDER_MASK);\n return numberToBytesBE(num2, nByteLength);\n }\n function prepSig(msgHash, privateKey, opts = defaultSigOpts) {\n if ([\"recovered\", \"canonical\"].some((k4) => k4 in opts))\n throw new Error(\"sign() legacy options not supported\");\n const { hash: hash3, randomBytes: randomBytes2 } = CURVE;\n let { lowS, prehash, extraEntropy: ent } = opts;\n if (lowS == null)\n lowS = true;\n msgHash = ensureBytes(\"msgHash\", msgHash);\n validateSigVerOpts(opts);\n if (prehash)\n msgHash = ensureBytes(\"prehashed msgHash\", hash3(msgHash));\n const h1int = bits2int_modN(msgHash);\n const d5 = normPrivateKeyToScalar(privateKey);\n const seedArgs = [int2octets(d5), int2octets(h1int)];\n if (ent != null && ent !== false) {\n const e3 = ent === true ? randomBytes2(Fp.BYTES) : ent;\n seedArgs.push(ensureBytes(\"extraEntropy\", e3));\n }\n const seed = concatBytes3(...seedArgs);\n const m2 = h1int;\n function k2sig(kBytes) {\n const k4 = bits2int(kBytes);\n if (!isWithinCurveOrder(k4))\n return;\n const ik = invN(k4);\n const q3 = Point3.BASE.multiply(k4).toAffine();\n const r2 = modN2(q3.x);\n if (r2 === _0n5)\n return;\n const s4 = modN2(ik * modN2(m2 + r2 * d5));\n if (s4 === _0n5)\n return;\n let recovery = (q3.x === r2 ? 0 : 2) | Number(q3.y & _1n5);\n let normS = s4;\n if (lowS && isBiggerThanHalfOrder(s4)) {\n normS = normalizeS(s4);\n recovery ^= 1;\n }\n return new Signature2(r2, normS, recovery);\n }\n return { seed, k2sig };\n }\n const defaultSigOpts = { lowS: CURVE.lowS, prehash: false };\n const defaultVerOpts = { lowS: CURVE.lowS, prehash: false };\n function sign3(msgHash, privKey, opts = defaultSigOpts) {\n const { seed, k2sig } = prepSig(msgHash, privKey, opts);\n const C = CURVE;\n const drbg = createHmacDrbg(C.hash.outputLen, C.nByteLength, C.hmac);\n return drbg(seed, k2sig);\n }\n Point3.BASE._setWindowSize(8);\n function verify(signature, msgHash, publicKey, opts = defaultVerOpts) {\n const sg = signature;\n msgHash = ensureBytes(\"msgHash\", msgHash);\n publicKey = ensureBytes(\"publicKey\", publicKey);\n const { lowS, prehash, format } = opts;\n validateSigVerOpts(opts);\n if (\"strict\" in opts)\n throw new Error(\"options.strict was renamed to lowS\");\n if (format !== void 0 && format !== \"compact\" && format !== \"der\")\n throw new Error(\"format must be compact or der\");\n const isHex2 = typeof sg === \"string\" || isBytes2(sg);\n const isObj = !isHex2 && !format && typeof sg === \"object\" && sg !== null && typeof sg.r === \"bigint\" && typeof sg.s === \"bigint\";\n if (!isHex2 && !isObj)\n throw new Error(\"invalid signature, expected Uint8Array, hex string or Signature instance\");\n let _sig = void 0;\n let P2;\n try {\n if (isObj)\n _sig = new Signature2(sg.r, sg.s);\n if (isHex2) {\n try {\n if (format !== \"compact\")\n _sig = Signature2.fromDER(sg);\n } catch (derError) {\n if (!(derError instanceof DER.Err))\n throw derError;\n }\n if (!_sig && format !== \"der\")\n _sig = Signature2.fromCompact(sg);\n }\n P2 = Point3.fromHex(publicKey);\n } catch (error) {\n return false;\n }\n if (!_sig)\n return false;\n if (lowS && _sig.hasHighS())\n return false;\n if (prehash)\n msgHash = CURVE.hash(msgHash);\n const { r: r2, s: s4 } = _sig;\n const h4 = bits2int_modN(msgHash);\n const is = invN(s4);\n const u1 = modN2(h4 * is);\n const u2 = modN2(r2 * is);\n const R3 = Point3.BASE.multiplyAndAddUnsafe(P2, u1, u2)?.toAffine();\n if (!R3)\n return false;\n const v2 = modN2(R3.x);\n return v2 === r2;\n }\n return {\n CURVE,\n getPublicKey,\n getSharedSecret,\n sign: sign3,\n verify,\n ProjectivePoint: Point3,\n Signature: Signature2,\n utils\n };\n }\n function SWUFpSqrtRatio(Fp, Z2) {\n const q3 = Fp.ORDER;\n let l6 = _0n5;\n for (let o5 = q3 - _1n5; o5 % _2n3 === _0n5; o5 /= _2n3)\n l6 += _1n5;\n const c1 = l6;\n const _2n_pow_c1_1 = _2n3 << c1 - _1n5 - _1n5;\n const _2n_pow_c1 = _2n_pow_c1_1 * _2n3;\n const c22 = (q3 - _1n5) / _2n_pow_c1;\n const c32 = (c22 - _1n5) / _2n3;\n const c4 = _2n_pow_c1 - _1n5;\n const c5 = _2n_pow_c1_1;\n const c6 = Fp.pow(Z2, c22);\n const c7 = Fp.pow(Z2, (c22 + _1n5) / _2n3);\n let sqrtRatio = (u2, v2) => {\n let tv1 = c6;\n let tv2 = Fp.pow(v2, c4);\n let tv3 = Fp.sqr(tv2);\n tv3 = Fp.mul(tv3, v2);\n let tv5 = Fp.mul(u2, tv3);\n tv5 = Fp.pow(tv5, c32);\n tv5 = Fp.mul(tv5, tv2);\n tv2 = Fp.mul(tv5, v2);\n tv3 = Fp.mul(tv5, u2);\n let tv4 = Fp.mul(tv3, tv2);\n tv5 = Fp.pow(tv4, c5);\n let isQR = Fp.eql(tv5, Fp.ONE);\n tv2 = Fp.mul(tv3, c7);\n tv5 = Fp.mul(tv4, tv1);\n tv3 = Fp.cmov(tv2, tv3, isQR);\n tv4 = Fp.cmov(tv5, tv4, isQR);\n for (let i3 = c1; i3 > _1n5; i3--) {\n let tv52 = i3 - _2n3;\n tv52 = _2n3 << tv52 - _1n5;\n let tvv5 = Fp.pow(tv4, tv52);\n const e1 = Fp.eql(tvv5, Fp.ONE);\n tv2 = Fp.mul(tv3, tv1);\n tv1 = Fp.mul(tv1, tv1);\n tvv5 = Fp.mul(tv4, tv1);\n tv3 = Fp.cmov(tv2, tv3, e1);\n tv4 = Fp.cmov(tvv5, tv4, e1);\n }\n return { isValid: isQR, value: tv3 };\n };\n if (Fp.ORDER % _4n2 === _3n2) {\n const c12 = (Fp.ORDER - _3n2) / _4n2;\n const c23 = Fp.sqrt(Fp.neg(Z2));\n sqrtRatio = (u2, v2) => {\n let tv1 = Fp.sqr(v2);\n const tv2 = Fp.mul(u2, v2);\n tv1 = Fp.mul(tv1, tv2);\n let y1 = Fp.pow(tv1, c12);\n y1 = Fp.mul(y1, tv2);\n const y22 = Fp.mul(y1, c23);\n const tv3 = Fp.mul(Fp.sqr(y1), v2);\n const isQR = Fp.eql(tv3, u2);\n let y6 = Fp.cmov(y22, y1, isQR);\n return { isValid: isQR, value: y6 };\n };\n }\n return sqrtRatio;\n }\n function mapToCurveSimpleSWU(Fp, opts) {\n validateField(Fp);\n if (!Fp.isValid(opts.A) || !Fp.isValid(opts.B) || !Fp.isValid(opts.Z))\n throw new Error(\"mapToCurveSimpleSWU: invalid opts\");\n const sqrtRatio = SWUFpSqrtRatio(Fp, opts.Z);\n if (!Fp.isOdd)\n throw new Error(\"Fp.isOdd is not implemented!\");\n return (u2) => {\n let tv1, tv2, tv3, tv4, tv5, tv6, x4, y6;\n tv1 = Fp.sqr(u2);\n tv1 = Fp.mul(tv1, opts.Z);\n tv2 = Fp.sqr(tv1);\n tv2 = Fp.add(tv2, tv1);\n tv3 = Fp.add(tv2, Fp.ONE);\n tv3 = Fp.mul(tv3, opts.B);\n tv4 = Fp.cmov(opts.Z, Fp.neg(tv2), !Fp.eql(tv2, Fp.ZERO));\n tv4 = Fp.mul(tv4, opts.A);\n tv2 = Fp.sqr(tv3);\n tv6 = Fp.sqr(tv4);\n tv5 = Fp.mul(tv6, opts.A);\n tv2 = Fp.add(tv2, tv5);\n tv2 = Fp.mul(tv2, tv3);\n tv6 = Fp.mul(tv6, tv4);\n tv5 = Fp.mul(tv6, opts.B);\n tv2 = Fp.add(tv2, tv5);\n x4 = Fp.mul(tv1, tv3);\n const { isValid: isValid2, value } = sqrtRatio(tv2, tv6);\n y6 = Fp.mul(tv1, u2);\n y6 = Fp.mul(y6, value);\n x4 = Fp.cmov(x4, tv3, isValid2);\n y6 = Fp.cmov(y6, value, isValid2);\n const e1 = Fp.isOdd(u2) === Fp.isOdd(y6);\n y6 = Fp.cmov(Fp.neg(y6), y6, e1);\n const tv4_inv = FpInvertBatch(Fp, [tv4], true)[0];\n x4 = Fp.mul(x4, tv4_inv);\n return { x: x4, y: y6 };\n };\n }\n var DERErr, DER, _0n5, _1n5, _2n3, _3n2, _4n2;\n var init_weierstrass = __esm({\n \"../../../node_modules/.pnpm/@noble+curves@1.9.1/node_modules/@noble/curves/esm/abstract/weierstrass.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_curve();\n init_modular();\n init_utils5();\n DERErr = class extends Error {\n constructor(m2 = \"\") {\n super(m2);\n }\n };\n DER = {\n // asn.1 DER encoding utils\n Err: DERErr,\n // Basic building block is TLV (Tag-Length-Value)\n _tlv: {\n encode: (tag, data) => {\n const { Err: E2 } = DER;\n if (tag < 0 || tag > 256)\n throw new E2(\"tlv.encode: wrong tag\");\n if (data.length & 1)\n throw new E2(\"tlv.encode: unpadded data\");\n const dataLen = data.length / 2;\n const len = numberToHexUnpadded(dataLen);\n if (len.length / 2 & 128)\n throw new E2(\"tlv.encode: long form length too big\");\n const lenLen = dataLen > 127 ? numberToHexUnpadded(len.length / 2 | 128) : \"\";\n const t3 = numberToHexUnpadded(tag);\n return t3 + lenLen + len + data;\n },\n // v - value, l - left bytes (unparsed)\n decode(tag, data) {\n const { Err: E2 } = DER;\n let pos = 0;\n if (tag < 0 || tag > 256)\n throw new E2(\"tlv.encode: wrong tag\");\n if (data.length < 2 || data[pos++] !== tag)\n throw new E2(\"tlv.decode: wrong tlv\");\n const first = data[pos++];\n const isLong = !!(first & 128);\n let length2 = 0;\n if (!isLong)\n length2 = first;\n else {\n const lenLen = first & 127;\n if (!lenLen)\n throw new E2(\"tlv.decode(long): indefinite length not supported\");\n if (lenLen > 4)\n throw new E2(\"tlv.decode(long): byte length is too big\");\n const lengthBytes = data.subarray(pos, pos + lenLen);\n if (lengthBytes.length !== lenLen)\n throw new E2(\"tlv.decode: length bytes not complete\");\n if (lengthBytes[0] === 0)\n throw new E2(\"tlv.decode(long): zero leftmost byte\");\n for (const b4 of lengthBytes)\n length2 = length2 << 8 | b4;\n pos += lenLen;\n if (length2 < 128)\n throw new E2(\"tlv.decode(long): not minimal encoding\");\n }\n const v2 = data.subarray(pos, pos + length2);\n if (v2.length !== length2)\n throw new E2(\"tlv.decode: wrong value length\");\n return { v: v2, l: data.subarray(pos + length2) };\n }\n },\n // https://crypto.stackexchange.com/a/57734 Leftmost bit of first byte is 'negative' flag,\n // since we always use positive integers here. It must always be empty:\n // - add zero byte if exists\n // - if next byte doesn't have a flag, leading zero is not allowed (minimal encoding)\n _int: {\n encode(num2) {\n const { Err: E2 } = DER;\n if (num2 < _0n5)\n throw new E2(\"integer: negative integers are not allowed\");\n let hex = numberToHexUnpadded(num2);\n if (Number.parseInt(hex[0], 16) & 8)\n hex = \"00\" + hex;\n if (hex.length & 1)\n throw new E2(\"unexpected DER parsing assertion: unpadded hex\");\n return hex;\n },\n decode(data) {\n const { Err: E2 } = DER;\n if (data[0] & 128)\n throw new E2(\"invalid signature integer: negative\");\n if (data[0] === 0 && !(data[1] & 128))\n throw new E2(\"invalid signature integer: unnecessary leading zero\");\n return bytesToNumberBE(data);\n }\n },\n toSig(hex) {\n const { Err: E2, _int: int, _tlv: tlv } = DER;\n const data = ensureBytes(\"signature\", hex);\n const { v: seqBytes, l: seqLeftBytes } = tlv.decode(48, data);\n if (seqLeftBytes.length)\n throw new E2(\"invalid signature: left bytes after parsing\");\n const { v: rBytes, l: rLeftBytes } = tlv.decode(2, seqBytes);\n const { v: sBytes, l: sLeftBytes } = tlv.decode(2, rLeftBytes);\n if (sLeftBytes.length)\n throw new E2(\"invalid signature: left bytes after parsing\");\n return { r: int.decode(rBytes), s: int.decode(sBytes) };\n },\n hexFromSig(sig) {\n const { _tlv: tlv, _int: int } = DER;\n const rs = tlv.encode(2, int.encode(sig.r));\n const ss = tlv.encode(2, int.encode(sig.s));\n const seq = rs + ss;\n return tlv.encode(48, seq);\n }\n };\n _0n5 = BigInt(0);\n _1n5 = BigInt(1);\n _2n3 = BigInt(2);\n _3n2 = BigInt(3);\n _4n2 = BigInt(4);\n }\n });\n\n // ../../../node_modules/.pnpm/@noble+curves@1.9.1/node_modules/@noble/curves/esm/_shortw_utils.js\n function getHash(hash3) {\n return {\n hash: hash3,\n hmac: (key, ...msgs) => hmac(hash3, key, concatBytes(...msgs)),\n randomBytes\n };\n }\n function createCurve(curveDef, defHash) {\n const create2 = (hash3) => weierstrass({ ...curveDef, ...getHash(hash3) });\n return { ...create2(defHash), create: create2 };\n }\n var init_shortw_utils = __esm({\n \"../../../node_modules/.pnpm/@noble+curves@1.9.1/node_modules/@noble/curves/esm/_shortw_utils.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_hmac();\n init_utils3();\n init_weierstrass();\n }\n });\n\n // ../../../node_modules/.pnpm/@noble+curves@1.9.1/node_modules/@noble/curves/esm/abstract/hash-to-curve.js\n function i2osp(value, length2) {\n anum(value);\n anum(length2);\n if (value < 0 || value >= 1 << 8 * length2)\n throw new Error(\"invalid I2OSP input: \" + value);\n const res = Array.from({ length: length2 }).fill(0);\n for (let i3 = length2 - 1; i3 >= 0; i3--) {\n res[i3] = value & 255;\n value >>>= 8;\n }\n return new Uint8Array(res);\n }\n function strxor(a3, b4) {\n const arr = new Uint8Array(a3.length);\n for (let i3 = 0; i3 < a3.length; i3++) {\n arr[i3] = a3[i3] ^ b4[i3];\n }\n return arr;\n }\n function anum(item) {\n if (!Number.isSafeInteger(item))\n throw new Error(\"number expected\");\n }\n function expand_message_xmd(msg, DST, lenInBytes, H3) {\n abytes2(msg);\n abytes2(DST);\n anum(lenInBytes);\n if (DST.length > 255)\n DST = H3(concatBytes3(utf8ToBytes2(\"H2C-OVERSIZE-DST-\"), DST));\n const { outputLen: b_in_bytes, blockLen: r_in_bytes } = H3;\n const ell = Math.ceil(lenInBytes / b_in_bytes);\n if (lenInBytes > 65535 || ell > 255)\n throw new Error(\"expand_message_xmd: invalid lenInBytes\");\n const DST_prime = concatBytes3(DST, i2osp(DST.length, 1));\n const Z_pad = i2osp(0, r_in_bytes);\n const l_i_b_str = i2osp(lenInBytes, 2);\n const b4 = new Array(ell);\n const b_0 = H3(concatBytes3(Z_pad, msg, l_i_b_str, i2osp(0, 1), DST_prime));\n b4[0] = H3(concatBytes3(b_0, i2osp(1, 1), DST_prime));\n for (let i3 = 1; i3 <= ell; i3++) {\n const args = [strxor(b_0, b4[i3 - 1]), i2osp(i3 + 1, 1), DST_prime];\n b4[i3] = H3(concatBytes3(...args));\n }\n const pseudo_random_bytes = concatBytes3(...b4);\n return pseudo_random_bytes.slice(0, lenInBytes);\n }\n function expand_message_xof(msg, DST, lenInBytes, k4, H3) {\n abytes2(msg);\n abytes2(DST);\n anum(lenInBytes);\n if (DST.length > 255) {\n const dkLen = Math.ceil(2 * k4 / 8);\n DST = H3.create({ dkLen }).update(utf8ToBytes2(\"H2C-OVERSIZE-DST-\")).update(DST).digest();\n }\n if (lenInBytes > 65535 || DST.length > 255)\n throw new Error(\"expand_message_xof: invalid lenInBytes\");\n return H3.create({ dkLen: lenInBytes }).update(msg).update(i2osp(lenInBytes, 2)).update(DST).update(i2osp(DST.length, 1)).digest();\n }\n function hash_to_field(msg, count, options) {\n validateObject(options, {\n DST: \"stringOrUint8Array\",\n p: \"bigint\",\n m: \"isSafeInteger\",\n k: \"isSafeInteger\",\n hash: \"hash\"\n });\n const { p: p4, k: k4, m: m2, hash: hash3, expand, DST: _DST } = options;\n abytes2(msg);\n anum(count);\n const DST = typeof _DST === \"string\" ? utf8ToBytes2(_DST) : _DST;\n const log2p = p4.toString(2).length;\n const L2 = Math.ceil((log2p + k4) / 8);\n const len_in_bytes = count * m2 * L2;\n let prb;\n if (expand === \"xmd\") {\n prb = expand_message_xmd(msg, DST, len_in_bytes, hash3);\n } else if (expand === \"xof\") {\n prb = expand_message_xof(msg, DST, len_in_bytes, k4, hash3);\n } else if (expand === \"_internal_pass\") {\n prb = msg;\n } else {\n throw new Error('expand must be \"xmd\" or \"xof\"');\n }\n const u2 = new Array(count);\n for (let i3 = 0; i3 < count; i3++) {\n const e3 = new Array(m2);\n for (let j2 = 0; j2 < m2; j2++) {\n const elm_offset = L2 * (j2 + i3 * m2);\n const tv = prb.subarray(elm_offset, elm_offset + L2);\n e3[j2] = mod(os2ip(tv), p4);\n }\n u2[i3] = e3;\n }\n return u2;\n }\n function isogenyMap(field, map) {\n const coeff = map.map((i3) => Array.from(i3).reverse());\n return (x4, y6) => {\n const [xn, xd, yn, yd] = coeff.map((val) => val.reduce((acc, i3) => field.add(field.mul(acc, x4), i3)));\n const [xd_inv, yd_inv] = FpInvertBatch(field, [xd, yd], true);\n x4 = field.mul(xn, xd_inv);\n y6 = field.mul(y6, field.mul(yn, yd_inv));\n return { x: x4, y: y6 };\n };\n }\n function createHasher2(Point3, mapToCurve, defaults) {\n if (typeof mapToCurve !== \"function\")\n throw new Error(\"mapToCurve() must be defined\");\n function map(num2) {\n return Point3.fromAffine(mapToCurve(num2));\n }\n function clear(initial) {\n const P2 = initial.clearCofactor();\n if (P2.equals(Point3.ZERO))\n return Point3.ZERO;\n P2.assertValidity();\n return P2;\n }\n return {\n defaults,\n // Encodes byte string to elliptic curve.\n // hash_to_curve from https://www.rfc-editor.org/rfc/rfc9380#section-3\n hashToCurve(msg, options) {\n const u2 = hash_to_field(msg, 2, { ...defaults, DST: defaults.DST, ...options });\n const u0 = map(u2[0]);\n const u1 = map(u2[1]);\n return clear(u0.add(u1));\n },\n // Encodes byte string to elliptic curve.\n // encode_to_curve from https://www.rfc-editor.org/rfc/rfc9380#section-3\n encodeToCurve(msg, options) {\n const u2 = hash_to_field(msg, 1, { ...defaults, DST: defaults.encodeDST, ...options });\n return clear(map(u2[0]));\n },\n // Same as encodeToCurve, but without hash\n mapToCurve(scalars) {\n if (!Array.isArray(scalars))\n throw new Error(\"expected array of bigints\");\n for (const i3 of scalars)\n if (typeof i3 !== \"bigint\")\n throw new Error(\"expected array of bigints\");\n return clear(map(scalars));\n }\n };\n }\n var os2ip;\n var init_hash_to_curve = __esm({\n \"../../../node_modules/.pnpm/@noble+curves@1.9.1/node_modules/@noble/curves/esm/abstract/hash-to-curve.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_modular();\n init_utils5();\n os2ip = bytesToNumberBE;\n }\n });\n\n // ../../../node_modules/.pnpm/@noble+curves@1.9.1/node_modules/@noble/curves/esm/secp256k1.js\n var secp256k1_exports = {};\n __export(secp256k1_exports, {\n encodeToCurve: () => encodeToCurve,\n hashToCurve: () => hashToCurve,\n schnorr: () => schnorr,\n secp256k1: () => secp256k1,\n secp256k1_hasher: () => secp256k1_hasher\n });\n function sqrtMod(y6) {\n const P2 = secp256k1P;\n const _3n5 = BigInt(3), _6n = BigInt(6), _11n = BigInt(11), _22n = BigInt(22);\n const _23n = BigInt(23), _44n = BigInt(44), _88n = BigInt(88);\n const b22 = y6 * y6 * y6 % P2;\n const b32 = b22 * b22 * y6 % P2;\n const b6 = pow2(b32, _3n5, P2) * b32 % P2;\n const b9 = pow2(b6, _3n5, P2) * b32 % P2;\n const b11 = pow2(b9, _2n4, P2) * b22 % P2;\n const b222 = pow2(b11, _11n, P2) * b11 % P2;\n const b44 = pow2(b222, _22n, P2) * b222 % P2;\n const b88 = pow2(b44, _44n, P2) * b44 % P2;\n const b176 = pow2(b88, _88n, P2) * b88 % P2;\n const b220 = pow2(b176, _44n, P2) * b44 % P2;\n const b223 = pow2(b220, _3n5, P2) * b32 % P2;\n const t1 = pow2(b223, _23n, P2) * b222 % P2;\n const t22 = pow2(t1, _6n, P2) * b22 % P2;\n const root = pow2(t22, _2n4, P2);\n if (!Fpk1.eql(Fpk1.sqr(root), y6))\n throw new Error(\"Cannot find square root\");\n return root;\n }\n function taggedHash(tag, ...messages) {\n let tagP = TAGGED_HASH_PREFIXES[tag];\n if (tagP === void 0) {\n const tagH = sha256(Uint8Array.from(tag, (c4) => c4.charCodeAt(0)));\n tagP = concatBytes3(tagH, tagH);\n TAGGED_HASH_PREFIXES[tag] = tagP;\n }\n return sha256(concatBytes3(tagP, ...messages));\n }\n function schnorrGetExtPubKey(priv) {\n let d_ = secp256k1.utils.normPrivateKeyToScalar(priv);\n let p4 = Point.fromPrivateKey(d_);\n const scalar = p4.hasEvenY() ? d_ : modN(-d_);\n return { scalar, bytes: pointToBytes(p4) };\n }\n function lift_x(x4) {\n aInRange(\"x\", x4, _1n6, secp256k1P);\n const xx = modP(x4 * x4);\n const c4 = modP(xx * x4 + BigInt(7));\n let y6 = sqrtMod(c4);\n if (y6 % _2n4 !== _0n6)\n y6 = modP(-y6);\n const p4 = new Point(x4, y6, _1n6);\n p4.assertValidity();\n return p4;\n }\n function challenge(...args) {\n return modN(num(taggedHash(\"BIP0340/challenge\", ...args)));\n }\n function schnorrGetPublicKey(privateKey) {\n return schnorrGetExtPubKey(privateKey).bytes;\n }\n function schnorrSign(message, privateKey, auxRand = randomBytes(32)) {\n const m2 = ensureBytes(\"message\", message);\n const { bytes: px, scalar: d5 } = schnorrGetExtPubKey(privateKey);\n const a3 = ensureBytes(\"auxRand\", auxRand, 32);\n const t3 = numTo32b(d5 ^ num(taggedHash(\"BIP0340/aux\", a3)));\n const rand = taggedHash(\"BIP0340/nonce\", t3, px, m2);\n const k_ = modN(num(rand));\n if (k_ === _0n6)\n throw new Error(\"sign failed: k is zero\");\n const { bytes: rx, scalar: k4 } = schnorrGetExtPubKey(k_);\n const e3 = challenge(rx, px, m2);\n const sig = new Uint8Array(64);\n sig.set(rx, 0);\n sig.set(numTo32b(modN(k4 + e3 * d5)), 32);\n if (!schnorrVerify(sig, m2, px))\n throw new Error(\"sign: Invalid signature produced\");\n return sig;\n }\n function schnorrVerify(signature, message, publicKey) {\n const sig = ensureBytes(\"signature\", signature, 64);\n const m2 = ensureBytes(\"message\", message);\n const pub = ensureBytes(\"publicKey\", publicKey, 32);\n try {\n const P2 = lift_x(num(pub));\n const r2 = num(sig.subarray(0, 32));\n if (!inRange(r2, _1n6, secp256k1P))\n return false;\n const s4 = num(sig.subarray(32, 64));\n if (!inRange(s4, _1n6, secp256k1N))\n return false;\n const e3 = challenge(numTo32b(r2), pointToBytes(P2), m2);\n const R3 = GmulAdd(P2, s4, modN(-e3));\n if (!R3 || !R3.hasEvenY() || R3.toAffine().x !== r2)\n return false;\n return true;\n } catch (error) {\n return false;\n }\n }\n var secp256k1P, secp256k1N, _0n6, _1n6, _2n4, divNearest, Fpk1, secp256k1, TAGGED_HASH_PREFIXES, pointToBytes, numTo32b, modP, modN, Point, GmulAdd, num, schnorr, isoMap, mapSWU, secp256k1_hasher, hashToCurve, encodeToCurve;\n var init_secp256k1 = __esm({\n \"../../../node_modules/.pnpm/@noble+curves@1.9.1/node_modules/@noble/curves/esm/secp256k1.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_sha2();\n init_utils3();\n init_shortw_utils();\n init_hash_to_curve();\n init_modular();\n init_utils5();\n init_weierstrass();\n secp256k1P = BigInt(\"0xfffffffffffffffffffffffffffffffffffffffffffffffffffffffefffffc2f\");\n secp256k1N = BigInt(\"0xfffffffffffffffffffffffffffffffebaaedce6af48a03bbfd25e8cd0364141\");\n _0n6 = BigInt(0);\n _1n6 = BigInt(1);\n _2n4 = BigInt(2);\n divNearest = (a3, b4) => (a3 + b4 / _2n4) / b4;\n Fpk1 = Field(secp256k1P, void 0, void 0, { sqrt: sqrtMod });\n secp256k1 = createCurve({\n a: _0n6,\n b: BigInt(7),\n Fp: Fpk1,\n n: secp256k1N,\n Gx: BigInt(\"55066263022277343669578718895168534326250603453777594175500187360389116729240\"),\n Gy: BigInt(\"32670510020758816978083085130507043184471273380659243275938904335757337482424\"),\n h: BigInt(1),\n lowS: true,\n // Allow only low-S signatures by default in sign() and verify()\n endo: {\n // Endomorphism, see above\n beta: BigInt(\"0x7ae96a2b657c07106e64479eac3434e99cf0497512f58995c1396c28719501ee\"),\n splitScalar: (k4) => {\n const n2 = secp256k1N;\n const a1 = BigInt(\"0x3086d221a7d46bcde86c90e49284eb15\");\n const b1 = -_1n6 * BigInt(\"0xe4437ed6010e88286f547fa90abfe4c3\");\n const a22 = BigInt(\"0x114ca50f7a8e2f3f657c1108d9d44cfd8\");\n const b22 = a1;\n const POW_2_128 = BigInt(\"0x100000000000000000000000000000000\");\n const c1 = divNearest(b22 * k4, n2);\n const c22 = divNearest(-b1 * k4, n2);\n let k1 = mod(k4 - c1 * a1 - c22 * a22, n2);\n let k22 = mod(-c1 * b1 - c22 * b22, n2);\n const k1neg = k1 > POW_2_128;\n const k2neg = k22 > POW_2_128;\n if (k1neg)\n k1 = n2 - k1;\n if (k2neg)\n k22 = n2 - k22;\n if (k1 > POW_2_128 || k22 > POW_2_128) {\n throw new Error(\"splitScalar: Endomorphism failed, k=\" + k4);\n }\n return { k1neg, k1, k2neg, k2: k22 };\n }\n }\n }, sha256);\n TAGGED_HASH_PREFIXES = {};\n pointToBytes = (point) => point.toRawBytes(true).slice(1);\n numTo32b = (n2) => numberToBytesBE(n2, 32);\n modP = (x4) => mod(x4, secp256k1P);\n modN = (x4) => mod(x4, secp256k1N);\n Point = /* @__PURE__ */ (() => secp256k1.ProjectivePoint)();\n GmulAdd = (Q2, a3, b4) => Point.BASE.multiplyAndAddUnsafe(Q2, a3, b4);\n num = bytesToNumberBE;\n schnorr = /* @__PURE__ */ (() => ({\n getPublicKey: schnorrGetPublicKey,\n sign: schnorrSign,\n verify: schnorrVerify,\n utils: {\n randomPrivateKey: secp256k1.utils.randomPrivateKey,\n lift_x,\n pointToBytes,\n numberToBytesBE,\n bytesToNumberBE,\n taggedHash,\n mod\n }\n }))();\n isoMap = /* @__PURE__ */ (() => isogenyMap(Fpk1, [\n // xNum\n [\n \"0x8e38e38e38e38e38e38e38e38e38e38e38e38e38e38e38e38e38e38daaaaa8c7\",\n \"0x7d3d4c80bc321d5b9f315cea7fd44c5d595d2fc0bf63b92dfff1044f17c6581\",\n \"0x534c328d23f234e6e2a413deca25caece4506144037c40314ecbd0b53d9dd262\",\n \"0x8e38e38e38e38e38e38e38e38e38e38e38e38e38e38e38e38e38e38daaaaa88c\"\n ],\n // xDen\n [\n \"0xd35771193d94918a9ca34ccbb7b640dd86cd409542f8487d9fe6b745781eb49b\",\n \"0xedadc6f64383dc1df7c4b2d51b54225406d36b641f5e41bbc52a56612a8c6d14\",\n \"0x0000000000000000000000000000000000000000000000000000000000000001\"\n // LAST 1\n ],\n // yNum\n [\n \"0x4bda12f684bda12f684bda12f684bda12f684bda12f684bda12f684b8e38e23c\",\n \"0xc75e0c32d5cb7c0fa9d0a54b12a0a6d5647ab046d686da6fdffc90fc201d71a3\",\n \"0x29a6194691f91a73715209ef6512e576722830a201be2018a765e85a9ecee931\",\n \"0x2f684bda12f684bda12f684bda12f684bda12f684bda12f684bda12f38e38d84\"\n ],\n // yDen\n [\n \"0xfffffffffffffffffffffffffffffffffffffffffffffffffffffffefffff93b\",\n \"0x7a06534bb8bdb49fd5e9e6632722c2989467c1bfc8e8d978dfb425d2685c2573\",\n \"0x6484aa716545ca2cf3a70c3fa8fe337e0a3d21162f0d6299a7bf8192bfd2a76f\",\n \"0x0000000000000000000000000000000000000000000000000000000000000001\"\n // LAST 1\n ]\n ].map((i3) => i3.map((j2) => BigInt(j2)))))();\n mapSWU = /* @__PURE__ */ (() => mapToCurveSimpleSWU(Fpk1, {\n A: BigInt(\"0x3f8731abdd661adca08a5558f0f5d272e953d363cb6f0e5d405447c01a444533\"),\n B: BigInt(\"1771\"),\n Z: Fpk1.create(BigInt(\"-11\"))\n }))();\n secp256k1_hasher = /* @__PURE__ */ (() => createHasher2(secp256k1.ProjectivePoint, (scalars) => {\n const { x: x4, y: y6 } = mapSWU(Fpk1.create(scalars[0]));\n return isoMap(x4, y6);\n }, {\n DST: \"secp256k1_XMD:SHA-256_SSWU_RO_\",\n encodeDST: \"secp256k1_XMD:SHA-256_SSWU_NU_\",\n p: Fpk1.ORDER,\n m: 1,\n k: 128,\n expand: \"xmd\",\n hash: sha256\n }))();\n hashToCurve = /* @__PURE__ */ (() => secp256k1_hasher.hashToCurve)();\n encodeToCurve = /* @__PURE__ */ (() => secp256k1_hasher.encodeToCurve)();\n }\n });\n\n // ../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/utils/signature/recoverPublicKey.js\n async function recoverPublicKey({ hash: hash3, signature }) {\n const hashHex = isHex(hash3) ? hash3 : toHex(hash3);\n const { secp256k1: secp256k13 } = await Promise.resolve().then(() => (init_secp256k1(), secp256k1_exports));\n const signature_ = (() => {\n if (typeof signature === \"object\" && \"r\" in signature && \"s\" in signature) {\n const { r: r2, s: s4, v: v2, yParity } = signature;\n const yParityOrV2 = Number(yParity ?? v2);\n const recoveryBit2 = toRecoveryBit(yParityOrV2);\n return new secp256k13.Signature(hexToBigInt(r2), hexToBigInt(s4)).addRecoveryBit(recoveryBit2);\n }\n const signatureHex = isHex(signature) ? signature : toHex(signature);\n if (size(signatureHex) !== 65)\n throw new Error(\"invalid signature length\");\n const yParityOrV = hexToNumber(`0x${signatureHex.slice(130)}`);\n const recoveryBit = toRecoveryBit(yParityOrV);\n return secp256k13.Signature.fromCompact(signatureHex.substring(2, 130)).addRecoveryBit(recoveryBit);\n })();\n const publicKey = signature_.recoverPublicKey(hashHex.substring(2)).toHex(false);\n return `0x${publicKey}`;\n }\n function toRecoveryBit(yParityOrV) {\n if (yParityOrV === 0 || yParityOrV === 1)\n return yParityOrV;\n if (yParityOrV === 27)\n return 0;\n if (yParityOrV === 28)\n return 1;\n throw new Error(\"Invalid yParityOrV value\");\n }\n var init_recoverPublicKey = __esm({\n \"../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/utils/signature/recoverPublicKey.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_isHex();\n init_size();\n init_fromHex();\n init_toHex();\n }\n });\n\n // ../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/utils/signature/recoverAddress.js\n async function recoverAddress({ hash: hash3, signature }) {\n return publicKeyToAddress(await recoverPublicKey({ hash: hash3, signature }));\n }\n var init_recoverAddress = __esm({\n \"../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/utils/signature/recoverAddress.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_publicKeyToAddress();\n init_recoverPublicKey();\n }\n });\n\n // ../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/utils/encoding/toRlp.js\n function toRlp(bytes, to = \"hex\") {\n const encodable = getEncodable(bytes);\n const cursor = createCursor(new Uint8Array(encodable.length));\n encodable.encode(cursor);\n if (to === \"hex\")\n return bytesToHex(cursor.bytes);\n return cursor.bytes;\n }\n function getEncodable(bytes) {\n if (Array.isArray(bytes))\n return getEncodableList(bytes.map((x4) => getEncodable(x4)));\n return getEncodableBytes(bytes);\n }\n function getEncodableList(list) {\n const bodyLength = list.reduce((acc, x4) => acc + x4.length, 0);\n const sizeOfBodyLength = getSizeOfLength(bodyLength);\n const length2 = (() => {\n if (bodyLength <= 55)\n return 1 + bodyLength;\n return 1 + sizeOfBodyLength + bodyLength;\n })();\n return {\n length: length2,\n encode(cursor) {\n if (bodyLength <= 55) {\n cursor.pushByte(192 + bodyLength);\n } else {\n cursor.pushByte(192 + 55 + sizeOfBodyLength);\n if (sizeOfBodyLength === 1)\n cursor.pushUint8(bodyLength);\n else if (sizeOfBodyLength === 2)\n cursor.pushUint16(bodyLength);\n else if (sizeOfBodyLength === 3)\n cursor.pushUint24(bodyLength);\n else\n cursor.pushUint32(bodyLength);\n }\n for (const { encode: encode6 } of list) {\n encode6(cursor);\n }\n }\n };\n }\n function getEncodableBytes(bytesOrHex) {\n const bytes = typeof bytesOrHex === \"string\" ? hexToBytes(bytesOrHex) : bytesOrHex;\n const sizeOfBytesLength = getSizeOfLength(bytes.length);\n const length2 = (() => {\n if (bytes.length === 1 && bytes[0] < 128)\n return 1;\n if (bytes.length <= 55)\n return 1 + bytes.length;\n return 1 + sizeOfBytesLength + bytes.length;\n })();\n return {\n length: length2,\n encode(cursor) {\n if (bytes.length === 1 && bytes[0] < 128) {\n cursor.pushBytes(bytes);\n } else if (bytes.length <= 55) {\n cursor.pushByte(128 + bytes.length);\n cursor.pushBytes(bytes);\n } else {\n cursor.pushByte(128 + 55 + sizeOfBytesLength);\n if (sizeOfBytesLength === 1)\n cursor.pushUint8(bytes.length);\n else if (sizeOfBytesLength === 2)\n cursor.pushUint16(bytes.length);\n else if (sizeOfBytesLength === 3)\n cursor.pushUint24(bytes.length);\n else\n cursor.pushUint32(bytes.length);\n cursor.pushBytes(bytes);\n }\n }\n };\n }\n function getSizeOfLength(length2) {\n if (length2 < 2 ** 8)\n return 1;\n if (length2 < 2 ** 16)\n return 2;\n if (length2 < 2 ** 24)\n return 3;\n if (length2 < 2 ** 32)\n return 4;\n throw new BaseError2(\"Length is too large.\");\n }\n var init_toRlp = __esm({\n \"../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/utils/encoding/toRlp.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_base();\n init_cursor2();\n init_toBytes();\n init_toHex();\n }\n });\n\n // ../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/utils/authorization/hashAuthorization.js\n function hashAuthorization(parameters) {\n const { chainId, nonce, to } = parameters;\n const address = parameters.contractAddress ?? parameters.address;\n const hash3 = keccak256(concatHex([\n \"0x05\",\n toRlp([\n chainId ? numberToHex(chainId) : \"0x\",\n address,\n nonce ? numberToHex(nonce) : \"0x\"\n ])\n ]));\n if (to === \"bytes\")\n return hexToBytes(hash3);\n return hash3;\n }\n var init_hashAuthorization = __esm({\n \"../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/utils/authorization/hashAuthorization.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_concat();\n init_toBytes();\n init_toHex();\n init_toRlp();\n init_keccak256();\n }\n });\n\n // ../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/utils/authorization/recoverAuthorizationAddress.js\n async function recoverAuthorizationAddress(parameters) {\n const { authorization, signature } = parameters;\n return recoverAddress({\n hash: hashAuthorization(authorization),\n signature: signature ?? authorization\n });\n }\n var init_recoverAuthorizationAddress = __esm({\n \"../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/utils/authorization/recoverAuthorizationAddress.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_recoverAddress();\n init_hashAuthorization();\n }\n });\n\n // ../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/errors/estimateGas.js\n var EstimateGasExecutionError;\n var init_estimateGas = __esm({\n \"../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/errors/estimateGas.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_formatEther();\n init_formatGwei();\n init_base();\n init_transaction();\n EstimateGasExecutionError = class extends BaseError2 {\n constructor(cause, { account, docsPath: docsPath8, chain: chain2, data, gas, gasPrice, maxFeePerGas, maxPriorityFeePerGas, nonce, to, value }) {\n const prettyArgs = prettyPrint({\n from: account?.address,\n to,\n value: typeof value !== \"undefined\" && `${formatEther(value)} ${chain2?.nativeCurrency?.symbol || \"ETH\"}`,\n data,\n gas,\n gasPrice: typeof gasPrice !== \"undefined\" && `${formatGwei(gasPrice)} gwei`,\n maxFeePerGas: typeof maxFeePerGas !== \"undefined\" && `${formatGwei(maxFeePerGas)} gwei`,\n maxPriorityFeePerGas: typeof maxPriorityFeePerGas !== \"undefined\" && `${formatGwei(maxPriorityFeePerGas)} gwei`,\n nonce\n });\n super(cause.shortMessage, {\n cause,\n docsPath: docsPath8,\n metaMessages: [\n ...cause.metaMessages ? [...cause.metaMessages, \" \"] : [],\n \"Estimate Gas Arguments:\",\n prettyArgs\n ].filter(Boolean),\n name: \"EstimateGasExecutionError\"\n });\n Object.defineProperty(this, \"cause\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: void 0\n });\n this.cause = cause;\n }\n };\n }\n });\n\n // ../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/errors/node.js\n var ExecutionRevertedError, FeeCapTooHighError, FeeCapTooLowError, NonceTooHighError, NonceTooLowError, NonceMaxValueError, InsufficientFundsError, IntrinsicGasTooHighError, IntrinsicGasTooLowError, TransactionTypeNotSupportedError, TipAboveFeeCapError, UnknownNodeError;\n var init_node = __esm({\n \"../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/errors/node.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_formatGwei();\n init_base();\n ExecutionRevertedError = class extends BaseError2 {\n constructor({ cause, message } = {}) {\n const reason = message?.replace(\"execution reverted: \", \"\")?.replace(\"execution reverted\", \"\");\n super(`Execution reverted ${reason ? `with reason: ${reason}` : \"for an unknown reason\"}.`, {\n cause,\n name: \"ExecutionRevertedError\"\n });\n }\n };\n Object.defineProperty(ExecutionRevertedError, \"code\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: 3\n });\n Object.defineProperty(ExecutionRevertedError, \"nodeMessage\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: /execution reverted/\n });\n FeeCapTooHighError = class extends BaseError2 {\n constructor({ cause, maxFeePerGas } = {}) {\n super(`The fee cap (\\`maxFeePerGas\\`${maxFeePerGas ? ` = ${formatGwei(maxFeePerGas)} gwei` : \"\"}) cannot be higher than the maximum allowed value (2^256-1).`, {\n cause,\n name: \"FeeCapTooHighError\"\n });\n }\n };\n Object.defineProperty(FeeCapTooHighError, \"nodeMessage\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: /max fee per gas higher than 2\\^256-1|fee cap higher than 2\\^256-1/\n });\n FeeCapTooLowError = class extends BaseError2 {\n constructor({ cause, maxFeePerGas } = {}) {\n super(`The fee cap (\\`maxFeePerGas\\`${maxFeePerGas ? ` = ${formatGwei(maxFeePerGas)}` : \"\"} gwei) cannot be lower than the block base fee.`, {\n cause,\n name: \"FeeCapTooLowError\"\n });\n }\n };\n Object.defineProperty(FeeCapTooLowError, \"nodeMessage\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: /max fee per gas less than block base fee|fee cap less than block base fee|transaction is outdated/\n });\n NonceTooHighError = class extends BaseError2 {\n constructor({ cause, nonce } = {}) {\n super(`Nonce provided for the transaction ${nonce ? `(${nonce}) ` : \"\"}is higher than the next one expected.`, { cause, name: \"NonceTooHighError\" });\n }\n };\n Object.defineProperty(NonceTooHighError, \"nodeMessage\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: /nonce too high/\n });\n NonceTooLowError = class extends BaseError2 {\n constructor({ cause, nonce } = {}) {\n super([\n `Nonce provided for the transaction ${nonce ? `(${nonce}) ` : \"\"}is lower than the current nonce of the account.`,\n \"Try increasing the nonce or find the latest nonce with `getTransactionCount`.\"\n ].join(\"\\n\"), { cause, name: \"NonceTooLowError\" });\n }\n };\n Object.defineProperty(NonceTooLowError, \"nodeMessage\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: /nonce too low|transaction already imported|already known/\n });\n NonceMaxValueError = class extends BaseError2 {\n constructor({ cause, nonce } = {}) {\n super(`Nonce provided for the transaction ${nonce ? `(${nonce}) ` : \"\"}exceeds the maximum allowed nonce.`, { cause, name: \"NonceMaxValueError\" });\n }\n };\n Object.defineProperty(NonceMaxValueError, \"nodeMessage\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: /nonce has max value/\n });\n InsufficientFundsError = class extends BaseError2 {\n constructor({ cause } = {}) {\n super([\n \"The total cost (gas * gas fee + value) of executing this transaction exceeds the balance of the account.\"\n ].join(\"\\n\"), {\n cause,\n metaMessages: [\n \"This error could arise when the account does not have enough funds to:\",\n \" - pay for the total gas fee,\",\n \" - pay for the value to send.\",\n \" \",\n \"The cost of the transaction is calculated as `gas * gas fee + value`, where:\",\n \" - `gas` is the amount of gas needed for transaction to execute,\",\n \" - `gas fee` is the gas fee,\",\n \" - `value` is the amount of ether to send to the recipient.\"\n ],\n name: \"InsufficientFundsError\"\n });\n }\n };\n Object.defineProperty(InsufficientFundsError, \"nodeMessage\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: /insufficient funds|exceeds transaction sender account balance/\n });\n IntrinsicGasTooHighError = class extends BaseError2 {\n constructor({ cause, gas } = {}) {\n super(`The amount of gas ${gas ? `(${gas}) ` : \"\"}provided for the transaction exceeds the limit allowed for the block.`, {\n cause,\n name: \"IntrinsicGasTooHighError\"\n });\n }\n };\n Object.defineProperty(IntrinsicGasTooHighError, \"nodeMessage\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: /intrinsic gas too high|gas limit reached/\n });\n IntrinsicGasTooLowError = class extends BaseError2 {\n constructor({ cause, gas } = {}) {\n super(`The amount of gas ${gas ? `(${gas}) ` : \"\"}provided for the transaction is too low.`, {\n cause,\n name: \"IntrinsicGasTooLowError\"\n });\n }\n };\n Object.defineProperty(IntrinsicGasTooLowError, \"nodeMessage\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: /intrinsic gas too low/\n });\n TransactionTypeNotSupportedError = class extends BaseError2 {\n constructor({ cause }) {\n super(\"The transaction type is not supported for this chain.\", {\n cause,\n name: \"TransactionTypeNotSupportedError\"\n });\n }\n };\n Object.defineProperty(TransactionTypeNotSupportedError, \"nodeMessage\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: /transaction type not valid/\n });\n TipAboveFeeCapError = class extends BaseError2 {\n constructor({ cause, maxPriorityFeePerGas, maxFeePerGas } = {}) {\n super([\n `The provided tip (\\`maxPriorityFeePerGas\\`${maxPriorityFeePerGas ? ` = ${formatGwei(maxPriorityFeePerGas)} gwei` : \"\"}) cannot be higher than the fee cap (\\`maxFeePerGas\\`${maxFeePerGas ? ` = ${formatGwei(maxFeePerGas)} gwei` : \"\"}).`\n ].join(\"\\n\"), {\n cause,\n name: \"TipAboveFeeCapError\"\n });\n }\n };\n Object.defineProperty(TipAboveFeeCapError, \"nodeMessage\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: /max priority fee per gas higher than max fee per gas|tip higher than fee cap/\n });\n UnknownNodeError = class extends BaseError2 {\n constructor({ cause }) {\n super(`An error occurred while executing: ${cause?.shortMessage}`, {\n cause,\n name: \"UnknownNodeError\"\n });\n }\n };\n }\n });\n\n // ../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/utils/errors/getNodeError.js\n function getNodeError(err, args) {\n const message = (err.details || \"\").toLowerCase();\n const executionRevertedError = err instanceof BaseError2 ? err.walk((e3) => e3?.code === ExecutionRevertedError.code) : err;\n if (executionRevertedError instanceof BaseError2)\n return new ExecutionRevertedError({\n cause: err,\n message: executionRevertedError.details\n });\n if (ExecutionRevertedError.nodeMessage.test(message))\n return new ExecutionRevertedError({\n cause: err,\n message: err.details\n });\n if (FeeCapTooHighError.nodeMessage.test(message))\n return new FeeCapTooHighError({\n cause: err,\n maxFeePerGas: args?.maxFeePerGas\n });\n if (FeeCapTooLowError.nodeMessage.test(message))\n return new FeeCapTooLowError({\n cause: err,\n maxFeePerGas: args?.maxFeePerGas\n });\n if (NonceTooHighError.nodeMessage.test(message))\n return new NonceTooHighError({ cause: err, nonce: args?.nonce });\n if (NonceTooLowError.nodeMessage.test(message))\n return new NonceTooLowError({ cause: err, nonce: args?.nonce });\n if (NonceMaxValueError.nodeMessage.test(message))\n return new NonceMaxValueError({ cause: err, nonce: args?.nonce });\n if (InsufficientFundsError.nodeMessage.test(message))\n return new InsufficientFundsError({ cause: err });\n if (IntrinsicGasTooHighError.nodeMessage.test(message))\n return new IntrinsicGasTooHighError({ cause: err, gas: args?.gas });\n if (IntrinsicGasTooLowError.nodeMessage.test(message))\n return new IntrinsicGasTooLowError({ cause: err, gas: args?.gas });\n if (TransactionTypeNotSupportedError.nodeMessage.test(message))\n return new TransactionTypeNotSupportedError({ cause: err });\n if (TipAboveFeeCapError.nodeMessage.test(message))\n return new TipAboveFeeCapError({\n cause: err,\n maxFeePerGas: args?.maxFeePerGas,\n maxPriorityFeePerGas: args?.maxPriorityFeePerGas\n });\n return new UnknownNodeError({\n cause: err\n });\n }\n var init_getNodeError = __esm({\n \"../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/utils/errors/getNodeError.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_base();\n init_node();\n }\n });\n\n // ../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/utils/errors/getEstimateGasError.js\n function getEstimateGasError(err, { docsPath: docsPath8, ...args }) {\n const cause = (() => {\n const cause2 = getNodeError(err, args);\n if (cause2 instanceof UnknownNodeError)\n return err;\n return cause2;\n })();\n return new EstimateGasExecutionError(cause, {\n docsPath: docsPath8,\n ...args\n });\n }\n var init_getEstimateGasError = __esm({\n \"../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/utils/errors/getEstimateGasError.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_estimateGas();\n init_node();\n init_getNodeError();\n }\n });\n\n // ../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/utils/formatters/extract.js\n function extract(value_, { format }) {\n if (!format)\n return {};\n const value = {};\n function extract_(formatted2) {\n const keys = Object.keys(formatted2);\n for (const key of keys) {\n if (key in value_)\n value[key] = value_[key];\n if (formatted2[key] && typeof formatted2[key] === \"object\" && !Array.isArray(formatted2[key]))\n extract_(formatted2[key]);\n }\n }\n const formatted = format(value_ || {});\n extract_(formatted);\n return value;\n }\n var init_extract = __esm({\n \"../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/utils/formatters/extract.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n }\n });\n\n // ../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/utils/formatters/formatter.js\n function defineFormatter(type, format) {\n return ({ exclude, format: overrides }) => {\n return {\n exclude,\n format: (args, action) => {\n const formatted = format(args, action);\n if (exclude) {\n for (const key of exclude) {\n delete formatted[key];\n }\n }\n return {\n ...formatted,\n ...overrides(args, action)\n };\n },\n type\n };\n };\n }\n var init_formatter = __esm({\n \"../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/utils/formatters/formatter.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n }\n });\n\n // ../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/utils/formatters/transactionRequest.js\n function formatTransactionRequest(request, _2) {\n const rpcRequest = {};\n if (typeof request.authorizationList !== \"undefined\")\n rpcRequest.authorizationList = formatAuthorizationList(request.authorizationList);\n if (typeof request.accessList !== \"undefined\")\n rpcRequest.accessList = request.accessList;\n if (typeof request.blobVersionedHashes !== \"undefined\")\n rpcRequest.blobVersionedHashes = request.blobVersionedHashes;\n if (typeof request.blobs !== \"undefined\") {\n if (typeof request.blobs[0] !== \"string\")\n rpcRequest.blobs = request.blobs.map((x4) => bytesToHex(x4));\n else\n rpcRequest.blobs = request.blobs;\n }\n if (typeof request.data !== \"undefined\")\n rpcRequest.data = request.data;\n if (request.account)\n rpcRequest.from = request.account.address;\n if (typeof request.from !== \"undefined\")\n rpcRequest.from = request.from;\n if (typeof request.gas !== \"undefined\")\n rpcRequest.gas = numberToHex(request.gas);\n if (typeof request.gasPrice !== \"undefined\")\n rpcRequest.gasPrice = numberToHex(request.gasPrice);\n if (typeof request.maxFeePerBlobGas !== \"undefined\")\n rpcRequest.maxFeePerBlobGas = numberToHex(request.maxFeePerBlobGas);\n if (typeof request.maxFeePerGas !== \"undefined\")\n rpcRequest.maxFeePerGas = numberToHex(request.maxFeePerGas);\n if (typeof request.maxPriorityFeePerGas !== \"undefined\")\n rpcRequest.maxPriorityFeePerGas = numberToHex(request.maxPriorityFeePerGas);\n if (typeof request.nonce !== \"undefined\")\n rpcRequest.nonce = numberToHex(request.nonce);\n if (typeof request.to !== \"undefined\")\n rpcRequest.to = request.to;\n if (typeof request.type !== \"undefined\")\n rpcRequest.type = rpcTransactionType[request.type];\n if (typeof request.value !== \"undefined\")\n rpcRequest.value = numberToHex(request.value);\n return rpcRequest;\n }\n function formatAuthorizationList(authorizationList) {\n return authorizationList.map((authorization) => ({\n address: authorization.address,\n r: authorization.r ? numberToHex(BigInt(authorization.r)) : authorization.r,\n s: authorization.s ? numberToHex(BigInt(authorization.s)) : authorization.s,\n chainId: numberToHex(authorization.chainId),\n nonce: numberToHex(authorization.nonce),\n ...typeof authorization.yParity !== \"undefined\" ? { yParity: numberToHex(authorization.yParity) } : {},\n ...typeof authorization.v !== \"undefined\" && typeof authorization.yParity === \"undefined\" ? { v: numberToHex(authorization.v) } : {}\n }));\n }\n var rpcTransactionType;\n var init_transactionRequest = __esm({\n \"../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/utils/formatters/transactionRequest.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_toHex();\n rpcTransactionType = {\n legacy: \"0x0\",\n eip2930: \"0x1\",\n eip1559: \"0x2\",\n eip4844: \"0x3\",\n eip7702: \"0x4\"\n };\n }\n });\n\n // ../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/utils/stateOverride.js\n function serializeStateMapping(stateMapping) {\n if (!stateMapping || stateMapping.length === 0)\n return void 0;\n return stateMapping.reduce((acc, { slot, value }) => {\n if (slot.length !== 66)\n throw new InvalidBytesLengthError({\n size: slot.length,\n targetSize: 66,\n type: \"hex\"\n });\n if (value.length !== 66)\n throw new InvalidBytesLengthError({\n size: value.length,\n targetSize: 66,\n type: \"hex\"\n });\n acc[slot] = value;\n return acc;\n }, {});\n }\n function serializeAccountStateOverride(parameters) {\n const { balance, nonce, state, stateDiff, code } = parameters;\n const rpcAccountStateOverride = {};\n if (code !== void 0)\n rpcAccountStateOverride.code = code;\n if (balance !== void 0)\n rpcAccountStateOverride.balance = numberToHex(balance);\n if (nonce !== void 0)\n rpcAccountStateOverride.nonce = numberToHex(nonce);\n if (state !== void 0)\n rpcAccountStateOverride.state = serializeStateMapping(state);\n if (stateDiff !== void 0) {\n if (rpcAccountStateOverride.state)\n throw new StateAssignmentConflictError();\n rpcAccountStateOverride.stateDiff = serializeStateMapping(stateDiff);\n }\n return rpcAccountStateOverride;\n }\n function serializeStateOverride(parameters) {\n if (!parameters)\n return void 0;\n const rpcStateOverride = {};\n for (const { address, ...accountState } of parameters) {\n if (!isAddress(address, { strict: false }))\n throw new InvalidAddressError({ address });\n if (rpcStateOverride[address])\n throw new AccountStateConflictError({ address });\n rpcStateOverride[address] = serializeAccountStateOverride(accountState);\n }\n return rpcStateOverride;\n }\n var init_stateOverride2 = __esm({\n \"../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/utils/stateOverride.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_address();\n init_data();\n init_stateOverride();\n init_isAddress();\n init_toHex();\n }\n });\n\n // ../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/constants/number.js\n var maxInt8, maxInt16, maxInt24, maxInt32, maxInt40, maxInt48, maxInt56, maxInt64, maxInt72, maxInt80, maxInt88, maxInt96, maxInt104, maxInt112, maxInt120, maxInt128, maxInt136, maxInt144, maxInt152, maxInt160, maxInt168, maxInt176, maxInt184, maxInt192, maxInt200, maxInt208, maxInt216, maxInt224, maxInt232, maxInt240, maxInt248, maxInt256, minInt8, minInt16, minInt24, minInt32, minInt40, minInt48, minInt56, minInt64, minInt72, minInt80, minInt88, minInt96, minInt104, minInt112, minInt120, minInt128, minInt136, minInt144, minInt152, minInt160, minInt168, minInt176, minInt184, minInt192, minInt200, minInt208, minInt216, minInt224, minInt232, minInt240, minInt248, minInt256, maxUint8, maxUint16, maxUint24, maxUint32, maxUint40, maxUint48, maxUint56, maxUint64, maxUint72, maxUint80, maxUint88, maxUint96, maxUint104, maxUint112, maxUint120, maxUint128, maxUint136, maxUint144, maxUint152, maxUint160, maxUint168, maxUint176, maxUint184, maxUint192, maxUint200, maxUint208, maxUint216, maxUint224, maxUint232, maxUint240, maxUint248, maxUint256;\n var init_number = __esm({\n \"../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/constants/number.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n maxInt8 = 2n ** (8n - 1n) - 1n;\n maxInt16 = 2n ** (16n - 1n) - 1n;\n maxInt24 = 2n ** (24n - 1n) - 1n;\n maxInt32 = 2n ** (32n - 1n) - 1n;\n maxInt40 = 2n ** (40n - 1n) - 1n;\n maxInt48 = 2n ** (48n - 1n) - 1n;\n maxInt56 = 2n ** (56n - 1n) - 1n;\n maxInt64 = 2n ** (64n - 1n) - 1n;\n maxInt72 = 2n ** (72n - 1n) - 1n;\n maxInt80 = 2n ** (80n - 1n) - 1n;\n maxInt88 = 2n ** (88n - 1n) - 1n;\n maxInt96 = 2n ** (96n - 1n) - 1n;\n maxInt104 = 2n ** (104n - 1n) - 1n;\n maxInt112 = 2n ** (112n - 1n) - 1n;\n maxInt120 = 2n ** (120n - 1n) - 1n;\n maxInt128 = 2n ** (128n - 1n) - 1n;\n maxInt136 = 2n ** (136n - 1n) - 1n;\n maxInt144 = 2n ** (144n - 1n) - 1n;\n maxInt152 = 2n ** (152n - 1n) - 1n;\n maxInt160 = 2n ** (160n - 1n) - 1n;\n maxInt168 = 2n ** (168n - 1n) - 1n;\n maxInt176 = 2n ** (176n - 1n) - 1n;\n maxInt184 = 2n ** (184n - 1n) - 1n;\n maxInt192 = 2n ** (192n - 1n) - 1n;\n maxInt200 = 2n ** (200n - 1n) - 1n;\n maxInt208 = 2n ** (208n - 1n) - 1n;\n maxInt216 = 2n ** (216n - 1n) - 1n;\n maxInt224 = 2n ** (224n - 1n) - 1n;\n maxInt232 = 2n ** (232n - 1n) - 1n;\n maxInt240 = 2n ** (240n - 1n) - 1n;\n maxInt248 = 2n ** (248n - 1n) - 1n;\n maxInt256 = 2n ** (256n - 1n) - 1n;\n minInt8 = -(2n ** (8n - 1n));\n minInt16 = -(2n ** (16n - 1n));\n minInt24 = -(2n ** (24n - 1n));\n minInt32 = -(2n ** (32n - 1n));\n minInt40 = -(2n ** (40n - 1n));\n minInt48 = -(2n ** (48n - 1n));\n minInt56 = -(2n ** (56n - 1n));\n minInt64 = -(2n ** (64n - 1n));\n minInt72 = -(2n ** (72n - 1n));\n minInt80 = -(2n ** (80n - 1n));\n minInt88 = -(2n ** (88n - 1n));\n minInt96 = -(2n ** (96n - 1n));\n minInt104 = -(2n ** (104n - 1n));\n minInt112 = -(2n ** (112n - 1n));\n minInt120 = -(2n ** (120n - 1n));\n minInt128 = -(2n ** (128n - 1n));\n minInt136 = -(2n ** (136n - 1n));\n minInt144 = -(2n ** (144n - 1n));\n minInt152 = -(2n ** (152n - 1n));\n minInt160 = -(2n ** (160n - 1n));\n minInt168 = -(2n ** (168n - 1n));\n minInt176 = -(2n ** (176n - 1n));\n minInt184 = -(2n ** (184n - 1n));\n minInt192 = -(2n ** (192n - 1n));\n minInt200 = -(2n ** (200n - 1n));\n minInt208 = -(2n ** (208n - 1n));\n minInt216 = -(2n ** (216n - 1n));\n minInt224 = -(2n ** (224n - 1n));\n minInt232 = -(2n ** (232n - 1n));\n minInt240 = -(2n ** (240n - 1n));\n minInt248 = -(2n ** (248n - 1n));\n minInt256 = -(2n ** (256n - 1n));\n maxUint8 = 2n ** 8n - 1n;\n maxUint16 = 2n ** 16n - 1n;\n maxUint24 = 2n ** 24n - 1n;\n maxUint32 = 2n ** 32n - 1n;\n maxUint40 = 2n ** 40n - 1n;\n maxUint48 = 2n ** 48n - 1n;\n maxUint56 = 2n ** 56n - 1n;\n maxUint64 = 2n ** 64n - 1n;\n maxUint72 = 2n ** 72n - 1n;\n maxUint80 = 2n ** 80n - 1n;\n maxUint88 = 2n ** 88n - 1n;\n maxUint96 = 2n ** 96n - 1n;\n maxUint104 = 2n ** 104n - 1n;\n maxUint112 = 2n ** 112n - 1n;\n maxUint120 = 2n ** 120n - 1n;\n maxUint128 = 2n ** 128n - 1n;\n maxUint136 = 2n ** 136n - 1n;\n maxUint144 = 2n ** 144n - 1n;\n maxUint152 = 2n ** 152n - 1n;\n maxUint160 = 2n ** 160n - 1n;\n maxUint168 = 2n ** 168n - 1n;\n maxUint176 = 2n ** 176n - 1n;\n maxUint184 = 2n ** 184n - 1n;\n maxUint192 = 2n ** 192n - 1n;\n maxUint200 = 2n ** 200n - 1n;\n maxUint208 = 2n ** 208n - 1n;\n maxUint216 = 2n ** 216n - 1n;\n maxUint224 = 2n ** 224n - 1n;\n maxUint232 = 2n ** 232n - 1n;\n maxUint240 = 2n ** 240n - 1n;\n maxUint248 = 2n ** 248n - 1n;\n maxUint256 = 2n ** 256n - 1n;\n }\n });\n\n // ../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/utils/transaction/assertRequest.js\n function assertRequest(args) {\n const { account: account_, gasPrice, maxFeePerGas, maxPriorityFeePerGas, to } = args;\n const account = account_ ? parseAccount(account_) : void 0;\n if (account && !isAddress(account.address))\n throw new InvalidAddressError({ address: account.address });\n if (to && !isAddress(to))\n throw new InvalidAddressError({ address: to });\n if (typeof gasPrice !== \"undefined\" && (typeof maxFeePerGas !== \"undefined\" || typeof maxPriorityFeePerGas !== \"undefined\"))\n throw new FeeConflictError();\n if (maxFeePerGas && maxFeePerGas > maxUint256)\n throw new FeeCapTooHighError({ maxFeePerGas });\n if (maxPriorityFeePerGas && maxFeePerGas && maxPriorityFeePerGas > maxFeePerGas)\n throw new TipAboveFeeCapError({ maxFeePerGas, maxPriorityFeePerGas });\n }\n var init_assertRequest = __esm({\n \"../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/utils/transaction/assertRequest.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_parseAccount();\n init_number();\n init_address();\n init_node();\n init_transaction();\n init_isAddress();\n }\n });\n\n // ../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/errors/fee.js\n var BaseFeeScalarError, Eip1559FeesNotSupportedError, MaxFeePerGasTooLowError;\n var init_fee = __esm({\n \"../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/errors/fee.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_formatGwei();\n init_base();\n BaseFeeScalarError = class extends BaseError2 {\n constructor() {\n super(\"`baseFeeMultiplier` must be greater than 1.\", {\n name: \"BaseFeeScalarError\"\n });\n }\n };\n Eip1559FeesNotSupportedError = class extends BaseError2 {\n constructor() {\n super(\"Chain does not support EIP-1559 fees.\", {\n name: \"Eip1559FeesNotSupportedError\"\n });\n }\n };\n MaxFeePerGasTooLowError = class extends BaseError2 {\n constructor({ maxPriorityFeePerGas }) {\n super(`\\`maxFeePerGas\\` cannot be less than the \\`maxPriorityFeePerGas\\` (${formatGwei(maxPriorityFeePerGas)} gwei).`, { name: \"MaxFeePerGasTooLowError\" });\n }\n };\n }\n });\n\n // ../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/errors/block.js\n var BlockNotFoundError;\n var init_block = __esm({\n \"../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/errors/block.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_base();\n BlockNotFoundError = class extends BaseError2 {\n constructor({ blockHash, blockNumber }) {\n let identifier = \"Block\";\n if (blockHash)\n identifier = `Block at hash \"${blockHash}\"`;\n if (blockNumber)\n identifier = `Block at number \"${blockNumber}\"`;\n super(`${identifier} could not be found.`, { name: \"BlockNotFoundError\" });\n }\n };\n }\n });\n\n // ../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/utils/formatters/transaction.js\n function formatTransaction(transaction, _2) {\n const transaction_ = {\n ...transaction,\n blockHash: transaction.blockHash ? transaction.blockHash : null,\n blockNumber: transaction.blockNumber ? BigInt(transaction.blockNumber) : null,\n chainId: transaction.chainId ? hexToNumber(transaction.chainId) : void 0,\n gas: transaction.gas ? BigInt(transaction.gas) : void 0,\n gasPrice: transaction.gasPrice ? BigInt(transaction.gasPrice) : void 0,\n maxFeePerBlobGas: transaction.maxFeePerBlobGas ? BigInt(transaction.maxFeePerBlobGas) : void 0,\n maxFeePerGas: transaction.maxFeePerGas ? BigInt(transaction.maxFeePerGas) : void 0,\n maxPriorityFeePerGas: transaction.maxPriorityFeePerGas ? BigInt(transaction.maxPriorityFeePerGas) : void 0,\n nonce: transaction.nonce ? hexToNumber(transaction.nonce) : void 0,\n to: transaction.to ? transaction.to : null,\n transactionIndex: transaction.transactionIndex ? Number(transaction.transactionIndex) : null,\n type: transaction.type ? transactionType[transaction.type] : void 0,\n typeHex: transaction.type ? transaction.type : void 0,\n value: transaction.value ? BigInt(transaction.value) : void 0,\n v: transaction.v ? BigInt(transaction.v) : void 0\n };\n if (transaction.authorizationList)\n transaction_.authorizationList = formatAuthorizationList2(transaction.authorizationList);\n transaction_.yParity = (() => {\n if (transaction.yParity)\n return Number(transaction.yParity);\n if (typeof transaction_.v === \"bigint\") {\n if (transaction_.v === 0n || transaction_.v === 27n)\n return 0;\n if (transaction_.v === 1n || transaction_.v === 28n)\n return 1;\n if (transaction_.v >= 35n)\n return transaction_.v % 2n === 0n ? 1 : 0;\n }\n return void 0;\n })();\n if (transaction_.type === \"legacy\") {\n delete transaction_.accessList;\n delete transaction_.maxFeePerBlobGas;\n delete transaction_.maxFeePerGas;\n delete transaction_.maxPriorityFeePerGas;\n delete transaction_.yParity;\n }\n if (transaction_.type === \"eip2930\") {\n delete transaction_.maxFeePerBlobGas;\n delete transaction_.maxFeePerGas;\n delete transaction_.maxPriorityFeePerGas;\n }\n if (transaction_.type === \"eip1559\") {\n delete transaction_.maxFeePerBlobGas;\n }\n return transaction_;\n }\n function formatAuthorizationList2(authorizationList) {\n return authorizationList.map((authorization) => ({\n address: authorization.address,\n chainId: Number(authorization.chainId),\n nonce: Number(authorization.nonce),\n r: authorization.r,\n s: authorization.s,\n yParity: Number(authorization.yParity)\n }));\n }\n var transactionType, defineTransaction;\n var init_transaction2 = __esm({\n \"../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/utils/formatters/transaction.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_fromHex();\n init_formatter();\n transactionType = {\n \"0x0\": \"legacy\",\n \"0x1\": \"eip2930\",\n \"0x2\": \"eip1559\",\n \"0x3\": \"eip4844\",\n \"0x4\": \"eip7702\"\n };\n defineTransaction = /* @__PURE__ */ defineFormatter(\"transaction\", formatTransaction);\n }\n });\n\n // ../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/utils/formatters/block.js\n function formatBlock(block, _2) {\n const transactions = (block.transactions ?? []).map((transaction) => {\n if (typeof transaction === \"string\")\n return transaction;\n return formatTransaction(transaction);\n });\n return {\n ...block,\n baseFeePerGas: block.baseFeePerGas ? BigInt(block.baseFeePerGas) : null,\n blobGasUsed: block.blobGasUsed ? BigInt(block.blobGasUsed) : void 0,\n difficulty: block.difficulty ? BigInt(block.difficulty) : void 0,\n excessBlobGas: block.excessBlobGas ? BigInt(block.excessBlobGas) : void 0,\n gasLimit: block.gasLimit ? BigInt(block.gasLimit) : void 0,\n gasUsed: block.gasUsed ? BigInt(block.gasUsed) : void 0,\n hash: block.hash ? block.hash : null,\n logsBloom: block.logsBloom ? block.logsBloom : null,\n nonce: block.nonce ? block.nonce : null,\n number: block.number ? BigInt(block.number) : null,\n size: block.size ? BigInt(block.size) : void 0,\n timestamp: block.timestamp ? BigInt(block.timestamp) : void 0,\n transactions,\n totalDifficulty: block.totalDifficulty ? BigInt(block.totalDifficulty) : null\n };\n }\n var defineBlock;\n var init_block2 = __esm({\n \"../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/utils/formatters/block.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_formatter();\n init_transaction2();\n defineBlock = /* @__PURE__ */ defineFormatter(\"block\", formatBlock);\n }\n });\n\n // ../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/actions/public/getBlock.js\n async function getBlock(client, { blockHash, blockNumber, blockTag = client.experimental_blockTag ?? \"latest\", includeTransactions: includeTransactions_ } = {}) {\n const includeTransactions = includeTransactions_ ?? false;\n const blockNumberHex = blockNumber !== void 0 ? numberToHex(blockNumber) : void 0;\n let block = null;\n if (blockHash) {\n block = await client.request({\n method: \"eth_getBlockByHash\",\n params: [blockHash, includeTransactions]\n }, { dedupe: true });\n } else {\n block = await client.request({\n method: \"eth_getBlockByNumber\",\n params: [blockNumberHex || blockTag, includeTransactions]\n }, { dedupe: Boolean(blockNumberHex) });\n }\n if (!block)\n throw new BlockNotFoundError({ blockHash, blockNumber });\n const format = client.chain?.formatters?.block?.format || formatBlock;\n return format(block, \"getBlock\");\n }\n var init_getBlock = __esm({\n \"../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/actions/public/getBlock.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_block();\n init_toHex();\n init_block2();\n }\n });\n\n // ../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/actions/public/getGasPrice.js\n async function getGasPrice(client) {\n const gasPrice = await client.request({\n method: \"eth_gasPrice\"\n });\n return BigInt(gasPrice);\n }\n var init_getGasPrice = __esm({\n \"../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/actions/public/getGasPrice.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n }\n });\n\n // ../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/actions/public/estimateMaxPriorityFeePerGas.js\n async function estimateMaxPriorityFeePerGas(client, args) {\n return internal_estimateMaxPriorityFeePerGas(client, args);\n }\n async function internal_estimateMaxPriorityFeePerGas(client, args) {\n const { block: block_, chain: chain2 = client.chain, request } = args || {};\n try {\n const maxPriorityFeePerGas = chain2?.fees?.maxPriorityFeePerGas ?? chain2?.fees?.defaultPriorityFee;\n if (typeof maxPriorityFeePerGas === \"function\") {\n const block = block_ || await getAction(client, getBlock, \"getBlock\")({});\n const maxPriorityFeePerGas_ = await maxPriorityFeePerGas({\n block,\n client,\n request\n });\n if (maxPriorityFeePerGas_ === null)\n throw new Error();\n return maxPriorityFeePerGas_;\n }\n if (typeof maxPriorityFeePerGas !== \"undefined\")\n return maxPriorityFeePerGas;\n const maxPriorityFeePerGasHex = await client.request({\n method: \"eth_maxPriorityFeePerGas\"\n });\n return hexToBigInt(maxPriorityFeePerGasHex);\n } catch {\n const [block, gasPrice] = await Promise.all([\n block_ ? Promise.resolve(block_) : getAction(client, getBlock, \"getBlock\")({}),\n getAction(client, getGasPrice, \"getGasPrice\")({})\n ]);\n if (typeof block.baseFeePerGas !== \"bigint\")\n throw new Eip1559FeesNotSupportedError();\n const maxPriorityFeePerGas = gasPrice - block.baseFeePerGas;\n if (maxPriorityFeePerGas < 0n)\n return 0n;\n return maxPriorityFeePerGas;\n }\n }\n var init_estimateMaxPriorityFeePerGas = __esm({\n \"../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/actions/public/estimateMaxPriorityFeePerGas.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_fee();\n init_fromHex();\n init_getAction();\n init_getBlock();\n init_getGasPrice();\n }\n });\n\n // ../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/actions/public/estimateFeesPerGas.js\n async function estimateFeesPerGas(client, args) {\n return internal_estimateFeesPerGas(client, args);\n }\n async function internal_estimateFeesPerGas(client, args) {\n const { block: block_, chain: chain2 = client.chain, request, type = \"eip1559\" } = args || {};\n const baseFeeMultiplier = await (async () => {\n if (typeof chain2?.fees?.baseFeeMultiplier === \"function\")\n return chain2.fees.baseFeeMultiplier({\n block: block_,\n client,\n request\n });\n return chain2?.fees?.baseFeeMultiplier ?? 1.2;\n })();\n if (baseFeeMultiplier < 1)\n throw new BaseFeeScalarError();\n const decimals = baseFeeMultiplier.toString().split(\".\")[1]?.length ?? 0;\n const denominator = 10 ** decimals;\n const multiply = (base4) => base4 * BigInt(Math.ceil(baseFeeMultiplier * denominator)) / BigInt(denominator);\n const block = block_ ? block_ : await getAction(client, getBlock, \"getBlock\")({});\n if (typeof chain2?.fees?.estimateFeesPerGas === \"function\") {\n const fees = await chain2.fees.estimateFeesPerGas({\n block: block_,\n client,\n multiply,\n request,\n type\n });\n if (fees !== null)\n return fees;\n }\n if (type === \"eip1559\") {\n if (typeof block.baseFeePerGas !== \"bigint\")\n throw new Eip1559FeesNotSupportedError();\n const maxPriorityFeePerGas = typeof request?.maxPriorityFeePerGas === \"bigint\" ? request.maxPriorityFeePerGas : await internal_estimateMaxPriorityFeePerGas(client, {\n block,\n chain: chain2,\n request\n });\n const baseFeePerGas = multiply(block.baseFeePerGas);\n const maxFeePerGas = request?.maxFeePerGas ?? baseFeePerGas + maxPriorityFeePerGas;\n return {\n maxFeePerGas,\n maxPriorityFeePerGas\n };\n }\n const gasPrice = request?.gasPrice ?? multiply(await getAction(client, getGasPrice, \"getGasPrice\")({}));\n return {\n gasPrice\n };\n }\n var init_estimateFeesPerGas = __esm({\n \"../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/actions/public/estimateFeesPerGas.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_fee();\n init_getAction();\n init_estimateMaxPriorityFeePerGas();\n init_getBlock();\n init_getGasPrice();\n }\n });\n\n // ../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/actions/public/getTransactionCount.js\n async function getTransactionCount(client, { address, blockTag = \"latest\", blockNumber }) {\n const count = await client.request({\n method: \"eth_getTransactionCount\",\n params: [\n address,\n typeof blockNumber === \"bigint\" ? numberToHex(blockNumber) : blockTag\n ]\n }, {\n dedupe: Boolean(blockNumber)\n });\n return hexToNumber(count);\n }\n var init_getTransactionCount = __esm({\n \"../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/actions/public/getTransactionCount.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_fromHex();\n init_toHex();\n }\n });\n\n // ../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/utils/blob/blobsToCommitments.js\n function blobsToCommitments(parameters) {\n const { kzg } = parameters;\n const to = parameters.to ?? (typeof parameters.blobs[0] === \"string\" ? \"hex\" : \"bytes\");\n const blobs = typeof parameters.blobs[0] === \"string\" ? parameters.blobs.map((x4) => hexToBytes(x4)) : parameters.blobs;\n const commitments = [];\n for (const blob of blobs)\n commitments.push(Uint8Array.from(kzg.blobToKzgCommitment(blob)));\n return to === \"bytes\" ? commitments : commitments.map((x4) => bytesToHex(x4));\n }\n var init_blobsToCommitments = __esm({\n \"../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/utils/blob/blobsToCommitments.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_toBytes();\n init_toHex();\n }\n });\n\n // ../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/utils/blob/blobsToProofs.js\n function blobsToProofs(parameters) {\n const { kzg } = parameters;\n const to = parameters.to ?? (typeof parameters.blobs[0] === \"string\" ? \"hex\" : \"bytes\");\n const blobs = typeof parameters.blobs[0] === \"string\" ? parameters.blobs.map((x4) => hexToBytes(x4)) : parameters.blobs;\n const commitments = typeof parameters.commitments[0] === \"string\" ? parameters.commitments.map((x4) => hexToBytes(x4)) : parameters.commitments;\n const proofs = [];\n for (let i3 = 0; i3 < blobs.length; i3++) {\n const blob = blobs[i3];\n const commitment = commitments[i3];\n proofs.push(Uint8Array.from(kzg.computeBlobKzgProof(blob, commitment)));\n }\n return to === \"bytes\" ? proofs : proofs.map((x4) => bytesToHex(x4));\n }\n var init_blobsToProofs = __esm({\n \"../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/utils/blob/blobsToProofs.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_toBytes();\n init_toHex();\n }\n });\n\n // ../../../node_modules/.pnpm/@noble+hashes@1.8.0/node_modules/@noble/hashes/esm/sha256.js\n var sha2562;\n var init_sha256 = __esm({\n \"../../../node_modules/.pnpm/@noble+hashes@1.8.0/node_modules/@noble/hashes/esm/sha256.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_sha2();\n sha2562 = sha256;\n }\n });\n\n // ../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/utils/hash/sha256.js\n function sha2563(value, to_) {\n const to = to_ || \"hex\";\n const bytes = sha2562(isHex(value, { strict: false }) ? toBytes(value) : value);\n if (to === \"bytes\")\n return bytes;\n return toHex(bytes);\n }\n var init_sha2562 = __esm({\n \"../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/utils/hash/sha256.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_sha256();\n init_isHex();\n init_toBytes();\n init_toHex();\n }\n });\n\n // ../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/utils/blob/commitmentToVersionedHash.js\n function commitmentToVersionedHash(parameters) {\n const { commitment, version: version6 = 1 } = parameters;\n const to = parameters.to ?? (typeof commitment === \"string\" ? \"hex\" : \"bytes\");\n const versionedHash = sha2563(commitment, \"bytes\");\n versionedHash.set([version6], 0);\n return to === \"bytes\" ? versionedHash : bytesToHex(versionedHash);\n }\n var init_commitmentToVersionedHash = __esm({\n \"../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/utils/blob/commitmentToVersionedHash.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_toHex();\n init_sha2562();\n }\n });\n\n // ../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/utils/blob/commitmentsToVersionedHashes.js\n function commitmentsToVersionedHashes(parameters) {\n const { commitments, version: version6 } = parameters;\n const to = parameters.to ?? (typeof commitments[0] === \"string\" ? \"hex\" : \"bytes\");\n const hashes = [];\n for (const commitment of commitments) {\n hashes.push(commitmentToVersionedHash({\n commitment,\n to,\n version: version6\n }));\n }\n return hashes;\n }\n var init_commitmentsToVersionedHashes = __esm({\n \"../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/utils/blob/commitmentsToVersionedHashes.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_commitmentToVersionedHash();\n }\n });\n\n // ../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/constants/blob.js\n var blobsPerTransaction, bytesPerFieldElement, fieldElementsPerBlob, bytesPerBlob, maxBytesPerTransaction;\n var init_blob = __esm({\n \"../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/constants/blob.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n blobsPerTransaction = 6;\n bytesPerFieldElement = 32;\n fieldElementsPerBlob = 4096;\n bytesPerBlob = bytesPerFieldElement * fieldElementsPerBlob;\n maxBytesPerTransaction = bytesPerBlob * blobsPerTransaction - // terminator byte (0x80).\n 1 - // zero byte (0x00) appended to each field element.\n 1 * fieldElementsPerBlob * blobsPerTransaction;\n }\n });\n\n // ../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/constants/kzg.js\n var versionedHashVersionKzg;\n var init_kzg = __esm({\n \"../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/constants/kzg.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n versionedHashVersionKzg = 1;\n }\n });\n\n // ../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/errors/blob.js\n var BlobSizeTooLargeError, EmptyBlobError, InvalidVersionedHashSizeError, InvalidVersionedHashVersionError;\n var init_blob2 = __esm({\n \"../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/errors/blob.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_kzg();\n init_base();\n BlobSizeTooLargeError = class extends BaseError2 {\n constructor({ maxSize, size: size6 }) {\n super(\"Blob size is too large.\", {\n metaMessages: [`Max: ${maxSize} bytes`, `Given: ${size6} bytes`],\n name: \"BlobSizeTooLargeError\"\n });\n }\n };\n EmptyBlobError = class extends BaseError2 {\n constructor() {\n super(\"Blob data must not be empty.\", { name: \"EmptyBlobError\" });\n }\n };\n InvalidVersionedHashSizeError = class extends BaseError2 {\n constructor({ hash: hash3, size: size6 }) {\n super(`Versioned hash \"${hash3}\" size is invalid.`, {\n metaMessages: [\"Expected: 32\", `Received: ${size6}`],\n name: \"InvalidVersionedHashSizeError\"\n });\n }\n };\n InvalidVersionedHashVersionError = class extends BaseError2 {\n constructor({ hash: hash3, version: version6 }) {\n super(`Versioned hash \"${hash3}\" version is invalid.`, {\n metaMessages: [\n `Expected: ${versionedHashVersionKzg}`,\n `Received: ${version6}`\n ],\n name: \"InvalidVersionedHashVersionError\"\n });\n }\n };\n }\n });\n\n // ../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/utils/blob/toBlobs.js\n function toBlobs(parameters) {\n const to = parameters.to ?? (typeof parameters.data === \"string\" ? \"hex\" : \"bytes\");\n const data = typeof parameters.data === \"string\" ? hexToBytes(parameters.data) : parameters.data;\n const size_ = size(data);\n if (!size_)\n throw new EmptyBlobError();\n if (size_ > maxBytesPerTransaction)\n throw new BlobSizeTooLargeError({\n maxSize: maxBytesPerTransaction,\n size: size_\n });\n const blobs = [];\n let active = true;\n let position = 0;\n while (active) {\n const blob = createCursor(new Uint8Array(bytesPerBlob));\n let size6 = 0;\n while (size6 < fieldElementsPerBlob) {\n const bytes = data.slice(position, position + (bytesPerFieldElement - 1));\n blob.pushByte(0);\n blob.pushBytes(bytes);\n if (bytes.length < 31) {\n blob.pushByte(128);\n active = false;\n break;\n }\n size6++;\n position += 31;\n }\n blobs.push(blob);\n }\n return to === \"bytes\" ? blobs.map((x4) => x4.bytes) : blobs.map((x4) => bytesToHex(x4.bytes));\n }\n var init_toBlobs = __esm({\n \"../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/utils/blob/toBlobs.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_blob();\n init_blob2();\n init_cursor2();\n init_size();\n init_toBytes();\n init_toHex();\n }\n });\n\n // ../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/utils/blob/toBlobSidecars.js\n function toBlobSidecars(parameters) {\n const { data, kzg, to } = parameters;\n const blobs = parameters.blobs ?? toBlobs({ data, to });\n const commitments = parameters.commitments ?? blobsToCommitments({ blobs, kzg, to });\n const proofs = parameters.proofs ?? blobsToProofs({ blobs, commitments, kzg, to });\n const sidecars = [];\n for (let i3 = 0; i3 < blobs.length; i3++)\n sidecars.push({\n blob: blobs[i3],\n commitment: commitments[i3],\n proof: proofs[i3]\n });\n return sidecars;\n }\n var init_toBlobSidecars = __esm({\n \"../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/utils/blob/toBlobSidecars.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_blobsToCommitments();\n init_blobsToProofs();\n init_toBlobs();\n }\n });\n\n // ../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/utils/transaction/getTransactionType.js\n function getTransactionType(transaction) {\n if (transaction.type)\n return transaction.type;\n if (typeof transaction.authorizationList !== \"undefined\")\n return \"eip7702\";\n if (typeof transaction.blobs !== \"undefined\" || typeof transaction.blobVersionedHashes !== \"undefined\" || typeof transaction.maxFeePerBlobGas !== \"undefined\" || typeof transaction.sidecars !== \"undefined\")\n return \"eip4844\";\n if (typeof transaction.maxFeePerGas !== \"undefined\" || typeof transaction.maxPriorityFeePerGas !== \"undefined\") {\n return \"eip1559\";\n }\n if (typeof transaction.gasPrice !== \"undefined\") {\n if (typeof transaction.accessList !== \"undefined\")\n return \"eip2930\";\n return \"legacy\";\n }\n throw new InvalidSerializableTransactionError({ transaction });\n }\n var init_getTransactionType = __esm({\n \"../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/utils/transaction/getTransactionType.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_transaction();\n }\n });\n\n // ../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/actions/public/getChainId.js\n async function getChainId(client) {\n const chainIdHex = await client.request({\n method: \"eth_chainId\"\n }, { dedupe: true });\n return hexToNumber(chainIdHex);\n }\n var init_getChainId = __esm({\n \"../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/actions/public/getChainId.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_fromHex();\n }\n });\n\n // ../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/actions/wallet/prepareTransactionRequest.js\n async function prepareTransactionRequest(client, args) {\n const { account: account_ = client.account, blobs, chain: chain2, gas, kzg, nonce, nonceManager, parameters = defaultParameters, type } = args;\n const account = account_ ? parseAccount(account_) : account_;\n const request = { ...args, ...account ? { from: account?.address } : {} };\n let block;\n async function getBlock2() {\n if (block)\n return block;\n block = await getAction(client, getBlock, \"getBlock\")({ blockTag: \"latest\" });\n return block;\n }\n let chainId;\n async function getChainId2() {\n if (chainId)\n return chainId;\n if (chain2)\n return chain2.id;\n if (typeof args.chainId !== \"undefined\")\n return args.chainId;\n const chainId_ = await getAction(client, getChainId, \"getChainId\")({});\n chainId = chainId_;\n return chainId;\n }\n if (parameters.includes(\"nonce\") && typeof nonce === \"undefined\" && account) {\n if (nonceManager) {\n const chainId2 = await getChainId2();\n request.nonce = await nonceManager.consume({\n address: account.address,\n chainId: chainId2,\n client\n });\n } else {\n request.nonce = await getAction(client, getTransactionCount, \"getTransactionCount\")({\n address: account.address,\n blockTag: \"pending\"\n });\n }\n }\n if ((parameters.includes(\"blobVersionedHashes\") || parameters.includes(\"sidecars\")) && blobs && kzg) {\n const commitments = blobsToCommitments({ blobs, kzg });\n if (parameters.includes(\"blobVersionedHashes\")) {\n const versionedHashes = commitmentsToVersionedHashes({\n commitments,\n to: \"hex\"\n });\n request.blobVersionedHashes = versionedHashes;\n }\n if (parameters.includes(\"sidecars\")) {\n const proofs = blobsToProofs({ blobs, commitments, kzg });\n const sidecars = toBlobSidecars({\n blobs,\n commitments,\n proofs,\n to: \"hex\"\n });\n request.sidecars = sidecars;\n }\n }\n if (parameters.includes(\"chainId\"))\n request.chainId = await getChainId2();\n if ((parameters.includes(\"fees\") || parameters.includes(\"type\")) && typeof type === \"undefined\") {\n try {\n request.type = getTransactionType(request);\n } catch {\n let isEip1559Network = eip1559NetworkCache.get(client.uid);\n if (typeof isEip1559Network === \"undefined\") {\n const block2 = await getBlock2();\n isEip1559Network = typeof block2?.baseFeePerGas === \"bigint\";\n eip1559NetworkCache.set(client.uid, isEip1559Network);\n }\n request.type = isEip1559Network ? \"eip1559\" : \"legacy\";\n }\n }\n if (parameters.includes(\"fees\")) {\n if (request.type !== \"legacy\" && request.type !== \"eip2930\") {\n if (typeof request.maxFeePerGas === \"undefined\" || typeof request.maxPriorityFeePerGas === \"undefined\") {\n const block2 = await getBlock2();\n const { maxFeePerGas, maxPriorityFeePerGas } = await internal_estimateFeesPerGas(client, {\n block: block2,\n chain: chain2,\n request\n });\n if (typeof args.maxPriorityFeePerGas === \"undefined\" && args.maxFeePerGas && args.maxFeePerGas < maxPriorityFeePerGas)\n throw new MaxFeePerGasTooLowError({\n maxPriorityFeePerGas\n });\n request.maxPriorityFeePerGas = maxPriorityFeePerGas;\n request.maxFeePerGas = maxFeePerGas;\n }\n } else {\n if (typeof args.maxFeePerGas !== \"undefined\" || typeof args.maxPriorityFeePerGas !== \"undefined\")\n throw new Eip1559FeesNotSupportedError();\n if (typeof args.gasPrice === \"undefined\") {\n const block2 = await getBlock2();\n const { gasPrice: gasPrice_ } = await internal_estimateFeesPerGas(client, {\n block: block2,\n chain: chain2,\n request,\n type: \"legacy\"\n });\n request.gasPrice = gasPrice_;\n }\n }\n }\n if (parameters.includes(\"gas\") && typeof gas === \"undefined\")\n request.gas = await getAction(client, estimateGas, \"estimateGas\")({\n ...request,\n account,\n prepare: account?.type === \"local\" ? [] : [\"blobVersionedHashes\"]\n });\n assertRequest(request);\n delete request.parameters;\n return request;\n }\n var defaultParameters, eip1559NetworkCache;\n var init_prepareTransactionRequest = __esm({\n \"../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/actions/wallet/prepareTransactionRequest.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_parseAccount();\n init_estimateFeesPerGas();\n init_estimateGas2();\n init_getBlock();\n init_getTransactionCount();\n init_fee();\n init_blobsToCommitments();\n init_blobsToProofs();\n init_commitmentsToVersionedHashes();\n init_toBlobSidecars();\n init_getAction();\n init_assertRequest();\n init_getTransactionType();\n init_getChainId();\n defaultParameters = [\n \"blobVersionedHashes\",\n \"chainId\",\n \"fees\",\n \"gas\",\n \"nonce\",\n \"type\"\n ];\n eip1559NetworkCache = /* @__PURE__ */ new Map();\n }\n });\n\n // ../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/actions/public/estimateGas.js\n async function estimateGas(client, args) {\n const { account: account_ = client.account, prepare = true } = args;\n const account = account_ ? parseAccount(account_) : void 0;\n const parameters = (() => {\n if (Array.isArray(prepare))\n return prepare;\n if (account?.type !== \"local\")\n return [\"blobVersionedHashes\"];\n return void 0;\n })();\n try {\n const { accessList, authorizationList, blobs, blobVersionedHashes, blockNumber, blockTag, data, gas, gasPrice, maxFeePerBlobGas, maxFeePerGas, maxPriorityFeePerGas, nonce, value, stateOverride, ...rest } = prepare ? await prepareTransactionRequest(client, {\n ...args,\n parameters\n }) : args;\n const blockNumberHex = typeof blockNumber === \"bigint\" ? numberToHex(blockNumber) : void 0;\n const block = blockNumberHex || blockTag;\n const rpcStateOverride = serializeStateOverride(stateOverride);\n const to = await (async () => {\n if (rest.to)\n return rest.to;\n if (authorizationList && authorizationList.length > 0)\n return await recoverAuthorizationAddress({\n authorization: authorizationList[0]\n }).catch(() => {\n throw new BaseError2(\"`to` is required. Could not infer from `authorizationList`\");\n });\n return void 0;\n })();\n assertRequest(args);\n const chainFormat = client.chain?.formatters?.transactionRequest?.format;\n const format = chainFormat || formatTransactionRequest;\n const request = format({\n // Pick out extra data that might exist on the chain's transaction request type.\n ...extract(rest, { format: chainFormat }),\n account,\n accessList,\n authorizationList,\n blobs,\n blobVersionedHashes,\n data,\n gas,\n gasPrice,\n maxFeePerBlobGas,\n maxFeePerGas,\n maxPriorityFeePerGas,\n nonce,\n to,\n value\n }, \"estimateGas\");\n return BigInt(await client.request({\n method: \"eth_estimateGas\",\n params: rpcStateOverride ? [\n request,\n block ?? client.experimental_blockTag ?? \"latest\",\n rpcStateOverride\n ] : block ? [request, block] : [request]\n }));\n } catch (err) {\n throw getEstimateGasError(err, {\n ...args,\n account,\n chain: client.chain\n });\n }\n }\n var init_estimateGas2 = __esm({\n \"../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/actions/public/estimateGas.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_parseAccount();\n init_base();\n init_recoverAuthorizationAddress();\n init_toHex();\n init_getEstimateGasError();\n init_extract();\n init_transactionRequest();\n init_stateOverride2();\n init_assertRequest();\n init_prepareTransactionRequest();\n }\n });\n\n // ../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/actions/public/estimateContractGas.js\n async function estimateContractGas(client, parameters) {\n const { abi: abi2, address, args, functionName, dataSuffix, ...request } = parameters;\n const data = encodeFunctionData({\n abi: abi2,\n args,\n functionName\n });\n try {\n const gas = await getAction(client, estimateGas, \"estimateGas\")({\n data: `${data}${dataSuffix ? dataSuffix.replace(\"0x\", \"\") : \"\"}`,\n to: address,\n ...request\n });\n return gas;\n } catch (error) {\n const account = request.account ? parseAccount(request.account) : void 0;\n throw getContractError(error, {\n abi: abi2,\n address,\n args,\n docsPath: \"/docs/contract/estimateContractGas\",\n functionName,\n sender: account?.address\n });\n }\n }\n var init_estimateContractGas = __esm({\n \"../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/actions/public/estimateContractGas.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_parseAccount();\n init_encodeFunctionData();\n init_getContractError();\n init_getAction();\n init_estimateGas2();\n }\n });\n\n // ../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/utils/address/isAddressEqual.js\n function isAddressEqual(a3, b4) {\n if (!isAddress(a3, { strict: false }))\n throw new InvalidAddressError({ address: a3 });\n if (!isAddress(b4, { strict: false }))\n throw new InvalidAddressError({ address: b4 });\n return a3.toLowerCase() === b4.toLowerCase();\n }\n var init_isAddressEqual = __esm({\n \"../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/utils/address/isAddressEqual.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_address();\n init_isAddress();\n }\n });\n\n // ../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/utils/abi/decodeEventLog.js\n function decodeEventLog(parameters) {\n const { abi: abi2, data, strict: strict_, topics } = parameters;\n const strict = strict_ ?? true;\n const [signature, ...argTopics] = topics;\n if (!signature)\n throw new AbiEventSignatureEmptyTopicsError({ docsPath: docsPath3 });\n const abiItem = abi2.find((x4) => x4.type === \"event\" && signature === toEventSelector(formatAbiItem2(x4)));\n if (!(abiItem && \"name\" in abiItem) || abiItem.type !== \"event\")\n throw new AbiEventSignatureNotFoundError(signature, { docsPath: docsPath3 });\n const { name, inputs } = abiItem;\n const isUnnamed = inputs?.some((x4) => !(\"name\" in x4 && x4.name));\n const args = isUnnamed ? [] : {};\n const indexedInputs = inputs.map((x4, i3) => [x4, i3]).filter(([x4]) => \"indexed\" in x4 && x4.indexed);\n for (let i3 = 0; i3 < indexedInputs.length; i3++) {\n const [param, argIndex] = indexedInputs[i3];\n const topic = argTopics[i3];\n if (!topic)\n throw new DecodeLogTopicsMismatch({\n abiItem,\n param\n });\n args[isUnnamed ? argIndex : param.name || argIndex] = decodeTopic({\n param,\n value: topic\n });\n }\n const nonIndexedInputs = inputs.filter((x4) => !(\"indexed\" in x4 && x4.indexed));\n if (nonIndexedInputs.length > 0) {\n if (data && data !== \"0x\") {\n try {\n const decodedData = decodeAbiParameters(nonIndexedInputs, data);\n if (decodedData) {\n if (isUnnamed)\n for (let i3 = 0; i3 < inputs.length; i3++)\n args[i3] = args[i3] ?? decodedData.shift();\n else\n for (let i3 = 0; i3 < nonIndexedInputs.length; i3++)\n args[nonIndexedInputs[i3].name] = decodedData[i3];\n }\n } catch (err) {\n if (strict) {\n if (err instanceof AbiDecodingDataSizeTooSmallError || err instanceof PositionOutOfBoundsError)\n throw new DecodeLogDataMismatch({\n abiItem,\n data,\n params: nonIndexedInputs,\n size: size(data)\n });\n throw err;\n }\n }\n } else if (strict) {\n throw new DecodeLogDataMismatch({\n abiItem,\n data: \"0x\",\n params: nonIndexedInputs,\n size: 0\n });\n }\n }\n return {\n eventName: name,\n args: Object.values(args).length > 0 ? args : void 0\n };\n }\n function decodeTopic({ param, value }) {\n if (param.type === \"string\" || param.type === \"bytes\" || param.type === \"tuple\" || param.type.match(/^(.*)\\[(\\d+)?\\]$/))\n return value;\n const decodedArg = decodeAbiParameters([param], value) || [];\n return decodedArg[0];\n }\n var docsPath3;\n var init_decodeEventLog = __esm({\n \"../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/utils/abi/decodeEventLog.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_abi();\n init_cursor();\n init_size();\n init_toEventSelector();\n init_decodeAbiParameters();\n init_formatAbiItem2();\n docsPath3 = \"/docs/contract/decodeEventLog\";\n }\n });\n\n // ../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/utils/abi/parseEventLogs.js\n function parseEventLogs(parameters) {\n const { abi: abi2, args, logs, strict = true } = parameters;\n const eventName = (() => {\n if (!parameters.eventName)\n return void 0;\n if (Array.isArray(parameters.eventName))\n return parameters.eventName;\n return [parameters.eventName];\n })();\n return logs.map((log) => {\n try {\n const abiItem = abi2.find((abiItem2) => abiItem2.type === \"event\" && log.topics[0] === toEventSelector(abiItem2));\n if (!abiItem)\n return null;\n const event = decodeEventLog({\n ...log,\n abi: [abiItem],\n strict\n });\n if (eventName && !eventName.includes(event.eventName))\n return null;\n if (!includesArgs({\n args: event.args,\n inputs: abiItem.inputs,\n matchArgs: args\n }))\n return null;\n return { ...event, ...log };\n } catch (err) {\n let eventName2;\n let isUnnamed;\n if (err instanceof AbiEventSignatureNotFoundError)\n return null;\n if (err instanceof DecodeLogDataMismatch || err instanceof DecodeLogTopicsMismatch) {\n if (strict)\n return null;\n eventName2 = err.abiItem.name;\n isUnnamed = err.abiItem.inputs?.some((x4) => !(\"name\" in x4 && x4.name));\n }\n return { ...log, args: isUnnamed ? [] : {}, eventName: eventName2 };\n }\n }).filter(Boolean);\n }\n function includesArgs(parameters) {\n const { args, inputs, matchArgs } = parameters;\n if (!matchArgs)\n return true;\n if (!args)\n return false;\n function isEqual2(input, value, arg) {\n try {\n if (input.type === \"address\")\n return isAddressEqual(value, arg);\n if (input.type === \"string\" || input.type === \"bytes\")\n return keccak256(toBytes(value)) === arg;\n return value === arg;\n } catch {\n return false;\n }\n }\n if (Array.isArray(args) && Array.isArray(matchArgs)) {\n return matchArgs.every((value, index2) => {\n if (value === null || value === void 0)\n return true;\n const input = inputs[index2];\n if (!input)\n return false;\n const value_ = Array.isArray(value) ? value : [value];\n return value_.some((value2) => isEqual2(input, value2, args[index2]));\n });\n }\n if (typeof args === \"object\" && !Array.isArray(args) && typeof matchArgs === \"object\" && !Array.isArray(matchArgs))\n return Object.entries(matchArgs).every(([key, value]) => {\n if (value === null || value === void 0)\n return true;\n const input = inputs.find((input2) => input2.name === key);\n if (!input)\n return false;\n const value_ = Array.isArray(value) ? value : [value];\n return value_.some((value2) => isEqual2(input, value2, args[key]));\n });\n return false;\n }\n var init_parseEventLogs = __esm({\n \"../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/utils/abi/parseEventLogs.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_abi();\n init_isAddressEqual();\n init_toBytes();\n init_keccak256();\n init_toEventSelector();\n init_decodeEventLog();\n }\n });\n\n // ../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/utils/formatters/log.js\n function formatLog(log, { args, eventName } = {}) {\n return {\n ...log,\n blockHash: log.blockHash ? log.blockHash : null,\n blockNumber: log.blockNumber ? BigInt(log.blockNumber) : null,\n logIndex: log.logIndex ? Number(log.logIndex) : null,\n transactionHash: log.transactionHash ? log.transactionHash : null,\n transactionIndex: log.transactionIndex ? Number(log.transactionIndex) : null,\n ...eventName ? { args, eventName } : {}\n };\n }\n var init_log2 = __esm({\n \"../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/utils/formatters/log.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n }\n });\n\n // ../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/actions/public/getLogs.js\n async function getLogs(client, { address, blockHash, fromBlock, toBlock, event, events: events_, args, strict: strict_ } = {}) {\n const strict = strict_ ?? false;\n const events = events_ ?? (event ? [event] : void 0);\n let topics = [];\n if (events) {\n const encoded = events.flatMap((event2) => encodeEventTopics({\n abi: [event2],\n eventName: event2.name,\n args: events_ ? void 0 : args\n }));\n topics = [encoded];\n if (event)\n topics = topics[0];\n }\n let logs;\n if (blockHash) {\n logs = await client.request({\n method: \"eth_getLogs\",\n params: [{ address, topics, blockHash }]\n });\n } else {\n logs = await client.request({\n method: \"eth_getLogs\",\n params: [\n {\n address,\n topics,\n fromBlock: typeof fromBlock === \"bigint\" ? numberToHex(fromBlock) : fromBlock,\n toBlock: typeof toBlock === \"bigint\" ? numberToHex(toBlock) : toBlock\n }\n ]\n });\n }\n const formattedLogs = logs.map((log) => formatLog(log));\n if (!events)\n return formattedLogs;\n return parseEventLogs({\n abi: events,\n args,\n logs: formattedLogs,\n strict\n });\n }\n var init_getLogs = __esm({\n \"../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/actions/public/getLogs.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_encodeEventTopics();\n init_parseEventLogs();\n init_toHex();\n init_log2();\n }\n });\n\n // ../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/actions/public/getContractEvents.js\n async function getContractEvents(client, parameters) {\n const { abi: abi2, address, args, blockHash, eventName, fromBlock, toBlock, strict } = parameters;\n const event = eventName ? getAbiItem({ abi: abi2, name: eventName }) : void 0;\n const events = !event ? abi2.filter((x4) => x4.type === \"event\") : void 0;\n return getAction(client, getLogs, \"getLogs\")({\n address,\n args,\n blockHash,\n event,\n events,\n fromBlock,\n toBlock,\n strict\n });\n }\n var init_getContractEvents = __esm({\n \"../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/actions/public/getContractEvents.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_getAbiItem();\n init_getAction();\n init_getLogs();\n }\n });\n\n // ../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/utils/abi/decodeFunctionResult.js\n function decodeFunctionResult(parameters) {\n const { abi: abi2, args, functionName, data } = parameters;\n let abiItem = abi2[0];\n if (functionName) {\n const item = getAbiItem({ abi: abi2, args, name: functionName });\n if (!item)\n throw new AbiFunctionNotFoundError(functionName, { docsPath: docsPath4 });\n abiItem = item;\n }\n if (abiItem.type !== \"function\")\n throw new AbiFunctionNotFoundError(void 0, { docsPath: docsPath4 });\n if (!abiItem.outputs)\n throw new AbiFunctionOutputsNotFoundError(abiItem.name, { docsPath: docsPath4 });\n const values = decodeAbiParameters(abiItem.outputs, data);\n if (values && values.length > 1)\n return values;\n if (values && values.length === 1)\n return values[0];\n return void 0;\n }\n var docsPath4;\n var init_decodeFunctionResult = __esm({\n \"../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/utils/abi/decodeFunctionResult.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_abi();\n init_decodeAbiParameters();\n init_getAbiItem();\n docsPath4 = \"/docs/contract/decodeFunctionResult\";\n }\n });\n\n // ../../../node_modules/.pnpm/ox@0.9.6_typescript@5.8.3_zod@3.25.64/node_modules/ox/_esm/core/version.js\n var version4;\n var init_version4 = __esm({\n \"../../../node_modules/.pnpm/ox@0.9.6_typescript@5.8.3_zod@3.25.64/node_modules/ox/_esm/core/version.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n version4 = \"0.1.1\";\n }\n });\n\n // ../../../node_modules/.pnpm/ox@0.9.6_typescript@5.8.3_zod@3.25.64/node_modules/ox/_esm/core/internal/errors.js\n function getVersion() {\n return version4;\n }\n var init_errors3 = __esm({\n \"../../../node_modules/.pnpm/ox@0.9.6_typescript@5.8.3_zod@3.25.64/node_modules/ox/_esm/core/internal/errors.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_version4();\n }\n });\n\n // ../../../node_modules/.pnpm/ox@0.9.6_typescript@5.8.3_zod@3.25.64/node_modules/ox/_esm/core/Errors.js\n function walk2(err, fn) {\n if (fn?.(err))\n return err;\n if (err && typeof err === \"object\" && \"cause\" in err && err.cause)\n return walk2(err.cause, fn);\n return fn ? null : err;\n }\n var BaseError3;\n var init_Errors = __esm({\n \"../../../node_modules/.pnpm/ox@0.9.6_typescript@5.8.3_zod@3.25.64/node_modules/ox/_esm/core/Errors.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_errors3();\n BaseError3 = class _BaseError extends Error {\n constructor(shortMessage, options = {}) {\n const details = (() => {\n if (options.cause instanceof _BaseError) {\n if (options.cause.details)\n return options.cause.details;\n if (options.cause.shortMessage)\n return options.cause.shortMessage;\n }\n if (options.cause && \"details\" in options.cause && typeof options.cause.details === \"string\")\n return options.cause.details;\n if (options.cause?.message)\n return options.cause.message;\n return options.details;\n })();\n const docsPath8 = (() => {\n if (options.cause instanceof _BaseError)\n return options.cause.docsPath || options.docsPath;\n return options.docsPath;\n })();\n const docsBaseUrl = \"https://oxlib.sh\";\n const docs = `${docsBaseUrl}${docsPath8 ?? \"\"}`;\n const message = [\n shortMessage || \"An error occurred.\",\n ...options.metaMessages ? [\"\", ...options.metaMessages] : [],\n ...details || docsPath8 ? [\n \"\",\n details ? `Details: ${details}` : void 0,\n docsPath8 ? `See: ${docs}` : void 0\n ] : []\n ].filter((x4) => typeof x4 === \"string\").join(\"\\n\");\n super(message, options.cause ? { cause: options.cause } : void 0);\n Object.defineProperty(this, \"details\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: void 0\n });\n Object.defineProperty(this, \"docs\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: void 0\n });\n Object.defineProperty(this, \"docsPath\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: void 0\n });\n Object.defineProperty(this, \"shortMessage\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: void 0\n });\n Object.defineProperty(this, \"cause\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: void 0\n });\n Object.defineProperty(this, \"name\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: \"BaseError\"\n });\n Object.defineProperty(this, \"version\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: `ox@${getVersion()}`\n });\n this.cause = options.cause;\n this.details = details;\n this.docs = docs;\n this.docsPath = docsPath8;\n this.shortMessage = shortMessage;\n }\n walk(fn) {\n return walk2(this, fn);\n }\n };\n }\n });\n\n // ../../../node_modules/.pnpm/ox@0.9.6_typescript@5.8.3_zod@3.25.64/node_modules/ox/_esm/core/internal/bytes.js\n function assertSize2(bytes, size_) {\n if (size2(bytes) > size_)\n throw new SizeOverflowError2({\n givenSize: size2(bytes),\n maxSize: size_\n });\n }\n function assertStartOffset2(value, start) {\n if (typeof start === \"number\" && start > 0 && start > size2(value) - 1)\n throw new SliceOffsetOutOfBoundsError2({\n offset: start,\n position: \"start\",\n size: size2(value)\n });\n }\n function assertEndOffset2(value, start, end) {\n if (typeof start === \"number\" && typeof end === \"number\" && size2(value) !== end - start) {\n throw new SliceOffsetOutOfBoundsError2({\n offset: end,\n position: \"end\",\n size: size2(value)\n });\n }\n }\n function charCodeToBase162(char) {\n if (char >= charCodeMap2.zero && char <= charCodeMap2.nine)\n return char - charCodeMap2.zero;\n if (char >= charCodeMap2.A && char <= charCodeMap2.F)\n return char - (charCodeMap2.A - 10);\n if (char >= charCodeMap2.a && char <= charCodeMap2.f)\n return char - (charCodeMap2.a - 10);\n return void 0;\n }\n function pad2(bytes, options = {}) {\n const { dir, size: size6 = 32 } = options;\n if (size6 === 0)\n return bytes;\n if (bytes.length > size6)\n throw new SizeExceedsPaddingSizeError2({\n size: bytes.length,\n targetSize: size6,\n type: \"Bytes\"\n });\n const paddedBytes = new Uint8Array(size6);\n for (let i3 = 0; i3 < size6; i3++) {\n const padEnd = dir === \"right\";\n paddedBytes[padEnd ? i3 : size6 - i3 - 1] = bytes[padEnd ? i3 : bytes.length - i3 - 1];\n }\n return paddedBytes;\n }\n function trim2(value, options = {}) {\n const { dir = \"left\" } = options;\n let data = value;\n let sliceLength = 0;\n for (let i3 = 0; i3 < data.length - 1; i3++) {\n if (data[dir === \"left\" ? i3 : data.length - i3 - 1].toString() === \"0\")\n sliceLength++;\n else\n break;\n }\n data = dir === \"left\" ? data.slice(sliceLength) : data.slice(0, data.length - sliceLength);\n return data;\n }\n var charCodeMap2;\n var init_bytes = __esm({\n \"../../../node_modules/.pnpm/ox@0.9.6_typescript@5.8.3_zod@3.25.64/node_modules/ox/_esm/core/internal/bytes.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_Bytes();\n charCodeMap2 = {\n zero: 48,\n nine: 57,\n A: 65,\n F: 70,\n a: 97,\n f: 102\n };\n }\n });\n\n // ../../../node_modules/.pnpm/ox@0.9.6_typescript@5.8.3_zod@3.25.64/node_modules/ox/_esm/core/internal/hex.js\n function assertSize3(hex, size_) {\n if (size3(hex) > size_)\n throw new SizeOverflowError3({\n givenSize: size3(hex),\n maxSize: size_\n });\n }\n function assertStartOffset3(value, start) {\n if (typeof start === \"number\" && start > 0 && start > size3(value) - 1)\n throw new SliceOffsetOutOfBoundsError3({\n offset: start,\n position: \"start\",\n size: size3(value)\n });\n }\n function assertEndOffset3(value, start, end) {\n if (typeof start === \"number\" && typeof end === \"number\" && size3(value) !== end - start) {\n throw new SliceOffsetOutOfBoundsError3({\n offset: end,\n position: \"end\",\n size: size3(value)\n });\n }\n }\n function pad3(hex_, options = {}) {\n const { dir, size: size6 = 32 } = options;\n if (size6 === 0)\n return hex_;\n const hex = hex_.replace(\"0x\", \"\");\n if (hex.length > size6 * 2)\n throw new SizeExceedsPaddingSizeError3({\n size: Math.ceil(hex.length / 2),\n targetSize: size6,\n type: \"Hex\"\n });\n return `0x${hex[dir === \"right\" ? \"padEnd\" : \"padStart\"](size6 * 2, \"0\")}`;\n }\n function trim3(value, options = {}) {\n const { dir = \"left\" } = options;\n let data = value.replace(\"0x\", \"\");\n let sliceLength = 0;\n for (let i3 = 0; i3 < data.length - 1; i3++) {\n if (data[dir === \"left\" ? i3 : data.length - i3 - 1].toString() === \"0\")\n sliceLength++;\n else\n break;\n }\n data = dir === \"left\" ? data.slice(sliceLength) : data.slice(0, data.length - sliceLength);\n if (data === \"0\")\n return \"0x\";\n if (dir === \"right\" && data.length % 2 === 1)\n return `0x${data}0`;\n return `0x${data}`;\n }\n var init_hex = __esm({\n \"../../../node_modules/.pnpm/ox@0.9.6_typescript@5.8.3_zod@3.25.64/node_modules/ox/_esm/core/internal/hex.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_Hex();\n }\n });\n\n // ../../../node_modules/.pnpm/ox@0.9.6_typescript@5.8.3_zod@3.25.64/node_modules/ox/_esm/core/Json.js\n function stringify2(value, replacer, space) {\n return JSON.stringify(value, (key, value2) => {\n if (typeof replacer === \"function\")\n return replacer(key, value2);\n if (typeof value2 === \"bigint\")\n return value2.toString() + bigIntSuffix;\n return value2;\n }, space);\n }\n var bigIntSuffix;\n var init_Json = __esm({\n \"../../../node_modules/.pnpm/ox@0.9.6_typescript@5.8.3_zod@3.25.64/node_modules/ox/_esm/core/Json.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n bigIntSuffix = \"#__bigint\";\n }\n });\n\n // ../../../node_modules/.pnpm/ox@0.9.6_typescript@5.8.3_zod@3.25.64/node_modules/ox/_esm/core/Bytes.js\n function assert2(value) {\n if (value instanceof Uint8Array)\n return;\n if (!value)\n throw new InvalidBytesTypeError(value);\n if (typeof value !== \"object\")\n throw new InvalidBytesTypeError(value);\n if (!(\"BYTES_PER_ELEMENT\" in value))\n throw new InvalidBytesTypeError(value);\n if (value.BYTES_PER_ELEMENT !== 1 || value.constructor.name !== \"Uint8Array\")\n throw new InvalidBytesTypeError(value);\n }\n function from(value) {\n if (value instanceof Uint8Array)\n return value;\n if (typeof value === \"string\")\n return fromHex2(value);\n return fromArray(value);\n }\n function fromArray(value) {\n return value instanceof Uint8Array ? value : new Uint8Array(value);\n }\n function fromHex2(value, options = {}) {\n const { size: size6 } = options;\n let hex = value;\n if (size6) {\n assertSize3(value, size6);\n hex = padRight(value, size6);\n }\n let hexString = hex.slice(2);\n if (hexString.length % 2)\n hexString = `0${hexString}`;\n const length2 = hexString.length / 2;\n const bytes = new Uint8Array(length2);\n for (let index2 = 0, j2 = 0; index2 < length2; index2++) {\n const nibbleLeft = charCodeToBase162(hexString.charCodeAt(j2++));\n const nibbleRight = charCodeToBase162(hexString.charCodeAt(j2++));\n if (nibbleLeft === void 0 || nibbleRight === void 0) {\n throw new BaseError3(`Invalid byte sequence (\"${hexString[j2 - 2]}${hexString[j2 - 1]}\" in \"${hexString}\").`);\n }\n bytes[index2] = nibbleLeft * 16 + nibbleRight;\n }\n return bytes;\n }\n function fromString(value, options = {}) {\n const { size: size6 } = options;\n const bytes = encoder3.encode(value);\n if (typeof size6 === \"number\") {\n assertSize2(bytes, size6);\n return padRight2(bytes, size6);\n }\n return bytes;\n }\n function padRight2(value, size6) {\n return pad2(value, { dir: \"right\", size: size6 });\n }\n function size2(value) {\n return value.length;\n }\n function slice2(value, start, end, options = {}) {\n const { strict } = options;\n assertStartOffset2(value, start);\n const value_ = value.slice(start, end);\n if (strict)\n assertEndOffset2(value_, start, end);\n return value_;\n }\n function toBigInt2(bytes, options = {}) {\n const { size: size6 } = options;\n if (typeof size6 !== \"undefined\")\n assertSize2(bytes, size6);\n const hex = fromBytes(bytes, options);\n return toBigInt(hex, options);\n }\n function toBoolean(bytes, options = {}) {\n const { size: size6 } = options;\n let bytes_ = bytes;\n if (typeof size6 !== \"undefined\") {\n assertSize2(bytes_, size6);\n bytes_ = trimLeft(bytes_);\n }\n if (bytes_.length > 1 || bytes_[0] > 1)\n throw new InvalidBytesBooleanError2(bytes_);\n return Boolean(bytes_[0]);\n }\n function toNumber2(bytes, options = {}) {\n const { size: size6 } = options;\n if (typeof size6 !== \"undefined\")\n assertSize2(bytes, size6);\n const hex = fromBytes(bytes, options);\n return toNumber(hex, options);\n }\n function toString(bytes, options = {}) {\n const { size: size6 } = options;\n let bytes_ = bytes;\n if (typeof size6 !== \"undefined\") {\n assertSize2(bytes_, size6);\n bytes_ = trimRight(bytes_);\n }\n return decoder.decode(bytes_);\n }\n function trimLeft(value) {\n return trim2(value, { dir: \"left\" });\n }\n function trimRight(value) {\n return trim2(value, { dir: \"right\" });\n }\n function validate(value) {\n try {\n assert2(value);\n return true;\n } catch {\n return false;\n }\n }\n var decoder, encoder3, InvalidBytesBooleanError2, InvalidBytesTypeError, SizeOverflowError2, SliceOffsetOutOfBoundsError2, SizeExceedsPaddingSizeError2;\n var init_Bytes = __esm({\n \"../../../node_modules/.pnpm/ox@0.9.6_typescript@5.8.3_zod@3.25.64/node_modules/ox/_esm/core/Bytes.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_Errors();\n init_Hex();\n init_bytes();\n init_hex();\n init_Json();\n decoder = /* @__PURE__ */ new TextDecoder();\n encoder3 = /* @__PURE__ */ new TextEncoder();\n InvalidBytesBooleanError2 = class extends BaseError3 {\n constructor(bytes) {\n super(`Bytes value \\`${bytes}\\` is not a valid boolean.`, {\n metaMessages: [\n \"The bytes array must contain a single byte of either a `0` or `1` value.\"\n ]\n });\n Object.defineProperty(this, \"name\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: \"Bytes.InvalidBytesBooleanError\"\n });\n }\n };\n InvalidBytesTypeError = class extends BaseError3 {\n constructor(value) {\n super(`Value \\`${typeof value === \"object\" ? stringify2(value) : value}\\` of type \\`${typeof value}\\` is an invalid Bytes value.`, {\n metaMessages: [\"Bytes values must be of type `Bytes`.\"]\n });\n Object.defineProperty(this, \"name\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: \"Bytes.InvalidBytesTypeError\"\n });\n }\n };\n SizeOverflowError2 = class extends BaseError3 {\n constructor({ givenSize, maxSize }) {\n super(`Size cannot exceed \\`${maxSize}\\` bytes. Given size: \\`${givenSize}\\` bytes.`);\n Object.defineProperty(this, \"name\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: \"Bytes.SizeOverflowError\"\n });\n }\n };\n SliceOffsetOutOfBoundsError2 = class extends BaseError3 {\n constructor({ offset, position, size: size6 }) {\n super(`Slice ${position === \"start\" ? \"starting\" : \"ending\"} at offset \\`${offset}\\` is out-of-bounds (size: \\`${size6}\\`).`);\n Object.defineProperty(this, \"name\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: \"Bytes.SliceOffsetOutOfBoundsError\"\n });\n }\n };\n SizeExceedsPaddingSizeError2 = class extends BaseError3 {\n constructor({ size: size6, targetSize, type }) {\n super(`${type.charAt(0).toUpperCase()}${type.slice(1).toLowerCase()} size (\\`${size6}\\`) exceeds padding size (\\`${targetSize}\\`).`);\n Object.defineProperty(this, \"name\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: \"Bytes.SizeExceedsPaddingSizeError\"\n });\n }\n };\n }\n });\n\n // ../../../node_modules/.pnpm/ox@0.9.6_typescript@5.8.3_zod@3.25.64/node_modules/ox/_esm/core/Hex.js\n function assert3(value, options = {}) {\n const { strict = false } = options;\n if (!value)\n throw new InvalidHexTypeError(value);\n if (typeof value !== \"string\")\n throw new InvalidHexTypeError(value);\n if (strict) {\n if (!/^0x[0-9a-fA-F]*$/.test(value))\n throw new InvalidHexValueError(value);\n }\n if (!value.startsWith(\"0x\"))\n throw new InvalidHexValueError(value);\n }\n function concat2(...values) {\n return `0x${values.reduce((acc, x4) => acc + x4.replace(\"0x\", \"\"), \"\")}`;\n }\n function from2(value) {\n if (value instanceof Uint8Array)\n return fromBytes(value);\n if (Array.isArray(value))\n return fromBytes(new Uint8Array(value));\n return value;\n }\n function fromBoolean(value, options = {}) {\n const hex = `0x${Number(value)}`;\n if (typeof options.size === \"number\") {\n assertSize3(hex, options.size);\n return padLeft(hex, options.size);\n }\n return hex;\n }\n function fromBytes(value, options = {}) {\n let string2 = \"\";\n for (let i3 = 0; i3 < value.length; i3++)\n string2 += hexes4[value[i3]];\n const hex = `0x${string2}`;\n if (typeof options.size === \"number\") {\n assertSize3(hex, options.size);\n return padRight(hex, options.size);\n }\n return hex;\n }\n function fromNumber(value, options = {}) {\n const { signed, size: size6 } = options;\n const value_ = BigInt(value);\n let maxValue;\n if (size6) {\n if (signed)\n maxValue = (1n << BigInt(size6) * 8n - 1n) - 1n;\n else\n maxValue = 2n ** (BigInt(size6) * 8n) - 1n;\n } else if (typeof value === \"number\") {\n maxValue = BigInt(Number.MAX_SAFE_INTEGER);\n }\n const minValue2 = typeof maxValue === \"bigint\" && signed ? -maxValue - 1n : 0;\n if (maxValue && value_ > maxValue || value_ < minValue2) {\n const suffix = typeof value === \"bigint\" ? \"n\" : \"\";\n throw new IntegerOutOfRangeError2({\n max: maxValue ? `${maxValue}${suffix}` : void 0,\n min: `${minValue2}${suffix}`,\n signed,\n size: size6,\n value: `${value}${suffix}`\n });\n }\n const stringValue = (signed && value_ < 0 ? (1n << BigInt(size6 * 8)) + BigInt(value_) : value_).toString(16);\n const hex = `0x${stringValue}`;\n if (size6)\n return padLeft(hex, size6);\n return hex;\n }\n function fromString2(value, options = {}) {\n return fromBytes(encoder4.encode(value), options);\n }\n function padLeft(value, size6) {\n return pad3(value, { dir: \"left\", size: size6 });\n }\n function padRight(value, size6) {\n return pad3(value, { dir: \"right\", size: size6 });\n }\n function slice3(value, start, end, options = {}) {\n const { strict } = options;\n assertStartOffset3(value, start);\n const value_ = `0x${value.replace(\"0x\", \"\").slice((start ?? 0) * 2, (end ?? value.length) * 2)}`;\n if (strict)\n assertEndOffset3(value_, start, end);\n return value_;\n }\n function size3(value) {\n return Math.ceil((value.length - 2) / 2);\n }\n function trimLeft2(value) {\n return trim3(value, { dir: \"left\" });\n }\n function toBigInt(hex, options = {}) {\n const { signed } = options;\n if (options.size)\n assertSize3(hex, options.size);\n const value = BigInt(hex);\n if (!signed)\n return value;\n const size6 = (hex.length - 2) / 2;\n const max_unsigned = (1n << BigInt(size6) * 8n) - 1n;\n const max_signed = max_unsigned >> 1n;\n if (value <= max_signed)\n return value;\n return value - max_unsigned - 1n;\n }\n function toNumber(hex, options = {}) {\n const { signed, size: size6 } = options;\n if (!signed && !size6)\n return Number(hex);\n return Number(toBigInt(hex, options));\n }\n function validate2(value, options = {}) {\n const { strict = false } = options;\n try {\n assert3(value, { strict });\n return true;\n } catch {\n return false;\n }\n }\n var encoder4, hexes4, IntegerOutOfRangeError2, InvalidHexTypeError, InvalidHexValueError, SizeOverflowError3, SliceOffsetOutOfBoundsError3, SizeExceedsPaddingSizeError3;\n var init_Hex = __esm({\n \"../../../node_modules/.pnpm/ox@0.9.6_typescript@5.8.3_zod@3.25.64/node_modules/ox/_esm/core/Hex.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_Errors();\n init_hex();\n init_Json();\n encoder4 = /* @__PURE__ */ new TextEncoder();\n hexes4 = /* @__PURE__ */ Array.from({ length: 256 }, (_v, i3) => i3.toString(16).padStart(2, \"0\"));\n IntegerOutOfRangeError2 = class extends BaseError3 {\n constructor({ max, min, signed, size: size6, value }) {\n super(`Number \\`${value}\\` is not in safe${size6 ? ` ${size6 * 8}-bit` : \"\"}${signed ? \" signed\" : \" unsigned\"} integer range ${max ? `(\\`${min}\\` to \\`${max}\\`)` : `(above \\`${min}\\`)`}`);\n Object.defineProperty(this, \"name\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: \"Hex.IntegerOutOfRangeError\"\n });\n }\n };\n InvalidHexTypeError = class extends BaseError3 {\n constructor(value) {\n super(`Value \\`${typeof value === \"object\" ? stringify2(value) : value}\\` of type \\`${typeof value}\\` is an invalid hex type.`, {\n metaMessages: ['Hex types must be represented as `\"0x${string}\"`.']\n });\n Object.defineProperty(this, \"name\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: \"Hex.InvalidHexTypeError\"\n });\n }\n };\n InvalidHexValueError = class extends BaseError3 {\n constructor(value) {\n super(`Value \\`${value}\\` is an invalid hex value.`, {\n metaMessages: [\n 'Hex values must start with `\"0x\"` and contain only hexadecimal characters (0-9, a-f, A-F).'\n ]\n });\n Object.defineProperty(this, \"name\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: \"Hex.InvalidHexValueError\"\n });\n }\n };\n SizeOverflowError3 = class extends BaseError3 {\n constructor({ givenSize, maxSize }) {\n super(`Size cannot exceed \\`${maxSize}\\` bytes. Given size: \\`${givenSize}\\` bytes.`);\n Object.defineProperty(this, \"name\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: \"Hex.SizeOverflowError\"\n });\n }\n };\n SliceOffsetOutOfBoundsError3 = class extends BaseError3 {\n constructor({ offset, position, size: size6 }) {\n super(`Slice ${position === \"start\" ? \"starting\" : \"ending\"} at offset \\`${offset}\\` is out-of-bounds (size: \\`${size6}\\`).`);\n Object.defineProperty(this, \"name\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: \"Hex.SliceOffsetOutOfBoundsError\"\n });\n }\n };\n SizeExceedsPaddingSizeError3 = class extends BaseError3 {\n constructor({ size: size6, targetSize, type }) {\n super(`${type.charAt(0).toUpperCase()}${type.slice(1).toLowerCase()} size (\\`${size6}\\`) exceeds padding size (\\`${targetSize}\\`).`);\n Object.defineProperty(this, \"name\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: \"Hex.SizeExceedsPaddingSizeError\"\n });\n }\n };\n }\n });\n\n // ../../../node_modules/.pnpm/ox@0.9.6_typescript@5.8.3_zod@3.25.64/node_modules/ox/_esm/core/Withdrawal.js\n function toRpc(withdrawal) {\n return {\n address: withdrawal.address,\n amount: fromNumber(withdrawal.amount),\n index: fromNumber(withdrawal.index),\n validatorIndex: fromNumber(withdrawal.validatorIndex)\n };\n }\n var init_Withdrawal = __esm({\n \"../../../node_modules/.pnpm/ox@0.9.6_typescript@5.8.3_zod@3.25.64/node_modules/ox/_esm/core/Withdrawal.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_Hex();\n }\n });\n\n // ../../../node_modules/.pnpm/ox@0.9.6_typescript@5.8.3_zod@3.25.64/node_modules/ox/_esm/core/BlockOverrides.js\n function toRpc2(blockOverrides) {\n return {\n ...typeof blockOverrides.baseFeePerGas === \"bigint\" && {\n baseFeePerGas: fromNumber(blockOverrides.baseFeePerGas)\n },\n ...typeof blockOverrides.blobBaseFee === \"bigint\" && {\n blobBaseFee: fromNumber(blockOverrides.blobBaseFee)\n },\n ...typeof blockOverrides.feeRecipient === \"string\" && {\n feeRecipient: blockOverrides.feeRecipient\n },\n ...typeof blockOverrides.gasLimit === \"bigint\" && {\n gasLimit: fromNumber(blockOverrides.gasLimit)\n },\n ...typeof blockOverrides.number === \"bigint\" && {\n number: fromNumber(blockOverrides.number)\n },\n ...typeof blockOverrides.prevRandao === \"bigint\" && {\n prevRandao: fromNumber(blockOverrides.prevRandao)\n },\n ...typeof blockOverrides.time === \"bigint\" && {\n time: fromNumber(blockOverrides.time)\n },\n ...blockOverrides.withdrawals && {\n withdrawals: blockOverrides.withdrawals.map(toRpc)\n }\n };\n }\n var init_BlockOverrides = __esm({\n \"../../../node_modules/.pnpm/ox@0.9.6_typescript@5.8.3_zod@3.25.64/node_modules/ox/_esm/core/BlockOverrides.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_Hex();\n init_Withdrawal();\n }\n });\n\n // ../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/constants/abis.js\n var multicall3Abi, batchGatewayAbi, universalResolverErrors, universalResolverResolveAbi, universalResolverReverseAbi, textResolverAbi, addressResolverAbi, erc1271Abi, erc6492SignatureValidatorAbi;\n var init_abis = __esm({\n \"../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/constants/abis.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n multicall3Abi = [\n {\n inputs: [\n {\n components: [\n {\n name: \"target\",\n type: \"address\"\n },\n {\n name: \"allowFailure\",\n type: \"bool\"\n },\n {\n name: \"callData\",\n type: \"bytes\"\n }\n ],\n name: \"calls\",\n type: \"tuple[]\"\n }\n ],\n name: \"aggregate3\",\n outputs: [\n {\n components: [\n {\n name: \"success\",\n type: \"bool\"\n },\n {\n name: \"returnData\",\n type: \"bytes\"\n }\n ],\n name: \"returnData\",\n type: \"tuple[]\"\n }\n ],\n stateMutability: \"view\",\n type: \"function\"\n },\n {\n inputs: [],\n name: \"getCurrentBlockTimestamp\",\n outputs: [\n {\n internalType: \"uint256\",\n name: \"timestamp\",\n type: \"uint256\"\n }\n ],\n stateMutability: \"view\",\n type: \"function\"\n }\n ];\n batchGatewayAbi = [\n {\n name: \"query\",\n type: \"function\",\n stateMutability: \"view\",\n inputs: [\n {\n type: \"tuple[]\",\n name: \"queries\",\n components: [\n {\n type: \"address\",\n name: \"sender\"\n },\n {\n type: \"string[]\",\n name: \"urls\"\n },\n {\n type: \"bytes\",\n name: \"data\"\n }\n ]\n }\n ],\n outputs: [\n {\n type: \"bool[]\",\n name: \"failures\"\n },\n {\n type: \"bytes[]\",\n name: \"responses\"\n }\n ]\n },\n {\n name: \"HttpError\",\n type: \"error\",\n inputs: [\n {\n type: \"uint16\",\n name: \"status\"\n },\n {\n type: \"string\",\n name: \"message\"\n }\n ]\n }\n ];\n universalResolverErrors = [\n {\n inputs: [\n {\n name: \"dns\",\n type: \"bytes\"\n }\n ],\n name: \"DNSDecodingFailed\",\n type: \"error\"\n },\n {\n inputs: [\n {\n name: \"ens\",\n type: \"string\"\n }\n ],\n name: \"DNSEncodingFailed\",\n type: \"error\"\n },\n {\n inputs: [],\n name: \"EmptyAddress\",\n type: \"error\"\n },\n {\n inputs: [\n {\n name: \"status\",\n type: \"uint16\"\n },\n {\n name: \"message\",\n type: \"string\"\n }\n ],\n name: \"HttpError\",\n type: \"error\"\n },\n {\n inputs: [],\n name: \"InvalidBatchGatewayResponse\",\n type: \"error\"\n },\n {\n inputs: [\n {\n name: \"errorData\",\n type: \"bytes\"\n }\n ],\n name: \"ResolverError\",\n type: \"error\"\n },\n {\n inputs: [\n {\n name: \"name\",\n type: \"bytes\"\n },\n {\n name: \"resolver\",\n type: \"address\"\n }\n ],\n name: \"ResolverNotContract\",\n type: \"error\"\n },\n {\n inputs: [\n {\n name: \"name\",\n type: \"bytes\"\n }\n ],\n name: \"ResolverNotFound\",\n type: \"error\"\n },\n {\n inputs: [\n {\n name: \"primary\",\n type: \"string\"\n },\n {\n name: \"primaryAddress\",\n type: \"bytes\"\n }\n ],\n name: \"ReverseAddressMismatch\",\n type: \"error\"\n },\n {\n inputs: [\n {\n internalType: \"bytes4\",\n name: \"selector\",\n type: \"bytes4\"\n }\n ],\n name: \"UnsupportedResolverProfile\",\n type: \"error\"\n }\n ];\n universalResolverResolveAbi = [\n ...universalResolverErrors,\n {\n name: \"resolveWithGateways\",\n type: \"function\",\n stateMutability: \"view\",\n inputs: [\n { name: \"name\", type: \"bytes\" },\n { name: \"data\", type: \"bytes\" },\n { name: \"gateways\", type: \"string[]\" }\n ],\n outputs: [\n { name: \"\", type: \"bytes\" },\n { name: \"address\", type: \"address\" }\n ]\n }\n ];\n universalResolverReverseAbi = [\n ...universalResolverErrors,\n {\n name: \"reverseWithGateways\",\n type: \"function\",\n stateMutability: \"view\",\n inputs: [\n { type: \"bytes\", name: \"reverseName\" },\n { type: \"uint256\", name: \"coinType\" },\n { type: \"string[]\", name: \"gateways\" }\n ],\n outputs: [\n { type: \"string\", name: \"resolvedName\" },\n { type: \"address\", name: \"resolver\" },\n { type: \"address\", name: \"reverseResolver\" }\n ]\n }\n ];\n textResolverAbi = [\n {\n name: \"text\",\n type: \"function\",\n stateMutability: \"view\",\n inputs: [\n { name: \"name\", type: \"bytes32\" },\n { name: \"key\", type: \"string\" }\n ],\n outputs: [{ name: \"\", type: \"string\" }]\n }\n ];\n addressResolverAbi = [\n {\n name: \"addr\",\n type: \"function\",\n stateMutability: \"view\",\n inputs: [{ name: \"name\", type: \"bytes32\" }],\n outputs: [{ name: \"\", type: \"address\" }]\n },\n {\n name: \"addr\",\n type: \"function\",\n stateMutability: \"view\",\n inputs: [\n { name: \"name\", type: \"bytes32\" },\n { name: \"coinType\", type: \"uint256\" }\n ],\n outputs: [{ name: \"\", type: \"bytes\" }]\n }\n ];\n erc1271Abi = [\n {\n name: \"isValidSignature\",\n type: \"function\",\n stateMutability: \"view\",\n inputs: [\n { name: \"hash\", type: \"bytes32\" },\n { name: \"signature\", type: \"bytes\" }\n ],\n outputs: [{ name: \"\", type: \"bytes4\" }]\n }\n ];\n erc6492SignatureValidatorAbi = [\n {\n inputs: [\n {\n name: \"_signer\",\n type: \"address\"\n },\n {\n name: \"_hash\",\n type: \"bytes32\"\n },\n {\n name: \"_signature\",\n type: \"bytes\"\n }\n ],\n stateMutability: \"nonpayable\",\n type: \"constructor\"\n },\n {\n inputs: [\n {\n name: \"_signer\",\n type: \"address\"\n },\n {\n name: \"_hash\",\n type: \"bytes32\"\n },\n {\n name: \"_signature\",\n type: \"bytes\"\n }\n ],\n outputs: [\n {\n type: \"bool\"\n }\n ],\n stateMutability: \"nonpayable\",\n type: \"function\",\n name: \"isValidSig\"\n }\n ];\n }\n });\n\n // ../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/constants/contract.js\n var aggregate3Signature;\n var init_contract2 = __esm({\n \"../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/constants/contract.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n aggregate3Signature = \"0x82ad56cb\";\n }\n });\n\n // ../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/constants/contracts.js\n var deploylessCallViaBytecodeBytecode, deploylessCallViaFactoryBytecode, erc6492SignatureValidatorByteCode, multicall3Bytecode;\n var init_contracts = __esm({\n \"../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/constants/contracts.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n deploylessCallViaBytecodeBytecode = \"0x608060405234801561001057600080fd5b5060405161018e38038061018e83398101604081905261002f91610124565b6000808351602085016000f59050803b61004857600080fd5b6000808351602085016000855af16040513d6000823e81610067573d81fd5b3d81f35b634e487b7160e01b600052604160045260246000fd5b600082601f83011261009257600080fd5b81516001600160401b038111156100ab576100ab61006b565b604051601f8201601f19908116603f011681016001600160401b03811182821017156100d9576100d961006b565b6040528181528382016020018510156100f157600080fd5b60005b82811015610110576020818601810151838301820152016100f4565b506000918101602001919091529392505050565b6000806040838503121561013757600080fd5b82516001600160401b0381111561014d57600080fd5b61015985828601610081565b602085015190935090506001600160401b0381111561017757600080fd5b61018385828601610081565b915050925092905056fe\";\n deploylessCallViaFactoryBytecode = \"0x608060405234801561001057600080fd5b506040516102c03803806102c083398101604081905261002f916101e6565b836001600160a01b03163b6000036100e457600080836001600160a01b03168360405161005c9190610270565b6000604051808303816000865af19150503d8060008114610099576040519150601f19603f3d011682016040523d82523d6000602084013e61009e565b606091505b50915091508115806100b857506001600160a01b0386163b155b156100e1578060405163101bb98d60e01b81526004016100d8919061028c565b60405180910390fd5b50505b6000808451602086016000885af16040513d6000823e81610103573d81fd5b3d81f35b80516001600160a01b038116811461011e57600080fd5b919050565b634e487b7160e01b600052604160045260246000fd5b60005b8381101561015457818101518382015260200161013c565b50506000910152565b600082601f83011261016e57600080fd5b81516001600160401b0381111561018757610187610123565b604051601f8201601f19908116603f011681016001600160401b03811182821017156101b5576101b5610123565b6040528181528382016020018510156101cd57600080fd5b6101de826020830160208701610139565b949350505050565b600080600080608085870312156101fc57600080fd5b61020585610107565b60208601519094506001600160401b0381111561022157600080fd5b61022d8782880161015d565b93505061023c60408601610107565b60608601519092506001600160401b0381111561025857600080fd5b6102648782880161015d565b91505092959194509250565b60008251610282818460208701610139565b9190910192915050565b60208152600082518060208401526102ab816040850160208701610139565b601f01601f1916919091016040019291505056fe\";\n erc6492SignatureValidatorByteCode = \"0x608060405234801561001057600080fd5b5060405161069438038061069483398101604081905261002f9161051e565b600061003c848484610048565b9050806000526001601ff35b60007f64926492649264926492649264926492649264926492649264926492649264926100748361040c565b036101e7576000606080848060200190518101906100929190610577565b60405192955090935091506000906001600160a01b038516906100b69085906105dd565b6000604051808303816000865af19150503d80600081146100f3576040519150601f19603f3d011682016040523d82523d6000602084013e6100f8565b606091505b50509050876001600160a01b03163b60000361016057806101605760405162461bcd60e51b815260206004820152601e60248201527f5369676e617475726556616c696461746f723a206465706c6f796d656e74000060448201526064015b60405180910390fd5b604051630b135d3f60e11b808252906001600160a01b038a1690631626ba7e90610190908b9087906004016105f9565b602060405180830381865afa1580156101ad573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906101d19190610633565b6001600160e01b03191614945050505050610405565b6001600160a01b0384163b1561027a57604051630b135d3f60e11b808252906001600160a01b03861690631626ba7e9061022790879087906004016105f9565b602060405180830381865afa158015610244573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906102689190610633565b6001600160e01b031916149050610405565b81516041146102df5760405162461bcd60e51b815260206004820152603a602482015260008051602061067483398151915260448201527f3a20696e76616c6964207369676e6174757265206c656e6774680000000000006064820152608401610157565b6102e7610425565b5060208201516040808401518451859392600091859190811061030c5761030c61065d565b016020015160f81c9050601b811480159061032b57508060ff16601c14155b1561038c5760405162461bcd60e51b815260206004820152603b602482015260008051602061067483398151915260448201527f3a20696e76616c6964207369676e617475726520762076616c756500000000006064820152608401610157565b60408051600081526020810180835289905260ff83169181019190915260608101849052608081018390526001600160a01b0389169060019060a0016020604051602081039080840390855afa1580156103ea573d6000803e3d6000fd5b505050602060405103516001600160a01b0316149450505050505b9392505050565b600060208251101561041d57600080fd5b508051015190565b60405180606001604052806003906020820280368337509192915050565b6001600160a01b038116811461045857600080fd5b50565b634e487b7160e01b600052604160045260246000fd5b60005b8381101561048c578181015183820152602001610474565b50506000910152565b600082601f8301126104a657600080fd5b81516001600160401b038111156104bf576104bf61045b565b604051601f8201601f19908116603f011681016001600160401b03811182821017156104ed576104ed61045b565b60405281815283820160200185101561050557600080fd5b610516826020830160208701610471565b949350505050565b60008060006060848603121561053357600080fd5b835161053e81610443565b6020850151604086015191945092506001600160401b0381111561056157600080fd5b61056d86828701610495565b9150509250925092565b60008060006060848603121561058c57600080fd5b835161059781610443565b60208501519093506001600160401b038111156105b357600080fd5b6105bf86828701610495565b604086015190935090506001600160401b0381111561056157600080fd5b600082516105ef818460208701610471565b9190910192915050565b828152604060208201526000825180604084015261061e816060850160208701610471565b601f01601f1916919091016060019392505050565b60006020828403121561064557600080fd5b81516001600160e01b03198116811461040557600080fd5b634e487b7160e01b600052603260045260246000fdfe5369676e617475726556616c696461746f72237265636f7665725369676e6572\";\n multicall3Bytecode = \"0x608060405234801561001057600080fd5b506115b9806100206000396000f3fe6080604052600436106100f35760003560e01c80634d2301cc1161008a578063a8b0574e11610059578063a8b0574e14610325578063bce38bd714610350578063c3077fa914610380578063ee82ac5e146103b2576100f3565b80634d2301cc1461026257806372425d9d1461029f57806382ad56cb146102ca57806386d516e8146102fa576100f3565b80633408e470116100c65780633408e470146101af578063399542e9146101da5780633e64a6961461020c57806342cbb15c14610237576100f3565b80630f28c97d146100f8578063174dea7114610123578063252dba421461015357806327e86d6e14610184575b600080fd5b34801561010457600080fd5b5061010d6103ef565b60405161011a9190610c0a565b60405180910390f35b61013d60048036038101906101389190610c94565b6103f7565b60405161014a9190610e94565b60405180910390f35b61016d60048036038101906101689190610f0c565b610615565b60405161017b92919061101b565b60405180910390f35b34801561019057600080fd5b506101996107ab565b6040516101a69190611064565b60405180910390f35b3480156101bb57600080fd5b506101c46107b7565b6040516101d19190610c0a565b60405180910390f35b6101f460048036038101906101ef91906110ab565b6107bf565b6040516102039392919061110b565b60405180910390f35b34801561021857600080fd5b506102216107e1565b60405161022e9190610c0a565b60405180910390f35b34801561024357600080fd5b5061024c6107e9565b6040516102599190610c0a565b60405180910390f35b34801561026e57600080fd5b50610289600480360381019061028491906111a7565b6107f1565b6040516102969190610c0a565b60405180910390f35b3480156102ab57600080fd5b506102b4610812565b6040516102c19190610c0a565b60405180910390f35b6102e460048036038101906102df919061122a565b61081a565b6040516102f19190610e94565b60405180910390f35b34801561030657600080fd5b5061030f6109e4565b60405161031c9190610c0a565b60405180910390f35b34801561033157600080fd5b5061033a6109ec565b6040516103479190611286565b60405180910390f35b61036a600480360381019061036591906110ab565b6109f4565b6040516103779190610e94565b60405180910390f35b61039a60048036038101906103959190610f0c565b610ba6565b6040516103a99392919061110b565b60405180910390f35b3480156103be57600080fd5b506103d960048036038101906103d491906112cd565b610bca565b6040516103e69190611064565b60405180910390f35b600042905090565b60606000808484905090508067ffffffffffffffff81111561041c5761041b6112fa565b5b60405190808252806020026020018201604052801561045557816020015b610442610bd5565b81526020019060019003908161043a5790505b5092503660005b828110156105c957600085828151811061047957610478611329565b5b6020026020010151905087878381811061049657610495611329565b5b90506020028101906104a89190611367565b925060008360400135905080860195508360000160208101906104cb91906111a7565b73ffffffffffffffffffffffffffffffffffffffff16818580606001906104f2919061138f565b604051610500929190611431565b60006040518083038185875af1925050503d806000811461053d576040519150601f19603f3d011682016040523d82523d6000602084013e610542565b606091505b5083600001846020018290528215151515815250505081516020850135176105bc577f08c379a000000000000000000000000000000000000000000000000000000000600052602060045260176024527f4d756c746963616c6c333a2063616c6c206661696c656400000000000000000060445260846000fd5b826001019250505061045c565b5082341461060c576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610603906114a7565b60405180910390fd5b50505092915050565b6000606043915060008484905090508067ffffffffffffffff81111561063e5761063d6112fa565b5b60405190808252806020026020018201604052801561067157816020015b606081526020019060019003908161065c5790505b5091503660005b828110156107a157600087878381811061069557610694611329565b5b90506020028101906106a791906114c7565b92508260000160208101906106bc91906111a7565b73ffffffffffffffffffffffffffffffffffffffff168380602001906106e2919061138f565b6040516106f0929190611431565b6000604051808303816000865af19150503d806000811461072d576040519150601f19603f3d011682016040523d82523d6000602084013e610732565b606091505b5086848151811061074657610745611329565b5b60200260200101819052819250505080610795576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161078c9061153b565b60405180910390fd5b81600101915050610678565b5050509250929050565b60006001430340905090565b600046905090565b6000806060439250434091506107d68686866109f4565b905093509350939050565b600048905090565b600043905090565b60008173ffffffffffffffffffffffffffffffffffffffff16319050919050565b600044905090565b606060008383905090508067ffffffffffffffff81111561083e5761083d6112fa565b5b60405190808252806020026020018201604052801561087757816020015b610864610bd5565b81526020019060019003908161085c5790505b5091503660005b828110156109db57600084828151811061089b5761089a611329565b5b602002602001015190508686838181106108b8576108b7611329565b5b90506020028101906108ca919061155b565b92508260000160208101906108df91906111a7565b73ffffffffffffffffffffffffffffffffffffffff16838060400190610905919061138f565b604051610913929190611431565b6000604051808303816000865af19150503d8060008114610950576040519150601f19603f3d011682016040523d82523d6000602084013e610955565b606091505b5082600001836020018290528215151515815250505080516020840135176109cf577f08c379a000000000000000000000000000000000000000000000000000000000600052602060045260176024527f4d756c746963616c6c333a2063616c6c206661696c656400000000000000000060445260646000fd5b8160010191505061087e565b50505092915050565b600045905090565b600041905090565b606060008383905090508067ffffffffffffffff811115610a1857610a176112fa565b5b604051908082528060200260200182016040528015610a5157816020015b610a3e610bd5565b815260200190600190039081610a365790505b5091503660005b82811015610b9c576000848281518110610a7557610a74611329565b5b60200260200101519050868683818110610a9257610a91611329565b5b9050602002810190610aa491906114c7565b9250826000016020810190610ab991906111a7565b73ffffffffffffffffffffffffffffffffffffffff16838060200190610adf919061138f565b604051610aed929190611431565b6000604051808303816000865af19150503d8060008114610b2a576040519150601f19603f3d011682016040523d82523d6000602084013e610b2f565b606091505b508260000183602001829052821515151581525050508715610b90578060000151610b8f576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610b869061153b565b60405180910390fd5b5b81600101915050610a58565b5050509392505050565b6000806060610bb7600186866107bf565b8093508194508295505050509250925092565b600081409050919050565b6040518060400160405280600015158152602001606081525090565b6000819050919050565b610c0481610bf1565b82525050565b6000602082019050610c1f6000830184610bfb565b92915050565b600080fd5b600080fd5b600080fd5b600080fd5b600080fd5b60008083601f840112610c5457610c53610c2f565b5b8235905067ffffffffffffffff811115610c7157610c70610c34565b5b602083019150836020820283011115610c8d57610c8c610c39565b5b9250929050565b60008060208385031215610cab57610caa610c25565b5b600083013567ffffffffffffffff811115610cc957610cc8610c2a565b5b610cd585828601610c3e565b92509250509250929050565b600081519050919050565b600082825260208201905092915050565b6000819050602082019050919050565b60008115159050919050565b610d2281610d0d565b82525050565b600081519050919050565b600082825260208201905092915050565b60005b83811015610d62578082015181840152602081019050610d47565b83811115610d71576000848401525b50505050565b6000601f19601f8301169050919050565b6000610d9382610d28565b610d9d8185610d33565b9350610dad818560208601610d44565b610db681610d77565b840191505092915050565b6000604083016000830151610dd96000860182610d19565b5060208301518482036020860152610df18282610d88565b9150508091505092915050565b6000610e0a8383610dc1565b905092915050565b6000602082019050919050565b6000610e2a82610ce1565b610e348185610cec565b935083602082028501610e4685610cfd565b8060005b85811015610e825784840389528151610e638582610dfe565b9450610e6e83610e12565b925060208a01995050600181019050610e4a565b50829750879550505050505092915050565b60006020820190508181036000830152610eae8184610e1f565b905092915050565b60008083601f840112610ecc57610ecb610c2f565b5b8235905067ffffffffffffffff811115610ee957610ee8610c34565b5b602083019150836020820283011115610f0557610f04610c39565b5b9250929050565b60008060208385031215610f2357610f22610c25565b5b600083013567ffffffffffffffff811115610f4157610f40610c2a565b5b610f4d85828601610eb6565b92509250509250929050565b600081519050919050565b600082825260208201905092915050565b6000819050602082019050919050565b6000610f918383610d88565b905092915050565b6000602082019050919050565b6000610fb182610f59565b610fbb8185610f64565b935083602082028501610fcd85610f75565b8060005b858110156110095784840389528151610fea8582610f85565b9450610ff583610f99565b925060208a01995050600181019050610fd1565b50829750879550505050505092915050565b60006040820190506110306000830185610bfb565b81810360208301526110428184610fa6565b90509392505050565b6000819050919050565b61105e8161104b565b82525050565b60006020820190506110796000830184611055565b92915050565b61108881610d0d565b811461109357600080fd5b50565b6000813590506110a58161107f565b92915050565b6000806000604084860312156110c4576110c3610c25565b5b60006110d286828701611096565b935050602084013567ffffffffffffffff8111156110f3576110f2610c2a565b5b6110ff86828701610eb6565b92509250509250925092565b60006060820190506111206000830186610bfb565b61112d6020830185611055565b818103604083015261113f8184610e1f565b9050949350505050565b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b600061117482611149565b9050919050565b61118481611169565b811461118f57600080fd5b50565b6000813590506111a18161117b565b92915050565b6000602082840312156111bd576111bc610c25565b5b60006111cb84828501611192565b91505092915050565b60008083601f8401126111ea576111e9610c2f565b5b8235905067ffffffffffffffff81111561120757611206610c34565b5b60208301915083602082028301111561122357611222610c39565b5b9250929050565b6000806020838503121561124157611240610c25565b5b600083013567ffffffffffffffff81111561125f5761125e610c2a565b5b61126b858286016111d4565b92509250509250929050565b61128081611169565b82525050565b600060208201905061129b6000830184611277565b92915050565b6112aa81610bf1565b81146112b557600080fd5b50565b6000813590506112c7816112a1565b92915050565b6000602082840312156112e3576112e2610c25565b5b60006112f1848285016112b8565b91505092915050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b600080fd5b600080fd5b600080fd5b60008235600160800383360303811261138357611382611358565b5b80830191505092915050565b600080833560016020038436030381126113ac576113ab611358565b5b80840192508235915067ffffffffffffffff8211156113ce576113cd61135d565b5b6020830192506001820236038313156113ea576113e9611362565b5b509250929050565b600081905092915050565b82818337600083830152505050565b600061141883856113f2565b93506114258385846113fd565b82840190509392505050565b600061143e82848661140c565b91508190509392505050565b600082825260208201905092915050565b7f4d756c746963616c6c333a2076616c7565206d69736d61746368000000000000600082015250565b6000611491601a8361144a565b915061149c8261145b565b602082019050919050565b600060208201905081810360008301526114c081611484565b9050919050565b6000823560016040038336030381126114e3576114e2611358565b5b80830191505092915050565b7f4d756c746963616c6c333a2063616c6c206661696c6564000000000000000000600082015250565b600061152560178361144a565b9150611530826114ef565b602082019050919050565b6000602082019050818103600083015261155481611518565b9050919050565b60008235600160600383360303811261157757611576611358565b5b8083019150509291505056fea264697066735822122020c1bc9aacf8e4a6507193432a895a8e77094f45a1395583f07b24e860ef06cd64736f6c634300080c0033\";\n }\n });\n\n // ../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/errors/chain.js\n var ChainDoesNotSupportContract, ChainMismatchError, ChainNotFoundError, ClientChainNotConfiguredError, InvalidChainIdError;\n var init_chain = __esm({\n \"../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/errors/chain.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_base();\n ChainDoesNotSupportContract = class extends BaseError2 {\n constructor({ blockNumber, chain: chain2, contract }) {\n super(`Chain \"${chain2.name}\" does not support contract \"${contract.name}\".`, {\n metaMessages: [\n \"This could be due to any of the following:\",\n ...blockNumber && contract.blockCreated && contract.blockCreated > blockNumber ? [\n `- The contract \"${contract.name}\" was not deployed until block ${contract.blockCreated} (current block ${blockNumber}).`\n ] : [\n `- The chain does not have the contract \"${contract.name}\" configured.`\n ]\n ],\n name: \"ChainDoesNotSupportContract\"\n });\n }\n };\n ChainMismatchError = class extends BaseError2 {\n constructor({ chain: chain2, currentChainId }) {\n super(`The current chain of the wallet (id: ${currentChainId}) does not match the target chain for the transaction (id: ${chain2.id} \\u2013 ${chain2.name}).`, {\n metaMessages: [\n `Current Chain ID: ${currentChainId}`,\n `Expected Chain ID: ${chain2.id} \\u2013 ${chain2.name}`\n ],\n name: \"ChainMismatchError\"\n });\n }\n };\n ChainNotFoundError = class extends BaseError2 {\n constructor() {\n super([\n \"No chain was provided to the request.\",\n \"Please provide a chain with the `chain` argument on the Action, or by supplying a `chain` to WalletClient.\"\n ].join(\"\\n\"), {\n name: \"ChainNotFoundError\"\n });\n }\n };\n ClientChainNotConfiguredError = class extends BaseError2 {\n constructor() {\n super(\"No chain was provided to the Client.\", {\n name: \"ClientChainNotConfiguredError\"\n });\n }\n };\n InvalidChainIdError = class extends BaseError2 {\n constructor({ chainId }) {\n super(typeof chainId === \"number\" ? `Chain ID \"${chainId}\" is invalid.` : \"Chain ID is invalid.\", { name: \"InvalidChainIdError\" });\n }\n };\n }\n });\n\n // ../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/utils/abi/encodeDeployData.js\n function encodeDeployData(parameters) {\n const { abi: abi2, args, bytecode } = parameters;\n if (!args || args.length === 0)\n return bytecode;\n const description2 = abi2.find((x4) => \"type\" in x4 && x4.type === \"constructor\");\n if (!description2)\n throw new AbiConstructorNotFoundError({ docsPath: docsPath5 });\n if (!(\"inputs\" in description2))\n throw new AbiConstructorParamsNotFoundError({ docsPath: docsPath5 });\n if (!description2.inputs || description2.inputs.length === 0)\n throw new AbiConstructorParamsNotFoundError({ docsPath: docsPath5 });\n const data = encodeAbiParameters(description2.inputs, args);\n return concatHex([bytecode, data]);\n }\n var docsPath5;\n var init_encodeDeployData = __esm({\n \"../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/utils/abi/encodeDeployData.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_abi();\n init_concat();\n init_encodeAbiParameters();\n docsPath5 = \"/docs/contract/encodeDeployData\";\n }\n });\n\n // ../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/utils/chain/getChainContractAddress.js\n function getChainContractAddress({ blockNumber, chain: chain2, contract: name }) {\n const contract = chain2?.contracts?.[name];\n if (!contract)\n throw new ChainDoesNotSupportContract({\n chain: chain2,\n contract: { name }\n });\n if (blockNumber && contract.blockCreated && contract.blockCreated > blockNumber)\n throw new ChainDoesNotSupportContract({\n blockNumber,\n chain: chain2,\n contract: {\n name,\n blockCreated: contract.blockCreated\n }\n });\n return contract.address;\n }\n var init_getChainContractAddress = __esm({\n \"../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/utils/chain/getChainContractAddress.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_chain();\n }\n });\n\n // ../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/utils/errors/getCallError.js\n function getCallError(err, { docsPath: docsPath8, ...args }) {\n const cause = (() => {\n const cause2 = getNodeError(err, args);\n if (cause2 instanceof UnknownNodeError)\n return err;\n return cause2;\n })();\n return new CallExecutionError(cause, {\n docsPath: docsPath8,\n ...args\n });\n }\n var init_getCallError = __esm({\n \"../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/utils/errors/getCallError.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_contract();\n init_node();\n init_getNodeError();\n }\n });\n\n // ../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/utils/promise/withResolvers.js\n function withResolvers() {\n let resolve = () => void 0;\n let reject = () => void 0;\n const promise = new Promise((resolve_, reject_) => {\n resolve = resolve_;\n reject = reject_;\n });\n return { promise, resolve, reject };\n }\n var init_withResolvers = __esm({\n \"../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/utils/promise/withResolvers.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n }\n });\n\n // ../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/utils/promise/createBatchScheduler.js\n function createBatchScheduler({ fn, id, shouldSplitBatch, wait: wait2 = 0, sort }) {\n const exec = async () => {\n const scheduler = getScheduler();\n flush();\n const args = scheduler.map(({ args: args2 }) => args2);\n if (args.length === 0)\n return;\n fn(args).then((data) => {\n if (sort && Array.isArray(data))\n data.sort(sort);\n for (let i3 = 0; i3 < scheduler.length; i3++) {\n const { resolve } = scheduler[i3];\n resolve?.([data[i3], data]);\n }\n }).catch((err) => {\n for (let i3 = 0; i3 < scheduler.length; i3++) {\n const { reject } = scheduler[i3];\n reject?.(err);\n }\n });\n };\n const flush = () => schedulerCache.delete(id);\n const getBatchedArgs = () => getScheduler().map(({ args }) => args);\n const getScheduler = () => schedulerCache.get(id) || [];\n const setScheduler = (item) => schedulerCache.set(id, [...getScheduler(), item]);\n return {\n flush,\n async schedule(args) {\n const { promise, resolve, reject } = withResolvers();\n const split4 = shouldSplitBatch?.([...getBatchedArgs(), args]);\n if (split4)\n exec();\n const hasActiveScheduler = getScheduler().length > 0;\n if (hasActiveScheduler) {\n setScheduler({ args, resolve, reject });\n return promise;\n }\n setScheduler({ args, resolve, reject });\n setTimeout(exec, wait2);\n return promise;\n }\n };\n }\n var schedulerCache;\n var init_createBatchScheduler = __esm({\n \"../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/utils/promise/createBatchScheduler.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_withResolvers();\n schedulerCache = /* @__PURE__ */ new Map();\n }\n });\n\n // ../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/errors/ccip.js\n var OffchainLookupError, OffchainLookupResponseMalformedError, OffchainLookupSenderMismatchError;\n var init_ccip = __esm({\n \"../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/errors/ccip.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_stringify();\n init_base();\n init_utils4();\n OffchainLookupError = class extends BaseError2 {\n constructor({ callbackSelector, cause, data, extraData, sender, urls }) {\n super(cause.shortMessage || \"An error occurred while fetching for an offchain result.\", {\n cause,\n metaMessages: [\n ...cause.metaMessages || [],\n cause.metaMessages?.length ? \"\" : [],\n \"Offchain Gateway Call:\",\n urls && [\n \" Gateway URL(s):\",\n ...urls.map((url) => ` ${getUrl(url)}`)\n ],\n ` Sender: ${sender}`,\n ` Data: ${data}`,\n ` Callback selector: ${callbackSelector}`,\n ` Extra data: ${extraData}`\n ].flat(),\n name: \"OffchainLookupError\"\n });\n }\n };\n OffchainLookupResponseMalformedError = class extends BaseError2 {\n constructor({ result, url }) {\n super(\"Offchain gateway response is malformed. Response data must be a hex value.\", {\n metaMessages: [\n `Gateway URL: ${getUrl(url)}`,\n `Response: ${stringify(result)}`\n ],\n name: \"OffchainLookupResponseMalformedError\"\n });\n }\n };\n OffchainLookupSenderMismatchError = class extends BaseError2 {\n constructor({ sender, to }) {\n super(\"Reverted sender address does not match target contract address (`to`).\", {\n metaMessages: [\n `Contract address: ${to}`,\n `OffchainLookup sender address: ${sender}`\n ],\n name: \"OffchainLookupSenderMismatchError\"\n });\n }\n };\n }\n });\n\n // ../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/utils/abi/decodeFunctionData.js\n function decodeFunctionData(parameters) {\n const { abi: abi2, data } = parameters;\n const signature = slice(data, 0, 4);\n const description2 = abi2.find((x4) => x4.type === \"function\" && signature === toFunctionSelector(formatAbiItem2(x4)));\n if (!description2)\n throw new AbiFunctionSignatureNotFoundError(signature, {\n docsPath: \"/docs/contract/decodeFunctionData\"\n });\n return {\n functionName: description2.name,\n args: \"inputs\" in description2 && description2.inputs && description2.inputs.length > 0 ? decodeAbiParameters(description2.inputs, slice(data, 4)) : void 0\n };\n }\n var init_decodeFunctionData = __esm({\n \"../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/utils/abi/decodeFunctionData.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_abi();\n init_slice();\n init_toFunctionSelector();\n init_decodeAbiParameters();\n init_formatAbiItem2();\n }\n });\n\n // ../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/utils/abi/encodeErrorResult.js\n function encodeErrorResult(parameters) {\n const { abi: abi2, errorName, args } = parameters;\n let abiItem = abi2[0];\n if (errorName) {\n const item = getAbiItem({ abi: abi2, args, name: errorName });\n if (!item)\n throw new AbiErrorNotFoundError(errorName, { docsPath: docsPath6 });\n abiItem = item;\n }\n if (abiItem.type !== \"error\")\n throw new AbiErrorNotFoundError(void 0, { docsPath: docsPath6 });\n const definition = formatAbiItem2(abiItem);\n const signature = toFunctionSelector(definition);\n let data = \"0x\";\n if (args && args.length > 0) {\n if (!abiItem.inputs)\n throw new AbiErrorInputsNotFoundError(abiItem.name, { docsPath: docsPath6 });\n data = encodeAbiParameters(abiItem.inputs, args);\n }\n return concatHex([signature, data]);\n }\n var docsPath6;\n var init_encodeErrorResult = __esm({\n \"../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/utils/abi/encodeErrorResult.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_abi();\n init_concat();\n init_toFunctionSelector();\n init_encodeAbiParameters();\n init_formatAbiItem2();\n init_getAbiItem();\n docsPath6 = \"/docs/contract/encodeErrorResult\";\n }\n });\n\n // ../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/utils/abi/encodeFunctionResult.js\n function encodeFunctionResult(parameters) {\n const { abi: abi2, functionName, result } = parameters;\n let abiItem = abi2[0];\n if (functionName) {\n const item = getAbiItem({ abi: abi2, name: functionName });\n if (!item)\n throw new AbiFunctionNotFoundError(functionName, { docsPath: docsPath7 });\n abiItem = item;\n }\n if (abiItem.type !== \"function\")\n throw new AbiFunctionNotFoundError(void 0, { docsPath: docsPath7 });\n if (!abiItem.outputs)\n throw new AbiFunctionOutputsNotFoundError(abiItem.name, { docsPath: docsPath7 });\n const values = (() => {\n if (abiItem.outputs.length === 0)\n return [];\n if (abiItem.outputs.length === 1)\n return [result];\n if (Array.isArray(result))\n return result;\n throw new InvalidArrayError(result);\n })();\n return encodeAbiParameters(abiItem.outputs, values);\n }\n var docsPath7;\n var init_encodeFunctionResult = __esm({\n \"../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/utils/abi/encodeFunctionResult.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_abi();\n init_encodeAbiParameters();\n init_getAbiItem();\n docsPath7 = \"/docs/contract/encodeFunctionResult\";\n }\n });\n\n // ../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/utils/ens/localBatchGatewayRequest.js\n async function localBatchGatewayRequest(parameters) {\n const { data, ccipRequest: ccipRequest2 } = parameters;\n const { args: [queries] } = decodeFunctionData({ abi: batchGatewayAbi, data });\n const failures = [];\n const responses = [];\n await Promise.all(queries.map(async (query, i3) => {\n try {\n responses[i3] = query.urls.includes(localBatchGatewayUrl) ? await localBatchGatewayRequest({ data: query.data, ccipRequest: ccipRequest2 }) : await ccipRequest2(query);\n failures[i3] = false;\n } catch (err) {\n failures[i3] = true;\n responses[i3] = encodeError(err);\n }\n }));\n return encodeFunctionResult({\n abi: batchGatewayAbi,\n functionName: \"query\",\n result: [failures, responses]\n });\n }\n function encodeError(error) {\n if (error.name === \"HttpRequestError\" && error.status)\n return encodeErrorResult({\n abi: batchGatewayAbi,\n errorName: \"HttpError\",\n args: [error.status, error.shortMessage]\n });\n return encodeErrorResult({\n abi: [solidityError],\n errorName: \"Error\",\n args: [\"shortMessage\" in error ? error.shortMessage : error.message]\n });\n }\n var localBatchGatewayUrl;\n var init_localBatchGatewayRequest = __esm({\n \"../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/utils/ens/localBatchGatewayRequest.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_abis();\n init_solidity();\n init_decodeFunctionData();\n init_encodeErrorResult();\n init_encodeFunctionResult();\n localBatchGatewayUrl = \"x-batch-gateway:true\";\n }\n });\n\n // ../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/utils/ccip.js\n var ccip_exports = {};\n __export(ccip_exports, {\n ccipRequest: () => ccipRequest,\n offchainLookup: () => offchainLookup,\n offchainLookupAbiItem: () => offchainLookupAbiItem,\n offchainLookupSignature: () => offchainLookupSignature\n });\n async function offchainLookup(client, { blockNumber, blockTag, data, to }) {\n const { args } = decodeErrorResult({\n data,\n abi: [offchainLookupAbiItem]\n });\n const [sender, urls, callData, callbackSelector, extraData] = args;\n const { ccipRead } = client;\n const ccipRequest_ = ccipRead && typeof ccipRead?.request === \"function\" ? ccipRead.request : ccipRequest;\n try {\n if (!isAddressEqual(to, sender))\n throw new OffchainLookupSenderMismatchError({ sender, to });\n const result = urls.includes(localBatchGatewayUrl) ? await localBatchGatewayRequest({\n data: callData,\n ccipRequest: ccipRequest_\n }) : await ccipRequest_({ data: callData, sender, urls });\n const { data: data_ } = await call(client, {\n blockNumber,\n blockTag,\n data: concat([\n callbackSelector,\n encodeAbiParameters([{ type: \"bytes\" }, { type: \"bytes\" }], [result, extraData])\n ]),\n to\n });\n return data_;\n } catch (err) {\n throw new OffchainLookupError({\n callbackSelector,\n cause: err,\n data,\n extraData,\n sender,\n urls\n });\n }\n }\n async function ccipRequest({ data, sender, urls }) {\n let error = new Error(\"An unknown error occurred.\");\n for (let i3 = 0; i3 < urls.length; i3++) {\n const url = urls[i3];\n const method = url.includes(\"{data}\") ? \"GET\" : \"POST\";\n const body = method === \"POST\" ? { data, sender } : void 0;\n const headers = method === \"POST\" ? { \"Content-Type\": \"application/json\" } : {};\n try {\n const response = await fetch(url.replace(\"{sender}\", sender.toLowerCase()).replace(\"{data}\", data), {\n body: JSON.stringify(body),\n headers,\n method\n });\n let result;\n if (response.headers.get(\"Content-Type\")?.startsWith(\"application/json\")) {\n result = (await response.json()).data;\n } else {\n result = await response.text();\n }\n if (!response.ok) {\n error = new HttpRequestError({\n body,\n details: result?.error ? stringify(result.error) : response.statusText,\n headers: response.headers,\n status: response.status,\n url\n });\n continue;\n }\n if (!isHex(result)) {\n error = new OffchainLookupResponseMalformedError({\n result,\n url\n });\n continue;\n }\n return result;\n } catch (err) {\n error = new HttpRequestError({\n body,\n details: err.message,\n url\n });\n }\n }\n throw error;\n }\n var offchainLookupSignature, offchainLookupAbiItem;\n var init_ccip2 = __esm({\n \"../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/utils/ccip.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_call();\n init_ccip();\n init_request();\n init_decodeErrorResult();\n init_encodeAbiParameters();\n init_isAddressEqual();\n init_concat();\n init_isHex();\n init_localBatchGatewayRequest();\n init_stringify();\n offchainLookupSignature = \"0x556f1830\";\n offchainLookupAbiItem = {\n name: \"OffchainLookup\",\n type: \"error\",\n inputs: [\n {\n name: \"sender\",\n type: \"address\"\n },\n {\n name: \"urls\",\n type: \"string[]\"\n },\n {\n name: \"callData\",\n type: \"bytes\"\n },\n {\n name: \"callbackFunction\",\n type: \"bytes4\"\n },\n {\n name: \"extraData\",\n type: \"bytes\"\n }\n ]\n };\n }\n });\n\n // ../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/actions/public/call.js\n async function call(client, args) {\n const { account: account_ = client.account, authorizationList, batch = Boolean(client.batch?.multicall), blockNumber, blockTag = client.experimental_blockTag ?? \"latest\", accessList, blobs, blockOverrides, code, data: data_, factory, factoryData, gas, gasPrice, maxFeePerBlobGas, maxFeePerGas, maxPriorityFeePerGas, nonce, to, value, stateOverride, ...rest } = args;\n const account = account_ ? parseAccount(account_) : void 0;\n if (code && (factory || factoryData))\n throw new BaseError2(\"Cannot provide both `code` & `factory`/`factoryData` as parameters.\");\n if (code && to)\n throw new BaseError2(\"Cannot provide both `code` & `to` as parameters.\");\n const deploylessCallViaBytecode = code && data_;\n const deploylessCallViaFactory = factory && factoryData && to && data_;\n const deploylessCall = deploylessCallViaBytecode || deploylessCallViaFactory;\n const data = (() => {\n if (deploylessCallViaBytecode)\n return toDeploylessCallViaBytecodeData({\n code,\n data: data_\n });\n if (deploylessCallViaFactory)\n return toDeploylessCallViaFactoryData({\n data: data_,\n factory,\n factoryData,\n to\n });\n return data_;\n })();\n try {\n assertRequest(args);\n const blockNumberHex = typeof blockNumber === \"bigint\" ? numberToHex(blockNumber) : void 0;\n const block = blockNumberHex || blockTag;\n const rpcBlockOverrides = blockOverrides ? toRpc2(blockOverrides) : void 0;\n const rpcStateOverride = serializeStateOverride(stateOverride);\n const chainFormat = client.chain?.formatters?.transactionRequest?.format;\n const format = chainFormat || formatTransactionRequest;\n const request = format({\n // Pick out extra data that might exist on the chain's transaction request type.\n ...extract(rest, { format: chainFormat }),\n accessList,\n account,\n authorizationList,\n blobs,\n data,\n gas,\n gasPrice,\n maxFeePerBlobGas,\n maxFeePerGas,\n maxPriorityFeePerGas,\n nonce,\n to: deploylessCall ? void 0 : to,\n value\n }, \"call\");\n if (batch && shouldPerformMulticall({ request }) && !rpcStateOverride && !rpcBlockOverrides) {\n try {\n return await scheduleMulticall(client, {\n ...request,\n blockNumber,\n blockTag\n });\n } catch (err) {\n if (!(err instanceof ClientChainNotConfiguredError) && !(err instanceof ChainDoesNotSupportContract))\n throw err;\n }\n }\n const params = (() => {\n const base4 = [\n request,\n block\n ];\n if (rpcStateOverride && rpcBlockOverrides)\n return [...base4, rpcStateOverride, rpcBlockOverrides];\n if (rpcStateOverride)\n return [...base4, rpcStateOverride];\n if (rpcBlockOverrides)\n return [...base4, {}, rpcBlockOverrides];\n return base4;\n })();\n const response = await client.request({\n method: \"eth_call\",\n params\n });\n if (response === \"0x\")\n return { data: void 0 };\n return { data: response };\n } catch (err) {\n const data2 = getRevertErrorData(err);\n const { offchainLookup: offchainLookup2, offchainLookupSignature: offchainLookupSignature2 } = await Promise.resolve().then(() => (init_ccip2(), ccip_exports));\n if (client.ccipRead !== false && data2?.slice(0, 10) === offchainLookupSignature2 && to)\n return { data: await offchainLookup2(client, { data: data2, to }) };\n if (deploylessCall && data2?.slice(0, 10) === \"0x101bb98d\")\n throw new CounterfactualDeploymentFailedError({ factory });\n throw getCallError(err, {\n ...args,\n account,\n chain: client.chain\n });\n }\n }\n function shouldPerformMulticall({ request }) {\n const { data, to, ...request_ } = request;\n if (!data)\n return false;\n if (data.startsWith(aggregate3Signature))\n return false;\n if (!to)\n return false;\n if (Object.values(request_).filter((x4) => typeof x4 !== \"undefined\").length > 0)\n return false;\n return true;\n }\n async function scheduleMulticall(client, args) {\n const { batchSize = 1024, deployless = false, wait: wait2 = 0 } = typeof client.batch?.multicall === \"object\" ? client.batch.multicall : {};\n const { blockNumber, blockTag = client.experimental_blockTag ?? \"latest\", data, to } = args;\n const multicallAddress = (() => {\n if (deployless)\n return null;\n if (args.multicallAddress)\n return args.multicallAddress;\n if (client.chain) {\n return getChainContractAddress({\n blockNumber,\n chain: client.chain,\n contract: \"multicall3\"\n });\n }\n throw new ClientChainNotConfiguredError();\n })();\n const blockNumberHex = typeof blockNumber === \"bigint\" ? numberToHex(blockNumber) : void 0;\n const block = blockNumberHex || blockTag;\n const { schedule } = createBatchScheduler({\n id: `${client.uid}.${block}`,\n wait: wait2,\n shouldSplitBatch(args2) {\n const size6 = args2.reduce((size7, { data: data2 }) => size7 + (data2.length - 2), 0);\n return size6 > batchSize * 2;\n },\n fn: async (requests) => {\n const calls = requests.map((request) => ({\n allowFailure: true,\n callData: request.data,\n target: request.to\n }));\n const calldata = encodeFunctionData({\n abi: multicall3Abi,\n args: [calls],\n functionName: \"aggregate3\"\n });\n const data2 = await client.request({\n method: \"eth_call\",\n params: [\n {\n ...multicallAddress === null ? {\n data: toDeploylessCallViaBytecodeData({\n code: multicall3Bytecode,\n data: calldata\n })\n } : { to: multicallAddress, data: calldata }\n },\n block\n ]\n });\n return decodeFunctionResult({\n abi: multicall3Abi,\n args: [calls],\n functionName: \"aggregate3\",\n data: data2 || \"0x\"\n });\n }\n });\n const [{ returnData, success }] = await schedule({ data, to });\n if (!success)\n throw new RawContractError({ data: returnData });\n if (returnData === \"0x\")\n return { data: void 0 };\n return { data: returnData };\n }\n function toDeploylessCallViaBytecodeData(parameters) {\n const { code, data } = parameters;\n return encodeDeployData({\n abi: parseAbi([\"constructor(bytes, bytes)\"]),\n bytecode: deploylessCallViaBytecodeBytecode,\n args: [code, data]\n });\n }\n function toDeploylessCallViaFactoryData(parameters) {\n const { data, factory, factoryData, to } = parameters;\n return encodeDeployData({\n abi: parseAbi([\"constructor(address, bytes, address, bytes)\"]),\n bytecode: deploylessCallViaFactoryBytecode,\n args: [to, data, factory, factoryData]\n });\n }\n function getRevertErrorData(err) {\n if (!(err instanceof BaseError2))\n return void 0;\n const error = err.walk();\n return typeof error?.data === \"object\" ? error.data?.data : error.data;\n }\n var init_call = __esm({\n \"../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/actions/public/call.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_exports();\n init_BlockOverrides();\n init_parseAccount();\n init_abis();\n init_contract2();\n init_contracts();\n init_base();\n init_chain();\n init_contract();\n init_decodeFunctionResult();\n init_encodeDeployData();\n init_encodeFunctionData();\n init_getChainContractAddress();\n init_toHex();\n init_getCallError();\n init_extract();\n init_transactionRequest();\n init_createBatchScheduler();\n init_stateOverride2();\n init_assertRequest();\n }\n });\n\n // ../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/actions/public/readContract.js\n async function readContract(client, parameters) {\n const { abi: abi2, address, args, functionName, ...rest } = parameters;\n const calldata = encodeFunctionData({\n abi: abi2,\n args,\n functionName\n });\n try {\n const { data } = await getAction(client, call, \"call\")({\n ...rest,\n data: calldata,\n to: address\n });\n return decodeFunctionResult({\n abi: abi2,\n args,\n functionName,\n data: data || \"0x\"\n });\n } catch (error) {\n throw getContractError(error, {\n abi: abi2,\n address,\n args,\n docsPath: \"/docs/contract/readContract\",\n functionName\n });\n }\n }\n var init_readContract = __esm({\n \"../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/actions/public/readContract.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_decodeFunctionResult();\n init_encodeFunctionData();\n init_getContractError();\n init_getAction();\n init_call();\n }\n });\n\n // ../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/actions/public/simulateContract.js\n async function simulateContract(client, parameters) {\n const { abi: abi2, address, args, dataSuffix, functionName, ...callRequest } = parameters;\n const account = callRequest.account ? parseAccount(callRequest.account) : client.account;\n const calldata = encodeFunctionData({ abi: abi2, args, functionName });\n try {\n const { data } = await getAction(client, call, \"call\")({\n batch: false,\n data: `${calldata}${dataSuffix ? dataSuffix.replace(\"0x\", \"\") : \"\"}`,\n to: address,\n ...callRequest,\n account\n });\n const result = decodeFunctionResult({\n abi: abi2,\n args,\n functionName,\n data: data || \"0x\"\n });\n const minimizedAbi = abi2.filter((abiItem) => \"name\" in abiItem && abiItem.name === parameters.functionName);\n return {\n result,\n request: {\n abi: minimizedAbi,\n address,\n args,\n dataSuffix,\n functionName,\n ...callRequest,\n account\n }\n };\n } catch (error) {\n throw getContractError(error, {\n abi: abi2,\n address,\n args,\n docsPath: \"/docs/contract/simulateContract\",\n functionName,\n sender: account?.address\n });\n }\n }\n var init_simulateContract = __esm({\n \"../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/actions/public/simulateContract.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_parseAccount();\n init_decodeFunctionResult();\n init_encodeFunctionData();\n init_getContractError();\n init_getAction();\n init_call();\n }\n });\n\n // ../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/utils/observe.js\n function observe(observerId, callbacks, fn) {\n const callbackId = ++callbackCount;\n const getListeners = () => listenersCache.get(observerId) || [];\n const unsubscribe = () => {\n const listeners3 = getListeners();\n listenersCache.set(observerId, listeners3.filter((cb) => cb.id !== callbackId));\n };\n const unwatch = () => {\n const listeners3 = getListeners();\n if (!listeners3.some((cb) => cb.id === callbackId))\n return;\n const cleanup2 = cleanupCache.get(observerId);\n if (listeners3.length === 1 && cleanup2) {\n const p4 = cleanup2();\n if (p4 instanceof Promise)\n p4.catch(() => {\n });\n }\n unsubscribe();\n };\n const listeners2 = getListeners();\n listenersCache.set(observerId, [\n ...listeners2,\n { id: callbackId, fns: callbacks }\n ]);\n if (listeners2 && listeners2.length > 0)\n return unwatch;\n const emit2 = {};\n for (const key in callbacks) {\n emit2[key] = (...args) => {\n const listeners3 = getListeners();\n if (listeners3.length === 0)\n return;\n for (const listener of listeners3)\n listener.fns[key]?.(...args);\n };\n }\n const cleanup = fn(emit2);\n if (typeof cleanup === \"function\")\n cleanupCache.set(observerId, cleanup);\n return unwatch;\n }\n var listenersCache, cleanupCache, callbackCount;\n var init_observe = __esm({\n \"../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/utils/observe.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n listenersCache = /* @__PURE__ */ new Map();\n cleanupCache = /* @__PURE__ */ new Map();\n callbackCount = 0;\n }\n });\n\n // ../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/utils/wait.js\n async function wait(time) {\n return new Promise((res) => setTimeout(res, time));\n }\n var init_wait = __esm({\n \"../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/utils/wait.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n }\n });\n\n // ../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/utils/poll.js\n function poll(fn, { emitOnBegin, initialWaitTime, interval }) {\n let active = true;\n const unwatch = () => active = false;\n const watch = async () => {\n let data;\n if (emitOnBegin)\n data = await fn({ unpoll: unwatch });\n const initialWait = await initialWaitTime?.(data) ?? interval;\n await wait(initialWait);\n const poll2 = async () => {\n if (!active)\n return;\n await fn({ unpoll: unwatch });\n await wait(interval);\n poll2();\n };\n poll2();\n };\n watch();\n return unwatch;\n }\n var init_poll = __esm({\n \"../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/utils/poll.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_wait();\n }\n });\n\n // ../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/utils/promise/withCache.js\n function getCache(cacheKey2) {\n const buildCache = (cacheKey3, cache) => ({\n clear: () => cache.delete(cacheKey3),\n get: () => cache.get(cacheKey3),\n set: (data) => cache.set(cacheKey3, data)\n });\n const promise = buildCache(cacheKey2, promiseCache);\n const response = buildCache(cacheKey2, responseCache);\n return {\n clear: () => {\n promise.clear();\n response.clear();\n },\n promise,\n response\n };\n }\n async function withCache(fn, { cacheKey: cacheKey2, cacheTime = Number.POSITIVE_INFINITY }) {\n const cache = getCache(cacheKey2);\n const response = cache.response.get();\n if (response && cacheTime > 0) {\n const age = Date.now() - response.created.getTime();\n if (age < cacheTime)\n return response.data;\n }\n let promise = cache.promise.get();\n if (!promise) {\n promise = fn();\n cache.promise.set(promise);\n }\n try {\n const data = await promise;\n cache.response.set({ created: /* @__PURE__ */ new Date(), data });\n return data;\n } finally {\n cache.promise.clear();\n }\n }\n var promiseCache, responseCache;\n var init_withCache = __esm({\n \"../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/utils/promise/withCache.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n promiseCache = /* @__PURE__ */ new Map();\n responseCache = /* @__PURE__ */ new Map();\n }\n });\n\n // ../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/actions/public/getBlockNumber.js\n async function getBlockNumber(client, { cacheTime = client.cacheTime } = {}) {\n const blockNumberHex = await withCache(() => client.request({\n method: \"eth_blockNumber\"\n }), { cacheKey: cacheKey(client.uid), cacheTime });\n return BigInt(blockNumberHex);\n }\n var cacheKey;\n var init_getBlockNumber = __esm({\n \"../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/actions/public/getBlockNumber.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_withCache();\n cacheKey = (id) => `blockNumber.${id}`;\n }\n });\n\n // ../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/actions/public/getFilterChanges.js\n async function getFilterChanges(_client, { filter }) {\n const strict = \"strict\" in filter && filter.strict;\n const logs = await filter.request({\n method: \"eth_getFilterChanges\",\n params: [filter.id]\n });\n if (typeof logs[0] === \"string\")\n return logs;\n const formattedLogs = logs.map((log) => formatLog(log));\n if (!(\"abi\" in filter) || !filter.abi)\n return formattedLogs;\n return parseEventLogs({\n abi: filter.abi,\n logs: formattedLogs,\n strict\n });\n }\n var init_getFilterChanges = __esm({\n \"../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/actions/public/getFilterChanges.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_parseEventLogs();\n init_log2();\n }\n });\n\n // ../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/actions/public/uninstallFilter.js\n async function uninstallFilter(_client, { filter }) {\n return filter.request({\n method: \"eth_uninstallFilter\",\n params: [filter.id]\n });\n }\n var init_uninstallFilter = __esm({\n \"../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/actions/public/uninstallFilter.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n }\n });\n\n // ../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/actions/public/watchContractEvent.js\n function watchContractEvent(client, parameters) {\n const { abi: abi2, address, args, batch = true, eventName, fromBlock, onError, onLogs, poll: poll_, pollingInterval = client.pollingInterval, strict: strict_ } = parameters;\n const enablePolling = (() => {\n if (typeof poll_ !== \"undefined\")\n return poll_;\n if (typeof fromBlock === \"bigint\")\n return true;\n if (client.transport.type === \"webSocket\" || client.transport.type === \"ipc\")\n return false;\n if (client.transport.type === \"fallback\" && (client.transport.transports[0].config.type === \"webSocket\" || client.transport.transports[0].config.type === \"ipc\"))\n return false;\n return true;\n })();\n const pollContractEvent = () => {\n const strict = strict_ ?? false;\n const observerId = stringify([\n \"watchContractEvent\",\n address,\n args,\n batch,\n client.uid,\n eventName,\n pollingInterval,\n strict,\n fromBlock\n ]);\n return observe(observerId, { onLogs, onError }, (emit2) => {\n let previousBlockNumber;\n if (fromBlock !== void 0)\n previousBlockNumber = fromBlock - 1n;\n let filter;\n let initialized = false;\n const unwatch = poll(async () => {\n if (!initialized) {\n try {\n filter = await getAction(client, createContractEventFilter, \"createContractEventFilter\")({\n abi: abi2,\n address,\n args,\n eventName,\n strict,\n fromBlock\n });\n } catch {\n }\n initialized = true;\n return;\n }\n try {\n let logs;\n if (filter) {\n logs = await getAction(client, getFilterChanges, \"getFilterChanges\")({ filter });\n } else {\n const blockNumber = await getAction(client, getBlockNumber, \"getBlockNumber\")({});\n if (previousBlockNumber && previousBlockNumber < blockNumber) {\n logs = await getAction(client, getContractEvents, \"getContractEvents\")({\n abi: abi2,\n address,\n args,\n eventName,\n fromBlock: previousBlockNumber + 1n,\n toBlock: blockNumber,\n strict\n });\n } else {\n logs = [];\n }\n previousBlockNumber = blockNumber;\n }\n if (logs.length === 0)\n return;\n if (batch)\n emit2.onLogs(logs);\n else\n for (const log of logs)\n emit2.onLogs([log]);\n } catch (err) {\n if (filter && err instanceof InvalidInputRpcError)\n initialized = false;\n emit2.onError?.(err);\n }\n }, {\n emitOnBegin: true,\n interval: pollingInterval\n });\n return async () => {\n if (filter)\n await getAction(client, uninstallFilter, \"uninstallFilter\")({ filter });\n unwatch();\n };\n });\n };\n const subscribeContractEvent = () => {\n const strict = strict_ ?? false;\n const observerId = stringify([\n \"watchContractEvent\",\n address,\n args,\n batch,\n client.uid,\n eventName,\n pollingInterval,\n strict\n ]);\n let active = true;\n let unsubscribe = () => active = false;\n return observe(observerId, { onLogs, onError }, (emit2) => {\n ;\n (async () => {\n try {\n const transport = (() => {\n if (client.transport.type === \"fallback\") {\n const transport2 = client.transport.transports.find((transport3) => transport3.config.type === \"webSocket\" || transport3.config.type === \"ipc\");\n if (!transport2)\n return client.transport;\n return transport2.value;\n }\n return client.transport;\n })();\n const topics = eventName ? encodeEventTopics({\n abi: abi2,\n eventName,\n args\n }) : [];\n const { unsubscribe: unsubscribe_ } = await transport.subscribe({\n params: [\"logs\", { address, topics }],\n onData(data) {\n if (!active)\n return;\n const log = data.result;\n try {\n const { eventName: eventName2, args: args2 } = decodeEventLog({\n abi: abi2,\n data: log.data,\n topics: log.topics,\n strict: strict_\n });\n const formatted = formatLog(log, {\n args: args2,\n eventName: eventName2\n });\n emit2.onLogs([formatted]);\n } catch (err) {\n let eventName2;\n let isUnnamed;\n if (err instanceof DecodeLogDataMismatch || err instanceof DecodeLogTopicsMismatch) {\n if (strict_)\n return;\n eventName2 = err.abiItem.name;\n isUnnamed = err.abiItem.inputs?.some((x4) => !(\"name\" in x4 && x4.name));\n }\n const formatted = formatLog(log, {\n args: isUnnamed ? [] : {},\n eventName: eventName2\n });\n emit2.onLogs([formatted]);\n }\n },\n onError(error) {\n emit2.onError?.(error);\n }\n });\n unsubscribe = unsubscribe_;\n if (!active)\n unsubscribe();\n } catch (err) {\n onError?.(err);\n }\n })();\n return () => unsubscribe();\n });\n };\n return enablePolling ? pollContractEvent() : subscribeContractEvent();\n }\n var init_watchContractEvent = __esm({\n \"../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/actions/public/watchContractEvent.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_abi();\n init_rpc();\n init_decodeEventLog();\n init_encodeEventTopics();\n init_log2();\n init_getAction();\n init_observe();\n init_poll();\n init_stringify();\n init_createContractEventFilter();\n init_getBlockNumber();\n init_getContractEvents();\n init_getFilterChanges();\n init_uninstallFilter();\n }\n });\n\n // ../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/errors/account.js\n var AccountNotFoundError, AccountTypeNotSupportedError;\n var init_account = __esm({\n \"../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/errors/account.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_base();\n AccountNotFoundError = class extends BaseError2 {\n constructor({ docsPath: docsPath8 } = {}) {\n super([\n \"Could not find an Account to execute with this Action.\",\n \"Please provide an Account with the `account` argument on the Action, or by supplying an `account` to the Client.\"\n ].join(\"\\n\"), {\n docsPath: docsPath8,\n docsSlug: \"account\",\n name: \"AccountNotFoundError\"\n });\n }\n };\n AccountTypeNotSupportedError = class extends BaseError2 {\n constructor({ docsPath: docsPath8, metaMessages, type }) {\n super(`Account type \"${type}\" is not supported.`, {\n docsPath: docsPath8,\n metaMessages,\n name: \"AccountTypeNotSupportedError\"\n });\n }\n };\n }\n });\n\n // ../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/utils/chain/assertCurrentChain.js\n function assertCurrentChain({ chain: chain2, currentChainId }) {\n if (!chain2)\n throw new ChainNotFoundError();\n if (currentChainId !== chain2.id)\n throw new ChainMismatchError({ chain: chain2, currentChainId });\n }\n var init_assertCurrentChain = __esm({\n \"../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/utils/chain/assertCurrentChain.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_chain();\n }\n });\n\n // ../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/utils/errors/getTransactionError.js\n function getTransactionError(err, { docsPath: docsPath8, ...args }) {\n const cause = (() => {\n const cause2 = getNodeError(err, args);\n if (cause2 instanceof UnknownNodeError)\n return err;\n return cause2;\n })();\n return new TransactionExecutionError(cause, {\n docsPath: docsPath8,\n ...args\n });\n }\n var init_getTransactionError = __esm({\n \"../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/utils/errors/getTransactionError.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_node();\n init_transaction();\n init_getNodeError();\n }\n });\n\n // ../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/actions/wallet/sendRawTransaction.js\n async function sendRawTransaction(client, { serializedTransaction }) {\n return client.request({\n method: \"eth_sendRawTransaction\",\n params: [serializedTransaction]\n }, { retryCount: 0 });\n }\n var init_sendRawTransaction = __esm({\n \"../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/actions/wallet/sendRawTransaction.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n }\n });\n\n // ../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/actions/wallet/sendTransaction.js\n async function sendTransaction(client, parameters) {\n const { account: account_ = client.account, chain: chain2 = client.chain, accessList, authorizationList, blobs, data, gas, gasPrice, maxFeePerBlobGas, maxFeePerGas, maxPriorityFeePerGas, nonce, type, value, ...rest } = parameters;\n if (typeof account_ === \"undefined\")\n throw new AccountNotFoundError({\n docsPath: \"/docs/actions/wallet/sendTransaction\"\n });\n const account = account_ ? parseAccount(account_) : null;\n try {\n assertRequest(parameters);\n const to = await (async () => {\n if (parameters.to)\n return parameters.to;\n if (parameters.to === null)\n return void 0;\n if (authorizationList && authorizationList.length > 0)\n return await recoverAuthorizationAddress({\n authorization: authorizationList[0]\n }).catch(() => {\n throw new BaseError2(\"`to` is required. Could not infer from `authorizationList`.\");\n });\n return void 0;\n })();\n if (account?.type === \"json-rpc\" || account === null) {\n let chainId;\n if (chain2 !== null) {\n chainId = await getAction(client, getChainId, \"getChainId\")({});\n assertCurrentChain({\n currentChainId: chainId,\n chain: chain2\n });\n }\n const chainFormat = client.chain?.formatters?.transactionRequest?.format;\n const format = chainFormat || formatTransactionRequest;\n const request = format({\n // Pick out extra data that might exist on the chain's transaction request type.\n ...extract(rest, { format: chainFormat }),\n accessList,\n account,\n authorizationList,\n blobs,\n chainId,\n data,\n gas,\n gasPrice,\n maxFeePerBlobGas,\n maxFeePerGas,\n maxPriorityFeePerGas,\n nonce,\n to,\n type,\n value\n }, \"sendTransaction\");\n const isWalletNamespaceSupported = supportsWalletNamespace.get(client.uid);\n const method = isWalletNamespaceSupported ? \"wallet_sendTransaction\" : \"eth_sendTransaction\";\n try {\n return await client.request({\n method,\n params: [request]\n }, { retryCount: 0 });\n } catch (e3) {\n if (isWalletNamespaceSupported === false)\n throw e3;\n const error = e3;\n if (error.name === \"InvalidInputRpcError\" || error.name === \"InvalidParamsRpcError\" || error.name === \"MethodNotFoundRpcError\" || error.name === \"MethodNotSupportedRpcError\") {\n return await client.request({\n method: \"wallet_sendTransaction\",\n params: [request]\n }, { retryCount: 0 }).then((hash3) => {\n supportsWalletNamespace.set(client.uid, true);\n return hash3;\n }).catch((e4) => {\n const walletNamespaceError = e4;\n if (walletNamespaceError.name === \"MethodNotFoundRpcError\" || walletNamespaceError.name === \"MethodNotSupportedRpcError\") {\n supportsWalletNamespace.set(client.uid, false);\n throw error;\n }\n throw walletNamespaceError;\n });\n }\n throw error;\n }\n }\n if (account?.type === \"local\") {\n const request = await getAction(client, prepareTransactionRequest, \"prepareTransactionRequest\")({\n account,\n accessList,\n authorizationList,\n blobs,\n chain: chain2,\n data,\n gas,\n gasPrice,\n maxFeePerBlobGas,\n maxFeePerGas,\n maxPriorityFeePerGas,\n nonce,\n nonceManager: account.nonceManager,\n parameters: [...defaultParameters, \"sidecars\"],\n type,\n value,\n ...rest,\n to\n });\n const serializer = chain2?.serializers?.transaction;\n const serializedTransaction = await account.signTransaction(request, {\n serializer\n });\n return await getAction(client, sendRawTransaction, \"sendRawTransaction\")({\n serializedTransaction\n });\n }\n if (account?.type === \"smart\")\n throw new AccountTypeNotSupportedError({\n metaMessages: [\n \"Consider using the `sendUserOperation` Action instead.\"\n ],\n docsPath: \"/docs/actions/bundler/sendUserOperation\",\n type: \"smart\"\n });\n throw new AccountTypeNotSupportedError({\n docsPath: \"/docs/actions/wallet/sendTransaction\",\n type: account?.type\n });\n } catch (err) {\n if (err instanceof AccountTypeNotSupportedError)\n throw err;\n throw getTransactionError(err, {\n ...parameters,\n account,\n chain: parameters.chain || void 0\n });\n }\n }\n var supportsWalletNamespace;\n var init_sendTransaction = __esm({\n \"../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/actions/wallet/sendTransaction.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_parseAccount();\n init_account();\n init_base();\n init_recoverAuthorizationAddress();\n init_assertCurrentChain();\n init_getTransactionError();\n init_extract();\n init_transactionRequest();\n init_getAction();\n init_lru();\n init_assertRequest();\n init_getChainId();\n init_prepareTransactionRequest();\n init_sendRawTransaction();\n supportsWalletNamespace = new LruMap(128);\n }\n });\n\n // ../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/actions/wallet/writeContract.js\n async function writeContract(client, parameters) {\n return writeContract.internal(client, sendTransaction, \"sendTransaction\", parameters);\n }\n var init_writeContract = __esm({\n \"../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/actions/wallet/writeContract.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_parseAccount();\n init_account();\n init_encodeFunctionData();\n init_getContractError();\n init_getAction();\n init_sendTransaction();\n (function(writeContract2) {\n async function internal(client, actionFn, name, parameters) {\n const { abi: abi2, account: account_ = client.account, address, args, dataSuffix, functionName, ...request } = parameters;\n if (typeof account_ === \"undefined\")\n throw new AccountNotFoundError({\n docsPath: \"/docs/contract/writeContract\"\n });\n const account = account_ ? parseAccount(account_) : null;\n const data = encodeFunctionData({\n abi: abi2,\n args,\n functionName\n });\n try {\n return await getAction(client, actionFn, name)({\n data: `${data}${dataSuffix ? dataSuffix.replace(\"0x\", \"\") : \"\"}`,\n to: address,\n account,\n ...request\n });\n } catch (error) {\n throw getContractError(error, {\n abi: abi2,\n address,\n args,\n docsPath: \"/docs/contract/writeContract\",\n functionName,\n sender: account?.address\n });\n }\n }\n writeContract2.internal = internal;\n })(writeContract || (writeContract = {}));\n }\n });\n\n // ../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/actions/getContract.js\n function getContract({ abi: abi2, address, client: client_ }) {\n const client = client_;\n const [publicClient, walletClient] = (() => {\n if (!client)\n return [void 0, void 0];\n if (\"public\" in client && \"wallet\" in client)\n return [client.public, client.wallet];\n if (\"public\" in client)\n return [client.public, void 0];\n if (\"wallet\" in client)\n return [void 0, client.wallet];\n return [client, client];\n })();\n const hasPublicClient = publicClient !== void 0 && publicClient !== null;\n const hasWalletClient = walletClient !== void 0 && walletClient !== null;\n const contract = {};\n let hasReadFunction = false;\n let hasWriteFunction = false;\n let hasEvent = false;\n for (const item of abi2) {\n if (item.type === \"function\")\n if (item.stateMutability === \"view\" || item.stateMutability === \"pure\")\n hasReadFunction = true;\n else\n hasWriteFunction = true;\n else if (item.type === \"event\")\n hasEvent = true;\n if (hasReadFunction && hasWriteFunction && hasEvent)\n break;\n }\n if (hasPublicClient) {\n if (hasReadFunction)\n contract.read = new Proxy({}, {\n get(_2, functionName) {\n return (...parameters) => {\n const { args, options } = getFunctionParameters(parameters);\n return getAction(publicClient, readContract, \"readContract\")({\n abi: abi2,\n address,\n functionName,\n args,\n ...options\n });\n };\n }\n });\n if (hasWriteFunction)\n contract.simulate = new Proxy({}, {\n get(_2, functionName) {\n return (...parameters) => {\n const { args, options } = getFunctionParameters(parameters);\n return getAction(publicClient, simulateContract, \"simulateContract\")({\n abi: abi2,\n address,\n functionName,\n args,\n ...options\n });\n };\n }\n });\n if (hasEvent) {\n contract.createEventFilter = new Proxy({}, {\n get(_2, eventName) {\n return (...parameters) => {\n const abiEvent = abi2.find((x4) => x4.type === \"event\" && x4.name === eventName);\n const { args, options } = getEventParameters(parameters, abiEvent);\n return getAction(publicClient, createContractEventFilter, \"createContractEventFilter\")({\n abi: abi2,\n address,\n eventName,\n args,\n ...options\n });\n };\n }\n });\n contract.getEvents = new Proxy({}, {\n get(_2, eventName) {\n return (...parameters) => {\n const abiEvent = abi2.find((x4) => x4.type === \"event\" && x4.name === eventName);\n const { args, options } = getEventParameters(parameters, abiEvent);\n return getAction(publicClient, getContractEvents, \"getContractEvents\")({\n abi: abi2,\n address,\n eventName,\n args,\n ...options\n });\n };\n }\n });\n contract.watchEvent = new Proxy({}, {\n get(_2, eventName) {\n return (...parameters) => {\n const abiEvent = abi2.find((x4) => x4.type === \"event\" && x4.name === eventName);\n const { args, options } = getEventParameters(parameters, abiEvent);\n return getAction(publicClient, watchContractEvent, \"watchContractEvent\")({\n abi: abi2,\n address,\n eventName,\n args,\n ...options\n });\n };\n }\n });\n }\n }\n if (hasWalletClient) {\n if (hasWriteFunction)\n contract.write = new Proxy({}, {\n get(_2, functionName) {\n return (...parameters) => {\n const { args, options } = getFunctionParameters(parameters);\n return getAction(walletClient, writeContract, \"writeContract\")({\n abi: abi2,\n address,\n functionName,\n args,\n ...options\n });\n };\n }\n });\n }\n if (hasPublicClient || hasWalletClient) {\n if (hasWriteFunction)\n contract.estimateGas = new Proxy({}, {\n get(_2, functionName) {\n return (...parameters) => {\n const { args, options } = getFunctionParameters(parameters);\n const client2 = publicClient ?? walletClient;\n return getAction(client2, estimateContractGas, \"estimateContractGas\")({\n abi: abi2,\n address,\n functionName,\n args,\n ...options,\n account: options.account ?? walletClient.account\n });\n };\n }\n });\n }\n contract.address = address;\n contract.abi = abi2;\n return contract;\n }\n function getFunctionParameters(values) {\n const hasArgs = values.length && Array.isArray(values[0]);\n const args = hasArgs ? values[0] : [];\n const options = (hasArgs ? values[1] : values[0]) ?? {};\n return { args, options };\n }\n function getEventParameters(values, abiEvent) {\n let hasArgs = false;\n if (Array.isArray(values[0]))\n hasArgs = true;\n else if (values.length === 1) {\n hasArgs = abiEvent.inputs.some((x4) => x4.indexed);\n } else if (values.length === 2) {\n hasArgs = true;\n }\n const args = hasArgs ? values[0] : void 0;\n const options = (hasArgs ? values[1] : values[0]) ?? {};\n return { args, options };\n }\n var init_getContract = __esm({\n \"../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/actions/getContract.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_getAction();\n init_createContractEventFilter();\n init_estimateContractGas();\n init_getContractEvents();\n init_readContract();\n init_simulateContract();\n init_watchContractEvent();\n init_writeContract();\n }\n });\n\n // ../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/utils/promise/withRetry.js\n function withRetry(fn, { delay: delay_ = 100, retryCount = 2, shouldRetry: shouldRetry2 = () => true } = {}) {\n return new Promise((resolve, reject) => {\n const attemptRetry = async ({ count = 0 } = {}) => {\n const retry = async ({ error }) => {\n const delay = typeof delay_ === \"function\" ? delay_({ count, error }) : delay_;\n if (delay)\n await wait(delay);\n attemptRetry({ count: count + 1 });\n };\n try {\n const data = await fn();\n resolve(data);\n } catch (err) {\n if (count < retryCount && await shouldRetry2({ count, error: err }))\n return retry({ error: err });\n reject(err);\n }\n };\n attemptRetry();\n });\n }\n var init_withRetry = __esm({\n \"../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/utils/promise/withRetry.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_wait();\n }\n });\n\n // ../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/utils/formatters/transactionReceipt.js\n function formatTransactionReceipt(transactionReceipt, _2) {\n const receipt = {\n ...transactionReceipt,\n blockNumber: transactionReceipt.blockNumber ? BigInt(transactionReceipt.blockNumber) : null,\n contractAddress: transactionReceipt.contractAddress ? transactionReceipt.contractAddress : null,\n cumulativeGasUsed: transactionReceipt.cumulativeGasUsed ? BigInt(transactionReceipt.cumulativeGasUsed) : null,\n effectiveGasPrice: transactionReceipt.effectiveGasPrice ? BigInt(transactionReceipt.effectiveGasPrice) : null,\n gasUsed: transactionReceipt.gasUsed ? BigInt(transactionReceipt.gasUsed) : null,\n logs: transactionReceipt.logs ? transactionReceipt.logs.map((log) => formatLog(log)) : null,\n to: transactionReceipt.to ? transactionReceipt.to : null,\n transactionIndex: transactionReceipt.transactionIndex ? hexToNumber(transactionReceipt.transactionIndex) : null,\n status: transactionReceipt.status ? receiptStatuses[transactionReceipt.status] : null,\n type: transactionReceipt.type ? transactionType[transactionReceipt.type] || transactionReceipt.type : null\n };\n if (transactionReceipt.blobGasPrice)\n receipt.blobGasPrice = BigInt(transactionReceipt.blobGasPrice);\n if (transactionReceipt.blobGasUsed)\n receipt.blobGasUsed = BigInt(transactionReceipt.blobGasUsed);\n return receipt;\n }\n var receiptStatuses, defineTransactionReceipt;\n var init_transactionReceipt = __esm({\n \"../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/utils/formatters/transactionReceipt.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_fromHex();\n init_formatter();\n init_log2();\n init_transaction2();\n receiptStatuses = {\n \"0x0\": \"reverted\",\n \"0x1\": \"success\"\n };\n defineTransactionReceipt = /* @__PURE__ */ defineFormatter(\"transactionReceipt\", formatTransactionReceipt);\n }\n });\n\n // ../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/utils/uid.js\n function uid(length2 = 11) {\n if (!buffer || index + length2 > size4 * 2) {\n buffer = \"\";\n index = 0;\n for (let i3 = 0; i3 < size4; i3++) {\n buffer += (256 + Math.random() * 256 | 0).toString(16).substring(1);\n }\n }\n return buffer.substring(index, index++ + length2);\n }\n var size4, index, buffer;\n var init_uid = __esm({\n \"../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/utils/uid.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n size4 = 256;\n index = size4;\n }\n });\n\n // ../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/clients/createClient.js\n function createClient(parameters) {\n const { batch, chain: chain2, ccipRead, key = \"base\", name = \"Base Client\", type = \"base\" } = parameters;\n const experimental_blockTag = parameters.experimental_blockTag ?? (typeof chain2?.experimental_preconfirmationTime === \"number\" ? \"pending\" : void 0);\n const blockTime = chain2?.blockTime ?? 12e3;\n const defaultPollingInterval = Math.min(Math.max(Math.floor(blockTime / 2), 500), 4e3);\n const pollingInterval = parameters.pollingInterval ?? defaultPollingInterval;\n const cacheTime = parameters.cacheTime ?? pollingInterval;\n const account = parameters.account ? parseAccount(parameters.account) : void 0;\n const { config: config2, request, value } = parameters.transport({\n chain: chain2,\n pollingInterval\n });\n const transport = { ...config2, ...value };\n const client = {\n account,\n batch,\n cacheTime,\n ccipRead,\n chain: chain2,\n key,\n name,\n pollingInterval,\n request,\n transport,\n type,\n uid: uid(),\n ...experimental_blockTag ? { experimental_blockTag } : {}\n };\n function extend(base4) {\n return (extendFn) => {\n const extended = extendFn(base4);\n for (const key2 in client)\n delete extended[key2];\n const combined = { ...base4, ...extended };\n return Object.assign(combined, { extend: extend(combined) });\n };\n }\n return Object.assign(client, { extend: extend(client) });\n }\n var init_createClient = __esm({\n \"../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/clients/createClient.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_parseAccount();\n init_uid();\n }\n });\n\n // ../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/utils/ens/errors.js\n function isNullUniversalResolverError(err) {\n if (!(err instanceof BaseError2))\n return false;\n const cause = err.walk((e3) => e3 instanceof ContractFunctionRevertedError);\n if (!(cause instanceof ContractFunctionRevertedError))\n return false;\n if (cause.data?.errorName === \"HttpError\")\n return true;\n if (cause.data?.errorName === \"ResolverError\")\n return true;\n if (cause.data?.errorName === \"ResolverNotContract\")\n return true;\n if (cause.data?.errorName === \"ResolverNotFound\")\n return true;\n if (cause.data?.errorName === \"ReverseAddressMismatch\")\n return true;\n if (cause.data?.errorName === \"UnsupportedResolverProfile\")\n return true;\n return false;\n }\n var init_errors4 = __esm({\n \"../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/utils/ens/errors.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_base();\n init_contract();\n }\n });\n\n // ../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/utils/ens/encodedLabelToLabelhash.js\n function encodedLabelToLabelhash(label) {\n if (label.length !== 66)\n return null;\n if (label.indexOf(\"[\") !== 0)\n return null;\n if (label.indexOf(\"]\") !== 65)\n return null;\n const hash3 = `0x${label.slice(1, 65)}`;\n if (!isHex(hash3))\n return null;\n return hash3;\n }\n var init_encodedLabelToLabelhash = __esm({\n \"../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/utils/ens/encodedLabelToLabelhash.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_isHex();\n }\n });\n\n // ../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/utils/ens/namehash.js\n function namehash(name) {\n let result = new Uint8Array(32).fill(0);\n if (!name)\n return bytesToHex(result);\n const labels = name.split(\".\");\n for (let i3 = labels.length - 1; i3 >= 0; i3 -= 1) {\n const hashFromEncodedLabel = encodedLabelToLabelhash(labels[i3]);\n const hashed = hashFromEncodedLabel ? toBytes(hashFromEncodedLabel) : keccak256(stringToBytes(labels[i3]), \"bytes\");\n result = keccak256(concat([result, hashed]), \"bytes\");\n }\n return bytesToHex(result);\n }\n var init_namehash = __esm({\n \"../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/utils/ens/namehash.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_concat();\n init_toBytes();\n init_toHex();\n init_keccak256();\n init_encodedLabelToLabelhash();\n }\n });\n\n // ../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/utils/ens/encodeLabelhash.js\n function encodeLabelhash(hash3) {\n return `[${hash3.slice(2)}]`;\n }\n var init_encodeLabelhash = __esm({\n \"../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/utils/ens/encodeLabelhash.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n }\n });\n\n // ../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/utils/ens/labelhash.js\n function labelhash(label) {\n const result = new Uint8Array(32).fill(0);\n if (!label)\n return bytesToHex(result);\n return encodedLabelToLabelhash(label) || keccak256(stringToBytes(label));\n }\n var init_labelhash = __esm({\n \"../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/utils/ens/labelhash.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_toBytes();\n init_toHex();\n init_keccak256();\n init_encodedLabelToLabelhash();\n }\n });\n\n // ../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/utils/ens/packetToBytes.js\n function packetToBytes(packet) {\n const value = packet.replace(/^\\.|\\.$/gm, \"\");\n if (value.length === 0)\n return new Uint8Array(1);\n const bytes = new Uint8Array(stringToBytes(value).byteLength + 2);\n let offset = 0;\n const list = value.split(\".\");\n for (let i3 = 0; i3 < list.length; i3++) {\n let encoded = stringToBytes(list[i3]);\n if (encoded.byteLength > 255)\n encoded = stringToBytes(encodeLabelhash(labelhash(list[i3])));\n bytes[offset] = encoded.length;\n bytes.set(encoded, offset + 1);\n offset += encoded.length + 1;\n }\n if (bytes.byteLength !== offset + 1)\n return bytes.slice(0, offset + 1);\n return bytes;\n }\n var init_packetToBytes = __esm({\n \"../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/utils/ens/packetToBytes.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_toBytes();\n init_encodeLabelhash();\n init_labelhash();\n }\n });\n\n // ../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/actions/ens/getEnsAddress.js\n async function getEnsAddress(client, parameters) {\n const { blockNumber, blockTag, coinType, name, gatewayUrls, strict } = parameters;\n const { chain: chain2 } = client;\n const universalResolverAddress = (() => {\n if (parameters.universalResolverAddress)\n return parameters.universalResolverAddress;\n if (!chain2)\n throw new Error(\"client chain not configured. universalResolverAddress is required.\");\n return getChainContractAddress({\n blockNumber,\n chain: chain2,\n contract: \"ensUniversalResolver\"\n });\n })();\n const tlds = chain2?.ensTlds;\n if (tlds && !tlds.some((tld) => name.endsWith(tld)))\n return null;\n const args = (() => {\n if (coinType != null)\n return [namehash(name), BigInt(coinType)];\n return [namehash(name)];\n })();\n try {\n const functionData = encodeFunctionData({\n abi: addressResolverAbi,\n functionName: \"addr\",\n args\n });\n const readContractParameters = {\n address: universalResolverAddress,\n abi: universalResolverResolveAbi,\n functionName: \"resolveWithGateways\",\n args: [\n toHex(packetToBytes(name)),\n functionData,\n gatewayUrls ?? [localBatchGatewayUrl]\n ],\n blockNumber,\n blockTag\n };\n const readContractAction = getAction(client, readContract, \"readContract\");\n const res = await readContractAction(readContractParameters);\n if (res[0] === \"0x\")\n return null;\n const address = decodeFunctionResult({\n abi: addressResolverAbi,\n args,\n functionName: \"addr\",\n data: res[0]\n });\n if (address === \"0x\")\n return null;\n if (trim(address) === \"0x00\")\n return null;\n return address;\n } catch (err) {\n if (strict)\n throw err;\n if (isNullUniversalResolverError(err))\n return null;\n throw err;\n }\n }\n var init_getEnsAddress = __esm({\n \"../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/actions/ens/getEnsAddress.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_abis();\n init_decodeFunctionResult();\n init_encodeFunctionData();\n init_getChainContractAddress();\n init_trim();\n init_toHex();\n init_errors4();\n init_localBatchGatewayRequest();\n init_namehash();\n init_packetToBytes();\n init_getAction();\n init_readContract();\n }\n });\n\n // ../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/errors/ens.js\n var EnsAvatarInvalidMetadataError, EnsAvatarInvalidNftUriError, EnsAvatarUriResolutionError, EnsAvatarUnsupportedNamespaceError;\n var init_ens = __esm({\n \"../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/errors/ens.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_base();\n EnsAvatarInvalidMetadataError = class extends BaseError2 {\n constructor({ data }) {\n super(\"Unable to extract image from metadata. The metadata may be malformed or invalid.\", {\n metaMessages: [\n \"- Metadata must be a JSON object with at least an `image`, `image_url` or `image_data` property.\",\n \"\",\n `Provided data: ${JSON.stringify(data)}`\n ],\n name: \"EnsAvatarInvalidMetadataError\"\n });\n }\n };\n EnsAvatarInvalidNftUriError = class extends BaseError2 {\n constructor({ reason }) {\n super(`ENS NFT avatar URI is invalid. ${reason}`, {\n name: \"EnsAvatarInvalidNftUriError\"\n });\n }\n };\n EnsAvatarUriResolutionError = class extends BaseError2 {\n constructor({ uri }) {\n super(`Unable to resolve ENS avatar URI \"${uri}\". The URI may be malformed, invalid, or does not respond with a valid image.`, { name: \"EnsAvatarUriResolutionError\" });\n }\n };\n EnsAvatarUnsupportedNamespaceError = class extends BaseError2 {\n constructor({ namespace }) {\n super(`ENS NFT avatar namespace \"${namespace}\" is not supported. Must be \"erc721\" or \"erc1155\".`, { name: \"EnsAvatarUnsupportedNamespaceError\" });\n }\n };\n }\n });\n\n // ../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/utils/ens/avatar/utils.js\n async function isImageUri(uri) {\n try {\n const res = await fetch(uri, { method: \"HEAD\" });\n if (res.status === 200) {\n const contentType = res.headers.get(\"content-type\");\n return contentType?.startsWith(\"image/\");\n }\n return false;\n } catch (error) {\n if (typeof error === \"object\" && typeof error.response !== \"undefined\") {\n return false;\n }\n if (!Object.hasOwn(globalThis, \"Image\"))\n return false;\n return new Promise((resolve) => {\n const img = new Image();\n img.onload = () => {\n resolve(true);\n };\n img.onerror = () => {\n resolve(false);\n };\n img.src = uri;\n });\n }\n }\n function getGateway(custom3, defaultGateway) {\n if (!custom3)\n return defaultGateway;\n if (custom3.endsWith(\"/\"))\n return custom3.slice(0, -1);\n return custom3;\n }\n function resolveAvatarUri({ uri, gatewayUrls }) {\n const isEncoded = base64Regex.test(uri);\n if (isEncoded)\n return { uri, isOnChain: true, isEncoded };\n const ipfsGateway = getGateway(gatewayUrls?.ipfs, \"https://ipfs.io\");\n const arweaveGateway = getGateway(gatewayUrls?.arweave, \"https://arweave.net\");\n const networkRegexMatch = uri.match(networkRegex);\n const { protocol, subpath, target, subtarget = \"\" } = networkRegexMatch?.groups || {};\n const isIPNS = protocol === \"ipns:/\" || subpath === \"ipns/\";\n const isIPFS = protocol === \"ipfs:/\" || subpath === \"ipfs/\" || ipfsHashRegex.test(uri);\n if (uri.startsWith(\"http\") && !isIPNS && !isIPFS) {\n let replacedUri = uri;\n if (gatewayUrls?.arweave)\n replacedUri = uri.replace(/https:\\/\\/arweave.net/g, gatewayUrls?.arweave);\n return { uri: replacedUri, isOnChain: false, isEncoded: false };\n }\n if ((isIPNS || isIPFS) && target) {\n return {\n uri: `${ipfsGateway}/${isIPNS ? \"ipns\" : \"ipfs\"}/${target}${subtarget}`,\n isOnChain: false,\n isEncoded: false\n };\n }\n if (protocol === \"ar:/\" && target) {\n return {\n uri: `${arweaveGateway}/${target}${subtarget || \"\"}`,\n isOnChain: false,\n isEncoded: false\n };\n }\n let parsedUri = uri.replace(dataURIRegex, \"\");\n if (parsedUri.startsWith(\" res2.json());\n const image = await parseAvatarUri({\n gatewayUrls,\n uri: getJsonImage(res)\n });\n return image;\n } catch {\n throw new EnsAvatarUriResolutionError({ uri });\n }\n }\n async function parseAvatarUri({ gatewayUrls, uri }) {\n const { uri: resolvedURI, isOnChain } = resolveAvatarUri({ uri, gatewayUrls });\n if (isOnChain)\n return resolvedURI;\n const isImage = await isImageUri(resolvedURI);\n if (isImage)\n return resolvedURI;\n throw new EnsAvatarUriResolutionError({ uri });\n }\n function parseNftUri(uri_) {\n let uri = uri_;\n if (uri.startsWith(\"did:nft:\")) {\n uri = uri.replace(\"did:nft:\", \"\").replace(/_/g, \"/\");\n }\n const [reference, asset_namespace, tokenID] = uri.split(\"/\");\n const [eip_namespace, chainID] = reference.split(\":\");\n const [erc_namespace, contractAddress] = asset_namespace.split(\":\");\n if (!eip_namespace || eip_namespace.toLowerCase() !== \"eip155\")\n throw new EnsAvatarInvalidNftUriError({ reason: \"Only EIP-155 supported\" });\n if (!chainID)\n throw new EnsAvatarInvalidNftUriError({ reason: \"Chain ID not found\" });\n if (!contractAddress)\n throw new EnsAvatarInvalidNftUriError({\n reason: \"Contract address not found\"\n });\n if (!tokenID)\n throw new EnsAvatarInvalidNftUriError({ reason: \"Token ID not found\" });\n if (!erc_namespace)\n throw new EnsAvatarInvalidNftUriError({ reason: \"ERC namespace not found\" });\n return {\n chainID: Number.parseInt(chainID, 10),\n namespace: erc_namespace.toLowerCase(),\n contractAddress,\n tokenID\n };\n }\n async function getNftTokenUri(client, { nft }) {\n if (nft.namespace === \"erc721\") {\n return readContract(client, {\n address: nft.contractAddress,\n abi: [\n {\n name: \"tokenURI\",\n type: \"function\",\n stateMutability: \"view\",\n inputs: [{ name: \"tokenId\", type: \"uint256\" }],\n outputs: [{ name: \"\", type: \"string\" }]\n }\n ],\n functionName: \"tokenURI\",\n args: [BigInt(nft.tokenID)]\n });\n }\n if (nft.namespace === \"erc1155\") {\n return readContract(client, {\n address: nft.contractAddress,\n abi: [\n {\n name: \"uri\",\n type: \"function\",\n stateMutability: \"view\",\n inputs: [{ name: \"_id\", type: \"uint256\" }],\n outputs: [{ name: \"\", type: \"string\" }]\n }\n ],\n functionName: \"uri\",\n args: [BigInt(nft.tokenID)]\n });\n }\n throw new EnsAvatarUnsupportedNamespaceError({ namespace: nft.namespace });\n }\n var networkRegex, ipfsHashRegex, base64Regex, dataURIRegex;\n var init_utils6 = __esm({\n \"../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/utils/ens/avatar/utils.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_readContract();\n init_ens();\n networkRegex = /(?https?:\\/\\/[^/]*|ipfs:\\/|ipns:\\/|ar:\\/)?(?\\/)?(?ipfs\\/|ipns\\/)?(?[\\w\\-.]+)(?\\/.*)?/;\n ipfsHashRegex = /^(Qm[1-9A-HJ-NP-Za-km-z]{44,}|b[A-Za-z2-7]{58,}|B[A-Z2-7]{58,}|z[1-9A-HJ-NP-Za-km-z]{48,}|F[0-9A-F]{50,})(\\/(?[\\w\\-.]+))?(?\\/.*)?$/;\n base64Regex = /^data:([a-zA-Z\\-/+]*);base64,([^\"].*)/;\n dataURIRegex = /^data:([a-zA-Z\\-/+]*)?(;[a-zA-Z0-9].*?)?(,)/;\n }\n });\n\n // ../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/utils/ens/avatar/parseAvatarRecord.js\n async function parseAvatarRecord(client, { gatewayUrls, record: record2 }) {\n if (/eip155:/i.test(record2))\n return parseNftAvatarUri(client, { gatewayUrls, record: record2 });\n return parseAvatarUri({ uri: record2, gatewayUrls });\n }\n async function parseNftAvatarUri(client, { gatewayUrls, record: record2 }) {\n const nft = parseNftUri(record2);\n const nftUri = await getNftTokenUri(client, { nft });\n const { uri: resolvedNftUri, isOnChain, isEncoded } = resolveAvatarUri({ uri: nftUri, gatewayUrls });\n if (isOnChain && (resolvedNftUri.includes(\"data:application/json;base64,\") || resolvedNftUri.startsWith(\"{\"))) {\n const encodedJson = isEncoded ? (\n // if it is encoded, decode it\n atob(resolvedNftUri.replace(\"data:application/json;base64,\", \"\"))\n ) : (\n // if it isn't encoded assume it is a JSON string, but it could be anything (it will error if it is)\n resolvedNftUri\n );\n const decoded = JSON.parse(encodedJson);\n return parseAvatarUri({ uri: getJsonImage(decoded), gatewayUrls });\n }\n let uriTokenId = nft.tokenID;\n if (nft.namespace === \"erc1155\")\n uriTokenId = uriTokenId.replace(\"0x\", \"\").padStart(64, \"0\");\n return getMetadataAvatarUri({\n gatewayUrls,\n uri: resolvedNftUri.replace(/(?:0x)?{id}/, uriTokenId)\n });\n }\n var init_parseAvatarRecord = __esm({\n \"../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/utils/ens/avatar/parseAvatarRecord.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_utils6();\n }\n });\n\n // ../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/actions/ens/getEnsText.js\n async function getEnsText(client, parameters) {\n const { blockNumber, blockTag, key, name, gatewayUrls, strict } = parameters;\n const { chain: chain2 } = client;\n const universalResolverAddress = (() => {\n if (parameters.universalResolverAddress)\n return parameters.universalResolverAddress;\n if (!chain2)\n throw new Error(\"client chain not configured. universalResolverAddress is required.\");\n return getChainContractAddress({\n blockNumber,\n chain: chain2,\n contract: \"ensUniversalResolver\"\n });\n })();\n const tlds = chain2?.ensTlds;\n if (tlds && !tlds.some((tld) => name.endsWith(tld)))\n return null;\n try {\n const readContractParameters = {\n address: universalResolverAddress,\n abi: universalResolverResolveAbi,\n args: [\n toHex(packetToBytes(name)),\n encodeFunctionData({\n abi: textResolverAbi,\n functionName: \"text\",\n args: [namehash(name), key]\n }),\n gatewayUrls ?? [localBatchGatewayUrl]\n ],\n functionName: \"resolveWithGateways\",\n blockNumber,\n blockTag\n };\n const readContractAction = getAction(client, readContract, \"readContract\");\n const res = await readContractAction(readContractParameters);\n if (res[0] === \"0x\")\n return null;\n const record2 = decodeFunctionResult({\n abi: textResolverAbi,\n functionName: \"text\",\n data: res[0]\n });\n return record2 === \"\" ? null : record2;\n } catch (err) {\n if (strict)\n throw err;\n if (isNullUniversalResolverError(err))\n return null;\n throw err;\n }\n }\n var init_getEnsText = __esm({\n \"../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/actions/ens/getEnsText.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_abis();\n init_decodeFunctionResult();\n init_encodeFunctionData();\n init_getChainContractAddress();\n init_toHex();\n init_errors4();\n init_localBatchGatewayRequest();\n init_namehash();\n init_packetToBytes();\n init_getAction();\n init_readContract();\n }\n });\n\n // ../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/actions/ens/getEnsAvatar.js\n async function getEnsAvatar(client, { blockNumber, blockTag, assetGatewayUrls, name, gatewayUrls, strict, universalResolverAddress }) {\n const record2 = await getAction(client, getEnsText, \"getEnsText\")({\n blockNumber,\n blockTag,\n key: \"avatar\",\n name,\n universalResolverAddress,\n gatewayUrls,\n strict\n });\n if (!record2)\n return null;\n try {\n return await parseAvatarRecord(client, {\n record: record2,\n gatewayUrls: assetGatewayUrls\n });\n } catch {\n return null;\n }\n }\n var init_getEnsAvatar = __esm({\n \"../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/actions/ens/getEnsAvatar.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_parseAvatarRecord();\n init_getAction();\n init_getEnsText();\n }\n });\n\n // ../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/actions/ens/getEnsName.js\n async function getEnsName(client, parameters) {\n const { address, blockNumber, blockTag, coinType = 60n, gatewayUrls, strict } = parameters;\n const { chain: chain2 } = client;\n const universalResolverAddress = (() => {\n if (parameters.universalResolverAddress)\n return parameters.universalResolverAddress;\n if (!chain2)\n throw new Error(\"client chain not configured. universalResolverAddress is required.\");\n return getChainContractAddress({\n blockNumber,\n chain: chain2,\n contract: \"ensUniversalResolver\"\n });\n })();\n try {\n const readContractParameters = {\n address: universalResolverAddress,\n abi: universalResolverReverseAbi,\n args: [address, coinType, gatewayUrls ?? [localBatchGatewayUrl]],\n functionName: \"reverseWithGateways\",\n blockNumber,\n blockTag\n };\n const readContractAction = getAction(client, readContract, \"readContract\");\n const [name] = await readContractAction(readContractParameters);\n return name || null;\n } catch (err) {\n if (strict)\n throw err;\n if (isNullUniversalResolverError(err))\n return null;\n throw err;\n }\n }\n var init_getEnsName = __esm({\n \"../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/actions/ens/getEnsName.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_abis();\n init_getChainContractAddress();\n init_errors4();\n init_localBatchGatewayRequest();\n init_getAction();\n init_readContract();\n }\n });\n\n // ../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/actions/ens/getEnsResolver.js\n async function getEnsResolver(client, parameters) {\n const { blockNumber, blockTag, name } = parameters;\n const { chain: chain2 } = client;\n const universalResolverAddress = (() => {\n if (parameters.universalResolverAddress)\n return parameters.universalResolverAddress;\n if (!chain2)\n throw new Error(\"client chain not configured. universalResolverAddress is required.\");\n return getChainContractAddress({\n blockNumber,\n chain: chain2,\n contract: \"ensUniversalResolver\"\n });\n })();\n const tlds = chain2?.ensTlds;\n if (tlds && !tlds.some((tld) => name.endsWith(tld)))\n throw new Error(`${name} is not a valid ENS TLD (${tlds?.join(\", \")}) for chain \"${chain2.name}\" (id: ${chain2.id}).`);\n const [resolverAddress] = await getAction(client, readContract, \"readContract\")({\n address: universalResolverAddress,\n abi: [\n {\n inputs: [{ type: \"bytes\" }],\n name: \"findResolver\",\n outputs: [\n { type: \"address\" },\n { type: \"bytes32\" },\n { type: \"uint256\" }\n ],\n stateMutability: \"view\",\n type: \"function\"\n }\n ],\n functionName: \"findResolver\",\n args: [toHex(packetToBytes(name))],\n blockNumber,\n blockTag\n });\n return resolverAddress;\n }\n var init_getEnsResolver = __esm({\n \"../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/actions/ens/getEnsResolver.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_getChainContractAddress();\n init_toHex();\n init_packetToBytes();\n init_getAction();\n init_readContract();\n }\n });\n\n // ../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/actions/public/createAccessList.js\n async function createAccessList(client, args) {\n const { account: account_ = client.account, blockNumber, blockTag = \"latest\", blobs, data, gas, gasPrice, maxFeePerBlobGas, maxFeePerGas, maxPriorityFeePerGas, to, value, ...rest } = args;\n const account = account_ ? parseAccount(account_) : void 0;\n try {\n assertRequest(args);\n const blockNumberHex = typeof blockNumber === \"bigint\" ? numberToHex(blockNumber) : void 0;\n const block = blockNumberHex || blockTag;\n const chainFormat = client.chain?.formatters?.transactionRequest?.format;\n const format = chainFormat || formatTransactionRequest;\n const request = format({\n // Pick out extra data that might exist on the chain's transaction request type.\n ...extract(rest, { format: chainFormat }),\n account,\n blobs,\n data,\n gas,\n gasPrice,\n maxFeePerBlobGas,\n maxFeePerGas,\n maxPriorityFeePerGas,\n to,\n value\n }, \"createAccessList\");\n const response = await client.request({\n method: \"eth_createAccessList\",\n params: [request, block]\n });\n return {\n accessList: response.accessList,\n gasUsed: BigInt(response.gasUsed)\n };\n } catch (err) {\n throw getCallError(err, {\n ...args,\n account,\n chain: client.chain\n });\n }\n }\n var init_createAccessList = __esm({\n \"../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/actions/public/createAccessList.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_parseAccount();\n init_toHex();\n init_getCallError();\n init_extract();\n init_transactionRequest();\n init_assertRequest();\n }\n });\n\n // ../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/actions/public/createBlockFilter.js\n async function createBlockFilter(client) {\n const getRequest = createFilterRequestScope(client, {\n method: \"eth_newBlockFilter\"\n });\n const id = await client.request({\n method: \"eth_newBlockFilter\"\n });\n return { id, request: getRequest(id), type: \"block\" };\n }\n var init_createBlockFilter = __esm({\n \"../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/actions/public/createBlockFilter.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_createFilterRequestScope();\n }\n });\n\n // ../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/actions/public/createEventFilter.js\n async function createEventFilter(client, { address, args, event, events: events_, fromBlock, strict, toBlock } = {}) {\n const events = events_ ?? (event ? [event] : void 0);\n const getRequest = createFilterRequestScope(client, {\n method: \"eth_newFilter\"\n });\n let topics = [];\n if (events) {\n const encoded = events.flatMap((event2) => encodeEventTopics({\n abi: [event2],\n eventName: event2.name,\n args\n }));\n topics = [encoded];\n if (event)\n topics = topics[0];\n }\n const id = await client.request({\n method: \"eth_newFilter\",\n params: [\n {\n address,\n fromBlock: typeof fromBlock === \"bigint\" ? numberToHex(fromBlock) : fromBlock,\n toBlock: typeof toBlock === \"bigint\" ? numberToHex(toBlock) : toBlock,\n ...topics.length ? { topics } : {}\n }\n ]\n });\n return {\n abi: events,\n args,\n eventName: event ? event.name : void 0,\n fromBlock,\n id,\n request: getRequest(id),\n strict: Boolean(strict),\n toBlock,\n type: \"event\"\n };\n }\n var init_createEventFilter = __esm({\n \"../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/actions/public/createEventFilter.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_encodeEventTopics();\n init_toHex();\n init_createFilterRequestScope();\n }\n });\n\n // ../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/actions/public/createPendingTransactionFilter.js\n async function createPendingTransactionFilter(client) {\n const getRequest = createFilterRequestScope(client, {\n method: \"eth_newPendingTransactionFilter\"\n });\n const id = await client.request({\n method: \"eth_newPendingTransactionFilter\"\n });\n return { id, request: getRequest(id), type: \"transaction\" };\n }\n var init_createPendingTransactionFilter = __esm({\n \"../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/actions/public/createPendingTransactionFilter.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_createFilterRequestScope();\n }\n });\n\n // ../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/actions/public/getBalance.js\n async function getBalance(client, { address, blockNumber, blockTag = client.experimental_blockTag ?? \"latest\" }) {\n const blockNumberHex = typeof blockNumber === \"bigint\" ? numberToHex(blockNumber) : void 0;\n const balance = await client.request({\n method: \"eth_getBalance\",\n params: [address, blockNumberHex || blockTag]\n });\n return BigInt(balance);\n }\n var init_getBalance = __esm({\n \"../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/actions/public/getBalance.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_toHex();\n }\n });\n\n // ../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/actions/public/getBlobBaseFee.js\n async function getBlobBaseFee(client) {\n const baseFee = await client.request({\n method: \"eth_blobBaseFee\"\n });\n return BigInt(baseFee);\n }\n var init_getBlobBaseFee = __esm({\n \"../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/actions/public/getBlobBaseFee.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n }\n });\n\n // ../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/actions/public/getBlockTransactionCount.js\n async function getBlockTransactionCount(client, { blockHash, blockNumber, blockTag = \"latest\" } = {}) {\n const blockNumberHex = blockNumber !== void 0 ? numberToHex(blockNumber) : void 0;\n let count;\n if (blockHash) {\n count = await client.request({\n method: \"eth_getBlockTransactionCountByHash\",\n params: [blockHash]\n }, { dedupe: true });\n } else {\n count = await client.request({\n method: \"eth_getBlockTransactionCountByNumber\",\n params: [blockNumberHex || blockTag]\n }, { dedupe: Boolean(blockNumberHex) });\n }\n return hexToNumber(count);\n }\n var init_getBlockTransactionCount = __esm({\n \"../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/actions/public/getBlockTransactionCount.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_fromHex();\n init_toHex();\n }\n });\n\n // ../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/actions/public/getCode.js\n async function getCode(client, { address, blockNumber, blockTag = \"latest\" }) {\n const blockNumberHex = blockNumber !== void 0 ? numberToHex(blockNumber) : void 0;\n const hex = await client.request({\n method: \"eth_getCode\",\n params: [address, blockNumberHex || blockTag]\n }, { dedupe: Boolean(blockNumberHex) });\n if (hex === \"0x\")\n return void 0;\n return hex;\n }\n var init_getCode = __esm({\n \"../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/actions/public/getCode.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_toHex();\n }\n });\n\n // ../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/errors/eip712.js\n var Eip712DomainNotFoundError;\n var init_eip712 = __esm({\n \"../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/errors/eip712.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_base();\n Eip712DomainNotFoundError = class extends BaseError2 {\n constructor({ address }) {\n super(`No EIP-712 domain found on contract \"${address}\".`, {\n metaMessages: [\n \"Ensure that:\",\n `- The contract is deployed at the address \"${address}\".`,\n \"- `eip712Domain()` function exists on the contract.\",\n \"- `eip712Domain()` function matches signature to ERC-5267 specification.\"\n ],\n name: \"Eip712DomainNotFoundError\"\n });\n }\n };\n }\n });\n\n // ../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/actions/public/getEip712Domain.js\n async function getEip712Domain(client, parameters) {\n const { address, factory, factoryData } = parameters;\n try {\n const [fields, name, version6, chainId, verifyingContract, salt, extensions] = await getAction(client, readContract, \"readContract\")({\n abi,\n address,\n functionName: \"eip712Domain\",\n factory,\n factoryData\n });\n return {\n domain: {\n name,\n version: version6,\n chainId: Number(chainId),\n verifyingContract,\n salt\n },\n extensions,\n fields\n };\n } catch (e3) {\n const error = e3;\n if (error.name === \"ContractFunctionExecutionError\" && error.cause.name === \"ContractFunctionZeroDataError\") {\n throw new Eip712DomainNotFoundError({ address });\n }\n throw error;\n }\n }\n var abi;\n var init_getEip712Domain = __esm({\n \"../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/actions/public/getEip712Domain.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_eip712();\n init_getAction();\n init_readContract();\n abi = [\n {\n inputs: [],\n name: \"eip712Domain\",\n outputs: [\n { name: \"fields\", type: \"bytes1\" },\n { name: \"name\", type: \"string\" },\n { name: \"version\", type: \"string\" },\n { name: \"chainId\", type: \"uint256\" },\n { name: \"verifyingContract\", type: \"address\" },\n { name: \"salt\", type: \"bytes32\" },\n { name: \"extensions\", type: \"uint256[]\" }\n ],\n stateMutability: \"view\",\n type: \"function\"\n }\n ];\n }\n });\n\n // ../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/utils/formatters/feeHistory.js\n function formatFeeHistory(feeHistory) {\n return {\n baseFeePerGas: feeHistory.baseFeePerGas.map((value) => BigInt(value)),\n gasUsedRatio: feeHistory.gasUsedRatio,\n oldestBlock: BigInt(feeHistory.oldestBlock),\n reward: feeHistory.reward?.map((reward) => reward.map((value) => BigInt(value)))\n };\n }\n var init_feeHistory = __esm({\n \"../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/utils/formatters/feeHistory.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n }\n });\n\n // ../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/actions/public/getFeeHistory.js\n async function getFeeHistory(client, { blockCount, blockNumber, blockTag = \"latest\", rewardPercentiles }) {\n const blockNumberHex = typeof blockNumber === \"bigint\" ? numberToHex(blockNumber) : void 0;\n const feeHistory = await client.request({\n method: \"eth_feeHistory\",\n params: [\n numberToHex(blockCount),\n blockNumberHex || blockTag,\n rewardPercentiles\n ]\n }, { dedupe: Boolean(blockNumberHex) });\n return formatFeeHistory(feeHistory);\n }\n var init_getFeeHistory = __esm({\n \"../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/actions/public/getFeeHistory.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_toHex();\n init_feeHistory();\n }\n });\n\n // ../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/actions/public/getFilterLogs.js\n async function getFilterLogs(_client, { filter }) {\n const strict = filter.strict ?? false;\n const logs = await filter.request({\n method: \"eth_getFilterLogs\",\n params: [filter.id]\n });\n const formattedLogs = logs.map((log) => formatLog(log));\n if (!filter.abi)\n return formattedLogs;\n return parseEventLogs({\n abi: filter.abi,\n logs: formattedLogs,\n strict\n });\n }\n var init_getFilterLogs = __esm({\n \"../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/actions/public/getFilterLogs.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_parseEventLogs();\n init_log2();\n }\n });\n\n // ../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/utils/abi/encodePacked.js\n function encodePacked(types, values) {\n if (types.length !== values.length)\n throw new AbiEncodingLengthMismatchError({\n expectedLength: types.length,\n givenLength: values.length\n });\n const data = [];\n for (let i3 = 0; i3 < types.length; i3++) {\n const type = types[i3];\n const value = values[i3];\n data.push(encode(type, value));\n }\n return concatHex(data);\n }\n function encode(type, value, isArray = false) {\n if (type === \"address\") {\n const address = value;\n if (!isAddress(address))\n throw new InvalidAddressError({ address });\n return pad(address.toLowerCase(), {\n size: isArray ? 32 : null\n });\n }\n if (type === \"string\")\n return stringToHex(value);\n if (type === \"bytes\")\n return value;\n if (type === \"bool\")\n return pad(boolToHex(value), { size: isArray ? 32 : 1 });\n const intMatch = type.match(integerRegex2);\n if (intMatch) {\n const [_type, baseType, bits = \"256\"] = intMatch;\n const size6 = Number.parseInt(bits, 10) / 8;\n return numberToHex(value, {\n size: isArray ? 32 : size6,\n signed: baseType === \"int\"\n });\n }\n const bytesMatch = type.match(bytesRegex2);\n if (bytesMatch) {\n const [_type, size6] = bytesMatch;\n if (Number.parseInt(size6, 10) !== (value.length - 2) / 2)\n throw new BytesSizeMismatchError({\n expectedSize: Number.parseInt(size6, 10),\n givenSize: (value.length - 2) / 2\n });\n return pad(value, { dir: \"right\", size: isArray ? 32 : null });\n }\n const arrayMatch = type.match(arrayRegex);\n if (arrayMatch && Array.isArray(value)) {\n const [_type, childType] = arrayMatch;\n const data = [];\n for (let i3 = 0; i3 < value.length; i3++) {\n data.push(encode(childType, value[i3], true));\n }\n if (data.length === 0)\n return \"0x\";\n return concatHex(data);\n }\n throw new UnsupportedPackedAbiType(type);\n }\n var init_encodePacked = __esm({\n \"../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/utils/abi/encodePacked.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_abi();\n init_address();\n init_isAddress();\n init_concat();\n init_pad();\n init_toHex();\n init_regex2();\n }\n });\n\n // ../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/utils/data/isBytes.js\n function isBytes3(value) {\n if (!value)\n return false;\n if (typeof value !== \"object\")\n return false;\n if (!(\"BYTES_PER_ELEMENT\" in value))\n return false;\n return value.BYTES_PER_ELEMENT === 1 && value.constructor.name === \"Uint8Array\";\n }\n var init_isBytes = __esm({\n \"../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/utils/data/isBytes.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n }\n });\n\n // ../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/utils/address/getContractAddress.js\n function getContractAddress2(opts) {\n if (opts.opcode === \"CREATE2\")\n return getCreate2Address(opts);\n return getCreateAddress(opts);\n }\n function getCreateAddress(opts) {\n const from14 = toBytes(getAddress(opts.from));\n let nonce = toBytes(opts.nonce);\n if (nonce[0] === 0)\n nonce = new Uint8Array([]);\n return getAddress(`0x${keccak256(toRlp([from14, nonce], \"bytes\")).slice(26)}`);\n }\n function getCreate2Address(opts) {\n const from14 = toBytes(getAddress(opts.from));\n const salt = pad(isBytes3(opts.salt) ? opts.salt : toBytes(opts.salt), {\n size: 32\n });\n const bytecodeHash = (() => {\n if (\"bytecodeHash\" in opts) {\n if (isBytes3(opts.bytecodeHash))\n return opts.bytecodeHash;\n return toBytes(opts.bytecodeHash);\n }\n return keccak256(opts.bytecode, \"bytes\");\n })();\n return getAddress(slice(keccak256(concat([toBytes(\"0xff\"), from14, salt, bytecodeHash])), 12));\n }\n var init_getContractAddress = __esm({\n \"../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/utils/address/getContractAddress.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_concat();\n init_isBytes();\n init_pad();\n init_slice();\n init_toBytes();\n init_toRlp();\n init_keccak256();\n init_getAddress();\n }\n });\n\n // ../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/utils/transaction/assertTransaction.js\n function assertTransactionEIP7702(transaction) {\n const { authorizationList } = transaction;\n if (authorizationList) {\n for (const authorization of authorizationList) {\n const { chainId } = authorization;\n const address = authorization.address;\n if (!isAddress(address))\n throw new InvalidAddressError({ address });\n if (chainId < 0)\n throw new InvalidChainIdError({ chainId });\n }\n }\n assertTransactionEIP1559(transaction);\n }\n function assertTransactionEIP4844(transaction) {\n const { blobVersionedHashes } = transaction;\n if (blobVersionedHashes) {\n if (blobVersionedHashes.length === 0)\n throw new EmptyBlobError();\n for (const hash3 of blobVersionedHashes) {\n const size_ = size(hash3);\n const version6 = hexToNumber(slice(hash3, 0, 1));\n if (size_ !== 32)\n throw new InvalidVersionedHashSizeError({ hash: hash3, size: size_ });\n if (version6 !== versionedHashVersionKzg)\n throw new InvalidVersionedHashVersionError({\n hash: hash3,\n version: version6\n });\n }\n }\n assertTransactionEIP1559(transaction);\n }\n function assertTransactionEIP1559(transaction) {\n const { chainId, maxPriorityFeePerGas, maxFeePerGas, to } = transaction;\n if (chainId <= 0)\n throw new InvalidChainIdError({ chainId });\n if (to && !isAddress(to))\n throw new InvalidAddressError({ address: to });\n if (maxFeePerGas && maxFeePerGas > maxUint256)\n throw new FeeCapTooHighError({ maxFeePerGas });\n if (maxPriorityFeePerGas && maxFeePerGas && maxPriorityFeePerGas > maxFeePerGas)\n throw new TipAboveFeeCapError({ maxFeePerGas, maxPriorityFeePerGas });\n }\n function assertTransactionEIP2930(transaction) {\n const { chainId, maxPriorityFeePerGas, gasPrice, maxFeePerGas, to } = transaction;\n if (chainId <= 0)\n throw new InvalidChainIdError({ chainId });\n if (to && !isAddress(to))\n throw new InvalidAddressError({ address: to });\n if (maxPriorityFeePerGas || maxFeePerGas)\n throw new BaseError2(\"`maxFeePerGas`/`maxPriorityFeePerGas` is not a valid EIP-2930 Transaction attribute.\");\n if (gasPrice && gasPrice > maxUint256)\n throw new FeeCapTooHighError({ maxFeePerGas: gasPrice });\n }\n function assertTransactionLegacy(transaction) {\n const { chainId, maxPriorityFeePerGas, gasPrice, maxFeePerGas, to } = transaction;\n if (to && !isAddress(to))\n throw new InvalidAddressError({ address: to });\n if (typeof chainId !== \"undefined\" && chainId <= 0)\n throw new InvalidChainIdError({ chainId });\n if (maxPriorityFeePerGas || maxFeePerGas)\n throw new BaseError2(\"`maxFeePerGas`/`maxPriorityFeePerGas` is not a valid Legacy Transaction attribute.\");\n if (gasPrice && gasPrice > maxUint256)\n throw new FeeCapTooHighError({ maxFeePerGas: gasPrice });\n }\n var init_assertTransaction = __esm({\n \"../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/utils/transaction/assertTransaction.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_kzg();\n init_number();\n init_address();\n init_base();\n init_blob2();\n init_chain();\n init_node();\n init_isAddress();\n init_size();\n init_slice();\n init_fromHex();\n }\n });\n\n // ../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/utils/transaction/serializeAccessList.js\n function serializeAccessList(accessList) {\n if (!accessList || accessList.length === 0)\n return [];\n const serializedAccessList = [];\n for (let i3 = 0; i3 < accessList.length; i3++) {\n const { address, storageKeys } = accessList[i3];\n for (let j2 = 0; j2 < storageKeys.length; j2++) {\n if (storageKeys[j2].length - 2 !== 64) {\n throw new InvalidStorageKeySizeError({ storageKey: storageKeys[j2] });\n }\n }\n if (!isAddress(address, { strict: false })) {\n throw new InvalidAddressError({ address });\n }\n serializedAccessList.push([address, storageKeys]);\n }\n return serializedAccessList;\n }\n var init_serializeAccessList = __esm({\n \"../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/utils/transaction/serializeAccessList.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_address();\n init_transaction();\n init_isAddress();\n }\n });\n\n // ../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/utils/transaction/serializeTransaction.js\n function serializeTransaction(transaction, signature) {\n const type = getTransactionType(transaction);\n if (type === \"eip1559\")\n return serializeTransactionEIP1559(transaction, signature);\n if (type === \"eip2930\")\n return serializeTransactionEIP2930(transaction, signature);\n if (type === \"eip4844\")\n return serializeTransactionEIP4844(transaction, signature);\n if (type === \"eip7702\")\n return serializeTransactionEIP7702(transaction, signature);\n return serializeTransactionLegacy(transaction, signature);\n }\n function serializeTransactionEIP7702(transaction, signature) {\n const { authorizationList, chainId, gas, nonce, to, value, maxFeePerGas, maxPriorityFeePerGas, accessList, data } = transaction;\n assertTransactionEIP7702(transaction);\n const serializedAccessList = serializeAccessList(accessList);\n const serializedAuthorizationList = serializeAuthorizationList(authorizationList);\n return concatHex([\n \"0x04\",\n toRlp([\n numberToHex(chainId),\n nonce ? numberToHex(nonce) : \"0x\",\n maxPriorityFeePerGas ? numberToHex(maxPriorityFeePerGas) : \"0x\",\n maxFeePerGas ? numberToHex(maxFeePerGas) : \"0x\",\n gas ? numberToHex(gas) : \"0x\",\n to ?? \"0x\",\n value ? numberToHex(value) : \"0x\",\n data ?? \"0x\",\n serializedAccessList,\n serializedAuthorizationList,\n ...toYParitySignatureArray(transaction, signature)\n ])\n ]);\n }\n function serializeTransactionEIP4844(transaction, signature) {\n const { chainId, gas, nonce, to, value, maxFeePerBlobGas, maxFeePerGas, maxPriorityFeePerGas, accessList, data } = transaction;\n assertTransactionEIP4844(transaction);\n let blobVersionedHashes = transaction.blobVersionedHashes;\n let sidecars = transaction.sidecars;\n if (transaction.blobs && (typeof blobVersionedHashes === \"undefined\" || typeof sidecars === \"undefined\")) {\n const blobs2 = typeof transaction.blobs[0] === \"string\" ? transaction.blobs : transaction.blobs.map((x4) => bytesToHex(x4));\n const kzg = transaction.kzg;\n const commitments2 = blobsToCommitments({\n blobs: blobs2,\n kzg\n });\n if (typeof blobVersionedHashes === \"undefined\")\n blobVersionedHashes = commitmentsToVersionedHashes({\n commitments: commitments2\n });\n if (typeof sidecars === \"undefined\") {\n const proofs2 = blobsToProofs({ blobs: blobs2, commitments: commitments2, kzg });\n sidecars = toBlobSidecars({ blobs: blobs2, commitments: commitments2, proofs: proofs2 });\n }\n }\n const serializedAccessList = serializeAccessList(accessList);\n const serializedTransaction = [\n numberToHex(chainId),\n nonce ? numberToHex(nonce) : \"0x\",\n maxPriorityFeePerGas ? numberToHex(maxPriorityFeePerGas) : \"0x\",\n maxFeePerGas ? numberToHex(maxFeePerGas) : \"0x\",\n gas ? numberToHex(gas) : \"0x\",\n to ?? \"0x\",\n value ? numberToHex(value) : \"0x\",\n data ?? \"0x\",\n serializedAccessList,\n maxFeePerBlobGas ? numberToHex(maxFeePerBlobGas) : \"0x\",\n blobVersionedHashes ?? [],\n ...toYParitySignatureArray(transaction, signature)\n ];\n const blobs = [];\n const commitments = [];\n const proofs = [];\n if (sidecars)\n for (let i3 = 0; i3 < sidecars.length; i3++) {\n const { blob, commitment, proof } = sidecars[i3];\n blobs.push(blob);\n commitments.push(commitment);\n proofs.push(proof);\n }\n return concatHex([\n \"0x03\",\n sidecars ? (\n // If sidecars are enabled, envelope turns into a \"wrapper\":\n toRlp([serializedTransaction, blobs, commitments, proofs])\n ) : (\n // If sidecars are disabled, standard envelope is used:\n toRlp(serializedTransaction)\n )\n ]);\n }\n function serializeTransactionEIP1559(transaction, signature) {\n const { chainId, gas, nonce, to, value, maxFeePerGas, maxPriorityFeePerGas, accessList, data } = transaction;\n assertTransactionEIP1559(transaction);\n const serializedAccessList = serializeAccessList(accessList);\n const serializedTransaction = [\n numberToHex(chainId),\n nonce ? numberToHex(nonce) : \"0x\",\n maxPriorityFeePerGas ? numberToHex(maxPriorityFeePerGas) : \"0x\",\n maxFeePerGas ? numberToHex(maxFeePerGas) : \"0x\",\n gas ? numberToHex(gas) : \"0x\",\n to ?? \"0x\",\n value ? numberToHex(value) : \"0x\",\n data ?? \"0x\",\n serializedAccessList,\n ...toYParitySignatureArray(transaction, signature)\n ];\n return concatHex([\n \"0x02\",\n toRlp(serializedTransaction)\n ]);\n }\n function serializeTransactionEIP2930(transaction, signature) {\n const { chainId, gas, data, nonce, to, value, accessList, gasPrice } = transaction;\n assertTransactionEIP2930(transaction);\n const serializedAccessList = serializeAccessList(accessList);\n const serializedTransaction = [\n numberToHex(chainId),\n nonce ? numberToHex(nonce) : \"0x\",\n gasPrice ? numberToHex(gasPrice) : \"0x\",\n gas ? numberToHex(gas) : \"0x\",\n to ?? \"0x\",\n value ? numberToHex(value) : \"0x\",\n data ?? \"0x\",\n serializedAccessList,\n ...toYParitySignatureArray(transaction, signature)\n ];\n return concatHex([\n \"0x01\",\n toRlp(serializedTransaction)\n ]);\n }\n function serializeTransactionLegacy(transaction, signature) {\n const { chainId = 0, gas, data, nonce, to, value, gasPrice } = transaction;\n assertTransactionLegacy(transaction);\n let serializedTransaction = [\n nonce ? numberToHex(nonce) : \"0x\",\n gasPrice ? numberToHex(gasPrice) : \"0x\",\n gas ? numberToHex(gas) : \"0x\",\n to ?? \"0x\",\n value ? numberToHex(value) : \"0x\",\n data ?? \"0x\"\n ];\n if (signature) {\n const v2 = (() => {\n if (signature.v >= 35n) {\n const inferredChainId = (signature.v - 35n) / 2n;\n if (inferredChainId > 0)\n return signature.v;\n return 27n + (signature.v === 35n ? 0n : 1n);\n }\n if (chainId > 0)\n return BigInt(chainId * 2) + BigInt(35n + signature.v - 27n);\n const v3 = 27n + (signature.v === 27n ? 0n : 1n);\n if (signature.v !== v3)\n throw new InvalidLegacyVError({ v: signature.v });\n return v3;\n })();\n const r2 = trim(signature.r);\n const s4 = trim(signature.s);\n serializedTransaction = [\n ...serializedTransaction,\n numberToHex(v2),\n r2 === \"0x00\" ? \"0x\" : r2,\n s4 === \"0x00\" ? \"0x\" : s4\n ];\n } else if (chainId > 0) {\n serializedTransaction = [\n ...serializedTransaction,\n numberToHex(chainId),\n \"0x\",\n \"0x\"\n ];\n }\n return toRlp(serializedTransaction);\n }\n function toYParitySignatureArray(transaction, signature_) {\n const signature = signature_ ?? transaction;\n const { v: v2, yParity } = signature;\n if (typeof signature.r === \"undefined\")\n return [];\n if (typeof signature.s === \"undefined\")\n return [];\n if (typeof v2 === \"undefined\" && typeof yParity === \"undefined\")\n return [];\n const r2 = trim(signature.r);\n const s4 = trim(signature.s);\n const yParity_ = (() => {\n if (typeof yParity === \"number\")\n return yParity ? numberToHex(1) : \"0x\";\n if (v2 === 0n)\n return \"0x\";\n if (v2 === 1n)\n return numberToHex(1);\n return v2 === 27n ? \"0x\" : numberToHex(1);\n })();\n return [yParity_, r2 === \"0x00\" ? \"0x\" : r2, s4 === \"0x00\" ? \"0x\" : s4];\n }\n var init_serializeTransaction = __esm({\n \"../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/utils/transaction/serializeTransaction.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_transaction();\n init_serializeAuthorizationList();\n init_blobsToCommitments();\n init_blobsToProofs();\n init_commitmentsToVersionedHashes();\n init_toBlobSidecars();\n init_concat();\n init_trim();\n init_toHex();\n init_toRlp();\n init_assertTransaction();\n init_getTransactionType();\n init_serializeAccessList();\n }\n });\n\n // ../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/utils/authorization/serializeAuthorizationList.js\n function serializeAuthorizationList(authorizationList) {\n if (!authorizationList || authorizationList.length === 0)\n return [];\n const serializedAuthorizationList = [];\n for (const authorization of authorizationList) {\n const { chainId, nonce, ...signature } = authorization;\n const contractAddress = authorization.address;\n serializedAuthorizationList.push([\n chainId ? toHex(chainId) : \"0x\",\n contractAddress,\n nonce ? toHex(nonce) : \"0x\",\n ...toYParitySignatureArray({}, signature)\n ]);\n }\n return serializedAuthorizationList;\n }\n var init_serializeAuthorizationList = __esm({\n \"../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/utils/authorization/serializeAuthorizationList.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_toHex();\n init_serializeTransaction();\n }\n });\n\n // ../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/utils/authorization/verifyAuthorization.js\n async function verifyAuthorization({ address, authorization, signature }) {\n return isAddressEqual(getAddress(address), await recoverAuthorizationAddress({\n authorization,\n signature\n }));\n }\n var init_verifyAuthorization = __esm({\n \"../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/utils/authorization/verifyAuthorization.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_getAddress();\n init_isAddressEqual();\n init_recoverAuthorizationAddress();\n }\n });\n\n // ../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/utils/promise/withDedupe.js\n function withDedupe(fn, { enabled = true, id }) {\n if (!enabled || !id)\n return fn();\n if (promiseCache2.get(id))\n return promiseCache2.get(id);\n const promise = fn().finally(() => promiseCache2.delete(id));\n promiseCache2.set(id, promise);\n return promise;\n }\n var promiseCache2;\n var init_withDedupe = __esm({\n \"../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/utils/promise/withDedupe.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_lru();\n promiseCache2 = /* @__PURE__ */ new LruMap(8192);\n }\n });\n\n // ../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/utils/buildRequest.js\n function buildRequest(request, options = {}) {\n return async (args, overrideOptions = {}) => {\n const { dedupe = false, methods, retryDelay = 150, retryCount = 3, uid: uid2 } = {\n ...options,\n ...overrideOptions\n };\n const { method } = args;\n if (methods?.exclude?.includes(method))\n throw new MethodNotSupportedRpcError(new Error(\"method not supported\"), {\n method\n });\n if (methods?.include && !methods.include.includes(method))\n throw new MethodNotSupportedRpcError(new Error(\"method not supported\"), {\n method\n });\n const requestId = dedupe ? stringToHex(`${uid2}.${stringify(args)}`) : void 0;\n return withDedupe(() => withRetry(async () => {\n try {\n return await request(args);\n } catch (err_) {\n const err = err_;\n switch (err.code) {\n case ParseRpcError.code:\n throw new ParseRpcError(err);\n case InvalidRequestRpcError.code:\n throw new InvalidRequestRpcError(err);\n case MethodNotFoundRpcError.code:\n throw new MethodNotFoundRpcError(err, { method: args.method });\n case InvalidParamsRpcError.code:\n throw new InvalidParamsRpcError(err);\n case InternalRpcError.code:\n throw new InternalRpcError(err);\n case InvalidInputRpcError.code:\n throw new InvalidInputRpcError(err);\n case ResourceNotFoundRpcError.code:\n throw new ResourceNotFoundRpcError(err);\n case ResourceUnavailableRpcError.code:\n throw new ResourceUnavailableRpcError(err);\n case TransactionRejectedRpcError.code:\n throw new TransactionRejectedRpcError(err);\n case MethodNotSupportedRpcError.code:\n throw new MethodNotSupportedRpcError(err, {\n method: args.method\n });\n case LimitExceededRpcError.code:\n throw new LimitExceededRpcError(err);\n case JsonRpcVersionUnsupportedError.code:\n throw new JsonRpcVersionUnsupportedError(err);\n case UserRejectedRequestError.code:\n throw new UserRejectedRequestError(err);\n case UnauthorizedProviderError.code:\n throw new UnauthorizedProviderError(err);\n case UnsupportedProviderMethodError.code:\n throw new UnsupportedProviderMethodError(err);\n case ProviderDisconnectedError.code:\n throw new ProviderDisconnectedError(err);\n case ChainDisconnectedError.code:\n throw new ChainDisconnectedError(err);\n case SwitchChainError.code:\n throw new SwitchChainError(err);\n case UnsupportedNonOptionalCapabilityError.code:\n throw new UnsupportedNonOptionalCapabilityError(err);\n case UnsupportedChainIdError.code:\n throw new UnsupportedChainIdError(err);\n case DuplicateIdError.code:\n throw new DuplicateIdError(err);\n case UnknownBundleIdError.code:\n throw new UnknownBundleIdError(err);\n case BundleTooLargeError.code:\n throw new BundleTooLargeError(err);\n case AtomicReadyWalletRejectedUpgradeError.code:\n throw new AtomicReadyWalletRejectedUpgradeError(err);\n case AtomicityNotSupportedError.code:\n throw new AtomicityNotSupportedError(err);\n case 5e3:\n throw new UserRejectedRequestError(err);\n default:\n if (err_ instanceof BaseError2)\n throw err_;\n throw new UnknownRpcError(err);\n }\n }\n }, {\n delay: ({ count, error }) => {\n if (error && error instanceof HttpRequestError) {\n const retryAfter = error?.headers?.get(\"Retry-After\");\n if (retryAfter?.match(/\\d/))\n return Number.parseInt(retryAfter, 10) * 1e3;\n }\n return ~~(1 << count) * retryDelay;\n },\n retryCount,\n shouldRetry: ({ error }) => shouldRetry(error)\n }), { enabled: dedupe, id: requestId });\n };\n }\n function shouldRetry(error) {\n if (\"code\" in error && typeof error.code === \"number\") {\n if (error.code === -1)\n return true;\n if (error.code === LimitExceededRpcError.code)\n return true;\n if (error.code === InternalRpcError.code)\n return true;\n return false;\n }\n if (error instanceof HttpRequestError && error.status) {\n if (error.status === 403)\n return true;\n if (error.status === 408)\n return true;\n if (error.status === 413)\n return true;\n if (error.status === 429)\n return true;\n if (error.status === 500)\n return true;\n if (error.status === 502)\n return true;\n if (error.status === 503)\n return true;\n if (error.status === 504)\n return true;\n return false;\n }\n return true;\n }\n var init_buildRequest = __esm({\n \"../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/utils/buildRequest.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_base();\n init_request();\n init_rpc();\n init_toHex();\n init_withDedupe();\n init_withRetry();\n init_stringify();\n }\n });\n\n // ../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/utils/chain/defineChain.js\n function defineChain(chain2) {\n return {\n formatters: void 0,\n fees: void 0,\n serializers: void 0,\n ...chain2\n };\n }\n var init_defineChain = __esm({\n \"../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/utils/chain/defineChain.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n }\n });\n\n // ../../../node_modules/.pnpm/@noble+hashes@1.8.0/node_modules/@noble/hashes/esm/legacy.js\n function ripemd_f(group, x4, y6, z2) {\n if (group === 0)\n return x4 ^ y6 ^ z2;\n if (group === 1)\n return x4 & y6 | ~x4 & z2;\n if (group === 2)\n return (x4 | ~y6) ^ z2;\n if (group === 3)\n return x4 & z2 | y6 & ~z2;\n return x4 ^ (y6 | ~z2);\n }\n var Rho160, Id160, Pi160, idxLR, idxL, idxR, shifts160, shiftsL160, shiftsR160, Kl160, Kr160, BUF_160, RIPEMD160, ripemd160;\n var init_legacy = __esm({\n \"../../../node_modules/.pnpm/@noble+hashes@1.8.0/node_modules/@noble/hashes/esm/legacy.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_md();\n init_utils3();\n Rho160 = /* @__PURE__ */ Uint8Array.from([\n 7,\n 4,\n 13,\n 1,\n 10,\n 6,\n 15,\n 3,\n 12,\n 0,\n 9,\n 5,\n 2,\n 14,\n 11,\n 8\n ]);\n Id160 = /* @__PURE__ */ (() => Uint8Array.from(new Array(16).fill(0).map((_2, i3) => i3)))();\n Pi160 = /* @__PURE__ */ (() => Id160.map((i3) => (9 * i3 + 5) % 16))();\n idxLR = /* @__PURE__ */ (() => {\n const L2 = [Id160];\n const R3 = [Pi160];\n const res = [L2, R3];\n for (let i3 = 0; i3 < 4; i3++)\n for (let j2 of res)\n j2.push(j2[i3].map((k4) => Rho160[k4]));\n return res;\n })();\n idxL = /* @__PURE__ */ (() => idxLR[0])();\n idxR = /* @__PURE__ */ (() => idxLR[1])();\n shifts160 = /* @__PURE__ */ [\n [11, 14, 15, 12, 5, 8, 7, 9, 11, 13, 14, 15, 6, 7, 9, 8],\n [12, 13, 11, 15, 6, 9, 9, 7, 12, 15, 11, 13, 7, 8, 7, 7],\n [13, 15, 14, 11, 7, 7, 6, 8, 13, 14, 13, 12, 5, 5, 6, 9],\n [14, 11, 12, 14, 8, 6, 5, 5, 15, 12, 15, 14, 9, 9, 8, 6],\n [15, 12, 13, 13, 9, 5, 8, 6, 14, 11, 12, 11, 8, 6, 5, 5]\n ].map((i3) => Uint8Array.from(i3));\n shiftsL160 = /* @__PURE__ */ idxL.map((idx, i3) => idx.map((j2) => shifts160[i3][j2]));\n shiftsR160 = /* @__PURE__ */ idxR.map((idx, i3) => idx.map((j2) => shifts160[i3][j2]));\n Kl160 = /* @__PURE__ */ Uint32Array.from([\n 0,\n 1518500249,\n 1859775393,\n 2400959708,\n 2840853838\n ]);\n Kr160 = /* @__PURE__ */ Uint32Array.from([\n 1352829926,\n 1548603684,\n 1836072691,\n 2053994217,\n 0\n ]);\n BUF_160 = /* @__PURE__ */ new Uint32Array(16);\n RIPEMD160 = class extends HashMD {\n constructor() {\n super(64, 20, 8, true);\n this.h0 = 1732584193 | 0;\n this.h1 = 4023233417 | 0;\n this.h2 = 2562383102 | 0;\n this.h3 = 271733878 | 0;\n this.h4 = 3285377520 | 0;\n }\n get() {\n const { h0, h1, h2: h22, h3: h32, h4 } = this;\n return [h0, h1, h22, h32, h4];\n }\n set(h0, h1, h22, h32, h4) {\n this.h0 = h0 | 0;\n this.h1 = h1 | 0;\n this.h2 = h22 | 0;\n this.h3 = h32 | 0;\n this.h4 = h4 | 0;\n }\n process(view, offset) {\n for (let i3 = 0; i3 < 16; i3++, offset += 4)\n BUF_160[i3] = view.getUint32(offset, true);\n let al = this.h0 | 0, ar = al, bl = this.h1 | 0, br = bl, cl = this.h2 | 0, cr = cl, dl = this.h3 | 0, dr = dl, el = this.h4 | 0, er = el;\n for (let group = 0; group < 5; group++) {\n const rGroup = 4 - group;\n const hbl = Kl160[group], hbr = Kr160[group];\n const rl = idxL[group], rr = idxR[group];\n const sl = shiftsL160[group], sr = shiftsR160[group];\n for (let i3 = 0; i3 < 16; i3++) {\n const tl = rotl(al + ripemd_f(group, bl, cl, dl) + BUF_160[rl[i3]] + hbl, sl[i3]) + el | 0;\n al = el, el = dl, dl = rotl(cl, 10) | 0, cl = bl, bl = tl;\n }\n for (let i3 = 0; i3 < 16; i3++) {\n const tr = rotl(ar + ripemd_f(rGroup, br, cr, dr) + BUF_160[rr[i3]] + hbr, sr[i3]) + er | 0;\n ar = er, er = dr, dr = rotl(cr, 10) | 0, cr = br, br = tr;\n }\n }\n this.set(this.h1 + cl + dr | 0, this.h2 + dl + er | 0, this.h3 + el + ar | 0, this.h4 + al + br | 0, this.h0 + bl + cr | 0);\n }\n roundClean() {\n clean(BUF_160);\n }\n destroy() {\n this.destroyed = true;\n clean(this.buffer);\n this.set(0, 0, 0, 0, 0);\n }\n };\n ripemd160 = /* @__PURE__ */ createHasher(() => new RIPEMD160());\n }\n });\n\n // ../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/utils/promise/withTimeout.js\n function withTimeout(fn, { errorInstance = new Error(\"timed out\"), timeout, signal }) {\n return new Promise((resolve, reject) => {\n ;\n (async () => {\n let timeoutId;\n try {\n const controller = new AbortController();\n if (timeout > 0) {\n timeoutId = setTimeout(() => {\n if (signal) {\n controller.abort();\n } else {\n reject(errorInstance);\n }\n }, timeout);\n }\n resolve(await fn({ signal: controller?.signal || null }));\n } catch (err) {\n if (err?.name === \"AbortError\")\n reject(errorInstance);\n reject(err);\n } finally {\n clearTimeout(timeoutId);\n }\n })();\n });\n }\n var init_withTimeout = __esm({\n \"../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/utils/promise/withTimeout.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n }\n });\n\n // ../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/utils/rpc/id.js\n function createIdStore() {\n return {\n current: 0,\n take() {\n return this.current++;\n },\n reset() {\n this.current = 0;\n }\n };\n }\n var idCache;\n var init_id = __esm({\n \"../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/utils/rpc/id.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n idCache = /* @__PURE__ */ createIdStore();\n }\n });\n\n // ../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/utils/rpc/http.js\n function getHttpRpcClient(url, options = {}) {\n return {\n async request(params) {\n const { body, fetchFn = options.fetchFn ?? fetch, onRequest = options.onRequest, onResponse = options.onResponse, timeout = options.timeout ?? 1e4 } = params;\n const fetchOptions = {\n ...options.fetchOptions ?? {},\n ...params.fetchOptions ?? {}\n };\n const { headers, method, signal: signal_ } = fetchOptions;\n try {\n const response = await withTimeout(async ({ signal }) => {\n const init = {\n ...fetchOptions,\n body: Array.isArray(body) ? stringify(body.map((body2) => ({\n jsonrpc: \"2.0\",\n id: body2.id ?? idCache.take(),\n ...body2\n }))) : stringify({\n jsonrpc: \"2.0\",\n id: body.id ?? idCache.take(),\n ...body\n }),\n headers: {\n \"Content-Type\": \"application/json\",\n ...headers\n },\n method: method || \"POST\",\n signal: signal_ || (timeout > 0 ? signal : null)\n };\n const request = new Request(url, init);\n const args = await onRequest?.(request, init) ?? { ...init, url };\n const response2 = await fetchFn(args.url ?? url, args);\n return response2;\n }, {\n errorInstance: new TimeoutError({ body, url }),\n timeout,\n signal: true\n });\n if (onResponse)\n await onResponse(response);\n let data;\n if (response.headers.get(\"Content-Type\")?.startsWith(\"application/json\"))\n data = await response.json();\n else {\n data = await response.text();\n try {\n data = JSON.parse(data || \"{}\");\n } catch (err) {\n if (response.ok)\n throw err;\n data = { error: data };\n }\n }\n if (!response.ok) {\n throw new HttpRequestError({\n body,\n details: stringify(data.error) || response.statusText,\n headers: response.headers,\n status: response.status,\n url\n });\n }\n return data;\n } catch (err) {\n if (err instanceof HttpRequestError)\n throw err;\n if (err instanceof TimeoutError)\n throw err;\n throw new HttpRequestError({\n body,\n cause: err,\n url\n });\n }\n }\n };\n }\n var init_http = __esm({\n \"../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/utils/rpc/http.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_request();\n init_withTimeout();\n init_stringify();\n init_id();\n }\n });\n\n // ../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/constants/strings.js\n var presignMessagePrefix;\n var init_strings = __esm({\n \"../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/constants/strings.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n presignMessagePrefix = \"\u0019Ethereum Signed Message:\\n\";\n }\n });\n\n // ../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/utils/signature/toPrefixedMessage.js\n function toPrefixedMessage(message_) {\n const message = (() => {\n if (typeof message_ === \"string\")\n return stringToHex(message_);\n if (typeof message_.raw === \"string\")\n return message_.raw;\n return bytesToHex(message_.raw);\n })();\n const prefix = stringToHex(`${presignMessagePrefix}${size(message)}`);\n return concat([prefix, message]);\n }\n var init_toPrefixedMessage = __esm({\n \"../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/utils/signature/toPrefixedMessage.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_strings();\n init_concat();\n init_size();\n init_toHex();\n }\n });\n\n // ../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/utils/signature/hashMessage.js\n function hashMessage(message, to_) {\n return keccak256(toPrefixedMessage(message), to_);\n }\n var init_hashMessage = __esm({\n \"../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/utils/signature/hashMessage.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_keccak256();\n init_toPrefixedMessage();\n }\n });\n\n // ../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/errors/typedData.js\n var InvalidDomainError, InvalidPrimaryTypeError, InvalidStructTypeError;\n var init_typedData = __esm({\n \"../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/errors/typedData.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_stringify();\n init_base();\n InvalidDomainError = class extends BaseError2 {\n constructor({ domain: domain2 }) {\n super(`Invalid domain \"${stringify(domain2)}\".`, {\n metaMessages: [\"Must be a valid EIP-712 domain.\"]\n });\n }\n };\n InvalidPrimaryTypeError = class extends BaseError2 {\n constructor({ primaryType, types }) {\n super(`Invalid primary type \\`${primaryType}\\` must be one of \\`${JSON.stringify(Object.keys(types))}\\`.`, {\n docsPath: \"/api/glossary/Errors#typeddatainvalidprimarytypeerror\",\n metaMessages: [\"Check that the primary type is a key in `types`.\"]\n });\n }\n };\n InvalidStructTypeError = class extends BaseError2 {\n constructor({ type }) {\n super(`Struct type \"${type}\" is invalid.`, {\n metaMessages: [\"Struct type must not be a Solidity type.\"],\n name: \"InvalidStructTypeError\"\n });\n }\n };\n }\n });\n\n // ../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/utils/typedData.js\n function validateTypedData(parameters) {\n const { domain: domain2, message, primaryType, types } = parameters;\n const validateData = (struct, data) => {\n for (const param of struct) {\n const { name, type } = param;\n const value = data[name];\n const integerMatch = type.match(integerRegex2);\n if (integerMatch && (typeof value === \"number\" || typeof value === \"bigint\")) {\n const [_type, base4, size_] = integerMatch;\n numberToHex(value, {\n signed: base4 === \"int\",\n size: Number.parseInt(size_, 10) / 8\n });\n }\n if (type === \"address\" && typeof value === \"string\" && !isAddress(value))\n throw new InvalidAddressError({ address: value });\n const bytesMatch = type.match(bytesRegex2);\n if (bytesMatch) {\n const [_type, size_] = bytesMatch;\n if (size_ && size(value) !== Number.parseInt(size_, 10))\n throw new BytesSizeMismatchError({\n expectedSize: Number.parseInt(size_, 10),\n givenSize: size(value)\n });\n }\n const struct2 = types[type];\n if (struct2) {\n validateReference(type);\n validateData(struct2, value);\n }\n }\n };\n if (types.EIP712Domain && domain2) {\n if (typeof domain2 !== \"object\")\n throw new InvalidDomainError({ domain: domain2 });\n validateData(types.EIP712Domain, domain2);\n }\n if (primaryType !== \"EIP712Domain\") {\n if (types[primaryType])\n validateData(types[primaryType], message);\n else\n throw new InvalidPrimaryTypeError({ primaryType, types });\n }\n }\n function getTypesForEIP712Domain({ domain: domain2 }) {\n return [\n typeof domain2?.name === \"string\" && { name: \"name\", type: \"string\" },\n domain2?.version && { name: \"version\", type: \"string\" },\n (typeof domain2?.chainId === \"number\" || typeof domain2?.chainId === \"bigint\") && {\n name: \"chainId\",\n type: \"uint256\"\n },\n domain2?.verifyingContract && {\n name: \"verifyingContract\",\n type: \"address\"\n },\n domain2?.salt && { name: \"salt\", type: \"bytes32\" }\n ].filter(Boolean);\n }\n function validateReference(type) {\n if (type === \"address\" || type === \"bool\" || type === \"string\" || type.startsWith(\"bytes\") || type.startsWith(\"uint\") || type.startsWith(\"int\"))\n throw new InvalidStructTypeError({ type });\n }\n var init_typedData2 = __esm({\n \"../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/utils/typedData.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_abi();\n init_address();\n init_typedData();\n init_isAddress();\n init_size();\n init_toHex();\n init_regex2();\n }\n });\n\n // ../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/utils/signature/hashTypedData.js\n function hashTypedData(parameters) {\n const { domain: domain2 = {}, message, primaryType } = parameters;\n const types = {\n EIP712Domain: getTypesForEIP712Domain({ domain: domain2 }),\n ...parameters.types\n };\n validateTypedData({\n domain: domain2,\n message,\n primaryType,\n types\n });\n const parts = [\"0x1901\"];\n if (domain2)\n parts.push(hashDomain({\n domain: domain2,\n types\n }));\n if (primaryType !== \"EIP712Domain\")\n parts.push(hashStruct({\n data: message,\n primaryType,\n types\n }));\n return keccak256(concat(parts));\n }\n function hashDomain({ domain: domain2, types }) {\n return hashStruct({\n data: domain2,\n primaryType: \"EIP712Domain\",\n types\n });\n }\n function hashStruct({ data, primaryType, types }) {\n const encoded = encodeData({\n data,\n primaryType,\n types\n });\n return keccak256(encoded);\n }\n function encodeData({ data, primaryType, types }) {\n const encodedTypes = [{ type: \"bytes32\" }];\n const encodedValues = [hashType({ primaryType, types })];\n for (const field of types[primaryType]) {\n const [type, value] = encodeField({\n types,\n name: field.name,\n type: field.type,\n value: data[field.name]\n });\n encodedTypes.push(type);\n encodedValues.push(value);\n }\n return encodeAbiParameters(encodedTypes, encodedValues);\n }\n function hashType({ primaryType, types }) {\n const encodedHashType = toHex(encodeType({ primaryType, types }));\n return keccak256(encodedHashType);\n }\n function encodeType({ primaryType, types }) {\n let result = \"\";\n const unsortedDeps = findTypeDependencies({ primaryType, types });\n unsortedDeps.delete(primaryType);\n const deps = [primaryType, ...Array.from(unsortedDeps).sort()];\n for (const type of deps) {\n result += `${type}(${types[type].map(({ name, type: t3 }) => `${t3} ${name}`).join(\",\")})`;\n }\n return result;\n }\n function findTypeDependencies({ primaryType: primaryType_, types }, results = /* @__PURE__ */ new Set()) {\n const match = primaryType_.match(/^\\w*/u);\n const primaryType = match?.[0];\n if (results.has(primaryType) || types[primaryType] === void 0) {\n return results;\n }\n results.add(primaryType);\n for (const field of types[primaryType]) {\n findTypeDependencies({ primaryType: field.type, types }, results);\n }\n return results;\n }\n function encodeField({ types, name, type, value }) {\n if (types[type] !== void 0) {\n return [\n { type: \"bytes32\" },\n keccak256(encodeData({ data: value, primaryType: type, types }))\n ];\n }\n if (type === \"bytes\") {\n const prepend = value.length % 2 ? \"0\" : \"\";\n value = `0x${prepend + value.slice(2)}`;\n return [{ type: \"bytes32\" }, keccak256(value)];\n }\n if (type === \"string\")\n return [{ type: \"bytes32\" }, keccak256(toHex(value))];\n if (type.lastIndexOf(\"]\") === type.length - 1) {\n const parsedType = type.slice(0, type.lastIndexOf(\"[\"));\n const typeValuePairs = value.map((item) => encodeField({\n name,\n type: parsedType,\n types,\n value: item\n }));\n return [\n { type: \"bytes32\" },\n keccak256(encodeAbiParameters(typeValuePairs.map(([t3]) => t3), typeValuePairs.map(([, v2]) => v2)))\n ];\n }\n return [{ type }, value];\n }\n var init_hashTypedData = __esm({\n \"../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/utils/signature/hashTypedData.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_encodeAbiParameters();\n init_concat();\n init_toHex();\n init_keccak256();\n init_typedData2();\n }\n });\n\n // ../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/constants/bytes.js\n var zeroHash;\n var init_bytes2 = __esm({\n \"../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/constants/bytes.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n zeroHash = \"0x0000000000000000000000000000000000000000000000000000000000000000\";\n }\n });\n\n // ../../../node_modules/.pnpm/ox@0.9.6_typescript@5.8.3_zod@3.25.64/node_modules/ox/_esm/core/internal/lru.js\n var LruMap2;\n var init_lru2 = __esm({\n \"../../../node_modules/.pnpm/ox@0.9.6_typescript@5.8.3_zod@3.25.64/node_modules/ox/_esm/core/internal/lru.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n LruMap2 = class extends Map {\n constructor(size6) {\n super();\n Object.defineProperty(this, \"maxSize\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: void 0\n });\n this.maxSize = size6;\n }\n get(key) {\n const value = super.get(key);\n if (super.has(key) && value !== void 0) {\n this.delete(key);\n super.set(key, value);\n }\n return value;\n }\n set(key, value) {\n super.set(key, value);\n if (this.maxSize && this.size > this.maxSize) {\n const firstKey = this.keys().next().value;\n if (firstKey)\n this.delete(firstKey);\n }\n return this;\n }\n };\n }\n });\n\n // ../../../node_modules/.pnpm/ox@0.9.6_typescript@5.8.3_zod@3.25.64/node_modules/ox/_esm/core/Caches.js\n var caches, checksum;\n var init_Caches = __esm({\n \"../../../node_modules/.pnpm/ox@0.9.6_typescript@5.8.3_zod@3.25.64/node_modules/ox/_esm/core/Caches.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_lru2();\n caches = {\n checksum: /* @__PURE__ */ new LruMap2(8192)\n };\n checksum = caches.checksum;\n }\n });\n\n // ../../../node_modules/.pnpm/ox@0.9.6_typescript@5.8.3_zod@3.25.64/node_modules/ox/_esm/core/Hash.js\n function keccak2562(value, options = {}) {\n const { as = typeof value === \"string\" ? \"Hex\" : \"Bytes\" } = options;\n const bytes = keccak_256(from(value));\n if (as === \"Bytes\")\n return bytes;\n return fromBytes(bytes);\n }\n var init_Hash = __esm({\n \"../../../node_modules/.pnpm/ox@0.9.6_typescript@5.8.3_zod@3.25.64/node_modules/ox/_esm/core/Hash.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_sha3();\n init_Bytes();\n init_Hex();\n }\n });\n\n // ../../../node_modules/.pnpm/ox@0.9.6_typescript@5.8.3_zod@3.25.64/node_modules/ox/_esm/core/PublicKey.js\n function assert4(publicKey, options = {}) {\n const { compressed } = options;\n const { prefix, x: x4, y: y6 } = publicKey;\n if (compressed === false || typeof x4 === \"bigint\" && typeof y6 === \"bigint\") {\n if (prefix !== 4)\n throw new InvalidPrefixError({\n prefix,\n cause: new InvalidUncompressedPrefixError()\n });\n return;\n }\n if (compressed === true || typeof x4 === \"bigint\" && typeof y6 === \"undefined\") {\n if (prefix !== 3 && prefix !== 2)\n throw new InvalidPrefixError({\n prefix,\n cause: new InvalidCompressedPrefixError()\n });\n return;\n }\n throw new InvalidError({ publicKey });\n }\n function from3(value) {\n const publicKey = (() => {\n if (validate2(value))\n return fromHex3(value);\n if (validate(value))\n return fromBytes2(value);\n const { prefix, x: x4, y: y6 } = value;\n if (typeof x4 === \"bigint\" && typeof y6 === \"bigint\")\n return { prefix: prefix ?? 4, x: x4, y: y6 };\n return { prefix, x: x4 };\n })();\n assert4(publicKey);\n return publicKey;\n }\n function fromBytes2(publicKey) {\n return fromHex3(fromBytes(publicKey));\n }\n function fromHex3(publicKey) {\n if (publicKey.length !== 132 && publicKey.length !== 130 && publicKey.length !== 68)\n throw new InvalidSerializedSizeError({ publicKey });\n if (publicKey.length === 130) {\n const x5 = BigInt(slice3(publicKey, 0, 32));\n const y6 = BigInt(slice3(publicKey, 32, 64));\n return {\n prefix: 4,\n x: x5,\n y: y6\n };\n }\n if (publicKey.length === 132) {\n const prefix2 = Number(slice3(publicKey, 0, 1));\n const x5 = BigInt(slice3(publicKey, 1, 33));\n const y6 = BigInt(slice3(publicKey, 33, 65));\n return {\n prefix: prefix2,\n x: x5,\n y: y6\n };\n }\n const prefix = Number(slice3(publicKey, 0, 1));\n const x4 = BigInt(slice3(publicKey, 1, 33));\n return {\n prefix,\n x: x4\n };\n }\n function toHex2(publicKey, options = {}) {\n assert4(publicKey);\n const { prefix, x: x4, y: y6 } = publicKey;\n const { includePrefix = true } = options;\n const publicKey_ = concat2(\n includePrefix ? fromNumber(prefix, { size: 1 }) : \"0x\",\n fromNumber(x4, { size: 32 }),\n // If the public key is not compressed, add the y coordinate.\n typeof y6 === \"bigint\" ? fromNumber(y6, { size: 32 }) : \"0x\"\n );\n return publicKey_;\n }\n var InvalidError, InvalidPrefixError, InvalidCompressedPrefixError, InvalidUncompressedPrefixError, InvalidSerializedSizeError;\n var init_PublicKey = __esm({\n \"../../../node_modules/.pnpm/ox@0.9.6_typescript@5.8.3_zod@3.25.64/node_modules/ox/_esm/core/PublicKey.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_Bytes();\n init_Errors();\n init_Hex();\n init_Json();\n InvalidError = class extends BaseError3 {\n constructor({ publicKey }) {\n super(`Value \\`${stringify2(publicKey)}\\` is not a valid public key.`, {\n metaMessages: [\n \"Public key must contain:\",\n \"- an `x` and `prefix` value (compressed)\",\n \"- an `x`, `y`, and `prefix` value (uncompressed)\"\n ]\n });\n Object.defineProperty(this, \"name\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: \"PublicKey.InvalidError\"\n });\n }\n };\n InvalidPrefixError = class extends BaseError3 {\n constructor({ prefix, cause }) {\n super(`Prefix \"${prefix}\" is invalid.`, {\n cause\n });\n Object.defineProperty(this, \"name\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: \"PublicKey.InvalidPrefixError\"\n });\n }\n };\n InvalidCompressedPrefixError = class extends BaseError3 {\n constructor() {\n super(\"Prefix must be 2 or 3 for compressed public keys.\");\n Object.defineProperty(this, \"name\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: \"PublicKey.InvalidCompressedPrefixError\"\n });\n }\n };\n InvalidUncompressedPrefixError = class extends BaseError3 {\n constructor() {\n super(\"Prefix must be 4 for uncompressed public keys.\");\n Object.defineProperty(this, \"name\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: \"PublicKey.InvalidUncompressedPrefixError\"\n });\n }\n };\n InvalidSerializedSizeError = class extends BaseError3 {\n constructor({ publicKey }) {\n super(`Value \\`${publicKey}\\` is an invalid public key size.`, {\n metaMessages: [\n \"Expected: 33 bytes (compressed + prefix), 64 bytes (uncompressed) or 65 bytes (uncompressed + prefix).\",\n `Received ${size3(from2(publicKey))} bytes.`\n ]\n });\n Object.defineProperty(this, \"name\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: \"PublicKey.InvalidSerializedSizeError\"\n });\n }\n };\n }\n });\n\n // ../../../node_modules/.pnpm/ox@0.9.6_typescript@5.8.3_zod@3.25.64/node_modules/ox/_esm/core/Address.js\n function assert5(value, options = {}) {\n const { strict = true } = options;\n if (!addressRegex2.test(value))\n throw new InvalidAddressError2({\n address: value,\n cause: new InvalidInputError()\n });\n if (strict) {\n if (value.toLowerCase() === value)\n return;\n if (checksum2(value) !== value)\n throw new InvalidAddressError2({\n address: value,\n cause: new InvalidChecksumError()\n });\n }\n }\n function checksum2(address) {\n if (checksum.has(address))\n return checksum.get(address);\n assert5(address, { strict: false });\n const hexAddress = address.substring(2).toLowerCase();\n const hash3 = keccak2562(fromString(hexAddress), { as: \"Bytes\" });\n const characters = hexAddress.split(\"\");\n for (let i3 = 0; i3 < 40; i3 += 2) {\n if (hash3[i3 >> 1] >> 4 >= 8 && characters[i3]) {\n characters[i3] = characters[i3].toUpperCase();\n }\n if ((hash3[i3 >> 1] & 15) >= 8 && characters[i3 + 1]) {\n characters[i3 + 1] = characters[i3 + 1].toUpperCase();\n }\n }\n const result = `0x${characters.join(\"\")}`;\n checksum.set(address, result);\n return result;\n }\n function from4(address, options = {}) {\n const { checksum: checksumVal = false } = options;\n assert5(address);\n if (checksumVal)\n return checksum2(address);\n return address;\n }\n function fromPublicKey(publicKey, options = {}) {\n const address = keccak2562(`0x${toHex2(publicKey).slice(4)}`).substring(26);\n return from4(`0x${address}`, options);\n }\n function validate3(address, options = {}) {\n const { strict = true } = options ?? {};\n try {\n assert5(address, { strict });\n return true;\n } catch {\n return false;\n }\n }\n var addressRegex2, InvalidAddressError2, InvalidInputError, InvalidChecksumError;\n var init_Address = __esm({\n \"../../../node_modules/.pnpm/ox@0.9.6_typescript@5.8.3_zod@3.25.64/node_modules/ox/_esm/core/Address.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_Bytes();\n init_Caches();\n init_Errors();\n init_Hash();\n init_PublicKey();\n addressRegex2 = /^0x[a-fA-F0-9]{40}$/;\n InvalidAddressError2 = class extends BaseError3 {\n constructor({ address, cause }) {\n super(`Address \"${address}\" is invalid.`, {\n cause\n });\n Object.defineProperty(this, \"name\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: \"Address.InvalidAddressError\"\n });\n }\n };\n InvalidInputError = class extends BaseError3 {\n constructor() {\n super(\"Address is not a 20 byte (40 hexadecimal character) value.\");\n Object.defineProperty(this, \"name\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: \"Address.InvalidInputError\"\n });\n }\n };\n InvalidChecksumError = class extends BaseError3 {\n constructor() {\n super(\"Address does not match its checksum counterpart.\");\n Object.defineProperty(this, \"name\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: \"Address.InvalidChecksumError\"\n });\n }\n };\n }\n });\n\n // ../../../node_modules/.pnpm/ox@0.9.6_typescript@5.8.3_zod@3.25.64/node_modules/ox/_esm/core/Solidity.js\n var arrayRegex2, bytesRegex3, integerRegex3, maxInt82, maxInt162, maxInt242, maxInt322, maxInt402, maxInt482, maxInt562, maxInt642, maxInt722, maxInt802, maxInt882, maxInt962, maxInt1042, maxInt1122, maxInt1202, maxInt1282, maxInt1362, maxInt1442, maxInt1522, maxInt1602, maxInt1682, maxInt1762, maxInt1842, maxInt1922, maxInt2002, maxInt2082, maxInt2162, maxInt2242, maxInt2322, maxInt2402, maxInt2482, maxInt2562, minInt82, minInt162, minInt242, minInt322, minInt402, minInt482, minInt562, minInt642, minInt722, minInt802, minInt882, minInt962, minInt1042, minInt1122, minInt1202, minInt1282, minInt1362, minInt1442, minInt1522, minInt1602, minInt1682, minInt1762, minInt1842, minInt1922, minInt2002, minInt2082, minInt2162, minInt2242, minInt2322, minInt2402, minInt2482, minInt2562, maxUint82, maxUint162, maxUint242, maxUint322, maxUint402, maxUint482, maxUint562, maxUint642, maxUint722, maxUint802, maxUint882, maxUint962, maxUint1042, maxUint1122, maxUint1202, maxUint1282, maxUint1362, maxUint1442, maxUint1522, maxUint1602, maxUint1682, maxUint1762, maxUint1842, maxUint1922, maxUint2002, maxUint2082, maxUint2162, maxUint2242, maxUint2322, maxUint2402, maxUint2482, maxUint2562;\n var init_Solidity = __esm({\n \"../../../node_modules/.pnpm/ox@0.9.6_typescript@5.8.3_zod@3.25.64/node_modules/ox/_esm/core/Solidity.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n arrayRegex2 = /^(.*)\\[([0-9]*)\\]$/;\n bytesRegex3 = /^bytes([1-9]|1[0-9]|2[0-9]|3[0-2])?$/;\n integerRegex3 = /^(u?int)(8|16|24|32|40|48|56|64|72|80|88|96|104|112|120|128|136|144|152|160|168|176|184|192|200|208|216|224|232|240|248|256)?$/;\n maxInt82 = 2n ** (8n - 1n) - 1n;\n maxInt162 = 2n ** (16n - 1n) - 1n;\n maxInt242 = 2n ** (24n - 1n) - 1n;\n maxInt322 = 2n ** (32n - 1n) - 1n;\n maxInt402 = 2n ** (40n - 1n) - 1n;\n maxInt482 = 2n ** (48n - 1n) - 1n;\n maxInt562 = 2n ** (56n - 1n) - 1n;\n maxInt642 = 2n ** (64n - 1n) - 1n;\n maxInt722 = 2n ** (72n - 1n) - 1n;\n maxInt802 = 2n ** (80n - 1n) - 1n;\n maxInt882 = 2n ** (88n - 1n) - 1n;\n maxInt962 = 2n ** (96n - 1n) - 1n;\n maxInt1042 = 2n ** (104n - 1n) - 1n;\n maxInt1122 = 2n ** (112n - 1n) - 1n;\n maxInt1202 = 2n ** (120n - 1n) - 1n;\n maxInt1282 = 2n ** (128n - 1n) - 1n;\n maxInt1362 = 2n ** (136n - 1n) - 1n;\n maxInt1442 = 2n ** (144n - 1n) - 1n;\n maxInt1522 = 2n ** (152n - 1n) - 1n;\n maxInt1602 = 2n ** (160n - 1n) - 1n;\n maxInt1682 = 2n ** (168n - 1n) - 1n;\n maxInt1762 = 2n ** (176n - 1n) - 1n;\n maxInt1842 = 2n ** (184n - 1n) - 1n;\n maxInt1922 = 2n ** (192n - 1n) - 1n;\n maxInt2002 = 2n ** (200n - 1n) - 1n;\n maxInt2082 = 2n ** (208n - 1n) - 1n;\n maxInt2162 = 2n ** (216n - 1n) - 1n;\n maxInt2242 = 2n ** (224n - 1n) - 1n;\n maxInt2322 = 2n ** (232n - 1n) - 1n;\n maxInt2402 = 2n ** (240n - 1n) - 1n;\n maxInt2482 = 2n ** (248n - 1n) - 1n;\n maxInt2562 = 2n ** (256n - 1n) - 1n;\n minInt82 = -(2n ** (8n - 1n));\n minInt162 = -(2n ** (16n - 1n));\n minInt242 = -(2n ** (24n - 1n));\n minInt322 = -(2n ** (32n - 1n));\n minInt402 = -(2n ** (40n - 1n));\n minInt482 = -(2n ** (48n - 1n));\n minInt562 = -(2n ** (56n - 1n));\n minInt642 = -(2n ** (64n - 1n));\n minInt722 = -(2n ** (72n - 1n));\n minInt802 = -(2n ** (80n - 1n));\n minInt882 = -(2n ** (88n - 1n));\n minInt962 = -(2n ** (96n - 1n));\n minInt1042 = -(2n ** (104n - 1n));\n minInt1122 = -(2n ** (112n - 1n));\n minInt1202 = -(2n ** (120n - 1n));\n minInt1282 = -(2n ** (128n - 1n));\n minInt1362 = -(2n ** (136n - 1n));\n minInt1442 = -(2n ** (144n - 1n));\n minInt1522 = -(2n ** (152n - 1n));\n minInt1602 = -(2n ** (160n - 1n));\n minInt1682 = -(2n ** (168n - 1n));\n minInt1762 = -(2n ** (176n - 1n));\n minInt1842 = -(2n ** (184n - 1n));\n minInt1922 = -(2n ** (192n - 1n));\n minInt2002 = -(2n ** (200n - 1n));\n minInt2082 = -(2n ** (208n - 1n));\n minInt2162 = -(2n ** (216n - 1n));\n minInt2242 = -(2n ** (224n - 1n));\n minInt2322 = -(2n ** (232n - 1n));\n minInt2402 = -(2n ** (240n - 1n));\n minInt2482 = -(2n ** (248n - 1n));\n minInt2562 = -(2n ** (256n - 1n));\n maxUint82 = 2n ** 8n - 1n;\n maxUint162 = 2n ** 16n - 1n;\n maxUint242 = 2n ** 24n - 1n;\n maxUint322 = 2n ** 32n - 1n;\n maxUint402 = 2n ** 40n - 1n;\n maxUint482 = 2n ** 48n - 1n;\n maxUint562 = 2n ** 56n - 1n;\n maxUint642 = 2n ** 64n - 1n;\n maxUint722 = 2n ** 72n - 1n;\n maxUint802 = 2n ** 80n - 1n;\n maxUint882 = 2n ** 88n - 1n;\n maxUint962 = 2n ** 96n - 1n;\n maxUint1042 = 2n ** 104n - 1n;\n maxUint1122 = 2n ** 112n - 1n;\n maxUint1202 = 2n ** 120n - 1n;\n maxUint1282 = 2n ** 128n - 1n;\n maxUint1362 = 2n ** 136n - 1n;\n maxUint1442 = 2n ** 144n - 1n;\n maxUint1522 = 2n ** 152n - 1n;\n maxUint1602 = 2n ** 160n - 1n;\n maxUint1682 = 2n ** 168n - 1n;\n maxUint1762 = 2n ** 176n - 1n;\n maxUint1842 = 2n ** 184n - 1n;\n maxUint1922 = 2n ** 192n - 1n;\n maxUint2002 = 2n ** 200n - 1n;\n maxUint2082 = 2n ** 208n - 1n;\n maxUint2162 = 2n ** 216n - 1n;\n maxUint2242 = 2n ** 224n - 1n;\n maxUint2322 = 2n ** 232n - 1n;\n maxUint2402 = 2n ** 240n - 1n;\n maxUint2482 = 2n ** 248n - 1n;\n maxUint2562 = 2n ** 256n - 1n;\n }\n });\n\n // ../../../node_modules/.pnpm/ox@0.9.6_typescript@5.8.3_zod@3.25.64/node_modules/ox/_esm/core/internal/abiParameters.js\n function decodeParameter2(cursor, param, options) {\n const { checksumAddress: checksumAddress2, staticPosition } = options;\n const arrayComponents = getArrayComponents2(param.type);\n if (arrayComponents) {\n const [length2, type] = arrayComponents;\n return decodeArray2(cursor, { ...param, type }, { checksumAddress: checksumAddress2, length: length2, staticPosition });\n }\n if (param.type === \"tuple\")\n return decodeTuple2(cursor, param, {\n checksumAddress: checksumAddress2,\n staticPosition\n });\n if (param.type === \"address\")\n return decodeAddress2(cursor, { checksum: checksumAddress2 });\n if (param.type === \"bool\")\n return decodeBool2(cursor);\n if (param.type.startsWith(\"bytes\"))\n return decodeBytes2(cursor, param, { staticPosition });\n if (param.type.startsWith(\"uint\") || param.type.startsWith(\"int\"))\n return decodeNumber2(cursor, param);\n if (param.type === \"string\")\n return decodeString2(cursor, { staticPosition });\n throw new InvalidTypeError(param.type);\n }\n function decodeAddress2(cursor, options = {}) {\n const { checksum: checksum4 = false } = options;\n const value = cursor.readBytes(32);\n const wrap3 = (address) => checksum4 ? checksum2(address) : address;\n return [wrap3(fromBytes(slice2(value, -20))), 32];\n }\n function decodeArray2(cursor, param, options) {\n const { checksumAddress: checksumAddress2, length: length2, staticPosition } = options;\n if (!length2) {\n const offset = toNumber2(cursor.readBytes(sizeOfOffset2));\n const start = staticPosition + offset;\n const startOfData = start + sizeOfLength2;\n cursor.setPosition(start);\n const length3 = toNumber2(cursor.readBytes(sizeOfLength2));\n const dynamicChild = hasDynamicChild2(param);\n let consumed2 = 0;\n const value2 = [];\n for (let i3 = 0; i3 < length3; ++i3) {\n cursor.setPosition(startOfData + (dynamicChild ? i3 * 32 : consumed2));\n const [data, consumed_] = decodeParameter2(cursor, param, {\n checksumAddress: checksumAddress2,\n staticPosition: startOfData\n });\n consumed2 += consumed_;\n value2.push(data);\n }\n cursor.setPosition(staticPosition + 32);\n return [value2, 32];\n }\n if (hasDynamicChild2(param)) {\n const offset = toNumber2(cursor.readBytes(sizeOfOffset2));\n const start = staticPosition + offset;\n const value2 = [];\n for (let i3 = 0; i3 < length2; ++i3) {\n cursor.setPosition(start + i3 * 32);\n const [data] = decodeParameter2(cursor, param, {\n checksumAddress: checksumAddress2,\n staticPosition: start\n });\n value2.push(data);\n }\n cursor.setPosition(staticPosition + 32);\n return [value2, 32];\n }\n let consumed = 0;\n const value = [];\n for (let i3 = 0; i3 < length2; ++i3) {\n const [data, consumed_] = decodeParameter2(cursor, param, {\n checksumAddress: checksumAddress2,\n staticPosition: staticPosition + consumed\n });\n consumed += consumed_;\n value.push(data);\n }\n return [value, consumed];\n }\n function decodeBool2(cursor) {\n return [toBoolean(cursor.readBytes(32), { size: 32 }), 32];\n }\n function decodeBytes2(cursor, param, { staticPosition }) {\n const [_2, size6] = param.type.split(\"bytes\");\n if (!size6) {\n const offset = toNumber2(cursor.readBytes(32));\n cursor.setPosition(staticPosition + offset);\n const length2 = toNumber2(cursor.readBytes(32));\n if (length2 === 0) {\n cursor.setPosition(staticPosition + 32);\n return [\"0x\", 32];\n }\n const data = cursor.readBytes(length2);\n cursor.setPosition(staticPosition + 32);\n return [fromBytes(data), 32];\n }\n const value = fromBytes(cursor.readBytes(Number.parseInt(size6, 10), 32));\n return [value, 32];\n }\n function decodeNumber2(cursor, param) {\n const signed = param.type.startsWith(\"int\");\n const size6 = Number.parseInt(param.type.split(\"int\")[1] || \"256\", 10);\n const value = cursor.readBytes(32);\n return [\n size6 > 48 ? toBigInt2(value, { signed }) : toNumber2(value, { signed }),\n 32\n ];\n }\n function decodeTuple2(cursor, param, options) {\n const { checksumAddress: checksumAddress2, staticPosition } = options;\n const hasUnnamedChild = param.components.length === 0 || param.components.some(({ name }) => !name);\n const value = hasUnnamedChild ? [] : {};\n let consumed = 0;\n if (hasDynamicChild2(param)) {\n const offset = toNumber2(cursor.readBytes(sizeOfOffset2));\n const start = staticPosition + offset;\n for (let i3 = 0; i3 < param.components.length; ++i3) {\n const component = param.components[i3];\n cursor.setPosition(start + consumed);\n const [data, consumed_] = decodeParameter2(cursor, component, {\n checksumAddress: checksumAddress2,\n staticPosition: start\n });\n consumed += consumed_;\n value[hasUnnamedChild ? i3 : component?.name] = data;\n }\n cursor.setPosition(staticPosition + 32);\n return [value, 32];\n }\n for (let i3 = 0; i3 < param.components.length; ++i3) {\n const component = param.components[i3];\n const [data, consumed_] = decodeParameter2(cursor, component, {\n checksumAddress: checksumAddress2,\n staticPosition\n });\n value[hasUnnamedChild ? i3 : component?.name] = data;\n consumed += consumed_;\n }\n return [value, consumed];\n }\n function decodeString2(cursor, { staticPosition }) {\n const offset = toNumber2(cursor.readBytes(32));\n const start = staticPosition + offset;\n cursor.setPosition(start);\n const length2 = toNumber2(cursor.readBytes(32));\n if (length2 === 0) {\n cursor.setPosition(staticPosition + 32);\n return [\"\", 32];\n }\n const data = cursor.readBytes(length2, 32);\n const value = toString(trimLeft(data));\n cursor.setPosition(staticPosition + 32);\n return [value, 32];\n }\n function prepareParameters({ checksumAddress: checksumAddress2, parameters, values }) {\n const preparedParameters = [];\n for (let i3 = 0; i3 < parameters.length; i3++) {\n preparedParameters.push(prepareParameter({\n checksumAddress: checksumAddress2,\n parameter: parameters[i3],\n value: values[i3]\n }));\n }\n return preparedParameters;\n }\n function prepareParameter({ checksumAddress: checksumAddress2 = false, parameter: parameter_, value }) {\n const parameter = parameter_;\n const arrayComponents = getArrayComponents2(parameter.type);\n if (arrayComponents) {\n const [length2, type] = arrayComponents;\n return encodeArray2(value, {\n checksumAddress: checksumAddress2,\n length: length2,\n parameter: {\n ...parameter,\n type\n }\n });\n }\n if (parameter.type === \"tuple\") {\n return encodeTuple2(value, {\n checksumAddress: checksumAddress2,\n parameter\n });\n }\n if (parameter.type === \"address\") {\n return encodeAddress2(value, {\n checksum: checksumAddress2\n });\n }\n if (parameter.type === \"bool\") {\n return encodeBoolean(value);\n }\n if (parameter.type.startsWith(\"uint\") || parameter.type.startsWith(\"int\")) {\n const signed = parameter.type.startsWith(\"int\");\n const [, , size6 = \"256\"] = integerRegex3.exec(parameter.type) ?? [];\n return encodeNumber2(value, {\n signed,\n size: Number(size6)\n });\n }\n if (parameter.type.startsWith(\"bytes\")) {\n return encodeBytes2(value, { type: parameter.type });\n }\n if (parameter.type === \"string\") {\n return encodeString2(value);\n }\n throw new InvalidTypeError(parameter.type);\n }\n function encode2(preparedParameters) {\n let staticSize = 0;\n for (let i3 = 0; i3 < preparedParameters.length; i3++) {\n const { dynamic, encoded } = preparedParameters[i3];\n if (dynamic)\n staticSize += 32;\n else\n staticSize += size3(encoded);\n }\n const staticParameters = [];\n const dynamicParameters = [];\n let dynamicSize = 0;\n for (let i3 = 0; i3 < preparedParameters.length; i3++) {\n const { dynamic, encoded } = preparedParameters[i3];\n if (dynamic) {\n staticParameters.push(fromNumber(staticSize + dynamicSize, { size: 32 }));\n dynamicParameters.push(encoded);\n dynamicSize += size3(encoded);\n } else {\n staticParameters.push(encoded);\n }\n }\n return concat2(...staticParameters, ...dynamicParameters);\n }\n function encodeAddress2(value, options) {\n const { checksum: checksum4 = false } = options;\n assert5(value, { strict: checksum4 });\n return {\n dynamic: false,\n encoded: padLeft(value.toLowerCase())\n };\n }\n function encodeArray2(value, options) {\n const { checksumAddress: checksumAddress2, length: length2, parameter } = options;\n const dynamic = length2 === null;\n if (!Array.isArray(value))\n throw new InvalidArrayError2(value);\n if (!dynamic && value.length !== length2)\n throw new ArrayLengthMismatchError({\n expectedLength: length2,\n givenLength: value.length,\n type: `${parameter.type}[${length2}]`\n });\n let dynamicChild = false;\n const preparedParameters = [];\n for (let i3 = 0; i3 < value.length; i3++) {\n const preparedParam = prepareParameter({\n checksumAddress: checksumAddress2,\n parameter,\n value: value[i3]\n });\n if (preparedParam.dynamic)\n dynamicChild = true;\n preparedParameters.push(preparedParam);\n }\n if (dynamic || dynamicChild) {\n const data = encode2(preparedParameters);\n if (dynamic) {\n const length3 = fromNumber(preparedParameters.length, { size: 32 });\n return {\n dynamic: true,\n encoded: preparedParameters.length > 0 ? concat2(length3, data) : length3\n };\n }\n if (dynamicChild)\n return { dynamic: true, encoded: data };\n }\n return {\n dynamic: false,\n encoded: concat2(...preparedParameters.map(({ encoded }) => encoded))\n };\n }\n function encodeBytes2(value, { type }) {\n const [, parametersize] = type.split(\"bytes\");\n const bytesSize = size3(value);\n if (!parametersize) {\n let value_ = value;\n if (bytesSize % 32 !== 0)\n value_ = padRight(value_, Math.ceil((value.length - 2) / 2 / 32) * 32);\n return {\n dynamic: true,\n encoded: concat2(padLeft(fromNumber(bytesSize, { size: 32 })), value_)\n };\n }\n if (bytesSize !== Number.parseInt(parametersize, 10))\n throw new BytesSizeMismatchError2({\n expectedSize: Number.parseInt(parametersize, 10),\n value\n });\n return { dynamic: false, encoded: padRight(value) };\n }\n function encodeBoolean(value) {\n if (typeof value !== \"boolean\")\n throw new BaseError3(`Invalid boolean value: \"${value}\" (type: ${typeof value}). Expected: \\`true\\` or \\`false\\`.`);\n return { dynamic: false, encoded: padLeft(fromBoolean(value)) };\n }\n function encodeNumber2(value, { signed, size: size6 }) {\n if (typeof size6 === \"number\") {\n const max = 2n ** (BigInt(size6) - (signed ? 1n : 0n)) - 1n;\n const min = signed ? -max - 1n : 0n;\n if (value > max || value < min)\n throw new IntegerOutOfRangeError2({\n max: max.toString(),\n min: min.toString(),\n signed,\n size: size6 / 8,\n value: value.toString()\n });\n }\n return {\n dynamic: false,\n encoded: fromNumber(value, {\n size: 32,\n signed\n })\n };\n }\n function encodeString2(value) {\n const hexValue = fromString2(value);\n const partsLength = Math.ceil(size3(hexValue) / 32);\n const parts = [];\n for (let i3 = 0; i3 < partsLength; i3++) {\n parts.push(padRight(slice3(hexValue, i3 * 32, (i3 + 1) * 32)));\n }\n return {\n dynamic: true,\n encoded: concat2(padRight(fromNumber(size3(hexValue), { size: 32 })), ...parts)\n };\n }\n function encodeTuple2(value, options) {\n const { checksumAddress: checksumAddress2, parameter } = options;\n let dynamic = false;\n const preparedParameters = [];\n for (let i3 = 0; i3 < parameter.components.length; i3++) {\n const param_ = parameter.components[i3];\n const index2 = Array.isArray(value) ? i3 : param_.name;\n const preparedParam = prepareParameter({\n checksumAddress: checksumAddress2,\n parameter: param_,\n value: value[index2]\n });\n preparedParameters.push(preparedParam);\n if (preparedParam.dynamic)\n dynamic = true;\n }\n return {\n dynamic,\n encoded: dynamic ? encode2(preparedParameters) : concat2(...preparedParameters.map(({ encoded }) => encoded))\n };\n }\n function getArrayComponents2(type) {\n const matches = type.match(/^(.*)\\[(\\d+)?\\]$/);\n return matches ? (\n // Return `null` if the array is dynamic.\n [matches[2] ? Number(matches[2]) : null, matches[1]]\n ) : void 0;\n }\n function hasDynamicChild2(param) {\n const { type } = param;\n if (type === \"string\")\n return true;\n if (type === \"bytes\")\n return true;\n if (type.endsWith(\"[]\"))\n return true;\n if (type === \"tuple\")\n return param.components?.some(hasDynamicChild2);\n const arrayComponents = getArrayComponents2(param.type);\n if (arrayComponents && hasDynamicChild2({\n ...param,\n type: arrayComponents[1]\n }))\n return true;\n return false;\n }\n var sizeOfLength2, sizeOfOffset2;\n var init_abiParameters = __esm({\n \"../../../node_modules/.pnpm/ox@0.9.6_typescript@5.8.3_zod@3.25.64/node_modules/ox/_esm/core/internal/abiParameters.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_AbiParameters();\n init_Address();\n init_Bytes();\n init_Errors();\n init_Hex();\n init_Solidity();\n sizeOfLength2 = 32;\n sizeOfOffset2 = 32;\n }\n });\n\n // ../../../node_modules/.pnpm/ox@0.9.6_typescript@5.8.3_zod@3.25.64/node_modules/ox/_esm/core/internal/cursor.js\n function create(bytes, { recursiveReadLimit = 8192 } = {}) {\n const cursor = Object.create(staticCursor2);\n cursor.bytes = bytes;\n cursor.dataView = new DataView(bytes.buffer, bytes.byteOffset, bytes.byteLength);\n cursor.positionReadCount = /* @__PURE__ */ new Map();\n cursor.recursiveReadLimit = recursiveReadLimit;\n return cursor;\n }\n var staticCursor2, NegativeOffsetError2, PositionOutOfBoundsError2, RecursiveReadLimitExceededError2;\n var init_cursor3 = __esm({\n \"../../../node_modules/.pnpm/ox@0.9.6_typescript@5.8.3_zod@3.25.64/node_modules/ox/_esm/core/internal/cursor.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_Errors();\n staticCursor2 = {\n bytes: new Uint8Array(),\n dataView: new DataView(new ArrayBuffer(0)),\n position: 0,\n positionReadCount: /* @__PURE__ */ new Map(),\n recursiveReadCount: 0,\n recursiveReadLimit: Number.POSITIVE_INFINITY,\n assertReadLimit() {\n if (this.recursiveReadCount >= this.recursiveReadLimit)\n throw new RecursiveReadLimitExceededError2({\n count: this.recursiveReadCount + 1,\n limit: this.recursiveReadLimit\n });\n },\n assertPosition(position) {\n if (position < 0 || position > this.bytes.length - 1)\n throw new PositionOutOfBoundsError2({\n length: this.bytes.length,\n position\n });\n },\n decrementPosition(offset) {\n if (offset < 0)\n throw new NegativeOffsetError2({ offset });\n const position = this.position - offset;\n this.assertPosition(position);\n this.position = position;\n },\n getReadCount(position) {\n return this.positionReadCount.get(position || this.position) || 0;\n },\n incrementPosition(offset) {\n if (offset < 0)\n throw new NegativeOffsetError2({ offset });\n const position = this.position + offset;\n this.assertPosition(position);\n this.position = position;\n },\n inspectByte(position_) {\n const position = position_ ?? this.position;\n this.assertPosition(position);\n return this.bytes[position];\n },\n inspectBytes(length2, position_) {\n const position = position_ ?? this.position;\n this.assertPosition(position + length2 - 1);\n return this.bytes.subarray(position, position + length2);\n },\n inspectUint8(position_) {\n const position = position_ ?? this.position;\n this.assertPosition(position);\n return this.bytes[position];\n },\n inspectUint16(position_) {\n const position = position_ ?? this.position;\n this.assertPosition(position + 1);\n return this.dataView.getUint16(position);\n },\n inspectUint24(position_) {\n const position = position_ ?? this.position;\n this.assertPosition(position + 2);\n return (this.dataView.getUint16(position) << 8) + this.dataView.getUint8(position + 2);\n },\n inspectUint32(position_) {\n const position = position_ ?? this.position;\n this.assertPosition(position + 3);\n return this.dataView.getUint32(position);\n },\n pushByte(byte) {\n this.assertPosition(this.position);\n this.bytes[this.position] = byte;\n this.position++;\n },\n pushBytes(bytes) {\n this.assertPosition(this.position + bytes.length - 1);\n this.bytes.set(bytes, this.position);\n this.position += bytes.length;\n },\n pushUint8(value) {\n this.assertPosition(this.position);\n this.bytes[this.position] = value;\n this.position++;\n },\n pushUint16(value) {\n this.assertPosition(this.position + 1);\n this.dataView.setUint16(this.position, value);\n this.position += 2;\n },\n pushUint24(value) {\n this.assertPosition(this.position + 2);\n this.dataView.setUint16(this.position, value >> 8);\n this.dataView.setUint8(this.position + 2, value & ~4294967040);\n this.position += 3;\n },\n pushUint32(value) {\n this.assertPosition(this.position + 3);\n this.dataView.setUint32(this.position, value);\n this.position += 4;\n },\n readByte() {\n this.assertReadLimit();\n this._touch();\n const value = this.inspectByte();\n this.position++;\n return value;\n },\n readBytes(length2, size6) {\n this.assertReadLimit();\n this._touch();\n const value = this.inspectBytes(length2);\n this.position += size6 ?? length2;\n return value;\n },\n readUint8() {\n this.assertReadLimit();\n this._touch();\n const value = this.inspectUint8();\n this.position += 1;\n return value;\n },\n readUint16() {\n this.assertReadLimit();\n this._touch();\n const value = this.inspectUint16();\n this.position += 2;\n return value;\n },\n readUint24() {\n this.assertReadLimit();\n this._touch();\n const value = this.inspectUint24();\n this.position += 3;\n return value;\n },\n readUint32() {\n this.assertReadLimit();\n this._touch();\n const value = this.inspectUint32();\n this.position += 4;\n return value;\n },\n get remaining() {\n return this.bytes.length - this.position;\n },\n setPosition(position) {\n const oldPosition = this.position;\n this.assertPosition(position);\n this.position = position;\n return () => this.position = oldPosition;\n },\n _touch() {\n if (this.recursiveReadLimit === Number.POSITIVE_INFINITY)\n return;\n const count = this.getReadCount();\n this.positionReadCount.set(this.position, count + 1);\n if (count > 0)\n this.recursiveReadCount++;\n }\n };\n NegativeOffsetError2 = class extends BaseError3 {\n constructor({ offset }) {\n super(`Offset \\`${offset}\\` cannot be negative.`);\n Object.defineProperty(this, \"name\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: \"Cursor.NegativeOffsetError\"\n });\n }\n };\n PositionOutOfBoundsError2 = class extends BaseError3 {\n constructor({ length: length2, position }) {\n super(`Position \\`${position}\\` is out of bounds (\\`0 < position < ${length2}\\`).`);\n Object.defineProperty(this, \"name\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: \"Cursor.PositionOutOfBoundsError\"\n });\n }\n };\n RecursiveReadLimitExceededError2 = class extends BaseError3 {\n constructor({ count, limit }) {\n super(`Recursive read limit of \\`${limit}\\` exceeded (recursive read count: \\`${count}\\`).`);\n Object.defineProperty(this, \"name\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: \"Cursor.RecursiveReadLimitExceededError\"\n });\n }\n };\n }\n });\n\n // ../../../node_modules/.pnpm/ox@0.9.6_typescript@5.8.3_zod@3.25.64/node_modules/ox/_esm/core/AbiParameters.js\n function decode(parameters, data, options = {}) {\n const { as = \"Array\", checksumAddress: checksumAddress2 = false } = options;\n const bytes = typeof data === \"string\" ? fromHex2(data) : data;\n const cursor = create(bytes);\n if (size2(bytes) === 0 && parameters.length > 0)\n throw new ZeroDataError();\n if (size2(bytes) && size2(bytes) < 32)\n throw new DataSizeTooSmallError({\n data: typeof data === \"string\" ? data : fromBytes(data),\n parameters,\n size: size2(bytes)\n });\n let consumed = 0;\n const values = as === \"Array\" ? [] : {};\n for (let i3 = 0; i3 < parameters.length; ++i3) {\n const param = parameters[i3];\n cursor.setPosition(consumed);\n const [data2, consumed_] = decodeParameter2(cursor, param, {\n checksumAddress: checksumAddress2,\n staticPosition: 0\n });\n consumed += consumed_;\n if (as === \"Array\")\n values.push(data2);\n else\n values[param.name ?? i3] = data2;\n }\n return values;\n }\n function encode3(parameters, values, options) {\n const { checksumAddress: checksumAddress2 = false } = options ?? {};\n if (parameters.length !== values.length)\n throw new LengthMismatchError({\n expectedLength: parameters.length,\n givenLength: values.length\n });\n const preparedParameters = prepareParameters({\n checksumAddress: checksumAddress2,\n parameters,\n values\n });\n const data = encode2(preparedParameters);\n if (data.length === 0)\n return \"0x\";\n return data;\n }\n function encodePacked2(types, values) {\n if (types.length !== values.length)\n throw new LengthMismatchError({\n expectedLength: types.length,\n givenLength: values.length\n });\n const data = [];\n for (let i3 = 0; i3 < types.length; i3++) {\n const type = types[i3];\n const value = values[i3];\n data.push(encodePacked2.encode(type, value));\n }\n return concat2(...data);\n }\n function from5(parameters) {\n if (Array.isArray(parameters) && typeof parameters[0] === \"string\")\n return parseAbiParameters(parameters);\n if (typeof parameters === \"string\")\n return parseAbiParameters(parameters);\n return parameters;\n }\n var DataSizeTooSmallError, ZeroDataError, ArrayLengthMismatchError, BytesSizeMismatchError2, LengthMismatchError, InvalidArrayError2, InvalidTypeError;\n var init_AbiParameters = __esm({\n \"../../../node_modules/.pnpm/ox@0.9.6_typescript@5.8.3_zod@3.25.64/node_modules/ox/_esm/core/AbiParameters.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_exports();\n init_Address();\n init_Bytes();\n init_Errors();\n init_Hex();\n init_abiParameters();\n init_cursor3();\n init_Solidity();\n (function(encodePacked3) {\n function encode6(type, value, isArray = false) {\n if (type === \"address\") {\n const address = value;\n assert5(address);\n return padLeft(address.toLowerCase(), isArray ? 32 : 0);\n }\n if (type === \"string\")\n return fromString2(value);\n if (type === \"bytes\")\n return value;\n if (type === \"bool\")\n return padLeft(fromBoolean(value), isArray ? 32 : 1);\n const intMatch = type.match(integerRegex3);\n if (intMatch) {\n const [_type, baseType, bits = \"256\"] = intMatch;\n const size6 = Number.parseInt(bits, 10) / 8;\n return fromNumber(value, {\n size: isArray ? 32 : size6,\n signed: baseType === \"int\"\n });\n }\n const bytesMatch = type.match(bytesRegex3);\n if (bytesMatch) {\n const [_type, size6] = bytesMatch;\n if (Number.parseInt(size6, 10) !== (value.length - 2) / 2)\n throw new BytesSizeMismatchError2({\n expectedSize: Number.parseInt(size6, 10),\n value\n });\n return padRight(value, isArray ? 32 : 0);\n }\n const arrayMatch = type.match(arrayRegex2);\n if (arrayMatch && Array.isArray(value)) {\n const [_type, childType] = arrayMatch;\n const data = [];\n for (let i3 = 0; i3 < value.length; i3++) {\n data.push(encode6(childType, value[i3], true));\n }\n if (data.length === 0)\n return \"0x\";\n return concat2(...data);\n }\n throw new InvalidTypeError(type);\n }\n encodePacked3.encode = encode6;\n })(encodePacked2 || (encodePacked2 = {}));\n DataSizeTooSmallError = class extends BaseError3 {\n constructor({ data, parameters, size: size6 }) {\n super(`Data size of ${size6} bytes is too small for given parameters.`, {\n metaMessages: [\n `Params: (${formatAbiParameters(parameters)})`,\n `Data: ${data} (${size6} bytes)`\n ]\n });\n Object.defineProperty(this, \"name\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: \"AbiParameters.DataSizeTooSmallError\"\n });\n }\n };\n ZeroDataError = class extends BaseError3 {\n constructor() {\n super('Cannot decode zero data (\"0x\") with ABI parameters.');\n Object.defineProperty(this, \"name\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: \"AbiParameters.ZeroDataError\"\n });\n }\n };\n ArrayLengthMismatchError = class extends BaseError3 {\n constructor({ expectedLength, givenLength, type }) {\n super(`Array length mismatch for type \\`${type}\\`. Expected: \\`${expectedLength}\\`. Given: \\`${givenLength}\\`.`);\n Object.defineProperty(this, \"name\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: \"AbiParameters.ArrayLengthMismatchError\"\n });\n }\n };\n BytesSizeMismatchError2 = class extends BaseError3 {\n constructor({ expectedSize, value }) {\n super(`Size of bytes \"${value}\" (bytes${size3(value)}) does not match expected size (bytes${expectedSize}).`);\n Object.defineProperty(this, \"name\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: \"AbiParameters.BytesSizeMismatchError\"\n });\n }\n };\n LengthMismatchError = class extends BaseError3 {\n constructor({ expectedLength, givenLength }) {\n super([\n \"ABI encoding parameters/values length mismatch.\",\n `Expected length (parameters): ${expectedLength}`,\n `Given length (values): ${givenLength}`\n ].join(\"\\n\"));\n Object.defineProperty(this, \"name\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: \"AbiParameters.LengthMismatchError\"\n });\n }\n };\n InvalidArrayError2 = class extends BaseError3 {\n constructor(value) {\n super(`Value \\`${value}\\` is not a valid array.`);\n Object.defineProperty(this, \"name\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: \"AbiParameters.InvalidArrayError\"\n });\n }\n };\n InvalidTypeError = class extends BaseError3 {\n constructor(type) {\n super(`Type \\`${type}\\` is not a valid ABI Type.`);\n Object.defineProperty(this, \"name\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: \"AbiParameters.InvalidTypeError\"\n });\n }\n };\n }\n });\n\n // ../../../node_modules/.pnpm/ox@0.9.6_typescript@5.8.3_zod@3.25.64/node_modules/ox/_esm/core/Rlp.js\n function from6(value, options) {\n const { as } = options;\n const encodable = getEncodable2(value);\n const cursor = create(new Uint8Array(encodable.length));\n encodable.encode(cursor);\n if (as === \"Hex\")\n return fromBytes(cursor.bytes);\n return cursor.bytes;\n }\n function fromHex4(hex, options = {}) {\n const { as = \"Hex\" } = options;\n return from6(hex, { as });\n }\n function getEncodable2(bytes) {\n if (Array.isArray(bytes))\n return getEncodableList2(bytes.map((x4) => getEncodable2(x4)));\n return getEncodableBytes2(bytes);\n }\n function getEncodableList2(list) {\n const bodyLength = list.reduce((acc, x4) => acc + x4.length, 0);\n const sizeOfBodyLength = getSizeOfLength2(bodyLength);\n const length2 = (() => {\n if (bodyLength <= 55)\n return 1 + bodyLength;\n return 1 + sizeOfBodyLength + bodyLength;\n })();\n return {\n length: length2,\n encode(cursor) {\n if (bodyLength <= 55) {\n cursor.pushByte(192 + bodyLength);\n } else {\n cursor.pushByte(192 + 55 + sizeOfBodyLength);\n if (sizeOfBodyLength === 1)\n cursor.pushUint8(bodyLength);\n else if (sizeOfBodyLength === 2)\n cursor.pushUint16(bodyLength);\n else if (sizeOfBodyLength === 3)\n cursor.pushUint24(bodyLength);\n else\n cursor.pushUint32(bodyLength);\n }\n for (const { encode: encode6 } of list) {\n encode6(cursor);\n }\n }\n };\n }\n function getEncodableBytes2(bytesOrHex) {\n const bytes = typeof bytesOrHex === \"string\" ? fromHex2(bytesOrHex) : bytesOrHex;\n const sizeOfBytesLength = getSizeOfLength2(bytes.length);\n const length2 = (() => {\n if (bytes.length === 1 && bytes[0] < 128)\n return 1;\n if (bytes.length <= 55)\n return 1 + bytes.length;\n return 1 + sizeOfBytesLength + bytes.length;\n })();\n return {\n length: length2,\n encode(cursor) {\n if (bytes.length === 1 && bytes[0] < 128) {\n cursor.pushBytes(bytes);\n } else if (bytes.length <= 55) {\n cursor.pushByte(128 + bytes.length);\n cursor.pushBytes(bytes);\n } else {\n cursor.pushByte(128 + 55 + sizeOfBytesLength);\n if (sizeOfBytesLength === 1)\n cursor.pushUint8(bytes.length);\n else if (sizeOfBytesLength === 2)\n cursor.pushUint16(bytes.length);\n else if (sizeOfBytesLength === 3)\n cursor.pushUint24(bytes.length);\n else\n cursor.pushUint32(bytes.length);\n cursor.pushBytes(bytes);\n }\n }\n };\n }\n function getSizeOfLength2(length2) {\n if (length2 < 2 ** 8)\n return 1;\n if (length2 < 2 ** 16)\n return 2;\n if (length2 < 2 ** 24)\n return 3;\n if (length2 < 2 ** 32)\n return 4;\n throw new BaseError3(\"Length is too large.\");\n }\n var init_Rlp = __esm({\n \"../../../node_modules/.pnpm/ox@0.9.6_typescript@5.8.3_zod@3.25.64/node_modules/ox/_esm/core/Rlp.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_Bytes();\n init_Errors();\n init_Hex();\n init_cursor3();\n }\n });\n\n // ../../../node_modules/.pnpm/ox@0.9.6_typescript@5.8.3_zod@3.25.64/node_modules/ox/_esm/core/Signature.js\n function assert6(signature, options = {}) {\n const { recovered } = options;\n if (typeof signature.r === \"undefined\")\n throw new MissingPropertiesError({ signature });\n if (typeof signature.s === \"undefined\")\n throw new MissingPropertiesError({ signature });\n if (recovered && typeof signature.yParity === \"undefined\")\n throw new MissingPropertiesError({ signature });\n if (signature.r < 0n || signature.r > maxUint2562)\n throw new InvalidRError({ value: signature.r });\n if (signature.s < 0n || signature.s > maxUint2562)\n throw new InvalidSError({ value: signature.s });\n if (typeof signature.yParity === \"number\" && signature.yParity !== 0 && signature.yParity !== 1)\n throw new InvalidYParityError({ value: signature.yParity });\n }\n function fromBytes3(signature) {\n return fromHex5(fromBytes(signature));\n }\n function fromHex5(signature) {\n if (signature.length !== 130 && signature.length !== 132)\n throw new InvalidSerializedSizeError2({ signature });\n const r2 = BigInt(slice3(signature, 0, 32));\n const s4 = BigInt(slice3(signature, 32, 64));\n const yParity = (() => {\n const yParity2 = Number(`0x${signature.slice(130)}`);\n if (Number.isNaN(yParity2))\n return void 0;\n try {\n return vToYParity(yParity2);\n } catch {\n throw new InvalidYParityError({ value: yParity2 });\n }\n })();\n if (typeof yParity === \"undefined\")\n return {\n r: r2,\n s: s4\n };\n return {\n r: r2,\n s: s4,\n yParity\n };\n }\n function extract2(value) {\n if (typeof value.r === \"undefined\")\n return void 0;\n if (typeof value.s === \"undefined\")\n return void 0;\n return from7(value);\n }\n function from7(signature) {\n const signature_ = (() => {\n if (typeof signature === \"string\")\n return fromHex5(signature);\n if (signature instanceof Uint8Array)\n return fromBytes3(signature);\n if (typeof signature.r === \"string\")\n return fromRpc2(signature);\n if (signature.v)\n return fromLegacy(signature);\n return {\n r: signature.r,\n s: signature.s,\n ...typeof signature.yParity !== \"undefined\" ? { yParity: signature.yParity } : {}\n };\n })();\n assert6(signature_);\n return signature_;\n }\n function fromLegacy(signature) {\n return {\n r: signature.r,\n s: signature.s,\n yParity: vToYParity(signature.v)\n };\n }\n function fromRpc2(signature) {\n const yParity = (() => {\n const v2 = signature.v ? Number(signature.v) : void 0;\n let yParity2 = signature.yParity ? Number(signature.yParity) : void 0;\n if (typeof v2 === \"number\" && typeof yParity2 !== \"number\")\n yParity2 = vToYParity(v2);\n if (typeof yParity2 !== \"number\")\n throw new InvalidYParityError({ value: signature.yParity });\n return yParity2;\n })();\n return {\n r: BigInt(signature.r),\n s: BigInt(signature.s),\n yParity\n };\n }\n function toTuple(signature) {\n const { r: r2, s: s4, yParity } = signature;\n return [\n yParity ? \"0x01\" : \"0x\",\n r2 === 0n ? \"0x\" : trimLeft2(fromNumber(r2)),\n s4 === 0n ? \"0x\" : trimLeft2(fromNumber(s4))\n ];\n }\n function vToYParity(v2) {\n if (v2 === 0 || v2 === 27)\n return 0;\n if (v2 === 1 || v2 === 28)\n return 1;\n if (v2 >= 35)\n return v2 % 2 === 0 ? 1 : 0;\n throw new InvalidVError({ value: v2 });\n }\n var InvalidSerializedSizeError2, MissingPropertiesError, InvalidRError, InvalidSError, InvalidYParityError, InvalidVError;\n var init_Signature = __esm({\n \"../../../node_modules/.pnpm/ox@0.9.6_typescript@5.8.3_zod@3.25.64/node_modules/ox/_esm/core/Signature.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_Errors();\n init_Hex();\n init_Json();\n init_Solidity();\n InvalidSerializedSizeError2 = class extends BaseError3 {\n constructor({ signature }) {\n super(`Value \\`${signature}\\` is an invalid signature size.`, {\n metaMessages: [\n \"Expected: 64 bytes or 65 bytes.\",\n `Received ${size3(from2(signature))} bytes.`\n ]\n });\n Object.defineProperty(this, \"name\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: \"Signature.InvalidSerializedSizeError\"\n });\n }\n };\n MissingPropertiesError = class extends BaseError3 {\n constructor({ signature }) {\n super(`Signature \\`${stringify2(signature)}\\` is missing either an \\`r\\`, \\`s\\`, or \\`yParity\\` property.`);\n Object.defineProperty(this, \"name\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: \"Signature.MissingPropertiesError\"\n });\n }\n };\n InvalidRError = class extends BaseError3 {\n constructor({ value }) {\n super(`Value \\`${value}\\` is an invalid r value. r must be a positive integer less than 2^256.`);\n Object.defineProperty(this, \"name\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: \"Signature.InvalidRError\"\n });\n }\n };\n InvalidSError = class extends BaseError3 {\n constructor({ value }) {\n super(`Value \\`${value}\\` is an invalid s value. s must be a positive integer less than 2^256.`);\n Object.defineProperty(this, \"name\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: \"Signature.InvalidSError\"\n });\n }\n };\n InvalidYParityError = class extends BaseError3 {\n constructor({ value }) {\n super(`Value \\`${value}\\` is an invalid y-parity value. Y-parity must be 0 or 1.`);\n Object.defineProperty(this, \"name\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: \"Signature.InvalidYParityError\"\n });\n }\n };\n InvalidVError = class extends BaseError3 {\n constructor({ value }) {\n super(`Value \\`${value}\\` is an invalid v value. v must be 27, 28 or >=35.`);\n Object.defineProperty(this, \"name\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: \"Signature.InvalidVError\"\n });\n }\n };\n }\n });\n\n // ../../../node_modules/.pnpm/ox@0.9.6_typescript@5.8.3_zod@3.25.64/node_modules/ox/_esm/core/Authorization.js\n function from8(authorization, options = {}) {\n if (typeof authorization.chainId === \"string\")\n return fromRpc3(authorization);\n return { ...authorization, ...options.signature };\n }\n function fromRpc3(authorization) {\n const { address, chainId, nonce } = authorization;\n const signature = extract2(authorization);\n return {\n address,\n chainId: Number(chainId),\n nonce: BigInt(nonce),\n ...signature\n };\n }\n function getSignPayload(authorization) {\n return hash2(authorization, { presign: true });\n }\n function hash2(authorization, options = {}) {\n const { presign } = options;\n return keccak2562(concat2(\"0x05\", fromHex4(toTuple2(presign ? {\n address: authorization.address,\n chainId: authorization.chainId,\n nonce: authorization.nonce\n } : authorization))));\n }\n function toTuple2(authorization) {\n const { address, chainId, nonce } = authorization;\n const signature = extract2(authorization);\n return [\n chainId ? fromNumber(chainId) : \"0x\",\n address,\n nonce ? fromNumber(nonce) : \"0x\",\n ...signature ? toTuple(signature) : []\n ];\n }\n var init_Authorization = __esm({\n \"../../../node_modules/.pnpm/ox@0.9.6_typescript@5.8.3_zod@3.25.64/node_modules/ox/_esm/core/Authorization.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_Hash();\n init_Hex();\n init_Rlp();\n init_Signature();\n }\n });\n\n // ../../../node_modules/.pnpm/ox@0.9.6_typescript@5.8.3_zod@3.25.64/node_modules/ox/_esm/core/Secp256k1.js\n function recoverAddress2(options) {\n return fromPublicKey(recoverPublicKey2(options));\n }\n function recoverPublicKey2(options) {\n const { payload, signature } = options;\n const { r: r2, s: s4, yParity } = signature;\n const signature_ = new secp256k1.Signature(BigInt(r2), BigInt(s4)).addRecoveryBit(yParity);\n const point = signature_.recoverPublicKey(from2(payload).substring(2));\n return from3(point);\n }\n var init_Secp256k1 = __esm({\n \"../../../node_modules/.pnpm/ox@0.9.6_typescript@5.8.3_zod@3.25.64/node_modules/ox/_esm/core/Secp256k1.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_secp256k1();\n init_Address();\n init_Hex();\n init_PublicKey();\n }\n });\n\n // ../../../node_modules/.pnpm/ox@0.9.6_typescript@5.8.3_zod@3.25.64/node_modules/ox/_esm/erc8010/SignatureErc8010.js\n var SignatureErc8010_exports = {};\n __export(SignatureErc8010_exports, {\n InvalidWrappedSignatureError: () => InvalidWrappedSignatureError,\n assert: () => assert7,\n from: () => from9,\n magicBytes: () => magicBytes,\n suffixParameters: () => suffixParameters,\n unwrap: () => unwrap,\n validate: () => validate4,\n wrap: () => wrap\n });\n function assert7(value) {\n if (typeof value === \"string\") {\n if (slice3(value, -32) !== magicBytes)\n throw new InvalidWrappedSignatureError(value);\n } else\n assert6(value.authorization);\n }\n function from9(value) {\n if (typeof value === \"string\")\n return unwrap(value);\n return value;\n }\n function unwrap(wrapped) {\n assert7(wrapped);\n const suffixLength = toNumber(slice3(wrapped, -64, -32));\n const suffix = slice3(wrapped, -suffixLength - 64, -64);\n const signature = slice3(wrapped, 0, -suffixLength - 64);\n const [auth, to, data] = decode(suffixParameters, suffix);\n const authorization = from8({\n address: auth.delegation,\n chainId: Number(auth.chainId),\n nonce: auth.nonce,\n yParity: auth.yParity,\n r: auth.r,\n s: auth.s\n });\n return {\n authorization,\n signature,\n ...data && data !== \"0x\" ? { data, to } : {}\n };\n }\n function wrap(value) {\n const { data, signature } = value;\n assert7(value);\n const self2 = recoverAddress2({\n payload: getSignPayload(value.authorization),\n signature: from7(value.authorization)\n });\n const suffix = encode3(suffixParameters, [\n {\n ...value.authorization,\n delegation: value.authorization.address,\n chainId: BigInt(value.authorization.chainId)\n },\n value.to ?? self2,\n data ?? \"0x\"\n ]);\n const suffixLength = fromNumber(size3(suffix), { size: 32 });\n return concat2(signature, suffix, suffixLength, magicBytes);\n }\n function validate4(value) {\n try {\n assert7(value);\n return true;\n } catch {\n return false;\n }\n }\n var magicBytes, suffixParameters, InvalidWrappedSignatureError;\n var init_SignatureErc8010 = __esm({\n \"../../../node_modules/.pnpm/ox@0.9.6_typescript@5.8.3_zod@3.25.64/node_modules/ox/_esm/erc8010/SignatureErc8010.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_AbiParameters();\n init_Authorization();\n init_Errors();\n init_Hex();\n init_Secp256k1();\n init_Signature();\n magicBytes = \"0x8010801080108010801080108010801080108010801080108010801080108010\";\n suffixParameters = from5(\"(uint256 chainId, address delegation, uint256 nonce, uint8 yParity, uint256 r, uint256 s), address to, bytes data\");\n InvalidWrappedSignatureError = class extends BaseError3 {\n constructor(wrapped) {\n super(`Value \\`${wrapped}\\` is an invalid ERC-8010 wrapped signature.`);\n Object.defineProperty(this, \"name\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: \"SignatureErc8010.InvalidWrappedSignatureError\"\n });\n }\n };\n }\n });\n\n // ../../../node_modules/.pnpm/ox@0.9.6_typescript@5.8.3_zod@3.25.64/node_modules/ox/_esm/erc8010/index.js\n var init_erc8010 = __esm({\n \"../../../node_modules/.pnpm/ox@0.9.6_typescript@5.8.3_zod@3.25.64/node_modules/ox/_esm/erc8010/index.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_SignatureErc8010();\n }\n });\n\n // ../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/utils/index.js\n var init_utils7 = __esm({\n \"../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/utils/index.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_fromHex();\n init_toHex();\n }\n });\n\n // ../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/utils/formatters/proof.js\n function formatStorageProof(storageProof) {\n return storageProof.map((proof) => ({\n ...proof,\n value: BigInt(proof.value)\n }));\n }\n function formatProof(proof) {\n return {\n ...proof,\n balance: proof.balance ? BigInt(proof.balance) : void 0,\n nonce: proof.nonce ? hexToNumber(proof.nonce) : void 0,\n storageProof: proof.storageProof ? formatStorageProof(proof.storageProof) : void 0\n };\n }\n var init_proof = __esm({\n \"../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/utils/formatters/proof.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_utils7();\n }\n });\n\n // ../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/actions/public/getProof.js\n async function getProof(client, { address, blockNumber, blockTag: blockTag_, storageKeys }) {\n const blockTag = blockTag_ ?? \"latest\";\n const blockNumberHex = blockNumber !== void 0 ? numberToHex(blockNumber) : void 0;\n const proof = await client.request({\n method: \"eth_getProof\",\n params: [address, storageKeys, blockNumberHex || blockTag]\n });\n return formatProof(proof);\n }\n var init_getProof = __esm({\n \"../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/actions/public/getProof.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_toHex();\n init_proof();\n }\n });\n\n // ../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/actions/public/getStorageAt.js\n async function getStorageAt(client, { address, blockNumber, blockTag = \"latest\", slot }) {\n const blockNumberHex = blockNumber !== void 0 ? numberToHex(blockNumber) : void 0;\n const data = await client.request({\n method: \"eth_getStorageAt\",\n params: [address, slot, blockNumberHex || blockTag]\n });\n return data;\n }\n var init_getStorageAt = __esm({\n \"../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/actions/public/getStorageAt.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_toHex();\n }\n });\n\n // ../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/actions/public/getTransaction.js\n async function getTransaction(client, { blockHash, blockNumber, blockTag: blockTag_, hash: hash3, index: index2 }) {\n const blockTag = blockTag_ || \"latest\";\n const blockNumberHex = blockNumber !== void 0 ? numberToHex(blockNumber) : void 0;\n let transaction = null;\n if (hash3) {\n transaction = await client.request({\n method: \"eth_getTransactionByHash\",\n params: [hash3]\n }, { dedupe: true });\n } else if (blockHash) {\n transaction = await client.request({\n method: \"eth_getTransactionByBlockHashAndIndex\",\n params: [blockHash, numberToHex(index2)]\n }, { dedupe: true });\n } else if (blockNumberHex || blockTag) {\n transaction = await client.request({\n method: \"eth_getTransactionByBlockNumberAndIndex\",\n params: [blockNumberHex || blockTag, numberToHex(index2)]\n }, { dedupe: Boolean(blockNumberHex) });\n }\n if (!transaction)\n throw new TransactionNotFoundError({\n blockHash,\n blockNumber,\n blockTag,\n hash: hash3,\n index: index2\n });\n const format = client.chain?.formatters?.transaction?.format || formatTransaction;\n return format(transaction, \"getTransaction\");\n }\n var init_getTransaction = __esm({\n \"../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/actions/public/getTransaction.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_transaction();\n init_toHex();\n init_transaction2();\n }\n });\n\n // ../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/actions/public/getTransactionConfirmations.js\n async function getTransactionConfirmations(client, { hash: hash3, transactionReceipt }) {\n const [blockNumber, transaction] = await Promise.all([\n getAction(client, getBlockNumber, \"getBlockNumber\")({}),\n hash3 ? getAction(client, getTransaction, \"getTransaction\")({ hash: hash3 }) : void 0\n ]);\n const transactionBlockNumber = transactionReceipt?.blockNumber || transaction?.blockNumber;\n if (!transactionBlockNumber)\n return 0n;\n return blockNumber - transactionBlockNumber + 1n;\n }\n var init_getTransactionConfirmations = __esm({\n \"../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/actions/public/getTransactionConfirmations.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_getAction();\n init_getBlockNumber();\n init_getTransaction();\n }\n });\n\n // ../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/actions/public/getTransactionReceipt.js\n async function getTransactionReceipt(client, { hash: hash3 }) {\n const receipt = await client.request({\n method: \"eth_getTransactionReceipt\",\n params: [hash3]\n }, { dedupe: true });\n if (!receipt)\n throw new TransactionReceiptNotFoundError({ hash: hash3 });\n const format = client.chain?.formatters?.transactionReceipt?.format || formatTransactionReceipt;\n return format(receipt, \"getTransactionReceipt\");\n }\n var init_getTransactionReceipt = __esm({\n \"../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/actions/public/getTransactionReceipt.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_transaction();\n init_transactionReceipt();\n }\n });\n\n // ../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/actions/public/multicall.js\n async function multicall(client, parameters) {\n const { account, authorizationList, allowFailure = true, blockNumber, blockOverrides, blockTag, stateOverride } = parameters;\n const contracts2 = parameters.contracts;\n const { batchSize = parameters.batchSize ?? 1024, deployless = parameters.deployless ?? false } = typeof client.batch?.multicall === \"object\" ? client.batch.multicall : {};\n const multicallAddress = (() => {\n if (parameters.multicallAddress)\n return parameters.multicallAddress;\n if (deployless)\n return null;\n if (client.chain) {\n return getChainContractAddress({\n blockNumber,\n chain: client.chain,\n contract: \"multicall3\"\n });\n }\n throw new Error(\"client chain not configured. multicallAddress is required.\");\n })();\n const chunkedCalls = [[]];\n let currentChunk = 0;\n let currentChunkSize = 0;\n for (let i3 = 0; i3 < contracts2.length; i3++) {\n const { abi: abi2, address, args, functionName } = contracts2[i3];\n try {\n const callData = encodeFunctionData({ abi: abi2, args, functionName });\n currentChunkSize += (callData.length - 2) / 2;\n if (\n // Check if batching is enabled.\n batchSize > 0 && // Check if the current size of the batch exceeds the size limit.\n currentChunkSize > batchSize && // Check if the current chunk is not already empty.\n chunkedCalls[currentChunk].length > 0\n ) {\n currentChunk++;\n currentChunkSize = (callData.length - 2) / 2;\n chunkedCalls[currentChunk] = [];\n }\n chunkedCalls[currentChunk] = [\n ...chunkedCalls[currentChunk],\n {\n allowFailure: true,\n callData,\n target: address\n }\n ];\n } catch (err) {\n const error = getContractError(err, {\n abi: abi2,\n address,\n args,\n docsPath: \"/docs/contract/multicall\",\n functionName,\n sender: account\n });\n if (!allowFailure)\n throw error;\n chunkedCalls[currentChunk] = [\n ...chunkedCalls[currentChunk],\n {\n allowFailure: true,\n callData: \"0x\",\n target: address\n }\n ];\n }\n }\n const aggregate3Results = await Promise.allSettled(chunkedCalls.map((calls) => getAction(client, readContract, \"readContract\")({\n ...multicallAddress === null ? { code: multicall3Bytecode } : { address: multicallAddress },\n abi: multicall3Abi,\n account,\n args: [calls],\n authorizationList,\n blockNumber,\n blockOverrides,\n blockTag,\n functionName: \"aggregate3\",\n stateOverride\n })));\n const results = [];\n for (let i3 = 0; i3 < aggregate3Results.length; i3++) {\n const result = aggregate3Results[i3];\n if (result.status === \"rejected\") {\n if (!allowFailure)\n throw result.reason;\n for (let j2 = 0; j2 < chunkedCalls[i3].length; j2++) {\n results.push({\n status: \"failure\",\n error: result.reason,\n result: void 0\n });\n }\n continue;\n }\n const aggregate3Result = result.value;\n for (let j2 = 0; j2 < aggregate3Result.length; j2++) {\n const { returnData, success } = aggregate3Result[j2];\n const { callData } = chunkedCalls[i3][j2];\n const { abi: abi2, address, functionName, args } = contracts2[results.length];\n try {\n if (callData === \"0x\")\n throw new AbiDecodingZeroDataError();\n if (!success)\n throw new RawContractError({ data: returnData });\n const result2 = decodeFunctionResult({\n abi: abi2,\n args,\n data: returnData,\n functionName\n });\n results.push(allowFailure ? { result: result2, status: \"success\" } : result2);\n } catch (err) {\n const error = getContractError(err, {\n abi: abi2,\n address,\n args,\n docsPath: \"/docs/contract/multicall\",\n functionName\n });\n if (!allowFailure)\n throw error;\n results.push({ error, result: void 0, status: \"failure\" });\n }\n }\n }\n if (results.length !== contracts2.length)\n throw new BaseError2(\"multicall results mismatch\");\n return results;\n }\n var init_multicall = __esm({\n \"../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/actions/public/multicall.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_abis();\n init_contracts();\n init_abi();\n init_base();\n init_contract();\n init_decodeFunctionResult();\n init_encodeFunctionData();\n init_getChainContractAddress();\n init_getContractError();\n init_getAction();\n init_readContract();\n }\n });\n\n // ../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/actions/public/simulateBlocks.js\n async function simulateBlocks(client, parameters) {\n const { blockNumber, blockTag = client.experimental_blockTag ?? \"latest\", blocks, returnFullTransactions, traceTransfers, validation } = parameters;\n try {\n const blockStateCalls = [];\n for (const block2 of blocks) {\n const blockOverrides = block2.blockOverrides ? toRpc2(block2.blockOverrides) : void 0;\n const calls = block2.calls.map((call_) => {\n const call2 = call_;\n const account = call2.account ? parseAccount(call2.account) : void 0;\n const data = call2.abi ? encodeFunctionData(call2) : call2.data;\n const request = {\n ...call2,\n account,\n data: call2.dataSuffix ? concat([data || \"0x\", call2.dataSuffix]) : data,\n from: call2.from ?? account?.address\n };\n assertRequest(request);\n return formatTransactionRequest(request);\n });\n const stateOverrides = block2.stateOverrides ? serializeStateOverride(block2.stateOverrides) : void 0;\n blockStateCalls.push({\n blockOverrides,\n calls,\n stateOverrides\n });\n }\n const blockNumberHex = typeof blockNumber === \"bigint\" ? numberToHex(blockNumber) : void 0;\n const block = blockNumberHex || blockTag;\n const result = await client.request({\n method: \"eth_simulateV1\",\n params: [\n { blockStateCalls, returnFullTransactions, traceTransfers, validation },\n block\n ]\n });\n return result.map((block2, i3) => ({\n ...formatBlock(block2),\n calls: block2.calls.map((call2, j2) => {\n const { abi: abi2, args, functionName, to } = blocks[i3].calls[j2];\n const data = call2.error?.data ?? call2.returnData;\n const gasUsed = BigInt(call2.gasUsed);\n const logs = call2.logs?.map((log) => formatLog(log));\n const status = call2.status === \"0x1\" ? \"success\" : \"failure\";\n const result2 = abi2 && status === \"success\" && data !== \"0x\" ? decodeFunctionResult({\n abi: abi2,\n data,\n functionName\n }) : null;\n const error = (() => {\n if (status === \"success\")\n return void 0;\n let error2;\n if (call2.error?.data === \"0x\")\n error2 = new AbiDecodingZeroDataError();\n else if (call2.error)\n error2 = new RawContractError(call2.error);\n if (!error2)\n return void 0;\n return getContractError(error2, {\n abi: abi2 ?? [],\n address: to ?? \"0x\",\n args,\n functionName: functionName ?? \"\"\n });\n })();\n return {\n data,\n gasUsed,\n logs,\n status,\n ...status === \"success\" ? {\n result: result2\n } : {\n error\n }\n };\n })\n }));\n } catch (e3) {\n const cause = e3;\n const error = getNodeError(cause, {});\n if (error instanceof UnknownNodeError)\n throw cause;\n throw error;\n }\n }\n var init_simulateBlocks = __esm({\n \"../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/actions/public/simulateBlocks.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_BlockOverrides();\n init_parseAccount();\n init_abi();\n init_contract();\n init_node();\n init_decodeFunctionResult();\n init_encodeFunctionData();\n init_concat();\n init_toHex();\n init_getContractError();\n init_getNodeError();\n init_block2();\n init_log2();\n init_transactionRequest();\n init_stateOverride2();\n init_assertRequest();\n }\n });\n\n // ../../../node_modules/.pnpm/ox@0.9.6_typescript@5.8.3_zod@3.25.64/node_modules/ox/_esm/core/internal/abiItem.js\n function normalizeSignature2(signature) {\n let active = true;\n let current = \"\";\n let level = 0;\n let result = \"\";\n let valid = false;\n for (let i3 = 0; i3 < signature.length; i3++) {\n const char = signature[i3];\n if ([\"(\", \")\", \",\"].includes(char))\n active = true;\n if (char === \"(\")\n level++;\n if (char === \")\")\n level--;\n if (!active)\n continue;\n if (level === 0) {\n if (char === \" \" && [\"event\", \"function\", \"error\", \"\"].includes(result))\n result = \"\";\n else {\n result += char;\n if (char === \")\") {\n valid = true;\n break;\n }\n }\n continue;\n }\n if (char === \" \") {\n if (signature[i3 - 1] !== \",\" && current !== \",\" && current !== \",(\") {\n current = \"\";\n active = false;\n }\n continue;\n }\n result += char;\n current += char;\n }\n if (!valid)\n throw new BaseError3(\"Unable to normalize signature.\");\n return result;\n }\n function isArgOfType2(arg, abiParameter) {\n const argType = typeof arg;\n const abiParameterType = abiParameter.type;\n switch (abiParameterType) {\n case \"address\":\n return validate3(arg, { strict: false });\n case \"bool\":\n return argType === \"boolean\";\n case \"function\":\n return argType === \"string\";\n case \"string\":\n return argType === \"string\";\n default: {\n if (abiParameterType === \"tuple\" && \"components\" in abiParameter)\n return Object.values(abiParameter.components).every((component, index2) => {\n return isArgOfType2(Object.values(arg)[index2], component);\n });\n if (/^u?int(8|16|24|32|40|48|56|64|72|80|88|96|104|112|120|128|136|144|152|160|168|176|184|192|200|208|216|224|232|240|248|256)?$/.test(abiParameterType))\n return argType === \"number\" || argType === \"bigint\";\n if (/^bytes([1-9]|1[0-9]|2[0-9]|3[0-2])?$/.test(abiParameterType))\n return argType === \"string\" || arg instanceof Uint8Array;\n if (/[a-z]+[1-9]{0,3}(\\[[0-9]{0,}\\])+$/.test(abiParameterType)) {\n return Array.isArray(arg) && arg.every((x4) => isArgOfType2(x4, {\n ...abiParameter,\n // Pop off `[]` or `[M]` from end of type\n type: abiParameterType.replace(/(\\[[0-9]{0,}\\])$/, \"\")\n }));\n }\n return false;\n }\n }\n }\n function getAmbiguousTypes2(sourceParameters, targetParameters, args) {\n for (const parameterIndex in sourceParameters) {\n const sourceParameter = sourceParameters[parameterIndex];\n const targetParameter = targetParameters[parameterIndex];\n if (sourceParameter.type === \"tuple\" && targetParameter.type === \"tuple\" && \"components\" in sourceParameter && \"components\" in targetParameter)\n return getAmbiguousTypes2(sourceParameter.components, targetParameter.components, args[parameterIndex]);\n const types = [sourceParameter.type, targetParameter.type];\n const ambiguous = (() => {\n if (types.includes(\"address\") && types.includes(\"bytes20\"))\n return true;\n if (types.includes(\"address\") && types.includes(\"string\"))\n return validate3(args[parameterIndex], {\n strict: false\n });\n if (types.includes(\"address\") && types.includes(\"bytes\"))\n return validate3(args[parameterIndex], {\n strict: false\n });\n return false;\n })();\n if (ambiguous)\n return types;\n }\n return;\n }\n var init_abiItem2 = __esm({\n \"../../../node_modules/.pnpm/ox@0.9.6_typescript@5.8.3_zod@3.25.64/node_modules/ox/_esm/core/internal/abiItem.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_Address();\n init_Errors();\n }\n });\n\n // ../../../node_modules/.pnpm/ox@0.9.6_typescript@5.8.3_zod@3.25.64/node_modules/ox/_esm/core/AbiItem.js\n function from10(abiItem, options = {}) {\n const { prepare = true } = options;\n const item = (() => {\n if (Array.isArray(abiItem))\n return parseAbiItem(abiItem);\n if (typeof abiItem === \"string\")\n return parseAbiItem(abiItem);\n return abiItem;\n })();\n return {\n ...item,\n ...prepare ? { hash: getSignatureHash(item) } : {}\n };\n }\n function fromAbi(abi2, name, options) {\n const { args = [], prepare = true } = options ?? {};\n const isSelector = validate2(name, { strict: false });\n const abiItems = abi2.filter((abiItem2) => {\n if (isSelector) {\n if (abiItem2.type === \"function\" || abiItem2.type === \"error\")\n return getSelector(abiItem2) === slice3(name, 0, 4);\n if (abiItem2.type === \"event\")\n return getSignatureHash(abiItem2) === name;\n return false;\n }\n return \"name\" in abiItem2 && abiItem2.name === name;\n });\n if (abiItems.length === 0)\n throw new NotFoundError({ name });\n if (abiItems.length === 1)\n return {\n ...abiItems[0],\n ...prepare ? { hash: getSignatureHash(abiItems[0]) } : {}\n };\n let matchedAbiItem;\n for (const abiItem2 of abiItems) {\n if (!(\"inputs\" in abiItem2))\n continue;\n if (!args || args.length === 0) {\n if (!abiItem2.inputs || abiItem2.inputs.length === 0)\n return {\n ...abiItem2,\n ...prepare ? { hash: getSignatureHash(abiItem2) } : {}\n };\n continue;\n }\n if (!abiItem2.inputs)\n continue;\n if (abiItem2.inputs.length === 0)\n continue;\n if (abiItem2.inputs.length !== args.length)\n continue;\n const matched = args.every((arg, index2) => {\n const abiParameter = \"inputs\" in abiItem2 && abiItem2.inputs[index2];\n if (!abiParameter)\n return false;\n return isArgOfType2(arg, abiParameter);\n });\n if (matched) {\n if (matchedAbiItem && \"inputs\" in matchedAbiItem && matchedAbiItem.inputs) {\n const ambiguousTypes = getAmbiguousTypes2(abiItem2.inputs, matchedAbiItem.inputs, args);\n if (ambiguousTypes)\n throw new AmbiguityError({\n abiItem: abiItem2,\n type: ambiguousTypes[0]\n }, {\n abiItem: matchedAbiItem,\n type: ambiguousTypes[1]\n });\n }\n matchedAbiItem = abiItem2;\n }\n }\n const abiItem = (() => {\n if (matchedAbiItem)\n return matchedAbiItem;\n const [abiItem2, ...overloads] = abiItems;\n return { ...abiItem2, overloads };\n })();\n if (!abiItem)\n throw new NotFoundError({ name });\n return {\n ...abiItem,\n ...prepare ? { hash: getSignatureHash(abiItem) } : {}\n };\n }\n function getSelector(...parameters) {\n const abiItem = (() => {\n if (Array.isArray(parameters[0])) {\n const [abi2, name] = parameters;\n return fromAbi(abi2, name);\n }\n return parameters[0];\n })();\n return slice3(getSignatureHash(abiItem), 0, 4);\n }\n function getSignature(...parameters) {\n const abiItem = (() => {\n if (Array.isArray(parameters[0])) {\n const [abi2, name] = parameters;\n return fromAbi(abi2, name);\n }\n return parameters[0];\n })();\n const signature = (() => {\n if (typeof abiItem === \"string\")\n return abiItem;\n return formatAbiItem(abiItem);\n })();\n return normalizeSignature2(signature);\n }\n function getSignatureHash(...parameters) {\n const abiItem = (() => {\n if (Array.isArray(parameters[0])) {\n const [abi2, name] = parameters;\n return fromAbi(abi2, name);\n }\n return parameters[0];\n })();\n if (typeof abiItem !== \"string\" && \"hash\" in abiItem && abiItem.hash)\n return abiItem.hash;\n return keccak2562(fromString2(getSignature(abiItem)));\n }\n var AmbiguityError, NotFoundError;\n var init_AbiItem = __esm({\n \"../../../node_modules/.pnpm/ox@0.9.6_typescript@5.8.3_zod@3.25.64/node_modules/ox/_esm/core/AbiItem.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_exports();\n init_Errors();\n init_Hash();\n init_Hex();\n init_abiItem2();\n AmbiguityError = class extends BaseError3 {\n constructor(x4, y6) {\n super(\"Found ambiguous types in overloaded ABI Items.\", {\n metaMessages: [\n // TODO: abitype to add support for signature-formatted ABI items.\n `\\`${x4.type}\\` in \\`${normalizeSignature2(formatAbiItem(x4.abiItem))}\\`, and`,\n `\\`${y6.type}\\` in \\`${normalizeSignature2(formatAbiItem(y6.abiItem))}\\``,\n \"\",\n \"These types encode differently and cannot be distinguished at runtime.\",\n \"Remove one of the ambiguous items in the ABI.\"\n ]\n });\n Object.defineProperty(this, \"name\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: \"AbiItem.AmbiguityError\"\n });\n }\n };\n NotFoundError = class extends BaseError3 {\n constructor({ name, data, type = \"item\" }) {\n const selector = (() => {\n if (name)\n return ` with name \"${name}\"`;\n if (data)\n return ` with data \"${data}\"`;\n return \"\";\n })();\n super(`ABI ${type}${selector} not found.`);\n Object.defineProperty(this, \"name\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: \"AbiItem.NotFoundError\"\n });\n }\n };\n }\n });\n\n // ../../../node_modules/.pnpm/ox@0.9.6_typescript@5.8.3_zod@3.25.64/node_modules/ox/_esm/core/AbiConstructor.js\n function encode4(...parameters) {\n const [abiConstructor, options] = (() => {\n if (Array.isArray(parameters[0])) {\n const [abi2, options2] = parameters;\n return [fromAbi2(abi2), options2];\n }\n return parameters;\n })();\n const { bytecode, args } = options;\n return concat2(bytecode, abiConstructor.inputs?.length && args?.length ? encode3(abiConstructor.inputs, args) : \"0x\");\n }\n function from11(abiConstructor) {\n return from10(abiConstructor);\n }\n function fromAbi2(abi2) {\n const item = abi2.find((item2) => item2.type === \"constructor\");\n if (!item)\n throw new NotFoundError({ name: \"constructor\" });\n return item;\n }\n var init_AbiConstructor = __esm({\n \"../../../node_modules/.pnpm/ox@0.9.6_typescript@5.8.3_zod@3.25.64/node_modules/ox/_esm/core/AbiConstructor.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_AbiItem();\n init_AbiParameters();\n init_Hex();\n }\n });\n\n // ../../../node_modules/.pnpm/ox@0.9.6_typescript@5.8.3_zod@3.25.64/node_modules/ox/_esm/core/AbiFunction.js\n function encodeData2(...parameters) {\n const [abiFunction, args = []] = (() => {\n if (Array.isArray(parameters[0])) {\n const [abi2, name, args3] = parameters;\n return [fromAbi3(abi2, name, { args: args3 }), args3];\n }\n const [abiFunction2, args2] = parameters;\n return [abiFunction2, args2];\n })();\n const { overloads } = abiFunction;\n const item = overloads ? fromAbi3([abiFunction, ...overloads], abiFunction.name, {\n args\n }) : abiFunction;\n const selector = getSelector2(item);\n const data = args.length > 0 ? encode3(item.inputs, args) : void 0;\n return data ? concat2(selector, data) : selector;\n }\n function from12(abiFunction, options = {}) {\n return from10(abiFunction, options);\n }\n function fromAbi3(abi2, name, options) {\n const item = fromAbi(abi2, name, options);\n if (item.type !== \"function\")\n throw new NotFoundError({ name, type: \"function\" });\n return item;\n }\n function getSelector2(abiItem) {\n return getSelector(abiItem);\n }\n var init_AbiFunction = __esm({\n \"../../../node_modules/.pnpm/ox@0.9.6_typescript@5.8.3_zod@3.25.64/node_modules/ox/_esm/core/AbiFunction.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_AbiItem();\n init_AbiParameters();\n init_Hex();\n }\n });\n\n // ../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/constants/address.js\n var ethAddress, zeroAddress;\n var init_address2 = __esm({\n \"../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/constants/address.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n ethAddress = \"0xeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee\";\n zeroAddress = \"0x0000000000000000000000000000000000000000\";\n }\n });\n\n // ../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/actions/public/simulateCalls.js\n async function simulateCalls(client, parameters) {\n const { blockNumber, blockTag, calls, stateOverrides, traceAssetChanges, traceTransfers, validation } = parameters;\n const account = parameters.account ? parseAccount(parameters.account) : void 0;\n if (traceAssetChanges && !account)\n throw new BaseError2(\"`account` is required when `traceAssetChanges` is true\");\n const getBalanceData = account ? encode4(from11(\"constructor(bytes, bytes)\"), {\n bytecode: deploylessCallViaBytecodeBytecode,\n args: [\n getBalanceCode,\n encodeData2(from12(\"function getBalance(address)\"), [account.address])\n ]\n }) : void 0;\n const assetAddresses = traceAssetChanges ? await Promise.all(parameters.calls.map(async (call2) => {\n if (!call2.data && !call2.abi)\n return;\n const { accessList } = await createAccessList(client, {\n account: account.address,\n ...call2,\n data: call2.abi ? encodeFunctionData(call2) : call2.data\n });\n return accessList.map(({ address, storageKeys }) => storageKeys.length > 0 ? address : null);\n })).then((x4) => x4.flat().filter(Boolean)) : [];\n const blocks = await simulateBlocks(client, {\n blockNumber,\n blockTag,\n blocks: [\n ...traceAssetChanges ? [\n // ETH pre balances\n {\n calls: [{ data: getBalanceData }],\n stateOverrides\n },\n // Asset pre balances\n {\n calls: assetAddresses.map((address, i3) => ({\n abi: [\n from12(\"function balanceOf(address) returns (uint256)\")\n ],\n functionName: \"balanceOf\",\n args: [account.address],\n to: address,\n from: zeroAddress,\n nonce: i3\n })),\n stateOverrides: [\n {\n address: zeroAddress,\n nonce: 0\n }\n ]\n }\n ] : [],\n {\n calls: [...calls, {}].map((call2) => ({\n ...call2,\n from: account?.address\n })),\n stateOverrides\n },\n ...traceAssetChanges ? [\n // ETH post balances\n {\n calls: [{ data: getBalanceData }]\n },\n // Asset post balances\n {\n calls: assetAddresses.map((address, i3) => ({\n abi: [\n from12(\"function balanceOf(address) returns (uint256)\")\n ],\n functionName: \"balanceOf\",\n args: [account.address],\n to: address,\n from: zeroAddress,\n nonce: i3\n })),\n stateOverrides: [\n {\n address: zeroAddress,\n nonce: 0\n }\n ]\n },\n // Decimals\n {\n calls: assetAddresses.map((address, i3) => ({\n to: address,\n abi: [\n from12(\"function decimals() returns (uint256)\")\n ],\n functionName: \"decimals\",\n from: zeroAddress,\n nonce: i3\n })),\n stateOverrides: [\n {\n address: zeroAddress,\n nonce: 0\n }\n ]\n },\n // Token URI\n {\n calls: assetAddresses.map((address, i3) => ({\n to: address,\n abi: [\n from12(\"function tokenURI(uint256) returns (string)\")\n ],\n functionName: \"tokenURI\",\n args: [0n],\n from: zeroAddress,\n nonce: i3\n })),\n stateOverrides: [\n {\n address: zeroAddress,\n nonce: 0\n }\n ]\n },\n // Symbols\n {\n calls: assetAddresses.map((address, i3) => ({\n to: address,\n abi: [from12(\"function symbol() returns (string)\")],\n functionName: \"symbol\",\n from: zeroAddress,\n nonce: i3\n })),\n stateOverrides: [\n {\n address: zeroAddress,\n nonce: 0\n }\n ]\n }\n ] : []\n ],\n traceTransfers,\n validation\n });\n const block_results = traceAssetChanges ? blocks[2] : blocks[0];\n const [block_ethPre, block_assetsPre, , block_ethPost, block_assetsPost, block_decimals, block_tokenURI, block_symbols] = traceAssetChanges ? blocks : [];\n const { calls: block_calls, ...block } = block_results;\n const results = block_calls.slice(0, -1) ?? [];\n const ethPre = block_ethPre?.calls ?? [];\n const assetsPre = block_assetsPre?.calls ?? [];\n const balancesPre = [...ethPre, ...assetsPre].map((call2) => call2.status === \"success\" ? hexToBigInt(call2.data) : null);\n const ethPost = block_ethPost?.calls ?? [];\n const assetsPost = block_assetsPost?.calls ?? [];\n const balancesPost = [...ethPost, ...assetsPost].map((call2) => call2.status === \"success\" ? hexToBigInt(call2.data) : null);\n const decimals = (block_decimals?.calls ?? []).map((x4) => x4.status === \"success\" ? x4.result : null);\n const symbols = (block_symbols?.calls ?? []).map((x4) => x4.status === \"success\" ? x4.result : null);\n const tokenURI = (block_tokenURI?.calls ?? []).map((x4) => x4.status === \"success\" ? x4.result : null);\n const changes = [];\n for (const [i3, balancePost] of balancesPost.entries()) {\n const balancePre = balancesPre[i3];\n if (typeof balancePost !== \"bigint\")\n continue;\n if (typeof balancePre !== \"bigint\")\n continue;\n const decimals_ = decimals[i3 - 1];\n const symbol_ = symbols[i3 - 1];\n const tokenURI_ = tokenURI[i3 - 1];\n const token = (() => {\n if (i3 === 0)\n return {\n address: ethAddress,\n decimals: 18,\n symbol: \"ETH\"\n };\n return {\n address: assetAddresses[i3 - 1],\n decimals: tokenURI_ || decimals_ ? Number(decimals_ ?? 1) : void 0,\n symbol: symbol_ ?? void 0\n };\n })();\n if (changes.some((change) => change.token.address === token.address))\n continue;\n changes.push({\n token,\n value: {\n pre: balancePre,\n post: balancePost,\n diff: balancePost - balancePre\n }\n });\n }\n return {\n assetChanges: changes,\n block,\n results\n };\n }\n var getBalanceCode;\n var init_simulateCalls = __esm({\n \"../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/actions/public/simulateCalls.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_AbiConstructor();\n init_AbiFunction();\n init_parseAccount();\n init_address2();\n init_contracts();\n init_base();\n init_encodeFunctionData();\n init_utils7();\n init_createAccessList();\n init_simulateBlocks();\n getBalanceCode = \"0x6080604052348015600e575f80fd5b5061016d8061001c5f395ff3fe608060405234801561000f575f80fd5b5060043610610029575f3560e01c8063f8b2cb4f1461002d575b5f80fd5b610047600480360381019061004291906100db565b61005d565b604051610054919061011e565b60405180910390f35b5f8173ffffffffffffffffffffffffffffffffffffffff16319050919050565b5f80fd5b5f73ffffffffffffffffffffffffffffffffffffffff82169050919050565b5f6100aa82610081565b9050919050565b6100ba816100a0565b81146100c4575f80fd5b50565b5f813590506100d5816100b1565b92915050565b5f602082840312156100f0576100ef61007d565b5b5f6100fd848285016100c7565b91505092915050565b5f819050919050565b61011881610106565b82525050565b5f6020820190506101315f83018461010f565b9291505056fea26469706673582212203b9fe929fe995c7cf9887f0bdba8a36dd78e8b73f149b17d2d9ad7cd09d2dc6264736f6c634300081a0033\";\n }\n });\n\n // ../../../node_modules/.pnpm/ox@0.9.6_typescript@5.8.3_zod@3.25.64/node_modules/ox/_esm/erc6492/SignatureErc6492.js\n var SignatureErc6492_exports = {};\n __export(SignatureErc6492_exports, {\n InvalidWrappedSignatureError: () => InvalidWrappedSignatureError2,\n assert: () => assert8,\n from: () => from13,\n magicBytes: () => magicBytes2,\n universalSignatureValidatorAbi: () => universalSignatureValidatorAbi,\n universalSignatureValidatorBytecode: () => universalSignatureValidatorBytecode,\n unwrap: () => unwrap2,\n validate: () => validate5,\n wrap: () => wrap2\n });\n function assert8(wrapped) {\n if (slice3(wrapped, -32) !== magicBytes2)\n throw new InvalidWrappedSignatureError2(wrapped);\n }\n function from13(wrapped) {\n if (typeof wrapped === \"string\")\n return unwrap2(wrapped);\n return wrapped;\n }\n function unwrap2(wrapped) {\n assert8(wrapped);\n const [to, data, signature] = decode(from5(\"address, bytes, bytes\"), wrapped);\n return { data, signature, to };\n }\n function wrap2(value) {\n const { data, signature, to } = value;\n return concat2(encode3(from5(\"address, bytes, bytes\"), [\n to,\n data,\n signature\n ]), magicBytes2);\n }\n function validate5(wrapped) {\n try {\n assert8(wrapped);\n return true;\n } catch {\n return false;\n }\n }\n var magicBytes2, universalSignatureValidatorBytecode, universalSignatureValidatorAbi, InvalidWrappedSignatureError2;\n var init_SignatureErc6492 = __esm({\n \"../../../node_modules/.pnpm/ox@0.9.6_typescript@5.8.3_zod@3.25.64/node_modules/ox/_esm/erc6492/SignatureErc6492.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_AbiParameters();\n init_Errors();\n init_Hex();\n magicBytes2 = \"0x6492649264926492649264926492649264926492649264926492649264926492\";\n universalSignatureValidatorBytecode = \"0x608060405234801561001057600080fd5b5060405161069438038061069483398101604081905261002f9161051e565b600061003c848484610048565b9050806000526001601ff35b60007f64926492649264926492649264926492649264926492649264926492649264926100748361040c565b036101e7576000606080848060200190518101906100929190610577565b60405192955090935091506000906001600160a01b038516906100b69085906105dd565b6000604051808303816000865af19150503d80600081146100f3576040519150601f19603f3d011682016040523d82523d6000602084013e6100f8565b606091505b50509050876001600160a01b03163b60000361016057806101605760405162461bcd60e51b815260206004820152601e60248201527f5369676e617475726556616c696461746f723a206465706c6f796d656e74000060448201526064015b60405180910390fd5b604051630b135d3f60e11b808252906001600160a01b038a1690631626ba7e90610190908b9087906004016105f9565b602060405180830381865afa1580156101ad573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906101d19190610633565b6001600160e01b03191614945050505050610405565b6001600160a01b0384163b1561027a57604051630b135d3f60e11b808252906001600160a01b03861690631626ba7e9061022790879087906004016105f9565b602060405180830381865afa158015610244573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906102689190610633565b6001600160e01b031916149050610405565b81516041146102df5760405162461bcd60e51b815260206004820152603a602482015260008051602061067483398151915260448201527f3a20696e76616c6964207369676e6174757265206c656e6774680000000000006064820152608401610157565b6102e7610425565b5060208201516040808401518451859392600091859190811061030c5761030c61065d565b016020015160f81c9050601b811480159061032b57508060ff16601c14155b1561038c5760405162461bcd60e51b815260206004820152603b602482015260008051602061067483398151915260448201527f3a20696e76616c6964207369676e617475726520762076616c756500000000006064820152608401610157565b60408051600081526020810180835289905260ff83169181019190915260608101849052608081018390526001600160a01b0389169060019060a0016020604051602081039080840390855afa1580156103ea573d6000803e3d6000fd5b505050602060405103516001600160a01b0316149450505050505b9392505050565b600060208251101561041d57600080fd5b508051015190565b60405180606001604052806003906020820280368337509192915050565b6001600160a01b038116811461045857600080fd5b50565b634e487b7160e01b600052604160045260246000fd5b60005b8381101561048c578181015183820152602001610474565b50506000910152565b600082601f8301126104a657600080fd5b81516001600160401b038111156104bf576104bf61045b565b604051601f8201601f19908116603f011681016001600160401b03811182821017156104ed576104ed61045b565b60405281815283820160200185101561050557600080fd5b610516826020830160208701610471565b949350505050565b60008060006060848603121561053357600080fd5b835161053e81610443565b6020850151604086015191945092506001600160401b0381111561056157600080fd5b61056d86828701610495565b9150509250925092565b60008060006060848603121561058c57600080fd5b835161059781610443565b60208501519093506001600160401b038111156105b357600080fd5b6105bf86828701610495565b604086015190935090506001600160401b0381111561056157600080fd5b600082516105ef818460208701610471565b9190910192915050565b828152604060208201526000825180604084015261061e816060850160208701610471565b601f01601f1916919091016060019392505050565b60006020828403121561064557600080fd5b81516001600160e01b03198116811461040557600080fd5b634e487b7160e01b600052603260045260246000fdfe5369676e617475726556616c696461746f72237265636f7665725369676e6572\";\n universalSignatureValidatorAbi = [\n {\n inputs: [\n {\n name: \"_signer\",\n type: \"address\"\n },\n {\n name: \"_hash\",\n type: \"bytes32\"\n },\n {\n name: \"_signature\",\n type: \"bytes\"\n }\n ],\n stateMutability: \"nonpayable\",\n type: \"constructor\"\n },\n {\n inputs: [\n {\n name: \"_signer\",\n type: \"address\"\n },\n {\n name: \"_hash\",\n type: \"bytes32\"\n },\n {\n name: \"_signature\",\n type: \"bytes\"\n }\n ],\n outputs: [\n {\n type: \"bool\"\n }\n ],\n stateMutability: \"nonpayable\",\n type: \"function\",\n name: \"isValidSig\"\n }\n ];\n InvalidWrappedSignatureError2 = class extends BaseError3 {\n constructor(wrapped) {\n super(`Value \\`${wrapped}\\` is an invalid ERC-6492 wrapped signature.`);\n Object.defineProperty(this, \"name\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: \"SignatureErc6492.InvalidWrappedSignatureError\"\n });\n }\n };\n }\n });\n\n // ../../../node_modules/.pnpm/ox@0.9.6_typescript@5.8.3_zod@3.25.64/node_modules/ox/_esm/erc6492/index.js\n var init_erc6492 = __esm({\n \"../../../node_modules/.pnpm/ox@0.9.6_typescript@5.8.3_zod@3.25.64/node_modules/ox/_esm/erc6492/index.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_SignatureErc6492();\n }\n });\n\n // ../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/utils/signature/serializeSignature.js\n function serializeSignature({ r: r2, s: s4, to = \"hex\", v: v2, yParity }) {\n const yParity_ = (() => {\n if (yParity === 0 || yParity === 1)\n return yParity;\n if (v2 && (v2 === 27n || v2 === 28n || v2 >= 35n))\n return v2 % 2n === 0n ? 1 : 0;\n throw new Error(\"Invalid `v` or `yParity` value\");\n })();\n const signature = `0x${new secp256k1.Signature(hexToBigInt(r2), hexToBigInt(s4)).toCompactHex()}${yParity_ === 0 ? \"1b\" : \"1c\"}`;\n if (to === \"hex\")\n return signature;\n return hexToBytes(signature);\n }\n var init_serializeSignature = __esm({\n \"../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/utils/signature/serializeSignature.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_secp256k1();\n init_fromHex();\n init_toBytes();\n }\n });\n\n // ../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/actions/public/verifyHash.js\n async function verifyHash(client, parameters) {\n const { address, hash: hash3, erc6492VerifierAddress: verifierAddress = parameters.universalSignatureVerifierAddress ?? client.chain?.contracts?.erc6492Verifier?.address, multicallAddress = parameters.multicallAddress ?? client.chain?.contracts?.multicall3?.address } = parameters;\n const signature = (() => {\n const signature2 = parameters.signature;\n if (isHex(signature2))\n return signature2;\n if (typeof signature2 === \"object\" && \"r\" in signature2 && \"s\" in signature2)\n return serializeSignature(signature2);\n return bytesToHex(signature2);\n })();\n try {\n if (SignatureErc8010_exports.validate(signature))\n return await verifyErc8010(client, {\n ...parameters,\n multicallAddress,\n signature\n });\n return await verifyErc6492(client, {\n ...parameters,\n verifierAddress,\n signature\n });\n } catch (error) {\n try {\n const verified = isAddressEqual(getAddress(address), await recoverAddress({ hash: hash3, signature }));\n if (verified)\n return true;\n } catch {\n }\n if (error instanceof VerificationError) {\n return false;\n }\n throw error;\n }\n }\n async function verifyErc8010(client, parameters) {\n const { address, blockNumber, blockTag, hash: hash3, multicallAddress } = parameters;\n const { authorization: authorization_ox, data: initData, signature, to } = SignatureErc8010_exports.unwrap(parameters.signature);\n const code = await getCode(client, {\n address,\n blockNumber,\n blockTag\n });\n if (code === concatHex([\"0xef0100\", authorization_ox.address]))\n return await verifyErc1271(client, {\n address,\n blockNumber,\n blockTag,\n hash: hash3,\n signature\n });\n const authorization = {\n address: authorization_ox.address,\n chainId: Number(authorization_ox.chainId),\n nonce: Number(authorization_ox.nonce),\n r: numberToHex(authorization_ox.r, { size: 32 }),\n s: numberToHex(authorization_ox.s, { size: 32 }),\n yParity: authorization_ox.yParity\n };\n const valid = await verifyAuthorization({\n address,\n authorization\n });\n if (!valid)\n throw new VerificationError();\n const results = await getAction(client, readContract, \"readContract\")({\n ...multicallAddress ? { address: multicallAddress } : { code: multicall3Bytecode },\n authorizationList: [authorization],\n abi: multicall3Abi,\n blockNumber,\n blockTag: \"pending\",\n functionName: \"aggregate3\",\n args: [\n [\n ...initData ? [\n {\n allowFailure: true,\n target: to ?? address,\n callData: initData\n }\n ] : [],\n {\n allowFailure: true,\n target: address,\n callData: encodeFunctionData({\n abi: erc1271Abi,\n functionName: \"isValidSignature\",\n args: [hash3, signature]\n })\n }\n ]\n ]\n });\n const data = results[results.length - 1]?.returnData;\n if (data?.startsWith(\"0x1626ba7e\"))\n return true;\n throw new VerificationError();\n }\n async function verifyErc6492(client, parameters) {\n const { address, factory, factoryData, hash: hash3, signature, verifierAddress, ...rest } = parameters;\n const wrappedSignature = await (async () => {\n if (!factory && !factoryData)\n return signature;\n if (SignatureErc6492_exports.validate(signature))\n return signature;\n return SignatureErc6492_exports.wrap({\n data: factoryData,\n signature,\n to: factory\n });\n })();\n const args = verifierAddress ? {\n to: verifierAddress,\n data: encodeFunctionData({\n abi: erc6492SignatureValidatorAbi,\n functionName: \"isValidSig\",\n args: [address, hash3, wrappedSignature]\n }),\n ...rest\n } : {\n data: encodeDeployData({\n abi: erc6492SignatureValidatorAbi,\n args: [address, hash3, wrappedSignature],\n bytecode: erc6492SignatureValidatorByteCode\n }),\n ...rest\n };\n const { data } = await getAction(client, call, \"call\")(args).catch((error) => {\n if (error instanceof CallExecutionError)\n throw new VerificationError();\n throw error;\n });\n if (hexToBool(data ?? \"0x0\"))\n return true;\n throw new VerificationError();\n }\n async function verifyErc1271(client, parameters) {\n const { address, blockNumber, blockTag, hash: hash3, signature } = parameters;\n const result = await getAction(client, readContract, \"readContract\")({\n address,\n abi: erc1271Abi,\n args: [hash3, signature],\n blockNumber,\n blockTag,\n functionName: \"isValidSignature\"\n }).catch((error) => {\n if (error instanceof ContractFunctionExecutionError)\n throw new VerificationError();\n throw error;\n });\n if (result.startsWith(\"0x1626ba7e\"))\n return true;\n throw new VerificationError();\n }\n var VerificationError;\n var init_verifyHash = __esm({\n \"../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/actions/public/verifyHash.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_erc6492();\n init_erc8010();\n init_abis();\n init_contracts();\n init_contract();\n init_encodeDeployData();\n init_encodeFunctionData();\n init_getAddress();\n init_isAddressEqual();\n init_verifyAuthorization();\n init_concat();\n init_isHex();\n init_fromHex();\n init_toHex();\n init_getAction();\n init_recoverAddress();\n init_serializeSignature();\n init_call();\n init_getCode();\n init_readContract();\n VerificationError = class extends Error {\n };\n }\n });\n\n // ../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/actions/public/verifyMessage.js\n async function verifyMessage(client, { address, message, factory, factoryData, signature, ...callRequest }) {\n const hash3 = hashMessage(message);\n return verifyHash(client, {\n address,\n factory,\n factoryData,\n hash: hash3,\n signature,\n ...callRequest\n });\n }\n var init_verifyMessage = __esm({\n \"../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/actions/public/verifyMessage.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_hashMessage();\n init_verifyHash();\n }\n });\n\n // ../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/actions/public/verifyTypedData.js\n async function verifyTypedData(client, parameters) {\n const { address, factory, factoryData, signature, message, primaryType, types, domain: domain2, ...callRequest } = parameters;\n const hash3 = hashTypedData({ message, primaryType, types, domain: domain2 });\n return verifyHash(client, {\n address,\n factory,\n factoryData,\n hash: hash3,\n signature,\n ...callRequest\n });\n }\n var init_verifyTypedData = __esm({\n \"../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/actions/public/verifyTypedData.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_hashTypedData();\n init_verifyHash();\n }\n });\n\n // ../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/actions/public/watchBlockNumber.js\n function watchBlockNumber(client, { emitOnBegin = false, emitMissed = false, onBlockNumber, onError, poll: poll_, pollingInterval = client.pollingInterval }) {\n const enablePolling = (() => {\n if (typeof poll_ !== \"undefined\")\n return poll_;\n if (client.transport.type === \"webSocket\" || client.transport.type === \"ipc\")\n return false;\n if (client.transport.type === \"fallback\" && (client.transport.transports[0].config.type === \"webSocket\" || client.transport.transports[0].config.type === \"ipc\"))\n return false;\n return true;\n })();\n let prevBlockNumber;\n const pollBlockNumber = () => {\n const observerId = stringify([\n \"watchBlockNumber\",\n client.uid,\n emitOnBegin,\n emitMissed,\n pollingInterval\n ]);\n return observe(observerId, { onBlockNumber, onError }, (emit2) => poll(async () => {\n try {\n const blockNumber = await getAction(client, getBlockNumber, \"getBlockNumber\")({ cacheTime: 0 });\n if (prevBlockNumber !== void 0) {\n if (blockNumber === prevBlockNumber)\n return;\n if (blockNumber - prevBlockNumber > 1 && emitMissed) {\n for (let i3 = prevBlockNumber + 1n; i3 < blockNumber; i3++) {\n emit2.onBlockNumber(i3, prevBlockNumber);\n prevBlockNumber = i3;\n }\n }\n }\n if (prevBlockNumber === void 0 || blockNumber > prevBlockNumber) {\n emit2.onBlockNumber(blockNumber, prevBlockNumber);\n prevBlockNumber = blockNumber;\n }\n } catch (err) {\n emit2.onError?.(err);\n }\n }, {\n emitOnBegin,\n interval: pollingInterval\n }));\n };\n const subscribeBlockNumber = () => {\n const observerId = stringify([\n \"watchBlockNumber\",\n client.uid,\n emitOnBegin,\n emitMissed\n ]);\n return observe(observerId, { onBlockNumber, onError }, (emit2) => {\n let active = true;\n let unsubscribe = () => active = false;\n (async () => {\n try {\n const transport = (() => {\n if (client.transport.type === \"fallback\") {\n const transport2 = client.transport.transports.find((transport3) => transport3.config.type === \"webSocket\" || transport3.config.type === \"ipc\");\n if (!transport2)\n return client.transport;\n return transport2.value;\n }\n return client.transport;\n })();\n const { unsubscribe: unsubscribe_ } = await transport.subscribe({\n params: [\"newHeads\"],\n onData(data) {\n if (!active)\n return;\n const blockNumber = hexToBigInt(data.result?.number);\n emit2.onBlockNumber(blockNumber, prevBlockNumber);\n prevBlockNumber = blockNumber;\n },\n onError(error) {\n emit2.onError?.(error);\n }\n });\n unsubscribe = unsubscribe_;\n if (!active)\n unsubscribe();\n } catch (err) {\n onError?.(err);\n }\n })();\n return () => unsubscribe();\n });\n };\n return enablePolling ? pollBlockNumber() : subscribeBlockNumber();\n }\n var init_watchBlockNumber = __esm({\n \"../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/actions/public/watchBlockNumber.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_fromHex();\n init_getAction();\n init_observe();\n init_poll();\n init_stringify();\n init_getBlockNumber();\n }\n });\n\n // ../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/actions/public/waitForTransactionReceipt.js\n async function waitForTransactionReceipt(client, parameters) {\n const {\n checkReplacement = true,\n confirmations = 1,\n hash: hash3,\n onReplaced,\n retryCount = 6,\n retryDelay = ({ count }) => ~~(1 << count) * 200,\n // exponential backoff\n timeout = 18e4\n } = parameters;\n const observerId = stringify([\"waitForTransactionReceipt\", client.uid, hash3]);\n const pollingInterval = (() => {\n if (parameters.pollingInterval)\n return parameters.pollingInterval;\n if (client.chain?.experimental_preconfirmationTime)\n return client.chain.experimental_preconfirmationTime;\n return client.pollingInterval;\n })();\n let transaction;\n let replacedTransaction;\n let receipt;\n let retrying = false;\n let _unobserve;\n let _unwatch;\n const { promise, resolve, reject } = withResolvers();\n const timer = timeout ? setTimeout(() => {\n _unwatch?.();\n _unobserve?.();\n reject(new WaitForTransactionReceiptTimeoutError({ hash: hash3 }));\n }, timeout) : void 0;\n _unobserve = observe(observerId, { onReplaced, resolve, reject }, async (emit2) => {\n receipt = await getAction(client, getTransactionReceipt, \"getTransactionReceipt\")({ hash: hash3 }).catch(() => void 0);\n if (receipt && confirmations <= 1) {\n clearTimeout(timer);\n emit2.resolve(receipt);\n _unobserve?.();\n return;\n }\n _unwatch = getAction(client, watchBlockNumber, \"watchBlockNumber\")({\n emitMissed: true,\n emitOnBegin: true,\n poll: true,\n pollingInterval,\n async onBlockNumber(blockNumber_) {\n const done = (fn) => {\n clearTimeout(timer);\n _unwatch?.();\n fn();\n _unobserve?.();\n };\n let blockNumber = blockNumber_;\n if (retrying)\n return;\n try {\n if (receipt) {\n if (confirmations > 1 && (!receipt.blockNumber || blockNumber - receipt.blockNumber + 1n < confirmations))\n return;\n done(() => emit2.resolve(receipt));\n return;\n }\n if (checkReplacement && !transaction) {\n retrying = true;\n await withRetry(async () => {\n transaction = await getAction(client, getTransaction, \"getTransaction\")({ hash: hash3 });\n if (transaction.blockNumber)\n blockNumber = transaction.blockNumber;\n }, {\n delay: retryDelay,\n retryCount\n });\n retrying = false;\n }\n receipt = await getAction(client, getTransactionReceipt, \"getTransactionReceipt\")({ hash: hash3 });\n if (confirmations > 1 && (!receipt.blockNumber || blockNumber - receipt.blockNumber + 1n < confirmations))\n return;\n done(() => emit2.resolve(receipt));\n } catch (err) {\n if (err instanceof TransactionNotFoundError || err instanceof TransactionReceiptNotFoundError) {\n if (!transaction) {\n retrying = false;\n return;\n }\n try {\n replacedTransaction = transaction;\n retrying = true;\n const block = await withRetry(() => getAction(client, getBlock, \"getBlock\")({\n blockNumber,\n includeTransactions: true\n }), {\n delay: retryDelay,\n retryCount,\n shouldRetry: ({ error }) => error instanceof BlockNotFoundError\n });\n retrying = false;\n const replacementTransaction = block.transactions.find(({ from: from14, nonce }) => from14 === replacedTransaction.from && nonce === replacedTransaction.nonce);\n if (!replacementTransaction)\n return;\n receipt = await getAction(client, getTransactionReceipt, \"getTransactionReceipt\")({\n hash: replacementTransaction.hash\n });\n if (confirmations > 1 && (!receipt.blockNumber || blockNumber - receipt.blockNumber + 1n < confirmations))\n return;\n let reason = \"replaced\";\n if (replacementTransaction.to === replacedTransaction.to && replacementTransaction.value === replacedTransaction.value && replacementTransaction.input === replacedTransaction.input) {\n reason = \"repriced\";\n } else if (replacementTransaction.from === replacementTransaction.to && replacementTransaction.value === 0n) {\n reason = \"cancelled\";\n }\n done(() => {\n emit2.onReplaced?.({\n reason,\n replacedTransaction,\n transaction: replacementTransaction,\n transactionReceipt: receipt\n });\n emit2.resolve(receipt);\n });\n } catch (err_) {\n done(() => emit2.reject(err_));\n }\n } else {\n done(() => emit2.reject(err));\n }\n }\n }\n });\n });\n return promise;\n }\n var init_waitForTransactionReceipt = __esm({\n \"../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/actions/public/waitForTransactionReceipt.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_block();\n init_transaction();\n init_getAction();\n init_observe();\n init_withResolvers();\n init_withRetry();\n init_stringify();\n init_getBlock();\n init_getTransaction();\n init_getTransactionReceipt();\n init_watchBlockNumber();\n }\n });\n\n // ../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/actions/public/watchBlocks.js\n function watchBlocks(client, { blockTag = client.experimental_blockTag ?? \"latest\", emitMissed = false, emitOnBegin = false, onBlock, onError, includeTransactions: includeTransactions_, poll: poll_, pollingInterval = client.pollingInterval }) {\n const enablePolling = (() => {\n if (typeof poll_ !== \"undefined\")\n return poll_;\n if (client.transport.type === \"webSocket\" || client.transport.type === \"ipc\")\n return false;\n if (client.transport.type === \"fallback\" && (client.transport.transports[0].config.type === \"webSocket\" || client.transport.transports[0].config.type === \"ipc\"))\n return false;\n return true;\n })();\n const includeTransactions = includeTransactions_ ?? false;\n let prevBlock;\n const pollBlocks = () => {\n const observerId = stringify([\n \"watchBlocks\",\n client.uid,\n blockTag,\n emitMissed,\n emitOnBegin,\n includeTransactions,\n pollingInterval\n ]);\n return observe(observerId, { onBlock, onError }, (emit2) => poll(async () => {\n try {\n const block = await getAction(client, getBlock, \"getBlock\")({\n blockTag,\n includeTransactions\n });\n if (block.number !== null && prevBlock?.number != null) {\n if (block.number === prevBlock.number)\n return;\n if (block.number - prevBlock.number > 1 && emitMissed) {\n for (let i3 = prevBlock?.number + 1n; i3 < block.number; i3++) {\n const block2 = await getAction(client, getBlock, \"getBlock\")({\n blockNumber: i3,\n includeTransactions\n });\n emit2.onBlock(block2, prevBlock);\n prevBlock = block2;\n }\n }\n }\n if (\n // If no previous block exists, emit.\n prevBlock?.number == null || // If the block tag is \"pending\" with no block number, emit.\n blockTag === \"pending\" && block?.number == null || // If the next block number is greater than the previous block number, emit.\n // We don't want to emit blocks in the past.\n block.number !== null && block.number > prevBlock.number\n ) {\n emit2.onBlock(block, prevBlock);\n prevBlock = block;\n }\n } catch (err) {\n emit2.onError?.(err);\n }\n }, {\n emitOnBegin,\n interval: pollingInterval\n }));\n };\n const subscribeBlocks = () => {\n let active = true;\n let emitFetched = true;\n let unsubscribe = () => active = false;\n (async () => {\n try {\n if (emitOnBegin) {\n getAction(client, getBlock, \"getBlock\")({\n blockTag,\n includeTransactions\n }).then((block) => {\n if (!active)\n return;\n if (!emitFetched)\n return;\n onBlock(block, void 0);\n emitFetched = false;\n }).catch(onError);\n }\n const transport = (() => {\n if (client.transport.type === \"fallback\") {\n const transport2 = client.transport.transports.find((transport3) => transport3.config.type === \"webSocket\" || transport3.config.type === \"ipc\");\n if (!transport2)\n return client.transport;\n return transport2.value;\n }\n return client.transport;\n })();\n const { unsubscribe: unsubscribe_ } = await transport.subscribe({\n params: [\"newHeads\"],\n async onData(data) {\n if (!active)\n return;\n const block = await getAction(client, getBlock, \"getBlock\")({\n blockNumber: data.result?.number,\n includeTransactions\n }).catch(() => {\n });\n if (!active)\n return;\n onBlock(block, prevBlock);\n emitFetched = false;\n prevBlock = block;\n },\n onError(error) {\n onError?.(error);\n }\n });\n unsubscribe = unsubscribe_;\n if (!active)\n unsubscribe();\n } catch (err) {\n onError?.(err);\n }\n })();\n return () => unsubscribe();\n };\n return enablePolling ? pollBlocks() : subscribeBlocks();\n }\n var init_watchBlocks = __esm({\n \"../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/actions/public/watchBlocks.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_getAction();\n init_observe();\n init_poll();\n init_stringify();\n init_getBlock();\n }\n });\n\n // ../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/actions/public/watchEvent.js\n function watchEvent(client, { address, args, batch = true, event, events, fromBlock, onError, onLogs, poll: poll_, pollingInterval = client.pollingInterval, strict: strict_ }) {\n const enablePolling = (() => {\n if (typeof poll_ !== \"undefined\")\n return poll_;\n if (typeof fromBlock === \"bigint\")\n return true;\n if (client.transport.type === \"webSocket\" || client.transport.type === \"ipc\")\n return false;\n if (client.transport.type === \"fallback\" && (client.transport.transports[0].config.type === \"webSocket\" || client.transport.transports[0].config.type === \"ipc\"))\n return false;\n return true;\n })();\n const strict = strict_ ?? false;\n const pollEvent = () => {\n const observerId = stringify([\n \"watchEvent\",\n address,\n args,\n batch,\n client.uid,\n event,\n pollingInterval,\n fromBlock\n ]);\n return observe(observerId, { onLogs, onError }, (emit2) => {\n let previousBlockNumber;\n if (fromBlock !== void 0)\n previousBlockNumber = fromBlock - 1n;\n let filter;\n let initialized = false;\n const unwatch = poll(async () => {\n if (!initialized) {\n try {\n filter = await getAction(client, createEventFilter, \"createEventFilter\")({\n address,\n args,\n event,\n events,\n strict,\n fromBlock\n });\n } catch {\n }\n initialized = true;\n return;\n }\n try {\n let logs;\n if (filter) {\n logs = await getAction(client, getFilterChanges, \"getFilterChanges\")({ filter });\n } else {\n const blockNumber = await getAction(client, getBlockNumber, \"getBlockNumber\")({});\n if (previousBlockNumber && previousBlockNumber !== blockNumber) {\n logs = await getAction(client, getLogs, \"getLogs\")({\n address,\n args,\n event,\n events,\n fromBlock: previousBlockNumber + 1n,\n toBlock: blockNumber\n });\n } else {\n logs = [];\n }\n previousBlockNumber = blockNumber;\n }\n if (logs.length === 0)\n return;\n if (batch)\n emit2.onLogs(logs);\n else\n for (const log of logs)\n emit2.onLogs([log]);\n } catch (err) {\n if (filter && err instanceof InvalidInputRpcError)\n initialized = false;\n emit2.onError?.(err);\n }\n }, {\n emitOnBegin: true,\n interval: pollingInterval\n });\n return async () => {\n if (filter)\n await getAction(client, uninstallFilter, \"uninstallFilter\")({ filter });\n unwatch();\n };\n });\n };\n const subscribeEvent = () => {\n let active = true;\n let unsubscribe = () => active = false;\n (async () => {\n try {\n const transport = (() => {\n if (client.transport.type === \"fallback\") {\n const transport2 = client.transport.transports.find((transport3) => transport3.config.type === \"webSocket\" || transport3.config.type === \"ipc\");\n if (!transport2)\n return client.transport;\n return transport2.value;\n }\n return client.transport;\n })();\n const events_ = events ?? (event ? [event] : void 0);\n let topics = [];\n if (events_) {\n const encoded = events_.flatMap((event2) => encodeEventTopics({\n abi: [event2],\n eventName: event2.name,\n args\n }));\n topics = [encoded];\n if (event)\n topics = topics[0];\n }\n const { unsubscribe: unsubscribe_ } = await transport.subscribe({\n params: [\"logs\", { address, topics }],\n onData(data) {\n if (!active)\n return;\n const log = data.result;\n try {\n const { eventName, args: args2 } = decodeEventLog({\n abi: events_ ?? [],\n data: log.data,\n topics: log.topics,\n strict\n });\n const formatted = formatLog(log, { args: args2, eventName });\n onLogs([formatted]);\n } catch (err) {\n let eventName;\n let isUnnamed;\n if (err instanceof DecodeLogDataMismatch || err instanceof DecodeLogTopicsMismatch) {\n if (strict_)\n return;\n eventName = err.abiItem.name;\n isUnnamed = err.abiItem.inputs?.some((x4) => !(\"name\" in x4 && x4.name));\n }\n const formatted = formatLog(log, {\n args: isUnnamed ? [] : {},\n eventName\n });\n onLogs([formatted]);\n }\n },\n onError(error) {\n onError?.(error);\n }\n });\n unsubscribe = unsubscribe_;\n if (!active)\n unsubscribe();\n } catch (err) {\n onError?.(err);\n }\n })();\n return () => unsubscribe();\n };\n return enablePolling ? pollEvent() : subscribeEvent();\n }\n var init_watchEvent = __esm({\n \"../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/actions/public/watchEvent.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_abi();\n init_rpc();\n init_decodeEventLog();\n init_encodeEventTopics();\n init_log2();\n init_getAction();\n init_observe();\n init_poll();\n init_stringify();\n init_createEventFilter();\n init_getBlockNumber();\n init_getFilterChanges();\n init_getLogs();\n init_uninstallFilter();\n }\n });\n\n // ../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/actions/public/watchPendingTransactions.js\n function watchPendingTransactions(client, { batch = true, onError, onTransactions, poll: poll_, pollingInterval = client.pollingInterval }) {\n const enablePolling = typeof poll_ !== \"undefined\" ? poll_ : client.transport.type !== \"webSocket\" && client.transport.type !== \"ipc\";\n const pollPendingTransactions = () => {\n const observerId = stringify([\n \"watchPendingTransactions\",\n client.uid,\n batch,\n pollingInterval\n ]);\n return observe(observerId, { onTransactions, onError }, (emit2) => {\n let filter;\n const unwatch = poll(async () => {\n try {\n if (!filter) {\n try {\n filter = await getAction(client, createPendingTransactionFilter, \"createPendingTransactionFilter\")({});\n return;\n } catch (err) {\n unwatch();\n throw err;\n }\n }\n const hashes = await getAction(client, getFilterChanges, \"getFilterChanges\")({ filter });\n if (hashes.length === 0)\n return;\n if (batch)\n emit2.onTransactions(hashes);\n else\n for (const hash3 of hashes)\n emit2.onTransactions([hash3]);\n } catch (err) {\n emit2.onError?.(err);\n }\n }, {\n emitOnBegin: true,\n interval: pollingInterval\n });\n return async () => {\n if (filter)\n await getAction(client, uninstallFilter, \"uninstallFilter\")({ filter });\n unwatch();\n };\n });\n };\n const subscribePendingTransactions = () => {\n let active = true;\n let unsubscribe = () => active = false;\n (async () => {\n try {\n const { unsubscribe: unsubscribe_ } = await client.transport.subscribe({\n params: [\"newPendingTransactions\"],\n onData(data) {\n if (!active)\n return;\n const transaction = data.result;\n onTransactions([transaction]);\n },\n onError(error) {\n onError?.(error);\n }\n });\n unsubscribe = unsubscribe_;\n if (!active)\n unsubscribe();\n } catch (err) {\n onError?.(err);\n }\n })();\n return () => unsubscribe();\n };\n return enablePolling ? pollPendingTransactions() : subscribePendingTransactions();\n }\n var init_watchPendingTransactions = __esm({\n \"../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/actions/public/watchPendingTransactions.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_getAction();\n init_observe();\n init_poll();\n init_stringify();\n init_createPendingTransactionFilter();\n init_getFilterChanges();\n init_uninstallFilter();\n }\n });\n\n // ../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/utils/siwe/parseSiweMessage.js\n function parseSiweMessage(message) {\n const { scheme, statement, ...prefix } = message.match(prefixRegex)?.groups ?? {};\n const { chainId, expirationTime, issuedAt, notBefore, requestId, ...suffix } = message.match(suffixRegex)?.groups ?? {};\n const resources = message.split(\"Resources:\")[1]?.split(\"\\n- \").slice(1);\n return {\n ...prefix,\n ...suffix,\n ...chainId ? { chainId: Number(chainId) } : {},\n ...expirationTime ? { expirationTime: new Date(expirationTime) } : {},\n ...issuedAt ? { issuedAt: new Date(issuedAt) } : {},\n ...notBefore ? { notBefore: new Date(notBefore) } : {},\n ...requestId ? { requestId } : {},\n ...resources ? { resources } : {},\n ...scheme ? { scheme } : {},\n ...statement ? { statement } : {}\n };\n }\n var prefixRegex, suffixRegex;\n var init_parseSiweMessage = __esm({\n \"../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/utils/siwe/parseSiweMessage.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n prefixRegex = /^(?:(?[a-zA-Z][a-zA-Z0-9+-.]*):\\/\\/)?(?[a-zA-Z0-9+-.]*(?::[0-9]{1,5})?) (?:wants you to sign in with your Ethereum account:\\n)(?
0x[a-fA-F0-9]{40})\\n\\n(?:(?.*)\\n\\n)?/;\n suffixRegex = /(?:URI: (?.+))\\n(?:Version: (?.+))\\n(?:Chain ID: (?\\d+))\\n(?:Nonce: (?[a-zA-Z0-9]+))\\n(?:Issued At: (?.+))(?:\\nExpiration Time: (?.+))?(?:\\nNot Before: (?.+))?(?:\\nRequest ID: (?.+))?/;\n }\n });\n\n // ../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/utils/siwe/validateSiweMessage.js\n function validateSiweMessage(parameters) {\n const { address, domain: domain2, message, nonce, scheme, time = /* @__PURE__ */ new Date() } = parameters;\n if (domain2 && message.domain !== domain2)\n return false;\n if (nonce && message.nonce !== nonce)\n return false;\n if (scheme && message.scheme !== scheme)\n return false;\n if (message.expirationTime && time >= message.expirationTime)\n return false;\n if (message.notBefore && time < message.notBefore)\n return false;\n try {\n if (!message.address)\n return false;\n if (!isAddress(message.address, { strict: false }))\n return false;\n if (address && !isAddressEqual(message.address, address))\n return false;\n } catch {\n return false;\n }\n return true;\n }\n var init_validateSiweMessage = __esm({\n \"../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/utils/siwe/validateSiweMessage.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_isAddress();\n init_isAddressEqual();\n }\n });\n\n // ../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/actions/siwe/verifySiweMessage.js\n async function verifySiweMessage(client, parameters) {\n const { address, domain: domain2, message, nonce, scheme, signature, time = /* @__PURE__ */ new Date(), ...callRequest } = parameters;\n const parsed = parseSiweMessage(message);\n if (!parsed.address)\n return false;\n const isValid2 = validateSiweMessage({\n address,\n domain: domain2,\n message: parsed,\n nonce,\n scheme,\n time\n });\n if (!isValid2)\n return false;\n const hash3 = hashMessage(message);\n return verifyHash(client, {\n address: parsed.address,\n hash: hash3,\n signature,\n ...callRequest\n });\n }\n var init_verifySiweMessage = __esm({\n \"../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/actions/siwe/verifySiweMessage.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_hashMessage();\n init_parseSiweMessage();\n init_validateSiweMessage();\n init_verifyHash();\n }\n });\n\n // ../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/actions/wallet/sendRawTransactionSync.js\n async function sendRawTransactionSync(client, { serializedTransaction, throwOnReceiptRevert, timeout }) {\n const receipt = await client.request({\n method: \"eth_sendRawTransactionSync\",\n params: timeout ? [serializedTransaction, numberToHex(timeout)] : [serializedTransaction]\n }, { retryCount: 0 });\n const format = client.chain?.formatters?.transactionReceipt?.format || formatTransactionReceipt;\n const formatted = format(receipt);\n if (formatted.status === \"reverted\" && throwOnReceiptRevert)\n throw new TransactionReceiptRevertedError({ receipt: formatted });\n return formatted;\n }\n var init_sendRawTransactionSync = __esm({\n \"../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/actions/wallet/sendRawTransactionSync.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_transaction();\n init_transactionReceipt();\n init_utils7();\n }\n });\n\n // ../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/clients/decorators/public.js\n function publicActions(client) {\n return {\n call: (args) => call(client, args),\n createAccessList: (args) => createAccessList(client, args),\n createBlockFilter: () => createBlockFilter(client),\n createContractEventFilter: (args) => createContractEventFilter(client, args),\n createEventFilter: (args) => createEventFilter(client, args),\n createPendingTransactionFilter: () => createPendingTransactionFilter(client),\n estimateContractGas: (args) => estimateContractGas(client, args),\n estimateGas: (args) => estimateGas(client, args),\n getBalance: (args) => getBalance(client, args),\n getBlobBaseFee: () => getBlobBaseFee(client),\n getBlock: (args) => getBlock(client, args),\n getBlockNumber: (args) => getBlockNumber(client, args),\n getBlockTransactionCount: (args) => getBlockTransactionCount(client, args),\n getBytecode: (args) => getCode(client, args),\n getChainId: () => getChainId(client),\n getCode: (args) => getCode(client, args),\n getContractEvents: (args) => getContractEvents(client, args),\n getEip712Domain: (args) => getEip712Domain(client, args),\n getEnsAddress: (args) => getEnsAddress(client, args),\n getEnsAvatar: (args) => getEnsAvatar(client, args),\n getEnsName: (args) => getEnsName(client, args),\n getEnsResolver: (args) => getEnsResolver(client, args),\n getEnsText: (args) => getEnsText(client, args),\n getFeeHistory: (args) => getFeeHistory(client, args),\n estimateFeesPerGas: (args) => estimateFeesPerGas(client, args),\n getFilterChanges: (args) => getFilterChanges(client, args),\n getFilterLogs: (args) => getFilterLogs(client, args),\n getGasPrice: () => getGasPrice(client),\n getLogs: (args) => getLogs(client, args),\n getProof: (args) => getProof(client, args),\n estimateMaxPriorityFeePerGas: (args) => estimateMaxPriorityFeePerGas(client, args),\n getStorageAt: (args) => getStorageAt(client, args),\n getTransaction: (args) => getTransaction(client, args),\n getTransactionConfirmations: (args) => getTransactionConfirmations(client, args),\n getTransactionCount: (args) => getTransactionCount(client, args),\n getTransactionReceipt: (args) => getTransactionReceipt(client, args),\n multicall: (args) => multicall(client, args),\n prepareTransactionRequest: (args) => prepareTransactionRequest(client, args),\n readContract: (args) => readContract(client, args),\n sendRawTransaction: (args) => sendRawTransaction(client, args),\n sendRawTransactionSync: (args) => sendRawTransactionSync(client, args),\n simulate: (args) => simulateBlocks(client, args),\n simulateBlocks: (args) => simulateBlocks(client, args),\n simulateCalls: (args) => simulateCalls(client, args),\n simulateContract: (args) => simulateContract(client, args),\n verifyHash: (args) => verifyHash(client, args),\n verifyMessage: (args) => verifyMessage(client, args),\n verifySiweMessage: (args) => verifySiweMessage(client, args),\n verifyTypedData: (args) => verifyTypedData(client, args),\n uninstallFilter: (args) => uninstallFilter(client, args),\n waitForTransactionReceipt: (args) => waitForTransactionReceipt(client, args),\n watchBlocks: (args) => watchBlocks(client, args),\n watchBlockNumber: (args) => watchBlockNumber(client, args),\n watchContractEvent: (args) => watchContractEvent(client, args),\n watchEvent: (args) => watchEvent(client, args),\n watchPendingTransactions: (args) => watchPendingTransactions(client, args)\n };\n }\n var init_public = __esm({\n \"../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/clients/decorators/public.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_getEnsAddress();\n init_getEnsAvatar();\n init_getEnsName();\n init_getEnsResolver();\n init_getEnsText();\n init_call();\n init_createAccessList();\n init_createBlockFilter();\n init_createContractEventFilter();\n init_createEventFilter();\n init_createPendingTransactionFilter();\n init_estimateContractGas();\n init_estimateFeesPerGas();\n init_estimateGas2();\n init_estimateMaxPriorityFeePerGas();\n init_getBalance();\n init_getBlobBaseFee();\n init_getBlock();\n init_getBlockNumber();\n init_getBlockTransactionCount();\n init_getChainId();\n init_getCode();\n init_getContractEvents();\n init_getEip712Domain();\n init_getFeeHistory();\n init_getFilterChanges();\n init_getFilterLogs();\n init_getGasPrice();\n init_getLogs();\n init_getProof();\n init_getStorageAt();\n init_getTransaction();\n init_getTransactionConfirmations();\n init_getTransactionCount();\n init_getTransactionReceipt();\n init_multicall();\n init_readContract();\n init_simulateBlocks();\n init_simulateCalls();\n init_simulateContract();\n init_uninstallFilter();\n init_verifyHash();\n init_verifyMessage();\n init_verifyTypedData();\n init_waitForTransactionReceipt();\n init_watchBlockNumber();\n init_watchBlocks();\n init_watchContractEvent();\n init_watchEvent();\n init_watchPendingTransactions();\n init_verifySiweMessage();\n init_prepareTransactionRequest();\n init_sendRawTransaction();\n init_sendRawTransactionSync();\n }\n });\n\n // ../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/clients/transports/createTransport.js\n function createTransport({ key, methods, name, request, retryCount = 3, retryDelay = 150, timeout, type }, value) {\n const uid2 = uid();\n return {\n config: {\n key,\n methods,\n name,\n request,\n retryCount,\n retryDelay,\n timeout,\n type\n },\n request: buildRequest(request, { methods, retryCount, retryDelay, uid: uid2 }),\n value\n };\n }\n var init_createTransport = __esm({\n \"../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/clients/transports/createTransport.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_buildRequest();\n init_uid();\n }\n });\n\n // ../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/clients/transports/custom.js\n function custom(provider, config2 = {}) {\n const { key = \"custom\", methods, name = \"Custom Provider\", retryDelay } = config2;\n return ({ retryCount: defaultRetryCount }) => createTransport({\n key,\n methods,\n name,\n request: provider.request.bind(provider),\n retryCount: config2.retryCount ?? defaultRetryCount,\n retryDelay,\n type: \"custom\"\n });\n }\n var init_custom = __esm({\n \"../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/clients/transports/custom.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_createTransport();\n }\n });\n\n // ../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/errors/transport.js\n var UrlRequiredError;\n var init_transport = __esm({\n \"../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/errors/transport.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_base();\n UrlRequiredError = class extends BaseError2 {\n constructor() {\n super(\"No URL was provided to the Transport. Please provide a valid RPC URL to the Transport.\", {\n docsPath: \"/docs/clients/intro\",\n name: \"UrlRequiredError\"\n });\n }\n };\n }\n });\n\n // ../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/clients/transports/http.js\n function http(url, config2 = {}) {\n const { batch, fetchFn, fetchOptions, key = \"http\", methods, name = \"HTTP JSON-RPC\", onFetchRequest, onFetchResponse, retryDelay, raw } = config2;\n return ({ chain: chain2, retryCount: retryCount_, timeout: timeout_ }) => {\n const { batchSize = 1e3, wait: wait2 = 0 } = typeof batch === \"object\" ? batch : {};\n const retryCount = config2.retryCount ?? retryCount_;\n const timeout = timeout_ ?? config2.timeout ?? 1e4;\n const url_ = url || chain2?.rpcUrls.default.http[0];\n if (!url_)\n throw new UrlRequiredError();\n const rpcClient = getHttpRpcClient(url_, {\n fetchFn,\n fetchOptions,\n onRequest: onFetchRequest,\n onResponse: onFetchResponse,\n timeout\n });\n return createTransport({\n key,\n methods,\n name,\n async request({ method, params }) {\n const body = { method, params };\n const { schedule } = createBatchScheduler({\n id: url_,\n wait: wait2,\n shouldSplitBatch(requests) {\n return requests.length > batchSize;\n },\n fn: (body2) => rpcClient.request({\n body: body2\n }),\n sort: (a3, b4) => a3.id - b4.id\n });\n const fn = async (body2) => batch ? schedule(body2) : [\n await rpcClient.request({\n body: body2\n })\n ];\n const [{ error, result }] = await fn(body);\n if (raw)\n return { error, result };\n if (error)\n throw new RpcRequestError({\n body,\n error,\n url: url_\n });\n return result;\n },\n retryCount,\n retryDelay,\n timeout,\n type: \"http\"\n }, {\n fetchOptions,\n url: url_\n });\n };\n }\n var init_http2 = __esm({\n \"../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/clients/transports/http.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_request();\n init_transport();\n init_createBatchScheduler();\n init_http();\n init_createTransport();\n }\n });\n\n // ../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/index.js\n var init_esm = __esm({\n \"../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/index.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_exports();\n init_getContract();\n init_createClient();\n init_public();\n init_createTransport();\n init_custom();\n init_http2();\n init_address2();\n init_bytes2();\n init_number();\n init_address();\n init_base();\n init_stateOverride();\n init_decodeErrorResult();\n init_encodeAbiParameters();\n init_encodeDeployData();\n init_encodeFunctionData();\n init_encodeFunctionResult();\n init_encodePacked();\n init_getContractAddress();\n init_isAddress();\n init_defineChain();\n init_concat();\n init_isHex();\n init_pad();\n init_size();\n init_trim();\n init_fromHex();\n init_toBytes();\n init_toHex();\n init_keccak256();\n init_hashMessage();\n init_hashTypedData();\n init_recoverAddress();\n }\n });\n\n // ../../../node_modules/.pnpm/@noble+curves@1.9.7/node_modules/@noble/curves/esm/utils.js\n function _abool2(value, title2 = \"\") {\n if (typeof value !== \"boolean\") {\n const prefix = title2 && `\"${title2}\"`;\n throw new Error(prefix + \"expected boolean, got type=\" + typeof value);\n }\n return value;\n }\n function _abytes2(value, length2, title2 = \"\") {\n const bytes = isBytes(value);\n const len = value?.length;\n const needsLen = length2 !== void 0;\n if (!bytes || needsLen && len !== length2) {\n const prefix = title2 && `\"${title2}\" `;\n const ofLen = needsLen ? ` of length ${length2}` : \"\";\n const got = bytes ? `length=${len}` : `type=${typeof value}`;\n throw new Error(prefix + \"expected Uint8Array\" + ofLen + \", got \" + got);\n }\n return value;\n }\n function numberToHexUnpadded2(num2) {\n const hex = num2.toString(16);\n return hex.length & 1 ? \"0\" + hex : hex;\n }\n function hexToNumber3(hex) {\n if (typeof hex !== \"string\")\n throw new Error(\"hex string expected, got \" + typeof hex);\n return hex === \"\" ? _0n7 : BigInt(\"0x\" + hex);\n }\n function bytesToNumberBE2(bytes) {\n return hexToNumber3(bytesToHex2(bytes));\n }\n function bytesToNumberLE2(bytes) {\n abytes(bytes);\n return hexToNumber3(bytesToHex2(Uint8Array.from(bytes).reverse()));\n }\n function numberToBytesBE2(n2, len) {\n return hexToBytes2(n2.toString(16).padStart(len * 2, \"0\"));\n }\n function numberToBytesLE2(n2, len) {\n return numberToBytesBE2(n2, len).reverse();\n }\n function ensureBytes2(title2, hex, expectedLength) {\n let res;\n if (typeof hex === \"string\") {\n try {\n res = hexToBytes2(hex);\n } catch (e3) {\n throw new Error(title2 + \" must be hex string or Uint8Array, cause: \" + e3);\n }\n } else if (isBytes(hex)) {\n res = Uint8Array.from(hex);\n } else {\n throw new Error(title2 + \" must be hex string or Uint8Array\");\n }\n const len = res.length;\n if (typeof expectedLength === \"number\" && len !== expectedLength)\n throw new Error(title2 + \" of length \" + expectedLength + \" expected, got \" + len);\n return res;\n }\n function inRange2(n2, min, max) {\n return isPosBig2(n2) && isPosBig2(min) && isPosBig2(max) && min <= n2 && n2 < max;\n }\n function aInRange2(title2, n2, min, max) {\n if (!inRange2(n2, min, max))\n throw new Error(\"expected valid \" + title2 + \": \" + min + \" <= n < \" + max + \", got \" + n2);\n }\n function bitLen2(n2) {\n let len;\n for (len = 0; n2 > _0n7; n2 >>= _1n7, len += 1)\n ;\n return len;\n }\n function createHmacDrbg2(hashLen, qByteLen, hmacFn) {\n if (typeof hashLen !== \"number\" || hashLen < 2)\n throw new Error(\"hashLen must be a number\");\n if (typeof qByteLen !== \"number\" || qByteLen < 2)\n throw new Error(\"qByteLen must be a number\");\n if (typeof hmacFn !== \"function\")\n throw new Error(\"hmacFn must be a function\");\n const u8n2 = (len) => new Uint8Array(len);\n const u8of = (byte) => Uint8Array.of(byte);\n let v2 = u8n2(hashLen);\n let k4 = u8n2(hashLen);\n let i3 = 0;\n const reset = () => {\n v2.fill(1);\n k4.fill(0);\n i3 = 0;\n };\n const h4 = (...b4) => hmacFn(k4, v2, ...b4);\n const reseed = (seed = u8n2(0)) => {\n k4 = h4(u8of(0), seed);\n v2 = h4();\n if (seed.length === 0)\n return;\n k4 = h4(u8of(1), seed);\n v2 = h4();\n };\n const gen2 = () => {\n if (i3++ >= 1e3)\n throw new Error(\"drbg: tried 1000 values\");\n let len = 0;\n const out = [];\n while (len < qByteLen) {\n v2 = h4();\n const sl = v2.slice();\n out.push(sl);\n len += v2.length;\n }\n return concatBytes(...out);\n };\n const genUntil = (seed, pred) => {\n reset();\n reseed(seed);\n let res = void 0;\n while (!(res = pred(gen2())))\n reseed();\n reset();\n return res;\n };\n return genUntil;\n }\n function _validateObject(object2, fields, optFields = {}) {\n if (!object2 || typeof object2 !== \"object\")\n throw new Error(\"expected valid options object\");\n function checkField(fieldName, expectedType, isOpt) {\n const val = object2[fieldName];\n if (isOpt && val === void 0)\n return;\n const current = typeof val;\n if (current !== expectedType || val === null)\n throw new Error(`param \"${fieldName}\" is invalid: expected ${expectedType}, got ${current}`);\n }\n Object.entries(fields).forEach(([k4, v2]) => checkField(k4, v2, false));\n Object.entries(optFields).forEach(([k4, v2]) => checkField(k4, v2, true));\n }\n function memoized2(fn) {\n const map = /* @__PURE__ */ new WeakMap();\n return (arg, ...args) => {\n const val = map.get(arg);\n if (val !== void 0)\n return val;\n const computed = fn(arg, ...args);\n map.set(arg, computed);\n return computed;\n };\n }\n var _0n7, _1n7, isPosBig2, bitMask2;\n var init_utils8 = __esm({\n \"../../../node_modules/.pnpm/@noble+curves@1.9.7/node_modules/@noble/curves/esm/utils.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_utils3();\n init_utils3();\n _0n7 = /* @__PURE__ */ BigInt(0);\n _1n7 = /* @__PURE__ */ BigInt(1);\n isPosBig2 = (n2) => typeof n2 === \"bigint\" && _0n7 <= n2;\n bitMask2 = (n2) => (_1n7 << BigInt(n2)) - _1n7;\n }\n });\n\n // ../../../node_modules/.pnpm/@noble+curves@1.9.7/node_modules/@noble/curves/esm/abstract/modular.js\n function mod2(a3, b4) {\n const result = a3 % b4;\n return result >= _0n8 ? result : b4 + result;\n }\n function pow22(x4, power, modulo) {\n let res = x4;\n while (power-- > _0n8) {\n res *= res;\n res %= modulo;\n }\n return res;\n }\n function invert2(number2, modulo) {\n if (number2 === _0n8)\n throw new Error(\"invert: expected non-zero number\");\n if (modulo <= _0n8)\n throw new Error(\"invert: expected positive modulus, got \" + modulo);\n let a3 = mod2(number2, modulo);\n let b4 = modulo;\n let x4 = _0n8, y6 = _1n8, u2 = _1n8, v2 = _0n8;\n while (a3 !== _0n8) {\n const q3 = b4 / a3;\n const r2 = b4 % a3;\n const m2 = x4 - u2 * q3;\n const n2 = y6 - v2 * q3;\n b4 = a3, a3 = r2, x4 = u2, y6 = v2, u2 = m2, v2 = n2;\n }\n const gcd = b4;\n if (gcd !== _1n8)\n throw new Error(\"invert: does not exist\");\n return mod2(x4, modulo);\n }\n function assertIsSquare(Fp, root, n2) {\n if (!Fp.eql(Fp.sqr(root), n2))\n throw new Error(\"Cannot find square root\");\n }\n function sqrt3mod42(Fp, n2) {\n const p1div4 = (Fp.ORDER + _1n8) / _4n3;\n const root = Fp.pow(n2, p1div4);\n assertIsSquare(Fp, root, n2);\n return root;\n }\n function sqrt5mod82(Fp, n2) {\n const p5div8 = (Fp.ORDER - _5n2) / _8n2;\n const n22 = Fp.mul(n2, _2n5);\n const v2 = Fp.pow(n22, p5div8);\n const nv = Fp.mul(n2, v2);\n const i3 = Fp.mul(Fp.mul(nv, _2n5), v2);\n const root = Fp.mul(nv, Fp.sub(i3, Fp.ONE));\n assertIsSquare(Fp, root, n2);\n return root;\n }\n function sqrt9mod16(P2) {\n const Fp_ = Field2(P2);\n const tn = tonelliShanks2(P2);\n const c1 = tn(Fp_, Fp_.neg(Fp_.ONE));\n const c22 = tn(Fp_, c1);\n const c32 = tn(Fp_, Fp_.neg(c1));\n const c4 = (P2 + _7n2) / _16n;\n return (Fp, n2) => {\n let tv1 = Fp.pow(n2, c4);\n let tv2 = Fp.mul(tv1, c1);\n const tv3 = Fp.mul(tv1, c22);\n const tv4 = Fp.mul(tv1, c32);\n const e1 = Fp.eql(Fp.sqr(tv2), n2);\n const e22 = Fp.eql(Fp.sqr(tv3), n2);\n tv1 = Fp.cmov(tv1, tv2, e1);\n tv2 = Fp.cmov(tv4, tv3, e22);\n const e3 = Fp.eql(Fp.sqr(tv2), n2);\n const root = Fp.cmov(tv1, tv2, e3);\n assertIsSquare(Fp, root, n2);\n return root;\n };\n }\n function tonelliShanks2(P2) {\n if (P2 < _3n3)\n throw new Error(\"sqrt is not defined for small field\");\n let Q2 = P2 - _1n8;\n let S3 = 0;\n while (Q2 % _2n5 === _0n8) {\n Q2 /= _2n5;\n S3++;\n }\n let Z2 = _2n5;\n const _Fp = Field2(P2);\n while (FpLegendre2(_Fp, Z2) === 1) {\n if (Z2++ > 1e3)\n throw new Error(\"Cannot find square root: probably non-prime P\");\n }\n if (S3 === 1)\n return sqrt3mod42;\n let cc = _Fp.pow(Z2, Q2);\n const Q1div2 = (Q2 + _1n8) / _2n5;\n return function tonelliSlow(Fp, n2) {\n if (Fp.is0(n2))\n return n2;\n if (FpLegendre2(Fp, n2) !== 1)\n throw new Error(\"Cannot find square root\");\n let M2 = S3;\n let c4 = Fp.mul(Fp.ONE, cc);\n let t3 = Fp.pow(n2, Q2);\n let R3 = Fp.pow(n2, Q1div2);\n while (!Fp.eql(t3, Fp.ONE)) {\n if (Fp.is0(t3))\n return Fp.ZERO;\n let i3 = 1;\n let t_tmp = Fp.sqr(t3);\n while (!Fp.eql(t_tmp, Fp.ONE)) {\n i3++;\n t_tmp = Fp.sqr(t_tmp);\n if (i3 === M2)\n throw new Error(\"Cannot find square root\");\n }\n const exponent = _1n8 << BigInt(M2 - i3 - 1);\n const b4 = Fp.pow(c4, exponent);\n M2 = i3;\n c4 = Fp.sqr(b4);\n t3 = Fp.mul(t3, c4);\n R3 = Fp.mul(R3, b4);\n }\n return R3;\n };\n }\n function FpSqrt2(P2) {\n if (P2 % _4n3 === _3n3)\n return sqrt3mod42;\n if (P2 % _8n2 === _5n2)\n return sqrt5mod82;\n if (P2 % _16n === _9n)\n return sqrt9mod16(P2);\n return tonelliShanks2(P2);\n }\n function validateField2(field) {\n const initial = {\n ORDER: \"bigint\",\n MASK: \"bigint\",\n BYTES: \"number\",\n BITS: \"number\"\n };\n const opts = FIELD_FIELDS2.reduce((map, val) => {\n map[val] = \"function\";\n return map;\n }, initial);\n _validateObject(field, opts);\n return field;\n }\n function FpPow2(Fp, num2, power) {\n if (power < _0n8)\n throw new Error(\"invalid exponent, negatives unsupported\");\n if (power === _0n8)\n return Fp.ONE;\n if (power === _1n8)\n return num2;\n let p4 = Fp.ONE;\n let d5 = num2;\n while (power > _0n8) {\n if (power & _1n8)\n p4 = Fp.mul(p4, d5);\n d5 = Fp.sqr(d5);\n power >>= _1n8;\n }\n return p4;\n }\n function FpInvertBatch2(Fp, nums, passZero = false) {\n const inverted = new Array(nums.length).fill(passZero ? Fp.ZERO : void 0);\n const multipliedAcc = nums.reduce((acc, num2, i3) => {\n if (Fp.is0(num2))\n return acc;\n inverted[i3] = acc;\n return Fp.mul(acc, num2);\n }, Fp.ONE);\n const invertedAcc = Fp.inv(multipliedAcc);\n nums.reduceRight((acc, num2, i3) => {\n if (Fp.is0(num2))\n return acc;\n inverted[i3] = Fp.mul(acc, inverted[i3]);\n return Fp.mul(acc, num2);\n }, invertedAcc);\n return inverted;\n }\n function FpLegendre2(Fp, n2) {\n const p1mod2 = (Fp.ORDER - _1n8) / _2n5;\n const powered = Fp.pow(n2, p1mod2);\n const yes = Fp.eql(powered, Fp.ONE);\n const zero = Fp.eql(powered, Fp.ZERO);\n const no = Fp.eql(powered, Fp.neg(Fp.ONE));\n if (!yes && !zero && !no)\n throw new Error(\"invalid Legendre symbol result\");\n return yes ? 1 : zero ? 0 : -1;\n }\n function nLength2(n2, nBitLength) {\n if (nBitLength !== void 0)\n anumber(nBitLength);\n const _nBitLength = nBitLength !== void 0 ? nBitLength : n2.toString(2).length;\n const nByteLength = Math.ceil(_nBitLength / 8);\n return { nBitLength: _nBitLength, nByteLength };\n }\n function Field2(ORDER, bitLenOrOpts, isLE3 = false, opts = {}) {\n if (ORDER <= _0n8)\n throw new Error(\"invalid field: expected ORDER > 0, got \" + ORDER);\n let _nbitLength = void 0;\n let _sqrt = void 0;\n let modFromBytes = false;\n let allowedLengths = void 0;\n if (typeof bitLenOrOpts === \"object\" && bitLenOrOpts != null) {\n if (opts.sqrt || isLE3)\n throw new Error(\"cannot specify opts in two arguments\");\n const _opts = bitLenOrOpts;\n if (_opts.BITS)\n _nbitLength = _opts.BITS;\n if (_opts.sqrt)\n _sqrt = _opts.sqrt;\n if (typeof _opts.isLE === \"boolean\")\n isLE3 = _opts.isLE;\n if (typeof _opts.modFromBytes === \"boolean\")\n modFromBytes = _opts.modFromBytes;\n allowedLengths = _opts.allowedLengths;\n } else {\n if (typeof bitLenOrOpts === \"number\")\n _nbitLength = bitLenOrOpts;\n if (opts.sqrt)\n _sqrt = opts.sqrt;\n }\n const { nBitLength: BITS, nByteLength: BYTES } = nLength2(ORDER, _nbitLength);\n if (BYTES > 2048)\n throw new Error(\"invalid field: expected ORDER of <= 2048 bytes\");\n let sqrtP;\n const f6 = Object.freeze({\n ORDER,\n isLE: isLE3,\n BITS,\n BYTES,\n MASK: bitMask2(BITS),\n ZERO: _0n8,\n ONE: _1n8,\n allowedLengths,\n create: (num2) => mod2(num2, ORDER),\n isValid: (num2) => {\n if (typeof num2 !== \"bigint\")\n throw new Error(\"invalid field element: expected bigint, got \" + typeof num2);\n return _0n8 <= num2 && num2 < ORDER;\n },\n is0: (num2) => num2 === _0n8,\n // is valid and invertible\n isValidNot0: (num2) => !f6.is0(num2) && f6.isValid(num2),\n isOdd: (num2) => (num2 & _1n8) === _1n8,\n neg: (num2) => mod2(-num2, ORDER),\n eql: (lhs, rhs) => lhs === rhs,\n sqr: (num2) => mod2(num2 * num2, ORDER),\n add: (lhs, rhs) => mod2(lhs + rhs, ORDER),\n sub: (lhs, rhs) => mod2(lhs - rhs, ORDER),\n mul: (lhs, rhs) => mod2(lhs * rhs, ORDER),\n pow: (num2, power) => FpPow2(f6, num2, power),\n div: (lhs, rhs) => mod2(lhs * invert2(rhs, ORDER), ORDER),\n // Same as above, but doesn't normalize\n sqrN: (num2) => num2 * num2,\n addN: (lhs, rhs) => lhs + rhs,\n subN: (lhs, rhs) => lhs - rhs,\n mulN: (lhs, rhs) => lhs * rhs,\n inv: (num2) => invert2(num2, ORDER),\n sqrt: _sqrt || ((n2) => {\n if (!sqrtP)\n sqrtP = FpSqrt2(ORDER);\n return sqrtP(f6, n2);\n }),\n toBytes: (num2) => isLE3 ? numberToBytesLE2(num2, BYTES) : numberToBytesBE2(num2, BYTES),\n fromBytes: (bytes, skipValidation = true) => {\n if (allowedLengths) {\n if (!allowedLengths.includes(bytes.length) || bytes.length > BYTES) {\n throw new Error(\"Field.fromBytes: expected \" + allowedLengths + \" bytes, got \" + bytes.length);\n }\n const padded = new Uint8Array(BYTES);\n padded.set(bytes, isLE3 ? 0 : padded.length - bytes.length);\n bytes = padded;\n }\n if (bytes.length !== BYTES)\n throw new Error(\"Field.fromBytes: expected \" + BYTES + \" bytes, got \" + bytes.length);\n let scalar = isLE3 ? bytesToNumberLE2(bytes) : bytesToNumberBE2(bytes);\n if (modFromBytes)\n scalar = mod2(scalar, ORDER);\n if (!skipValidation) {\n if (!f6.isValid(scalar))\n throw new Error(\"invalid field element: outside of range 0..ORDER\");\n }\n return scalar;\n },\n // TODO: we don't need it here, move out to separate fn\n invertBatch: (lst) => FpInvertBatch2(f6, lst),\n // We can't move this out because Fp6, Fp12 implement it\n // and it's unclear what to return in there.\n cmov: (a3, b4, c4) => c4 ? b4 : a3\n });\n return Object.freeze(f6);\n }\n function getFieldBytesLength2(fieldOrder) {\n if (typeof fieldOrder !== \"bigint\")\n throw new Error(\"field order must be bigint\");\n const bitLength = fieldOrder.toString(2).length;\n return Math.ceil(bitLength / 8);\n }\n function getMinHashLength2(fieldOrder) {\n const length2 = getFieldBytesLength2(fieldOrder);\n return length2 + Math.ceil(length2 / 2);\n }\n function mapHashToField2(key, fieldOrder, isLE3 = false) {\n const len = key.length;\n const fieldLen = getFieldBytesLength2(fieldOrder);\n const minLen = getMinHashLength2(fieldOrder);\n if (len < 16 || len < minLen || len > 1024)\n throw new Error(\"expected \" + minLen + \"-1024 bytes of input, got \" + len);\n const num2 = isLE3 ? bytesToNumberLE2(key) : bytesToNumberBE2(key);\n const reduced = mod2(num2, fieldOrder - _1n8) + _1n8;\n return isLE3 ? numberToBytesLE2(reduced, fieldLen) : numberToBytesBE2(reduced, fieldLen);\n }\n var _0n8, _1n8, _2n5, _3n3, _4n3, _5n2, _7n2, _8n2, _9n, _16n, FIELD_FIELDS2;\n var init_modular2 = __esm({\n \"../../../node_modules/.pnpm/@noble+curves@1.9.7/node_modules/@noble/curves/esm/abstract/modular.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_utils8();\n _0n8 = BigInt(0);\n _1n8 = BigInt(1);\n _2n5 = /* @__PURE__ */ BigInt(2);\n _3n3 = /* @__PURE__ */ BigInt(3);\n _4n3 = /* @__PURE__ */ BigInt(4);\n _5n2 = /* @__PURE__ */ BigInt(5);\n _7n2 = /* @__PURE__ */ BigInt(7);\n _8n2 = /* @__PURE__ */ BigInt(8);\n _9n = /* @__PURE__ */ BigInt(9);\n _16n = /* @__PURE__ */ BigInt(16);\n FIELD_FIELDS2 = [\n \"create\",\n \"isValid\",\n \"is0\",\n \"neg\",\n \"inv\",\n \"sqrt\",\n \"sqr\",\n \"eql\",\n \"add\",\n \"sub\",\n \"mul\",\n \"pow\",\n \"div\",\n \"addN\",\n \"subN\",\n \"mulN\",\n \"sqrN\"\n ];\n }\n });\n\n // ../../../node_modules/.pnpm/@noble+curves@1.9.7/node_modules/@noble/curves/esm/abstract/curve.js\n function negateCt(condition, item) {\n const neg = item.negate();\n return condition ? neg : item;\n }\n function normalizeZ(c4, points) {\n const invertedZs = FpInvertBatch2(c4.Fp, points.map((p4) => p4.Z));\n return points.map((p4, i3) => c4.fromAffine(p4.toAffine(invertedZs[i3])));\n }\n function validateW2(W, bits) {\n if (!Number.isSafeInteger(W) || W <= 0 || W > bits)\n throw new Error(\"invalid window size, expected [1..\" + bits + \"], got W=\" + W);\n }\n function calcWOpts2(W, scalarBits) {\n validateW2(W, scalarBits);\n const windows = Math.ceil(scalarBits / W) + 1;\n const windowSize = 2 ** (W - 1);\n const maxNumber = 2 ** W;\n const mask = bitMask2(W);\n const shiftBy = BigInt(W);\n return { windows, windowSize, mask, maxNumber, shiftBy };\n }\n function calcOffsets2(n2, window2, wOpts) {\n const { windowSize, mask, maxNumber, shiftBy } = wOpts;\n let wbits = Number(n2 & mask);\n let nextN = n2 >> shiftBy;\n if (wbits > windowSize) {\n wbits -= maxNumber;\n nextN += _1n9;\n }\n const offsetStart = window2 * windowSize;\n const offset = offsetStart + Math.abs(wbits) - 1;\n const isZero = wbits === 0;\n const isNeg = wbits < 0;\n const isNegF = window2 % 2 !== 0;\n const offsetF = offsetStart;\n return { nextN, offset, isZero, isNeg, isNegF, offsetF };\n }\n function validateMSMPoints2(points, c4) {\n if (!Array.isArray(points))\n throw new Error(\"array expected\");\n points.forEach((p4, i3) => {\n if (!(p4 instanceof c4))\n throw new Error(\"invalid point at index \" + i3);\n });\n }\n function validateMSMScalars2(scalars, field) {\n if (!Array.isArray(scalars))\n throw new Error(\"array of scalars expected\");\n scalars.forEach((s4, i3) => {\n if (!field.isValid(s4))\n throw new Error(\"invalid scalar at index \" + i3);\n });\n }\n function getW2(P2) {\n return pointWindowSizes2.get(P2) || 1;\n }\n function assert0(n2) {\n if (n2 !== _0n9)\n throw new Error(\"invalid wNAF\");\n }\n function mulEndoUnsafe(Point3, point, k1, k22) {\n let acc = point;\n let p1 = Point3.ZERO;\n let p22 = Point3.ZERO;\n while (k1 > _0n9 || k22 > _0n9) {\n if (k1 & _1n9)\n p1 = p1.add(acc);\n if (k22 & _1n9)\n p22 = p22.add(acc);\n acc = acc.double();\n k1 >>= _1n9;\n k22 >>= _1n9;\n }\n return { p1, p2: p22 };\n }\n function pippenger2(c4, fieldN, points, scalars) {\n validateMSMPoints2(points, c4);\n validateMSMScalars2(scalars, fieldN);\n const plength = points.length;\n const slength = scalars.length;\n if (plength !== slength)\n throw new Error(\"arrays of points and scalars must have equal length\");\n const zero = c4.ZERO;\n const wbits = bitLen2(BigInt(plength));\n let windowSize = 1;\n if (wbits > 12)\n windowSize = wbits - 3;\n else if (wbits > 4)\n windowSize = wbits - 2;\n else if (wbits > 0)\n windowSize = 2;\n const MASK = bitMask2(windowSize);\n const buckets = new Array(Number(MASK) + 1).fill(zero);\n const lastBits = Math.floor((fieldN.BITS - 1) / windowSize) * windowSize;\n let sum = zero;\n for (let i3 = lastBits; i3 >= 0; i3 -= windowSize) {\n buckets.fill(zero);\n for (let j2 = 0; j2 < slength; j2++) {\n const scalar = scalars[j2];\n const wbits2 = Number(scalar >> BigInt(i3) & MASK);\n buckets[wbits2] = buckets[wbits2].add(points[j2]);\n }\n let resI = zero;\n for (let j2 = buckets.length - 1, sumI = zero; j2 > 0; j2--) {\n sumI = sumI.add(buckets[j2]);\n resI = resI.add(sumI);\n }\n sum = sum.add(resI);\n if (i3 !== 0)\n for (let j2 = 0; j2 < windowSize; j2++)\n sum = sum.double();\n }\n return sum;\n }\n function createField(order2, field, isLE3) {\n if (field) {\n if (field.ORDER !== order2)\n throw new Error(\"Field.ORDER must match order: Fp == p, Fn == n\");\n validateField2(field);\n return field;\n } else {\n return Field2(order2, { isLE: isLE3 });\n }\n }\n function _createCurveFields(type, CURVE, curveOpts = {}, FpFnLE) {\n if (FpFnLE === void 0)\n FpFnLE = type === \"edwards\";\n if (!CURVE || typeof CURVE !== \"object\")\n throw new Error(`expected valid ${type} CURVE object`);\n for (const p4 of [\"p\", \"n\", \"h\"]) {\n const val = CURVE[p4];\n if (!(typeof val === \"bigint\" && val > _0n9))\n throw new Error(`CURVE.${p4} must be positive bigint`);\n }\n const Fp = createField(CURVE.p, curveOpts.Fp, FpFnLE);\n const Fn = createField(CURVE.n, curveOpts.Fn, FpFnLE);\n const _b = type === \"weierstrass\" ? \"b\" : \"d\";\n const params = [\"Gx\", \"Gy\", \"a\", _b];\n for (const p4 of params) {\n if (!Fp.isValid(CURVE[p4]))\n throw new Error(`CURVE.${p4} must be valid field element of CURVE.Fp`);\n }\n CURVE = Object.freeze(Object.assign({}, CURVE));\n return { CURVE, Fp, Fn };\n }\n var _0n9, _1n9, pointPrecomputes2, pointWindowSizes2, wNAF2;\n var init_curve2 = __esm({\n \"../../../node_modules/.pnpm/@noble+curves@1.9.7/node_modules/@noble/curves/esm/abstract/curve.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_utils8();\n init_modular2();\n _0n9 = BigInt(0);\n _1n9 = BigInt(1);\n pointPrecomputes2 = /* @__PURE__ */ new WeakMap();\n pointWindowSizes2 = /* @__PURE__ */ new WeakMap();\n wNAF2 = class {\n // Parametrized with a given Point class (not individual point)\n constructor(Point3, bits) {\n this.BASE = Point3.BASE;\n this.ZERO = Point3.ZERO;\n this.Fn = Point3.Fn;\n this.bits = bits;\n }\n // non-const time multiplication ladder\n _unsafeLadder(elm, n2, p4 = this.ZERO) {\n let d5 = elm;\n while (n2 > _0n9) {\n if (n2 & _1n9)\n p4 = p4.add(d5);\n d5 = d5.double();\n n2 >>= _1n9;\n }\n return p4;\n }\n /**\n * Creates a wNAF precomputation window. Used for caching.\n * Default window size is set by `utils.precompute()` and is equal to 8.\n * Number of precomputed points depends on the curve size:\n * 2^(𝑊−1) * (Math.ceil(𝑛 / 𝑊) + 1), where:\n * - 𝑊 is the window size\n * - 𝑛 is the bitlength of the curve order.\n * For a 256-bit curve and window size 8, the number of precomputed points is 128 * 33 = 4224.\n * @param point Point instance\n * @param W window size\n * @returns precomputed point tables flattened to a single array\n */\n precomputeWindow(point, W) {\n const { windows, windowSize } = calcWOpts2(W, this.bits);\n const points = [];\n let p4 = point;\n let base4 = p4;\n for (let window2 = 0; window2 < windows; window2++) {\n base4 = p4;\n points.push(base4);\n for (let i3 = 1; i3 < windowSize; i3++) {\n base4 = base4.add(p4);\n points.push(base4);\n }\n p4 = base4.double();\n }\n return points;\n }\n /**\n * Implements ec multiplication using precomputed tables and w-ary non-adjacent form.\n * More compact implementation:\n * https://github.com/paulmillr/noble-secp256k1/blob/47cb1669b6e506ad66b35fe7d76132ae97465da2/index.ts#L502-L541\n * @returns real and fake (for const-time) points\n */\n wNAF(W, precomputes, n2) {\n if (!this.Fn.isValid(n2))\n throw new Error(\"invalid scalar\");\n let p4 = this.ZERO;\n let f6 = this.BASE;\n const wo = calcWOpts2(W, this.bits);\n for (let window2 = 0; window2 < wo.windows; window2++) {\n const { nextN, offset, isZero, isNeg, isNegF, offsetF } = calcOffsets2(n2, window2, wo);\n n2 = nextN;\n if (isZero) {\n f6 = f6.add(negateCt(isNegF, precomputes[offsetF]));\n } else {\n p4 = p4.add(negateCt(isNeg, precomputes[offset]));\n }\n }\n assert0(n2);\n return { p: p4, f: f6 };\n }\n /**\n * Implements ec unsafe (non const-time) multiplication using precomputed tables and w-ary non-adjacent form.\n * @param acc accumulator point to add result of multiplication\n * @returns point\n */\n wNAFUnsafe(W, precomputes, n2, acc = this.ZERO) {\n const wo = calcWOpts2(W, this.bits);\n for (let window2 = 0; window2 < wo.windows; window2++) {\n if (n2 === _0n9)\n break;\n const { nextN, offset, isZero, isNeg } = calcOffsets2(n2, window2, wo);\n n2 = nextN;\n if (isZero) {\n continue;\n } else {\n const item = precomputes[offset];\n acc = acc.add(isNeg ? item.negate() : item);\n }\n }\n assert0(n2);\n return acc;\n }\n getPrecomputes(W, point, transform2) {\n let comp = pointPrecomputes2.get(point);\n if (!comp) {\n comp = this.precomputeWindow(point, W);\n if (W !== 1) {\n if (typeof transform2 === \"function\")\n comp = transform2(comp);\n pointPrecomputes2.set(point, comp);\n }\n }\n return comp;\n }\n cached(point, scalar, transform2) {\n const W = getW2(point);\n return this.wNAF(W, this.getPrecomputes(W, point, transform2), scalar);\n }\n unsafe(point, scalar, transform2, prev) {\n const W = getW2(point);\n if (W === 1)\n return this._unsafeLadder(point, scalar, prev);\n return this.wNAFUnsafe(W, this.getPrecomputes(W, point, transform2), scalar, prev);\n }\n // We calculate precomputes for elliptic curve point multiplication\n // using windowed method. This specifies window size and\n // stores precomputed values. Usually only base point would be precomputed.\n createCache(P2, W) {\n validateW2(W, this.bits);\n pointWindowSizes2.set(P2, W);\n pointPrecomputes2.delete(P2);\n }\n hasCache(elm) {\n return getW2(elm) !== 1;\n }\n };\n }\n });\n\n // ../../../node_modules/.pnpm/@noble+curves@1.9.7/node_modules/@noble/curves/esm/abstract/weierstrass.js\n function _splitEndoScalar(k4, basis, n2) {\n const [[a1, b1], [a22, b22]] = basis;\n const c1 = divNearest2(b22 * k4, n2);\n const c22 = divNearest2(-b1 * k4, n2);\n let k1 = k4 - c1 * a1 - c22 * a22;\n let k22 = -c1 * b1 - c22 * b22;\n const k1neg = k1 < _0n10;\n const k2neg = k22 < _0n10;\n if (k1neg)\n k1 = -k1;\n if (k2neg)\n k22 = -k22;\n const MAX_NUM = bitMask2(Math.ceil(bitLen2(n2) / 2)) + _1n10;\n if (k1 < _0n10 || k1 >= MAX_NUM || k22 < _0n10 || k22 >= MAX_NUM) {\n throw new Error(\"splitScalar (endomorphism): failed, k=\" + k4);\n }\n return { k1neg, k1, k2neg, k2: k22 };\n }\n function validateSigFormat(format) {\n if (![\"compact\", \"recovered\", \"der\"].includes(format))\n throw new Error('Signature format must be \"compact\", \"recovered\", or \"der\"');\n return format;\n }\n function validateSigOpts(opts, def) {\n const optsn = {};\n for (let optName of Object.keys(def)) {\n optsn[optName] = opts[optName] === void 0 ? def[optName] : opts[optName];\n }\n _abool2(optsn.lowS, \"lowS\");\n _abool2(optsn.prehash, \"prehash\");\n if (optsn.format !== void 0)\n validateSigFormat(optsn.format);\n return optsn;\n }\n function _normFnElement(Fn, key) {\n const { BYTES: expected } = Fn;\n let num2;\n if (typeof key === \"bigint\") {\n num2 = key;\n } else {\n let bytes = ensureBytes2(\"private key\", key);\n try {\n num2 = Fn.fromBytes(bytes);\n } catch (error) {\n throw new Error(`invalid private key: expected ui8a of size ${expected}, got ${typeof key}`);\n }\n }\n if (!Fn.isValidNot0(num2))\n throw new Error(\"invalid private key: out of range [1..N-1]\");\n return num2;\n }\n function weierstrassN(params, extraOpts = {}) {\n const validated = _createCurveFields(\"weierstrass\", params, extraOpts);\n const { Fp, Fn } = validated;\n let CURVE = validated.CURVE;\n const { h: cofactor, n: CURVE_ORDER } = CURVE;\n _validateObject(extraOpts, {}, {\n allowInfinityPoint: \"boolean\",\n clearCofactor: \"function\",\n isTorsionFree: \"function\",\n fromBytes: \"function\",\n toBytes: \"function\",\n endo: \"object\",\n wrapPrivateKey: \"boolean\"\n });\n const { endo } = extraOpts;\n if (endo) {\n if (!Fp.is0(CURVE.a) || typeof endo.beta !== \"bigint\" || !Array.isArray(endo.basises)) {\n throw new Error('invalid endo: expected \"beta\": bigint and \"basises\": array');\n }\n }\n const lengths = getWLengths(Fp, Fn);\n function assertCompressionIsSupported() {\n if (!Fp.isOdd)\n throw new Error(\"compression is not supported: Field does not have .isOdd()\");\n }\n function pointToBytes2(_c, point, isCompressed) {\n const { x: x4, y: y6 } = point.toAffine();\n const bx = Fp.toBytes(x4);\n _abool2(isCompressed, \"isCompressed\");\n if (isCompressed) {\n assertCompressionIsSupported();\n const hasEvenY = !Fp.isOdd(y6);\n return concatBytes(pprefix(hasEvenY), bx);\n } else {\n return concatBytes(Uint8Array.of(4), bx, Fp.toBytes(y6));\n }\n }\n function pointFromBytes(bytes) {\n _abytes2(bytes, void 0, \"Point\");\n const { publicKey: comp, publicKeyUncompressed: uncomp } = lengths;\n const length2 = bytes.length;\n const head = bytes[0];\n const tail = bytes.subarray(1);\n if (length2 === comp && (head === 2 || head === 3)) {\n const x4 = Fp.fromBytes(tail);\n if (!Fp.isValid(x4))\n throw new Error(\"bad point: is not on curve, wrong x\");\n const y22 = weierstrassEquation(x4);\n let y6;\n try {\n y6 = Fp.sqrt(y22);\n } catch (sqrtError) {\n const err = sqrtError instanceof Error ? \": \" + sqrtError.message : \"\";\n throw new Error(\"bad point: is not on curve, sqrt error\" + err);\n }\n assertCompressionIsSupported();\n const isYOdd = Fp.isOdd(y6);\n const isHeadOdd = (head & 1) === 1;\n if (isHeadOdd !== isYOdd)\n y6 = Fp.neg(y6);\n return { x: x4, y: y6 };\n } else if (length2 === uncomp && head === 4) {\n const L2 = Fp.BYTES;\n const x4 = Fp.fromBytes(tail.subarray(0, L2));\n const y6 = Fp.fromBytes(tail.subarray(L2, L2 * 2));\n if (!isValidXY(x4, y6))\n throw new Error(\"bad point: is not on curve\");\n return { x: x4, y: y6 };\n } else {\n throw new Error(`bad point: got length ${length2}, expected compressed=${comp} or uncompressed=${uncomp}`);\n }\n }\n const encodePoint = extraOpts.toBytes || pointToBytes2;\n const decodePoint = extraOpts.fromBytes || pointFromBytes;\n function weierstrassEquation(x4) {\n const x22 = Fp.sqr(x4);\n const x32 = Fp.mul(x22, x4);\n return Fp.add(Fp.add(x32, Fp.mul(x4, CURVE.a)), CURVE.b);\n }\n function isValidXY(x4, y6) {\n const left = Fp.sqr(y6);\n const right = weierstrassEquation(x4);\n return Fp.eql(left, right);\n }\n if (!isValidXY(CURVE.Gx, CURVE.Gy))\n throw new Error(\"bad curve params: generator point\");\n const _4a3 = Fp.mul(Fp.pow(CURVE.a, _3n4), _4n4);\n const _27b2 = Fp.mul(Fp.sqr(CURVE.b), BigInt(27));\n if (Fp.is0(Fp.add(_4a3, _27b2)))\n throw new Error(\"bad curve params: a or b\");\n function acoord(title2, n2, banZero = false) {\n if (!Fp.isValid(n2) || banZero && Fp.is0(n2))\n throw new Error(`bad point coordinate ${title2}`);\n return n2;\n }\n function aprjpoint(other) {\n if (!(other instanceof Point3))\n throw new Error(\"ProjectivePoint expected\");\n }\n function splitEndoScalarN(k4) {\n if (!endo || !endo.basises)\n throw new Error(\"no endo\");\n return _splitEndoScalar(k4, endo.basises, Fn.ORDER);\n }\n const toAffineMemo = memoized2((p4, iz) => {\n const { X: X2, Y: Y2, Z: Z2 } = p4;\n if (Fp.eql(Z2, Fp.ONE))\n return { x: X2, y: Y2 };\n const is0 = p4.is0();\n if (iz == null)\n iz = is0 ? Fp.ONE : Fp.inv(Z2);\n const x4 = Fp.mul(X2, iz);\n const y6 = Fp.mul(Y2, iz);\n const zz = Fp.mul(Z2, iz);\n if (is0)\n return { x: Fp.ZERO, y: Fp.ZERO };\n if (!Fp.eql(zz, Fp.ONE))\n throw new Error(\"invZ was invalid\");\n return { x: x4, y: y6 };\n });\n const assertValidMemo = memoized2((p4) => {\n if (p4.is0()) {\n if (extraOpts.allowInfinityPoint && !Fp.is0(p4.Y))\n return;\n throw new Error(\"bad point: ZERO\");\n }\n const { x: x4, y: y6 } = p4.toAffine();\n if (!Fp.isValid(x4) || !Fp.isValid(y6))\n throw new Error(\"bad point: x or y not field elements\");\n if (!isValidXY(x4, y6))\n throw new Error(\"bad point: equation left != right\");\n if (!p4.isTorsionFree())\n throw new Error(\"bad point: not in prime-order subgroup\");\n return true;\n });\n function finishEndo(endoBeta, k1p, k2p, k1neg, k2neg) {\n k2p = new Point3(Fp.mul(k2p.X, endoBeta), k2p.Y, k2p.Z);\n k1p = negateCt(k1neg, k1p);\n k2p = negateCt(k2neg, k2p);\n return k1p.add(k2p);\n }\n class Point3 {\n /** Does NOT validate if the point is valid. Use `.assertValidity()`. */\n constructor(X2, Y2, Z2) {\n this.X = acoord(\"x\", X2);\n this.Y = acoord(\"y\", Y2, true);\n this.Z = acoord(\"z\", Z2);\n Object.freeze(this);\n }\n static CURVE() {\n return CURVE;\n }\n /** Does NOT validate if the point is valid. Use `.assertValidity()`. */\n static fromAffine(p4) {\n const { x: x4, y: y6 } = p4 || {};\n if (!p4 || !Fp.isValid(x4) || !Fp.isValid(y6))\n throw new Error(\"invalid affine point\");\n if (p4 instanceof Point3)\n throw new Error(\"projective point not allowed\");\n if (Fp.is0(x4) && Fp.is0(y6))\n return Point3.ZERO;\n return new Point3(x4, y6, Fp.ONE);\n }\n static fromBytes(bytes) {\n const P2 = Point3.fromAffine(decodePoint(_abytes2(bytes, void 0, \"point\")));\n P2.assertValidity();\n return P2;\n }\n static fromHex(hex) {\n return Point3.fromBytes(ensureBytes2(\"pointHex\", hex));\n }\n get x() {\n return this.toAffine().x;\n }\n get y() {\n return this.toAffine().y;\n }\n /**\n *\n * @param windowSize\n * @param isLazy true will defer table computation until the first multiplication\n * @returns\n */\n precompute(windowSize = 8, isLazy = true) {\n wnaf.createCache(this, windowSize);\n if (!isLazy)\n this.multiply(_3n4);\n return this;\n }\n // TODO: return `this`\n /** A point on curve is valid if it conforms to equation. */\n assertValidity() {\n assertValidMemo(this);\n }\n hasEvenY() {\n const { y: y6 } = this.toAffine();\n if (!Fp.isOdd)\n throw new Error(\"Field doesn't support isOdd\");\n return !Fp.isOdd(y6);\n }\n /** Compare one point to another. */\n equals(other) {\n aprjpoint(other);\n const { X: X1, Y: Y1, Z: Z1 } = this;\n const { X: X2, Y: Y2, Z: Z2 } = other;\n const U1 = Fp.eql(Fp.mul(X1, Z2), Fp.mul(X2, Z1));\n const U22 = Fp.eql(Fp.mul(Y1, Z2), Fp.mul(Y2, Z1));\n return U1 && U22;\n }\n /** Flips point to one corresponding to (x, -y) in Affine coordinates. */\n negate() {\n return new Point3(this.X, Fp.neg(this.Y), this.Z);\n }\n // Renes-Costello-Batina exception-free doubling formula.\n // There is 30% faster Jacobian formula, but it is not complete.\n // https://eprint.iacr.org/2015/1060, algorithm 3\n // Cost: 8M + 3S + 3*a + 2*b3 + 15add.\n double() {\n const { a: a3, b: b4 } = CURVE;\n const b32 = Fp.mul(b4, _3n4);\n const { X: X1, Y: Y1, Z: Z1 } = this;\n let X3 = Fp.ZERO, Y3 = Fp.ZERO, Z3 = Fp.ZERO;\n let t0 = Fp.mul(X1, X1);\n let t1 = Fp.mul(Y1, Y1);\n let t22 = Fp.mul(Z1, Z1);\n let t3 = Fp.mul(X1, Y1);\n t3 = Fp.add(t3, t3);\n Z3 = Fp.mul(X1, Z1);\n Z3 = Fp.add(Z3, Z3);\n X3 = Fp.mul(a3, Z3);\n Y3 = Fp.mul(b32, t22);\n Y3 = Fp.add(X3, Y3);\n X3 = Fp.sub(t1, Y3);\n Y3 = Fp.add(t1, Y3);\n Y3 = Fp.mul(X3, Y3);\n X3 = Fp.mul(t3, X3);\n Z3 = Fp.mul(b32, Z3);\n t22 = Fp.mul(a3, t22);\n t3 = Fp.sub(t0, t22);\n t3 = Fp.mul(a3, t3);\n t3 = Fp.add(t3, Z3);\n Z3 = Fp.add(t0, t0);\n t0 = Fp.add(Z3, t0);\n t0 = Fp.add(t0, t22);\n t0 = Fp.mul(t0, t3);\n Y3 = Fp.add(Y3, t0);\n t22 = Fp.mul(Y1, Z1);\n t22 = Fp.add(t22, t22);\n t0 = Fp.mul(t22, t3);\n X3 = Fp.sub(X3, t0);\n Z3 = Fp.mul(t22, t1);\n Z3 = Fp.add(Z3, Z3);\n Z3 = Fp.add(Z3, Z3);\n return new Point3(X3, Y3, Z3);\n }\n // Renes-Costello-Batina exception-free addition formula.\n // There is 30% faster Jacobian formula, but it is not complete.\n // https://eprint.iacr.org/2015/1060, algorithm 1\n // Cost: 12M + 0S + 3*a + 3*b3 + 23add.\n add(other) {\n aprjpoint(other);\n const { X: X1, Y: Y1, Z: Z1 } = this;\n const { X: X2, Y: Y2, Z: Z2 } = other;\n let X3 = Fp.ZERO, Y3 = Fp.ZERO, Z3 = Fp.ZERO;\n const a3 = CURVE.a;\n const b32 = Fp.mul(CURVE.b, _3n4);\n let t0 = Fp.mul(X1, X2);\n let t1 = Fp.mul(Y1, Y2);\n let t22 = Fp.mul(Z1, Z2);\n let t3 = Fp.add(X1, Y1);\n let t4 = Fp.add(X2, Y2);\n t3 = Fp.mul(t3, t4);\n t4 = Fp.add(t0, t1);\n t3 = Fp.sub(t3, t4);\n t4 = Fp.add(X1, Z1);\n let t5 = Fp.add(X2, Z2);\n t4 = Fp.mul(t4, t5);\n t5 = Fp.add(t0, t22);\n t4 = Fp.sub(t4, t5);\n t5 = Fp.add(Y1, Z1);\n X3 = Fp.add(Y2, Z2);\n t5 = Fp.mul(t5, X3);\n X3 = Fp.add(t1, t22);\n t5 = Fp.sub(t5, X3);\n Z3 = Fp.mul(a3, t4);\n X3 = Fp.mul(b32, t22);\n Z3 = Fp.add(X3, Z3);\n X3 = Fp.sub(t1, Z3);\n Z3 = Fp.add(t1, Z3);\n Y3 = Fp.mul(X3, Z3);\n t1 = Fp.add(t0, t0);\n t1 = Fp.add(t1, t0);\n t22 = Fp.mul(a3, t22);\n t4 = Fp.mul(b32, t4);\n t1 = Fp.add(t1, t22);\n t22 = Fp.sub(t0, t22);\n t22 = Fp.mul(a3, t22);\n t4 = Fp.add(t4, t22);\n t0 = Fp.mul(t1, t4);\n Y3 = Fp.add(Y3, t0);\n t0 = Fp.mul(t5, t4);\n X3 = Fp.mul(t3, X3);\n X3 = Fp.sub(X3, t0);\n t0 = Fp.mul(t3, t1);\n Z3 = Fp.mul(t5, Z3);\n Z3 = Fp.add(Z3, t0);\n return new Point3(X3, Y3, Z3);\n }\n subtract(other) {\n return this.add(other.negate());\n }\n is0() {\n return this.equals(Point3.ZERO);\n }\n /**\n * Constant time multiplication.\n * Uses wNAF method. Windowed method may be 10% faster,\n * but takes 2x longer to generate and consumes 2x memory.\n * Uses precomputes when available.\n * Uses endomorphism for Koblitz curves.\n * @param scalar by which the point would be multiplied\n * @returns New point\n */\n multiply(scalar) {\n const { endo: endo2 } = extraOpts;\n if (!Fn.isValidNot0(scalar))\n throw new Error(\"invalid scalar: out of range\");\n let point, fake;\n const mul = (n2) => wnaf.cached(this, n2, (p4) => normalizeZ(Point3, p4));\n if (endo2) {\n const { k1neg, k1, k2neg, k2: k22 } = splitEndoScalarN(scalar);\n const { p: k1p, f: k1f } = mul(k1);\n const { p: k2p, f: k2f } = mul(k22);\n fake = k1f.add(k2f);\n point = finishEndo(endo2.beta, k1p, k2p, k1neg, k2neg);\n } else {\n const { p: p4, f: f6 } = mul(scalar);\n point = p4;\n fake = f6;\n }\n return normalizeZ(Point3, [point, fake])[0];\n }\n /**\n * Non-constant-time multiplication. Uses double-and-add algorithm.\n * It's faster, but should only be used when you don't care about\n * an exposed secret key e.g. sig verification, which works over *public* keys.\n */\n multiplyUnsafe(sc) {\n const { endo: endo2 } = extraOpts;\n const p4 = this;\n if (!Fn.isValid(sc))\n throw new Error(\"invalid scalar: out of range\");\n if (sc === _0n10 || p4.is0())\n return Point3.ZERO;\n if (sc === _1n10)\n return p4;\n if (wnaf.hasCache(this))\n return this.multiply(sc);\n if (endo2) {\n const { k1neg, k1, k2neg, k2: k22 } = splitEndoScalarN(sc);\n const { p1, p2: p22 } = mulEndoUnsafe(Point3, p4, k1, k22);\n return finishEndo(endo2.beta, p1, p22, k1neg, k2neg);\n } else {\n return wnaf.unsafe(p4, sc);\n }\n }\n multiplyAndAddUnsafe(Q2, a3, b4) {\n const sum = this.multiplyUnsafe(a3).add(Q2.multiplyUnsafe(b4));\n return sum.is0() ? void 0 : sum;\n }\n /**\n * Converts Projective point to affine (x, y) coordinates.\n * @param invertedZ Z^-1 (inverted zero) - optional, precomputation is useful for invertBatch\n */\n toAffine(invertedZ) {\n return toAffineMemo(this, invertedZ);\n }\n /**\n * Checks whether Point is free of torsion elements (is in prime subgroup).\n * Always torsion-free for cofactor=1 curves.\n */\n isTorsionFree() {\n const { isTorsionFree } = extraOpts;\n if (cofactor === _1n10)\n return true;\n if (isTorsionFree)\n return isTorsionFree(Point3, this);\n return wnaf.unsafe(this, CURVE_ORDER).is0();\n }\n clearCofactor() {\n const { clearCofactor } = extraOpts;\n if (cofactor === _1n10)\n return this;\n if (clearCofactor)\n return clearCofactor(Point3, this);\n return this.multiplyUnsafe(cofactor);\n }\n isSmallOrder() {\n return this.multiplyUnsafe(cofactor).is0();\n }\n toBytes(isCompressed = true) {\n _abool2(isCompressed, \"isCompressed\");\n this.assertValidity();\n return encodePoint(Point3, this, isCompressed);\n }\n toHex(isCompressed = true) {\n return bytesToHex2(this.toBytes(isCompressed));\n }\n toString() {\n return ``;\n }\n // TODO: remove\n get px() {\n return this.X;\n }\n get py() {\n return this.X;\n }\n get pz() {\n return this.Z;\n }\n toRawBytes(isCompressed = true) {\n return this.toBytes(isCompressed);\n }\n _setWindowSize(windowSize) {\n this.precompute(windowSize);\n }\n static normalizeZ(points) {\n return normalizeZ(Point3, points);\n }\n static msm(points, scalars) {\n return pippenger2(Point3, Fn, points, scalars);\n }\n static fromPrivateKey(privateKey) {\n return Point3.BASE.multiply(_normFnElement(Fn, privateKey));\n }\n }\n Point3.BASE = new Point3(CURVE.Gx, CURVE.Gy, Fp.ONE);\n Point3.ZERO = new Point3(Fp.ZERO, Fp.ONE, Fp.ZERO);\n Point3.Fp = Fp;\n Point3.Fn = Fn;\n const bits = Fn.BITS;\n const wnaf = new wNAF2(Point3, extraOpts.endo ? Math.ceil(bits / 2) : bits);\n Point3.BASE.precompute(8);\n return Point3;\n }\n function pprefix(hasEvenY) {\n return Uint8Array.of(hasEvenY ? 2 : 3);\n }\n function getWLengths(Fp, Fn) {\n return {\n secretKey: Fn.BYTES,\n publicKey: 1 + Fp.BYTES,\n publicKeyUncompressed: 1 + 2 * Fp.BYTES,\n publicKeyHasPrefix: true,\n signature: 2 * Fn.BYTES\n };\n }\n function ecdh(Point3, ecdhOpts = {}) {\n const { Fn } = Point3;\n const randomBytes_ = ecdhOpts.randomBytes || randomBytes;\n const lengths = Object.assign(getWLengths(Point3.Fp, Fn), { seed: getMinHashLength2(Fn.ORDER) });\n function isValidSecretKey(secretKey) {\n try {\n return !!_normFnElement(Fn, secretKey);\n } catch (error) {\n return false;\n }\n }\n function isValidPublicKey(publicKey, isCompressed) {\n const { publicKey: comp, publicKeyUncompressed } = lengths;\n try {\n const l6 = publicKey.length;\n if (isCompressed === true && l6 !== comp)\n return false;\n if (isCompressed === false && l6 !== publicKeyUncompressed)\n return false;\n return !!Point3.fromBytes(publicKey);\n } catch (error) {\n return false;\n }\n }\n function randomSecretKey(seed = randomBytes_(lengths.seed)) {\n return mapHashToField2(_abytes2(seed, lengths.seed, \"seed\"), Fn.ORDER);\n }\n function getPublicKey(secretKey, isCompressed = true) {\n return Point3.BASE.multiply(_normFnElement(Fn, secretKey)).toBytes(isCompressed);\n }\n function keygen(seed) {\n const secretKey = randomSecretKey(seed);\n return { secretKey, publicKey: getPublicKey(secretKey) };\n }\n function isProbPub(item) {\n if (typeof item === \"bigint\")\n return false;\n if (item instanceof Point3)\n return true;\n const { secretKey, publicKey, publicKeyUncompressed } = lengths;\n if (Fn.allowedLengths || secretKey === publicKey)\n return void 0;\n const l6 = ensureBytes2(\"key\", item).length;\n return l6 === publicKey || l6 === publicKeyUncompressed;\n }\n function getSharedSecret(secretKeyA, publicKeyB, isCompressed = true) {\n if (isProbPub(secretKeyA) === true)\n throw new Error(\"first arg must be private key\");\n if (isProbPub(publicKeyB) === false)\n throw new Error(\"second arg must be public key\");\n const s4 = _normFnElement(Fn, secretKeyA);\n const b4 = Point3.fromHex(publicKeyB);\n return b4.multiply(s4).toBytes(isCompressed);\n }\n const utils = {\n isValidSecretKey,\n isValidPublicKey,\n randomSecretKey,\n // TODO: remove\n isValidPrivateKey: isValidSecretKey,\n randomPrivateKey: randomSecretKey,\n normPrivateKeyToScalar: (key) => _normFnElement(Fn, key),\n precompute(windowSize = 8, point = Point3.BASE) {\n return point.precompute(windowSize, false);\n }\n };\n return Object.freeze({ getPublicKey, getSharedSecret, keygen, Point: Point3, utils, lengths });\n }\n function ecdsa(Point3, hash3, ecdsaOpts = {}) {\n ahash(hash3);\n _validateObject(ecdsaOpts, {}, {\n hmac: \"function\",\n lowS: \"boolean\",\n randomBytes: \"function\",\n bits2int: \"function\",\n bits2int_modN: \"function\"\n });\n const randomBytes2 = ecdsaOpts.randomBytes || randomBytes;\n const hmac2 = ecdsaOpts.hmac || ((key, ...msgs) => hmac(hash3, key, concatBytes(...msgs)));\n const { Fp, Fn } = Point3;\n const { ORDER: CURVE_ORDER, BITS: fnBits } = Fn;\n const { keygen, getPublicKey, getSharedSecret, utils, lengths } = ecdh(Point3, ecdsaOpts);\n const defaultSigOpts = {\n prehash: false,\n lowS: typeof ecdsaOpts.lowS === \"boolean\" ? ecdsaOpts.lowS : false,\n format: void 0,\n //'compact' as ECDSASigFormat,\n extraEntropy: false\n };\n const defaultSigOpts_format = \"compact\";\n function isBiggerThanHalfOrder(number2) {\n const HALF = CURVE_ORDER >> _1n10;\n return number2 > HALF;\n }\n function validateRS(title2, num2) {\n if (!Fn.isValidNot0(num2))\n throw new Error(`invalid signature ${title2}: out of range 1..Point.Fn.ORDER`);\n return num2;\n }\n function validateSigLength(bytes, format) {\n validateSigFormat(format);\n const size6 = lengths.signature;\n const sizer = format === \"compact\" ? size6 : format === \"recovered\" ? size6 + 1 : void 0;\n return _abytes2(bytes, sizer, `${format} signature`);\n }\n class Signature2 {\n constructor(r2, s4, recovery) {\n this.r = validateRS(\"r\", r2);\n this.s = validateRS(\"s\", s4);\n if (recovery != null)\n this.recovery = recovery;\n Object.freeze(this);\n }\n static fromBytes(bytes, format = defaultSigOpts_format) {\n validateSigLength(bytes, format);\n let recid;\n if (format === \"der\") {\n const { r: r3, s: s5 } = DER2.toSig(_abytes2(bytes));\n return new Signature2(r3, s5);\n }\n if (format === \"recovered\") {\n recid = bytes[0];\n format = \"compact\";\n bytes = bytes.subarray(1);\n }\n const L2 = Fn.BYTES;\n const r2 = bytes.subarray(0, L2);\n const s4 = bytes.subarray(L2, L2 * 2);\n return new Signature2(Fn.fromBytes(r2), Fn.fromBytes(s4), recid);\n }\n static fromHex(hex, format) {\n return this.fromBytes(hexToBytes2(hex), format);\n }\n addRecoveryBit(recovery) {\n return new Signature2(this.r, this.s, recovery);\n }\n recoverPublicKey(messageHash) {\n const FIELD_ORDER = Fp.ORDER;\n const { r: r2, s: s4, recovery: rec } = this;\n if (rec == null || ![0, 1, 2, 3].includes(rec))\n throw new Error(\"recovery id invalid\");\n const hasCofactor = CURVE_ORDER * _2n6 < FIELD_ORDER;\n if (hasCofactor && rec > 1)\n throw new Error(\"recovery id is ambiguous for h>1 curve\");\n const radj = rec === 2 || rec === 3 ? r2 + CURVE_ORDER : r2;\n if (!Fp.isValid(radj))\n throw new Error(\"recovery id 2 or 3 invalid\");\n const x4 = Fp.toBytes(radj);\n const R3 = Point3.fromBytes(concatBytes(pprefix((rec & 1) === 0), x4));\n const ir = Fn.inv(radj);\n const h4 = bits2int_modN(ensureBytes2(\"msgHash\", messageHash));\n const u1 = Fn.create(-h4 * ir);\n const u2 = Fn.create(s4 * ir);\n const Q2 = Point3.BASE.multiplyUnsafe(u1).add(R3.multiplyUnsafe(u2));\n if (Q2.is0())\n throw new Error(\"point at infinify\");\n Q2.assertValidity();\n return Q2;\n }\n // Signatures should be low-s, to prevent malleability.\n hasHighS() {\n return isBiggerThanHalfOrder(this.s);\n }\n toBytes(format = defaultSigOpts_format) {\n validateSigFormat(format);\n if (format === \"der\")\n return hexToBytes2(DER2.hexFromSig(this));\n const r2 = Fn.toBytes(this.r);\n const s4 = Fn.toBytes(this.s);\n if (format === \"recovered\") {\n if (this.recovery == null)\n throw new Error(\"recovery bit must be present\");\n return concatBytes(Uint8Array.of(this.recovery), r2, s4);\n }\n return concatBytes(r2, s4);\n }\n toHex(format) {\n return bytesToHex2(this.toBytes(format));\n }\n // TODO: remove\n assertValidity() {\n }\n static fromCompact(hex) {\n return Signature2.fromBytes(ensureBytes2(\"sig\", hex), \"compact\");\n }\n static fromDER(hex) {\n return Signature2.fromBytes(ensureBytes2(\"sig\", hex), \"der\");\n }\n normalizeS() {\n return this.hasHighS() ? new Signature2(this.r, Fn.neg(this.s), this.recovery) : this;\n }\n toDERRawBytes() {\n return this.toBytes(\"der\");\n }\n toDERHex() {\n return bytesToHex2(this.toBytes(\"der\"));\n }\n toCompactRawBytes() {\n return this.toBytes(\"compact\");\n }\n toCompactHex() {\n return bytesToHex2(this.toBytes(\"compact\"));\n }\n }\n const bits2int = ecdsaOpts.bits2int || function bits2int_def(bytes) {\n if (bytes.length > 8192)\n throw new Error(\"input is too large\");\n const num2 = bytesToNumberBE2(bytes);\n const delta = bytes.length * 8 - fnBits;\n return delta > 0 ? num2 >> BigInt(delta) : num2;\n };\n const bits2int_modN = ecdsaOpts.bits2int_modN || function bits2int_modN_def(bytes) {\n return Fn.create(bits2int(bytes));\n };\n const ORDER_MASK = bitMask2(fnBits);\n function int2octets(num2) {\n aInRange2(\"num < 2^\" + fnBits, num2, _0n10, ORDER_MASK);\n return Fn.toBytes(num2);\n }\n function validateMsgAndHash(message, prehash) {\n _abytes2(message, void 0, \"message\");\n return prehash ? _abytes2(hash3(message), void 0, \"prehashed message\") : message;\n }\n function prepSig(message, privateKey, opts) {\n if ([\"recovered\", \"canonical\"].some((k4) => k4 in opts))\n throw new Error(\"sign() legacy options not supported\");\n const { lowS, prehash, extraEntropy: extraEntropy2 } = validateSigOpts(opts, defaultSigOpts);\n message = validateMsgAndHash(message, prehash);\n const h1int = bits2int_modN(message);\n const d5 = _normFnElement(Fn, privateKey);\n const seedArgs = [int2octets(d5), int2octets(h1int)];\n if (extraEntropy2 != null && extraEntropy2 !== false) {\n const e3 = extraEntropy2 === true ? randomBytes2(lengths.secretKey) : extraEntropy2;\n seedArgs.push(ensureBytes2(\"extraEntropy\", e3));\n }\n const seed = concatBytes(...seedArgs);\n const m2 = h1int;\n function k2sig(kBytes) {\n const k4 = bits2int(kBytes);\n if (!Fn.isValidNot0(k4))\n return;\n const ik = Fn.inv(k4);\n const q3 = Point3.BASE.multiply(k4).toAffine();\n const r2 = Fn.create(q3.x);\n if (r2 === _0n10)\n return;\n const s4 = Fn.create(ik * Fn.create(m2 + r2 * d5));\n if (s4 === _0n10)\n return;\n let recovery = (q3.x === r2 ? 0 : 2) | Number(q3.y & _1n10);\n let normS = s4;\n if (lowS && isBiggerThanHalfOrder(s4)) {\n normS = Fn.neg(s4);\n recovery ^= 1;\n }\n return new Signature2(r2, normS, recovery);\n }\n return { seed, k2sig };\n }\n function sign3(message, secretKey, opts = {}) {\n message = ensureBytes2(\"message\", message);\n const { seed, k2sig } = prepSig(message, secretKey, opts);\n const drbg = createHmacDrbg2(hash3.outputLen, Fn.BYTES, hmac2);\n const sig = drbg(seed, k2sig);\n return sig;\n }\n function tryParsingSig(sg) {\n let sig = void 0;\n const isHex2 = typeof sg === \"string\" || isBytes(sg);\n const isObj = !isHex2 && sg !== null && typeof sg === \"object\" && typeof sg.r === \"bigint\" && typeof sg.s === \"bigint\";\n if (!isHex2 && !isObj)\n throw new Error(\"invalid signature, expected Uint8Array, hex string or Signature instance\");\n if (isObj) {\n sig = new Signature2(sg.r, sg.s);\n } else if (isHex2) {\n try {\n sig = Signature2.fromBytes(ensureBytes2(\"sig\", sg), \"der\");\n } catch (derError) {\n if (!(derError instanceof DER2.Err))\n throw derError;\n }\n if (!sig) {\n try {\n sig = Signature2.fromBytes(ensureBytes2(\"sig\", sg), \"compact\");\n } catch (error) {\n return false;\n }\n }\n }\n if (!sig)\n return false;\n return sig;\n }\n function verify(signature, message, publicKey, opts = {}) {\n const { lowS, prehash, format } = validateSigOpts(opts, defaultSigOpts);\n publicKey = ensureBytes2(\"publicKey\", publicKey);\n message = validateMsgAndHash(ensureBytes2(\"message\", message), prehash);\n if (\"strict\" in opts)\n throw new Error(\"options.strict was renamed to lowS\");\n const sig = format === void 0 ? tryParsingSig(signature) : Signature2.fromBytes(ensureBytes2(\"sig\", signature), format);\n if (sig === false)\n return false;\n try {\n const P2 = Point3.fromBytes(publicKey);\n if (lowS && sig.hasHighS())\n return false;\n const { r: r2, s: s4 } = sig;\n const h4 = bits2int_modN(message);\n const is = Fn.inv(s4);\n const u1 = Fn.create(h4 * is);\n const u2 = Fn.create(r2 * is);\n const R3 = Point3.BASE.multiplyUnsafe(u1).add(P2.multiplyUnsafe(u2));\n if (R3.is0())\n return false;\n const v2 = Fn.create(R3.x);\n return v2 === r2;\n } catch (e3) {\n return false;\n }\n }\n function recoverPublicKey3(signature, message, opts = {}) {\n const { prehash } = validateSigOpts(opts, defaultSigOpts);\n message = validateMsgAndHash(message, prehash);\n return Signature2.fromBytes(signature, \"recovered\").recoverPublicKey(message).toBytes();\n }\n return Object.freeze({\n keygen,\n getPublicKey,\n getSharedSecret,\n utils,\n lengths,\n Point: Point3,\n sign: sign3,\n verify,\n recoverPublicKey: recoverPublicKey3,\n Signature: Signature2,\n hash: hash3\n });\n }\n function _weierstrass_legacy_opts_to_new(c4) {\n const CURVE = {\n a: c4.a,\n b: c4.b,\n p: c4.Fp.ORDER,\n n: c4.n,\n h: c4.h,\n Gx: c4.Gx,\n Gy: c4.Gy\n };\n const Fp = c4.Fp;\n let allowedLengths = c4.allowedPrivateKeyLengths ? Array.from(new Set(c4.allowedPrivateKeyLengths.map((l6) => Math.ceil(l6 / 2)))) : void 0;\n const Fn = Field2(CURVE.n, {\n BITS: c4.nBitLength,\n allowedLengths,\n modFromBytes: c4.wrapPrivateKey\n });\n const curveOpts = {\n Fp,\n Fn,\n allowInfinityPoint: c4.allowInfinityPoint,\n endo: c4.endo,\n isTorsionFree: c4.isTorsionFree,\n clearCofactor: c4.clearCofactor,\n fromBytes: c4.fromBytes,\n toBytes: c4.toBytes\n };\n return { CURVE, curveOpts };\n }\n function _ecdsa_legacy_opts_to_new(c4) {\n const { CURVE, curveOpts } = _weierstrass_legacy_opts_to_new(c4);\n const ecdsaOpts = {\n hmac: c4.hmac,\n randomBytes: c4.randomBytes,\n lowS: c4.lowS,\n bits2int: c4.bits2int,\n bits2int_modN: c4.bits2int_modN\n };\n return { CURVE, curveOpts, hash: c4.hash, ecdsaOpts };\n }\n function _ecdsa_new_output_to_legacy(c4, _ecdsa) {\n const Point3 = _ecdsa.Point;\n return Object.assign({}, _ecdsa, {\n ProjectivePoint: Point3,\n CURVE: Object.assign({}, c4, nLength2(Point3.Fn.ORDER, Point3.Fn.BITS))\n });\n }\n function weierstrass2(c4) {\n const { CURVE, curveOpts, hash: hash3, ecdsaOpts } = _ecdsa_legacy_opts_to_new(c4);\n const Point3 = weierstrassN(CURVE, curveOpts);\n const signs = ecdsa(Point3, hash3, ecdsaOpts);\n return _ecdsa_new_output_to_legacy(c4, signs);\n }\n var divNearest2, DERErr2, DER2, _0n10, _1n10, _2n6, _3n4, _4n4;\n var init_weierstrass2 = __esm({\n \"../../../node_modules/.pnpm/@noble+curves@1.9.7/node_modules/@noble/curves/esm/abstract/weierstrass.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_hmac();\n init_utils3();\n init_utils8();\n init_curve2();\n init_modular2();\n divNearest2 = (num2, den) => (num2 + (num2 >= 0 ? den : -den) / _2n6) / den;\n DERErr2 = class extends Error {\n constructor(m2 = \"\") {\n super(m2);\n }\n };\n DER2 = {\n // asn.1 DER encoding utils\n Err: DERErr2,\n // Basic building block is TLV (Tag-Length-Value)\n _tlv: {\n encode: (tag, data) => {\n const { Err: E2 } = DER2;\n if (tag < 0 || tag > 256)\n throw new E2(\"tlv.encode: wrong tag\");\n if (data.length & 1)\n throw new E2(\"tlv.encode: unpadded data\");\n const dataLen = data.length / 2;\n const len = numberToHexUnpadded2(dataLen);\n if (len.length / 2 & 128)\n throw new E2(\"tlv.encode: long form length too big\");\n const lenLen = dataLen > 127 ? numberToHexUnpadded2(len.length / 2 | 128) : \"\";\n const t3 = numberToHexUnpadded2(tag);\n return t3 + lenLen + len + data;\n },\n // v - value, l - left bytes (unparsed)\n decode(tag, data) {\n const { Err: E2 } = DER2;\n let pos = 0;\n if (tag < 0 || tag > 256)\n throw new E2(\"tlv.encode: wrong tag\");\n if (data.length < 2 || data[pos++] !== tag)\n throw new E2(\"tlv.decode: wrong tlv\");\n const first = data[pos++];\n const isLong = !!(first & 128);\n let length2 = 0;\n if (!isLong)\n length2 = first;\n else {\n const lenLen = first & 127;\n if (!lenLen)\n throw new E2(\"tlv.decode(long): indefinite length not supported\");\n if (lenLen > 4)\n throw new E2(\"tlv.decode(long): byte length is too big\");\n const lengthBytes = data.subarray(pos, pos + lenLen);\n if (lengthBytes.length !== lenLen)\n throw new E2(\"tlv.decode: length bytes not complete\");\n if (lengthBytes[0] === 0)\n throw new E2(\"tlv.decode(long): zero leftmost byte\");\n for (const b4 of lengthBytes)\n length2 = length2 << 8 | b4;\n pos += lenLen;\n if (length2 < 128)\n throw new E2(\"tlv.decode(long): not minimal encoding\");\n }\n const v2 = data.subarray(pos, pos + length2);\n if (v2.length !== length2)\n throw new E2(\"tlv.decode: wrong value length\");\n return { v: v2, l: data.subarray(pos + length2) };\n }\n },\n // https://crypto.stackexchange.com/a/57734 Leftmost bit of first byte is 'negative' flag,\n // since we always use positive integers here. It must always be empty:\n // - add zero byte if exists\n // - if next byte doesn't have a flag, leading zero is not allowed (minimal encoding)\n _int: {\n encode(num2) {\n const { Err: E2 } = DER2;\n if (num2 < _0n10)\n throw new E2(\"integer: negative integers are not allowed\");\n let hex = numberToHexUnpadded2(num2);\n if (Number.parseInt(hex[0], 16) & 8)\n hex = \"00\" + hex;\n if (hex.length & 1)\n throw new E2(\"unexpected DER parsing assertion: unpadded hex\");\n return hex;\n },\n decode(data) {\n const { Err: E2 } = DER2;\n if (data[0] & 128)\n throw new E2(\"invalid signature integer: negative\");\n if (data[0] === 0 && !(data[1] & 128))\n throw new E2(\"invalid signature integer: unnecessary leading zero\");\n return bytesToNumberBE2(data);\n }\n },\n toSig(hex) {\n const { Err: E2, _int: int, _tlv: tlv } = DER2;\n const data = ensureBytes2(\"signature\", hex);\n const { v: seqBytes, l: seqLeftBytes } = tlv.decode(48, data);\n if (seqLeftBytes.length)\n throw new E2(\"invalid signature: left bytes after parsing\");\n const { v: rBytes, l: rLeftBytes } = tlv.decode(2, seqBytes);\n const { v: sBytes, l: sLeftBytes } = tlv.decode(2, rLeftBytes);\n if (sLeftBytes.length)\n throw new E2(\"invalid signature: left bytes after parsing\");\n return { r: int.decode(rBytes), s: int.decode(sBytes) };\n },\n hexFromSig(sig) {\n const { _tlv: tlv, _int: int } = DER2;\n const rs = tlv.encode(2, int.encode(sig.r));\n const ss = tlv.encode(2, int.encode(sig.s));\n const seq = rs + ss;\n return tlv.encode(48, seq);\n }\n };\n _0n10 = BigInt(0);\n _1n10 = BigInt(1);\n _2n6 = BigInt(2);\n _3n4 = BigInt(3);\n _4n4 = BigInt(4);\n }\n });\n\n // ../../../node_modules/.pnpm/@noble+curves@1.9.7/node_modules/@noble/curves/esm/_shortw_utils.js\n function createCurve2(curveDef, defHash) {\n const create2 = (hash3) => weierstrass2({ ...curveDef, hash: hash3 });\n return { ...create2(defHash), create: create2 };\n }\n var init_shortw_utils2 = __esm({\n \"../../../node_modules/.pnpm/@noble+curves@1.9.7/node_modules/@noble/curves/esm/_shortw_utils.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_weierstrass2();\n }\n });\n\n // ../../../node_modules/.pnpm/@noble+curves@1.9.7/node_modules/@noble/curves/esm/secp256k1.js\n function sqrtMod2(y6) {\n const P2 = secp256k1_CURVE.p;\n const _3n5 = BigInt(3), _6n = BigInt(6), _11n = BigInt(11), _22n = BigInt(22);\n const _23n = BigInt(23), _44n = BigInt(44), _88n = BigInt(88);\n const b22 = y6 * y6 * y6 % P2;\n const b32 = b22 * b22 * y6 % P2;\n const b6 = pow22(b32, _3n5, P2) * b32 % P2;\n const b9 = pow22(b6, _3n5, P2) * b32 % P2;\n const b11 = pow22(b9, _2n7, P2) * b22 % P2;\n const b222 = pow22(b11, _11n, P2) * b11 % P2;\n const b44 = pow22(b222, _22n, P2) * b222 % P2;\n const b88 = pow22(b44, _44n, P2) * b44 % P2;\n const b176 = pow22(b88, _88n, P2) * b88 % P2;\n const b220 = pow22(b176, _44n, P2) * b44 % P2;\n const b223 = pow22(b220, _3n5, P2) * b32 % P2;\n const t1 = pow22(b223, _23n, P2) * b222 % P2;\n const t22 = pow22(t1, _6n, P2) * b22 % P2;\n const root = pow22(t22, _2n7, P2);\n if (!Fpk12.eql(Fpk12.sqr(root), y6))\n throw new Error(\"Cannot find square root\");\n return root;\n }\n var secp256k1_CURVE, secp256k1_ENDO, _2n7, Fpk12, secp256k12;\n var init_secp256k12 = __esm({\n \"../../../node_modules/.pnpm/@noble+curves@1.9.7/node_modules/@noble/curves/esm/secp256k1.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_sha2();\n init_shortw_utils2();\n init_modular2();\n secp256k1_CURVE = {\n p: BigInt(\"0xfffffffffffffffffffffffffffffffffffffffffffffffffffffffefffffc2f\"),\n n: BigInt(\"0xfffffffffffffffffffffffffffffffebaaedce6af48a03bbfd25e8cd0364141\"),\n h: BigInt(1),\n a: BigInt(0),\n b: BigInt(7),\n Gx: BigInt(\"0x79be667ef9dcbbac55a06295ce870b07029bfcdb2dce28d959f2815b16f81798\"),\n Gy: BigInt(\"0x483ada7726a3c4655da4fbfc0e1108a8fd17b448a68554199c47d08ffb10d4b8\")\n };\n secp256k1_ENDO = {\n beta: BigInt(\"0x7ae96a2b657c07106e64479eac3434e99cf0497512f58995c1396c28719501ee\"),\n basises: [\n [BigInt(\"0x3086d221a7d46bcde86c90e49284eb15\"), -BigInt(\"0xe4437ed6010e88286f547fa90abfe4c3\")],\n [BigInt(\"0x114ca50f7a8e2f3f657c1108d9d44cfd8\"), BigInt(\"0x3086d221a7d46bcde86c90e49284eb15\")]\n ]\n };\n _2n7 = /* @__PURE__ */ BigInt(2);\n Fpk12 = Field2(secp256k1_CURVE.p, { sqrt: sqrtMod2 });\n secp256k12 = createCurve2({ ...secp256k1_CURVE, Fp: Fpk12, lowS: true, endo: secp256k1_ENDO }, sha256);\n }\n });\n\n // ../../../node_modules/.pnpm/@scure+base@1.2.6/node_modules/@scure/base/lib/esm/index.js\n function isBytes4(a3) {\n return a3 instanceof Uint8Array || ArrayBuffer.isView(a3) && a3.constructor.name === \"Uint8Array\";\n }\n function isArrayOf(isString, arr) {\n if (!Array.isArray(arr))\n return false;\n if (arr.length === 0)\n return true;\n if (isString) {\n return arr.every((item) => typeof item === \"string\");\n } else {\n return arr.every((item) => Number.isSafeInteger(item));\n }\n }\n function afn(input) {\n if (typeof input !== \"function\")\n throw new Error(\"function expected\");\n return true;\n }\n function astr(label, input) {\n if (typeof input !== \"string\")\n throw new Error(`${label}: string expected`);\n return true;\n }\n function anumber2(n2) {\n if (!Number.isSafeInteger(n2))\n throw new Error(`invalid integer: ${n2}`);\n }\n function aArr(input) {\n if (!Array.isArray(input))\n throw new Error(\"array expected\");\n }\n function astrArr(label, input) {\n if (!isArrayOf(true, input))\n throw new Error(`${label}: array of strings expected`);\n }\n function anumArr(label, input) {\n if (!isArrayOf(false, input))\n throw new Error(`${label}: array of numbers expected`);\n }\n // @__NO_SIDE_EFFECTS__\n function chain(...args) {\n const id = (a3) => a3;\n const wrap3 = (a3, b4) => (c4) => a3(b4(c4));\n const encode6 = args.map((x4) => x4.encode).reduceRight(wrap3, id);\n const decode2 = args.map((x4) => x4.decode).reduce(wrap3, id);\n return { encode: encode6, decode: decode2 };\n }\n // @__NO_SIDE_EFFECTS__\n function alphabet(letters) {\n const lettersA = typeof letters === \"string\" ? letters.split(\"\") : letters;\n const len = lettersA.length;\n astrArr(\"alphabet\", lettersA);\n const indexes = new Map(lettersA.map((l6, i3) => [l6, i3]));\n return {\n encode: (digits) => {\n aArr(digits);\n return digits.map((i3) => {\n if (!Number.isSafeInteger(i3) || i3 < 0 || i3 >= len)\n throw new Error(`alphabet.encode: digit index outside alphabet \"${i3}\". Allowed: ${letters}`);\n return lettersA[i3];\n });\n },\n decode: (input) => {\n aArr(input);\n return input.map((letter) => {\n astr(\"alphabet.decode\", letter);\n const i3 = indexes.get(letter);\n if (i3 === void 0)\n throw new Error(`Unknown letter: \"${letter}\". Allowed: ${letters}`);\n return i3;\n });\n }\n };\n }\n // @__NO_SIDE_EFFECTS__\n function join(separator = \"\") {\n astr(\"join\", separator);\n return {\n encode: (from14) => {\n astrArr(\"join.decode\", from14);\n return from14.join(separator);\n },\n decode: (to) => {\n astr(\"join.decode\", to);\n return to.split(separator);\n }\n };\n }\n function convertRadix(data, from14, to) {\n if (from14 < 2)\n throw new Error(`convertRadix: invalid from=${from14}, base cannot be less than 2`);\n if (to < 2)\n throw new Error(`convertRadix: invalid to=${to}, base cannot be less than 2`);\n aArr(data);\n if (!data.length)\n return [];\n let pos = 0;\n const res = [];\n const digits = Array.from(data, (d5) => {\n anumber2(d5);\n if (d5 < 0 || d5 >= from14)\n throw new Error(`invalid integer: ${d5}`);\n return d5;\n });\n const dlen = digits.length;\n while (true) {\n let carry = 0;\n let done = true;\n for (let i3 = pos; i3 < dlen; i3++) {\n const digit = digits[i3];\n const fromCarry = from14 * carry;\n const digitBase = fromCarry + digit;\n if (!Number.isSafeInteger(digitBase) || fromCarry / from14 !== carry || digitBase - digit !== fromCarry) {\n throw new Error(\"convertRadix: carry overflow\");\n }\n const div = digitBase / to;\n carry = digitBase % to;\n const rounded = Math.floor(div);\n digits[i3] = rounded;\n if (!Number.isSafeInteger(rounded) || rounded * to + carry !== digitBase)\n throw new Error(\"convertRadix: carry overflow\");\n if (!done)\n continue;\n else if (!rounded)\n pos = i3;\n else\n done = false;\n }\n res.push(carry);\n if (done)\n break;\n }\n for (let i3 = 0; i3 < data.length - 1 && data[i3] === 0; i3++)\n res.push(0);\n return res.reverse();\n }\n // @__NO_SIDE_EFFECTS__\n function radix(num2) {\n anumber2(num2);\n const _256 = 2 ** 8;\n return {\n encode: (bytes) => {\n if (!isBytes4(bytes))\n throw new Error(\"radix.encode input should be Uint8Array\");\n return convertRadix(Array.from(bytes), _256, num2);\n },\n decode: (digits) => {\n anumArr(\"radix.decode\", digits);\n return Uint8Array.from(convertRadix(digits, num2, _256));\n }\n };\n }\n function checksum3(len, fn) {\n anumber2(len);\n afn(fn);\n return {\n encode(data) {\n if (!isBytes4(data))\n throw new Error(\"checksum.encode: input should be Uint8Array\");\n const sum = fn(data).slice(0, len);\n const res = new Uint8Array(data.length + len);\n res.set(data);\n res.set(sum, data.length);\n return res;\n },\n decode(data) {\n if (!isBytes4(data))\n throw new Error(\"checksum.decode: input should be Uint8Array\");\n const payload = data.slice(0, -len);\n const oldChecksum = data.slice(-len);\n const newChecksum = fn(payload).slice(0, len);\n for (let i3 = 0; i3 < len; i3++)\n if (newChecksum[i3] !== oldChecksum[i3])\n throw new Error(\"Invalid checksum\");\n return payload;\n }\n };\n }\n var genBase58, base58, createBase58check;\n var init_esm2 = __esm({\n \"../../../node_modules/.pnpm/@scure+base@1.2.6/node_modules/@scure/base/lib/esm/index.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n genBase58 = /* @__NO_SIDE_EFFECTS__ */ (abc) => /* @__PURE__ */ chain(/* @__PURE__ */ radix(58), /* @__PURE__ */ alphabet(abc), /* @__PURE__ */ join(\"\"));\n base58 = /* @__PURE__ */ genBase58(\"123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz\");\n createBase58check = (sha2564) => /* @__PURE__ */ chain(checksum3(4, (data) => sha2564(sha2564(data))), base58);\n }\n });\n\n // ../../../node_modules/.pnpm/@scure+bip32@1.7.0/node_modules/@scure/bip32/lib/esm/index.js\n function bytesToNumber2(bytes) {\n abytes(bytes);\n const h4 = bytes.length === 0 ? \"0\" : bytesToHex2(bytes);\n return BigInt(\"0x\" + h4);\n }\n function numberToBytes2(num2) {\n if (typeof num2 !== \"bigint\")\n throw new Error(\"bigint expected\");\n return hexToBytes2(num2.toString(16).padStart(64, \"0\"));\n }\n var Point2, base58check, MASTER_SECRET, BITCOIN_VERSIONS, HARDENED_OFFSET, hash160, fromU32, toU32, HDKey;\n var init_esm3 = __esm({\n \"../../../node_modules/.pnpm/@scure+bip32@1.7.0/node_modules/@scure/bip32/lib/esm/index.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_modular2();\n init_secp256k12();\n init_hmac();\n init_legacy();\n init_sha2();\n init_utils3();\n init_esm2();\n Point2 = secp256k12.ProjectivePoint;\n base58check = createBase58check(sha256);\n MASTER_SECRET = utf8ToBytes(\"Bitcoin seed\");\n BITCOIN_VERSIONS = { private: 76066276, public: 76067358 };\n HARDENED_OFFSET = 2147483648;\n hash160 = (data) => ripemd160(sha256(data));\n fromU32 = (data) => createView(data).getUint32(0, false);\n toU32 = (n2) => {\n if (!Number.isSafeInteger(n2) || n2 < 0 || n2 > 2 ** 32 - 1) {\n throw new Error(\"invalid number, should be from 0 to 2**32-1, got \" + n2);\n }\n const buf = new Uint8Array(4);\n createView(buf).setUint32(0, n2, false);\n return buf;\n };\n HDKey = class _HDKey {\n get fingerprint() {\n if (!this.pubHash) {\n throw new Error(\"No publicKey set!\");\n }\n return fromU32(this.pubHash);\n }\n get identifier() {\n return this.pubHash;\n }\n get pubKeyHash() {\n return this.pubHash;\n }\n get privateKey() {\n return this.privKeyBytes || null;\n }\n get publicKey() {\n return this.pubKey || null;\n }\n get privateExtendedKey() {\n const priv = this.privateKey;\n if (!priv) {\n throw new Error(\"No private key\");\n }\n return base58check.encode(this.serialize(this.versions.private, concatBytes(new Uint8Array([0]), priv)));\n }\n get publicExtendedKey() {\n if (!this.pubKey) {\n throw new Error(\"No public key\");\n }\n return base58check.encode(this.serialize(this.versions.public, this.pubKey));\n }\n static fromMasterSeed(seed, versions2 = BITCOIN_VERSIONS) {\n abytes(seed);\n if (8 * seed.length < 128 || 8 * seed.length > 512) {\n throw new Error(\"HDKey: seed length must be between 128 and 512 bits; 256 bits is advised, got \" + seed.length);\n }\n const I2 = hmac(sha512, MASTER_SECRET, seed);\n return new _HDKey({\n versions: versions2,\n chainCode: I2.slice(32),\n privateKey: I2.slice(0, 32)\n });\n }\n static fromExtendedKey(base58key, versions2 = BITCOIN_VERSIONS) {\n const keyBuffer = base58check.decode(base58key);\n const keyView = createView(keyBuffer);\n const version6 = keyView.getUint32(0, false);\n const opt = {\n versions: versions2,\n depth: keyBuffer[4],\n parentFingerprint: keyView.getUint32(5, false),\n index: keyView.getUint32(9, false),\n chainCode: keyBuffer.slice(13, 45)\n };\n const key = keyBuffer.slice(45);\n const isPriv = key[0] === 0;\n if (version6 !== versions2[isPriv ? \"private\" : \"public\"]) {\n throw new Error(\"Version mismatch\");\n }\n if (isPriv) {\n return new _HDKey({ ...opt, privateKey: key.slice(1) });\n } else {\n return new _HDKey({ ...opt, publicKey: key });\n }\n }\n static fromJSON(json) {\n return _HDKey.fromExtendedKey(json.xpriv);\n }\n constructor(opt) {\n this.depth = 0;\n this.index = 0;\n this.chainCode = null;\n this.parentFingerprint = 0;\n if (!opt || typeof opt !== \"object\") {\n throw new Error(\"HDKey.constructor must not be called directly\");\n }\n this.versions = opt.versions || BITCOIN_VERSIONS;\n this.depth = opt.depth || 0;\n this.chainCode = opt.chainCode || null;\n this.index = opt.index || 0;\n this.parentFingerprint = opt.parentFingerprint || 0;\n if (!this.depth) {\n if (this.parentFingerprint || this.index) {\n throw new Error(\"HDKey: zero depth with non-zero index/parent fingerprint\");\n }\n }\n if (opt.publicKey && opt.privateKey) {\n throw new Error(\"HDKey: publicKey and privateKey at same time.\");\n }\n if (opt.privateKey) {\n if (!secp256k12.utils.isValidPrivateKey(opt.privateKey)) {\n throw new Error(\"Invalid private key\");\n }\n this.privKey = typeof opt.privateKey === \"bigint\" ? opt.privateKey : bytesToNumber2(opt.privateKey);\n this.privKeyBytes = numberToBytes2(this.privKey);\n this.pubKey = secp256k12.getPublicKey(opt.privateKey, true);\n } else if (opt.publicKey) {\n this.pubKey = Point2.fromHex(opt.publicKey).toRawBytes(true);\n } else {\n throw new Error(\"HDKey: no public or private key provided\");\n }\n this.pubHash = hash160(this.pubKey);\n }\n derive(path) {\n if (!/^[mM]'?/.test(path)) {\n throw new Error('Path must start with \"m\" or \"M\"');\n }\n if (/^[mM]'?$/.test(path)) {\n return this;\n }\n const parts = path.replace(/^[mM]'?\\//, \"\").split(\"/\");\n let child = this;\n for (const c4 of parts) {\n const m2 = /^(\\d+)('?)$/.exec(c4);\n const m1 = m2 && m2[1];\n if (!m2 || m2.length !== 3 || typeof m1 !== \"string\")\n throw new Error(\"invalid child index: \" + c4);\n let idx = +m1;\n if (!Number.isSafeInteger(idx) || idx >= HARDENED_OFFSET) {\n throw new Error(\"Invalid index\");\n }\n if (m2[2] === \"'\") {\n idx += HARDENED_OFFSET;\n }\n child = child.deriveChild(idx);\n }\n return child;\n }\n deriveChild(index2) {\n if (!this.pubKey || !this.chainCode) {\n throw new Error(\"No publicKey or chainCode set\");\n }\n let data = toU32(index2);\n if (index2 >= HARDENED_OFFSET) {\n const priv = this.privateKey;\n if (!priv) {\n throw new Error(\"Could not derive hardened child key\");\n }\n data = concatBytes(new Uint8Array([0]), priv, data);\n } else {\n data = concatBytes(this.pubKey, data);\n }\n const I2 = hmac(sha512, this.chainCode, data);\n const childTweak = bytesToNumber2(I2.slice(0, 32));\n const chainCode = I2.slice(32);\n if (!secp256k12.utils.isValidPrivateKey(childTweak)) {\n throw new Error(\"Tweak bigger than curve order\");\n }\n const opt = {\n versions: this.versions,\n chainCode,\n depth: this.depth + 1,\n parentFingerprint: this.fingerprint,\n index: index2\n };\n try {\n if (this.privateKey) {\n const added = mod2(this.privKey + childTweak, secp256k12.CURVE.n);\n if (!secp256k12.utils.isValidPrivateKey(added)) {\n throw new Error(\"The tweak was out of range or the resulted private key is invalid\");\n }\n opt.privateKey = added;\n } else {\n const added = Point2.fromHex(this.pubKey).add(Point2.fromPrivateKey(childTweak));\n if (added.equals(Point2.ZERO)) {\n throw new Error(\"The tweak was equal to negative P, which made the result key invalid\");\n }\n opt.publicKey = added.toRawBytes(true);\n }\n return new _HDKey(opt);\n } catch (err) {\n return this.deriveChild(index2 + 1);\n }\n }\n sign(hash3) {\n if (!this.privateKey) {\n throw new Error(\"No privateKey set!\");\n }\n abytes(hash3, 32);\n return secp256k12.sign(hash3, this.privKey).toCompactRawBytes();\n }\n verify(hash3, signature) {\n abytes(hash3, 32);\n abytes(signature, 64);\n if (!this.publicKey) {\n throw new Error(\"No publicKey set!\");\n }\n let sig;\n try {\n sig = secp256k12.Signature.fromCompact(signature);\n } catch (error) {\n return false;\n }\n return secp256k12.verify(sig, hash3, this.publicKey);\n }\n wipePrivateData() {\n this.privKey = void 0;\n if (this.privKeyBytes) {\n this.privKeyBytes.fill(0);\n this.privKeyBytes = void 0;\n }\n return this;\n }\n toJSON() {\n return {\n xpriv: this.privateExtendedKey,\n xpub: this.publicExtendedKey\n };\n }\n serialize(version6, key) {\n if (!this.chainCode) {\n throw new Error(\"No chainCode set\");\n }\n abytes(key, 33);\n return concatBytes(toU32(version6), new Uint8Array([this.depth]), toU32(this.parentFingerprint), toU32(this.index), this.chainCode, key);\n }\n };\n }\n });\n\n // ../../../node_modules/.pnpm/@noble+hashes@1.8.0/node_modules/@noble/hashes/esm/pbkdf2.js\n function pbkdf2Init(hash3, _password, _salt, _opts) {\n ahash(hash3);\n const opts = checkOpts({ dkLen: 32, asyncTick: 10 }, _opts);\n const { c: c4, dkLen, asyncTick } = opts;\n anumber(c4);\n anumber(dkLen);\n anumber(asyncTick);\n if (c4 < 1)\n throw new Error(\"iterations (c) should be >= 1\");\n const password = kdfInputToBytes(_password);\n const salt = kdfInputToBytes(_salt);\n const DK = new Uint8Array(dkLen);\n const PRF = hmac.create(hash3, password);\n const PRFSalt = PRF._cloneInto().update(salt);\n return { c: c4, dkLen, asyncTick, DK, PRF, PRFSalt };\n }\n function pbkdf2Output(PRF, PRFSalt, DK, prfW, u2) {\n PRF.destroy();\n PRFSalt.destroy();\n if (prfW)\n prfW.destroy();\n clean(u2);\n return DK;\n }\n function pbkdf2(hash3, password, salt, opts) {\n const { c: c4, dkLen, DK, PRF, PRFSalt } = pbkdf2Init(hash3, password, salt, opts);\n let prfW;\n const arr = new Uint8Array(4);\n const view = createView(arr);\n const u2 = new Uint8Array(PRF.outputLen);\n for (let ti = 1, pos = 0; pos < dkLen; ti++, pos += PRF.outputLen) {\n const Ti = DK.subarray(pos, pos + PRF.outputLen);\n view.setInt32(0, ti, false);\n (prfW = PRFSalt._cloneInto(prfW)).update(arr).digestInto(u2);\n Ti.set(u2.subarray(0, Ti.length));\n for (let ui = 1; ui < c4; ui++) {\n PRF._cloneInto(prfW).update(u2).digestInto(u2);\n for (let i3 = 0; i3 < Ti.length; i3++)\n Ti[i3] ^= u2[i3];\n }\n }\n return pbkdf2Output(PRF, PRFSalt, DK, prfW, u2);\n }\n var init_pbkdf2 = __esm({\n \"../../../node_modules/.pnpm/@noble+hashes@1.8.0/node_modules/@noble/hashes/esm/pbkdf2.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_hmac();\n init_utils3();\n }\n });\n\n // ../../../node_modules/.pnpm/@scure+bip39@1.6.0/node_modules/@scure/bip39/esm/index.js\n function nfkd(str) {\n if (typeof str !== \"string\")\n throw new TypeError(\"invalid mnemonic type: \" + typeof str);\n return str.normalize(\"NFKD\");\n }\n function normalize(str) {\n const norm = nfkd(str);\n const words = norm.split(\" \");\n if (![12, 15, 18, 21, 24].includes(words.length))\n throw new Error(\"Invalid mnemonic\");\n return { nfkd: norm, words };\n }\n function mnemonicToSeedSync(mnemonic, passphrase = \"\") {\n return pbkdf2(sha512, normalize(mnemonic).nfkd, psalt(passphrase), { c: 2048, dkLen: 64 });\n }\n var psalt;\n var init_esm4 = __esm({\n \"../../../node_modules/.pnpm/@scure+bip39@1.6.0/node_modules/@scure/bip39/esm/index.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_pbkdf2();\n init_sha2();\n psalt = (passphrase) => nfkd(\"mnemonic\" + passphrase);\n }\n });\n\n // ../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/accounts/generatePrivateKey.js\n function generatePrivateKey() {\n return toHex(secp256k1.utils.randomPrivateKey());\n }\n var init_generatePrivateKey = __esm({\n \"../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/accounts/generatePrivateKey.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_secp256k1();\n init_toHex();\n }\n });\n\n // ../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/accounts/toAccount.js\n function toAccount(source) {\n if (typeof source === \"string\") {\n if (!isAddress(source, { strict: false }))\n throw new InvalidAddressError({ address: source });\n return {\n address: source,\n type: \"json-rpc\"\n };\n }\n if (!isAddress(source.address, { strict: false }))\n throw new InvalidAddressError({ address: source.address });\n return {\n address: source.address,\n nonceManager: source.nonceManager,\n sign: source.sign,\n signAuthorization: source.signAuthorization,\n signMessage: source.signMessage,\n signTransaction: source.signTransaction,\n signTypedData: source.signTypedData,\n source: \"custom\",\n type: \"local\"\n };\n }\n var init_toAccount = __esm({\n \"../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/accounts/toAccount.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_address();\n init_isAddress();\n }\n });\n\n // ../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/accounts/utils/sign.js\n async function sign({ hash: hash3, privateKey, to = \"object\" }) {\n const { r: r2, s: s4, recovery } = secp256k1.sign(hash3.slice(2), privateKey.slice(2), {\n lowS: true,\n extraEntropy: isHex(extraEntropy, { strict: false }) ? hexToBytes(extraEntropy) : extraEntropy\n });\n const signature = {\n r: numberToHex(r2, { size: 32 }),\n s: numberToHex(s4, { size: 32 }),\n v: recovery ? 28n : 27n,\n yParity: recovery\n };\n return (() => {\n if (to === \"bytes\" || to === \"hex\")\n return serializeSignature({ ...signature, to });\n return signature;\n })();\n }\n var extraEntropy;\n var init_sign = __esm({\n \"../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/accounts/utils/sign.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_secp256k1();\n init_isHex();\n init_toBytes();\n init_toHex();\n init_serializeSignature();\n extraEntropy = false;\n }\n });\n\n // ../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/accounts/utils/signAuthorization.js\n async function signAuthorization(parameters) {\n const { chainId, nonce, privateKey, to = \"object\" } = parameters;\n const address = parameters.contractAddress ?? parameters.address;\n const signature = await sign({\n hash: hashAuthorization({ address, chainId, nonce }),\n privateKey,\n to\n });\n if (to === \"object\")\n return {\n address,\n chainId,\n nonce,\n ...signature\n };\n return signature;\n }\n var init_signAuthorization = __esm({\n \"../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/accounts/utils/signAuthorization.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_hashAuthorization();\n init_sign();\n }\n });\n\n // ../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/accounts/utils/signMessage.js\n async function signMessage({ message, privateKey }) {\n return await sign({ hash: hashMessage(message), privateKey, to: \"hex\" });\n }\n var init_signMessage = __esm({\n \"../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/accounts/utils/signMessage.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_hashMessage();\n init_sign();\n }\n });\n\n // ../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/accounts/utils/signTransaction.js\n async function signTransaction(parameters) {\n const { privateKey, transaction, serializer = serializeTransaction } = parameters;\n const signableTransaction = (() => {\n if (transaction.type === \"eip4844\")\n return {\n ...transaction,\n sidecars: false\n };\n return transaction;\n })();\n const signature = await sign({\n hash: keccak256(await serializer(signableTransaction)),\n privateKey\n });\n return await serializer(transaction, signature);\n }\n var init_signTransaction = __esm({\n \"../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/accounts/utils/signTransaction.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_keccak256();\n init_serializeTransaction();\n init_sign();\n }\n });\n\n // ../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/accounts/utils/signTypedData.js\n async function signTypedData(parameters) {\n const { privateKey, ...typedData } = parameters;\n return await sign({\n hash: hashTypedData(typedData),\n privateKey,\n to: \"hex\"\n });\n }\n var init_signTypedData = __esm({\n \"../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/accounts/utils/signTypedData.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_hashTypedData();\n init_sign();\n }\n });\n\n // ../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/accounts/privateKeyToAccount.js\n function privateKeyToAccount(privateKey, options = {}) {\n const { nonceManager } = options;\n const publicKey = toHex(secp256k1.getPublicKey(privateKey.slice(2), false));\n const address = publicKeyToAddress(publicKey);\n const account = toAccount({\n address,\n nonceManager,\n async sign({ hash: hash3 }) {\n return sign({ hash: hash3, privateKey, to: \"hex\" });\n },\n async signAuthorization(authorization) {\n return signAuthorization({ ...authorization, privateKey });\n },\n async signMessage({ message }) {\n return signMessage({ message, privateKey });\n },\n async signTransaction(transaction, { serializer } = {}) {\n return signTransaction({ privateKey, transaction, serializer });\n },\n async signTypedData(typedData) {\n return signTypedData({ ...typedData, privateKey });\n }\n });\n return {\n ...account,\n publicKey,\n source: \"privateKey\"\n };\n }\n var init_privateKeyToAccount = __esm({\n \"../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/accounts/privateKeyToAccount.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_secp256k1();\n init_toHex();\n init_toAccount();\n init_publicKeyToAddress();\n init_sign();\n init_signAuthorization();\n init_signMessage();\n init_signTransaction();\n init_signTypedData();\n }\n });\n\n // ../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/accounts/hdKeyToAccount.js\n function hdKeyToAccount(hdKey_, { accountIndex = 0, addressIndex = 0, changeIndex = 0, path, ...options } = {}) {\n const hdKey = hdKey_.derive(path || `m/44'/60'/${accountIndex}'/${changeIndex}/${addressIndex}`);\n const account = privateKeyToAccount(toHex(hdKey.privateKey), options);\n return {\n ...account,\n getHdKey: () => hdKey,\n source: \"hd\"\n };\n }\n var init_hdKeyToAccount = __esm({\n \"../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/accounts/hdKeyToAccount.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_toHex();\n init_privateKeyToAccount();\n }\n });\n\n // ../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/accounts/mnemonicToAccount.js\n function mnemonicToAccount(mnemonic, opts = {}) {\n const seed = mnemonicToSeedSync(mnemonic);\n return hdKeyToAccount(HDKey.fromMasterSeed(seed), opts);\n }\n var init_mnemonicToAccount = __esm({\n \"../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/accounts/mnemonicToAccount.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_esm3();\n init_esm4();\n init_hdKeyToAccount();\n }\n });\n\n // ../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/accounts/index.js\n var init_accounts = __esm({\n \"../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/accounts/index.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_generatePrivateKey();\n init_mnemonicToAccount();\n init_privateKeyToAccount();\n init_toAccount();\n }\n });\n\n // ../../../node_modules/.pnpm/@aa-sdk+core@4.62.0_typescript@5.8.3_viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64_/node_modules/@aa-sdk/core/dist/esm/version.js\n var VERSION;\n var init_version5 = __esm({\n \"../../../node_modules/.pnpm/@aa-sdk+core@4.62.0_typescript@5.8.3_viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64_/node_modules/@aa-sdk/core/dist/esm/version.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n VERSION = \"4.62.0\";\n }\n });\n\n // ../../../node_modules/.pnpm/@aa-sdk+core@4.62.0_typescript@5.8.3_viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64_/node_modules/@aa-sdk/core/dist/esm/errors/base.js\n var BaseError4;\n var init_base2 = __esm({\n \"../../../node_modules/.pnpm/@aa-sdk+core@4.62.0_typescript@5.8.3_viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64_/node_modules/@aa-sdk/core/dist/esm/errors/base.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_esm();\n init_version5();\n BaseError4 = class _BaseError extends BaseError2 {\n constructor(shortMessage, args = {}) {\n super(shortMessage, args);\n Object.defineProperty(this, \"name\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: \"AASDKError\"\n });\n Object.defineProperty(this, \"version\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: VERSION\n });\n const docsPath8 = args.cause instanceof _BaseError ? args.cause.docsPath || args.docsPath : args.docsPath;\n this.message = [\n shortMessage || \"An error occurred.\",\n \"\",\n ...args.metaMessages ? [...args.metaMessages, \"\"] : [],\n ...docsPath8 ? [\n `Docs: https://www.alchemy.com/docs/wallets${docsPath8}${args.docsSlug ? `#${args.docsSlug}` : \"\"}`\n ] : [],\n ...this.details ? [`Details: ${this.details}`] : [],\n `Version: ${this.version}`\n ].join(\"\\n\");\n }\n };\n }\n });\n\n // ../../../node_modules/.pnpm/@aa-sdk+core@4.62.0_typescript@5.8.3_viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64_/node_modules/@aa-sdk/core/dist/esm/errors/client.js\n var IncompatibleClientError, InvalidRpcUrlError, ChainNotFoundError2, InvalidEntityIdError, InvalidNonceKeyError, EntityIdOverrideError, InvalidModularAccountV2Mode, InvalidDeferredActionNonce;\n var init_client = __esm({\n \"../../../node_modules/.pnpm/@aa-sdk+core@4.62.0_typescript@5.8.3_viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64_/node_modules/@aa-sdk/core/dist/esm/errors/client.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_base2();\n IncompatibleClientError = class extends BaseError4 {\n /**\n * Throws an error when the client type does not match the expected client type.\n *\n * @param {string} expectedClient The expected type of the client.\n * @param {string} method The method that was called.\n * @param {Client} client The client instance.\n */\n constructor(expectedClient, method, client) {\n super([\n `Client of type (${client.type}) is not a ${expectedClient}.`,\n `Create one with \\`createSmartAccountClient\\` first before using \\`${method}\\``\n ].join(\"\\n\"));\n Object.defineProperty(this, \"name\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: \"IncompatibleClientError\"\n });\n }\n };\n InvalidRpcUrlError = class extends BaseError4 {\n /**\n * Creates an instance of an error with a message indicating an invalid RPC URL.\n *\n * @param {string} [rpcUrl] The invalid RPC URL that caused the error\n */\n constructor(rpcUrl) {\n super(`Invalid RPC URL ${rpcUrl}`);\n Object.defineProperty(this, \"name\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: \"InvalidRpcUrlError\"\n });\n }\n };\n ChainNotFoundError2 = class extends BaseError4 {\n /**\n * Initializes a new instance of the error message with a default message indicating that no chain was supplied to the client.\n */\n constructor() {\n super(\"No chain supplied to the client\");\n Object.defineProperty(this, \"name\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: \"ChainNotFoundError\"\n });\n }\n };\n InvalidEntityIdError = class extends BaseError4 {\n /**\n * Initializes a new instance of the error message with a default message indicating that the entity id is invalid because it's too large.\n *\n * @param {number} entityId the invalid entityId used\n */\n constructor(entityId) {\n super(`Entity ID used is ${entityId}, but must be less than or equal to uint32.max`);\n Object.defineProperty(this, \"name\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: \"InvalidEntityIdError\"\n });\n }\n };\n InvalidNonceKeyError = class extends BaseError4 {\n /**\n * Initializes a new instance of the error message with a default message indicating that the nonce key is invalid.\n *\n * @param {bigint} nonceKey the invalid nonceKey used\n */\n constructor(nonceKey) {\n super(`Nonce key is ${nonceKey} but has to be less than or equal to 2**152`);\n Object.defineProperty(this, \"name\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: \"InvalidNonceKeyError\"\n });\n }\n };\n EntityIdOverrideError = class extends BaseError4 {\n /**\n * Initializes a new instance of the error message with a default message indicating that the nonce key is invalid.\n */\n constructor() {\n super(`EntityId of 0 is reserved for the owner and cannot be used`);\n Object.defineProperty(this, \"name\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: \"EntityIdOverrideError\"\n });\n }\n };\n InvalidModularAccountV2Mode = class extends BaseError4 {\n /**\n * Initializes a new instance of the error message with a default message indicating that the provided ma v2 account mode is invalid.\n */\n constructor() {\n super(`The provided account mode is invalid for ModularAccount V2`);\n Object.defineProperty(this, \"name\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: \"InvalidModularAccountV2Mode\"\n });\n }\n };\n InvalidDeferredActionNonce = class extends BaseError4 {\n /**\n * Initializes a new instance of the error message with a default message indicating that the provided deferred action nonce is invalid.\n */\n constructor() {\n super(`The provided deferred action nonce is invalid`);\n Object.defineProperty(this, \"name\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: \"InvalidDeferredActionNonce\"\n });\n }\n };\n }\n });\n\n // ../../../node_modules/.pnpm/@aa-sdk+core@4.62.0_typescript@5.8.3_viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64_/node_modules/@aa-sdk/core/dist/esm/utils/stateOverride.js\n function serializeStateMapping2(stateMapping) {\n if (!stateMapping || stateMapping.length === 0)\n return void 0;\n return stateMapping.reduce((acc, { slot, value }) => {\n validateBytes32HexLength(slot);\n validateBytes32HexLength(value);\n acc[slot] = value;\n return acc;\n }, {});\n }\n function validateBytes32HexLength(value) {\n if (value.length !== 66) {\n throw new Error(`Hex is expected to be 66 hex long, but is ${value.length} hex long.`);\n }\n }\n function serializeAccountStateOverride2(parameters) {\n const { balance, nonce, state, stateDiff, code } = parameters;\n const rpcAccountStateOverride = {};\n if (code !== void 0)\n rpcAccountStateOverride.code = code;\n if (balance !== void 0)\n rpcAccountStateOverride.balance = numberToHex(balance);\n if (nonce !== void 0)\n rpcAccountStateOverride.nonce = numberToHex(nonce);\n if (state !== void 0)\n rpcAccountStateOverride.state = serializeStateMapping2(state);\n if (stateDiff !== void 0) {\n if (rpcAccountStateOverride.state)\n throw new StateAssignmentConflictError();\n rpcAccountStateOverride.stateDiff = serializeStateMapping2(stateDiff);\n }\n return rpcAccountStateOverride;\n }\n function serializeStateOverride2(parameters) {\n if (!parameters)\n return void 0;\n const rpcStateOverride = {};\n for (const { address, ...accountState } of parameters) {\n if (!isAddress(address, { strict: false }))\n throw new InvalidAddressError({ address });\n if (rpcStateOverride[address])\n throw new AccountStateConflictError({ address });\n rpcStateOverride[address] = serializeAccountStateOverride2(accountState);\n }\n return rpcStateOverride;\n }\n var init_stateOverride3 = __esm({\n \"../../../node_modules/.pnpm/@aa-sdk+core@4.62.0_typescript@5.8.3_viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64_/node_modules/@aa-sdk/core/dist/esm/utils/stateOverride.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_esm();\n }\n });\n\n // ../../../node_modules/.pnpm/@aa-sdk+core@4.62.0_typescript@5.8.3_viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64_/node_modules/@aa-sdk/core/dist/esm/actions/bundler/estimateUserOperationGas.js\n var estimateUserOperationGas;\n var init_estimateUserOperationGas = __esm({\n \"../../../node_modules/.pnpm/@aa-sdk+core@4.62.0_typescript@5.8.3_viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64_/node_modules/@aa-sdk/core/dist/esm/actions/bundler/estimateUserOperationGas.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_stateOverride3();\n estimateUserOperationGas = async (client, args) => {\n return client.request({\n method: \"eth_estimateUserOperationGas\",\n params: args.stateOverride != null ? [\n args.request,\n args.entryPoint,\n serializeStateOverride2(args.stateOverride)\n ] : [args.request, args.entryPoint]\n });\n };\n }\n });\n\n // ../../../node_modules/.pnpm/@aa-sdk+core@4.62.0_typescript@5.8.3_viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64_/node_modules/@aa-sdk/core/dist/esm/actions/bundler/getSupportedEntryPoints.js\n var getSupportedEntryPoints;\n var init_getSupportedEntryPoints = __esm({\n \"../../../node_modules/.pnpm/@aa-sdk+core@4.62.0_typescript@5.8.3_viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64_/node_modules/@aa-sdk/core/dist/esm/actions/bundler/getSupportedEntryPoints.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n getSupportedEntryPoints = async (client) => {\n return client.request({\n method: \"eth_supportedEntryPoints\",\n params: []\n });\n };\n }\n });\n\n // ../../../node_modules/.pnpm/@aa-sdk+core@4.62.0_typescript@5.8.3_viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64_/node_modules/@aa-sdk/core/dist/esm/actions/bundler/getUserOperationByHash.js\n var getUserOperationByHash;\n var init_getUserOperationByHash = __esm({\n \"../../../node_modules/.pnpm/@aa-sdk+core@4.62.0_typescript@5.8.3_viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64_/node_modules/@aa-sdk/core/dist/esm/actions/bundler/getUserOperationByHash.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n getUserOperationByHash = async (client, args) => {\n return client.request({\n method: \"eth_getUserOperationByHash\",\n params: [args.hash]\n });\n };\n }\n });\n\n // ../../../node_modules/.pnpm/@aa-sdk+core@4.62.0_typescript@5.8.3_viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64_/node_modules/@aa-sdk/core/dist/esm/actions/bundler/getUserOperationReceipt.js\n var getUserOperationReceipt;\n var init_getUserOperationReceipt = __esm({\n \"../../../node_modules/.pnpm/@aa-sdk+core@4.62.0_typescript@5.8.3_viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64_/node_modules/@aa-sdk/core/dist/esm/actions/bundler/getUserOperationReceipt.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n getUserOperationReceipt = async (client, args) => {\n if (args.tag === void 0) {\n return client.request({\n method: \"eth_getUserOperationReceipt\",\n params: [args.hash]\n });\n }\n return client.request({\n method: \"eth_getUserOperationReceipt\",\n params: [args.hash, args.tag]\n });\n };\n }\n });\n\n // ../../../node_modules/.pnpm/@aa-sdk+core@4.62.0_typescript@5.8.3_viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64_/node_modules/@aa-sdk/core/dist/esm/actions/bundler/sendRawUserOperation.js\n var sendRawUserOperation;\n var init_sendRawUserOperation = __esm({\n \"../../../node_modules/.pnpm/@aa-sdk+core@4.62.0_typescript@5.8.3_viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64_/node_modules/@aa-sdk/core/dist/esm/actions/bundler/sendRawUserOperation.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n sendRawUserOperation = async (client, args) => {\n return client.request({\n method: \"eth_sendUserOperation\",\n params: [args.request, args.entryPoint]\n });\n };\n }\n });\n\n // ../../../node_modules/.pnpm/@aa-sdk+core@4.62.0_typescript@5.8.3_viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64_/node_modules/@aa-sdk/core/dist/esm/client/decorators/bundlerClient.js\n var bundlerActions;\n var init_bundlerClient = __esm({\n \"../../../node_modules/.pnpm/@aa-sdk+core@4.62.0_typescript@5.8.3_viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64_/node_modules/@aa-sdk/core/dist/esm/client/decorators/bundlerClient.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_estimateUserOperationGas();\n init_getSupportedEntryPoints();\n init_getUserOperationByHash();\n init_getUserOperationReceipt();\n init_sendRawUserOperation();\n bundlerActions = (client) => ({\n estimateUserOperationGas: async (request, entryPoint, stateOverride) => estimateUserOperationGas(client, { request, entryPoint, stateOverride }),\n sendRawUserOperation: async (request, entryPoint) => sendRawUserOperation(client, { request, entryPoint }),\n getUserOperationByHash: async (hash3) => getUserOperationByHash(client, { hash: hash3 }),\n getSupportedEntryPoints: async () => getSupportedEntryPoints(client),\n getUserOperationReceipt: async (hash3, tag) => getUserOperationReceipt(client, {\n hash: hash3,\n tag\n })\n });\n }\n });\n\n // ../../../node_modules/.pnpm/@aa-sdk+core@4.62.0_typescript@5.8.3_viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64_/node_modules/@aa-sdk/core/dist/esm/client/bundlerClient.js\n function createBundlerClient(args) {\n if (!args.chain) {\n throw new ChainNotFoundError2();\n }\n const { key = \"bundler-public\", name = \"Public Bundler Client\", type = \"bundlerClient\" } = args;\n const { transport, ...opts } = args;\n const resolvedTransport = transport({\n chain: args.chain,\n pollingInterval: opts.pollingInterval\n });\n const baseParameters = {\n ...args,\n key,\n name,\n type\n };\n const client = (() => {\n if (resolvedTransport.config.type === \"http\") {\n const { url, fetchOptions: fetchOptions_ } = resolvedTransport.value;\n const fetchOptions = fetchOptions_ ?? {};\n if (url.toLowerCase().indexOf(\"alchemy\") > -1) {\n fetchOptions.headers = {\n ...fetchOptions.headers,\n \"Alchemy-AA-Sdk-Version\": VERSION\n };\n }\n return createClient({\n ...baseParameters,\n transport: http(url, {\n ...resolvedTransport.config,\n fetchOptions\n })\n });\n }\n return createClient(baseParameters);\n })();\n return client.extend(publicActions).extend(bundlerActions);\n }\n var init_bundlerClient2 = __esm({\n \"../../../node_modules/.pnpm/@aa-sdk+core@4.62.0_typescript@5.8.3_viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64_/node_modules/@aa-sdk/core/dist/esm/client/bundlerClient.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_esm();\n init_client();\n init_version5();\n init_bundlerClient();\n }\n });\n\n // ../../../node_modules/.pnpm/@aa-sdk+core@4.62.0_typescript@5.8.3_viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64_/node_modules/@aa-sdk/core/dist/esm/errors/account.js\n var AccountNotFoundError2, GetCounterFactualAddressError, UpgradesNotSupportedError, SignTransactionNotSupportedError, FailedToGetStorageSlotError, BatchExecutionNotSupportedError, SmartAccountWithSignerRequiredError;\n var init_account2 = __esm({\n \"../../../node_modules/.pnpm/@aa-sdk+core@4.62.0_typescript@5.8.3_viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64_/node_modules/@aa-sdk/core/dist/esm/errors/account.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_base2();\n AccountNotFoundError2 = class extends BaseError4 {\n // TODO: extend this further using docs path as well\n /**\n * Constructor for initializing an error message indicating that an account could not be found to execute the specified action.\n */\n constructor() {\n super(\"Could not find an Account to execute with this Action.\");\n Object.defineProperty(this, \"name\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: \"AccountNotFoundError\"\n });\n }\n };\n GetCounterFactualAddressError = class extends BaseError4 {\n /**\n * Constructor for initializing an error message indicating the failure of fetching the counter-factual address.\n */\n constructor() {\n super(\"getCounterFactualAddress failed\");\n Object.defineProperty(this, \"name\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: \"GetCounterFactualAddressError\"\n });\n }\n };\n UpgradesNotSupportedError = class extends BaseError4 {\n /**\n * Error constructor for indicating that upgrades are not supported by the given account type.\n *\n * @param {string} accountType The type of account that does not support upgrades\n */\n constructor(accountType) {\n super(`Upgrades are not supported by ${accountType}`);\n Object.defineProperty(this, \"name\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: \"UpgradesNotSupported\"\n });\n }\n };\n SignTransactionNotSupportedError = class extends BaseError4 {\n /**\n * Throws an error indicating that signing a transaction is not supported by smart contracts.\n *\n \n */\n constructor() {\n super(`SignTransaction is not supported by smart contracts`);\n Object.defineProperty(this, \"name\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: \"SignTransactionNotSupported\"\n });\n }\n };\n FailedToGetStorageSlotError = class extends BaseError4 {\n /**\n * Custom error message constructor for failing to get a specific storage slot.\n *\n * @param {string} slot The storage slot that failed to be accessed or retrieved\n * @param {string} slotDescriptor A description of the storage slot, for additional context in the error message\n */\n constructor(slot, slotDescriptor) {\n super(`Failed to get storage slot ${slot} (${slotDescriptor})`);\n Object.defineProperty(this, \"name\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: \"FailedToGetStorageSlotError\"\n });\n }\n };\n BatchExecutionNotSupportedError = class extends BaseError4 {\n /**\n * Constructs an error message indicating that batch execution is not supported by the specified account type.\n *\n * @param {string} accountType the type of account that does not support batch execution\n */\n constructor(accountType) {\n super(`Batch execution is not supported by ${accountType}`);\n Object.defineProperty(this, \"name\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: \"BatchExecutionNotSupportedError\"\n });\n }\n };\n SmartAccountWithSignerRequiredError = class extends BaseError4 {\n /**\n * Initializes a new instance of the error class with a predefined error message indicating that a smart account requires a signer.\n */\n constructor() {\n super(\"Smart account requires a signer\");\n Object.defineProperty(this, \"name\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: \"SmartAccountWithSignerRequiredError\"\n });\n }\n };\n }\n });\n\n // ../../../node_modules/.pnpm/@aa-sdk+core@4.62.0_typescript@5.8.3_viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64_/node_modules/@aa-sdk/core/dist/esm/errors/entrypoint.js\n var EntryPointNotFoundError, InvalidEntryPointError;\n var init_entrypoint = __esm({\n \"../../../node_modules/.pnpm/@aa-sdk+core@4.62.0_typescript@5.8.3_viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64_/node_modules/@aa-sdk/core/dist/esm/errors/entrypoint.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_base2();\n EntryPointNotFoundError = class extends BaseError4 {\n /**\n * Constructs an error message indicating that no default entry point exists for the given chain and entry point version.\n *\n * @param {Chain} chain The blockchain network for which the entry point is being queried\n * @param {any} entryPointVersion The version of the entry point for which no default exists\n */\n constructor(chain2, entryPointVersion) {\n super([\n `No default entry point v${entryPointVersion} exists for ${chain2.name}.`,\n `Supply an override.`\n ].join(\"\\n\"));\n Object.defineProperty(this, \"name\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: \"EntryPointNotFoundError\"\n });\n }\n };\n InvalidEntryPointError = class extends BaseError4 {\n /**\n * Constructs an error indicating an invalid entry point version for a specific chain.\n *\n * @param {Chain} chain The chain object containing information about the blockchain\n * @param {any} entryPointVersion The entry point version that is invalid\n */\n constructor(chain2, entryPointVersion) {\n super(`Invalid entry point: unexpected version ${entryPointVersion} for ${chain2.name}.`);\n Object.defineProperty(this, \"name\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: \"InvalidEntryPointError\"\n });\n }\n };\n }\n });\n\n // ../../../node_modules/.pnpm/@aa-sdk+core@4.62.0_typescript@5.8.3_viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64_/node_modules/@aa-sdk/core/dist/esm/logger.js\n var LogLevel, Logger;\n var init_logger = __esm({\n \"../../../node_modules/.pnpm/@aa-sdk+core@4.62.0_typescript@5.8.3_viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64_/node_modules/@aa-sdk/core/dist/esm/logger.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n (function(LogLevel2) {\n LogLevel2[LogLevel2[\"VERBOSE\"] = 5] = \"VERBOSE\";\n LogLevel2[LogLevel2[\"DEBUG\"] = 4] = \"DEBUG\";\n LogLevel2[LogLevel2[\"INFO\"] = 3] = \"INFO\";\n LogLevel2[LogLevel2[\"WARN\"] = 2] = \"WARN\";\n LogLevel2[LogLevel2[\"ERROR\"] = 1] = \"ERROR\";\n LogLevel2[LogLevel2[\"NONE\"] = 0] = \"NONE\";\n })(LogLevel || (LogLevel = {}));\n Logger = class {\n /**\n * Sets the log level for logging purposes.\n *\n * @example\n * ```ts\n * import { Logger, LogLevel } from \"@aa-sdk/core\";\n * Logger.setLogLevel(LogLevel.DEBUG);\n * ```\n *\n * @param {LogLevel} logLevel The desired log level\n */\n static setLogLevel(logLevel) {\n this.logLevel = logLevel;\n }\n /**\n * Sets the log filter pattern.\n *\n * @example\n * ```ts\n * import { Logger } from \"@aa-sdk/core\";\n *\n * Logger.setLogFilter(\"error\");\n * ```\n *\n * @param {string} pattern The pattern to set as the log filter\n */\n static setLogFilter(pattern) {\n this.logFilter = pattern;\n }\n /**\n * Logs an error message to the console if the logging condition is met.\n *\n * @example\n * ```ts\n * import { Logger } from \"@aa-sdk/core\";\n *\n * Logger.error(\"An error occurred while processing the request\");\n * ```\n *\n * @param {string} msg The primary error message to be logged\n * @param {...any[]} args Additional arguments to be logged along with the error message\n */\n static error(msg, ...args) {\n if (!this.shouldLog(msg, LogLevel.ERROR))\n return;\n console.error(msg, ...args);\n }\n /**\n * Logs a warning message if the logging conditions are met.\n *\n * @example\n * ```ts\n * import { Logger } from \"@aa-sdk/core\";\n *\n * Logger.warn(\"Careful...\");\n * ```\n *\n * @param {string} msg The message to log as a warning\n * @param {...any[]} args Additional parameters to log along with the message\n */\n static warn(msg, ...args) {\n if (!this.shouldLog(msg, LogLevel.WARN))\n return;\n console.warn(msg, ...args);\n }\n /**\n * Logs a debug message to the console if the log level allows it.\n *\n * @example\n * ```ts\n * import { Logger } from \"@aa-sdk/core\";\n *\n * Logger.debug(\"Something is happening\");\n * ```\n *\n * @param {string} msg The message to log\n * @param {...any[]} args Additional arguments to pass to the console.debug method\n */\n static debug(msg, ...args) {\n if (!this.shouldLog(msg, LogLevel.DEBUG))\n return;\n console.debug(msg, ...args);\n }\n /**\n * Logs an informational message to the console if the logging level is set to INFO.\n *\n * @example\n * ```ts\n * import { Logger } from \"@aa-sdk/core\";\n *\n * Logger.info(\"Something is happening\");\n * ```\n *\n * @param {string} msg the message to log\n * @param {...any[]} args additional arguments to log alongside the message\n */\n static info(msg, ...args) {\n if (!this.shouldLog(msg, LogLevel.INFO))\n return;\n console.info(msg, ...args);\n }\n /**\n * Logs a message with additional arguments if the logging level permits it.\n *\n * @example\n * ```ts\n * import { Logger } from \"@aa-sdk/core\";\n *\n * Logger.verbose(\"Something is happening\");\n * ```\n *\n * @param {string} msg The message to log\n * @param {...any[]} args Additional arguments to be logged\n */\n static verbose(msg, ...args) {\n if (!this.shouldLog(msg, LogLevel.VERBOSE))\n return;\n console.log(msg, ...args);\n }\n static shouldLog(msg, level) {\n if (this.logLevel < level)\n return false;\n if (this.logFilter && !msg.includes(this.logFilter))\n return false;\n return true;\n }\n };\n Object.defineProperty(Logger, \"logLevel\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: LogLevel.INFO\n });\n }\n });\n\n // ../../../node_modules/.pnpm/@aa-sdk+core@4.62.0_typescript@5.8.3_viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64_/node_modules/@aa-sdk/core/dist/esm/signer/utils.js\n var wrapSignatureWith6492;\n var init_utils9 = __esm({\n \"../../../node_modules/.pnpm/@aa-sdk+core@4.62.0_typescript@5.8.3_viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64_/node_modules/@aa-sdk/core/dist/esm/signer/utils.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_esm();\n wrapSignatureWith6492 = ({ factoryAddress, factoryCalldata, signature }) => {\n return concat([\n encodeAbiParameters(parseAbiParameters(\"address, bytes, bytes\"), [\n factoryAddress,\n factoryCalldata,\n signature\n ]),\n \"0x6492649264926492649264926492649264926492649264926492649264926492\"\n ]);\n };\n }\n });\n\n // ../../../node_modules/.pnpm/@aa-sdk+core@4.62.0_typescript@5.8.3_viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64_/node_modules/@aa-sdk/core/dist/esm/account/smartContractAccount.js\n async function toSmartContractAccount(params) {\n const { transport, chain: chain2, entryPoint, source, accountAddress, getAccountInitCode, signMessage: signMessage3, signTypedData: signTypedData4, encodeExecute, encodeBatchExecute, getNonce, getDummySignature, signUserOperationHash, encodeUpgradeToAndCall, getImplementationAddress, prepareSign: prepareSign_, formatSign: formatSign_ } = params;\n const client = createBundlerClient({\n // we set the retry count to 0 so that viem doesn't retry during\n // getting the address. That call always reverts and without this\n // viem will retry 3 times, making this call very slow\n transport: (opts) => transport({ ...opts, chain: chain2, retryCount: 0 }),\n chain: chain2\n });\n const entryPointContract = getContract({\n address: entryPoint.address,\n abi: entryPoint.abi,\n client\n });\n const accountAddress_ = await getAccountAddress({\n client,\n entryPoint,\n accountAddress,\n getAccountInitCode\n });\n let deploymentState = DeploymentState.UNDEFINED;\n const getInitCode = async () => {\n if (deploymentState === DeploymentState.DEPLOYED) {\n return \"0x\";\n }\n const contractCode = await client.getCode({\n address: accountAddress_\n });\n if ((contractCode?.length ?? 0) > 2) {\n deploymentState = DeploymentState.DEPLOYED;\n return \"0x\";\n } else {\n deploymentState = DeploymentState.NOT_DEPLOYED;\n }\n return getAccountInitCode();\n };\n const signUserOperationHash_ = signUserOperationHash ?? (async (uoHash) => {\n return signMessage3({ message: { raw: hexToBytes(uoHash) } });\n });\n const getFactoryAddress = async () => parseFactoryAddressFromAccountInitCode(await getAccountInitCode())[0];\n const getFactoryData = async () => parseFactoryAddressFromAccountInitCode(await getAccountInitCode())[1];\n const encodeUpgradeToAndCall_ = encodeUpgradeToAndCall ?? (() => {\n throw new UpgradesNotSupportedError(source);\n });\n const isAccountDeployed = async () => {\n const initCode = await getInitCode();\n return initCode === \"0x\";\n };\n const getNonce_ = getNonce ?? (async (nonceKey = 0n) => {\n return entryPointContract.read.getNonce([\n accountAddress_,\n nonceKey\n ]);\n });\n const account = toAccount({\n address: accountAddress_,\n signMessage: signMessage3,\n signTypedData: signTypedData4,\n signTransaction: () => {\n throw new SignTransactionNotSupportedError();\n }\n });\n const create6492Signature = async (isDeployed, signature) => {\n if (isDeployed) {\n return signature;\n }\n const [factoryAddress, factoryCalldata] = parseFactoryAddressFromAccountInitCode(await getAccountInitCode());\n return wrapSignatureWith6492({\n factoryAddress,\n factoryCalldata,\n signature\n });\n };\n const signMessageWith6492 = async (message) => {\n const [isDeployed, signature] = await Promise.all([\n isAccountDeployed(),\n account.signMessage(message)\n ]);\n return create6492Signature(isDeployed, signature);\n };\n const signTypedDataWith6492 = async (typedDataDefinition) => {\n const [isDeployed, signature] = await Promise.all([\n isAccountDeployed(),\n account.signTypedData(typedDataDefinition)\n ]);\n return create6492Signature(isDeployed, signature);\n };\n const getImplementationAddress_ = getImplementationAddress ?? (async () => {\n const storage = await client.getStorageAt({\n address: account.address,\n // This is the default slot for the implementation address for Proxies\n slot: \"0x360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc\"\n });\n if (storage == null) {\n throw new FailedToGetStorageSlotError(\"0x360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc\", \"Proxy Implementation Address\");\n }\n return `0x${storage.slice(26)}`;\n });\n if (entryPoint.version !== \"0.6.0\" && entryPoint.version !== \"0.7.0\") {\n throw new InvalidEntryPointError(chain2, entryPoint.version);\n }\n if (prepareSign_ && !formatSign_ || !prepareSign_ && formatSign_) {\n throw new Error(\"Must implement both prepareSign and formatSign or neither\");\n }\n const prepareSign = prepareSign_ ?? (() => {\n throw new Error(\"prepareSign not implemented\");\n });\n const formatSign = formatSign_ ?? (() => {\n throw new Error(\"formatSign not implemented\");\n });\n return {\n ...account,\n source,\n // TODO: I think this should probably be signUserOperation instead\n // and allow for generating the UO hash based on the EP version\n signUserOperationHash: signUserOperationHash_,\n getFactoryAddress,\n getFactoryData,\n encodeBatchExecute: encodeBatchExecute ?? (() => {\n throw new BatchExecutionNotSupportedError(source);\n }),\n encodeExecute,\n getDummySignature,\n getInitCode,\n encodeUpgradeToAndCall: encodeUpgradeToAndCall_,\n getEntryPoint: () => entryPoint,\n isAccountDeployed,\n getAccountNonce: getNonce_,\n signMessageWith6492,\n signTypedDataWith6492,\n getImplementationAddress: getImplementationAddress_,\n prepareSign,\n formatSign\n };\n }\n var DeploymentState, isSmartAccountWithSigner, parseFactoryAddressFromAccountInitCode, getAccountAddress;\n var init_smartContractAccount = __esm({\n \"../../../node_modules/.pnpm/@aa-sdk+core@4.62.0_typescript@5.8.3_viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64_/node_modules/@aa-sdk/core/dist/esm/account/smartContractAccount.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_esm();\n init_accounts();\n init_bundlerClient2();\n init_account2();\n init_client();\n init_entrypoint();\n init_logger();\n init_utils9();\n (function(DeploymentState2) {\n DeploymentState2[\"UNDEFINED\"] = \"0x0\";\n DeploymentState2[\"NOT_DEPLOYED\"] = \"0x1\";\n DeploymentState2[\"DEPLOYED\"] = \"0x2\";\n })(DeploymentState || (DeploymentState = {}));\n isSmartAccountWithSigner = (account) => {\n return \"getSigner\" in account;\n };\n parseFactoryAddressFromAccountInitCode = (initCode) => {\n const factoryAddress = `0x${initCode.substring(2, 42)}`;\n const factoryCalldata = `0x${initCode.substring(42)}`;\n return [factoryAddress, factoryCalldata];\n };\n getAccountAddress = async ({ client, entryPoint, accountAddress, getAccountInitCode }) => {\n if (accountAddress)\n return accountAddress;\n const entryPointContract = getContract({\n address: entryPoint.address,\n abi: entryPoint.abi,\n client\n });\n const initCode = await getAccountInitCode();\n Logger.verbose(\"[BaseSmartContractAccount](getAddress) initCode: \", initCode);\n try {\n await entryPointContract.simulate.getSenderAddress([initCode]);\n } catch (err) {\n Logger.verbose(\"[BaseSmartContractAccount](getAddress) getSenderAddress err: \", err);\n if (err.cause?.data?.errorName === \"SenderAddressResult\") {\n Logger.verbose(\"[BaseSmartContractAccount](getAddress) entryPoint.getSenderAddress result:\", err.cause.data.args[0]);\n return err.cause.data.args[0];\n }\n if (err.details === \"Invalid URL\") {\n throw new InvalidRpcUrlError();\n }\n }\n throw new GetCounterFactualAddressError();\n };\n }\n });\n\n // ../../../node_modules/.pnpm/@aa-sdk+core@4.62.0_typescript@5.8.3_viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64_/node_modules/@aa-sdk/core/dist/esm/errors/transaction.js\n var TransactionMissingToParamError, FailedToFindTransactionError;\n var init_transaction3 = __esm({\n \"../../../node_modules/.pnpm/@aa-sdk+core@4.62.0_typescript@5.8.3_viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64_/node_modules/@aa-sdk/core/dist/esm/errors/transaction.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_base2();\n TransactionMissingToParamError = class extends BaseError4 {\n /**\n * Throws an error indicating that a transaction is missing the `to` address in the request.\n */\n constructor() {\n super(\"Transaction is missing `to` address set on request\");\n Object.defineProperty(this, \"name\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: \"TransactionMissingToParamError\"\n });\n }\n };\n FailedToFindTransactionError = class extends BaseError4 {\n /**\n * Constructs a new error message indicating a failure to find the transaction for the specified user operation hash.\n *\n * @param {Hex} hash The hexadecimal value representing the user operation hash.\n */\n constructor(hash3) {\n super(`Failed to find transaction for user operation ${hash3}`);\n Object.defineProperty(this, \"name\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: \"FailedToFindTransactionError\"\n });\n }\n };\n }\n });\n\n // ../../../node_modules/.pnpm/@aa-sdk+core@4.62.0_typescript@5.8.3_viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64_/node_modules/@aa-sdk/core/dist/esm/actions/smartAccount/buildUserOperationFromTx.js\n async function buildUserOperationFromTx(client_, args, overrides, context2) {\n const client = clientHeaderTrack(client_, \"buildUserOperationFromTx\");\n const { account = client.account, ...request } = args;\n if (!account || typeof account === \"string\") {\n throw new AccountNotFoundError2();\n }\n if (!request.to) {\n throw new TransactionMissingToParamError();\n }\n if (!isBaseSmartAccountClient(client)) {\n throw new IncompatibleClientError(\"BaseSmartAccountClient\", \"buildUserOperationFromTx\", client);\n }\n const _overrides = {\n ...overrides,\n maxFeePerGas: request.maxFeePerGas ? request.maxFeePerGas : void 0,\n maxPriorityFeePerGas: request.maxPriorityFeePerGas ? request.maxPriorityFeePerGas : void 0\n };\n return buildUserOperation(client, {\n uo: {\n target: request.to,\n data: request.data ?? \"0x\",\n value: request.value ? request.value : 0n\n },\n account,\n context: context2,\n overrides: _overrides\n });\n }\n var init_buildUserOperationFromTx = __esm({\n \"../../../node_modules/.pnpm/@aa-sdk+core@4.62.0_typescript@5.8.3_viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64_/node_modules/@aa-sdk/core/dist/esm/actions/smartAccount/buildUserOperationFromTx.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_isSmartAccountClient();\n init_account2();\n init_client();\n init_transaction3();\n init_buildUserOperation();\n init_esm6();\n }\n });\n\n // ../../../node_modules/.pnpm/zod@3.25.64/node_modules/zod/dist/esm/v3/helpers/util.js\n var util, objectUtil, ZodParsedType, getParsedType;\n var init_util = __esm({\n \"../../../node_modules/.pnpm/zod@3.25.64/node_modules/zod/dist/esm/v3/helpers/util.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n (function(util2) {\n util2.assertEqual = (_2) => {\n };\n function assertIs(_arg) {\n }\n util2.assertIs = assertIs;\n function assertNever2(_x) {\n throw new Error();\n }\n util2.assertNever = assertNever2;\n util2.arrayToEnum = (items) => {\n const obj = {};\n for (const item of items) {\n obj[item] = item;\n }\n return obj;\n };\n util2.getValidEnumValues = (obj) => {\n const validKeys = util2.objectKeys(obj).filter((k4) => typeof obj[obj[k4]] !== \"number\");\n const filtered = {};\n for (const k4 of validKeys) {\n filtered[k4] = obj[k4];\n }\n return util2.objectValues(filtered);\n };\n util2.objectValues = (obj) => {\n return util2.objectKeys(obj).map(function(e3) {\n return obj[e3];\n });\n };\n util2.objectKeys = typeof Object.keys === \"function\" ? (obj) => Object.keys(obj) : (object2) => {\n const keys = [];\n for (const key in object2) {\n if (Object.prototype.hasOwnProperty.call(object2, key)) {\n keys.push(key);\n }\n }\n return keys;\n };\n util2.find = (arr, checker) => {\n for (const item of arr) {\n if (checker(item))\n return item;\n }\n return void 0;\n };\n util2.isInteger = typeof Number.isInteger === \"function\" ? (val) => Number.isInteger(val) : (val) => typeof val === \"number\" && Number.isFinite(val) && Math.floor(val) === val;\n function joinValues(array2, separator = \" | \") {\n return array2.map((val) => typeof val === \"string\" ? `'${val}'` : val).join(separator);\n }\n util2.joinValues = joinValues;\n util2.jsonStringifyReplacer = (_2, value) => {\n if (typeof value === \"bigint\") {\n return value.toString();\n }\n return value;\n };\n })(util || (util = {}));\n (function(objectUtil2) {\n objectUtil2.mergeShapes = (first, second) => {\n return {\n ...first,\n ...second\n // second overwrites first\n };\n };\n })(objectUtil || (objectUtil = {}));\n ZodParsedType = util.arrayToEnum([\n \"string\",\n \"nan\",\n \"number\",\n \"integer\",\n \"float\",\n \"boolean\",\n \"date\",\n \"bigint\",\n \"symbol\",\n \"function\",\n \"undefined\",\n \"null\",\n \"array\",\n \"object\",\n \"unknown\",\n \"promise\",\n \"void\",\n \"never\",\n \"map\",\n \"set\"\n ]);\n getParsedType = (data) => {\n const t3 = typeof data;\n switch (t3) {\n case \"undefined\":\n return ZodParsedType.undefined;\n case \"string\":\n return ZodParsedType.string;\n case \"number\":\n return Number.isNaN(data) ? ZodParsedType.nan : ZodParsedType.number;\n case \"boolean\":\n return ZodParsedType.boolean;\n case \"function\":\n return ZodParsedType.function;\n case \"bigint\":\n return ZodParsedType.bigint;\n case \"symbol\":\n return ZodParsedType.symbol;\n case \"object\":\n if (Array.isArray(data)) {\n return ZodParsedType.array;\n }\n if (data === null) {\n return ZodParsedType.null;\n }\n if (data.then && typeof data.then === \"function\" && data.catch && typeof data.catch === \"function\") {\n return ZodParsedType.promise;\n }\n if (typeof Map !== \"undefined\" && data instanceof Map) {\n return ZodParsedType.map;\n }\n if (typeof Set !== \"undefined\" && data instanceof Set) {\n return ZodParsedType.set;\n }\n if (typeof Date !== \"undefined\" && data instanceof Date) {\n return ZodParsedType.date;\n }\n return ZodParsedType.object;\n default:\n return ZodParsedType.unknown;\n }\n };\n }\n });\n\n // ../../../node_modules/.pnpm/zod@3.25.64/node_modules/zod/dist/esm/v3/ZodError.js\n var ZodIssueCode, quotelessJson, ZodError;\n var init_ZodError = __esm({\n \"../../../node_modules/.pnpm/zod@3.25.64/node_modules/zod/dist/esm/v3/ZodError.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_util();\n ZodIssueCode = util.arrayToEnum([\n \"invalid_type\",\n \"invalid_literal\",\n \"custom\",\n \"invalid_union\",\n \"invalid_union_discriminator\",\n \"invalid_enum_value\",\n \"unrecognized_keys\",\n \"invalid_arguments\",\n \"invalid_return_type\",\n \"invalid_date\",\n \"invalid_string\",\n \"too_small\",\n \"too_big\",\n \"invalid_intersection_types\",\n \"not_multiple_of\",\n \"not_finite\"\n ]);\n quotelessJson = (obj) => {\n const json = JSON.stringify(obj, null, 2);\n return json.replace(/\"([^\"]+)\":/g, \"$1:\");\n };\n ZodError = class _ZodError extends Error {\n get errors() {\n return this.issues;\n }\n constructor(issues) {\n super();\n this.issues = [];\n this.addIssue = (sub) => {\n this.issues = [...this.issues, sub];\n };\n this.addIssues = (subs = []) => {\n this.issues = [...this.issues, ...subs];\n };\n const actualProto = new.target.prototype;\n if (Object.setPrototypeOf) {\n Object.setPrototypeOf(this, actualProto);\n } else {\n this.__proto__ = actualProto;\n }\n this.name = \"ZodError\";\n this.issues = issues;\n }\n format(_mapper) {\n const mapper = _mapper || function(issue) {\n return issue.message;\n };\n const fieldErrors = { _errors: [] };\n const processError = (error) => {\n for (const issue of error.issues) {\n if (issue.code === \"invalid_union\") {\n issue.unionErrors.map(processError);\n } else if (issue.code === \"invalid_return_type\") {\n processError(issue.returnTypeError);\n } else if (issue.code === \"invalid_arguments\") {\n processError(issue.argumentsError);\n } else if (issue.path.length === 0) {\n fieldErrors._errors.push(mapper(issue));\n } else {\n let curr = fieldErrors;\n let i3 = 0;\n while (i3 < issue.path.length) {\n const el = issue.path[i3];\n const terminal = i3 === issue.path.length - 1;\n if (!terminal) {\n curr[el] = curr[el] || { _errors: [] };\n } else {\n curr[el] = curr[el] || { _errors: [] };\n curr[el]._errors.push(mapper(issue));\n }\n curr = curr[el];\n i3++;\n }\n }\n }\n };\n processError(this);\n return fieldErrors;\n }\n static assert(value) {\n if (!(value instanceof _ZodError)) {\n throw new Error(`Not a ZodError: ${value}`);\n }\n }\n toString() {\n return this.message;\n }\n get message() {\n return JSON.stringify(this.issues, util.jsonStringifyReplacer, 2);\n }\n get isEmpty() {\n return this.issues.length === 0;\n }\n flatten(mapper = (issue) => issue.message) {\n const fieldErrors = {};\n const formErrors = [];\n for (const sub of this.issues) {\n if (sub.path.length > 0) {\n fieldErrors[sub.path[0]] = fieldErrors[sub.path[0]] || [];\n fieldErrors[sub.path[0]].push(mapper(sub));\n } else {\n formErrors.push(mapper(sub));\n }\n }\n return { formErrors, fieldErrors };\n }\n get formErrors() {\n return this.flatten();\n }\n };\n ZodError.create = (issues) => {\n const error = new ZodError(issues);\n return error;\n };\n }\n });\n\n // ../../../node_modules/.pnpm/zod@3.25.64/node_modules/zod/dist/esm/v3/locales/en.js\n var errorMap, en_default;\n var init_en = __esm({\n \"../../../node_modules/.pnpm/zod@3.25.64/node_modules/zod/dist/esm/v3/locales/en.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_ZodError();\n init_util();\n errorMap = (issue, _ctx) => {\n let message;\n switch (issue.code) {\n case ZodIssueCode.invalid_type:\n if (issue.received === ZodParsedType.undefined) {\n message = \"Required\";\n } else {\n message = `Expected ${issue.expected}, received ${issue.received}`;\n }\n break;\n case ZodIssueCode.invalid_literal:\n message = `Invalid literal value, expected ${JSON.stringify(issue.expected, util.jsonStringifyReplacer)}`;\n break;\n case ZodIssueCode.unrecognized_keys:\n message = `Unrecognized key(s) in object: ${util.joinValues(issue.keys, \", \")}`;\n break;\n case ZodIssueCode.invalid_union:\n message = `Invalid input`;\n break;\n case ZodIssueCode.invalid_union_discriminator:\n message = `Invalid discriminator value. Expected ${util.joinValues(issue.options)}`;\n break;\n case ZodIssueCode.invalid_enum_value:\n message = `Invalid enum value. Expected ${util.joinValues(issue.options)}, received '${issue.received}'`;\n break;\n case ZodIssueCode.invalid_arguments:\n message = `Invalid function arguments`;\n break;\n case ZodIssueCode.invalid_return_type:\n message = `Invalid function return type`;\n break;\n case ZodIssueCode.invalid_date:\n message = `Invalid date`;\n break;\n case ZodIssueCode.invalid_string:\n if (typeof issue.validation === \"object\") {\n if (\"includes\" in issue.validation) {\n message = `Invalid input: must include \"${issue.validation.includes}\"`;\n if (typeof issue.validation.position === \"number\") {\n message = `${message} at one or more positions greater than or equal to ${issue.validation.position}`;\n }\n } else if (\"startsWith\" in issue.validation) {\n message = `Invalid input: must start with \"${issue.validation.startsWith}\"`;\n } else if (\"endsWith\" in issue.validation) {\n message = `Invalid input: must end with \"${issue.validation.endsWith}\"`;\n } else {\n util.assertNever(issue.validation);\n }\n } else if (issue.validation !== \"regex\") {\n message = `Invalid ${issue.validation}`;\n } else {\n message = \"Invalid\";\n }\n break;\n case ZodIssueCode.too_small:\n if (issue.type === \"array\")\n message = `Array must contain ${issue.exact ? \"exactly\" : issue.inclusive ? `at least` : `more than`} ${issue.minimum} element(s)`;\n else if (issue.type === \"string\")\n message = `String must contain ${issue.exact ? \"exactly\" : issue.inclusive ? `at least` : `over`} ${issue.minimum} character(s)`;\n else if (issue.type === \"number\")\n message = `Number must be ${issue.exact ? `exactly equal to ` : issue.inclusive ? `greater than or equal to ` : `greater than `}${issue.minimum}`;\n else if (issue.type === \"date\")\n message = `Date must be ${issue.exact ? `exactly equal to ` : issue.inclusive ? `greater than or equal to ` : `greater than `}${new Date(Number(issue.minimum))}`;\n else\n message = \"Invalid input\";\n break;\n case ZodIssueCode.too_big:\n if (issue.type === \"array\")\n message = `Array must contain ${issue.exact ? `exactly` : issue.inclusive ? `at most` : `less than`} ${issue.maximum} element(s)`;\n else if (issue.type === \"string\")\n message = `String must contain ${issue.exact ? `exactly` : issue.inclusive ? `at most` : `under`} ${issue.maximum} character(s)`;\n else if (issue.type === \"number\")\n message = `Number must be ${issue.exact ? `exactly` : issue.inclusive ? `less than or equal to` : `less than`} ${issue.maximum}`;\n else if (issue.type === \"bigint\")\n message = `BigInt must be ${issue.exact ? `exactly` : issue.inclusive ? `less than or equal to` : `less than`} ${issue.maximum}`;\n else if (issue.type === \"date\")\n message = `Date must be ${issue.exact ? `exactly` : issue.inclusive ? `smaller than or equal to` : `smaller than`} ${new Date(Number(issue.maximum))}`;\n else\n message = \"Invalid input\";\n break;\n case ZodIssueCode.custom:\n message = `Invalid input`;\n break;\n case ZodIssueCode.invalid_intersection_types:\n message = `Intersection results could not be merged`;\n break;\n case ZodIssueCode.not_multiple_of:\n message = `Number must be a multiple of ${issue.multipleOf}`;\n break;\n case ZodIssueCode.not_finite:\n message = \"Number must be finite\";\n break;\n default:\n message = _ctx.defaultError;\n util.assertNever(issue);\n }\n return { message };\n };\n en_default = errorMap;\n }\n });\n\n // ../../../node_modules/.pnpm/zod@3.25.64/node_modules/zod/dist/esm/v3/errors.js\n function setErrorMap(map) {\n overrideErrorMap = map;\n }\n function getErrorMap() {\n return overrideErrorMap;\n }\n var overrideErrorMap;\n var init_errors5 = __esm({\n \"../../../node_modules/.pnpm/zod@3.25.64/node_modules/zod/dist/esm/v3/errors.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_en();\n overrideErrorMap = en_default;\n }\n });\n\n // ../../../node_modules/.pnpm/zod@3.25.64/node_modules/zod/dist/esm/v3/helpers/parseUtil.js\n function addIssueToContext(ctx, issueData) {\n const overrideMap = getErrorMap();\n const issue = makeIssue({\n issueData,\n data: ctx.data,\n path: ctx.path,\n errorMaps: [\n ctx.common.contextualErrorMap,\n // contextual error map is first priority\n ctx.schemaErrorMap,\n // then schema-bound map if available\n overrideMap,\n // then global override map\n overrideMap === en_default ? void 0 : en_default\n // then global default map\n ].filter((x4) => !!x4)\n });\n ctx.common.issues.push(issue);\n }\n var makeIssue, EMPTY_PATH, ParseStatus, INVALID, DIRTY, OK, isAborted, isDirty, isValid, isAsync;\n var init_parseUtil = __esm({\n \"../../../node_modules/.pnpm/zod@3.25.64/node_modules/zod/dist/esm/v3/helpers/parseUtil.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_errors5();\n init_en();\n makeIssue = (params) => {\n const { data, path, errorMaps, issueData } = params;\n const fullPath = [...path, ...issueData.path || []];\n const fullIssue = {\n ...issueData,\n path: fullPath\n };\n if (issueData.message !== void 0) {\n return {\n ...issueData,\n path: fullPath,\n message: issueData.message\n };\n }\n let errorMessage = \"\";\n const maps = errorMaps.filter((m2) => !!m2).slice().reverse();\n for (const map of maps) {\n errorMessage = map(fullIssue, { data, defaultError: errorMessage }).message;\n }\n return {\n ...issueData,\n path: fullPath,\n message: errorMessage\n };\n };\n EMPTY_PATH = [];\n ParseStatus = class _ParseStatus {\n constructor() {\n this.value = \"valid\";\n }\n dirty() {\n if (this.value === \"valid\")\n this.value = \"dirty\";\n }\n abort() {\n if (this.value !== \"aborted\")\n this.value = \"aborted\";\n }\n static mergeArray(status, results) {\n const arrayValue = [];\n for (const s4 of results) {\n if (s4.status === \"aborted\")\n return INVALID;\n if (s4.status === \"dirty\")\n status.dirty();\n arrayValue.push(s4.value);\n }\n return { status: status.value, value: arrayValue };\n }\n static async mergeObjectAsync(status, pairs) {\n const syncPairs = [];\n for (const pair of pairs) {\n const key = await pair.key;\n const value = await pair.value;\n syncPairs.push({\n key,\n value\n });\n }\n return _ParseStatus.mergeObjectSync(status, syncPairs);\n }\n static mergeObjectSync(status, pairs) {\n const finalObject = {};\n for (const pair of pairs) {\n const { key, value } = pair;\n if (key.status === \"aborted\")\n return INVALID;\n if (value.status === \"aborted\")\n return INVALID;\n if (key.status === \"dirty\")\n status.dirty();\n if (value.status === \"dirty\")\n status.dirty();\n if (key.value !== \"__proto__\" && (typeof value.value !== \"undefined\" || pair.alwaysSet)) {\n finalObject[key.value] = value.value;\n }\n }\n return { status: status.value, value: finalObject };\n }\n };\n INVALID = Object.freeze({\n status: \"aborted\"\n });\n DIRTY = (value) => ({ status: \"dirty\", value });\n OK = (value) => ({ status: \"valid\", value });\n isAborted = (x4) => x4.status === \"aborted\";\n isDirty = (x4) => x4.status === \"dirty\";\n isValid = (x4) => x4.status === \"valid\";\n isAsync = (x4) => typeof Promise !== \"undefined\" && x4 instanceof Promise;\n }\n });\n\n // ../../../node_modules/.pnpm/zod@3.25.64/node_modules/zod/dist/esm/v3/helpers/typeAliases.js\n var init_typeAliases = __esm({\n \"../../../node_modules/.pnpm/zod@3.25.64/node_modules/zod/dist/esm/v3/helpers/typeAliases.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n }\n });\n\n // ../../../node_modules/.pnpm/zod@3.25.64/node_modules/zod/dist/esm/v3/helpers/errorUtil.js\n var errorUtil;\n var init_errorUtil = __esm({\n \"../../../node_modules/.pnpm/zod@3.25.64/node_modules/zod/dist/esm/v3/helpers/errorUtil.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n (function(errorUtil2) {\n errorUtil2.errToObj = (message) => typeof message === \"string\" ? { message } : message || {};\n errorUtil2.toString = (message) => typeof message === \"string\" ? message : message?.message;\n })(errorUtil || (errorUtil = {}));\n }\n });\n\n // ../../../node_modules/.pnpm/zod@3.25.64/node_modules/zod/dist/esm/v3/types.js\n function processCreateParams(params) {\n if (!params)\n return {};\n const { errorMap: errorMap2, invalid_type_error, required_error, description: description2 } = params;\n if (errorMap2 && (invalid_type_error || required_error)) {\n throw new Error(`Can't use \"invalid_type_error\" or \"required_error\" in conjunction with custom error map.`);\n }\n if (errorMap2)\n return { errorMap: errorMap2, description: description2 };\n const customMap = (iss, ctx) => {\n const { message } = params;\n if (iss.code === \"invalid_enum_value\") {\n return { message: message ?? ctx.defaultError };\n }\n if (typeof ctx.data === \"undefined\") {\n return { message: message ?? required_error ?? ctx.defaultError };\n }\n if (iss.code !== \"invalid_type\")\n return { message: ctx.defaultError };\n return { message: message ?? invalid_type_error ?? ctx.defaultError };\n };\n return { errorMap: customMap, description: description2 };\n }\n function timeRegexSource(args) {\n let secondsRegexSource = `[0-5]\\\\d`;\n if (args.precision) {\n secondsRegexSource = `${secondsRegexSource}\\\\.\\\\d{${args.precision}}`;\n } else if (args.precision == null) {\n secondsRegexSource = `${secondsRegexSource}(\\\\.\\\\d+)?`;\n }\n const secondsQuantifier = args.precision ? \"+\" : \"?\";\n return `([01]\\\\d|2[0-3]):[0-5]\\\\d(:${secondsRegexSource})${secondsQuantifier}`;\n }\n function timeRegex(args) {\n return new RegExp(`^${timeRegexSource(args)}$`);\n }\n function datetimeRegex(args) {\n let regex2 = `${dateRegexSource}T${timeRegexSource(args)}`;\n const opts = [];\n opts.push(args.local ? `Z?` : `Z`);\n if (args.offset)\n opts.push(`([+-]\\\\d{2}:?\\\\d{2})`);\n regex2 = `${regex2}(${opts.join(\"|\")})`;\n return new RegExp(`^${regex2}$`);\n }\n function isValidIP(ip, version6) {\n if ((version6 === \"v4\" || !version6) && ipv4Regex.test(ip)) {\n return true;\n }\n if ((version6 === \"v6\" || !version6) && ipv6Regex.test(ip)) {\n return true;\n }\n return false;\n }\n function isValidJWT(jwt, alg) {\n if (!jwtRegex.test(jwt))\n return false;\n try {\n const [header] = jwt.split(\".\");\n const base64 = header.replace(/-/g, \"+\").replace(/_/g, \"/\").padEnd(header.length + (4 - header.length % 4) % 4, \"=\");\n const decoded = JSON.parse(atob(base64));\n if (typeof decoded !== \"object\" || decoded === null)\n return false;\n if (\"typ\" in decoded && decoded?.typ !== \"JWT\")\n return false;\n if (!decoded.alg)\n return false;\n if (alg && decoded.alg !== alg)\n return false;\n return true;\n } catch {\n return false;\n }\n }\n function isValidCidr(ip, version6) {\n if ((version6 === \"v4\" || !version6) && ipv4CidrRegex.test(ip)) {\n return true;\n }\n if ((version6 === \"v6\" || !version6) && ipv6CidrRegex.test(ip)) {\n return true;\n }\n return false;\n }\n function floatSafeRemainder(val, step) {\n const valDecCount = (val.toString().split(\".\")[1] || \"\").length;\n const stepDecCount = (step.toString().split(\".\")[1] || \"\").length;\n const decCount = valDecCount > stepDecCount ? valDecCount : stepDecCount;\n const valInt = Number.parseInt(val.toFixed(decCount).replace(\".\", \"\"));\n const stepInt = Number.parseInt(step.toFixed(decCount).replace(\".\", \"\"));\n return valInt % stepInt / 10 ** decCount;\n }\n function deepPartialify(schema) {\n if (schema instanceof ZodObject) {\n const newShape = {};\n for (const key in schema.shape) {\n const fieldSchema = schema.shape[key];\n newShape[key] = ZodOptional.create(deepPartialify(fieldSchema));\n }\n return new ZodObject({\n ...schema._def,\n shape: () => newShape\n });\n } else if (schema instanceof ZodArray) {\n return new ZodArray({\n ...schema._def,\n type: deepPartialify(schema.element)\n });\n } else if (schema instanceof ZodOptional) {\n return ZodOptional.create(deepPartialify(schema.unwrap()));\n } else if (schema instanceof ZodNullable) {\n return ZodNullable.create(deepPartialify(schema.unwrap()));\n } else if (schema instanceof ZodTuple) {\n return ZodTuple.create(schema.items.map((item) => deepPartialify(item)));\n } else {\n return schema;\n }\n }\n function mergeValues(a3, b4) {\n const aType = getParsedType(a3);\n const bType = getParsedType(b4);\n if (a3 === b4) {\n return { valid: true, data: a3 };\n } else if (aType === ZodParsedType.object && bType === ZodParsedType.object) {\n const bKeys = util.objectKeys(b4);\n const sharedKeys = util.objectKeys(a3).filter((key) => bKeys.indexOf(key) !== -1);\n const newObj = { ...a3, ...b4 };\n for (const key of sharedKeys) {\n const sharedValue = mergeValues(a3[key], b4[key]);\n if (!sharedValue.valid) {\n return { valid: false };\n }\n newObj[key] = sharedValue.data;\n }\n return { valid: true, data: newObj };\n } else if (aType === ZodParsedType.array && bType === ZodParsedType.array) {\n if (a3.length !== b4.length) {\n return { valid: false };\n }\n const newArray = [];\n for (let index2 = 0; index2 < a3.length; index2++) {\n const itemA = a3[index2];\n const itemB = b4[index2];\n const sharedValue = mergeValues(itemA, itemB);\n if (!sharedValue.valid) {\n return { valid: false };\n }\n newArray.push(sharedValue.data);\n }\n return { valid: true, data: newArray };\n } else if (aType === ZodParsedType.date && bType === ZodParsedType.date && +a3 === +b4) {\n return { valid: true, data: a3 };\n } else {\n return { valid: false };\n }\n }\n function createZodEnum(values, params) {\n return new ZodEnum({\n values,\n typeName: ZodFirstPartyTypeKind.ZodEnum,\n ...processCreateParams(params)\n });\n }\n function cleanParams(params, data) {\n const p4 = typeof params === \"function\" ? params(data) : typeof params === \"string\" ? { message: params } : params;\n const p22 = typeof p4 === \"string\" ? { message: p4 } : p4;\n return p22;\n }\n function custom2(check, _params = {}, fatal) {\n if (check)\n return ZodAny.create().superRefine((data, ctx) => {\n const r2 = check(data);\n if (r2 instanceof Promise) {\n return r2.then((r3) => {\n if (!r3) {\n const params = cleanParams(_params, data);\n const _fatal = params.fatal ?? fatal ?? true;\n ctx.addIssue({ code: \"custom\", ...params, fatal: _fatal });\n }\n });\n }\n if (!r2) {\n const params = cleanParams(_params, data);\n const _fatal = params.fatal ?? fatal ?? true;\n ctx.addIssue({ code: \"custom\", ...params, fatal: _fatal });\n }\n return;\n });\n return ZodAny.create();\n }\n var ParseInputLazyPath, handleResult, ZodType, cuidRegex, cuid2Regex, ulidRegex, uuidRegex, nanoidRegex, jwtRegex, durationRegex, emailRegex, _emojiRegex, emojiRegex, ipv4Regex, ipv4CidrRegex, ipv6Regex, ipv6CidrRegex, base64Regex2, base64urlRegex, dateRegexSource, dateRegex, ZodString, ZodNumber, ZodBigInt, ZodBoolean, ZodDate, ZodSymbol, ZodUndefined, ZodNull, ZodAny, ZodUnknown, ZodNever, ZodVoid, ZodArray, ZodObject, ZodUnion, getDiscriminator, ZodDiscriminatedUnion, ZodIntersection, ZodTuple, ZodRecord, ZodMap, ZodSet, ZodFunction, ZodLazy, ZodLiteral, ZodEnum, ZodNativeEnum, ZodPromise, ZodEffects, ZodOptional, ZodNullable, ZodDefault, ZodCatch, ZodNaN, BRAND, ZodBranded, ZodPipeline, ZodReadonly, late, ZodFirstPartyTypeKind, instanceOfType, stringType, numberType, nanType, bigIntType, booleanType, dateType, symbolType, undefinedType, nullType, anyType, unknownType, neverType, voidType, arrayType, objectType, strictObjectType, unionType, discriminatedUnionType, intersectionType, tupleType, recordType, mapType, setType, functionType, lazyType, literalType, enumType, nativeEnumType, promiseType, effectsType, optionalType, nullableType, preprocessType, pipelineType, ostring, onumber, oboolean, coerce, NEVER;\n var init_types2 = __esm({\n \"../../../node_modules/.pnpm/zod@3.25.64/node_modules/zod/dist/esm/v3/types.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_ZodError();\n init_errors5();\n init_errorUtil();\n init_parseUtil();\n init_util();\n ParseInputLazyPath = class {\n constructor(parent, value, path, key) {\n this._cachedPath = [];\n this.parent = parent;\n this.data = value;\n this._path = path;\n this._key = key;\n }\n get path() {\n if (!this._cachedPath.length) {\n if (Array.isArray(this._key)) {\n this._cachedPath.push(...this._path, ...this._key);\n } else {\n this._cachedPath.push(...this._path, this._key);\n }\n }\n return this._cachedPath;\n }\n };\n handleResult = (ctx, result) => {\n if (isValid(result)) {\n return { success: true, data: result.value };\n } else {\n if (!ctx.common.issues.length) {\n throw new Error(\"Validation failed but no issues detected.\");\n }\n return {\n success: false,\n get error() {\n if (this._error)\n return this._error;\n const error = new ZodError(ctx.common.issues);\n this._error = error;\n return this._error;\n }\n };\n }\n };\n ZodType = class {\n get description() {\n return this._def.description;\n }\n _getType(input) {\n return getParsedType(input.data);\n }\n _getOrReturnCtx(input, ctx) {\n return ctx || {\n common: input.parent.common,\n data: input.data,\n parsedType: getParsedType(input.data),\n schemaErrorMap: this._def.errorMap,\n path: input.path,\n parent: input.parent\n };\n }\n _processInputParams(input) {\n return {\n status: new ParseStatus(),\n ctx: {\n common: input.parent.common,\n data: input.data,\n parsedType: getParsedType(input.data),\n schemaErrorMap: this._def.errorMap,\n path: input.path,\n parent: input.parent\n }\n };\n }\n _parseSync(input) {\n const result = this._parse(input);\n if (isAsync(result)) {\n throw new Error(\"Synchronous parse encountered promise.\");\n }\n return result;\n }\n _parseAsync(input) {\n const result = this._parse(input);\n return Promise.resolve(result);\n }\n parse(data, params) {\n const result = this.safeParse(data, params);\n if (result.success)\n return result.data;\n throw result.error;\n }\n safeParse(data, params) {\n const ctx = {\n common: {\n issues: [],\n async: params?.async ?? false,\n contextualErrorMap: params?.errorMap\n },\n path: params?.path || [],\n schemaErrorMap: this._def.errorMap,\n parent: null,\n data,\n parsedType: getParsedType(data)\n };\n const result = this._parseSync({ data, path: ctx.path, parent: ctx });\n return handleResult(ctx, result);\n }\n \"~validate\"(data) {\n const ctx = {\n common: {\n issues: [],\n async: !!this[\"~standard\"].async\n },\n path: [],\n schemaErrorMap: this._def.errorMap,\n parent: null,\n data,\n parsedType: getParsedType(data)\n };\n if (!this[\"~standard\"].async) {\n try {\n const result = this._parseSync({ data, path: [], parent: ctx });\n return isValid(result) ? {\n value: result.value\n } : {\n issues: ctx.common.issues\n };\n } catch (err) {\n if (err?.message?.toLowerCase()?.includes(\"encountered\")) {\n this[\"~standard\"].async = true;\n }\n ctx.common = {\n issues: [],\n async: true\n };\n }\n }\n return this._parseAsync({ data, path: [], parent: ctx }).then((result) => isValid(result) ? {\n value: result.value\n } : {\n issues: ctx.common.issues\n });\n }\n async parseAsync(data, params) {\n const result = await this.safeParseAsync(data, params);\n if (result.success)\n return result.data;\n throw result.error;\n }\n async safeParseAsync(data, params) {\n const ctx = {\n common: {\n issues: [],\n contextualErrorMap: params?.errorMap,\n async: true\n },\n path: params?.path || [],\n schemaErrorMap: this._def.errorMap,\n parent: null,\n data,\n parsedType: getParsedType(data)\n };\n const maybeAsyncResult = this._parse({ data, path: ctx.path, parent: ctx });\n const result = await (isAsync(maybeAsyncResult) ? maybeAsyncResult : Promise.resolve(maybeAsyncResult));\n return handleResult(ctx, result);\n }\n refine(check, message) {\n const getIssueProperties = (val) => {\n if (typeof message === \"string\" || typeof message === \"undefined\") {\n return { message };\n } else if (typeof message === \"function\") {\n return message(val);\n } else {\n return message;\n }\n };\n return this._refinement((val, ctx) => {\n const result = check(val);\n const setError = () => ctx.addIssue({\n code: ZodIssueCode.custom,\n ...getIssueProperties(val)\n });\n if (typeof Promise !== \"undefined\" && result instanceof Promise) {\n return result.then((data) => {\n if (!data) {\n setError();\n return false;\n } else {\n return true;\n }\n });\n }\n if (!result) {\n setError();\n return false;\n } else {\n return true;\n }\n });\n }\n refinement(check, refinementData) {\n return this._refinement((val, ctx) => {\n if (!check(val)) {\n ctx.addIssue(typeof refinementData === \"function\" ? refinementData(val, ctx) : refinementData);\n return false;\n } else {\n return true;\n }\n });\n }\n _refinement(refinement) {\n return new ZodEffects({\n schema: this,\n typeName: ZodFirstPartyTypeKind.ZodEffects,\n effect: { type: \"refinement\", refinement }\n });\n }\n superRefine(refinement) {\n return this._refinement(refinement);\n }\n constructor(def) {\n this.spa = this.safeParseAsync;\n this._def = def;\n this.parse = this.parse.bind(this);\n this.safeParse = this.safeParse.bind(this);\n this.parseAsync = this.parseAsync.bind(this);\n this.safeParseAsync = this.safeParseAsync.bind(this);\n this.spa = this.spa.bind(this);\n this.refine = this.refine.bind(this);\n this.refinement = this.refinement.bind(this);\n this.superRefine = this.superRefine.bind(this);\n this.optional = this.optional.bind(this);\n this.nullable = this.nullable.bind(this);\n this.nullish = this.nullish.bind(this);\n this.array = this.array.bind(this);\n this.promise = this.promise.bind(this);\n this.or = this.or.bind(this);\n this.and = this.and.bind(this);\n this.transform = this.transform.bind(this);\n this.brand = this.brand.bind(this);\n this.default = this.default.bind(this);\n this.catch = this.catch.bind(this);\n this.describe = this.describe.bind(this);\n this.pipe = this.pipe.bind(this);\n this.readonly = this.readonly.bind(this);\n this.isNullable = this.isNullable.bind(this);\n this.isOptional = this.isOptional.bind(this);\n this[\"~standard\"] = {\n version: 1,\n vendor: \"zod\",\n validate: (data) => this[\"~validate\"](data)\n };\n }\n optional() {\n return ZodOptional.create(this, this._def);\n }\n nullable() {\n return ZodNullable.create(this, this._def);\n }\n nullish() {\n return this.nullable().optional();\n }\n array() {\n return ZodArray.create(this);\n }\n promise() {\n return ZodPromise.create(this, this._def);\n }\n or(option) {\n return ZodUnion.create([this, option], this._def);\n }\n and(incoming) {\n return ZodIntersection.create(this, incoming, this._def);\n }\n transform(transform2) {\n return new ZodEffects({\n ...processCreateParams(this._def),\n schema: this,\n typeName: ZodFirstPartyTypeKind.ZodEffects,\n effect: { type: \"transform\", transform: transform2 }\n });\n }\n default(def) {\n const defaultValueFunc = typeof def === \"function\" ? def : () => def;\n return new ZodDefault({\n ...processCreateParams(this._def),\n innerType: this,\n defaultValue: defaultValueFunc,\n typeName: ZodFirstPartyTypeKind.ZodDefault\n });\n }\n brand() {\n return new ZodBranded({\n typeName: ZodFirstPartyTypeKind.ZodBranded,\n type: this,\n ...processCreateParams(this._def)\n });\n }\n catch(def) {\n const catchValueFunc = typeof def === \"function\" ? def : () => def;\n return new ZodCatch({\n ...processCreateParams(this._def),\n innerType: this,\n catchValue: catchValueFunc,\n typeName: ZodFirstPartyTypeKind.ZodCatch\n });\n }\n describe(description2) {\n const This = this.constructor;\n return new This({\n ...this._def,\n description: description2\n });\n }\n pipe(target) {\n return ZodPipeline.create(this, target);\n }\n readonly() {\n return ZodReadonly.create(this);\n }\n isOptional() {\n return this.safeParse(void 0).success;\n }\n isNullable() {\n return this.safeParse(null).success;\n }\n };\n cuidRegex = /^c[^\\s-]{8,}$/i;\n cuid2Regex = /^[0-9a-z]+$/;\n ulidRegex = /^[0-9A-HJKMNP-TV-Z]{26}$/i;\n uuidRegex = /^[0-9a-fA-F]{8}\\b-[0-9a-fA-F]{4}\\b-[0-9a-fA-F]{4}\\b-[0-9a-fA-F]{4}\\b-[0-9a-fA-F]{12}$/i;\n nanoidRegex = /^[a-z0-9_-]{21}$/i;\n jwtRegex = /^[A-Za-z0-9-_]+\\.[A-Za-z0-9-_]+\\.[A-Za-z0-9-_]*$/;\n durationRegex = /^[-+]?P(?!$)(?:(?:[-+]?\\d+Y)|(?:[-+]?\\d+[.,]\\d+Y$))?(?:(?:[-+]?\\d+M)|(?:[-+]?\\d+[.,]\\d+M$))?(?:(?:[-+]?\\d+W)|(?:[-+]?\\d+[.,]\\d+W$))?(?:(?:[-+]?\\d+D)|(?:[-+]?\\d+[.,]\\d+D$))?(?:T(?=[\\d+-])(?:(?:[-+]?\\d+H)|(?:[-+]?\\d+[.,]\\d+H$))?(?:(?:[-+]?\\d+M)|(?:[-+]?\\d+[.,]\\d+M$))?(?:[-+]?\\d+(?:[.,]\\d+)?S)?)??$/;\n emailRegex = /^(?!\\.)(?!.*\\.\\.)([A-Z0-9_'+\\-\\.]*)[A-Z0-9_+-]@([A-Z0-9][A-Z0-9\\-]*\\.)+[A-Z]{2,}$/i;\n _emojiRegex = `^(\\\\p{Extended_Pictographic}|\\\\p{Emoji_Component})+$`;\n ipv4Regex = /^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\\.){3}(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])$/;\n ipv4CidrRegex = /^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\\.){3}(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\\/(3[0-2]|[12]?[0-9])$/;\n ipv6Regex = /^(([0-9a-fA-F]{1,4}:){7,7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:)|fe80:(:[0-9a-fA-F]{0,4}){0,4}%[0-9a-zA-Z]{1,}|::(ffff(:0{1,4}){0,1}:){0,1}((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])|([0-9a-fA-F]{1,4}:){1,4}:((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9]))$/;\n ipv6CidrRegex = /^(([0-9a-fA-F]{1,4}:){7,7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:)|fe80:(:[0-9a-fA-F]{0,4}){0,4}%[0-9a-zA-Z]{1,}|::(ffff(:0{1,4}){0,1}:){0,1}((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])|([0-9a-fA-F]{1,4}:){1,4}:((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9]))\\/(12[0-8]|1[01][0-9]|[1-9]?[0-9])$/;\n base64Regex2 = /^([0-9a-zA-Z+/]{4})*(([0-9a-zA-Z+/]{2}==)|([0-9a-zA-Z+/]{3}=))?$/;\n base64urlRegex = /^([0-9a-zA-Z-_]{4})*(([0-9a-zA-Z-_]{2}(==)?)|([0-9a-zA-Z-_]{3}(=)?))?$/;\n dateRegexSource = `((\\\\d\\\\d[2468][048]|\\\\d\\\\d[13579][26]|\\\\d\\\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\\\d{4}-((0[13578]|1[02])-(0[1-9]|[12]\\\\d|3[01])|(0[469]|11)-(0[1-9]|[12]\\\\d|30)|(02)-(0[1-9]|1\\\\d|2[0-8])))`;\n dateRegex = new RegExp(`^${dateRegexSource}$`);\n ZodString = class _ZodString extends ZodType {\n _parse(input) {\n if (this._def.coerce) {\n input.data = String(input.data);\n }\n const parsedType = this._getType(input);\n if (parsedType !== ZodParsedType.string) {\n const ctx2 = this._getOrReturnCtx(input);\n addIssueToContext(ctx2, {\n code: ZodIssueCode.invalid_type,\n expected: ZodParsedType.string,\n received: ctx2.parsedType\n });\n return INVALID;\n }\n const status = new ParseStatus();\n let ctx = void 0;\n for (const check of this._def.checks) {\n if (check.kind === \"min\") {\n if (input.data.length < check.value) {\n ctx = this._getOrReturnCtx(input, ctx);\n addIssueToContext(ctx, {\n code: ZodIssueCode.too_small,\n minimum: check.value,\n type: \"string\",\n inclusive: true,\n exact: false,\n message: check.message\n });\n status.dirty();\n }\n } else if (check.kind === \"max\") {\n if (input.data.length > check.value) {\n ctx = this._getOrReturnCtx(input, ctx);\n addIssueToContext(ctx, {\n code: ZodIssueCode.too_big,\n maximum: check.value,\n type: \"string\",\n inclusive: true,\n exact: false,\n message: check.message\n });\n status.dirty();\n }\n } else if (check.kind === \"length\") {\n const tooBig = input.data.length > check.value;\n const tooSmall = input.data.length < check.value;\n if (tooBig || tooSmall) {\n ctx = this._getOrReturnCtx(input, ctx);\n if (tooBig) {\n addIssueToContext(ctx, {\n code: ZodIssueCode.too_big,\n maximum: check.value,\n type: \"string\",\n inclusive: true,\n exact: true,\n message: check.message\n });\n } else if (tooSmall) {\n addIssueToContext(ctx, {\n code: ZodIssueCode.too_small,\n minimum: check.value,\n type: \"string\",\n inclusive: true,\n exact: true,\n message: check.message\n });\n }\n status.dirty();\n }\n } else if (check.kind === \"email\") {\n if (!emailRegex.test(input.data)) {\n ctx = this._getOrReturnCtx(input, ctx);\n addIssueToContext(ctx, {\n validation: \"email\",\n code: ZodIssueCode.invalid_string,\n message: check.message\n });\n status.dirty();\n }\n } else if (check.kind === \"emoji\") {\n if (!emojiRegex) {\n emojiRegex = new RegExp(_emojiRegex, \"u\");\n }\n if (!emojiRegex.test(input.data)) {\n ctx = this._getOrReturnCtx(input, ctx);\n addIssueToContext(ctx, {\n validation: \"emoji\",\n code: ZodIssueCode.invalid_string,\n message: check.message\n });\n status.dirty();\n }\n } else if (check.kind === \"uuid\") {\n if (!uuidRegex.test(input.data)) {\n ctx = this._getOrReturnCtx(input, ctx);\n addIssueToContext(ctx, {\n validation: \"uuid\",\n code: ZodIssueCode.invalid_string,\n message: check.message\n });\n status.dirty();\n }\n } else if (check.kind === \"nanoid\") {\n if (!nanoidRegex.test(input.data)) {\n ctx = this._getOrReturnCtx(input, ctx);\n addIssueToContext(ctx, {\n validation: \"nanoid\",\n code: ZodIssueCode.invalid_string,\n message: check.message\n });\n status.dirty();\n }\n } else if (check.kind === \"cuid\") {\n if (!cuidRegex.test(input.data)) {\n ctx = this._getOrReturnCtx(input, ctx);\n addIssueToContext(ctx, {\n validation: \"cuid\",\n code: ZodIssueCode.invalid_string,\n message: check.message\n });\n status.dirty();\n }\n } else if (check.kind === \"cuid2\") {\n if (!cuid2Regex.test(input.data)) {\n ctx = this._getOrReturnCtx(input, ctx);\n addIssueToContext(ctx, {\n validation: \"cuid2\",\n code: ZodIssueCode.invalid_string,\n message: check.message\n });\n status.dirty();\n }\n } else if (check.kind === \"ulid\") {\n if (!ulidRegex.test(input.data)) {\n ctx = this._getOrReturnCtx(input, ctx);\n addIssueToContext(ctx, {\n validation: \"ulid\",\n code: ZodIssueCode.invalid_string,\n message: check.message\n });\n status.dirty();\n }\n } else if (check.kind === \"url\") {\n try {\n new URL(input.data);\n } catch {\n ctx = this._getOrReturnCtx(input, ctx);\n addIssueToContext(ctx, {\n validation: \"url\",\n code: ZodIssueCode.invalid_string,\n message: check.message\n });\n status.dirty();\n }\n } else if (check.kind === \"regex\") {\n check.regex.lastIndex = 0;\n const testResult = check.regex.test(input.data);\n if (!testResult) {\n ctx = this._getOrReturnCtx(input, ctx);\n addIssueToContext(ctx, {\n validation: \"regex\",\n code: ZodIssueCode.invalid_string,\n message: check.message\n });\n status.dirty();\n }\n } else if (check.kind === \"trim\") {\n input.data = input.data.trim();\n } else if (check.kind === \"includes\") {\n if (!input.data.includes(check.value, check.position)) {\n ctx = this._getOrReturnCtx(input, ctx);\n addIssueToContext(ctx, {\n code: ZodIssueCode.invalid_string,\n validation: { includes: check.value, position: check.position },\n message: check.message\n });\n status.dirty();\n }\n } else if (check.kind === \"toLowerCase\") {\n input.data = input.data.toLowerCase();\n } else if (check.kind === \"toUpperCase\") {\n input.data = input.data.toUpperCase();\n } else if (check.kind === \"startsWith\") {\n if (!input.data.startsWith(check.value)) {\n ctx = this._getOrReturnCtx(input, ctx);\n addIssueToContext(ctx, {\n code: ZodIssueCode.invalid_string,\n validation: { startsWith: check.value },\n message: check.message\n });\n status.dirty();\n }\n } else if (check.kind === \"endsWith\") {\n if (!input.data.endsWith(check.value)) {\n ctx = this._getOrReturnCtx(input, ctx);\n addIssueToContext(ctx, {\n code: ZodIssueCode.invalid_string,\n validation: { endsWith: check.value },\n message: check.message\n });\n status.dirty();\n }\n } else if (check.kind === \"datetime\") {\n const regex2 = datetimeRegex(check);\n if (!regex2.test(input.data)) {\n ctx = this._getOrReturnCtx(input, ctx);\n addIssueToContext(ctx, {\n code: ZodIssueCode.invalid_string,\n validation: \"datetime\",\n message: check.message\n });\n status.dirty();\n }\n } else if (check.kind === \"date\") {\n const regex2 = dateRegex;\n if (!regex2.test(input.data)) {\n ctx = this._getOrReturnCtx(input, ctx);\n addIssueToContext(ctx, {\n code: ZodIssueCode.invalid_string,\n validation: \"date\",\n message: check.message\n });\n status.dirty();\n }\n } else if (check.kind === \"time\") {\n const regex2 = timeRegex(check);\n if (!regex2.test(input.data)) {\n ctx = this._getOrReturnCtx(input, ctx);\n addIssueToContext(ctx, {\n code: ZodIssueCode.invalid_string,\n validation: \"time\",\n message: check.message\n });\n status.dirty();\n }\n } else if (check.kind === \"duration\") {\n if (!durationRegex.test(input.data)) {\n ctx = this._getOrReturnCtx(input, ctx);\n addIssueToContext(ctx, {\n validation: \"duration\",\n code: ZodIssueCode.invalid_string,\n message: check.message\n });\n status.dirty();\n }\n } else if (check.kind === \"ip\") {\n if (!isValidIP(input.data, check.version)) {\n ctx = this._getOrReturnCtx(input, ctx);\n addIssueToContext(ctx, {\n validation: \"ip\",\n code: ZodIssueCode.invalid_string,\n message: check.message\n });\n status.dirty();\n }\n } else if (check.kind === \"jwt\") {\n if (!isValidJWT(input.data, check.alg)) {\n ctx = this._getOrReturnCtx(input, ctx);\n addIssueToContext(ctx, {\n validation: \"jwt\",\n code: ZodIssueCode.invalid_string,\n message: check.message\n });\n status.dirty();\n }\n } else if (check.kind === \"cidr\") {\n if (!isValidCidr(input.data, check.version)) {\n ctx = this._getOrReturnCtx(input, ctx);\n addIssueToContext(ctx, {\n validation: \"cidr\",\n code: ZodIssueCode.invalid_string,\n message: check.message\n });\n status.dirty();\n }\n } else if (check.kind === \"base64\") {\n if (!base64Regex2.test(input.data)) {\n ctx = this._getOrReturnCtx(input, ctx);\n addIssueToContext(ctx, {\n validation: \"base64\",\n code: ZodIssueCode.invalid_string,\n message: check.message\n });\n status.dirty();\n }\n } else if (check.kind === \"base64url\") {\n if (!base64urlRegex.test(input.data)) {\n ctx = this._getOrReturnCtx(input, ctx);\n addIssueToContext(ctx, {\n validation: \"base64url\",\n code: ZodIssueCode.invalid_string,\n message: check.message\n });\n status.dirty();\n }\n } else {\n util.assertNever(check);\n }\n }\n return { status: status.value, value: input.data };\n }\n _regex(regex2, validation, message) {\n return this.refinement((data) => regex2.test(data), {\n validation,\n code: ZodIssueCode.invalid_string,\n ...errorUtil.errToObj(message)\n });\n }\n _addCheck(check) {\n return new _ZodString({\n ...this._def,\n checks: [...this._def.checks, check]\n });\n }\n email(message) {\n return this._addCheck({ kind: \"email\", ...errorUtil.errToObj(message) });\n }\n url(message) {\n return this._addCheck({ kind: \"url\", ...errorUtil.errToObj(message) });\n }\n emoji(message) {\n return this._addCheck({ kind: \"emoji\", ...errorUtil.errToObj(message) });\n }\n uuid(message) {\n return this._addCheck({ kind: \"uuid\", ...errorUtil.errToObj(message) });\n }\n nanoid(message) {\n return this._addCheck({ kind: \"nanoid\", ...errorUtil.errToObj(message) });\n }\n cuid(message) {\n return this._addCheck({ kind: \"cuid\", ...errorUtil.errToObj(message) });\n }\n cuid2(message) {\n return this._addCheck({ kind: \"cuid2\", ...errorUtil.errToObj(message) });\n }\n ulid(message) {\n return this._addCheck({ kind: \"ulid\", ...errorUtil.errToObj(message) });\n }\n base64(message) {\n return this._addCheck({ kind: \"base64\", ...errorUtil.errToObj(message) });\n }\n base64url(message) {\n return this._addCheck({\n kind: \"base64url\",\n ...errorUtil.errToObj(message)\n });\n }\n jwt(options) {\n return this._addCheck({ kind: \"jwt\", ...errorUtil.errToObj(options) });\n }\n ip(options) {\n return this._addCheck({ kind: \"ip\", ...errorUtil.errToObj(options) });\n }\n cidr(options) {\n return this._addCheck({ kind: \"cidr\", ...errorUtil.errToObj(options) });\n }\n datetime(options) {\n if (typeof options === \"string\") {\n return this._addCheck({\n kind: \"datetime\",\n precision: null,\n offset: false,\n local: false,\n message: options\n });\n }\n return this._addCheck({\n kind: \"datetime\",\n precision: typeof options?.precision === \"undefined\" ? null : options?.precision,\n offset: options?.offset ?? false,\n local: options?.local ?? false,\n ...errorUtil.errToObj(options?.message)\n });\n }\n date(message) {\n return this._addCheck({ kind: \"date\", message });\n }\n time(options) {\n if (typeof options === \"string\") {\n return this._addCheck({\n kind: \"time\",\n precision: null,\n message: options\n });\n }\n return this._addCheck({\n kind: \"time\",\n precision: typeof options?.precision === \"undefined\" ? null : options?.precision,\n ...errorUtil.errToObj(options?.message)\n });\n }\n duration(message) {\n return this._addCheck({ kind: \"duration\", ...errorUtil.errToObj(message) });\n }\n regex(regex2, message) {\n return this._addCheck({\n kind: \"regex\",\n regex: regex2,\n ...errorUtil.errToObj(message)\n });\n }\n includes(value, options) {\n return this._addCheck({\n kind: \"includes\",\n value,\n position: options?.position,\n ...errorUtil.errToObj(options?.message)\n });\n }\n startsWith(value, message) {\n return this._addCheck({\n kind: \"startsWith\",\n value,\n ...errorUtil.errToObj(message)\n });\n }\n endsWith(value, message) {\n return this._addCheck({\n kind: \"endsWith\",\n value,\n ...errorUtil.errToObj(message)\n });\n }\n min(minLength2, message) {\n return this._addCheck({\n kind: \"min\",\n value: minLength2,\n ...errorUtil.errToObj(message)\n });\n }\n max(maxLength, message) {\n return this._addCheck({\n kind: \"max\",\n value: maxLength,\n ...errorUtil.errToObj(message)\n });\n }\n length(len, message) {\n return this._addCheck({\n kind: \"length\",\n value: len,\n ...errorUtil.errToObj(message)\n });\n }\n /**\n * Equivalent to `.min(1)`\n */\n nonempty(message) {\n return this.min(1, errorUtil.errToObj(message));\n }\n trim() {\n return new _ZodString({\n ...this._def,\n checks: [...this._def.checks, { kind: \"trim\" }]\n });\n }\n toLowerCase() {\n return new _ZodString({\n ...this._def,\n checks: [...this._def.checks, { kind: \"toLowerCase\" }]\n });\n }\n toUpperCase() {\n return new _ZodString({\n ...this._def,\n checks: [...this._def.checks, { kind: \"toUpperCase\" }]\n });\n }\n get isDatetime() {\n return !!this._def.checks.find((ch) => ch.kind === \"datetime\");\n }\n get isDate() {\n return !!this._def.checks.find((ch) => ch.kind === \"date\");\n }\n get isTime() {\n return !!this._def.checks.find((ch) => ch.kind === \"time\");\n }\n get isDuration() {\n return !!this._def.checks.find((ch) => ch.kind === \"duration\");\n }\n get isEmail() {\n return !!this._def.checks.find((ch) => ch.kind === \"email\");\n }\n get isURL() {\n return !!this._def.checks.find((ch) => ch.kind === \"url\");\n }\n get isEmoji() {\n return !!this._def.checks.find((ch) => ch.kind === \"emoji\");\n }\n get isUUID() {\n return !!this._def.checks.find((ch) => ch.kind === \"uuid\");\n }\n get isNANOID() {\n return !!this._def.checks.find((ch) => ch.kind === \"nanoid\");\n }\n get isCUID() {\n return !!this._def.checks.find((ch) => ch.kind === \"cuid\");\n }\n get isCUID2() {\n return !!this._def.checks.find((ch) => ch.kind === \"cuid2\");\n }\n get isULID() {\n return !!this._def.checks.find((ch) => ch.kind === \"ulid\");\n }\n get isIP() {\n return !!this._def.checks.find((ch) => ch.kind === \"ip\");\n }\n get isCIDR() {\n return !!this._def.checks.find((ch) => ch.kind === \"cidr\");\n }\n get isBase64() {\n return !!this._def.checks.find((ch) => ch.kind === \"base64\");\n }\n get isBase64url() {\n return !!this._def.checks.find((ch) => ch.kind === \"base64url\");\n }\n get minLength() {\n let min = null;\n for (const ch of this._def.checks) {\n if (ch.kind === \"min\") {\n if (min === null || ch.value > min)\n min = ch.value;\n }\n }\n return min;\n }\n get maxLength() {\n let max = null;\n for (const ch of this._def.checks) {\n if (ch.kind === \"max\") {\n if (max === null || ch.value < max)\n max = ch.value;\n }\n }\n return max;\n }\n };\n ZodString.create = (params) => {\n return new ZodString({\n checks: [],\n typeName: ZodFirstPartyTypeKind.ZodString,\n coerce: params?.coerce ?? false,\n ...processCreateParams(params)\n });\n };\n ZodNumber = class _ZodNumber extends ZodType {\n constructor() {\n super(...arguments);\n this.min = this.gte;\n this.max = this.lte;\n this.step = this.multipleOf;\n }\n _parse(input) {\n if (this._def.coerce) {\n input.data = Number(input.data);\n }\n const parsedType = this._getType(input);\n if (parsedType !== ZodParsedType.number) {\n const ctx2 = this._getOrReturnCtx(input);\n addIssueToContext(ctx2, {\n code: ZodIssueCode.invalid_type,\n expected: ZodParsedType.number,\n received: ctx2.parsedType\n });\n return INVALID;\n }\n let ctx = void 0;\n const status = new ParseStatus();\n for (const check of this._def.checks) {\n if (check.kind === \"int\") {\n if (!util.isInteger(input.data)) {\n ctx = this._getOrReturnCtx(input, ctx);\n addIssueToContext(ctx, {\n code: ZodIssueCode.invalid_type,\n expected: \"integer\",\n received: \"float\",\n message: check.message\n });\n status.dirty();\n }\n } else if (check.kind === \"min\") {\n const tooSmall = check.inclusive ? input.data < check.value : input.data <= check.value;\n if (tooSmall) {\n ctx = this._getOrReturnCtx(input, ctx);\n addIssueToContext(ctx, {\n code: ZodIssueCode.too_small,\n minimum: check.value,\n type: \"number\",\n inclusive: check.inclusive,\n exact: false,\n message: check.message\n });\n status.dirty();\n }\n } else if (check.kind === \"max\") {\n const tooBig = check.inclusive ? input.data > check.value : input.data >= check.value;\n if (tooBig) {\n ctx = this._getOrReturnCtx(input, ctx);\n addIssueToContext(ctx, {\n code: ZodIssueCode.too_big,\n maximum: check.value,\n type: \"number\",\n inclusive: check.inclusive,\n exact: false,\n message: check.message\n });\n status.dirty();\n }\n } else if (check.kind === \"multipleOf\") {\n if (floatSafeRemainder(input.data, check.value) !== 0) {\n ctx = this._getOrReturnCtx(input, ctx);\n addIssueToContext(ctx, {\n code: ZodIssueCode.not_multiple_of,\n multipleOf: check.value,\n message: check.message\n });\n status.dirty();\n }\n } else if (check.kind === \"finite\") {\n if (!Number.isFinite(input.data)) {\n ctx = this._getOrReturnCtx(input, ctx);\n addIssueToContext(ctx, {\n code: ZodIssueCode.not_finite,\n message: check.message\n });\n status.dirty();\n }\n } else {\n util.assertNever(check);\n }\n }\n return { status: status.value, value: input.data };\n }\n gte(value, message) {\n return this.setLimit(\"min\", value, true, errorUtil.toString(message));\n }\n gt(value, message) {\n return this.setLimit(\"min\", value, false, errorUtil.toString(message));\n }\n lte(value, message) {\n return this.setLimit(\"max\", value, true, errorUtil.toString(message));\n }\n lt(value, message) {\n return this.setLimit(\"max\", value, false, errorUtil.toString(message));\n }\n setLimit(kind, value, inclusive, message) {\n return new _ZodNumber({\n ...this._def,\n checks: [\n ...this._def.checks,\n {\n kind,\n value,\n inclusive,\n message: errorUtil.toString(message)\n }\n ]\n });\n }\n _addCheck(check) {\n return new _ZodNumber({\n ...this._def,\n checks: [...this._def.checks, check]\n });\n }\n int(message) {\n return this._addCheck({\n kind: \"int\",\n message: errorUtil.toString(message)\n });\n }\n positive(message) {\n return this._addCheck({\n kind: \"min\",\n value: 0,\n inclusive: false,\n message: errorUtil.toString(message)\n });\n }\n negative(message) {\n return this._addCheck({\n kind: \"max\",\n value: 0,\n inclusive: false,\n message: errorUtil.toString(message)\n });\n }\n nonpositive(message) {\n return this._addCheck({\n kind: \"max\",\n value: 0,\n inclusive: true,\n message: errorUtil.toString(message)\n });\n }\n nonnegative(message) {\n return this._addCheck({\n kind: \"min\",\n value: 0,\n inclusive: true,\n message: errorUtil.toString(message)\n });\n }\n multipleOf(value, message) {\n return this._addCheck({\n kind: \"multipleOf\",\n value,\n message: errorUtil.toString(message)\n });\n }\n finite(message) {\n return this._addCheck({\n kind: \"finite\",\n message: errorUtil.toString(message)\n });\n }\n safe(message) {\n return this._addCheck({\n kind: \"min\",\n inclusive: true,\n value: Number.MIN_SAFE_INTEGER,\n message: errorUtil.toString(message)\n })._addCheck({\n kind: \"max\",\n inclusive: true,\n value: Number.MAX_SAFE_INTEGER,\n message: errorUtil.toString(message)\n });\n }\n get minValue() {\n let min = null;\n for (const ch of this._def.checks) {\n if (ch.kind === \"min\") {\n if (min === null || ch.value > min)\n min = ch.value;\n }\n }\n return min;\n }\n get maxValue() {\n let max = null;\n for (const ch of this._def.checks) {\n if (ch.kind === \"max\") {\n if (max === null || ch.value < max)\n max = ch.value;\n }\n }\n return max;\n }\n get isInt() {\n return !!this._def.checks.find((ch) => ch.kind === \"int\" || ch.kind === \"multipleOf\" && util.isInteger(ch.value));\n }\n get isFinite() {\n let max = null;\n let min = null;\n for (const ch of this._def.checks) {\n if (ch.kind === \"finite\" || ch.kind === \"int\" || ch.kind === \"multipleOf\") {\n return true;\n } else if (ch.kind === \"min\") {\n if (min === null || ch.value > min)\n min = ch.value;\n } else if (ch.kind === \"max\") {\n if (max === null || ch.value < max)\n max = ch.value;\n }\n }\n return Number.isFinite(min) && Number.isFinite(max);\n }\n };\n ZodNumber.create = (params) => {\n return new ZodNumber({\n checks: [],\n typeName: ZodFirstPartyTypeKind.ZodNumber,\n coerce: params?.coerce || false,\n ...processCreateParams(params)\n });\n };\n ZodBigInt = class _ZodBigInt extends ZodType {\n constructor() {\n super(...arguments);\n this.min = this.gte;\n this.max = this.lte;\n }\n _parse(input) {\n if (this._def.coerce) {\n try {\n input.data = BigInt(input.data);\n } catch {\n return this._getInvalidInput(input);\n }\n }\n const parsedType = this._getType(input);\n if (parsedType !== ZodParsedType.bigint) {\n return this._getInvalidInput(input);\n }\n let ctx = void 0;\n const status = new ParseStatus();\n for (const check of this._def.checks) {\n if (check.kind === \"min\") {\n const tooSmall = check.inclusive ? input.data < check.value : input.data <= check.value;\n if (tooSmall) {\n ctx = this._getOrReturnCtx(input, ctx);\n addIssueToContext(ctx, {\n code: ZodIssueCode.too_small,\n type: \"bigint\",\n minimum: check.value,\n inclusive: check.inclusive,\n message: check.message\n });\n status.dirty();\n }\n } else if (check.kind === \"max\") {\n const tooBig = check.inclusive ? input.data > check.value : input.data >= check.value;\n if (tooBig) {\n ctx = this._getOrReturnCtx(input, ctx);\n addIssueToContext(ctx, {\n code: ZodIssueCode.too_big,\n type: \"bigint\",\n maximum: check.value,\n inclusive: check.inclusive,\n message: check.message\n });\n status.dirty();\n }\n } else if (check.kind === \"multipleOf\") {\n if (input.data % check.value !== BigInt(0)) {\n ctx = this._getOrReturnCtx(input, ctx);\n addIssueToContext(ctx, {\n code: ZodIssueCode.not_multiple_of,\n multipleOf: check.value,\n message: check.message\n });\n status.dirty();\n }\n } else {\n util.assertNever(check);\n }\n }\n return { status: status.value, value: input.data };\n }\n _getInvalidInput(input) {\n const ctx = this._getOrReturnCtx(input);\n addIssueToContext(ctx, {\n code: ZodIssueCode.invalid_type,\n expected: ZodParsedType.bigint,\n received: ctx.parsedType\n });\n return INVALID;\n }\n gte(value, message) {\n return this.setLimit(\"min\", value, true, errorUtil.toString(message));\n }\n gt(value, message) {\n return this.setLimit(\"min\", value, false, errorUtil.toString(message));\n }\n lte(value, message) {\n return this.setLimit(\"max\", value, true, errorUtil.toString(message));\n }\n lt(value, message) {\n return this.setLimit(\"max\", value, false, errorUtil.toString(message));\n }\n setLimit(kind, value, inclusive, message) {\n return new _ZodBigInt({\n ...this._def,\n checks: [\n ...this._def.checks,\n {\n kind,\n value,\n inclusive,\n message: errorUtil.toString(message)\n }\n ]\n });\n }\n _addCheck(check) {\n return new _ZodBigInt({\n ...this._def,\n checks: [...this._def.checks, check]\n });\n }\n positive(message) {\n return this._addCheck({\n kind: \"min\",\n value: BigInt(0),\n inclusive: false,\n message: errorUtil.toString(message)\n });\n }\n negative(message) {\n return this._addCheck({\n kind: \"max\",\n value: BigInt(0),\n inclusive: false,\n message: errorUtil.toString(message)\n });\n }\n nonpositive(message) {\n return this._addCheck({\n kind: \"max\",\n value: BigInt(0),\n inclusive: true,\n message: errorUtil.toString(message)\n });\n }\n nonnegative(message) {\n return this._addCheck({\n kind: \"min\",\n value: BigInt(0),\n inclusive: true,\n message: errorUtil.toString(message)\n });\n }\n multipleOf(value, message) {\n return this._addCheck({\n kind: \"multipleOf\",\n value,\n message: errorUtil.toString(message)\n });\n }\n get minValue() {\n let min = null;\n for (const ch of this._def.checks) {\n if (ch.kind === \"min\") {\n if (min === null || ch.value > min)\n min = ch.value;\n }\n }\n return min;\n }\n get maxValue() {\n let max = null;\n for (const ch of this._def.checks) {\n if (ch.kind === \"max\") {\n if (max === null || ch.value < max)\n max = ch.value;\n }\n }\n return max;\n }\n };\n ZodBigInt.create = (params) => {\n return new ZodBigInt({\n checks: [],\n typeName: ZodFirstPartyTypeKind.ZodBigInt,\n coerce: params?.coerce ?? false,\n ...processCreateParams(params)\n });\n };\n ZodBoolean = class extends ZodType {\n _parse(input) {\n if (this._def.coerce) {\n input.data = Boolean(input.data);\n }\n const parsedType = this._getType(input);\n if (parsedType !== ZodParsedType.boolean) {\n const ctx = this._getOrReturnCtx(input);\n addIssueToContext(ctx, {\n code: ZodIssueCode.invalid_type,\n expected: ZodParsedType.boolean,\n received: ctx.parsedType\n });\n return INVALID;\n }\n return OK(input.data);\n }\n };\n ZodBoolean.create = (params) => {\n return new ZodBoolean({\n typeName: ZodFirstPartyTypeKind.ZodBoolean,\n coerce: params?.coerce || false,\n ...processCreateParams(params)\n });\n };\n ZodDate = class _ZodDate extends ZodType {\n _parse(input) {\n if (this._def.coerce) {\n input.data = new Date(input.data);\n }\n const parsedType = this._getType(input);\n if (parsedType !== ZodParsedType.date) {\n const ctx2 = this._getOrReturnCtx(input);\n addIssueToContext(ctx2, {\n code: ZodIssueCode.invalid_type,\n expected: ZodParsedType.date,\n received: ctx2.parsedType\n });\n return INVALID;\n }\n if (Number.isNaN(input.data.getTime())) {\n const ctx2 = this._getOrReturnCtx(input);\n addIssueToContext(ctx2, {\n code: ZodIssueCode.invalid_date\n });\n return INVALID;\n }\n const status = new ParseStatus();\n let ctx = void 0;\n for (const check of this._def.checks) {\n if (check.kind === \"min\") {\n if (input.data.getTime() < check.value) {\n ctx = this._getOrReturnCtx(input, ctx);\n addIssueToContext(ctx, {\n code: ZodIssueCode.too_small,\n message: check.message,\n inclusive: true,\n exact: false,\n minimum: check.value,\n type: \"date\"\n });\n status.dirty();\n }\n } else if (check.kind === \"max\") {\n if (input.data.getTime() > check.value) {\n ctx = this._getOrReturnCtx(input, ctx);\n addIssueToContext(ctx, {\n code: ZodIssueCode.too_big,\n message: check.message,\n inclusive: true,\n exact: false,\n maximum: check.value,\n type: \"date\"\n });\n status.dirty();\n }\n } else {\n util.assertNever(check);\n }\n }\n return {\n status: status.value,\n value: new Date(input.data.getTime())\n };\n }\n _addCheck(check) {\n return new _ZodDate({\n ...this._def,\n checks: [...this._def.checks, check]\n });\n }\n min(minDate, message) {\n return this._addCheck({\n kind: \"min\",\n value: minDate.getTime(),\n message: errorUtil.toString(message)\n });\n }\n max(maxDate, message) {\n return this._addCheck({\n kind: \"max\",\n value: maxDate.getTime(),\n message: errorUtil.toString(message)\n });\n }\n get minDate() {\n let min = null;\n for (const ch of this._def.checks) {\n if (ch.kind === \"min\") {\n if (min === null || ch.value > min)\n min = ch.value;\n }\n }\n return min != null ? new Date(min) : null;\n }\n get maxDate() {\n let max = null;\n for (const ch of this._def.checks) {\n if (ch.kind === \"max\") {\n if (max === null || ch.value < max)\n max = ch.value;\n }\n }\n return max != null ? new Date(max) : null;\n }\n };\n ZodDate.create = (params) => {\n return new ZodDate({\n checks: [],\n coerce: params?.coerce || false,\n typeName: ZodFirstPartyTypeKind.ZodDate,\n ...processCreateParams(params)\n });\n };\n ZodSymbol = class extends ZodType {\n _parse(input) {\n const parsedType = this._getType(input);\n if (parsedType !== ZodParsedType.symbol) {\n const ctx = this._getOrReturnCtx(input);\n addIssueToContext(ctx, {\n code: ZodIssueCode.invalid_type,\n expected: ZodParsedType.symbol,\n received: ctx.parsedType\n });\n return INVALID;\n }\n return OK(input.data);\n }\n };\n ZodSymbol.create = (params) => {\n return new ZodSymbol({\n typeName: ZodFirstPartyTypeKind.ZodSymbol,\n ...processCreateParams(params)\n });\n };\n ZodUndefined = class extends ZodType {\n _parse(input) {\n const parsedType = this._getType(input);\n if (parsedType !== ZodParsedType.undefined) {\n const ctx = this._getOrReturnCtx(input);\n addIssueToContext(ctx, {\n code: ZodIssueCode.invalid_type,\n expected: ZodParsedType.undefined,\n received: ctx.parsedType\n });\n return INVALID;\n }\n return OK(input.data);\n }\n };\n ZodUndefined.create = (params) => {\n return new ZodUndefined({\n typeName: ZodFirstPartyTypeKind.ZodUndefined,\n ...processCreateParams(params)\n });\n };\n ZodNull = class extends ZodType {\n _parse(input) {\n const parsedType = this._getType(input);\n if (parsedType !== ZodParsedType.null) {\n const ctx = this._getOrReturnCtx(input);\n addIssueToContext(ctx, {\n code: ZodIssueCode.invalid_type,\n expected: ZodParsedType.null,\n received: ctx.parsedType\n });\n return INVALID;\n }\n return OK(input.data);\n }\n };\n ZodNull.create = (params) => {\n return new ZodNull({\n typeName: ZodFirstPartyTypeKind.ZodNull,\n ...processCreateParams(params)\n });\n };\n ZodAny = class extends ZodType {\n constructor() {\n super(...arguments);\n this._any = true;\n }\n _parse(input) {\n return OK(input.data);\n }\n };\n ZodAny.create = (params) => {\n return new ZodAny({\n typeName: ZodFirstPartyTypeKind.ZodAny,\n ...processCreateParams(params)\n });\n };\n ZodUnknown = class extends ZodType {\n constructor() {\n super(...arguments);\n this._unknown = true;\n }\n _parse(input) {\n return OK(input.data);\n }\n };\n ZodUnknown.create = (params) => {\n return new ZodUnknown({\n typeName: ZodFirstPartyTypeKind.ZodUnknown,\n ...processCreateParams(params)\n });\n };\n ZodNever = class extends ZodType {\n _parse(input) {\n const ctx = this._getOrReturnCtx(input);\n addIssueToContext(ctx, {\n code: ZodIssueCode.invalid_type,\n expected: ZodParsedType.never,\n received: ctx.parsedType\n });\n return INVALID;\n }\n };\n ZodNever.create = (params) => {\n return new ZodNever({\n typeName: ZodFirstPartyTypeKind.ZodNever,\n ...processCreateParams(params)\n });\n };\n ZodVoid = class extends ZodType {\n _parse(input) {\n const parsedType = this._getType(input);\n if (parsedType !== ZodParsedType.undefined) {\n const ctx = this._getOrReturnCtx(input);\n addIssueToContext(ctx, {\n code: ZodIssueCode.invalid_type,\n expected: ZodParsedType.void,\n received: ctx.parsedType\n });\n return INVALID;\n }\n return OK(input.data);\n }\n };\n ZodVoid.create = (params) => {\n return new ZodVoid({\n typeName: ZodFirstPartyTypeKind.ZodVoid,\n ...processCreateParams(params)\n });\n };\n ZodArray = class _ZodArray extends ZodType {\n _parse(input) {\n const { ctx, status } = this._processInputParams(input);\n const def = this._def;\n if (ctx.parsedType !== ZodParsedType.array) {\n addIssueToContext(ctx, {\n code: ZodIssueCode.invalid_type,\n expected: ZodParsedType.array,\n received: ctx.parsedType\n });\n return INVALID;\n }\n if (def.exactLength !== null) {\n const tooBig = ctx.data.length > def.exactLength.value;\n const tooSmall = ctx.data.length < def.exactLength.value;\n if (tooBig || tooSmall) {\n addIssueToContext(ctx, {\n code: tooBig ? ZodIssueCode.too_big : ZodIssueCode.too_small,\n minimum: tooSmall ? def.exactLength.value : void 0,\n maximum: tooBig ? def.exactLength.value : void 0,\n type: \"array\",\n inclusive: true,\n exact: true,\n message: def.exactLength.message\n });\n status.dirty();\n }\n }\n if (def.minLength !== null) {\n if (ctx.data.length < def.minLength.value) {\n addIssueToContext(ctx, {\n code: ZodIssueCode.too_small,\n minimum: def.minLength.value,\n type: \"array\",\n inclusive: true,\n exact: false,\n message: def.minLength.message\n });\n status.dirty();\n }\n }\n if (def.maxLength !== null) {\n if (ctx.data.length > def.maxLength.value) {\n addIssueToContext(ctx, {\n code: ZodIssueCode.too_big,\n maximum: def.maxLength.value,\n type: \"array\",\n inclusive: true,\n exact: false,\n message: def.maxLength.message\n });\n status.dirty();\n }\n }\n if (ctx.common.async) {\n return Promise.all([...ctx.data].map((item, i3) => {\n return def.type._parseAsync(new ParseInputLazyPath(ctx, item, ctx.path, i3));\n })).then((result2) => {\n return ParseStatus.mergeArray(status, result2);\n });\n }\n const result = [...ctx.data].map((item, i3) => {\n return def.type._parseSync(new ParseInputLazyPath(ctx, item, ctx.path, i3));\n });\n return ParseStatus.mergeArray(status, result);\n }\n get element() {\n return this._def.type;\n }\n min(minLength2, message) {\n return new _ZodArray({\n ...this._def,\n minLength: { value: minLength2, message: errorUtil.toString(message) }\n });\n }\n max(maxLength, message) {\n return new _ZodArray({\n ...this._def,\n maxLength: { value: maxLength, message: errorUtil.toString(message) }\n });\n }\n length(len, message) {\n return new _ZodArray({\n ...this._def,\n exactLength: { value: len, message: errorUtil.toString(message) }\n });\n }\n nonempty(message) {\n return this.min(1, message);\n }\n };\n ZodArray.create = (schema, params) => {\n return new ZodArray({\n type: schema,\n minLength: null,\n maxLength: null,\n exactLength: null,\n typeName: ZodFirstPartyTypeKind.ZodArray,\n ...processCreateParams(params)\n });\n };\n ZodObject = class _ZodObject extends ZodType {\n constructor() {\n super(...arguments);\n this._cached = null;\n this.nonstrict = this.passthrough;\n this.augment = this.extend;\n }\n _getCached() {\n if (this._cached !== null)\n return this._cached;\n const shape3 = this._def.shape();\n const keys = util.objectKeys(shape3);\n this._cached = { shape: shape3, keys };\n return this._cached;\n }\n _parse(input) {\n const parsedType = this._getType(input);\n if (parsedType !== ZodParsedType.object) {\n const ctx2 = this._getOrReturnCtx(input);\n addIssueToContext(ctx2, {\n code: ZodIssueCode.invalid_type,\n expected: ZodParsedType.object,\n received: ctx2.parsedType\n });\n return INVALID;\n }\n const { status, ctx } = this._processInputParams(input);\n const { shape: shape3, keys: shapeKeys } = this._getCached();\n const extraKeys = [];\n if (!(this._def.catchall instanceof ZodNever && this._def.unknownKeys === \"strip\")) {\n for (const key in ctx.data) {\n if (!shapeKeys.includes(key)) {\n extraKeys.push(key);\n }\n }\n }\n const pairs = [];\n for (const key of shapeKeys) {\n const keyValidator = shape3[key];\n const value = ctx.data[key];\n pairs.push({\n key: { status: \"valid\", value: key },\n value: keyValidator._parse(new ParseInputLazyPath(ctx, value, ctx.path, key)),\n alwaysSet: key in ctx.data\n });\n }\n if (this._def.catchall instanceof ZodNever) {\n const unknownKeys = this._def.unknownKeys;\n if (unknownKeys === \"passthrough\") {\n for (const key of extraKeys) {\n pairs.push({\n key: { status: \"valid\", value: key },\n value: { status: \"valid\", value: ctx.data[key] }\n });\n }\n } else if (unknownKeys === \"strict\") {\n if (extraKeys.length > 0) {\n addIssueToContext(ctx, {\n code: ZodIssueCode.unrecognized_keys,\n keys: extraKeys\n });\n status.dirty();\n }\n } else if (unknownKeys === \"strip\") {\n } else {\n throw new Error(`Internal ZodObject error: invalid unknownKeys value.`);\n }\n } else {\n const catchall = this._def.catchall;\n for (const key of extraKeys) {\n const value = ctx.data[key];\n pairs.push({\n key: { status: \"valid\", value: key },\n value: catchall._parse(\n new ParseInputLazyPath(ctx, value, ctx.path, key)\n //, ctx.child(key), value, getParsedType(value)\n ),\n alwaysSet: key in ctx.data\n });\n }\n }\n if (ctx.common.async) {\n return Promise.resolve().then(async () => {\n const syncPairs = [];\n for (const pair of pairs) {\n const key = await pair.key;\n const value = await pair.value;\n syncPairs.push({\n key,\n value,\n alwaysSet: pair.alwaysSet\n });\n }\n return syncPairs;\n }).then((syncPairs) => {\n return ParseStatus.mergeObjectSync(status, syncPairs);\n });\n } else {\n return ParseStatus.mergeObjectSync(status, pairs);\n }\n }\n get shape() {\n return this._def.shape();\n }\n strict(message) {\n errorUtil.errToObj;\n return new _ZodObject({\n ...this._def,\n unknownKeys: \"strict\",\n ...message !== void 0 ? {\n errorMap: (issue, ctx) => {\n const defaultError = this._def.errorMap?.(issue, ctx).message ?? ctx.defaultError;\n if (issue.code === \"unrecognized_keys\")\n return {\n message: errorUtil.errToObj(message).message ?? defaultError\n };\n return {\n message: defaultError\n };\n }\n } : {}\n });\n }\n strip() {\n return new _ZodObject({\n ...this._def,\n unknownKeys: \"strip\"\n });\n }\n passthrough() {\n return new _ZodObject({\n ...this._def,\n unknownKeys: \"passthrough\"\n });\n }\n // const AugmentFactory =\n // (def: Def) =>\n // (\n // augmentation: Augmentation\n // ): ZodObject<\n // extendShape, Augmentation>,\n // Def[\"unknownKeys\"],\n // Def[\"catchall\"]\n // > => {\n // return new ZodObject({\n // ...def,\n // shape: () => ({\n // ...def.shape(),\n // ...augmentation,\n // }),\n // }) as any;\n // };\n extend(augmentation) {\n return new _ZodObject({\n ...this._def,\n shape: () => ({\n ...this._def.shape(),\n ...augmentation\n })\n });\n }\n /**\n * Prior to zod@1.0.12 there was a bug in the\n * inferred type of merged objects. Please\n * upgrade if you are experiencing issues.\n */\n merge(merging) {\n const merged = new _ZodObject({\n unknownKeys: merging._def.unknownKeys,\n catchall: merging._def.catchall,\n shape: () => ({\n ...this._def.shape(),\n ...merging._def.shape()\n }),\n typeName: ZodFirstPartyTypeKind.ZodObject\n });\n return merged;\n }\n // merge<\n // Incoming extends AnyZodObject,\n // Augmentation extends Incoming[\"shape\"],\n // NewOutput extends {\n // [k in keyof Augmentation | keyof Output]: k extends keyof Augmentation\n // ? Augmentation[k][\"_output\"]\n // : k extends keyof Output\n // ? Output[k]\n // : never;\n // },\n // NewInput extends {\n // [k in keyof Augmentation | keyof Input]: k extends keyof Augmentation\n // ? Augmentation[k][\"_input\"]\n // : k extends keyof Input\n // ? Input[k]\n // : never;\n // }\n // >(\n // merging: Incoming\n // ): ZodObject<\n // extendShape>,\n // Incoming[\"_def\"][\"unknownKeys\"],\n // Incoming[\"_def\"][\"catchall\"],\n // NewOutput,\n // NewInput\n // > {\n // const merged: any = new ZodObject({\n // unknownKeys: merging._def.unknownKeys,\n // catchall: merging._def.catchall,\n // shape: () =>\n // objectUtil.mergeShapes(this._def.shape(), merging._def.shape()),\n // typeName: ZodFirstPartyTypeKind.ZodObject,\n // }) as any;\n // return merged;\n // }\n setKey(key, schema) {\n return this.augment({ [key]: schema });\n }\n // merge(\n // merging: Incoming\n // ): //ZodObject = (merging) => {\n // ZodObject<\n // extendShape>,\n // Incoming[\"_def\"][\"unknownKeys\"],\n // Incoming[\"_def\"][\"catchall\"]\n // > {\n // // const mergedShape = objectUtil.mergeShapes(\n // // this._def.shape(),\n // // merging._def.shape()\n // // );\n // const merged: any = new ZodObject({\n // unknownKeys: merging._def.unknownKeys,\n // catchall: merging._def.catchall,\n // shape: () =>\n // objectUtil.mergeShapes(this._def.shape(), merging._def.shape()),\n // typeName: ZodFirstPartyTypeKind.ZodObject,\n // }) as any;\n // return merged;\n // }\n catchall(index2) {\n return new _ZodObject({\n ...this._def,\n catchall: index2\n });\n }\n pick(mask) {\n const shape3 = {};\n for (const key of util.objectKeys(mask)) {\n if (mask[key] && this.shape[key]) {\n shape3[key] = this.shape[key];\n }\n }\n return new _ZodObject({\n ...this._def,\n shape: () => shape3\n });\n }\n omit(mask) {\n const shape3 = {};\n for (const key of util.objectKeys(this.shape)) {\n if (!mask[key]) {\n shape3[key] = this.shape[key];\n }\n }\n return new _ZodObject({\n ...this._def,\n shape: () => shape3\n });\n }\n /**\n * @deprecated\n */\n deepPartial() {\n return deepPartialify(this);\n }\n partial(mask) {\n const newShape = {};\n for (const key of util.objectKeys(this.shape)) {\n const fieldSchema = this.shape[key];\n if (mask && !mask[key]) {\n newShape[key] = fieldSchema;\n } else {\n newShape[key] = fieldSchema.optional();\n }\n }\n return new _ZodObject({\n ...this._def,\n shape: () => newShape\n });\n }\n required(mask) {\n const newShape = {};\n for (const key of util.objectKeys(this.shape)) {\n if (mask && !mask[key]) {\n newShape[key] = this.shape[key];\n } else {\n const fieldSchema = this.shape[key];\n let newField = fieldSchema;\n while (newField instanceof ZodOptional) {\n newField = newField._def.innerType;\n }\n newShape[key] = newField;\n }\n }\n return new _ZodObject({\n ...this._def,\n shape: () => newShape\n });\n }\n keyof() {\n return createZodEnum(util.objectKeys(this.shape));\n }\n };\n ZodObject.create = (shape3, params) => {\n return new ZodObject({\n shape: () => shape3,\n unknownKeys: \"strip\",\n catchall: ZodNever.create(),\n typeName: ZodFirstPartyTypeKind.ZodObject,\n ...processCreateParams(params)\n });\n };\n ZodObject.strictCreate = (shape3, params) => {\n return new ZodObject({\n shape: () => shape3,\n unknownKeys: \"strict\",\n catchall: ZodNever.create(),\n typeName: ZodFirstPartyTypeKind.ZodObject,\n ...processCreateParams(params)\n });\n };\n ZodObject.lazycreate = (shape3, params) => {\n return new ZodObject({\n shape: shape3,\n unknownKeys: \"strip\",\n catchall: ZodNever.create(),\n typeName: ZodFirstPartyTypeKind.ZodObject,\n ...processCreateParams(params)\n });\n };\n ZodUnion = class extends ZodType {\n _parse(input) {\n const { ctx } = this._processInputParams(input);\n const options = this._def.options;\n function handleResults(results) {\n for (const result of results) {\n if (result.result.status === \"valid\") {\n return result.result;\n }\n }\n for (const result of results) {\n if (result.result.status === \"dirty\") {\n ctx.common.issues.push(...result.ctx.common.issues);\n return result.result;\n }\n }\n const unionErrors = results.map((result) => new ZodError(result.ctx.common.issues));\n addIssueToContext(ctx, {\n code: ZodIssueCode.invalid_union,\n unionErrors\n });\n return INVALID;\n }\n if (ctx.common.async) {\n return Promise.all(options.map(async (option) => {\n const childCtx = {\n ...ctx,\n common: {\n ...ctx.common,\n issues: []\n },\n parent: null\n };\n return {\n result: await option._parseAsync({\n data: ctx.data,\n path: ctx.path,\n parent: childCtx\n }),\n ctx: childCtx\n };\n })).then(handleResults);\n } else {\n let dirty = void 0;\n const issues = [];\n for (const option of options) {\n const childCtx = {\n ...ctx,\n common: {\n ...ctx.common,\n issues: []\n },\n parent: null\n };\n const result = option._parseSync({\n data: ctx.data,\n path: ctx.path,\n parent: childCtx\n });\n if (result.status === \"valid\") {\n return result;\n } else if (result.status === \"dirty\" && !dirty) {\n dirty = { result, ctx: childCtx };\n }\n if (childCtx.common.issues.length) {\n issues.push(childCtx.common.issues);\n }\n }\n if (dirty) {\n ctx.common.issues.push(...dirty.ctx.common.issues);\n return dirty.result;\n }\n const unionErrors = issues.map((issues2) => new ZodError(issues2));\n addIssueToContext(ctx, {\n code: ZodIssueCode.invalid_union,\n unionErrors\n });\n return INVALID;\n }\n }\n get options() {\n return this._def.options;\n }\n };\n ZodUnion.create = (types, params) => {\n return new ZodUnion({\n options: types,\n typeName: ZodFirstPartyTypeKind.ZodUnion,\n ...processCreateParams(params)\n });\n };\n getDiscriminator = (type) => {\n if (type instanceof ZodLazy) {\n return getDiscriminator(type.schema);\n } else if (type instanceof ZodEffects) {\n return getDiscriminator(type.innerType());\n } else if (type instanceof ZodLiteral) {\n return [type.value];\n } else if (type instanceof ZodEnum) {\n return type.options;\n } else if (type instanceof ZodNativeEnum) {\n return util.objectValues(type.enum);\n } else if (type instanceof ZodDefault) {\n return getDiscriminator(type._def.innerType);\n } else if (type instanceof ZodUndefined) {\n return [void 0];\n } else if (type instanceof ZodNull) {\n return [null];\n } else if (type instanceof ZodOptional) {\n return [void 0, ...getDiscriminator(type.unwrap())];\n } else if (type instanceof ZodNullable) {\n return [null, ...getDiscriminator(type.unwrap())];\n } else if (type instanceof ZodBranded) {\n return getDiscriminator(type.unwrap());\n } else if (type instanceof ZodReadonly) {\n return getDiscriminator(type.unwrap());\n } else if (type instanceof ZodCatch) {\n return getDiscriminator(type._def.innerType);\n } else {\n return [];\n }\n };\n ZodDiscriminatedUnion = class _ZodDiscriminatedUnion extends ZodType {\n _parse(input) {\n const { ctx } = this._processInputParams(input);\n if (ctx.parsedType !== ZodParsedType.object) {\n addIssueToContext(ctx, {\n code: ZodIssueCode.invalid_type,\n expected: ZodParsedType.object,\n received: ctx.parsedType\n });\n return INVALID;\n }\n const discriminator = this.discriminator;\n const discriminatorValue = ctx.data[discriminator];\n const option = this.optionsMap.get(discriminatorValue);\n if (!option) {\n addIssueToContext(ctx, {\n code: ZodIssueCode.invalid_union_discriminator,\n options: Array.from(this.optionsMap.keys()),\n path: [discriminator]\n });\n return INVALID;\n }\n if (ctx.common.async) {\n return option._parseAsync({\n data: ctx.data,\n path: ctx.path,\n parent: ctx\n });\n } else {\n return option._parseSync({\n data: ctx.data,\n path: ctx.path,\n parent: ctx\n });\n }\n }\n get discriminator() {\n return this._def.discriminator;\n }\n get options() {\n return this._def.options;\n }\n get optionsMap() {\n return this._def.optionsMap;\n }\n /**\n * The constructor of the discriminated union schema. Its behaviour is very similar to that of the normal z.union() constructor.\n * However, it only allows a union of objects, all of which need to share a discriminator property. This property must\n * have a different value for each object in the union.\n * @param discriminator the name of the discriminator property\n * @param types an array of object schemas\n * @param params\n */\n static create(discriminator, options, params) {\n const optionsMap = /* @__PURE__ */ new Map();\n for (const type of options) {\n const discriminatorValues = getDiscriminator(type.shape[discriminator]);\n if (!discriminatorValues.length) {\n throw new Error(`A discriminator value for key \\`${discriminator}\\` could not be extracted from all schema options`);\n }\n for (const value of discriminatorValues) {\n if (optionsMap.has(value)) {\n throw new Error(`Discriminator property ${String(discriminator)} has duplicate value ${String(value)}`);\n }\n optionsMap.set(value, type);\n }\n }\n return new _ZodDiscriminatedUnion({\n typeName: ZodFirstPartyTypeKind.ZodDiscriminatedUnion,\n discriminator,\n options,\n optionsMap,\n ...processCreateParams(params)\n });\n }\n };\n ZodIntersection = class extends ZodType {\n _parse(input) {\n const { status, ctx } = this._processInputParams(input);\n const handleParsed = (parsedLeft, parsedRight) => {\n if (isAborted(parsedLeft) || isAborted(parsedRight)) {\n return INVALID;\n }\n const merged = mergeValues(parsedLeft.value, parsedRight.value);\n if (!merged.valid) {\n addIssueToContext(ctx, {\n code: ZodIssueCode.invalid_intersection_types\n });\n return INVALID;\n }\n if (isDirty(parsedLeft) || isDirty(parsedRight)) {\n status.dirty();\n }\n return { status: status.value, value: merged.data };\n };\n if (ctx.common.async) {\n return Promise.all([\n this._def.left._parseAsync({\n data: ctx.data,\n path: ctx.path,\n parent: ctx\n }),\n this._def.right._parseAsync({\n data: ctx.data,\n path: ctx.path,\n parent: ctx\n })\n ]).then(([left, right]) => handleParsed(left, right));\n } else {\n return handleParsed(this._def.left._parseSync({\n data: ctx.data,\n path: ctx.path,\n parent: ctx\n }), this._def.right._parseSync({\n data: ctx.data,\n path: ctx.path,\n parent: ctx\n }));\n }\n }\n };\n ZodIntersection.create = (left, right, params) => {\n return new ZodIntersection({\n left,\n right,\n typeName: ZodFirstPartyTypeKind.ZodIntersection,\n ...processCreateParams(params)\n });\n };\n ZodTuple = class _ZodTuple extends ZodType {\n _parse(input) {\n const { status, ctx } = this._processInputParams(input);\n if (ctx.parsedType !== ZodParsedType.array) {\n addIssueToContext(ctx, {\n code: ZodIssueCode.invalid_type,\n expected: ZodParsedType.array,\n received: ctx.parsedType\n });\n return INVALID;\n }\n if (ctx.data.length < this._def.items.length) {\n addIssueToContext(ctx, {\n code: ZodIssueCode.too_small,\n minimum: this._def.items.length,\n inclusive: true,\n exact: false,\n type: \"array\"\n });\n return INVALID;\n }\n const rest = this._def.rest;\n if (!rest && ctx.data.length > this._def.items.length) {\n addIssueToContext(ctx, {\n code: ZodIssueCode.too_big,\n maximum: this._def.items.length,\n inclusive: true,\n exact: false,\n type: \"array\"\n });\n status.dirty();\n }\n const items = [...ctx.data].map((item, itemIndex) => {\n const schema = this._def.items[itemIndex] || this._def.rest;\n if (!schema)\n return null;\n return schema._parse(new ParseInputLazyPath(ctx, item, ctx.path, itemIndex));\n }).filter((x4) => !!x4);\n if (ctx.common.async) {\n return Promise.all(items).then((results) => {\n return ParseStatus.mergeArray(status, results);\n });\n } else {\n return ParseStatus.mergeArray(status, items);\n }\n }\n get items() {\n return this._def.items;\n }\n rest(rest) {\n return new _ZodTuple({\n ...this._def,\n rest\n });\n }\n };\n ZodTuple.create = (schemas, params) => {\n if (!Array.isArray(schemas)) {\n throw new Error(\"You must pass an array of schemas to z.tuple([ ... ])\");\n }\n return new ZodTuple({\n items: schemas,\n typeName: ZodFirstPartyTypeKind.ZodTuple,\n rest: null,\n ...processCreateParams(params)\n });\n };\n ZodRecord = class _ZodRecord extends ZodType {\n get keySchema() {\n return this._def.keyType;\n }\n get valueSchema() {\n return this._def.valueType;\n }\n _parse(input) {\n const { status, ctx } = this._processInputParams(input);\n if (ctx.parsedType !== ZodParsedType.object) {\n addIssueToContext(ctx, {\n code: ZodIssueCode.invalid_type,\n expected: ZodParsedType.object,\n received: ctx.parsedType\n });\n return INVALID;\n }\n const pairs = [];\n const keyType = this._def.keyType;\n const valueType = this._def.valueType;\n for (const key in ctx.data) {\n pairs.push({\n key: keyType._parse(new ParseInputLazyPath(ctx, key, ctx.path, key)),\n value: valueType._parse(new ParseInputLazyPath(ctx, ctx.data[key], ctx.path, key)),\n alwaysSet: key in ctx.data\n });\n }\n if (ctx.common.async) {\n return ParseStatus.mergeObjectAsync(status, pairs);\n } else {\n return ParseStatus.mergeObjectSync(status, pairs);\n }\n }\n get element() {\n return this._def.valueType;\n }\n static create(first, second, third) {\n if (second instanceof ZodType) {\n return new _ZodRecord({\n keyType: first,\n valueType: second,\n typeName: ZodFirstPartyTypeKind.ZodRecord,\n ...processCreateParams(third)\n });\n }\n return new _ZodRecord({\n keyType: ZodString.create(),\n valueType: first,\n typeName: ZodFirstPartyTypeKind.ZodRecord,\n ...processCreateParams(second)\n });\n }\n };\n ZodMap = class extends ZodType {\n get keySchema() {\n return this._def.keyType;\n }\n get valueSchema() {\n return this._def.valueType;\n }\n _parse(input) {\n const { status, ctx } = this._processInputParams(input);\n if (ctx.parsedType !== ZodParsedType.map) {\n addIssueToContext(ctx, {\n code: ZodIssueCode.invalid_type,\n expected: ZodParsedType.map,\n received: ctx.parsedType\n });\n return INVALID;\n }\n const keyType = this._def.keyType;\n const valueType = this._def.valueType;\n const pairs = [...ctx.data.entries()].map(([key, value], index2) => {\n return {\n key: keyType._parse(new ParseInputLazyPath(ctx, key, ctx.path, [index2, \"key\"])),\n value: valueType._parse(new ParseInputLazyPath(ctx, value, ctx.path, [index2, \"value\"]))\n };\n });\n if (ctx.common.async) {\n const finalMap = /* @__PURE__ */ new Map();\n return Promise.resolve().then(async () => {\n for (const pair of pairs) {\n const key = await pair.key;\n const value = await pair.value;\n if (key.status === \"aborted\" || value.status === \"aborted\") {\n return INVALID;\n }\n if (key.status === \"dirty\" || value.status === \"dirty\") {\n status.dirty();\n }\n finalMap.set(key.value, value.value);\n }\n return { status: status.value, value: finalMap };\n });\n } else {\n const finalMap = /* @__PURE__ */ new Map();\n for (const pair of pairs) {\n const key = pair.key;\n const value = pair.value;\n if (key.status === \"aborted\" || value.status === \"aborted\") {\n return INVALID;\n }\n if (key.status === \"dirty\" || value.status === \"dirty\") {\n status.dirty();\n }\n finalMap.set(key.value, value.value);\n }\n return { status: status.value, value: finalMap };\n }\n }\n };\n ZodMap.create = (keyType, valueType, params) => {\n return new ZodMap({\n valueType,\n keyType,\n typeName: ZodFirstPartyTypeKind.ZodMap,\n ...processCreateParams(params)\n });\n };\n ZodSet = class _ZodSet extends ZodType {\n _parse(input) {\n const { status, ctx } = this._processInputParams(input);\n if (ctx.parsedType !== ZodParsedType.set) {\n addIssueToContext(ctx, {\n code: ZodIssueCode.invalid_type,\n expected: ZodParsedType.set,\n received: ctx.parsedType\n });\n return INVALID;\n }\n const def = this._def;\n if (def.minSize !== null) {\n if (ctx.data.size < def.minSize.value) {\n addIssueToContext(ctx, {\n code: ZodIssueCode.too_small,\n minimum: def.minSize.value,\n type: \"set\",\n inclusive: true,\n exact: false,\n message: def.minSize.message\n });\n status.dirty();\n }\n }\n if (def.maxSize !== null) {\n if (ctx.data.size > def.maxSize.value) {\n addIssueToContext(ctx, {\n code: ZodIssueCode.too_big,\n maximum: def.maxSize.value,\n type: \"set\",\n inclusive: true,\n exact: false,\n message: def.maxSize.message\n });\n status.dirty();\n }\n }\n const valueType = this._def.valueType;\n function finalizeSet(elements2) {\n const parsedSet = /* @__PURE__ */ new Set();\n for (const element of elements2) {\n if (element.status === \"aborted\")\n return INVALID;\n if (element.status === \"dirty\")\n status.dirty();\n parsedSet.add(element.value);\n }\n return { status: status.value, value: parsedSet };\n }\n const elements = [...ctx.data.values()].map((item, i3) => valueType._parse(new ParseInputLazyPath(ctx, item, ctx.path, i3)));\n if (ctx.common.async) {\n return Promise.all(elements).then((elements2) => finalizeSet(elements2));\n } else {\n return finalizeSet(elements);\n }\n }\n min(minSize, message) {\n return new _ZodSet({\n ...this._def,\n minSize: { value: minSize, message: errorUtil.toString(message) }\n });\n }\n max(maxSize, message) {\n return new _ZodSet({\n ...this._def,\n maxSize: { value: maxSize, message: errorUtil.toString(message) }\n });\n }\n size(size6, message) {\n return this.min(size6, message).max(size6, message);\n }\n nonempty(message) {\n return this.min(1, message);\n }\n };\n ZodSet.create = (valueType, params) => {\n return new ZodSet({\n valueType,\n minSize: null,\n maxSize: null,\n typeName: ZodFirstPartyTypeKind.ZodSet,\n ...processCreateParams(params)\n });\n };\n ZodFunction = class _ZodFunction extends ZodType {\n constructor() {\n super(...arguments);\n this.validate = this.implement;\n }\n _parse(input) {\n const { ctx } = this._processInputParams(input);\n if (ctx.parsedType !== ZodParsedType.function) {\n addIssueToContext(ctx, {\n code: ZodIssueCode.invalid_type,\n expected: ZodParsedType.function,\n received: ctx.parsedType\n });\n return INVALID;\n }\n function makeArgsIssue(args, error) {\n return makeIssue({\n data: args,\n path: ctx.path,\n errorMaps: [ctx.common.contextualErrorMap, ctx.schemaErrorMap, getErrorMap(), en_default].filter((x4) => !!x4),\n issueData: {\n code: ZodIssueCode.invalid_arguments,\n argumentsError: error\n }\n });\n }\n function makeReturnsIssue(returns, error) {\n return makeIssue({\n data: returns,\n path: ctx.path,\n errorMaps: [ctx.common.contextualErrorMap, ctx.schemaErrorMap, getErrorMap(), en_default].filter((x4) => !!x4),\n issueData: {\n code: ZodIssueCode.invalid_return_type,\n returnTypeError: error\n }\n });\n }\n const params = { errorMap: ctx.common.contextualErrorMap };\n const fn = ctx.data;\n if (this._def.returns instanceof ZodPromise) {\n const me = this;\n return OK(async function(...args) {\n const error = new ZodError([]);\n const parsedArgs = await me._def.args.parseAsync(args, params).catch((e3) => {\n error.addIssue(makeArgsIssue(args, e3));\n throw error;\n });\n const result = await Reflect.apply(fn, this, parsedArgs);\n const parsedReturns = await me._def.returns._def.type.parseAsync(result, params).catch((e3) => {\n error.addIssue(makeReturnsIssue(result, e3));\n throw error;\n });\n return parsedReturns;\n });\n } else {\n const me = this;\n return OK(function(...args) {\n const parsedArgs = me._def.args.safeParse(args, params);\n if (!parsedArgs.success) {\n throw new ZodError([makeArgsIssue(args, parsedArgs.error)]);\n }\n const result = Reflect.apply(fn, this, parsedArgs.data);\n const parsedReturns = me._def.returns.safeParse(result, params);\n if (!parsedReturns.success) {\n throw new ZodError([makeReturnsIssue(result, parsedReturns.error)]);\n }\n return parsedReturns.data;\n });\n }\n }\n parameters() {\n return this._def.args;\n }\n returnType() {\n return this._def.returns;\n }\n args(...items) {\n return new _ZodFunction({\n ...this._def,\n args: ZodTuple.create(items).rest(ZodUnknown.create())\n });\n }\n returns(returnType) {\n return new _ZodFunction({\n ...this._def,\n returns: returnType\n });\n }\n implement(func) {\n const validatedFunc = this.parse(func);\n return validatedFunc;\n }\n strictImplement(func) {\n const validatedFunc = this.parse(func);\n return validatedFunc;\n }\n static create(args, returns, params) {\n return new _ZodFunction({\n args: args ? args : ZodTuple.create([]).rest(ZodUnknown.create()),\n returns: returns || ZodUnknown.create(),\n typeName: ZodFirstPartyTypeKind.ZodFunction,\n ...processCreateParams(params)\n });\n }\n };\n ZodLazy = class extends ZodType {\n get schema() {\n return this._def.getter();\n }\n _parse(input) {\n const { ctx } = this._processInputParams(input);\n const lazySchema = this._def.getter();\n return lazySchema._parse({ data: ctx.data, path: ctx.path, parent: ctx });\n }\n };\n ZodLazy.create = (getter, params) => {\n return new ZodLazy({\n getter,\n typeName: ZodFirstPartyTypeKind.ZodLazy,\n ...processCreateParams(params)\n });\n };\n ZodLiteral = class extends ZodType {\n _parse(input) {\n if (input.data !== this._def.value) {\n const ctx = this._getOrReturnCtx(input);\n addIssueToContext(ctx, {\n received: ctx.data,\n code: ZodIssueCode.invalid_literal,\n expected: this._def.value\n });\n return INVALID;\n }\n return { status: \"valid\", value: input.data };\n }\n get value() {\n return this._def.value;\n }\n };\n ZodLiteral.create = (value, params) => {\n return new ZodLiteral({\n value,\n typeName: ZodFirstPartyTypeKind.ZodLiteral,\n ...processCreateParams(params)\n });\n };\n ZodEnum = class _ZodEnum extends ZodType {\n _parse(input) {\n if (typeof input.data !== \"string\") {\n const ctx = this._getOrReturnCtx(input);\n const expectedValues = this._def.values;\n addIssueToContext(ctx, {\n expected: util.joinValues(expectedValues),\n received: ctx.parsedType,\n code: ZodIssueCode.invalid_type\n });\n return INVALID;\n }\n if (!this._cache) {\n this._cache = new Set(this._def.values);\n }\n if (!this._cache.has(input.data)) {\n const ctx = this._getOrReturnCtx(input);\n const expectedValues = this._def.values;\n addIssueToContext(ctx, {\n received: ctx.data,\n code: ZodIssueCode.invalid_enum_value,\n options: expectedValues\n });\n return INVALID;\n }\n return OK(input.data);\n }\n get options() {\n return this._def.values;\n }\n get enum() {\n const enumValues = {};\n for (const val of this._def.values) {\n enumValues[val] = val;\n }\n return enumValues;\n }\n get Values() {\n const enumValues = {};\n for (const val of this._def.values) {\n enumValues[val] = val;\n }\n return enumValues;\n }\n get Enum() {\n const enumValues = {};\n for (const val of this._def.values) {\n enumValues[val] = val;\n }\n return enumValues;\n }\n extract(values, newDef = this._def) {\n return _ZodEnum.create(values, {\n ...this._def,\n ...newDef\n });\n }\n exclude(values, newDef = this._def) {\n return _ZodEnum.create(this.options.filter((opt) => !values.includes(opt)), {\n ...this._def,\n ...newDef\n });\n }\n };\n ZodEnum.create = createZodEnum;\n ZodNativeEnum = class extends ZodType {\n _parse(input) {\n const nativeEnumValues = util.getValidEnumValues(this._def.values);\n const ctx = this._getOrReturnCtx(input);\n if (ctx.parsedType !== ZodParsedType.string && ctx.parsedType !== ZodParsedType.number) {\n const expectedValues = util.objectValues(nativeEnumValues);\n addIssueToContext(ctx, {\n expected: util.joinValues(expectedValues),\n received: ctx.parsedType,\n code: ZodIssueCode.invalid_type\n });\n return INVALID;\n }\n if (!this._cache) {\n this._cache = new Set(util.getValidEnumValues(this._def.values));\n }\n if (!this._cache.has(input.data)) {\n const expectedValues = util.objectValues(nativeEnumValues);\n addIssueToContext(ctx, {\n received: ctx.data,\n code: ZodIssueCode.invalid_enum_value,\n options: expectedValues\n });\n return INVALID;\n }\n return OK(input.data);\n }\n get enum() {\n return this._def.values;\n }\n };\n ZodNativeEnum.create = (values, params) => {\n return new ZodNativeEnum({\n values,\n typeName: ZodFirstPartyTypeKind.ZodNativeEnum,\n ...processCreateParams(params)\n });\n };\n ZodPromise = class extends ZodType {\n unwrap() {\n return this._def.type;\n }\n _parse(input) {\n const { ctx } = this._processInputParams(input);\n if (ctx.parsedType !== ZodParsedType.promise && ctx.common.async === false) {\n addIssueToContext(ctx, {\n code: ZodIssueCode.invalid_type,\n expected: ZodParsedType.promise,\n received: ctx.parsedType\n });\n return INVALID;\n }\n const promisified = ctx.parsedType === ZodParsedType.promise ? ctx.data : Promise.resolve(ctx.data);\n return OK(promisified.then((data) => {\n return this._def.type.parseAsync(data, {\n path: ctx.path,\n errorMap: ctx.common.contextualErrorMap\n });\n }));\n }\n };\n ZodPromise.create = (schema, params) => {\n return new ZodPromise({\n type: schema,\n typeName: ZodFirstPartyTypeKind.ZodPromise,\n ...processCreateParams(params)\n });\n };\n ZodEffects = class extends ZodType {\n innerType() {\n return this._def.schema;\n }\n sourceType() {\n return this._def.schema._def.typeName === ZodFirstPartyTypeKind.ZodEffects ? this._def.schema.sourceType() : this._def.schema;\n }\n _parse(input) {\n const { status, ctx } = this._processInputParams(input);\n const effect = this._def.effect || null;\n const checkCtx = {\n addIssue: (arg) => {\n addIssueToContext(ctx, arg);\n if (arg.fatal) {\n status.abort();\n } else {\n status.dirty();\n }\n },\n get path() {\n return ctx.path;\n }\n };\n checkCtx.addIssue = checkCtx.addIssue.bind(checkCtx);\n if (effect.type === \"preprocess\") {\n const processed = effect.transform(ctx.data, checkCtx);\n if (ctx.common.async) {\n return Promise.resolve(processed).then(async (processed2) => {\n if (status.value === \"aborted\")\n return INVALID;\n const result = await this._def.schema._parseAsync({\n data: processed2,\n path: ctx.path,\n parent: ctx\n });\n if (result.status === \"aborted\")\n return INVALID;\n if (result.status === \"dirty\")\n return DIRTY(result.value);\n if (status.value === \"dirty\")\n return DIRTY(result.value);\n return result;\n });\n } else {\n if (status.value === \"aborted\")\n return INVALID;\n const result = this._def.schema._parseSync({\n data: processed,\n path: ctx.path,\n parent: ctx\n });\n if (result.status === \"aborted\")\n return INVALID;\n if (result.status === \"dirty\")\n return DIRTY(result.value);\n if (status.value === \"dirty\")\n return DIRTY(result.value);\n return result;\n }\n }\n if (effect.type === \"refinement\") {\n const executeRefinement = (acc) => {\n const result = effect.refinement(acc, checkCtx);\n if (ctx.common.async) {\n return Promise.resolve(result);\n }\n if (result instanceof Promise) {\n throw new Error(\"Async refinement encountered during synchronous parse operation. Use .parseAsync instead.\");\n }\n return acc;\n };\n if (ctx.common.async === false) {\n const inner = this._def.schema._parseSync({\n data: ctx.data,\n path: ctx.path,\n parent: ctx\n });\n if (inner.status === \"aborted\")\n return INVALID;\n if (inner.status === \"dirty\")\n status.dirty();\n executeRefinement(inner.value);\n return { status: status.value, value: inner.value };\n } else {\n return this._def.schema._parseAsync({ data: ctx.data, path: ctx.path, parent: ctx }).then((inner) => {\n if (inner.status === \"aborted\")\n return INVALID;\n if (inner.status === \"dirty\")\n status.dirty();\n return executeRefinement(inner.value).then(() => {\n return { status: status.value, value: inner.value };\n });\n });\n }\n }\n if (effect.type === \"transform\") {\n if (ctx.common.async === false) {\n const base4 = this._def.schema._parseSync({\n data: ctx.data,\n path: ctx.path,\n parent: ctx\n });\n if (!isValid(base4))\n return INVALID;\n const result = effect.transform(base4.value, checkCtx);\n if (result instanceof Promise) {\n throw new Error(`Asynchronous transform encountered during synchronous parse operation. Use .parseAsync instead.`);\n }\n return { status: status.value, value: result };\n } else {\n return this._def.schema._parseAsync({ data: ctx.data, path: ctx.path, parent: ctx }).then((base4) => {\n if (!isValid(base4))\n return INVALID;\n return Promise.resolve(effect.transform(base4.value, checkCtx)).then((result) => ({\n status: status.value,\n value: result\n }));\n });\n }\n }\n util.assertNever(effect);\n }\n };\n ZodEffects.create = (schema, effect, params) => {\n return new ZodEffects({\n schema,\n typeName: ZodFirstPartyTypeKind.ZodEffects,\n effect,\n ...processCreateParams(params)\n });\n };\n ZodEffects.createWithPreprocess = (preprocess, schema, params) => {\n return new ZodEffects({\n schema,\n effect: { type: \"preprocess\", transform: preprocess },\n typeName: ZodFirstPartyTypeKind.ZodEffects,\n ...processCreateParams(params)\n });\n };\n ZodOptional = class extends ZodType {\n _parse(input) {\n const parsedType = this._getType(input);\n if (parsedType === ZodParsedType.undefined) {\n return OK(void 0);\n }\n return this._def.innerType._parse(input);\n }\n unwrap() {\n return this._def.innerType;\n }\n };\n ZodOptional.create = (type, params) => {\n return new ZodOptional({\n innerType: type,\n typeName: ZodFirstPartyTypeKind.ZodOptional,\n ...processCreateParams(params)\n });\n };\n ZodNullable = class extends ZodType {\n _parse(input) {\n const parsedType = this._getType(input);\n if (parsedType === ZodParsedType.null) {\n return OK(null);\n }\n return this._def.innerType._parse(input);\n }\n unwrap() {\n return this._def.innerType;\n }\n };\n ZodNullable.create = (type, params) => {\n return new ZodNullable({\n innerType: type,\n typeName: ZodFirstPartyTypeKind.ZodNullable,\n ...processCreateParams(params)\n });\n };\n ZodDefault = class extends ZodType {\n _parse(input) {\n const { ctx } = this._processInputParams(input);\n let data = ctx.data;\n if (ctx.parsedType === ZodParsedType.undefined) {\n data = this._def.defaultValue();\n }\n return this._def.innerType._parse({\n data,\n path: ctx.path,\n parent: ctx\n });\n }\n removeDefault() {\n return this._def.innerType;\n }\n };\n ZodDefault.create = (type, params) => {\n return new ZodDefault({\n innerType: type,\n typeName: ZodFirstPartyTypeKind.ZodDefault,\n defaultValue: typeof params.default === \"function\" ? params.default : () => params.default,\n ...processCreateParams(params)\n });\n };\n ZodCatch = class extends ZodType {\n _parse(input) {\n const { ctx } = this._processInputParams(input);\n const newCtx = {\n ...ctx,\n common: {\n ...ctx.common,\n issues: []\n }\n };\n const result = this._def.innerType._parse({\n data: newCtx.data,\n path: newCtx.path,\n parent: {\n ...newCtx\n }\n });\n if (isAsync(result)) {\n return result.then((result2) => {\n return {\n status: \"valid\",\n value: result2.status === \"valid\" ? result2.value : this._def.catchValue({\n get error() {\n return new ZodError(newCtx.common.issues);\n },\n input: newCtx.data\n })\n };\n });\n } else {\n return {\n status: \"valid\",\n value: result.status === \"valid\" ? result.value : this._def.catchValue({\n get error() {\n return new ZodError(newCtx.common.issues);\n },\n input: newCtx.data\n })\n };\n }\n }\n removeCatch() {\n return this._def.innerType;\n }\n };\n ZodCatch.create = (type, params) => {\n return new ZodCatch({\n innerType: type,\n typeName: ZodFirstPartyTypeKind.ZodCatch,\n catchValue: typeof params.catch === \"function\" ? params.catch : () => params.catch,\n ...processCreateParams(params)\n });\n };\n ZodNaN = class extends ZodType {\n _parse(input) {\n const parsedType = this._getType(input);\n if (parsedType !== ZodParsedType.nan) {\n const ctx = this._getOrReturnCtx(input);\n addIssueToContext(ctx, {\n code: ZodIssueCode.invalid_type,\n expected: ZodParsedType.nan,\n received: ctx.parsedType\n });\n return INVALID;\n }\n return { status: \"valid\", value: input.data };\n }\n };\n ZodNaN.create = (params) => {\n return new ZodNaN({\n typeName: ZodFirstPartyTypeKind.ZodNaN,\n ...processCreateParams(params)\n });\n };\n BRAND = Symbol(\"zod_brand\");\n ZodBranded = class extends ZodType {\n _parse(input) {\n const { ctx } = this._processInputParams(input);\n const data = ctx.data;\n return this._def.type._parse({\n data,\n path: ctx.path,\n parent: ctx\n });\n }\n unwrap() {\n return this._def.type;\n }\n };\n ZodPipeline = class _ZodPipeline extends ZodType {\n _parse(input) {\n const { status, ctx } = this._processInputParams(input);\n if (ctx.common.async) {\n const handleAsync = async () => {\n const inResult = await this._def.in._parseAsync({\n data: ctx.data,\n path: ctx.path,\n parent: ctx\n });\n if (inResult.status === \"aborted\")\n return INVALID;\n if (inResult.status === \"dirty\") {\n status.dirty();\n return DIRTY(inResult.value);\n } else {\n return this._def.out._parseAsync({\n data: inResult.value,\n path: ctx.path,\n parent: ctx\n });\n }\n };\n return handleAsync();\n } else {\n const inResult = this._def.in._parseSync({\n data: ctx.data,\n path: ctx.path,\n parent: ctx\n });\n if (inResult.status === \"aborted\")\n return INVALID;\n if (inResult.status === \"dirty\") {\n status.dirty();\n return {\n status: \"dirty\",\n value: inResult.value\n };\n } else {\n return this._def.out._parseSync({\n data: inResult.value,\n path: ctx.path,\n parent: ctx\n });\n }\n }\n }\n static create(a3, b4) {\n return new _ZodPipeline({\n in: a3,\n out: b4,\n typeName: ZodFirstPartyTypeKind.ZodPipeline\n });\n }\n };\n ZodReadonly = class extends ZodType {\n _parse(input) {\n const result = this._def.innerType._parse(input);\n const freeze = (data) => {\n if (isValid(data)) {\n data.value = Object.freeze(data.value);\n }\n return data;\n };\n return isAsync(result) ? result.then((data) => freeze(data)) : freeze(result);\n }\n unwrap() {\n return this._def.innerType;\n }\n };\n ZodReadonly.create = (type, params) => {\n return new ZodReadonly({\n innerType: type,\n typeName: ZodFirstPartyTypeKind.ZodReadonly,\n ...processCreateParams(params)\n });\n };\n late = {\n object: ZodObject.lazycreate\n };\n (function(ZodFirstPartyTypeKind2) {\n ZodFirstPartyTypeKind2[\"ZodString\"] = \"ZodString\";\n ZodFirstPartyTypeKind2[\"ZodNumber\"] = \"ZodNumber\";\n ZodFirstPartyTypeKind2[\"ZodNaN\"] = \"ZodNaN\";\n ZodFirstPartyTypeKind2[\"ZodBigInt\"] = \"ZodBigInt\";\n ZodFirstPartyTypeKind2[\"ZodBoolean\"] = \"ZodBoolean\";\n ZodFirstPartyTypeKind2[\"ZodDate\"] = \"ZodDate\";\n ZodFirstPartyTypeKind2[\"ZodSymbol\"] = \"ZodSymbol\";\n ZodFirstPartyTypeKind2[\"ZodUndefined\"] = \"ZodUndefined\";\n ZodFirstPartyTypeKind2[\"ZodNull\"] = \"ZodNull\";\n ZodFirstPartyTypeKind2[\"ZodAny\"] = \"ZodAny\";\n ZodFirstPartyTypeKind2[\"ZodUnknown\"] = \"ZodUnknown\";\n ZodFirstPartyTypeKind2[\"ZodNever\"] = \"ZodNever\";\n ZodFirstPartyTypeKind2[\"ZodVoid\"] = \"ZodVoid\";\n ZodFirstPartyTypeKind2[\"ZodArray\"] = \"ZodArray\";\n ZodFirstPartyTypeKind2[\"ZodObject\"] = \"ZodObject\";\n ZodFirstPartyTypeKind2[\"ZodUnion\"] = \"ZodUnion\";\n ZodFirstPartyTypeKind2[\"ZodDiscriminatedUnion\"] = \"ZodDiscriminatedUnion\";\n ZodFirstPartyTypeKind2[\"ZodIntersection\"] = \"ZodIntersection\";\n ZodFirstPartyTypeKind2[\"ZodTuple\"] = \"ZodTuple\";\n ZodFirstPartyTypeKind2[\"ZodRecord\"] = \"ZodRecord\";\n ZodFirstPartyTypeKind2[\"ZodMap\"] = \"ZodMap\";\n ZodFirstPartyTypeKind2[\"ZodSet\"] = \"ZodSet\";\n ZodFirstPartyTypeKind2[\"ZodFunction\"] = \"ZodFunction\";\n ZodFirstPartyTypeKind2[\"ZodLazy\"] = \"ZodLazy\";\n ZodFirstPartyTypeKind2[\"ZodLiteral\"] = \"ZodLiteral\";\n ZodFirstPartyTypeKind2[\"ZodEnum\"] = \"ZodEnum\";\n ZodFirstPartyTypeKind2[\"ZodEffects\"] = \"ZodEffects\";\n ZodFirstPartyTypeKind2[\"ZodNativeEnum\"] = \"ZodNativeEnum\";\n ZodFirstPartyTypeKind2[\"ZodOptional\"] = \"ZodOptional\";\n ZodFirstPartyTypeKind2[\"ZodNullable\"] = \"ZodNullable\";\n ZodFirstPartyTypeKind2[\"ZodDefault\"] = \"ZodDefault\";\n ZodFirstPartyTypeKind2[\"ZodCatch\"] = \"ZodCatch\";\n ZodFirstPartyTypeKind2[\"ZodPromise\"] = \"ZodPromise\";\n ZodFirstPartyTypeKind2[\"ZodBranded\"] = \"ZodBranded\";\n ZodFirstPartyTypeKind2[\"ZodPipeline\"] = \"ZodPipeline\";\n ZodFirstPartyTypeKind2[\"ZodReadonly\"] = \"ZodReadonly\";\n })(ZodFirstPartyTypeKind || (ZodFirstPartyTypeKind = {}));\n instanceOfType = (cls, params = {\n message: `Input not instance of ${cls.name}`\n }) => custom2((data) => data instanceof cls, params);\n stringType = ZodString.create;\n numberType = ZodNumber.create;\n nanType = ZodNaN.create;\n bigIntType = ZodBigInt.create;\n booleanType = ZodBoolean.create;\n dateType = ZodDate.create;\n symbolType = ZodSymbol.create;\n undefinedType = ZodUndefined.create;\n nullType = ZodNull.create;\n anyType = ZodAny.create;\n unknownType = ZodUnknown.create;\n neverType = ZodNever.create;\n voidType = ZodVoid.create;\n arrayType = ZodArray.create;\n objectType = ZodObject.create;\n strictObjectType = ZodObject.strictCreate;\n unionType = ZodUnion.create;\n discriminatedUnionType = ZodDiscriminatedUnion.create;\n intersectionType = ZodIntersection.create;\n tupleType = ZodTuple.create;\n recordType = ZodRecord.create;\n mapType = ZodMap.create;\n setType = ZodSet.create;\n functionType = ZodFunction.create;\n lazyType = ZodLazy.create;\n literalType = ZodLiteral.create;\n enumType = ZodEnum.create;\n nativeEnumType = ZodNativeEnum.create;\n promiseType = ZodPromise.create;\n effectsType = ZodEffects.create;\n optionalType = ZodOptional.create;\n nullableType = ZodNullable.create;\n preprocessType = ZodEffects.createWithPreprocess;\n pipelineType = ZodPipeline.create;\n ostring = () => stringType().optional();\n onumber = () => numberType().optional();\n oboolean = () => booleanType().optional();\n coerce = {\n string: (arg) => ZodString.create({ ...arg, coerce: true }),\n number: (arg) => ZodNumber.create({ ...arg, coerce: true }),\n boolean: (arg) => ZodBoolean.create({\n ...arg,\n coerce: true\n }),\n bigint: (arg) => ZodBigInt.create({ ...arg, coerce: true }),\n date: (arg) => ZodDate.create({ ...arg, coerce: true })\n };\n NEVER = INVALID;\n }\n });\n\n // ../../../node_modules/.pnpm/zod@3.25.64/node_modules/zod/dist/esm/v3/external.js\n var external_exports = {};\n __export(external_exports, {\n BRAND: () => BRAND,\n DIRTY: () => DIRTY,\n EMPTY_PATH: () => EMPTY_PATH,\n INVALID: () => INVALID,\n NEVER: () => NEVER,\n OK: () => OK,\n ParseStatus: () => ParseStatus,\n Schema: () => ZodType,\n ZodAny: () => ZodAny,\n ZodArray: () => ZodArray,\n ZodBigInt: () => ZodBigInt,\n ZodBoolean: () => ZodBoolean,\n ZodBranded: () => ZodBranded,\n ZodCatch: () => ZodCatch,\n ZodDate: () => ZodDate,\n ZodDefault: () => ZodDefault,\n ZodDiscriminatedUnion: () => ZodDiscriminatedUnion,\n ZodEffects: () => ZodEffects,\n ZodEnum: () => ZodEnum,\n ZodError: () => ZodError,\n ZodFirstPartyTypeKind: () => ZodFirstPartyTypeKind,\n ZodFunction: () => ZodFunction,\n ZodIntersection: () => ZodIntersection,\n ZodIssueCode: () => ZodIssueCode,\n ZodLazy: () => ZodLazy,\n ZodLiteral: () => ZodLiteral,\n ZodMap: () => ZodMap,\n ZodNaN: () => ZodNaN,\n ZodNativeEnum: () => ZodNativeEnum,\n ZodNever: () => ZodNever,\n ZodNull: () => ZodNull,\n ZodNullable: () => ZodNullable,\n ZodNumber: () => ZodNumber,\n ZodObject: () => ZodObject,\n ZodOptional: () => ZodOptional,\n ZodParsedType: () => ZodParsedType,\n ZodPipeline: () => ZodPipeline,\n ZodPromise: () => ZodPromise,\n ZodReadonly: () => ZodReadonly,\n ZodRecord: () => ZodRecord,\n ZodSchema: () => ZodType,\n ZodSet: () => ZodSet,\n ZodString: () => ZodString,\n ZodSymbol: () => ZodSymbol,\n ZodTransformer: () => ZodEffects,\n ZodTuple: () => ZodTuple,\n ZodType: () => ZodType,\n ZodUndefined: () => ZodUndefined,\n ZodUnion: () => ZodUnion,\n ZodUnknown: () => ZodUnknown,\n ZodVoid: () => ZodVoid,\n addIssueToContext: () => addIssueToContext,\n any: () => anyType,\n array: () => arrayType,\n bigint: () => bigIntType,\n boolean: () => booleanType,\n coerce: () => coerce,\n custom: () => custom2,\n date: () => dateType,\n datetimeRegex: () => datetimeRegex,\n defaultErrorMap: () => en_default,\n discriminatedUnion: () => discriminatedUnionType,\n effect: () => effectsType,\n enum: () => enumType,\n function: () => functionType,\n getErrorMap: () => getErrorMap,\n getParsedType: () => getParsedType,\n instanceof: () => instanceOfType,\n intersection: () => intersectionType,\n isAborted: () => isAborted,\n isAsync: () => isAsync,\n isDirty: () => isDirty,\n isValid: () => isValid,\n late: () => late,\n lazy: () => lazyType,\n literal: () => literalType,\n makeIssue: () => makeIssue,\n map: () => mapType,\n nan: () => nanType,\n nativeEnum: () => nativeEnumType,\n never: () => neverType,\n null: () => nullType,\n nullable: () => nullableType,\n number: () => numberType,\n object: () => objectType,\n objectUtil: () => objectUtil,\n oboolean: () => oboolean,\n onumber: () => onumber,\n optional: () => optionalType,\n ostring: () => ostring,\n pipeline: () => pipelineType,\n preprocess: () => preprocessType,\n promise: () => promiseType,\n quotelessJson: () => quotelessJson,\n record: () => recordType,\n set: () => setType,\n setErrorMap: () => setErrorMap,\n strictObject: () => strictObjectType,\n string: () => stringType,\n symbol: () => symbolType,\n transformer: () => effectsType,\n tuple: () => tupleType,\n undefined: () => undefinedType,\n union: () => unionType,\n unknown: () => unknownType,\n util: () => util,\n void: () => voidType\n });\n var init_external = __esm({\n \"../../../node_modules/.pnpm/zod@3.25.64/node_modules/zod/dist/esm/v3/external.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_errors5();\n init_parseUtil();\n init_typeAliases();\n init_util();\n init_types2();\n init_ZodError();\n }\n });\n\n // ../../../node_modules/.pnpm/zod@3.25.64/node_modules/zod/dist/esm/v3/index.js\n var v3_default;\n var init_v3 = __esm({\n \"../../../node_modules/.pnpm/zod@3.25.64/node_modules/zod/dist/esm/v3/index.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_external();\n init_external();\n v3_default = external_exports;\n }\n });\n\n // ../../../node_modules/.pnpm/zod@3.25.64/node_modules/zod/dist/esm/index.js\n var esm_default;\n var init_esm5 = __esm({\n \"../../../node_modules/.pnpm/zod@3.25.64/node_modules/zod/dist/esm/index.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_v3();\n init_v3();\n esm_default = v3_default;\n }\n });\n\n // ../../../node_modules/.pnpm/@aa-sdk+core@4.62.0_typescript@5.8.3_viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64_/node_modules/@aa-sdk/core/dist/esm/utils/schema.js\n function isBigNumberish(x4) {\n return x4 != null && BigNumberishSchema.safeParse(x4).success;\n }\n function isMultiplier(x4) {\n return x4 != null && MultiplierSchema.safeParse(x4).success;\n }\n var ChainSchema, HexSchema, BigNumberishSchema, BigNumberishRangeSchema, MultiplierSchema;\n var init_schema = __esm({\n \"../../../node_modules/.pnpm/@aa-sdk+core@4.62.0_typescript@5.8.3_viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64_/node_modules/@aa-sdk/core/dist/esm/utils/schema.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_esm();\n init_esm5();\n ChainSchema = external_exports.custom((chain2) => chain2 != null && typeof chain2 === \"object\" && \"id\" in chain2 && typeof chain2.id === \"number\");\n HexSchema = external_exports.custom((val) => {\n return isHex(val, { strict: true });\n });\n BigNumberishSchema = external_exports.union([HexSchema, external_exports.number(), external_exports.bigint()]);\n BigNumberishRangeSchema = external_exports.object({\n min: BigNumberishSchema.optional(),\n max: BigNumberishSchema.optional()\n }).strict();\n MultiplierSchema = external_exports.object({\n /**\n * Multiplier value with max precision of 4 decimal places\n */\n multiplier: external_exports.number().refine((n2) => {\n return (n2.toString().split(\".\")[1]?.length ?? 0) <= 4;\n }, { message: \"Max precision is 4 decimal places\" })\n }).strict();\n }\n });\n\n // ../../../node_modules/.pnpm/@aa-sdk+core@4.62.0_typescript@5.8.3_viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64_/node_modules/@aa-sdk/core/dist/esm/utils/bigint.js\n var bigIntMax, bigIntClamp, RoundingMode, bigIntMultiply;\n var init_bigint = __esm({\n \"../../../node_modules/.pnpm/@aa-sdk+core@4.62.0_typescript@5.8.3_viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64_/node_modules/@aa-sdk/core/dist/esm/utils/bigint.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_schema();\n bigIntMax = (...args) => {\n if (!args.length) {\n throw new Error(\"bigIntMax requires at least one argument\");\n }\n return args.reduce((m2, c4) => m2 > c4 ? m2 : c4);\n };\n bigIntClamp = (value, lower, upper) => {\n lower = lower != null ? BigInt(lower) : null;\n upper = upper != null ? BigInt(upper) : null;\n if (upper != null && lower != null && upper < lower) {\n throw new Error(`invalid range: upper bound ${upper} is less than lower bound ${lower}`);\n }\n let ret = BigInt(value);\n if (lower != null && lower > ret) {\n ret = lower;\n }\n if (upper != null && upper < ret) {\n ret = upper;\n }\n return ret;\n };\n (function(RoundingMode2) {\n RoundingMode2[RoundingMode2[\"ROUND_DOWN\"] = 0] = \"ROUND_DOWN\";\n RoundingMode2[RoundingMode2[\"ROUND_UP\"] = 1] = \"ROUND_UP\";\n })(RoundingMode || (RoundingMode = {}));\n bigIntMultiply = (base4, multiplier, roundingMode = RoundingMode.ROUND_UP) => {\n if (!isMultiplier({ multiplier })) {\n throw new Error(\"bigIntMultiply requires a multiplier validated number as the second argument\");\n }\n const decimalPlaces = multiplier.toString().split(\".\")[1]?.length ?? 0;\n const val = roundingMode === RoundingMode.ROUND_UP ? BigInt(base4) * BigInt(Math.round(multiplier * 10 ** decimalPlaces)) + BigInt(10 ** decimalPlaces - 1) : BigInt(base4) * BigInt(Math.round(multiplier * 10 ** decimalPlaces));\n return val / BigInt(10 ** decimalPlaces);\n };\n }\n });\n\n // ../../../node_modules/.pnpm/@aa-sdk+core@4.62.0_typescript@5.8.3_viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64_/node_modules/@aa-sdk/core/dist/esm/utils/bytes.js\n var takeBytes;\n var init_bytes3 = __esm({\n \"../../../node_modules/.pnpm/@aa-sdk+core@4.62.0_typescript@5.8.3_viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64_/node_modules/@aa-sdk/core/dist/esm/utils/bytes.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n takeBytes = (bytes, opts = {}) => {\n const { offset, count } = opts;\n const start = (offset ? offset * 2 : 0) + 2;\n const end = count ? start + count * 2 : void 0;\n return `0x${bytes.slice(start, end)}`;\n };\n }\n });\n\n // ../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/op-stack/contracts.js\n var contracts;\n var init_contracts2 = __esm({\n \"../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/op-stack/contracts.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n contracts = {\n gasPriceOracle: { address: \"0x420000000000000000000000000000000000000F\" },\n l1Block: { address: \"0x4200000000000000000000000000000000000015\" },\n l2CrossDomainMessenger: {\n address: \"0x4200000000000000000000000000000000000007\"\n },\n l2Erc721Bridge: { address: \"0x4200000000000000000000000000000000000014\" },\n l2StandardBridge: { address: \"0x4200000000000000000000000000000000000010\" },\n l2ToL1MessagePasser: {\n address: \"0x4200000000000000000000000000000000000016\"\n }\n };\n }\n });\n\n // ../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/op-stack/formatters.js\n var formatters;\n var init_formatters = __esm({\n \"../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/op-stack/formatters.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_fromHex();\n init_block2();\n init_transaction2();\n init_transactionReceipt();\n formatters = {\n block: /* @__PURE__ */ defineBlock({\n format(args) {\n const transactions = args.transactions?.map((transaction) => {\n if (typeof transaction === \"string\")\n return transaction;\n const formatted = formatTransaction(transaction);\n if (formatted.typeHex === \"0x7e\") {\n formatted.isSystemTx = transaction.isSystemTx;\n formatted.mint = transaction.mint ? hexToBigInt(transaction.mint) : void 0;\n formatted.sourceHash = transaction.sourceHash;\n formatted.type = \"deposit\";\n }\n return formatted;\n });\n return {\n transactions,\n stateRoot: args.stateRoot\n };\n }\n }),\n transaction: /* @__PURE__ */ defineTransaction({\n format(args) {\n const transaction = {};\n if (args.type === \"0x7e\") {\n transaction.isSystemTx = args.isSystemTx;\n transaction.mint = args.mint ? hexToBigInt(args.mint) : void 0;\n transaction.sourceHash = args.sourceHash;\n transaction.type = \"deposit\";\n }\n return transaction;\n }\n }),\n transactionReceipt: /* @__PURE__ */ defineTransactionReceipt({\n format(args) {\n return {\n l1GasPrice: args.l1GasPrice ? hexToBigInt(args.l1GasPrice) : null,\n l1GasUsed: args.l1GasUsed ? hexToBigInt(args.l1GasUsed) : null,\n l1Fee: args.l1Fee ? hexToBigInt(args.l1Fee) : null,\n l1FeeScalar: args.l1FeeScalar ? Number(args.l1FeeScalar) : null\n };\n }\n })\n };\n }\n });\n\n // ../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/op-stack/serializers.js\n function serializeTransaction2(transaction, signature) {\n if (isDeposit(transaction))\n return serializeTransactionDeposit(transaction);\n return serializeTransaction(transaction, signature);\n }\n function serializeTransactionDeposit(transaction) {\n assertTransactionDeposit(transaction);\n const { sourceHash, data, from: from14, gas, isSystemTx, mint, to, value } = transaction;\n const serializedTransaction = [\n sourceHash,\n from14,\n to ?? \"0x\",\n mint ? toHex(mint) : \"0x\",\n value ? toHex(value) : \"0x\",\n gas ? toHex(gas) : \"0x\",\n isSystemTx ? \"0x1\" : \"0x\",\n data ?? \"0x\"\n ];\n return concatHex([\n \"0x7e\",\n toRlp(serializedTransaction)\n ]);\n }\n function isDeposit(transaction) {\n if (transaction.type === \"deposit\")\n return true;\n if (typeof transaction.sourceHash !== \"undefined\")\n return true;\n return false;\n }\n function assertTransactionDeposit(transaction) {\n const { from: from14, to } = transaction;\n if (from14 && !isAddress(from14))\n throw new InvalidAddressError({ address: from14 });\n if (to && !isAddress(to))\n throw new InvalidAddressError({ address: to });\n }\n var serializers;\n var init_serializers = __esm({\n \"../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/op-stack/serializers.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_address();\n init_isAddress();\n init_concat();\n init_toHex();\n init_toRlp();\n init_serializeTransaction();\n serializers = {\n transaction: serializeTransaction2\n };\n }\n });\n\n // ../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/op-stack/chainConfig.js\n var chainConfig;\n var init_chainConfig = __esm({\n \"../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/op-stack/chainConfig.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_contracts2();\n init_formatters();\n init_serializers();\n chainConfig = {\n blockTime: 2e3,\n contracts,\n formatters,\n serializers\n };\n }\n });\n\n // ../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/chains/definitions/arbitrum.js\n var arbitrum;\n var init_arbitrum = __esm({\n \"../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/chains/definitions/arbitrum.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_defineChain();\n arbitrum = /* @__PURE__ */ defineChain({\n id: 42161,\n name: \"Arbitrum One\",\n nativeCurrency: { name: \"Ether\", symbol: \"ETH\", decimals: 18 },\n blockTime: 250,\n rpcUrls: {\n default: {\n http: [\"https://arb1.arbitrum.io/rpc\"]\n }\n },\n blockExplorers: {\n default: {\n name: \"Arbiscan\",\n url: \"https://arbiscan.io\",\n apiUrl: \"https://api.arbiscan.io/api\"\n }\n },\n contracts: {\n multicall3: {\n address: \"0xca11bde05977b3631167028862be2a173976ca11\",\n blockCreated: 7654707\n }\n }\n });\n }\n });\n\n // ../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/chains/definitions/arbitrumGoerli.js\n var arbitrumGoerli;\n var init_arbitrumGoerli = __esm({\n \"../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/chains/definitions/arbitrumGoerli.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_defineChain();\n arbitrumGoerli = /* @__PURE__ */ defineChain({\n id: 421613,\n name: \"Arbitrum Goerli\",\n nativeCurrency: {\n name: \"Arbitrum Goerli Ether\",\n symbol: \"ETH\",\n decimals: 18\n },\n rpcUrls: {\n default: {\n http: [\"https://goerli-rollup.arbitrum.io/rpc\"]\n }\n },\n blockExplorers: {\n default: {\n name: \"Arbiscan\",\n url: \"https://goerli.arbiscan.io\"\n }\n },\n contracts: {\n multicall3: {\n address: \"0xca11bde05977b3631167028862be2a173976ca11\",\n blockCreated: 88114\n }\n },\n testnet: true\n });\n }\n });\n\n // ../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/chains/definitions/arbitrumNova.js\n var arbitrumNova;\n var init_arbitrumNova = __esm({\n \"../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/chains/definitions/arbitrumNova.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_defineChain();\n arbitrumNova = /* @__PURE__ */ defineChain({\n id: 42170,\n name: \"Arbitrum Nova\",\n nativeCurrency: { name: \"Ether\", symbol: \"ETH\", decimals: 18 },\n rpcUrls: {\n default: {\n http: [\"https://nova.arbitrum.io/rpc\"]\n }\n },\n blockExplorers: {\n default: {\n name: \"Arbiscan\",\n url: \"https://nova.arbiscan.io\",\n apiUrl: \"https://api-nova.arbiscan.io/api\"\n }\n },\n contracts: {\n multicall3: {\n address: \"0xca11bde05977b3631167028862be2a173976ca11\",\n blockCreated: 1746963\n }\n }\n });\n }\n });\n\n // ../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/chains/definitions/arbitrumSepolia.js\n var arbitrumSepolia;\n var init_arbitrumSepolia = __esm({\n \"../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/chains/definitions/arbitrumSepolia.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_defineChain();\n arbitrumSepolia = /* @__PURE__ */ defineChain({\n id: 421614,\n name: \"Arbitrum Sepolia\",\n blockTime: 250,\n nativeCurrency: {\n name: \"Arbitrum Sepolia Ether\",\n symbol: \"ETH\",\n decimals: 18\n },\n rpcUrls: {\n default: {\n http: [\"https://sepolia-rollup.arbitrum.io/rpc\"]\n }\n },\n blockExplorers: {\n default: {\n name: \"Arbiscan\",\n url: \"https://sepolia.arbiscan.io\",\n apiUrl: \"https://api-sepolia.arbiscan.io/api\"\n }\n },\n contracts: {\n multicall3: {\n address: \"0xca11bde05977b3631167028862be2a173976ca11\",\n blockCreated: 81930\n }\n },\n testnet: true\n });\n }\n });\n\n // ../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/chains/definitions/base.js\n var sourceId, base, basePreconf;\n var init_base3 = __esm({\n \"../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/chains/definitions/base.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_chainConfig();\n init_defineChain();\n sourceId = 1;\n base = /* @__PURE__ */ defineChain({\n ...chainConfig,\n id: 8453,\n name: \"Base\",\n nativeCurrency: { name: \"Ether\", symbol: \"ETH\", decimals: 18 },\n rpcUrls: {\n default: {\n http: [\"https://mainnet.base.org\"]\n }\n },\n blockExplorers: {\n default: {\n name: \"Basescan\",\n url: \"https://basescan.org\",\n apiUrl: \"https://api.basescan.org/api\"\n }\n },\n contracts: {\n ...chainConfig.contracts,\n disputeGameFactory: {\n [sourceId]: {\n address: \"0x43edB88C4B80fDD2AdFF2412A7BebF9dF42cB40e\"\n }\n },\n l2OutputOracle: {\n [sourceId]: {\n address: \"0x56315b90c40730925ec5485cf004d835058518A0\"\n }\n },\n multicall3: {\n address: \"0xca11bde05977b3631167028862be2a173976ca11\",\n blockCreated: 5022\n },\n portal: {\n [sourceId]: {\n address: \"0x49048044D57e1C92A77f79988d21Fa8fAF74E97e\",\n blockCreated: 17482143\n }\n },\n l1StandardBridge: {\n [sourceId]: {\n address: \"0x3154Cf16ccdb4C6d922629664174b904d80F2C35\",\n blockCreated: 17482143\n }\n }\n },\n sourceId\n });\n basePreconf = /* @__PURE__ */ defineChain({\n ...base,\n experimental_preconfirmationTime: 200,\n rpcUrls: {\n default: {\n http: [\"https://mainnet-preconf.base.org\"]\n }\n }\n });\n }\n });\n\n // ../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/chains/definitions/baseGoerli.js\n var sourceId2, baseGoerli;\n var init_baseGoerli = __esm({\n \"../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/chains/definitions/baseGoerli.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_chainConfig();\n init_defineChain();\n sourceId2 = 5;\n baseGoerli = /* @__PURE__ */ defineChain({\n ...chainConfig,\n id: 84531,\n name: \"Base Goerli\",\n nativeCurrency: { name: \"Goerli Ether\", symbol: \"ETH\", decimals: 18 },\n rpcUrls: {\n default: { http: [\"https://goerli.base.org\"] }\n },\n blockExplorers: {\n default: {\n name: \"Basescan\",\n url: \"https://goerli.basescan.org\",\n apiUrl: \"https://goerli.basescan.org/api\"\n }\n },\n contracts: {\n ...chainConfig.contracts,\n l2OutputOracle: {\n [sourceId2]: {\n address: \"0x2A35891ff30313CcFa6CE88dcf3858bb075A2298\"\n }\n },\n multicall3: {\n address: \"0xca11bde05977b3631167028862be2a173976ca11\",\n blockCreated: 1376988\n },\n portal: {\n [sourceId2]: {\n address: \"0xe93c8cD0D409341205A592f8c4Ac1A5fe5585cfA\"\n }\n },\n l1StandardBridge: {\n [sourceId2]: {\n address: \"0xfA6D8Ee5BE770F84FC001D098C4bD604Fe01284a\"\n }\n }\n },\n testnet: true,\n sourceId: sourceId2\n });\n }\n });\n\n // ../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/chains/definitions/baseSepolia.js\n var sourceId3, baseSepolia, baseSepoliaPreconf;\n var init_baseSepolia = __esm({\n \"../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/chains/definitions/baseSepolia.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_chainConfig();\n init_defineChain();\n sourceId3 = 11155111;\n baseSepolia = /* @__PURE__ */ defineChain({\n ...chainConfig,\n id: 84532,\n network: \"base-sepolia\",\n name: \"Base Sepolia\",\n nativeCurrency: { name: \"Sepolia Ether\", symbol: \"ETH\", decimals: 18 },\n rpcUrls: {\n default: {\n http: [\"https://sepolia.base.org\"]\n }\n },\n blockExplorers: {\n default: {\n name: \"Basescan\",\n url: \"https://sepolia.basescan.org\",\n apiUrl: \"https://api-sepolia.basescan.org/api\"\n }\n },\n contracts: {\n ...chainConfig.contracts,\n disputeGameFactory: {\n [sourceId3]: {\n address: \"0xd6E6dBf4F7EA0ac412fD8b65ED297e64BB7a06E1\"\n }\n },\n l2OutputOracle: {\n [sourceId3]: {\n address: \"0x84457ca9D0163FbC4bbfe4Dfbb20ba46e48DF254\"\n }\n },\n portal: {\n [sourceId3]: {\n address: \"0x49f53e41452c74589e85ca1677426ba426459e85\",\n blockCreated: 4446677\n }\n },\n l1StandardBridge: {\n [sourceId3]: {\n address: \"0xfd0Bf71F60660E2f608ed56e1659C450eB113120\",\n blockCreated: 4446677\n }\n },\n multicall3: {\n address: \"0xca11bde05977b3631167028862be2a173976ca11\",\n blockCreated: 1059647\n }\n },\n testnet: true,\n sourceId: sourceId3\n });\n baseSepoliaPreconf = /* @__PURE__ */ defineChain({\n ...baseSepolia,\n experimental_preconfirmationTime: 200,\n rpcUrls: {\n default: {\n http: [\"https://sepolia-preconf.base.org\"]\n }\n }\n });\n }\n });\n\n // ../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/chains/definitions/fraxtal.js\n var sourceId4, fraxtal;\n var init_fraxtal = __esm({\n \"../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/chains/definitions/fraxtal.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_chainConfig();\n init_defineChain();\n sourceId4 = 1;\n fraxtal = /* @__PURE__ */ defineChain({\n ...chainConfig,\n id: 252,\n name: \"Fraxtal\",\n nativeCurrency: { name: \"Frax\", symbol: \"FRAX\", decimals: 18 },\n rpcUrls: {\n default: {\n http: [\"https://rpc.frax.com\"]\n }\n },\n blockExplorers: {\n default: {\n name: \"fraxscan\",\n url: \"https://fraxscan.com\",\n apiUrl: \"https://api.fraxscan.com/api\"\n }\n },\n contracts: {\n ...chainConfig.contracts,\n l2OutputOracle: {\n [sourceId4]: {\n address: \"0x66CC916Ed5C6C2FA97014f7D1cD141528Ae171e4\"\n }\n },\n multicall3: {\n address: \"0xca11bde05977b3631167028862be2a173976ca11\"\n },\n portal: {\n [sourceId4]: {\n address: \"0x36cb65c1967A0Fb0EEE11569C51C2f2aA1Ca6f6D\",\n blockCreated: 19135323\n }\n },\n l1StandardBridge: {\n [sourceId4]: {\n address: \"0x34C0bD5877A5Ee7099D0f5688D65F4bB9158BDE2\",\n blockCreated: 19135323\n }\n }\n },\n sourceId: sourceId4\n });\n }\n });\n\n // ../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/chains/definitions/goerli.js\n var goerli;\n var init_goerli = __esm({\n \"../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/chains/definitions/goerli.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_defineChain();\n goerli = /* @__PURE__ */ defineChain({\n id: 5,\n name: \"Goerli\",\n nativeCurrency: { name: \"Goerli Ether\", symbol: \"ETH\", decimals: 18 },\n rpcUrls: {\n default: {\n http: [\"https://5.rpc.thirdweb.com\"]\n }\n },\n blockExplorers: {\n default: {\n name: \"Etherscan\",\n url: \"https://goerli.etherscan.io\",\n apiUrl: \"https://api-goerli.etherscan.io/api\"\n }\n },\n contracts: {\n ensRegistry: {\n address: \"0x00000000000C2E074eC69A0dFb2997BA6C7d2e1e\"\n },\n ensUniversalResolver: {\n address: \"0xfc4AC75C46C914aF5892d6d3eFFcebD7917293F1\",\n blockCreated: 10339206\n },\n multicall3: {\n address: \"0xca11bde05977b3631167028862be2a173976ca11\",\n blockCreated: 6507670\n }\n },\n testnet: true\n });\n }\n });\n\n // ../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/chains/definitions/mainnet.js\n var mainnet;\n var init_mainnet = __esm({\n \"../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/chains/definitions/mainnet.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_defineChain();\n mainnet = /* @__PURE__ */ defineChain({\n id: 1,\n name: \"Ethereum\",\n nativeCurrency: { name: \"Ether\", symbol: \"ETH\", decimals: 18 },\n blockTime: 12e3,\n rpcUrls: {\n default: {\n http: [\"https://eth.merkle.io\"]\n }\n },\n blockExplorers: {\n default: {\n name: \"Etherscan\",\n url: \"https://etherscan.io\",\n apiUrl: \"https://api.etherscan.io/api\"\n }\n },\n contracts: {\n ensUniversalResolver: {\n address: \"0xeeeeeeee14d718c2b47d9923deab1335e144eeee\",\n blockCreated: 23085558\n },\n multicall3: {\n address: \"0xca11bde05977b3631167028862be2a173976ca11\",\n blockCreated: 14353601\n }\n }\n });\n }\n });\n\n // ../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/chains/definitions/optimism.js\n var sourceId5, optimism;\n var init_optimism = __esm({\n \"../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/chains/definitions/optimism.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_chainConfig();\n init_defineChain();\n sourceId5 = 1;\n optimism = /* @__PURE__ */ defineChain({\n ...chainConfig,\n id: 10,\n name: \"OP Mainnet\",\n nativeCurrency: { name: \"Ether\", symbol: \"ETH\", decimals: 18 },\n rpcUrls: {\n default: {\n http: [\"https://mainnet.optimism.io\"]\n }\n },\n blockExplorers: {\n default: {\n name: \"Optimism Explorer\",\n url: \"https://optimistic.etherscan.io\",\n apiUrl: \"https://api-optimistic.etherscan.io/api\"\n }\n },\n contracts: {\n ...chainConfig.contracts,\n disputeGameFactory: {\n [sourceId5]: {\n address: \"0xe5965Ab5962eDc7477C8520243A95517CD252fA9\"\n }\n },\n l2OutputOracle: {\n [sourceId5]: {\n address: \"0xdfe97868233d1aa22e815a266982f2cf17685a27\"\n }\n },\n multicall3: {\n address: \"0xca11bde05977b3631167028862be2a173976ca11\",\n blockCreated: 4286263\n },\n portal: {\n [sourceId5]: {\n address: \"0xbEb5Fc579115071764c7423A4f12eDde41f106Ed\"\n }\n },\n l1StandardBridge: {\n [sourceId5]: {\n address: \"0x99C9fc46f92E8a1c0deC1b1747d010903E884bE1\"\n }\n }\n },\n sourceId: sourceId5\n });\n }\n });\n\n // ../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/chains/definitions/optimismGoerli.js\n var sourceId6, optimismGoerli;\n var init_optimismGoerli = __esm({\n \"../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/chains/definitions/optimismGoerli.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_chainConfig();\n init_defineChain();\n sourceId6 = 5;\n optimismGoerli = /* @__PURE__ */ defineChain({\n ...chainConfig,\n id: 420,\n name: \"Optimism Goerli\",\n nativeCurrency: { name: \"Goerli Ether\", symbol: \"ETH\", decimals: 18 },\n rpcUrls: {\n default: {\n http: [\"https://goerli.optimism.io\"]\n }\n },\n blockExplorers: {\n default: {\n name: \"Etherscan\",\n url: \"https://goerli-optimism.etherscan.io\",\n apiUrl: \"https://goerli-optimism.etherscan.io/api\"\n }\n },\n contracts: {\n ...chainConfig.contracts,\n l2OutputOracle: {\n [sourceId6]: {\n address: \"0xE6Dfba0953616Bacab0c9A8ecb3a9BBa77FC15c0\"\n }\n },\n multicall3: {\n address: \"0xca11bde05977b3631167028862be2a173976ca11\",\n blockCreated: 49461\n },\n portal: {\n [sourceId6]: {\n address: \"0x5b47E1A08Ea6d985D6649300584e6722Ec4B1383\"\n }\n },\n l1StandardBridge: {\n [sourceId6]: {\n address: \"0x636Af16bf2f682dD3109e60102b8E1A089FedAa8\"\n }\n }\n },\n testnet: true,\n sourceId: sourceId6\n });\n }\n });\n\n // ../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/chains/definitions/optimismSepolia.js\n var sourceId7, optimismSepolia;\n var init_optimismSepolia = __esm({\n \"../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/chains/definitions/optimismSepolia.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_chainConfig();\n init_defineChain();\n sourceId7 = 11155111;\n optimismSepolia = /* @__PURE__ */ defineChain({\n ...chainConfig,\n id: 11155420,\n name: \"OP Sepolia\",\n nativeCurrency: { name: \"Sepolia Ether\", symbol: \"ETH\", decimals: 18 },\n rpcUrls: {\n default: {\n http: [\"https://sepolia.optimism.io\"]\n }\n },\n blockExplorers: {\n default: {\n name: \"Blockscout\",\n url: \"https://optimism-sepolia.blockscout.com\",\n apiUrl: \"https://optimism-sepolia.blockscout.com/api\"\n }\n },\n contracts: {\n ...chainConfig.contracts,\n disputeGameFactory: {\n [sourceId7]: {\n address: \"0x05F9613aDB30026FFd634f38e5C4dFd30a197Fa1\"\n }\n },\n l2OutputOracle: {\n [sourceId7]: {\n address: \"0x90E9c4f8a994a250F6aEfd61CAFb4F2e895D458F\"\n }\n },\n multicall3: {\n address: \"0xca11bde05977b3631167028862be2a173976ca11\",\n blockCreated: 1620204\n },\n portal: {\n [sourceId7]: {\n address: \"0x16Fc5058F25648194471939df75CF27A2fdC48BC\"\n }\n },\n l1StandardBridge: {\n [sourceId7]: {\n address: \"0xFBb0621E0B23b5478B630BD55a5f21f67730B0F1\"\n }\n }\n },\n testnet: true,\n sourceId: sourceId7\n });\n }\n });\n\n // ../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/chains/definitions/polygon.js\n var polygon;\n var init_polygon = __esm({\n \"../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/chains/definitions/polygon.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_defineChain();\n polygon = /* @__PURE__ */ defineChain({\n id: 137,\n name: \"Polygon\",\n blockTime: 2e3,\n nativeCurrency: { name: \"POL\", symbol: \"POL\", decimals: 18 },\n rpcUrls: {\n default: {\n http: [\"https://polygon-rpc.com\"]\n }\n },\n blockExplorers: {\n default: {\n name: \"PolygonScan\",\n url: \"https://polygonscan.com\",\n apiUrl: \"https://api.polygonscan.com/api\"\n }\n },\n contracts: {\n multicall3: {\n address: \"0xca11bde05977b3631167028862be2a173976ca11\",\n blockCreated: 25770160\n }\n }\n });\n }\n });\n\n // ../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/chains/definitions/polygonAmoy.js\n var polygonAmoy;\n var init_polygonAmoy = __esm({\n \"../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/chains/definitions/polygonAmoy.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_defineChain();\n polygonAmoy = /* @__PURE__ */ defineChain({\n id: 80002,\n name: \"Polygon Amoy\",\n nativeCurrency: { name: \"POL\", symbol: \"POL\", decimals: 18 },\n rpcUrls: {\n default: {\n http: [\"https://rpc-amoy.polygon.technology\"]\n }\n },\n blockExplorers: {\n default: {\n name: \"PolygonScan\",\n url: \"https://amoy.polygonscan.com\",\n apiUrl: \"https://api-amoy.polygonscan.com/api\"\n }\n },\n contracts: {\n multicall3: {\n address: \"0xca11bde05977b3631167028862be2a173976ca11\",\n blockCreated: 3127388\n }\n },\n testnet: true\n });\n }\n });\n\n // ../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/chains/definitions/polygonMumbai.js\n var polygonMumbai;\n var init_polygonMumbai = __esm({\n \"../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/chains/definitions/polygonMumbai.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_defineChain();\n polygonMumbai = /* @__PURE__ */ defineChain({\n id: 80001,\n name: \"Polygon Mumbai\",\n nativeCurrency: { name: \"MATIC\", symbol: \"MATIC\", decimals: 18 },\n rpcUrls: {\n default: {\n http: [\"https://80001.rpc.thirdweb.com\"]\n }\n },\n blockExplorers: {\n default: {\n name: \"PolygonScan\",\n url: \"https://mumbai.polygonscan.com\",\n apiUrl: \"https://api-testnet.polygonscan.com/api\"\n }\n },\n contracts: {\n multicall3: {\n address: \"0xca11bde05977b3631167028862be2a173976ca11\",\n blockCreated: 25770160\n }\n },\n testnet: true\n });\n }\n });\n\n // ../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/chains/definitions/sepolia.js\n var sepolia;\n var init_sepolia = __esm({\n \"../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/chains/definitions/sepolia.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_defineChain();\n sepolia = /* @__PURE__ */ defineChain({\n id: 11155111,\n name: \"Sepolia\",\n nativeCurrency: { name: \"Sepolia Ether\", symbol: \"ETH\", decimals: 18 },\n rpcUrls: {\n default: {\n http: [\"https://11155111.rpc.thirdweb.com\"]\n }\n },\n blockExplorers: {\n default: {\n name: \"Etherscan\",\n url: \"https://sepolia.etherscan.io\",\n apiUrl: \"https://api-sepolia.etherscan.io/api\"\n }\n },\n contracts: {\n multicall3: {\n address: \"0xca11bde05977b3631167028862be2a173976ca11\",\n blockCreated: 751532\n },\n ensUniversalResolver: {\n address: \"0xeeeeeeee14d718c2b47d9923deab1335e144eeee\",\n blockCreated: 8928790\n }\n },\n testnet: true\n });\n }\n });\n\n // ../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/chains/definitions/zora.js\n var sourceId8, zora;\n var init_zora = __esm({\n \"../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/chains/definitions/zora.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_chainConfig();\n init_defineChain();\n sourceId8 = 1;\n zora = /* @__PURE__ */ defineChain({\n ...chainConfig,\n id: 7777777,\n name: \"Zora\",\n nativeCurrency: {\n decimals: 18,\n name: \"Ether\",\n symbol: \"ETH\"\n },\n rpcUrls: {\n default: {\n http: [\"https://rpc.zora.energy\"],\n webSocket: [\"wss://rpc.zora.energy\"]\n }\n },\n blockExplorers: {\n default: {\n name: \"Explorer\",\n url: \"https://explorer.zora.energy\",\n apiUrl: \"https://explorer.zora.energy/api\"\n }\n },\n contracts: {\n ...chainConfig.contracts,\n l2OutputOracle: {\n [sourceId8]: {\n address: \"0x9E6204F750cD866b299594e2aC9eA824E2e5f95c\"\n }\n },\n multicall3: {\n address: \"0xcA11bde05977b3631167028862bE2a173976CA11\",\n blockCreated: 5882\n },\n portal: {\n [sourceId8]: {\n address: \"0x1a0ad011913A150f69f6A19DF447A0CfD9551054\"\n }\n },\n l1StandardBridge: {\n [sourceId8]: {\n address: \"0x3e2Ea9B92B7E48A52296fD261dc26fd995284631\"\n }\n }\n },\n sourceId: sourceId8\n });\n }\n });\n\n // ../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/chains/definitions/zoraSepolia.js\n var sourceId9, zoraSepolia;\n var init_zoraSepolia = __esm({\n \"../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/chains/definitions/zoraSepolia.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_chainConfig();\n init_defineChain();\n sourceId9 = 11155111;\n zoraSepolia = /* @__PURE__ */ defineChain({\n ...chainConfig,\n id: 999999999,\n name: \"Zora Sepolia\",\n network: \"zora-sepolia\",\n nativeCurrency: {\n decimals: 18,\n name: \"Zora Sepolia\",\n symbol: \"ETH\"\n },\n rpcUrls: {\n default: {\n http: [\"https://sepolia.rpc.zora.energy\"],\n webSocket: [\"wss://sepolia.rpc.zora.energy\"]\n }\n },\n blockExplorers: {\n default: {\n name: \"Zora Sepolia Explorer\",\n url: \"https://sepolia.explorer.zora.energy/\",\n apiUrl: \"https://sepolia.explorer.zora.energy/api\"\n }\n },\n contracts: {\n ...chainConfig.contracts,\n l2OutputOracle: {\n [sourceId9]: {\n address: \"0x2615B481Bd3E5A1C0C7Ca3Da1bdc663E8615Ade9\"\n }\n },\n multicall3: {\n address: \"0xcA11bde05977b3631167028862bE2a173976CA11\",\n blockCreated: 83160\n },\n portal: {\n [sourceId9]: {\n address: \"0xeffE2C6cA9Ab797D418f0D91eA60807713f3536f\"\n }\n },\n l1StandardBridge: {\n [sourceId9]: {\n address: \"0x5376f1D543dcbB5BD416c56C189e4cB7399fCcCB\"\n }\n }\n },\n sourceId: sourceId9,\n testnet: true\n });\n }\n });\n\n // ../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/chains/index.js\n var init_chains = __esm({\n \"../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/chains/index.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_arbitrum();\n init_arbitrumGoerli();\n init_arbitrumNova();\n init_arbitrumSepolia();\n init_base3();\n init_baseGoerli();\n init_baseSepolia();\n init_fraxtal();\n init_goerli();\n init_mainnet();\n init_optimism();\n init_optimismGoerli();\n init_optimismSepolia();\n init_polygon();\n init_polygonAmoy();\n init_polygonMumbai();\n init_sepolia();\n init_zora();\n init_zoraSepolia();\n }\n });\n\n // ../../../node_modules/.pnpm/@aa-sdk+core@4.62.0_typescript@5.8.3_viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64_/node_modules/@aa-sdk/core/dist/esm/utils/defaults.js\n var minPriorityFeePerBidDefaults;\n var init_defaults = __esm({\n \"../../../node_modules/.pnpm/@aa-sdk+core@4.62.0_typescript@5.8.3_viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64_/node_modules/@aa-sdk/core/dist/esm/utils/defaults.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_chains();\n minPriorityFeePerBidDefaults = /* @__PURE__ */ new Map([\n [arbitrum.id, 10000000n],\n [arbitrumGoerli.id, 10000000n],\n [arbitrumSepolia.id, 10000000n]\n ]);\n }\n });\n\n // ../../../node_modules/.pnpm/@aa-sdk+core@4.62.0_typescript@5.8.3_viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64_/node_modules/@aa-sdk/core/dist/esm/utils/userop.js\n function isValidRequest(request) {\n return request.callGasLimit != null && request.preVerificationGas != null && request.verificationGasLimit != null && request.maxFeePerGas != null && request.maxPriorityFeePerGas != null && isValidPaymasterAndData(request) && isValidFactoryAndData(request);\n }\n function isValidPaymasterAndData(request) {\n if (\"paymasterAndData\" in request) {\n return request.paymasterAndData != null;\n }\n return allEqual(request.paymaster == null, request.paymasterData == null, request.paymasterPostOpGasLimit == null, request.paymasterVerificationGasLimit == null);\n }\n function isValidFactoryAndData(request) {\n if (\"initCode\" in request) {\n const { initCode } = request;\n return initCode != null;\n }\n return allEqual(request.factory == null, request.factoryData == null);\n }\n function applyUserOpOverride(value, override) {\n if (override == null) {\n return value;\n }\n if (isBigNumberish(override)) {\n return override;\n } else {\n return value != null ? bigIntMultiply(value, override.multiplier) : value;\n }\n }\n function applyUserOpFeeOption(value, feeOption) {\n if (feeOption == null) {\n return value;\n }\n return value != null ? bigIntClamp(feeOption.multiplier ? bigIntMultiply(value, feeOption.multiplier) : value, feeOption.min, feeOption.max) : feeOption.min ?? 0n;\n }\n function applyUserOpOverrideOrFeeOption(value, override, feeOption) {\n return value != null && override != null ? applyUserOpOverride(value, override) : applyUserOpFeeOption(value, feeOption);\n }\n var bypassPaymasterAndData;\n var init_userop = __esm({\n \"../../../node_modules/.pnpm/@aa-sdk+core@4.62.0_typescript@5.8.3_viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64_/node_modules/@aa-sdk/core/dist/esm/utils/userop.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_bigint();\n init_utils10();\n bypassPaymasterAndData = (overrides) => !!overrides && (\"paymasterAndData\" in overrides || \"paymasterData\" in overrides);\n }\n });\n\n // ../../../node_modules/.pnpm/@aa-sdk+core@4.62.0_typescript@5.8.3_viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64_/node_modules/@aa-sdk/core/dist/esm/utils/index.js\n async function resolveProperties(object2) {\n const promises = Object.keys(object2).map((key) => {\n const value = object2[key];\n return Promise.resolve(value).then((v2) => ({ key, value: v2 }));\n });\n const results = await Promise.all(promises);\n return filterUndefined(results.reduce((accum, curr) => {\n accum[curr.key] = curr.value;\n return accum;\n }, {}));\n }\n function deepHexlify(obj) {\n if (typeof obj === \"function\") {\n return void 0;\n }\n if (obj == null || typeof obj === \"string\" || typeof obj === \"boolean\") {\n return obj;\n } else if (typeof obj === \"bigint\") {\n return toHex(obj);\n } else if (obj._isBigNumber != null || typeof obj !== \"object\") {\n return toHex(obj).replace(/^0x0/, \"0x\");\n }\n if (Array.isArray(obj)) {\n return obj.map((member) => deepHexlify(member));\n }\n return Object.keys(obj).reduce((set, key) => ({\n ...set,\n [key]: deepHexlify(obj[key])\n }), {});\n }\n function filterUndefined(obj) {\n for (const key in obj) {\n if (obj[key] == null) {\n delete obj[key];\n }\n }\n return obj;\n }\n var allEqual, conditionalReturn;\n var init_utils10 = __esm({\n \"../../../node_modules/.pnpm/@aa-sdk+core@4.62.0_typescript@5.8.3_viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64_/node_modules/@aa-sdk/core/dist/esm/utils/index.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_esm();\n init_bigint();\n init_bytes3();\n init_defaults();\n init_schema();\n init_userop();\n allEqual = (...params) => {\n if (params.length === 0) {\n throw new Error(\"no values passed in\");\n }\n return params.every((v2) => v2 === params[0]);\n };\n conditionalReturn = (condition, value) => condition.then((t3) => t3 ? value() : void 0);\n }\n });\n\n // ../../../node_modules/.pnpm/@aa-sdk+core@4.62.0_typescript@5.8.3_viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64_/node_modules/@aa-sdk/core/dist/esm/actions/smartAccount/buildUserOperationFromTxs.js\n async function buildUserOperationFromTxs(client_, args) {\n const client = clientHeaderTrack(client_, \"buildUserOperationFromTxs\");\n const { account = client.account, requests, overrides, context: context2 } = args;\n if (!account) {\n throw new AccountNotFoundError2();\n }\n if (!isBaseSmartAccountClient(client)) {\n throw new IncompatibleClientError(\"BaseSmartAccountClient\", \"buildUserOperationFromTxs\", client);\n }\n const batch = requests.map((request) => {\n if (!request.to) {\n throw new TransactionMissingToParamError();\n }\n return {\n target: request.to,\n data: request.data ?? \"0x\",\n value: request.value ? fromHex(request.value, \"bigint\") : 0n\n };\n });\n const mfpgOverridesInTx = () => requests.filter((x4) => x4.maxFeePerGas != null).map((x4) => fromHex(x4.maxFeePerGas, \"bigint\"));\n const maxFeePerGas = overrides?.maxFeePerGas != null ? overrides?.maxFeePerGas : mfpgOverridesInTx().length > 0 ? bigIntMax(...mfpgOverridesInTx()) : void 0;\n const mpfpgOverridesInTx = () => requests.filter((x4) => x4.maxPriorityFeePerGas != null).map((x4) => fromHex(x4.maxPriorityFeePerGas, \"bigint\"));\n const maxPriorityFeePerGas = overrides?.maxPriorityFeePerGas != null ? overrides?.maxPriorityFeePerGas : mpfpgOverridesInTx().length > 0 ? bigIntMax(...mpfpgOverridesInTx()) : void 0;\n const _overrides = {\n maxFeePerGas,\n maxPriorityFeePerGas\n };\n const uoStruct = await buildUserOperation(client, {\n uo: batch,\n account,\n context: context2,\n overrides: _overrides\n });\n return {\n uoStruct,\n // TODO: in v4 major version update, remove these as below parameters are not needed\n batch,\n overrides: _overrides\n };\n }\n var init_buildUserOperationFromTxs = __esm({\n \"../../../node_modules/.pnpm/@aa-sdk+core@4.62.0_typescript@5.8.3_viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64_/node_modules/@aa-sdk/core/dist/esm/actions/smartAccount/buildUserOperationFromTxs.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_esm();\n init_isSmartAccountClient();\n init_account2();\n init_client();\n init_transaction3();\n init_utils10();\n init_buildUserOperation();\n init_esm6();\n }\n });\n\n // ../../../node_modules/.pnpm/@aa-sdk+core@4.62.0_typescript@5.8.3_viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64_/node_modules/@aa-sdk/core/dist/esm/actions/smartAccount/checkGasSponsorshipEligibility.js\n function checkGasSponsorshipEligibility(client_, args) {\n const client = clientHeaderTrack(client_, \"checkGasSponsorshipEligibility\");\n const { account = client.account, overrides, context: context2 } = args;\n if (!account) {\n throw new AccountNotFoundError2();\n }\n if (!isBaseSmartAccountClient(client)) {\n throw new IncompatibleClientError(\"BaseSmartAccountClient\", \"checkGasSponsorshipEligibility\", client);\n }\n return buildUserOperation(client, {\n uo: args.uo,\n account,\n overrides,\n context: context2\n }).then((userOperationStruct) => ({\n eligible: account.getEntryPoint().version === \"0.6.0\" ? userOperationStruct.paymasterAndData !== \"0x\" && userOperationStruct.paymasterAndData !== null : userOperationStruct.paymasterData !== \"0x\" && userOperationStruct.paymasterData !== null,\n request: userOperationStruct\n })).catch(() => ({\n eligible: false\n }));\n }\n var init_checkGasSponsorshipEligibility = __esm({\n \"../../../node_modules/.pnpm/@aa-sdk+core@4.62.0_typescript@5.8.3_viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64_/node_modules/@aa-sdk/core/dist/esm/actions/smartAccount/checkGasSponsorshipEligibility.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_isSmartAccountClient();\n init_account2();\n init_client();\n init_buildUserOperation();\n init_esm6();\n }\n });\n\n // ../../../node_modules/.pnpm/@aa-sdk+core@4.62.0_typescript@5.8.3_viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64_/node_modules/@aa-sdk/core/dist/esm/middleware/noopMiddleware.js\n var noopMiddleware;\n var init_noopMiddleware = __esm({\n \"../../../node_modules/.pnpm/@aa-sdk+core@4.62.0_typescript@5.8.3_viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64_/node_modules/@aa-sdk/core/dist/esm/middleware/noopMiddleware.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n noopMiddleware = async (args) => {\n return args;\n };\n }\n });\n\n // ../../../node_modules/.pnpm/@aa-sdk+core@4.62.0_typescript@5.8.3_viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64_/node_modules/@aa-sdk/core/dist/esm/actions/smartAccount/internal/runMiddlewareStack.js\n async function _runMiddlewareStack(client, args) {\n const { uo, overrides, account = client.account, context: context2 } = args;\n if (!account) {\n throw new AccountNotFoundError2();\n }\n const { dummyPaymasterAndData, paymasterAndData } = bypassPaymasterAndData(overrides) ? {\n dummyPaymasterAndData: async (uo2, { overrides: overrides2 }) => {\n return {\n ...uo2,\n ...\"paymasterAndData\" in overrides2 ? { paymasterAndData: overrides2.paymasterAndData } : \"paymasterData\" in overrides2 && \"paymaster\" in overrides2 && overrides2.paymasterData !== \"0x\" ? {\n paymasterData: overrides2.paymasterData,\n paymaster: overrides2.paymaster\n } : (\n // At this point, nothing has run so no fields are set\n // for 0.7 when not using a paymaster, all fields should be undefined\n void 0\n )\n };\n },\n paymasterAndData: noopMiddleware\n } : {\n dummyPaymasterAndData: client.middleware.dummyPaymasterAndData,\n paymasterAndData: client.middleware.paymasterAndData\n };\n const result = await asyncPipe(dummyPaymasterAndData, client.middleware.feeEstimator, client.middleware.gasEstimator, client.middleware.customMiddleware, paymasterAndData, client.middleware.userOperationSimulator)(uo, { overrides, feeOptions: client.feeOptions, account, client, context: context2 });\n return resolveProperties(result);\n }\n var asyncPipe;\n var init_runMiddlewareStack = __esm({\n \"../../../node_modules/.pnpm/@aa-sdk+core@4.62.0_typescript@5.8.3_viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64_/node_modules/@aa-sdk/core/dist/esm/actions/smartAccount/internal/runMiddlewareStack.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_account2();\n init_noopMiddleware();\n init_utils10();\n asyncPipe = (...fns) => async (s4, opts) => {\n let result = s4;\n for (const fn of fns) {\n result = await fn(result, opts);\n }\n return result;\n };\n }\n });\n\n // ../../../node_modules/.pnpm/@aa-sdk+core@4.62.0_typescript@5.8.3_viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64_/node_modules/@aa-sdk/core/dist/esm/actions/smartAccount/signUserOperation.js\n async function signUserOperation(client, args) {\n const { account = client.account, context: context2 } = args;\n if (!account) {\n throw new AccountNotFoundError2();\n }\n if (!isBaseSmartAccountClient(client)) {\n throw new IncompatibleClientError(\"BaseSmartAccountClient\", \"signUserOperation\", client);\n }\n if (!client.chain) {\n throw new ChainNotFoundError2();\n }\n return await client.middleware.signUserOperation(args.uoStruct, {\n ...args,\n account,\n client,\n context: context2\n }).then(resolveProperties).then(deepHexlify);\n }\n var init_signUserOperation = __esm({\n \"../../../node_modules/.pnpm/@aa-sdk+core@4.62.0_typescript@5.8.3_viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64_/node_modules/@aa-sdk/core/dist/esm/actions/smartAccount/signUserOperation.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_isSmartAccountClient();\n init_account2();\n init_client();\n init_utils10();\n }\n });\n\n // ../../../node_modules/.pnpm/@aa-sdk+core@4.62.0_typescript@5.8.3_viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64_/node_modules/@aa-sdk/core/dist/esm/entrypoint/0.7.js\n function packAccountGasLimits(data) {\n return concat(Object.values(data).map((v2) => pad(v2, { size: 16 })));\n }\n function packPaymasterData({ paymaster, paymasterVerificationGasLimit, paymasterPostOpGasLimit, paymasterData }) {\n if (!paymaster || !paymasterVerificationGasLimit || !paymasterPostOpGasLimit || !paymasterData) {\n return \"0x\";\n }\n return concat([\n paymaster,\n pad(paymasterVerificationGasLimit, { size: 16 }),\n pad(paymasterPostOpGasLimit, { size: 16 }),\n paymasterData\n ]);\n }\n var packUserOperation, __default;\n var init__ = __esm({\n \"../../../node_modules/.pnpm/@aa-sdk+core@4.62.0_typescript@5.8.3_viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64_/node_modules/@aa-sdk/core/dist/esm/entrypoint/0.7.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_esm();\n init_EntryPointAbi_v7();\n packUserOperation = (request) => {\n const initCode = request.factory && request.factoryData ? concat([request.factory, request.factoryData]) : \"0x\";\n const accountGasLimits = packAccountGasLimits({\n verificationGasLimit: request.verificationGasLimit,\n callGasLimit: request.callGasLimit\n });\n const gasFees = packAccountGasLimits({\n maxPriorityFeePerGas: request.maxPriorityFeePerGas,\n maxFeePerGas: request.maxFeePerGas\n });\n const paymasterAndData = request.paymaster && isAddress(request.paymaster) ? packPaymasterData({\n paymaster: request.paymaster,\n paymasterVerificationGasLimit: request.paymasterVerificationGasLimit,\n paymasterPostOpGasLimit: request.paymasterPostOpGasLimit,\n paymasterData: request.paymasterData\n }) : \"0x\";\n return encodeAbiParameters([\n { type: \"address\" },\n { type: \"uint256\" },\n { type: \"bytes32\" },\n { type: \"bytes32\" },\n { type: \"bytes32\" },\n { type: \"uint256\" },\n { type: \"bytes32\" },\n { type: \"bytes32\" }\n ], [\n request.sender,\n hexToBigInt(request.nonce),\n keccak256(initCode),\n keccak256(request.callData),\n accountGasLimits,\n hexToBigInt(request.preVerificationGas),\n gasFees,\n keccak256(paymasterAndData)\n ]);\n };\n __default = {\n version: \"0.7.0\",\n address: {\n default: \"0x0000000071727De22E5E9d8BAf0edAc6f37da032\"\n },\n abi: EntryPointAbi_v7,\n getUserOperationHash: (request, entryPointAddress, chainId) => {\n const encoded = encodeAbiParameters([{ type: \"bytes32\" }, { type: \"address\" }, { type: \"uint256\" }], [\n keccak256(packUserOperation(request)),\n entryPointAddress,\n BigInt(chainId)\n ]);\n return keccak256(encoded);\n },\n packUserOperation\n };\n }\n });\n\n // ../../../node_modules/.pnpm/@aa-sdk+core@4.62.0_typescript@5.8.3_viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64_/node_modules/@aa-sdk/core/dist/esm/actions/smartAccount/getUserOperationError.js\n async function getUserOperationError(client, request, entryPoint) {\n if (!client.account) {\n throw new AccountNotFoundError2();\n }\n const uo = deepHexlify(request);\n try {\n switch (entryPoint.version) {\n case \"0.6.0\":\n break;\n case \"0.7.0\":\n await client.simulateContract({\n address: entryPoint.address,\n abi: entryPoint.abi,\n functionName: \"handleOps\",\n args: [\n [\n {\n sender: client.account.address,\n nonce: fromHex(uo.nonce, \"bigint\"),\n initCode: uo.factory && uo.factoryData ? concat([uo.factory, uo.factoryData]) : \"0x\",\n callData: uo.callData,\n accountGasLimits: packAccountGasLimits({\n verificationGasLimit: uo.verificationGasLimit,\n callGasLimit: uo.callGasLimit\n }),\n preVerificationGas: fromHex(uo.preVerificationGas, \"bigint\"),\n gasFees: packAccountGasLimits({\n maxPriorityFeePerGas: uo.maxPriorityFeePerGas,\n maxFeePerGas: uo.maxFeePerGas\n }),\n paymasterAndData: uo.paymaster && isAddress(uo.paymaster) ? packPaymasterData({\n paymaster: uo.paymaster,\n paymasterVerificationGasLimit: uo.paymasterVerificationGasLimit,\n paymasterPostOpGasLimit: uo.paymasterPostOpGasLimit,\n paymasterData: uo.paymasterData\n }) : \"0x\",\n signature: uo.signature\n }\n ],\n client.account.address\n ]\n });\n }\n } catch (err) {\n if (err?.cause && err?.cause?.raw) {\n try {\n const { errorName, args } = decodeErrorResult({\n abi: entryPoint.abi,\n data: err.cause.raw\n });\n console.error(`Failed with '${errorName}':`);\n switch (errorName) {\n case \"FailedOpWithRevert\":\n case \"FailedOp\":\n const argsIdx = errorName === \"FailedOp\" ? 1 : 2;\n console.error(args && args[argsIdx] ? `Smart contract account reverted with error: ${args[argsIdx]}` : \"No revert data from smart contract account\");\n break;\n default:\n args && args.forEach((arg) => console.error(`\n${arg}`));\n }\n return;\n } catch (err2) {\n }\n }\n console.error(\"Entrypoint reverted with error: \");\n console.error(err);\n }\n }\n var init_getUserOperationError = __esm({\n \"../../../node_modules/.pnpm/@aa-sdk+core@4.62.0_typescript@5.8.3_viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64_/node_modules/@aa-sdk/core/dist/esm/actions/smartAccount/getUserOperationError.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_esm();\n init_account2();\n init_utils10();\n init__();\n }\n });\n\n // ../../../node_modules/.pnpm/@aa-sdk+core@4.62.0_typescript@5.8.3_viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64_/node_modules/@aa-sdk/core/dist/esm/actions/smartAccount/internal/sendUserOperation.js\n async function _sendUserOperation(client, args) {\n const { account = client.account, uoStruct, context: context2, overrides } = args;\n if (!account) {\n throw new AccountNotFoundError2();\n }\n if (!client.chain) {\n throw new ChainNotFoundError2();\n }\n const entryPoint = account.getEntryPoint();\n const request = await signUserOperation(client, {\n uoStruct,\n account,\n context: context2,\n overrides\n });\n try {\n return {\n hash: await client.sendRawUserOperation(request, entryPoint.address),\n request\n };\n } catch (err) {\n getUserOperationError(client, request, entryPoint);\n throw err;\n }\n }\n var init_sendUserOperation = __esm({\n \"../../../node_modules/.pnpm/@aa-sdk+core@4.62.0_typescript@5.8.3_viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64_/node_modules/@aa-sdk/core/dist/esm/actions/smartAccount/internal/sendUserOperation.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_account2();\n init_client();\n init_signUserOperation();\n init_getUserOperationError();\n }\n });\n\n // ../../../node_modules/.pnpm/@aa-sdk+core@4.62.0_typescript@5.8.3_viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64_/node_modules/@aa-sdk/core/dist/esm/actions/smartAccount/dropAndReplaceUserOperation.js\n async function dropAndReplaceUserOperation(client_, args) {\n const client = clientHeaderTrack(client_, \"dropAndReplaceUserOperation\");\n const { account = client.account, uoToDrop, overrides, context: context2 } = args;\n if (!account) {\n throw new AccountNotFoundError2();\n }\n if (!isBaseSmartAccountClient(client)) {\n throw new IncompatibleClientError(\"BaseSmartAccountClient\", \"dropAndReplaceUserOperation\", client);\n }\n const entryPoint = account.getEntryPoint();\n const uoToSubmit = entryPoint.version === \"0.6.0\" ? {\n initCode: uoToDrop.initCode,\n sender: uoToDrop.sender,\n nonce: uoToDrop.nonce,\n callData: uoToDrop.callData,\n signature: await account.getDummySignature()\n } : {\n ...uoToDrop.factory && uoToDrop.factoryData ? {\n factory: uoToDrop.factory,\n factoryData: uoToDrop.factoryData\n } : {},\n sender: uoToDrop.sender,\n nonce: uoToDrop.nonce,\n callData: uoToDrop.callData,\n signature: await account.getDummySignature()\n };\n const { maxFeePerGas, maxPriorityFeePerGas } = await resolveProperties(await client.middleware.feeEstimator(uoToSubmit, { account, client }));\n const _overrides = {\n ...overrides,\n maxFeePerGas: bigIntMax(BigInt(maxFeePerGas ?? 0n), bigIntMultiply(uoToDrop.maxFeePerGas, 1.1)),\n maxPriorityFeePerGas: bigIntMax(BigInt(maxPriorityFeePerGas ?? 0n), bigIntMultiply(uoToDrop.maxPriorityFeePerGas, 1.1))\n };\n const uoToSend = await _runMiddlewareStack(client, {\n uo: uoToSubmit,\n overrides: _overrides,\n account\n });\n return _sendUserOperation(client, {\n uoStruct: uoToSend,\n account,\n context: context2,\n overrides: _overrides\n });\n }\n var init_dropAndReplaceUserOperation = __esm({\n \"../../../node_modules/.pnpm/@aa-sdk+core@4.62.0_typescript@5.8.3_viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64_/node_modules/@aa-sdk/core/dist/esm/actions/smartAccount/dropAndReplaceUserOperation.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_isSmartAccountClient();\n init_account2();\n init_client();\n init_utils10();\n init_runMiddlewareStack();\n init_sendUserOperation();\n init_esm6();\n }\n });\n\n // ../../../node_modules/.pnpm/@aa-sdk+core@4.62.0_typescript@5.8.3_viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64_/node_modules/@aa-sdk/core/dist/esm/actions/smartAccount/getAddress.js\n var getAddress2;\n var init_getAddress2 = __esm({\n \"../../../node_modules/.pnpm/@aa-sdk+core@4.62.0_typescript@5.8.3_viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64_/node_modules/@aa-sdk/core/dist/esm/actions/smartAccount/getAddress.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_account2();\n getAddress2 = (client, args) => {\n const { account } = args ?? { account: client.account };\n if (!account) {\n throw new AccountNotFoundError2();\n }\n return account.address;\n };\n }\n });\n\n // ../../../node_modules/.pnpm/@aa-sdk+core@4.62.0_typescript@5.8.3_viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64_/node_modules/@aa-sdk/core/dist/esm/errors/useroperation.js\n var InvalidUserOperationError, WaitForUserOperationError;\n var init_useroperation = __esm({\n \"../../../node_modules/.pnpm/@aa-sdk+core@4.62.0_typescript@5.8.3_viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64_/node_modules/@aa-sdk/core/dist/esm/errors/useroperation.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_base2();\n InvalidUserOperationError = class extends BaseError4 {\n /**\n * Creates an instance of InvalidUserOperationError.\n *\n * InvalidUserOperationError constructor\n *\n * @param {UserOperationStruct} uo the invalid user operation struct\n */\n constructor(uo) {\n super(`Request is missing parameters. All properties on UserOperationStruct must be set. uo: ${JSON.stringify(uo, (_key, value) => typeof value === \"bigint\" ? {\n type: \"bigint\",\n value: value.toString()\n } : value, 2)}`);\n Object.defineProperty(this, \"name\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: \"InvalidUserOperationError\"\n });\n }\n };\n WaitForUserOperationError = class extends BaseError4 {\n /**\n * @param {UserOperationRequest} request the user operation request that failed\n * @param {Error} error the underlying error that caused the failure\n */\n constructor(request, error) {\n super(`Failed to find User Operation: ${error.message}`);\n Object.defineProperty(this, \"request\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: request\n });\n }\n };\n }\n });\n\n // ../../../node_modules/.pnpm/@aa-sdk+core@4.62.0_typescript@5.8.3_viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64_/node_modules/@aa-sdk/core/dist/esm/actions/smartAccount/waitForUserOperationTransacation.js\n var waitForUserOperationTransaction;\n var init_waitForUserOperationTransacation = __esm({\n \"../../../node_modules/.pnpm/@aa-sdk+core@4.62.0_typescript@5.8.3_viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64_/node_modules/@aa-sdk/core/dist/esm/actions/smartAccount/waitForUserOperationTransacation.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_isSmartAccountClient();\n init_client();\n init_transaction3();\n init_logger();\n init_esm6();\n waitForUserOperationTransaction = async (client_, args) => {\n const client = clientHeaderTrack(client_, \"waitForUserOperationTransaction\");\n if (!isBaseSmartAccountClient(client)) {\n throw new IncompatibleClientError(\"BaseSmartAccountClient\", \"waitForUserOperationTransaction\", client);\n }\n const { hash: hash3, retries = {\n maxRetries: client.txMaxRetries,\n intervalMs: client.txRetryIntervalMs,\n multiplier: client.txRetryMultiplier\n } } = args;\n for (let i3 = 0; i3 < retries.maxRetries; i3++) {\n const txRetryIntervalWithJitterMs = retries.intervalMs * Math.pow(retries.multiplier, i3) + Math.random() * 100;\n await new Promise((resolve) => setTimeout(resolve, txRetryIntervalWithJitterMs));\n const receipt = await client.getUserOperationReceipt(hash3, args.tag).catch((e3) => {\n Logger.error(`[SmartAccountProvider] waitForUserOperationTransaction error fetching receipt for ${hash3}: ${e3}`);\n });\n if (receipt) {\n return receipt?.receipt.transactionHash;\n }\n }\n throw new FailedToFindTransactionError(hash3);\n };\n }\n });\n\n // ../../../node_modules/.pnpm/@aa-sdk+core@4.62.0_typescript@5.8.3_viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64_/node_modules/@aa-sdk/core/dist/esm/actions/smartAccount/sendTransaction.js\n async function sendTransaction2(client_, args, overrides, context2) {\n const client = clientHeaderTrack(client_, \"estimateUserOperationGas\");\n const { account = client.account } = args;\n if (!account || typeof account === \"string\") {\n throw new AccountNotFoundError2();\n }\n if (!args.to) {\n throw new TransactionMissingToParamError();\n }\n if (!isBaseSmartAccountClient(client)) {\n throw new IncompatibleClientError(\"BaseSmartAccountClient\", \"sendTransaction\", client);\n }\n const uoStruct = await buildUserOperationFromTx(client, args, overrides, context2);\n const { hash: hash3, request } = await _sendUserOperation(client, {\n account,\n uoStruct,\n context: context2,\n overrides\n });\n return waitForUserOperationTransaction(client, { hash: hash3 }).catch((e3) => {\n throw new WaitForUserOperationError(request, e3);\n });\n }\n var init_sendTransaction2 = __esm({\n \"../../../node_modules/.pnpm/@aa-sdk+core@4.62.0_typescript@5.8.3_viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64_/node_modules/@aa-sdk/core/dist/esm/actions/smartAccount/sendTransaction.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_isSmartAccountClient();\n init_account2();\n init_client();\n init_transaction3();\n init_useroperation();\n init_buildUserOperationFromTx();\n init_sendUserOperation();\n init_waitForUserOperationTransacation();\n init_esm6();\n }\n });\n\n // ../../../node_modules/.pnpm/@aa-sdk+core@4.62.0_typescript@5.8.3_viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64_/node_modules/@aa-sdk/core/dist/esm/actions/smartAccount/sendTransactions.js\n async function sendTransactions(client_, args) {\n const client = clientHeaderTrack(client_, \"estimateUserOperationGas\");\n const { requests, overrides, account = client.account, context: context2 } = args;\n if (!account) {\n throw new AccountNotFoundError2();\n }\n if (!isBaseSmartAccountClient(client)) {\n throw new IncompatibleClientError(\"BaseSmartAccountClient\", \"sendTransactions\", client);\n }\n const { uoStruct } = await buildUserOperationFromTxs(client, {\n requests,\n overrides,\n account,\n context: context2\n });\n const { hash: hash3, request } = await _sendUserOperation(client, {\n account,\n uoStruct,\n context: context2,\n overrides\n });\n return waitForUserOperationTransaction(client, { hash: hash3 }).catch((e3) => {\n throw new WaitForUserOperationError(request, e3);\n });\n }\n var init_sendTransactions = __esm({\n \"../../../node_modules/.pnpm/@aa-sdk+core@4.62.0_typescript@5.8.3_viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64_/node_modules/@aa-sdk/core/dist/esm/actions/smartAccount/sendTransactions.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_isSmartAccountClient();\n init_account2();\n init_client();\n init_useroperation();\n init_buildUserOperationFromTxs();\n init_sendUserOperation();\n init_waitForUserOperationTransacation();\n init_esm6();\n }\n });\n\n // ../../../node_modules/.pnpm/@aa-sdk+core@4.62.0_typescript@5.8.3_viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64_/node_modules/@aa-sdk/core/dist/esm/actions/smartAccount/sendUserOperation.js\n async function sendUserOperation(client_, args) {\n const client = clientHeaderTrack(client_, \"sendUserOperation\");\n const { account = client.account, context: context2, overrides } = args;\n if (!account) {\n throw new AccountNotFoundError2();\n }\n if (!isBaseSmartAccountClient(client)) {\n throw new IncompatibleClientError(\"BaseSmartAccountClient\", \"sendUserOperation\", client);\n }\n const uoStruct = await buildUserOperation(client, {\n uo: args.uo,\n account,\n context: context2,\n overrides\n });\n return _sendUserOperation(client, {\n account,\n uoStruct,\n context: context2,\n overrides\n });\n }\n var init_sendUserOperation2 = __esm({\n \"../../../node_modules/.pnpm/@aa-sdk+core@4.62.0_typescript@5.8.3_viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64_/node_modules/@aa-sdk/core/dist/esm/actions/smartAccount/sendUserOperation.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_isSmartAccountClient();\n init_account2();\n init_client();\n init_buildUserOperation();\n init_sendUserOperation();\n init_esm6();\n }\n });\n\n // ../../../node_modules/.pnpm/@aa-sdk+core@4.62.0_typescript@5.8.3_viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64_/node_modules/@aa-sdk/core/dist/esm/actions/smartAccount/signMessage.js\n var signMessage2;\n var init_signMessage2 = __esm({\n \"../../../node_modules/.pnpm/@aa-sdk+core@4.62.0_typescript@5.8.3_viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64_/node_modules/@aa-sdk/core/dist/esm/actions/smartAccount/signMessage.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_account2();\n signMessage2 = async (client, { account = client.account, message }) => {\n if (!account) {\n throw new AccountNotFoundError2();\n }\n return account.signMessageWith6492({ message });\n };\n }\n });\n\n // ../../../node_modules/.pnpm/@aa-sdk+core@4.62.0_typescript@5.8.3_viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64_/node_modules/@aa-sdk/core/dist/esm/actions/smartAccount/signTypedData.js\n var signTypedData2;\n var init_signTypedData2 = __esm({\n \"../../../node_modules/.pnpm/@aa-sdk+core@4.62.0_typescript@5.8.3_viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64_/node_modules/@aa-sdk/core/dist/esm/actions/smartAccount/signTypedData.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_account2();\n signTypedData2 = async (client, { account = client.account, typedData }) => {\n if (!account) {\n throw new AccountNotFoundError2();\n }\n return account.signTypedDataWith6492(typedData);\n };\n }\n });\n\n // ../../../node_modules/.pnpm/@aa-sdk+core@4.62.0_typescript@5.8.3_viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64_/node_modules/@aa-sdk/core/dist/esm/actions/smartAccount/upgradeAccount.js\n var upgradeAccount;\n var init_upgradeAccount = __esm({\n \"../../../node_modules/.pnpm/@aa-sdk+core@4.62.0_typescript@5.8.3_viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64_/node_modules/@aa-sdk/core/dist/esm/actions/smartAccount/upgradeAccount.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_isSmartAccountClient();\n init_account2();\n init_client();\n init_sendUserOperation2();\n init_waitForUserOperationTransacation();\n init_esm6();\n upgradeAccount = async (client_, args) => {\n const client = clientHeaderTrack(client_, \"upgradeAccount\");\n const { account = client.account, upgradeTo, overrides, waitForTx, context: context2 } = args;\n if (!account) {\n throw new AccountNotFoundError2();\n }\n if (!isBaseSmartAccountClient(client)) {\n throw new IncompatibleClientError(\"BaseSmartAccountClient\", \"upgradeAccount\", client);\n }\n const { implAddress: accountImplAddress, initializationData } = upgradeTo;\n const encodeUpgradeData = await account.encodeUpgradeToAndCall({\n upgradeToAddress: accountImplAddress,\n upgradeToInitData: initializationData\n });\n const result = await sendUserOperation(client, {\n uo: {\n target: account.address,\n data: encodeUpgradeData\n },\n account,\n overrides,\n context: context2\n });\n let hash3 = result.hash;\n if (waitForTx) {\n hash3 = await waitForUserOperationTransaction(client, result);\n }\n return hash3;\n };\n }\n });\n\n // ../../../node_modules/.pnpm/@aa-sdk+core@4.62.0_typescript@5.8.3_viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64_/node_modules/@aa-sdk/core/dist/esm/client/decorators/smartAccountClient.js\n var smartAccountClientActions, smartAccountClientMethodKeys;\n var init_smartAccountClient = __esm({\n \"../../../node_modules/.pnpm/@aa-sdk+core@4.62.0_typescript@5.8.3_viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64_/node_modules/@aa-sdk/core/dist/esm/client/decorators/smartAccountClient.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_buildUserOperation();\n init_buildUserOperationFromTx();\n init_buildUserOperationFromTxs();\n init_checkGasSponsorshipEligibility();\n init_dropAndReplaceUserOperation();\n init_getAddress2();\n init_sendTransaction2();\n init_sendTransactions();\n init_sendUserOperation2();\n init_signMessage2();\n init_signTypedData2();\n init_signUserOperation();\n init_upgradeAccount();\n init_waitForUserOperationTransacation();\n smartAccountClientActions = (client) => ({\n buildUserOperation: (args) => buildUserOperation(client, args),\n buildUserOperationFromTx: (args, overrides, context2) => buildUserOperationFromTx(client, args, overrides, context2),\n buildUserOperationFromTxs: (args) => buildUserOperationFromTxs(client, args),\n checkGasSponsorshipEligibility: (args) => checkGasSponsorshipEligibility(client, args),\n signUserOperation: (args) => signUserOperation(client, args),\n dropAndReplaceUserOperation: (args) => dropAndReplaceUserOperation(client, args),\n sendTransaction: (args, overrides, context2) => sendTransaction2(client, args, overrides, context2),\n sendTransactions: (args) => sendTransactions(client, args),\n sendUserOperation: (args) => sendUserOperation(client, args),\n waitForUserOperationTransaction: (args) => waitForUserOperationTransaction.bind(client)(client, args),\n upgradeAccount: (args) => upgradeAccount(client, args),\n getAddress: (args) => getAddress2(client, args),\n signMessage: (args) => signMessage2(client, args),\n signTypedData: (args) => signTypedData2(client, args)\n });\n smartAccountClientMethodKeys = Object.keys(\n // @ts-expect-error we just want to get the keys\n smartAccountClientActions(void 0)\n ).reduce((accum, curr) => {\n accum.add(curr);\n return accum;\n }, /* @__PURE__ */ new Set());\n }\n });\n\n // ../../../node_modules/.pnpm/@aa-sdk+core@4.62.0_typescript@5.8.3_viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64_/node_modules/@aa-sdk/core/dist/esm/client/isSmartAccountClient.js\n function isSmartAccountClient(client) {\n for (const key of smartAccountClientMethodKeys) {\n if (!(key in client)) {\n return false;\n }\n }\n return client && \"middleware\" in client;\n }\n function isBaseSmartAccountClient(client) {\n return client && \"middleware\" in client;\n }\n var init_isSmartAccountClient = __esm({\n \"../../../node_modules/.pnpm/@aa-sdk+core@4.62.0_typescript@5.8.3_viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64_/node_modules/@aa-sdk/core/dist/esm/client/isSmartAccountClient.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_smartAccountClient();\n }\n });\n\n // ../../../node_modules/.pnpm/@aa-sdk+core@4.62.0_typescript@5.8.3_viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64_/node_modules/@aa-sdk/core/dist/esm/actions/smartAccount/internal/initUserOperation.js\n async function _initUserOperation(client, args) {\n const { account = client.account, uo, overrides } = args;\n if (!account) {\n throw new AccountNotFoundError2();\n }\n if (!client.chain) {\n throw new ChainNotFoundError2();\n }\n const entryPoint = account.getEntryPoint();\n const callData = Array.isArray(uo) ? account.encodeBatchExecute(uo) : typeof uo === \"string\" ? uo : account.encodeExecute(uo);\n const signature = account.getDummySignature();\n const nonce = overrides?.nonce ?? account.getAccountNonce(overrides?.nonceKey);\n const struct = entryPoint.version === \"0.6.0\" ? {\n initCode: account.getInitCode(),\n sender: account.address,\n nonce,\n callData,\n signature\n } : {\n factory: conditionalReturn(account.isAccountDeployed().then((deployed) => !deployed), account.getFactoryAddress),\n factoryData: conditionalReturn(account.isAccountDeployed().then((deployed) => !deployed), account.getFactoryData),\n sender: account.address,\n nonce,\n callData,\n signature\n };\n return struct;\n }\n var init_initUserOperation = __esm({\n \"../../../node_modules/.pnpm/@aa-sdk+core@4.62.0_typescript@5.8.3_viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64_/node_modules/@aa-sdk/core/dist/esm/actions/smartAccount/internal/initUserOperation.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_account2();\n init_client();\n init_utils10();\n }\n });\n\n // ../../../node_modules/.pnpm/@aa-sdk+core@4.62.0_typescript@5.8.3_viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64_/node_modules/@aa-sdk/core/dist/esm/client/addBreadcrumb.js\n function hasAddBreadcrumb(a3) {\n return ADD_BREADCRUMB in a3;\n }\n function clientHeaderTrack(client, crumb) {\n if (hasAddBreadcrumb(client)) {\n return client[ADD_BREADCRUMB](crumb);\n }\n return client;\n }\n var ADD_BREADCRUMB;\n var init_addBreadcrumb = __esm({\n \"../../../node_modules/.pnpm/@aa-sdk+core@4.62.0_typescript@5.8.3_viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64_/node_modules/@aa-sdk/core/dist/esm/client/addBreadcrumb.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n ADD_BREADCRUMB = Symbol(\"addBreadcrumb\");\n }\n });\n\n // ../../../node_modules/.pnpm/@aa-sdk+core@4.62.0_typescript@5.8.3_viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64_/node_modules/@aa-sdk/core/dist/esm/actions/smartAccount/buildUserOperation.js\n async function buildUserOperation(client_, args) {\n const client = clientHeaderTrack(client_, USER_OPERATION_METHOD);\n const { account = client.account, overrides, context: context2 } = args;\n if (!account) {\n throw new AccountNotFoundError2();\n }\n if (!isBaseSmartAccountClient(client)) {\n throw new IncompatibleClientError(\"BaseSmartAccountClient\", USER_OPERATION_METHOD, client);\n }\n return _initUserOperation(client, args).then((_uo) => _runMiddlewareStack(client, {\n uo: _uo,\n overrides,\n account,\n context: context2\n }));\n }\n var USER_OPERATION_METHOD;\n var init_buildUserOperation = __esm({\n \"../../../node_modules/.pnpm/@aa-sdk+core@4.62.0_typescript@5.8.3_viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64_/node_modules/@aa-sdk/core/dist/esm/actions/smartAccount/buildUserOperation.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_isSmartAccountClient();\n init_account2();\n init_client();\n init_initUserOperation();\n init_runMiddlewareStack();\n init_addBreadcrumb();\n USER_OPERATION_METHOD = \"buildUserOperation\";\n }\n });\n\n // ../../../node_modules/.pnpm/@aa-sdk+core@4.62.0_typescript@5.8.3_viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64_/node_modules/@aa-sdk/core/dist/esm/client/schema.js\n var ConnectionConfigSchema, UserOperationFeeOptionsFieldSchema, UserOperationFeeOptionsSchema_v6, UserOperationFeeOptionsSchema_v7, UserOperationFeeOptionsSchema, SmartAccountClientOptsSchema;\n var init_schema2 = __esm({\n \"../../../node_modules/.pnpm/@aa-sdk+core@4.62.0_typescript@5.8.3_viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64_/node_modules/@aa-sdk/core/dist/esm/client/schema.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_esm5();\n init_utils10();\n ConnectionConfigSchema = external_exports.intersection(external_exports.union([\n external_exports.object({\n rpcUrl: external_exports.never().optional(),\n apiKey: external_exports.string(),\n jwt: external_exports.never().optional()\n }),\n external_exports.object({\n rpcUrl: external_exports.never().optional(),\n apiKey: external_exports.never().optional(),\n jwt: external_exports.string()\n }),\n external_exports.object({\n rpcUrl: external_exports.string(),\n apiKey: external_exports.never().optional(),\n jwt: external_exports.never().optional()\n }),\n external_exports.object({\n rpcUrl: external_exports.string(),\n apiKey: external_exports.never().optional(),\n jwt: external_exports.string()\n })\n ]), external_exports.object({\n chainAgnosticUrl: external_exports.string().optional()\n }));\n UserOperationFeeOptionsFieldSchema = BigNumberishRangeSchema.merge(MultiplierSchema).partial();\n UserOperationFeeOptionsSchema_v6 = external_exports.object({\n maxFeePerGas: UserOperationFeeOptionsFieldSchema,\n maxPriorityFeePerGas: UserOperationFeeOptionsFieldSchema,\n callGasLimit: UserOperationFeeOptionsFieldSchema,\n verificationGasLimit: UserOperationFeeOptionsFieldSchema,\n preVerificationGas: UserOperationFeeOptionsFieldSchema\n }).partial().strict();\n UserOperationFeeOptionsSchema_v7 = UserOperationFeeOptionsSchema_v6.extend({\n paymasterVerificationGasLimit: UserOperationFeeOptionsFieldSchema,\n paymasterPostOpGasLimit: UserOperationFeeOptionsFieldSchema\n }).partial().strict();\n UserOperationFeeOptionsSchema = UserOperationFeeOptionsSchema_v7;\n SmartAccountClientOptsSchema = external_exports.object({\n /**\n * The maximum number of times to try fetching a transaction receipt before giving up (default: 5)\n */\n txMaxRetries: external_exports.number().min(0).optional().default(5),\n /**\n * The interval in milliseconds to wait between retries while waiting for tx receipts (default: 2_000)\n */\n txRetryIntervalMs: external_exports.number().min(0).optional().default(2e3),\n /**\n * The multiplier on interval length to wait between retries while waiting for tx receipts (default: 1.5)\n */\n txRetryMultiplier: external_exports.number().min(0).optional().default(1.5),\n /**\n * Optional user operation fee options to be set globally at the provider level\n */\n feeOptions: UserOperationFeeOptionsSchema.optional()\n }).strict();\n }\n });\n\n // ../../../node_modules/.pnpm/@aa-sdk+core@4.62.0_typescript@5.8.3_viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64_/node_modules/@aa-sdk/core/dist/esm/middleware/defaults/feeEstimator.js\n function defaultFeeEstimator(client) {\n return async (struct, { overrides, feeOptions }) => {\n const feeData = await client.estimateFeesPerGas();\n if (!feeData.maxFeePerGas || feeData.maxPriorityFeePerGas == null) {\n throw new Error(\"feeData is missing maxFeePerGas or maxPriorityFeePerGas\");\n }\n let maxPriorityFeePerGas = await client.estimateMaxPriorityFeePerGas();\n maxPriorityFeePerGas = applyUserOpOverrideOrFeeOption(maxPriorityFeePerGas, overrides?.maxPriorityFeePerGas, feeOptions?.maxPriorityFeePerGas);\n let maxFeePerGas = feeData.maxFeePerGas - feeData.maxPriorityFeePerGas + BigInt(maxPriorityFeePerGas);\n maxFeePerGas = applyUserOpOverrideOrFeeOption(maxFeePerGas, overrides?.maxFeePerGas, feeOptions?.maxFeePerGas);\n struct.maxFeePerGas = maxFeePerGas;\n struct.maxPriorityFeePerGas = maxPriorityFeePerGas;\n return struct;\n };\n }\n var init_feeEstimator = __esm({\n \"../../../node_modules/.pnpm/@aa-sdk+core@4.62.0_typescript@5.8.3_viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64_/node_modules/@aa-sdk/core/dist/esm/middleware/defaults/feeEstimator.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_utils10();\n }\n });\n\n // ../../../node_modules/.pnpm/@aa-sdk+core@4.62.0_typescript@5.8.3_viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64_/node_modules/@aa-sdk/core/dist/esm/middleware/defaults/gasEstimator.js\n var defaultGasEstimator;\n var init_gasEstimator = __esm({\n \"../../../node_modules/.pnpm/@aa-sdk+core@4.62.0_typescript@5.8.3_viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64_/node_modules/@aa-sdk/core/dist/esm/middleware/defaults/gasEstimator.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_utils10();\n init_userop();\n defaultGasEstimator = (client) => async (struct, { account, overrides, feeOptions }) => {\n const request = deepHexlify(await resolveProperties(struct));\n const estimates = await client.estimateUserOperationGas(request, account.getEntryPoint().address, overrides?.stateOverride);\n const callGasLimit = applyUserOpOverrideOrFeeOption(estimates.callGasLimit, overrides?.callGasLimit, feeOptions?.callGasLimit);\n const verificationGasLimit = applyUserOpOverrideOrFeeOption(estimates.verificationGasLimit, overrides?.verificationGasLimit, feeOptions?.verificationGasLimit);\n const preVerificationGas = applyUserOpOverrideOrFeeOption(estimates.preVerificationGas, overrides?.preVerificationGas, feeOptions?.preVerificationGas);\n struct.callGasLimit = callGasLimit;\n struct.verificationGasLimit = verificationGasLimit;\n struct.preVerificationGas = preVerificationGas;\n const entryPoint = account.getEntryPoint();\n if (entryPoint.version === \"0.7.0\") {\n const paymasterVerificationGasLimit = applyUserOpOverrideOrFeeOption(estimates.paymasterVerificationGasLimit, overrides?.paymasterVerificationGasLimit, feeOptions?.paymasterVerificationGasLimit);\n const uo_v7 = struct;\n uo_v7.paymasterVerificationGasLimit = paymasterVerificationGasLimit;\n uo_v7.paymasterPostOpGasLimit = uo_v7.paymasterPostOpGasLimit ?? (uo_v7.paymaster ? \"0x0\" : void 0);\n }\n return struct;\n };\n }\n });\n\n // ../../../node_modules/.pnpm/@aa-sdk+core@4.62.0_typescript@5.8.3_viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64_/node_modules/@aa-sdk/core/dist/esm/middleware/defaults/paymasterAndData.js\n var defaultPaymasterAndData;\n var init_paymasterAndData = __esm({\n \"../../../node_modules/.pnpm/@aa-sdk+core@4.62.0_typescript@5.8.3_viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64_/node_modules/@aa-sdk/core/dist/esm/middleware/defaults/paymasterAndData.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n defaultPaymasterAndData = async (struct, { account }) => {\n const entryPoint = account.getEntryPoint();\n if (entryPoint.version === \"0.6.0\") {\n struct.paymasterAndData = \"0x\";\n }\n return struct;\n };\n }\n });\n\n // ../../../node_modules/.pnpm/@aa-sdk+core@4.62.0_typescript@5.8.3_viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64_/node_modules/@aa-sdk/core/dist/esm/middleware/defaults/userOpSigner.js\n var defaultUserOpSigner;\n var init_userOpSigner = __esm({\n \"../../../node_modules/.pnpm/@aa-sdk+core@4.62.0_typescript@5.8.3_viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64_/node_modules/@aa-sdk/core/dist/esm/middleware/defaults/userOpSigner.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_account2();\n init_client();\n init_useroperation();\n init_utils10();\n defaultUserOpSigner = async (struct, { client, account = client.account }) => {\n if (!account) {\n throw new AccountNotFoundError2();\n }\n if (!client?.chain) {\n throw new ChainNotFoundError2();\n }\n const resolvedStruct = await resolveProperties(struct);\n const request = deepHexlify(resolvedStruct);\n if (!isValidRequest(request)) {\n throw new InvalidUserOperationError(resolvedStruct);\n }\n return {\n ...resolvedStruct,\n signature: await account.signUserOperationHash(account.getEntryPoint().getUserOperationHash(request))\n };\n };\n }\n });\n\n // ../../../node_modules/.pnpm/@aa-sdk+core@4.62.0_typescript@5.8.3_viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64_/node_modules/@aa-sdk/core/dist/esm/middleware/actions.js\n var middlewareActions;\n var init_actions = __esm({\n \"../../../node_modules/.pnpm/@aa-sdk+core@4.62.0_typescript@5.8.3_viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64_/node_modules/@aa-sdk/core/dist/esm/middleware/actions.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_feeEstimator();\n init_gasEstimator();\n init_paymasterAndData();\n init_userOpSigner();\n init_noopMiddleware();\n middlewareActions = (overrides) => (client) => ({\n middleware: {\n customMiddleware: overrides.customMiddleware ?? noopMiddleware,\n dummyPaymasterAndData: overrides.dummyPaymasterAndData ?? defaultPaymasterAndData,\n feeEstimator: overrides.feeEstimator ?? defaultFeeEstimator(client),\n gasEstimator: overrides.gasEstimator ?? defaultGasEstimator(client),\n paymasterAndData: overrides.paymasterAndData ?? defaultPaymasterAndData,\n userOperationSimulator: overrides.userOperationSimulator ?? noopMiddleware,\n signUserOperation: overrides.signUserOperation ?? defaultUserOpSigner\n }\n });\n }\n });\n\n // ../../../node_modules/.pnpm/@aa-sdk+core@4.62.0_typescript@5.8.3_viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64_/node_modules/@aa-sdk/core/dist/esm/client/smartAccountClient.js\n function createSmartAccountClient(config2) {\n const { key = \"account\", name = \"account provider\", transport, type = \"SmartAccountClient\", addBreadCrumb, ...params } = config2;\n const client = createBundlerClient({\n ...params,\n key,\n name,\n // we start out with this because the base methods for a SmartAccountClient\n // require a smart account client, but once we have completed building everything\n // we want to override this value with the one passed in by the extender\n type: \"SmartAccountClient\",\n // TODO: this needs to be tested\n transport: (opts) => {\n const rpcTransport = transport(opts);\n return custom(\n {\n name: \"SmartAccountClientTransport\",\n async request({ method, params: params2 }) {\n switch (method) {\n case \"eth_accounts\": {\n if (!client.account) {\n throw new AccountNotFoundError2();\n }\n return [client.account.address];\n }\n case \"eth_sendTransaction\":\n if (!client.account) {\n throw new AccountNotFoundError2();\n }\n if (!client.chain) {\n throw new ChainNotFoundError2();\n }\n const [tx] = params2;\n return client.sendTransaction({\n ...tx,\n account: client.account,\n chain: client.chain\n });\n case \"eth_sign\":\n if (!client.account) {\n throw new AccountNotFoundError2();\n }\n const [address, data] = params2;\n if (address?.toLowerCase() !== client.account.address.toLowerCase()) {\n throw new Error(\"cannot sign for address that is not the current account\");\n }\n return client.signMessage({\n message: data,\n account: client.account\n });\n case \"personal_sign\": {\n if (!client.account) {\n throw new AccountNotFoundError2();\n }\n const [data2, address2] = params2;\n if (address2?.toLowerCase() !== client.account.address.toLowerCase()) {\n throw new Error(\"cannot sign for address that is not the current account\");\n }\n return client.signMessage({\n message: data2,\n account: client.account\n });\n }\n case \"eth_signTypedData_v4\": {\n if (!client.account) {\n throw new AccountNotFoundError2();\n }\n const [address2, dataParams] = params2;\n if (address2?.toLowerCase() !== client.account.address.toLowerCase()) {\n throw new Error(\"cannot sign for address that is not the current account\");\n }\n try {\n return client.signTypedData({\n account: client.account,\n typedData: typeof dataParams === \"string\" ? JSON.parse(dataParams) : dataParams\n });\n } catch {\n throw new Error(\"invalid JSON data params\");\n }\n }\n case \"eth_chainId\":\n if (!opts.chain) {\n throw new ChainNotFoundError2();\n }\n return opts.chain.id;\n default:\n return rpcTransport.request(\n { method, params: params2 },\n // Retry count must be 0 here in order to respect the retry\n // count that is already specified on the underlying transport.\n { retryCount: 0 }\n );\n }\n }\n },\n // Retry count must be 0 here in order to respect the retry\n // count that is already specified on the underlying transport.\n { retryCount: 0 }\n )(opts);\n }\n }).extend(() => {\n const addBreadCrumbs = addBreadCrumb ? {\n [ADD_BREADCRUMB]: addBreadCrumb\n } : {};\n return {\n ...SmartAccountClientOptsSchema.parse(config2.opts ?? {}),\n ...addBreadCrumbs\n };\n }).extend(middlewareActions(config2)).extend(smartAccountClientActions);\n return { ...client, type };\n }\n var init_smartAccountClient2 = __esm({\n \"../../../node_modules/.pnpm/@aa-sdk+core@4.62.0_typescript@5.8.3_viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64_/node_modules/@aa-sdk/core/dist/esm/client/smartAccountClient.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_esm();\n init_esm5();\n init_account2();\n init_client();\n init_actions();\n init_bundlerClient2();\n init_smartAccountClient();\n init_schema2();\n init_addBreadcrumb();\n }\n });\n\n // ../../../node_modules/.pnpm/@aa-sdk+core@4.62.0_typescript@5.8.3_viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64_/node_modules/@aa-sdk/core/dist/esm/entrypoint/0.6.js\n var packUserOperation2, __default2;\n var init__2 = __esm({\n \"../../../node_modules/.pnpm/@aa-sdk+core@4.62.0_typescript@5.8.3_viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64_/node_modules/@aa-sdk/core/dist/esm/entrypoint/0.6.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_esm();\n init_EntryPointAbi_v6();\n packUserOperation2 = (request) => {\n const hashedInitCode = keccak256(request.initCode);\n const hashedCallData = keccak256(request.callData);\n const hashedPaymasterAndData = keccak256(request.paymasterAndData);\n return encodeAbiParameters([\n { type: \"address\" },\n { type: \"uint256\" },\n { type: \"bytes32\" },\n { type: \"bytes32\" },\n { type: \"uint256\" },\n { type: \"uint256\" },\n { type: \"uint256\" },\n { type: \"uint256\" },\n { type: \"uint256\" },\n { type: \"bytes32\" }\n ], [\n request.sender,\n hexToBigInt(request.nonce),\n hashedInitCode,\n hashedCallData,\n hexToBigInt(request.callGasLimit),\n hexToBigInt(request.verificationGasLimit),\n hexToBigInt(request.preVerificationGas),\n hexToBigInt(request.maxFeePerGas),\n hexToBigInt(request.maxPriorityFeePerGas),\n hashedPaymasterAndData\n ]);\n };\n __default2 = {\n version: \"0.6.0\",\n address: {\n default: \"0x5FF137D4b0FDCD49DcA30c7CF57E578a026d2789\"\n },\n abi: EntryPointAbi_v6,\n getUserOperationHash: (request, entryPointAddress, chainId) => {\n const encoded = encodeAbiParameters([{ type: \"bytes32\" }, { type: \"address\" }, { type: \"uint256\" }], [\n keccak256(packUserOperation2(request)),\n entryPointAddress,\n BigInt(chainId)\n ]);\n return keccak256(encoded);\n },\n packUserOperation: packUserOperation2\n };\n }\n });\n\n // ../../../node_modules/.pnpm/@aa-sdk+core@4.62.0_typescript@5.8.3_viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64_/node_modules/@aa-sdk/core/dist/esm/entrypoint/index.js\n function getEntryPoint(chain2, options) {\n const { version: version6 = defaultEntryPointVersion, addressOverride } = options ?? {\n version: defaultEntryPointVersion\n };\n const entryPoint = entryPointRegistry[version6 ?? defaultEntryPointVersion];\n const address = addressOverride ?? entryPoint.address[chain2.id] ?? entryPoint.address.default;\n if (!address) {\n throw new EntryPointNotFoundError(chain2, version6);\n }\n if (entryPoint.version === \"0.6.0\") {\n return {\n version: entryPoint.version,\n address,\n chain: chain2,\n abi: entryPoint.abi,\n getUserOperationHash: (r2) => entryPoint.getUserOperationHash(r2, address, chain2.id),\n packUserOperation: entryPoint.packUserOperation\n };\n } else if (entryPoint.version === \"0.7.0\") {\n return {\n version: entryPoint.version,\n address,\n chain: chain2,\n abi: entryPoint.abi,\n getUserOperationHash: (r2) => entryPoint.getUserOperationHash(r2, address, chain2.id),\n packUserOperation: entryPoint.packUserOperation\n };\n }\n throw new EntryPointNotFoundError(chain2, version6);\n }\n var defaultEntryPointVersion, entryPointRegistry;\n var init_entrypoint2 = __esm({\n \"../../../node_modules/.pnpm/@aa-sdk+core@4.62.0_typescript@5.8.3_viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64_/node_modules/@aa-sdk/core/dist/esm/entrypoint/index.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_entrypoint();\n init__2();\n init__();\n defaultEntryPointVersion = \"0.6.0\";\n entryPointRegistry = {\n \"0.6.0\": __default2,\n \"0.7.0\": __default\n };\n }\n });\n\n // ../../../node_modules/.pnpm/@aa-sdk+core@4.62.0_typescript@5.8.3_viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64_/node_modules/@aa-sdk/core/dist/esm/middleware/defaults/7702signer.js\n var default7702UserOpSigner;\n var init_signer = __esm({\n \"../../../node_modules/.pnpm/@aa-sdk+core@4.62.0_typescript@5.8.3_viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64_/node_modules/@aa-sdk/core/dist/esm/middleware/defaults/7702signer.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_esm();\n init_smartContractAccount();\n init_account2();\n init_client();\n init_userOpSigner();\n default7702UserOpSigner = (userOpSigner) => async (struct, params) => {\n const userOpSigner_ = userOpSigner ?? defaultUserOpSigner;\n const uo = await userOpSigner_({\n ...struct,\n // Strip out the dummy eip7702 fields.\n eip7702Auth: void 0\n }, params);\n const account = params.account ?? params.client.account;\n const { client } = params;\n if (!account || !isSmartAccountWithSigner(account)) {\n throw new AccountNotFoundError2();\n }\n const signer = account.getSigner();\n if (!signer.signAuthorization) {\n return uo;\n }\n if (!client.chain) {\n throw new ChainNotFoundError2();\n }\n const code = await client.getCode({ address: account.address }) ?? \"0x\";\n const implAddress = await account.getImplementationAddress();\n const expectedCode = \"0xef0100\" + implAddress.slice(2);\n if (code.toLowerCase() === expectedCode.toLowerCase()) {\n return uo;\n }\n const accountNonce = await params.client.getTransactionCount({\n address: account.address\n });\n const authSignature = await signer.signAuthorization({\n chainId: client.chain.id,\n contractAddress: implAddress,\n nonce: accountNonce\n });\n const { r: r2, s: s4 } = authSignature;\n const yParity = authSignature.yParity ?? authSignature.v - 27n;\n return {\n ...uo,\n eip7702Auth: {\n // deepHexlify doesn't encode number(0) correctly, it returns \"0x\"\n chainId: toHex(client.chain.id),\n nonce: toHex(accountNonce),\n address: implAddress,\n r: r2,\n s: s4,\n yParity: toHex(yParity)\n }\n };\n };\n }\n });\n\n // ../../../node_modules/.pnpm/@aa-sdk+core@4.62.0_typescript@5.8.3_viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64_/node_modules/@aa-sdk/core/dist/esm/middleware/defaults/7702gasEstimator.js\n var default7702GasEstimator;\n var init_gasEstimator2 = __esm({\n \"../../../node_modules/.pnpm/@aa-sdk+core@4.62.0_typescript@5.8.3_viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64_/node_modules/@aa-sdk/core/dist/esm/middleware/defaults/7702gasEstimator.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_esm();\n init_account2();\n init_gasEstimator();\n default7702GasEstimator = (gasEstimator) => async (struct, params) => {\n const gasEstimator_ = gasEstimator ?? defaultGasEstimator(params.client);\n const account = params.account ?? params.client.account;\n if (!account) {\n throw new AccountNotFoundError2();\n }\n const entryPoint = account.getEntryPoint();\n if (entryPoint.version !== \"0.7.0\") {\n throw new Error(\"This middleware is only compatible with EntryPoint v0.7.0\");\n }\n const [implementationAddress, code = \"0x\"] = await Promise.all([\n account.getImplementationAddress(),\n params.client.getCode({ address: params.account.address })\n ]);\n const isAlreadyDelegated = code.toLowerCase() === concatHex([\"0xef0100\", implementationAddress]);\n if (!isAlreadyDelegated) {\n struct.eip7702Auth = {\n chainId: numberToHex(params.client.chain?.id ?? 0),\n nonce: numberToHex(await params.client.getTransactionCount({\n address: params.account.address\n })),\n address: implementationAddress,\n r: zeroHash,\n // aka `bytes32(0)`\n s: zeroHash,\n yParity: \"0x0\"\n };\n }\n return gasEstimator_(struct, params);\n };\n }\n });\n\n // ../../../node_modules/.pnpm/@aa-sdk+core@4.62.0_typescript@5.8.3_viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64_/node_modules/@aa-sdk/core/dist/esm/middleware/defaults/webauthnGasEstimator.js\n var rip7212CheckBytecode, webauthnGasEstimator;\n var init_webauthnGasEstimator = __esm({\n \"../../../node_modules/.pnpm/@aa-sdk+core@4.62.0_typescript@5.8.3_viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64_/node_modules/@aa-sdk/core/dist/esm/middleware/defaults/webauthnGasEstimator.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_account2();\n init_gasEstimator();\n rip7212CheckBytecode = \"0x60806040526040517f532eaabd9574880dbf76b9b8cc00832c20a6ec113d682299550d7a6e0f345e25815260056020820152600160408201527f4a03ef9f92eb268cafa601072489a56380fa0dc43171d7712813b3a19a1eb5e560608201527f3e213e28a608ce9a2f4a17fd830c6654018a79b3e0263d91a8ba90622df6f2f0608082015260208160a0836101005afa503d5f823e3d81f3fe\";\n webauthnGasEstimator = (gasEstimator) => async (struct, params) => {\n const gasEstimator_ = gasEstimator ?? defaultGasEstimator(params.client);\n const account = params.account ?? params.client.account;\n if (!account) {\n throw new AccountNotFoundError2();\n }\n const entryPoint = account.getEntryPoint();\n if (entryPoint.version !== \"0.7.0\") {\n throw new Error(\"This middleware is only compatible with EntryPoint v0.7.0\");\n }\n const uo = await gasEstimator_(struct, params);\n const pvg = uo.verificationGasLimit instanceof Promise ? await uo.verificationGasLimit : uo?.verificationGasLimit ?? 0n;\n if (!pvg) {\n throw new Error(\"WebauthnGasEstimator: verificationGasLimit is 0 or not defined\");\n }\n const { data } = await params.client.call({ data: rip7212CheckBytecode });\n const chainHas7212 = data ? BigInt(data) === 1n : false;\n return {\n ...uo,\n verificationGasLimit: BigInt(typeof pvg === \"string\" ? BigInt(pvg) : pvg) + (chainHas7212 ? 10000n : 300000n)\n };\n };\n }\n });\n\n // ../../../node_modules/.pnpm/@aa-sdk+core@4.62.0_typescript@5.8.3_viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64_/node_modules/@aa-sdk/core/dist/esm/middleware/erc7677middleware.js\n function erc7677Middleware(params) {\n const dummyPaymasterAndData = async (uo, { client, account, feeOptions, overrides }) => {\n const userOp = deepHexlify(await resolveProperties(uo));\n userOp.maxFeePerGas = \"0x0\";\n userOp.maxPriorityFeePerGas = \"0x0\";\n userOp.callGasLimit = \"0x0\";\n userOp.verificationGasLimit = \"0x0\";\n userOp.preVerificationGas = \"0x0\";\n const entrypoint = account.getEntryPoint();\n if (entrypoint.version === \"0.7.0\") {\n userOp.paymasterVerificationGasLimit = \"0x0\";\n userOp.paymasterPostOpGasLimit = \"0x0\";\n }\n const context2 = (typeof params?.context === \"function\" ? await params?.context(userOp, { overrides, feeOptions }) : params?.context) ?? {};\n if (!client.chain) {\n throw new ChainNotFoundError2();\n }\n const erc7677client = client;\n const { paymaster, paymasterAndData: paymasterAndData2, paymasterData, paymasterPostOpGasLimit, paymasterVerificationGasLimit } = await erc7677client.request({\n method: \"pm_getPaymasterStubData\",\n params: [userOp, entrypoint.address, toHex(client.chain.id), context2]\n });\n if (entrypoint.version === \"0.6.0\") {\n return {\n ...uo,\n paymasterAndData: paymasterAndData2\n };\n }\n return {\n ...uo,\n paymaster,\n paymasterData,\n // these values are currently not override-able, so can be set here directly\n paymasterVerificationGasLimit,\n paymasterPostOpGasLimit\n };\n };\n const paymasterAndData = async (uo, { client, account, feeOptions, overrides }) => {\n const userOp = deepHexlify(await resolveProperties(uo));\n const context2 = (typeof params?.context === \"function\" ? await params?.context(userOp, { overrides, feeOptions }) : params?.context) ?? {};\n if (!client.chain) {\n throw new ChainNotFoundError2();\n }\n const erc7677client = client;\n const entrypoint = account.getEntryPoint();\n const { paymaster, paymasterAndData: paymasterAndData2, paymasterData, paymasterPostOpGasLimit, paymasterVerificationGasLimit } = await erc7677client.request({\n method: \"pm_getPaymasterData\",\n params: [userOp, entrypoint.address, toHex(client.chain.id), context2]\n });\n if (entrypoint.version === \"0.6.0\") {\n return {\n ...uo,\n paymasterAndData: paymasterAndData2\n };\n }\n return {\n ...uo,\n paymaster,\n paymasterData,\n // if these fields are returned they should override the ones set by user operation gas estimation,\n // otherwise they shouldn't modify\n ...paymasterVerificationGasLimit ? { paymasterVerificationGasLimit } : {},\n ...paymasterPostOpGasLimit ? { paymasterPostOpGasLimit } : {}\n };\n };\n return {\n dummyPaymasterAndData,\n paymasterAndData\n };\n }\n var init_erc7677middleware = __esm({\n \"../../../node_modules/.pnpm/@aa-sdk+core@4.62.0_typescript@5.8.3_viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64_/node_modules/@aa-sdk/core/dist/esm/middleware/erc7677middleware.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_esm();\n init_client();\n init_utils10();\n }\n });\n\n // ../../../node_modules/.pnpm/@aa-sdk+core@4.62.0_typescript@5.8.3_viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64_/node_modules/@aa-sdk/core/dist/esm/signer/local-account.js\n var LocalAccountSigner;\n var init_local_account = __esm({\n \"../../../node_modules/.pnpm/@aa-sdk+core@4.62.0_typescript@5.8.3_viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64_/node_modules/@aa-sdk/core/dist/esm/signer/local-account.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_accounts();\n LocalAccountSigner = class _LocalAccountSigner {\n /**\n * A function to initialize an object with an inner parameter and derive a signerType from it.\n *\n * @example\n * ```ts\n * import { LocalAccountSigner } from \"@aa-sdk/core\";\n * import { privateKeyToAccount, generatePrivateKey } from \"viem\";\n *\n * const signer = new LocalAccountSigner(\n * privateKeyToAccount(generatePrivateKey()),\n * );\n * ```\n *\n * @param {T} inner The inner parameter containing the necessary data\n */\n constructor(inner) {\n Object.defineProperty(this, \"inner\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: void 0\n });\n Object.defineProperty(this, \"signerType\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: void 0\n });\n Object.defineProperty(this, \"signMessage\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: (message) => {\n return this.inner.signMessage({ message });\n }\n });\n Object.defineProperty(this, \"signTypedData\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: async (params) => {\n return this.inner.signTypedData(params);\n }\n });\n Object.defineProperty(this, \"getAddress\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: async () => {\n return this.inner.address;\n }\n });\n this.inner = inner;\n this.signerType = inner.type;\n }\n /**\n * Signs an unsigned authorization using the provided private key account.\n *\n * @example\n * ```ts twoslash\n * import { LocalAccountSigner } from \"@aa-sdk/core\";\n * import { generatePrivateKey } from \"viem/accounts\";\n *\n * const signer = LocalAccountSigner.privateKeyToAccountSigner(generatePrivateKey());\n * const signedAuthorization = await signer.signAuthorization({\n * contractAddress: \"0x1234123412341234123412341234123412341234\",\n * chainId: 1,\n * nonce: 3,\n * });\n * ```\n *\n * @param {AuthorizationRequest} unsignedAuthorization - The unsigned authorization to be signed.\n * @returns {Promise>} A promise that resolves to the signed authorization.\n */\n signAuthorization(unsignedAuthorization) {\n return this.inner.signAuthorization(unsignedAuthorization);\n }\n /**\n * Creates a LocalAccountSigner using the provided mnemonic key and optional HD options.\n *\n * @example\n * ```ts\n * import { LocalAccountSigner } from \"@aa-sdk/core\";\n * import { generateMnemonic } from \"viem\";\n *\n * const signer = LocalAccountSigner.mnemonicToAccountSigner(generateMnemonic());\n * ```\n *\n * @param {string} key The mnemonic key to derive the account from.\n * @param {HDOptions} [opts] Optional HD options for deriving the account.\n * @returns {LocalAccountSigner} A LocalAccountSigner object for the derived account.\n */\n static mnemonicToAccountSigner(key, opts) {\n const signer = mnemonicToAccount(key, opts);\n return new _LocalAccountSigner(signer);\n }\n /**\n * Creates a `LocalAccountSigner` instance using the provided private key.\n *\n * @example\n * ```ts\n * import { LocalAccountSigner } from \"@aa-sdk/core\";\n * import { generatePrivateKey } from \"viem\";\n *\n * const signer = LocalAccountSigner.privateKeyToAccountSigner(generatePrivateKey());\n * ```\n *\n * @param {Hex} key The private key in hexadecimal format\n * @returns {LocalAccountSigner} An instance of `LocalAccountSigner` initialized with the provided private key\n */\n static privateKeyToAccountSigner(key) {\n const signer = privateKeyToAccount(key);\n return new _LocalAccountSigner(signer);\n }\n /**\n * Generates a new private key and creates a `LocalAccountSigner` for a `PrivateKeyAccount`.\n *\n * @example\n * ```ts\n * import { LocalAccountSigner } from \"@aa-sdk/core\";\n *\n * const signer = LocalAccountSigner.generatePrivateKeySigner();\n * ```\n *\n * @returns {LocalAccountSigner} A `LocalAccountSigner` instance initialized with the generated private key account\n */\n static generatePrivateKeySigner() {\n const signer = privateKeyToAccount(generatePrivateKey());\n return new _LocalAccountSigner(signer);\n }\n };\n }\n });\n\n // ../../../node_modules/.pnpm/@aa-sdk+core@4.62.0_typescript@5.8.3_viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64_/node_modules/@aa-sdk/core/dist/esm/transport/split.js\n var split2;\n var init_split = __esm({\n \"../../../node_modules/.pnpm/@aa-sdk+core@4.62.0_typescript@5.8.3_viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64_/node_modules/@aa-sdk/core/dist/esm/transport/split.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_esm();\n split2 = (params) => {\n const overrideMap = params.overrides.reduce((accum, curr) => {\n curr.methods.forEach((method) => {\n if (accum.has(method) && accum.get(method) !== curr.transport) {\n throw new Error(\"A method cannot be handled by more than one transport\");\n }\n accum.set(method, curr.transport);\n });\n return accum;\n }, /* @__PURE__ */ new Map());\n return (opts) => custom({\n request: async (args) => {\n const transportOverride = overrideMap.get(args.method);\n if (transportOverride != null) {\n return transportOverride(opts).request(args);\n }\n return params.fallback(opts).request(args);\n }\n })(opts);\n };\n }\n });\n\n // ../../../node_modules/.pnpm/@aa-sdk+core@4.62.0_typescript@5.8.3_viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64_/node_modules/@aa-sdk/core/dist/esm/utils/traceHeader.js\n function generateRandomHexString(numBytes) {\n const hexPairs = new Array(numBytes).fill(0).map(() => Math.floor(Math.random() * 16).toString(16).padStart(2, \"0\"));\n return hexPairs.join(\"\");\n }\n var TRACE_HEADER_NAME, TRACE_HEADER_STATE, clientTraceId, TraceHeader;\n var init_traceHeader = __esm({\n \"../../../node_modules/.pnpm/@aa-sdk+core@4.62.0_typescript@5.8.3_viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64_/node_modules/@aa-sdk/core/dist/esm/utils/traceHeader.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n TRACE_HEADER_NAME = \"traceparent\";\n TRACE_HEADER_STATE = \"tracestate\";\n clientTraceId = generateRandomHexString(16);\n TraceHeader = class _TraceHeader {\n /**\n * Initializes a new instance with the provided trace identifiers and state information.\n *\n * @param {string} traceId The unique identifier for the trace\n * @param {string} parentId The identifier of the parent trace\n * @param {string} traceFlags Flags containing trace-related options\n * @param {TraceHeader[\"traceState\"]} traceState The trace state information for additional trace context\n */\n constructor(traceId, parentId, traceFlags, traceState) {\n Object.defineProperty(this, \"traceId\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: void 0\n });\n Object.defineProperty(this, \"parentId\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: void 0\n });\n Object.defineProperty(this, \"traceFlags\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: void 0\n });\n Object.defineProperty(this, \"traceState\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: void 0\n });\n this.traceId = traceId;\n this.parentId = parentId;\n this.traceFlags = traceFlags;\n this.traceState = traceState;\n }\n /**\n * Creating a default trace id that is a random setup for both trace id and parent id\n *\n * @example ```ts\n * const traceHeader = TraceHeader.fromTraceHeader(headers) || TraceHeader.default();\n * ```\n *\n * @returns {TraceHeader} A default trace header\n */\n static default() {\n return new _TraceHeader(\n clientTraceId,\n generateRandomHexString(8),\n \"00\",\n //Means no flag have been set, and no sampled state https://www.w3.org/TR/trace-context/#trace-flags\n {}\n );\n }\n /**\n * Should be able to consume a trace header from the headers of an http request\n *\n * @example ```ts\n * const traceHeader = TraceHeader.fromTraceHeader(headers);\n * ```\n *\n * @param {Record} headers The headers from the http request\n * @returns {TraceHeader | undefined} The trace header object, or nothing if not found\n */\n static fromTraceHeader(headers) {\n if (!headers[TRACE_HEADER_NAME]) {\n return void 0;\n }\n const [version6, traceId, parentId, traceFlags] = headers[TRACE_HEADER_NAME]?.split(\"-\");\n const traceState = headers[TRACE_HEADER_STATE]?.split(\",\").reduce((acc, curr) => {\n const [key, value] = curr.split(\"=\");\n acc[key] = value;\n return acc;\n }, {}) || {};\n if (version6 !== \"00\") {\n console.debug(new Error(`Invalid version for traceheader: ${headers[TRACE_HEADER_NAME]}`));\n return void 0;\n }\n return new _TraceHeader(traceId, parentId, traceFlags, traceState);\n }\n /**\n * Should be able to convert the trace header to the format that is used in the headers of an http request\n *\n * @example ```ts\n * const traceHeader = TraceHeader.fromTraceHeader(headers) || TraceHeader.default();\n * const headers = traceHeader.toTraceHeader();\n * ```\n *\n * @returns {{traceparent: string, tracestate: string}} The trace header in the format of a record, used in our http client\n */\n toTraceHeader() {\n return {\n [TRACE_HEADER_NAME]: `00-${this.traceId}-${this.parentId}-${this.traceFlags}`,\n [TRACE_HEADER_STATE]: Object.entries(this.traceState).map(([key, value]) => `${key}=${value}`).join(\",\")\n };\n }\n /**\n * Should be able to create a new trace header with a new event in the trace state,\n * as the key of the eventName as breadcrumbs appending onto previous breadcrumbs with the - infix if exists. And the\n * trace parent gets updated as according to the docs\n *\n * @example ```ts\n * const traceHeader = TraceHeader.fromTraceHeader(headers) || TraceHeader.default();\n * const newTraceHeader = traceHeader.withEvent(\"newEvent\");\n * ```\n *\n * @param {string} eventName The key of the new event\n * @returns {TraceHeader} The new trace header\n */\n withEvent(eventName) {\n const breadcrumbs = this.traceState.breadcrumbs ? `${this.traceState.breadcrumbs}-${eventName}` : eventName;\n return new _TraceHeader(this.traceId, this.parentId, this.traceFlags, {\n ...this.traceState,\n breadcrumbs\n });\n }\n };\n }\n });\n\n // ../../../node_modules/.pnpm/@aa-sdk+core@4.62.0_typescript@5.8.3_viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64_/node_modules/@aa-sdk/core/dist/esm/index.js\n var init_esm6 = __esm({\n \"../../../node_modules/.pnpm/@aa-sdk+core@4.62.0_typescript@5.8.3_viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64_/node_modules/@aa-sdk/core/dist/esm/index.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_smartContractAccount();\n init_sendTransaction2();\n init_sendTransactions();\n init_sendUserOperation2();\n init_bundlerClient2();\n init_smartAccountClient();\n init_isSmartAccountClient();\n init_schema2();\n init_smartAccountClient2();\n init_entrypoint2();\n init_account2();\n init_base2();\n init_client();\n init_useroperation();\n init_addBreadcrumb();\n init_signer();\n init_gasEstimator2();\n init_webauthnGasEstimator();\n init_gasEstimator();\n init_erc7677middleware();\n init_noopMiddleware();\n init_local_account();\n init_split();\n init_traceHeader();\n init_utils10();\n }\n });\n\n // ../../../node_modules/.pnpm/@account-kit+infra@4.62.0_bufferutil@4.0.9_debug@4.4.1_typescript@5.8.3_utf-8-validate@_91850b8a2849fb827e3616547e4ccff7/node_modules/@account-kit/infra/dist/esm/client/isAlchemySmartAccountClient.js\n function isAlchemySmartAccountClient(client) {\n return client.transport.type === \"alchemy\";\n }\n var init_isAlchemySmartAccountClient = __esm({\n \"../../../node_modules/.pnpm/@account-kit+infra@4.62.0_bufferutil@4.0.9_debug@4.4.1_typescript@5.8.3_utf-8-validate@_91850b8a2849fb827e3616547e4ccff7/node_modules/@account-kit/infra/dist/esm/client/isAlchemySmartAccountClient.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n }\n });\n\n // ../../../node_modules/.pnpm/@account-kit+infra@4.62.0_bufferutil@4.0.9_debug@4.4.1_typescript@5.8.3_utf-8-validate@_91850b8a2849fb827e3616547e4ccff7/node_modules/@account-kit/infra/dist/esm/actions/simulateUserOperationChanges.js\n var simulateUserOperationChanges;\n var init_simulateUserOperationChanges = __esm({\n \"../../../node_modules/.pnpm/@account-kit+infra@4.62.0_bufferutil@4.0.9_debug@4.4.1_typescript@5.8.3_utf-8-validate@_91850b8a2849fb827e3616547e4ccff7/node_modules/@account-kit/infra/dist/esm/actions/simulateUserOperationChanges.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_esm6();\n init_isAlchemySmartAccountClient();\n simulateUserOperationChanges = async (client, { account = client.account, overrides, ...params }) => {\n if (!account) {\n throw new AccountNotFoundError2();\n }\n if (!isAlchemySmartAccountClient(client)) {\n throw new IncompatibleClientError(\"AlchemySmartAccountClient\", \"SimulateUserOperationAssetChanges\", client);\n }\n const uoStruct = deepHexlify(await client.buildUserOperation({\n ...params,\n account,\n overrides\n }));\n return client.request({\n method: \"alchemy_simulateUserOperationAssetChanges\",\n params: [uoStruct, account.getEntryPoint().address]\n });\n };\n }\n });\n\n // ../../../node_modules/.pnpm/@account-kit+infra@4.62.0_bufferutil@4.0.9_debug@4.4.1_typescript@5.8.3_utf-8-validate@_91850b8a2849fb827e3616547e4ccff7/node_modules/@account-kit/infra/dist/esm/alchemyTrackerHeaders.js\n function mutateRemoveTrackingHeaders(x4) {\n if (!x4)\n return;\n if (Array.isArray(x4))\n return;\n if (typeof x4 !== \"object\")\n return;\n TRACKER_HEADER in x4 && delete x4[TRACKER_HEADER];\n TRACKER_BREADCRUMB in x4 && delete x4[TRACKER_BREADCRUMB];\n TRACE_HEADER_NAME in x4 && delete x4[TRACE_HEADER_NAME];\n TRACE_HEADER_STATE in x4 && delete x4[TRACE_HEADER_STATE];\n }\n function addCrumb(previous, crumb) {\n if (!previous)\n return crumb;\n return `${previous} > ${crumb}`;\n }\n function headersUpdate(crumb) {\n const headerUpdate_ = (x4) => {\n const traceHeader = (TraceHeader.fromTraceHeader(x4) || TraceHeader.default()).withEvent(crumb);\n return {\n [TRACKER_HEADER]: traceHeader.parentId,\n ...x4,\n [TRACKER_BREADCRUMB]: addCrumb(x4[TRACKER_BREADCRUMB], crumb),\n ...traceHeader.toTraceHeader()\n };\n };\n return headerUpdate_;\n }\n var TRACKER_HEADER, TRACKER_BREADCRUMB;\n var init_alchemyTrackerHeaders = __esm({\n \"../../../node_modules/.pnpm/@account-kit+infra@4.62.0_bufferutil@4.0.9_debug@4.4.1_typescript@5.8.3_utf-8-validate@_91850b8a2849fb827e3616547e4ccff7/node_modules/@account-kit/infra/dist/esm/alchemyTrackerHeaders.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_esm6();\n init_esm6();\n init_esm6();\n TRACKER_HEADER = \"X-Alchemy-Client-Trace-Id\";\n TRACKER_BREADCRUMB = \"X-Alchemy-Client-Breadcrumb\";\n }\n });\n\n // ../../../node_modules/.pnpm/@account-kit+infra@4.62.0_bufferutil@4.0.9_debug@4.4.1_typescript@5.8.3_utf-8-validate@_91850b8a2849fb827e3616547e4ccff7/node_modules/@account-kit/infra/dist/esm/schema.js\n var AlchemyChainSchema;\n var init_schema3 = __esm({\n \"../../../node_modules/.pnpm/@account-kit+infra@4.62.0_bufferutil@4.0.9_debug@4.4.1_typescript@5.8.3_utf-8-validate@_91850b8a2849fb827e3616547e4ccff7/node_modules/@account-kit/infra/dist/esm/schema.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_esm6();\n init_esm5();\n AlchemyChainSchema = esm_default.custom((chain2) => {\n const chain_ = ChainSchema.parse(chain2);\n return chain_.rpcUrls.alchemy != null;\n }, \"chain must include an alchemy rpc url. See `defineAlchemyChain` or import a chain from `@account-kit/infra`.\");\n }\n });\n\n // ../../../node_modules/.pnpm/@account-kit+infra@4.62.0_bufferutil@4.0.9_debug@4.4.1_typescript@5.8.3_utf-8-validate@_91850b8a2849fb827e3616547e4ccff7/node_modules/@account-kit/infra/dist/esm/version.js\n var VERSION2;\n var init_version6 = __esm({\n \"../../../node_modules/.pnpm/@account-kit+infra@4.62.0_bufferutil@4.0.9_debug@4.4.1_typescript@5.8.3_utf-8-validate@_91850b8a2849fb827e3616547e4ccff7/node_modules/@account-kit/infra/dist/esm/version.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n VERSION2 = \"4.62.0\";\n }\n });\n\n // ../../../node_modules/.pnpm/@account-kit+infra@4.62.0_bufferutil@4.0.9_debug@4.4.1_typescript@5.8.3_utf-8-validate@_91850b8a2849fb827e3616547e4ccff7/node_modules/@account-kit/infra/dist/esm/alchemyTransport.js\n function isAlchemyTransport(transport, chain2) {\n return transport({ chain: chain2 }).config.type === \"alchemy\";\n }\n function alchemy(config2) {\n const { retryDelay, retryCount = 0 } = config2;\n const fetchOptions = { ...config2.fetchOptions };\n const connectionConfig = ConnectionConfigSchema.parse(config2.alchemyConnection ?? config2);\n const headersAsObject = convertHeadersToObject(fetchOptions.headers);\n fetchOptions.headers = {\n ...headersAsObject,\n \"Alchemy-AA-Sdk-Version\": VERSION2\n };\n if (connectionConfig.jwt != null || connectionConfig.apiKey != null) {\n fetchOptions.headers = {\n ...fetchOptions.headers,\n Authorization: `Bearer ${connectionConfig.jwt ?? connectionConfig.apiKey}`\n };\n }\n const transport = (opts) => {\n const { chain: chain_ } = opts;\n if (!chain_) {\n throw new ChainNotFoundError2();\n }\n const chain2 = AlchemyChainSchema.parse(chain_);\n const rpcUrl = connectionConfig.rpcUrl == null ? chain2.rpcUrls.alchemy.http[0] : connectionConfig.rpcUrl;\n const chainAgnosticRpcUrl = connectionConfig.rpcUrl == null ? \"https://api.g.alchemy.com/v2\" : connectionConfig.chainAgnosticUrl ?? connectionConfig.rpcUrl;\n const innerTransport = (() => {\n mutateRemoveTrackingHeaders(config2?.fetchOptions?.headers);\n if (config2.alchemyConnection && config2.nodeRpcUrl) {\n return split2({\n overrides: [\n {\n methods: alchemyMethods,\n transport: http(rpcUrl, { fetchOptions, retryCount })\n },\n {\n methods: chainAgnosticMethods,\n transport: http(chainAgnosticRpcUrl, {\n fetchOptions,\n retryCount,\n retryDelay\n })\n }\n ],\n fallback: http(config2.nodeRpcUrl, {\n fetchOptions: config2.fetchOptions,\n retryCount,\n retryDelay\n })\n });\n }\n return split2({\n overrides: [\n {\n methods: chainAgnosticMethods,\n transport: http(chainAgnosticRpcUrl, {\n fetchOptions,\n retryCount,\n retryDelay\n })\n }\n ],\n fallback: http(rpcUrl, { fetchOptions, retryCount, retryDelay })\n });\n })();\n return createTransport({\n key: \"alchemy\",\n name: \"Alchemy Transport\",\n request: innerTransport({\n ...opts,\n // Retries are already handled above within the split transport,\n // so `retryCount` must be 0 here for the expected behavior.\n retryCount: 0\n }).request,\n // Retries are already handled above within the split transport,\n // so `retryCount` must be 0 here too for the expected behavior.\n retryCount: 0,\n retryDelay,\n type: \"alchemy\"\n }, { alchemyRpcUrl: rpcUrl, fetchOptions });\n };\n return Object.assign(transport, {\n dynamicFetchOptions: fetchOptions,\n updateHeaders(newHeaders_) {\n const newHeaders = convertHeadersToObject(newHeaders_);\n fetchOptions.headers = {\n ...fetchOptions.headers,\n ...newHeaders\n };\n },\n config: config2\n });\n }\n var alchemyMethods, chainAgnosticMethods, convertHeadersToObject;\n var init_alchemyTransport = __esm({\n \"../../../node_modules/.pnpm/@account-kit+infra@4.62.0_bufferutil@4.0.9_debug@4.4.1_typescript@5.8.3_utf-8-validate@_91850b8a2849fb827e3616547e4ccff7/node_modules/@account-kit/infra/dist/esm/alchemyTransport.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_esm6();\n init_esm();\n init_alchemyTrackerHeaders();\n init_schema3();\n init_version6();\n alchemyMethods = [\n \"eth_sendUserOperation\",\n \"eth_estimateUserOperationGas\",\n \"eth_getUserOperationReceipt\",\n \"eth_getUserOperationByHash\",\n \"eth_supportedEntryPoints\",\n \"rundler_maxPriorityFeePerGas\",\n \"pm_getPaymasterData\",\n \"pm_getPaymasterStubData\",\n \"alchemy_requestGasAndPaymasterAndData\"\n ];\n chainAgnosticMethods = [\n \"wallet_prepareCalls\",\n \"wallet_sendPreparedCalls\",\n \"wallet_requestAccount\",\n \"wallet_createAccount\",\n \"wallet_listAccounts\",\n \"wallet_createSession\",\n \"wallet_getCallsStatus\"\n ];\n convertHeadersToObject = (headers) => {\n if (!headers) {\n return {};\n }\n if (headers instanceof Headers) {\n const headersObject = {};\n headers.forEach((value, key) => {\n headersObject[key] = value;\n });\n return headersObject;\n }\n if (Array.isArray(headers)) {\n return headers.reduce((acc, header) => {\n acc[header[0]] = header[1];\n return acc;\n }, {});\n }\n return headers;\n };\n }\n });\n\n // ../../../node_modules/.pnpm/@account-kit+infra@4.62.0_bufferutil@4.0.9_debug@4.4.1_typescript@5.8.3_utf-8-validate@_91850b8a2849fb827e3616547e4ccff7/node_modules/@account-kit/infra/dist/esm/chains.js\n var defineAlchemyChain, arbitrum2, arbitrumGoerli2, arbitrumSepolia2, goerli2, mainnet2, optimism2, optimismGoerli2, optimismSepolia2, sepolia2, base2, baseGoerli2, baseSepolia2, polygonMumbai2, polygonAmoy2, polygon2, fraxtal2, fraxtalSepolia, zora2, zoraSepolia2, worldChainSepolia, worldChain, shapeSepolia, shape, unichainMainnet, unichainSepolia, soneiumMinato, soneiumMainnet, opbnbTestnet, opbnbMainnet, beraChainBartio, inkMainnet, inkSepolia, arbitrumNova2, monadTestnet, mekong, openlootSepolia, gensynTestnet, riseTestnet, storyMainnet, storyAeneid, celoAlfajores, celoMainnet, teaSepolia, bobaSepolia, bobaMainnet;\n var init_chains2 = __esm({\n \"../../../node_modules/.pnpm/@account-kit+infra@4.62.0_bufferutil@4.0.9_debug@4.4.1_typescript@5.8.3_utf-8-validate@_91850b8a2849fb827e3616547e4ccff7/node_modules/@account-kit/infra/dist/esm/chains.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_esm();\n init_chains();\n defineAlchemyChain = ({ chain: chain2, rpcBaseUrl }) => {\n return {\n ...chain2,\n rpcUrls: {\n ...chain2.rpcUrls,\n alchemy: {\n http: [rpcBaseUrl]\n }\n }\n };\n };\n arbitrum2 = {\n ...arbitrum,\n rpcUrls: {\n ...arbitrum.rpcUrls,\n alchemy: {\n http: [\"https://arb-mainnet.g.alchemy.com/v2\"]\n }\n }\n };\n arbitrumGoerli2 = {\n ...arbitrumGoerli,\n rpcUrls: {\n ...arbitrumGoerli.rpcUrls,\n alchemy: {\n http: [\"https://arb-goerli.g.alchemy.com/v2\"]\n }\n }\n };\n arbitrumSepolia2 = {\n ...arbitrumSepolia,\n rpcUrls: {\n ...arbitrumSepolia.rpcUrls,\n alchemy: {\n http: [\"https://arb-sepolia.g.alchemy.com/v2\"]\n }\n }\n };\n goerli2 = {\n ...goerli,\n rpcUrls: {\n ...goerli.rpcUrls,\n alchemy: {\n http: [\"https://eth-goerli.g.alchemy.com/v2\"]\n }\n }\n };\n mainnet2 = {\n ...mainnet,\n rpcUrls: {\n ...mainnet.rpcUrls,\n alchemy: {\n http: [\"https://eth-mainnet.g.alchemy.com/v2\"]\n }\n }\n };\n optimism2 = {\n ...optimism,\n rpcUrls: {\n ...optimism.rpcUrls,\n alchemy: {\n http: [\"https://opt-mainnet.g.alchemy.com/v2\"]\n }\n }\n };\n optimismGoerli2 = {\n ...optimismGoerli,\n rpcUrls: {\n ...optimismGoerli.rpcUrls,\n alchemy: {\n http: [\"https://opt-goerli.g.alchemy.com/v2\"]\n }\n }\n };\n optimismSepolia2 = {\n ...optimismSepolia,\n rpcUrls: {\n ...optimismSepolia.rpcUrls,\n alchemy: {\n http: [\"https://opt-sepolia.g.alchemy.com/v2\"]\n }\n }\n };\n sepolia2 = {\n ...sepolia,\n rpcUrls: {\n ...sepolia.rpcUrls,\n alchemy: {\n http: [\"https://eth-sepolia.g.alchemy.com/v2\"]\n }\n }\n };\n base2 = {\n ...base,\n rpcUrls: {\n ...base.rpcUrls,\n alchemy: {\n http: [\"https://base-mainnet.g.alchemy.com/v2\"]\n }\n }\n };\n baseGoerli2 = {\n ...baseGoerli,\n rpcUrls: {\n ...baseGoerli.rpcUrls,\n alchemy: {\n http: [\"https://base-goerli.g.alchemy.com/v2\"]\n }\n }\n };\n baseSepolia2 = {\n ...baseSepolia,\n rpcUrls: {\n ...baseSepolia.rpcUrls,\n alchemy: {\n http: [\"https://base-sepolia.g.alchemy.com/v2\"]\n }\n }\n };\n polygonMumbai2 = {\n ...polygonMumbai,\n rpcUrls: {\n ...polygonMumbai.rpcUrls,\n alchemy: {\n http: [\"https://polygon-mumbai.g.alchemy.com/v2\"]\n }\n }\n };\n polygonAmoy2 = {\n ...polygonAmoy,\n rpcUrls: {\n ...polygonAmoy.rpcUrls,\n alchemy: {\n http: [\"https://polygon-amoy.g.alchemy.com/v2\"]\n }\n }\n };\n polygon2 = {\n ...polygon,\n rpcUrls: {\n ...polygon.rpcUrls,\n alchemy: {\n http: [\"https://polygon-mainnet.g.alchemy.com/v2\"]\n }\n }\n };\n fraxtal2 = {\n ...fraxtal,\n rpcUrls: {\n ...fraxtal.rpcUrls\n }\n };\n fraxtalSepolia = defineChain({\n id: 2523,\n name: \"Fraxtal Sepolia\",\n nativeCurrency: { name: \"Frax Ether\", symbol: \"frxETH\", decimals: 18 },\n rpcUrls: {\n default: {\n http: [\"https://rpc.testnet-sepolia.frax.com\"]\n }\n }\n });\n zora2 = {\n ...zora,\n rpcUrls: {\n ...zora.rpcUrls\n }\n };\n zoraSepolia2 = {\n ...zoraSepolia,\n rpcUrls: {\n ...zoraSepolia.rpcUrls\n }\n };\n worldChainSepolia = defineChain({\n id: 4801,\n name: \"World Chain Sepolia\",\n network: \"World Chain Sepolia\",\n nativeCurrency: { name: \"Ether\", symbol: \"ETH\", decimals: 18 },\n rpcUrls: {\n default: {\n http: [\"https://worldchain-sepolia.g.alchemy.com/v2\"]\n },\n public: {\n http: [\"https://worldchain-sepolia.g.alchemy.com/v2\"]\n },\n alchemy: {\n http: [\"https://worldchain-sepolia.g.alchemy.com/v2\"]\n }\n }\n });\n worldChain = defineChain({\n id: 480,\n name: \"World Chain\",\n network: \"World Chain\",\n nativeCurrency: { name: \"Ether\", symbol: \"ETH\", decimals: 18 },\n rpcUrls: {\n default: {\n http: [\"https://worldchain-mainnet.g.alchemy.com/v2\"]\n },\n public: {\n http: [\"https://worldchain-mainnet.g.alchemy.com/v2\"]\n },\n alchemy: {\n http: [\"https://worldchain-mainnet.g.alchemy.com/v2\"]\n }\n }\n });\n shapeSepolia = defineChain({\n id: 11011,\n name: \"Shape Sepolia\",\n network: \"Shape Sepolia\",\n nativeCurrency: { name: \"Ether\", symbol: \"ETH\", decimals: 18 },\n rpcUrls: {\n default: {\n http: [\"https://shape-sepolia.g.alchemy.com/v2\"]\n },\n public: {\n http: [\"https://shape-sepolia.g.alchemy.com/v2\"]\n },\n alchemy: {\n http: [\"https://shape-sepolia.g.alchemy.com/v2\"]\n }\n }\n });\n shape = defineChain({\n id: 360,\n name: \"Shape\",\n network: \"Shape\",\n nativeCurrency: { name: \"Ether\", symbol: \"ETH\", decimals: 18 },\n rpcUrls: {\n default: {\n http: [\"https://shape-mainnet.g.alchemy.com/v2\"]\n },\n public: {\n http: [\"https://shape-mainnet.g.alchemy.com/v2\"]\n },\n alchemy: {\n http: [\"https://shape-mainnet.g.alchemy.com/v2\"]\n }\n }\n });\n unichainMainnet = defineChain({\n id: 130,\n name: \"Unichain Mainnet\",\n network: \"Unichain Mainnet\",\n nativeCurrency: { name: \"Ether\", symbol: \"ETH\", decimals: 18 },\n rpcUrls: {\n default: {\n http: [\"https://unichain-mainnet.g.alchemy.com/v2\"]\n },\n public: {\n http: [\"https://unichain-mainnet.g.alchemy.com/v2\"]\n },\n alchemy: {\n http: [\"https://unichain-mainnet.g.alchemy.com/v2\"]\n }\n }\n });\n unichainSepolia = defineChain({\n id: 1301,\n name: \"Unichain Sepolia\",\n network: \"Unichain Sepolia\",\n nativeCurrency: { name: \"Ether\", symbol: \"ETH\", decimals: 18 },\n rpcUrls: {\n default: {\n http: [\"https://unichain-sepolia.g.alchemy.com/v2\"]\n },\n public: {\n http: [\"https://unichain-sepolia.g.alchemy.com/v2\"]\n },\n alchemy: {\n http: [\"https://unichain-sepolia.g.alchemy.com/v2\"]\n }\n }\n });\n soneiumMinato = defineChain({\n id: 1946,\n name: \"Soneium Minato\",\n network: \"Soneium Minato\",\n nativeCurrency: { name: \"Ether\", symbol: \"ETH\", decimals: 18 },\n rpcUrls: {\n default: {\n http: [\"https://soneium-minato.g.alchemy.com/v2\"]\n },\n public: {\n http: [\"https://soneium-minato.g.alchemy.com/v2\"]\n },\n alchemy: {\n http: [\"https://soneium-minato.g.alchemy.com/v2\"]\n }\n }\n });\n soneiumMainnet = defineChain({\n id: 1868,\n name: \"Soneium Mainnet\",\n network: \"Soneium Mainnet\",\n nativeCurrency: { name: \"Ether\", symbol: \"ETH\", decimals: 18 },\n rpcUrls: {\n default: {\n http: [\"https://soneium-mainnet.g.alchemy.com/v2\"]\n },\n public: {\n http: [\"https://soneium-mainnet.g.alchemy.com/v2\"]\n },\n alchemy: {\n http: [\"https://soneium-mainnet.g.alchemy.com/v2\"]\n }\n }\n });\n opbnbTestnet = defineChain({\n id: 5611,\n name: \"OPBNB Testnet\",\n network: \"OPBNB Testnet\",\n nativeCurrency: { name: \"BNB\", symbol: \"BNB\", decimals: 18 },\n rpcUrls: {\n default: {\n http: [\"https://opbnb-testnet.g.alchemy.com/v2\"]\n },\n public: {\n http: [\"https://opbnb-testnet.g.alchemy.com/v2\"]\n },\n alchemy: {\n http: [\"https://opbnb-testnet.g.alchemy.com/v2\"]\n }\n }\n });\n opbnbMainnet = defineChain({\n id: 204,\n name: \"OPBNB Mainnet\",\n network: \"OPBNB Mainnet\",\n nativeCurrency: { name: \"BNB\", symbol: \"BNB\", decimals: 18 },\n rpcUrls: {\n default: {\n http: [\"https://opbnb-mainnet.g.alchemy.com/v2\"]\n },\n public: {\n http: [\"https://opbnb-mainnet.g.alchemy.com/v2\"]\n },\n alchemy: {\n http: [\"https://opbnb-mainnet.g.alchemy.com/v2\"]\n }\n }\n });\n beraChainBartio = defineChain({\n id: 80084,\n name: \"BeraChain Bartio\",\n network: \"BeraChain Bartio\",\n nativeCurrency: { name: \"Bera\", symbol: \"BERA\", decimals: 18 },\n rpcUrls: {\n default: {\n http: [\"https://berachain-bartio.g.alchemy.com/v2\"]\n },\n public: {\n http: [\"https://berachain-bartio.g.alchemy.com/v2\"]\n },\n alchemy: {\n http: [\"https://berachain-bartio.g.alchemy.com/v2\"]\n }\n }\n });\n inkMainnet = defineChain({\n id: 57073,\n name: \"Ink Mainnet\",\n network: \"Ink Mainnet\",\n nativeCurrency: { name: \"Ether\", symbol: \"ETH\", decimals: 18 },\n rpcUrls: {\n default: {\n http: [\"https://ink-mainnet.g.alchemy.com/v2\"]\n },\n public: {\n http: [\"https://ink-mainnet.g.alchemy.com/v2\"]\n },\n alchemy: {\n http: [\"https://ink-mainnet.g.alchemy.com/v2\"]\n }\n }\n });\n inkSepolia = defineChain({\n id: 763373,\n name: \"Ink Sepolia\",\n network: \"Ink Sepolia\",\n nativeCurrency: { name: \"Ether\", symbol: \"ETH\", decimals: 18 },\n rpcUrls: {\n default: {\n http: [\"https://ink-sepolia.g.alchemy.com/v2\"]\n },\n public: {\n http: [\"https://ink-sepolia.g.alchemy.com/v2\"]\n },\n alchemy: {\n http: [\"https://ink-sepolia.g.alchemy.com/v2\"]\n }\n }\n });\n arbitrumNova2 = {\n ...arbitrumNova,\n rpcUrls: {\n ...arbitrumNova.rpcUrls\n }\n };\n monadTestnet = defineChain({\n id: 10143,\n name: \"Monad Testnet\",\n nativeCurrency: { name: \"Monad\", symbol: \"MON\", decimals: 18 },\n rpcUrls: {\n default: {\n http: [\"https://monad-testnet.g.alchemy.com/v2\"]\n },\n public: {\n http: [\"https://monad-testnet.g.alchemy.com/v2\"]\n },\n alchemy: {\n http: [\"https://monad-testnet.g.alchemy.com/v2\"]\n }\n },\n blockExplorers: {\n default: {\n name: \"Block Explorer\",\n url: \"https://testnet.monadexplorer.com\"\n }\n },\n testnet: true\n });\n mekong = defineChain({\n id: 7078815900,\n name: \"Mekong Pectra Devnet\",\n nativeCurrency: { name: \"eth\", symbol: \"eth\", decimals: 18 },\n rpcUrls: {\n default: {\n http: [\"https://rpc.mekong.ethpandaops.io\"]\n }\n },\n blockExplorers: {\n default: {\n name: \"Block Explorer\",\n url: \"https://explorer.mekong.ethpandaops.io\"\n }\n },\n testnet: true\n });\n openlootSepolia = defineChain({\n id: 905905,\n name: \"Openloot Sepolia\",\n nativeCurrency: { name: \"Openloot\", symbol: \"OL\", decimals: 18 },\n rpcUrls: {\n default: {\n http: [\"https://openloot-sepolia.g.alchemy.com/v2\"]\n },\n public: {\n http: [\"https://openloot-sepolia.g.alchemy.com/v2\"]\n },\n alchemy: {\n http: [\"https://openloot-sepolia.g.alchemy.com/v2\"]\n }\n },\n blockExplorers: {\n default: {\n name: \"Block Explorer\",\n url: \"https://openloot-sepolia.explorer.alchemy.com\"\n }\n },\n testnet: true\n });\n gensynTestnet = defineChain({\n id: 685685,\n name: \"Gensyn Testnet\",\n nativeCurrency: { name: \"eth\", symbol: \"eth\", decimals: 18 },\n rpcUrls: {\n default: {\n http: [\"https://gensyn-testnet.g.alchemy.com/v2\"]\n },\n public: {\n http: [\"https://gensyn-testnet.g.alchemy.com/v2\"]\n },\n alchemy: {\n http: [\"https://gensyn-testnet.g.alchemy.com/v2\"]\n }\n },\n blockExplorers: {\n default: {\n name: \"Block Explorer\",\n url: \"https://gensyn-testnet.explorer.alchemy.com\"\n }\n },\n testnet: true\n });\n riseTestnet = defineChain({\n id: 11155931,\n name: \"Rise Testnet\",\n nativeCurrency: { name: \"eth\", symbol: \"eth\", decimals: 18 },\n rpcUrls: {\n default: {\n http: [\"https://rise-testnet.g.alchemy.com/v2\"]\n },\n public: {\n http: [\"https://rise-testnet.g.alchemy.com/v2\"]\n },\n alchemy: {\n http: [\"https://rise-testnet.g.alchemy.com/v2\"]\n }\n },\n blockExplorers: {\n default: {\n name: \"Block Explorer\",\n url: \"https://explorer.testnet.riselabs.xyz\"\n }\n },\n testnet: true\n });\n storyMainnet = defineChain({\n id: 1514,\n name: \"Story Mainnet\",\n nativeCurrency: { name: \"IP\", symbol: \"IP\", decimals: 18 },\n rpcUrls: {\n default: {\n http: [\"https://story-mainnet.g.alchemy.com/v2\"]\n },\n public: {\n http: [\"https://story-mainnet.g.alchemy.com/v2\"]\n },\n alchemy: {\n http: [\"https://story-mainnet.g.alchemy.com/v2\"]\n }\n },\n blockExplorers: {\n default: {\n name: \"Block Explorer\",\n url: \"https://www.storyscan.io\"\n }\n },\n testnet: false\n });\n storyAeneid = defineChain({\n id: 1315,\n name: \"Story Aeneid\",\n nativeCurrency: { name: \"IP\", symbol: \"IP\", decimals: 18 },\n rpcUrls: {\n default: {\n http: [\"https://story-aeneid.g.alchemy.com/v2\"]\n },\n public: {\n http: [\"https://story-aeneid.g.alchemy.com/v2\"]\n },\n alchemy: {\n http: [\"https://story-aeneid.g.alchemy.com/v2\"]\n }\n },\n blockExplorers: {\n default: {\n name: \"Block Explorer\",\n url: \"https://aeneid.storyscan.io\"\n }\n },\n testnet: true\n });\n celoAlfajores = defineChain({\n id: 44787,\n name: \"Celo Alfajores\",\n nativeCurrency: { name: \"Celo native asset\", symbol: \"CELO\", decimals: 18 },\n rpcUrls: {\n default: {\n http: [\"https://celo-alfajores.g.alchemy.com/v2\"]\n },\n public: {\n http: [\"https://celo-alfajores.g.alchemy.com/v2\"]\n },\n alchemy: {\n http: [\"https://celo-alfajores.g.alchemy.com/v2\"]\n }\n },\n blockExplorers: {\n default: {\n name: \"Block Explorer\",\n url: \"https://celo-alfajores.blockscout.com/\"\n }\n },\n testnet: true\n });\n celoMainnet = defineChain({\n id: 42220,\n name: \"Celo Mainnet\",\n nativeCurrency: { name: \"Celo native asset\", symbol: \"CELO\", decimals: 18 },\n rpcUrls: {\n default: {\n http: [\"https://celo-mainnet.g.alchemy.com/v2\"]\n },\n public: {\n http: [\"https://celo-mainnet.g.alchemy.com/v2\"]\n },\n alchemy: {\n http: [\"https://celo-mainnet.g.alchemy.com/v2\"]\n }\n },\n blockExplorers: {\n default: {\n name: \"Block Explorer\",\n url: \"https://celo.blockscout.com/\"\n }\n },\n testnet: false\n });\n teaSepolia = defineChain({\n id: 10218,\n name: \"Tea Sepolia\",\n nativeCurrency: { name: \"TEA\", symbol: \"TEA\", decimals: 18 },\n rpcUrls: {\n default: {\n http: [\"https://tea-sepolia.g.alchemy.com/v2\"]\n },\n public: {\n http: [\"https://tea-sepolia.g.alchemy.com/v2\"]\n },\n alchemy: {\n http: [\"https://tea-sepolia.g.alchemy.com/v2\"]\n }\n },\n blockExplorers: {\n default: {\n name: \"Block Explorer\",\n url: \"https://sepolia.tea.xyz/\"\n }\n },\n testnet: true\n });\n bobaSepolia = defineChain({\n id: 28882,\n name: \"Boba Sepolia\",\n nativeCurrency: { name: \"eth\", symbol: \"eth\", decimals: 18 },\n rpcUrls: {\n default: {\n http: [\"https://boba-sepolia.g.alchemy.com/v2\"]\n },\n public: {\n http: [\"https://boba-sepolia.g.alchemy.com/v2\"]\n },\n alchemy: {\n http: [\"https://boba-sepolia.g.alchemy.com/v2\"]\n }\n },\n blockExplorers: {\n default: {\n name: \"Block Explorer\",\n url: \"https://sepolia.testnet.bobascan.com/\"\n }\n },\n testnet: true\n });\n bobaMainnet = defineChain({\n id: 288,\n name: \"Boba Mainnet\",\n nativeCurrency: { name: \"eth\", symbol: \"eth\", decimals: 18 },\n rpcUrls: {\n default: {\n http: [\"https://boba-mainnet.g.alchemy.com/v2\"]\n },\n public: {\n http: [\"https://boba-mainnet.g.alchemy.com/v2\"]\n },\n alchemy: {\n http: [\"https://boba-mainnet.g.alchemy.com/v2\"]\n }\n },\n blockExplorers: {\n default: {\n name: \"Block Explorer\",\n url: \"https://bobascan.com/\"\n }\n },\n testnet: false\n });\n }\n });\n\n // ../../../node_modules/.pnpm/@account-kit+logging@4.62.0/node_modules/@account-kit/logging/dist/esm/noop.js\n var noopLogger;\n var init_noop = __esm({\n \"../../../node_modules/.pnpm/@account-kit+logging@4.62.0/node_modules/@account-kit/logging/dist/esm/noop.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n noopLogger = {\n trackEvent: async () => {\n },\n _internal: {\n ready: Promise.resolve(),\n anonId: \"\"\n }\n };\n }\n });\n\n // ../../../node_modules/.pnpm/@account-kit+logging@4.62.0/node_modules/@account-kit/logging/dist/esm/index.js\n function createLogger(_context) {\n const innerLogger = noopLogger;\n const logger = {\n ...innerLogger,\n profiled(name, func) {\n return function(...args) {\n const start = Date.now();\n const result = func.apply(this, args);\n if (result instanceof Promise) {\n return result.then((res) => {\n innerLogger.trackEvent({\n name: \"performance\",\n data: {\n executionTimeMs: Date.now() - start,\n functionName: name\n }\n });\n return res;\n });\n }\n innerLogger.trackEvent({\n name: \"performance\",\n data: {\n executionTimeMs: Date.now() - start,\n functionName: name\n }\n });\n return result;\n };\n }\n };\n return logger;\n }\n var init_esm7 = __esm({\n \"../../../node_modules/.pnpm/@account-kit+logging@4.62.0/node_modules/@account-kit/logging/dist/esm/index.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_noop();\n }\n });\n\n // ../../../node_modules/.pnpm/@account-kit+infra@4.62.0_bufferutil@4.0.9_debug@4.4.1_typescript@5.8.3_utf-8-validate@_91850b8a2849fb827e3616547e4ccff7/node_modules/@account-kit/infra/dist/esm/metrics.js\n var InfraLogger;\n var init_metrics = __esm({\n \"../../../node_modules/.pnpm/@account-kit+infra@4.62.0_bufferutil@4.0.9_debug@4.4.1_typescript@5.8.3_utf-8-validate@_91850b8a2849fb827e3616547e4ccff7/node_modules/@account-kit/infra/dist/esm/metrics.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_esm7();\n init_version6();\n InfraLogger = createLogger({\n package: \"@account-kit/infra\",\n version: VERSION2\n });\n }\n });\n\n // ../../../node_modules/.pnpm/@account-kit+infra@4.62.0_bufferutil@4.0.9_debug@4.4.1_typescript@5.8.3_utf-8-validate@_91850b8a2849fb827e3616547e4ccff7/node_modules/@account-kit/infra/dist/esm/client/decorators/smartAccount.js\n function logSendUoEvent(chainId, account) {\n const signerType = isSmartAccountWithSigner(account) ? account.getSigner().signerType : \"unknown\";\n InfraLogger.trackEvent({\n name: \"client_send_uo\",\n data: {\n chainId,\n signerType,\n entryPoint: account.getEntryPoint().address\n }\n });\n }\n var alchemyActions;\n var init_smartAccount = __esm({\n \"../../../node_modules/.pnpm/@account-kit+infra@4.62.0_bufferutil@4.0.9_debug@4.4.1_typescript@5.8.3_utf-8-validate@_91850b8a2849fb827e3616547e4ccff7/node_modules/@account-kit/infra/dist/esm/client/decorators/smartAccount.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_esm6();\n init_simulateUserOperationChanges();\n init_metrics();\n alchemyActions = (client_) => ({\n simulateUserOperation: async (args) => {\n const client = clientHeaderTrack(client_, \"simulateUserOperation\");\n return simulateUserOperationChanges(client, args);\n },\n async sendUserOperation(args) {\n const client = clientHeaderTrack(client_, \"infraSendUserOperation\");\n const { account = client.account } = args;\n const result = sendUserOperation(client, args);\n logSendUoEvent(client.chain.id, account);\n return result;\n },\n sendTransaction: async (args, overrides, context2) => {\n const client = clientHeaderTrack(client_, \"sendTransaction\");\n const { account = client.account } = args;\n const result = await sendTransaction2(client, args, overrides, context2);\n logSendUoEvent(client.chain.id, account);\n return result;\n },\n async sendTransactions(args) {\n const client = clientHeaderTrack(client_, \"sendTransactions\");\n const { account = client.account } = args;\n const result = sendTransactions(client, args);\n logSendUoEvent(client.chain.id, account);\n return result;\n }\n });\n }\n });\n\n // ../../../node_modules/.pnpm/@account-kit+infra@4.62.0_bufferutil@4.0.9_debug@4.4.1_typescript@5.8.3_utf-8-validate@_91850b8a2849fb827e3616547e4ccff7/node_modules/@account-kit/infra/dist/esm/client/rpcClient.js\n var createAlchemyPublicRpcClient;\n var init_rpcClient = __esm({\n \"../../../node_modules/.pnpm/@account-kit+infra@4.62.0_bufferutil@4.0.9_debug@4.4.1_typescript@5.8.3_utf-8-validate@_91850b8a2849fb827e3616547e4ccff7/node_modules/@account-kit/infra/dist/esm/client/rpcClient.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_esm6();\n createAlchemyPublicRpcClient = ({ transport, chain: chain2 }) => {\n return createBundlerClient({\n chain: chain2,\n transport\n });\n };\n }\n });\n\n // ../../../node_modules/.pnpm/@account-kit+infra@4.62.0_bufferutil@4.0.9_debug@4.4.1_typescript@5.8.3_utf-8-validate@_91850b8a2849fb827e3616547e4ccff7/node_modules/@account-kit/infra/dist/esm/defaults.js\n var getDefaultUserOperationFeeOptions2;\n var init_defaults2 = __esm({\n \"../../../node_modules/.pnpm/@account-kit+infra@4.62.0_bufferutil@4.0.9_debug@4.4.1_typescript@5.8.3_utf-8-validate@_91850b8a2849fb827e3616547e4ccff7/node_modules/@account-kit/infra/dist/esm/defaults.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_chains2();\n getDefaultUserOperationFeeOptions2 = (chain2) => {\n const feeOptions = {\n maxFeePerGas: { multiplier: 1.5 },\n maxPriorityFeePerGas: { multiplier: 1.05 }\n };\n if ((/* @__PURE__ */ new Set([\n arbitrum2.id,\n arbitrumGoerli2.id,\n arbitrumSepolia2.id,\n optimism2.id,\n optimismGoerli2.id,\n optimismSepolia2.id\n ])).has(chain2.id)) {\n feeOptions.preVerificationGas = { multiplier: 1.05 };\n }\n return feeOptions;\n };\n }\n });\n\n // ../../../node_modules/.pnpm/@account-kit+infra@4.62.0_bufferutil@4.0.9_debug@4.4.1_typescript@5.8.3_utf-8-validate@_91850b8a2849fb827e3616547e4ccff7/node_modules/@account-kit/infra/dist/esm/middleware/feeEstimator.js\n var alchemyFeeEstimator;\n var init_feeEstimator2 = __esm({\n \"../../../node_modules/.pnpm/@account-kit+infra@4.62.0_bufferutil@4.0.9_debug@4.4.1_typescript@5.8.3_utf-8-validate@_91850b8a2849fb827e3616547e4ccff7/node_modules/@account-kit/infra/dist/esm/middleware/feeEstimator.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_esm6();\n alchemyFeeEstimator = (transport) => async (struct, { overrides, feeOptions, client: client_ }) => {\n const client = clientHeaderTrack(client_, \"alchemyFeeEstimator\");\n const transport_ = transport({ chain: client.chain });\n let [block, maxPriorityFeePerGasEstimate] = await Promise.all([\n client.getBlock({ blockTag: \"latest\" }),\n // it is a fair assumption that if someone is using this Alchemy Middleware, then they are using Alchemy RPC\n transport_.request({\n method: \"rundler_maxPriorityFeePerGas\",\n params: []\n })\n ]);\n const baseFeePerGas = block.baseFeePerGas;\n if (baseFeePerGas == null) {\n throw new Error(\"baseFeePerGas is null\");\n }\n const maxPriorityFeePerGas = applyUserOpOverrideOrFeeOption(maxPriorityFeePerGasEstimate, overrides?.maxPriorityFeePerGas, feeOptions?.maxPriorityFeePerGas);\n const maxFeePerGas = applyUserOpOverrideOrFeeOption(bigIntMultiply(baseFeePerGas, 1.5) + BigInt(maxPriorityFeePerGas), overrides?.maxFeePerGas, feeOptions?.maxFeePerGas);\n return {\n ...struct,\n maxPriorityFeePerGas,\n maxFeePerGas\n };\n };\n }\n });\n\n // ../../../node_modules/.pnpm/@account-kit+infra@4.62.0_bufferutil@4.0.9_debug@4.4.1_typescript@5.8.3_utf-8-validate@_91850b8a2849fb827e3616547e4ccff7/node_modules/@account-kit/infra/dist/esm/gas-manager.js\n var AlchemyPaymasterAddressV06Unify, AlchemyPaymasterAddressV07Unify, AlchemyPaymasterAddressV4, AlchemyPaymasterAddressV3, AlchemyPaymasterAddressV2, ArbSepoliaPaymasterAddress, AlchemyPaymasterAddressV1, AlchemyPaymasterAddressV07V2, AlchemyPaymasterAddressV07V1, getAlchemyPaymasterAddress, PermitTypes, ERC20Abis, EIP7597Abis;\n var init_gas_manager = __esm({\n \"../../../node_modules/.pnpm/@account-kit+infra@4.62.0_bufferutil@4.0.9_debug@4.4.1_typescript@5.8.3_utf-8-validate@_91850b8a2849fb827e3616547e4ccff7/node_modules/@account-kit/infra/dist/esm/gas-manager.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_chains2();\n AlchemyPaymasterAddressV06Unify = \"0x0000000000ce04e2359130e7d0204A5249958921\";\n AlchemyPaymasterAddressV07Unify = \"0x00000000000667F27D4DB42334ec11a25db7EBb4\";\n AlchemyPaymasterAddressV4 = \"0xEaf0Cde110a5d503f2dD69B3a49E031e29b3F9D2\";\n AlchemyPaymasterAddressV3 = \"0x4f84a207A80c39E9e8BaE717c1F25bA7AD1fB08F\";\n AlchemyPaymasterAddressV2 = \"0x4Fd9098af9ddcB41DA48A1d78F91F1398965addc\";\n ArbSepoliaPaymasterAddress = \"0x0804Afe6EEFb73ce7F93CD0d5e7079a5a8068592\";\n AlchemyPaymasterAddressV1 = \"0xc03aac639bb21233e0139381970328db8bceeb67\";\n AlchemyPaymasterAddressV07V2 = \"0x2cc0c7981D846b9F2a16276556f6e8cb52BfB633\";\n AlchemyPaymasterAddressV07V1 = \"0xEF725Aa22d43Ea69FB22bE2EBe6ECa205a6BCf5B\";\n getAlchemyPaymasterAddress = (chain2, version6) => {\n switch (version6) {\n case \"0.6.0\":\n switch (chain2.id) {\n case fraxtalSepolia.id:\n case worldChainSepolia.id:\n case shapeSepolia.id:\n case unichainSepolia.id:\n case opbnbTestnet.id:\n case inkSepolia.id:\n case monadTestnet.id:\n case openlootSepolia.id:\n case gensynTestnet.id:\n case riseTestnet.id:\n case storyAeneid.id:\n case teaSepolia.id:\n case arbitrumGoerli2.id:\n case goerli2.id:\n case optimismGoerli2.id:\n case baseGoerli2.id:\n case polygonMumbai2.id:\n case worldChain.id:\n case shape.id:\n case unichainMainnet.id:\n case soneiumMinato.id:\n case soneiumMainnet.id:\n case opbnbMainnet.id:\n case beraChainBartio.id:\n case inkMainnet.id:\n case arbitrumNova2.id:\n case storyMainnet.id:\n case celoAlfajores.id:\n case celoMainnet.id:\n return AlchemyPaymasterAddressV4;\n case polygonAmoy2.id:\n case optimismSepolia2.id:\n case baseSepolia2.id:\n case zora2.id:\n case zoraSepolia2.id:\n case fraxtal2.id:\n return AlchemyPaymasterAddressV3;\n case mainnet2.id:\n case arbitrum2.id:\n case optimism2.id:\n case polygon2.id:\n case base2.id:\n return AlchemyPaymasterAddressV2;\n case arbitrumSepolia2.id:\n return ArbSepoliaPaymasterAddress;\n case sepolia2.id:\n return AlchemyPaymasterAddressV1;\n default:\n return AlchemyPaymasterAddressV06Unify;\n }\n case \"0.7.0\":\n switch (chain2.id) {\n case arbitrumNova2.id:\n case celoAlfajores.id:\n case celoMainnet.id:\n case gensynTestnet.id:\n case inkMainnet.id:\n case inkSepolia.id:\n case monadTestnet.id:\n case opbnbMainnet.id:\n case opbnbTestnet.id:\n case openlootSepolia.id:\n case riseTestnet.id:\n case shape.id:\n case shapeSepolia.id:\n case soneiumMainnet.id:\n case soneiumMinato.id:\n case storyAeneid.id:\n case storyMainnet.id:\n case teaSepolia.id:\n case unichainMainnet.id:\n case unichainSepolia.id:\n case worldChain.id:\n case worldChainSepolia.id:\n return AlchemyPaymasterAddressV07V1;\n case arbitrum2.id:\n case arbitrumGoerli2.id:\n case arbitrumSepolia2.id:\n case base2.id:\n case baseGoerli2.id:\n case baseSepolia2.id:\n case beraChainBartio.id:\n case fraxtal2.id:\n case fraxtalSepolia.id:\n case goerli2.id:\n case mainnet2.id:\n case optimism2.id:\n case optimismGoerli2.id:\n case optimismSepolia2.id:\n case polygon2.id:\n case polygonAmoy2.id:\n case polygonMumbai2.id:\n case sepolia2.id:\n case zora2.id:\n case zoraSepolia2.id:\n return AlchemyPaymasterAddressV07V2;\n default:\n return AlchemyPaymasterAddressV07Unify;\n }\n default:\n throw new Error(`Unsupported EntryPointVersion: ${version6}`);\n }\n };\n PermitTypes = {\n EIP712Domain: [\n { name: \"name\", type: \"string\" },\n { name: \"version\", type: \"string\" },\n { name: \"chainId\", type: \"uint256\" },\n { name: \"verifyingContract\", type: \"address\" }\n ],\n Permit: [\n { name: \"owner\", type: \"address\" },\n { name: \"spender\", type: \"address\" },\n { name: \"value\", type: \"uint256\" },\n { name: \"nonce\", type: \"uint256\" },\n { name: \"deadline\", type: \"uint256\" }\n ]\n };\n ERC20Abis = [\n \"function decimals() public view returns (uint8)\",\n \"function balanceOf(address owner) external view returns (uint256)\",\n \"function allowance(address owner, address spender) external view returns (uint256)\",\n \"function approve(address spender, uint256 amount) external returns (bool)\"\n ];\n EIP7597Abis = [\n \"function nonces(address owner) external view returns (uint)\"\n ];\n }\n });\n\n // ../../../node_modules/.pnpm/@account-kit+infra@4.62.0_bufferutil@4.0.9_debug@4.4.1_typescript@5.8.3_utf-8-validate@_91850b8a2849fb827e3616547e4ccff7/node_modules/@account-kit/infra/dist/esm/errors/base.js\n var BaseError5;\n var init_base4 = __esm({\n \"../../../node_modules/.pnpm/@account-kit+infra@4.62.0_bufferutil@4.0.9_debug@4.4.1_typescript@5.8.3_utf-8-validate@_91850b8a2849fb827e3616547e4ccff7/node_modules/@account-kit/infra/dist/esm/errors/base.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_esm6();\n init_version6();\n BaseError5 = class extends BaseError4 {\n constructor() {\n super(...arguments);\n Object.defineProperty(this, \"version\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: VERSION2\n });\n }\n };\n }\n });\n\n // ../../../node_modules/.pnpm/@account-kit+infra@4.62.0_bufferutil@4.0.9_debug@4.4.1_typescript@5.8.3_utf-8-validate@_91850b8a2849fb827e3616547e4ccff7/node_modules/@account-kit/infra/dist/esm/errors/invalidSignedPermit.js\n var InvalidSignedPermit;\n var init_invalidSignedPermit = __esm({\n \"../../../node_modules/.pnpm/@account-kit+infra@4.62.0_bufferutil@4.0.9_debug@4.4.1_typescript@5.8.3_utf-8-validate@_91850b8a2849fb827e3616547e4ccff7/node_modules/@account-kit/infra/dist/esm/errors/invalidSignedPermit.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_base4();\n InvalidSignedPermit = class extends BaseError5 {\n constructor(reason) {\n super([\"Invalid signed permit\"].join(\"\\n\"), {\n details: [reason, \"Please provide a valid signed permit\"].join(\"\\n\")\n });\n Object.defineProperty(this, \"name\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: \"InvalidSignedPermit\"\n });\n }\n };\n }\n });\n\n // ../../../node_modules/.pnpm/@account-kit+infra@4.62.0_bufferutil@4.0.9_debug@4.4.1_typescript@5.8.3_utf-8-validate@_91850b8a2849fb827e3616547e4ccff7/node_modules/@account-kit/infra/dist/esm/middleware/gasManager.js\n function alchemyGasManagerMiddleware(policyId, policyToken) {\n const buildContext = async (args) => {\n const context2 = { policyId };\n const { account, client } = args;\n if (!client.chain) {\n throw new ChainNotFoundError2();\n }\n if (policyToken !== void 0) {\n context2.erc20Context = {\n tokenAddress: policyToken.address,\n maxTokenAmount: policyToken.maxTokenAmount\n };\n if (policyToken.permit !== void 0) {\n const permit = await generateSignedPermit(client, account, policyToken);\n if (permit !== void 0) {\n context2.erc20Context.permit = permit;\n }\n } else if (args.context !== void 0) {\n context2.erc20Context.permit = extractSignedPermitFromContext(args.context);\n }\n }\n return context2;\n };\n return {\n dummyPaymasterAndData: async (uo, args) => {\n const context2 = await buildContext(args);\n const baseMiddleware = erc7677Middleware({ context: context2 });\n return baseMiddleware.dummyPaymasterAndData(uo, args);\n },\n paymasterAndData: async (uo, args) => {\n const context2 = await buildContext(args);\n const baseMiddleware = erc7677Middleware({ context: context2 });\n return baseMiddleware.paymasterAndData(uo, args);\n }\n };\n }\n function alchemyGasAndPaymasterAndDataMiddleware(params) {\n const { policyId, policyToken, transport, gasEstimatorOverride, feeEstimatorOverride } = params;\n return {\n dummyPaymasterAndData: async (uo, args) => {\n if (\n // No reason to generate dummy data if we are bypassing the paymaster.\n bypassPaymasterAndData(args.overrides) || // When using alchemy_requestGasAndPaymasterAndData, there is generally no reason to generate dummy\n // data. However, if the gas/feeEstimator is overriden, then this option should be enabled.\n !(gasEstimatorOverride || feeEstimatorOverride)\n ) {\n return noopMiddleware(uo, args);\n }\n return alchemyGasManagerMiddleware(policyId, policyToken).dummyPaymasterAndData(uo, args);\n },\n feeEstimator: (uo, args) => {\n return feeEstimatorOverride ? feeEstimatorOverride(uo, args) : bypassPaymasterAndData(args.overrides) ? alchemyFeeEstimator(transport)(uo, args) : noopMiddleware(uo, args);\n },\n gasEstimator: (uo, args) => {\n return gasEstimatorOverride ? gasEstimatorOverride(uo, args) : bypassPaymasterAndData(args.overrides) ? defaultGasEstimator(args.client)(uo, args) : noopMiddleware(uo, args);\n },\n paymasterAndData: async (uo, { account, client: client_, feeOptions, overrides: overrides_, context: uoContext }) => {\n const client = clientHeaderTrack(client_, \"alchemyFeeEstimator\");\n if (!client.chain) {\n throw new ChainNotFoundError2();\n }\n const userOp = deepHexlify(await resolveProperties(uo));\n const overrides = filterUndefined({\n maxFeePerGas: overrideField(\"maxFeePerGas\", overrides_, feeOptions, userOp),\n maxPriorityFeePerGas: overrideField(\"maxPriorityFeePerGas\", overrides_, feeOptions, userOp),\n callGasLimit: overrideField(\"callGasLimit\", overrides_, feeOptions, userOp),\n verificationGasLimit: overrideField(\"verificationGasLimit\", overrides_, feeOptions, userOp),\n preVerificationGas: overrideField(\"preVerificationGas\", overrides_, feeOptions, userOp),\n ...account.getEntryPoint().version === \"0.7.0\" ? {\n paymasterVerificationGasLimit: overrideField(\"paymasterVerificationGasLimit\", overrides_, feeOptions, userOp),\n paymasterPostOpGasLimit: overrideField(\"paymasterPostOpGasLimit\", overrides_, feeOptions, userOp)\n } : {}\n });\n let erc20Context = void 0;\n if (policyToken !== void 0) {\n erc20Context = {\n tokenAddress: policyToken.address,\n maxTokenAmount: policyToken.maxTokenAmount\n };\n if (policyToken.permit !== void 0) {\n const permit = await generateSignedPermit(client, account, policyToken);\n if (permit !== void 0) {\n erc20Context.permit = permit;\n }\n } else if (uoContext !== void 0) {\n erc20Context.permit = extractSignedPermitFromContext(uoContext);\n }\n }\n const result = await client.request({\n method: \"alchemy_requestGasAndPaymasterAndData\",\n params: [\n {\n policyId,\n entryPoint: account.getEntryPoint().address,\n userOperation: userOp,\n dummySignature: await account.getDummySignature(),\n overrides,\n ...erc20Context ? {\n erc20Context\n } : {}\n }\n ]\n });\n return {\n ...uo,\n ...result\n };\n }\n };\n }\n function extractSignedPermitFromContext(context2) {\n if (context2.signedPermit === void 0) {\n return void 0;\n }\n if (typeof context2.signedPermit !== \"object\") {\n throw new InvalidSignedPermit(\"signedPermit is not an object\");\n }\n if (typeof context2.signedPermit.value !== \"bigint\") {\n throw new InvalidSignedPermit(\"signedPermit.value is not a bigint\");\n }\n if (typeof context2.signedPermit.deadline !== \"bigint\") {\n throw new InvalidSignedPermit(\"signedPermit.deadline is not a bigint\");\n }\n if (!isHex(context2.signedPermit.signature)) {\n throw new InvalidSignedPermit(\"signedPermit.signature is not a hex string\");\n }\n return encodeSignedPermit(context2.signedPermit.value, context2.signedPermit.deadline, context2.signedPermit.signature);\n }\n function encodeSignedPermit(value, deadline, signedPermit) {\n return encodeAbiParameters([{ type: \"uint256\" }, { type: \"uint256\" }, { type: \"bytes\" }], [value, deadline, signedPermit]);\n }\n var overrideField, generateSignedPermit;\n var init_gasManager = __esm({\n \"../../../node_modules/.pnpm/@account-kit+infra@4.62.0_bufferutil@4.0.9_debug@4.4.1_typescript@5.8.3_utf-8-validate@_91850b8a2849fb827e3616547e4ccff7/node_modules/@account-kit/infra/dist/esm/middleware/gasManager.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_esm6();\n init_esm();\n init_feeEstimator2();\n init_gas_manager();\n init_invalidSignedPermit();\n overrideField = (field, overrides, feeOptions, userOperation) => {\n let _field = field;\n if (overrides?.[_field] != null) {\n if (isBigNumberish(overrides[_field])) {\n return deepHexlify(overrides[_field]);\n } else {\n return {\n multiplier: Number(overrides[_field].multiplier)\n };\n }\n }\n if (isMultiplier(feeOptions?.[field])) {\n return {\n multiplier: Number(feeOptions[field].multiplier)\n };\n }\n const userOpField = userOperation[field];\n if (isHex(userOpField) && fromHex(userOpField, \"bigint\") > 0n) {\n return userOpField;\n }\n return void 0;\n };\n generateSignedPermit = async (client, account, policyToken) => {\n if (!client.chain) {\n throw new ChainNotFoundError2();\n }\n if (!policyToken.permit) {\n throw new Error(\"permit is missing\");\n }\n if (!policyToken.permit?.erc20Name || !policyToken.permit?.version) {\n throw new Error(\"erc20Name or version is missing\");\n }\n const paymasterAddress = policyToken.permit.paymasterAddress ?? getAlchemyPaymasterAddress(client.chain, account.getEntryPoint().version);\n if (paymasterAddress === void 0 || paymasterAddress === \"0x\") {\n throw new Error(\"no paymaster contract address available\");\n }\n let allowanceFuture = client.call({\n to: policyToken.address,\n data: encodeFunctionData({\n abi: parseAbi(ERC20Abis),\n functionName: \"allowance\",\n args: [account.address, paymasterAddress]\n })\n });\n let nonceFuture = client.call({\n to: policyToken.address,\n data: encodeFunctionData({\n abi: parseAbi(EIP7597Abis),\n functionName: \"nonces\",\n args: [account.address]\n })\n });\n const [allowanceResponse, nonceResponse] = await Promise.all([\n allowanceFuture,\n nonceFuture\n ]);\n if (!allowanceResponse.data) {\n throw new Error(\"No allowance returned from erc20 contract call\");\n }\n if (!nonceResponse.data) {\n throw new Error(\"No nonces returned from erc20 contract call\");\n }\n const permitLimit = policyToken.permit.autoPermitApproveTo;\n const currentAllowance = BigInt(allowanceResponse.data);\n if (currentAllowance > policyToken.permit.autoPermitBelow) {\n return void 0;\n }\n const nonce = BigInt(nonceResponse.data);\n const deadline = BigInt(Math.floor(Date.now() / 1e3) + 60 * 10);\n const typedPermitData = {\n types: PermitTypes,\n primaryType: \"Permit\",\n domain: {\n name: policyToken.permit.erc20Name ?? \"\",\n version: policyToken.permit.version ?? \"\",\n chainId: BigInt(client.chain.id),\n verifyingContract: policyToken.address\n },\n message: {\n owner: account.address,\n spender: paymasterAddress,\n value: permitLimit,\n nonce,\n deadline\n }\n };\n const signedPermit = await account.signTypedData(typedPermitData);\n return encodeSignedPermit(permitLimit, deadline, signedPermit);\n };\n }\n });\n\n // ../../../node_modules/.pnpm/@account-kit+infra@4.62.0_bufferutil@4.0.9_debug@4.4.1_typescript@5.8.3_utf-8-validate@_91850b8a2849fb827e3616547e4ccff7/node_modules/@account-kit/infra/dist/esm/middleware/userOperationSimulator.js\n function alchemyUserOperationSimulator(transport) {\n return async (struct, { account, client }) => {\n const uoSimResult = await transport({ chain: client.chain }).request({\n method: \"alchemy_simulateUserOperationAssetChanges\",\n params: [\n deepHexlify(await resolveProperties(struct)),\n account.getEntryPoint().address\n ]\n });\n if (uoSimResult.error) {\n throw new Error(uoSimResult.error.message);\n }\n return struct;\n };\n }\n var init_userOperationSimulator = __esm({\n \"../../../node_modules/.pnpm/@account-kit+infra@4.62.0_bufferutil@4.0.9_debug@4.4.1_typescript@5.8.3_utf-8-validate@_91850b8a2849fb827e3616547e4ccff7/node_modules/@account-kit/infra/dist/esm/middleware/userOperationSimulator.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_esm6();\n }\n });\n\n // ../../../node_modules/.pnpm/@account-kit+infra@4.62.0_bufferutil@4.0.9_debug@4.4.1_typescript@5.8.3_utf-8-validate@_91850b8a2849fb827e3616547e4ccff7/node_modules/@account-kit/infra/dist/esm/client/smartAccountClient.js\n function getSignerTypeHeader(account) {\n return { \"Alchemy-Aa-Sdk-Signer\": account.getSigner().signerType };\n }\n function createAlchemySmartAccountClient(config2) {\n if (!config2.chain) {\n throw new ChainNotFoundError2();\n }\n const feeOptions = config2.opts?.feeOptions ?? getDefaultUserOperationFeeOptions2(config2.chain);\n const scaClient = createSmartAccountClient({\n account: config2.account,\n transport: config2.transport,\n chain: config2.chain,\n type: \"AlchemySmartAccountClient\",\n opts: {\n ...config2.opts,\n feeOptions\n },\n feeEstimator: config2.feeEstimator ?? alchemyFeeEstimator(config2.transport),\n gasEstimator: config2.gasEstimator,\n customMiddleware: async (struct, args) => {\n if (isSmartAccountWithSigner(args.account)) {\n config2.transport.updateHeaders(getSignerTypeHeader(args.account));\n }\n return config2.customMiddleware ? config2.customMiddleware(struct, args) : struct;\n },\n ...config2.policyId ? alchemyGasAndPaymasterAndDataMiddleware({\n policyId: config2.policyId,\n policyToken: config2.policyToken,\n transport: config2.transport,\n gasEstimatorOverride: config2.gasEstimator,\n feeEstimatorOverride: config2.feeEstimator\n }) : {},\n userOperationSimulator: config2.useSimulation ? alchemyUserOperationSimulator(config2.transport) : void 0,\n signUserOperation: config2.signUserOperation,\n addBreadCrumb(breadcrumb) {\n const oldConfig = config2.transport.config;\n const dynamicFetchOptions = config2.transport.dynamicFetchOptions;\n const newTransport = alchemy({ ...oldConfig });\n newTransport.updateHeaders(headersUpdate(breadcrumb)(convertHeadersToObject(dynamicFetchOptions?.headers)));\n return createAlchemySmartAccountClient({\n ...config2,\n transport: newTransport\n });\n }\n }).extend(alchemyActions).extend((client_) => ({\n addBreadcrumb(breadcrumb) {\n return clientHeaderTrack(client_, breadcrumb);\n }\n }));\n if (config2.account && isSmartAccountWithSigner(config2.account)) {\n config2.transport.updateHeaders(getSignerTypeHeader(config2.account));\n }\n return scaClient;\n }\n var init_smartAccountClient3 = __esm({\n \"../../../node_modules/.pnpm/@account-kit+infra@4.62.0_bufferutil@4.0.9_debug@4.4.1_typescript@5.8.3_utf-8-validate@_91850b8a2849fb827e3616547e4ccff7/node_modules/@account-kit/infra/dist/esm/client/smartAccountClient.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_esm6();\n init_alchemyTransport();\n init_defaults2();\n init_feeEstimator2();\n init_gasManager();\n init_userOperationSimulator();\n init_smartAccount();\n init_alchemyTrackerHeaders();\n }\n });\n\n // ../../../node_modules/.pnpm/@account-kit+infra@4.62.0_bufferutil@4.0.9_debug@4.4.1_typescript@5.8.3_utf-8-validate@_91850b8a2849fb827e3616547e4ccff7/node_modules/@account-kit/infra/dist/esm/exports/index.js\n var exports_exports2 = {};\n __export(exports_exports2, {\n alchemy: () => alchemy,\n alchemyActions: () => alchemyActions,\n alchemyFeeEstimator: () => alchemyFeeEstimator,\n alchemyGasAndPaymasterAndDataMiddleware: () => alchemyGasAndPaymasterAndDataMiddleware,\n alchemyGasManagerMiddleware: () => alchemyGasManagerMiddleware,\n alchemyUserOperationSimulator: () => alchemyUserOperationSimulator,\n arbitrum: () => arbitrum2,\n arbitrumGoerli: () => arbitrumGoerli2,\n arbitrumNova: () => arbitrumNova2,\n arbitrumSepolia: () => arbitrumSepolia2,\n base: () => base2,\n baseGoerli: () => baseGoerli2,\n baseSepolia: () => baseSepolia2,\n beraChainBartio: () => beraChainBartio,\n bobaMainnet: () => bobaMainnet,\n bobaSepolia: () => bobaSepolia,\n celoAlfajores: () => celoAlfajores,\n celoMainnet: () => celoMainnet,\n createAlchemyPublicRpcClient: () => createAlchemyPublicRpcClient,\n createAlchemySmartAccountClient: () => createAlchemySmartAccountClient,\n defineAlchemyChain: () => defineAlchemyChain,\n fraxtal: () => fraxtal2,\n fraxtalSepolia: () => fraxtalSepolia,\n gensynTestnet: () => gensynTestnet,\n getAlchemyPaymasterAddress: () => getAlchemyPaymasterAddress,\n getDefaultUserOperationFeeOptions: () => getDefaultUserOperationFeeOptions2,\n goerli: () => goerli2,\n headersUpdate: () => headersUpdate,\n inkMainnet: () => inkMainnet,\n inkSepolia: () => inkSepolia,\n isAlchemySmartAccountClient: () => isAlchemySmartAccountClient,\n isAlchemyTransport: () => isAlchemyTransport,\n mainnet: () => mainnet2,\n mekong: () => mekong,\n monadTestnet: () => monadTestnet,\n mutateRemoveTrackingHeaders: () => mutateRemoveTrackingHeaders,\n opbnbMainnet: () => opbnbMainnet,\n opbnbTestnet: () => opbnbTestnet,\n openlootSepolia: () => openlootSepolia,\n optimism: () => optimism2,\n optimismGoerli: () => optimismGoerli2,\n optimismSepolia: () => optimismSepolia2,\n polygon: () => polygon2,\n polygonAmoy: () => polygonAmoy2,\n polygonMumbai: () => polygonMumbai2,\n riseTestnet: () => riseTestnet,\n sepolia: () => sepolia2,\n shape: () => shape,\n shapeSepolia: () => shapeSepolia,\n simulateUserOperationChanges: () => simulateUserOperationChanges,\n soneiumMainnet: () => soneiumMainnet,\n soneiumMinato: () => soneiumMinato,\n storyAeneid: () => storyAeneid,\n storyMainnet: () => storyMainnet,\n teaSepolia: () => teaSepolia,\n unichainMainnet: () => unichainMainnet,\n unichainSepolia: () => unichainSepolia,\n worldChain: () => worldChain,\n worldChainSepolia: () => worldChainSepolia,\n zora: () => zora2,\n zoraSepolia: () => zoraSepolia2\n });\n var init_exports2 = __esm({\n \"../../../node_modules/.pnpm/@account-kit+infra@4.62.0_bufferutil@4.0.9_debug@4.4.1_typescript@5.8.3_utf-8-validate@_91850b8a2849fb827e3616547e4ccff7/node_modules/@account-kit/infra/dist/esm/exports/index.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_simulateUserOperationChanges();\n init_alchemyTransport();\n init_chains2();\n init_smartAccount();\n init_isAlchemySmartAccountClient();\n init_rpcClient();\n init_smartAccountClient3();\n init_defaults2();\n init_gas_manager();\n init_feeEstimator2();\n init_alchemyTrackerHeaders();\n init_gasManager();\n init_userOperationSimulator();\n }\n });\n\n // ../../../node_modules/.pnpm/@account-kit+smart-contracts@4.62.0_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5._65dee0153d50ca3a2d2c6830319271d9/node_modules/@account-kit/smart-contracts/dist/esm/src/light-account/abis/LightAccountAbi_v1.js\n var LightAccountAbi_v1;\n var init_LightAccountAbi_v1 = __esm({\n \"../../../node_modules/.pnpm/@account-kit+smart-contracts@4.62.0_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5._65dee0153d50ca3a2d2c6830319271d9/node_modules/@account-kit/smart-contracts/dist/esm/src/light-account/abis/LightAccountAbi_v1.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n LightAccountAbi_v1 = [\n {\n inputs: [\n {\n internalType: \"contract IEntryPoint\",\n name: \"anEntryPoint\",\n type: \"address\"\n }\n ],\n stateMutability: \"nonpayable\",\n type: \"constructor\"\n },\n { inputs: [], name: \"ArrayLengthMismatch\", type: \"error\" },\n { inputs: [], name: \"InvalidInitialization\", type: \"error\" },\n {\n inputs: [{ internalType: \"address\", name: \"owner\", type: \"address\" }],\n name: \"InvalidOwner\",\n type: \"error\"\n },\n {\n inputs: [{ internalType: \"address\", name: \"caller\", type: \"address\" }],\n name: \"NotAuthorized\",\n type: \"error\"\n },\n { inputs: [], name: \"NotInitializing\", type: \"error\" },\n {\n anonymous: false,\n inputs: [\n {\n indexed: false,\n internalType: \"address\",\n name: \"previousAdmin\",\n type: \"address\"\n },\n {\n indexed: false,\n internalType: \"address\",\n name: \"newAdmin\",\n type: \"address\"\n }\n ],\n name: \"AdminChanged\",\n type: \"event\"\n },\n {\n anonymous: false,\n inputs: [\n {\n indexed: true,\n internalType: \"address\",\n name: \"beacon\",\n type: \"address\"\n }\n ],\n name: \"BeaconUpgraded\",\n type: \"event\"\n },\n {\n anonymous: false,\n inputs: [\n {\n indexed: false,\n internalType: \"uint64\",\n name: \"version\",\n type: \"uint64\"\n }\n ],\n name: \"Initialized\",\n type: \"event\"\n },\n {\n anonymous: false,\n inputs: [\n {\n indexed: true,\n internalType: \"contract IEntryPoint\",\n name: \"entryPoint\",\n type: \"address\"\n },\n {\n indexed: true,\n internalType: \"address\",\n name: \"owner\",\n type: \"address\"\n }\n ],\n name: \"LightAccountInitialized\",\n type: \"event\"\n },\n {\n anonymous: false,\n inputs: [\n {\n indexed: true,\n internalType: \"address\",\n name: \"previousOwner\",\n type: \"address\"\n },\n {\n indexed: true,\n internalType: \"address\",\n name: \"newOwner\",\n type: \"address\"\n }\n ],\n name: \"OwnershipTransferred\",\n type: \"event\"\n },\n {\n anonymous: false,\n inputs: [\n {\n indexed: true,\n internalType: \"address\",\n name: \"implementation\",\n type: \"address\"\n }\n ],\n name: \"Upgraded\",\n type: \"event\"\n },\n {\n inputs: [],\n name: \"addDeposit\",\n outputs: [],\n stateMutability: \"payable\",\n type: \"function\"\n },\n {\n inputs: [],\n name: \"domainSeparator\",\n outputs: [{ internalType: \"bytes32\", name: \"\", type: \"bytes32\" }],\n stateMutability: \"view\",\n type: \"function\"\n },\n {\n inputs: [{ internalType: \"bytes\", name: \"message\", type: \"bytes\" }],\n name: \"encodeMessageData\",\n outputs: [{ internalType: \"bytes\", name: \"\", type: \"bytes\" }],\n stateMutability: \"view\",\n type: \"function\"\n },\n {\n inputs: [],\n name: \"entryPoint\",\n outputs: [\n { internalType: \"contract IEntryPoint\", name: \"\", type: \"address\" }\n ],\n stateMutability: \"view\",\n type: \"function\"\n },\n {\n inputs: [\n { internalType: \"address\", name: \"dest\", type: \"address\" },\n { internalType: \"uint256\", name: \"value\", type: \"uint256\" },\n { internalType: \"bytes\", name: \"func\", type: \"bytes\" }\n ],\n name: \"execute\",\n outputs: [],\n stateMutability: \"nonpayable\",\n type: \"function\"\n },\n {\n inputs: [\n { internalType: \"address[]\", name: \"dest\", type: \"address[]\" },\n { internalType: \"bytes[]\", name: \"func\", type: \"bytes[]\" }\n ],\n name: \"executeBatch\",\n outputs: [],\n stateMutability: \"nonpayable\",\n type: \"function\"\n },\n {\n inputs: [\n { internalType: \"address[]\", name: \"dest\", type: \"address[]\" },\n { internalType: \"uint256[]\", name: \"value\", type: \"uint256[]\" },\n { internalType: \"bytes[]\", name: \"func\", type: \"bytes[]\" }\n ],\n name: \"executeBatch\",\n outputs: [],\n stateMutability: \"nonpayable\",\n type: \"function\"\n },\n {\n inputs: [],\n name: \"getDeposit\",\n outputs: [{ internalType: \"uint256\", name: \"\", type: \"uint256\" }],\n stateMutability: \"view\",\n type: \"function\"\n },\n {\n inputs: [{ internalType: \"bytes\", name: \"message\", type: \"bytes\" }],\n name: \"getMessageHash\",\n outputs: [{ internalType: \"bytes32\", name: \"\", type: \"bytes32\" }],\n stateMutability: \"view\",\n type: \"function\"\n },\n {\n inputs: [],\n name: \"getNonce\",\n outputs: [{ internalType: \"uint256\", name: \"\", type: \"uint256\" }],\n stateMutability: \"view\",\n type: \"function\"\n },\n {\n inputs: [{ internalType: \"address\", name: \"anOwner\", type: \"address\" }],\n name: \"initialize\",\n outputs: [],\n stateMutability: \"nonpayable\",\n type: \"function\"\n },\n {\n inputs: [\n { internalType: \"bytes32\", name: \"digest\", type: \"bytes32\" },\n { internalType: \"bytes\", name: \"signature\", type: \"bytes\" }\n ],\n name: \"isValidSignature\",\n outputs: [{ internalType: \"bytes4\", name: \"\", type: \"bytes4\" }],\n stateMutability: \"view\",\n type: \"function\"\n },\n {\n inputs: [\n { internalType: \"address\", name: \"\", type: \"address\" },\n { internalType: \"address\", name: \"\", type: \"address\" },\n { internalType: \"uint256[]\", name: \"\", type: \"uint256[]\" },\n { internalType: \"uint256[]\", name: \"\", type: \"uint256[]\" },\n { internalType: \"bytes\", name: \"\", type: \"bytes\" }\n ],\n name: \"onERC1155BatchReceived\",\n outputs: [{ internalType: \"bytes4\", name: \"\", type: \"bytes4\" }],\n stateMutability: \"pure\",\n type: \"function\"\n },\n {\n inputs: [\n { internalType: \"address\", name: \"\", type: \"address\" },\n { internalType: \"address\", name: \"\", type: \"address\" },\n { internalType: \"uint256\", name: \"\", type: \"uint256\" },\n { internalType: \"uint256\", name: \"\", type: \"uint256\" },\n { internalType: \"bytes\", name: \"\", type: \"bytes\" }\n ],\n name: \"onERC1155Received\",\n outputs: [{ internalType: \"bytes4\", name: \"\", type: \"bytes4\" }],\n stateMutability: \"pure\",\n type: \"function\"\n },\n {\n inputs: [\n { internalType: \"address\", name: \"\", type: \"address\" },\n { internalType: \"address\", name: \"\", type: \"address\" },\n { internalType: \"uint256\", name: \"\", type: \"uint256\" },\n { internalType: \"bytes\", name: \"\", type: \"bytes\" }\n ],\n name: \"onERC721Received\",\n outputs: [{ internalType: \"bytes4\", name: \"\", type: \"bytes4\" }],\n stateMutability: \"pure\",\n type: \"function\"\n },\n {\n inputs: [],\n name: \"owner\",\n outputs: [{ internalType: \"address\", name: \"\", type: \"address\" }],\n stateMutability: \"view\",\n type: \"function\"\n },\n {\n inputs: [],\n name: \"proxiableUUID\",\n outputs: [{ internalType: \"bytes32\", name: \"\", type: \"bytes32\" }],\n stateMutability: \"view\",\n type: \"function\"\n },\n {\n inputs: [{ internalType: \"bytes4\", name: \"interfaceId\", type: \"bytes4\" }],\n name: \"supportsInterface\",\n outputs: [{ internalType: \"bool\", name: \"\", type: \"bool\" }],\n stateMutability: \"view\",\n type: \"function\"\n },\n {\n inputs: [\n { internalType: \"address\", name: \"\", type: \"address\" },\n { internalType: \"address\", name: \"\", type: \"address\" },\n { internalType: \"address\", name: \"\", type: \"address\" },\n { internalType: \"uint256\", name: \"\", type: \"uint256\" },\n { internalType: \"bytes\", name: \"\", type: \"bytes\" },\n { internalType: \"bytes\", name: \"\", type: \"bytes\" }\n ],\n name: \"tokensReceived\",\n outputs: [],\n stateMutability: \"pure\",\n type: \"function\"\n },\n {\n inputs: [{ internalType: \"address\", name: \"newOwner\", type: \"address\" }],\n name: \"transferOwnership\",\n outputs: [],\n stateMutability: \"nonpayable\",\n type: \"function\"\n },\n {\n inputs: [\n { internalType: \"address\", name: \"newImplementation\", type: \"address\" }\n ],\n name: \"upgradeTo\",\n outputs: [],\n stateMutability: \"nonpayable\",\n type: \"function\"\n },\n {\n inputs: [\n { internalType: \"address\", name: \"newImplementation\", type: \"address\" },\n { internalType: \"bytes\", name: \"data\", type: \"bytes\" }\n ],\n name: \"upgradeToAndCall\",\n outputs: [],\n stateMutability: \"payable\",\n type: \"function\"\n },\n {\n inputs: [\n {\n components: [\n { internalType: \"address\", name: \"sender\", type: \"address\" },\n { internalType: \"uint256\", name: \"nonce\", type: \"uint256\" },\n { internalType: \"bytes\", name: \"initCode\", type: \"bytes\" },\n { internalType: \"bytes\", name: \"callData\", type: \"bytes\" },\n { internalType: \"uint256\", name: \"callGasLimit\", type: \"uint256\" },\n {\n internalType: \"uint256\",\n name: \"verificationGasLimit\",\n type: \"uint256\"\n },\n {\n internalType: \"uint256\",\n name: \"preVerificationGas\",\n type: \"uint256\"\n },\n { internalType: \"uint256\", name: \"maxFeePerGas\", type: \"uint256\" },\n {\n internalType: \"uint256\",\n name: \"maxPriorityFeePerGas\",\n type: \"uint256\"\n },\n { internalType: \"bytes\", name: \"paymasterAndData\", type: \"bytes\" },\n { internalType: \"bytes\", name: \"signature\", type: \"bytes\" }\n ],\n internalType: \"struct UserOperation\",\n name: \"userOp\",\n type: \"tuple\"\n },\n { internalType: \"bytes32\", name: \"userOpHash\", type: \"bytes32\" },\n { internalType: \"uint256\", name: \"missingAccountFunds\", type: \"uint256\" }\n ],\n name: \"validateUserOp\",\n outputs: [\n { internalType: \"uint256\", name: \"validationData\", type: \"uint256\" }\n ],\n stateMutability: \"nonpayable\",\n type: \"function\"\n },\n {\n inputs: [\n {\n internalType: \"address payable\",\n name: \"withdrawAddress\",\n type: \"address\"\n },\n { internalType: \"uint256\", name: \"amount\", type: \"uint256\" }\n ],\n name: \"withdrawDepositTo\",\n outputs: [],\n stateMutability: \"nonpayable\",\n type: \"function\"\n },\n { stateMutability: \"payable\", type: \"receive\" }\n ];\n }\n });\n\n // ../../../node_modules/.pnpm/@account-kit+smart-contracts@4.62.0_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5._65dee0153d50ca3a2d2c6830319271d9/node_modules/@account-kit/smart-contracts/dist/esm/src/light-account/abis/LightAccountAbi_v2.js\n var LightAccountAbi_v2;\n var init_LightAccountAbi_v2 = __esm({\n \"../../../node_modules/.pnpm/@account-kit+smart-contracts@4.62.0_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5._65dee0153d50ca3a2d2c6830319271d9/node_modules/@account-kit/smart-contracts/dist/esm/src/light-account/abis/LightAccountAbi_v2.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n LightAccountAbi_v2 = [\n {\n type: \"constructor\",\n inputs: [\n {\n name: \"entryPoint_\",\n type: \"address\",\n internalType: \"contract IEntryPoint\"\n }\n ],\n stateMutability: \"nonpayable\"\n },\n { type: \"receive\", stateMutability: \"payable\" },\n {\n type: \"function\",\n name: \"addDeposit\",\n inputs: [],\n outputs: [],\n stateMutability: \"payable\"\n },\n {\n type: \"function\",\n name: \"eip712Domain\",\n inputs: [],\n outputs: [\n { name: \"fields\", type: \"bytes1\", internalType: \"bytes1\" },\n { name: \"name\", type: \"string\", internalType: \"string\" },\n { name: \"version\", type: \"string\", internalType: \"string\" },\n { name: \"chainId\", type: \"uint256\", internalType: \"uint256\" },\n {\n name: \"verifyingContract\",\n type: \"address\",\n internalType: \"address\"\n },\n { name: \"salt\", type: \"bytes32\", internalType: \"bytes32\" },\n {\n name: \"extensions\",\n type: \"uint256[]\",\n internalType: \"uint256[]\"\n }\n ],\n stateMutability: \"view\"\n },\n {\n type: \"function\",\n name: \"entryPoint\",\n inputs: [],\n outputs: [\n {\n name: \"\",\n type: \"address\",\n internalType: \"contract IEntryPoint\"\n }\n ],\n stateMutability: \"view\"\n },\n {\n type: \"function\",\n name: \"execute\",\n inputs: [\n { name: \"dest\", type: \"address\", internalType: \"address\" },\n { name: \"value\", type: \"uint256\", internalType: \"uint256\" },\n { name: \"func\", type: \"bytes\", internalType: \"bytes\" }\n ],\n outputs: [],\n stateMutability: \"nonpayable\"\n },\n {\n type: \"function\",\n name: \"executeBatch\",\n inputs: [\n { name: \"dest\", type: \"address[]\", internalType: \"address[]\" },\n { name: \"func\", type: \"bytes[]\", internalType: \"bytes[]\" }\n ],\n outputs: [],\n stateMutability: \"nonpayable\"\n },\n {\n type: \"function\",\n name: \"executeBatch\",\n inputs: [\n { name: \"dest\", type: \"address[]\", internalType: \"address[]\" },\n { name: \"value\", type: \"uint256[]\", internalType: \"uint256[]\" },\n { name: \"func\", type: \"bytes[]\", internalType: \"bytes[]\" }\n ],\n outputs: [],\n stateMutability: \"nonpayable\"\n },\n {\n type: \"function\",\n name: \"getDeposit\",\n inputs: [],\n outputs: [{ name: \"\", type: \"uint256\", internalType: \"uint256\" }],\n stateMutability: \"view\"\n },\n {\n type: \"function\",\n name: \"getNonce\",\n inputs: [],\n outputs: [{ name: \"\", type: \"uint256\", internalType: \"uint256\" }],\n stateMutability: \"view\"\n },\n {\n type: \"function\",\n name: \"initialize\",\n inputs: [{ name: \"owner_\", type: \"address\", internalType: \"address\" }],\n outputs: [],\n stateMutability: \"nonpayable\"\n },\n {\n type: \"function\",\n name: \"isValidSignature\",\n inputs: [\n { name: \"hash\", type: \"bytes32\", internalType: \"bytes32\" },\n { name: \"signature\", type: \"bytes\", internalType: \"bytes\" }\n ],\n outputs: [{ name: \"result\", type: \"bytes4\", internalType: \"bytes4\" }],\n stateMutability: \"view\"\n },\n {\n type: \"function\",\n name: \"onERC1155BatchReceived\",\n inputs: [\n { name: \"\", type: \"address\", internalType: \"address\" },\n { name: \"\", type: \"address\", internalType: \"address\" },\n { name: \"\", type: \"uint256[]\", internalType: \"uint256[]\" },\n { name: \"\", type: \"uint256[]\", internalType: \"uint256[]\" },\n { name: \"\", type: \"bytes\", internalType: \"bytes\" }\n ],\n outputs: [{ name: \"\", type: \"bytes4\", internalType: \"bytes4\" }],\n stateMutability: \"pure\"\n },\n {\n type: \"function\",\n name: \"onERC1155Received\",\n inputs: [\n { name: \"\", type: \"address\", internalType: \"address\" },\n { name: \"\", type: \"address\", internalType: \"address\" },\n { name: \"\", type: \"uint256\", internalType: \"uint256\" },\n { name: \"\", type: \"uint256\", internalType: \"uint256\" },\n { name: \"\", type: \"bytes\", internalType: \"bytes\" }\n ],\n outputs: [{ name: \"\", type: \"bytes4\", internalType: \"bytes4\" }],\n stateMutability: \"pure\"\n },\n {\n type: \"function\",\n name: \"onERC721Received\",\n inputs: [\n { name: \"\", type: \"address\", internalType: \"address\" },\n { name: \"\", type: \"address\", internalType: \"address\" },\n { name: \"\", type: \"uint256\", internalType: \"uint256\" },\n { name: \"\", type: \"bytes\", internalType: \"bytes\" }\n ],\n outputs: [{ name: \"\", type: \"bytes4\", internalType: \"bytes4\" }],\n stateMutability: \"pure\"\n },\n {\n type: \"function\",\n name: \"owner\",\n inputs: [],\n outputs: [{ name: \"\", type: \"address\", internalType: \"address\" }],\n stateMutability: \"view\"\n },\n {\n type: \"function\",\n name: \"proxiableUUID\",\n inputs: [],\n outputs: [{ name: \"\", type: \"bytes32\", internalType: \"bytes32\" }],\n stateMutability: \"view\"\n },\n {\n type: \"function\",\n name: \"supportsInterface\",\n inputs: [{ name: \"interfaceId\", type: \"bytes4\", internalType: \"bytes4\" }],\n outputs: [{ name: \"\", type: \"bool\", internalType: \"bool\" }],\n stateMutability: \"view\"\n },\n {\n type: \"function\",\n name: \"transferOwnership\",\n inputs: [{ name: \"newOwner\", type: \"address\", internalType: \"address\" }],\n outputs: [],\n stateMutability: \"nonpayable\"\n },\n {\n type: \"function\",\n name: \"upgradeToAndCall\",\n inputs: [\n {\n name: \"newImplementation\",\n type: \"address\",\n internalType: \"address\"\n },\n { name: \"data\", type: \"bytes\", internalType: \"bytes\" }\n ],\n outputs: [],\n stateMutability: \"payable\"\n },\n {\n type: \"function\",\n name: \"validateUserOp\",\n inputs: [\n {\n name: \"userOp\",\n type: \"tuple\",\n internalType: \"struct PackedUserOperation\",\n components: [\n { name: \"sender\", type: \"address\", internalType: \"address\" },\n { name: \"nonce\", type: \"uint256\", internalType: \"uint256\" },\n { name: \"initCode\", type: \"bytes\", internalType: \"bytes\" },\n { name: \"callData\", type: \"bytes\", internalType: \"bytes\" },\n {\n name: \"accountGasLimits\",\n type: \"bytes32\",\n internalType: \"bytes32\"\n },\n {\n name: \"preVerificationGas\",\n type: \"uint256\",\n internalType: \"uint256\"\n },\n { name: \"gasFees\", type: \"bytes32\", internalType: \"bytes32\" },\n {\n name: \"paymasterAndData\",\n type: \"bytes\",\n internalType: \"bytes\"\n },\n { name: \"signature\", type: \"bytes\", internalType: \"bytes\" }\n ]\n },\n { name: \"userOpHash\", type: \"bytes32\", internalType: \"bytes32\" },\n {\n name: \"missingAccountFunds\",\n type: \"uint256\",\n internalType: \"uint256\"\n }\n ],\n outputs: [\n {\n name: \"validationData\",\n type: \"uint256\",\n internalType: \"uint256\"\n }\n ],\n stateMutability: \"nonpayable\"\n },\n {\n type: \"function\",\n name: \"withdrawDepositTo\",\n inputs: [\n {\n name: \"withdrawAddress\",\n type: \"address\",\n internalType: \"address payable\"\n },\n { name: \"amount\", type: \"uint256\", internalType: \"uint256\" }\n ],\n outputs: [],\n stateMutability: \"nonpayable\"\n },\n {\n type: \"event\",\n name: \"Initialized\",\n inputs: [\n {\n name: \"version\",\n type: \"uint64\",\n indexed: false,\n internalType: \"uint64\"\n }\n ],\n anonymous: false\n },\n {\n type: \"event\",\n name: \"LightAccountInitialized\",\n inputs: [\n {\n name: \"entryPoint\",\n type: \"address\",\n indexed: true,\n internalType: \"contract IEntryPoint\"\n },\n {\n name: \"owner\",\n type: \"address\",\n indexed: true,\n internalType: \"address\"\n }\n ],\n anonymous: false\n },\n {\n type: \"event\",\n name: \"OwnershipTransferred\",\n inputs: [\n {\n name: \"previousOwner\",\n type: \"address\",\n indexed: true,\n internalType: \"address\"\n },\n {\n name: \"newOwner\",\n type: \"address\",\n indexed: true,\n internalType: \"address\"\n }\n ],\n anonymous: false\n },\n {\n type: \"event\",\n name: \"Upgraded\",\n inputs: [\n {\n name: \"implementation\",\n type: \"address\",\n indexed: true,\n internalType: \"address\"\n }\n ],\n anonymous: false\n },\n { type: \"error\", name: \"ArrayLengthMismatch\", inputs: [] },\n { type: \"error\", name: \"ECDSAInvalidSignature\", inputs: [] },\n {\n type: \"error\",\n name: \"ECDSAInvalidSignatureLength\",\n inputs: [{ name: \"length\", type: \"uint256\", internalType: \"uint256\" }]\n },\n {\n type: \"error\",\n name: \"ECDSAInvalidSignatureS\",\n inputs: [{ name: \"s\", type: \"bytes32\", internalType: \"bytes32\" }]\n },\n { type: \"error\", name: \"InvalidInitialization\", inputs: [] },\n {\n type: \"error\",\n name: \"InvalidOwner\",\n inputs: [{ name: \"owner\", type: \"address\", internalType: \"address\" }]\n },\n { type: \"error\", name: \"InvalidSignatureType\", inputs: [] },\n {\n type: \"error\",\n name: \"NotAuthorized\",\n inputs: [{ name: \"caller\", type: \"address\", internalType: \"address\" }]\n },\n { type: \"error\", name: \"NotInitializing\", inputs: [] },\n { type: \"error\", name: \"UnauthorizedCallContext\", inputs: [] },\n { type: \"error\", name: \"UpgradeFailed\", inputs: [] },\n { type: \"error\", name: \"ZeroAddressNotAllowed\", inputs: [] }\n ];\n }\n });\n\n // ../../../node_modules/.pnpm/@account-kit+smart-contracts@4.62.0_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5._65dee0153d50ca3a2d2c6830319271d9/node_modules/@account-kit/smart-contracts/dist/esm/src/light-account/abis/LightAccountFactoryAbi_v1.js\n var LightAccountFactoryAbi_v1;\n var init_LightAccountFactoryAbi_v1 = __esm({\n \"../../../node_modules/.pnpm/@account-kit+smart-contracts@4.62.0_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5._65dee0153d50ca3a2d2c6830319271d9/node_modules/@account-kit/smart-contracts/dist/esm/src/light-account/abis/LightAccountFactoryAbi_v1.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n LightAccountFactoryAbi_v1 = [\n {\n inputs: [\n {\n internalType: \"contract IEntryPoint\",\n name: \"_entryPoint\",\n type: \"address\"\n }\n ],\n stateMutability: \"nonpayable\",\n type: \"constructor\"\n },\n {\n inputs: [],\n name: \"accountImplementation\",\n outputs: [\n {\n internalType: \"contract LightAccount\",\n name: \"\",\n type: \"address\"\n }\n ],\n stateMutability: \"view\",\n type: \"function\"\n },\n {\n inputs: [\n {\n internalType: \"address\",\n name: \"owner\",\n type: \"address\"\n },\n {\n internalType: \"uint256\",\n name: \"salt\",\n type: \"uint256\"\n }\n ],\n name: \"createAccount\",\n outputs: [\n {\n internalType: \"contract LightAccount\",\n name: \"ret\",\n type: \"address\"\n }\n ],\n stateMutability: \"nonpayable\",\n type: \"function\"\n },\n {\n inputs: [\n {\n internalType: \"address\",\n name: \"owner\",\n type: \"address\"\n },\n {\n internalType: \"uint256\",\n name: \"salt\",\n type: \"uint256\"\n }\n ],\n name: \"getAddress\",\n outputs: [\n {\n internalType: \"address\",\n name: \"\",\n type: \"address\"\n }\n ],\n stateMutability: \"view\",\n type: \"function\"\n }\n ];\n }\n });\n\n // ../../../node_modules/.pnpm/@account-kit+smart-contracts@4.62.0_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5._65dee0153d50ca3a2d2c6830319271d9/node_modules/@account-kit/smart-contracts/dist/esm/src/light-account/abis/LightAccountFactoryAbi_v2.js\n var LightAccountFactoryAbi_v2;\n var init_LightAccountFactoryAbi_v2 = __esm({\n \"../../../node_modules/.pnpm/@account-kit+smart-contracts@4.62.0_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5._65dee0153d50ca3a2d2c6830319271d9/node_modules/@account-kit/smart-contracts/dist/esm/src/light-account/abis/LightAccountFactoryAbi_v2.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n LightAccountFactoryAbi_v2 = [\n {\n type: \"constructor\",\n inputs: [\n { name: \"owner\", type: \"address\", internalType: \"address\" },\n {\n name: \"entryPoint\",\n type: \"address\",\n internalType: \"contract IEntryPoint\"\n }\n ],\n stateMutability: \"nonpayable\"\n },\n { type: \"receive\", stateMutability: \"payable\" },\n {\n type: \"function\",\n name: \"ACCOUNT_IMPLEMENTATION\",\n inputs: [],\n outputs: [\n {\n name: \"\",\n type: \"address\",\n internalType: \"contract LightAccount\"\n }\n ],\n stateMutability: \"view\"\n },\n {\n type: \"function\",\n name: \"ENTRY_POINT\",\n inputs: [],\n outputs: [\n {\n name: \"\",\n type: \"address\",\n internalType: \"contract IEntryPoint\"\n }\n ],\n stateMutability: \"view\"\n },\n {\n type: \"function\",\n name: \"acceptOwnership\",\n inputs: [],\n outputs: [],\n stateMutability: \"nonpayable\"\n },\n {\n type: \"function\",\n name: \"addStake\",\n inputs: [\n { name: \"unstakeDelay\", type: \"uint32\", internalType: \"uint32\" },\n { name: \"amount\", type: \"uint256\", internalType: \"uint256\" }\n ],\n outputs: [],\n stateMutability: \"payable\"\n },\n {\n type: \"function\",\n name: \"createAccount\",\n inputs: [\n { name: \"owner\", type: \"address\", internalType: \"address\" },\n { name: \"salt\", type: \"uint256\", internalType: \"uint256\" }\n ],\n outputs: [\n {\n name: \"account\",\n type: \"address\",\n internalType: \"contract LightAccount\"\n }\n ],\n stateMutability: \"nonpayable\"\n },\n {\n type: \"function\",\n name: \"getAddress\",\n inputs: [\n { name: \"owner\", type: \"address\", internalType: \"address\" },\n { name: \"salt\", type: \"uint256\", internalType: \"uint256\" }\n ],\n outputs: [{ name: \"\", type: \"address\", internalType: \"address\" }],\n stateMutability: \"view\"\n },\n {\n type: \"function\",\n name: \"owner\",\n inputs: [],\n outputs: [{ name: \"\", type: \"address\", internalType: \"address\" }],\n stateMutability: \"view\"\n },\n {\n type: \"function\",\n name: \"pendingOwner\",\n inputs: [],\n outputs: [{ name: \"\", type: \"address\", internalType: \"address\" }],\n stateMutability: \"view\"\n },\n {\n type: \"function\",\n name: \"renounceOwnership\",\n inputs: [],\n outputs: [],\n stateMutability: \"view\"\n },\n {\n type: \"function\",\n name: \"transferOwnership\",\n inputs: [{ name: \"newOwner\", type: \"address\", internalType: \"address\" }],\n outputs: [],\n stateMutability: \"nonpayable\"\n },\n {\n type: \"function\",\n name: \"unlockStake\",\n inputs: [],\n outputs: [],\n stateMutability: \"nonpayable\"\n },\n {\n type: \"function\",\n name: \"withdraw\",\n inputs: [\n { name: \"to\", type: \"address\", internalType: \"address payable\" },\n { name: \"token\", type: \"address\", internalType: \"address\" },\n { name: \"amount\", type: \"uint256\", internalType: \"uint256\" }\n ],\n outputs: [],\n stateMutability: \"nonpayable\"\n },\n {\n type: \"function\",\n name: \"withdrawStake\",\n inputs: [{ name: \"to\", type: \"address\", internalType: \"address payable\" }],\n outputs: [],\n stateMutability: \"nonpayable\"\n },\n {\n type: \"event\",\n name: \"OwnershipTransferStarted\",\n inputs: [\n {\n name: \"previousOwner\",\n type: \"address\",\n indexed: true,\n internalType: \"address\"\n },\n {\n name: \"newOwner\",\n type: \"address\",\n indexed: true,\n internalType: \"address\"\n }\n ],\n anonymous: false\n },\n {\n type: \"event\",\n name: \"OwnershipTransferred\",\n inputs: [\n {\n name: \"previousOwner\",\n type: \"address\",\n indexed: true,\n internalType: \"address\"\n },\n {\n name: \"newOwner\",\n type: \"address\",\n indexed: true,\n internalType: \"address\"\n }\n ],\n anonymous: false\n },\n {\n type: \"error\",\n name: \"AddressEmptyCode\",\n inputs: [{ name: \"target\", type: \"address\", internalType: \"address\" }]\n },\n {\n type: \"error\",\n name: \"AddressInsufficientBalance\",\n inputs: [{ name: \"account\", type: \"address\", internalType: \"address\" }]\n },\n { type: \"error\", name: \"FailedInnerCall\", inputs: [] },\n { type: \"error\", name: \"InvalidAction\", inputs: [] },\n {\n type: \"error\",\n name: \"InvalidEntryPoint\",\n inputs: [{ name: \"entryPoint\", type: \"address\", internalType: \"address\" }]\n },\n {\n type: \"error\",\n name: \"OwnableInvalidOwner\",\n inputs: [{ name: \"owner\", type: \"address\", internalType: \"address\" }]\n },\n {\n type: \"error\",\n name: \"OwnableUnauthorizedAccount\",\n inputs: [{ name: \"account\", type: \"address\", internalType: \"address\" }]\n },\n {\n type: \"error\",\n name: \"SafeERC20FailedOperation\",\n inputs: [{ name: \"token\", type: \"address\", internalType: \"address\" }]\n },\n { type: \"error\", name: \"TransferFailed\", inputs: [] },\n { type: \"error\", name: \"ZeroAddressNotAllowed\", inputs: [] }\n ];\n }\n });\n\n // ../../../node_modules/.pnpm/@account-kit+smart-contracts@4.62.0_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5._65dee0153d50ca3a2d2c6830319271d9/node_modules/@account-kit/smart-contracts/dist/esm/src/light-account/utils.js\n async function getLightAccountVersionForAccount(account, chain2) {\n const accountType = account.source;\n const factoryAddress = await account.getFactoryAddress();\n const implAddress = await account.getImplementationAddress();\n const implToVersion = new Map(Object.entries(AccountVersionRegistry[accountType]).map((pair) => {\n const [version7, def] = pair;\n if (def.addresses.overrides != null && chain2.id in def.addresses.overrides) {\n return [def.addresses.overrides[chain2.id].impl, version7];\n }\n return [def.addresses.default.impl, version7];\n }));\n const factoryToVersion = new Map(Object.entries(AccountVersionRegistry[accountType]).map((pair) => {\n const [version7, def] = pair;\n if (def.addresses.overrides != null && chain2.id in def.addresses.overrides) {\n return [def.addresses.overrides[chain2.id].factory, version7];\n }\n return [def.addresses.default.factory, version7];\n }));\n const version6 = fromHex(implAddress, \"bigint\") === 0n ? factoryToVersion.get(factoryAddress.toLowerCase()) : implToVersion.get(implAddress.toLowerCase());\n if (!version6) {\n throw new Error(`Could not determine ${account.source} version for chain ${chain2.id}`);\n }\n return AccountVersionRegistry[accountType][version6];\n }\n var AccountVersionRegistry, defaultLightAccountVersion, getDefaultLightAccountFactoryAddress, getDefaultMultiOwnerLightAccountFactoryAddress, LightAccountUnsupported1271Impls, LightAccountUnsupported1271Factories;\n var init_utils11 = __esm({\n \"../../../node_modules/.pnpm/@account-kit+smart-contracts@4.62.0_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5._65dee0153d50ca3a2d2c6830319271d9/node_modules/@account-kit/smart-contracts/dist/esm/src/light-account/utils.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_esm();\n AccountVersionRegistry = {\n LightAccount: {\n \"v1.0.1\": {\n entryPointVersion: \"0.6.0\",\n addresses: {\n default: {\n factory: \"0x000000893A26168158fbeaDD9335Be5bC96592E2\".toLowerCase(),\n impl: \"0xc1b2fc4197c9187853243e6e4eb5a4af8879a1c0\".toLowerCase()\n }\n }\n },\n \"v1.0.2\": {\n entryPointVersion: \"0.6.0\",\n addresses: {\n default: {\n factory: \"0x00000055C0b4fA41dde26A74435ff03692292FBD\".toLowerCase(),\n impl: \"0x5467b1947F47d0646704EB801E075e72aeAe8113\".toLowerCase()\n }\n }\n },\n \"v1.1.0\": {\n entryPointVersion: \"0.6.0\",\n addresses: {\n default: {\n factory: \"0x00004EC70002a32400f8ae005A26081065620D20\".toLowerCase(),\n impl: \"0xae8c656ad28F2B59a196AB61815C16A0AE1c3cba\".toLowerCase()\n }\n }\n },\n \"v2.0.0\": {\n entryPointVersion: \"0.7.0\",\n addresses: {\n default: {\n factory: \"0x0000000000400CdFef5E2714E63d8040b700BC24\".toLowerCase(),\n impl: \"0x8E8e658E22B12ada97B402fF0b044D6A325013C7\".toLowerCase()\n }\n }\n }\n },\n MultiOwnerLightAccount: {\n \"v2.0.0\": {\n entryPointVersion: \"0.7.0\",\n addresses: {\n default: {\n factory: \"0x000000000019d2Ee9F2729A65AfE20bb0020AefC\".toLowerCase(),\n impl: \"0xd2c27F9eE8E4355f71915ffD5568cB3433b6823D\".toLowerCase()\n }\n }\n }\n }\n };\n defaultLightAccountVersion = () => \"v2.0.0\";\n getDefaultLightAccountFactoryAddress = (chain2, version6) => {\n return AccountVersionRegistry.LightAccount[version6].addresses.overrides?.[chain2.id]?.factory ?? AccountVersionRegistry.LightAccount[version6].addresses.default.factory;\n };\n getDefaultMultiOwnerLightAccountFactoryAddress = (chain2, version6) => {\n return AccountVersionRegistry.MultiOwnerLightAccount[version6].addresses.overrides?.[chain2.id]?.factory ?? AccountVersionRegistry.MultiOwnerLightAccount[version6].addresses.default.factory;\n };\n LightAccountUnsupported1271Impls = [\n AccountVersionRegistry.LightAccount[\"v1.0.1\"],\n AccountVersionRegistry.LightAccount[\"v1.0.2\"]\n ];\n LightAccountUnsupported1271Factories = new Set(LightAccountUnsupported1271Impls.map((x4) => [\n x4.addresses.default.factory,\n ...Object.values(x4.addresses.overrides ?? {}).map((z2) => z2.factory)\n ]).flat());\n }\n });\n\n // ../../../node_modules/.pnpm/@account-kit+smart-contracts@4.62.0_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5._65dee0153d50ca3a2d2c6830319271d9/node_modules/@account-kit/smart-contracts/dist/esm/src/light-account/accounts/base.js\n async function createLightAccountBase({ transport, chain: chain2, signer, abi: abi2, version: version6, type, entryPoint, accountAddress, getAccountInitCode }) {\n const client = createBundlerClient({\n transport,\n chain: chain2\n });\n const encodeUpgradeToAndCall = async ({ upgradeToAddress, upgradeToInitData }) => {\n const storage = await client.getStorageAt({\n address: accountAddress,\n // the slot at which impl addresses are stored by UUPS\n slot: \"0x360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc\"\n });\n if (storage == null) {\n throw new FailedToGetStorageSlotError(\"0x360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc\", \"Proxy Implementation Address\");\n }\n const implementationAddresses = Object.values(AccountVersionRegistry[type]).map((x4) => x4.addresses.overrides?.[chain2.id]?.impl ?? x4.addresses.default.impl);\n if (fromHex(storage, \"number\") !== 0 && !implementationAddresses.some((x4) => x4 === trim(storage))) {\n throw new Error(`could not determine if smart account implementation is ${type} ${String(version6)}`);\n }\n return encodeFunctionData({\n abi: abi2,\n functionName: \"upgradeToAndCall\",\n args: [upgradeToAddress, upgradeToInitData]\n });\n };\n const get1271Wrapper = (hashedMessage, version7) => {\n return {\n // EIP712Domain(string name,string version,uint256 chainId,address verifyingContract)\n // https://github.com/alchemyplatform/light-account/blob/main/src/LightAccount.sol#L236\n domain: {\n chainId: Number(client.chain.id),\n name: type,\n verifyingContract: accountAddress,\n version: version7\n },\n types: {\n LightAccountMessage: [{ name: \"message\", type: \"bytes\" }]\n },\n message: {\n message: hashedMessage\n },\n primaryType: \"LightAccountMessage\"\n };\n };\n const prepareSign = async (params) => {\n const messageHash = params.type === \"personal_sign\" ? hashMessage(params.data) : hashTypedData(params.data);\n switch (version6) {\n case \"v1.0.1\":\n return params;\n case \"v1.0.2\":\n throw new Error(`Version ${String(version6)} of LightAccount doesn't support 1271`);\n case \"v1.1.0\":\n return {\n type: \"eth_signTypedData_v4\",\n data: get1271Wrapper(messageHash, \"1\")\n };\n case \"v2.0.0\":\n return {\n type: \"eth_signTypedData_v4\",\n data: get1271Wrapper(messageHash, \"2\")\n };\n default:\n throw new Error(`Unknown version ${String(version6)} of LightAccount`);\n }\n };\n const formatSign = async (signature) => {\n return version6 === \"v2.0.0\" ? concat([SignatureType.EOA, signature]) : signature;\n };\n const account = await toSmartContractAccount({\n transport,\n chain: chain2,\n entryPoint,\n accountAddress,\n source: type,\n getAccountInitCode,\n prepareSign,\n formatSign,\n encodeExecute: async ({ target, data, value }) => {\n return encodeFunctionData({\n abi: abi2,\n functionName: \"execute\",\n args: [target, value ?? 0n, data]\n });\n },\n encodeBatchExecute: async (txs) => {\n const [targets, values, datas] = txs.reduce((accum, curr) => {\n accum[0].push(curr.target);\n accum[1].push(curr.value ?? 0n);\n accum[2].push(curr.data);\n return accum;\n }, [[], [], []]);\n return encodeFunctionData({\n abi: abi2,\n functionName: \"executeBatch\",\n args: [targets, values, datas]\n });\n },\n signUserOperationHash: async (uoHash) => {\n const signature = await signer.signMessage({ raw: uoHash });\n switch (version6) {\n case \"v2.0.0\":\n return concat([SignatureType.EOA, signature]);\n default:\n return signature;\n }\n },\n async signMessage({ message }) {\n const { type: type2, data } = await prepareSign({\n type: \"personal_sign\",\n data: message\n });\n const sig = type2 === \"personal_sign\" ? await signer.signMessage(data) : await signer.signTypedData(data);\n return formatSign(sig);\n },\n async signTypedData(params) {\n const { type: type2, data } = await prepareSign({\n type: \"eth_signTypedData_v4\",\n data: params\n });\n const sig = type2 === \"personal_sign\" ? await signer.signMessage(data) : await signer.signTypedData(data);\n return formatSign(sig);\n },\n getDummySignature: () => {\n const signature = \"0xfffffffffffffffffffffffffffffff0000000000000000000000000000000007aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa1c\";\n switch (version6) {\n case \"v1.0.1\":\n case \"v1.0.2\":\n case \"v1.1.0\":\n return signature;\n case \"v2.0.0\":\n return concat([SignatureType.EOA, signature]);\n default:\n throw new Error(`Unknown version ${type} of ${String(version6)}`);\n }\n },\n encodeUpgradeToAndCall\n });\n return {\n ...account,\n source: type,\n getLightAccountVersion: () => version6,\n getSigner: () => signer\n };\n }\n var SignatureType;\n var init_base5 = __esm({\n \"../../../node_modules/.pnpm/@account-kit+smart-contracts@4.62.0_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5._65dee0153d50ca3a2d2c6830319271d9/node_modules/@account-kit/smart-contracts/dist/esm/src/light-account/accounts/base.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_esm6();\n init_esm();\n init_utils11();\n (function(SignatureType3) {\n SignatureType3[\"EOA\"] = \"0x00\";\n SignatureType3[\"CONTRACT\"] = \"0x01\";\n SignatureType3[\"CONTRACT_WITH_ADDR\"] = \"0x02\";\n })(SignatureType || (SignatureType = {}));\n }\n });\n\n // ../../../node_modules/.pnpm/@account-kit+smart-contracts@4.62.0_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5._65dee0153d50ca3a2d2c6830319271d9/node_modules/@account-kit/smart-contracts/dist/esm/src/light-account/abis/OZ_ERC1967Proxy.js\n var OZ_ERC1967Proxy_ConstructorAbi;\n var init_OZ_ERC1967Proxy = __esm({\n \"../../../node_modules/.pnpm/@account-kit+smart-contracts@4.62.0_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5._65dee0153d50ca3a2d2c6830319271d9/node_modules/@account-kit/smart-contracts/dist/esm/src/light-account/abis/OZ_ERC1967Proxy.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n OZ_ERC1967Proxy_ConstructorAbi = [\n {\n type: \"constructor\",\n inputs: [\n {\n name: \"_logic\",\n type: \"address\",\n internalType: \"address\"\n },\n {\n name: \"_data\",\n type: \"bytes\",\n internalType: \"bytes\"\n }\n ],\n stateMutability: \"payable\"\n }\n ];\n }\n });\n\n // ../../../node_modules/.pnpm/@account-kit+smart-contracts@4.62.0_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5._65dee0153d50ca3a2d2c6830319271d9/node_modules/@account-kit/smart-contracts/dist/esm/src/light-account/accounts/predictAddress.js\n function predictLightAccountAddress({ factoryAddress, salt, ownerAddress, version: version6 }) {\n const implementationAddress = (\n // If we aren't using the default factory address, we compute the implementation address from the factory's `create` deployment.\n // This is accurate for both LA v1 and v2 factories. If we are using the default factory address, we use the implementation address from the registry.\n factoryAddress !== AccountVersionRegistry.LightAccount[version6].addresses.default.factory ? getContractAddress2({\n from: factoryAddress,\n nonce: 1n\n }) : AccountVersionRegistry.LightAccount[version6].addresses.default.impl\n );\n switch (version6) {\n case \"v1.0.1\":\n case \"v1.0.2\":\n case \"v1.1.0\":\n const LAv1_proxy_bytecode = \"0x60406080815261042c908138038061001681610218565b93843982019181818403126102135780516001600160a01b038116808203610213576020838101516001600160401b0394919391858211610213570186601f820112156102135780519061007161006c83610253565b610218565b918083528583019886828401011161021357888661008f930161026e565b813b156101b9577f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc80546001600160a01b031916841790556000927fbc7cd75a20ee27fd9adebab32041f755214dbc6bffa90cc0225b39da2e5c2d3b8480a28051158015906101b2575b61010b575b855160e790816103458239f35b855194606086019081118682101761019e578697849283926101889952602788527f416464726573733a206c6f772d6c6576656c2064656c65676174652063616c6c87890152660819985a5b195960ca1b8a8901525190845af4913d15610194573d9061017a61006c83610253565b91825281943d92013e610291565b508038808080806100fe565b5060609250610291565b634e487b7160e01b84526041600452602484fd5b50826100f9565b855162461bcd60e51b815260048101859052602d60248201527f455243313936373a206e657720696d706c656d656e746174696f6e206973206e60448201526c1bdd08184818dbdb9d1c9858dd609a1b6064820152608490fd5b600080fd5b6040519190601f01601f191682016001600160401b0381118382101761023d57604052565b634e487b7160e01b600052604160045260246000fd5b6001600160401b03811161023d57601f01601f191660200190565b60005b8381106102815750506000910152565b8181015183820152602001610271565b919290156102f357508151156102a5575090565b3b156102ae5790565b60405162461bcd60e51b815260206004820152601d60248201527f416464726573733a2063616c6c20746f206e6f6e2d636f6e74726163740000006044820152606490fd5b8251909150156103065750805190602001fd5b6044604051809262461bcd60e51b825260206004830152610336815180928160248601526020868601910161026e565b601f01601f19168101030190fdfe60806040523615605f5773ffffffffffffffffffffffffffffffffffffffff7f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc54166000808092368280378136915af43d82803e15605b573d90f35b3d90fd5b73ffffffffffffffffffffffffffffffffffffffff7f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc54166000808092368280378136915af43d82803e15605b573d90f3fea26469706673582212205da2750cd2b0cadfd354d8a1ca4752ed7f22214c8069d852f7dc6b8e9e5ee66964736f6c63430008150033\";\n return getContractAddress2({\n from: factoryAddress,\n opcode: \"CREATE2\",\n salt: toHex(salt, { size: 32 }),\n bytecode: encodeDeployData({\n bytecode: LAv1_proxy_bytecode,\n abi: OZ_ERC1967Proxy_ConstructorAbi,\n args: [\n implementationAddress,\n encodeFunctionData({\n abi: LightAccountAbi_v1,\n functionName: \"initialize\",\n args: [ownerAddress]\n })\n ]\n })\n });\n case \"v2.0.0\":\n const combinedSalt = keccak256(encodeAbiParameters([{ type: \"address\" }, { type: \"uint256\" }], [ownerAddress, salt]));\n const initCode = getLAv2ProxyBytecode(implementationAddress);\n return getContractAddress2({\n from: factoryAddress,\n opcode: \"CREATE2\",\n salt: combinedSalt,\n bytecode: initCode\n });\n default:\n assertNeverLightAccountVersion(version6);\n }\n }\n function predictMultiOwnerLightAccountAddress({ factoryAddress, salt, ownerAddresses }) {\n const implementationAddress = (\n // If we aren't using the default factory address, we compute the implementation address from the factory's `create` deployment.\n // This is accurate for both LA v1 and v2 factories. If we are using the default factory address, we use the implementation address from the registry.\n factoryAddress !== AccountVersionRegistry.MultiOwnerLightAccount[\"v2.0.0\"].addresses.default.factory ? getContractAddress2({\n from: factoryAddress,\n nonce: 1n\n }) : AccountVersionRegistry.MultiOwnerLightAccount[\"v2.0.0\"].addresses.default.impl\n );\n const combinedSalt = keccak256(encodeAbiParameters([{ type: \"address[]\" }, { type: \"uint256\" }], [ownerAddresses, salt]));\n const initCode = getLAv2ProxyBytecode(implementationAddress);\n return getContractAddress2({\n from: factoryAddress,\n opcode: \"CREATE2\",\n salt: combinedSalt,\n bytecode: initCode\n });\n }\n function getLAv2ProxyBytecode(implementationAddress) {\n return `0x603d3d8160223d3973${implementationAddress.slice(2)}60095155f3363d3d373d3d363d7f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc545af43d6000803e6038573d6000fd5b3d6000f3`;\n }\n function assertNeverLightAccountVersion(version6) {\n throw new Error(`Unknown light account version: ${version6}`);\n }\n var init_predictAddress = __esm({\n \"../../../node_modules/.pnpm/@account-kit+smart-contracts@4.62.0_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5._65dee0153d50ca3a2d2c6830319271d9/node_modules/@account-kit/smart-contracts/dist/esm/src/light-account/accounts/predictAddress.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_esm();\n init_OZ_ERC1967Proxy();\n init_utils11();\n init_LightAccountAbi_v1();\n }\n });\n\n // ../../../node_modules/.pnpm/@account-kit+smart-contracts@4.62.0_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5._65dee0153d50ca3a2d2c6830319271d9/node_modules/@account-kit/smart-contracts/dist/esm/src/light-account/accounts/account.js\n async function createLightAccount({ transport, chain: chain2, signer, initCode, version: version6 = defaultLightAccountVersion(), entryPoint = getEntryPoint(chain2, {\n version: AccountVersionRegistry[\"LightAccount\"][version6].entryPointVersion\n }), accountAddress, factoryAddress = getDefaultLightAccountFactoryAddress(chain2, version6), salt: salt_ = 0n }) {\n const client = createBundlerClient({\n transport,\n chain: chain2\n });\n const accountAbi = version6 === \"v2.0.0\" ? LightAccountAbi_v2 : LightAccountAbi_v1;\n const factoryAbi = version6 === \"v2.0.0\" ? LightAccountFactoryAbi_v1 : LightAccountFactoryAbi_v2;\n const signerAddress = await signer.getAddress();\n const salt = LightAccountUnsupported1271Factories.has(factoryAddress.toLowerCase()) ? 0n : salt_;\n const getAccountInitCode = async () => {\n if (initCode)\n return initCode;\n return concatHex([\n factoryAddress,\n encodeFunctionData({\n abi: factoryAbi,\n functionName: \"createAccount\",\n args: [signerAddress, salt]\n })\n ]);\n };\n const address = accountAddress ?? predictLightAccountAddress({\n factoryAddress,\n salt,\n ownerAddress: signerAddress,\n version: version6\n });\n const account = await createLightAccountBase({\n transport,\n chain: chain2,\n signer,\n abi: accountAbi,\n type: \"LightAccount\",\n version: version6,\n entryPoint,\n accountAddress: address,\n getAccountInitCode\n });\n return {\n ...account,\n encodeTransferOwnership: (newOwner) => {\n return encodeFunctionData({\n abi: accountAbi,\n functionName: \"transferOwnership\",\n args: [newOwner]\n });\n },\n async getOwnerAddress() {\n const callResult = await client.readContract({\n address,\n abi: accountAbi,\n functionName: \"owner\"\n });\n if (callResult == null) {\n throw new Error(\"could not get on-chain owner\");\n }\n return callResult;\n }\n };\n }\n var init_account3 = __esm({\n \"../../../node_modules/.pnpm/@account-kit+smart-contracts@4.62.0_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5._65dee0153d50ca3a2d2c6830319271d9/node_modules/@account-kit/smart-contracts/dist/esm/src/light-account/accounts/account.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_esm6();\n init_esm();\n init_LightAccountAbi_v1();\n init_LightAccountAbi_v2();\n init_LightAccountFactoryAbi_v1();\n init_LightAccountFactoryAbi_v2();\n init_utils11();\n init_base5();\n init_predictAddress();\n }\n });\n\n // ../../../node_modules/.pnpm/@account-kit+smart-contracts@4.62.0_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5._65dee0153d50ca3a2d2c6830319271d9/node_modules/@account-kit/smart-contracts/dist/esm/src/light-account/actions/transferOwnership.js\n var transferOwnership;\n var init_transferOwnership = __esm({\n \"../../../node_modules/.pnpm/@account-kit+smart-contracts@4.62.0_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5._65dee0153d50ca3a2d2c6830319271d9/node_modules/@account-kit/smart-contracts/dist/esm/src/light-account/actions/transferOwnership.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_esm6();\n transferOwnership = async (client, args) => {\n const { newOwner, waitForTxn, overrides, account = client.account } = args;\n if (!account) {\n throw new AccountNotFoundError2();\n }\n if (!isSmartAccountClient(client)) {\n throw new IncompatibleClientError(\"SmartAccountClient\", \"transferOwnership\", client);\n }\n const data = account.encodeTransferOwnership(await newOwner.getAddress());\n const result = await client.sendUserOperation({\n uo: {\n target: account.address,\n data\n },\n account,\n overrides\n });\n if (waitForTxn) {\n return client.waitForUserOperationTransaction(result);\n }\n return result.hash;\n };\n }\n });\n\n // ../../../node_modules/.pnpm/@account-kit+infra@4.62.0_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_viem@_d0fd590584a0b3dca5b842750d667454/node_modules/@account-kit/infra/dist/esm/client/isAlchemySmartAccountClient.js\n function isAlchemySmartAccountClient2(client) {\n return client.transport.type === \"alchemy\";\n }\n var init_isAlchemySmartAccountClient2 = __esm({\n \"../../../node_modules/.pnpm/@account-kit+infra@4.62.0_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_viem@_d0fd590584a0b3dca5b842750d667454/node_modules/@account-kit/infra/dist/esm/client/isAlchemySmartAccountClient.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n }\n });\n\n // ../../../node_modules/.pnpm/@account-kit+infra@4.62.0_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_viem@_d0fd590584a0b3dca5b842750d667454/node_modules/@account-kit/infra/dist/esm/actions/simulateUserOperationChanges.js\n var simulateUserOperationChanges2;\n var init_simulateUserOperationChanges2 = __esm({\n \"../../../node_modules/.pnpm/@account-kit+infra@4.62.0_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_viem@_d0fd590584a0b3dca5b842750d667454/node_modules/@account-kit/infra/dist/esm/actions/simulateUserOperationChanges.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_esm6();\n init_isAlchemySmartAccountClient2();\n simulateUserOperationChanges2 = async (client, { account = client.account, overrides, ...params }) => {\n if (!account) {\n throw new AccountNotFoundError2();\n }\n if (!isAlchemySmartAccountClient2(client)) {\n throw new IncompatibleClientError(\"AlchemySmartAccountClient\", \"SimulateUserOperationAssetChanges\", client);\n }\n const uoStruct = deepHexlify(await client.buildUserOperation({\n ...params,\n account,\n overrides\n }));\n return client.request({\n method: \"alchemy_simulateUserOperationAssetChanges\",\n params: [uoStruct, account.getEntryPoint().address]\n });\n };\n }\n });\n\n // ../../../node_modules/.pnpm/@account-kit+infra@4.62.0_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_viem@_d0fd590584a0b3dca5b842750d667454/node_modules/@account-kit/infra/dist/esm/alchemyTrackerHeaders.js\n function mutateRemoveTrackingHeaders2(x4) {\n if (!x4)\n return;\n if (Array.isArray(x4))\n return;\n if (typeof x4 !== \"object\")\n return;\n TRACKER_HEADER2 in x4 && delete x4[TRACKER_HEADER2];\n TRACKER_BREADCRUMB2 in x4 && delete x4[TRACKER_BREADCRUMB2];\n TRACE_HEADER_NAME in x4 && delete x4[TRACE_HEADER_NAME];\n TRACE_HEADER_STATE in x4 && delete x4[TRACE_HEADER_STATE];\n }\n function addCrumb2(previous, crumb) {\n if (!previous)\n return crumb;\n return `${previous} > ${crumb}`;\n }\n function headersUpdate2(crumb) {\n const headerUpdate_ = (x4) => {\n const traceHeader = (TraceHeader.fromTraceHeader(x4) || TraceHeader.default()).withEvent(crumb);\n return {\n [TRACKER_HEADER2]: traceHeader.parentId,\n ...x4,\n [TRACKER_BREADCRUMB2]: addCrumb2(x4[TRACKER_BREADCRUMB2], crumb),\n ...traceHeader.toTraceHeader()\n };\n };\n return headerUpdate_;\n }\n var TRACKER_HEADER2, TRACKER_BREADCRUMB2;\n var init_alchemyTrackerHeaders2 = __esm({\n \"../../../node_modules/.pnpm/@account-kit+infra@4.62.0_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_viem@_d0fd590584a0b3dca5b842750d667454/node_modules/@account-kit/infra/dist/esm/alchemyTrackerHeaders.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_esm6();\n init_esm6();\n init_esm6();\n TRACKER_HEADER2 = \"X-Alchemy-Client-Trace-Id\";\n TRACKER_BREADCRUMB2 = \"X-Alchemy-Client-Breadcrumb\";\n }\n });\n\n // ../../../node_modules/.pnpm/@account-kit+infra@4.62.0_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_viem@_d0fd590584a0b3dca5b842750d667454/node_modules/@account-kit/infra/dist/esm/schema.js\n var AlchemyChainSchema2;\n var init_schema4 = __esm({\n \"../../../node_modules/.pnpm/@account-kit+infra@4.62.0_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_viem@_d0fd590584a0b3dca5b842750d667454/node_modules/@account-kit/infra/dist/esm/schema.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_esm6();\n init_esm5();\n AlchemyChainSchema2 = esm_default.custom((chain2) => {\n const chain_ = ChainSchema.parse(chain2);\n return chain_.rpcUrls.alchemy != null;\n }, \"chain must include an alchemy rpc url. See `defineAlchemyChain` or import a chain from `@account-kit/infra`.\");\n }\n });\n\n // ../../../node_modules/.pnpm/@account-kit+infra@4.62.0_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_viem@_d0fd590584a0b3dca5b842750d667454/node_modules/@account-kit/infra/dist/esm/version.js\n var VERSION3;\n var init_version7 = __esm({\n \"../../../node_modules/.pnpm/@account-kit+infra@4.62.0_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_viem@_d0fd590584a0b3dca5b842750d667454/node_modules/@account-kit/infra/dist/esm/version.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n VERSION3 = \"4.62.0\";\n }\n });\n\n // ../../../node_modules/.pnpm/@account-kit+infra@4.62.0_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_viem@_d0fd590584a0b3dca5b842750d667454/node_modules/@account-kit/infra/dist/esm/alchemyTransport.js\n function isAlchemyTransport2(transport, chain2) {\n return transport({ chain: chain2 }).config.type === \"alchemy\";\n }\n function alchemy2(config2) {\n const { retryDelay, retryCount = 0 } = config2;\n const fetchOptions = { ...config2.fetchOptions };\n const connectionConfig = ConnectionConfigSchema.parse(config2.alchemyConnection ?? config2);\n const headersAsObject = convertHeadersToObject2(fetchOptions.headers);\n fetchOptions.headers = {\n ...headersAsObject,\n \"Alchemy-AA-Sdk-Version\": VERSION3\n };\n if (connectionConfig.jwt != null || connectionConfig.apiKey != null) {\n fetchOptions.headers = {\n ...fetchOptions.headers,\n Authorization: `Bearer ${connectionConfig.jwt ?? connectionConfig.apiKey}`\n };\n }\n const transport = (opts) => {\n const { chain: chain_ } = opts;\n if (!chain_) {\n throw new ChainNotFoundError2();\n }\n const chain2 = AlchemyChainSchema2.parse(chain_);\n const rpcUrl = connectionConfig.rpcUrl == null ? chain2.rpcUrls.alchemy.http[0] : connectionConfig.rpcUrl;\n const chainAgnosticRpcUrl = connectionConfig.rpcUrl == null ? \"https://api.g.alchemy.com/v2\" : connectionConfig.chainAgnosticUrl ?? connectionConfig.rpcUrl;\n const innerTransport = (() => {\n mutateRemoveTrackingHeaders2(config2?.fetchOptions?.headers);\n if (config2.alchemyConnection && config2.nodeRpcUrl) {\n return split2({\n overrides: [\n {\n methods: alchemyMethods2,\n transport: http(rpcUrl, { fetchOptions, retryCount })\n },\n {\n methods: chainAgnosticMethods2,\n transport: http(chainAgnosticRpcUrl, {\n fetchOptions,\n retryCount,\n retryDelay\n })\n }\n ],\n fallback: http(config2.nodeRpcUrl, {\n fetchOptions: config2.fetchOptions,\n retryCount,\n retryDelay\n })\n });\n }\n return split2({\n overrides: [\n {\n methods: chainAgnosticMethods2,\n transport: http(chainAgnosticRpcUrl, {\n fetchOptions,\n retryCount,\n retryDelay\n })\n }\n ],\n fallback: http(rpcUrl, { fetchOptions, retryCount, retryDelay })\n });\n })();\n return createTransport({\n key: \"alchemy\",\n name: \"Alchemy Transport\",\n request: innerTransport({\n ...opts,\n // Retries are already handled above within the split transport,\n // so `retryCount` must be 0 here for the expected behavior.\n retryCount: 0\n }).request,\n // Retries are already handled above within the split transport,\n // so `retryCount` must be 0 here too for the expected behavior.\n retryCount: 0,\n retryDelay,\n type: \"alchemy\"\n }, { alchemyRpcUrl: rpcUrl, fetchOptions });\n };\n return Object.assign(transport, {\n dynamicFetchOptions: fetchOptions,\n updateHeaders(newHeaders_) {\n const newHeaders = convertHeadersToObject2(newHeaders_);\n fetchOptions.headers = {\n ...fetchOptions.headers,\n ...newHeaders\n };\n },\n config: config2\n });\n }\n var alchemyMethods2, chainAgnosticMethods2, convertHeadersToObject2;\n var init_alchemyTransport2 = __esm({\n \"../../../node_modules/.pnpm/@account-kit+infra@4.62.0_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_viem@_d0fd590584a0b3dca5b842750d667454/node_modules/@account-kit/infra/dist/esm/alchemyTransport.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_esm6();\n init_esm();\n init_alchemyTrackerHeaders2();\n init_schema4();\n init_version7();\n alchemyMethods2 = [\n \"eth_sendUserOperation\",\n \"eth_estimateUserOperationGas\",\n \"eth_getUserOperationReceipt\",\n \"eth_getUserOperationByHash\",\n \"eth_supportedEntryPoints\",\n \"rundler_maxPriorityFeePerGas\",\n \"pm_getPaymasterData\",\n \"pm_getPaymasterStubData\",\n \"alchemy_requestGasAndPaymasterAndData\"\n ];\n chainAgnosticMethods2 = [\n \"wallet_prepareCalls\",\n \"wallet_sendPreparedCalls\",\n \"wallet_requestAccount\",\n \"wallet_createAccount\",\n \"wallet_listAccounts\",\n \"wallet_createSession\",\n \"wallet_getCallsStatus\"\n ];\n convertHeadersToObject2 = (headers) => {\n if (!headers) {\n return {};\n }\n if (headers instanceof Headers) {\n const headersObject = {};\n headers.forEach((value, key) => {\n headersObject[key] = value;\n });\n return headersObject;\n }\n if (Array.isArray(headers)) {\n return headers.reduce((acc, header) => {\n acc[header[0]] = header[1];\n return acc;\n }, {});\n }\n return headers;\n };\n }\n });\n\n // ../../../node_modules/.pnpm/@account-kit+infra@4.62.0_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_viem@_d0fd590584a0b3dca5b842750d667454/node_modules/@account-kit/infra/dist/esm/chains.js\n var arbitrum3, arbitrumGoerli3, arbitrumSepolia3, goerli3, mainnet3, optimism3, optimismGoerli3, optimismSepolia3, sepolia3, base3, baseGoerli3, baseSepolia3, polygonMumbai3, polygonAmoy3, polygon3, fraxtal3, fraxtalSepolia2, zora3, zoraSepolia3, worldChainSepolia2, worldChain2, shapeSepolia2, shape2, unichainMainnet2, unichainSepolia2, soneiumMinato2, soneiumMainnet2, opbnbTestnet2, opbnbMainnet2, beraChainBartio2, inkMainnet2, inkSepolia2, arbitrumNova3, monadTestnet2, mekong2, openlootSepolia2, gensynTestnet2, riseTestnet2, storyMainnet2, storyAeneid2, celoAlfajores2, celoMainnet2, teaSepolia2, bobaSepolia2, bobaMainnet2;\n var init_chains3 = __esm({\n \"../../../node_modules/.pnpm/@account-kit+infra@4.62.0_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_viem@_d0fd590584a0b3dca5b842750d667454/node_modules/@account-kit/infra/dist/esm/chains.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_esm();\n init_chains();\n arbitrum3 = {\n ...arbitrum,\n rpcUrls: {\n ...arbitrum.rpcUrls,\n alchemy: {\n http: [\"https://arb-mainnet.g.alchemy.com/v2\"]\n }\n }\n };\n arbitrumGoerli3 = {\n ...arbitrumGoerli,\n rpcUrls: {\n ...arbitrumGoerli.rpcUrls,\n alchemy: {\n http: [\"https://arb-goerli.g.alchemy.com/v2\"]\n }\n }\n };\n arbitrumSepolia3 = {\n ...arbitrumSepolia,\n rpcUrls: {\n ...arbitrumSepolia.rpcUrls,\n alchemy: {\n http: [\"https://arb-sepolia.g.alchemy.com/v2\"]\n }\n }\n };\n goerli3 = {\n ...goerli,\n rpcUrls: {\n ...goerli.rpcUrls,\n alchemy: {\n http: [\"https://eth-goerli.g.alchemy.com/v2\"]\n }\n }\n };\n mainnet3 = {\n ...mainnet,\n rpcUrls: {\n ...mainnet.rpcUrls,\n alchemy: {\n http: [\"https://eth-mainnet.g.alchemy.com/v2\"]\n }\n }\n };\n optimism3 = {\n ...optimism,\n rpcUrls: {\n ...optimism.rpcUrls,\n alchemy: {\n http: [\"https://opt-mainnet.g.alchemy.com/v2\"]\n }\n }\n };\n optimismGoerli3 = {\n ...optimismGoerli,\n rpcUrls: {\n ...optimismGoerli.rpcUrls,\n alchemy: {\n http: [\"https://opt-goerli.g.alchemy.com/v2\"]\n }\n }\n };\n optimismSepolia3 = {\n ...optimismSepolia,\n rpcUrls: {\n ...optimismSepolia.rpcUrls,\n alchemy: {\n http: [\"https://opt-sepolia.g.alchemy.com/v2\"]\n }\n }\n };\n sepolia3 = {\n ...sepolia,\n rpcUrls: {\n ...sepolia.rpcUrls,\n alchemy: {\n http: [\"https://eth-sepolia.g.alchemy.com/v2\"]\n }\n }\n };\n base3 = {\n ...base,\n rpcUrls: {\n ...base.rpcUrls,\n alchemy: {\n http: [\"https://base-mainnet.g.alchemy.com/v2\"]\n }\n }\n };\n baseGoerli3 = {\n ...baseGoerli,\n rpcUrls: {\n ...baseGoerli.rpcUrls,\n alchemy: {\n http: [\"https://base-goerli.g.alchemy.com/v2\"]\n }\n }\n };\n baseSepolia3 = {\n ...baseSepolia,\n rpcUrls: {\n ...baseSepolia.rpcUrls,\n alchemy: {\n http: [\"https://base-sepolia.g.alchemy.com/v2\"]\n }\n }\n };\n polygonMumbai3 = {\n ...polygonMumbai,\n rpcUrls: {\n ...polygonMumbai.rpcUrls,\n alchemy: {\n http: [\"https://polygon-mumbai.g.alchemy.com/v2\"]\n }\n }\n };\n polygonAmoy3 = {\n ...polygonAmoy,\n rpcUrls: {\n ...polygonAmoy.rpcUrls,\n alchemy: {\n http: [\"https://polygon-amoy.g.alchemy.com/v2\"]\n }\n }\n };\n polygon3 = {\n ...polygon,\n rpcUrls: {\n ...polygon.rpcUrls,\n alchemy: {\n http: [\"https://polygon-mainnet.g.alchemy.com/v2\"]\n }\n }\n };\n fraxtal3 = {\n ...fraxtal,\n rpcUrls: {\n ...fraxtal.rpcUrls\n }\n };\n fraxtalSepolia2 = defineChain({\n id: 2523,\n name: \"Fraxtal Sepolia\",\n nativeCurrency: { name: \"Frax Ether\", symbol: \"frxETH\", decimals: 18 },\n rpcUrls: {\n default: {\n http: [\"https://rpc.testnet-sepolia.frax.com\"]\n }\n }\n });\n zora3 = {\n ...zora,\n rpcUrls: {\n ...zora.rpcUrls\n }\n };\n zoraSepolia3 = {\n ...zoraSepolia,\n rpcUrls: {\n ...zoraSepolia.rpcUrls\n }\n };\n worldChainSepolia2 = defineChain({\n id: 4801,\n name: \"World Chain Sepolia\",\n network: \"World Chain Sepolia\",\n nativeCurrency: { name: \"Ether\", symbol: \"ETH\", decimals: 18 },\n rpcUrls: {\n default: {\n http: [\"https://worldchain-sepolia.g.alchemy.com/v2\"]\n },\n public: {\n http: [\"https://worldchain-sepolia.g.alchemy.com/v2\"]\n },\n alchemy: {\n http: [\"https://worldchain-sepolia.g.alchemy.com/v2\"]\n }\n }\n });\n worldChain2 = defineChain({\n id: 480,\n name: \"World Chain\",\n network: \"World Chain\",\n nativeCurrency: { name: \"Ether\", symbol: \"ETH\", decimals: 18 },\n rpcUrls: {\n default: {\n http: [\"https://worldchain-mainnet.g.alchemy.com/v2\"]\n },\n public: {\n http: [\"https://worldchain-mainnet.g.alchemy.com/v2\"]\n },\n alchemy: {\n http: [\"https://worldchain-mainnet.g.alchemy.com/v2\"]\n }\n }\n });\n shapeSepolia2 = defineChain({\n id: 11011,\n name: \"Shape Sepolia\",\n network: \"Shape Sepolia\",\n nativeCurrency: { name: \"Ether\", symbol: \"ETH\", decimals: 18 },\n rpcUrls: {\n default: {\n http: [\"https://shape-sepolia.g.alchemy.com/v2\"]\n },\n public: {\n http: [\"https://shape-sepolia.g.alchemy.com/v2\"]\n },\n alchemy: {\n http: [\"https://shape-sepolia.g.alchemy.com/v2\"]\n }\n }\n });\n shape2 = defineChain({\n id: 360,\n name: \"Shape\",\n network: \"Shape\",\n nativeCurrency: { name: \"Ether\", symbol: \"ETH\", decimals: 18 },\n rpcUrls: {\n default: {\n http: [\"https://shape-mainnet.g.alchemy.com/v2\"]\n },\n public: {\n http: [\"https://shape-mainnet.g.alchemy.com/v2\"]\n },\n alchemy: {\n http: [\"https://shape-mainnet.g.alchemy.com/v2\"]\n }\n }\n });\n unichainMainnet2 = defineChain({\n id: 130,\n name: \"Unichain Mainnet\",\n network: \"Unichain Mainnet\",\n nativeCurrency: { name: \"Ether\", symbol: \"ETH\", decimals: 18 },\n rpcUrls: {\n default: {\n http: [\"https://unichain-mainnet.g.alchemy.com/v2\"]\n },\n public: {\n http: [\"https://unichain-mainnet.g.alchemy.com/v2\"]\n },\n alchemy: {\n http: [\"https://unichain-mainnet.g.alchemy.com/v2\"]\n }\n }\n });\n unichainSepolia2 = defineChain({\n id: 1301,\n name: \"Unichain Sepolia\",\n network: \"Unichain Sepolia\",\n nativeCurrency: { name: \"Ether\", symbol: \"ETH\", decimals: 18 },\n rpcUrls: {\n default: {\n http: [\"https://unichain-sepolia.g.alchemy.com/v2\"]\n },\n public: {\n http: [\"https://unichain-sepolia.g.alchemy.com/v2\"]\n },\n alchemy: {\n http: [\"https://unichain-sepolia.g.alchemy.com/v2\"]\n }\n }\n });\n soneiumMinato2 = defineChain({\n id: 1946,\n name: \"Soneium Minato\",\n network: \"Soneium Minato\",\n nativeCurrency: { name: \"Ether\", symbol: \"ETH\", decimals: 18 },\n rpcUrls: {\n default: {\n http: [\"https://soneium-minato.g.alchemy.com/v2\"]\n },\n public: {\n http: [\"https://soneium-minato.g.alchemy.com/v2\"]\n },\n alchemy: {\n http: [\"https://soneium-minato.g.alchemy.com/v2\"]\n }\n }\n });\n soneiumMainnet2 = defineChain({\n id: 1868,\n name: \"Soneium Mainnet\",\n network: \"Soneium Mainnet\",\n nativeCurrency: { name: \"Ether\", symbol: \"ETH\", decimals: 18 },\n rpcUrls: {\n default: {\n http: [\"https://soneium-mainnet.g.alchemy.com/v2\"]\n },\n public: {\n http: [\"https://soneium-mainnet.g.alchemy.com/v2\"]\n },\n alchemy: {\n http: [\"https://soneium-mainnet.g.alchemy.com/v2\"]\n }\n }\n });\n opbnbTestnet2 = defineChain({\n id: 5611,\n name: \"OPBNB Testnet\",\n network: \"OPBNB Testnet\",\n nativeCurrency: { name: \"BNB\", symbol: \"BNB\", decimals: 18 },\n rpcUrls: {\n default: {\n http: [\"https://opbnb-testnet.g.alchemy.com/v2\"]\n },\n public: {\n http: [\"https://opbnb-testnet.g.alchemy.com/v2\"]\n },\n alchemy: {\n http: [\"https://opbnb-testnet.g.alchemy.com/v2\"]\n }\n }\n });\n opbnbMainnet2 = defineChain({\n id: 204,\n name: \"OPBNB Mainnet\",\n network: \"OPBNB Mainnet\",\n nativeCurrency: { name: \"BNB\", symbol: \"BNB\", decimals: 18 },\n rpcUrls: {\n default: {\n http: [\"https://opbnb-mainnet.g.alchemy.com/v2\"]\n },\n public: {\n http: [\"https://opbnb-mainnet.g.alchemy.com/v2\"]\n },\n alchemy: {\n http: [\"https://opbnb-mainnet.g.alchemy.com/v2\"]\n }\n }\n });\n beraChainBartio2 = defineChain({\n id: 80084,\n name: \"BeraChain Bartio\",\n network: \"BeraChain Bartio\",\n nativeCurrency: { name: \"Bera\", symbol: \"BERA\", decimals: 18 },\n rpcUrls: {\n default: {\n http: [\"https://berachain-bartio.g.alchemy.com/v2\"]\n },\n public: {\n http: [\"https://berachain-bartio.g.alchemy.com/v2\"]\n },\n alchemy: {\n http: [\"https://berachain-bartio.g.alchemy.com/v2\"]\n }\n }\n });\n inkMainnet2 = defineChain({\n id: 57073,\n name: \"Ink Mainnet\",\n network: \"Ink Mainnet\",\n nativeCurrency: { name: \"Ether\", symbol: \"ETH\", decimals: 18 },\n rpcUrls: {\n default: {\n http: [\"https://ink-mainnet.g.alchemy.com/v2\"]\n },\n public: {\n http: [\"https://ink-mainnet.g.alchemy.com/v2\"]\n },\n alchemy: {\n http: [\"https://ink-mainnet.g.alchemy.com/v2\"]\n }\n }\n });\n inkSepolia2 = defineChain({\n id: 763373,\n name: \"Ink Sepolia\",\n network: \"Ink Sepolia\",\n nativeCurrency: { name: \"Ether\", symbol: \"ETH\", decimals: 18 },\n rpcUrls: {\n default: {\n http: [\"https://ink-sepolia.g.alchemy.com/v2\"]\n },\n public: {\n http: [\"https://ink-sepolia.g.alchemy.com/v2\"]\n },\n alchemy: {\n http: [\"https://ink-sepolia.g.alchemy.com/v2\"]\n }\n }\n });\n arbitrumNova3 = {\n ...arbitrumNova,\n rpcUrls: {\n ...arbitrumNova.rpcUrls\n }\n };\n monadTestnet2 = defineChain({\n id: 10143,\n name: \"Monad Testnet\",\n nativeCurrency: { name: \"Monad\", symbol: \"MON\", decimals: 18 },\n rpcUrls: {\n default: {\n http: [\"https://monad-testnet.g.alchemy.com/v2\"]\n },\n public: {\n http: [\"https://monad-testnet.g.alchemy.com/v2\"]\n },\n alchemy: {\n http: [\"https://monad-testnet.g.alchemy.com/v2\"]\n }\n },\n blockExplorers: {\n default: {\n name: \"Block Explorer\",\n url: \"https://testnet.monadexplorer.com\"\n }\n },\n testnet: true\n });\n mekong2 = defineChain({\n id: 7078815900,\n name: \"Mekong Pectra Devnet\",\n nativeCurrency: { name: \"eth\", symbol: \"eth\", decimals: 18 },\n rpcUrls: {\n default: {\n http: [\"https://rpc.mekong.ethpandaops.io\"]\n }\n },\n blockExplorers: {\n default: {\n name: \"Block Explorer\",\n url: \"https://explorer.mekong.ethpandaops.io\"\n }\n },\n testnet: true\n });\n openlootSepolia2 = defineChain({\n id: 905905,\n name: \"Openloot Sepolia\",\n nativeCurrency: { name: \"Openloot\", symbol: \"OL\", decimals: 18 },\n rpcUrls: {\n default: {\n http: [\"https://openloot-sepolia.g.alchemy.com/v2\"]\n },\n public: {\n http: [\"https://openloot-sepolia.g.alchemy.com/v2\"]\n },\n alchemy: {\n http: [\"https://openloot-sepolia.g.alchemy.com/v2\"]\n }\n },\n blockExplorers: {\n default: {\n name: \"Block Explorer\",\n url: \"https://openloot-sepolia.explorer.alchemy.com\"\n }\n },\n testnet: true\n });\n gensynTestnet2 = defineChain({\n id: 685685,\n name: \"Gensyn Testnet\",\n nativeCurrency: { name: \"eth\", symbol: \"eth\", decimals: 18 },\n rpcUrls: {\n default: {\n http: [\"https://gensyn-testnet.g.alchemy.com/v2\"]\n },\n public: {\n http: [\"https://gensyn-testnet.g.alchemy.com/v2\"]\n },\n alchemy: {\n http: [\"https://gensyn-testnet.g.alchemy.com/v2\"]\n }\n },\n blockExplorers: {\n default: {\n name: \"Block Explorer\",\n url: \"https://gensyn-testnet.explorer.alchemy.com\"\n }\n },\n testnet: true\n });\n riseTestnet2 = defineChain({\n id: 11155931,\n name: \"Rise Testnet\",\n nativeCurrency: { name: \"eth\", symbol: \"eth\", decimals: 18 },\n rpcUrls: {\n default: {\n http: [\"https://rise-testnet.g.alchemy.com/v2\"]\n },\n public: {\n http: [\"https://rise-testnet.g.alchemy.com/v2\"]\n },\n alchemy: {\n http: [\"https://rise-testnet.g.alchemy.com/v2\"]\n }\n },\n blockExplorers: {\n default: {\n name: \"Block Explorer\",\n url: \"https://explorer.testnet.riselabs.xyz\"\n }\n },\n testnet: true\n });\n storyMainnet2 = defineChain({\n id: 1514,\n name: \"Story Mainnet\",\n nativeCurrency: { name: \"IP\", symbol: \"IP\", decimals: 18 },\n rpcUrls: {\n default: {\n http: [\"https://story-mainnet.g.alchemy.com/v2\"]\n },\n public: {\n http: [\"https://story-mainnet.g.alchemy.com/v2\"]\n },\n alchemy: {\n http: [\"https://story-mainnet.g.alchemy.com/v2\"]\n }\n },\n blockExplorers: {\n default: {\n name: \"Block Explorer\",\n url: \"https://www.storyscan.io\"\n }\n },\n testnet: false\n });\n storyAeneid2 = defineChain({\n id: 1315,\n name: \"Story Aeneid\",\n nativeCurrency: { name: \"IP\", symbol: \"IP\", decimals: 18 },\n rpcUrls: {\n default: {\n http: [\"https://story-aeneid.g.alchemy.com/v2\"]\n },\n public: {\n http: [\"https://story-aeneid.g.alchemy.com/v2\"]\n },\n alchemy: {\n http: [\"https://story-aeneid.g.alchemy.com/v2\"]\n }\n },\n blockExplorers: {\n default: {\n name: \"Block Explorer\",\n url: \"https://aeneid.storyscan.io\"\n }\n },\n testnet: true\n });\n celoAlfajores2 = defineChain({\n id: 44787,\n name: \"Celo Alfajores\",\n nativeCurrency: { name: \"Celo native asset\", symbol: \"CELO\", decimals: 18 },\n rpcUrls: {\n default: {\n http: [\"https://celo-alfajores.g.alchemy.com/v2\"]\n },\n public: {\n http: [\"https://celo-alfajores.g.alchemy.com/v2\"]\n },\n alchemy: {\n http: [\"https://celo-alfajores.g.alchemy.com/v2\"]\n }\n },\n blockExplorers: {\n default: {\n name: \"Block Explorer\",\n url: \"https://celo-alfajores.blockscout.com/\"\n }\n },\n testnet: true\n });\n celoMainnet2 = defineChain({\n id: 42220,\n name: \"Celo Mainnet\",\n nativeCurrency: { name: \"Celo native asset\", symbol: \"CELO\", decimals: 18 },\n rpcUrls: {\n default: {\n http: [\"https://celo-mainnet.g.alchemy.com/v2\"]\n },\n public: {\n http: [\"https://celo-mainnet.g.alchemy.com/v2\"]\n },\n alchemy: {\n http: [\"https://celo-mainnet.g.alchemy.com/v2\"]\n }\n },\n blockExplorers: {\n default: {\n name: \"Block Explorer\",\n url: \"https://celo.blockscout.com/\"\n }\n },\n testnet: false\n });\n teaSepolia2 = defineChain({\n id: 10218,\n name: \"Tea Sepolia\",\n nativeCurrency: { name: \"TEA\", symbol: \"TEA\", decimals: 18 },\n rpcUrls: {\n default: {\n http: [\"https://tea-sepolia.g.alchemy.com/v2\"]\n },\n public: {\n http: [\"https://tea-sepolia.g.alchemy.com/v2\"]\n },\n alchemy: {\n http: [\"https://tea-sepolia.g.alchemy.com/v2\"]\n }\n },\n blockExplorers: {\n default: {\n name: \"Block Explorer\",\n url: \"https://sepolia.tea.xyz/\"\n }\n },\n testnet: true\n });\n bobaSepolia2 = defineChain({\n id: 28882,\n name: \"Boba Sepolia\",\n nativeCurrency: { name: \"eth\", symbol: \"eth\", decimals: 18 },\n rpcUrls: {\n default: {\n http: [\"https://boba-sepolia.g.alchemy.com/v2\"]\n },\n public: {\n http: [\"https://boba-sepolia.g.alchemy.com/v2\"]\n },\n alchemy: {\n http: [\"https://boba-sepolia.g.alchemy.com/v2\"]\n }\n },\n blockExplorers: {\n default: {\n name: \"Block Explorer\",\n url: \"https://sepolia.testnet.bobascan.com/\"\n }\n },\n testnet: true\n });\n bobaMainnet2 = defineChain({\n id: 288,\n name: \"Boba Mainnet\",\n nativeCurrency: { name: \"eth\", symbol: \"eth\", decimals: 18 },\n rpcUrls: {\n default: {\n http: [\"https://boba-mainnet.g.alchemy.com/v2\"]\n },\n public: {\n http: [\"https://boba-mainnet.g.alchemy.com/v2\"]\n },\n alchemy: {\n http: [\"https://boba-mainnet.g.alchemy.com/v2\"]\n }\n },\n blockExplorers: {\n default: {\n name: \"Block Explorer\",\n url: \"https://bobascan.com/\"\n }\n },\n testnet: false\n });\n }\n });\n\n // ../../../node_modules/.pnpm/@account-kit+infra@4.62.0_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_viem@_d0fd590584a0b3dca5b842750d667454/node_modules/@account-kit/infra/dist/esm/metrics.js\n var InfraLogger2;\n var init_metrics2 = __esm({\n \"../../../node_modules/.pnpm/@account-kit+infra@4.62.0_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_viem@_d0fd590584a0b3dca5b842750d667454/node_modules/@account-kit/infra/dist/esm/metrics.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_esm7();\n init_version7();\n InfraLogger2 = createLogger({\n package: \"@account-kit/infra\",\n version: VERSION3\n });\n }\n });\n\n // ../../../node_modules/.pnpm/@account-kit+infra@4.62.0_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_viem@_d0fd590584a0b3dca5b842750d667454/node_modules/@account-kit/infra/dist/esm/client/decorators/smartAccount.js\n function logSendUoEvent2(chainId, account) {\n const signerType = isSmartAccountWithSigner(account) ? account.getSigner().signerType : \"unknown\";\n InfraLogger2.trackEvent({\n name: \"client_send_uo\",\n data: {\n chainId,\n signerType,\n entryPoint: account.getEntryPoint().address\n }\n });\n }\n var alchemyActions2;\n var init_smartAccount2 = __esm({\n \"../../../node_modules/.pnpm/@account-kit+infra@4.62.0_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_viem@_d0fd590584a0b3dca5b842750d667454/node_modules/@account-kit/infra/dist/esm/client/decorators/smartAccount.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_esm6();\n init_simulateUserOperationChanges2();\n init_metrics2();\n alchemyActions2 = (client_) => ({\n simulateUserOperation: async (args) => {\n const client = clientHeaderTrack(client_, \"simulateUserOperation\");\n return simulateUserOperationChanges2(client, args);\n },\n async sendUserOperation(args) {\n const client = clientHeaderTrack(client_, \"infraSendUserOperation\");\n const { account = client.account } = args;\n const result = sendUserOperation(client, args);\n logSendUoEvent2(client.chain.id, account);\n return result;\n },\n sendTransaction: async (args, overrides, context2) => {\n const client = clientHeaderTrack(client_, \"sendTransaction\");\n const { account = client.account } = args;\n const result = await sendTransaction2(client, args, overrides, context2);\n logSendUoEvent2(client.chain.id, account);\n return result;\n },\n async sendTransactions(args) {\n const client = clientHeaderTrack(client_, \"sendTransactions\");\n const { account = client.account } = args;\n const result = sendTransactions(client, args);\n logSendUoEvent2(client.chain.id, account);\n return result;\n }\n });\n }\n });\n\n // ../../../node_modules/.pnpm/@account-kit+infra@4.62.0_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_viem@_d0fd590584a0b3dca5b842750d667454/node_modules/@account-kit/infra/dist/esm/defaults.js\n var getDefaultUserOperationFeeOptions3;\n var init_defaults3 = __esm({\n \"../../../node_modules/.pnpm/@account-kit+infra@4.62.0_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_viem@_d0fd590584a0b3dca5b842750d667454/node_modules/@account-kit/infra/dist/esm/defaults.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_chains3();\n getDefaultUserOperationFeeOptions3 = (chain2) => {\n const feeOptions = {\n maxFeePerGas: { multiplier: 1.5 },\n maxPriorityFeePerGas: { multiplier: 1.05 }\n };\n if ((/* @__PURE__ */ new Set([\n arbitrum3.id,\n arbitrumGoerli3.id,\n arbitrumSepolia3.id,\n optimism3.id,\n optimismGoerli3.id,\n optimismSepolia3.id\n ])).has(chain2.id)) {\n feeOptions.preVerificationGas = { multiplier: 1.05 };\n }\n return feeOptions;\n };\n }\n });\n\n // ../../../node_modules/.pnpm/@account-kit+infra@4.62.0_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_viem@_d0fd590584a0b3dca5b842750d667454/node_modules/@account-kit/infra/dist/esm/middleware/feeEstimator.js\n var alchemyFeeEstimator2;\n var init_feeEstimator3 = __esm({\n \"../../../node_modules/.pnpm/@account-kit+infra@4.62.0_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_viem@_d0fd590584a0b3dca5b842750d667454/node_modules/@account-kit/infra/dist/esm/middleware/feeEstimator.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_esm6();\n alchemyFeeEstimator2 = (transport) => async (struct, { overrides, feeOptions, client: client_ }) => {\n const client = clientHeaderTrack(client_, \"alchemyFeeEstimator\");\n const transport_ = transport({ chain: client.chain });\n let [block, maxPriorityFeePerGasEstimate] = await Promise.all([\n client.getBlock({ blockTag: \"latest\" }),\n // it is a fair assumption that if someone is using this Alchemy Middleware, then they are using Alchemy RPC\n transport_.request({\n method: \"rundler_maxPriorityFeePerGas\",\n params: []\n })\n ]);\n const baseFeePerGas = block.baseFeePerGas;\n if (baseFeePerGas == null) {\n throw new Error(\"baseFeePerGas is null\");\n }\n const maxPriorityFeePerGas = applyUserOpOverrideOrFeeOption(maxPriorityFeePerGasEstimate, overrides?.maxPriorityFeePerGas, feeOptions?.maxPriorityFeePerGas);\n const maxFeePerGas = applyUserOpOverrideOrFeeOption(bigIntMultiply(baseFeePerGas, 1.5) + BigInt(maxPriorityFeePerGas), overrides?.maxFeePerGas, feeOptions?.maxFeePerGas);\n return {\n ...struct,\n maxPriorityFeePerGas,\n maxFeePerGas\n };\n };\n }\n });\n\n // ../../../node_modules/.pnpm/@account-kit+infra@4.62.0_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_viem@_d0fd590584a0b3dca5b842750d667454/node_modules/@account-kit/infra/dist/esm/gas-manager.js\n var AlchemyPaymasterAddressV06Unify2, AlchemyPaymasterAddressV07Unify2, AlchemyPaymasterAddressV42, AlchemyPaymasterAddressV32, AlchemyPaymasterAddressV22, ArbSepoliaPaymasterAddress2, AlchemyPaymasterAddressV12, AlchemyPaymasterAddressV07V22, AlchemyPaymasterAddressV07V12, getAlchemyPaymasterAddress2, PermitTypes2, ERC20Abis2, EIP7597Abis2;\n var init_gas_manager2 = __esm({\n \"../../../node_modules/.pnpm/@account-kit+infra@4.62.0_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_viem@_d0fd590584a0b3dca5b842750d667454/node_modules/@account-kit/infra/dist/esm/gas-manager.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_chains3();\n AlchemyPaymasterAddressV06Unify2 = \"0x0000000000ce04e2359130e7d0204A5249958921\";\n AlchemyPaymasterAddressV07Unify2 = \"0x00000000000667F27D4DB42334ec11a25db7EBb4\";\n AlchemyPaymasterAddressV42 = \"0xEaf0Cde110a5d503f2dD69B3a49E031e29b3F9D2\";\n AlchemyPaymasterAddressV32 = \"0x4f84a207A80c39E9e8BaE717c1F25bA7AD1fB08F\";\n AlchemyPaymasterAddressV22 = \"0x4Fd9098af9ddcB41DA48A1d78F91F1398965addc\";\n ArbSepoliaPaymasterAddress2 = \"0x0804Afe6EEFb73ce7F93CD0d5e7079a5a8068592\";\n AlchemyPaymasterAddressV12 = \"0xc03aac639bb21233e0139381970328db8bceeb67\";\n AlchemyPaymasterAddressV07V22 = \"0x2cc0c7981D846b9F2a16276556f6e8cb52BfB633\";\n AlchemyPaymasterAddressV07V12 = \"0xEF725Aa22d43Ea69FB22bE2EBe6ECa205a6BCf5B\";\n getAlchemyPaymasterAddress2 = (chain2, version6) => {\n switch (version6) {\n case \"0.6.0\":\n switch (chain2.id) {\n case fraxtalSepolia2.id:\n case worldChainSepolia2.id:\n case shapeSepolia2.id:\n case unichainSepolia2.id:\n case opbnbTestnet2.id:\n case inkSepolia2.id:\n case monadTestnet2.id:\n case openlootSepolia2.id:\n case gensynTestnet2.id:\n case riseTestnet2.id:\n case storyAeneid2.id:\n case teaSepolia2.id:\n case arbitrumGoerli3.id:\n case goerli3.id:\n case optimismGoerli3.id:\n case baseGoerli3.id:\n case polygonMumbai3.id:\n case worldChain2.id:\n case shape2.id:\n case unichainMainnet2.id:\n case soneiumMinato2.id:\n case soneiumMainnet2.id:\n case opbnbMainnet2.id:\n case beraChainBartio2.id:\n case inkMainnet2.id:\n case arbitrumNova3.id:\n case storyMainnet2.id:\n case celoAlfajores2.id:\n case celoMainnet2.id:\n return AlchemyPaymasterAddressV42;\n case polygonAmoy3.id:\n case optimismSepolia3.id:\n case baseSepolia3.id:\n case zora3.id:\n case zoraSepolia3.id:\n case fraxtal3.id:\n return AlchemyPaymasterAddressV32;\n case mainnet3.id:\n case arbitrum3.id:\n case optimism3.id:\n case polygon3.id:\n case base3.id:\n return AlchemyPaymasterAddressV22;\n case arbitrumSepolia3.id:\n return ArbSepoliaPaymasterAddress2;\n case sepolia3.id:\n return AlchemyPaymasterAddressV12;\n default:\n return AlchemyPaymasterAddressV06Unify2;\n }\n case \"0.7.0\":\n switch (chain2.id) {\n case arbitrumNova3.id:\n case celoAlfajores2.id:\n case celoMainnet2.id:\n case gensynTestnet2.id:\n case inkMainnet2.id:\n case inkSepolia2.id:\n case monadTestnet2.id:\n case opbnbMainnet2.id:\n case opbnbTestnet2.id:\n case openlootSepolia2.id:\n case riseTestnet2.id:\n case shape2.id:\n case shapeSepolia2.id:\n case soneiumMainnet2.id:\n case soneiumMinato2.id:\n case storyAeneid2.id:\n case storyMainnet2.id:\n case teaSepolia2.id:\n case unichainMainnet2.id:\n case unichainSepolia2.id:\n case worldChain2.id:\n case worldChainSepolia2.id:\n return AlchemyPaymasterAddressV07V12;\n case arbitrum3.id:\n case arbitrumGoerli3.id:\n case arbitrumSepolia3.id:\n case base3.id:\n case baseGoerli3.id:\n case baseSepolia3.id:\n case beraChainBartio2.id:\n case fraxtal3.id:\n case fraxtalSepolia2.id:\n case goerli3.id:\n case mainnet3.id:\n case optimism3.id:\n case optimismGoerli3.id:\n case optimismSepolia3.id:\n case polygon3.id:\n case polygonAmoy3.id:\n case polygonMumbai3.id:\n case sepolia3.id:\n case zora3.id:\n case zoraSepolia3.id:\n return AlchemyPaymasterAddressV07V22;\n default:\n return AlchemyPaymasterAddressV07Unify2;\n }\n default:\n throw new Error(`Unsupported EntryPointVersion: ${version6}`);\n }\n };\n PermitTypes2 = {\n EIP712Domain: [\n { name: \"name\", type: \"string\" },\n { name: \"version\", type: \"string\" },\n { name: \"chainId\", type: \"uint256\" },\n { name: \"verifyingContract\", type: \"address\" }\n ],\n Permit: [\n { name: \"owner\", type: \"address\" },\n { name: \"spender\", type: \"address\" },\n { name: \"value\", type: \"uint256\" },\n { name: \"nonce\", type: \"uint256\" },\n { name: \"deadline\", type: \"uint256\" }\n ]\n };\n ERC20Abis2 = [\n \"function decimals() public view returns (uint8)\",\n \"function balanceOf(address owner) external view returns (uint256)\",\n \"function allowance(address owner, address spender) external view returns (uint256)\",\n \"function approve(address spender, uint256 amount) external returns (bool)\"\n ];\n EIP7597Abis2 = [\n \"function nonces(address owner) external view returns (uint)\"\n ];\n }\n });\n\n // ../../../node_modules/.pnpm/@account-kit+infra@4.62.0_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_viem@_d0fd590584a0b3dca5b842750d667454/node_modules/@account-kit/infra/dist/esm/errors/base.js\n var BaseError6;\n var init_base6 = __esm({\n \"../../../node_modules/.pnpm/@account-kit+infra@4.62.0_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_viem@_d0fd590584a0b3dca5b842750d667454/node_modules/@account-kit/infra/dist/esm/errors/base.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_esm6();\n init_version7();\n BaseError6 = class extends BaseError4 {\n constructor() {\n super(...arguments);\n Object.defineProperty(this, \"version\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: VERSION3\n });\n }\n };\n }\n });\n\n // ../../../node_modules/.pnpm/@account-kit+infra@4.62.0_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_viem@_d0fd590584a0b3dca5b842750d667454/node_modules/@account-kit/infra/dist/esm/errors/invalidSignedPermit.js\n var InvalidSignedPermit2;\n var init_invalidSignedPermit2 = __esm({\n \"../../../node_modules/.pnpm/@account-kit+infra@4.62.0_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_viem@_d0fd590584a0b3dca5b842750d667454/node_modules/@account-kit/infra/dist/esm/errors/invalidSignedPermit.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_base6();\n InvalidSignedPermit2 = class extends BaseError6 {\n constructor(reason) {\n super([\"Invalid signed permit\"].join(\"\\n\"), {\n details: [reason, \"Please provide a valid signed permit\"].join(\"\\n\")\n });\n Object.defineProperty(this, \"name\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: \"InvalidSignedPermit\"\n });\n }\n };\n }\n });\n\n // ../../../node_modules/.pnpm/@account-kit+infra@4.62.0_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_viem@_d0fd590584a0b3dca5b842750d667454/node_modules/@account-kit/infra/dist/esm/middleware/gasManager.js\n function alchemyGasManagerMiddleware2(policyId, policyToken) {\n const buildContext = async (args) => {\n const context2 = { policyId };\n const { account, client } = args;\n if (!client.chain) {\n throw new ChainNotFoundError2();\n }\n if (policyToken !== void 0) {\n context2.erc20Context = {\n tokenAddress: policyToken.address,\n maxTokenAmount: policyToken.maxTokenAmount\n };\n if (policyToken.permit !== void 0) {\n const permit = await generateSignedPermit2(client, account, policyToken);\n if (permit !== void 0) {\n context2.erc20Context.permit = permit;\n }\n } else if (args.context !== void 0) {\n context2.erc20Context.permit = extractSignedPermitFromContext2(args.context);\n }\n }\n return context2;\n };\n return {\n dummyPaymasterAndData: async (uo, args) => {\n const context2 = await buildContext(args);\n const baseMiddleware = erc7677Middleware({ context: context2 });\n return baseMiddleware.dummyPaymasterAndData(uo, args);\n },\n paymasterAndData: async (uo, args) => {\n const context2 = await buildContext(args);\n const baseMiddleware = erc7677Middleware({ context: context2 });\n return baseMiddleware.paymasterAndData(uo, args);\n }\n };\n }\n function alchemyGasAndPaymasterAndDataMiddleware2(params) {\n const { policyId, policyToken, transport, gasEstimatorOverride, feeEstimatorOverride } = params;\n return {\n dummyPaymasterAndData: async (uo, args) => {\n if (\n // No reason to generate dummy data if we are bypassing the paymaster.\n bypassPaymasterAndData(args.overrides) || // When using alchemy_requestGasAndPaymasterAndData, there is generally no reason to generate dummy\n // data. However, if the gas/feeEstimator is overriden, then this option should be enabled.\n !(gasEstimatorOverride || feeEstimatorOverride)\n ) {\n return noopMiddleware(uo, args);\n }\n return alchemyGasManagerMiddleware2(policyId, policyToken).dummyPaymasterAndData(uo, args);\n },\n feeEstimator: (uo, args) => {\n return feeEstimatorOverride ? feeEstimatorOverride(uo, args) : bypassPaymasterAndData(args.overrides) ? alchemyFeeEstimator2(transport)(uo, args) : noopMiddleware(uo, args);\n },\n gasEstimator: (uo, args) => {\n return gasEstimatorOverride ? gasEstimatorOverride(uo, args) : bypassPaymasterAndData(args.overrides) ? defaultGasEstimator(args.client)(uo, args) : noopMiddleware(uo, args);\n },\n paymasterAndData: async (uo, { account, client: client_, feeOptions, overrides: overrides_, context: uoContext }) => {\n const client = clientHeaderTrack(client_, \"alchemyFeeEstimator\");\n if (!client.chain) {\n throw new ChainNotFoundError2();\n }\n const userOp = deepHexlify(await resolveProperties(uo));\n const overrides = filterUndefined({\n maxFeePerGas: overrideField2(\"maxFeePerGas\", overrides_, feeOptions, userOp),\n maxPriorityFeePerGas: overrideField2(\"maxPriorityFeePerGas\", overrides_, feeOptions, userOp),\n callGasLimit: overrideField2(\"callGasLimit\", overrides_, feeOptions, userOp),\n verificationGasLimit: overrideField2(\"verificationGasLimit\", overrides_, feeOptions, userOp),\n preVerificationGas: overrideField2(\"preVerificationGas\", overrides_, feeOptions, userOp),\n ...account.getEntryPoint().version === \"0.7.0\" ? {\n paymasterVerificationGasLimit: overrideField2(\"paymasterVerificationGasLimit\", overrides_, feeOptions, userOp),\n paymasterPostOpGasLimit: overrideField2(\"paymasterPostOpGasLimit\", overrides_, feeOptions, userOp)\n } : {}\n });\n let erc20Context = void 0;\n if (policyToken !== void 0) {\n erc20Context = {\n tokenAddress: policyToken.address,\n maxTokenAmount: policyToken.maxTokenAmount\n };\n if (policyToken.permit !== void 0) {\n const permit = await generateSignedPermit2(client, account, policyToken);\n if (permit !== void 0) {\n erc20Context.permit = permit;\n }\n } else if (uoContext !== void 0) {\n erc20Context.permit = extractSignedPermitFromContext2(uoContext);\n }\n }\n const result = await client.request({\n method: \"alchemy_requestGasAndPaymasterAndData\",\n params: [\n {\n policyId,\n entryPoint: account.getEntryPoint().address,\n userOperation: userOp,\n dummySignature: await account.getDummySignature(),\n overrides,\n ...erc20Context ? {\n erc20Context\n } : {}\n }\n ]\n });\n return {\n ...uo,\n ...result\n };\n }\n };\n }\n function extractSignedPermitFromContext2(context2) {\n if (context2.signedPermit === void 0) {\n return void 0;\n }\n if (typeof context2.signedPermit !== \"object\") {\n throw new InvalidSignedPermit2(\"signedPermit is not an object\");\n }\n if (typeof context2.signedPermit.value !== \"bigint\") {\n throw new InvalidSignedPermit2(\"signedPermit.value is not a bigint\");\n }\n if (typeof context2.signedPermit.deadline !== \"bigint\") {\n throw new InvalidSignedPermit2(\"signedPermit.deadline is not a bigint\");\n }\n if (!isHex(context2.signedPermit.signature)) {\n throw new InvalidSignedPermit2(\"signedPermit.signature is not a hex string\");\n }\n return encodeSignedPermit2(context2.signedPermit.value, context2.signedPermit.deadline, context2.signedPermit.signature);\n }\n function encodeSignedPermit2(value, deadline, signedPermit) {\n return encodeAbiParameters([{ type: \"uint256\" }, { type: \"uint256\" }, { type: \"bytes\" }], [value, deadline, signedPermit]);\n }\n var overrideField2, generateSignedPermit2;\n var init_gasManager2 = __esm({\n \"../../../node_modules/.pnpm/@account-kit+infra@4.62.0_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_viem@_d0fd590584a0b3dca5b842750d667454/node_modules/@account-kit/infra/dist/esm/middleware/gasManager.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_esm6();\n init_esm();\n init_feeEstimator3();\n init_gas_manager2();\n init_invalidSignedPermit2();\n overrideField2 = (field, overrides, feeOptions, userOperation) => {\n let _field = field;\n if (overrides?.[_field] != null) {\n if (isBigNumberish(overrides[_field])) {\n return deepHexlify(overrides[_field]);\n } else {\n return {\n multiplier: Number(overrides[_field].multiplier)\n };\n }\n }\n if (isMultiplier(feeOptions?.[field])) {\n return {\n multiplier: Number(feeOptions[field].multiplier)\n };\n }\n const userOpField = userOperation[field];\n if (isHex(userOpField) && fromHex(userOpField, \"bigint\") > 0n) {\n return userOpField;\n }\n return void 0;\n };\n generateSignedPermit2 = async (client, account, policyToken) => {\n if (!client.chain) {\n throw new ChainNotFoundError2();\n }\n if (!policyToken.permit) {\n throw new Error(\"permit is missing\");\n }\n if (!policyToken.permit?.erc20Name || !policyToken.permit?.version) {\n throw new Error(\"erc20Name or version is missing\");\n }\n const paymasterAddress = policyToken.permit.paymasterAddress ?? getAlchemyPaymasterAddress2(client.chain, account.getEntryPoint().version);\n if (paymasterAddress === void 0 || paymasterAddress === \"0x\") {\n throw new Error(\"no paymaster contract address available\");\n }\n let allowanceFuture = client.call({\n to: policyToken.address,\n data: encodeFunctionData({\n abi: parseAbi(ERC20Abis2),\n functionName: \"allowance\",\n args: [account.address, paymasterAddress]\n })\n });\n let nonceFuture = client.call({\n to: policyToken.address,\n data: encodeFunctionData({\n abi: parseAbi(EIP7597Abis2),\n functionName: \"nonces\",\n args: [account.address]\n })\n });\n const [allowanceResponse, nonceResponse] = await Promise.all([\n allowanceFuture,\n nonceFuture\n ]);\n if (!allowanceResponse.data) {\n throw new Error(\"No allowance returned from erc20 contract call\");\n }\n if (!nonceResponse.data) {\n throw new Error(\"No nonces returned from erc20 contract call\");\n }\n const permitLimit = policyToken.permit.autoPermitApproveTo;\n const currentAllowance = BigInt(allowanceResponse.data);\n if (currentAllowance > policyToken.permit.autoPermitBelow) {\n return void 0;\n }\n const nonce = BigInt(nonceResponse.data);\n const deadline = BigInt(Math.floor(Date.now() / 1e3) + 60 * 10);\n const typedPermitData = {\n types: PermitTypes2,\n primaryType: \"Permit\",\n domain: {\n name: policyToken.permit.erc20Name ?? \"\",\n version: policyToken.permit.version ?? \"\",\n chainId: BigInt(client.chain.id),\n verifyingContract: policyToken.address\n },\n message: {\n owner: account.address,\n spender: paymasterAddress,\n value: permitLimit,\n nonce,\n deadline\n }\n };\n const signedPermit = await account.signTypedData(typedPermitData);\n return encodeSignedPermit2(permitLimit, deadline, signedPermit);\n };\n }\n });\n\n // ../../../node_modules/.pnpm/@account-kit+infra@4.62.0_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_viem@_d0fd590584a0b3dca5b842750d667454/node_modules/@account-kit/infra/dist/esm/middleware/userOperationSimulator.js\n function alchemyUserOperationSimulator2(transport) {\n return async (struct, { account, client }) => {\n const uoSimResult = await transport({ chain: client.chain }).request({\n method: \"alchemy_simulateUserOperationAssetChanges\",\n params: [\n deepHexlify(await resolveProperties(struct)),\n account.getEntryPoint().address\n ]\n });\n if (uoSimResult.error) {\n throw new Error(uoSimResult.error.message);\n }\n return struct;\n };\n }\n var init_userOperationSimulator2 = __esm({\n \"../../../node_modules/.pnpm/@account-kit+infra@4.62.0_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_viem@_d0fd590584a0b3dca5b842750d667454/node_modules/@account-kit/infra/dist/esm/middleware/userOperationSimulator.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_esm6();\n }\n });\n\n // ../../../node_modules/.pnpm/@account-kit+infra@4.62.0_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_viem@_d0fd590584a0b3dca5b842750d667454/node_modules/@account-kit/infra/dist/esm/client/smartAccountClient.js\n function getSignerTypeHeader2(account) {\n return { \"Alchemy-Aa-Sdk-Signer\": account.getSigner().signerType };\n }\n function createAlchemySmartAccountClient2(config2) {\n if (!config2.chain) {\n throw new ChainNotFoundError2();\n }\n const feeOptions = config2.opts?.feeOptions ?? getDefaultUserOperationFeeOptions3(config2.chain);\n const scaClient = createSmartAccountClient({\n account: config2.account,\n transport: config2.transport,\n chain: config2.chain,\n type: \"AlchemySmartAccountClient\",\n opts: {\n ...config2.opts,\n feeOptions\n },\n feeEstimator: config2.feeEstimator ?? alchemyFeeEstimator2(config2.transport),\n gasEstimator: config2.gasEstimator,\n customMiddleware: async (struct, args) => {\n if (isSmartAccountWithSigner(args.account)) {\n config2.transport.updateHeaders(getSignerTypeHeader2(args.account));\n }\n return config2.customMiddleware ? config2.customMiddleware(struct, args) : struct;\n },\n ...config2.policyId ? alchemyGasAndPaymasterAndDataMiddleware2({\n policyId: config2.policyId,\n policyToken: config2.policyToken,\n transport: config2.transport,\n gasEstimatorOverride: config2.gasEstimator,\n feeEstimatorOverride: config2.feeEstimator\n }) : {},\n userOperationSimulator: config2.useSimulation ? alchemyUserOperationSimulator2(config2.transport) : void 0,\n signUserOperation: config2.signUserOperation,\n addBreadCrumb(breadcrumb) {\n const oldConfig = config2.transport.config;\n const dynamicFetchOptions = config2.transport.dynamicFetchOptions;\n const newTransport = alchemy2({ ...oldConfig });\n newTransport.updateHeaders(headersUpdate2(breadcrumb)(convertHeadersToObject2(dynamicFetchOptions?.headers)));\n return createAlchemySmartAccountClient2({\n ...config2,\n transport: newTransport\n });\n }\n }).extend(alchemyActions2).extend((client_) => ({\n addBreadcrumb(breadcrumb) {\n return clientHeaderTrack(client_, breadcrumb);\n }\n }));\n if (config2.account && isSmartAccountWithSigner(config2.account)) {\n config2.transport.updateHeaders(getSignerTypeHeader2(config2.account));\n }\n return scaClient;\n }\n var init_smartAccountClient4 = __esm({\n \"../../../node_modules/.pnpm/@account-kit+infra@4.62.0_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_viem@_d0fd590584a0b3dca5b842750d667454/node_modules/@account-kit/infra/dist/esm/client/smartAccountClient.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_esm6();\n init_alchemyTransport2();\n init_defaults3();\n init_feeEstimator3();\n init_gasManager2();\n init_userOperationSimulator2();\n init_smartAccount2();\n init_alchemyTrackerHeaders2();\n }\n });\n\n // ../../../node_modules/.pnpm/@account-kit+infra@4.62.0_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_viem@_d0fd590584a0b3dca5b842750d667454/node_modules/@account-kit/infra/dist/esm/exports/index.js\n var init_exports3 = __esm({\n \"../../../node_modules/.pnpm/@account-kit+infra@4.62.0_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_viem@_d0fd590584a0b3dca5b842750d667454/node_modules/@account-kit/infra/dist/esm/exports/index.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_alchemyTransport2();\n init_chains3();\n init_smartAccountClient4();\n init_alchemyTrackerHeaders2();\n }\n });\n\n // ../../../node_modules/.pnpm/@account-kit+smart-contracts@4.62.0_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5._65dee0153d50ca3a2d2c6830319271d9/node_modules/@account-kit/smart-contracts/dist/esm/src/light-account/clients/alchemyClient.js\n async function createLightAccountAlchemyClient({ opts, transport, chain: chain2, ...config2 }) {\n return createLightAccountClient({\n opts,\n transport,\n chain: chain2,\n ...config2\n });\n }\n var init_alchemyClient = __esm({\n \"../../../node_modules/.pnpm/@account-kit+smart-contracts@4.62.0_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5._65dee0153d50ca3a2d2c6830319271d9/node_modules/@account-kit/smart-contracts/dist/esm/src/light-account/clients/alchemyClient.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_src();\n }\n });\n\n // ../../../node_modules/.pnpm/@account-kit+smart-contracts@4.62.0_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5._65dee0153d50ca3a2d2c6830319271d9/node_modules/@account-kit/smart-contracts/dist/esm/src/light-account/decorators/lightAccount.js\n var lightAccountClientActions;\n var init_lightAccount = __esm({\n \"../../../node_modules/.pnpm/@account-kit+smart-contracts@4.62.0_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5._65dee0153d50ca3a2d2c6830319271d9/node_modules/@account-kit/smart-contracts/dist/esm/src/light-account/decorators/lightAccount.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_transferOwnership();\n lightAccountClientActions = (client) => ({\n transferOwnership: async (args) => transferOwnership(client, args)\n });\n }\n });\n\n // ../../../node_modules/.pnpm/@account-kit+smart-contracts@4.62.0_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5._65dee0153d50ca3a2d2c6830319271d9/node_modules/@account-kit/smart-contracts/dist/esm/src/light-account/clients/client.js\n async function createLightAccountClient(params) {\n const { transport, chain: chain2 } = params;\n const lightAccount = await createLightAccount({\n ...params,\n transport,\n chain: chain2\n });\n if (isAlchemyTransport2(transport, chain2)) {\n return createAlchemySmartAccountClient2({\n ...params,\n transport,\n chain: chain2,\n account: lightAccount\n }).extend(lightAccountClientActions);\n }\n return createSmartAccountClient({\n ...params,\n transport,\n chain: chain2,\n account: lightAccount\n }).extend(lightAccountClientActions);\n }\n var init_client2 = __esm({\n \"../../../node_modules/.pnpm/@account-kit+smart-contracts@4.62.0_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5._65dee0153d50ca3a2d2c6830319271d9/node_modules/@account-kit/smart-contracts/dist/esm/src/light-account/clients/client.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_esm6();\n init_src();\n init_lightAccount();\n init_exports3();\n }\n });\n\n // ../../../node_modules/.pnpm/@account-kit+smart-contracts@4.62.0_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5._65dee0153d50ca3a2d2c6830319271d9/node_modules/@account-kit/smart-contracts/dist/esm/src/light-account/clients/multiOwnerAlchemyClient.js\n async function createMultiOwnerLightAccountAlchemyClient({ opts, transport, chain: chain2, ...config2 }) {\n return createMultiOwnerLightAccountClient({\n opts,\n transport,\n chain: chain2,\n ...config2\n });\n }\n var init_multiOwnerAlchemyClient = __esm({\n \"../../../node_modules/.pnpm/@account-kit+smart-contracts@4.62.0_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5._65dee0153d50ca3a2d2c6830319271d9/node_modules/@account-kit/smart-contracts/dist/esm/src/light-account/clients/multiOwnerAlchemyClient.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_src();\n }\n });\n\n // ../../../node_modules/.pnpm/@account-kit+smart-contracts@4.62.0_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5._65dee0153d50ca3a2d2c6830319271d9/node_modules/@account-kit/smart-contracts/dist/esm/src/light-account/abis/MultiOwnerLightAccountAbi.js\n var MultiOwnerLightAccountAbi;\n var init_MultiOwnerLightAccountAbi = __esm({\n \"../../../node_modules/.pnpm/@account-kit+smart-contracts@4.62.0_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5._65dee0153d50ca3a2d2c6830319271d9/node_modules/@account-kit/smart-contracts/dist/esm/src/light-account/abis/MultiOwnerLightAccountAbi.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n MultiOwnerLightAccountAbi = [\n {\n type: \"constructor\",\n inputs: [\n {\n name: \"entryPoint_\",\n type: \"address\",\n internalType: \"contract IEntryPoint\"\n }\n ],\n stateMutability: \"nonpayable\"\n },\n { type: \"receive\", stateMutability: \"payable\" },\n {\n type: \"function\",\n name: \"addDeposit\",\n inputs: [],\n outputs: [],\n stateMutability: \"payable\"\n },\n {\n type: \"function\",\n name: \"eip712Domain\",\n inputs: [],\n outputs: [\n { name: \"fields\", type: \"bytes1\", internalType: \"bytes1\" },\n { name: \"name\", type: \"string\", internalType: \"string\" },\n { name: \"version\", type: \"string\", internalType: \"string\" },\n { name: \"chainId\", type: \"uint256\", internalType: \"uint256\" },\n {\n name: \"verifyingContract\",\n type: \"address\",\n internalType: \"address\"\n },\n { name: \"salt\", type: \"bytes32\", internalType: \"bytes32\" },\n {\n name: \"extensions\",\n type: \"uint256[]\",\n internalType: \"uint256[]\"\n }\n ],\n stateMutability: \"view\"\n },\n {\n type: \"function\",\n name: \"entryPoint\",\n inputs: [],\n outputs: [\n {\n name: \"\",\n type: \"address\",\n internalType: \"contract IEntryPoint\"\n }\n ],\n stateMutability: \"view\"\n },\n {\n type: \"function\",\n name: \"execute\",\n inputs: [\n { name: \"dest\", type: \"address\", internalType: \"address\" },\n { name: \"value\", type: \"uint256\", internalType: \"uint256\" },\n { name: \"func\", type: \"bytes\", internalType: \"bytes\" }\n ],\n outputs: [],\n stateMutability: \"nonpayable\"\n },\n {\n type: \"function\",\n name: \"executeBatch\",\n inputs: [\n { name: \"dest\", type: \"address[]\", internalType: \"address[]\" },\n { name: \"func\", type: \"bytes[]\", internalType: \"bytes[]\" }\n ],\n outputs: [],\n stateMutability: \"nonpayable\"\n },\n {\n type: \"function\",\n name: \"executeBatch\",\n inputs: [\n { name: \"dest\", type: \"address[]\", internalType: \"address[]\" },\n { name: \"value\", type: \"uint256[]\", internalType: \"uint256[]\" },\n { name: \"func\", type: \"bytes[]\", internalType: \"bytes[]\" }\n ],\n outputs: [],\n stateMutability: \"nonpayable\"\n },\n {\n type: \"function\",\n name: \"getDeposit\",\n inputs: [],\n outputs: [{ name: \"\", type: \"uint256\", internalType: \"uint256\" }],\n stateMutability: \"view\"\n },\n {\n type: \"function\",\n name: \"getNonce\",\n inputs: [],\n outputs: [{ name: \"\", type: \"uint256\", internalType: \"uint256\" }],\n stateMutability: \"view\"\n },\n {\n type: \"function\",\n name: \"initialize\",\n inputs: [{ name: \"owners_\", type: \"address[]\", internalType: \"address[]\" }],\n outputs: [],\n stateMutability: \"nonpayable\"\n },\n {\n type: \"function\",\n name: \"isValidSignature\",\n inputs: [\n { name: \"hash\", type: \"bytes32\", internalType: \"bytes32\" },\n { name: \"signature\", type: \"bytes\", internalType: \"bytes\" }\n ],\n outputs: [{ name: \"result\", type: \"bytes4\", internalType: \"bytes4\" }],\n stateMutability: \"view\"\n },\n {\n type: \"function\",\n name: \"onERC1155BatchReceived\",\n inputs: [\n { name: \"\", type: \"address\", internalType: \"address\" },\n { name: \"\", type: \"address\", internalType: \"address\" },\n { name: \"\", type: \"uint256[]\", internalType: \"uint256[]\" },\n { name: \"\", type: \"uint256[]\", internalType: \"uint256[]\" },\n { name: \"\", type: \"bytes\", internalType: \"bytes\" }\n ],\n outputs: [{ name: \"\", type: \"bytes4\", internalType: \"bytes4\" }],\n stateMutability: \"pure\"\n },\n {\n type: \"function\",\n name: \"onERC1155Received\",\n inputs: [\n { name: \"\", type: \"address\", internalType: \"address\" },\n { name: \"\", type: \"address\", internalType: \"address\" },\n { name: \"\", type: \"uint256\", internalType: \"uint256\" },\n { name: \"\", type: \"uint256\", internalType: \"uint256\" },\n { name: \"\", type: \"bytes\", internalType: \"bytes\" }\n ],\n outputs: [{ name: \"\", type: \"bytes4\", internalType: \"bytes4\" }],\n stateMutability: \"pure\"\n },\n {\n type: \"function\",\n name: \"onERC721Received\",\n inputs: [\n { name: \"\", type: \"address\", internalType: \"address\" },\n { name: \"\", type: \"address\", internalType: \"address\" },\n { name: \"\", type: \"uint256\", internalType: \"uint256\" },\n { name: \"\", type: \"bytes\", internalType: \"bytes\" }\n ],\n outputs: [{ name: \"\", type: \"bytes4\", internalType: \"bytes4\" }],\n stateMutability: \"pure\"\n },\n {\n type: \"function\",\n name: \"owners\",\n inputs: [],\n outputs: [{ name: \"\", type: \"address[]\", internalType: \"address[]\" }],\n stateMutability: \"view\"\n },\n {\n type: \"function\",\n name: \"proxiableUUID\",\n inputs: [],\n outputs: [{ name: \"\", type: \"bytes32\", internalType: \"bytes32\" }],\n stateMutability: \"view\"\n },\n {\n type: \"function\",\n name: \"supportsInterface\",\n inputs: [{ name: \"interfaceId\", type: \"bytes4\", internalType: \"bytes4\" }],\n outputs: [{ name: \"\", type: \"bool\", internalType: \"bool\" }],\n stateMutability: \"view\"\n },\n {\n type: \"function\",\n name: \"updateOwners\",\n inputs: [\n {\n name: \"ownersToAdd\",\n type: \"address[]\",\n internalType: \"address[]\"\n },\n {\n name: \"ownersToRemove\",\n type: \"address[]\",\n internalType: \"address[]\"\n }\n ],\n outputs: [],\n stateMutability: \"nonpayable\"\n },\n {\n type: \"function\",\n name: \"upgradeToAndCall\",\n inputs: [\n {\n name: \"newImplementation\",\n type: \"address\",\n internalType: \"address\"\n },\n { name: \"data\", type: \"bytes\", internalType: \"bytes\" }\n ],\n outputs: [],\n stateMutability: \"payable\"\n },\n {\n type: \"function\",\n name: \"validateUserOp\",\n inputs: [\n {\n name: \"userOp\",\n type: \"tuple\",\n internalType: \"struct PackedUserOperation\",\n components: [\n { name: \"sender\", type: \"address\", internalType: \"address\" },\n { name: \"nonce\", type: \"uint256\", internalType: \"uint256\" },\n { name: \"initCode\", type: \"bytes\", internalType: \"bytes\" },\n { name: \"callData\", type: \"bytes\", internalType: \"bytes\" },\n {\n name: \"accountGasLimits\",\n type: \"bytes32\",\n internalType: \"bytes32\"\n },\n {\n name: \"preVerificationGas\",\n type: \"uint256\",\n internalType: \"uint256\"\n },\n { name: \"gasFees\", type: \"bytes32\", internalType: \"bytes32\" },\n {\n name: \"paymasterAndData\",\n type: \"bytes\",\n internalType: \"bytes\"\n },\n { name: \"signature\", type: \"bytes\", internalType: \"bytes\" }\n ]\n },\n { name: \"userOpHash\", type: \"bytes32\", internalType: \"bytes32\" },\n {\n name: \"missingAccountFunds\",\n type: \"uint256\",\n internalType: \"uint256\"\n }\n ],\n outputs: [\n {\n name: \"validationData\",\n type: \"uint256\",\n internalType: \"uint256\"\n }\n ],\n stateMutability: \"nonpayable\"\n },\n {\n type: \"function\",\n name: \"withdrawDepositTo\",\n inputs: [\n {\n name: \"withdrawAddress\",\n type: \"address\",\n internalType: \"address payable\"\n },\n { name: \"amount\", type: \"uint256\", internalType: \"uint256\" }\n ],\n outputs: [],\n stateMutability: \"nonpayable\"\n },\n {\n type: \"event\",\n name: \"Initialized\",\n inputs: [\n {\n name: \"version\",\n type: \"uint64\",\n indexed: false,\n internalType: \"uint64\"\n }\n ],\n anonymous: false\n },\n {\n type: \"event\",\n name: \"LightAccountInitialized\",\n inputs: [\n {\n name: \"entryPoint\",\n type: \"address\",\n indexed: true,\n internalType: \"contract IEntryPoint\"\n },\n {\n name: \"owners\",\n type: \"address[]\",\n indexed: false,\n internalType: \"address[]\"\n }\n ],\n anonymous: false\n },\n {\n type: \"event\",\n name: \"OwnersUpdated\",\n inputs: [\n {\n name: \"addedOwners\",\n type: \"address[]\",\n indexed: false,\n internalType: \"address[]\"\n },\n {\n name: \"removedOwners\",\n type: \"address[]\",\n indexed: false,\n internalType: \"address[]\"\n }\n ],\n anonymous: false\n },\n {\n type: \"event\",\n name: \"Upgraded\",\n inputs: [\n {\n name: \"implementation\",\n type: \"address\",\n indexed: true,\n internalType: \"address\"\n }\n ],\n anonymous: false\n },\n { type: \"error\", name: \"ArrayLengthMismatch\", inputs: [] },\n { type: \"error\", name: \"ECDSAInvalidSignature\", inputs: [] },\n {\n type: \"error\",\n name: \"ECDSAInvalidSignatureLength\",\n inputs: [{ name: \"length\", type: \"uint256\", internalType: \"uint256\" }]\n },\n {\n type: \"error\",\n name: \"ECDSAInvalidSignatureS\",\n inputs: [{ name: \"s\", type: \"bytes32\", internalType: \"bytes32\" }]\n },\n { type: \"error\", name: \"EmptyOwnersNotAllowed\", inputs: [] },\n { type: \"error\", name: \"InvalidInitialization\", inputs: [] },\n {\n type: \"error\",\n name: \"InvalidOwner\",\n inputs: [{ name: \"owner\", type: \"address\", internalType: \"address\" }]\n },\n { type: \"error\", name: \"InvalidSignatureType\", inputs: [] },\n {\n type: \"error\",\n name: \"NotAuthorized\",\n inputs: [{ name: \"caller\", type: \"address\", internalType: \"address\" }]\n },\n { type: \"error\", name: \"NotInitializing\", inputs: [] },\n {\n type: \"error\",\n name: \"OwnerDoesNotExist\",\n inputs: [{ name: \"owner\", type: \"address\", internalType: \"address\" }]\n },\n { type: \"error\", name: \"UnauthorizedCallContext\", inputs: [] },\n { type: \"error\", name: \"UpgradeFailed\", inputs: [] },\n { type: \"error\", name: \"ZeroAddressNotAllowed\", inputs: [] }\n ];\n }\n });\n\n // ../../../node_modules/.pnpm/@account-kit+smart-contracts@4.62.0_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5._65dee0153d50ca3a2d2c6830319271d9/node_modules/@account-kit/smart-contracts/dist/esm/src/light-account/abis/MultiOwnerLightAccountFactoryAbi.js\n var MultiOwnerLightAccountFactoryAbi;\n var init_MultiOwnerLightAccountFactoryAbi = __esm({\n \"../../../node_modules/.pnpm/@account-kit+smart-contracts@4.62.0_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5._65dee0153d50ca3a2d2c6830319271d9/node_modules/@account-kit/smart-contracts/dist/esm/src/light-account/abis/MultiOwnerLightAccountFactoryAbi.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n MultiOwnerLightAccountFactoryAbi = [\n {\n type: \"constructor\",\n inputs: [\n { name: \"owner\", type: \"address\", internalType: \"address\" },\n {\n name: \"entryPoint\",\n type: \"address\",\n internalType: \"contract IEntryPoint\"\n }\n ],\n stateMutability: \"nonpayable\"\n },\n { type: \"receive\", stateMutability: \"payable\" },\n {\n type: \"function\",\n name: \"ACCOUNT_IMPLEMENTATION\",\n inputs: [],\n outputs: [\n {\n name: \"\",\n type: \"address\",\n internalType: \"contract MultiOwnerLightAccount\"\n }\n ],\n stateMutability: \"view\"\n },\n {\n type: \"function\",\n name: \"ENTRY_POINT\",\n inputs: [],\n outputs: [\n {\n name: \"\",\n type: \"address\",\n internalType: \"contract IEntryPoint\"\n }\n ],\n stateMutability: \"view\"\n },\n {\n type: \"function\",\n name: \"acceptOwnership\",\n inputs: [],\n outputs: [],\n stateMutability: \"nonpayable\"\n },\n {\n type: \"function\",\n name: \"addStake\",\n inputs: [\n { name: \"unstakeDelay\", type: \"uint32\", internalType: \"uint32\" },\n { name: \"amount\", type: \"uint256\", internalType: \"uint256\" }\n ],\n outputs: [],\n stateMutability: \"payable\"\n },\n {\n type: \"function\",\n name: \"createAccount\",\n inputs: [\n { name: \"owners\", type: \"address[]\", internalType: \"address[]\" },\n { name: \"salt\", type: \"uint256\", internalType: \"uint256\" }\n ],\n outputs: [\n {\n name: \"account\",\n type: \"address\",\n internalType: \"contract MultiOwnerLightAccount\"\n }\n ],\n stateMutability: \"nonpayable\"\n },\n {\n type: \"function\",\n name: \"createAccountSingle\",\n inputs: [\n { name: \"owner\", type: \"address\", internalType: \"address\" },\n { name: \"salt\", type: \"uint256\", internalType: \"uint256\" }\n ],\n outputs: [\n {\n name: \"account\",\n type: \"address\",\n internalType: \"contract MultiOwnerLightAccount\"\n }\n ],\n stateMutability: \"nonpayable\"\n },\n {\n type: \"function\",\n name: \"getAddress\",\n inputs: [\n { name: \"owners\", type: \"address[]\", internalType: \"address[]\" },\n { name: \"salt\", type: \"uint256\", internalType: \"uint256\" }\n ],\n outputs: [{ name: \"\", type: \"address\", internalType: \"address\" }],\n stateMutability: \"view\"\n },\n {\n type: \"function\",\n name: \"owner\",\n inputs: [],\n outputs: [{ name: \"\", type: \"address\", internalType: \"address\" }],\n stateMutability: \"view\"\n },\n {\n type: \"function\",\n name: \"pendingOwner\",\n inputs: [],\n outputs: [{ name: \"\", type: \"address\", internalType: \"address\" }],\n stateMutability: \"view\"\n },\n {\n type: \"function\",\n name: \"renounceOwnership\",\n inputs: [],\n outputs: [],\n stateMutability: \"view\"\n },\n {\n type: \"function\",\n name: \"transferOwnership\",\n inputs: [{ name: \"newOwner\", type: \"address\", internalType: \"address\" }],\n outputs: [],\n stateMutability: \"nonpayable\"\n },\n {\n type: \"function\",\n name: \"unlockStake\",\n inputs: [],\n outputs: [],\n stateMutability: \"nonpayable\"\n },\n {\n type: \"function\",\n name: \"withdraw\",\n inputs: [\n { name: \"to\", type: \"address\", internalType: \"address payable\" },\n { name: \"token\", type: \"address\", internalType: \"address\" },\n { name: \"amount\", type: \"uint256\", internalType: \"uint256\" }\n ],\n outputs: [],\n stateMutability: \"nonpayable\"\n },\n {\n type: \"function\",\n name: \"withdrawStake\",\n inputs: [{ name: \"to\", type: \"address\", internalType: \"address payable\" }],\n outputs: [],\n stateMutability: \"nonpayable\"\n },\n {\n type: \"event\",\n name: \"OwnershipTransferStarted\",\n inputs: [\n {\n name: \"previousOwner\",\n type: \"address\",\n indexed: true,\n internalType: \"address\"\n },\n {\n name: \"newOwner\",\n type: \"address\",\n indexed: true,\n internalType: \"address\"\n }\n ],\n anonymous: false\n },\n {\n type: \"event\",\n name: \"OwnershipTransferred\",\n inputs: [\n {\n name: \"previousOwner\",\n type: \"address\",\n indexed: true,\n internalType: \"address\"\n },\n {\n name: \"newOwner\",\n type: \"address\",\n indexed: true,\n internalType: \"address\"\n }\n ],\n anonymous: false\n },\n {\n type: \"error\",\n name: \"AddressEmptyCode\",\n inputs: [{ name: \"target\", type: \"address\", internalType: \"address\" }]\n },\n {\n type: \"error\",\n name: \"AddressInsufficientBalance\",\n inputs: [{ name: \"account\", type: \"address\", internalType: \"address\" }]\n },\n { type: \"error\", name: \"FailedInnerCall\", inputs: [] },\n { type: \"error\", name: \"InvalidAction\", inputs: [] },\n {\n type: \"error\",\n name: \"InvalidEntryPoint\",\n inputs: [{ name: \"entryPoint\", type: \"address\", internalType: \"address\" }]\n },\n { type: \"error\", name: \"InvalidOwners\", inputs: [] },\n {\n type: \"error\",\n name: \"OwnableInvalidOwner\",\n inputs: [{ name: \"owner\", type: \"address\", internalType: \"address\" }]\n },\n {\n type: \"error\",\n name: \"OwnableUnauthorizedAccount\",\n inputs: [{ name: \"account\", type: \"address\", internalType: \"address\" }]\n },\n { type: \"error\", name: \"OwnersArrayEmpty\", inputs: [] },\n { type: \"error\", name: \"OwnersLimitExceeded\", inputs: [] },\n {\n type: \"error\",\n name: \"SafeERC20FailedOperation\",\n inputs: [{ name: \"token\", type: \"address\", internalType: \"address\" }]\n },\n { type: \"error\", name: \"TransferFailed\", inputs: [] },\n { type: \"error\", name: \"ZeroAddressNotAllowed\", inputs: [] }\n ];\n }\n });\n\n // ../../../node_modules/.pnpm/@account-kit+smart-contracts@4.62.0_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5._65dee0153d50ca3a2d2c6830319271d9/node_modules/@account-kit/smart-contracts/dist/esm/src/light-account/accounts/multiOwner.js\n async function createMultiOwnerLightAccount({ transport, chain: chain2, signer, initCode, version: version6 = defaultLightAccountVersion(), entryPoint = getEntryPoint(chain2, {\n version: \"0.7.0\"\n }), accountAddress, factoryAddress = getDefaultMultiOwnerLightAccountFactoryAddress(chain2, version6), salt: salt_ = 0n, owners = [] }) {\n const client = createBundlerClient({\n transport,\n chain: chain2\n });\n const ownerAddress = await signer.getAddress();\n const owners_ = Array.from(/* @__PURE__ */ new Set([...owners, ownerAddress])).filter((x4) => hexToBigInt(x4) !== 0n).sort((a3, b4) => {\n const bigintA = hexToBigInt(a3);\n const bigintB = hexToBigInt(b4);\n return bigintA < bigintB ? -1 : bigintA > bigintB ? 1 : 0;\n });\n const getAccountInitCode = async () => {\n if (initCode)\n return initCode;\n return concatHex([\n factoryAddress,\n encodeFunctionData({\n abi: MultiOwnerLightAccountFactoryAbi,\n functionName: \"createAccount\",\n args: [owners_, salt_]\n })\n ]);\n };\n const address = accountAddress ?? predictMultiOwnerLightAccountAddress({\n factoryAddress,\n salt: salt_,\n ownerAddresses: owners_\n });\n const account = await createLightAccountBase({\n transport,\n chain: chain2,\n signer,\n abi: MultiOwnerLightAccountAbi,\n version: version6,\n type: \"MultiOwnerLightAccount\",\n entryPoint,\n accountAddress: address,\n getAccountInitCode\n });\n return {\n ...account,\n encodeUpdateOwners: (ownersToAdd, ownersToRemove) => {\n return encodeFunctionData({\n abi: MultiOwnerLightAccountAbi,\n functionName: \"updateOwners\",\n args: [ownersToAdd, ownersToRemove]\n });\n },\n async getOwnerAddresses() {\n const callResult = await client.readContract({\n address,\n abi: MultiOwnerLightAccountAbi,\n functionName: \"owners\"\n });\n if (callResult == null) {\n throw new Error(\"could not get on-chain owners\");\n }\n if (!callResult.includes(await signer.getAddress())) {\n throw new Error(\"on-chain owners does not include the current signer\");\n }\n return callResult;\n }\n };\n }\n var init_multiOwner = __esm({\n \"../../../node_modules/.pnpm/@account-kit+smart-contracts@4.62.0_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5._65dee0153d50ca3a2d2c6830319271d9/node_modules/@account-kit/smart-contracts/dist/esm/src/light-account/accounts/multiOwner.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_esm6();\n init_esm();\n init_MultiOwnerLightAccountAbi();\n init_MultiOwnerLightAccountFactoryAbi();\n init_utils11();\n init_base5();\n init_predictAddress();\n }\n });\n\n // ../../../node_modules/.pnpm/@account-kit+smart-contracts@4.62.0_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5._65dee0153d50ca3a2d2c6830319271d9/node_modules/@account-kit/smart-contracts/dist/esm/src/light-account/actions/updateOwners.js\n var updateOwners;\n var init_updateOwners = __esm({\n \"../../../node_modules/.pnpm/@account-kit+smart-contracts@4.62.0_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5._65dee0153d50ca3a2d2c6830319271d9/node_modules/@account-kit/smart-contracts/dist/esm/src/light-account/actions/updateOwners.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_esm6();\n updateOwners = async (client, { ownersToAdd, ownersToRemove, waitForTxn, overrides, account = client.account }) => {\n if (!account) {\n throw new AccountNotFoundError2();\n }\n if (!isSmartAccountClient(client)) {\n throw new IncompatibleClientError(\"SmartAccountClient\", \"updateOwners\", client);\n }\n const data = account.encodeUpdateOwners(ownersToAdd, ownersToRemove);\n const result = await client.sendUserOperation({\n uo: {\n target: account.address,\n data\n },\n account,\n overrides\n });\n if (waitForTxn) {\n return client.waitForUserOperationTransaction(result);\n }\n return result.hash;\n };\n }\n });\n\n // ../../../node_modules/.pnpm/@account-kit+smart-contracts@4.62.0_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5._65dee0153d50ca3a2d2c6830319271d9/node_modules/@account-kit/smart-contracts/dist/esm/src/light-account/clients/multiOwnerLightAccount.js\n async function createMultiOwnerLightAccountClient(params) {\n const { transport, chain: chain2 } = params;\n const lightAccount = await createMultiOwnerLightAccount({\n ...params,\n transport,\n chain: chain2\n });\n if (isAlchemyTransport2(transport, chain2)) {\n return createAlchemySmartAccountClient2({\n ...params,\n transport,\n chain: chain2,\n account: lightAccount\n }).extend(multiOwnerLightAccountClientActions);\n }\n return createSmartAccountClient({\n ...params,\n transport,\n chain: chain2,\n account: lightAccount\n }).extend(multiOwnerLightAccountClientActions);\n }\n var init_multiOwnerLightAccount = __esm({\n \"../../../node_modules/.pnpm/@account-kit+smart-contracts@4.62.0_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5._65dee0153d50ca3a2d2c6830319271d9/node_modules/@account-kit/smart-contracts/dist/esm/src/light-account/clients/multiOwnerLightAccount.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_esm6();\n init_src();\n init_exports3();\n }\n });\n\n // ../../../node_modules/.pnpm/@account-kit+smart-contracts@4.62.0_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5._65dee0153d50ca3a2d2c6830319271d9/node_modules/@account-kit/smart-contracts/dist/esm/src/light-account/decorators/multiOwnerLightAccount.js\n var multiOwnerLightAccountClientActions;\n var init_multiOwnerLightAccount2 = __esm({\n \"../../../node_modules/.pnpm/@account-kit+smart-contracts@4.62.0_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5._65dee0153d50ca3a2d2c6830319271d9/node_modules/@account-kit/smart-contracts/dist/esm/src/light-account/decorators/multiOwnerLightAccount.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_updateOwners();\n multiOwnerLightAccountClientActions = (client) => ({\n updateOwners: async (args) => updateOwners(client, args)\n });\n }\n });\n\n // ../../../node_modules/.pnpm/@account-kit+smart-contracts@4.62.0_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5._65dee0153d50ca3a2d2c6830319271d9/node_modules/@account-kit/smart-contracts/dist/esm/src/msca/abis/IAccountLoupe.js\n var IAccountLoupeAbi;\n var init_IAccountLoupe = __esm({\n \"../../../node_modules/.pnpm/@account-kit+smart-contracts@4.62.0_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5._65dee0153d50ca3a2d2c6830319271d9/node_modules/@account-kit/smart-contracts/dist/esm/src/msca/abis/IAccountLoupe.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n IAccountLoupeAbi = [\n {\n type: \"function\",\n name: \"getExecutionFunctionConfig\",\n inputs: [{ name: \"selector\", type: \"bytes4\", internalType: \"bytes4\" }],\n outputs: [\n {\n name: \"\",\n type: \"tuple\",\n internalType: \"struct IAccountLoupe.ExecutionFunctionConfig\",\n components: [\n { name: \"plugin\", type: \"address\", internalType: \"address\" },\n {\n name: \"userOpValidationFunction\",\n type: \"bytes21\",\n internalType: \"FunctionReference\"\n },\n {\n name: \"runtimeValidationFunction\",\n type: \"bytes21\",\n internalType: \"FunctionReference\"\n }\n ]\n }\n ],\n stateMutability: \"view\"\n },\n {\n type: \"function\",\n name: \"getExecutionHooks\",\n inputs: [{ name: \"selector\", type: \"bytes4\", internalType: \"bytes4\" }],\n outputs: [\n {\n name: \"\",\n type: \"tuple[]\",\n internalType: \"struct IAccountLoupe.ExecutionHooks[]\",\n components: [\n {\n name: \"preExecHook\",\n type: \"bytes21\",\n internalType: \"FunctionReference\"\n },\n {\n name: \"postExecHook\",\n type: \"bytes21\",\n internalType: \"FunctionReference\"\n }\n ]\n }\n ],\n stateMutability: \"view\"\n },\n {\n type: \"function\",\n name: \"getInstalledPlugins\",\n inputs: [],\n outputs: [{ name: \"\", type: \"address[]\", internalType: \"address[]\" }],\n stateMutability: \"view\"\n },\n {\n type: \"function\",\n name: \"getPreValidationHooks\",\n inputs: [{ name: \"selector\", type: \"bytes4\", internalType: \"bytes4\" }],\n outputs: [\n {\n name: \"preUserOpValidationHooks\",\n type: \"bytes21[]\",\n internalType: \"FunctionReference[]\"\n },\n {\n name: \"preRuntimeValidationHooks\",\n type: \"bytes21[]\",\n internalType: \"FunctionReference[]\"\n }\n ],\n stateMutability: \"view\"\n }\n ];\n }\n });\n\n // ../../../node_modules/.pnpm/@account-kit+smart-contracts@4.62.0_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5._65dee0153d50ca3a2d2c6830319271d9/node_modules/@account-kit/smart-contracts/dist/esm/src/msca/abis/IPlugin.js\n var IPluginAbi;\n var init_IPlugin = __esm({\n \"../../../node_modules/.pnpm/@account-kit+smart-contracts@4.62.0_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5._65dee0153d50ca3a2d2c6830319271d9/node_modules/@account-kit/smart-contracts/dist/esm/src/msca/abis/IPlugin.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n IPluginAbi = [\n {\n type: \"function\",\n name: \"onInstall\",\n inputs: [{ name: \"data\", type: \"bytes\", internalType: \"bytes\" }],\n outputs: [],\n stateMutability: \"nonpayable\"\n },\n {\n type: \"function\",\n name: \"onUninstall\",\n inputs: [{ name: \"data\", type: \"bytes\", internalType: \"bytes\" }],\n outputs: [],\n stateMutability: \"nonpayable\"\n },\n {\n type: \"function\",\n name: \"pluginManifest\",\n inputs: [],\n outputs: [\n {\n name: \"\",\n type: \"tuple\",\n internalType: \"struct PluginManifest\",\n components: [\n { name: \"interfaceIds\", type: \"bytes4[]\", internalType: \"bytes4[]\" },\n {\n name: \"dependencyInterfaceIds\",\n type: \"bytes4[]\",\n internalType: \"bytes4[]\"\n },\n {\n name: \"executionFunctions\",\n type: \"bytes4[]\",\n internalType: \"bytes4[]\"\n },\n {\n name: \"permittedExecutionSelectors\",\n type: \"bytes4[]\",\n internalType: \"bytes4[]\"\n },\n {\n name: \"permitAnyExternalAddress\",\n type: \"bool\",\n internalType: \"bool\"\n },\n { name: \"canSpendNativeToken\", type: \"bool\", internalType: \"bool\" },\n {\n name: \"permittedExternalCalls\",\n type: \"tuple[]\",\n internalType: \"struct ManifestExternalCallPermission[]\",\n components: [\n {\n name: \"externalAddress\",\n type: \"address\",\n internalType: \"address\"\n },\n { name: \"permitAnySelector\", type: \"bool\", internalType: \"bool\" },\n { name: \"selectors\", type: \"bytes4[]\", internalType: \"bytes4[]\" }\n ]\n },\n {\n name: \"userOpValidationFunctions\",\n type: \"tuple[]\",\n internalType: \"struct ManifestAssociatedFunction[]\",\n components: [\n {\n name: \"executionSelector\",\n type: \"bytes4\",\n internalType: \"bytes4\"\n },\n {\n name: \"associatedFunction\",\n type: \"tuple\",\n internalType: \"struct ManifestFunction\",\n components: [\n {\n name: \"functionType\",\n type: \"uint8\",\n internalType: \"enum ManifestAssociatedFunctionType\"\n },\n { name: \"functionId\", type: \"uint8\", internalType: \"uint8\" },\n {\n name: \"dependencyIndex\",\n type: \"uint256\",\n internalType: \"uint256\"\n }\n ]\n }\n ]\n },\n {\n name: \"runtimeValidationFunctions\",\n type: \"tuple[]\",\n internalType: \"struct ManifestAssociatedFunction[]\",\n components: [\n {\n name: \"executionSelector\",\n type: \"bytes4\",\n internalType: \"bytes4\"\n },\n {\n name: \"associatedFunction\",\n type: \"tuple\",\n internalType: \"struct ManifestFunction\",\n components: [\n {\n name: \"functionType\",\n type: \"uint8\",\n internalType: \"enum ManifestAssociatedFunctionType\"\n },\n { name: \"functionId\", type: \"uint8\", internalType: \"uint8\" },\n {\n name: \"dependencyIndex\",\n type: \"uint256\",\n internalType: \"uint256\"\n }\n ]\n }\n ]\n },\n {\n name: \"preUserOpValidationHooks\",\n type: \"tuple[]\",\n internalType: \"struct ManifestAssociatedFunction[]\",\n components: [\n {\n name: \"executionSelector\",\n type: \"bytes4\",\n internalType: \"bytes4\"\n },\n {\n name: \"associatedFunction\",\n type: \"tuple\",\n internalType: \"struct ManifestFunction\",\n components: [\n {\n name: \"functionType\",\n type: \"uint8\",\n internalType: \"enum ManifestAssociatedFunctionType\"\n },\n { name: \"functionId\", type: \"uint8\", internalType: \"uint8\" },\n {\n name: \"dependencyIndex\",\n type: \"uint256\",\n internalType: \"uint256\"\n }\n ]\n }\n ]\n },\n {\n name: \"preRuntimeValidationHooks\",\n type: \"tuple[]\",\n internalType: \"struct ManifestAssociatedFunction[]\",\n components: [\n {\n name: \"executionSelector\",\n type: \"bytes4\",\n internalType: \"bytes4\"\n },\n {\n name: \"associatedFunction\",\n type: \"tuple\",\n internalType: \"struct ManifestFunction\",\n components: [\n {\n name: \"functionType\",\n type: \"uint8\",\n internalType: \"enum ManifestAssociatedFunctionType\"\n },\n { name: \"functionId\", type: \"uint8\", internalType: \"uint8\" },\n {\n name: \"dependencyIndex\",\n type: \"uint256\",\n internalType: \"uint256\"\n }\n ]\n }\n ]\n },\n {\n name: \"executionHooks\",\n type: \"tuple[]\",\n internalType: \"struct ManifestExecutionHook[]\",\n components: [\n {\n name: \"executionSelector\",\n type: \"bytes4\",\n internalType: \"bytes4\"\n },\n {\n name: \"preExecHook\",\n type: \"tuple\",\n internalType: \"struct ManifestFunction\",\n components: [\n {\n name: \"functionType\",\n type: \"uint8\",\n internalType: \"enum ManifestAssociatedFunctionType\"\n },\n { name: \"functionId\", type: \"uint8\", internalType: \"uint8\" },\n {\n name: \"dependencyIndex\",\n type: \"uint256\",\n internalType: \"uint256\"\n }\n ]\n },\n {\n name: \"postExecHook\",\n type: \"tuple\",\n internalType: \"struct ManifestFunction\",\n components: [\n {\n name: \"functionType\",\n type: \"uint8\",\n internalType: \"enum ManifestAssociatedFunctionType\"\n },\n { name: \"functionId\", type: \"uint8\", internalType: \"uint8\" },\n {\n name: \"dependencyIndex\",\n type: \"uint256\",\n internalType: \"uint256\"\n }\n ]\n }\n ]\n }\n ]\n }\n ],\n stateMutability: \"pure\"\n },\n {\n type: \"function\",\n name: \"pluginMetadata\",\n inputs: [],\n outputs: [\n {\n name: \"\",\n type: \"tuple\",\n internalType: \"struct PluginMetadata\",\n components: [\n { name: \"name\", type: \"string\", internalType: \"string\" },\n { name: \"version\", type: \"string\", internalType: \"string\" },\n { name: \"author\", type: \"string\", internalType: \"string\" },\n {\n name: \"permissionDescriptors\",\n type: \"tuple[]\",\n internalType: \"struct SelectorPermission[]\",\n components: [\n {\n name: \"functionSelector\",\n type: \"bytes4\",\n internalType: \"bytes4\"\n },\n {\n name: \"permissionDescription\",\n type: \"string\",\n internalType: \"string\"\n }\n ]\n }\n ]\n }\n ],\n stateMutability: \"pure\"\n },\n {\n type: \"function\",\n name: \"postExecutionHook\",\n inputs: [\n { name: \"functionId\", type: \"uint8\", internalType: \"uint8\" },\n { name: \"preExecHookData\", type: \"bytes\", internalType: \"bytes\" }\n ],\n outputs: [],\n stateMutability: \"nonpayable\"\n },\n {\n type: \"function\",\n name: \"preExecutionHook\",\n inputs: [\n { name: \"functionId\", type: \"uint8\", internalType: \"uint8\" },\n { name: \"sender\", type: \"address\", internalType: \"address\" },\n { name: \"value\", type: \"uint256\", internalType: \"uint256\" },\n { name: \"data\", type: \"bytes\", internalType: \"bytes\" }\n ],\n outputs: [{ name: \"\", type: \"bytes\", internalType: \"bytes\" }],\n stateMutability: \"nonpayable\"\n },\n {\n type: \"function\",\n name: \"preRuntimeValidationHook\",\n inputs: [\n { name: \"functionId\", type: \"uint8\", internalType: \"uint8\" },\n { name: \"sender\", type: \"address\", internalType: \"address\" },\n { name: \"value\", type: \"uint256\", internalType: \"uint256\" },\n { name: \"data\", type: \"bytes\", internalType: \"bytes\" }\n ],\n outputs: [],\n stateMutability: \"nonpayable\"\n },\n {\n type: \"function\",\n name: \"preUserOpValidationHook\",\n inputs: [\n { name: \"functionId\", type: \"uint8\", internalType: \"uint8\" },\n {\n name: \"userOp\",\n type: \"tuple\",\n internalType: \"struct UserOperation\",\n components: [\n { name: \"sender\", type: \"address\", internalType: \"address\" },\n { name: \"nonce\", type: \"uint256\", internalType: \"uint256\" },\n { name: \"initCode\", type: \"bytes\", internalType: \"bytes\" },\n { name: \"callData\", type: \"bytes\", internalType: \"bytes\" },\n { name: \"callGasLimit\", type: \"uint256\", internalType: \"uint256\" },\n {\n name: \"verificationGasLimit\",\n type: \"uint256\",\n internalType: \"uint256\"\n },\n {\n name: \"preVerificationGas\",\n type: \"uint256\",\n internalType: \"uint256\"\n },\n { name: \"maxFeePerGas\", type: \"uint256\", internalType: \"uint256\" },\n {\n name: \"maxPriorityFeePerGas\",\n type: \"uint256\",\n internalType: \"uint256\"\n },\n { name: \"paymasterAndData\", type: \"bytes\", internalType: \"bytes\" },\n { name: \"signature\", type: \"bytes\", internalType: \"bytes\" }\n ]\n },\n { name: \"userOpHash\", type: \"bytes32\", internalType: \"bytes32\" }\n ],\n outputs: [{ name: \"\", type: \"uint256\", internalType: \"uint256\" }],\n stateMutability: \"nonpayable\"\n },\n {\n type: \"function\",\n name: \"runtimeValidationFunction\",\n inputs: [\n { name: \"functionId\", type: \"uint8\", internalType: \"uint8\" },\n { name: \"sender\", type: \"address\", internalType: \"address\" },\n { name: \"value\", type: \"uint256\", internalType: \"uint256\" },\n { name: \"data\", type: \"bytes\", internalType: \"bytes\" }\n ],\n outputs: [],\n stateMutability: \"nonpayable\"\n },\n {\n type: \"function\",\n name: \"userOpValidationFunction\",\n inputs: [\n { name: \"functionId\", type: \"uint8\", internalType: \"uint8\" },\n {\n name: \"userOp\",\n type: \"tuple\",\n internalType: \"struct UserOperation\",\n components: [\n { name: \"sender\", type: \"address\", internalType: \"address\" },\n { name: \"nonce\", type: \"uint256\", internalType: \"uint256\" },\n { name: \"initCode\", type: \"bytes\", internalType: \"bytes\" },\n { name: \"callData\", type: \"bytes\", internalType: \"bytes\" },\n { name: \"callGasLimit\", type: \"uint256\", internalType: \"uint256\" },\n {\n name: \"verificationGasLimit\",\n type: \"uint256\",\n internalType: \"uint256\"\n },\n {\n name: \"preVerificationGas\",\n type: \"uint256\",\n internalType: \"uint256\"\n },\n { name: \"maxFeePerGas\", type: \"uint256\", internalType: \"uint256\" },\n {\n name: \"maxPriorityFeePerGas\",\n type: \"uint256\",\n internalType: \"uint256\"\n },\n { name: \"paymasterAndData\", type: \"bytes\", internalType: \"bytes\" },\n { name: \"signature\", type: \"bytes\", internalType: \"bytes\" }\n ]\n },\n { name: \"userOpHash\", type: \"bytes32\", internalType: \"bytes32\" }\n ],\n outputs: [{ name: \"\", type: \"uint256\", internalType: \"uint256\" }],\n stateMutability: \"nonpayable\"\n }\n ];\n }\n });\n\n // ../../../node_modules/.pnpm/@account-kit+smart-contracts@4.62.0_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5._65dee0153d50ca3a2d2c6830319271d9/node_modules/@account-kit/smart-contracts/dist/esm/src/msca/abis/IPluginManager.js\n var IPluginManagerAbi;\n var init_IPluginManager = __esm({\n \"../../../node_modules/.pnpm/@account-kit+smart-contracts@4.62.0_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5._65dee0153d50ca3a2d2c6830319271d9/node_modules/@account-kit/smart-contracts/dist/esm/src/msca/abis/IPluginManager.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n IPluginManagerAbi = [\n {\n type: \"function\",\n name: \"installPlugin\",\n inputs: [\n { name: \"plugin\", type: \"address\", internalType: \"address\" },\n { name: \"manifestHash\", type: \"bytes32\", internalType: \"bytes32\" },\n { name: \"pluginInitData\", type: \"bytes\", internalType: \"bytes\" },\n {\n name: \"dependencies\",\n type: \"bytes21[]\",\n internalType: \"FunctionReference[]\"\n }\n ],\n outputs: [],\n stateMutability: \"nonpayable\"\n },\n {\n type: \"function\",\n name: \"uninstallPlugin\",\n inputs: [\n { name: \"plugin\", type: \"address\", internalType: \"address\" },\n { name: \"config\", type: \"bytes\", internalType: \"bytes\" },\n { name: \"pluginUninstallData\", type: \"bytes\", internalType: \"bytes\" }\n ],\n outputs: [],\n stateMutability: \"nonpayable\"\n },\n {\n type: \"event\",\n name: \"PluginIgnoredHookUnapplyCallbackFailure\",\n inputs: [\n {\n name: \"plugin\",\n type: \"address\",\n indexed: true,\n internalType: \"address\"\n },\n {\n name: \"providingPlugin\",\n type: \"address\",\n indexed: true,\n internalType: \"address\"\n }\n ],\n anonymous: false\n },\n {\n type: \"event\",\n name: \"PluginIgnoredUninstallCallbackFailure\",\n inputs: [\n {\n name: \"plugin\",\n type: \"address\",\n indexed: true,\n internalType: \"address\"\n }\n ],\n anonymous: false\n },\n {\n type: \"event\",\n name: \"PluginInstalled\",\n inputs: [\n {\n name: \"plugin\",\n type: \"address\",\n indexed: true,\n internalType: \"address\"\n },\n {\n name: \"manifestHash\",\n type: \"bytes32\",\n indexed: false,\n internalType: \"bytes32\"\n },\n {\n name: \"dependencies\",\n type: \"bytes21[]\",\n indexed: false,\n internalType: \"FunctionReference[]\"\n }\n ],\n anonymous: false\n },\n {\n type: \"event\",\n name: \"PluginUninstalled\",\n inputs: [\n {\n name: \"plugin\",\n type: \"address\",\n indexed: true,\n internalType: \"address\"\n },\n {\n name: \"callbacksSucceeded\",\n type: \"bool\",\n indexed: true,\n internalType: \"bool\"\n }\n ],\n anonymous: false\n }\n ];\n }\n });\n\n // ../../../node_modules/.pnpm/@account-kit+smart-contracts@4.62.0_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5._65dee0153d50ca3a2d2c6830319271d9/node_modules/@account-kit/smart-contracts/dist/esm/src/msca/abis/IStandardExecutor.js\n var IStandardExecutorAbi;\n var init_IStandardExecutor = __esm({\n \"../../../node_modules/.pnpm/@account-kit+smart-contracts@4.62.0_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5._65dee0153d50ca3a2d2c6830319271d9/node_modules/@account-kit/smart-contracts/dist/esm/src/msca/abis/IStandardExecutor.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n IStandardExecutorAbi = [\n {\n type: \"function\",\n name: \"execute\",\n inputs: [\n { name: \"target\", type: \"address\", internalType: \"address\" },\n { name: \"value\", type: \"uint256\", internalType: \"uint256\" },\n { name: \"data\", type: \"bytes\", internalType: \"bytes\" }\n ],\n outputs: [{ name: \"\", type: \"bytes\", internalType: \"bytes\" }],\n stateMutability: \"payable\"\n },\n {\n type: \"function\",\n name: \"executeBatch\",\n inputs: [\n {\n name: \"calls\",\n type: \"tuple[]\",\n internalType: \"struct Call[]\",\n components: [\n { name: \"target\", type: \"address\", internalType: \"address\" },\n { name: \"value\", type: \"uint256\", internalType: \"uint256\" },\n { name: \"data\", type: \"bytes\", internalType: \"bytes\" }\n ]\n }\n ],\n outputs: [{ name: \"\", type: \"bytes[]\", internalType: \"bytes[]\" }],\n stateMutability: \"payable\"\n }\n ];\n }\n });\n\n // ../../../node_modules/.pnpm/@account-kit+smart-contracts@4.62.0_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5._65dee0153d50ca3a2d2c6830319271d9/node_modules/@account-kit/smart-contracts/dist/esm/src/msca/abis/MultiOwnerModularAccountFactory.js\n var MultiOwnerModularAccountFactoryAbi;\n var init_MultiOwnerModularAccountFactory = __esm({\n \"../../../node_modules/.pnpm/@account-kit+smart-contracts@4.62.0_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5._65dee0153d50ca3a2d2c6830319271d9/node_modules/@account-kit/smart-contracts/dist/esm/src/msca/abis/MultiOwnerModularAccountFactory.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n MultiOwnerModularAccountFactoryAbi = [\n {\n type: \"constructor\",\n inputs: [\n { name: \"owner\", type: \"address\", internalType: \"address\" },\n {\n name: \"multiOwnerPlugin\",\n type: \"address\",\n internalType: \"address\"\n },\n {\n name: \"implementation\",\n type: \"address\",\n internalType: \"address\"\n },\n {\n name: \"multiOwnerPluginManifestHash\",\n type: \"bytes32\",\n internalType: \"bytes32\"\n },\n {\n name: \"entryPoint\",\n type: \"address\",\n internalType: \"contract IEntryPoint\"\n }\n ],\n stateMutability: \"nonpayable\"\n },\n { type: \"receive\", stateMutability: \"payable\" },\n {\n type: \"function\",\n name: \"ENTRYPOINT\",\n inputs: [],\n outputs: [\n {\n name: \"\",\n type: \"address\",\n internalType: \"contract IEntryPoint\"\n }\n ],\n stateMutability: \"view\"\n },\n {\n type: \"function\",\n name: \"IMPL\",\n inputs: [],\n outputs: [{ name: \"\", type: \"address\", internalType: \"address\" }],\n stateMutability: \"view\"\n },\n {\n type: \"function\",\n name: \"MULTI_OWNER_PLUGIN\",\n inputs: [],\n outputs: [{ name: \"\", type: \"address\", internalType: \"address\" }],\n stateMutability: \"view\"\n },\n {\n type: \"function\",\n name: \"acceptOwnership\",\n inputs: [],\n outputs: [],\n stateMutability: \"nonpayable\"\n },\n {\n type: \"function\",\n name: \"addStake\",\n inputs: [\n { name: \"unstakeDelay\", type: \"uint32\", internalType: \"uint32\" },\n { name: \"amount\", type: \"uint256\", internalType: \"uint256\" }\n ],\n outputs: [],\n stateMutability: \"payable\"\n },\n {\n type: \"function\",\n name: \"createAccount\",\n inputs: [\n { name: \"salt\", type: \"uint256\", internalType: \"uint256\" },\n { name: \"owners\", type: \"address[]\", internalType: \"address[]\" }\n ],\n outputs: [{ name: \"addr\", type: \"address\", internalType: \"address\" }],\n stateMutability: \"nonpayable\"\n },\n {\n type: \"function\",\n name: \"getAddress\",\n inputs: [\n { name: \"salt\", type: \"uint256\", internalType: \"uint256\" },\n { name: \"owners\", type: \"address[]\", internalType: \"address[]\" }\n ],\n outputs: [{ name: \"\", type: \"address\", internalType: \"address\" }],\n stateMutability: \"view\"\n },\n {\n type: \"function\",\n name: \"owner\",\n inputs: [],\n outputs: [{ name: \"\", type: \"address\", internalType: \"address\" }],\n stateMutability: \"view\"\n },\n {\n type: \"function\",\n name: \"pendingOwner\",\n inputs: [],\n outputs: [{ name: \"\", type: \"address\", internalType: \"address\" }],\n stateMutability: \"view\"\n },\n {\n type: \"function\",\n name: \"renounceOwnership\",\n inputs: [],\n outputs: [],\n stateMutability: \"view\"\n },\n {\n type: \"function\",\n name: \"transferOwnership\",\n inputs: [{ name: \"newOwner\", type: \"address\", internalType: \"address\" }],\n outputs: [],\n stateMutability: \"nonpayable\"\n },\n {\n type: \"function\",\n name: \"unlockStake\",\n inputs: [],\n outputs: [],\n stateMutability: \"nonpayable\"\n },\n {\n type: \"function\",\n name: \"withdraw\",\n inputs: [\n { name: \"to\", type: \"address\", internalType: \"address payable\" },\n { name: \"token\", type: \"address\", internalType: \"address\" },\n { name: \"amount\", type: \"uint256\", internalType: \"uint256\" }\n ],\n outputs: [],\n stateMutability: \"nonpayable\"\n },\n {\n type: \"function\",\n name: \"withdrawStake\",\n inputs: [{ name: \"to\", type: \"address\", internalType: \"address payable\" }],\n outputs: [],\n stateMutability: \"nonpayable\"\n },\n {\n type: \"event\",\n name: \"OwnershipTransferStarted\",\n inputs: [\n {\n name: \"previousOwner\",\n type: \"address\",\n indexed: true,\n internalType: \"address\"\n },\n {\n name: \"newOwner\",\n type: \"address\",\n indexed: true,\n internalType: \"address\"\n }\n ],\n anonymous: false\n },\n {\n type: \"event\",\n name: \"OwnershipTransferred\",\n inputs: [\n {\n name: \"previousOwner\",\n type: \"address\",\n indexed: true,\n internalType: \"address\"\n },\n {\n name: \"newOwner\",\n type: \"address\",\n indexed: true,\n internalType: \"address\"\n }\n ],\n anonymous: false\n },\n { type: \"error\", name: \"InvalidAction\", inputs: [] },\n { type: \"error\", name: \"InvalidOwner\", inputs: [] },\n { type: \"error\", name: \"OwnersArrayEmpty\", inputs: [] },\n { type: \"error\", name: \"OwnersLimitExceeded\", inputs: [] },\n { type: \"error\", name: \"TransferFailed\", inputs: [] }\n ];\n }\n });\n\n // ../../../node_modules/.pnpm/@account-kit+smart-contracts@4.62.0_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5._65dee0153d50ca3a2d2c6830319271d9/node_modules/@account-kit/smart-contracts/dist/esm/src/msca/abis/MultisigModularAccountFactory.js\n var MultisigModularAccountFactoryAbi;\n var init_MultisigModularAccountFactory = __esm({\n \"../../../node_modules/.pnpm/@account-kit+smart-contracts@4.62.0_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5._65dee0153d50ca3a2d2c6830319271d9/node_modules/@account-kit/smart-contracts/dist/esm/src/msca/abis/MultisigModularAccountFactory.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n MultisigModularAccountFactoryAbi = [\n {\n type: \"constructor\",\n inputs: [\n {\n name: \"owner\",\n type: \"address\",\n internalType: \"address\"\n },\n {\n name: \"multisigPlugin\",\n type: \"address\",\n internalType: \"address\"\n },\n {\n name: \"implementation\",\n type: \"address\",\n internalType: \"address\"\n },\n {\n name: \"multisigPluginManifestHash\",\n type: \"bytes32\",\n internalType: \"bytes32\"\n },\n {\n name: \"entryPoint\",\n type: \"address\",\n internalType: \"contract IEntryPoint\"\n }\n ],\n stateMutability: \"nonpayable\"\n },\n {\n type: \"receive\",\n stateMutability: \"payable\"\n },\n {\n type: \"function\",\n name: \"ENTRYPOINT\",\n inputs: [],\n outputs: [\n {\n name: \"\",\n type: \"address\",\n internalType: \"contract IEntryPoint\"\n }\n ],\n stateMutability: \"view\"\n },\n {\n type: \"function\",\n name: \"IMPL\",\n inputs: [],\n outputs: [\n {\n name: \"\",\n type: \"address\",\n internalType: \"address\"\n }\n ],\n stateMutability: \"view\"\n },\n {\n type: \"function\",\n name: \"MULTISIG_PLUGIN\",\n inputs: [],\n outputs: [\n {\n name: \"\",\n type: \"address\",\n internalType: \"address\"\n }\n ],\n stateMutability: \"view\"\n },\n {\n type: \"function\",\n name: \"acceptOwnership\",\n inputs: [],\n outputs: [],\n stateMutability: \"nonpayable\"\n },\n {\n type: \"function\",\n name: \"addStake\",\n inputs: [\n {\n name: \"unstakeDelay\",\n type: \"uint32\",\n internalType: \"uint32\"\n },\n {\n name: \"amount\",\n type: \"uint256\",\n internalType: \"uint256\"\n }\n ],\n outputs: [],\n stateMutability: \"payable\"\n },\n {\n type: \"function\",\n name: \"createAccount\",\n inputs: [\n {\n name: \"salt\",\n type: \"uint256\",\n internalType: \"uint256\"\n },\n {\n name: \"owners\",\n type: \"address[]\",\n internalType: \"address[]\"\n },\n {\n name: \"threshold\",\n type: \"uint128\",\n internalType: \"uint128\"\n }\n ],\n outputs: [\n {\n name: \"addr\",\n type: \"address\",\n internalType: \"address\"\n }\n ],\n stateMutability: \"nonpayable\"\n },\n {\n type: \"function\",\n name: \"getAddress\",\n inputs: [\n {\n name: \"salt\",\n type: \"uint256\",\n internalType: \"uint256\"\n },\n {\n name: \"owners\",\n type: \"address[]\",\n internalType: \"address[]\"\n },\n {\n name: \"threshold\",\n type: \"uint256\",\n internalType: \"uint256\"\n }\n ],\n outputs: [\n {\n name: \"\",\n type: \"address\",\n internalType: \"address\"\n }\n ],\n stateMutability: \"view\"\n },\n {\n type: \"function\",\n name: \"owner\",\n inputs: [],\n outputs: [\n {\n name: \"\",\n type: \"address\",\n internalType: \"address\"\n }\n ],\n stateMutability: \"view\"\n },\n {\n type: \"function\",\n name: \"pendingOwner\",\n inputs: [],\n outputs: [\n {\n name: \"\",\n type: \"address\",\n internalType: \"address\"\n }\n ],\n stateMutability: \"view\"\n },\n {\n type: \"function\",\n name: \"renounceOwnership\",\n inputs: [],\n outputs: [],\n stateMutability: \"view\"\n },\n {\n type: \"function\",\n name: \"transferOwnership\",\n inputs: [\n {\n name: \"newOwner\",\n type: \"address\",\n internalType: \"address\"\n }\n ],\n outputs: [],\n stateMutability: \"nonpayable\"\n },\n {\n type: \"function\",\n name: \"unlockStake\",\n inputs: [],\n outputs: [],\n stateMutability: \"nonpayable\"\n },\n {\n type: \"function\",\n name: \"withdraw\",\n inputs: [\n {\n name: \"to\",\n type: \"address\",\n internalType: \"address payable\"\n },\n {\n name: \"token\",\n type: \"address\",\n internalType: \"address\"\n },\n {\n name: \"amount\",\n type: \"uint256\",\n internalType: \"uint256\"\n }\n ],\n outputs: [],\n stateMutability: \"nonpayable\"\n },\n {\n type: \"function\",\n name: \"withdrawStake\",\n inputs: [\n {\n name: \"to\",\n type: \"address\",\n internalType: \"address payable\"\n }\n ],\n outputs: [],\n stateMutability: \"nonpayable\"\n },\n {\n type: \"event\",\n name: \"OwnershipTransferStarted\",\n inputs: [\n {\n name: \"previousOwner\",\n type: \"address\",\n indexed: true,\n internalType: \"address\"\n },\n {\n name: \"newOwner\",\n type: \"address\",\n indexed: true,\n internalType: \"address\"\n }\n ],\n anonymous: false\n },\n {\n type: \"event\",\n name: \"OwnershipTransferred\",\n inputs: [\n {\n name: \"previousOwner\",\n type: \"address\",\n indexed: true,\n internalType: \"address\"\n },\n {\n name: \"newOwner\",\n type: \"address\",\n indexed: true,\n internalType: \"address\"\n }\n ],\n anonymous: false\n },\n {\n type: \"error\",\n name: \"InvalidAction\",\n inputs: []\n },\n {\n type: \"error\",\n name: \"InvalidOwner\",\n inputs: []\n },\n {\n type: \"error\",\n name: \"InvalidThreshold\",\n inputs: []\n },\n {\n type: \"error\",\n name: \"OwnersArrayEmpty\",\n inputs: []\n },\n {\n type: \"error\",\n name: \"OwnersLimitExceeded\",\n inputs: []\n },\n {\n type: \"error\",\n name: \"TransferFailed\",\n inputs: []\n }\n ];\n }\n });\n\n // ../../../node_modules/.pnpm/@account-kit+smart-contracts@4.62.0_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5._65dee0153d50ca3a2d2c6830319271d9/node_modules/@account-kit/smart-contracts/dist/esm/src/msca/abis/UpgradeableModularAccount.js\n var UpgradeableModularAccountAbi;\n var init_UpgradeableModularAccount = __esm({\n \"../../../node_modules/.pnpm/@account-kit+smart-contracts@4.62.0_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5._65dee0153d50ca3a2d2c6830319271d9/node_modules/@account-kit/smart-contracts/dist/esm/src/msca/abis/UpgradeableModularAccount.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n UpgradeableModularAccountAbi = [\n {\n type: \"constructor\",\n inputs: [\n {\n name: \"anEntryPoint\",\n type: \"address\",\n internalType: \"contract IEntryPoint\"\n }\n ],\n stateMutability: \"nonpayable\"\n },\n { type: \"fallback\", stateMutability: \"payable\" },\n { type: \"receive\", stateMutability: \"payable\" },\n {\n type: \"function\",\n name: \"entryPoint\",\n inputs: [],\n outputs: [\n {\n name: \"\",\n type: \"address\",\n internalType: \"contract IEntryPoint\"\n }\n ],\n stateMutability: \"view\"\n },\n {\n type: \"function\",\n name: \"execute\",\n inputs: [\n { name: \"target\", type: \"address\", internalType: \"address\" },\n { name: \"value\", type: \"uint256\", internalType: \"uint256\" },\n { name: \"data\", type: \"bytes\", internalType: \"bytes\" }\n ],\n outputs: [{ name: \"result\", type: \"bytes\", internalType: \"bytes\" }],\n stateMutability: \"payable\"\n },\n {\n type: \"function\",\n name: \"executeBatch\",\n inputs: [\n {\n name: \"calls\",\n type: \"tuple[]\",\n internalType: \"struct Call[]\",\n components: [\n { name: \"target\", type: \"address\", internalType: \"address\" },\n { name: \"value\", type: \"uint256\", internalType: \"uint256\" },\n { name: \"data\", type: \"bytes\", internalType: \"bytes\" }\n ]\n }\n ],\n outputs: [{ name: \"results\", type: \"bytes[]\", internalType: \"bytes[]\" }],\n stateMutability: \"payable\"\n },\n {\n type: \"function\",\n name: \"executeFromPlugin\",\n inputs: [{ name: \"data\", type: \"bytes\", internalType: \"bytes\" }],\n outputs: [{ name: \"returnData\", type: \"bytes\", internalType: \"bytes\" }],\n stateMutability: \"payable\"\n },\n {\n type: \"function\",\n name: \"executeFromPluginExternal\",\n inputs: [\n { name: \"target\", type: \"address\", internalType: \"address\" },\n { name: \"value\", type: \"uint256\", internalType: \"uint256\" },\n { name: \"data\", type: \"bytes\", internalType: \"bytes\" }\n ],\n outputs: [{ name: \"\", type: \"bytes\", internalType: \"bytes\" }],\n stateMutability: \"payable\"\n },\n {\n type: \"function\",\n name: \"getExecutionFunctionConfig\",\n inputs: [{ name: \"selector\", type: \"bytes4\", internalType: \"bytes4\" }],\n outputs: [\n {\n name: \"config\",\n type: \"tuple\",\n internalType: \"struct IAccountLoupe.ExecutionFunctionConfig\",\n components: [\n { name: \"plugin\", type: \"address\", internalType: \"address\" },\n {\n name: \"userOpValidationFunction\",\n type: \"bytes21\",\n internalType: \"FunctionReference\"\n },\n {\n name: \"runtimeValidationFunction\",\n type: \"bytes21\",\n internalType: \"FunctionReference\"\n }\n ]\n }\n ],\n stateMutability: \"view\"\n },\n {\n type: \"function\",\n name: \"getExecutionHooks\",\n inputs: [{ name: \"selector\", type: \"bytes4\", internalType: \"bytes4\" }],\n outputs: [\n {\n name: \"execHooks\",\n type: \"tuple[]\",\n internalType: \"struct IAccountLoupe.ExecutionHooks[]\",\n components: [\n {\n name: \"preExecHook\",\n type: \"bytes21\",\n internalType: \"FunctionReference\"\n },\n {\n name: \"postExecHook\",\n type: \"bytes21\",\n internalType: \"FunctionReference\"\n }\n ]\n }\n ],\n stateMutability: \"view\"\n },\n {\n type: \"function\",\n name: \"getInstalledPlugins\",\n inputs: [],\n outputs: [\n {\n name: \"pluginAddresses\",\n type: \"address[]\",\n internalType: \"address[]\"\n }\n ],\n stateMutability: \"view\"\n },\n {\n type: \"function\",\n name: \"getNonce\",\n inputs: [],\n outputs: [{ name: \"\", type: \"uint256\", internalType: \"uint256\" }],\n stateMutability: \"view\"\n },\n {\n type: \"function\",\n name: \"getPreValidationHooks\",\n inputs: [{ name: \"selector\", type: \"bytes4\", internalType: \"bytes4\" }],\n outputs: [\n {\n name: \"preUserOpValidationHooks\",\n type: \"bytes21[]\",\n internalType: \"FunctionReference[]\"\n },\n {\n name: \"preRuntimeValidationHooks\",\n type: \"bytes21[]\",\n internalType: \"FunctionReference[]\"\n }\n ],\n stateMutability: \"view\"\n },\n {\n type: \"function\",\n name: \"initialize\",\n inputs: [\n { name: \"plugins\", type: \"address[]\", internalType: \"address[]\" },\n { name: \"pluginInitData\", type: \"bytes\", internalType: \"bytes\" }\n ],\n outputs: [],\n stateMutability: \"nonpayable\"\n },\n {\n type: \"function\",\n name: \"installPlugin\",\n inputs: [\n { name: \"plugin\", type: \"address\", internalType: \"address\" },\n {\n name: \"manifestHash\",\n type: \"bytes32\",\n internalType: \"bytes32\"\n },\n {\n name: \"pluginInstallData\",\n type: \"bytes\",\n internalType: \"bytes\"\n },\n {\n name: \"dependencies\",\n type: \"bytes21[]\",\n internalType: \"FunctionReference[]\"\n }\n ],\n outputs: [],\n stateMutability: \"nonpayable\"\n },\n {\n type: \"function\",\n name: \"onERC1155BatchReceived\",\n inputs: [\n { name: \"operator\", type: \"address\", internalType: \"address\" },\n { name: \"from\", type: \"address\", internalType: \"address\" },\n { name: \"ids\", type: \"uint256[]\", internalType: \"uint256[]\" },\n { name: \"values\", type: \"uint256[]\", internalType: \"uint256[]\" },\n { name: \"data\", type: \"bytes\", internalType: \"bytes\" }\n ],\n outputs: [{ name: \"selector\", type: \"bytes4\", internalType: \"bytes4\" }],\n stateMutability: \"nonpayable\"\n },\n {\n type: \"function\",\n name: \"onERC1155Received\",\n inputs: [\n { name: \"operator\", type: \"address\", internalType: \"address\" },\n { name: \"from\", type: \"address\", internalType: \"address\" },\n { name: \"id\", type: \"uint256\", internalType: \"uint256\" },\n { name: \"value\", type: \"uint256\", internalType: \"uint256\" },\n { name: \"data\", type: \"bytes\", internalType: \"bytes\" }\n ],\n outputs: [{ name: \"selector\", type: \"bytes4\", internalType: \"bytes4\" }],\n stateMutability: \"nonpayable\"\n },\n {\n type: \"function\",\n name: \"onERC721Received\",\n inputs: [\n { name: \"operator\", type: \"address\", internalType: \"address\" },\n { name: \"from\", type: \"address\", internalType: \"address\" },\n { name: \"tokenId\", type: \"uint256\", internalType: \"uint256\" },\n { name: \"data\", type: \"bytes\", internalType: \"bytes\" }\n ],\n outputs: [{ name: \"selector\", type: \"bytes4\", internalType: \"bytes4\" }],\n stateMutability: \"nonpayable\"\n },\n {\n type: \"function\",\n name: \"proxiableUUID\",\n inputs: [],\n outputs: [{ name: \"\", type: \"bytes32\", internalType: \"bytes32\" }],\n stateMutability: \"view\"\n },\n {\n type: \"function\",\n name: \"supportsInterface\",\n inputs: [{ name: \"interfaceId\", type: \"bytes4\", internalType: \"bytes4\" }],\n outputs: [{ name: \"\", type: \"bool\", internalType: \"bool\" }],\n stateMutability: \"view\"\n },\n {\n type: \"function\",\n name: \"tokensReceived\",\n inputs: [\n { name: \"operator\", type: \"address\", internalType: \"address\" },\n { name: \"from\", type: \"address\", internalType: \"address\" },\n { name: \"to\", type: \"address\", internalType: \"address\" },\n { name: \"amount\", type: \"uint256\", internalType: \"uint256\" },\n { name: \"userData\", type: \"bytes\", internalType: \"bytes\" },\n { name: \"operatorData\", type: \"bytes\", internalType: \"bytes\" }\n ],\n outputs: [],\n stateMutability: \"nonpayable\"\n },\n {\n type: \"function\",\n name: \"uninstallPlugin\",\n inputs: [\n { name: \"plugin\", type: \"address\", internalType: \"address\" },\n { name: \"config\", type: \"bytes\", internalType: \"bytes\" },\n {\n name: \"pluginUninstallData\",\n type: \"bytes\",\n internalType: \"bytes\"\n }\n ],\n outputs: [],\n stateMutability: \"nonpayable\"\n },\n {\n type: \"function\",\n name: \"upgradeToAndCall\",\n inputs: [\n {\n name: \"newImplementation\",\n type: \"address\",\n internalType: \"address\"\n },\n { name: \"data\", type: \"bytes\", internalType: \"bytes\" }\n ],\n outputs: [],\n stateMutability: \"payable\"\n },\n {\n type: \"function\",\n name: \"validateUserOp\",\n inputs: [\n {\n name: \"userOp\",\n type: \"tuple\",\n internalType: \"struct UserOperation\",\n components: [\n { name: \"sender\", type: \"address\", internalType: \"address\" },\n { name: \"nonce\", type: \"uint256\", internalType: \"uint256\" },\n { name: \"initCode\", type: \"bytes\", internalType: \"bytes\" },\n { name: \"callData\", type: \"bytes\", internalType: \"bytes\" },\n {\n name: \"callGasLimit\",\n type: \"uint256\",\n internalType: \"uint256\"\n },\n {\n name: \"verificationGasLimit\",\n type: \"uint256\",\n internalType: \"uint256\"\n },\n {\n name: \"preVerificationGas\",\n type: \"uint256\",\n internalType: \"uint256\"\n },\n {\n name: \"maxFeePerGas\",\n type: \"uint256\",\n internalType: \"uint256\"\n },\n {\n name: \"maxPriorityFeePerGas\",\n type: \"uint256\",\n internalType: \"uint256\"\n },\n {\n name: \"paymasterAndData\",\n type: \"bytes\",\n internalType: \"bytes\"\n },\n { name: \"signature\", type: \"bytes\", internalType: \"bytes\" }\n ]\n },\n { name: \"userOpHash\", type: \"bytes32\", internalType: \"bytes32\" },\n {\n name: \"missingAccountFunds\",\n type: \"uint256\",\n internalType: \"uint256\"\n }\n ],\n outputs: [\n {\n name: \"validationData\",\n type: \"uint256\",\n internalType: \"uint256\"\n }\n ],\n stateMutability: \"nonpayable\"\n },\n {\n type: \"event\",\n name: \"ModularAccountInitialized\",\n inputs: [\n {\n name: \"entryPoint\",\n type: \"address\",\n indexed: true,\n internalType: \"contract IEntryPoint\"\n }\n ],\n anonymous: false\n },\n {\n type: \"event\",\n name: \"PluginInstalled\",\n inputs: [\n {\n name: \"plugin\",\n type: \"address\",\n indexed: true,\n internalType: \"address\"\n },\n {\n name: \"manifestHash\",\n type: \"bytes32\",\n indexed: false,\n internalType: \"bytes32\"\n },\n {\n name: \"dependencies\",\n type: \"bytes21[]\",\n indexed: false,\n internalType: \"FunctionReference[]\"\n }\n ],\n anonymous: false\n },\n {\n type: \"event\",\n name: \"PluginUninstalled\",\n inputs: [\n {\n name: \"plugin\",\n type: \"address\",\n indexed: true,\n internalType: \"address\"\n },\n {\n name: \"onUninstallSucceeded\",\n type: \"bool\",\n indexed: true,\n internalType: \"bool\"\n }\n ],\n anonymous: false\n },\n {\n type: \"event\",\n name: \"Upgraded\",\n inputs: [\n {\n name: \"implementation\",\n type: \"address\",\n indexed: true,\n internalType: \"address\"\n }\n ],\n anonymous: false\n },\n { type: \"error\", name: \"AlreadyInitialized\", inputs: [] },\n { type: \"error\", name: \"AlreadyInitializing\", inputs: [] },\n { type: \"error\", name: \"AlwaysDenyRule\", inputs: [] },\n { type: \"error\", name: \"ArrayLengthMismatch\", inputs: [] },\n {\n type: \"error\",\n name: \"DuplicateHookLimitExceeded\",\n inputs: [\n { name: \"selector\", type: \"bytes4\", internalType: \"bytes4\" },\n {\n name: \"hook\",\n type: \"bytes21\",\n internalType: \"FunctionReference\"\n }\n ]\n },\n {\n type: \"error\",\n name: \"DuplicatePreRuntimeValidationHookLimitExceeded\",\n inputs: [\n { name: \"selector\", type: \"bytes4\", internalType: \"bytes4\" },\n {\n name: \"hook\",\n type: \"bytes21\",\n internalType: \"FunctionReference\"\n }\n ]\n },\n {\n type: \"error\",\n name: \"DuplicatePreUserOpValidationHookLimitExceeded\",\n inputs: [\n { name: \"selector\", type: \"bytes4\", internalType: \"bytes4\" },\n {\n name: \"hook\",\n type: \"bytes21\",\n internalType: \"FunctionReference\"\n }\n ]\n },\n {\n type: \"error\",\n name: \"Erc4337FunctionNotAllowed\",\n inputs: [{ name: \"selector\", type: \"bytes4\", internalType: \"bytes4\" }]\n },\n {\n type: \"error\",\n name: \"ExecFromPluginExternalNotPermitted\",\n inputs: [\n { name: \"plugin\", type: \"address\", internalType: \"address\" },\n { name: \"target\", type: \"address\", internalType: \"address\" },\n { name: \"value\", type: \"uint256\", internalType: \"uint256\" },\n { name: \"data\", type: \"bytes\", internalType: \"bytes\" }\n ]\n },\n {\n type: \"error\",\n name: \"ExecFromPluginNotPermitted\",\n inputs: [\n { name: \"plugin\", type: \"address\", internalType: \"address\" },\n { name: \"selector\", type: \"bytes4\", internalType: \"bytes4\" }\n ]\n },\n {\n type: \"error\",\n name: \"ExecutionFunctionAlreadySet\",\n inputs: [{ name: \"selector\", type: \"bytes4\", internalType: \"bytes4\" }]\n },\n {\n type: \"error\",\n name: \"IPluginFunctionNotAllowed\",\n inputs: [{ name: \"selector\", type: \"bytes4\", internalType: \"bytes4\" }]\n },\n { type: \"error\", name: \"InterfaceNotAllowed\", inputs: [] },\n { type: \"error\", name: \"InvalidDependenciesProvided\", inputs: [] },\n { type: \"error\", name: \"InvalidPluginManifest\", inputs: [] },\n {\n type: \"error\",\n name: \"MissingPluginDependency\",\n inputs: [{ name: \"dependency\", type: \"address\", internalType: \"address\" }]\n },\n {\n type: \"error\",\n name: \"NativeFunctionNotAllowed\",\n inputs: [{ name: \"selector\", type: \"bytes4\", internalType: \"bytes4\" }]\n },\n {\n type: \"error\",\n name: \"NativeTokenSpendingNotPermitted\",\n inputs: [{ name: \"plugin\", type: \"address\", internalType: \"address\" }]\n },\n { type: \"error\", name: \"NullFunctionReference\", inputs: [] },\n {\n type: \"error\",\n name: \"PluginAlreadyInstalled\",\n inputs: [{ name: \"plugin\", type: \"address\", internalType: \"address\" }]\n },\n {\n type: \"error\",\n name: \"PluginCallDenied\",\n inputs: [{ name: \"plugin\", type: \"address\", internalType: \"address\" }]\n },\n {\n type: \"error\",\n name: \"PluginDependencyViolation\",\n inputs: [{ name: \"plugin\", type: \"address\", internalType: \"address\" }]\n },\n {\n type: \"error\",\n name: \"PluginInstallCallbackFailed\",\n inputs: [\n { name: \"plugin\", type: \"address\", internalType: \"address\" },\n { name: \"revertReason\", type: \"bytes\", internalType: \"bytes\" }\n ]\n },\n {\n type: \"error\",\n name: \"PluginInterfaceNotSupported\",\n inputs: [{ name: \"plugin\", type: \"address\", internalType: \"address\" }]\n },\n {\n type: \"error\",\n name: \"PluginNotInstalled\",\n inputs: [{ name: \"plugin\", type: \"address\", internalType: \"address\" }]\n },\n {\n type: \"error\",\n name: \"PluginUninstallCallbackFailed\",\n inputs: [\n { name: \"plugin\", type: \"address\", internalType: \"address\" },\n { name: \"revertReason\", type: \"bytes\", internalType: \"bytes\" }\n ]\n },\n {\n type: \"error\",\n name: \"PostExecHookReverted\",\n inputs: [\n { name: \"plugin\", type: \"address\", internalType: \"address\" },\n { name: \"functionId\", type: \"uint8\", internalType: \"uint8\" },\n { name: \"revertReason\", type: \"bytes\", internalType: \"bytes\" }\n ]\n },\n {\n type: \"error\",\n name: \"PreExecHookReverted\",\n inputs: [\n { name: \"plugin\", type: \"address\", internalType: \"address\" },\n { name: \"functionId\", type: \"uint8\", internalType: \"uint8\" },\n { name: \"revertReason\", type: \"bytes\", internalType: \"bytes\" }\n ]\n },\n {\n type: \"error\",\n name: \"PreRuntimeValidationHookFailed\",\n inputs: [\n { name: \"plugin\", type: \"address\", internalType: \"address\" },\n { name: \"functionId\", type: \"uint8\", internalType: \"uint8\" },\n { name: \"revertReason\", type: \"bytes\", internalType: \"bytes\" }\n ]\n },\n {\n type: \"error\",\n name: \"RuntimeValidationFunctionAlreadySet\",\n inputs: [\n { name: \"selector\", type: \"bytes4\", internalType: \"bytes4\" },\n {\n name: \"validationFunction\",\n type: \"bytes21\",\n internalType: \"FunctionReference\"\n }\n ]\n },\n {\n type: \"error\",\n name: \"RuntimeValidationFunctionMissing\",\n inputs: [{ name: \"selector\", type: \"bytes4\", internalType: \"bytes4\" }]\n },\n {\n type: \"error\",\n name: \"RuntimeValidationFunctionReverted\",\n inputs: [\n { name: \"plugin\", type: \"address\", internalType: \"address\" },\n { name: \"functionId\", type: \"uint8\", internalType: \"uint8\" },\n { name: \"revertReason\", type: \"bytes\", internalType: \"bytes\" }\n ]\n },\n { type: \"error\", name: \"UnauthorizedCallContext\", inputs: [] },\n {\n type: \"error\",\n name: \"UnexpectedAggregator\",\n inputs: [\n { name: \"plugin\", type: \"address\", internalType: \"address\" },\n { name: \"functionId\", type: \"uint8\", internalType: \"uint8\" },\n { name: \"aggregator\", type: \"address\", internalType: \"address\" }\n ]\n },\n {\n type: \"error\",\n name: \"UnrecognizedFunction\",\n inputs: [{ name: \"selector\", type: \"bytes4\", internalType: \"bytes4\" }]\n },\n { type: \"error\", name: \"UpgradeFailed\", inputs: [] },\n { type: \"error\", name: \"UserOpNotFromEntryPoint\", inputs: [] },\n {\n type: \"error\",\n name: \"UserOpValidationFunctionAlreadySet\",\n inputs: [\n { name: \"selector\", type: \"bytes4\", internalType: \"bytes4\" },\n {\n name: \"validationFunction\",\n type: \"bytes21\",\n internalType: \"FunctionReference\"\n }\n ]\n },\n {\n type: \"error\",\n name: \"UserOpValidationFunctionMissing\",\n inputs: [{ name: \"selector\", type: \"bytes4\", internalType: \"bytes4\" }]\n }\n ];\n }\n });\n\n // ../../../node_modules/.pnpm/@account-kit+smart-contracts@4.62.0_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5._65dee0153d50ca3a2d2c6830319271d9/node_modules/@account-kit/smart-contracts/dist/esm/src/msca/account-loupe/decorator.js\n var accountLoupeActions;\n var init_decorator = __esm({\n \"../../../node_modules/.pnpm/@account-kit+smart-contracts@4.62.0_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5._65dee0153d50ca3a2d2c6830319271d9/node_modules/@account-kit/smart-contracts/dist/esm/src/msca/account-loupe/decorator.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_esm6();\n init_IAccountLoupe();\n accountLoupeActions = (client) => ({\n getExecutionFunctionConfig: async ({ selector, account = client.account }) => {\n if (!account) {\n throw new AccountNotFoundError2();\n }\n if (!isSmartAccountClient(client)) {\n throw new IncompatibleClientError(\"SmartAccountClient\", \"getExecutionFunctionConfig\", client);\n }\n return client.readContract({\n address: account.address,\n abi: IAccountLoupeAbi,\n functionName: \"getExecutionFunctionConfig\",\n args: [selector]\n });\n },\n getExecutionHooks: async ({ selector, account = client.account }) => {\n if (!account) {\n throw new AccountNotFoundError2();\n }\n if (!isSmartAccountClient(client)) {\n throw new IncompatibleClientError(\"SmartAccountClient\", \"getExecutionHooks\", client);\n }\n return client.readContract({\n address: account.address,\n abi: IAccountLoupeAbi,\n functionName: \"getExecutionHooks\",\n args: [selector]\n });\n },\n getPreValidationHooks: async ({ selector, account = client.account }) => {\n if (!account) {\n throw new AccountNotFoundError2();\n }\n if (!isSmartAccountClient(client)) {\n throw new IncompatibleClientError(\"SmartAccountClient\", \"getPreValidationHooks\", client);\n }\n return client.readContract({\n address: account.address,\n abi: IAccountLoupeAbi,\n functionName: \"getPreValidationHooks\",\n args: [selector]\n });\n },\n getInstalledPlugins: async ({ account = client.account }) => {\n if (!account) {\n throw new AccountNotFoundError2();\n }\n if (!isSmartAccountClient(client)) {\n throw new IncompatibleClientError(\"SmartAccountClient\", \"getInstalledPlugins\", client);\n }\n return client.readContract({\n address: account.address,\n abi: IAccountLoupeAbi,\n functionName: \"getInstalledPlugins\"\n }).catch(() => []);\n }\n });\n }\n });\n\n // ../../../node_modules/.pnpm/@account-kit+smart-contracts@4.62.0_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5._65dee0153d50ca3a2d2c6830319271d9/node_modules/@account-kit/smart-contracts/dist/esm/src/msca/plugins/multi-owner/plugin.js\n var addresses, MultiOwnerPlugin, multiOwnerPluginActions, MultiOwnerPluginExecutionFunctionAbi, MultiOwnerPluginAbi;\n var init_plugin = __esm({\n \"../../../node_modules/.pnpm/@account-kit+smart-contracts@4.62.0_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5._65dee0153d50ca3a2d2c6830319271d9/node_modules/@account-kit/smart-contracts/dist/esm/src/msca/plugins/multi-owner/plugin.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_esm();\n init_esm6();\n init_src();\n addresses = {\n 1: \"0xcE0000007B008F50d762D155002600004cD6c647\",\n 10: \"0xcE0000007B008F50d762D155002600004cD6c647\",\n 137: \"0xcE0000007B008F50d762D155002600004cD6c647\",\n 252: \"0xcE0000007B008F50d762D155002600004cD6c647\",\n 2523: \"0xcE0000007B008F50d762D155002600004cD6c647\",\n 8453: \"0xcE0000007B008F50d762D155002600004cD6c647\",\n 42161: \"0xcE0000007B008F50d762D155002600004cD6c647\",\n 80001: \"0xcE0000007B008F50d762D155002600004cD6c647\",\n 80002: \"0xcE0000007B008F50d762D155002600004cD6c647\",\n 84532: \"0xcE0000007B008F50d762D155002600004cD6c647\",\n 421614: \"0xcE0000007B008F50d762D155002600004cD6c647\",\n 7777777: \"0xcE0000007B008F50d762D155002600004cD6c647\",\n 11155111: \"0xcE0000007B008F50d762D155002600004cD6c647\",\n 11155420: \"0xcE0000007B008F50d762D155002600004cD6c647\",\n 999999999: \"0xcE0000007B008F50d762D155002600004cD6c647\"\n };\n MultiOwnerPlugin = {\n meta: {\n name: \"Multi Owner Plugin\",\n version: \"1.0.0\",\n addresses\n },\n getContract: (client, address) => {\n if (!client.chain)\n throw new ChainNotFoundError2();\n return getContract({\n address: address || addresses[client.chain.id],\n abi: MultiOwnerPluginAbi,\n client\n });\n }\n };\n multiOwnerPluginActions = (client) => ({\n updateOwners({ args, overrides, context: context2, account = client.account }) {\n if (!account) {\n throw new AccountNotFoundError2();\n }\n if (!isSmartAccountClient(client)) {\n throw new IncompatibleClientError(\"SmartAccountClient\", \"updateOwners\", client);\n }\n const uo = encodeFunctionData({\n abi: MultiOwnerPluginExecutionFunctionAbi,\n functionName: \"updateOwners\",\n args\n });\n return client.sendUserOperation({ uo, overrides, account, context: context2 });\n },\n installMultiOwnerPlugin({ account = client.account, overrides, context: context2, ...params }) {\n if (!account) {\n throw new AccountNotFoundError2();\n }\n if (!isSmartAccountClient(client)) {\n throw new IncompatibleClientError(\"SmartAccountClient\", \"installMultiOwnerPlugin\", client);\n }\n const chain2 = client.chain;\n if (!chain2) {\n throw new ChainNotFoundError2();\n }\n const dependencies = params.dependencyOverrides ?? [];\n const pluginAddress = params.pluginAddress ?? MultiOwnerPlugin.meta.addresses[chain2.id];\n if (!pluginAddress) {\n throw new Error(\"missing MultiOwnerPlugin address for chain \" + chain2.name);\n }\n return installPlugin(client, {\n pluginAddress,\n pluginInitData: encodeAbiParameters([{ type: \"address[]\" }], params.args),\n dependencies,\n overrides,\n account,\n context: context2\n });\n },\n encodeUpdateOwners({ args }) {\n return encodeFunctionData({\n abi: MultiOwnerPluginExecutionFunctionAbi,\n functionName: \"updateOwners\",\n args\n });\n },\n encodeEip712Domain() {\n return encodeFunctionData({\n abi: MultiOwnerPluginExecutionFunctionAbi,\n functionName: \"eip712Domain\"\n });\n },\n async readEip712Domain({ account = client.account }) {\n if (!account) {\n throw new AccountNotFoundError2();\n }\n if (!isSmartAccountClient(client)) {\n throw new IncompatibleClientError(\"SmartAccountClient\", \"readEip712Domain\", client);\n }\n return client.readContract({\n address: account.address,\n abi: MultiOwnerPluginExecutionFunctionAbi,\n functionName: \"eip712Domain\"\n });\n },\n encodeIsValidSignature({ args }) {\n return encodeFunctionData({\n abi: MultiOwnerPluginExecutionFunctionAbi,\n functionName: \"isValidSignature\",\n args\n });\n },\n async readIsValidSignature({ args, account = client.account }) {\n if (!account) {\n throw new AccountNotFoundError2();\n }\n if (!isSmartAccountClient(client)) {\n throw new IncompatibleClientError(\"SmartAccountClient\", \"readIsValidSignature\", client);\n }\n return client.readContract({\n address: account.address,\n abi: MultiOwnerPluginExecutionFunctionAbi,\n functionName: \"isValidSignature\",\n args\n });\n }\n });\n MultiOwnerPluginExecutionFunctionAbi = [\n {\n type: \"function\",\n name: \"updateOwners\",\n inputs: [\n { name: \"ownersToAdd\", type: \"address[]\", internalType: \"address[]\" },\n { name: \"ownersToRemove\", type: \"address[]\", internalType: \"address[]\" }\n ],\n outputs: [],\n stateMutability: \"nonpayable\"\n },\n {\n type: \"function\",\n name: \"eip712Domain\",\n inputs: [],\n outputs: [\n { name: \"fields\", type: \"bytes1\", internalType: \"bytes1\" },\n { name: \"name\", type: \"string\", internalType: \"string\" },\n { name: \"version\", type: \"string\", internalType: \"string\" },\n { name: \"chainId\", type: \"uint256\", internalType: \"uint256\" },\n { name: \"verifyingContract\", type: \"address\", internalType: \"address\" },\n { name: \"salt\", type: \"bytes32\", internalType: \"bytes32\" },\n { name: \"extensions\", type: \"uint256[]\", internalType: \"uint256[]\" }\n ],\n stateMutability: \"view\"\n },\n {\n type: \"function\",\n name: \"isValidSignature\",\n inputs: [\n { name: \"digest\", type: \"bytes32\", internalType: \"bytes32\" },\n { name: \"signature\", type: \"bytes\", internalType: \"bytes\" }\n ],\n outputs: [{ name: \"\", type: \"bytes4\", internalType: \"bytes4\" }],\n stateMutability: \"view\"\n }\n ];\n MultiOwnerPluginAbi = [\n {\n type: \"function\",\n name: \"eip712Domain\",\n inputs: [],\n outputs: [\n { name: \"fields\", type: \"bytes1\", internalType: \"bytes1\" },\n { name: \"name\", type: \"string\", internalType: \"string\" },\n { name: \"version\", type: \"string\", internalType: \"string\" },\n { name: \"chainId\", type: \"uint256\", internalType: \"uint256\" },\n { name: \"verifyingContract\", type: \"address\", internalType: \"address\" },\n { name: \"salt\", type: \"bytes32\", internalType: \"bytes32\" },\n { name: \"extensions\", type: \"uint256[]\", internalType: \"uint256[]\" }\n ],\n stateMutability: \"view\"\n },\n {\n type: \"function\",\n name: \"encodeMessageData\",\n inputs: [\n { name: \"account\", type: \"address\", internalType: \"address\" },\n { name: \"message\", type: \"bytes\", internalType: \"bytes\" }\n ],\n outputs: [{ name: \"\", type: \"bytes\", internalType: \"bytes\" }],\n stateMutability: \"view\"\n },\n {\n type: \"function\",\n name: \"getMessageHash\",\n inputs: [\n { name: \"account\", type: \"address\", internalType: \"address\" },\n { name: \"message\", type: \"bytes\", internalType: \"bytes\" }\n ],\n outputs: [{ name: \"\", type: \"bytes32\", internalType: \"bytes32\" }],\n stateMutability: \"view\"\n },\n {\n type: \"function\",\n name: \"isOwnerOf\",\n inputs: [\n { name: \"account\", type: \"address\", internalType: \"address\" },\n { name: \"ownerToCheck\", type: \"address\", internalType: \"address\" }\n ],\n outputs: [{ name: \"\", type: \"bool\", internalType: \"bool\" }],\n stateMutability: \"view\"\n },\n {\n type: \"function\",\n name: \"isValidSignature\",\n inputs: [\n { name: \"digest\", type: \"bytes32\", internalType: \"bytes32\" },\n { name: \"signature\", type: \"bytes\", internalType: \"bytes\" }\n ],\n outputs: [{ name: \"\", type: \"bytes4\", internalType: \"bytes4\" }],\n stateMutability: \"view\"\n },\n {\n type: \"function\",\n name: \"onInstall\",\n inputs: [{ name: \"data\", type: \"bytes\", internalType: \"bytes\" }],\n outputs: [],\n stateMutability: \"nonpayable\"\n },\n {\n type: \"function\",\n name: \"onUninstall\",\n inputs: [{ name: \"\", type: \"bytes\", internalType: \"bytes\" }],\n outputs: [],\n stateMutability: \"nonpayable\"\n },\n {\n type: \"function\",\n name: \"ownersOf\",\n inputs: [{ name: \"account\", type: \"address\", internalType: \"address\" }],\n outputs: [{ name: \"\", type: \"address[]\", internalType: \"address[]\" }],\n stateMutability: \"view\"\n },\n {\n type: \"function\",\n name: \"pluginManifest\",\n inputs: [],\n outputs: [\n {\n name: \"\",\n type: \"tuple\",\n internalType: \"struct PluginManifest\",\n components: [\n { name: \"interfaceIds\", type: \"bytes4[]\", internalType: \"bytes4[]\" },\n {\n name: \"dependencyInterfaceIds\",\n type: \"bytes4[]\",\n internalType: \"bytes4[]\"\n },\n {\n name: \"executionFunctions\",\n type: \"bytes4[]\",\n internalType: \"bytes4[]\"\n },\n {\n name: \"permittedExecutionSelectors\",\n type: \"bytes4[]\",\n internalType: \"bytes4[]\"\n },\n {\n name: \"permitAnyExternalAddress\",\n type: \"bool\",\n internalType: \"bool\"\n },\n { name: \"canSpendNativeToken\", type: \"bool\", internalType: \"bool\" },\n {\n name: \"permittedExternalCalls\",\n type: \"tuple[]\",\n internalType: \"struct ManifestExternalCallPermission[]\",\n components: [\n {\n name: \"externalAddress\",\n type: \"address\",\n internalType: \"address\"\n },\n { name: \"permitAnySelector\", type: \"bool\", internalType: \"bool\" },\n { name: \"selectors\", type: \"bytes4[]\", internalType: \"bytes4[]\" }\n ]\n },\n {\n name: \"userOpValidationFunctions\",\n type: \"tuple[]\",\n internalType: \"struct ManifestAssociatedFunction[]\",\n components: [\n {\n name: \"executionSelector\",\n type: \"bytes4\",\n internalType: \"bytes4\"\n },\n {\n name: \"associatedFunction\",\n type: \"tuple\",\n internalType: \"struct ManifestFunction\",\n components: [\n {\n name: \"functionType\",\n type: \"uint8\",\n internalType: \"enum ManifestAssociatedFunctionType\"\n },\n { name: \"functionId\", type: \"uint8\", internalType: \"uint8\" },\n {\n name: \"dependencyIndex\",\n type: \"uint256\",\n internalType: \"uint256\"\n }\n ]\n }\n ]\n },\n {\n name: \"runtimeValidationFunctions\",\n type: \"tuple[]\",\n internalType: \"struct ManifestAssociatedFunction[]\",\n components: [\n {\n name: \"executionSelector\",\n type: \"bytes4\",\n internalType: \"bytes4\"\n },\n {\n name: \"associatedFunction\",\n type: \"tuple\",\n internalType: \"struct ManifestFunction\",\n components: [\n {\n name: \"functionType\",\n type: \"uint8\",\n internalType: \"enum ManifestAssociatedFunctionType\"\n },\n { name: \"functionId\", type: \"uint8\", internalType: \"uint8\" },\n {\n name: \"dependencyIndex\",\n type: \"uint256\",\n internalType: \"uint256\"\n }\n ]\n }\n ]\n },\n {\n name: \"preUserOpValidationHooks\",\n type: \"tuple[]\",\n internalType: \"struct ManifestAssociatedFunction[]\",\n components: [\n {\n name: \"executionSelector\",\n type: \"bytes4\",\n internalType: \"bytes4\"\n },\n {\n name: \"associatedFunction\",\n type: \"tuple\",\n internalType: \"struct ManifestFunction\",\n components: [\n {\n name: \"functionType\",\n type: \"uint8\",\n internalType: \"enum ManifestAssociatedFunctionType\"\n },\n { name: \"functionId\", type: \"uint8\", internalType: \"uint8\" },\n {\n name: \"dependencyIndex\",\n type: \"uint256\",\n internalType: \"uint256\"\n }\n ]\n }\n ]\n },\n {\n name: \"preRuntimeValidationHooks\",\n type: \"tuple[]\",\n internalType: \"struct ManifestAssociatedFunction[]\",\n components: [\n {\n name: \"executionSelector\",\n type: \"bytes4\",\n internalType: \"bytes4\"\n },\n {\n name: \"associatedFunction\",\n type: \"tuple\",\n internalType: \"struct ManifestFunction\",\n components: [\n {\n name: \"functionType\",\n type: \"uint8\",\n internalType: \"enum ManifestAssociatedFunctionType\"\n },\n { name: \"functionId\", type: \"uint8\", internalType: \"uint8\" },\n {\n name: \"dependencyIndex\",\n type: \"uint256\",\n internalType: \"uint256\"\n }\n ]\n }\n ]\n },\n {\n name: \"executionHooks\",\n type: \"tuple[]\",\n internalType: \"struct ManifestExecutionHook[]\",\n components: [\n {\n name: \"executionSelector\",\n type: \"bytes4\",\n internalType: \"bytes4\"\n },\n {\n name: \"preExecHook\",\n type: \"tuple\",\n internalType: \"struct ManifestFunction\",\n components: [\n {\n name: \"functionType\",\n type: \"uint8\",\n internalType: \"enum ManifestAssociatedFunctionType\"\n },\n { name: \"functionId\", type: \"uint8\", internalType: \"uint8\" },\n {\n name: \"dependencyIndex\",\n type: \"uint256\",\n internalType: \"uint256\"\n }\n ]\n },\n {\n name: \"postExecHook\",\n type: \"tuple\",\n internalType: \"struct ManifestFunction\",\n components: [\n {\n name: \"functionType\",\n type: \"uint8\",\n internalType: \"enum ManifestAssociatedFunctionType\"\n },\n { name: \"functionId\", type: \"uint8\", internalType: \"uint8\" },\n {\n name: \"dependencyIndex\",\n type: \"uint256\",\n internalType: \"uint256\"\n }\n ]\n }\n ]\n }\n ]\n }\n ],\n stateMutability: \"pure\"\n },\n {\n type: \"function\",\n name: \"pluginMetadata\",\n inputs: [],\n outputs: [\n {\n name: \"\",\n type: \"tuple\",\n internalType: \"struct PluginMetadata\",\n components: [\n { name: \"name\", type: \"string\", internalType: \"string\" },\n { name: \"version\", type: \"string\", internalType: \"string\" },\n { name: \"author\", type: \"string\", internalType: \"string\" },\n {\n name: \"permissionDescriptors\",\n type: \"tuple[]\",\n internalType: \"struct SelectorPermission[]\",\n components: [\n {\n name: \"functionSelector\",\n type: \"bytes4\",\n internalType: \"bytes4\"\n },\n {\n name: \"permissionDescription\",\n type: \"string\",\n internalType: \"string\"\n }\n ]\n }\n ]\n }\n ],\n stateMutability: \"pure\"\n },\n {\n type: \"function\",\n name: \"postExecutionHook\",\n inputs: [\n { name: \"functionId\", type: \"uint8\", internalType: \"uint8\" },\n { name: \"preExecHookData\", type: \"bytes\", internalType: \"bytes\" }\n ],\n outputs: [],\n stateMutability: \"nonpayable\"\n },\n {\n type: \"function\",\n name: \"preExecutionHook\",\n inputs: [\n { name: \"functionId\", type: \"uint8\", internalType: \"uint8\" },\n { name: \"sender\", type: \"address\", internalType: \"address\" },\n { name: \"value\", type: \"uint256\", internalType: \"uint256\" },\n { name: \"data\", type: \"bytes\", internalType: \"bytes\" }\n ],\n outputs: [{ name: \"\", type: \"bytes\", internalType: \"bytes\" }],\n stateMutability: \"nonpayable\"\n },\n {\n type: \"function\",\n name: \"preRuntimeValidationHook\",\n inputs: [\n { name: \"functionId\", type: \"uint8\", internalType: \"uint8\" },\n { name: \"sender\", type: \"address\", internalType: \"address\" },\n { name: \"value\", type: \"uint256\", internalType: \"uint256\" },\n { name: \"data\", type: \"bytes\", internalType: \"bytes\" }\n ],\n outputs: [],\n stateMutability: \"nonpayable\"\n },\n {\n type: \"function\",\n name: \"preUserOpValidationHook\",\n inputs: [\n { name: \"functionId\", type: \"uint8\", internalType: \"uint8\" },\n {\n name: \"userOp\",\n type: \"tuple\",\n internalType: \"struct UserOperation\",\n components: [\n { name: \"sender\", type: \"address\", internalType: \"address\" },\n { name: \"nonce\", type: \"uint256\", internalType: \"uint256\" },\n { name: \"initCode\", type: \"bytes\", internalType: \"bytes\" },\n { name: \"callData\", type: \"bytes\", internalType: \"bytes\" },\n { name: \"callGasLimit\", type: \"uint256\", internalType: \"uint256\" },\n {\n name: \"verificationGasLimit\",\n type: \"uint256\",\n internalType: \"uint256\"\n },\n {\n name: \"preVerificationGas\",\n type: \"uint256\",\n internalType: \"uint256\"\n },\n { name: \"maxFeePerGas\", type: \"uint256\", internalType: \"uint256\" },\n {\n name: \"maxPriorityFeePerGas\",\n type: \"uint256\",\n internalType: \"uint256\"\n },\n { name: \"paymasterAndData\", type: \"bytes\", internalType: \"bytes\" },\n { name: \"signature\", type: \"bytes\", internalType: \"bytes\" }\n ]\n },\n { name: \"userOpHash\", type: \"bytes32\", internalType: \"bytes32\" }\n ],\n outputs: [{ name: \"\", type: \"uint256\", internalType: \"uint256\" }],\n stateMutability: \"nonpayable\"\n },\n {\n type: \"function\",\n name: \"runtimeValidationFunction\",\n inputs: [\n { name: \"functionId\", type: \"uint8\", internalType: \"uint8\" },\n { name: \"sender\", type: \"address\", internalType: \"address\" },\n { name: \"\", type: \"uint256\", internalType: \"uint256\" },\n { name: \"\", type: \"bytes\", internalType: \"bytes\" }\n ],\n outputs: [],\n stateMutability: \"view\"\n },\n {\n type: \"function\",\n name: \"supportsInterface\",\n inputs: [{ name: \"interfaceId\", type: \"bytes4\", internalType: \"bytes4\" }],\n outputs: [{ name: \"\", type: \"bool\", internalType: \"bool\" }],\n stateMutability: \"view\"\n },\n {\n type: \"function\",\n name: \"updateOwners\",\n inputs: [\n { name: \"ownersToAdd\", type: \"address[]\", internalType: \"address[]\" },\n { name: \"ownersToRemove\", type: \"address[]\", internalType: \"address[]\" }\n ],\n outputs: [],\n stateMutability: \"nonpayable\"\n },\n {\n type: \"function\",\n name: \"userOpValidationFunction\",\n inputs: [\n { name: \"functionId\", type: \"uint8\", internalType: \"uint8\" },\n {\n name: \"userOp\",\n type: \"tuple\",\n internalType: \"struct UserOperation\",\n components: [\n { name: \"sender\", type: \"address\", internalType: \"address\" },\n { name: \"nonce\", type: \"uint256\", internalType: \"uint256\" },\n { name: \"initCode\", type: \"bytes\", internalType: \"bytes\" },\n { name: \"callData\", type: \"bytes\", internalType: \"bytes\" },\n { name: \"callGasLimit\", type: \"uint256\", internalType: \"uint256\" },\n {\n name: \"verificationGasLimit\",\n type: \"uint256\",\n internalType: \"uint256\"\n },\n {\n name: \"preVerificationGas\",\n type: \"uint256\",\n internalType: \"uint256\"\n },\n { name: \"maxFeePerGas\", type: \"uint256\", internalType: \"uint256\" },\n {\n name: \"maxPriorityFeePerGas\",\n type: \"uint256\",\n internalType: \"uint256\"\n },\n { name: \"paymasterAndData\", type: \"bytes\", internalType: \"bytes\" },\n { name: \"signature\", type: \"bytes\", internalType: \"bytes\" }\n ]\n },\n { name: \"userOpHash\", type: \"bytes32\", internalType: \"bytes32\" }\n ],\n outputs: [{ name: \"\", type: \"uint256\", internalType: \"uint256\" }],\n stateMutability: \"view\"\n },\n {\n type: \"event\",\n name: \"OwnerUpdated\",\n inputs: [\n {\n name: \"account\",\n type: \"address\",\n indexed: true,\n internalType: \"address\"\n },\n {\n name: \"addedOwners\",\n type: \"address[]\",\n indexed: false,\n internalType: \"address[]\"\n },\n {\n name: \"removedOwners\",\n type: \"address[]\",\n indexed: false,\n internalType: \"address[]\"\n }\n ],\n anonymous: false\n },\n { type: \"error\", name: \"AlreadyInitialized\", inputs: [] },\n { type: \"error\", name: \"EmptyOwnersNotAllowed\", inputs: [] },\n { type: \"error\", name: \"InvalidAction\", inputs: [] },\n {\n type: \"error\",\n name: \"InvalidOwner\",\n inputs: [{ name: \"owner\", type: \"address\", internalType: \"address\" }]\n },\n { type: \"error\", name: \"NotAuthorized\", inputs: [] },\n {\n type: \"error\",\n name: \"NotContractCaller\",\n inputs: [{ name: \"caller\", type: \"address\", internalType: \"address\" }]\n },\n {\n type: \"error\",\n name: \"NotImplemented\",\n inputs: [\n { name: \"selector\", type: \"bytes4\", internalType: \"bytes4\" },\n { name: \"functionId\", type: \"uint8\", internalType: \"uint8\" }\n ]\n },\n { type: \"error\", name: \"NotInitialized\", inputs: [] },\n {\n type: \"error\",\n name: \"OwnerDoesNotExist\",\n inputs: [{ name: \"owner\", type: \"address\", internalType: \"address\" }]\n }\n ];\n }\n });\n\n // ../../../node_modules/.pnpm/@account-kit+smart-contracts@4.62.0_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5._65dee0153d50ca3a2d2c6830319271d9/node_modules/@account-kit/smart-contracts/dist/esm/src/msca/plugins/multi-owner/signer.js\n var multiOwnerMessageSigner;\n var init_signer2 = __esm({\n \"../../../node_modules/.pnpm/@account-kit+smart-contracts@4.62.0_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5._65dee0153d50ca3a2d2c6830319271d9/node_modules/@account-kit/smart-contracts/dist/esm/src/msca/plugins/multi-owner/signer.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_esm();\n init_plugin();\n multiOwnerMessageSigner = (client, accountAddress, signer, pluginAddress = MultiOwnerPlugin.meta.addresses[client.chain.id]) => {\n const get712Wrapper = async (msg) => {\n const [, name, version6, chainId, verifyingContract, salt] = await client.readContract({\n abi: MultiOwnerPluginAbi,\n address: pluginAddress,\n functionName: \"eip712Domain\",\n account: accountAddress\n });\n return {\n domain: {\n chainId: Number(chainId),\n name,\n salt,\n verifyingContract,\n version: version6\n },\n types: {\n AlchemyModularAccountMessage: [{ name: \"message\", type: \"bytes\" }]\n },\n message: {\n message: msg\n },\n primaryType: \"AlchemyModularAccountMessage\"\n };\n };\n const prepareSign = async (params) => {\n const data = await get712Wrapper(params.type === \"personal_sign\" ? hashMessage(params.data) : hashTypedData(params.data));\n return {\n type: \"eth_signTypedData_v4\",\n data\n };\n };\n const formatSign = async (signature) => {\n return signature;\n };\n return {\n prepareSign,\n formatSign,\n getDummySignature: () => {\n return \"0xfffffffffffffffffffffffffffffff0000000000000000000000000000000007aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa1c\";\n },\n signUserOperationHash: (uoHash) => {\n return signer().signMessage({ raw: uoHash });\n },\n async signMessage({ message }) {\n const { type, data } = await prepareSign({\n type: \"personal_sign\",\n data: message\n });\n return type === \"personal_sign\" ? signer().signMessage(data) : signer().signTypedData(data);\n },\n signTypedData: async (typedDataDefinition) => {\n const { type, data } = await prepareSign({\n type: \"eth_signTypedData_v4\",\n data: typedDataDefinition\n });\n return type === \"personal_sign\" ? signer().signMessage(data) : signer().signTypedData(data);\n }\n };\n };\n }\n });\n\n // ../../../node_modules/.pnpm/@account-kit+smart-contracts@4.62.0_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5._65dee0153d50ca3a2d2c6830319271d9/node_modules/@account-kit/smart-contracts/dist/esm/src/msca/utils.js\n async function getMSCAUpgradeToData(client, args) {\n const { account: account_ = client.account, multiOwnerPluginAddress } = args;\n if (!account_) {\n throw new AccountNotFoundError2();\n }\n const account = account_;\n const chain2 = client.chain;\n if (!chain2) {\n throw new ChainNotFoundError2();\n }\n const initData = await getMAInitializationData({\n client,\n multiOwnerPluginAddress,\n signerAddress: await account.getSigner().getAddress()\n });\n return {\n ...initData,\n createMAAccount: async () => createMultiOwnerModularAccount({\n transport: custom(client.transport),\n chain: chain2,\n signer: account.getSigner(),\n accountAddress: account.address\n })\n };\n }\n async function getMAInitializationData({ client, multiOwnerPluginAddress, signerAddress }) {\n if (!client.chain) {\n throw new ChainNotFoundError2();\n }\n const factoryAddress = getDefaultMultiOwnerModularAccountFactoryAddress(client.chain);\n const implAddress = await client.readContract({\n abi: MultiOwnerModularAccountFactoryAbi,\n address: factoryAddress,\n functionName: \"IMPL\"\n });\n const multiOwnerAddress = multiOwnerPluginAddress ?? MultiOwnerPlugin.meta.addresses[client.chain.id];\n if (!multiOwnerAddress) {\n throw new Error(\"could not get multi owner plugin address\");\n }\n const moPluginManifest = await client.readContract({\n abi: IPluginAbi,\n address: multiOwnerAddress,\n functionName: \"pluginManifest\"\n });\n const hashedMultiOwnerPluginManifest = keccak256(encodeFunctionResult({\n abi: IPluginAbi,\n functionName: \"pluginManifest\",\n result: moPluginManifest\n }));\n const encodedOwner = encodeAbiParameters(parseAbiParameters(\"address[]\"), Array.isArray(signerAddress) ? [signerAddress] : [[signerAddress]]);\n const encodedPluginInitData = encodeAbiParameters(parseAbiParameters(\"bytes32[], bytes[]\"), [[hashedMultiOwnerPluginManifest], [encodedOwner]]);\n const encodedMSCAInitializeData = encodeFunctionData({\n abi: UpgradeableModularAccountAbi,\n functionName: \"initialize\",\n args: [[multiOwnerAddress], encodedPluginInitData]\n });\n return {\n implAddress,\n initializationData: encodedMSCAInitializeData\n };\n }\n var getDefaultMultisigModularAccountFactoryAddress, getDefaultMultiOwnerModularAccountFactoryAddress;\n var init_utils12 = __esm({\n \"../../../node_modules/.pnpm/@account-kit+smart-contracts@4.62.0_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5._65dee0153d50ca3a2d2c6830319271d9/node_modules/@account-kit/smart-contracts/dist/esm/src/msca/utils.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_esm6();\n init_exports3();\n init_esm();\n init_IPlugin();\n init_MultiOwnerModularAccountFactory();\n init_UpgradeableModularAccount();\n init_multiOwnerAccount();\n init_plugin();\n getDefaultMultisigModularAccountFactoryAddress = (chain2) => {\n switch (chain2.id) {\n case sepolia3.id:\n case baseSepolia3.id:\n case polygon3.id:\n case mainnet3.id:\n case polygonAmoy3.id:\n case optimism3.id:\n case optimismSepolia3.id:\n case arbitrum3.id:\n case arbitrumSepolia3.id:\n case base3.id:\n default:\n return \"0x000000000000204327E6669f00901a57CE15aE15\";\n }\n };\n getDefaultMultiOwnerModularAccountFactoryAddress = (chain2) => {\n switch (chain2.id) {\n default:\n return \"0x000000e92D78D90000007F0082006FDA09BD5f11\";\n }\n };\n }\n });\n\n // ../../../node_modules/.pnpm/@account-kit+smart-contracts@4.62.0_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5._65dee0153d50ca3a2d2c6830319271d9/node_modules/@account-kit/smart-contracts/dist/esm/src/msca/account/standardExecutor.js\n var standardExecutor;\n var init_standardExecutor = __esm({\n \"../../../node_modules/.pnpm/@account-kit+smart-contracts@4.62.0_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5._65dee0153d50ca3a2d2c6830319271d9/node_modules/@account-kit/smart-contracts/dist/esm/src/msca/account/standardExecutor.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_esm();\n init_IStandardExecutor();\n standardExecutor = {\n encodeExecute: async ({ target, data, value }) => {\n return encodeFunctionData({\n abi: IStandardExecutorAbi,\n functionName: \"execute\",\n args: [target, value ?? 0n, data]\n });\n },\n encodeBatchExecute: async (txs) => {\n return encodeFunctionData({\n abi: IStandardExecutorAbi,\n functionName: \"executeBatch\",\n args: [\n txs.map((tx) => ({\n target: tx.target,\n data: tx.data,\n value: tx.value ?? 0n\n }))\n ]\n });\n }\n };\n }\n });\n\n // ../../../node_modules/.pnpm/@account-kit+smart-contracts@4.62.0_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5._65dee0153d50ca3a2d2c6830319271d9/node_modules/@account-kit/smart-contracts/dist/esm/src/msca/account/multiOwnerAccount.js\n async function createMultiOwnerModularAccount(config2) {\n const { transport, chain: chain2, signer, accountAddress, initCode, entryPoint = getEntryPoint(chain2, { version: \"0.6.0\" }), factoryAddress = getDefaultMultiOwnerModularAccountFactoryAddress(chain2), owners = [], salt = 0n } = config2;\n const client = createBundlerClient({\n transport,\n chain: chain2\n });\n const getAccountInitCode = async () => {\n if (initCode) {\n return initCode;\n }\n const ownerAddress = await signer.getAddress();\n const owners_ = Array.from(/* @__PURE__ */ new Set([...owners, ownerAddress])).filter((x4) => hexToBigInt(x4) !== 0n).sort((a3, b4) => {\n const bigintA = hexToBigInt(a3);\n const bigintB = hexToBigInt(b4);\n return bigintA < bigintB ? -1 : bigintA > bigintB ? 1 : 0;\n });\n return concatHex([\n factoryAddress,\n encodeFunctionData({\n abi: MultiOwnerModularAccountFactoryAbi,\n functionName: \"createAccount\",\n args: [salt, owners_]\n })\n ]);\n };\n const _accountAddress = await getAccountAddress({\n client,\n entryPoint,\n accountAddress,\n getAccountInitCode\n });\n const baseAccount = await toSmartContractAccount({\n transport,\n chain: chain2,\n entryPoint,\n accountAddress: _accountAddress,\n source: `MultiOwnerModularAccount`,\n getAccountInitCode,\n ...standardExecutor,\n ...multiOwnerMessageSigner(client, _accountAddress, () => signer)\n });\n return {\n ...baseAccount,\n publicKey: await signer.getAddress(),\n getSigner: () => signer\n };\n }\n var init_multiOwnerAccount = __esm({\n \"../../../node_modules/.pnpm/@account-kit+smart-contracts@4.62.0_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5._65dee0153d50ca3a2d2c6830319271d9/node_modules/@account-kit/smart-contracts/dist/esm/src/msca/account/multiOwnerAccount.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_esm6();\n init_esm();\n init_MultiOwnerModularAccountFactory();\n init_signer2();\n init_utils12();\n init_standardExecutor();\n }\n });\n\n // ../../../node_modules/.pnpm/@account-kit+smart-contracts@4.62.0_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5._65dee0153d50ca3a2d2c6830319271d9/node_modules/@account-kit/smart-contracts/dist/esm/src/msca/plugins/multisig/plugin.js\n var addresses2, MultisigPlugin, multisigPluginActions, MultisigPluginExecutionFunctionAbi, MultisigPluginAbi;\n var init_plugin2 = __esm({\n \"../../../node_modules/.pnpm/@account-kit+smart-contracts@4.62.0_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5._65dee0153d50ca3a2d2c6830319271d9/node_modules/@account-kit/smart-contracts/dist/esm/src/msca/plugins/multisig/plugin.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_esm();\n init_esm6();\n init_src();\n addresses2 = {\n 1: \"0x000000000000A53f64b7bcf4Cd59624943C43Fc7\",\n 10: \"0x000000000000A53f64b7bcf4Cd59624943C43Fc7\",\n 137: \"0x000000000000A53f64b7bcf4Cd59624943C43Fc7\",\n 252: \"0x000000000000A53f64b7bcf4Cd59624943C43Fc7\",\n 1337: \"0x000000000000A53f64b7bcf4Cd59624943C43Fc7\",\n 2523: \"0x000000000000A53f64b7bcf4Cd59624943C43Fc7\",\n 8453: \"0x000000000000A53f64b7bcf4Cd59624943C43Fc7\",\n 42161: \"0x000000000000A53f64b7bcf4Cd59624943C43Fc7\",\n 80002: \"0x000000000000A53f64b7bcf4Cd59624943C43Fc7\",\n 84532: \"0x000000000000A53f64b7bcf4Cd59624943C43Fc7\",\n 421614: \"0x000000000000A53f64b7bcf4Cd59624943C43Fc7\",\n 7777777: \"0x000000000000A53f64b7bcf4Cd59624943C43Fc7\",\n 11155111: \"0x000000000000A53f64b7bcf4Cd59624943C43Fc7\",\n 11155420: \"0x000000000000A53f64b7bcf4Cd59624943C43Fc7\",\n 999999999: \"0x000000000000A53f64b7bcf4Cd59624943C43Fc7\"\n };\n MultisigPlugin = {\n meta: {\n name: \"Multisig Plugin\",\n version: \"1.0.0\",\n addresses: addresses2\n },\n getContract: (client, address) => {\n if (!client.chain)\n throw new ChainNotFoundError2();\n return getContract({\n address: address || addresses2[client.chain.id],\n abi: MultisigPluginAbi,\n client\n });\n }\n };\n multisigPluginActions = (client) => ({\n updateOwnership({ args, overrides, context: context2, account = client.account }) {\n if (!account) {\n throw new AccountNotFoundError2();\n }\n if (!isSmartAccountClient(client)) {\n throw new IncompatibleClientError(\"SmartAccountClient\", \"updateOwnership\", client);\n }\n const uo = encodeFunctionData({\n abi: MultisigPluginExecutionFunctionAbi,\n functionName: \"updateOwnership\",\n args\n });\n return client.sendUserOperation({ uo, overrides, account, context: context2 });\n },\n installMultisigPlugin({ account = client.account, overrides, context: context2, ...params }) {\n if (!account) {\n throw new AccountNotFoundError2();\n }\n if (!isSmartAccountClient(client)) {\n throw new IncompatibleClientError(\"SmartAccountClient\", \"installMultisigPlugin\", client);\n }\n const chain2 = client.chain;\n if (!chain2) {\n throw new ChainNotFoundError2();\n }\n const dependencies = params.dependencyOverrides ?? [];\n const pluginAddress = params.pluginAddress ?? MultisigPlugin.meta.addresses[chain2.id];\n if (!pluginAddress) {\n throw new Error(\"missing MultisigPlugin address for chain \" + chain2.name);\n }\n return installPlugin(client, {\n pluginAddress,\n pluginInitData: encodeAbiParameters([{ type: \"address[]\" }, { type: \"uint256\" }], params.args),\n dependencies,\n overrides,\n account,\n context: context2\n });\n },\n encodeUpdateOwnership({ args }) {\n return encodeFunctionData({\n abi: MultisigPluginExecutionFunctionAbi,\n functionName: \"updateOwnership\",\n args\n });\n },\n encodeEip712Domain() {\n return encodeFunctionData({\n abi: MultisigPluginExecutionFunctionAbi,\n functionName: \"eip712Domain\"\n });\n },\n async readEip712Domain({ account = client.account }) {\n if (!account) {\n throw new AccountNotFoundError2();\n }\n if (!isSmartAccountClient(client)) {\n throw new IncompatibleClientError(\"SmartAccountClient\", \"readEip712Domain\", client);\n }\n return client.readContract({\n address: account.address,\n abi: MultisigPluginExecutionFunctionAbi,\n functionName: \"eip712Domain\"\n });\n },\n encodeIsValidSignature({ args }) {\n return encodeFunctionData({\n abi: MultisigPluginExecutionFunctionAbi,\n functionName: \"isValidSignature\",\n args\n });\n },\n async readIsValidSignature({ args, account = client.account }) {\n if (!account) {\n throw new AccountNotFoundError2();\n }\n if (!isSmartAccountClient(client)) {\n throw new IncompatibleClientError(\"SmartAccountClient\", \"readIsValidSignature\", client);\n }\n return client.readContract({\n address: account.address,\n abi: MultisigPluginExecutionFunctionAbi,\n functionName: \"isValidSignature\",\n args\n });\n }\n });\n MultisigPluginExecutionFunctionAbi = [\n {\n type: \"function\",\n name: \"updateOwnership\",\n inputs: [\n { name: \"ownersToAdd\", type: \"address[]\", internalType: \"address[]\" },\n { name: \"ownersToRemove\", type: \"address[]\", internalType: \"address[]\" },\n { name: \"newThreshold\", type: \"uint128\", internalType: \"uint128\" }\n ],\n outputs: [],\n stateMutability: \"nonpayable\"\n },\n {\n type: \"function\",\n name: \"eip712Domain\",\n inputs: [],\n outputs: [\n { name: \"fields\", type: \"bytes1\", internalType: \"bytes1\" },\n { name: \"name\", type: \"string\", internalType: \"string\" },\n { name: \"version\", type: \"string\", internalType: \"string\" },\n { name: \"chainId\", type: \"uint256\", internalType: \"uint256\" },\n { name: \"verifyingContract\", type: \"address\", internalType: \"address\" },\n { name: \"salt\", type: \"bytes32\", internalType: \"bytes32\" },\n { name: \"extensions\", type: \"uint256[]\", internalType: \"uint256[]\" }\n ],\n stateMutability: \"view\"\n },\n {\n type: \"function\",\n name: \"isValidSignature\",\n inputs: [\n { name: \"digest\", type: \"bytes32\", internalType: \"bytes32\" },\n { name: \"signature\", type: \"bytes\", internalType: \"bytes\" }\n ],\n outputs: [{ name: \"\", type: \"bytes4\", internalType: \"bytes4\" }],\n stateMutability: \"view\"\n }\n ];\n MultisigPluginAbi = [\n {\n type: \"constructor\",\n inputs: [{ name: \"entryPoint\", type: \"address\", internalType: \"address\" }],\n stateMutability: \"nonpayable\"\n },\n {\n type: \"function\",\n name: \"ENTRYPOINT\",\n inputs: [],\n outputs: [{ name: \"\", type: \"address\", internalType: \"address\" }],\n stateMutability: \"view\"\n },\n {\n type: \"function\",\n name: \"checkNSignatures\",\n inputs: [\n { name: \"actualDigest\", type: \"bytes32\", internalType: \"bytes32\" },\n { name: \"upperLimitGasDigest\", type: \"bytes32\", internalType: \"bytes32\" },\n { name: \"account\", type: \"address\", internalType: \"address\" },\n { name: \"signatures\", type: \"bytes\", internalType: \"bytes\" }\n ],\n outputs: [\n { name: \"success\", type: \"bool\", internalType: \"bool\" },\n { name: \"firstFailure\", type: \"uint256\", internalType: \"uint256\" }\n ],\n stateMutability: \"view\"\n },\n {\n type: \"function\",\n name: \"eip712Domain\",\n inputs: [],\n outputs: [\n { name: \"fields\", type: \"bytes1\", internalType: \"bytes1\" },\n { name: \"name\", type: \"string\", internalType: \"string\" },\n { name: \"version\", type: \"string\", internalType: \"string\" },\n { name: \"chainId\", type: \"uint256\", internalType: \"uint256\" },\n { name: \"verifyingContract\", type: \"address\", internalType: \"address\" },\n { name: \"salt\", type: \"bytes32\", internalType: \"bytes32\" },\n { name: \"extensions\", type: \"uint256[]\", internalType: \"uint256[]\" }\n ],\n stateMutability: \"view\"\n },\n {\n type: \"function\",\n name: \"encodeMessageData\",\n inputs: [\n { name: \"account\", type: \"address\", internalType: \"address\" },\n { name: \"message\", type: \"bytes\", internalType: \"bytes\" }\n ],\n outputs: [{ name: \"\", type: \"bytes\", internalType: \"bytes\" }],\n stateMutability: \"view\"\n },\n {\n type: \"function\",\n name: \"getMessageHash\",\n inputs: [\n { name: \"account\", type: \"address\", internalType: \"address\" },\n { name: \"message\", type: \"bytes\", internalType: \"bytes\" }\n ],\n outputs: [{ name: \"\", type: \"bytes32\", internalType: \"bytes32\" }],\n stateMutability: \"view\"\n },\n {\n type: \"function\",\n name: \"isOwnerOf\",\n inputs: [\n { name: \"account\", type: \"address\", internalType: \"address\" },\n { name: \"ownerToCheck\", type: \"address\", internalType: \"address\" }\n ],\n outputs: [{ name: \"\", type: \"bool\", internalType: \"bool\" }],\n stateMutability: \"view\"\n },\n {\n type: \"function\",\n name: \"isValidSignature\",\n inputs: [\n { name: \"digest\", type: \"bytes32\", internalType: \"bytes32\" },\n { name: \"signature\", type: \"bytes\", internalType: \"bytes\" }\n ],\n outputs: [{ name: \"\", type: \"bytes4\", internalType: \"bytes4\" }],\n stateMutability: \"view\"\n },\n {\n type: \"function\",\n name: \"onInstall\",\n inputs: [{ name: \"data\", type: \"bytes\", internalType: \"bytes\" }],\n outputs: [],\n stateMutability: \"nonpayable\"\n },\n {\n type: \"function\",\n name: \"onUninstall\",\n inputs: [{ name: \"\", type: \"bytes\", internalType: \"bytes\" }],\n outputs: [],\n stateMutability: \"nonpayable\"\n },\n {\n type: \"function\",\n name: \"ownershipInfoOf\",\n inputs: [{ name: \"account\", type: \"address\", internalType: \"address\" }],\n outputs: [\n { name: \"\", type: \"address[]\", internalType: \"address[]\" },\n { name: \"\", type: \"uint256\", internalType: \"uint256\" }\n ],\n stateMutability: \"view\"\n },\n {\n type: \"function\",\n name: \"pluginManifest\",\n inputs: [],\n outputs: [\n {\n name: \"\",\n type: \"tuple\",\n internalType: \"struct PluginManifest\",\n components: [\n { name: \"interfaceIds\", type: \"bytes4[]\", internalType: \"bytes4[]\" },\n {\n name: \"dependencyInterfaceIds\",\n type: \"bytes4[]\",\n internalType: \"bytes4[]\"\n },\n {\n name: \"executionFunctions\",\n type: \"bytes4[]\",\n internalType: \"bytes4[]\"\n },\n {\n name: \"permittedExecutionSelectors\",\n type: \"bytes4[]\",\n internalType: \"bytes4[]\"\n },\n {\n name: \"permitAnyExternalAddress\",\n type: \"bool\",\n internalType: \"bool\"\n },\n { name: \"canSpendNativeToken\", type: \"bool\", internalType: \"bool\" },\n {\n name: \"permittedExternalCalls\",\n type: \"tuple[]\",\n internalType: \"struct ManifestExternalCallPermission[]\",\n components: [\n {\n name: \"externalAddress\",\n type: \"address\",\n internalType: \"address\"\n },\n { name: \"permitAnySelector\", type: \"bool\", internalType: \"bool\" },\n { name: \"selectors\", type: \"bytes4[]\", internalType: \"bytes4[]\" }\n ]\n },\n {\n name: \"userOpValidationFunctions\",\n type: \"tuple[]\",\n internalType: \"struct ManifestAssociatedFunction[]\",\n components: [\n {\n name: \"executionSelector\",\n type: \"bytes4\",\n internalType: \"bytes4\"\n },\n {\n name: \"associatedFunction\",\n type: \"tuple\",\n internalType: \"struct ManifestFunction\",\n components: [\n {\n name: \"functionType\",\n type: \"uint8\",\n internalType: \"enum ManifestAssociatedFunctionType\"\n },\n { name: \"functionId\", type: \"uint8\", internalType: \"uint8\" },\n {\n name: \"dependencyIndex\",\n type: \"uint256\",\n internalType: \"uint256\"\n }\n ]\n }\n ]\n },\n {\n name: \"runtimeValidationFunctions\",\n type: \"tuple[]\",\n internalType: \"struct ManifestAssociatedFunction[]\",\n components: [\n {\n name: \"executionSelector\",\n type: \"bytes4\",\n internalType: \"bytes4\"\n },\n {\n name: \"associatedFunction\",\n type: \"tuple\",\n internalType: \"struct ManifestFunction\",\n components: [\n {\n name: \"functionType\",\n type: \"uint8\",\n internalType: \"enum ManifestAssociatedFunctionType\"\n },\n { name: \"functionId\", type: \"uint8\", internalType: \"uint8\" },\n {\n name: \"dependencyIndex\",\n type: \"uint256\",\n internalType: \"uint256\"\n }\n ]\n }\n ]\n },\n {\n name: \"preUserOpValidationHooks\",\n type: \"tuple[]\",\n internalType: \"struct ManifestAssociatedFunction[]\",\n components: [\n {\n name: \"executionSelector\",\n type: \"bytes4\",\n internalType: \"bytes4\"\n },\n {\n name: \"associatedFunction\",\n type: \"tuple\",\n internalType: \"struct ManifestFunction\",\n components: [\n {\n name: \"functionType\",\n type: \"uint8\",\n internalType: \"enum ManifestAssociatedFunctionType\"\n },\n { name: \"functionId\", type: \"uint8\", internalType: \"uint8\" },\n {\n name: \"dependencyIndex\",\n type: \"uint256\",\n internalType: \"uint256\"\n }\n ]\n }\n ]\n },\n {\n name: \"preRuntimeValidationHooks\",\n type: \"tuple[]\",\n internalType: \"struct ManifestAssociatedFunction[]\",\n components: [\n {\n name: \"executionSelector\",\n type: \"bytes4\",\n internalType: \"bytes4\"\n },\n {\n name: \"associatedFunction\",\n type: \"tuple\",\n internalType: \"struct ManifestFunction\",\n components: [\n {\n name: \"functionType\",\n type: \"uint8\",\n internalType: \"enum ManifestAssociatedFunctionType\"\n },\n { name: \"functionId\", type: \"uint8\", internalType: \"uint8\" },\n {\n name: \"dependencyIndex\",\n type: \"uint256\",\n internalType: \"uint256\"\n }\n ]\n }\n ]\n },\n {\n name: \"executionHooks\",\n type: \"tuple[]\",\n internalType: \"struct ManifestExecutionHook[]\",\n components: [\n {\n name: \"executionSelector\",\n type: \"bytes4\",\n internalType: \"bytes4\"\n },\n {\n name: \"preExecHook\",\n type: \"tuple\",\n internalType: \"struct ManifestFunction\",\n components: [\n {\n name: \"functionType\",\n type: \"uint8\",\n internalType: \"enum ManifestAssociatedFunctionType\"\n },\n { name: \"functionId\", type: \"uint8\", internalType: \"uint8\" },\n {\n name: \"dependencyIndex\",\n type: \"uint256\",\n internalType: \"uint256\"\n }\n ]\n },\n {\n name: \"postExecHook\",\n type: \"tuple\",\n internalType: \"struct ManifestFunction\",\n components: [\n {\n name: \"functionType\",\n type: \"uint8\",\n internalType: \"enum ManifestAssociatedFunctionType\"\n },\n { name: \"functionId\", type: \"uint8\", internalType: \"uint8\" },\n {\n name: \"dependencyIndex\",\n type: \"uint256\",\n internalType: \"uint256\"\n }\n ]\n }\n ]\n }\n ]\n }\n ],\n stateMutability: \"pure\"\n },\n {\n type: \"function\",\n name: \"pluginMetadata\",\n inputs: [],\n outputs: [\n {\n name: \"\",\n type: \"tuple\",\n internalType: \"struct PluginMetadata\",\n components: [\n { name: \"name\", type: \"string\", internalType: \"string\" },\n { name: \"version\", type: \"string\", internalType: \"string\" },\n { name: \"author\", type: \"string\", internalType: \"string\" },\n {\n name: \"permissionDescriptors\",\n type: \"tuple[]\",\n internalType: \"struct SelectorPermission[]\",\n components: [\n {\n name: \"functionSelector\",\n type: \"bytes4\",\n internalType: \"bytes4\"\n },\n {\n name: \"permissionDescription\",\n type: \"string\",\n internalType: \"string\"\n }\n ]\n }\n ]\n }\n ],\n stateMutability: \"pure\"\n },\n {\n type: \"function\",\n name: \"postExecutionHook\",\n inputs: [\n { name: \"functionId\", type: \"uint8\", internalType: \"uint8\" },\n { name: \"preExecHookData\", type: \"bytes\", internalType: \"bytes\" }\n ],\n outputs: [],\n stateMutability: \"nonpayable\"\n },\n {\n type: \"function\",\n name: \"preExecutionHook\",\n inputs: [\n { name: \"functionId\", type: \"uint8\", internalType: \"uint8\" },\n { name: \"sender\", type: \"address\", internalType: \"address\" },\n { name: \"value\", type: \"uint256\", internalType: \"uint256\" },\n { name: \"data\", type: \"bytes\", internalType: \"bytes\" }\n ],\n outputs: [{ name: \"\", type: \"bytes\", internalType: \"bytes\" }],\n stateMutability: \"nonpayable\"\n },\n {\n type: \"function\",\n name: \"preRuntimeValidationHook\",\n inputs: [\n { name: \"functionId\", type: \"uint8\", internalType: \"uint8\" },\n { name: \"sender\", type: \"address\", internalType: \"address\" },\n { name: \"value\", type: \"uint256\", internalType: \"uint256\" },\n { name: \"data\", type: \"bytes\", internalType: \"bytes\" }\n ],\n outputs: [],\n stateMutability: \"nonpayable\"\n },\n {\n type: \"function\",\n name: \"preUserOpValidationHook\",\n inputs: [\n { name: \"functionId\", type: \"uint8\", internalType: \"uint8\" },\n {\n name: \"userOp\",\n type: \"tuple\",\n internalType: \"struct UserOperation\",\n components: [\n { name: \"sender\", type: \"address\", internalType: \"address\" },\n { name: \"nonce\", type: \"uint256\", internalType: \"uint256\" },\n { name: \"initCode\", type: \"bytes\", internalType: \"bytes\" },\n { name: \"callData\", type: \"bytes\", internalType: \"bytes\" },\n { name: \"callGasLimit\", type: \"uint256\", internalType: \"uint256\" },\n {\n name: \"verificationGasLimit\",\n type: \"uint256\",\n internalType: \"uint256\"\n },\n {\n name: \"preVerificationGas\",\n type: \"uint256\",\n internalType: \"uint256\"\n },\n { name: \"maxFeePerGas\", type: \"uint256\", internalType: \"uint256\" },\n {\n name: \"maxPriorityFeePerGas\",\n type: \"uint256\",\n internalType: \"uint256\"\n },\n { name: \"paymasterAndData\", type: \"bytes\", internalType: \"bytes\" },\n { name: \"signature\", type: \"bytes\", internalType: \"bytes\" }\n ]\n },\n { name: \"userOpHash\", type: \"bytes32\", internalType: \"bytes32\" }\n ],\n outputs: [{ name: \"\", type: \"uint256\", internalType: \"uint256\" }],\n stateMutability: \"nonpayable\"\n },\n {\n type: \"function\",\n name: \"runtimeValidationFunction\",\n inputs: [\n { name: \"functionId\", type: \"uint8\", internalType: \"uint8\" },\n { name: \"sender\", type: \"address\", internalType: \"address\" },\n { name: \"value\", type: \"uint256\", internalType: \"uint256\" },\n { name: \"data\", type: \"bytes\", internalType: \"bytes\" }\n ],\n outputs: [],\n stateMutability: \"nonpayable\"\n },\n {\n type: \"function\",\n name: \"supportsInterface\",\n inputs: [{ name: \"interfaceId\", type: \"bytes4\", internalType: \"bytes4\" }],\n outputs: [{ name: \"\", type: \"bool\", internalType: \"bool\" }],\n stateMutability: \"view\"\n },\n {\n type: \"function\",\n name: \"updateOwnership\",\n inputs: [\n { name: \"ownersToAdd\", type: \"address[]\", internalType: \"address[]\" },\n { name: \"ownersToRemove\", type: \"address[]\", internalType: \"address[]\" },\n { name: \"newThreshold\", type: \"uint128\", internalType: \"uint128\" }\n ],\n outputs: [],\n stateMutability: \"nonpayable\"\n },\n {\n type: \"function\",\n name: \"userOpValidationFunction\",\n inputs: [\n { name: \"functionId\", type: \"uint8\", internalType: \"uint8\" },\n {\n name: \"userOp\",\n type: \"tuple\",\n internalType: \"struct UserOperation\",\n components: [\n { name: \"sender\", type: \"address\", internalType: \"address\" },\n { name: \"nonce\", type: \"uint256\", internalType: \"uint256\" },\n { name: \"initCode\", type: \"bytes\", internalType: \"bytes\" },\n { name: \"callData\", type: \"bytes\", internalType: \"bytes\" },\n { name: \"callGasLimit\", type: \"uint256\", internalType: \"uint256\" },\n {\n name: \"verificationGasLimit\",\n type: \"uint256\",\n internalType: \"uint256\"\n },\n {\n name: \"preVerificationGas\",\n type: \"uint256\",\n internalType: \"uint256\"\n },\n { name: \"maxFeePerGas\", type: \"uint256\", internalType: \"uint256\" },\n {\n name: \"maxPriorityFeePerGas\",\n type: \"uint256\",\n internalType: \"uint256\"\n },\n { name: \"paymasterAndData\", type: \"bytes\", internalType: \"bytes\" },\n { name: \"signature\", type: \"bytes\", internalType: \"bytes\" }\n ]\n },\n { name: \"userOpHash\", type: \"bytes32\", internalType: \"bytes32\" }\n ],\n outputs: [{ name: \"\", type: \"uint256\", internalType: \"uint256\" }],\n stateMutability: \"view\"\n },\n {\n type: \"event\",\n name: \"OwnerUpdated\",\n inputs: [\n {\n name: \"account\",\n type: \"address\",\n indexed: true,\n internalType: \"address\"\n },\n {\n name: \"addedOwners\",\n type: \"address[]\",\n indexed: false,\n internalType: \"address[]\"\n },\n {\n name: \"removedOwners\",\n type: \"address[]\",\n indexed: false,\n internalType: \"address[]\"\n },\n {\n name: \"threshold\",\n type: \"uint256\",\n indexed: false,\n internalType: \"uint256\"\n }\n ],\n anonymous: false\n },\n { type: \"error\", name: \"AlreadyInitialized\", inputs: [] },\n { type: \"error\", name: \"ECDSARecoverFailure\", inputs: [] },\n { type: \"error\", name: \"EmptyOwnersNotAllowed\", inputs: [] },\n { type: \"error\", name: \"InvalidAction\", inputs: [] },\n { type: \"error\", name: \"InvalidAddress\", inputs: [] },\n { type: \"error\", name: \"InvalidMaxFeePerGas\", inputs: [] },\n { type: \"error\", name: \"InvalidMaxPriorityFeePerGas\", inputs: [] },\n { type: \"error\", name: \"InvalidNumSigsOnActualGas\", inputs: [] },\n {\n type: \"error\",\n name: \"InvalidOwner\",\n inputs: [{ name: \"owner\", type: \"address\", internalType: \"address\" }]\n },\n { type: \"error\", name: \"InvalidPreVerificationGas\", inputs: [] },\n { type: \"error\", name: \"InvalidSigLength\", inputs: [] },\n { type: \"error\", name: \"InvalidSigOffset\", inputs: [] },\n { type: \"error\", name: \"InvalidThreshold\", inputs: [] },\n {\n type: \"error\",\n name: \"NotContractCaller\",\n inputs: [{ name: \"caller\", type: \"address\", internalType: \"address\" }]\n },\n {\n type: \"error\",\n name: \"NotImplemented\",\n inputs: [\n { name: \"selector\", type: \"bytes4\", internalType: \"bytes4\" },\n { name: \"functionId\", type: \"uint8\", internalType: \"uint8\" }\n ]\n },\n { type: \"error\", name: \"NotInitialized\", inputs: [] },\n {\n type: \"error\",\n name: \"OwnerDoesNotExist\",\n inputs: [{ name: \"owner\", type: \"address\", internalType: \"address\" }]\n }\n ];\n }\n });\n\n // ../../../node_modules/.pnpm/@account-kit+smart-contracts@4.62.0_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5._65dee0153d50ca3a2d2c6830319271d9/node_modules/@account-kit/smart-contracts/dist/esm/src/msca/plugins/multisig/signer.js\n var multisigSignMethods;\n var init_signer3 = __esm({\n \"../../../node_modules/.pnpm/@account-kit+smart-contracts@4.62.0_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5._65dee0153d50ca3a2d2c6830319271d9/node_modules/@account-kit/smart-contracts/dist/esm/src/msca/plugins/multisig/signer.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_esm();\n init_plugin2();\n multisigSignMethods = ({ client, accountAddress, signer, threshold, pluginAddress = MultisigPlugin.meta.addresses[client.chain.id] }) => {\n const get712Wrapper = async (msg) => {\n const [, name, version6, chainId, verifyingContract, salt] = await client.readContract({\n abi: MultisigPluginAbi,\n address: pluginAddress,\n functionName: \"eip712Domain\",\n account: accountAddress\n });\n return {\n domain: {\n chainId: Number(chainId),\n name,\n salt,\n verifyingContract,\n version: version6\n },\n types: {\n AlchemyMultisigMessage: [{ name: \"message\", type: \"bytes\" }]\n },\n message: {\n message: msg\n },\n primaryType: \"AlchemyMultisigMessage\"\n };\n };\n const prepareSign = async (params) => {\n const messageHash = params.type === \"personal_sign\" ? hashMessage(params.data) : hashTypedData(params.data);\n return {\n type: \"eth_signTypedData_v4\",\n data: await get712Wrapper(messageHash)\n };\n };\n const formatSign = async (signature) => {\n return signature;\n };\n return {\n prepareSign,\n formatSign,\n getDummySignature: async () => {\n const [, thresholdRead] = await client.readContract({\n abi: MultisigPluginAbi,\n address: pluginAddress,\n functionName: \"ownershipInfoOf\",\n args: [accountAddress]\n });\n const actualThreshold = thresholdRead === 0n ? threshold : thresholdRead;\n return \"0x\" + \"FF\".repeat(32 * 3) + \"fffffffffffffffffffffffffffffff0000000000000000000000000000000007aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa3c\" + \"fffffffffffffffffffffffffffffff0000000000000000000000000000000007aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa1c\".repeat(Number(actualThreshold) - 1);\n },\n signUserOperationHash: (uoHash) => {\n return signer().signMessage({ raw: uoHash });\n },\n async signMessage({ message }) {\n const { type, data } = await prepareSign({\n type: \"personal_sign\",\n data: message\n });\n return type === \"personal_sign\" ? signer().signMessage(data) : signer().signTypedData(data);\n },\n signTypedData: async (typedDataDefinition) => {\n const { type, data } = await prepareSign({\n type: \"eth_signTypedData_v4\",\n data: typedDataDefinition\n });\n return type === \"personal_sign\" ? signer().signMessage(data) : signer().signTypedData(data);\n }\n };\n };\n }\n });\n\n // ../../../node_modules/.pnpm/@account-kit+smart-contracts@4.62.0_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5._65dee0153d50ca3a2d2c6830319271d9/node_modules/@account-kit/smart-contracts/dist/esm/src/msca/account/multisigAccount.js\n async function createMultisigModularAccount(config2) {\n const { transport, chain: chain2, signer, accountAddress: accountAddress_, initCode, entryPoint = getEntryPoint(chain2, { version: \"0.6.0\" }), factoryAddress = getDefaultMultisigModularAccountFactoryAddress(chain2), owners = [], salt = 0n, threshold } = config2;\n const client = createBundlerClient({\n transport,\n chain: chain2\n });\n const getAccountInitCode = async () => {\n if (initCode) {\n return initCode;\n }\n const sigAddress = await signer.getAddress();\n const sigs_ = Array.from(/* @__PURE__ */ new Set([...owners, sigAddress])).filter((x4) => hexToBigInt(x4) !== 0n).sort((a3, b4) => {\n const bigintA = hexToBigInt(a3);\n const bigintB = hexToBigInt(b4);\n return bigintA < bigintB ? -1 : bigintA > bigintB ? 1 : 0;\n });\n return concatHex([\n factoryAddress,\n encodeFunctionData({\n abi: MultisigModularAccountFactoryAbi,\n functionName: \"createAccount\",\n args: [salt, sigs_, threshold]\n })\n ]);\n };\n const accountAddress = await getAccountAddress({\n client,\n entryPoint,\n accountAddress: accountAddress_,\n getAccountInitCode\n });\n const baseAccount = await toSmartContractAccount({\n transport,\n chain: chain2,\n entryPoint,\n accountAddress,\n source: MULTISIG_ACCOUNT_SOURCE,\n getAccountInitCode,\n ...standardExecutor,\n ...multisigSignMethods({\n client,\n accountAddress,\n threshold,\n signer: () => signer\n })\n });\n return {\n ...baseAccount,\n getLocalThreshold: () => threshold,\n publicKey: await signer.getAddress(),\n getSigner: () => signer\n };\n }\n var MULTISIG_ACCOUNT_SOURCE, isMultisigModularAccount;\n var init_multisigAccount = __esm({\n \"../../../node_modules/.pnpm/@account-kit+smart-contracts@4.62.0_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5._65dee0153d50ca3a2d2c6830319271d9/node_modules/@account-kit/smart-contracts/dist/esm/src/msca/account/multisigAccount.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_esm6();\n init_esm();\n init_MultisigModularAccountFactory();\n init_signer3();\n init_utils12();\n init_standardExecutor();\n MULTISIG_ACCOUNT_SOURCE = \"MultisigModularAccount\";\n isMultisigModularAccount = (acct) => {\n return acct.source === MULTISIG_ACCOUNT_SOURCE;\n };\n }\n });\n\n // ../../../node_modules/.pnpm/@account-kit+smart-contracts@4.62.0_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5._65dee0153d50ca3a2d2c6830319271d9/node_modules/@account-kit/smart-contracts/dist/esm/src/msca/client/alchemyClient.js\n async function createModularAccountAlchemyClient(config2) {\n return createMultiOwnerModularAccountClient(config2);\n }\n var init_alchemyClient2 = __esm({\n \"../../../node_modules/.pnpm/@account-kit+smart-contracts@4.62.0_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5._65dee0153d50ca3a2d2c6830319271d9/node_modules/@account-kit/smart-contracts/dist/esm/src/msca/client/alchemyClient.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_src();\n }\n });\n\n // ../../../node_modules/.pnpm/@account-kit+smart-contracts@4.62.0_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5._65dee0153d50ca3a2d2c6830319271d9/node_modules/@account-kit/smart-contracts/dist/esm/src/msca/plugin-manager/installPlugin.js\n async function installPlugin(client, { overrides, context: context2, account = client.account, ...params }) {\n if (!account) {\n throw new AccountNotFoundError2();\n }\n if (!isSmartAccountClient(client)) {\n throw new IncompatibleClientError(\"SmartAccountClient\", \"installPlugin\", client);\n }\n const callData = await encodeInstallPluginUserOperation(client, params);\n return client.sendUserOperation({\n uo: callData,\n overrides,\n account,\n context: context2\n });\n }\n async function encodeInstallPluginUserOperation(client, params) {\n const pluginManifest = await client.readContract({\n abi: IPluginAbi,\n address: params.pluginAddress,\n functionName: \"pluginManifest\"\n });\n const manifestHash = params.manifestHash ?? keccak256(encodeFunctionResult({\n abi: IPluginAbi,\n functionName: \"pluginManifest\",\n result: pluginManifest\n }));\n return encodeFunctionData({\n abi: IPluginManagerAbi,\n functionName: \"installPlugin\",\n args: [\n params.pluginAddress,\n manifestHash,\n params.pluginInitData ?? \"0x\",\n params.dependencies ?? []\n ]\n });\n }\n var init_installPlugin = __esm({\n \"../../../node_modules/.pnpm/@account-kit+smart-contracts@4.62.0_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5._65dee0153d50ca3a2d2c6830319271d9/node_modules/@account-kit/smart-contracts/dist/esm/src/msca/plugin-manager/installPlugin.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_esm6();\n init_esm();\n init_IPlugin();\n init_IPluginManager();\n }\n });\n\n // ../../../node_modules/.pnpm/@account-kit+smart-contracts@4.62.0_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5._65dee0153d50ca3a2d2c6830319271d9/node_modules/@account-kit/smart-contracts/dist/esm/src/msca/plugin-manager/uninstallPlugin.js\n async function uninstallPlugin(client, { overrides, account = client.account, context: context2, ...params }) {\n if (!account) {\n throw new AccountNotFoundError2();\n }\n if (!isSmartAccountClient(client)) {\n throw new IncompatibleClientError(\"SmartAccountClient\", \"uninstallPlugin\", client);\n }\n const callData = await encodeUninstallPluginUserOperation(params);\n return client.sendUserOperation({\n uo: callData,\n overrides,\n account,\n context: context2\n });\n }\n async function encodeUninstallPluginUserOperation(params) {\n return encodeFunctionData({\n abi: IPluginManagerAbi,\n functionName: \"uninstallPlugin\",\n args: [\n params.pluginAddress,\n params.config ?? \"0x\",\n params.pluginUninstallData ?? \"0x\"\n ]\n });\n }\n var init_uninstallPlugin = __esm({\n \"../../../node_modules/.pnpm/@account-kit+smart-contracts@4.62.0_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5._65dee0153d50ca3a2d2c6830319271d9/node_modules/@account-kit/smart-contracts/dist/esm/src/msca/plugin-manager/uninstallPlugin.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_esm6();\n init_esm();\n init_IPluginManager();\n }\n });\n\n // ../../../node_modules/.pnpm/@account-kit+smart-contracts@4.62.0_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5._65dee0153d50ca3a2d2c6830319271d9/node_modules/@account-kit/smart-contracts/dist/esm/src/msca/plugin-manager/decorator.js\n function pluginManagerActions(client) {\n return {\n installPlugin: async (params) => installPlugin(client, params),\n uninstallPlugin: async (params) => uninstallPlugin(client, params)\n };\n }\n var init_decorator2 = __esm({\n \"../../../node_modules/.pnpm/@account-kit+smart-contracts@4.62.0_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5._65dee0153d50ca3a2d2c6830319271d9/node_modules/@account-kit/smart-contracts/dist/esm/src/msca/plugin-manager/decorator.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_installPlugin();\n init_uninstallPlugin();\n }\n });\n\n // ../../../node_modules/.pnpm/@account-kit+smart-contracts@4.62.0_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5._65dee0153d50ca3a2d2c6830319271d9/node_modules/@account-kit/smart-contracts/dist/esm/src/msca/plugins/multi-owner/extension.js\n var multiOwnerPluginActions2;\n var init_extension = __esm({\n \"../../../node_modules/.pnpm/@account-kit+smart-contracts@4.62.0_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5._65dee0153d50ca3a2d2c6830319271d9/node_modules/@account-kit/smart-contracts/dist/esm/src/msca/plugins/multi-owner/extension.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_esm6();\n init_plugin();\n multiOwnerPluginActions2 = (client) => ({\n ...multiOwnerPluginActions(client),\n async readOwners(args) {\n const account = args?.account ?? client.account;\n if (!account) {\n throw new AccountNotFoundError2();\n }\n const contract = MultiOwnerPlugin.getContract(client, args?.pluginAddress);\n return contract.read.ownersOf([account.address]);\n },\n async isOwnerOf(args) {\n const account = args.account ?? client.account;\n if (!account) {\n throw new AccountNotFoundError2();\n }\n const contract = MultiOwnerPlugin.getContract(client, args.pluginAddress);\n return contract.read.isOwnerOf([account.address, args.address]);\n }\n });\n }\n });\n\n // ../../../node_modules/.pnpm/@account-kit+smart-contracts@4.62.0_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5._65dee0153d50ca3a2d2c6830319271d9/node_modules/@account-kit/smart-contracts/dist/esm/src/msca/plugins/multi-owner/index.js\n var init_multi_owner = __esm({\n \"../../../node_modules/.pnpm/@account-kit+smart-contracts@4.62.0_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5._65dee0153d50ca3a2d2c6830319271d9/node_modules/@account-kit/smart-contracts/dist/esm/src/msca/plugins/multi-owner/index.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_extension();\n }\n });\n\n // ../../../node_modules/.pnpm/@account-kit+smart-contracts@4.62.0_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5._65dee0153d50ca3a2d2c6830319271d9/node_modules/@account-kit/smart-contracts/dist/esm/src/msca/errors.js\n var InvalidAggregatedSignatureError, InvalidContextSignatureError, MultisigAccountExpectedError, MultisigMissingSignatureError;\n var init_errors6 = __esm({\n \"../../../node_modules/.pnpm/@account-kit+smart-contracts@4.62.0_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5._65dee0153d50ca3a2d2c6830319271d9/node_modules/@account-kit/smart-contracts/dist/esm/src/msca/errors.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_esm6();\n InvalidAggregatedSignatureError = class extends BaseError4 {\n constructor() {\n super(\"Invalid aggregated signature\");\n Object.defineProperty(this, \"name\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: \"InvalidAggregatedSignatureError\"\n });\n }\n };\n InvalidContextSignatureError = class extends BaseError4 {\n constructor() {\n super(\"Expected context.signature to be a hex string\");\n Object.defineProperty(this, \"name\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: \"InvalidContextSignatureError\"\n });\n }\n };\n MultisigAccountExpectedError = class extends BaseError4 {\n constructor() {\n super(\"Expected account to be a multisig modular account\");\n Object.defineProperty(this, \"name\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: \"MultisigAccountExpectedError\"\n });\n }\n };\n MultisigMissingSignatureError = class extends BaseError4 {\n constructor() {\n super(\"UserOp must have at least one signature already\");\n Object.defineProperty(this, \"name\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: \"MultisigMissingSignatureError\"\n });\n }\n };\n }\n });\n\n // ../../../node_modules/.pnpm/@account-kit+smart-contracts@4.62.0_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5._65dee0153d50ca3a2d2c6830319271d9/node_modules/@account-kit/smart-contracts/dist/esm/src/msca/plugins/multisig/actions/getThreshold.js\n async function getThreshold(client, args) {\n const account = args.account ?? client.account;\n if (!account) {\n throw new AccountNotFoundError2();\n }\n if (!isMultisigModularAccount(account)) {\n throw new MultisigAccountExpectedError();\n }\n const [, threshold] = await MultisigPlugin.getContract(client, args.pluginAddress).read.ownershipInfoOf([account.address]);\n return threshold === 0n ? account.getLocalThreshold() : threshold;\n }\n var init_getThreshold = __esm({\n \"../../../node_modules/.pnpm/@account-kit+smart-contracts@4.62.0_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5._65dee0153d50ca3a2d2c6830319271d9/node_modules/@account-kit/smart-contracts/dist/esm/src/msca/plugins/multisig/actions/getThreshold.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_esm6();\n init_multisigAccount();\n init_plugin2();\n init_errors6();\n }\n });\n\n // ../../../node_modules/.pnpm/@account-kit+smart-contracts@4.62.0_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5._65dee0153d50ca3a2d2c6830319271d9/node_modules/@account-kit/smart-contracts/dist/esm/src/msca/plugins/multisig/actions/isOwnerOf.js\n async function isOwnerOf(client, args) {\n const account = args.account ?? client.account;\n if (!account) {\n throw new AccountNotFoundError2();\n }\n const contract = MultisigPlugin.getContract(client, args.pluginAddress);\n return await contract.read.isOwnerOf([account.address, args.address]);\n }\n var init_isOwnerOf = __esm({\n \"../../../node_modules/.pnpm/@account-kit+smart-contracts@4.62.0_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5._65dee0153d50ca3a2d2c6830319271d9/node_modules/@account-kit/smart-contracts/dist/esm/src/msca/plugins/multisig/actions/isOwnerOf.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_esm6();\n init_plugin2();\n }\n });\n\n // ../../../node_modules/.pnpm/@account-kit+smart-contracts@4.62.0_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5._65dee0153d50ca3a2d2c6830319271d9/node_modules/@account-kit/smart-contracts/dist/esm/src/msca/plugins/multisig/utils/splitAggregatedSignature.js\n var splitAggregatedSignature;\n var init_splitAggregatedSignature = __esm({\n \"../../../node_modules/.pnpm/@account-kit+smart-contracts@4.62.0_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5._65dee0153d50ca3a2d2c6830319271d9/node_modules/@account-kit/smart-contracts/dist/esm/src/msca/plugins/multisig/utils/splitAggregatedSignature.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_esm6();\n init_esm();\n init_errors6();\n splitAggregatedSignature = async (args) => {\n const { aggregatedSignature, threshold, account, request } = args;\n if (aggregatedSignature.length < 192 + (65 * threshold - 1)) {\n throw new InvalidAggregatedSignatureError();\n }\n const pvg = takeBytes(aggregatedSignature, { count: 32 });\n const maxFeePerGas = takeBytes(aggregatedSignature, {\n count: 32,\n offset: 32\n });\n const maxPriorityFeePerGas = takeBytes(aggregatedSignature, {\n count: 32,\n offset: 64\n });\n const signaturesAndData = takeBytes(aggregatedSignature, {\n offset: 96\n });\n const signatureHexes = (() => {\n const signatureStr = takeBytes(signaturesAndData, {\n count: 65 * threshold - 1\n });\n const signatures2 = [];\n for (let i3 = 0; i3 < threshold - 1; i3++) {\n signatures2.push(takeBytes(signatureStr, { count: 65, offset: i3 * 65 }));\n }\n return signatures2;\n })();\n const signatures = signatureHexes.map(async (signature) => {\n const v2 = BigInt(takeBytes(signature, { count: 1, offset: 64 }));\n const signerType = v2 === 0n ? \"CONTRACT\" : \"EOA\";\n if (signerType === \"EOA\") {\n const hash3 = hashMessage({\n raw: account.getEntryPoint().getUserOperationHash({\n ...request,\n preVerificationGas: pvg,\n maxFeePerGas,\n maxPriorityFeePerGas\n })\n });\n return {\n // the signer doesn't get used here for EOAs\n // TODO: nope. this needs to actually do an ec recover\n signer: await recoverAddress({ hash: hash3, signature }),\n signature,\n signerType,\n userOpSigType: \"UPPERLIMIT\"\n };\n }\n const signer = takeBytes(signature, { count: 20, offset: 12 });\n const offset = fromHex(takeBytes(signature, { count: 32, offset: 32 }), \"number\");\n const signatureLength = fromHex(takeBytes(signaturesAndData, { count: 32, offset }), \"number\");\n return {\n signer,\n signerType,\n userOpSigType: \"UPPERLIMIT\",\n signature: takeBytes(signaturesAndData, {\n count: signatureLength,\n offset: offset + 32\n })\n };\n });\n return {\n upperLimitPvg: pvg,\n upperLimitMaxFeePerGas: maxFeePerGas,\n upperLimitMaxPriorityFeePerGas: maxPriorityFeePerGas,\n signatures: await Promise.all(signatures)\n };\n };\n }\n });\n\n // ../../../node_modules/.pnpm/@account-kit+smart-contracts@4.62.0_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5._65dee0153d50ca3a2d2c6830319271d9/node_modules/@account-kit/smart-contracts/dist/esm/src/msca/plugins/multisig/actions/proposeUserOperation.js\n async function proposeUserOperation(client, { uo, account = client.account, overrides: overrides_ }) {\n const overrides = {\n maxFeePerGas: { multiplier: 3 },\n maxPriorityFeePerGas: { multiplier: 2 },\n preVerificationGas: { multiplier: 1e3 },\n ...overrides_\n };\n if (!account) {\n throw new AccountNotFoundError2();\n }\n if (!isSmartAccountClient(client)) {\n throw new IncompatibleClientError(\"SmartAccountClient\", \"proposeUserOperation\", client);\n }\n if (!isSmartAccountWithSigner(account)) {\n throw new SmartAccountWithSignerRequiredError();\n }\n const builtUo = await client.buildUserOperation({\n account,\n uo,\n overrides\n });\n const request = await client.signUserOperation({\n uoStruct: builtUo,\n account,\n context: {\n userOpSignatureType: \"UPPERLIMIT\"\n }\n });\n const splitSignatures = await splitAggregatedSignature({\n request,\n aggregatedSignature: request.signature,\n account,\n // split works on the assumption that we have t - 1 signatures\n threshold: 2\n });\n return {\n request,\n signatureObj: splitSignatures.signatures[0],\n aggregatedSignature: request.signature\n };\n }\n var init_proposeUserOperation = __esm({\n \"../../../node_modules/.pnpm/@account-kit+smart-contracts@4.62.0_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5._65dee0153d50ca3a2d2c6830319271d9/node_modules/@account-kit/smart-contracts/dist/esm/src/msca/plugins/multisig/actions/proposeUserOperation.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_esm6();\n init_splitAggregatedSignature();\n }\n });\n\n // ../../../node_modules/.pnpm/@account-kit+smart-contracts@4.62.0_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5._65dee0153d50ca3a2d2c6830319271d9/node_modules/@account-kit/smart-contracts/dist/esm/src/msca/plugins/multisig/actions/readOwners.js\n async function readOwners(client, args) {\n const account = args?.account ?? client.account;\n if (!account) {\n throw new AccountNotFoundError2();\n }\n const [owners] = await MultisigPlugin.getContract(client, args?.pluginAddress).read.ownershipInfoOf([account.address]);\n return owners;\n }\n var init_readOwners = __esm({\n \"../../../node_modules/.pnpm/@account-kit+smart-contracts@4.62.0_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5._65dee0153d50ca3a2d2c6830319271d9/node_modules/@account-kit/smart-contracts/dist/esm/src/msca/plugins/multisig/actions/readOwners.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_esm6();\n init_plugin2();\n }\n });\n\n // ../../../node_modules/.pnpm/@account-kit+smart-contracts@4.62.0_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5._65dee0153d50ca3a2d2c6830319271d9/node_modules/@account-kit/smart-contracts/dist/esm/src/msca/plugins/multisig/utils/formatSignatures.js\n var formatSignatures;\n var init_formatSignatures = __esm({\n \"../../../node_modules/.pnpm/@account-kit+smart-contracts@4.62.0_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5._65dee0153d50ca3a2d2c6830319271d9/node_modules/@account-kit/smart-contracts/dist/esm/src/msca/plugins/multisig/utils/formatSignatures.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_esm6();\n init_esm();\n formatSignatures = (signatures, usingMaxValues = false) => {\n let eoaSigs = \"\";\n let contractSigs = \"\";\n let offset = BigInt(65 * signatures.length);\n signatures.sort((a3, b4) => {\n const bigintA = hexToBigInt(a3.signer);\n const bigintB = hexToBigInt(b4.signer);\n return bigintA < bigintB ? -1 : bigintA > bigintB ? 1 : 0;\n }).forEach((sig) => {\n const addV = sig.userOpSigType === \"ACTUAL\" && !usingMaxValues ? 32 : 0;\n if (sig.signerType === \"EOA\") {\n let v2 = parseInt(takeBytes(sig.signature, { count: 1, offset: 64 })) + addV;\n eoaSigs += concat([\n takeBytes(sig.signature, { count: 64 }),\n toHex(v2, { size: 1 })\n ]).slice(2);\n } else {\n const sigLen = BigInt(sig.signature.slice(2).length / 2);\n eoaSigs += concat([\n pad(sig.signer),\n toHex(offset, { size: 32 }),\n toHex(addV, { size: 1 })\n ]).slice(2);\n contractSigs += concat([\n toHex(sigLen, { size: 32 }),\n sig.signature\n ]).slice(2);\n offset += sigLen;\n }\n });\n return \"0x\" + eoaSigs + contractSigs;\n };\n }\n });\n\n // ../../../node_modules/.pnpm/@account-kit+smart-contracts@4.62.0_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5._65dee0153d50ca3a2d2c6830319271d9/node_modules/@account-kit/smart-contracts/dist/esm/src/msca/plugins/multisig/utils/combineSignatures.js\n function combineSignatures({ signatures, upperLimitMaxFeePerGas, upperLimitMaxPriorityFeePerGas, upperLimitPvg, usingMaxValues }) {\n return concat([\n pad(upperLimitPvg),\n pad(upperLimitMaxFeePerGas),\n pad(upperLimitMaxPriorityFeePerGas),\n formatSignatures(signatures, usingMaxValues)\n ]);\n }\n var init_combineSignatures = __esm({\n \"../../../node_modules/.pnpm/@account-kit+smart-contracts@4.62.0_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5._65dee0153d50ca3a2d2c6830319271d9/node_modules/@account-kit/smart-contracts/dist/esm/src/msca/plugins/multisig/utils/combineSignatures.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_esm();\n init_formatSignatures();\n }\n });\n\n // ../../../node_modules/.pnpm/@account-kit+smart-contracts@4.62.0_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5._65dee0153d50ca3a2d2c6830319271d9/node_modules/@account-kit/smart-contracts/dist/esm/src/msca/plugins/multisig/utils/getSignerType.js\n var getSignerType;\n var init_getSignerType = __esm({\n \"../../../node_modules/.pnpm/@account-kit+smart-contracts@4.62.0_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5._65dee0153d50ca3a2d2c6830319271d9/node_modules/@account-kit/smart-contracts/dist/esm/src/msca/plugins/multisig/utils/getSignerType.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_esm();\n getSignerType = async ({ client, signature, signer }) => {\n const signerAddress = await signer.getAddress();\n const byteCode = await client.getBytecode({ address: signerAddress });\n return (byteCode ?? \"0x\") === \"0x\" && size(signature) === 65 ? \"EOA\" : \"CONTRACT\";\n };\n }\n });\n\n // ../../../node_modules/.pnpm/@account-kit+smart-contracts@4.62.0_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5._65dee0153d50ca3a2d2c6830319271d9/node_modules/@account-kit/smart-contracts/dist/esm/src/msca/plugins/multisig/utils/index.js\n var init_utils13 = __esm({\n \"../../../node_modules/.pnpm/@account-kit+smart-contracts@4.62.0_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5._65dee0153d50ca3a2d2c6830319271d9/node_modules/@account-kit/smart-contracts/dist/esm/src/msca/plugins/multisig/utils/index.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_combineSignatures();\n init_formatSignatures();\n init_getSignerType();\n init_splitAggregatedSignature();\n }\n });\n\n // ../../../node_modules/.pnpm/@account-kit+smart-contracts@4.62.0_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5._65dee0153d50ca3a2d2c6830319271d9/node_modules/@account-kit/smart-contracts/dist/esm/src/msca/plugins/multisig/actions/signMultisigUserOperation.js\n async function signMultisigUserOperation(client, params) {\n const { account = client.account, signatures, userOperationRequest } = params;\n if (!account) {\n throw new AccountNotFoundError2();\n }\n if (!isSmartAccountClient(client)) {\n throw new IncompatibleClientError(\"SmartAccountClient\", \"signMultisigUserOperation\", client);\n }\n if (!isSmartAccountWithSigner(account)) {\n throw new SmartAccountWithSignerRequiredError();\n }\n if (!signatures.length) {\n throw new MultisigMissingSignatureError();\n }\n const signerAddress = await account.getSigner().getAddress();\n const signedRequest = await client.signUserOperation({\n account,\n uoStruct: userOperationRequest,\n context: {\n aggregatedSignature: combineSignatures({\n signatures,\n upperLimitMaxFeePerGas: userOperationRequest.maxFeePerGas,\n upperLimitMaxPriorityFeePerGas: userOperationRequest.maxPriorityFeePerGas,\n upperLimitPvg: userOperationRequest.preVerificationGas,\n usingMaxValues: false\n }),\n signatures,\n userOpSignatureType: \"UPPERLIMIT\"\n }\n });\n const splitSignatures = await splitAggregatedSignature({\n account,\n request: signedRequest,\n aggregatedSignature: signedRequest.signature,\n // split works on the assumption that we have t - 1 signatures\n // we have signatures.length + 1 signatures now, so we need sl + 1 + 1\n threshold: signatures.length + 2\n });\n const signatureObj = splitSignatures.signatures.find((x4) => x4.signer === signerAddress);\n if (!signatureObj) {\n throw new Error(\"INTERNAL ERROR: signature not found in split signatures, this is an internal bug please report\");\n }\n return {\n signatureObj,\n signature: signatureObj.signature,\n aggregatedSignature: signedRequest.signature\n };\n }\n var init_signMultisigUserOperation = __esm({\n \"../../../node_modules/.pnpm/@account-kit+smart-contracts@4.62.0_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5._65dee0153d50ca3a2d2c6830319271d9/node_modules/@account-kit/smart-contracts/dist/esm/src/msca/plugins/multisig/actions/signMultisigUserOperation.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_esm6();\n init_errors6();\n init_utils13();\n }\n });\n\n // ../../../node_modules/.pnpm/@account-kit+smart-contracts@4.62.0_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5._65dee0153d50ca3a2d2c6830319271d9/node_modules/@account-kit/smart-contracts/dist/esm/src/msca/plugins/multisig/extension.js\n var multisigPluginActions2;\n var init_extension2 = __esm({\n \"../../../node_modules/.pnpm/@account-kit+smart-contracts@4.62.0_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5._65dee0153d50ca3a2d2c6830319271d9/node_modules/@account-kit/smart-contracts/dist/esm/src/msca/plugins/multisig/extension.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_getThreshold();\n init_isOwnerOf();\n init_proposeUserOperation();\n init_readOwners();\n init_signMultisigUserOperation();\n init_plugin2();\n multisigPluginActions2 = (client) => ({\n ...multisigPluginActions(client),\n readOwners: (args) => readOwners(client, args),\n isOwnerOf: (args) => isOwnerOf(client, args),\n getThreshold: (args) => getThreshold(client, args),\n proposeUserOperation: (args) => proposeUserOperation(client, args),\n signMultisigUserOperation: (params) => signMultisigUserOperation(client, params)\n });\n }\n });\n\n // ../../../node_modules/.pnpm/@account-kit+smart-contracts@4.62.0_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5._65dee0153d50ca3a2d2c6830319271d9/node_modules/@account-kit/smart-contracts/dist/esm/src/msca/plugins/multisig/middleware.js\n var multisigSignatureMiddleware, isUsingMaxValues;\n var init_middleware = __esm({\n \"../../../node_modules/.pnpm/@account-kit+smart-contracts@4.62.0_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5._65dee0153d50ca3a2d2c6830319271d9/node_modules/@account-kit/smart-contracts/dist/esm/src/msca/plugins/multisig/middleware.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_esm6();\n init_multisigAccount();\n init_errors6();\n init_utils13();\n multisigSignatureMiddleware = async (struct, { account, client, context: context2 }) => {\n if (!context2) {\n throw new InvalidContextSignatureError();\n }\n if (!isSmartAccountWithSigner(account)) {\n throw new SmartAccountWithSignerRequiredError();\n }\n if (!isMultisigModularAccount(account)) {\n throw new MultisigAccountExpectedError();\n }\n const resolvedStruct = await resolveProperties(struct);\n const request = deepHexlify(resolvedStruct);\n if (!isValidRequest(request)) {\n throw new InvalidUserOperationError(resolvedStruct);\n }\n const signature = await account.signUserOperationHash(account.getEntryPoint().getUserOperationHash(request));\n const signerType = await getSignerType({\n client,\n signature,\n signer: account.getSigner()\n });\n if (context2?.signatures?.length == null && context2?.aggregatedSignature == null) {\n return {\n ...resolvedStruct,\n signature: combineSignatures({\n signatures: [\n {\n signature,\n signer: await account.getSigner().getAddress(),\n signerType,\n userOpSigType: context2.userOpSignatureType\n }\n ],\n upperLimitMaxFeePerGas: request.maxFeePerGas,\n upperLimitMaxPriorityFeePerGas: request.maxPriorityFeePerGas,\n upperLimitPvg: request.preVerificationGas,\n usingMaxValues: context2.userOpSignatureType === \"ACTUAL\"\n })\n };\n }\n if (context2.aggregatedSignature == null || context2.signatures == null) {\n throw new InvalidContextSignatureError();\n }\n const { upperLimitPvg, upperLimitMaxFeePerGas, upperLimitMaxPriorityFeePerGas } = await splitAggregatedSignature({\n aggregatedSignature: context2.aggregatedSignature,\n threshold: context2.signatures.length + 1,\n account,\n request\n });\n const finalSignature = combineSignatures({\n signatures: context2.signatures.concat({\n userOpSigType: context2.userOpSignatureType,\n signerType,\n signature,\n signer: await account.getSigner().getAddress()\n }),\n upperLimitPvg,\n upperLimitMaxFeePerGas,\n upperLimitMaxPriorityFeePerGas,\n usingMaxValues: isUsingMaxValues(request, {\n upperLimitPvg,\n upperLimitMaxFeePerGas,\n upperLimitMaxPriorityFeePerGas\n })\n });\n return {\n ...resolvedStruct,\n signature: finalSignature\n };\n };\n isUsingMaxValues = (request, upperLimits) => {\n if (BigInt(request.preVerificationGas) !== BigInt(upperLimits.upperLimitPvg)) {\n return false;\n }\n if (BigInt(request.maxFeePerGas) !== BigInt(upperLimits.upperLimitMaxFeePerGas)) {\n return false;\n }\n if (BigInt(request.maxPriorityFeePerGas) !== BigInt(upperLimits.upperLimitMaxPriorityFeePerGas)) {\n return false;\n }\n return true;\n };\n }\n });\n\n // ../../../node_modules/.pnpm/@account-kit+smart-contracts@4.62.0_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5._65dee0153d50ca3a2d2c6830319271d9/node_modules/@account-kit/smart-contracts/dist/esm/src/msca/plugins/multisig/index.js\n var init_multisig = __esm({\n \"../../../node_modules/.pnpm/@account-kit+smart-contracts@4.62.0_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5._65dee0153d50ca3a2d2c6830319271d9/node_modules/@account-kit/smart-contracts/dist/esm/src/msca/plugins/multisig/index.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_extension2();\n init_middleware();\n init_plugin2();\n }\n });\n\n // ../../../node_modules/.pnpm/@account-kit+smart-contracts@4.62.0_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5._65dee0153d50ca3a2d2c6830319271d9/node_modules/@account-kit/smart-contracts/dist/esm/src/msca/client/client.js\n async function createMultiOwnerModularAccountClient({ transport, chain: chain2, ...params }) {\n const modularAccount = await createMultiOwnerModularAccount({\n ...params,\n transport,\n chain: chain2\n });\n if (isAlchemyTransport2(transport, chain2)) {\n const { opts } = params;\n return createAlchemySmartAccountClient2({\n ...params,\n account: modularAccount,\n transport,\n chain: chain2,\n opts\n }).extend(multiOwnerPluginActions2).extend(pluginManagerActions).extend(accountLoupeActions);\n }\n return createSmartAccountClient({\n ...params,\n transport,\n chain: chain2,\n account: modularAccount\n }).extend(pluginManagerActions).extend(multiOwnerPluginActions2).extend(accountLoupeActions);\n }\n async function createMultisigModularAccountClient({ transport, chain: chain2, ...params }) {\n const modularAccount = await createMultisigModularAccount({\n ...params,\n transport,\n chain: chain2\n });\n if (isAlchemyTransport2(transport, chain2)) {\n let config2 = {\n ...params,\n chain: chain2,\n transport\n };\n const { opts } = config2;\n return createAlchemySmartAccountClient2({\n ...config2,\n account: modularAccount,\n opts,\n signUserOperation: multisigSignatureMiddleware\n }).extend(smartAccountClientActions).extend(multisigPluginActions2).extend(pluginManagerActions).extend(accountLoupeActions);\n }\n const client = createSmartAccountClient({\n ...params,\n transport,\n chain: chain2,\n account: modularAccount,\n signUserOperation: multisigSignatureMiddleware\n }).extend(smartAccountClientActions).extend(pluginManagerActions).extend(multisigPluginActions2).extend(accountLoupeActions);\n return client;\n }\n var init_client3 = __esm({\n \"../../../node_modules/.pnpm/@account-kit+smart-contracts@4.62.0_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5._65dee0153d50ca3a2d2c6830319271d9/node_modules/@account-kit/smart-contracts/dist/esm/src/msca/client/client.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_esm6();\n init_decorator();\n init_multiOwnerAccount();\n init_multisigAccount();\n init_decorator2();\n init_multi_owner();\n init_multisig();\n init_middleware();\n init_exports3();\n }\n });\n\n // ../../../node_modules/.pnpm/@account-kit+smart-contracts@4.62.0_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5._65dee0153d50ca3a2d2c6830319271d9/node_modules/@account-kit/smart-contracts/dist/esm/src/msca/client/multiSigAlchemyClient.js\n async function createMultisigAccountAlchemyClient(config2) {\n return createMultisigModularAccountClient(config2);\n }\n var init_multiSigAlchemyClient = __esm({\n \"../../../node_modules/.pnpm/@account-kit+smart-contracts@4.62.0_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5._65dee0153d50ca3a2d2c6830319271d9/node_modules/@account-kit/smart-contracts/dist/esm/src/msca/client/multiSigAlchemyClient.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_src();\n }\n });\n\n // ../../../node_modules/.pnpm/@account-kit+smart-contracts@4.62.0_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5._65dee0153d50ca3a2d2c6830319271d9/node_modules/@account-kit/smart-contracts/dist/esm/src/msca/plugins/session-key/plugin.js\n var addresses3, SessionKeyPlugin, sessionKeyPluginActions, SessionKeyPluginExecutionFunctionAbi, SessionKeyPluginAbi;\n var init_plugin3 = __esm({\n \"../../../node_modules/.pnpm/@account-kit+smart-contracts@4.62.0_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5._65dee0153d50ca3a2d2c6830319271d9/node_modules/@account-kit/smart-contracts/dist/esm/src/msca/plugins/session-key/plugin.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_esm();\n init_esm6();\n init_src();\n init_plugin();\n addresses3 = {\n 1: \"0x0000003E0000a96de4058e1E02a62FaaeCf23d8d\",\n 10: \"0x0000003E0000a96de4058e1E02a62FaaeCf23d8d\",\n 137: \"0x0000003E0000a96de4058e1E02a62FaaeCf23d8d\",\n 252: \"0x0000003E0000a96de4058e1E02a62FaaeCf23d8d\",\n 2523: \"0x0000003E0000a96de4058e1E02a62FaaeCf23d8d\",\n 8453: \"0x0000003E0000a96de4058e1E02a62FaaeCf23d8d\",\n 42161: \"0x0000003E0000a96de4058e1E02a62FaaeCf23d8d\",\n 80001: \"0x0000003E0000a96de4058e1E02a62FaaeCf23d8d\",\n 80002: \"0x0000003E0000a96de4058e1E02a62FaaeCf23d8d\",\n 84532: \"0x0000003E0000a96de4058e1E02a62FaaeCf23d8d\",\n 421614: \"0x0000003E0000a96de4058e1E02a62FaaeCf23d8d\",\n 7777777: \"0x0000003E0000a96de4058e1E02a62FaaeCf23d8d\",\n 11155111: \"0x0000003E0000a96de4058e1E02a62FaaeCf23d8d\",\n 11155420: \"0x0000003E0000a96de4058e1E02a62FaaeCf23d8d\",\n 999999999: \"0x0000003E0000a96de4058e1E02a62FaaeCf23d8d\"\n };\n SessionKeyPlugin = {\n meta: {\n name: \"Session Key Plugin\",\n version: \"1.0.1\",\n addresses: addresses3\n },\n getContract: (client, address) => {\n if (!client.chain)\n throw new ChainNotFoundError2();\n return getContract({\n address: address || addresses3[client.chain.id],\n abi: SessionKeyPluginAbi,\n client\n });\n }\n };\n sessionKeyPluginActions = (client) => ({\n executeWithSessionKey({ args, overrides, context: context2, account = client.account }) {\n if (!account) {\n throw new AccountNotFoundError2();\n }\n if (!isSmartAccountClient(client)) {\n throw new IncompatibleClientError(\"SmartAccountClient\", \"executeWithSessionKey\", client);\n }\n const uo = encodeFunctionData({\n abi: SessionKeyPluginExecutionFunctionAbi,\n functionName: \"executeWithSessionKey\",\n args\n });\n return client.sendUserOperation({ uo, overrides, account, context: context2 });\n },\n addSessionKey({ args, overrides, context: context2, account = client.account }) {\n if (!account) {\n throw new AccountNotFoundError2();\n }\n if (!isSmartAccountClient(client)) {\n throw new IncompatibleClientError(\"SmartAccountClient\", \"addSessionKey\", client);\n }\n const uo = encodeFunctionData({\n abi: SessionKeyPluginExecutionFunctionAbi,\n functionName: \"addSessionKey\",\n args\n });\n return client.sendUserOperation({ uo, overrides, account, context: context2 });\n },\n removeSessionKey({ args, overrides, context: context2, account = client.account }) {\n if (!account) {\n throw new AccountNotFoundError2();\n }\n if (!isSmartAccountClient(client)) {\n throw new IncompatibleClientError(\"SmartAccountClient\", \"removeSessionKey\", client);\n }\n const uo = encodeFunctionData({\n abi: SessionKeyPluginExecutionFunctionAbi,\n functionName: \"removeSessionKey\",\n args\n });\n return client.sendUserOperation({ uo, overrides, account, context: context2 });\n },\n rotateSessionKey({ args, overrides, context: context2, account = client.account }) {\n if (!account) {\n throw new AccountNotFoundError2();\n }\n if (!isSmartAccountClient(client)) {\n throw new IncompatibleClientError(\"SmartAccountClient\", \"rotateSessionKey\", client);\n }\n const uo = encodeFunctionData({\n abi: SessionKeyPluginExecutionFunctionAbi,\n functionName: \"rotateSessionKey\",\n args\n });\n return client.sendUserOperation({ uo, overrides, account, context: context2 });\n },\n updateKeyPermissions({ args, overrides, context: context2, account = client.account }) {\n if (!account) {\n throw new AccountNotFoundError2();\n }\n if (!isSmartAccountClient(client)) {\n throw new IncompatibleClientError(\"SmartAccountClient\", \"updateKeyPermissions\", client);\n }\n const uo = encodeFunctionData({\n abi: SessionKeyPluginExecutionFunctionAbi,\n functionName: \"updateKeyPermissions\",\n args\n });\n return client.sendUserOperation({ uo, overrides, account, context: context2 });\n },\n installSessionKeyPlugin({ account = client.account, overrides, context: context2, ...params }) {\n if (!account) {\n throw new AccountNotFoundError2();\n }\n if (!isSmartAccountClient(client)) {\n throw new IncompatibleClientError(\"SmartAccountClient\", \"installSessionKeyPlugin\", client);\n }\n const chain2 = client.chain;\n if (!chain2) {\n throw new ChainNotFoundError2();\n }\n const dependencies = params.dependencyOverrides ?? [\n (() => {\n const pluginAddress2 = MultiOwnerPlugin.meta.addresses[chain2.id];\n if (!pluginAddress2) {\n throw new Error(\"missing MultiOwnerPlugin address for chain \" + chain2.name);\n }\n return encodePacked([\"address\", \"uint8\"], [pluginAddress2, 0]);\n })(),\n (() => {\n const pluginAddress2 = MultiOwnerPlugin.meta.addresses[chain2.id];\n if (!pluginAddress2) {\n throw new Error(\"missing MultiOwnerPlugin address for chain \" + chain2.name);\n }\n return encodePacked([\"address\", \"uint8\"], [pluginAddress2, 1]);\n })()\n ];\n const pluginAddress = params.pluginAddress ?? SessionKeyPlugin.meta.addresses[chain2.id];\n if (!pluginAddress) {\n throw new Error(\"missing SessionKeyPlugin address for chain \" + chain2.name);\n }\n return installPlugin(client, {\n pluginAddress,\n pluginInitData: encodeAbiParameters([\n { type: \"address[]\", name: \"initialKeys\" },\n { type: \"bytes32[]\", name: \"tags\" },\n { type: \"bytes[][]\", name: \"initialPermissions\" }\n ], params.args),\n dependencies,\n overrides,\n account,\n context: context2\n });\n },\n encodeExecuteWithSessionKey({ args }) {\n return encodeFunctionData({\n abi: SessionKeyPluginExecutionFunctionAbi,\n functionName: \"executeWithSessionKey\",\n args\n });\n },\n encodeAddSessionKey({ args }) {\n return encodeFunctionData({\n abi: SessionKeyPluginExecutionFunctionAbi,\n functionName: \"addSessionKey\",\n args\n });\n },\n encodeRemoveSessionKey({ args }) {\n return encodeFunctionData({\n abi: SessionKeyPluginExecutionFunctionAbi,\n functionName: \"removeSessionKey\",\n args\n });\n },\n encodeRotateSessionKey({ args }) {\n return encodeFunctionData({\n abi: SessionKeyPluginExecutionFunctionAbi,\n functionName: \"rotateSessionKey\",\n args\n });\n },\n encodeUpdateKeyPermissions({ args }) {\n return encodeFunctionData({\n abi: SessionKeyPluginExecutionFunctionAbi,\n functionName: \"updateKeyPermissions\",\n args\n });\n }\n });\n SessionKeyPluginExecutionFunctionAbi = [\n {\n type: \"function\",\n name: \"executeWithSessionKey\",\n inputs: [\n {\n name: \"calls\",\n type: \"tuple[]\",\n internalType: \"struct Call[]\",\n components: [\n { name: \"target\", type: \"address\", internalType: \"address\" },\n { name: \"value\", type: \"uint256\", internalType: \"uint256\" },\n { name: \"data\", type: \"bytes\", internalType: \"bytes\" }\n ]\n },\n { name: \"sessionKey\", type: \"address\", internalType: \"address\" }\n ],\n outputs: [{ name: \"\", type: \"bytes[]\", internalType: \"bytes[]\" }],\n stateMutability: \"nonpayable\"\n },\n {\n type: \"function\",\n name: \"addSessionKey\",\n inputs: [\n { name: \"sessionKey\", type: \"address\", internalType: \"address\" },\n { name: \"tag\", type: \"bytes32\", internalType: \"bytes32\" },\n { name: \"permissionUpdates\", type: \"bytes[]\", internalType: \"bytes[]\" }\n ],\n outputs: [],\n stateMutability: \"nonpayable\"\n },\n {\n type: \"function\",\n name: \"removeSessionKey\",\n inputs: [\n { name: \"sessionKey\", type: \"address\", internalType: \"address\" },\n { name: \"predecessor\", type: \"bytes32\", internalType: \"bytes32\" }\n ],\n outputs: [],\n stateMutability: \"nonpayable\"\n },\n {\n type: \"function\",\n name: \"rotateSessionKey\",\n inputs: [\n { name: \"oldSessionKey\", type: \"address\", internalType: \"address\" },\n { name: \"predecessor\", type: \"bytes32\", internalType: \"bytes32\" },\n { name: \"newSessionKey\", type: \"address\", internalType: \"address\" }\n ],\n outputs: [],\n stateMutability: \"nonpayable\"\n },\n {\n type: \"function\",\n name: \"updateKeyPermissions\",\n inputs: [\n { name: \"sessionKey\", type: \"address\", internalType: \"address\" },\n { name: \"updates\", type: \"bytes[]\", internalType: \"bytes[]\" }\n ],\n outputs: [],\n stateMutability: \"nonpayable\"\n }\n ];\n SessionKeyPluginAbi = [\n {\n type: \"function\",\n name: \"addSessionKey\",\n inputs: [\n { name: \"sessionKey\", type: \"address\", internalType: \"address\" },\n { name: \"tag\", type: \"bytes32\", internalType: \"bytes32\" },\n { name: \"permissionUpdates\", type: \"bytes[]\", internalType: \"bytes[]\" }\n ],\n outputs: [],\n stateMutability: \"nonpayable\"\n },\n {\n type: \"function\",\n name: \"executeWithSessionKey\",\n inputs: [\n {\n name: \"calls\",\n type: \"tuple[]\",\n internalType: \"struct Call[]\",\n components: [\n { name: \"target\", type: \"address\", internalType: \"address\" },\n { name: \"value\", type: \"uint256\", internalType: \"uint256\" },\n { name: \"data\", type: \"bytes\", internalType: \"bytes\" }\n ]\n },\n { name: \"sessionKey\", type: \"address\", internalType: \"address\" }\n ],\n outputs: [{ name: \"\", type: \"bytes[]\", internalType: \"bytes[]\" }],\n stateMutability: \"nonpayable\"\n },\n {\n type: \"function\",\n name: \"findPredecessor\",\n inputs: [\n { name: \"account\", type: \"address\", internalType: \"address\" },\n { name: \"sessionKey\", type: \"address\", internalType: \"address\" }\n ],\n outputs: [{ name: \"\", type: \"bytes32\", internalType: \"bytes32\" }],\n stateMutability: \"view\"\n },\n {\n type: \"function\",\n name: \"getAccessControlEntry\",\n inputs: [\n { name: \"account\", type: \"address\", internalType: \"address\" },\n { name: \"sessionKey\", type: \"address\", internalType: \"address\" },\n { name: \"contractAddress\", type: \"address\", internalType: \"address\" }\n ],\n outputs: [\n { name: \"isOnList\", type: \"bool\", internalType: \"bool\" },\n { name: \"checkSelectors\", type: \"bool\", internalType: \"bool\" }\n ],\n stateMutability: \"view\"\n },\n {\n type: \"function\",\n name: \"getAccessControlType\",\n inputs: [\n { name: \"account\", type: \"address\", internalType: \"address\" },\n { name: \"sessionKey\", type: \"address\", internalType: \"address\" }\n ],\n outputs: [\n {\n name: \"\",\n type: \"uint8\",\n internalType: \"enum ISessionKeyPlugin.ContractAccessControlType\"\n }\n ],\n stateMutability: \"view\"\n },\n {\n type: \"function\",\n name: \"getERC20SpendLimitInfo\",\n inputs: [\n { name: \"account\", type: \"address\", internalType: \"address\" },\n { name: \"sessionKey\", type: \"address\", internalType: \"address\" },\n { name: \"token\", type: \"address\", internalType: \"address\" }\n ],\n outputs: [\n {\n name: \"\",\n type: \"tuple\",\n internalType: \"struct ISessionKeyPlugin.SpendLimitInfo\",\n components: [\n { name: \"hasLimit\", type: \"bool\", internalType: \"bool\" },\n { name: \"limit\", type: \"uint256\", internalType: \"uint256\" },\n { name: \"limitUsed\", type: \"uint256\", internalType: \"uint256\" },\n { name: \"refreshInterval\", type: \"uint48\", internalType: \"uint48\" },\n { name: \"lastUsedTime\", type: \"uint48\", internalType: \"uint48\" }\n ]\n }\n ],\n stateMutability: \"view\"\n },\n {\n type: \"function\",\n name: \"getGasSpendLimit\",\n inputs: [\n { name: \"account\", type: \"address\", internalType: \"address\" },\n { name: \"sessionKey\", type: \"address\", internalType: \"address\" }\n ],\n outputs: [\n {\n name: \"info\",\n type: \"tuple\",\n internalType: \"struct ISessionKeyPlugin.SpendLimitInfo\",\n components: [\n { name: \"hasLimit\", type: \"bool\", internalType: \"bool\" },\n { name: \"limit\", type: \"uint256\", internalType: \"uint256\" },\n { name: \"limitUsed\", type: \"uint256\", internalType: \"uint256\" },\n { name: \"refreshInterval\", type: \"uint48\", internalType: \"uint48\" },\n { name: \"lastUsedTime\", type: \"uint48\", internalType: \"uint48\" }\n ]\n },\n { name: \"shouldReset\", type: \"bool\", internalType: \"bool\" }\n ],\n stateMutability: \"view\"\n },\n {\n type: \"function\",\n name: \"getKeyTimeRange\",\n inputs: [\n { name: \"account\", type: \"address\", internalType: \"address\" },\n { name: \"sessionKey\", type: \"address\", internalType: \"address\" }\n ],\n outputs: [\n { name: \"validAfter\", type: \"uint48\", internalType: \"uint48\" },\n { name: \"validUntil\", type: \"uint48\", internalType: \"uint48\" }\n ],\n stateMutability: \"view\"\n },\n {\n type: \"function\",\n name: \"getNativeTokenSpendLimitInfo\",\n inputs: [\n { name: \"account\", type: \"address\", internalType: \"address\" },\n { name: \"sessionKey\", type: \"address\", internalType: \"address\" }\n ],\n outputs: [\n {\n name: \"info\",\n type: \"tuple\",\n internalType: \"struct ISessionKeyPlugin.SpendLimitInfo\",\n components: [\n { name: \"hasLimit\", type: \"bool\", internalType: \"bool\" },\n { name: \"limit\", type: \"uint256\", internalType: \"uint256\" },\n { name: \"limitUsed\", type: \"uint256\", internalType: \"uint256\" },\n { name: \"refreshInterval\", type: \"uint48\", internalType: \"uint48\" },\n { name: \"lastUsedTime\", type: \"uint48\", internalType: \"uint48\" }\n ]\n }\n ],\n stateMutability: \"view\"\n },\n {\n type: \"function\",\n name: \"getRequiredPaymaster\",\n inputs: [\n { name: \"account\", type: \"address\", internalType: \"address\" },\n { name: \"sessionKey\", type: \"address\", internalType: \"address\" }\n ],\n outputs: [{ name: \"\", type: \"address\", internalType: \"address\" }],\n stateMutability: \"view\"\n },\n {\n type: \"function\",\n name: \"isSelectorOnAccessControlList\",\n inputs: [\n { name: \"account\", type: \"address\", internalType: \"address\" },\n { name: \"sessionKey\", type: \"address\", internalType: \"address\" },\n { name: \"contractAddress\", type: \"address\", internalType: \"address\" },\n { name: \"selector\", type: \"bytes4\", internalType: \"bytes4\" }\n ],\n outputs: [{ name: \"isOnList\", type: \"bool\", internalType: \"bool\" }],\n stateMutability: \"view\"\n },\n {\n type: \"function\",\n name: \"isSessionKeyOf\",\n inputs: [\n { name: \"account\", type: \"address\", internalType: \"address\" },\n { name: \"sessionKey\", type: \"address\", internalType: \"address\" }\n ],\n outputs: [{ name: \"\", type: \"bool\", internalType: \"bool\" }],\n stateMutability: \"view\"\n },\n {\n type: \"function\",\n name: \"onInstall\",\n inputs: [{ name: \"data\", type: \"bytes\", internalType: \"bytes\" }],\n outputs: [],\n stateMutability: \"nonpayable\"\n },\n {\n type: \"function\",\n name: \"onUninstall\",\n inputs: [{ name: \"\", type: \"bytes\", internalType: \"bytes\" }],\n outputs: [],\n stateMutability: \"nonpayable\"\n },\n {\n type: \"function\",\n name: \"pluginManifest\",\n inputs: [],\n outputs: [\n {\n name: \"\",\n type: \"tuple\",\n internalType: \"struct PluginManifest\",\n components: [\n { name: \"interfaceIds\", type: \"bytes4[]\", internalType: \"bytes4[]\" },\n {\n name: \"dependencyInterfaceIds\",\n type: \"bytes4[]\",\n internalType: \"bytes4[]\"\n },\n {\n name: \"executionFunctions\",\n type: \"bytes4[]\",\n internalType: \"bytes4[]\"\n },\n {\n name: \"permittedExecutionSelectors\",\n type: \"bytes4[]\",\n internalType: \"bytes4[]\"\n },\n {\n name: \"permitAnyExternalAddress\",\n type: \"bool\",\n internalType: \"bool\"\n },\n { name: \"canSpendNativeToken\", type: \"bool\", internalType: \"bool\" },\n {\n name: \"permittedExternalCalls\",\n type: \"tuple[]\",\n internalType: \"struct ManifestExternalCallPermission[]\",\n components: [\n {\n name: \"externalAddress\",\n type: \"address\",\n internalType: \"address\"\n },\n { name: \"permitAnySelector\", type: \"bool\", internalType: \"bool\" },\n { name: \"selectors\", type: \"bytes4[]\", internalType: \"bytes4[]\" }\n ]\n },\n {\n name: \"userOpValidationFunctions\",\n type: \"tuple[]\",\n internalType: \"struct ManifestAssociatedFunction[]\",\n components: [\n {\n name: \"executionSelector\",\n type: \"bytes4\",\n internalType: \"bytes4\"\n },\n {\n name: \"associatedFunction\",\n type: \"tuple\",\n internalType: \"struct ManifestFunction\",\n components: [\n {\n name: \"functionType\",\n type: \"uint8\",\n internalType: \"enum ManifestAssociatedFunctionType\"\n },\n { name: \"functionId\", type: \"uint8\", internalType: \"uint8\" },\n {\n name: \"dependencyIndex\",\n type: \"uint256\",\n internalType: \"uint256\"\n }\n ]\n }\n ]\n },\n {\n name: \"runtimeValidationFunctions\",\n type: \"tuple[]\",\n internalType: \"struct ManifestAssociatedFunction[]\",\n components: [\n {\n name: \"executionSelector\",\n type: \"bytes4\",\n internalType: \"bytes4\"\n },\n {\n name: \"associatedFunction\",\n type: \"tuple\",\n internalType: \"struct ManifestFunction\",\n components: [\n {\n name: \"functionType\",\n type: \"uint8\",\n internalType: \"enum ManifestAssociatedFunctionType\"\n },\n { name: \"functionId\", type: \"uint8\", internalType: \"uint8\" },\n {\n name: \"dependencyIndex\",\n type: \"uint256\",\n internalType: \"uint256\"\n }\n ]\n }\n ]\n },\n {\n name: \"preUserOpValidationHooks\",\n type: \"tuple[]\",\n internalType: \"struct ManifestAssociatedFunction[]\",\n components: [\n {\n name: \"executionSelector\",\n type: \"bytes4\",\n internalType: \"bytes4\"\n },\n {\n name: \"associatedFunction\",\n type: \"tuple\",\n internalType: \"struct ManifestFunction\",\n components: [\n {\n name: \"functionType\",\n type: \"uint8\",\n internalType: \"enum ManifestAssociatedFunctionType\"\n },\n { name: \"functionId\", type: \"uint8\", internalType: \"uint8\" },\n {\n name: \"dependencyIndex\",\n type: \"uint256\",\n internalType: \"uint256\"\n }\n ]\n }\n ]\n },\n {\n name: \"preRuntimeValidationHooks\",\n type: \"tuple[]\",\n internalType: \"struct ManifestAssociatedFunction[]\",\n components: [\n {\n name: \"executionSelector\",\n type: \"bytes4\",\n internalType: \"bytes4\"\n },\n {\n name: \"associatedFunction\",\n type: \"tuple\",\n internalType: \"struct ManifestFunction\",\n components: [\n {\n name: \"functionType\",\n type: \"uint8\",\n internalType: \"enum ManifestAssociatedFunctionType\"\n },\n { name: \"functionId\", type: \"uint8\", internalType: \"uint8\" },\n {\n name: \"dependencyIndex\",\n type: \"uint256\",\n internalType: \"uint256\"\n }\n ]\n }\n ]\n },\n {\n name: \"executionHooks\",\n type: \"tuple[]\",\n internalType: \"struct ManifestExecutionHook[]\",\n components: [\n {\n name: \"executionSelector\",\n type: \"bytes4\",\n internalType: \"bytes4\"\n },\n {\n name: \"preExecHook\",\n type: \"tuple\",\n internalType: \"struct ManifestFunction\",\n components: [\n {\n name: \"functionType\",\n type: \"uint8\",\n internalType: \"enum ManifestAssociatedFunctionType\"\n },\n { name: \"functionId\", type: \"uint8\", internalType: \"uint8\" },\n {\n name: \"dependencyIndex\",\n type: \"uint256\",\n internalType: \"uint256\"\n }\n ]\n },\n {\n name: \"postExecHook\",\n type: \"tuple\",\n internalType: \"struct ManifestFunction\",\n components: [\n {\n name: \"functionType\",\n type: \"uint8\",\n internalType: \"enum ManifestAssociatedFunctionType\"\n },\n { name: \"functionId\", type: \"uint8\", internalType: \"uint8\" },\n {\n name: \"dependencyIndex\",\n type: \"uint256\",\n internalType: \"uint256\"\n }\n ]\n }\n ]\n }\n ]\n }\n ],\n stateMutability: \"pure\"\n },\n {\n type: \"function\",\n name: \"pluginMetadata\",\n inputs: [],\n outputs: [\n {\n name: \"\",\n type: \"tuple\",\n internalType: \"struct PluginMetadata\",\n components: [\n { name: \"name\", type: \"string\", internalType: \"string\" },\n { name: \"version\", type: \"string\", internalType: \"string\" },\n { name: \"author\", type: \"string\", internalType: \"string\" },\n {\n name: \"permissionDescriptors\",\n type: \"tuple[]\",\n internalType: \"struct SelectorPermission[]\",\n components: [\n {\n name: \"functionSelector\",\n type: \"bytes4\",\n internalType: \"bytes4\"\n },\n {\n name: \"permissionDescription\",\n type: \"string\",\n internalType: \"string\"\n }\n ]\n }\n ]\n }\n ],\n stateMutability: \"pure\"\n },\n {\n type: \"function\",\n name: \"postExecutionHook\",\n inputs: [\n { name: \"functionId\", type: \"uint8\", internalType: \"uint8\" },\n { name: \"preExecHookData\", type: \"bytes\", internalType: \"bytes\" }\n ],\n outputs: [],\n stateMutability: \"nonpayable\"\n },\n {\n type: \"function\",\n name: \"preExecutionHook\",\n inputs: [\n { name: \"functionId\", type: \"uint8\", internalType: \"uint8\" },\n { name: \"sender\", type: \"address\", internalType: \"address\" },\n { name: \"value\", type: \"uint256\", internalType: \"uint256\" },\n { name: \"data\", type: \"bytes\", internalType: \"bytes\" }\n ],\n outputs: [{ name: \"\", type: \"bytes\", internalType: \"bytes\" }],\n stateMutability: \"nonpayable\"\n },\n {\n type: \"function\",\n name: \"preRuntimeValidationHook\",\n inputs: [\n { name: \"functionId\", type: \"uint8\", internalType: \"uint8\" },\n { name: \"sender\", type: \"address\", internalType: \"address\" },\n { name: \"value\", type: \"uint256\", internalType: \"uint256\" },\n { name: \"data\", type: \"bytes\", internalType: \"bytes\" }\n ],\n outputs: [],\n stateMutability: \"nonpayable\"\n },\n {\n type: \"function\",\n name: \"preUserOpValidationHook\",\n inputs: [\n { name: \"functionId\", type: \"uint8\", internalType: \"uint8\" },\n {\n name: \"userOp\",\n type: \"tuple\",\n internalType: \"struct UserOperation\",\n components: [\n { name: \"sender\", type: \"address\", internalType: \"address\" },\n { name: \"nonce\", type: \"uint256\", internalType: \"uint256\" },\n { name: \"initCode\", type: \"bytes\", internalType: \"bytes\" },\n { name: \"callData\", type: \"bytes\", internalType: \"bytes\" },\n { name: \"callGasLimit\", type: \"uint256\", internalType: \"uint256\" },\n {\n name: \"verificationGasLimit\",\n type: \"uint256\",\n internalType: \"uint256\"\n },\n {\n name: \"preVerificationGas\",\n type: \"uint256\",\n internalType: \"uint256\"\n },\n { name: \"maxFeePerGas\", type: \"uint256\", internalType: \"uint256\" },\n {\n name: \"maxPriorityFeePerGas\",\n type: \"uint256\",\n internalType: \"uint256\"\n },\n { name: \"paymasterAndData\", type: \"bytes\", internalType: \"bytes\" },\n { name: \"signature\", type: \"bytes\", internalType: \"bytes\" }\n ]\n },\n { name: \"userOpHash\", type: \"bytes32\", internalType: \"bytes32\" }\n ],\n outputs: [{ name: \"\", type: \"uint256\", internalType: \"uint256\" }],\n stateMutability: \"nonpayable\"\n },\n {\n type: \"function\",\n name: \"removeSessionKey\",\n inputs: [\n { name: \"sessionKey\", type: \"address\", internalType: \"address\" },\n { name: \"predecessor\", type: \"bytes32\", internalType: \"bytes32\" }\n ],\n outputs: [],\n stateMutability: \"nonpayable\"\n },\n {\n type: \"function\",\n name: \"resetSessionKeyGasLimitTimestamp\",\n inputs: [\n { name: \"account\", type: \"address\", internalType: \"address\" },\n { name: \"sessionKey\", type: \"address\", internalType: \"address\" }\n ],\n outputs: [],\n stateMutability: \"nonpayable\"\n },\n {\n type: \"function\",\n name: \"rotateSessionKey\",\n inputs: [\n { name: \"oldSessionKey\", type: \"address\", internalType: \"address\" },\n { name: \"predecessor\", type: \"bytes32\", internalType: \"bytes32\" },\n { name: \"newSessionKey\", type: \"address\", internalType: \"address\" }\n ],\n outputs: [],\n stateMutability: \"nonpayable\"\n },\n {\n type: \"function\",\n name: \"runtimeValidationFunction\",\n inputs: [\n { name: \"functionId\", type: \"uint8\", internalType: \"uint8\" },\n { name: \"sender\", type: \"address\", internalType: \"address\" },\n { name: \"value\", type: \"uint256\", internalType: \"uint256\" },\n { name: \"data\", type: \"bytes\", internalType: \"bytes\" }\n ],\n outputs: [],\n stateMutability: \"nonpayable\"\n },\n {\n type: \"function\",\n name: \"sessionKeysOf\",\n inputs: [{ name: \"account\", type: \"address\", internalType: \"address\" }],\n outputs: [{ name: \"\", type: \"address[]\", internalType: \"address[]\" }],\n stateMutability: \"view\"\n },\n {\n type: \"function\",\n name: \"supportsInterface\",\n inputs: [{ name: \"interfaceId\", type: \"bytes4\", internalType: \"bytes4\" }],\n outputs: [{ name: \"\", type: \"bool\", internalType: \"bool\" }],\n stateMutability: \"view\"\n },\n {\n type: \"function\",\n name: \"updateKeyPermissions\",\n inputs: [\n { name: \"sessionKey\", type: \"address\", internalType: \"address\" },\n { name: \"updates\", type: \"bytes[]\", internalType: \"bytes[]\" }\n ],\n outputs: [],\n stateMutability: \"nonpayable\"\n },\n {\n type: \"function\",\n name: \"userOpValidationFunction\",\n inputs: [\n { name: \"functionId\", type: \"uint8\", internalType: \"uint8\" },\n {\n name: \"userOp\",\n type: \"tuple\",\n internalType: \"struct UserOperation\",\n components: [\n { name: \"sender\", type: \"address\", internalType: \"address\" },\n { name: \"nonce\", type: \"uint256\", internalType: \"uint256\" },\n { name: \"initCode\", type: \"bytes\", internalType: \"bytes\" },\n { name: \"callData\", type: \"bytes\", internalType: \"bytes\" },\n { name: \"callGasLimit\", type: \"uint256\", internalType: \"uint256\" },\n {\n name: \"verificationGasLimit\",\n type: \"uint256\",\n internalType: \"uint256\"\n },\n {\n name: \"preVerificationGas\",\n type: \"uint256\",\n internalType: \"uint256\"\n },\n { name: \"maxFeePerGas\", type: \"uint256\", internalType: \"uint256\" },\n {\n name: \"maxPriorityFeePerGas\",\n type: \"uint256\",\n internalType: \"uint256\"\n },\n { name: \"paymasterAndData\", type: \"bytes\", internalType: \"bytes\" },\n { name: \"signature\", type: \"bytes\", internalType: \"bytes\" }\n ]\n },\n { name: \"userOpHash\", type: \"bytes32\", internalType: \"bytes32\" }\n ],\n outputs: [{ name: \"\", type: \"uint256\", internalType: \"uint256\" }],\n stateMutability: \"nonpayable\"\n },\n {\n type: \"event\",\n name: \"PermissionsUpdated\",\n inputs: [\n {\n name: \"account\",\n type: \"address\",\n indexed: true,\n internalType: \"address\"\n },\n {\n name: \"sessionKey\",\n type: \"address\",\n indexed: true,\n internalType: \"address\"\n },\n {\n name: \"updates\",\n type: \"bytes[]\",\n indexed: false,\n internalType: \"bytes[]\"\n }\n ],\n anonymous: false\n },\n {\n type: \"event\",\n name: \"SessionKeyAdded\",\n inputs: [\n {\n name: \"account\",\n type: \"address\",\n indexed: true,\n internalType: \"address\"\n },\n {\n name: \"sessionKey\",\n type: \"address\",\n indexed: true,\n internalType: \"address\"\n },\n { name: \"tag\", type: \"bytes32\", indexed: true, internalType: \"bytes32\" }\n ],\n anonymous: false\n },\n {\n type: \"event\",\n name: \"SessionKeyRemoved\",\n inputs: [\n {\n name: \"account\",\n type: \"address\",\n indexed: true,\n internalType: \"address\"\n },\n {\n name: \"sessionKey\",\n type: \"address\",\n indexed: true,\n internalType: \"address\"\n }\n ],\n anonymous: false\n },\n {\n type: \"event\",\n name: \"SessionKeyRotated\",\n inputs: [\n {\n name: \"account\",\n type: \"address\",\n indexed: true,\n internalType: \"address\"\n },\n {\n name: \"oldSessionKey\",\n type: \"address\",\n indexed: true,\n internalType: \"address\"\n },\n {\n name: \"newSessionKey\",\n type: \"address\",\n indexed: true,\n internalType: \"address\"\n }\n ],\n anonymous: false\n },\n { type: \"error\", name: \"AlreadyInitialized\", inputs: [] },\n {\n type: \"error\",\n name: \"ERC20SpendLimitExceeded\",\n inputs: [\n { name: \"account\", type: \"address\", internalType: \"address\" },\n { name: \"sessionKey\", type: \"address\", internalType: \"address\" },\n { name: \"token\", type: \"address\", internalType: \"address\" }\n ]\n },\n { type: \"error\", name: \"InvalidAction\", inputs: [] },\n {\n type: \"error\",\n name: \"InvalidPermissionsUpdate\",\n inputs: [\n { name: \"updateSelector\", type: \"bytes4\", internalType: \"bytes4\" }\n ]\n },\n {\n type: \"error\",\n name: \"InvalidSessionKey\",\n inputs: [{ name: \"sessionKey\", type: \"address\", internalType: \"address\" }]\n },\n {\n type: \"error\",\n name: \"InvalidSignature\",\n inputs: [{ name: \"sessionKey\", type: \"address\", internalType: \"address\" }]\n },\n {\n type: \"error\",\n name: \"InvalidToken\",\n inputs: [{ name: \"token\", type: \"address\", internalType: \"address\" }]\n },\n { type: \"error\", name: \"LengthMismatch\", inputs: [] },\n {\n type: \"error\",\n name: \"NativeTokenSpendLimitExceeded\",\n inputs: [\n { name: \"account\", type: \"address\", internalType: \"address\" },\n { name: \"sessionKey\", type: \"address\", internalType: \"address\" }\n ]\n },\n {\n type: \"error\",\n name: \"NotContractCaller\",\n inputs: [{ name: \"caller\", type: \"address\", internalType: \"address\" }]\n },\n {\n type: \"error\",\n name: \"NotImplemented\",\n inputs: [\n { name: \"selector\", type: \"bytes4\", internalType: \"bytes4\" },\n { name: \"functionId\", type: \"uint8\", internalType: \"uint8\" }\n ]\n },\n { type: \"error\", name: \"NotInitialized\", inputs: [] },\n {\n type: \"error\",\n name: \"SessionKeyNotFound\",\n inputs: [{ name: \"sessionKey\", type: \"address\", internalType: \"address\" }]\n }\n ];\n }\n });\n\n // ../../../node_modules/.pnpm/@account-kit+smart-contracts@4.62.0_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5._65dee0153d50ca3a2d2c6830319271d9/node_modules/@account-kit/smart-contracts/dist/esm/src/msca/plugins/session-key/utils.js\n async function buildSessionKeysToRemoveStruct(client, args) {\n const { keys, pluginAddress, account = client.account } = args;\n if (!account)\n throw new AccountNotFoundError2();\n const contract = SessionKeyPlugin.getContract(client, pluginAddress);\n return (await Promise.all(keys.map(async (key) => {\n return [\n key,\n await contract.read.findPredecessor([account.address, key])\n ];\n }))).map(([key, predecessor]) => ({\n sessionKey: key,\n predecessor\n }));\n }\n var init_utils14 = __esm({\n \"../../../node_modules/.pnpm/@account-kit+smart-contracts@4.62.0_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5._65dee0153d50ca3a2d2c6830319271d9/node_modules/@account-kit/smart-contracts/dist/esm/src/msca/plugins/session-key/utils.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_esm6();\n init_plugin3();\n }\n });\n\n // ../../../node_modules/.pnpm/@account-kit+smart-contracts@4.62.0_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5._65dee0153d50ca3a2d2c6830319271d9/node_modules/@account-kit/smart-contracts/dist/esm/src/msca/plugins/session-key/debug-session-key-bytecode.js\n var debug_session_key_bytecode_exports = {};\n __export(debug_session_key_bytecode_exports, {\n DEBUG_SESSION_KEY_BYTECODE: () => DEBUG_SESSION_KEY_BYTECODE\n });\n var DEBUG_SESSION_KEY_BYTECODE;\n var init_debug_session_key_bytecode = __esm({\n \"../../../node_modules/.pnpm/@account-kit+smart-contracts@4.62.0_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5._65dee0153d50ca3a2d2c6830319271d9/node_modules/@account-kit/smart-contracts/dist/esm/src/msca/plugins/session-key/debug-session-key-bytecode.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n DEBUG_SESSION_KEY_BYTECODE = \"0x6040608081526004908136101561001557600080fd5b6000803560e01c806331d99c2c146100975763af8734831461003657600080fd5b34610090576003196060368201126100935783359160ff83168303610090576024359167ffffffffffffffff831161009357610160908336030112610090575092610089916020946044359201906106ed565b9051908152f35b80fd5b5080fd5b50823461009357826003193601126100935767ffffffffffffffff81358181116105255736602382011215610525578083013590828211610521576024926024820191602436918560051b01011161051d576001600160a01b0394602435868116810361051957604080516080810182526060808252336020830190815263068076b960e21b938301939093526001600160a01b039093169083015220548761016f8233606091826040516001600160a01b03602082019460808301604052838352168452630b5ff94b60e11b604082015201522090565b91895b87811061045d57505060ff825460781c16156103ef575b5080549060ff8260801c166103b6575b50506101a88497959894610584565b956101b58551978861054c565b8787526101c188610584565b98602098601f19809b01885b8181106103a7575050875b818110610256575050505050505080519380850191818652845180935281818701918460051b880101950193965b8388106102135786860387f35b9091929394838080600193603f198b820301875285601f8b5161024181518092818752878088019101610529565b01160101970193019701969093929193610206565b6102668183899e9b9d9a9e61059c565b803585811680910361039557908c8a928f898e610285838701876105d9565b9790935196879586947f38997b1100000000000000000000000000000000000000000000000000000000865285015201358a83015260606044830152866064830152866084938484013784838884010152601f80970116810103018183335af191821561039d578d9261031a575b505090600191610303828d610628565b5261030e818c610628565b50019a9699979a6101d8565b9091503d808e843e61032c818461054c565b8201918a818403126103915780519089821161039957019081018213156103955790818e92519161036861035f8461060c565b9451948561054c565b8284528b8383010111610391578291610389918c8060019796019101610529565b90918e6102f3565b8d80fd5b8c80fd5b8e80fd5b8e513d8f823e3d90fd5b60608b82018d01528b016101cd565b70ff00000000000000000000000000000000199091168155600101805465ffffffffffff19164265ffffffffffff161790558880610199565b6104029060068301906002840190611191565b1561040d5789610189565b610459828a5191829162461bcd60e51b8352820160609060208152601460208201527f5370656e64206c696d697420657863656564656400000000000000000000000060408201520190565b0390fd5b6104713661046c838b8b61059c565b610673565b926104826020918286015190611042565b938d6104928d83511686336110b0565b9160ff835460101c166104ac575b50505050600101610172565b6104ca92916104bc910151611146565b600160028301920190611191565b156104d757808d816104a0565b85601a8b8f93606494519362461bcd60e51b85528401528201527f4552433230207370656e64206c696d69742065786365656465640000000000006044820152fd5b8780fd5b8580fd5b8480fd5b8380fd5b60005b83811061053c5750506000910152565b818101518382015260200161052c565b90601f8019910116810190811067ffffffffffffffff82111761056e57604052565b634e487b7160e01b600052604160045260246000fd5b67ffffffffffffffff811161056e5760051b60200190565b91908110156105c35760051b81013590605e19813603018212156105be570190565b600080fd5b634e487b7160e01b600052603260045260246000fd5b903590601e19813603018212156105be570180359067ffffffffffffffff82116105be576020019181360383136105be57565b67ffffffffffffffff811161056e57601f01601f191660200190565b80518210156105c35760209160051b010190565b9291926106488261060c565b91610656604051938461054c565b8294818452818301116105be578281602093846000960137010152565b91906060838203126105be576040519067ffffffffffffffff606083018181118482101761056e57604052829480356001600160a01b03811681036105be5784526020810135602085015260408101359182116105be570181601f820112156105be576040918160206106e89335910161063c565b910152565b60ff161561073957606460405162461bcd60e51b815260206004820152602060248201527f57726f6e672066756e6374696f6e20696420666f722076616c69646174696f6e6044820152fd5b61074660608201826105d9565b806004949294116105be57830192604081850360031901126105be5767ffffffffffffffff9360048201358581116105be57820194816023870112156105be5760048601359561079587610584565b966107a3604051988961054c565b8088526024602089019160051b830101928484116105be5760248301915b84831061101b5750505050505060240135906001600160a01b03821682036105be577f19457468657265756d205369676e6564204d6573736167653a0a333200000000600052601c52610830603c60002061082a6108236101408601866105d9565b369161063c565b90611065565b600581101561100557610f9c5760806040513381527ff938c976000000000000000000000000000000000000000000000000000000006020820152600160408201526bffffffffffffffffffffffff198460601b166060820152205415610f5857604080516080810182526060808252336020830190815263068076b960e21b938301939093526001600160a01b03851691810191909152902054926109058433606091826040516001600160a01b03602082019460808301604052838352168452630b5ff94b60e11b604082015201522090565b9081549465ffffffffffff8660081c16966000918151918215610f145760005b838110610ed2575050505060ff8660781c1615610d50575b5060ff8560701c16610aa8575b60ff825460681c166109db575b50506001600160a01b039182169116036109a85765ffffffffffff60a01b7fffffffffffff00000000000000000000000000000000000000000000000000006000935b60d01b169160681b16171790565b65ffffffffffff60a01b7fffffffffffff000000000000000000000000000000000000000000000000000060019361099a565b806101206109ea9201906105d9565b6bffffffffffffffffffffffff199135918216929160148210610a6c575b505060036001600160a01b03910154169060601c03610a28573880610957565b606460405162461bcd60e51b815260206004820152601b60248201527f4d75737420757365207265717569726564207061796d617374657200000000006044820152fd5b6001600160a01b03929350906003916bffffffffffffffffffffffff19916bffffffffffffffffffffffff1990601403841b1b16169291610a08565b946001600160a01b038416602087013560401c03610cc057610ace6101208701876105d9565b159050610cab57610b11610b06610afb610af160ff60035b1660a08b013561109d565b60808a0135611042565b60c089013590611042565b60e08801359061109d565b9060009060018401546005850154906004860154908583810110610c675765ffffffffffff8160301c1615600014610ba6575081850111610b6157610b5b9301600585015561154f565b9461094a565b60405162461bcd60e51b815260206004820152601260248201527f476173206c696d697420657863656564656400000000000000000000000000006044820152606490fd5b92935093848282011115600014610bf657610b5b945001600585015560ff8760801c16600014610bee578065ffffffffffff80610be89360301c169116611177565b9061154f565b506000610be8565b809392949150111580610c59575b15610b6157610c248365ffffffffffff80610b5b9660301c169116611177565b9170010000000000000000000000000000000070ff00000000000000000000000000000000198916178555600585015561154f565b5060ff8760801c1615610c04565b606460405162461bcd60e51b815260206004820152601260248201527f476173206c696d6974206f766572666c6f7700000000000000000000000000006044820152fd5b610b11610b06610afb610af160ff6001610ae6565b60a460405162461bcd60e51b815260206004820152604f60248201527f4d757374207573652073657373696f6e206b6579206173206b657920706f727460448201527f696f6e206f66206e6f6e6365207768656e20676173206c696d6974206368656360648201527f6b696e6720697320656e61626c656400000000000000000000000000000000006084820152fd5b6000969196906002840154906007850154906006860154928183810110610e8e5765ffffffffffff8160301c1615600014610de157500111610d9c57610d959161154f565b943861093d565b60405162461bcd60e51b815260206004820152601460248201527f5370656e64206c696d69742065786365656465640000000000000000000000006044820152606490fd5b94928092820111610df9575b5050610d95925061154f565b91925010610e2457610e1c8265ffffffffffff80610d959560301c169116611177565b903880610ded565b608460405162461bcd60e51b815260206004820152603260248201527f5370656e64206c696d69742065786365656465642c206576656e20696e636c7560448201527f64696e67206e65787420696e74657276616c00000000000000000000000000006064820152fd5b606460405162461bcd60e51b815260206004820152601460248201527f5370656e64206c696d6974206f766572666c6f770000000000000000000000006044820152fd5b80610f0e8b610ef3610ee660019587610628565b519860208a015190611042565b978660ff60406001600160a01b0384511693015193166112bf565b01610925565b606460405162461bcd60e51b815260206004820152601b60248201527f4d7573742068617665206174206c65617374206f6e652063616c6c00000000006044820152fd5b606460405162461bcd60e51b815260206004820152601360248201527f556e6b6e6f776e2073657373696f6e206b6579000000000000000000000000006044820152fd5b608460405162461bcd60e51b8152602060048201526024808201527f5369676e617475726520646f6573206e6f74206d617463682073657373696f6e60448201527f206b6579000000000000000000000000000000000000000000000000000000006064820152fd5b634e487b7160e01b600052602160045260246000fd5b82358281116105be576020916110378860248594890101610673565b8152019201916107c1565b9190820180921161104f57565b634e487b7160e01b600052601160045260246000fd5b9060418151146000146110935761108f916020820151906060604084015193015160001a90611230565b9091565b5050600090600290565b8181029291811591840414171561104f57565b9061111192916040519260a08401604052608084526001600160a01b0380921660208501527f634c29f50000000000000000000000000000000000000000000000000000000060408501521690606083015260808201526020815191012090565b90565b90602082519201516001600160e01b031990818116936004811061113757505050565b60040360031b82901b16169150565b61115761115282611114565b61156c565b6111615750600090565b6044815110611171576044015190565b50600090565b91909165ffffffffffff8080941691160191821161104f57565b9181549165ffffffffffff90818460301c169160018454940194855493828115928315611218575b5050506000146111ee57505083019283109081156111e4575b506111dd5755600190565b5050600090565b90508211386111d2565b9391509391821161120f5755421665ffffffffffff19825416179055600190565b50505050600090565b611223935016611177565b81429116113882816111b9565b9291907f7fffffffffffffffffffffffffffffff5d576e7357a4501ddfe92f46681b20a083116112b35791608094939160ff602094604051948552168484015260408301526060820152600093849182805260015afa156112a65781516001600160a01b038116156112a0579190565b50600190565b50604051903d90823e3d90fd5b50505050600090600390565b91926112ca90611114565b926112d68183336110b0565b926003811015611005578061147d5750825460ff8116156114395760081c60ff1615611433578361130a9160ff93336115cb565b5416156113c95760ff905b5460101c1690816113b8575b5061132857565b60a460405162461bcd60e51b815260206004820152604460248201527f46756e6374696f6e2073656c6563746f72206e6f7420616c6c6f77656420666f60448201527f7220455243323020636f6e74726163742077697468207370656e64696e67206c60648201527f696d6974000000000000000000000000000000000000000000000000000000006084820152fd5b6113c2915061156c565b1538611321565b608460405162461bcd60e51b815260206004820152602260248201527f46756e6374696f6e2073656c6563746f72206e6f74206f6e20616c6c6f776c6960448201527f73740000000000000000000000000000000000000000000000000000000000006064820152fd5b50505050565b606460405162461bcd60e51b815260206004820152601f60248201527f5461726765742061646472657373206e6f74206f6e20616c6c6f776c697374006044820152fd5b60011461148f575b505060ff90611315565b825460ff8116156115485760081c60ff161561150457836114b39160ff93336115cb565b54166114c0573880611485565b606460405162461bcd60e51b815260206004820152601d60248201527f46756e6374696f6e2073656c6563746f72206f6e2064656e796c6973740000006044820152fd5b606460405162461bcd60e51b815260206004820152601a60248201527f5461726765742061646472657373206f6e2064656e796c6973740000000000006044820152fd5b5050505050565b9065ffffffffffff8082169083161115611567575090565b905090565b6001600160e01b0319167fa9059cbb0000000000000000000000000000000000000000000000000000000081149081156115a4575090565b7f095ea7b30000000000000000000000000000000000000000000000000000000091501490565b926001600160e01b0319611111946040519460a08601604052608086526001600160a01b0380921660208701527fd50536f0000000000000000000000000000000000000000000000000000000006040870152169116179060608301526080820152602081519101209056fea26469706673582212201c78177154c86c4d5ed4f532b4017a1d665037d4831a7cd69e8e8bd8408ab3e764736f6c63430008160033\";\n }\n });\n\n // ../../../node_modules/.pnpm/@account-kit+smart-contracts@4.62.0_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5._65dee0153d50ca3a2d2c6830319271d9/node_modules/@account-kit/smart-contracts/dist/esm/src/msca/plugins/session-key/extension.js\n function getRpcErrorMessageFromViemError(error) {\n const details = error?.details;\n return typeof details === \"string\" ? details : void 0;\n }\n var sessionKeyPluginActions2, SessionKeyPermissionError;\n var init_extension3 = __esm({\n \"../../../node_modules/.pnpm/@account-kit+smart-contracts@4.62.0_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5._65dee0153d50ca3a2d2c6830319271d9/node_modules/@account-kit/smart-contracts/dist/esm/src/msca/plugins/session-key/extension.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_esm6();\n init_plugin3();\n init_utils14();\n sessionKeyPluginActions2 = (client) => {\n const { removeSessionKey, addSessionKey, rotateSessionKey, updateKeyPermissions, executeWithSessionKey, ...og } = sessionKeyPluginActions(client);\n const fixedExecuteWithSessionKey = async (...originalArgs) => {\n let initialError;\n try {\n return await executeWithSessionKey(...originalArgs);\n } catch (error) {\n initialError = error;\n }\n const details = getRpcErrorMessageFromViemError(initialError);\n if (!details?.includes(\"AA23 reverted (or OOG)\")) {\n throw initialError;\n }\n if (!isSmartAccountClient(client) || !client.chain) {\n throw initialError;\n }\n const { args, overrides, context: context2, account = client.account } = originalArgs[0];\n if (!account) {\n throw initialError;\n }\n const data = og.encodeExecuteWithSessionKey({ args });\n const sessionKeyPluginAddress = SessionKeyPlugin.meta.addresses[client.chain.id];\n const { DEBUG_SESSION_KEY_BYTECODE: DEBUG_SESSION_KEY_BYTECODE2 } = await Promise.resolve().then(() => (init_debug_session_key_bytecode(), debug_session_key_bytecode_exports));\n const updatedOverrides = {\n ...overrides,\n stateOverride: [\n ...overrides?.stateOverride ?? [],\n {\n address: sessionKeyPluginAddress,\n code: DEBUG_SESSION_KEY_BYTECODE2\n }\n ]\n };\n try {\n await client.buildUserOperation({\n uo: data,\n overrides: updatedOverrides,\n context: context2,\n account\n });\n throw initialError;\n } catch (improvedError) {\n const details2 = getRpcErrorMessageFromViemError(improvedError) ?? \"\";\n const reason = details2.match(/AA23 reverted: (.+)/)?.[1];\n if (!reason) {\n throw initialError;\n }\n throw new SessionKeyPermissionError(reason);\n }\n };\n return {\n ...og,\n executeWithSessionKey: fixedExecuteWithSessionKey,\n isAccountSessionKey: async ({ key, pluginAddress, account = client.account }) => {\n if (!account)\n throw new AccountNotFoundError2();\n const contract = SessionKeyPlugin.getContract(client, pluginAddress);\n return await contract.read.isSessionKeyOf([account.address, key]);\n },\n getAccountSessionKeys: async (args) => {\n const account = args?.account ?? client.account;\n if (!account)\n throw new AccountNotFoundError2();\n const contract = SessionKeyPlugin.getContract(client, args?.pluginAddress);\n return await contract.read.sessionKeysOf([account.address]);\n },\n removeSessionKey: async ({ key, overrides, account = client.account, pluginAddress }) => {\n if (!account)\n throw new AccountNotFoundError2();\n const sessionKeysToRemove = await buildSessionKeysToRemoveStruct(client, {\n keys: [key],\n account,\n pluginAddress\n });\n return removeSessionKey({\n args: [key, sessionKeysToRemove[0].predecessor],\n overrides,\n account\n });\n },\n addSessionKey: async ({ key, tag, permissions, overrides, pluginAddress, account = client.account }) => {\n if (!account)\n throw new AccountNotFoundError2();\n return addSessionKey({\n args: [key, tag, permissions],\n overrides,\n account,\n pluginAddress\n });\n },\n rotateSessionKey: async ({ newKey, oldKey, overrides, pluginAddress, account = client.account }) => {\n if (!account)\n throw new AccountNotFoundError2();\n const contract = SessionKeyPlugin.getContract(client, pluginAddress);\n const predecessor = await contract.read.findPredecessor([\n account.address,\n oldKey\n ]);\n return rotateSessionKey({\n args: [oldKey, predecessor, newKey],\n overrides,\n account,\n pluginAddress\n });\n },\n updateSessionKeyPermissions: async ({ key, permissions, overrides, pluginAddress, account = client.account }) => {\n if (!account)\n throw new AccountNotFoundError2();\n return updateKeyPermissions({\n args: [key, permissions],\n overrides,\n account,\n pluginAddress\n });\n }\n };\n };\n SessionKeyPermissionError = class extends Error {\n };\n }\n });\n\n // ../../../node_modules/.pnpm/@account-kit+smart-contracts@4.62.0_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5._65dee0153d50ca3a2d2c6830319271d9/node_modules/@account-kit/smart-contracts/dist/esm/src/msca/plugins/session-key/SessionKeyPermissionsUpdatesAbi.js\n var SessionKeyPermissionsUpdatesAbi;\n var init_SessionKeyPermissionsUpdatesAbi = __esm({\n \"../../../node_modules/.pnpm/@account-kit+smart-contracts@4.62.0_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5._65dee0153d50ca3a2d2c6830319271d9/node_modules/@account-kit/smart-contracts/dist/esm/src/msca/plugins/session-key/SessionKeyPermissionsUpdatesAbi.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n SessionKeyPermissionsUpdatesAbi = [\n {\n type: \"function\",\n name: \"setAccessListType\",\n inputs: [\n {\n name: \"contractAccessControlType\",\n type: \"uint8\",\n internalType: \"enum ISessionKeyPlugin.ContractAccessControlType\"\n }\n ],\n outputs: [],\n stateMutability: \"nonpayable\"\n },\n {\n type: \"function\",\n name: \"setERC20SpendLimit\",\n inputs: [\n { name: \"token\", type: \"address\", internalType: \"address\" },\n { name: \"spendLimit\", type: \"uint256\", internalType: \"uint256\" },\n {\n name: \"refreshInterval\",\n type: \"uint48\",\n internalType: \"uint48\"\n }\n ],\n outputs: [],\n stateMutability: \"nonpayable\"\n },\n {\n type: \"function\",\n name: \"setGasSpendLimit\",\n inputs: [\n { name: \"spendLimit\", type: \"uint256\", internalType: \"uint256\" },\n {\n name: \"refreshInterval\",\n type: \"uint48\",\n internalType: \"uint48\"\n }\n ],\n outputs: [],\n stateMutability: \"nonpayable\"\n },\n {\n type: \"function\",\n name: \"setNativeTokenSpendLimit\",\n inputs: [\n { name: \"spendLimit\", type: \"uint256\", internalType: \"uint256\" },\n {\n name: \"refreshInterval\",\n type: \"uint48\",\n internalType: \"uint48\"\n }\n ],\n outputs: [],\n stateMutability: \"nonpayable\"\n },\n {\n type: \"function\",\n name: \"setRequiredPaymaster\",\n inputs: [\n {\n name: \"requiredPaymaster\",\n type: \"address\",\n internalType: \"address\"\n }\n ],\n outputs: [],\n stateMutability: \"nonpayable\"\n },\n {\n type: \"function\",\n name: \"updateAccessListAddressEntry\",\n inputs: [\n {\n name: \"contractAddress\",\n type: \"address\",\n internalType: \"address\"\n },\n { name: \"isOnList\", type: \"bool\", internalType: \"bool\" },\n { name: \"checkSelectors\", type: \"bool\", internalType: \"bool\" }\n ],\n outputs: [],\n stateMutability: \"nonpayable\"\n },\n {\n type: \"function\",\n name: \"updateAccessListFunctionEntry\",\n inputs: [\n {\n name: \"contractAddress\",\n type: \"address\",\n internalType: \"address\"\n },\n { name: \"selector\", type: \"bytes4\", internalType: \"bytes4\" },\n { name: \"isOnList\", type: \"bool\", internalType: \"bool\" }\n ],\n outputs: [],\n stateMutability: \"nonpayable\"\n },\n {\n type: \"function\",\n name: \"updateTimeRange\",\n inputs: [\n { name: \"validAfter\", type: \"uint48\", internalType: \"uint48\" },\n { name: \"validUntil\", type: \"uint48\", internalType: \"uint48\" }\n ],\n outputs: [],\n stateMutability: \"nonpayable\"\n }\n ];\n }\n });\n\n // ../../../node_modules/.pnpm/@account-kit+smart-contracts@4.62.0_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5._65dee0153d50ca3a2d2c6830319271d9/node_modules/@account-kit/smart-contracts/dist/esm/src/msca/plugins/session-key/permissions.js\n var SessionKeyAccessListType, SessionKeyPermissionsBuilder;\n var init_permissions = __esm({\n \"../../../node_modules/.pnpm/@account-kit+smart-contracts@4.62.0_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5._65dee0153d50ca3a2d2c6830319271d9/node_modules/@account-kit/smart-contracts/dist/esm/src/msca/plugins/session-key/permissions.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_esm();\n init_SessionKeyPermissionsUpdatesAbi();\n (function(SessionKeyAccessListType2) {\n SessionKeyAccessListType2[SessionKeyAccessListType2[\"ALLOWLIST\"] = 0] = \"ALLOWLIST\";\n SessionKeyAccessListType2[SessionKeyAccessListType2[\"DENYLIST\"] = 1] = \"DENYLIST\";\n SessionKeyAccessListType2[SessionKeyAccessListType2[\"ALLOW_ALL_ACCESS\"] = 2] = \"ALLOW_ALL_ACCESS\";\n })(SessionKeyAccessListType || (SessionKeyAccessListType = {}));\n SessionKeyPermissionsBuilder = class {\n constructor() {\n Object.defineProperty(this, \"_contractAccessControlType\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: SessionKeyAccessListType.ALLOWLIST\n });\n Object.defineProperty(this, \"_contractAddressAccessEntrys\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: []\n });\n Object.defineProperty(this, \"_contractMethodAccessEntrys\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: []\n });\n Object.defineProperty(this, \"_timeRange\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: void 0\n });\n Object.defineProperty(this, \"_nativeTokenSpendLimit\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: void 0\n });\n Object.defineProperty(this, \"_erc20TokenSpendLimits\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: []\n });\n Object.defineProperty(this, \"_gasSpendLimit\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: void 0\n });\n Object.defineProperty(this, \"_requiredPaymaster\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: void 0\n });\n }\n /**\n * Sets the access control type for the contract and returns the current instance for method chaining.\n *\n * @example\n * ```ts\n * import { SessionKeyPermissionsBuilder } from \"@account-kit/smart-contracts\";\n *\n * const builder = new SessionKeyPermissionsBuilder();\n * builder.setContractAccessControlType(SessionKeyAccessListType.ALLOWLIST);\n * ```\n *\n * @param {SessionKeyAccessListType} aclType The access control type for the session key\n * @returns {SessionKeyPermissionsBuilder} The current instance for method chaining\n */\n setContractAccessControlType(aclType) {\n this._contractAccessControlType = aclType;\n return this;\n }\n /**\n * Adds a contract access entry to the internal list of contract address access entries.\n *\n * @example\n * ```ts\n * import { SessionKeyPermissionsBuilder } from \"@account-kit/smart-contracts\";\n *\n * const builder = new SessionKeyPermissionsBuilder();\n * builder.addContractAddressAccessEntry({\n * contractAddress: \"0x1234\",\n * isOnList: true,\n * checkSelectors: true,\n * });\n * ```\n *\n * @param {ContractAccessEntry} entry the contract access entry to be added\n * @returns {SessionKeyPermissionsBuilder} the instance of the current class for chaining\n */\n addContractAddressAccessEntry(entry) {\n this._contractAddressAccessEntrys.push(entry);\n return this;\n }\n /**\n * Adds a contract method entry to the `_contractMethodAccessEntrys` array.\n *\n * @example\n * ```ts\n * import { SessionKeyPermissionsBuilder } from \"@account-kit/smart-contracts\";\n *\n * const builder = new SessionKeyPermissionsBuilder();\n * builder.addContractAddressAccessEntry({\n * contractAddress: \"0x1234\",\n * methodSelector: \"0x45678\",\n * isOnList: true,\n * });\n * ```\n *\n * @param {ContractMethodEntry} entry The contract method entry to be added\n * @returns {SessionKeyPermissionsBuilder} The instance of the class for method chaining\n */\n addContractFunctionAccessEntry(entry) {\n this._contractMethodAccessEntrys.push(entry);\n return this;\n }\n /**\n * Sets the time range for an object and returns the object itself for chaining.\n *\n * @example\n * ```ts\n * import { SessionKeyPermissionsBuilder } from \"@account-kit/smart-contracts\";\n *\n * const builder = new SessionKeyPermissionsBuilder();\n * builder.setTimeRange({\n * validFrom: Date.now(),\n * validUntil: Date.now() + (15 * 60 * 1000),\n * });\n * ```\n *\n * @param {TimeRange} timeRange The time range to be set\n * @returns {SessionKeyPermissionsBuilder} The current object for method chaining\n */\n setTimeRange(timeRange) {\n this._timeRange = timeRange;\n return this;\n }\n /**\n * Sets the native token spend limit and returns the instance for chaining.\n *\n * @example\n * ```ts\n * import { SessionKeyPermissionsBuilder } from \"@account-kit/smart-contracts\";\n *\n * const builder = new SessionKeyPermissionsBuilder();\n * builder.setNativeTokenSpendLimit({\n * spendLimit: 1000000000000000000n,\n * refreshInterval: 3600,\n * });\n * ```\n *\n * @param {NativeTokenLimit} limit The limit to set for native token spending\n * @returns {SessionKeyPermissionsBuilder} The instance for chaining\n */\n setNativeTokenSpendLimit(limit) {\n this._nativeTokenSpendLimit = limit;\n return this;\n }\n /**\n * Adds an ERC20 token spend limit to the list of limits and returns the updated object.\n *\n * @example\n * ```ts\n * import { SessionKeyPermissionsBuilder } from \"@account-kit/smart-contracts\";\n *\n * const builder = new SessionKeyPermissionsBuilder();\n * builder.addErc20TokenSpendLimit({\n * tokenAddress: \"0x1234\",\n * spendLimit: 1000000000000000000n,\n * refreshInterval: 3600,\n * });\n * ```\n *\n * @param {Erc20TokenLimit} limit The ERC20 token spend limit to be added\n * @returns {object} The updated object with the new ERC20 token spend limit\n */\n addErc20TokenSpendLimit(limit) {\n this._erc20TokenSpendLimits.push(limit);\n return this;\n }\n /**\n * Sets the gas spend limit and returns the current instance for method chaining.\n *\n * @example\n * ```ts\n * import { SessionKeyPermissionsBuilder } from \"@account-kit/smart-contracts\";\n *\n * const builder = new SessionKeyPermissionsBuilder();\n * builder.setGasSpendLimit({\n * spendLimit: 1000000000000000000n,\n * refreshInterval: 3600,\n * });\n * ```\n *\n * @param {GasSpendLimit} limit - The gas spend limit to be set\n * @returns {SessionKeyPermissionsBuilder} The current instance for chaining\n */\n setGasSpendLimit(limit) {\n this._gasSpendLimit = limit;\n return this;\n }\n /**\n * Sets the required paymaster address.\n *\n * @example\n * ```ts\n * import { SessionKeyPermissionsBuilder } from \"@account-kit/smart-contracts\";\n *\n * const builder = new SessionKeyPermissionsBuilder();\n * builder.setRequiredPaymaster(\"0x1234\");\n * ```\n *\n * @param {Address} paymaster the address of the paymaster to be set\n * @returns {SessionKeyPermissionsBuilder} the current instance for method chaining\n */\n setRequiredPaymaster(paymaster) {\n this._requiredPaymaster = paymaster;\n return this;\n }\n /**\n * Encodes various function calls into an array of hexadecimal strings based on the provided permissions and limits.\n *\n * @example\n * ```ts\n * import { SessionKeyPermissionsBuilder } from \"@account-kit/smart-contracts\";\n *\n * const builder = new SessionKeyPermissionsBuilder();\n * builder.setRequiredPaymaster(\"0x1234\");\n * const encoded = builder.encode();\n * ```\n *\n * @returns {Hex[]} An array of encoded hexadecimal strings representing the function calls for setting access control, permissions, and limits.\n */\n encode() {\n return [\n encodeFunctionData({\n abi: SessionKeyPermissionsUpdatesAbi,\n functionName: \"setAccessListType\",\n args: [this._contractAccessControlType]\n }),\n ...this._contractAddressAccessEntrys.map((entry) => encodeFunctionData({\n abi: SessionKeyPermissionsUpdatesAbi,\n functionName: \"updateAccessListAddressEntry\",\n args: [entry.contractAddress, entry.isOnList, entry.checkSelectors]\n })),\n ...this._contractMethodAccessEntrys.map((entry) => encodeFunctionData({\n abi: SessionKeyPermissionsUpdatesAbi,\n functionName: \"updateAccessListFunctionEntry\",\n args: [entry.contractAddress, entry.methodSelector, entry.isOnList]\n })),\n this.encodeIfDefined((timeRange) => encodeFunctionData({\n abi: SessionKeyPermissionsUpdatesAbi,\n functionName: \"updateTimeRange\",\n args: [timeRange.validFrom, timeRange.validUntil]\n }), this._timeRange),\n this.encodeIfDefined((nativeSpendLimit) => encodeFunctionData({\n abi: SessionKeyPermissionsUpdatesAbi,\n functionName: \"setNativeTokenSpendLimit\",\n args: [\n nativeSpendLimit.spendLimit,\n nativeSpendLimit.refreshInterval ?? 0\n ]\n }), this._nativeTokenSpendLimit),\n ...this._erc20TokenSpendLimits.map((erc20SpendLimit) => encodeFunctionData({\n abi: SessionKeyPermissionsUpdatesAbi,\n functionName: \"setERC20SpendLimit\",\n args: [\n erc20SpendLimit.tokenAddress,\n erc20SpendLimit.spendLimit,\n erc20SpendLimit.refreshInterval ?? 0\n ]\n })),\n this.encodeIfDefined((spendLimit) => encodeFunctionData({\n abi: SessionKeyPermissionsUpdatesAbi,\n functionName: \"setGasSpendLimit\",\n args: [spendLimit.spendLimit, spendLimit.refreshInterval ?? 0]\n }), this._gasSpendLimit),\n this.encodeIfDefined((paymaster) => encodeFunctionData({\n abi: SessionKeyPermissionsUpdatesAbi,\n functionName: \"setRequiredPaymaster\",\n args: [paymaster]\n }), this._requiredPaymaster)\n ].filter((x4) => x4 !== \"0x\");\n }\n encodeIfDefined(encode6, param) {\n if (!param)\n return \"0x\";\n return encode6(param);\n }\n };\n }\n });\n\n // ../../../node_modules/.pnpm/@account-kit+smart-contracts@4.62.0_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5._65dee0153d50ca3a2d2c6830319271d9/node_modules/@account-kit/smart-contracts/dist/esm/src/msca/plugins/session-key/signer.js\n var SessionKeySignerSchema, SESSION_KEY_SIGNER_TYPE_PFX, SessionKeySigner;\n var init_signer4 = __esm({\n \"../../../node_modules/.pnpm/@account-kit+smart-contracts@4.62.0_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5._65dee0153d50ca3a2d2c6830319271d9/node_modules/@account-kit/smart-contracts/dist/esm/src/msca/plugins/session-key/signer.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_esm6();\n init_accounts();\n init_esm5();\n SessionKeySignerSchema = external_exports.object({\n storageType: external_exports.union([external_exports.literal(\"local-storage\"), external_exports.literal(\"session-storage\")]).or(external_exports.custom()).default(\"local-storage\"),\n storageKey: external_exports.string().default(\"session-key-signer:session-key\")\n });\n SESSION_KEY_SIGNER_TYPE_PFX = \"alchemy:session-key\";\n SessionKeySigner = class {\n /**\n * Initializes a new instance of a session key signer with the provided configuration. This will set the `signerType`, `storageKey`, and `storageType`. It will also manage the session key, either fetching it from storage or generating a new one if it doesn't exist.\n *\n * @example\n * ```ts\n * import { SessionKeySigner } from \"@account-kit/smart-contracts\";\n *\n * const signer = new SessionKeySigner();\n * ```\n *\n * @param {SessionKeySignerConfig} config_ the configuration for initializing the session key signer\n */\n constructor(config_ = {}) {\n Object.defineProperty(this, \"signerType\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: void 0\n });\n Object.defineProperty(this, \"inner\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: void 0\n });\n Object.defineProperty(this, \"storageType\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: void 0\n });\n Object.defineProperty(this, \"storageKey\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: void 0\n });\n Object.defineProperty(this, \"getAddress\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: async () => {\n return this.inner.getAddress();\n }\n });\n Object.defineProperty(this, \"signMessage\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: async (msg) => {\n return this.inner.signMessage(msg);\n }\n });\n Object.defineProperty(this, \"signTypedData\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: async (params) => {\n return this.inner.signTypedData(params);\n }\n });\n Object.defineProperty(this, \"generateNewKey\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: () => {\n const storage = this.storageType === \"session-storage\" ? sessionStorage : localStorage;\n const newKey = generatePrivateKey();\n storage.setItem(this.storageKey, newKey);\n this.inner = LocalAccountSigner.privateKeyToAccountSigner(newKey);\n return this.inner.inner.address;\n }\n });\n const config2 = SessionKeySignerSchema.parse(config_);\n this.signerType = `${SESSION_KEY_SIGNER_TYPE_PFX}`;\n this.storageKey = config2.storageKey;\n this.storageType = config2.storageType;\n const sessionKey = (() => {\n const storage = typeof this.storageType !== \"string\" ? this.storageType : this.storageType === \"session-storage\" ? sessionStorage : localStorage;\n const key = storage.getItem(this.storageKey);\n if (key) {\n return key;\n } else {\n const newKey = generatePrivateKey();\n storage.setItem(this.storageKey, newKey);\n return newKey;\n }\n })();\n this.inner = LocalAccountSigner.privateKeyToAccountSigner(sessionKey);\n }\n };\n }\n });\n\n // ../../../node_modules/.pnpm/@account-kit+smart-contracts@4.62.0_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5._65dee0153d50ca3a2d2c6830319271d9/node_modules/@account-kit/smart-contracts/dist/esm/src/ma-v2/abis/accountFactoryAbi.js\n var accountFactoryAbi;\n var init_accountFactoryAbi = __esm({\n \"../../../node_modules/.pnpm/@account-kit+smart-contracts@4.62.0_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5._65dee0153d50ca3a2d2c6830319271d9/node_modules/@account-kit/smart-contracts/dist/esm/src/ma-v2/abis/accountFactoryAbi.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n accountFactoryAbi = [\n {\n type: \"constructor\",\n inputs: [\n {\n name: \"_entryPoint\",\n type: \"address\",\n internalType: \"contract IEntryPoint\"\n },\n {\n name: \"_accountImpl\",\n type: \"address\",\n internalType: \"contract ModularAccount\"\n },\n {\n name: \"_semiModularImpl\",\n type: \"address\",\n internalType: \"contract SemiModularAccountBytecode\"\n },\n {\n name: \"_singleSignerValidationModule\",\n type: \"address\",\n internalType: \"address\"\n },\n {\n name: \"_webAuthnValidationModule\",\n type: \"address\",\n internalType: \"address\"\n },\n {\n name: \"owner\",\n type: \"address\",\n internalType: \"address\"\n }\n ],\n stateMutability: \"nonpayable\"\n },\n {\n type: \"function\",\n name: \"ACCOUNT_IMPL\",\n inputs: [],\n outputs: [\n {\n name: \"\",\n type: \"address\",\n internalType: \"contract ModularAccount\"\n }\n ],\n stateMutability: \"view\"\n },\n {\n type: \"function\",\n name: \"ENTRY_POINT\",\n inputs: [],\n outputs: [\n {\n name: \"\",\n type: \"address\",\n internalType: \"contract IEntryPoint\"\n }\n ],\n stateMutability: \"view\"\n },\n {\n type: \"function\",\n name: \"SEMI_MODULAR_ACCOUNT_IMPL\",\n inputs: [],\n outputs: [\n {\n name: \"\",\n type: \"address\",\n internalType: \"contract SemiModularAccountBytecode\"\n }\n ],\n stateMutability: \"view\"\n },\n {\n type: \"function\",\n name: \"SINGLE_SIGNER_VALIDATION_MODULE\",\n inputs: [],\n outputs: [\n {\n name: \"\",\n type: \"address\",\n internalType: \"address\"\n }\n ],\n stateMutability: \"view\"\n },\n {\n type: \"function\",\n name: \"WEBAUTHN_VALIDATION_MODULE\",\n inputs: [],\n outputs: [\n {\n name: \"\",\n type: \"address\",\n internalType: \"address\"\n }\n ],\n stateMutability: \"view\"\n },\n {\n type: \"function\",\n name: \"acceptOwnership\",\n inputs: [],\n outputs: [],\n stateMutability: \"nonpayable\"\n },\n {\n type: \"function\",\n name: \"addStake\",\n inputs: [\n {\n name: \"unstakeDelay\",\n type: \"uint32\",\n internalType: \"uint32\"\n }\n ],\n outputs: [],\n stateMutability: \"payable\"\n },\n {\n type: \"function\",\n name: \"createAccount\",\n inputs: [\n {\n name: \"owner\",\n type: \"address\",\n internalType: \"address\"\n },\n {\n name: \"salt\",\n type: \"uint256\",\n internalType: \"uint256\"\n },\n {\n name: \"entityId\",\n type: \"uint32\",\n internalType: \"uint32\"\n }\n ],\n outputs: [\n {\n name: \"\",\n type: \"address\",\n internalType: \"contract ModularAccount\"\n }\n ],\n stateMutability: \"nonpayable\"\n },\n {\n type: \"function\",\n name: \"createSemiModularAccount\",\n inputs: [\n {\n name: \"owner\",\n type: \"address\",\n internalType: \"address\"\n },\n {\n name: \"salt\",\n type: \"uint256\",\n internalType: \"uint256\"\n }\n ],\n outputs: [\n {\n name: \"\",\n type: \"address\",\n internalType: \"contract SemiModularAccountBytecode\"\n }\n ],\n stateMutability: \"nonpayable\"\n },\n {\n type: \"function\",\n name: \"createWebAuthnAccount\",\n inputs: [\n {\n name: \"ownerX\",\n type: \"uint256\",\n internalType: \"uint256\"\n },\n {\n name: \"ownerY\",\n type: \"uint256\",\n internalType: \"uint256\"\n },\n {\n name: \"salt\",\n type: \"uint256\",\n internalType: \"uint256\"\n },\n {\n name: \"entityId\",\n type: \"uint32\",\n internalType: \"uint32\"\n }\n ],\n outputs: [\n {\n name: \"\",\n type: \"address\",\n internalType: \"contract ModularAccount\"\n }\n ],\n stateMutability: \"nonpayable\"\n },\n {\n type: \"function\",\n name: \"getAddress\",\n inputs: [\n {\n name: \"owner\",\n type: \"address\",\n internalType: \"address\"\n },\n {\n name: \"salt\",\n type: \"uint256\",\n internalType: \"uint256\"\n },\n {\n name: \"entityId\",\n type: \"uint32\",\n internalType: \"uint32\"\n }\n ],\n outputs: [\n {\n name: \"\",\n type: \"address\",\n internalType: \"address\"\n }\n ],\n stateMutability: \"view\"\n },\n {\n type: \"function\",\n name: \"getAddressSemiModular\",\n inputs: [\n {\n name: \"owner\",\n type: \"address\",\n internalType: \"address\"\n },\n {\n name: \"salt\",\n type: \"uint256\",\n internalType: \"uint256\"\n }\n ],\n outputs: [\n {\n name: \"\",\n type: \"address\",\n internalType: \"address\"\n }\n ],\n stateMutability: \"view\"\n },\n {\n type: \"function\",\n name: \"getAddressWebAuthn\",\n inputs: [\n {\n name: \"ownerX\",\n type: \"uint256\",\n internalType: \"uint256\"\n },\n {\n name: \"ownerY\",\n type: \"uint256\",\n internalType: \"uint256\"\n },\n {\n name: \"salt\",\n type: \"uint256\",\n internalType: \"uint256\"\n },\n {\n name: \"entityId\",\n type: \"uint32\",\n internalType: \"uint32\"\n }\n ],\n outputs: [\n {\n name: \"\",\n type: \"address\",\n internalType: \"address\"\n }\n ],\n stateMutability: \"view\"\n },\n {\n type: \"function\",\n name: \"getSalt\",\n inputs: [\n {\n name: \"owner\",\n type: \"address\",\n internalType: \"address\"\n },\n {\n name: \"salt\",\n type: \"uint256\",\n internalType: \"uint256\"\n },\n {\n name: \"entityId\",\n type: \"uint32\",\n internalType: \"uint32\"\n }\n ],\n outputs: [\n {\n name: \"\",\n type: \"bytes32\",\n internalType: \"bytes32\"\n }\n ],\n stateMutability: \"pure\"\n },\n {\n type: \"function\",\n name: \"getSaltWebAuthn\",\n inputs: [\n {\n name: \"ownerX\",\n type: \"uint256\",\n internalType: \"uint256\"\n },\n {\n name: \"ownerY\",\n type: \"uint256\",\n internalType: \"uint256\"\n },\n {\n name: \"salt\",\n type: \"uint256\",\n internalType: \"uint256\"\n },\n {\n name: \"entityId\",\n type: \"uint32\",\n internalType: \"uint32\"\n }\n ],\n outputs: [\n {\n name: \"\",\n type: \"bytes32\",\n internalType: \"bytes32\"\n }\n ],\n stateMutability: \"pure\"\n },\n {\n type: \"function\",\n name: \"owner\",\n inputs: [],\n outputs: [\n {\n name: \"\",\n type: \"address\",\n internalType: \"address\"\n }\n ],\n stateMutability: \"view\"\n },\n {\n type: \"function\",\n name: \"pendingOwner\",\n inputs: [],\n outputs: [\n {\n name: \"\",\n type: \"address\",\n internalType: \"address\"\n }\n ],\n stateMutability: \"view\"\n },\n {\n type: \"function\",\n name: \"renounceOwnership\",\n inputs: [],\n outputs: [],\n stateMutability: \"view\"\n },\n {\n type: \"function\",\n name: \"transferOwnership\",\n inputs: [\n {\n name: \"newOwner\",\n type: \"address\",\n internalType: \"address\"\n }\n ],\n outputs: [],\n stateMutability: \"nonpayable\"\n },\n {\n type: \"function\",\n name: \"unlockStake\",\n inputs: [],\n outputs: [],\n stateMutability: \"nonpayable\"\n },\n {\n type: \"function\",\n name: \"withdraw\",\n inputs: [\n {\n name: \"to\",\n type: \"address\",\n internalType: \"address payable\"\n },\n {\n name: \"token\",\n type: \"address\",\n internalType: \"address\"\n },\n {\n name: \"amount\",\n type: \"uint256\",\n internalType: \"uint256\"\n }\n ],\n outputs: [],\n stateMutability: \"nonpayable\"\n },\n {\n type: \"function\",\n name: \"withdrawStake\",\n inputs: [\n {\n name: \"withdrawAddress\",\n type: \"address\",\n internalType: \"address payable\"\n }\n ],\n outputs: [],\n stateMutability: \"nonpayable\"\n },\n {\n type: \"event\",\n name: \"ModularAccountDeployed\",\n inputs: [\n {\n name: \"account\",\n type: \"address\",\n indexed: true,\n internalType: \"address\"\n },\n {\n name: \"owner\",\n type: \"address\",\n indexed: true,\n internalType: \"address\"\n },\n {\n name: \"salt\",\n type: \"uint256\",\n indexed: false,\n internalType: \"uint256\"\n }\n ],\n anonymous: false\n },\n {\n type: \"event\",\n name: \"OwnershipTransferStarted\",\n inputs: [\n {\n name: \"previousOwner\",\n type: \"address\",\n indexed: true,\n internalType: \"address\"\n },\n {\n name: \"newOwner\",\n type: \"address\",\n indexed: true,\n internalType: \"address\"\n }\n ],\n anonymous: false\n },\n {\n type: \"event\",\n name: \"OwnershipTransferred\",\n inputs: [\n {\n name: \"previousOwner\",\n type: \"address\",\n indexed: true,\n internalType: \"address\"\n },\n {\n name: \"newOwner\",\n type: \"address\",\n indexed: true,\n internalType: \"address\"\n }\n ],\n anonymous: false\n },\n {\n type: \"event\",\n name: \"SemiModularAccountDeployed\",\n inputs: [\n {\n name: \"account\",\n type: \"address\",\n indexed: true,\n internalType: \"address\"\n },\n {\n name: \"owner\",\n type: \"address\",\n indexed: true,\n internalType: \"address\"\n },\n {\n name: \"salt\",\n type: \"uint256\",\n indexed: false,\n internalType: \"uint256\"\n }\n ],\n anonymous: false\n },\n {\n type: \"event\",\n name: \"WebAuthnModularAccountDeployed\",\n inputs: [\n {\n name: \"account\",\n type: \"address\",\n indexed: true,\n internalType: \"address\"\n },\n {\n name: \"ownerX\",\n type: \"uint256\",\n indexed: true,\n internalType: \"uint256\"\n },\n {\n name: \"ownerY\",\n type: \"uint256\",\n indexed: true,\n internalType: \"uint256\"\n },\n {\n name: \"salt\",\n type: \"uint256\",\n indexed: false,\n internalType: \"uint256\"\n }\n ],\n anonymous: false\n },\n {\n type: \"error\",\n name: \"AddressEmptyCode\",\n inputs: [\n {\n name: \"target\",\n type: \"address\",\n internalType: \"address\"\n }\n ]\n },\n {\n type: \"error\",\n name: \"AddressInsufficientBalance\",\n inputs: [\n {\n name: \"account\",\n type: \"address\",\n internalType: \"address\"\n }\n ]\n },\n {\n type: \"error\",\n name: \"FailedInnerCall\",\n inputs: []\n },\n {\n type: \"error\",\n name: \"InvalidAction\",\n inputs: []\n },\n {\n type: \"error\",\n name: \"OwnableInvalidOwner\",\n inputs: [\n {\n name: \"owner\",\n type: \"address\",\n internalType: \"address\"\n }\n ]\n },\n {\n type: \"error\",\n name: \"OwnableUnauthorizedAccount\",\n inputs: [\n {\n name: \"account\",\n type: \"address\",\n internalType: \"address\"\n }\n ]\n },\n {\n type: \"error\",\n name: \"SafeERC20FailedOperation\",\n inputs: [\n {\n name: \"token\",\n type: \"address\",\n internalType: \"address\"\n }\n ]\n },\n {\n type: \"error\",\n name: \"TransferFailed\",\n inputs: []\n }\n ];\n }\n });\n\n // ../../../node_modules/.pnpm/@account-kit+smart-contracts@4.62.0_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5._65dee0153d50ca3a2d2c6830319271d9/node_modules/@account-kit/smart-contracts/dist/esm/src/ma-v2/abis/modularAccountAbi.js\n var modularAccountAbi;\n var init_modularAccountAbi = __esm({\n \"../../../node_modules/.pnpm/@account-kit+smart-contracts@4.62.0_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5._65dee0153d50ca3a2d2c6830319271d9/node_modules/@account-kit/smart-contracts/dist/esm/src/ma-v2/abis/modularAccountAbi.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n modularAccountAbi = [\n {\n type: \"constructor\",\n inputs: [\n {\n name: \"entryPoint\",\n type: \"address\",\n internalType: \"contract IEntryPoint\"\n },\n {\n name: \"executionInstallDelegate\",\n type: \"address\",\n internalType: \"contract ExecutionInstallDelegate\"\n }\n ],\n stateMutability: \"nonpayable\"\n },\n {\n type: \"fallback\",\n stateMutability: \"payable\"\n },\n {\n type: \"receive\",\n stateMutability: \"payable\"\n },\n {\n type: \"function\",\n name: \"accountId\",\n inputs: [],\n outputs: [\n {\n name: \"\",\n type: \"string\",\n internalType: \"string\"\n }\n ],\n stateMutability: \"pure\"\n },\n {\n type: \"function\",\n name: \"entryPoint\",\n inputs: [],\n outputs: [\n {\n name: \"\",\n type: \"address\",\n internalType: \"contract IEntryPoint\"\n }\n ],\n stateMutability: \"view\"\n },\n {\n type: \"function\",\n name: \"execute\",\n inputs: [\n {\n name: \"target\",\n type: \"address\",\n internalType: \"address\"\n },\n {\n name: \"value\",\n type: \"uint256\",\n internalType: \"uint256\"\n },\n {\n name: \"data\",\n type: \"bytes\",\n internalType: \"bytes\"\n }\n ],\n outputs: [\n {\n name: \"result\",\n type: \"bytes\",\n internalType: \"bytes\"\n }\n ],\n stateMutability: \"payable\"\n },\n {\n type: \"function\",\n name: \"executeBatch\",\n inputs: [\n {\n name: \"calls\",\n type: \"tuple[]\",\n internalType: \"struct Call[]\",\n components: [\n {\n name: \"target\",\n type: \"address\",\n internalType: \"address\"\n },\n {\n name: \"value\",\n type: \"uint256\",\n internalType: \"uint256\"\n },\n {\n name: \"data\",\n type: \"bytes\",\n internalType: \"bytes\"\n }\n ]\n }\n ],\n outputs: [\n {\n name: \"results\",\n type: \"bytes[]\",\n internalType: \"bytes[]\"\n }\n ],\n stateMutability: \"payable\"\n },\n {\n type: \"function\",\n name: \"executeUserOp\",\n inputs: [\n {\n name: \"userOp\",\n type: \"tuple\",\n internalType: \"struct PackedUserOperation\",\n components: [\n {\n name: \"sender\",\n type: \"address\",\n internalType: \"address\"\n },\n {\n name: \"nonce\",\n type: \"uint256\",\n internalType: \"uint256\"\n },\n {\n name: \"initCode\",\n type: \"bytes\",\n internalType: \"bytes\"\n },\n {\n name: \"callData\",\n type: \"bytes\",\n internalType: \"bytes\"\n },\n {\n name: \"accountGasLimits\",\n type: \"bytes32\",\n internalType: \"bytes32\"\n },\n {\n name: \"preVerificationGas\",\n type: \"uint256\",\n internalType: \"uint256\"\n },\n {\n name: \"gasFees\",\n type: \"bytes32\",\n internalType: \"bytes32\"\n },\n {\n name: \"paymasterAndData\",\n type: \"bytes\",\n internalType: \"bytes\"\n },\n {\n name: \"signature\",\n type: \"bytes\",\n internalType: \"bytes\"\n }\n ]\n },\n {\n name: \"\",\n type: \"bytes32\",\n internalType: \"bytes32\"\n }\n ],\n outputs: [],\n stateMutability: \"nonpayable\"\n },\n {\n type: \"function\",\n name: \"executeWithRuntimeValidation\",\n inputs: [\n {\n name: \"data\",\n type: \"bytes\",\n internalType: \"bytes\"\n },\n {\n name: \"authorization\",\n type: \"bytes\",\n internalType: \"bytes\"\n }\n ],\n outputs: [\n {\n name: \"\",\n type: \"bytes\",\n internalType: \"bytes\"\n }\n ],\n stateMutability: \"payable\"\n },\n {\n type: \"function\",\n name: \"getExecutionData\",\n inputs: [\n {\n name: \"selector\",\n type: \"bytes4\",\n internalType: \"bytes4\"\n }\n ],\n outputs: [\n {\n name: \"data\",\n type: \"tuple\",\n internalType: \"struct ExecutionDataView\",\n components: [\n {\n name: \"module\",\n type: \"address\",\n internalType: \"address\"\n },\n {\n name: \"skipRuntimeValidation\",\n type: \"bool\",\n internalType: \"bool\"\n },\n {\n name: \"allowGlobalValidation\",\n type: \"bool\",\n internalType: \"bool\"\n },\n {\n name: \"executionHooks\",\n type: \"bytes25[]\",\n internalType: \"HookConfig[]\"\n }\n ]\n }\n ],\n stateMutability: \"view\"\n },\n {\n type: \"function\",\n name: \"getValidationData\",\n inputs: [\n {\n name: \"validationFunction\",\n type: \"bytes24\",\n internalType: \"ModuleEntity\"\n }\n ],\n outputs: [\n {\n name: \"data\",\n type: \"tuple\",\n internalType: \"struct ValidationDataView\",\n components: [\n {\n name: \"validationFlags\",\n type: \"uint8\",\n internalType: \"ValidationFlags\"\n },\n {\n name: \"validationHooks\",\n type: \"bytes25[]\",\n internalType: \"HookConfig[]\"\n },\n {\n name: \"executionHooks\",\n type: \"bytes25[]\",\n internalType: \"HookConfig[]\"\n },\n {\n name: \"selectors\",\n type: \"bytes4[]\",\n internalType: \"bytes4[]\"\n }\n ]\n }\n ],\n stateMutability: \"view\"\n },\n {\n type: \"function\",\n name: \"initializeWithValidation\",\n inputs: [\n {\n name: \"validationConfig\",\n type: \"bytes25\",\n internalType: \"ValidationConfig\"\n },\n {\n name: \"selectors\",\n type: \"bytes4[]\",\n internalType: \"bytes4[]\"\n },\n {\n name: \"installData\",\n type: \"bytes\",\n internalType: \"bytes\"\n },\n {\n name: \"hooks\",\n type: \"bytes[]\",\n internalType: \"bytes[]\"\n }\n ],\n outputs: [],\n stateMutability: \"nonpayable\"\n },\n {\n type: \"function\",\n name: \"installExecution\",\n inputs: [\n {\n name: \"module\",\n type: \"address\",\n internalType: \"address\"\n },\n {\n name: \"manifest\",\n type: \"tuple\",\n internalType: \"struct ExecutionManifest\",\n components: [\n {\n name: \"executionFunctions\",\n type: \"tuple[]\",\n internalType: \"struct ManifestExecutionFunction[]\",\n components: [\n {\n name: \"executionSelector\",\n type: \"bytes4\",\n internalType: \"bytes4\"\n },\n {\n name: \"skipRuntimeValidation\",\n type: \"bool\",\n internalType: \"bool\"\n },\n {\n name: \"allowGlobalValidation\",\n type: \"bool\",\n internalType: \"bool\"\n }\n ]\n },\n {\n name: \"executionHooks\",\n type: \"tuple[]\",\n internalType: \"struct ManifestExecutionHook[]\",\n components: [\n {\n name: \"executionSelector\",\n type: \"bytes4\",\n internalType: \"bytes4\"\n },\n {\n name: \"entityId\",\n type: \"uint32\",\n internalType: \"uint32\"\n },\n {\n name: \"isPreHook\",\n type: \"bool\",\n internalType: \"bool\"\n },\n {\n name: \"isPostHook\",\n type: \"bool\",\n internalType: \"bool\"\n }\n ]\n },\n {\n name: \"interfaceIds\",\n type: \"bytes4[]\",\n internalType: \"bytes4[]\"\n }\n ]\n },\n {\n name: \"moduleInstallData\",\n type: \"bytes\",\n internalType: \"bytes\"\n }\n ],\n outputs: [],\n stateMutability: \"nonpayable\"\n },\n {\n type: \"function\",\n name: \"installValidation\",\n inputs: [\n {\n name: \"validationConfig\",\n type: \"bytes25\",\n internalType: \"ValidationConfig\"\n },\n {\n name: \"selectors\",\n type: \"bytes4[]\",\n internalType: \"bytes4[]\"\n },\n {\n name: \"installData\",\n type: \"bytes\",\n internalType: \"bytes\"\n },\n {\n name: \"hooks\",\n type: \"bytes[]\",\n internalType: \"bytes[]\"\n }\n ],\n outputs: [],\n stateMutability: \"nonpayable\"\n },\n {\n type: \"function\",\n name: \"isValidSignature\",\n inputs: [\n {\n name: \"hash\",\n type: \"bytes32\",\n internalType: \"bytes32\"\n },\n {\n name: \"signature\",\n type: \"bytes\",\n internalType: \"bytes\"\n }\n ],\n outputs: [\n {\n name: \"\",\n type: \"bytes4\",\n internalType: \"bytes4\"\n }\n ],\n stateMutability: \"view\"\n },\n {\n type: \"function\",\n name: \"onERC1155BatchReceived\",\n inputs: [\n {\n name: \"\",\n type: \"address\",\n internalType: \"address\"\n },\n {\n name: \"\",\n type: \"address\",\n internalType: \"address\"\n },\n {\n name: \"\",\n type: \"uint256[]\",\n internalType: \"uint256[]\"\n },\n {\n name: \"\",\n type: \"uint256[]\",\n internalType: \"uint256[]\"\n },\n {\n name: \"\",\n type: \"bytes\",\n internalType: \"bytes\"\n }\n ],\n outputs: [\n {\n name: \"\",\n type: \"bytes4\",\n internalType: \"bytes4\"\n }\n ],\n stateMutability: \"pure\"\n },\n {\n type: \"function\",\n name: \"onERC1155Received\",\n inputs: [\n {\n name: \"\",\n type: \"address\",\n internalType: \"address\"\n },\n {\n name: \"\",\n type: \"address\",\n internalType: \"address\"\n },\n {\n name: \"\",\n type: \"uint256\",\n internalType: \"uint256\"\n },\n {\n name: \"\",\n type: \"uint256\",\n internalType: \"uint256\"\n },\n {\n name: \"\",\n type: \"bytes\",\n internalType: \"bytes\"\n }\n ],\n outputs: [\n {\n name: \"\",\n type: \"bytes4\",\n internalType: \"bytes4\"\n }\n ],\n stateMutability: \"pure\"\n },\n {\n type: \"function\",\n name: \"onERC721Received\",\n inputs: [\n {\n name: \"\",\n type: \"address\",\n internalType: \"address\"\n },\n {\n name: \"\",\n type: \"address\",\n internalType: \"address\"\n },\n {\n name: \"\",\n type: \"uint256\",\n internalType: \"uint256\"\n },\n {\n name: \"\",\n type: \"bytes\",\n internalType: \"bytes\"\n }\n ],\n outputs: [\n {\n name: \"\",\n type: \"bytes4\",\n internalType: \"bytes4\"\n }\n ],\n stateMutability: \"pure\"\n },\n {\n type: \"function\",\n name: \"performCreate\",\n inputs: [\n {\n name: \"value\",\n type: \"uint256\",\n internalType: \"uint256\"\n },\n {\n name: \"initCode\",\n type: \"bytes\",\n internalType: \"bytes\"\n },\n {\n name: \"isCreate2\",\n type: \"bool\",\n internalType: \"bool\"\n },\n {\n name: \"salt\",\n type: \"bytes32\",\n internalType: \"bytes32\"\n }\n ],\n outputs: [\n {\n name: \"createdAddr\",\n type: \"address\",\n internalType: \"address\"\n }\n ],\n stateMutability: \"payable\"\n },\n {\n type: \"function\",\n name: \"proxiableUUID\",\n inputs: [],\n outputs: [\n {\n name: \"\",\n type: \"bytes32\",\n internalType: \"bytes32\"\n }\n ],\n stateMutability: \"view\"\n },\n {\n type: \"function\",\n name: \"supportsInterface\",\n inputs: [\n {\n name: \"interfaceId\",\n type: \"bytes4\",\n internalType: \"bytes4\"\n }\n ],\n outputs: [\n {\n name: \"\",\n type: \"bool\",\n internalType: \"bool\"\n }\n ],\n stateMutability: \"view\"\n },\n {\n type: \"function\",\n name: \"uninstallExecution\",\n inputs: [\n {\n name: \"module\",\n type: \"address\",\n internalType: \"address\"\n },\n {\n name: \"manifest\",\n type: \"tuple\",\n internalType: \"struct ExecutionManifest\",\n components: [\n {\n name: \"executionFunctions\",\n type: \"tuple[]\",\n internalType: \"struct ManifestExecutionFunction[]\",\n components: [\n {\n name: \"executionSelector\",\n type: \"bytes4\",\n internalType: \"bytes4\"\n },\n {\n name: \"skipRuntimeValidation\",\n type: \"bool\",\n internalType: \"bool\"\n },\n {\n name: \"allowGlobalValidation\",\n type: \"bool\",\n internalType: \"bool\"\n }\n ]\n },\n {\n name: \"executionHooks\",\n type: \"tuple[]\",\n internalType: \"struct ManifestExecutionHook[]\",\n components: [\n {\n name: \"executionSelector\",\n type: \"bytes4\",\n internalType: \"bytes4\"\n },\n {\n name: \"entityId\",\n type: \"uint32\",\n internalType: \"uint32\"\n },\n {\n name: \"isPreHook\",\n type: \"bool\",\n internalType: \"bool\"\n },\n {\n name: \"isPostHook\",\n type: \"bool\",\n internalType: \"bool\"\n }\n ]\n },\n {\n name: \"interfaceIds\",\n type: \"bytes4[]\",\n internalType: \"bytes4[]\"\n }\n ]\n },\n {\n name: \"moduleUninstallData\",\n type: \"bytes\",\n internalType: \"bytes\"\n }\n ],\n outputs: [],\n stateMutability: \"nonpayable\"\n },\n {\n type: \"function\",\n name: \"uninstallValidation\",\n inputs: [\n {\n name: \"validationFunction\",\n type: \"bytes24\",\n internalType: \"ModuleEntity\"\n },\n {\n name: \"uninstallData\",\n type: \"bytes\",\n internalType: \"bytes\"\n },\n {\n name: \"hookUninstallData\",\n type: \"bytes[]\",\n internalType: \"bytes[]\"\n }\n ],\n outputs: [],\n stateMutability: \"nonpayable\"\n },\n {\n type: \"function\",\n name: \"upgradeToAndCall\",\n inputs: [\n {\n name: \"newImplementation\",\n type: \"address\",\n internalType: \"address\"\n },\n {\n name: \"data\",\n type: \"bytes\",\n internalType: \"bytes\"\n }\n ],\n outputs: [],\n stateMutability: \"payable\"\n },\n {\n type: \"function\",\n name: \"validateUserOp\",\n inputs: [\n {\n name: \"userOp\",\n type: \"tuple\",\n internalType: \"struct PackedUserOperation\",\n components: [\n {\n name: \"sender\",\n type: \"address\",\n internalType: \"address\"\n },\n {\n name: \"nonce\",\n type: \"uint256\",\n internalType: \"uint256\"\n },\n {\n name: \"initCode\",\n type: \"bytes\",\n internalType: \"bytes\"\n },\n {\n name: \"callData\",\n type: \"bytes\",\n internalType: \"bytes\"\n },\n {\n name: \"accountGasLimits\",\n type: \"bytes32\",\n internalType: \"bytes32\"\n },\n {\n name: \"preVerificationGas\",\n type: \"uint256\",\n internalType: \"uint256\"\n },\n {\n name: \"gasFees\",\n type: \"bytes32\",\n internalType: \"bytes32\"\n },\n {\n name: \"paymasterAndData\",\n type: \"bytes\",\n internalType: \"bytes\"\n },\n {\n name: \"signature\",\n type: \"bytes\",\n internalType: \"bytes\"\n }\n ]\n },\n {\n name: \"userOpHash\",\n type: \"bytes32\",\n internalType: \"bytes32\"\n },\n {\n name: \"missingAccountFunds\",\n type: \"uint256\",\n internalType: \"uint256\"\n }\n ],\n outputs: [\n {\n name: \"validationData\",\n type: \"uint256\",\n internalType: \"uint256\"\n }\n ],\n stateMutability: \"nonpayable\"\n },\n {\n type: \"event\",\n name: \"ExecutionInstalled\",\n inputs: [\n {\n name: \"module\",\n type: \"address\",\n indexed: true,\n internalType: \"address\"\n },\n {\n name: \"manifest\",\n type: \"tuple\",\n indexed: false,\n internalType: \"struct ExecutionManifest\",\n components: [\n {\n name: \"executionFunctions\",\n type: \"tuple[]\",\n internalType: \"struct ManifestExecutionFunction[]\",\n components: [\n {\n name: \"executionSelector\",\n type: \"bytes4\",\n internalType: \"bytes4\"\n },\n {\n name: \"skipRuntimeValidation\",\n type: \"bool\",\n internalType: \"bool\"\n },\n {\n name: \"allowGlobalValidation\",\n type: \"bool\",\n internalType: \"bool\"\n }\n ]\n },\n {\n name: \"executionHooks\",\n type: \"tuple[]\",\n internalType: \"struct ManifestExecutionHook[]\",\n components: [\n {\n name: \"executionSelector\",\n type: \"bytes4\",\n internalType: \"bytes4\"\n },\n {\n name: \"entityId\",\n type: \"uint32\",\n internalType: \"uint32\"\n },\n {\n name: \"isPreHook\",\n type: \"bool\",\n internalType: \"bool\"\n },\n {\n name: \"isPostHook\",\n type: \"bool\",\n internalType: \"bool\"\n }\n ]\n },\n {\n name: \"interfaceIds\",\n type: \"bytes4[]\",\n internalType: \"bytes4[]\"\n }\n ]\n }\n ],\n anonymous: false\n },\n {\n type: \"event\",\n name: \"ExecutionUninstalled\",\n inputs: [\n {\n name: \"module\",\n type: \"address\",\n indexed: true,\n internalType: \"address\"\n },\n {\n name: \"onUninstallSucceeded\",\n type: \"bool\",\n indexed: false,\n internalType: \"bool\"\n },\n {\n name: \"manifest\",\n type: \"tuple\",\n indexed: false,\n internalType: \"struct ExecutionManifest\",\n components: [\n {\n name: \"executionFunctions\",\n type: \"tuple[]\",\n internalType: \"struct ManifestExecutionFunction[]\",\n components: [\n {\n name: \"executionSelector\",\n type: \"bytes4\",\n internalType: \"bytes4\"\n },\n {\n name: \"skipRuntimeValidation\",\n type: \"bool\",\n internalType: \"bool\"\n },\n {\n name: \"allowGlobalValidation\",\n type: \"bool\",\n internalType: \"bool\"\n }\n ]\n },\n {\n name: \"executionHooks\",\n type: \"tuple[]\",\n internalType: \"struct ManifestExecutionHook[]\",\n components: [\n {\n name: \"executionSelector\",\n type: \"bytes4\",\n internalType: \"bytes4\"\n },\n {\n name: \"entityId\",\n type: \"uint32\",\n internalType: \"uint32\"\n },\n {\n name: \"isPreHook\",\n type: \"bool\",\n internalType: \"bool\"\n },\n {\n name: \"isPostHook\",\n type: \"bool\",\n internalType: \"bool\"\n }\n ]\n },\n {\n name: \"interfaceIds\",\n type: \"bytes4[]\",\n internalType: \"bytes4[]\"\n }\n ]\n }\n ],\n anonymous: false\n },\n {\n type: \"event\",\n name: \"Initialized\",\n inputs: [\n {\n name: \"version\",\n type: \"uint64\",\n indexed: false,\n internalType: \"uint64\"\n }\n ],\n anonymous: false\n },\n {\n type: \"event\",\n name: \"Upgraded\",\n inputs: [\n {\n name: \"implementation\",\n type: \"address\",\n indexed: true,\n internalType: \"address\"\n }\n ],\n anonymous: false\n },\n {\n type: \"event\",\n name: \"ValidationInstalled\",\n inputs: [\n {\n name: \"module\",\n type: \"address\",\n indexed: true,\n internalType: \"address\"\n },\n {\n name: \"entityId\",\n type: \"uint32\",\n indexed: true,\n internalType: \"uint32\"\n }\n ],\n anonymous: false\n },\n {\n type: \"event\",\n name: \"ValidationUninstalled\",\n inputs: [\n {\n name: \"module\",\n type: \"address\",\n indexed: true,\n internalType: \"address\"\n },\n {\n name: \"entityId\",\n type: \"uint32\",\n indexed: true,\n internalType: \"uint32\"\n },\n {\n name: \"onUninstallSucceeded\",\n type: \"bool\",\n indexed: false,\n internalType: \"bool\"\n }\n ],\n anonymous: false\n },\n {\n type: \"error\",\n name: \"ArrayLengthMismatch\",\n inputs: []\n },\n {\n type: \"error\",\n name: \"CreateFailed\",\n inputs: []\n },\n {\n type: \"error\",\n name: \"DeferredActionSignatureInvalid\",\n inputs: []\n },\n {\n type: \"error\",\n name: \"DeferredValidationHasValidationHooks\",\n inputs: []\n },\n {\n type: \"error\",\n name: \"ExecutionHookAlreadySet\",\n inputs: [\n {\n name: \"hookConfig\",\n type: \"bytes25\",\n internalType: \"HookConfig\"\n }\n ]\n },\n {\n type: \"error\",\n name: \"InterfaceNotSupported\",\n inputs: [\n {\n name: \"module\",\n type: \"address\",\n internalType: \"address\"\n }\n ]\n },\n {\n type: \"error\",\n name: \"InvalidInitialization\",\n inputs: []\n },\n {\n type: \"error\",\n name: \"ModuleInstallCallbackFailed\",\n inputs: [\n {\n name: \"module\",\n type: \"address\",\n internalType: \"address\"\n },\n {\n name: \"revertReason\",\n type: \"bytes\",\n internalType: \"bytes\"\n }\n ]\n },\n {\n type: \"error\",\n name: \"NonCanonicalEncoding\",\n inputs: []\n },\n {\n type: \"error\",\n name: \"NotEntryPoint\",\n inputs: []\n },\n {\n type: \"error\",\n name: \"PreValidationHookDuplicate\",\n inputs: []\n },\n {\n type: \"error\",\n name: \"RequireUserOperationContext\",\n inputs: []\n },\n {\n type: \"error\",\n name: \"SegmentOutOfOrder\",\n inputs: []\n },\n {\n type: \"error\",\n name: \"SelfCallRecursionDepthExceeded\",\n inputs: []\n },\n {\n type: \"error\",\n name: \"SignatureValidationInvalid\",\n inputs: [\n {\n name: \"validationFunction\",\n type: \"bytes24\",\n internalType: \"ModuleEntity\"\n }\n ]\n },\n {\n type: \"error\",\n name: \"UnauthorizedCallContext\",\n inputs: []\n },\n {\n type: \"error\",\n name: \"UnexpectedAggregator\",\n inputs: [\n {\n name: \"validationFunction\",\n type: \"bytes24\",\n internalType: \"ModuleEntity\"\n },\n {\n name: \"aggregator\",\n type: \"address\",\n internalType: \"address\"\n }\n ]\n },\n {\n type: \"error\",\n name: \"UnrecognizedFunction\",\n inputs: [\n {\n name: \"selector\",\n type: \"bytes4\",\n internalType: \"bytes4\"\n }\n ]\n },\n {\n type: \"error\",\n name: \"UpgradeFailed\",\n inputs: []\n },\n {\n type: \"error\",\n name: \"UserOpValidationInvalid\",\n inputs: [\n {\n name: \"validationFunction\",\n type: \"bytes24\",\n internalType: \"ModuleEntity\"\n }\n ]\n },\n {\n type: \"error\",\n name: \"ValidationAlreadySet\",\n inputs: [\n {\n name: \"selector\",\n type: \"bytes4\",\n internalType: \"bytes4\"\n },\n {\n name: \"validationFunction\",\n type: \"bytes24\",\n internalType: \"ModuleEntity\"\n }\n ]\n },\n {\n type: \"error\",\n name: \"ValidationAssocHookLimitExceeded\",\n inputs: []\n },\n {\n type: \"error\",\n name: \"ValidationEntityIdInUse\",\n inputs: []\n },\n {\n type: \"error\",\n name: \"ValidationFunctionMissing\",\n inputs: [\n {\n name: \"selector\",\n type: \"bytes4\",\n internalType: \"bytes4\"\n }\n ]\n },\n {\n type: \"error\",\n name: \"ValidationSignatureSegmentMissing\",\n inputs: []\n }\n ];\n }\n });\n\n // ../../../node_modules/.pnpm/@account-kit+smart-contracts@4.62.0_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5._65dee0153d50ca3a2d2c6830319271d9/node_modules/@account-kit/smart-contracts/dist/esm/src/ma-v2/actions/common/utils.js\n function serializeModuleEntity(config2) {\n return concatHex([config2.moduleAddress, toHex(config2.entityId, { size: 4 })]);\n }\n var init_utils15 = __esm({\n \"../../../node_modules/.pnpm/@account-kit+smart-contracts@4.62.0_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5._65dee0153d50ca3a2d2c6830319271d9/node_modules/@account-kit/smart-contracts/dist/esm/src/ma-v2/actions/common/utils.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_esm();\n }\n });\n\n // ../../../node_modules/.pnpm/@account-kit+smart-contracts@4.62.0_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5._65dee0153d50ca3a2d2c6830319271d9/node_modules/@account-kit/smart-contracts/dist/esm/src/ma-v2/modules/utils.js\n var SignatureType2, getDefaultWebauthnValidationModuleAddress, getDefaultSingleSignerValidationModuleAddress;\n var init_utils16 = __esm({\n \"../../../node_modules/.pnpm/@account-kit+smart-contracts@4.62.0_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5._65dee0153d50ca3a2d2c6830319271d9/node_modules/@account-kit/smart-contracts/dist/esm/src/ma-v2/modules/utils.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_exports3();\n (function(SignatureType3) {\n SignatureType3[\"EOA\"] = \"0x00\";\n SignatureType3[\"CONTRACT\"] = \"0x01\";\n })(SignatureType2 || (SignatureType2 = {}));\n getDefaultWebauthnValidationModuleAddress = (chain2) => {\n switch (chain2.id) {\n case sepolia3.id:\n case baseSepolia3.id:\n case polygon3.id:\n case mainnet3.id:\n case polygonAmoy3.id:\n case optimism3.id:\n case optimismSepolia3.id:\n case arbitrum3.id:\n case arbitrumSepolia3.id:\n case base3.id:\n default:\n return \"0x0000000000001D9d34E07D9834274dF9ae575217\";\n }\n };\n getDefaultSingleSignerValidationModuleAddress = (chain2) => {\n switch (chain2.id) {\n case sepolia3.id:\n case baseSepolia3.id:\n case polygon3.id:\n case mainnet3.id:\n case polygonAmoy3.id:\n case optimism3.id:\n case optimismSepolia3.id:\n case arbitrum3.id:\n case arbitrumSepolia3.id:\n case base3.id:\n default:\n return \"0x00000000000099DE0BF6fA90dEB851E2A2df7d83\";\n }\n };\n }\n });\n\n // ../../../node_modules/.pnpm/@account-kit+smart-contracts@4.62.0_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5._65dee0153d50ca3a2d2c6830319271d9/node_modules/@account-kit/smart-contracts/dist/esm/src/ma-v2/modules/single-signer-validation/signer.js\n var singleSignerMessageSigner;\n var init_signer5 = __esm({\n \"../../../node_modules/.pnpm/@account-kit+smart-contracts@4.62.0_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5._65dee0153d50ca3a2d2c6830319271d9/node_modules/@account-kit/smart-contracts/dist/esm/src/ma-v2/modules/single-signer-validation/signer.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_esm();\n init_utils16();\n init_utils17();\n singleSignerMessageSigner = (signer, chain2, accountAddress, entityId, deferredActionData) => {\n const signingMethods = {\n prepareSign: async (request) => {\n let hash3;\n switch (request.type) {\n case \"personal_sign\":\n hash3 = hashMessage(request.data);\n break;\n case \"eth_signTypedData_v4\":\n hash3 = await hashTypedData(request.data);\n break;\n default:\n assertNeverSignatureRequestType();\n }\n return {\n type: \"eth_signTypedData_v4\",\n data: {\n domain: {\n chainId: Number(chain2.id),\n verifyingContract: getDefaultSingleSignerValidationModuleAddress(chain2),\n salt: concatHex([`0x${\"00\".repeat(12)}`, accountAddress])\n },\n types: {\n ReplaySafeHash: [{ name: \"hash\", type: \"bytes32\" }]\n },\n message: {\n hash: hash3\n },\n primaryType: \"ReplaySafeHash\"\n }\n };\n },\n formatSign: async (signature) => {\n return pack1271Signature({\n validationSignature: signature,\n entityId\n });\n }\n };\n return {\n ...signingMethods,\n getDummySignature: () => {\n const sig = packUOSignature({\n // orderedHookData: [],\n validationSignature: \"0xfffffffffffffffffffffffffffffff0000000000000000000000000000000007aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa1c\"\n });\n return deferredActionData ? concatHex([deferredActionData, sig]) : sig;\n },\n signUserOperationHash: async (uoHash) => {\n let sig = await signer.signMessage({ raw: uoHash }).then((signature) => packUOSignature({\n // orderedHookData: [],\n validationSignature: signature\n }));\n if (deferredActionData) {\n sig = concatHex([deferredActionData, sig]);\n deferredActionData = void 0;\n }\n return sig;\n },\n // we apply the expected 1271 packing here since the account contract will expect it\n async signMessage({ message }) {\n const { type, data } = await signingMethods.prepareSign({\n type: \"personal_sign\",\n data: message\n });\n if (type !== \"eth_signTypedData_v4\") {\n throw new Error(\"Invalid signature request type\");\n }\n const sig = await signer.signTypedData(data);\n return signingMethods.formatSign(sig);\n },\n // TODO: maybe move \"sign deferred actions\" to a separate function?\n // we don't apply the expected 1271 packing since deferred sigs use typed data sigs and don't expect the 1271 packing\n signTypedData: async (typedDataDefinition) => {\n const { type, data } = await signingMethods.prepareSign({\n type: \"eth_signTypedData_v4\",\n data: typedDataDefinition\n });\n if (type !== \"eth_signTypedData_v4\") {\n throw new Error(\"Invalid signature request type\");\n }\n const sig = await signer.signTypedData(data);\n const isDeferredAction = typedDataDefinition.primaryType === \"DeferredAction\" && typedDataDefinition.domain != null && // @ts-expect-error the domain type I think changed in viem, so this is not working correctly (TODO: fix this)\n \"verifyingContract\" in typedDataDefinition.domain && typedDataDefinition.domain.verifyingContract === accountAddress;\n return isDeferredAction ? concat([SignatureType2.EOA, sig]) : signingMethods.formatSign(sig);\n }\n };\n };\n }\n });\n\n // ../../../node_modules/.pnpm/ox@0.4.4_typescript@5.8.3_zod@3.25.64/node_modules/ox/_esm/core/version.js\n var version5;\n var init_version8 = __esm({\n \"../../../node_modules/.pnpm/ox@0.4.4_typescript@5.8.3_zod@3.25.64/node_modules/ox/_esm/core/version.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n version5 = \"0.1.1\";\n }\n });\n\n // ../../../node_modules/.pnpm/ox@0.4.4_typescript@5.8.3_zod@3.25.64/node_modules/ox/_esm/core/internal/errors.js\n function getVersion2() {\n return version5;\n }\n var init_errors7 = __esm({\n \"../../../node_modules/.pnpm/ox@0.4.4_typescript@5.8.3_zod@3.25.64/node_modules/ox/_esm/core/internal/errors.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_version8();\n }\n });\n\n // ../../../node_modules/.pnpm/ox@0.4.4_typescript@5.8.3_zod@3.25.64/node_modules/ox/_esm/core/Errors.js\n function walk3(err, fn) {\n if (fn?.(err))\n return err;\n if (err && typeof err === \"object\" && \"cause\" in err && err.cause)\n return walk3(err.cause, fn);\n return fn ? null : err;\n }\n var BaseError7;\n var init_Errors2 = __esm({\n \"../../../node_modules/.pnpm/ox@0.4.4_typescript@5.8.3_zod@3.25.64/node_modules/ox/_esm/core/Errors.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_errors7();\n BaseError7 = class _BaseError extends Error {\n constructor(shortMessage, options = {}) {\n const details = (() => {\n if (options.cause instanceof _BaseError) {\n if (options.cause.details)\n return options.cause.details;\n if (options.cause.shortMessage)\n return options.cause.shortMessage;\n }\n if (options.cause?.message)\n return options.cause.message;\n return options.details;\n })();\n const docsPath8 = (() => {\n if (options.cause instanceof _BaseError)\n return options.cause.docsPath || options.docsPath;\n return options.docsPath;\n })();\n const docsBaseUrl = \"https://oxlib.sh\";\n const docs = `${docsBaseUrl}${docsPath8 ?? \"\"}`;\n const message = [\n shortMessage || \"An error occurred.\",\n ...options.metaMessages ? [\"\", ...options.metaMessages] : [],\n ...details || docsPath8 ? [\n \"\",\n details ? `Details: ${details}` : void 0,\n docsPath8 ? `See: ${docs}` : void 0\n ] : []\n ].filter((x4) => typeof x4 === \"string\").join(\"\\n\");\n super(message, options.cause ? { cause: options.cause } : void 0);\n Object.defineProperty(this, \"details\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: void 0\n });\n Object.defineProperty(this, \"docs\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: void 0\n });\n Object.defineProperty(this, \"docsPath\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: void 0\n });\n Object.defineProperty(this, \"shortMessage\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: void 0\n });\n Object.defineProperty(this, \"cause\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: void 0\n });\n Object.defineProperty(this, \"name\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: \"BaseError\"\n });\n Object.defineProperty(this, \"version\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: `ox@${getVersion2()}`\n });\n this.cause = options.cause;\n this.details = details;\n this.docs = docs;\n this.docsPath = docsPath8;\n this.shortMessage = shortMessage;\n }\n walk(fn) {\n return walk3(this, fn);\n }\n };\n }\n });\n\n // ../../../node_modules/.pnpm/ox@0.4.4_typescript@5.8.3_zod@3.25.64/node_modules/ox/_esm/core/internal/bytes.js\n function charCodeToBase163(char) {\n if (char >= charCodeMap3.zero && char <= charCodeMap3.nine)\n return char - charCodeMap3.zero;\n if (char >= charCodeMap3.A && char <= charCodeMap3.F)\n return char - (charCodeMap3.A - 10);\n if (char >= charCodeMap3.a && char <= charCodeMap3.f)\n return char - (charCodeMap3.a - 10);\n return void 0;\n }\n var charCodeMap3;\n var init_bytes4 = __esm({\n \"../../../node_modules/.pnpm/ox@0.4.4_typescript@5.8.3_zod@3.25.64/node_modules/ox/_esm/core/internal/bytes.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n charCodeMap3 = {\n zero: 48,\n nine: 57,\n A: 65,\n F: 70,\n a: 97,\n f: 102\n };\n }\n });\n\n // ../../../node_modules/.pnpm/ox@0.4.4_typescript@5.8.3_zod@3.25.64/node_modules/ox/_esm/core/internal/hex.js\n function assertSize4(hex, size_) {\n if (size5(hex) > size_)\n throw new SizeOverflowError4({\n givenSize: size5(hex),\n maxSize: size_\n });\n }\n function pad4(hex_, options = {}) {\n const { dir, size: size6 = 32 } = options;\n if (size6 === 0)\n return hex_;\n const hex = hex_.replace(\"0x\", \"\");\n if (hex.length > size6 * 2)\n throw new SizeExceedsPaddingSizeError4({\n size: Math.ceil(hex.length / 2),\n targetSize: size6,\n type: \"Hex\"\n });\n return `0x${hex[dir === \"right\" ? \"padEnd\" : \"padStart\"](size6 * 2, \"0\")}`;\n }\n var init_hex2 = __esm({\n \"../../../node_modules/.pnpm/ox@0.4.4_typescript@5.8.3_zod@3.25.64/node_modules/ox/_esm/core/internal/hex.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_Hex2();\n }\n });\n\n // ../../../node_modules/.pnpm/ox@0.4.4_typescript@5.8.3_zod@3.25.64/node_modules/ox/_esm/core/Hex.js\n function fromBytes4(value, options = {}) {\n let string2 = \"\";\n for (let i3 = 0; i3 < value.length; i3++)\n string2 += hexes5[value[i3]];\n const hex = `0x${string2}`;\n if (typeof options.size === \"number\") {\n assertSize4(hex, options.size);\n return padRight3(hex, options.size);\n }\n return hex;\n }\n function padRight3(value, size6) {\n return pad4(value, { dir: \"right\", size: size6 });\n }\n function size5(value) {\n return Math.ceil((value.length - 2) / 2);\n }\n var hexes5, SizeOverflowError4, SizeExceedsPaddingSizeError4;\n var init_Hex2 = __esm({\n \"../../../node_modules/.pnpm/ox@0.4.4_typescript@5.8.3_zod@3.25.64/node_modules/ox/_esm/core/Hex.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_Errors2();\n init_hex2();\n hexes5 = /* @__PURE__ */ Array.from({ length: 256 }, (_v, i3) => i3.toString(16).padStart(2, \"0\"));\n SizeOverflowError4 = class extends BaseError7 {\n constructor({ givenSize, maxSize }) {\n super(`Size cannot exceed \\`${maxSize}\\` bytes. Given size: \\`${givenSize}\\` bytes.`);\n Object.defineProperty(this, \"name\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: \"Hex.SizeOverflowError\"\n });\n }\n };\n SizeExceedsPaddingSizeError4 = class extends BaseError7 {\n constructor({ size: size6, targetSize, type }) {\n super(`${type.charAt(0).toUpperCase()}${type.slice(1).toLowerCase()} size (\\`${size6}\\`) exceeds padding size (\\`${targetSize}\\`).`);\n Object.defineProperty(this, \"name\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: \"Hex.SizeExceedsPaddingSizeError\"\n });\n }\n };\n }\n });\n\n // ../../../node_modules/.pnpm/ox@0.4.4_typescript@5.8.3_zod@3.25.64/node_modules/ox/_esm/core/Bytes.js\n function fromHex6(value, options = {}) {\n const { size: size6 } = options;\n let hex = value;\n if (size6) {\n assertSize4(value, size6);\n hex = padRight3(value, size6);\n }\n let hexString = hex.slice(2);\n if (hexString.length % 2)\n hexString = `0${hexString}`;\n const length2 = hexString.length / 2;\n const bytes = new Uint8Array(length2);\n for (let index2 = 0, j2 = 0; index2 < length2; index2++) {\n const nibbleLeft = charCodeToBase163(hexString.charCodeAt(j2++));\n const nibbleRight = charCodeToBase163(hexString.charCodeAt(j2++));\n if (nibbleLeft === void 0 || nibbleRight === void 0) {\n throw new BaseError7(`Invalid byte sequence (\"${hexString[j2 - 2]}${hexString[j2 - 1]}\" in \"${hexString}\").`);\n }\n bytes[index2] = nibbleLeft * 16 + nibbleRight;\n }\n return bytes;\n }\n var init_Bytes2 = __esm({\n \"../../../node_modules/.pnpm/ox@0.4.4_typescript@5.8.3_zod@3.25.64/node_modules/ox/_esm/core/Bytes.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_Errors2();\n init_Hex2();\n init_bytes4();\n init_hex2();\n }\n });\n\n // ../../../node_modules/.pnpm/ox@0.4.4_typescript@5.8.3_zod@3.25.64/node_modules/ox/_esm/core/Base64.js\n function toBytes4(value) {\n const base64 = value.replace(/=+$/, \"\");\n const size6 = base64.length;\n const decoded = new Uint8Array(size6 + 3);\n encoder5.encodeInto(base64 + \"===\", decoded);\n for (let i3 = 0, j2 = 0; i3 < base64.length; i3 += 4, j2 += 3) {\n const x4 = (characterToInteger[decoded[i3]] << 18) + (characterToInteger[decoded[i3 + 1]] << 12) + (characterToInteger[decoded[i3 + 2]] << 6) + characterToInteger[decoded[i3 + 3]];\n decoded[j2] = x4 >> 16;\n decoded[j2 + 1] = x4 >> 8 & 255;\n decoded[j2 + 2] = x4 & 255;\n }\n const decodedSize = (size6 >> 2) * 3 + (size6 % 4 && size6 % 4 - 1);\n return new Uint8Array(decoded.buffer, 0, decodedSize);\n }\n var encoder5, integerToCharacter, characterToInteger;\n var init_Base64 = __esm({\n \"../../../node_modules/.pnpm/ox@0.4.4_typescript@5.8.3_zod@3.25.64/node_modules/ox/_esm/core/Base64.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n encoder5 = /* @__PURE__ */ new TextEncoder();\n integerToCharacter = /* @__PURE__ */ Object.fromEntries(Array.from(\"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/\").map((a3, i3) => [i3, a3.charCodeAt(0)]));\n characterToInteger = {\n ...Object.fromEntries(Array.from(\"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/\").map((a3, i3) => [a3.charCodeAt(0), i3])),\n [\"=\".charCodeAt(0)]: 0,\n [\"-\".charCodeAt(0)]: 62,\n [\"_\".charCodeAt(0)]: 63\n };\n }\n });\n\n // ../../../node_modules/.pnpm/@noble+curves@1.9.7/node_modules/@noble/curves/esm/nist.js\n var p256_CURVE, p384_CURVE, p521_CURVE, Fp256, Fp384, Fp521, p256, p384, p521;\n var init_nist = __esm({\n \"../../../node_modules/.pnpm/@noble+curves@1.9.7/node_modules/@noble/curves/esm/nist.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_sha2();\n init_shortw_utils2();\n init_modular2();\n p256_CURVE = {\n p: BigInt(\"0xffffffff00000001000000000000000000000000ffffffffffffffffffffffff\"),\n n: BigInt(\"0xffffffff00000000ffffffffffffffffbce6faada7179e84f3b9cac2fc632551\"),\n h: BigInt(1),\n a: BigInt(\"0xffffffff00000001000000000000000000000000fffffffffffffffffffffffc\"),\n b: BigInt(\"0x5ac635d8aa3a93e7b3ebbd55769886bc651d06b0cc53b0f63bce3c3e27d2604b\"),\n Gx: BigInt(\"0x6b17d1f2e12c4247f8bce6e563a440f277037d812deb33a0f4a13945d898c296\"),\n Gy: BigInt(\"0x4fe342e2fe1a7f9b8ee7eb4a7c0f9e162bce33576b315ececbb6406837bf51f5\")\n };\n p384_CURVE = {\n p: BigInt(\"0xfffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffeffffffff0000000000000000ffffffff\"),\n n: BigInt(\"0xffffffffffffffffffffffffffffffffffffffffffffffffc7634d81f4372ddf581a0db248b0a77aecec196accc52973\"),\n h: BigInt(1),\n a: BigInt(\"0xfffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffeffffffff0000000000000000fffffffc\"),\n b: BigInt(\"0xb3312fa7e23ee7e4988e056be3f82d19181d9c6efe8141120314088f5013875ac656398d8a2ed19d2a85c8edd3ec2aef\"),\n Gx: BigInt(\"0xaa87ca22be8b05378eb1c71ef320ad746e1d3b628ba79b9859f741e082542a385502f25dbf55296c3a545e3872760ab7\"),\n Gy: BigInt(\"0x3617de4a96262c6f5d9e98bf9292dc29f8f41dbd289a147ce9da3113b5f0b8c00a60b1ce1d7e819d7a431d7c90ea0e5f\")\n };\n p521_CURVE = {\n p: BigInt(\"0x1ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff\"),\n n: BigInt(\"0x01fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffa51868783bf2f966b7fcc0148f709a5d03bb5c9b8899c47aebb6fb71e91386409\"),\n h: BigInt(1),\n a: BigInt(\"0x1fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc\"),\n b: BigInt(\"0x0051953eb9618e1c9a1f929a21a0b68540eea2da725b99b315f3b8b489918ef109e156193951ec7e937b1652c0bd3bb1bf073573df883d2c34f1ef451fd46b503f00\"),\n Gx: BigInt(\"0x00c6858e06b70404e9cd9e3ecb662395b4429c648139053fb521f828af606b4d3dbaa14b5e77efe75928fe1dc127a2ffa8de3348b3c1856a429bf97e7e31c2e5bd66\"),\n Gy: BigInt(\"0x011839296a789a3bc0045c8a5fb42c7d1bd998f54449579b446817afbd17273e662c97ee72995ef42640c550b9013fad0761353c7086a272c24088be94769fd16650\")\n };\n Fp256 = Field2(p256_CURVE.p);\n Fp384 = Field2(p384_CURVE.p);\n Fp521 = Field2(p521_CURVE.p);\n p256 = createCurve2({ ...p256_CURVE, Fp: Fp256, lowS: false }, sha256);\n p384 = createCurve2({ ...p384_CURVE, Fp: Fp384, lowS: false }, sha384);\n p521 = createCurve2({ ...p521_CURVE, Fp: Fp521, lowS: false, allowedPrivateKeyLengths: [130, 131, 132] }, sha512);\n }\n });\n\n // ../../../node_modules/.pnpm/@noble+curves@1.9.7/node_modules/@noble/curves/esm/p256.js\n var p2562;\n var init_p256 = __esm({\n \"../../../node_modules/.pnpm/@noble+curves@1.9.7/node_modules/@noble/curves/esm/p256.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_nist();\n p2562 = p256;\n }\n });\n\n // ../../../node_modules/.pnpm/ox@0.4.4_typescript@5.8.3_zod@3.25.64/node_modules/ox/_esm/core/internal/webauthn.js\n function parseAsn1Signature(bytes) {\n const r_start = bytes[4] === 0 ? 5 : 4;\n const r_end = r_start + 32;\n const s_start = bytes[r_end + 2] === 0 ? r_end + 3 : r_end + 2;\n const r2 = BigInt(fromBytes4(bytes.slice(r_start, r_end)));\n const s4 = BigInt(fromBytes4(bytes.slice(s_start)));\n return {\n r: r2,\n s: s4 > p2562.CURVE.n / 2n ? p2562.CURVE.n - s4 : s4\n };\n }\n var init_webauthn = __esm({\n \"../../../node_modules/.pnpm/ox@0.4.4_typescript@5.8.3_zod@3.25.64/node_modules/ox/_esm/core/internal/webauthn.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_p256();\n init_Hex2();\n }\n });\n\n // ../../../node_modules/.pnpm/ox@0.4.4_typescript@5.8.3_zod@3.25.64/node_modules/ox/_esm/core/WebAuthnP256.js\n function getCredentialRequestOptions(options) {\n const { credentialId, challenge: challenge2, rpId = window.location.hostname, userVerification = \"required\" } = options;\n return {\n publicKey: {\n ...credentialId ? {\n allowCredentials: [\n {\n id: toBytes4(credentialId),\n type: \"public-key\"\n }\n ]\n } : {},\n challenge: fromHex6(challenge2),\n rpId,\n userVerification\n }\n };\n }\n async function sign2(options) {\n const { getFn = window.navigator.credentials.get.bind(window.navigator.credentials), ...rest } = options;\n const requestOptions = getCredentialRequestOptions(rest);\n try {\n const credential = await getFn(requestOptions);\n if (!credential)\n throw new CredentialRequestFailedError();\n const response = credential.response;\n const clientDataJSON = String.fromCharCode(...new Uint8Array(response.clientDataJSON));\n const challengeIndex = clientDataJSON.indexOf('\"challenge\"');\n const typeIndex = clientDataJSON.indexOf('\"type\"');\n const signature = parseAsn1Signature(new Uint8Array(response.signature));\n return {\n metadata: {\n authenticatorData: fromBytes4(new Uint8Array(response.authenticatorData)),\n clientDataJSON,\n challengeIndex,\n typeIndex,\n userVerificationRequired: requestOptions.publicKey.userVerification === \"required\"\n },\n signature,\n raw: credential\n };\n } catch (error) {\n throw new CredentialRequestFailedError({\n cause: error\n });\n }\n }\n var createChallenge, CredentialRequestFailedError;\n var init_WebAuthnP256 = __esm({\n \"../../../node_modules/.pnpm/ox@0.4.4_typescript@5.8.3_zod@3.25.64/node_modules/ox/_esm/core/WebAuthnP256.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_Base64();\n init_Bytes2();\n init_Errors2();\n init_Hex2();\n init_webauthn();\n createChallenge = Uint8Array.from([\n 105,\n 171,\n 180,\n 181,\n 160,\n 222,\n 75,\n 198,\n 42,\n 42,\n 32,\n 31,\n 141,\n 37,\n 186,\n 233\n ]);\n CredentialRequestFailedError = class extends BaseError7 {\n constructor({ cause } = {}) {\n super(\"Failed to request credential.\", {\n cause\n });\n Object.defineProperty(this, \"name\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: \"WebAuthnP256.CredentialRequestFailedError\"\n });\n }\n };\n }\n });\n\n // ../../../node_modules/.pnpm/@account-kit+smart-contracts@4.62.0_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5._65dee0153d50ca3a2d2c6830319271d9/node_modules/@account-kit/smart-contracts/dist/esm/src/ma-v2/modules/webauthn-validation/signingMethods.js\n var webauthnSigningFunctions;\n var init_signingMethods = __esm({\n \"../../../node_modules/.pnpm/@account-kit+smart-contracts@4.62.0_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5._65dee0153d50ca3a2d2c6830319271d9/node_modules/@account-kit/smart-contracts/dist/esm/src/ma-v2/modules/webauthn-validation/signingMethods.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_WebAuthnP256();\n init_esm();\n init_utils17();\n init_utils16();\n webauthnSigningFunctions = (credential, getFn, rpId, chain2, accountAddress, entityId, deferredActionData) => {\n const { id, publicKey } = credential;\n const sign3 = async ({ hash: hash3 }) => {\n const { metadata, signature } = await sign2({\n credentialId: id,\n getFn,\n challenge: hash3,\n rpId\n });\n return encodeAbiParameters([\n {\n name: \"params\",\n type: \"tuple\",\n components: [\n { name: \"authenticatorData\", type: \"bytes\" },\n { name: \"clientDataJSON\", type: \"string\" },\n { name: \"challengeIndex\", type: \"uint256\" },\n { name: \"typeIndex\", type: \"uint256\" },\n { name: \"r\", type: \"uint256\" },\n { name: \"s\", type: \"uint256\" }\n ]\n }\n ], [\n {\n authenticatorData: metadata.authenticatorData,\n clientDataJSON: metadata.clientDataJSON,\n challengeIndex: BigInt(metadata.challengeIndex),\n typeIndex: BigInt(metadata.typeIndex),\n r: signature.r,\n s: signature.s\n }\n ]);\n };\n return {\n id,\n publicKey,\n getDummySignature: () => \"0xff000000000000000000000000000000000000000000000000000000000000002000000000000000000000000000000000000000000000000000000000000000c0000000000000000000000000000000000000000000000000000000000000012000000000000000000000000000000000000000000000000000000000000000170000000000000000000000000000000000000000000000000000000000000001949fc7c88032b9fcb5f6efc7a7b8c63668eae9871b765e23123bb473ff57aa831a7c0d9276168ebcc29f2875a0239cffdf2a9cd1c2007c5c77c071db9264df1d000000000000000000000000000000000000000000000000000000000000002549960de5880e8c687434170f6476605b8fe4aeb9a28632c7995cf3ba831d97630500000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000008a7b2274797065223a22776562617574686e2e676574222c226368616c6c656e6765223a2273496a396e6164474850596759334b7156384f7a4a666c726275504b474f716d59576f4d57516869467773222c226f726967696e223a2268747470733a2f2f7369676e2e636f696e626173652e636f6d222c2263726f73734f726967696e223a66616c73657d00000000000000000000000000000000000000000000\",\n sign: sign3,\n signUserOperationHash: async (uoHash) => {\n let sig = await sign3({ hash: hashMessage({ raw: uoHash }) });\n if (deferredActionData) {\n sig = concatHex([deferredActionData, sig]);\n deferredActionData = void 0;\n }\n return concatHex([\"0xff\", sig]);\n },\n async signMessage({ message }) {\n const hash3 = hashTypedData({\n domain: {\n chainId: Number(chain2.id),\n verifyingContract: getDefaultWebauthnValidationModuleAddress(chain2),\n salt: concatHex([`0x${\"00\".repeat(12)}`, accountAddress])\n },\n types: {\n ReplaySafeHash: [{ name: \"hash\", type: \"bytes32\" }]\n },\n message: {\n hash: hashMessage(message)\n },\n primaryType: \"ReplaySafeHash\"\n });\n return pack1271Signature({\n validationSignature: await sign3({ hash: hash3 }),\n entityId\n });\n },\n signTypedData: async (typedDataDefinition) => {\n const isDeferredAction = typedDataDefinition?.primaryType === \"DeferredAction\" && // @ts-expect-error the domain type I think changed in viem, so this is not working correctly (TODO: fix this)\n \"verifyingContract\" in typedDataDefinition.domain && typedDataDefinition.domain.verifyingContract === accountAddress;\n const hash3 = await hashTypedData({\n domain: {\n chainId: Number(chain2.id),\n verifyingContract: getDefaultWebauthnValidationModuleAddress(chain2),\n salt: concatHex([`0x${\"00\".repeat(12)}`, accountAddress])\n },\n types: {\n ReplaySafeHash: [{ name: \"hash\", type: \"bytes32\" }]\n },\n message: {\n hash: hashTypedData(typedDataDefinition)\n },\n primaryType: \"ReplaySafeHash\"\n });\n const validationSignature = await sign3({ hash: hash3 });\n return isDeferredAction ? pack1271Signature({ validationSignature, entityId }) : validationSignature;\n }\n };\n };\n }\n });\n\n // ../../../node_modules/.pnpm/@account-kit+smart-contracts@4.62.0_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5._65dee0153d50ca3a2d2c6830319271d9/node_modules/@account-kit/smart-contracts/dist/esm/src/ma-v2/account/nativeSMASigner.js\n var nativeSMASigner;\n var init_nativeSMASigner = __esm({\n \"../../../node_modules/.pnpm/@account-kit+smart-contracts@4.62.0_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5._65dee0153d50ca3a2d2c6830319271d9/node_modules/@account-kit/smart-contracts/dist/esm/src/ma-v2/account/nativeSMASigner.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_esm();\n init_utils17();\n init_utils16();\n nativeSMASigner = (signer, chain2, accountAddress, deferredActionData) => {\n const signingMethods = {\n prepareSign: async (request) => {\n let hash3;\n switch (request.type) {\n case \"personal_sign\":\n hash3 = hashMessage(request.data);\n break;\n case \"eth_signTypedData_v4\":\n const isDeferredAction = request.data?.primaryType === \"DeferredAction\" && request.data?.domain?.verifyingContract === accountAddress;\n if (isDeferredAction) {\n return request;\n } else {\n hash3 = await hashTypedData(request.data);\n break;\n }\n default:\n assertNeverSignatureRequestType();\n }\n return {\n type: \"eth_signTypedData_v4\",\n data: {\n domain: {\n chainId: Number(chain2.id),\n verifyingContract: accountAddress\n },\n types: {\n ReplaySafeHash: [{ name: \"hash\", type: \"bytes32\" }]\n },\n message: {\n hash: hash3\n },\n primaryType: \"ReplaySafeHash\"\n }\n };\n },\n formatSign: async (signature) => {\n return pack1271Signature({\n validationSignature: signature,\n entityId: DEFAULT_OWNER_ENTITY_ID\n });\n }\n };\n return {\n ...signingMethods,\n getDummySignature: () => {\n const sig = packUOSignature({\n // orderedHookData: [],\n validationSignature: \"0xfffffffffffffffffffffffffffffff0000000000000000000000000000000007aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa1c\"\n });\n return deferredActionData ? concatHex([deferredActionData, sig]) : sig;\n },\n signUserOperationHash: async (uoHash) => {\n let sig = await signer.signMessage({ raw: uoHash }).then((signature) => packUOSignature({\n // orderedHookData: [],\n validationSignature: signature\n }));\n if (deferredActionData) {\n sig = concatHex([deferredActionData, sig]);\n deferredActionData = void 0;\n }\n return sig;\n },\n // we apply the expected 1271 packing here since the account contract will expect it\n async signMessage({ message }) {\n const { type, data } = await signingMethods.prepareSign({\n type: \"personal_sign\",\n data: message\n });\n if (type !== \"eth_signTypedData_v4\") {\n throw new Error(\"Invalid signature request type\");\n }\n const sig = await signer.signTypedData(data);\n return signingMethods.formatSign(sig);\n },\n // TODO: maybe move \"sign deferred actions\" to a separate function?\n // we don't apply the expected 1271 packing since deferred sigs use typed data sigs and don't expect the 1271 packing\n signTypedData: async (typedDataDefinition) => {\n const { type, data } = await signingMethods.prepareSign({\n type: \"eth_signTypedData_v4\",\n data: typedDataDefinition\n });\n if (type !== \"eth_signTypedData_v4\") {\n throw new Error(\"Invalid signature request type\");\n }\n const sig = await signer.signTypedData(data);\n const isDeferredAction = typedDataDefinition.primaryType === \"DeferredAction\" && typedDataDefinition.domain != null && // @ts-expect-error the domain type I think changed in viem, so this is not working correctly (TODO: fix this)\n \"verifyingContract\" in typedDataDefinition.domain && typedDataDefinition.domain.verifyingContract === accountAddress;\n return isDeferredAction ? concat([SignatureType2.EOA, sig]) : signingMethods.formatSign(sig);\n }\n };\n };\n }\n });\n\n // ../../../node_modules/.pnpm/@account-kit+smart-contracts@4.62.0_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5._65dee0153d50ca3a2d2c6830319271d9/node_modules/@account-kit/smart-contracts/dist/esm/src/ma-v2/account/common/modularAccountV2Base.js\n async function createMAv2Base(config2) {\n let { transport, chain: chain2, entryPoint = getEntryPoint(chain2, { version: \"0.7.0\" }), signerEntity = {\n isGlobalValidation: true,\n entityId: DEFAULT_OWNER_ENTITY_ID\n }, signerEntity: { isGlobalValidation = true, entityId = DEFAULT_OWNER_ENTITY_ID } = {}, accountAddress, deferredAction, ...remainingToSmartContractAccountParams } = config2;\n const signer = \"signer\" in config2 ? config2.signer : void 0;\n const credential = \"credential\" in config2 ? config2.credential : void 0;\n const getFn = \"getFn\" in config2 ? config2.getFn : void 0;\n const rpId = \"rpId\" in config2 ? config2.rpId : void 0;\n if (entityId > Number(maxUint32)) {\n throw new InvalidEntityIdError(entityId);\n }\n const client = createBundlerClient({\n transport,\n chain: chain2\n });\n const entryPointContract = getContract({\n address: entryPoint.address,\n abi: entryPoint.abi,\n client\n });\n let nonce;\n let deferredActionData;\n let hasAssociatedExecHooks = false;\n if (deferredAction) {\n let deferredActionNonce = 0n;\n ({\n entityId,\n isGlobalValidation,\n nonce: deferredActionNonce\n } = parseDeferredAction(deferredAction));\n const nextNonceForDeferredAction = await entryPointContract.read.getNonce([\n accountAddress,\n deferredActionNonce >> 64n\n ]);\n if (deferredActionNonce === nextNonceForDeferredAction) {\n ({ nonce, deferredActionData, hasAssociatedExecHooks } = parseDeferredAction(deferredAction));\n } else if (deferredActionNonce > nextNonceForDeferredAction) {\n throw new InvalidDeferredActionNonce();\n }\n }\n const encodeExecute = async ({ target, data, value }) => await encodeCallData(encodeFunctionData({\n abi: modularAccountAbi,\n functionName: \"execute\",\n args: [target, value ?? 0n, data]\n }));\n const encodeBatchExecute = async (txs) => await encodeCallData(encodeFunctionData({\n abi: modularAccountAbi,\n functionName: \"executeBatch\",\n args: [\n txs.map((tx) => ({\n target: tx.target,\n data: tx.data,\n value: tx.value ?? 0n\n }))\n ]\n }));\n const isAccountDeployed = async () => !!await client.getCode({ address: accountAddress });\n const getNonce = async (nonceKey = 0n) => {\n if (nonce) {\n const tempNonce = nonce;\n nonce = void 0;\n return tempNonce;\n }\n if (nonceKey > maxUint152) {\n throw new InvalidNonceKeyError(nonceKey);\n }\n const fullNonceKey = (nonceKey << 40n) + (BigInt(entityId) << 8n) + (isGlobalValidation ? 1n : 0n);\n return entryPointContract.read.getNonce([\n accountAddress,\n fullNonceKey\n ]);\n };\n const accountContract = getContract({\n address: accountAddress,\n abi: modularAccountAbi,\n client\n });\n const getExecutionData = async (selector) => {\n if (!await isAccountDeployed()) {\n return {\n module: zeroAddress,\n skipRuntimeValidation: false,\n allowGlobalValidation: false,\n executionHooks: []\n };\n }\n return await accountContract.read.getExecutionData([selector]);\n };\n const getValidationData = async (args) => {\n if (!await isAccountDeployed()) {\n return {\n validationHooks: [],\n executionHooks: [],\n selectors: [],\n validationFlags: 0\n };\n }\n const { validationModuleAddress, entityId: entityId2 } = args;\n return await accountContract.read.getValidationData([\n serializeModuleEntity({\n moduleAddress: validationModuleAddress ?? zeroAddress,\n entityId: entityId2 ?? Number(maxUint32)\n })\n ]);\n };\n const encodeCallData = async (callData) => {\n const validationData = await getValidationData({\n entityId: Number(entityId)\n });\n if (hasAssociatedExecHooks) {\n hasAssociatedExecHooks = false;\n return concatHex([executeUserOpSelector, callData]);\n }\n if (validationData.executionHooks.length) {\n return concatHex([executeUserOpSelector, callData]);\n }\n return callData;\n };\n const baseAccount = await toSmartContractAccount({\n ...remainingToSmartContractAccountParams,\n transport,\n chain: chain2,\n entryPoint,\n accountAddress,\n encodeExecute,\n encodeBatchExecute,\n getNonce,\n ...signer ? entityId === DEFAULT_OWNER_ENTITY_ID ? nativeSMASigner(signer, chain2, accountAddress, deferredActionData) : singleSignerMessageSigner(signer, chain2, accountAddress, entityId, deferredActionData) : webauthnSigningFunctions(\n // credential required for webauthn mode is checked at modularAccountV2 creation level\n credential,\n getFn,\n rpId,\n chain2,\n accountAddress,\n entityId,\n deferredActionData\n )\n });\n if (!signer) {\n return {\n ...baseAccount,\n signerEntity,\n getExecutionData,\n getValidationData,\n encodeCallData\n };\n }\n return {\n ...baseAccount,\n getSigner: () => signer,\n signerEntity,\n getExecutionData,\n getValidationData,\n encodeCallData\n };\n }\n var executeUserOpSelector;\n var init_modularAccountV2Base = __esm({\n \"../../../node_modules/.pnpm/@account-kit+smart-contracts@4.62.0_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5._65dee0153d50ca3a2d2c6830319271d9/node_modules/@account-kit/smart-contracts/dist/esm/src/ma-v2/account/common/modularAccountV2Base.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_esm6();\n init_esm();\n init_modularAccountAbi();\n init_utils15();\n init_signer5();\n init_signingMethods();\n init_utils17();\n init_nativeSMASigner();\n executeUserOpSelector = \"0x8DD7712F\";\n }\n });\n\n // ../../../node_modules/.pnpm/@account-kit+smart-contracts@4.62.0_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5._65dee0153d50ca3a2d2c6830319271d9/node_modules/@account-kit/smart-contracts/dist/esm/src/ma-v2/abis/semiModularAccountStorageAbi.js\n var semiModularAccountStorageAbi;\n var init_semiModularAccountStorageAbi = __esm({\n \"../../../node_modules/.pnpm/@account-kit+smart-contracts@4.62.0_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5._65dee0153d50ca3a2d2c6830319271d9/node_modules/@account-kit/smart-contracts/dist/esm/src/ma-v2/abis/semiModularAccountStorageAbi.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n semiModularAccountStorageAbi = [\n {\n type: \"constructor\",\n inputs: [\n {\n name: \"entryPoint\",\n type: \"address\",\n internalType: \"contract IEntryPoint\"\n },\n {\n name: \"executionInstallDelegate\",\n type: \"address\",\n internalType: \"contract ExecutionInstallDelegate\"\n }\n ],\n stateMutability: \"nonpayable\"\n },\n {\n type: \"fallback\",\n stateMutability: \"payable\"\n },\n {\n type: \"receive\",\n stateMutability: \"payable\"\n },\n {\n type: \"function\",\n name: \"accountId\",\n inputs: [],\n outputs: [\n {\n name: \"\",\n type: \"string\",\n internalType: \"string\"\n }\n ],\n stateMutability: \"pure\"\n },\n {\n type: \"function\",\n name: \"entryPoint\",\n inputs: [],\n outputs: [\n {\n name: \"\",\n type: \"address\",\n internalType: \"contract IEntryPoint\"\n }\n ],\n stateMutability: \"view\"\n },\n {\n type: \"function\",\n name: \"execute\",\n inputs: [\n {\n name: \"target\",\n type: \"address\",\n internalType: \"address\"\n },\n {\n name: \"value\",\n type: \"uint256\",\n internalType: \"uint256\"\n },\n {\n name: \"data\",\n type: \"bytes\",\n internalType: \"bytes\"\n }\n ],\n outputs: [\n {\n name: \"result\",\n type: \"bytes\",\n internalType: \"bytes\"\n }\n ],\n stateMutability: \"payable\"\n },\n {\n type: \"function\",\n name: \"executeBatch\",\n inputs: [\n {\n name: \"calls\",\n type: \"tuple[]\",\n internalType: \"struct Call[]\",\n components: [\n {\n name: \"target\",\n type: \"address\",\n internalType: \"address\"\n },\n {\n name: \"value\",\n type: \"uint256\",\n internalType: \"uint256\"\n },\n {\n name: \"data\",\n type: \"bytes\",\n internalType: \"bytes\"\n }\n ]\n }\n ],\n outputs: [\n {\n name: \"results\",\n type: \"bytes[]\",\n internalType: \"bytes[]\"\n }\n ],\n stateMutability: \"payable\"\n },\n {\n type: \"function\",\n name: \"executeUserOp\",\n inputs: [\n {\n name: \"userOp\",\n type: \"tuple\",\n internalType: \"struct PackedUserOperation\",\n components: [\n {\n name: \"sender\",\n type: \"address\",\n internalType: \"address\"\n },\n {\n name: \"nonce\",\n type: \"uint256\",\n internalType: \"uint256\"\n },\n {\n name: \"initCode\",\n type: \"bytes\",\n internalType: \"bytes\"\n },\n {\n name: \"callData\",\n type: \"bytes\",\n internalType: \"bytes\"\n },\n {\n name: \"accountGasLimits\",\n type: \"bytes32\",\n internalType: \"bytes32\"\n },\n {\n name: \"preVerificationGas\",\n type: \"uint256\",\n internalType: \"uint256\"\n },\n {\n name: \"gasFees\",\n type: \"bytes32\",\n internalType: \"bytes32\"\n },\n {\n name: \"paymasterAndData\",\n type: \"bytes\",\n internalType: \"bytes\"\n },\n {\n name: \"signature\",\n type: \"bytes\",\n internalType: \"bytes\"\n }\n ]\n },\n {\n name: \"\",\n type: \"bytes32\",\n internalType: \"bytes32\"\n }\n ],\n outputs: [],\n stateMutability: \"nonpayable\"\n },\n {\n type: \"function\",\n name: \"executeWithRuntimeValidation\",\n inputs: [\n {\n name: \"data\",\n type: \"bytes\",\n internalType: \"bytes\"\n },\n {\n name: \"authorization\",\n type: \"bytes\",\n internalType: \"bytes\"\n }\n ],\n outputs: [\n {\n name: \"\",\n type: \"bytes\",\n internalType: \"bytes\"\n }\n ],\n stateMutability: \"payable\"\n },\n {\n type: \"function\",\n name: \"getExecutionData\",\n inputs: [\n {\n name: \"selector\",\n type: \"bytes4\",\n internalType: \"bytes4\"\n }\n ],\n outputs: [\n {\n name: \"data\",\n type: \"tuple\",\n internalType: \"struct ExecutionDataView\",\n components: [\n {\n name: \"module\",\n type: \"address\",\n internalType: \"address\"\n },\n {\n name: \"skipRuntimeValidation\",\n type: \"bool\",\n internalType: \"bool\"\n },\n {\n name: \"allowGlobalValidation\",\n type: \"bool\",\n internalType: \"bool\"\n },\n {\n name: \"executionHooks\",\n type: \"bytes25[]\",\n internalType: \"HookConfig[]\"\n }\n ]\n }\n ],\n stateMutability: \"view\"\n },\n {\n type: \"function\",\n name: \"getFallbackSignerData\",\n inputs: [],\n outputs: [\n {\n name: \"\",\n type: \"address\",\n internalType: \"address\"\n },\n {\n name: \"\",\n type: \"bool\",\n internalType: \"bool\"\n }\n ],\n stateMutability: \"view\"\n },\n {\n type: \"function\",\n name: \"getValidationData\",\n inputs: [\n {\n name: \"validationFunction\",\n type: \"bytes24\",\n internalType: \"ModuleEntity\"\n }\n ],\n outputs: [\n {\n name: \"data\",\n type: \"tuple\",\n internalType: \"struct ValidationDataView\",\n components: [\n {\n name: \"validationFlags\",\n type: \"uint8\",\n internalType: \"ValidationFlags\"\n },\n {\n name: \"validationHooks\",\n type: \"bytes25[]\",\n internalType: \"HookConfig[]\"\n },\n {\n name: \"executionHooks\",\n type: \"bytes25[]\",\n internalType: \"HookConfig[]\"\n },\n {\n name: \"selectors\",\n type: \"bytes4[]\",\n internalType: \"bytes4[]\"\n }\n ]\n }\n ],\n stateMutability: \"view\"\n },\n {\n type: \"function\",\n name: \"initialize\",\n inputs: [\n {\n name: \"initialSigner\",\n type: \"address\",\n internalType: \"address\"\n }\n ],\n outputs: [],\n stateMutability: \"nonpayable\"\n },\n {\n type: \"function\",\n name: \"installExecution\",\n inputs: [\n {\n name: \"module\",\n type: \"address\",\n internalType: \"address\"\n },\n {\n name: \"manifest\",\n type: \"tuple\",\n internalType: \"struct ExecutionManifest\",\n components: [\n {\n name: \"executionFunctions\",\n type: \"tuple[]\",\n internalType: \"struct ManifestExecutionFunction[]\",\n components: [\n {\n name: \"executionSelector\",\n type: \"bytes4\",\n internalType: \"bytes4\"\n },\n {\n name: \"skipRuntimeValidation\",\n type: \"bool\",\n internalType: \"bool\"\n },\n {\n name: \"allowGlobalValidation\",\n type: \"bool\",\n internalType: \"bool\"\n }\n ]\n },\n {\n name: \"executionHooks\",\n type: \"tuple[]\",\n internalType: \"struct ManifestExecutionHook[]\",\n components: [\n {\n name: \"executionSelector\",\n type: \"bytes4\",\n internalType: \"bytes4\"\n },\n {\n name: \"entityId\",\n type: \"uint32\",\n internalType: \"uint32\"\n },\n {\n name: \"isPreHook\",\n type: \"bool\",\n internalType: \"bool\"\n },\n {\n name: \"isPostHook\",\n type: \"bool\",\n internalType: \"bool\"\n }\n ]\n },\n {\n name: \"interfaceIds\",\n type: \"bytes4[]\",\n internalType: \"bytes4[]\"\n }\n ]\n },\n {\n name: \"moduleInstallData\",\n type: \"bytes\",\n internalType: \"bytes\"\n }\n ],\n outputs: [],\n stateMutability: \"nonpayable\"\n },\n {\n type: \"function\",\n name: \"installValidation\",\n inputs: [\n {\n name: \"validationConfig\",\n type: \"bytes25\",\n internalType: \"ValidationConfig\"\n },\n {\n name: \"selectors\",\n type: \"bytes4[]\",\n internalType: \"bytes4[]\"\n },\n {\n name: \"installData\",\n type: \"bytes\",\n internalType: \"bytes\"\n },\n {\n name: \"hooks\",\n type: \"bytes[]\",\n internalType: \"bytes[]\"\n }\n ],\n outputs: [],\n stateMutability: \"nonpayable\"\n },\n {\n type: \"function\",\n name: \"isValidSignature\",\n inputs: [\n {\n name: \"hash\",\n type: \"bytes32\",\n internalType: \"bytes32\"\n },\n {\n name: \"signature\",\n type: \"bytes\",\n internalType: \"bytes\"\n }\n ],\n outputs: [\n {\n name: \"\",\n type: \"bytes4\",\n internalType: \"bytes4\"\n }\n ],\n stateMutability: \"view\"\n },\n {\n type: \"function\",\n name: \"onERC1155BatchReceived\",\n inputs: [\n {\n name: \"\",\n type: \"address\",\n internalType: \"address\"\n },\n {\n name: \"\",\n type: \"address\",\n internalType: \"address\"\n },\n {\n name: \"\",\n type: \"uint256[]\",\n internalType: \"uint256[]\"\n },\n {\n name: \"\",\n type: \"uint256[]\",\n internalType: \"uint256[]\"\n },\n {\n name: \"\",\n type: \"bytes\",\n internalType: \"bytes\"\n }\n ],\n outputs: [\n {\n name: \"\",\n type: \"bytes4\",\n internalType: \"bytes4\"\n }\n ],\n stateMutability: \"pure\"\n },\n {\n type: \"function\",\n name: \"onERC1155Received\",\n inputs: [\n {\n name: \"\",\n type: \"address\",\n internalType: \"address\"\n },\n {\n name: \"\",\n type: \"address\",\n internalType: \"address\"\n },\n {\n name: \"\",\n type: \"uint256\",\n internalType: \"uint256\"\n },\n {\n name: \"\",\n type: \"uint256\",\n internalType: \"uint256\"\n },\n {\n name: \"\",\n type: \"bytes\",\n internalType: \"bytes\"\n }\n ],\n outputs: [\n {\n name: \"\",\n type: \"bytes4\",\n internalType: \"bytes4\"\n }\n ],\n stateMutability: \"pure\"\n },\n {\n type: \"function\",\n name: \"onERC721Received\",\n inputs: [\n {\n name: \"\",\n type: \"address\",\n internalType: \"address\"\n },\n {\n name: \"\",\n type: \"address\",\n internalType: \"address\"\n },\n {\n name: \"\",\n type: \"uint256\",\n internalType: \"uint256\"\n },\n {\n name: \"\",\n type: \"bytes\",\n internalType: \"bytes\"\n }\n ],\n outputs: [\n {\n name: \"\",\n type: \"bytes4\",\n internalType: \"bytes4\"\n }\n ],\n stateMutability: \"pure\"\n },\n {\n type: \"function\",\n name: \"performCreate\",\n inputs: [\n {\n name: \"value\",\n type: \"uint256\",\n internalType: \"uint256\"\n },\n {\n name: \"initCode\",\n type: \"bytes\",\n internalType: \"bytes\"\n },\n {\n name: \"isCreate2\",\n type: \"bool\",\n internalType: \"bool\"\n },\n {\n name: \"salt\",\n type: \"bytes32\",\n internalType: \"bytes32\"\n }\n ],\n outputs: [\n {\n name: \"createdAddr\",\n type: \"address\",\n internalType: \"address\"\n }\n ],\n stateMutability: \"payable\"\n },\n {\n type: \"function\",\n name: \"proxiableUUID\",\n inputs: [],\n outputs: [\n {\n name: \"\",\n type: \"bytes32\",\n internalType: \"bytes32\"\n }\n ],\n stateMutability: \"view\"\n },\n {\n type: \"function\",\n name: \"supportsInterface\",\n inputs: [\n {\n name: \"interfaceId\",\n type: \"bytes4\",\n internalType: \"bytes4\"\n }\n ],\n outputs: [\n {\n name: \"\",\n type: \"bool\",\n internalType: \"bool\"\n }\n ],\n stateMutability: \"view\"\n },\n {\n type: \"function\",\n name: \"uninstallExecution\",\n inputs: [\n {\n name: \"module\",\n type: \"address\",\n internalType: \"address\"\n },\n {\n name: \"manifest\",\n type: \"tuple\",\n internalType: \"struct ExecutionManifest\",\n components: [\n {\n name: \"executionFunctions\",\n type: \"tuple[]\",\n internalType: \"struct ManifestExecutionFunction[]\",\n components: [\n {\n name: \"executionSelector\",\n type: \"bytes4\",\n internalType: \"bytes4\"\n },\n {\n name: \"skipRuntimeValidation\",\n type: \"bool\",\n internalType: \"bool\"\n },\n {\n name: \"allowGlobalValidation\",\n type: \"bool\",\n internalType: \"bool\"\n }\n ]\n },\n {\n name: \"executionHooks\",\n type: \"tuple[]\",\n internalType: \"struct ManifestExecutionHook[]\",\n components: [\n {\n name: \"executionSelector\",\n type: \"bytes4\",\n internalType: \"bytes4\"\n },\n {\n name: \"entityId\",\n type: \"uint32\",\n internalType: \"uint32\"\n },\n {\n name: \"isPreHook\",\n type: \"bool\",\n internalType: \"bool\"\n },\n {\n name: \"isPostHook\",\n type: \"bool\",\n internalType: \"bool\"\n }\n ]\n },\n {\n name: \"interfaceIds\",\n type: \"bytes4[]\",\n internalType: \"bytes4[]\"\n }\n ]\n },\n {\n name: \"moduleUninstallData\",\n type: \"bytes\",\n internalType: \"bytes\"\n }\n ],\n outputs: [],\n stateMutability: \"nonpayable\"\n },\n {\n type: \"function\",\n name: \"uninstallValidation\",\n inputs: [\n {\n name: \"validationFunction\",\n type: \"bytes24\",\n internalType: \"ModuleEntity\"\n },\n {\n name: \"uninstallData\",\n type: \"bytes\",\n internalType: \"bytes\"\n },\n {\n name: \"hookUninstallData\",\n type: \"bytes[]\",\n internalType: \"bytes[]\"\n }\n ],\n outputs: [],\n stateMutability: \"nonpayable\"\n },\n {\n type: \"function\",\n name: \"updateFallbackSignerData\",\n inputs: [\n {\n name: \"fallbackSigner\",\n type: \"address\",\n internalType: \"address\"\n },\n {\n name: \"isDisabled\",\n type: \"bool\",\n internalType: \"bool\"\n }\n ],\n outputs: [],\n stateMutability: \"nonpayable\"\n },\n {\n type: \"function\",\n name: \"upgradeToAndCall\",\n inputs: [\n {\n name: \"newImplementation\",\n type: \"address\",\n internalType: \"address\"\n },\n {\n name: \"data\",\n type: \"bytes\",\n internalType: \"bytes\"\n }\n ],\n outputs: [],\n stateMutability: \"payable\"\n },\n {\n type: \"function\",\n name: \"validateUserOp\",\n inputs: [\n {\n name: \"userOp\",\n type: \"tuple\",\n internalType: \"struct PackedUserOperation\",\n components: [\n {\n name: \"sender\",\n type: \"address\",\n internalType: \"address\"\n },\n {\n name: \"nonce\",\n type: \"uint256\",\n internalType: \"uint256\"\n },\n {\n name: \"initCode\",\n type: \"bytes\",\n internalType: \"bytes\"\n },\n {\n name: \"callData\",\n type: \"bytes\",\n internalType: \"bytes\"\n },\n {\n name: \"accountGasLimits\",\n type: \"bytes32\",\n internalType: \"bytes32\"\n },\n {\n name: \"preVerificationGas\",\n type: \"uint256\",\n internalType: \"uint256\"\n },\n {\n name: \"gasFees\",\n type: \"bytes32\",\n internalType: \"bytes32\"\n },\n {\n name: \"paymasterAndData\",\n type: \"bytes\",\n internalType: \"bytes\"\n },\n {\n name: \"signature\",\n type: \"bytes\",\n internalType: \"bytes\"\n }\n ]\n },\n {\n name: \"userOpHash\",\n type: \"bytes32\",\n internalType: \"bytes32\"\n },\n {\n name: \"missingAccountFunds\",\n type: \"uint256\",\n internalType: \"uint256\"\n }\n ],\n outputs: [\n {\n name: \"validationData\",\n type: \"uint256\",\n internalType: \"uint256\"\n }\n ],\n stateMutability: \"nonpayable\"\n },\n {\n type: \"event\",\n name: \"ExecutionInstalled\",\n inputs: [\n {\n name: \"module\",\n type: \"address\",\n indexed: true,\n internalType: \"address\"\n },\n {\n name: \"manifest\",\n type: \"tuple\",\n indexed: false,\n internalType: \"struct ExecutionManifest\",\n components: [\n {\n name: \"executionFunctions\",\n type: \"tuple[]\",\n internalType: \"struct ManifestExecutionFunction[]\",\n components: [\n {\n name: \"executionSelector\",\n type: \"bytes4\",\n internalType: \"bytes4\"\n },\n {\n name: \"skipRuntimeValidation\",\n type: \"bool\",\n internalType: \"bool\"\n },\n {\n name: \"allowGlobalValidation\",\n type: \"bool\",\n internalType: \"bool\"\n }\n ]\n },\n {\n name: \"executionHooks\",\n type: \"tuple[]\",\n internalType: \"struct ManifestExecutionHook[]\",\n components: [\n {\n name: \"executionSelector\",\n type: \"bytes4\",\n internalType: \"bytes4\"\n },\n {\n name: \"entityId\",\n type: \"uint32\",\n internalType: \"uint32\"\n },\n {\n name: \"isPreHook\",\n type: \"bool\",\n internalType: \"bool\"\n },\n {\n name: \"isPostHook\",\n type: \"bool\",\n internalType: \"bool\"\n }\n ]\n },\n {\n name: \"interfaceIds\",\n type: \"bytes4[]\",\n internalType: \"bytes4[]\"\n }\n ]\n }\n ],\n anonymous: false\n },\n {\n type: \"event\",\n name: \"ExecutionUninstalled\",\n inputs: [\n {\n name: \"module\",\n type: \"address\",\n indexed: true,\n internalType: \"address\"\n },\n {\n name: \"onUninstallSucceeded\",\n type: \"bool\",\n indexed: false,\n internalType: \"bool\"\n },\n {\n name: \"manifest\",\n type: \"tuple\",\n indexed: false,\n internalType: \"struct ExecutionManifest\",\n components: [\n {\n name: \"executionFunctions\",\n type: \"tuple[]\",\n internalType: \"struct ManifestExecutionFunction[]\",\n components: [\n {\n name: \"executionSelector\",\n type: \"bytes4\",\n internalType: \"bytes4\"\n },\n {\n name: \"skipRuntimeValidation\",\n type: \"bool\",\n internalType: \"bool\"\n },\n {\n name: \"allowGlobalValidation\",\n type: \"bool\",\n internalType: \"bool\"\n }\n ]\n },\n {\n name: \"executionHooks\",\n type: \"tuple[]\",\n internalType: \"struct ManifestExecutionHook[]\",\n components: [\n {\n name: \"executionSelector\",\n type: \"bytes4\",\n internalType: \"bytes4\"\n },\n {\n name: \"entityId\",\n type: \"uint32\",\n internalType: \"uint32\"\n },\n {\n name: \"isPreHook\",\n type: \"bool\",\n internalType: \"bool\"\n },\n {\n name: \"isPostHook\",\n type: \"bool\",\n internalType: \"bool\"\n }\n ]\n },\n {\n name: \"interfaceIds\",\n type: \"bytes4[]\",\n internalType: \"bytes4[]\"\n }\n ]\n }\n ],\n anonymous: false\n },\n {\n type: \"event\",\n name: \"FallbackSignerUpdated\",\n inputs: [\n {\n name: \"newFallbackSigner\",\n type: \"address\",\n indexed: true,\n internalType: \"address\"\n },\n {\n name: \"isDisabled\",\n type: \"bool\",\n indexed: false,\n internalType: \"bool\"\n }\n ],\n anonymous: false\n },\n {\n type: \"event\",\n name: \"Initialized\",\n inputs: [\n {\n name: \"version\",\n type: \"uint64\",\n indexed: false,\n internalType: \"uint64\"\n }\n ],\n anonymous: false\n },\n {\n type: \"event\",\n name: \"Upgraded\",\n inputs: [\n {\n name: \"implementation\",\n type: \"address\",\n indexed: true,\n internalType: \"address\"\n }\n ],\n anonymous: false\n },\n {\n type: \"event\",\n name: \"ValidationInstalled\",\n inputs: [\n {\n name: \"module\",\n type: \"address\",\n indexed: true,\n internalType: \"address\"\n },\n {\n name: \"entityId\",\n type: \"uint32\",\n indexed: true,\n internalType: \"uint32\"\n }\n ],\n anonymous: false\n },\n {\n type: \"event\",\n name: \"ValidationUninstalled\",\n inputs: [\n {\n name: \"module\",\n type: \"address\",\n indexed: true,\n internalType: \"address\"\n },\n {\n name: \"entityId\",\n type: \"uint32\",\n indexed: true,\n internalType: \"uint32\"\n },\n {\n name: \"onUninstallSucceeded\",\n type: \"bool\",\n indexed: false,\n internalType: \"bool\"\n }\n ],\n anonymous: false\n },\n {\n type: \"error\",\n name: \"ArrayLengthMismatch\",\n inputs: []\n },\n {\n type: \"error\",\n name: \"CreateFailed\",\n inputs: []\n },\n {\n type: \"error\",\n name: \"DeferredActionSignatureInvalid\",\n inputs: []\n },\n {\n type: \"error\",\n name: \"DeferredValidationHasValidationHooks\",\n inputs: []\n },\n {\n type: \"error\",\n name: \"ExecutionHookAlreadySet\",\n inputs: [\n {\n name: \"hookConfig\",\n type: \"bytes25\",\n internalType: \"HookConfig\"\n }\n ]\n },\n {\n type: \"error\",\n name: \"FallbackSignerDisabled\",\n inputs: []\n },\n {\n type: \"error\",\n name: \"FallbackSignerMismatch\",\n inputs: []\n },\n {\n type: \"error\",\n name: \"FallbackValidationInstallationNotAllowed\",\n inputs: []\n },\n {\n type: \"error\",\n name: \"InterfaceNotSupported\",\n inputs: [\n {\n name: \"module\",\n type: \"address\",\n internalType: \"address\"\n }\n ]\n },\n {\n type: \"error\",\n name: \"InvalidInitialization\",\n inputs: []\n },\n {\n type: \"error\",\n name: \"InvalidSignatureType\",\n inputs: []\n },\n {\n type: \"error\",\n name: \"ModuleInstallCallbackFailed\",\n inputs: [\n {\n name: \"module\",\n type: \"address\",\n internalType: \"address\"\n },\n {\n name: \"revertReason\",\n type: \"bytes\",\n internalType: \"bytes\"\n }\n ]\n },\n {\n type: \"error\",\n name: \"NonCanonicalEncoding\",\n inputs: []\n },\n {\n type: \"error\",\n name: \"NotEntryPoint\",\n inputs: []\n },\n {\n type: \"error\",\n name: \"PreValidationHookDuplicate\",\n inputs: []\n },\n {\n type: \"error\",\n name: \"RequireUserOperationContext\",\n inputs: []\n },\n {\n type: \"error\",\n name: \"SegmentOutOfOrder\",\n inputs: []\n },\n {\n type: \"error\",\n name: \"SelfCallRecursionDepthExceeded\",\n inputs: []\n },\n {\n type: \"error\",\n name: \"SignatureValidationInvalid\",\n inputs: [\n {\n name: \"validationFunction\",\n type: \"bytes24\",\n internalType: \"ModuleEntity\"\n }\n ]\n },\n {\n type: \"error\",\n name: \"UnauthorizedCallContext\",\n inputs: []\n },\n {\n type: \"error\",\n name: \"UnexpectedAggregator\",\n inputs: [\n {\n name: \"validationFunction\",\n type: \"bytes24\",\n internalType: \"ModuleEntity\"\n },\n {\n name: \"aggregator\",\n type: \"address\",\n internalType: \"address\"\n }\n ]\n },\n {\n type: \"error\",\n name: \"UnrecognizedFunction\",\n inputs: [\n {\n name: \"selector\",\n type: \"bytes4\",\n internalType: \"bytes4\"\n }\n ]\n },\n {\n type: \"error\",\n name: \"UpgradeFailed\",\n inputs: []\n },\n {\n type: \"error\",\n name: \"UserOpValidationInvalid\",\n inputs: [\n {\n name: \"validationFunction\",\n type: \"bytes24\",\n internalType: \"ModuleEntity\"\n }\n ]\n },\n {\n type: \"error\",\n name: \"ValidationAlreadySet\",\n inputs: [\n {\n name: \"selector\",\n type: \"bytes4\",\n internalType: \"bytes4\"\n },\n {\n name: \"validationFunction\",\n type: \"bytes24\",\n internalType: \"ModuleEntity\"\n }\n ]\n },\n {\n type: \"error\",\n name: \"ValidationAssocHookLimitExceeded\",\n inputs: []\n },\n {\n type: \"error\",\n name: \"ValidationEntityIdInUse\",\n inputs: []\n },\n {\n type: \"error\",\n name: \"ValidationFunctionMissing\",\n inputs: [\n {\n name: \"selector\",\n type: \"bytes4\",\n internalType: \"bytes4\"\n }\n ]\n },\n {\n type: \"error\",\n name: \"ValidationSignatureSegmentMissing\",\n inputs: []\n }\n ];\n }\n });\n\n // ../../../node_modules/.pnpm/@account-kit+smart-contracts@4.62.0_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5._65dee0153d50ca3a2d2c6830319271d9/node_modules/@account-kit/smart-contracts/dist/esm/src/ma-v2/utils.js\n async function getMAV2UpgradeToData(client, args) {\n const { account: account_ = client.account } = args;\n if (!account_) {\n throw new AccountNotFoundError2();\n }\n const account = account_;\n const chain2 = client.chain;\n if (!chain2) {\n throw new ChainNotFoundError2();\n }\n const initData = encodeFunctionData({\n abi: semiModularAccountStorageAbi,\n functionName: \"initialize\",\n args: [await account.getSigner().getAddress()]\n });\n return {\n implAddress: getDefaultSMAV2StorageAddress(chain2),\n initializationData: initData,\n createModularAccountV2FromExisting: async () => createModularAccountV2({\n transport: custom(client.transport),\n chain: chain2,\n signer: account.getSigner(),\n accountAddress: account.address\n })\n };\n }\n var DEFAULT_OWNER_ENTITY_ID, packUOSignature, pack1271Signature, getDefaultWebAuthnMAV2FactoryAddress, getDefaultMAV2FactoryAddress, getDefaultSMAV2BytecodeAddress, getDefaultSMAV2StorageAddress, mintableERC20Abi, parseDeferredAction, assertNeverSignatureRequestType;\n var init_utils17 = __esm({\n \"../../../node_modules/.pnpm/@account-kit+smart-contracts@4.62.0_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5._65dee0153d50ca3a2d2c6830319271d9/node_modules/@account-kit/smart-contracts/dist/esm/src/ma-v2/utils.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_esm();\n init_exports3();\n init_modularAccountV2();\n init_semiModularAccountStorageAbi();\n init_esm6();\n DEFAULT_OWNER_ENTITY_ID = 0;\n packUOSignature = ({\n // orderedHookData, TODO: integrate in next iteration of MAv2 sdk\n validationSignature\n }) => {\n return concat([\"0xFF\", \"0x00\", validationSignature]);\n };\n pack1271Signature = ({ validationSignature, entityId }) => {\n return concat([\n \"0x00\",\n toHex(entityId, { size: 4 }),\n \"0xFF\",\n \"0x00\",\n // EOA type signature\n validationSignature\n ]);\n };\n getDefaultWebAuthnMAV2FactoryAddress = () => {\n return \"0x55010E571dCf07e254994bfc88b9C1C8FAe31960\";\n };\n getDefaultMAV2FactoryAddress = (chain2) => {\n switch (chain2.id) {\n case sepolia3.id:\n case baseSepolia3.id:\n case polygon3.id:\n case mainnet3.id:\n case polygonAmoy3.id:\n case optimism3.id:\n case optimismSepolia3.id:\n case arbitrum3.id:\n case arbitrumSepolia3.id:\n case base3.id:\n default:\n return \"0x00000000000017c61b5bEe81050EC8eFc9c6fecd\";\n }\n };\n getDefaultSMAV2BytecodeAddress = (chain2) => {\n switch (chain2.id) {\n case sepolia3.id:\n case baseSepolia3.id:\n case polygon3.id:\n case mainnet3.id:\n case polygonAmoy3.id:\n case optimism3.id:\n case optimismSepolia3.id:\n case arbitrum3.id:\n case arbitrumSepolia3.id:\n case base3.id:\n default:\n return \"0x000000000000c5A9089039570Dd36455b5C07383\";\n }\n };\n getDefaultSMAV2StorageAddress = (chain2) => {\n switch (chain2.id) {\n case sepolia3.id:\n case baseSepolia3.id:\n case polygon3.id:\n case mainnet3.id:\n case polygonAmoy3.id:\n case optimism3.id:\n case optimismSepolia3.id:\n case arbitrum3.id:\n case arbitrumSepolia3.id:\n case base3.id:\n default:\n return \"0x0000000000006E2f9d80CaEc0Da6500f005EB25A\";\n }\n };\n mintableERC20Abi = parseAbi([\n \"function transfer(address to, uint256 amount) external\",\n \"function mint(address to, uint256 amount) external\",\n \"function balanceOf(address target) external returns (uint256)\"\n ]);\n parseDeferredAction = (deferredAction) => {\n return {\n entityId: hexToNumber(`0x${deferredAction.slice(42, 50)}`),\n isGlobalValidation: hexToNumber(`0x${deferredAction.slice(50, 52)}`) % 2 === 1,\n nonce: BigInt(`0x${deferredAction.slice(4, 68)}`),\n deferredActionData: `0x${deferredAction.slice(68)}`,\n hasAssociatedExecHooks: deferredAction[3] === \"1\"\n };\n };\n assertNeverSignatureRequestType = () => {\n throw new Error(\"Invalid signature request type \");\n };\n }\n });\n\n // ../../../node_modules/.pnpm/@account-kit+smart-contracts@4.62.0_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5._65dee0153d50ca3a2d2c6830319271d9/node_modules/@account-kit/smart-contracts/dist/esm/src/ma-v2/account/predictAddress.js\n function predictModularAccountV2Address(params) {\n const { factoryAddress, salt, implementationAddress } = params;\n let combinedSalt;\n let initcode;\n switch (params.type) {\n case \"SMA\":\n combinedSalt = getCombinedSaltK1(params.ownerAddress, salt, 4294967295);\n const immutableArgs = params.ownerAddress;\n initcode = getProxyBytecodeWithImmutableArgs(implementationAddress, immutableArgs);\n break;\n case \"MA\":\n combinedSalt = getCombinedSaltK1(params.ownerAddress, salt, params.entityId);\n initcode = getProxyBytecode(implementationAddress);\n break;\n case \"WebAuthn\":\n const { ownerPublicKey: { x: x4, y: y6 } } = params;\n combinedSalt = keccak256(encodePacked([\"uint256\", \"uint256\", \"uint256\", \"uint32\"], [x4, y6, salt, params.entityId]));\n initcode = getProxyBytecode(implementationAddress);\n break;\n default:\n return assertNeverModularAccountV2Type(params);\n }\n return getContractAddress2({\n from: factoryAddress,\n opcode: \"CREATE2\",\n salt: combinedSalt,\n bytecode: initcode\n });\n }\n function getCombinedSaltK1(ownerAddress, salt, entityId) {\n return keccak256(encodePacked([\"address\", \"uint256\", \"uint32\"], [ownerAddress, salt, entityId]));\n }\n function getProxyBytecode(implementationAddress) {\n return `0x603d3d8160223d3973${implementationAddress.slice(2)}60095155f3363d3d373d3d363d7f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc545af43d6000803e6038573d6000fd5b3d6000f3`;\n }\n function getProxyBytecodeWithImmutableArgs(implementationAddress, immutableArgs) {\n return `0x6100513d8160233d3973${implementationAddress.slice(2)}60095155f3363d3d373d3d363d7f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc545af43d6000803e6038573d6000fd5b3d6000f3${immutableArgs.slice(2)}`;\n }\n function assertNeverModularAccountV2Type(_2) {\n throw new Error(\"Unknown modular account type in predictModularAccountV2Address\");\n }\n var init_predictAddress2 = __esm({\n \"../../../node_modules/.pnpm/@account-kit+smart-contracts@4.62.0_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5._65dee0153d50ca3a2d2c6830319271d9/node_modules/@account-kit/smart-contracts/dist/esm/src/ma-v2/account/predictAddress.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_esm();\n }\n });\n\n // ../../../node_modules/.pnpm/webauthn-p256@0.0.10/node_modules/webauthn-p256/_esm/utils.js\n function bytesToHex4(bytes) {\n return `0x${bytesToHex2(bytes)}`;\n }\n function hexToBytes4(value) {\n return hexToBytes2(value.slice(2));\n }\n var init_utils18 = __esm({\n \"../../../node_modules/.pnpm/webauthn-p256@0.0.10/node_modules/webauthn-p256/_esm/utils.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_utils3();\n }\n });\n\n // ../../../node_modules/.pnpm/webauthn-p256@0.0.10/node_modules/webauthn-p256/_esm/publicKey.js\n function parsePublicKey(publicKey) {\n const bytes = typeof publicKey === \"string\" ? hexToBytes4(publicKey) : publicKey;\n const offset = bytes.length === 65 ? 1 : 0;\n const x4 = bytes.slice(offset, 32 + offset);\n const y6 = bytes.slice(32 + offset, 64 + offset);\n return {\n prefix: bytes.length === 65 ? bytes[0] : void 0,\n x: BigInt(bytesToHex4(x4)),\n y: BigInt(bytesToHex4(y6))\n };\n }\n var init_publicKey = __esm({\n \"../../../node_modules/.pnpm/webauthn-p256@0.0.10/node_modules/webauthn-p256/_esm/publicKey.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_utils18();\n }\n });\n\n // ../../../node_modules/.pnpm/webauthn-p256@0.0.10/node_modules/webauthn-p256/_esm/index.js\n var init_esm8 = __esm({\n \"../../../node_modules/.pnpm/webauthn-p256@0.0.10/node_modules/webauthn-p256/_esm/index.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_publicKey();\n }\n });\n\n // ../../../node_modules/.pnpm/@account-kit+smart-contracts@4.62.0_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5._65dee0153d50ca3a2d2c6830319271d9/node_modules/@account-kit/smart-contracts/dist/esm/src/ma-v2/errors.js\n var WebauthnCredentialsRequiredError, SignerRequiredFor7702Error, SignerRequiredForDefaultError;\n var init_errors8 = __esm({\n \"../../../node_modules/.pnpm/@account-kit+smart-contracts@4.62.0_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5._65dee0153d50ca3a2d2c6830319271d9/node_modules/@account-kit/smart-contracts/dist/esm/src/ma-v2/errors.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_esm6();\n WebauthnCredentialsRequiredError = class extends BaseError4 {\n constructor() {\n super(\"Webauthn credentials are required to create a Webauthn Modular Account V2\");\n Object.defineProperty(this, \"name\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: \"WebauthnCredentialsRequiredError\"\n });\n }\n };\n SignerRequiredFor7702Error = class extends BaseError4 {\n constructor() {\n super(\"A signer is required to create a 7702 Modular Account V2\");\n Object.defineProperty(this, \"name\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: \"SignerRequiredFor7702Error\"\n });\n }\n };\n SignerRequiredForDefaultError = class extends BaseError4 {\n constructor() {\n super(\"A signer is required to create a default Modular Account V2\");\n Object.defineProperty(this, \"name\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: \"SignerRequiredForDefaultError\"\n });\n }\n };\n }\n });\n\n // ../../../node_modules/.pnpm/@account-kit+smart-contracts@4.62.0_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5._65dee0153d50ca3a2d2c6830319271d9/node_modules/@account-kit/smart-contracts/dist/esm/src/ma-v2/account/modularAccountV2.js\n async function createModularAccountV2(config2) {\n const { transport, chain: chain2, accountAddress: _accountAddress, entryPoint = getEntryPoint(chain2, { version: \"0.7.0\" }), signerEntity = {\n isGlobalValidation: true,\n entityId: DEFAULT_OWNER_ENTITY_ID\n }, signerEntity: { entityId = DEFAULT_OWNER_ENTITY_ID } = {}, deferredAction } = config2;\n const signer = \"signer\" in config2 ? config2.signer : void 0;\n const credential = \"credential\" in config2 ? config2.credential : void 0;\n const getFn = \"getFn\" in config2 ? config2.getFn : void 0;\n const rpId = \"rpId\" in config2 ? config2.rpId : void 0;\n const client = createBundlerClient({\n transport,\n chain: chain2\n });\n const accountFunctions = await (async () => {\n switch (config2.mode) {\n case \"webauthn\": {\n if (!credential)\n throw new WebauthnCredentialsRequiredError();\n const publicKey = credential.publicKey;\n const { x: x4, y: y6 } = parsePublicKey(publicKey);\n const { salt = 0n, factoryAddress = getDefaultWebAuthnMAV2FactoryAddress(), initCode } = config2;\n const getAccountInitCode = async () => {\n if (initCode) {\n return initCode;\n }\n return concatHex([\n factoryAddress,\n encodeFunctionData({\n abi: accountFactoryAbi,\n functionName: \"createWebAuthnAccount\",\n args: [x4, y6, salt, entityId]\n })\n ]);\n };\n const accountAddress = await getAccountAddress({\n client,\n entryPoint,\n accountAddress: _accountAddress,\n getAccountInitCode\n });\n return {\n getAccountInitCode,\n accountAddress\n };\n }\n case \"7702\": {\n const getAccountInitCode = async () => {\n return \"0x\";\n };\n if (!signer)\n throw new SignerRequiredFor7702Error();\n const signerAddress = await signer.getAddress();\n const accountAddress = _accountAddress ?? signerAddress;\n if (entityId === DEFAULT_OWNER_ENTITY_ID && signerAddress !== accountAddress) {\n throw new EntityIdOverrideError();\n }\n const implementation = \"0x69007702764179f14F51cdce752f4f775d74E139\";\n const getImplementationAddress = async () => implementation;\n return {\n getAccountInitCode,\n accountAddress,\n getImplementationAddress\n };\n }\n case \"default\":\n case void 0: {\n if (!signer)\n throw new SignerRequiredForDefaultError();\n const { salt = 0n, factoryAddress = getDefaultMAV2FactoryAddress(chain2), implementationAddress = getDefaultSMAV2BytecodeAddress(chain2), initCode } = config2;\n const signerAddress = await signer.getAddress();\n const getAccountInitCode = async () => {\n if (initCode) {\n return initCode;\n }\n return concatHex([\n factoryAddress,\n encodeFunctionData({\n abi: accountFactoryAbi,\n functionName: \"createSemiModularAccount\",\n args: [await signer.getAddress(), salt]\n })\n ]);\n };\n const accountAddress = _accountAddress ?? predictModularAccountV2Address({\n factoryAddress,\n implementationAddress,\n salt,\n type: \"SMA\",\n ownerAddress: signerAddress\n });\n return {\n getAccountInitCode,\n accountAddress\n };\n }\n default:\n assertNever(config2);\n }\n })();\n if (!signer) {\n if (!credential)\n throw new WebauthnCredentialsRequiredError();\n return await createMAv2Base({\n source: \"ModularAccountV2\",\n // TO DO: remove need to pass in source?\n transport,\n chain: chain2,\n entryPoint,\n signerEntity,\n deferredAction,\n credential,\n getFn,\n rpId,\n ...accountFunctions\n });\n }\n return await createMAv2Base({\n source: \"ModularAccountV2\",\n // TO DO: remove need to pass in source?\n transport,\n chain: chain2,\n signer,\n entryPoint,\n signerEntity,\n deferredAction,\n ...accountFunctions\n });\n }\n function assertNever(_valid) {\n throw new InvalidModularAccountV2Mode();\n }\n var init_modularAccountV2 = __esm({\n \"../../../node_modules/.pnpm/@account-kit+smart-contracts@4.62.0_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5._65dee0153d50ca3a2d2c6830319271d9/node_modules/@account-kit/smart-contracts/dist/esm/src/ma-v2/account/modularAccountV2.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_esm6();\n init_esm();\n init_accountFactoryAbi();\n init_utils17();\n init_modularAccountV2Base();\n init_utils17();\n init_predictAddress2();\n init_esm8();\n init_errors8();\n }\n });\n\n // ../../../node_modules/.pnpm/@account-kit+smart-contracts@4.62.0_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5._65dee0153d50ca3a2d2c6830319271d9/node_modules/@account-kit/smart-contracts/dist/esm/src/ma-v2/client/client.js\n async function createModularAccountV2Client(config2) {\n const { transport, chain: chain2 } = config2;\n let account;\n if (config2.mode === \"webauthn\") {\n account = await createModularAccountV2(config2);\n } else {\n account = await createModularAccountV2(config2);\n }\n const middlewareToAppend = await (async () => {\n switch (config2.mode) {\n case \"7702\":\n return {\n gasEstimator: default7702GasEstimator(config2.gasEstimator),\n signUserOperation: default7702UserOpSigner(config2.signUserOperation)\n };\n case \"webauthn\":\n return {\n gasEstimator: webauthnGasEstimator(config2.gasEstimator)\n };\n case \"default\":\n default:\n return {};\n }\n })();\n if (isAlchemyTransport2(transport, chain2)) {\n return createAlchemySmartAccountClient2({\n ...config2,\n transport,\n chain: chain2,\n account,\n ...middlewareToAppend\n });\n }\n return createSmartAccountClient({\n ...config2,\n account,\n ...middlewareToAppend\n });\n }\n var init_client4 = __esm({\n \"../../../node_modules/.pnpm/@account-kit+smart-contracts@4.62.0_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5._65dee0153d50ca3a2d2c6830319271d9/node_modules/@account-kit/smart-contracts/dist/esm/src/ma-v2/client/client.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_esm6();\n init_modularAccountV2();\n init_exports3();\n }\n });\n\n // ../../../node_modules/.pnpm/@account-kit+smart-contracts@4.62.0_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5._65dee0153d50ca3a2d2c6830319271d9/node_modules/@account-kit/smart-contracts/dist/esm/src/ma-v2/abis/semiModularAccountBytecodeAbi.js\n var semiModularAccountBytecodeAbi;\n var init_semiModularAccountBytecodeAbi = __esm({\n \"../../../node_modules/.pnpm/@account-kit+smart-contracts@4.62.0_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5._65dee0153d50ca3a2d2c6830319271d9/node_modules/@account-kit/smart-contracts/dist/esm/src/ma-v2/abis/semiModularAccountBytecodeAbi.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n semiModularAccountBytecodeAbi = [\n {\n type: \"constructor\",\n inputs: [\n {\n name: \"entryPoint\",\n type: \"address\",\n internalType: \"contract IEntryPoint\"\n },\n {\n name: \"executionInstallDelegate\",\n type: \"address\",\n internalType: \"contract ExecutionInstallDelegate\"\n }\n ],\n stateMutability: \"nonpayable\"\n },\n {\n type: \"fallback\",\n stateMutability: \"payable\"\n },\n {\n type: \"receive\",\n stateMutability: \"payable\"\n },\n {\n type: \"function\",\n name: \"accountId\",\n inputs: [],\n outputs: [\n {\n name: \"\",\n type: \"string\",\n internalType: \"string\"\n }\n ],\n stateMutability: \"pure\"\n },\n {\n type: \"function\",\n name: \"entryPoint\",\n inputs: [],\n outputs: [\n {\n name: \"\",\n type: \"address\",\n internalType: \"contract IEntryPoint\"\n }\n ],\n stateMutability: \"view\"\n },\n {\n type: \"function\",\n name: \"execute\",\n inputs: [\n {\n name: \"target\",\n type: \"address\",\n internalType: \"address\"\n },\n {\n name: \"value\",\n type: \"uint256\",\n internalType: \"uint256\"\n },\n {\n name: \"data\",\n type: \"bytes\",\n internalType: \"bytes\"\n }\n ],\n outputs: [\n {\n name: \"result\",\n type: \"bytes\",\n internalType: \"bytes\"\n }\n ],\n stateMutability: \"payable\"\n },\n {\n type: \"function\",\n name: \"executeBatch\",\n inputs: [\n {\n name: \"calls\",\n type: \"tuple[]\",\n internalType: \"struct Call[]\",\n components: [\n {\n name: \"target\",\n type: \"address\",\n internalType: \"address\"\n },\n {\n name: \"value\",\n type: \"uint256\",\n internalType: \"uint256\"\n },\n {\n name: \"data\",\n type: \"bytes\",\n internalType: \"bytes\"\n }\n ]\n }\n ],\n outputs: [\n {\n name: \"results\",\n type: \"bytes[]\",\n internalType: \"bytes[]\"\n }\n ],\n stateMutability: \"payable\"\n },\n {\n type: \"function\",\n name: \"executeUserOp\",\n inputs: [\n {\n name: \"userOp\",\n type: \"tuple\",\n internalType: \"struct PackedUserOperation\",\n components: [\n {\n name: \"sender\",\n type: \"address\",\n internalType: \"address\"\n },\n {\n name: \"nonce\",\n type: \"uint256\",\n internalType: \"uint256\"\n },\n {\n name: \"initCode\",\n type: \"bytes\",\n internalType: \"bytes\"\n },\n {\n name: \"callData\",\n type: \"bytes\",\n internalType: \"bytes\"\n },\n {\n name: \"accountGasLimits\",\n type: \"bytes32\",\n internalType: \"bytes32\"\n },\n {\n name: \"preVerificationGas\",\n type: \"uint256\",\n internalType: \"uint256\"\n },\n {\n name: \"gasFees\",\n type: \"bytes32\",\n internalType: \"bytes32\"\n },\n {\n name: \"paymasterAndData\",\n type: \"bytes\",\n internalType: \"bytes\"\n },\n {\n name: \"signature\",\n type: \"bytes\",\n internalType: \"bytes\"\n }\n ]\n },\n {\n name: \"\",\n type: \"bytes32\",\n internalType: \"bytes32\"\n }\n ],\n outputs: [],\n stateMutability: \"nonpayable\"\n },\n {\n type: \"function\",\n name: \"executeWithRuntimeValidation\",\n inputs: [\n {\n name: \"data\",\n type: \"bytes\",\n internalType: \"bytes\"\n },\n {\n name: \"authorization\",\n type: \"bytes\",\n internalType: \"bytes\"\n }\n ],\n outputs: [\n {\n name: \"\",\n type: \"bytes\",\n internalType: \"bytes\"\n }\n ],\n stateMutability: \"payable\"\n },\n {\n type: \"function\",\n name: \"getExecutionData\",\n inputs: [\n {\n name: \"selector\",\n type: \"bytes4\",\n internalType: \"bytes4\"\n }\n ],\n outputs: [\n {\n name: \"data\",\n type: \"tuple\",\n internalType: \"struct ExecutionDataView\",\n components: [\n {\n name: \"module\",\n type: \"address\",\n internalType: \"address\"\n },\n {\n name: \"skipRuntimeValidation\",\n type: \"bool\",\n internalType: \"bool\"\n },\n {\n name: \"allowGlobalValidation\",\n type: \"bool\",\n internalType: \"bool\"\n },\n {\n name: \"executionHooks\",\n type: \"bytes25[]\",\n internalType: \"HookConfig[]\"\n }\n ]\n }\n ],\n stateMutability: \"view\"\n },\n {\n type: \"function\",\n name: \"getFallbackSignerData\",\n inputs: [],\n outputs: [\n {\n name: \"\",\n type: \"address\",\n internalType: \"address\"\n },\n {\n name: \"\",\n type: \"bool\",\n internalType: \"bool\"\n }\n ],\n stateMutability: \"view\"\n },\n {\n type: \"function\",\n name: \"getValidationData\",\n inputs: [\n {\n name: \"validationFunction\",\n type: \"bytes24\",\n internalType: \"ModuleEntity\"\n }\n ],\n outputs: [\n {\n name: \"data\",\n type: \"tuple\",\n internalType: \"struct ValidationDataView\",\n components: [\n {\n name: \"validationFlags\",\n type: \"uint8\",\n internalType: \"ValidationFlags\"\n },\n {\n name: \"validationHooks\",\n type: \"bytes25[]\",\n internalType: \"HookConfig[]\"\n },\n {\n name: \"executionHooks\",\n type: \"bytes25[]\",\n internalType: \"HookConfig[]\"\n },\n {\n name: \"selectors\",\n type: \"bytes4[]\",\n internalType: \"bytes4[]\"\n }\n ]\n }\n ],\n stateMutability: \"view\"\n },\n {\n type: \"function\",\n name: \"installExecution\",\n inputs: [\n {\n name: \"module\",\n type: \"address\",\n internalType: \"address\"\n },\n {\n name: \"manifest\",\n type: \"tuple\",\n internalType: \"struct ExecutionManifest\",\n components: [\n {\n name: \"executionFunctions\",\n type: \"tuple[]\",\n internalType: \"struct ManifestExecutionFunction[]\",\n components: [\n {\n name: \"executionSelector\",\n type: \"bytes4\",\n internalType: \"bytes4\"\n },\n {\n name: \"skipRuntimeValidation\",\n type: \"bool\",\n internalType: \"bool\"\n },\n {\n name: \"allowGlobalValidation\",\n type: \"bool\",\n internalType: \"bool\"\n }\n ]\n },\n {\n name: \"executionHooks\",\n type: \"tuple[]\",\n internalType: \"struct ManifestExecutionHook[]\",\n components: [\n {\n name: \"executionSelector\",\n type: \"bytes4\",\n internalType: \"bytes4\"\n },\n {\n name: \"entityId\",\n type: \"uint32\",\n internalType: \"uint32\"\n },\n {\n name: \"isPreHook\",\n type: \"bool\",\n internalType: \"bool\"\n },\n {\n name: \"isPostHook\",\n type: \"bool\",\n internalType: \"bool\"\n }\n ]\n },\n {\n name: \"interfaceIds\",\n type: \"bytes4[]\",\n internalType: \"bytes4[]\"\n }\n ]\n },\n {\n name: \"moduleInstallData\",\n type: \"bytes\",\n internalType: \"bytes\"\n }\n ],\n outputs: [],\n stateMutability: \"nonpayable\"\n },\n {\n type: \"function\",\n name: \"installValidation\",\n inputs: [\n {\n name: \"validationConfig\",\n type: \"bytes25\",\n internalType: \"ValidationConfig\"\n },\n {\n name: \"selectors\",\n type: \"bytes4[]\",\n internalType: \"bytes4[]\"\n },\n {\n name: \"installData\",\n type: \"bytes\",\n internalType: \"bytes\"\n },\n {\n name: \"hooks\",\n type: \"bytes[]\",\n internalType: \"bytes[]\"\n }\n ],\n outputs: [],\n stateMutability: \"nonpayable\"\n },\n {\n type: \"function\",\n name: \"isValidSignature\",\n inputs: [\n {\n name: \"hash\",\n type: \"bytes32\",\n internalType: \"bytes32\"\n },\n {\n name: \"signature\",\n type: \"bytes\",\n internalType: \"bytes\"\n }\n ],\n outputs: [\n {\n name: \"\",\n type: \"bytes4\",\n internalType: \"bytes4\"\n }\n ],\n stateMutability: \"view\"\n },\n {\n type: \"function\",\n name: \"onERC1155BatchReceived\",\n inputs: [\n {\n name: \"\",\n type: \"address\",\n internalType: \"address\"\n },\n {\n name: \"\",\n type: \"address\",\n internalType: \"address\"\n },\n {\n name: \"\",\n type: \"uint256[]\",\n internalType: \"uint256[]\"\n },\n {\n name: \"\",\n type: \"uint256[]\",\n internalType: \"uint256[]\"\n },\n {\n name: \"\",\n type: \"bytes\",\n internalType: \"bytes\"\n }\n ],\n outputs: [\n {\n name: \"\",\n type: \"bytes4\",\n internalType: \"bytes4\"\n }\n ],\n stateMutability: \"pure\"\n },\n {\n type: \"function\",\n name: \"onERC1155Received\",\n inputs: [\n {\n name: \"\",\n type: \"address\",\n internalType: \"address\"\n },\n {\n name: \"\",\n type: \"address\",\n internalType: \"address\"\n },\n {\n name: \"\",\n type: \"uint256\",\n internalType: \"uint256\"\n },\n {\n name: \"\",\n type: \"uint256\",\n internalType: \"uint256\"\n },\n {\n name: \"\",\n type: \"bytes\",\n internalType: \"bytes\"\n }\n ],\n outputs: [\n {\n name: \"\",\n type: \"bytes4\",\n internalType: \"bytes4\"\n }\n ],\n stateMutability: \"pure\"\n },\n {\n type: \"function\",\n name: \"onERC721Received\",\n inputs: [\n {\n name: \"\",\n type: \"address\",\n internalType: \"address\"\n },\n {\n name: \"\",\n type: \"address\",\n internalType: \"address\"\n },\n {\n name: \"\",\n type: \"uint256\",\n internalType: \"uint256\"\n },\n {\n name: \"\",\n type: \"bytes\",\n internalType: \"bytes\"\n }\n ],\n outputs: [\n {\n name: \"\",\n type: \"bytes4\",\n internalType: \"bytes4\"\n }\n ],\n stateMutability: \"pure\"\n },\n {\n type: \"function\",\n name: \"performCreate\",\n inputs: [\n {\n name: \"value\",\n type: \"uint256\",\n internalType: \"uint256\"\n },\n {\n name: \"initCode\",\n type: \"bytes\",\n internalType: \"bytes\"\n },\n {\n name: \"isCreate2\",\n type: \"bool\",\n internalType: \"bool\"\n },\n {\n name: \"salt\",\n type: \"bytes32\",\n internalType: \"bytes32\"\n }\n ],\n outputs: [\n {\n name: \"createdAddr\",\n type: \"address\",\n internalType: \"address\"\n }\n ],\n stateMutability: \"payable\"\n },\n {\n type: \"function\",\n name: \"proxiableUUID\",\n inputs: [],\n outputs: [\n {\n name: \"\",\n type: \"bytes32\",\n internalType: \"bytes32\"\n }\n ],\n stateMutability: \"view\"\n },\n {\n type: \"function\",\n name: \"supportsInterface\",\n inputs: [\n {\n name: \"interfaceId\",\n type: \"bytes4\",\n internalType: \"bytes4\"\n }\n ],\n outputs: [\n {\n name: \"\",\n type: \"bool\",\n internalType: \"bool\"\n }\n ],\n stateMutability: \"view\"\n },\n {\n type: \"function\",\n name: \"uninstallExecution\",\n inputs: [\n {\n name: \"module\",\n type: \"address\",\n internalType: \"address\"\n },\n {\n name: \"manifest\",\n type: \"tuple\",\n internalType: \"struct ExecutionManifest\",\n components: [\n {\n name: \"executionFunctions\",\n type: \"tuple[]\",\n internalType: \"struct ManifestExecutionFunction[]\",\n components: [\n {\n name: \"executionSelector\",\n type: \"bytes4\",\n internalType: \"bytes4\"\n },\n {\n name: \"skipRuntimeValidation\",\n type: \"bool\",\n internalType: \"bool\"\n },\n {\n name: \"allowGlobalValidation\",\n type: \"bool\",\n internalType: \"bool\"\n }\n ]\n },\n {\n name: \"executionHooks\",\n type: \"tuple[]\",\n internalType: \"struct ManifestExecutionHook[]\",\n components: [\n {\n name: \"executionSelector\",\n type: \"bytes4\",\n internalType: \"bytes4\"\n },\n {\n name: \"entityId\",\n type: \"uint32\",\n internalType: \"uint32\"\n },\n {\n name: \"isPreHook\",\n type: \"bool\",\n internalType: \"bool\"\n },\n {\n name: \"isPostHook\",\n type: \"bool\",\n internalType: \"bool\"\n }\n ]\n },\n {\n name: \"interfaceIds\",\n type: \"bytes4[]\",\n internalType: \"bytes4[]\"\n }\n ]\n },\n {\n name: \"moduleUninstallData\",\n type: \"bytes\",\n internalType: \"bytes\"\n }\n ],\n outputs: [],\n stateMutability: \"nonpayable\"\n },\n {\n type: \"function\",\n name: \"uninstallValidation\",\n inputs: [\n {\n name: \"validationFunction\",\n type: \"bytes24\",\n internalType: \"ModuleEntity\"\n },\n {\n name: \"uninstallData\",\n type: \"bytes\",\n internalType: \"bytes\"\n },\n {\n name: \"hookUninstallData\",\n type: \"bytes[]\",\n internalType: \"bytes[]\"\n }\n ],\n outputs: [],\n stateMutability: \"nonpayable\"\n },\n {\n type: \"function\",\n name: \"updateFallbackSignerData\",\n inputs: [\n {\n name: \"fallbackSigner\",\n type: \"address\",\n internalType: \"address\"\n },\n {\n name: \"isDisabled\",\n type: \"bool\",\n internalType: \"bool\"\n }\n ],\n outputs: [],\n stateMutability: \"nonpayable\"\n },\n {\n type: \"function\",\n name: \"upgradeToAndCall\",\n inputs: [\n {\n name: \"newImplementation\",\n type: \"address\",\n internalType: \"address\"\n },\n {\n name: \"data\",\n type: \"bytes\",\n internalType: \"bytes\"\n }\n ],\n outputs: [],\n stateMutability: \"payable\"\n },\n {\n type: \"function\",\n name: \"validateUserOp\",\n inputs: [\n {\n name: \"userOp\",\n type: \"tuple\",\n internalType: \"struct PackedUserOperation\",\n components: [\n {\n name: \"sender\",\n type: \"address\",\n internalType: \"address\"\n },\n {\n name: \"nonce\",\n type: \"uint256\",\n internalType: \"uint256\"\n },\n {\n name: \"initCode\",\n type: \"bytes\",\n internalType: \"bytes\"\n },\n {\n name: \"callData\",\n type: \"bytes\",\n internalType: \"bytes\"\n },\n {\n name: \"accountGasLimits\",\n type: \"bytes32\",\n internalType: \"bytes32\"\n },\n {\n name: \"preVerificationGas\",\n type: \"uint256\",\n internalType: \"uint256\"\n },\n {\n name: \"gasFees\",\n type: \"bytes32\",\n internalType: \"bytes32\"\n },\n {\n name: \"paymasterAndData\",\n type: \"bytes\",\n internalType: \"bytes\"\n },\n {\n name: \"signature\",\n type: \"bytes\",\n internalType: \"bytes\"\n }\n ]\n },\n {\n name: \"userOpHash\",\n type: \"bytes32\",\n internalType: \"bytes32\"\n },\n {\n name: \"missingAccountFunds\",\n type: \"uint256\",\n internalType: \"uint256\"\n }\n ],\n outputs: [\n {\n name: \"validationData\",\n type: \"uint256\",\n internalType: \"uint256\"\n }\n ],\n stateMutability: \"nonpayable\"\n },\n {\n type: \"event\",\n name: \"ExecutionInstalled\",\n inputs: [\n {\n name: \"module\",\n type: \"address\",\n indexed: true,\n internalType: \"address\"\n },\n {\n name: \"manifest\",\n type: \"tuple\",\n indexed: false,\n internalType: \"struct ExecutionManifest\",\n components: [\n {\n name: \"executionFunctions\",\n type: \"tuple[]\",\n internalType: \"struct ManifestExecutionFunction[]\",\n components: [\n {\n name: \"executionSelector\",\n type: \"bytes4\",\n internalType: \"bytes4\"\n },\n {\n name: \"skipRuntimeValidation\",\n type: \"bool\",\n internalType: \"bool\"\n },\n {\n name: \"allowGlobalValidation\",\n type: \"bool\",\n internalType: \"bool\"\n }\n ]\n },\n {\n name: \"executionHooks\",\n type: \"tuple[]\",\n internalType: \"struct ManifestExecutionHook[]\",\n components: [\n {\n name: \"executionSelector\",\n type: \"bytes4\",\n internalType: \"bytes4\"\n },\n {\n name: \"entityId\",\n type: \"uint32\",\n internalType: \"uint32\"\n },\n {\n name: \"isPreHook\",\n type: \"bool\",\n internalType: \"bool\"\n },\n {\n name: \"isPostHook\",\n type: \"bool\",\n internalType: \"bool\"\n }\n ]\n },\n {\n name: \"interfaceIds\",\n type: \"bytes4[]\",\n internalType: \"bytes4[]\"\n }\n ]\n }\n ],\n anonymous: false\n },\n {\n type: \"event\",\n name: \"ExecutionUninstalled\",\n inputs: [\n {\n name: \"module\",\n type: \"address\",\n indexed: true,\n internalType: \"address\"\n },\n {\n name: \"onUninstallSucceeded\",\n type: \"bool\",\n indexed: false,\n internalType: \"bool\"\n },\n {\n name: \"manifest\",\n type: \"tuple\",\n indexed: false,\n internalType: \"struct ExecutionManifest\",\n components: [\n {\n name: \"executionFunctions\",\n type: \"tuple[]\",\n internalType: \"struct ManifestExecutionFunction[]\",\n components: [\n {\n name: \"executionSelector\",\n type: \"bytes4\",\n internalType: \"bytes4\"\n },\n {\n name: \"skipRuntimeValidation\",\n type: \"bool\",\n internalType: \"bool\"\n },\n {\n name: \"allowGlobalValidation\",\n type: \"bool\",\n internalType: \"bool\"\n }\n ]\n },\n {\n name: \"executionHooks\",\n type: \"tuple[]\",\n internalType: \"struct ManifestExecutionHook[]\",\n components: [\n {\n name: \"executionSelector\",\n type: \"bytes4\",\n internalType: \"bytes4\"\n },\n {\n name: \"entityId\",\n type: \"uint32\",\n internalType: \"uint32\"\n },\n {\n name: \"isPreHook\",\n type: \"bool\",\n internalType: \"bool\"\n },\n {\n name: \"isPostHook\",\n type: \"bool\",\n internalType: \"bool\"\n }\n ]\n },\n {\n name: \"interfaceIds\",\n type: \"bytes4[]\",\n internalType: \"bytes4[]\"\n }\n ]\n }\n ],\n anonymous: false\n },\n {\n type: \"event\",\n name: \"FallbackSignerUpdated\",\n inputs: [\n {\n name: \"newFallbackSigner\",\n type: \"address\",\n indexed: true,\n internalType: \"address\"\n },\n {\n name: \"isDisabled\",\n type: \"bool\",\n indexed: false,\n internalType: \"bool\"\n }\n ],\n anonymous: false\n },\n {\n type: \"event\",\n name: \"Initialized\",\n inputs: [\n {\n name: \"version\",\n type: \"uint64\",\n indexed: false,\n internalType: \"uint64\"\n }\n ],\n anonymous: false\n },\n {\n type: \"event\",\n name: \"Upgraded\",\n inputs: [\n {\n name: \"implementation\",\n type: \"address\",\n indexed: true,\n internalType: \"address\"\n }\n ],\n anonymous: false\n },\n {\n type: \"event\",\n name: \"ValidationInstalled\",\n inputs: [\n {\n name: \"module\",\n type: \"address\",\n indexed: true,\n internalType: \"address\"\n },\n {\n name: \"entityId\",\n type: \"uint32\",\n indexed: true,\n internalType: \"uint32\"\n }\n ],\n anonymous: false\n },\n {\n type: \"event\",\n name: \"ValidationUninstalled\",\n inputs: [\n {\n name: \"module\",\n type: \"address\",\n indexed: true,\n internalType: \"address\"\n },\n {\n name: \"entityId\",\n type: \"uint32\",\n indexed: true,\n internalType: \"uint32\"\n },\n {\n name: \"onUninstallSucceeded\",\n type: \"bool\",\n indexed: false,\n internalType: \"bool\"\n }\n ],\n anonymous: false\n },\n {\n type: \"error\",\n name: \"ArrayLengthMismatch\",\n inputs: []\n },\n {\n type: \"error\",\n name: \"CreateFailed\",\n inputs: []\n },\n {\n type: \"error\",\n name: \"DeferredActionSignatureInvalid\",\n inputs: []\n },\n {\n type: \"error\",\n name: \"DeferredValidationHasValidationHooks\",\n inputs: []\n },\n {\n type: \"error\",\n name: \"ExecutionHookAlreadySet\",\n inputs: [\n {\n name: \"hookConfig\",\n type: \"bytes25\",\n internalType: \"HookConfig\"\n }\n ]\n },\n {\n type: \"error\",\n name: \"FallbackSignerDisabled\",\n inputs: []\n },\n {\n type: \"error\",\n name: \"FallbackSignerMismatch\",\n inputs: []\n },\n {\n type: \"error\",\n name: \"FallbackValidationInstallationNotAllowed\",\n inputs: []\n },\n {\n type: \"error\",\n name: \"InterfaceNotSupported\",\n inputs: [\n {\n name: \"module\",\n type: \"address\",\n internalType: \"address\"\n }\n ]\n },\n {\n type: \"error\",\n name: \"InvalidInitialization\",\n inputs: []\n },\n {\n type: \"error\",\n name: \"InvalidSignatureType\",\n inputs: []\n },\n {\n type: \"error\",\n name: \"ModuleInstallCallbackFailed\",\n inputs: [\n {\n name: \"module\",\n type: \"address\",\n internalType: \"address\"\n },\n {\n name: \"revertReason\",\n type: \"bytes\",\n internalType: \"bytes\"\n }\n ]\n },\n {\n type: \"error\",\n name: \"NonCanonicalEncoding\",\n inputs: []\n },\n {\n type: \"error\",\n name: \"NotEntryPoint\",\n inputs: []\n },\n {\n type: \"error\",\n name: \"PreValidationHookDuplicate\",\n inputs: []\n },\n {\n type: \"error\",\n name: \"RequireUserOperationContext\",\n inputs: []\n },\n {\n type: \"error\",\n name: \"SegmentOutOfOrder\",\n inputs: []\n },\n {\n type: \"error\",\n name: \"SelfCallRecursionDepthExceeded\",\n inputs: []\n },\n {\n type: \"error\",\n name: \"SignatureValidationInvalid\",\n inputs: [\n {\n name: \"validationFunction\",\n type: \"bytes24\",\n internalType: \"ModuleEntity\"\n }\n ]\n },\n {\n type: \"error\",\n name: \"UnauthorizedCallContext\",\n inputs: []\n },\n {\n type: \"error\",\n name: \"UnexpectedAggregator\",\n inputs: [\n {\n name: \"validationFunction\",\n type: \"bytes24\",\n internalType: \"ModuleEntity\"\n },\n {\n name: \"aggregator\",\n type: \"address\",\n internalType: \"address\"\n }\n ]\n },\n {\n type: \"error\",\n name: \"UnrecognizedFunction\",\n inputs: [\n {\n name: \"selector\",\n type: \"bytes4\",\n internalType: \"bytes4\"\n }\n ]\n },\n {\n type: \"error\",\n name: \"UpgradeFailed\",\n inputs: []\n },\n {\n type: \"error\",\n name: \"UserOpValidationInvalid\",\n inputs: [\n {\n name: \"validationFunction\",\n type: \"bytes24\",\n internalType: \"ModuleEntity\"\n }\n ]\n },\n {\n type: \"error\",\n name: \"ValidationAlreadySet\",\n inputs: [\n {\n name: \"selector\",\n type: \"bytes4\",\n internalType: \"bytes4\"\n },\n {\n name: \"validationFunction\",\n type: \"bytes24\",\n internalType: \"ModuleEntity\"\n }\n ]\n },\n {\n type: \"error\",\n name: \"ValidationAssocHookLimitExceeded\",\n inputs: []\n },\n {\n type: \"error\",\n name: \"ValidationEntityIdInUse\",\n inputs: []\n },\n {\n type: \"error\",\n name: \"ValidationFunctionMissing\",\n inputs: [\n {\n name: \"selector\",\n type: \"bytes4\",\n internalType: \"bytes4\"\n }\n ]\n },\n {\n type: \"error\",\n name: \"ValidationSignatureSegmentMissing\",\n inputs: []\n }\n ];\n }\n });\n\n // ../../../node_modules/.pnpm/@account-kit+smart-contracts@4.62.0_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5._65dee0153d50ca3a2d2c6830319271d9/node_modules/@account-kit/smart-contracts/dist/esm/src/index.js\n var src_exports = {};\n __export(src_exports, {\n AccountVersionRegistry: () => AccountVersionRegistry,\n IAccountLoupeAbi: () => IAccountLoupeAbi,\n IPluginAbi: () => IPluginAbi,\n IPluginManagerAbi: () => IPluginManagerAbi,\n IStandardExecutorAbi: () => IStandardExecutorAbi,\n InvalidAggregatedSignatureError: () => InvalidAggregatedSignatureError,\n InvalidContextSignatureError: () => InvalidContextSignatureError,\n LightAccountUnsupported1271Factories: () => LightAccountUnsupported1271Factories,\n LightAccountUnsupported1271Impls: () => LightAccountUnsupported1271Impls,\n MultiOwnerModularAccountFactoryAbi: () => MultiOwnerModularAccountFactoryAbi,\n MultiOwnerPlugin: () => MultiOwnerPlugin,\n MultiOwnerPluginAbi: () => MultiOwnerPluginAbi,\n MultiOwnerPluginExecutionFunctionAbi: () => MultiOwnerPluginExecutionFunctionAbi,\n MultisigAccountExpectedError: () => MultisigAccountExpectedError,\n MultisigMissingSignatureError: () => MultisigMissingSignatureError,\n MultisigModularAccountFactoryAbi: () => MultisigModularAccountFactoryAbi,\n MultisigPlugin: () => MultisigPlugin,\n MultisigPluginAbi: () => MultisigPluginAbi,\n MultisigPluginExecutionFunctionAbi: () => MultisigPluginExecutionFunctionAbi,\n SessionKeyAccessListType: () => SessionKeyAccessListType,\n SessionKeyPermissionsBuilder: () => SessionKeyPermissionsBuilder,\n SessionKeyPlugin: () => SessionKeyPlugin,\n SessionKeyPluginAbi: () => SessionKeyPluginAbi,\n SessionKeyPluginExecutionFunctionAbi: () => SessionKeyPluginExecutionFunctionAbi,\n SessionKeySigner: () => SessionKeySigner,\n UpgradeableModularAccountAbi: () => UpgradeableModularAccountAbi,\n accountLoupeActions: () => accountLoupeActions,\n buildSessionKeysToRemoveStruct: () => buildSessionKeysToRemoveStruct,\n combineSignatures: () => combineSignatures,\n createLightAccount: () => createLightAccount,\n createLightAccountAlchemyClient: () => createLightAccountAlchemyClient,\n createLightAccountClient: () => createLightAccountClient,\n createModularAccountAlchemyClient: () => createModularAccountAlchemyClient,\n createModularAccountV2: () => createModularAccountV2,\n createModularAccountV2Client: () => createModularAccountV2Client,\n createMultiOwnerLightAccount: () => createMultiOwnerLightAccount,\n createMultiOwnerLightAccountAlchemyClient: () => createMultiOwnerLightAccountAlchemyClient,\n createMultiOwnerLightAccountClient: () => createMultiOwnerLightAccountClient,\n createMultiOwnerModularAccount: () => createMultiOwnerModularAccount,\n createMultiOwnerModularAccountClient: () => createMultiOwnerModularAccountClient,\n createMultisigAccountAlchemyClient: () => createMultisigAccountAlchemyClient,\n createMultisigModularAccount: () => createMultisigModularAccount,\n createMultisigModularAccountClient: () => createMultisigModularAccountClient,\n defaultLightAccountVersion: () => defaultLightAccountVersion,\n formatSignatures: () => formatSignatures,\n getDefaultLightAccountFactoryAddress: () => getDefaultLightAccountFactoryAddress,\n getDefaultMultiOwnerLightAccountFactoryAddress: () => getDefaultMultiOwnerLightAccountFactoryAddress,\n getDefaultMultiOwnerModularAccountFactoryAddress: () => getDefaultMultiOwnerModularAccountFactoryAddress,\n getDefaultMultisigModularAccountFactoryAddress: () => getDefaultMultisigModularAccountFactoryAddress,\n getLightAccountVersionForAccount: () => getLightAccountVersionForAccount,\n getMAInitializationData: () => getMAInitializationData,\n getMAV2UpgradeToData: () => getMAV2UpgradeToData,\n getMSCAUpgradeToData: () => getMSCAUpgradeToData,\n getSignerType: () => getSignerType,\n installPlugin: () => installPlugin,\n lightAccountClientActions: () => lightAccountClientActions,\n multiOwnerLightAccountClientActions: () => multiOwnerLightAccountClientActions,\n multiOwnerPluginActions: () => multiOwnerPluginActions2,\n multisigPluginActions: () => multisigPluginActions2,\n multisigSignatureMiddleware: () => multisigSignatureMiddleware,\n pluginManagerActions: () => pluginManagerActions,\n predictLightAccountAddress: () => predictLightAccountAddress,\n predictModularAccountV2Address: () => predictModularAccountV2Address,\n predictMultiOwnerLightAccountAddress: () => predictMultiOwnerLightAccountAddress,\n semiModularAccountBytecodeAbi: () => semiModularAccountBytecodeAbi,\n sessionKeyPluginActions: () => sessionKeyPluginActions2,\n splitAggregatedSignature: () => splitAggregatedSignature,\n standardExecutor: () => standardExecutor,\n transferLightAccountOwnership: () => transferOwnership,\n updateMultiOwnerLightAccountOwners: () => updateOwners\n });\n var init_src = __esm({\n \"../../../node_modules/.pnpm/@account-kit+smart-contracts@4.62.0_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5._65dee0153d50ca3a2d2c6830319271d9/node_modules/@account-kit/smart-contracts/dist/esm/src/index.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_account3();\n init_transferOwnership();\n init_alchemyClient();\n init_client2();\n init_multiOwnerAlchemyClient();\n init_lightAccount();\n init_predictAddress();\n init_predictAddress();\n init_utils11();\n init_multiOwner();\n init_updateOwners();\n init_multiOwnerLightAccount();\n init_multiOwnerLightAccount2();\n init_IAccountLoupe();\n init_IPlugin();\n init_IPluginManager();\n init_IStandardExecutor();\n init_MultiOwnerModularAccountFactory();\n init_MultisigModularAccountFactory();\n init_UpgradeableModularAccount();\n init_decorator();\n init_multiOwnerAccount();\n init_multisigAccount();\n init_standardExecutor();\n init_alchemyClient2();\n init_client3();\n init_multiSigAlchemyClient();\n init_errors6();\n init_decorator2();\n init_installPlugin();\n init_extension();\n init_plugin();\n init_multisig();\n init_utils13();\n init_extension3();\n init_permissions();\n init_plugin3();\n init_signer4();\n init_utils14();\n init_utils12();\n init_modularAccountV2();\n init_client4();\n init_utils17();\n init_predictAddress2();\n init_semiModularAccountBytecodeAbi();\n }\n });\n\n // ../../libs/ability-sdk/dist/src/lib/abilityHelpers/gasSponsorship/get-alchemy-chain-config.js\n var require_get_alchemy_chain_config = __commonJS({\n \"../../libs/ability-sdk/dist/src/lib/abilityHelpers/gasSponsorship/get-alchemy-chain-config.js\"(exports3) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n Object.defineProperty(exports3, \"__esModule\", { value: true });\n exports3.getAlchemyChainConfig = getAlchemyChainConfig;\n var infra_1 = (init_exports2(), __toCommonJS(exports_exports2));\n function getAlchemyChainConfig(chainId) {\n const supportedChains = [\n infra_1.arbitrum,\n infra_1.arbitrumGoerli,\n infra_1.arbitrumNova,\n infra_1.arbitrumSepolia,\n infra_1.base,\n infra_1.baseGoerli,\n infra_1.baseSepolia,\n infra_1.fraxtal,\n infra_1.fraxtalSepolia,\n infra_1.goerli,\n infra_1.mainnet,\n infra_1.optimism,\n infra_1.optimismGoerli,\n infra_1.optimismSepolia,\n infra_1.polygon,\n infra_1.polygonAmoy,\n infra_1.polygonMumbai,\n infra_1.sepolia,\n infra_1.shape,\n infra_1.shapeSepolia,\n infra_1.worldChain,\n infra_1.worldChainSepolia,\n infra_1.zora,\n infra_1.zoraSepolia,\n infra_1.beraChainBartio,\n infra_1.opbnbMainnet,\n infra_1.opbnbTestnet,\n infra_1.soneiumMinato,\n infra_1.soneiumMainnet,\n infra_1.unichainMainnet,\n infra_1.unichainSepolia,\n infra_1.inkMainnet,\n infra_1.inkSepolia,\n infra_1.mekong,\n infra_1.monadTestnet,\n infra_1.openlootSepolia,\n infra_1.gensynTestnet,\n infra_1.riseTestnet,\n infra_1.storyMainnet,\n infra_1.storyAeneid,\n infra_1.celoAlfajores,\n infra_1.celoMainnet,\n infra_1.teaSepolia,\n infra_1.bobaSepolia,\n infra_1.bobaMainnet\n ];\n const chain2 = supportedChains.find((c4) => c4.id === chainId);\n if (!chain2) {\n throw new Error(`Chain ID ${chainId} not supported by @account-kit/infra. Supported chain IDs: ${supportedChains.map((c4) => c4.id).join(\", \")}`);\n }\n return chain2;\n }\n }\n });\n\n // ../../libs/ability-sdk/dist/src/lib/abilityHelpers/gasSponsorship/lit-actions-smart-signer.js\n var require_lit_actions_smart_signer = __commonJS({\n \"../../libs/ability-sdk/dist/src/lib/abilityHelpers/gasSponsorship/lit-actions-smart-signer.js\"(exports3) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n Object.defineProperty(exports3, \"__esModule\", { value: true });\n exports3.LitActionsSmartSigner = void 0;\n var LitActionsSmartSigner = class {\n signerType = \"lit-actions\";\n inner;\n pkpPublicKey;\n signerAddress;\n constructor(config2) {\n if (config2.pkpPublicKey.startsWith(\"0x\")) {\n config2.pkpPublicKey = config2.pkpPublicKey.slice(2);\n }\n this.pkpPublicKey = config2.pkpPublicKey;\n this.signerAddress = ethers.utils.computeAddress(\"0x\" + config2.pkpPublicKey);\n this.inner = {\n pkpPublicKey: config2.pkpPublicKey,\n chainId: config2.chainId\n };\n }\n async getAddress() {\n return this.signerAddress;\n }\n async signMessage(message) {\n let messageToSign;\n if (typeof message === \"string\") {\n messageToSign = message;\n } else {\n messageToSign = typeof message.raw === \"string\" ? ethers.utils.arrayify(message.raw) : message.raw;\n }\n const messageHash = ethers.utils.hashMessage(messageToSign);\n const sig = await Lit.Actions.signAndCombineEcdsa({\n toSign: ethers.utils.arrayify(messageHash),\n publicKey: this.pkpPublicKey,\n sigName: `alchemyMessage`\n });\n const parsedSig = JSON.parse(sig);\n return ethers.utils.joinSignature({\n r: \"0x\" + parsedSig.r.substring(2),\n s: \"0x\" + parsedSig.s,\n v: parsedSig.v\n });\n }\n async signTypedData(params) {\n const hash3 = ethers.utils._TypedDataEncoder.hash(params.domain || {}, params.types || {}, params.message || {});\n const sig = await Lit.Actions.signAndCombineEcdsa({\n toSign: ethers.utils.arrayify(hash3),\n publicKey: this.pkpPublicKey,\n sigName: `alchemyTypedData`\n });\n const parsedSig = JSON.parse(sig);\n return ethers.utils.joinSignature({\n r: \"0x\" + parsedSig.r.substring(2),\n s: \"0x\" + parsedSig.s,\n v: parsedSig.v\n });\n }\n // reference implementation is from Viem SmartAccountSigner\n async signAuthorization(unsignedAuthorization) {\n const { contractAddress, chainId, nonce } = unsignedAuthorization;\n if (!contractAddress || !chainId) {\n throw new Error(\"Invalid authorization: contractAddress and chainId are required\");\n }\n const hash3 = ethers.utils.keccak256(ethers.utils.hexConcat([\n \"0x05\",\n ethers.utils.RLP.encode([\n ethers.utils.hexlify(chainId),\n contractAddress,\n nonce ? ethers.utils.hexlify(nonce) : \"0x\"\n ])\n ]));\n const sig = await Lit.Actions.signAndCombineEcdsa({\n toSign: ethers.utils.arrayify(hash3),\n publicKey: this.pkpPublicKey,\n sigName: `alchemyAuth7702`\n });\n const sigObj = JSON.parse(sig);\n return {\n address: unsignedAuthorization.address || contractAddress,\n chainId,\n nonce,\n r: \"0x\" + sigObj.r.substring(2),\n s: \"0x\" + sigObj.s,\n v: BigInt(sigObj.v),\n yParity: sigObj.v\n };\n }\n };\n exports3.LitActionsSmartSigner = LitActionsSmartSigner;\n }\n });\n\n // ../../libs/ability-sdk/dist/src/lib/abilityHelpers/gasSponsorship/sponsored-gas-raw-transaction.js\n var require_sponsored_gas_raw_transaction = __commonJS({\n \"../../libs/ability-sdk/dist/src/lib/abilityHelpers/gasSponsorship/sponsored-gas-raw-transaction.js\"(exports3) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n Object.defineProperty(exports3, \"__esModule\", { value: true });\n exports3.sponsoredGasRawTransaction = void 0;\n var infra_1 = (init_exports2(), __toCommonJS(exports_exports2));\n var smart_contracts_1 = (init_src(), __toCommonJS(src_exports));\n var get_alchemy_chain_config_1 = require_get_alchemy_chain_config();\n var lit_actions_smart_signer_1 = require_lit_actions_smart_signer();\n var sponsoredGasRawTransaction2 = async ({ pkpPublicKey, to, value, data, chainId, eip7702AlchemyApiKey, eip7702AlchemyPolicyId }) => {\n if (!eip7702AlchemyApiKey || !eip7702AlchemyPolicyId) {\n throw new Error(\"EIP7702 Alchemy API key and policy ID are required when using Alchemy for gas sponsorship\");\n }\n if (!chainId) {\n throw new Error(\"Chain ID is required when using Alchemy for gas sponsorship\");\n }\n console.log(\"[sponsoredGasRawTransaction] Encoded data:\", data);\n const txValue = value ? BigInt(value.toString()) : 0n;\n const litSigner = new lit_actions_smart_signer_1.LitActionsSmartSigner({\n pkpPublicKey,\n chainId\n });\n const alchemyChain = (0, get_alchemy_chain_config_1.getAlchemyChainConfig)(chainId);\n const smartAccountClient = await (0, smart_contracts_1.createModularAccountV2Client)({\n mode: \"7702\",\n transport: (0, infra_1.alchemy)({ apiKey: eip7702AlchemyApiKey }),\n chain: alchemyChain,\n signer: litSigner,\n policyId: eip7702AlchemyPolicyId\n });\n console.log(\"[sponsoredGasRawTransaction] Smart account client created\");\n const userOperation = {\n target: to,\n value: txValue,\n data\n };\n console.log(\"[sponsoredGasRawTransaction] User operation prepared\", userOperation);\n const uoStructResponse = await Lit.Actions.runOnce({\n waitForResponse: true,\n name: \"buildUserOperation\"\n }, async () => {\n try {\n const uoStruct2 = await smartAccountClient.buildUserOperation({\n uo: userOperation,\n account: smartAccountClient.account\n });\n return JSON.stringify(uoStruct2, (_2, v2) => typeof v2 === \"bigint\" ? { type: \"BigInt\", value: v2.toString() } : v2);\n } catch (e3) {\n console.log(\"[sponsoredGasRawTransaction] Failed to build user operation, error below\");\n console.log(e3);\n console.log(e3.stack);\n return \"\";\n }\n });\n if (uoStructResponse === \"\") {\n throw new Error(\"[sponsoredGasRawTransaction] Failed to build user operation\");\n }\n const uoStruct = JSON.parse(uoStructResponse, (_2, v2) => {\n if (v2 && typeof v2 === \"object\" && v2.type === \"BigInt\" && typeof v2.value === \"string\") {\n return BigInt(v2.value);\n }\n return v2;\n });\n console.log(\"[sponsoredGasRawTransaction] User operation built, starting signing...\", uoStruct);\n const signedUserOperation = await smartAccountClient.signUserOperation({\n account: smartAccountClient.account,\n uoStruct\n });\n console.log(\"[sponsoredGasRawTransaction] User operation signed\", signedUserOperation);\n const entryPoint = smartAccountClient.account.getEntryPoint();\n const uoHash = await Lit.Actions.runOnce({\n waitForResponse: true,\n name: \"sendWithAlchemy\"\n }, async () => {\n try {\n const userOpResult = await smartAccountClient.sendRawUserOperation(signedUserOperation, entryPoint.address);\n console.log(`[sponsoredGasRawTransaction] User operation sent`, {\n userOpHash: userOpResult\n });\n return userOpResult;\n } catch (e3) {\n console.log(\"[sponsoredGasRawTransaction] Failed to send user operation, error below\");\n console.log(e3);\n console.log(e3.stack);\n return \"\";\n }\n });\n if (uoHash === \"\") {\n throw new Error(\"[sponsoredGasRawTransaction] Failed to send user operation\");\n }\n return uoHash;\n };\n exports3.sponsoredGasRawTransaction = sponsoredGasRawTransaction2;\n }\n });\n\n // ../../libs/ability-sdk/dist/src/lib/abilityHelpers/gasSponsorship/sponsored-gas-contract-call.js\n var require_sponsored_gas_contract_call = __commonJS({\n \"../../libs/ability-sdk/dist/src/lib/abilityHelpers/gasSponsorship/sponsored-gas-contract-call.js\"(exports3) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n Object.defineProperty(exports3, \"__esModule\", { value: true });\n exports3.sponsoredGasContractCall = void 0;\n var sponsored_gas_raw_transaction_1 = require_sponsored_gas_raw_transaction();\n var sponsoredGasContractCall = async ({ pkpPublicKey, abi: abi2, contractAddress, functionName, args, overrides = {}, chainId, eip7702AlchemyApiKey, eip7702AlchemyPolicyId }) => {\n const iface = new ethers.utils.Interface(abi2);\n const encodedData = iface.encodeFunctionData(functionName, args);\n console.log(\"Encoded data:\", encodedData);\n if (!eip7702AlchemyApiKey || !eip7702AlchemyPolicyId) {\n throw new Error(\"EIP7702 Alchemy API key and policy ID are required when using Alchemy for gas sponsorship\");\n }\n if (!chainId) {\n throw new Error(\"Chain ID is required when using Alchemy for gas sponsorship\");\n }\n const txValue = overrides.value ? BigInt(overrides.value.toString()) : 0n;\n return (0, sponsored_gas_raw_transaction_1.sponsoredGasRawTransaction)({\n pkpPublicKey,\n to: contractAddress,\n value: txValue.toString(),\n data: encodedData,\n chainId,\n eip7702AlchemyApiKey,\n eip7702AlchemyPolicyId\n });\n };\n exports3.sponsoredGasContractCall = sponsoredGasContractCall;\n }\n });\n\n // ../../libs/ability-sdk/dist/src/lib/abilityHelpers/gasSponsorship/index.js\n var require_gasSponsorship = __commonJS({\n \"../../libs/ability-sdk/dist/src/lib/abilityHelpers/gasSponsorship/index.js\"(exports3) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n Object.defineProperty(exports3, \"__esModule\", { value: true });\n exports3.sponsoredGasContractCall = exports3.sponsoredGasRawTransaction = void 0;\n var sponsored_gas_raw_transaction_1 = require_sponsored_gas_raw_transaction();\n Object.defineProperty(exports3, \"sponsoredGasRawTransaction\", { enumerable: true, get: function() {\n return sponsored_gas_raw_transaction_1.sponsoredGasRawTransaction;\n } });\n var sponsored_gas_contract_call_1 = require_sponsored_gas_contract_call();\n Object.defineProperty(exports3, \"sponsoredGasContractCall\", { enumerable: true, get: function() {\n return sponsored_gas_contract_call_1.sponsoredGasContractCall;\n } });\n }\n });\n\n // ../../libs/ability-sdk/dist/src/lib/abilityHelpers/erc20-abi.js\n var require_erc20_abi = __commonJS({\n \"../../libs/ability-sdk/dist/src/lib/abilityHelpers/erc20-abi.js\"(exports3) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n Object.defineProperty(exports3, \"__esModule\", { value: true });\n exports3.ERC20_ABI = void 0;\n exports3.ERC20_ABI = [\n {\n inputs: [],\n name: \"name\",\n outputs: [{ internalType: \"string\", name: \"\", type: \"string\" }],\n stateMutability: \"view\",\n type: \"function\"\n },\n {\n inputs: [],\n name: \"symbol\",\n outputs: [{ internalType: \"string\", name: \"\", type: \"string\" }],\n stateMutability: \"view\",\n type: \"function\"\n },\n {\n inputs: [],\n name: \"decimals\",\n outputs: [{ internalType: \"uint8\", name: \"\", type: \"uint8\" }],\n stateMutability: \"view\",\n type: \"function\"\n },\n {\n inputs: [],\n name: \"totalSupply\",\n outputs: [{ internalType: \"uint256\", name: \"\", type: \"uint256\" }],\n stateMutability: \"view\",\n type: \"function\"\n },\n {\n inputs: [{ internalType: \"address\", name: \"account\", type: \"address\" }],\n name: \"balanceOf\",\n outputs: [{ internalType: \"uint256\", name: \"\", type: \"uint256\" }],\n stateMutability: \"view\",\n type: \"function\"\n },\n {\n inputs: [\n { internalType: \"address\", name: \"to\", type: \"address\" },\n { internalType: \"uint256\", name: \"value\", type: \"uint256\" }\n ],\n name: \"transfer\",\n outputs: [{ internalType: \"bool\", name: \"\", type: \"bool\" }],\n stateMutability: \"nonpayable\",\n type: \"function\"\n },\n {\n inputs: [\n { internalType: \"address\", name: \"owner\", type: \"address\" },\n { internalType: \"address\", name: \"spender\", type: \"address\" }\n ],\n name: \"allowance\",\n outputs: [{ internalType: \"uint256\", name: \"\", type: \"uint256\" }],\n stateMutability: \"view\",\n type: \"function\"\n },\n {\n inputs: [\n { internalType: \"address\", name: \"spender\", type: \"address\" },\n { internalType: \"uint256\", name: \"value\", type: \"uint256\" }\n ],\n name: \"approve\",\n outputs: [{ internalType: \"bool\", name: \"\", type: \"bool\" }],\n stateMutability: \"nonpayable\",\n type: \"function\"\n },\n {\n inputs: [\n { internalType: \"address\", name: \"from\", type: \"address\" },\n { internalType: \"address\", name: \"to\", type: \"address\" },\n { internalType: \"uint256\", name: \"value\", type: \"uint256\" }\n ],\n name: \"transferFrom\",\n outputs: [{ internalType: \"bool\", name: \"\", type: \"bool\" }],\n stateMutability: \"nonpayable\",\n type: \"function\"\n },\n {\n inputs: [\n { internalType: \"address\", name: \"spender\", type: \"address\" },\n { internalType: \"uint256\", name: \"addedValue\", type: \"uint256\" }\n ],\n name: \"increaseAllowance\",\n outputs: [{ internalType: \"bool\", name: \"\", type: \"bool\" }],\n stateMutability: \"nonpayable\",\n type: \"function\"\n },\n {\n inputs: [\n { internalType: \"address\", name: \"spender\", type: \"address\" },\n { internalType: \"uint256\", name: \"subtractedValue\", type: \"uint256\" }\n ],\n name: \"decreaseAllowance\",\n outputs: [{ internalType: \"bool\", name: \"\", type: \"bool\" }],\n stateMutability: \"nonpayable\",\n type: \"function\"\n },\n {\n anonymous: false,\n inputs: [\n { indexed: true, internalType: \"address\", name: \"from\", type: \"address\" },\n { indexed: true, internalType: \"address\", name: \"to\", type: \"address\" },\n { indexed: false, internalType: \"uint256\", name: \"value\", type: \"uint256\" }\n ],\n name: \"Transfer\",\n type: \"event\"\n },\n {\n anonymous: false,\n inputs: [\n { indexed: true, internalType: \"address\", name: \"owner\", type: \"address\" },\n { indexed: true, internalType: \"address\", name: \"spender\", type: \"address\" },\n { indexed: false, internalType: \"uint256\", name: \"value\", type: \"uint256\" }\n ],\n name: \"Approval\",\n type: \"event\"\n }\n ];\n }\n });\n\n // ../../libs/ability-sdk/dist/src/lib/abilityHelpers/bigint-replace.js\n var require_bigint_replace = __commonJS({\n \"../../libs/ability-sdk/dist/src/lib/abilityHelpers/bigint-replace.js\"(exports3) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n Object.defineProperty(exports3, \"__esModule\", { value: true });\n exports3.bigIntReplacer = void 0;\n var bigIntReplacer9 = (key, value) => {\n return typeof value === \"bigint\" ? value.toString() : value;\n };\n exports3.bigIntReplacer = bigIntReplacer9;\n }\n });\n\n // ../../libs/ability-sdk/dist/src/lib/abilityHelpers/index.js\n var require_abilityHelpers = __commonJS({\n \"../../libs/ability-sdk/dist/src/lib/abilityHelpers/index.js\"(exports3) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n Object.defineProperty(exports3, \"__esModule\", { value: true });\n exports3.bigIntReplacer = exports3.ERC20_ABI = exports3.sponsoredGasContractCall = exports3.sponsoredGasRawTransaction = exports3.populateTransaction = void 0;\n var populateTransaction_1 = require_populateTransaction();\n Object.defineProperty(exports3, \"populateTransaction\", { enumerable: true, get: function() {\n return populateTransaction_1.populateTransaction;\n } });\n var gasSponsorship_1 = require_gasSponsorship();\n Object.defineProperty(exports3, \"sponsoredGasRawTransaction\", { enumerable: true, get: function() {\n return gasSponsorship_1.sponsoredGasRawTransaction;\n } });\n Object.defineProperty(exports3, \"sponsoredGasContractCall\", { enumerable: true, get: function() {\n return gasSponsorship_1.sponsoredGasContractCall;\n } });\n var erc20_abi_1 = require_erc20_abi();\n Object.defineProperty(exports3, \"ERC20_ABI\", { enumerable: true, get: function() {\n return erc20_abi_1.ERC20_ABI;\n } });\n var bigint_replace_1 = require_bigint_replace();\n Object.defineProperty(exports3, \"bigIntReplacer\", { enumerable: true, get: function() {\n return bigint_replace_1.bigIntReplacer;\n } });\n }\n });\n\n // ../../libs/ability-sdk/dist/src/index.js\n var require_src2 = __commonJS({\n \"../../libs/ability-sdk/dist/src/index.js\"(exports3) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n Object.defineProperty(exports3, \"__esModule\", { value: true });\n exports3.bigIntReplacer = exports3.ERC20_ABI = exports3.sponsoredGasContractCall = exports3.sponsoredGasRawTransaction = exports3.populateTransaction = exports3.supportedPoliciesForAbility = exports3.asBundledVincentPolicy = exports3.asBundledVincentAbility = exports3.vincentAbilityHandler = exports3.vincentPolicyHandler = exports3.VINCENT_TOOL_API_VERSION = exports3.createVincentAbility = exports3.createVincentAbilityPolicy = exports3.createVincentPolicy = void 0;\n var vincentPolicy_1 = require_vincentPolicy();\n Object.defineProperty(exports3, \"createVincentPolicy\", { enumerable: true, get: function() {\n return vincentPolicy_1.createVincentPolicy;\n } });\n Object.defineProperty(exports3, \"createVincentAbilityPolicy\", { enumerable: true, get: function() {\n return vincentPolicy_1.createVincentAbilityPolicy;\n } });\n var vincentAbility_1 = require_vincentAbility();\n Object.defineProperty(exports3, \"createVincentAbility\", { enumerable: true, get: function() {\n return vincentAbility_1.createVincentAbility;\n } });\n var constants_1 = require_constants2();\n Object.defineProperty(exports3, \"VINCENT_TOOL_API_VERSION\", { enumerable: true, get: function() {\n return constants_1.VINCENT_TOOL_API_VERSION;\n } });\n var vincentPolicyHandler_1 = require_vincentPolicyHandler();\n Object.defineProperty(exports3, \"vincentPolicyHandler\", { enumerable: true, get: function() {\n return vincentPolicyHandler_1.vincentPolicyHandler;\n } });\n var vincentAbilityHandler_1 = require_vincentAbilityHandler();\n Object.defineProperty(exports3, \"vincentAbilityHandler\", { enumerable: true, get: function() {\n return vincentAbilityHandler_1.vincentAbilityHandler;\n } });\n var bundledAbility_1 = require_bundledAbility();\n Object.defineProperty(exports3, \"asBundledVincentAbility\", { enumerable: true, get: function() {\n return bundledAbility_1.asBundledVincentAbility;\n } });\n var bundledPolicy_1 = require_bundledPolicy();\n Object.defineProperty(exports3, \"asBundledVincentPolicy\", { enumerable: true, get: function() {\n return bundledPolicy_1.asBundledVincentPolicy;\n } });\n var supportedPoliciesForAbility_1 = require_supportedPoliciesForAbility();\n Object.defineProperty(exports3, \"supportedPoliciesForAbility\", { enumerable: true, get: function() {\n return supportedPoliciesForAbility_1.supportedPoliciesForAbility;\n } });\n var abilityHelpers_1 = require_abilityHelpers();\n Object.defineProperty(exports3, \"populateTransaction\", { enumerable: true, get: function() {\n return abilityHelpers_1.populateTransaction;\n } });\n Object.defineProperty(exports3, \"sponsoredGasRawTransaction\", { enumerable: true, get: function() {\n return abilityHelpers_1.sponsoredGasRawTransaction;\n } });\n Object.defineProperty(exports3, \"sponsoredGasContractCall\", { enumerable: true, get: function() {\n return abilityHelpers_1.sponsoredGasContractCall;\n } });\n Object.defineProperty(exports3, \"ERC20_ABI\", { enumerable: true, get: function() {\n return abilityHelpers_1.ERC20_ABI;\n } });\n Object.defineProperty(exports3, \"bigIntReplacer\", { enumerable: true, get: function() {\n return abilityHelpers_1.bigIntReplacer;\n } });\n }\n });\n\n // src/lib/lit-action.ts\n init_dirname();\n init_buffer2();\n init_process2();\n var import_vincent_ability_sdk11 = __toESM(require_src2());\n\n // src/lib/vincent-ability.ts\n init_dirname();\n init_buffer2();\n init_process2();\n var import_vincent_ability_sdk10 = __toESM(require_src2());\n var import_ethers14 = __toESM(require_lib32());\n\n // ../../../node_modules/.pnpm/@nktkas+hyperliquid@0.25.7_typescript@5.8.3/node_modules/@nktkas/hyperliquid/esm/src/mod.js\n init_dirname();\n init_buffer2();\n init_process2();\n\n // ../../../node_modules/.pnpm/@nktkas+hyperliquid@0.25.7_typescript@5.8.3/node_modules/@nktkas/hyperliquid/esm/src/_base.js\n init_dirname();\n init_buffer2();\n init_process2();\n var HyperliquidError = class extends Error {\n constructor(message, options) {\n super(message, options);\n this.name = \"HyperliquidError\";\n }\n };\n\n // ../../../node_modules/.pnpm/@nktkas+hyperliquid@0.25.7_typescript@5.8.3/node_modules/@nktkas/hyperliquid/esm/src/api/_base.js\n init_dirname();\n init_buffer2();\n init_process2();\n\n // ../../../node_modules/.pnpm/valibot@1.1.0_typescript@5.8.3/node_modules/valibot/dist/index.js\n init_dirname();\n init_buffer2();\n init_process2();\n var store;\n // @__NO_SIDE_EFFECTS__\n function getGlobalConfig(config2) {\n return {\n lang: config2?.lang ?? store?.lang,\n message: config2?.message,\n abortEarly: config2?.abortEarly ?? store?.abortEarly,\n abortPipeEarly: config2?.abortPipeEarly ?? store?.abortPipeEarly\n };\n }\n var store2;\n // @__NO_SIDE_EFFECTS__\n function getGlobalMessage(lang) {\n return store2?.get(lang);\n }\n var store3;\n // @__NO_SIDE_EFFECTS__\n function getSchemaMessage(lang) {\n return store3?.get(lang);\n }\n var store4;\n // @__NO_SIDE_EFFECTS__\n function getSpecificMessage(reference, lang) {\n return store4?.get(reference)?.get(lang);\n }\n // @__NO_SIDE_EFFECTS__\n function _stringify(input) {\n const type = typeof input;\n if (type === \"string\") {\n return `\"${input}\"`;\n }\n if (type === \"number\" || type === \"bigint\" || type === \"boolean\") {\n return `${input}`;\n }\n if (type === \"object\" || type === \"function\") {\n return (input && Object.getPrototypeOf(input)?.constructor?.name) ?? \"null\";\n }\n return type;\n }\n function _addIssue(context2, label, dataset, config2, other) {\n const input = other && \"input\" in other ? other.input : dataset.value;\n const expected = other?.expected ?? context2.expects ?? null;\n const received = other?.received ?? /* @__PURE__ */ _stringify(input);\n const issue = {\n kind: context2.kind,\n type: context2.type,\n input,\n expected,\n received,\n message: `Invalid ${label}: ${expected ? `Expected ${expected} but r` : \"R\"}eceived ${received}`,\n requirement: context2.requirement,\n path: other?.path,\n issues: other?.issues,\n lang: config2.lang,\n abortEarly: config2.abortEarly,\n abortPipeEarly: config2.abortPipeEarly\n };\n const isSchema = context2.kind === \"schema\";\n const message2 = other?.message ?? context2.message ?? /* @__PURE__ */ getSpecificMessage(context2.reference, issue.lang) ?? (isSchema ? /* @__PURE__ */ getSchemaMessage(issue.lang) : null) ?? config2.message ?? /* @__PURE__ */ getGlobalMessage(issue.lang);\n if (message2 !== void 0) {\n issue.message = typeof message2 === \"function\" ? (\n // @ts-expect-error\n message2(issue)\n ) : message2;\n }\n if (isSchema) {\n dataset.typed = false;\n }\n if (dataset.issues) {\n dataset.issues.push(issue);\n } else {\n dataset.issues = [issue];\n }\n }\n // @__NO_SIDE_EFFECTS__\n function _getStandardProps(context2) {\n return {\n version: 1,\n vendor: \"valibot\",\n validate(value2) {\n return context2[\"~run\"]({ value: value2 }, /* @__PURE__ */ getGlobalConfig());\n }\n };\n }\n // @__NO_SIDE_EFFECTS__\n function _joinExpects(values2, separator) {\n const list = [...new Set(values2)];\n if (list.length > 1) {\n return `(${list.join(` ${separator} `)})`;\n }\n return list[0] ?? \"never\";\n }\n // @__NO_SIDE_EFFECTS__\n function getDotPath(issue) {\n if (issue.path) {\n let key = \"\";\n for (const item of issue.path) {\n if (typeof item.key === \"string\" || typeof item.key === \"number\") {\n if (key) {\n key += `.${item.key}`;\n } else {\n key += item.key;\n }\n } else {\n return null;\n }\n }\n return key;\n }\n return null;\n }\n // @__NO_SIDE_EFFECTS__\n function description(description_) {\n return {\n kind: \"metadata\",\n type: \"description\",\n reference: description,\n description: description_\n };\n }\n // @__NO_SIDE_EFFECTS__\n function length(requirement, message2) {\n return {\n kind: \"validation\",\n type: \"length\",\n reference: length,\n async: false,\n expects: `${requirement}`,\n requirement,\n message: message2,\n \"~run\"(dataset, config2) {\n if (dataset.typed && dataset.value.length !== this.requirement) {\n _addIssue(this, \"length\", dataset, config2, {\n received: `${dataset.value.length}`\n });\n }\n return dataset;\n }\n };\n }\n // @__NO_SIDE_EFFECTS__\n function minValue(requirement, message2) {\n return {\n kind: \"validation\",\n type: \"min_value\",\n reference: minValue,\n async: false,\n expects: `>=${requirement instanceof Date ? requirement.toJSON() : /* @__PURE__ */ _stringify(requirement)}`,\n requirement,\n message: message2,\n \"~run\"(dataset, config2) {\n if (dataset.typed && !(dataset.value >= this.requirement)) {\n _addIssue(this, \"value\", dataset, config2, {\n received: dataset.value instanceof Date ? dataset.value.toJSON() : /* @__PURE__ */ _stringify(dataset.value)\n });\n }\n return dataset;\n }\n };\n }\n // @__NO_SIDE_EFFECTS__\n function regex(requirement, message2) {\n return {\n kind: \"validation\",\n type: \"regex\",\n reference: regex,\n async: false,\n expects: `${requirement}`,\n requirement,\n message: message2,\n \"~run\"(dataset, config2) {\n if (dataset.typed && !this.requirement.test(dataset.value)) {\n _addIssue(this, \"format\", dataset, config2);\n }\n return dataset;\n }\n };\n }\n // @__NO_SIDE_EFFECTS__\n function safeInteger(message2) {\n return {\n kind: \"validation\",\n type: \"safe_integer\",\n reference: safeInteger,\n async: false,\n expects: null,\n requirement: Number.isSafeInteger,\n message: message2,\n \"~run\"(dataset, config2) {\n if (dataset.typed && !this.requirement(dataset.value)) {\n _addIssue(this, \"safe integer\", dataset, config2);\n }\n return dataset;\n }\n };\n }\n // @__NO_SIDE_EFFECTS__\n function transform(operation) {\n return {\n kind: \"transformation\",\n type: \"transform\",\n reference: transform,\n async: false,\n operation,\n \"~run\"(dataset) {\n dataset.value = this.operation(dataset.value);\n return dataset;\n }\n };\n }\n // @__NO_SIDE_EFFECTS__\n function trim6() {\n return {\n kind: \"transformation\",\n type: \"trim\",\n reference: trim6,\n async: false,\n \"~run\"(dataset) {\n dataset.value = dataset.value.trim();\n return dataset;\n }\n };\n }\n // @__NO_SIDE_EFFECTS__\n function getFallback(schema, dataset, config2) {\n return typeof schema.fallback === \"function\" ? (\n // @ts-expect-error\n schema.fallback(dataset, config2)\n ) : (\n // @ts-expect-error\n schema.fallback\n );\n }\n // @__NO_SIDE_EFFECTS__\n function getDefault(schema, dataset, config2) {\n return typeof schema.default === \"function\" ? (\n // @ts-expect-error\n schema.default(dataset, config2)\n ) : (\n // @ts-expect-error\n schema.default\n );\n }\n // @__NO_SIDE_EFFECTS__\n function array(item, message2) {\n return {\n kind: \"schema\",\n type: \"array\",\n reference: array,\n expects: \"Array\",\n async: false,\n item,\n message: message2,\n get \"~standard\"() {\n return /* @__PURE__ */ _getStandardProps(this);\n },\n \"~run\"(dataset, config2) {\n const input = dataset.value;\n if (Array.isArray(input)) {\n dataset.typed = true;\n dataset.value = [];\n for (let key = 0; key < input.length; key++) {\n const value2 = input[key];\n const itemDataset = this.item[\"~run\"]({ value: value2 }, config2);\n if (itemDataset.issues) {\n const pathItem = {\n type: \"array\",\n origin: \"value\",\n input,\n key,\n value: value2\n };\n for (const issue of itemDataset.issues) {\n if (issue.path) {\n issue.path.unshift(pathItem);\n } else {\n issue.path = [pathItem];\n }\n dataset.issues?.push(issue);\n }\n if (!dataset.issues) {\n dataset.issues = itemDataset.issues;\n }\n if (config2.abortEarly) {\n dataset.typed = false;\n break;\n }\n }\n if (!itemDataset.typed) {\n dataset.typed = false;\n }\n dataset.value.push(itemDataset.value);\n }\n } else {\n _addIssue(this, \"type\", dataset, config2);\n }\n return dataset;\n }\n };\n }\n // @__NO_SIDE_EFFECTS__\n function boolean(message2) {\n return {\n kind: \"schema\",\n type: \"boolean\",\n reference: boolean,\n expects: \"boolean\",\n async: false,\n message: message2,\n get \"~standard\"() {\n return /* @__PURE__ */ _getStandardProps(this);\n },\n \"~run\"(dataset, config2) {\n if (typeof dataset.value === \"boolean\") {\n dataset.typed = true;\n } else {\n _addIssue(this, \"type\", dataset, config2);\n }\n return dataset;\n }\n };\n }\n // @__NO_SIDE_EFFECTS__\n function literal(literal_, message2) {\n return {\n kind: \"schema\",\n type: \"literal\",\n reference: literal,\n expects: /* @__PURE__ */ _stringify(literal_),\n async: false,\n literal: literal_,\n message: message2,\n get \"~standard\"() {\n return /* @__PURE__ */ _getStandardProps(this);\n },\n \"~run\"(dataset, config2) {\n if (dataset.value === this.literal) {\n dataset.typed = true;\n } else {\n _addIssue(this, \"type\", dataset, config2);\n }\n return dataset;\n }\n };\n }\n // @__NO_SIDE_EFFECTS__\n function nullish(wrapped, default_) {\n return {\n kind: \"schema\",\n type: \"nullish\",\n reference: nullish,\n expects: `(${wrapped.expects} | null | undefined)`,\n async: false,\n wrapped,\n default: default_,\n get \"~standard\"() {\n return /* @__PURE__ */ _getStandardProps(this);\n },\n \"~run\"(dataset, config2) {\n if (dataset.value === null || dataset.value === void 0) {\n if (this.default !== void 0) {\n dataset.value = /* @__PURE__ */ getDefault(this, dataset, config2);\n }\n if (dataset.value === null || dataset.value === void 0) {\n dataset.typed = true;\n return dataset;\n }\n }\n return this.wrapped[\"~run\"](dataset, config2);\n }\n };\n }\n // @__NO_SIDE_EFFECTS__\n function number(message2) {\n return {\n kind: \"schema\",\n type: \"number\",\n reference: number,\n expects: \"number\",\n async: false,\n message: message2,\n get \"~standard\"() {\n return /* @__PURE__ */ _getStandardProps(this);\n },\n \"~run\"(dataset, config2) {\n if (typeof dataset.value === \"number\" && !isNaN(dataset.value)) {\n dataset.typed = true;\n } else {\n _addIssue(this, \"type\", dataset, config2);\n }\n return dataset;\n }\n };\n }\n // @__NO_SIDE_EFFECTS__\n function object(entries2, message2) {\n return {\n kind: \"schema\",\n type: \"object\",\n reference: object,\n expects: \"Object\",\n async: false,\n entries: entries2,\n message: message2,\n get \"~standard\"() {\n return /* @__PURE__ */ _getStandardProps(this);\n },\n \"~run\"(dataset, config2) {\n const input = dataset.value;\n if (input && typeof input === \"object\") {\n dataset.typed = true;\n dataset.value = {};\n for (const key in this.entries) {\n const valueSchema = this.entries[key];\n if (key in input || (valueSchema.type === \"exact_optional\" || valueSchema.type === \"optional\" || valueSchema.type === \"nullish\") && // @ts-expect-error\n valueSchema.default !== void 0) {\n const value2 = key in input ? (\n // @ts-expect-error\n input[key]\n ) : /* @__PURE__ */ getDefault(valueSchema);\n const valueDataset = valueSchema[\"~run\"]({ value: value2 }, config2);\n if (valueDataset.issues) {\n const pathItem = {\n type: \"object\",\n origin: \"value\",\n input,\n key,\n value: value2\n };\n for (const issue of valueDataset.issues) {\n if (issue.path) {\n issue.path.unshift(pathItem);\n } else {\n issue.path = [pathItem];\n }\n dataset.issues?.push(issue);\n }\n if (!dataset.issues) {\n dataset.issues = valueDataset.issues;\n }\n if (config2.abortEarly) {\n dataset.typed = false;\n break;\n }\n }\n if (!valueDataset.typed) {\n dataset.typed = false;\n }\n dataset.value[key] = valueDataset.value;\n } else if (valueSchema.fallback !== void 0) {\n dataset.value[key] = /* @__PURE__ */ getFallback(valueSchema);\n } else if (valueSchema.type !== \"exact_optional\" && valueSchema.type !== \"optional\" && valueSchema.type !== \"nullish\") {\n _addIssue(this, \"key\", dataset, config2, {\n input: void 0,\n expected: `\"${key}\"`,\n path: [\n {\n type: \"object\",\n origin: \"key\",\n input,\n key,\n // @ts-expect-error\n value: input[key]\n }\n ]\n });\n if (config2.abortEarly) {\n break;\n }\n }\n }\n } else {\n _addIssue(this, \"type\", dataset, config2);\n }\n return dataset;\n }\n };\n }\n // @__NO_SIDE_EFFECTS__\n function optional(wrapped, default_) {\n return {\n kind: \"schema\",\n type: \"optional\",\n reference: optional,\n expects: `(${wrapped.expects} | undefined)`,\n async: false,\n wrapped,\n default: default_,\n get \"~standard\"() {\n return /* @__PURE__ */ _getStandardProps(this);\n },\n \"~run\"(dataset, config2) {\n if (dataset.value === void 0) {\n if (this.default !== void 0) {\n dataset.value = /* @__PURE__ */ getDefault(this, dataset, config2);\n }\n if (dataset.value === void 0) {\n dataset.typed = true;\n return dataset;\n }\n }\n return this.wrapped[\"~run\"](dataset, config2);\n }\n };\n }\n // @__NO_SIDE_EFFECTS__\n function string(message2) {\n return {\n kind: \"schema\",\n type: \"string\",\n reference: string,\n expects: \"string\",\n async: false,\n message: message2,\n get \"~standard\"() {\n return /* @__PURE__ */ _getStandardProps(this);\n },\n \"~run\"(dataset, config2) {\n if (typeof dataset.value === \"string\") {\n dataset.typed = true;\n } else {\n _addIssue(this, \"type\", dataset, config2);\n }\n return dataset;\n }\n };\n }\n // @__NO_SIDE_EFFECTS__\n function _subIssues(datasets) {\n let issues;\n if (datasets) {\n for (const dataset of datasets) {\n if (issues) {\n issues.push(...dataset.issues);\n } else {\n issues = dataset.issues;\n }\n }\n }\n return issues;\n }\n // @__NO_SIDE_EFFECTS__\n function union(options, message2) {\n return {\n kind: \"schema\",\n type: \"union\",\n reference: union,\n expects: /* @__PURE__ */ _joinExpects(\n options.map((option) => option.expects),\n \"|\"\n ),\n async: false,\n options,\n message: message2,\n get \"~standard\"() {\n return /* @__PURE__ */ _getStandardProps(this);\n },\n \"~run\"(dataset, config2) {\n let validDataset;\n let typedDatasets;\n let untypedDatasets;\n for (const schema of this.options) {\n const optionDataset = schema[\"~run\"]({ value: dataset.value }, config2);\n if (optionDataset.typed) {\n if (optionDataset.issues) {\n if (typedDatasets) {\n typedDatasets.push(optionDataset);\n } else {\n typedDatasets = [optionDataset];\n }\n } else {\n validDataset = optionDataset;\n break;\n }\n } else {\n if (untypedDatasets) {\n untypedDatasets.push(optionDataset);\n } else {\n untypedDatasets = [optionDataset];\n }\n }\n }\n if (validDataset) {\n return validDataset;\n }\n if (typedDatasets) {\n if (typedDatasets.length === 1) {\n return typedDatasets[0];\n }\n _addIssue(this, \"type\", dataset, config2, {\n issues: /* @__PURE__ */ _subIssues(typedDatasets)\n });\n dataset.typed = true;\n } else if (untypedDatasets?.length === 1) {\n return untypedDatasets[0];\n } else {\n _addIssue(this, \"type\", dataset, config2, {\n issues: /* @__PURE__ */ _subIssues(untypedDatasets)\n });\n }\n return dataset;\n }\n };\n }\n // @__NO_SIDE_EFFECTS__\n function pipe(...pipe2) {\n return {\n ...pipe2[0],\n pipe: pipe2,\n get \"~standard\"() {\n return /* @__PURE__ */ _getStandardProps(this);\n },\n \"~run\"(dataset, config2) {\n for (const item of pipe2) {\n if (item.kind !== \"metadata\") {\n if (dataset.issues && (item.kind === \"schema\" || item.kind === \"transformation\")) {\n dataset.typed = false;\n break;\n }\n if (!dataset.issues || !config2.abortEarly && !config2.abortPipeEarly) {\n dataset = item[\"~run\"](dataset, config2);\n }\n }\n }\n return dataset;\n }\n };\n }\n // @__NO_SIDE_EFFECTS__\n function safeParse(schema, input, config2) {\n const dataset = schema[\"~run\"]({ value: input }, /* @__PURE__ */ getGlobalConfig(config2));\n return {\n typed: dataset.typed,\n success: !dataset.issues,\n output: dataset.value,\n issues: dataset.issues\n };\n }\n // @__NO_SIDE_EFFECTS__\n function safeParser(schema, config2) {\n const func = (input) => /* @__PURE__ */ safeParse(schema, input, config2);\n func.schema = schema;\n func.config = config2;\n return func;\n }\n // @__NO_SIDE_EFFECTS__\n function summarize(issues) {\n let summary = \"\";\n for (const issue of issues) {\n if (summary) {\n summary += \"\\n\";\n }\n summary += `\\xD7 ${issue.message}`;\n const dotPath = /* @__PURE__ */ getDotPath(issue);\n if (dotPath) {\n summary += `\n \\u2192 at ${dotPath}`;\n }\n }\n return summary;\n }\n\n // ../../../node_modules/.pnpm/@nktkas+hyperliquid@0.25.7_typescript@5.8.3/node_modules/@nktkas/hyperliquid/esm/src/api/_base.js\n var UnsignedDecimal = /* @__PURE__ */ (() => {\n return pipe(union([string(), number()]), transform(String), trim6(), regex(/^[0-9]+(\\.[0-9]+)?$/), transform((value) => formatDecimal(value)));\n })();\n var Integer = /* @__PURE__ */ (() => {\n return pipe(union([string(), number()]), transform(Number), safeInteger());\n })();\n var UnsignedInteger = /* @__PURE__ */ (() => {\n return pipe(union([string(), number()]), transform(Number), safeInteger(), minValue(0));\n })();\n var Hex = /* @__PURE__ */ (() => {\n return pipe(string(), regex(/^0[xX][0-9a-fA-F]+$/), transform((value) => value.toLowerCase()));\n })();\n var Address = /* @__PURE__ */ (() => {\n return pipe(Hex, length(42));\n })();\n var TokenId = /* @__PURE__ */ (() => {\n return pipe(string(), regex(/^[^:]+:0x[0-9a-fA-F]+$/), transform((value) => value));\n })();\n function formatDecimal(numStr) {\n return numStr.trim().replace(/^(-?)0+(?=\\d)/, \"$1\").replace(/(\\.\\d*?)0+$/, \"$1\").replace(/\\.$/, \"\");\n }\n var SchemaError = class extends HyperliquidError {\n constructor(message) {\n super(message);\n this.name = \"SchemaError\";\n }\n };\n function parser(schema) {\n const safeParser2 = safeParser(schema);\n const parser2 = (input) => {\n const result = safeParser2(input);\n if (result.issues)\n throw new SchemaError(\"\\n\" + summarize(result.issues));\n return result.output;\n };\n parser2.schema = schema;\n parser2.config = void 0;\n return parser2;\n }\n\n // ../../../node_modules/.pnpm/@nktkas+hyperliquid@0.25.7_typescript@5.8.3/node_modules/@nktkas/hyperliquid/esm/src/transport/base.js\n init_dirname();\n init_buffer2();\n init_process2();\n var TransportError = class extends HyperliquidError {\n constructor(message, options) {\n super(message, options);\n this.name = \"TransportError\";\n }\n };\n\n // ../../../node_modules/.pnpm/@nktkas+hyperliquid@0.25.7_typescript@5.8.3/node_modules/@nktkas/hyperliquid/esm/src/transport/http/mod.js\n init_dirname();\n init_buffer2();\n init_process2();\n\n // ../../../node_modules/.pnpm/@nktkas+hyperliquid@0.25.7_typescript@5.8.3/node_modules/@nktkas/hyperliquid/esm/src/transport/_polyfills.js\n init_dirname();\n init_buffer2();\n init_process2();\n var AbortSignal_ = /* @__PURE__ */ (() => {\n return {\n any: AbortSignal.any ? (signals) => AbortSignal.any(signals) : (signals) => {\n const controller = new AbortController();\n for (const signal of signals) {\n if (signal.aborted) {\n controller.abort(signal.reason);\n return controller.signal;\n }\n signal.addEventListener(\"abort\", () => {\n controller.abort(signal.reason);\n }, { once: true, signal: controller.signal });\n }\n return controller.signal;\n },\n timeout: AbortSignal.timeout ? (ms) => AbortSignal.timeout(ms) : (ms) => {\n const controller = new AbortController();\n setTimeout(() => controller.abort(new Error(\"Signal timed out\")), ms);\n return controller.signal;\n }\n };\n })();\n\n // ../../../node_modules/.pnpm/@nktkas+hyperliquid@0.25.7_typescript@5.8.3/node_modules/@nktkas/hyperliquid/esm/src/transport/http/mod.js\n var HttpRequestError2 = class extends TransportError {\n response;\n body;\n constructor(args, options) {\n const { response, body } = args ?? {};\n let message;\n if (response) {\n message = `${response.status} ${response.statusText}`.trim();\n if (body)\n message += ` - ${body}`;\n } else {\n message = `Unknown error while making an HTTP request: ${options?.cause}`;\n }\n super(message, options);\n this.name = \"HttpRequestError\";\n this.response = response;\n this.body = body;\n }\n };\n var HttpTransport = class {\n isTestnet;\n timeout;\n server;\n fetchOptions;\n onRequest;\n onResponse;\n onError;\n /**\n * Creates a new HTTP transport instance.\n * @param options - Configuration options for the HTTP transport layer.\n */\n constructor(options) {\n this.isTestnet = options?.isTestnet ?? false;\n this.timeout = options?.timeout === void 0 ? 1e4 : options.timeout;\n this.server = {\n mainnet: {\n api: options?.server?.mainnet?.api ?? \"https://api.hyperliquid.xyz\",\n rpc: options?.server?.mainnet?.rpc ?? \"https://rpc.hyperliquid.xyz\"\n },\n testnet: {\n api: options?.server?.testnet?.api ?? \"https://api.hyperliquid-testnet.xyz\",\n rpc: options?.server?.testnet?.rpc ?? \"https://rpc.hyperliquid-testnet.xyz\"\n }\n };\n this.fetchOptions = options?.fetchOptions ?? {};\n this.onRequest = options?.onRequest;\n this.onResponse = options?.onResponse;\n this.onError = options?.onError;\n }\n /**\n * Sends a request to the Hyperliquid API via fetch.\n * @param endpoint - The API endpoint to send the request to.\n * @param payload - The payload to send with the request.\n * @param signal - An [`AbortSignal`](https://developer.mozilla.org/en-US/docs/Web/API/AbortSignal) can be used to cancel the request by calling [`abort()`](https://developer.mozilla.org/en-US/docs/Web/API/AbortController/abort) on the corresponding [`AbortController`](https://developer.mozilla.org/en-US/docs/Web/API/AbortController).\n * @returns A promise that resolves with parsed JSON response body.\n *\n * @throws {HttpRequestError} Thrown when the HTTP request fails.\n */\n async request(endpoint, payload, signal) {\n try {\n const url = new URL(endpoint, this.server[this.isTestnet ? \"testnet\" : \"mainnet\"][endpoint === \"explorer\" ? \"rpc\" : \"api\"]);\n const init = mergeRequestInit({\n body: JSON.stringify(payload),\n headers: {\n \"Accept-Encoding\": \"gzip, deflate, br, zstd\",\n \"Content-Type\": \"application/json\"\n },\n keepalive: true,\n method: \"POST\",\n signal: this.timeout ? AbortSignal_.timeout(this.timeout) : void 0\n }, this.fetchOptions, { signal });\n let request = new Request(url, init);\n if (this.onRequest) {\n const customRequest = await this.onRequest(request);\n if (customRequest instanceof Request)\n request = customRequest;\n }\n let response = await fetch(request).catch(async (error) => {\n if (this.onError) {\n const customError = await this.onError(error);\n if (customError instanceof Error)\n error = customError;\n }\n throw error;\n });\n if (this.onResponse) {\n const customResponse = await this.onResponse(response);\n if (customResponse instanceof Response)\n response = customResponse;\n }\n if (!response.ok || !response.headers.get(\"Content-Type\")?.includes(\"application/json\")) {\n const body2 = await response.text().catch(() => void 0);\n throw new HttpRequestError2({ response, body: body2 });\n }\n const body = await response.json();\n if (body?.type === \"error\") {\n throw new HttpRequestError2({ response, body: body?.message });\n }\n return body;\n } catch (error) {\n if (error instanceof TransportError)\n throw error;\n throw new HttpRequestError2(void 0, { cause: error });\n }\n }\n };\n function mergeHeadersInit(...inits) {\n if (inits.length === 0 || inits.length === 1) {\n return new Headers(inits[0]);\n }\n const merged = new Headers();\n for (const headers of inits) {\n const iterator = Symbol.iterator in headers ? headers : Object.entries(headers);\n for (const [key, value] of iterator) {\n merged.set(key, value);\n }\n }\n return merged;\n }\n function mergeRequestInit(...inits) {\n const merged = inits.reduce((acc, init) => ({ ...acc, ...init }), {});\n const headersList = inits.map((init) => init.headers).filter((headers) => typeof headers === \"object\");\n if (headersList.length > 0) {\n merged.headers = mergeHeadersInit(...headersList);\n }\n const signals = inits.map((init) => init.signal).filter((signal) => signal instanceof AbortSignal);\n if (signals.length > 0) {\n merged.signal = signals.length > 1 ? AbortSignal_.any(signals) : signals[0];\n }\n return merged;\n }\n\n // ../../../node_modules/.pnpm/@nktkas+hyperliquid@0.25.7_typescript@5.8.3/node_modules/@nktkas/hyperliquid/esm/src/transport/websocket/mod.js\n init_dirname();\n init_buffer2();\n init_process2();\n\n // ../../../node_modules/.pnpm/@nktkas+hyperliquid@0.25.7_typescript@5.8.3/node_modules/@nktkas/hyperliquid/esm/src/transport/websocket/_reconnecting_websocket.js\n init_dirname();\n init_buffer2();\n init_process2();\n\n // ../../../node_modules/.pnpm/@nktkas+hyperliquid@0.25.7_typescript@5.8.3/node_modules/@nktkas/hyperliquid/esm/src/transport/websocket/_hyperliquid_event_target.js\n init_dirname();\n init_buffer2();\n init_process2();\n\n // ../../../node_modules/.pnpm/typescript-event-target@1.1.1/node_modules/typescript-event-target/dist/index.mjs\n init_dirname();\n init_buffer2();\n init_process2();\n\n // ../../../node_modules/.pnpm/@nktkas+hyperliquid@0.25.7_typescript@5.8.3/node_modules/@nktkas/hyperliquid/esm/src/transport/websocket/_websocket_async_request.js\n init_dirname();\n init_buffer2();\n init_process2();\n\n // ../../../node_modules/.pnpm/@nktkas+hyperliquid@0.25.7_typescript@5.8.3/node_modules/@nktkas/hyperliquid/esm/src/api/exchange/~client.js\n init_dirname();\n init_buffer2();\n init_process2();\n\n // ../../../node_modules/.pnpm/@nktkas+hyperliquid@0.25.7_typescript@5.8.3/node_modules/@nktkas/hyperliquid/esm/src/utils/_minimalEIP712Signer.js\n init_dirname();\n init_buffer2();\n init_process2();\n\n // ../../../node_modules/.pnpm/@noble+hashes@2.0.1/node_modules/@noble/hashes/sha3.js\n init_dirname();\n init_buffer2();\n init_process2();\n\n // ../../../node_modules/.pnpm/@noble+hashes@2.0.1/node_modules/@noble/hashes/_u64.js\n init_dirname();\n init_buffer2();\n init_process2();\n var U32_MASK642 = /* @__PURE__ */ BigInt(2 ** 32 - 1);\n var _32n2 = /* @__PURE__ */ BigInt(32);\n function fromBig2(n2, le = false) {\n if (le)\n return { h: Number(n2 & U32_MASK642), l: Number(n2 >> _32n2 & U32_MASK642) };\n return { h: Number(n2 >> _32n2 & U32_MASK642) | 0, l: Number(n2 & U32_MASK642) | 0 };\n }\n function split3(lst, le = false) {\n const len = lst.length;\n let Ah = new Uint32Array(len);\n let Al = new Uint32Array(len);\n for (let i3 = 0; i3 < len; i3++) {\n const { h: h4, l: l6 } = fromBig2(lst[i3], le);\n [Ah[i3], Al[i3]] = [h4, l6];\n }\n return [Ah, Al];\n }\n var rotlSH2 = (h4, l6, s4) => h4 << s4 | l6 >>> 32 - s4;\n var rotlSL2 = (h4, l6, s4) => l6 << s4 | h4 >>> 32 - s4;\n var rotlBH2 = (h4, l6, s4) => l6 << s4 - 32 | h4 >>> 64 - s4;\n var rotlBL2 = (h4, l6, s4) => h4 << s4 - 32 | l6 >>> 64 - s4;\n\n // ../../../node_modules/.pnpm/@noble+hashes@2.0.1/node_modules/@noble/hashes/utils.js\n init_dirname();\n init_buffer2();\n init_process2();\n function isBytes5(a3) {\n return a3 instanceof Uint8Array || ArrayBuffer.isView(a3) && a3.constructor.name === \"Uint8Array\";\n }\n function anumber3(n2, title2 = \"\") {\n if (!Number.isSafeInteger(n2) || n2 < 0) {\n const prefix = title2 && `\"${title2}\" `;\n throw new Error(`${prefix}expected integer >= 0, got ${n2}`);\n }\n }\n function abytes3(value, length2, title2 = \"\") {\n const bytes = isBytes5(value);\n const len = value?.length;\n const needsLen = length2 !== void 0;\n if (!bytes || needsLen && len !== length2) {\n const prefix = title2 && `\"${title2}\" `;\n const ofLen = needsLen ? ` of length ${length2}` : \"\";\n const got = bytes ? `length=${len}` : `type=${typeof value}`;\n throw new Error(prefix + \"expected Uint8Array\" + ofLen + \", got \" + got);\n }\n return value;\n }\n function aexists2(instance, checkFinished = true) {\n if (instance.destroyed)\n throw new Error(\"Hash instance has been destroyed\");\n if (checkFinished && instance.finished)\n throw new Error(\"Hash#digest() has already been called\");\n }\n function aoutput2(out, instance) {\n abytes3(out, void 0, \"digestInto() output\");\n const min = instance.outputLen;\n if (out.length < min) {\n throw new Error('\"digestInto() output\" expected to be of length >=' + min);\n }\n }\n function u322(arr) {\n return new Uint32Array(arr.buffer, arr.byteOffset, Math.floor(arr.byteLength / 4));\n }\n function clean2(...arrays) {\n for (let i3 = 0; i3 < arrays.length; i3++) {\n arrays[i3].fill(0);\n }\n }\n var isLE2 = /* @__PURE__ */ (() => new Uint8Array(new Uint32Array([287454020]).buffer)[0] === 68)();\n function byteSwap2(word) {\n return word << 24 & 4278190080 | word << 8 & 16711680 | word >>> 8 & 65280 | word >>> 24 & 255;\n }\n function byteSwap322(arr) {\n for (let i3 = 0; i3 < arr.length; i3++) {\n arr[i3] = byteSwap2(arr[i3]);\n }\n return arr;\n }\n var swap32IfBE2 = isLE2 ? (u2) => u2 : byteSwap322;\n var hasHexBuiltin3 = /* @__PURE__ */ (() => (\n // @ts-ignore\n typeof Uint8Array.from([]).toHex === \"function\" && typeof Uint8Array.fromHex === \"function\"\n ))();\n var hexes6 = /* @__PURE__ */ Array.from({ length: 256 }, (_2, i3) => i3.toString(16).padStart(2, \"0\"));\n function bytesToHex5(bytes) {\n abytes3(bytes);\n if (hasHexBuiltin3)\n return bytes.toHex();\n let hex = \"\";\n for (let i3 = 0; i3 < bytes.length; i3++) {\n hex += hexes6[bytes[i3]];\n }\n return hex;\n }\n var asciis3 = { _0: 48, _9: 57, A: 65, F: 70, a: 97, f: 102 };\n function asciiToBase163(ch) {\n if (ch >= asciis3._0 && ch <= asciis3._9)\n return ch - asciis3._0;\n if (ch >= asciis3.A && ch <= asciis3.F)\n return ch - (asciis3.A - 10);\n if (ch >= asciis3.a && ch <= asciis3.f)\n return ch - (asciis3.a - 10);\n return;\n }\n function hexToBytes5(hex) {\n if (typeof hex !== \"string\")\n throw new Error(\"hex string expected, got \" + typeof hex);\n if (hasHexBuiltin3)\n return Uint8Array.fromHex(hex);\n const hl = hex.length;\n const al = hl / 2;\n if (hl % 2)\n throw new Error(\"hex string expected, got unpadded hex of length \" + hl);\n const array2 = new Uint8Array(al);\n for (let ai = 0, hi = 0; ai < al; ai++, hi += 2) {\n const n1 = asciiToBase163(hex.charCodeAt(hi));\n const n2 = asciiToBase163(hex.charCodeAt(hi + 1));\n if (n1 === void 0 || n2 === void 0) {\n const char = hex[hi] + hex[hi + 1];\n throw new Error('hex string expected, got non-hex character \"' + char + '\" at index ' + hi);\n }\n array2[ai] = n1 * 16 + n2;\n }\n return array2;\n }\n function concatBytes4(...arrays) {\n let sum = 0;\n for (let i3 = 0; i3 < arrays.length; i3++) {\n const a3 = arrays[i3];\n abytes3(a3);\n sum += a3.length;\n }\n const res = new Uint8Array(sum);\n for (let i3 = 0, pad6 = 0; i3 < arrays.length; i3++) {\n const a3 = arrays[i3];\n res.set(a3, pad6);\n pad6 += a3.length;\n }\n return res;\n }\n function createHasher3(hashCons, info = {}) {\n const hashC = (msg, opts) => hashCons(opts).update(msg).digest();\n const tmp = hashCons(void 0);\n hashC.outputLen = tmp.outputLen;\n hashC.blockLen = tmp.blockLen;\n hashC.create = (opts) => hashCons(opts);\n Object.assign(hashC, info);\n return Object.freeze(hashC);\n }\n\n // ../../../node_modules/.pnpm/@noble+hashes@2.0.1/node_modules/@noble/hashes/sha3.js\n var _0n11 = BigInt(0);\n var _1n11 = BigInt(1);\n var _2n8 = BigInt(2);\n var _7n3 = BigInt(7);\n var _256n2 = BigInt(256);\n var _0x71n2 = BigInt(113);\n var SHA3_PI2 = [];\n var SHA3_ROTL2 = [];\n var _SHA3_IOTA2 = [];\n for (let round = 0, R3 = _1n11, x4 = 1, y6 = 0; round < 24; round++) {\n [x4, y6] = [y6, (2 * x4 + 3 * y6) % 5];\n SHA3_PI2.push(2 * (5 * y6 + x4));\n SHA3_ROTL2.push((round + 1) * (round + 2) / 2 % 64);\n let t3 = _0n11;\n for (let j2 = 0; j2 < 7; j2++) {\n R3 = (R3 << _1n11 ^ (R3 >> _7n3) * _0x71n2) % _256n2;\n if (R3 & _2n8)\n t3 ^= _1n11 << (_1n11 << BigInt(j2)) - _1n11;\n }\n _SHA3_IOTA2.push(t3);\n }\n var IOTAS2 = split3(_SHA3_IOTA2, true);\n var SHA3_IOTA_H2 = IOTAS2[0];\n var SHA3_IOTA_L2 = IOTAS2[1];\n var rotlH2 = (h4, l6, s4) => s4 > 32 ? rotlBH2(h4, l6, s4) : rotlSH2(h4, l6, s4);\n var rotlL2 = (h4, l6, s4) => s4 > 32 ? rotlBL2(h4, l6, s4) : rotlSL2(h4, l6, s4);\n function keccakP2(s4, rounds = 24) {\n const B2 = new Uint32Array(5 * 2);\n for (let round = 24 - rounds; round < 24; round++) {\n for (let x4 = 0; x4 < 10; x4++)\n B2[x4] = s4[x4] ^ s4[x4 + 10] ^ s4[x4 + 20] ^ s4[x4 + 30] ^ s4[x4 + 40];\n for (let x4 = 0; x4 < 10; x4 += 2) {\n const idx1 = (x4 + 8) % 10;\n const idx0 = (x4 + 2) % 10;\n const B0 = B2[idx0];\n const B1 = B2[idx0 + 1];\n const Th = rotlH2(B0, B1, 1) ^ B2[idx1];\n const Tl = rotlL2(B0, B1, 1) ^ B2[idx1 + 1];\n for (let y6 = 0; y6 < 50; y6 += 10) {\n s4[x4 + y6] ^= Th;\n s4[x4 + y6 + 1] ^= Tl;\n }\n }\n let curH = s4[2];\n let curL = s4[3];\n for (let t3 = 0; t3 < 24; t3++) {\n const shift = SHA3_ROTL2[t3];\n const Th = rotlH2(curH, curL, shift);\n const Tl = rotlL2(curH, curL, shift);\n const PI = SHA3_PI2[t3];\n curH = s4[PI];\n curL = s4[PI + 1];\n s4[PI] = Th;\n s4[PI + 1] = Tl;\n }\n for (let y6 = 0; y6 < 50; y6 += 10) {\n for (let x4 = 0; x4 < 10; x4++)\n B2[x4] = s4[y6 + x4];\n for (let x4 = 0; x4 < 10; x4++)\n s4[y6 + x4] ^= ~B2[(x4 + 2) % 10] & B2[(x4 + 4) % 10];\n }\n s4[0] ^= SHA3_IOTA_H2[round];\n s4[1] ^= SHA3_IOTA_L2[round];\n }\n clean2(B2);\n }\n var Keccak2 = class _Keccak {\n state;\n pos = 0;\n posOut = 0;\n finished = false;\n state32;\n destroyed = false;\n blockLen;\n suffix;\n outputLen;\n enableXOF = false;\n rounds;\n // NOTE: we accept arguments in bytes instead of bits here.\n constructor(blockLen, suffix, outputLen, enableXOF = false, rounds = 24) {\n this.blockLen = blockLen;\n this.suffix = suffix;\n this.outputLen = outputLen;\n this.enableXOF = enableXOF;\n this.rounds = rounds;\n anumber3(outputLen, \"outputLen\");\n if (!(0 < blockLen && blockLen < 200))\n throw new Error(\"only keccak-f1600 function is supported\");\n this.state = new Uint8Array(200);\n this.state32 = u322(this.state);\n }\n clone() {\n return this._cloneInto();\n }\n keccak() {\n swap32IfBE2(this.state32);\n keccakP2(this.state32, this.rounds);\n swap32IfBE2(this.state32);\n this.posOut = 0;\n this.pos = 0;\n }\n update(data) {\n aexists2(this);\n abytes3(data);\n const { blockLen, state } = this;\n const len = data.length;\n for (let pos = 0; pos < len; ) {\n const take = Math.min(blockLen - this.pos, len - pos);\n for (let i3 = 0; i3 < take; i3++)\n state[this.pos++] ^= data[pos++];\n if (this.pos === blockLen)\n this.keccak();\n }\n return this;\n }\n finish() {\n if (this.finished)\n return;\n this.finished = true;\n const { state, suffix, pos, blockLen } = this;\n state[pos] ^= suffix;\n if ((suffix & 128) !== 0 && pos === blockLen - 1)\n this.keccak();\n state[blockLen - 1] ^= 128;\n this.keccak();\n }\n writeInto(out) {\n aexists2(this, false);\n abytes3(out);\n this.finish();\n const bufferOut = this.state;\n const { blockLen } = this;\n for (let pos = 0, len = out.length; pos < len; ) {\n if (this.posOut >= blockLen)\n this.keccak();\n const take = Math.min(blockLen - this.posOut, len - pos);\n out.set(bufferOut.subarray(this.posOut, this.posOut + take), pos);\n this.posOut += take;\n pos += take;\n }\n return out;\n }\n xofInto(out) {\n if (!this.enableXOF)\n throw new Error(\"XOF is not possible for this instance\");\n return this.writeInto(out);\n }\n xof(bytes) {\n anumber3(bytes);\n return this.xofInto(new Uint8Array(bytes));\n }\n digestInto(out) {\n aoutput2(out, this);\n if (this.finished)\n throw new Error(\"digest() was already called\");\n this.writeInto(out);\n this.destroy();\n return out;\n }\n digest() {\n return this.digestInto(new Uint8Array(this.outputLen));\n }\n destroy() {\n this.destroyed = true;\n clean2(this.state);\n }\n _cloneInto(to) {\n const { blockLen, suffix, outputLen, rounds, enableXOF } = this;\n to ||= new _Keccak(blockLen, suffix, outputLen, enableXOF, rounds);\n to.state32.set(this.state32);\n to.pos = this.pos;\n to.posOut = this.posOut;\n to.finished = this.finished;\n to.rounds = rounds;\n to.suffix = suffix;\n to.outputLen = outputLen;\n to.enableXOF = enableXOF;\n to.destroyed = this.destroyed;\n return to;\n }\n };\n var genKeccak = (suffix, blockLen, outputLen, info = {}) => createHasher3(() => new Keccak2(blockLen, suffix, outputLen), info);\n var keccak_2562 = /* @__PURE__ */ genKeccak(1, 136, 32);\n\n // ../../../node_modules/.pnpm/@nktkas+hyperliquid@0.25.7_typescript@5.8.3/node_modules/@nktkas/hyperliquid/esm/src/api/exchange/agentEnableDexAbstraction.js\n init_dirname();\n init_buffer2();\n init_process2();\n\n // ../../../node_modules/.pnpm/@nktkas+hyperliquid@0.25.7_typescript@5.8.3/node_modules/@nktkas/hyperliquid/esm/src/api/exchange/_base/mod.js\n init_dirname();\n init_buffer2();\n init_process2();\n\n // ../../../node_modules/.pnpm/@nktkas+hyperliquid@0.25.7_typescript@5.8.3/node_modules/@nktkas/hyperliquid/esm/src/api/exchange/_base/_errors.js\n init_dirname();\n init_buffer2();\n init_process2();\n\n // ../../../node_modules/.pnpm/@nktkas+hyperliquid@0.25.7_typescript@5.8.3/node_modules/@nktkas/hyperliquid/esm/src/api/exchange/_base/_execute.js\n init_dirname();\n init_buffer2();\n init_process2();\n\n // ../../../node_modules/.pnpm/@nktkas+hyperliquid@0.25.7_typescript@5.8.3/node_modules/@nktkas/hyperliquid/esm/src/signing/mod.js\n init_dirname();\n init_buffer2();\n init_process2();\n\n // ../../../node_modules/.pnpm/@msgpack+msgpack@3.1.2/node_modules/@msgpack/msgpack/dist.esm/index.mjs\n init_dirname();\n init_buffer2();\n init_process2();\n\n // ../../../node_modules/.pnpm/@msgpack+msgpack@3.1.2/node_modules/@msgpack/msgpack/dist.esm/encode.mjs\n init_dirname();\n init_buffer2();\n init_process2();\n\n // ../../../node_modules/.pnpm/@msgpack+msgpack@3.1.2/node_modules/@msgpack/msgpack/dist.esm/Encoder.mjs\n init_dirname();\n init_buffer2();\n init_process2();\n\n // ../../../node_modules/.pnpm/@msgpack+msgpack@3.1.2/node_modules/@msgpack/msgpack/dist.esm/utils/utf8.mjs\n init_dirname();\n init_buffer2();\n init_process2();\n function utf8Count(str) {\n const strLength = str.length;\n let byteLength = 0;\n let pos = 0;\n while (pos < strLength) {\n let value = str.charCodeAt(pos++);\n if ((value & 4294967168) === 0) {\n byteLength++;\n continue;\n } else if ((value & 4294965248) === 0) {\n byteLength += 2;\n } else {\n if (value >= 55296 && value <= 56319) {\n if (pos < strLength) {\n const extra = str.charCodeAt(pos);\n if ((extra & 64512) === 56320) {\n ++pos;\n value = ((value & 1023) << 10) + (extra & 1023) + 65536;\n }\n }\n }\n if ((value & 4294901760) === 0) {\n byteLength += 3;\n } else {\n byteLength += 4;\n }\n }\n }\n return byteLength;\n }\n function utf8EncodeJs(str, output, outputOffset) {\n const strLength = str.length;\n let offset = outputOffset;\n let pos = 0;\n while (pos < strLength) {\n let value = str.charCodeAt(pos++);\n if ((value & 4294967168) === 0) {\n output[offset++] = value;\n continue;\n } else if ((value & 4294965248) === 0) {\n output[offset++] = value >> 6 & 31 | 192;\n } else {\n if (value >= 55296 && value <= 56319) {\n if (pos < strLength) {\n const extra = str.charCodeAt(pos);\n if ((extra & 64512) === 56320) {\n ++pos;\n value = ((value & 1023) << 10) + (extra & 1023) + 65536;\n }\n }\n }\n if ((value & 4294901760) === 0) {\n output[offset++] = value >> 12 & 15 | 224;\n output[offset++] = value >> 6 & 63 | 128;\n } else {\n output[offset++] = value >> 18 & 7 | 240;\n output[offset++] = value >> 12 & 63 | 128;\n output[offset++] = value >> 6 & 63 | 128;\n }\n }\n output[offset++] = value & 63 | 128;\n }\n }\n var sharedTextEncoder = new TextEncoder();\n var TEXT_ENCODER_THRESHOLD = 50;\n function utf8EncodeTE(str, output, outputOffset) {\n sharedTextEncoder.encodeInto(str, output.subarray(outputOffset));\n }\n function utf8Encode(str, output, outputOffset) {\n if (str.length > TEXT_ENCODER_THRESHOLD) {\n utf8EncodeTE(str, output, outputOffset);\n } else {\n utf8EncodeJs(str, output, outputOffset);\n }\n }\n var sharedTextDecoder = new TextDecoder();\n\n // ../../../node_modules/.pnpm/@msgpack+msgpack@3.1.2/node_modules/@msgpack/msgpack/dist.esm/ExtensionCodec.mjs\n init_dirname();\n init_buffer2();\n init_process2();\n\n // ../../../node_modules/.pnpm/@msgpack+msgpack@3.1.2/node_modules/@msgpack/msgpack/dist.esm/ExtData.mjs\n init_dirname();\n init_buffer2();\n init_process2();\n var ExtData = class {\n constructor(type, data) {\n this.type = type;\n this.data = data;\n }\n };\n\n // ../../../node_modules/.pnpm/@msgpack+msgpack@3.1.2/node_modules/@msgpack/msgpack/dist.esm/timestamp.mjs\n init_dirname();\n init_buffer2();\n init_process2();\n\n // ../../../node_modules/.pnpm/@msgpack+msgpack@3.1.2/node_modules/@msgpack/msgpack/dist.esm/DecodeError.mjs\n init_dirname();\n init_buffer2();\n init_process2();\n var DecodeError2 = class _DecodeError extends Error {\n constructor(message) {\n super(message);\n const proto = Object.create(_DecodeError.prototype);\n Object.setPrototypeOf(this, proto);\n Object.defineProperty(this, \"name\", {\n configurable: true,\n enumerable: false,\n value: _DecodeError.name\n });\n }\n };\n\n // ../../../node_modules/.pnpm/@msgpack+msgpack@3.1.2/node_modules/@msgpack/msgpack/dist.esm/utils/int.mjs\n init_dirname();\n init_buffer2();\n init_process2();\n function setUint64(view, offset, value) {\n const high = value / 4294967296;\n const low = value;\n view.setUint32(offset, high);\n view.setUint32(offset + 4, low);\n }\n function setInt64(view, offset, value) {\n const high = Math.floor(value / 4294967296);\n const low = value;\n view.setUint32(offset, high);\n view.setUint32(offset + 4, low);\n }\n function getInt64(view, offset) {\n const high = view.getInt32(offset);\n const low = view.getUint32(offset + 4);\n return high * 4294967296 + low;\n }\n\n // ../../../node_modules/.pnpm/@msgpack+msgpack@3.1.2/node_modules/@msgpack/msgpack/dist.esm/timestamp.mjs\n var EXT_TIMESTAMP = -1;\n var TIMESTAMP32_MAX_SEC = 4294967296 - 1;\n var TIMESTAMP64_MAX_SEC = 17179869184 - 1;\n function encodeTimeSpecToTimestamp({ sec, nsec }) {\n if (sec >= 0 && nsec >= 0 && sec <= TIMESTAMP64_MAX_SEC) {\n if (nsec === 0 && sec <= TIMESTAMP32_MAX_SEC) {\n const rv = new Uint8Array(4);\n const view = new DataView(rv.buffer);\n view.setUint32(0, sec);\n return rv;\n } else {\n const secHigh = sec / 4294967296;\n const secLow = sec & 4294967295;\n const rv = new Uint8Array(8);\n const view = new DataView(rv.buffer);\n view.setUint32(0, nsec << 2 | secHigh & 3);\n view.setUint32(4, secLow);\n return rv;\n }\n } else {\n const rv = new Uint8Array(12);\n const view = new DataView(rv.buffer);\n view.setUint32(0, nsec);\n setInt64(view, 4, sec);\n return rv;\n }\n }\n function encodeDateToTimeSpec(date) {\n const msec = date.getTime();\n const sec = Math.floor(msec / 1e3);\n const nsec = (msec - sec * 1e3) * 1e6;\n const nsecInSec = Math.floor(nsec / 1e9);\n return {\n sec: sec + nsecInSec,\n nsec: nsec - nsecInSec * 1e9\n };\n }\n function encodeTimestampExtension(object2) {\n if (object2 instanceof Date) {\n const timeSpec = encodeDateToTimeSpec(object2);\n return encodeTimeSpecToTimestamp(timeSpec);\n } else {\n return null;\n }\n }\n function decodeTimestampToTimeSpec(data) {\n const view = new DataView(data.buffer, data.byteOffset, data.byteLength);\n switch (data.byteLength) {\n case 4: {\n const sec = view.getUint32(0);\n const nsec = 0;\n return { sec, nsec };\n }\n case 8: {\n const nsec30AndSecHigh2 = view.getUint32(0);\n const secLow32 = view.getUint32(4);\n const sec = (nsec30AndSecHigh2 & 3) * 4294967296 + secLow32;\n const nsec = nsec30AndSecHigh2 >>> 2;\n return { sec, nsec };\n }\n case 12: {\n const sec = getInt64(view, 4);\n const nsec = view.getUint32(0);\n return { sec, nsec };\n }\n default:\n throw new DecodeError2(`Unrecognized data size for timestamp (expected 4, 8, or 12): ${data.length}`);\n }\n }\n function decodeTimestampExtension(data) {\n const timeSpec = decodeTimestampToTimeSpec(data);\n return new Date(timeSpec.sec * 1e3 + timeSpec.nsec / 1e6);\n }\n var timestampExtension = {\n type: EXT_TIMESTAMP,\n encode: encodeTimestampExtension,\n decode: decodeTimestampExtension\n };\n\n // ../../../node_modules/.pnpm/@msgpack+msgpack@3.1.2/node_modules/@msgpack/msgpack/dist.esm/ExtensionCodec.mjs\n var ExtensionCodec = class {\n constructor() {\n this.builtInEncoders = [];\n this.builtInDecoders = [];\n this.encoders = [];\n this.decoders = [];\n this.register(timestampExtension);\n }\n register({ type, encode: encode6, decode: decode2 }) {\n if (type >= 0) {\n this.encoders[type] = encode6;\n this.decoders[type] = decode2;\n } else {\n const index2 = -1 - type;\n this.builtInEncoders[index2] = encode6;\n this.builtInDecoders[index2] = decode2;\n }\n }\n tryToEncode(object2, context2) {\n for (let i3 = 0; i3 < this.builtInEncoders.length; i3++) {\n const encodeExt = this.builtInEncoders[i3];\n if (encodeExt != null) {\n const data = encodeExt(object2, context2);\n if (data != null) {\n const type = -1 - i3;\n return new ExtData(type, data);\n }\n }\n }\n for (let i3 = 0; i3 < this.encoders.length; i3++) {\n const encodeExt = this.encoders[i3];\n if (encodeExt != null) {\n const data = encodeExt(object2, context2);\n if (data != null) {\n const type = i3;\n return new ExtData(type, data);\n }\n }\n }\n if (object2 instanceof ExtData) {\n return object2;\n }\n return null;\n }\n decode(data, type, context2) {\n const decodeExt = type < 0 ? this.builtInDecoders[-1 - type] : this.decoders[type];\n if (decodeExt) {\n return decodeExt(data, type, context2);\n } else {\n return new ExtData(type, data);\n }\n }\n };\n ExtensionCodec.defaultCodec = new ExtensionCodec();\n\n // ../../../node_modules/.pnpm/@msgpack+msgpack@3.1.2/node_modules/@msgpack/msgpack/dist.esm/utils/typedArrays.mjs\n init_dirname();\n init_buffer2();\n init_process2();\n function isArrayBufferLike(buffer2) {\n return buffer2 instanceof ArrayBuffer || typeof SharedArrayBuffer !== \"undefined\" && buffer2 instanceof SharedArrayBuffer;\n }\n function ensureUint8Array(buffer2) {\n if (buffer2 instanceof Uint8Array) {\n return buffer2;\n } else if (ArrayBuffer.isView(buffer2)) {\n return new Uint8Array(buffer2.buffer, buffer2.byteOffset, buffer2.byteLength);\n } else if (isArrayBufferLike(buffer2)) {\n return new Uint8Array(buffer2);\n } else {\n return Uint8Array.from(buffer2);\n }\n }\n\n // ../../../node_modules/.pnpm/@msgpack+msgpack@3.1.2/node_modules/@msgpack/msgpack/dist.esm/Encoder.mjs\n var DEFAULT_MAX_DEPTH = 100;\n var DEFAULT_INITIAL_BUFFER_SIZE = 2048;\n var Encoder = class _Encoder {\n constructor(options) {\n this.entered = false;\n this.extensionCodec = options?.extensionCodec ?? ExtensionCodec.defaultCodec;\n this.context = options?.context;\n this.useBigInt64 = options?.useBigInt64 ?? false;\n this.maxDepth = options?.maxDepth ?? DEFAULT_MAX_DEPTH;\n this.initialBufferSize = options?.initialBufferSize ?? DEFAULT_INITIAL_BUFFER_SIZE;\n this.sortKeys = options?.sortKeys ?? false;\n this.forceFloat32 = options?.forceFloat32 ?? false;\n this.ignoreUndefined = options?.ignoreUndefined ?? false;\n this.forceIntegerToFloat = options?.forceIntegerToFloat ?? false;\n this.pos = 0;\n this.view = new DataView(new ArrayBuffer(this.initialBufferSize));\n this.bytes = new Uint8Array(this.view.buffer);\n }\n clone() {\n return new _Encoder({\n extensionCodec: this.extensionCodec,\n context: this.context,\n useBigInt64: this.useBigInt64,\n maxDepth: this.maxDepth,\n initialBufferSize: this.initialBufferSize,\n sortKeys: this.sortKeys,\n forceFloat32: this.forceFloat32,\n ignoreUndefined: this.ignoreUndefined,\n forceIntegerToFloat: this.forceIntegerToFloat\n });\n }\n reinitializeState() {\n this.pos = 0;\n }\n /**\n * This is almost equivalent to {@link Encoder#encode}, but it returns an reference of the encoder's internal buffer and thus much faster than {@link Encoder#encode}.\n *\n * @returns Encodes the object and returns a shared reference the encoder's internal buffer.\n */\n encodeSharedRef(object2) {\n if (this.entered) {\n const instance = this.clone();\n return instance.encodeSharedRef(object2);\n }\n try {\n this.entered = true;\n this.reinitializeState();\n this.doEncode(object2, 1);\n return this.bytes.subarray(0, this.pos);\n } finally {\n this.entered = false;\n }\n }\n /**\n * @returns Encodes the object and returns a copy of the encoder's internal buffer.\n */\n encode(object2) {\n if (this.entered) {\n const instance = this.clone();\n return instance.encode(object2);\n }\n try {\n this.entered = true;\n this.reinitializeState();\n this.doEncode(object2, 1);\n return this.bytes.slice(0, this.pos);\n } finally {\n this.entered = false;\n }\n }\n doEncode(object2, depth) {\n if (depth > this.maxDepth) {\n throw new Error(`Too deep objects in depth ${depth}`);\n }\n if (object2 == null) {\n this.encodeNil();\n } else if (typeof object2 === \"boolean\") {\n this.encodeBoolean(object2);\n } else if (typeof object2 === \"number\") {\n if (!this.forceIntegerToFloat) {\n this.encodeNumber(object2);\n } else {\n this.encodeNumberAsFloat(object2);\n }\n } else if (typeof object2 === \"string\") {\n this.encodeString(object2);\n } else if (this.useBigInt64 && typeof object2 === \"bigint\") {\n this.encodeBigInt64(object2);\n } else {\n this.encodeObject(object2, depth);\n }\n }\n ensureBufferSizeToWrite(sizeToWrite) {\n const requiredSize = this.pos + sizeToWrite;\n if (this.view.byteLength < requiredSize) {\n this.resizeBuffer(requiredSize * 2);\n }\n }\n resizeBuffer(newSize) {\n const newBuffer = new ArrayBuffer(newSize);\n const newBytes = new Uint8Array(newBuffer);\n const newView = new DataView(newBuffer);\n newBytes.set(this.bytes);\n this.view = newView;\n this.bytes = newBytes;\n }\n encodeNil() {\n this.writeU8(192);\n }\n encodeBoolean(object2) {\n if (object2 === false) {\n this.writeU8(194);\n } else {\n this.writeU8(195);\n }\n }\n encodeNumber(object2) {\n if (!this.forceIntegerToFloat && Number.isSafeInteger(object2)) {\n if (object2 >= 0) {\n if (object2 < 128) {\n this.writeU8(object2);\n } else if (object2 < 256) {\n this.writeU8(204);\n this.writeU8(object2);\n } else if (object2 < 65536) {\n this.writeU8(205);\n this.writeU16(object2);\n } else if (object2 < 4294967296) {\n this.writeU8(206);\n this.writeU32(object2);\n } else if (!this.useBigInt64) {\n this.writeU8(207);\n this.writeU64(object2);\n } else {\n this.encodeNumberAsFloat(object2);\n }\n } else {\n if (object2 >= -32) {\n this.writeU8(224 | object2 + 32);\n } else if (object2 >= -128) {\n this.writeU8(208);\n this.writeI8(object2);\n } else if (object2 >= -32768) {\n this.writeU8(209);\n this.writeI16(object2);\n } else if (object2 >= -2147483648) {\n this.writeU8(210);\n this.writeI32(object2);\n } else if (!this.useBigInt64) {\n this.writeU8(211);\n this.writeI64(object2);\n } else {\n this.encodeNumberAsFloat(object2);\n }\n }\n } else {\n this.encodeNumberAsFloat(object2);\n }\n }\n encodeNumberAsFloat(object2) {\n if (this.forceFloat32) {\n this.writeU8(202);\n this.writeF32(object2);\n } else {\n this.writeU8(203);\n this.writeF64(object2);\n }\n }\n encodeBigInt64(object2) {\n if (object2 >= BigInt(0)) {\n this.writeU8(207);\n this.writeBigUint64(object2);\n } else {\n this.writeU8(211);\n this.writeBigInt64(object2);\n }\n }\n writeStringHeader(byteLength) {\n if (byteLength < 32) {\n this.writeU8(160 + byteLength);\n } else if (byteLength < 256) {\n this.writeU8(217);\n this.writeU8(byteLength);\n } else if (byteLength < 65536) {\n this.writeU8(218);\n this.writeU16(byteLength);\n } else if (byteLength < 4294967296) {\n this.writeU8(219);\n this.writeU32(byteLength);\n } else {\n throw new Error(`Too long string: ${byteLength} bytes in UTF-8`);\n }\n }\n encodeString(object2) {\n const maxHeaderSize = 1 + 4;\n const byteLength = utf8Count(object2);\n this.ensureBufferSizeToWrite(maxHeaderSize + byteLength);\n this.writeStringHeader(byteLength);\n utf8Encode(object2, this.bytes, this.pos);\n this.pos += byteLength;\n }\n encodeObject(object2, depth) {\n const ext = this.extensionCodec.tryToEncode(object2, this.context);\n if (ext != null) {\n this.encodeExtension(ext);\n } else if (Array.isArray(object2)) {\n this.encodeArray(object2, depth);\n } else if (ArrayBuffer.isView(object2)) {\n this.encodeBinary(object2);\n } else if (typeof object2 === \"object\") {\n this.encodeMap(object2, depth);\n } else {\n throw new Error(`Unrecognized object: ${Object.prototype.toString.apply(object2)}`);\n }\n }\n encodeBinary(object2) {\n const size6 = object2.byteLength;\n if (size6 < 256) {\n this.writeU8(196);\n this.writeU8(size6);\n } else if (size6 < 65536) {\n this.writeU8(197);\n this.writeU16(size6);\n } else if (size6 < 4294967296) {\n this.writeU8(198);\n this.writeU32(size6);\n } else {\n throw new Error(`Too large binary: ${size6}`);\n }\n const bytes = ensureUint8Array(object2);\n this.writeU8a(bytes);\n }\n encodeArray(object2, depth) {\n const size6 = object2.length;\n if (size6 < 16) {\n this.writeU8(144 + size6);\n } else if (size6 < 65536) {\n this.writeU8(220);\n this.writeU16(size6);\n } else if (size6 < 4294967296) {\n this.writeU8(221);\n this.writeU32(size6);\n } else {\n throw new Error(`Too large array: ${size6}`);\n }\n for (const item of object2) {\n this.doEncode(item, depth + 1);\n }\n }\n countWithoutUndefined(object2, keys) {\n let count = 0;\n for (const key of keys) {\n if (object2[key] !== void 0) {\n count++;\n }\n }\n return count;\n }\n encodeMap(object2, depth) {\n const keys = Object.keys(object2);\n if (this.sortKeys) {\n keys.sort();\n }\n const size6 = this.ignoreUndefined ? this.countWithoutUndefined(object2, keys) : keys.length;\n if (size6 < 16) {\n this.writeU8(128 + size6);\n } else if (size6 < 65536) {\n this.writeU8(222);\n this.writeU16(size6);\n } else if (size6 < 4294967296) {\n this.writeU8(223);\n this.writeU32(size6);\n } else {\n throw new Error(`Too large map object: ${size6}`);\n }\n for (const key of keys) {\n const value = object2[key];\n if (!(this.ignoreUndefined && value === void 0)) {\n this.encodeString(key);\n this.doEncode(value, depth + 1);\n }\n }\n }\n encodeExtension(ext) {\n if (typeof ext.data === \"function\") {\n const data = ext.data(this.pos + 6);\n const size7 = data.length;\n if (size7 >= 4294967296) {\n throw new Error(`Too large extension object: ${size7}`);\n }\n this.writeU8(201);\n this.writeU32(size7);\n this.writeI8(ext.type);\n this.writeU8a(data);\n return;\n }\n const size6 = ext.data.length;\n if (size6 === 1) {\n this.writeU8(212);\n } else if (size6 === 2) {\n this.writeU8(213);\n } else if (size6 === 4) {\n this.writeU8(214);\n } else if (size6 === 8) {\n this.writeU8(215);\n } else if (size6 === 16) {\n this.writeU8(216);\n } else if (size6 < 256) {\n this.writeU8(199);\n this.writeU8(size6);\n } else if (size6 < 65536) {\n this.writeU8(200);\n this.writeU16(size6);\n } else if (size6 < 4294967296) {\n this.writeU8(201);\n this.writeU32(size6);\n } else {\n throw new Error(`Too large extension object: ${size6}`);\n }\n this.writeI8(ext.type);\n this.writeU8a(ext.data);\n }\n writeU8(value) {\n this.ensureBufferSizeToWrite(1);\n this.view.setUint8(this.pos, value);\n this.pos++;\n }\n writeU8a(values) {\n const size6 = values.length;\n this.ensureBufferSizeToWrite(size6);\n this.bytes.set(values, this.pos);\n this.pos += size6;\n }\n writeI8(value) {\n this.ensureBufferSizeToWrite(1);\n this.view.setInt8(this.pos, value);\n this.pos++;\n }\n writeU16(value) {\n this.ensureBufferSizeToWrite(2);\n this.view.setUint16(this.pos, value);\n this.pos += 2;\n }\n writeI16(value) {\n this.ensureBufferSizeToWrite(2);\n this.view.setInt16(this.pos, value);\n this.pos += 2;\n }\n writeU32(value) {\n this.ensureBufferSizeToWrite(4);\n this.view.setUint32(this.pos, value);\n this.pos += 4;\n }\n writeI32(value) {\n this.ensureBufferSizeToWrite(4);\n this.view.setInt32(this.pos, value);\n this.pos += 4;\n }\n writeF32(value) {\n this.ensureBufferSizeToWrite(4);\n this.view.setFloat32(this.pos, value);\n this.pos += 4;\n }\n writeF64(value) {\n this.ensureBufferSizeToWrite(8);\n this.view.setFloat64(this.pos, value);\n this.pos += 8;\n }\n writeU64(value) {\n this.ensureBufferSizeToWrite(8);\n setUint64(this.view, this.pos, value);\n this.pos += 8;\n }\n writeI64(value) {\n this.ensureBufferSizeToWrite(8);\n setInt64(this.view, this.pos, value);\n this.pos += 8;\n }\n writeBigUint64(value) {\n this.ensureBufferSizeToWrite(8);\n this.view.setBigUint64(this.pos, value);\n this.pos += 8;\n }\n writeBigInt64(value) {\n this.ensureBufferSizeToWrite(8);\n this.view.setBigInt64(this.pos, value);\n this.pos += 8;\n }\n };\n\n // ../../../node_modules/.pnpm/@msgpack+msgpack@3.1.2/node_modules/@msgpack/msgpack/dist.esm/encode.mjs\n function encode5(value, options) {\n const encoder6 = new Encoder(options);\n return encoder6.encodeSharedRef(value);\n }\n\n // ../../../node_modules/.pnpm/@nktkas+hyperliquid@0.25.7_typescript@5.8.3/node_modules/@nktkas/hyperliquid/esm/src/signing/_signTypedData.js\n init_dirname();\n init_buffer2();\n init_process2();\n function isAbstractEthersV6Signer(client) {\n return typeof client === \"object\" && client !== null && \"signTypedData\" in client && typeof client.signTypedData === \"function\" && client.signTypedData.length === 3;\n }\n function isAbstractEthersV5Signer(client) {\n return typeof client === \"object\" && client !== null && \"_signTypedData\" in client && typeof client._signTypedData === \"function\" && client._signTypedData.length === 3;\n }\n function isAbstractViemWallet(client) {\n return typeof client === \"object\" && client !== null && \"signTypedData\" in client && typeof client.signTypedData === \"function\" && (client.signTypedData.length === 1 || client.signTypedData.length === 2);\n }\n async function signTypedData3(args) {\n const { wallet, domain: domain2, types, primaryType, message } = args;\n let signature;\n if (isAbstractViemWallet(wallet)) {\n signature = await wallet.signTypedData({\n domain: domain2,\n types: {\n EIP712Domain: [\n { name: \"name\", type: \"string\" },\n { name: \"version\", type: \"string\" },\n { name: \"chainId\", type: \"uint256\" },\n { name: \"verifyingContract\", type: \"address\" }\n ],\n ...types\n },\n primaryType,\n message\n });\n } else if (isAbstractEthersV6Signer(wallet)) {\n signature = await wallet.signTypedData(domain2, types, message);\n } else if (isAbstractEthersV5Signer(wallet)) {\n signature = await wallet._signTypedData(domain2, types, message);\n } else {\n throw new Error(\"Unsupported wallet for signing typed data\");\n }\n return splitSignature(signature);\n }\n function splitSignature(signature) {\n const r2 = `0x${signature.slice(2, 66)}`;\n const s4 = `0x${signature.slice(66, 130)}`;\n const v2 = parseInt(signature.slice(130, 132), 16);\n return { r: r2, s: s4, v: v2 };\n }\n\n // ../../../node_modules/.pnpm/@nktkas+hyperliquid@0.25.7_typescript@5.8.3/node_modules/@nktkas/hyperliquid/esm/src/signing/mod.js\n function createL1ActionHash(args) {\n const { action, nonce, vaultAddress, expiresAfter } = args;\n const actionBytes = encode5(action, { ignoreUndefined: true });\n const nonceBytes = toUint64Bytes(nonce);\n const vaultMarker = vaultAddress ? new Uint8Array([1]) : new Uint8Array([0]);\n const vaultBytes = vaultAddress ? hexToBytes5(vaultAddress.slice(2)) : new Uint8Array();\n const expiresMarker = expiresAfter !== void 0 ? new Uint8Array([0]) : new Uint8Array();\n const expiresBytes = expiresAfter !== void 0 ? toUint64Bytes(expiresAfter) : new Uint8Array();\n const bytes = concatBytes4(actionBytes, nonceBytes, vaultMarker, vaultBytes, expiresMarker, expiresBytes);\n const hash3 = keccak_2562(bytes);\n return `0x${bytesToHex5(hash3)}`;\n }\n function toUint64Bytes(n2) {\n const bytes = new Uint8Array(8);\n new DataView(bytes.buffer).setBigUint64(0, BigInt(n2));\n return bytes;\n }\n async function signL1Action(args) {\n const { wallet, action, nonce, isTestnet = false, vaultAddress, expiresAfter } = args;\n const actionHash = createL1ActionHash({ action, nonce, vaultAddress, expiresAfter });\n const message = {\n source: isTestnet ? \"b\" : \"a\",\n connectionId: actionHash\n };\n return await signTypedData3({\n wallet,\n domain: {\n name: \"Exchange\",\n version: \"1\",\n chainId: 1337,\n // hyperliquid requires chainId to be 1337\n verifyingContract: \"0x0000000000000000000000000000000000000000\"\n },\n types: {\n Agent: [\n { name: \"source\", type: \"string\" },\n { name: \"connectionId\", type: \"bytes32\" }\n ]\n },\n primaryType: \"Agent\",\n message\n });\n }\n async function signUserSignedAction(args) {\n let { wallet, action, types } = args;\n if (action.type === \"approveAgent\" && !action.agentName) {\n action = { ...action, agentName: \"\" };\n }\n if (\"payloadMultiSigUser\" in action && \"outerSigner\" in action) {\n types = structuredClone(types);\n Object.values(types)[0].splice(\n // array mutation\n 1,\n // after `hyperliquidChain`\n 0,\n // do not remove any elements\n { name: \"payloadMultiSigUser\", type: \"address\" },\n { name: \"outerSigner\", type: \"address\" }\n );\n }\n return await signTypedData3({\n wallet,\n domain: {\n name: \"HyperliquidSignTransaction\",\n version: \"1\",\n chainId: parseInt(action.signatureChainId),\n verifyingContract: \"0x0000000000000000000000000000000000000000\"\n },\n types,\n primaryType: Object.keys(types)[0],\n message: action\n });\n }\n\n // ../../../node_modules/.pnpm/@nktkas+hyperliquid@0.25.7_typescript@5.8.3/node_modules/@nktkas/hyperliquid/esm/src/api/exchange/_base/_nonce.js\n init_dirname();\n init_buffer2();\n init_process2();\n\n // ../../../node_modules/.pnpm/@nktkas+hyperliquid@0.25.7_typescript@5.8.3/node_modules/@nktkas/hyperliquid/esm/src/api/exchange/_base/_helpers.js\n init_dirname();\n init_buffer2();\n init_process2();\n\n // ../../../node_modules/.pnpm/@nktkas+hyperliquid@0.25.7_typescript@5.8.3/node_modules/@nktkas/hyperliquid/esm/src/api/exchange/_base/_sequential.js\n init_dirname();\n init_buffer2();\n init_process2();\n\n // ../../../node_modules/.pnpm/@nktkas+hyperliquid@0.25.7_typescript@5.8.3/node_modules/@nktkas/hyperliquid/esm/src/api/exchange/_base/_schemas.js\n init_dirname();\n init_buffer2();\n init_process2();\n var Signature = /* @__PURE__ */ (() => {\n return pipe(object({\n /** First 32-byte component of ECDSA signature. */\n r: pipe(pipe(Hex, length(66)), description(\"First 32-byte component of ECDSA signature.\")),\n /** Second 32-byte component of ECDSA signature. */\n s: pipe(pipe(Hex, length(66)), description(\"Second 32-byte component of ECDSA signature.\")),\n /** Recovery identifier. */\n v: pipe(union([literal(27), literal(28)]), description(\"Recovery identifier.\"))\n }), description(\"ECDSA signature components for Ethereum typed data.\"));\n })();\n\n // ../../../node_modules/.pnpm/@nktkas+hyperliquid@0.25.7_typescript@5.8.3/node_modules/@nktkas/hyperliquid/esm/src/api/exchange/_base/_types.js\n init_dirname();\n init_buffer2();\n init_process2();\n\n // ../../../node_modules/.pnpm/@nktkas+hyperliquid@0.25.7_typescript@5.8.3/node_modules/@nktkas/hyperliquid/esm/src/api/exchange/approveAgent.js\n init_dirname();\n init_buffer2();\n init_process2();\n\n // ../../../node_modules/.pnpm/@nktkas+hyperliquid@0.25.7_typescript@5.8.3/node_modules/@nktkas/hyperliquid/esm/src/api/exchange/approveBuilderFee.js\n init_dirname();\n init_buffer2();\n init_process2();\n\n // ../../../node_modules/.pnpm/@nktkas+hyperliquid@0.25.7_typescript@5.8.3/node_modules/@nktkas/hyperliquid/esm/src/api/exchange/batchModify.js\n init_dirname();\n init_buffer2();\n init_process2();\n\n // ../../../node_modules/.pnpm/@nktkas+hyperliquid@0.25.7_typescript@5.8.3/node_modules/@nktkas/hyperliquid/esm/src/api/_common_schemas.js\n init_dirname();\n init_buffer2();\n init_process2();\n var TIFSchema = /* @__PURE__ */ (() => {\n return pipe(union([\n literal(\"Gtc\"),\n literal(\"Ioc\"),\n literal(\"Alo\"),\n literal(\"FrontendMarket\"),\n literal(\"LiquidationMarket\")\n ]), description('Time-in-force.\\n- `\"Gtc\"`: Remains active until filled or canceled.\\n- `\"Ioc\"`: Fills immediately or cancels any unfilled portion.\\n- `\"Alo\"`: Adds liquidity only.\\n- `\"FrontendMarket\"`: Similar to Ioc, used in Hyperliquid UI.\\n- `\"LiquidationMarket\"`: Similar to Ioc, used in Hyperliquid UI.'));\n })();\n var PlaceOrderParamsSchema = /* @__PURE__ */ (() => {\n return pipe(object({\n /** Asset ID. */\n a: pipe(UnsignedInteger, description(\"Asset ID.\")),\n /** Position side (`true` for long, `false` for short). */\n b: pipe(boolean(), description(\"Position side (`true` for long, `false` for short).\")),\n /** Price. */\n p: pipe(UnsignedDecimal, description(\"Price.\")),\n /** Size (in base currency units). */\n s: pipe(UnsignedDecimal, description(\"Size (in base currency units).\")),\n /** Is reduce-only? */\n r: pipe(boolean(), description(\"Is reduce-only?\")),\n /** Order type. */\n t: pipe(union([\n object({\n /** Limit order parameters. */\n limit: pipe(object({\n /**\n * Time-in-force.\n * - `\"Gtc\"`: Remains active until filled or canceled.\n * - `\"Ioc\"`: Fills immediately or cancels any unfilled portion.\n * - `\"Alo\"`: Adds liquidity only.\n * - `\"FrontendMarket\"`: Similar to Ioc, used in Hyperliquid UI.\n * - `\"LiquidationMarket\"`: Similar to Ioc, used in Hyperliquid UI.\n */\n tif: TIFSchema\n }), description(\"Limit order parameters.\"))\n }),\n object({\n /** Trigger order parameters. */\n trigger: pipe(object({\n /** Is market order? */\n isMarket: pipe(boolean(), description(\"Is market order?\")),\n /** Trigger price. */\n triggerPx: pipe(UnsignedDecimal, description(\"Trigger price.\")),\n /** Indicates whether it is take profit or stop loss. */\n tpsl: pipe(union([literal(\"tp\"), literal(\"sl\")]), description(\"Indicates whether it is take profit or stop loss.\"))\n }), description(\"Trigger order parameters.\"))\n })\n ]), description(\"Order type.\")),\n /** Client Order ID. */\n c: pipe(optional(pipe(Hex, length(34))), description(\"Client Order ID.\"))\n }), description(\"Place order parameters.\"));\n })();\n var CandleIntervalSchema = /* @__PURE__ */ (() => {\n return pipe(union([\n literal(\"1m\"),\n literal(\"3m\"),\n literal(\"5m\"),\n literal(\"15m\"),\n literal(\"30m\"),\n literal(\"1h\"),\n literal(\"2h\"),\n literal(\"4h\"),\n literal(\"8h\"),\n literal(\"12h\"),\n literal(\"1d\"),\n literal(\"3d\"),\n literal(\"1w\"),\n literal(\"1M\")\n ]), description(\"Time interval.\"));\n })();\n\n // ../../../node_modules/.pnpm/@nktkas+hyperliquid@0.25.7_typescript@5.8.3/node_modules/@nktkas/hyperliquid/esm/src/api/exchange/order.js\n init_dirname();\n init_buffer2();\n init_process2();\n var OrderRequest = /* @__PURE__ */ (() => {\n return pipe(object({\n /** Action to perform. */\n action: pipe(object({\n /** Type of action. */\n type: pipe(literal(\"order\"), description(\"Type of action.\")),\n /** Order parameters. */\n orders: pipe(array(PlaceOrderParamsSchema), description(\"Order parameters.\")),\n /**\n * Order grouping strategy:\n * - `na`: Standard order without grouping (default).\n * - `normalTpsl`: TP/SL order with fixed size that doesn't adjust with position changes.\n * - `positionTpsl`: TP/SL order that adjusts proportionally with the position size.\n */\n grouping: pipe(optional(union([\n literal(\"na\"),\n literal(\"normalTpsl\"),\n literal(\"positionTpsl\")\n ]), \"na\"), description(\"Order grouping strategy:\\n- `na`: Standard order without grouping.\\n- `normalTpsl`: TP/SL order with fixed size that doesn't adjust with position changes.\\n- `positionTpsl`: TP/SL order that adjusts proportionally with the position size.\")),\n /** Builder fee. */\n builder: pipe(optional(object({\n /** Builder address. */\n b: pipe(Address, description(\"Builder address.\")),\n /** Builder fee in 0.1bps (1 = 0.0001%). */\n f: pipe(UnsignedInteger, description(\"Builder fee in 0.1bps (1 = 0.0001%).\"))\n })), description(\"Builder fee.\"))\n }), description(\"Action to perform.\")),\n /** Unique request identifier (current timestamp in ms). */\n nonce: pipe(UnsignedInteger, description(\"Unique request identifier (current timestamp in ms).\")),\n /** Cryptographic signature. */\n signature: pipe(Signature, description(\"Cryptographic signature.\")),\n /** Vault address (for vault trading). */\n vaultAddress: pipe(optional(Address), description(\"Vault address (for vault trading).\")),\n /** Expiration time of the action. */\n expiresAfter: pipe(optional(UnsignedInteger), description(\"Expiration time of the action.\"))\n }), description(\"Place an order(s).\"));\n })();\n\n // ../../../node_modules/.pnpm/@nktkas+hyperliquid@0.25.7_typescript@5.8.3/node_modules/@nktkas/hyperliquid/esm/src/api/exchange/cancel.js\n init_dirname();\n init_buffer2();\n init_process2();\n var CancelRequest = /* @__PURE__ */ (() => {\n return pipe(object({\n /** Action to perform. */\n action: pipe(object({\n /** Type of action. */\n type: pipe(literal(\"cancel\"), description(\"Type of action.\")),\n /** Orders to cancel. */\n cancels: pipe(array(object({\n /** Asset ID. */\n a: pipe(UnsignedInteger, description(\"Asset ID.\")),\n /** Order ID. */\n o: pipe(UnsignedInteger, description(\"Order ID.\"))\n })), description(\"Orders to cancel.\"))\n }), description(\"Action to perform.\")),\n /** Unique request identifier (current timestamp in ms). */\n nonce: pipe(UnsignedInteger, description(\"Unique request identifier (current timestamp in ms).\")),\n /** Cryptographic signature. */\n signature: pipe(Signature, description(\"Cryptographic signature.\")),\n /** Vault address (for vault trading). */\n vaultAddress: pipe(optional(Address), description(\"Vault address (for vault trading).\")),\n /** Expiration time of the action. */\n expiresAfter: pipe(optional(UnsignedInteger), description(\"Expiration time of the action.\"))\n }), description(\"Cancel order(s).\"));\n })();\n\n // ../../../node_modules/.pnpm/@nktkas+hyperliquid@0.25.7_typescript@5.8.3/node_modules/@nktkas/hyperliquid/esm/src/api/exchange/cancelByCloid.js\n init_dirname();\n init_buffer2();\n init_process2();\n\n // ../../../node_modules/.pnpm/@nktkas+hyperliquid@0.25.7_typescript@5.8.3/node_modules/@nktkas/hyperliquid/esm/src/api/exchange/cDeposit.js\n init_dirname();\n init_buffer2();\n init_process2();\n\n // ../../../node_modules/.pnpm/@nktkas+hyperliquid@0.25.7_typescript@5.8.3/node_modules/@nktkas/hyperliquid/esm/src/api/exchange/claimRewards.js\n init_dirname();\n init_buffer2();\n init_process2();\n\n // ../../../node_modules/.pnpm/@nktkas+hyperliquid@0.25.7_typescript@5.8.3/node_modules/@nktkas/hyperliquid/esm/src/api/exchange/convertToMultiSigUser.js\n init_dirname();\n init_buffer2();\n init_process2();\n\n // ../../../node_modules/.pnpm/@nktkas+hyperliquid@0.25.7_typescript@5.8.3/node_modules/@nktkas/hyperliquid/esm/src/api/exchange/createSubAccount.js\n init_dirname();\n init_buffer2();\n init_process2();\n\n // ../../../node_modules/.pnpm/@nktkas+hyperliquid@0.25.7_typescript@5.8.3/node_modules/@nktkas/hyperliquid/esm/src/api/exchange/createVault.js\n init_dirname();\n init_buffer2();\n init_process2();\n\n // ../../../node_modules/.pnpm/@nktkas+hyperliquid@0.25.7_typescript@5.8.3/node_modules/@nktkas/hyperliquid/esm/src/api/exchange/cSignerAction.js\n init_dirname();\n init_buffer2();\n init_process2();\n\n // ../../../node_modules/.pnpm/@nktkas+hyperliquid@0.25.7_typescript@5.8.3/node_modules/@nktkas/hyperliquid/esm/src/api/exchange/cValidatorAction.js\n init_dirname();\n init_buffer2();\n init_process2();\n\n // ../../../node_modules/.pnpm/@nktkas+hyperliquid@0.25.7_typescript@5.8.3/node_modules/@nktkas/hyperliquid/esm/src/api/exchange/cWithdraw.js\n init_dirname();\n init_buffer2();\n init_process2();\n\n // ../../../node_modules/.pnpm/@nktkas+hyperliquid@0.25.7_typescript@5.8.3/node_modules/@nktkas/hyperliquid/esm/src/api/exchange/evmUserModify.js\n init_dirname();\n init_buffer2();\n init_process2();\n\n // ../../../node_modules/.pnpm/@nktkas+hyperliquid@0.25.7_typescript@5.8.3/node_modules/@nktkas/hyperliquid/esm/src/api/exchange/modify.js\n init_dirname();\n init_buffer2();\n init_process2();\n\n // ../../../node_modules/.pnpm/@nktkas+hyperliquid@0.25.7_typescript@5.8.3/node_modules/@nktkas/hyperliquid/esm/src/api/exchange/multiSig.js\n init_dirname();\n init_buffer2();\n init_process2();\n\n // ../../../node_modules/.pnpm/@nktkas+hyperliquid@0.25.7_typescript@5.8.3/node_modules/@nktkas/hyperliquid/esm/src/api/exchange/noop.js\n init_dirname();\n init_buffer2();\n init_process2();\n\n // ../../../node_modules/.pnpm/@nktkas+hyperliquid@0.25.7_typescript@5.8.3/node_modules/@nktkas/hyperliquid/esm/src/api/exchange/registerReferrer.js\n init_dirname();\n init_buffer2();\n init_process2();\n\n // ../../../node_modules/.pnpm/@nktkas+hyperliquid@0.25.7_typescript@5.8.3/node_modules/@nktkas/hyperliquid/esm/src/api/exchange/reserveRequestWeight.js\n init_dirname();\n init_buffer2();\n init_process2();\n\n // ../../../node_modules/.pnpm/@nktkas+hyperliquid@0.25.7_typescript@5.8.3/node_modules/@nktkas/hyperliquid/esm/src/api/exchange/scheduleCancel.js\n init_dirname();\n init_buffer2();\n init_process2();\n\n // ../../../node_modules/.pnpm/@nktkas+hyperliquid@0.25.7_typescript@5.8.3/node_modules/@nktkas/hyperliquid/esm/src/api/exchange/setDisplayName.js\n init_dirname();\n init_buffer2();\n init_process2();\n\n // ../../../node_modules/.pnpm/@nktkas+hyperliquid@0.25.7_typescript@5.8.3/node_modules/@nktkas/hyperliquid/esm/src/api/exchange/setReferrer.js\n init_dirname();\n init_buffer2();\n init_process2();\n\n // ../../../node_modules/.pnpm/@nktkas+hyperliquid@0.25.7_typescript@5.8.3/node_modules/@nktkas/hyperliquid/esm/src/api/exchange/spotDeploy.js\n init_dirname();\n init_buffer2();\n init_process2();\n\n // ../../../node_modules/.pnpm/@nktkas+hyperliquid@0.25.7_typescript@5.8.3/node_modules/@nktkas/hyperliquid/esm/src/api/exchange/subAccountModify.js\n init_dirname();\n init_buffer2();\n init_process2();\n\n // ../../../node_modules/.pnpm/@nktkas+hyperliquid@0.25.7_typescript@5.8.3/node_modules/@nktkas/hyperliquid/esm/src/api/exchange/tokenDelegate.js\n init_dirname();\n init_buffer2();\n init_process2();\n\n // ../../../node_modules/.pnpm/@nktkas+hyperliquid@0.25.7_typescript@5.8.3/node_modules/@nktkas/hyperliquid/esm/src/api/exchange/twapOrder.js\n init_dirname();\n init_buffer2();\n init_process2();\n\n // ../../../node_modules/.pnpm/@nktkas+hyperliquid@0.25.7_typescript@5.8.3/node_modules/@nktkas/hyperliquid/esm/src/api/exchange/usdClassTransfer.js\n init_dirname();\n init_buffer2();\n init_process2();\n var UsdClassTransferRequest = /* @__PURE__ */ (() => {\n return pipe(object({\n /** Action to perform. */\n action: pipe(object({\n /** Type of action. */\n type: pipe(literal(\"usdClassTransfer\"), description(\"Type of action.\")),\n /** Chain ID used for signing. */\n signatureChainId: pipe(Hex, description(\"Chain ID used for signing.\")),\n /** HyperLiquid network. */\n hyperliquidChain: pipe(union([literal(\"Mainnet\"), literal(\"Testnet\")]), description(\"HyperLiquid network.\")),\n /** Amount to transfer (1 = $1). */\n amount: pipe(UnsignedDecimal, description(\"Amount to transfer (1 = $1).\")),\n /** `true` for Spot to Perp, `false` for Perp to Spot. */\n toPerp: pipe(boolean(), description(\"`true` for Spot to Perp, `false` for Perp to Spot.\")),\n /** Unique request identifier (current timestamp in ms). */\n nonce: pipe(UnsignedInteger, description(\"Unique request identifier (current timestamp in ms).\"))\n }), description(\"Action to perform.\")),\n /** Unique request identifier (current timestamp in ms). */\n nonce: pipe(UnsignedInteger, description(\"Unique request identifier (current timestamp in ms).\")),\n /** Cryptographic signature. */\n signature: pipe(Signature, description(\"Cryptographic signature.\"))\n }), description(\"Transfer funds between Spot account and Perp account.\"));\n })();\n var UsdClassTransferTypes = {\n \"HyperliquidTransaction:UsdClassTransfer\": [\n { name: \"hyperliquidChain\", type: \"string\" },\n { name: \"amount\", type: \"string\" },\n { name: \"toPerp\", type: \"bool\" },\n { name: \"nonce\", type: \"uint64\" }\n ]\n };\n\n // ../../../node_modules/.pnpm/@nktkas+hyperliquid@0.25.7_typescript@5.8.3/node_modules/@nktkas/hyperliquid/esm/src/api/exchange/vaultDistribute.js\n init_dirname();\n init_buffer2();\n init_process2();\n\n // ../../../node_modules/.pnpm/@nktkas+hyperliquid@0.25.7_typescript@5.8.3/node_modules/@nktkas/hyperliquid/esm/src/api/exchange/withdraw3.js\n init_dirname();\n init_buffer2();\n init_process2();\n var Withdraw3Request = /* @__PURE__ */ (() => {\n return pipe(object({\n /** Action to perform. */\n action: pipe(object({\n /** Type of action. */\n type: pipe(literal(\"withdraw3\"), description(\"Type of action.\")),\n /** Chain ID used for signing. */\n signatureChainId: pipe(Hex, description(\"Chain ID used for signing.\")),\n /** HyperLiquid network. */\n hyperliquidChain: pipe(union([literal(\"Mainnet\"), literal(\"Testnet\")]), description(\"HyperLiquid network.\")),\n /** Destination address. */\n destination: pipe(Address, description(\"Destination address.\")),\n /** Amount to withdraw (1 = $1). */\n amount: pipe(UnsignedDecimal, description(\"Amount to withdraw (1 = $1).\")),\n /** Unique request identifier (current timestamp in ms). */\n time: pipe(UnsignedInteger, description(\"Unique request identifier (current timestamp in ms).\"))\n }), description(\"Action to perform.\")),\n /** Unique request identifier (current timestamp in ms). */\n nonce: pipe(UnsignedInteger, description(\"Unique request identifier (current timestamp in ms).\")),\n /** Cryptographic signature. */\n signature: pipe(Signature, description(\"Cryptographic signature.\"))\n }), description(\"Initiate a withdrawal request.\"));\n })();\n var Withdraw3Types = {\n \"HyperliquidTransaction:Withdraw\": [\n { name: \"hyperliquidChain\", type: \"string\" },\n { name: \"destination\", type: \"string\" },\n { name: \"amount\", type: \"string\" },\n { name: \"time\", type: \"uint64\" }\n ]\n };\n\n // ../../../node_modules/.pnpm/@nktkas+hyperliquid@0.25.7_typescript@5.8.3/node_modules/@nktkas/hyperliquid/esm/src/api/exchange/perpDeploy.js\n init_dirname();\n init_buffer2();\n init_process2();\n\n // ../../../node_modules/.pnpm/@nktkas+hyperliquid@0.25.7_typescript@5.8.3/node_modules/@nktkas/hyperliquid/esm/src/api/exchange/sendAsset.js\n init_dirname();\n init_buffer2();\n init_process2();\n\n // ../../../node_modules/.pnpm/@nktkas+hyperliquid@0.25.7_typescript@5.8.3/node_modules/@nktkas/hyperliquid/esm/src/api/exchange/spotSend.js\n init_dirname();\n init_buffer2();\n init_process2();\n var SpotSendRequest = /* @__PURE__ */ (() => {\n return pipe(object({\n /** Action to perform. */\n action: pipe(object({\n /** Type of action. */\n type: pipe(literal(\"spotSend\"), description(\"Type of action.\")),\n /** Chain ID used for signing. */\n signatureChainId: pipe(Hex, description(\"Chain ID used for signing.\")),\n /** HyperLiquid network. */\n hyperliquidChain: pipe(union([literal(\"Mainnet\"), literal(\"Testnet\")]), description(\"HyperLiquid network.\")),\n /** Destination address. */\n destination: pipe(Address, description(\"Destination address.\")),\n /** Token identifier. */\n token: pipe(TokenId, description(\"Token identifier.\")),\n /** Amount to send (not in wei). */\n amount: pipe(UnsignedDecimal, description(\"Amount to send (not in wei).\")),\n /** Unique request identifier (current timestamp in ms). */\n time: pipe(UnsignedInteger, description(\"Unique request identifier (current timestamp in ms).\"))\n }), description(\"Action to perform.\")),\n /** Unique request identifier (current timestamp in ms). */\n nonce: pipe(UnsignedInteger, description(\"Unique request identifier (current timestamp in ms).\")),\n /** Cryptographic signature. */\n signature: pipe(Signature, description(\"Cryptographic signature.\"))\n }), description(\"Send spot assets to another address.\"));\n })();\n var SpotSendTypes = {\n \"HyperliquidTransaction:SpotSend\": [\n { name: \"hyperliquidChain\", type: \"string\" },\n { name: \"destination\", type: \"string\" },\n { name: \"token\", type: \"string\" },\n { name: \"amount\", type: \"string\" },\n { name: \"time\", type: \"uint64\" }\n ]\n };\n\n // ../../../node_modules/.pnpm/@nktkas+hyperliquid@0.25.7_typescript@5.8.3/node_modules/@nktkas/hyperliquid/esm/src/api/exchange/spotUser.js\n init_dirname();\n init_buffer2();\n init_process2();\n\n // ../../../node_modules/.pnpm/@nktkas+hyperliquid@0.25.7_typescript@5.8.3/node_modules/@nktkas/hyperliquid/esm/src/api/exchange/subAccountSpotTransfer.js\n init_dirname();\n init_buffer2();\n init_process2();\n\n // ../../../node_modules/.pnpm/@nktkas+hyperliquid@0.25.7_typescript@5.8.3/node_modules/@nktkas/hyperliquid/esm/src/api/exchange/subAccountTransfer.js\n init_dirname();\n init_buffer2();\n init_process2();\n\n // ../../../node_modules/.pnpm/@nktkas+hyperliquid@0.25.7_typescript@5.8.3/node_modules/@nktkas/hyperliquid/esm/src/api/exchange/twapCancel.js\n init_dirname();\n init_buffer2();\n init_process2();\n\n // ../../../node_modules/.pnpm/@nktkas+hyperliquid@0.25.7_typescript@5.8.3/node_modules/@nktkas/hyperliquid/esm/src/api/exchange/updateIsolatedMargin.js\n init_dirname();\n init_buffer2();\n init_process2();\n\n // ../../../node_modules/.pnpm/@nktkas+hyperliquid@0.25.7_typescript@5.8.3/node_modules/@nktkas/hyperliquid/esm/src/api/exchange/updateLeverage.js\n init_dirname();\n init_buffer2();\n init_process2();\n var UpdateLeverageRequest = /* @__PURE__ */ (() => {\n return pipe(object({\n /** Action to perform. */\n action: pipe(object({\n /** Type of action. */\n type: pipe(literal(\"updateLeverage\"), description(\"Type of action.\")),\n /** Asset ID. */\n asset: pipe(UnsignedInteger, description(\"Asset ID.\")),\n /** `true` for cross leverage, `false` for isolated leverage. */\n isCross: pipe(boolean(), description(\"`true` for cross leverage, `false` for isolated leverage.\")),\n /** New leverage value. */\n leverage: pipe(pipe(UnsignedInteger, minValue(1)), description(\"New leverage value.\"))\n }), description(\"Action to perform.\")),\n /** Unique request identifier (current timestamp in ms). */\n nonce: pipe(UnsignedInteger, description(\"Unique request identifier (current timestamp in ms).\")),\n /** Cryptographic signature. */\n signature: pipe(Signature, description(\"Cryptographic signature.\")),\n /** Vault address (for vault trading). */\n vaultAddress: pipe(optional(Address), description(\"Vault address (for vault trading).\")),\n /** Expiration time of the action. */\n expiresAfter: pipe(optional(UnsignedInteger), description(\"Expiration time of the action.\"))\n }), description(\"Update cross or isolated leverage on a coin.\"));\n })();\n\n // ../../../node_modules/.pnpm/@nktkas+hyperliquid@0.25.7_typescript@5.8.3/node_modules/@nktkas/hyperliquid/esm/src/api/exchange/usdSend.js\n init_dirname();\n init_buffer2();\n init_process2();\n var UsdSendRequest = /* @__PURE__ */ (() => {\n return pipe(object({\n /** Action to perform. */\n action: pipe(object({\n /** Type of action. */\n type: pipe(literal(\"usdSend\"), description(\"Type of action.\")),\n /** Chain ID used for signing. */\n signatureChainId: pipe(Hex, description(\"Chain ID used for signing.\")),\n /** HyperLiquid network. */\n hyperliquidChain: pipe(union([literal(\"Mainnet\"), literal(\"Testnet\")]), description(\"HyperLiquid network.\")),\n /** Destination address. */\n destination: pipe(Address, description(\"Destination address.\")),\n /** Amount to send (1 = $1). */\n amount: pipe(UnsignedDecimal, description(\"Amount to send (1 = $1).\")),\n /** Unique request identifier (current timestamp in ms). */\n time: pipe(UnsignedInteger, description(\"Unique request identifier (current timestamp in ms).\"))\n }), description(\"Action to perform.\")),\n /** Unique request identifier (current timestamp in ms). */\n nonce: pipe(UnsignedInteger, description(\"Unique request identifier (current timestamp in ms).\")),\n /** Cryptographic signature. */\n signature: pipe(Signature, description(\"Cryptographic signature.\"))\n }), description(\"Send usd to another address.\"));\n })();\n var UsdSendTypes = {\n \"HyperliquidTransaction:UsdSend\": [\n { name: \"hyperliquidChain\", type: \"string\" },\n { name: \"destination\", type: \"string\" },\n { name: \"amount\", type: \"string\" },\n { name: \"time\", type: \"uint64\" }\n ]\n };\n\n // ../../../node_modules/.pnpm/@nktkas+hyperliquid@0.25.7_typescript@5.8.3/node_modules/@nktkas/hyperliquid/esm/src/api/exchange/vaultModify.js\n init_dirname();\n init_buffer2();\n init_process2();\n\n // ../../../node_modules/.pnpm/@nktkas+hyperliquid@0.25.7_typescript@5.8.3/node_modules/@nktkas/hyperliquid/esm/src/api/exchange/vaultTransfer.js\n init_dirname();\n init_buffer2();\n init_process2();\n\n // ../../../node_modules/.pnpm/@nktkas+hyperliquid@0.25.7_typescript@5.8.3/node_modules/@nktkas/hyperliquid/esm/src/api/exchange/userDexAbstraction.js\n init_dirname();\n init_buffer2();\n init_process2();\n\n // ../../../node_modules/.pnpm/@nktkas+hyperliquid@0.25.7_typescript@5.8.3/node_modules/@nktkas/hyperliquid/esm/src/api/info/~client.js\n init_dirname();\n init_buffer2();\n init_process2();\n\n // ../../../node_modules/.pnpm/@nktkas+hyperliquid@0.25.7_typescript@5.8.3/node_modules/@nktkas/hyperliquid/esm/src/api/info/activeAssetData.js\n init_dirname();\n init_buffer2();\n init_process2();\n var ActiveAssetDataRequest = /* @__PURE__ */ (() => {\n return pipe(object({\n /** Type of request. */\n type: pipe(literal(\"activeAssetData\"), description(\"Type of request.\")),\n /** Asset symbol (e.g., BTC). */\n coin: pipe(string(), description(\"Asset symbol (e.g., BTC).\")),\n /** User address. */\n user: pipe(Address, description(\"User address.\"))\n }), description(\"Request user active asset data.\"));\n })();\n function activeAssetData(config2, params, signal) {\n const request = parser(ActiveAssetDataRequest)({\n type: \"activeAssetData\",\n ...params\n });\n return config2.transport.request(\"info\", request, signal);\n }\n\n // ../../../node_modules/.pnpm/@nktkas+hyperliquid@0.25.7_typescript@5.8.3/node_modules/@nktkas/hyperliquid/esm/src/api/info/alignedQuoteTokenInfo.js\n init_dirname();\n init_buffer2();\n init_process2();\n var AlignedQuoteTokenInfoRequest = /* @__PURE__ */ (() => {\n return pipe(object({\n /** Type of request. */\n type: pipe(literal(\"alignedQuoteTokenInfo\"), description(\"Type of request.\")),\n /** Token index. */\n token: pipe(UnsignedInteger, description(\"Token index.\"))\n }), description(\"Request supply, rate, and pending payment information for an aligned quote token.\"));\n })();\n function alignedQuoteTokenInfo(config2, params, signal) {\n const request = parser(AlignedQuoteTokenInfoRequest)({\n type: \"alignedQuoteTokenInfo\",\n ...params\n });\n return config2.transport.request(\"info\", request, signal);\n }\n\n // ../../../node_modules/.pnpm/@nktkas+hyperliquid@0.25.7_typescript@5.8.3/node_modules/@nktkas/hyperliquid/esm/src/api/info/allMids.js\n init_dirname();\n init_buffer2();\n init_process2();\n var AllMidsRequest = /* @__PURE__ */ (() => {\n return pipe(object({\n /** Type of request. */\n type: pipe(literal(\"allMids\"), description(\"Type of request.\")),\n /** DEX name (empty string for main dex). */\n dex: pipe(optional(string()), description(\"DEX name (empty string for main dex).\"))\n }), description(\"Request mid coin prices.\"));\n })();\n function allMids(config2, paramsOrSignal, maybeSignal) {\n const params = paramsOrSignal instanceof AbortSignal ? {} : paramsOrSignal;\n const signal = paramsOrSignal instanceof AbortSignal ? paramsOrSignal : maybeSignal;\n const request = parser(AllMidsRequest)({\n type: \"allMids\",\n ...params\n });\n return config2.transport.request(\"info\", request, signal);\n }\n\n // ../../../node_modules/.pnpm/@nktkas+hyperliquid@0.25.7_typescript@5.8.3/node_modules/@nktkas/hyperliquid/esm/src/api/info/allPerpMetas.js\n init_dirname();\n init_buffer2();\n init_process2();\n\n // ../../../node_modules/.pnpm/@nktkas+hyperliquid@0.25.7_typescript@5.8.3/node_modules/@nktkas/hyperliquid/esm/src/api/info/meta.js\n init_dirname();\n init_buffer2();\n init_process2();\n\n // ../../../node_modules/.pnpm/@nktkas+hyperliquid@0.25.7_typescript@5.8.3/node_modules/@nktkas/hyperliquid/esm/src/api/info/marginTable.js\n init_dirname();\n init_buffer2();\n init_process2();\n var MarginTableRequest = /* @__PURE__ */ (() => {\n return pipe(object({\n /** Type of request. */\n type: pipe(literal(\"marginTable\"), description(\"Type of request.\")),\n /** Margin requirements table. */\n id: pipe(UnsignedInteger, description(\"Margin requirements table.\"))\n }), description(\"Request margin table data.\"));\n })();\n function marginTable(config2, params, signal) {\n const request = parser(MarginTableRequest)({\n type: \"marginTable\",\n ...params\n });\n return config2.transport.request(\"info\", request, signal);\n }\n\n // ../../../node_modules/.pnpm/@nktkas+hyperliquid@0.25.7_typescript@5.8.3/node_modules/@nktkas/hyperliquid/esm/src/api/info/meta.js\n var MetaRequest = /* @__PURE__ */ (() => {\n return pipe(object({\n /** Type of request. */\n type: pipe(literal(\"meta\"), description(\"Type of request.\")),\n /** DEX name (empty string for main dex). */\n dex: pipe(optional(string()), description(\"DEX name (empty string for main dex).\"))\n }), description(\"Request trading metadata.\"));\n })();\n function meta(config2, paramsOrSignal, maybeSignal) {\n const params = paramsOrSignal instanceof AbortSignal ? {} : paramsOrSignal;\n const signal = paramsOrSignal instanceof AbortSignal ? paramsOrSignal : maybeSignal;\n const request = parser(MetaRequest)({\n type: \"meta\",\n ...params\n });\n return config2.transport.request(\"info\", request, signal);\n }\n\n // ../../../node_modules/.pnpm/@nktkas+hyperliquid@0.25.7_typescript@5.8.3/node_modules/@nktkas/hyperliquid/esm/src/api/info/allPerpMetas.js\n var AllPerpMetasRequest = /* @__PURE__ */ (() => {\n return pipe(object({\n /** Type of request. */\n type: pipe(literal(\"allPerpMetas\"), description(\"Type of request.\"))\n }), description(\"Request trading metadata for all DEXes.\"));\n })();\n function allPerpMetas(config2, signal) {\n const request = parser(AllPerpMetasRequest)({\n type: \"allPerpMetas\"\n });\n return config2.transport.request(\"info\", request, signal);\n }\n\n // ../../../node_modules/.pnpm/@nktkas+hyperliquid@0.25.7_typescript@5.8.3/node_modules/@nktkas/hyperliquid/esm/src/api/info/blockDetails.js\n init_dirname();\n init_buffer2();\n init_process2();\n var BlockDetailsRequest = /* @__PURE__ */ (() => {\n return pipe(object({\n /** Type of request. */\n type: pipe(literal(\"blockDetails\"), description(\"Type of request.\")),\n /** Block height. */\n height: pipe(UnsignedInteger, description(\"Block height.\"))\n }), description(\"Request block details by block height.\"));\n })();\n function blockDetails(config2, params, signal) {\n const request = parser(BlockDetailsRequest)({\n type: \"blockDetails\",\n ...params\n });\n return config2.transport.request(\"explorer\", request, signal);\n }\n\n // ../../../node_modules/.pnpm/@nktkas+hyperliquid@0.25.7_typescript@5.8.3/node_modules/@nktkas/hyperliquid/esm/src/api/info/candleSnapshot.js\n init_dirname();\n init_buffer2();\n init_process2();\n var CandleSnapshotRequest = /* @__PURE__ */ (() => {\n return pipe(object({\n /** Type of request. */\n type: pipe(literal(\"candleSnapshot\"), description(\"Type of request.\")),\n /** Request parameters. */\n req: pipe(object({\n /** Asset symbol (e.g., BTC). */\n coin: pipe(string(), description(\"Asset symbol (e.g., BTC).\")),\n /** Time interval. */\n interval: CandleIntervalSchema,\n /** Start time (in ms since epoch). */\n startTime: pipe(UnsignedInteger, description(\"Start time (in ms since epoch).\")),\n /** End time (in ms since epoch). */\n endTime: pipe(nullish(UnsignedInteger), description(\"End time (in ms since epoch).\"))\n }), description(\"Request parameters.\"))\n }), description(\"Request candlestick snapshots.\"));\n })();\n function candleSnapshot(config2, params, signal) {\n const request = parser(CandleSnapshotRequest)({\n type: \"candleSnapshot\",\n req: params\n });\n return config2.transport.request(\"info\", request, signal);\n }\n\n // ../../../node_modules/.pnpm/@nktkas+hyperliquid@0.25.7_typescript@5.8.3/node_modules/@nktkas/hyperliquid/esm/src/api/info/clearinghouseState.js\n init_dirname();\n init_buffer2();\n init_process2();\n var ClearinghouseStateRequest = /* @__PURE__ */ (() => {\n return pipe(object({\n /** Type of request. */\n type: pipe(literal(\"clearinghouseState\"), description(\"Type of request.\")),\n /** User address. */\n user: pipe(Address, description(\"User address.\")),\n /** DEX name (empty string for main dex). */\n dex: pipe(optional(string()), description(\"DEX name (empty string for main dex).\"))\n }), description(\"Request clearinghouse state.\"));\n })();\n function clearinghouseState(config2, params, signal) {\n const request = parser(ClearinghouseStateRequest)({\n type: \"clearinghouseState\",\n ...params\n });\n return config2.transport.request(\"info\", request, signal);\n }\n\n // ../../../node_modules/.pnpm/@nktkas+hyperliquid@0.25.7_typescript@5.8.3/node_modules/@nktkas/hyperliquid/esm/src/api/info/delegations.js\n init_dirname();\n init_buffer2();\n init_process2();\n var DelegationsRequest = /* @__PURE__ */ (() => {\n return pipe(object({\n /** Type of request. */\n type: pipe(literal(\"delegations\"), description(\"Type of request.\")),\n /** User address. */\n user: pipe(Address, description(\"User address.\"))\n }), description(\"Request user staking delegations.\"));\n })();\n function delegations(config2, params, signal) {\n const request = parser(DelegationsRequest)({\n type: \"delegations\",\n ...params\n });\n return config2.transport.request(\"info\", request, signal);\n }\n\n // ../../../node_modules/.pnpm/@nktkas+hyperliquid@0.25.7_typescript@5.8.3/node_modules/@nktkas/hyperliquid/esm/src/api/info/delegatorHistory.js\n init_dirname();\n init_buffer2();\n init_process2();\n var DelegatorHistoryRequest = /* @__PURE__ */ (() => {\n return pipe(object({\n /** Type of request. */\n type: pipe(literal(\"delegatorHistory\"), description(\"Type of request.\")),\n /** User address. */\n user: pipe(Address, description(\"User address.\"))\n }), description(\"Request user staking history.\"));\n })();\n function delegatorHistory(config2, params, signal) {\n const request = parser(DelegatorHistoryRequest)({\n type: \"delegatorHistory\",\n ...params\n });\n return config2.transport.request(\"info\", request, signal);\n }\n\n // ../../../node_modules/.pnpm/@nktkas+hyperliquid@0.25.7_typescript@5.8.3/node_modules/@nktkas/hyperliquid/esm/src/api/info/delegatorRewards.js\n init_dirname();\n init_buffer2();\n init_process2();\n var DelegatorRewardsRequest = /* @__PURE__ */ (() => {\n return pipe(object({\n /** Type of request. */\n type: pipe(literal(\"delegatorRewards\"), description(\"Type of request.\")),\n /** User address. */\n user: pipe(Address, description(\"User address.\"))\n }), description(\"Request user staking rewards.\"));\n })();\n function delegatorRewards(config2, params, signal) {\n const request = parser(DelegatorRewardsRequest)({\n type: \"delegatorRewards\",\n ...params\n });\n return config2.transport.request(\"info\", request, signal);\n }\n\n // ../../../node_modules/.pnpm/@nktkas+hyperliquid@0.25.7_typescript@5.8.3/node_modules/@nktkas/hyperliquid/esm/src/api/info/delegatorSummary.js\n init_dirname();\n init_buffer2();\n init_process2();\n var DelegatorSummaryRequest = /* @__PURE__ */ (() => {\n return pipe(object({\n /** Type of request. */\n type: pipe(literal(\"delegatorSummary\"), description(\"Type of request.\")),\n /** User address. */\n user: pipe(Address, description(\"User address.\"))\n }), description(\"Request user's staking summary.\"));\n })();\n function delegatorSummary(config2, params, signal) {\n const request = parser(DelegatorSummaryRequest)({\n type: \"delegatorSummary\",\n ...params\n });\n return config2.transport.request(\"info\", request, signal);\n }\n\n // ../../../node_modules/.pnpm/@nktkas+hyperliquid@0.25.7_typescript@5.8.3/node_modules/@nktkas/hyperliquid/esm/src/api/info/exchangeStatus.js\n init_dirname();\n init_buffer2();\n init_process2();\n var ExchangeStatusRequest = /* @__PURE__ */ (() => {\n return pipe(object({\n /** Type of request. */\n type: pipe(literal(\"exchangeStatus\"), description(\"Type of request.\"))\n }), description(\"Request exchange system status information.\"));\n })();\n function exchangeStatus(config2, signal) {\n const request = parser(ExchangeStatusRequest)({\n type: \"exchangeStatus\"\n });\n return config2.transport.request(\"info\", request, signal);\n }\n\n // ../../../node_modules/.pnpm/@nktkas+hyperliquid@0.25.7_typescript@5.8.3/node_modules/@nktkas/hyperliquid/esm/src/api/info/extraAgents.js\n init_dirname();\n init_buffer2();\n init_process2();\n var ExtraAgentsRequest = /* @__PURE__ */ (() => {\n return pipe(object({\n /** Type of request. */\n type: pipe(literal(\"extraAgents\"), description(\"Type of request.\")),\n /** User address. */\n user: pipe(Address, description(\"User address.\"))\n }), description(\"Request user extra agents.\"));\n })();\n function extraAgents(config2, params, signal) {\n const request = parser(ExtraAgentsRequest)({\n type: \"extraAgents\",\n ...params\n });\n return config2.transport.request(\"info\", request, signal);\n }\n\n // ../../../node_modules/.pnpm/@nktkas+hyperliquid@0.25.7_typescript@5.8.3/node_modules/@nktkas/hyperliquid/esm/src/api/info/frontendOpenOrders.js\n init_dirname();\n init_buffer2();\n init_process2();\n var FrontendOpenOrdersRequest = /* @__PURE__ */ (() => {\n return pipe(object({\n /** Type of request. */\n type: pipe(literal(\"frontendOpenOrders\"), description(\"Type of request.\")),\n /** User address. */\n user: pipe(Address, description(\"User address.\")),\n /** DEX name (empty string for main dex). */\n dex: pipe(optional(string()), description(\"DEX name (empty string for main dex).\"))\n }), description(\"Request frontend open orders.\"));\n })();\n function frontendOpenOrders(config2, params, signal) {\n const request = parser(FrontendOpenOrdersRequest)({\n type: \"frontendOpenOrders\",\n ...params\n });\n return config2.transport.request(\"info\", request, signal);\n }\n\n // ../../../node_modules/.pnpm/@nktkas+hyperliquid@0.25.7_typescript@5.8.3/node_modules/@nktkas/hyperliquid/esm/src/api/info/fundingHistory.js\n init_dirname();\n init_buffer2();\n init_process2();\n var FundingHistoryRequest = /* @__PURE__ */ (() => {\n return pipe(object({\n /** Type of request. */\n type: pipe(literal(\"fundingHistory\"), description(\"Type of request.\")),\n /** Asset symbol (e.g., BTC). */\n coin: pipe(string(), description(\"Asset symbol (e.g., BTC).\")),\n /** Start time (in ms since epoch). */\n startTime: pipe(UnsignedInteger, description(\"Start time (in ms since epoch).\")),\n /** End time (in ms since epoch). */\n endTime: pipe(nullish(UnsignedInteger), description(\"End time (in ms since epoch).\"))\n }), description(\"Request funding history.\"));\n })();\n function fundingHistory(config2, params, signal) {\n const request = parser(FundingHistoryRequest)({\n type: \"fundingHistory\",\n ...params\n });\n return config2.transport.request(\"info\", request, signal);\n }\n\n // ../../../node_modules/.pnpm/@nktkas+hyperliquid@0.25.7_typescript@5.8.3/node_modules/@nktkas/hyperliquid/esm/src/api/info/gossipRootIps.js\n init_dirname();\n init_buffer2();\n init_process2();\n var GossipRootIpsRequest = /* @__PURE__ */ (() => {\n return pipe(object({\n /** Type of request. */\n type: pipe(literal(\"gossipRootIps\"), description(\"Type of request.\"))\n }), description(\"Request gossip root IPs.\"));\n })();\n function gossipRootIps(config2, signal) {\n const request = parser(GossipRootIpsRequest)({\n type: \"gossipRootIps\"\n });\n return config2.transport.request(\"info\", request, signal);\n }\n\n // ../../../node_modules/.pnpm/@nktkas+hyperliquid@0.25.7_typescript@5.8.3/node_modules/@nktkas/hyperliquid/esm/src/api/info/historicalOrders.js\n init_dirname();\n init_buffer2();\n init_process2();\n var HistoricalOrdersRequest = /* @__PURE__ */ (() => {\n return pipe(object({\n /** Type of request. */\n type: pipe(literal(\"historicalOrders\"), description(\"Type of request.\")),\n /** User address. */\n user: pipe(Address, description(\"User address.\"))\n }), description(\"Request user historical orders.\"));\n })();\n function historicalOrders(config2, params, signal) {\n const request = parser(HistoricalOrdersRequest)({\n type: \"historicalOrders\",\n ...params\n });\n return config2.transport.request(\"info\", request, signal);\n }\n\n // ../../../node_modules/.pnpm/@nktkas+hyperliquid@0.25.7_typescript@5.8.3/node_modules/@nktkas/hyperliquid/esm/src/api/info/isVip.js\n init_dirname();\n init_buffer2();\n init_process2();\n var IsVipRequest = /* @__PURE__ */ (() => {\n return pipe(object({\n /** Type of request. */\n type: pipe(literal(\"isVip\"), description(\"Type of request.\")),\n /** User address. */\n user: pipe(Address, description(\"User address.\"))\n }), description(\"Request to check if a user is a VIP.\"));\n })();\n function isVip(config2, params, signal) {\n const request = parser(IsVipRequest)({\n type: \"isVip\",\n ...params\n });\n return config2.transport.request(\"info\", request, signal);\n }\n\n // ../../../node_modules/.pnpm/@nktkas+hyperliquid@0.25.7_typescript@5.8.3/node_modules/@nktkas/hyperliquid/esm/src/api/info/l2Book.js\n init_dirname();\n init_buffer2();\n init_process2();\n var L2BookRequest = /* @__PURE__ */ (() => {\n return pipe(object({\n /** Type of request. */\n type: pipe(literal(\"l2Book\"), description(\"Type of request.\")),\n /** Asset symbol (e.g., BTC). */\n coin: pipe(string(), description(\"Asset symbol (e.g., BTC).\")),\n /** Number of significant figures. */\n nSigFigs: pipe(nullish(pipe(Integer, union([literal(2), literal(3), literal(4), literal(5)]))), description(\"Number of significant figures.\")),\n /** Mantissa for aggregation (if `nSigFigs` is 5). */\n mantissa: pipe(nullish(pipe(Integer, union([literal(2), literal(5)]))), description(\"Mantissa for aggregation (if `nSigFigs` is 5).\"))\n }), description(\"Request L2 order book.\"));\n })();\n function l2Book(config2, params, signal) {\n const request = parser(L2BookRequest)({\n type: \"l2Book\",\n ...params\n });\n return config2.transport.request(\"info\", request, signal);\n }\n\n // ../../../node_modules/.pnpm/@nktkas+hyperliquid@0.25.7_typescript@5.8.3/node_modules/@nktkas/hyperliquid/esm/src/api/info/leadingVaults.js\n init_dirname();\n init_buffer2();\n init_process2();\n var LeadingVaultsRequest = /* @__PURE__ */ (() => {\n return pipe(object({\n /** Type of request. */\n type: pipe(literal(\"leadingVaults\"), description(\"Type of request.\")),\n /** User address. */\n user: pipe(Address, description(\"User address.\"))\n }), description(\"Request leading vaults for a user.\"));\n })();\n function leadingVaults(config2, params, signal) {\n const request = parser(LeadingVaultsRequest)({\n type: \"leadingVaults\",\n ...params\n });\n return config2.transport.request(\"info\", request, signal);\n }\n\n // ../../../node_modules/.pnpm/@nktkas+hyperliquid@0.25.7_typescript@5.8.3/node_modules/@nktkas/hyperliquid/esm/src/api/info/legalCheck.js\n init_dirname();\n init_buffer2();\n init_process2();\n var LegalCheckRequest = /* @__PURE__ */ (() => {\n return pipe(object({\n /** Type of request. */\n type: pipe(literal(\"legalCheck\"), description(\"Type of request.\")),\n /** User address. */\n user: pipe(Address, description(\"User address.\"))\n }), description(\"Request legal verification status of a user.\"));\n })();\n function legalCheck(config2, params, signal) {\n const request = parser(LegalCheckRequest)({\n type: \"legalCheck\",\n ...params\n });\n return config2.transport.request(\"info\", request, signal);\n }\n\n // ../../../node_modules/.pnpm/@nktkas+hyperliquid@0.25.7_typescript@5.8.3/node_modules/@nktkas/hyperliquid/esm/src/api/info/liquidatable.js\n init_dirname();\n init_buffer2();\n init_process2();\n var LiquidatableRequest = /* @__PURE__ */ (() => {\n return pipe(object({\n /** Type of request. */\n type: pipe(literal(\"liquidatable\"), description(\"Type of request.\"))\n }), description(\"Request liquidatable.\"));\n })();\n function liquidatable(config2, signal) {\n const request = parser(LiquidatableRequest)({\n type: \"liquidatable\"\n });\n return config2.transport.request(\"info\", request, signal);\n }\n\n // ../../../node_modules/.pnpm/@nktkas+hyperliquid@0.25.7_typescript@5.8.3/node_modules/@nktkas/hyperliquid/esm/src/api/info/maxBuilderFee.js\n init_dirname();\n init_buffer2();\n init_process2();\n var MaxBuilderFeeRequest = /* @__PURE__ */ (() => {\n return pipe(object({\n /** Type of request. */\n type: pipe(literal(\"maxBuilderFee\"), description(\"Type of request.\")),\n /** User address. */\n user: pipe(Address, description(\"User address.\")),\n /** Builder address. */\n builder: pipe(Address, description(\"Builder address.\"))\n }), description(\"Request builder fee approval.\"));\n })();\n function maxBuilderFee(config2, params, signal) {\n const request = parser(MaxBuilderFeeRequest)({\n type: \"maxBuilderFee\",\n ...params\n });\n return config2.transport.request(\"info\", request, signal);\n }\n\n // ../../../node_modules/.pnpm/@nktkas+hyperliquid@0.25.7_typescript@5.8.3/node_modules/@nktkas/hyperliquid/esm/src/api/info/maxMarketOrderNtls.js\n init_dirname();\n init_buffer2();\n init_process2();\n var MaxMarketOrderNtlsRequest = /* @__PURE__ */ (() => {\n return pipe(object({\n /** Type of request. */\n type: pipe(literal(\"maxMarketOrderNtls\"), description(\"Type of request.\"))\n }), description(\"Request maximum market order notionals.\"));\n })();\n function maxMarketOrderNtls(config2, signal) {\n const request = parser(MaxMarketOrderNtlsRequest)({\n type: \"maxMarketOrderNtls\"\n });\n return config2.transport.request(\"info\", request, signal);\n }\n\n // ../../../node_modules/.pnpm/@nktkas+hyperliquid@0.25.7_typescript@5.8.3/node_modules/@nktkas/hyperliquid/esm/src/api/info/metaAndAssetCtxs.js\n init_dirname();\n init_buffer2();\n init_process2();\n var MetaAndAssetCtxsRequest = /* @__PURE__ */ (() => {\n return pipe(object({\n /** Type of request. */\n type: pipe(literal(\"metaAndAssetCtxs\"), description(\"Type of request.\")),\n /** DEX name (empty string for main dex). */\n dex: pipe(optional(string()), description(\"DEX name (empty string for main dex).\"))\n }), description(\"Request metadata and asset contexts.\"));\n })();\n function metaAndAssetCtxs(config2, paramsOrSignal, maybeSignal) {\n const params = paramsOrSignal instanceof AbortSignal ? {} : paramsOrSignal;\n const signal = paramsOrSignal instanceof AbortSignal ? paramsOrSignal : maybeSignal;\n const request = parser(MetaAndAssetCtxsRequest)({\n type: \"metaAndAssetCtxs\",\n ...params\n });\n return config2.transport.request(\"info\", request, signal);\n }\n\n // ../../../node_modules/.pnpm/@nktkas+hyperliquid@0.25.7_typescript@5.8.3/node_modules/@nktkas/hyperliquid/esm/src/api/info/openOrders.js\n init_dirname();\n init_buffer2();\n init_process2();\n var OpenOrdersRequest = /* @__PURE__ */ (() => {\n return pipe(object({\n /** Type of request. */\n type: pipe(literal(\"openOrders\"), description(\"Type of request.\")),\n /** User address. */\n user: pipe(Address, description(\"User address.\")),\n /** DEX name (empty string for main dex). */\n dex: pipe(optional(string()), description(\"DEX name (empty string for main dex).\"))\n }), description(\"Request open orders.\"));\n })();\n function openOrders(config2, params, signal) {\n const request = parser(OpenOrdersRequest)({\n type: \"openOrders\",\n ...params\n });\n return config2.transport.request(\"info\", request, signal);\n }\n\n // ../../../node_modules/.pnpm/@nktkas+hyperliquid@0.25.7_typescript@5.8.3/node_modules/@nktkas/hyperliquid/esm/src/api/info/orderStatus.js\n init_dirname();\n init_buffer2();\n init_process2();\n var OrderStatusRequest = /* @__PURE__ */ (() => {\n return pipe(object({\n /** Type of request. */\n type: pipe(literal(\"orderStatus\"), description(\"Type of request.\")),\n /** User address. */\n user: pipe(Address, description(\"User address.\")),\n /** Order ID or Client Order ID. */\n oid: pipe(union([UnsignedInteger, pipe(Hex, length(34))]), description(\"Order ID or Client Order ID.\"))\n }), description(\"Request order status.\"));\n })();\n function orderStatus(config2, params, signal) {\n const request = parser(OrderStatusRequest)({\n type: \"orderStatus\",\n ...params\n });\n return config2.transport.request(\"info\", request, signal);\n }\n\n // ../../../node_modules/.pnpm/@nktkas+hyperliquid@0.25.7_typescript@5.8.3/node_modules/@nktkas/hyperliquid/esm/src/api/info/perpDeployAuctionStatus.js\n init_dirname();\n init_buffer2();\n init_process2();\n var PerpDeployAuctionStatusRequest = /* @__PURE__ */ (() => {\n return pipe(object({\n /** Type of request. */\n type: pipe(literal(\"perpDeployAuctionStatus\"), description(\"Type of request.\"))\n }), description(\"Request for the status of the perpetual deploy auction.\"));\n })();\n function perpDeployAuctionStatus(config2, signal) {\n const request = parser(PerpDeployAuctionStatusRequest)({\n type: \"perpDeployAuctionStatus\"\n });\n return config2.transport.request(\"info\", request, signal);\n }\n\n // ../../../node_modules/.pnpm/@nktkas+hyperliquid@0.25.7_typescript@5.8.3/node_modules/@nktkas/hyperliquid/esm/src/api/info/perpDexLimits.js\n init_dirname();\n init_buffer2();\n init_process2();\n var PerpDexLimitsRequest = /* @__PURE__ */ (() => {\n return pipe(object({\n /** Type of request. */\n type: pipe(literal(\"perpDexLimits\"), description(\"Type of request.\")),\n /** DEX name (empty string for main dex). */\n dex: pipe(string(), description(\"DEX name (empty string for main dex).\"))\n }), description(\"Request builder deployed perpetual market limits.\"));\n })();\n function perpDexLimits(config2, params, signal) {\n const request = parser(PerpDexLimitsRequest)({\n type: \"perpDexLimits\",\n ...params\n });\n return config2.transport.request(\"info\", request, signal);\n }\n\n // ../../../node_modules/.pnpm/@nktkas+hyperliquid@0.25.7_typescript@5.8.3/node_modules/@nktkas/hyperliquid/esm/src/api/info/perpDexs.js\n init_dirname();\n init_buffer2();\n init_process2();\n var PerpDexsRequest = /* @__PURE__ */ (() => {\n return pipe(object({\n /** Type of request. */\n type: pipe(literal(\"perpDexs\"), description(\"Type of request.\"))\n }), description(\"Request all perpetual dexs.\"));\n })();\n function perpDexs(config2, signal) {\n const request = parser(PerpDexsRequest)({\n type: \"perpDexs\"\n });\n return config2.transport.request(\"info\", request, signal);\n }\n\n // ../../../node_modules/.pnpm/@nktkas+hyperliquid@0.25.7_typescript@5.8.3/node_modules/@nktkas/hyperliquid/esm/src/api/info/perpsAtOpenInterestCap.js\n init_dirname();\n init_buffer2();\n init_process2();\n var PerpsAtOpenInterestCapRequest = /* @__PURE__ */ (() => {\n return pipe(object({\n /** Type of request. */\n type: pipe(literal(\"perpsAtOpenInterestCap\"), description(\"Type of request.\")),\n /** DEX name (empty string for main dex). */\n dex: pipe(optional(string()), description(\"DEX name (empty string for main dex).\"))\n }), description(\"Request perpetuals at open interest cap.\"));\n })();\n function perpsAtOpenInterestCap(config2, paramsOrSignal, maybeSignal) {\n const params = paramsOrSignal instanceof AbortSignal ? {} : paramsOrSignal;\n const signal = paramsOrSignal instanceof AbortSignal ? paramsOrSignal : maybeSignal;\n const request = parser(PerpsAtOpenInterestCapRequest)({\n type: \"perpsAtOpenInterestCap\",\n ...params\n });\n return config2.transport.request(\"info\", request, signal);\n }\n\n // ../../../node_modules/.pnpm/@nktkas+hyperliquid@0.25.7_typescript@5.8.3/node_modules/@nktkas/hyperliquid/esm/src/api/info/portfolio.js\n init_dirname();\n init_buffer2();\n init_process2();\n var PortfolioRequest = /* @__PURE__ */ (() => {\n return pipe(object({\n /** Type of request. */\n type: pipe(literal(\"portfolio\"), description(\"Type of request.\")),\n /** User address. */\n user: pipe(Address, description(\"User address.\"))\n }), description(\"Request user portfolio.\"));\n })();\n function portfolio(config2, params, signal) {\n const request = parser(PortfolioRequest)({\n type: \"portfolio\",\n ...params\n });\n return config2.transport.request(\"info\", request, signal);\n }\n\n // ../../../node_modules/.pnpm/@nktkas+hyperliquid@0.25.7_typescript@5.8.3/node_modules/@nktkas/hyperliquid/esm/src/api/info/predictedFundings.js\n init_dirname();\n init_buffer2();\n init_process2();\n var PredictedFundingsRequest = /* @__PURE__ */ (() => {\n return pipe(object({\n /** Type of request. */\n type: pipe(literal(\"predictedFundings\"), description(\"Type of request.\"))\n }), description(\"Request predicted funding rates.\"));\n })();\n function predictedFundings(config2, signal) {\n const request = parser(PredictedFundingsRequest)({\n type: \"predictedFundings\"\n });\n return config2.transport.request(\"info\", request, signal);\n }\n\n // ../../../node_modules/.pnpm/@nktkas+hyperliquid@0.25.7_typescript@5.8.3/node_modules/@nktkas/hyperliquid/esm/src/api/info/preTransferCheck.js\n init_dirname();\n init_buffer2();\n init_process2();\n var PreTransferCheckRequest = /* @__PURE__ */ (() => {\n return pipe(object({\n /** Type of request. */\n type: pipe(literal(\"preTransferCheck\"), description(\"Type of request.\")),\n /** User address. */\n user: pipe(Address, description(\"User address.\")),\n /** Source address. */\n source: pipe(Address, description(\"Source address.\"))\n }), description(\"Request user existence check before transfer.\"));\n })();\n function preTransferCheck(config2, params, signal) {\n const request = parser(PreTransferCheckRequest)({\n type: \"preTransferCheck\",\n ...params\n });\n return config2.transport.request(\"info\", request, signal);\n }\n\n // ../../../node_modules/.pnpm/@nktkas+hyperliquid@0.25.7_typescript@5.8.3/node_modules/@nktkas/hyperliquid/esm/src/api/info/recentTrades.js\n init_dirname();\n init_buffer2();\n init_process2();\n var RecentTradesRequest = /* @__PURE__ */ (() => {\n return pipe(object({\n /** Type of request. */\n type: pipe(literal(\"recentTrades\"), description(\"Type of request.\")),\n /** Asset symbol (e.g., BTC). */\n coin: pipe(string(), description(\"Asset symbol (e.g., BTC).\"))\n }), description(\"Request recent trades.\"));\n })();\n function recentTrades(config2, params, signal) {\n const request = parser(RecentTradesRequest)({\n type: \"recentTrades\",\n ...params\n });\n return config2.transport.request(\"info\", request, signal);\n }\n\n // ../../../node_modules/.pnpm/@nktkas+hyperliquid@0.25.7_typescript@5.8.3/node_modules/@nktkas/hyperliquid/esm/src/api/info/referral.js\n init_dirname();\n init_buffer2();\n init_process2();\n var ReferralRequest = /* @__PURE__ */ (() => {\n return pipe(object({\n /** Type of request. */\n type: pipe(literal(\"referral\"), description(\"Type of request.\")),\n /** User address. */\n user: pipe(Address, description(\"User address.\"))\n }), description(\"Request user referral.\"));\n })();\n function referral(config2, params, signal) {\n const request = parser(ReferralRequest)({\n type: \"referral\",\n ...params\n });\n return config2.transport.request(\"info\", request, signal);\n }\n\n // ../../../node_modules/.pnpm/@nktkas+hyperliquid@0.25.7_typescript@5.8.3/node_modules/@nktkas/hyperliquid/esm/src/api/info/spotClearinghouseState.js\n init_dirname();\n init_buffer2();\n init_process2();\n var SpotClearinghouseStateRequest = /* @__PURE__ */ (() => {\n return pipe(object({\n /** Type of request. */\n type: pipe(literal(\"spotClearinghouseState\"), description(\"Type of request.\")),\n /** User address. */\n user: pipe(Address, description(\"User address.\")),\n /** DEX name (empty string for main dex). */\n dex: pipe(optional(string()), description(\"DEX name (empty string for main dex).\"))\n }), description(\"Request spot clearinghouse state.\"));\n })();\n function spotClearinghouseState(config2, params, signal) {\n const request = parser(SpotClearinghouseStateRequest)({\n type: \"spotClearinghouseState\",\n ...params\n });\n return config2.transport.request(\"info\", request, signal);\n }\n\n // ../../../node_modules/.pnpm/@nktkas+hyperliquid@0.25.7_typescript@5.8.3/node_modules/@nktkas/hyperliquid/esm/src/api/info/spotDeployState.js\n init_dirname();\n init_buffer2();\n init_process2();\n var SpotDeployStateRequest = /* @__PURE__ */ (() => {\n return pipe(object({\n /** Type of request. */\n type: pipe(literal(\"spotDeployState\"), description(\"Type of request.\")),\n /** User address. */\n user: pipe(Address, description(\"User address.\"))\n }), description(\"Request spot deploy state.\"));\n })();\n function spotDeployState(config2, params, signal) {\n const request = parser(SpotDeployStateRequest)({\n type: \"spotDeployState\",\n ...params\n });\n return config2.transport.request(\"info\", request, signal);\n }\n\n // ../../../node_modules/.pnpm/@nktkas+hyperliquid@0.25.7_typescript@5.8.3/node_modules/@nktkas/hyperliquid/esm/src/api/info/spotMeta.js\n init_dirname();\n init_buffer2();\n init_process2();\n var SpotMetaRequest = /* @__PURE__ */ (() => {\n return pipe(object({\n /** Type of request. */\n type: pipe(literal(\"spotMeta\"), description(\"Type of request.\"))\n }), description(\"Request spot trading metadata.\"));\n })();\n function spotMeta(config2, signal) {\n const request = parser(SpotMetaRequest)({\n type: \"spotMeta\"\n });\n return config2.transport.request(\"info\", request, signal);\n }\n\n // ../../../node_modules/.pnpm/@nktkas+hyperliquid@0.25.7_typescript@5.8.3/node_modules/@nktkas/hyperliquid/esm/src/api/info/spotMetaAndAssetCtxs.js\n init_dirname();\n init_buffer2();\n init_process2();\n var SpotMetaAndAssetCtxsRequest = /* @__PURE__ */ (() => {\n return pipe(object({\n /** Type of request. */\n type: pipe(literal(\"spotMetaAndAssetCtxs\"), description(\"Type of request.\"))\n }), description(\"Request spot metadata and asset contexts.\"));\n })();\n function spotMetaAndAssetCtxs(config2, signal) {\n const request = parser(SpotMetaAndAssetCtxsRequest)({\n type: \"spotMetaAndAssetCtxs\"\n });\n return config2.transport.request(\"info\", request, signal);\n }\n\n // ../../../node_modules/.pnpm/@nktkas+hyperliquid@0.25.7_typescript@5.8.3/node_modules/@nktkas/hyperliquid/esm/src/api/info/spotPairDeployAuctionStatus.js\n init_dirname();\n init_buffer2();\n init_process2();\n var SpotPairDeployAuctionStatusRequest = /* @__PURE__ */ (() => {\n return pipe(object({\n /** Type of request. */\n type: pipe(literal(\"spotPairDeployAuctionStatus\"), description(\"Type of request.\"))\n }), description(\"Request for the status of the spot deploy auction.\"));\n })();\n function spotPairDeployAuctionStatus(config2, signal) {\n const request = parser(SpotPairDeployAuctionStatusRequest)({\n type: \"spotPairDeployAuctionStatus\"\n });\n return config2.transport.request(\"info\", request, signal);\n }\n\n // ../../../node_modules/.pnpm/@nktkas+hyperliquid@0.25.7_typescript@5.8.3/node_modules/@nktkas/hyperliquid/esm/src/api/info/subAccounts.js\n init_dirname();\n init_buffer2();\n init_process2();\n var SubAccountsRequest = /* @__PURE__ */ (() => {\n return pipe(object({\n /** Type of request. */\n type: pipe(literal(\"subAccounts\"), description(\"Type of request.\")),\n /** User address. */\n user: pipe(Address, description(\"User address.\"))\n }), description(\"Request user sub-accounts.\"));\n })();\n function subAccounts(config2, params, signal) {\n const request = parser(SubAccountsRequest)({\n type: \"subAccounts\",\n ...params\n });\n return config2.transport.request(\"info\", request, signal);\n }\n\n // ../../../node_modules/.pnpm/@nktkas+hyperliquid@0.25.7_typescript@5.8.3/node_modules/@nktkas/hyperliquid/esm/src/api/info/subAccounts2.js\n init_dirname();\n init_buffer2();\n init_process2();\n var SubAccounts2Request = /* @__PURE__ */ (() => {\n return pipe(object({\n /** Type of request. */\n type: pipe(literal(\"subAccounts2\"), description(\"Type of request.\")),\n /** User address. */\n user: pipe(Address, description(\"User address.\"))\n }), description(\"Request user sub-accounts.\"));\n })();\n function subAccounts2(config2, params, signal) {\n const request = parser(SubAccounts2Request)({\n type: \"subAccounts2\",\n ...params\n });\n return config2.transport.request(\"info\", request, signal);\n }\n\n // ../../../node_modules/.pnpm/@nktkas+hyperliquid@0.25.7_typescript@5.8.3/node_modules/@nktkas/hyperliquid/esm/src/api/info/tokenDetails.js\n init_dirname();\n init_buffer2();\n init_process2();\n var TokenDetailsRequest = /* @__PURE__ */ (() => {\n return pipe(object({\n /** Type of request. */\n type: pipe(literal(\"tokenDetails\"), description(\"Type of request.\")),\n /** Token ID. */\n tokenId: pipe(pipe(Hex, length(34)), description(\"Token ID.\"))\n }), description(\"Request token details.\"));\n })();\n function tokenDetails(config2, params, signal) {\n const request = parser(TokenDetailsRequest)({\n type: \"tokenDetails\",\n ...params\n });\n return config2.transport.request(\"info\", request, signal);\n }\n\n // ../../../node_modules/.pnpm/@nktkas+hyperliquid@0.25.7_typescript@5.8.3/node_modules/@nktkas/hyperliquid/esm/src/api/info/twapHistory.js\n init_dirname();\n init_buffer2();\n init_process2();\n var TwapHistoryRequest = /* @__PURE__ */ (() => {\n return pipe(object({\n /** Type of request. */\n type: pipe(literal(\"twapHistory\"), description(\"Type of request.\")),\n /** User address. */\n user: pipe(Address, description(\"User address.\"))\n }), description(\"Request twap history of a user.\"));\n })();\n function twapHistory(config2, params, signal) {\n const request = parser(TwapHistoryRequest)({\n type: \"twapHistory\",\n ...params\n });\n return config2.transport.request(\"info\", request, signal);\n }\n\n // ../../../node_modules/.pnpm/@nktkas+hyperliquid@0.25.7_typescript@5.8.3/node_modules/@nktkas/hyperliquid/esm/src/api/info/txDetails.js\n init_dirname();\n init_buffer2();\n init_process2();\n var TxDetailsRequest = /* @__PURE__ */ (() => {\n return pipe(object({\n /** Type of request. */\n type: pipe(literal(\"txDetails\"), description(\"Type of request.\")),\n /** Transaction hash. */\n hash: pipe(pipe(Hex, length(66)), description(\"Transaction hash.\"))\n }), description(\"Request transaction details by transaction hash.\"));\n })();\n function txDetails(config2, params, signal) {\n const request = parser(TxDetailsRequest)({\n type: \"txDetails\",\n ...params\n });\n return config2.transport.request(\"explorer\", request, signal);\n }\n\n // ../../../node_modules/.pnpm/@nktkas+hyperliquid@0.25.7_typescript@5.8.3/node_modules/@nktkas/hyperliquid/esm/src/api/info/userDetails.js\n init_dirname();\n init_buffer2();\n init_process2();\n var UserDetailsRequest = /* @__PURE__ */ (() => {\n return pipe(object({\n /** Type of request. */\n type: pipe(literal(\"userDetails\"), description(\"Type of request.\")),\n /** User address. */\n user: pipe(Address, description(\"User address.\"))\n }), description(\"Request array of user transaction details.\"));\n })();\n function userDetails(config2, params, signal) {\n const request = parser(UserDetailsRequest)({\n type: \"userDetails\",\n ...params\n });\n return config2.transport.request(\"explorer\", request, signal);\n }\n\n // ../../../node_modules/.pnpm/@nktkas+hyperliquid@0.25.7_typescript@5.8.3/node_modules/@nktkas/hyperliquid/esm/src/api/info/userDexAbstraction.js\n init_dirname();\n init_buffer2();\n init_process2();\n var UserDexAbstractionInfoRequest = /* @__PURE__ */ (() => {\n return pipe(object({\n /** Type of request. */\n type: pipe(literal(\"userDexAbstraction\"), description(\"Type of request.\")),\n /** User address. */\n user: pipe(Address, description(\"User address.\"))\n }), description(\"Request user referral.\"));\n })();\n function userDexAbstraction2(config2, params, signal) {\n const request = parser(UserDexAbstractionInfoRequest)({\n type: \"userDexAbstraction\",\n ...params\n });\n return config2.transport.request(\"info\", request, signal);\n }\n\n // ../../../node_modules/.pnpm/@nktkas+hyperliquid@0.25.7_typescript@5.8.3/node_modules/@nktkas/hyperliquid/esm/src/api/info/userFees.js\n init_dirname();\n init_buffer2();\n init_process2();\n var UserFeesRequest = /* @__PURE__ */ (() => {\n return pipe(object({\n /** Type of request. */\n type: pipe(literal(\"userFees\"), description(\"Type of request.\")),\n /** User address. */\n user: pipe(Address, description(\"User address.\"))\n }), description(\"Request user fees.\"));\n })();\n function userFees(config2, params, signal) {\n const request = parser(UserFeesRequest)({\n type: \"userFees\",\n ...params\n });\n return config2.transport.request(\"info\", request, signal);\n }\n\n // ../../../node_modules/.pnpm/@nktkas+hyperliquid@0.25.7_typescript@5.8.3/node_modules/@nktkas/hyperliquid/esm/src/api/info/userFills.js\n init_dirname();\n init_buffer2();\n init_process2();\n var UserFillsRequest = /* @__PURE__ */ (() => {\n return pipe(object({\n /** Type of request. */\n type: pipe(literal(\"userFills\"), description(\"Type of request.\")),\n /** User address. */\n user: pipe(Address, description(\"User address.\")),\n /** If true, partial fills are aggregated when a crossing order fills multiple resting orders. */\n aggregateByTime: pipe(optional(boolean()), description(\"If true, partial fills are aggregated when a crossing order fills multiple resting orders.\"))\n }), description(\"Request array of user fills.\"));\n })();\n function userFills(config2, params, signal) {\n const request = parser(UserFillsRequest)({\n type: \"userFills\",\n ...params\n });\n return config2.transport.request(\"info\", request, signal);\n }\n\n // ../../../node_modules/.pnpm/@nktkas+hyperliquid@0.25.7_typescript@5.8.3/node_modules/@nktkas/hyperliquid/esm/src/api/info/userFillsByTime.js\n init_dirname();\n init_buffer2();\n init_process2();\n var UserFillsByTimeRequest = /* @__PURE__ */ (() => {\n return pipe(object({\n /** Type of request. */\n type: pipe(literal(\"userFillsByTime\"), description(\"Type of request.\")),\n /** User address. */\n user: pipe(Address, description(\"User address.\")),\n /** Start time (in ms since epoch). */\n startTime: pipe(UnsignedInteger, description(\"Start time (in ms since epoch).\")),\n /** End time (in ms since epoch). */\n endTime: pipe(nullish(UnsignedInteger), description(\"End time (in ms since epoch).\")),\n /** If true, partial fills are aggregated when a crossing order fills multiple resting orders. */\n aggregateByTime: pipe(optional(boolean()), description(\"If true, partial fills are aggregated when a crossing order fills multiple resting orders.\"))\n }), description(\"Request array of user fills by time.\"));\n })();\n function userFillsByTime(config2, params, signal) {\n const request = parser(UserFillsByTimeRequest)({\n type: \"userFillsByTime\",\n ...params\n });\n return config2.transport.request(\"info\", request, signal);\n }\n\n // ../../../node_modules/.pnpm/@nktkas+hyperliquid@0.25.7_typescript@5.8.3/node_modules/@nktkas/hyperliquid/esm/src/api/info/userFunding.js\n init_dirname();\n init_buffer2();\n init_process2();\n var UserFundingRequest = /* @__PURE__ */ (() => {\n return pipe(object({\n /** Type of request. */\n type: pipe(literal(\"userFunding\"), description(\"Type of request.\")),\n /** User address. */\n user: pipe(Address, description(\"User address.\")),\n /** Start time (in ms since epoch). */\n startTime: pipe(UnsignedInteger, description(\"Start time (in ms since epoch).\")),\n /** End time (in ms since epoch). */\n endTime: pipe(nullish(UnsignedInteger), description(\"End time (in ms since epoch).\"))\n }), description(\"Request array of user funding ledger updates.\"));\n })();\n function userFunding(config2, params, signal) {\n const request = parser(UserFundingRequest)({\n type: \"userFunding\",\n ...params\n });\n return config2.transport.request(\"info\", request, signal);\n }\n\n // ../../../node_modules/.pnpm/@nktkas+hyperliquid@0.25.7_typescript@5.8.3/node_modules/@nktkas/hyperliquid/esm/src/api/info/userNonFundingLedgerUpdates.js\n init_dirname();\n init_buffer2();\n init_process2();\n var UserNonFundingLedgerUpdatesRequest = /* @__PURE__ */ (() => {\n return pipe(object({\n /** Type of request. */\n type: pipe(literal(\"userNonFundingLedgerUpdates\"), description(\"Type of request.\")),\n /** User address. */\n user: pipe(Address, description(\"User address.\")),\n /** Start time (in ms since epoch). */\n startTime: pipe(UnsignedInteger, description(\"Start time (in ms since epoch).\")),\n /** End time (in ms since epoch). */\n endTime: pipe(nullish(UnsignedInteger), description(\"End time (in ms since epoch).\"))\n }), description(\"Request user non-funding ledger updates.\"));\n })();\n function userNonFundingLedgerUpdates(config2, params, signal) {\n const request = parser(UserNonFundingLedgerUpdatesRequest)({\n type: \"userNonFundingLedgerUpdates\",\n ...params\n });\n return config2.transport.request(\"info\", request, signal);\n }\n\n // ../../../node_modules/.pnpm/@nktkas+hyperliquid@0.25.7_typescript@5.8.3/node_modules/@nktkas/hyperliquid/esm/src/api/info/userRateLimit.js\n init_dirname();\n init_buffer2();\n init_process2();\n var UserRateLimitRequest = /* @__PURE__ */ (() => {\n return pipe(object({\n /** Type of request. */\n type: pipe(literal(\"userRateLimit\"), description(\"Type of request.\")),\n /** User address. */\n user: pipe(Address, description(\"User address.\"))\n }), description(\"Request user rate limits.\"));\n })();\n function userRateLimit(config2, params, signal) {\n const request = parser(UserRateLimitRequest)({\n type: \"userRateLimit\",\n ...params\n });\n return config2.transport.request(\"info\", request, signal);\n }\n\n // ../../../node_modules/.pnpm/@nktkas+hyperliquid@0.25.7_typescript@5.8.3/node_modules/@nktkas/hyperliquid/esm/src/api/info/userRole.js\n init_dirname();\n init_buffer2();\n init_process2();\n var UserRoleRequest = /* @__PURE__ */ (() => {\n return pipe(object({\n /** Type of request. */\n type: pipe(literal(\"userRole\"), description(\"Type of request.\")),\n /** User address. */\n user: pipe(Address, description(\"User address.\"))\n }), description(\"Request user role.\"));\n })();\n function userRole(config2, params, signal) {\n const request = parser(UserRoleRequest)({\n type: \"userRole\",\n ...params\n });\n return config2.transport.request(\"info\", request, signal);\n }\n\n // ../../../node_modules/.pnpm/@nktkas+hyperliquid@0.25.7_typescript@5.8.3/node_modules/@nktkas/hyperliquid/esm/src/api/info/userToMultiSigSigners.js\n init_dirname();\n init_buffer2();\n init_process2();\n var UserToMultiSigSignersRequest = /* @__PURE__ */ (() => {\n return pipe(object({\n /** Type of request. */\n type: pipe(literal(\"userToMultiSigSigners\"), description(\"Type of request.\")),\n /** User address. */\n user: pipe(Address, description(\"User address.\"))\n }), description(\"Request multi-sig signers for a user.\"));\n })();\n function userToMultiSigSigners(config2, params, signal) {\n const request = parser(UserToMultiSigSignersRequest)({\n type: \"userToMultiSigSigners\",\n ...params\n });\n return config2.transport.request(\"info\", request, signal);\n }\n\n // ../../../node_modules/.pnpm/@nktkas+hyperliquid@0.25.7_typescript@5.8.3/node_modules/@nktkas/hyperliquid/esm/src/api/info/userTwapSliceFills.js\n init_dirname();\n init_buffer2();\n init_process2();\n var UserTwapSliceFillsRequest = /* @__PURE__ */ (() => {\n return pipe(object({\n /** Type of request. */\n type: pipe(literal(\"userTwapSliceFills\"), description(\"Type of request.\")),\n /** User address. */\n user: pipe(Address, description(\"User address.\"))\n }), description(\"Request user TWAP slice fills.\"));\n })();\n function userTwapSliceFills(config2, params, signal) {\n const request = parser(UserTwapSliceFillsRequest)({\n type: \"userTwapSliceFills\",\n ...params\n });\n return config2.transport.request(\"info\", request, signal);\n }\n\n // ../../../node_modules/.pnpm/@nktkas+hyperliquid@0.25.7_typescript@5.8.3/node_modules/@nktkas/hyperliquid/esm/src/api/info/userTwapSliceFillsByTime.js\n init_dirname();\n init_buffer2();\n init_process2();\n var UserTwapSliceFillsByTimeRequest = /* @__PURE__ */ (() => {\n return pipe(object({\n /** Type of request. */\n type: pipe(literal(\"userTwapSliceFillsByTime\"), description(\"Type of request.\")),\n /** User address. */\n user: pipe(Address, description(\"User address.\")),\n /** Start time (in ms since epoch). */\n startTime: pipe(UnsignedInteger, description(\"Start time (in ms since epoch).\")),\n /** End time (in ms since epoch). */\n endTime: pipe(nullish(UnsignedInteger), description(\"End time (in ms since epoch).\")),\n /** If true, partial fills are aggregated when a crossing order fills multiple resting orders. */\n aggregateByTime: pipe(optional(boolean()), description(\"If true, partial fills are aggregated when a crossing order fills multiple resting orders.\"))\n }), description(\"Request user TWAP slice fills by time.\"));\n })();\n function userTwapSliceFillsByTime(config2, params, signal) {\n const request = parser(UserTwapSliceFillsByTimeRequest)({\n type: \"userTwapSliceFillsByTime\",\n ...params\n });\n return config2.transport.request(\"info\", request, signal);\n }\n\n // ../../../node_modules/.pnpm/@nktkas+hyperliquid@0.25.7_typescript@5.8.3/node_modules/@nktkas/hyperliquid/esm/src/api/info/userVaultEquities.js\n init_dirname();\n init_buffer2();\n init_process2();\n var UserVaultEquitiesRequest = /* @__PURE__ */ (() => {\n return pipe(object({\n /** Type of request. */\n type: pipe(literal(\"userVaultEquities\"), description(\"Type of request.\")),\n /** User address. */\n user: pipe(Address, description(\"User address.\"))\n }), description(\"Request user vault deposits.\"));\n })();\n function userVaultEquities(config2, params, signal) {\n const request = parser(UserVaultEquitiesRequest)({\n type: \"userVaultEquities\",\n ...params\n });\n return config2.transport.request(\"info\", request, signal);\n }\n\n // ../../../node_modules/.pnpm/@nktkas+hyperliquid@0.25.7_typescript@5.8.3/node_modules/@nktkas/hyperliquid/esm/src/api/info/validatorL1Votes.js\n init_dirname();\n init_buffer2();\n init_process2();\n var ValidatorL1VotesRequest = /* @__PURE__ */ (() => {\n return pipe(object({\n /** Type of request. */\n type: pipe(literal(\"validatorL1Votes\"), description(\"Type of request.\"))\n }), description(\"Request validator L1 votes.\"));\n })();\n function validatorL1Votes(config2, signal) {\n const request = parser(ValidatorL1VotesRequest)({\n type: \"validatorL1Votes\"\n });\n return config2.transport.request(\"info\", request, signal);\n }\n\n // ../../../node_modules/.pnpm/@nktkas+hyperliquid@0.25.7_typescript@5.8.3/node_modules/@nktkas/hyperliquid/esm/src/api/info/validatorSummaries.js\n init_dirname();\n init_buffer2();\n init_process2();\n var ValidatorSummariesRequest = /* @__PURE__ */ (() => {\n return pipe(object({\n /** Type of request. */\n type: pipe(literal(\"validatorSummaries\"), description(\"Type of request.\"))\n }), description(\"Request validator summaries.\"));\n })();\n function validatorSummaries(config2, signal) {\n const request = parser(ValidatorSummariesRequest)({\n type: \"validatorSummaries\"\n });\n return config2.transport.request(\"info\", request, signal);\n }\n\n // ../../../node_modules/.pnpm/@nktkas+hyperliquid@0.25.7_typescript@5.8.3/node_modules/@nktkas/hyperliquid/esm/src/api/info/vaultDetails.js\n init_dirname();\n init_buffer2();\n init_process2();\n var VaultDetailsRequest = /* @__PURE__ */ (() => {\n return pipe(object({\n /** Type of request. */\n type: pipe(literal(\"vaultDetails\"), description(\"Type of request.\")),\n /** Vault address. */\n vaultAddress: pipe(Address, description(\"Vault address.\")),\n /** User address. */\n user: pipe(nullish(Address), description(\"User address.\"))\n }), description(\"Request details of a vault.\"));\n })();\n function vaultDetails(config2, params, signal) {\n const request = parser(VaultDetailsRequest)({\n type: \"vaultDetails\",\n ...params\n });\n return config2.transport.request(\"info\", request, signal);\n }\n\n // ../../../node_modules/.pnpm/@nktkas+hyperliquid@0.25.7_typescript@5.8.3/node_modules/@nktkas/hyperliquid/esm/src/api/info/vaultSummaries.js\n init_dirname();\n init_buffer2();\n init_process2();\n var VaultSummariesRequest = /* @__PURE__ */ (() => {\n return pipe(object({\n /** Type of request. */\n type: pipe(literal(\"vaultSummaries\"), description(\"Type of request.\"))\n }), description(\"Request a list of vaults less than 2 hours old.\"));\n })();\n function vaultSummaries(config2, signal) {\n const request = parser(VaultSummariesRequest)({\n type: \"vaultSummaries\"\n });\n return config2.transport.request(\"info\", request, signal);\n }\n\n // ../../../node_modules/.pnpm/@nktkas+hyperliquid@0.25.7_typescript@5.8.3/node_modules/@nktkas/hyperliquid/esm/src/api/info/webData2.js\n init_dirname();\n init_buffer2();\n init_process2();\n\n // ../../../node_modules/.pnpm/@nktkas+hyperliquid@0.25.7_typescript@5.8.3/node_modules/@nktkas/hyperliquid/esm/src/api/subscription/webData2.js\n init_dirname();\n init_buffer2();\n init_process2();\n\n // ../../../node_modules/.pnpm/@nktkas+hyperliquid@0.25.7_typescript@5.8.3/node_modules/@nktkas/hyperliquid/esm/src/api/info/webData2.js\n var WebData2Request = /* @__PURE__ */ (() => {\n return pipe(object({\n /** Type of request. */\n type: pipe(literal(\"webData2\"), description(\"Type of request.\")),\n /** User address. */\n user: pipe(Address, description(\"User address.\"))\n }), description(\"Request comprehensive user and market data.\"));\n })();\n function webData2(config2, params, signal) {\n const request = parser(WebData2Request)({\n type: \"webData2\",\n ...params\n });\n return config2.transport.request(\"info\", request, signal);\n }\n\n // ../../../node_modules/.pnpm/@nktkas+hyperliquid@0.25.7_typescript@5.8.3/node_modules/@nktkas/hyperliquid/esm/src/api/info/~client.js\n var InfoClient = class {\n transport;\n /**\n * Initialises a new instance.\n * @param args - The arguments for initialisation.\n *\n * @example\n * ```ts\n * import * as hl from \"@nktkas/hyperliquid\";\n *\n * const transport = new hl.HttpTransport();\n * const infoClient = new hl.InfoClient({ transport });\n * ```\n */\n constructor(args) {\n this.transport = args.transport;\n }\n /**\n * Request user active asset data.\n * @param params - Parameters specific to the API request.\n * @param signal - An [`AbortSignal`](https://developer.mozilla.org/en-US/docs/Web/API/AbortSignal) can be used to cancel the request by calling [`abort()`](https://developer.mozilla.org/en-US/docs/Web/API/AbortController/abort) on the corresponding [`AbortController`](https://developer.mozilla.org/en-US/docs/Web/API/AbortController).\n * @returns User active asset data.\n *\n * @throws {TransportError} When the transport layer throws an error.\n *\n * @see https://hyperliquid.gitbook.io/hyperliquid-docs/for-developers/api/info-endpoint/perpetuals#retrieve-users-active-asset-data\n * @example\n * ```ts\n * import * as hl from \"@nktkas/hyperliquid\";\n *\n * const transport = new hl.HttpTransport(); // or `WebSocketTransport`\n *\n * const client = new hl.InfoClient({ transport });\n * const data = await client.activeAssetData({ user: \"0x...\", coin: \"ETH\" });\n * ```\n */\n activeAssetData(...args) {\n return activeAssetData(this, ...args);\n }\n /**\n * Request supply, rate, and pending payment information for an aligned quote token.\n * @param params - Parameters specific to the API request.\n * @param signal - An [`AbortSignal`](https://developer.mozilla.org/en-US/docs/Web/API/AbortSignal) can be used to cancel the request by calling [`abort()`](https://developer.mozilla.org/en-US/docs/Web/API/AbortController/abort) on the corresponding [`AbortController`](https://developer.mozilla.org/en-US/docs/Web/API/AbortController).\n * @returns Supply, rate, and pending payment information for an aligned quote token.\n *\n * @throws {TransportError} When the transport layer throws an error.\n *\n * @see null\n * @example\n * ```ts\n * import * as hl from \"@nktkas/hyperliquid\";\n *\n * const transport = new hl.HttpTransport(); // or `WebSocketTransport`\n *\n * const client = new hl.InfoClient({ transport });\n * const data = await client.alignedQuoteTokenInfo({ token: 1328 });\n * ```\n */\n alignedQuoteTokenInfo(...args) {\n return alignedQuoteTokenInfo(this, ...args);\n }\n /**\n * Request mid coin prices.\n * @param params - Parameters specific to the API request.\n * @param signal - An [`AbortSignal`](https://developer.mozilla.org/en-US/docs/Web/API/AbortSignal) can be used to cancel the request by calling [`abort()`](https://developer.mozilla.org/en-US/docs/Web/API/AbortController/abort) on the corresponding [`AbortController`](https://developer.mozilla.org/en-US/docs/Web/API/AbortController).\n * @returns Mapping of coin symbols to mid prices.\n *\n * @throws {TransportError} When the transport layer throws an error.\n *\n * @see https://hyperliquid.gitbook.io/hyperliquid-docs/for-developers/api/info-endpoint#retrieve-mids-for-all-coins\n * @example\n * ```ts\n * import * as hl from \"@nktkas/hyperliquid\";\n *\n * const transport = new hl.HttpTransport(); // or `WebSocketTransport`\n *\n * const client = new hl.InfoClient({ transport });\n * const data = await client.allMids();\n * ```\n */\n allMids(...args) {\n return allMids(\n this,\n ...args\n );\n }\n /**\n * Request trading metadata for all DEXes.\n * @param signal - An [`AbortSignal`](https://developer.mozilla.org/en-US/docs/Web/API/AbortSignal) can be used to cancel the request by calling [`abort()`](https://developer.mozilla.org/en-US/docs/Web/API/AbortController/abort) on the corresponding [`AbortController`](https://developer.mozilla.org/en-US/docs/Web/API/AbortController).\n * @returns Metadata for perpetual assets across all DEXes.\n *\n * @throws {TransportError} When the transport layer throws an error.\n *\n * @see null\n * @example\n * ```ts\n * import * as hl from \"@nktkas/hyperliquid\";\n *\n * const transport = new hl.HttpTransport(); // or `WebSocketTransport`\n *\n * const client = new hl.InfoClient({ transport });\n * const data = await client.allPerpMetas();\n * ```\n */\n allPerpMetas() {\n return allPerpMetas(this);\n }\n /**\n * Request block details by block height.\n * @param params - Parameters specific to the API request.\n * @param signal - An [`AbortSignal`](https://developer.mozilla.org/en-US/docs/Web/API/AbortSignal) can be used to cancel the request by calling [`abort()`](https://developer.mozilla.org/en-US/docs/Web/API/AbortController/abort) on the corresponding [`AbortController`](https://developer.mozilla.org/en-US/docs/Web/API/AbortController).\n * @returns Response containing block information.\n *\n * @throws {TransportError} When the transport layer throws an error.\n *\n * @see null\n * @example\n * ```ts\n * import * as hl from \"@nktkas/hyperliquid\";\n *\n * const transport = new hl.HttpTransport(); // only `HttpTransport` supports this API\n *\n * const client = new hl.InfoClient({ transport });\n * const data = await client.blockDetails({ height: 123 });\n * ```\n */\n blockDetails(...args) {\n return blockDetails(this, ...args);\n }\n /**\n * Request candlestick snapshots.\n * @param params - Parameters specific to the API request.\n * @param signal - An [`AbortSignal`](https://developer.mozilla.org/en-US/docs/Web/API/AbortSignal) can be used to cancel the request by calling [`abort()`](https://developer.mozilla.org/en-US/docs/Web/API/AbortController/abort) on the corresponding [`AbortController`](https://developer.mozilla.org/en-US/docs/Web/API/AbortController).\n * @returns Array of candlestick data points.\n *\n * @throws {TransportError} When the transport layer throws an error.\n *\n * @see https://hyperliquid.gitbook.io/hyperliquid-docs/for-developers/api/info-endpoint#candle-snapshot\n * @example\n * ```ts\n * import * as hl from \"@nktkas/hyperliquid\";\n *\n * const transport = new hl.HttpTransport(); // or `WebSocketTransport`\n *\n * const client = new hl.InfoClient({ transport });\n * const data = await client.candleSnapshot({\n * coin: \"ETH\",\n * interval: \"1h\",\n * startTime: Date.now() - 1000 * 60 * 60 * 24,\n * });\n * ```\n */\n candleSnapshot(...args) {\n return candleSnapshot(this, ...args);\n }\n /**\n * Request clearinghouse state.\n * @param params - Parameters specific to the API request.\n * @param signal - An [`AbortSignal`](https://developer.mozilla.org/en-US/docs/Web/API/AbortSignal) can be used to cancel the request by calling [`abort()`](https://developer.mozilla.org/en-US/docs/Web/API/AbortController/abort) on the corresponding [`AbortController`](https://developer.mozilla.org/en-US/docs/Web/API/AbortController).\n * @returns Account summary for perpetual trading.\n *\n * @throws {TransportError} When the transport layer throws an error.\n *\n * @see https://hyperliquid.gitbook.io/hyperliquid-docs/for-developers/api/info-endpoint/perpetuals#retrieve-users-perpetuals-account-summary\n * @example\n * ```ts\n * import * as hl from \"@nktkas/hyperliquid\";\n *\n * const transport = new hl.HttpTransport(); // or `WebSocketTransport`\n *\n * const client = new hl.InfoClient({ transport });\n * const data = await client.clearinghouseState({ user: \"0x...\" });\n * ```\n */\n clearinghouseState(...args) {\n return clearinghouseState(this, ...args);\n }\n /**\n * Request user staking delegations.\n * @param params - Parameters specific to the API request.\n * @param signal - An [`AbortSignal`](https://developer.mozilla.org/en-US/docs/Web/API/AbortSignal) can be used to cancel the request by calling [`abort()`](https://developer.mozilla.org/en-US/docs/Web/API/AbortController/abort) on the corresponding [`AbortController`](https://developer.mozilla.org/en-US/docs/Web/API/AbortController).\n * @returns Array of user's delegations to validators.\n *\n * @throws {TransportError} When the transport layer throws an error.\n *\n * @see https://hyperliquid.gitbook.io/hyperliquid-docs/for-developers/api/info-endpoint#query-a-users-staking-delegations\n * @example\n * ```ts\n * import * as hl from \"@nktkas/hyperliquid\";\n *\n * const transport = new hl.HttpTransport(); // or `WebSocketTransport`\n *\n * const client = new hl.InfoClient({ transport });\n * const data = await client.delegations({ user: \"0x...\" });\n * ```\n */\n delegations(...args) {\n return delegations(this, ...args);\n }\n /**\n * Request user staking history.\n * @param params - Parameters specific to the API request.\n * @param signal - An [`AbortSignal`](https://developer.mozilla.org/en-US/docs/Web/API/AbortSignal) can be used to cancel the request by calling [`abort()`](https://developer.mozilla.org/en-US/docs/Web/API/AbortController/abort) on the corresponding [`AbortController`](https://developer.mozilla.org/en-US/docs/Web/API/AbortController).\n * @returns Array of records of staking events by a delegator.\n *\n * @throws {TransportError} When the transport layer throws an error.\n *\n * @see https://hyperliquid.gitbook.io/hyperliquid-docs/for-developers/api/info-endpoint#query-a-users-staking-history\n * @example\n * ```ts\n * import * as hl from \"@nktkas/hyperliquid\";\n *\n * const transport = new hl.HttpTransport(); // or `WebSocketTransport`\n *\n * const client = new hl.InfoClient({ transport });\n * const data = await client.delegatorHistory({ user: \"0x...\" });\n * ```\n */\n delegatorHistory(...args) {\n return delegatorHistory(this, ...args);\n }\n /**\n * Request user staking rewards.\n * @param params - Parameters specific to the API request.\n * @param signal - An [`AbortSignal`](https://developer.mozilla.org/en-US/docs/Web/API/AbortSignal) can be used to cancel the request by calling [`abort()`](https://developer.mozilla.org/en-US/docs/Web/API/AbortController/abort) on the corresponding [`AbortController`](https://developer.mozilla.org/en-US/docs/Web/API/AbortController).\n * @returns Array of rewards received from staking activities.\n *\n * @throws {TransportError} When the transport layer throws an error.\n *\n * @see https://hyperliquid.gitbook.io/hyperliquid-docs/for-developers/api/info-endpoint#query-a-users-staking-rewards\n * @example\n * ```ts\n * import * as hl from \"@nktkas/hyperliquid\";\n *\n * const transport = new hl.HttpTransport(); // or `WebSocketTransport`\n *\n * const client = new hl.InfoClient({ transport });\n * const data = await client.delegatorRewards({ user: \"0x...\" });\n * ```\n */\n delegatorRewards(...args) {\n return delegatorRewards(this, ...args);\n }\n /**\n * Request user's staking summary.\n * @param params - Parameters specific to the API request.\n * @param signal - An [`AbortSignal`](https://developer.mozilla.org/en-US/docs/Web/API/AbortSignal) can be used to cancel the request by calling [`abort()`](https://developer.mozilla.org/en-US/docs/Web/API/AbortController/abort) on the corresponding [`AbortController`](https://developer.mozilla.org/en-US/docs/Web/API/AbortController).\n * @returns User's staking summary.\n *\n * @throws {TransportError} When the transport layer throws an error.\n *\n * @see https://hyperliquid.gitbook.io/hyperliquid-docs/for-developers/api/info-endpoint#query-a-users-staking-summary\n * @example\n * ```ts\n * import * as hl from \"@nktkas/hyperliquid\";\n *\n * const transport = new hl.HttpTransport(); // or `WebSocketTransport`\n *\n * const client = new hl.InfoClient({ transport });\n * const data = await client.delegatorSummary({ user: \"0x...\" });\n * ```\n */\n delegatorSummary(...args) {\n return delegatorSummary(this, ...args);\n }\n /**\n * Request exchange system status information.\n * @param signal - An [`AbortSignal`](https://developer.mozilla.org/en-US/docs/Web/API/AbortSignal) can be used to cancel the request by calling [`abort()`](https://developer.mozilla.org/en-US/docs/Web/API/AbortController/abort) on the corresponding [`AbortController`](https://developer.mozilla.org/en-US/docs/Web/API/AbortController).\n * @returns Exchange system status information.\n *\n * @throws {TransportError} When the transport layer throws an error.\n *\n * @see null\n * @example\n * ```ts\n * import * as hl from \"@nktkas/hyperliquid\";\n *\n * const transport = new hl.HttpTransport(); // or `WebSocketTransport`\n *\n * const client = new hl.InfoClient({ transport });\n * const data = await client.exchangeStatus();\n * ```\n */\n exchangeStatus(...args) {\n return exchangeStatus(this, ...args);\n }\n /**\n * Request user extra agents.\n * @param params - Parameters specific to the API request.\n * @param signal - An [`AbortSignal`](https://developer.mozilla.org/en-US/docs/Web/API/AbortSignal) can be used to cancel the request by calling [`abort()`](https://developer.mozilla.org/en-US/docs/Web/API/AbortController/abort) on the corresponding [`AbortController`](https://developer.mozilla.org/en-US/docs/Web/API/AbortController).\n * @returns Array of extra agent details for a user.\n *\n * @throws {TransportError} When the transport layer throws an error.\n *\n * @see null\n * @example\n * ```ts\n * import * as hl from \"@nktkas/hyperliquid\";\n *\n * const transport = new hl.HttpTransport(); // or `WebSocketTransport`\n *\n * const client = new hl.InfoClient({ transport });\n * const data = await client.extraAgents({ user: \"0x...\" });\n * ```\n */\n extraAgents(...args) {\n return extraAgents(this, ...args);\n }\n /**\n * Request frontend open orders.\n * @param params - Parameters specific to the API request.\n * @param signal - An [`AbortSignal`](https://developer.mozilla.org/en-US/docs/Web/API/AbortSignal) can be used to cancel the request by calling [`abort()`](https://developer.mozilla.org/en-US/docs/Web/API/AbortController/abort) on the corresponding [`AbortController`](https://developer.mozilla.org/en-US/docs/Web/API/AbortController).\n * @returns Array of open orders with additional display information.\n *\n * @throws {TransportError} When the transport layer throws an error.\n *\n * @see https://hyperliquid.gitbook.io/hyperliquid-docs/for-developers/api/info-endpoint#retrieve-a-users-open-orders-with-additional-frontend-info\n * @example\n * ```ts\n * import * as hl from \"@nktkas/hyperliquid\";\n *\n * const transport = new hl.HttpTransport(); // or `WebSocketTransport`\n *\n * const client = new hl.InfoClient({ transport });\n * const data = await client.frontendOpenOrders({ user: \"0x...\" });\n * ```\n */\n frontendOpenOrders(...args) {\n return frontendOpenOrders(this, ...args);\n }\n /**\n * Request funding history.\n * @param params - Parameters specific to the API request.\n * @param signal - An [`AbortSignal`](https://developer.mozilla.org/en-US/docs/Web/API/AbortSignal) can be used to cancel the request by calling [`abort()`](https://developer.mozilla.org/en-US/docs/Web/API/AbortController/abort) on the corresponding [`AbortController`](https://developer.mozilla.org/en-US/docs/Web/API/AbortController).\n * @returns Array of historical funding rate records for an asset.\n *\n * @throws {TransportError} When the transport layer throws an error.\n *\n * @see https://hyperliquid.gitbook.io/hyperliquid-docs/for-developers/api/info-endpoint/perpetuals#retrieve-historical-funding-rates\n * @example\n * ```ts\n * import * as hl from \"@nktkas/hyperliquid\";\n *\n * const transport = new hl.HttpTransport(); // or `WebSocketTransport`\n *\n * const client = new hl.InfoClient({ transport });\n * const data = await client.fundingHistory({\n * coin: \"ETH\",\n * startTime: Date.now() - 1000 * 60 * 60 * 24,\n * });\n * ```\n */\n fundingHistory(...args) {\n return fundingHistory(this, ...args);\n }\n /**\n * Request gossip root IPs.\n * @param signal - An [`AbortSignal`](https://developer.mozilla.org/en-US/docs/Web/API/AbortSignal) can be used to cancel the request by calling [`abort()`](https://developer.mozilla.org/en-US/docs/Web/API/AbortController/abort) on the corresponding [`AbortController`](https://developer.mozilla.org/en-US/docs/Web/API/AbortController).\n * @returns Array of gossip root IPs.\n *\n * @throws {TransportError} When the transport layer throws an error.\n *\n * @see null\n * @example\n * ```ts\n * import * as hl from \"@nktkas/hyperliquid\";\n *\n * const transport = new hl.HttpTransport(); // or `WebSocketTransport`\n *\n * const client = new hl.InfoClient({ transport });\n * const data = await client.gossipRootIps();\n * ```\n */\n gossipRootIps(...args) {\n return gossipRootIps(this, ...args);\n }\n /**\n * Request user historical orders.\n * @param params - Parameters specific to the API request.\n * @param signal - An [`AbortSignal`](https://developer.mozilla.org/en-US/docs/Web/API/AbortSignal) can be used to cancel the request by calling [`abort()`](https://developer.mozilla.org/en-US/docs/Web/API/AbortController/abort) on the corresponding [`AbortController`](https://developer.mozilla.org/en-US/docs/Web/API/AbortController).\n * @returns Array of frontend orders with current processing status.\n *\n * @throws {TransportError} When the transport layer throws an error.\n *\n * @see https://hyperliquid.gitbook.io/hyperliquid-docs/for-developers/api/info-endpoint#retrieve-a-users-historical-orders\n * @example\n * ```ts\n * import * as hl from \"@nktkas/hyperliquid\";\n *\n * const transport = new hl.HttpTransport(); // or `WebSocketTransport`\n *\n * const client = new hl.InfoClient({ transport });\n * const data = await client.historicalOrders({ user: \"0x...\" });\n * ```\n */\n historicalOrders(...args) {\n return historicalOrders(this, ...args);\n }\n /**\n * Request to check if a user is a VIP.\n * @param params - Parameters specific to the API request.\n * @param signal - An [`AbortSignal`](https://developer.mozilla.org/en-US/docs/Web/API/AbortSignal) can be used to cancel the request by calling [`abort()`](https://developer.mozilla.org/en-US/docs/Web/API/AbortController/abort) on the corresponding [`AbortController`](https://developer.mozilla.org/en-US/docs/Web/API/AbortController).\n * @returns Boolean indicating user's VIP status.\n *\n * @throws {TransportError} When the transport layer throws an error.\n *\n * @see null\n * @example\n * ```ts\n * import * as hl from \"@nktkas/hyperliquid\";\n *\n * const transport = new hl.HttpTransport(); // or `WebSocketTransport`\n *\n * const client = new hl.InfoClient({ transport });\n * const data = await client.isVip({ user: \"0x...\" });\n * ```\n */\n isVip(...args) {\n return isVip(this, ...args);\n }\n /**\n * Request L2 order book.\n * @param params - Parameters specific to the API request.\n * @param signal - An [`AbortSignal`](https://developer.mozilla.org/en-US/docs/Web/API/AbortSignal) can be used to cancel the request by calling [`abort()`](https://developer.mozilla.org/en-US/docs/Web/API/AbortController/abort) on the corresponding [`AbortController`](https://developer.mozilla.org/en-US/docs/Web/API/AbortController).\n * @returns L2 order book snapshot.\n *\n * @throws {TransportError} When the transport layer throws an error.\n *\n * @see https://hyperliquid.gitbook.io/hyperliquid-docs/for-developers/api/info-endpoint#l2-book-snapshot\n * @example\n * ```ts\n * import * as hl from \"@nktkas/hyperliquid\";\n *\n * const transport = new hl.HttpTransport(); // or `WebSocketTransport`\n *\n * const client = new hl.InfoClient({ transport });\n * const data = await client.l2Book({ coin: \"ETH\", nSigFigs: 2 });\n * ```\n */\n l2Book(...args) {\n return l2Book(this, ...args);\n }\n /**\n * Request leading vaults for a user.\n * @param params - Parameters specific to the API request.\n * @param signal - An [`AbortSignal`](https://developer.mozilla.org/en-US/docs/Web/API/AbortSignal) can be used to cancel the request by calling [`abort()`](https://developer.mozilla.org/en-US/docs/Web/API/AbortController/abort) on the corresponding [`AbortController`](https://developer.mozilla.org/en-US/docs/Web/API/AbortController).\n * @returns Array of leading vaults for a user.\n *\n * @throws {TransportError} When the transport layer throws an error.\n *\n * @see null\n * @example\n * ```ts\n * import * as hl from \"@nktkas/hyperliquid\";\n *\n * const transport = new hl.HttpTransport(); // or `WebSocketTransport`\n *\n * const client = new hl.InfoClient({ transport });\n * const data = await client.leadingVaults({ user: \"0x...\" });\n * ```\n */\n leadingVaults(...args) {\n return leadingVaults(this, ...args);\n }\n /**\n * Request legal verification status of a user.\n * @param params - Parameters specific to the API request.\n * @param signal - An [`AbortSignal`](https://developer.mozilla.org/en-US/docs/Web/API/AbortSignal) can be used to cancel the request by calling [`abort()`](https://developer.mozilla.org/en-US/docs/Web/API/AbortController/abort) on the corresponding [`AbortController`](https://developer.mozilla.org/en-US/docs/Web/API/AbortController).\n * @returns Legal verification status for a user.\n *\n * @throws {TransportError} When the transport layer throws an error.\n *\n * @see null\n * @example\n * ```ts\n * import * as hl from \"@nktkas/hyperliquid\";\n *\n * const transport = new hl.HttpTransport(); // or `WebSocketTransport`\n *\n * const client = new hl.InfoClient({ transport });\n * const data = await client.legalCheck({ user: \"0x...\" });\n * ```\n */\n legalCheck(...args) {\n return legalCheck(this, ...args);\n }\n /**\n * Request liquidatable.\n * @param signal - An [`AbortSignal`](https://developer.mozilla.org/en-US/docs/Web/API/AbortSignal) can be used to cancel the request by calling [`abort()`](https://developer.mozilla.org/en-US/docs/Web/API/AbortController/abort) on the corresponding [`AbortController`](https://developer.mozilla.org/en-US/docs/Web/API/AbortController).\n * @returns\n *\n * @throws {TransportError} When the transport layer throws an error.\n *\n * @see null\n * @example\n * ```ts\n * import * as hl from \"@nktkas/hyperliquid\";\n *\n * const transport = new hl.HttpTransport(); // or `WebSocketTransport`\n *\n * const client = new hl.InfoClient({ transport });\n * const data = await client.liquidatable();\n * ```\n */\n liquidatable(...args) {\n return liquidatable(this, ...args);\n }\n /**\n * Request margin table data.\n * @param params - Parameters specific to the API request.\n * @param signal - An [`AbortSignal`](https://developer.mozilla.org/en-US/docs/Web/API/AbortSignal) can be used to cancel the request by calling [`abort()`](https://developer.mozilla.org/en-US/docs/Web/API/AbortController/abort) on the corresponding [`AbortController`](https://developer.mozilla.org/en-US/docs/Web/API/AbortController).\n * @returns Margin requirements table with multiple tiers.\n *\n * @throws {TransportError} When the transport layer throws an error.\n *\n * @see null\n * @example\n * ```ts\n * import * as hl from \"@nktkas/hyperliquid\";\n *\n * const transport = new hl.HttpTransport(); // or `WebSocketTransport`\n *\n * const client = new hl.InfoClient({ transport });\n * const data = await client.marginTable({ id: 1 });\n * ```\n */\n marginTable(...args) {\n return marginTable(this, ...args);\n }\n /**\n * Request builder fee approval.\n * @param params - Parameters specific to the API request.\n * @param signal - An [`AbortSignal`](https://developer.mozilla.org/en-US/docs/Web/API/AbortSignal) can be used to cancel the request by calling [`abort()`](https://developer.mozilla.org/en-US/docs/Web/API/AbortController/abort) on the corresponding [`AbortController`](https://developer.mozilla.org/en-US/docs/Web/API/AbortController).\n * @returns Maximum builder fee approval.\n *\n * @throws {TransportError} When the transport layer throws an error.\n *\n * @see https://hyperliquid.gitbook.io/hyperliquid-docs/for-developers/api/info-endpoint#check-builder-fee-approval\n * @example\n * ```ts\n * import * as hl from \"@nktkas/hyperliquid\";\n *\n * const transport = new hl.HttpTransport(); // or `WebSocketTransport`\n *\n * const client = new hl.InfoClient({ transport });\n * const data = await client.maxBuilderFee({ user: \"0x...\", builder: \"0x...\" });\n * ```\n */\n maxBuilderFee(...args) {\n return maxBuilderFee(this, ...args);\n }\n /**\n * Request maximum market order notionals.\n * @param signal - An [`AbortSignal`](https://developer.mozilla.org/en-US/docs/Web/API/AbortSignal) can be used to cancel the request by calling [`abort()`](https://developer.mozilla.org/en-US/docs/Web/API/AbortController/abort) on the corresponding [`AbortController`](https://developer.mozilla.org/en-US/docs/Web/API/AbortController).\n * @returns Maximum market order notionals.\n *\n * @throws {TransportError} When the transport layer throws an error.\n *\n * @see null\n * @example\n * ```ts\n * import * as hl from \"@nktkas/hyperliquid\";\n *\n * const transport = new hl.HttpTransport(); // or `WebSocketTransport`\n *\n * const client = new hl.InfoClient({ transport });\n * const data = await client.maxMarketOrderNtls();\n * ```\n */\n maxMarketOrderNtls(...args) {\n return maxMarketOrderNtls(this, ...args);\n }\n /**\n * Request trading metadata.\n * @param params - Parameters specific to the API request.\n * @param signal - An [`AbortSignal`](https://developer.mozilla.org/en-US/docs/Web/API/AbortSignal) can be used to cancel the request by calling [`abort()`](https://developer.mozilla.org/en-US/docs/Web/API/AbortController/abort) on the corresponding [`AbortController`](https://developer.mozilla.org/en-US/docs/Web/API/AbortController).\n * @returns Metadata for perpetual assets.\n *\n * @throws {TransportError} When the transport layer throws an error.\n *\n * @see https://hyperliquid.gitbook.io/hyperliquid-docs/for-developers/api/info-endpoint/perpetuals#retrieve-perpetuals-metadata-universe-and-margin-tables\n * @example\n * ```ts\n * import * as hl from \"@nktkas/hyperliquid\";\n *\n * const transport = new hl.HttpTransport(); // or `WebSocketTransport`\n *\n * const client = new hl.InfoClient({ transport });\n * const data = await client.meta();\n * ```\n */\n meta(...args) {\n return meta(\n this,\n ...args\n );\n }\n /**\n * Request metadata and asset contexts.\n * @param signal - An [`AbortSignal`](https://developer.mozilla.org/en-US/docs/Web/API/AbortSignal) can be used to cancel the request by calling [`abort()`](https://developer.mozilla.org/en-US/docs/Web/API/AbortController/abort) on the corresponding [`AbortController`](https://developer.mozilla.org/en-US/docs/Web/API/AbortController).\n * @returns Metadata and context for perpetual assets.\n *\n * @throws {TransportError} When the transport layer throws an error.\n *\n * @see https://hyperliquid.gitbook.io/hyperliquid-docs/for-developers/api/info-endpoint/perpetuals#retrieve-perpetuals-asset-contexts-includes-mark-price-current-funding-open-interest-etc\n * @example\n * ```ts\n * import * as hl from \"@nktkas/hyperliquid\";\n *\n * const transport = new hl.HttpTransport(); // or `WebSocketTransport`\n *\n * const client = new hl.InfoClient({ transport });\n * const data = await client.metaAndAssetCtxs();\n * ```\n */\n metaAndAssetCtxs(...args) {\n return metaAndAssetCtxs(\n this,\n ...args\n );\n }\n /**\n * Request open orders.\n * @param params - Parameters specific to the API request.\n * @param signal - An [`AbortSignal`](https://developer.mozilla.org/en-US/docs/Web/API/AbortSignal) can be used to cancel the request by calling [`abort()`](https://developer.mozilla.org/en-US/docs/Web/API/AbortController/abort) on the corresponding [`AbortController`](https://developer.mozilla.org/en-US/docs/Web/API/AbortController).\n * @returns Array of open orders.\n *\n * @throws {TransportError} When the transport layer throws an error.\n *\n * @see https://hyperliquid.gitbook.io/hyperliquid-docs/for-developers/api/info-endpoint#retrieve-a-users-open-orders\n * @example\n * ```ts\n * import * as hl from \"@nktkas/hyperliquid\";\n *\n * const transport = new hl.HttpTransport(); // or `WebSocketTransport`\n *\n * const client = new hl.InfoClient({ transport });\n * const data = await client.openOrders({ user: \"0x...\" });\n * ```\n */\n openOrders(...args) {\n return openOrders(this, ...args);\n }\n /**\n * Request order status.\n * @param params - Parameters specific to the API request.\n * @param signal - An [`AbortSignal`](https://developer.mozilla.org/en-US/docs/Web/API/AbortSignal) can be used to cancel the request by calling [`abort()`](https://developer.mozilla.org/en-US/docs/Web/API/AbortController/abort) on the corresponding [`AbortController`](https://developer.mozilla.org/en-US/docs/Web/API/AbortController).\n * @returns Order status response.\n *\n * @throws {TransportError} When the transport layer throws an error.\n *\n * @see https://hyperliquid.gitbook.io/hyperliquid-docs/for-developers/api/info-endpoint#query-order-status-by-oid-or-cloid\n * @example\n * ```ts\n * import * as hl from \"@nktkas/hyperliquid\";\n *\n * const transport = new hl.HttpTransport(); // or `WebSocketTransport`\n *\n * const client = new hl.InfoClient({ transport });\n * const data = await client.orderStatus({ user: \"0x...\", oid: 12345 });\n * ```\n */\n orderStatus(...args) {\n return orderStatus(this, ...args);\n }\n /**\n * Request for the status of the perpetual deploy auction.\n * @param signal - An [`AbortSignal`](https://developer.mozilla.org/en-US/docs/Web/API/AbortSignal) can be used to cancel the request by calling [`abort()`](https://developer.mozilla.org/en-US/docs/Web/API/AbortController/abort) on the corresponding [`AbortController`](https://developer.mozilla.org/en-US/docs/Web/API/AbortController).\n * @returns Status of the perpetual deploy auction.\n *\n * @throws {TransportError} When the transport layer throws an error.\n *\n * @see https://hyperliquid.gitbook.io/hyperliquid-docs/for-developers/api/info-endpoint/perpetuals#retrieve-information-about-the-perp-deploy-auction\n * @example\n * ```ts\n * import * as hl from \"@nktkas/hyperliquid\";\n *\n * const transport = new hl.HttpTransport(); // or `WebSocketTransport`\n *\n * const client = new hl.InfoClient({ transport });\n * const data = await client.perpDeployAuctionStatus();\n * ```\n */\n perpDeployAuctionStatus(...args) {\n return perpDeployAuctionStatus(this, ...args);\n }\n /**\n * Request builder deployed perpetual market limits.\n * @param params - Parameters specific to the API request.\n * @param signal - An [`AbortSignal`](https://developer.mozilla.org/en-US/docs/Web/API/AbortSignal) can be used to cancel the request by calling [`abort()`](https://developer.mozilla.org/en-US/docs/Web/API/AbortController/abort) on the corresponding [`AbortController`](https://developer.mozilla.org/en-US/docs/Web/API/AbortController).\n * @returns Builder deployed perpetual market limits.\n *\n * @throws {TransportError} When the transport layer throws an error.\n *\n * @see https://hyperliquid.gitbook.io/hyperliquid-docs/for-developers/api/info-endpoint/perpetuals#retrieve-builder-deployed-perp-market-limits\n * @example\n * ```ts\n * import * as hl from \"@nktkas/hyperliquid\";\n *\n * const transport = new hl.HttpTransport(); // or `WebSocketTransport`\n *\n * const client = new hl.InfoClient({ transport });\n * const data = await client.perpDexLimits({ dex: \"test\" });\n * ```\n */\n perpDexLimits(...args) {\n return perpDexLimits(this, ...args);\n }\n /**\n * Request all perpetual dexs.\n * @param signal - An [`AbortSignal`](https://developer.mozilla.org/en-US/docs/Web/API/AbortSignal) can be used to cancel the request by calling [`abort()`](https://developer.mozilla.org/en-US/docs/Web/API/AbortController/abort) on the corresponding [`AbortController`](https://developer.mozilla.org/en-US/docs/Web/API/AbortController).\n * @returns Array of perpetual dexes (null is main dex).\n *\n * @throws {TransportError} When the transport layer throws an error.\n *\n * @see https://hyperliquid.gitbook.io/hyperliquid-docs/for-developers/api/info-endpoint/perpetuals#retrieve-all-perpetual-dexs\n * @example\n * ```ts\n * import * as hl from \"@nktkas/hyperliquid\";\n *\n * const transport = new hl.HttpTransport(); // or `WebSocketTransport`\n *\n * const client = new hl.InfoClient({ transport });\n * const data = await client.perpDexs();\n * ```\n */\n perpDexs(...args) {\n return perpDexs(this, ...args);\n }\n /**\n * Request perpetuals at open interest cap.\n * @param params - Parameters specific to the API request.\n * @param signal - An [`AbortSignal`](https://developer.mozilla.org/en-US/docs/Web/API/AbortSignal) can be used to cancel the request by calling [`abort()`](https://developer.mozilla.org/en-US/docs/Web/API/AbortController/abort) on the corresponding [`AbortController`](https://developer.mozilla.org/en-US/docs/Web/API/AbortController).\n * @returns Array of perpetuals at open interest caps.\n *\n * @throws {TransportError} When the transport layer throws an error.\n *\n * @see https://hyperliquid.gitbook.io/hyperliquid-docs/for-developers/api/info-endpoint/perpetuals#query-perps-at-open-interest-caps\n * @example\n * ```ts\n * import * as hl from \"@nktkas/hyperliquid\";\n *\n * const transport = new hl.HttpTransport(); // or `WebSocketTransport`\n *\n * const client = new hl.InfoClient({ transport });\n * const data = await client.perpsAtOpenInterestCap();\n * ```\n */\n perpsAtOpenInterestCap(...args) {\n return perpsAtOpenInterestCap(\n this,\n ...args\n );\n }\n /**\n * Request user portfolio.\n * @param params - Parameters specific to the API request.\n * @param signal - An [`AbortSignal`](https://developer.mozilla.org/en-US/docs/Web/API/AbortSignal) can be used to cancel the request by calling [`abort()`](https://developer.mozilla.org/en-US/docs/Web/API/AbortController/abort) on the corresponding [`AbortController`](https://developer.mozilla.org/en-US/docs/Web/API/AbortController).\n * @returns Portfolio metrics grouped by time periods.\n *\n * @throws {TransportError} When the transport layer throws an error.\n *\n * @see https://hyperliquid.gitbook.io/hyperliquid-docs/for-developers/api/info-endpoint#query-a-users-portfolio\n * @example\n * ```ts\n * import * as hl from \"@nktkas/hyperliquid\";\n *\n * const transport = new hl.HttpTransport(); // or `WebSocketTransport`\n *\n * const client = new hl.InfoClient({ transport });\n * const data = await client.portfolio({ user: \"0x...\" });\n * ```\n */\n portfolio(...args) {\n return portfolio(this, ...args);\n }\n /**\n * Request predicted funding rates.\n * @param signal - An [`AbortSignal`](https://developer.mozilla.org/en-US/docs/Web/API/AbortSignal) can be used to cancel the request by calling [`abort()`](https://developer.mozilla.org/en-US/docs/Web/API/AbortController/abort) on the corresponding [`AbortController`](https://developer.mozilla.org/en-US/docs/Web/API/AbortController).\n * @returns Array of predicted funding rates.\n *\n * @throws {TransportError} When the transport layer throws an error.\n *\n * @see https://hyperliquid.gitbook.io/hyperliquid-docs/for-developers/api/info-endpoint/perpetuals#retrieve-predicted-funding-rates-for-different-venues\n * @example\n * ```ts\n * import * as hl from \"@nktkas/hyperliquid\";\n *\n * const transport = new hl.HttpTransport(); // or `WebSocketTransport`\n *\n * const client = new hl.InfoClient({ transport });\n * const data = await client.predictedFundings();\n * ```\n */\n predictedFundings(...args) {\n return predictedFundings(this, ...args);\n }\n /**\n * Request user existence check before transfer.\n * @param params - Parameters specific to the API request.\n * @param signal - An [`AbortSignal`](https://developer.mozilla.org/en-US/docs/Web/API/AbortSignal) can be used to cancel the request by calling [`abort()`](https://developer.mozilla.org/en-US/docs/Web/API/AbortController/abort) on the corresponding [`AbortController`](https://developer.mozilla.org/en-US/docs/Web/API/AbortController).\n * @returns Pre-transfer user existence check result.\n *\n * @throws {TransportError} When the transport layer throws an error.\n *\n * @see null\n * @example\n * ```ts\n * import * as hl from \"@nktkas/hyperliquid\";\n *\n * const transport = new hl.HttpTransport(); // or `WebSocketTransport`\n *\n * const client = new hl.InfoClient({ transport });\n * const data = await client.preTransferCheck({ user: \"0x...\", source: \"0x...\" });\n * ```\n */\n preTransferCheck(...args) {\n return preTransferCheck(this, ...args);\n }\n /**\n * Request recent trades.\n * @param params - Parameters specific to the API request.\n * @param signal - An [`AbortSignal`](https://developer.mozilla.org/en-US/docs/Web/API/AbortSignal) can be used to cancel the request by calling [`abort()`](https://developer.mozilla.org/en-US/docs/Web/API/AbortController/abort) on the corresponding [`AbortController`](https://developer.mozilla.org/en-US/docs/Web/API/AbortController).\n * @returns Array of recent trades.\n *\n * @throws {TransportError} When the transport layer throws an error.\n *\n * @see null\n * @example\n * ```ts\n * import * as hl from \"@nktkas/hyperliquid\";\n *\n * const transport = new hl.HttpTransport(); // or `WebSocketTransport`\n *\n * const client = new hl.InfoClient({ transport });\n * const data = await client.recentTrades({ coin: \"ETH\" });\n * ```\n */\n recentTrades(...args) {\n return recentTrades(this, ...args);\n }\n /**\n * Request user referral.\n * @param params - Parameters specific to the API request.\n * @param signal - An [`AbortSignal`](https://developer.mozilla.org/en-US/docs/Web/API/AbortSignal) can be used to cancel the request by calling [`abort()`](https://developer.mozilla.org/en-US/docs/Web/API/AbortController/abort) on the corresponding [`AbortController`](https://developer.mozilla.org/en-US/docs/Web/API/AbortController).\n * @returns Referral details for a user.\n *\n * @throws {TransportError} When the transport layer throws an error.\n *\n * @see https://hyperliquid.gitbook.io/hyperliquid-docs/for-developers/api/info-endpoint#query-a-users-referral-information\n * @example\n * ```ts\n * import * as hl from \"@nktkas/hyperliquid\";\n *\n * const transport = new hl.HttpTransport(); // or `WebSocketTransport`\n *\n * const client = new hl.InfoClient({ transport });\n * const data = await client.referral({ user: \"0x...\" });\n * ```\n */\n referral(...args) {\n return referral(this, ...args);\n }\n /**\n * Request spot clearinghouse state.\n * @param params - Parameters specific to the API request.\n * @param signal - An [`AbortSignal`](https://developer.mozilla.org/en-US/docs/Web/API/AbortSignal) can be used to cancel the request by calling [`abort()`](https://developer.mozilla.org/en-US/docs/Web/API/AbortController/abort) on the corresponding [`AbortController`](https://developer.mozilla.org/en-US/docs/Web/API/AbortController).\n * @returns Account summary for spot trading.\n *\n * @throws {TransportError} When the transport layer throws an error.\n *\n * @see https://hyperliquid.gitbook.io/hyperliquid-docs/for-developers/api/info-endpoint/spot#retrieve-a-users-token-balances\n * @example\n * ```ts\n * import * as hl from \"@nktkas/hyperliquid\";\n *\n * const transport = new hl.HttpTransport(); // or `WebSocketTransport`\n *\n * const client = new hl.InfoClient({ transport });\n * const data = await client.spotClearinghouseState({ user: \"0x...\" });\n * ```\n */\n spotClearinghouseState(...args) {\n return spotClearinghouseState(this, ...args);\n }\n /**\n * Request spot deploy state.\n * @param params - Parameters specific to the API request.\n * @param signal - An [`AbortSignal`](https://developer.mozilla.org/en-US/docs/Web/API/AbortSignal) can be used to cancel the request by calling [`abort()`](https://developer.mozilla.org/en-US/docs/Web/API/AbortController/abort) on the corresponding [`AbortController`](https://developer.mozilla.org/en-US/docs/Web/API/AbortController).\n * @returns Deploy state for spot tokens.\n *\n * @throws {TransportError} When the transport layer throws an error.\n *\n * @see https://hyperliquid.gitbook.io/hyperliquid-docs/for-developers/api/info-endpoint/spot#retrieve-information-about-the-spot-deploy-auction\n * @example\n * ```ts\n * import * as hl from \"@nktkas/hyperliquid\";\n *\n * const transport = new hl.HttpTransport(); // or `WebSocketTransport`\n *\n * const client = new hl.InfoClient({ transport });\n * const data = await client.spotDeployState({ user: \"0x...\" });\n * ```\n */\n spotDeployState(...args) {\n return spotDeployState(this, ...args);\n }\n /**\n * Request spot trading metadata.\n * @param signal - An [`AbortSignal`](https://developer.mozilla.org/en-US/docs/Web/API/AbortSignal) can be used to cancel the request by calling [`abort()`](https://developer.mozilla.org/en-US/docs/Web/API/AbortController/abort) on the corresponding [`AbortController`](https://developer.mozilla.org/en-US/docs/Web/API/AbortController).\n * @returns Metadata for spot assets.\n *\n * @throws {TransportError} When the transport layer throws an error.\n *\n * @see https://hyperliquid.gitbook.io/hyperliquid-docs/for-developers/api/info-endpoint/spot#retrieve-spot-metadata\n * @example\n * ```ts\n * import * as hl from \"@nktkas/hyperliquid\";\n *\n * const transport = new hl.HttpTransport(); // or `WebSocketTransport`\n *\n * const client = new hl.InfoClient({ transport });\n * const data = await client.spotMeta();\n * ```\n */\n spotMeta(...args) {\n return spotMeta(this, ...args);\n }\n /**\n * Request spot metadata and asset contexts.\n * @param signal - An [`AbortSignal`](https://developer.mozilla.org/en-US/docs/Web/API/AbortSignal) can be used to cancel the request by calling [`abort()`](https://developer.mozilla.org/en-US/docs/Web/API/AbortController/abort) on the corresponding [`AbortController`](https://developer.mozilla.org/en-US/docs/Web/API/AbortController).\n * @returns Metadata and context for spot assets.\n *\n * @throws {TransportError} When the transport layer throws an error.\n *\n * @see https://hyperliquid.gitbook.io/hyperliquid-docs/for-developers/api/info-endpoint/spot#retrieve-spot-asset-contexts\n * @example\n * ```ts\n * import * as hl from \"@nktkas/hyperliquid\";\n *\n * const transport = new hl.HttpTransport(); // or `WebSocketTransport`\n *\n * const client = new hl.InfoClient({ transport });\n * const data = await client.spotMetaAndAssetCtxs();\n * ```\n */\n spotMetaAndAssetCtxs(...args) {\n return spotMetaAndAssetCtxs(this, ...args);\n }\n /**\n * Request for the status of the spot deploy auction.\n * @param signal - An [`AbortSignal`](https://developer.mozilla.org/en-US/docs/Web/API/AbortSignal) can be used to cancel the request by calling [`abort()`](https://developer.mozilla.org/en-US/docs/Web/API/AbortController/abort) on the corresponding [`AbortController`](https://developer.mozilla.org/en-US/docs/Web/API/AbortController).\n * @returns Status of the spot deploy auction.\n *\n * @throws {TransportError} When the transport layer throws an error.\n *\n * @see https://hyperliquid.gitbook.io/hyperliquid-docs/for-developers/api/info-endpoint/spot#retrieve-information-about-the-spot-pair-deploy-auction\n * @example\n * ```ts\n * import * as hl from \"@nktkas/hyperliquid\";\n *\n * const transport = new hl.HttpTransport(); // or `WebSocketTransport`\n *\n * const client = new hl.InfoClient({ transport });\n * const data = await client.spotPairDeployAuctionStatus();\n * ```\n */\n spotPairDeployAuctionStatus(...args) {\n return spotPairDeployAuctionStatus(this, ...args);\n }\n /**\n * Request user sub-accounts.\n * @param params - Parameters specific to the API request.\n * @param signal - An [`AbortSignal`](https://developer.mozilla.org/en-US/docs/Web/API/AbortSignal) can be used to cancel the request by calling [`abort()`](https://developer.mozilla.org/en-US/docs/Web/API/AbortController/abort) on the corresponding [`AbortController`](https://developer.mozilla.org/en-US/docs/Web/API/AbortController).\n * @returns Array of user sub-account or null if the user does not have any sub-accounts.\n *\n * @throws {TransportError} When the transport layer throws an error.\n *\n * @see https://hyperliquid.gitbook.io/hyperliquid-docs/for-developers/api/info-endpoint#retrieve-a-users-subaccounts\n * @example\n * ```ts\n * import * as hl from \"@nktkas/hyperliquid\";\n *\n * const transport = new hl.HttpTransport(); // or `WebSocketTransport`\n *\n * const client = new hl.InfoClient({ transport });\n * const data = await client.subAccounts({ user: \"0x...\" });\n * ```\n */\n subAccounts(...args) {\n return subAccounts(this, ...args);\n }\n /**\n * Request user sub-accounts V2.\n * @param params - Parameters specific to the API request.\n * @param signal - An [`AbortSignal`](https://developer.mozilla.org/en-US/docs/Web/API/AbortSignal) can be used to cancel the request by calling [`abort()`](https://developer.mozilla.org/en-US/docs/Web/API/AbortController/abort) on the corresponding [`AbortController`](https://developer.mozilla.org/en-US/docs/Web/API/AbortController).\n * @returns Array of user sub-account or null if the user does not have any sub-accounts.\n *\n * @throws {TransportError} When the transport layer throws an error.\n *\n * @see null\n * @example\n * ```ts\n * import * as hl from \"@nktkas/hyperliquid\";\n *\n * const transport = new hl.HttpTransport(); // or `WebSocketTransport`\n *\n * const client = new hl.InfoClient({ transport });\n * const data = await client.subAccounts2({ user: \"0x...\" });\n * ```\n */\n subAccounts2(...args) {\n return subAccounts2(this, ...args);\n }\n /**\n * Request token details.\n * @param params - Parameters specific to the API request.\n * @param signal - An [`AbortSignal`](https://developer.mozilla.org/en-US/docs/Web/API/AbortSignal) can be used to cancel the request by calling [`abort()`](https://developer.mozilla.org/en-US/docs/Web/API/AbortController/abort) on the corresponding [`AbortController`](https://developer.mozilla.org/en-US/docs/Web/API/AbortController).\n * @returns Details of a token.\n *\n * @throws {TransportError} When the transport layer throws an error.\n *\n * @see https://hyperliquid.gitbook.io/hyperliquid-docs/for-developers/api/info-endpoint/spot#retrieve-information-about-a-token\n * @example\n * ```ts\n * import * as hl from \"@nktkas/hyperliquid\";\n *\n * const transport = new hl.HttpTransport(); // or `WebSocketTransport`\n *\n * const client = new hl.InfoClient({ transport });\n * const data = await client.tokenDetails({ tokenId: \"0x...\" });\n * ```\n */\n tokenDetails(...args) {\n return tokenDetails(this, ...args);\n }\n /**\n * Request twap history of a user.\n * @param params - Parameters specific to the API request.\n * @param signal - An [`AbortSignal`](https://developer.mozilla.org/en-US/docs/Web/API/AbortSignal) can be used to cancel the request by calling [`abort()`](https://developer.mozilla.org/en-US/docs/Web/API/AbortController/abort) on the corresponding [`AbortController`](https://developer.mozilla.org/en-US/docs/Web/API/AbortController).\n * @returns Array of user's TWAP history.\n *\n * @throws {TransportError} When the transport layer throws an error.\n *\n * @see null\n * @example\n * ```ts\n * import * as hl from \"@nktkas/hyperliquid\";\n *\n * const transport = new hl.HttpTransport(); // or `WebSocketTransport`\n *\n * const client = new hl.InfoClient({ transport });\n * const data = await client.twapHistory({ user: \"0x...\" });\n * ```\n */\n twapHistory(...args) {\n return twapHistory(this, ...args);\n }\n /**\n * Request transaction details by transaction hash.\n * @param params - Parameters specific to the API request.\n * @param signal - An [`AbortSignal`](https://developer.mozilla.org/en-US/docs/Web/API/AbortSignal) can be used to cancel the request by calling [`abort()`](https://developer.mozilla.org/en-US/docs/Web/API/AbortController/abort) on the corresponding [`AbortController`](https://developer.mozilla.org/en-US/docs/Web/API/AbortController).\n * @returns Transaction details.\n *\n * @throws {TransportError} When the transport layer throws an error.\n *\n * @see null\n * @example\n * ```ts\n * import * as hl from \"@nktkas/hyperliquid\";\n *\n * const transport = new hl.HttpTransport(); // only `HttpTransport` supports this API\n *\n * const client = new hl.InfoClient({ transport });\n * const data = await client.txDetails({ hash: \"0x...\" });\n * ```\n */\n txDetails(...args) {\n return txDetails(this, ...args);\n }\n /**\n * Request array of user transaction details.\n * @param params - Parameters specific to the API request.\n * @param signal - An [`AbortSignal`](https://developer.mozilla.org/en-US/docs/Web/API/AbortSignal) can be used to cancel the request by calling [`abort()`](https://developer.mozilla.org/en-US/docs/Web/API/AbortController/abort) on the corresponding [`AbortController`](https://developer.mozilla.org/en-US/docs/Web/API/AbortController).\n * @returns Array of user transaction details.\n *\n * @throws {TransportError} When the transport layer throws an error.\n *\n * @see null\n * @example\n * ```ts\n * import * as hl from \"@nktkas/hyperliquid\";\n *\n * const transport = new hl.HttpTransport(); // only `HttpTransport` supports this API\n *\n * const client = new hl.InfoClient({ transport });\n * const data = await client.userDetails({ user: \"0x...\" });\n * ```\n */\n userDetails(...args) {\n return userDetails(this, ...args);\n }\n /**\n * Request user HIP-3 DEX abstraction state.\n * @param params - Parameters specific to the API request.\n * @param signal - An [`AbortSignal`](https://developer.mozilla.org/en-US/docs/Web/API/AbortSignal) can be used to cancel the request by calling [`abort()`](https://developer.mozilla.org/en-US/docs/Web/API/AbortController/abort) on the corresponding [`AbortController`](https://developer.mozilla.org/en-US/docs/Web/API/AbortController).\n * @returns User HIP-3 DEX abstraction state.\n *\n * @throws {TransportError} When the transport layer throws an error.\n *\n * @see https://hyperliquid.gitbook.io/hyperliquid-docs/for-developers/api/info-endpoint#query-a-users-hip-3-dex-abstraction-state\n * @example\n * ```ts\n * import * as hl from \"@nktkas/hyperliquid\";\n *\n * const transport = new hl.HttpTransport(); // only `HttpTransport` supports this API\n *\n * const client = new hl.InfoClient({ transport });\n * const data = await client.userDexAbstraction({ user: \"0x...\" });\n * ```\n */\n userDexAbstraction(...args) {\n return userDexAbstraction2(this, ...args);\n }\n /**\n * Request user fees.\n * @param params - Parameters specific to the API request.\n * @param signal - An [`AbortSignal`](https://developer.mozilla.org/en-US/docs/Web/API/AbortSignal) can be used to cancel the request by calling [`abort()`](https://developer.mozilla.org/en-US/docs/Web/API/AbortController/abort) on the corresponding [`AbortController`](https://developer.mozilla.org/en-US/docs/Web/API/AbortController).\n * @returns User fees.\n *\n * @throws {TransportError} When the transport layer throws an error.\n *\n * @see https://hyperliquid.gitbook.io/hyperliquid-docs/for-developers/api/info-endpoint#query-a-users-fees\n * @example\n * ```ts\n * import * as hl from \"@nktkas/hyperliquid\";\n *\n * const transport = new hl.HttpTransport(); // or `WebSocketTransport`\n *\n * const client = new hl.InfoClient({ transport });\n * const data = await client.userFees({ user: \"0x...\" });\n * ```\n */\n userFees(...args) {\n return userFees(this, ...args);\n }\n /**\n * Request array of user fills.\n * @param params - Parameters specific to the API request.\n * @param signal - An [`AbortSignal`](https://developer.mozilla.org/en-US/docs/Web/API/AbortSignal) can be used to cancel the request by calling [`abort()`](https://developer.mozilla.org/en-US/docs/Web/API/AbortController/abort) on the corresponding [`AbortController`](https://developer.mozilla.org/en-US/docs/Web/API/AbortController).\n * @returns Array of user trade fills.\n *\n * @throws {TransportError} When the transport layer throws an error.\n *\n * @see https://hyperliquid.gitbook.io/hyperliquid-docs/for-developers/api/info-endpoint#retrieve-a-users-fills\n * @example\n * ```ts\n * import * as hl from \"@nktkas/hyperliquid\";\n *\n * const transport = new hl.HttpTransport(); // or `WebSocketTransport`\n *\n * const client = new hl.InfoClient({ transport });\n * const data = await client.userFills({ user: \"0x...\" });\n * ```\n */\n userFills(...args) {\n return userFills(this, ...args);\n }\n /**\n * Request array of user fills by time.\n * @param params - Parameters specific to the API request.\n * @param signal - An [`AbortSignal`](https://developer.mozilla.org/en-US/docs/Web/API/AbortSignal) can be used to cancel the request by calling [`abort()`](https://developer.mozilla.org/en-US/docs/Web/API/AbortController/abort) on the corresponding [`AbortController`](https://developer.mozilla.org/en-US/docs/Web/API/AbortController).\n * @returns Array of user trade fills by time.\n *\n * @throws {TransportError} When the transport layer throws an error.\n *\n * @see https://hyperliquid.gitbook.io/hyperliquid-docs/for-developers/api/info-endpoint#retrieve-a-users-fills-by-time\n * @example\n * ```ts\n * import * as hl from \"@nktkas/hyperliquid\";\n *\n * const transport = new hl.HttpTransport(); // or `WebSocketTransport`\n *\n * const client = new hl.InfoClient({ transport });\n * const data = await client.userFillsByTime({\n * user: \"0x...\",\n * startTime: Date.now() - 1000 * 60 * 60 * 24,\n * });\n * ```\n */\n userFillsByTime(...args) {\n return userFillsByTime(this, ...args);\n }\n /**\n * Request array of user funding ledger updates.\n * @param params - Parameters specific to the API request.\n * @param signal - An [`AbortSignal`](https://developer.mozilla.org/en-US/docs/Web/API/AbortSignal) can be used to cancel the request by calling [`abort()`](https://developer.mozilla.org/en-US/docs/Web/API/AbortController/abort) on the corresponding [`AbortController`](https://developer.mozilla.org/en-US/docs/Web/API/AbortController).\n * @returns Array of user funding ledger updates.\n *\n * @throws {TransportError} When the transport layer throws an error.\n *\n * @see https://hyperliquid.gitbook.io/hyperliquid-docs/for-developers/api/info-endpoint/perpetuals#retrieve-a-users-funding-history-or-non-funding-ledger-updates\n * @example\n * ```ts\n * import * as hl from \"@nktkas/hyperliquid\";\n *\n * const transport = new hl.HttpTransport(); // or `WebSocketTransport`\n *\n * const client = new hl.InfoClient({ transport });\n * const data = await client.userFunding({\n * user: \"0x...\",\n * startTime: Date.now() - 1000 * 60 * 60 * 24,\n * });\n * ```\n */\n userFunding(...args) {\n return userFunding(this, ...args);\n }\n /**\n * Request user non-funding ledger updates.\n * @param params - Parameters specific to the API request.\n * @param signal - An [`AbortSignal`](https://developer.mozilla.org/en-US/docs/Web/API/AbortSignal) can be used to cancel the request by calling [`abort()`](https://developer.mozilla.org/en-US/docs/Web/API/AbortController/abort) on the corresponding [`AbortController`](https://developer.mozilla.org/en-US/docs/Web/API/AbortController).\n * @returns Array of user's non-funding ledger update.\n *\n * @throws {TransportError} When the transport layer throws an error.\n *\n * @see https://hyperliquid.gitbook.io/hyperliquid-docs/for-developers/api/info-endpoint/perpetuals#retrieve-a-users-funding-history-or-non-funding-ledger-updates\n * @example\n * ```ts\n * import * as hl from \"@nktkas/hyperliquid\";\n *\n * const transport = new hl.HttpTransport(); // or `WebSocketTransport`\n *\n * const client = new hl.InfoClient({ transport });\n * const data = await client.userNonFundingLedgerUpdates({\n * user: \"0x...\",\n * startTime: Date.now() - 1000 * 60 * 60 * 24,\n * });\n * ```\n */\n userNonFundingLedgerUpdates(...args) {\n return userNonFundingLedgerUpdates(this, ...args);\n }\n /**\n * Request user rate limits.\n * @param params - Parameters specific to the API request.\n * @param signal - An [`AbortSignal`](https://developer.mozilla.org/en-US/docs/Web/API/AbortSignal) can be used to cancel the request by calling [`abort()`](https://developer.mozilla.org/en-US/docs/Web/API/AbortController/abort) on the corresponding [`AbortController`](https://developer.mozilla.org/en-US/docs/Web/API/AbortController).\n * @returns User rate limits.\n *\n * @throws {TransportError} When the transport layer throws an error.\n *\n * @see https://hyperliquid.gitbook.io/hyperliquid-docs/for-developers/api/info-endpoint#query-user-rate-limits\n * @example\n * ```ts\n * import * as hl from \"@nktkas/hyperliquid\";\n *\n * const transport = new hl.HttpTransport(); // or `WebSocketTransport`\n *\n * const client = new hl.InfoClient({ transport });\n * const data = await client.userRateLimit({ user: \"0x...\" });\n * ```\n */\n userRateLimit(...args) {\n return userRateLimit(this, ...args);\n }\n /**\n * Request user role.\n * @param params - Parameters specific to the API request.\n * @param signal - An [`AbortSignal`](https://developer.mozilla.org/en-US/docs/Web/API/AbortSignal) can be used to cancel the request by calling [`abort()`](https://developer.mozilla.org/en-US/docs/Web/API/AbortController/abort) on the corresponding [`AbortController`](https://developer.mozilla.org/en-US/docs/Web/API/AbortController).\n * @returns User role.\n *\n * @throws {TransportError} When the transport layer throws an error.\n *\n * @see https://hyperliquid.gitbook.io/hyperliquid-docs/for-developers/api/info-endpoint#query-a-users-role\n * @example\n * ```ts\n * import * as hl from \"@nktkas/hyperliquid\";\n *\n * const transport = new hl.HttpTransport(); // or `WebSocketTransport`\n *\n * const client = new hl.InfoClient({ transport });\n * const data = await client.userRole({ user: \"0x...\" });\n * ```\n */\n userRole(...args) {\n return userRole(this, ...args);\n }\n /**\n * Request multi-sig signers for a user.\n * @param params - Parameters specific to the API request.\n * @param signal - An [`AbortSignal`](https://developer.mozilla.org/en-US/docs/Web/API/AbortSignal) can be used to cancel the request by calling [`abort()`](https://developer.mozilla.org/en-US/docs/Web/API/AbortController/abort) on the corresponding [`AbortController`](https://developer.mozilla.org/en-US/docs/Web/API/AbortController).\n * @returns Multi-sig signers for a user or null if the user does not have any multi-sig signers.\n *\n * @throws {TransportError} When the transport layer throws an error.\n *\n * @see null\n * @example\n * ```ts\n * import * as hl from \"@nktkas/hyperliquid\";\n *\n * const transport = new hl.HttpTransport(); // or `WebSocketTransport`\n *\n * const client = new hl.InfoClient({ transport });\n * const data = await client.userToMultiSigSigners({ user: \"0x...\" });\n * ```\n */\n userToMultiSigSigners(...args) {\n return userToMultiSigSigners(this, ...args);\n }\n /**\n * Request user TWAP slice fills.\n * @param params - Parameters specific to the API request.\n * @param signal - An [`AbortSignal`](https://developer.mozilla.org/en-US/docs/Web/API/AbortSignal) can be used to cancel the request by calling [`abort()`](https://developer.mozilla.org/en-US/docs/Web/API/AbortController/abort) on the corresponding [`AbortController`](https://developer.mozilla.org/en-US/docs/Web/API/AbortController).\n * @returns Array of user's twap slice fill.\n *\n * @throws {TransportError} When the transport layer throws an error.\n *\n * @see https://hyperliquid.gitbook.io/hyperliquid-docs/for-developers/api/info-endpoint#retrieve-a-users-twap-slice-fills\n * @example\n * ```ts\n * import * as hl from \"@nktkas/hyperliquid\";\n *\n * const transport = new hl.HttpTransport(); // or `WebSocketTransport`\n *\n * const client = new hl.InfoClient({ transport });\n * const data = await client.userTwapSliceFills({ user: \"0x...\" });\n * ```\n */\n userTwapSliceFills(...args) {\n return userTwapSliceFills(this, ...args);\n }\n /**\n * Request user TWAP slice fills by time.\n * @param params - Parameters specific to the API request.\n * @param signal - An [`AbortSignal`](https://developer.mozilla.org/en-US/docs/Web/API/AbortSignal) can be used to cancel the request by calling [`abort()`](https://developer.mozilla.org/en-US/docs/Web/API/AbortController/abort) on the corresponding [`AbortController`](https://developer.mozilla.org/en-US/docs/Web/API/AbortController).\n * @returns Array of user's twap slice fill by time.\n *\n * @throws {TransportError} When the transport layer throws an error.\n *\n * @see null\n * @example\n * ```ts\n * import * as hl from \"@nktkas/hyperliquid\";\n *\n * const transport = new hl.HttpTransport(); // or `WebSocketTransport`\n *\n * const client = new hl.InfoClient({ transport });\n * const data = await client.userTwapSliceFillsByTime({\n * user: \"0x...\",\n * startTime: Date.now() - 1000 * 60 * 60 * 24,\n * });\n * ```\n */\n userTwapSliceFillsByTime(...args) {\n return userTwapSliceFillsByTime(this, ...args);\n }\n /**\n * Request user vault deposits.\n * @param params - Parameters specific to the API request.\n * @param signal - An [`AbortSignal`](https://developer.mozilla.org/en-US/docs/Web/API/AbortSignal) can be used to cancel the request by calling [`abort()`](https://developer.mozilla.org/en-US/docs/Web/API/AbortController/abort) on the corresponding [`AbortController`](https://developer.mozilla.org/en-US/docs/Web/API/AbortController).\n * @returns Array of user's vault deposits.\n *\n * @throws {TransportError} When the transport layer throws an error.\n *\n * @see https://hyperliquid.gitbook.io/hyperliquid-docs/for-developers/api/info-endpoint#retrieve-a-users-vault-deposits\n * @example\n * ```ts\n * import * as hl from \"@nktkas/hyperliquid\";\n *\n * const transport = new hl.HttpTransport(); // or `WebSocketTransport`\n *\n * const client = new hl.InfoClient({ transport });\n * const data = await client.userVaultEquities({ user: \"0x...\" });\n * ```\n */\n userVaultEquities(...args) {\n return userVaultEquities(this, ...args);\n }\n /**\n * Request validator L1 votes.\n * @param signal - An [`AbortSignal`](https://developer.mozilla.org/en-US/docs/Web/API/AbortSignal) can be used to cancel the request by calling [`abort()`](https://developer.mozilla.org/en-US/docs/Web/API/AbortController/abort) on the corresponding [`AbortController`](https://developer.mozilla.org/en-US/docs/Web/API/AbortController).\n * @returns Array of L1 governance votes cast by validators.\n *\n * @throws {TransportError} When the transport layer throws an error.\n *\n * @see null\n * @example\n * ```ts\n * import * as hl from \"@nktkas/hyperliquid\";\n *\n * const transport = new hl.HttpTransport(); // or `WebSocketTransport`\n *\n * const client = new hl.InfoClient({ transport });\n * const data = await client.validatorL1Votes();\n * ```\n */\n validatorL1Votes(...args) {\n return validatorL1Votes(this, ...args);\n }\n /**\n * Request validator summaries.\n * @param signal - An [`AbortSignal`](https://developer.mozilla.org/en-US/docs/Web/API/AbortSignal) can be used to cancel the request by calling [`abort()`](https://developer.mozilla.org/en-US/docs/Web/API/AbortController/abort) on the corresponding [`AbortController`](https://developer.mozilla.org/en-US/docs/Web/API/AbortController).\n * @returns Array of validator performance statistics.\n *\n * @throws {TransportError} When the transport layer throws an error.\n *\n * @see null\n * @example\n * ```ts\n * import * as hl from \"@nktkas/hyperliquid\";\n *\n * const transport = new hl.HttpTransport(); // or `WebSocketTransport`\n *\n * const client = new hl.InfoClient({ transport });\n * const data = await client.validatorSummaries();\n * ```\n */\n validatorSummaries(...args) {\n return validatorSummaries(this, ...args);\n }\n /**\n * Request details of a vault.\n * @param params - Parameters specific to the API request.\n * @param signal - An [`AbortSignal`](https://developer.mozilla.org/en-US/docs/Web/API/AbortSignal) can be used to cancel the request by calling [`abort()`](https://developer.mozilla.org/en-US/docs/Web/API/AbortController/abort) on the corresponding [`AbortController`](https://developer.mozilla.org/en-US/docs/Web/API/AbortController).\n * @returns Details of a vault or null if the vault does not exist.\n *\n * @throws {TransportError} When the transport layer throws an error.\n *\n * @see https://hyperliquid.gitbook.io/hyperliquid-docs/for-developers/api/info-endpoint#retrieve-details-for-a-vault\n * @example\n * ```ts\n * import * as hl from \"@nktkas/hyperliquid\";\n *\n * const transport = new hl.HttpTransport(); // or `WebSocketTransport`\n *\n * const client = new hl.InfoClient({ transport });\n * const data = await client.vaultDetails({ vaultAddress: \"0x...\" });\n * ```\n */\n vaultDetails(...args) {\n return vaultDetails(this, ...args);\n }\n /**\n * Request a list of vaults less than 2 hours old.\n * @param signal - An [`AbortSignal`](https://developer.mozilla.org/en-US/docs/Web/API/AbortSignal) can be used to cancel the request by calling [`abort()`](https://developer.mozilla.org/en-US/docs/Web/API/AbortController/abort) on the corresponding [`AbortController`](https://developer.mozilla.org/en-US/docs/Web/API/AbortController).\n * @returns Array of vaults less than 2 hours old.\n *\n * @throws {TransportError} When the transport layer throws an error.\n *\n * @see null\n * @example\n * ```ts\n * import * as hl from \"@nktkas/hyperliquid\";\n *\n * const transport = new hl.HttpTransport(); // or `WebSocketTransport`\n *\n * const client = new hl.InfoClient({ transport });\n * const data = await client.vaultSummaries();\n * ```\n */\n vaultSummaries(...args) {\n return vaultSummaries(this, ...args);\n }\n /**\n * Request comprehensive user and market data.\n * @param params - Parameters specific to the API request.\n * @param signal - An [`AbortSignal`](https://developer.mozilla.org/en-US/docs/Web/API/AbortSignal) can be used to cancel the request by calling [`abort()`](https://developer.mozilla.org/en-US/docs/Web/API/AbortController/abort) on the corresponding [`AbortController`](https://developer.mozilla.org/en-US/docs/Web/API/AbortController).\n * @returns Comprehensive user and market data.\n *\n * @throws {TransportError} When the transport layer throws an error.\n *\n * @see null\n * @example\n * ```ts\n * import * as hl from \"@nktkas/hyperliquid\";\n *\n * const transport = new hl.HttpTransport(); // or `WebSocketTransport`\n *\n * const client = new hl.InfoClient({ transport });\n * const data = await client.webData2({ user: \"0x...\" });\n * ```\n */\n webData2(...args) {\n return webData2(this, ...args);\n }\n };\n\n // ../../../node_modules/.pnpm/@nktkas+hyperliquid@0.25.7_typescript@5.8.3/node_modules/@nktkas/hyperliquid/esm/src/api/subscription/~client.js\n init_dirname();\n init_buffer2();\n init_process2();\n\n // ../../../node_modules/.pnpm/@nktkas+hyperliquid@0.25.7_typescript@5.8.3/node_modules/@nktkas/hyperliquid/esm/src/api/subscription/activeAssetCtx.js\n init_dirname();\n init_buffer2();\n init_process2();\n\n // ../../../node_modules/.pnpm/@nktkas+hyperliquid@0.25.7_typescript@5.8.3/node_modules/@nktkas/hyperliquid/esm/src/api/subscription/activeAssetData.js\n init_dirname();\n init_buffer2();\n init_process2();\n\n // ../../../node_modules/.pnpm/@nktkas+hyperliquid@0.25.7_typescript@5.8.3/node_modules/@nktkas/hyperliquid/esm/src/api/subscription/activeSpotAssetCtx.js\n init_dirname();\n init_buffer2();\n init_process2();\n\n // ../../../node_modules/.pnpm/@nktkas+hyperliquid@0.25.7_typescript@5.8.3/node_modules/@nktkas/hyperliquid/esm/src/api/subscription/allMids.js\n init_dirname();\n init_buffer2();\n init_process2();\n\n // ../../../node_modules/.pnpm/@nktkas+hyperliquid@0.25.7_typescript@5.8.3/node_modules/@nktkas/hyperliquid/esm/src/api/subscription/assetCtxs.js\n init_dirname();\n init_buffer2();\n init_process2();\n\n // ../../../node_modules/.pnpm/@nktkas+hyperliquid@0.25.7_typescript@5.8.3/node_modules/@nktkas/hyperliquid/esm/src/api/subscription/bbo.js\n init_dirname();\n init_buffer2();\n init_process2();\n\n // ../../../node_modules/.pnpm/@nktkas+hyperliquid@0.25.7_typescript@5.8.3/node_modules/@nktkas/hyperliquid/esm/src/api/subscription/candle.js\n init_dirname();\n init_buffer2();\n init_process2();\n\n // ../../../node_modules/.pnpm/@nktkas+hyperliquid@0.25.7_typescript@5.8.3/node_modules/@nktkas/hyperliquid/esm/src/api/subscription/clearinghouseState.js\n init_dirname();\n init_buffer2();\n init_process2();\n\n // ../../../node_modules/.pnpm/@nktkas+hyperliquid@0.25.7_typescript@5.8.3/node_modules/@nktkas/hyperliquid/esm/src/api/subscription/explorerBlock.js\n init_dirname();\n init_buffer2();\n init_process2();\n\n // ../../../node_modules/.pnpm/@nktkas+hyperliquid@0.25.7_typescript@5.8.3/node_modules/@nktkas/hyperliquid/esm/src/api/subscription/explorerTxs.js\n init_dirname();\n init_buffer2();\n init_process2();\n\n // ../../../node_modules/.pnpm/@nktkas+hyperliquid@0.25.7_typescript@5.8.3/node_modules/@nktkas/hyperliquid/esm/src/api/subscription/l2Book.js\n init_dirname();\n init_buffer2();\n init_process2();\n\n // ../../../node_modules/.pnpm/@nktkas+hyperliquid@0.25.7_typescript@5.8.3/node_modules/@nktkas/hyperliquid/esm/src/api/subscription/notification.js\n init_dirname();\n init_buffer2();\n init_process2();\n\n // ../../../node_modules/.pnpm/@nktkas+hyperliquid@0.25.7_typescript@5.8.3/node_modules/@nktkas/hyperliquid/esm/src/api/subscription/openOrders.js\n init_dirname();\n init_buffer2();\n init_process2();\n\n // ../../../node_modules/.pnpm/@nktkas+hyperliquid@0.25.7_typescript@5.8.3/node_modules/@nktkas/hyperliquid/esm/src/api/subscription/orderUpdates.js\n init_dirname();\n init_buffer2();\n init_process2();\n\n // ../../../node_modules/.pnpm/@nktkas+hyperliquid@0.25.7_typescript@5.8.3/node_modules/@nktkas/hyperliquid/esm/src/api/subscription/trades.js\n init_dirname();\n init_buffer2();\n init_process2();\n\n // ../../../node_modules/.pnpm/@nktkas+hyperliquid@0.25.7_typescript@5.8.3/node_modules/@nktkas/hyperliquid/esm/src/api/subscription/userEvents.js\n init_dirname();\n init_buffer2();\n init_process2();\n\n // ../../../node_modules/.pnpm/@nktkas+hyperliquid@0.25.7_typescript@5.8.3/node_modules/@nktkas/hyperliquid/esm/src/api/subscription/userFills.js\n init_dirname();\n init_buffer2();\n init_process2();\n\n // ../../../node_modules/.pnpm/@nktkas+hyperliquid@0.25.7_typescript@5.8.3/node_modules/@nktkas/hyperliquid/esm/src/api/subscription/userFundings.js\n init_dirname();\n init_buffer2();\n init_process2();\n\n // ../../../node_modules/.pnpm/@nktkas+hyperliquid@0.25.7_typescript@5.8.3/node_modules/@nktkas/hyperliquid/esm/src/api/subscription/userHistoricalOrders.js\n init_dirname();\n init_buffer2();\n init_process2();\n\n // ../../../node_modules/.pnpm/@nktkas+hyperliquid@0.25.7_typescript@5.8.3/node_modules/@nktkas/hyperliquid/esm/src/api/subscription/userNonFundingLedgerUpdates.js\n init_dirname();\n init_buffer2();\n init_process2();\n\n // ../../../node_modules/.pnpm/@nktkas+hyperliquid@0.25.7_typescript@5.8.3/node_modules/@nktkas/hyperliquid/esm/src/api/subscription/userTwapHistory.js\n init_dirname();\n init_buffer2();\n init_process2();\n\n // ../../../node_modules/.pnpm/@nktkas+hyperliquid@0.25.7_typescript@5.8.3/node_modules/@nktkas/hyperliquid/esm/src/api/subscription/userTwapSliceFills.js\n init_dirname();\n init_buffer2();\n init_process2();\n\n // ../../../node_modules/.pnpm/@nktkas+hyperliquid@0.25.7_typescript@5.8.3/node_modules/@nktkas/hyperliquid/esm/src/api/subscription/webData3.js\n init_dirname();\n init_buffer2();\n init_process2();\n\n // src/lib/types.ts\n init_dirname();\n init_buffer2();\n init_process2();\n var HYPERLIQUID_BRIDGE_ADDRESS_MAINNET = \"0x2Df1c51E09aECF9cacB7bc98cB1742757f163dF7\";\n var ARBITRUM_USDC_ADDRESS_MAINNET = \"0xaf88d065e77c8cC2239327C5EDb3A432268e5831\";\n\n // src/lib/schemas.ts\n init_dirname();\n init_buffer2();\n init_process2();\n init_esm5();\n var actionTypeSchema = external_exports.enum([\n \"deposit\",\n \"withdraw\",\n \"sendSpotAsset\",\n \"sendPerpUsdc\",\n \"transferToSpot\",\n \"transferToPerp\",\n \"spotBuy\",\n \"spotSell\",\n \"perpLong\",\n \"perpShort\",\n \"cancelOrder\",\n \"cancelAllOrdersForSymbol\"\n ]);\n var depositParamsSchema = external_exports.object({\n amount: external_exports.string().describe(\"Amount of USDC to deposit (minimum 6 USDC: 5 USDC + 1 USDC fee)\")\n });\n var withdrawParamsSchema = external_exports.object({\n amount: external_exports.string().describe(\n 'Amount of USDC to withdraw from Hyperliquid to L1 (Arbitrum), specified in micro-units as a string (e.g., \"1000000\" means 1.0 USDC; 1 USDC = 1,000,000 micro-units).'\n ),\n destination: external_exports.string().optional().describe(\n \"Destination address on L1 (Arbitrum) to receive the withdrawn USDC. If not provided, defaults to the Agent Wallet PKP ETH address.\"\n )\n });\n var transferParamsSchema = external_exports.object({\n amount: external_exports.string().describe(\n 'Amount of USDC to transfer to spot or perp, specified in micro-units as a string (e.g., \"1000000\" means 1.0 USDC; 1 USDC = 1,000,000 micro-units).'\n )\n });\n var sendSpotAssetParamsSchema = external_exports.object({\n destination: external_exports.string().describe(\"Destination Hyperliquid spot account address to send assets to\"),\n token: external_exports.string().describe('Token symbol to send (e.g., \"USDC\", \"PURR\", etc.)'),\n amount: external_exports.string().describe(\n 'Amount to send, specified in Hyperliquid defined micro-units as a string (e.g., USDC generally has 6 decimals, but Hyperliquid defines it as having 8 decimals so \"100000000\" means 1.0 USDC).'\n )\n });\n var sendPerpUsdcParamsSchema = external_exports.object({\n destination: external_exports.string().describe(\"Destination Hyperliquid perp account address to send USDC to\"),\n amount: external_exports.string().describe(\n 'Amount of USDC to send, specified in micro-units as a string (e.g., \"1000000\" means 1.0 USDC; 1 USDC = 1,000,000 micro-units).'\n )\n });\n var orderTypeSchema = external_exports.discriminatedUnion(\"type\", [\n external_exports.object({\n type: external_exports.literal(\"limit\"),\n tif: external_exports.enum([\"Gtc\", \"Ioc\", \"Alo\"]).describe(\n \"Time in force: Gtc (Good Till Canceled), Ioc (Immediate Or Cancel), Alo (Add Liquidity Only)\"\n )\n }),\n external_exports.object({\n type: external_exports.literal(\"market\")\n })\n ]);\n var spotTradeParamsSchema = external_exports.object({\n symbol: external_exports.string().describe('Trading pair symbol (e.g., \"HYPE/USDC\")'),\n price: external_exports.string().describe(\"Limit price\"),\n size: external_exports.string().describe(\"Order size\"),\n orderType: orderTypeSchema.optional().describe(\n 'Order type: { type: \"limit\", tif: \"Gtc\" | \"Ioc\" | \"Alo\" } or { type: \"market\" }. Default: { type: \"limit\", tif: \"Gtc\" }'\n )\n }).refine(\n (data) => {\n const parts = data.symbol.split(\"/\");\n return parts.length === 2 && parts[0] && parts[1];\n },\n {\n message: \"Invalid trading pair format. Expected format: BASE/QUOTE (e.g., BTC/USDC)\"\n }\n );\n var cancelOrderParamsSchema = external_exports.object({\n symbol: external_exports.string().describe('Trading pair symbol (e.g., \"PURR/USDC\")'),\n orderId: external_exports.number().describe(\"Order ID to cancel\")\n }).refine(\n (data) => {\n const parts = data.symbol.split(\"/\");\n return parts.length === 2 && parts[0] && parts[1];\n },\n {\n message: \"Invalid trading pair format. Expected format: BASE/QUOTE (e.g., BTC/USDC)\"\n }\n );\n var cancelAllOrdersForSymbolParamsSchema = external_exports.object({\n symbol: external_exports.string().describe('Trading pair symbol to cancel all orders for (e.g., \"PURR/USDC\")')\n }).refine(\n (data) => {\n const parts = data.symbol.split(\"/\");\n return parts.length === 2 && parts[0] && parts[1];\n },\n {\n message: \"Invalid trading pair format. Expected format: BASE/QUOTE (e.g., BTC/USDC)\"\n }\n );\n var perpTradeParamsSchema = external_exports.object({\n symbol: external_exports.string().describe('Perpetual symbol (e.g., \"ETH\")'),\n price: external_exports.string().describe(\"Limit price\"),\n size: external_exports.string().describe(\"Order size in base asset\"),\n leverage: external_exports.number().min(1).max(10).describe(\"Leverage multiplier (1-10x)\"),\n isCross: external_exports.boolean().optional().describe(\"Cross leverage (default: true)\"),\n reduceOnly: external_exports.boolean().optional().describe(\n \"Reduce-only: if true, order will only reduce existing position and cannot increase it (default: false). Use this to close positions without worrying about exact size.\"\n ),\n orderType: orderTypeSchema.optional().describe(\n 'Order type: { type: \"limit\", tif: \"Gtc\" | \"Ioc\" | \"Alo\" } or { type: \"market\" }. Default: { type: \"limit\", tif: \"Gtc\" }'\n )\n });\n var abilityParamsSchema = external_exports.object({\n action: actionTypeSchema.describe(\"Action type to execute\"),\n // Network selection\n useTestnet: external_exports.boolean().optional().describe(\"Use Hyperliquid testnet instead of mainnet (default: false)\"),\n // Deposit-specific params\n deposit: depositParamsSchema.optional().describe(\"Deposit parameters (required for deposit action)\"),\n // Withdraw-specific params\n withdraw: withdrawParamsSchema.optional().describe(\"Withdraw parameters (required for withdraw action)\"),\n // Send spot asset params\n sendSpotAsset: sendSpotAssetParamsSchema.optional().describe(\"Send spot asset parameters (required for sendSpotAsset action)\"),\n // Send perp USDC params\n sendPerpUsdc: sendPerpUsdcParamsSchema.optional().describe(\"Send perp USDC parameters (required for sendPerpUsdc action)\"),\n // Transfer to spot or perps params\n transfer: transferParamsSchema.optional().describe(\n \"Transfer to spot or perp parameters (required for transferToSpot/transferToPerp action)\"\n ),\n // Spot trading params\n spot: spotTradeParamsSchema.optional().describe(\"Spot trading parameters (required for spotBuy/spotSell)\"),\n // Perp trading params\n perp: perpTradeParamsSchema.optional().describe(\"Perpetual trading parameters (required for perpLong/perpShort)\"),\n // Cancel order params\n cancelOrder: cancelOrderParamsSchema.optional().describe(\"Cancel specific order (required for cancelOrder action)\"),\n // Cancel all orders for symbol params\n cancelAllOrdersForSymbol: cancelAllOrdersForSymbolParamsSchema.optional().describe(\"Cancel all orders for a symbol (required for cancelAllOrdersForSymbol action)\"),\n // Arbitrum RPC URL\n arbitrumRpcUrl: external_exports.string().optional().describe(\"Arbitrum RPC URL (required for precheck)\")\n }).refine(\n (data) => {\n if (data.action === \"deposit\")\n return !!data.deposit;\n if (data.action === \"withdraw\")\n return !!data.withdraw;\n if (data.action === \"sendSpotAsset\")\n return !!data.sendSpotAsset;\n if (data.action === \"sendPerpUsdc\")\n return !!data.sendPerpUsdc;\n if (data.action === \"transferToSpot\" || data.action === \"transferToPerp\")\n return !!data.transfer;\n if (data.action === \"spotBuy\" || data.action === \"spotSell\")\n return !!data.spot;\n if (data.action === \"perpLong\" || data.action === \"perpShort\")\n return !!data.perp;\n if (data.action === \"cancelOrder\")\n return !!data.cancelOrder;\n if (data.action === \"cancelAllOrdersForSymbol\")\n return !!data.cancelAllOrdersForSymbol;\n return false;\n },\n {\n message: \"Missing required parameters for the specified action\"\n }\n );\n var precheckSuccessSchema = external_exports.object({\n action: external_exports.string().describe(\"Action that was prechecked\"),\n availableBalance: external_exports.string().optional().describe(\"The available balance of the asset in the Hyperliquid account\")\n });\n var precheckFailSchema = external_exports.object({\n action: external_exports.string().describe(\"Action that was prechecked\"),\n reason: external_exports.string().describe(\"The reason the precheck failed\"),\n availableBalance: external_exports.string().optional().describe(\"The available balance of the asset in the Hyperliquid account\"),\n requiredBalance: external_exports.string().optional().describe(\"The required balance of the asset in the Hyperliquid account\"),\n balanceAsset: external_exports.string().optional().describe(\"The asset in the Hyperliquid account\")\n });\n var executeFailSchema = external_exports.object({\n action: external_exports.string().describe(\"Action that was executed\"),\n reason: external_exports.string().describe(\"The reason the execution failed\")\n });\n var executeSuccessSchema = external_exports.object({\n action: external_exports.string().describe(\"Action that was executed\"),\n txHash: external_exports.string().optional().describe(\"Transaction hash (for deposit action)\"),\n withdrawResult: external_exports.any().optional().describe(\"Withdraw result (for withdraw action)\"),\n sendResult: external_exports.any().optional().describe(\"Send result (for sendAsset action)\"),\n transferResult: external_exports.any().optional().describe(\"Transfer result (for transferToSpot action)\"),\n orderResult: external_exports.any().optional().describe(\"Order result (for spotBuy/spotSell action)\"),\n cancelResult: external_exports.any().optional().describe(\"Cancel result (for spotCancelOrder/spotCancelAll action)\")\n });\n\n // src/lib/ability-helpers/index.ts\n init_dirname();\n init_buffer2();\n init_process2();\n\n // src/lib/ability-helpers/lit-action-pkp-ethers-wallet.ts\n init_dirname();\n init_buffer2();\n init_process2();\n var import_ethers = __toESM(require_lib32());\n var LitActionPkpEthersWallet = class {\n pkpPublicKey;\n sigName;\n address;\n constructor(pkpPublicKey, sigName = \"pkp-ethers-signature\") {\n const cleanedKey = pkpPublicKey.replace(/^0x/i, \"\");\n if (!/^[0-9a-fA-F]{130}$/.test(cleanedKey)) {\n throw new Error(\n `Invalid PKP public key format: expected 130 hex characters (uncompressed), got ${cleanedKey.length} chars`\n );\n }\n this.pkpPublicKey = cleanedKey.toLowerCase();\n this.sigName = sigName;\n this.address = import_ethers.ethers.utils.computeAddress(\"0x\" + this.pkpPublicKey);\n }\n /**\n * Sign a message using EIP-191 personal_sign format\n */\n async signMessage(message) {\n const messageHash = import_ethers.ethers.utils.hashMessage(message);\n const toSign = import_ethers.ethers.utils.arrayify(messageHash);\n const signatureResponse = await Lit.Actions.signAndCombineEcdsa({\n toSign,\n publicKey: this.pkpPublicKey,\n sigName: this.sigName\n });\n const parsedSig = JSON.parse(signatureResponse);\n return import_ethers.ethers.utils.joinSignature({\n r: normalizeSignatureComponent(parsedSig.r),\n s: normalizeSignatureComponent(parsedSig.s),\n v: parsedSig.v\n });\n }\n /**\n * Get the wallet address (required by AbstractEthersV5Signer)\n */\n async getAddress() {\n return this.address;\n }\n /**\n * Sign typed data using EIP-712 (required by AbstractEthersV5Signer)\n * Note: Ethers v5 uses _signTypedData (with underscore)\n */\n async _signTypedData(domain2, types, value) {\n if (!domain2?.verifyingContract || !types || !value) {\n throw new Error(\"Invalid typed data parameters\");\n }\n const normalizedValue = normalizeTypedDataValue(value, types);\n const hash3 = import_ethers.ethers.utils._TypedDataEncoder.hash(domain2, types, normalizedValue);\n const toSignBytes = import_ethers.ethers.utils.arrayify(hash3);\n const signatureResponse = await Lit.Actions.signAndCombineEcdsa({\n toSign: toSignBytes,\n publicKey: this.pkpPublicKey,\n sigName: this.sigName\n });\n const parsedSig = JSON.parse(signatureResponse);\n const vEthereum = parsedSig.v === 0 || parsedSig.v === 1 ? parsedSig.v + 27 : parsedSig.v;\n return import_ethers.ethers.utils.joinSignature({\n r: normalizeSignatureComponent(parsedSig.r),\n s: normalizeSignatureComponent(parsedSig.s),\n v: vEthereum\n });\n }\n /**\n * Sign a transaction\n * Note: Transaction must be pre-populated with all fields (gasLimit, nonce, chainId, etc.)\n * as we don't have RPC access in Lit Actions\n */\n async signTransaction(transaction) {\n const tx = { ...transaction };\n delete tx.from;\n const serializedTx = import_ethers.ethers.utils.serializeTransaction(tx);\n const toSign = import_ethers.ethers.utils.arrayify(import_ethers.ethers.utils.keccak256(serializedTx));\n const signatureResponse = await Lit.Actions.signAndCombineEcdsa({\n toSign,\n publicKey: this.pkpPublicKey,\n sigName: this.sigName\n });\n const parsedSig = JSON.parse(signatureResponse);\n return import_ethers.ethers.utils.serializeTransaction(tx, {\n r: normalizeSignatureComponent(parsedSig.r),\n s: normalizeSignatureComponent(parsedSig.s),\n v: parsedSig.v\n });\n }\n };\n function normalizeSignatureComponent(component) {\n if (typeof component !== \"string\") {\n throw new Error(`Invalid signature component type: expected string, got ${typeof component}`);\n }\n const hex = component.startsWith(\"0x\") ? component : \"0x\" + component;\n const length2 = import_ethers.ethers.utils.hexDataLength(hex);\n if (length2 === 33) {\n return import_ethers.ethers.utils.hexDataSlice(hex, 1);\n } else if (length2 === 32) {\n return hex;\n } else {\n throw new Error(`Invalid signature component length: expected 32 or 33 bytes, got ${length2}`);\n }\n }\n function normalizeTypedDataValue(value, types) {\n const normalized = {};\n const primaryType = Object.keys(types)[0];\n if (!primaryType || !types[primaryType]) {\n return value;\n }\n const fieldOrder = types[primaryType].map((f6) => f6.name);\n for (const fieldName of fieldOrder) {\n if (fieldName in value) {\n const fieldValue = value[fieldName];\n if (typeof fieldValue === \"object\" && fieldValue !== null && !Array.isArray(fieldValue) && !(fieldValue instanceof Uint8Array)) {\n const fieldType = types[primaryType].find((f6) => f6.name === fieldName)?.type;\n if (fieldType && types[fieldType]) {\n normalized[fieldName] = normalizeTypedDataValue(\n fieldValue,\n types\n );\n } else {\n normalized[fieldName] = fieldValue;\n }\n } else {\n normalized[fieldName] = fieldValue;\n }\n }\n }\n for (const key of Object.keys(value)) {\n if (!(key in normalized)) {\n normalized[key] = value[key];\n }\n }\n return normalized;\n }\n\n // src/lib/ability-helpers/cancel-order/cancel-order.ts\n init_dirname();\n init_buffer2();\n init_process2();\n\n // ../../../node_modules/.pnpm/@nktkas+hyperliquid@0.25.7_typescript@5.8.3/node_modules/@nktkas/hyperliquid/esm/src/utils/mod.js\n init_dirname();\n init_buffer2();\n init_process2();\n\n // ../../../node_modules/.pnpm/@nktkas+hyperliquid@0.25.7_typescript@5.8.3/node_modules/@nktkas/hyperliquid/esm/src/utils/_symbolConverter.js\n init_dirname();\n init_buffer2();\n init_process2();\n var SymbolConverter = class _SymbolConverter {\n transport;\n dexOption;\n nameToAssetId = /* @__PURE__ */ new Map();\n nameToSzDecimals = /* @__PURE__ */ new Map();\n nameToSpotPairId = /* @__PURE__ */ new Map();\n constructor(options) {\n this.transport = options.transport;\n this.dexOption = options.dexs ?? false;\n }\n /**\n * Create and initialize a SymbolConverter instance.\n * @param options - Configuration options including transport and optional dex support.\n * @returns Initialized SymbolConverter instance.\n * @example\n * ```ts\n * import { HttpTransport } from \"@nktkas/hyperliquid\";\n * import { SymbolConverter } from \"@nktkas/hyperliquid/utils\";\n *\n * const transport = new HttpTransport(); // or `WebSocketTransport`\n * const converter = await SymbolConverter.create({ transport });\n * ```\n */\n static async create(options) {\n const instance = new _SymbolConverter(options);\n await instance.reload();\n return instance;\n }\n /**\n * Reload asset mappings from the API.\n * Useful for refreshing data when new assets are added.\n */\n async reload() {\n const config2 = { transport: this.transport };\n const [perpMetaData, spotMetaData, perpDexsData] = await Promise.all([\n meta(config2),\n spotMeta(config2),\n perpDexs(config2)\n ]);\n if (!perpMetaData?.universe?.length) {\n throw new Error(\"Invalid perpetual metadata response\");\n }\n if (!spotMetaData?.universe?.length || !spotMetaData?.tokens?.length) {\n throw new Error(\"Invalid spot metadata response\");\n }\n this.nameToAssetId.clear();\n this.nameToSzDecimals.clear();\n this.nameToSpotPairId.clear();\n this.processDefaultPerps(perpMetaData);\n this.processSpotAssets(spotMetaData);\n if (this.dexOption !== false) {\n await this.processBuilderDexs(perpDexsData);\n }\n }\n processDefaultPerps(perpMeta) {\n perpMeta.universe.forEach((asset, index2) => {\n this.nameToAssetId.set(asset.name, index2);\n this.nameToSzDecimals.set(asset.name, asset.szDecimals);\n });\n }\n async processBuilderDexs(perpDexs2) {\n if (!perpDexs2 || perpDexs2.length <= 1)\n return;\n const builderDexs = perpDexs2.map((dex, index2) => ({ dex, index: index2 })).filter((item) => {\n return item.index > 0 && item.dex !== null && item.dex.name.length > 0;\n });\n if (builderDexs.length === 0)\n return;\n const dexsToProcess = Array.isArray(this.dexOption) ? builderDexs.filter((item) => this.dexOption.includes(item.dex.name)) : builderDexs;\n if (dexsToProcess.length === 0)\n return;\n const config2 = { transport: this.transport };\n const results = await Promise.allSettled(dexsToProcess.map((item) => meta(config2, { dex: item.dex.name })));\n results.forEach((result, idx) => {\n if (result.status !== \"fulfilled\")\n return;\n this.processBuilderDexResult(result.value, dexsToProcess[idx].index);\n });\n }\n processBuilderDexResult(meta2, perpDexIndex) {\n const offset = 1e5 + perpDexIndex * 1e4;\n meta2.universe.forEach((asset, index2) => {\n const assetId = offset + index2;\n this.nameToAssetId.set(asset.name, assetId);\n this.nameToSzDecimals.set(asset.name, asset.szDecimals);\n });\n }\n processSpotAssets(spotMeta2) {\n const tokenMap = /* @__PURE__ */ new Map();\n spotMeta2.tokens.forEach((token) => {\n tokenMap.set(token.index, { name: token.name, szDecimals: token.szDecimals });\n });\n spotMeta2.universe.forEach((market) => {\n if (market.tokens.length < 2)\n return;\n const baseToken = tokenMap.get(market.tokens[0]);\n const quoteToken = tokenMap.get(market.tokens[1]);\n if (!baseToken || !quoteToken)\n return;\n const assetId = 1e4 + market.index;\n const baseQuoteKey = `${baseToken.name}/${quoteToken.name}`;\n this.nameToAssetId.set(baseQuoteKey, assetId);\n this.nameToSzDecimals.set(baseQuoteKey, baseToken.szDecimals);\n this.nameToSpotPairId.set(baseQuoteKey, market.name);\n });\n }\n /**\n * Get asset ID for a coin.\n * - For Perpetuals, use the coin name (e.g., \"BTC\").\n * - For Spot markets, use the \"BASE/QUOTE\" format (e.g., \"HYPE/USDC\").\n * - For Builder Dex assets, use the \"DEX_NAME:ASSET_NAME\" format (e.g., \"test:ABC\").\n * @example \"BTC\" → 0, \"HYPE/USDC\" → 10107, \"test:ABC\" → 110000\n */\n getAssetId(name) {\n return this.nameToAssetId.get(name);\n }\n /**\n * Get size decimals for a coin.\n * - For Perpetuals, use the coin name (e.g., \"BTC\").\n * - For Spot markets, use the \"BASE/QUOTE\" format (e.g., \"HYPE/USDC\").\n * - For Builder Dex assets, use the \"DEX_NAME:ASSET_NAME\" format (e.g., \"test:ABC\").\n * @example \"BTC\" → 5, \"HYPE/USDC\" → 2, \"test:ABC\" → 0\n */\n getSzDecimals(name) {\n return this.nameToSzDecimals.get(name);\n }\n /**\n * Get spot pair ID for info endpoints and subscriptions (e.g., l2book, trades).\n *\n * Accepts spot markets in the \"BASE/QUOTE\" format (e.g., \"HFUN/USDC\").\n * @example \"HFUN/USDC\" → \"@2\", \"PURR/USDC\" → \"PURR/USDC\"\n */\n getSpotPairId(name) {\n return this.nameToSpotPairId.get(name);\n }\n };\n\n // ../../../node_modules/.pnpm/@nktkas+hyperliquid@0.25.7_typescript@5.8.3/node_modules/@nktkas/hyperliquid/esm/src/utils/_format.js\n init_dirname();\n init_buffer2();\n init_process2();\n\n // ../../../node_modules/.pnpm/@nktkas+hyperliquid@0.25.7_typescript@5.8.3/node_modules/@nktkas/hyperliquid/esm/src/api/exchange/~mod.js\n init_dirname();\n init_buffer2();\n init_process2();\n\n // src/lib/ability-helpers/cancel-order/cancel-order.ts\n var import_vincent_ability_sdk = __toESM(require_src2());\n\n // src/lib/ability-helpers/get-hyperliquid-nonce.ts\n init_dirname();\n init_buffer2();\n init_process2();\n async function getHyperliquidNonce() {\n const nonceResponse = await Lit.Actions.runOnce(\n { waitForResponse: true, name: \"HyperLiquidWithdrawNonce\" },\n async () => {\n return Date.now().toString();\n }\n );\n return parseInt(nonceResponse);\n }\n\n // src/lib/ability-helpers/cancel-order/cancel-order.ts\n async function cancelOrder({\n transport,\n pkpPublicKey,\n params,\n useTestnet = false\n }) {\n const converter = await SymbolConverter.create({ transport });\n const assetId = converter.getAssetId(params.symbol);\n if (assetId === void 0) {\n throw new Error(`Failed to get asset ID for ${params.symbol}. The trading pair may not exist.`);\n }\n const pkpWallet = new LitActionPkpEthersWallet(pkpPublicKey);\n const nonce = await getHyperliquidNonce();\n const cancelAction = parser(CancelRequest.entries.action)({\n type: \"cancel\",\n cancels: [\n {\n a: assetId,\n o: params.orderId\n }\n ]\n });\n const signature = await signL1Action({\n wallet: pkpWallet,\n action: cancelAction,\n nonce,\n isTestnet: useTestnet\n });\n const cancelResult = await Lit.Actions.runOnce(\n { waitForResponse: true, name: \"HyperLiquidCancelOrderRequest\" },\n async () => {\n return JSON.stringify(\n {\n result: await transport.request(\"exchange\", {\n action: cancelAction,\n signature,\n nonce\n })\n },\n import_vincent_ability_sdk.bigIntReplacer,\n 2\n );\n }\n );\n const parsedCancelResult = JSON.parse(cancelResult);\n console.log(\"[cancelSpotOrder] Cancel result\", parsedCancelResult);\n const cancelStatus = parsedCancelResult.result.response.data.statuses[0];\n if (typeof cancelStatus === \"object\" && cancelStatus.error !== void 0) {\n return {\n status: \"error\",\n reason: cancelStatus.error\n };\n }\n return {\n status: \"success\",\n cancelResult: parsedCancelResult.result\n };\n }\n\n // src/lib/ability-helpers/cancel-order/cancel-all-orders.ts\n init_dirname();\n init_buffer2();\n init_process2();\n async function cancelAllOrdersForSymbol({\n transport,\n pkpPublicKey,\n symbol,\n useTestnet = false\n }) {\n const converter = await SymbolConverter.create({ transport });\n const assetId = converter.getAssetId(symbol);\n if (assetId === void 0) {\n throw new Error(`Failed to get asset ID for ${symbol}. The trading pair may not exist.`);\n }\n const pkpWallet = new LitActionPkpEthersWallet(pkpPublicKey);\n const pkpAddress = await pkpWallet.getAddress();\n const infoClient = new InfoClient({ transport });\n const openOrders3 = await infoClient.openOrders({\n user: pkpAddress\n });\n const ordersToCancel = openOrders3.filter((order2) => order2.coin === symbol).map((order2) => ({\n a: assetId,\n o: order2.oid\n }));\n if (ordersToCancel.length === 0) {\n return {\n status: \"error\",\n reason: \"No open orders to cancel\"\n };\n }\n const nonce = await getHyperliquidNonce();\n const cancelAction = parser(CancelRequest.entries.action)({\n type: \"cancel\",\n cancels: ordersToCancel\n });\n const signature = await signL1Action({\n wallet: pkpWallet,\n action: cancelAction,\n nonce,\n isTestnet: useTestnet\n });\n const cancelResult = await Lit.Actions.runOnce(\n { waitForResponse: true, name: \"HyperLiquidCancelAllOrdersRequest\" },\n async () => {\n return JSON.stringify(\n await transport.request(\"exchange\", {\n action: cancelAction,\n signature,\n nonce\n })\n );\n }\n );\n const parsedCancelResult = JSON.parse(cancelResult);\n console.log(\"[cancelAllSpotOrders] Cancel result\", parsedCancelResult);\n return {\n status: \"success\",\n cancelResult: parsedCancelResult.result\n };\n }\n\n // src/lib/ability-helpers/send-deposit-tx.ts\n init_dirname();\n init_buffer2();\n init_process2();\n var import_ethers3 = __toESM(require_lib32());\n var import_vincent_ability_sdk2 = __toESM(require_src2());\n\n // src/lib/ability-helpers/sign-tx.ts\n init_dirname();\n init_buffer2();\n init_process2();\n var import_ethers2 = __toESM(require_lib32());\n var signTx = async (pkpPublicKey, tx, sigName) => {\n const publicKeyForLit = pkpPublicKey.replace(/^0x/, \"\");\n console.log(`Signing using PKP Public Key: ${publicKeyForLit} (signTx)`);\n const unsignedSerializedTx = import_ethers2.ethers.utils.serializeTransaction(tx);\n const txHash = import_ethers2.ethers.utils.keccak256(unsignedSerializedTx);\n console.log(\"Tx hash (signTx)\", txHash);\n const signatureResponse = await Lit.Actions.signAndCombineEcdsa({\n toSign: import_ethers2.ethers.utils.arrayify(txHash),\n publicKey: publicKeyForLit,\n sigName\n });\n const { r: r2, s: s4, v: v2 } = JSON.parse(signatureResponse);\n const ethersJoinedSignature = import_ethers2.ethers.utils.joinSignature({\n r: \"0x\" + r2.substring(2),\n s: \"0x\" + s4,\n v: v2\n });\n const signedSerializedTx = import_ethers2.ethers.utils.serializeTransaction(tx, ethersJoinedSignature);\n console.log(\"Signed serialized tx (signTx)\", signedSerializedTx);\n return signedSerializedTx;\n };\n\n // src/lib/ability-helpers/send-deposit-tx.ts\n var sendDepositTx = async ({\n rpcUrl,\n chainId,\n pkpEthAddress,\n pkpPublicKey,\n to,\n value,\n calldata,\n gasBufferPercentage,\n baseFeePerGasBufferPercentage,\n alchemyGasSponsor,\n alchemyGasSponsorApiKey,\n alchemyGasSponsorPolicyId\n }) => {\n if (alchemyGasSponsor) {\n console.log(\"[sendDepositTx] Alchemy gas sponsor is enabled\");\n if (!alchemyGasSponsorApiKey || !alchemyGasSponsorPolicyId) {\n throw new Error(\n \"[sendDepositTx] Alchemy gas sponsor is enabled, but API key or policy ID is not provided.\"\n );\n }\n return await (0, import_vincent_ability_sdk2.sponsoredGasRawTransaction)({\n pkpPublicKey,\n to,\n value,\n data: calldata,\n chainId,\n eip7702AlchemyApiKey: alchemyGasSponsorApiKey,\n eip7702AlchemyPolicyId: alchemyGasSponsorPolicyId\n });\n }\n console.log(\"[sendDepositTx] Estimating gas for Deposit transaction using pre-computed route\");\n const populateTxResponse = await Lit.Actions.runOnce(\n {\n waitForResponse: true,\n name: \"[sendDepositTx] Deposit tx gas estimation with pre-computed route\"\n },\n async () => {\n try {\n return JSON.stringify({\n status: \"success\",\n populatedTransaction: await (0, import_vincent_ability_sdk2.populateTransaction)({\n to,\n from: pkpEthAddress,\n value,\n data: calldata,\n rpcUrl,\n chainId,\n gasBufferPercentage,\n baseFeePerGasBufferPercentage\n })\n });\n } catch (error) {\n return JSON.stringify({\n status: \"error\",\n error: error instanceof Error ? error.message : String(error)\n });\n }\n }\n );\n const parsedPopulateTxResponse = JSON.parse(populateTxResponse);\n if (parsedPopulateTxResponse.status === \"error\") {\n throw new Error(\n `[sendDepositTx] Error populating transaction for deposit: ${parsedPopulateTxResponse.error}`\n );\n }\n const { populatedTransaction } = parsedPopulateTxResponse;\n const signedSwapTx = await signTx(pkpPublicKey, populatedTransaction, \"depositTxSig\");\n console.log(`[sendDepositTx] Broadcasting deposit transaction with pre-computed route`);\n const swapTxResponse = await Lit.Actions.runOnce(\n { waitForResponse: true, name: \"[sendDepositTx] Deposit tx sender\" },\n async () => {\n try {\n const rpcProvider = new import_ethers3.ethers.providers.StaticJsonRpcProvider(rpcUrl);\n const receipt = await rpcProvider.sendTransaction(signedSwapTx);\n return JSON.stringify({\n status: \"success\",\n txHash: receipt.hash\n });\n } catch (error) {\n return JSON.stringify({\n status: \"error\",\n error: error instanceof Error ? error.message : String(error)\n });\n }\n }\n );\n const parsedSwapTxResponse = JSON.parse(swapTxResponse);\n if (parsedSwapTxResponse.status === \"error\") {\n throw new Error(\n `[sendDepositTx] Error broadcasting deposit transaction: ${parsedSwapTxResponse.error}`\n );\n }\n const { txHash } = parsedSwapTxResponse;\n console.log(`[sendDepositTx] Deposit transaction broadcasted with pre-computed route: ${txHash}`);\n return txHash;\n };\n\n // src/lib/ability-helpers/transfer-usdc-to.ts\n init_dirname();\n init_buffer2();\n init_process2();\n var import_ethers4 = __toESM(require_lib32());\n var import_vincent_ability_sdk3 = __toESM(require_src2());\n\n // src/lib/ability-helpers/get-hyperliquid-chain-id.ts\n init_dirname();\n init_buffer2();\n init_process2();\n var getHyperliquidChainId = (useTestnet) => {\n return useTestnet ? \"0x66eee\" : \"0xa4b1\";\n };\n var getHyperliquidChainName = (useTestnet) => {\n return useTestnet ? \"Testnet\" : \"Mainnet\";\n };\n\n // src/lib/ability-helpers/transfer-usdc-to.ts\n async function transferUsdcTo({\n transport,\n pkpPublicKey,\n amount,\n to,\n useTestnet = false\n }) {\n if (to !== \"spot\" && to !== \"perp\") {\n throw new Error(\n '[transferUsdcTo] Invalid transfer destination. Must be either \"spot\" or \"perp\".'\n );\n }\n const nonce = await getHyperliquidNonce();\n const transferAction = parser(UsdClassTransferRequest.entries.action)({\n type: \"usdClassTransfer\",\n // Convert amount from raw units (e.g., \"1000000\" for 1.0 USDC) to formatted string (e.g., \"1.0\")\n // Hyperliquid expects the amount as a string in human-readable format\n amount: import_ethers4.ethers.utils.formatUnits(amount, 6),\n signatureChainId: getHyperliquidChainId(useTestnet),\n hyperliquidChain: getHyperliquidChainName(useTestnet),\n toPerp: to === \"perp\",\n nonce\n });\n const pkpEthersWallet = new LitActionPkpEthersWallet(pkpPublicKey);\n const signature = await signUserSignedAction({\n wallet: pkpEthersWallet,\n action: transferAction,\n types: UsdClassTransferTypes\n });\n const transferResult = await Lit.Actions.runOnce(\n { waitForResponse: true, name: \"HyperLiquidTransferRequest\" },\n async () => {\n return JSON.stringify(\n {\n result: await transport.request(\"exchange\", {\n action: transferAction,\n signature,\n nonce\n })\n },\n import_vincent_ability_sdk3.bigIntReplacer,\n 2\n );\n }\n );\n const parsedTransferResult = JSON.parse(transferResult);\n return {\n transferResult: parsedTransferResult.result\n };\n }\n\n // src/lib/ability-helpers/execute-spot-order.ts\n init_dirname();\n init_buffer2();\n init_process2();\n var import_vincent_ability_sdk4 = __toESM(require_src2());\n async function executeSpotOrder({\n transport,\n pkpPublicKey,\n params,\n useTestnet = false\n }) {\n const converter = await SymbolConverter.create({ transport });\n const assetId = converter.getAssetId(params.symbol);\n if (assetId === void 0) {\n throw new Error(`Failed to get asset ID for ${params.symbol}. The trading pair may not exist.`);\n }\n const pkpWallet = new LitActionPkpEthersWallet(pkpPublicKey);\n const nonce = await getHyperliquidNonce();\n const orderType = params.orderType || { type: \"limit\", tif: \"Gtc\" };\n const orderTypeField = orderType.type === \"market\" ? { limit: { tif: \"FrontendMarket\" } } : { limit: { tif: orderType.tif } };\n const orderAction = parser(OrderRequest.entries.action)({\n type: \"order\",\n orders: [\n {\n a: assetId,\n b: params.isBuy,\n // true for buy, false for sell\n p: params.price,\n s: params.size,\n r: false,\n // reduce only (false for spot)\n t: orderTypeField\n }\n ],\n grouping: \"na\"\n });\n const signature = await signL1Action({\n wallet: pkpWallet,\n action: orderAction,\n nonce,\n isTestnet: useTestnet\n });\n const orderResult = await Lit.Actions.runOnce(\n { waitForResponse: true, name: \"HyperLiquidSpotOrderRequest\" },\n async () => {\n return JSON.stringify(\n {\n result: await transport.request(\"exchange\", {\n action: orderAction,\n signature,\n nonce\n })\n },\n import_vincent_ability_sdk4.bigIntReplacer,\n 2\n );\n }\n );\n const parsedOrderResult = JSON.parse(orderResult);\n console.log(\"[executeSpotTrade] Order result\", parsedOrderResult);\n const spotOrderStatus = parsedOrderResult.result.response.data.statuses[0];\n if (spotOrderStatus.error !== void 0) {\n return {\n status: \"error\",\n error: spotOrderStatus.error\n };\n }\n return {\n status: \"success\",\n orderResult: parsedOrderResult.result\n };\n }\n\n // src/lib/ability-helpers/execute-perp-order.ts\n init_dirname();\n init_buffer2();\n init_process2();\n var import_vincent_ability_sdk5 = __toESM(require_src2());\n async function executePerpOrder({\n transport,\n pkpPublicKey,\n params,\n useTestnet = false\n }) {\n const converter = await SymbolConverter.create({ transport });\n const assetId = converter.getAssetId(params.symbol);\n if (assetId === void 0) {\n throw new Error(\n `Failed to get asset ID for ${params.symbol}. The perpetual contract may not exist.`\n );\n }\n const pkpWallet = new LitActionPkpEthersWallet(pkpPublicKey);\n if (params.leverage) {\n const leverageNonceResponse = await Lit.Actions.runOnce(\n { waitForResponse: true, name: \"HyperLiquidPerpLeverageNonce\" },\n async () => {\n return Date.now().toString();\n }\n );\n const leverageNonce = parseInt(leverageNonceResponse);\n const updateLeverageAction = parser(UpdateLeverageRequest.entries.action)({\n type: \"updateLeverage\",\n asset: assetId,\n isCross: params.leverage.isCross,\n leverage: params.leverage.leverage\n });\n const leverageSignature = await signL1Action({\n wallet: pkpWallet,\n action: updateLeverageAction,\n nonce: leverageNonce,\n isTestnet: useTestnet\n });\n await Lit.Actions.runOnce(\n { waitForResponse: true, name: \"HyperLiquidPerpLeverageRequest\" },\n async () => {\n return JSON.stringify(\n await transport.request(\"exchange\", {\n action: updateLeverageAction,\n signature: leverageSignature,\n nonce: leverageNonce\n })\n );\n }\n );\n console.log(\n `[executePerpOrder] Set leverage to ${params.leverage.leverage}x (${params.leverage.isCross ? \"cross\" : \"isolated\"})`\n );\n }\n const nonce = await getHyperliquidNonce();\n const orderType = params.orderType || { type: \"limit\", tif: \"Gtc\" };\n const orderTypeField = orderType.type === \"market\" ? { limit: { tif: \"FrontendMarket\" } } : { limit: { tif: orderType.tif } };\n const orderAction = parser(OrderRequest.entries.action)({\n type: \"order\",\n orders: [\n {\n a: assetId,\n b: params.isLong,\n // true for long (buy), false for short (sell)\n p: params.price,\n s: params.size,\n r: params.reduceOnly ?? false,\n // reduce only (true to close positions, false for opening)\n t: orderTypeField\n }\n ],\n grouping: \"na\"\n });\n const signature = await signL1Action({\n wallet: pkpWallet,\n action: orderAction,\n nonce,\n isTestnet: useTestnet\n });\n const orderResult = await Lit.Actions.runOnce(\n { waitForResponse: true, name: \"HyperLiquidPerpOrderRequest\" },\n async () => {\n return JSON.stringify(\n {\n result: await transport.request(\"exchange\", {\n action: orderAction,\n signature,\n nonce\n })\n },\n import_vincent_ability_sdk5.bigIntReplacer,\n 2\n );\n }\n );\n const parsedOrderResult = JSON.parse(orderResult);\n console.log(\"[executePerpOrder] Order result\", parsedOrderResult);\n const perpOrderStatus = parsedOrderResult.result.response.data.statuses[0];\n if (perpOrderStatus.error !== void 0) {\n return {\n status: \"error\",\n error: perpOrderStatus.error\n };\n }\n return {\n status: \"success\",\n orderResult: parsedOrderResult.result\n };\n }\n\n // src/lib/ability-helpers/withdraw-usdc.ts\n init_dirname();\n init_buffer2();\n init_process2();\n var import_ethers5 = __toESM(require_lib32());\n var import_vincent_ability_sdk6 = __toESM(require_src2());\n async function withdrawUsdc({\n transport,\n pkpPublicKey,\n amount,\n destination,\n useTestnet = false\n }) {\n const pkpWallet = new LitActionPkpEthersWallet(pkpPublicKey);\n const nonce = await getHyperliquidNonce();\n const withdrawAction = parser(Withdraw3Request.entries.action)({\n type: \"withdraw3\",\n signatureChainId: getHyperliquidChainId(useTestnet),\n hyperliquidChain: getHyperliquidChainName(useTestnet),\n destination,\n // Convert amount from raw units (e.g., \"1000000\" for 1.0 USDC) to formatted string (e.g., \"1.0\")\n // Hyperliquid expects the amount as a string in human-readable format\n amount: import_ethers5.ethers.utils.formatUnits(amount, 6),\n time: nonce\n });\n const signature = await signUserSignedAction({\n wallet: pkpWallet,\n action: withdrawAction,\n types: Withdraw3Types\n });\n const withdrawResult = await Lit.Actions.runOnce(\n { waitForResponse: true, name: \"HyperLiquidWithdrawRequest\" },\n async () => {\n return JSON.stringify(\n {\n result: await transport.request(\"exchange\", {\n action: withdrawAction,\n signature,\n nonce\n })\n },\n import_vincent_ability_sdk6.bigIntReplacer,\n 2\n );\n }\n );\n const parsedWithdrawResult = JSON.parse(withdrawResult);\n return {\n withdrawResult: parsedWithdrawResult.result\n };\n }\n\n // src/lib/ability-helpers/send-spot-asset.ts\n init_dirname();\n init_buffer2();\n init_process2();\n var import_ethers6 = __toESM(require_lib32());\n var import_vincent_ability_sdk7 = __toESM(require_src2());\n async function sendSpotAsset({\n transport,\n pkpPublicKey,\n destination,\n token,\n amount,\n useTestnet = false\n }) {\n const pkpWallet = new LitActionPkpEthersWallet(pkpPublicKey);\n const nonce = await getHyperliquidNonce();\n const infoClient = new InfoClient({ transport });\n const spotMeta2 = await infoClient.spotMeta();\n const tokenInfo = spotMeta2.tokens.find((t3) => t3.name === token);\n if (!tokenInfo) {\n throw new Error(`Token ${token} not found in spot metadata`);\n }\n console.log(\"[sendAsset] Token info:\", tokenInfo);\n const sendAction = parser(SpotSendRequest.entries.action)({\n type: \"spotSend\",\n signatureChainId: getHyperliquidChainId(useTestnet),\n hyperliquidChain: getHyperliquidChainName(useTestnet),\n destination,\n // Construct token identifier in the format expected by SpotSend: \"name:0xaddress\"\n token: `${tokenInfo.name}:${tokenInfo.tokenId}`,\n // Convert amount from smallest units (micro-units) to human-readable format\n // using weiDecimals which represents the exchange precision for amounts\n amount: import_ethers6.ethers.utils.formatUnits(amount, tokenInfo.weiDecimals),\n time: nonce\n });\n const signature = await signUserSignedAction({\n wallet: pkpWallet,\n action: sendAction,\n types: SpotSendTypes\n });\n const sendResult = await Lit.Actions.runOnce(\n { waitForResponse: true, name: \"HyperLiquidSendAssetRequest\" },\n async () => {\n return JSON.stringify(\n {\n result: await transport.request(\"exchange\", {\n action: sendAction,\n signature,\n nonce\n })\n },\n import_vincent_ability_sdk7.bigIntReplacer,\n 2\n );\n }\n );\n const parsedSendResult = JSON.parse(sendResult);\n return {\n sendResult: parsedSendResult.result\n };\n }\n\n // src/lib/ability-helpers/send-perp-usdc.ts\n init_dirname();\n init_buffer2();\n init_process2();\n var import_ethers7 = __toESM(require_lib32());\n var import_vincent_ability_sdk8 = __toESM(require_src2());\n async function sendPerpUsdc({\n transport,\n pkpPublicKey,\n destination,\n amount,\n useTestnet = false\n }) {\n const pkpWallet = new LitActionPkpEthersWallet(pkpPublicKey);\n const nonce = await getHyperliquidNonce();\n const sendAction = parser(UsdSendRequest.entries.action)({\n type: \"usdSend\",\n signatureChainId: getHyperliquidChainId(useTestnet),\n hyperliquidChain: getHyperliquidChainName(useTestnet),\n destination,\n // Convert amount from micro-units (6 decimals) to human-readable format\n // e.g., \"1000000\" -> \"1.0\"\n amount: import_ethers7.ethers.utils.formatUnits(amount, 6),\n time: nonce\n });\n const signature = await signUserSignedAction({\n wallet: pkpWallet,\n action: sendAction,\n types: UsdSendTypes\n });\n const sendResult = await Lit.Actions.runOnce(\n { waitForResponse: true, name: \"HyperLiquidSendPerpUsdcRequest\" },\n async () => {\n return JSON.stringify(\n {\n result: await transport.request(\"exchange\", {\n action: sendAction,\n signature,\n nonce\n })\n },\n import_vincent_ability_sdk8.bigIntReplacer,\n 2\n );\n }\n );\n const parsedSendResult = JSON.parse(sendResult);\n return {\n sendResult: parsedSendResult.result\n };\n }\n\n // src/lib/ability-checks/index.ts\n init_dirname();\n init_buffer2();\n init_process2();\n\n // src/lib/ability-checks/hyperliquid-account-exists.ts\n init_dirname();\n init_buffer2();\n init_process2();\n var hyperliquidAccountExists = async ({\n infoClient,\n ethAddress: ethAddress2\n }) => {\n try {\n await infoClient.clearinghouseState({ user: ethAddress2 });\n return true;\n } catch (error) {\n console.error(\n \"[@lit-protocol/vincent-ability-hyperliquid precheck] Error checking clearinghouse state\",\n error\n );\n const errorMessage = error instanceof Error ? error.message : String(error);\n if (errorMessage.includes(\"does not exist\")) {\n return false;\n } else {\n throw error;\n }\n }\n };\n\n // src/lib/ability-checks/deposit-usdc.ts\n init_dirname();\n init_buffer2();\n init_process2();\n var import_ethers8 = __toESM(require_lib32());\n var import_vincent_ability_sdk9 = __toESM(require_src2());\n var MIN_USDC_DEPOSIT_AMOUNT = import_ethers8.ethers.BigNumber.from(\"5000000\");\n var depositPrechecks = async ({\n provider,\n agentWalletPkpEthAddress,\n depositAmountInMicroUsdc\n }) => {\n const usdcContract = new import_ethers8.ethers.Contract(ARBITRUM_USDC_ADDRESS_MAINNET, import_vincent_ability_sdk9.ERC20_ABI, provider);\n const ethBalance = await provider.getBalance(agentWalletPkpEthAddress);\n if (ethBalance.eq(0n)) {\n return {\n success: false,\n reason: `Agent Wallet PKP has no ETH balance. Please fund the Agent Wallet PKP with ETH`\n };\n }\n const usdcBalance = await usdcContract.balanceOf(agentWalletPkpEthAddress);\n const _depositAmountInMicroUsdc = import_ethers8.ethers.BigNumber.from(depositAmountInMicroUsdc);\n if (_depositAmountInMicroUsdc.lt(MIN_USDC_DEPOSIT_AMOUNT)) {\n return {\n success: false,\n reason: `Deposit amount is less than the minimum deposit amount. Minimum deposit amount required: ${import_ethers8.ethers.utils.formatUnits(MIN_USDC_DEPOSIT_AMOUNT, 6)} USDC`,\n availableBalance: import_ethers8.ethers.utils.formatUnits(usdcBalance, 6)\n };\n }\n if (usdcBalance.lt(_depositAmountInMicroUsdc)) {\n return {\n success: false,\n reason: `Insufficient USDC balance. Attempted deposit amount: ${import_ethers8.ethers.utils.formatUnits(depositAmountInMicroUsdc, 6)} USDC, Available balance: ${import_ethers8.ethers.utils.formatUnits(usdcBalance, 6)} USDC`,\n availableBalance: import_ethers8.ethers.utils.formatUnits(usdcBalance, 6)\n };\n }\n return {\n success: true,\n availableBalance: import_ethers8.ethers.utils.formatUnits(usdcBalance, 6)\n };\n };\n\n // src/lib/ability-checks/transfer-usdc.ts\n init_dirname();\n init_buffer2();\n init_process2();\n var import_ethers9 = __toESM(require_lib32());\n async function transferPrechecks({\n infoClient,\n ethAddress: ethAddress2,\n params\n }) {\n if (params.to === \"spot\") {\n const clearinghouseState3 = await infoClient.clearinghouseState({\n user: ethAddress2\n });\n const availableUsdcBalance = import_ethers9.ethers.utils.parseUnits(\n clearinghouseState3.marginSummary.accountValue,\n 6\n // USDC has 6 decimals\n );\n const requestedAmount = import_ethers9.ethers.BigNumber.from(params.amount);\n if (availableUsdcBalance.lt(requestedAmount)) {\n return {\n success: false,\n reason: `Insufficient perp balance. Available: ${import_ethers9.ethers.utils.formatUnits(availableUsdcBalance, 6)} USDC, Requested: ${import_ethers9.ethers.utils.formatUnits(requestedAmount, 6)} USDC`,\n availableBalance: import_ethers9.ethers.utils.formatUnits(availableUsdcBalance, 6),\n requiredBalance: import_ethers9.ethers.utils.formatUnits(requestedAmount, 6)\n };\n }\n return {\n success: true,\n availableBalance: import_ethers9.ethers.utils.formatUnits(availableUsdcBalance, 6),\n requiredBalance: import_ethers9.ethers.utils.formatUnits(requestedAmount, 6)\n };\n } else {\n const spotState = await infoClient.spotClearinghouseState({\n user: ethAddress2\n });\n const usdcBalance = spotState.balances.find((b4) => b4.coin === \"USDC\");\n if (!usdcBalance) {\n return {\n success: false,\n reason: \"No USDC balance found in spot account\",\n availableBalance: \"0\"\n };\n }\n const availableUsdcBalance = import_ethers9.ethers.utils.parseUnits(usdcBalance.total, 8);\n const requestedAmount = import_ethers9.ethers.BigNumber.from(params.amount);\n if (availableUsdcBalance.lt(requestedAmount)) {\n return {\n success: false,\n reason: `Insufficient spot balance. Available: ${import_ethers9.ethers.utils.formatUnits(availableUsdcBalance, 8)} USDC, Requested: ${import_ethers9.ethers.utils.formatUnits(requestedAmount, 6)} USDC`,\n availableBalance: availableUsdcBalance.toString(),\n requiredBalance: import_ethers9.ethers.utils.formatUnits(requestedAmount, 6)\n };\n }\n return {\n success: true,\n availableBalance: availableUsdcBalance.toString(),\n requiredBalance: requestedAmount.toString()\n };\n }\n }\n\n // src/lib/ability-checks/spot.ts\n init_dirname();\n init_buffer2();\n init_process2();\n async function spotTradePrechecks({\n transport,\n ethAddress: ethAddress2,\n params\n }) {\n try {\n const converter = await SymbolConverter.create({ transport });\n const assetId = converter.getAssetId(params.symbol);\n if (assetId === void 0) {\n return {\n success: false,\n reason: `Trading pair ${params.symbol} does not exist`\n };\n }\n const infoClient = new InfoClient({ transport });\n try {\n await infoClient.clearinghouseState({ user: ethAddress2 });\n } catch (error) {\n const errorMessage = error instanceof Error ? error.message : String(error);\n if (errorMessage.includes(\"does not exist\")) {\n return {\n success: false,\n reason: \"Hyperliquid account does not exist. Please deposit first.\"\n };\n }\n throw error;\n }\n const spotState = await infoClient.spotClearinghouseState({\n user: ethAddress2\n });\n if (!spotState.balances || spotState.balances.length === 0) {\n return {\n success: false,\n reason: \"No spot balance found. Please transfer funds to spot account first.\"\n };\n }\n const [baseAsset, quoteAsset] = params.symbol.split(\"/\");\n if (params.isBuy) {\n const quoteBalance = spotState.balances.find((b4) => b4.coin === quoteAsset);\n if (!quoteBalance) {\n return {\n success: false,\n reason: `No ${quoteAsset} balance found in spot account. Cannot buy ${baseAsset}.`\n };\n }\n const availableQuote = parseFloat(quoteBalance.total) - parseFloat(quoteBalance.hold);\n if (availableQuote <= 0) {\n return {\n success: false,\n reason: `Insufficient available ${quoteAsset} balance. All ${quoteAsset} is locked in open orders.`\n };\n }\n } else {\n const baseBalance = spotState.balances.find((b4) => b4.coin === baseAsset);\n if (!baseBalance) {\n return {\n success: false,\n reason: `No ${baseAsset} balance found in spot account. Cannot sell ${baseAsset}.`\n };\n }\n const availableBase = parseFloat(baseBalance.total) - parseFloat(baseBalance.hold);\n if (availableBase <= 0) {\n return {\n success: false,\n reason: `Insufficient available ${baseAsset} balance. All ${baseAsset} is locked in open orders.`\n };\n }\n }\n return {\n success: true\n };\n } catch (error) {\n return {\n success: false,\n reason: error instanceof Error ? error.message : String(error)\n };\n }\n }\n\n // src/lib/ability-checks/perp.ts\n init_dirname();\n init_buffer2();\n init_process2();\n var import_ethers10 = __toESM(require_lib32());\n async function perpTradePrechecks({\n transport,\n ethAddress: ethAddress2,\n params\n }) {\n const converter = await SymbolConverter.create({ transport });\n const assetId = converter.getAssetId(params.symbol);\n if (assetId === void 0) {\n return {\n success: false,\n reason: `Perpetual contract ${params.symbol} does not exist`\n };\n }\n const infoClient = new InfoClient({ transport });\n const perpState = await infoClient.clearinghouseState({\n user: ethAddress2\n });\n if (!perpState.crossMarginSummary) {\n return {\n success: false,\n reason: \"No perp account found. Please transfer funds to perp account first.\"\n };\n }\n const availableMarginBN = import_ethers10.ethers.utils.parseUnits(perpState.crossMarginSummary.accountValue, 6);\n if (availableMarginBN.lte(0)) {\n return {\n success: false,\n reason: \"Insufficient perp account balance. Please transfer funds to perp account first.\",\n availableMargin: \"0\"\n };\n }\n return {\n success: true,\n availableMargin: perpState.crossMarginSummary.accountValue\n };\n }\n\n // src/lib/ability-checks/cancel.ts\n init_dirname();\n init_buffer2();\n init_process2();\n async function cancelOrderPrechecks({\n infoClient,\n ethAddress: ethAddress2,\n params\n }) {\n try {\n const openOrders3 = await infoClient.openOrders({\n user: ethAddress2\n });\n const orderExists = openOrders3.some((order2) => order2.oid === params.orderId);\n if (!orderExists) {\n return {\n success: false,\n reason: `Order ${params.orderId} not found or already filled/cancelled`\n };\n }\n return {\n success: true\n };\n } catch (error) {\n return {\n success: false,\n reason: error instanceof Error ? error.message : String(error)\n };\n }\n }\n async function cancelAllOrdersForSymbolPrechecks({\n infoClient,\n ethAddress: ethAddress2,\n params\n }) {\n try {\n const openOrders3 = await infoClient.openOrders({\n user: ethAddress2\n });\n const ordersForSymbol = openOrders3.filter((order2) => order2.coin === params.symbol);\n if (ordersForSymbol.length === 0) {\n return {\n success: false,\n reason: `No open orders found for ${params.symbol}`\n };\n }\n return {\n success: true,\n orderCount: ordersForSymbol.length\n };\n } catch (error) {\n return {\n success: false,\n reason: error instanceof Error ? error.message : String(error)\n };\n }\n }\n\n // src/lib/ability-checks/withdraw-usdc.ts\n init_dirname();\n init_buffer2();\n init_process2();\n var import_ethers11 = __toESM(require_lib32());\n async function withdrawPrechecks({\n infoClient,\n ethAddress: ethAddress2,\n params\n }) {\n const clearinghouseState3 = await infoClient.clearinghouseState({\n user: ethAddress2\n });\n const availableUsdcBalance = import_ethers11.ethers.utils.parseUnits(\n clearinghouseState3.marginSummary.accountValue,\n 6\n // USDC has 6 decimals\n );\n const requestedAmount = import_ethers11.ethers.BigNumber.from(params.amount);\n const minimumWithdrawAmount = import_ethers11.ethers.utils.parseUnits(\"1\", 6);\n if (requestedAmount.lt(minimumWithdrawAmount)) {\n return {\n success: false,\n reason: `Withdrawal amount must be at least 1 USDC due to withdrawal fee. Requested: ${import_ethers11.ethers.utils.formatUnits(requestedAmount, 6)} USDC`,\n availableBalance: import_ethers11.ethers.utils.formatUnits(availableUsdcBalance, 6),\n requiredBalance: import_ethers11.ethers.utils.formatUnits(minimumWithdrawAmount, 6)\n };\n }\n if (availableUsdcBalance.lt(requestedAmount)) {\n return {\n success: false,\n reason: `Insufficient perp balance for withdrawal. Available: ${import_ethers11.ethers.utils.formatUnits(availableUsdcBalance, 6)} USDC, Requested: ${import_ethers11.ethers.utils.formatUnits(requestedAmount, 6)} USDC`,\n availableBalance: import_ethers11.ethers.utils.formatUnits(availableUsdcBalance, 6),\n requiredBalance: import_ethers11.ethers.utils.formatUnits(requestedAmount, 6)\n };\n }\n return {\n success: true,\n availableBalance: import_ethers11.ethers.utils.formatUnits(availableUsdcBalance, 6),\n requiredBalance: import_ethers11.ethers.utils.formatUnits(requestedAmount, 6)\n };\n }\n\n // src/lib/ability-checks/send-spot-asset.ts\n init_dirname();\n init_buffer2();\n init_process2();\n var import_ethers12 = __toESM(require_lib32());\n async function sendSpotAssetPrechecks({\n infoClient,\n ethAddress: ethAddress2,\n params\n }) {\n if (!import_ethers12.ethers.utils.isAddress(params.destination)) {\n return {\n success: false,\n reason: `Invalid destination address: ${params.destination}`\n };\n }\n const spotMeta2 = await infoClient.spotMeta();\n const tokenInfo = spotMeta2.tokens.find((t3) => t3.name === params.token);\n if (!tokenInfo) {\n return {\n success: false,\n reason: `Token ${params.token} not found in spot metadata`\n };\n }\n const spotClearinghouseState2 = await infoClient.spotClearinghouseState({\n user: ethAddress2\n });\n const tokenBalance = spotClearinghouseState2.balances.find(\n (balance) => balance.coin === params.token\n );\n if (!tokenBalance) {\n return {\n success: false,\n reason: `No balance found for token: ${params.token}`,\n availableBalance: \"0\",\n requiredBalance: import_ethers12.ethers.utils.formatUnits(params.amount, tokenInfo.weiDecimals)\n };\n }\n const availableBalance = import_ethers12.ethers.BigNumber.from(\n import_ethers12.ethers.utils.parseUnits(tokenBalance.total, tokenInfo.weiDecimals)\n );\n console.log(\"[sendAssetPrechecks] Available balance:\", availableBalance);\n const requestedAmount = import_ethers12.ethers.BigNumber.from(params.amount);\n console.log(\"[sendAssetPrechecks] Requested amount:\", requestedAmount);\n if (availableBalance.lt(requestedAmount)) {\n return {\n success: false,\n reason: `Insufficient ${params.token} balance for send. Available: ${import_ethers12.ethers.utils.formatUnits(availableBalance, tokenInfo.weiDecimals)} ${params.token}, Requested: ${import_ethers12.ethers.utils.formatUnits(requestedAmount, tokenInfo.weiDecimals)} ${params.token}`,\n availableBalance: import_ethers12.ethers.utils.formatUnits(availableBalance, tokenInfo.weiDecimals),\n requiredBalance: import_ethers12.ethers.utils.formatUnits(requestedAmount, tokenInfo.weiDecimals)\n };\n }\n return {\n success: true,\n availableBalance: import_ethers12.ethers.utils.formatUnits(availableBalance, tokenInfo.weiDecimals),\n requiredBalance: import_ethers12.ethers.utils.formatUnits(requestedAmount, tokenInfo.weiDecimals)\n };\n }\n\n // src/lib/ability-checks/send-perp-usdc.ts\n init_dirname();\n init_buffer2();\n init_process2();\n var import_ethers13 = __toESM(require_lib32());\n async function sendPerpUsdcPrechecks({\n infoClient,\n ethAddress: ethAddress2,\n params\n }) {\n if (!import_ethers13.ethers.utils.isAddress(params.destination)) {\n return {\n success: false,\n reason: `Invalid destination address: ${params.destination}`\n };\n }\n const clearinghouseState3 = await infoClient.clearinghouseState({\n user: ethAddress2\n });\n const availableUsdcBalance = import_ethers13.ethers.utils.parseUnits(\n clearinghouseState3.marginSummary.accountValue,\n 6\n // USDC has 6 decimals\n );\n console.log(\"[sendPerpUsdcPrechecks] Available balance:\", availableUsdcBalance);\n const requestedAmount = import_ethers13.ethers.BigNumber.from(params.amount);\n console.log(\"[sendPerpUsdcPrechecks] Requested amount:\", requestedAmount);\n if (availableUsdcBalance.lt(requestedAmount)) {\n return {\n success: false,\n reason: `Insufficient perp balance for send. Available: ${import_ethers13.ethers.utils.formatUnits(availableUsdcBalance, 6)} USDC, Requested: ${import_ethers13.ethers.utils.formatUnits(requestedAmount, 6)} USDC`,\n availableBalance: import_ethers13.ethers.utils.formatUnits(availableUsdcBalance, 6),\n requiredBalance: import_ethers13.ethers.utils.formatUnits(requestedAmount, 6)\n };\n }\n return {\n success: true,\n availableBalance: import_ethers13.ethers.utils.formatUnits(availableUsdcBalance, 6),\n requiredBalance: import_ethers13.ethers.utils.formatUnits(requestedAmount, 6)\n };\n }\n\n // src/lib/vincent-ability.ts\n var vincentAbility = (0, import_vincent_ability_sdk10.createVincentAbility)({\n packageName: \"@lit-protocol/vincent-ability-hyperliquid\",\n abilityDescription: \"Ability to interact with the Hyperliquid API\",\n abilityParamsSchema,\n supportedPolicies: (0, import_vincent_ability_sdk10.supportedPoliciesForAbility)([]),\n precheckSuccessSchema,\n precheckFailSchema,\n executeSuccessSchema,\n executeFailSchema,\n precheck: async ({ abilityParams: abilityParams2 }, { succeed, fail, delegation: { delegatorPkpInfo } }) => {\n console.log(\n \"[@lit-protocol/vincent-ability-hyperliquid precheck]\",\n JSON.stringify(abilityParams2, import_vincent_ability_sdk10.bigIntReplacer, 2)\n );\n const { action, arbitrumRpcUrl, useTestnet = false } = abilityParams2;\n const transport = new HttpTransport({ isTestnet: useTestnet });\n const infoClient = new InfoClient({ transport });\n const hyperLiquidAccountExists = await hyperliquidAccountExists({\n infoClient,\n ethAddress: delegatorPkpInfo.ethAddress\n });\n if (action === \"deposit\" /* DEPOSIT */) {\n if (useTestnet) {\n return fail({\n action,\n reason: \"Deposit is not supported on Hyperliquid testnet. Please refer to these docs for getting testnet USDC: https://hyperliquid.gitbook.io/hyperliquid-docs/onboarding/testnet-faucet\"\n });\n }\n if (!arbitrumRpcUrl) {\n return fail({ action, reason: \"Arbitrum RPC URL is required for precheck\" });\n }\n if (!abilityParams2.deposit) {\n return fail({ action, reason: \"Deposit parameters are required for precheck\" });\n }\n const result = await depositPrechecks({\n provider: new import_ethers14.ethers.providers.StaticJsonRpcProvider(arbitrumRpcUrl),\n agentWalletPkpEthAddress: delegatorPkpInfo.ethAddress,\n depositAmountInMicroUsdc: abilityParams2.deposit.amount,\n useTestnet\n });\n if (!result.success) {\n return fail({ action, reason: result.reason, availableBalance: result.availableBalance });\n }\n return succeed({\n action\n });\n }\n if (!hyperLiquidAccountExists) {\n return fail({\n action,\n reason: \"Hyperliquid account does not exist. Please deposit first.\"\n });\n }\n switch (action) {\n case \"withdraw\" /* WITHDRAW */: {\n if (!abilityParams2.withdraw) {\n return fail({ action, reason: \"Withdraw parameters are required for precheck\" });\n }\n const result = await withdrawPrechecks({\n infoClient,\n ethAddress: delegatorPkpInfo.ethAddress,\n params: {\n amount: abilityParams2.withdraw.amount\n }\n });\n if (!result.success) {\n return fail({\n action,\n reason: result.reason,\n availableBalance: result.availableBalance,\n requiredBalance: result.requiredBalance\n });\n }\n return succeed({\n action,\n availableBalance: result.availableBalance\n });\n }\n case \"sendSpotAsset\" /* SEND_SPOT_ASSET */: {\n if (!abilityParams2.sendSpotAsset) {\n return fail({ action, reason: \"Send asset parameters are required for precheck\" });\n }\n const result = await sendSpotAssetPrechecks({\n infoClient,\n ethAddress: delegatorPkpInfo.ethAddress,\n params: {\n destination: abilityParams2.sendSpotAsset.destination,\n token: abilityParams2.sendSpotAsset.token,\n amount: abilityParams2.sendSpotAsset.amount\n }\n });\n if (!result.success) {\n return fail({\n action,\n reason: result.reason,\n availableBalance: result.availableBalance,\n requiredBalance: result.requiredBalance\n });\n }\n return succeed({\n action,\n availableBalance: result.availableBalance\n });\n }\n case \"sendPerpUsdc\" /* SEND_PERP_USDC */: {\n if (!abilityParams2.sendPerpUsdc) {\n return fail({ action, reason: \"Send perp USDC parameters are required for precheck\" });\n }\n const result = await sendPerpUsdcPrechecks({\n infoClient,\n ethAddress: delegatorPkpInfo.ethAddress,\n params: {\n destination: abilityParams2.sendPerpUsdc.destination,\n amount: abilityParams2.sendPerpUsdc.amount\n }\n });\n if (!result.success) {\n return fail({\n action,\n reason: result.reason,\n availableBalance: result.availableBalance,\n requiredBalance: result.requiredBalance\n });\n }\n return succeed({\n action,\n availableBalance: result.availableBalance\n });\n }\n case \"transferToSpot\" /* TRANSFER_TO_SPOT */:\n case \"transferToPerp\" /* TRANSFER_TO_PERP */: {\n if (!abilityParams2.transfer) {\n return fail({ action, reason: \"Transfer to spot parameters are required for precheck\" });\n }\n const result = await transferPrechecks({\n infoClient,\n ethAddress: delegatorPkpInfo.ethAddress,\n params: {\n amount: abilityParams2.transfer.amount,\n to: action === \"transferToSpot\" /* TRANSFER_TO_SPOT */ ? \"spot\" : \"perp\"\n }\n });\n if (!result.success) {\n return fail({\n action,\n reason: result.reason,\n availableBalance: result.availableBalance,\n requiredBalance: result.requiredBalance\n });\n }\n return succeed({\n action,\n availableBalance: result.availableBalance\n });\n }\n case \"spotBuy\" /* SPOT_BUY */:\n case \"spotSell\" /* SPOT_SELL */: {\n if (!abilityParams2.spot) {\n return fail({ action, reason: \"Spot trade parameters are required for precheck\" });\n }\n const checkResult = await spotTradePrechecks({\n transport,\n ethAddress: delegatorPkpInfo.ethAddress,\n params: {\n symbol: abilityParams2.spot.symbol,\n price: abilityParams2.spot.price,\n size: abilityParams2.spot.size,\n isBuy: action === \"spotBuy\" /* SPOT_BUY */\n }\n });\n if (!checkResult.success) {\n return fail({\n action,\n reason: checkResult.reason\n });\n }\n return succeed({ action });\n }\n case \"perpLong\" /* PERP_LONG */:\n case \"perpShort\" /* PERP_SHORT */: {\n if (!abilityParams2.perp) {\n return fail({ action, reason: \"Perp trade parameters are required for precheck\" });\n }\n const checkResult = await perpTradePrechecks({\n transport,\n ethAddress: delegatorPkpInfo.ethAddress,\n params: {\n symbol: abilityParams2.perp.symbol\n }\n });\n if (!checkResult.success) {\n return fail({ action, reason: checkResult.reason || \"Unknown error\" });\n }\n return succeed({ action });\n }\n case \"cancelOrder\" /* CANCEL_ORDER */: {\n if (!abilityParams2.cancelOrder) {\n return fail({ action, reason: \"Cancel order parameters are required for precheck\" });\n }\n const result = await cancelOrderPrechecks({\n infoClient,\n ethAddress: delegatorPkpInfo.ethAddress,\n params: {\n orderId: abilityParams2.cancelOrder.orderId\n }\n });\n if (!result.success) {\n return fail({\n action,\n reason: result.reason\n });\n }\n return succeed({ action });\n }\n case \"cancelAllOrdersForSymbol\" /* CANCEL_ALL_ORDERS_FOR_SYMBOL */: {\n if (!abilityParams2.cancelAllOrdersForSymbol) {\n return fail({\n action,\n reason: \"Cancel all orders for symbol parameters are required for precheck\"\n });\n }\n const result = await cancelAllOrdersForSymbolPrechecks({\n infoClient,\n ethAddress: delegatorPkpInfo.ethAddress,\n params: {\n symbol: abilityParams2.cancelAllOrdersForSymbol.symbol\n }\n });\n if (!result.success) {\n return fail({\n action,\n reason: result.reason\n });\n }\n return succeed({ action });\n }\n default:\n return fail({ action, reason: `Unknown action: ${action}` });\n }\n },\n execute: async ({ abilityParams: abilityParams2 }, { succeed, fail, delegation: { delegatorPkpInfo } }) => {\n console.log(\n \"[@lit-protocol/vincent-ability-hyperliquid execute]\",\n JSON.stringify(abilityParams2, import_vincent_ability_sdk10.bigIntReplacer, 2)\n );\n const { action, useTestnet = false } = abilityParams2;\n const transport = new HttpTransport({ isTestnet: useTestnet });\n try {\n switch (action) {\n case \"deposit\" /* DEPOSIT */: {\n if (useTestnet) {\n return fail({\n action,\n reason: \"Deposit is not supported on Hyperliquid testnet. Please refer to these docs for getting testnet USDC: https://hyperliquid.gitbook.io/hyperliquid-docs/onboarding/testnet-faucet\"\n });\n }\n if (!abilityParams2.deposit) {\n return fail({ action, reason: \"Deposit parameters are required\" });\n }\n const rpcUrl = await Lit.Actions.getRpcUrl({\n chain: \"arbitrum\"\n });\n const iface = new import_ethers14.ethers.utils.Interface(import_vincent_ability_sdk10.ERC20_ABI);\n const calldata = iface.encodeFunctionData(\"transfer\", [\n HYPERLIQUID_BRIDGE_ADDRESS_MAINNET,\n abilityParams2.deposit.amount\n ]);\n const txHash = await sendDepositTx({\n rpcUrl,\n chainId: 42161,\n // Arbitrum mainnet\n pkpEthAddress: delegatorPkpInfo.ethAddress,\n pkpPublicKey: delegatorPkpInfo.publicKey,\n to: ARBITRUM_USDC_ADDRESS_MAINNET,\n value: \"0x0\",\n calldata\n });\n return succeed({\n action,\n txHash\n });\n }\n case \"withdraw\" /* WITHDRAW */: {\n if (!abilityParams2.withdraw) {\n return fail({ action, reason: \"Withdraw parameters are required\" });\n }\n const result = await withdrawUsdc({\n transport,\n pkpPublicKey: delegatorPkpInfo.publicKey,\n amount: abilityParams2.withdraw.amount,\n destination: abilityParams2.withdraw.destination || delegatorPkpInfo.ethAddress,\n useTestnet\n });\n if (result.withdrawResult.status === \"ok\") {\n return succeed({ action, withdrawResult: result.withdrawResult });\n }\n return fail({\n action,\n reason: `Unexpected response status: ${JSON.stringify(result.withdrawResult, null, 2)}`\n });\n }\n case \"sendSpotAsset\" /* SEND_SPOT_ASSET */: {\n if (!abilityParams2.sendSpotAsset) {\n return fail({ action, reason: \"Send spot asset parameters are required\" });\n }\n const result = await sendSpotAsset({\n transport,\n pkpPublicKey: delegatorPkpInfo.publicKey,\n destination: abilityParams2.sendSpotAsset.destination,\n token: abilityParams2.sendSpotAsset.token,\n amount: abilityParams2.sendSpotAsset.amount,\n useTestnet\n });\n if (result.sendResult.status === \"ok\") {\n return succeed({ action, sendResult: result.sendResult });\n }\n return fail({\n action,\n reason: `Unexpected response status: ${JSON.stringify(result.sendResult, null, 2)}`\n });\n }\n case \"sendPerpUsdc\" /* SEND_PERP_USDC */: {\n if (!abilityParams2.sendPerpUsdc) {\n return fail({ action, reason: \"Send perp USDC parameters are required\" });\n }\n const result = await sendPerpUsdc({\n transport,\n pkpPublicKey: delegatorPkpInfo.publicKey,\n destination: abilityParams2.sendPerpUsdc.destination,\n amount: abilityParams2.sendPerpUsdc.amount,\n useTestnet\n });\n if (result.sendResult.status === \"ok\") {\n return succeed({ action, sendResult: result.sendResult });\n }\n return fail({\n action,\n reason: `Unexpected response status: ${JSON.stringify(result.sendResult, null, 2)}`\n });\n }\n case \"transferToSpot\" /* TRANSFER_TO_SPOT */:\n case \"transferToPerp\" /* TRANSFER_TO_PERP */: {\n if (!abilityParams2.transfer) {\n return fail({\n action,\n reason: \"Transfer to parameters are required for transferToSpot/transferToPerp action\"\n });\n }\n const result = await transferUsdcTo({\n transport,\n pkpPublicKey: delegatorPkpInfo.publicKey,\n amount: abilityParams2.transfer.amount,\n to: action === \"transferToSpot\" ? \"spot\" : \"perp\",\n useTestnet: abilityParams2.useTestnet ?? false\n });\n if (result.transferResult.status === \"ok\") {\n return succeed({ action, transferResult: result.transferResult });\n }\n return fail({\n action,\n reason: `Unexpected response status: ${JSON.stringify(result.transferResult, null, 2)}`\n });\n }\n case \"spotBuy\" /* SPOT_BUY */:\n case \"spotSell\" /* SPOT_SELL */: {\n if (!abilityParams2.spot) {\n return fail({ action, reason: \"Spot trade parameters are required\" });\n }\n const result = await executeSpotOrder({\n transport,\n pkpPublicKey: delegatorPkpInfo.publicKey,\n params: {\n symbol: abilityParams2.spot.symbol,\n price: abilityParams2.spot.price,\n size: abilityParams2.spot.size,\n isBuy: action === \"spotBuy\",\n orderType: abilityParams2.spot.orderType\n },\n useTestnet\n });\n if (result.status === \"error\") {\n return fail({\n action,\n reason: result.error\n });\n }\n return succeed({\n action,\n orderResult: result.orderResult\n });\n }\n case \"perpLong\" /* PERP_LONG */:\n case \"perpShort\" /* PERP_SHORT */: {\n if (!abilityParams2.perp) {\n return fail({ action, reason: \"Perp trade parameters are required\" });\n }\n const result = await executePerpOrder({\n transport,\n pkpPublicKey: delegatorPkpInfo.publicKey,\n params: {\n symbol: abilityParams2.perp.symbol,\n price: abilityParams2.perp.price,\n size: abilityParams2.perp.size,\n isLong: action === \"perpLong\",\n reduceOnly: abilityParams2.perp.reduceOnly,\n orderType: abilityParams2.perp.orderType,\n leverage: {\n leverage: abilityParams2.perp.leverage,\n isCross: abilityParams2.perp.isCross ?? true\n }\n },\n useTestnet\n });\n if (result.status === \"error\") {\n return fail({\n action,\n reason: result.error\n });\n }\n return succeed({\n action,\n orderResult: result.orderResult\n });\n }\n case \"cancelOrder\" /* CANCEL_ORDER */: {\n if (!abilityParams2.cancelOrder) {\n return fail({ action, reason: \"Cancel order parameters are required\" });\n }\n const result = await cancelOrder({\n transport,\n pkpPublicKey: delegatorPkpInfo.publicKey,\n params: {\n symbol: abilityParams2.cancelOrder.symbol,\n orderId: abilityParams2.cancelOrder.orderId\n },\n useTestnet\n });\n if (result.status === \"error\") {\n return fail({\n action,\n reason: result.reason\n });\n }\n return succeed({\n action,\n cancelResult: result.cancelResult\n });\n }\n case \"cancelAllOrdersForSymbol\" /* CANCEL_ALL_ORDERS_FOR_SYMBOL */: {\n if (!abilityParams2.cancelAllOrdersForSymbol) {\n return fail({ action, reason: \"Cancel all orders for symbol parameters are required\" });\n }\n const result = await cancelAllOrdersForSymbol({\n transport,\n pkpPublicKey: delegatorPkpInfo.publicKey,\n symbol: abilityParams2.cancelAllOrdersForSymbol.symbol,\n useTestnet\n });\n if (result.status === \"error\") {\n return fail({\n action,\n reason: result.reason\n });\n }\n return succeed({\n action,\n cancelResult: result.cancelResult\n });\n }\n default:\n return fail({ action, reason: `Unknown action: ${action}` });\n }\n } catch (error) {\n console.error(\"[@lit-protocol/vincent-ability-hyperliquid execute] Error\", error);\n return fail({\n action,\n reason: error instanceof Error ? error.message : String(error)\n });\n }\n }\n });\n\n // src/lib/lit-action.ts\n (async () => {\n const func = (0, import_vincent_ability_sdk11.vincentAbilityHandler)({\n vincentAbility,\n context: {\n delegatorPkpEthAddress: context.delegatorPkpEthAddress\n },\n abilityParams\n });\n await func();\n })();\n})();\n/*! Bundled license information:\n\n@jspm/core/nodelibs/browser/chunk-DtuTasat.js:\n (*! ieee754. BSD-3-Clause License. Feross Aboukhadijeh *)\n\njs-sha3/src/sha3.js:\n (**\n * [js-sha3]{@link https://github.com/emn178/js-sha3}\n *\n * @version 0.8.0\n * @author Chen, Yi-Cyuan [emn178@gmail.com]\n * @copyright Chen, Yi-Cyuan 2015-2018\n * @license MIT\n *)\n\n@noble/hashes/utils.js:\n (*! noble-hashes - MIT License (c) 2022 Paul Miller (paulmillr.com) *)\n\n@noble/curves/abstract/utils.js:\n (*! noble-curves - MIT License (c) 2022 Paul Miller (paulmillr.com) *)\n\n@noble/curves/abstract/modular.js:\n (*! noble-curves - MIT License (c) 2022 Paul Miller (paulmillr.com) *)\n\n@noble/curves/abstract/curve.js:\n (*! noble-curves - MIT License (c) 2022 Paul Miller (paulmillr.com) *)\n\n@noble/curves/abstract/weierstrass.js:\n (*! noble-curves - MIT License (c) 2022 Paul Miller (paulmillr.com) *)\n\n@noble/curves/_shortw_utils.js:\n (*! noble-curves - MIT License (c) 2022 Paul Miller (paulmillr.com) *)\n\n@noble/curves/secp256k1.js:\n (*! noble-curves - MIT License (c) 2022 Paul Miller (paulmillr.com) *)\n\naes-js/lib.commonjs/aes.js:\n (*! MIT License. Copyright 2015-2022 Richard Moore . See LICENSE.txt. *)\n\n@noble/hashes/esm/utils.js:\n (*! noble-hashes - MIT License (c) 2022 Paul Miller (paulmillr.com) *)\n\n@noble/curves/esm/abstract/utils.js:\n (*! noble-curves - MIT License (c) 2022 Paul Miller (paulmillr.com) *)\n\n@noble/curves/esm/abstract/modular.js:\n (*! noble-curves - MIT License (c) 2022 Paul Miller (paulmillr.com) *)\n\n@noble/curves/esm/abstract/curve.js:\n (*! noble-curves - MIT License (c) 2022 Paul Miller (paulmillr.com) *)\n\n@noble/curves/esm/abstract/weierstrass.js:\n (*! noble-curves - MIT License (c) 2022 Paul Miller (paulmillr.com) *)\n\n@noble/curves/esm/_shortw_utils.js:\n (*! noble-curves - MIT License (c) 2022 Paul Miller (paulmillr.com) *)\n\n@noble/curves/esm/secp256k1.js:\n (*! noble-curves - MIT License (c) 2022 Paul Miller (paulmillr.com) *)\n\n@noble/curves/esm/utils.js:\n (*! noble-curves - MIT License (c) 2022 Paul Miller (paulmillr.com) *)\n\n@noble/curves/esm/abstract/modular.js:\n (*! noble-curves - MIT License (c) 2022 Paul Miller (paulmillr.com) *)\n\n@noble/curves/esm/abstract/curve.js:\n (*! noble-curves - MIT License (c) 2022 Paul Miller (paulmillr.com) *)\n\n@noble/curves/esm/abstract/weierstrass.js:\n (*! noble-curves - MIT License (c) 2022 Paul Miller (paulmillr.com) *)\n\n@noble/curves/esm/_shortw_utils.js:\n (*! noble-curves - MIT License (c) 2022 Paul Miller (paulmillr.com) *)\n\n@noble/curves/esm/secp256k1.js:\n (*! noble-curves - MIT License (c) 2022 Paul Miller (paulmillr.com) *)\n\n@scure/base/lib/esm/index.js:\n (*! scure-base - MIT License (c) 2022 Paul Miller (paulmillr.com) *)\n\n@scure/bip32/lib/esm/index.js:\n (*! scure-bip32 - MIT License (c) 2022 Patricio Palladino, Paul Miller (paulmillr.com) *)\n\n@scure/bip39/esm/index.js:\n (*! scure-bip39 - MIT License (c) 2022 Patricio Palladino, Paul Miller (paulmillr.com) *)\n\n@noble/curves/esm/nist.js:\n (*! noble-curves - MIT License (c) 2022 Paul Miller (paulmillr.com) *)\n\n@noble/curves/esm/p256.js:\n (*! noble-curves - MIT License (c) 2022 Paul Miller (paulmillr.com) *)\n\n@noble/hashes/utils.js:\n (*! noble-hashes - MIT License (c) 2022 Paul Miller (paulmillr.com) *)\n*/\n"; +const code = ";(()=>{try{const g=globalThis;const D=(g.Deno=g.Deno||{});const B=(D.build=D.build||{});if(B.os==null){B.os=\"linux\";}}catch{}})();\n\"use strict\";\n(() => {\n var __create = Object.create;\n var __defProp = Object.defineProperty;\n var __getOwnPropDesc = Object.getOwnPropertyDescriptor;\n var __getOwnPropNames = Object.getOwnPropertyNames;\n var __getProtoOf = Object.getPrototypeOf;\n var __hasOwnProp = Object.prototype.hasOwnProperty;\n var __esm = (fn, res) => function __init() {\n return fn && (res = (0, fn[__getOwnPropNames(fn)[0]])(fn = 0)), res;\n };\n var __commonJS = (cb, mod3) => function __require() {\n return mod3 || (0, cb[__getOwnPropNames(cb)[0]])((mod3 = { exports: {} }).exports, mod3), mod3.exports;\n };\n var __export = (target, all) => {\n for (var name in all)\n __defProp(target, name, { get: all[name], enumerable: true });\n };\n var __copyProps = (to, from14, except, desc) => {\n if (from14 && typeof from14 === \"object\" || typeof from14 === \"function\") {\n for (let key of __getOwnPropNames(from14))\n if (!__hasOwnProp.call(to, key) && key !== except)\n __defProp(to, key, { get: () => from14[key], enumerable: !(desc = __getOwnPropDesc(from14, key)) || desc.enumerable });\n }\n return to;\n };\n var __toESM = (mod3, isNodeMode, target) => (target = mod3 != null ? __create(__getProtoOf(mod3)) : {}, __copyProps(\n // If the importer is in node compatibility mode or this is not an ESM\n // file that has been converted to a CommonJS file using a Babel-\n // compatible transform (i.e. \"__esModule\" has not been set), then set\n // \"default\" to the CommonJS \"module.exports\" for node compatibility.\n isNodeMode || !mod3 || !mod3.__esModule ? __defProp(target, \"default\", { value: mod3, enumerable: true }) : target,\n mod3\n ));\n var __toCommonJS = (mod3) => __copyProps(__defProp({}, \"__esModule\", { value: true }), mod3);\n\n // ../../../node_modules/.pnpm/@lit-protocol+esbuild-plugin-polyfill-node@0.3.0_esbuild@0.19.12/node_modules/@lit-protocol/esbuild-plugin-polyfill-node/polyfills/__dirname.js\n var init_dirname = __esm({\n \"../../../node_modules/.pnpm/@lit-protocol+esbuild-plugin-polyfill-node@0.3.0_esbuild@0.19.12/node_modules/@lit-protocol/esbuild-plugin-polyfill-node/polyfills/__dirname.js\"() {\n \"use strict\";\n }\n });\n\n // ../../../node_modules/.pnpm/@jspm+core@2.1.0/node_modules/@jspm/core/nodelibs/browser/process.js\n var process_exports = {};\n __export(process_exports, {\n _debugEnd: () => _debugEnd,\n _debugProcess: () => _debugProcess,\n _events: () => _events,\n _eventsCount: () => _eventsCount,\n _exiting: () => _exiting,\n _fatalExceptions: () => _fatalExceptions,\n _getActiveHandles: () => _getActiveHandles,\n _getActiveRequests: () => _getActiveRequests,\n _kill: () => _kill,\n _linkedBinding: () => _linkedBinding,\n _maxListeners: () => _maxListeners,\n _preload_modules: () => _preload_modules,\n _rawDebug: () => _rawDebug,\n _startProfilerIdleNotifier: () => _startProfilerIdleNotifier,\n _stopProfilerIdleNotifier: () => _stopProfilerIdleNotifier,\n _tickCallback: () => _tickCallback,\n abort: () => abort,\n addListener: () => addListener,\n allowedNodeEnvironmentFlags: () => allowedNodeEnvironmentFlags,\n arch: () => arch,\n argv: () => argv,\n argv0: () => argv0,\n assert: () => assert,\n binding: () => binding,\n browser: () => browser,\n chdir: () => chdir,\n config: () => config,\n cpuUsage: () => cpuUsage,\n cwd: () => cwd,\n debugPort: () => debugPort,\n default: () => process,\n dlopen: () => dlopen,\n domain: () => domain,\n emit: () => emit,\n emitWarning: () => emitWarning,\n env: () => env,\n execArgv: () => execArgv,\n execPath: () => execPath,\n exit: () => exit,\n features: () => features,\n hasUncaughtExceptionCaptureCallback: () => hasUncaughtExceptionCaptureCallback,\n hrtime: () => hrtime,\n kill: () => kill,\n listeners: () => listeners,\n memoryUsage: () => memoryUsage,\n moduleLoadList: () => moduleLoadList,\n nextTick: () => nextTick,\n off: () => off,\n on: () => on,\n once: () => once,\n openStdin: () => openStdin,\n pid: () => pid,\n platform: () => platform,\n ppid: () => ppid,\n prependListener: () => prependListener,\n prependOnceListener: () => prependOnceListener,\n reallyExit: () => reallyExit,\n release: () => release,\n removeAllListeners: () => removeAllListeners,\n removeListener: () => removeListener,\n resourceUsage: () => resourceUsage,\n setSourceMapsEnabled: () => setSourceMapsEnabled,\n setUncaughtExceptionCaptureCallback: () => setUncaughtExceptionCaptureCallback,\n stderr: () => stderr,\n stdin: () => stdin,\n stdout: () => stdout,\n title: () => title,\n umask: () => umask,\n uptime: () => uptime,\n version: () => version,\n versions: () => versions\n });\n function unimplemented(name) {\n throw new Error(\"Node.js process \" + name + \" is not supported by JSPM core outside of Node.js\");\n }\n function cleanUpNextTick() {\n if (!draining || !currentQueue)\n return;\n draining = false;\n if (currentQueue.length) {\n queue = currentQueue.concat(queue);\n } else {\n queueIndex = -1;\n }\n if (queue.length)\n drainQueue();\n }\n function drainQueue() {\n if (draining)\n return;\n var timeout = setTimeout(cleanUpNextTick, 0);\n draining = true;\n var len = queue.length;\n while (len) {\n currentQueue = queue;\n queue = [];\n while (++queueIndex < len) {\n if (currentQueue)\n currentQueue[queueIndex].run();\n }\n queueIndex = -1;\n len = queue.length;\n }\n currentQueue = null;\n draining = false;\n clearTimeout(timeout);\n }\n function nextTick(fun) {\n var args = new Array(arguments.length - 1);\n if (arguments.length > 1) {\n for (var i3 = 1; i3 < arguments.length; i3++)\n args[i3 - 1] = arguments[i3];\n }\n queue.push(new Item(fun, args));\n if (queue.length === 1 && !draining)\n setTimeout(drainQueue, 0);\n }\n function Item(fun, array2) {\n this.fun = fun;\n this.array = array2;\n }\n function noop() {\n }\n function _linkedBinding(name) {\n unimplemented(\"_linkedBinding\");\n }\n function dlopen(name) {\n unimplemented(\"dlopen\");\n }\n function _getActiveRequests() {\n return [];\n }\n function _getActiveHandles() {\n return [];\n }\n function assert(condition, message) {\n if (!condition)\n throw new Error(message || \"assertion error\");\n }\n function hasUncaughtExceptionCaptureCallback() {\n return false;\n }\n function uptime() {\n return _performance.now() / 1e3;\n }\n function hrtime(previousTimestamp) {\n var baseNow = Math.floor((Date.now() - _performance.now()) * 1e-3);\n var clocktime = _performance.now() * 1e-3;\n var seconds = Math.floor(clocktime) + baseNow;\n var nanoseconds = Math.floor(clocktime % 1 * 1e9);\n if (previousTimestamp) {\n seconds = seconds - previousTimestamp[0];\n nanoseconds = nanoseconds - previousTimestamp[1];\n if (nanoseconds < 0) {\n seconds--;\n nanoseconds += nanoPerSec;\n }\n }\n return [seconds, nanoseconds];\n }\n function on() {\n return process;\n }\n function listeners(name) {\n return [];\n }\n var queue, draining, currentQueue, queueIndex, title, arch, platform, env, argv, execArgv, version, versions, emitWarning, binding, umask, cwd, chdir, release, browser, _rawDebug, moduleLoadList, domain, _exiting, config, reallyExit, _kill, cpuUsage, resourceUsage, memoryUsage, kill, exit, openStdin, allowedNodeEnvironmentFlags, features, _fatalExceptions, setUncaughtExceptionCaptureCallback, _tickCallback, _debugProcess, _debugEnd, _startProfilerIdleNotifier, _stopProfilerIdleNotifier, stdout, stderr, stdin, abort, pid, ppid, execPath, debugPort, argv0, _preload_modules, setSourceMapsEnabled, _performance, nowOffset, nanoPerSec, _maxListeners, _events, _eventsCount, addListener, once, off, removeListener, removeAllListeners, emit, prependListener, prependOnceListener, process;\n var init_process = __esm({\n \"../../../node_modules/.pnpm/@jspm+core@2.1.0/node_modules/@jspm/core/nodelibs/browser/process.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n queue = [];\n draining = false;\n queueIndex = -1;\n Item.prototype.run = function() {\n this.fun.apply(null, this.array);\n };\n title = \"browser\";\n arch = \"x64\";\n platform = \"browser\";\n env = {\n PATH: \"/usr/bin\",\n LANG: typeof navigator !== \"undefined\" ? navigator.language + \".UTF-8\" : void 0,\n PWD: \"/\",\n HOME: \"/home\",\n TMP: \"/tmp\"\n };\n argv = [\"/usr/bin/node\"];\n execArgv = [];\n version = \"v16.8.0\";\n versions = {};\n emitWarning = function(message, type) {\n console.warn((type ? type + \": \" : \"\") + message);\n };\n binding = function(name) {\n unimplemented(\"binding\");\n };\n umask = function(mask) {\n return 0;\n };\n cwd = function() {\n return \"/\";\n };\n chdir = function(dir) {\n };\n release = {\n name: \"node\",\n sourceUrl: \"\",\n headersUrl: \"\",\n libUrl: \"\"\n };\n browser = true;\n _rawDebug = noop;\n moduleLoadList = [];\n domain = {};\n _exiting = false;\n config = {};\n reallyExit = noop;\n _kill = noop;\n cpuUsage = function() {\n return {};\n };\n resourceUsage = cpuUsage;\n memoryUsage = cpuUsage;\n kill = noop;\n exit = noop;\n openStdin = noop;\n allowedNodeEnvironmentFlags = {};\n features = {\n inspector: false,\n debug: false,\n uv: false,\n ipv6: false,\n tls_alpn: false,\n tls_sni: false,\n tls_ocsp: false,\n tls: false,\n cached_builtins: true\n };\n _fatalExceptions = noop;\n setUncaughtExceptionCaptureCallback = noop;\n _tickCallback = noop;\n _debugProcess = noop;\n _debugEnd = noop;\n _startProfilerIdleNotifier = noop;\n _stopProfilerIdleNotifier = noop;\n stdout = void 0;\n stderr = void 0;\n stdin = void 0;\n abort = noop;\n pid = 2;\n ppid = 1;\n execPath = \"/bin/usr/node\";\n debugPort = 9229;\n argv0 = \"node\";\n _preload_modules = [];\n setSourceMapsEnabled = noop;\n _performance = {\n now: typeof performance !== \"undefined\" ? performance.now.bind(performance) : void 0,\n timing: typeof performance !== \"undefined\" ? performance.timing : void 0\n };\n if (_performance.now === void 0) {\n nowOffset = Date.now();\n if (_performance.timing && _performance.timing.navigationStart) {\n nowOffset = _performance.timing.navigationStart;\n }\n _performance.now = () => Date.now() - nowOffset;\n }\n nanoPerSec = 1e9;\n hrtime.bigint = function(time) {\n var diff = hrtime(time);\n if (typeof BigInt === \"undefined\") {\n return diff[0] * nanoPerSec + diff[1];\n }\n return BigInt(diff[0] * nanoPerSec) + BigInt(diff[1]);\n };\n _maxListeners = 10;\n _events = {};\n _eventsCount = 0;\n addListener = on;\n once = on;\n off = on;\n removeListener = on;\n removeAllListeners = on;\n emit = noop;\n prependListener = on;\n prependOnceListener = on;\n process = {\n version,\n versions,\n arch,\n platform,\n browser,\n release,\n _rawDebug,\n moduleLoadList,\n binding,\n _linkedBinding,\n _events,\n _eventsCount,\n _maxListeners,\n on,\n addListener,\n once,\n off,\n removeListener,\n removeAllListeners,\n emit,\n prependListener,\n prependOnceListener,\n listeners,\n domain,\n _exiting,\n config,\n dlopen,\n uptime,\n _getActiveRequests,\n _getActiveHandles,\n reallyExit,\n _kill,\n cpuUsage,\n resourceUsage,\n memoryUsage,\n kill,\n exit,\n openStdin,\n allowedNodeEnvironmentFlags,\n assert,\n features,\n _fatalExceptions,\n setUncaughtExceptionCaptureCallback,\n hasUncaughtExceptionCaptureCallback,\n emitWarning,\n nextTick,\n _tickCallback,\n _debugProcess,\n _debugEnd,\n _startProfilerIdleNotifier,\n _stopProfilerIdleNotifier,\n stdout,\n stdin,\n stderr,\n abort,\n umask,\n chdir,\n cwd,\n env,\n title,\n argv,\n execArgv,\n pid,\n ppid,\n execPath,\n debugPort,\n hrtime,\n argv0,\n _preload_modules,\n setSourceMapsEnabled\n };\n }\n });\n\n // ../../../node_modules/.pnpm/@lit-protocol+esbuild-plugin-polyfill-node@0.3.0_esbuild@0.19.12/node_modules/@lit-protocol/esbuild-plugin-polyfill-node/polyfills/process.js\n var init_process2 = __esm({\n \"../../../node_modules/.pnpm/@lit-protocol+esbuild-plugin-polyfill-node@0.3.0_esbuild@0.19.12/node_modules/@lit-protocol/esbuild-plugin-polyfill-node/polyfills/process.js\"() {\n \"use strict\";\n init_process();\n }\n });\n\n // ../../../node_modules/.pnpm/@jspm+core@2.1.0/node_modules/@jspm/core/nodelibs/browser/chunk-DtuTasat.js\n function dew$2() {\n if (_dewExec$2)\n return exports$2;\n _dewExec$2 = true;\n exports$2.byteLength = byteLength;\n exports$2.toByteArray = toByteArray;\n exports$2.fromByteArray = fromByteArray;\n var lookup = [];\n var revLookup = [];\n var Arr = typeof Uint8Array !== \"undefined\" ? Uint8Array : Array;\n var code = \"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/\";\n for (var i3 = 0, len = code.length; i3 < len; ++i3) {\n lookup[i3] = code[i3];\n revLookup[code.charCodeAt(i3)] = i3;\n }\n revLookup[\"-\".charCodeAt(0)] = 62;\n revLookup[\"_\".charCodeAt(0)] = 63;\n function getLens(b64) {\n var len2 = b64.length;\n if (len2 % 4 > 0) {\n throw new Error(\"Invalid string. Length must be a multiple of 4\");\n }\n var validLen = b64.indexOf(\"=\");\n if (validLen === -1)\n validLen = len2;\n var placeHoldersLen = validLen === len2 ? 0 : 4 - validLen % 4;\n return [validLen, placeHoldersLen];\n }\n function byteLength(b64) {\n var lens = getLens(b64);\n var validLen = lens[0];\n var placeHoldersLen = lens[1];\n return (validLen + placeHoldersLen) * 3 / 4 - placeHoldersLen;\n }\n function _byteLength(b64, validLen, placeHoldersLen) {\n return (validLen + placeHoldersLen) * 3 / 4 - placeHoldersLen;\n }\n function toByteArray(b64) {\n var tmp;\n var lens = getLens(b64);\n var validLen = lens[0];\n var placeHoldersLen = lens[1];\n var arr = new Arr(_byteLength(b64, validLen, placeHoldersLen));\n var curByte = 0;\n var len2 = placeHoldersLen > 0 ? validLen - 4 : validLen;\n var i4;\n for (i4 = 0; i4 < len2; i4 += 4) {\n tmp = revLookup[b64.charCodeAt(i4)] << 18 | revLookup[b64.charCodeAt(i4 + 1)] << 12 | revLookup[b64.charCodeAt(i4 + 2)] << 6 | revLookup[b64.charCodeAt(i4 + 3)];\n arr[curByte++] = tmp >> 16 & 255;\n arr[curByte++] = tmp >> 8 & 255;\n arr[curByte++] = tmp & 255;\n }\n if (placeHoldersLen === 2) {\n tmp = revLookup[b64.charCodeAt(i4)] << 2 | revLookup[b64.charCodeAt(i4 + 1)] >> 4;\n arr[curByte++] = tmp & 255;\n }\n if (placeHoldersLen === 1) {\n tmp = revLookup[b64.charCodeAt(i4)] << 10 | revLookup[b64.charCodeAt(i4 + 1)] << 4 | revLookup[b64.charCodeAt(i4 + 2)] >> 2;\n arr[curByte++] = tmp >> 8 & 255;\n arr[curByte++] = tmp & 255;\n }\n return arr;\n }\n function tripletToBase64(num2) {\n return lookup[num2 >> 18 & 63] + lookup[num2 >> 12 & 63] + lookup[num2 >> 6 & 63] + lookup[num2 & 63];\n }\n function encodeChunk(uint8, start, end) {\n var tmp;\n var output = [];\n for (var i4 = start; i4 < end; i4 += 3) {\n tmp = (uint8[i4] << 16 & 16711680) + (uint8[i4 + 1] << 8 & 65280) + (uint8[i4 + 2] & 255);\n output.push(tripletToBase64(tmp));\n }\n return output.join(\"\");\n }\n function fromByteArray(uint8) {\n var tmp;\n var len2 = uint8.length;\n var extraBytes = len2 % 3;\n var parts = [];\n var maxChunkLength = 16383;\n for (var i4 = 0, len22 = len2 - extraBytes; i4 < len22; i4 += maxChunkLength) {\n parts.push(encodeChunk(uint8, i4, i4 + maxChunkLength > len22 ? len22 : i4 + maxChunkLength));\n }\n if (extraBytes === 1) {\n tmp = uint8[len2 - 1];\n parts.push(lookup[tmp >> 2] + lookup[tmp << 4 & 63] + \"==\");\n } else if (extraBytes === 2) {\n tmp = (uint8[len2 - 2] << 8) + uint8[len2 - 1];\n parts.push(lookup[tmp >> 10] + lookup[tmp >> 4 & 63] + lookup[tmp << 2 & 63] + \"=\");\n }\n return parts.join(\"\");\n }\n return exports$2;\n }\n function dew$1() {\n if (_dewExec$1)\n return exports$1;\n _dewExec$1 = true;\n exports$1.read = function(buffer2, offset, isLE3, mLen, nBytes) {\n var e3, m2;\n var eLen = nBytes * 8 - mLen - 1;\n var eMax = (1 << eLen) - 1;\n var eBias = eMax >> 1;\n var nBits = -7;\n var i3 = isLE3 ? nBytes - 1 : 0;\n var d5 = isLE3 ? -1 : 1;\n var s4 = buffer2[offset + i3];\n i3 += d5;\n e3 = s4 & (1 << -nBits) - 1;\n s4 >>= -nBits;\n nBits += eLen;\n for (; nBits > 0; e3 = e3 * 256 + buffer2[offset + i3], i3 += d5, nBits -= 8) {\n }\n m2 = e3 & (1 << -nBits) - 1;\n e3 >>= -nBits;\n nBits += mLen;\n for (; nBits > 0; m2 = m2 * 256 + buffer2[offset + i3], i3 += d5, nBits -= 8) {\n }\n if (e3 === 0) {\n e3 = 1 - eBias;\n } else if (e3 === eMax) {\n return m2 ? NaN : (s4 ? -1 : 1) * Infinity;\n } else {\n m2 = m2 + Math.pow(2, mLen);\n e3 = e3 - eBias;\n }\n return (s4 ? -1 : 1) * m2 * Math.pow(2, e3 - mLen);\n };\n exports$1.write = function(buffer2, value, offset, isLE3, mLen, nBytes) {\n var e3, m2, c4;\n var eLen = nBytes * 8 - mLen - 1;\n var eMax = (1 << eLen) - 1;\n var eBias = eMax >> 1;\n var rt = mLen === 23 ? Math.pow(2, -24) - Math.pow(2, -77) : 0;\n var i3 = isLE3 ? 0 : nBytes - 1;\n var d5 = isLE3 ? 1 : -1;\n var s4 = value < 0 || value === 0 && 1 / value < 0 ? 1 : 0;\n value = Math.abs(value);\n if (isNaN(value) || value === Infinity) {\n m2 = isNaN(value) ? 1 : 0;\n e3 = eMax;\n } else {\n e3 = Math.floor(Math.log(value) / Math.LN2);\n if (value * (c4 = Math.pow(2, -e3)) < 1) {\n e3--;\n c4 *= 2;\n }\n if (e3 + eBias >= 1) {\n value += rt / c4;\n } else {\n value += rt * Math.pow(2, 1 - eBias);\n }\n if (value * c4 >= 2) {\n e3++;\n c4 /= 2;\n }\n if (e3 + eBias >= eMax) {\n m2 = 0;\n e3 = eMax;\n } else if (e3 + eBias >= 1) {\n m2 = (value * c4 - 1) * Math.pow(2, mLen);\n e3 = e3 + eBias;\n } else {\n m2 = value * Math.pow(2, eBias - 1) * Math.pow(2, mLen);\n e3 = 0;\n }\n }\n for (; mLen >= 8; buffer2[offset + i3] = m2 & 255, i3 += d5, m2 /= 256, mLen -= 8) {\n }\n e3 = e3 << mLen | m2;\n eLen += mLen;\n for (; eLen > 0; buffer2[offset + i3] = e3 & 255, i3 += d5, e3 /= 256, eLen -= 8) {\n }\n buffer2[offset + i3 - d5] |= s4 * 128;\n };\n return exports$1;\n }\n function dew() {\n if (_dewExec)\n return exports;\n _dewExec = true;\n const base64 = dew$2();\n const ieee754 = dew$1();\n const customInspectSymbol = typeof Symbol === \"function\" && typeof Symbol[\"for\"] === \"function\" ? Symbol[\"for\"](\"nodejs.util.inspect.custom\") : null;\n exports.Buffer = Buffer3;\n exports.SlowBuffer = SlowBuffer;\n exports.INSPECT_MAX_BYTES = 50;\n const K_MAX_LENGTH = 2147483647;\n exports.kMaxLength = K_MAX_LENGTH;\n Buffer3.TYPED_ARRAY_SUPPORT = typedArraySupport();\n if (!Buffer3.TYPED_ARRAY_SUPPORT && typeof console !== \"undefined\" && typeof console.error === \"function\") {\n console.error(\"This browser lacks typed array (Uint8Array) support which is required by `buffer` v5.x. Use `buffer` v4.x if you require old browser support.\");\n }\n function typedArraySupport() {\n try {\n const arr = new Uint8Array(1);\n const proto = {\n foo: function() {\n return 42;\n }\n };\n Object.setPrototypeOf(proto, Uint8Array.prototype);\n Object.setPrototypeOf(arr, proto);\n return arr.foo() === 42;\n } catch (e3) {\n return false;\n }\n }\n Object.defineProperty(Buffer3.prototype, \"parent\", {\n enumerable: true,\n get: function() {\n if (!Buffer3.isBuffer(this))\n return void 0;\n return this.buffer;\n }\n });\n Object.defineProperty(Buffer3.prototype, \"offset\", {\n enumerable: true,\n get: function() {\n if (!Buffer3.isBuffer(this))\n return void 0;\n return this.byteOffset;\n }\n });\n function createBuffer(length2) {\n if (length2 > K_MAX_LENGTH) {\n throw new RangeError('The value \"' + length2 + '\" is invalid for option \"size\"');\n }\n const buf = new Uint8Array(length2);\n Object.setPrototypeOf(buf, Buffer3.prototype);\n return buf;\n }\n function Buffer3(arg, encodingOrOffset, length2) {\n if (typeof arg === \"number\") {\n if (typeof encodingOrOffset === \"string\") {\n throw new TypeError('The \"string\" argument must be of type string. Received type number');\n }\n return allocUnsafe(arg);\n }\n return from14(arg, encodingOrOffset, length2);\n }\n Buffer3.poolSize = 8192;\n function from14(value, encodingOrOffset, length2) {\n if (typeof value === \"string\") {\n return fromString5(value, encodingOrOffset);\n }\n if (ArrayBuffer.isView(value)) {\n return fromArrayView(value);\n }\n if (value == null) {\n throw new TypeError(\"The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type \" + typeof value);\n }\n if (isInstance(value, ArrayBuffer) || value && isInstance(value.buffer, ArrayBuffer)) {\n return fromArrayBuffer(value, encodingOrOffset, length2);\n }\n if (typeof SharedArrayBuffer !== \"undefined\" && (isInstance(value, SharedArrayBuffer) || value && isInstance(value.buffer, SharedArrayBuffer))) {\n return fromArrayBuffer(value, encodingOrOffset, length2);\n }\n if (typeof value === \"number\") {\n throw new TypeError('The \"value\" argument must not be of type number. Received type number');\n }\n const valueOf = value.valueOf && value.valueOf();\n if (valueOf != null && valueOf !== value) {\n return Buffer3.from(valueOf, encodingOrOffset, length2);\n }\n const b4 = fromObject(value);\n if (b4)\n return b4;\n if (typeof Symbol !== \"undefined\" && Symbol.toPrimitive != null && typeof value[Symbol.toPrimitive] === \"function\") {\n return Buffer3.from(value[Symbol.toPrimitive](\"string\"), encodingOrOffset, length2);\n }\n throw new TypeError(\"The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type \" + typeof value);\n }\n Buffer3.from = function(value, encodingOrOffset, length2) {\n return from14(value, encodingOrOffset, length2);\n };\n Object.setPrototypeOf(Buffer3.prototype, Uint8Array.prototype);\n Object.setPrototypeOf(Buffer3, Uint8Array);\n function assertSize6(size6) {\n if (typeof size6 !== \"number\") {\n throw new TypeError('\"size\" argument must be of type number');\n } else if (size6 < 0) {\n throw new RangeError('The value \"' + size6 + '\" is invalid for option \"size\"');\n }\n }\n function alloc(size6, fill, encoding) {\n assertSize6(size6);\n if (size6 <= 0) {\n return createBuffer(size6);\n }\n if (fill !== void 0) {\n return typeof encoding === \"string\" ? createBuffer(size6).fill(fill, encoding) : createBuffer(size6).fill(fill);\n }\n return createBuffer(size6);\n }\n Buffer3.alloc = function(size6, fill, encoding) {\n return alloc(size6, fill, encoding);\n };\n function allocUnsafe(size6) {\n assertSize6(size6);\n return createBuffer(size6 < 0 ? 0 : checked(size6) | 0);\n }\n Buffer3.allocUnsafe = function(size6) {\n return allocUnsafe(size6);\n };\n Buffer3.allocUnsafeSlow = function(size6) {\n return allocUnsafe(size6);\n };\n function fromString5(string2, encoding) {\n if (typeof encoding !== \"string\" || encoding === \"\") {\n encoding = \"utf8\";\n }\n if (!Buffer3.isEncoding(encoding)) {\n throw new TypeError(\"Unknown encoding: \" + encoding);\n }\n const length2 = byteLength(string2, encoding) | 0;\n let buf = createBuffer(length2);\n const actual = buf.write(string2, encoding);\n if (actual !== length2) {\n buf = buf.slice(0, actual);\n }\n return buf;\n }\n function fromArrayLike(array2) {\n const length2 = array2.length < 0 ? 0 : checked(array2.length) | 0;\n const buf = createBuffer(length2);\n for (let i3 = 0; i3 < length2; i3 += 1) {\n buf[i3] = array2[i3] & 255;\n }\n return buf;\n }\n function fromArrayView(arrayView) {\n if (isInstance(arrayView, Uint8Array)) {\n const copy = new Uint8Array(arrayView);\n return fromArrayBuffer(copy.buffer, copy.byteOffset, copy.byteLength);\n }\n return fromArrayLike(arrayView);\n }\n function fromArrayBuffer(array2, byteOffset, length2) {\n if (byteOffset < 0 || array2.byteLength < byteOffset) {\n throw new RangeError('\"offset\" is outside of buffer bounds');\n }\n if (array2.byteLength < byteOffset + (length2 || 0)) {\n throw new RangeError('\"length\" is outside of buffer bounds');\n }\n let buf;\n if (byteOffset === void 0 && length2 === void 0) {\n buf = new Uint8Array(array2);\n } else if (length2 === void 0) {\n buf = new Uint8Array(array2, byteOffset);\n } else {\n buf = new Uint8Array(array2, byteOffset, length2);\n }\n Object.setPrototypeOf(buf, Buffer3.prototype);\n return buf;\n }\n function fromObject(obj) {\n if (Buffer3.isBuffer(obj)) {\n const len = checked(obj.length) | 0;\n const buf = createBuffer(len);\n if (buf.length === 0) {\n return buf;\n }\n obj.copy(buf, 0, 0, len);\n return buf;\n }\n if (obj.length !== void 0) {\n if (typeof obj.length !== \"number\" || numberIsNaN(obj.length)) {\n return createBuffer(0);\n }\n return fromArrayLike(obj);\n }\n if (obj.type === \"Buffer\" && Array.isArray(obj.data)) {\n return fromArrayLike(obj.data);\n }\n }\n function checked(length2) {\n if (length2 >= K_MAX_LENGTH) {\n throw new RangeError(\"Attempt to allocate Buffer larger than maximum size: 0x\" + K_MAX_LENGTH.toString(16) + \" bytes\");\n }\n return length2 | 0;\n }\n function SlowBuffer(length2) {\n if (+length2 != length2) {\n length2 = 0;\n }\n return Buffer3.alloc(+length2);\n }\n Buffer3.isBuffer = function isBuffer(b4) {\n return b4 != null && b4._isBuffer === true && b4 !== Buffer3.prototype;\n };\n Buffer3.compare = function compare(a3, b4) {\n if (isInstance(a3, Uint8Array))\n a3 = Buffer3.from(a3, a3.offset, a3.byteLength);\n if (isInstance(b4, Uint8Array))\n b4 = Buffer3.from(b4, b4.offset, b4.byteLength);\n if (!Buffer3.isBuffer(a3) || !Buffer3.isBuffer(b4)) {\n throw new TypeError('The \"buf1\", \"buf2\" arguments must be one of type Buffer or Uint8Array');\n }\n if (a3 === b4)\n return 0;\n let x4 = a3.length;\n let y6 = b4.length;\n for (let i3 = 0, len = Math.min(x4, y6); i3 < len; ++i3) {\n if (a3[i3] !== b4[i3]) {\n x4 = a3[i3];\n y6 = b4[i3];\n break;\n }\n }\n if (x4 < y6)\n return -1;\n if (y6 < x4)\n return 1;\n return 0;\n };\n Buffer3.isEncoding = function isEncoding(encoding) {\n switch (String(encoding).toLowerCase()) {\n case \"hex\":\n case \"utf8\":\n case \"utf-8\":\n case \"ascii\":\n case \"latin1\":\n case \"binary\":\n case \"base64\":\n case \"ucs2\":\n case \"ucs-2\":\n case \"utf16le\":\n case \"utf-16le\":\n return true;\n default:\n return false;\n }\n };\n Buffer3.concat = function concat5(list, length2) {\n if (!Array.isArray(list)) {\n throw new TypeError('\"list\" argument must be an Array of Buffers');\n }\n if (list.length === 0) {\n return Buffer3.alloc(0);\n }\n let i3;\n if (length2 === void 0) {\n length2 = 0;\n for (i3 = 0; i3 < list.length; ++i3) {\n length2 += list[i3].length;\n }\n }\n const buffer2 = Buffer3.allocUnsafe(length2);\n let pos = 0;\n for (i3 = 0; i3 < list.length; ++i3) {\n let buf = list[i3];\n if (isInstance(buf, Uint8Array)) {\n if (pos + buf.length > buffer2.length) {\n if (!Buffer3.isBuffer(buf))\n buf = Buffer3.from(buf);\n buf.copy(buffer2, pos);\n } else {\n Uint8Array.prototype.set.call(buffer2, buf, pos);\n }\n } else if (!Buffer3.isBuffer(buf)) {\n throw new TypeError('\"list\" argument must be an Array of Buffers');\n } else {\n buf.copy(buffer2, pos);\n }\n pos += buf.length;\n }\n return buffer2;\n };\n function byteLength(string2, encoding) {\n if (Buffer3.isBuffer(string2)) {\n return string2.length;\n }\n if (ArrayBuffer.isView(string2) || isInstance(string2, ArrayBuffer)) {\n return string2.byteLength;\n }\n if (typeof string2 !== \"string\") {\n throw new TypeError('The \"string\" argument must be one of type string, Buffer, or ArrayBuffer. Received type ' + typeof string2);\n }\n const len = string2.length;\n const mustMatch = arguments.length > 2 && arguments[2] === true;\n if (!mustMatch && len === 0)\n return 0;\n let loweredCase = false;\n for (; ; ) {\n switch (encoding) {\n case \"ascii\":\n case \"latin1\":\n case \"binary\":\n return len;\n case \"utf8\":\n case \"utf-8\":\n return utf8ToBytes3(string2).length;\n case \"ucs2\":\n case \"ucs-2\":\n case \"utf16le\":\n case \"utf-16le\":\n return len * 2;\n case \"hex\":\n return len >>> 1;\n case \"base64\":\n return base64ToBytes(string2).length;\n default:\n if (loweredCase) {\n return mustMatch ? -1 : utf8ToBytes3(string2).length;\n }\n encoding = (\"\" + encoding).toLowerCase();\n loweredCase = true;\n }\n }\n }\n Buffer3.byteLength = byteLength;\n function slowToString(encoding, start, end) {\n let loweredCase = false;\n if (start === void 0 || start < 0) {\n start = 0;\n }\n if (start > this.length) {\n return \"\";\n }\n if (end === void 0 || end > this.length) {\n end = this.length;\n }\n if (end <= 0) {\n return \"\";\n }\n end >>>= 0;\n start >>>= 0;\n if (end <= start) {\n return \"\";\n }\n if (!encoding)\n encoding = \"utf8\";\n while (true) {\n switch (encoding) {\n case \"hex\":\n return hexSlice(this, start, end);\n case \"utf8\":\n case \"utf-8\":\n return utf8Slice(this, start, end);\n case \"ascii\":\n return asciiSlice(this, start, end);\n case \"latin1\":\n case \"binary\":\n return latin1Slice(this, start, end);\n case \"base64\":\n return base64Slice(this, start, end);\n case \"ucs2\":\n case \"ucs-2\":\n case \"utf16le\":\n case \"utf-16le\":\n return utf16leSlice(this, start, end);\n default:\n if (loweredCase)\n throw new TypeError(\"Unknown encoding: \" + encoding);\n encoding = (encoding + \"\").toLowerCase();\n loweredCase = true;\n }\n }\n }\n Buffer3.prototype._isBuffer = true;\n function swap(b4, n2, m2) {\n const i3 = b4[n2];\n b4[n2] = b4[m2];\n b4[m2] = i3;\n }\n Buffer3.prototype.swap16 = function swap16() {\n const len = this.length;\n if (len % 2 !== 0) {\n throw new RangeError(\"Buffer size must be a multiple of 16-bits\");\n }\n for (let i3 = 0; i3 < len; i3 += 2) {\n swap(this, i3, i3 + 1);\n }\n return this;\n };\n Buffer3.prototype.swap32 = function swap32() {\n const len = this.length;\n if (len % 4 !== 0) {\n throw new RangeError(\"Buffer size must be a multiple of 32-bits\");\n }\n for (let i3 = 0; i3 < len; i3 += 4) {\n swap(this, i3, i3 + 3);\n swap(this, i3 + 1, i3 + 2);\n }\n return this;\n };\n Buffer3.prototype.swap64 = function swap64() {\n const len = this.length;\n if (len % 8 !== 0) {\n throw new RangeError(\"Buffer size must be a multiple of 64-bits\");\n }\n for (let i3 = 0; i3 < len; i3 += 8) {\n swap(this, i3, i3 + 7);\n swap(this, i3 + 1, i3 + 6);\n swap(this, i3 + 2, i3 + 5);\n swap(this, i3 + 3, i3 + 4);\n }\n return this;\n };\n Buffer3.prototype.toString = function toString2() {\n const length2 = this.length;\n if (length2 === 0)\n return \"\";\n if (arguments.length === 0)\n return utf8Slice(this, 0, length2);\n return slowToString.apply(this, arguments);\n };\n Buffer3.prototype.toLocaleString = Buffer3.prototype.toString;\n Buffer3.prototype.equals = function equals(b4) {\n if (!Buffer3.isBuffer(b4))\n throw new TypeError(\"Argument must be a Buffer\");\n if (this === b4)\n return true;\n return Buffer3.compare(this, b4) === 0;\n };\n Buffer3.prototype.inspect = function inspect() {\n let str = \"\";\n const max = exports.INSPECT_MAX_BYTES;\n str = this.toString(\"hex\", 0, max).replace(/(.{2})/g, \"$1 \").trim();\n if (this.length > max)\n str += \" ... \";\n return \"\";\n };\n if (customInspectSymbol) {\n Buffer3.prototype[customInspectSymbol] = Buffer3.prototype.inspect;\n }\n Buffer3.prototype.compare = function compare(target, start, end, thisStart, thisEnd) {\n if (isInstance(target, Uint8Array)) {\n target = Buffer3.from(target, target.offset, target.byteLength);\n }\n if (!Buffer3.isBuffer(target)) {\n throw new TypeError('The \"target\" argument must be one of type Buffer or Uint8Array. Received type ' + typeof target);\n }\n if (start === void 0) {\n start = 0;\n }\n if (end === void 0) {\n end = target ? target.length : 0;\n }\n if (thisStart === void 0) {\n thisStart = 0;\n }\n if (thisEnd === void 0) {\n thisEnd = this.length;\n }\n if (start < 0 || end > target.length || thisStart < 0 || thisEnd > this.length) {\n throw new RangeError(\"out of range index\");\n }\n if (thisStart >= thisEnd && start >= end) {\n return 0;\n }\n if (thisStart >= thisEnd) {\n return -1;\n }\n if (start >= end) {\n return 1;\n }\n start >>>= 0;\n end >>>= 0;\n thisStart >>>= 0;\n thisEnd >>>= 0;\n if (this === target)\n return 0;\n let x4 = thisEnd - thisStart;\n let y6 = end - start;\n const len = Math.min(x4, y6);\n const thisCopy = this.slice(thisStart, thisEnd);\n const targetCopy = target.slice(start, end);\n for (let i3 = 0; i3 < len; ++i3) {\n if (thisCopy[i3] !== targetCopy[i3]) {\n x4 = thisCopy[i3];\n y6 = targetCopy[i3];\n break;\n }\n }\n if (x4 < y6)\n return -1;\n if (y6 < x4)\n return 1;\n return 0;\n };\n function bidirectionalIndexOf(buffer2, val, byteOffset, encoding, dir) {\n if (buffer2.length === 0)\n return -1;\n if (typeof byteOffset === \"string\") {\n encoding = byteOffset;\n byteOffset = 0;\n } else if (byteOffset > 2147483647) {\n byteOffset = 2147483647;\n } else if (byteOffset < -2147483648) {\n byteOffset = -2147483648;\n }\n byteOffset = +byteOffset;\n if (numberIsNaN(byteOffset)) {\n byteOffset = dir ? 0 : buffer2.length - 1;\n }\n if (byteOffset < 0)\n byteOffset = buffer2.length + byteOffset;\n if (byteOffset >= buffer2.length) {\n if (dir)\n return -1;\n else\n byteOffset = buffer2.length - 1;\n } else if (byteOffset < 0) {\n if (dir)\n byteOffset = 0;\n else\n return -1;\n }\n if (typeof val === \"string\") {\n val = Buffer3.from(val, encoding);\n }\n if (Buffer3.isBuffer(val)) {\n if (val.length === 0) {\n return -1;\n }\n return arrayIndexOf(buffer2, val, byteOffset, encoding, dir);\n } else if (typeof val === \"number\") {\n val = val & 255;\n if (typeof Uint8Array.prototype.indexOf === \"function\") {\n if (dir) {\n return Uint8Array.prototype.indexOf.call(buffer2, val, byteOffset);\n } else {\n return Uint8Array.prototype.lastIndexOf.call(buffer2, val, byteOffset);\n }\n }\n return arrayIndexOf(buffer2, [val], byteOffset, encoding, dir);\n }\n throw new TypeError(\"val must be string, number or Buffer\");\n }\n function arrayIndexOf(arr, val, byteOffset, encoding, dir) {\n let indexSize = 1;\n let arrLength = arr.length;\n let valLength = val.length;\n if (encoding !== void 0) {\n encoding = String(encoding).toLowerCase();\n if (encoding === \"ucs2\" || encoding === \"ucs-2\" || encoding === \"utf16le\" || encoding === \"utf-16le\") {\n if (arr.length < 2 || val.length < 2) {\n return -1;\n }\n indexSize = 2;\n arrLength /= 2;\n valLength /= 2;\n byteOffset /= 2;\n }\n }\n function read(buf, i4) {\n if (indexSize === 1) {\n return buf[i4];\n } else {\n return buf.readUInt16BE(i4 * indexSize);\n }\n }\n let i3;\n if (dir) {\n let foundIndex = -1;\n for (i3 = byteOffset; i3 < arrLength; i3++) {\n if (read(arr, i3) === read(val, foundIndex === -1 ? 0 : i3 - foundIndex)) {\n if (foundIndex === -1)\n foundIndex = i3;\n if (i3 - foundIndex + 1 === valLength)\n return foundIndex * indexSize;\n } else {\n if (foundIndex !== -1)\n i3 -= i3 - foundIndex;\n foundIndex = -1;\n }\n }\n } else {\n if (byteOffset + valLength > arrLength)\n byteOffset = arrLength - valLength;\n for (i3 = byteOffset; i3 >= 0; i3--) {\n let found = true;\n for (let j2 = 0; j2 < valLength; j2++) {\n if (read(arr, i3 + j2) !== read(val, j2)) {\n found = false;\n break;\n }\n }\n if (found)\n return i3;\n }\n }\n return -1;\n }\n Buffer3.prototype.includes = function includes(val, byteOffset, encoding) {\n return this.indexOf(val, byteOffset, encoding) !== -1;\n };\n Buffer3.prototype.indexOf = function indexOf(val, byteOffset, encoding) {\n return bidirectionalIndexOf(this, val, byteOffset, encoding, true);\n };\n Buffer3.prototype.lastIndexOf = function lastIndexOf(val, byteOffset, encoding) {\n return bidirectionalIndexOf(this, val, byteOffset, encoding, false);\n };\n function hexWrite(buf, string2, offset, length2) {\n offset = Number(offset) || 0;\n const remaining = buf.length - offset;\n if (!length2) {\n length2 = remaining;\n } else {\n length2 = Number(length2);\n if (length2 > remaining) {\n length2 = remaining;\n }\n }\n const strLen = string2.length;\n if (length2 > strLen / 2) {\n length2 = strLen / 2;\n }\n let i3;\n for (i3 = 0; i3 < length2; ++i3) {\n const parsed = parseInt(string2.substr(i3 * 2, 2), 16);\n if (numberIsNaN(parsed))\n return i3;\n buf[offset + i3] = parsed;\n }\n return i3;\n }\n function utf8Write(buf, string2, offset, length2) {\n return blitBuffer(utf8ToBytes3(string2, buf.length - offset), buf, offset, length2);\n }\n function asciiWrite(buf, string2, offset, length2) {\n return blitBuffer(asciiToBytes(string2), buf, offset, length2);\n }\n function base64Write(buf, string2, offset, length2) {\n return blitBuffer(base64ToBytes(string2), buf, offset, length2);\n }\n function ucs2Write(buf, string2, offset, length2) {\n return blitBuffer(utf16leToBytes(string2, buf.length - offset), buf, offset, length2);\n }\n Buffer3.prototype.write = function write(string2, offset, length2, encoding) {\n if (offset === void 0) {\n encoding = \"utf8\";\n length2 = this.length;\n offset = 0;\n } else if (length2 === void 0 && typeof offset === \"string\") {\n encoding = offset;\n length2 = this.length;\n offset = 0;\n } else if (isFinite(offset)) {\n offset = offset >>> 0;\n if (isFinite(length2)) {\n length2 = length2 >>> 0;\n if (encoding === void 0)\n encoding = \"utf8\";\n } else {\n encoding = length2;\n length2 = void 0;\n }\n } else {\n throw new Error(\"Buffer.write(string, encoding, offset[, length]) is no longer supported\");\n }\n const remaining = this.length - offset;\n if (length2 === void 0 || length2 > remaining)\n length2 = remaining;\n if (string2.length > 0 && (length2 < 0 || offset < 0) || offset > this.length) {\n throw new RangeError(\"Attempt to write outside buffer bounds\");\n }\n if (!encoding)\n encoding = \"utf8\";\n let loweredCase = false;\n for (; ; ) {\n switch (encoding) {\n case \"hex\":\n return hexWrite(this, string2, offset, length2);\n case \"utf8\":\n case \"utf-8\":\n return utf8Write(this, string2, offset, length2);\n case \"ascii\":\n case \"latin1\":\n case \"binary\":\n return asciiWrite(this, string2, offset, length2);\n case \"base64\":\n return base64Write(this, string2, offset, length2);\n case \"ucs2\":\n case \"ucs-2\":\n case \"utf16le\":\n case \"utf-16le\":\n return ucs2Write(this, string2, offset, length2);\n default:\n if (loweredCase)\n throw new TypeError(\"Unknown encoding: \" + encoding);\n encoding = (\"\" + encoding).toLowerCase();\n loweredCase = true;\n }\n }\n };\n Buffer3.prototype.toJSON = function toJSON() {\n return {\n type: \"Buffer\",\n data: Array.prototype.slice.call(this._arr || this, 0)\n };\n };\n function base64Slice(buf, start, end) {\n if (start === 0 && end === buf.length) {\n return base64.fromByteArray(buf);\n } else {\n return base64.fromByteArray(buf.slice(start, end));\n }\n }\n function utf8Slice(buf, start, end) {\n end = Math.min(buf.length, end);\n const res = [];\n let i3 = start;\n while (i3 < end) {\n const firstByte = buf[i3];\n let codePoint = null;\n let bytesPerSequence = firstByte > 239 ? 4 : firstByte > 223 ? 3 : firstByte > 191 ? 2 : 1;\n if (i3 + bytesPerSequence <= end) {\n let secondByte, thirdByte, fourthByte, tempCodePoint;\n switch (bytesPerSequence) {\n case 1:\n if (firstByte < 128) {\n codePoint = firstByte;\n }\n break;\n case 2:\n secondByte = buf[i3 + 1];\n if ((secondByte & 192) === 128) {\n tempCodePoint = (firstByte & 31) << 6 | secondByte & 63;\n if (tempCodePoint > 127) {\n codePoint = tempCodePoint;\n }\n }\n break;\n case 3:\n secondByte = buf[i3 + 1];\n thirdByte = buf[i3 + 2];\n if ((secondByte & 192) === 128 && (thirdByte & 192) === 128) {\n tempCodePoint = (firstByte & 15) << 12 | (secondByte & 63) << 6 | thirdByte & 63;\n if (tempCodePoint > 2047 && (tempCodePoint < 55296 || tempCodePoint > 57343)) {\n codePoint = tempCodePoint;\n }\n }\n break;\n case 4:\n secondByte = buf[i3 + 1];\n thirdByte = buf[i3 + 2];\n fourthByte = buf[i3 + 3];\n if ((secondByte & 192) === 128 && (thirdByte & 192) === 128 && (fourthByte & 192) === 128) {\n tempCodePoint = (firstByte & 15) << 18 | (secondByte & 63) << 12 | (thirdByte & 63) << 6 | fourthByte & 63;\n if (tempCodePoint > 65535 && tempCodePoint < 1114112) {\n codePoint = tempCodePoint;\n }\n }\n }\n }\n if (codePoint === null) {\n codePoint = 65533;\n bytesPerSequence = 1;\n } else if (codePoint > 65535) {\n codePoint -= 65536;\n res.push(codePoint >>> 10 & 1023 | 55296);\n codePoint = 56320 | codePoint & 1023;\n }\n res.push(codePoint);\n i3 += bytesPerSequence;\n }\n return decodeCodePointsArray(res);\n }\n const MAX_ARGUMENTS_LENGTH = 4096;\n function decodeCodePointsArray(codePoints) {\n const len = codePoints.length;\n if (len <= MAX_ARGUMENTS_LENGTH) {\n return String.fromCharCode.apply(String, codePoints);\n }\n let res = \"\";\n let i3 = 0;\n while (i3 < len) {\n res += String.fromCharCode.apply(String, codePoints.slice(i3, i3 += MAX_ARGUMENTS_LENGTH));\n }\n return res;\n }\n function asciiSlice(buf, start, end) {\n let ret = \"\";\n end = Math.min(buf.length, end);\n for (let i3 = start; i3 < end; ++i3) {\n ret += String.fromCharCode(buf[i3] & 127);\n }\n return ret;\n }\n function latin1Slice(buf, start, end) {\n let ret = \"\";\n end = Math.min(buf.length, end);\n for (let i3 = start; i3 < end; ++i3) {\n ret += String.fromCharCode(buf[i3]);\n }\n return ret;\n }\n function hexSlice(buf, start, end) {\n const len = buf.length;\n if (!start || start < 0)\n start = 0;\n if (!end || end < 0 || end > len)\n end = len;\n let out = \"\";\n for (let i3 = start; i3 < end; ++i3) {\n out += hexSliceLookupTable[buf[i3]];\n }\n return out;\n }\n function utf16leSlice(buf, start, end) {\n const bytes = buf.slice(start, end);\n let res = \"\";\n for (let i3 = 0; i3 < bytes.length - 1; i3 += 2) {\n res += String.fromCharCode(bytes[i3] + bytes[i3 + 1] * 256);\n }\n return res;\n }\n Buffer3.prototype.slice = function slice4(start, end) {\n const len = this.length;\n start = ~~start;\n end = end === void 0 ? len : ~~end;\n if (start < 0) {\n start += len;\n if (start < 0)\n start = 0;\n } else if (start > len) {\n start = len;\n }\n if (end < 0) {\n end += len;\n if (end < 0)\n end = 0;\n } else if (end > len) {\n end = len;\n }\n if (end < start)\n end = start;\n const newBuf = this.subarray(start, end);\n Object.setPrototypeOf(newBuf, Buffer3.prototype);\n return newBuf;\n };\n function checkOffset(offset, ext, length2) {\n if (offset % 1 !== 0 || offset < 0)\n throw new RangeError(\"offset is not uint\");\n if (offset + ext > length2)\n throw new RangeError(\"Trying to access beyond buffer length\");\n }\n Buffer3.prototype.readUintLE = Buffer3.prototype.readUIntLE = function readUIntLE(offset, byteLength2, noAssert) {\n offset = offset >>> 0;\n byteLength2 = byteLength2 >>> 0;\n if (!noAssert)\n checkOffset(offset, byteLength2, this.length);\n let val = this[offset];\n let mul = 1;\n let i3 = 0;\n while (++i3 < byteLength2 && (mul *= 256)) {\n val += this[offset + i3] * mul;\n }\n return val;\n };\n Buffer3.prototype.readUintBE = Buffer3.prototype.readUIntBE = function readUIntBE(offset, byteLength2, noAssert) {\n offset = offset >>> 0;\n byteLength2 = byteLength2 >>> 0;\n if (!noAssert) {\n checkOffset(offset, byteLength2, this.length);\n }\n let val = this[offset + --byteLength2];\n let mul = 1;\n while (byteLength2 > 0 && (mul *= 256)) {\n val += this[offset + --byteLength2] * mul;\n }\n return val;\n };\n Buffer3.prototype.readUint8 = Buffer3.prototype.readUInt8 = function readUInt8(offset, noAssert) {\n offset = offset >>> 0;\n if (!noAssert)\n checkOffset(offset, 1, this.length);\n return this[offset];\n };\n Buffer3.prototype.readUint16LE = Buffer3.prototype.readUInt16LE = function readUInt16LE(offset, noAssert) {\n offset = offset >>> 0;\n if (!noAssert)\n checkOffset(offset, 2, this.length);\n return this[offset] | this[offset + 1] << 8;\n };\n Buffer3.prototype.readUint16BE = Buffer3.prototype.readUInt16BE = function readUInt16BE(offset, noAssert) {\n offset = offset >>> 0;\n if (!noAssert)\n checkOffset(offset, 2, this.length);\n return this[offset] << 8 | this[offset + 1];\n };\n Buffer3.prototype.readUint32LE = Buffer3.prototype.readUInt32LE = function readUInt32LE(offset, noAssert) {\n offset = offset >>> 0;\n if (!noAssert)\n checkOffset(offset, 4, this.length);\n return (this[offset] | this[offset + 1] << 8 | this[offset + 2] << 16) + this[offset + 3] * 16777216;\n };\n Buffer3.prototype.readUint32BE = Buffer3.prototype.readUInt32BE = function readUInt32BE(offset, noAssert) {\n offset = offset >>> 0;\n if (!noAssert)\n checkOffset(offset, 4, this.length);\n return this[offset] * 16777216 + (this[offset + 1] << 16 | this[offset + 2] << 8 | this[offset + 3]);\n };\n Buffer3.prototype.readBigUInt64LE = defineBigIntMethod(function readBigUInt64LE(offset) {\n offset = offset >>> 0;\n validateNumber(offset, \"offset\");\n const first = this[offset];\n const last = this[offset + 7];\n if (first === void 0 || last === void 0) {\n boundsError(offset, this.length - 8);\n }\n const lo = first + this[++offset] * 2 ** 8 + this[++offset] * 2 ** 16 + this[++offset] * 2 ** 24;\n const hi = this[++offset] + this[++offset] * 2 ** 8 + this[++offset] * 2 ** 16 + last * 2 ** 24;\n return BigInt(lo) + (BigInt(hi) << BigInt(32));\n });\n Buffer3.prototype.readBigUInt64BE = defineBigIntMethod(function readBigUInt64BE(offset) {\n offset = offset >>> 0;\n validateNumber(offset, \"offset\");\n const first = this[offset];\n const last = this[offset + 7];\n if (first === void 0 || last === void 0) {\n boundsError(offset, this.length - 8);\n }\n const hi = first * 2 ** 24 + this[++offset] * 2 ** 16 + this[++offset] * 2 ** 8 + this[++offset];\n const lo = this[++offset] * 2 ** 24 + this[++offset] * 2 ** 16 + this[++offset] * 2 ** 8 + last;\n return (BigInt(hi) << BigInt(32)) + BigInt(lo);\n });\n Buffer3.prototype.readIntLE = function readIntLE(offset, byteLength2, noAssert) {\n offset = offset >>> 0;\n byteLength2 = byteLength2 >>> 0;\n if (!noAssert)\n checkOffset(offset, byteLength2, this.length);\n let val = this[offset];\n let mul = 1;\n let i3 = 0;\n while (++i3 < byteLength2 && (mul *= 256)) {\n val += this[offset + i3] * mul;\n }\n mul *= 128;\n if (val >= mul)\n val -= Math.pow(2, 8 * byteLength2);\n return val;\n };\n Buffer3.prototype.readIntBE = function readIntBE(offset, byteLength2, noAssert) {\n offset = offset >>> 0;\n byteLength2 = byteLength2 >>> 0;\n if (!noAssert)\n checkOffset(offset, byteLength2, this.length);\n let i3 = byteLength2;\n let mul = 1;\n let val = this[offset + --i3];\n while (i3 > 0 && (mul *= 256)) {\n val += this[offset + --i3] * mul;\n }\n mul *= 128;\n if (val >= mul)\n val -= Math.pow(2, 8 * byteLength2);\n return val;\n };\n Buffer3.prototype.readInt8 = function readInt8(offset, noAssert) {\n offset = offset >>> 0;\n if (!noAssert)\n checkOffset(offset, 1, this.length);\n if (!(this[offset] & 128))\n return this[offset];\n return (255 - this[offset] + 1) * -1;\n };\n Buffer3.prototype.readInt16LE = function readInt16LE(offset, noAssert) {\n offset = offset >>> 0;\n if (!noAssert)\n checkOffset(offset, 2, this.length);\n const val = this[offset] | this[offset + 1] << 8;\n return val & 32768 ? val | 4294901760 : val;\n };\n Buffer3.prototype.readInt16BE = function readInt16BE(offset, noAssert) {\n offset = offset >>> 0;\n if (!noAssert)\n checkOffset(offset, 2, this.length);\n const val = this[offset + 1] | this[offset] << 8;\n return val & 32768 ? val | 4294901760 : val;\n };\n Buffer3.prototype.readInt32LE = function readInt32LE(offset, noAssert) {\n offset = offset >>> 0;\n if (!noAssert)\n checkOffset(offset, 4, this.length);\n return this[offset] | this[offset + 1] << 8 | this[offset + 2] << 16 | this[offset + 3] << 24;\n };\n Buffer3.prototype.readInt32BE = function readInt32BE(offset, noAssert) {\n offset = offset >>> 0;\n if (!noAssert)\n checkOffset(offset, 4, this.length);\n return this[offset] << 24 | this[offset + 1] << 16 | this[offset + 2] << 8 | this[offset + 3];\n };\n Buffer3.prototype.readBigInt64LE = defineBigIntMethod(function readBigInt64LE(offset) {\n offset = offset >>> 0;\n validateNumber(offset, \"offset\");\n const first = this[offset];\n const last = this[offset + 7];\n if (first === void 0 || last === void 0) {\n boundsError(offset, this.length - 8);\n }\n const val = this[offset + 4] + this[offset + 5] * 2 ** 8 + this[offset + 6] * 2 ** 16 + (last << 24);\n return (BigInt(val) << BigInt(32)) + BigInt(first + this[++offset] * 2 ** 8 + this[++offset] * 2 ** 16 + this[++offset] * 2 ** 24);\n });\n Buffer3.prototype.readBigInt64BE = defineBigIntMethod(function readBigInt64BE(offset) {\n offset = offset >>> 0;\n validateNumber(offset, \"offset\");\n const first = this[offset];\n const last = this[offset + 7];\n if (first === void 0 || last === void 0) {\n boundsError(offset, this.length - 8);\n }\n const val = (first << 24) + // Overflow\n this[++offset] * 2 ** 16 + this[++offset] * 2 ** 8 + this[++offset];\n return (BigInt(val) << BigInt(32)) + BigInt(this[++offset] * 2 ** 24 + this[++offset] * 2 ** 16 + this[++offset] * 2 ** 8 + last);\n });\n Buffer3.prototype.readFloatLE = function readFloatLE(offset, noAssert) {\n offset = offset >>> 0;\n if (!noAssert)\n checkOffset(offset, 4, this.length);\n return ieee754.read(this, offset, true, 23, 4);\n };\n Buffer3.prototype.readFloatBE = function readFloatBE(offset, noAssert) {\n offset = offset >>> 0;\n if (!noAssert)\n checkOffset(offset, 4, this.length);\n return ieee754.read(this, offset, false, 23, 4);\n };\n Buffer3.prototype.readDoubleLE = function readDoubleLE(offset, noAssert) {\n offset = offset >>> 0;\n if (!noAssert)\n checkOffset(offset, 8, this.length);\n return ieee754.read(this, offset, true, 52, 8);\n };\n Buffer3.prototype.readDoubleBE = function readDoubleBE(offset, noAssert) {\n offset = offset >>> 0;\n if (!noAssert)\n checkOffset(offset, 8, this.length);\n return ieee754.read(this, offset, false, 52, 8);\n };\n function checkInt(buf, value, offset, ext, max, min) {\n if (!Buffer3.isBuffer(buf))\n throw new TypeError('\"buffer\" argument must be a Buffer instance');\n if (value > max || value < min)\n throw new RangeError('\"value\" argument is out of bounds');\n if (offset + ext > buf.length)\n throw new RangeError(\"Index out of range\");\n }\n Buffer3.prototype.writeUintLE = Buffer3.prototype.writeUIntLE = function writeUIntLE(value, offset, byteLength2, noAssert) {\n value = +value;\n offset = offset >>> 0;\n byteLength2 = byteLength2 >>> 0;\n if (!noAssert) {\n const maxBytes = Math.pow(2, 8 * byteLength2) - 1;\n checkInt(this, value, offset, byteLength2, maxBytes, 0);\n }\n let mul = 1;\n let i3 = 0;\n this[offset] = value & 255;\n while (++i3 < byteLength2 && (mul *= 256)) {\n this[offset + i3] = value / mul & 255;\n }\n return offset + byteLength2;\n };\n Buffer3.prototype.writeUintBE = Buffer3.prototype.writeUIntBE = function writeUIntBE(value, offset, byteLength2, noAssert) {\n value = +value;\n offset = offset >>> 0;\n byteLength2 = byteLength2 >>> 0;\n if (!noAssert) {\n const maxBytes = Math.pow(2, 8 * byteLength2) - 1;\n checkInt(this, value, offset, byteLength2, maxBytes, 0);\n }\n let i3 = byteLength2 - 1;\n let mul = 1;\n this[offset + i3] = value & 255;\n while (--i3 >= 0 && (mul *= 256)) {\n this[offset + i3] = value / mul & 255;\n }\n return offset + byteLength2;\n };\n Buffer3.prototype.writeUint8 = Buffer3.prototype.writeUInt8 = function writeUInt8(value, offset, noAssert) {\n value = +value;\n offset = offset >>> 0;\n if (!noAssert)\n checkInt(this, value, offset, 1, 255, 0);\n this[offset] = value & 255;\n return offset + 1;\n };\n Buffer3.prototype.writeUint16LE = Buffer3.prototype.writeUInt16LE = function writeUInt16LE(value, offset, noAssert) {\n value = +value;\n offset = offset >>> 0;\n if (!noAssert)\n checkInt(this, value, offset, 2, 65535, 0);\n this[offset] = value & 255;\n this[offset + 1] = value >>> 8;\n return offset + 2;\n };\n Buffer3.prototype.writeUint16BE = Buffer3.prototype.writeUInt16BE = function writeUInt16BE(value, offset, noAssert) {\n value = +value;\n offset = offset >>> 0;\n if (!noAssert)\n checkInt(this, value, offset, 2, 65535, 0);\n this[offset] = value >>> 8;\n this[offset + 1] = value & 255;\n return offset + 2;\n };\n Buffer3.prototype.writeUint32LE = Buffer3.prototype.writeUInt32LE = function writeUInt32LE(value, offset, noAssert) {\n value = +value;\n offset = offset >>> 0;\n if (!noAssert)\n checkInt(this, value, offset, 4, 4294967295, 0);\n this[offset + 3] = value >>> 24;\n this[offset + 2] = value >>> 16;\n this[offset + 1] = value >>> 8;\n this[offset] = value & 255;\n return offset + 4;\n };\n Buffer3.prototype.writeUint32BE = Buffer3.prototype.writeUInt32BE = function writeUInt32BE(value, offset, noAssert) {\n value = +value;\n offset = offset >>> 0;\n if (!noAssert)\n checkInt(this, value, offset, 4, 4294967295, 0);\n this[offset] = value >>> 24;\n this[offset + 1] = value >>> 16;\n this[offset + 2] = value >>> 8;\n this[offset + 3] = value & 255;\n return offset + 4;\n };\n function wrtBigUInt64LE(buf, value, offset, min, max) {\n checkIntBI(value, min, max, buf, offset, 7);\n let lo = Number(value & BigInt(4294967295));\n buf[offset++] = lo;\n lo = lo >> 8;\n buf[offset++] = lo;\n lo = lo >> 8;\n buf[offset++] = lo;\n lo = lo >> 8;\n buf[offset++] = lo;\n let hi = Number(value >> BigInt(32) & BigInt(4294967295));\n buf[offset++] = hi;\n hi = hi >> 8;\n buf[offset++] = hi;\n hi = hi >> 8;\n buf[offset++] = hi;\n hi = hi >> 8;\n buf[offset++] = hi;\n return offset;\n }\n function wrtBigUInt64BE(buf, value, offset, min, max) {\n checkIntBI(value, min, max, buf, offset, 7);\n let lo = Number(value & BigInt(4294967295));\n buf[offset + 7] = lo;\n lo = lo >> 8;\n buf[offset + 6] = lo;\n lo = lo >> 8;\n buf[offset + 5] = lo;\n lo = lo >> 8;\n buf[offset + 4] = lo;\n let hi = Number(value >> BigInt(32) & BigInt(4294967295));\n buf[offset + 3] = hi;\n hi = hi >> 8;\n buf[offset + 2] = hi;\n hi = hi >> 8;\n buf[offset + 1] = hi;\n hi = hi >> 8;\n buf[offset] = hi;\n return offset + 8;\n }\n Buffer3.prototype.writeBigUInt64LE = defineBigIntMethod(function writeBigUInt64LE(value, offset = 0) {\n return wrtBigUInt64LE(this, value, offset, BigInt(0), BigInt(\"0xffffffffffffffff\"));\n });\n Buffer3.prototype.writeBigUInt64BE = defineBigIntMethod(function writeBigUInt64BE(value, offset = 0) {\n return wrtBigUInt64BE(this, value, offset, BigInt(0), BigInt(\"0xffffffffffffffff\"));\n });\n Buffer3.prototype.writeIntLE = function writeIntLE(value, offset, byteLength2, noAssert) {\n value = +value;\n offset = offset >>> 0;\n if (!noAssert) {\n const limit = Math.pow(2, 8 * byteLength2 - 1);\n checkInt(this, value, offset, byteLength2, limit - 1, -limit);\n }\n let i3 = 0;\n let mul = 1;\n let sub = 0;\n this[offset] = value & 255;\n while (++i3 < byteLength2 && (mul *= 256)) {\n if (value < 0 && sub === 0 && this[offset + i3 - 1] !== 0) {\n sub = 1;\n }\n this[offset + i3] = (value / mul >> 0) - sub & 255;\n }\n return offset + byteLength2;\n };\n Buffer3.prototype.writeIntBE = function writeIntBE(value, offset, byteLength2, noAssert) {\n value = +value;\n offset = offset >>> 0;\n if (!noAssert) {\n const limit = Math.pow(2, 8 * byteLength2 - 1);\n checkInt(this, value, offset, byteLength2, limit - 1, -limit);\n }\n let i3 = byteLength2 - 1;\n let mul = 1;\n let sub = 0;\n this[offset + i3] = value & 255;\n while (--i3 >= 0 && (mul *= 256)) {\n if (value < 0 && sub === 0 && this[offset + i3 + 1] !== 0) {\n sub = 1;\n }\n this[offset + i3] = (value / mul >> 0) - sub & 255;\n }\n return offset + byteLength2;\n };\n Buffer3.prototype.writeInt8 = function writeInt8(value, offset, noAssert) {\n value = +value;\n offset = offset >>> 0;\n if (!noAssert)\n checkInt(this, value, offset, 1, 127, -128);\n if (value < 0)\n value = 255 + value + 1;\n this[offset] = value & 255;\n return offset + 1;\n };\n Buffer3.prototype.writeInt16LE = function writeInt16LE(value, offset, noAssert) {\n value = +value;\n offset = offset >>> 0;\n if (!noAssert)\n checkInt(this, value, offset, 2, 32767, -32768);\n this[offset] = value & 255;\n this[offset + 1] = value >>> 8;\n return offset + 2;\n };\n Buffer3.prototype.writeInt16BE = function writeInt16BE(value, offset, noAssert) {\n value = +value;\n offset = offset >>> 0;\n if (!noAssert)\n checkInt(this, value, offset, 2, 32767, -32768);\n this[offset] = value >>> 8;\n this[offset + 1] = value & 255;\n return offset + 2;\n };\n Buffer3.prototype.writeInt32LE = function writeInt32LE(value, offset, noAssert) {\n value = +value;\n offset = offset >>> 0;\n if (!noAssert)\n checkInt(this, value, offset, 4, 2147483647, -2147483648);\n this[offset] = value & 255;\n this[offset + 1] = value >>> 8;\n this[offset + 2] = value >>> 16;\n this[offset + 3] = value >>> 24;\n return offset + 4;\n };\n Buffer3.prototype.writeInt32BE = function writeInt32BE(value, offset, noAssert) {\n value = +value;\n offset = offset >>> 0;\n if (!noAssert)\n checkInt(this, value, offset, 4, 2147483647, -2147483648);\n if (value < 0)\n value = 4294967295 + value + 1;\n this[offset] = value >>> 24;\n this[offset + 1] = value >>> 16;\n this[offset + 2] = value >>> 8;\n this[offset + 3] = value & 255;\n return offset + 4;\n };\n Buffer3.prototype.writeBigInt64LE = defineBigIntMethod(function writeBigInt64LE(value, offset = 0) {\n return wrtBigUInt64LE(this, value, offset, -BigInt(\"0x8000000000000000\"), BigInt(\"0x7fffffffffffffff\"));\n });\n Buffer3.prototype.writeBigInt64BE = defineBigIntMethod(function writeBigInt64BE(value, offset = 0) {\n return wrtBigUInt64BE(this, value, offset, -BigInt(\"0x8000000000000000\"), BigInt(\"0x7fffffffffffffff\"));\n });\n function checkIEEE754(buf, value, offset, ext, max, min) {\n if (offset + ext > buf.length)\n throw new RangeError(\"Index out of range\");\n if (offset < 0)\n throw new RangeError(\"Index out of range\");\n }\n function writeFloat(buf, value, offset, littleEndian, noAssert) {\n value = +value;\n offset = offset >>> 0;\n if (!noAssert) {\n checkIEEE754(buf, value, offset, 4);\n }\n ieee754.write(buf, value, offset, littleEndian, 23, 4);\n return offset + 4;\n }\n Buffer3.prototype.writeFloatLE = function writeFloatLE(value, offset, noAssert) {\n return writeFloat(this, value, offset, true, noAssert);\n };\n Buffer3.prototype.writeFloatBE = function writeFloatBE(value, offset, noAssert) {\n return writeFloat(this, value, offset, false, noAssert);\n };\n function writeDouble(buf, value, offset, littleEndian, noAssert) {\n value = +value;\n offset = offset >>> 0;\n if (!noAssert) {\n checkIEEE754(buf, value, offset, 8);\n }\n ieee754.write(buf, value, offset, littleEndian, 52, 8);\n return offset + 8;\n }\n Buffer3.prototype.writeDoubleLE = function writeDoubleLE(value, offset, noAssert) {\n return writeDouble(this, value, offset, true, noAssert);\n };\n Buffer3.prototype.writeDoubleBE = function writeDoubleBE(value, offset, noAssert) {\n return writeDouble(this, value, offset, false, noAssert);\n };\n Buffer3.prototype.copy = function copy(target, targetStart, start, end) {\n if (!Buffer3.isBuffer(target))\n throw new TypeError(\"argument should be a Buffer\");\n if (!start)\n start = 0;\n if (!end && end !== 0)\n end = this.length;\n if (targetStart >= target.length)\n targetStart = target.length;\n if (!targetStart)\n targetStart = 0;\n if (end > 0 && end < start)\n end = start;\n if (end === start)\n return 0;\n if (target.length === 0 || this.length === 0)\n return 0;\n if (targetStart < 0) {\n throw new RangeError(\"targetStart out of bounds\");\n }\n if (start < 0 || start >= this.length)\n throw new RangeError(\"Index out of range\");\n if (end < 0)\n throw new RangeError(\"sourceEnd out of bounds\");\n if (end > this.length)\n end = this.length;\n if (target.length - targetStart < end - start) {\n end = target.length - targetStart + start;\n }\n const len = end - start;\n if (this === target && typeof Uint8Array.prototype.copyWithin === \"function\") {\n this.copyWithin(targetStart, start, end);\n } else {\n Uint8Array.prototype.set.call(target, this.subarray(start, end), targetStart);\n }\n return len;\n };\n Buffer3.prototype.fill = function fill(val, start, end, encoding) {\n if (typeof val === \"string\") {\n if (typeof start === \"string\") {\n encoding = start;\n start = 0;\n end = this.length;\n } else if (typeof end === \"string\") {\n encoding = end;\n end = this.length;\n }\n if (encoding !== void 0 && typeof encoding !== \"string\") {\n throw new TypeError(\"encoding must be a string\");\n }\n if (typeof encoding === \"string\" && !Buffer3.isEncoding(encoding)) {\n throw new TypeError(\"Unknown encoding: \" + encoding);\n }\n if (val.length === 1) {\n const code = val.charCodeAt(0);\n if (encoding === \"utf8\" && code < 128 || encoding === \"latin1\") {\n val = code;\n }\n }\n } else if (typeof val === \"number\") {\n val = val & 255;\n } else if (typeof val === \"boolean\") {\n val = Number(val);\n }\n if (start < 0 || this.length < start || this.length < end) {\n throw new RangeError(\"Out of range index\");\n }\n if (end <= start) {\n return this;\n }\n start = start >>> 0;\n end = end === void 0 ? this.length : end >>> 0;\n if (!val)\n val = 0;\n let i3;\n if (typeof val === \"number\") {\n for (i3 = start; i3 < end; ++i3) {\n this[i3] = val;\n }\n } else {\n const bytes = Buffer3.isBuffer(val) ? val : Buffer3.from(val, encoding);\n const len = bytes.length;\n if (len === 0) {\n throw new TypeError('The value \"' + val + '\" is invalid for argument \"value\"');\n }\n for (i3 = 0; i3 < end - start; ++i3) {\n this[i3 + start] = bytes[i3 % len];\n }\n }\n return this;\n };\n const errors = {};\n function E2(sym, getMessage, Base) {\n errors[sym] = class NodeError extends Base {\n constructor() {\n super();\n Object.defineProperty(this, \"message\", {\n value: getMessage.apply(this, arguments),\n writable: true,\n configurable: true\n });\n this.name = `${this.name} [${sym}]`;\n this.stack;\n delete this.name;\n }\n get code() {\n return sym;\n }\n set code(value) {\n Object.defineProperty(this, \"code\", {\n configurable: true,\n enumerable: true,\n value,\n writable: true\n });\n }\n toString() {\n return `${this.name} [${sym}]: ${this.message}`;\n }\n };\n }\n E2(\"ERR_BUFFER_OUT_OF_BOUNDS\", function(name) {\n if (name) {\n return `${name} is outside of buffer bounds`;\n }\n return \"Attempt to access memory outside buffer bounds\";\n }, RangeError);\n E2(\"ERR_INVALID_ARG_TYPE\", function(name, actual) {\n return `The \"${name}\" argument must be of type number. Received type ${typeof actual}`;\n }, TypeError);\n E2(\"ERR_OUT_OF_RANGE\", function(str, range, input) {\n let msg = `The value of \"${str}\" is out of range.`;\n let received = input;\n if (Number.isInteger(input) && Math.abs(input) > 2 ** 32) {\n received = addNumericalSeparator(String(input));\n } else if (typeof input === \"bigint\") {\n received = String(input);\n if (input > BigInt(2) ** BigInt(32) || input < -(BigInt(2) ** BigInt(32))) {\n received = addNumericalSeparator(received);\n }\n received += \"n\";\n }\n msg += ` It must be ${range}. Received ${received}`;\n return msg;\n }, RangeError);\n function addNumericalSeparator(val) {\n let res = \"\";\n let i3 = val.length;\n const start = val[0] === \"-\" ? 1 : 0;\n for (; i3 >= start + 4; i3 -= 3) {\n res = `_${val.slice(i3 - 3, i3)}${res}`;\n }\n return `${val.slice(0, i3)}${res}`;\n }\n function checkBounds(buf, offset, byteLength2) {\n validateNumber(offset, \"offset\");\n if (buf[offset] === void 0 || buf[offset + byteLength2] === void 0) {\n boundsError(offset, buf.length - (byteLength2 + 1));\n }\n }\n function checkIntBI(value, min, max, buf, offset, byteLength2) {\n if (value > max || value < min) {\n const n2 = typeof min === \"bigint\" ? \"n\" : \"\";\n let range;\n {\n if (min === 0 || min === BigInt(0)) {\n range = `>= 0${n2} and < 2${n2} ** ${(byteLength2 + 1) * 8}${n2}`;\n } else {\n range = `>= -(2${n2} ** ${(byteLength2 + 1) * 8 - 1}${n2}) and < 2 ** ${(byteLength2 + 1) * 8 - 1}${n2}`;\n }\n }\n throw new errors.ERR_OUT_OF_RANGE(\"value\", range, value);\n }\n checkBounds(buf, offset, byteLength2);\n }\n function validateNumber(value, name) {\n if (typeof value !== \"number\") {\n throw new errors.ERR_INVALID_ARG_TYPE(name, \"number\", value);\n }\n }\n function boundsError(value, length2, type) {\n if (Math.floor(value) !== value) {\n validateNumber(value, type);\n throw new errors.ERR_OUT_OF_RANGE(\"offset\", \"an integer\", value);\n }\n if (length2 < 0) {\n throw new errors.ERR_BUFFER_OUT_OF_BOUNDS();\n }\n throw new errors.ERR_OUT_OF_RANGE(\"offset\", `>= ${0} and <= ${length2}`, value);\n }\n const INVALID_BASE64_RE = /[^+/0-9A-Za-z-_]/g;\n function base64clean(str) {\n str = str.split(\"=\")[0];\n str = str.trim().replace(INVALID_BASE64_RE, \"\");\n if (str.length < 2)\n return \"\";\n while (str.length % 4 !== 0) {\n str = str + \"=\";\n }\n return str;\n }\n function utf8ToBytes3(string2, units) {\n units = units || Infinity;\n let codePoint;\n const length2 = string2.length;\n let leadSurrogate = null;\n const bytes = [];\n for (let i3 = 0; i3 < length2; ++i3) {\n codePoint = string2.charCodeAt(i3);\n if (codePoint > 55295 && codePoint < 57344) {\n if (!leadSurrogate) {\n if (codePoint > 56319) {\n if ((units -= 3) > -1)\n bytes.push(239, 191, 189);\n continue;\n } else if (i3 + 1 === length2) {\n if ((units -= 3) > -1)\n bytes.push(239, 191, 189);\n continue;\n }\n leadSurrogate = codePoint;\n continue;\n }\n if (codePoint < 56320) {\n if ((units -= 3) > -1)\n bytes.push(239, 191, 189);\n leadSurrogate = codePoint;\n continue;\n }\n codePoint = (leadSurrogate - 55296 << 10 | codePoint - 56320) + 65536;\n } else if (leadSurrogate) {\n if ((units -= 3) > -1)\n bytes.push(239, 191, 189);\n }\n leadSurrogate = null;\n if (codePoint < 128) {\n if ((units -= 1) < 0)\n break;\n bytes.push(codePoint);\n } else if (codePoint < 2048) {\n if ((units -= 2) < 0)\n break;\n bytes.push(codePoint >> 6 | 192, codePoint & 63 | 128);\n } else if (codePoint < 65536) {\n if ((units -= 3) < 0)\n break;\n bytes.push(codePoint >> 12 | 224, codePoint >> 6 & 63 | 128, codePoint & 63 | 128);\n } else if (codePoint < 1114112) {\n if ((units -= 4) < 0)\n break;\n bytes.push(codePoint >> 18 | 240, codePoint >> 12 & 63 | 128, codePoint >> 6 & 63 | 128, codePoint & 63 | 128);\n } else {\n throw new Error(\"Invalid code point\");\n }\n }\n return bytes;\n }\n function asciiToBytes(str) {\n const byteArray = [];\n for (let i3 = 0; i3 < str.length; ++i3) {\n byteArray.push(str.charCodeAt(i3) & 255);\n }\n return byteArray;\n }\n function utf16leToBytes(str, units) {\n let c4, hi, lo;\n const byteArray = [];\n for (let i3 = 0; i3 < str.length; ++i3) {\n if ((units -= 2) < 0)\n break;\n c4 = str.charCodeAt(i3);\n hi = c4 >> 8;\n lo = c4 % 256;\n byteArray.push(lo);\n byteArray.push(hi);\n }\n return byteArray;\n }\n function base64ToBytes(str) {\n return base64.toByteArray(base64clean(str));\n }\n function blitBuffer(src, dst, offset, length2) {\n let i3;\n for (i3 = 0; i3 < length2; ++i3) {\n if (i3 + offset >= dst.length || i3 >= src.length)\n break;\n dst[i3 + offset] = src[i3];\n }\n return i3;\n }\n function isInstance(obj, type) {\n return obj instanceof type || obj != null && obj.constructor != null && obj.constructor.name != null && obj.constructor.name === type.name;\n }\n function numberIsNaN(obj) {\n return obj !== obj;\n }\n const hexSliceLookupTable = function() {\n const alphabet2 = \"0123456789abcdef\";\n const table = new Array(256);\n for (let i3 = 0; i3 < 16; ++i3) {\n const i16 = i3 * 16;\n for (let j2 = 0; j2 < 16; ++j2) {\n table[i16 + j2] = alphabet2[i3] + alphabet2[j2];\n }\n }\n return table;\n }();\n function defineBigIntMethod(fn) {\n return typeof BigInt === \"undefined\" ? BufferBigIntNotDefined : fn;\n }\n function BufferBigIntNotDefined() {\n throw new Error(\"BigInt not supported\");\n }\n return exports;\n }\n var exports$2, _dewExec$2, exports$1, _dewExec$1, exports, _dewExec;\n var init_chunk_DtuTasat = __esm({\n \"../../../node_modules/.pnpm/@jspm+core@2.1.0/node_modules/@jspm/core/nodelibs/browser/chunk-DtuTasat.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n exports$2 = {};\n _dewExec$2 = false;\n exports$1 = {};\n _dewExec$1 = false;\n exports = {};\n _dewExec = false;\n }\n });\n\n // ../../../node_modules/.pnpm/@jspm+core@2.1.0/node_modules/@jspm/core/nodelibs/browser/buffer.js\n var buffer_exports = {};\n __export(buffer_exports, {\n Buffer: () => Buffer2,\n INSPECT_MAX_BYTES: () => INSPECT_MAX_BYTES,\n default: () => exports2,\n kMaxLength: () => kMaxLength\n });\n var exports2, Buffer2, INSPECT_MAX_BYTES, kMaxLength;\n var init_buffer = __esm({\n \"../../../node_modules/.pnpm/@jspm+core@2.1.0/node_modules/@jspm/core/nodelibs/browser/buffer.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_chunk_DtuTasat();\n exports2 = dew();\n exports2[\"Buffer\"];\n exports2[\"SlowBuffer\"];\n exports2[\"INSPECT_MAX_BYTES\"];\n exports2[\"kMaxLength\"];\n Buffer2 = exports2.Buffer;\n INSPECT_MAX_BYTES = exports2.INSPECT_MAX_BYTES;\n kMaxLength = exports2.kMaxLength;\n }\n });\n\n // ../../../node_modules/.pnpm/@lit-protocol+esbuild-plugin-polyfill-node@0.3.0_esbuild@0.19.12/node_modules/@lit-protocol/esbuild-plugin-polyfill-node/polyfills/buffer.js\n var init_buffer2 = __esm({\n \"../../../node_modules/.pnpm/@lit-protocol+esbuild-plugin-polyfill-node@0.3.0_esbuild@0.19.12/node_modules/@lit-protocol/esbuild-plugin-polyfill-node/polyfills/buffer.js\"() {\n \"use strict\";\n init_buffer();\n }\n });\n\n // ../../../node_modules/.pnpm/zod@3.25.64/node_modules/zod/dist/cjs/v3/helpers/util.js\n var require_util = __commonJS({\n \"../../../node_modules/.pnpm/zod@3.25.64/node_modules/zod/dist/cjs/v3/helpers/util.js\"(exports3) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n Object.defineProperty(exports3, \"__esModule\", { value: true });\n exports3.getParsedType = exports3.ZodParsedType = exports3.objectUtil = exports3.util = void 0;\n var util2;\n (function(util3) {\n util3.assertEqual = (_2) => {\n };\n function assertIs(_arg) {\n }\n util3.assertIs = assertIs;\n function assertNever2(_x) {\n throw new Error();\n }\n util3.assertNever = assertNever2;\n util3.arrayToEnum = (items) => {\n const obj = {};\n for (const item of items) {\n obj[item] = item;\n }\n return obj;\n };\n util3.getValidEnumValues = (obj) => {\n const validKeys = util3.objectKeys(obj).filter((k4) => typeof obj[obj[k4]] !== \"number\");\n const filtered = {};\n for (const k4 of validKeys) {\n filtered[k4] = obj[k4];\n }\n return util3.objectValues(filtered);\n };\n util3.objectValues = (obj) => {\n return util3.objectKeys(obj).map(function(e3) {\n return obj[e3];\n });\n };\n util3.objectKeys = typeof Object.keys === \"function\" ? (obj) => Object.keys(obj) : (object2) => {\n const keys = [];\n for (const key in object2) {\n if (Object.prototype.hasOwnProperty.call(object2, key)) {\n keys.push(key);\n }\n }\n return keys;\n };\n util3.find = (arr, checker) => {\n for (const item of arr) {\n if (checker(item))\n return item;\n }\n return void 0;\n };\n util3.isInteger = typeof Number.isInteger === \"function\" ? (val) => Number.isInteger(val) : (val) => typeof val === \"number\" && Number.isFinite(val) && Math.floor(val) === val;\n function joinValues(array2, separator = \" | \") {\n return array2.map((val) => typeof val === \"string\" ? `'${val}'` : val).join(separator);\n }\n util3.joinValues = joinValues;\n util3.jsonStringifyReplacer = (_2, value) => {\n if (typeof value === \"bigint\") {\n return value.toString();\n }\n return value;\n };\n })(util2 || (exports3.util = util2 = {}));\n var objectUtil2;\n (function(objectUtil3) {\n objectUtil3.mergeShapes = (first, second) => {\n return {\n ...first,\n ...second\n // second overwrites first\n };\n };\n })(objectUtil2 || (exports3.objectUtil = objectUtil2 = {}));\n exports3.ZodParsedType = util2.arrayToEnum([\n \"string\",\n \"nan\",\n \"number\",\n \"integer\",\n \"float\",\n \"boolean\",\n \"date\",\n \"bigint\",\n \"symbol\",\n \"function\",\n \"undefined\",\n \"null\",\n \"array\",\n \"object\",\n \"unknown\",\n \"promise\",\n \"void\",\n \"never\",\n \"map\",\n \"set\"\n ]);\n var getParsedType2 = (data) => {\n const t3 = typeof data;\n switch (t3) {\n case \"undefined\":\n return exports3.ZodParsedType.undefined;\n case \"string\":\n return exports3.ZodParsedType.string;\n case \"number\":\n return Number.isNaN(data) ? exports3.ZodParsedType.nan : exports3.ZodParsedType.number;\n case \"boolean\":\n return exports3.ZodParsedType.boolean;\n case \"function\":\n return exports3.ZodParsedType.function;\n case \"bigint\":\n return exports3.ZodParsedType.bigint;\n case \"symbol\":\n return exports3.ZodParsedType.symbol;\n case \"object\":\n if (Array.isArray(data)) {\n return exports3.ZodParsedType.array;\n }\n if (data === null) {\n return exports3.ZodParsedType.null;\n }\n if (data.then && typeof data.then === \"function\" && data.catch && typeof data.catch === \"function\") {\n return exports3.ZodParsedType.promise;\n }\n if (typeof Map !== \"undefined\" && data instanceof Map) {\n return exports3.ZodParsedType.map;\n }\n if (typeof Set !== \"undefined\" && data instanceof Set) {\n return exports3.ZodParsedType.set;\n }\n if (typeof Date !== \"undefined\" && data instanceof Date) {\n return exports3.ZodParsedType.date;\n }\n return exports3.ZodParsedType.object;\n default:\n return exports3.ZodParsedType.unknown;\n }\n };\n exports3.getParsedType = getParsedType2;\n }\n });\n\n // ../../../node_modules/.pnpm/zod@3.25.64/node_modules/zod/dist/cjs/v3/ZodError.js\n var require_ZodError = __commonJS({\n \"../../../node_modules/.pnpm/zod@3.25.64/node_modules/zod/dist/cjs/v3/ZodError.js\"(exports3) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n Object.defineProperty(exports3, \"__esModule\", { value: true });\n exports3.ZodError = exports3.quotelessJson = exports3.ZodIssueCode = void 0;\n var util_js_1 = require_util();\n exports3.ZodIssueCode = util_js_1.util.arrayToEnum([\n \"invalid_type\",\n \"invalid_literal\",\n \"custom\",\n \"invalid_union\",\n \"invalid_union_discriminator\",\n \"invalid_enum_value\",\n \"unrecognized_keys\",\n \"invalid_arguments\",\n \"invalid_return_type\",\n \"invalid_date\",\n \"invalid_string\",\n \"too_small\",\n \"too_big\",\n \"invalid_intersection_types\",\n \"not_multiple_of\",\n \"not_finite\"\n ]);\n var quotelessJson2 = (obj) => {\n const json = JSON.stringify(obj, null, 2);\n return json.replace(/\"([^\"]+)\":/g, \"$1:\");\n };\n exports3.quotelessJson = quotelessJson2;\n var ZodError2 = class _ZodError extends Error {\n get errors() {\n return this.issues;\n }\n constructor(issues) {\n super();\n this.issues = [];\n this.addIssue = (sub) => {\n this.issues = [...this.issues, sub];\n };\n this.addIssues = (subs = []) => {\n this.issues = [...this.issues, ...subs];\n };\n const actualProto = new.target.prototype;\n if (Object.setPrototypeOf) {\n Object.setPrototypeOf(this, actualProto);\n } else {\n this.__proto__ = actualProto;\n }\n this.name = \"ZodError\";\n this.issues = issues;\n }\n format(_mapper) {\n const mapper = _mapper || function(issue) {\n return issue.message;\n };\n const fieldErrors = { _errors: [] };\n const processError = (error) => {\n for (const issue of error.issues) {\n if (issue.code === \"invalid_union\") {\n issue.unionErrors.map(processError);\n } else if (issue.code === \"invalid_return_type\") {\n processError(issue.returnTypeError);\n } else if (issue.code === \"invalid_arguments\") {\n processError(issue.argumentsError);\n } else if (issue.path.length === 0) {\n fieldErrors._errors.push(mapper(issue));\n } else {\n let curr = fieldErrors;\n let i3 = 0;\n while (i3 < issue.path.length) {\n const el = issue.path[i3];\n const terminal = i3 === issue.path.length - 1;\n if (!terminal) {\n curr[el] = curr[el] || { _errors: [] };\n } else {\n curr[el] = curr[el] || { _errors: [] };\n curr[el]._errors.push(mapper(issue));\n }\n curr = curr[el];\n i3++;\n }\n }\n }\n };\n processError(this);\n return fieldErrors;\n }\n static assert(value) {\n if (!(value instanceof _ZodError)) {\n throw new Error(`Not a ZodError: ${value}`);\n }\n }\n toString() {\n return this.message;\n }\n get message() {\n return JSON.stringify(this.issues, util_js_1.util.jsonStringifyReplacer, 2);\n }\n get isEmpty() {\n return this.issues.length === 0;\n }\n flatten(mapper = (issue) => issue.message) {\n const fieldErrors = {};\n const formErrors = [];\n for (const sub of this.issues) {\n if (sub.path.length > 0) {\n fieldErrors[sub.path[0]] = fieldErrors[sub.path[0]] || [];\n fieldErrors[sub.path[0]].push(mapper(sub));\n } else {\n formErrors.push(mapper(sub));\n }\n }\n return { formErrors, fieldErrors };\n }\n get formErrors() {\n return this.flatten();\n }\n };\n exports3.ZodError = ZodError2;\n ZodError2.create = (issues) => {\n const error = new ZodError2(issues);\n return error;\n };\n }\n });\n\n // ../../../node_modules/.pnpm/zod@3.25.64/node_modules/zod/dist/cjs/v3/locales/en.js\n var require_en = __commonJS({\n \"../../../node_modules/.pnpm/zod@3.25.64/node_modules/zod/dist/cjs/v3/locales/en.js\"(exports3) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n Object.defineProperty(exports3, \"__esModule\", { value: true });\n var ZodError_js_1 = require_ZodError();\n var util_js_1 = require_util();\n var errorMap2 = (issue, _ctx) => {\n let message;\n switch (issue.code) {\n case ZodError_js_1.ZodIssueCode.invalid_type:\n if (issue.received === util_js_1.ZodParsedType.undefined) {\n message = \"Required\";\n } else {\n message = `Expected ${issue.expected}, received ${issue.received}`;\n }\n break;\n case ZodError_js_1.ZodIssueCode.invalid_literal:\n message = `Invalid literal value, expected ${JSON.stringify(issue.expected, util_js_1.util.jsonStringifyReplacer)}`;\n break;\n case ZodError_js_1.ZodIssueCode.unrecognized_keys:\n message = `Unrecognized key(s) in object: ${util_js_1.util.joinValues(issue.keys, \", \")}`;\n break;\n case ZodError_js_1.ZodIssueCode.invalid_union:\n message = `Invalid input`;\n break;\n case ZodError_js_1.ZodIssueCode.invalid_union_discriminator:\n message = `Invalid discriminator value. Expected ${util_js_1.util.joinValues(issue.options)}`;\n break;\n case ZodError_js_1.ZodIssueCode.invalid_enum_value:\n message = `Invalid enum value. Expected ${util_js_1.util.joinValues(issue.options)}, received '${issue.received}'`;\n break;\n case ZodError_js_1.ZodIssueCode.invalid_arguments:\n message = `Invalid function arguments`;\n break;\n case ZodError_js_1.ZodIssueCode.invalid_return_type:\n message = `Invalid function return type`;\n break;\n case ZodError_js_1.ZodIssueCode.invalid_date:\n message = `Invalid date`;\n break;\n case ZodError_js_1.ZodIssueCode.invalid_string:\n if (typeof issue.validation === \"object\") {\n if (\"includes\" in issue.validation) {\n message = `Invalid input: must include \"${issue.validation.includes}\"`;\n if (typeof issue.validation.position === \"number\") {\n message = `${message} at one or more positions greater than or equal to ${issue.validation.position}`;\n }\n } else if (\"startsWith\" in issue.validation) {\n message = `Invalid input: must start with \"${issue.validation.startsWith}\"`;\n } else if (\"endsWith\" in issue.validation) {\n message = `Invalid input: must end with \"${issue.validation.endsWith}\"`;\n } else {\n util_js_1.util.assertNever(issue.validation);\n }\n } else if (issue.validation !== \"regex\") {\n message = `Invalid ${issue.validation}`;\n } else {\n message = \"Invalid\";\n }\n break;\n case ZodError_js_1.ZodIssueCode.too_small:\n if (issue.type === \"array\")\n message = `Array must contain ${issue.exact ? \"exactly\" : issue.inclusive ? `at least` : `more than`} ${issue.minimum} element(s)`;\n else if (issue.type === \"string\")\n message = `String must contain ${issue.exact ? \"exactly\" : issue.inclusive ? `at least` : `over`} ${issue.minimum} character(s)`;\n else if (issue.type === \"number\")\n message = `Number must be ${issue.exact ? `exactly equal to ` : issue.inclusive ? `greater than or equal to ` : `greater than `}${issue.minimum}`;\n else if (issue.type === \"date\")\n message = `Date must be ${issue.exact ? `exactly equal to ` : issue.inclusive ? `greater than or equal to ` : `greater than `}${new Date(Number(issue.minimum))}`;\n else\n message = \"Invalid input\";\n break;\n case ZodError_js_1.ZodIssueCode.too_big:\n if (issue.type === \"array\")\n message = `Array must contain ${issue.exact ? `exactly` : issue.inclusive ? `at most` : `less than`} ${issue.maximum} element(s)`;\n else if (issue.type === \"string\")\n message = `String must contain ${issue.exact ? `exactly` : issue.inclusive ? `at most` : `under`} ${issue.maximum} character(s)`;\n else if (issue.type === \"number\")\n message = `Number must be ${issue.exact ? `exactly` : issue.inclusive ? `less than or equal to` : `less than`} ${issue.maximum}`;\n else if (issue.type === \"bigint\")\n message = `BigInt must be ${issue.exact ? `exactly` : issue.inclusive ? `less than or equal to` : `less than`} ${issue.maximum}`;\n else if (issue.type === \"date\")\n message = `Date must be ${issue.exact ? `exactly` : issue.inclusive ? `smaller than or equal to` : `smaller than`} ${new Date(Number(issue.maximum))}`;\n else\n message = \"Invalid input\";\n break;\n case ZodError_js_1.ZodIssueCode.custom:\n message = `Invalid input`;\n break;\n case ZodError_js_1.ZodIssueCode.invalid_intersection_types:\n message = `Intersection results could not be merged`;\n break;\n case ZodError_js_1.ZodIssueCode.not_multiple_of:\n message = `Number must be a multiple of ${issue.multipleOf}`;\n break;\n case ZodError_js_1.ZodIssueCode.not_finite:\n message = \"Number must be finite\";\n break;\n default:\n message = _ctx.defaultError;\n util_js_1.util.assertNever(issue);\n }\n return { message };\n };\n exports3.default = errorMap2;\n }\n });\n\n // ../../../node_modules/.pnpm/zod@3.25.64/node_modules/zod/dist/cjs/v3/errors.js\n var require_errors = __commonJS({\n \"../../../node_modules/.pnpm/zod@3.25.64/node_modules/zod/dist/cjs/v3/errors.js\"(exports3) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n var __importDefault3 = exports3 && exports3.__importDefault || function(mod3) {\n return mod3 && mod3.__esModule ? mod3 : { \"default\": mod3 };\n };\n Object.defineProperty(exports3, \"__esModule\", { value: true });\n exports3.defaultErrorMap = void 0;\n exports3.setErrorMap = setErrorMap2;\n exports3.getErrorMap = getErrorMap2;\n var en_js_1 = __importDefault3(require_en());\n exports3.defaultErrorMap = en_js_1.default;\n var overrideErrorMap2 = en_js_1.default;\n function setErrorMap2(map) {\n overrideErrorMap2 = map;\n }\n function getErrorMap2() {\n return overrideErrorMap2;\n }\n }\n });\n\n // ../../../node_modules/.pnpm/zod@3.25.64/node_modules/zod/dist/cjs/v3/helpers/parseUtil.js\n var require_parseUtil = __commonJS({\n \"../../../node_modules/.pnpm/zod@3.25.64/node_modules/zod/dist/cjs/v3/helpers/parseUtil.js\"(exports3) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n var __importDefault3 = exports3 && exports3.__importDefault || function(mod3) {\n return mod3 && mod3.__esModule ? mod3 : { \"default\": mod3 };\n };\n Object.defineProperty(exports3, \"__esModule\", { value: true });\n exports3.isAsync = exports3.isValid = exports3.isDirty = exports3.isAborted = exports3.OK = exports3.DIRTY = exports3.INVALID = exports3.ParseStatus = exports3.EMPTY_PATH = exports3.makeIssue = void 0;\n exports3.addIssueToContext = addIssueToContext2;\n var errors_js_1 = require_errors();\n var en_js_1 = __importDefault3(require_en());\n var makeIssue2 = (params) => {\n const { data, path, errorMaps, issueData } = params;\n const fullPath = [...path, ...issueData.path || []];\n const fullIssue = {\n ...issueData,\n path: fullPath\n };\n if (issueData.message !== void 0) {\n return {\n ...issueData,\n path: fullPath,\n message: issueData.message\n };\n }\n let errorMessage = \"\";\n const maps = errorMaps.filter((m2) => !!m2).slice().reverse();\n for (const map of maps) {\n errorMessage = map(fullIssue, { data, defaultError: errorMessage }).message;\n }\n return {\n ...issueData,\n path: fullPath,\n message: errorMessage\n };\n };\n exports3.makeIssue = makeIssue2;\n exports3.EMPTY_PATH = [];\n function addIssueToContext2(ctx, issueData) {\n const overrideMap = (0, errors_js_1.getErrorMap)();\n const issue = (0, exports3.makeIssue)({\n issueData,\n data: ctx.data,\n path: ctx.path,\n errorMaps: [\n ctx.common.contextualErrorMap,\n // contextual error map is first priority\n ctx.schemaErrorMap,\n // then schema-bound map if available\n overrideMap,\n // then global override map\n overrideMap === en_js_1.default ? void 0 : en_js_1.default\n // then global default map\n ].filter((x4) => !!x4)\n });\n ctx.common.issues.push(issue);\n }\n var ParseStatus2 = class _ParseStatus {\n constructor() {\n this.value = \"valid\";\n }\n dirty() {\n if (this.value === \"valid\")\n this.value = \"dirty\";\n }\n abort() {\n if (this.value !== \"aborted\")\n this.value = \"aborted\";\n }\n static mergeArray(status, results) {\n const arrayValue = [];\n for (const s4 of results) {\n if (s4.status === \"aborted\")\n return exports3.INVALID;\n if (s4.status === \"dirty\")\n status.dirty();\n arrayValue.push(s4.value);\n }\n return { status: status.value, value: arrayValue };\n }\n static async mergeObjectAsync(status, pairs) {\n const syncPairs = [];\n for (const pair of pairs) {\n const key = await pair.key;\n const value = await pair.value;\n syncPairs.push({\n key,\n value\n });\n }\n return _ParseStatus.mergeObjectSync(status, syncPairs);\n }\n static mergeObjectSync(status, pairs) {\n const finalObject = {};\n for (const pair of pairs) {\n const { key, value } = pair;\n if (key.status === \"aborted\")\n return exports3.INVALID;\n if (value.status === \"aborted\")\n return exports3.INVALID;\n if (key.status === \"dirty\")\n status.dirty();\n if (value.status === \"dirty\")\n status.dirty();\n if (key.value !== \"__proto__\" && (typeof value.value !== \"undefined\" || pair.alwaysSet)) {\n finalObject[key.value] = value.value;\n }\n }\n return { status: status.value, value: finalObject };\n }\n };\n exports3.ParseStatus = ParseStatus2;\n exports3.INVALID = Object.freeze({\n status: \"aborted\"\n });\n var DIRTY2 = (value) => ({ status: \"dirty\", value });\n exports3.DIRTY = DIRTY2;\n var OK2 = (value) => ({ status: \"valid\", value });\n exports3.OK = OK2;\n var isAborted2 = (x4) => x4.status === \"aborted\";\n exports3.isAborted = isAborted2;\n var isDirty2 = (x4) => x4.status === \"dirty\";\n exports3.isDirty = isDirty2;\n var isValid2 = (x4) => x4.status === \"valid\";\n exports3.isValid = isValid2;\n var isAsync2 = (x4) => typeof Promise !== \"undefined\" && x4 instanceof Promise;\n exports3.isAsync = isAsync2;\n }\n });\n\n // ../../../node_modules/.pnpm/zod@3.25.64/node_modules/zod/dist/cjs/v3/helpers/typeAliases.js\n var require_typeAliases = __commonJS({\n \"../../../node_modules/.pnpm/zod@3.25.64/node_modules/zod/dist/cjs/v3/helpers/typeAliases.js\"(exports3) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n Object.defineProperty(exports3, \"__esModule\", { value: true });\n }\n });\n\n // ../../../node_modules/.pnpm/zod@3.25.64/node_modules/zod/dist/cjs/v3/helpers/errorUtil.js\n var require_errorUtil = __commonJS({\n \"../../../node_modules/.pnpm/zod@3.25.64/node_modules/zod/dist/cjs/v3/helpers/errorUtil.js\"(exports3) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n Object.defineProperty(exports3, \"__esModule\", { value: true });\n exports3.errorUtil = void 0;\n var errorUtil2;\n (function(errorUtil3) {\n errorUtil3.errToObj = (message) => typeof message === \"string\" ? { message } : message || {};\n errorUtil3.toString = (message) => typeof message === \"string\" ? message : message?.message;\n })(errorUtil2 || (exports3.errorUtil = errorUtil2 = {}));\n }\n });\n\n // ../../../node_modules/.pnpm/zod@3.25.64/node_modules/zod/dist/cjs/v3/types.js\n var require_types = __commonJS({\n \"../../../node_modules/.pnpm/zod@3.25.64/node_modules/zod/dist/cjs/v3/types.js\"(exports3) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n Object.defineProperty(exports3, \"__esModule\", { value: true });\n exports3.discriminatedUnion = exports3.date = exports3.boolean = exports3.bigint = exports3.array = exports3.any = exports3.coerce = exports3.ZodFirstPartyTypeKind = exports3.late = exports3.ZodSchema = exports3.Schema = exports3.ZodReadonly = exports3.ZodPipeline = exports3.ZodBranded = exports3.BRAND = exports3.ZodNaN = exports3.ZodCatch = exports3.ZodDefault = exports3.ZodNullable = exports3.ZodOptional = exports3.ZodTransformer = exports3.ZodEffects = exports3.ZodPromise = exports3.ZodNativeEnum = exports3.ZodEnum = exports3.ZodLiteral = exports3.ZodLazy = exports3.ZodFunction = exports3.ZodSet = exports3.ZodMap = exports3.ZodRecord = exports3.ZodTuple = exports3.ZodIntersection = exports3.ZodDiscriminatedUnion = exports3.ZodUnion = exports3.ZodObject = exports3.ZodArray = exports3.ZodVoid = exports3.ZodNever = exports3.ZodUnknown = exports3.ZodAny = exports3.ZodNull = exports3.ZodUndefined = exports3.ZodSymbol = exports3.ZodDate = exports3.ZodBoolean = exports3.ZodBigInt = exports3.ZodNumber = exports3.ZodString = exports3.ZodType = void 0;\n exports3.NEVER = exports3.void = exports3.unknown = exports3.union = exports3.undefined = exports3.tuple = exports3.transformer = exports3.symbol = exports3.string = exports3.strictObject = exports3.set = exports3.record = exports3.promise = exports3.preprocess = exports3.pipeline = exports3.ostring = exports3.optional = exports3.onumber = exports3.oboolean = exports3.object = exports3.number = exports3.nullable = exports3.null = exports3.never = exports3.nativeEnum = exports3.nan = exports3.map = exports3.literal = exports3.lazy = exports3.intersection = exports3.instanceof = exports3.function = exports3.enum = exports3.effect = void 0;\n exports3.datetimeRegex = datetimeRegex2;\n exports3.custom = custom3;\n var ZodError_js_1 = require_ZodError();\n var errors_js_1 = require_errors();\n var errorUtil_js_1 = require_errorUtil();\n var parseUtil_js_1 = require_parseUtil();\n var util_js_1 = require_util();\n var ParseInputLazyPath2 = class {\n constructor(parent, value, path, key) {\n this._cachedPath = [];\n this.parent = parent;\n this.data = value;\n this._path = path;\n this._key = key;\n }\n get path() {\n if (!this._cachedPath.length) {\n if (Array.isArray(this._key)) {\n this._cachedPath.push(...this._path, ...this._key);\n } else {\n this._cachedPath.push(...this._path, this._key);\n }\n }\n return this._cachedPath;\n }\n };\n var handleResult2 = (ctx, result) => {\n if ((0, parseUtil_js_1.isValid)(result)) {\n return { success: true, data: result.value };\n } else {\n if (!ctx.common.issues.length) {\n throw new Error(\"Validation failed but no issues detected.\");\n }\n return {\n success: false,\n get error() {\n if (this._error)\n return this._error;\n const error = new ZodError_js_1.ZodError(ctx.common.issues);\n this._error = error;\n return this._error;\n }\n };\n }\n };\n function processCreateParams2(params) {\n if (!params)\n return {};\n const { errorMap: errorMap2, invalid_type_error, required_error, description: description2 } = params;\n if (errorMap2 && (invalid_type_error || required_error)) {\n throw new Error(`Can't use \"invalid_type_error\" or \"required_error\" in conjunction with custom error map.`);\n }\n if (errorMap2)\n return { errorMap: errorMap2, description: description2 };\n const customMap = (iss, ctx) => {\n const { message } = params;\n if (iss.code === \"invalid_enum_value\") {\n return { message: message ?? ctx.defaultError };\n }\n if (typeof ctx.data === \"undefined\") {\n return { message: message ?? required_error ?? ctx.defaultError };\n }\n if (iss.code !== \"invalid_type\")\n return { message: ctx.defaultError };\n return { message: message ?? invalid_type_error ?? ctx.defaultError };\n };\n return { errorMap: customMap, description: description2 };\n }\n var ZodType2 = class {\n get description() {\n return this._def.description;\n }\n _getType(input) {\n return (0, util_js_1.getParsedType)(input.data);\n }\n _getOrReturnCtx(input, ctx) {\n return ctx || {\n common: input.parent.common,\n data: input.data,\n parsedType: (0, util_js_1.getParsedType)(input.data),\n schemaErrorMap: this._def.errorMap,\n path: input.path,\n parent: input.parent\n };\n }\n _processInputParams(input) {\n return {\n status: new parseUtil_js_1.ParseStatus(),\n ctx: {\n common: input.parent.common,\n data: input.data,\n parsedType: (0, util_js_1.getParsedType)(input.data),\n schemaErrorMap: this._def.errorMap,\n path: input.path,\n parent: input.parent\n }\n };\n }\n _parseSync(input) {\n const result = this._parse(input);\n if ((0, parseUtil_js_1.isAsync)(result)) {\n throw new Error(\"Synchronous parse encountered promise.\");\n }\n return result;\n }\n _parseAsync(input) {\n const result = this._parse(input);\n return Promise.resolve(result);\n }\n parse(data, params) {\n const result = this.safeParse(data, params);\n if (result.success)\n return result.data;\n throw result.error;\n }\n safeParse(data, params) {\n const ctx = {\n common: {\n issues: [],\n async: params?.async ?? false,\n contextualErrorMap: params?.errorMap\n },\n path: params?.path || [],\n schemaErrorMap: this._def.errorMap,\n parent: null,\n data,\n parsedType: (0, util_js_1.getParsedType)(data)\n };\n const result = this._parseSync({ data, path: ctx.path, parent: ctx });\n return handleResult2(ctx, result);\n }\n \"~validate\"(data) {\n const ctx = {\n common: {\n issues: [],\n async: !!this[\"~standard\"].async\n },\n path: [],\n schemaErrorMap: this._def.errorMap,\n parent: null,\n data,\n parsedType: (0, util_js_1.getParsedType)(data)\n };\n if (!this[\"~standard\"].async) {\n try {\n const result = this._parseSync({ data, path: [], parent: ctx });\n return (0, parseUtil_js_1.isValid)(result) ? {\n value: result.value\n } : {\n issues: ctx.common.issues\n };\n } catch (err) {\n if (err?.message?.toLowerCase()?.includes(\"encountered\")) {\n this[\"~standard\"].async = true;\n }\n ctx.common = {\n issues: [],\n async: true\n };\n }\n }\n return this._parseAsync({ data, path: [], parent: ctx }).then((result) => (0, parseUtil_js_1.isValid)(result) ? {\n value: result.value\n } : {\n issues: ctx.common.issues\n });\n }\n async parseAsync(data, params) {\n const result = await this.safeParseAsync(data, params);\n if (result.success)\n return result.data;\n throw result.error;\n }\n async safeParseAsync(data, params) {\n const ctx = {\n common: {\n issues: [],\n contextualErrorMap: params?.errorMap,\n async: true\n },\n path: params?.path || [],\n schemaErrorMap: this._def.errorMap,\n parent: null,\n data,\n parsedType: (0, util_js_1.getParsedType)(data)\n };\n const maybeAsyncResult = this._parse({ data, path: ctx.path, parent: ctx });\n const result = await ((0, parseUtil_js_1.isAsync)(maybeAsyncResult) ? maybeAsyncResult : Promise.resolve(maybeAsyncResult));\n return handleResult2(ctx, result);\n }\n refine(check, message) {\n const getIssueProperties = (val) => {\n if (typeof message === \"string\" || typeof message === \"undefined\") {\n return { message };\n } else if (typeof message === \"function\") {\n return message(val);\n } else {\n return message;\n }\n };\n return this._refinement((val, ctx) => {\n const result = check(val);\n const setError = () => ctx.addIssue({\n code: ZodError_js_1.ZodIssueCode.custom,\n ...getIssueProperties(val)\n });\n if (typeof Promise !== \"undefined\" && result instanceof Promise) {\n return result.then((data) => {\n if (!data) {\n setError();\n return false;\n } else {\n return true;\n }\n });\n }\n if (!result) {\n setError();\n return false;\n } else {\n return true;\n }\n });\n }\n refinement(check, refinementData) {\n return this._refinement((val, ctx) => {\n if (!check(val)) {\n ctx.addIssue(typeof refinementData === \"function\" ? refinementData(val, ctx) : refinementData);\n return false;\n } else {\n return true;\n }\n });\n }\n _refinement(refinement) {\n return new ZodEffects2({\n schema: this,\n typeName: ZodFirstPartyTypeKind2.ZodEffects,\n effect: { type: \"refinement\", refinement }\n });\n }\n superRefine(refinement) {\n return this._refinement(refinement);\n }\n constructor(def) {\n this.spa = this.safeParseAsync;\n this._def = def;\n this.parse = this.parse.bind(this);\n this.safeParse = this.safeParse.bind(this);\n this.parseAsync = this.parseAsync.bind(this);\n this.safeParseAsync = this.safeParseAsync.bind(this);\n this.spa = this.spa.bind(this);\n this.refine = this.refine.bind(this);\n this.refinement = this.refinement.bind(this);\n this.superRefine = this.superRefine.bind(this);\n this.optional = this.optional.bind(this);\n this.nullable = this.nullable.bind(this);\n this.nullish = this.nullish.bind(this);\n this.array = this.array.bind(this);\n this.promise = this.promise.bind(this);\n this.or = this.or.bind(this);\n this.and = this.and.bind(this);\n this.transform = this.transform.bind(this);\n this.brand = this.brand.bind(this);\n this.default = this.default.bind(this);\n this.catch = this.catch.bind(this);\n this.describe = this.describe.bind(this);\n this.pipe = this.pipe.bind(this);\n this.readonly = this.readonly.bind(this);\n this.isNullable = this.isNullable.bind(this);\n this.isOptional = this.isOptional.bind(this);\n this[\"~standard\"] = {\n version: 1,\n vendor: \"zod\",\n validate: (data) => this[\"~validate\"](data)\n };\n }\n optional() {\n return ZodOptional2.create(this, this._def);\n }\n nullable() {\n return ZodNullable2.create(this, this._def);\n }\n nullish() {\n return this.nullable().optional();\n }\n array() {\n return ZodArray2.create(this);\n }\n promise() {\n return ZodPromise2.create(this, this._def);\n }\n or(option) {\n return ZodUnion2.create([this, option], this._def);\n }\n and(incoming) {\n return ZodIntersection2.create(this, incoming, this._def);\n }\n transform(transform2) {\n return new ZodEffects2({\n ...processCreateParams2(this._def),\n schema: this,\n typeName: ZodFirstPartyTypeKind2.ZodEffects,\n effect: { type: \"transform\", transform: transform2 }\n });\n }\n default(def) {\n const defaultValueFunc = typeof def === \"function\" ? def : () => def;\n return new ZodDefault2({\n ...processCreateParams2(this._def),\n innerType: this,\n defaultValue: defaultValueFunc,\n typeName: ZodFirstPartyTypeKind2.ZodDefault\n });\n }\n brand() {\n return new ZodBranded2({\n typeName: ZodFirstPartyTypeKind2.ZodBranded,\n type: this,\n ...processCreateParams2(this._def)\n });\n }\n catch(def) {\n const catchValueFunc = typeof def === \"function\" ? def : () => def;\n return new ZodCatch2({\n ...processCreateParams2(this._def),\n innerType: this,\n catchValue: catchValueFunc,\n typeName: ZodFirstPartyTypeKind2.ZodCatch\n });\n }\n describe(description2) {\n const This = this.constructor;\n return new This({\n ...this._def,\n description: description2\n });\n }\n pipe(target) {\n return ZodPipeline2.create(this, target);\n }\n readonly() {\n return ZodReadonly2.create(this);\n }\n isOptional() {\n return this.safeParse(void 0).success;\n }\n isNullable() {\n return this.safeParse(null).success;\n }\n };\n exports3.ZodType = ZodType2;\n exports3.Schema = ZodType2;\n exports3.ZodSchema = ZodType2;\n var cuidRegex2 = /^c[^\\s-]{8,}$/i;\n var cuid2Regex2 = /^[0-9a-z]+$/;\n var ulidRegex2 = /^[0-9A-HJKMNP-TV-Z]{26}$/i;\n var uuidRegex2 = /^[0-9a-fA-F]{8}\\b-[0-9a-fA-F]{4}\\b-[0-9a-fA-F]{4}\\b-[0-9a-fA-F]{4}\\b-[0-9a-fA-F]{12}$/i;\n var nanoidRegex2 = /^[a-z0-9_-]{21}$/i;\n var jwtRegex2 = /^[A-Za-z0-9-_]+\\.[A-Za-z0-9-_]+\\.[A-Za-z0-9-_]*$/;\n var durationRegex2 = /^[-+]?P(?!$)(?:(?:[-+]?\\d+Y)|(?:[-+]?\\d+[.,]\\d+Y$))?(?:(?:[-+]?\\d+M)|(?:[-+]?\\d+[.,]\\d+M$))?(?:(?:[-+]?\\d+W)|(?:[-+]?\\d+[.,]\\d+W$))?(?:(?:[-+]?\\d+D)|(?:[-+]?\\d+[.,]\\d+D$))?(?:T(?=[\\d+-])(?:(?:[-+]?\\d+H)|(?:[-+]?\\d+[.,]\\d+H$))?(?:(?:[-+]?\\d+M)|(?:[-+]?\\d+[.,]\\d+M$))?(?:[-+]?\\d+(?:[.,]\\d+)?S)?)??$/;\n var emailRegex2 = /^(?!\\.)(?!.*\\.\\.)([A-Z0-9_'+\\-\\.]*)[A-Z0-9_+-]@([A-Z0-9][A-Z0-9\\-]*\\.)+[A-Z]{2,}$/i;\n var _emojiRegex2 = `^(\\\\p{Extended_Pictographic}|\\\\p{Emoji_Component})+$`;\n var emojiRegex2;\n var ipv4Regex2 = /^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\\.){3}(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])$/;\n var ipv4CidrRegex2 = /^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\\.){3}(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\\/(3[0-2]|[12]?[0-9])$/;\n var ipv6Regex2 = /^(([0-9a-fA-F]{1,4}:){7,7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:)|fe80:(:[0-9a-fA-F]{0,4}){0,4}%[0-9a-zA-Z]{1,}|::(ffff(:0{1,4}){0,1}:){0,1}((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])|([0-9a-fA-F]{1,4}:){1,4}:((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9]))$/;\n var ipv6CidrRegex2 = /^(([0-9a-fA-F]{1,4}:){7,7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:)|fe80:(:[0-9a-fA-F]{0,4}){0,4}%[0-9a-zA-Z]{1,}|::(ffff(:0{1,4}){0,1}:){0,1}((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])|([0-9a-fA-F]{1,4}:){1,4}:((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9]))\\/(12[0-8]|1[01][0-9]|[1-9]?[0-9])$/;\n var base64Regex3 = /^([0-9a-zA-Z+/]{4})*(([0-9a-zA-Z+/]{2}==)|([0-9a-zA-Z+/]{3}=))?$/;\n var base64urlRegex2 = /^([0-9a-zA-Z-_]{4})*(([0-9a-zA-Z-_]{2}(==)?)|([0-9a-zA-Z-_]{3}(=)?))?$/;\n var dateRegexSource2 = `((\\\\d\\\\d[2468][048]|\\\\d\\\\d[13579][26]|\\\\d\\\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\\\d{4}-((0[13578]|1[02])-(0[1-9]|[12]\\\\d|3[01])|(0[469]|11)-(0[1-9]|[12]\\\\d|30)|(02)-(0[1-9]|1\\\\d|2[0-8])))`;\n var dateRegex2 = new RegExp(`^${dateRegexSource2}$`);\n function timeRegexSource2(args) {\n let secondsRegexSource = `[0-5]\\\\d`;\n if (args.precision) {\n secondsRegexSource = `${secondsRegexSource}\\\\.\\\\d{${args.precision}}`;\n } else if (args.precision == null) {\n secondsRegexSource = `${secondsRegexSource}(\\\\.\\\\d+)?`;\n }\n const secondsQuantifier = args.precision ? \"+\" : \"?\";\n return `([01]\\\\d|2[0-3]):[0-5]\\\\d(:${secondsRegexSource})${secondsQuantifier}`;\n }\n function timeRegex2(args) {\n return new RegExp(`^${timeRegexSource2(args)}$`);\n }\n function datetimeRegex2(args) {\n let regex2 = `${dateRegexSource2}T${timeRegexSource2(args)}`;\n const opts = [];\n opts.push(args.local ? `Z?` : `Z`);\n if (args.offset)\n opts.push(`([+-]\\\\d{2}:?\\\\d{2})`);\n regex2 = `${regex2}(${opts.join(\"|\")})`;\n return new RegExp(`^${regex2}$`);\n }\n function isValidIP2(ip, version6) {\n if ((version6 === \"v4\" || !version6) && ipv4Regex2.test(ip)) {\n return true;\n }\n if ((version6 === \"v6\" || !version6) && ipv6Regex2.test(ip)) {\n return true;\n }\n return false;\n }\n function isValidJWT2(jwt, alg) {\n if (!jwtRegex2.test(jwt))\n return false;\n try {\n const [header] = jwt.split(\".\");\n const base64 = header.replace(/-/g, \"+\").replace(/_/g, \"/\").padEnd(header.length + (4 - header.length % 4) % 4, \"=\");\n const decoded = JSON.parse(atob(base64));\n if (typeof decoded !== \"object\" || decoded === null)\n return false;\n if (\"typ\" in decoded && decoded?.typ !== \"JWT\")\n return false;\n if (!decoded.alg)\n return false;\n if (alg && decoded.alg !== alg)\n return false;\n return true;\n } catch {\n return false;\n }\n }\n function isValidCidr2(ip, version6) {\n if ((version6 === \"v4\" || !version6) && ipv4CidrRegex2.test(ip)) {\n return true;\n }\n if ((version6 === \"v6\" || !version6) && ipv6CidrRegex2.test(ip)) {\n return true;\n }\n return false;\n }\n var ZodString2 = class _ZodString extends ZodType2 {\n _parse(input) {\n if (this._def.coerce) {\n input.data = String(input.data);\n }\n const parsedType = this._getType(input);\n if (parsedType !== util_js_1.ZodParsedType.string) {\n const ctx2 = this._getOrReturnCtx(input);\n (0, parseUtil_js_1.addIssueToContext)(ctx2, {\n code: ZodError_js_1.ZodIssueCode.invalid_type,\n expected: util_js_1.ZodParsedType.string,\n received: ctx2.parsedType\n });\n return parseUtil_js_1.INVALID;\n }\n const status = new parseUtil_js_1.ParseStatus();\n let ctx = void 0;\n for (const check of this._def.checks) {\n if (check.kind === \"min\") {\n if (input.data.length < check.value) {\n ctx = this._getOrReturnCtx(input, ctx);\n (0, parseUtil_js_1.addIssueToContext)(ctx, {\n code: ZodError_js_1.ZodIssueCode.too_small,\n minimum: check.value,\n type: \"string\",\n inclusive: true,\n exact: false,\n message: check.message\n });\n status.dirty();\n }\n } else if (check.kind === \"max\") {\n if (input.data.length > check.value) {\n ctx = this._getOrReturnCtx(input, ctx);\n (0, parseUtil_js_1.addIssueToContext)(ctx, {\n code: ZodError_js_1.ZodIssueCode.too_big,\n maximum: check.value,\n type: \"string\",\n inclusive: true,\n exact: false,\n message: check.message\n });\n status.dirty();\n }\n } else if (check.kind === \"length\") {\n const tooBig = input.data.length > check.value;\n const tooSmall = input.data.length < check.value;\n if (tooBig || tooSmall) {\n ctx = this._getOrReturnCtx(input, ctx);\n if (tooBig) {\n (0, parseUtil_js_1.addIssueToContext)(ctx, {\n code: ZodError_js_1.ZodIssueCode.too_big,\n maximum: check.value,\n type: \"string\",\n inclusive: true,\n exact: true,\n message: check.message\n });\n } else if (tooSmall) {\n (0, parseUtil_js_1.addIssueToContext)(ctx, {\n code: ZodError_js_1.ZodIssueCode.too_small,\n minimum: check.value,\n type: \"string\",\n inclusive: true,\n exact: true,\n message: check.message\n });\n }\n status.dirty();\n }\n } else if (check.kind === \"email\") {\n if (!emailRegex2.test(input.data)) {\n ctx = this._getOrReturnCtx(input, ctx);\n (0, parseUtil_js_1.addIssueToContext)(ctx, {\n validation: \"email\",\n code: ZodError_js_1.ZodIssueCode.invalid_string,\n message: check.message\n });\n status.dirty();\n }\n } else if (check.kind === \"emoji\") {\n if (!emojiRegex2) {\n emojiRegex2 = new RegExp(_emojiRegex2, \"u\");\n }\n if (!emojiRegex2.test(input.data)) {\n ctx = this._getOrReturnCtx(input, ctx);\n (0, parseUtil_js_1.addIssueToContext)(ctx, {\n validation: \"emoji\",\n code: ZodError_js_1.ZodIssueCode.invalid_string,\n message: check.message\n });\n status.dirty();\n }\n } else if (check.kind === \"uuid\") {\n if (!uuidRegex2.test(input.data)) {\n ctx = this._getOrReturnCtx(input, ctx);\n (0, parseUtil_js_1.addIssueToContext)(ctx, {\n validation: \"uuid\",\n code: ZodError_js_1.ZodIssueCode.invalid_string,\n message: check.message\n });\n status.dirty();\n }\n } else if (check.kind === \"nanoid\") {\n if (!nanoidRegex2.test(input.data)) {\n ctx = this._getOrReturnCtx(input, ctx);\n (0, parseUtil_js_1.addIssueToContext)(ctx, {\n validation: \"nanoid\",\n code: ZodError_js_1.ZodIssueCode.invalid_string,\n message: check.message\n });\n status.dirty();\n }\n } else if (check.kind === \"cuid\") {\n if (!cuidRegex2.test(input.data)) {\n ctx = this._getOrReturnCtx(input, ctx);\n (0, parseUtil_js_1.addIssueToContext)(ctx, {\n validation: \"cuid\",\n code: ZodError_js_1.ZodIssueCode.invalid_string,\n message: check.message\n });\n status.dirty();\n }\n } else if (check.kind === \"cuid2\") {\n if (!cuid2Regex2.test(input.data)) {\n ctx = this._getOrReturnCtx(input, ctx);\n (0, parseUtil_js_1.addIssueToContext)(ctx, {\n validation: \"cuid2\",\n code: ZodError_js_1.ZodIssueCode.invalid_string,\n message: check.message\n });\n status.dirty();\n }\n } else if (check.kind === \"ulid\") {\n if (!ulidRegex2.test(input.data)) {\n ctx = this._getOrReturnCtx(input, ctx);\n (0, parseUtil_js_1.addIssueToContext)(ctx, {\n validation: \"ulid\",\n code: ZodError_js_1.ZodIssueCode.invalid_string,\n message: check.message\n });\n status.dirty();\n }\n } else if (check.kind === \"url\") {\n try {\n new URL(input.data);\n } catch {\n ctx = this._getOrReturnCtx(input, ctx);\n (0, parseUtil_js_1.addIssueToContext)(ctx, {\n validation: \"url\",\n code: ZodError_js_1.ZodIssueCode.invalid_string,\n message: check.message\n });\n status.dirty();\n }\n } else if (check.kind === \"regex\") {\n check.regex.lastIndex = 0;\n const testResult = check.regex.test(input.data);\n if (!testResult) {\n ctx = this._getOrReturnCtx(input, ctx);\n (0, parseUtil_js_1.addIssueToContext)(ctx, {\n validation: \"regex\",\n code: ZodError_js_1.ZodIssueCode.invalid_string,\n message: check.message\n });\n status.dirty();\n }\n } else if (check.kind === \"trim\") {\n input.data = input.data.trim();\n } else if (check.kind === \"includes\") {\n if (!input.data.includes(check.value, check.position)) {\n ctx = this._getOrReturnCtx(input, ctx);\n (0, parseUtil_js_1.addIssueToContext)(ctx, {\n code: ZodError_js_1.ZodIssueCode.invalid_string,\n validation: { includes: check.value, position: check.position },\n message: check.message\n });\n status.dirty();\n }\n } else if (check.kind === \"toLowerCase\") {\n input.data = input.data.toLowerCase();\n } else if (check.kind === \"toUpperCase\") {\n input.data = input.data.toUpperCase();\n } else if (check.kind === \"startsWith\") {\n if (!input.data.startsWith(check.value)) {\n ctx = this._getOrReturnCtx(input, ctx);\n (0, parseUtil_js_1.addIssueToContext)(ctx, {\n code: ZodError_js_1.ZodIssueCode.invalid_string,\n validation: { startsWith: check.value },\n message: check.message\n });\n status.dirty();\n }\n } else if (check.kind === \"endsWith\") {\n if (!input.data.endsWith(check.value)) {\n ctx = this._getOrReturnCtx(input, ctx);\n (0, parseUtil_js_1.addIssueToContext)(ctx, {\n code: ZodError_js_1.ZodIssueCode.invalid_string,\n validation: { endsWith: check.value },\n message: check.message\n });\n status.dirty();\n }\n } else if (check.kind === \"datetime\") {\n const regex2 = datetimeRegex2(check);\n if (!regex2.test(input.data)) {\n ctx = this._getOrReturnCtx(input, ctx);\n (0, parseUtil_js_1.addIssueToContext)(ctx, {\n code: ZodError_js_1.ZodIssueCode.invalid_string,\n validation: \"datetime\",\n message: check.message\n });\n status.dirty();\n }\n } else if (check.kind === \"date\") {\n const regex2 = dateRegex2;\n if (!regex2.test(input.data)) {\n ctx = this._getOrReturnCtx(input, ctx);\n (0, parseUtil_js_1.addIssueToContext)(ctx, {\n code: ZodError_js_1.ZodIssueCode.invalid_string,\n validation: \"date\",\n message: check.message\n });\n status.dirty();\n }\n } else if (check.kind === \"time\") {\n const regex2 = timeRegex2(check);\n if (!regex2.test(input.data)) {\n ctx = this._getOrReturnCtx(input, ctx);\n (0, parseUtil_js_1.addIssueToContext)(ctx, {\n code: ZodError_js_1.ZodIssueCode.invalid_string,\n validation: \"time\",\n message: check.message\n });\n status.dirty();\n }\n } else if (check.kind === \"duration\") {\n if (!durationRegex2.test(input.data)) {\n ctx = this._getOrReturnCtx(input, ctx);\n (0, parseUtil_js_1.addIssueToContext)(ctx, {\n validation: \"duration\",\n code: ZodError_js_1.ZodIssueCode.invalid_string,\n message: check.message\n });\n status.dirty();\n }\n } else if (check.kind === \"ip\") {\n if (!isValidIP2(input.data, check.version)) {\n ctx = this._getOrReturnCtx(input, ctx);\n (0, parseUtil_js_1.addIssueToContext)(ctx, {\n validation: \"ip\",\n code: ZodError_js_1.ZodIssueCode.invalid_string,\n message: check.message\n });\n status.dirty();\n }\n } else if (check.kind === \"jwt\") {\n if (!isValidJWT2(input.data, check.alg)) {\n ctx = this._getOrReturnCtx(input, ctx);\n (0, parseUtil_js_1.addIssueToContext)(ctx, {\n validation: \"jwt\",\n code: ZodError_js_1.ZodIssueCode.invalid_string,\n message: check.message\n });\n status.dirty();\n }\n } else if (check.kind === \"cidr\") {\n if (!isValidCidr2(input.data, check.version)) {\n ctx = this._getOrReturnCtx(input, ctx);\n (0, parseUtil_js_1.addIssueToContext)(ctx, {\n validation: \"cidr\",\n code: ZodError_js_1.ZodIssueCode.invalid_string,\n message: check.message\n });\n status.dirty();\n }\n } else if (check.kind === \"base64\") {\n if (!base64Regex3.test(input.data)) {\n ctx = this._getOrReturnCtx(input, ctx);\n (0, parseUtil_js_1.addIssueToContext)(ctx, {\n validation: \"base64\",\n code: ZodError_js_1.ZodIssueCode.invalid_string,\n message: check.message\n });\n status.dirty();\n }\n } else if (check.kind === \"base64url\") {\n if (!base64urlRegex2.test(input.data)) {\n ctx = this._getOrReturnCtx(input, ctx);\n (0, parseUtil_js_1.addIssueToContext)(ctx, {\n validation: \"base64url\",\n code: ZodError_js_1.ZodIssueCode.invalid_string,\n message: check.message\n });\n status.dirty();\n }\n } else {\n util_js_1.util.assertNever(check);\n }\n }\n return { status: status.value, value: input.data };\n }\n _regex(regex2, validation, message) {\n return this.refinement((data) => regex2.test(data), {\n validation,\n code: ZodError_js_1.ZodIssueCode.invalid_string,\n ...errorUtil_js_1.errorUtil.errToObj(message)\n });\n }\n _addCheck(check) {\n return new _ZodString({\n ...this._def,\n checks: [...this._def.checks, check]\n });\n }\n email(message) {\n return this._addCheck({ kind: \"email\", ...errorUtil_js_1.errorUtil.errToObj(message) });\n }\n url(message) {\n return this._addCheck({ kind: \"url\", ...errorUtil_js_1.errorUtil.errToObj(message) });\n }\n emoji(message) {\n return this._addCheck({ kind: \"emoji\", ...errorUtil_js_1.errorUtil.errToObj(message) });\n }\n uuid(message) {\n return this._addCheck({ kind: \"uuid\", ...errorUtil_js_1.errorUtil.errToObj(message) });\n }\n nanoid(message) {\n return this._addCheck({ kind: \"nanoid\", ...errorUtil_js_1.errorUtil.errToObj(message) });\n }\n cuid(message) {\n return this._addCheck({ kind: \"cuid\", ...errorUtil_js_1.errorUtil.errToObj(message) });\n }\n cuid2(message) {\n return this._addCheck({ kind: \"cuid2\", ...errorUtil_js_1.errorUtil.errToObj(message) });\n }\n ulid(message) {\n return this._addCheck({ kind: \"ulid\", ...errorUtil_js_1.errorUtil.errToObj(message) });\n }\n base64(message) {\n return this._addCheck({ kind: \"base64\", ...errorUtil_js_1.errorUtil.errToObj(message) });\n }\n base64url(message) {\n return this._addCheck({\n kind: \"base64url\",\n ...errorUtil_js_1.errorUtil.errToObj(message)\n });\n }\n jwt(options) {\n return this._addCheck({ kind: \"jwt\", ...errorUtil_js_1.errorUtil.errToObj(options) });\n }\n ip(options) {\n return this._addCheck({ kind: \"ip\", ...errorUtil_js_1.errorUtil.errToObj(options) });\n }\n cidr(options) {\n return this._addCheck({ kind: \"cidr\", ...errorUtil_js_1.errorUtil.errToObj(options) });\n }\n datetime(options) {\n if (typeof options === \"string\") {\n return this._addCheck({\n kind: \"datetime\",\n precision: null,\n offset: false,\n local: false,\n message: options\n });\n }\n return this._addCheck({\n kind: \"datetime\",\n precision: typeof options?.precision === \"undefined\" ? null : options?.precision,\n offset: options?.offset ?? false,\n local: options?.local ?? false,\n ...errorUtil_js_1.errorUtil.errToObj(options?.message)\n });\n }\n date(message) {\n return this._addCheck({ kind: \"date\", message });\n }\n time(options) {\n if (typeof options === \"string\") {\n return this._addCheck({\n kind: \"time\",\n precision: null,\n message: options\n });\n }\n return this._addCheck({\n kind: \"time\",\n precision: typeof options?.precision === \"undefined\" ? null : options?.precision,\n ...errorUtil_js_1.errorUtil.errToObj(options?.message)\n });\n }\n duration(message) {\n return this._addCheck({ kind: \"duration\", ...errorUtil_js_1.errorUtil.errToObj(message) });\n }\n regex(regex2, message) {\n return this._addCheck({\n kind: \"regex\",\n regex: regex2,\n ...errorUtil_js_1.errorUtil.errToObj(message)\n });\n }\n includes(value, options) {\n return this._addCheck({\n kind: \"includes\",\n value,\n position: options?.position,\n ...errorUtil_js_1.errorUtil.errToObj(options?.message)\n });\n }\n startsWith(value, message) {\n return this._addCheck({\n kind: \"startsWith\",\n value,\n ...errorUtil_js_1.errorUtil.errToObj(message)\n });\n }\n endsWith(value, message) {\n return this._addCheck({\n kind: \"endsWith\",\n value,\n ...errorUtil_js_1.errorUtil.errToObj(message)\n });\n }\n min(minLength2, message) {\n return this._addCheck({\n kind: \"min\",\n value: minLength2,\n ...errorUtil_js_1.errorUtil.errToObj(message)\n });\n }\n max(maxLength, message) {\n return this._addCheck({\n kind: \"max\",\n value: maxLength,\n ...errorUtil_js_1.errorUtil.errToObj(message)\n });\n }\n length(len, message) {\n return this._addCheck({\n kind: \"length\",\n value: len,\n ...errorUtil_js_1.errorUtil.errToObj(message)\n });\n }\n /**\n * Equivalent to `.min(1)`\n */\n nonempty(message) {\n return this.min(1, errorUtil_js_1.errorUtil.errToObj(message));\n }\n trim() {\n return new _ZodString({\n ...this._def,\n checks: [...this._def.checks, { kind: \"trim\" }]\n });\n }\n toLowerCase() {\n return new _ZodString({\n ...this._def,\n checks: [...this._def.checks, { kind: \"toLowerCase\" }]\n });\n }\n toUpperCase() {\n return new _ZodString({\n ...this._def,\n checks: [...this._def.checks, { kind: \"toUpperCase\" }]\n });\n }\n get isDatetime() {\n return !!this._def.checks.find((ch) => ch.kind === \"datetime\");\n }\n get isDate() {\n return !!this._def.checks.find((ch) => ch.kind === \"date\");\n }\n get isTime() {\n return !!this._def.checks.find((ch) => ch.kind === \"time\");\n }\n get isDuration() {\n return !!this._def.checks.find((ch) => ch.kind === \"duration\");\n }\n get isEmail() {\n return !!this._def.checks.find((ch) => ch.kind === \"email\");\n }\n get isURL() {\n return !!this._def.checks.find((ch) => ch.kind === \"url\");\n }\n get isEmoji() {\n return !!this._def.checks.find((ch) => ch.kind === \"emoji\");\n }\n get isUUID() {\n return !!this._def.checks.find((ch) => ch.kind === \"uuid\");\n }\n get isNANOID() {\n return !!this._def.checks.find((ch) => ch.kind === \"nanoid\");\n }\n get isCUID() {\n return !!this._def.checks.find((ch) => ch.kind === \"cuid\");\n }\n get isCUID2() {\n return !!this._def.checks.find((ch) => ch.kind === \"cuid2\");\n }\n get isULID() {\n return !!this._def.checks.find((ch) => ch.kind === \"ulid\");\n }\n get isIP() {\n return !!this._def.checks.find((ch) => ch.kind === \"ip\");\n }\n get isCIDR() {\n return !!this._def.checks.find((ch) => ch.kind === \"cidr\");\n }\n get isBase64() {\n return !!this._def.checks.find((ch) => ch.kind === \"base64\");\n }\n get isBase64url() {\n return !!this._def.checks.find((ch) => ch.kind === \"base64url\");\n }\n get minLength() {\n let min = null;\n for (const ch of this._def.checks) {\n if (ch.kind === \"min\") {\n if (min === null || ch.value > min)\n min = ch.value;\n }\n }\n return min;\n }\n get maxLength() {\n let max = null;\n for (const ch of this._def.checks) {\n if (ch.kind === \"max\") {\n if (max === null || ch.value < max)\n max = ch.value;\n }\n }\n return max;\n }\n };\n exports3.ZodString = ZodString2;\n ZodString2.create = (params) => {\n return new ZodString2({\n checks: [],\n typeName: ZodFirstPartyTypeKind2.ZodString,\n coerce: params?.coerce ?? false,\n ...processCreateParams2(params)\n });\n };\n function floatSafeRemainder2(val, step) {\n const valDecCount = (val.toString().split(\".\")[1] || \"\").length;\n const stepDecCount = (step.toString().split(\".\")[1] || \"\").length;\n const decCount = valDecCount > stepDecCount ? valDecCount : stepDecCount;\n const valInt = Number.parseInt(val.toFixed(decCount).replace(\".\", \"\"));\n const stepInt = Number.parseInt(step.toFixed(decCount).replace(\".\", \"\"));\n return valInt % stepInt / 10 ** decCount;\n }\n var ZodNumber2 = class _ZodNumber extends ZodType2 {\n constructor() {\n super(...arguments);\n this.min = this.gte;\n this.max = this.lte;\n this.step = this.multipleOf;\n }\n _parse(input) {\n if (this._def.coerce) {\n input.data = Number(input.data);\n }\n const parsedType = this._getType(input);\n if (parsedType !== util_js_1.ZodParsedType.number) {\n const ctx2 = this._getOrReturnCtx(input);\n (0, parseUtil_js_1.addIssueToContext)(ctx2, {\n code: ZodError_js_1.ZodIssueCode.invalid_type,\n expected: util_js_1.ZodParsedType.number,\n received: ctx2.parsedType\n });\n return parseUtil_js_1.INVALID;\n }\n let ctx = void 0;\n const status = new parseUtil_js_1.ParseStatus();\n for (const check of this._def.checks) {\n if (check.kind === \"int\") {\n if (!util_js_1.util.isInteger(input.data)) {\n ctx = this._getOrReturnCtx(input, ctx);\n (0, parseUtil_js_1.addIssueToContext)(ctx, {\n code: ZodError_js_1.ZodIssueCode.invalid_type,\n expected: \"integer\",\n received: \"float\",\n message: check.message\n });\n status.dirty();\n }\n } else if (check.kind === \"min\") {\n const tooSmall = check.inclusive ? input.data < check.value : input.data <= check.value;\n if (tooSmall) {\n ctx = this._getOrReturnCtx(input, ctx);\n (0, parseUtil_js_1.addIssueToContext)(ctx, {\n code: ZodError_js_1.ZodIssueCode.too_small,\n minimum: check.value,\n type: \"number\",\n inclusive: check.inclusive,\n exact: false,\n message: check.message\n });\n status.dirty();\n }\n } else if (check.kind === \"max\") {\n const tooBig = check.inclusive ? input.data > check.value : input.data >= check.value;\n if (tooBig) {\n ctx = this._getOrReturnCtx(input, ctx);\n (0, parseUtil_js_1.addIssueToContext)(ctx, {\n code: ZodError_js_1.ZodIssueCode.too_big,\n maximum: check.value,\n type: \"number\",\n inclusive: check.inclusive,\n exact: false,\n message: check.message\n });\n status.dirty();\n }\n } else if (check.kind === \"multipleOf\") {\n if (floatSafeRemainder2(input.data, check.value) !== 0) {\n ctx = this._getOrReturnCtx(input, ctx);\n (0, parseUtil_js_1.addIssueToContext)(ctx, {\n code: ZodError_js_1.ZodIssueCode.not_multiple_of,\n multipleOf: check.value,\n message: check.message\n });\n status.dirty();\n }\n } else if (check.kind === \"finite\") {\n if (!Number.isFinite(input.data)) {\n ctx = this._getOrReturnCtx(input, ctx);\n (0, parseUtil_js_1.addIssueToContext)(ctx, {\n code: ZodError_js_1.ZodIssueCode.not_finite,\n message: check.message\n });\n status.dirty();\n }\n } else {\n util_js_1.util.assertNever(check);\n }\n }\n return { status: status.value, value: input.data };\n }\n gte(value, message) {\n return this.setLimit(\"min\", value, true, errorUtil_js_1.errorUtil.toString(message));\n }\n gt(value, message) {\n return this.setLimit(\"min\", value, false, errorUtil_js_1.errorUtil.toString(message));\n }\n lte(value, message) {\n return this.setLimit(\"max\", value, true, errorUtil_js_1.errorUtil.toString(message));\n }\n lt(value, message) {\n return this.setLimit(\"max\", value, false, errorUtil_js_1.errorUtil.toString(message));\n }\n setLimit(kind, value, inclusive, message) {\n return new _ZodNumber({\n ...this._def,\n checks: [\n ...this._def.checks,\n {\n kind,\n value,\n inclusive,\n message: errorUtil_js_1.errorUtil.toString(message)\n }\n ]\n });\n }\n _addCheck(check) {\n return new _ZodNumber({\n ...this._def,\n checks: [...this._def.checks, check]\n });\n }\n int(message) {\n return this._addCheck({\n kind: \"int\",\n message: errorUtil_js_1.errorUtil.toString(message)\n });\n }\n positive(message) {\n return this._addCheck({\n kind: \"min\",\n value: 0,\n inclusive: false,\n message: errorUtil_js_1.errorUtil.toString(message)\n });\n }\n negative(message) {\n return this._addCheck({\n kind: \"max\",\n value: 0,\n inclusive: false,\n message: errorUtil_js_1.errorUtil.toString(message)\n });\n }\n nonpositive(message) {\n return this._addCheck({\n kind: \"max\",\n value: 0,\n inclusive: true,\n message: errorUtil_js_1.errorUtil.toString(message)\n });\n }\n nonnegative(message) {\n return this._addCheck({\n kind: \"min\",\n value: 0,\n inclusive: true,\n message: errorUtil_js_1.errorUtil.toString(message)\n });\n }\n multipleOf(value, message) {\n return this._addCheck({\n kind: \"multipleOf\",\n value,\n message: errorUtil_js_1.errorUtil.toString(message)\n });\n }\n finite(message) {\n return this._addCheck({\n kind: \"finite\",\n message: errorUtil_js_1.errorUtil.toString(message)\n });\n }\n safe(message) {\n return this._addCheck({\n kind: \"min\",\n inclusive: true,\n value: Number.MIN_SAFE_INTEGER,\n message: errorUtil_js_1.errorUtil.toString(message)\n })._addCheck({\n kind: \"max\",\n inclusive: true,\n value: Number.MAX_SAFE_INTEGER,\n message: errorUtil_js_1.errorUtil.toString(message)\n });\n }\n get minValue() {\n let min = null;\n for (const ch of this._def.checks) {\n if (ch.kind === \"min\") {\n if (min === null || ch.value > min)\n min = ch.value;\n }\n }\n return min;\n }\n get maxValue() {\n let max = null;\n for (const ch of this._def.checks) {\n if (ch.kind === \"max\") {\n if (max === null || ch.value < max)\n max = ch.value;\n }\n }\n return max;\n }\n get isInt() {\n return !!this._def.checks.find((ch) => ch.kind === \"int\" || ch.kind === \"multipleOf\" && util_js_1.util.isInteger(ch.value));\n }\n get isFinite() {\n let max = null;\n let min = null;\n for (const ch of this._def.checks) {\n if (ch.kind === \"finite\" || ch.kind === \"int\" || ch.kind === \"multipleOf\") {\n return true;\n } else if (ch.kind === \"min\") {\n if (min === null || ch.value > min)\n min = ch.value;\n } else if (ch.kind === \"max\") {\n if (max === null || ch.value < max)\n max = ch.value;\n }\n }\n return Number.isFinite(min) && Number.isFinite(max);\n }\n };\n exports3.ZodNumber = ZodNumber2;\n ZodNumber2.create = (params) => {\n return new ZodNumber2({\n checks: [],\n typeName: ZodFirstPartyTypeKind2.ZodNumber,\n coerce: params?.coerce || false,\n ...processCreateParams2(params)\n });\n };\n var ZodBigInt2 = class _ZodBigInt extends ZodType2 {\n constructor() {\n super(...arguments);\n this.min = this.gte;\n this.max = this.lte;\n }\n _parse(input) {\n if (this._def.coerce) {\n try {\n input.data = BigInt(input.data);\n } catch {\n return this._getInvalidInput(input);\n }\n }\n const parsedType = this._getType(input);\n if (parsedType !== util_js_1.ZodParsedType.bigint) {\n return this._getInvalidInput(input);\n }\n let ctx = void 0;\n const status = new parseUtil_js_1.ParseStatus();\n for (const check of this._def.checks) {\n if (check.kind === \"min\") {\n const tooSmall = check.inclusive ? input.data < check.value : input.data <= check.value;\n if (tooSmall) {\n ctx = this._getOrReturnCtx(input, ctx);\n (0, parseUtil_js_1.addIssueToContext)(ctx, {\n code: ZodError_js_1.ZodIssueCode.too_small,\n type: \"bigint\",\n minimum: check.value,\n inclusive: check.inclusive,\n message: check.message\n });\n status.dirty();\n }\n } else if (check.kind === \"max\") {\n const tooBig = check.inclusive ? input.data > check.value : input.data >= check.value;\n if (tooBig) {\n ctx = this._getOrReturnCtx(input, ctx);\n (0, parseUtil_js_1.addIssueToContext)(ctx, {\n code: ZodError_js_1.ZodIssueCode.too_big,\n type: \"bigint\",\n maximum: check.value,\n inclusive: check.inclusive,\n message: check.message\n });\n status.dirty();\n }\n } else if (check.kind === \"multipleOf\") {\n if (input.data % check.value !== BigInt(0)) {\n ctx = this._getOrReturnCtx(input, ctx);\n (0, parseUtil_js_1.addIssueToContext)(ctx, {\n code: ZodError_js_1.ZodIssueCode.not_multiple_of,\n multipleOf: check.value,\n message: check.message\n });\n status.dirty();\n }\n } else {\n util_js_1.util.assertNever(check);\n }\n }\n return { status: status.value, value: input.data };\n }\n _getInvalidInput(input) {\n const ctx = this._getOrReturnCtx(input);\n (0, parseUtil_js_1.addIssueToContext)(ctx, {\n code: ZodError_js_1.ZodIssueCode.invalid_type,\n expected: util_js_1.ZodParsedType.bigint,\n received: ctx.parsedType\n });\n return parseUtil_js_1.INVALID;\n }\n gte(value, message) {\n return this.setLimit(\"min\", value, true, errorUtil_js_1.errorUtil.toString(message));\n }\n gt(value, message) {\n return this.setLimit(\"min\", value, false, errorUtil_js_1.errorUtil.toString(message));\n }\n lte(value, message) {\n return this.setLimit(\"max\", value, true, errorUtil_js_1.errorUtil.toString(message));\n }\n lt(value, message) {\n return this.setLimit(\"max\", value, false, errorUtil_js_1.errorUtil.toString(message));\n }\n setLimit(kind, value, inclusive, message) {\n return new _ZodBigInt({\n ...this._def,\n checks: [\n ...this._def.checks,\n {\n kind,\n value,\n inclusive,\n message: errorUtil_js_1.errorUtil.toString(message)\n }\n ]\n });\n }\n _addCheck(check) {\n return new _ZodBigInt({\n ...this._def,\n checks: [...this._def.checks, check]\n });\n }\n positive(message) {\n return this._addCheck({\n kind: \"min\",\n value: BigInt(0),\n inclusive: false,\n message: errorUtil_js_1.errorUtil.toString(message)\n });\n }\n negative(message) {\n return this._addCheck({\n kind: \"max\",\n value: BigInt(0),\n inclusive: false,\n message: errorUtil_js_1.errorUtil.toString(message)\n });\n }\n nonpositive(message) {\n return this._addCheck({\n kind: \"max\",\n value: BigInt(0),\n inclusive: true,\n message: errorUtil_js_1.errorUtil.toString(message)\n });\n }\n nonnegative(message) {\n return this._addCheck({\n kind: \"min\",\n value: BigInt(0),\n inclusive: true,\n message: errorUtil_js_1.errorUtil.toString(message)\n });\n }\n multipleOf(value, message) {\n return this._addCheck({\n kind: \"multipleOf\",\n value,\n message: errorUtil_js_1.errorUtil.toString(message)\n });\n }\n get minValue() {\n let min = null;\n for (const ch of this._def.checks) {\n if (ch.kind === \"min\") {\n if (min === null || ch.value > min)\n min = ch.value;\n }\n }\n return min;\n }\n get maxValue() {\n let max = null;\n for (const ch of this._def.checks) {\n if (ch.kind === \"max\") {\n if (max === null || ch.value < max)\n max = ch.value;\n }\n }\n return max;\n }\n };\n exports3.ZodBigInt = ZodBigInt2;\n ZodBigInt2.create = (params) => {\n return new ZodBigInt2({\n checks: [],\n typeName: ZodFirstPartyTypeKind2.ZodBigInt,\n coerce: params?.coerce ?? false,\n ...processCreateParams2(params)\n });\n };\n var ZodBoolean2 = class extends ZodType2 {\n _parse(input) {\n if (this._def.coerce) {\n input.data = Boolean(input.data);\n }\n const parsedType = this._getType(input);\n if (parsedType !== util_js_1.ZodParsedType.boolean) {\n const ctx = this._getOrReturnCtx(input);\n (0, parseUtil_js_1.addIssueToContext)(ctx, {\n code: ZodError_js_1.ZodIssueCode.invalid_type,\n expected: util_js_1.ZodParsedType.boolean,\n received: ctx.parsedType\n });\n return parseUtil_js_1.INVALID;\n }\n return (0, parseUtil_js_1.OK)(input.data);\n }\n };\n exports3.ZodBoolean = ZodBoolean2;\n ZodBoolean2.create = (params) => {\n return new ZodBoolean2({\n typeName: ZodFirstPartyTypeKind2.ZodBoolean,\n coerce: params?.coerce || false,\n ...processCreateParams2(params)\n });\n };\n var ZodDate2 = class _ZodDate extends ZodType2 {\n _parse(input) {\n if (this._def.coerce) {\n input.data = new Date(input.data);\n }\n const parsedType = this._getType(input);\n if (parsedType !== util_js_1.ZodParsedType.date) {\n const ctx2 = this._getOrReturnCtx(input);\n (0, parseUtil_js_1.addIssueToContext)(ctx2, {\n code: ZodError_js_1.ZodIssueCode.invalid_type,\n expected: util_js_1.ZodParsedType.date,\n received: ctx2.parsedType\n });\n return parseUtil_js_1.INVALID;\n }\n if (Number.isNaN(input.data.getTime())) {\n const ctx2 = this._getOrReturnCtx(input);\n (0, parseUtil_js_1.addIssueToContext)(ctx2, {\n code: ZodError_js_1.ZodIssueCode.invalid_date\n });\n return parseUtil_js_1.INVALID;\n }\n const status = new parseUtil_js_1.ParseStatus();\n let ctx = void 0;\n for (const check of this._def.checks) {\n if (check.kind === \"min\") {\n if (input.data.getTime() < check.value) {\n ctx = this._getOrReturnCtx(input, ctx);\n (0, parseUtil_js_1.addIssueToContext)(ctx, {\n code: ZodError_js_1.ZodIssueCode.too_small,\n message: check.message,\n inclusive: true,\n exact: false,\n minimum: check.value,\n type: \"date\"\n });\n status.dirty();\n }\n } else if (check.kind === \"max\") {\n if (input.data.getTime() > check.value) {\n ctx = this._getOrReturnCtx(input, ctx);\n (0, parseUtil_js_1.addIssueToContext)(ctx, {\n code: ZodError_js_1.ZodIssueCode.too_big,\n message: check.message,\n inclusive: true,\n exact: false,\n maximum: check.value,\n type: \"date\"\n });\n status.dirty();\n }\n } else {\n util_js_1.util.assertNever(check);\n }\n }\n return {\n status: status.value,\n value: new Date(input.data.getTime())\n };\n }\n _addCheck(check) {\n return new _ZodDate({\n ...this._def,\n checks: [...this._def.checks, check]\n });\n }\n min(minDate, message) {\n return this._addCheck({\n kind: \"min\",\n value: minDate.getTime(),\n message: errorUtil_js_1.errorUtil.toString(message)\n });\n }\n max(maxDate, message) {\n return this._addCheck({\n kind: \"max\",\n value: maxDate.getTime(),\n message: errorUtil_js_1.errorUtil.toString(message)\n });\n }\n get minDate() {\n let min = null;\n for (const ch of this._def.checks) {\n if (ch.kind === \"min\") {\n if (min === null || ch.value > min)\n min = ch.value;\n }\n }\n return min != null ? new Date(min) : null;\n }\n get maxDate() {\n let max = null;\n for (const ch of this._def.checks) {\n if (ch.kind === \"max\") {\n if (max === null || ch.value < max)\n max = ch.value;\n }\n }\n return max != null ? new Date(max) : null;\n }\n };\n exports3.ZodDate = ZodDate2;\n ZodDate2.create = (params) => {\n return new ZodDate2({\n checks: [],\n coerce: params?.coerce || false,\n typeName: ZodFirstPartyTypeKind2.ZodDate,\n ...processCreateParams2(params)\n });\n };\n var ZodSymbol2 = class extends ZodType2 {\n _parse(input) {\n const parsedType = this._getType(input);\n if (parsedType !== util_js_1.ZodParsedType.symbol) {\n const ctx = this._getOrReturnCtx(input);\n (0, parseUtil_js_1.addIssueToContext)(ctx, {\n code: ZodError_js_1.ZodIssueCode.invalid_type,\n expected: util_js_1.ZodParsedType.symbol,\n received: ctx.parsedType\n });\n return parseUtil_js_1.INVALID;\n }\n return (0, parseUtil_js_1.OK)(input.data);\n }\n };\n exports3.ZodSymbol = ZodSymbol2;\n ZodSymbol2.create = (params) => {\n return new ZodSymbol2({\n typeName: ZodFirstPartyTypeKind2.ZodSymbol,\n ...processCreateParams2(params)\n });\n };\n var ZodUndefined2 = class extends ZodType2 {\n _parse(input) {\n const parsedType = this._getType(input);\n if (parsedType !== util_js_1.ZodParsedType.undefined) {\n const ctx = this._getOrReturnCtx(input);\n (0, parseUtil_js_1.addIssueToContext)(ctx, {\n code: ZodError_js_1.ZodIssueCode.invalid_type,\n expected: util_js_1.ZodParsedType.undefined,\n received: ctx.parsedType\n });\n return parseUtil_js_1.INVALID;\n }\n return (0, parseUtil_js_1.OK)(input.data);\n }\n };\n exports3.ZodUndefined = ZodUndefined2;\n ZodUndefined2.create = (params) => {\n return new ZodUndefined2({\n typeName: ZodFirstPartyTypeKind2.ZodUndefined,\n ...processCreateParams2(params)\n });\n };\n var ZodNull2 = class extends ZodType2 {\n _parse(input) {\n const parsedType = this._getType(input);\n if (parsedType !== util_js_1.ZodParsedType.null) {\n const ctx = this._getOrReturnCtx(input);\n (0, parseUtil_js_1.addIssueToContext)(ctx, {\n code: ZodError_js_1.ZodIssueCode.invalid_type,\n expected: util_js_1.ZodParsedType.null,\n received: ctx.parsedType\n });\n return parseUtil_js_1.INVALID;\n }\n return (0, parseUtil_js_1.OK)(input.data);\n }\n };\n exports3.ZodNull = ZodNull2;\n ZodNull2.create = (params) => {\n return new ZodNull2({\n typeName: ZodFirstPartyTypeKind2.ZodNull,\n ...processCreateParams2(params)\n });\n };\n var ZodAny2 = class extends ZodType2 {\n constructor() {\n super(...arguments);\n this._any = true;\n }\n _parse(input) {\n return (0, parseUtil_js_1.OK)(input.data);\n }\n };\n exports3.ZodAny = ZodAny2;\n ZodAny2.create = (params) => {\n return new ZodAny2({\n typeName: ZodFirstPartyTypeKind2.ZodAny,\n ...processCreateParams2(params)\n });\n };\n var ZodUnknown2 = class extends ZodType2 {\n constructor() {\n super(...arguments);\n this._unknown = true;\n }\n _parse(input) {\n return (0, parseUtil_js_1.OK)(input.data);\n }\n };\n exports3.ZodUnknown = ZodUnknown2;\n ZodUnknown2.create = (params) => {\n return new ZodUnknown2({\n typeName: ZodFirstPartyTypeKind2.ZodUnknown,\n ...processCreateParams2(params)\n });\n };\n var ZodNever2 = class extends ZodType2 {\n _parse(input) {\n const ctx = this._getOrReturnCtx(input);\n (0, parseUtil_js_1.addIssueToContext)(ctx, {\n code: ZodError_js_1.ZodIssueCode.invalid_type,\n expected: util_js_1.ZodParsedType.never,\n received: ctx.parsedType\n });\n return parseUtil_js_1.INVALID;\n }\n };\n exports3.ZodNever = ZodNever2;\n ZodNever2.create = (params) => {\n return new ZodNever2({\n typeName: ZodFirstPartyTypeKind2.ZodNever,\n ...processCreateParams2(params)\n });\n };\n var ZodVoid2 = class extends ZodType2 {\n _parse(input) {\n const parsedType = this._getType(input);\n if (parsedType !== util_js_1.ZodParsedType.undefined) {\n const ctx = this._getOrReturnCtx(input);\n (0, parseUtil_js_1.addIssueToContext)(ctx, {\n code: ZodError_js_1.ZodIssueCode.invalid_type,\n expected: util_js_1.ZodParsedType.void,\n received: ctx.parsedType\n });\n return parseUtil_js_1.INVALID;\n }\n return (0, parseUtil_js_1.OK)(input.data);\n }\n };\n exports3.ZodVoid = ZodVoid2;\n ZodVoid2.create = (params) => {\n return new ZodVoid2({\n typeName: ZodFirstPartyTypeKind2.ZodVoid,\n ...processCreateParams2(params)\n });\n };\n var ZodArray2 = class _ZodArray extends ZodType2 {\n _parse(input) {\n const { ctx, status } = this._processInputParams(input);\n const def = this._def;\n if (ctx.parsedType !== util_js_1.ZodParsedType.array) {\n (0, parseUtil_js_1.addIssueToContext)(ctx, {\n code: ZodError_js_1.ZodIssueCode.invalid_type,\n expected: util_js_1.ZodParsedType.array,\n received: ctx.parsedType\n });\n return parseUtil_js_1.INVALID;\n }\n if (def.exactLength !== null) {\n const tooBig = ctx.data.length > def.exactLength.value;\n const tooSmall = ctx.data.length < def.exactLength.value;\n if (tooBig || tooSmall) {\n (0, parseUtil_js_1.addIssueToContext)(ctx, {\n code: tooBig ? ZodError_js_1.ZodIssueCode.too_big : ZodError_js_1.ZodIssueCode.too_small,\n minimum: tooSmall ? def.exactLength.value : void 0,\n maximum: tooBig ? def.exactLength.value : void 0,\n type: \"array\",\n inclusive: true,\n exact: true,\n message: def.exactLength.message\n });\n status.dirty();\n }\n }\n if (def.minLength !== null) {\n if (ctx.data.length < def.minLength.value) {\n (0, parseUtil_js_1.addIssueToContext)(ctx, {\n code: ZodError_js_1.ZodIssueCode.too_small,\n minimum: def.minLength.value,\n type: \"array\",\n inclusive: true,\n exact: false,\n message: def.minLength.message\n });\n status.dirty();\n }\n }\n if (def.maxLength !== null) {\n if (ctx.data.length > def.maxLength.value) {\n (0, parseUtil_js_1.addIssueToContext)(ctx, {\n code: ZodError_js_1.ZodIssueCode.too_big,\n maximum: def.maxLength.value,\n type: \"array\",\n inclusive: true,\n exact: false,\n message: def.maxLength.message\n });\n status.dirty();\n }\n }\n if (ctx.common.async) {\n return Promise.all([...ctx.data].map((item, i3) => {\n return def.type._parseAsync(new ParseInputLazyPath2(ctx, item, ctx.path, i3));\n })).then((result2) => {\n return parseUtil_js_1.ParseStatus.mergeArray(status, result2);\n });\n }\n const result = [...ctx.data].map((item, i3) => {\n return def.type._parseSync(new ParseInputLazyPath2(ctx, item, ctx.path, i3));\n });\n return parseUtil_js_1.ParseStatus.mergeArray(status, result);\n }\n get element() {\n return this._def.type;\n }\n min(minLength2, message) {\n return new _ZodArray({\n ...this._def,\n minLength: { value: minLength2, message: errorUtil_js_1.errorUtil.toString(message) }\n });\n }\n max(maxLength, message) {\n return new _ZodArray({\n ...this._def,\n maxLength: { value: maxLength, message: errorUtil_js_1.errorUtil.toString(message) }\n });\n }\n length(len, message) {\n return new _ZodArray({\n ...this._def,\n exactLength: { value: len, message: errorUtil_js_1.errorUtil.toString(message) }\n });\n }\n nonempty(message) {\n return this.min(1, message);\n }\n };\n exports3.ZodArray = ZodArray2;\n ZodArray2.create = (schema, params) => {\n return new ZodArray2({\n type: schema,\n minLength: null,\n maxLength: null,\n exactLength: null,\n typeName: ZodFirstPartyTypeKind2.ZodArray,\n ...processCreateParams2(params)\n });\n };\n function deepPartialify2(schema) {\n if (schema instanceof ZodObject2) {\n const newShape = {};\n for (const key in schema.shape) {\n const fieldSchema = schema.shape[key];\n newShape[key] = ZodOptional2.create(deepPartialify2(fieldSchema));\n }\n return new ZodObject2({\n ...schema._def,\n shape: () => newShape\n });\n } else if (schema instanceof ZodArray2) {\n return new ZodArray2({\n ...schema._def,\n type: deepPartialify2(schema.element)\n });\n } else if (schema instanceof ZodOptional2) {\n return ZodOptional2.create(deepPartialify2(schema.unwrap()));\n } else if (schema instanceof ZodNullable2) {\n return ZodNullable2.create(deepPartialify2(schema.unwrap()));\n } else if (schema instanceof ZodTuple2) {\n return ZodTuple2.create(schema.items.map((item) => deepPartialify2(item)));\n } else {\n return schema;\n }\n }\n var ZodObject2 = class _ZodObject extends ZodType2 {\n constructor() {\n super(...arguments);\n this._cached = null;\n this.nonstrict = this.passthrough;\n this.augment = this.extend;\n }\n _getCached() {\n if (this._cached !== null)\n return this._cached;\n const shape3 = this._def.shape();\n const keys = util_js_1.util.objectKeys(shape3);\n this._cached = { shape: shape3, keys };\n return this._cached;\n }\n _parse(input) {\n const parsedType = this._getType(input);\n if (parsedType !== util_js_1.ZodParsedType.object) {\n const ctx2 = this._getOrReturnCtx(input);\n (0, parseUtil_js_1.addIssueToContext)(ctx2, {\n code: ZodError_js_1.ZodIssueCode.invalid_type,\n expected: util_js_1.ZodParsedType.object,\n received: ctx2.parsedType\n });\n return parseUtil_js_1.INVALID;\n }\n const { status, ctx } = this._processInputParams(input);\n const { shape: shape3, keys: shapeKeys } = this._getCached();\n const extraKeys = [];\n if (!(this._def.catchall instanceof ZodNever2 && this._def.unknownKeys === \"strip\")) {\n for (const key in ctx.data) {\n if (!shapeKeys.includes(key)) {\n extraKeys.push(key);\n }\n }\n }\n const pairs = [];\n for (const key of shapeKeys) {\n const keyValidator = shape3[key];\n const value = ctx.data[key];\n pairs.push({\n key: { status: \"valid\", value: key },\n value: keyValidator._parse(new ParseInputLazyPath2(ctx, value, ctx.path, key)),\n alwaysSet: key in ctx.data\n });\n }\n if (this._def.catchall instanceof ZodNever2) {\n const unknownKeys = this._def.unknownKeys;\n if (unknownKeys === \"passthrough\") {\n for (const key of extraKeys) {\n pairs.push({\n key: { status: \"valid\", value: key },\n value: { status: \"valid\", value: ctx.data[key] }\n });\n }\n } else if (unknownKeys === \"strict\") {\n if (extraKeys.length > 0) {\n (0, parseUtil_js_1.addIssueToContext)(ctx, {\n code: ZodError_js_1.ZodIssueCode.unrecognized_keys,\n keys: extraKeys\n });\n status.dirty();\n }\n } else if (unknownKeys === \"strip\") {\n } else {\n throw new Error(`Internal ZodObject error: invalid unknownKeys value.`);\n }\n } else {\n const catchall = this._def.catchall;\n for (const key of extraKeys) {\n const value = ctx.data[key];\n pairs.push({\n key: { status: \"valid\", value: key },\n value: catchall._parse(\n new ParseInputLazyPath2(ctx, value, ctx.path, key)\n //, ctx.child(key), value, getParsedType(value)\n ),\n alwaysSet: key in ctx.data\n });\n }\n }\n if (ctx.common.async) {\n return Promise.resolve().then(async () => {\n const syncPairs = [];\n for (const pair of pairs) {\n const key = await pair.key;\n const value = await pair.value;\n syncPairs.push({\n key,\n value,\n alwaysSet: pair.alwaysSet\n });\n }\n return syncPairs;\n }).then((syncPairs) => {\n return parseUtil_js_1.ParseStatus.mergeObjectSync(status, syncPairs);\n });\n } else {\n return parseUtil_js_1.ParseStatus.mergeObjectSync(status, pairs);\n }\n }\n get shape() {\n return this._def.shape();\n }\n strict(message) {\n errorUtil_js_1.errorUtil.errToObj;\n return new _ZodObject({\n ...this._def,\n unknownKeys: \"strict\",\n ...message !== void 0 ? {\n errorMap: (issue, ctx) => {\n const defaultError = this._def.errorMap?.(issue, ctx).message ?? ctx.defaultError;\n if (issue.code === \"unrecognized_keys\")\n return {\n message: errorUtil_js_1.errorUtil.errToObj(message).message ?? defaultError\n };\n return {\n message: defaultError\n };\n }\n } : {}\n });\n }\n strip() {\n return new _ZodObject({\n ...this._def,\n unknownKeys: \"strip\"\n });\n }\n passthrough() {\n return new _ZodObject({\n ...this._def,\n unknownKeys: \"passthrough\"\n });\n }\n // const AugmentFactory =\n // (def: Def) =>\n // (\n // augmentation: Augmentation\n // ): ZodObject<\n // extendShape, Augmentation>,\n // Def[\"unknownKeys\"],\n // Def[\"catchall\"]\n // > => {\n // return new ZodObject({\n // ...def,\n // shape: () => ({\n // ...def.shape(),\n // ...augmentation,\n // }),\n // }) as any;\n // };\n extend(augmentation) {\n return new _ZodObject({\n ...this._def,\n shape: () => ({\n ...this._def.shape(),\n ...augmentation\n })\n });\n }\n /**\n * Prior to zod@1.0.12 there was a bug in the\n * inferred type of merged objects. Please\n * upgrade if you are experiencing issues.\n */\n merge(merging) {\n const merged = new _ZodObject({\n unknownKeys: merging._def.unknownKeys,\n catchall: merging._def.catchall,\n shape: () => ({\n ...this._def.shape(),\n ...merging._def.shape()\n }),\n typeName: ZodFirstPartyTypeKind2.ZodObject\n });\n return merged;\n }\n // merge<\n // Incoming extends AnyZodObject,\n // Augmentation extends Incoming[\"shape\"],\n // NewOutput extends {\n // [k in keyof Augmentation | keyof Output]: k extends keyof Augmentation\n // ? Augmentation[k][\"_output\"]\n // : k extends keyof Output\n // ? Output[k]\n // : never;\n // },\n // NewInput extends {\n // [k in keyof Augmentation | keyof Input]: k extends keyof Augmentation\n // ? Augmentation[k][\"_input\"]\n // : k extends keyof Input\n // ? Input[k]\n // : never;\n // }\n // >(\n // merging: Incoming\n // ): ZodObject<\n // extendShape>,\n // Incoming[\"_def\"][\"unknownKeys\"],\n // Incoming[\"_def\"][\"catchall\"],\n // NewOutput,\n // NewInput\n // > {\n // const merged: any = new ZodObject({\n // unknownKeys: merging._def.unknownKeys,\n // catchall: merging._def.catchall,\n // shape: () =>\n // objectUtil.mergeShapes(this._def.shape(), merging._def.shape()),\n // typeName: ZodFirstPartyTypeKind.ZodObject,\n // }) as any;\n // return merged;\n // }\n setKey(key, schema) {\n return this.augment({ [key]: schema });\n }\n // merge(\n // merging: Incoming\n // ): //ZodObject = (merging) => {\n // ZodObject<\n // extendShape>,\n // Incoming[\"_def\"][\"unknownKeys\"],\n // Incoming[\"_def\"][\"catchall\"]\n // > {\n // // const mergedShape = objectUtil.mergeShapes(\n // // this._def.shape(),\n // // merging._def.shape()\n // // );\n // const merged: any = new ZodObject({\n // unknownKeys: merging._def.unknownKeys,\n // catchall: merging._def.catchall,\n // shape: () =>\n // objectUtil.mergeShapes(this._def.shape(), merging._def.shape()),\n // typeName: ZodFirstPartyTypeKind.ZodObject,\n // }) as any;\n // return merged;\n // }\n catchall(index2) {\n return new _ZodObject({\n ...this._def,\n catchall: index2\n });\n }\n pick(mask) {\n const shape3 = {};\n for (const key of util_js_1.util.objectKeys(mask)) {\n if (mask[key] && this.shape[key]) {\n shape3[key] = this.shape[key];\n }\n }\n return new _ZodObject({\n ...this._def,\n shape: () => shape3\n });\n }\n omit(mask) {\n const shape3 = {};\n for (const key of util_js_1.util.objectKeys(this.shape)) {\n if (!mask[key]) {\n shape3[key] = this.shape[key];\n }\n }\n return new _ZodObject({\n ...this._def,\n shape: () => shape3\n });\n }\n /**\n * @deprecated\n */\n deepPartial() {\n return deepPartialify2(this);\n }\n partial(mask) {\n const newShape = {};\n for (const key of util_js_1.util.objectKeys(this.shape)) {\n const fieldSchema = this.shape[key];\n if (mask && !mask[key]) {\n newShape[key] = fieldSchema;\n } else {\n newShape[key] = fieldSchema.optional();\n }\n }\n return new _ZodObject({\n ...this._def,\n shape: () => newShape\n });\n }\n required(mask) {\n const newShape = {};\n for (const key of util_js_1.util.objectKeys(this.shape)) {\n if (mask && !mask[key]) {\n newShape[key] = this.shape[key];\n } else {\n const fieldSchema = this.shape[key];\n let newField = fieldSchema;\n while (newField instanceof ZodOptional2) {\n newField = newField._def.innerType;\n }\n newShape[key] = newField;\n }\n }\n return new _ZodObject({\n ...this._def,\n shape: () => newShape\n });\n }\n keyof() {\n return createZodEnum2(util_js_1.util.objectKeys(this.shape));\n }\n };\n exports3.ZodObject = ZodObject2;\n ZodObject2.create = (shape3, params) => {\n return new ZodObject2({\n shape: () => shape3,\n unknownKeys: \"strip\",\n catchall: ZodNever2.create(),\n typeName: ZodFirstPartyTypeKind2.ZodObject,\n ...processCreateParams2(params)\n });\n };\n ZodObject2.strictCreate = (shape3, params) => {\n return new ZodObject2({\n shape: () => shape3,\n unknownKeys: \"strict\",\n catchall: ZodNever2.create(),\n typeName: ZodFirstPartyTypeKind2.ZodObject,\n ...processCreateParams2(params)\n });\n };\n ZodObject2.lazycreate = (shape3, params) => {\n return new ZodObject2({\n shape: shape3,\n unknownKeys: \"strip\",\n catchall: ZodNever2.create(),\n typeName: ZodFirstPartyTypeKind2.ZodObject,\n ...processCreateParams2(params)\n });\n };\n var ZodUnion2 = class extends ZodType2 {\n _parse(input) {\n const { ctx } = this._processInputParams(input);\n const options = this._def.options;\n function handleResults(results) {\n for (const result of results) {\n if (result.result.status === \"valid\") {\n return result.result;\n }\n }\n for (const result of results) {\n if (result.result.status === \"dirty\") {\n ctx.common.issues.push(...result.ctx.common.issues);\n return result.result;\n }\n }\n const unionErrors = results.map((result) => new ZodError_js_1.ZodError(result.ctx.common.issues));\n (0, parseUtil_js_1.addIssueToContext)(ctx, {\n code: ZodError_js_1.ZodIssueCode.invalid_union,\n unionErrors\n });\n return parseUtil_js_1.INVALID;\n }\n if (ctx.common.async) {\n return Promise.all(options.map(async (option) => {\n const childCtx = {\n ...ctx,\n common: {\n ...ctx.common,\n issues: []\n },\n parent: null\n };\n return {\n result: await option._parseAsync({\n data: ctx.data,\n path: ctx.path,\n parent: childCtx\n }),\n ctx: childCtx\n };\n })).then(handleResults);\n } else {\n let dirty = void 0;\n const issues = [];\n for (const option of options) {\n const childCtx = {\n ...ctx,\n common: {\n ...ctx.common,\n issues: []\n },\n parent: null\n };\n const result = option._parseSync({\n data: ctx.data,\n path: ctx.path,\n parent: childCtx\n });\n if (result.status === \"valid\") {\n return result;\n } else if (result.status === \"dirty\" && !dirty) {\n dirty = { result, ctx: childCtx };\n }\n if (childCtx.common.issues.length) {\n issues.push(childCtx.common.issues);\n }\n }\n if (dirty) {\n ctx.common.issues.push(...dirty.ctx.common.issues);\n return dirty.result;\n }\n const unionErrors = issues.map((issues2) => new ZodError_js_1.ZodError(issues2));\n (0, parseUtil_js_1.addIssueToContext)(ctx, {\n code: ZodError_js_1.ZodIssueCode.invalid_union,\n unionErrors\n });\n return parseUtil_js_1.INVALID;\n }\n }\n get options() {\n return this._def.options;\n }\n };\n exports3.ZodUnion = ZodUnion2;\n ZodUnion2.create = (types, params) => {\n return new ZodUnion2({\n options: types,\n typeName: ZodFirstPartyTypeKind2.ZodUnion,\n ...processCreateParams2(params)\n });\n };\n var getDiscriminator2 = (type) => {\n if (type instanceof ZodLazy2) {\n return getDiscriminator2(type.schema);\n } else if (type instanceof ZodEffects2) {\n return getDiscriminator2(type.innerType());\n } else if (type instanceof ZodLiteral2) {\n return [type.value];\n } else if (type instanceof ZodEnum2) {\n return type.options;\n } else if (type instanceof ZodNativeEnum2) {\n return util_js_1.util.objectValues(type.enum);\n } else if (type instanceof ZodDefault2) {\n return getDiscriminator2(type._def.innerType);\n } else if (type instanceof ZodUndefined2) {\n return [void 0];\n } else if (type instanceof ZodNull2) {\n return [null];\n } else if (type instanceof ZodOptional2) {\n return [void 0, ...getDiscriminator2(type.unwrap())];\n } else if (type instanceof ZodNullable2) {\n return [null, ...getDiscriminator2(type.unwrap())];\n } else if (type instanceof ZodBranded2) {\n return getDiscriminator2(type.unwrap());\n } else if (type instanceof ZodReadonly2) {\n return getDiscriminator2(type.unwrap());\n } else if (type instanceof ZodCatch2) {\n return getDiscriminator2(type._def.innerType);\n } else {\n return [];\n }\n };\n var ZodDiscriminatedUnion2 = class _ZodDiscriminatedUnion extends ZodType2 {\n _parse(input) {\n const { ctx } = this._processInputParams(input);\n if (ctx.parsedType !== util_js_1.ZodParsedType.object) {\n (0, parseUtil_js_1.addIssueToContext)(ctx, {\n code: ZodError_js_1.ZodIssueCode.invalid_type,\n expected: util_js_1.ZodParsedType.object,\n received: ctx.parsedType\n });\n return parseUtil_js_1.INVALID;\n }\n const discriminator = this.discriminator;\n const discriminatorValue = ctx.data[discriminator];\n const option = this.optionsMap.get(discriminatorValue);\n if (!option) {\n (0, parseUtil_js_1.addIssueToContext)(ctx, {\n code: ZodError_js_1.ZodIssueCode.invalid_union_discriminator,\n options: Array.from(this.optionsMap.keys()),\n path: [discriminator]\n });\n return parseUtil_js_1.INVALID;\n }\n if (ctx.common.async) {\n return option._parseAsync({\n data: ctx.data,\n path: ctx.path,\n parent: ctx\n });\n } else {\n return option._parseSync({\n data: ctx.data,\n path: ctx.path,\n parent: ctx\n });\n }\n }\n get discriminator() {\n return this._def.discriminator;\n }\n get options() {\n return this._def.options;\n }\n get optionsMap() {\n return this._def.optionsMap;\n }\n /**\n * The constructor of the discriminated union schema. Its behaviour is very similar to that of the normal z.union() constructor.\n * However, it only allows a union of objects, all of which need to share a discriminator property. This property must\n * have a different value for each object in the union.\n * @param discriminator the name of the discriminator property\n * @param types an array of object schemas\n * @param params\n */\n static create(discriminator, options, params) {\n const optionsMap = /* @__PURE__ */ new Map();\n for (const type of options) {\n const discriminatorValues = getDiscriminator2(type.shape[discriminator]);\n if (!discriminatorValues.length) {\n throw new Error(`A discriminator value for key \\`${discriminator}\\` could not be extracted from all schema options`);\n }\n for (const value of discriminatorValues) {\n if (optionsMap.has(value)) {\n throw new Error(`Discriminator property ${String(discriminator)} has duplicate value ${String(value)}`);\n }\n optionsMap.set(value, type);\n }\n }\n return new _ZodDiscriminatedUnion({\n typeName: ZodFirstPartyTypeKind2.ZodDiscriminatedUnion,\n discriminator,\n options,\n optionsMap,\n ...processCreateParams2(params)\n });\n }\n };\n exports3.ZodDiscriminatedUnion = ZodDiscriminatedUnion2;\n function mergeValues2(a3, b4) {\n const aType = (0, util_js_1.getParsedType)(a3);\n const bType = (0, util_js_1.getParsedType)(b4);\n if (a3 === b4) {\n return { valid: true, data: a3 };\n } else if (aType === util_js_1.ZodParsedType.object && bType === util_js_1.ZodParsedType.object) {\n const bKeys = util_js_1.util.objectKeys(b4);\n const sharedKeys = util_js_1.util.objectKeys(a3).filter((key) => bKeys.indexOf(key) !== -1);\n const newObj = { ...a3, ...b4 };\n for (const key of sharedKeys) {\n const sharedValue = mergeValues2(a3[key], b4[key]);\n if (!sharedValue.valid) {\n return { valid: false };\n }\n newObj[key] = sharedValue.data;\n }\n return { valid: true, data: newObj };\n } else if (aType === util_js_1.ZodParsedType.array && bType === util_js_1.ZodParsedType.array) {\n if (a3.length !== b4.length) {\n return { valid: false };\n }\n const newArray = [];\n for (let index2 = 0; index2 < a3.length; index2++) {\n const itemA = a3[index2];\n const itemB = b4[index2];\n const sharedValue = mergeValues2(itemA, itemB);\n if (!sharedValue.valid) {\n return { valid: false };\n }\n newArray.push(sharedValue.data);\n }\n return { valid: true, data: newArray };\n } else if (aType === util_js_1.ZodParsedType.date && bType === util_js_1.ZodParsedType.date && +a3 === +b4) {\n return { valid: true, data: a3 };\n } else {\n return { valid: false };\n }\n }\n var ZodIntersection2 = class extends ZodType2 {\n _parse(input) {\n const { status, ctx } = this._processInputParams(input);\n const handleParsed = (parsedLeft, parsedRight) => {\n if ((0, parseUtil_js_1.isAborted)(parsedLeft) || (0, parseUtil_js_1.isAborted)(parsedRight)) {\n return parseUtil_js_1.INVALID;\n }\n const merged = mergeValues2(parsedLeft.value, parsedRight.value);\n if (!merged.valid) {\n (0, parseUtil_js_1.addIssueToContext)(ctx, {\n code: ZodError_js_1.ZodIssueCode.invalid_intersection_types\n });\n return parseUtil_js_1.INVALID;\n }\n if ((0, parseUtil_js_1.isDirty)(parsedLeft) || (0, parseUtil_js_1.isDirty)(parsedRight)) {\n status.dirty();\n }\n return { status: status.value, value: merged.data };\n };\n if (ctx.common.async) {\n return Promise.all([\n this._def.left._parseAsync({\n data: ctx.data,\n path: ctx.path,\n parent: ctx\n }),\n this._def.right._parseAsync({\n data: ctx.data,\n path: ctx.path,\n parent: ctx\n })\n ]).then(([left, right]) => handleParsed(left, right));\n } else {\n return handleParsed(this._def.left._parseSync({\n data: ctx.data,\n path: ctx.path,\n parent: ctx\n }), this._def.right._parseSync({\n data: ctx.data,\n path: ctx.path,\n parent: ctx\n }));\n }\n }\n };\n exports3.ZodIntersection = ZodIntersection2;\n ZodIntersection2.create = (left, right, params) => {\n return new ZodIntersection2({\n left,\n right,\n typeName: ZodFirstPartyTypeKind2.ZodIntersection,\n ...processCreateParams2(params)\n });\n };\n var ZodTuple2 = class _ZodTuple extends ZodType2 {\n _parse(input) {\n const { status, ctx } = this._processInputParams(input);\n if (ctx.parsedType !== util_js_1.ZodParsedType.array) {\n (0, parseUtil_js_1.addIssueToContext)(ctx, {\n code: ZodError_js_1.ZodIssueCode.invalid_type,\n expected: util_js_1.ZodParsedType.array,\n received: ctx.parsedType\n });\n return parseUtil_js_1.INVALID;\n }\n if (ctx.data.length < this._def.items.length) {\n (0, parseUtil_js_1.addIssueToContext)(ctx, {\n code: ZodError_js_1.ZodIssueCode.too_small,\n minimum: this._def.items.length,\n inclusive: true,\n exact: false,\n type: \"array\"\n });\n return parseUtil_js_1.INVALID;\n }\n const rest = this._def.rest;\n if (!rest && ctx.data.length > this._def.items.length) {\n (0, parseUtil_js_1.addIssueToContext)(ctx, {\n code: ZodError_js_1.ZodIssueCode.too_big,\n maximum: this._def.items.length,\n inclusive: true,\n exact: false,\n type: \"array\"\n });\n status.dirty();\n }\n const items = [...ctx.data].map((item, itemIndex) => {\n const schema = this._def.items[itemIndex] || this._def.rest;\n if (!schema)\n return null;\n return schema._parse(new ParseInputLazyPath2(ctx, item, ctx.path, itemIndex));\n }).filter((x4) => !!x4);\n if (ctx.common.async) {\n return Promise.all(items).then((results) => {\n return parseUtil_js_1.ParseStatus.mergeArray(status, results);\n });\n } else {\n return parseUtil_js_1.ParseStatus.mergeArray(status, items);\n }\n }\n get items() {\n return this._def.items;\n }\n rest(rest) {\n return new _ZodTuple({\n ...this._def,\n rest\n });\n }\n };\n exports3.ZodTuple = ZodTuple2;\n ZodTuple2.create = (schemas, params) => {\n if (!Array.isArray(schemas)) {\n throw new Error(\"You must pass an array of schemas to z.tuple([ ... ])\");\n }\n return new ZodTuple2({\n items: schemas,\n typeName: ZodFirstPartyTypeKind2.ZodTuple,\n rest: null,\n ...processCreateParams2(params)\n });\n };\n var ZodRecord2 = class _ZodRecord extends ZodType2 {\n get keySchema() {\n return this._def.keyType;\n }\n get valueSchema() {\n return this._def.valueType;\n }\n _parse(input) {\n const { status, ctx } = this._processInputParams(input);\n if (ctx.parsedType !== util_js_1.ZodParsedType.object) {\n (0, parseUtil_js_1.addIssueToContext)(ctx, {\n code: ZodError_js_1.ZodIssueCode.invalid_type,\n expected: util_js_1.ZodParsedType.object,\n received: ctx.parsedType\n });\n return parseUtil_js_1.INVALID;\n }\n const pairs = [];\n const keyType = this._def.keyType;\n const valueType = this._def.valueType;\n for (const key in ctx.data) {\n pairs.push({\n key: keyType._parse(new ParseInputLazyPath2(ctx, key, ctx.path, key)),\n value: valueType._parse(new ParseInputLazyPath2(ctx, ctx.data[key], ctx.path, key)),\n alwaysSet: key in ctx.data\n });\n }\n if (ctx.common.async) {\n return parseUtil_js_1.ParseStatus.mergeObjectAsync(status, pairs);\n } else {\n return parseUtil_js_1.ParseStatus.mergeObjectSync(status, pairs);\n }\n }\n get element() {\n return this._def.valueType;\n }\n static create(first, second, third) {\n if (second instanceof ZodType2) {\n return new _ZodRecord({\n keyType: first,\n valueType: second,\n typeName: ZodFirstPartyTypeKind2.ZodRecord,\n ...processCreateParams2(third)\n });\n }\n return new _ZodRecord({\n keyType: ZodString2.create(),\n valueType: first,\n typeName: ZodFirstPartyTypeKind2.ZodRecord,\n ...processCreateParams2(second)\n });\n }\n };\n exports3.ZodRecord = ZodRecord2;\n var ZodMap2 = class extends ZodType2 {\n get keySchema() {\n return this._def.keyType;\n }\n get valueSchema() {\n return this._def.valueType;\n }\n _parse(input) {\n const { status, ctx } = this._processInputParams(input);\n if (ctx.parsedType !== util_js_1.ZodParsedType.map) {\n (0, parseUtil_js_1.addIssueToContext)(ctx, {\n code: ZodError_js_1.ZodIssueCode.invalid_type,\n expected: util_js_1.ZodParsedType.map,\n received: ctx.parsedType\n });\n return parseUtil_js_1.INVALID;\n }\n const keyType = this._def.keyType;\n const valueType = this._def.valueType;\n const pairs = [...ctx.data.entries()].map(([key, value], index2) => {\n return {\n key: keyType._parse(new ParseInputLazyPath2(ctx, key, ctx.path, [index2, \"key\"])),\n value: valueType._parse(new ParseInputLazyPath2(ctx, value, ctx.path, [index2, \"value\"]))\n };\n });\n if (ctx.common.async) {\n const finalMap = /* @__PURE__ */ new Map();\n return Promise.resolve().then(async () => {\n for (const pair of pairs) {\n const key = await pair.key;\n const value = await pair.value;\n if (key.status === \"aborted\" || value.status === \"aborted\") {\n return parseUtil_js_1.INVALID;\n }\n if (key.status === \"dirty\" || value.status === \"dirty\") {\n status.dirty();\n }\n finalMap.set(key.value, value.value);\n }\n return { status: status.value, value: finalMap };\n });\n } else {\n const finalMap = /* @__PURE__ */ new Map();\n for (const pair of pairs) {\n const key = pair.key;\n const value = pair.value;\n if (key.status === \"aborted\" || value.status === \"aborted\") {\n return parseUtil_js_1.INVALID;\n }\n if (key.status === \"dirty\" || value.status === \"dirty\") {\n status.dirty();\n }\n finalMap.set(key.value, value.value);\n }\n return { status: status.value, value: finalMap };\n }\n }\n };\n exports3.ZodMap = ZodMap2;\n ZodMap2.create = (keyType, valueType, params) => {\n return new ZodMap2({\n valueType,\n keyType,\n typeName: ZodFirstPartyTypeKind2.ZodMap,\n ...processCreateParams2(params)\n });\n };\n var ZodSet2 = class _ZodSet extends ZodType2 {\n _parse(input) {\n const { status, ctx } = this._processInputParams(input);\n if (ctx.parsedType !== util_js_1.ZodParsedType.set) {\n (0, parseUtil_js_1.addIssueToContext)(ctx, {\n code: ZodError_js_1.ZodIssueCode.invalid_type,\n expected: util_js_1.ZodParsedType.set,\n received: ctx.parsedType\n });\n return parseUtil_js_1.INVALID;\n }\n const def = this._def;\n if (def.minSize !== null) {\n if (ctx.data.size < def.minSize.value) {\n (0, parseUtil_js_1.addIssueToContext)(ctx, {\n code: ZodError_js_1.ZodIssueCode.too_small,\n minimum: def.minSize.value,\n type: \"set\",\n inclusive: true,\n exact: false,\n message: def.minSize.message\n });\n status.dirty();\n }\n }\n if (def.maxSize !== null) {\n if (ctx.data.size > def.maxSize.value) {\n (0, parseUtil_js_1.addIssueToContext)(ctx, {\n code: ZodError_js_1.ZodIssueCode.too_big,\n maximum: def.maxSize.value,\n type: \"set\",\n inclusive: true,\n exact: false,\n message: def.maxSize.message\n });\n status.dirty();\n }\n }\n const valueType = this._def.valueType;\n function finalizeSet(elements2) {\n const parsedSet = /* @__PURE__ */ new Set();\n for (const element of elements2) {\n if (element.status === \"aborted\")\n return parseUtil_js_1.INVALID;\n if (element.status === \"dirty\")\n status.dirty();\n parsedSet.add(element.value);\n }\n return { status: status.value, value: parsedSet };\n }\n const elements = [...ctx.data.values()].map((item, i3) => valueType._parse(new ParseInputLazyPath2(ctx, item, ctx.path, i3)));\n if (ctx.common.async) {\n return Promise.all(elements).then((elements2) => finalizeSet(elements2));\n } else {\n return finalizeSet(elements);\n }\n }\n min(minSize, message) {\n return new _ZodSet({\n ...this._def,\n minSize: { value: minSize, message: errorUtil_js_1.errorUtil.toString(message) }\n });\n }\n max(maxSize, message) {\n return new _ZodSet({\n ...this._def,\n maxSize: { value: maxSize, message: errorUtil_js_1.errorUtil.toString(message) }\n });\n }\n size(size6, message) {\n return this.min(size6, message).max(size6, message);\n }\n nonempty(message) {\n return this.min(1, message);\n }\n };\n exports3.ZodSet = ZodSet2;\n ZodSet2.create = (valueType, params) => {\n return new ZodSet2({\n valueType,\n minSize: null,\n maxSize: null,\n typeName: ZodFirstPartyTypeKind2.ZodSet,\n ...processCreateParams2(params)\n });\n };\n var ZodFunction2 = class _ZodFunction extends ZodType2 {\n constructor() {\n super(...arguments);\n this.validate = this.implement;\n }\n _parse(input) {\n const { ctx } = this._processInputParams(input);\n if (ctx.parsedType !== util_js_1.ZodParsedType.function) {\n (0, parseUtil_js_1.addIssueToContext)(ctx, {\n code: ZodError_js_1.ZodIssueCode.invalid_type,\n expected: util_js_1.ZodParsedType.function,\n received: ctx.parsedType\n });\n return parseUtil_js_1.INVALID;\n }\n function makeArgsIssue(args, error) {\n return (0, parseUtil_js_1.makeIssue)({\n data: args,\n path: ctx.path,\n errorMaps: [ctx.common.contextualErrorMap, ctx.schemaErrorMap, (0, errors_js_1.getErrorMap)(), errors_js_1.defaultErrorMap].filter((x4) => !!x4),\n issueData: {\n code: ZodError_js_1.ZodIssueCode.invalid_arguments,\n argumentsError: error\n }\n });\n }\n function makeReturnsIssue(returns, error) {\n return (0, parseUtil_js_1.makeIssue)({\n data: returns,\n path: ctx.path,\n errorMaps: [ctx.common.contextualErrorMap, ctx.schemaErrorMap, (0, errors_js_1.getErrorMap)(), errors_js_1.defaultErrorMap].filter((x4) => !!x4),\n issueData: {\n code: ZodError_js_1.ZodIssueCode.invalid_return_type,\n returnTypeError: error\n }\n });\n }\n const params = { errorMap: ctx.common.contextualErrorMap };\n const fn = ctx.data;\n if (this._def.returns instanceof ZodPromise2) {\n const me = this;\n return (0, parseUtil_js_1.OK)(async function(...args) {\n const error = new ZodError_js_1.ZodError([]);\n const parsedArgs = await me._def.args.parseAsync(args, params).catch((e3) => {\n error.addIssue(makeArgsIssue(args, e3));\n throw error;\n });\n const result = await Reflect.apply(fn, this, parsedArgs);\n const parsedReturns = await me._def.returns._def.type.parseAsync(result, params).catch((e3) => {\n error.addIssue(makeReturnsIssue(result, e3));\n throw error;\n });\n return parsedReturns;\n });\n } else {\n const me = this;\n return (0, parseUtil_js_1.OK)(function(...args) {\n const parsedArgs = me._def.args.safeParse(args, params);\n if (!parsedArgs.success) {\n throw new ZodError_js_1.ZodError([makeArgsIssue(args, parsedArgs.error)]);\n }\n const result = Reflect.apply(fn, this, parsedArgs.data);\n const parsedReturns = me._def.returns.safeParse(result, params);\n if (!parsedReturns.success) {\n throw new ZodError_js_1.ZodError([makeReturnsIssue(result, parsedReturns.error)]);\n }\n return parsedReturns.data;\n });\n }\n }\n parameters() {\n return this._def.args;\n }\n returnType() {\n return this._def.returns;\n }\n args(...items) {\n return new _ZodFunction({\n ...this._def,\n args: ZodTuple2.create(items).rest(ZodUnknown2.create())\n });\n }\n returns(returnType) {\n return new _ZodFunction({\n ...this._def,\n returns: returnType\n });\n }\n implement(func) {\n const validatedFunc = this.parse(func);\n return validatedFunc;\n }\n strictImplement(func) {\n const validatedFunc = this.parse(func);\n return validatedFunc;\n }\n static create(args, returns, params) {\n return new _ZodFunction({\n args: args ? args : ZodTuple2.create([]).rest(ZodUnknown2.create()),\n returns: returns || ZodUnknown2.create(),\n typeName: ZodFirstPartyTypeKind2.ZodFunction,\n ...processCreateParams2(params)\n });\n }\n };\n exports3.ZodFunction = ZodFunction2;\n var ZodLazy2 = class extends ZodType2 {\n get schema() {\n return this._def.getter();\n }\n _parse(input) {\n const { ctx } = this._processInputParams(input);\n const lazySchema = this._def.getter();\n return lazySchema._parse({ data: ctx.data, path: ctx.path, parent: ctx });\n }\n };\n exports3.ZodLazy = ZodLazy2;\n ZodLazy2.create = (getter, params) => {\n return new ZodLazy2({\n getter,\n typeName: ZodFirstPartyTypeKind2.ZodLazy,\n ...processCreateParams2(params)\n });\n };\n var ZodLiteral2 = class extends ZodType2 {\n _parse(input) {\n if (input.data !== this._def.value) {\n const ctx = this._getOrReturnCtx(input);\n (0, parseUtil_js_1.addIssueToContext)(ctx, {\n received: ctx.data,\n code: ZodError_js_1.ZodIssueCode.invalid_literal,\n expected: this._def.value\n });\n return parseUtil_js_1.INVALID;\n }\n return { status: \"valid\", value: input.data };\n }\n get value() {\n return this._def.value;\n }\n };\n exports3.ZodLiteral = ZodLiteral2;\n ZodLiteral2.create = (value, params) => {\n return new ZodLiteral2({\n value,\n typeName: ZodFirstPartyTypeKind2.ZodLiteral,\n ...processCreateParams2(params)\n });\n };\n function createZodEnum2(values, params) {\n return new ZodEnum2({\n values,\n typeName: ZodFirstPartyTypeKind2.ZodEnum,\n ...processCreateParams2(params)\n });\n }\n var ZodEnum2 = class _ZodEnum extends ZodType2 {\n _parse(input) {\n if (typeof input.data !== \"string\") {\n const ctx = this._getOrReturnCtx(input);\n const expectedValues = this._def.values;\n (0, parseUtil_js_1.addIssueToContext)(ctx, {\n expected: util_js_1.util.joinValues(expectedValues),\n received: ctx.parsedType,\n code: ZodError_js_1.ZodIssueCode.invalid_type\n });\n return parseUtil_js_1.INVALID;\n }\n if (!this._cache) {\n this._cache = new Set(this._def.values);\n }\n if (!this._cache.has(input.data)) {\n const ctx = this._getOrReturnCtx(input);\n const expectedValues = this._def.values;\n (0, parseUtil_js_1.addIssueToContext)(ctx, {\n received: ctx.data,\n code: ZodError_js_1.ZodIssueCode.invalid_enum_value,\n options: expectedValues\n });\n return parseUtil_js_1.INVALID;\n }\n return (0, parseUtil_js_1.OK)(input.data);\n }\n get options() {\n return this._def.values;\n }\n get enum() {\n const enumValues = {};\n for (const val of this._def.values) {\n enumValues[val] = val;\n }\n return enumValues;\n }\n get Values() {\n const enumValues = {};\n for (const val of this._def.values) {\n enumValues[val] = val;\n }\n return enumValues;\n }\n get Enum() {\n const enumValues = {};\n for (const val of this._def.values) {\n enumValues[val] = val;\n }\n return enumValues;\n }\n extract(values, newDef = this._def) {\n return _ZodEnum.create(values, {\n ...this._def,\n ...newDef\n });\n }\n exclude(values, newDef = this._def) {\n return _ZodEnum.create(this.options.filter((opt) => !values.includes(opt)), {\n ...this._def,\n ...newDef\n });\n }\n };\n exports3.ZodEnum = ZodEnum2;\n ZodEnum2.create = createZodEnum2;\n var ZodNativeEnum2 = class extends ZodType2 {\n _parse(input) {\n const nativeEnumValues = util_js_1.util.getValidEnumValues(this._def.values);\n const ctx = this._getOrReturnCtx(input);\n if (ctx.parsedType !== util_js_1.ZodParsedType.string && ctx.parsedType !== util_js_1.ZodParsedType.number) {\n const expectedValues = util_js_1.util.objectValues(nativeEnumValues);\n (0, parseUtil_js_1.addIssueToContext)(ctx, {\n expected: util_js_1.util.joinValues(expectedValues),\n received: ctx.parsedType,\n code: ZodError_js_1.ZodIssueCode.invalid_type\n });\n return parseUtil_js_1.INVALID;\n }\n if (!this._cache) {\n this._cache = new Set(util_js_1.util.getValidEnumValues(this._def.values));\n }\n if (!this._cache.has(input.data)) {\n const expectedValues = util_js_1.util.objectValues(nativeEnumValues);\n (0, parseUtil_js_1.addIssueToContext)(ctx, {\n received: ctx.data,\n code: ZodError_js_1.ZodIssueCode.invalid_enum_value,\n options: expectedValues\n });\n return parseUtil_js_1.INVALID;\n }\n return (0, parseUtil_js_1.OK)(input.data);\n }\n get enum() {\n return this._def.values;\n }\n };\n exports3.ZodNativeEnum = ZodNativeEnum2;\n ZodNativeEnum2.create = (values, params) => {\n return new ZodNativeEnum2({\n values,\n typeName: ZodFirstPartyTypeKind2.ZodNativeEnum,\n ...processCreateParams2(params)\n });\n };\n var ZodPromise2 = class extends ZodType2 {\n unwrap() {\n return this._def.type;\n }\n _parse(input) {\n const { ctx } = this._processInputParams(input);\n if (ctx.parsedType !== util_js_1.ZodParsedType.promise && ctx.common.async === false) {\n (0, parseUtil_js_1.addIssueToContext)(ctx, {\n code: ZodError_js_1.ZodIssueCode.invalid_type,\n expected: util_js_1.ZodParsedType.promise,\n received: ctx.parsedType\n });\n return parseUtil_js_1.INVALID;\n }\n const promisified = ctx.parsedType === util_js_1.ZodParsedType.promise ? ctx.data : Promise.resolve(ctx.data);\n return (0, parseUtil_js_1.OK)(promisified.then((data) => {\n return this._def.type.parseAsync(data, {\n path: ctx.path,\n errorMap: ctx.common.contextualErrorMap\n });\n }));\n }\n };\n exports3.ZodPromise = ZodPromise2;\n ZodPromise2.create = (schema, params) => {\n return new ZodPromise2({\n type: schema,\n typeName: ZodFirstPartyTypeKind2.ZodPromise,\n ...processCreateParams2(params)\n });\n };\n var ZodEffects2 = class extends ZodType2 {\n innerType() {\n return this._def.schema;\n }\n sourceType() {\n return this._def.schema._def.typeName === ZodFirstPartyTypeKind2.ZodEffects ? this._def.schema.sourceType() : this._def.schema;\n }\n _parse(input) {\n const { status, ctx } = this._processInputParams(input);\n const effect = this._def.effect || null;\n const checkCtx = {\n addIssue: (arg) => {\n (0, parseUtil_js_1.addIssueToContext)(ctx, arg);\n if (arg.fatal) {\n status.abort();\n } else {\n status.dirty();\n }\n },\n get path() {\n return ctx.path;\n }\n };\n checkCtx.addIssue = checkCtx.addIssue.bind(checkCtx);\n if (effect.type === \"preprocess\") {\n const processed = effect.transform(ctx.data, checkCtx);\n if (ctx.common.async) {\n return Promise.resolve(processed).then(async (processed2) => {\n if (status.value === \"aborted\")\n return parseUtil_js_1.INVALID;\n const result = await this._def.schema._parseAsync({\n data: processed2,\n path: ctx.path,\n parent: ctx\n });\n if (result.status === \"aborted\")\n return parseUtil_js_1.INVALID;\n if (result.status === \"dirty\")\n return (0, parseUtil_js_1.DIRTY)(result.value);\n if (status.value === \"dirty\")\n return (0, parseUtil_js_1.DIRTY)(result.value);\n return result;\n });\n } else {\n if (status.value === \"aborted\")\n return parseUtil_js_1.INVALID;\n const result = this._def.schema._parseSync({\n data: processed,\n path: ctx.path,\n parent: ctx\n });\n if (result.status === \"aborted\")\n return parseUtil_js_1.INVALID;\n if (result.status === \"dirty\")\n return (0, parseUtil_js_1.DIRTY)(result.value);\n if (status.value === \"dirty\")\n return (0, parseUtil_js_1.DIRTY)(result.value);\n return result;\n }\n }\n if (effect.type === \"refinement\") {\n const executeRefinement = (acc) => {\n const result = effect.refinement(acc, checkCtx);\n if (ctx.common.async) {\n return Promise.resolve(result);\n }\n if (result instanceof Promise) {\n throw new Error(\"Async refinement encountered during synchronous parse operation. Use .parseAsync instead.\");\n }\n return acc;\n };\n if (ctx.common.async === false) {\n const inner = this._def.schema._parseSync({\n data: ctx.data,\n path: ctx.path,\n parent: ctx\n });\n if (inner.status === \"aborted\")\n return parseUtil_js_1.INVALID;\n if (inner.status === \"dirty\")\n status.dirty();\n executeRefinement(inner.value);\n return { status: status.value, value: inner.value };\n } else {\n return this._def.schema._parseAsync({ data: ctx.data, path: ctx.path, parent: ctx }).then((inner) => {\n if (inner.status === \"aborted\")\n return parseUtil_js_1.INVALID;\n if (inner.status === \"dirty\")\n status.dirty();\n return executeRefinement(inner.value).then(() => {\n return { status: status.value, value: inner.value };\n });\n });\n }\n }\n if (effect.type === \"transform\") {\n if (ctx.common.async === false) {\n const base4 = this._def.schema._parseSync({\n data: ctx.data,\n path: ctx.path,\n parent: ctx\n });\n if (!(0, parseUtil_js_1.isValid)(base4))\n return parseUtil_js_1.INVALID;\n const result = effect.transform(base4.value, checkCtx);\n if (result instanceof Promise) {\n throw new Error(`Asynchronous transform encountered during synchronous parse operation. Use .parseAsync instead.`);\n }\n return { status: status.value, value: result };\n } else {\n return this._def.schema._parseAsync({ data: ctx.data, path: ctx.path, parent: ctx }).then((base4) => {\n if (!(0, parseUtil_js_1.isValid)(base4))\n return parseUtil_js_1.INVALID;\n return Promise.resolve(effect.transform(base4.value, checkCtx)).then((result) => ({\n status: status.value,\n value: result\n }));\n });\n }\n }\n util_js_1.util.assertNever(effect);\n }\n };\n exports3.ZodEffects = ZodEffects2;\n exports3.ZodTransformer = ZodEffects2;\n ZodEffects2.create = (schema, effect, params) => {\n return new ZodEffects2({\n schema,\n typeName: ZodFirstPartyTypeKind2.ZodEffects,\n effect,\n ...processCreateParams2(params)\n });\n };\n ZodEffects2.createWithPreprocess = (preprocess, schema, params) => {\n return new ZodEffects2({\n schema,\n effect: { type: \"preprocess\", transform: preprocess },\n typeName: ZodFirstPartyTypeKind2.ZodEffects,\n ...processCreateParams2(params)\n });\n };\n var ZodOptional2 = class extends ZodType2 {\n _parse(input) {\n const parsedType = this._getType(input);\n if (parsedType === util_js_1.ZodParsedType.undefined) {\n return (0, parseUtil_js_1.OK)(void 0);\n }\n return this._def.innerType._parse(input);\n }\n unwrap() {\n return this._def.innerType;\n }\n };\n exports3.ZodOptional = ZodOptional2;\n ZodOptional2.create = (type, params) => {\n return new ZodOptional2({\n innerType: type,\n typeName: ZodFirstPartyTypeKind2.ZodOptional,\n ...processCreateParams2(params)\n });\n };\n var ZodNullable2 = class extends ZodType2 {\n _parse(input) {\n const parsedType = this._getType(input);\n if (parsedType === util_js_1.ZodParsedType.null) {\n return (0, parseUtil_js_1.OK)(null);\n }\n return this._def.innerType._parse(input);\n }\n unwrap() {\n return this._def.innerType;\n }\n };\n exports3.ZodNullable = ZodNullable2;\n ZodNullable2.create = (type, params) => {\n return new ZodNullable2({\n innerType: type,\n typeName: ZodFirstPartyTypeKind2.ZodNullable,\n ...processCreateParams2(params)\n });\n };\n var ZodDefault2 = class extends ZodType2 {\n _parse(input) {\n const { ctx } = this._processInputParams(input);\n let data = ctx.data;\n if (ctx.parsedType === util_js_1.ZodParsedType.undefined) {\n data = this._def.defaultValue();\n }\n return this._def.innerType._parse({\n data,\n path: ctx.path,\n parent: ctx\n });\n }\n removeDefault() {\n return this._def.innerType;\n }\n };\n exports3.ZodDefault = ZodDefault2;\n ZodDefault2.create = (type, params) => {\n return new ZodDefault2({\n innerType: type,\n typeName: ZodFirstPartyTypeKind2.ZodDefault,\n defaultValue: typeof params.default === \"function\" ? params.default : () => params.default,\n ...processCreateParams2(params)\n });\n };\n var ZodCatch2 = class extends ZodType2 {\n _parse(input) {\n const { ctx } = this._processInputParams(input);\n const newCtx = {\n ...ctx,\n common: {\n ...ctx.common,\n issues: []\n }\n };\n const result = this._def.innerType._parse({\n data: newCtx.data,\n path: newCtx.path,\n parent: {\n ...newCtx\n }\n });\n if ((0, parseUtil_js_1.isAsync)(result)) {\n return result.then((result2) => {\n return {\n status: \"valid\",\n value: result2.status === \"valid\" ? result2.value : this._def.catchValue({\n get error() {\n return new ZodError_js_1.ZodError(newCtx.common.issues);\n },\n input: newCtx.data\n })\n };\n });\n } else {\n return {\n status: \"valid\",\n value: result.status === \"valid\" ? result.value : this._def.catchValue({\n get error() {\n return new ZodError_js_1.ZodError(newCtx.common.issues);\n },\n input: newCtx.data\n })\n };\n }\n }\n removeCatch() {\n return this._def.innerType;\n }\n };\n exports3.ZodCatch = ZodCatch2;\n ZodCatch2.create = (type, params) => {\n return new ZodCatch2({\n innerType: type,\n typeName: ZodFirstPartyTypeKind2.ZodCatch,\n catchValue: typeof params.catch === \"function\" ? params.catch : () => params.catch,\n ...processCreateParams2(params)\n });\n };\n var ZodNaN2 = class extends ZodType2 {\n _parse(input) {\n const parsedType = this._getType(input);\n if (parsedType !== util_js_1.ZodParsedType.nan) {\n const ctx = this._getOrReturnCtx(input);\n (0, parseUtil_js_1.addIssueToContext)(ctx, {\n code: ZodError_js_1.ZodIssueCode.invalid_type,\n expected: util_js_1.ZodParsedType.nan,\n received: ctx.parsedType\n });\n return parseUtil_js_1.INVALID;\n }\n return { status: \"valid\", value: input.data };\n }\n };\n exports3.ZodNaN = ZodNaN2;\n ZodNaN2.create = (params) => {\n return new ZodNaN2({\n typeName: ZodFirstPartyTypeKind2.ZodNaN,\n ...processCreateParams2(params)\n });\n };\n exports3.BRAND = Symbol(\"zod_brand\");\n var ZodBranded2 = class extends ZodType2 {\n _parse(input) {\n const { ctx } = this._processInputParams(input);\n const data = ctx.data;\n return this._def.type._parse({\n data,\n path: ctx.path,\n parent: ctx\n });\n }\n unwrap() {\n return this._def.type;\n }\n };\n exports3.ZodBranded = ZodBranded2;\n var ZodPipeline2 = class _ZodPipeline extends ZodType2 {\n _parse(input) {\n const { status, ctx } = this._processInputParams(input);\n if (ctx.common.async) {\n const handleAsync = async () => {\n const inResult = await this._def.in._parseAsync({\n data: ctx.data,\n path: ctx.path,\n parent: ctx\n });\n if (inResult.status === \"aborted\")\n return parseUtil_js_1.INVALID;\n if (inResult.status === \"dirty\") {\n status.dirty();\n return (0, parseUtil_js_1.DIRTY)(inResult.value);\n } else {\n return this._def.out._parseAsync({\n data: inResult.value,\n path: ctx.path,\n parent: ctx\n });\n }\n };\n return handleAsync();\n } else {\n const inResult = this._def.in._parseSync({\n data: ctx.data,\n path: ctx.path,\n parent: ctx\n });\n if (inResult.status === \"aborted\")\n return parseUtil_js_1.INVALID;\n if (inResult.status === \"dirty\") {\n status.dirty();\n return {\n status: \"dirty\",\n value: inResult.value\n };\n } else {\n return this._def.out._parseSync({\n data: inResult.value,\n path: ctx.path,\n parent: ctx\n });\n }\n }\n }\n static create(a3, b4) {\n return new _ZodPipeline({\n in: a3,\n out: b4,\n typeName: ZodFirstPartyTypeKind2.ZodPipeline\n });\n }\n };\n exports3.ZodPipeline = ZodPipeline2;\n var ZodReadonly2 = class extends ZodType2 {\n _parse(input) {\n const result = this._def.innerType._parse(input);\n const freeze = (data) => {\n if ((0, parseUtil_js_1.isValid)(data)) {\n data.value = Object.freeze(data.value);\n }\n return data;\n };\n return (0, parseUtil_js_1.isAsync)(result) ? result.then((data) => freeze(data)) : freeze(result);\n }\n unwrap() {\n return this._def.innerType;\n }\n };\n exports3.ZodReadonly = ZodReadonly2;\n ZodReadonly2.create = (type, params) => {\n return new ZodReadonly2({\n innerType: type,\n typeName: ZodFirstPartyTypeKind2.ZodReadonly,\n ...processCreateParams2(params)\n });\n };\n function cleanParams2(params, data) {\n const p4 = typeof params === \"function\" ? params(data) : typeof params === \"string\" ? { message: params } : params;\n const p22 = typeof p4 === \"string\" ? { message: p4 } : p4;\n return p22;\n }\n function custom3(check, _params = {}, fatal) {\n if (check)\n return ZodAny2.create().superRefine((data, ctx) => {\n const r2 = check(data);\n if (r2 instanceof Promise) {\n return r2.then((r3) => {\n if (!r3) {\n const params = cleanParams2(_params, data);\n const _fatal = params.fatal ?? fatal ?? true;\n ctx.addIssue({ code: \"custom\", ...params, fatal: _fatal });\n }\n });\n }\n if (!r2) {\n const params = cleanParams2(_params, data);\n const _fatal = params.fatal ?? fatal ?? true;\n ctx.addIssue({ code: \"custom\", ...params, fatal: _fatal });\n }\n return;\n });\n return ZodAny2.create();\n }\n exports3.late = {\n object: ZodObject2.lazycreate\n };\n var ZodFirstPartyTypeKind2;\n (function(ZodFirstPartyTypeKind3) {\n ZodFirstPartyTypeKind3[\"ZodString\"] = \"ZodString\";\n ZodFirstPartyTypeKind3[\"ZodNumber\"] = \"ZodNumber\";\n ZodFirstPartyTypeKind3[\"ZodNaN\"] = \"ZodNaN\";\n ZodFirstPartyTypeKind3[\"ZodBigInt\"] = \"ZodBigInt\";\n ZodFirstPartyTypeKind3[\"ZodBoolean\"] = \"ZodBoolean\";\n ZodFirstPartyTypeKind3[\"ZodDate\"] = \"ZodDate\";\n ZodFirstPartyTypeKind3[\"ZodSymbol\"] = \"ZodSymbol\";\n ZodFirstPartyTypeKind3[\"ZodUndefined\"] = \"ZodUndefined\";\n ZodFirstPartyTypeKind3[\"ZodNull\"] = \"ZodNull\";\n ZodFirstPartyTypeKind3[\"ZodAny\"] = \"ZodAny\";\n ZodFirstPartyTypeKind3[\"ZodUnknown\"] = \"ZodUnknown\";\n ZodFirstPartyTypeKind3[\"ZodNever\"] = \"ZodNever\";\n ZodFirstPartyTypeKind3[\"ZodVoid\"] = \"ZodVoid\";\n ZodFirstPartyTypeKind3[\"ZodArray\"] = \"ZodArray\";\n ZodFirstPartyTypeKind3[\"ZodObject\"] = \"ZodObject\";\n ZodFirstPartyTypeKind3[\"ZodUnion\"] = \"ZodUnion\";\n ZodFirstPartyTypeKind3[\"ZodDiscriminatedUnion\"] = \"ZodDiscriminatedUnion\";\n ZodFirstPartyTypeKind3[\"ZodIntersection\"] = \"ZodIntersection\";\n ZodFirstPartyTypeKind3[\"ZodTuple\"] = \"ZodTuple\";\n ZodFirstPartyTypeKind3[\"ZodRecord\"] = \"ZodRecord\";\n ZodFirstPartyTypeKind3[\"ZodMap\"] = \"ZodMap\";\n ZodFirstPartyTypeKind3[\"ZodSet\"] = \"ZodSet\";\n ZodFirstPartyTypeKind3[\"ZodFunction\"] = \"ZodFunction\";\n ZodFirstPartyTypeKind3[\"ZodLazy\"] = \"ZodLazy\";\n ZodFirstPartyTypeKind3[\"ZodLiteral\"] = \"ZodLiteral\";\n ZodFirstPartyTypeKind3[\"ZodEnum\"] = \"ZodEnum\";\n ZodFirstPartyTypeKind3[\"ZodEffects\"] = \"ZodEffects\";\n ZodFirstPartyTypeKind3[\"ZodNativeEnum\"] = \"ZodNativeEnum\";\n ZodFirstPartyTypeKind3[\"ZodOptional\"] = \"ZodOptional\";\n ZodFirstPartyTypeKind3[\"ZodNullable\"] = \"ZodNullable\";\n ZodFirstPartyTypeKind3[\"ZodDefault\"] = \"ZodDefault\";\n ZodFirstPartyTypeKind3[\"ZodCatch\"] = \"ZodCatch\";\n ZodFirstPartyTypeKind3[\"ZodPromise\"] = \"ZodPromise\";\n ZodFirstPartyTypeKind3[\"ZodBranded\"] = \"ZodBranded\";\n ZodFirstPartyTypeKind3[\"ZodPipeline\"] = \"ZodPipeline\";\n ZodFirstPartyTypeKind3[\"ZodReadonly\"] = \"ZodReadonly\";\n })(ZodFirstPartyTypeKind2 || (exports3.ZodFirstPartyTypeKind = ZodFirstPartyTypeKind2 = {}));\n var instanceOfType2 = (cls, params = {\n message: `Input not instance of ${cls.name}`\n }) => custom3((data) => data instanceof cls, params);\n exports3.instanceof = instanceOfType2;\n var stringType2 = ZodString2.create;\n exports3.string = stringType2;\n var numberType2 = ZodNumber2.create;\n exports3.number = numberType2;\n var nanType2 = ZodNaN2.create;\n exports3.nan = nanType2;\n var bigIntType2 = ZodBigInt2.create;\n exports3.bigint = bigIntType2;\n var booleanType2 = ZodBoolean2.create;\n exports3.boolean = booleanType2;\n var dateType2 = ZodDate2.create;\n exports3.date = dateType2;\n var symbolType2 = ZodSymbol2.create;\n exports3.symbol = symbolType2;\n var undefinedType2 = ZodUndefined2.create;\n exports3.undefined = undefinedType2;\n var nullType2 = ZodNull2.create;\n exports3.null = nullType2;\n var anyType2 = ZodAny2.create;\n exports3.any = anyType2;\n var unknownType2 = ZodUnknown2.create;\n exports3.unknown = unknownType2;\n var neverType2 = ZodNever2.create;\n exports3.never = neverType2;\n var voidType2 = ZodVoid2.create;\n exports3.void = voidType2;\n var arrayType2 = ZodArray2.create;\n exports3.array = arrayType2;\n var objectType2 = ZodObject2.create;\n exports3.object = objectType2;\n var strictObjectType2 = ZodObject2.strictCreate;\n exports3.strictObject = strictObjectType2;\n var unionType2 = ZodUnion2.create;\n exports3.union = unionType2;\n var discriminatedUnionType2 = ZodDiscriminatedUnion2.create;\n exports3.discriminatedUnion = discriminatedUnionType2;\n var intersectionType2 = ZodIntersection2.create;\n exports3.intersection = intersectionType2;\n var tupleType2 = ZodTuple2.create;\n exports3.tuple = tupleType2;\n var recordType2 = ZodRecord2.create;\n exports3.record = recordType2;\n var mapType2 = ZodMap2.create;\n exports3.map = mapType2;\n var setType2 = ZodSet2.create;\n exports3.set = setType2;\n var functionType2 = ZodFunction2.create;\n exports3.function = functionType2;\n var lazyType2 = ZodLazy2.create;\n exports3.lazy = lazyType2;\n var literalType2 = ZodLiteral2.create;\n exports3.literal = literalType2;\n var enumType2 = ZodEnum2.create;\n exports3.enum = enumType2;\n var nativeEnumType2 = ZodNativeEnum2.create;\n exports3.nativeEnum = nativeEnumType2;\n var promiseType2 = ZodPromise2.create;\n exports3.promise = promiseType2;\n var effectsType2 = ZodEffects2.create;\n exports3.effect = effectsType2;\n exports3.transformer = effectsType2;\n var optionalType2 = ZodOptional2.create;\n exports3.optional = optionalType2;\n var nullableType2 = ZodNullable2.create;\n exports3.nullable = nullableType2;\n var preprocessType2 = ZodEffects2.createWithPreprocess;\n exports3.preprocess = preprocessType2;\n var pipelineType2 = ZodPipeline2.create;\n exports3.pipeline = pipelineType2;\n var ostring2 = () => stringType2().optional();\n exports3.ostring = ostring2;\n var onumber2 = () => numberType2().optional();\n exports3.onumber = onumber2;\n var oboolean2 = () => booleanType2().optional();\n exports3.oboolean = oboolean2;\n exports3.coerce = {\n string: (arg) => ZodString2.create({ ...arg, coerce: true }),\n number: (arg) => ZodNumber2.create({ ...arg, coerce: true }),\n boolean: (arg) => ZodBoolean2.create({\n ...arg,\n coerce: true\n }),\n bigint: (arg) => ZodBigInt2.create({ ...arg, coerce: true }),\n date: (arg) => ZodDate2.create({ ...arg, coerce: true })\n };\n exports3.NEVER = parseUtil_js_1.INVALID;\n }\n });\n\n // ../../../node_modules/.pnpm/zod@3.25.64/node_modules/zod/dist/cjs/v3/external.js\n var require_external = __commonJS({\n \"../../../node_modules/.pnpm/zod@3.25.64/node_modules/zod/dist/cjs/v3/external.js\"(exports3) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n var __createBinding3 = exports3 && exports3.__createBinding || (Object.create ? function(o5, m2, k4, k22) {\n if (k22 === void 0)\n k22 = k4;\n var desc = Object.getOwnPropertyDescriptor(m2, k4);\n if (!desc || (\"get\" in desc ? !m2.__esModule : desc.writable || desc.configurable)) {\n desc = { enumerable: true, get: function() {\n return m2[k4];\n } };\n }\n Object.defineProperty(o5, k22, desc);\n } : function(o5, m2, k4, k22) {\n if (k22 === void 0)\n k22 = k4;\n o5[k22] = m2[k4];\n });\n var __exportStar3 = exports3 && exports3.__exportStar || function(m2, exports4) {\n for (var p4 in m2)\n if (p4 !== \"default\" && !Object.prototype.hasOwnProperty.call(exports4, p4))\n __createBinding3(exports4, m2, p4);\n };\n Object.defineProperty(exports3, \"__esModule\", { value: true });\n __exportStar3(require_errors(), exports3);\n __exportStar3(require_parseUtil(), exports3);\n __exportStar3(require_typeAliases(), exports3);\n __exportStar3(require_util(), exports3);\n __exportStar3(require_types(), exports3);\n __exportStar3(require_ZodError(), exports3);\n }\n });\n\n // ../../../node_modules/.pnpm/zod@3.25.64/node_modules/zod/dist/cjs/v3/index.js\n var require_v3 = __commonJS({\n \"../../../node_modules/.pnpm/zod@3.25.64/node_modules/zod/dist/cjs/v3/index.js\"(exports3) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n var __createBinding3 = exports3 && exports3.__createBinding || (Object.create ? function(o5, m2, k4, k22) {\n if (k22 === void 0)\n k22 = k4;\n var desc = Object.getOwnPropertyDescriptor(m2, k4);\n if (!desc || (\"get\" in desc ? !m2.__esModule : desc.writable || desc.configurable)) {\n desc = { enumerable: true, get: function() {\n return m2[k4];\n } };\n }\n Object.defineProperty(o5, k22, desc);\n } : function(o5, m2, k4, k22) {\n if (k22 === void 0)\n k22 = k4;\n o5[k22] = m2[k4];\n });\n var __setModuleDefault3 = exports3 && exports3.__setModuleDefault || (Object.create ? function(o5, v2) {\n Object.defineProperty(o5, \"default\", { enumerable: true, value: v2 });\n } : function(o5, v2) {\n o5[\"default\"] = v2;\n });\n var __importStar3 = exports3 && exports3.__importStar || function(mod3) {\n if (mod3 && mod3.__esModule)\n return mod3;\n var result = {};\n if (mod3 != null) {\n for (var k4 in mod3)\n if (k4 !== \"default\" && Object.prototype.hasOwnProperty.call(mod3, k4))\n __createBinding3(result, mod3, k4);\n }\n __setModuleDefault3(result, mod3);\n return result;\n };\n var __exportStar3 = exports3 && exports3.__exportStar || function(m2, exports4) {\n for (var p4 in m2)\n if (p4 !== \"default\" && !Object.prototype.hasOwnProperty.call(exports4, p4))\n __createBinding3(exports4, m2, p4);\n };\n Object.defineProperty(exports3, \"__esModule\", { value: true });\n exports3.z = void 0;\n var z2 = __importStar3(require_external());\n exports3.z = z2;\n __exportStar3(require_external(), exports3);\n exports3.default = z2;\n }\n });\n\n // ../../../node_modules/.pnpm/zod@3.25.64/node_modules/zod/dist/cjs/index.js\n var require_cjs = __commonJS({\n \"../../../node_modules/.pnpm/zod@3.25.64/node_modules/zod/dist/cjs/index.js\"(exports3) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n var __createBinding3 = exports3 && exports3.__createBinding || (Object.create ? function(o5, m2, k4, k22) {\n if (k22 === void 0)\n k22 = k4;\n var desc = Object.getOwnPropertyDescriptor(m2, k4);\n if (!desc || (\"get\" in desc ? !m2.__esModule : desc.writable || desc.configurable)) {\n desc = { enumerable: true, get: function() {\n return m2[k4];\n } };\n }\n Object.defineProperty(o5, k22, desc);\n } : function(o5, m2, k4, k22) {\n if (k22 === void 0)\n k22 = k4;\n o5[k22] = m2[k4];\n });\n var __exportStar3 = exports3 && exports3.__exportStar || function(m2, exports4) {\n for (var p4 in m2)\n if (p4 !== \"default\" && !Object.prototype.hasOwnProperty.call(exports4, p4))\n __createBinding3(exports4, m2, p4);\n };\n var __importDefault3 = exports3 && exports3.__importDefault || function(mod3) {\n return mod3 && mod3.__esModule ? mod3 : { \"default\": mod3 };\n };\n Object.defineProperty(exports3, \"__esModule\", { value: true });\n var index_js_1 = __importDefault3(require_v3());\n __exportStar3(require_v3(), exports3);\n exports3.default = index_js_1.default;\n }\n });\n\n // ../../../node_modules/.pnpm/semver@7.7.2/node_modules/semver/internal/constants.js\n var require_constants = __commonJS({\n \"../../../node_modules/.pnpm/semver@7.7.2/node_modules/semver/internal/constants.js\"(exports3, module) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n var SEMVER_SPEC_VERSION = \"2.0.0\";\n var MAX_LENGTH = 256;\n var MAX_SAFE_INTEGER = Number.MAX_SAFE_INTEGER || /* istanbul ignore next */\n 9007199254740991;\n var MAX_SAFE_COMPONENT_LENGTH = 16;\n var MAX_SAFE_BUILD_LENGTH = MAX_LENGTH - 6;\n var RELEASE_TYPES = [\n \"major\",\n \"premajor\",\n \"minor\",\n \"preminor\",\n \"patch\",\n \"prepatch\",\n \"prerelease\"\n ];\n module.exports = {\n MAX_LENGTH,\n MAX_SAFE_COMPONENT_LENGTH,\n MAX_SAFE_BUILD_LENGTH,\n MAX_SAFE_INTEGER,\n RELEASE_TYPES,\n SEMVER_SPEC_VERSION,\n FLAG_INCLUDE_PRERELEASE: 1,\n FLAG_LOOSE: 2\n };\n }\n });\n\n // ../../../node_modules/.pnpm/semver@7.7.2/node_modules/semver/internal/debug.js\n var require_debug = __commonJS({\n \"../../../node_modules/.pnpm/semver@7.7.2/node_modules/semver/internal/debug.js\"(exports3, module) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n var debug = typeof process_exports === \"object\" && process_exports.env && process_exports.env.NODE_DEBUG && /\\bsemver\\b/i.test(process_exports.env.NODE_DEBUG) ? (...args) => console.error(\"SEMVER\", ...args) : () => {\n };\n module.exports = debug;\n }\n });\n\n // ../../../node_modules/.pnpm/semver@7.7.2/node_modules/semver/internal/re.js\n var require_re = __commonJS({\n \"../../../node_modules/.pnpm/semver@7.7.2/node_modules/semver/internal/re.js\"(exports3, module) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n var {\n MAX_SAFE_COMPONENT_LENGTH,\n MAX_SAFE_BUILD_LENGTH,\n MAX_LENGTH\n } = require_constants();\n var debug = require_debug();\n exports3 = module.exports = {};\n var re = exports3.re = [];\n var safeRe = exports3.safeRe = [];\n var src = exports3.src = [];\n var safeSrc = exports3.safeSrc = [];\n var t3 = exports3.t = {};\n var R3 = 0;\n var LETTERDASHNUMBER = \"[a-zA-Z0-9-]\";\n var safeRegexReplacements = [\n [\"\\\\s\", 1],\n [\"\\\\d\", MAX_LENGTH],\n [LETTERDASHNUMBER, MAX_SAFE_BUILD_LENGTH]\n ];\n var makeSafeRegex = (value) => {\n for (const [token, max] of safeRegexReplacements) {\n value = value.split(`${token}*`).join(`${token}{0,${max}}`).split(`${token}+`).join(`${token}{1,${max}}`);\n }\n return value;\n };\n var createToken = (name, value, isGlobal) => {\n const safe = makeSafeRegex(value);\n const index2 = R3++;\n debug(name, index2, value);\n t3[name] = index2;\n src[index2] = value;\n safeSrc[index2] = safe;\n re[index2] = new RegExp(value, isGlobal ? \"g\" : void 0);\n safeRe[index2] = new RegExp(safe, isGlobal ? \"g\" : void 0);\n };\n createToken(\"NUMERICIDENTIFIER\", \"0|[1-9]\\\\d*\");\n createToken(\"NUMERICIDENTIFIERLOOSE\", \"\\\\d+\");\n createToken(\"NONNUMERICIDENTIFIER\", `\\\\d*[a-zA-Z-]${LETTERDASHNUMBER}*`);\n createToken(\"MAINVERSION\", `(${src[t3.NUMERICIDENTIFIER]})\\\\.(${src[t3.NUMERICIDENTIFIER]})\\\\.(${src[t3.NUMERICIDENTIFIER]})`);\n createToken(\"MAINVERSIONLOOSE\", `(${src[t3.NUMERICIDENTIFIERLOOSE]})\\\\.(${src[t3.NUMERICIDENTIFIERLOOSE]})\\\\.(${src[t3.NUMERICIDENTIFIERLOOSE]})`);\n createToken(\"PRERELEASEIDENTIFIER\", `(?:${src[t3.NONNUMERICIDENTIFIER]}|${src[t3.NUMERICIDENTIFIER]})`);\n createToken(\"PRERELEASEIDENTIFIERLOOSE\", `(?:${src[t3.NONNUMERICIDENTIFIER]}|${src[t3.NUMERICIDENTIFIERLOOSE]})`);\n createToken(\"PRERELEASE\", `(?:-(${src[t3.PRERELEASEIDENTIFIER]}(?:\\\\.${src[t3.PRERELEASEIDENTIFIER]})*))`);\n createToken(\"PRERELEASELOOSE\", `(?:-?(${src[t3.PRERELEASEIDENTIFIERLOOSE]}(?:\\\\.${src[t3.PRERELEASEIDENTIFIERLOOSE]})*))`);\n createToken(\"BUILDIDENTIFIER\", `${LETTERDASHNUMBER}+`);\n createToken(\"BUILD\", `(?:\\\\+(${src[t3.BUILDIDENTIFIER]}(?:\\\\.${src[t3.BUILDIDENTIFIER]})*))`);\n createToken(\"FULLPLAIN\", `v?${src[t3.MAINVERSION]}${src[t3.PRERELEASE]}?${src[t3.BUILD]}?`);\n createToken(\"FULL\", `^${src[t3.FULLPLAIN]}$`);\n createToken(\"LOOSEPLAIN\", `[v=\\\\s]*${src[t3.MAINVERSIONLOOSE]}${src[t3.PRERELEASELOOSE]}?${src[t3.BUILD]}?`);\n createToken(\"LOOSE\", `^${src[t3.LOOSEPLAIN]}$`);\n createToken(\"GTLT\", \"((?:<|>)?=?)\");\n createToken(\"XRANGEIDENTIFIERLOOSE\", `${src[t3.NUMERICIDENTIFIERLOOSE]}|x|X|\\\\*`);\n createToken(\"XRANGEIDENTIFIER\", `${src[t3.NUMERICIDENTIFIER]}|x|X|\\\\*`);\n createToken(\"XRANGEPLAIN\", `[v=\\\\s]*(${src[t3.XRANGEIDENTIFIER]})(?:\\\\.(${src[t3.XRANGEIDENTIFIER]})(?:\\\\.(${src[t3.XRANGEIDENTIFIER]})(?:${src[t3.PRERELEASE]})?${src[t3.BUILD]}?)?)?`);\n createToken(\"XRANGEPLAINLOOSE\", `[v=\\\\s]*(${src[t3.XRANGEIDENTIFIERLOOSE]})(?:\\\\.(${src[t3.XRANGEIDENTIFIERLOOSE]})(?:\\\\.(${src[t3.XRANGEIDENTIFIERLOOSE]})(?:${src[t3.PRERELEASELOOSE]})?${src[t3.BUILD]}?)?)?`);\n createToken(\"XRANGE\", `^${src[t3.GTLT]}\\\\s*${src[t3.XRANGEPLAIN]}$`);\n createToken(\"XRANGELOOSE\", `^${src[t3.GTLT]}\\\\s*${src[t3.XRANGEPLAINLOOSE]}$`);\n createToken(\"COERCEPLAIN\", `${\"(^|[^\\\\d])(\\\\d{1,\"}${MAX_SAFE_COMPONENT_LENGTH}})(?:\\\\.(\\\\d{1,${MAX_SAFE_COMPONENT_LENGTH}}))?(?:\\\\.(\\\\d{1,${MAX_SAFE_COMPONENT_LENGTH}}))?`);\n createToken(\"COERCE\", `${src[t3.COERCEPLAIN]}(?:$|[^\\\\d])`);\n createToken(\"COERCEFULL\", src[t3.COERCEPLAIN] + `(?:${src[t3.PRERELEASE]})?(?:${src[t3.BUILD]})?(?:$|[^\\\\d])`);\n createToken(\"COERCERTL\", src[t3.COERCE], true);\n createToken(\"COERCERTLFULL\", src[t3.COERCEFULL], true);\n createToken(\"LONETILDE\", \"(?:~>?)\");\n createToken(\"TILDETRIM\", `(\\\\s*)${src[t3.LONETILDE]}\\\\s+`, true);\n exports3.tildeTrimReplace = \"$1~\";\n createToken(\"TILDE\", `^${src[t3.LONETILDE]}${src[t3.XRANGEPLAIN]}$`);\n createToken(\"TILDELOOSE\", `^${src[t3.LONETILDE]}${src[t3.XRANGEPLAINLOOSE]}$`);\n createToken(\"LONECARET\", \"(?:\\\\^)\");\n createToken(\"CARETTRIM\", `(\\\\s*)${src[t3.LONECARET]}\\\\s+`, true);\n exports3.caretTrimReplace = \"$1^\";\n createToken(\"CARET\", `^${src[t3.LONECARET]}${src[t3.XRANGEPLAIN]}$`);\n createToken(\"CARETLOOSE\", `^${src[t3.LONECARET]}${src[t3.XRANGEPLAINLOOSE]}$`);\n createToken(\"COMPARATORLOOSE\", `^${src[t3.GTLT]}\\\\s*(${src[t3.LOOSEPLAIN]})$|^$`);\n createToken(\"COMPARATOR\", `^${src[t3.GTLT]}\\\\s*(${src[t3.FULLPLAIN]})$|^$`);\n createToken(\"COMPARATORTRIM\", `(\\\\s*)${src[t3.GTLT]}\\\\s*(${src[t3.LOOSEPLAIN]}|${src[t3.XRANGEPLAIN]})`, true);\n exports3.comparatorTrimReplace = \"$1$2$3\";\n createToken(\"HYPHENRANGE\", `^\\\\s*(${src[t3.XRANGEPLAIN]})\\\\s+-\\\\s+(${src[t3.XRANGEPLAIN]})\\\\s*$`);\n createToken(\"HYPHENRANGELOOSE\", `^\\\\s*(${src[t3.XRANGEPLAINLOOSE]})\\\\s+-\\\\s+(${src[t3.XRANGEPLAINLOOSE]})\\\\s*$`);\n createToken(\"STAR\", \"(<|>)?=?\\\\s*\\\\*\");\n createToken(\"GTE0\", \"^\\\\s*>=\\\\s*0\\\\.0\\\\.0\\\\s*$\");\n createToken(\"GTE0PRE\", \"^\\\\s*>=\\\\s*0\\\\.0\\\\.0-0\\\\s*$\");\n }\n });\n\n // ../../../node_modules/.pnpm/semver@7.7.2/node_modules/semver/internal/parse-options.js\n var require_parse_options = __commonJS({\n \"../../../node_modules/.pnpm/semver@7.7.2/node_modules/semver/internal/parse-options.js\"(exports3, module) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n var looseOption = Object.freeze({ loose: true });\n var emptyOpts = Object.freeze({});\n var parseOptions = (options) => {\n if (!options) {\n return emptyOpts;\n }\n if (typeof options !== \"object\") {\n return looseOption;\n }\n return options;\n };\n module.exports = parseOptions;\n }\n });\n\n // ../../../node_modules/.pnpm/semver@7.7.2/node_modules/semver/internal/identifiers.js\n var require_identifiers = __commonJS({\n \"../../../node_modules/.pnpm/semver@7.7.2/node_modules/semver/internal/identifiers.js\"(exports3, module) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n var numeric = /^[0-9]+$/;\n var compareIdentifiers = (a3, b4) => {\n const anum2 = numeric.test(a3);\n const bnum = numeric.test(b4);\n if (anum2 && bnum) {\n a3 = +a3;\n b4 = +b4;\n }\n return a3 === b4 ? 0 : anum2 && !bnum ? -1 : bnum && !anum2 ? 1 : a3 < b4 ? -1 : 1;\n };\n var rcompareIdentifiers = (a3, b4) => compareIdentifiers(b4, a3);\n module.exports = {\n compareIdentifiers,\n rcompareIdentifiers\n };\n }\n });\n\n // ../../../node_modules/.pnpm/semver@7.7.2/node_modules/semver/classes/semver.js\n var require_semver = __commonJS({\n \"../../../node_modules/.pnpm/semver@7.7.2/node_modules/semver/classes/semver.js\"(exports3, module) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n var debug = require_debug();\n var { MAX_LENGTH, MAX_SAFE_INTEGER } = require_constants();\n var { safeRe: re, t: t3 } = require_re();\n var parseOptions = require_parse_options();\n var { compareIdentifiers } = require_identifiers();\n var SemVer = class _SemVer {\n constructor(version6, options) {\n options = parseOptions(options);\n if (version6 instanceof _SemVer) {\n if (version6.loose === !!options.loose && version6.includePrerelease === !!options.includePrerelease) {\n return version6;\n } else {\n version6 = version6.version;\n }\n } else if (typeof version6 !== \"string\") {\n throw new TypeError(`Invalid version. Must be a string. Got type \"${typeof version6}\".`);\n }\n if (version6.length > MAX_LENGTH) {\n throw new TypeError(\n `version is longer than ${MAX_LENGTH} characters`\n );\n }\n debug(\"SemVer\", version6, options);\n this.options = options;\n this.loose = !!options.loose;\n this.includePrerelease = !!options.includePrerelease;\n const m2 = version6.trim().match(options.loose ? re[t3.LOOSE] : re[t3.FULL]);\n if (!m2) {\n throw new TypeError(`Invalid Version: ${version6}`);\n }\n this.raw = version6;\n this.major = +m2[1];\n this.minor = +m2[2];\n this.patch = +m2[3];\n if (this.major > MAX_SAFE_INTEGER || this.major < 0) {\n throw new TypeError(\"Invalid major version\");\n }\n if (this.minor > MAX_SAFE_INTEGER || this.minor < 0) {\n throw new TypeError(\"Invalid minor version\");\n }\n if (this.patch > MAX_SAFE_INTEGER || this.patch < 0) {\n throw new TypeError(\"Invalid patch version\");\n }\n if (!m2[4]) {\n this.prerelease = [];\n } else {\n this.prerelease = m2[4].split(\".\").map((id) => {\n if (/^[0-9]+$/.test(id)) {\n const num2 = +id;\n if (num2 >= 0 && num2 < MAX_SAFE_INTEGER) {\n return num2;\n }\n }\n return id;\n });\n }\n this.build = m2[5] ? m2[5].split(\".\") : [];\n this.format();\n }\n format() {\n this.version = `${this.major}.${this.minor}.${this.patch}`;\n if (this.prerelease.length) {\n this.version += `-${this.prerelease.join(\".\")}`;\n }\n return this.version;\n }\n toString() {\n return this.version;\n }\n compare(other) {\n debug(\"SemVer.compare\", this.version, this.options, other);\n if (!(other instanceof _SemVer)) {\n if (typeof other === \"string\" && other === this.version) {\n return 0;\n }\n other = new _SemVer(other, this.options);\n }\n if (other.version === this.version) {\n return 0;\n }\n return this.compareMain(other) || this.comparePre(other);\n }\n compareMain(other) {\n if (!(other instanceof _SemVer)) {\n other = new _SemVer(other, this.options);\n }\n return compareIdentifiers(this.major, other.major) || compareIdentifiers(this.minor, other.minor) || compareIdentifiers(this.patch, other.patch);\n }\n comparePre(other) {\n if (!(other instanceof _SemVer)) {\n other = new _SemVer(other, this.options);\n }\n if (this.prerelease.length && !other.prerelease.length) {\n return -1;\n } else if (!this.prerelease.length && other.prerelease.length) {\n return 1;\n } else if (!this.prerelease.length && !other.prerelease.length) {\n return 0;\n }\n let i3 = 0;\n do {\n const a3 = this.prerelease[i3];\n const b4 = other.prerelease[i3];\n debug(\"prerelease compare\", i3, a3, b4);\n if (a3 === void 0 && b4 === void 0) {\n return 0;\n } else if (b4 === void 0) {\n return 1;\n } else if (a3 === void 0) {\n return -1;\n } else if (a3 === b4) {\n continue;\n } else {\n return compareIdentifiers(a3, b4);\n }\n } while (++i3);\n }\n compareBuild(other) {\n if (!(other instanceof _SemVer)) {\n other = new _SemVer(other, this.options);\n }\n let i3 = 0;\n do {\n const a3 = this.build[i3];\n const b4 = other.build[i3];\n debug(\"build compare\", i3, a3, b4);\n if (a3 === void 0 && b4 === void 0) {\n return 0;\n } else if (b4 === void 0) {\n return 1;\n } else if (a3 === void 0) {\n return -1;\n } else if (a3 === b4) {\n continue;\n } else {\n return compareIdentifiers(a3, b4);\n }\n } while (++i3);\n }\n // preminor will bump the version up to the next minor release, and immediately\n // down to pre-release. premajor and prepatch work the same way.\n inc(release2, identifier, identifierBase) {\n if (release2.startsWith(\"pre\")) {\n if (!identifier && identifierBase === false) {\n throw new Error(\"invalid increment argument: identifier is empty\");\n }\n if (identifier) {\n const match = `-${identifier}`.match(this.options.loose ? re[t3.PRERELEASELOOSE] : re[t3.PRERELEASE]);\n if (!match || match[1] !== identifier) {\n throw new Error(`invalid identifier: ${identifier}`);\n }\n }\n }\n switch (release2) {\n case \"premajor\":\n this.prerelease.length = 0;\n this.patch = 0;\n this.minor = 0;\n this.major++;\n this.inc(\"pre\", identifier, identifierBase);\n break;\n case \"preminor\":\n this.prerelease.length = 0;\n this.patch = 0;\n this.minor++;\n this.inc(\"pre\", identifier, identifierBase);\n break;\n case \"prepatch\":\n this.prerelease.length = 0;\n this.inc(\"patch\", identifier, identifierBase);\n this.inc(\"pre\", identifier, identifierBase);\n break;\n case \"prerelease\":\n if (this.prerelease.length === 0) {\n this.inc(\"patch\", identifier, identifierBase);\n }\n this.inc(\"pre\", identifier, identifierBase);\n break;\n case \"release\":\n if (this.prerelease.length === 0) {\n throw new Error(`version ${this.raw} is not a prerelease`);\n }\n this.prerelease.length = 0;\n break;\n case \"major\":\n if (this.minor !== 0 || this.patch !== 0 || this.prerelease.length === 0) {\n this.major++;\n }\n this.minor = 0;\n this.patch = 0;\n this.prerelease = [];\n break;\n case \"minor\":\n if (this.patch !== 0 || this.prerelease.length === 0) {\n this.minor++;\n }\n this.patch = 0;\n this.prerelease = [];\n break;\n case \"patch\":\n if (this.prerelease.length === 0) {\n this.patch++;\n }\n this.prerelease = [];\n break;\n case \"pre\": {\n const base4 = Number(identifierBase) ? 1 : 0;\n if (this.prerelease.length === 0) {\n this.prerelease = [base4];\n } else {\n let i3 = this.prerelease.length;\n while (--i3 >= 0) {\n if (typeof this.prerelease[i3] === \"number\") {\n this.prerelease[i3]++;\n i3 = -2;\n }\n }\n if (i3 === -1) {\n if (identifier === this.prerelease.join(\".\") && identifierBase === false) {\n throw new Error(\"invalid increment argument: identifier already exists\");\n }\n this.prerelease.push(base4);\n }\n }\n if (identifier) {\n let prerelease = [identifier, base4];\n if (identifierBase === false) {\n prerelease = [identifier];\n }\n if (compareIdentifiers(this.prerelease[0], identifier) === 0) {\n if (isNaN(this.prerelease[1])) {\n this.prerelease = prerelease;\n }\n } else {\n this.prerelease = prerelease;\n }\n }\n break;\n }\n default:\n throw new Error(`invalid increment argument: ${release2}`);\n }\n this.raw = this.format();\n if (this.build.length) {\n this.raw += `+${this.build.join(\".\")}`;\n }\n return this;\n }\n };\n module.exports = SemVer;\n }\n });\n\n // ../../../node_modules/.pnpm/semver@7.7.2/node_modules/semver/functions/parse.js\n var require_parse = __commonJS({\n \"../../../node_modules/.pnpm/semver@7.7.2/node_modules/semver/functions/parse.js\"(exports3, module) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n var SemVer = require_semver();\n var parse = (version6, options, throwErrors = false) => {\n if (version6 instanceof SemVer) {\n return version6;\n }\n try {\n return new SemVer(version6, options);\n } catch (er) {\n if (!throwErrors) {\n return null;\n }\n throw er;\n }\n };\n module.exports = parse;\n }\n });\n\n // ../../../node_modules/.pnpm/semver@7.7.2/node_modules/semver/functions/valid.js\n var require_valid = __commonJS({\n \"../../../node_modules/.pnpm/semver@7.7.2/node_modules/semver/functions/valid.js\"(exports3, module) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n var parse = require_parse();\n var valid = (version6, options) => {\n const v2 = parse(version6, options);\n return v2 ? v2.version : null;\n };\n module.exports = valid;\n }\n });\n\n // ../../../node_modules/.pnpm/semver@7.7.2/node_modules/semver/functions/clean.js\n var require_clean = __commonJS({\n \"../../../node_modules/.pnpm/semver@7.7.2/node_modules/semver/functions/clean.js\"(exports3, module) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n var parse = require_parse();\n var clean3 = (version6, options) => {\n const s4 = parse(version6.trim().replace(/^[=v]+/, \"\"), options);\n return s4 ? s4.version : null;\n };\n module.exports = clean3;\n }\n });\n\n // ../../../node_modules/.pnpm/semver@7.7.2/node_modules/semver/functions/inc.js\n var require_inc = __commonJS({\n \"../../../node_modules/.pnpm/semver@7.7.2/node_modules/semver/functions/inc.js\"(exports3, module) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n var SemVer = require_semver();\n var inc = (version6, release2, options, identifier, identifierBase) => {\n if (typeof options === \"string\") {\n identifierBase = identifier;\n identifier = options;\n options = void 0;\n }\n try {\n return new SemVer(\n version6 instanceof SemVer ? version6.version : version6,\n options\n ).inc(release2, identifier, identifierBase).version;\n } catch (er) {\n return null;\n }\n };\n module.exports = inc;\n }\n });\n\n // ../../../node_modules/.pnpm/semver@7.7.2/node_modules/semver/functions/diff.js\n var require_diff = __commonJS({\n \"../../../node_modules/.pnpm/semver@7.7.2/node_modules/semver/functions/diff.js\"(exports3, module) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n var parse = require_parse();\n var diff = (version1, version22) => {\n const v1 = parse(version1, null, true);\n const v2 = parse(version22, null, true);\n const comparison = v1.compare(v2);\n if (comparison === 0) {\n return null;\n }\n const v1Higher = comparison > 0;\n const highVersion = v1Higher ? v1 : v2;\n const lowVersion = v1Higher ? v2 : v1;\n const highHasPre = !!highVersion.prerelease.length;\n const lowHasPre = !!lowVersion.prerelease.length;\n if (lowHasPre && !highHasPre) {\n if (!lowVersion.patch && !lowVersion.minor) {\n return \"major\";\n }\n if (lowVersion.compareMain(highVersion) === 0) {\n if (lowVersion.minor && !lowVersion.patch) {\n return \"minor\";\n }\n return \"patch\";\n }\n }\n const prefix = highHasPre ? \"pre\" : \"\";\n if (v1.major !== v2.major) {\n return prefix + \"major\";\n }\n if (v1.minor !== v2.minor) {\n return prefix + \"minor\";\n }\n if (v1.patch !== v2.patch) {\n return prefix + \"patch\";\n }\n return \"prerelease\";\n };\n module.exports = diff;\n }\n });\n\n // ../../../node_modules/.pnpm/semver@7.7.2/node_modules/semver/functions/major.js\n var require_major = __commonJS({\n \"../../../node_modules/.pnpm/semver@7.7.2/node_modules/semver/functions/major.js\"(exports3, module) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n var SemVer = require_semver();\n var major = (a3, loose) => new SemVer(a3, loose).major;\n module.exports = major;\n }\n });\n\n // ../../../node_modules/.pnpm/semver@7.7.2/node_modules/semver/functions/minor.js\n var require_minor = __commonJS({\n \"../../../node_modules/.pnpm/semver@7.7.2/node_modules/semver/functions/minor.js\"(exports3, module) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n var SemVer = require_semver();\n var minor = (a3, loose) => new SemVer(a3, loose).minor;\n module.exports = minor;\n }\n });\n\n // ../../../node_modules/.pnpm/semver@7.7.2/node_modules/semver/functions/patch.js\n var require_patch = __commonJS({\n \"../../../node_modules/.pnpm/semver@7.7.2/node_modules/semver/functions/patch.js\"(exports3, module) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n var SemVer = require_semver();\n var patch = (a3, loose) => new SemVer(a3, loose).patch;\n module.exports = patch;\n }\n });\n\n // ../../../node_modules/.pnpm/semver@7.7.2/node_modules/semver/functions/prerelease.js\n var require_prerelease = __commonJS({\n \"../../../node_modules/.pnpm/semver@7.7.2/node_modules/semver/functions/prerelease.js\"(exports3, module) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n var parse = require_parse();\n var prerelease = (version6, options) => {\n const parsed = parse(version6, options);\n return parsed && parsed.prerelease.length ? parsed.prerelease : null;\n };\n module.exports = prerelease;\n }\n });\n\n // ../../../node_modules/.pnpm/semver@7.7.2/node_modules/semver/functions/compare.js\n var require_compare = __commonJS({\n \"../../../node_modules/.pnpm/semver@7.7.2/node_modules/semver/functions/compare.js\"(exports3, module) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n var SemVer = require_semver();\n var compare = (a3, b4, loose) => new SemVer(a3, loose).compare(new SemVer(b4, loose));\n module.exports = compare;\n }\n });\n\n // ../../../node_modules/.pnpm/semver@7.7.2/node_modules/semver/functions/rcompare.js\n var require_rcompare = __commonJS({\n \"../../../node_modules/.pnpm/semver@7.7.2/node_modules/semver/functions/rcompare.js\"(exports3, module) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n var compare = require_compare();\n var rcompare = (a3, b4, loose) => compare(b4, a3, loose);\n module.exports = rcompare;\n }\n });\n\n // ../../../node_modules/.pnpm/semver@7.7.2/node_modules/semver/functions/compare-loose.js\n var require_compare_loose = __commonJS({\n \"../../../node_modules/.pnpm/semver@7.7.2/node_modules/semver/functions/compare-loose.js\"(exports3, module) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n var compare = require_compare();\n var compareLoose = (a3, b4) => compare(a3, b4, true);\n module.exports = compareLoose;\n }\n });\n\n // ../../../node_modules/.pnpm/semver@7.7.2/node_modules/semver/functions/compare-build.js\n var require_compare_build = __commonJS({\n \"../../../node_modules/.pnpm/semver@7.7.2/node_modules/semver/functions/compare-build.js\"(exports3, module) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n var SemVer = require_semver();\n var compareBuild = (a3, b4, loose) => {\n const versionA = new SemVer(a3, loose);\n const versionB = new SemVer(b4, loose);\n return versionA.compare(versionB) || versionA.compareBuild(versionB);\n };\n module.exports = compareBuild;\n }\n });\n\n // ../../../node_modules/.pnpm/semver@7.7.2/node_modules/semver/functions/sort.js\n var require_sort = __commonJS({\n \"../../../node_modules/.pnpm/semver@7.7.2/node_modules/semver/functions/sort.js\"(exports3, module) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n var compareBuild = require_compare_build();\n var sort = (list, loose) => list.sort((a3, b4) => compareBuild(a3, b4, loose));\n module.exports = sort;\n }\n });\n\n // ../../../node_modules/.pnpm/semver@7.7.2/node_modules/semver/functions/rsort.js\n var require_rsort = __commonJS({\n \"../../../node_modules/.pnpm/semver@7.7.2/node_modules/semver/functions/rsort.js\"(exports3, module) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n var compareBuild = require_compare_build();\n var rsort = (list, loose) => list.sort((a3, b4) => compareBuild(b4, a3, loose));\n module.exports = rsort;\n }\n });\n\n // ../../../node_modules/.pnpm/semver@7.7.2/node_modules/semver/functions/gt.js\n var require_gt = __commonJS({\n \"../../../node_modules/.pnpm/semver@7.7.2/node_modules/semver/functions/gt.js\"(exports3, module) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n var compare = require_compare();\n var gt = (a3, b4, loose) => compare(a3, b4, loose) > 0;\n module.exports = gt;\n }\n });\n\n // ../../../node_modules/.pnpm/semver@7.7.2/node_modules/semver/functions/lt.js\n var require_lt = __commonJS({\n \"../../../node_modules/.pnpm/semver@7.7.2/node_modules/semver/functions/lt.js\"(exports3, module) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n var compare = require_compare();\n var lt = (a3, b4, loose) => compare(a3, b4, loose) < 0;\n module.exports = lt;\n }\n });\n\n // ../../../node_modules/.pnpm/semver@7.7.2/node_modules/semver/functions/eq.js\n var require_eq = __commonJS({\n \"../../../node_modules/.pnpm/semver@7.7.2/node_modules/semver/functions/eq.js\"(exports3, module) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n var compare = require_compare();\n var eq = (a3, b4, loose) => compare(a3, b4, loose) === 0;\n module.exports = eq;\n }\n });\n\n // ../../../node_modules/.pnpm/semver@7.7.2/node_modules/semver/functions/neq.js\n var require_neq = __commonJS({\n \"../../../node_modules/.pnpm/semver@7.7.2/node_modules/semver/functions/neq.js\"(exports3, module) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n var compare = require_compare();\n var neq = (a3, b4, loose) => compare(a3, b4, loose) !== 0;\n module.exports = neq;\n }\n });\n\n // ../../../node_modules/.pnpm/semver@7.7.2/node_modules/semver/functions/gte.js\n var require_gte = __commonJS({\n \"../../../node_modules/.pnpm/semver@7.7.2/node_modules/semver/functions/gte.js\"(exports3, module) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n var compare = require_compare();\n var gte = (a3, b4, loose) => compare(a3, b4, loose) >= 0;\n module.exports = gte;\n }\n });\n\n // ../../../node_modules/.pnpm/semver@7.7.2/node_modules/semver/functions/lte.js\n var require_lte = __commonJS({\n \"../../../node_modules/.pnpm/semver@7.7.2/node_modules/semver/functions/lte.js\"(exports3, module) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n var compare = require_compare();\n var lte = (a3, b4, loose) => compare(a3, b4, loose) <= 0;\n module.exports = lte;\n }\n });\n\n // ../../../node_modules/.pnpm/semver@7.7.2/node_modules/semver/functions/cmp.js\n var require_cmp = __commonJS({\n \"../../../node_modules/.pnpm/semver@7.7.2/node_modules/semver/functions/cmp.js\"(exports3, module) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n var eq = require_eq();\n var neq = require_neq();\n var gt = require_gt();\n var gte = require_gte();\n var lt = require_lt();\n var lte = require_lte();\n var cmp = (a3, op, b4, loose) => {\n switch (op) {\n case \"===\":\n if (typeof a3 === \"object\") {\n a3 = a3.version;\n }\n if (typeof b4 === \"object\") {\n b4 = b4.version;\n }\n return a3 === b4;\n case \"!==\":\n if (typeof a3 === \"object\") {\n a3 = a3.version;\n }\n if (typeof b4 === \"object\") {\n b4 = b4.version;\n }\n return a3 !== b4;\n case \"\":\n case \"=\":\n case \"==\":\n return eq(a3, b4, loose);\n case \"!=\":\n return neq(a3, b4, loose);\n case \">\":\n return gt(a3, b4, loose);\n case \">=\":\n return gte(a3, b4, loose);\n case \"<\":\n return lt(a3, b4, loose);\n case \"<=\":\n return lte(a3, b4, loose);\n default:\n throw new TypeError(`Invalid operator: ${op}`);\n }\n };\n module.exports = cmp;\n }\n });\n\n // ../../../node_modules/.pnpm/semver@7.7.2/node_modules/semver/functions/coerce.js\n var require_coerce = __commonJS({\n \"../../../node_modules/.pnpm/semver@7.7.2/node_modules/semver/functions/coerce.js\"(exports3, module) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n var SemVer = require_semver();\n var parse = require_parse();\n var { safeRe: re, t: t3 } = require_re();\n var coerce2 = (version6, options) => {\n if (version6 instanceof SemVer) {\n return version6;\n }\n if (typeof version6 === \"number\") {\n version6 = String(version6);\n }\n if (typeof version6 !== \"string\") {\n return null;\n }\n options = options || {};\n let match = null;\n if (!options.rtl) {\n match = version6.match(options.includePrerelease ? re[t3.COERCEFULL] : re[t3.COERCE]);\n } else {\n const coerceRtlRegex = options.includePrerelease ? re[t3.COERCERTLFULL] : re[t3.COERCERTL];\n let next;\n while ((next = coerceRtlRegex.exec(version6)) && (!match || match.index + match[0].length !== version6.length)) {\n if (!match || next.index + next[0].length !== match.index + match[0].length) {\n match = next;\n }\n coerceRtlRegex.lastIndex = next.index + next[1].length + next[2].length;\n }\n coerceRtlRegex.lastIndex = -1;\n }\n if (match === null) {\n return null;\n }\n const major = match[2];\n const minor = match[3] || \"0\";\n const patch = match[4] || \"0\";\n const prerelease = options.includePrerelease && match[5] ? `-${match[5]}` : \"\";\n const build = options.includePrerelease && match[6] ? `+${match[6]}` : \"\";\n return parse(`${major}.${minor}.${patch}${prerelease}${build}`, options);\n };\n module.exports = coerce2;\n }\n });\n\n // ../../../node_modules/.pnpm/semver@7.7.2/node_modules/semver/internal/lrucache.js\n var require_lrucache = __commonJS({\n \"../../../node_modules/.pnpm/semver@7.7.2/node_modules/semver/internal/lrucache.js\"(exports3, module) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n var LRUCache = class {\n constructor() {\n this.max = 1e3;\n this.map = /* @__PURE__ */ new Map();\n }\n get(key) {\n const value = this.map.get(key);\n if (value === void 0) {\n return void 0;\n } else {\n this.map.delete(key);\n this.map.set(key, value);\n return value;\n }\n }\n delete(key) {\n return this.map.delete(key);\n }\n set(key, value) {\n const deleted = this.delete(key);\n if (!deleted && value !== void 0) {\n if (this.map.size >= this.max) {\n const firstKey = this.map.keys().next().value;\n this.delete(firstKey);\n }\n this.map.set(key, value);\n }\n return this;\n }\n };\n module.exports = LRUCache;\n }\n });\n\n // ../../../node_modules/.pnpm/semver@7.7.2/node_modules/semver/classes/range.js\n var require_range = __commonJS({\n \"../../../node_modules/.pnpm/semver@7.7.2/node_modules/semver/classes/range.js\"(exports3, module) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n var SPACE_CHARACTERS = /\\s+/g;\n var Range = class _Range {\n constructor(range, options) {\n options = parseOptions(options);\n if (range instanceof _Range) {\n if (range.loose === !!options.loose && range.includePrerelease === !!options.includePrerelease) {\n return range;\n } else {\n return new _Range(range.raw, options);\n }\n }\n if (range instanceof Comparator) {\n this.raw = range.value;\n this.set = [[range]];\n this.formatted = void 0;\n return this;\n }\n this.options = options;\n this.loose = !!options.loose;\n this.includePrerelease = !!options.includePrerelease;\n this.raw = range.trim().replace(SPACE_CHARACTERS, \" \");\n this.set = this.raw.split(\"||\").map((r2) => this.parseRange(r2.trim())).filter((c4) => c4.length);\n if (!this.set.length) {\n throw new TypeError(`Invalid SemVer Range: ${this.raw}`);\n }\n if (this.set.length > 1) {\n const first = this.set[0];\n this.set = this.set.filter((c4) => !isNullSet(c4[0]));\n if (this.set.length === 0) {\n this.set = [first];\n } else if (this.set.length > 1) {\n for (const c4 of this.set) {\n if (c4.length === 1 && isAny(c4[0])) {\n this.set = [c4];\n break;\n }\n }\n }\n }\n this.formatted = void 0;\n }\n get range() {\n if (this.formatted === void 0) {\n this.formatted = \"\";\n for (let i3 = 0; i3 < this.set.length; i3++) {\n if (i3 > 0) {\n this.formatted += \"||\";\n }\n const comps = this.set[i3];\n for (let k4 = 0; k4 < comps.length; k4++) {\n if (k4 > 0) {\n this.formatted += \" \";\n }\n this.formatted += comps[k4].toString().trim();\n }\n }\n }\n return this.formatted;\n }\n format() {\n return this.range;\n }\n toString() {\n return this.range;\n }\n parseRange(range) {\n const memoOpts = (this.options.includePrerelease && FLAG_INCLUDE_PRERELEASE) | (this.options.loose && FLAG_LOOSE);\n const memoKey = memoOpts + \":\" + range;\n const cached = cache.get(memoKey);\n if (cached) {\n return cached;\n }\n const loose = this.options.loose;\n const hr = loose ? re[t3.HYPHENRANGELOOSE] : re[t3.HYPHENRANGE];\n range = range.replace(hr, hyphenReplace(this.options.includePrerelease));\n debug(\"hyphen replace\", range);\n range = range.replace(re[t3.COMPARATORTRIM], comparatorTrimReplace);\n debug(\"comparator trim\", range);\n range = range.replace(re[t3.TILDETRIM], tildeTrimReplace);\n debug(\"tilde trim\", range);\n range = range.replace(re[t3.CARETTRIM], caretTrimReplace);\n debug(\"caret trim\", range);\n let rangeList = range.split(\" \").map((comp) => parseComparator(comp, this.options)).join(\" \").split(/\\s+/).map((comp) => replaceGTE0(comp, this.options));\n if (loose) {\n rangeList = rangeList.filter((comp) => {\n debug(\"loose invalid filter\", comp, this.options);\n return !!comp.match(re[t3.COMPARATORLOOSE]);\n });\n }\n debug(\"range list\", rangeList);\n const rangeMap = /* @__PURE__ */ new Map();\n const comparators = rangeList.map((comp) => new Comparator(comp, this.options));\n for (const comp of comparators) {\n if (isNullSet(comp)) {\n return [comp];\n }\n rangeMap.set(comp.value, comp);\n }\n if (rangeMap.size > 1 && rangeMap.has(\"\")) {\n rangeMap.delete(\"\");\n }\n const result = [...rangeMap.values()];\n cache.set(memoKey, result);\n return result;\n }\n intersects(range, options) {\n if (!(range instanceof _Range)) {\n throw new TypeError(\"a Range is required\");\n }\n return this.set.some((thisComparators) => {\n return isSatisfiable(thisComparators, options) && range.set.some((rangeComparators) => {\n return isSatisfiable(rangeComparators, options) && thisComparators.every((thisComparator) => {\n return rangeComparators.every((rangeComparator) => {\n return thisComparator.intersects(rangeComparator, options);\n });\n });\n });\n });\n }\n // if ANY of the sets match ALL of its comparators, then pass\n test(version6) {\n if (!version6) {\n return false;\n }\n if (typeof version6 === \"string\") {\n try {\n version6 = new SemVer(version6, this.options);\n } catch (er) {\n return false;\n }\n }\n for (let i3 = 0; i3 < this.set.length; i3++) {\n if (testSet(this.set[i3], version6, this.options)) {\n return true;\n }\n }\n return false;\n }\n };\n module.exports = Range;\n var LRU = require_lrucache();\n var cache = new LRU();\n var parseOptions = require_parse_options();\n var Comparator = require_comparator();\n var debug = require_debug();\n var SemVer = require_semver();\n var {\n safeRe: re,\n t: t3,\n comparatorTrimReplace,\n tildeTrimReplace,\n caretTrimReplace\n } = require_re();\n var { FLAG_INCLUDE_PRERELEASE, FLAG_LOOSE } = require_constants();\n var isNullSet = (c4) => c4.value === \"<0.0.0-0\";\n var isAny = (c4) => c4.value === \"\";\n var isSatisfiable = (comparators, options) => {\n let result = true;\n const remainingComparators = comparators.slice();\n let testComparator = remainingComparators.pop();\n while (result && remainingComparators.length) {\n result = remainingComparators.every((otherComparator) => {\n return testComparator.intersects(otherComparator, options);\n });\n testComparator = remainingComparators.pop();\n }\n return result;\n };\n var parseComparator = (comp, options) => {\n debug(\"comp\", comp, options);\n comp = replaceCarets(comp, options);\n debug(\"caret\", comp);\n comp = replaceTildes(comp, options);\n debug(\"tildes\", comp);\n comp = replaceXRanges(comp, options);\n debug(\"xrange\", comp);\n comp = replaceStars(comp, options);\n debug(\"stars\", comp);\n return comp;\n };\n var isX = (id) => !id || id.toLowerCase() === \"x\" || id === \"*\";\n var replaceTildes = (comp, options) => {\n return comp.trim().split(/\\s+/).map((c4) => replaceTilde(c4, options)).join(\" \");\n };\n var replaceTilde = (comp, options) => {\n const r2 = options.loose ? re[t3.TILDELOOSE] : re[t3.TILDE];\n return comp.replace(r2, (_2, M2, m2, p4, pr) => {\n debug(\"tilde\", comp, _2, M2, m2, p4, pr);\n let ret;\n if (isX(M2)) {\n ret = \"\";\n } else if (isX(m2)) {\n ret = `>=${M2}.0.0 <${+M2 + 1}.0.0-0`;\n } else if (isX(p4)) {\n ret = `>=${M2}.${m2}.0 <${M2}.${+m2 + 1}.0-0`;\n } else if (pr) {\n debug(\"replaceTilde pr\", pr);\n ret = `>=${M2}.${m2}.${p4}-${pr} <${M2}.${+m2 + 1}.0-0`;\n } else {\n ret = `>=${M2}.${m2}.${p4} <${M2}.${+m2 + 1}.0-0`;\n }\n debug(\"tilde return\", ret);\n return ret;\n });\n };\n var replaceCarets = (comp, options) => {\n return comp.trim().split(/\\s+/).map((c4) => replaceCaret(c4, options)).join(\" \");\n };\n var replaceCaret = (comp, options) => {\n debug(\"caret\", comp, options);\n const r2 = options.loose ? re[t3.CARETLOOSE] : re[t3.CARET];\n const z2 = options.includePrerelease ? \"-0\" : \"\";\n return comp.replace(r2, (_2, M2, m2, p4, pr) => {\n debug(\"caret\", comp, _2, M2, m2, p4, pr);\n let ret;\n if (isX(M2)) {\n ret = \"\";\n } else if (isX(m2)) {\n ret = `>=${M2}.0.0${z2} <${+M2 + 1}.0.0-0`;\n } else if (isX(p4)) {\n if (M2 === \"0\") {\n ret = `>=${M2}.${m2}.0${z2} <${M2}.${+m2 + 1}.0-0`;\n } else {\n ret = `>=${M2}.${m2}.0${z2} <${+M2 + 1}.0.0-0`;\n }\n } else if (pr) {\n debug(\"replaceCaret pr\", pr);\n if (M2 === \"0\") {\n if (m2 === \"0\") {\n ret = `>=${M2}.${m2}.${p4}-${pr} <${M2}.${m2}.${+p4 + 1}-0`;\n } else {\n ret = `>=${M2}.${m2}.${p4}-${pr} <${M2}.${+m2 + 1}.0-0`;\n }\n } else {\n ret = `>=${M2}.${m2}.${p4}-${pr} <${+M2 + 1}.0.0-0`;\n }\n } else {\n debug(\"no pr\");\n if (M2 === \"0\") {\n if (m2 === \"0\") {\n ret = `>=${M2}.${m2}.${p4}${z2} <${M2}.${m2}.${+p4 + 1}-0`;\n } else {\n ret = `>=${M2}.${m2}.${p4}${z2} <${M2}.${+m2 + 1}.0-0`;\n }\n } else {\n ret = `>=${M2}.${m2}.${p4} <${+M2 + 1}.0.0-0`;\n }\n }\n debug(\"caret return\", ret);\n return ret;\n });\n };\n var replaceXRanges = (comp, options) => {\n debug(\"replaceXRanges\", comp, options);\n return comp.split(/\\s+/).map((c4) => replaceXRange(c4, options)).join(\" \");\n };\n var replaceXRange = (comp, options) => {\n comp = comp.trim();\n const r2 = options.loose ? re[t3.XRANGELOOSE] : re[t3.XRANGE];\n return comp.replace(r2, (ret, gtlt, M2, m2, p4, pr) => {\n debug(\"xRange\", comp, ret, gtlt, M2, m2, p4, pr);\n const xM = isX(M2);\n const xm = xM || isX(m2);\n const xp = xm || isX(p4);\n const anyX = xp;\n if (gtlt === \"=\" && anyX) {\n gtlt = \"\";\n }\n pr = options.includePrerelease ? \"-0\" : \"\";\n if (xM) {\n if (gtlt === \">\" || gtlt === \"<\") {\n ret = \"<0.0.0-0\";\n } else {\n ret = \"*\";\n }\n } else if (gtlt && anyX) {\n if (xm) {\n m2 = 0;\n }\n p4 = 0;\n if (gtlt === \">\") {\n gtlt = \">=\";\n if (xm) {\n M2 = +M2 + 1;\n m2 = 0;\n p4 = 0;\n } else {\n m2 = +m2 + 1;\n p4 = 0;\n }\n } else if (gtlt === \"<=\") {\n gtlt = \"<\";\n if (xm) {\n M2 = +M2 + 1;\n } else {\n m2 = +m2 + 1;\n }\n }\n if (gtlt === \"<\") {\n pr = \"-0\";\n }\n ret = `${gtlt + M2}.${m2}.${p4}${pr}`;\n } else if (xm) {\n ret = `>=${M2}.0.0${pr} <${+M2 + 1}.0.0-0`;\n } else if (xp) {\n ret = `>=${M2}.${m2}.0${pr} <${M2}.${+m2 + 1}.0-0`;\n }\n debug(\"xRange return\", ret);\n return ret;\n });\n };\n var replaceStars = (comp, options) => {\n debug(\"replaceStars\", comp, options);\n return comp.trim().replace(re[t3.STAR], \"\");\n };\n var replaceGTE0 = (comp, options) => {\n debug(\"replaceGTE0\", comp, options);\n return comp.trim().replace(re[options.includePrerelease ? t3.GTE0PRE : t3.GTE0], \"\");\n };\n var hyphenReplace = (incPr) => ($0, from14, fM, fm, fp, fpr, fb, to, tM, tm, tp, tpr) => {\n if (isX(fM)) {\n from14 = \"\";\n } else if (isX(fm)) {\n from14 = `>=${fM}.0.0${incPr ? \"-0\" : \"\"}`;\n } else if (isX(fp)) {\n from14 = `>=${fM}.${fm}.0${incPr ? \"-0\" : \"\"}`;\n } else if (fpr) {\n from14 = `>=${from14}`;\n } else {\n from14 = `>=${from14}${incPr ? \"-0\" : \"\"}`;\n }\n if (isX(tM)) {\n to = \"\";\n } else if (isX(tm)) {\n to = `<${+tM + 1}.0.0-0`;\n } else if (isX(tp)) {\n to = `<${tM}.${+tm + 1}.0-0`;\n } else if (tpr) {\n to = `<=${tM}.${tm}.${tp}-${tpr}`;\n } else if (incPr) {\n to = `<${tM}.${tm}.${+tp + 1}-0`;\n } else {\n to = `<=${to}`;\n }\n return `${from14} ${to}`.trim();\n };\n var testSet = (set, version6, options) => {\n for (let i3 = 0; i3 < set.length; i3++) {\n if (!set[i3].test(version6)) {\n return false;\n }\n }\n if (version6.prerelease.length && !options.includePrerelease) {\n for (let i3 = 0; i3 < set.length; i3++) {\n debug(set[i3].semver);\n if (set[i3].semver === Comparator.ANY) {\n continue;\n }\n if (set[i3].semver.prerelease.length > 0) {\n const allowed = set[i3].semver;\n if (allowed.major === version6.major && allowed.minor === version6.minor && allowed.patch === version6.patch) {\n return true;\n }\n }\n }\n return false;\n }\n return true;\n };\n }\n });\n\n // ../../../node_modules/.pnpm/semver@7.7.2/node_modules/semver/classes/comparator.js\n var require_comparator = __commonJS({\n \"../../../node_modules/.pnpm/semver@7.7.2/node_modules/semver/classes/comparator.js\"(exports3, module) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n var ANY = Symbol(\"SemVer ANY\");\n var Comparator = class _Comparator {\n static get ANY() {\n return ANY;\n }\n constructor(comp, options) {\n options = parseOptions(options);\n if (comp instanceof _Comparator) {\n if (comp.loose === !!options.loose) {\n return comp;\n } else {\n comp = comp.value;\n }\n }\n comp = comp.trim().split(/\\s+/).join(\" \");\n debug(\"comparator\", comp, options);\n this.options = options;\n this.loose = !!options.loose;\n this.parse(comp);\n if (this.semver === ANY) {\n this.value = \"\";\n } else {\n this.value = this.operator + this.semver.version;\n }\n debug(\"comp\", this);\n }\n parse(comp) {\n const r2 = this.options.loose ? re[t3.COMPARATORLOOSE] : re[t3.COMPARATOR];\n const m2 = comp.match(r2);\n if (!m2) {\n throw new TypeError(`Invalid comparator: ${comp}`);\n }\n this.operator = m2[1] !== void 0 ? m2[1] : \"\";\n if (this.operator === \"=\") {\n this.operator = \"\";\n }\n if (!m2[2]) {\n this.semver = ANY;\n } else {\n this.semver = new SemVer(m2[2], this.options.loose);\n }\n }\n toString() {\n return this.value;\n }\n test(version6) {\n debug(\"Comparator.test\", version6, this.options.loose);\n if (this.semver === ANY || version6 === ANY) {\n return true;\n }\n if (typeof version6 === \"string\") {\n try {\n version6 = new SemVer(version6, this.options);\n } catch (er) {\n return false;\n }\n }\n return cmp(version6, this.operator, this.semver, this.options);\n }\n intersects(comp, options) {\n if (!(comp instanceof _Comparator)) {\n throw new TypeError(\"a Comparator is required\");\n }\n if (this.operator === \"\") {\n if (this.value === \"\") {\n return true;\n }\n return new Range(comp.value, options).test(this.value);\n } else if (comp.operator === \"\") {\n if (comp.value === \"\") {\n return true;\n }\n return new Range(this.value, options).test(comp.semver);\n }\n options = parseOptions(options);\n if (options.includePrerelease && (this.value === \"<0.0.0-0\" || comp.value === \"<0.0.0-0\")) {\n return false;\n }\n if (!options.includePrerelease && (this.value.startsWith(\"<0.0.0\") || comp.value.startsWith(\"<0.0.0\"))) {\n return false;\n }\n if (this.operator.startsWith(\">\") && comp.operator.startsWith(\">\")) {\n return true;\n }\n if (this.operator.startsWith(\"<\") && comp.operator.startsWith(\"<\")) {\n return true;\n }\n if (this.semver.version === comp.semver.version && this.operator.includes(\"=\") && comp.operator.includes(\"=\")) {\n return true;\n }\n if (cmp(this.semver, \"<\", comp.semver, options) && this.operator.startsWith(\">\") && comp.operator.startsWith(\"<\")) {\n return true;\n }\n if (cmp(this.semver, \">\", comp.semver, options) && this.operator.startsWith(\"<\") && comp.operator.startsWith(\">\")) {\n return true;\n }\n return false;\n }\n };\n module.exports = Comparator;\n var parseOptions = require_parse_options();\n var { safeRe: re, t: t3 } = require_re();\n var cmp = require_cmp();\n var debug = require_debug();\n var SemVer = require_semver();\n var Range = require_range();\n }\n });\n\n // ../../../node_modules/.pnpm/semver@7.7.2/node_modules/semver/functions/satisfies.js\n var require_satisfies = __commonJS({\n \"../../../node_modules/.pnpm/semver@7.7.2/node_modules/semver/functions/satisfies.js\"(exports3, module) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n var Range = require_range();\n var satisfies = (version6, range, options) => {\n try {\n range = new Range(range, options);\n } catch (er) {\n return false;\n }\n return range.test(version6);\n };\n module.exports = satisfies;\n }\n });\n\n // ../../../node_modules/.pnpm/semver@7.7.2/node_modules/semver/ranges/to-comparators.js\n var require_to_comparators = __commonJS({\n \"../../../node_modules/.pnpm/semver@7.7.2/node_modules/semver/ranges/to-comparators.js\"(exports3, module) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n var Range = require_range();\n var toComparators = (range, options) => new Range(range, options).set.map((comp) => comp.map((c4) => c4.value).join(\" \").trim().split(\" \"));\n module.exports = toComparators;\n }\n });\n\n // ../../../node_modules/.pnpm/semver@7.7.2/node_modules/semver/ranges/max-satisfying.js\n var require_max_satisfying = __commonJS({\n \"../../../node_modules/.pnpm/semver@7.7.2/node_modules/semver/ranges/max-satisfying.js\"(exports3, module) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n var SemVer = require_semver();\n var Range = require_range();\n var maxSatisfying = (versions2, range, options) => {\n let max = null;\n let maxSV = null;\n let rangeObj = null;\n try {\n rangeObj = new Range(range, options);\n } catch (er) {\n return null;\n }\n versions2.forEach((v2) => {\n if (rangeObj.test(v2)) {\n if (!max || maxSV.compare(v2) === -1) {\n max = v2;\n maxSV = new SemVer(max, options);\n }\n }\n });\n return max;\n };\n module.exports = maxSatisfying;\n }\n });\n\n // ../../../node_modules/.pnpm/semver@7.7.2/node_modules/semver/ranges/min-satisfying.js\n var require_min_satisfying = __commonJS({\n \"../../../node_modules/.pnpm/semver@7.7.2/node_modules/semver/ranges/min-satisfying.js\"(exports3, module) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n var SemVer = require_semver();\n var Range = require_range();\n var minSatisfying = (versions2, range, options) => {\n let min = null;\n let minSV = null;\n let rangeObj = null;\n try {\n rangeObj = new Range(range, options);\n } catch (er) {\n return null;\n }\n versions2.forEach((v2) => {\n if (rangeObj.test(v2)) {\n if (!min || minSV.compare(v2) === 1) {\n min = v2;\n minSV = new SemVer(min, options);\n }\n }\n });\n return min;\n };\n module.exports = minSatisfying;\n }\n });\n\n // ../../../node_modules/.pnpm/semver@7.7.2/node_modules/semver/ranges/min-version.js\n var require_min_version = __commonJS({\n \"../../../node_modules/.pnpm/semver@7.7.2/node_modules/semver/ranges/min-version.js\"(exports3, module) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n var SemVer = require_semver();\n var Range = require_range();\n var gt = require_gt();\n var minVersion = (range, loose) => {\n range = new Range(range, loose);\n let minver = new SemVer(\"0.0.0\");\n if (range.test(minver)) {\n return minver;\n }\n minver = new SemVer(\"0.0.0-0\");\n if (range.test(minver)) {\n return minver;\n }\n minver = null;\n for (let i3 = 0; i3 < range.set.length; ++i3) {\n const comparators = range.set[i3];\n let setMin = null;\n comparators.forEach((comparator) => {\n const compver = new SemVer(comparator.semver.version);\n switch (comparator.operator) {\n case \">\":\n if (compver.prerelease.length === 0) {\n compver.patch++;\n } else {\n compver.prerelease.push(0);\n }\n compver.raw = compver.format();\n case \"\":\n case \">=\":\n if (!setMin || gt(compver, setMin)) {\n setMin = compver;\n }\n break;\n case \"<\":\n case \"<=\":\n break;\n default:\n throw new Error(`Unexpected operation: ${comparator.operator}`);\n }\n });\n if (setMin && (!minver || gt(minver, setMin))) {\n minver = setMin;\n }\n }\n if (minver && range.test(minver)) {\n return minver;\n }\n return null;\n };\n module.exports = minVersion;\n }\n });\n\n // ../../../node_modules/.pnpm/semver@7.7.2/node_modules/semver/ranges/valid.js\n var require_valid2 = __commonJS({\n \"../../../node_modules/.pnpm/semver@7.7.2/node_modules/semver/ranges/valid.js\"(exports3, module) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n var Range = require_range();\n var validRange = (range, options) => {\n try {\n return new Range(range, options).range || \"*\";\n } catch (er) {\n return null;\n }\n };\n module.exports = validRange;\n }\n });\n\n // ../../../node_modules/.pnpm/semver@7.7.2/node_modules/semver/ranges/outside.js\n var require_outside = __commonJS({\n \"../../../node_modules/.pnpm/semver@7.7.2/node_modules/semver/ranges/outside.js\"(exports3, module) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n var SemVer = require_semver();\n var Comparator = require_comparator();\n var { ANY } = Comparator;\n var Range = require_range();\n var satisfies = require_satisfies();\n var gt = require_gt();\n var lt = require_lt();\n var lte = require_lte();\n var gte = require_gte();\n var outside = (version6, range, hilo, options) => {\n version6 = new SemVer(version6, options);\n range = new Range(range, options);\n let gtfn, ltefn, ltfn, comp, ecomp;\n switch (hilo) {\n case \">\":\n gtfn = gt;\n ltefn = lte;\n ltfn = lt;\n comp = \">\";\n ecomp = \">=\";\n break;\n case \"<\":\n gtfn = lt;\n ltefn = gte;\n ltfn = gt;\n comp = \"<\";\n ecomp = \"<=\";\n break;\n default:\n throw new TypeError('Must provide a hilo val of \"<\" or \">\"');\n }\n if (satisfies(version6, range, options)) {\n return false;\n }\n for (let i3 = 0; i3 < range.set.length; ++i3) {\n const comparators = range.set[i3];\n let high = null;\n let low = null;\n comparators.forEach((comparator) => {\n if (comparator.semver === ANY) {\n comparator = new Comparator(\">=0.0.0\");\n }\n high = high || comparator;\n low = low || comparator;\n if (gtfn(comparator.semver, high.semver, options)) {\n high = comparator;\n } else if (ltfn(comparator.semver, low.semver, options)) {\n low = comparator;\n }\n });\n if (high.operator === comp || high.operator === ecomp) {\n return false;\n }\n if ((!low.operator || low.operator === comp) && ltefn(version6, low.semver)) {\n return false;\n } else if (low.operator === ecomp && ltfn(version6, low.semver)) {\n return false;\n }\n }\n return true;\n };\n module.exports = outside;\n }\n });\n\n // ../../../node_modules/.pnpm/semver@7.7.2/node_modules/semver/ranges/gtr.js\n var require_gtr = __commonJS({\n \"../../../node_modules/.pnpm/semver@7.7.2/node_modules/semver/ranges/gtr.js\"(exports3, module) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n var outside = require_outside();\n var gtr = (version6, range, options) => outside(version6, range, \">\", options);\n module.exports = gtr;\n }\n });\n\n // ../../../node_modules/.pnpm/semver@7.7.2/node_modules/semver/ranges/ltr.js\n var require_ltr = __commonJS({\n \"../../../node_modules/.pnpm/semver@7.7.2/node_modules/semver/ranges/ltr.js\"(exports3, module) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n var outside = require_outside();\n var ltr = (version6, range, options) => outside(version6, range, \"<\", options);\n module.exports = ltr;\n }\n });\n\n // ../../../node_modules/.pnpm/semver@7.7.2/node_modules/semver/ranges/intersects.js\n var require_intersects = __commonJS({\n \"../../../node_modules/.pnpm/semver@7.7.2/node_modules/semver/ranges/intersects.js\"(exports3, module) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n var Range = require_range();\n var intersects = (r1, r2, options) => {\n r1 = new Range(r1, options);\n r2 = new Range(r2, options);\n return r1.intersects(r2, options);\n };\n module.exports = intersects;\n }\n });\n\n // ../../../node_modules/.pnpm/semver@7.7.2/node_modules/semver/ranges/simplify.js\n var require_simplify = __commonJS({\n \"../../../node_modules/.pnpm/semver@7.7.2/node_modules/semver/ranges/simplify.js\"(exports3, module) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n var satisfies = require_satisfies();\n var compare = require_compare();\n module.exports = (versions2, range, options) => {\n const set = [];\n let first = null;\n let prev = null;\n const v2 = versions2.sort((a3, b4) => compare(a3, b4, options));\n for (const version6 of v2) {\n const included = satisfies(version6, range, options);\n if (included) {\n prev = version6;\n if (!first) {\n first = version6;\n }\n } else {\n if (prev) {\n set.push([first, prev]);\n }\n prev = null;\n first = null;\n }\n }\n if (first) {\n set.push([first, null]);\n }\n const ranges = [];\n for (const [min, max] of set) {\n if (min === max) {\n ranges.push(min);\n } else if (!max && min === v2[0]) {\n ranges.push(\"*\");\n } else if (!max) {\n ranges.push(`>=${min}`);\n } else if (min === v2[0]) {\n ranges.push(`<=${max}`);\n } else {\n ranges.push(`${min} - ${max}`);\n }\n }\n const simplified = ranges.join(\" || \");\n const original = typeof range.raw === \"string\" ? range.raw : String(range);\n return simplified.length < original.length ? simplified : range;\n };\n }\n });\n\n // ../../../node_modules/.pnpm/semver@7.7.2/node_modules/semver/ranges/subset.js\n var require_subset = __commonJS({\n \"../../../node_modules/.pnpm/semver@7.7.2/node_modules/semver/ranges/subset.js\"(exports3, module) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n var Range = require_range();\n var Comparator = require_comparator();\n var { ANY } = Comparator;\n var satisfies = require_satisfies();\n var compare = require_compare();\n var subset = (sub, dom, options = {}) => {\n if (sub === dom) {\n return true;\n }\n sub = new Range(sub, options);\n dom = new Range(dom, options);\n let sawNonNull = false;\n OUTER:\n for (const simpleSub of sub.set) {\n for (const simpleDom of dom.set) {\n const isSub = simpleSubset(simpleSub, simpleDom, options);\n sawNonNull = sawNonNull || isSub !== null;\n if (isSub) {\n continue OUTER;\n }\n }\n if (sawNonNull) {\n return false;\n }\n }\n return true;\n };\n var minimumVersionWithPreRelease = [new Comparator(\">=0.0.0-0\")];\n var minimumVersion = [new Comparator(\">=0.0.0\")];\n var simpleSubset = (sub, dom, options) => {\n if (sub === dom) {\n return true;\n }\n if (sub.length === 1 && sub[0].semver === ANY) {\n if (dom.length === 1 && dom[0].semver === ANY) {\n return true;\n } else if (options.includePrerelease) {\n sub = minimumVersionWithPreRelease;\n } else {\n sub = minimumVersion;\n }\n }\n if (dom.length === 1 && dom[0].semver === ANY) {\n if (options.includePrerelease) {\n return true;\n } else {\n dom = minimumVersion;\n }\n }\n const eqSet = /* @__PURE__ */ new Set();\n let gt, lt;\n for (const c4 of sub) {\n if (c4.operator === \">\" || c4.operator === \">=\") {\n gt = higherGT(gt, c4, options);\n } else if (c4.operator === \"<\" || c4.operator === \"<=\") {\n lt = lowerLT(lt, c4, options);\n } else {\n eqSet.add(c4.semver);\n }\n }\n if (eqSet.size > 1) {\n return null;\n }\n let gtltComp;\n if (gt && lt) {\n gtltComp = compare(gt.semver, lt.semver, options);\n if (gtltComp > 0) {\n return null;\n } else if (gtltComp === 0 && (gt.operator !== \">=\" || lt.operator !== \"<=\")) {\n return null;\n }\n }\n for (const eq of eqSet) {\n if (gt && !satisfies(eq, String(gt), options)) {\n return null;\n }\n if (lt && !satisfies(eq, String(lt), options)) {\n return null;\n }\n for (const c4 of dom) {\n if (!satisfies(eq, String(c4), options)) {\n return false;\n }\n }\n return true;\n }\n let higher, lower;\n let hasDomLT, hasDomGT;\n let needDomLTPre = lt && !options.includePrerelease && lt.semver.prerelease.length ? lt.semver : false;\n let needDomGTPre = gt && !options.includePrerelease && gt.semver.prerelease.length ? gt.semver : false;\n if (needDomLTPre && needDomLTPre.prerelease.length === 1 && lt.operator === \"<\" && needDomLTPre.prerelease[0] === 0) {\n needDomLTPre = false;\n }\n for (const c4 of dom) {\n hasDomGT = hasDomGT || c4.operator === \">\" || c4.operator === \">=\";\n hasDomLT = hasDomLT || c4.operator === \"<\" || c4.operator === \"<=\";\n if (gt) {\n if (needDomGTPre) {\n if (c4.semver.prerelease && c4.semver.prerelease.length && c4.semver.major === needDomGTPre.major && c4.semver.minor === needDomGTPre.minor && c4.semver.patch === needDomGTPre.patch) {\n needDomGTPre = false;\n }\n }\n if (c4.operator === \">\" || c4.operator === \">=\") {\n higher = higherGT(gt, c4, options);\n if (higher === c4 && higher !== gt) {\n return false;\n }\n } else if (gt.operator === \">=\" && !satisfies(gt.semver, String(c4), options)) {\n return false;\n }\n }\n if (lt) {\n if (needDomLTPre) {\n if (c4.semver.prerelease && c4.semver.prerelease.length && c4.semver.major === needDomLTPre.major && c4.semver.minor === needDomLTPre.minor && c4.semver.patch === needDomLTPre.patch) {\n needDomLTPre = false;\n }\n }\n if (c4.operator === \"<\" || c4.operator === \"<=\") {\n lower = lowerLT(lt, c4, options);\n if (lower === c4 && lower !== lt) {\n return false;\n }\n } else if (lt.operator === \"<=\" && !satisfies(lt.semver, String(c4), options)) {\n return false;\n }\n }\n if (!c4.operator && (lt || gt) && gtltComp !== 0) {\n return false;\n }\n }\n if (gt && hasDomLT && !lt && gtltComp !== 0) {\n return false;\n }\n if (lt && hasDomGT && !gt && gtltComp !== 0) {\n return false;\n }\n if (needDomGTPre || needDomLTPre) {\n return false;\n }\n return true;\n };\n var higherGT = (a3, b4, options) => {\n if (!a3) {\n return b4;\n }\n const comp = compare(a3.semver, b4.semver, options);\n return comp > 0 ? a3 : comp < 0 ? b4 : b4.operator === \">\" && a3.operator === \">=\" ? b4 : a3;\n };\n var lowerLT = (a3, b4, options) => {\n if (!a3) {\n return b4;\n }\n const comp = compare(a3.semver, b4.semver, options);\n return comp < 0 ? a3 : comp > 0 ? b4 : b4.operator === \"<\" && a3.operator === \"<=\" ? b4 : a3;\n };\n module.exports = subset;\n }\n });\n\n // ../../../node_modules/.pnpm/semver@7.7.2/node_modules/semver/index.js\n var require_semver2 = __commonJS({\n \"../../../node_modules/.pnpm/semver@7.7.2/node_modules/semver/index.js\"(exports3, module) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n var internalRe = require_re();\n var constants = require_constants();\n var SemVer = require_semver();\n var identifiers = require_identifiers();\n var parse = require_parse();\n var valid = require_valid();\n var clean3 = require_clean();\n var inc = require_inc();\n var diff = require_diff();\n var major = require_major();\n var minor = require_minor();\n var patch = require_patch();\n var prerelease = require_prerelease();\n var compare = require_compare();\n var rcompare = require_rcompare();\n var compareLoose = require_compare_loose();\n var compareBuild = require_compare_build();\n var sort = require_sort();\n var rsort = require_rsort();\n var gt = require_gt();\n var lt = require_lt();\n var eq = require_eq();\n var neq = require_neq();\n var gte = require_gte();\n var lte = require_lte();\n var cmp = require_cmp();\n var coerce2 = require_coerce();\n var Comparator = require_comparator();\n var Range = require_range();\n var satisfies = require_satisfies();\n var toComparators = require_to_comparators();\n var maxSatisfying = require_max_satisfying();\n var minSatisfying = require_min_satisfying();\n var minVersion = require_min_version();\n var validRange = require_valid2();\n var outside = require_outside();\n var gtr = require_gtr();\n var ltr = require_ltr();\n var intersects = require_intersects();\n var simplifyRange = require_simplify();\n var subset = require_subset();\n module.exports = {\n parse,\n valid,\n clean: clean3,\n inc,\n diff,\n major,\n minor,\n patch,\n prerelease,\n compare,\n rcompare,\n compareLoose,\n compareBuild,\n sort,\n rsort,\n gt,\n lt,\n eq,\n neq,\n gte,\n lte,\n cmp,\n coerce: coerce2,\n Comparator,\n Range,\n satisfies,\n toComparators,\n maxSatisfying,\n minSatisfying,\n minVersion,\n validRange,\n outside,\n gtr,\n ltr,\n intersects,\n simplifyRange,\n subset,\n SemVer,\n re: internalRe.re,\n src: internalRe.src,\n tokens: internalRe.t,\n SEMVER_SPEC_VERSION: constants.SEMVER_SPEC_VERSION,\n RELEASE_TYPES: constants.RELEASE_TYPES,\n compareIdentifiers: identifiers.compareIdentifiers,\n rcompareIdentifiers: identifiers.rcompareIdentifiers\n };\n }\n });\n\n // ../../libs/ability-sdk/dist/src/lib/constants.js\n var require_constants2 = __commonJS({\n \"../../libs/ability-sdk/dist/src/lib/constants.js\"(exports3) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n Object.defineProperty(exports3, \"__esModule\", { value: true });\n exports3.VINCENT_TOOL_API_VERSION = void 0;\n exports3.VINCENT_TOOL_API_VERSION = \"2.0.0\";\n }\n });\n\n // ../../libs/ability-sdk/dist/src/lib/assertSupportedAbilityVersion.js\n var require_assertSupportedAbilityVersion = __commonJS({\n \"../../libs/ability-sdk/dist/src/lib/assertSupportedAbilityVersion.js\"(exports3) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n Object.defineProperty(exports3, \"__esModule\", { value: true });\n exports3.assertSupportedAbilityVersion = assertSupportedAbilityVersion;\n var semver_1 = require_semver2();\n var constants_1 = require_constants2();\n function assertSupportedAbilityVersion(abilityVersionSemver) {\n if (!abilityVersionSemver) {\n throw new Error(\"Ability version is required\");\n }\n if ((0, semver_1.major)(abilityVersionSemver) !== (0, semver_1.major)(constants_1.VINCENT_TOOL_API_VERSION)) {\n throw new Error(`Ability version ${abilityVersionSemver} is not supported. Current version: ${constants_1.VINCENT_TOOL_API_VERSION}. Major versions must match.`);\n }\n }\n }\n });\n\n // ../../libs/ability-sdk/dist/src/lib/utils.js\n var require_utils = __commonJS({\n \"../../libs/ability-sdk/dist/src/lib/utils.js\"(exports3) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n Object.defineProperty(exports3, \"__esModule\", { value: true });\n exports3.bigintReplacer = void 0;\n var bigintReplacer = (key, value) => {\n return typeof value === \"bigint\" ? value.toString() : value;\n };\n exports3.bigintReplacer = bigintReplacer;\n }\n });\n\n // ../../libs/ability-sdk/dist/src/lib/policyCore/helpers/resultCreators.js\n var require_resultCreators = __commonJS({\n \"../../libs/ability-sdk/dist/src/lib/policyCore/helpers/resultCreators.js\"(exports3) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n Object.defineProperty(exports3, \"__esModule\", { value: true });\n exports3.createDenyResult = createDenyResult;\n exports3.createDenyNoResult = createDenyNoResult;\n exports3.createAllowResult = createAllowResult;\n exports3.createAllowEvaluationResult = createAllowEvaluationResult;\n exports3.createDenyEvaluationResult = createDenyEvaluationResult;\n exports3.wrapAllow = wrapAllow;\n exports3.wrapDeny = wrapDeny;\n exports3.returnNoResultDeny = returnNoResultDeny;\n exports3.isTypedAllowResponse = isTypedAllowResponse;\n function createDenyResult(params) {\n if (params.result === void 0) {\n return {\n allow: false,\n runtimeError: params.runtimeError,\n result: void 0,\n ...params.schemaValidationError ? { schemaValidationError: params.schemaValidationError } : {}\n };\n }\n return {\n allow: false,\n runtimeError: params.runtimeError,\n result: params.result,\n ...params.schemaValidationError ? { schemaValidationError: params.schemaValidationError } : {}\n };\n }\n function createDenyNoResult(runtimeError, schemaValidationError) {\n return createDenyResult({ runtimeError, schemaValidationError });\n }\n function createAllowResult(params) {\n if (params.result === void 0) {\n return {\n allow: true,\n result: void 0\n };\n }\n return {\n allow: true,\n result: params.result\n };\n }\n function createAllowEvaluationResult(params) {\n return {\n allow: true,\n evaluatedPolicies: params.evaluatedPolicies,\n allowedPolicies: params.allowedPolicies,\n deniedPolicy: void 0\n // important for union discrimination\n };\n }\n function createDenyEvaluationResult(params) {\n return {\n allow: false,\n evaluatedPolicies: params.evaluatedPolicies,\n allowedPolicies: params.allowedPolicies,\n deniedPolicy: params.deniedPolicy\n };\n }\n function wrapAllow(value) {\n return createAllowResult({ result: value });\n }\n function wrapDeny(runtimeError, result, schemaValidationError) {\n return createDenyResult({ runtimeError, result, schemaValidationError });\n }\n function returnNoResultDeny(runtimeError, schemaValidationError) {\n return createDenyNoResult(runtimeError, schemaValidationError);\n }\n function isTypedAllowResponse(val) {\n return typeof val === \"object\" && val !== null && val.allow === true;\n }\n }\n });\n\n // ../../libs/ability-sdk/dist/src/lib/policyCore/helpers/typeGuards.js\n var require_typeGuards = __commonJS({\n \"../../libs/ability-sdk/dist/src/lib/policyCore/helpers/typeGuards.js\"(exports3) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n Object.defineProperty(exports3, \"__esModule\", { value: true });\n exports3.isZodValidationDenyResult = isZodValidationDenyResult;\n exports3.isPolicyDenyResponse = isPolicyDenyResponse;\n exports3.isPolicyAllowResponse = isPolicyAllowResponse;\n exports3.isPolicyResponse = isPolicyResponse;\n function isZodValidationDenyResult(result) {\n return typeof result === \"object\" && result !== null && \"zodError\" in result;\n }\n function isPolicyDenyResponse(val) {\n return typeof val === \"object\" && val !== null && val.allow === false;\n }\n function isPolicyAllowResponse(val) {\n return typeof val === \"object\" && val !== null && val.allow === true;\n }\n function isPolicyResponse(value) {\n return typeof value === \"object\" && value !== null && \"allow\" in value && typeof value.allow === \"boolean\";\n }\n }\n });\n\n // ../../libs/ability-sdk/dist/src/lib/policyCore/helpers/zod.js\n var require_zod = __commonJS({\n \"../../libs/ability-sdk/dist/src/lib/policyCore/helpers/zod.js\"(exports3) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n Object.defineProperty(exports3, \"__esModule\", { value: true });\n exports3.PolicyResponseShape = void 0;\n exports3.validateOrDeny = validateOrDeny;\n exports3.getValidatedParamsOrDeny = getValidatedParamsOrDeny;\n exports3.getSchemaForPolicyResponseResult = getSchemaForPolicyResponseResult;\n var zod_1 = require_cjs();\n var utils_1 = require_utils();\n var resultCreators_1 = require_resultCreators();\n var typeGuards_1 = require_typeGuards();\n exports3.PolicyResponseShape = zod_1.z.object({\n allow: zod_1.z.boolean(),\n result: zod_1.z.unknown()\n });\n function validateOrDeny(value, schema, phase, stage) {\n const parsed = schema.safeParse(value);\n if (!parsed.success) {\n const descriptor = stage === \"input\" ? \"parameters\" : \"result\";\n const message = `Invalid ${phase} ${descriptor}.`;\n return (0, resultCreators_1.createDenyResult)({\n runtimeError: message,\n schemaValidationError: {\n zodError: parsed.error,\n phase,\n stage\n }\n });\n }\n return parsed.data;\n }\n function getValidatedParamsOrDeny({ rawAbilityParams, rawUserParams, abilityParamsSchema: abilityParamsSchema2, userParamsSchema, phase }) {\n const abilityParams2 = validateOrDeny(rawAbilityParams, abilityParamsSchema2, phase, \"input\");\n if ((0, typeGuards_1.isPolicyDenyResponse)(abilityParams2)) {\n return abilityParams2;\n }\n const userParams = validateOrDeny(rawUserParams, userParamsSchema, phase, \"input\");\n if ((0, typeGuards_1.isPolicyDenyResponse)(userParams)) {\n return userParams;\n }\n return {\n abilityParams: abilityParams2,\n userParams\n };\n }\n function getSchemaForPolicyResponseResult({ value, allowResultSchema, denyResultSchema }) {\n if (!(0, typeGuards_1.isPolicyResponse)(value)) {\n console.log(\"getSchemaForPolicyResponseResult !isPolicyResponse\", JSON.stringify(value, utils_1.bigintReplacer));\n return {\n schemaToUse: exports3.PolicyResponseShape,\n parsedType: \"unknown\"\n };\n }\n console.log(\"getSchemaForPolicyResponseResult value is\", JSON.stringify(value, utils_1.bigintReplacer));\n return {\n schemaToUse: value.allow ? allowResultSchema : denyResultSchema,\n parsedType: value.allow ? \"allow\" : \"deny\"\n };\n }\n }\n });\n\n // ../../libs/ability-sdk/dist/src/lib/policyCore/helpers/index.js\n var require_helpers = __commonJS({\n \"../../libs/ability-sdk/dist/src/lib/policyCore/helpers/index.js\"(exports3) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n Object.defineProperty(exports3, \"__esModule\", { value: true });\n exports3.getSchemaForPolicyResponseResult = exports3.getValidatedParamsOrDeny = exports3.validateOrDeny = exports3.isPolicyDenyResponse = exports3.isPolicyAllowResponse = exports3.isPolicyResponse = exports3.createDenyResult = void 0;\n var resultCreators_1 = require_resultCreators();\n Object.defineProperty(exports3, \"createDenyResult\", { enumerable: true, get: function() {\n return resultCreators_1.createDenyResult;\n } });\n var typeGuards_1 = require_typeGuards();\n Object.defineProperty(exports3, \"isPolicyResponse\", { enumerable: true, get: function() {\n return typeGuards_1.isPolicyResponse;\n } });\n Object.defineProperty(exports3, \"isPolicyAllowResponse\", { enumerable: true, get: function() {\n return typeGuards_1.isPolicyAllowResponse;\n } });\n Object.defineProperty(exports3, \"isPolicyDenyResponse\", { enumerable: true, get: function() {\n return typeGuards_1.isPolicyDenyResponse;\n } });\n var zod_1 = require_zod();\n Object.defineProperty(exports3, \"validateOrDeny\", { enumerable: true, get: function() {\n return zod_1.validateOrDeny;\n } });\n Object.defineProperty(exports3, \"getValidatedParamsOrDeny\", { enumerable: true, get: function() {\n return zod_1.getValidatedParamsOrDeny;\n } });\n var zod_2 = require_zod();\n Object.defineProperty(exports3, \"getSchemaForPolicyResponseResult\", { enumerable: true, get: function() {\n return zod_2.getSchemaForPolicyResponseResult;\n } });\n }\n });\n\n // ../../libs/ability-sdk/dist/src/lib/policyCore/policyConfig/context/resultCreators.js\n var require_resultCreators2 = __commonJS({\n \"../../libs/ability-sdk/dist/src/lib/policyCore/policyConfig/context/resultCreators.js\"(exports3) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n Object.defineProperty(exports3, \"__esModule\", { value: true });\n exports3.createAllow = createAllow;\n exports3.createAllowNoResult = createAllowNoResult;\n exports3.createDeny = createDeny;\n exports3.createDenyNoResult = createDenyNoResult;\n function createAllow(result) {\n return {\n allow: true,\n result\n };\n }\n function createAllowNoResult() {\n return {\n allow: true\n };\n }\n function createDeny(result) {\n return {\n allow: false,\n result\n };\n }\n function createDenyNoResult() {\n return {\n allow: false,\n result: void 0\n };\n }\n }\n });\n\n // ../../libs/ability-sdk/dist/src/lib/policyCore/policyConfig/context/policyConfigContext.js\n var require_policyConfigContext = __commonJS({\n \"../../libs/ability-sdk/dist/src/lib/policyCore/policyConfig/context/policyConfigContext.js\"(exports3) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n Object.defineProperty(exports3, \"__esModule\", { value: true });\n exports3.createPolicyContext = createPolicyContext;\n var resultCreators_1 = require_resultCreators2();\n function createPolicyContext({ baseContext }) {\n return {\n ...baseContext,\n allow: resultCreators_1.createAllow,\n deny: resultCreators_1.createDeny\n };\n }\n }\n });\n\n // ../../libs/ability-sdk/dist/src/lib/policyCore/vincentPolicy.js\n var require_vincentPolicy = __commonJS({\n \"../../libs/ability-sdk/dist/src/lib/policyCore/vincentPolicy.js\"(exports3) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n Object.defineProperty(exports3, \"__esModule\", { value: true });\n exports3.createVincentPolicy = createVincentPolicy;\n exports3.createVincentAbilityPolicy = createVincentAbilityPolicy;\n var zod_1 = require_cjs();\n var assertSupportedAbilityVersion_1 = require_assertSupportedAbilityVersion();\n var utils_1 = require_utils();\n var helpers_1 = require_helpers();\n var resultCreators_1 = require_resultCreators();\n var policyConfigContext_1 = require_policyConfigContext();\n function createVincentPolicy(PolicyConfig) {\n if (PolicyConfig.commitParamsSchema && !PolicyConfig.commit) {\n throw new Error(\"Policy defines commitParamsSchema but is missing commit function\");\n }\n const userParamsSchema = PolicyConfig.userParamsSchema ?? zod_1.z.undefined();\n const evalAllowSchema = PolicyConfig.evalAllowResultSchema ?? zod_1.z.undefined();\n const evalDenySchema = PolicyConfig.evalDenyResultSchema ?? zod_1.z.undefined();\n const evaluate = async (args, baseContext) => {\n try {\n const context2 = (0, policyConfigContext_1.createPolicyContext)({\n baseContext\n });\n const paramsOrDeny = (0, helpers_1.getValidatedParamsOrDeny)({\n rawAbilityParams: args.abilityParams,\n rawUserParams: args.userParams,\n abilityParamsSchema: PolicyConfig.abilityParamsSchema,\n userParamsSchema,\n phase: \"evaluate\"\n });\n if ((0, helpers_1.isPolicyDenyResponse)(paramsOrDeny)) {\n return paramsOrDeny;\n }\n const { abilityParams: abilityParams2, userParams } = paramsOrDeny;\n const result = await PolicyConfig.evaluate({ abilityParams: abilityParams2, userParams }, context2);\n const { schemaToUse } = (0, helpers_1.getSchemaForPolicyResponseResult)({\n value: result,\n allowResultSchema: evalAllowSchema,\n denyResultSchema: evalDenySchema\n });\n const resultOrDeny = (0, helpers_1.validateOrDeny)(result.result, schemaToUse, \"evaluate\", \"output\");\n if ((0, helpers_1.isPolicyDenyResponse)(resultOrDeny)) {\n return resultOrDeny;\n }\n if ((0, helpers_1.isPolicyDenyResponse)(result)) {\n return (0, helpers_1.createDenyResult)({\n result: resultOrDeny\n });\n }\n return (0, resultCreators_1.wrapAllow)(resultOrDeny);\n } catch (err) {\n return (0, resultCreators_1.returnNoResultDeny)(err instanceof Error ? err.message : \"Unknown error\");\n }\n };\n const precheckAllowSchema = PolicyConfig.precheckAllowResultSchema ?? zod_1.z.undefined();\n const precheckDenySchema = PolicyConfig.precheckDenyResultSchema ?? zod_1.z.undefined();\n const precheck = PolicyConfig.precheck ? async (args, baseContext) => {\n try {\n const context2 = (0, policyConfigContext_1.createPolicyContext)({\n baseContext\n });\n const { precheck: precheckFn } = PolicyConfig;\n if (!precheckFn) {\n throw new Error(\"precheck function unexpectedly missing\");\n }\n const paramsOrDeny = (0, helpers_1.getValidatedParamsOrDeny)({\n rawAbilityParams: args.abilityParams,\n rawUserParams: args.userParams,\n abilityParamsSchema: PolicyConfig.abilityParamsSchema,\n userParamsSchema,\n phase: \"precheck\"\n });\n if ((0, helpers_1.isPolicyDenyResponse)(paramsOrDeny)) {\n return paramsOrDeny;\n }\n const result = await precheckFn(args, context2);\n const { schemaToUse } = (0, helpers_1.getSchemaForPolicyResponseResult)({\n value: result,\n allowResultSchema: precheckAllowSchema,\n denyResultSchema: precheckDenySchema\n });\n const resultOrDeny = (0, helpers_1.validateOrDeny)(result.result, schemaToUse, \"precheck\", \"output\");\n if ((0, helpers_1.isPolicyDenyResponse)(resultOrDeny)) {\n return resultOrDeny;\n }\n if ((0, helpers_1.isPolicyDenyResponse)(result)) {\n return (0, helpers_1.createDenyResult)({\n result: resultOrDeny\n });\n }\n return (0, resultCreators_1.createAllowResult)({ result: resultOrDeny });\n } catch (err) {\n return (0, resultCreators_1.createDenyNoResult)(err instanceof Error ? err.message : \"Unknown error\");\n }\n } : void 0;\n const commitAllowSchema = PolicyConfig.commitAllowResultSchema ?? zod_1.z.undefined();\n const commitDenySchema = PolicyConfig.commitDenyResultSchema ?? zod_1.z.undefined();\n const commitParamsSchema = PolicyConfig.commitParamsSchema ?? zod_1.z.undefined();\n const commit = PolicyConfig.commit ? async (args, baseContext) => {\n try {\n const context2 = (0, policyConfigContext_1.createPolicyContext)({\n baseContext\n });\n const { commit: commitFn } = PolicyConfig;\n if (!commitFn) {\n throw new Error(\"commit function unexpectedly missing\");\n }\n console.log(\"commit\", JSON.stringify({ args, context: context2 }, utils_1.bigintReplacer, 2));\n const paramsOrDeny = (0, helpers_1.validateOrDeny)(args, commitParamsSchema, \"commit\", \"input\");\n if ((0, helpers_1.isPolicyDenyResponse)(paramsOrDeny)) {\n return paramsOrDeny;\n }\n const result = await commitFn(args, context2);\n const { schemaToUse } = (0, helpers_1.getSchemaForPolicyResponseResult)({\n value: result,\n allowResultSchema: commitAllowSchema,\n denyResultSchema: commitDenySchema\n });\n const resultOrDeny = (0, helpers_1.validateOrDeny)(result.result, schemaToUse, \"commit\", \"output\");\n if ((0, helpers_1.isPolicyDenyResponse)(resultOrDeny)) {\n return resultOrDeny;\n }\n if ((0, helpers_1.isPolicyDenyResponse)(result)) {\n return (0, helpers_1.createDenyResult)({\n result: resultOrDeny\n });\n }\n return (0, resultCreators_1.createAllowResult)({ result: resultOrDeny });\n } catch (err) {\n return (0, resultCreators_1.createDenyNoResult)(err instanceof Error ? err.message : \"Unknown error\");\n }\n } : void 0;\n const vincentPolicy = {\n ...PolicyConfig,\n evaluate,\n precheck,\n commit\n };\n return vincentPolicy;\n }\n function createVincentAbilityPolicy(config2) {\n const { bundledVincentPolicy: { vincentPolicy, ipfsCid, vincentAbilityApiVersion: vincentAbilityApiVersion2 } } = config2;\n (0, assertSupportedAbilityVersion_1.assertSupportedAbilityVersion)(vincentAbilityApiVersion2);\n const result = {\n vincentPolicy,\n ipfsCid,\n vincentAbilityApiVersion: vincentAbilityApiVersion2,\n abilityParameterMappings: config2.abilityParameterMappings,\n // Explicitly include schema types in the returned object for type inference\n /** @hidden */\n __schemaTypes: {\n policyAbilityParamsSchema: vincentPolicy.abilityParamsSchema,\n userParamsSchema: vincentPolicy.userParamsSchema,\n evalAllowResultSchema: vincentPolicy.evalAllowResultSchema,\n evalDenyResultSchema: vincentPolicy.evalDenyResultSchema,\n commitParamsSchema: vincentPolicy.commitParamsSchema,\n precheckAllowResultSchema: vincentPolicy.precheckAllowResultSchema,\n precheckDenyResultSchema: vincentPolicy.precheckDenyResultSchema,\n commitAllowResultSchema: vincentPolicy.commitAllowResultSchema,\n commitDenyResultSchema: vincentPolicy.commitDenyResultSchema,\n // Explicit function types\n evaluate: vincentPolicy.evaluate,\n precheck: vincentPolicy.precheck,\n commit: vincentPolicy.commit\n }\n };\n return result;\n }\n }\n });\n\n // ../../libs/ability-sdk/dist/src/lib/abilityCore/abilityConfig/context/types.js\n var require_types2 = __commonJS({\n \"../../libs/ability-sdk/dist/src/lib/abilityCore/abilityConfig/context/types.js\"(exports3) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n Object.defineProperty(exports3, \"__esModule\", { value: true });\n exports3.YouMustCallContextSucceedOrFail = void 0;\n exports3.YouMustCallContextSucceedOrFail = Symbol(\"ExecuteAbilityResult must come from context.succeed() or context.fail()\");\n }\n });\n\n // ../../libs/ability-sdk/dist/src/lib/abilityCore/abilityConfig/context/resultCreators.js\n var require_resultCreators3 = __commonJS({\n \"../../libs/ability-sdk/dist/src/lib/abilityCore/abilityConfig/context/resultCreators.js\"(exports3) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n Object.defineProperty(exports3, \"__esModule\", { value: true });\n exports3.createSuccess = createSuccess;\n exports3.createSuccessNoResult = createSuccessNoResult;\n exports3.createFailure = createFailure;\n exports3.createFailureNoResult = createFailureNoResult;\n var types_1 = require_types2();\n function createSuccess(result) {\n return {\n success: true,\n result,\n [types_1.YouMustCallContextSucceedOrFail]: \"AbilityResult\"\n };\n }\n function createSuccessNoResult() {\n return {\n success: true,\n [types_1.YouMustCallContextSucceedOrFail]: \"AbilityResult\"\n };\n }\n function createFailure(result) {\n return {\n success: false,\n result,\n [types_1.YouMustCallContextSucceedOrFail]: \"AbilityResult\"\n };\n }\n function createFailureNoResult() {\n return {\n success: false,\n result: void 0,\n [types_1.YouMustCallContextSucceedOrFail]: \"AbilityResult\"\n };\n }\n }\n });\n\n // ../../libs/ability-sdk/dist/src/lib/abilityCore/abilityConfig/context/abilityContext.js\n var require_abilityContext = __commonJS({\n \"../../libs/ability-sdk/dist/src/lib/abilityCore/abilityConfig/context/abilityContext.js\"(exports3) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n Object.defineProperty(exports3, \"__esModule\", { value: true });\n exports3.createExecutionAbilityContext = createExecutionAbilityContext;\n exports3.createPrecheckAbilityContext = createPrecheckAbilityContext;\n var resultCreators_1 = require_resultCreators3();\n function createExecutionAbilityContext(params) {\n const { baseContext, policiesByPackageName } = params;\n const allowedPolicies = {};\n for (const key of Object.keys(policiesByPackageName)) {\n const k4 = key;\n const entry = baseContext.policiesContext.allowedPolicies[k4];\n if (!entry)\n continue;\n allowedPolicies[k4] = {\n ...entry\n };\n }\n const upgradedPoliciesContext = {\n evaluatedPolicies: baseContext.policiesContext.evaluatedPolicies,\n allow: true,\n deniedPolicy: void 0,\n allowedPolicies\n };\n return {\n ...baseContext,\n policiesContext: upgradedPoliciesContext,\n succeed: resultCreators_1.createSuccess,\n fail: resultCreators_1.createFailure\n };\n }\n function createPrecheckAbilityContext(params) {\n const { baseContext } = params;\n return {\n ...baseContext,\n succeed: resultCreators_1.createSuccess,\n fail: resultCreators_1.createFailure\n };\n }\n }\n });\n\n // ../../libs/ability-sdk/dist/src/lib/abilityCore/helpers/resultCreators.js\n var require_resultCreators4 = __commonJS({\n \"../../libs/ability-sdk/dist/src/lib/abilityCore/helpers/resultCreators.js\"(exports3) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n Object.defineProperty(exports3, \"__esModule\", { value: true });\n exports3.createAbilitySuccessResult = createAbilitySuccessResult;\n exports3.createAbilityFailureResult = createAbilityFailureResult;\n exports3.createAbilityFailureNoResult = createAbilityFailureNoResult;\n exports3.wrapFailure = wrapFailure;\n exports3.wrapNoResultFailure = wrapNoResultFailure;\n exports3.wrapSuccess = wrapSuccess;\n exports3.wrapNoResultSuccess = wrapNoResultSuccess;\n function createAbilitySuccessResult(args) {\n if (!args || args.result === void 0) {\n return { success: true };\n }\n return { success: true, result: args.result };\n }\n function createAbilityFailureResult({ runtimeError, result, schemaValidationError }) {\n if (result === void 0) {\n return {\n success: false,\n runtimeError,\n result: void 0,\n ...schemaValidationError ? { schemaValidationError } : {}\n };\n }\n return {\n success: false,\n runtimeError,\n result,\n ...schemaValidationError ? { schemaValidationError } : {}\n };\n }\n function createAbilityFailureNoResult(runtimeError, schemaValidationError) {\n return createAbilityFailureResult({ runtimeError, schemaValidationError });\n }\n function wrapFailure(value, runtimeError, schemaValidationError) {\n return createAbilityFailureResult({ result: value, runtimeError, schemaValidationError });\n }\n function wrapNoResultFailure(runtimeError, schemaValidationError) {\n return createAbilityFailureNoResult(runtimeError, schemaValidationError);\n }\n function wrapSuccess(value) {\n return createAbilitySuccessResult({ result: value });\n }\n function wrapNoResultSuccess() {\n return createAbilitySuccessResult();\n }\n }\n });\n\n // ../../libs/ability-sdk/dist/src/lib/abilityCore/helpers/typeGuards.js\n var require_typeGuards2 = __commonJS({\n \"../../libs/ability-sdk/dist/src/lib/abilityCore/helpers/typeGuards.js\"(exports3) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n Object.defineProperty(exports3, \"__esModule\", { value: true });\n exports3.isAbilitySuccessResult = isAbilitySuccessResult;\n exports3.isAbilityFailureResult = isAbilityFailureResult;\n exports3.isAbilityResult = isAbilityResult;\n function isAbilitySuccessResult(value) {\n return typeof value === \"object\" && value !== null && \"success\" in value && value.success === true;\n }\n function isAbilityFailureResult(value) {\n return typeof value === \"object\" && value !== null && \"success\" in value && value.success === false;\n }\n function isAbilityResult(value) {\n return typeof value === \"object\" && value !== null && \"success\" in value && typeof value.success === \"boolean\";\n }\n }\n });\n\n // ../../libs/ability-sdk/dist/src/lib/abilityCore/helpers/zod.js\n var require_zod2 = __commonJS({\n \"../../libs/ability-sdk/dist/src/lib/abilityCore/helpers/zod.js\"(exports3) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n Object.defineProperty(exports3, \"__esModule\", { value: true });\n exports3.AbilityResultShape = void 0;\n exports3.validateOrFail = validateOrFail;\n exports3.getSchemaForAbilityResult = getSchemaForAbilityResult;\n var zod_1 = require_cjs();\n var resultCreators_1 = require_resultCreators4();\n var typeGuards_1 = require_typeGuards2();\n exports3.AbilityResultShape = zod_1.z.object({\n success: zod_1.z.boolean(),\n result: zod_1.z.unknown()\n });\n var mustBeUndefinedSchema = zod_1.z.undefined();\n function validateOrFail(value, schema, phase, stage) {\n const effectiveSchema = schema ?? mustBeUndefinedSchema;\n const parsed = effectiveSchema.safeParse(value);\n if (!parsed.success) {\n const descriptor = stage === \"input\" ? \"parameters\" : \"result\";\n const message = `Invalid ${phase} ${descriptor}.`;\n return (0, resultCreators_1.createAbilityFailureResult)({\n runtimeError: message,\n schemaValidationError: {\n zodError: parsed.error,\n phase,\n stage\n }\n });\n }\n return parsed.data;\n }\n function getSchemaForAbilityResult({ value, successResultSchema, failureResultSchema }) {\n if (!(0, typeGuards_1.isAbilityResult)(value)) {\n return {\n schemaToUse: exports3.AbilityResultShape,\n parsedType: \"unknown\"\n };\n }\n const schemaToUse = value.success ? successResultSchema ?? zod_1.z.undefined() : failureResultSchema ?? zod_1.z.undefined();\n return {\n schemaToUse,\n parsedType: value.success ? \"success\" : \"failure\"\n };\n }\n }\n });\n\n // ../../libs/ability-sdk/dist/src/lib/abilityCore/vincentAbility.js\n var require_vincentAbility = __commonJS({\n \"../../libs/ability-sdk/dist/src/lib/abilityCore/vincentAbility.js\"(exports3) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n Object.defineProperty(exports3, \"__esModule\", { value: true });\n exports3.createVincentAbility = createVincentAbility2;\n var zod_1 = require_cjs();\n var assertSupportedAbilityVersion_1 = require_assertSupportedAbilityVersion();\n var constants_1 = require_constants2();\n var utils_1 = require_utils();\n var abilityContext_1 = require_abilityContext();\n var resultCreators_1 = require_resultCreators4();\n var typeGuards_1 = require_typeGuards2();\n var zod_2 = require_zod2();\n function createVincentAbility2(AbilityConfig) {\n const { policyByPackageName, policyByIpfsCid } = AbilityConfig.supportedPolicies;\n for (const policyId in policyByIpfsCid) {\n const policy = policyByIpfsCid[policyId];\n const { vincentAbilityApiVersion: vincentAbilityApiVersion2 } = policy;\n (0, assertSupportedAbilityVersion_1.assertSupportedAbilityVersion)(vincentAbilityApiVersion2);\n }\n const executeSuccessSchema2 = AbilityConfig.executeSuccessSchema ?? zod_1.z.undefined();\n const executeFailSchema2 = AbilityConfig.executeFailSchema ?? zod_1.z.undefined();\n const execute = async ({ abilityParams: abilityParams2 }, baseAbilityContext) => {\n try {\n const context2 = (0, abilityContext_1.createExecutionAbilityContext)({\n baseContext: baseAbilityContext,\n policiesByPackageName: policyByPackageName\n });\n const parsedAbilityParams = (0, zod_2.validateOrFail)(abilityParams2, AbilityConfig.abilityParamsSchema, \"execute\", \"input\");\n if ((0, typeGuards_1.isAbilityFailureResult)(parsedAbilityParams)) {\n return parsedAbilityParams;\n }\n const result = await AbilityConfig.execute({ abilityParams: parsedAbilityParams }, {\n ...context2,\n policiesContext: { ...context2.policiesContext, allow: true }\n });\n console.log(\"AbilityConfig execute result\", JSON.stringify(result, utils_1.bigintReplacer));\n const { schemaToUse } = (0, zod_2.getSchemaForAbilityResult)({\n value: result,\n successResultSchema: executeSuccessSchema2,\n failureResultSchema: executeFailSchema2\n });\n const resultOrFailure = (0, zod_2.validateOrFail)(result.result, schemaToUse, \"execute\", \"output\");\n if ((0, typeGuards_1.isAbilityFailureResult)(resultOrFailure)) {\n return resultOrFailure;\n }\n if ((0, typeGuards_1.isAbilityFailureResult)(result)) {\n return (0, resultCreators_1.wrapFailure)(resultOrFailure);\n }\n return (0, resultCreators_1.wrapSuccess)(resultOrFailure);\n } catch (err) {\n return (0, resultCreators_1.wrapNoResultFailure)(err instanceof Error ? err.message : \"Unknown error\");\n }\n };\n const precheckSuccessSchema2 = AbilityConfig.precheckSuccessSchema ?? zod_1.z.undefined();\n const precheckFailSchema2 = AbilityConfig.precheckFailSchema ?? zod_1.z.undefined();\n const { precheck: precheckFn } = AbilityConfig;\n const precheck = precheckFn ? async ({ abilityParams: abilityParams2 }, baseAbilityContext) => {\n try {\n const context2 = (0, abilityContext_1.createPrecheckAbilityContext)({\n baseContext: baseAbilityContext\n });\n const parsedAbilityParams = (0, zod_2.validateOrFail)(abilityParams2, AbilityConfig.abilityParamsSchema, \"precheck\", \"input\");\n if ((0, typeGuards_1.isAbilityFailureResult)(parsedAbilityParams)) {\n return parsedAbilityParams;\n }\n const result = await precheckFn({ abilityParams: abilityParams2 }, context2);\n console.log(\"AbilityConfig precheck result\", JSON.stringify(result, utils_1.bigintReplacer));\n const { schemaToUse } = (0, zod_2.getSchemaForAbilityResult)({\n value: result,\n successResultSchema: precheckSuccessSchema2,\n failureResultSchema: precheckFailSchema2\n });\n const resultOrFailure = (0, zod_2.validateOrFail)(result.result, schemaToUse, \"precheck\", \"output\");\n if ((0, typeGuards_1.isAbilityFailureResult)(resultOrFailure)) {\n return resultOrFailure;\n }\n if ((0, typeGuards_1.isAbilityFailureResult)(result)) {\n return (0, resultCreators_1.wrapFailure)(resultOrFailure, result.runtimeError);\n }\n return (0, resultCreators_1.wrapSuccess)(resultOrFailure);\n } catch (err) {\n return (0, resultCreators_1.wrapNoResultFailure)(err instanceof Error ? err.message : \"Unknown error\");\n }\n } : void 0;\n return {\n packageName: AbilityConfig.packageName,\n vincentAbilityApiVersion: constants_1.VINCENT_TOOL_API_VERSION,\n abilityDescription: AbilityConfig.abilityDescription,\n execute,\n precheck,\n supportedPolicies: AbilityConfig.supportedPolicies,\n policyByPackageName,\n abilityParamsSchema: AbilityConfig.abilityParamsSchema,\n /** @hidden */\n __schemaTypes: {\n precheckSuccessSchema: AbilityConfig.precheckSuccessSchema,\n precheckFailSchema: AbilityConfig.precheckFailSchema,\n executeSuccessSchema: AbilityConfig.executeSuccessSchema,\n executeFailSchema: AbilityConfig.executeFailSchema\n }\n };\n }\n }\n });\n\n // ../../../node_modules/.pnpm/bn.js@5.2.2/node_modules/bn.js/lib/bn.js\n var require_bn = __commonJS({\n \"../../../node_modules/.pnpm/bn.js@5.2.2/node_modules/bn.js/lib/bn.js\"(exports3, module) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n (function(module2, exports4) {\n \"use strict\";\n function assert9(val, msg) {\n if (!val)\n throw new Error(msg || \"Assertion failed\");\n }\n function inherits(ctor, superCtor) {\n ctor.super_ = superCtor;\n var TempCtor = function() {\n };\n TempCtor.prototype = superCtor.prototype;\n ctor.prototype = new TempCtor();\n ctor.prototype.constructor = ctor;\n }\n function BN(number2, base4, endian) {\n if (BN.isBN(number2)) {\n return number2;\n }\n this.negative = 0;\n this.words = null;\n this.length = 0;\n this.red = null;\n if (number2 !== null) {\n if (base4 === \"le\" || base4 === \"be\") {\n endian = base4;\n base4 = 10;\n }\n this._init(number2 || 0, base4 || 10, endian || \"be\");\n }\n }\n if (typeof module2 === \"object\") {\n module2.exports = BN;\n } else {\n exports4.BN = BN;\n }\n BN.BN = BN;\n BN.wordSize = 26;\n var Buffer3;\n try {\n if (typeof window !== \"undefined\" && typeof window.Buffer !== \"undefined\") {\n Buffer3 = window.Buffer;\n } else {\n Buffer3 = (init_buffer(), __toCommonJS(buffer_exports)).Buffer;\n }\n } catch (e3) {\n }\n BN.isBN = function isBN(num2) {\n if (num2 instanceof BN) {\n return true;\n }\n return num2 !== null && typeof num2 === \"object\" && num2.constructor.wordSize === BN.wordSize && Array.isArray(num2.words);\n };\n BN.max = function max(left, right) {\n if (left.cmp(right) > 0)\n return left;\n return right;\n };\n BN.min = function min(left, right) {\n if (left.cmp(right) < 0)\n return left;\n return right;\n };\n BN.prototype._init = function init(number2, base4, endian) {\n if (typeof number2 === \"number\") {\n return this._initNumber(number2, base4, endian);\n }\n if (typeof number2 === \"object\") {\n return this._initArray(number2, base4, endian);\n }\n if (base4 === \"hex\") {\n base4 = 16;\n }\n assert9(base4 === (base4 | 0) && base4 >= 2 && base4 <= 36);\n number2 = number2.toString().replace(/\\s+/g, \"\");\n var start = 0;\n if (number2[0] === \"-\") {\n start++;\n this.negative = 1;\n }\n if (start < number2.length) {\n if (base4 === 16) {\n this._parseHex(number2, start, endian);\n } else {\n this._parseBase(number2, base4, start);\n if (endian === \"le\") {\n this._initArray(this.toArray(), base4, endian);\n }\n }\n }\n };\n BN.prototype._initNumber = function _initNumber(number2, base4, endian) {\n if (number2 < 0) {\n this.negative = 1;\n number2 = -number2;\n }\n if (number2 < 67108864) {\n this.words = [number2 & 67108863];\n this.length = 1;\n } else if (number2 < 4503599627370496) {\n this.words = [\n number2 & 67108863,\n number2 / 67108864 & 67108863\n ];\n this.length = 2;\n } else {\n assert9(number2 < 9007199254740992);\n this.words = [\n number2 & 67108863,\n number2 / 67108864 & 67108863,\n 1\n ];\n this.length = 3;\n }\n if (endian !== \"le\")\n return;\n this._initArray(this.toArray(), base4, endian);\n };\n BN.prototype._initArray = function _initArray(number2, base4, endian) {\n assert9(typeof number2.length === \"number\");\n if (number2.length <= 0) {\n this.words = [0];\n this.length = 1;\n return this;\n }\n this.length = Math.ceil(number2.length / 3);\n this.words = new Array(this.length);\n for (var i3 = 0; i3 < this.length; i3++) {\n this.words[i3] = 0;\n }\n var j2, w3;\n var off2 = 0;\n if (endian === \"be\") {\n for (i3 = number2.length - 1, j2 = 0; i3 >= 0; i3 -= 3) {\n w3 = number2[i3] | number2[i3 - 1] << 8 | number2[i3 - 2] << 16;\n this.words[j2] |= w3 << off2 & 67108863;\n this.words[j2 + 1] = w3 >>> 26 - off2 & 67108863;\n off2 += 24;\n if (off2 >= 26) {\n off2 -= 26;\n j2++;\n }\n }\n } else if (endian === \"le\") {\n for (i3 = 0, j2 = 0; i3 < number2.length; i3 += 3) {\n w3 = number2[i3] | number2[i3 + 1] << 8 | number2[i3 + 2] << 16;\n this.words[j2] |= w3 << off2 & 67108863;\n this.words[j2 + 1] = w3 >>> 26 - off2 & 67108863;\n off2 += 24;\n if (off2 >= 26) {\n off2 -= 26;\n j2++;\n }\n }\n }\n return this._strip();\n };\n function parseHex4Bits(string2, index2) {\n var c4 = string2.charCodeAt(index2);\n if (c4 >= 48 && c4 <= 57) {\n return c4 - 48;\n } else if (c4 >= 65 && c4 <= 70) {\n return c4 - 55;\n } else if (c4 >= 97 && c4 <= 102) {\n return c4 - 87;\n } else {\n assert9(false, \"Invalid character in \" + string2);\n }\n }\n function parseHexByte(string2, lowerBound, index2) {\n var r2 = parseHex4Bits(string2, index2);\n if (index2 - 1 >= lowerBound) {\n r2 |= parseHex4Bits(string2, index2 - 1) << 4;\n }\n return r2;\n }\n BN.prototype._parseHex = function _parseHex(number2, start, endian) {\n this.length = Math.ceil((number2.length - start) / 6);\n this.words = new Array(this.length);\n for (var i3 = 0; i3 < this.length; i3++) {\n this.words[i3] = 0;\n }\n var off2 = 0;\n var j2 = 0;\n var w3;\n if (endian === \"be\") {\n for (i3 = number2.length - 1; i3 >= start; i3 -= 2) {\n w3 = parseHexByte(number2, start, i3) << off2;\n this.words[j2] |= w3 & 67108863;\n if (off2 >= 18) {\n off2 -= 18;\n j2 += 1;\n this.words[j2] |= w3 >>> 26;\n } else {\n off2 += 8;\n }\n }\n } else {\n var parseLength = number2.length - start;\n for (i3 = parseLength % 2 === 0 ? start + 1 : start; i3 < number2.length; i3 += 2) {\n w3 = parseHexByte(number2, start, i3) << off2;\n this.words[j2] |= w3 & 67108863;\n if (off2 >= 18) {\n off2 -= 18;\n j2 += 1;\n this.words[j2] |= w3 >>> 26;\n } else {\n off2 += 8;\n }\n }\n }\n this._strip();\n };\n function parseBase(str, start, end, mul) {\n var r2 = 0;\n var b4 = 0;\n var len = Math.min(str.length, end);\n for (var i3 = start; i3 < len; i3++) {\n var c4 = str.charCodeAt(i3) - 48;\n r2 *= mul;\n if (c4 >= 49) {\n b4 = c4 - 49 + 10;\n } else if (c4 >= 17) {\n b4 = c4 - 17 + 10;\n } else {\n b4 = c4;\n }\n assert9(c4 >= 0 && b4 < mul, \"Invalid character\");\n r2 += b4;\n }\n return r2;\n }\n BN.prototype._parseBase = function _parseBase(number2, base4, start) {\n this.words = [0];\n this.length = 1;\n for (var limbLen = 0, limbPow = 1; limbPow <= 67108863; limbPow *= base4) {\n limbLen++;\n }\n limbLen--;\n limbPow = limbPow / base4 | 0;\n var total = number2.length - start;\n var mod3 = total % limbLen;\n var end = Math.min(total, total - mod3) + start;\n var word = 0;\n for (var i3 = start; i3 < end; i3 += limbLen) {\n word = parseBase(number2, i3, i3 + limbLen, base4);\n this.imuln(limbPow);\n if (this.words[0] + word < 67108864) {\n this.words[0] += word;\n } else {\n this._iaddn(word);\n }\n }\n if (mod3 !== 0) {\n var pow = 1;\n word = parseBase(number2, i3, number2.length, base4);\n for (i3 = 0; i3 < mod3; i3++) {\n pow *= base4;\n }\n this.imuln(pow);\n if (this.words[0] + word < 67108864) {\n this.words[0] += word;\n } else {\n this._iaddn(word);\n }\n }\n this._strip();\n };\n BN.prototype.copy = function copy(dest) {\n dest.words = new Array(this.length);\n for (var i3 = 0; i3 < this.length; i3++) {\n dest.words[i3] = this.words[i3];\n }\n dest.length = this.length;\n dest.negative = this.negative;\n dest.red = this.red;\n };\n function move(dest, src) {\n dest.words = src.words;\n dest.length = src.length;\n dest.negative = src.negative;\n dest.red = src.red;\n }\n BN.prototype._move = function _move(dest) {\n move(dest, this);\n };\n BN.prototype.clone = function clone() {\n var r2 = new BN(null);\n this.copy(r2);\n return r2;\n };\n BN.prototype._expand = function _expand(size6) {\n while (this.length < size6) {\n this.words[this.length++] = 0;\n }\n return this;\n };\n BN.prototype._strip = function strip() {\n while (this.length > 1 && this.words[this.length - 1] === 0) {\n this.length--;\n }\n return this._normSign();\n };\n BN.prototype._normSign = function _normSign() {\n if (this.length === 1 && this.words[0] === 0) {\n this.negative = 0;\n }\n return this;\n };\n if (typeof Symbol !== \"undefined\" && typeof Symbol.for === \"function\") {\n try {\n BN.prototype[Symbol.for(\"nodejs.util.inspect.custom\")] = inspect;\n } catch (e3) {\n BN.prototype.inspect = inspect;\n }\n } else {\n BN.prototype.inspect = inspect;\n }\n function inspect() {\n return (this.red ? \"\";\n }\n var zeros = [\n \"\",\n \"0\",\n \"00\",\n \"000\",\n \"0000\",\n \"00000\",\n \"000000\",\n \"0000000\",\n \"00000000\",\n \"000000000\",\n \"0000000000\",\n \"00000000000\",\n \"000000000000\",\n \"0000000000000\",\n \"00000000000000\",\n \"000000000000000\",\n \"0000000000000000\",\n \"00000000000000000\",\n \"000000000000000000\",\n \"0000000000000000000\",\n \"00000000000000000000\",\n \"000000000000000000000\",\n \"0000000000000000000000\",\n \"00000000000000000000000\",\n \"000000000000000000000000\",\n \"0000000000000000000000000\"\n ];\n var groupSizes = [\n 0,\n 0,\n 25,\n 16,\n 12,\n 11,\n 10,\n 9,\n 8,\n 8,\n 7,\n 7,\n 7,\n 7,\n 6,\n 6,\n 6,\n 6,\n 6,\n 6,\n 6,\n 5,\n 5,\n 5,\n 5,\n 5,\n 5,\n 5,\n 5,\n 5,\n 5,\n 5,\n 5,\n 5,\n 5,\n 5,\n 5\n ];\n var groupBases = [\n 0,\n 0,\n 33554432,\n 43046721,\n 16777216,\n 48828125,\n 60466176,\n 40353607,\n 16777216,\n 43046721,\n 1e7,\n 19487171,\n 35831808,\n 62748517,\n 7529536,\n 11390625,\n 16777216,\n 24137569,\n 34012224,\n 47045881,\n 64e6,\n 4084101,\n 5153632,\n 6436343,\n 7962624,\n 9765625,\n 11881376,\n 14348907,\n 17210368,\n 20511149,\n 243e5,\n 28629151,\n 33554432,\n 39135393,\n 45435424,\n 52521875,\n 60466176\n ];\n BN.prototype.toString = function toString2(base4, padding) {\n base4 = base4 || 10;\n padding = padding | 0 || 1;\n var out;\n if (base4 === 16 || base4 === \"hex\") {\n out = \"\";\n var off2 = 0;\n var carry = 0;\n for (var i3 = 0; i3 < this.length; i3++) {\n var w3 = this.words[i3];\n var word = ((w3 << off2 | carry) & 16777215).toString(16);\n carry = w3 >>> 24 - off2 & 16777215;\n off2 += 2;\n if (off2 >= 26) {\n off2 -= 26;\n i3--;\n }\n if (carry !== 0 || i3 !== this.length - 1) {\n out = zeros[6 - word.length] + word + out;\n } else {\n out = word + out;\n }\n }\n if (carry !== 0) {\n out = carry.toString(16) + out;\n }\n while (out.length % padding !== 0) {\n out = \"0\" + out;\n }\n if (this.negative !== 0) {\n out = \"-\" + out;\n }\n return out;\n }\n if (base4 === (base4 | 0) && base4 >= 2 && base4 <= 36) {\n var groupSize = groupSizes[base4];\n var groupBase = groupBases[base4];\n out = \"\";\n var c4 = this.clone();\n c4.negative = 0;\n while (!c4.isZero()) {\n var r2 = c4.modrn(groupBase).toString(base4);\n c4 = c4.idivn(groupBase);\n if (!c4.isZero()) {\n out = zeros[groupSize - r2.length] + r2 + out;\n } else {\n out = r2 + out;\n }\n }\n if (this.isZero()) {\n out = \"0\" + out;\n }\n while (out.length % padding !== 0) {\n out = \"0\" + out;\n }\n if (this.negative !== 0) {\n out = \"-\" + out;\n }\n return out;\n }\n assert9(false, \"Base should be between 2 and 36\");\n };\n BN.prototype.toNumber = function toNumber4() {\n var ret = this.words[0];\n if (this.length === 2) {\n ret += this.words[1] * 67108864;\n } else if (this.length === 3 && this.words[2] === 1) {\n ret += 4503599627370496 + this.words[1] * 67108864;\n } else if (this.length > 2) {\n assert9(false, \"Number can only safely store up to 53 bits\");\n }\n return this.negative !== 0 ? -ret : ret;\n };\n BN.prototype.toJSON = function toJSON() {\n return this.toString(16, 2);\n };\n if (Buffer3) {\n BN.prototype.toBuffer = function toBuffer(endian, length2) {\n return this.toArrayLike(Buffer3, endian, length2);\n };\n }\n BN.prototype.toArray = function toArray(endian, length2) {\n return this.toArrayLike(Array, endian, length2);\n };\n var allocate = function allocate2(ArrayType, size6) {\n if (ArrayType.allocUnsafe) {\n return ArrayType.allocUnsafe(size6);\n }\n return new ArrayType(size6);\n };\n BN.prototype.toArrayLike = function toArrayLike(ArrayType, endian, length2) {\n this._strip();\n var byteLength = this.byteLength();\n var reqLength = length2 || Math.max(1, byteLength);\n assert9(byteLength <= reqLength, \"byte array longer than desired length\");\n assert9(reqLength > 0, \"Requested array length <= 0\");\n var res = allocate(ArrayType, reqLength);\n var postfix = endian === \"le\" ? \"LE\" : \"BE\";\n this[\"_toArrayLike\" + postfix](res, byteLength);\n return res;\n };\n BN.prototype._toArrayLikeLE = function _toArrayLikeLE(res, byteLength) {\n var position = 0;\n var carry = 0;\n for (var i3 = 0, shift = 0; i3 < this.length; i3++) {\n var word = this.words[i3] << shift | carry;\n res[position++] = word & 255;\n if (position < res.length) {\n res[position++] = word >> 8 & 255;\n }\n if (position < res.length) {\n res[position++] = word >> 16 & 255;\n }\n if (shift === 6) {\n if (position < res.length) {\n res[position++] = word >> 24 & 255;\n }\n carry = 0;\n shift = 0;\n } else {\n carry = word >>> 24;\n shift += 2;\n }\n }\n if (position < res.length) {\n res[position++] = carry;\n while (position < res.length) {\n res[position++] = 0;\n }\n }\n };\n BN.prototype._toArrayLikeBE = function _toArrayLikeBE(res, byteLength) {\n var position = res.length - 1;\n var carry = 0;\n for (var i3 = 0, shift = 0; i3 < this.length; i3++) {\n var word = this.words[i3] << shift | carry;\n res[position--] = word & 255;\n if (position >= 0) {\n res[position--] = word >> 8 & 255;\n }\n if (position >= 0) {\n res[position--] = word >> 16 & 255;\n }\n if (shift === 6) {\n if (position >= 0) {\n res[position--] = word >> 24 & 255;\n }\n carry = 0;\n shift = 0;\n } else {\n carry = word >>> 24;\n shift += 2;\n }\n }\n if (position >= 0) {\n res[position--] = carry;\n while (position >= 0) {\n res[position--] = 0;\n }\n }\n };\n if (Math.clz32) {\n BN.prototype._countBits = function _countBits(w3) {\n return 32 - Math.clz32(w3);\n };\n } else {\n BN.prototype._countBits = function _countBits(w3) {\n var t3 = w3;\n var r2 = 0;\n if (t3 >= 4096) {\n r2 += 13;\n t3 >>>= 13;\n }\n if (t3 >= 64) {\n r2 += 7;\n t3 >>>= 7;\n }\n if (t3 >= 8) {\n r2 += 4;\n t3 >>>= 4;\n }\n if (t3 >= 2) {\n r2 += 2;\n t3 >>>= 2;\n }\n return r2 + t3;\n };\n }\n BN.prototype._zeroBits = function _zeroBits(w3) {\n if (w3 === 0)\n return 26;\n var t3 = w3;\n var r2 = 0;\n if ((t3 & 8191) === 0) {\n r2 += 13;\n t3 >>>= 13;\n }\n if ((t3 & 127) === 0) {\n r2 += 7;\n t3 >>>= 7;\n }\n if ((t3 & 15) === 0) {\n r2 += 4;\n t3 >>>= 4;\n }\n if ((t3 & 3) === 0) {\n r2 += 2;\n t3 >>>= 2;\n }\n if ((t3 & 1) === 0) {\n r2++;\n }\n return r2;\n };\n BN.prototype.bitLength = function bitLength() {\n var w3 = this.words[this.length - 1];\n var hi = this._countBits(w3);\n return (this.length - 1) * 26 + hi;\n };\n function toBitArray(num2) {\n var w3 = new Array(num2.bitLength());\n for (var bit = 0; bit < w3.length; bit++) {\n var off2 = bit / 26 | 0;\n var wbit = bit % 26;\n w3[bit] = num2.words[off2] >>> wbit & 1;\n }\n return w3;\n }\n BN.prototype.zeroBits = function zeroBits() {\n if (this.isZero())\n return 0;\n var r2 = 0;\n for (var i3 = 0; i3 < this.length; i3++) {\n var b4 = this._zeroBits(this.words[i3]);\n r2 += b4;\n if (b4 !== 26)\n break;\n }\n return r2;\n };\n BN.prototype.byteLength = function byteLength() {\n return Math.ceil(this.bitLength() / 8);\n };\n BN.prototype.toTwos = function toTwos(width) {\n if (this.negative !== 0) {\n return this.abs().inotn(width).iaddn(1);\n }\n return this.clone();\n };\n BN.prototype.fromTwos = function fromTwos(width) {\n if (this.testn(width - 1)) {\n return this.notn(width).iaddn(1).ineg();\n }\n return this.clone();\n };\n BN.prototype.isNeg = function isNeg() {\n return this.negative !== 0;\n };\n BN.prototype.neg = function neg() {\n return this.clone().ineg();\n };\n BN.prototype.ineg = function ineg() {\n if (!this.isZero()) {\n this.negative ^= 1;\n }\n return this;\n };\n BN.prototype.iuor = function iuor(num2) {\n while (this.length < num2.length) {\n this.words[this.length++] = 0;\n }\n for (var i3 = 0; i3 < num2.length; i3++) {\n this.words[i3] = this.words[i3] | num2.words[i3];\n }\n return this._strip();\n };\n BN.prototype.ior = function ior(num2) {\n assert9((this.negative | num2.negative) === 0);\n return this.iuor(num2);\n };\n BN.prototype.or = function or(num2) {\n if (this.length > num2.length)\n return this.clone().ior(num2);\n return num2.clone().ior(this);\n };\n BN.prototype.uor = function uor(num2) {\n if (this.length > num2.length)\n return this.clone().iuor(num2);\n return num2.clone().iuor(this);\n };\n BN.prototype.iuand = function iuand(num2) {\n var b4;\n if (this.length > num2.length) {\n b4 = num2;\n } else {\n b4 = this;\n }\n for (var i3 = 0; i3 < b4.length; i3++) {\n this.words[i3] = this.words[i3] & num2.words[i3];\n }\n this.length = b4.length;\n return this._strip();\n };\n BN.prototype.iand = function iand(num2) {\n assert9((this.negative | num2.negative) === 0);\n return this.iuand(num2);\n };\n BN.prototype.and = function and(num2) {\n if (this.length > num2.length)\n return this.clone().iand(num2);\n return num2.clone().iand(this);\n };\n BN.prototype.uand = function uand(num2) {\n if (this.length > num2.length)\n return this.clone().iuand(num2);\n return num2.clone().iuand(this);\n };\n BN.prototype.iuxor = function iuxor(num2) {\n var a3;\n var b4;\n if (this.length > num2.length) {\n a3 = this;\n b4 = num2;\n } else {\n a3 = num2;\n b4 = this;\n }\n for (var i3 = 0; i3 < b4.length; i3++) {\n this.words[i3] = a3.words[i3] ^ b4.words[i3];\n }\n if (this !== a3) {\n for (; i3 < a3.length; i3++) {\n this.words[i3] = a3.words[i3];\n }\n }\n this.length = a3.length;\n return this._strip();\n };\n BN.prototype.ixor = function ixor(num2) {\n assert9((this.negative | num2.negative) === 0);\n return this.iuxor(num2);\n };\n BN.prototype.xor = function xor(num2) {\n if (this.length > num2.length)\n return this.clone().ixor(num2);\n return num2.clone().ixor(this);\n };\n BN.prototype.uxor = function uxor(num2) {\n if (this.length > num2.length)\n return this.clone().iuxor(num2);\n return num2.clone().iuxor(this);\n };\n BN.prototype.inotn = function inotn(width) {\n assert9(typeof width === \"number\" && width >= 0);\n var bytesNeeded = Math.ceil(width / 26) | 0;\n var bitsLeft = width % 26;\n this._expand(bytesNeeded);\n if (bitsLeft > 0) {\n bytesNeeded--;\n }\n for (var i3 = 0; i3 < bytesNeeded; i3++) {\n this.words[i3] = ~this.words[i3] & 67108863;\n }\n if (bitsLeft > 0) {\n this.words[i3] = ~this.words[i3] & 67108863 >> 26 - bitsLeft;\n }\n return this._strip();\n };\n BN.prototype.notn = function notn(width) {\n return this.clone().inotn(width);\n };\n BN.prototype.setn = function setn(bit, val) {\n assert9(typeof bit === \"number\" && bit >= 0);\n var off2 = bit / 26 | 0;\n var wbit = bit % 26;\n this._expand(off2 + 1);\n if (val) {\n this.words[off2] = this.words[off2] | 1 << wbit;\n } else {\n this.words[off2] = this.words[off2] & ~(1 << wbit);\n }\n return this._strip();\n };\n BN.prototype.iadd = function iadd(num2) {\n var r2;\n if (this.negative !== 0 && num2.negative === 0) {\n this.negative = 0;\n r2 = this.isub(num2);\n this.negative ^= 1;\n return this._normSign();\n } else if (this.negative === 0 && num2.negative !== 0) {\n num2.negative = 0;\n r2 = this.isub(num2);\n num2.negative = 1;\n return r2._normSign();\n }\n var a3, b4;\n if (this.length > num2.length) {\n a3 = this;\n b4 = num2;\n } else {\n a3 = num2;\n b4 = this;\n }\n var carry = 0;\n for (var i3 = 0; i3 < b4.length; i3++) {\n r2 = (a3.words[i3] | 0) + (b4.words[i3] | 0) + carry;\n this.words[i3] = r2 & 67108863;\n carry = r2 >>> 26;\n }\n for (; carry !== 0 && i3 < a3.length; i3++) {\n r2 = (a3.words[i3] | 0) + carry;\n this.words[i3] = r2 & 67108863;\n carry = r2 >>> 26;\n }\n this.length = a3.length;\n if (carry !== 0) {\n this.words[this.length] = carry;\n this.length++;\n } else if (a3 !== this) {\n for (; i3 < a3.length; i3++) {\n this.words[i3] = a3.words[i3];\n }\n }\n return this;\n };\n BN.prototype.add = function add2(num2) {\n var res;\n if (num2.negative !== 0 && this.negative === 0) {\n num2.negative = 0;\n res = this.sub(num2);\n num2.negative ^= 1;\n return res;\n } else if (num2.negative === 0 && this.negative !== 0) {\n this.negative = 0;\n res = num2.sub(this);\n this.negative = 1;\n return res;\n }\n if (this.length > num2.length)\n return this.clone().iadd(num2);\n return num2.clone().iadd(this);\n };\n BN.prototype.isub = function isub(num2) {\n if (num2.negative !== 0) {\n num2.negative = 0;\n var r2 = this.iadd(num2);\n num2.negative = 1;\n return r2._normSign();\n } else if (this.negative !== 0) {\n this.negative = 0;\n this.iadd(num2);\n this.negative = 1;\n return this._normSign();\n }\n var cmp = this.cmp(num2);\n if (cmp === 0) {\n this.negative = 0;\n this.length = 1;\n this.words[0] = 0;\n return this;\n }\n var a3, b4;\n if (cmp > 0) {\n a3 = this;\n b4 = num2;\n } else {\n a3 = num2;\n b4 = this;\n }\n var carry = 0;\n for (var i3 = 0; i3 < b4.length; i3++) {\n r2 = (a3.words[i3] | 0) - (b4.words[i3] | 0) + carry;\n carry = r2 >> 26;\n this.words[i3] = r2 & 67108863;\n }\n for (; carry !== 0 && i3 < a3.length; i3++) {\n r2 = (a3.words[i3] | 0) + carry;\n carry = r2 >> 26;\n this.words[i3] = r2 & 67108863;\n }\n if (carry === 0 && i3 < a3.length && a3 !== this) {\n for (; i3 < a3.length; i3++) {\n this.words[i3] = a3.words[i3];\n }\n }\n this.length = Math.max(this.length, i3);\n if (a3 !== this) {\n this.negative = 1;\n }\n return this._strip();\n };\n BN.prototype.sub = function sub(num2) {\n return this.clone().isub(num2);\n };\n function smallMulTo(self2, num2, out) {\n out.negative = num2.negative ^ self2.negative;\n var len = self2.length + num2.length | 0;\n out.length = len;\n len = len - 1 | 0;\n var a3 = self2.words[0] | 0;\n var b4 = num2.words[0] | 0;\n var r2 = a3 * b4;\n var lo = r2 & 67108863;\n var carry = r2 / 67108864 | 0;\n out.words[0] = lo;\n for (var k4 = 1; k4 < len; k4++) {\n var ncarry = carry >>> 26;\n var rword = carry & 67108863;\n var maxJ = Math.min(k4, num2.length - 1);\n for (var j2 = Math.max(0, k4 - self2.length + 1); j2 <= maxJ; j2++) {\n var i3 = k4 - j2 | 0;\n a3 = self2.words[i3] | 0;\n b4 = num2.words[j2] | 0;\n r2 = a3 * b4 + rword;\n ncarry += r2 / 67108864 | 0;\n rword = r2 & 67108863;\n }\n out.words[k4] = rword | 0;\n carry = ncarry | 0;\n }\n if (carry !== 0) {\n out.words[k4] = carry | 0;\n } else {\n out.length--;\n }\n return out._strip();\n }\n var comb10MulTo = function comb10MulTo2(self2, num2, out) {\n var a3 = self2.words;\n var b4 = num2.words;\n var o5 = out.words;\n var c4 = 0;\n var lo;\n var mid;\n var hi;\n var a0 = a3[0] | 0;\n var al0 = a0 & 8191;\n var ah0 = a0 >>> 13;\n var a1 = a3[1] | 0;\n var al1 = a1 & 8191;\n var ah1 = a1 >>> 13;\n var a22 = a3[2] | 0;\n var al2 = a22 & 8191;\n var ah2 = a22 >>> 13;\n var a32 = a3[3] | 0;\n var al3 = a32 & 8191;\n var ah3 = a32 >>> 13;\n var a4 = a3[4] | 0;\n var al4 = a4 & 8191;\n var ah4 = a4 >>> 13;\n var a5 = a3[5] | 0;\n var al5 = a5 & 8191;\n var ah5 = a5 >>> 13;\n var a6 = a3[6] | 0;\n var al6 = a6 & 8191;\n var ah6 = a6 >>> 13;\n var a7 = a3[7] | 0;\n var al7 = a7 & 8191;\n var ah7 = a7 >>> 13;\n var a8 = a3[8] | 0;\n var al8 = a8 & 8191;\n var ah8 = a8 >>> 13;\n var a9 = a3[9] | 0;\n var al9 = a9 & 8191;\n var ah9 = a9 >>> 13;\n var b0 = b4[0] | 0;\n var bl0 = b0 & 8191;\n var bh0 = b0 >>> 13;\n var b1 = b4[1] | 0;\n var bl1 = b1 & 8191;\n var bh1 = b1 >>> 13;\n var b22 = b4[2] | 0;\n var bl2 = b22 & 8191;\n var bh2 = b22 >>> 13;\n var b32 = b4[3] | 0;\n var bl3 = b32 & 8191;\n var bh3 = b32 >>> 13;\n var b42 = b4[4] | 0;\n var bl4 = b42 & 8191;\n var bh4 = b42 >>> 13;\n var b5 = b4[5] | 0;\n var bl5 = b5 & 8191;\n var bh5 = b5 >>> 13;\n var b6 = b4[6] | 0;\n var bl6 = b6 & 8191;\n var bh6 = b6 >>> 13;\n var b7 = b4[7] | 0;\n var bl7 = b7 & 8191;\n var bh7 = b7 >>> 13;\n var b8 = b4[8] | 0;\n var bl8 = b8 & 8191;\n var bh8 = b8 >>> 13;\n var b9 = b4[9] | 0;\n var bl9 = b9 & 8191;\n var bh9 = b9 >>> 13;\n out.negative = self2.negative ^ num2.negative;\n out.length = 19;\n lo = Math.imul(al0, bl0);\n mid = Math.imul(al0, bh0);\n mid = mid + Math.imul(ah0, bl0) | 0;\n hi = Math.imul(ah0, bh0);\n var w0 = (c4 + lo | 0) + ((mid & 8191) << 13) | 0;\n c4 = (hi + (mid >>> 13) | 0) + (w0 >>> 26) | 0;\n w0 &= 67108863;\n lo = Math.imul(al1, bl0);\n mid = Math.imul(al1, bh0);\n mid = mid + Math.imul(ah1, bl0) | 0;\n hi = Math.imul(ah1, bh0);\n lo = lo + Math.imul(al0, bl1) | 0;\n mid = mid + Math.imul(al0, bh1) | 0;\n mid = mid + Math.imul(ah0, bl1) | 0;\n hi = hi + Math.imul(ah0, bh1) | 0;\n var w1 = (c4 + lo | 0) + ((mid & 8191) << 13) | 0;\n c4 = (hi + (mid >>> 13) | 0) + (w1 >>> 26) | 0;\n w1 &= 67108863;\n lo = Math.imul(al2, bl0);\n mid = Math.imul(al2, bh0);\n mid = mid + Math.imul(ah2, bl0) | 0;\n hi = Math.imul(ah2, bh0);\n lo = lo + Math.imul(al1, bl1) | 0;\n mid = mid + Math.imul(al1, bh1) | 0;\n mid = mid + Math.imul(ah1, bl1) | 0;\n hi = hi + Math.imul(ah1, bh1) | 0;\n lo = lo + Math.imul(al0, bl2) | 0;\n mid = mid + Math.imul(al0, bh2) | 0;\n mid = mid + Math.imul(ah0, bl2) | 0;\n hi = hi + Math.imul(ah0, bh2) | 0;\n var w22 = (c4 + lo | 0) + ((mid & 8191) << 13) | 0;\n c4 = (hi + (mid >>> 13) | 0) + (w22 >>> 26) | 0;\n w22 &= 67108863;\n lo = Math.imul(al3, bl0);\n mid = Math.imul(al3, bh0);\n mid = mid + Math.imul(ah3, bl0) | 0;\n hi = Math.imul(ah3, bh0);\n lo = lo + Math.imul(al2, bl1) | 0;\n mid = mid + Math.imul(al2, bh1) | 0;\n mid = mid + Math.imul(ah2, bl1) | 0;\n hi = hi + Math.imul(ah2, bh1) | 0;\n lo = lo + Math.imul(al1, bl2) | 0;\n mid = mid + Math.imul(al1, bh2) | 0;\n mid = mid + Math.imul(ah1, bl2) | 0;\n hi = hi + Math.imul(ah1, bh2) | 0;\n lo = lo + Math.imul(al0, bl3) | 0;\n mid = mid + Math.imul(al0, bh3) | 0;\n mid = mid + Math.imul(ah0, bl3) | 0;\n hi = hi + Math.imul(ah0, bh3) | 0;\n var w3 = (c4 + lo | 0) + ((mid & 8191) << 13) | 0;\n c4 = (hi + (mid >>> 13) | 0) + (w3 >>> 26) | 0;\n w3 &= 67108863;\n lo = Math.imul(al4, bl0);\n mid = Math.imul(al4, bh0);\n mid = mid + Math.imul(ah4, bl0) | 0;\n hi = Math.imul(ah4, bh0);\n lo = lo + Math.imul(al3, bl1) | 0;\n mid = mid + Math.imul(al3, bh1) | 0;\n mid = mid + Math.imul(ah3, bl1) | 0;\n hi = hi + Math.imul(ah3, bh1) | 0;\n lo = lo + Math.imul(al2, bl2) | 0;\n mid = mid + Math.imul(al2, bh2) | 0;\n mid = mid + Math.imul(ah2, bl2) | 0;\n hi = hi + Math.imul(ah2, bh2) | 0;\n lo = lo + Math.imul(al1, bl3) | 0;\n mid = mid + Math.imul(al1, bh3) | 0;\n mid = mid + Math.imul(ah1, bl3) | 0;\n hi = hi + Math.imul(ah1, bh3) | 0;\n lo = lo + Math.imul(al0, bl4) | 0;\n mid = mid + Math.imul(al0, bh4) | 0;\n mid = mid + Math.imul(ah0, bl4) | 0;\n hi = hi + Math.imul(ah0, bh4) | 0;\n var w4 = (c4 + lo | 0) + ((mid & 8191) << 13) | 0;\n c4 = (hi + (mid >>> 13) | 0) + (w4 >>> 26) | 0;\n w4 &= 67108863;\n lo = Math.imul(al5, bl0);\n mid = Math.imul(al5, bh0);\n mid = mid + Math.imul(ah5, bl0) | 0;\n hi = Math.imul(ah5, bh0);\n lo = lo + Math.imul(al4, bl1) | 0;\n mid = mid + Math.imul(al4, bh1) | 0;\n mid = mid + Math.imul(ah4, bl1) | 0;\n hi = hi + Math.imul(ah4, bh1) | 0;\n lo = lo + Math.imul(al3, bl2) | 0;\n mid = mid + Math.imul(al3, bh2) | 0;\n mid = mid + Math.imul(ah3, bl2) | 0;\n hi = hi + Math.imul(ah3, bh2) | 0;\n lo = lo + Math.imul(al2, bl3) | 0;\n mid = mid + Math.imul(al2, bh3) | 0;\n mid = mid + Math.imul(ah2, bl3) | 0;\n hi = hi + Math.imul(ah2, bh3) | 0;\n lo = lo + Math.imul(al1, bl4) | 0;\n mid = mid + Math.imul(al1, bh4) | 0;\n mid = mid + Math.imul(ah1, bl4) | 0;\n hi = hi + Math.imul(ah1, bh4) | 0;\n lo = lo + Math.imul(al0, bl5) | 0;\n mid = mid + Math.imul(al0, bh5) | 0;\n mid = mid + Math.imul(ah0, bl5) | 0;\n hi = hi + Math.imul(ah0, bh5) | 0;\n var w5 = (c4 + lo | 0) + ((mid & 8191) << 13) | 0;\n c4 = (hi + (mid >>> 13) | 0) + (w5 >>> 26) | 0;\n w5 &= 67108863;\n lo = Math.imul(al6, bl0);\n mid = Math.imul(al6, bh0);\n mid = mid + Math.imul(ah6, bl0) | 0;\n hi = Math.imul(ah6, bh0);\n lo = lo + Math.imul(al5, bl1) | 0;\n mid = mid + Math.imul(al5, bh1) | 0;\n mid = mid + Math.imul(ah5, bl1) | 0;\n hi = hi + Math.imul(ah5, bh1) | 0;\n lo = lo + Math.imul(al4, bl2) | 0;\n mid = mid + Math.imul(al4, bh2) | 0;\n mid = mid + Math.imul(ah4, bl2) | 0;\n hi = hi + Math.imul(ah4, bh2) | 0;\n lo = lo + Math.imul(al3, bl3) | 0;\n mid = mid + Math.imul(al3, bh3) | 0;\n mid = mid + Math.imul(ah3, bl3) | 0;\n hi = hi + Math.imul(ah3, bh3) | 0;\n lo = lo + Math.imul(al2, bl4) | 0;\n mid = mid + Math.imul(al2, bh4) | 0;\n mid = mid + Math.imul(ah2, bl4) | 0;\n hi = hi + Math.imul(ah2, bh4) | 0;\n lo = lo + Math.imul(al1, bl5) | 0;\n mid = mid + Math.imul(al1, bh5) | 0;\n mid = mid + Math.imul(ah1, bl5) | 0;\n hi = hi + Math.imul(ah1, bh5) | 0;\n lo = lo + Math.imul(al0, bl6) | 0;\n mid = mid + Math.imul(al0, bh6) | 0;\n mid = mid + Math.imul(ah0, bl6) | 0;\n hi = hi + Math.imul(ah0, bh6) | 0;\n var w6 = (c4 + lo | 0) + ((mid & 8191) << 13) | 0;\n c4 = (hi + (mid >>> 13) | 0) + (w6 >>> 26) | 0;\n w6 &= 67108863;\n lo = Math.imul(al7, bl0);\n mid = Math.imul(al7, bh0);\n mid = mid + Math.imul(ah7, bl0) | 0;\n hi = Math.imul(ah7, bh0);\n lo = lo + Math.imul(al6, bl1) | 0;\n mid = mid + Math.imul(al6, bh1) | 0;\n mid = mid + Math.imul(ah6, bl1) | 0;\n hi = hi + Math.imul(ah6, bh1) | 0;\n lo = lo + Math.imul(al5, bl2) | 0;\n mid = mid + Math.imul(al5, bh2) | 0;\n mid = mid + Math.imul(ah5, bl2) | 0;\n hi = hi + Math.imul(ah5, bh2) | 0;\n lo = lo + Math.imul(al4, bl3) | 0;\n mid = mid + Math.imul(al4, bh3) | 0;\n mid = mid + Math.imul(ah4, bl3) | 0;\n hi = hi + Math.imul(ah4, bh3) | 0;\n lo = lo + Math.imul(al3, bl4) | 0;\n mid = mid + Math.imul(al3, bh4) | 0;\n mid = mid + Math.imul(ah3, bl4) | 0;\n hi = hi + Math.imul(ah3, bh4) | 0;\n lo = lo + Math.imul(al2, bl5) | 0;\n mid = mid + Math.imul(al2, bh5) | 0;\n mid = mid + Math.imul(ah2, bl5) | 0;\n hi = hi + Math.imul(ah2, bh5) | 0;\n lo = lo + Math.imul(al1, bl6) | 0;\n mid = mid + Math.imul(al1, bh6) | 0;\n mid = mid + Math.imul(ah1, bl6) | 0;\n hi = hi + Math.imul(ah1, bh6) | 0;\n lo = lo + Math.imul(al0, bl7) | 0;\n mid = mid + Math.imul(al0, bh7) | 0;\n mid = mid + Math.imul(ah0, bl7) | 0;\n hi = hi + Math.imul(ah0, bh7) | 0;\n var w7 = (c4 + lo | 0) + ((mid & 8191) << 13) | 0;\n c4 = (hi + (mid >>> 13) | 0) + (w7 >>> 26) | 0;\n w7 &= 67108863;\n lo = Math.imul(al8, bl0);\n mid = Math.imul(al8, bh0);\n mid = mid + Math.imul(ah8, bl0) | 0;\n hi = Math.imul(ah8, bh0);\n lo = lo + Math.imul(al7, bl1) | 0;\n mid = mid + Math.imul(al7, bh1) | 0;\n mid = mid + Math.imul(ah7, bl1) | 0;\n hi = hi + Math.imul(ah7, bh1) | 0;\n lo = lo + Math.imul(al6, bl2) | 0;\n mid = mid + Math.imul(al6, bh2) | 0;\n mid = mid + Math.imul(ah6, bl2) | 0;\n hi = hi + Math.imul(ah6, bh2) | 0;\n lo = lo + Math.imul(al5, bl3) | 0;\n mid = mid + Math.imul(al5, bh3) | 0;\n mid = mid + Math.imul(ah5, bl3) | 0;\n hi = hi + Math.imul(ah5, bh3) | 0;\n lo = lo + Math.imul(al4, bl4) | 0;\n mid = mid + Math.imul(al4, bh4) | 0;\n mid = mid + Math.imul(ah4, bl4) | 0;\n hi = hi + Math.imul(ah4, bh4) | 0;\n lo = lo + Math.imul(al3, bl5) | 0;\n mid = mid + Math.imul(al3, bh5) | 0;\n mid = mid + Math.imul(ah3, bl5) | 0;\n hi = hi + Math.imul(ah3, bh5) | 0;\n lo = lo + Math.imul(al2, bl6) | 0;\n mid = mid + Math.imul(al2, bh6) | 0;\n mid = mid + Math.imul(ah2, bl6) | 0;\n hi = hi + Math.imul(ah2, bh6) | 0;\n lo = lo + Math.imul(al1, bl7) | 0;\n mid = mid + Math.imul(al1, bh7) | 0;\n mid = mid + Math.imul(ah1, bl7) | 0;\n hi = hi + Math.imul(ah1, bh7) | 0;\n lo = lo + Math.imul(al0, bl8) | 0;\n mid = mid + Math.imul(al0, bh8) | 0;\n mid = mid + Math.imul(ah0, bl8) | 0;\n hi = hi + Math.imul(ah0, bh8) | 0;\n var w8 = (c4 + lo | 0) + ((mid & 8191) << 13) | 0;\n c4 = (hi + (mid >>> 13) | 0) + (w8 >>> 26) | 0;\n w8 &= 67108863;\n lo = Math.imul(al9, bl0);\n mid = Math.imul(al9, bh0);\n mid = mid + Math.imul(ah9, bl0) | 0;\n hi = Math.imul(ah9, bh0);\n lo = lo + Math.imul(al8, bl1) | 0;\n mid = mid + Math.imul(al8, bh1) | 0;\n mid = mid + Math.imul(ah8, bl1) | 0;\n hi = hi + Math.imul(ah8, bh1) | 0;\n lo = lo + Math.imul(al7, bl2) | 0;\n mid = mid + Math.imul(al7, bh2) | 0;\n mid = mid + Math.imul(ah7, bl2) | 0;\n hi = hi + Math.imul(ah7, bh2) | 0;\n lo = lo + Math.imul(al6, bl3) | 0;\n mid = mid + Math.imul(al6, bh3) | 0;\n mid = mid + Math.imul(ah6, bl3) | 0;\n hi = hi + Math.imul(ah6, bh3) | 0;\n lo = lo + Math.imul(al5, bl4) | 0;\n mid = mid + Math.imul(al5, bh4) | 0;\n mid = mid + Math.imul(ah5, bl4) | 0;\n hi = hi + Math.imul(ah5, bh4) | 0;\n lo = lo + Math.imul(al4, bl5) | 0;\n mid = mid + Math.imul(al4, bh5) | 0;\n mid = mid + Math.imul(ah4, bl5) | 0;\n hi = hi + Math.imul(ah4, bh5) | 0;\n lo = lo + Math.imul(al3, bl6) | 0;\n mid = mid + Math.imul(al3, bh6) | 0;\n mid = mid + Math.imul(ah3, bl6) | 0;\n hi = hi + Math.imul(ah3, bh6) | 0;\n lo = lo + Math.imul(al2, bl7) | 0;\n mid = mid + Math.imul(al2, bh7) | 0;\n mid = mid + Math.imul(ah2, bl7) | 0;\n hi = hi + Math.imul(ah2, bh7) | 0;\n lo = lo + Math.imul(al1, bl8) | 0;\n mid = mid + Math.imul(al1, bh8) | 0;\n mid = mid + Math.imul(ah1, bl8) | 0;\n hi = hi + Math.imul(ah1, bh8) | 0;\n lo = lo + Math.imul(al0, bl9) | 0;\n mid = mid + Math.imul(al0, bh9) | 0;\n mid = mid + Math.imul(ah0, bl9) | 0;\n hi = hi + Math.imul(ah0, bh9) | 0;\n var w9 = (c4 + lo | 0) + ((mid & 8191) << 13) | 0;\n c4 = (hi + (mid >>> 13) | 0) + (w9 >>> 26) | 0;\n w9 &= 67108863;\n lo = Math.imul(al9, bl1);\n mid = Math.imul(al9, bh1);\n mid = mid + Math.imul(ah9, bl1) | 0;\n hi = Math.imul(ah9, bh1);\n lo = lo + Math.imul(al8, bl2) | 0;\n mid = mid + Math.imul(al8, bh2) | 0;\n mid = mid + Math.imul(ah8, bl2) | 0;\n hi = hi + Math.imul(ah8, bh2) | 0;\n lo = lo + Math.imul(al7, bl3) | 0;\n mid = mid + Math.imul(al7, bh3) | 0;\n mid = mid + Math.imul(ah7, bl3) | 0;\n hi = hi + Math.imul(ah7, bh3) | 0;\n lo = lo + Math.imul(al6, bl4) | 0;\n mid = mid + Math.imul(al6, bh4) | 0;\n mid = mid + Math.imul(ah6, bl4) | 0;\n hi = hi + Math.imul(ah6, bh4) | 0;\n lo = lo + Math.imul(al5, bl5) | 0;\n mid = mid + Math.imul(al5, bh5) | 0;\n mid = mid + Math.imul(ah5, bl5) | 0;\n hi = hi + Math.imul(ah5, bh5) | 0;\n lo = lo + Math.imul(al4, bl6) | 0;\n mid = mid + Math.imul(al4, bh6) | 0;\n mid = mid + Math.imul(ah4, bl6) | 0;\n hi = hi + Math.imul(ah4, bh6) | 0;\n lo = lo + Math.imul(al3, bl7) | 0;\n mid = mid + Math.imul(al3, bh7) | 0;\n mid = mid + Math.imul(ah3, bl7) | 0;\n hi = hi + Math.imul(ah3, bh7) | 0;\n lo = lo + Math.imul(al2, bl8) | 0;\n mid = mid + Math.imul(al2, bh8) | 0;\n mid = mid + Math.imul(ah2, bl8) | 0;\n hi = hi + Math.imul(ah2, bh8) | 0;\n lo = lo + Math.imul(al1, bl9) | 0;\n mid = mid + Math.imul(al1, bh9) | 0;\n mid = mid + Math.imul(ah1, bl9) | 0;\n hi = hi + Math.imul(ah1, bh9) | 0;\n var w10 = (c4 + lo | 0) + ((mid & 8191) << 13) | 0;\n c4 = (hi + (mid >>> 13) | 0) + (w10 >>> 26) | 0;\n w10 &= 67108863;\n lo = Math.imul(al9, bl2);\n mid = Math.imul(al9, bh2);\n mid = mid + Math.imul(ah9, bl2) | 0;\n hi = Math.imul(ah9, bh2);\n lo = lo + Math.imul(al8, bl3) | 0;\n mid = mid + Math.imul(al8, bh3) | 0;\n mid = mid + Math.imul(ah8, bl3) | 0;\n hi = hi + Math.imul(ah8, bh3) | 0;\n lo = lo + Math.imul(al7, bl4) | 0;\n mid = mid + Math.imul(al7, bh4) | 0;\n mid = mid + Math.imul(ah7, bl4) | 0;\n hi = hi + Math.imul(ah7, bh4) | 0;\n lo = lo + Math.imul(al6, bl5) | 0;\n mid = mid + Math.imul(al6, bh5) | 0;\n mid = mid + Math.imul(ah6, bl5) | 0;\n hi = hi + Math.imul(ah6, bh5) | 0;\n lo = lo + Math.imul(al5, bl6) | 0;\n mid = mid + Math.imul(al5, bh6) | 0;\n mid = mid + Math.imul(ah5, bl6) | 0;\n hi = hi + Math.imul(ah5, bh6) | 0;\n lo = lo + Math.imul(al4, bl7) | 0;\n mid = mid + Math.imul(al4, bh7) | 0;\n mid = mid + Math.imul(ah4, bl7) | 0;\n hi = hi + Math.imul(ah4, bh7) | 0;\n lo = lo + Math.imul(al3, bl8) | 0;\n mid = mid + Math.imul(al3, bh8) | 0;\n mid = mid + Math.imul(ah3, bl8) | 0;\n hi = hi + Math.imul(ah3, bh8) | 0;\n lo = lo + Math.imul(al2, bl9) | 0;\n mid = mid + Math.imul(al2, bh9) | 0;\n mid = mid + Math.imul(ah2, bl9) | 0;\n hi = hi + Math.imul(ah2, bh9) | 0;\n var w11 = (c4 + lo | 0) + ((mid & 8191) << 13) | 0;\n c4 = (hi + (mid >>> 13) | 0) + (w11 >>> 26) | 0;\n w11 &= 67108863;\n lo = Math.imul(al9, bl3);\n mid = Math.imul(al9, bh3);\n mid = mid + Math.imul(ah9, bl3) | 0;\n hi = Math.imul(ah9, bh3);\n lo = lo + Math.imul(al8, bl4) | 0;\n mid = mid + Math.imul(al8, bh4) | 0;\n mid = mid + Math.imul(ah8, bl4) | 0;\n hi = hi + Math.imul(ah8, bh4) | 0;\n lo = lo + Math.imul(al7, bl5) | 0;\n mid = mid + Math.imul(al7, bh5) | 0;\n mid = mid + Math.imul(ah7, bl5) | 0;\n hi = hi + Math.imul(ah7, bh5) | 0;\n lo = lo + Math.imul(al6, bl6) | 0;\n mid = mid + Math.imul(al6, bh6) | 0;\n mid = mid + Math.imul(ah6, bl6) | 0;\n hi = hi + Math.imul(ah6, bh6) | 0;\n lo = lo + Math.imul(al5, bl7) | 0;\n mid = mid + Math.imul(al5, bh7) | 0;\n mid = mid + Math.imul(ah5, bl7) | 0;\n hi = hi + Math.imul(ah5, bh7) | 0;\n lo = lo + Math.imul(al4, bl8) | 0;\n mid = mid + Math.imul(al4, bh8) | 0;\n mid = mid + Math.imul(ah4, bl8) | 0;\n hi = hi + Math.imul(ah4, bh8) | 0;\n lo = lo + Math.imul(al3, bl9) | 0;\n mid = mid + Math.imul(al3, bh9) | 0;\n mid = mid + Math.imul(ah3, bl9) | 0;\n hi = hi + Math.imul(ah3, bh9) | 0;\n var w12 = (c4 + lo | 0) + ((mid & 8191) << 13) | 0;\n c4 = (hi + (mid >>> 13) | 0) + (w12 >>> 26) | 0;\n w12 &= 67108863;\n lo = Math.imul(al9, bl4);\n mid = Math.imul(al9, bh4);\n mid = mid + Math.imul(ah9, bl4) | 0;\n hi = Math.imul(ah9, bh4);\n lo = lo + Math.imul(al8, bl5) | 0;\n mid = mid + Math.imul(al8, bh5) | 0;\n mid = mid + Math.imul(ah8, bl5) | 0;\n hi = hi + Math.imul(ah8, bh5) | 0;\n lo = lo + Math.imul(al7, bl6) | 0;\n mid = mid + Math.imul(al7, bh6) | 0;\n mid = mid + Math.imul(ah7, bl6) | 0;\n hi = hi + Math.imul(ah7, bh6) | 0;\n lo = lo + Math.imul(al6, bl7) | 0;\n mid = mid + Math.imul(al6, bh7) | 0;\n mid = mid + Math.imul(ah6, bl7) | 0;\n hi = hi + Math.imul(ah6, bh7) | 0;\n lo = lo + Math.imul(al5, bl8) | 0;\n mid = mid + Math.imul(al5, bh8) | 0;\n mid = mid + Math.imul(ah5, bl8) | 0;\n hi = hi + Math.imul(ah5, bh8) | 0;\n lo = lo + Math.imul(al4, bl9) | 0;\n mid = mid + Math.imul(al4, bh9) | 0;\n mid = mid + Math.imul(ah4, bl9) | 0;\n hi = hi + Math.imul(ah4, bh9) | 0;\n var w13 = (c4 + lo | 0) + ((mid & 8191) << 13) | 0;\n c4 = (hi + (mid >>> 13) | 0) + (w13 >>> 26) | 0;\n w13 &= 67108863;\n lo = Math.imul(al9, bl5);\n mid = Math.imul(al9, bh5);\n mid = mid + Math.imul(ah9, bl5) | 0;\n hi = Math.imul(ah9, bh5);\n lo = lo + Math.imul(al8, bl6) | 0;\n mid = mid + Math.imul(al8, bh6) | 0;\n mid = mid + Math.imul(ah8, bl6) | 0;\n hi = hi + Math.imul(ah8, bh6) | 0;\n lo = lo + Math.imul(al7, bl7) | 0;\n mid = mid + Math.imul(al7, bh7) | 0;\n mid = mid + Math.imul(ah7, bl7) | 0;\n hi = hi + Math.imul(ah7, bh7) | 0;\n lo = lo + Math.imul(al6, bl8) | 0;\n mid = mid + Math.imul(al6, bh8) | 0;\n mid = mid + Math.imul(ah6, bl8) | 0;\n hi = hi + Math.imul(ah6, bh8) | 0;\n lo = lo + Math.imul(al5, bl9) | 0;\n mid = mid + Math.imul(al5, bh9) | 0;\n mid = mid + Math.imul(ah5, bl9) | 0;\n hi = hi + Math.imul(ah5, bh9) | 0;\n var w14 = (c4 + lo | 0) + ((mid & 8191) << 13) | 0;\n c4 = (hi + (mid >>> 13) | 0) + (w14 >>> 26) | 0;\n w14 &= 67108863;\n lo = Math.imul(al9, bl6);\n mid = Math.imul(al9, bh6);\n mid = mid + Math.imul(ah9, bl6) | 0;\n hi = Math.imul(ah9, bh6);\n lo = lo + Math.imul(al8, bl7) | 0;\n mid = mid + Math.imul(al8, bh7) | 0;\n mid = mid + Math.imul(ah8, bl7) | 0;\n hi = hi + Math.imul(ah8, bh7) | 0;\n lo = lo + Math.imul(al7, bl8) | 0;\n mid = mid + Math.imul(al7, bh8) | 0;\n mid = mid + Math.imul(ah7, bl8) | 0;\n hi = hi + Math.imul(ah7, bh8) | 0;\n lo = lo + Math.imul(al6, bl9) | 0;\n mid = mid + Math.imul(al6, bh9) | 0;\n mid = mid + Math.imul(ah6, bl9) | 0;\n hi = hi + Math.imul(ah6, bh9) | 0;\n var w15 = (c4 + lo | 0) + ((mid & 8191) << 13) | 0;\n c4 = (hi + (mid >>> 13) | 0) + (w15 >>> 26) | 0;\n w15 &= 67108863;\n lo = Math.imul(al9, bl7);\n mid = Math.imul(al9, bh7);\n mid = mid + Math.imul(ah9, bl7) | 0;\n hi = Math.imul(ah9, bh7);\n lo = lo + Math.imul(al8, bl8) | 0;\n mid = mid + Math.imul(al8, bh8) | 0;\n mid = mid + Math.imul(ah8, bl8) | 0;\n hi = hi + Math.imul(ah8, bh8) | 0;\n lo = lo + Math.imul(al7, bl9) | 0;\n mid = mid + Math.imul(al7, bh9) | 0;\n mid = mid + Math.imul(ah7, bl9) | 0;\n hi = hi + Math.imul(ah7, bh9) | 0;\n var w16 = (c4 + lo | 0) + ((mid & 8191) << 13) | 0;\n c4 = (hi + (mid >>> 13) | 0) + (w16 >>> 26) | 0;\n w16 &= 67108863;\n lo = Math.imul(al9, bl8);\n mid = Math.imul(al9, bh8);\n mid = mid + Math.imul(ah9, bl8) | 0;\n hi = Math.imul(ah9, bh8);\n lo = lo + Math.imul(al8, bl9) | 0;\n mid = mid + Math.imul(al8, bh9) | 0;\n mid = mid + Math.imul(ah8, bl9) | 0;\n hi = hi + Math.imul(ah8, bh9) | 0;\n var w17 = (c4 + lo | 0) + ((mid & 8191) << 13) | 0;\n c4 = (hi + (mid >>> 13) | 0) + (w17 >>> 26) | 0;\n w17 &= 67108863;\n lo = Math.imul(al9, bl9);\n mid = Math.imul(al9, bh9);\n mid = mid + Math.imul(ah9, bl9) | 0;\n hi = Math.imul(ah9, bh9);\n var w18 = (c4 + lo | 0) + ((mid & 8191) << 13) | 0;\n c4 = (hi + (mid >>> 13) | 0) + (w18 >>> 26) | 0;\n w18 &= 67108863;\n o5[0] = w0;\n o5[1] = w1;\n o5[2] = w22;\n o5[3] = w3;\n o5[4] = w4;\n o5[5] = w5;\n o5[6] = w6;\n o5[7] = w7;\n o5[8] = w8;\n o5[9] = w9;\n o5[10] = w10;\n o5[11] = w11;\n o5[12] = w12;\n o5[13] = w13;\n o5[14] = w14;\n o5[15] = w15;\n o5[16] = w16;\n o5[17] = w17;\n o5[18] = w18;\n if (c4 !== 0) {\n o5[19] = c4;\n out.length++;\n }\n return out;\n };\n if (!Math.imul) {\n comb10MulTo = smallMulTo;\n }\n function bigMulTo(self2, num2, out) {\n out.negative = num2.negative ^ self2.negative;\n out.length = self2.length + num2.length;\n var carry = 0;\n var hncarry = 0;\n for (var k4 = 0; k4 < out.length - 1; k4++) {\n var ncarry = hncarry;\n hncarry = 0;\n var rword = carry & 67108863;\n var maxJ = Math.min(k4, num2.length - 1);\n for (var j2 = Math.max(0, k4 - self2.length + 1); j2 <= maxJ; j2++) {\n var i3 = k4 - j2;\n var a3 = self2.words[i3] | 0;\n var b4 = num2.words[j2] | 0;\n var r2 = a3 * b4;\n var lo = r2 & 67108863;\n ncarry = ncarry + (r2 / 67108864 | 0) | 0;\n lo = lo + rword | 0;\n rword = lo & 67108863;\n ncarry = ncarry + (lo >>> 26) | 0;\n hncarry += ncarry >>> 26;\n ncarry &= 67108863;\n }\n out.words[k4] = rword;\n carry = ncarry;\n ncarry = hncarry;\n }\n if (carry !== 0) {\n out.words[k4] = carry;\n } else {\n out.length--;\n }\n return out._strip();\n }\n function jumboMulTo(self2, num2, out) {\n return bigMulTo(self2, num2, out);\n }\n BN.prototype.mulTo = function mulTo(num2, out) {\n var res;\n var len = this.length + num2.length;\n if (this.length === 10 && num2.length === 10) {\n res = comb10MulTo(this, num2, out);\n } else if (len < 63) {\n res = smallMulTo(this, num2, out);\n } else if (len < 1024) {\n res = bigMulTo(this, num2, out);\n } else {\n res = jumboMulTo(this, num2, out);\n }\n return res;\n };\n function FFTM(x4, y6) {\n this.x = x4;\n this.y = y6;\n }\n FFTM.prototype.makeRBT = function makeRBT(N4) {\n var t3 = new Array(N4);\n var l6 = BN.prototype._countBits(N4) - 1;\n for (var i3 = 0; i3 < N4; i3++) {\n t3[i3] = this.revBin(i3, l6, N4);\n }\n return t3;\n };\n FFTM.prototype.revBin = function revBin(x4, l6, N4) {\n if (x4 === 0 || x4 === N4 - 1)\n return x4;\n var rb = 0;\n for (var i3 = 0; i3 < l6; i3++) {\n rb |= (x4 & 1) << l6 - i3 - 1;\n x4 >>= 1;\n }\n return rb;\n };\n FFTM.prototype.permute = function permute(rbt, rws, iws, rtws, itws, N4) {\n for (var i3 = 0; i3 < N4; i3++) {\n rtws[i3] = rws[rbt[i3]];\n itws[i3] = iws[rbt[i3]];\n }\n };\n FFTM.prototype.transform = function transform2(rws, iws, rtws, itws, N4, rbt) {\n this.permute(rbt, rws, iws, rtws, itws, N4);\n for (var s4 = 1; s4 < N4; s4 <<= 1) {\n var l6 = s4 << 1;\n var rtwdf = Math.cos(2 * Math.PI / l6);\n var itwdf = Math.sin(2 * Math.PI / l6);\n for (var p4 = 0; p4 < N4; p4 += l6) {\n var rtwdf_ = rtwdf;\n var itwdf_ = itwdf;\n for (var j2 = 0; j2 < s4; j2++) {\n var re = rtws[p4 + j2];\n var ie = itws[p4 + j2];\n var ro = rtws[p4 + j2 + s4];\n var io = itws[p4 + j2 + s4];\n var rx = rtwdf_ * ro - itwdf_ * io;\n io = rtwdf_ * io + itwdf_ * ro;\n ro = rx;\n rtws[p4 + j2] = re + ro;\n itws[p4 + j2] = ie + io;\n rtws[p4 + j2 + s4] = re - ro;\n itws[p4 + j2 + s4] = ie - io;\n if (j2 !== l6) {\n rx = rtwdf * rtwdf_ - itwdf * itwdf_;\n itwdf_ = rtwdf * itwdf_ + itwdf * rtwdf_;\n rtwdf_ = rx;\n }\n }\n }\n }\n };\n FFTM.prototype.guessLen13b = function guessLen13b(n2, m2) {\n var N4 = Math.max(m2, n2) | 1;\n var odd = N4 & 1;\n var i3 = 0;\n for (N4 = N4 / 2 | 0; N4; N4 = N4 >>> 1) {\n i3++;\n }\n return 1 << i3 + 1 + odd;\n };\n FFTM.prototype.conjugate = function conjugate(rws, iws, N4) {\n if (N4 <= 1)\n return;\n for (var i3 = 0; i3 < N4 / 2; i3++) {\n var t3 = rws[i3];\n rws[i3] = rws[N4 - i3 - 1];\n rws[N4 - i3 - 1] = t3;\n t3 = iws[i3];\n iws[i3] = -iws[N4 - i3 - 1];\n iws[N4 - i3 - 1] = -t3;\n }\n };\n FFTM.prototype.normalize13b = function normalize13b(ws, N4) {\n var carry = 0;\n for (var i3 = 0; i3 < N4 / 2; i3++) {\n var w3 = Math.round(ws[2 * i3 + 1] / N4) * 8192 + Math.round(ws[2 * i3] / N4) + carry;\n ws[i3] = w3 & 67108863;\n if (w3 < 67108864) {\n carry = 0;\n } else {\n carry = w3 / 67108864 | 0;\n }\n }\n return ws;\n };\n FFTM.prototype.convert13b = function convert13b(ws, len, rws, N4) {\n var carry = 0;\n for (var i3 = 0; i3 < len; i3++) {\n carry = carry + (ws[i3] | 0);\n rws[2 * i3] = carry & 8191;\n carry = carry >>> 13;\n rws[2 * i3 + 1] = carry & 8191;\n carry = carry >>> 13;\n }\n for (i3 = 2 * len; i3 < N4; ++i3) {\n rws[i3] = 0;\n }\n assert9(carry === 0);\n assert9((carry & ~8191) === 0);\n };\n FFTM.prototype.stub = function stub(N4) {\n var ph = new Array(N4);\n for (var i3 = 0; i3 < N4; i3++) {\n ph[i3] = 0;\n }\n return ph;\n };\n FFTM.prototype.mulp = function mulp(x4, y6, out) {\n var N4 = 2 * this.guessLen13b(x4.length, y6.length);\n var rbt = this.makeRBT(N4);\n var _2 = this.stub(N4);\n var rws = new Array(N4);\n var rwst = new Array(N4);\n var iwst = new Array(N4);\n var nrws = new Array(N4);\n var nrwst = new Array(N4);\n var niwst = new Array(N4);\n var rmws = out.words;\n rmws.length = N4;\n this.convert13b(x4.words, x4.length, rws, N4);\n this.convert13b(y6.words, y6.length, nrws, N4);\n this.transform(rws, _2, rwst, iwst, N4, rbt);\n this.transform(nrws, _2, nrwst, niwst, N4, rbt);\n for (var i3 = 0; i3 < N4; i3++) {\n var rx = rwst[i3] * nrwst[i3] - iwst[i3] * niwst[i3];\n iwst[i3] = rwst[i3] * niwst[i3] + iwst[i3] * nrwst[i3];\n rwst[i3] = rx;\n }\n this.conjugate(rwst, iwst, N4);\n this.transform(rwst, iwst, rmws, _2, N4, rbt);\n this.conjugate(rmws, _2, N4);\n this.normalize13b(rmws, N4);\n out.negative = x4.negative ^ y6.negative;\n out.length = x4.length + y6.length;\n return out._strip();\n };\n BN.prototype.mul = function mul(num2) {\n var out = new BN(null);\n out.words = new Array(this.length + num2.length);\n return this.mulTo(num2, out);\n };\n BN.prototype.mulf = function mulf(num2) {\n var out = new BN(null);\n out.words = new Array(this.length + num2.length);\n return jumboMulTo(this, num2, out);\n };\n BN.prototype.imul = function imul(num2) {\n return this.clone().mulTo(num2, this);\n };\n BN.prototype.imuln = function imuln(num2) {\n var isNegNum = num2 < 0;\n if (isNegNum)\n num2 = -num2;\n assert9(typeof num2 === \"number\");\n assert9(num2 < 67108864);\n var carry = 0;\n for (var i3 = 0; i3 < this.length; i3++) {\n var w3 = (this.words[i3] | 0) * num2;\n var lo = (w3 & 67108863) + (carry & 67108863);\n carry >>= 26;\n carry += w3 / 67108864 | 0;\n carry += lo >>> 26;\n this.words[i3] = lo & 67108863;\n }\n if (carry !== 0) {\n this.words[i3] = carry;\n this.length++;\n }\n this.length = num2 === 0 ? 1 : this.length;\n return isNegNum ? this.ineg() : this;\n };\n BN.prototype.muln = function muln(num2) {\n return this.clone().imuln(num2);\n };\n BN.prototype.sqr = function sqr() {\n return this.mul(this);\n };\n BN.prototype.isqr = function isqr() {\n return this.imul(this.clone());\n };\n BN.prototype.pow = function pow(num2) {\n var w3 = toBitArray(num2);\n if (w3.length === 0)\n return new BN(1);\n var res = this;\n for (var i3 = 0; i3 < w3.length; i3++, res = res.sqr()) {\n if (w3[i3] !== 0)\n break;\n }\n if (++i3 < w3.length) {\n for (var q3 = res.sqr(); i3 < w3.length; i3++, q3 = q3.sqr()) {\n if (w3[i3] === 0)\n continue;\n res = res.mul(q3);\n }\n }\n return res;\n };\n BN.prototype.iushln = function iushln(bits) {\n assert9(typeof bits === \"number\" && bits >= 0);\n var r2 = bits % 26;\n var s4 = (bits - r2) / 26;\n var carryMask = 67108863 >>> 26 - r2 << 26 - r2;\n var i3;\n if (r2 !== 0) {\n var carry = 0;\n for (i3 = 0; i3 < this.length; i3++) {\n var newCarry = this.words[i3] & carryMask;\n var c4 = (this.words[i3] | 0) - newCarry << r2;\n this.words[i3] = c4 | carry;\n carry = newCarry >>> 26 - r2;\n }\n if (carry) {\n this.words[i3] = carry;\n this.length++;\n }\n }\n if (s4 !== 0) {\n for (i3 = this.length - 1; i3 >= 0; i3--) {\n this.words[i3 + s4] = this.words[i3];\n }\n for (i3 = 0; i3 < s4; i3++) {\n this.words[i3] = 0;\n }\n this.length += s4;\n }\n return this._strip();\n };\n BN.prototype.ishln = function ishln(bits) {\n assert9(this.negative === 0);\n return this.iushln(bits);\n };\n BN.prototype.iushrn = function iushrn(bits, hint, extended) {\n assert9(typeof bits === \"number\" && bits >= 0);\n var h4;\n if (hint) {\n h4 = (hint - hint % 26) / 26;\n } else {\n h4 = 0;\n }\n var r2 = bits % 26;\n var s4 = Math.min((bits - r2) / 26, this.length);\n var mask = 67108863 ^ 67108863 >>> r2 << r2;\n var maskedWords = extended;\n h4 -= s4;\n h4 = Math.max(0, h4);\n if (maskedWords) {\n for (var i3 = 0; i3 < s4; i3++) {\n maskedWords.words[i3] = this.words[i3];\n }\n maskedWords.length = s4;\n }\n if (s4 === 0) {\n } else if (this.length > s4) {\n this.length -= s4;\n for (i3 = 0; i3 < this.length; i3++) {\n this.words[i3] = this.words[i3 + s4];\n }\n } else {\n this.words[0] = 0;\n this.length = 1;\n }\n var carry = 0;\n for (i3 = this.length - 1; i3 >= 0 && (carry !== 0 || i3 >= h4); i3--) {\n var word = this.words[i3] | 0;\n this.words[i3] = carry << 26 - r2 | word >>> r2;\n carry = word & mask;\n }\n if (maskedWords && carry !== 0) {\n maskedWords.words[maskedWords.length++] = carry;\n }\n if (this.length === 0) {\n this.words[0] = 0;\n this.length = 1;\n }\n return this._strip();\n };\n BN.prototype.ishrn = function ishrn(bits, hint, extended) {\n assert9(this.negative === 0);\n return this.iushrn(bits, hint, extended);\n };\n BN.prototype.shln = function shln(bits) {\n return this.clone().ishln(bits);\n };\n BN.prototype.ushln = function ushln(bits) {\n return this.clone().iushln(bits);\n };\n BN.prototype.shrn = function shrn(bits) {\n return this.clone().ishrn(bits);\n };\n BN.prototype.ushrn = function ushrn(bits) {\n return this.clone().iushrn(bits);\n };\n BN.prototype.testn = function testn(bit) {\n assert9(typeof bit === \"number\" && bit >= 0);\n var r2 = bit % 26;\n var s4 = (bit - r2) / 26;\n var q3 = 1 << r2;\n if (this.length <= s4)\n return false;\n var w3 = this.words[s4];\n return !!(w3 & q3);\n };\n BN.prototype.imaskn = function imaskn(bits) {\n assert9(typeof bits === \"number\" && bits >= 0);\n var r2 = bits % 26;\n var s4 = (bits - r2) / 26;\n assert9(this.negative === 0, \"imaskn works only with positive numbers\");\n if (this.length <= s4) {\n return this;\n }\n if (r2 !== 0) {\n s4++;\n }\n this.length = Math.min(s4, this.length);\n if (r2 !== 0) {\n var mask = 67108863 ^ 67108863 >>> r2 << r2;\n this.words[this.length - 1] &= mask;\n }\n return this._strip();\n };\n BN.prototype.maskn = function maskn(bits) {\n return this.clone().imaskn(bits);\n };\n BN.prototype.iaddn = function iaddn(num2) {\n assert9(typeof num2 === \"number\");\n assert9(num2 < 67108864);\n if (num2 < 0)\n return this.isubn(-num2);\n if (this.negative !== 0) {\n if (this.length === 1 && (this.words[0] | 0) <= num2) {\n this.words[0] = num2 - (this.words[0] | 0);\n this.negative = 0;\n return this;\n }\n this.negative = 0;\n this.isubn(num2);\n this.negative = 1;\n return this;\n }\n return this._iaddn(num2);\n };\n BN.prototype._iaddn = function _iaddn(num2) {\n this.words[0] += num2;\n for (var i3 = 0; i3 < this.length && this.words[i3] >= 67108864; i3++) {\n this.words[i3] -= 67108864;\n if (i3 === this.length - 1) {\n this.words[i3 + 1] = 1;\n } else {\n this.words[i3 + 1]++;\n }\n }\n this.length = Math.max(this.length, i3 + 1);\n return this;\n };\n BN.prototype.isubn = function isubn(num2) {\n assert9(typeof num2 === \"number\");\n assert9(num2 < 67108864);\n if (num2 < 0)\n return this.iaddn(-num2);\n if (this.negative !== 0) {\n this.negative = 0;\n this.iaddn(num2);\n this.negative = 1;\n return this;\n }\n this.words[0] -= num2;\n if (this.length === 1 && this.words[0] < 0) {\n this.words[0] = -this.words[0];\n this.negative = 1;\n } else {\n for (var i3 = 0; i3 < this.length && this.words[i3] < 0; i3++) {\n this.words[i3] += 67108864;\n this.words[i3 + 1] -= 1;\n }\n }\n return this._strip();\n };\n BN.prototype.addn = function addn(num2) {\n return this.clone().iaddn(num2);\n };\n BN.prototype.subn = function subn(num2) {\n return this.clone().isubn(num2);\n };\n BN.prototype.iabs = function iabs() {\n this.negative = 0;\n return this;\n };\n BN.prototype.abs = function abs() {\n return this.clone().iabs();\n };\n BN.prototype._ishlnsubmul = function _ishlnsubmul(num2, mul, shift) {\n var len = num2.length + shift;\n var i3;\n this._expand(len);\n var w3;\n var carry = 0;\n for (i3 = 0; i3 < num2.length; i3++) {\n w3 = (this.words[i3 + shift] | 0) + carry;\n var right = (num2.words[i3] | 0) * mul;\n w3 -= right & 67108863;\n carry = (w3 >> 26) - (right / 67108864 | 0);\n this.words[i3 + shift] = w3 & 67108863;\n }\n for (; i3 < this.length - shift; i3++) {\n w3 = (this.words[i3 + shift] | 0) + carry;\n carry = w3 >> 26;\n this.words[i3 + shift] = w3 & 67108863;\n }\n if (carry === 0)\n return this._strip();\n assert9(carry === -1);\n carry = 0;\n for (i3 = 0; i3 < this.length; i3++) {\n w3 = -(this.words[i3] | 0) + carry;\n carry = w3 >> 26;\n this.words[i3] = w3 & 67108863;\n }\n this.negative = 1;\n return this._strip();\n };\n BN.prototype._wordDiv = function _wordDiv(num2, mode) {\n var shift = this.length - num2.length;\n var a3 = this.clone();\n var b4 = num2;\n var bhi = b4.words[b4.length - 1] | 0;\n var bhiBits = this._countBits(bhi);\n shift = 26 - bhiBits;\n if (shift !== 0) {\n b4 = b4.ushln(shift);\n a3.iushln(shift);\n bhi = b4.words[b4.length - 1] | 0;\n }\n var m2 = a3.length - b4.length;\n var q3;\n if (mode !== \"mod\") {\n q3 = new BN(null);\n q3.length = m2 + 1;\n q3.words = new Array(q3.length);\n for (var i3 = 0; i3 < q3.length; i3++) {\n q3.words[i3] = 0;\n }\n }\n var diff = a3.clone()._ishlnsubmul(b4, 1, m2);\n if (diff.negative === 0) {\n a3 = diff;\n if (q3) {\n q3.words[m2] = 1;\n }\n }\n for (var j2 = m2 - 1; j2 >= 0; j2--) {\n var qj = (a3.words[b4.length + j2] | 0) * 67108864 + (a3.words[b4.length + j2 - 1] | 0);\n qj = Math.min(qj / bhi | 0, 67108863);\n a3._ishlnsubmul(b4, qj, j2);\n while (a3.negative !== 0) {\n qj--;\n a3.negative = 0;\n a3._ishlnsubmul(b4, 1, j2);\n if (!a3.isZero()) {\n a3.negative ^= 1;\n }\n }\n if (q3) {\n q3.words[j2] = qj;\n }\n }\n if (q3) {\n q3._strip();\n }\n a3._strip();\n if (mode !== \"div\" && shift !== 0) {\n a3.iushrn(shift);\n }\n return {\n div: q3 || null,\n mod: a3\n };\n };\n BN.prototype.divmod = function divmod(num2, mode, positive) {\n assert9(!num2.isZero());\n if (this.isZero()) {\n return {\n div: new BN(0),\n mod: new BN(0)\n };\n }\n var div, mod3, res;\n if (this.negative !== 0 && num2.negative === 0) {\n res = this.neg().divmod(num2, mode);\n if (mode !== \"mod\") {\n div = res.div.neg();\n }\n if (mode !== \"div\") {\n mod3 = res.mod.neg();\n if (positive && mod3.negative !== 0) {\n mod3.iadd(num2);\n }\n }\n return {\n div,\n mod: mod3\n };\n }\n if (this.negative === 0 && num2.negative !== 0) {\n res = this.divmod(num2.neg(), mode);\n if (mode !== \"mod\") {\n div = res.div.neg();\n }\n return {\n div,\n mod: res.mod\n };\n }\n if ((this.negative & num2.negative) !== 0) {\n res = this.neg().divmod(num2.neg(), mode);\n if (mode !== \"div\") {\n mod3 = res.mod.neg();\n if (positive && mod3.negative !== 0) {\n mod3.isub(num2);\n }\n }\n return {\n div: res.div,\n mod: mod3\n };\n }\n if (num2.length > this.length || this.cmp(num2) < 0) {\n return {\n div: new BN(0),\n mod: this\n };\n }\n if (num2.length === 1) {\n if (mode === \"div\") {\n return {\n div: this.divn(num2.words[0]),\n mod: null\n };\n }\n if (mode === \"mod\") {\n return {\n div: null,\n mod: new BN(this.modrn(num2.words[0]))\n };\n }\n return {\n div: this.divn(num2.words[0]),\n mod: new BN(this.modrn(num2.words[0]))\n };\n }\n return this._wordDiv(num2, mode);\n };\n BN.prototype.div = function div(num2) {\n return this.divmod(num2, \"div\", false).div;\n };\n BN.prototype.mod = function mod3(num2) {\n return this.divmod(num2, \"mod\", false).mod;\n };\n BN.prototype.umod = function umod(num2) {\n return this.divmod(num2, \"mod\", true).mod;\n };\n BN.prototype.divRound = function divRound(num2) {\n var dm = this.divmod(num2);\n if (dm.mod.isZero())\n return dm.div;\n var mod3 = dm.div.negative !== 0 ? dm.mod.isub(num2) : dm.mod;\n var half = num2.ushrn(1);\n var r2 = num2.andln(1);\n var cmp = mod3.cmp(half);\n if (cmp < 0 || r2 === 1 && cmp === 0)\n return dm.div;\n return dm.div.negative !== 0 ? dm.div.isubn(1) : dm.div.iaddn(1);\n };\n BN.prototype.modrn = function modrn(num2) {\n var isNegNum = num2 < 0;\n if (isNegNum)\n num2 = -num2;\n assert9(num2 <= 67108863);\n var p4 = (1 << 26) % num2;\n var acc = 0;\n for (var i3 = this.length - 1; i3 >= 0; i3--) {\n acc = (p4 * acc + (this.words[i3] | 0)) % num2;\n }\n return isNegNum ? -acc : acc;\n };\n BN.prototype.modn = function modn(num2) {\n return this.modrn(num2);\n };\n BN.prototype.idivn = function idivn(num2) {\n var isNegNum = num2 < 0;\n if (isNegNum)\n num2 = -num2;\n assert9(num2 <= 67108863);\n var carry = 0;\n for (var i3 = this.length - 1; i3 >= 0; i3--) {\n var w3 = (this.words[i3] | 0) + carry * 67108864;\n this.words[i3] = w3 / num2 | 0;\n carry = w3 % num2;\n }\n this._strip();\n return isNegNum ? this.ineg() : this;\n };\n BN.prototype.divn = function divn(num2) {\n return this.clone().idivn(num2);\n };\n BN.prototype.egcd = function egcd(p4) {\n assert9(p4.negative === 0);\n assert9(!p4.isZero());\n var x4 = this;\n var y6 = p4.clone();\n if (x4.negative !== 0) {\n x4 = x4.umod(p4);\n } else {\n x4 = x4.clone();\n }\n var A4 = new BN(1);\n var B2 = new BN(0);\n var C = new BN(0);\n var D2 = new BN(1);\n var g4 = 0;\n while (x4.isEven() && y6.isEven()) {\n x4.iushrn(1);\n y6.iushrn(1);\n ++g4;\n }\n var yp = y6.clone();\n var xp = x4.clone();\n while (!x4.isZero()) {\n for (var i3 = 0, im = 1; (x4.words[0] & im) === 0 && i3 < 26; ++i3, im <<= 1)\n ;\n if (i3 > 0) {\n x4.iushrn(i3);\n while (i3-- > 0) {\n if (A4.isOdd() || B2.isOdd()) {\n A4.iadd(yp);\n B2.isub(xp);\n }\n A4.iushrn(1);\n B2.iushrn(1);\n }\n }\n for (var j2 = 0, jm = 1; (y6.words[0] & jm) === 0 && j2 < 26; ++j2, jm <<= 1)\n ;\n if (j2 > 0) {\n y6.iushrn(j2);\n while (j2-- > 0) {\n if (C.isOdd() || D2.isOdd()) {\n C.iadd(yp);\n D2.isub(xp);\n }\n C.iushrn(1);\n D2.iushrn(1);\n }\n }\n if (x4.cmp(y6) >= 0) {\n x4.isub(y6);\n A4.isub(C);\n B2.isub(D2);\n } else {\n y6.isub(x4);\n C.isub(A4);\n D2.isub(B2);\n }\n }\n return {\n a: C,\n b: D2,\n gcd: y6.iushln(g4)\n };\n };\n BN.prototype._invmp = function _invmp(p4) {\n assert9(p4.negative === 0);\n assert9(!p4.isZero());\n var a3 = this;\n var b4 = p4.clone();\n if (a3.negative !== 0) {\n a3 = a3.umod(p4);\n } else {\n a3 = a3.clone();\n }\n var x1 = new BN(1);\n var x22 = new BN(0);\n var delta = b4.clone();\n while (a3.cmpn(1) > 0 && b4.cmpn(1) > 0) {\n for (var i3 = 0, im = 1; (a3.words[0] & im) === 0 && i3 < 26; ++i3, im <<= 1)\n ;\n if (i3 > 0) {\n a3.iushrn(i3);\n while (i3-- > 0) {\n if (x1.isOdd()) {\n x1.iadd(delta);\n }\n x1.iushrn(1);\n }\n }\n for (var j2 = 0, jm = 1; (b4.words[0] & jm) === 0 && j2 < 26; ++j2, jm <<= 1)\n ;\n if (j2 > 0) {\n b4.iushrn(j2);\n while (j2-- > 0) {\n if (x22.isOdd()) {\n x22.iadd(delta);\n }\n x22.iushrn(1);\n }\n }\n if (a3.cmp(b4) >= 0) {\n a3.isub(b4);\n x1.isub(x22);\n } else {\n b4.isub(a3);\n x22.isub(x1);\n }\n }\n var res;\n if (a3.cmpn(1) === 0) {\n res = x1;\n } else {\n res = x22;\n }\n if (res.cmpn(0) < 0) {\n res.iadd(p4);\n }\n return res;\n };\n BN.prototype.gcd = function gcd(num2) {\n if (this.isZero())\n return num2.abs();\n if (num2.isZero())\n return this.abs();\n var a3 = this.clone();\n var b4 = num2.clone();\n a3.negative = 0;\n b4.negative = 0;\n for (var shift = 0; a3.isEven() && b4.isEven(); shift++) {\n a3.iushrn(1);\n b4.iushrn(1);\n }\n do {\n while (a3.isEven()) {\n a3.iushrn(1);\n }\n while (b4.isEven()) {\n b4.iushrn(1);\n }\n var r2 = a3.cmp(b4);\n if (r2 < 0) {\n var t3 = a3;\n a3 = b4;\n b4 = t3;\n } else if (r2 === 0 || b4.cmpn(1) === 0) {\n break;\n }\n a3.isub(b4);\n } while (true);\n return b4.iushln(shift);\n };\n BN.prototype.invm = function invm(num2) {\n return this.egcd(num2).a.umod(num2);\n };\n BN.prototype.isEven = function isEven() {\n return (this.words[0] & 1) === 0;\n };\n BN.prototype.isOdd = function isOdd() {\n return (this.words[0] & 1) === 1;\n };\n BN.prototype.andln = function andln(num2) {\n return this.words[0] & num2;\n };\n BN.prototype.bincn = function bincn(bit) {\n assert9(typeof bit === \"number\");\n var r2 = bit % 26;\n var s4 = (bit - r2) / 26;\n var q3 = 1 << r2;\n if (this.length <= s4) {\n this._expand(s4 + 1);\n this.words[s4] |= q3;\n return this;\n }\n var carry = q3;\n for (var i3 = s4; carry !== 0 && i3 < this.length; i3++) {\n var w3 = this.words[i3] | 0;\n w3 += carry;\n carry = w3 >>> 26;\n w3 &= 67108863;\n this.words[i3] = w3;\n }\n if (carry !== 0) {\n this.words[i3] = carry;\n this.length++;\n }\n return this;\n };\n BN.prototype.isZero = function isZero() {\n return this.length === 1 && this.words[0] === 0;\n };\n BN.prototype.cmpn = function cmpn(num2) {\n var negative = num2 < 0;\n if (this.negative !== 0 && !negative)\n return -1;\n if (this.negative === 0 && negative)\n return 1;\n this._strip();\n var res;\n if (this.length > 1) {\n res = 1;\n } else {\n if (negative) {\n num2 = -num2;\n }\n assert9(num2 <= 67108863, \"Number is too big\");\n var w3 = this.words[0] | 0;\n res = w3 === num2 ? 0 : w3 < num2 ? -1 : 1;\n }\n if (this.negative !== 0)\n return -res | 0;\n return res;\n };\n BN.prototype.cmp = function cmp(num2) {\n if (this.negative !== 0 && num2.negative === 0)\n return -1;\n if (this.negative === 0 && num2.negative !== 0)\n return 1;\n var res = this.ucmp(num2);\n if (this.negative !== 0)\n return -res | 0;\n return res;\n };\n BN.prototype.ucmp = function ucmp(num2) {\n if (this.length > num2.length)\n return 1;\n if (this.length < num2.length)\n return -1;\n var res = 0;\n for (var i3 = this.length - 1; i3 >= 0; i3--) {\n var a3 = this.words[i3] | 0;\n var b4 = num2.words[i3] | 0;\n if (a3 === b4)\n continue;\n if (a3 < b4) {\n res = -1;\n } else if (a3 > b4) {\n res = 1;\n }\n break;\n }\n return res;\n };\n BN.prototype.gtn = function gtn(num2) {\n return this.cmpn(num2) === 1;\n };\n BN.prototype.gt = function gt(num2) {\n return this.cmp(num2) === 1;\n };\n BN.prototype.gten = function gten(num2) {\n return this.cmpn(num2) >= 0;\n };\n BN.prototype.gte = function gte(num2) {\n return this.cmp(num2) >= 0;\n };\n BN.prototype.ltn = function ltn(num2) {\n return this.cmpn(num2) === -1;\n };\n BN.prototype.lt = function lt(num2) {\n return this.cmp(num2) === -1;\n };\n BN.prototype.lten = function lten(num2) {\n return this.cmpn(num2) <= 0;\n };\n BN.prototype.lte = function lte(num2) {\n return this.cmp(num2) <= 0;\n };\n BN.prototype.eqn = function eqn(num2) {\n return this.cmpn(num2) === 0;\n };\n BN.prototype.eq = function eq(num2) {\n return this.cmp(num2) === 0;\n };\n BN.red = function red(num2) {\n return new Red(num2);\n };\n BN.prototype.toRed = function toRed(ctx) {\n assert9(!this.red, \"Already a number in reduction context\");\n assert9(this.negative === 0, \"red works only with positives\");\n return ctx.convertTo(this)._forceRed(ctx);\n };\n BN.prototype.fromRed = function fromRed() {\n assert9(this.red, \"fromRed works only with numbers in reduction context\");\n return this.red.convertFrom(this);\n };\n BN.prototype._forceRed = function _forceRed(ctx) {\n this.red = ctx;\n return this;\n };\n BN.prototype.forceRed = function forceRed(ctx) {\n assert9(!this.red, \"Already a number in reduction context\");\n return this._forceRed(ctx);\n };\n BN.prototype.redAdd = function redAdd(num2) {\n assert9(this.red, \"redAdd works only with red numbers\");\n return this.red.add(this, num2);\n };\n BN.prototype.redIAdd = function redIAdd(num2) {\n assert9(this.red, \"redIAdd works only with red numbers\");\n return this.red.iadd(this, num2);\n };\n BN.prototype.redSub = function redSub(num2) {\n assert9(this.red, \"redSub works only with red numbers\");\n return this.red.sub(this, num2);\n };\n BN.prototype.redISub = function redISub(num2) {\n assert9(this.red, \"redISub works only with red numbers\");\n return this.red.isub(this, num2);\n };\n BN.prototype.redShl = function redShl(num2) {\n assert9(this.red, \"redShl works only with red numbers\");\n return this.red.shl(this, num2);\n };\n BN.prototype.redMul = function redMul(num2) {\n assert9(this.red, \"redMul works only with red numbers\");\n this.red._verify2(this, num2);\n return this.red.mul(this, num2);\n };\n BN.prototype.redIMul = function redIMul(num2) {\n assert9(this.red, \"redMul works only with red numbers\");\n this.red._verify2(this, num2);\n return this.red.imul(this, num2);\n };\n BN.prototype.redSqr = function redSqr() {\n assert9(this.red, \"redSqr works only with red numbers\");\n this.red._verify1(this);\n return this.red.sqr(this);\n };\n BN.prototype.redISqr = function redISqr() {\n assert9(this.red, \"redISqr works only with red numbers\");\n this.red._verify1(this);\n return this.red.isqr(this);\n };\n BN.prototype.redSqrt = function redSqrt() {\n assert9(this.red, \"redSqrt works only with red numbers\");\n this.red._verify1(this);\n return this.red.sqrt(this);\n };\n BN.prototype.redInvm = function redInvm() {\n assert9(this.red, \"redInvm works only with red numbers\");\n this.red._verify1(this);\n return this.red.invm(this);\n };\n BN.prototype.redNeg = function redNeg() {\n assert9(this.red, \"redNeg works only with red numbers\");\n this.red._verify1(this);\n return this.red.neg(this);\n };\n BN.prototype.redPow = function redPow(num2) {\n assert9(this.red && !num2.red, \"redPow(normalNum)\");\n this.red._verify1(this);\n return this.red.pow(this, num2);\n };\n var primes = {\n k256: null,\n p224: null,\n p192: null,\n p25519: null\n };\n function MPrime(name, p4) {\n this.name = name;\n this.p = new BN(p4, 16);\n this.n = this.p.bitLength();\n this.k = new BN(1).iushln(this.n).isub(this.p);\n this.tmp = this._tmp();\n }\n MPrime.prototype._tmp = function _tmp() {\n var tmp = new BN(null);\n tmp.words = new Array(Math.ceil(this.n / 13));\n return tmp;\n };\n MPrime.prototype.ireduce = function ireduce(num2) {\n var r2 = num2;\n var rlen;\n do {\n this.split(r2, this.tmp);\n r2 = this.imulK(r2);\n r2 = r2.iadd(this.tmp);\n rlen = r2.bitLength();\n } while (rlen > this.n);\n var cmp = rlen < this.n ? -1 : r2.ucmp(this.p);\n if (cmp === 0) {\n r2.words[0] = 0;\n r2.length = 1;\n } else if (cmp > 0) {\n r2.isub(this.p);\n } else {\n if (r2.strip !== void 0) {\n r2.strip();\n } else {\n r2._strip();\n }\n }\n return r2;\n };\n MPrime.prototype.split = function split4(input, out) {\n input.iushrn(this.n, 0, out);\n };\n MPrime.prototype.imulK = function imulK(num2) {\n return num2.imul(this.k);\n };\n function K256() {\n MPrime.call(\n this,\n \"k256\",\n \"ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe fffffc2f\"\n );\n }\n inherits(K256, MPrime);\n K256.prototype.split = function split4(input, output) {\n var mask = 4194303;\n var outLen = Math.min(input.length, 9);\n for (var i3 = 0; i3 < outLen; i3++) {\n output.words[i3] = input.words[i3];\n }\n output.length = outLen;\n if (input.length <= 9) {\n input.words[0] = 0;\n input.length = 1;\n return;\n }\n var prev = input.words[9];\n output.words[output.length++] = prev & mask;\n for (i3 = 10; i3 < input.length; i3++) {\n var next = input.words[i3] | 0;\n input.words[i3 - 10] = (next & mask) << 4 | prev >>> 22;\n prev = next;\n }\n prev >>>= 22;\n input.words[i3 - 10] = prev;\n if (prev === 0 && input.length > 10) {\n input.length -= 10;\n } else {\n input.length -= 9;\n }\n };\n K256.prototype.imulK = function imulK(num2) {\n num2.words[num2.length] = 0;\n num2.words[num2.length + 1] = 0;\n num2.length += 2;\n var lo = 0;\n for (var i3 = 0; i3 < num2.length; i3++) {\n var w3 = num2.words[i3] | 0;\n lo += w3 * 977;\n num2.words[i3] = lo & 67108863;\n lo = w3 * 64 + (lo / 67108864 | 0);\n }\n if (num2.words[num2.length - 1] === 0) {\n num2.length--;\n if (num2.words[num2.length - 1] === 0) {\n num2.length--;\n }\n }\n return num2;\n };\n function P224() {\n MPrime.call(\n this,\n \"p224\",\n \"ffffffff ffffffff ffffffff ffffffff 00000000 00000000 00000001\"\n );\n }\n inherits(P224, MPrime);\n function P192() {\n MPrime.call(\n this,\n \"p192\",\n \"ffffffff ffffffff ffffffff fffffffe ffffffff ffffffff\"\n );\n }\n inherits(P192, MPrime);\n function P25519() {\n MPrime.call(\n this,\n \"25519\",\n \"7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed\"\n );\n }\n inherits(P25519, MPrime);\n P25519.prototype.imulK = function imulK(num2) {\n var carry = 0;\n for (var i3 = 0; i3 < num2.length; i3++) {\n var hi = (num2.words[i3] | 0) * 19 + carry;\n var lo = hi & 67108863;\n hi >>>= 26;\n num2.words[i3] = lo;\n carry = hi;\n }\n if (carry !== 0) {\n num2.words[num2.length++] = carry;\n }\n return num2;\n };\n BN._prime = function prime(name) {\n if (primes[name])\n return primes[name];\n var prime2;\n if (name === \"k256\") {\n prime2 = new K256();\n } else if (name === \"p224\") {\n prime2 = new P224();\n } else if (name === \"p192\") {\n prime2 = new P192();\n } else if (name === \"p25519\") {\n prime2 = new P25519();\n } else {\n throw new Error(\"Unknown prime \" + name);\n }\n primes[name] = prime2;\n return prime2;\n };\n function Red(m2) {\n if (typeof m2 === \"string\") {\n var prime = BN._prime(m2);\n this.m = prime.p;\n this.prime = prime;\n } else {\n assert9(m2.gtn(1), \"modulus must be greater than 1\");\n this.m = m2;\n this.prime = null;\n }\n }\n Red.prototype._verify1 = function _verify1(a3) {\n assert9(a3.negative === 0, \"red works only with positives\");\n assert9(a3.red, \"red works only with red numbers\");\n };\n Red.prototype._verify2 = function _verify2(a3, b4) {\n assert9((a3.negative | b4.negative) === 0, \"red works only with positives\");\n assert9(\n a3.red && a3.red === b4.red,\n \"red works only with red numbers\"\n );\n };\n Red.prototype.imod = function imod(a3) {\n if (this.prime)\n return this.prime.ireduce(a3)._forceRed(this);\n move(a3, a3.umod(this.m)._forceRed(this));\n return a3;\n };\n Red.prototype.neg = function neg(a3) {\n if (a3.isZero()) {\n return a3.clone();\n }\n return this.m.sub(a3)._forceRed(this);\n };\n Red.prototype.add = function add2(a3, b4) {\n this._verify2(a3, b4);\n var res = a3.add(b4);\n if (res.cmp(this.m) >= 0) {\n res.isub(this.m);\n }\n return res._forceRed(this);\n };\n Red.prototype.iadd = function iadd(a3, b4) {\n this._verify2(a3, b4);\n var res = a3.iadd(b4);\n if (res.cmp(this.m) >= 0) {\n res.isub(this.m);\n }\n return res;\n };\n Red.prototype.sub = function sub(a3, b4) {\n this._verify2(a3, b4);\n var res = a3.sub(b4);\n if (res.cmpn(0) < 0) {\n res.iadd(this.m);\n }\n return res._forceRed(this);\n };\n Red.prototype.isub = function isub(a3, b4) {\n this._verify2(a3, b4);\n var res = a3.isub(b4);\n if (res.cmpn(0) < 0) {\n res.iadd(this.m);\n }\n return res;\n };\n Red.prototype.shl = function shl(a3, num2) {\n this._verify1(a3);\n return this.imod(a3.ushln(num2));\n };\n Red.prototype.imul = function imul(a3, b4) {\n this._verify2(a3, b4);\n return this.imod(a3.imul(b4));\n };\n Red.prototype.mul = function mul(a3, b4) {\n this._verify2(a3, b4);\n return this.imod(a3.mul(b4));\n };\n Red.prototype.isqr = function isqr(a3) {\n return this.imul(a3, a3.clone());\n };\n Red.prototype.sqr = function sqr(a3) {\n return this.mul(a3, a3);\n };\n Red.prototype.sqrt = function sqrt(a3) {\n if (a3.isZero())\n return a3.clone();\n var mod3 = this.m.andln(3);\n assert9(mod3 % 2 === 1);\n if (mod3 === 3) {\n var pow = this.m.add(new BN(1)).iushrn(2);\n return this.pow(a3, pow);\n }\n var q3 = this.m.subn(1);\n var s4 = 0;\n while (!q3.isZero() && q3.andln(1) === 0) {\n s4++;\n q3.iushrn(1);\n }\n assert9(!q3.isZero());\n var one = new BN(1).toRed(this);\n var nOne = one.redNeg();\n var lpow = this.m.subn(1).iushrn(1);\n var z2 = this.m.bitLength();\n z2 = new BN(2 * z2 * z2).toRed(this);\n while (this.pow(z2, lpow).cmp(nOne) !== 0) {\n z2.redIAdd(nOne);\n }\n var c4 = this.pow(z2, q3);\n var r2 = this.pow(a3, q3.addn(1).iushrn(1));\n var t3 = this.pow(a3, q3);\n var m2 = s4;\n while (t3.cmp(one) !== 0) {\n var tmp = t3;\n for (var i3 = 0; tmp.cmp(one) !== 0; i3++) {\n tmp = tmp.redSqr();\n }\n assert9(i3 < m2);\n var b4 = this.pow(c4, new BN(1).iushln(m2 - i3 - 1));\n r2 = r2.redMul(b4);\n c4 = b4.redSqr();\n t3 = t3.redMul(c4);\n m2 = i3;\n }\n return r2;\n };\n Red.prototype.invm = function invm(a3) {\n var inv = a3._invmp(this.m);\n if (inv.negative !== 0) {\n inv.negative = 0;\n return this.imod(inv).redNeg();\n } else {\n return this.imod(inv);\n }\n };\n Red.prototype.pow = function pow(a3, num2) {\n if (num2.isZero())\n return new BN(1).toRed(this);\n if (num2.cmpn(1) === 0)\n return a3.clone();\n var windowSize = 4;\n var wnd = new Array(1 << windowSize);\n wnd[0] = new BN(1).toRed(this);\n wnd[1] = a3;\n for (var i3 = 2; i3 < wnd.length; i3++) {\n wnd[i3] = this.mul(wnd[i3 - 1], a3);\n }\n var res = wnd[0];\n var current = 0;\n var currentLen = 0;\n var start = num2.bitLength() % 26;\n if (start === 0) {\n start = 26;\n }\n for (i3 = num2.length - 1; i3 >= 0; i3--) {\n var word = num2.words[i3];\n for (var j2 = start - 1; j2 >= 0; j2--) {\n var bit = word >> j2 & 1;\n if (res !== wnd[0]) {\n res = this.sqr(res);\n }\n if (bit === 0 && current === 0) {\n currentLen = 0;\n continue;\n }\n current <<= 1;\n current |= bit;\n currentLen++;\n if (currentLen !== windowSize && (i3 !== 0 || j2 !== 0))\n continue;\n res = this.mul(res, wnd[current]);\n currentLen = 0;\n current = 0;\n }\n start = 26;\n }\n return res;\n };\n Red.prototype.convertTo = function convertTo(num2) {\n var r2 = num2.umod(this.m);\n return r2 === num2 ? r2.clone() : r2;\n };\n Red.prototype.convertFrom = function convertFrom(num2) {\n var res = num2.clone();\n res.red = null;\n return res;\n };\n BN.mont = function mont(num2) {\n return new Mont(num2);\n };\n function Mont(m2) {\n Red.call(this, m2);\n this.shift = this.m.bitLength();\n if (this.shift % 26 !== 0) {\n this.shift += 26 - this.shift % 26;\n }\n this.r = new BN(1).iushln(this.shift);\n this.r2 = this.imod(this.r.sqr());\n this.rinv = this.r._invmp(this.m);\n this.minv = this.rinv.mul(this.r).isubn(1).div(this.m);\n this.minv = this.minv.umod(this.r);\n this.minv = this.r.sub(this.minv);\n }\n inherits(Mont, Red);\n Mont.prototype.convertTo = function convertTo(num2) {\n return this.imod(num2.ushln(this.shift));\n };\n Mont.prototype.convertFrom = function convertFrom(num2) {\n var r2 = this.imod(num2.mul(this.rinv));\n r2.red = null;\n return r2;\n };\n Mont.prototype.imul = function imul(a3, b4) {\n if (a3.isZero() || b4.isZero()) {\n a3.words[0] = 0;\n a3.length = 1;\n return a3;\n }\n var t3 = a3.imul(b4);\n var c4 = t3.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m);\n var u2 = t3.isub(c4).iushrn(this.shift);\n var res = u2;\n if (u2.cmp(this.m) >= 0) {\n res = u2.isub(this.m);\n } else if (u2.cmpn(0) < 0) {\n res = u2.iadd(this.m);\n }\n return res._forceRed(this);\n };\n Mont.prototype.mul = function mul(a3, b4) {\n if (a3.isZero() || b4.isZero())\n return new BN(0)._forceRed(this);\n var t3 = a3.mul(b4);\n var c4 = t3.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m);\n var u2 = t3.isub(c4).iushrn(this.shift);\n var res = u2;\n if (u2.cmp(this.m) >= 0) {\n res = u2.isub(this.m);\n } else if (u2.cmpn(0) < 0) {\n res = u2.iadd(this.m);\n }\n return res._forceRed(this);\n };\n Mont.prototype.invm = function invm(a3) {\n var res = this.imod(a3._invmp(this.m).mul(this.r2));\n return res._forceRed(this);\n };\n })(typeof module === \"undefined\" || module, exports3);\n }\n });\n\n // ../../../node_modules/.pnpm/@ethersproject+logger@5.8.0/node_modules/@ethersproject/logger/lib/_version.js\n var require_version = __commonJS({\n \"../../../node_modules/.pnpm/@ethersproject+logger@5.8.0/node_modules/@ethersproject/logger/lib/_version.js\"(exports3) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n Object.defineProperty(exports3, \"__esModule\", { value: true });\n exports3.version = void 0;\n exports3.version = \"logger/5.8.0\";\n }\n });\n\n // ../../../node_modules/.pnpm/@ethersproject+logger@5.8.0/node_modules/@ethersproject/logger/lib/index.js\n var require_lib = __commonJS({\n \"../../../node_modules/.pnpm/@ethersproject+logger@5.8.0/node_modules/@ethersproject/logger/lib/index.js\"(exports3) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n Object.defineProperty(exports3, \"__esModule\", { value: true });\n exports3.Logger = exports3.ErrorCode = exports3.LogLevel = void 0;\n var _permanentCensorErrors = false;\n var _censorErrors = false;\n var LogLevels = { debug: 1, \"default\": 2, info: 2, warning: 3, error: 4, off: 5 };\n var _logLevel = LogLevels[\"default\"];\n var _version_1 = require_version();\n var _globalLogger = null;\n function _checkNormalize() {\n try {\n var missing_1 = [];\n [\"NFD\", \"NFC\", \"NFKD\", \"NFKC\"].forEach(function(form) {\n try {\n if (\"test\".normalize(form) !== \"test\") {\n throw new Error(\"bad normalize\");\n }\n ;\n } catch (error) {\n missing_1.push(form);\n }\n });\n if (missing_1.length) {\n throw new Error(\"missing \" + missing_1.join(\", \"));\n }\n if (String.fromCharCode(233).normalize(\"NFD\") !== String.fromCharCode(101, 769)) {\n throw new Error(\"broken implementation\");\n }\n } catch (error) {\n return error.message;\n }\n return null;\n }\n var _normalizeError = _checkNormalize();\n var LogLevel2;\n (function(LogLevel3) {\n LogLevel3[\"DEBUG\"] = \"DEBUG\";\n LogLevel3[\"INFO\"] = \"INFO\";\n LogLevel3[\"WARNING\"] = \"WARNING\";\n LogLevel3[\"ERROR\"] = \"ERROR\";\n LogLevel3[\"OFF\"] = \"OFF\";\n })(LogLevel2 = exports3.LogLevel || (exports3.LogLevel = {}));\n var ErrorCode;\n (function(ErrorCode2) {\n ErrorCode2[\"UNKNOWN_ERROR\"] = \"UNKNOWN_ERROR\";\n ErrorCode2[\"NOT_IMPLEMENTED\"] = \"NOT_IMPLEMENTED\";\n ErrorCode2[\"UNSUPPORTED_OPERATION\"] = \"UNSUPPORTED_OPERATION\";\n ErrorCode2[\"NETWORK_ERROR\"] = \"NETWORK_ERROR\";\n ErrorCode2[\"SERVER_ERROR\"] = \"SERVER_ERROR\";\n ErrorCode2[\"TIMEOUT\"] = \"TIMEOUT\";\n ErrorCode2[\"BUFFER_OVERRUN\"] = \"BUFFER_OVERRUN\";\n ErrorCode2[\"NUMERIC_FAULT\"] = \"NUMERIC_FAULT\";\n ErrorCode2[\"MISSING_NEW\"] = \"MISSING_NEW\";\n ErrorCode2[\"INVALID_ARGUMENT\"] = \"INVALID_ARGUMENT\";\n ErrorCode2[\"MISSING_ARGUMENT\"] = \"MISSING_ARGUMENT\";\n ErrorCode2[\"UNEXPECTED_ARGUMENT\"] = \"UNEXPECTED_ARGUMENT\";\n ErrorCode2[\"CALL_EXCEPTION\"] = \"CALL_EXCEPTION\";\n ErrorCode2[\"INSUFFICIENT_FUNDS\"] = \"INSUFFICIENT_FUNDS\";\n ErrorCode2[\"NONCE_EXPIRED\"] = \"NONCE_EXPIRED\";\n ErrorCode2[\"REPLACEMENT_UNDERPRICED\"] = \"REPLACEMENT_UNDERPRICED\";\n ErrorCode2[\"UNPREDICTABLE_GAS_LIMIT\"] = \"UNPREDICTABLE_GAS_LIMIT\";\n ErrorCode2[\"TRANSACTION_REPLACED\"] = \"TRANSACTION_REPLACED\";\n ErrorCode2[\"ACTION_REJECTED\"] = \"ACTION_REJECTED\";\n })(ErrorCode = exports3.ErrorCode || (exports3.ErrorCode = {}));\n var HEX = \"0123456789abcdef\";\n var Logger2 = (\n /** @class */\n function() {\n function Logger3(version6) {\n Object.defineProperty(this, \"version\", {\n enumerable: true,\n value: version6,\n writable: false\n });\n }\n Logger3.prototype._log = function(logLevel, args) {\n var level = logLevel.toLowerCase();\n if (LogLevels[level] == null) {\n this.throwArgumentError(\"invalid log level name\", \"logLevel\", logLevel);\n }\n if (_logLevel > LogLevels[level]) {\n return;\n }\n console.log.apply(console, args);\n };\n Logger3.prototype.debug = function() {\n var args = [];\n for (var _i = 0; _i < arguments.length; _i++) {\n args[_i] = arguments[_i];\n }\n this._log(Logger3.levels.DEBUG, args);\n };\n Logger3.prototype.info = function() {\n var args = [];\n for (var _i = 0; _i < arguments.length; _i++) {\n args[_i] = arguments[_i];\n }\n this._log(Logger3.levels.INFO, args);\n };\n Logger3.prototype.warn = function() {\n var args = [];\n for (var _i = 0; _i < arguments.length; _i++) {\n args[_i] = arguments[_i];\n }\n this._log(Logger3.levels.WARNING, args);\n };\n Logger3.prototype.makeError = function(message, code, params) {\n if (_censorErrors) {\n return this.makeError(\"censored error\", code, {});\n }\n if (!code) {\n code = Logger3.errors.UNKNOWN_ERROR;\n }\n if (!params) {\n params = {};\n }\n var messageDetails = [];\n Object.keys(params).forEach(function(key) {\n var value = params[key];\n try {\n if (value instanceof Uint8Array) {\n var hex = \"\";\n for (var i3 = 0; i3 < value.length; i3++) {\n hex += HEX[value[i3] >> 4];\n hex += HEX[value[i3] & 15];\n }\n messageDetails.push(key + \"=Uint8Array(0x\" + hex + \")\");\n } else {\n messageDetails.push(key + \"=\" + JSON.stringify(value));\n }\n } catch (error2) {\n messageDetails.push(key + \"=\" + JSON.stringify(params[key].toString()));\n }\n });\n messageDetails.push(\"code=\" + code);\n messageDetails.push(\"version=\" + this.version);\n var reason = message;\n var url = \"\";\n switch (code) {\n case ErrorCode.NUMERIC_FAULT: {\n url = \"NUMERIC_FAULT\";\n var fault = message;\n switch (fault) {\n case \"overflow\":\n case \"underflow\":\n case \"division-by-zero\":\n url += \"-\" + fault;\n break;\n case \"negative-power\":\n case \"negative-width\":\n url += \"-unsupported\";\n break;\n case \"unbound-bitwise-result\":\n url += \"-unbound-result\";\n break;\n }\n break;\n }\n case ErrorCode.CALL_EXCEPTION:\n case ErrorCode.INSUFFICIENT_FUNDS:\n case ErrorCode.MISSING_NEW:\n case ErrorCode.NONCE_EXPIRED:\n case ErrorCode.REPLACEMENT_UNDERPRICED:\n case ErrorCode.TRANSACTION_REPLACED:\n case ErrorCode.UNPREDICTABLE_GAS_LIMIT:\n url = code;\n break;\n }\n if (url) {\n message += \" [ See: https://links.ethers.org/v5-errors-\" + url + \" ]\";\n }\n if (messageDetails.length) {\n message += \" (\" + messageDetails.join(\", \") + \")\";\n }\n var error = new Error(message);\n error.reason = reason;\n error.code = code;\n Object.keys(params).forEach(function(key) {\n error[key] = params[key];\n });\n return error;\n };\n Logger3.prototype.throwError = function(message, code, params) {\n throw this.makeError(message, code, params);\n };\n Logger3.prototype.throwArgumentError = function(message, name, value) {\n return this.throwError(message, Logger3.errors.INVALID_ARGUMENT, {\n argument: name,\n value\n });\n };\n Logger3.prototype.assert = function(condition, message, code, params) {\n if (!!condition) {\n return;\n }\n this.throwError(message, code, params);\n };\n Logger3.prototype.assertArgument = function(condition, message, name, value) {\n if (!!condition) {\n return;\n }\n this.throwArgumentError(message, name, value);\n };\n Logger3.prototype.checkNormalize = function(message) {\n if (message == null) {\n message = \"platform missing String.prototype.normalize\";\n }\n if (_normalizeError) {\n this.throwError(\"platform missing String.prototype.normalize\", Logger3.errors.UNSUPPORTED_OPERATION, {\n operation: \"String.prototype.normalize\",\n form: _normalizeError\n });\n }\n };\n Logger3.prototype.checkSafeUint53 = function(value, message) {\n if (typeof value !== \"number\") {\n return;\n }\n if (message == null) {\n message = \"value not safe\";\n }\n if (value < 0 || value >= 9007199254740991) {\n this.throwError(message, Logger3.errors.NUMERIC_FAULT, {\n operation: \"checkSafeInteger\",\n fault: \"out-of-safe-range\",\n value\n });\n }\n if (value % 1) {\n this.throwError(message, Logger3.errors.NUMERIC_FAULT, {\n operation: \"checkSafeInteger\",\n fault: \"non-integer\",\n value\n });\n }\n };\n Logger3.prototype.checkArgumentCount = function(count, expectedCount, message) {\n if (message) {\n message = \": \" + message;\n } else {\n message = \"\";\n }\n if (count < expectedCount) {\n this.throwError(\"missing argument\" + message, Logger3.errors.MISSING_ARGUMENT, {\n count,\n expectedCount\n });\n }\n if (count > expectedCount) {\n this.throwError(\"too many arguments\" + message, Logger3.errors.UNEXPECTED_ARGUMENT, {\n count,\n expectedCount\n });\n }\n };\n Logger3.prototype.checkNew = function(target, kind) {\n if (target === Object || target == null) {\n this.throwError(\"missing new\", Logger3.errors.MISSING_NEW, { name: kind.name });\n }\n };\n Logger3.prototype.checkAbstract = function(target, kind) {\n if (target === kind) {\n this.throwError(\"cannot instantiate abstract class \" + JSON.stringify(kind.name) + \" directly; use a sub-class\", Logger3.errors.UNSUPPORTED_OPERATION, { name: target.name, operation: \"new\" });\n } else if (target === Object || target == null) {\n this.throwError(\"missing new\", Logger3.errors.MISSING_NEW, { name: kind.name });\n }\n };\n Logger3.globalLogger = function() {\n if (!_globalLogger) {\n _globalLogger = new Logger3(_version_1.version);\n }\n return _globalLogger;\n };\n Logger3.setCensorship = function(censorship, permanent) {\n if (!censorship && permanent) {\n this.globalLogger().throwError(\"cannot permanently disable censorship\", Logger3.errors.UNSUPPORTED_OPERATION, {\n operation: \"setCensorship\"\n });\n }\n if (_permanentCensorErrors) {\n if (!censorship) {\n return;\n }\n this.globalLogger().throwError(\"error censorship permanent\", Logger3.errors.UNSUPPORTED_OPERATION, {\n operation: \"setCensorship\"\n });\n }\n _censorErrors = !!censorship;\n _permanentCensorErrors = !!permanent;\n };\n Logger3.setLogLevel = function(logLevel) {\n var level = LogLevels[logLevel.toLowerCase()];\n if (level == null) {\n Logger3.globalLogger().warn(\"invalid log level - \" + logLevel);\n return;\n }\n _logLevel = level;\n };\n Logger3.from = function(version6) {\n return new Logger3(version6);\n };\n Logger3.errors = ErrorCode;\n Logger3.levels = LogLevel2;\n return Logger3;\n }()\n );\n exports3.Logger = Logger2;\n }\n });\n\n // ../../../node_modules/.pnpm/@ethersproject+bytes@5.8.0/node_modules/@ethersproject/bytes/lib/_version.js\n var require_version2 = __commonJS({\n \"../../../node_modules/.pnpm/@ethersproject+bytes@5.8.0/node_modules/@ethersproject/bytes/lib/_version.js\"(exports3) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n Object.defineProperty(exports3, \"__esModule\", { value: true });\n exports3.version = void 0;\n exports3.version = \"bytes/5.8.0\";\n }\n });\n\n // ../../../node_modules/.pnpm/@ethersproject+bytes@5.8.0/node_modules/@ethersproject/bytes/lib/index.js\n var require_lib2 = __commonJS({\n \"../../../node_modules/.pnpm/@ethersproject+bytes@5.8.0/node_modules/@ethersproject/bytes/lib/index.js\"(exports3) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n Object.defineProperty(exports3, \"__esModule\", { value: true });\n exports3.joinSignature = exports3.splitSignature = exports3.hexZeroPad = exports3.hexStripZeros = exports3.hexValue = exports3.hexConcat = exports3.hexDataSlice = exports3.hexDataLength = exports3.hexlify = exports3.isHexString = exports3.zeroPad = exports3.stripZeros = exports3.concat = exports3.arrayify = exports3.isBytes = exports3.isBytesLike = void 0;\n var logger_1 = require_lib();\n var _version_1 = require_version2();\n var logger = new logger_1.Logger(_version_1.version);\n function isHexable(value) {\n return !!value.toHexString;\n }\n function addSlice(array2) {\n if (array2.slice) {\n return array2;\n }\n array2.slice = function() {\n var args = Array.prototype.slice.call(arguments);\n return addSlice(new Uint8Array(Array.prototype.slice.apply(array2, args)));\n };\n return array2;\n }\n function isBytesLike(value) {\n return isHexString(value) && !(value.length % 2) || isBytes6(value);\n }\n exports3.isBytesLike = isBytesLike;\n function isInteger(value) {\n return typeof value === \"number\" && value == value && value % 1 === 0;\n }\n function isBytes6(value) {\n if (value == null) {\n return false;\n }\n if (value.constructor === Uint8Array) {\n return true;\n }\n if (typeof value === \"string\") {\n return false;\n }\n if (!isInteger(value.length) || value.length < 0) {\n return false;\n }\n for (var i3 = 0; i3 < value.length; i3++) {\n var v2 = value[i3];\n if (!isInteger(v2) || v2 < 0 || v2 >= 256) {\n return false;\n }\n }\n return true;\n }\n exports3.isBytes = isBytes6;\n function arrayify(value, options) {\n if (!options) {\n options = {};\n }\n if (typeof value === \"number\") {\n logger.checkSafeUint53(value, \"invalid arrayify value\");\n var result = [];\n while (value) {\n result.unshift(value & 255);\n value = parseInt(String(value / 256));\n }\n if (result.length === 0) {\n result.push(0);\n }\n return addSlice(new Uint8Array(result));\n }\n if (options.allowMissingPrefix && typeof value === \"string\" && value.substring(0, 2) !== \"0x\") {\n value = \"0x\" + value;\n }\n if (isHexable(value)) {\n value = value.toHexString();\n }\n if (isHexString(value)) {\n var hex = value.substring(2);\n if (hex.length % 2) {\n if (options.hexPad === \"left\") {\n hex = \"0\" + hex;\n } else if (options.hexPad === \"right\") {\n hex += \"0\";\n } else {\n logger.throwArgumentError(\"hex data is odd-length\", \"value\", value);\n }\n }\n var result = [];\n for (var i3 = 0; i3 < hex.length; i3 += 2) {\n result.push(parseInt(hex.substring(i3, i3 + 2), 16));\n }\n return addSlice(new Uint8Array(result));\n }\n if (isBytes6(value)) {\n return addSlice(new Uint8Array(value));\n }\n return logger.throwArgumentError(\"invalid arrayify value\", \"value\", value);\n }\n exports3.arrayify = arrayify;\n function concat5(items) {\n var objects = items.map(function(item) {\n return arrayify(item);\n });\n var length2 = objects.reduce(function(accum, item) {\n return accum + item.length;\n }, 0);\n var result = new Uint8Array(length2);\n objects.reduce(function(offset, object2) {\n result.set(object2, offset);\n return offset + object2.length;\n }, 0);\n return addSlice(result);\n }\n exports3.concat = concat5;\n function stripZeros(value) {\n var result = arrayify(value);\n if (result.length === 0) {\n return result;\n }\n var start = 0;\n while (start < result.length && result[start] === 0) {\n start++;\n }\n if (start) {\n result = result.slice(start);\n }\n return result;\n }\n exports3.stripZeros = stripZeros;\n function zeroPad(value, length2) {\n value = arrayify(value);\n if (value.length > length2) {\n logger.throwArgumentError(\"value out of range\", \"value\", arguments[0]);\n }\n var result = new Uint8Array(length2);\n result.set(value, length2 - value.length);\n return addSlice(result);\n }\n exports3.zeroPad = zeroPad;\n function isHexString(value, length2) {\n if (typeof value !== \"string\" || !value.match(/^0x[0-9A-Fa-f]*$/)) {\n return false;\n }\n if (length2 && value.length !== 2 + 2 * length2) {\n return false;\n }\n return true;\n }\n exports3.isHexString = isHexString;\n var HexCharacters = \"0123456789abcdef\";\n function hexlify(value, options) {\n if (!options) {\n options = {};\n }\n if (typeof value === \"number\") {\n logger.checkSafeUint53(value, \"invalid hexlify value\");\n var hex = \"\";\n while (value) {\n hex = HexCharacters[value & 15] + hex;\n value = Math.floor(value / 16);\n }\n if (hex.length) {\n if (hex.length % 2) {\n hex = \"0\" + hex;\n }\n return \"0x\" + hex;\n }\n return \"0x00\";\n }\n if (typeof value === \"bigint\") {\n value = value.toString(16);\n if (value.length % 2) {\n return \"0x0\" + value;\n }\n return \"0x\" + value;\n }\n if (options.allowMissingPrefix && typeof value === \"string\" && value.substring(0, 2) !== \"0x\") {\n value = \"0x\" + value;\n }\n if (isHexable(value)) {\n return value.toHexString();\n }\n if (isHexString(value)) {\n if (value.length % 2) {\n if (options.hexPad === \"left\") {\n value = \"0x0\" + value.substring(2);\n } else if (options.hexPad === \"right\") {\n value += \"0\";\n } else {\n logger.throwArgumentError(\"hex data is odd-length\", \"value\", value);\n }\n }\n return value.toLowerCase();\n }\n if (isBytes6(value)) {\n var result = \"0x\";\n for (var i3 = 0; i3 < value.length; i3++) {\n var v2 = value[i3];\n result += HexCharacters[(v2 & 240) >> 4] + HexCharacters[v2 & 15];\n }\n return result;\n }\n return logger.throwArgumentError(\"invalid hexlify value\", \"value\", value);\n }\n exports3.hexlify = hexlify;\n function hexDataLength(data) {\n if (typeof data !== \"string\") {\n data = hexlify(data);\n } else if (!isHexString(data) || data.length % 2) {\n return null;\n }\n return (data.length - 2) / 2;\n }\n exports3.hexDataLength = hexDataLength;\n function hexDataSlice(data, offset, endOffset) {\n if (typeof data !== \"string\") {\n data = hexlify(data);\n } else if (!isHexString(data) || data.length % 2) {\n logger.throwArgumentError(\"invalid hexData\", \"value\", data);\n }\n offset = 2 + 2 * offset;\n if (endOffset != null) {\n return \"0x\" + data.substring(offset, 2 + 2 * endOffset);\n }\n return \"0x\" + data.substring(offset);\n }\n exports3.hexDataSlice = hexDataSlice;\n function hexConcat(items) {\n var result = \"0x\";\n items.forEach(function(item) {\n result += hexlify(item).substring(2);\n });\n return result;\n }\n exports3.hexConcat = hexConcat;\n function hexValue(value) {\n var trimmed = hexStripZeros(hexlify(value, { hexPad: \"left\" }));\n if (trimmed === \"0x\") {\n return \"0x0\";\n }\n return trimmed;\n }\n exports3.hexValue = hexValue;\n function hexStripZeros(value) {\n if (typeof value !== \"string\") {\n value = hexlify(value);\n }\n if (!isHexString(value)) {\n logger.throwArgumentError(\"invalid hex string\", \"value\", value);\n }\n value = value.substring(2);\n var offset = 0;\n while (offset < value.length && value[offset] === \"0\") {\n offset++;\n }\n return \"0x\" + value.substring(offset);\n }\n exports3.hexStripZeros = hexStripZeros;\n function hexZeroPad(value, length2) {\n if (typeof value !== \"string\") {\n value = hexlify(value);\n } else if (!isHexString(value)) {\n logger.throwArgumentError(\"invalid hex string\", \"value\", value);\n }\n if (value.length > 2 * length2 + 2) {\n logger.throwArgumentError(\"value out of range\", \"value\", arguments[1]);\n }\n while (value.length < 2 * length2 + 2) {\n value = \"0x0\" + value.substring(2);\n }\n return value;\n }\n exports3.hexZeroPad = hexZeroPad;\n function splitSignature2(signature) {\n var result = {\n r: \"0x\",\n s: \"0x\",\n _vs: \"0x\",\n recoveryParam: 0,\n v: 0,\n yParityAndS: \"0x\",\n compact: \"0x\"\n };\n if (isBytesLike(signature)) {\n var bytes = arrayify(signature);\n if (bytes.length === 64) {\n result.v = 27 + (bytes[32] >> 7);\n bytes[32] &= 127;\n result.r = hexlify(bytes.slice(0, 32));\n result.s = hexlify(bytes.slice(32, 64));\n } else if (bytes.length === 65) {\n result.r = hexlify(bytes.slice(0, 32));\n result.s = hexlify(bytes.slice(32, 64));\n result.v = bytes[64];\n } else {\n logger.throwArgumentError(\"invalid signature string\", \"signature\", signature);\n }\n if (result.v < 27) {\n if (result.v === 0 || result.v === 1) {\n result.v += 27;\n } else {\n logger.throwArgumentError(\"signature invalid v byte\", \"signature\", signature);\n }\n }\n result.recoveryParam = 1 - result.v % 2;\n if (result.recoveryParam) {\n bytes[32] |= 128;\n }\n result._vs = hexlify(bytes.slice(32, 64));\n } else {\n result.r = signature.r;\n result.s = signature.s;\n result.v = signature.v;\n result.recoveryParam = signature.recoveryParam;\n result._vs = signature._vs;\n if (result._vs != null) {\n var vs_1 = zeroPad(arrayify(result._vs), 32);\n result._vs = hexlify(vs_1);\n var recoveryParam = vs_1[0] >= 128 ? 1 : 0;\n if (result.recoveryParam == null) {\n result.recoveryParam = recoveryParam;\n } else if (result.recoveryParam !== recoveryParam) {\n logger.throwArgumentError(\"signature recoveryParam mismatch _vs\", \"signature\", signature);\n }\n vs_1[0] &= 127;\n var s4 = hexlify(vs_1);\n if (result.s == null) {\n result.s = s4;\n } else if (result.s !== s4) {\n logger.throwArgumentError(\"signature v mismatch _vs\", \"signature\", signature);\n }\n }\n if (result.recoveryParam == null) {\n if (result.v == null) {\n logger.throwArgumentError(\"signature missing v and recoveryParam\", \"signature\", signature);\n } else if (result.v === 0 || result.v === 1) {\n result.recoveryParam = result.v;\n } else {\n result.recoveryParam = 1 - result.v % 2;\n }\n } else {\n if (result.v == null) {\n result.v = 27 + result.recoveryParam;\n } else {\n var recId = result.v === 0 || result.v === 1 ? result.v : 1 - result.v % 2;\n if (result.recoveryParam !== recId) {\n logger.throwArgumentError(\"signature recoveryParam mismatch v\", \"signature\", signature);\n }\n }\n }\n if (result.r == null || !isHexString(result.r)) {\n logger.throwArgumentError(\"signature missing or invalid r\", \"signature\", signature);\n } else {\n result.r = hexZeroPad(result.r, 32);\n }\n if (result.s == null || !isHexString(result.s)) {\n logger.throwArgumentError(\"signature missing or invalid s\", \"signature\", signature);\n } else {\n result.s = hexZeroPad(result.s, 32);\n }\n var vs = arrayify(result.s);\n if (vs[0] >= 128) {\n logger.throwArgumentError(\"signature s out of range\", \"signature\", signature);\n }\n if (result.recoveryParam) {\n vs[0] |= 128;\n }\n var _vs = hexlify(vs);\n if (result._vs) {\n if (!isHexString(result._vs)) {\n logger.throwArgumentError(\"signature invalid _vs\", \"signature\", signature);\n }\n result._vs = hexZeroPad(result._vs, 32);\n }\n if (result._vs == null) {\n result._vs = _vs;\n } else if (result._vs !== _vs) {\n logger.throwArgumentError(\"signature _vs mismatch v and s\", \"signature\", signature);\n }\n }\n result.yParityAndS = result._vs;\n result.compact = result.r + result.yParityAndS.substring(2);\n return result;\n }\n exports3.splitSignature = splitSignature2;\n function joinSignature(signature) {\n signature = splitSignature2(signature);\n return hexlify(concat5([\n signature.r,\n signature.s,\n signature.recoveryParam ? \"0x1c\" : \"0x1b\"\n ]));\n }\n exports3.joinSignature = joinSignature;\n }\n });\n\n // ../../../node_modules/.pnpm/@ethersproject+bignumber@5.8.0/node_modules/@ethersproject/bignumber/lib/_version.js\n var require_version3 = __commonJS({\n \"../../../node_modules/.pnpm/@ethersproject+bignumber@5.8.0/node_modules/@ethersproject/bignumber/lib/_version.js\"(exports3) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n Object.defineProperty(exports3, \"__esModule\", { value: true });\n exports3.version = void 0;\n exports3.version = \"bignumber/5.8.0\";\n }\n });\n\n // ../../../node_modules/.pnpm/@ethersproject+bignumber@5.8.0/node_modules/@ethersproject/bignumber/lib/bignumber.js\n var require_bignumber = __commonJS({\n \"../../../node_modules/.pnpm/@ethersproject+bignumber@5.8.0/node_modules/@ethersproject/bignumber/lib/bignumber.js\"(exports3) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n var __importDefault3 = exports3 && exports3.__importDefault || function(mod3) {\n return mod3 && mod3.__esModule ? mod3 : { \"default\": mod3 };\n };\n Object.defineProperty(exports3, \"__esModule\", { value: true });\n exports3._base16To36 = exports3._base36To16 = exports3.BigNumber = exports3.isBigNumberish = void 0;\n var bn_js_1 = __importDefault3(require_bn());\n var BN = bn_js_1.default.BN;\n var bytes_1 = require_lib2();\n var logger_1 = require_lib();\n var _version_1 = require_version3();\n var logger = new logger_1.Logger(_version_1.version);\n var _constructorGuard = {};\n var MAX_SAFE = 9007199254740991;\n function isBigNumberish2(value) {\n return value != null && (BigNumber.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));\n }\n exports3.isBigNumberish = isBigNumberish2;\n var _warnedToStringRadix = false;\n var BigNumber = (\n /** @class */\n function() {\n function BigNumber2(constructorGuard, hex) {\n if (constructorGuard !== _constructorGuard) {\n logger.throwError(\"cannot call constructor directly; use BigNumber.from\", logger_1.Logger.errors.UNSUPPORTED_OPERATION, {\n operation: \"new (BigNumber)\"\n });\n }\n this._hex = hex;\n this._isBigNumber = true;\n Object.freeze(this);\n }\n BigNumber2.prototype.fromTwos = function(value) {\n return toBigNumber(toBN(this).fromTwos(value));\n };\n BigNumber2.prototype.toTwos = function(value) {\n return toBigNumber(toBN(this).toTwos(value));\n };\n BigNumber2.prototype.abs = function() {\n if (this._hex[0] === \"-\") {\n return BigNumber2.from(this._hex.substring(1));\n }\n return this;\n };\n BigNumber2.prototype.add = function(other) {\n return toBigNumber(toBN(this).add(toBN(other)));\n };\n BigNumber2.prototype.sub = function(other) {\n return toBigNumber(toBN(this).sub(toBN(other)));\n };\n BigNumber2.prototype.div = function(other) {\n var o5 = BigNumber2.from(other);\n if (o5.isZero()) {\n throwFault(\"division-by-zero\", \"div\");\n }\n return toBigNumber(toBN(this).div(toBN(other)));\n };\n BigNumber2.prototype.mul = function(other) {\n return toBigNumber(toBN(this).mul(toBN(other)));\n };\n BigNumber2.prototype.mod = function(other) {\n var value = toBN(other);\n if (value.isNeg()) {\n throwFault(\"division-by-zero\", \"mod\");\n }\n return toBigNumber(toBN(this).umod(value));\n };\n BigNumber2.prototype.pow = function(other) {\n var value = toBN(other);\n if (value.isNeg()) {\n throwFault(\"negative-power\", \"pow\");\n }\n return toBigNumber(toBN(this).pow(value));\n };\n BigNumber2.prototype.and = function(other) {\n var value = toBN(other);\n if (this.isNegative() || value.isNeg()) {\n throwFault(\"unbound-bitwise-result\", \"and\");\n }\n return toBigNumber(toBN(this).and(value));\n };\n BigNumber2.prototype.or = function(other) {\n var value = toBN(other);\n if (this.isNegative() || value.isNeg()) {\n throwFault(\"unbound-bitwise-result\", \"or\");\n }\n return toBigNumber(toBN(this).or(value));\n };\n BigNumber2.prototype.xor = function(other) {\n var value = toBN(other);\n if (this.isNegative() || value.isNeg()) {\n throwFault(\"unbound-bitwise-result\", \"xor\");\n }\n return toBigNumber(toBN(this).xor(value));\n };\n BigNumber2.prototype.mask = function(value) {\n if (this.isNegative() || value < 0) {\n throwFault(\"negative-width\", \"mask\");\n }\n return toBigNumber(toBN(this).maskn(value));\n };\n BigNumber2.prototype.shl = function(value) {\n if (this.isNegative() || value < 0) {\n throwFault(\"negative-width\", \"shl\");\n }\n return toBigNumber(toBN(this).shln(value));\n };\n BigNumber2.prototype.shr = function(value) {\n if (this.isNegative() || value < 0) {\n throwFault(\"negative-width\", \"shr\");\n }\n return toBigNumber(toBN(this).shrn(value));\n };\n BigNumber2.prototype.eq = function(other) {\n return toBN(this).eq(toBN(other));\n };\n BigNumber2.prototype.lt = function(other) {\n return toBN(this).lt(toBN(other));\n };\n BigNumber2.prototype.lte = function(other) {\n return toBN(this).lte(toBN(other));\n };\n BigNumber2.prototype.gt = function(other) {\n return toBN(this).gt(toBN(other));\n };\n BigNumber2.prototype.gte = function(other) {\n return toBN(this).gte(toBN(other));\n };\n BigNumber2.prototype.isNegative = function() {\n return this._hex[0] === \"-\";\n };\n BigNumber2.prototype.isZero = function() {\n return toBN(this).isZero();\n };\n BigNumber2.prototype.toNumber = function() {\n try {\n return toBN(this).toNumber();\n } catch (error) {\n throwFault(\"overflow\", \"toNumber\", this.toString());\n }\n return null;\n };\n BigNumber2.prototype.toBigInt = function() {\n try {\n return BigInt(this.toString());\n } catch (e3) {\n }\n return logger.throwError(\"this platform does not support BigInt\", logger_1.Logger.errors.UNSUPPORTED_OPERATION, {\n value: this.toString()\n });\n };\n BigNumber2.prototype.toString = function() {\n if (arguments.length > 0) {\n if (arguments[0] === 10) {\n if (!_warnedToStringRadix) {\n _warnedToStringRadix = true;\n logger.warn(\"BigNumber.toString does not accept any parameters; base-10 is assumed\");\n }\n } else if (arguments[0] === 16) {\n logger.throwError(\"BigNumber.toString does not accept any parameters; use bigNumber.toHexString()\", logger_1.Logger.errors.UNEXPECTED_ARGUMENT, {});\n } else {\n logger.throwError(\"BigNumber.toString does not accept parameters\", logger_1.Logger.errors.UNEXPECTED_ARGUMENT, {});\n }\n }\n return toBN(this).toString(10);\n };\n BigNumber2.prototype.toHexString = function() {\n return this._hex;\n };\n BigNumber2.prototype.toJSON = function(key) {\n return { type: \"BigNumber\", hex: this.toHexString() };\n };\n BigNumber2.from = function(value) {\n if (value instanceof BigNumber2) {\n return value;\n }\n if (typeof value === \"string\") {\n if (value.match(/^-?0x[0-9a-f]+$/i)) {\n return new BigNumber2(_constructorGuard, toHex3(value));\n }\n if (value.match(/^-?[0-9]+$/)) {\n return new BigNumber2(_constructorGuard, toHex3(new BN(value)));\n }\n return logger.throwArgumentError(\"invalid BigNumber string\", \"value\", value);\n }\n if (typeof value === \"number\") {\n if (value % 1) {\n throwFault(\"underflow\", \"BigNumber.from\", value);\n }\n if (value >= MAX_SAFE || value <= -MAX_SAFE) {\n throwFault(\"overflow\", \"BigNumber.from\", value);\n }\n return BigNumber2.from(String(value));\n }\n var anyValue = value;\n if (typeof anyValue === \"bigint\") {\n return BigNumber2.from(anyValue.toString());\n }\n if ((0, bytes_1.isBytes)(anyValue)) {\n return BigNumber2.from((0, bytes_1.hexlify)(anyValue));\n }\n if (anyValue) {\n if (anyValue.toHexString) {\n var hex = anyValue.toHexString();\n if (typeof hex === \"string\") {\n return BigNumber2.from(hex);\n }\n } else {\n var hex = anyValue._hex;\n if (hex == null && anyValue.type === \"BigNumber\") {\n hex = anyValue.hex;\n }\n if (typeof hex === \"string\") {\n if ((0, bytes_1.isHexString)(hex) || hex[0] === \"-\" && (0, bytes_1.isHexString)(hex.substring(1))) {\n return BigNumber2.from(hex);\n }\n }\n }\n }\n return logger.throwArgumentError(\"invalid BigNumber value\", \"value\", value);\n };\n BigNumber2.isBigNumber = function(value) {\n return !!(value && value._isBigNumber);\n };\n return BigNumber2;\n }()\n );\n exports3.BigNumber = BigNumber;\n function toHex3(value) {\n if (typeof value !== \"string\") {\n return toHex3(value.toString(16));\n }\n if (value[0] === \"-\") {\n value = value.substring(1);\n if (value[0] === \"-\") {\n logger.throwArgumentError(\"invalid hex\", \"value\", value);\n }\n value = toHex3(value);\n if (value === \"0x00\") {\n return value;\n }\n return \"-\" + value;\n }\n if (value.substring(0, 2) !== \"0x\") {\n value = \"0x\" + value;\n }\n if (value === \"0x\") {\n return \"0x00\";\n }\n if (value.length % 2) {\n value = \"0x0\" + value.substring(2);\n }\n while (value.length > 4 && value.substring(0, 4) === \"0x00\") {\n value = \"0x\" + value.substring(4);\n }\n return value;\n }\n function toBigNumber(value) {\n return BigNumber.from(toHex3(value));\n }\n function toBN(value) {\n var hex = BigNumber.from(value).toHexString();\n if (hex[0] === \"-\") {\n return new BN(\"-\" + hex.substring(3), 16);\n }\n return new BN(hex.substring(2), 16);\n }\n function throwFault(fault, operation, value) {\n var params = { fault, operation };\n if (value != null) {\n params.value = value;\n }\n return logger.throwError(fault, logger_1.Logger.errors.NUMERIC_FAULT, params);\n }\n function _base36To16(value) {\n return new BN(value, 36).toString(16);\n }\n exports3._base36To16 = _base36To16;\n function _base16To36(value) {\n return new BN(value, 16).toString(36);\n }\n exports3._base16To36 = _base16To36;\n }\n });\n\n // ../../../node_modules/.pnpm/@ethersproject+bignumber@5.8.0/node_modules/@ethersproject/bignumber/lib/fixednumber.js\n var require_fixednumber = __commonJS({\n \"../../../node_modules/.pnpm/@ethersproject+bignumber@5.8.0/node_modules/@ethersproject/bignumber/lib/fixednumber.js\"(exports3) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n Object.defineProperty(exports3, \"__esModule\", { value: true });\n exports3.FixedNumber = exports3.FixedFormat = exports3.parseFixed = exports3.formatFixed = void 0;\n var bytes_1 = require_lib2();\n var logger_1 = require_lib();\n var _version_1 = require_version3();\n var logger = new logger_1.Logger(_version_1.version);\n var bignumber_1 = require_bignumber();\n var _constructorGuard = {};\n var Zero = bignumber_1.BigNumber.from(0);\n var NegativeOne = bignumber_1.BigNumber.from(-1);\n function throwFault(message, fault, operation, value) {\n var params = { fault, operation };\n if (value !== void 0) {\n params.value = value;\n }\n return logger.throwError(message, logger_1.Logger.errors.NUMERIC_FAULT, params);\n }\n var zeros = \"0\";\n while (zeros.length < 256) {\n zeros += zeros;\n }\n function getMultiplier(decimals) {\n if (typeof decimals !== \"number\") {\n try {\n decimals = bignumber_1.BigNumber.from(decimals).toNumber();\n } catch (e3) {\n }\n }\n if (typeof decimals === \"number\" && decimals >= 0 && decimals <= 256 && !(decimals % 1)) {\n return \"1\" + zeros.substring(0, decimals);\n }\n return logger.throwArgumentError(\"invalid decimal size\", \"decimals\", decimals);\n }\n function formatFixed(value, decimals) {\n if (decimals == null) {\n decimals = 0;\n }\n var multiplier = getMultiplier(decimals);\n value = bignumber_1.BigNumber.from(value);\n var negative = value.lt(Zero);\n if (negative) {\n value = value.mul(NegativeOne);\n }\n var fraction = value.mod(multiplier).toString();\n while (fraction.length < multiplier.length - 1) {\n fraction = \"0\" + fraction;\n }\n fraction = fraction.match(/^([0-9]*[1-9]|0)(0*)/)[1];\n var whole = value.div(multiplier).toString();\n if (multiplier.length === 1) {\n value = whole;\n } else {\n value = whole + \".\" + fraction;\n }\n if (negative) {\n value = \"-\" + value;\n }\n return value;\n }\n exports3.formatFixed = formatFixed;\n function parseFixed(value, decimals) {\n if (decimals == null) {\n decimals = 0;\n }\n var multiplier = getMultiplier(decimals);\n if (typeof value !== \"string\" || !value.match(/^-?[0-9.]+$/)) {\n logger.throwArgumentError(\"invalid decimal value\", \"value\", value);\n }\n var negative = value.substring(0, 1) === \"-\";\n if (negative) {\n value = value.substring(1);\n }\n if (value === \".\") {\n logger.throwArgumentError(\"missing value\", \"value\", value);\n }\n var comps = value.split(\".\");\n if (comps.length > 2) {\n logger.throwArgumentError(\"too many decimal points\", \"value\", value);\n }\n var whole = comps[0], fraction = comps[1];\n if (!whole) {\n whole = \"0\";\n }\n if (!fraction) {\n fraction = \"0\";\n }\n while (fraction[fraction.length - 1] === \"0\") {\n fraction = fraction.substring(0, fraction.length - 1);\n }\n if (fraction.length > multiplier.length - 1) {\n throwFault(\"fractional component exceeds decimals\", \"underflow\", \"parseFixed\");\n }\n if (fraction === \"\") {\n fraction = \"0\";\n }\n while (fraction.length < multiplier.length - 1) {\n fraction += \"0\";\n }\n var wholeValue = bignumber_1.BigNumber.from(whole);\n var fractionValue = bignumber_1.BigNumber.from(fraction);\n var wei = wholeValue.mul(multiplier).add(fractionValue);\n if (negative) {\n wei = wei.mul(NegativeOne);\n }\n return wei;\n }\n exports3.parseFixed = parseFixed;\n var FixedFormat = (\n /** @class */\n function() {\n function FixedFormat2(constructorGuard, signed, width, decimals) {\n if (constructorGuard !== _constructorGuard) {\n logger.throwError(\"cannot use FixedFormat constructor; use FixedFormat.from\", logger_1.Logger.errors.UNSUPPORTED_OPERATION, {\n operation: \"new FixedFormat\"\n });\n }\n this.signed = signed;\n this.width = width;\n this.decimals = decimals;\n this.name = (signed ? \"\" : \"u\") + \"fixed\" + String(width) + \"x\" + String(decimals);\n this._multiplier = getMultiplier(decimals);\n Object.freeze(this);\n }\n FixedFormat2.from = function(value) {\n if (value instanceof FixedFormat2) {\n return value;\n }\n if (typeof value === \"number\") {\n value = \"fixed128x\" + value;\n }\n var signed = true;\n var width = 128;\n var decimals = 18;\n if (typeof value === \"string\") {\n if (value === \"fixed\") {\n } else if (value === \"ufixed\") {\n signed = false;\n } else {\n var match = value.match(/^(u?)fixed([0-9]+)x([0-9]+)$/);\n if (!match) {\n logger.throwArgumentError(\"invalid fixed format\", \"format\", value);\n }\n signed = match[1] !== \"u\";\n width = parseInt(match[2]);\n decimals = parseInt(match[3]);\n }\n } else if (value) {\n var check = function(key, type, defaultValue) {\n if (value[key] == null) {\n return defaultValue;\n }\n if (typeof value[key] !== type) {\n logger.throwArgumentError(\"invalid fixed format (\" + key + \" not \" + type + \")\", \"format.\" + key, value[key]);\n }\n return value[key];\n };\n signed = check(\"signed\", \"boolean\", signed);\n width = check(\"width\", \"number\", width);\n decimals = check(\"decimals\", \"number\", decimals);\n }\n if (width % 8) {\n logger.throwArgumentError(\"invalid fixed format width (not byte aligned)\", \"format.width\", width);\n }\n if (decimals > 80) {\n logger.throwArgumentError(\"invalid fixed format (decimals too large)\", \"format.decimals\", decimals);\n }\n return new FixedFormat2(_constructorGuard, signed, width, decimals);\n };\n return FixedFormat2;\n }()\n );\n exports3.FixedFormat = FixedFormat;\n var FixedNumber = (\n /** @class */\n function() {\n function FixedNumber2(constructorGuard, hex, value, format) {\n if (constructorGuard !== _constructorGuard) {\n logger.throwError(\"cannot use FixedNumber constructor; use FixedNumber.from\", logger_1.Logger.errors.UNSUPPORTED_OPERATION, {\n operation: \"new FixedFormat\"\n });\n }\n this.format = format;\n this._hex = hex;\n this._value = value;\n this._isFixedNumber = true;\n Object.freeze(this);\n }\n FixedNumber2.prototype._checkFormat = function(other) {\n if (this.format.name !== other.format.name) {\n logger.throwArgumentError(\"incompatible format; use fixedNumber.toFormat\", \"other\", other);\n }\n };\n FixedNumber2.prototype.addUnsafe = function(other) {\n this._checkFormat(other);\n var a3 = parseFixed(this._value, this.format.decimals);\n var b4 = parseFixed(other._value, other.format.decimals);\n return FixedNumber2.fromValue(a3.add(b4), this.format.decimals, this.format);\n };\n FixedNumber2.prototype.subUnsafe = function(other) {\n this._checkFormat(other);\n var a3 = parseFixed(this._value, this.format.decimals);\n var b4 = parseFixed(other._value, other.format.decimals);\n return FixedNumber2.fromValue(a3.sub(b4), this.format.decimals, this.format);\n };\n FixedNumber2.prototype.mulUnsafe = function(other) {\n this._checkFormat(other);\n var a3 = parseFixed(this._value, this.format.decimals);\n var b4 = parseFixed(other._value, other.format.decimals);\n return FixedNumber2.fromValue(a3.mul(b4).div(this.format._multiplier), this.format.decimals, this.format);\n };\n FixedNumber2.prototype.divUnsafe = function(other) {\n this._checkFormat(other);\n var a3 = parseFixed(this._value, this.format.decimals);\n var b4 = parseFixed(other._value, other.format.decimals);\n return FixedNumber2.fromValue(a3.mul(this.format._multiplier).div(b4), this.format.decimals, this.format);\n };\n FixedNumber2.prototype.floor = function() {\n var comps = this.toString().split(\".\");\n if (comps.length === 1) {\n comps.push(\"0\");\n }\n var result = FixedNumber2.from(comps[0], this.format);\n var hasFraction = !comps[1].match(/^(0*)$/);\n if (this.isNegative() && hasFraction) {\n result = result.subUnsafe(ONE.toFormat(result.format));\n }\n return result;\n };\n FixedNumber2.prototype.ceiling = function() {\n var comps = this.toString().split(\".\");\n if (comps.length === 1) {\n comps.push(\"0\");\n }\n var result = FixedNumber2.from(comps[0], this.format);\n var hasFraction = !comps[1].match(/^(0*)$/);\n if (!this.isNegative() && hasFraction) {\n result = result.addUnsafe(ONE.toFormat(result.format));\n }\n return result;\n };\n FixedNumber2.prototype.round = function(decimals) {\n if (decimals == null) {\n decimals = 0;\n }\n var comps = this.toString().split(\".\");\n if (comps.length === 1) {\n comps.push(\"0\");\n }\n if (decimals < 0 || decimals > 80 || decimals % 1) {\n logger.throwArgumentError(\"invalid decimal count\", \"decimals\", decimals);\n }\n if (comps[1].length <= decimals) {\n return this;\n }\n var factor = FixedNumber2.from(\"1\" + zeros.substring(0, decimals), this.format);\n var bump = BUMP.toFormat(this.format);\n return this.mulUnsafe(factor).addUnsafe(bump).floor().divUnsafe(factor);\n };\n FixedNumber2.prototype.isZero = function() {\n return this._value === \"0.0\" || this._value === \"0\";\n };\n FixedNumber2.prototype.isNegative = function() {\n return this._value[0] === \"-\";\n };\n FixedNumber2.prototype.toString = function() {\n return this._value;\n };\n FixedNumber2.prototype.toHexString = function(width) {\n if (width == null) {\n return this._hex;\n }\n if (width % 8) {\n logger.throwArgumentError(\"invalid byte width\", \"width\", width);\n }\n var hex = bignumber_1.BigNumber.from(this._hex).fromTwos(this.format.width).toTwos(width).toHexString();\n return (0, bytes_1.hexZeroPad)(hex, width / 8);\n };\n FixedNumber2.prototype.toUnsafeFloat = function() {\n return parseFloat(this.toString());\n };\n FixedNumber2.prototype.toFormat = function(format) {\n return FixedNumber2.fromString(this._value, format);\n };\n FixedNumber2.fromValue = function(value, decimals, format) {\n if (format == null && decimals != null && !(0, bignumber_1.isBigNumberish)(decimals)) {\n format = decimals;\n decimals = null;\n }\n if (decimals == null) {\n decimals = 0;\n }\n if (format == null) {\n format = \"fixed\";\n }\n return FixedNumber2.fromString(formatFixed(value, decimals), FixedFormat.from(format));\n };\n FixedNumber2.fromString = function(value, format) {\n if (format == null) {\n format = \"fixed\";\n }\n var fixedFormat = FixedFormat.from(format);\n var numeric = parseFixed(value, fixedFormat.decimals);\n if (!fixedFormat.signed && numeric.lt(Zero)) {\n throwFault(\"unsigned value cannot be negative\", \"overflow\", \"value\", value);\n }\n var hex = null;\n if (fixedFormat.signed) {\n hex = numeric.toTwos(fixedFormat.width).toHexString();\n } else {\n hex = numeric.toHexString();\n hex = (0, bytes_1.hexZeroPad)(hex, fixedFormat.width / 8);\n }\n var decimal = formatFixed(numeric, fixedFormat.decimals);\n return new FixedNumber2(_constructorGuard, hex, decimal, fixedFormat);\n };\n FixedNumber2.fromBytes = function(value, format) {\n if (format == null) {\n format = \"fixed\";\n }\n var fixedFormat = FixedFormat.from(format);\n if ((0, bytes_1.arrayify)(value).length > fixedFormat.width / 8) {\n throw new Error(\"overflow\");\n }\n var numeric = bignumber_1.BigNumber.from(value);\n if (fixedFormat.signed) {\n numeric = numeric.fromTwos(fixedFormat.width);\n }\n var hex = numeric.toTwos((fixedFormat.signed ? 0 : 1) + fixedFormat.width).toHexString();\n var decimal = formatFixed(numeric, fixedFormat.decimals);\n return new FixedNumber2(_constructorGuard, hex, decimal, fixedFormat);\n };\n FixedNumber2.from = function(value, format) {\n if (typeof value === \"string\") {\n return FixedNumber2.fromString(value, format);\n }\n if ((0, bytes_1.isBytes)(value)) {\n return FixedNumber2.fromBytes(value, format);\n }\n try {\n return FixedNumber2.fromValue(value, 0, format);\n } catch (error) {\n if (error.code !== logger_1.Logger.errors.INVALID_ARGUMENT) {\n throw error;\n }\n }\n return logger.throwArgumentError(\"invalid FixedNumber value\", \"value\", value);\n };\n FixedNumber2.isFixedNumber = function(value) {\n return !!(value && value._isFixedNumber);\n };\n return FixedNumber2;\n }()\n );\n exports3.FixedNumber = FixedNumber;\n var ONE = FixedNumber.from(1);\n var BUMP = FixedNumber.from(\"0.5\");\n }\n });\n\n // ../../../node_modules/.pnpm/@ethersproject+bignumber@5.8.0/node_modules/@ethersproject/bignumber/lib/index.js\n var require_lib3 = __commonJS({\n \"../../../node_modules/.pnpm/@ethersproject+bignumber@5.8.0/node_modules/@ethersproject/bignumber/lib/index.js\"(exports3) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n Object.defineProperty(exports3, \"__esModule\", { value: true });\n exports3._base36To16 = exports3._base16To36 = exports3.parseFixed = exports3.FixedNumber = exports3.FixedFormat = exports3.formatFixed = exports3.BigNumber = void 0;\n var bignumber_1 = require_bignumber();\n Object.defineProperty(exports3, \"BigNumber\", { enumerable: true, get: function() {\n return bignumber_1.BigNumber;\n } });\n var fixednumber_1 = require_fixednumber();\n Object.defineProperty(exports3, \"formatFixed\", { enumerable: true, get: function() {\n return fixednumber_1.formatFixed;\n } });\n Object.defineProperty(exports3, \"FixedFormat\", { enumerable: true, get: function() {\n return fixednumber_1.FixedFormat;\n } });\n Object.defineProperty(exports3, \"FixedNumber\", { enumerable: true, get: function() {\n return fixednumber_1.FixedNumber;\n } });\n Object.defineProperty(exports3, \"parseFixed\", { enumerable: true, get: function() {\n return fixednumber_1.parseFixed;\n } });\n var bignumber_2 = require_bignumber();\n Object.defineProperty(exports3, \"_base16To36\", { enumerable: true, get: function() {\n return bignumber_2._base16To36;\n } });\n Object.defineProperty(exports3, \"_base36To16\", { enumerable: true, get: function() {\n return bignumber_2._base36To16;\n } });\n }\n });\n\n // ../../../node_modules/.pnpm/@ethersproject+properties@5.8.0/node_modules/@ethersproject/properties/lib/_version.js\n var require_version4 = __commonJS({\n \"../../../node_modules/.pnpm/@ethersproject+properties@5.8.0/node_modules/@ethersproject/properties/lib/_version.js\"(exports3) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n Object.defineProperty(exports3, \"__esModule\", { value: true });\n exports3.version = void 0;\n exports3.version = \"properties/5.8.0\";\n }\n });\n\n // ../../../node_modules/.pnpm/@ethersproject+properties@5.8.0/node_modules/@ethersproject/properties/lib/index.js\n var require_lib4 = __commonJS({\n \"../../../node_modules/.pnpm/@ethersproject+properties@5.8.0/node_modules/@ethersproject/properties/lib/index.js\"(exports3) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n var __awaiter3 = exports3 && exports3.__awaiter || function(thisArg, _arguments, P2, generator) {\n function adopt(value) {\n return value instanceof P2 ? value : new P2(function(resolve) {\n resolve(value);\n });\n }\n return new (P2 || (P2 = Promise))(function(resolve, reject) {\n function fulfilled(value) {\n try {\n step(generator.next(value));\n } catch (e3) {\n reject(e3);\n }\n }\n function rejected(value) {\n try {\n step(generator[\"throw\"](value));\n } catch (e3) {\n reject(e3);\n }\n }\n function step(result) {\n result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected);\n }\n step((generator = generator.apply(thisArg, _arguments || [])).next());\n });\n };\n var __generator3 = exports3 && exports3.__generator || function(thisArg, body) {\n var _2 = { label: 0, sent: function() {\n if (t3[0] & 1)\n throw t3[1];\n return t3[1];\n }, trys: [], ops: [] }, f6, y6, t3, g4;\n return g4 = { next: verb(0), \"throw\": verb(1), \"return\": verb(2) }, typeof Symbol === \"function\" && (g4[Symbol.iterator] = function() {\n return this;\n }), g4;\n function verb(n2) {\n return function(v2) {\n return step([n2, v2]);\n };\n }\n function step(op) {\n if (f6)\n throw new TypeError(\"Generator is already executing.\");\n while (_2)\n try {\n if (f6 = 1, y6 && (t3 = op[0] & 2 ? y6[\"return\"] : op[0] ? y6[\"throw\"] || ((t3 = y6[\"return\"]) && t3.call(y6), 0) : y6.next) && !(t3 = t3.call(y6, op[1])).done)\n return t3;\n if (y6 = 0, t3)\n op = [op[0] & 2, t3.value];\n switch (op[0]) {\n case 0:\n case 1:\n t3 = op;\n break;\n case 4:\n _2.label++;\n return { value: op[1], done: false };\n case 5:\n _2.label++;\n y6 = op[1];\n op = [0];\n continue;\n case 7:\n op = _2.ops.pop();\n _2.trys.pop();\n continue;\n default:\n if (!(t3 = _2.trys, t3 = t3.length > 0 && t3[t3.length - 1]) && (op[0] === 6 || op[0] === 2)) {\n _2 = 0;\n continue;\n }\n if (op[0] === 3 && (!t3 || op[1] > t3[0] && op[1] < t3[3])) {\n _2.label = op[1];\n break;\n }\n if (op[0] === 6 && _2.label < t3[1]) {\n _2.label = t3[1];\n t3 = op;\n break;\n }\n if (t3 && _2.label < t3[2]) {\n _2.label = t3[2];\n _2.ops.push(op);\n break;\n }\n if (t3[2])\n _2.ops.pop();\n _2.trys.pop();\n continue;\n }\n op = body.call(thisArg, _2);\n } catch (e3) {\n op = [6, e3];\n y6 = 0;\n } finally {\n f6 = t3 = 0;\n }\n if (op[0] & 5)\n throw op[1];\n return { value: op[0] ? op[1] : void 0, done: true };\n }\n };\n Object.defineProperty(exports3, \"__esModule\", { value: true });\n exports3.Description = exports3.deepCopy = exports3.shallowCopy = exports3.checkProperties = exports3.resolveProperties = exports3.getStatic = exports3.defineReadOnly = void 0;\n var logger_1 = require_lib();\n var _version_1 = require_version4();\n var logger = new logger_1.Logger(_version_1.version);\n function defineReadOnly(object2, name, value) {\n Object.defineProperty(object2, name, {\n enumerable: true,\n value,\n writable: false\n });\n }\n exports3.defineReadOnly = defineReadOnly;\n function getStatic(ctor, key) {\n for (var i3 = 0; i3 < 32; i3++) {\n if (ctor[key]) {\n return ctor[key];\n }\n if (!ctor.prototype || typeof ctor.prototype !== \"object\") {\n break;\n }\n ctor = Object.getPrototypeOf(ctor.prototype).constructor;\n }\n return null;\n }\n exports3.getStatic = getStatic;\n function resolveProperties2(object2) {\n return __awaiter3(this, void 0, void 0, function() {\n var promises, results;\n return __generator3(this, function(_a) {\n switch (_a.label) {\n case 0:\n promises = Object.keys(object2).map(function(key) {\n var value = object2[key];\n return Promise.resolve(value).then(function(v2) {\n return { key, value: v2 };\n });\n });\n return [4, Promise.all(promises)];\n case 1:\n results = _a.sent();\n return [2, results.reduce(function(accum, result) {\n accum[result.key] = result.value;\n return accum;\n }, {})];\n }\n });\n });\n }\n exports3.resolveProperties = resolveProperties2;\n function checkProperties(object2, properties) {\n if (!object2 || typeof object2 !== \"object\") {\n logger.throwArgumentError(\"invalid object\", \"object\", object2);\n }\n Object.keys(object2).forEach(function(key) {\n if (!properties[key]) {\n logger.throwArgumentError(\"invalid object key - \" + key, \"transaction:\" + key, object2);\n }\n });\n }\n exports3.checkProperties = checkProperties;\n function shallowCopy(object2) {\n var result = {};\n for (var key in object2) {\n result[key] = object2[key];\n }\n return result;\n }\n exports3.shallowCopy = shallowCopy;\n var opaque = { bigint: true, boolean: true, \"function\": true, number: true, string: true };\n function _isFrozen(object2) {\n if (object2 === void 0 || object2 === null || opaque[typeof object2]) {\n return true;\n }\n if (Array.isArray(object2) || typeof object2 === \"object\") {\n if (!Object.isFrozen(object2)) {\n return false;\n }\n var keys = Object.keys(object2);\n for (var i3 = 0; i3 < keys.length; i3++) {\n var value = null;\n try {\n value = object2[keys[i3]];\n } catch (error) {\n continue;\n }\n if (!_isFrozen(value)) {\n return false;\n }\n }\n return true;\n }\n return logger.throwArgumentError(\"Cannot deepCopy \" + typeof object2, \"object\", object2);\n }\n function _deepCopy(object2) {\n if (_isFrozen(object2)) {\n return object2;\n }\n if (Array.isArray(object2)) {\n return Object.freeze(object2.map(function(item) {\n return deepCopy(item);\n }));\n }\n if (typeof object2 === \"object\") {\n var result = {};\n for (var key in object2) {\n var value = object2[key];\n if (value === void 0) {\n continue;\n }\n defineReadOnly(result, key, deepCopy(value));\n }\n return result;\n }\n return logger.throwArgumentError(\"Cannot deepCopy \" + typeof object2, \"object\", object2);\n }\n function deepCopy(object2) {\n return _deepCopy(object2);\n }\n exports3.deepCopy = deepCopy;\n var Description = (\n /** @class */\n /* @__PURE__ */ function() {\n function Description2(info) {\n for (var key in info) {\n this[key] = deepCopy(info[key]);\n }\n }\n return Description2;\n }()\n );\n exports3.Description = Description;\n }\n });\n\n // ../../../node_modules/.pnpm/@ethersproject+abi@5.8.0/node_modules/@ethersproject/abi/lib/_version.js\n var require_version5 = __commonJS({\n \"../../../node_modules/.pnpm/@ethersproject+abi@5.8.0/node_modules/@ethersproject/abi/lib/_version.js\"(exports3) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n Object.defineProperty(exports3, \"__esModule\", { value: true });\n exports3.version = void 0;\n exports3.version = \"abi/5.8.0\";\n }\n });\n\n // ../../../node_modules/.pnpm/@ethersproject+abi@5.8.0/node_modules/@ethersproject/abi/lib/fragments.js\n var require_fragments = __commonJS({\n \"../../../node_modules/.pnpm/@ethersproject+abi@5.8.0/node_modules/@ethersproject/abi/lib/fragments.js\"(exports3) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n var __extends3 = exports3 && exports3.__extends || /* @__PURE__ */ function() {\n var extendStatics3 = function(d5, b4) {\n extendStatics3 = Object.setPrototypeOf || { __proto__: [] } instanceof Array && function(d6, b5) {\n d6.__proto__ = b5;\n } || function(d6, b5) {\n for (var p4 in b5)\n if (Object.prototype.hasOwnProperty.call(b5, p4))\n d6[p4] = b5[p4];\n };\n return extendStatics3(d5, b4);\n };\n return function(d5, b4) {\n if (typeof b4 !== \"function\" && b4 !== null)\n throw new TypeError(\"Class extends value \" + String(b4) + \" is not a constructor or null\");\n extendStatics3(d5, b4);\n function __() {\n this.constructor = d5;\n }\n d5.prototype = b4 === null ? Object.create(b4) : (__.prototype = b4.prototype, new __());\n };\n }();\n Object.defineProperty(exports3, \"__esModule\", { value: true });\n exports3.ErrorFragment = exports3.FunctionFragment = exports3.ConstructorFragment = exports3.EventFragment = exports3.Fragment = exports3.ParamType = exports3.FormatTypes = void 0;\n var bignumber_1 = require_lib3();\n var properties_1 = require_lib4();\n var logger_1 = require_lib();\n var _version_1 = require_version5();\n var logger = new logger_1.Logger(_version_1.version);\n var _constructorGuard = {};\n var ModifiersBytes = { calldata: true, memory: true, storage: true };\n var ModifiersNest = { calldata: true, memory: true };\n function checkModifier(type, name) {\n if (type === \"bytes\" || type === \"string\") {\n if (ModifiersBytes[name]) {\n return true;\n }\n } else if (type === \"address\") {\n if (name === \"payable\") {\n return true;\n }\n } else if (type.indexOf(\"[\") >= 0 || type === \"tuple\") {\n if (ModifiersNest[name]) {\n return true;\n }\n }\n if (ModifiersBytes[name] || name === \"payable\") {\n logger.throwArgumentError(\"invalid modifier\", \"name\", name);\n }\n return false;\n }\n function parseParamType(param, allowIndexed) {\n var originalParam = param;\n function throwError(i4) {\n logger.throwArgumentError(\"unexpected character at position \" + i4, \"param\", param);\n }\n param = param.replace(/\\s/g, \" \");\n function newNode(parent2) {\n var node2 = { type: \"\", name: \"\", parent: parent2, state: { allowType: true } };\n if (allowIndexed) {\n node2.indexed = false;\n }\n return node2;\n }\n var parent = { type: \"\", name: \"\", state: { allowType: true } };\n var node = parent;\n for (var i3 = 0; i3 < param.length; i3++) {\n var c4 = param[i3];\n switch (c4) {\n case \"(\":\n if (node.state.allowType && node.type === \"\") {\n node.type = \"tuple\";\n } else if (!node.state.allowParams) {\n throwError(i3);\n }\n node.state.allowType = false;\n node.type = verifyType(node.type);\n node.components = [newNode(node)];\n node = node.components[0];\n break;\n case \")\":\n delete node.state;\n if (node.name === \"indexed\") {\n if (!allowIndexed) {\n throwError(i3);\n }\n node.indexed = true;\n node.name = \"\";\n }\n if (checkModifier(node.type, node.name)) {\n node.name = \"\";\n }\n node.type = verifyType(node.type);\n var child = node;\n node = node.parent;\n if (!node) {\n throwError(i3);\n }\n delete child.parent;\n node.state.allowParams = false;\n node.state.allowName = true;\n node.state.allowArray = true;\n break;\n case \",\":\n delete node.state;\n if (node.name === \"indexed\") {\n if (!allowIndexed) {\n throwError(i3);\n }\n node.indexed = true;\n node.name = \"\";\n }\n if (checkModifier(node.type, node.name)) {\n node.name = \"\";\n }\n node.type = verifyType(node.type);\n var sibling = newNode(node.parent);\n node.parent.components.push(sibling);\n delete node.parent;\n node = sibling;\n break;\n case \" \":\n if (node.state.allowType) {\n if (node.type !== \"\") {\n node.type = verifyType(node.type);\n delete node.state.allowType;\n node.state.allowName = true;\n node.state.allowParams = true;\n }\n }\n if (node.state.allowName) {\n if (node.name !== \"\") {\n if (node.name === \"indexed\") {\n if (!allowIndexed) {\n throwError(i3);\n }\n if (node.indexed) {\n throwError(i3);\n }\n node.indexed = true;\n node.name = \"\";\n } else if (checkModifier(node.type, node.name)) {\n node.name = \"\";\n } else {\n node.state.allowName = false;\n }\n }\n }\n break;\n case \"[\":\n if (!node.state.allowArray) {\n throwError(i3);\n }\n node.type += c4;\n node.state.allowArray = false;\n node.state.allowName = false;\n node.state.readArray = true;\n break;\n case \"]\":\n if (!node.state.readArray) {\n throwError(i3);\n }\n node.type += c4;\n node.state.readArray = false;\n node.state.allowArray = true;\n node.state.allowName = true;\n break;\n default:\n if (node.state.allowType) {\n node.type += c4;\n node.state.allowParams = true;\n node.state.allowArray = true;\n } else if (node.state.allowName) {\n node.name += c4;\n delete node.state.allowArray;\n } else if (node.state.readArray) {\n node.type += c4;\n } else {\n throwError(i3);\n }\n }\n }\n if (node.parent) {\n logger.throwArgumentError(\"unexpected eof\", \"param\", param);\n }\n delete parent.state;\n if (node.name === \"indexed\") {\n if (!allowIndexed) {\n throwError(originalParam.length - 7);\n }\n if (node.indexed) {\n throwError(originalParam.length - 7);\n }\n node.indexed = true;\n node.name = \"\";\n } else if (checkModifier(node.type, node.name)) {\n node.name = \"\";\n }\n parent.type = verifyType(parent.type);\n return parent;\n }\n function populate(object2, params) {\n for (var key in params) {\n (0, properties_1.defineReadOnly)(object2, key, params[key]);\n }\n }\n exports3.FormatTypes = Object.freeze({\n // Bare formatting, as is needed for computing a sighash of an event or function\n sighash: \"sighash\",\n // Human-Readable with Minimal spacing and without names (compact human-readable)\n minimal: \"minimal\",\n // Human-Readable with nice spacing, including all names\n full: \"full\",\n // JSON-format a la Solidity\n json: \"json\"\n });\n var paramTypeArray = new RegExp(/^(.*)\\[([0-9]*)\\]$/);\n var ParamType = (\n /** @class */\n function() {\n function ParamType2(constructorGuard, params) {\n if (constructorGuard !== _constructorGuard) {\n logger.throwError(\"use fromString\", logger_1.Logger.errors.UNSUPPORTED_OPERATION, {\n operation: \"new ParamType()\"\n });\n }\n populate(this, params);\n var match = this.type.match(paramTypeArray);\n if (match) {\n populate(this, {\n arrayLength: parseInt(match[2] || \"-1\"),\n arrayChildren: ParamType2.fromObject({\n type: match[1],\n components: this.components\n }),\n baseType: \"array\"\n });\n } else {\n populate(this, {\n arrayLength: null,\n arrayChildren: null,\n baseType: this.components != null ? \"tuple\" : this.type\n });\n }\n this._isParamType = true;\n Object.freeze(this);\n }\n ParamType2.prototype.format = function(format) {\n if (!format) {\n format = exports3.FormatTypes.sighash;\n }\n if (!exports3.FormatTypes[format]) {\n logger.throwArgumentError(\"invalid format type\", \"format\", format);\n }\n if (format === exports3.FormatTypes.json) {\n var result_1 = {\n type: this.baseType === \"tuple\" ? \"tuple\" : this.type,\n name: this.name || void 0\n };\n if (typeof this.indexed === \"boolean\") {\n result_1.indexed = this.indexed;\n }\n if (this.components) {\n result_1.components = this.components.map(function(comp) {\n return JSON.parse(comp.format(format));\n });\n }\n return JSON.stringify(result_1);\n }\n var result = \"\";\n if (this.baseType === \"array\") {\n result += this.arrayChildren.format(format);\n result += \"[\" + (this.arrayLength < 0 ? \"\" : String(this.arrayLength)) + \"]\";\n } else {\n if (this.baseType === \"tuple\") {\n if (format !== exports3.FormatTypes.sighash) {\n result += this.type;\n }\n result += \"(\" + this.components.map(function(comp) {\n return comp.format(format);\n }).join(format === exports3.FormatTypes.full ? \", \" : \",\") + \")\";\n } else {\n result += this.type;\n }\n }\n if (format !== exports3.FormatTypes.sighash) {\n if (this.indexed === true) {\n result += \" indexed\";\n }\n if (format === exports3.FormatTypes.full && this.name) {\n result += \" \" + this.name;\n }\n }\n return result;\n };\n ParamType2.from = function(value, allowIndexed) {\n if (typeof value === \"string\") {\n return ParamType2.fromString(value, allowIndexed);\n }\n return ParamType2.fromObject(value);\n };\n ParamType2.fromObject = function(value) {\n if (ParamType2.isParamType(value)) {\n return value;\n }\n return new ParamType2(_constructorGuard, {\n name: value.name || null,\n type: verifyType(value.type),\n indexed: value.indexed == null ? null : !!value.indexed,\n components: value.components ? value.components.map(ParamType2.fromObject) : null\n });\n };\n ParamType2.fromString = function(value, allowIndexed) {\n function ParamTypify(node) {\n return ParamType2.fromObject({\n name: node.name,\n type: node.type,\n indexed: node.indexed,\n components: node.components\n });\n }\n return ParamTypify(parseParamType(value, !!allowIndexed));\n };\n ParamType2.isParamType = function(value) {\n return !!(value != null && value._isParamType);\n };\n return ParamType2;\n }()\n );\n exports3.ParamType = ParamType;\n function parseParams(value, allowIndex) {\n return splitNesting(value).map(function(param) {\n return ParamType.fromString(param, allowIndex);\n });\n }\n var Fragment = (\n /** @class */\n function() {\n function Fragment2(constructorGuard, params) {\n if (constructorGuard !== _constructorGuard) {\n logger.throwError(\"use a static from method\", logger_1.Logger.errors.UNSUPPORTED_OPERATION, {\n operation: \"new Fragment()\"\n });\n }\n populate(this, params);\n this._isFragment = true;\n Object.freeze(this);\n }\n Fragment2.from = function(value) {\n if (Fragment2.isFragment(value)) {\n return value;\n }\n if (typeof value === \"string\") {\n return Fragment2.fromString(value);\n }\n return Fragment2.fromObject(value);\n };\n Fragment2.fromObject = function(value) {\n if (Fragment2.isFragment(value)) {\n return value;\n }\n switch (value.type) {\n case \"function\":\n return FunctionFragment.fromObject(value);\n case \"event\":\n return EventFragment.fromObject(value);\n case \"constructor\":\n return ConstructorFragment.fromObject(value);\n case \"error\":\n return ErrorFragment.fromObject(value);\n case \"fallback\":\n case \"receive\":\n return null;\n }\n return logger.throwArgumentError(\"invalid fragment object\", \"value\", value);\n };\n Fragment2.fromString = function(value) {\n value = value.replace(/\\s/g, \" \");\n value = value.replace(/\\(/g, \" (\").replace(/\\)/g, \") \").replace(/\\s+/g, \" \");\n value = value.trim();\n if (value.split(\" \")[0] === \"event\") {\n return EventFragment.fromString(value.substring(5).trim());\n } else if (value.split(\" \")[0] === \"function\") {\n return FunctionFragment.fromString(value.substring(8).trim());\n } else if (value.split(\"(\")[0].trim() === \"constructor\") {\n return ConstructorFragment.fromString(value.trim());\n } else if (value.split(\" \")[0] === \"error\") {\n return ErrorFragment.fromString(value.substring(5).trim());\n }\n return logger.throwArgumentError(\"unsupported fragment\", \"value\", value);\n };\n Fragment2.isFragment = function(value) {\n return !!(value && value._isFragment);\n };\n return Fragment2;\n }()\n );\n exports3.Fragment = Fragment;\n var EventFragment = (\n /** @class */\n function(_super) {\n __extends3(EventFragment2, _super);\n function EventFragment2() {\n return _super !== null && _super.apply(this, arguments) || this;\n }\n EventFragment2.prototype.format = function(format) {\n if (!format) {\n format = exports3.FormatTypes.sighash;\n }\n if (!exports3.FormatTypes[format]) {\n logger.throwArgumentError(\"invalid format type\", \"format\", format);\n }\n if (format === exports3.FormatTypes.json) {\n return JSON.stringify({\n type: \"event\",\n anonymous: this.anonymous,\n name: this.name,\n inputs: this.inputs.map(function(input) {\n return JSON.parse(input.format(format));\n })\n });\n }\n var result = \"\";\n if (format !== exports3.FormatTypes.sighash) {\n result += \"event \";\n }\n result += this.name + \"(\" + this.inputs.map(function(input) {\n return input.format(format);\n }).join(format === exports3.FormatTypes.full ? \", \" : \",\") + \") \";\n if (format !== exports3.FormatTypes.sighash) {\n if (this.anonymous) {\n result += \"anonymous \";\n }\n }\n return result.trim();\n };\n EventFragment2.from = function(value) {\n if (typeof value === \"string\") {\n return EventFragment2.fromString(value);\n }\n return EventFragment2.fromObject(value);\n };\n EventFragment2.fromObject = function(value) {\n if (EventFragment2.isEventFragment(value)) {\n return value;\n }\n if (value.type !== \"event\") {\n logger.throwArgumentError(\"invalid event object\", \"value\", value);\n }\n var params = {\n name: verifyIdentifier(value.name),\n anonymous: value.anonymous,\n inputs: value.inputs ? value.inputs.map(ParamType.fromObject) : [],\n type: \"event\"\n };\n return new EventFragment2(_constructorGuard, params);\n };\n EventFragment2.fromString = function(value) {\n var match = value.match(regexParen);\n if (!match) {\n logger.throwArgumentError(\"invalid event string\", \"value\", value);\n }\n var anonymous = false;\n match[3].split(\" \").forEach(function(modifier) {\n switch (modifier.trim()) {\n case \"anonymous\":\n anonymous = true;\n break;\n case \"\":\n break;\n default:\n logger.warn(\"unknown modifier: \" + modifier);\n }\n });\n return EventFragment2.fromObject({\n name: match[1].trim(),\n anonymous,\n inputs: parseParams(match[2], true),\n type: \"event\"\n });\n };\n EventFragment2.isEventFragment = function(value) {\n return value && value._isFragment && value.type === \"event\";\n };\n return EventFragment2;\n }(Fragment)\n );\n exports3.EventFragment = EventFragment;\n function parseGas(value, params) {\n params.gas = null;\n var comps = value.split(\"@\");\n if (comps.length !== 1) {\n if (comps.length > 2) {\n logger.throwArgumentError(\"invalid human-readable ABI signature\", \"value\", value);\n }\n if (!comps[1].match(/^[0-9]+$/)) {\n logger.throwArgumentError(\"invalid human-readable ABI signature gas\", \"value\", value);\n }\n params.gas = bignumber_1.BigNumber.from(comps[1]);\n return comps[0];\n }\n return value;\n }\n function parseModifiers(value, params) {\n params.constant = false;\n params.payable = false;\n params.stateMutability = \"nonpayable\";\n value.split(\" \").forEach(function(modifier) {\n switch (modifier.trim()) {\n case \"constant\":\n params.constant = true;\n break;\n case \"payable\":\n params.payable = true;\n params.stateMutability = \"payable\";\n break;\n case \"nonpayable\":\n params.payable = false;\n params.stateMutability = \"nonpayable\";\n break;\n case \"pure\":\n params.constant = true;\n params.stateMutability = \"pure\";\n break;\n case \"view\":\n params.constant = true;\n params.stateMutability = \"view\";\n break;\n case \"external\":\n case \"public\":\n case \"\":\n break;\n default:\n console.log(\"unknown modifier: \" + modifier);\n }\n });\n }\n function verifyState(value) {\n var result = {\n constant: false,\n payable: true,\n stateMutability: \"payable\"\n };\n if (value.stateMutability != null) {\n result.stateMutability = value.stateMutability;\n result.constant = result.stateMutability === \"view\" || result.stateMutability === \"pure\";\n if (value.constant != null) {\n if (!!value.constant !== result.constant) {\n logger.throwArgumentError(\"cannot have constant function with mutability \" + result.stateMutability, \"value\", value);\n }\n }\n result.payable = result.stateMutability === \"payable\";\n if (value.payable != null) {\n if (!!value.payable !== result.payable) {\n logger.throwArgumentError(\"cannot have payable function with mutability \" + result.stateMutability, \"value\", value);\n }\n }\n } else if (value.payable != null) {\n result.payable = !!value.payable;\n if (value.constant == null && !result.payable && value.type !== \"constructor\") {\n logger.throwArgumentError(\"unable to determine stateMutability\", \"value\", value);\n }\n result.constant = !!value.constant;\n if (result.constant) {\n result.stateMutability = \"view\";\n } else {\n result.stateMutability = result.payable ? \"payable\" : \"nonpayable\";\n }\n if (result.payable && result.constant) {\n logger.throwArgumentError(\"cannot have constant payable function\", \"value\", value);\n }\n } else if (value.constant != null) {\n result.constant = !!value.constant;\n result.payable = !result.constant;\n result.stateMutability = result.constant ? \"view\" : \"payable\";\n } else if (value.type !== \"constructor\") {\n logger.throwArgumentError(\"unable to determine stateMutability\", \"value\", value);\n }\n return result;\n }\n var ConstructorFragment = (\n /** @class */\n function(_super) {\n __extends3(ConstructorFragment2, _super);\n function ConstructorFragment2() {\n return _super !== null && _super.apply(this, arguments) || this;\n }\n ConstructorFragment2.prototype.format = function(format) {\n if (!format) {\n format = exports3.FormatTypes.sighash;\n }\n if (!exports3.FormatTypes[format]) {\n logger.throwArgumentError(\"invalid format type\", \"format\", format);\n }\n if (format === exports3.FormatTypes.json) {\n return JSON.stringify({\n type: \"constructor\",\n stateMutability: this.stateMutability !== \"nonpayable\" ? this.stateMutability : void 0,\n payable: this.payable,\n gas: this.gas ? this.gas.toNumber() : void 0,\n inputs: this.inputs.map(function(input) {\n return JSON.parse(input.format(format));\n })\n });\n }\n if (format === exports3.FormatTypes.sighash) {\n logger.throwError(\"cannot format a constructor for sighash\", logger_1.Logger.errors.UNSUPPORTED_OPERATION, {\n operation: \"format(sighash)\"\n });\n }\n var result = \"constructor(\" + this.inputs.map(function(input) {\n return input.format(format);\n }).join(format === exports3.FormatTypes.full ? \", \" : \",\") + \") \";\n if (this.stateMutability && this.stateMutability !== \"nonpayable\") {\n result += this.stateMutability + \" \";\n }\n return result.trim();\n };\n ConstructorFragment2.from = function(value) {\n if (typeof value === \"string\") {\n return ConstructorFragment2.fromString(value);\n }\n return ConstructorFragment2.fromObject(value);\n };\n ConstructorFragment2.fromObject = function(value) {\n if (ConstructorFragment2.isConstructorFragment(value)) {\n return value;\n }\n if (value.type !== \"constructor\") {\n logger.throwArgumentError(\"invalid constructor object\", \"value\", value);\n }\n var state = verifyState(value);\n if (state.constant) {\n logger.throwArgumentError(\"constructor cannot be constant\", \"value\", value);\n }\n var params = {\n name: null,\n type: value.type,\n inputs: value.inputs ? value.inputs.map(ParamType.fromObject) : [],\n payable: state.payable,\n stateMutability: state.stateMutability,\n gas: value.gas ? bignumber_1.BigNumber.from(value.gas) : null\n };\n return new ConstructorFragment2(_constructorGuard, params);\n };\n ConstructorFragment2.fromString = function(value) {\n var params = { type: \"constructor\" };\n value = parseGas(value, params);\n var parens = value.match(regexParen);\n if (!parens || parens[1].trim() !== \"constructor\") {\n logger.throwArgumentError(\"invalid constructor string\", \"value\", value);\n }\n params.inputs = parseParams(parens[2].trim(), false);\n parseModifiers(parens[3].trim(), params);\n return ConstructorFragment2.fromObject(params);\n };\n ConstructorFragment2.isConstructorFragment = function(value) {\n return value && value._isFragment && value.type === \"constructor\";\n };\n return ConstructorFragment2;\n }(Fragment)\n );\n exports3.ConstructorFragment = ConstructorFragment;\n var FunctionFragment = (\n /** @class */\n function(_super) {\n __extends3(FunctionFragment2, _super);\n function FunctionFragment2() {\n return _super !== null && _super.apply(this, arguments) || this;\n }\n FunctionFragment2.prototype.format = function(format) {\n if (!format) {\n format = exports3.FormatTypes.sighash;\n }\n if (!exports3.FormatTypes[format]) {\n logger.throwArgumentError(\"invalid format type\", \"format\", format);\n }\n if (format === exports3.FormatTypes.json) {\n return JSON.stringify({\n type: \"function\",\n name: this.name,\n constant: this.constant,\n stateMutability: this.stateMutability !== \"nonpayable\" ? this.stateMutability : void 0,\n payable: this.payable,\n gas: this.gas ? this.gas.toNumber() : void 0,\n inputs: this.inputs.map(function(input) {\n return JSON.parse(input.format(format));\n }),\n outputs: this.outputs.map(function(output) {\n return JSON.parse(output.format(format));\n })\n });\n }\n var result = \"\";\n if (format !== exports3.FormatTypes.sighash) {\n result += \"function \";\n }\n result += this.name + \"(\" + this.inputs.map(function(input) {\n return input.format(format);\n }).join(format === exports3.FormatTypes.full ? \", \" : \",\") + \") \";\n if (format !== exports3.FormatTypes.sighash) {\n if (this.stateMutability) {\n if (this.stateMutability !== \"nonpayable\") {\n result += this.stateMutability + \" \";\n }\n } else if (this.constant) {\n result += \"view \";\n }\n if (this.outputs && this.outputs.length) {\n result += \"returns (\" + this.outputs.map(function(output) {\n return output.format(format);\n }).join(\", \") + \") \";\n }\n if (this.gas != null) {\n result += \"@\" + this.gas.toString() + \" \";\n }\n }\n return result.trim();\n };\n FunctionFragment2.from = function(value) {\n if (typeof value === \"string\") {\n return FunctionFragment2.fromString(value);\n }\n return FunctionFragment2.fromObject(value);\n };\n FunctionFragment2.fromObject = function(value) {\n if (FunctionFragment2.isFunctionFragment(value)) {\n return value;\n }\n if (value.type !== \"function\") {\n logger.throwArgumentError(\"invalid function object\", \"value\", value);\n }\n var state = verifyState(value);\n var params = {\n type: value.type,\n name: verifyIdentifier(value.name),\n constant: state.constant,\n inputs: value.inputs ? value.inputs.map(ParamType.fromObject) : [],\n outputs: value.outputs ? value.outputs.map(ParamType.fromObject) : [],\n payable: state.payable,\n stateMutability: state.stateMutability,\n gas: value.gas ? bignumber_1.BigNumber.from(value.gas) : null\n };\n return new FunctionFragment2(_constructorGuard, params);\n };\n FunctionFragment2.fromString = function(value) {\n var params = { type: \"function\" };\n value = parseGas(value, params);\n var comps = value.split(\" returns \");\n if (comps.length > 2) {\n logger.throwArgumentError(\"invalid function string\", \"value\", value);\n }\n var parens = comps[0].match(regexParen);\n if (!parens) {\n logger.throwArgumentError(\"invalid function signature\", \"value\", value);\n }\n params.name = parens[1].trim();\n if (params.name) {\n verifyIdentifier(params.name);\n }\n params.inputs = parseParams(parens[2], false);\n parseModifiers(parens[3].trim(), params);\n if (comps.length > 1) {\n var returns = comps[1].match(regexParen);\n if (returns[1].trim() != \"\" || returns[3].trim() != \"\") {\n logger.throwArgumentError(\"unexpected tokens\", \"value\", value);\n }\n params.outputs = parseParams(returns[2], false);\n } else {\n params.outputs = [];\n }\n return FunctionFragment2.fromObject(params);\n };\n FunctionFragment2.isFunctionFragment = function(value) {\n return value && value._isFragment && value.type === \"function\";\n };\n return FunctionFragment2;\n }(ConstructorFragment)\n );\n exports3.FunctionFragment = FunctionFragment;\n function checkForbidden(fragment) {\n var sig = fragment.format();\n if (sig === \"Error(string)\" || sig === \"Panic(uint256)\") {\n logger.throwArgumentError(\"cannot specify user defined \" + sig + \" error\", \"fragment\", fragment);\n }\n return fragment;\n }\n var ErrorFragment = (\n /** @class */\n function(_super) {\n __extends3(ErrorFragment2, _super);\n function ErrorFragment2() {\n return _super !== null && _super.apply(this, arguments) || this;\n }\n ErrorFragment2.prototype.format = function(format) {\n if (!format) {\n format = exports3.FormatTypes.sighash;\n }\n if (!exports3.FormatTypes[format]) {\n logger.throwArgumentError(\"invalid format type\", \"format\", format);\n }\n if (format === exports3.FormatTypes.json) {\n return JSON.stringify({\n type: \"error\",\n name: this.name,\n inputs: this.inputs.map(function(input) {\n return JSON.parse(input.format(format));\n })\n });\n }\n var result = \"\";\n if (format !== exports3.FormatTypes.sighash) {\n result += \"error \";\n }\n result += this.name + \"(\" + this.inputs.map(function(input) {\n return input.format(format);\n }).join(format === exports3.FormatTypes.full ? \", \" : \",\") + \") \";\n return result.trim();\n };\n ErrorFragment2.from = function(value) {\n if (typeof value === \"string\") {\n return ErrorFragment2.fromString(value);\n }\n return ErrorFragment2.fromObject(value);\n };\n ErrorFragment2.fromObject = function(value) {\n if (ErrorFragment2.isErrorFragment(value)) {\n return value;\n }\n if (value.type !== \"error\") {\n logger.throwArgumentError(\"invalid error object\", \"value\", value);\n }\n var params = {\n type: value.type,\n name: verifyIdentifier(value.name),\n inputs: value.inputs ? value.inputs.map(ParamType.fromObject) : []\n };\n return checkForbidden(new ErrorFragment2(_constructorGuard, params));\n };\n ErrorFragment2.fromString = function(value) {\n var params = { type: \"error\" };\n var parens = value.match(regexParen);\n if (!parens) {\n logger.throwArgumentError(\"invalid error signature\", \"value\", value);\n }\n params.name = parens[1].trim();\n if (params.name) {\n verifyIdentifier(params.name);\n }\n params.inputs = parseParams(parens[2], false);\n return checkForbidden(ErrorFragment2.fromObject(params));\n };\n ErrorFragment2.isErrorFragment = function(value) {\n return value && value._isFragment && value.type === \"error\";\n };\n return ErrorFragment2;\n }(Fragment)\n );\n exports3.ErrorFragment = ErrorFragment;\n function verifyType(type) {\n if (type.match(/^uint($|[^1-9])/)) {\n type = \"uint256\" + type.substring(4);\n } else if (type.match(/^int($|[^1-9])/)) {\n type = \"int256\" + type.substring(3);\n }\n return type;\n }\n var regexIdentifier = new RegExp(\"^[a-zA-Z$_][a-zA-Z0-9$_]*$\");\n function verifyIdentifier(value) {\n if (!value || !value.match(regexIdentifier)) {\n logger.throwArgumentError('invalid identifier \"' + value + '\"', \"value\", value);\n }\n return value;\n }\n var regexParen = new RegExp(\"^([^)(]*)\\\\((.*)\\\\)([^)(]*)$\");\n function splitNesting(value) {\n value = value.trim();\n var result = [];\n var accum = \"\";\n var depth = 0;\n for (var offset = 0; offset < value.length; offset++) {\n var c4 = value[offset];\n if (c4 === \",\" && depth === 0) {\n result.push(accum);\n accum = \"\";\n } else {\n accum += c4;\n if (c4 === \"(\") {\n depth++;\n } else if (c4 === \")\") {\n depth--;\n if (depth === -1) {\n logger.throwArgumentError(\"unbalanced parenthesis\", \"value\", value);\n }\n }\n }\n }\n if (accum) {\n result.push(accum);\n }\n return result;\n }\n }\n });\n\n // ../../../node_modules/.pnpm/@ethersproject+abi@5.8.0/node_modules/@ethersproject/abi/lib/coders/abstract-coder.js\n var require_abstract_coder = __commonJS({\n \"../../../node_modules/.pnpm/@ethersproject+abi@5.8.0/node_modules/@ethersproject/abi/lib/coders/abstract-coder.js\"(exports3) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n Object.defineProperty(exports3, \"__esModule\", { value: true });\n exports3.Reader = exports3.Writer = exports3.Coder = exports3.checkResultErrors = void 0;\n var bytes_1 = require_lib2();\n var bignumber_1 = require_lib3();\n var properties_1 = require_lib4();\n var logger_1 = require_lib();\n var _version_1 = require_version5();\n var logger = new logger_1.Logger(_version_1.version);\n function checkResultErrors(result) {\n var errors = [];\n var checkErrors = function(path, object2) {\n if (!Array.isArray(object2)) {\n return;\n }\n for (var key in object2) {\n var childPath = path.slice();\n childPath.push(key);\n try {\n checkErrors(childPath, object2[key]);\n } catch (error) {\n errors.push({ path: childPath, error });\n }\n }\n };\n checkErrors([], result);\n return errors;\n }\n exports3.checkResultErrors = checkResultErrors;\n var Coder = (\n /** @class */\n function() {\n function Coder2(name, type, localName, dynamic) {\n this.name = name;\n this.type = type;\n this.localName = localName;\n this.dynamic = dynamic;\n }\n Coder2.prototype._throwError = function(message, value) {\n logger.throwArgumentError(message, this.localName, value);\n };\n return Coder2;\n }()\n );\n exports3.Coder = Coder;\n var Writer = (\n /** @class */\n function() {\n function Writer2(wordSize) {\n (0, properties_1.defineReadOnly)(this, \"wordSize\", wordSize || 32);\n this._data = [];\n this._dataLength = 0;\n this._padding = new Uint8Array(wordSize);\n }\n Object.defineProperty(Writer2.prototype, \"data\", {\n get: function() {\n return (0, bytes_1.hexConcat)(this._data);\n },\n enumerable: false,\n configurable: true\n });\n Object.defineProperty(Writer2.prototype, \"length\", {\n get: function() {\n return this._dataLength;\n },\n enumerable: false,\n configurable: true\n });\n Writer2.prototype._writeData = function(data) {\n this._data.push(data);\n this._dataLength += data.length;\n return data.length;\n };\n Writer2.prototype.appendWriter = function(writer) {\n return this._writeData((0, bytes_1.concat)(writer._data));\n };\n Writer2.prototype.writeBytes = function(value) {\n var bytes = (0, bytes_1.arrayify)(value);\n var paddingOffset = bytes.length % this.wordSize;\n if (paddingOffset) {\n bytes = (0, bytes_1.concat)([bytes, this._padding.slice(paddingOffset)]);\n }\n return this._writeData(bytes);\n };\n Writer2.prototype._getValue = function(value) {\n var bytes = (0, bytes_1.arrayify)(bignumber_1.BigNumber.from(value));\n if (bytes.length > this.wordSize) {\n logger.throwError(\"value out-of-bounds\", logger_1.Logger.errors.BUFFER_OVERRUN, {\n length: this.wordSize,\n offset: bytes.length\n });\n }\n if (bytes.length % this.wordSize) {\n bytes = (0, bytes_1.concat)([this._padding.slice(bytes.length % this.wordSize), bytes]);\n }\n return bytes;\n };\n Writer2.prototype.writeValue = function(value) {\n return this._writeData(this._getValue(value));\n };\n Writer2.prototype.writeUpdatableValue = function() {\n var _this = this;\n var offset = this._data.length;\n this._data.push(this._padding);\n this._dataLength += this.wordSize;\n return function(value) {\n _this._data[offset] = _this._getValue(value);\n };\n };\n return Writer2;\n }()\n );\n exports3.Writer = Writer;\n var Reader = (\n /** @class */\n function() {\n function Reader2(data, wordSize, coerceFunc, allowLoose) {\n (0, properties_1.defineReadOnly)(this, \"_data\", (0, bytes_1.arrayify)(data));\n (0, properties_1.defineReadOnly)(this, \"wordSize\", wordSize || 32);\n (0, properties_1.defineReadOnly)(this, \"_coerceFunc\", coerceFunc);\n (0, properties_1.defineReadOnly)(this, \"allowLoose\", allowLoose);\n this._offset = 0;\n }\n Object.defineProperty(Reader2.prototype, \"data\", {\n get: function() {\n return (0, bytes_1.hexlify)(this._data);\n },\n enumerable: false,\n configurable: true\n });\n Object.defineProperty(Reader2.prototype, \"consumed\", {\n get: function() {\n return this._offset;\n },\n enumerable: false,\n configurable: true\n });\n Reader2.coerce = function(name, value) {\n var match = name.match(\"^u?int([0-9]+)$\");\n if (match && parseInt(match[1]) <= 48) {\n value = value.toNumber();\n }\n return value;\n };\n Reader2.prototype.coerce = function(name, value) {\n if (this._coerceFunc) {\n return this._coerceFunc(name, value);\n }\n return Reader2.coerce(name, value);\n };\n Reader2.prototype._peekBytes = function(offset, length2, loose) {\n var alignedLength = Math.ceil(length2 / this.wordSize) * this.wordSize;\n if (this._offset + alignedLength > this._data.length) {\n if (this.allowLoose && loose && this._offset + length2 <= this._data.length) {\n alignedLength = length2;\n } else {\n logger.throwError(\"data out-of-bounds\", logger_1.Logger.errors.BUFFER_OVERRUN, {\n length: this._data.length,\n offset: this._offset + alignedLength\n });\n }\n }\n return this._data.slice(this._offset, this._offset + alignedLength);\n };\n Reader2.prototype.subReader = function(offset) {\n return new Reader2(this._data.slice(this._offset + offset), this.wordSize, this._coerceFunc, this.allowLoose);\n };\n Reader2.prototype.readBytes = function(length2, loose) {\n var bytes = this._peekBytes(0, length2, !!loose);\n this._offset += bytes.length;\n return bytes.slice(0, length2);\n };\n Reader2.prototype.readValue = function() {\n return bignumber_1.BigNumber.from(this.readBytes(this.wordSize));\n };\n return Reader2;\n }()\n );\n exports3.Reader = Reader;\n }\n });\n\n // ../../../node_modules/.pnpm/js-sha3@0.8.0/node_modules/js-sha3/src/sha3.js\n var require_sha3 = __commonJS({\n \"../../../node_modules/.pnpm/js-sha3@0.8.0/node_modules/js-sha3/src/sha3.js\"(exports3, module) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n (function() {\n \"use strict\";\n var INPUT_ERROR = \"input is invalid type\";\n var FINALIZE_ERROR = \"finalize already called\";\n var WINDOW = typeof window === \"object\";\n var root = WINDOW ? window : {};\n if (root.JS_SHA3_NO_WINDOW) {\n WINDOW = false;\n }\n var WEB_WORKER = !WINDOW && typeof self === \"object\";\n var NODE_JS = !root.JS_SHA3_NO_NODE_JS && typeof process_exports === \"object\" && process_exports.versions && process_exports.versions.node;\n if (NODE_JS) {\n root = global;\n } else if (WEB_WORKER) {\n root = self;\n }\n var COMMON_JS = !root.JS_SHA3_NO_COMMON_JS && typeof module === \"object\" && module.exports;\n var AMD = typeof define === \"function\" && define.amd;\n var ARRAY_BUFFER = !root.JS_SHA3_NO_ARRAY_BUFFER && typeof ArrayBuffer !== \"undefined\";\n var HEX_CHARS = \"0123456789abcdef\".split(\"\");\n var SHAKE_PADDING = [31, 7936, 2031616, 520093696];\n var CSHAKE_PADDING = [4, 1024, 262144, 67108864];\n var KECCAK_PADDING = [1, 256, 65536, 16777216];\n var PADDING = [6, 1536, 393216, 100663296];\n var SHIFT = [0, 8, 16, 24];\n var RC = [\n 1,\n 0,\n 32898,\n 0,\n 32906,\n 2147483648,\n 2147516416,\n 2147483648,\n 32907,\n 0,\n 2147483649,\n 0,\n 2147516545,\n 2147483648,\n 32777,\n 2147483648,\n 138,\n 0,\n 136,\n 0,\n 2147516425,\n 0,\n 2147483658,\n 0,\n 2147516555,\n 0,\n 139,\n 2147483648,\n 32905,\n 2147483648,\n 32771,\n 2147483648,\n 32770,\n 2147483648,\n 128,\n 2147483648,\n 32778,\n 0,\n 2147483658,\n 2147483648,\n 2147516545,\n 2147483648,\n 32896,\n 2147483648,\n 2147483649,\n 0,\n 2147516424,\n 2147483648\n ];\n var BITS = [224, 256, 384, 512];\n var SHAKE_BITS = [128, 256];\n var OUTPUT_TYPES = [\"hex\", \"buffer\", \"arrayBuffer\", \"array\", \"digest\"];\n var CSHAKE_BYTEPAD = {\n \"128\": 168,\n \"256\": 136\n };\n if (root.JS_SHA3_NO_NODE_JS || !Array.isArray) {\n Array.isArray = function(obj) {\n return Object.prototype.toString.call(obj) === \"[object Array]\";\n };\n }\n if (ARRAY_BUFFER && (root.JS_SHA3_NO_ARRAY_BUFFER_IS_VIEW || !ArrayBuffer.isView)) {\n ArrayBuffer.isView = function(obj) {\n return typeof obj === \"object\" && obj.buffer && obj.buffer.constructor === ArrayBuffer;\n };\n }\n var createOutputMethod = function(bits2, padding, outputType) {\n return function(message) {\n return new Keccak3(bits2, padding, bits2).update(message)[outputType]();\n };\n };\n var createShakeOutputMethod = function(bits2, padding, outputType) {\n return function(message, outputBits) {\n return new Keccak3(bits2, padding, outputBits).update(message)[outputType]();\n };\n };\n var createCshakeOutputMethod = function(bits2, padding, outputType) {\n return function(message, outputBits, n2, s4) {\n return methods[\"cshake\" + bits2].update(message, outputBits, n2, s4)[outputType]();\n };\n };\n var createKmacOutputMethod = function(bits2, padding, outputType) {\n return function(key, message, outputBits, s4) {\n return methods[\"kmac\" + bits2].update(key, message, outputBits, s4)[outputType]();\n };\n };\n var createOutputMethods = function(method, createMethod2, bits2, padding) {\n for (var i4 = 0; i4 < OUTPUT_TYPES.length; ++i4) {\n var type = OUTPUT_TYPES[i4];\n method[type] = createMethod2(bits2, padding, type);\n }\n return method;\n };\n var createMethod = function(bits2, padding) {\n var method = createOutputMethod(bits2, padding, \"hex\");\n method.create = function() {\n return new Keccak3(bits2, padding, bits2);\n };\n method.update = function(message) {\n return method.create().update(message);\n };\n return createOutputMethods(method, createOutputMethod, bits2, padding);\n };\n var createShakeMethod = function(bits2, padding) {\n var method = createShakeOutputMethod(bits2, padding, \"hex\");\n method.create = function(outputBits) {\n return new Keccak3(bits2, padding, outputBits);\n };\n method.update = function(message, outputBits) {\n return method.create(outputBits).update(message);\n };\n return createOutputMethods(method, createShakeOutputMethod, bits2, padding);\n };\n var createCshakeMethod = function(bits2, padding) {\n var w3 = CSHAKE_BYTEPAD[bits2];\n var method = createCshakeOutputMethod(bits2, padding, \"hex\");\n method.create = function(outputBits, n2, s4) {\n if (!n2 && !s4) {\n return methods[\"shake\" + bits2].create(outputBits);\n } else {\n return new Keccak3(bits2, padding, outputBits).bytepad([n2, s4], w3);\n }\n };\n method.update = function(message, outputBits, n2, s4) {\n return method.create(outputBits, n2, s4).update(message);\n };\n return createOutputMethods(method, createCshakeOutputMethod, bits2, padding);\n };\n var createKmacMethod = function(bits2, padding) {\n var w3 = CSHAKE_BYTEPAD[bits2];\n var method = createKmacOutputMethod(bits2, padding, \"hex\");\n method.create = function(key, outputBits, s4) {\n return new Kmac(bits2, padding, outputBits).bytepad([\"KMAC\", s4], w3).bytepad([key], w3);\n };\n method.update = function(key, message, outputBits, s4) {\n return method.create(key, outputBits, s4).update(message);\n };\n return createOutputMethods(method, createKmacOutputMethod, bits2, padding);\n };\n var algorithms = [\n { name: \"keccak\", padding: KECCAK_PADDING, bits: BITS, createMethod },\n { name: \"sha3\", padding: PADDING, bits: BITS, createMethod },\n { name: \"shake\", padding: SHAKE_PADDING, bits: SHAKE_BITS, createMethod: createShakeMethod },\n { name: \"cshake\", padding: CSHAKE_PADDING, bits: SHAKE_BITS, createMethod: createCshakeMethod },\n { name: \"kmac\", padding: CSHAKE_PADDING, bits: SHAKE_BITS, createMethod: createKmacMethod }\n ];\n var methods = {}, methodNames = [];\n for (var i3 = 0; i3 < algorithms.length; ++i3) {\n var algorithm = algorithms[i3];\n var bits = algorithm.bits;\n for (var j2 = 0; j2 < bits.length; ++j2) {\n var methodName = algorithm.name + \"_\" + bits[j2];\n methodNames.push(methodName);\n methods[methodName] = algorithm.createMethod(bits[j2], algorithm.padding);\n if (algorithm.name !== \"sha3\") {\n var newMethodName = algorithm.name + bits[j2];\n methodNames.push(newMethodName);\n methods[newMethodName] = methods[methodName];\n }\n }\n }\n function Keccak3(bits2, padding, outputBits) {\n this.blocks = [];\n this.s = [];\n this.padding = padding;\n this.outputBits = outputBits;\n this.reset = true;\n this.finalized = false;\n this.block = 0;\n this.start = 0;\n this.blockCount = 1600 - (bits2 << 1) >> 5;\n this.byteCount = this.blockCount << 2;\n this.outputBlocks = outputBits >> 5;\n this.extraBytes = (outputBits & 31) >> 3;\n for (var i4 = 0; i4 < 50; ++i4) {\n this.s[i4] = 0;\n }\n }\n Keccak3.prototype.update = function(message) {\n if (this.finalized) {\n throw new Error(FINALIZE_ERROR);\n }\n var notString, type = typeof message;\n if (type !== \"string\") {\n if (type === \"object\") {\n if (message === null) {\n throw new Error(INPUT_ERROR);\n } else if (ARRAY_BUFFER && message.constructor === ArrayBuffer) {\n message = new Uint8Array(message);\n } else if (!Array.isArray(message)) {\n if (!ARRAY_BUFFER || !ArrayBuffer.isView(message)) {\n throw new Error(INPUT_ERROR);\n }\n }\n } else {\n throw new Error(INPUT_ERROR);\n }\n notString = true;\n }\n var blocks = this.blocks, byteCount = this.byteCount, length2 = message.length, blockCount = this.blockCount, index2 = 0, s4 = this.s, i4, code;\n while (index2 < length2) {\n if (this.reset) {\n this.reset = false;\n blocks[0] = this.block;\n for (i4 = 1; i4 < blockCount + 1; ++i4) {\n blocks[i4] = 0;\n }\n }\n if (notString) {\n for (i4 = this.start; index2 < length2 && i4 < byteCount; ++index2) {\n blocks[i4 >> 2] |= message[index2] << SHIFT[i4++ & 3];\n }\n } else {\n for (i4 = this.start; index2 < length2 && i4 < byteCount; ++index2) {\n code = message.charCodeAt(index2);\n if (code < 128) {\n blocks[i4 >> 2] |= code << SHIFT[i4++ & 3];\n } else if (code < 2048) {\n blocks[i4 >> 2] |= (192 | code >> 6) << SHIFT[i4++ & 3];\n blocks[i4 >> 2] |= (128 | code & 63) << SHIFT[i4++ & 3];\n } else if (code < 55296 || code >= 57344) {\n blocks[i4 >> 2] |= (224 | code >> 12) << SHIFT[i4++ & 3];\n blocks[i4 >> 2] |= (128 | code >> 6 & 63) << SHIFT[i4++ & 3];\n blocks[i4 >> 2] |= (128 | code & 63) << SHIFT[i4++ & 3];\n } else {\n code = 65536 + ((code & 1023) << 10 | message.charCodeAt(++index2) & 1023);\n blocks[i4 >> 2] |= (240 | code >> 18) << SHIFT[i4++ & 3];\n blocks[i4 >> 2] |= (128 | code >> 12 & 63) << SHIFT[i4++ & 3];\n blocks[i4 >> 2] |= (128 | code >> 6 & 63) << SHIFT[i4++ & 3];\n blocks[i4 >> 2] |= (128 | code & 63) << SHIFT[i4++ & 3];\n }\n }\n }\n this.lastByteIndex = i4;\n if (i4 >= byteCount) {\n this.start = i4 - byteCount;\n this.block = blocks[blockCount];\n for (i4 = 0; i4 < blockCount; ++i4) {\n s4[i4] ^= blocks[i4];\n }\n f6(s4);\n this.reset = true;\n } else {\n this.start = i4;\n }\n }\n return this;\n };\n Keccak3.prototype.encode = function(x4, right) {\n var o5 = x4 & 255, n2 = 1;\n var bytes = [o5];\n x4 = x4 >> 8;\n o5 = x4 & 255;\n while (o5 > 0) {\n bytes.unshift(o5);\n x4 = x4 >> 8;\n o5 = x4 & 255;\n ++n2;\n }\n if (right) {\n bytes.push(n2);\n } else {\n bytes.unshift(n2);\n }\n this.update(bytes);\n return bytes.length;\n };\n Keccak3.prototype.encodeString = function(str) {\n var notString, type = typeof str;\n if (type !== \"string\") {\n if (type === \"object\") {\n if (str === null) {\n throw new Error(INPUT_ERROR);\n } else if (ARRAY_BUFFER && str.constructor === ArrayBuffer) {\n str = new Uint8Array(str);\n } else if (!Array.isArray(str)) {\n if (!ARRAY_BUFFER || !ArrayBuffer.isView(str)) {\n throw new Error(INPUT_ERROR);\n }\n }\n } else {\n throw new Error(INPUT_ERROR);\n }\n notString = true;\n }\n var bytes = 0, length2 = str.length;\n if (notString) {\n bytes = length2;\n } else {\n for (var i4 = 0; i4 < str.length; ++i4) {\n var code = str.charCodeAt(i4);\n if (code < 128) {\n bytes += 1;\n } else if (code < 2048) {\n bytes += 2;\n } else if (code < 55296 || code >= 57344) {\n bytes += 3;\n } else {\n code = 65536 + ((code & 1023) << 10 | str.charCodeAt(++i4) & 1023);\n bytes += 4;\n }\n }\n }\n bytes += this.encode(bytes * 8);\n this.update(str);\n return bytes;\n };\n Keccak3.prototype.bytepad = function(strs, w3) {\n var bytes = this.encode(w3);\n for (var i4 = 0; i4 < strs.length; ++i4) {\n bytes += this.encodeString(strs[i4]);\n }\n var paddingBytes = w3 - bytes % w3;\n var zeros = [];\n zeros.length = paddingBytes;\n this.update(zeros);\n return this;\n };\n Keccak3.prototype.finalize = function() {\n if (this.finalized) {\n return;\n }\n this.finalized = true;\n var blocks = this.blocks, i4 = this.lastByteIndex, blockCount = this.blockCount, s4 = this.s;\n blocks[i4 >> 2] |= this.padding[i4 & 3];\n if (this.lastByteIndex === this.byteCount) {\n blocks[0] = blocks[blockCount];\n for (i4 = 1; i4 < blockCount + 1; ++i4) {\n blocks[i4] = 0;\n }\n }\n blocks[blockCount - 1] |= 2147483648;\n for (i4 = 0; i4 < blockCount; ++i4) {\n s4[i4] ^= blocks[i4];\n }\n f6(s4);\n };\n Keccak3.prototype.toString = Keccak3.prototype.hex = function() {\n this.finalize();\n var blockCount = this.blockCount, s4 = this.s, outputBlocks = this.outputBlocks, extraBytes = this.extraBytes, i4 = 0, j3 = 0;\n var hex = \"\", block;\n while (j3 < outputBlocks) {\n for (i4 = 0; i4 < blockCount && j3 < outputBlocks; ++i4, ++j3) {\n block = s4[i4];\n hex += HEX_CHARS[block >> 4 & 15] + HEX_CHARS[block & 15] + HEX_CHARS[block >> 12 & 15] + HEX_CHARS[block >> 8 & 15] + HEX_CHARS[block >> 20 & 15] + HEX_CHARS[block >> 16 & 15] + HEX_CHARS[block >> 28 & 15] + HEX_CHARS[block >> 24 & 15];\n }\n if (j3 % blockCount === 0) {\n f6(s4);\n i4 = 0;\n }\n }\n if (extraBytes) {\n block = s4[i4];\n hex += HEX_CHARS[block >> 4 & 15] + HEX_CHARS[block & 15];\n if (extraBytes > 1) {\n hex += HEX_CHARS[block >> 12 & 15] + HEX_CHARS[block >> 8 & 15];\n }\n if (extraBytes > 2) {\n hex += HEX_CHARS[block >> 20 & 15] + HEX_CHARS[block >> 16 & 15];\n }\n }\n return hex;\n };\n Keccak3.prototype.arrayBuffer = function() {\n this.finalize();\n var blockCount = this.blockCount, s4 = this.s, outputBlocks = this.outputBlocks, extraBytes = this.extraBytes, i4 = 0, j3 = 0;\n var bytes = this.outputBits >> 3;\n var buffer2;\n if (extraBytes) {\n buffer2 = new ArrayBuffer(outputBlocks + 1 << 2);\n } else {\n buffer2 = new ArrayBuffer(bytes);\n }\n var array2 = new Uint32Array(buffer2);\n while (j3 < outputBlocks) {\n for (i4 = 0; i4 < blockCount && j3 < outputBlocks; ++i4, ++j3) {\n array2[j3] = s4[i4];\n }\n if (j3 % blockCount === 0) {\n f6(s4);\n }\n }\n if (extraBytes) {\n array2[i4] = s4[i4];\n buffer2 = buffer2.slice(0, bytes);\n }\n return buffer2;\n };\n Keccak3.prototype.buffer = Keccak3.prototype.arrayBuffer;\n Keccak3.prototype.digest = Keccak3.prototype.array = function() {\n this.finalize();\n var blockCount = this.blockCount, s4 = this.s, outputBlocks = this.outputBlocks, extraBytes = this.extraBytes, i4 = 0, j3 = 0;\n var array2 = [], offset, block;\n while (j3 < outputBlocks) {\n for (i4 = 0; i4 < blockCount && j3 < outputBlocks; ++i4, ++j3) {\n offset = j3 << 2;\n block = s4[i4];\n array2[offset] = block & 255;\n array2[offset + 1] = block >> 8 & 255;\n array2[offset + 2] = block >> 16 & 255;\n array2[offset + 3] = block >> 24 & 255;\n }\n if (j3 % blockCount === 0) {\n f6(s4);\n }\n }\n if (extraBytes) {\n offset = j3 << 2;\n block = s4[i4];\n array2[offset] = block & 255;\n if (extraBytes > 1) {\n array2[offset + 1] = block >> 8 & 255;\n }\n if (extraBytes > 2) {\n array2[offset + 2] = block >> 16 & 255;\n }\n }\n return array2;\n };\n function Kmac(bits2, padding, outputBits) {\n Keccak3.call(this, bits2, padding, outputBits);\n }\n Kmac.prototype = new Keccak3();\n Kmac.prototype.finalize = function() {\n this.encode(this.outputBits, true);\n return Keccak3.prototype.finalize.call(this);\n };\n var f6 = function(s4) {\n var h4, l6, n2, c0, c1, c22, c32, c4, c5, c6, c7, c8, c9, b0, b1, b22, b32, b4, b5, b6, b7, b8, b9, b10, b11, b12, b13, b14, b15, b16, b17, b18, b19, b20, b21, b222, b23, b24, b25, b26, b27, b28, b29, b30, b31, b322, b33, b34, b35, b36, b37, b38, b39, b40, b41, b42, b43, b44, b45, b46, b47, b48, b49;\n for (n2 = 0; n2 < 48; n2 += 2) {\n c0 = s4[0] ^ s4[10] ^ s4[20] ^ s4[30] ^ s4[40];\n c1 = s4[1] ^ s4[11] ^ s4[21] ^ s4[31] ^ s4[41];\n c22 = s4[2] ^ s4[12] ^ s4[22] ^ s4[32] ^ s4[42];\n c32 = s4[3] ^ s4[13] ^ s4[23] ^ s4[33] ^ s4[43];\n c4 = s4[4] ^ s4[14] ^ s4[24] ^ s4[34] ^ s4[44];\n c5 = s4[5] ^ s4[15] ^ s4[25] ^ s4[35] ^ s4[45];\n c6 = s4[6] ^ s4[16] ^ s4[26] ^ s4[36] ^ s4[46];\n c7 = s4[7] ^ s4[17] ^ s4[27] ^ s4[37] ^ s4[47];\n c8 = s4[8] ^ s4[18] ^ s4[28] ^ s4[38] ^ s4[48];\n c9 = s4[9] ^ s4[19] ^ s4[29] ^ s4[39] ^ s4[49];\n h4 = c8 ^ (c22 << 1 | c32 >>> 31);\n l6 = c9 ^ (c32 << 1 | c22 >>> 31);\n s4[0] ^= h4;\n s4[1] ^= l6;\n s4[10] ^= h4;\n s4[11] ^= l6;\n s4[20] ^= h4;\n s4[21] ^= l6;\n s4[30] ^= h4;\n s4[31] ^= l6;\n s4[40] ^= h4;\n s4[41] ^= l6;\n h4 = c0 ^ (c4 << 1 | c5 >>> 31);\n l6 = c1 ^ (c5 << 1 | c4 >>> 31);\n s4[2] ^= h4;\n s4[3] ^= l6;\n s4[12] ^= h4;\n s4[13] ^= l6;\n s4[22] ^= h4;\n s4[23] ^= l6;\n s4[32] ^= h4;\n s4[33] ^= l6;\n s4[42] ^= h4;\n s4[43] ^= l6;\n h4 = c22 ^ (c6 << 1 | c7 >>> 31);\n l6 = c32 ^ (c7 << 1 | c6 >>> 31);\n s4[4] ^= h4;\n s4[5] ^= l6;\n s4[14] ^= h4;\n s4[15] ^= l6;\n s4[24] ^= h4;\n s4[25] ^= l6;\n s4[34] ^= h4;\n s4[35] ^= l6;\n s4[44] ^= h4;\n s4[45] ^= l6;\n h4 = c4 ^ (c8 << 1 | c9 >>> 31);\n l6 = c5 ^ (c9 << 1 | c8 >>> 31);\n s4[6] ^= h4;\n s4[7] ^= l6;\n s4[16] ^= h4;\n s4[17] ^= l6;\n s4[26] ^= h4;\n s4[27] ^= l6;\n s4[36] ^= h4;\n s4[37] ^= l6;\n s4[46] ^= h4;\n s4[47] ^= l6;\n h4 = c6 ^ (c0 << 1 | c1 >>> 31);\n l6 = c7 ^ (c1 << 1 | c0 >>> 31);\n s4[8] ^= h4;\n s4[9] ^= l6;\n s4[18] ^= h4;\n s4[19] ^= l6;\n s4[28] ^= h4;\n s4[29] ^= l6;\n s4[38] ^= h4;\n s4[39] ^= l6;\n s4[48] ^= h4;\n s4[49] ^= l6;\n b0 = s4[0];\n b1 = s4[1];\n b322 = s4[11] << 4 | s4[10] >>> 28;\n b33 = s4[10] << 4 | s4[11] >>> 28;\n b14 = s4[20] << 3 | s4[21] >>> 29;\n b15 = s4[21] << 3 | s4[20] >>> 29;\n b46 = s4[31] << 9 | s4[30] >>> 23;\n b47 = s4[30] << 9 | s4[31] >>> 23;\n b28 = s4[40] << 18 | s4[41] >>> 14;\n b29 = s4[41] << 18 | s4[40] >>> 14;\n b20 = s4[2] << 1 | s4[3] >>> 31;\n b21 = s4[3] << 1 | s4[2] >>> 31;\n b22 = s4[13] << 12 | s4[12] >>> 20;\n b32 = s4[12] << 12 | s4[13] >>> 20;\n b34 = s4[22] << 10 | s4[23] >>> 22;\n b35 = s4[23] << 10 | s4[22] >>> 22;\n b16 = s4[33] << 13 | s4[32] >>> 19;\n b17 = s4[32] << 13 | s4[33] >>> 19;\n b48 = s4[42] << 2 | s4[43] >>> 30;\n b49 = s4[43] << 2 | s4[42] >>> 30;\n b40 = s4[5] << 30 | s4[4] >>> 2;\n b41 = s4[4] << 30 | s4[5] >>> 2;\n b222 = s4[14] << 6 | s4[15] >>> 26;\n b23 = s4[15] << 6 | s4[14] >>> 26;\n b4 = s4[25] << 11 | s4[24] >>> 21;\n b5 = s4[24] << 11 | s4[25] >>> 21;\n b36 = s4[34] << 15 | s4[35] >>> 17;\n b37 = s4[35] << 15 | s4[34] >>> 17;\n b18 = s4[45] << 29 | s4[44] >>> 3;\n b19 = s4[44] << 29 | s4[45] >>> 3;\n b10 = s4[6] << 28 | s4[7] >>> 4;\n b11 = s4[7] << 28 | s4[6] >>> 4;\n b42 = s4[17] << 23 | s4[16] >>> 9;\n b43 = s4[16] << 23 | s4[17] >>> 9;\n b24 = s4[26] << 25 | s4[27] >>> 7;\n b25 = s4[27] << 25 | s4[26] >>> 7;\n b6 = s4[36] << 21 | s4[37] >>> 11;\n b7 = s4[37] << 21 | s4[36] >>> 11;\n b38 = s4[47] << 24 | s4[46] >>> 8;\n b39 = s4[46] << 24 | s4[47] >>> 8;\n b30 = s4[8] << 27 | s4[9] >>> 5;\n b31 = s4[9] << 27 | s4[8] >>> 5;\n b12 = s4[18] << 20 | s4[19] >>> 12;\n b13 = s4[19] << 20 | s4[18] >>> 12;\n b44 = s4[29] << 7 | s4[28] >>> 25;\n b45 = s4[28] << 7 | s4[29] >>> 25;\n b26 = s4[38] << 8 | s4[39] >>> 24;\n b27 = s4[39] << 8 | s4[38] >>> 24;\n b8 = s4[48] << 14 | s4[49] >>> 18;\n b9 = s4[49] << 14 | s4[48] >>> 18;\n s4[0] = b0 ^ ~b22 & b4;\n s4[1] = b1 ^ ~b32 & b5;\n s4[10] = b10 ^ ~b12 & b14;\n s4[11] = b11 ^ ~b13 & b15;\n s4[20] = b20 ^ ~b222 & b24;\n s4[21] = b21 ^ ~b23 & b25;\n s4[30] = b30 ^ ~b322 & b34;\n s4[31] = b31 ^ ~b33 & b35;\n s4[40] = b40 ^ ~b42 & b44;\n s4[41] = b41 ^ ~b43 & b45;\n s4[2] = b22 ^ ~b4 & b6;\n s4[3] = b32 ^ ~b5 & b7;\n s4[12] = b12 ^ ~b14 & b16;\n s4[13] = b13 ^ ~b15 & b17;\n s4[22] = b222 ^ ~b24 & b26;\n s4[23] = b23 ^ ~b25 & b27;\n s4[32] = b322 ^ ~b34 & b36;\n s4[33] = b33 ^ ~b35 & b37;\n s4[42] = b42 ^ ~b44 & b46;\n s4[43] = b43 ^ ~b45 & b47;\n s4[4] = b4 ^ ~b6 & b8;\n s4[5] = b5 ^ ~b7 & b9;\n s4[14] = b14 ^ ~b16 & b18;\n s4[15] = b15 ^ ~b17 & b19;\n s4[24] = b24 ^ ~b26 & b28;\n s4[25] = b25 ^ ~b27 & b29;\n s4[34] = b34 ^ ~b36 & b38;\n s4[35] = b35 ^ ~b37 & b39;\n s4[44] = b44 ^ ~b46 & b48;\n s4[45] = b45 ^ ~b47 & b49;\n s4[6] = b6 ^ ~b8 & b0;\n s4[7] = b7 ^ ~b9 & b1;\n s4[16] = b16 ^ ~b18 & b10;\n s4[17] = b17 ^ ~b19 & b11;\n s4[26] = b26 ^ ~b28 & b20;\n s4[27] = b27 ^ ~b29 & b21;\n s4[36] = b36 ^ ~b38 & b30;\n s4[37] = b37 ^ ~b39 & b31;\n s4[46] = b46 ^ ~b48 & b40;\n s4[47] = b47 ^ ~b49 & b41;\n s4[8] = b8 ^ ~b0 & b22;\n s4[9] = b9 ^ ~b1 & b32;\n s4[18] = b18 ^ ~b10 & b12;\n s4[19] = b19 ^ ~b11 & b13;\n s4[28] = b28 ^ ~b20 & b222;\n s4[29] = b29 ^ ~b21 & b23;\n s4[38] = b38 ^ ~b30 & b322;\n s4[39] = b39 ^ ~b31 & b33;\n s4[48] = b48 ^ ~b40 & b42;\n s4[49] = b49 ^ ~b41 & b43;\n s4[0] ^= RC[n2];\n s4[1] ^= RC[n2 + 1];\n }\n };\n if (COMMON_JS) {\n module.exports = methods;\n } else {\n for (i3 = 0; i3 < methodNames.length; ++i3) {\n root[methodNames[i3]] = methods[methodNames[i3]];\n }\n if (AMD) {\n define(function() {\n return methods;\n });\n }\n }\n })();\n }\n });\n\n // ../../../node_modules/.pnpm/@ethersproject+keccak256@5.8.0/node_modules/@ethersproject/keccak256/lib/index.js\n var require_lib5 = __commonJS({\n \"../../../node_modules/.pnpm/@ethersproject+keccak256@5.8.0/node_modules/@ethersproject/keccak256/lib/index.js\"(exports3) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n var __importDefault3 = exports3 && exports3.__importDefault || function(mod3) {\n return mod3 && mod3.__esModule ? mod3 : { \"default\": mod3 };\n };\n Object.defineProperty(exports3, \"__esModule\", { value: true });\n exports3.keccak256 = void 0;\n var js_sha3_1 = __importDefault3(require_sha3());\n var bytes_1 = require_lib2();\n function keccak2563(data) {\n return \"0x\" + js_sha3_1.default.keccak_256((0, bytes_1.arrayify)(data));\n }\n exports3.keccak256 = keccak2563;\n }\n });\n\n // ../../../node_modules/.pnpm/@ethersproject+rlp@5.8.0/node_modules/@ethersproject/rlp/lib/_version.js\n var require_version6 = __commonJS({\n \"../../../node_modules/.pnpm/@ethersproject+rlp@5.8.0/node_modules/@ethersproject/rlp/lib/_version.js\"(exports3) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n Object.defineProperty(exports3, \"__esModule\", { value: true });\n exports3.version = void 0;\n exports3.version = \"rlp/5.8.0\";\n }\n });\n\n // ../../../node_modules/.pnpm/@ethersproject+rlp@5.8.0/node_modules/@ethersproject/rlp/lib/index.js\n var require_lib6 = __commonJS({\n \"../../../node_modules/.pnpm/@ethersproject+rlp@5.8.0/node_modules/@ethersproject/rlp/lib/index.js\"(exports3) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n Object.defineProperty(exports3, \"__esModule\", { value: true });\n exports3.decode = exports3.encode = void 0;\n var bytes_1 = require_lib2();\n var logger_1 = require_lib();\n var _version_1 = require_version6();\n var logger = new logger_1.Logger(_version_1.version);\n function arrayifyInteger(value) {\n var result = [];\n while (value) {\n result.unshift(value & 255);\n value >>= 8;\n }\n return result;\n }\n function unarrayifyInteger(data, offset, length2) {\n var result = 0;\n for (var i3 = 0; i3 < length2; i3++) {\n result = result * 256 + data[offset + i3];\n }\n return result;\n }\n function _encode(object2) {\n if (Array.isArray(object2)) {\n var payload_1 = [];\n object2.forEach(function(child) {\n payload_1 = payload_1.concat(_encode(child));\n });\n if (payload_1.length <= 55) {\n payload_1.unshift(192 + payload_1.length);\n return payload_1;\n }\n var length_1 = arrayifyInteger(payload_1.length);\n length_1.unshift(247 + length_1.length);\n return length_1.concat(payload_1);\n }\n if (!(0, bytes_1.isBytesLike)(object2)) {\n logger.throwArgumentError(\"RLP object must be BytesLike\", \"object\", object2);\n }\n var data = Array.prototype.slice.call((0, bytes_1.arrayify)(object2));\n if (data.length === 1 && data[0] <= 127) {\n return data;\n } else if (data.length <= 55) {\n data.unshift(128 + data.length);\n return data;\n }\n var length2 = arrayifyInteger(data.length);\n length2.unshift(183 + length2.length);\n return length2.concat(data);\n }\n function encode6(object2) {\n return (0, bytes_1.hexlify)(_encode(object2));\n }\n exports3.encode = encode6;\n function _decodeChildren(data, offset, childOffset, length2) {\n var result = [];\n while (childOffset < offset + 1 + length2) {\n var decoded = _decode(data, childOffset);\n result.push(decoded.result);\n childOffset += decoded.consumed;\n if (childOffset > offset + 1 + length2) {\n logger.throwError(\"child data too short\", logger_1.Logger.errors.BUFFER_OVERRUN, {});\n }\n }\n return { consumed: 1 + length2, result };\n }\n function _decode(data, offset) {\n if (data.length === 0) {\n logger.throwError(\"data too short\", logger_1.Logger.errors.BUFFER_OVERRUN, {});\n }\n if (data[offset] >= 248) {\n var lengthLength = data[offset] - 247;\n if (offset + 1 + lengthLength > data.length) {\n logger.throwError(\"data short segment too short\", logger_1.Logger.errors.BUFFER_OVERRUN, {});\n }\n var length_2 = unarrayifyInteger(data, offset + 1, lengthLength);\n if (offset + 1 + lengthLength + length_2 > data.length) {\n logger.throwError(\"data long segment too short\", logger_1.Logger.errors.BUFFER_OVERRUN, {});\n }\n return _decodeChildren(data, offset, offset + 1 + lengthLength, lengthLength + length_2);\n } else if (data[offset] >= 192) {\n var length_3 = data[offset] - 192;\n if (offset + 1 + length_3 > data.length) {\n logger.throwError(\"data array too short\", logger_1.Logger.errors.BUFFER_OVERRUN, {});\n }\n return _decodeChildren(data, offset, offset + 1, length_3);\n } else if (data[offset] >= 184) {\n var lengthLength = data[offset] - 183;\n if (offset + 1 + lengthLength > data.length) {\n logger.throwError(\"data array too short\", logger_1.Logger.errors.BUFFER_OVERRUN, {});\n }\n var length_4 = unarrayifyInteger(data, offset + 1, lengthLength);\n if (offset + 1 + lengthLength + length_4 > data.length) {\n logger.throwError(\"data array too short\", logger_1.Logger.errors.BUFFER_OVERRUN, {});\n }\n var result = (0, bytes_1.hexlify)(data.slice(offset + 1 + lengthLength, offset + 1 + lengthLength + length_4));\n return { consumed: 1 + lengthLength + length_4, result };\n } else if (data[offset] >= 128) {\n var length_5 = data[offset] - 128;\n if (offset + 1 + length_5 > data.length) {\n logger.throwError(\"data too short\", logger_1.Logger.errors.BUFFER_OVERRUN, {});\n }\n var result = (0, bytes_1.hexlify)(data.slice(offset + 1, offset + 1 + length_5));\n return { consumed: 1 + length_5, result };\n }\n return { consumed: 1, result: (0, bytes_1.hexlify)(data[offset]) };\n }\n function decode2(data) {\n var bytes = (0, bytes_1.arrayify)(data);\n var decoded = _decode(bytes, 0);\n if (decoded.consumed !== bytes.length) {\n logger.throwArgumentError(\"invalid rlp data\", \"data\", data);\n }\n return decoded.result;\n }\n exports3.decode = decode2;\n }\n });\n\n // ../../../node_modules/.pnpm/@ethersproject+address@5.8.0/node_modules/@ethersproject/address/lib/_version.js\n var require_version7 = __commonJS({\n \"../../../node_modules/.pnpm/@ethersproject+address@5.8.0/node_modules/@ethersproject/address/lib/_version.js\"(exports3) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n Object.defineProperty(exports3, \"__esModule\", { value: true });\n exports3.version = void 0;\n exports3.version = \"address/5.8.0\";\n }\n });\n\n // ../../../node_modules/.pnpm/@ethersproject+address@5.8.0/node_modules/@ethersproject/address/lib/index.js\n var require_lib7 = __commonJS({\n \"../../../node_modules/.pnpm/@ethersproject+address@5.8.0/node_modules/@ethersproject/address/lib/index.js\"(exports3) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n Object.defineProperty(exports3, \"__esModule\", { value: true });\n exports3.getCreate2Address = exports3.getContractAddress = exports3.getIcapAddress = exports3.isAddress = exports3.getAddress = void 0;\n var bytes_1 = require_lib2();\n var bignumber_1 = require_lib3();\n var keccak256_1 = require_lib5();\n var rlp_1 = require_lib6();\n var logger_1 = require_lib();\n var _version_1 = require_version7();\n var logger = new logger_1.Logger(_version_1.version);\n function getChecksumAddress(address) {\n if (!(0, bytes_1.isHexString)(address, 20)) {\n logger.throwArgumentError(\"invalid address\", \"address\", address);\n }\n address = address.toLowerCase();\n var chars = address.substring(2).split(\"\");\n var expanded = new Uint8Array(40);\n for (var i4 = 0; i4 < 40; i4++) {\n expanded[i4] = chars[i4].charCodeAt(0);\n }\n var hashed = (0, bytes_1.arrayify)((0, keccak256_1.keccak256)(expanded));\n for (var i4 = 0; i4 < 40; i4 += 2) {\n if (hashed[i4 >> 1] >> 4 >= 8) {\n chars[i4] = chars[i4].toUpperCase();\n }\n if ((hashed[i4 >> 1] & 15) >= 8) {\n chars[i4 + 1] = chars[i4 + 1].toUpperCase();\n }\n }\n return \"0x\" + chars.join(\"\");\n }\n var MAX_SAFE_INTEGER = 9007199254740991;\n function log10(x4) {\n if (Math.log10) {\n return Math.log10(x4);\n }\n return Math.log(x4) / Math.LN10;\n }\n var ibanLookup = {};\n for (i3 = 0; i3 < 10; i3++) {\n ibanLookup[String(i3)] = String(i3);\n }\n var i3;\n for (i3 = 0; i3 < 26; i3++) {\n ibanLookup[String.fromCharCode(65 + i3)] = String(10 + i3);\n }\n var i3;\n var safeDigits = Math.floor(log10(MAX_SAFE_INTEGER));\n function ibanChecksum(address) {\n address = address.toUpperCase();\n address = address.substring(4) + address.substring(0, 2) + \"00\";\n var expanded = address.split(\"\").map(function(c4) {\n return ibanLookup[c4];\n }).join(\"\");\n while (expanded.length >= safeDigits) {\n var block = expanded.substring(0, safeDigits);\n expanded = parseInt(block, 10) % 97 + expanded.substring(block.length);\n }\n var checksum4 = String(98 - parseInt(expanded, 10) % 97);\n while (checksum4.length < 2) {\n checksum4 = \"0\" + checksum4;\n }\n return checksum4;\n }\n function getAddress3(address) {\n var result = null;\n if (typeof address !== \"string\") {\n logger.throwArgumentError(\"invalid address\", \"address\", address);\n }\n if (address.match(/^(0x)?[0-9a-fA-F]{40}$/)) {\n if (address.substring(0, 2) !== \"0x\") {\n address = \"0x\" + address;\n }\n result = getChecksumAddress(address);\n if (address.match(/([A-F].*[a-f])|([a-f].*[A-F])/) && result !== address) {\n logger.throwArgumentError(\"bad address checksum\", \"address\", address);\n }\n } else if (address.match(/^XE[0-9]{2}[0-9A-Za-z]{30,31}$/)) {\n if (address.substring(2, 4) !== ibanChecksum(address)) {\n logger.throwArgumentError(\"bad icap checksum\", \"address\", address);\n }\n result = (0, bignumber_1._base36To16)(address.substring(4));\n while (result.length < 40) {\n result = \"0\" + result;\n }\n result = getChecksumAddress(\"0x\" + result);\n } else {\n logger.throwArgumentError(\"invalid address\", \"address\", address);\n }\n return result;\n }\n exports3.getAddress = getAddress3;\n function isAddress2(address) {\n try {\n getAddress3(address);\n return true;\n } catch (error) {\n }\n return false;\n }\n exports3.isAddress = isAddress2;\n function getIcapAddress(address) {\n var base36 = (0, bignumber_1._base16To36)(getAddress3(address).substring(2)).toUpperCase();\n while (base36.length < 30) {\n base36 = \"0\" + base36;\n }\n return \"XE\" + ibanChecksum(\"XE00\" + base36) + base36;\n }\n exports3.getIcapAddress = getIcapAddress;\n function getContractAddress3(transaction) {\n var from14 = null;\n try {\n from14 = getAddress3(transaction.from);\n } catch (error) {\n logger.throwArgumentError(\"missing from address\", \"transaction\", transaction);\n }\n var nonce = (0, bytes_1.stripZeros)((0, bytes_1.arrayify)(bignumber_1.BigNumber.from(transaction.nonce).toHexString()));\n return getAddress3((0, bytes_1.hexDataSlice)((0, keccak256_1.keccak256)((0, rlp_1.encode)([from14, nonce])), 12));\n }\n exports3.getContractAddress = getContractAddress3;\n function getCreate2Address2(from14, salt, initCodeHash) {\n if ((0, bytes_1.hexDataLength)(salt) !== 32) {\n logger.throwArgumentError(\"salt must be 32 bytes\", \"salt\", salt);\n }\n if ((0, bytes_1.hexDataLength)(initCodeHash) !== 32) {\n logger.throwArgumentError(\"initCodeHash must be 32 bytes\", \"initCodeHash\", initCodeHash);\n }\n return getAddress3((0, bytes_1.hexDataSlice)((0, keccak256_1.keccak256)((0, bytes_1.concat)([\"0xff\", getAddress3(from14), salt, initCodeHash])), 12));\n }\n exports3.getCreate2Address = getCreate2Address2;\n }\n });\n\n // ../../../node_modules/.pnpm/@ethersproject+abi@5.8.0/node_modules/@ethersproject/abi/lib/coders/address.js\n var require_address = __commonJS({\n \"../../../node_modules/.pnpm/@ethersproject+abi@5.8.0/node_modules/@ethersproject/abi/lib/coders/address.js\"(exports3) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n var __extends3 = exports3 && exports3.__extends || /* @__PURE__ */ function() {\n var extendStatics3 = function(d5, b4) {\n extendStatics3 = Object.setPrototypeOf || { __proto__: [] } instanceof Array && function(d6, b5) {\n d6.__proto__ = b5;\n } || function(d6, b5) {\n for (var p4 in b5)\n if (Object.prototype.hasOwnProperty.call(b5, p4))\n d6[p4] = b5[p4];\n };\n return extendStatics3(d5, b4);\n };\n return function(d5, b4) {\n if (typeof b4 !== \"function\" && b4 !== null)\n throw new TypeError(\"Class extends value \" + String(b4) + \" is not a constructor or null\");\n extendStatics3(d5, b4);\n function __() {\n this.constructor = d5;\n }\n d5.prototype = b4 === null ? Object.create(b4) : (__.prototype = b4.prototype, new __());\n };\n }();\n Object.defineProperty(exports3, \"__esModule\", { value: true });\n exports3.AddressCoder = void 0;\n var address_1 = require_lib7();\n var bytes_1 = require_lib2();\n var abstract_coder_1 = require_abstract_coder();\n var AddressCoder = (\n /** @class */\n function(_super) {\n __extends3(AddressCoder2, _super);\n function AddressCoder2(localName) {\n return _super.call(this, \"address\", \"address\", localName, false) || this;\n }\n AddressCoder2.prototype.defaultValue = function() {\n return \"0x0000000000000000000000000000000000000000\";\n };\n AddressCoder2.prototype.encode = function(writer, value) {\n try {\n value = (0, address_1.getAddress)(value);\n } catch (error) {\n this._throwError(error.message, value);\n }\n return writer.writeValue(value);\n };\n AddressCoder2.prototype.decode = function(reader) {\n return (0, address_1.getAddress)((0, bytes_1.hexZeroPad)(reader.readValue().toHexString(), 20));\n };\n return AddressCoder2;\n }(abstract_coder_1.Coder)\n );\n exports3.AddressCoder = AddressCoder;\n }\n });\n\n // ../../../node_modules/.pnpm/@ethersproject+abi@5.8.0/node_modules/@ethersproject/abi/lib/coders/anonymous.js\n var require_anonymous = __commonJS({\n \"../../../node_modules/.pnpm/@ethersproject+abi@5.8.0/node_modules/@ethersproject/abi/lib/coders/anonymous.js\"(exports3) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n var __extends3 = exports3 && exports3.__extends || /* @__PURE__ */ function() {\n var extendStatics3 = function(d5, b4) {\n extendStatics3 = Object.setPrototypeOf || { __proto__: [] } instanceof Array && function(d6, b5) {\n d6.__proto__ = b5;\n } || function(d6, b5) {\n for (var p4 in b5)\n if (Object.prototype.hasOwnProperty.call(b5, p4))\n d6[p4] = b5[p4];\n };\n return extendStatics3(d5, b4);\n };\n return function(d5, b4) {\n if (typeof b4 !== \"function\" && b4 !== null)\n throw new TypeError(\"Class extends value \" + String(b4) + \" is not a constructor or null\");\n extendStatics3(d5, b4);\n function __() {\n this.constructor = d5;\n }\n d5.prototype = b4 === null ? Object.create(b4) : (__.prototype = b4.prototype, new __());\n };\n }();\n Object.defineProperty(exports3, \"__esModule\", { value: true });\n exports3.AnonymousCoder = void 0;\n var abstract_coder_1 = require_abstract_coder();\n var AnonymousCoder = (\n /** @class */\n function(_super) {\n __extends3(AnonymousCoder2, _super);\n function AnonymousCoder2(coder) {\n var _this = _super.call(this, coder.name, coder.type, void 0, coder.dynamic) || this;\n _this.coder = coder;\n return _this;\n }\n AnonymousCoder2.prototype.defaultValue = function() {\n return this.coder.defaultValue();\n };\n AnonymousCoder2.prototype.encode = function(writer, value) {\n return this.coder.encode(writer, value);\n };\n AnonymousCoder2.prototype.decode = function(reader) {\n return this.coder.decode(reader);\n };\n return AnonymousCoder2;\n }(abstract_coder_1.Coder)\n );\n exports3.AnonymousCoder = AnonymousCoder;\n }\n });\n\n // ../../../node_modules/.pnpm/@ethersproject+abi@5.8.0/node_modules/@ethersproject/abi/lib/coders/array.js\n var require_array = __commonJS({\n \"../../../node_modules/.pnpm/@ethersproject+abi@5.8.0/node_modules/@ethersproject/abi/lib/coders/array.js\"(exports3) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n var __extends3 = exports3 && exports3.__extends || /* @__PURE__ */ function() {\n var extendStatics3 = function(d5, b4) {\n extendStatics3 = Object.setPrototypeOf || { __proto__: [] } instanceof Array && function(d6, b5) {\n d6.__proto__ = b5;\n } || function(d6, b5) {\n for (var p4 in b5)\n if (Object.prototype.hasOwnProperty.call(b5, p4))\n d6[p4] = b5[p4];\n };\n return extendStatics3(d5, b4);\n };\n return function(d5, b4) {\n if (typeof b4 !== \"function\" && b4 !== null)\n throw new TypeError(\"Class extends value \" + String(b4) + \" is not a constructor or null\");\n extendStatics3(d5, b4);\n function __() {\n this.constructor = d5;\n }\n d5.prototype = b4 === null ? Object.create(b4) : (__.prototype = b4.prototype, new __());\n };\n }();\n Object.defineProperty(exports3, \"__esModule\", { value: true });\n exports3.ArrayCoder = exports3.unpack = exports3.pack = void 0;\n var logger_1 = require_lib();\n var _version_1 = require_version5();\n var logger = new logger_1.Logger(_version_1.version);\n var abstract_coder_1 = require_abstract_coder();\n var anonymous_1 = require_anonymous();\n function pack(writer, coders, values) {\n var arrayValues = null;\n if (Array.isArray(values)) {\n arrayValues = values;\n } else if (values && typeof values === \"object\") {\n var unique_1 = {};\n arrayValues = coders.map(function(coder) {\n var name = coder.localName;\n if (!name) {\n logger.throwError(\"cannot encode object for signature with missing names\", logger_1.Logger.errors.INVALID_ARGUMENT, {\n argument: \"values\",\n coder,\n value: values\n });\n }\n if (unique_1[name]) {\n logger.throwError(\"cannot encode object for signature with duplicate names\", logger_1.Logger.errors.INVALID_ARGUMENT, {\n argument: \"values\",\n coder,\n value: values\n });\n }\n unique_1[name] = true;\n return values[name];\n });\n } else {\n logger.throwArgumentError(\"invalid tuple value\", \"tuple\", values);\n }\n if (coders.length !== arrayValues.length) {\n logger.throwArgumentError(\"types/value length mismatch\", \"tuple\", values);\n }\n var staticWriter = new abstract_coder_1.Writer(writer.wordSize);\n var dynamicWriter = new abstract_coder_1.Writer(writer.wordSize);\n var updateFuncs = [];\n coders.forEach(function(coder, index2) {\n var value = arrayValues[index2];\n if (coder.dynamic) {\n var dynamicOffset_1 = dynamicWriter.length;\n coder.encode(dynamicWriter, value);\n var updateFunc_1 = staticWriter.writeUpdatableValue();\n updateFuncs.push(function(baseOffset) {\n updateFunc_1(baseOffset + dynamicOffset_1);\n });\n } else {\n coder.encode(staticWriter, value);\n }\n });\n updateFuncs.forEach(function(func) {\n func(staticWriter.length);\n });\n var length2 = writer.appendWriter(staticWriter);\n length2 += writer.appendWriter(dynamicWriter);\n return length2;\n }\n exports3.pack = pack;\n function unpack(reader, coders) {\n var values = [];\n var baseReader = reader.subReader(0);\n coders.forEach(function(coder) {\n var value = null;\n if (coder.dynamic) {\n var offset = reader.readValue();\n var offsetReader = baseReader.subReader(offset.toNumber());\n try {\n value = coder.decode(offsetReader);\n } catch (error) {\n if (error.code === logger_1.Logger.errors.BUFFER_OVERRUN) {\n throw error;\n }\n value = error;\n value.baseType = coder.name;\n value.name = coder.localName;\n value.type = coder.type;\n }\n } else {\n try {\n value = coder.decode(reader);\n } catch (error) {\n if (error.code === logger_1.Logger.errors.BUFFER_OVERRUN) {\n throw error;\n }\n value = error;\n value.baseType = coder.name;\n value.name = coder.localName;\n value.type = coder.type;\n }\n }\n if (value != void 0) {\n values.push(value);\n }\n });\n var uniqueNames = coders.reduce(function(accum, coder) {\n var name = coder.localName;\n if (name) {\n if (!accum[name]) {\n accum[name] = 0;\n }\n accum[name]++;\n }\n return accum;\n }, {});\n coders.forEach(function(coder, index2) {\n var name = coder.localName;\n if (!name || uniqueNames[name] !== 1) {\n return;\n }\n if (name === \"length\") {\n name = \"_length\";\n }\n if (values[name] != null) {\n return;\n }\n var value = values[index2];\n if (value instanceof Error) {\n Object.defineProperty(values, name, {\n enumerable: true,\n get: function() {\n throw value;\n }\n });\n } else {\n values[name] = value;\n }\n });\n var _loop_1 = function(i4) {\n var value = values[i4];\n if (value instanceof Error) {\n Object.defineProperty(values, i4, {\n enumerable: true,\n get: function() {\n throw value;\n }\n });\n }\n };\n for (var i3 = 0; i3 < values.length; i3++) {\n _loop_1(i3);\n }\n return Object.freeze(values);\n }\n exports3.unpack = unpack;\n var ArrayCoder = (\n /** @class */\n function(_super) {\n __extends3(ArrayCoder2, _super);\n function ArrayCoder2(coder, length2, localName) {\n var _this = this;\n var type = coder.type + \"[\" + (length2 >= 0 ? length2 : \"\") + \"]\";\n var dynamic = length2 === -1 || coder.dynamic;\n _this = _super.call(this, \"array\", type, localName, dynamic) || this;\n _this.coder = coder;\n _this.length = length2;\n return _this;\n }\n ArrayCoder2.prototype.defaultValue = function() {\n var defaultChild = this.coder.defaultValue();\n var result = [];\n for (var i3 = 0; i3 < this.length; i3++) {\n result.push(defaultChild);\n }\n return result;\n };\n ArrayCoder2.prototype.encode = function(writer, value) {\n if (!Array.isArray(value)) {\n this._throwError(\"expected array value\", value);\n }\n var count = this.length;\n if (count === -1) {\n count = value.length;\n writer.writeValue(value.length);\n }\n logger.checkArgumentCount(value.length, count, \"coder array\" + (this.localName ? \" \" + this.localName : \"\"));\n var coders = [];\n for (var i3 = 0; i3 < value.length; i3++) {\n coders.push(this.coder);\n }\n return pack(writer, coders, value);\n };\n ArrayCoder2.prototype.decode = function(reader) {\n var count = this.length;\n if (count === -1) {\n count = reader.readValue().toNumber();\n if (count * 32 > reader._data.length) {\n logger.throwError(\"insufficient data length\", logger_1.Logger.errors.BUFFER_OVERRUN, {\n length: reader._data.length,\n count\n });\n }\n }\n var coders = [];\n for (var i3 = 0; i3 < count; i3++) {\n coders.push(new anonymous_1.AnonymousCoder(this.coder));\n }\n return reader.coerce(this.name, unpack(reader, coders));\n };\n return ArrayCoder2;\n }(abstract_coder_1.Coder)\n );\n exports3.ArrayCoder = ArrayCoder;\n }\n });\n\n // ../../../node_modules/.pnpm/@ethersproject+abi@5.8.0/node_modules/@ethersproject/abi/lib/coders/boolean.js\n var require_boolean = __commonJS({\n \"../../../node_modules/.pnpm/@ethersproject+abi@5.8.0/node_modules/@ethersproject/abi/lib/coders/boolean.js\"(exports3) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n var __extends3 = exports3 && exports3.__extends || /* @__PURE__ */ function() {\n var extendStatics3 = function(d5, b4) {\n extendStatics3 = Object.setPrototypeOf || { __proto__: [] } instanceof Array && function(d6, b5) {\n d6.__proto__ = b5;\n } || function(d6, b5) {\n for (var p4 in b5)\n if (Object.prototype.hasOwnProperty.call(b5, p4))\n d6[p4] = b5[p4];\n };\n return extendStatics3(d5, b4);\n };\n return function(d5, b4) {\n if (typeof b4 !== \"function\" && b4 !== null)\n throw new TypeError(\"Class extends value \" + String(b4) + \" is not a constructor or null\");\n extendStatics3(d5, b4);\n function __() {\n this.constructor = d5;\n }\n d5.prototype = b4 === null ? Object.create(b4) : (__.prototype = b4.prototype, new __());\n };\n }();\n Object.defineProperty(exports3, \"__esModule\", { value: true });\n exports3.BooleanCoder = void 0;\n var abstract_coder_1 = require_abstract_coder();\n var BooleanCoder = (\n /** @class */\n function(_super) {\n __extends3(BooleanCoder2, _super);\n function BooleanCoder2(localName) {\n return _super.call(this, \"bool\", \"bool\", localName, false) || this;\n }\n BooleanCoder2.prototype.defaultValue = function() {\n return false;\n };\n BooleanCoder2.prototype.encode = function(writer, value) {\n return writer.writeValue(value ? 1 : 0);\n };\n BooleanCoder2.prototype.decode = function(reader) {\n return reader.coerce(this.type, !reader.readValue().isZero());\n };\n return BooleanCoder2;\n }(abstract_coder_1.Coder)\n );\n exports3.BooleanCoder = BooleanCoder;\n }\n });\n\n // ../../../node_modules/.pnpm/@ethersproject+abi@5.8.0/node_modules/@ethersproject/abi/lib/coders/bytes.js\n var require_bytes = __commonJS({\n \"../../../node_modules/.pnpm/@ethersproject+abi@5.8.0/node_modules/@ethersproject/abi/lib/coders/bytes.js\"(exports3) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n var __extends3 = exports3 && exports3.__extends || /* @__PURE__ */ function() {\n var extendStatics3 = function(d5, b4) {\n extendStatics3 = Object.setPrototypeOf || { __proto__: [] } instanceof Array && function(d6, b5) {\n d6.__proto__ = b5;\n } || function(d6, b5) {\n for (var p4 in b5)\n if (Object.prototype.hasOwnProperty.call(b5, p4))\n d6[p4] = b5[p4];\n };\n return extendStatics3(d5, b4);\n };\n return function(d5, b4) {\n if (typeof b4 !== \"function\" && b4 !== null)\n throw new TypeError(\"Class extends value \" + String(b4) + \" is not a constructor or null\");\n extendStatics3(d5, b4);\n function __() {\n this.constructor = d5;\n }\n d5.prototype = b4 === null ? Object.create(b4) : (__.prototype = b4.prototype, new __());\n };\n }();\n Object.defineProperty(exports3, \"__esModule\", { value: true });\n exports3.BytesCoder = exports3.DynamicBytesCoder = void 0;\n var bytes_1 = require_lib2();\n var abstract_coder_1 = require_abstract_coder();\n var DynamicBytesCoder = (\n /** @class */\n function(_super) {\n __extends3(DynamicBytesCoder2, _super);\n function DynamicBytesCoder2(type, localName) {\n return _super.call(this, type, type, localName, true) || this;\n }\n DynamicBytesCoder2.prototype.defaultValue = function() {\n return \"0x\";\n };\n DynamicBytesCoder2.prototype.encode = function(writer, value) {\n value = (0, bytes_1.arrayify)(value);\n var length2 = writer.writeValue(value.length);\n length2 += writer.writeBytes(value);\n return length2;\n };\n DynamicBytesCoder2.prototype.decode = function(reader) {\n return reader.readBytes(reader.readValue().toNumber(), true);\n };\n return DynamicBytesCoder2;\n }(abstract_coder_1.Coder)\n );\n exports3.DynamicBytesCoder = DynamicBytesCoder;\n var BytesCoder = (\n /** @class */\n function(_super) {\n __extends3(BytesCoder2, _super);\n function BytesCoder2(localName) {\n return _super.call(this, \"bytes\", localName) || this;\n }\n BytesCoder2.prototype.decode = function(reader) {\n return reader.coerce(this.name, (0, bytes_1.hexlify)(_super.prototype.decode.call(this, reader)));\n };\n return BytesCoder2;\n }(DynamicBytesCoder)\n );\n exports3.BytesCoder = BytesCoder;\n }\n });\n\n // ../../../node_modules/.pnpm/@ethersproject+abi@5.8.0/node_modules/@ethersproject/abi/lib/coders/fixed-bytes.js\n var require_fixed_bytes = __commonJS({\n \"../../../node_modules/.pnpm/@ethersproject+abi@5.8.0/node_modules/@ethersproject/abi/lib/coders/fixed-bytes.js\"(exports3) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n var __extends3 = exports3 && exports3.__extends || /* @__PURE__ */ function() {\n var extendStatics3 = function(d5, b4) {\n extendStatics3 = Object.setPrototypeOf || { __proto__: [] } instanceof Array && function(d6, b5) {\n d6.__proto__ = b5;\n } || function(d6, b5) {\n for (var p4 in b5)\n if (Object.prototype.hasOwnProperty.call(b5, p4))\n d6[p4] = b5[p4];\n };\n return extendStatics3(d5, b4);\n };\n return function(d5, b4) {\n if (typeof b4 !== \"function\" && b4 !== null)\n throw new TypeError(\"Class extends value \" + String(b4) + \" is not a constructor or null\");\n extendStatics3(d5, b4);\n function __() {\n this.constructor = d5;\n }\n d5.prototype = b4 === null ? Object.create(b4) : (__.prototype = b4.prototype, new __());\n };\n }();\n Object.defineProperty(exports3, \"__esModule\", { value: true });\n exports3.FixedBytesCoder = void 0;\n var bytes_1 = require_lib2();\n var abstract_coder_1 = require_abstract_coder();\n var FixedBytesCoder = (\n /** @class */\n function(_super) {\n __extends3(FixedBytesCoder2, _super);\n function FixedBytesCoder2(size6, localName) {\n var _this = this;\n var name = \"bytes\" + String(size6);\n _this = _super.call(this, name, name, localName, false) || this;\n _this.size = size6;\n return _this;\n }\n FixedBytesCoder2.prototype.defaultValue = function() {\n return \"0x0000000000000000000000000000000000000000000000000000000000000000\".substring(0, 2 + this.size * 2);\n };\n FixedBytesCoder2.prototype.encode = function(writer, value) {\n var data = (0, bytes_1.arrayify)(value);\n if (data.length !== this.size) {\n this._throwError(\"incorrect data length\", value);\n }\n return writer.writeBytes(data);\n };\n FixedBytesCoder2.prototype.decode = function(reader) {\n return reader.coerce(this.name, (0, bytes_1.hexlify)(reader.readBytes(this.size)));\n };\n return FixedBytesCoder2;\n }(abstract_coder_1.Coder)\n );\n exports3.FixedBytesCoder = FixedBytesCoder;\n }\n });\n\n // ../../../node_modules/.pnpm/@ethersproject+abi@5.8.0/node_modules/@ethersproject/abi/lib/coders/null.js\n var require_null = __commonJS({\n \"../../../node_modules/.pnpm/@ethersproject+abi@5.8.0/node_modules/@ethersproject/abi/lib/coders/null.js\"(exports3) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n var __extends3 = exports3 && exports3.__extends || /* @__PURE__ */ function() {\n var extendStatics3 = function(d5, b4) {\n extendStatics3 = Object.setPrototypeOf || { __proto__: [] } instanceof Array && function(d6, b5) {\n d6.__proto__ = b5;\n } || function(d6, b5) {\n for (var p4 in b5)\n if (Object.prototype.hasOwnProperty.call(b5, p4))\n d6[p4] = b5[p4];\n };\n return extendStatics3(d5, b4);\n };\n return function(d5, b4) {\n if (typeof b4 !== \"function\" && b4 !== null)\n throw new TypeError(\"Class extends value \" + String(b4) + \" is not a constructor or null\");\n extendStatics3(d5, b4);\n function __() {\n this.constructor = d5;\n }\n d5.prototype = b4 === null ? Object.create(b4) : (__.prototype = b4.prototype, new __());\n };\n }();\n Object.defineProperty(exports3, \"__esModule\", { value: true });\n exports3.NullCoder = void 0;\n var abstract_coder_1 = require_abstract_coder();\n var NullCoder = (\n /** @class */\n function(_super) {\n __extends3(NullCoder2, _super);\n function NullCoder2(localName) {\n return _super.call(this, \"null\", \"\", localName, false) || this;\n }\n NullCoder2.prototype.defaultValue = function() {\n return null;\n };\n NullCoder2.prototype.encode = function(writer, value) {\n if (value != null) {\n this._throwError(\"not null\", value);\n }\n return writer.writeBytes([]);\n };\n NullCoder2.prototype.decode = function(reader) {\n reader.readBytes(0);\n return reader.coerce(this.name, null);\n };\n return NullCoder2;\n }(abstract_coder_1.Coder)\n );\n exports3.NullCoder = NullCoder;\n }\n });\n\n // ../../../node_modules/.pnpm/@ethersproject+constants@5.8.0/node_modules/@ethersproject/constants/lib/addresses.js\n var require_addresses = __commonJS({\n \"../../../node_modules/.pnpm/@ethersproject+constants@5.8.0/node_modules/@ethersproject/constants/lib/addresses.js\"(exports3) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n Object.defineProperty(exports3, \"__esModule\", { value: true });\n exports3.AddressZero = void 0;\n exports3.AddressZero = \"0x0000000000000000000000000000000000000000\";\n }\n });\n\n // ../../../node_modules/.pnpm/@ethersproject+constants@5.8.0/node_modules/@ethersproject/constants/lib/bignumbers.js\n var require_bignumbers = __commonJS({\n \"../../../node_modules/.pnpm/@ethersproject+constants@5.8.0/node_modules/@ethersproject/constants/lib/bignumbers.js\"(exports3) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n Object.defineProperty(exports3, \"__esModule\", { value: true });\n exports3.MaxInt256 = exports3.MinInt256 = exports3.MaxUint256 = exports3.WeiPerEther = exports3.Two = exports3.One = exports3.Zero = exports3.NegativeOne = void 0;\n var bignumber_1 = require_lib3();\n var NegativeOne = /* @__PURE__ */ bignumber_1.BigNumber.from(-1);\n exports3.NegativeOne = NegativeOne;\n var Zero = /* @__PURE__ */ bignumber_1.BigNumber.from(0);\n exports3.Zero = Zero;\n var One = /* @__PURE__ */ bignumber_1.BigNumber.from(1);\n exports3.One = One;\n var Two = /* @__PURE__ */ bignumber_1.BigNumber.from(2);\n exports3.Two = Two;\n var WeiPerEther = /* @__PURE__ */ bignumber_1.BigNumber.from(\"1000000000000000000\");\n exports3.WeiPerEther = WeiPerEther;\n var MaxUint256 = /* @__PURE__ */ bignumber_1.BigNumber.from(\"0xffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff\");\n exports3.MaxUint256 = MaxUint256;\n var MinInt256 = /* @__PURE__ */ bignumber_1.BigNumber.from(\"-0x8000000000000000000000000000000000000000000000000000000000000000\");\n exports3.MinInt256 = MinInt256;\n var MaxInt256 = /* @__PURE__ */ bignumber_1.BigNumber.from(\"0x7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff\");\n exports3.MaxInt256 = MaxInt256;\n }\n });\n\n // ../../../node_modules/.pnpm/@ethersproject+constants@5.8.0/node_modules/@ethersproject/constants/lib/hashes.js\n var require_hashes = __commonJS({\n \"../../../node_modules/.pnpm/@ethersproject+constants@5.8.0/node_modules/@ethersproject/constants/lib/hashes.js\"(exports3) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n Object.defineProperty(exports3, \"__esModule\", { value: true });\n exports3.HashZero = void 0;\n exports3.HashZero = \"0x0000000000000000000000000000000000000000000000000000000000000000\";\n }\n });\n\n // ../../../node_modules/.pnpm/@ethersproject+constants@5.8.0/node_modules/@ethersproject/constants/lib/strings.js\n var require_strings = __commonJS({\n \"../../../node_modules/.pnpm/@ethersproject+constants@5.8.0/node_modules/@ethersproject/constants/lib/strings.js\"(exports3) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n Object.defineProperty(exports3, \"__esModule\", { value: true });\n exports3.EtherSymbol = void 0;\n exports3.EtherSymbol = \"\\u039E\";\n }\n });\n\n // ../../../node_modules/.pnpm/@ethersproject+constants@5.8.0/node_modules/@ethersproject/constants/lib/index.js\n var require_lib8 = __commonJS({\n \"../../../node_modules/.pnpm/@ethersproject+constants@5.8.0/node_modules/@ethersproject/constants/lib/index.js\"(exports3) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n Object.defineProperty(exports3, \"__esModule\", { value: true });\n exports3.EtherSymbol = exports3.HashZero = exports3.MaxInt256 = exports3.MinInt256 = exports3.MaxUint256 = exports3.WeiPerEther = exports3.Two = exports3.One = exports3.Zero = exports3.NegativeOne = exports3.AddressZero = void 0;\n var addresses_1 = require_addresses();\n Object.defineProperty(exports3, \"AddressZero\", { enumerable: true, get: function() {\n return addresses_1.AddressZero;\n } });\n var bignumbers_1 = require_bignumbers();\n Object.defineProperty(exports3, \"NegativeOne\", { enumerable: true, get: function() {\n return bignumbers_1.NegativeOne;\n } });\n Object.defineProperty(exports3, \"Zero\", { enumerable: true, get: function() {\n return bignumbers_1.Zero;\n } });\n Object.defineProperty(exports3, \"One\", { enumerable: true, get: function() {\n return bignumbers_1.One;\n } });\n Object.defineProperty(exports3, \"Two\", { enumerable: true, get: function() {\n return bignumbers_1.Two;\n } });\n Object.defineProperty(exports3, \"WeiPerEther\", { enumerable: true, get: function() {\n return bignumbers_1.WeiPerEther;\n } });\n Object.defineProperty(exports3, \"MaxUint256\", { enumerable: true, get: function() {\n return bignumbers_1.MaxUint256;\n } });\n Object.defineProperty(exports3, \"MinInt256\", { enumerable: true, get: function() {\n return bignumbers_1.MinInt256;\n } });\n Object.defineProperty(exports3, \"MaxInt256\", { enumerable: true, get: function() {\n return bignumbers_1.MaxInt256;\n } });\n var hashes_1 = require_hashes();\n Object.defineProperty(exports3, \"HashZero\", { enumerable: true, get: function() {\n return hashes_1.HashZero;\n } });\n var strings_1 = require_strings();\n Object.defineProperty(exports3, \"EtherSymbol\", { enumerable: true, get: function() {\n return strings_1.EtherSymbol;\n } });\n }\n });\n\n // ../../../node_modules/.pnpm/@ethersproject+abi@5.8.0/node_modules/@ethersproject/abi/lib/coders/number.js\n var require_number = __commonJS({\n \"../../../node_modules/.pnpm/@ethersproject+abi@5.8.0/node_modules/@ethersproject/abi/lib/coders/number.js\"(exports3) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n var __extends3 = exports3 && exports3.__extends || /* @__PURE__ */ function() {\n var extendStatics3 = function(d5, b4) {\n extendStatics3 = Object.setPrototypeOf || { __proto__: [] } instanceof Array && function(d6, b5) {\n d6.__proto__ = b5;\n } || function(d6, b5) {\n for (var p4 in b5)\n if (Object.prototype.hasOwnProperty.call(b5, p4))\n d6[p4] = b5[p4];\n };\n return extendStatics3(d5, b4);\n };\n return function(d5, b4) {\n if (typeof b4 !== \"function\" && b4 !== null)\n throw new TypeError(\"Class extends value \" + String(b4) + \" is not a constructor or null\");\n extendStatics3(d5, b4);\n function __() {\n this.constructor = d5;\n }\n d5.prototype = b4 === null ? Object.create(b4) : (__.prototype = b4.prototype, new __());\n };\n }();\n Object.defineProperty(exports3, \"__esModule\", { value: true });\n exports3.NumberCoder = void 0;\n var bignumber_1 = require_lib3();\n var constants_1 = require_lib8();\n var abstract_coder_1 = require_abstract_coder();\n var NumberCoder = (\n /** @class */\n function(_super) {\n __extends3(NumberCoder2, _super);\n function NumberCoder2(size6, signed, localName) {\n var _this = this;\n var name = (signed ? \"int\" : \"uint\") + size6 * 8;\n _this = _super.call(this, name, name, localName, false) || this;\n _this.size = size6;\n _this.signed = signed;\n return _this;\n }\n NumberCoder2.prototype.defaultValue = function() {\n return 0;\n };\n NumberCoder2.prototype.encode = function(writer, value) {\n var v2 = bignumber_1.BigNumber.from(value);\n var maxUintValue = constants_1.MaxUint256.mask(writer.wordSize * 8);\n if (this.signed) {\n var bounds = maxUintValue.mask(this.size * 8 - 1);\n if (v2.gt(bounds) || v2.lt(bounds.add(constants_1.One).mul(constants_1.NegativeOne))) {\n this._throwError(\"value out-of-bounds\", value);\n }\n } else if (v2.lt(constants_1.Zero) || v2.gt(maxUintValue.mask(this.size * 8))) {\n this._throwError(\"value out-of-bounds\", value);\n }\n v2 = v2.toTwos(this.size * 8).mask(this.size * 8);\n if (this.signed) {\n v2 = v2.fromTwos(this.size * 8).toTwos(8 * writer.wordSize);\n }\n return writer.writeValue(v2);\n };\n NumberCoder2.prototype.decode = function(reader) {\n var value = reader.readValue().mask(this.size * 8);\n if (this.signed) {\n value = value.fromTwos(this.size * 8);\n }\n return reader.coerce(this.name, value);\n };\n return NumberCoder2;\n }(abstract_coder_1.Coder)\n );\n exports3.NumberCoder = NumberCoder;\n }\n });\n\n // ../../../node_modules/.pnpm/@ethersproject+strings@5.8.0/node_modules/@ethersproject/strings/lib/_version.js\n var require_version8 = __commonJS({\n \"../../../node_modules/.pnpm/@ethersproject+strings@5.8.0/node_modules/@ethersproject/strings/lib/_version.js\"(exports3) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n Object.defineProperty(exports3, \"__esModule\", { value: true });\n exports3.version = void 0;\n exports3.version = \"strings/5.8.0\";\n }\n });\n\n // ../../../node_modules/.pnpm/@ethersproject+strings@5.8.0/node_modules/@ethersproject/strings/lib/utf8.js\n var require_utf8 = __commonJS({\n \"../../../node_modules/.pnpm/@ethersproject+strings@5.8.0/node_modules/@ethersproject/strings/lib/utf8.js\"(exports3) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n Object.defineProperty(exports3, \"__esModule\", { value: true });\n exports3.toUtf8CodePoints = exports3.toUtf8String = exports3._toUtf8String = exports3._toEscapedUtf8String = exports3.toUtf8Bytes = exports3.Utf8ErrorFuncs = exports3.Utf8ErrorReason = exports3.UnicodeNormalizationForm = void 0;\n var bytes_1 = require_lib2();\n var logger_1 = require_lib();\n var _version_1 = require_version8();\n var logger = new logger_1.Logger(_version_1.version);\n var UnicodeNormalizationForm;\n (function(UnicodeNormalizationForm2) {\n UnicodeNormalizationForm2[\"current\"] = \"\";\n UnicodeNormalizationForm2[\"NFC\"] = \"NFC\";\n UnicodeNormalizationForm2[\"NFD\"] = \"NFD\";\n UnicodeNormalizationForm2[\"NFKC\"] = \"NFKC\";\n UnicodeNormalizationForm2[\"NFKD\"] = \"NFKD\";\n })(UnicodeNormalizationForm = exports3.UnicodeNormalizationForm || (exports3.UnicodeNormalizationForm = {}));\n var Utf8ErrorReason;\n (function(Utf8ErrorReason2) {\n Utf8ErrorReason2[\"UNEXPECTED_CONTINUE\"] = \"unexpected continuation byte\";\n Utf8ErrorReason2[\"BAD_PREFIX\"] = \"bad codepoint prefix\";\n Utf8ErrorReason2[\"OVERRUN\"] = \"string overrun\";\n Utf8ErrorReason2[\"MISSING_CONTINUE\"] = \"missing continuation byte\";\n Utf8ErrorReason2[\"OUT_OF_RANGE\"] = \"out of UTF-8 range\";\n Utf8ErrorReason2[\"UTF16_SURROGATE\"] = \"UTF-16 surrogate\";\n Utf8ErrorReason2[\"OVERLONG\"] = \"overlong representation\";\n })(Utf8ErrorReason = exports3.Utf8ErrorReason || (exports3.Utf8ErrorReason = {}));\n function errorFunc(reason, offset, bytes, output, badCodepoint) {\n return logger.throwArgumentError(\"invalid codepoint at offset \" + offset + \"; \" + reason, \"bytes\", bytes);\n }\n function ignoreFunc(reason, offset, bytes, output, badCodepoint) {\n if (reason === Utf8ErrorReason.BAD_PREFIX || reason === Utf8ErrorReason.UNEXPECTED_CONTINUE) {\n var i3 = 0;\n for (var o5 = offset + 1; o5 < bytes.length; o5++) {\n if (bytes[o5] >> 6 !== 2) {\n break;\n }\n i3++;\n }\n return i3;\n }\n if (reason === Utf8ErrorReason.OVERRUN) {\n return bytes.length - offset - 1;\n }\n return 0;\n }\n function replaceFunc(reason, offset, bytes, output, badCodepoint) {\n if (reason === Utf8ErrorReason.OVERLONG) {\n output.push(badCodepoint);\n return 0;\n }\n output.push(65533);\n return ignoreFunc(reason, offset, bytes, output, badCodepoint);\n }\n exports3.Utf8ErrorFuncs = Object.freeze({\n error: errorFunc,\n ignore: ignoreFunc,\n replace: replaceFunc\n });\n function getUtf8CodePoints(bytes, onError) {\n if (onError == null) {\n onError = exports3.Utf8ErrorFuncs.error;\n }\n bytes = (0, bytes_1.arrayify)(bytes);\n var result = [];\n var i3 = 0;\n while (i3 < bytes.length) {\n var c4 = bytes[i3++];\n if (c4 >> 7 === 0) {\n result.push(c4);\n continue;\n }\n var extraLength = null;\n var overlongMask = null;\n if ((c4 & 224) === 192) {\n extraLength = 1;\n overlongMask = 127;\n } else if ((c4 & 240) === 224) {\n extraLength = 2;\n overlongMask = 2047;\n } else if ((c4 & 248) === 240) {\n extraLength = 3;\n overlongMask = 65535;\n } else {\n if ((c4 & 192) === 128) {\n i3 += onError(Utf8ErrorReason.UNEXPECTED_CONTINUE, i3 - 1, bytes, result);\n } else {\n i3 += onError(Utf8ErrorReason.BAD_PREFIX, i3 - 1, bytes, result);\n }\n continue;\n }\n if (i3 - 1 + extraLength >= bytes.length) {\n i3 += onError(Utf8ErrorReason.OVERRUN, i3 - 1, bytes, result);\n continue;\n }\n var res = c4 & (1 << 8 - extraLength - 1) - 1;\n for (var j2 = 0; j2 < extraLength; j2++) {\n var nextChar = bytes[i3];\n if ((nextChar & 192) != 128) {\n i3 += onError(Utf8ErrorReason.MISSING_CONTINUE, i3, bytes, result);\n res = null;\n break;\n }\n ;\n res = res << 6 | nextChar & 63;\n i3++;\n }\n if (res === null) {\n continue;\n }\n if (res > 1114111) {\n i3 += onError(Utf8ErrorReason.OUT_OF_RANGE, i3 - 1 - extraLength, bytes, result, res);\n continue;\n }\n if (res >= 55296 && res <= 57343) {\n i3 += onError(Utf8ErrorReason.UTF16_SURROGATE, i3 - 1 - extraLength, bytes, result, res);\n continue;\n }\n if (res <= overlongMask) {\n i3 += onError(Utf8ErrorReason.OVERLONG, i3 - 1 - extraLength, bytes, result, res);\n continue;\n }\n result.push(res);\n }\n return result;\n }\n function toUtf8Bytes(str, form) {\n if (form === void 0) {\n form = UnicodeNormalizationForm.current;\n }\n if (form != UnicodeNormalizationForm.current) {\n logger.checkNormalize();\n str = str.normalize(form);\n }\n var result = [];\n for (var i3 = 0; i3 < str.length; i3++) {\n var c4 = str.charCodeAt(i3);\n if (c4 < 128) {\n result.push(c4);\n } else if (c4 < 2048) {\n result.push(c4 >> 6 | 192);\n result.push(c4 & 63 | 128);\n } else if ((c4 & 64512) == 55296) {\n i3++;\n var c22 = str.charCodeAt(i3);\n if (i3 >= str.length || (c22 & 64512) !== 56320) {\n throw new Error(\"invalid utf-8 string\");\n }\n var pair = 65536 + ((c4 & 1023) << 10) + (c22 & 1023);\n result.push(pair >> 18 | 240);\n result.push(pair >> 12 & 63 | 128);\n result.push(pair >> 6 & 63 | 128);\n result.push(pair & 63 | 128);\n } else {\n result.push(c4 >> 12 | 224);\n result.push(c4 >> 6 & 63 | 128);\n result.push(c4 & 63 | 128);\n }\n }\n return (0, bytes_1.arrayify)(result);\n }\n exports3.toUtf8Bytes = toUtf8Bytes;\n function escapeChar(value) {\n var hex = \"0000\" + value.toString(16);\n return \"\\\\u\" + hex.substring(hex.length - 4);\n }\n function _toEscapedUtf8String(bytes, onError) {\n return '\"' + getUtf8CodePoints(bytes, onError).map(function(codePoint) {\n if (codePoint < 256) {\n switch (codePoint) {\n case 8:\n return \"\\\\b\";\n case 9:\n return \"\\\\t\";\n case 10:\n return \"\\\\n\";\n case 13:\n return \"\\\\r\";\n case 34:\n return '\\\\\"';\n case 92:\n return \"\\\\\\\\\";\n }\n if (codePoint >= 32 && codePoint < 127) {\n return String.fromCharCode(codePoint);\n }\n }\n if (codePoint <= 65535) {\n return escapeChar(codePoint);\n }\n codePoint -= 65536;\n return escapeChar((codePoint >> 10 & 1023) + 55296) + escapeChar((codePoint & 1023) + 56320);\n }).join(\"\") + '\"';\n }\n exports3._toEscapedUtf8String = _toEscapedUtf8String;\n function _toUtf8String(codePoints) {\n return codePoints.map(function(codePoint) {\n if (codePoint <= 65535) {\n return String.fromCharCode(codePoint);\n }\n codePoint -= 65536;\n return String.fromCharCode((codePoint >> 10 & 1023) + 55296, (codePoint & 1023) + 56320);\n }).join(\"\");\n }\n exports3._toUtf8String = _toUtf8String;\n function toUtf8String(bytes, onError) {\n return _toUtf8String(getUtf8CodePoints(bytes, onError));\n }\n exports3.toUtf8String = toUtf8String;\n function toUtf8CodePoints(str, form) {\n if (form === void 0) {\n form = UnicodeNormalizationForm.current;\n }\n return getUtf8CodePoints(toUtf8Bytes(str, form));\n }\n exports3.toUtf8CodePoints = toUtf8CodePoints;\n }\n });\n\n // ../../../node_modules/.pnpm/@ethersproject+strings@5.8.0/node_modules/@ethersproject/strings/lib/bytes32.js\n var require_bytes32 = __commonJS({\n \"../../../node_modules/.pnpm/@ethersproject+strings@5.8.0/node_modules/@ethersproject/strings/lib/bytes32.js\"(exports3) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n Object.defineProperty(exports3, \"__esModule\", { value: true });\n exports3.parseBytes32String = exports3.formatBytes32String = void 0;\n var constants_1 = require_lib8();\n var bytes_1 = require_lib2();\n var utf8_1 = require_utf8();\n function formatBytes32String(text) {\n var bytes = (0, utf8_1.toUtf8Bytes)(text);\n if (bytes.length > 31) {\n throw new Error(\"bytes32 string must be less than 32 bytes\");\n }\n return (0, bytes_1.hexlify)((0, bytes_1.concat)([bytes, constants_1.HashZero]).slice(0, 32));\n }\n exports3.formatBytes32String = formatBytes32String;\n function parseBytes32String(bytes) {\n var data = (0, bytes_1.arrayify)(bytes);\n if (data.length !== 32) {\n throw new Error(\"invalid bytes32 - not 32 bytes long\");\n }\n if (data[31] !== 0) {\n throw new Error(\"invalid bytes32 string - no null terminator\");\n }\n var length2 = 31;\n while (data[length2 - 1] === 0) {\n length2--;\n }\n return (0, utf8_1.toUtf8String)(data.slice(0, length2));\n }\n exports3.parseBytes32String = parseBytes32String;\n }\n });\n\n // ../../../node_modules/.pnpm/@ethersproject+strings@5.8.0/node_modules/@ethersproject/strings/lib/idna.js\n var require_idna = __commonJS({\n \"../../../node_modules/.pnpm/@ethersproject+strings@5.8.0/node_modules/@ethersproject/strings/lib/idna.js\"(exports3) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n Object.defineProperty(exports3, \"__esModule\", { value: true });\n exports3.nameprep = exports3._nameprepTableC = exports3._nameprepTableB2 = exports3._nameprepTableA1 = void 0;\n var utf8_1 = require_utf8();\n function bytes2(data) {\n if (data.length % 4 !== 0) {\n throw new Error(\"bad data\");\n }\n var result = [];\n for (var i3 = 0; i3 < data.length; i3 += 4) {\n result.push(parseInt(data.substring(i3, i3 + 4), 16));\n }\n return result;\n }\n function createTable(data, func) {\n if (!func) {\n func = function(value) {\n return [parseInt(value, 16)];\n };\n }\n var lo = 0;\n var result = {};\n data.split(\",\").forEach(function(pair) {\n var comps = pair.split(\":\");\n lo += parseInt(comps[0], 16);\n result[lo] = func(comps[1]);\n });\n return result;\n }\n function createRangeTable(data) {\n var hi = 0;\n return data.split(\",\").map(function(v2) {\n var comps = v2.split(\"-\");\n if (comps.length === 1) {\n comps[1] = \"0\";\n } else if (comps[1] === \"\") {\n comps[1] = \"1\";\n }\n var lo = hi + parseInt(comps[0], 16);\n hi = parseInt(comps[1], 16);\n return { l: lo, h: hi };\n });\n }\n function matchMap(value, ranges) {\n var lo = 0;\n for (var i3 = 0; i3 < ranges.length; i3++) {\n var range = ranges[i3];\n lo += range.l;\n if (value >= lo && value <= lo + range.h && (value - lo) % (range.d || 1) === 0) {\n if (range.e && range.e.indexOf(value - lo) !== -1) {\n continue;\n }\n return range;\n }\n }\n return null;\n }\n var Table_A_1_ranges = createRangeTable(\"221,13-1b,5f-,40-10,51-f,11-3,3-3,2-2,2-4,8,2,15,2d,28-8,88,48,27-,3-5,11-20,27-,8,28,3-5,12,18,b-a,1c-4,6-16,2-d,2-2,2,1b-4,17-9,8f-,10,f,1f-2,1c-34,33-14e,4,36-,13-,6-2,1a-f,4,9-,3-,17,8,2-2,5-,2,8-,3-,4-8,2-3,3,6-,16-6,2-,7-3,3-,17,8,3,3,3-,2,6-3,3-,4-a,5,2-6,10-b,4,8,2,4,17,8,3,6-,b,4,4-,2-e,2-4,b-10,4,9-,3-,17,8,3-,5-,9-2,3-,4-7,3-3,3,4-3,c-10,3,7-2,4,5-2,3,2,3-2,3-2,4-2,9,4-3,6-2,4,5-8,2-e,d-d,4,9,4,18,b,6-3,8,4,5-6,3-8,3-3,b-11,3,9,4,18,b,6-3,8,4,5-6,3-6,2,3-3,b-11,3,9,4,18,11-3,7-,4,5-8,2-7,3-3,b-11,3,13-2,19,a,2-,8-2,2-3,7,2,9-11,4-b,3b-3,1e-24,3,2-,3,2-,2-5,5,8,4,2,2-,3,e,4-,6,2,7-,b-,3-21,49,23-5,1c-3,9,25,10-,2-2f,23,6,3,8-2,5-5,1b-45,27-9,2a-,2-3,5b-4,45-4,53-5,8,40,2,5-,8,2,5-,28,2,5-,20,2,5-,8,2,5-,8,8,18,20,2,5-,8,28,14-5,1d-22,56-b,277-8,1e-2,52-e,e,8-a,18-8,15-b,e,4,3-b,5e-2,b-15,10,b-5,59-7,2b-555,9d-3,5b-5,17-,7-,27-,7-,9,2,2,2,20-,36,10,f-,7,14-,4,a,54-3,2-6,6-5,9-,1c-10,13-1d,1c-14,3c-,10-6,32-b,240-30,28-18,c-14,a0,115-,3,66-,b-76,5,5-,1d,24,2,5-2,2,8-,35-2,19,f-10,1d-3,311-37f,1b,5a-b,d7-19,d-3,41,57-,68-4,29-3,5f,29-37,2e-2,25-c,2c-2,4e-3,30,78-3,64-,20,19b7-49,51a7-59,48e-2,38-738,2ba5-5b,222f-,3c-94,8-b,6-4,1b,6,2,3,3,6d-20,16e-f,41-,37-7,2e-2,11-f,5-b,18-,b,14,5-3,6,88-,2,bf-2,7-,7-,7-,4-2,8,8-9,8-2ff,20,5-b,1c-b4,27-,27-cbb1,f7-9,28-2,b5-221,56,48,3-,2-,3-,5,d,2,5,3,42,5-,9,8,1d,5,6,2-2,8,153-3,123-3,33-27fd,a6da-5128,21f-5df,3-fffd,3-fffd,3-fffd,3-fffd,3-fffd,3-fffd,3-fffd,3-fffd,3-fffd,3-fffd,3-fffd,3,2-1d,61-ff7d\");\n var Table_B_1_flags = \"ad,34f,1806,180b,180c,180d,200b,200c,200d,2060,feff\".split(\",\").map(function(v2) {\n return parseInt(v2, 16);\n });\n var Table_B_2_ranges = [\n { h: 25, s: 32, l: 65 },\n { h: 30, s: 32, e: [23], l: 127 },\n { h: 54, s: 1, e: [48], l: 64, d: 2 },\n { h: 14, s: 1, l: 57, d: 2 },\n { h: 44, s: 1, l: 17, d: 2 },\n { h: 10, s: 1, e: [2, 6, 8], l: 61, d: 2 },\n { h: 16, s: 1, l: 68, d: 2 },\n { h: 84, s: 1, e: [18, 24, 66], l: 19, d: 2 },\n { h: 26, s: 32, e: [17], l: 435 },\n { h: 22, s: 1, l: 71, d: 2 },\n { h: 15, s: 80, l: 40 },\n { h: 31, s: 32, l: 16 },\n { h: 32, s: 1, l: 80, d: 2 },\n { h: 52, s: 1, l: 42, d: 2 },\n { h: 12, s: 1, l: 55, d: 2 },\n { h: 40, s: 1, e: [38], l: 15, d: 2 },\n { h: 14, s: 1, l: 48, d: 2 },\n { h: 37, s: 48, l: 49 },\n { h: 148, s: 1, l: 6351, d: 2 },\n { h: 88, s: 1, l: 160, d: 2 },\n { h: 15, s: 16, l: 704 },\n { h: 25, s: 26, l: 854 },\n { h: 25, s: 32, l: 55915 },\n { h: 37, s: 40, l: 1247 },\n { h: 25, s: -119711, l: 53248 },\n { h: 25, s: -119763, l: 52 },\n { h: 25, s: -119815, l: 52 },\n { h: 25, s: -119867, e: [1, 4, 5, 7, 8, 11, 12, 17], l: 52 },\n { h: 25, s: -119919, l: 52 },\n { h: 24, s: -119971, e: [2, 7, 8, 17], l: 52 },\n { h: 24, s: -120023, e: [2, 7, 13, 15, 16, 17], l: 52 },\n { h: 25, s: -120075, l: 52 },\n { h: 25, s: -120127, l: 52 },\n { h: 25, s: -120179, l: 52 },\n { h: 25, s: -120231, l: 52 },\n { h: 25, s: -120283, l: 52 },\n { h: 25, s: -120335, l: 52 },\n { h: 24, s: -119543, e: [17], l: 56 },\n { h: 24, s: -119601, e: [17], l: 58 },\n { h: 24, s: -119659, e: [17], l: 58 },\n { h: 24, s: -119717, e: [17], l: 58 },\n { h: 24, s: -119775, e: [17], l: 58 }\n ];\n var Table_B_2_lut_abs = createTable(\"b5:3bc,c3:ff,7:73,2:253,5:254,3:256,1:257,5:259,1:25b,3:260,1:263,2:269,1:268,5:26f,1:272,2:275,7:280,3:283,5:288,3:28a,1:28b,5:292,3f:195,1:1bf,29:19e,125:3b9,8b:3b2,1:3b8,1:3c5,3:3c6,1:3c0,1a:3ba,1:3c1,1:3c3,2:3b8,1:3b5,1bc9:3b9,1c:1f76,1:1f77,f:1f7a,1:1f7b,d:1f78,1:1f79,1:1f7c,1:1f7d,107:63,5:25b,4:68,1:68,1:68,3:69,1:69,1:6c,3:6e,4:70,1:71,1:72,1:72,1:72,7:7a,2:3c9,2:7a,2:6b,1:e5,1:62,1:63,3:65,1:66,2:6d,b:3b3,1:3c0,6:64,1b574:3b8,1a:3c3,20:3b8,1a:3c3,20:3b8,1a:3c3,20:3b8,1a:3c3,20:3b8,1a:3c3\");\n var Table_B_2_lut_rel = createTable(\"179:1,2:1,2:1,5:1,2:1,a:4f,a:1,8:1,2:1,2:1,3:1,5:1,3:1,4:1,2:1,3:1,4:1,8:2,1:1,2:2,1:1,2:2,27:2,195:26,2:25,1:25,1:25,2:40,2:3f,1:3f,33:1,11:-6,1:-9,1ac7:-3a,6d:-8,1:-8,1:-8,1:-8,1:-8,1:-8,1:-8,1:-8,9:-8,1:-8,1:-8,1:-8,1:-8,1:-8,b:-8,1:-8,1:-8,1:-8,1:-8,1:-8,1:-8,1:-8,9:-8,1:-8,1:-8,1:-8,1:-8,1:-8,1:-8,1:-8,9:-8,1:-8,1:-8,1:-8,1:-8,1:-8,c:-8,2:-8,2:-8,2:-8,9:-8,1:-8,1:-8,1:-8,1:-8,1:-8,1:-8,1:-8,49:-8,1:-8,1:-4a,1:-4a,d:-56,1:-56,1:-56,1:-56,d:-8,1:-8,f:-8,1:-8,3:-7\");\n var Table_B_2_complex = createTable(\"df:00730073,51:00690307,19:02BC006E,a7:006A030C,18a:002003B9,16:03B903080301,20:03C503080301,1d7:05650582,190f:00680331,1:00740308,1:0077030A,1:0079030A,1:006102BE,b6:03C50313,2:03C503130300,2:03C503130301,2:03C503130342,2a:1F0003B9,1:1F0103B9,1:1F0203B9,1:1F0303B9,1:1F0403B9,1:1F0503B9,1:1F0603B9,1:1F0703B9,1:1F0003B9,1:1F0103B9,1:1F0203B9,1:1F0303B9,1:1F0403B9,1:1F0503B9,1:1F0603B9,1:1F0703B9,1:1F2003B9,1:1F2103B9,1:1F2203B9,1:1F2303B9,1:1F2403B9,1:1F2503B9,1:1F2603B9,1:1F2703B9,1:1F2003B9,1:1F2103B9,1:1F2203B9,1:1F2303B9,1:1F2403B9,1:1F2503B9,1:1F2603B9,1:1F2703B9,1:1F6003B9,1:1F6103B9,1:1F6203B9,1:1F6303B9,1:1F6403B9,1:1F6503B9,1:1F6603B9,1:1F6703B9,1:1F6003B9,1:1F6103B9,1:1F6203B9,1:1F6303B9,1:1F6403B9,1:1F6503B9,1:1F6603B9,1:1F6703B9,3:1F7003B9,1:03B103B9,1:03AC03B9,2:03B10342,1:03B1034203B9,5:03B103B9,6:1F7403B9,1:03B703B9,1:03AE03B9,2:03B70342,1:03B7034203B9,5:03B703B9,6:03B903080300,1:03B903080301,3:03B90342,1:03B903080342,b:03C503080300,1:03C503080301,1:03C10313,2:03C50342,1:03C503080342,b:1F7C03B9,1:03C903B9,1:03CE03B9,2:03C90342,1:03C9034203B9,5:03C903B9,ac:00720073,5b:00B00063,6:00B00066,d:006E006F,a:0073006D,1:00740065006C,1:0074006D,124f:006800700061,2:00610075,2:006F0076,b:00700061,1:006E0061,1:03BC0061,1:006D0061,1:006B0061,1:006B0062,1:006D0062,1:00670062,3:00700066,1:006E0066,1:03BC0066,4:0068007A,1:006B0068007A,1:006D0068007A,1:00670068007A,1:00740068007A,15:00700061,1:006B00700061,1:006D00700061,1:006700700061,8:00700076,1:006E0076,1:03BC0076,1:006D0076,1:006B0076,1:006D0076,1:00700077,1:006E0077,1:03BC0077,1:006D0077,1:006B0077,1:006D0077,1:006B03C9,1:006D03C9,2:00620071,3:00632215006B0067,1:0063006F002E,1:00640062,1:00670079,2:00680070,2:006B006B,1:006B006D,9:00700068,2:00700070006D,1:00700072,2:00730076,1:00770062,c723:00660066,1:00660069,1:0066006C,1:006600660069,1:00660066006C,1:00730074,1:00730074,d:05740576,1:05740565,1:0574056B,1:057E0576,1:0574056D\", bytes2);\n var Table_C_ranges = createRangeTable(\"80-20,2a0-,39c,32,f71,18e,7f2-f,19-7,30-4,7-5,f81-b,5,a800-20ff,4d1-1f,110,fa-6,d174-7,2e84-,ffff-,ffff-,ffff-,ffff-,ffff-,ffff-,ffff-,ffff-,ffff-,ffff-,ffff-,ffff-,2,1f-5f,ff7f-20001\");\n function flatten(values) {\n return values.reduce(function(accum, value) {\n value.forEach(function(value2) {\n accum.push(value2);\n });\n return accum;\n }, []);\n }\n function _nameprepTableA1(codepoint) {\n return !!matchMap(codepoint, Table_A_1_ranges);\n }\n exports3._nameprepTableA1 = _nameprepTableA1;\n function _nameprepTableB2(codepoint) {\n var range = matchMap(codepoint, Table_B_2_ranges);\n if (range) {\n return [codepoint + range.s];\n }\n var codes = Table_B_2_lut_abs[codepoint];\n if (codes) {\n return codes;\n }\n var shift = Table_B_2_lut_rel[codepoint];\n if (shift) {\n return [codepoint + shift[0]];\n }\n var complex = Table_B_2_complex[codepoint];\n if (complex) {\n return complex;\n }\n return null;\n }\n exports3._nameprepTableB2 = _nameprepTableB2;\n function _nameprepTableC(codepoint) {\n return !!matchMap(codepoint, Table_C_ranges);\n }\n exports3._nameprepTableC = _nameprepTableC;\n function nameprep(value) {\n if (value.match(/^[a-z0-9-]*$/i) && value.length <= 59) {\n return value.toLowerCase();\n }\n var codes = (0, utf8_1.toUtf8CodePoints)(value);\n codes = flatten(codes.map(function(code) {\n if (Table_B_1_flags.indexOf(code) >= 0) {\n return [];\n }\n if (code >= 65024 && code <= 65039) {\n return [];\n }\n var codesTableB2 = _nameprepTableB2(code);\n if (codesTableB2) {\n return codesTableB2;\n }\n return [code];\n }));\n codes = (0, utf8_1.toUtf8CodePoints)((0, utf8_1._toUtf8String)(codes), utf8_1.UnicodeNormalizationForm.NFKC);\n codes.forEach(function(code) {\n if (_nameprepTableC(code)) {\n throw new Error(\"STRINGPREP_CONTAINS_PROHIBITED\");\n }\n });\n codes.forEach(function(code) {\n if (_nameprepTableA1(code)) {\n throw new Error(\"STRINGPREP_CONTAINS_UNASSIGNED\");\n }\n });\n var name = (0, utf8_1._toUtf8String)(codes);\n if (name.substring(0, 1) === \"-\" || name.substring(2, 4) === \"--\" || name.substring(name.length - 1) === \"-\") {\n throw new Error(\"invalid hyphen\");\n }\n return name;\n }\n exports3.nameprep = nameprep;\n }\n });\n\n // ../../../node_modules/.pnpm/@ethersproject+strings@5.8.0/node_modules/@ethersproject/strings/lib/index.js\n var require_lib9 = __commonJS({\n \"../../../node_modules/.pnpm/@ethersproject+strings@5.8.0/node_modules/@ethersproject/strings/lib/index.js\"(exports3) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n Object.defineProperty(exports3, \"__esModule\", { value: true });\n exports3.nameprep = exports3.parseBytes32String = exports3.formatBytes32String = exports3.UnicodeNormalizationForm = exports3.Utf8ErrorReason = exports3.Utf8ErrorFuncs = exports3.toUtf8String = exports3.toUtf8CodePoints = exports3.toUtf8Bytes = exports3._toEscapedUtf8String = void 0;\n var bytes32_1 = require_bytes32();\n Object.defineProperty(exports3, \"formatBytes32String\", { enumerable: true, get: function() {\n return bytes32_1.formatBytes32String;\n } });\n Object.defineProperty(exports3, \"parseBytes32String\", { enumerable: true, get: function() {\n return bytes32_1.parseBytes32String;\n } });\n var idna_1 = require_idna();\n Object.defineProperty(exports3, \"nameprep\", { enumerable: true, get: function() {\n return idna_1.nameprep;\n } });\n var utf8_1 = require_utf8();\n Object.defineProperty(exports3, \"_toEscapedUtf8String\", { enumerable: true, get: function() {\n return utf8_1._toEscapedUtf8String;\n } });\n Object.defineProperty(exports3, \"toUtf8Bytes\", { enumerable: true, get: function() {\n return utf8_1.toUtf8Bytes;\n } });\n Object.defineProperty(exports3, \"toUtf8CodePoints\", { enumerable: true, get: function() {\n return utf8_1.toUtf8CodePoints;\n } });\n Object.defineProperty(exports3, \"toUtf8String\", { enumerable: true, get: function() {\n return utf8_1.toUtf8String;\n } });\n Object.defineProperty(exports3, \"UnicodeNormalizationForm\", { enumerable: true, get: function() {\n return utf8_1.UnicodeNormalizationForm;\n } });\n Object.defineProperty(exports3, \"Utf8ErrorFuncs\", { enumerable: true, get: function() {\n return utf8_1.Utf8ErrorFuncs;\n } });\n Object.defineProperty(exports3, \"Utf8ErrorReason\", { enumerable: true, get: function() {\n return utf8_1.Utf8ErrorReason;\n } });\n }\n });\n\n // ../../../node_modules/.pnpm/@ethersproject+abi@5.8.0/node_modules/@ethersproject/abi/lib/coders/string.js\n var require_string = __commonJS({\n \"../../../node_modules/.pnpm/@ethersproject+abi@5.8.0/node_modules/@ethersproject/abi/lib/coders/string.js\"(exports3) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n var __extends3 = exports3 && exports3.__extends || /* @__PURE__ */ function() {\n var extendStatics3 = function(d5, b4) {\n extendStatics3 = Object.setPrototypeOf || { __proto__: [] } instanceof Array && function(d6, b5) {\n d6.__proto__ = b5;\n } || function(d6, b5) {\n for (var p4 in b5)\n if (Object.prototype.hasOwnProperty.call(b5, p4))\n d6[p4] = b5[p4];\n };\n return extendStatics3(d5, b4);\n };\n return function(d5, b4) {\n if (typeof b4 !== \"function\" && b4 !== null)\n throw new TypeError(\"Class extends value \" + String(b4) + \" is not a constructor or null\");\n extendStatics3(d5, b4);\n function __() {\n this.constructor = d5;\n }\n d5.prototype = b4 === null ? Object.create(b4) : (__.prototype = b4.prototype, new __());\n };\n }();\n Object.defineProperty(exports3, \"__esModule\", { value: true });\n exports3.StringCoder = void 0;\n var strings_1 = require_lib9();\n var bytes_1 = require_bytes();\n var StringCoder = (\n /** @class */\n function(_super) {\n __extends3(StringCoder2, _super);\n function StringCoder2(localName) {\n return _super.call(this, \"string\", localName) || this;\n }\n StringCoder2.prototype.defaultValue = function() {\n return \"\";\n };\n StringCoder2.prototype.encode = function(writer, value) {\n return _super.prototype.encode.call(this, writer, (0, strings_1.toUtf8Bytes)(value));\n };\n StringCoder2.prototype.decode = function(reader) {\n return (0, strings_1.toUtf8String)(_super.prototype.decode.call(this, reader));\n };\n return StringCoder2;\n }(bytes_1.DynamicBytesCoder)\n );\n exports3.StringCoder = StringCoder;\n }\n });\n\n // ../../../node_modules/.pnpm/@ethersproject+abi@5.8.0/node_modules/@ethersproject/abi/lib/coders/tuple.js\n var require_tuple = __commonJS({\n \"../../../node_modules/.pnpm/@ethersproject+abi@5.8.0/node_modules/@ethersproject/abi/lib/coders/tuple.js\"(exports3) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n var __extends3 = exports3 && exports3.__extends || /* @__PURE__ */ function() {\n var extendStatics3 = function(d5, b4) {\n extendStatics3 = Object.setPrototypeOf || { __proto__: [] } instanceof Array && function(d6, b5) {\n d6.__proto__ = b5;\n } || function(d6, b5) {\n for (var p4 in b5)\n if (Object.prototype.hasOwnProperty.call(b5, p4))\n d6[p4] = b5[p4];\n };\n return extendStatics3(d5, b4);\n };\n return function(d5, b4) {\n if (typeof b4 !== \"function\" && b4 !== null)\n throw new TypeError(\"Class extends value \" + String(b4) + \" is not a constructor or null\");\n extendStatics3(d5, b4);\n function __() {\n this.constructor = d5;\n }\n d5.prototype = b4 === null ? Object.create(b4) : (__.prototype = b4.prototype, new __());\n };\n }();\n Object.defineProperty(exports3, \"__esModule\", { value: true });\n exports3.TupleCoder = void 0;\n var abstract_coder_1 = require_abstract_coder();\n var array_1 = require_array();\n var TupleCoder = (\n /** @class */\n function(_super) {\n __extends3(TupleCoder2, _super);\n function TupleCoder2(coders, localName) {\n var _this = this;\n var dynamic = false;\n var types = [];\n coders.forEach(function(coder) {\n if (coder.dynamic) {\n dynamic = true;\n }\n types.push(coder.type);\n });\n var type = \"tuple(\" + types.join(\",\") + \")\";\n _this = _super.call(this, \"tuple\", type, localName, dynamic) || this;\n _this.coders = coders;\n return _this;\n }\n TupleCoder2.prototype.defaultValue = function() {\n var values = [];\n this.coders.forEach(function(coder) {\n values.push(coder.defaultValue());\n });\n var uniqueNames = this.coders.reduce(function(accum, coder) {\n var name = coder.localName;\n if (name) {\n if (!accum[name]) {\n accum[name] = 0;\n }\n accum[name]++;\n }\n return accum;\n }, {});\n this.coders.forEach(function(coder, index2) {\n var name = coder.localName;\n if (!name || uniqueNames[name] !== 1) {\n return;\n }\n if (name === \"length\") {\n name = \"_length\";\n }\n if (values[name] != null) {\n return;\n }\n values[name] = values[index2];\n });\n return Object.freeze(values);\n };\n TupleCoder2.prototype.encode = function(writer, value) {\n return (0, array_1.pack)(writer, this.coders, value);\n };\n TupleCoder2.prototype.decode = function(reader) {\n return reader.coerce(this.name, (0, array_1.unpack)(reader, this.coders));\n };\n return TupleCoder2;\n }(abstract_coder_1.Coder)\n );\n exports3.TupleCoder = TupleCoder;\n }\n });\n\n // ../../../node_modules/.pnpm/@ethersproject+abi@5.8.0/node_modules/@ethersproject/abi/lib/abi-coder.js\n var require_abi_coder = __commonJS({\n \"../../../node_modules/.pnpm/@ethersproject+abi@5.8.0/node_modules/@ethersproject/abi/lib/abi-coder.js\"(exports3) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n Object.defineProperty(exports3, \"__esModule\", { value: true });\n exports3.defaultAbiCoder = exports3.AbiCoder = void 0;\n var bytes_1 = require_lib2();\n var properties_1 = require_lib4();\n var logger_1 = require_lib();\n var _version_1 = require_version5();\n var logger = new logger_1.Logger(_version_1.version);\n var abstract_coder_1 = require_abstract_coder();\n var address_1 = require_address();\n var array_1 = require_array();\n var boolean_1 = require_boolean();\n var bytes_2 = require_bytes();\n var fixed_bytes_1 = require_fixed_bytes();\n var null_1 = require_null();\n var number_1 = require_number();\n var string_1 = require_string();\n var tuple_1 = require_tuple();\n var fragments_1 = require_fragments();\n var paramTypeBytes = new RegExp(/^bytes([0-9]*)$/);\n var paramTypeNumber = new RegExp(/^(u?int)([0-9]*)$/);\n var AbiCoder = (\n /** @class */\n function() {\n function AbiCoder2(coerceFunc) {\n (0, properties_1.defineReadOnly)(this, \"coerceFunc\", coerceFunc || null);\n }\n AbiCoder2.prototype._getCoder = function(param) {\n var _this = this;\n switch (param.baseType) {\n case \"address\":\n return new address_1.AddressCoder(param.name);\n case \"bool\":\n return new boolean_1.BooleanCoder(param.name);\n case \"string\":\n return new string_1.StringCoder(param.name);\n case \"bytes\":\n return new bytes_2.BytesCoder(param.name);\n case \"array\":\n return new array_1.ArrayCoder(this._getCoder(param.arrayChildren), param.arrayLength, param.name);\n case \"tuple\":\n return new tuple_1.TupleCoder((param.components || []).map(function(component) {\n return _this._getCoder(component);\n }), param.name);\n case \"\":\n return new null_1.NullCoder(param.name);\n }\n var match = param.type.match(paramTypeNumber);\n if (match) {\n var size6 = parseInt(match[2] || \"256\");\n if (size6 === 0 || size6 > 256 || size6 % 8 !== 0) {\n logger.throwArgumentError(\"invalid \" + match[1] + \" bit length\", \"param\", param);\n }\n return new number_1.NumberCoder(size6 / 8, match[1] === \"int\", param.name);\n }\n match = param.type.match(paramTypeBytes);\n if (match) {\n var size6 = parseInt(match[1]);\n if (size6 === 0 || size6 > 32) {\n logger.throwArgumentError(\"invalid bytes length\", \"param\", param);\n }\n return new fixed_bytes_1.FixedBytesCoder(size6, param.name);\n }\n return logger.throwArgumentError(\"invalid type\", \"type\", param.type);\n };\n AbiCoder2.prototype._getWordSize = function() {\n return 32;\n };\n AbiCoder2.prototype._getReader = function(data, allowLoose) {\n return new abstract_coder_1.Reader(data, this._getWordSize(), this.coerceFunc, allowLoose);\n };\n AbiCoder2.prototype._getWriter = function() {\n return new abstract_coder_1.Writer(this._getWordSize());\n };\n AbiCoder2.prototype.getDefaultValue = function(types) {\n var _this = this;\n var coders = types.map(function(type) {\n return _this._getCoder(fragments_1.ParamType.from(type));\n });\n var coder = new tuple_1.TupleCoder(coders, \"_\");\n return coder.defaultValue();\n };\n AbiCoder2.prototype.encode = function(types, values) {\n var _this = this;\n if (types.length !== values.length) {\n logger.throwError(\"types/values length mismatch\", logger_1.Logger.errors.INVALID_ARGUMENT, {\n count: { types: types.length, values: values.length },\n value: { types, values }\n });\n }\n var coders = types.map(function(type) {\n return _this._getCoder(fragments_1.ParamType.from(type));\n });\n var coder = new tuple_1.TupleCoder(coders, \"_\");\n var writer = this._getWriter();\n coder.encode(writer, values);\n return writer.data;\n };\n AbiCoder2.prototype.decode = function(types, data, loose) {\n var _this = this;\n var coders = types.map(function(type) {\n return _this._getCoder(fragments_1.ParamType.from(type));\n });\n var coder = new tuple_1.TupleCoder(coders, \"_\");\n return coder.decode(this._getReader((0, bytes_1.arrayify)(data), loose));\n };\n return AbiCoder2;\n }()\n );\n exports3.AbiCoder = AbiCoder;\n exports3.defaultAbiCoder = new AbiCoder();\n }\n });\n\n // ../../../node_modules/.pnpm/@ethersproject+hash@5.8.0/node_modules/@ethersproject/hash/lib/id.js\n var require_id = __commonJS({\n \"../../../node_modules/.pnpm/@ethersproject+hash@5.8.0/node_modules/@ethersproject/hash/lib/id.js\"(exports3) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n Object.defineProperty(exports3, \"__esModule\", { value: true });\n exports3.id = void 0;\n var keccak256_1 = require_lib5();\n var strings_1 = require_lib9();\n function id(text) {\n return (0, keccak256_1.keccak256)((0, strings_1.toUtf8Bytes)(text));\n }\n exports3.id = id;\n }\n });\n\n // ../../../node_modules/.pnpm/@ethersproject+hash@5.8.0/node_modules/@ethersproject/hash/lib/_version.js\n var require_version9 = __commonJS({\n \"../../../node_modules/.pnpm/@ethersproject+hash@5.8.0/node_modules/@ethersproject/hash/lib/_version.js\"(exports3) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n Object.defineProperty(exports3, \"__esModule\", { value: true });\n exports3.version = void 0;\n exports3.version = \"hash/5.8.0\";\n }\n });\n\n // ../../../node_modules/.pnpm/@ethersproject+base64@5.8.0/node_modules/@ethersproject/base64/lib/browser-base64.js\n var require_browser_base64 = __commonJS({\n \"../../../node_modules/.pnpm/@ethersproject+base64@5.8.0/node_modules/@ethersproject/base64/lib/browser-base64.js\"(exports3) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n Object.defineProperty(exports3, \"__esModule\", { value: true });\n exports3.encode = exports3.decode = void 0;\n var bytes_1 = require_lib2();\n function decode2(textData) {\n textData = atob(textData);\n var data = [];\n for (var i3 = 0; i3 < textData.length; i3++) {\n data.push(textData.charCodeAt(i3));\n }\n return (0, bytes_1.arrayify)(data);\n }\n exports3.decode = decode2;\n function encode6(data) {\n data = (0, bytes_1.arrayify)(data);\n var textData = \"\";\n for (var i3 = 0; i3 < data.length; i3++) {\n textData += String.fromCharCode(data[i3]);\n }\n return btoa(textData);\n }\n exports3.encode = encode6;\n }\n });\n\n // ../../../node_modules/.pnpm/@ethersproject+base64@5.8.0/node_modules/@ethersproject/base64/lib/index.js\n var require_lib10 = __commonJS({\n \"../../../node_modules/.pnpm/@ethersproject+base64@5.8.0/node_modules/@ethersproject/base64/lib/index.js\"(exports3) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n Object.defineProperty(exports3, \"__esModule\", { value: true });\n exports3.encode = exports3.decode = void 0;\n var base64_1 = require_browser_base64();\n Object.defineProperty(exports3, \"decode\", { enumerable: true, get: function() {\n return base64_1.decode;\n } });\n Object.defineProperty(exports3, \"encode\", { enumerable: true, get: function() {\n return base64_1.encode;\n } });\n }\n });\n\n // ../../../node_modules/.pnpm/@ethersproject+hash@5.8.0/node_modules/@ethersproject/hash/lib/ens-normalize/decoder.js\n var require_decoder = __commonJS({\n \"../../../node_modules/.pnpm/@ethersproject+hash@5.8.0/node_modules/@ethersproject/hash/lib/ens-normalize/decoder.js\"(exports3) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n Object.defineProperty(exports3, \"__esModule\", { value: true });\n exports3.read_emoji_trie = exports3.read_zero_terminated_array = exports3.read_mapped_map = exports3.read_member_array = exports3.signed = exports3.read_compressed_payload = exports3.read_payload = exports3.decode_arithmetic = void 0;\n function flat(array2, depth) {\n if (depth == null) {\n depth = 1;\n }\n var result = [];\n var forEach = result.forEach;\n var flatDeep = function(arr, depth2) {\n forEach.call(arr, function(val) {\n if (depth2 > 0 && Array.isArray(val)) {\n flatDeep(val, depth2 - 1);\n } else {\n result.push(val);\n }\n });\n };\n flatDeep(array2, depth);\n return result;\n }\n function fromEntries(array2) {\n var result = {};\n for (var i3 = 0; i3 < array2.length; i3++) {\n var value = array2[i3];\n result[value[0]] = value[1];\n }\n return result;\n }\n function decode_arithmetic(bytes) {\n var pos = 0;\n function u16() {\n return bytes[pos++] << 8 | bytes[pos++];\n }\n var symbol_count = u16();\n var total = 1;\n var acc = [0, 1];\n for (var i3 = 1; i3 < symbol_count; i3++) {\n acc.push(total += u16());\n }\n var skip = u16();\n var pos_payload = pos;\n pos += skip;\n var read_width = 0;\n var read_buffer = 0;\n function read_bit() {\n if (read_width == 0) {\n read_buffer = read_buffer << 8 | bytes[pos++];\n read_width = 8;\n }\n return read_buffer >> --read_width & 1;\n }\n var N4 = 31;\n var FULL = Math.pow(2, N4);\n var HALF = FULL >>> 1;\n var QRTR = HALF >> 1;\n var MASK = FULL - 1;\n var register = 0;\n for (var i3 = 0; i3 < N4; i3++)\n register = register << 1 | read_bit();\n var symbols = [];\n var low = 0;\n var range = FULL;\n while (true) {\n var value = Math.floor(((register - low + 1) * total - 1) / range);\n var start = 0;\n var end = symbol_count;\n while (end - start > 1) {\n var mid = start + end >>> 1;\n if (value < acc[mid]) {\n end = mid;\n } else {\n start = mid;\n }\n }\n if (start == 0)\n break;\n symbols.push(start);\n var a3 = low + Math.floor(range * acc[start] / total);\n var b4 = low + Math.floor(range * acc[start + 1] / total) - 1;\n while (((a3 ^ b4) & HALF) == 0) {\n register = register << 1 & MASK | read_bit();\n a3 = a3 << 1 & MASK;\n b4 = b4 << 1 & MASK | 1;\n }\n while (a3 & ~b4 & QRTR) {\n register = register & HALF | register << 1 & MASK >>> 1 | read_bit();\n a3 = a3 << 1 ^ HALF;\n b4 = (b4 ^ HALF) << 1 | HALF | 1;\n }\n low = a3;\n range = 1 + b4 - a3;\n }\n var offset = symbol_count - 4;\n return symbols.map(function(x4) {\n switch (x4 - offset) {\n case 3:\n return offset + 65792 + (bytes[pos_payload++] << 16 | bytes[pos_payload++] << 8 | bytes[pos_payload++]);\n case 2:\n return offset + 256 + (bytes[pos_payload++] << 8 | bytes[pos_payload++]);\n case 1:\n return offset + bytes[pos_payload++];\n default:\n return x4 - 1;\n }\n });\n }\n exports3.decode_arithmetic = decode_arithmetic;\n function read_payload(v2) {\n var pos = 0;\n return function() {\n return v2[pos++];\n };\n }\n exports3.read_payload = read_payload;\n function read_compressed_payload(bytes) {\n return read_payload(decode_arithmetic(bytes));\n }\n exports3.read_compressed_payload = read_compressed_payload;\n function signed(i3) {\n return i3 & 1 ? ~i3 >> 1 : i3 >> 1;\n }\n exports3.signed = signed;\n function read_counts(n2, next) {\n var v2 = Array(n2);\n for (var i3 = 0; i3 < n2; i3++)\n v2[i3] = 1 + next();\n return v2;\n }\n function read_ascending(n2, next) {\n var v2 = Array(n2);\n for (var i3 = 0, x4 = -1; i3 < n2; i3++)\n v2[i3] = x4 += 1 + next();\n return v2;\n }\n function read_deltas(n2, next) {\n var v2 = Array(n2);\n for (var i3 = 0, x4 = 0; i3 < n2; i3++)\n v2[i3] = x4 += signed(next());\n return v2;\n }\n function read_member_array(next, lookup) {\n var v2 = read_ascending(next(), next);\n var n2 = next();\n var vX = read_ascending(n2, next);\n var vN = read_counts(n2, next);\n for (var i3 = 0; i3 < n2; i3++) {\n for (var j2 = 0; j2 < vN[i3]; j2++) {\n v2.push(vX[i3] + j2);\n }\n }\n return lookup ? v2.map(function(x4) {\n return lookup[x4];\n }) : v2;\n }\n exports3.read_member_array = read_member_array;\n function read_mapped_map(next) {\n var ret = [];\n while (true) {\n var w3 = next();\n if (w3 == 0)\n break;\n ret.push(read_linear_table(w3, next));\n }\n while (true) {\n var w3 = next() - 1;\n if (w3 < 0)\n break;\n ret.push(read_replacement_table(w3, next));\n }\n return fromEntries(flat(ret));\n }\n exports3.read_mapped_map = read_mapped_map;\n function read_zero_terminated_array(next) {\n var v2 = [];\n while (true) {\n var i3 = next();\n if (i3 == 0)\n break;\n v2.push(i3);\n }\n return v2;\n }\n exports3.read_zero_terminated_array = read_zero_terminated_array;\n function read_transposed(n2, w3, next) {\n var m2 = Array(n2).fill(void 0).map(function() {\n return [];\n });\n for (var i3 = 0; i3 < w3; i3++) {\n read_deltas(n2, next).forEach(function(x4, j2) {\n return m2[j2].push(x4);\n });\n }\n return m2;\n }\n function read_linear_table(w3, next) {\n var dx = 1 + next();\n var dy = next();\n var vN = read_zero_terminated_array(next);\n var m2 = read_transposed(vN.length, 1 + w3, next);\n return flat(m2.map(function(v2, i3) {\n var x4 = v2[0], ys = v2.slice(1);\n return Array(vN[i3]).fill(void 0).map(function(_2, j2) {\n var j_dy = j2 * dy;\n return [x4 + j2 * dx, ys.map(function(y6) {\n return y6 + j_dy;\n })];\n });\n }));\n }\n function read_replacement_table(w3, next) {\n var n2 = 1 + next();\n var m2 = read_transposed(n2, 1 + w3, next);\n return m2.map(function(v2) {\n return [v2[0], v2.slice(1)];\n });\n }\n function read_emoji_trie(next) {\n var sorted = read_member_array(next).sort(function(a3, b4) {\n return a3 - b4;\n });\n return read();\n function read() {\n var branches = [];\n while (true) {\n var keys = read_member_array(next, sorted);\n if (keys.length == 0)\n break;\n branches.push({ set: new Set(keys), node: read() });\n }\n branches.sort(function(a3, b4) {\n return b4.set.size - a3.set.size;\n });\n var temp = next();\n var valid = temp % 3;\n temp = temp / 3 | 0;\n var fe0f = !!(temp & 1);\n temp >>= 1;\n var save = temp == 1;\n var check = temp == 2;\n return { branches, valid, fe0f, save, check };\n }\n }\n exports3.read_emoji_trie = read_emoji_trie;\n }\n });\n\n // ../../../node_modules/.pnpm/@ethersproject+hash@5.8.0/node_modules/@ethersproject/hash/lib/ens-normalize/include.js\n var require_include = __commonJS({\n \"../../../node_modules/.pnpm/@ethersproject+hash@5.8.0/node_modules/@ethersproject/hash/lib/ens-normalize/include.js\"(exports3) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n Object.defineProperty(exports3, \"__esModule\", { value: true });\n exports3.getData = void 0;\n var base64_1 = require_lib10();\n var decoder_js_1 = require_decoder();\n function getData() {\n return (0, decoder_js_1.read_compressed_payload)((0, base64_1.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==\"));\n }\n exports3.getData = getData;\n }\n });\n\n // ../../../node_modules/.pnpm/@ethersproject+hash@5.8.0/node_modules/@ethersproject/hash/lib/ens-normalize/lib.js\n var require_lib11 = __commonJS({\n \"../../../node_modules/.pnpm/@ethersproject+hash@5.8.0/node_modules/@ethersproject/hash/lib/ens-normalize/lib.js\"(exports3) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n Object.defineProperty(exports3, \"__esModule\", { value: true });\n exports3.ens_normalize = exports3.ens_normalize_post_check = void 0;\n var strings_1 = require_lib9();\n var include_js_1 = require_include();\n var r2 = (0, include_js_1.getData)();\n var decoder_js_1 = require_decoder();\n var VALID = new Set((0, decoder_js_1.read_member_array)(r2));\n var IGNORED = new Set((0, decoder_js_1.read_member_array)(r2));\n var MAPPED = (0, decoder_js_1.read_mapped_map)(r2);\n var EMOJI_ROOT = (0, decoder_js_1.read_emoji_trie)(r2);\n var HYPHEN = 45;\n var UNDERSCORE = 95;\n function explode_cp(name) {\n return (0, strings_1.toUtf8CodePoints)(name);\n }\n function filter_fe0f(cps) {\n return cps.filter(function(cp) {\n return cp != 65039;\n });\n }\n function ens_normalize_post_check(name) {\n for (var _i = 0, _a = name.split(\".\"); _i < _a.length; _i++) {\n var label = _a[_i];\n var cps = explode_cp(label);\n try {\n for (var i3 = cps.lastIndexOf(UNDERSCORE) - 1; i3 >= 0; i3--) {\n if (cps[i3] !== UNDERSCORE) {\n throw new Error(\"underscore only allowed at start\");\n }\n }\n if (cps.length >= 4 && cps.every(function(cp) {\n return cp < 128;\n }) && cps[2] === HYPHEN && cps[3] === HYPHEN) {\n throw new Error(\"invalid label extension\");\n }\n } catch (err) {\n throw new Error('Invalid label \"' + label + '\": ' + err.message);\n }\n }\n return name;\n }\n exports3.ens_normalize_post_check = ens_normalize_post_check;\n function ens_normalize(name) {\n return ens_normalize_post_check(normalize2(name, filter_fe0f));\n }\n exports3.ens_normalize = ens_normalize;\n function normalize2(name, emoji_filter) {\n var input = explode_cp(name).reverse();\n var output = [];\n while (input.length) {\n var emoji = consume_emoji_reversed(input);\n if (emoji) {\n output.push.apply(output, emoji_filter(emoji));\n continue;\n }\n var cp = input.pop();\n if (VALID.has(cp)) {\n output.push(cp);\n continue;\n }\n if (IGNORED.has(cp)) {\n continue;\n }\n var cps = MAPPED[cp];\n if (cps) {\n output.push.apply(output, cps);\n continue;\n }\n throw new Error(\"Disallowed codepoint: 0x\" + cp.toString(16).toUpperCase());\n }\n return ens_normalize_post_check(nfc(String.fromCodePoint.apply(String, output)));\n }\n function nfc(s4) {\n return s4.normalize(\"NFC\");\n }\n function consume_emoji_reversed(cps, eaten) {\n var _a;\n var node = EMOJI_ROOT;\n var emoji;\n var saved;\n var stack = [];\n var pos = cps.length;\n if (eaten)\n eaten.length = 0;\n var _loop_1 = function() {\n var cp = cps[--pos];\n node = (_a = node.branches.find(function(x4) {\n return x4.set.has(cp);\n })) === null || _a === void 0 ? void 0 : _a.node;\n if (!node)\n return \"break\";\n if (node.save) {\n saved = cp;\n } else if (node.check) {\n if (cp === saved)\n return \"break\";\n }\n stack.push(cp);\n if (node.fe0f) {\n stack.push(65039);\n if (pos > 0 && cps[pos - 1] == 65039)\n pos--;\n }\n if (node.valid) {\n emoji = stack.slice();\n if (node.valid == 2)\n emoji.splice(1, 1);\n if (eaten)\n eaten.push.apply(eaten, cps.slice(pos).reverse());\n cps.length = pos;\n }\n };\n while (pos) {\n var state_1 = _loop_1();\n if (state_1 === \"break\")\n break;\n }\n return emoji;\n }\n }\n });\n\n // ../../../node_modules/.pnpm/@ethersproject+hash@5.8.0/node_modules/@ethersproject/hash/lib/namehash.js\n var require_namehash = __commonJS({\n \"../../../node_modules/.pnpm/@ethersproject+hash@5.8.0/node_modules/@ethersproject/hash/lib/namehash.js\"(exports3) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n Object.defineProperty(exports3, \"__esModule\", { value: true });\n exports3.dnsEncode = exports3.namehash = exports3.isValidName = exports3.ensNormalize = void 0;\n var bytes_1 = require_lib2();\n var strings_1 = require_lib9();\n var keccak256_1 = require_lib5();\n var logger_1 = require_lib();\n var _version_1 = require_version9();\n var logger = new logger_1.Logger(_version_1.version);\n var lib_1 = require_lib11();\n var Zeros = new Uint8Array(32);\n Zeros.fill(0);\n function checkComponent(comp) {\n if (comp.length === 0) {\n throw new Error(\"invalid ENS name; empty component\");\n }\n return comp;\n }\n function ensNameSplit(name) {\n var bytes = (0, strings_1.toUtf8Bytes)((0, lib_1.ens_normalize)(name));\n var comps = [];\n if (name.length === 0) {\n return comps;\n }\n var last = 0;\n for (var i3 = 0; i3 < bytes.length; i3++) {\n var d5 = bytes[i3];\n if (d5 === 46) {\n comps.push(checkComponent(bytes.slice(last, i3)));\n last = i3 + 1;\n }\n }\n if (last >= bytes.length) {\n throw new Error(\"invalid ENS name; empty component\");\n }\n comps.push(checkComponent(bytes.slice(last)));\n return comps;\n }\n function ensNormalize(name) {\n return ensNameSplit(name).map(function(comp) {\n return (0, strings_1.toUtf8String)(comp);\n }).join(\".\");\n }\n exports3.ensNormalize = ensNormalize;\n function isValidName(name) {\n try {\n return ensNameSplit(name).length !== 0;\n } catch (error) {\n }\n return false;\n }\n exports3.isValidName = isValidName;\n function namehash2(name) {\n if (typeof name !== \"string\") {\n logger.throwArgumentError(\"invalid ENS name; not a string\", \"name\", name);\n }\n var result = Zeros;\n var comps = ensNameSplit(name);\n while (comps.length) {\n result = (0, keccak256_1.keccak256)((0, bytes_1.concat)([result, (0, keccak256_1.keccak256)(comps.pop())]));\n }\n return (0, bytes_1.hexlify)(result);\n }\n exports3.namehash = namehash2;\n function dnsEncode(name) {\n return (0, bytes_1.hexlify)((0, bytes_1.concat)(ensNameSplit(name).map(function(comp) {\n if (comp.length > 63) {\n throw new Error(\"invalid DNS encoded entry; length exceeds 63 bytes\");\n }\n var bytes = new Uint8Array(comp.length + 1);\n bytes.set(comp, 1);\n bytes[0] = bytes.length - 1;\n return bytes;\n }))) + \"00\";\n }\n exports3.dnsEncode = dnsEncode;\n }\n });\n\n // ../../../node_modules/.pnpm/@ethersproject+hash@5.8.0/node_modules/@ethersproject/hash/lib/message.js\n var require_message = __commonJS({\n \"../../../node_modules/.pnpm/@ethersproject+hash@5.8.0/node_modules/@ethersproject/hash/lib/message.js\"(exports3) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n Object.defineProperty(exports3, \"__esModule\", { value: true });\n exports3.hashMessage = exports3.messagePrefix = void 0;\n var bytes_1 = require_lib2();\n var keccak256_1 = require_lib5();\n var strings_1 = require_lib9();\n exports3.messagePrefix = \"\u0019Ethereum Signed Message:\\n\";\n function hashMessage2(message) {\n if (typeof message === \"string\") {\n message = (0, strings_1.toUtf8Bytes)(message);\n }\n return (0, keccak256_1.keccak256)((0, bytes_1.concat)([\n (0, strings_1.toUtf8Bytes)(exports3.messagePrefix),\n (0, strings_1.toUtf8Bytes)(String(message.length)),\n message\n ]));\n }\n exports3.hashMessage = hashMessage2;\n }\n });\n\n // ../../../node_modules/.pnpm/@ethersproject+hash@5.8.0/node_modules/@ethersproject/hash/lib/typed-data.js\n var require_typed_data = __commonJS({\n \"../../../node_modules/.pnpm/@ethersproject+hash@5.8.0/node_modules/@ethersproject/hash/lib/typed-data.js\"(exports3) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n var __awaiter3 = exports3 && exports3.__awaiter || function(thisArg, _arguments, P2, generator) {\n function adopt(value) {\n return value instanceof P2 ? value : new P2(function(resolve) {\n resolve(value);\n });\n }\n return new (P2 || (P2 = Promise))(function(resolve, reject) {\n function fulfilled(value) {\n try {\n step(generator.next(value));\n } catch (e3) {\n reject(e3);\n }\n }\n function rejected(value) {\n try {\n step(generator[\"throw\"](value));\n } catch (e3) {\n reject(e3);\n }\n }\n function step(result) {\n result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected);\n }\n step((generator = generator.apply(thisArg, _arguments || [])).next());\n });\n };\n var __generator3 = exports3 && exports3.__generator || function(thisArg, body) {\n var _2 = { label: 0, sent: function() {\n if (t3[0] & 1)\n throw t3[1];\n return t3[1];\n }, trys: [], ops: [] }, f6, y6, t3, g4;\n return g4 = { next: verb(0), \"throw\": verb(1), \"return\": verb(2) }, typeof Symbol === \"function\" && (g4[Symbol.iterator] = function() {\n return this;\n }), g4;\n function verb(n2) {\n return function(v2) {\n return step([n2, v2]);\n };\n }\n function step(op) {\n if (f6)\n throw new TypeError(\"Generator is already executing.\");\n while (_2)\n try {\n if (f6 = 1, y6 && (t3 = op[0] & 2 ? y6[\"return\"] : op[0] ? y6[\"throw\"] || ((t3 = y6[\"return\"]) && t3.call(y6), 0) : y6.next) && !(t3 = t3.call(y6, op[1])).done)\n return t3;\n if (y6 = 0, t3)\n op = [op[0] & 2, t3.value];\n switch (op[0]) {\n case 0:\n case 1:\n t3 = op;\n break;\n case 4:\n _2.label++;\n return { value: op[1], done: false };\n case 5:\n _2.label++;\n y6 = op[1];\n op = [0];\n continue;\n case 7:\n op = _2.ops.pop();\n _2.trys.pop();\n continue;\n default:\n if (!(t3 = _2.trys, t3 = t3.length > 0 && t3[t3.length - 1]) && (op[0] === 6 || op[0] === 2)) {\n _2 = 0;\n continue;\n }\n if (op[0] === 3 && (!t3 || op[1] > t3[0] && op[1] < t3[3])) {\n _2.label = op[1];\n break;\n }\n if (op[0] === 6 && _2.label < t3[1]) {\n _2.label = t3[1];\n t3 = op;\n break;\n }\n if (t3 && _2.label < t3[2]) {\n _2.label = t3[2];\n _2.ops.push(op);\n break;\n }\n if (t3[2])\n _2.ops.pop();\n _2.trys.pop();\n continue;\n }\n op = body.call(thisArg, _2);\n } catch (e3) {\n op = [6, e3];\n y6 = 0;\n } finally {\n f6 = t3 = 0;\n }\n if (op[0] & 5)\n throw op[1];\n return { value: op[0] ? op[1] : void 0, done: true };\n }\n };\n Object.defineProperty(exports3, \"__esModule\", { value: true });\n exports3.TypedDataEncoder = void 0;\n var address_1 = require_lib7();\n var bignumber_1 = require_lib3();\n var bytes_1 = require_lib2();\n var keccak256_1 = require_lib5();\n var properties_1 = require_lib4();\n var logger_1 = require_lib();\n var _version_1 = require_version9();\n var logger = new logger_1.Logger(_version_1.version);\n var id_1 = require_id();\n var padding = new Uint8Array(32);\n padding.fill(0);\n var NegativeOne = bignumber_1.BigNumber.from(-1);\n var Zero = bignumber_1.BigNumber.from(0);\n var One = bignumber_1.BigNumber.from(1);\n var MaxUint256 = bignumber_1.BigNumber.from(\"0xffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff\");\n function hexPadRight(value) {\n var bytes = (0, bytes_1.arrayify)(value);\n var padOffset = bytes.length % 32;\n if (padOffset) {\n return (0, bytes_1.hexConcat)([bytes, padding.slice(padOffset)]);\n }\n return (0, bytes_1.hexlify)(bytes);\n }\n var hexTrue = (0, bytes_1.hexZeroPad)(One.toHexString(), 32);\n var hexFalse = (0, bytes_1.hexZeroPad)(Zero.toHexString(), 32);\n var domainFieldTypes = {\n name: \"string\",\n version: \"string\",\n chainId: \"uint256\",\n verifyingContract: \"address\",\n salt: \"bytes32\"\n };\n var domainFieldNames = [\n \"name\",\n \"version\",\n \"chainId\",\n \"verifyingContract\",\n \"salt\"\n ];\n function checkString(key) {\n return function(value) {\n if (typeof value !== \"string\") {\n logger.throwArgumentError(\"invalid domain value for \" + JSON.stringify(key), \"domain.\" + key, value);\n }\n return value;\n };\n }\n var domainChecks = {\n name: checkString(\"name\"),\n version: checkString(\"version\"),\n chainId: function(value) {\n try {\n return bignumber_1.BigNumber.from(value).toString();\n } catch (error) {\n }\n return logger.throwArgumentError('invalid domain value for \"chainId\"', \"domain.chainId\", value);\n },\n verifyingContract: function(value) {\n try {\n return (0, address_1.getAddress)(value).toLowerCase();\n } catch (error) {\n }\n return logger.throwArgumentError('invalid domain value \"verifyingContract\"', \"domain.verifyingContract\", value);\n },\n salt: function(value) {\n try {\n var bytes = (0, bytes_1.arrayify)(value);\n if (bytes.length !== 32) {\n throw new Error(\"bad length\");\n }\n return (0, bytes_1.hexlify)(bytes);\n } catch (error) {\n }\n return logger.throwArgumentError('invalid domain value \"salt\"', \"domain.salt\", value);\n }\n };\n function getBaseEncoder(type) {\n {\n var match = type.match(/^(u?)int(\\d*)$/);\n if (match) {\n var signed = match[1] === \"\";\n var width = parseInt(match[2] || \"256\");\n if (width % 8 !== 0 || width > 256 || match[2] && match[2] !== String(width)) {\n logger.throwArgumentError(\"invalid numeric width\", \"type\", type);\n }\n var boundsUpper_1 = MaxUint256.mask(signed ? width - 1 : width);\n var boundsLower_1 = signed ? boundsUpper_1.add(One).mul(NegativeOne) : Zero;\n return function(value) {\n var v2 = bignumber_1.BigNumber.from(value);\n if (v2.lt(boundsLower_1) || v2.gt(boundsUpper_1)) {\n logger.throwArgumentError(\"value out-of-bounds for \" + type, \"value\", value);\n }\n return (0, bytes_1.hexZeroPad)(v2.toTwos(256).toHexString(), 32);\n };\n }\n }\n {\n var match = type.match(/^bytes(\\d+)$/);\n if (match) {\n var width_1 = parseInt(match[1]);\n if (width_1 === 0 || width_1 > 32 || match[1] !== String(width_1)) {\n logger.throwArgumentError(\"invalid bytes width\", \"type\", type);\n }\n return function(value) {\n var bytes = (0, bytes_1.arrayify)(value);\n if (bytes.length !== width_1) {\n logger.throwArgumentError(\"invalid length for \" + type, \"value\", value);\n }\n return hexPadRight(value);\n };\n }\n }\n switch (type) {\n case \"address\":\n return function(value) {\n return (0, bytes_1.hexZeroPad)((0, address_1.getAddress)(value), 32);\n };\n case \"bool\":\n return function(value) {\n return !value ? hexFalse : hexTrue;\n };\n case \"bytes\":\n return function(value) {\n return (0, keccak256_1.keccak256)(value);\n };\n case \"string\":\n return function(value) {\n return (0, id_1.id)(value);\n };\n }\n return null;\n }\n function encodeType2(name, fields) {\n return name + \"(\" + fields.map(function(_a) {\n var name2 = _a.name, type = _a.type;\n return type + \" \" + name2;\n }).join(\",\") + \")\";\n }\n var TypedDataEncoder = (\n /** @class */\n function() {\n function TypedDataEncoder2(types) {\n (0, properties_1.defineReadOnly)(this, \"types\", Object.freeze((0, properties_1.deepCopy)(types)));\n (0, properties_1.defineReadOnly)(this, \"_encoderCache\", {});\n (0, properties_1.defineReadOnly)(this, \"_types\", {});\n var links = {};\n var parents = {};\n var subtypes = {};\n Object.keys(types).forEach(function(type) {\n links[type] = {};\n parents[type] = [];\n subtypes[type] = {};\n });\n var _loop_1 = function(name_12) {\n var uniqueNames = {};\n types[name_12].forEach(function(field) {\n if (uniqueNames[field.name]) {\n logger.throwArgumentError(\"duplicate variable name \" + JSON.stringify(field.name) + \" in \" + JSON.stringify(name_12), \"types\", types);\n }\n uniqueNames[field.name] = true;\n var baseType = field.type.match(/^([^\\x5b]*)(\\x5b|$)/)[1];\n if (baseType === name_12) {\n logger.throwArgumentError(\"circular type reference to \" + JSON.stringify(baseType), \"types\", types);\n }\n var encoder6 = getBaseEncoder(baseType);\n if (encoder6) {\n return;\n }\n if (!parents[baseType]) {\n logger.throwArgumentError(\"unknown type \" + JSON.stringify(baseType), \"types\", types);\n }\n parents[baseType].push(name_12);\n links[name_12][baseType] = true;\n });\n };\n for (var name_1 in types) {\n _loop_1(name_1);\n }\n var primaryTypes = Object.keys(parents).filter(function(n2) {\n return parents[n2].length === 0;\n });\n if (primaryTypes.length === 0) {\n logger.throwArgumentError(\"missing primary type\", \"types\", types);\n } else if (primaryTypes.length > 1) {\n logger.throwArgumentError(\"ambiguous primary types or unused types: \" + primaryTypes.map(function(t3) {\n return JSON.stringify(t3);\n }).join(\", \"), \"types\", types);\n }\n (0, properties_1.defineReadOnly)(this, \"primaryType\", primaryTypes[0]);\n function checkCircular(type, found) {\n if (found[type]) {\n logger.throwArgumentError(\"circular type reference to \" + JSON.stringify(type), \"types\", types);\n }\n found[type] = true;\n Object.keys(links[type]).forEach(function(child) {\n if (!parents[child]) {\n return;\n }\n checkCircular(child, found);\n Object.keys(found).forEach(function(subtype) {\n subtypes[subtype][child] = true;\n });\n });\n delete found[type];\n }\n checkCircular(this.primaryType, {});\n for (var name_2 in subtypes) {\n var st = Object.keys(subtypes[name_2]);\n st.sort();\n this._types[name_2] = encodeType2(name_2, types[name_2]) + st.map(function(t3) {\n return encodeType2(t3, types[t3]);\n }).join(\"\");\n }\n }\n TypedDataEncoder2.prototype.getEncoder = function(type) {\n var encoder6 = this._encoderCache[type];\n if (!encoder6) {\n encoder6 = this._encoderCache[type] = this._getEncoder(type);\n }\n return encoder6;\n };\n TypedDataEncoder2.prototype._getEncoder = function(type) {\n var _this = this;\n {\n var encoder6 = getBaseEncoder(type);\n if (encoder6) {\n return encoder6;\n }\n }\n var match = type.match(/^(.*)(\\x5b(\\d*)\\x5d)$/);\n if (match) {\n var subtype_1 = match[1];\n var subEncoder_1 = this.getEncoder(subtype_1);\n var length_1 = parseInt(match[3]);\n return function(value) {\n if (length_1 >= 0 && value.length !== length_1) {\n logger.throwArgumentError(\"array length mismatch; expected length ${ arrayLength }\", \"value\", value);\n }\n var result = value.map(subEncoder_1);\n if (_this._types[subtype_1]) {\n result = result.map(keccak256_1.keccak256);\n }\n return (0, keccak256_1.keccak256)((0, bytes_1.hexConcat)(result));\n };\n }\n var fields = this.types[type];\n if (fields) {\n var encodedType_1 = (0, id_1.id)(this._types[type]);\n return function(value) {\n var values = fields.map(function(_a) {\n var name = _a.name, type2 = _a.type;\n var result = _this.getEncoder(type2)(value[name]);\n if (_this._types[type2]) {\n return (0, keccak256_1.keccak256)(result);\n }\n return result;\n });\n values.unshift(encodedType_1);\n return (0, bytes_1.hexConcat)(values);\n };\n }\n return logger.throwArgumentError(\"unknown type: \" + type, \"type\", type);\n };\n TypedDataEncoder2.prototype.encodeType = function(name) {\n var result = this._types[name];\n if (!result) {\n logger.throwArgumentError(\"unknown type: \" + JSON.stringify(name), \"name\", name);\n }\n return result;\n };\n TypedDataEncoder2.prototype.encodeData = function(type, value) {\n return this.getEncoder(type)(value);\n };\n TypedDataEncoder2.prototype.hashStruct = function(name, value) {\n return (0, keccak256_1.keccak256)(this.encodeData(name, value));\n };\n TypedDataEncoder2.prototype.encode = function(value) {\n return this.encodeData(this.primaryType, value);\n };\n TypedDataEncoder2.prototype.hash = function(value) {\n return this.hashStruct(this.primaryType, value);\n };\n TypedDataEncoder2.prototype._visit = function(type, value, callback) {\n var _this = this;\n {\n var encoder6 = getBaseEncoder(type);\n if (encoder6) {\n return callback(type, value);\n }\n }\n var match = type.match(/^(.*)(\\x5b(\\d*)\\x5d)$/);\n if (match) {\n var subtype_2 = match[1];\n var length_2 = parseInt(match[3]);\n if (length_2 >= 0 && value.length !== length_2) {\n logger.throwArgumentError(\"array length mismatch; expected length ${ arrayLength }\", \"value\", value);\n }\n return value.map(function(v2) {\n return _this._visit(subtype_2, v2, callback);\n });\n }\n var fields = this.types[type];\n if (fields) {\n return fields.reduce(function(accum, _a) {\n var name = _a.name, type2 = _a.type;\n accum[name] = _this._visit(type2, value[name], callback);\n return accum;\n }, {});\n }\n return logger.throwArgumentError(\"unknown type: \" + type, \"type\", type);\n };\n TypedDataEncoder2.prototype.visit = function(value, callback) {\n return this._visit(this.primaryType, value, callback);\n };\n TypedDataEncoder2.from = function(types) {\n return new TypedDataEncoder2(types);\n };\n TypedDataEncoder2.getPrimaryType = function(types) {\n return TypedDataEncoder2.from(types).primaryType;\n };\n TypedDataEncoder2.hashStruct = function(name, types, value) {\n return TypedDataEncoder2.from(types).hashStruct(name, value);\n };\n TypedDataEncoder2.hashDomain = function(domain2) {\n var domainFields = [];\n for (var name_3 in domain2) {\n var type = domainFieldTypes[name_3];\n if (!type) {\n logger.throwArgumentError(\"invalid typed-data domain key: \" + JSON.stringify(name_3), \"domain\", domain2);\n }\n domainFields.push({ name: name_3, type });\n }\n domainFields.sort(function(a3, b4) {\n return domainFieldNames.indexOf(a3.name) - domainFieldNames.indexOf(b4.name);\n });\n return TypedDataEncoder2.hashStruct(\"EIP712Domain\", { EIP712Domain: domainFields }, domain2);\n };\n TypedDataEncoder2.encode = function(domain2, types, value) {\n return (0, bytes_1.hexConcat)([\n \"0x1901\",\n TypedDataEncoder2.hashDomain(domain2),\n TypedDataEncoder2.from(types).hash(value)\n ]);\n };\n TypedDataEncoder2.hash = function(domain2, types, value) {\n return (0, keccak256_1.keccak256)(TypedDataEncoder2.encode(domain2, types, value));\n };\n TypedDataEncoder2.resolveNames = function(domain2, types, value, resolveName) {\n return __awaiter3(this, void 0, void 0, function() {\n var ensCache, encoder6, _a, _b, _i, name_4, _c, _d;\n return __generator3(this, function(_e) {\n switch (_e.label) {\n case 0:\n domain2 = (0, properties_1.shallowCopy)(domain2);\n ensCache = {};\n if (domain2.verifyingContract && !(0, bytes_1.isHexString)(domain2.verifyingContract, 20)) {\n ensCache[domain2.verifyingContract] = \"0x\";\n }\n encoder6 = TypedDataEncoder2.from(types);\n encoder6.visit(value, function(type, value2) {\n if (type === \"address\" && !(0, bytes_1.isHexString)(value2, 20)) {\n ensCache[value2] = \"0x\";\n }\n return value2;\n });\n _a = [];\n for (_b in ensCache)\n _a.push(_b);\n _i = 0;\n _e.label = 1;\n case 1:\n if (!(_i < _a.length))\n return [3, 4];\n name_4 = _a[_i];\n _c = ensCache;\n _d = name_4;\n return [4, resolveName(name_4)];\n case 2:\n _c[_d] = _e.sent();\n _e.label = 3;\n case 3:\n _i++;\n return [3, 1];\n case 4:\n if (domain2.verifyingContract && ensCache[domain2.verifyingContract]) {\n domain2.verifyingContract = ensCache[domain2.verifyingContract];\n }\n value = encoder6.visit(value, function(type, value2) {\n if (type === \"address\" && ensCache[value2]) {\n return ensCache[value2];\n }\n return value2;\n });\n return [2, { domain: domain2, value }];\n }\n });\n });\n };\n TypedDataEncoder2.getPayload = function(domain2, types, value) {\n TypedDataEncoder2.hashDomain(domain2);\n var domainValues = {};\n var domainTypes = [];\n domainFieldNames.forEach(function(name) {\n var value2 = domain2[name];\n if (value2 == null) {\n return;\n }\n domainValues[name] = domainChecks[name](value2);\n domainTypes.push({ name, type: domainFieldTypes[name] });\n });\n var encoder6 = TypedDataEncoder2.from(types);\n var typesWithDomain = (0, properties_1.shallowCopy)(types);\n if (typesWithDomain.EIP712Domain) {\n logger.throwArgumentError(\"types must not contain EIP712Domain type\", \"types.EIP712Domain\", types);\n } else {\n typesWithDomain.EIP712Domain = domainTypes;\n }\n encoder6.encode(value);\n return {\n types: typesWithDomain,\n domain: domainValues,\n primaryType: encoder6.primaryType,\n message: encoder6.visit(value, function(type, value2) {\n if (type.match(/^bytes(\\d*)/)) {\n return (0, bytes_1.hexlify)((0, bytes_1.arrayify)(value2));\n }\n if (type.match(/^u?int/)) {\n return bignumber_1.BigNumber.from(value2).toString();\n }\n switch (type) {\n case \"address\":\n return value2.toLowerCase();\n case \"bool\":\n return !!value2;\n case \"string\":\n if (typeof value2 !== \"string\") {\n logger.throwArgumentError(\"invalid string\", \"value\", value2);\n }\n return value2;\n }\n return logger.throwArgumentError(\"unsupported type\", \"type\", type);\n })\n };\n };\n return TypedDataEncoder2;\n }()\n );\n exports3.TypedDataEncoder = TypedDataEncoder;\n }\n });\n\n // ../../../node_modules/.pnpm/@ethersproject+hash@5.8.0/node_modules/@ethersproject/hash/lib/index.js\n var require_lib12 = __commonJS({\n \"../../../node_modules/.pnpm/@ethersproject+hash@5.8.0/node_modules/@ethersproject/hash/lib/index.js\"(exports3) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n Object.defineProperty(exports3, \"__esModule\", { value: true });\n exports3._TypedDataEncoder = exports3.hashMessage = exports3.messagePrefix = exports3.ensNormalize = exports3.isValidName = exports3.namehash = exports3.dnsEncode = exports3.id = void 0;\n var id_1 = require_id();\n Object.defineProperty(exports3, \"id\", { enumerable: true, get: function() {\n return id_1.id;\n } });\n var namehash_1 = require_namehash();\n Object.defineProperty(exports3, \"dnsEncode\", { enumerable: true, get: function() {\n return namehash_1.dnsEncode;\n } });\n Object.defineProperty(exports3, \"isValidName\", { enumerable: true, get: function() {\n return namehash_1.isValidName;\n } });\n Object.defineProperty(exports3, \"namehash\", { enumerable: true, get: function() {\n return namehash_1.namehash;\n } });\n var message_1 = require_message();\n Object.defineProperty(exports3, \"hashMessage\", { enumerable: true, get: function() {\n return message_1.hashMessage;\n } });\n Object.defineProperty(exports3, \"messagePrefix\", { enumerable: true, get: function() {\n return message_1.messagePrefix;\n } });\n var namehash_2 = require_namehash();\n Object.defineProperty(exports3, \"ensNormalize\", { enumerable: true, get: function() {\n return namehash_2.ensNormalize;\n } });\n var typed_data_1 = require_typed_data();\n Object.defineProperty(exports3, \"_TypedDataEncoder\", { enumerable: true, get: function() {\n return typed_data_1.TypedDataEncoder;\n } });\n }\n });\n\n // ../../../node_modules/.pnpm/@ethersproject+abi@5.8.0/node_modules/@ethersproject/abi/lib/interface.js\n var require_interface = __commonJS({\n \"../../../node_modules/.pnpm/@ethersproject+abi@5.8.0/node_modules/@ethersproject/abi/lib/interface.js\"(exports3) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n var __extends3 = exports3 && exports3.__extends || /* @__PURE__ */ function() {\n var extendStatics3 = function(d5, b4) {\n extendStatics3 = Object.setPrototypeOf || { __proto__: [] } instanceof Array && function(d6, b5) {\n d6.__proto__ = b5;\n } || function(d6, b5) {\n for (var p4 in b5)\n if (Object.prototype.hasOwnProperty.call(b5, p4))\n d6[p4] = b5[p4];\n };\n return extendStatics3(d5, b4);\n };\n return function(d5, b4) {\n if (typeof b4 !== \"function\" && b4 !== null)\n throw new TypeError(\"Class extends value \" + String(b4) + \" is not a constructor or null\");\n extendStatics3(d5, b4);\n function __() {\n this.constructor = d5;\n }\n d5.prototype = b4 === null ? Object.create(b4) : (__.prototype = b4.prototype, new __());\n };\n }();\n Object.defineProperty(exports3, \"__esModule\", { value: true });\n exports3.Interface = exports3.Indexed = exports3.ErrorDescription = exports3.TransactionDescription = exports3.LogDescription = exports3.checkResultErrors = void 0;\n var address_1 = require_lib7();\n var bignumber_1 = require_lib3();\n var bytes_1 = require_lib2();\n var hash_1 = require_lib12();\n var keccak256_1 = require_lib5();\n var properties_1 = require_lib4();\n var abi_coder_1 = require_abi_coder();\n var abstract_coder_1 = require_abstract_coder();\n Object.defineProperty(exports3, \"checkResultErrors\", { enumerable: true, get: function() {\n return abstract_coder_1.checkResultErrors;\n } });\n var fragments_1 = require_fragments();\n var logger_1 = require_lib();\n var _version_1 = require_version5();\n var logger = new logger_1.Logger(_version_1.version);\n var LogDescription = (\n /** @class */\n function(_super) {\n __extends3(LogDescription2, _super);\n function LogDescription2() {\n return _super !== null && _super.apply(this, arguments) || this;\n }\n return LogDescription2;\n }(properties_1.Description)\n );\n exports3.LogDescription = LogDescription;\n var TransactionDescription = (\n /** @class */\n function(_super) {\n __extends3(TransactionDescription2, _super);\n function TransactionDescription2() {\n return _super !== null && _super.apply(this, arguments) || this;\n }\n return TransactionDescription2;\n }(properties_1.Description)\n );\n exports3.TransactionDescription = TransactionDescription;\n var ErrorDescription = (\n /** @class */\n function(_super) {\n __extends3(ErrorDescription2, _super);\n function ErrorDescription2() {\n return _super !== null && _super.apply(this, arguments) || this;\n }\n return ErrorDescription2;\n }(properties_1.Description)\n );\n exports3.ErrorDescription = ErrorDescription;\n var Indexed = (\n /** @class */\n function(_super) {\n __extends3(Indexed2, _super);\n function Indexed2() {\n return _super !== null && _super.apply(this, arguments) || this;\n }\n Indexed2.isIndexed = function(value) {\n return !!(value && value._isIndexed);\n };\n return Indexed2;\n }(properties_1.Description)\n );\n exports3.Indexed = Indexed;\n var BuiltinErrors = {\n \"0x08c379a0\": { signature: \"Error(string)\", name: \"Error\", inputs: [\"string\"], reason: true },\n \"0x4e487b71\": { signature: \"Panic(uint256)\", name: \"Panic\", inputs: [\"uint256\"] }\n };\n function wrapAccessError(property, error) {\n var wrap3 = new Error(\"deferred error during ABI decoding triggered accessing \" + property);\n wrap3.error = error;\n return wrap3;\n }\n var Interface = (\n /** @class */\n function() {\n function Interface2(fragments) {\n var _newTarget = this.constructor;\n var _this = this;\n var abi2 = [];\n if (typeof fragments === \"string\") {\n abi2 = JSON.parse(fragments);\n } else {\n abi2 = fragments;\n }\n (0, properties_1.defineReadOnly)(this, \"fragments\", abi2.map(function(fragment) {\n return fragments_1.Fragment.from(fragment);\n }).filter(function(fragment) {\n return fragment != null;\n }));\n (0, properties_1.defineReadOnly)(this, \"_abiCoder\", (0, properties_1.getStatic)(_newTarget, \"getAbiCoder\")());\n (0, properties_1.defineReadOnly)(this, \"functions\", {});\n (0, properties_1.defineReadOnly)(this, \"errors\", {});\n (0, properties_1.defineReadOnly)(this, \"events\", {});\n (0, properties_1.defineReadOnly)(this, \"structs\", {});\n this.fragments.forEach(function(fragment) {\n var bucket = null;\n switch (fragment.type) {\n case \"constructor\":\n if (_this.deploy) {\n logger.warn(\"duplicate definition - constructor\");\n return;\n }\n (0, properties_1.defineReadOnly)(_this, \"deploy\", fragment);\n return;\n case \"function\":\n bucket = _this.functions;\n break;\n case \"event\":\n bucket = _this.events;\n break;\n case \"error\":\n bucket = _this.errors;\n break;\n default:\n return;\n }\n var signature = fragment.format();\n if (bucket[signature]) {\n logger.warn(\"duplicate definition - \" + signature);\n return;\n }\n bucket[signature] = fragment;\n });\n if (!this.deploy) {\n (0, properties_1.defineReadOnly)(this, \"deploy\", fragments_1.ConstructorFragment.from({\n payable: false,\n type: \"constructor\"\n }));\n }\n (0, properties_1.defineReadOnly)(this, \"_isInterface\", true);\n }\n Interface2.prototype.format = function(format) {\n if (!format) {\n format = fragments_1.FormatTypes.full;\n }\n if (format === fragments_1.FormatTypes.sighash) {\n logger.throwArgumentError(\"interface does not support formatting sighash\", \"format\", format);\n }\n var abi2 = this.fragments.map(function(fragment) {\n return fragment.format(format);\n });\n if (format === fragments_1.FormatTypes.json) {\n return JSON.stringify(abi2.map(function(j2) {\n return JSON.parse(j2);\n }));\n }\n return abi2;\n };\n Interface2.getAbiCoder = function() {\n return abi_coder_1.defaultAbiCoder;\n };\n Interface2.getAddress = function(address) {\n return (0, address_1.getAddress)(address);\n };\n Interface2.getSighash = function(fragment) {\n return (0, bytes_1.hexDataSlice)((0, hash_1.id)(fragment.format()), 0, 4);\n };\n Interface2.getEventTopic = function(eventFragment) {\n return (0, hash_1.id)(eventFragment.format());\n };\n Interface2.prototype.getFunction = function(nameOrSignatureOrSighash) {\n if ((0, bytes_1.isHexString)(nameOrSignatureOrSighash)) {\n for (var name_1 in this.functions) {\n if (nameOrSignatureOrSighash === this.getSighash(name_1)) {\n return this.functions[name_1];\n }\n }\n logger.throwArgumentError(\"no matching function\", \"sighash\", nameOrSignatureOrSighash);\n }\n if (nameOrSignatureOrSighash.indexOf(\"(\") === -1) {\n var name_2 = nameOrSignatureOrSighash.trim();\n var matching = Object.keys(this.functions).filter(function(f6) {\n return f6.split(\n \"(\"\n /* fix:) */\n )[0] === name_2;\n });\n if (matching.length === 0) {\n logger.throwArgumentError(\"no matching function\", \"name\", name_2);\n } else if (matching.length > 1) {\n logger.throwArgumentError(\"multiple matching functions\", \"name\", name_2);\n }\n return this.functions[matching[0]];\n }\n var result = this.functions[fragments_1.FunctionFragment.fromString(nameOrSignatureOrSighash).format()];\n if (!result) {\n logger.throwArgumentError(\"no matching function\", \"signature\", nameOrSignatureOrSighash);\n }\n return result;\n };\n Interface2.prototype.getEvent = function(nameOrSignatureOrTopic) {\n if ((0, bytes_1.isHexString)(nameOrSignatureOrTopic)) {\n var topichash = nameOrSignatureOrTopic.toLowerCase();\n for (var name_3 in this.events) {\n if (topichash === this.getEventTopic(name_3)) {\n return this.events[name_3];\n }\n }\n logger.throwArgumentError(\"no matching event\", \"topichash\", topichash);\n }\n if (nameOrSignatureOrTopic.indexOf(\"(\") === -1) {\n var name_4 = nameOrSignatureOrTopic.trim();\n var matching = Object.keys(this.events).filter(function(f6) {\n return f6.split(\n \"(\"\n /* fix:) */\n )[0] === name_4;\n });\n if (matching.length === 0) {\n logger.throwArgumentError(\"no matching event\", \"name\", name_4);\n } else if (matching.length > 1) {\n logger.throwArgumentError(\"multiple matching events\", \"name\", name_4);\n }\n return this.events[matching[0]];\n }\n var result = this.events[fragments_1.EventFragment.fromString(nameOrSignatureOrTopic).format()];\n if (!result) {\n logger.throwArgumentError(\"no matching event\", \"signature\", nameOrSignatureOrTopic);\n }\n return result;\n };\n Interface2.prototype.getError = function(nameOrSignatureOrSighash) {\n if ((0, bytes_1.isHexString)(nameOrSignatureOrSighash)) {\n var getSighash = (0, properties_1.getStatic)(this.constructor, \"getSighash\");\n for (var name_5 in this.errors) {\n var error = this.errors[name_5];\n if (nameOrSignatureOrSighash === getSighash(error)) {\n return this.errors[name_5];\n }\n }\n logger.throwArgumentError(\"no matching error\", \"sighash\", nameOrSignatureOrSighash);\n }\n if (nameOrSignatureOrSighash.indexOf(\"(\") === -1) {\n var name_6 = nameOrSignatureOrSighash.trim();\n var matching = Object.keys(this.errors).filter(function(f6) {\n return f6.split(\n \"(\"\n /* fix:) */\n )[0] === name_6;\n });\n if (matching.length === 0) {\n logger.throwArgumentError(\"no matching error\", \"name\", name_6);\n } else if (matching.length > 1) {\n logger.throwArgumentError(\"multiple matching errors\", \"name\", name_6);\n }\n return this.errors[matching[0]];\n }\n var result = this.errors[fragments_1.FunctionFragment.fromString(nameOrSignatureOrSighash).format()];\n if (!result) {\n logger.throwArgumentError(\"no matching error\", \"signature\", nameOrSignatureOrSighash);\n }\n return result;\n };\n Interface2.prototype.getSighash = function(fragment) {\n if (typeof fragment === \"string\") {\n try {\n fragment = this.getFunction(fragment);\n } catch (error) {\n try {\n fragment = this.getError(fragment);\n } catch (_2) {\n throw error;\n }\n }\n }\n return (0, properties_1.getStatic)(this.constructor, \"getSighash\")(fragment);\n };\n Interface2.prototype.getEventTopic = function(eventFragment) {\n if (typeof eventFragment === \"string\") {\n eventFragment = this.getEvent(eventFragment);\n }\n return (0, properties_1.getStatic)(this.constructor, \"getEventTopic\")(eventFragment);\n };\n Interface2.prototype._decodeParams = function(params, data) {\n return this._abiCoder.decode(params, data);\n };\n Interface2.prototype._encodeParams = function(params, values) {\n return this._abiCoder.encode(params, values);\n };\n Interface2.prototype.encodeDeploy = function(values) {\n return this._encodeParams(this.deploy.inputs, values || []);\n };\n Interface2.prototype.decodeErrorResult = function(fragment, data) {\n if (typeof fragment === \"string\") {\n fragment = this.getError(fragment);\n }\n var bytes = (0, bytes_1.arrayify)(data);\n if ((0, bytes_1.hexlify)(bytes.slice(0, 4)) !== this.getSighash(fragment)) {\n logger.throwArgumentError(\"data signature does not match error \" + fragment.name + \".\", \"data\", (0, bytes_1.hexlify)(bytes));\n }\n return this._decodeParams(fragment.inputs, bytes.slice(4));\n };\n Interface2.prototype.encodeErrorResult = function(fragment, values) {\n if (typeof fragment === \"string\") {\n fragment = this.getError(fragment);\n }\n return (0, bytes_1.hexlify)((0, bytes_1.concat)([\n this.getSighash(fragment),\n this._encodeParams(fragment.inputs, values || [])\n ]));\n };\n Interface2.prototype.decodeFunctionData = function(functionFragment, data) {\n if (typeof functionFragment === \"string\") {\n functionFragment = this.getFunction(functionFragment);\n }\n var bytes = (0, bytes_1.arrayify)(data);\n if ((0, bytes_1.hexlify)(bytes.slice(0, 4)) !== this.getSighash(functionFragment)) {\n logger.throwArgumentError(\"data signature does not match function \" + functionFragment.name + \".\", \"data\", (0, bytes_1.hexlify)(bytes));\n }\n return this._decodeParams(functionFragment.inputs, bytes.slice(4));\n };\n Interface2.prototype.encodeFunctionData = function(functionFragment, values) {\n if (typeof functionFragment === \"string\") {\n functionFragment = this.getFunction(functionFragment);\n }\n return (0, bytes_1.hexlify)((0, bytes_1.concat)([\n this.getSighash(functionFragment),\n this._encodeParams(functionFragment.inputs, values || [])\n ]));\n };\n Interface2.prototype.decodeFunctionResult = function(functionFragment, data) {\n if (typeof functionFragment === \"string\") {\n functionFragment = this.getFunction(functionFragment);\n }\n var bytes = (0, bytes_1.arrayify)(data);\n var reason = null;\n var message = \"\";\n var errorArgs = null;\n var errorName = null;\n var errorSignature = null;\n switch (bytes.length % this._abiCoder._getWordSize()) {\n case 0:\n try {\n return this._abiCoder.decode(functionFragment.outputs, bytes);\n } catch (error2) {\n }\n break;\n case 4: {\n var selector = (0, bytes_1.hexlify)(bytes.slice(0, 4));\n var builtin = BuiltinErrors[selector];\n if (builtin) {\n errorArgs = this._abiCoder.decode(builtin.inputs, bytes.slice(4));\n errorName = builtin.name;\n errorSignature = builtin.signature;\n if (builtin.reason) {\n reason = errorArgs[0];\n }\n if (errorName === \"Error\") {\n message = \"; VM Exception while processing transaction: reverted with reason string \" + JSON.stringify(errorArgs[0]);\n } else if (errorName === \"Panic\") {\n message = \"; VM Exception while processing transaction: reverted with panic code \" + errorArgs[0];\n }\n } else {\n try {\n var error = this.getError(selector);\n errorArgs = this._abiCoder.decode(error.inputs, bytes.slice(4));\n errorName = error.name;\n errorSignature = error.format();\n } catch (error2) {\n }\n }\n break;\n }\n }\n return logger.throwError(\"call revert exception\" + message, logger_1.Logger.errors.CALL_EXCEPTION, {\n method: functionFragment.format(),\n data: (0, bytes_1.hexlify)(data),\n errorArgs,\n errorName,\n errorSignature,\n reason\n });\n };\n Interface2.prototype.encodeFunctionResult = function(functionFragment, values) {\n if (typeof functionFragment === \"string\") {\n functionFragment = this.getFunction(functionFragment);\n }\n return (0, bytes_1.hexlify)(this._abiCoder.encode(functionFragment.outputs, values || []));\n };\n Interface2.prototype.encodeFilterTopics = function(eventFragment, values) {\n var _this = this;\n if (typeof eventFragment === \"string\") {\n eventFragment = this.getEvent(eventFragment);\n }\n if (values.length > eventFragment.inputs.length) {\n logger.throwError(\"too many arguments for \" + eventFragment.format(), logger_1.Logger.errors.UNEXPECTED_ARGUMENT, {\n argument: \"values\",\n value: values\n });\n }\n var topics = [];\n if (!eventFragment.anonymous) {\n topics.push(this.getEventTopic(eventFragment));\n }\n var encodeTopic = function(param, value) {\n if (param.type === \"string\") {\n return (0, hash_1.id)(value);\n } else if (param.type === \"bytes\") {\n return (0, keccak256_1.keccak256)((0, bytes_1.hexlify)(value));\n }\n if (param.type === \"bool\" && typeof value === \"boolean\") {\n value = value ? \"0x01\" : \"0x00\";\n }\n if (param.type.match(/^u?int/)) {\n value = bignumber_1.BigNumber.from(value).toHexString();\n }\n if (param.type === \"address\") {\n _this._abiCoder.encode([\"address\"], [value]);\n }\n return (0, bytes_1.hexZeroPad)((0, bytes_1.hexlify)(value), 32);\n };\n values.forEach(function(value, index2) {\n var param = eventFragment.inputs[index2];\n if (!param.indexed) {\n if (value != null) {\n logger.throwArgumentError(\"cannot filter non-indexed parameters; must be null\", \"contract.\" + param.name, value);\n }\n return;\n }\n if (value == null) {\n topics.push(null);\n } else if (param.baseType === \"array\" || param.baseType === \"tuple\") {\n logger.throwArgumentError(\"filtering with tuples or arrays not supported\", \"contract.\" + param.name, value);\n } else if (Array.isArray(value)) {\n topics.push(value.map(function(value2) {\n return encodeTopic(param, value2);\n }));\n } else {\n topics.push(encodeTopic(param, value));\n }\n });\n while (topics.length && topics[topics.length - 1] === null) {\n topics.pop();\n }\n return topics;\n };\n Interface2.prototype.encodeEventLog = function(eventFragment, values) {\n var _this = this;\n if (typeof eventFragment === \"string\") {\n eventFragment = this.getEvent(eventFragment);\n }\n var topics = [];\n var dataTypes = [];\n var dataValues = [];\n if (!eventFragment.anonymous) {\n topics.push(this.getEventTopic(eventFragment));\n }\n if (values.length !== eventFragment.inputs.length) {\n logger.throwArgumentError(\"event arguments/values mismatch\", \"values\", values);\n }\n eventFragment.inputs.forEach(function(param, index2) {\n var value = values[index2];\n if (param.indexed) {\n if (param.type === \"string\") {\n topics.push((0, hash_1.id)(value));\n } else if (param.type === \"bytes\") {\n topics.push((0, keccak256_1.keccak256)(value));\n } else if (param.baseType === \"tuple\" || param.baseType === \"array\") {\n throw new Error(\"not implemented\");\n } else {\n topics.push(_this._abiCoder.encode([param.type], [value]));\n }\n } else {\n dataTypes.push(param);\n dataValues.push(value);\n }\n });\n return {\n data: this._abiCoder.encode(dataTypes, dataValues),\n topics\n };\n };\n Interface2.prototype.decodeEventLog = function(eventFragment, data, topics) {\n if (typeof eventFragment === \"string\") {\n eventFragment = this.getEvent(eventFragment);\n }\n if (topics != null && !eventFragment.anonymous) {\n var topicHash = this.getEventTopic(eventFragment);\n if (!(0, bytes_1.isHexString)(topics[0], 32) || topics[0].toLowerCase() !== topicHash) {\n logger.throwError(\"fragment/topic mismatch\", logger_1.Logger.errors.INVALID_ARGUMENT, { argument: \"topics[0]\", expected: topicHash, value: topics[0] });\n }\n topics = topics.slice(1);\n }\n var indexed = [];\n var nonIndexed = [];\n var dynamic = [];\n eventFragment.inputs.forEach(function(param, index2) {\n if (param.indexed) {\n if (param.type === \"string\" || param.type === \"bytes\" || param.baseType === \"tuple\" || param.baseType === \"array\") {\n indexed.push(fragments_1.ParamType.fromObject({ type: \"bytes32\", name: param.name }));\n dynamic.push(true);\n } else {\n indexed.push(param);\n dynamic.push(false);\n }\n } else {\n nonIndexed.push(param);\n dynamic.push(false);\n }\n });\n var resultIndexed = topics != null ? this._abiCoder.decode(indexed, (0, bytes_1.concat)(topics)) : null;\n var resultNonIndexed = this._abiCoder.decode(nonIndexed, data, true);\n var result = [];\n var nonIndexedIndex = 0, indexedIndex = 0;\n eventFragment.inputs.forEach(function(param, index2) {\n if (param.indexed) {\n if (resultIndexed == null) {\n result[index2] = new Indexed({ _isIndexed: true, hash: null });\n } else if (dynamic[index2]) {\n result[index2] = new Indexed({ _isIndexed: true, hash: resultIndexed[indexedIndex++] });\n } else {\n try {\n result[index2] = resultIndexed[indexedIndex++];\n } catch (error) {\n result[index2] = error;\n }\n }\n } else {\n try {\n result[index2] = resultNonIndexed[nonIndexedIndex++];\n } catch (error) {\n result[index2] = error;\n }\n }\n if (param.name && result[param.name] == null) {\n var value_1 = result[index2];\n if (value_1 instanceof Error) {\n Object.defineProperty(result, param.name, {\n enumerable: true,\n get: function() {\n throw wrapAccessError(\"property \" + JSON.stringify(param.name), value_1);\n }\n });\n } else {\n result[param.name] = value_1;\n }\n }\n });\n var _loop_1 = function(i4) {\n var value = result[i4];\n if (value instanceof Error) {\n Object.defineProperty(result, i4, {\n enumerable: true,\n get: function() {\n throw wrapAccessError(\"index \" + i4, value);\n }\n });\n }\n };\n for (var i3 = 0; i3 < result.length; i3++) {\n _loop_1(i3);\n }\n return Object.freeze(result);\n };\n Interface2.prototype.parseTransaction = function(tx) {\n var fragment = this.getFunction(tx.data.substring(0, 10).toLowerCase());\n if (!fragment) {\n return null;\n }\n return new TransactionDescription({\n args: this._abiCoder.decode(fragment.inputs, \"0x\" + tx.data.substring(10)),\n functionFragment: fragment,\n name: fragment.name,\n signature: fragment.format(),\n sighash: this.getSighash(fragment),\n value: bignumber_1.BigNumber.from(tx.value || \"0\")\n });\n };\n Interface2.prototype.parseLog = function(log) {\n var fragment = this.getEvent(log.topics[0]);\n if (!fragment || fragment.anonymous) {\n return null;\n }\n return new LogDescription({\n eventFragment: fragment,\n name: fragment.name,\n signature: fragment.format(),\n topic: this.getEventTopic(fragment),\n args: this.decodeEventLog(fragment, log.data, log.topics)\n });\n };\n Interface2.prototype.parseError = function(data) {\n var hexData = (0, bytes_1.hexlify)(data);\n var fragment = this.getError(hexData.substring(0, 10).toLowerCase());\n if (!fragment) {\n return null;\n }\n return new ErrorDescription({\n args: this._abiCoder.decode(fragment.inputs, \"0x\" + hexData.substring(10)),\n errorFragment: fragment,\n name: fragment.name,\n signature: fragment.format(),\n sighash: this.getSighash(fragment)\n });\n };\n Interface2.isInterface = function(value) {\n return !!(value && value._isInterface);\n };\n return Interface2;\n }()\n );\n exports3.Interface = Interface;\n }\n });\n\n // ../../../node_modules/.pnpm/@ethersproject+abi@5.8.0/node_modules/@ethersproject/abi/lib/index.js\n var require_lib13 = __commonJS({\n \"../../../node_modules/.pnpm/@ethersproject+abi@5.8.0/node_modules/@ethersproject/abi/lib/index.js\"(exports3) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n Object.defineProperty(exports3, \"__esModule\", { value: true });\n exports3.TransactionDescription = exports3.LogDescription = exports3.checkResultErrors = exports3.Indexed = exports3.Interface = exports3.defaultAbiCoder = exports3.AbiCoder = exports3.FormatTypes = exports3.ParamType = exports3.FunctionFragment = exports3.Fragment = exports3.EventFragment = exports3.ErrorFragment = exports3.ConstructorFragment = void 0;\n var fragments_1 = require_fragments();\n Object.defineProperty(exports3, \"ConstructorFragment\", { enumerable: true, get: function() {\n return fragments_1.ConstructorFragment;\n } });\n Object.defineProperty(exports3, \"ErrorFragment\", { enumerable: true, get: function() {\n return fragments_1.ErrorFragment;\n } });\n Object.defineProperty(exports3, \"EventFragment\", { enumerable: true, get: function() {\n return fragments_1.EventFragment;\n } });\n Object.defineProperty(exports3, \"FormatTypes\", { enumerable: true, get: function() {\n return fragments_1.FormatTypes;\n } });\n Object.defineProperty(exports3, \"Fragment\", { enumerable: true, get: function() {\n return fragments_1.Fragment;\n } });\n Object.defineProperty(exports3, \"FunctionFragment\", { enumerable: true, get: function() {\n return fragments_1.FunctionFragment;\n } });\n Object.defineProperty(exports3, \"ParamType\", { enumerable: true, get: function() {\n return fragments_1.ParamType;\n } });\n var abi_coder_1 = require_abi_coder();\n Object.defineProperty(exports3, \"AbiCoder\", { enumerable: true, get: function() {\n return abi_coder_1.AbiCoder;\n } });\n Object.defineProperty(exports3, \"defaultAbiCoder\", { enumerable: true, get: function() {\n return abi_coder_1.defaultAbiCoder;\n } });\n var interface_1 = require_interface();\n Object.defineProperty(exports3, \"checkResultErrors\", { enumerable: true, get: function() {\n return interface_1.checkResultErrors;\n } });\n Object.defineProperty(exports3, \"Indexed\", { enumerable: true, get: function() {\n return interface_1.Indexed;\n } });\n Object.defineProperty(exports3, \"Interface\", { enumerable: true, get: function() {\n return interface_1.Interface;\n } });\n Object.defineProperty(exports3, \"LogDescription\", { enumerable: true, get: function() {\n return interface_1.LogDescription;\n } });\n Object.defineProperty(exports3, \"TransactionDescription\", { enumerable: true, get: function() {\n return interface_1.TransactionDescription;\n } });\n }\n });\n\n // ../../../node_modules/.pnpm/@ethersproject+abstract-provider@5.8.0/node_modules/@ethersproject/abstract-provider/lib/_version.js\n var require_version10 = __commonJS({\n \"../../../node_modules/.pnpm/@ethersproject+abstract-provider@5.8.0/node_modules/@ethersproject/abstract-provider/lib/_version.js\"(exports3) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n Object.defineProperty(exports3, \"__esModule\", { value: true });\n exports3.version = void 0;\n exports3.version = \"abstract-provider/5.8.0\";\n }\n });\n\n // ../../../node_modules/.pnpm/@ethersproject+abstract-provider@5.8.0/node_modules/@ethersproject/abstract-provider/lib/index.js\n var require_lib14 = __commonJS({\n \"../../../node_modules/.pnpm/@ethersproject+abstract-provider@5.8.0/node_modules/@ethersproject/abstract-provider/lib/index.js\"(exports3) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n var __extends3 = exports3 && exports3.__extends || /* @__PURE__ */ function() {\n var extendStatics3 = function(d5, b4) {\n extendStatics3 = Object.setPrototypeOf || { __proto__: [] } instanceof Array && function(d6, b5) {\n d6.__proto__ = b5;\n } || function(d6, b5) {\n for (var p4 in b5)\n if (Object.prototype.hasOwnProperty.call(b5, p4))\n d6[p4] = b5[p4];\n };\n return extendStatics3(d5, b4);\n };\n return function(d5, b4) {\n if (typeof b4 !== \"function\" && b4 !== null)\n throw new TypeError(\"Class extends value \" + String(b4) + \" is not a constructor or null\");\n extendStatics3(d5, b4);\n function __() {\n this.constructor = d5;\n }\n d5.prototype = b4 === null ? Object.create(b4) : (__.prototype = b4.prototype, new __());\n };\n }();\n var __awaiter3 = exports3 && exports3.__awaiter || function(thisArg, _arguments, P2, generator) {\n function adopt(value) {\n return value instanceof P2 ? value : new P2(function(resolve) {\n resolve(value);\n });\n }\n return new (P2 || (P2 = Promise))(function(resolve, reject) {\n function fulfilled(value) {\n try {\n step(generator.next(value));\n } catch (e3) {\n reject(e3);\n }\n }\n function rejected(value) {\n try {\n step(generator[\"throw\"](value));\n } catch (e3) {\n reject(e3);\n }\n }\n function step(result) {\n result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected);\n }\n step((generator = generator.apply(thisArg, _arguments || [])).next());\n });\n };\n var __generator3 = exports3 && exports3.__generator || function(thisArg, body) {\n var _2 = { label: 0, sent: function() {\n if (t3[0] & 1)\n throw t3[1];\n return t3[1];\n }, trys: [], ops: [] }, f6, y6, t3, g4;\n return g4 = { next: verb(0), \"throw\": verb(1), \"return\": verb(2) }, typeof Symbol === \"function\" && (g4[Symbol.iterator] = function() {\n return this;\n }), g4;\n function verb(n2) {\n return function(v2) {\n return step([n2, v2]);\n };\n }\n function step(op) {\n if (f6)\n throw new TypeError(\"Generator is already executing.\");\n while (_2)\n try {\n if (f6 = 1, y6 && (t3 = op[0] & 2 ? y6[\"return\"] : op[0] ? y6[\"throw\"] || ((t3 = y6[\"return\"]) && t3.call(y6), 0) : y6.next) && !(t3 = t3.call(y6, op[1])).done)\n return t3;\n if (y6 = 0, t3)\n op = [op[0] & 2, t3.value];\n switch (op[0]) {\n case 0:\n case 1:\n t3 = op;\n break;\n case 4:\n _2.label++;\n return { value: op[1], done: false };\n case 5:\n _2.label++;\n y6 = op[1];\n op = [0];\n continue;\n case 7:\n op = _2.ops.pop();\n _2.trys.pop();\n continue;\n default:\n if (!(t3 = _2.trys, t3 = t3.length > 0 && t3[t3.length - 1]) && (op[0] === 6 || op[0] === 2)) {\n _2 = 0;\n continue;\n }\n if (op[0] === 3 && (!t3 || op[1] > t3[0] && op[1] < t3[3])) {\n _2.label = op[1];\n break;\n }\n if (op[0] === 6 && _2.label < t3[1]) {\n _2.label = t3[1];\n t3 = op;\n break;\n }\n if (t3 && _2.label < t3[2]) {\n _2.label = t3[2];\n _2.ops.push(op);\n break;\n }\n if (t3[2])\n _2.ops.pop();\n _2.trys.pop();\n continue;\n }\n op = body.call(thisArg, _2);\n } catch (e3) {\n op = [6, e3];\n y6 = 0;\n } finally {\n f6 = t3 = 0;\n }\n if (op[0] & 5)\n throw op[1];\n return { value: op[0] ? op[1] : void 0, done: true };\n }\n };\n Object.defineProperty(exports3, \"__esModule\", { value: true });\n exports3.Provider = exports3.TransactionOrderForkEvent = exports3.TransactionForkEvent = exports3.BlockForkEvent = exports3.ForkEvent = void 0;\n var bignumber_1 = require_lib3();\n var bytes_1 = require_lib2();\n var properties_1 = require_lib4();\n var logger_1 = require_lib();\n var _version_1 = require_version10();\n var logger = new logger_1.Logger(_version_1.version);\n var ForkEvent = (\n /** @class */\n function(_super) {\n __extends3(ForkEvent2, _super);\n function ForkEvent2() {\n return _super !== null && _super.apply(this, arguments) || this;\n }\n ForkEvent2.isForkEvent = function(value) {\n return !!(value && value._isForkEvent);\n };\n return ForkEvent2;\n }(properties_1.Description)\n );\n exports3.ForkEvent = ForkEvent;\n var BlockForkEvent = (\n /** @class */\n function(_super) {\n __extends3(BlockForkEvent2, _super);\n function BlockForkEvent2(blockHash, expiry) {\n var _this = this;\n if (!(0, bytes_1.isHexString)(blockHash, 32)) {\n logger.throwArgumentError(\"invalid blockHash\", \"blockHash\", blockHash);\n }\n _this = _super.call(this, {\n _isForkEvent: true,\n _isBlockForkEvent: true,\n expiry: expiry || 0,\n blockHash\n }) || this;\n return _this;\n }\n return BlockForkEvent2;\n }(ForkEvent)\n );\n exports3.BlockForkEvent = BlockForkEvent;\n var TransactionForkEvent = (\n /** @class */\n function(_super) {\n __extends3(TransactionForkEvent2, _super);\n function TransactionForkEvent2(hash3, expiry) {\n var _this = this;\n if (!(0, bytes_1.isHexString)(hash3, 32)) {\n logger.throwArgumentError(\"invalid transaction hash\", \"hash\", hash3);\n }\n _this = _super.call(this, {\n _isForkEvent: true,\n _isTransactionForkEvent: true,\n expiry: expiry || 0,\n hash: hash3\n }) || this;\n return _this;\n }\n return TransactionForkEvent2;\n }(ForkEvent)\n );\n exports3.TransactionForkEvent = TransactionForkEvent;\n var TransactionOrderForkEvent = (\n /** @class */\n function(_super) {\n __extends3(TransactionOrderForkEvent2, _super);\n function TransactionOrderForkEvent2(beforeHash, afterHash, expiry) {\n var _this = this;\n if (!(0, bytes_1.isHexString)(beforeHash, 32)) {\n logger.throwArgumentError(\"invalid transaction hash\", \"beforeHash\", beforeHash);\n }\n if (!(0, bytes_1.isHexString)(afterHash, 32)) {\n logger.throwArgumentError(\"invalid transaction hash\", \"afterHash\", afterHash);\n }\n _this = _super.call(this, {\n _isForkEvent: true,\n _isTransactionOrderForkEvent: true,\n expiry: expiry || 0,\n beforeHash,\n afterHash\n }) || this;\n return _this;\n }\n return TransactionOrderForkEvent2;\n }(ForkEvent)\n );\n exports3.TransactionOrderForkEvent = TransactionOrderForkEvent;\n var Provider = (\n /** @class */\n function() {\n function Provider2() {\n var _newTarget = this.constructor;\n logger.checkAbstract(_newTarget, Provider2);\n (0, properties_1.defineReadOnly)(this, \"_isProvider\", true);\n }\n Provider2.prototype.getFeeData = function() {\n return __awaiter3(this, void 0, void 0, function() {\n var _a, block, gasPrice, lastBaseFeePerGas, maxFeePerGas, maxPriorityFeePerGas;\n return __generator3(this, function(_b) {\n switch (_b.label) {\n case 0:\n return [4, (0, properties_1.resolveProperties)({\n block: this.getBlock(\"latest\"),\n gasPrice: this.getGasPrice().catch(function(error) {\n return null;\n })\n })];\n case 1:\n _a = _b.sent(), block = _a.block, gasPrice = _a.gasPrice;\n lastBaseFeePerGas = null, maxFeePerGas = null, maxPriorityFeePerGas = null;\n if (block && block.baseFeePerGas) {\n lastBaseFeePerGas = block.baseFeePerGas;\n maxPriorityFeePerGas = bignumber_1.BigNumber.from(\"1500000000\");\n maxFeePerGas = block.baseFeePerGas.mul(2).add(maxPriorityFeePerGas);\n }\n return [2, { lastBaseFeePerGas, maxFeePerGas, maxPriorityFeePerGas, gasPrice }];\n }\n });\n });\n };\n Provider2.prototype.addListener = function(eventName, listener) {\n return this.on(eventName, listener);\n };\n Provider2.prototype.removeListener = function(eventName, listener) {\n return this.off(eventName, listener);\n };\n Provider2.isProvider = function(value) {\n return !!(value && value._isProvider);\n };\n return Provider2;\n }()\n );\n exports3.Provider = Provider;\n }\n });\n\n // ../../../node_modules/.pnpm/@ethersproject+abstract-signer@5.8.0/node_modules/@ethersproject/abstract-signer/lib/_version.js\n var require_version11 = __commonJS({\n \"../../../node_modules/.pnpm/@ethersproject+abstract-signer@5.8.0/node_modules/@ethersproject/abstract-signer/lib/_version.js\"(exports3) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n Object.defineProperty(exports3, \"__esModule\", { value: true });\n exports3.version = void 0;\n exports3.version = \"abstract-signer/5.8.0\";\n }\n });\n\n // ../../../node_modules/.pnpm/@ethersproject+abstract-signer@5.8.0/node_modules/@ethersproject/abstract-signer/lib/index.js\n var require_lib15 = __commonJS({\n \"../../../node_modules/.pnpm/@ethersproject+abstract-signer@5.8.0/node_modules/@ethersproject/abstract-signer/lib/index.js\"(exports3) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n var __extends3 = exports3 && exports3.__extends || /* @__PURE__ */ function() {\n var extendStatics3 = function(d5, b4) {\n extendStatics3 = Object.setPrototypeOf || { __proto__: [] } instanceof Array && function(d6, b5) {\n d6.__proto__ = b5;\n } || function(d6, b5) {\n for (var p4 in b5)\n if (Object.prototype.hasOwnProperty.call(b5, p4))\n d6[p4] = b5[p4];\n };\n return extendStatics3(d5, b4);\n };\n return function(d5, b4) {\n if (typeof b4 !== \"function\" && b4 !== null)\n throw new TypeError(\"Class extends value \" + String(b4) + \" is not a constructor or null\");\n extendStatics3(d5, b4);\n function __() {\n this.constructor = d5;\n }\n d5.prototype = b4 === null ? Object.create(b4) : (__.prototype = b4.prototype, new __());\n };\n }();\n var __awaiter3 = exports3 && exports3.__awaiter || function(thisArg, _arguments, P2, generator) {\n function adopt(value) {\n return value instanceof P2 ? value : new P2(function(resolve) {\n resolve(value);\n });\n }\n return new (P2 || (P2 = Promise))(function(resolve, reject) {\n function fulfilled(value) {\n try {\n step(generator.next(value));\n } catch (e3) {\n reject(e3);\n }\n }\n function rejected(value) {\n try {\n step(generator[\"throw\"](value));\n } catch (e3) {\n reject(e3);\n }\n }\n function step(result) {\n result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected);\n }\n step((generator = generator.apply(thisArg, _arguments || [])).next());\n });\n };\n var __generator3 = exports3 && exports3.__generator || function(thisArg, body) {\n var _2 = { label: 0, sent: function() {\n if (t3[0] & 1)\n throw t3[1];\n return t3[1];\n }, trys: [], ops: [] }, f6, y6, t3, g4;\n return g4 = { next: verb(0), \"throw\": verb(1), \"return\": verb(2) }, typeof Symbol === \"function\" && (g4[Symbol.iterator] = function() {\n return this;\n }), g4;\n function verb(n2) {\n return function(v2) {\n return step([n2, v2]);\n };\n }\n function step(op) {\n if (f6)\n throw new TypeError(\"Generator is already executing.\");\n while (_2)\n try {\n if (f6 = 1, y6 && (t3 = op[0] & 2 ? y6[\"return\"] : op[0] ? y6[\"throw\"] || ((t3 = y6[\"return\"]) && t3.call(y6), 0) : y6.next) && !(t3 = t3.call(y6, op[1])).done)\n return t3;\n if (y6 = 0, t3)\n op = [op[0] & 2, t3.value];\n switch (op[0]) {\n case 0:\n case 1:\n t3 = op;\n break;\n case 4:\n _2.label++;\n return { value: op[1], done: false };\n case 5:\n _2.label++;\n y6 = op[1];\n op = [0];\n continue;\n case 7:\n op = _2.ops.pop();\n _2.trys.pop();\n continue;\n default:\n if (!(t3 = _2.trys, t3 = t3.length > 0 && t3[t3.length - 1]) && (op[0] === 6 || op[0] === 2)) {\n _2 = 0;\n continue;\n }\n if (op[0] === 3 && (!t3 || op[1] > t3[0] && op[1] < t3[3])) {\n _2.label = op[1];\n break;\n }\n if (op[0] === 6 && _2.label < t3[1]) {\n _2.label = t3[1];\n t3 = op;\n break;\n }\n if (t3 && _2.label < t3[2]) {\n _2.label = t3[2];\n _2.ops.push(op);\n break;\n }\n if (t3[2])\n _2.ops.pop();\n _2.trys.pop();\n continue;\n }\n op = body.call(thisArg, _2);\n } catch (e3) {\n op = [6, e3];\n y6 = 0;\n } finally {\n f6 = t3 = 0;\n }\n if (op[0] & 5)\n throw op[1];\n return { value: op[0] ? op[1] : void 0, done: true };\n }\n };\n Object.defineProperty(exports3, \"__esModule\", { value: true });\n exports3.VoidSigner = exports3.Signer = void 0;\n var properties_1 = require_lib4();\n var logger_1 = require_lib();\n var _version_1 = require_version11();\n var logger = new logger_1.Logger(_version_1.version);\n var allowedTransactionKeys = [\n \"accessList\",\n \"ccipReadEnabled\",\n \"chainId\",\n \"customData\",\n \"data\",\n \"from\",\n \"gasLimit\",\n \"gasPrice\",\n \"maxFeePerGas\",\n \"maxPriorityFeePerGas\",\n \"nonce\",\n \"to\",\n \"type\",\n \"value\"\n ];\n var forwardErrors = [\n logger_1.Logger.errors.INSUFFICIENT_FUNDS,\n logger_1.Logger.errors.NONCE_EXPIRED,\n logger_1.Logger.errors.REPLACEMENT_UNDERPRICED\n ];\n var Signer = (\n /** @class */\n function() {\n function Signer2() {\n var _newTarget = this.constructor;\n logger.checkAbstract(_newTarget, Signer2);\n (0, properties_1.defineReadOnly)(this, \"_isSigner\", true);\n }\n Signer2.prototype.getBalance = function(blockTag) {\n return __awaiter3(this, void 0, void 0, function() {\n return __generator3(this, function(_a) {\n switch (_a.label) {\n case 0:\n this._checkProvider(\"getBalance\");\n return [4, this.provider.getBalance(this.getAddress(), blockTag)];\n case 1:\n return [2, _a.sent()];\n }\n });\n });\n };\n Signer2.prototype.getTransactionCount = function(blockTag) {\n return __awaiter3(this, void 0, void 0, function() {\n return __generator3(this, function(_a) {\n switch (_a.label) {\n case 0:\n this._checkProvider(\"getTransactionCount\");\n return [4, this.provider.getTransactionCount(this.getAddress(), blockTag)];\n case 1:\n return [2, _a.sent()];\n }\n });\n });\n };\n Signer2.prototype.estimateGas = function(transaction) {\n return __awaiter3(this, void 0, void 0, function() {\n var tx;\n return __generator3(this, function(_a) {\n switch (_a.label) {\n case 0:\n this._checkProvider(\"estimateGas\");\n return [4, (0, properties_1.resolveProperties)(this.checkTransaction(transaction))];\n case 1:\n tx = _a.sent();\n return [4, this.provider.estimateGas(tx)];\n case 2:\n return [2, _a.sent()];\n }\n });\n });\n };\n Signer2.prototype.call = function(transaction, blockTag) {\n return __awaiter3(this, void 0, void 0, function() {\n var tx;\n return __generator3(this, function(_a) {\n switch (_a.label) {\n case 0:\n this._checkProvider(\"call\");\n return [4, (0, properties_1.resolveProperties)(this.checkTransaction(transaction))];\n case 1:\n tx = _a.sent();\n return [4, this.provider.call(tx, blockTag)];\n case 2:\n return [2, _a.sent()];\n }\n });\n });\n };\n Signer2.prototype.sendTransaction = function(transaction) {\n return __awaiter3(this, void 0, void 0, function() {\n var tx, signedTx;\n return __generator3(this, function(_a) {\n switch (_a.label) {\n case 0:\n this._checkProvider(\"sendTransaction\");\n return [4, this.populateTransaction(transaction)];\n case 1:\n tx = _a.sent();\n return [4, this.signTransaction(tx)];\n case 2:\n signedTx = _a.sent();\n return [4, this.provider.sendTransaction(signedTx)];\n case 3:\n return [2, _a.sent()];\n }\n });\n });\n };\n Signer2.prototype.getChainId = function() {\n return __awaiter3(this, void 0, void 0, function() {\n var network;\n return __generator3(this, function(_a) {\n switch (_a.label) {\n case 0:\n this._checkProvider(\"getChainId\");\n return [4, this.provider.getNetwork()];\n case 1:\n network = _a.sent();\n return [2, network.chainId];\n }\n });\n });\n };\n Signer2.prototype.getGasPrice = function() {\n return __awaiter3(this, void 0, void 0, function() {\n return __generator3(this, function(_a) {\n switch (_a.label) {\n case 0:\n this._checkProvider(\"getGasPrice\");\n return [4, this.provider.getGasPrice()];\n case 1:\n return [2, _a.sent()];\n }\n });\n });\n };\n Signer2.prototype.getFeeData = function() {\n return __awaiter3(this, void 0, void 0, function() {\n return __generator3(this, function(_a) {\n switch (_a.label) {\n case 0:\n this._checkProvider(\"getFeeData\");\n return [4, this.provider.getFeeData()];\n case 1:\n return [2, _a.sent()];\n }\n });\n });\n };\n Signer2.prototype.resolveName = function(name) {\n return __awaiter3(this, void 0, void 0, function() {\n return __generator3(this, function(_a) {\n switch (_a.label) {\n case 0:\n this._checkProvider(\"resolveName\");\n return [4, this.provider.resolveName(name)];\n case 1:\n return [2, _a.sent()];\n }\n });\n });\n };\n Signer2.prototype.checkTransaction = function(transaction) {\n for (var key in transaction) {\n if (allowedTransactionKeys.indexOf(key) === -1) {\n logger.throwArgumentError(\"invalid transaction key: \" + key, \"transaction\", transaction);\n }\n }\n var tx = (0, properties_1.shallowCopy)(transaction);\n if (tx.from == null) {\n tx.from = this.getAddress();\n } else {\n tx.from = Promise.all([\n Promise.resolve(tx.from),\n this.getAddress()\n ]).then(function(result) {\n if (result[0].toLowerCase() !== result[1].toLowerCase()) {\n logger.throwArgumentError(\"from address mismatch\", \"transaction\", transaction);\n }\n return result[0];\n });\n }\n return tx;\n };\n Signer2.prototype.populateTransaction = function(transaction) {\n return __awaiter3(this, void 0, void 0, function() {\n var tx, hasEip1559, feeData, gasPrice;\n var _this = this;\n return __generator3(this, function(_a) {\n switch (_a.label) {\n case 0:\n return [4, (0, properties_1.resolveProperties)(this.checkTransaction(transaction))];\n case 1:\n tx = _a.sent();\n if (tx.to != null) {\n tx.to = Promise.resolve(tx.to).then(function(to) {\n return __awaiter3(_this, void 0, void 0, function() {\n var address;\n return __generator3(this, function(_a2) {\n switch (_a2.label) {\n case 0:\n if (to == null) {\n return [2, null];\n }\n return [4, this.resolveName(to)];\n case 1:\n address = _a2.sent();\n if (address == null) {\n logger.throwArgumentError(\"provided ENS name resolves to null\", \"tx.to\", to);\n }\n return [2, address];\n }\n });\n });\n });\n tx.to.catch(function(error) {\n });\n }\n hasEip1559 = tx.maxFeePerGas != null || tx.maxPriorityFeePerGas != null;\n if (tx.gasPrice != null && (tx.type === 2 || hasEip1559)) {\n logger.throwArgumentError(\"eip-1559 transaction do not support gasPrice\", \"transaction\", transaction);\n } else if ((tx.type === 0 || tx.type === 1) && hasEip1559) {\n logger.throwArgumentError(\"pre-eip-1559 transaction do not support maxFeePerGas/maxPriorityFeePerGas\", \"transaction\", transaction);\n }\n if (!((tx.type === 2 || tx.type == null) && (tx.maxFeePerGas != null && tx.maxPriorityFeePerGas != null)))\n return [3, 2];\n tx.type = 2;\n return [3, 5];\n case 2:\n if (!(tx.type === 0 || tx.type === 1))\n return [3, 3];\n if (tx.gasPrice == null) {\n tx.gasPrice = this.getGasPrice();\n }\n return [3, 5];\n case 3:\n return [4, this.getFeeData()];\n case 4:\n feeData = _a.sent();\n if (tx.type == null) {\n if (feeData.maxFeePerGas != null && feeData.maxPriorityFeePerGas != null) {\n tx.type = 2;\n if (tx.gasPrice != null) {\n gasPrice = tx.gasPrice;\n delete tx.gasPrice;\n tx.maxFeePerGas = gasPrice;\n tx.maxPriorityFeePerGas = gasPrice;\n } else {\n if (tx.maxFeePerGas == null) {\n tx.maxFeePerGas = feeData.maxFeePerGas;\n }\n if (tx.maxPriorityFeePerGas == null) {\n tx.maxPriorityFeePerGas = feeData.maxPriorityFeePerGas;\n }\n }\n } else if (feeData.gasPrice != null) {\n if (hasEip1559) {\n logger.throwError(\"network does not support EIP-1559\", logger_1.Logger.errors.UNSUPPORTED_OPERATION, {\n operation: \"populateTransaction\"\n });\n }\n if (tx.gasPrice == null) {\n tx.gasPrice = feeData.gasPrice;\n }\n tx.type = 0;\n } else {\n logger.throwError(\"failed to get consistent fee data\", logger_1.Logger.errors.UNSUPPORTED_OPERATION, {\n operation: \"signer.getFeeData\"\n });\n }\n } else if (tx.type === 2) {\n if (tx.maxFeePerGas == null) {\n tx.maxFeePerGas = feeData.maxFeePerGas;\n }\n if (tx.maxPriorityFeePerGas == null) {\n tx.maxPriorityFeePerGas = feeData.maxPriorityFeePerGas;\n }\n }\n _a.label = 5;\n case 5:\n if (tx.nonce == null) {\n tx.nonce = this.getTransactionCount(\"pending\");\n }\n if (tx.gasLimit == null) {\n tx.gasLimit = this.estimateGas(tx).catch(function(error) {\n if (forwardErrors.indexOf(error.code) >= 0) {\n throw error;\n }\n return logger.throwError(\"cannot estimate gas; transaction may fail or may require manual gas limit\", logger_1.Logger.errors.UNPREDICTABLE_GAS_LIMIT, {\n error,\n tx\n });\n });\n }\n if (tx.chainId == null) {\n tx.chainId = this.getChainId();\n } else {\n tx.chainId = Promise.all([\n Promise.resolve(tx.chainId),\n this.getChainId()\n ]).then(function(results) {\n if (results[1] !== 0 && results[0] !== results[1]) {\n logger.throwArgumentError(\"chainId address mismatch\", \"transaction\", transaction);\n }\n return results[0];\n });\n }\n return [4, (0, properties_1.resolveProperties)(tx)];\n case 6:\n return [2, _a.sent()];\n }\n });\n });\n };\n Signer2.prototype._checkProvider = function(operation) {\n if (!this.provider) {\n logger.throwError(\"missing provider\", logger_1.Logger.errors.UNSUPPORTED_OPERATION, {\n operation: operation || \"_checkProvider\"\n });\n }\n };\n Signer2.isSigner = function(value) {\n return !!(value && value._isSigner);\n };\n return Signer2;\n }()\n );\n exports3.Signer = Signer;\n var VoidSigner = (\n /** @class */\n function(_super) {\n __extends3(VoidSigner2, _super);\n function VoidSigner2(address, provider) {\n var _this = _super.call(this) || this;\n (0, properties_1.defineReadOnly)(_this, \"address\", address);\n (0, properties_1.defineReadOnly)(_this, \"provider\", provider || null);\n return _this;\n }\n VoidSigner2.prototype.getAddress = function() {\n return Promise.resolve(this.address);\n };\n VoidSigner2.prototype._fail = function(message, operation) {\n return Promise.resolve().then(function() {\n logger.throwError(message, logger_1.Logger.errors.UNSUPPORTED_OPERATION, { operation });\n });\n };\n VoidSigner2.prototype.signMessage = function(message) {\n return this._fail(\"VoidSigner cannot sign messages\", \"signMessage\");\n };\n VoidSigner2.prototype.signTransaction = function(transaction) {\n return this._fail(\"VoidSigner cannot sign transactions\", \"signTransaction\");\n };\n VoidSigner2.prototype._signTypedData = function(domain2, types, value) {\n return this._fail(\"VoidSigner cannot sign typed data\", \"signTypedData\");\n };\n VoidSigner2.prototype.connect = function(provider) {\n return new VoidSigner2(this.address, provider);\n };\n return VoidSigner2;\n }(Signer)\n );\n exports3.VoidSigner = VoidSigner;\n }\n });\n\n // ../../../node_modules/.pnpm/elliptic@6.6.1/node_modules/elliptic/package.json\n var require_package = __commonJS({\n \"../../../node_modules/.pnpm/elliptic@6.6.1/node_modules/elliptic/package.json\"(exports3, module) {\n module.exports = {\n name: \"elliptic\",\n version: \"6.6.1\",\n description: \"EC cryptography\",\n main: \"lib/elliptic.js\",\n files: [\n \"lib\"\n ],\n scripts: {\n lint: \"eslint lib test\",\n \"lint:fix\": \"npm run lint -- --fix\",\n unit: \"istanbul test _mocha --reporter=spec test/index.js\",\n test: \"npm run lint && npm run unit\",\n version: \"grunt dist && git add dist/\"\n },\n repository: {\n type: \"git\",\n url: \"git@github.com:indutny/elliptic\"\n },\n keywords: [\n \"EC\",\n \"Elliptic\",\n \"curve\",\n \"Cryptography\"\n ],\n author: \"Fedor Indutny \",\n license: \"MIT\",\n bugs: {\n url: \"https://github.com/indutny/elliptic/issues\"\n },\n homepage: \"https://github.com/indutny/elliptic\",\n devDependencies: {\n brfs: \"^2.0.2\",\n coveralls: \"^3.1.0\",\n eslint: \"^7.6.0\",\n grunt: \"^1.2.1\",\n \"grunt-browserify\": \"^5.3.0\",\n \"grunt-cli\": \"^1.3.2\",\n \"grunt-contrib-connect\": \"^3.0.0\",\n \"grunt-contrib-copy\": \"^1.0.0\",\n \"grunt-contrib-uglify\": \"^5.0.0\",\n \"grunt-mocha-istanbul\": \"^5.0.2\",\n \"grunt-saucelabs\": \"^9.0.1\",\n istanbul: \"^0.4.5\",\n mocha: \"^8.0.1\"\n },\n dependencies: {\n \"bn.js\": \"^4.11.9\",\n brorand: \"^1.1.0\",\n \"hash.js\": \"^1.0.0\",\n \"hmac-drbg\": \"^1.0.1\",\n inherits: \"^2.0.4\",\n \"minimalistic-assert\": \"^1.0.1\",\n \"minimalistic-crypto-utils\": \"^1.0.1\"\n }\n };\n }\n });\n\n // ../../../node_modules/.pnpm/bn.js@4.12.2/node_modules/bn.js/lib/bn.js\n var require_bn2 = __commonJS({\n \"../../../node_modules/.pnpm/bn.js@4.12.2/node_modules/bn.js/lib/bn.js\"(exports3, module) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n (function(module2, exports4) {\n \"use strict\";\n function assert9(val, msg) {\n if (!val)\n throw new Error(msg || \"Assertion failed\");\n }\n function inherits(ctor, superCtor) {\n ctor.super_ = superCtor;\n var TempCtor = function() {\n };\n TempCtor.prototype = superCtor.prototype;\n ctor.prototype = new TempCtor();\n ctor.prototype.constructor = ctor;\n }\n function BN(number2, base4, endian) {\n if (BN.isBN(number2)) {\n return number2;\n }\n this.negative = 0;\n this.words = null;\n this.length = 0;\n this.red = null;\n if (number2 !== null) {\n if (base4 === \"le\" || base4 === \"be\") {\n endian = base4;\n base4 = 10;\n }\n this._init(number2 || 0, base4 || 10, endian || \"be\");\n }\n }\n if (typeof module2 === \"object\") {\n module2.exports = BN;\n } else {\n exports4.BN = BN;\n }\n BN.BN = BN;\n BN.wordSize = 26;\n var Buffer3;\n try {\n if (typeof window !== \"undefined\" && typeof window.Buffer !== \"undefined\") {\n Buffer3 = window.Buffer;\n } else {\n Buffer3 = (init_buffer(), __toCommonJS(buffer_exports)).Buffer;\n }\n } catch (e3) {\n }\n BN.isBN = function isBN(num2) {\n if (num2 instanceof BN) {\n return true;\n }\n return num2 !== null && typeof num2 === \"object\" && num2.constructor.wordSize === BN.wordSize && Array.isArray(num2.words);\n };\n BN.max = function max(left, right) {\n if (left.cmp(right) > 0)\n return left;\n return right;\n };\n BN.min = function min(left, right) {\n if (left.cmp(right) < 0)\n return left;\n return right;\n };\n BN.prototype._init = function init(number2, base4, endian) {\n if (typeof number2 === \"number\") {\n return this._initNumber(number2, base4, endian);\n }\n if (typeof number2 === \"object\") {\n return this._initArray(number2, base4, endian);\n }\n if (base4 === \"hex\") {\n base4 = 16;\n }\n assert9(base4 === (base4 | 0) && base4 >= 2 && base4 <= 36);\n number2 = number2.toString().replace(/\\s+/g, \"\");\n var start = 0;\n if (number2[0] === \"-\") {\n start++;\n this.negative = 1;\n }\n if (start < number2.length) {\n if (base4 === 16) {\n this._parseHex(number2, start, endian);\n } else {\n this._parseBase(number2, base4, start);\n if (endian === \"le\") {\n this._initArray(this.toArray(), base4, endian);\n }\n }\n }\n };\n BN.prototype._initNumber = function _initNumber(number2, base4, endian) {\n if (number2 < 0) {\n this.negative = 1;\n number2 = -number2;\n }\n if (number2 < 67108864) {\n this.words = [number2 & 67108863];\n this.length = 1;\n } else if (number2 < 4503599627370496) {\n this.words = [\n number2 & 67108863,\n number2 / 67108864 & 67108863\n ];\n this.length = 2;\n } else {\n assert9(number2 < 9007199254740992);\n this.words = [\n number2 & 67108863,\n number2 / 67108864 & 67108863,\n 1\n ];\n this.length = 3;\n }\n if (endian !== \"le\")\n return;\n this._initArray(this.toArray(), base4, endian);\n };\n BN.prototype._initArray = function _initArray(number2, base4, endian) {\n assert9(typeof number2.length === \"number\");\n if (number2.length <= 0) {\n this.words = [0];\n this.length = 1;\n return this;\n }\n this.length = Math.ceil(number2.length / 3);\n this.words = new Array(this.length);\n for (var i3 = 0; i3 < this.length; i3++) {\n this.words[i3] = 0;\n }\n var j2, w3;\n var off2 = 0;\n if (endian === \"be\") {\n for (i3 = number2.length - 1, j2 = 0; i3 >= 0; i3 -= 3) {\n w3 = number2[i3] | number2[i3 - 1] << 8 | number2[i3 - 2] << 16;\n this.words[j2] |= w3 << off2 & 67108863;\n this.words[j2 + 1] = w3 >>> 26 - off2 & 67108863;\n off2 += 24;\n if (off2 >= 26) {\n off2 -= 26;\n j2++;\n }\n }\n } else if (endian === \"le\") {\n for (i3 = 0, j2 = 0; i3 < number2.length; i3 += 3) {\n w3 = number2[i3] | number2[i3 + 1] << 8 | number2[i3 + 2] << 16;\n this.words[j2] |= w3 << off2 & 67108863;\n this.words[j2 + 1] = w3 >>> 26 - off2 & 67108863;\n off2 += 24;\n if (off2 >= 26) {\n off2 -= 26;\n j2++;\n }\n }\n }\n return this.strip();\n };\n function parseHex4Bits(string2, index2) {\n var c4 = string2.charCodeAt(index2);\n if (c4 >= 65 && c4 <= 70) {\n return c4 - 55;\n } else if (c4 >= 97 && c4 <= 102) {\n return c4 - 87;\n } else {\n return c4 - 48 & 15;\n }\n }\n function parseHexByte(string2, lowerBound, index2) {\n var r2 = parseHex4Bits(string2, index2);\n if (index2 - 1 >= lowerBound) {\n r2 |= parseHex4Bits(string2, index2 - 1) << 4;\n }\n return r2;\n }\n BN.prototype._parseHex = function _parseHex(number2, start, endian) {\n this.length = Math.ceil((number2.length - start) / 6);\n this.words = new Array(this.length);\n for (var i3 = 0; i3 < this.length; i3++) {\n this.words[i3] = 0;\n }\n var off2 = 0;\n var j2 = 0;\n var w3;\n if (endian === \"be\") {\n for (i3 = number2.length - 1; i3 >= start; i3 -= 2) {\n w3 = parseHexByte(number2, start, i3) << off2;\n this.words[j2] |= w3 & 67108863;\n if (off2 >= 18) {\n off2 -= 18;\n j2 += 1;\n this.words[j2] |= w3 >>> 26;\n } else {\n off2 += 8;\n }\n }\n } else {\n var parseLength = number2.length - start;\n for (i3 = parseLength % 2 === 0 ? start + 1 : start; i3 < number2.length; i3 += 2) {\n w3 = parseHexByte(number2, start, i3) << off2;\n this.words[j2] |= w3 & 67108863;\n if (off2 >= 18) {\n off2 -= 18;\n j2 += 1;\n this.words[j2] |= w3 >>> 26;\n } else {\n off2 += 8;\n }\n }\n }\n this.strip();\n };\n function parseBase(str, start, end, mul) {\n var r2 = 0;\n var len = Math.min(str.length, end);\n for (var i3 = start; i3 < len; i3++) {\n var c4 = str.charCodeAt(i3) - 48;\n r2 *= mul;\n if (c4 >= 49) {\n r2 += c4 - 49 + 10;\n } else if (c4 >= 17) {\n r2 += c4 - 17 + 10;\n } else {\n r2 += c4;\n }\n }\n return r2;\n }\n BN.prototype._parseBase = function _parseBase(number2, base4, start) {\n this.words = [0];\n this.length = 1;\n for (var limbLen = 0, limbPow = 1; limbPow <= 67108863; limbPow *= base4) {\n limbLen++;\n }\n limbLen--;\n limbPow = limbPow / base4 | 0;\n var total = number2.length - start;\n var mod3 = total % limbLen;\n var end = Math.min(total, total - mod3) + start;\n var word = 0;\n for (var i3 = start; i3 < end; i3 += limbLen) {\n word = parseBase(number2, i3, i3 + limbLen, base4);\n this.imuln(limbPow);\n if (this.words[0] + word < 67108864) {\n this.words[0] += word;\n } else {\n this._iaddn(word);\n }\n }\n if (mod3 !== 0) {\n var pow = 1;\n word = parseBase(number2, i3, number2.length, base4);\n for (i3 = 0; i3 < mod3; i3++) {\n pow *= base4;\n }\n this.imuln(pow);\n if (this.words[0] + word < 67108864) {\n this.words[0] += word;\n } else {\n this._iaddn(word);\n }\n }\n this.strip();\n };\n BN.prototype.copy = function copy(dest) {\n dest.words = new Array(this.length);\n for (var i3 = 0; i3 < this.length; i3++) {\n dest.words[i3] = this.words[i3];\n }\n dest.length = this.length;\n dest.negative = this.negative;\n dest.red = this.red;\n };\n BN.prototype.clone = function clone() {\n var r2 = new BN(null);\n this.copy(r2);\n return r2;\n };\n BN.prototype._expand = function _expand(size6) {\n while (this.length < size6) {\n this.words[this.length++] = 0;\n }\n return this;\n };\n BN.prototype.strip = function strip() {\n while (this.length > 1 && this.words[this.length - 1] === 0) {\n this.length--;\n }\n return this._normSign();\n };\n BN.prototype._normSign = function _normSign() {\n if (this.length === 1 && this.words[0] === 0) {\n this.negative = 0;\n }\n return this;\n };\n BN.prototype.inspect = function inspect() {\n return (this.red ? \"\";\n };\n var zeros = [\n \"\",\n \"0\",\n \"00\",\n \"000\",\n \"0000\",\n \"00000\",\n \"000000\",\n \"0000000\",\n \"00000000\",\n \"000000000\",\n \"0000000000\",\n \"00000000000\",\n \"000000000000\",\n \"0000000000000\",\n \"00000000000000\",\n \"000000000000000\",\n \"0000000000000000\",\n \"00000000000000000\",\n \"000000000000000000\",\n \"0000000000000000000\",\n \"00000000000000000000\",\n \"000000000000000000000\",\n \"0000000000000000000000\",\n \"00000000000000000000000\",\n \"000000000000000000000000\",\n \"0000000000000000000000000\"\n ];\n var groupSizes = [\n 0,\n 0,\n 25,\n 16,\n 12,\n 11,\n 10,\n 9,\n 8,\n 8,\n 7,\n 7,\n 7,\n 7,\n 6,\n 6,\n 6,\n 6,\n 6,\n 6,\n 6,\n 5,\n 5,\n 5,\n 5,\n 5,\n 5,\n 5,\n 5,\n 5,\n 5,\n 5,\n 5,\n 5,\n 5,\n 5,\n 5\n ];\n var groupBases = [\n 0,\n 0,\n 33554432,\n 43046721,\n 16777216,\n 48828125,\n 60466176,\n 40353607,\n 16777216,\n 43046721,\n 1e7,\n 19487171,\n 35831808,\n 62748517,\n 7529536,\n 11390625,\n 16777216,\n 24137569,\n 34012224,\n 47045881,\n 64e6,\n 4084101,\n 5153632,\n 6436343,\n 7962624,\n 9765625,\n 11881376,\n 14348907,\n 17210368,\n 20511149,\n 243e5,\n 28629151,\n 33554432,\n 39135393,\n 45435424,\n 52521875,\n 60466176\n ];\n BN.prototype.toString = function toString2(base4, padding) {\n base4 = base4 || 10;\n padding = padding | 0 || 1;\n var out;\n if (base4 === 16 || base4 === \"hex\") {\n out = \"\";\n var off2 = 0;\n var carry = 0;\n for (var i3 = 0; i3 < this.length; i3++) {\n var w3 = this.words[i3];\n var word = ((w3 << off2 | carry) & 16777215).toString(16);\n carry = w3 >>> 24 - off2 & 16777215;\n off2 += 2;\n if (off2 >= 26) {\n off2 -= 26;\n i3--;\n }\n if (carry !== 0 || i3 !== this.length - 1) {\n out = zeros[6 - word.length] + word + out;\n } else {\n out = word + out;\n }\n }\n if (carry !== 0) {\n out = carry.toString(16) + out;\n }\n while (out.length % padding !== 0) {\n out = \"0\" + out;\n }\n if (this.negative !== 0) {\n out = \"-\" + out;\n }\n return out;\n }\n if (base4 === (base4 | 0) && base4 >= 2 && base4 <= 36) {\n var groupSize = groupSizes[base4];\n var groupBase = groupBases[base4];\n out = \"\";\n var c4 = this.clone();\n c4.negative = 0;\n while (!c4.isZero()) {\n var r2 = c4.modn(groupBase).toString(base4);\n c4 = c4.idivn(groupBase);\n if (!c4.isZero()) {\n out = zeros[groupSize - r2.length] + r2 + out;\n } else {\n out = r2 + out;\n }\n }\n if (this.isZero()) {\n out = \"0\" + out;\n }\n while (out.length % padding !== 0) {\n out = \"0\" + out;\n }\n if (this.negative !== 0) {\n out = \"-\" + out;\n }\n return out;\n }\n assert9(false, \"Base should be between 2 and 36\");\n };\n BN.prototype.toNumber = function toNumber4() {\n var ret = this.words[0];\n if (this.length === 2) {\n ret += this.words[1] * 67108864;\n } else if (this.length === 3 && this.words[2] === 1) {\n ret += 4503599627370496 + this.words[1] * 67108864;\n } else if (this.length > 2) {\n assert9(false, \"Number can only safely store up to 53 bits\");\n }\n return this.negative !== 0 ? -ret : ret;\n };\n BN.prototype.toJSON = function toJSON() {\n return this.toString(16);\n };\n BN.prototype.toBuffer = function toBuffer(endian, length2) {\n assert9(typeof Buffer3 !== \"undefined\");\n return this.toArrayLike(Buffer3, endian, length2);\n };\n BN.prototype.toArray = function toArray(endian, length2) {\n return this.toArrayLike(Array, endian, length2);\n };\n BN.prototype.toArrayLike = function toArrayLike(ArrayType, endian, length2) {\n var byteLength = this.byteLength();\n var reqLength = length2 || Math.max(1, byteLength);\n assert9(byteLength <= reqLength, \"byte array longer than desired length\");\n assert9(reqLength > 0, \"Requested array length <= 0\");\n this.strip();\n var littleEndian = endian === \"le\";\n var res = new ArrayType(reqLength);\n var b4, i3;\n var q3 = this.clone();\n if (!littleEndian) {\n for (i3 = 0; i3 < reqLength - byteLength; i3++) {\n res[i3] = 0;\n }\n for (i3 = 0; !q3.isZero(); i3++) {\n b4 = q3.andln(255);\n q3.iushrn(8);\n res[reqLength - i3 - 1] = b4;\n }\n } else {\n for (i3 = 0; !q3.isZero(); i3++) {\n b4 = q3.andln(255);\n q3.iushrn(8);\n res[i3] = b4;\n }\n for (; i3 < reqLength; i3++) {\n res[i3] = 0;\n }\n }\n return res;\n };\n if (Math.clz32) {\n BN.prototype._countBits = function _countBits(w3) {\n return 32 - Math.clz32(w3);\n };\n } else {\n BN.prototype._countBits = function _countBits(w3) {\n var t3 = w3;\n var r2 = 0;\n if (t3 >= 4096) {\n r2 += 13;\n t3 >>>= 13;\n }\n if (t3 >= 64) {\n r2 += 7;\n t3 >>>= 7;\n }\n if (t3 >= 8) {\n r2 += 4;\n t3 >>>= 4;\n }\n if (t3 >= 2) {\n r2 += 2;\n t3 >>>= 2;\n }\n return r2 + t3;\n };\n }\n BN.prototype._zeroBits = function _zeroBits(w3) {\n if (w3 === 0)\n return 26;\n var t3 = w3;\n var r2 = 0;\n if ((t3 & 8191) === 0) {\n r2 += 13;\n t3 >>>= 13;\n }\n if ((t3 & 127) === 0) {\n r2 += 7;\n t3 >>>= 7;\n }\n if ((t3 & 15) === 0) {\n r2 += 4;\n t3 >>>= 4;\n }\n if ((t3 & 3) === 0) {\n r2 += 2;\n t3 >>>= 2;\n }\n if ((t3 & 1) === 0) {\n r2++;\n }\n return r2;\n };\n BN.prototype.bitLength = function bitLength() {\n var w3 = this.words[this.length - 1];\n var hi = this._countBits(w3);\n return (this.length - 1) * 26 + hi;\n };\n function toBitArray(num2) {\n var w3 = new Array(num2.bitLength());\n for (var bit = 0; bit < w3.length; bit++) {\n var off2 = bit / 26 | 0;\n var wbit = bit % 26;\n w3[bit] = (num2.words[off2] & 1 << wbit) >>> wbit;\n }\n return w3;\n }\n BN.prototype.zeroBits = function zeroBits() {\n if (this.isZero())\n return 0;\n var r2 = 0;\n for (var i3 = 0; i3 < this.length; i3++) {\n var b4 = this._zeroBits(this.words[i3]);\n r2 += b4;\n if (b4 !== 26)\n break;\n }\n return r2;\n };\n BN.prototype.byteLength = function byteLength() {\n return Math.ceil(this.bitLength() / 8);\n };\n BN.prototype.toTwos = function toTwos(width) {\n if (this.negative !== 0) {\n return this.abs().inotn(width).iaddn(1);\n }\n return this.clone();\n };\n BN.prototype.fromTwos = function fromTwos(width) {\n if (this.testn(width - 1)) {\n return this.notn(width).iaddn(1).ineg();\n }\n return this.clone();\n };\n BN.prototype.isNeg = function isNeg() {\n return this.negative !== 0;\n };\n BN.prototype.neg = function neg() {\n return this.clone().ineg();\n };\n BN.prototype.ineg = function ineg() {\n if (!this.isZero()) {\n this.negative ^= 1;\n }\n return this;\n };\n BN.prototype.iuor = function iuor(num2) {\n while (this.length < num2.length) {\n this.words[this.length++] = 0;\n }\n for (var i3 = 0; i3 < num2.length; i3++) {\n this.words[i3] = this.words[i3] | num2.words[i3];\n }\n return this.strip();\n };\n BN.prototype.ior = function ior(num2) {\n assert9((this.negative | num2.negative) === 0);\n return this.iuor(num2);\n };\n BN.prototype.or = function or(num2) {\n if (this.length > num2.length)\n return this.clone().ior(num2);\n return num2.clone().ior(this);\n };\n BN.prototype.uor = function uor(num2) {\n if (this.length > num2.length)\n return this.clone().iuor(num2);\n return num2.clone().iuor(this);\n };\n BN.prototype.iuand = function iuand(num2) {\n var b4;\n if (this.length > num2.length) {\n b4 = num2;\n } else {\n b4 = this;\n }\n for (var i3 = 0; i3 < b4.length; i3++) {\n this.words[i3] = this.words[i3] & num2.words[i3];\n }\n this.length = b4.length;\n return this.strip();\n };\n BN.prototype.iand = function iand(num2) {\n assert9((this.negative | num2.negative) === 0);\n return this.iuand(num2);\n };\n BN.prototype.and = function and(num2) {\n if (this.length > num2.length)\n return this.clone().iand(num2);\n return num2.clone().iand(this);\n };\n BN.prototype.uand = function uand(num2) {\n if (this.length > num2.length)\n return this.clone().iuand(num2);\n return num2.clone().iuand(this);\n };\n BN.prototype.iuxor = function iuxor(num2) {\n var a3;\n var b4;\n if (this.length > num2.length) {\n a3 = this;\n b4 = num2;\n } else {\n a3 = num2;\n b4 = this;\n }\n for (var i3 = 0; i3 < b4.length; i3++) {\n this.words[i3] = a3.words[i3] ^ b4.words[i3];\n }\n if (this !== a3) {\n for (; i3 < a3.length; i3++) {\n this.words[i3] = a3.words[i3];\n }\n }\n this.length = a3.length;\n return this.strip();\n };\n BN.prototype.ixor = function ixor(num2) {\n assert9((this.negative | num2.negative) === 0);\n return this.iuxor(num2);\n };\n BN.prototype.xor = function xor(num2) {\n if (this.length > num2.length)\n return this.clone().ixor(num2);\n return num2.clone().ixor(this);\n };\n BN.prototype.uxor = function uxor(num2) {\n if (this.length > num2.length)\n return this.clone().iuxor(num2);\n return num2.clone().iuxor(this);\n };\n BN.prototype.inotn = function inotn(width) {\n assert9(typeof width === \"number\" && width >= 0);\n var bytesNeeded = Math.ceil(width / 26) | 0;\n var bitsLeft = width % 26;\n this._expand(bytesNeeded);\n if (bitsLeft > 0) {\n bytesNeeded--;\n }\n for (var i3 = 0; i3 < bytesNeeded; i3++) {\n this.words[i3] = ~this.words[i3] & 67108863;\n }\n if (bitsLeft > 0) {\n this.words[i3] = ~this.words[i3] & 67108863 >> 26 - bitsLeft;\n }\n return this.strip();\n };\n BN.prototype.notn = function notn(width) {\n return this.clone().inotn(width);\n };\n BN.prototype.setn = function setn(bit, val) {\n assert9(typeof bit === \"number\" && bit >= 0);\n var off2 = bit / 26 | 0;\n var wbit = bit % 26;\n this._expand(off2 + 1);\n if (val) {\n this.words[off2] = this.words[off2] | 1 << wbit;\n } else {\n this.words[off2] = this.words[off2] & ~(1 << wbit);\n }\n return this.strip();\n };\n BN.prototype.iadd = function iadd(num2) {\n var r2;\n if (this.negative !== 0 && num2.negative === 0) {\n this.negative = 0;\n r2 = this.isub(num2);\n this.negative ^= 1;\n return this._normSign();\n } else if (this.negative === 0 && num2.negative !== 0) {\n num2.negative = 0;\n r2 = this.isub(num2);\n num2.negative = 1;\n return r2._normSign();\n }\n var a3, b4;\n if (this.length > num2.length) {\n a3 = this;\n b4 = num2;\n } else {\n a3 = num2;\n b4 = this;\n }\n var carry = 0;\n for (var i3 = 0; i3 < b4.length; i3++) {\n r2 = (a3.words[i3] | 0) + (b4.words[i3] | 0) + carry;\n this.words[i3] = r2 & 67108863;\n carry = r2 >>> 26;\n }\n for (; carry !== 0 && i3 < a3.length; i3++) {\n r2 = (a3.words[i3] | 0) + carry;\n this.words[i3] = r2 & 67108863;\n carry = r2 >>> 26;\n }\n this.length = a3.length;\n if (carry !== 0) {\n this.words[this.length] = carry;\n this.length++;\n } else if (a3 !== this) {\n for (; i3 < a3.length; i3++) {\n this.words[i3] = a3.words[i3];\n }\n }\n return this;\n };\n BN.prototype.add = function add2(num2) {\n var res;\n if (num2.negative !== 0 && this.negative === 0) {\n num2.negative = 0;\n res = this.sub(num2);\n num2.negative ^= 1;\n return res;\n } else if (num2.negative === 0 && this.negative !== 0) {\n this.negative = 0;\n res = num2.sub(this);\n this.negative = 1;\n return res;\n }\n if (this.length > num2.length)\n return this.clone().iadd(num2);\n return num2.clone().iadd(this);\n };\n BN.prototype.isub = function isub(num2) {\n if (num2.negative !== 0) {\n num2.negative = 0;\n var r2 = this.iadd(num2);\n num2.negative = 1;\n return r2._normSign();\n } else if (this.negative !== 0) {\n this.negative = 0;\n this.iadd(num2);\n this.negative = 1;\n return this._normSign();\n }\n var cmp = this.cmp(num2);\n if (cmp === 0) {\n this.negative = 0;\n this.length = 1;\n this.words[0] = 0;\n return this;\n }\n var a3, b4;\n if (cmp > 0) {\n a3 = this;\n b4 = num2;\n } else {\n a3 = num2;\n b4 = this;\n }\n var carry = 0;\n for (var i3 = 0; i3 < b4.length; i3++) {\n r2 = (a3.words[i3] | 0) - (b4.words[i3] | 0) + carry;\n carry = r2 >> 26;\n this.words[i3] = r2 & 67108863;\n }\n for (; carry !== 0 && i3 < a3.length; i3++) {\n r2 = (a3.words[i3] | 0) + carry;\n carry = r2 >> 26;\n this.words[i3] = r2 & 67108863;\n }\n if (carry === 0 && i3 < a3.length && a3 !== this) {\n for (; i3 < a3.length; i3++) {\n this.words[i3] = a3.words[i3];\n }\n }\n this.length = Math.max(this.length, i3);\n if (a3 !== this) {\n this.negative = 1;\n }\n return this.strip();\n };\n BN.prototype.sub = function sub(num2) {\n return this.clone().isub(num2);\n };\n function smallMulTo(self2, num2, out) {\n out.negative = num2.negative ^ self2.negative;\n var len = self2.length + num2.length | 0;\n out.length = len;\n len = len - 1 | 0;\n var a3 = self2.words[0] | 0;\n var b4 = num2.words[0] | 0;\n var r2 = a3 * b4;\n var lo = r2 & 67108863;\n var carry = r2 / 67108864 | 0;\n out.words[0] = lo;\n for (var k4 = 1; k4 < len; k4++) {\n var ncarry = carry >>> 26;\n var rword = carry & 67108863;\n var maxJ = Math.min(k4, num2.length - 1);\n for (var j2 = Math.max(0, k4 - self2.length + 1); j2 <= maxJ; j2++) {\n var i3 = k4 - j2 | 0;\n a3 = self2.words[i3] | 0;\n b4 = num2.words[j2] | 0;\n r2 = a3 * b4 + rword;\n ncarry += r2 / 67108864 | 0;\n rword = r2 & 67108863;\n }\n out.words[k4] = rword | 0;\n carry = ncarry | 0;\n }\n if (carry !== 0) {\n out.words[k4] = carry | 0;\n } else {\n out.length--;\n }\n return out.strip();\n }\n var comb10MulTo = function comb10MulTo2(self2, num2, out) {\n var a3 = self2.words;\n var b4 = num2.words;\n var o5 = out.words;\n var c4 = 0;\n var lo;\n var mid;\n var hi;\n var a0 = a3[0] | 0;\n var al0 = a0 & 8191;\n var ah0 = a0 >>> 13;\n var a1 = a3[1] | 0;\n var al1 = a1 & 8191;\n var ah1 = a1 >>> 13;\n var a22 = a3[2] | 0;\n var al2 = a22 & 8191;\n var ah2 = a22 >>> 13;\n var a32 = a3[3] | 0;\n var al3 = a32 & 8191;\n var ah3 = a32 >>> 13;\n var a4 = a3[4] | 0;\n var al4 = a4 & 8191;\n var ah4 = a4 >>> 13;\n var a5 = a3[5] | 0;\n var al5 = a5 & 8191;\n var ah5 = a5 >>> 13;\n var a6 = a3[6] | 0;\n var al6 = a6 & 8191;\n var ah6 = a6 >>> 13;\n var a7 = a3[7] | 0;\n var al7 = a7 & 8191;\n var ah7 = a7 >>> 13;\n var a8 = a3[8] | 0;\n var al8 = a8 & 8191;\n var ah8 = a8 >>> 13;\n var a9 = a3[9] | 0;\n var al9 = a9 & 8191;\n var ah9 = a9 >>> 13;\n var b0 = b4[0] | 0;\n var bl0 = b0 & 8191;\n var bh0 = b0 >>> 13;\n var b1 = b4[1] | 0;\n var bl1 = b1 & 8191;\n var bh1 = b1 >>> 13;\n var b22 = b4[2] | 0;\n var bl2 = b22 & 8191;\n var bh2 = b22 >>> 13;\n var b32 = b4[3] | 0;\n var bl3 = b32 & 8191;\n var bh3 = b32 >>> 13;\n var b42 = b4[4] | 0;\n var bl4 = b42 & 8191;\n var bh4 = b42 >>> 13;\n var b5 = b4[5] | 0;\n var bl5 = b5 & 8191;\n var bh5 = b5 >>> 13;\n var b6 = b4[6] | 0;\n var bl6 = b6 & 8191;\n var bh6 = b6 >>> 13;\n var b7 = b4[7] | 0;\n var bl7 = b7 & 8191;\n var bh7 = b7 >>> 13;\n var b8 = b4[8] | 0;\n var bl8 = b8 & 8191;\n var bh8 = b8 >>> 13;\n var b9 = b4[9] | 0;\n var bl9 = b9 & 8191;\n var bh9 = b9 >>> 13;\n out.negative = self2.negative ^ num2.negative;\n out.length = 19;\n lo = Math.imul(al0, bl0);\n mid = Math.imul(al0, bh0);\n mid = mid + Math.imul(ah0, bl0) | 0;\n hi = Math.imul(ah0, bh0);\n var w0 = (c4 + lo | 0) + ((mid & 8191) << 13) | 0;\n c4 = (hi + (mid >>> 13) | 0) + (w0 >>> 26) | 0;\n w0 &= 67108863;\n lo = Math.imul(al1, bl0);\n mid = Math.imul(al1, bh0);\n mid = mid + Math.imul(ah1, bl0) | 0;\n hi = Math.imul(ah1, bh0);\n lo = lo + Math.imul(al0, bl1) | 0;\n mid = mid + Math.imul(al0, bh1) | 0;\n mid = mid + Math.imul(ah0, bl1) | 0;\n hi = hi + Math.imul(ah0, bh1) | 0;\n var w1 = (c4 + lo | 0) + ((mid & 8191) << 13) | 0;\n c4 = (hi + (mid >>> 13) | 0) + (w1 >>> 26) | 0;\n w1 &= 67108863;\n lo = Math.imul(al2, bl0);\n mid = Math.imul(al2, bh0);\n mid = mid + Math.imul(ah2, bl0) | 0;\n hi = Math.imul(ah2, bh0);\n lo = lo + Math.imul(al1, bl1) | 0;\n mid = mid + Math.imul(al1, bh1) | 0;\n mid = mid + Math.imul(ah1, bl1) | 0;\n hi = hi + Math.imul(ah1, bh1) | 0;\n lo = lo + Math.imul(al0, bl2) | 0;\n mid = mid + Math.imul(al0, bh2) | 0;\n mid = mid + Math.imul(ah0, bl2) | 0;\n hi = hi + Math.imul(ah0, bh2) | 0;\n var w22 = (c4 + lo | 0) + ((mid & 8191) << 13) | 0;\n c4 = (hi + (mid >>> 13) | 0) + (w22 >>> 26) | 0;\n w22 &= 67108863;\n lo = Math.imul(al3, bl0);\n mid = Math.imul(al3, bh0);\n mid = mid + Math.imul(ah3, bl0) | 0;\n hi = Math.imul(ah3, bh0);\n lo = lo + Math.imul(al2, bl1) | 0;\n mid = mid + Math.imul(al2, bh1) | 0;\n mid = mid + Math.imul(ah2, bl1) | 0;\n hi = hi + Math.imul(ah2, bh1) | 0;\n lo = lo + Math.imul(al1, bl2) | 0;\n mid = mid + Math.imul(al1, bh2) | 0;\n mid = mid + Math.imul(ah1, bl2) | 0;\n hi = hi + Math.imul(ah1, bh2) | 0;\n lo = lo + Math.imul(al0, bl3) | 0;\n mid = mid + Math.imul(al0, bh3) | 0;\n mid = mid + Math.imul(ah0, bl3) | 0;\n hi = hi + Math.imul(ah0, bh3) | 0;\n var w3 = (c4 + lo | 0) + ((mid & 8191) << 13) | 0;\n c4 = (hi + (mid >>> 13) | 0) + (w3 >>> 26) | 0;\n w3 &= 67108863;\n lo = Math.imul(al4, bl0);\n mid = Math.imul(al4, bh0);\n mid = mid + Math.imul(ah4, bl0) | 0;\n hi = Math.imul(ah4, bh0);\n lo = lo + Math.imul(al3, bl1) | 0;\n mid = mid + Math.imul(al3, bh1) | 0;\n mid = mid + Math.imul(ah3, bl1) | 0;\n hi = hi + Math.imul(ah3, bh1) | 0;\n lo = lo + Math.imul(al2, bl2) | 0;\n mid = mid + Math.imul(al2, bh2) | 0;\n mid = mid + Math.imul(ah2, bl2) | 0;\n hi = hi + Math.imul(ah2, bh2) | 0;\n lo = lo + Math.imul(al1, bl3) | 0;\n mid = mid + Math.imul(al1, bh3) | 0;\n mid = mid + Math.imul(ah1, bl3) | 0;\n hi = hi + Math.imul(ah1, bh3) | 0;\n lo = lo + Math.imul(al0, bl4) | 0;\n mid = mid + Math.imul(al0, bh4) | 0;\n mid = mid + Math.imul(ah0, bl4) | 0;\n hi = hi + Math.imul(ah0, bh4) | 0;\n var w4 = (c4 + lo | 0) + ((mid & 8191) << 13) | 0;\n c4 = (hi + (mid >>> 13) | 0) + (w4 >>> 26) | 0;\n w4 &= 67108863;\n lo = Math.imul(al5, bl0);\n mid = Math.imul(al5, bh0);\n mid = mid + Math.imul(ah5, bl0) | 0;\n hi = Math.imul(ah5, bh0);\n lo = lo + Math.imul(al4, bl1) | 0;\n mid = mid + Math.imul(al4, bh1) | 0;\n mid = mid + Math.imul(ah4, bl1) | 0;\n hi = hi + Math.imul(ah4, bh1) | 0;\n lo = lo + Math.imul(al3, bl2) | 0;\n mid = mid + Math.imul(al3, bh2) | 0;\n mid = mid + Math.imul(ah3, bl2) | 0;\n hi = hi + Math.imul(ah3, bh2) | 0;\n lo = lo + Math.imul(al2, bl3) | 0;\n mid = mid + Math.imul(al2, bh3) | 0;\n mid = mid + Math.imul(ah2, bl3) | 0;\n hi = hi + Math.imul(ah2, bh3) | 0;\n lo = lo + Math.imul(al1, bl4) | 0;\n mid = mid + Math.imul(al1, bh4) | 0;\n mid = mid + Math.imul(ah1, bl4) | 0;\n hi = hi + Math.imul(ah1, bh4) | 0;\n lo = lo + Math.imul(al0, bl5) | 0;\n mid = mid + Math.imul(al0, bh5) | 0;\n mid = mid + Math.imul(ah0, bl5) | 0;\n hi = hi + Math.imul(ah0, bh5) | 0;\n var w5 = (c4 + lo | 0) + ((mid & 8191) << 13) | 0;\n c4 = (hi + (mid >>> 13) | 0) + (w5 >>> 26) | 0;\n w5 &= 67108863;\n lo = Math.imul(al6, bl0);\n mid = Math.imul(al6, bh0);\n mid = mid + Math.imul(ah6, bl0) | 0;\n hi = Math.imul(ah6, bh0);\n lo = lo + Math.imul(al5, bl1) | 0;\n mid = mid + Math.imul(al5, bh1) | 0;\n mid = mid + Math.imul(ah5, bl1) | 0;\n hi = hi + Math.imul(ah5, bh1) | 0;\n lo = lo + Math.imul(al4, bl2) | 0;\n mid = mid + Math.imul(al4, bh2) | 0;\n mid = mid + Math.imul(ah4, bl2) | 0;\n hi = hi + Math.imul(ah4, bh2) | 0;\n lo = lo + Math.imul(al3, bl3) | 0;\n mid = mid + Math.imul(al3, bh3) | 0;\n mid = mid + Math.imul(ah3, bl3) | 0;\n hi = hi + Math.imul(ah3, bh3) | 0;\n lo = lo + Math.imul(al2, bl4) | 0;\n mid = mid + Math.imul(al2, bh4) | 0;\n mid = mid + Math.imul(ah2, bl4) | 0;\n hi = hi + Math.imul(ah2, bh4) | 0;\n lo = lo + Math.imul(al1, bl5) | 0;\n mid = mid + Math.imul(al1, bh5) | 0;\n mid = mid + Math.imul(ah1, bl5) | 0;\n hi = hi + Math.imul(ah1, bh5) | 0;\n lo = lo + Math.imul(al0, bl6) | 0;\n mid = mid + Math.imul(al0, bh6) | 0;\n mid = mid + Math.imul(ah0, bl6) | 0;\n hi = hi + Math.imul(ah0, bh6) | 0;\n var w6 = (c4 + lo | 0) + ((mid & 8191) << 13) | 0;\n c4 = (hi + (mid >>> 13) | 0) + (w6 >>> 26) | 0;\n w6 &= 67108863;\n lo = Math.imul(al7, bl0);\n mid = Math.imul(al7, bh0);\n mid = mid + Math.imul(ah7, bl0) | 0;\n hi = Math.imul(ah7, bh0);\n lo = lo + Math.imul(al6, bl1) | 0;\n mid = mid + Math.imul(al6, bh1) | 0;\n mid = mid + Math.imul(ah6, bl1) | 0;\n hi = hi + Math.imul(ah6, bh1) | 0;\n lo = lo + Math.imul(al5, bl2) | 0;\n mid = mid + Math.imul(al5, bh2) | 0;\n mid = mid + Math.imul(ah5, bl2) | 0;\n hi = hi + Math.imul(ah5, bh2) | 0;\n lo = lo + Math.imul(al4, bl3) | 0;\n mid = mid + Math.imul(al4, bh3) | 0;\n mid = mid + Math.imul(ah4, bl3) | 0;\n hi = hi + Math.imul(ah4, bh3) | 0;\n lo = lo + Math.imul(al3, bl4) | 0;\n mid = mid + Math.imul(al3, bh4) | 0;\n mid = mid + Math.imul(ah3, bl4) | 0;\n hi = hi + Math.imul(ah3, bh4) | 0;\n lo = lo + Math.imul(al2, bl5) | 0;\n mid = mid + Math.imul(al2, bh5) | 0;\n mid = mid + Math.imul(ah2, bl5) | 0;\n hi = hi + Math.imul(ah2, bh5) | 0;\n lo = lo + Math.imul(al1, bl6) | 0;\n mid = mid + Math.imul(al1, bh6) | 0;\n mid = mid + Math.imul(ah1, bl6) | 0;\n hi = hi + Math.imul(ah1, bh6) | 0;\n lo = lo + Math.imul(al0, bl7) | 0;\n mid = mid + Math.imul(al0, bh7) | 0;\n mid = mid + Math.imul(ah0, bl7) | 0;\n hi = hi + Math.imul(ah0, bh7) | 0;\n var w7 = (c4 + lo | 0) + ((mid & 8191) << 13) | 0;\n c4 = (hi + (mid >>> 13) | 0) + (w7 >>> 26) | 0;\n w7 &= 67108863;\n lo = Math.imul(al8, bl0);\n mid = Math.imul(al8, bh0);\n mid = mid + Math.imul(ah8, bl0) | 0;\n hi = Math.imul(ah8, bh0);\n lo = lo + Math.imul(al7, bl1) | 0;\n mid = mid + Math.imul(al7, bh1) | 0;\n mid = mid + Math.imul(ah7, bl1) | 0;\n hi = hi + Math.imul(ah7, bh1) | 0;\n lo = lo + Math.imul(al6, bl2) | 0;\n mid = mid + Math.imul(al6, bh2) | 0;\n mid = mid + Math.imul(ah6, bl2) | 0;\n hi = hi + Math.imul(ah6, bh2) | 0;\n lo = lo + Math.imul(al5, bl3) | 0;\n mid = mid + Math.imul(al5, bh3) | 0;\n mid = mid + Math.imul(ah5, bl3) | 0;\n hi = hi + Math.imul(ah5, bh3) | 0;\n lo = lo + Math.imul(al4, bl4) | 0;\n mid = mid + Math.imul(al4, bh4) | 0;\n mid = mid + Math.imul(ah4, bl4) | 0;\n hi = hi + Math.imul(ah4, bh4) | 0;\n lo = lo + Math.imul(al3, bl5) | 0;\n mid = mid + Math.imul(al3, bh5) | 0;\n mid = mid + Math.imul(ah3, bl5) | 0;\n hi = hi + Math.imul(ah3, bh5) | 0;\n lo = lo + Math.imul(al2, bl6) | 0;\n mid = mid + Math.imul(al2, bh6) | 0;\n mid = mid + Math.imul(ah2, bl6) | 0;\n hi = hi + Math.imul(ah2, bh6) | 0;\n lo = lo + Math.imul(al1, bl7) | 0;\n mid = mid + Math.imul(al1, bh7) | 0;\n mid = mid + Math.imul(ah1, bl7) | 0;\n hi = hi + Math.imul(ah1, bh7) | 0;\n lo = lo + Math.imul(al0, bl8) | 0;\n mid = mid + Math.imul(al0, bh8) | 0;\n mid = mid + Math.imul(ah0, bl8) | 0;\n hi = hi + Math.imul(ah0, bh8) | 0;\n var w8 = (c4 + lo | 0) + ((mid & 8191) << 13) | 0;\n c4 = (hi + (mid >>> 13) | 0) + (w8 >>> 26) | 0;\n w8 &= 67108863;\n lo = Math.imul(al9, bl0);\n mid = Math.imul(al9, bh0);\n mid = mid + Math.imul(ah9, bl0) | 0;\n hi = Math.imul(ah9, bh0);\n lo = lo + Math.imul(al8, bl1) | 0;\n mid = mid + Math.imul(al8, bh1) | 0;\n mid = mid + Math.imul(ah8, bl1) | 0;\n hi = hi + Math.imul(ah8, bh1) | 0;\n lo = lo + Math.imul(al7, bl2) | 0;\n mid = mid + Math.imul(al7, bh2) | 0;\n mid = mid + Math.imul(ah7, bl2) | 0;\n hi = hi + Math.imul(ah7, bh2) | 0;\n lo = lo + Math.imul(al6, bl3) | 0;\n mid = mid + Math.imul(al6, bh3) | 0;\n mid = mid + Math.imul(ah6, bl3) | 0;\n hi = hi + Math.imul(ah6, bh3) | 0;\n lo = lo + Math.imul(al5, bl4) | 0;\n mid = mid + Math.imul(al5, bh4) | 0;\n mid = mid + Math.imul(ah5, bl4) | 0;\n hi = hi + Math.imul(ah5, bh4) | 0;\n lo = lo + Math.imul(al4, bl5) | 0;\n mid = mid + Math.imul(al4, bh5) | 0;\n mid = mid + Math.imul(ah4, bl5) | 0;\n hi = hi + Math.imul(ah4, bh5) | 0;\n lo = lo + Math.imul(al3, bl6) | 0;\n mid = mid + Math.imul(al3, bh6) | 0;\n mid = mid + Math.imul(ah3, bl6) | 0;\n hi = hi + Math.imul(ah3, bh6) | 0;\n lo = lo + Math.imul(al2, bl7) | 0;\n mid = mid + Math.imul(al2, bh7) | 0;\n mid = mid + Math.imul(ah2, bl7) | 0;\n hi = hi + Math.imul(ah2, bh7) | 0;\n lo = lo + Math.imul(al1, bl8) | 0;\n mid = mid + Math.imul(al1, bh8) | 0;\n mid = mid + Math.imul(ah1, bl8) | 0;\n hi = hi + Math.imul(ah1, bh8) | 0;\n lo = lo + Math.imul(al0, bl9) | 0;\n mid = mid + Math.imul(al0, bh9) | 0;\n mid = mid + Math.imul(ah0, bl9) | 0;\n hi = hi + Math.imul(ah0, bh9) | 0;\n var w9 = (c4 + lo | 0) + ((mid & 8191) << 13) | 0;\n c4 = (hi + (mid >>> 13) | 0) + (w9 >>> 26) | 0;\n w9 &= 67108863;\n lo = Math.imul(al9, bl1);\n mid = Math.imul(al9, bh1);\n mid = mid + Math.imul(ah9, bl1) | 0;\n hi = Math.imul(ah9, bh1);\n lo = lo + Math.imul(al8, bl2) | 0;\n mid = mid + Math.imul(al8, bh2) | 0;\n mid = mid + Math.imul(ah8, bl2) | 0;\n hi = hi + Math.imul(ah8, bh2) | 0;\n lo = lo + Math.imul(al7, bl3) | 0;\n mid = mid + Math.imul(al7, bh3) | 0;\n mid = mid + Math.imul(ah7, bl3) | 0;\n hi = hi + Math.imul(ah7, bh3) | 0;\n lo = lo + Math.imul(al6, bl4) | 0;\n mid = mid + Math.imul(al6, bh4) | 0;\n mid = mid + Math.imul(ah6, bl4) | 0;\n hi = hi + Math.imul(ah6, bh4) | 0;\n lo = lo + Math.imul(al5, bl5) | 0;\n mid = mid + Math.imul(al5, bh5) | 0;\n mid = mid + Math.imul(ah5, bl5) | 0;\n hi = hi + Math.imul(ah5, bh5) | 0;\n lo = lo + Math.imul(al4, bl6) | 0;\n mid = mid + Math.imul(al4, bh6) | 0;\n mid = mid + Math.imul(ah4, bl6) | 0;\n hi = hi + Math.imul(ah4, bh6) | 0;\n lo = lo + Math.imul(al3, bl7) | 0;\n mid = mid + Math.imul(al3, bh7) | 0;\n mid = mid + Math.imul(ah3, bl7) | 0;\n hi = hi + Math.imul(ah3, bh7) | 0;\n lo = lo + Math.imul(al2, bl8) | 0;\n mid = mid + Math.imul(al2, bh8) | 0;\n mid = mid + Math.imul(ah2, bl8) | 0;\n hi = hi + Math.imul(ah2, bh8) | 0;\n lo = lo + Math.imul(al1, bl9) | 0;\n mid = mid + Math.imul(al1, bh9) | 0;\n mid = mid + Math.imul(ah1, bl9) | 0;\n hi = hi + Math.imul(ah1, bh9) | 0;\n var w10 = (c4 + lo | 0) + ((mid & 8191) << 13) | 0;\n c4 = (hi + (mid >>> 13) | 0) + (w10 >>> 26) | 0;\n w10 &= 67108863;\n lo = Math.imul(al9, bl2);\n mid = Math.imul(al9, bh2);\n mid = mid + Math.imul(ah9, bl2) | 0;\n hi = Math.imul(ah9, bh2);\n lo = lo + Math.imul(al8, bl3) | 0;\n mid = mid + Math.imul(al8, bh3) | 0;\n mid = mid + Math.imul(ah8, bl3) | 0;\n hi = hi + Math.imul(ah8, bh3) | 0;\n lo = lo + Math.imul(al7, bl4) | 0;\n mid = mid + Math.imul(al7, bh4) | 0;\n mid = mid + Math.imul(ah7, bl4) | 0;\n hi = hi + Math.imul(ah7, bh4) | 0;\n lo = lo + Math.imul(al6, bl5) | 0;\n mid = mid + Math.imul(al6, bh5) | 0;\n mid = mid + Math.imul(ah6, bl5) | 0;\n hi = hi + Math.imul(ah6, bh5) | 0;\n lo = lo + Math.imul(al5, bl6) | 0;\n mid = mid + Math.imul(al5, bh6) | 0;\n mid = mid + Math.imul(ah5, bl6) | 0;\n hi = hi + Math.imul(ah5, bh6) | 0;\n lo = lo + Math.imul(al4, bl7) | 0;\n mid = mid + Math.imul(al4, bh7) | 0;\n mid = mid + Math.imul(ah4, bl7) | 0;\n hi = hi + Math.imul(ah4, bh7) | 0;\n lo = lo + Math.imul(al3, bl8) | 0;\n mid = mid + Math.imul(al3, bh8) | 0;\n mid = mid + Math.imul(ah3, bl8) | 0;\n hi = hi + Math.imul(ah3, bh8) | 0;\n lo = lo + Math.imul(al2, bl9) | 0;\n mid = mid + Math.imul(al2, bh9) | 0;\n mid = mid + Math.imul(ah2, bl9) | 0;\n hi = hi + Math.imul(ah2, bh9) | 0;\n var w11 = (c4 + lo | 0) + ((mid & 8191) << 13) | 0;\n c4 = (hi + (mid >>> 13) | 0) + (w11 >>> 26) | 0;\n w11 &= 67108863;\n lo = Math.imul(al9, bl3);\n mid = Math.imul(al9, bh3);\n mid = mid + Math.imul(ah9, bl3) | 0;\n hi = Math.imul(ah9, bh3);\n lo = lo + Math.imul(al8, bl4) | 0;\n mid = mid + Math.imul(al8, bh4) | 0;\n mid = mid + Math.imul(ah8, bl4) | 0;\n hi = hi + Math.imul(ah8, bh4) | 0;\n lo = lo + Math.imul(al7, bl5) | 0;\n mid = mid + Math.imul(al7, bh5) | 0;\n mid = mid + Math.imul(ah7, bl5) | 0;\n hi = hi + Math.imul(ah7, bh5) | 0;\n lo = lo + Math.imul(al6, bl6) | 0;\n mid = mid + Math.imul(al6, bh6) | 0;\n mid = mid + Math.imul(ah6, bl6) | 0;\n hi = hi + Math.imul(ah6, bh6) | 0;\n lo = lo + Math.imul(al5, bl7) | 0;\n mid = mid + Math.imul(al5, bh7) | 0;\n mid = mid + Math.imul(ah5, bl7) | 0;\n hi = hi + Math.imul(ah5, bh7) | 0;\n lo = lo + Math.imul(al4, bl8) | 0;\n mid = mid + Math.imul(al4, bh8) | 0;\n mid = mid + Math.imul(ah4, bl8) | 0;\n hi = hi + Math.imul(ah4, bh8) | 0;\n lo = lo + Math.imul(al3, bl9) | 0;\n mid = mid + Math.imul(al3, bh9) | 0;\n mid = mid + Math.imul(ah3, bl9) | 0;\n hi = hi + Math.imul(ah3, bh9) | 0;\n var w12 = (c4 + lo | 0) + ((mid & 8191) << 13) | 0;\n c4 = (hi + (mid >>> 13) | 0) + (w12 >>> 26) | 0;\n w12 &= 67108863;\n lo = Math.imul(al9, bl4);\n mid = Math.imul(al9, bh4);\n mid = mid + Math.imul(ah9, bl4) | 0;\n hi = Math.imul(ah9, bh4);\n lo = lo + Math.imul(al8, bl5) | 0;\n mid = mid + Math.imul(al8, bh5) | 0;\n mid = mid + Math.imul(ah8, bl5) | 0;\n hi = hi + Math.imul(ah8, bh5) | 0;\n lo = lo + Math.imul(al7, bl6) | 0;\n mid = mid + Math.imul(al7, bh6) | 0;\n mid = mid + Math.imul(ah7, bl6) | 0;\n hi = hi + Math.imul(ah7, bh6) | 0;\n lo = lo + Math.imul(al6, bl7) | 0;\n mid = mid + Math.imul(al6, bh7) | 0;\n mid = mid + Math.imul(ah6, bl7) | 0;\n hi = hi + Math.imul(ah6, bh7) | 0;\n lo = lo + Math.imul(al5, bl8) | 0;\n mid = mid + Math.imul(al5, bh8) | 0;\n mid = mid + Math.imul(ah5, bl8) | 0;\n hi = hi + Math.imul(ah5, bh8) | 0;\n lo = lo + Math.imul(al4, bl9) | 0;\n mid = mid + Math.imul(al4, bh9) | 0;\n mid = mid + Math.imul(ah4, bl9) | 0;\n hi = hi + Math.imul(ah4, bh9) | 0;\n var w13 = (c4 + lo | 0) + ((mid & 8191) << 13) | 0;\n c4 = (hi + (mid >>> 13) | 0) + (w13 >>> 26) | 0;\n w13 &= 67108863;\n lo = Math.imul(al9, bl5);\n mid = Math.imul(al9, bh5);\n mid = mid + Math.imul(ah9, bl5) | 0;\n hi = Math.imul(ah9, bh5);\n lo = lo + Math.imul(al8, bl6) | 0;\n mid = mid + Math.imul(al8, bh6) | 0;\n mid = mid + Math.imul(ah8, bl6) | 0;\n hi = hi + Math.imul(ah8, bh6) | 0;\n lo = lo + Math.imul(al7, bl7) | 0;\n mid = mid + Math.imul(al7, bh7) | 0;\n mid = mid + Math.imul(ah7, bl7) | 0;\n hi = hi + Math.imul(ah7, bh7) | 0;\n lo = lo + Math.imul(al6, bl8) | 0;\n mid = mid + Math.imul(al6, bh8) | 0;\n mid = mid + Math.imul(ah6, bl8) | 0;\n hi = hi + Math.imul(ah6, bh8) | 0;\n lo = lo + Math.imul(al5, bl9) | 0;\n mid = mid + Math.imul(al5, bh9) | 0;\n mid = mid + Math.imul(ah5, bl9) | 0;\n hi = hi + Math.imul(ah5, bh9) | 0;\n var w14 = (c4 + lo | 0) + ((mid & 8191) << 13) | 0;\n c4 = (hi + (mid >>> 13) | 0) + (w14 >>> 26) | 0;\n w14 &= 67108863;\n lo = Math.imul(al9, bl6);\n mid = Math.imul(al9, bh6);\n mid = mid + Math.imul(ah9, bl6) | 0;\n hi = Math.imul(ah9, bh6);\n lo = lo + Math.imul(al8, bl7) | 0;\n mid = mid + Math.imul(al8, bh7) | 0;\n mid = mid + Math.imul(ah8, bl7) | 0;\n hi = hi + Math.imul(ah8, bh7) | 0;\n lo = lo + Math.imul(al7, bl8) | 0;\n mid = mid + Math.imul(al7, bh8) | 0;\n mid = mid + Math.imul(ah7, bl8) | 0;\n hi = hi + Math.imul(ah7, bh8) | 0;\n lo = lo + Math.imul(al6, bl9) | 0;\n mid = mid + Math.imul(al6, bh9) | 0;\n mid = mid + Math.imul(ah6, bl9) | 0;\n hi = hi + Math.imul(ah6, bh9) | 0;\n var w15 = (c4 + lo | 0) + ((mid & 8191) << 13) | 0;\n c4 = (hi + (mid >>> 13) | 0) + (w15 >>> 26) | 0;\n w15 &= 67108863;\n lo = Math.imul(al9, bl7);\n mid = Math.imul(al9, bh7);\n mid = mid + Math.imul(ah9, bl7) | 0;\n hi = Math.imul(ah9, bh7);\n lo = lo + Math.imul(al8, bl8) | 0;\n mid = mid + Math.imul(al8, bh8) | 0;\n mid = mid + Math.imul(ah8, bl8) | 0;\n hi = hi + Math.imul(ah8, bh8) | 0;\n lo = lo + Math.imul(al7, bl9) | 0;\n mid = mid + Math.imul(al7, bh9) | 0;\n mid = mid + Math.imul(ah7, bl9) | 0;\n hi = hi + Math.imul(ah7, bh9) | 0;\n var w16 = (c4 + lo | 0) + ((mid & 8191) << 13) | 0;\n c4 = (hi + (mid >>> 13) | 0) + (w16 >>> 26) | 0;\n w16 &= 67108863;\n lo = Math.imul(al9, bl8);\n mid = Math.imul(al9, bh8);\n mid = mid + Math.imul(ah9, bl8) | 0;\n hi = Math.imul(ah9, bh8);\n lo = lo + Math.imul(al8, bl9) | 0;\n mid = mid + Math.imul(al8, bh9) | 0;\n mid = mid + Math.imul(ah8, bl9) | 0;\n hi = hi + Math.imul(ah8, bh9) | 0;\n var w17 = (c4 + lo | 0) + ((mid & 8191) << 13) | 0;\n c4 = (hi + (mid >>> 13) | 0) + (w17 >>> 26) | 0;\n w17 &= 67108863;\n lo = Math.imul(al9, bl9);\n mid = Math.imul(al9, bh9);\n mid = mid + Math.imul(ah9, bl9) | 0;\n hi = Math.imul(ah9, bh9);\n var w18 = (c4 + lo | 0) + ((mid & 8191) << 13) | 0;\n c4 = (hi + (mid >>> 13) | 0) + (w18 >>> 26) | 0;\n w18 &= 67108863;\n o5[0] = w0;\n o5[1] = w1;\n o5[2] = w22;\n o5[3] = w3;\n o5[4] = w4;\n o5[5] = w5;\n o5[6] = w6;\n o5[7] = w7;\n o5[8] = w8;\n o5[9] = w9;\n o5[10] = w10;\n o5[11] = w11;\n o5[12] = w12;\n o5[13] = w13;\n o5[14] = w14;\n o5[15] = w15;\n o5[16] = w16;\n o5[17] = w17;\n o5[18] = w18;\n if (c4 !== 0) {\n o5[19] = c4;\n out.length++;\n }\n return out;\n };\n if (!Math.imul) {\n comb10MulTo = smallMulTo;\n }\n function bigMulTo(self2, num2, out) {\n out.negative = num2.negative ^ self2.negative;\n out.length = self2.length + num2.length;\n var carry = 0;\n var hncarry = 0;\n for (var k4 = 0; k4 < out.length - 1; k4++) {\n var ncarry = hncarry;\n hncarry = 0;\n var rword = carry & 67108863;\n var maxJ = Math.min(k4, num2.length - 1);\n for (var j2 = Math.max(0, k4 - self2.length + 1); j2 <= maxJ; j2++) {\n var i3 = k4 - j2;\n var a3 = self2.words[i3] | 0;\n var b4 = num2.words[j2] | 0;\n var r2 = a3 * b4;\n var lo = r2 & 67108863;\n ncarry = ncarry + (r2 / 67108864 | 0) | 0;\n lo = lo + rword | 0;\n rword = lo & 67108863;\n ncarry = ncarry + (lo >>> 26) | 0;\n hncarry += ncarry >>> 26;\n ncarry &= 67108863;\n }\n out.words[k4] = rword;\n carry = ncarry;\n ncarry = hncarry;\n }\n if (carry !== 0) {\n out.words[k4] = carry;\n } else {\n out.length--;\n }\n return out.strip();\n }\n function jumboMulTo(self2, num2, out) {\n var fftm = new FFTM();\n return fftm.mulp(self2, num2, out);\n }\n BN.prototype.mulTo = function mulTo(num2, out) {\n var res;\n var len = this.length + num2.length;\n if (this.length === 10 && num2.length === 10) {\n res = comb10MulTo(this, num2, out);\n } else if (len < 63) {\n res = smallMulTo(this, num2, out);\n } else if (len < 1024) {\n res = bigMulTo(this, num2, out);\n } else {\n res = jumboMulTo(this, num2, out);\n }\n return res;\n };\n function FFTM(x4, y6) {\n this.x = x4;\n this.y = y6;\n }\n FFTM.prototype.makeRBT = function makeRBT(N4) {\n var t3 = new Array(N4);\n var l6 = BN.prototype._countBits(N4) - 1;\n for (var i3 = 0; i3 < N4; i3++) {\n t3[i3] = this.revBin(i3, l6, N4);\n }\n return t3;\n };\n FFTM.prototype.revBin = function revBin(x4, l6, N4) {\n if (x4 === 0 || x4 === N4 - 1)\n return x4;\n var rb = 0;\n for (var i3 = 0; i3 < l6; i3++) {\n rb |= (x4 & 1) << l6 - i3 - 1;\n x4 >>= 1;\n }\n return rb;\n };\n FFTM.prototype.permute = function permute(rbt, rws, iws, rtws, itws, N4) {\n for (var i3 = 0; i3 < N4; i3++) {\n rtws[i3] = rws[rbt[i3]];\n itws[i3] = iws[rbt[i3]];\n }\n };\n FFTM.prototype.transform = function transform2(rws, iws, rtws, itws, N4, rbt) {\n this.permute(rbt, rws, iws, rtws, itws, N4);\n for (var s4 = 1; s4 < N4; s4 <<= 1) {\n var l6 = s4 << 1;\n var rtwdf = Math.cos(2 * Math.PI / l6);\n var itwdf = Math.sin(2 * Math.PI / l6);\n for (var p4 = 0; p4 < N4; p4 += l6) {\n var rtwdf_ = rtwdf;\n var itwdf_ = itwdf;\n for (var j2 = 0; j2 < s4; j2++) {\n var re = rtws[p4 + j2];\n var ie = itws[p4 + j2];\n var ro = rtws[p4 + j2 + s4];\n var io = itws[p4 + j2 + s4];\n var rx = rtwdf_ * ro - itwdf_ * io;\n io = rtwdf_ * io + itwdf_ * ro;\n ro = rx;\n rtws[p4 + j2] = re + ro;\n itws[p4 + j2] = ie + io;\n rtws[p4 + j2 + s4] = re - ro;\n itws[p4 + j2 + s4] = ie - io;\n if (j2 !== l6) {\n rx = rtwdf * rtwdf_ - itwdf * itwdf_;\n itwdf_ = rtwdf * itwdf_ + itwdf * rtwdf_;\n rtwdf_ = rx;\n }\n }\n }\n }\n };\n FFTM.prototype.guessLen13b = function guessLen13b(n2, m2) {\n var N4 = Math.max(m2, n2) | 1;\n var odd = N4 & 1;\n var i3 = 0;\n for (N4 = N4 / 2 | 0; N4; N4 = N4 >>> 1) {\n i3++;\n }\n return 1 << i3 + 1 + odd;\n };\n FFTM.prototype.conjugate = function conjugate(rws, iws, N4) {\n if (N4 <= 1)\n return;\n for (var i3 = 0; i3 < N4 / 2; i3++) {\n var t3 = rws[i3];\n rws[i3] = rws[N4 - i3 - 1];\n rws[N4 - i3 - 1] = t3;\n t3 = iws[i3];\n iws[i3] = -iws[N4 - i3 - 1];\n iws[N4 - i3 - 1] = -t3;\n }\n };\n FFTM.prototype.normalize13b = function normalize13b(ws, N4) {\n var carry = 0;\n for (var i3 = 0; i3 < N4 / 2; i3++) {\n var w3 = Math.round(ws[2 * i3 + 1] / N4) * 8192 + Math.round(ws[2 * i3] / N4) + carry;\n ws[i3] = w3 & 67108863;\n if (w3 < 67108864) {\n carry = 0;\n } else {\n carry = w3 / 67108864 | 0;\n }\n }\n return ws;\n };\n FFTM.prototype.convert13b = function convert13b(ws, len, rws, N4) {\n var carry = 0;\n for (var i3 = 0; i3 < len; i3++) {\n carry = carry + (ws[i3] | 0);\n rws[2 * i3] = carry & 8191;\n carry = carry >>> 13;\n rws[2 * i3 + 1] = carry & 8191;\n carry = carry >>> 13;\n }\n for (i3 = 2 * len; i3 < N4; ++i3) {\n rws[i3] = 0;\n }\n assert9(carry === 0);\n assert9((carry & ~8191) === 0);\n };\n FFTM.prototype.stub = function stub(N4) {\n var ph = new Array(N4);\n for (var i3 = 0; i3 < N4; i3++) {\n ph[i3] = 0;\n }\n return ph;\n };\n FFTM.prototype.mulp = function mulp(x4, y6, out) {\n var N4 = 2 * this.guessLen13b(x4.length, y6.length);\n var rbt = this.makeRBT(N4);\n var _2 = this.stub(N4);\n var rws = new Array(N4);\n var rwst = new Array(N4);\n var iwst = new Array(N4);\n var nrws = new Array(N4);\n var nrwst = new Array(N4);\n var niwst = new Array(N4);\n var rmws = out.words;\n rmws.length = N4;\n this.convert13b(x4.words, x4.length, rws, N4);\n this.convert13b(y6.words, y6.length, nrws, N4);\n this.transform(rws, _2, rwst, iwst, N4, rbt);\n this.transform(nrws, _2, nrwst, niwst, N4, rbt);\n for (var i3 = 0; i3 < N4; i3++) {\n var rx = rwst[i3] * nrwst[i3] - iwst[i3] * niwst[i3];\n iwst[i3] = rwst[i3] * niwst[i3] + iwst[i3] * nrwst[i3];\n rwst[i3] = rx;\n }\n this.conjugate(rwst, iwst, N4);\n this.transform(rwst, iwst, rmws, _2, N4, rbt);\n this.conjugate(rmws, _2, N4);\n this.normalize13b(rmws, N4);\n out.negative = x4.negative ^ y6.negative;\n out.length = x4.length + y6.length;\n return out.strip();\n };\n BN.prototype.mul = function mul(num2) {\n var out = new BN(null);\n out.words = new Array(this.length + num2.length);\n return this.mulTo(num2, out);\n };\n BN.prototype.mulf = function mulf(num2) {\n var out = new BN(null);\n out.words = new Array(this.length + num2.length);\n return jumboMulTo(this, num2, out);\n };\n BN.prototype.imul = function imul(num2) {\n return this.clone().mulTo(num2, this);\n };\n BN.prototype.imuln = function imuln(num2) {\n assert9(typeof num2 === \"number\");\n assert9(num2 < 67108864);\n var carry = 0;\n for (var i3 = 0; i3 < this.length; i3++) {\n var w3 = (this.words[i3] | 0) * num2;\n var lo = (w3 & 67108863) + (carry & 67108863);\n carry >>= 26;\n carry += w3 / 67108864 | 0;\n carry += lo >>> 26;\n this.words[i3] = lo & 67108863;\n }\n if (carry !== 0) {\n this.words[i3] = carry;\n this.length++;\n }\n this.length = num2 === 0 ? 1 : this.length;\n return this;\n };\n BN.prototype.muln = function muln(num2) {\n return this.clone().imuln(num2);\n };\n BN.prototype.sqr = function sqr() {\n return this.mul(this);\n };\n BN.prototype.isqr = function isqr() {\n return this.imul(this.clone());\n };\n BN.prototype.pow = function pow(num2) {\n var w3 = toBitArray(num2);\n if (w3.length === 0)\n return new BN(1);\n var res = this;\n for (var i3 = 0; i3 < w3.length; i3++, res = res.sqr()) {\n if (w3[i3] !== 0)\n break;\n }\n if (++i3 < w3.length) {\n for (var q3 = res.sqr(); i3 < w3.length; i3++, q3 = q3.sqr()) {\n if (w3[i3] === 0)\n continue;\n res = res.mul(q3);\n }\n }\n return res;\n };\n BN.prototype.iushln = function iushln(bits) {\n assert9(typeof bits === \"number\" && bits >= 0);\n var r2 = bits % 26;\n var s4 = (bits - r2) / 26;\n var carryMask = 67108863 >>> 26 - r2 << 26 - r2;\n var i3;\n if (r2 !== 0) {\n var carry = 0;\n for (i3 = 0; i3 < this.length; i3++) {\n var newCarry = this.words[i3] & carryMask;\n var c4 = (this.words[i3] | 0) - newCarry << r2;\n this.words[i3] = c4 | carry;\n carry = newCarry >>> 26 - r2;\n }\n if (carry) {\n this.words[i3] = carry;\n this.length++;\n }\n }\n if (s4 !== 0) {\n for (i3 = this.length - 1; i3 >= 0; i3--) {\n this.words[i3 + s4] = this.words[i3];\n }\n for (i3 = 0; i3 < s4; i3++) {\n this.words[i3] = 0;\n }\n this.length += s4;\n }\n return this.strip();\n };\n BN.prototype.ishln = function ishln(bits) {\n assert9(this.negative === 0);\n return this.iushln(bits);\n };\n BN.prototype.iushrn = function iushrn(bits, hint, extended) {\n assert9(typeof bits === \"number\" && bits >= 0);\n var h4;\n if (hint) {\n h4 = (hint - hint % 26) / 26;\n } else {\n h4 = 0;\n }\n var r2 = bits % 26;\n var s4 = Math.min((bits - r2) / 26, this.length);\n var mask = 67108863 ^ 67108863 >>> r2 << r2;\n var maskedWords = extended;\n h4 -= s4;\n h4 = Math.max(0, h4);\n if (maskedWords) {\n for (var i3 = 0; i3 < s4; i3++) {\n maskedWords.words[i3] = this.words[i3];\n }\n maskedWords.length = s4;\n }\n if (s4 === 0) {\n } else if (this.length > s4) {\n this.length -= s4;\n for (i3 = 0; i3 < this.length; i3++) {\n this.words[i3] = this.words[i3 + s4];\n }\n } else {\n this.words[0] = 0;\n this.length = 1;\n }\n var carry = 0;\n for (i3 = this.length - 1; i3 >= 0 && (carry !== 0 || i3 >= h4); i3--) {\n var word = this.words[i3] | 0;\n this.words[i3] = carry << 26 - r2 | word >>> r2;\n carry = word & mask;\n }\n if (maskedWords && carry !== 0) {\n maskedWords.words[maskedWords.length++] = carry;\n }\n if (this.length === 0) {\n this.words[0] = 0;\n this.length = 1;\n }\n return this.strip();\n };\n BN.prototype.ishrn = function ishrn(bits, hint, extended) {\n assert9(this.negative === 0);\n return this.iushrn(bits, hint, extended);\n };\n BN.prototype.shln = function shln(bits) {\n return this.clone().ishln(bits);\n };\n BN.prototype.ushln = function ushln(bits) {\n return this.clone().iushln(bits);\n };\n BN.prototype.shrn = function shrn(bits) {\n return this.clone().ishrn(bits);\n };\n BN.prototype.ushrn = function ushrn(bits) {\n return this.clone().iushrn(bits);\n };\n BN.prototype.testn = function testn(bit) {\n assert9(typeof bit === \"number\" && bit >= 0);\n var r2 = bit % 26;\n var s4 = (bit - r2) / 26;\n var q3 = 1 << r2;\n if (this.length <= s4)\n return false;\n var w3 = this.words[s4];\n return !!(w3 & q3);\n };\n BN.prototype.imaskn = function imaskn(bits) {\n assert9(typeof bits === \"number\" && bits >= 0);\n var r2 = bits % 26;\n var s4 = (bits - r2) / 26;\n assert9(this.negative === 0, \"imaskn works only with positive numbers\");\n if (this.length <= s4) {\n return this;\n }\n if (r2 !== 0) {\n s4++;\n }\n this.length = Math.min(s4, this.length);\n if (r2 !== 0) {\n var mask = 67108863 ^ 67108863 >>> r2 << r2;\n this.words[this.length - 1] &= mask;\n }\n return this.strip();\n };\n BN.prototype.maskn = function maskn(bits) {\n return this.clone().imaskn(bits);\n };\n BN.prototype.iaddn = function iaddn(num2) {\n assert9(typeof num2 === \"number\");\n assert9(num2 < 67108864);\n if (num2 < 0)\n return this.isubn(-num2);\n if (this.negative !== 0) {\n if (this.length === 1 && (this.words[0] | 0) < num2) {\n this.words[0] = num2 - (this.words[0] | 0);\n this.negative = 0;\n return this;\n }\n this.negative = 0;\n this.isubn(num2);\n this.negative = 1;\n return this;\n }\n return this._iaddn(num2);\n };\n BN.prototype._iaddn = function _iaddn(num2) {\n this.words[0] += num2;\n for (var i3 = 0; i3 < this.length && this.words[i3] >= 67108864; i3++) {\n this.words[i3] -= 67108864;\n if (i3 === this.length - 1) {\n this.words[i3 + 1] = 1;\n } else {\n this.words[i3 + 1]++;\n }\n }\n this.length = Math.max(this.length, i3 + 1);\n return this;\n };\n BN.prototype.isubn = function isubn(num2) {\n assert9(typeof num2 === \"number\");\n assert9(num2 < 67108864);\n if (num2 < 0)\n return this.iaddn(-num2);\n if (this.negative !== 0) {\n this.negative = 0;\n this.iaddn(num2);\n this.negative = 1;\n return this;\n }\n this.words[0] -= num2;\n if (this.length === 1 && this.words[0] < 0) {\n this.words[0] = -this.words[0];\n this.negative = 1;\n } else {\n for (var i3 = 0; i3 < this.length && this.words[i3] < 0; i3++) {\n this.words[i3] += 67108864;\n this.words[i3 + 1] -= 1;\n }\n }\n return this.strip();\n };\n BN.prototype.addn = function addn(num2) {\n return this.clone().iaddn(num2);\n };\n BN.prototype.subn = function subn(num2) {\n return this.clone().isubn(num2);\n };\n BN.prototype.iabs = function iabs() {\n this.negative = 0;\n return this;\n };\n BN.prototype.abs = function abs() {\n return this.clone().iabs();\n };\n BN.prototype._ishlnsubmul = function _ishlnsubmul(num2, mul, shift) {\n var len = num2.length + shift;\n var i3;\n this._expand(len);\n var w3;\n var carry = 0;\n for (i3 = 0; i3 < num2.length; i3++) {\n w3 = (this.words[i3 + shift] | 0) + carry;\n var right = (num2.words[i3] | 0) * mul;\n w3 -= right & 67108863;\n carry = (w3 >> 26) - (right / 67108864 | 0);\n this.words[i3 + shift] = w3 & 67108863;\n }\n for (; i3 < this.length - shift; i3++) {\n w3 = (this.words[i3 + shift] | 0) + carry;\n carry = w3 >> 26;\n this.words[i3 + shift] = w3 & 67108863;\n }\n if (carry === 0)\n return this.strip();\n assert9(carry === -1);\n carry = 0;\n for (i3 = 0; i3 < this.length; i3++) {\n w3 = -(this.words[i3] | 0) + carry;\n carry = w3 >> 26;\n this.words[i3] = w3 & 67108863;\n }\n this.negative = 1;\n return this.strip();\n };\n BN.prototype._wordDiv = function _wordDiv(num2, mode) {\n var shift = this.length - num2.length;\n var a3 = this.clone();\n var b4 = num2;\n var bhi = b4.words[b4.length - 1] | 0;\n var bhiBits = this._countBits(bhi);\n shift = 26 - bhiBits;\n if (shift !== 0) {\n b4 = b4.ushln(shift);\n a3.iushln(shift);\n bhi = b4.words[b4.length - 1] | 0;\n }\n var m2 = a3.length - b4.length;\n var q3;\n if (mode !== \"mod\") {\n q3 = new BN(null);\n q3.length = m2 + 1;\n q3.words = new Array(q3.length);\n for (var i3 = 0; i3 < q3.length; i3++) {\n q3.words[i3] = 0;\n }\n }\n var diff = a3.clone()._ishlnsubmul(b4, 1, m2);\n if (diff.negative === 0) {\n a3 = diff;\n if (q3) {\n q3.words[m2] = 1;\n }\n }\n for (var j2 = m2 - 1; j2 >= 0; j2--) {\n var qj = (a3.words[b4.length + j2] | 0) * 67108864 + (a3.words[b4.length + j2 - 1] | 0);\n qj = Math.min(qj / bhi | 0, 67108863);\n a3._ishlnsubmul(b4, qj, j2);\n while (a3.negative !== 0) {\n qj--;\n a3.negative = 0;\n a3._ishlnsubmul(b4, 1, j2);\n if (!a3.isZero()) {\n a3.negative ^= 1;\n }\n }\n if (q3) {\n q3.words[j2] = qj;\n }\n }\n if (q3) {\n q3.strip();\n }\n a3.strip();\n if (mode !== \"div\" && shift !== 0) {\n a3.iushrn(shift);\n }\n return {\n div: q3 || null,\n mod: a3\n };\n };\n BN.prototype.divmod = function divmod(num2, mode, positive) {\n assert9(!num2.isZero());\n if (this.isZero()) {\n return {\n div: new BN(0),\n mod: new BN(0)\n };\n }\n var div, mod3, res;\n if (this.negative !== 0 && num2.negative === 0) {\n res = this.neg().divmod(num2, mode);\n if (mode !== \"mod\") {\n div = res.div.neg();\n }\n if (mode !== \"div\") {\n mod3 = res.mod.neg();\n if (positive && mod3.negative !== 0) {\n mod3.iadd(num2);\n }\n }\n return {\n div,\n mod: mod3\n };\n }\n if (this.negative === 0 && num2.negative !== 0) {\n res = this.divmod(num2.neg(), mode);\n if (mode !== \"mod\") {\n div = res.div.neg();\n }\n return {\n div,\n mod: res.mod\n };\n }\n if ((this.negative & num2.negative) !== 0) {\n res = this.neg().divmod(num2.neg(), mode);\n if (mode !== \"div\") {\n mod3 = res.mod.neg();\n if (positive && mod3.negative !== 0) {\n mod3.isub(num2);\n }\n }\n return {\n div: res.div,\n mod: mod3\n };\n }\n if (num2.length > this.length || this.cmp(num2) < 0) {\n return {\n div: new BN(0),\n mod: this\n };\n }\n if (num2.length === 1) {\n if (mode === \"div\") {\n return {\n div: this.divn(num2.words[0]),\n mod: null\n };\n }\n if (mode === \"mod\") {\n return {\n div: null,\n mod: new BN(this.modn(num2.words[0]))\n };\n }\n return {\n div: this.divn(num2.words[0]),\n mod: new BN(this.modn(num2.words[0]))\n };\n }\n return this._wordDiv(num2, mode);\n };\n BN.prototype.div = function div(num2) {\n return this.divmod(num2, \"div\", false).div;\n };\n BN.prototype.mod = function mod3(num2) {\n return this.divmod(num2, \"mod\", false).mod;\n };\n BN.prototype.umod = function umod(num2) {\n return this.divmod(num2, \"mod\", true).mod;\n };\n BN.prototype.divRound = function divRound(num2) {\n var dm = this.divmod(num2);\n if (dm.mod.isZero())\n return dm.div;\n var mod3 = dm.div.negative !== 0 ? dm.mod.isub(num2) : dm.mod;\n var half = num2.ushrn(1);\n var r2 = num2.andln(1);\n var cmp = mod3.cmp(half);\n if (cmp < 0 || r2 === 1 && cmp === 0)\n return dm.div;\n return dm.div.negative !== 0 ? dm.div.isubn(1) : dm.div.iaddn(1);\n };\n BN.prototype.modn = function modn(num2) {\n assert9(num2 <= 67108863);\n var p4 = (1 << 26) % num2;\n var acc = 0;\n for (var i3 = this.length - 1; i3 >= 0; i3--) {\n acc = (p4 * acc + (this.words[i3] | 0)) % num2;\n }\n return acc;\n };\n BN.prototype.idivn = function idivn(num2) {\n assert9(num2 <= 67108863);\n var carry = 0;\n for (var i3 = this.length - 1; i3 >= 0; i3--) {\n var w3 = (this.words[i3] | 0) + carry * 67108864;\n this.words[i3] = w3 / num2 | 0;\n carry = w3 % num2;\n }\n return this.strip();\n };\n BN.prototype.divn = function divn(num2) {\n return this.clone().idivn(num2);\n };\n BN.prototype.egcd = function egcd(p4) {\n assert9(p4.negative === 0);\n assert9(!p4.isZero());\n var x4 = this;\n var y6 = p4.clone();\n if (x4.negative !== 0) {\n x4 = x4.umod(p4);\n } else {\n x4 = x4.clone();\n }\n var A4 = new BN(1);\n var B2 = new BN(0);\n var C = new BN(0);\n var D2 = new BN(1);\n var g4 = 0;\n while (x4.isEven() && y6.isEven()) {\n x4.iushrn(1);\n y6.iushrn(1);\n ++g4;\n }\n var yp = y6.clone();\n var xp = x4.clone();\n while (!x4.isZero()) {\n for (var i3 = 0, im = 1; (x4.words[0] & im) === 0 && i3 < 26; ++i3, im <<= 1)\n ;\n if (i3 > 0) {\n x4.iushrn(i3);\n while (i3-- > 0) {\n if (A4.isOdd() || B2.isOdd()) {\n A4.iadd(yp);\n B2.isub(xp);\n }\n A4.iushrn(1);\n B2.iushrn(1);\n }\n }\n for (var j2 = 0, jm = 1; (y6.words[0] & jm) === 0 && j2 < 26; ++j2, jm <<= 1)\n ;\n if (j2 > 0) {\n y6.iushrn(j2);\n while (j2-- > 0) {\n if (C.isOdd() || D2.isOdd()) {\n C.iadd(yp);\n D2.isub(xp);\n }\n C.iushrn(1);\n D2.iushrn(1);\n }\n }\n if (x4.cmp(y6) >= 0) {\n x4.isub(y6);\n A4.isub(C);\n B2.isub(D2);\n } else {\n y6.isub(x4);\n C.isub(A4);\n D2.isub(B2);\n }\n }\n return {\n a: C,\n b: D2,\n gcd: y6.iushln(g4)\n };\n };\n BN.prototype._invmp = function _invmp(p4) {\n assert9(p4.negative === 0);\n assert9(!p4.isZero());\n var a3 = this;\n var b4 = p4.clone();\n if (a3.negative !== 0) {\n a3 = a3.umod(p4);\n } else {\n a3 = a3.clone();\n }\n var x1 = new BN(1);\n var x22 = new BN(0);\n var delta = b4.clone();\n while (a3.cmpn(1) > 0 && b4.cmpn(1) > 0) {\n for (var i3 = 0, im = 1; (a3.words[0] & im) === 0 && i3 < 26; ++i3, im <<= 1)\n ;\n if (i3 > 0) {\n a3.iushrn(i3);\n while (i3-- > 0) {\n if (x1.isOdd()) {\n x1.iadd(delta);\n }\n x1.iushrn(1);\n }\n }\n for (var j2 = 0, jm = 1; (b4.words[0] & jm) === 0 && j2 < 26; ++j2, jm <<= 1)\n ;\n if (j2 > 0) {\n b4.iushrn(j2);\n while (j2-- > 0) {\n if (x22.isOdd()) {\n x22.iadd(delta);\n }\n x22.iushrn(1);\n }\n }\n if (a3.cmp(b4) >= 0) {\n a3.isub(b4);\n x1.isub(x22);\n } else {\n b4.isub(a3);\n x22.isub(x1);\n }\n }\n var res;\n if (a3.cmpn(1) === 0) {\n res = x1;\n } else {\n res = x22;\n }\n if (res.cmpn(0) < 0) {\n res.iadd(p4);\n }\n return res;\n };\n BN.prototype.gcd = function gcd(num2) {\n if (this.isZero())\n return num2.abs();\n if (num2.isZero())\n return this.abs();\n var a3 = this.clone();\n var b4 = num2.clone();\n a3.negative = 0;\n b4.negative = 0;\n for (var shift = 0; a3.isEven() && b4.isEven(); shift++) {\n a3.iushrn(1);\n b4.iushrn(1);\n }\n do {\n while (a3.isEven()) {\n a3.iushrn(1);\n }\n while (b4.isEven()) {\n b4.iushrn(1);\n }\n var r2 = a3.cmp(b4);\n if (r2 < 0) {\n var t3 = a3;\n a3 = b4;\n b4 = t3;\n } else if (r2 === 0 || b4.cmpn(1) === 0) {\n break;\n }\n a3.isub(b4);\n } while (true);\n return b4.iushln(shift);\n };\n BN.prototype.invm = function invm(num2) {\n return this.egcd(num2).a.umod(num2);\n };\n BN.prototype.isEven = function isEven() {\n return (this.words[0] & 1) === 0;\n };\n BN.prototype.isOdd = function isOdd() {\n return (this.words[0] & 1) === 1;\n };\n BN.prototype.andln = function andln(num2) {\n return this.words[0] & num2;\n };\n BN.prototype.bincn = function bincn(bit) {\n assert9(typeof bit === \"number\");\n var r2 = bit % 26;\n var s4 = (bit - r2) / 26;\n var q3 = 1 << r2;\n if (this.length <= s4) {\n this._expand(s4 + 1);\n this.words[s4] |= q3;\n return this;\n }\n var carry = q3;\n for (var i3 = s4; carry !== 0 && i3 < this.length; i3++) {\n var w3 = this.words[i3] | 0;\n w3 += carry;\n carry = w3 >>> 26;\n w3 &= 67108863;\n this.words[i3] = w3;\n }\n if (carry !== 0) {\n this.words[i3] = carry;\n this.length++;\n }\n return this;\n };\n BN.prototype.isZero = function isZero() {\n return this.length === 1 && this.words[0] === 0;\n };\n BN.prototype.cmpn = function cmpn(num2) {\n var negative = num2 < 0;\n if (this.negative !== 0 && !negative)\n return -1;\n if (this.negative === 0 && negative)\n return 1;\n this.strip();\n var res;\n if (this.length > 1) {\n res = 1;\n } else {\n if (negative) {\n num2 = -num2;\n }\n assert9(num2 <= 67108863, \"Number is too big\");\n var w3 = this.words[0] | 0;\n res = w3 === num2 ? 0 : w3 < num2 ? -1 : 1;\n }\n if (this.negative !== 0)\n return -res | 0;\n return res;\n };\n BN.prototype.cmp = function cmp(num2) {\n if (this.negative !== 0 && num2.negative === 0)\n return -1;\n if (this.negative === 0 && num2.negative !== 0)\n return 1;\n var res = this.ucmp(num2);\n if (this.negative !== 0)\n return -res | 0;\n return res;\n };\n BN.prototype.ucmp = function ucmp(num2) {\n if (this.length > num2.length)\n return 1;\n if (this.length < num2.length)\n return -1;\n var res = 0;\n for (var i3 = this.length - 1; i3 >= 0; i3--) {\n var a3 = this.words[i3] | 0;\n var b4 = num2.words[i3] | 0;\n if (a3 === b4)\n continue;\n if (a3 < b4) {\n res = -1;\n } else if (a3 > b4) {\n res = 1;\n }\n break;\n }\n return res;\n };\n BN.prototype.gtn = function gtn(num2) {\n return this.cmpn(num2) === 1;\n };\n BN.prototype.gt = function gt(num2) {\n return this.cmp(num2) === 1;\n };\n BN.prototype.gten = function gten(num2) {\n return this.cmpn(num2) >= 0;\n };\n BN.prototype.gte = function gte(num2) {\n return this.cmp(num2) >= 0;\n };\n BN.prototype.ltn = function ltn(num2) {\n return this.cmpn(num2) === -1;\n };\n BN.prototype.lt = function lt(num2) {\n return this.cmp(num2) === -1;\n };\n BN.prototype.lten = function lten(num2) {\n return this.cmpn(num2) <= 0;\n };\n BN.prototype.lte = function lte(num2) {\n return this.cmp(num2) <= 0;\n };\n BN.prototype.eqn = function eqn(num2) {\n return this.cmpn(num2) === 0;\n };\n BN.prototype.eq = function eq(num2) {\n return this.cmp(num2) === 0;\n };\n BN.red = function red(num2) {\n return new Red(num2);\n };\n BN.prototype.toRed = function toRed(ctx) {\n assert9(!this.red, \"Already a number in reduction context\");\n assert9(this.negative === 0, \"red works only with positives\");\n return ctx.convertTo(this)._forceRed(ctx);\n };\n BN.prototype.fromRed = function fromRed() {\n assert9(this.red, \"fromRed works only with numbers in reduction context\");\n return this.red.convertFrom(this);\n };\n BN.prototype._forceRed = function _forceRed(ctx) {\n this.red = ctx;\n return this;\n };\n BN.prototype.forceRed = function forceRed(ctx) {\n assert9(!this.red, \"Already a number in reduction context\");\n return this._forceRed(ctx);\n };\n BN.prototype.redAdd = function redAdd(num2) {\n assert9(this.red, \"redAdd works only with red numbers\");\n return this.red.add(this, num2);\n };\n BN.prototype.redIAdd = function redIAdd(num2) {\n assert9(this.red, \"redIAdd works only with red numbers\");\n return this.red.iadd(this, num2);\n };\n BN.prototype.redSub = function redSub(num2) {\n assert9(this.red, \"redSub works only with red numbers\");\n return this.red.sub(this, num2);\n };\n BN.prototype.redISub = function redISub(num2) {\n assert9(this.red, \"redISub works only with red numbers\");\n return this.red.isub(this, num2);\n };\n BN.prototype.redShl = function redShl(num2) {\n assert9(this.red, \"redShl works only with red numbers\");\n return this.red.shl(this, num2);\n };\n BN.prototype.redMul = function redMul(num2) {\n assert9(this.red, \"redMul works only with red numbers\");\n this.red._verify2(this, num2);\n return this.red.mul(this, num2);\n };\n BN.prototype.redIMul = function redIMul(num2) {\n assert9(this.red, \"redMul works only with red numbers\");\n this.red._verify2(this, num2);\n return this.red.imul(this, num2);\n };\n BN.prototype.redSqr = function redSqr() {\n assert9(this.red, \"redSqr works only with red numbers\");\n this.red._verify1(this);\n return this.red.sqr(this);\n };\n BN.prototype.redISqr = function redISqr() {\n assert9(this.red, \"redISqr works only with red numbers\");\n this.red._verify1(this);\n return this.red.isqr(this);\n };\n BN.prototype.redSqrt = function redSqrt() {\n assert9(this.red, \"redSqrt works only with red numbers\");\n this.red._verify1(this);\n return this.red.sqrt(this);\n };\n BN.prototype.redInvm = function redInvm() {\n assert9(this.red, \"redInvm works only with red numbers\");\n this.red._verify1(this);\n return this.red.invm(this);\n };\n BN.prototype.redNeg = function redNeg() {\n assert9(this.red, \"redNeg works only with red numbers\");\n this.red._verify1(this);\n return this.red.neg(this);\n };\n BN.prototype.redPow = function redPow(num2) {\n assert9(this.red && !num2.red, \"redPow(normalNum)\");\n this.red._verify1(this);\n return this.red.pow(this, num2);\n };\n var primes = {\n k256: null,\n p224: null,\n p192: null,\n p25519: null\n };\n function MPrime(name, p4) {\n this.name = name;\n this.p = new BN(p4, 16);\n this.n = this.p.bitLength();\n this.k = new BN(1).iushln(this.n).isub(this.p);\n this.tmp = this._tmp();\n }\n MPrime.prototype._tmp = function _tmp() {\n var tmp = new BN(null);\n tmp.words = new Array(Math.ceil(this.n / 13));\n return tmp;\n };\n MPrime.prototype.ireduce = function ireduce(num2) {\n var r2 = num2;\n var rlen;\n do {\n this.split(r2, this.tmp);\n r2 = this.imulK(r2);\n r2 = r2.iadd(this.tmp);\n rlen = r2.bitLength();\n } while (rlen > this.n);\n var cmp = rlen < this.n ? -1 : r2.ucmp(this.p);\n if (cmp === 0) {\n r2.words[0] = 0;\n r2.length = 1;\n } else if (cmp > 0) {\n r2.isub(this.p);\n } else {\n if (r2.strip !== void 0) {\n r2.strip();\n } else {\n r2._strip();\n }\n }\n return r2;\n };\n MPrime.prototype.split = function split4(input, out) {\n input.iushrn(this.n, 0, out);\n };\n MPrime.prototype.imulK = function imulK(num2) {\n return num2.imul(this.k);\n };\n function K256() {\n MPrime.call(\n this,\n \"k256\",\n \"ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe fffffc2f\"\n );\n }\n inherits(K256, MPrime);\n K256.prototype.split = function split4(input, output) {\n var mask = 4194303;\n var outLen = Math.min(input.length, 9);\n for (var i3 = 0; i3 < outLen; i3++) {\n output.words[i3] = input.words[i3];\n }\n output.length = outLen;\n if (input.length <= 9) {\n input.words[0] = 0;\n input.length = 1;\n return;\n }\n var prev = input.words[9];\n output.words[output.length++] = prev & mask;\n for (i3 = 10; i3 < input.length; i3++) {\n var next = input.words[i3] | 0;\n input.words[i3 - 10] = (next & mask) << 4 | prev >>> 22;\n prev = next;\n }\n prev >>>= 22;\n input.words[i3 - 10] = prev;\n if (prev === 0 && input.length > 10) {\n input.length -= 10;\n } else {\n input.length -= 9;\n }\n };\n K256.prototype.imulK = function imulK(num2) {\n num2.words[num2.length] = 0;\n num2.words[num2.length + 1] = 0;\n num2.length += 2;\n var lo = 0;\n for (var i3 = 0; i3 < num2.length; i3++) {\n var w3 = num2.words[i3] | 0;\n lo += w3 * 977;\n num2.words[i3] = lo & 67108863;\n lo = w3 * 64 + (lo / 67108864 | 0);\n }\n if (num2.words[num2.length - 1] === 0) {\n num2.length--;\n if (num2.words[num2.length - 1] === 0) {\n num2.length--;\n }\n }\n return num2;\n };\n function P224() {\n MPrime.call(\n this,\n \"p224\",\n \"ffffffff ffffffff ffffffff ffffffff 00000000 00000000 00000001\"\n );\n }\n inherits(P224, MPrime);\n function P192() {\n MPrime.call(\n this,\n \"p192\",\n \"ffffffff ffffffff ffffffff fffffffe ffffffff ffffffff\"\n );\n }\n inherits(P192, MPrime);\n function P25519() {\n MPrime.call(\n this,\n \"25519\",\n \"7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed\"\n );\n }\n inherits(P25519, MPrime);\n P25519.prototype.imulK = function imulK(num2) {\n var carry = 0;\n for (var i3 = 0; i3 < num2.length; i3++) {\n var hi = (num2.words[i3] | 0) * 19 + carry;\n var lo = hi & 67108863;\n hi >>>= 26;\n num2.words[i3] = lo;\n carry = hi;\n }\n if (carry !== 0) {\n num2.words[num2.length++] = carry;\n }\n return num2;\n };\n BN._prime = function prime(name) {\n if (primes[name])\n return primes[name];\n var prime2;\n if (name === \"k256\") {\n prime2 = new K256();\n } else if (name === \"p224\") {\n prime2 = new P224();\n } else if (name === \"p192\") {\n prime2 = new P192();\n } else if (name === \"p25519\") {\n prime2 = new P25519();\n } else {\n throw new Error(\"Unknown prime \" + name);\n }\n primes[name] = prime2;\n return prime2;\n };\n function Red(m2) {\n if (typeof m2 === \"string\") {\n var prime = BN._prime(m2);\n this.m = prime.p;\n this.prime = prime;\n } else {\n assert9(m2.gtn(1), \"modulus must be greater than 1\");\n this.m = m2;\n this.prime = null;\n }\n }\n Red.prototype._verify1 = function _verify1(a3) {\n assert9(a3.negative === 0, \"red works only with positives\");\n assert9(a3.red, \"red works only with red numbers\");\n };\n Red.prototype._verify2 = function _verify2(a3, b4) {\n assert9((a3.negative | b4.negative) === 0, \"red works only with positives\");\n assert9(\n a3.red && a3.red === b4.red,\n \"red works only with red numbers\"\n );\n };\n Red.prototype.imod = function imod(a3) {\n if (this.prime)\n return this.prime.ireduce(a3)._forceRed(this);\n return a3.umod(this.m)._forceRed(this);\n };\n Red.prototype.neg = function neg(a3) {\n if (a3.isZero()) {\n return a3.clone();\n }\n return this.m.sub(a3)._forceRed(this);\n };\n Red.prototype.add = function add2(a3, b4) {\n this._verify2(a3, b4);\n var res = a3.add(b4);\n if (res.cmp(this.m) >= 0) {\n res.isub(this.m);\n }\n return res._forceRed(this);\n };\n Red.prototype.iadd = function iadd(a3, b4) {\n this._verify2(a3, b4);\n var res = a3.iadd(b4);\n if (res.cmp(this.m) >= 0) {\n res.isub(this.m);\n }\n return res;\n };\n Red.prototype.sub = function sub(a3, b4) {\n this._verify2(a3, b4);\n var res = a3.sub(b4);\n if (res.cmpn(0) < 0) {\n res.iadd(this.m);\n }\n return res._forceRed(this);\n };\n Red.prototype.isub = function isub(a3, b4) {\n this._verify2(a3, b4);\n var res = a3.isub(b4);\n if (res.cmpn(0) < 0) {\n res.iadd(this.m);\n }\n return res;\n };\n Red.prototype.shl = function shl(a3, num2) {\n this._verify1(a3);\n return this.imod(a3.ushln(num2));\n };\n Red.prototype.imul = function imul(a3, b4) {\n this._verify2(a3, b4);\n return this.imod(a3.imul(b4));\n };\n Red.prototype.mul = function mul(a3, b4) {\n this._verify2(a3, b4);\n return this.imod(a3.mul(b4));\n };\n Red.prototype.isqr = function isqr(a3) {\n return this.imul(a3, a3.clone());\n };\n Red.prototype.sqr = function sqr(a3) {\n return this.mul(a3, a3);\n };\n Red.prototype.sqrt = function sqrt(a3) {\n if (a3.isZero())\n return a3.clone();\n var mod3 = this.m.andln(3);\n assert9(mod3 % 2 === 1);\n if (mod3 === 3) {\n var pow = this.m.add(new BN(1)).iushrn(2);\n return this.pow(a3, pow);\n }\n var q3 = this.m.subn(1);\n var s4 = 0;\n while (!q3.isZero() && q3.andln(1) === 0) {\n s4++;\n q3.iushrn(1);\n }\n assert9(!q3.isZero());\n var one = new BN(1).toRed(this);\n var nOne = one.redNeg();\n var lpow = this.m.subn(1).iushrn(1);\n var z2 = this.m.bitLength();\n z2 = new BN(2 * z2 * z2).toRed(this);\n while (this.pow(z2, lpow).cmp(nOne) !== 0) {\n z2.redIAdd(nOne);\n }\n var c4 = this.pow(z2, q3);\n var r2 = this.pow(a3, q3.addn(1).iushrn(1));\n var t3 = this.pow(a3, q3);\n var m2 = s4;\n while (t3.cmp(one) !== 0) {\n var tmp = t3;\n for (var i3 = 0; tmp.cmp(one) !== 0; i3++) {\n tmp = tmp.redSqr();\n }\n assert9(i3 < m2);\n var b4 = this.pow(c4, new BN(1).iushln(m2 - i3 - 1));\n r2 = r2.redMul(b4);\n c4 = b4.redSqr();\n t3 = t3.redMul(c4);\n m2 = i3;\n }\n return r2;\n };\n Red.prototype.invm = function invm(a3) {\n var inv = a3._invmp(this.m);\n if (inv.negative !== 0) {\n inv.negative = 0;\n return this.imod(inv).redNeg();\n } else {\n return this.imod(inv);\n }\n };\n Red.prototype.pow = function pow(a3, num2) {\n if (num2.isZero())\n return new BN(1).toRed(this);\n if (num2.cmpn(1) === 0)\n return a3.clone();\n var windowSize = 4;\n var wnd = new Array(1 << windowSize);\n wnd[0] = new BN(1).toRed(this);\n wnd[1] = a3;\n for (var i3 = 2; i3 < wnd.length; i3++) {\n wnd[i3] = this.mul(wnd[i3 - 1], a3);\n }\n var res = wnd[0];\n var current = 0;\n var currentLen = 0;\n var start = num2.bitLength() % 26;\n if (start === 0) {\n start = 26;\n }\n for (i3 = num2.length - 1; i3 >= 0; i3--) {\n var word = num2.words[i3];\n for (var j2 = start - 1; j2 >= 0; j2--) {\n var bit = word >> j2 & 1;\n if (res !== wnd[0]) {\n res = this.sqr(res);\n }\n if (bit === 0 && current === 0) {\n currentLen = 0;\n continue;\n }\n current <<= 1;\n current |= bit;\n currentLen++;\n if (currentLen !== windowSize && (i3 !== 0 || j2 !== 0))\n continue;\n res = this.mul(res, wnd[current]);\n currentLen = 0;\n current = 0;\n }\n start = 26;\n }\n return res;\n };\n Red.prototype.convertTo = function convertTo(num2) {\n var r2 = num2.umod(this.m);\n return r2 === num2 ? r2.clone() : r2;\n };\n Red.prototype.convertFrom = function convertFrom(num2) {\n var res = num2.clone();\n res.red = null;\n return res;\n };\n BN.mont = function mont(num2) {\n return new Mont(num2);\n };\n function Mont(m2) {\n Red.call(this, m2);\n this.shift = this.m.bitLength();\n if (this.shift % 26 !== 0) {\n this.shift += 26 - this.shift % 26;\n }\n this.r = new BN(1).iushln(this.shift);\n this.r2 = this.imod(this.r.sqr());\n this.rinv = this.r._invmp(this.m);\n this.minv = this.rinv.mul(this.r).isubn(1).div(this.m);\n this.minv = this.minv.umod(this.r);\n this.minv = this.r.sub(this.minv);\n }\n inherits(Mont, Red);\n Mont.prototype.convertTo = function convertTo(num2) {\n return this.imod(num2.ushln(this.shift));\n };\n Mont.prototype.convertFrom = function convertFrom(num2) {\n var r2 = this.imod(num2.mul(this.rinv));\n r2.red = null;\n return r2;\n };\n Mont.prototype.imul = function imul(a3, b4) {\n if (a3.isZero() || b4.isZero()) {\n a3.words[0] = 0;\n a3.length = 1;\n return a3;\n }\n var t3 = a3.imul(b4);\n var c4 = t3.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m);\n var u2 = t3.isub(c4).iushrn(this.shift);\n var res = u2;\n if (u2.cmp(this.m) >= 0) {\n res = u2.isub(this.m);\n } else if (u2.cmpn(0) < 0) {\n res = u2.iadd(this.m);\n }\n return res._forceRed(this);\n };\n Mont.prototype.mul = function mul(a3, b4) {\n if (a3.isZero() || b4.isZero())\n return new BN(0)._forceRed(this);\n var t3 = a3.mul(b4);\n var c4 = t3.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m);\n var u2 = t3.isub(c4).iushrn(this.shift);\n var res = u2;\n if (u2.cmp(this.m) >= 0) {\n res = u2.isub(this.m);\n } else if (u2.cmpn(0) < 0) {\n res = u2.iadd(this.m);\n }\n return res._forceRed(this);\n };\n Mont.prototype.invm = function invm(a3) {\n var res = this.imod(a3._invmp(this.m).mul(this.r2));\n return res._forceRed(this);\n };\n })(typeof module === \"undefined\" || module, exports3);\n }\n });\n\n // ../../../node_modules/.pnpm/minimalistic-assert@1.0.1/node_modules/minimalistic-assert/index.js\n var require_minimalistic_assert = __commonJS({\n \"../../../node_modules/.pnpm/minimalistic-assert@1.0.1/node_modules/minimalistic-assert/index.js\"(exports3, module) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n module.exports = assert9;\n function assert9(val, msg) {\n if (!val)\n throw new Error(msg || \"Assertion failed\");\n }\n assert9.equal = function assertEqual(l6, r2, msg) {\n if (l6 != r2)\n throw new Error(msg || \"Assertion failed: \" + l6 + \" != \" + r2);\n };\n }\n });\n\n // ../../../node_modules/.pnpm/minimalistic-crypto-utils@1.0.1/node_modules/minimalistic-crypto-utils/lib/utils.js\n var require_utils2 = __commonJS({\n \"../../../node_modules/.pnpm/minimalistic-crypto-utils@1.0.1/node_modules/minimalistic-crypto-utils/lib/utils.js\"(exports3) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n var utils = exports3;\n function toArray(msg, enc) {\n if (Array.isArray(msg))\n return msg.slice();\n if (!msg)\n return [];\n var res = [];\n if (typeof msg !== \"string\") {\n for (var i3 = 0; i3 < msg.length; i3++)\n res[i3] = msg[i3] | 0;\n return res;\n }\n if (enc === \"hex\") {\n msg = msg.replace(/[^a-z0-9]+/ig, \"\");\n if (msg.length % 2 !== 0)\n msg = \"0\" + msg;\n for (var i3 = 0; i3 < msg.length; i3 += 2)\n res.push(parseInt(msg[i3] + msg[i3 + 1], 16));\n } else {\n for (var i3 = 0; i3 < msg.length; i3++) {\n var c4 = msg.charCodeAt(i3);\n var hi = c4 >> 8;\n var lo = c4 & 255;\n if (hi)\n res.push(hi, lo);\n else\n res.push(lo);\n }\n }\n return res;\n }\n utils.toArray = toArray;\n function zero2(word) {\n if (word.length === 1)\n return \"0\" + word;\n else\n return word;\n }\n utils.zero2 = zero2;\n function toHex3(msg) {\n var res = \"\";\n for (var i3 = 0; i3 < msg.length; i3++)\n res += zero2(msg[i3].toString(16));\n return res;\n }\n utils.toHex = toHex3;\n utils.encode = function encode6(arr, enc) {\n if (enc === \"hex\")\n return toHex3(arr);\n else\n return arr;\n };\n }\n });\n\n // ../../../node_modules/.pnpm/elliptic@6.6.1/node_modules/elliptic/lib/elliptic/utils.js\n var require_utils3 = __commonJS({\n \"../../../node_modules/.pnpm/elliptic@6.6.1/node_modules/elliptic/lib/elliptic/utils.js\"(exports3) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n var utils = exports3;\n var BN = require_bn2();\n var minAssert = require_minimalistic_assert();\n var minUtils = require_utils2();\n utils.assert = minAssert;\n utils.toArray = minUtils.toArray;\n utils.zero2 = minUtils.zero2;\n utils.toHex = minUtils.toHex;\n utils.encode = minUtils.encode;\n function getNAF(num2, w3, bits) {\n var naf = new Array(Math.max(num2.bitLength(), bits) + 1);\n var i3;\n for (i3 = 0; i3 < naf.length; i3 += 1) {\n naf[i3] = 0;\n }\n var ws = 1 << w3 + 1;\n var k4 = num2.clone();\n for (i3 = 0; i3 < naf.length; i3++) {\n var z2;\n var mod3 = k4.andln(ws - 1);\n if (k4.isOdd()) {\n if (mod3 > (ws >> 1) - 1)\n z2 = (ws >> 1) - mod3;\n else\n z2 = mod3;\n k4.isubn(z2);\n } else {\n z2 = 0;\n }\n naf[i3] = z2;\n k4.iushrn(1);\n }\n return naf;\n }\n utils.getNAF = getNAF;\n function getJSF(k1, k22) {\n var jsf = [\n [],\n []\n ];\n k1 = k1.clone();\n k22 = k22.clone();\n var d1 = 0;\n var d22 = 0;\n var m8;\n while (k1.cmpn(-d1) > 0 || k22.cmpn(-d22) > 0) {\n var m14 = k1.andln(3) + d1 & 3;\n var m24 = k22.andln(3) + d22 & 3;\n if (m14 === 3)\n m14 = -1;\n if (m24 === 3)\n m24 = -1;\n var u1;\n if ((m14 & 1) === 0) {\n u1 = 0;\n } else {\n m8 = k1.andln(7) + d1 & 7;\n if ((m8 === 3 || m8 === 5) && m24 === 2)\n u1 = -m14;\n else\n u1 = m14;\n }\n jsf[0].push(u1);\n var u2;\n if ((m24 & 1) === 0) {\n u2 = 0;\n } else {\n m8 = k22.andln(7) + d22 & 7;\n if ((m8 === 3 || m8 === 5) && m14 === 2)\n u2 = -m24;\n else\n u2 = m24;\n }\n jsf[1].push(u2);\n if (2 * d1 === u1 + 1)\n d1 = 1 - d1;\n if (2 * d22 === u2 + 1)\n d22 = 1 - d22;\n k1.iushrn(1);\n k22.iushrn(1);\n }\n return jsf;\n }\n utils.getJSF = getJSF;\n function cachedProperty(obj, name, computer) {\n var key = \"_\" + name;\n obj.prototype[name] = function cachedProperty2() {\n return this[key] !== void 0 ? this[key] : this[key] = computer.call(this);\n };\n }\n utils.cachedProperty = cachedProperty;\n function parseBytes(bytes) {\n return typeof bytes === \"string\" ? utils.toArray(bytes, \"hex\") : bytes;\n }\n utils.parseBytes = parseBytes;\n function intFromLE(bytes) {\n return new BN(bytes, \"hex\", \"le\");\n }\n utils.intFromLE = intFromLE;\n }\n });\n\n // ../../../node_modules/.pnpm/@lit-protocol+esbuild-plugin-polyfill-node@0.3.0_esbuild@0.19.12/node_modules/@lit-protocol/esbuild-plugin-polyfill-node/polyfills/empty.js\n var empty_exports = {};\n __export(empty_exports, {\n default: () => empty_default\n });\n var empty_default;\n var init_empty = __esm({\n \"../../../node_modules/.pnpm/@lit-protocol+esbuild-plugin-polyfill-node@0.3.0_esbuild@0.19.12/node_modules/@lit-protocol/esbuild-plugin-polyfill-node/polyfills/empty.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n empty_default = {};\n }\n });\n\n // ../../../node_modules/.pnpm/brorand@1.1.0/node_modules/brorand/index.js\n var require_brorand = __commonJS({\n \"../../../node_modules/.pnpm/brorand@1.1.0/node_modules/brorand/index.js\"(exports3, module) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n var r2;\n module.exports = function rand(len) {\n if (!r2)\n r2 = new Rand(null);\n return r2.generate(len);\n };\n function Rand(rand) {\n this.rand = rand;\n }\n module.exports.Rand = Rand;\n Rand.prototype.generate = function generate(len) {\n return this._rand(len);\n };\n Rand.prototype._rand = function _rand(n2) {\n if (this.rand.getBytes)\n return this.rand.getBytes(n2);\n var res = new Uint8Array(n2);\n for (var i3 = 0; i3 < res.length; i3++)\n res[i3] = this.rand.getByte();\n return res;\n };\n if (typeof self === \"object\") {\n if (self.crypto && self.crypto.getRandomValues) {\n Rand.prototype._rand = function _rand(n2) {\n var arr = new Uint8Array(n2);\n self.crypto.getRandomValues(arr);\n return arr;\n };\n } else if (self.msCrypto && self.msCrypto.getRandomValues) {\n Rand.prototype._rand = function _rand(n2) {\n var arr = new Uint8Array(n2);\n self.msCrypto.getRandomValues(arr);\n return arr;\n };\n } else if (typeof window === \"object\") {\n Rand.prototype._rand = function() {\n throw new Error(\"Not implemented yet\");\n };\n }\n } else {\n try {\n crypto3 = (init_empty(), __toCommonJS(empty_exports));\n if (typeof crypto3.randomBytes !== \"function\")\n throw new Error(\"Not supported\");\n Rand.prototype._rand = function _rand(n2) {\n return crypto3.randomBytes(n2);\n };\n } catch (e3) {\n }\n }\n var crypto3;\n }\n });\n\n // ../../../node_modules/.pnpm/elliptic@6.6.1/node_modules/elliptic/lib/elliptic/curve/base.js\n var require_base = __commonJS({\n \"../../../node_modules/.pnpm/elliptic@6.6.1/node_modules/elliptic/lib/elliptic/curve/base.js\"(exports3, module) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n var BN = require_bn2();\n var utils = require_utils3();\n var getNAF = utils.getNAF;\n var getJSF = utils.getJSF;\n var assert9 = utils.assert;\n function BaseCurve(type, conf) {\n this.type = type;\n this.p = new BN(conf.p, 16);\n this.red = conf.prime ? BN.red(conf.prime) : BN.mont(this.p);\n this.zero = new BN(0).toRed(this.red);\n this.one = new BN(1).toRed(this.red);\n this.two = new BN(2).toRed(this.red);\n this.n = conf.n && new BN(conf.n, 16);\n this.g = conf.g && this.pointFromJSON(conf.g, conf.gRed);\n this._wnafT1 = new Array(4);\n this._wnafT2 = new Array(4);\n this._wnafT3 = new Array(4);\n this._wnafT4 = new Array(4);\n this._bitLength = this.n ? this.n.bitLength() : 0;\n var adjustCount = this.n && this.p.div(this.n);\n if (!adjustCount || adjustCount.cmpn(100) > 0) {\n this.redN = null;\n } else {\n this._maxwellTrick = true;\n this.redN = this.n.toRed(this.red);\n }\n }\n module.exports = BaseCurve;\n BaseCurve.prototype.point = function point() {\n throw new Error(\"Not implemented\");\n };\n BaseCurve.prototype.validate = function validate6() {\n throw new Error(\"Not implemented\");\n };\n BaseCurve.prototype._fixedNafMul = function _fixedNafMul(p4, k4) {\n assert9(p4.precomputed);\n var doubles = p4._getDoubles();\n var naf = getNAF(k4, 1, this._bitLength);\n var I2 = (1 << doubles.step + 1) - (doubles.step % 2 === 0 ? 2 : 1);\n I2 /= 3;\n var repr = [];\n var j2;\n var nafW;\n for (j2 = 0; j2 < naf.length; j2 += doubles.step) {\n nafW = 0;\n for (var l6 = j2 + doubles.step - 1; l6 >= j2; l6--)\n nafW = (nafW << 1) + naf[l6];\n repr.push(nafW);\n }\n var a3 = this.jpoint(null, null, null);\n var b4 = this.jpoint(null, null, null);\n for (var i3 = I2; i3 > 0; i3--) {\n for (j2 = 0; j2 < repr.length; j2++) {\n nafW = repr[j2];\n if (nafW === i3)\n b4 = b4.mixedAdd(doubles.points[j2]);\n else if (nafW === -i3)\n b4 = b4.mixedAdd(doubles.points[j2].neg());\n }\n a3 = a3.add(b4);\n }\n return a3.toP();\n };\n BaseCurve.prototype._wnafMul = function _wnafMul(p4, k4) {\n var w3 = 4;\n var nafPoints = p4._getNAFPoints(w3);\n w3 = nafPoints.wnd;\n var wnd = nafPoints.points;\n var naf = getNAF(k4, w3, this._bitLength);\n var acc = this.jpoint(null, null, null);\n for (var i3 = naf.length - 1; i3 >= 0; i3--) {\n for (var l6 = 0; i3 >= 0 && naf[i3] === 0; i3--)\n l6++;\n if (i3 >= 0)\n l6++;\n acc = acc.dblp(l6);\n if (i3 < 0)\n break;\n var z2 = naf[i3];\n assert9(z2 !== 0);\n if (p4.type === \"affine\") {\n if (z2 > 0)\n acc = acc.mixedAdd(wnd[z2 - 1 >> 1]);\n else\n acc = acc.mixedAdd(wnd[-z2 - 1 >> 1].neg());\n } else {\n if (z2 > 0)\n acc = acc.add(wnd[z2 - 1 >> 1]);\n else\n acc = acc.add(wnd[-z2 - 1 >> 1].neg());\n }\n }\n return p4.type === \"affine\" ? acc.toP() : acc;\n };\n BaseCurve.prototype._wnafMulAdd = function _wnafMulAdd(defW, points, coeffs, len, jacobianResult) {\n var wndWidth = this._wnafT1;\n var wnd = this._wnafT2;\n var naf = this._wnafT3;\n var max = 0;\n var i3;\n var j2;\n var p4;\n for (i3 = 0; i3 < len; i3++) {\n p4 = points[i3];\n var nafPoints = p4._getNAFPoints(defW);\n wndWidth[i3] = nafPoints.wnd;\n wnd[i3] = nafPoints.points;\n }\n for (i3 = len - 1; i3 >= 1; i3 -= 2) {\n var a3 = i3 - 1;\n var b4 = i3;\n if (wndWidth[a3] !== 1 || wndWidth[b4] !== 1) {\n naf[a3] = getNAF(coeffs[a3], wndWidth[a3], this._bitLength);\n naf[b4] = getNAF(coeffs[b4], wndWidth[b4], this._bitLength);\n max = Math.max(naf[a3].length, max);\n max = Math.max(naf[b4].length, max);\n continue;\n }\n var comb = [\n points[a3],\n /* 1 */\n null,\n /* 3 */\n null,\n /* 5 */\n points[b4]\n /* 7 */\n ];\n if (points[a3].y.cmp(points[b4].y) === 0) {\n comb[1] = points[a3].add(points[b4]);\n comb[2] = points[a3].toJ().mixedAdd(points[b4].neg());\n } else if (points[a3].y.cmp(points[b4].y.redNeg()) === 0) {\n comb[1] = points[a3].toJ().mixedAdd(points[b4]);\n comb[2] = points[a3].add(points[b4].neg());\n } else {\n comb[1] = points[a3].toJ().mixedAdd(points[b4]);\n comb[2] = points[a3].toJ().mixedAdd(points[b4].neg());\n }\n var index2 = [\n -3,\n /* -1 -1 */\n -1,\n /* -1 0 */\n -5,\n /* -1 1 */\n -7,\n /* 0 -1 */\n 0,\n /* 0 0 */\n 7,\n /* 0 1 */\n 5,\n /* 1 -1 */\n 1,\n /* 1 0 */\n 3\n /* 1 1 */\n ];\n var jsf = getJSF(coeffs[a3], coeffs[b4]);\n max = Math.max(jsf[0].length, max);\n naf[a3] = new Array(max);\n naf[b4] = new Array(max);\n for (j2 = 0; j2 < max; j2++) {\n var ja = jsf[0][j2] | 0;\n var jb = jsf[1][j2] | 0;\n naf[a3][j2] = index2[(ja + 1) * 3 + (jb + 1)];\n naf[b4][j2] = 0;\n wnd[a3] = comb;\n }\n }\n var acc = this.jpoint(null, null, null);\n var tmp = this._wnafT4;\n for (i3 = max; i3 >= 0; i3--) {\n var k4 = 0;\n while (i3 >= 0) {\n var zero = true;\n for (j2 = 0; j2 < len; j2++) {\n tmp[j2] = naf[j2][i3] | 0;\n if (tmp[j2] !== 0)\n zero = false;\n }\n if (!zero)\n break;\n k4++;\n i3--;\n }\n if (i3 >= 0)\n k4++;\n acc = acc.dblp(k4);\n if (i3 < 0)\n break;\n for (j2 = 0; j2 < len; j2++) {\n var z2 = tmp[j2];\n p4;\n if (z2 === 0)\n continue;\n else if (z2 > 0)\n p4 = wnd[j2][z2 - 1 >> 1];\n else if (z2 < 0)\n p4 = wnd[j2][-z2 - 1 >> 1].neg();\n if (p4.type === \"affine\")\n acc = acc.mixedAdd(p4);\n else\n acc = acc.add(p4);\n }\n }\n for (i3 = 0; i3 < len; i3++)\n wnd[i3] = null;\n if (jacobianResult)\n return acc;\n else\n return acc.toP();\n };\n function BasePoint(curve, type) {\n this.curve = curve;\n this.type = type;\n this.precomputed = null;\n }\n BaseCurve.BasePoint = BasePoint;\n BasePoint.prototype.eq = function eq() {\n throw new Error(\"Not implemented\");\n };\n BasePoint.prototype.validate = function validate6() {\n return this.curve.validate(this);\n };\n BaseCurve.prototype.decodePoint = function decodePoint(bytes, enc) {\n bytes = utils.toArray(bytes, enc);\n var len = this.p.byteLength();\n if ((bytes[0] === 4 || bytes[0] === 6 || bytes[0] === 7) && bytes.length - 1 === 2 * len) {\n if (bytes[0] === 6)\n assert9(bytes[bytes.length - 1] % 2 === 0);\n else if (bytes[0] === 7)\n assert9(bytes[bytes.length - 1] % 2 === 1);\n var res = this.point(\n bytes.slice(1, 1 + len),\n bytes.slice(1 + len, 1 + 2 * len)\n );\n return res;\n } else if ((bytes[0] === 2 || bytes[0] === 3) && bytes.length - 1 === len) {\n return this.pointFromX(bytes.slice(1, 1 + len), bytes[0] === 3);\n }\n throw new Error(\"Unknown point format\");\n };\n BasePoint.prototype.encodeCompressed = function encodeCompressed(enc) {\n return this.encode(enc, true);\n };\n BasePoint.prototype._encode = function _encode(compact) {\n var len = this.curve.p.byteLength();\n var x4 = this.getX().toArray(\"be\", len);\n if (compact)\n return [this.getY().isEven() ? 2 : 3].concat(x4);\n return [4].concat(x4, this.getY().toArray(\"be\", len));\n };\n BasePoint.prototype.encode = function encode6(enc, compact) {\n return utils.encode(this._encode(compact), enc);\n };\n BasePoint.prototype.precompute = function precompute(power) {\n if (this.precomputed)\n return this;\n var precomputed = {\n doubles: null,\n naf: null,\n beta: null\n };\n precomputed.naf = this._getNAFPoints(8);\n precomputed.doubles = this._getDoubles(4, power);\n precomputed.beta = this._getBeta();\n this.precomputed = precomputed;\n return this;\n };\n BasePoint.prototype._hasDoubles = function _hasDoubles(k4) {\n if (!this.precomputed)\n return false;\n var doubles = this.precomputed.doubles;\n if (!doubles)\n return false;\n return doubles.points.length >= Math.ceil((k4.bitLength() + 1) / doubles.step);\n };\n BasePoint.prototype._getDoubles = function _getDoubles(step, power) {\n if (this.precomputed && this.precomputed.doubles)\n return this.precomputed.doubles;\n var doubles = [this];\n var acc = this;\n for (var i3 = 0; i3 < power; i3 += step) {\n for (var j2 = 0; j2 < step; j2++)\n acc = acc.dbl();\n doubles.push(acc);\n }\n return {\n step,\n points: doubles\n };\n };\n BasePoint.prototype._getNAFPoints = function _getNAFPoints(wnd) {\n if (this.precomputed && this.precomputed.naf)\n return this.precomputed.naf;\n var res = [this];\n var max = (1 << wnd) - 1;\n var dbl = max === 1 ? null : this.dbl();\n for (var i3 = 1; i3 < max; i3++)\n res[i3] = res[i3 - 1].add(dbl);\n return {\n wnd,\n points: res\n };\n };\n BasePoint.prototype._getBeta = function _getBeta() {\n return null;\n };\n BasePoint.prototype.dblp = function dblp(k4) {\n var r2 = this;\n for (var i3 = 0; i3 < k4; i3++)\n r2 = r2.dbl();\n return r2;\n };\n }\n });\n\n // ../../../node_modules/.pnpm/inherits@2.0.4/node_modules/inherits/inherits_browser.js\n var require_inherits_browser = __commonJS({\n \"../../../node_modules/.pnpm/inherits@2.0.4/node_modules/inherits/inherits_browser.js\"(exports3, module) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n if (typeof Object.create === \"function\") {\n module.exports = function inherits(ctor, superCtor) {\n if (superCtor) {\n ctor.super_ = superCtor;\n ctor.prototype = Object.create(superCtor.prototype, {\n constructor: {\n value: ctor,\n enumerable: false,\n writable: true,\n configurable: true\n }\n });\n }\n };\n } else {\n module.exports = function inherits(ctor, superCtor) {\n if (superCtor) {\n ctor.super_ = superCtor;\n var TempCtor = function() {\n };\n TempCtor.prototype = superCtor.prototype;\n ctor.prototype = new TempCtor();\n ctor.prototype.constructor = ctor;\n }\n };\n }\n }\n });\n\n // ../../../node_modules/.pnpm/elliptic@6.6.1/node_modules/elliptic/lib/elliptic/curve/short.js\n var require_short = __commonJS({\n \"../../../node_modules/.pnpm/elliptic@6.6.1/node_modules/elliptic/lib/elliptic/curve/short.js\"(exports3, module) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n var utils = require_utils3();\n var BN = require_bn2();\n var inherits = require_inherits_browser();\n var Base = require_base();\n var assert9 = utils.assert;\n function ShortCurve(conf) {\n Base.call(this, \"short\", conf);\n this.a = new BN(conf.a, 16).toRed(this.red);\n this.b = new BN(conf.b, 16).toRed(this.red);\n this.tinv = this.two.redInvm();\n this.zeroA = this.a.fromRed().cmpn(0) === 0;\n this.threeA = this.a.fromRed().sub(this.p).cmpn(-3) === 0;\n this.endo = this._getEndomorphism(conf);\n this._endoWnafT1 = new Array(4);\n this._endoWnafT2 = new Array(4);\n }\n inherits(ShortCurve, Base);\n module.exports = ShortCurve;\n ShortCurve.prototype._getEndomorphism = function _getEndomorphism(conf) {\n if (!this.zeroA || !this.g || !this.n || this.p.modn(3) !== 1)\n return;\n var beta;\n var lambda;\n if (conf.beta) {\n beta = new BN(conf.beta, 16).toRed(this.red);\n } else {\n var betas = this._getEndoRoots(this.p);\n beta = betas[0].cmp(betas[1]) < 0 ? betas[0] : betas[1];\n beta = beta.toRed(this.red);\n }\n if (conf.lambda) {\n lambda = new BN(conf.lambda, 16);\n } else {\n var lambdas = this._getEndoRoots(this.n);\n if (this.g.mul(lambdas[0]).x.cmp(this.g.x.redMul(beta)) === 0) {\n lambda = lambdas[0];\n } else {\n lambda = lambdas[1];\n assert9(this.g.mul(lambda).x.cmp(this.g.x.redMul(beta)) === 0);\n }\n }\n var basis;\n if (conf.basis) {\n basis = conf.basis.map(function(vec) {\n return {\n a: new BN(vec.a, 16),\n b: new BN(vec.b, 16)\n };\n });\n } else {\n basis = this._getEndoBasis(lambda);\n }\n return {\n beta,\n lambda,\n basis\n };\n };\n ShortCurve.prototype._getEndoRoots = function _getEndoRoots(num2) {\n var red = num2 === this.p ? this.red : BN.mont(num2);\n var tinv = new BN(2).toRed(red).redInvm();\n var ntinv = tinv.redNeg();\n var s4 = new BN(3).toRed(red).redNeg().redSqrt().redMul(tinv);\n var l1 = ntinv.redAdd(s4).fromRed();\n var l22 = ntinv.redSub(s4).fromRed();\n return [l1, l22];\n };\n ShortCurve.prototype._getEndoBasis = function _getEndoBasis(lambda) {\n var aprxSqrt = this.n.ushrn(Math.floor(this.n.bitLength() / 2));\n var u2 = lambda;\n var v2 = this.n.clone();\n var x1 = new BN(1);\n var y1 = new BN(0);\n var x22 = new BN(0);\n var y22 = new BN(1);\n var a0;\n var b0;\n var a1;\n var b1;\n var a22;\n var b22;\n var prevR;\n var i3 = 0;\n var r2;\n var x4;\n while (u2.cmpn(0) !== 0) {\n var q3 = v2.div(u2);\n r2 = v2.sub(q3.mul(u2));\n x4 = x22.sub(q3.mul(x1));\n var y6 = y22.sub(q3.mul(y1));\n if (!a1 && r2.cmp(aprxSqrt) < 0) {\n a0 = prevR.neg();\n b0 = x1;\n a1 = r2.neg();\n b1 = x4;\n } else if (a1 && ++i3 === 2) {\n break;\n }\n prevR = r2;\n v2 = u2;\n u2 = r2;\n x22 = x1;\n x1 = x4;\n y22 = y1;\n y1 = y6;\n }\n a22 = r2.neg();\n b22 = x4;\n var len1 = a1.sqr().add(b1.sqr());\n var len2 = a22.sqr().add(b22.sqr());\n if (len2.cmp(len1) >= 0) {\n a22 = a0;\n b22 = b0;\n }\n if (a1.negative) {\n a1 = a1.neg();\n b1 = b1.neg();\n }\n if (a22.negative) {\n a22 = a22.neg();\n b22 = b22.neg();\n }\n return [\n { a: a1, b: b1 },\n { a: a22, b: b22 }\n ];\n };\n ShortCurve.prototype._endoSplit = function _endoSplit(k4) {\n var basis = this.endo.basis;\n var v1 = basis[0];\n var v2 = basis[1];\n var c1 = v2.b.mul(k4).divRound(this.n);\n var c22 = v1.b.neg().mul(k4).divRound(this.n);\n var p1 = c1.mul(v1.a);\n var p22 = c22.mul(v2.a);\n var q1 = c1.mul(v1.b);\n var q22 = c22.mul(v2.b);\n var k1 = k4.sub(p1).sub(p22);\n var k22 = q1.add(q22).neg();\n return { k1, k2: k22 };\n };\n ShortCurve.prototype.pointFromX = function pointFromX(x4, odd) {\n x4 = new BN(x4, 16);\n if (!x4.red)\n x4 = x4.toRed(this.red);\n var y22 = x4.redSqr().redMul(x4).redIAdd(x4.redMul(this.a)).redIAdd(this.b);\n var y6 = y22.redSqrt();\n if (y6.redSqr().redSub(y22).cmp(this.zero) !== 0)\n throw new Error(\"invalid point\");\n var isOdd = y6.fromRed().isOdd();\n if (odd && !isOdd || !odd && isOdd)\n y6 = y6.redNeg();\n return this.point(x4, y6);\n };\n ShortCurve.prototype.validate = function validate6(point) {\n if (point.inf)\n return true;\n var x4 = point.x;\n var y6 = point.y;\n var ax = this.a.redMul(x4);\n var rhs = x4.redSqr().redMul(x4).redIAdd(ax).redIAdd(this.b);\n return y6.redSqr().redISub(rhs).cmpn(0) === 0;\n };\n ShortCurve.prototype._endoWnafMulAdd = function _endoWnafMulAdd(points, coeffs, jacobianResult) {\n var npoints = this._endoWnafT1;\n var ncoeffs = this._endoWnafT2;\n for (var i3 = 0; i3 < points.length; i3++) {\n var split4 = this._endoSplit(coeffs[i3]);\n var p4 = points[i3];\n var beta = p4._getBeta();\n if (split4.k1.negative) {\n split4.k1.ineg();\n p4 = p4.neg(true);\n }\n if (split4.k2.negative) {\n split4.k2.ineg();\n beta = beta.neg(true);\n }\n npoints[i3 * 2] = p4;\n npoints[i3 * 2 + 1] = beta;\n ncoeffs[i3 * 2] = split4.k1;\n ncoeffs[i3 * 2 + 1] = split4.k2;\n }\n var res = this._wnafMulAdd(1, npoints, ncoeffs, i3 * 2, jacobianResult);\n for (var j2 = 0; j2 < i3 * 2; j2++) {\n npoints[j2] = null;\n ncoeffs[j2] = null;\n }\n return res;\n };\n function Point3(curve, x4, y6, isRed) {\n Base.BasePoint.call(this, curve, \"affine\");\n if (x4 === null && y6 === null) {\n this.x = null;\n this.y = null;\n this.inf = true;\n } else {\n this.x = new BN(x4, 16);\n this.y = new BN(y6, 16);\n if (isRed) {\n this.x.forceRed(this.curve.red);\n this.y.forceRed(this.curve.red);\n }\n if (!this.x.red)\n this.x = this.x.toRed(this.curve.red);\n if (!this.y.red)\n this.y = this.y.toRed(this.curve.red);\n this.inf = false;\n }\n }\n inherits(Point3, Base.BasePoint);\n ShortCurve.prototype.point = function point(x4, y6, isRed) {\n return new Point3(this, x4, y6, isRed);\n };\n ShortCurve.prototype.pointFromJSON = function pointFromJSON(obj, red) {\n return Point3.fromJSON(this, obj, red);\n };\n Point3.prototype._getBeta = function _getBeta() {\n if (!this.curve.endo)\n return;\n var pre = this.precomputed;\n if (pre && pre.beta)\n return pre.beta;\n var beta = this.curve.point(this.x.redMul(this.curve.endo.beta), this.y);\n if (pre) {\n var curve = this.curve;\n var endoMul = function(p4) {\n return curve.point(p4.x.redMul(curve.endo.beta), p4.y);\n };\n pre.beta = beta;\n beta.precomputed = {\n beta: null,\n naf: pre.naf && {\n wnd: pre.naf.wnd,\n points: pre.naf.points.map(endoMul)\n },\n doubles: pre.doubles && {\n step: pre.doubles.step,\n points: pre.doubles.points.map(endoMul)\n }\n };\n }\n return beta;\n };\n Point3.prototype.toJSON = function toJSON() {\n if (!this.precomputed)\n return [this.x, this.y];\n return [this.x, this.y, this.precomputed && {\n doubles: this.precomputed.doubles && {\n step: this.precomputed.doubles.step,\n points: this.precomputed.doubles.points.slice(1)\n },\n naf: this.precomputed.naf && {\n wnd: this.precomputed.naf.wnd,\n points: this.precomputed.naf.points.slice(1)\n }\n }];\n };\n Point3.fromJSON = function fromJSON(curve, obj, red) {\n if (typeof obj === \"string\")\n obj = JSON.parse(obj);\n var res = curve.point(obj[0], obj[1], red);\n if (!obj[2])\n return res;\n function obj2point(obj2) {\n return curve.point(obj2[0], obj2[1], red);\n }\n var pre = obj[2];\n res.precomputed = {\n beta: null,\n doubles: pre.doubles && {\n step: pre.doubles.step,\n points: [res].concat(pre.doubles.points.map(obj2point))\n },\n naf: pre.naf && {\n wnd: pre.naf.wnd,\n points: [res].concat(pre.naf.points.map(obj2point))\n }\n };\n return res;\n };\n Point3.prototype.inspect = function inspect() {\n if (this.isInfinity())\n return \"\";\n return \"\";\n };\n Point3.prototype.isInfinity = function isInfinity() {\n return this.inf;\n };\n Point3.prototype.add = function add2(p4) {\n if (this.inf)\n return p4;\n if (p4.inf)\n return this;\n if (this.eq(p4))\n return this.dbl();\n if (this.neg().eq(p4))\n return this.curve.point(null, null);\n if (this.x.cmp(p4.x) === 0)\n return this.curve.point(null, null);\n var c4 = this.y.redSub(p4.y);\n if (c4.cmpn(0) !== 0)\n c4 = c4.redMul(this.x.redSub(p4.x).redInvm());\n var nx = c4.redSqr().redISub(this.x).redISub(p4.x);\n var ny = c4.redMul(this.x.redSub(nx)).redISub(this.y);\n return this.curve.point(nx, ny);\n };\n Point3.prototype.dbl = function dbl() {\n if (this.inf)\n return this;\n var ys1 = this.y.redAdd(this.y);\n if (ys1.cmpn(0) === 0)\n return this.curve.point(null, null);\n var a3 = this.curve.a;\n var x22 = this.x.redSqr();\n var dyinv = ys1.redInvm();\n var c4 = x22.redAdd(x22).redIAdd(x22).redIAdd(a3).redMul(dyinv);\n var nx = c4.redSqr().redISub(this.x.redAdd(this.x));\n var ny = c4.redMul(this.x.redSub(nx)).redISub(this.y);\n return this.curve.point(nx, ny);\n };\n Point3.prototype.getX = function getX() {\n return this.x.fromRed();\n };\n Point3.prototype.getY = function getY() {\n return this.y.fromRed();\n };\n Point3.prototype.mul = function mul(k4) {\n k4 = new BN(k4, 16);\n if (this.isInfinity())\n return this;\n else if (this._hasDoubles(k4))\n return this.curve._fixedNafMul(this, k4);\n else if (this.curve.endo)\n return this.curve._endoWnafMulAdd([this], [k4]);\n else\n return this.curve._wnafMul(this, k4);\n };\n Point3.prototype.mulAdd = function mulAdd(k1, p22, k22) {\n var points = [this, p22];\n var coeffs = [k1, k22];\n if (this.curve.endo)\n return this.curve._endoWnafMulAdd(points, coeffs);\n else\n return this.curve._wnafMulAdd(1, points, coeffs, 2);\n };\n Point3.prototype.jmulAdd = function jmulAdd(k1, p22, k22) {\n var points = [this, p22];\n var coeffs = [k1, k22];\n if (this.curve.endo)\n return this.curve._endoWnafMulAdd(points, coeffs, true);\n else\n return this.curve._wnafMulAdd(1, points, coeffs, 2, true);\n };\n Point3.prototype.eq = function eq(p4) {\n return this === p4 || this.inf === p4.inf && (this.inf || this.x.cmp(p4.x) === 0 && this.y.cmp(p4.y) === 0);\n };\n Point3.prototype.neg = function neg(_precompute) {\n if (this.inf)\n return this;\n var res = this.curve.point(this.x, this.y.redNeg());\n if (_precompute && this.precomputed) {\n var pre = this.precomputed;\n var negate = function(p4) {\n return p4.neg();\n };\n res.precomputed = {\n naf: pre.naf && {\n wnd: pre.naf.wnd,\n points: pre.naf.points.map(negate)\n },\n doubles: pre.doubles && {\n step: pre.doubles.step,\n points: pre.doubles.points.map(negate)\n }\n };\n }\n return res;\n };\n Point3.prototype.toJ = function toJ() {\n if (this.inf)\n return this.curve.jpoint(null, null, null);\n var res = this.curve.jpoint(this.x, this.y, this.curve.one);\n return res;\n };\n function JPoint(curve, x4, y6, z2) {\n Base.BasePoint.call(this, curve, \"jacobian\");\n if (x4 === null && y6 === null && z2 === null) {\n this.x = this.curve.one;\n this.y = this.curve.one;\n this.z = new BN(0);\n } else {\n this.x = new BN(x4, 16);\n this.y = new BN(y6, 16);\n this.z = new BN(z2, 16);\n }\n if (!this.x.red)\n this.x = this.x.toRed(this.curve.red);\n if (!this.y.red)\n this.y = this.y.toRed(this.curve.red);\n if (!this.z.red)\n this.z = this.z.toRed(this.curve.red);\n this.zOne = this.z === this.curve.one;\n }\n inherits(JPoint, Base.BasePoint);\n ShortCurve.prototype.jpoint = function jpoint(x4, y6, z2) {\n return new JPoint(this, x4, y6, z2);\n };\n JPoint.prototype.toP = function toP() {\n if (this.isInfinity())\n return this.curve.point(null, null);\n var zinv = this.z.redInvm();\n var zinv2 = zinv.redSqr();\n var ax = this.x.redMul(zinv2);\n var ay = this.y.redMul(zinv2).redMul(zinv);\n return this.curve.point(ax, ay);\n };\n JPoint.prototype.neg = function neg() {\n return this.curve.jpoint(this.x, this.y.redNeg(), this.z);\n };\n JPoint.prototype.add = function add2(p4) {\n if (this.isInfinity())\n return p4;\n if (p4.isInfinity())\n return this;\n var pz2 = p4.z.redSqr();\n var z2 = this.z.redSqr();\n var u1 = this.x.redMul(pz2);\n var u2 = p4.x.redMul(z2);\n var s1 = this.y.redMul(pz2.redMul(p4.z));\n var s22 = p4.y.redMul(z2.redMul(this.z));\n var h4 = u1.redSub(u2);\n var r2 = s1.redSub(s22);\n if (h4.cmpn(0) === 0) {\n if (r2.cmpn(0) !== 0)\n return this.curve.jpoint(null, null, null);\n else\n return this.dbl();\n }\n var h22 = h4.redSqr();\n var h32 = h22.redMul(h4);\n var v2 = u1.redMul(h22);\n var nx = r2.redSqr().redIAdd(h32).redISub(v2).redISub(v2);\n var ny = r2.redMul(v2.redISub(nx)).redISub(s1.redMul(h32));\n var nz = this.z.redMul(p4.z).redMul(h4);\n return this.curve.jpoint(nx, ny, nz);\n };\n JPoint.prototype.mixedAdd = function mixedAdd(p4) {\n if (this.isInfinity())\n return p4.toJ();\n if (p4.isInfinity())\n return this;\n var z2 = this.z.redSqr();\n var u1 = this.x;\n var u2 = p4.x.redMul(z2);\n var s1 = this.y;\n var s22 = p4.y.redMul(z2).redMul(this.z);\n var h4 = u1.redSub(u2);\n var r2 = s1.redSub(s22);\n if (h4.cmpn(0) === 0) {\n if (r2.cmpn(0) !== 0)\n return this.curve.jpoint(null, null, null);\n else\n return this.dbl();\n }\n var h22 = h4.redSqr();\n var h32 = h22.redMul(h4);\n var v2 = u1.redMul(h22);\n var nx = r2.redSqr().redIAdd(h32).redISub(v2).redISub(v2);\n var ny = r2.redMul(v2.redISub(nx)).redISub(s1.redMul(h32));\n var nz = this.z.redMul(h4);\n return this.curve.jpoint(nx, ny, nz);\n };\n JPoint.prototype.dblp = function dblp(pow) {\n if (pow === 0)\n return this;\n if (this.isInfinity())\n return this;\n if (!pow)\n return this.dbl();\n var i3;\n if (this.curve.zeroA || this.curve.threeA) {\n var r2 = this;\n for (i3 = 0; i3 < pow; i3++)\n r2 = r2.dbl();\n return r2;\n }\n var a3 = this.curve.a;\n var tinv = this.curve.tinv;\n var jx = this.x;\n var jy = this.y;\n var jz = this.z;\n var jz4 = jz.redSqr().redSqr();\n var jyd = jy.redAdd(jy);\n for (i3 = 0; i3 < pow; i3++) {\n var jx2 = jx.redSqr();\n var jyd2 = jyd.redSqr();\n var jyd4 = jyd2.redSqr();\n var c4 = jx2.redAdd(jx2).redIAdd(jx2).redIAdd(a3.redMul(jz4));\n var t1 = jx.redMul(jyd2);\n var nx = c4.redSqr().redISub(t1.redAdd(t1));\n var t22 = t1.redISub(nx);\n var dny = c4.redMul(t22);\n dny = dny.redIAdd(dny).redISub(jyd4);\n var nz = jyd.redMul(jz);\n if (i3 + 1 < pow)\n jz4 = jz4.redMul(jyd4);\n jx = nx;\n jz = nz;\n jyd = dny;\n }\n return this.curve.jpoint(jx, jyd.redMul(tinv), jz);\n };\n JPoint.prototype.dbl = function dbl() {\n if (this.isInfinity())\n return this;\n if (this.curve.zeroA)\n return this._zeroDbl();\n else if (this.curve.threeA)\n return this._threeDbl();\n else\n return this._dbl();\n };\n JPoint.prototype._zeroDbl = function _zeroDbl() {\n var nx;\n var ny;\n var nz;\n if (this.zOne) {\n var xx = this.x.redSqr();\n var yy = this.y.redSqr();\n var yyyy = yy.redSqr();\n var s4 = this.x.redAdd(yy).redSqr().redISub(xx).redISub(yyyy);\n s4 = s4.redIAdd(s4);\n var m2 = xx.redAdd(xx).redIAdd(xx);\n var t3 = m2.redSqr().redISub(s4).redISub(s4);\n var yyyy8 = yyyy.redIAdd(yyyy);\n yyyy8 = yyyy8.redIAdd(yyyy8);\n yyyy8 = yyyy8.redIAdd(yyyy8);\n nx = t3;\n ny = m2.redMul(s4.redISub(t3)).redISub(yyyy8);\n nz = this.y.redAdd(this.y);\n } else {\n var a3 = this.x.redSqr();\n var b4 = this.y.redSqr();\n var c4 = b4.redSqr();\n var d5 = this.x.redAdd(b4).redSqr().redISub(a3).redISub(c4);\n d5 = d5.redIAdd(d5);\n var e3 = a3.redAdd(a3).redIAdd(a3);\n var f6 = e3.redSqr();\n var c8 = c4.redIAdd(c4);\n c8 = c8.redIAdd(c8);\n c8 = c8.redIAdd(c8);\n nx = f6.redISub(d5).redISub(d5);\n ny = e3.redMul(d5.redISub(nx)).redISub(c8);\n nz = this.y.redMul(this.z);\n nz = nz.redIAdd(nz);\n }\n return this.curve.jpoint(nx, ny, nz);\n };\n JPoint.prototype._threeDbl = function _threeDbl() {\n var nx;\n var ny;\n var nz;\n if (this.zOne) {\n var xx = this.x.redSqr();\n var yy = this.y.redSqr();\n var yyyy = yy.redSqr();\n var s4 = this.x.redAdd(yy).redSqr().redISub(xx).redISub(yyyy);\n s4 = s4.redIAdd(s4);\n var m2 = xx.redAdd(xx).redIAdd(xx).redIAdd(this.curve.a);\n var t3 = m2.redSqr().redISub(s4).redISub(s4);\n nx = t3;\n var yyyy8 = yyyy.redIAdd(yyyy);\n yyyy8 = yyyy8.redIAdd(yyyy8);\n yyyy8 = yyyy8.redIAdd(yyyy8);\n ny = m2.redMul(s4.redISub(t3)).redISub(yyyy8);\n nz = this.y.redAdd(this.y);\n } else {\n var delta = this.z.redSqr();\n var gamma = this.y.redSqr();\n var beta = this.x.redMul(gamma);\n var alpha = this.x.redSub(delta).redMul(this.x.redAdd(delta));\n alpha = alpha.redAdd(alpha).redIAdd(alpha);\n var beta4 = beta.redIAdd(beta);\n beta4 = beta4.redIAdd(beta4);\n var beta8 = beta4.redAdd(beta4);\n nx = alpha.redSqr().redISub(beta8);\n nz = this.y.redAdd(this.z).redSqr().redISub(gamma).redISub(delta);\n var ggamma8 = gamma.redSqr();\n ggamma8 = ggamma8.redIAdd(ggamma8);\n ggamma8 = ggamma8.redIAdd(ggamma8);\n ggamma8 = ggamma8.redIAdd(ggamma8);\n ny = alpha.redMul(beta4.redISub(nx)).redISub(ggamma8);\n }\n return this.curve.jpoint(nx, ny, nz);\n };\n JPoint.prototype._dbl = function _dbl() {\n var a3 = this.curve.a;\n var jx = this.x;\n var jy = this.y;\n var jz = this.z;\n var jz4 = jz.redSqr().redSqr();\n var jx2 = jx.redSqr();\n var jy2 = jy.redSqr();\n var c4 = jx2.redAdd(jx2).redIAdd(jx2).redIAdd(a3.redMul(jz4));\n var jxd4 = jx.redAdd(jx);\n jxd4 = jxd4.redIAdd(jxd4);\n var t1 = jxd4.redMul(jy2);\n var nx = c4.redSqr().redISub(t1.redAdd(t1));\n var t22 = t1.redISub(nx);\n var jyd8 = jy2.redSqr();\n jyd8 = jyd8.redIAdd(jyd8);\n jyd8 = jyd8.redIAdd(jyd8);\n jyd8 = jyd8.redIAdd(jyd8);\n var ny = c4.redMul(t22).redISub(jyd8);\n var nz = jy.redAdd(jy).redMul(jz);\n return this.curve.jpoint(nx, ny, nz);\n };\n JPoint.prototype.trpl = function trpl() {\n if (!this.curve.zeroA)\n return this.dbl().add(this);\n var xx = this.x.redSqr();\n var yy = this.y.redSqr();\n var zz = this.z.redSqr();\n var yyyy = yy.redSqr();\n var m2 = xx.redAdd(xx).redIAdd(xx);\n var mm = m2.redSqr();\n var e3 = this.x.redAdd(yy).redSqr().redISub(xx).redISub(yyyy);\n e3 = e3.redIAdd(e3);\n e3 = e3.redAdd(e3).redIAdd(e3);\n e3 = e3.redISub(mm);\n var ee = e3.redSqr();\n var t3 = yyyy.redIAdd(yyyy);\n t3 = t3.redIAdd(t3);\n t3 = t3.redIAdd(t3);\n t3 = t3.redIAdd(t3);\n var u2 = m2.redIAdd(e3).redSqr().redISub(mm).redISub(ee).redISub(t3);\n var yyu4 = yy.redMul(u2);\n yyu4 = yyu4.redIAdd(yyu4);\n yyu4 = yyu4.redIAdd(yyu4);\n var nx = this.x.redMul(ee).redISub(yyu4);\n nx = nx.redIAdd(nx);\n nx = nx.redIAdd(nx);\n var ny = this.y.redMul(u2.redMul(t3.redISub(u2)).redISub(e3.redMul(ee)));\n ny = ny.redIAdd(ny);\n ny = ny.redIAdd(ny);\n ny = ny.redIAdd(ny);\n var nz = this.z.redAdd(e3).redSqr().redISub(zz).redISub(ee);\n return this.curve.jpoint(nx, ny, nz);\n };\n JPoint.prototype.mul = function mul(k4, kbase) {\n k4 = new BN(k4, kbase);\n return this.curve._wnafMul(this, k4);\n };\n JPoint.prototype.eq = function eq(p4) {\n if (p4.type === \"affine\")\n return this.eq(p4.toJ());\n if (this === p4)\n return true;\n var z2 = this.z.redSqr();\n var pz2 = p4.z.redSqr();\n if (this.x.redMul(pz2).redISub(p4.x.redMul(z2)).cmpn(0) !== 0)\n return false;\n var z3 = z2.redMul(this.z);\n var pz3 = pz2.redMul(p4.z);\n return this.y.redMul(pz3).redISub(p4.y.redMul(z3)).cmpn(0) === 0;\n };\n JPoint.prototype.eqXToP = function eqXToP(x4) {\n var zs = this.z.redSqr();\n var rx = x4.toRed(this.curve.red).redMul(zs);\n if (this.x.cmp(rx) === 0)\n return true;\n var xc = x4.clone();\n var t3 = this.curve.redN.redMul(zs);\n for (; ; ) {\n xc.iadd(this.curve.n);\n if (xc.cmp(this.curve.p) >= 0)\n return false;\n rx.redIAdd(t3);\n if (this.x.cmp(rx) === 0)\n return true;\n }\n };\n JPoint.prototype.inspect = function inspect() {\n if (this.isInfinity())\n return \"\";\n return \"\";\n };\n JPoint.prototype.isInfinity = function isInfinity() {\n return this.z.cmpn(0) === 0;\n };\n }\n });\n\n // ../../../node_modules/.pnpm/elliptic@6.6.1/node_modules/elliptic/lib/elliptic/curve/mont.js\n var require_mont = __commonJS({\n \"../../../node_modules/.pnpm/elliptic@6.6.1/node_modules/elliptic/lib/elliptic/curve/mont.js\"(exports3, module) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n var BN = require_bn2();\n var inherits = require_inherits_browser();\n var Base = require_base();\n var utils = require_utils3();\n function MontCurve(conf) {\n Base.call(this, \"mont\", conf);\n this.a = new BN(conf.a, 16).toRed(this.red);\n this.b = new BN(conf.b, 16).toRed(this.red);\n this.i4 = new BN(4).toRed(this.red).redInvm();\n this.two = new BN(2).toRed(this.red);\n this.a24 = this.i4.redMul(this.a.redAdd(this.two));\n }\n inherits(MontCurve, Base);\n module.exports = MontCurve;\n MontCurve.prototype.validate = function validate6(point) {\n var x4 = point.normalize().x;\n var x22 = x4.redSqr();\n var rhs = x22.redMul(x4).redAdd(x22.redMul(this.a)).redAdd(x4);\n var y6 = rhs.redSqrt();\n return y6.redSqr().cmp(rhs) === 0;\n };\n function Point3(curve, x4, z2) {\n Base.BasePoint.call(this, curve, \"projective\");\n if (x4 === null && z2 === null) {\n this.x = this.curve.one;\n this.z = this.curve.zero;\n } else {\n this.x = new BN(x4, 16);\n this.z = new BN(z2, 16);\n if (!this.x.red)\n this.x = this.x.toRed(this.curve.red);\n if (!this.z.red)\n this.z = this.z.toRed(this.curve.red);\n }\n }\n inherits(Point3, Base.BasePoint);\n MontCurve.prototype.decodePoint = function decodePoint(bytes, enc) {\n return this.point(utils.toArray(bytes, enc), 1);\n };\n MontCurve.prototype.point = function point(x4, z2) {\n return new Point3(this, x4, z2);\n };\n MontCurve.prototype.pointFromJSON = function pointFromJSON(obj) {\n return Point3.fromJSON(this, obj);\n };\n Point3.prototype.precompute = function precompute() {\n };\n Point3.prototype._encode = function _encode() {\n return this.getX().toArray(\"be\", this.curve.p.byteLength());\n };\n Point3.fromJSON = function fromJSON(curve, obj) {\n return new Point3(curve, obj[0], obj[1] || curve.one);\n };\n Point3.prototype.inspect = function inspect() {\n if (this.isInfinity())\n return \"\";\n return \"\";\n };\n Point3.prototype.isInfinity = function isInfinity() {\n return this.z.cmpn(0) === 0;\n };\n Point3.prototype.dbl = function dbl() {\n var a3 = this.x.redAdd(this.z);\n var aa = a3.redSqr();\n var b4 = this.x.redSub(this.z);\n var bb = b4.redSqr();\n var c4 = aa.redSub(bb);\n var nx = aa.redMul(bb);\n var nz = c4.redMul(bb.redAdd(this.curve.a24.redMul(c4)));\n return this.curve.point(nx, nz);\n };\n Point3.prototype.add = function add2() {\n throw new Error(\"Not supported on Montgomery curve\");\n };\n Point3.prototype.diffAdd = function diffAdd(p4, diff) {\n var a3 = this.x.redAdd(this.z);\n var b4 = this.x.redSub(this.z);\n var c4 = p4.x.redAdd(p4.z);\n var d5 = p4.x.redSub(p4.z);\n var da = d5.redMul(a3);\n var cb = c4.redMul(b4);\n var nx = diff.z.redMul(da.redAdd(cb).redSqr());\n var nz = diff.x.redMul(da.redISub(cb).redSqr());\n return this.curve.point(nx, nz);\n };\n Point3.prototype.mul = function mul(k4) {\n var t3 = k4.clone();\n var a3 = this;\n var b4 = this.curve.point(null, null);\n var c4 = this;\n for (var bits = []; t3.cmpn(0) !== 0; t3.iushrn(1))\n bits.push(t3.andln(1));\n for (var i3 = bits.length - 1; i3 >= 0; i3--) {\n if (bits[i3] === 0) {\n a3 = a3.diffAdd(b4, c4);\n b4 = b4.dbl();\n } else {\n b4 = a3.diffAdd(b4, c4);\n a3 = a3.dbl();\n }\n }\n return b4;\n };\n Point3.prototype.mulAdd = function mulAdd() {\n throw new Error(\"Not supported on Montgomery curve\");\n };\n Point3.prototype.jumlAdd = function jumlAdd() {\n throw new Error(\"Not supported on Montgomery curve\");\n };\n Point3.prototype.eq = function eq(other) {\n return this.getX().cmp(other.getX()) === 0;\n };\n Point3.prototype.normalize = function normalize2() {\n this.x = this.x.redMul(this.z.redInvm());\n this.z = this.curve.one;\n return this;\n };\n Point3.prototype.getX = function getX() {\n this.normalize();\n return this.x.fromRed();\n };\n }\n });\n\n // ../../../node_modules/.pnpm/elliptic@6.6.1/node_modules/elliptic/lib/elliptic/curve/edwards.js\n var require_edwards = __commonJS({\n \"../../../node_modules/.pnpm/elliptic@6.6.1/node_modules/elliptic/lib/elliptic/curve/edwards.js\"(exports3, module) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n var utils = require_utils3();\n var BN = require_bn2();\n var inherits = require_inherits_browser();\n var Base = require_base();\n var assert9 = utils.assert;\n function EdwardsCurve(conf) {\n this.twisted = (conf.a | 0) !== 1;\n this.mOneA = this.twisted && (conf.a | 0) === -1;\n this.extended = this.mOneA;\n Base.call(this, \"edwards\", conf);\n this.a = new BN(conf.a, 16).umod(this.red.m);\n this.a = this.a.toRed(this.red);\n this.c = new BN(conf.c, 16).toRed(this.red);\n this.c2 = this.c.redSqr();\n this.d = new BN(conf.d, 16).toRed(this.red);\n this.dd = this.d.redAdd(this.d);\n assert9(!this.twisted || this.c.fromRed().cmpn(1) === 0);\n this.oneC = (conf.c | 0) === 1;\n }\n inherits(EdwardsCurve, Base);\n module.exports = EdwardsCurve;\n EdwardsCurve.prototype._mulA = function _mulA(num2) {\n if (this.mOneA)\n return num2.redNeg();\n else\n return this.a.redMul(num2);\n };\n EdwardsCurve.prototype._mulC = function _mulC(num2) {\n if (this.oneC)\n return num2;\n else\n return this.c.redMul(num2);\n };\n EdwardsCurve.prototype.jpoint = function jpoint(x4, y6, z2, t3) {\n return this.point(x4, y6, z2, t3);\n };\n EdwardsCurve.prototype.pointFromX = function pointFromX(x4, odd) {\n x4 = new BN(x4, 16);\n if (!x4.red)\n x4 = x4.toRed(this.red);\n var x22 = x4.redSqr();\n var rhs = this.c2.redSub(this.a.redMul(x22));\n var lhs = this.one.redSub(this.c2.redMul(this.d).redMul(x22));\n var y22 = rhs.redMul(lhs.redInvm());\n var y6 = y22.redSqrt();\n if (y6.redSqr().redSub(y22).cmp(this.zero) !== 0)\n throw new Error(\"invalid point\");\n var isOdd = y6.fromRed().isOdd();\n if (odd && !isOdd || !odd && isOdd)\n y6 = y6.redNeg();\n return this.point(x4, y6);\n };\n EdwardsCurve.prototype.pointFromY = function pointFromY(y6, odd) {\n y6 = new BN(y6, 16);\n if (!y6.red)\n y6 = y6.toRed(this.red);\n var y22 = y6.redSqr();\n var lhs = y22.redSub(this.c2);\n var rhs = y22.redMul(this.d).redMul(this.c2).redSub(this.a);\n var x22 = lhs.redMul(rhs.redInvm());\n if (x22.cmp(this.zero) === 0) {\n if (odd)\n throw new Error(\"invalid point\");\n else\n return this.point(this.zero, y6);\n }\n var x4 = x22.redSqrt();\n if (x4.redSqr().redSub(x22).cmp(this.zero) !== 0)\n throw new Error(\"invalid point\");\n if (x4.fromRed().isOdd() !== odd)\n x4 = x4.redNeg();\n return this.point(x4, y6);\n };\n EdwardsCurve.prototype.validate = function validate6(point) {\n if (point.isInfinity())\n return true;\n point.normalize();\n var x22 = point.x.redSqr();\n var y22 = point.y.redSqr();\n var lhs = x22.redMul(this.a).redAdd(y22);\n var rhs = this.c2.redMul(this.one.redAdd(this.d.redMul(x22).redMul(y22)));\n return lhs.cmp(rhs) === 0;\n };\n function Point3(curve, x4, y6, z2, t3) {\n Base.BasePoint.call(this, curve, \"projective\");\n if (x4 === null && y6 === null && z2 === null) {\n this.x = this.curve.zero;\n this.y = this.curve.one;\n this.z = this.curve.one;\n this.t = this.curve.zero;\n this.zOne = true;\n } else {\n this.x = new BN(x4, 16);\n this.y = new BN(y6, 16);\n this.z = z2 ? new BN(z2, 16) : this.curve.one;\n this.t = t3 && new BN(t3, 16);\n if (!this.x.red)\n this.x = this.x.toRed(this.curve.red);\n if (!this.y.red)\n this.y = this.y.toRed(this.curve.red);\n if (!this.z.red)\n this.z = this.z.toRed(this.curve.red);\n if (this.t && !this.t.red)\n this.t = this.t.toRed(this.curve.red);\n this.zOne = this.z === this.curve.one;\n if (this.curve.extended && !this.t) {\n this.t = this.x.redMul(this.y);\n if (!this.zOne)\n this.t = this.t.redMul(this.z.redInvm());\n }\n }\n }\n inherits(Point3, Base.BasePoint);\n EdwardsCurve.prototype.pointFromJSON = function pointFromJSON(obj) {\n return Point3.fromJSON(this, obj);\n };\n EdwardsCurve.prototype.point = function point(x4, y6, z2, t3) {\n return new Point3(this, x4, y6, z2, t3);\n };\n Point3.fromJSON = function fromJSON(curve, obj) {\n return new Point3(curve, obj[0], obj[1], obj[2]);\n };\n Point3.prototype.inspect = function inspect() {\n if (this.isInfinity())\n return \"\";\n return \"\";\n };\n Point3.prototype.isInfinity = function isInfinity() {\n return this.x.cmpn(0) === 0 && (this.y.cmp(this.z) === 0 || this.zOne && this.y.cmp(this.curve.c) === 0);\n };\n Point3.prototype._extDbl = function _extDbl() {\n var a3 = this.x.redSqr();\n var b4 = this.y.redSqr();\n var c4 = this.z.redSqr();\n c4 = c4.redIAdd(c4);\n var d5 = this.curve._mulA(a3);\n var e3 = this.x.redAdd(this.y).redSqr().redISub(a3).redISub(b4);\n var g4 = d5.redAdd(b4);\n var f6 = g4.redSub(c4);\n var h4 = d5.redSub(b4);\n var nx = e3.redMul(f6);\n var ny = g4.redMul(h4);\n var nt = e3.redMul(h4);\n var nz = f6.redMul(g4);\n return this.curve.point(nx, ny, nz, nt);\n };\n Point3.prototype._projDbl = function _projDbl() {\n var b4 = this.x.redAdd(this.y).redSqr();\n var c4 = this.x.redSqr();\n var d5 = this.y.redSqr();\n var nx;\n var ny;\n var nz;\n var e3;\n var h4;\n var j2;\n if (this.curve.twisted) {\n e3 = this.curve._mulA(c4);\n var f6 = e3.redAdd(d5);\n if (this.zOne) {\n nx = b4.redSub(c4).redSub(d5).redMul(f6.redSub(this.curve.two));\n ny = f6.redMul(e3.redSub(d5));\n nz = f6.redSqr().redSub(f6).redSub(f6);\n } else {\n h4 = this.z.redSqr();\n j2 = f6.redSub(h4).redISub(h4);\n nx = b4.redSub(c4).redISub(d5).redMul(j2);\n ny = f6.redMul(e3.redSub(d5));\n nz = f6.redMul(j2);\n }\n } else {\n e3 = c4.redAdd(d5);\n h4 = this.curve._mulC(this.z).redSqr();\n j2 = e3.redSub(h4).redSub(h4);\n nx = this.curve._mulC(b4.redISub(e3)).redMul(j2);\n ny = this.curve._mulC(e3).redMul(c4.redISub(d5));\n nz = e3.redMul(j2);\n }\n return this.curve.point(nx, ny, nz);\n };\n Point3.prototype.dbl = function dbl() {\n if (this.isInfinity())\n return this;\n if (this.curve.extended)\n return this._extDbl();\n else\n return this._projDbl();\n };\n Point3.prototype._extAdd = function _extAdd(p4) {\n var a3 = this.y.redSub(this.x).redMul(p4.y.redSub(p4.x));\n var b4 = this.y.redAdd(this.x).redMul(p4.y.redAdd(p4.x));\n var c4 = this.t.redMul(this.curve.dd).redMul(p4.t);\n var d5 = this.z.redMul(p4.z.redAdd(p4.z));\n var e3 = b4.redSub(a3);\n var f6 = d5.redSub(c4);\n var g4 = d5.redAdd(c4);\n var h4 = b4.redAdd(a3);\n var nx = e3.redMul(f6);\n var ny = g4.redMul(h4);\n var nt = e3.redMul(h4);\n var nz = f6.redMul(g4);\n return this.curve.point(nx, ny, nz, nt);\n };\n Point3.prototype._projAdd = function _projAdd(p4) {\n var a3 = this.z.redMul(p4.z);\n var b4 = a3.redSqr();\n var c4 = this.x.redMul(p4.x);\n var d5 = this.y.redMul(p4.y);\n var e3 = this.curve.d.redMul(c4).redMul(d5);\n var f6 = b4.redSub(e3);\n var g4 = b4.redAdd(e3);\n var tmp = this.x.redAdd(this.y).redMul(p4.x.redAdd(p4.y)).redISub(c4).redISub(d5);\n var nx = a3.redMul(f6).redMul(tmp);\n var ny;\n var nz;\n if (this.curve.twisted) {\n ny = a3.redMul(g4).redMul(d5.redSub(this.curve._mulA(c4)));\n nz = f6.redMul(g4);\n } else {\n ny = a3.redMul(g4).redMul(d5.redSub(c4));\n nz = this.curve._mulC(f6).redMul(g4);\n }\n return this.curve.point(nx, ny, nz);\n };\n Point3.prototype.add = function add2(p4) {\n if (this.isInfinity())\n return p4;\n if (p4.isInfinity())\n return this;\n if (this.curve.extended)\n return this._extAdd(p4);\n else\n return this._projAdd(p4);\n };\n Point3.prototype.mul = function mul(k4) {\n if (this._hasDoubles(k4))\n return this.curve._fixedNafMul(this, k4);\n else\n return this.curve._wnafMul(this, k4);\n };\n Point3.prototype.mulAdd = function mulAdd(k1, p4, k22) {\n return this.curve._wnafMulAdd(1, [this, p4], [k1, k22], 2, false);\n };\n Point3.prototype.jmulAdd = function jmulAdd(k1, p4, k22) {\n return this.curve._wnafMulAdd(1, [this, p4], [k1, k22], 2, true);\n };\n Point3.prototype.normalize = function normalize2() {\n if (this.zOne)\n return this;\n var zi = this.z.redInvm();\n this.x = this.x.redMul(zi);\n this.y = this.y.redMul(zi);\n if (this.t)\n this.t = this.t.redMul(zi);\n this.z = this.curve.one;\n this.zOne = true;\n return this;\n };\n Point3.prototype.neg = function neg() {\n return this.curve.point(\n this.x.redNeg(),\n this.y,\n this.z,\n this.t && this.t.redNeg()\n );\n };\n Point3.prototype.getX = function getX() {\n this.normalize();\n return this.x.fromRed();\n };\n Point3.prototype.getY = function getY() {\n this.normalize();\n return this.y.fromRed();\n };\n Point3.prototype.eq = function eq(other) {\n return this === other || this.getX().cmp(other.getX()) === 0 && this.getY().cmp(other.getY()) === 0;\n };\n Point3.prototype.eqXToP = function eqXToP(x4) {\n var rx = x4.toRed(this.curve.red).redMul(this.z);\n if (this.x.cmp(rx) === 0)\n return true;\n var xc = x4.clone();\n var t3 = this.curve.redN.redMul(this.z);\n for (; ; ) {\n xc.iadd(this.curve.n);\n if (xc.cmp(this.curve.p) >= 0)\n return false;\n rx.redIAdd(t3);\n if (this.x.cmp(rx) === 0)\n return true;\n }\n };\n Point3.prototype.toP = Point3.prototype.normalize;\n Point3.prototype.mixedAdd = Point3.prototype.add;\n }\n });\n\n // ../../../node_modules/.pnpm/elliptic@6.6.1/node_modules/elliptic/lib/elliptic/curve/index.js\n var require_curve = __commonJS({\n \"../../../node_modules/.pnpm/elliptic@6.6.1/node_modules/elliptic/lib/elliptic/curve/index.js\"(exports3) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n var curve = exports3;\n curve.base = require_base();\n curve.short = require_short();\n curve.mont = require_mont();\n curve.edwards = require_edwards();\n }\n });\n\n // ../../../node_modules/.pnpm/hash.js@1.1.7/node_modules/hash.js/lib/hash/utils.js\n var require_utils4 = __commonJS({\n \"../../../node_modules/.pnpm/hash.js@1.1.7/node_modules/hash.js/lib/hash/utils.js\"(exports3) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n var assert9 = require_minimalistic_assert();\n var inherits = require_inherits_browser();\n exports3.inherits = inherits;\n function isSurrogatePair(msg, i3) {\n if ((msg.charCodeAt(i3) & 64512) !== 55296) {\n return false;\n }\n if (i3 < 0 || i3 + 1 >= msg.length) {\n return false;\n }\n return (msg.charCodeAt(i3 + 1) & 64512) === 56320;\n }\n function toArray(msg, enc) {\n if (Array.isArray(msg))\n return msg.slice();\n if (!msg)\n return [];\n var res = [];\n if (typeof msg === \"string\") {\n if (!enc) {\n var p4 = 0;\n for (var i3 = 0; i3 < msg.length; i3++) {\n var c4 = msg.charCodeAt(i3);\n if (c4 < 128) {\n res[p4++] = c4;\n } else if (c4 < 2048) {\n res[p4++] = c4 >> 6 | 192;\n res[p4++] = c4 & 63 | 128;\n } else if (isSurrogatePair(msg, i3)) {\n c4 = 65536 + ((c4 & 1023) << 10) + (msg.charCodeAt(++i3) & 1023);\n res[p4++] = c4 >> 18 | 240;\n res[p4++] = c4 >> 12 & 63 | 128;\n res[p4++] = c4 >> 6 & 63 | 128;\n res[p4++] = c4 & 63 | 128;\n } else {\n res[p4++] = c4 >> 12 | 224;\n res[p4++] = c4 >> 6 & 63 | 128;\n res[p4++] = c4 & 63 | 128;\n }\n }\n } else if (enc === \"hex\") {\n msg = msg.replace(/[^a-z0-9]+/ig, \"\");\n if (msg.length % 2 !== 0)\n msg = \"0\" + msg;\n for (i3 = 0; i3 < msg.length; i3 += 2)\n res.push(parseInt(msg[i3] + msg[i3 + 1], 16));\n }\n } else {\n for (i3 = 0; i3 < msg.length; i3++)\n res[i3] = msg[i3] | 0;\n }\n return res;\n }\n exports3.toArray = toArray;\n function toHex3(msg) {\n var res = \"\";\n for (var i3 = 0; i3 < msg.length; i3++)\n res += zero2(msg[i3].toString(16));\n return res;\n }\n exports3.toHex = toHex3;\n function htonl(w3) {\n var res = w3 >>> 24 | w3 >>> 8 & 65280 | w3 << 8 & 16711680 | (w3 & 255) << 24;\n return res >>> 0;\n }\n exports3.htonl = htonl;\n function toHex32(msg, endian) {\n var res = \"\";\n for (var i3 = 0; i3 < msg.length; i3++) {\n var w3 = msg[i3];\n if (endian === \"little\")\n w3 = htonl(w3);\n res += zero8(w3.toString(16));\n }\n return res;\n }\n exports3.toHex32 = toHex32;\n function zero2(word) {\n if (word.length === 1)\n return \"0\" + word;\n else\n return word;\n }\n exports3.zero2 = zero2;\n function zero8(word) {\n if (word.length === 7)\n return \"0\" + word;\n else if (word.length === 6)\n return \"00\" + word;\n else if (word.length === 5)\n return \"000\" + word;\n else if (word.length === 4)\n return \"0000\" + word;\n else if (word.length === 3)\n return \"00000\" + word;\n else if (word.length === 2)\n return \"000000\" + word;\n else if (word.length === 1)\n return \"0000000\" + word;\n else\n return word;\n }\n exports3.zero8 = zero8;\n function join32(msg, start, end, endian) {\n var len = end - start;\n assert9(len % 4 === 0);\n var res = new Array(len / 4);\n for (var i3 = 0, k4 = start; i3 < res.length; i3++, k4 += 4) {\n var w3;\n if (endian === \"big\")\n w3 = msg[k4] << 24 | msg[k4 + 1] << 16 | msg[k4 + 2] << 8 | msg[k4 + 3];\n else\n w3 = msg[k4 + 3] << 24 | msg[k4 + 2] << 16 | msg[k4 + 1] << 8 | msg[k4];\n res[i3] = w3 >>> 0;\n }\n return res;\n }\n exports3.join32 = join32;\n function split32(msg, endian) {\n var res = new Array(msg.length * 4);\n for (var i3 = 0, k4 = 0; i3 < msg.length; i3++, k4 += 4) {\n var m2 = msg[i3];\n if (endian === \"big\") {\n res[k4] = m2 >>> 24;\n res[k4 + 1] = m2 >>> 16 & 255;\n res[k4 + 2] = m2 >>> 8 & 255;\n res[k4 + 3] = m2 & 255;\n } else {\n res[k4 + 3] = m2 >>> 24;\n res[k4 + 2] = m2 >>> 16 & 255;\n res[k4 + 1] = m2 >>> 8 & 255;\n res[k4] = m2 & 255;\n }\n }\n return res;\n }\n exports3.split32 = split32;\n function rotr32(w3, b4) {\n return w3 >>> b4 | w3 << 32 - b4;\n }\n exports3.rotr32 = rotr32;\n function rotl32(w3, b4) {\n return w3 << b4 | w3 >>> 32 - b4;\n }\n exports3.rotl32 = rotl32;\n function sum32(a3, b4) {\n return a3 + b4 >>> 0;\n }\n exports3.sum32 = sum32;\n function sum32_3(a3, b4, c4) {\n return a3 + b4 + c4 >>> 0;\n }\n exports3.sum32_3 = sum32_3;\n function sum32_4(a3, b4, c4, d5) {\n return a3 + b4 + c4 + d5 >>> 0;\n }\n exports3.sum32_4 = sum32_4;\n function sum32_5(a3, b4, c4, d5, e3) {\n return a3 + b4 + c4 + d5 + e3 >>> 0;\n }\n exports3.sum32_5 = sum32_5;\n function sum64(buf, pos, ah, al) {\n var bh = buf[pos];\n var bl = buf[pos + 1];\n var lo = al + bl >>> 0;\n var hi = (lo < al ? 1 : 0) + ah + bh;\n buf[pos] = hi >>> 0;\n buf[pos + 1] = lo;\n }\n exports3.sum64 = sum64;\n function sum64_hi(ah, al, bh, bl) {\n var lo = al + bl >>> 0;\n var hi = (lo < al ? 1 : 0) + ah + bh;\n return hi >>> 0;\n }\n exports3.sum64_hi = sum64_hi;\n function sum64_lo(ah, al, bh, bl) {\n var lo = al + bl;\n return lo >>> 0;\n }\n exports3.sum64_lo = sum64_lo;\n function sum64_4_hi(ah, al, bh, bl, ch, cl, dh, dl) {\n var carry = 0;\n var lo = al;\n lo = lo + bl >>> 0;\n carry += lo < al ? 1 : 0;\n lo = lo + cl >>> 0;\n carry += lo < cl ? 1 : 0;\n lo = lo + dl >>> 0;\n carry += lo < dl ? 1 : 0;\n var hi = ah + bh + ch + dh + carry;\n return hi >>> 0;\n }\n exports3.sum64_4_hi = sum64_4_hi;\n function sum64_4_lo(ah, al, bh, bl, ch, cl, dh, dl) {\n var lo = al + bl + cl + dl;\n return lo >>> 0;\n }\n exports3.sum64_4_lo = sum64_4_lo;\n function sum64_5_hi(ah, al, bh, bl, ch, cl, dh, dl, eh, el) {\n var carry = 0;\n var lo = al;\n lo = lo + bl >>> 0;\n carry += lo < al ? 1 : 0;\n lo = lo + cl >>> 0;\n carry += lo < cl ? 1 : 0;\n lo = lo + dl >>> 0;\n carry += lo < dl ? 1 : 0;\n lo = lo + el >>> 0;\n carry += lo < el ? 1 : 0;\n var hi = ah + bh + ch + dh + eh + carry;\n return hi >>> 0;\n }\n exports3.sum64_5_hi = sum64_5_hi;\n function sum64_5_lo(ah, al, bh, bl, ch, cl, dh, dl, eh, el) {\n var lo = al + bl + cl + dl + el;\n return lo >>> 0;\n }\n exports3.sum64_5_lo = sum64_5_lo;\n function rotr64_hi(ah, al, num2) {\n var r2 = al << 32 - num2 | ah >>> num2;\n return r2 >>> 0;\n }\n exports3.rotr64_hi = rotr64_hi;\n function rotr64_lo(ah, al, num2) {\n var r2 = ah << 32 - num2 | al >>> num2;\n return r2 >>> 0;\n }\n exports3.rotr64_lo = rotr64_lo;\n function shr64_hi(ah, al, num2) {\n return ah >>> num2;\n }\n exports3.shr64_hi = shr64_hi;\n function shr64_lo(ah, al, num2) {\n var r2 = ah << 32 - num2 | al >>> num2;\n return r2 >>> 0;\n }\n exports3.shr64_lo = shr64_lo;\n }\n });\n\n // ../../../node_modules/.pnpm/hash.js@1.1.7/node_modules/hash.js/lib/hash/common.js\n var require_common = __commonJS({\n \"../../../node_modules/.pnpm/hash.js@1.1.7/node_modules/hash.js/lib/hash/common.js\"(exports3) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n var utils = require_utils4();\n var assert9 = require_minimalistic_assert();\n function BlockHash() {\n this.pending = null;\n this.pendingTotal = 0;\n this.blockSize = this.constructor.blockSize;\n this.outSize = this.constructor.outSize;\n this.hmacStrength = this.constructor.hmacStrength;\n this.padLength = this.constructor.padLength / 8;\n this.endian = \"big\";\n this._delta8 = this.blockSize / 8;\n this._delta32 = this.blockSize / 32;\n }\n exports3.BlockHash = BlockHash;\n BlockHash.prototype.update = function update(msg, enc) {\n msg = utils.toArray(msg, enc);\n if (!this.pending)\n this.pending = msg;\n else\n this.pending = this.pending.concat(msg);\n this.pendingTotal += msg.length;\n if (this.pending.length >= this._delta8) {\n msg = this.pending;\n var r2 = msg.length % this._delta8;\n this.pending = msg.slice(msg.length - r2, msg.length);\n if (this.pending.length === 0)\n this.pending = null;\n msg = utils.join32(msg, 0, msg.length - r2, this.endian);\n for (var i3 = 0; i3 < msg.length; i3 += this._delta32)\n this._update(msg, i3, i3 + this._delta32);\n }\n return this;\n };\n BlockHash.prototype.digest = function digest(enc) {\n this.update(this._pad());\n assert9(this.pending === null);\n return this._digest(enc);\n };\n BlockHash.prototype._pad = function pad6() {\n var len = this.pendingTotal;\n var bytes = this._delta8;\n var k4 = bytes - (len + this.padLength) % bytes;\n var res = new Array(k4 + this.padLength);\n res[0] = 128;\n for (var i3 = 1; i3 < k4; i3++)\n res[i3] = 0;\n len <<= 3;\n if (this.endian === \"big\") {\n for (var t3 = 8; t3 < this.padLength; t3++)\n res[i3++] = 0;\n res[i3++] = 0;\n res[i3++] = 0;\n res[i3++] = 0;\n res[i3++] = 0;\n res[i3++] = len >>> 24 & 255;\n res[i3++] = len >>> 16 & 255;\n res[i3++] = len >>> 8 & 255;\n res[i3++] = len & 255;\n } else {\n res[i3++] = len & 255;\n res[i3++] = len >>> 8 & 255;\n res[i3++] = len >>> 16 & 255;\n res[i3++] = len >>> 24 & 255;\n res[i3++] = 0;\n res[i3++] = 0;\n res[i3++] = 0;\n res[i3++] = 0;\n for (t3 = 8; t3 < this.padLength; t3++)\n res[i3++] = 0;\n }\n return res;\n };\n }\n });\n\n // ../../../node_modules/.pnpm/hash.js@1.1.7/node_modules/hash.js/lib/hash/sha/common.js\n var require_common2 = __commonJS({\n \"../../../node_modules/.pnpm/hash.js@1.1.7/node_modules/hash.js/lib/hash/sha/common.js\"(exports3) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n var utils = require_utils4();\n var rotr32 = utils.rotr32;\n function ft_1(s4, x4, y6, z2) {\n if (s4 === 0)\n return ch32(x4, y6, z2);\n if (s4 === 1 || s4 === 3)\n return p32(x4, y6, z2);\n if (s4 === 2)\n return maj32(x4, y6, z2);\n }\n exports3.ft_1 = ft_1;\n function ch32(x4, y6, z2) {\n return x4 & y6 ^ ~x4 & z2;\n }\n exports3.ch32 = ch32;\n function maj32(x4, y6, z2) {\n return x4 & y6 ^ x4 & z2 ^ y6 & z2;\n }\n exports3.maj32 = maj32;\n function p32(x4, y6, z2) {\n return x4 ^ y6 ^ z2;\n }\n exports3.p32 = p32;\n function s0_256(x4) {\n return rotr32(x4, 2) ^ rotr32(x4, 13) ^ rotr32(x4, 22);\n }\n exports3.s0_256 = s0_256;\n function s1_256(x4) {\n return rotr32(x4, 6) ^ rotr32(x4, 11) ^ rotr32(x4, 25);\n }\n exports3.s1_256 = s1_256;\n function g0_256(x4) {\n return rotr32(x4, 7) ^ rotr32(x4, 18) ^ x4 >>> 3;\n }\n exports3.g0_256 = g0_256;\n function g1_256(x4) {\n return rotr32(x4, 17) ^ rotr32(x4, 19) ^ x4 >>> 10;\n }\n exports3.g1_256 = g1_256;\n }\n });\n\n // ../../../node_modules/.pnpm/hash.js@1.1.7/node_modules/hash.js/lib/hash/sha/1.js\n var require__ = __commonJS({\n \"../../../node_modules/.pnpm/hash.js@1.1.7/node_modules/hash.js/lib/hash/sha/1.js\"(exports3, module) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n var utils = require_utils4();\n var common = require_common();\n var shaCommon = require_common2();\n var rotl32 = utils.rotl32;\n var sum32 = utils.sum32;\n var sum32_5 = utils.sum32_5;\n var ft_1 = shaCommon.ft_1;\n var BlockHash = common.BlockHash;\n var sha1_K = [\n 1518500249,\n 1859775393,\n 2400959708,\n 3395469782\n ];\n function SHA1() {\n if (!(this instanceof SHA1))\n return new SHA1();\n BlockHash.call(this);\n this.h = [\n 1732584193,\n 4023233417,\n 2562383102,\n 271733878,\n 3285377520\n ];\n this.W = new Array(80);\n }\n utils.inherits(SHA1, BlockHash);\n module.exports = SHA1;\n SHA1.blockSize = 512;\n SHA1.outSize = 160;\n SHA1.hmacStrength = 80;\n SHA1.padLength = 64;\n SHA1.prototype._update = function _update(msg, start) {\n var W = this.W;\n for (var i3 = 0; i3 < 16; i3++)\n W[i3] = msg[start + i3];\n for (; i3 < W.length; i3++)\n W[i3] = rotl32(W[i3 - 3] ^ W[i3 - 8] ^ W[i3 - 14] ^ W[i3 - 16], 1);\n var a3 = this.h[0];\n var b4 = this.h[1];\n var c4 = this.h[2];\n var d5 = this.h[3];\n var e3 = this.h[4];\n for (i3 = 0; i3 < W.length; i3++) {\n var s4 = ~~(i3 / 20);\n var t3 = sum32_5(rotl32(a3, 5), ft_1(s4, b4, c4, d5), e3, W[i3], sha1_K[s4]);\n e3 = d5;\n d5 = c4;\n c4 = rotl32(b4, 30);\n b4 = a3;\n a3 = t3;\n }\n this.h[0] = sum32(this.h[0], a3);\n this.h[1] = sum32(this.h[1], b4);\n this.h[2] = sum32(this.h[2], c4);\n this.h[3] = sum32(this.h[3], d5);\n this.h[4] = sum32(this.h[4], e3);\n };\n SHA1.prototype._digest = function digest(enc) {\n if (enc === \"hex\")\n return utils.toHex32(this.h, \"big\");\n else\n return utils.split32(this.h, \"big\");\n };\n }\n });\n\n // ../../../node_modules/.pnpm/hash.js@1.1.7/node_modules/hash.js/lib/hash/sha/256.js\n var require__2 = __commonJS({\n \"../../../node_modules/.pnpm/hash.js@1.1.7/node_modules/hash.js/lib/hash/sha/256.js\"(exports3, module) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n var utils = require_utils4();\n var common = require_common();\n var shaCommon = require_common2();\n var assert9 = require_minimalistic_assert();\n var sum32 = utils.sum32;\n var sum32_4 = utils.sum32_4;\n var sum32_5 = utils.sum32_5;\n var ch32 = shaCommon.ch32;\n var maj32 = shaCommon.maj32;\n var s0_256 = shaCommon.s0_256;\n var s1_256 = shaCommon.s1_256;\n var g0_256 = shaCommon.g0_256;\n var g1_256 = shaCommon.g1_256;\n var BlockHash = common.BlockHash;\n var sha256_K = [\n 1116352408,\n 1899447441,\n 3049323471,\n 3921009573,\n 961987163,\n 1508970993,\n 2453635748,\n 2870763221,\n 3624381080,\n 310598401,\n 607225278,\n 1426881987,\n 1925078388,\n 2162078206,\n 2614888103,\n 3248222580,\n 3835390401,\n 4022224774,\n 264347078,\n 604807628,\n 770255983,\n 1249150122,\n 1555081692,\n 1996064986,\n 2554220882,\n 2821834349,\n 2952996808,\n 3210313671,\n 3336571891,\n 3584528711,\n 113926993,\n 338241895,\n 666307205,\n 773529912,\n 1294757372,\n 1396182291,\n 1695183700,\n 1986661051,\n 2177026350,\n 2456956037,\n 2730485921,\n 2820302411,\n 3259730800,\n 3345764771,\n 3516065817,\n 3600352804,\n 4094571909,\n 275423344,\n 430227734,\n 506948616,\n 659060556,\n 883997877,\n 958139571,\n 1322822218,\n 1537002063,\n 1747873779,\n 1955562222,\n 2024104815,\n 2227730452,\n 2361852424,\n 2428436474,\n 2756734187,\n 3204031479,\n 3329325298\n ];\n function SHA2562() {\n if (!(this instanceof SHA2562))\n return new SHA2562();\n BlockHash.call(this);\n this.h = [\n 1779033703,\n 3144134277,\n 1013904242,\n 2773480762,\n 1359893119,\n 2600822924,\n 528734635,\n 1541459225\n ];\n this.k = sha256_K;\n this.W = new Array(64);\n }\n utils.inherits(SHA2562, BlockHash);\n module.exports = SHA2562;\n SHA2562.blockSize = 512;\n SHA2562.outSize = 256;\n SHA2562.hmacStrength = 192;\n SHA2562.padLength = 64;\n SHA2562.prototype._update = function _update(msg, start) {\n var W = this.W;\n for (var i3 = 0; i3 < 16; i3++)\n W[i3] = msg[start + i3];\n for (; i3 < W.length; i3++)\n W[i3] = sum32_4(g1_256(W[i3 - 2]), W[i3 - 7], g0_256(W[i3 - 15]), W[i3 - 16]);\n var a3 = this.h[0];\n var b4 = this.h[1];\n var c4 = this.h[2];\n var d5 = this.h[3];\n var e3 = this.h[4];\n var f6 = this.h[5];\n var g4 = this.h[6];\n var h4 = this.h[7];\n assert9(this.k.length === W.length);\n for (i3 = 0; i3 < W.length; i3++) {\n var T1 = sum32_5(h4, s1_256(e3), ch32(e3, f6, g4), this.k[i3], W[i3]);\n var T22 = sum32(s0_256(a3), maj32(a3, b4, c4));\n h4 = g4;\n g4 = f6;\n f6 = e3;\n e3 = sum32(d5, T1);\n d5 = c4;\n c4 = b4;\n b4 = a3;\n a3 = sum32(T1, T22);\n }\n this.h[0] = sum32(this.h[0], a3);\n this.h[1] = sum32(this.h[1], b4);\n this.h[2] = sum32(this.h[2], c4);\n this.h[3] = sum32(this.h[3], d5);\n this.h[4] = sum32(this.h[4], e3);\n this.h[5] = sum32(this.h[5], f6);\n this.h[6] = sum32(this.h[6], g4);\n this.h[7] = sum32(this.h[7], h4);\n };\n SHA2562.prototype._digest = function digest(enc) {\n if (enc === \"hex\")\n return utils.toHex32(this.h, \"big\");\n else\n return utils.split32(this.h, \"big\");\n };\n }\n });\n\n // ../../../node_modules/.pnpm/hash.js@1.1.7/node_modules/hash.js/lib/hash/sha/224.js\n var require__3 = __commonJS({\n \"../../../node_modules/.pnpm/hash.js@1.1.7/node_modules/hash.js/lib/hash/sha/224.js\"(exports3, module) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n var utils = require_utils4();\n var SHA2562 = require__2();\n function SHA2242() {\n if (!(this instanceof SHA2242))\n return new SHA2242();\n SHA2562.call(this);\n this.h = [\n 3238371032,\n 914150663,\n 812702999,\n 4144912697,\n 4290775857,\n 1750603025,\n 1694076839,\n 3204075428\n ];\n }\n utils.inherits(SHA2242, SHA2562);\n module.exports = SHA2242;\n SHA2242.blockSize = 512;\n SHA2242.outSize = 224;\n SHA2242.hmacStrength = 192;\n SHA2242.padLength = 64;\n SHA2242.prototype._digest = function digest(enc) {\n if (enc === \"hex\")\n return utils.toHex32(this.h.slice(0, 7), \"big\");\n else\n return utils.split32(this.h.slice(0, 7), \"big\");\n };\n }\n });\n\n // ../../../node_modules/.pnpm/hash.js@1.1.7/node_modules/hash.js/lib/hash/sha/512.js\n var require__4 = __commonJS({\n \"../../../node_modules/.pnpm/hash.js@1.1.7/node_modules/hash.js/lib/hash/sha/512.js\"(exports3, module) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n var utils = require_utils4();\n var common = require_common();\n var assert9 = require_minimalistic_assert();\n var rotr64_hi = utils.rotr64_hi;\n var rotr64_lo = utils.rotr64_lo;\n var shr64_hi = utils.shr64_hi;\n var shr64_lo = utils.shr64_lo;\n var sum64 = utils.sum64;\n var sum64_hi = utils.sum64_hi;\n var sum64_lo = utils.sum64_lo;\n var sum64_4_hi = utils.sum64_4_hi;\n var sum64_4_lo = utils.sum64_4_lo;\n var sum64_5_hi = utils.sum64_5_hi;\n var sum64_5_lo = utils.sum64_5_lo;\n var BlockHash = common.BlockHash;\n var sha512_K = [\n 1116352408,\n 3609767458,\n 1899447441,\n 602891725,\n 3049323471,\n 3964484399,\n 3921009573,\n 2173295548,\n 961987163,\n 4081628472,\n 1508970993,\n 3053834265,\n 2453635748,\n 2937671579,\n 2870763221,\n 3664609560,\n 3624381080,\n 2734883394,\n 310598401,\n 1164996542,\n 607225278,\n 1323610764,\n 1426881987,\n 3590304994,\n 1925078388,\n 4068182383,\n 2162078206,\n 991336113,\n 2614888103,\n 633803317,\n 3248222580,\n 3479774868,\n 3835390401,\n 2666613458,\n 4022224774,\n 944711139,\n 264347078,\n 2341262773,\n 604807628,\n 2007800933,\n 770255983,\n 1495990901,\n 1249150122,\n 1856431235,\n 1555081692,\n 3175218132,\n 1996064986,\n 2198950837,\n 2554220882,\n 3999719339,\n 2821834349,\n 766784016,\n 2952996808,\n 2566594879,\n 3210313671,\n 3203337956,\n 3336571891,\n 1034457026,\n 3584528711,\n 2466948901,\n 113926993,\n 3758326383,\n 338241895,\n 168717936,\n 666307205,\n 1188179964,\n 773529912,\n 1546045734,\n 1294757372,\n 1522805485,\n 1396182291,\n 2643833823,\n 1695183700,\n 2343527390,\n 1986661051,\n 1014477480,\n 2177026350,\n 1206759142,\n 2456956037,\n 344077627,\n 2730485921,\n 1290863460,\n 2820302411,\n 3158454273,\n 3259730800,\n 3505952657,\n 3345764771,\n 106217008,\n 3516065817,\n 3606008344,\n 3600352804,\n 1432725776,\n 4094571909,\n 1467031594,\n 275423344,\n 851169720,\n 430227734,\n 3100823752,\n 506948616,\n 1363258195,\n 659060556,\n 3750685593,\n 883997877,\n 3785050280,\n 958139571,\n 3318307427,\n 1322822218,\n 3812723403,\n 1537002063,\n 2003034995,\n 1747873779,\n 3602036899,\n 1955562222,\n 1575990012,\n 2024104815,\n 1125592928,\n 2227730452,\n 2716904306,\n 2361852424,\n 442776044,\n 2428436474,\n 593698344,\n 2756734187,\n 3733110249,\n 3204031479,\n 2999351573,\n 3329325298,\n 3815920427,\n 3391569614,\n 3928383900,\n 3515267271,\n 566280711,\n 3940187606,\n 3454069534,\n 4118630271,\n 4000239992,\n 116418474,\n 1914138554,\n 174292421,\n 2731055270,\n 289380356,\n 3203993006,\n 460393269,\n 320620315,\n 685471733,\n 587496836,\n 852142971,\n 1086792851,\n 1017036298,\n 365543100,\n 1126000580,\n 2618297676,\n 1288033470,\n 3409855158,\n 1501505948,\n 4234509866,\n 1607167915,\n 987167468,\n 1816402316,\n 1246189591\n ];\n function SHA5122() {\n if (!(this instanceof SHA5122))\n return new SHA5122();\n BlockHash.call(this);\n this.h = [\n 1779033703,\n 4089235720,\n 3144134277,\n 2227873595,\n 1013904242,\n 4271175723,\n 2773480762,\n 1595750129,\n 1359893119,\n 2917565137,\n 2600822924,\n 725511199,\n 528734635,\n 4215389547,\n 1541459225,\n 327033209\n ];\n this.k = sha512_K;\n this.W = new Array(160);\n }\n utils.inherits(SHA5122, BlockHash);\n module.exports = SHA5122;\n SHA5122.blockSize = 1024;\n SHA5122.outSize = 512;\n SHA5122.hmacStrength = 192;\n SHA5122.padLength = 128;\n SHA5122.prototype._prepareBlock = function _prepareBlock(msg, start) {\n var W = this.W;\n for (var i3 = 0; i3 < 32; i3++)\n W[i3] = msg[start + i3];\n for (; i3 < W.length; i3 += 2) {\n var c0_hi = g1_512_hi(W[i3 - 4], W[i3 - 3]);\n var c0_lo = g1_512_lo(W[i3 - 4], W[i3 - 3]);\n var c1_hi = W[i3 - 14];\n var c1_lo = W[i3 - 13];\n var c2_hi = g0_512_hi(W[i3 - 30], W[i3 - 29]);\n var c2_lo = g0_512_lo(W[i3 - 30], W[i3 - 29]);\n var c3_hi = W[i3 - 32];\n var c3_lo = W[i3 - 31];\n W[i3] = sum64_4_hi(\n c0_hi,\n c0_lo,\n c1_hi,\n c1_lo,\n c2_hi,\n c2_lo,\n c3_hi,\n c3_lo\n );\n W[i3 + 1] = sum64_4_lo(\n c0_hi,\n c0_lo,\n c1_hi,\n c1_lo,\n c2_hi,\n c2_lo,\n c3_hi,\n c3_lo\n );\n }\n };\n SHA5122.prototype._update = function _update(msg, start) {\n this._prepareBlock(msg, start);\n var W = this.W;\n var ah = this.h[0];\n var al = this.h[1];\n var bh = this.h[2];\n var bl = this.h[3];\n var ch = this.h[4];\n var cl = this.h[5];\n var dh = this.h[6];\n var dl = this.h[7];\n var eh = this.h[8];\n var el = this.h[9];\n var fh = this.h[10];\n var fl = this.h[11];\n var gh = this.h[12];\n var gl = this.h[13];\n var hh = this.h[14];\n var hl = this.h[15];\n assert9(this.k.length === W.length);\n for (var i3 = 0; i3 < W.length; i3 += 2) {\n var c0_hi = hh;\n var c0_lo = hl;\n var c1_hi = s1_512_hi(eh, el);\n var c1_lo = s1_512_lo(eh, el);\n var c2_hi = ch64_hi(eh, el, fh, fl, gh, gl);\n var c2_lo = ch64_lo(eh, el, fh, fl, gh, gl);\n var c3_hi = this.k[i3];\n var c3_lo = this.k[i3 + 1];\n var c4_hi = W[i3];\n var c4_lo = W[i3 + 1];\n var T1_hi = sum64_5_hi(\n c0_hi,\n c0_lo,\n c1_hi,\n c1_lo,\n c2_hi,\n c2_lo,\n c3_hi,\n c3_lo,\n c4_hi,\n c4_lo\n );\n var T1_lo = sum64_5_lo(\n c0_hi,\n c0_lo,\n c1_hi,\n c1_lo,\n c2_hi,\n c2_lo,\n c3_hi,\n c3_lo,\n c4_hi,\n c4_lo\n );\n c0_hi = s0_512_hi(ah, al);\n c0_lo = s0_512_lo(ah, al);\n c1_hi = maj64_hi(ah, al, bh, bl, ch, cl);\n c1_lo = maj64_lo(ah, al, bh, bl, ch, cl);\n var T2_hi = sum64_hi(c0_hi, c0_lo, c1_hi, c1_lo);\n var T2_lo = sum64_lo(c0_hi, c0_lo, c1_hi, c1_lo);\n hh = gh;\n hl = gl;\n gh = fh;\n gl = fl;\n fh = eh;\n fl = el;\n eh = sum64_hi(dh, dl, T1_hi, T1_lo);\n el = sum64_lo(dl, dl, T1_hi, T1_lo);\n dh = ch;\n dl = cl;\n ch = bh;\n cl = bl;\n bh = ah;\n bl = al;\n ah = sum64_hi(T1_hi, T1_lo, T2_hi, T2_lo);\n al = sum64_lo(T1_hi, T1_lo, T2_hi, T2_lo);\n }\n sum64(this.h, 0, ah, al);\n sum64(this.h, 2, bh, bl);\n sum64(this.h, 4, ch, cl);\n sum64(this.h, 6, dh, dl);\n sum64(this.h, 8, eh, el);\n sum64(this.h, 10, fh, fl);\n sum64(this.h, 12, gh, gl);\n sum64(this.h, 14, hh, hl);\n };\n SHA5122.prototype._digest = function digest(enc) {\n if (enc === \"hex\")\n return utils.toHex32(this.h, \"big\");\n else\n return utils.split32(this.h, \"big\");\n };\n function ch64_hi(xh, xl, yh, yl, zh) {\n var r2 = xh & yh ^ ~xh & zh;\n if (r2 < 0)\n r2 += 4294967296;\n return r2;\n }\n function ch64_lo(xh, xl, yh, yl, zh, zl) {\n var r2 = xl & yl ^ ~xl & zl;\n if (r2 < 0)\n r2 += 4294967296;\n return r2;\n }\n function maj64_hi(xh, xl, yh, yl, zh) {\n var r2 = xh & yh ^ xh & zh ^ yh & zh;\n if (r2 < 0)\n r2 += 4294967296;\n return r2;\n }\n function maj64_lo(xh, xl, yh, yl, zh, zl) {\n var r2 = xl & yl ^ xl & zl ^ yl & zl;\n if (r2 < 0)\n r2 += 4294967296;\n return r2;\n }\n function s0_512_hi(xh, xl) {\n var c0_hi = rotr64_hi(xh, xl, 28);\n var c1_hi = rotr64_hi(xl, xh, 2);\n var c2_hi = rotr64_hi(xl, xh, 7);\n var r2 = c0_hi ^ c1_hi ^ c2_hi;\n if (r2 < 0)\n r2 += 4294967296;\n return r2;\n }\n function s0_512_lo(xh, xl) {\n var c0_lo = rotr64_lo(xh, xl, 28);\n var c1_lo = rotr64_lo(xl, xh, 2);\n var c2_lo = rotr64_lo(xl, xh, 7);\n var r2 = c0_lo ^ c1_lo ^ c2_lo;\n if (r2 < 0)\n r2 += 4294967296;\n return r2;\n }\n function s1_512_hi(xh, xl) {\n var c0_hi = rotr64_hi(xh, xl, 14);\n var c1_hi = rotr64_hi(xh, xl, 18);\n var c2_hi = rotr64_hi(xl, xh, 9);\n var r2 = c0_hi ^ c1_hi ^ c2_hi;\n if (r2 < 0)\n r2 += 4294967296;\n return r2;\n }\n function s1_512_lo(xh, xl) {\n var c0_lo = rotr64_lo(xh, xl, 14);\n var c1_lo = rotr64_lo(xh, xl, 18);\n var c2_lo = rotr64_lo(xl, xh, 9);\n var r2 = c0_lo ^ c1_lo ^ c2_lo;\n if (r2 < 0)\n r2 += 4294967296;\n return r2;\n }\n function g0_512_hi(xh, xl) {\n var c0_hi = rotr64_hi(xh, xl, 1);\n var c1_hi = rotr64_hi(xh, xl, 8);\n var c2_hi = shr64_hi(xh, xl, 7);\n var r2 = c0_hi ^ c1_hi ^ c2_hi;\n if (r2 < 0)\n r2 += 4294967296;\n return r2;\n }\n function g0_512_lo(xh, xl) {\n var c0_lo = rotr64_lo(xh, xl, 1);\n var c1_lo = rotr64_lo(xh, xl, 8);\n var c2_lo = shr64_lo(xh, xl, 7);\n var r2 = c0_lo ^ c1_lo ^ c2_lo;\n if (r2 < 0)\n r2 += 4294967296;\n return r2;\n }\n function g1_512_hi(xh, xl) {\n var c0_hi = rotr64_hi(xh, xl, 19);\n var c1_hi = rotr64_hi(xl, xh, 29);\n var c2_hi = shr64_hi(xh, xl, 6);\n var r2 = c0_hi ^ c1_hi ^ c2_hi;\n if (r2 < 0)\n r2 += 4294967296;\n return r2;\n }\n function g1_512_lo(xh, xl) {\n var c0_lo = rotr64_lo(xh, xl, 19);\n var c1_lo = rotr64_lo(xl, xh, 29);\n var c2_lo = shr64_lo(xh, xl, 6);\n var r2 = c0_lo ^ c1_lo ^ c2_lo;\n if (r2 < 0)\n r2 += 4294967296;\n return r2;\n }\n }\n });\n\n // ../../../node_modules/.pnpm/hash.js@1.1.7/node_modules/hash.js/lib/hash/sha/384.js\n var require__5 = __commonJS({\n \"../../../node_modules/.pnpm/hash.js@1.1.7/node_modules/hash.js/lib/hash/sha/384.js\"(exports3, module) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n var utils = require_utils4();\n var SHA5122 = require__4();\n function SHA3842() {\n if (!(this instanceof SHA3842))\n return new SHA3842();\n SHA5122.call(this);\n this.h = [\n 3418070365,\n 3238371032,\n 1654270250,\n 914150663,\n 2438529370,\n 812702999,\n 355462360,\n 4144912697,\n 1731405415,\n 4290775857,\n 2394180231,\n 1750603025,\n 3675008525,\n 1694076839,\n 1203062813,\n 3204075428\n ];\n }\n utils.inherits(SHA3842, SHA5122);\n module.exports = SHA3842;\n SHA3842.blockSize = 1024;\n SHA3842.outSize = 384;\n SHA3842.hmacStrength = 192;\n SHA3842.padLength = 128;\n SHA3842.prototype._digest = function digest(enc) {\n if (enc === \"hex\")\n return utils.toHex32(this.h.slice(0, 12), \"big\");\n else\n return utils.split32(this.h.slice(0, 12), \"big\");\n };\n }\n });\n\n // ../../../node_modules/.pnpm/hash.js@1.1.7/node_modules/hash.js/lib/hash/sha.js\n var require_sha = __commonJS({\n \"../../../node_modules/.pnpm/hash.js@1.1.7/node_modules/hash.js/lib/hash/sha.js\"(exports3) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n exports3.sha1 = require__();\n exports3.sha224 = require__3();\n exports3.sha256 = require__2();\n exports3.sha384 = require__5();\n exports3.sha512 = require__4();\n }\n });\n\n // ../../../node_modules/.pnpm/hash.js@1.1.7/node_modules/hash.js/lib/hash/ripemd.js\n var require_ripemd = __commonJS({\n \"../../../node_modules/.pnpm/hash.js@1.1.7/node_modules/hash.js/lib/hash/ripemd.js\"(exports3) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n var utils = require_utils4();\n var common = require_common();\n var rotl32 = utils.rotl32;\n var sum32 = utils.sum32;\n var sum32_3 = utils.sum32_3;\n var sum32_4 = utils.sum32_4;\n var BlockHash = common.BlockHash;\n function RIPEMD1602() {\n if (!(this instanceof RIPEMD1602))\n return new RIPEMD1602();\n BlockHash.call(this);\n this.h = [1732584193, 4023233417, 2562383102, 271733878, 3285377520];\n this.endian = \"little\";\n }\n utils.inherits(RIPEMD1602, BlockHash);\n exports3.ripemd160 = RIPEMD1602;\n RIPEMD1602.blockSize = 512;\n RIPEMD1602.outSize = 160;\n RIPEMD1602.hmacStrength = 192;\n RIPEMD1602.padLength = 64;\n RIPEMD1602.prototype._update = function update(msg, start) {\n var A4 = this.h[0];\n var B2 = this.h[1];\n var C = this.h[2];\n var D2 = this.h[3];\n var E2 = this.h[4];\n var Ah = A4;\n var Bh = B2;\n var Ch = C;\n var Dh = D2;\n var Eh = E2;\n for (var j2 = 0; j2 < 80; j2++) {\n var T4 = sum32(\n rotl32(\n sum32_4(A4, f6(j2, B2, C, D2), msg[r2[j2] + start], K2(j2)),\n s4[j2]\n ),\n E2\n );\n A4 = E2;\n E2 = D2;\n D2 = rotl32(C, 10);\n C = B2;\n B2 = T4;\n T4 = sum32(\n rotl32(\n sum32_4(Ah, f6(79 - j2, Bh, Ch, Dh), msg[rh[j2] + start], Kh(j2)),\n sh[j2]\n ),\n Eh\n );\n Ah = Eh;\n Eh = Dh;\n Dh = rotl32(Ch, 10);\n Ch = Bh;\n Bh = T4;\n }\n T4 = sum32_3(this.h[1], C, Dh);\n this.h[1] = sum32_3(this.h[2], D2, Eh);\n this.h[2] = sum32_3(this.h[3], E2, Ah);\n this.h[3] = sum32_3(this.h[4], A4, Bh);\n this.h[4] = sum32_3(this.h[0], B2, Ch);\n this.h[0] = T4;\n };\n RIPEMD1602.prototype._digest = function digest(enc) {\n if (enc === \"hex\")\n return utils.toHex32(this.h, \"little\");\n else\n return utils.split32(this.h, \"little\");\n };\n function f6(j2, x4, y6, z2) {\n if (j2 <= 15)\n return x4 ^ y6 ^ z2;\n else if (j2 <= 31)\n return x4 & y6 | ~x4 & z2;\n else if (j2 <= 47)\n return (x4 | ~y6) ^ z2;\n else if (j2 <= 63)\n return x4 & z2 | y6 & ~z2;\n else\n return x4 ^ (y6 | ~z2);\n }\n function K2(j2) {\n if (j2 <= 15)\n return 0;\n else if (j2 <= 31)\n return 1518500249;\n else if (j2 <= 47)\n return 1859775393;\n else if (j2 <= 63)\n return 2400959708;\n else\n return 2840853838;\n }\n function Kh(j2) {\n if (j2 <= 15)\n return 1352829926;\n else if (j2 <= 31)\n return 1548603684;\n else if (j2 <= 47)\n return 1836072691;\n else if (j2 <= 63)\n return 2053994217;\n else\n return 0;\n }\n var r2 = [\n 0,\n 1,\n 2,\n 3,\n 4,\n 5,\n 6,\n 7,\n 8,\n 9,\n 10,\n 11,\n 12,\n 13,\n 14,\n 15,\n 7,\n 4,\n 13,\n 1,\n 10,\n 6,\n 15,\n 3,\n 12,\n 0,\n 9,\n 5,\n 2,\n 14,\n 11,\n 8,\n 3,\n 10,\n 14,\n 4,\n 9,\n 15,\n 8,\n 1,\n 2,\n 7,\n 0,\n 6,\n 13,\n 11,\n 5,\n 12,\n 1,\n 9,\n 11,\n 10,\n 0,\n 8,\n 12,\n 4,\n 13,\n 3,\n 7,\n 15,\n 14,\n 5,\n 6,\n 2,\n 4,\n 0,\n 5,\n 9,\n 7,\n 12,\n 2,\n 10,\n 14,\n 1,\n 3,\n 8,\n 11,\n 6,\n 15,\n 13\n ];\n var rh = [\n 5,\n 14,\n 7,\n 0,\n 9,\n 2,\n 11,\n 4,\n 13,\n 6,\n 15,\n 8,\n 1,\n 10,\n 3,\n 12,\n 6,\n 11,\n 3,\n 7,\n 0,\n 13,\n 5,\n 10,\n 14,\n 15,\n 8,\n 12,\n 4,\n 9,\n 1,\n 2,\n 15,\n 5,\n 1,\n 3,\n 7,\n 14,\n 6,\n 9,\n 11,\n 8,\n 12,\n 2,\n 10,\n 0,\n 4,\n 13,\n 8,\n 6,\n 4,\n 1,\n 3,\n 11,\n 15,\n 0,\n 5,\n 12,\n 2,\n 13,\n 9,\n 7,\n 10,\n 14,\n 12,\n 15,\n 10,\n 4,\n 1,\n 5,\n 8,\n 7,\n 6,\n 2,\n 13,\n 14,\n 0,\n 3,\n 9,\n 11\n ];\n var s4 = [\n 11,\n 14,\n 15,\n 12,\n 5,\n 8,\n 7,\n 9,\n 11,\n 13,\n 14,\n 15,\n 6,\n 7,\n 9,\n 8,\n 7,\n 6,\n 8,\n 13,\n 11,\n 9,\n 7,\n 15,\n 7,\n 12,\n 15,\n 9,\n 11,\n 7,\n 13,\n 12,\n 11,\n 13,\n 6,\n 7,\n 14,\n 9,\n 13,\n 15,\n 14,\n 8,\n 13,\n 6,\n 5,\n 12,\n 7,\n 5,\n 11,\n 12,\n 14,\n 15,\n 14,\n 15,\n 9,\n 8,\n 9,\n 14,\n 5,\n 6,\n 8,\n 6,\n 5,\n 12,\n 9,\n 15,\n 5,\n 11,\n 6,\n 8,\n 13,\n 12,\n 5,\n 12,\n 13,\n 14,\n 11,\n 8,\n 5,\n 6\n ];\n var sh = [\n 8,\n 9,\n 9,\n 11,\n 13,\n 15,\n 15,\n 5,\n 7,\n 7,\n 8,\n 11,\n 14,\n 14,\n 12,\n 6,\n 9,\n 13,\n 15,\n 7,\n 12,\n 8,\n 9,\n 11,\n 7,\n 7,\n 12,\n 7,\n 6,\n 15,\n 13,\n 11,\n 9,\n 7,\n 15,\n 11,\n 8,\n 6,\n 6,\n 14,\n 12,\n 13,\n 5,\n 14,\n 13,\n 13,\n 7,\n 5,\n 15,\n 5,\n 8,\n 11,\n 14,\n 14,\n 6,\n 14,\n 6,\n 9,\n 12,\n 9,\n 12,\n 5,\n 15,\n 8,\n 8,\n 5,\n 12,\n 9,\n 12,\n 5,\n 14,\n 6,\n 8,\n 13,\n 6,\n 5,\n 15,\n 13,\n 11,\n 11\n ];\n }\n });\n\n // ../../../node_modules/.pnpm/hash.js@1.1.7/node_modules/hash.js/lib/hash/hmac.js\n var require_hmac = __commonJS({\n \"../../../node_modules/.pnpm/hash.js@1.1.7/node_modules/hash.js/lib/hash/hmac.js\"(exports3, module) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n var utils = require_utils4();\n var assert9 = require_minimalistic_assert();\n function Hmac(hash3, key, enc) {\n if (!(this instanceof Hmac))\n return new Hmac(hash3, key, enc);\n this.Hash = hash3;\n this.blockSize = hash3.blockSize / 8;\n this.outSize = hash3.outSize / 8;\n this.inner = null;\n this.outer = null;\n this._init(utils.toArray(key, enc));\n }\n module.exports = Hmac;\n Hmac.prototype._init = function init(key) {\n if (key.length > this.blockSize)\n key = new this.Hash().update(key).digest();\n assert9(key.length <= this.blockSize);\n for (var i3 = key.length; i3 < this.blockSize; i3++)\n key.push(0);\n for (i3 = 0; i3 < key.length; i3++)\n key[i3] ^= 54;\n this.inner = new this.Hash().update(key);\n for (i3 = 0; i3 < key.length; i3++)\n key[i3] ^= 106;\n this.outer = new this.Hash().update(key);\n };\n Hmac.prototype.update = function update(msg, enc) {\n this.inner.update(msg, enc);\n return this;\n };\n Hmac.prototype.digest = function digest(enc) {\n this.outer.update(this.inner.digest());\n return this.outer.digest(enc);\n };\n }\n });\n\n // ../../../node_modules/.pnpm/hash.js@1.1.7/node_modules/hash.js/lib/hash.js\n var require_hash = __commonJS({\n \"../../../node_modules/.pnpm/hash.js@1.1.7/node_modules/hash.js/lib/hash.js\"(exports3) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n var hash3 = exports3;\n hash3.utils = require_utils4();\n hash3.common = require_common();\n hash3.sha = require_sha();\n hash3.ripemd = require_ripemd();\n hash3.hmac = require_hmac();\n hash3.sha1 = hash3.sha.sha1;\n hash3.sha256 = hash3.sha.sha256;\n hash3.sha224 = hash3.sha.sha224;\n hash3.sha384 = hash3.sha.sha384;\n hash3.sha512 = hash3.sha.sha512;\n hash3.ripemd160 = hash3.ripemd.ripemd160;\n }\n });\n\n // ../../../node_modules/.pnpm/elliptic@6.6.1/node_modules/elliptic/lib/elliptic/precomputed/secp256k1.js\n var require_secp256k1 = __commonJS({\n \"../../../node_modules/.pnpm/elliptic@6.6.1/node_modules/elliptic/lib/elliptic/precomputed/secp256k1.js\"(exports3, module) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n module.exports = {\n doubles: {\n step: 4,\n points: [\n [\n \"e60fce93b59e9ec53011aabc21c23e97b2a31369b87a5ae9c44ee89e2a6dec0a\",\n \"f7e3507399e595929db99f34f57937101296891e44d23f0be1f32cce69616821\"\n ],\n [\n \"8282263212c609d9ea2a6e3e172de238d8c39cabd5ac1ca10646e23fd5f51508\",\n \"11f8a8098557dfe45e8256e830b60ace62d613ac2f7b17bed31b6eaff6e26caf\"\n ],\n [\n \"175e159f728b865a72f99cc6c6fc846de0b93833fd2222ed73fce5b551e5b739\",\n \"d3506e0d9e3c79eba4ef97a51ff71f5eacb5955add24345c6efa6ffee9fed695\"\n ],\n [\n \"363d90d447b00c9c99ceac05b6262ee053441c7e55552ffe526bad8f83ff4640\",\n \"4e273adfc732221953b445397f3363145b9a89008199ecb62003c7f3bee9de9\"\n ],\n [\n \"8b4b5f165df3c2be8c6244b5b745638843e4a781a15bcd1b69f79a55dffdf80c\",\n \"4aad0a6f68d308b4b3fbd7813ab0da04f9e336546162ee56b3eff0c65fd4fd36\"\n ],\n [\n \"723cbaa6e5db996d6bf771c00bd548c7b700dbffa6c0e77bcb6115925232fcda\",\n \"96e867b5595cc498a921137488824d6e2660a0653779494801dc069d9eb39f5f\"\n ],\n [\n \"eebfa4d493bebf98ba5feec812c2d3b50947961237a919839a533eca0e7dd7fa\",\n \"5d9a8ca3970ef0f269ee7edaf178089d9ae4cdc3a711f712ddfd4fdae1de8999\"\n ],\n [\n \"100f44da696e71672791d0a09b7bde459f1215a29b3c03bfefd7835b39a48db0\",\n \"cdd9e13192a00b772ec8f3300c090666b7ff4a18ff5195ac0fbd5cd62bc65a09\"\n ],\n [\n \"e1031be262c7ed1b1dc9227a4a04c017a77f8d4464f3b3852c8acde6e534fd2d\",\n \"9d7061928940405e6bb6a4176597535af292dd419e1ced79a44f18f29456a00d\"\n ],\n [\n \"feea6cae46d55b530ac2839f143bd7ec5cf8b266a41d6af52d5e688d9094696d\",\n \"e57c6b6c97dce1bab06e4e12bf3ecd5c981c8957cc41442d3155debf18090088\"\n ],\n [\n \"da67a91d91049cdcb367be4be6ffca3cfeed657d808583de33fa978bc1ec6cb1\",\n \"9bacaa35481642bc41f463f7ec9780e5dec7adc508f740a17e9ea8e27a68be1d\"\n ],\n [\n \"53904faa0b334cdda6e000935ef22151ec08d0f7bb11069f57545ccc1a37b7c0\",\n \"5bc087d0bc80106d88c9eccac20d3c1c13999981e14434699dcb096b022771c8\"\n ],\n [\n \"8e7bcd0bd35983a7719cca7764ca906779b53a043a9b8bcaeff959f43ad86047\",\n \"10b7770b2a3da4b3940310420ca9514579e88e2e47fd68b3ea10047e8460372a\"\n ],\n [\n \"385eed34c1cdff21e6d0818689b81bde71a7f4f18397e6690a841e1599c43862\",\n \"283bebc3e8ea23f56701de19e9ebf4576b304eec2086dc8cc0458fe5542e5453\"\n ],\n [\n \"6f9d9b803ecf191637c73a4413dfa180fddf84a5947fbc9c606ed86c3fac3a7\",\n \"7c80c68e603059ba69b8e2a30e45c4d47ea4dd2f5c281002d86890603a842160\"\n ],\n [\n \"3322d401243c4e2582a2147c104d6ecbf774d163db0f5e5313b7e0e742d0e6bd\",\n \"56e70797e9664ef5bfb019bc4ddaf9b72805f63ea2873af624f3a2e96c28b2a0\"\n ],\n [\n \"85672c7d2de0b7da2bd1770d89665868741b3f9af7643397721d74d28134ab83\",\n \"7c481b9b5b43b2eb6374049bfa62c2e5e77f17fcc5298f44c8e3094f790313a6\"\n ],\n [\n \"948bf809b1988a46b06c9f1919413b10f9226c60f668832ffd959af60c82a0a\",\n \"53a562856dcb6646dc6b74c5d1c3418c6d4dff08c97cd2bed4cb7f88d8c8e589\"\n ],\n [\n \"6260ce7f461801c34f067ce0f02873a8f1b0e44dfc69752accecd819f38fd8e8\",\n \"bc2da82b6fa5b571a7f09049776a1ef7ecd292238051c198c1a84e95b2b4ae17\"\n ],\n [\n \"e5037de0afc1d8d43d8348414bbf4103043ec8f575bfdc432953cc8d2037fa2d\",\n \"4571534baa94d3b5f9f98d09fb990bddbd5f5b03ec481f10e0e5dc841d755bda\"\n ],\n [\n \"e06372b0f4a207adf5ea905e8f1771b4e7e8dbd1c6a6c5b725866a0ae4fce725\",\n \"7a908974bce18cfe12a27bb2ad5a488cd7484a7787104870b27034f94eee31dd\"\n ],\n [\n \"213c7a715cd5d45358d0bbf9dc0ce02204b10bdde2a3f58540ad6908d0559754\",\n \"4b6dad0b5ae462507013ad06245ba190bb4850f5f36a7eeddff2c27534b458f2\"\n ],\n [\n \"4e7c272a7af4b34e8dbb9352a5419a87e2838c70adc62cddf0cc3a3b08fbd53c\",\n \"17749c766c9d0b18e16fd09f6def681b530b9614bff7dd33e0b3941817dcaae6\"\n ],\n [\n \"fea74e3dbe778b1b10f238ad61686aa5c76e3db2be43057632427e2840fb27b6\",\n \"6e0568db9b0b13297cf674deccb6af93126b596b973f7b77701d3db7f23cb96f\"\n ],\n [\n \"76e64113f677cf0e10a2570d599968d31544e179b760432952c02a4417bdde39\",\n \"c90ddf8dee4e95cf577066d70681f0d35e2a33d2b56d2032b4b1752d1901ac01\"\n ],\n [\n \"c738c56b03b2abe1e8281baa743f8f9a8f7cc643df26cbee3ab150242bcbb891\",\n \"893fb578951ad2537f718f2eacbfbbbb82314eef7880cfe917e735d9699a84c3\"\n ],\n [\n \"d895626548b65b81e264c7637c972877d1d72e5f3a925014372e9f6588f6c14b\",\n \"febfaa38f2bc7eae728ec60818c340eb03428d632bb067e179363ed75d7d991f\"\n ],\n [\n \"b8da94032a957518eb0f6433571e8761ceffc73693e84edd49150a564f676e03\",\n \"2804dfa44805a1e4d7c99cc9762808b092cc584d95ff3b511488e4e74efdf6e7\"\n ],\n [\n \"e80fea14441fb33a7d8adab9475d7fab2019effb5156a792f1a11778e3c0df5d\",\n \"eed1de7f638e00771e89768ca3ca94472d155e80af322ea9fcb4291b6ac9ec78\"\n ],\n [\n \"a301697bdfcd704313ba48e51d567543f2a182031efd6915ddc07bbcc4e16070\",\n \"7370f91cfb67e4f5081809fa25d40f9b1735dbf7c0a11a130c0d1a041e177ea1\"\n ],\n [\n \"90ad85b389d6b936463f9d0512678de208cc330b11307fffab7ac63e3fb04ed4\",\n \"e507a3620a38261affdcbd9427222b839aefabe1582894d991d4d48cb6ef150\"\n ],\n [\n \"8f68b9d2f63b5f339239c1ad981f162ee88c5678723ea3351b7b444c9ec4c0da\",\n \"662a9f2dba063986de1d90c2b6be215dbbea2cfe95510bfdf23cbf79501fff82\"\n ],\n [\n \"e4f3fb0176af85d65ff99ff9198c36091f48e86503681e3e6686fd5053231e11\",\n \"1e63633ad0ef4f1c1661a6d0ea02b7286cc7e74ec951d1c9822c38576feb73bc\"\n ],\n [\n \"8c00fa9b18ebf331eb961537a45a4266c7034f2f0d4e1d0716fb6eae20eae29e\",\n \"efa47267fea521a1a9dc343a3736c974c2fadafa81e36c54e7d2a4c66702414b\"\n ],\n [\n \"e7a26ce69dd4829f3e10cec0a9e98ed3143d084f308b92c0997fddfc60cb3e41\",\n \"2a758e300fa7984b471b006a1aafbb18d0a6b2c0420e83e20e8a9421cf2cfd51\"\n ],\n [\n \"b6459e0ee3662ec8d23540c223bcbdc571cbcb967d79424f3cf29eb3de6b80ef\",\n \"67c876d06f3e06de1dadf16e5661db3c4b3ae6d48e35b2ff30bf0b61a71ba45\"\n ],\n [\n \"d68a80c8280bb840793234aa118f06231d6f1fc67e73c5a5deda0f5b496943e8\",\n \"db8ba9fff4b586d00c4b1f9177b0e28b5b0e7b8f7845295a294c84266b133120\"\n ],\n [\n \"324aed7df65c804252dc0270907a30b09612aeb973449cea4095980fc28d3d5d\",\n \"648a365774b61f2ff130c0c35aec1f4f19213b0c7e332843967224af96ab7c84\"\n ],\n [\n \"4df9c14919cde61f6d51dfdbe5fee5dceec4143ba8d1ca888e8bd373fd054c96\",\n \"35ec51092d8728050974c23a1d85d4b5d506cdc288490192ebac06cad10d5d\"\n ],\n [\n \"9c3919a84a474870faed8a9c1cc66021523489054d7f0308cbfc99c8ac1f98cd\",\n \"ddb84f0f4a4ddd57584f044bf260e641905326f76c64c8e6be7e5e03d4fc599d\"\n ],\n [\n \"6057170b1dd12fdf8de05f281d8e06bb91e1493a8b91d4cc5a21382120a959e5\",\n \"9a1af0b26a6a4807add9a2daf71df262465152bc3ee24c65e899be932385a2a8\"\n ],\n [\n \"a576df8e23a08411421439a4518da31880cef0fba7d4df12b1a6973eecb94266\",\n \"40a6bf20e76640b2c92b97afe58cd82c432e10a7f514d9f3ee8be11ae1b28ec8\"\n ],\n [\n \"7778a78c28dec3e30a05fe9629de8c38bb30d1f5cf9a3a208f763889be58ad71\",\n \"34626d9ab5a5b22ff7098e12f2ff580087b38411ff24ac563b513fc1fd9f43ac\"\n ],\n [\n \"928955ee637a84463729fd30e7afd2ed5f96274e5ad7e5cb09eda9c06d903ac\",\n \"c25621003d3f42a827b78a13093a95eeac3d26efa8a8d83fc5180e935bcd091f\"\n ],\n [\n \"85d0fef3ec6db109399064f3a0e3b2855645b4a907ad354527aae75163d82751\",\n \"1f03648413a38c0be29d496e582cf5663e8751e96877331582c237a24eb1f962\"\n ],\n [\n \"ff2b0dce97eece97c1c9b6041798b85dfdfb6d8882da20308f5404824526087e\",\n \"493d13fef524ba188af4c4dc54d07936c7b7ed6fb90e2ceb2c951e01f0c29907\"\n ],\n [\n \"827fbbe4b1e880ea9ed2b2e6301b212b57f1ee148cd6dd28780e5e2cf856e241\",\n \"c60f9c923c727b0b71bef2c67d1d12687ff7a63186903166d605b68baec293ec\"\n ],\n [\n \"eaa649f21f51bdbae7be4ae34ce6e5217a58fdce7f47f9aa7f3b58fa2120e2b3\",\n \"be3279ed5bbbb03ac69a80f89879aa5a01a6b965f13f7e59d47a5305ba5ad93d\"\n ],\n [\n \"e4a42d43c5cf169d9391df6decf42ee541b6d8f0c9a137401e23632dda34d24f\",\n \"4d9f92e716d1c73526fc99ccfb8ad34ce886eedfa8d8e4f13a7f7131deba9414\"\n ],\n [\n \"1ec80fef360cbdd954160fadab352b6b92b53576a88fea4947173b9d4300bf19\",\n \"aeefe93756b5340d2f3a4958a7abbf5e0146e77f6295a07b671cdc1cc107cefd\"\n ],\n [\n \"146a778c04670c2f91b00af4680dfa8bce3490717d58ba889ddb5928366642be\",\n \"b318e0ec3354028add669827f9d4b2870aaa971d2f7e5ed1d0b297483d83efd0\"\n ],\n [\n \"fa50c0f61d22e5f07e3acebb1aa07b128d0012209a28b9776d76a8793180eef9\",\n \"6b84c6922397eba9b72cd2872281a68a5e683293a57a213b38cd8d7d3f4f2811\"\n ],\n [\n \"da1d61d0ca721a11b1a5bf6b7d88e8421a288ab5d5bba5220e53d32b5f067ec2\",\n \"8157f55a7c99306c79c0766161c91e2966a73899d279b48a655fba0f1ad836f1\"\n ],\n [\n \"a8e282ff0c9706907215ff98e8fd416615311de0446f1e062a73b0610d064e13\",\n \"7f97355b8db81c09abfb7f3c5b2515888b679a3e50dd6bd6cef7c73111f4cc0c\"\n ],\n [\n \"174a53b9c9a285872d39e56e6913cab15d59b1fa512508c022f382de8319497c\",\n \"ccc9dc37abfc9c1657b4155f2c47f9e6646b3a1d8cb9854383da13ac079afa73\"\n ],\n [\n \"959396981943785c3d3e57edf5018cdbe039e730e4918b3d884fdff09475b7ba\",\n \"2e7e552888c331dd8ba0386a4b9cd6849c653f64c8709385e9b8abf87524f2fd\"\n ],\n [\n \"d2a63a50ae401e56d645a1153b109a8fcca0a43d561fba2dbb51340c9d82b151\",\n \"e82d86fb6443fcb7565aee58b2948220a70f750af484ca52d4142174dcf89405\"\n ],\n [\n \"64587e2335471eb890ee7896d7cfdc866bacbdbd3839317b3436f9b45617e073\",\n \"d99fcdd5bf6902e2ae96dd6447c299a185b90a39133aeab358299e5e9faf6589\"\n ],\n [\n \"8481bde0e4e4d885b3a546d3e549de042f0aa6cea250e7fd358d6c86dd45e458\",\n \"38ee7b8cba5404dd84a25bf39cecb2ca900a79c42b262e556d64b1b59779057e\"\n ],\n [\n \"13464a57a78102aa62b6979ae817f4637ffcfed3c4b1ce30bcd6303f6caf666b\",\n \"69be159004614580ef7e433453ccb0ca48f300a81d0942e13f495a907f6ecc27\"\n ],\n [\n \"bc4a9df5b713fe2e9aef430bcc1dc97a0cd9ccede2f28588cada3a0d2d83f366\",\n \"d3a81ca6e785c06383937adf4b798caa6e8a9fbfa547b16d758d666581f33c1\"\n ],\n [\n \"8c28a97bf8298bc0d23d8c749452a32e694b65e30a9472a3954ab30fe5324caa\",\n \"40a30463a3305193378fedf31f7cc0eb7ae784f0451cb9459e71dc73cbef9482\"\n ],\n [\n \"8ea9666139527a8c1dd94ce4f071fd23c8b350c5a4bb33748c4ba111faccae0\",\n \"620efabbc8ee2782e24e7c0cfb95c5d735b783be9cf0f8e955af34a30e62b945\"\n ],\n [\n \"dd3625faef5ba06074669716bbd3788d89bdde815959968092f76cc4eb9a9787\",\n \"7a188fa3520e30d461da2501045731ca941461982883395937f68d00c644a573\"\n ],\n [\n \"f710d79d9eb962297e4f6232b40e8f7feb2bc63814614d692c12de752408221e\",\n \"ea98e67232d3b3295d3b535532115ccac8612c721851617526ae47a9c77bfc82\"\n ]\n ]\n },\n naf: {\n wnd: 7,\n points: [\n [\n \"f9308a019258c31049344f85f89d5229b531c845836f99b08601f113bce036f9\",\n \"388f7b0f632de8140fe337e62a37f3566500a99934c2231b6cb9fd7584b8e672\"\n ],\n [\n \"2f8bde4d1a07209355b4a7250a5c5128e88b84bddc619ab7cba8d569b240efe4\",\n \"d8ac222636e5e3d6d4dba9dda6c9c426f788271bab0d6840dca87d3aa6ac62d6\"\n ],\n [\n \"5cbdf0646e5db4eaa398f365f2ea7a0e3d419b7e0330e39ce92bddedcac4f9bc\",\n \"6aebca40ba255960a3178d6d861a54dba813d0b813fde7b5a5082628087264da\"\n ],\n [\n \"acd484e2f0c7f65309ad178a9f559abde09796974c57e714c35f110dfc27ccbe\",\n \"cc338921b0a7d9fd64380971763b61e9add888a4375f8e0f05cc262ac64f9c37\"\n ],\n [\n \"774ae7f858a9411e5ef4246b70c65aac5649980be5c17891bbec17895da008cb\",\n \"d984a032eb6b5e190243dd56d7b7b365372db1e2dff9d6a8301d74c9c953c61b\"\n ],\n [\n \"f28773c2d975288bc7d1d205c3748651b075fbc6610e58cddeeddf8f19405aa8\",\n \"ab0902e8d880a89758212eb65cdaf473a1a06da521fa91f29b5cb52db03ed81\"\n ],\n [\n \"d7924d4f7d43ea965a465ae3095ff41131e5946f3c85f79e44adbcf8e27e080e\",\n \"581e2872a86c72a683842ec228cc6defea40af2bd896d3a5c504dc9ff6a26b58\"\n ],\n [\n \"defdea4cdb677750a420fee807eacf21eb9898ae79b9768766e4faa04a2d4a34\",\n \"4211ab0694635168e997b0ead2a93daeced1f4a04a95c0f6cfb199f69e56eb77\"\n ],\n [\n \"2b4ea0a797a443d293ef5cff444f4979f06acfebd7e86d277475656138385b6c\",\n \"85e89bc037945d93b343083b5a1c86131a01f60c50269763b570c854e5c09b7a\"\n ],\n [\n \"352bbf4a4cdd12564f93fa332ce333301d9ad40271f8107181340aef25be59d5\",\n \"321eb4075348f534d59c18259dda3e1f4a1b3b2e71b1039c67bd3d8bcf81998c\"\n ],\n [\n \"2fa2104d6b38d11b0230010559879124e42ab8dfeff5ff29dc9cdadd4ecacc3f\",\n \"2de1068295dd865b64569335bd5dd80181d70ecfc882648423ba76b532b7d67\"\n ],\n [\n \"9248279b09b4d68dab21a9b066edda83263c3d84e09572e269ca0cd7f5453714\",\n \"73016f7bf234aade5d1aa71bdea2b1ff3fc0de2a887912ffe54a32ce97cb3402\"\n ],\n [\n \"daed4f2be3a8bf278e70132fb0beb7522f570e144bf615c07e996d443dee8729\",\n \"a69dce4a7d6c98e8d4a1aca87ef8d7003f83c230f3afa726ab40e52290be1c55\"\n ],\n [\n \"c44d12c7065d812e8acf28d7cbb19f9011ecd9e9fdf281b0e6a3b5e87d22e7db\",\n \"2119a460ce326cdc76c45926c982fdac0e106e861edf61c5a039063f0e0e6482\"\n ],\n [\n \"6a245bf6dc698504c89a20cfded60853152b695336c28063b61c65cbd269e6b4\",\n \"e022cf42c2bd4a708b3f5126f16a24ad8b33ba48d0423b6efd5e6348100d8a82\"\n ],\n [\n \"1697ffa6fd9de627c077e3d2fe541084ce13300b0bec1146f95ae57f0d0bd6a5\",\n \"b9c398f186806f5d27561506e4557433a2cf15009e498ae7adee9d63d01b2396\"\n ],\n [\n \"605bdb019981718b986d0f07e834cb0d9deb8360ffb7f61df982345ef27a7479\",\n \"2972d2de4f8d20681a78d93ec96fe23c26bfae84fb14db43b01e1e9056b8c49\"\n ],\n [\n \"62d14dab4150bf497402fdc45a215e10dcb01c354959b10cfe31c7e9d87ff33d\",\n \"80fc06bd8cc5b01098088a1950eed0db01aa132967ab472235f5642483b25eaf\"\n ],\n [\n \"80c60ad0040f27dade5b4b06c408e56b2c50e9f56b9b8b425e555c2f86308b6f\",\n \"1c38303f1cc5c30f26e66bad7fe72f70a65eed4cbe7024eb1aa01f56430bd57a\"\n ],\n [\n \"7a9375ad6167ad54aa74c6348cc54d344cc5dc9487d847049d5eabb0fa03c8fb\",\n \"d0e3fa9eca8726909559e0d79269046bdc59ea10c70ce2b02d499ec224dc7f7\"\n ],\n [\n \"d528ecd9b696b54c907a9ed045447a79bb408ec39b68df504bb51f459bc3ffc9\",\n \"eecf41253136e5f99966f21881fd656ebc4345405c520dbc063465b521409933\"\n ],\n [\n \"49370a4b5f43412ea25f514e8ecdad05266115e4a7ecb1387231808f8b45963\",\n \"758f3f41afd6ed428b3081b0512fd62a54c3f3afbb5b6764b653052a12949c9a\"\n ],\n [\n \"77f230936ee88cbbd73df930d64702ef881d811e0e1498e2f1c13eb1fc345d74\",\n \"958ef42a7886b6400a08266e9ba1b37896c95330d97077cbbe8eb3c7671c60d6\"\n ],\n [\n \"f2dac991cc4ce4b9ea44887e5c7c0bce58c80074ab9d4dbaeb28531b7739f530\",\n \"e0dedc9b3b2f8dad4da1f32dec2531df9eb5fbeb0598e4fd1a117dba703a3c37\"\n ],\n [\n \"463b3d9f662621fb1b4be8fbbe2520125a216cdfc9dae3debcba4850c690d45b\",\n \"5ed430d78c296c3543114306dd8622d7c622e27c970a1de31cb377b01af7307e\"\n ],\n [\n \"f16f804244e46e2a09232d4aff3b59976b98fac14328a2d1a32496b49998f247\",\n \"cedabd9b82203f7e13d206fcdf4e33d92a6c53c26e5cce26d6579962c4e31df6\"\n ],\n [\n \"caf754272dc84563b0352b7a14311af55d245315ace27c65369e15f7151d41d1\",\n \"cb474660ef35f5f2a41b643fa5e460575f4fa9b7962232a5c32f908318a04476\"\n ],\n [\n \"2600ca4b282cb986f85d0f1709979d8b44a09c07cb86d7c124497bc86f082120\",\n \"4119b88753c15bd6a693b03fcddbb45d5ac6be74ab5f0ef44b0be9475a7e4b40\"\n ],\n [\n \"7635ca72d7e8432c338ec53cd12220bc01c48685e24f7dc8c602a7746998e435\",\n \"91b649609489d613d1d5e590f78e6d74ecfc061d57048bad9e76f302c5b9c61\"\n ],\n [\n \"754e3239f325570cdbbf4a87deee8a66b7f2b33479d468fbc1a50743bf56cc18\",\n \"673fb86e5bda30fb3cd0ed304ea49a023ee33d0197a695d0c5d98093c536683\"\n ],\n [\n \"e3e6bd1071a1e96aff57859c82d570f0330800661d1c952f9fe2694691d9b9e8\",\n \"59c9e0bba394e76f40c0aa58379a3cb6a5a2283993e90c4167002af4920e37f5\"\n ],\n [\n \"186b483d056a033826ae73d88f732985c4ccb1f32ba35f4b4cc47fdcf04aa6eb\",\n \"3b952d32c67cf77e2e17446e204180ab21fb8090895138b4a4a797f86e80888b\"\n ],\n [\n \"df9d70a6b9876ce544c98561f4be4f725442e6d2b737d9c91a8321724ce0963f\",\n \"55eb2dafd84d6ccd5f862b785dc39d4ab157222720ef9da217b8c45cf2ba2417\"\n ],\n [\n \"5edd5cc23c51e87a497ca815d5dce0f8ab52554f849ed8995de64c5f34ce7143\",\n \"efae9c8dbc14130661e8cec030c89ad0c13c66c0d17a2905cdc706ab7399a868\"\n ],\n [\n \"290798c2b6476830da12fe02287e9e777aa3fba1c355b17a722d362f84614fba\",\n \"e38da76dcd440621988d00bcf79af25d5b29c094db2a23146d003afd41943e7a\"\n ],\n [\n \"af3c423a95d9f5b3054754efa150ac39cd29552fe360257362dfdecef4053b45\",\n \"f98a3fd831eb2b749a93b0e6f35cfb40c8cd5aa667a15581bc2feded498fd9c6\"\n ],\n [\n \"766dbb24d134e745cccaa28c99bf274906bb66b26dcf98df8d2fed50d884249a\",\n \"744b1152eacbe5e38dcc887980da38b897584a65fa06cedd2c924f97cbac5996\"\n ],\n [\n \"59dbf46f8c94759ba21277c33784f41645f7b44f6c596a58ce92e666191abe3e\",\n \"c534ad44175fbc300f4ea6ce648309a042ce739a7919798cd85e216c4a307f6e\"\n ],\n [\n \"f13ada95103c4537305e691e74e9a4a8dd647e711a95e73cb62dc6018cfd87b8\",\n \"e13817b44ee14de663bf4bc808341f326949e21a6a75c2570778419bdaf5733d\"\n ],\n [\n \"7754b4fa0e8aced06d4167a2c59cca4cda1869c06ebadfb6488550015a88522c\",\n \"30e93e864e669d82224b967c3020b8fa8d1e4e350b6cbcc537a48b57841163a2\"\n ],\n [\n \"948dcadf5990e048aa3874d46abef9d701858f95de8041d2a6828c99e2262519\",\n \"e491a42537f6e597d5d28a3224b1bc25df9154efbd2ef1d2cbba2cae5347d57e\"\n ],\n [\n \"7962414450c76c1689c7b48f8202ec37fb224cf5ac0bfa1570328a8a3d7c77ab\",\n \"100b610ec4ffb4760d5c1fc133ef6f6b12507a051f04ac5760afa5b29db83437\"\n ],\n [\n \"3514087834964b54b15b160644d915485a16977225b8847bb0dd085137ec47ca\",\n \"ef0afbb2056205448e1652c48e8127fc6039e77c15c2378b7e7d15a0de293311\"\n ],\n [\n \"d3cc30ad6b483e4bc79ce2c9dd8bc54993e947eb8df787b442943d3f7b527eaf\",\n \"8b378a22d827278d89c5e9be8f9508ae3c2ad46290358630afb34db04eede0a4\"\n ],\n [\n \"1624d84780732860ce1c78fcbfefe08b2b29823db913f6493975ba0ff4847610\",\n \"68651cf9b6da903e0914448c6cd9d4ca896878f5282be4c8cc06e2a404078575\"\n ],\n [\n \"733ce80da955a8a26902c95633e62a985192474b5af207da6df7b4fd5fc61cd4\",\n \"f5435a2bd2badf7d485a4d8b8db9fcce3e1ef8e0201e4578c54673bc1dc5ea1d\"\n ],\n [\n \"15d9441254945064cf1a1c33bbd3b49f8966c5092171e699ef258dfab81c045c\",\n \"d56eb30b69463e7234f5137b73b84177434800bacebfc685fc37bbe9efe4070d\"\n ],\n [\n \"a1d0fcf2ec9de675b612136e5ce70d271c21417c9d2b8aaaac138599d0717940\",\n \"edd77f50bcb5a3cab2e90737309667f2641462a54070f3d519212d39c197a629\"\n ],\n [\n \"e22fbe15c0af8ccc5780c0735f84dbe9a790badee8245c06c7ca37331cb36980\",\n \"a855babad5cd60c88b430a69f53a1a7a38289154964799be43d06d77d31da06\"\n ],\n [\n \"311091dd9860e8e20ee13473c1155f5f69635e394704eaa74009452246cfa9b3\",\n \"66db656f87d1f04fffd1f04788c06830871ec5a64feee685bd80f0b1286d8374\"\n ],\n [\n \"34c1fd04d301be89b31c0442d3e6ac24883928b45a9340781867d4232ec2dbdf\",\n \"9414685e97b1b5954bd46f730174136d57f1ceeb487443dc5321857ba73abee\"\n ],\n [\n \"f219ea5d6b54701c1c14de5b557eb42a8d13f3abbcd08affcc2a5e6b049b8d63\",\n \"4cb95957e83d40b0f73af4544cccf6b1f4b08d3c07b27fb8d8c2962a400766d1\"\n ],\n [\n \"d7b8740f74a8fbaab1f683db8f45de26543a5490bca627087236912469a0b448\",\n \"fa77968128d9c92ee1010f337ad4717eff15db5ed3c049b3411e0315eaa4593b\"\n ],\n [\n \"32d31c222f8f6f0ef86f7c98d3a3335ead5bcd32abdd94289fe4d3091aa824bf\",\n \"5f3032f5892156e39ccd3d7915b9e1da2e6dac9e6f26e961118d14b8462e1661\"\n ],\n [\n \"7461f371914ab32671045a155d9831ea8793d77cd59592c4340f86cbc18347b5\",\n \"8ec0ba238b96bec0cbdddcae0aa442542eee1ff50c986ea6b39847b3cc092ff6\"\n ],\n [\n \"ee079adb1df1860074356a25aa38206a6d716b2c3e67453d287698bad7b2b2d6\",\n \"8dc2412aafe3be5c4c5f37e0ecc5f9f6a446989af04c4e25ebaac479ec1c8c1e\"\n ],\n [\n \"16ec93e447ec83f0467b18302ee620f7e65de331874c9dc72bfd8616ba9da6b5\",\n \"5e4631150e62fb40d0e8c2a7ca5804a39d58186a50e497139626778e25b0674d\"\n ],\n [\n \"eaa5f980c245f6f038978290afa70b6bd8855897f98b6aa485b96065d537bd99\",\n \"f65f5d3e292c2e0819a528391c994624d784869d7e6ea67fb18041024edc07dc\"\n ],\n [\n \"78c9407544ac132692ee1910a02439958ae04877151342ea96c4b6b35a49f51\",\n \"f3e0319169eb9b85d5404795539a5e68fa1fbd583c064d2462b675f194a3ddb4\"\n ],\n [\n \"494f4be219a1a77016dcd838431aea0001cdc8ae7a6fc688726578d9702857a5\",\n \"42242a969283a5f339ba7f075e36ba2af925ce30d767ed6e55f4b031880d562c\"\n ],\n [\n \"a598a8030da6d86c6bc7f2f5144ea549d28211ea58faa70ebf4c1e665c1fe9b5\",\n \"204b5d6f84822c307e4b4a7140737aec23fc63b65b35f86a10026dbd2d864e6b\"\n ],\n [\n \"c41916365abb2b5d09192f5f2dbeafec208f020f12570a184dbadc3e58595997\",\n \"4f14351d0087efa49d245b328984989d5caf9450f34bfc0ed16e96b58fa9913\"\n ],\n [\n \"841d6063a586fa475a724604da03bc5b92a2e0d2e0a36acfe4c73a5514742881\",\n \"73867f59c0659e81904f9a1c7543698e62562d6744c169ce7a36de01a8d6154\"\n ],\n [\n \"5e95bb399a6971d376026947f89bde2f282b33810928be4ded112ac4d70e20d5\",\n \"39f23f366809085beebfc71181313775a99c9aed7d8ba38b161384c746012865\"\n ],\n [\n \"36e4641a53948fd476c39f8a99fd974e5ec07564b5315d8bf99471bca0ef2f66\",\n \"d2424b1b1abe4eb8164227b085c9aa9456ea13493fd563e06fd51cf5694c78fc\"\n ],\n [\n \"336581ea7bfbbb290c191a2f507a41cf5643842170e914faeab27c2c579f726\",\n \"ead12168595fe1be99252129b6e56b3391f7ab1410cd1e0ef3dcdcabd2fda224\"\n ],\n [\n \"8ab89816dadfd6b6a1f2634fcf00ec8403781025ed6890c4849742706bd43ede\",\n \"6fdcef09f2f6d0a044e654aef624136f503d459c3e89845858a47a9129cdd24e\"\n ],\n [\n \"1e33f1a746c9c5778133344d9299fcaa20b0938e8acff2544bb40284b8c5fb94\",\n \"60660257dd11b3aa9c8ed618d24edff2306d320f1d03010e33a7d2057f3b3b6\"\n ],\n [\n \"85b7c1dcb3cec1b7ee7f30ded79dd20a0ed1f4cc18cbcfcfa410361fd8f08f31\",\n \"3d98a9cdd026dd43f39048f25a8847f4fcafad1895d7a633c6fed3c35e999511\"\n ],\n [\n \"29df9fbd8d9e46509275f4b125d6d45d7fbe9a3b878a7af872a2800661ac5f51\",\n \"b4c4fe99c775a606e2d8862179139ffda61dc861c019e55cd2876eb2a27d84b\"\n ],\n [\n \"a0b1cae06b0a847a3fea6e671aaf8adfdfe58ca2f768105c8082b2e449fce252\",\n \"ae434102edde0958ec4b19d917a6a28e6b72da1834aff0e650f049503a296cf2\"\n ],\n [\n \"4e8ceafb9b3e9a136dc7ff67e840295b499dfb3b2133e4ba113f2e4c0e121e5\",\n \"cf2174118c8b6d7a4b48f6d534ce5c79422c086a63460502b827ce62a326683c\"\n ],\n [\n \"d24a44e047e19b6f5afb81c7ca2f69080a5076689a010919f42725c2b789a33b\",\n \"6fb8d5591b466f8fc63db50f1c0f1c69013f996887b8244d2cdec417afea8fa3\"\n ],\n [\n \"ea01606a7a6c9cdd249fdfcfacb99584001edd28abbab77b5104e98e8e3b35d4\",\n \"322af4908c7312b0cfbfe369f7a7b3cdb7d4494bc2823700cfd652188a3ea98d\"\n ],\n [\n \"af8addbf2b661c8a6c6328655eb96651252007d8c5ea31be4ad196de8ce2131f\",\n \"6749e67c029b85f52a034eafd096836b2520818680e26ac8f3dfbcdb71749700\"\n ],\n [\n \"e3ae1974566ca06cc516d47e0fb165a674a3dabcfca15e722f0e3450f45889\",\n \"2aeabe7e4531510116217f07bf4d07300de97e4874f81f533420a72eeb0bd6a4\"\n ],\n [\n \"591ee355313d99721cf6993ffed1e3e301993ff3ed258802075ea8ced397e246\",\n \"b0ea558a113c30bea60fc4775460c7901ff0b053d25ca2bdeee98f1a4be5d196\"\n ],\n [\n \"11396d55fda54c49f19aa97318d8da61fa8584e47b084945077cf03255b52984\",\n \"998c74a8cd45ac01289d5833a7beb4744ff536b01b257be4c5767bea93ea57a4\"\n ],\n [\n \"3c5d2a1ba39c5a1790000738c9e0c40b8dcdfd5468754b6405540157e017aa7a\",\n \"b2284279995a34e2f9d4de7396fc18b80f9b8b9fdd270f6661f79ca4c81bd257\"\n ],\n [\n \"cc8704b8a60a0defa3a99a7299f2e9c3fbc395afb04ac078425ef8a1793cc030\",\n \"bdd46039feed17881d1e0862db347f8cf395b74fc4bcdc4e940b74e3ac1f1b13\"\n ],\n [\n \"c533e4f7ea8555aacd9777ac5cad29b97dd4defccc53ee7ea204119b2889b197\",\n \"6f0a256bc5efdf429a2fb6242f1a43a2d9b925bb4a4b3a26bb8e0f45eb596096\"\n ],\n [\n \"c14f8f2ccb27d6f109f6d08d03cc96a69ba8c34eec07bbcf566d48e33da6593\",\n \"c359d6923bb398f7fd4473e16fe1c28475b740dd098075e6c0e8649113dc3a38\"\n ],\n [\n \"a6cbc3046bc6a450bac24789fa17115a4c9739ed75f8f21ce441f72e0b90e6ef\",\n \"21ae7f4680e889bb130619e2c0f95a360ceb573c70603139862afd617fa9b9f\"\n ],\n [\n \"347d6d9a02c48927ebfb86c1359b1caf130a3c0267d11ce6344b39f99d43cc38\",\n \"60ea7f61a353524d1c987f6ecec92f086d565ab687870cb12689ff1e31c74448\"\n ],\n [\n \"da6545d2181db8d983f7dcb375ef5866d47c67b1bf31c8cf855ef7437b72656a\",\n \"49b96715ab6878a79e78f07ce5680c5d6673051b4935bd897fea824b77dc208a\"\n ],\n [\n \"c40747cc9d012cb1a13b8148309c6de7ec25d6945d657146b9d5994b8feb1111\",\n \"5ca560753be2a12fc6de6caf2cb489565db936156b9514e1bb5e83037e0fa2d4\"\n ],\n [\n \"4e42c8ec82c99798ccf3a610be870e78338c7f713348bd34c8203ef4037f3502\",\n \"7571d74ee5e0fb92a7a8b33a07783341a5492144cc54bcc40a94473693606437\"\n ],\n [\n \"3775ab7089bc6af823aba2e1af70b236d251cadb0c86743287522a1b3b0dedea\",\n \"be52d107bcfa09d8bcb9736a828cfa7fac8db17bf7a76a2c42ad961409018cf7\"\n ],\n [\n \"cee31cbf7e34ec379d94fb814d3d775ad954595d1314ba8846959e3e82f74e26\",\n \"8fd64a14c06b589c26b947ae2bcf6bfa0149ef0be14ed4d80f448a01c43b1c6d\"\n ],\n [\n \"b4f9eaea09b6917619f6ea6a4eb5464efddb58fd45b1ebefcdc1a01d08b47986\",\n \"39e5c9925b5a54b07433a4f18c61726f8bb131c012ca542eb24a8ac07200682a\"\n ],\n [\n \"d4263dfc3d2df923a0179a48966d30ce84e2515afc3dccc1b77907792ebcc60e\",\n \"62dfaf07a0f78feb30e30d6295853ce189e127760ad6cf7fae164e122a208d54\"\n ],\n [\n \"48457524820fa65a4f8d35eb6930857c0032acc0a4a2de422233eeda897612c4\",\n \"25a748ab367979d98733c38a1fa1c2e7dc6cc07db2d60a9ae7a76aaa49bd0f77\"\n ],\n [\n \"dfeeef1881101f2cb11644f3a2afdfc2045e19919152923f367a1767c11cceda\",\n \"ecfb7056cf1de042f9420bab396793c0c390bde74b4bbdff16a83ae09a9a7517\"\n ],\n [\n \"6d7ef6b17543f8373c573f44e1f389835d89bcbc6062ced36c82df83b8fae859\",\n \"cd450ec335438986dfefa10c57fea9bcc521a0959b2d80bbf74b190dca712d10\"\n ],\n [\n \"e75605d59102a5a2684500d3b991f2e3f3c88b93225547035af25af66e04541f\",\n \"f5c54754a8f71ee540b9b48728473e314f729ac5308b06938360990e2bfad125\"\n ],\n [\n \"eb98660f4c4dfaa06a2be453d5020bc99a0c2e60abe388457dd43fefb1ed620c\",\n \"6cb9a8876d9cb8520609af3add26cd20a0a7cd8a9411131ce85f44100099223e\"\n ],\n [\n \"13e87b027d8514d35939f2e6892b19922154596941888336dc3563e3b8dba942\",\n \"fef5a3c68059a6dec5d624114bf1e91aac2b9da568d6abeb2570d55646b8adf1\"\n ],\n [\n \"ee163026e9fd6fe017c38f06a5be6fc125424b371ce2708e7bf4491691e5764a\",\n \"1acb250f255dd61c43d94ccc670d0f58f49ae3fa15b96623e5430da0ad6c62b2\"\n ],\n [\n \"b268f5ef9ad51e4d78de3a750c2dc89b1e626d43505867999932e5db33af3d80\",\n \"5f310d4b3c99b9ebb19f77d41c1dee018cf0d34fd4191614003e945a1216e423\"\n ],\n [\n \"ff07f3118a9df035e9fad85eb6c7bfe42b02f01ca99ceea3bf7ffdba93c4750d\",\n \"438136d603e858a3a5c440c38eccbaddc1d2942114e2eddd4740d098ced1f0d8\"\n ],\n [\n \"8d8b9855c7c052a34146fd20ffb658bea4b9f69e0d825ebec16e8c3ce2b526a1\",\n \"cdb559eedc2d79f926baf44fb84ea4d44bcf50fee51d7ceb30e2e7f463036758\"\n ],\n [\n \"52db0b5384dfbf05bfa9d472d7ae26dfe4b851ceca91b1eba54263180da32b63\",\n \"c3b997d050ee5d423ebaf66a6db9f57b3180c902875679de924b69d84a7b375\"\n ],\n [\n \"e62f9490d3d51da6395efd24e80919cc7d0f29c3f3fa48c6fff543becbd43352\",\n \"6d89ad7ba4876b0b22c2ca280c682862f342c8591f1daf5170e07bfd9ccafa7d\"\n ],\n [\n \"7f30ea2476b399b4957509c88f77d0191afa2ff5cb7b14fd6d8e7d65aaab1193\",\n \"ca5ef7d4b231c94c3b15389a5f6311e9daff7bb67b103e9880ef4bff637acaec\"\n ],\n [\n \"5098ff1e1d9f14fb46a210fada6c903fef0fb7b4a1dd1d9ac60a0361800b7a00\",\n \"9731141d81fc8f8084d37c6e7542006b3ee1b40d60dfe5362a5b132fd17ddc0\"\n ],\n [\n \"32b78c7de9ee512a72895be6b9cbefa6e2f3c4ccce445c96b9f2c81e2778ad58\",\n \"ee1849f513df71e32efc3896ee28260c73bb80547ae2275ba497237794c8753c\"\n ],\n [\n \"e2cb74fddc8e9fbcd076eef2a7c72b0ce37d50f08269dfc074b581550547a4f7\",\n \"d3aa2ed71c9dd2247a62df062736eb0baddea9e36122d2be8641abcb005cc4a4\"\n ],\n [\n \"8438447566d4d7bedadc299496ab357426009a35f235cb141be0d99cd10ae3a8\",\n \"c4e1020916980a4da5d01ac5e6ad330734ef0d7906631c4f2390426b2edd791f\"\n ],\n [\n \"4162d488b89402039b584c6fc6c308870587d9c46f660b878ab65c82c711d67e\",\n \"67163e903236289f776f22c25fb8a3afc1732f2b84b4e95dbda47ae5a0852649\"\n ],\n [\n \"3fad3fa84caf0f34f0f89bfd2dcf54fc175d767aec3e50684f3ba4a4bf5f683d\",\n \"cd1bc7cb6cc407bb2f0ca647c718a730cf71872e7d0d2a53fa20efcdfe61826\"\n ],\n [\n \"674f2600a3007a00568c1a7ce05d0816c1fb84bf1370798f1c69532faeb1a86b\",\n \"299d21f9413f33b3edf43b257004580b70db57da0b182259e09eecc69e0d38a5\"\n ],\n [\n \"d32f4da54ade74abb81b815ad1fb3b263d82d6c692714bcff87d29bd5ee9f08f\",\n \"f9429e738b8e53b968e99016c059707782e14f4535359d582fc416910b3eea87\"\n ],\n [\n \"30e4e670435385556e593657135845d36fbb6931f72b08cb1ed954f1e3ce3ff6\",\n \"462f9bce619898638499350113bbc9b10a878d35da70740dc695a559eb88db7b\"\n ],\n [\n \"be2062003c51cc3004682904330e4dee7f3dcd10b01e580bf1971b04d4cad297\",\n \"62188bc49d61e5428573d48a74e1c655b1c61090905682a0d5558ed72dccb9bc\"\n ],\n [\n \"93144423ace3451ed29e0fb9ac2af211cb6e84a601df5993c419859fff5df04a\",\n \"7c10dfb164c3425f5c71a3f9d7992038f1065224f72bb9d1d902a6d13037b47c\"\n ],\n [\n \"b015f8044f5fcbdcf21ca26d6c34fb8197829205c7b7d2a7cb66418c157b112c\",\n \"ab8c1e086d04e813744a655b2df8d5f83b3cdc6faa3088c1d3aea1454e3a1d5f\"\n ],\n [\n \"d5e9e1da649d97d89e4868117a465a3a4f8a18de57a140d36b3f2af341a21b52\",\n \"4cb04437f391ed73111a13cc1d4dd0db1693465c2240480d8955e8592f27447a\"\n ],\n [\n \"d3ae41047dd7ca065dbf8ed77b992439983005cd72e16d6f996a5316d36966bb\",\n \"bd1aeb21ad22ebb22a10f0303417c6d964f8cdd7df0aca614b10dc14d125ac46\"\n ],\n [\n \"463e2763d885f958fc66cdd22800f0a487197d0a82e377b49f80af87c897b065\",\n \"bfefacdb0e5d0fd7df3a311a94de062b26b80c61fbc97508b79992671ef7ca7f\"\n ],\n [\n \"7985fdfd127c0567c6f53ec1bb63ec3158e597c40bfe747c83cddfc910641917\",\n \"603c12daf3d9862ef2b25fe1de289aed24ed291e0ec6708703a5bd567f32ed03\"\n ],\n [\n \"74a1ad6b5f76e39db2dd249410eac7f99e74c59cb83d2d0ed5ff1543da7703e9\",\n \"cc6157ef18c9c63cd6193d83631bbea0093e0968942e8c33d5737fd790e0db08\"\n ],\n [\n \"30682a50703375f602d416664ba19b7fc9bab42c72747463a71d0896b22f6da3\",\n \"553e04f6b018b4fa6c8f39e7f311d3176290d0e0f19ca73f17714d9977a22ff8\"\n ],\n [\n \"9e2158f0d7c0d5f26c3791efefa79597654e7a2b2464f52b1ee6c1347769ef57\",\n \"712fcdd1b9053f09003a3481fa7762e9ffd7c8ef35a38509e2fbf2629008373\"\n ],\n [\n \"176e26989a43c9cfeba4029c202538c28172e566e3c4fce7322857f3be327d66\",\n \"ed8cc9d04b29eb877d270b4878dc43c19aefd31f4eee09ee7b47834c1fa4b1c3\"\n ],\n [\n \"75d46efea3771e6e68abb89a13ad747ecf1892393dfc4f1b7004788c50374da8\",\n \"9852390a99507679fd0b86fd2b39a868d7efc22151346e1a3ca4726586a6bed8\"\n ],\n [\n \"809a20c67d64900ffb698c4c825f6d5f2310fb0451c869345b7319f645605721\",\n \"9e994980d9917e22b76b061927fa04143d096ccc54963e6a5ebfa5f3f8e286c1\"\n ],\n [\n \"1b38903a43f7f114ed4500b4eac7083fdefece1cf29c63528d563446f972c180\",\n \"4036edc931a60ae889353f77fd53de4a2708b26b6f5da72ad3394119daf408f9\"\n ]\n ]\n }\n };\n }\n });\n\n // ../../../node_modules/.pnpm/elliptic@6.6.1/node_modules/elliptic/lib/elliptic/curves.js\n var require_curves = __commonJS({\n \"../../../node_modules/.pnpm/elliptic@6.6.1/node_modules/elliptic/lib/elliptic/curves.js\"(exports3) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n var curves = exports3;\n var hash3 = require_hash();\n var curve = require_curve();\n var utils = require_utils3();\n var assert9 = utils.assert;\n function PresetCurve(options) {\n if (options.type === \"short\")\n this.curve = new curve.short(options);\n else if (options.type === \"edwards\")\n this.curve = new curve.edwards(options);\n else\n this.curve = new curve.mont(options);\n this.g = this.curve.g;\n this.n = this.curve.n;\n this.hash = options.hash;\n assert9(this.g.validate(), \"Invalid curve\");\n assert9(this.g.mul(this.n).isInfinity(), \"Invalid curve, G*N != O\");\n }\n curves.PresetCurve = PresetCurve;\n function defineCurve(name, options) {\n Object.defineProperty(curves, name, {\n configurable: true,\n enumerable: true,\n get: function() {\n var curve2 = new PresetCurve(options);\n Object.defineProperty(curves, name, {\n configurable: true,\n enumerable: true,\n value: curve2\n });\n return curve2;\n }\n });\n }\n defineCurve(\"p192\", {\n type: \"short\",\n prime: \"p192\",\n p: \"ffffffff ffffffff ffffffff fffffffe ffffffff ffffffff\",\n a: \"ffffffff ffffffff ffffffff fffffffe ffffffff fffffffc\",\n b: \"64210519 e59c80e7 0fa7e9ab 72243049 feb8deec c146b9b1\",\n n: \"ffffffff ffffffff ffffffff 99def836 146bc9b1 b4d22831\",\n hash: hash3.sha256,\n gRed: false,\n g: [\n \"188da80e b03090f6 7cbf20eb 43a18800 f4ff0afd 82ff1012\",\n \"07192b95 ffc8da78 631011ed 6b24cdd5 73f977a1 1e794811\"\n ]\n });\n defineCurve(\"p224\", {\n type: \"short\",\n prime: \"p224\",\n p: \"ffffffff ffffffff ffffffff ffffffff 00000000 00000000 00000001\",\n a: \"ffffffff ffffffff ffffffff fffffffe ffffffff ffffffff fffffffe\",\n b: \"b4050a85 0c04b3ab f5413256 5044b0b7 d7bfd8ba 270b3943 2355ffb4\",\n n: \"ffffffff ffffffff ffffffff ffff16a2 e0b8f03e 13dd2945 5c5c2a3d\",\n hash: hash3.sha256,\n gRed: false,\n g: [\n \"b70e0cbd 6bb4bf7f 321390b9 4a03c1d3 56c21122 343280d6 115c1d21\",\n \"bd376388 b5f723fb 4c22dfe6 cd4375a0 5a074764 44d58199 85007e34\"\n ]\n });\n defineCurve(\"p256\", {\n type: \"short\",\n prime: null,\n p: \"ffffffff 00000001 00000000 00000000 00000000 ffffffff ffffffff ffffffff\",\n a: \"ffffffff 00000001 00000000 00000000 00000000 ffffffff ffffffff fffffffc\",\n b: \"5ac635d8 aa3a93e7 b3ebbd55 769886bc 651d06b0 cc53b0f6 3bce3c3e 27d2604b\",\n n: \"ffffffff 00000000 ffffffff ffffffff bce6faad a7179e84 f3b9cac2 fc632551\",\n hash: hash3.sha256,\n gRed: false,\n g: [\n \"6b17d1f2 e12c4247 f8bce6e5 63a440f2 77037d81 2deb33a0 f4a13945 d898c296\",\n \"4fe342e2 fe1a7f9b 8ee7eb4a 7c0f9e16 2bce3357 6b315ece cbb64068 37bf51f5\"\n ]\n });\n defineCurve(\"p384\", {\n type: \"short\",\n prime: null,\n p: \"ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe ffffffff 00000000 00000000 ffffffff\",\n a: \"ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe ffffffff 00000000 00000000 fffffffc\",\n b: \"b3312fa7 e23ee7e4 988e056b e3f82d19 181d9c6e fe814112 0314088f 5013875a c656398d 8a2ed19d 2a85c8ed d3ec2aef\",\n n: \"ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff c7634d81 f4372ddf 581a0db2 48b0a77a ecec196a ccc52973\",\n hash: hash3.sha384,\n gRed: false,\n g: [\n \"aa87ca22 be8b0537 8eb1c71e f320ad74 6e1d3b62 8ba79b98 59f741e0 82542a38 5502f25d bf55296c 3a545e38 72760ab7\",\n \"3617de4a 96262c6f 5d9e98bf 9292dc29 f8f41dbd 289a147c e9da3113 b5f0b8c0 0a60b1ce 1d7e819d 7a431d7c 90ea0e5f\"\n ]\n });\n defineCurve(\"p521\", {\n type: \"short\",\n prime: null,\n p: \"000001ff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff\",\n a: \"000001ff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffc\",\n b: \"00000051 953eb961 8e1c9a1f 929a21a0 b68540ee a2da725b 99b315f3 b8b48991 8ef109e1 56193951 ec7e937b 1652c0bd 3bb1bf07 3573df88 3d2c34f1 ef451fd4 6b503f00\",\n n: \"000001ff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffa 51868783 bf2f966b 7fcc0148 f709a5d0 3bb5c9b8 899c47ae bb6fb71e 91386409\",\n hash: hash3.sha512,\n gRed: false,\n g: [\n \"000000c6 858e06b7 0404e9cd 9e3ecb66 2395b442 9c648139 053fb521 f828af60 6b4d3dba a14b5e77 efe75928 fe1dc127 a2ffa8de 3348b3c1 856a429b f97e7e31 c2e5bd66\",\n \"00000118 39296a78 9a3bc004 5c8a5fb4 2c7d1bd9 98f54449 579b4468 17afbd17 273e662c 97ee7299 5ef42640 c550b901 3fad0761 353c7086 a272c240 88be9476 9fd16650\"\n ]\n });\n defineCurve(\"curve25519\", {\n type: \"mont\",\n prime: \"p25519\",\n p: \"7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed\",\n a: \"76d06\",\n b: \"1\",\n n: \"1000000000000000 0000000000000000 14def9dea2f79cd6 5812631a5cf5d3ed\",\n hash: hash3.sha256,\n gRed: false,\n g: [\n \"9\"\n ]\n });\n defineCurve(\"ed25519\", {\n type: \"edwards\",\n prime: \"p25519\",\n p: \"7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed\",\n a: \"-1\",\n c: \"1\",\n // -121665 * (121666^(-1)) (mod P)\n d: \"52036cee2b6ffe73 8cc740797779e898 00700a4d4141d8ab 75eb4dca135978a3\",\n n: \"1000000000000000 0000000000000000 14def9dea2f79cd6 5812631a5cf5d3ed\",\n hash: hash3.sha256,\n gRed: false,\n g: [\n \"216936d3cd6e53fec0a4e231fdd6dc5c692cc7609525a7b2c9562d608f25d51a\",\n // 4/5\n \"6666666666666666666666666666666666666666666666666666666666666658\"\n ]\n });\n var pre;\n try {\n pre = require_secp256k1();\n } catch (e3) {\n pre = void 0;\n }\n defineCurve(\"secp256k1\", {\n type: \"short\",\n prime: \"k256\",\n p: \"ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe fffffc2f\",\n a: \"0\",\n b: \"7\",\n n: \"ffffffff ffffffff ffffffff fffffffe baaedce6 af48a03b bfd25e8c d0364141\",\n h: \"1\",\n hash: hash3.sha256,\n // Precomputed endomorphism\n beta: \"7ae96a2b657c07106e64479eac3434e99cf0497512f58995c1396c28719501ee\",\n lambda: \"5363ad4cc05c30e0a5261c028812645a122e22ea20816678df02967c1b23bd72\",\n basis: [\n {\n a: \"3086d221a7d46bcde86c90e49284eb15\",\n b: \"-e4437ed6010e88286f547fa90abfe4c3\"\n },\n {\n a: \"114ca50f7a8e2f3f657c1108d9d44cfd8\",\n b: \"3086d221a7d46bcde86c90e49284eb15\"\n }\n ],\n gRed: false,\n g: [\n \"79be667ef9dcbbac55a06295ce870b07029bfcdb2dce28d959f2815b16f81798\",\n \"483ada7726a3c4655da4fbfc0e1108a8fd17b448a68554199c47d08ffb10d4b8\",\n pre\n ]\n });\n }\n });\n\n // ../../../node_modules/.pnpm/hmac-drbg@1.0.1/node_modules/hmac-drbg/lib/hmac-drbg.js\n var require_hmac_drbg = __commonJS({\n \"../../../node_modules/.pnpm/hmac-drbg@1.0.1/node_modules/hmac-drbg/lib/hmac-drbg.js\"(exports3, module) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n var hash3 = require_hash();\n var utils = require_utils2();\n var assert9 = require_minimalistic_assert();\n function HmacDRBG(options) {\n if (!(this instanceof HmacDRBG))\n return new HmacDRBG(options);\n this.hash = options.hash;\n this.predResist = !!options.predResist;\n this.outLen = this.hash.outSize;\n this.minEntropy = options.minEntropy || this.hash.hmacStrength;\n this._reseed = null;\n this.reseedInterval = null;\n this.K = null;\n this.V = null;\n var entropy = utils.toArray(options.entropy, options.entropyEnc || \"hex\");\n var nonce = utils.toArray(options.nonce, options.nonceEnc || \"hex\");\n var pers = utils.toArray(options.pers, options.persEnc || \"hex\");\n assert9(\n entropy.length >= this.minEntropy / 8,\n \"Not enough entropy. Minimum is: \" + this.minEntropy + \" bits\"\n );\n this._init(entropy, nonce, pers);\n }\n module.exports = HmacDRBG;\n HmacDRBG.prototype._init = function init(entropy, nonce, pers) {\n var seed = entropy.concat(nonce).concat(pers);\n this.K = new Array(this.outLen / 8);\n this.V = new Array(this.outLen / 8);\n for (var i3 = 0; i3 < this.V.length; i3++) {\n this.K[i3] = 0;\n this.V[i3] = 1;\n }\n this._update(seed);\n this._reseed = 1;\n this.reseedInterval = 281474976710656;\n };\n HmacDRBG.prototype._hmac = function hmac2() {\n return new hash3.hmac(this.hash, this.K);\n };\n HmacDRBG.prototype._update = function update(seed) {\n var kmac = this._hmac().update(this.V).update([0]);\n if (seed)\n kmac = kmac.update(seed);\n this.K = kmac.digest();\n this.V = this._hmac().update(this.V).digest();\n if (!seed)\n return;\n this.K = this._hmac().update(this.V).update([1]).update(seed).digest();\n this.V = this._hmac().update(this.V).digest();\n };\n HmacDRBG.prototype.reseed = function reseed(entropy, entropyEnc, add2, addEnc) {\n if (typeof entropyEnc !== \"string\") {\n addEnc = add2;\n add2 = entropyEnc;\n entropyEnc = null;\n }\n entropy = utils.toArray(entropy, entropyEnc);\n add2 = utils.toArray(add2, addEnc);\n assert9(\n entropy.length >= this.minEntropy / 8,\n \"Not enough entropy. Minimum is: \" + this.minEntropy + \" bits\"\n );\n this._update(entropy.concat(add2 || []));\n this._reseed = 1;\n };\n HmacDRBG.prototype.generate = function generate(len, enc, add2, addEnc) {\n if (this._reseed > this.reseedInterval)\n throw new Error(\"Reseed is required\");\n if (typeof enc !== \"string\") {\n addEnc = add2;\n add2 = enc;\n enc = null;\n }\n if (add2) {\n add2 = utils.toArray(add2, addEnc || \"hex\");\n this._update(add2);\n }\n var temp = [];\n while (temp.length < len) {\n this.V = this._hmac().update(this.V).digest();\n temp = temp.concat(this.V);\n }\n var res = temp.slice(0, len);\n this._update(add2);\n this._reseed++;\n return utils.encode(res, enc);\n };\n }\n });\n\n // ../../../node_modules/.pnpm/elliptic@6.6.1/node_modules/elliptic/lib/elliptic/ec/key.js\n var require_key = __commonJS({\n \"../../../node_modules/.pnpm/elliptic@6.6.1/node_modules/elliptic/lib/elliptic/ec/key.js\"(exports3, module) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n var BN = require_bn2();\n var utils = require_utils3();\n var assert9 = utils.assert;\n function KeyPair(ec, options) {\n this.ec = ec;\n this.priv = null;\n this.pub = null;\n if (options.priv)\n this._importPrivate(options.priv, options.privEnc);\n if (options.pub)\n this._importPublic(options.pub, options.pubEnc);\n }\n module.exports = KeyPair;\n KeyPair.fromPublic = function fromPublic(ec, pub, enc) {\n if (pub instanceof KeyPair)\n return pub;\n return new KeyPair(ec, {\n pub,\n pubEnc: enc\n });\n };\n KeyPair.fromPrivate = function fromPrivate(ec, priv, enc) {\n if (priv instanceof KeyPair)\n return priv;\n return new KeyPair(ec, {\n priv,\n privEnc: enc\n });\n };\n KeyPair.prototype.validate = function validate6() {\n var pub = this.getPublic();\n if (pub.isInfinity())\n return { result: false, reason: \"Invalid public key\" };\n if (!pub.validate())\n return { result: false, reason: \"Public key is not a point\" };\n if (!pub.mul(this.ec.curve.n).isInfinity())\n return { result: false, reason: \"Public key * N != O\" };\n return { result: true, reason: null };\n };\n KeyPair.prototype.getPublic = function getPublic(compact, enc) {\n if (typeof compact === \"string\") {\n enc = compact;\n compact = null;\n }\n if (!this.pub)\n this.pub = this.ec.g.mul(this.priv);\n if (!enc)\n return this.pub;\n return this.pub.encode(enc, compact);\n };\n KeyPair.prototype.getPrivate = function getPrivate(enc) {\n if (enc === \"hex\")\n return this.priv.toString(16, 2);\n else\n return this.priv;\n };\n KeyPair.prototype._importPrivate = function _importPrivate(key, enc) {\n this.priv = new BN(key, enc || 16);\n this.priv = this.priv.umod(this.ec.curve.n);\n };\n KeyPair.prototype._importPublic = function _importPublic(key, enc) {\n if (key.x || key.y) {\n if (this.ec.curve.type === \"mont\") {\n assert9(key.x, \"Need x coordinate\");\n } else if (this.ec.curve.type === \"short\" || this.ec.curve.type === \"edwards\") {\n assert9(key.x && key.y, \"Need both x and y coordinate\");\n }\n this.pub = this.ec.curve.point(key.x, key.y);\n return;\n }\n this.pub = this.ec.curve.decodePoint(key, enc);\n };\n KeyPair.prototype.derive = function derive(pub) {\n if (!pub.validate()) {\n assert9(pub.validate(), \"public point not validated\");\n }\n return pub.mul(this.priv).getX();\n };\n KeyPair.prototype.sign = function sign3(msg, enc, options) {\n return this.ec.sign(msg, this, enc, options);\n };\n KeyPair.prototype.verify = function verify(msg, signature, options) {\n return this.ec.verify(msg, signature, this, void 0, options);\n };\n KeyPair.prototype.inspect = function inspect() {\n return \"\";\n };\n }\n });\n\n // ../../../node_modules/.pnpm/elliptic@6.6.1/node_modules/elliptic/lib/elliptic/ec/signature.js\n var require_signature = __commonJS({\n \"../../../node_modules/.pnpm/elliptic@6.6.1/node_modules/elliptic/lib/elliptic/ec/signature.js\"(exports3, module) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n var BN = require_bn2();\n var utils = require_utils3();\n var assert9 = utils.assert;\n function Signature2(options, enc) {\n if (options instanceof Signature2)\n return options;\n if (this._importDER(options, enc))\n return;\n assert9(options.r && options.s, \"Signature without r or s\");\n this.r = new BN(options.r, 16);\n this.s = new BN(options.s, 16);\n if (options.recoveryParam === void 0)\n this.recoveryParam = null;\n else\n this.recoveryParam = options.recoveryParam;\n }\n module.exports = Signature2;\n function Position() {\n this.place = 0;\n }\n function getLength(buf, p4) {\n var initial = buf[p4.place++];\n if (!(initial & 128)) {\n return initial;\n }\n var octetLen = initial & 15;\n if (octetLen === 0 || octetLen > 4) {\n return false;\n }\n if (buf[p4.place] === 0) {\n return false;\n }\n var val = 0;\n for (var i3 = 0, off2 = p4.place; i3 < octetLen; i3++, off2++) {\n val <<= 8;\n val |= buf[off2];\n val >>>= 0;\n }\n if (val <= 127) {\n return false;\n }\n p4.place = off2;\n return val;\n }\n function rmPadding(buf) {\n var i3 = 0;\n var len = buf.length - 1;\n while (!buf[i3] && !(buf[i3 + 1] & 128) && i3 < len) {\n i3++;\n }\n if (i3 === 0) {\n return buf;\n }\n return buf.slice(i3);\n }\n Signature2.prototype._importDER = function _importDER(data, enc) {\n data = utils.toArray(data, enc);\n var p4 = new Position();\n if (data[p4.place++] !== 48) {\n return false;\n }\n var len = getLength(data, p4);\n if (len === false) {\n return false;\n }\n if (len + p4.place !== data.length) {\n return false;\n }\n if (data[p4.place++] !== 2) {\n return false;\n }\n var rlen = getLength(data, p4);\n if (rlen === false) {\n return false;\n }\n if ((data[p4.place] & 128) !== 0) {\n return false;\n }\n var r2 = data.slice(p4.place, rlen + p4.place);\n p4.place += rlen;\n if (data[p4.place++] !== 2) {\n return false;\n }\n var slen = getLength(data, p4);\n if (slen === false) {\n return false;\n }\n if (data.length !== slen + p4.place) {\n return false;\n }\n if ((data[p4.place] & 128) !== 0) {\n return false;\n }\n var s4 = data.slice(p4.place, slen + p4.place);\n if (r2[0] === 0) {\n if (r2[1] & 128) {\n r2 = r2.slice(1);\n } else {\n return false;\n }\n }\n if (s4[0] === 0) {\n if (s4[1] & 128) {\n s4 = s4.slice(1);\n } else {\n return false;\n }\n }\n this.r = new BN(r2);\n this.s = new BN(s4);\n this.recoveryParam = null;\n return true;\n };\n function constructLength(arr, len) {\n if (len < 128) {\n arr.push(len);\n return;\n }\n var octets = 1 + (Math.log(len) / Math.LN2 >>> 3);\n arr.push(octets | 128);\n while (--octets) {\n arr.push(len >>> (octets << 3) & 255);\n }\n arr.push(len);\n }\n Signature2.prototype.toDER = function toDER(enc) {\n var r2 = this.r.toArray();\n var s4 = this.s.toArray();\n if (r2[0] & 128)\n r2 = [0].concat(r2);\n if (s4[0] & 128)\n s4 = [0].concat(s4);\n r2 = rmPadding(r2);\n s4 = rmPadding(s4);\n while (!s4[0] && !(s4[1] & 128)) {\n s4 = s4.slice(1);\n }\n var arr = [2];\n constructLength(arr, r2.length);\n arr = arr.concat(r2);\n arr.push(2);\n constructLength(arr, s4.length);\n var backHalf = arr.concat(s4);\n var res = [48];\n constructLength(res, backHalf.length);\n res = res.concat(backHalf);\n return utils.encode(res, enc);\n };\n }\n });\n\n // ../../../node_modules/.pnpm/elliptic@6.6.1/node_modules/elliptic/lib/elliptic/ec/index.js\n var require_ec = __commonJS({\n \"../../../node_modules/.pnpm/elliptic@6.6.1/node_modules/elliptic/lib/elliptic/ec/index.js\"(exports3, module) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n var BN = require_bn2();\n var HmacDRBG = require_hmac_drbg();\n var utils = require_utils3();\n var curves = require_curves();\n var rand = require_brorand();\n var assert9 = utils.assert;\n var KeyPair = require_key();\n var Signature2 = require_signature();\n function EC(options) {\n if (!(this instanceof EC))\n return new EC(options);\n if (typeof options === \"string\") {\n assert9(\n Object.prototype.hasOwnProperty.call(curves, options),\n \"Unknown curve \" + options\n );\n options = curves[options];\n }\n if (options instanceof curves.PresetCurve)\n options = { curve: options };\n this.curve = options.curve.curve;\n this.n = this.curve.n;\n this.nh = this.n.ushrn(1);\n this.g = this.curve.g;\n this.g = options.curve.g;\n this.g.precompute(options.curve.n.bitLength() + 1);\n this.hash = options.hash || options.curve.hash;\n }\n module.exports = EC;\n EC.prototype.keyPair = function keyPair(options) {\n return new KeyPair(this, options);\n };\n EC.prototype.keyFromPrivate = function keyFromPrivate(priv, enc) {\n return KeyPair.fromPrivate(this, priv, enc);\n };\n EC.prototype.keyFromPublic = function keyFromPublic(pub, enc) {\n return KeyPair.fromPublic(this, pub, enc);\n };\n EC.prototype.genKeyPair = function genKeyPair(options) {\n if (!options)\n options = {};\n var drbg = new HmacDRBG({\n hash: this.hash,\n pers: options.pers,\n persEnc: options.persEnc || \"utf8\",\n entropy: options.entropy || rand(this.hash.hmacStrength),\n entropyEnc: options.entropy && options.entropyEnc || \"utf8\",\n nonce: this.n.toArray()\n });\n var bytes = this.n.byteLength();\n var ns2 = this.n.sub(new BN(2));\n for (; ; ) {\n var priv = new BN(drbg.generate(bytes));\n if (priv.cmp(ns2) > 0)\n continue;\n priv.iaddn(1);\n return this.keyFromPrivate(priv);\n }\n };\n EC.prototype._truncateToN = function _truncateToN(msg, truncOnly, bitLength) {\n var byteLength;\n if (BN.isBN(msg) || typeof msg === \"number\") {\n msg = new BN(msg, 16);\n byteLength = msg.byteLength();\n } else if (typeof msg === \"object\") {\n byteLength = msg.length;\n msg = new BN(msg, 16);\n } else {\n var str = msg.toString();\n byteLength = str.length + 1 >>> 1;\n msg = new BN(str, 16);\n }\n if (typeof bitLength !== \"number\") {\n bitLength = byteLength * 8;\n }\n var delta = bitLength - this.n.bitLength();\n if (delta > 0)\n msg = msg.ushrn(delta);\n if (!truncOnly && msg.cmp(this.n) >= 0)\n return msg.sub(this.n);\n else\n return msg;\n };\n EC.prototype.sign = function sign3(msg, key, enc, options) {\n if (typeof enc === \"object\") {\n options = enc;\n enc = null;\n }\n if (!options)\n options = {};\n if (typeof msg !== \"string\" && typeof msg !== \"number\" && !BN.isBN(msg)) {\n assert9(\n typeof msg === \"object\" && msg && typeof msg.length === \"number\",\n \"Expected message to be an array-like, a hex string, or a BN instance\"\n );\n assert9(msg.length >>> 0 === msg.length);\n for (var i3 = 0; i3 < msg.length; i3++)\n assert9((msg[i3] & 255) === msg[i3]);\n }\n key = this.keyFromPrivate(key, enc);\n msg = this._truncateToN(msg, false, options.msgBitLength);\n assert9(!msg.isNeg(), \"Can not sign a negative message\");\n var bytes = this.n.byteLength();\n var bkey = key.getPrivate().toArray(\"be\", bytes);\n var nonce = msg.toArray(\"be\", bytes);\n assert9(new BN(nonce).eq(msg), \"Can not sign message\");\n var drbg = new HmacDRBG({\n hash: this.hash,\n entropy: bkey,\n nonce,\n pers: options.pers,\n persEnc: options.persEnc || \"utf8\"\n });\n var ns1 = this.n.sub(new BN(1));\n for (var iter = 0; ; iter++) {\n var k4 = options.k ? options.k(iter) : new BN(drbg.generate(this.n.byteLength()));\n k4 = this._truncateToN(k4, true);\n if (k4.cmpn(1) <= 0 || k4.cmp(ns1) >= 0)\n continue;\n var kp = this.g.mul(k4);\n if (kp.isInfinity())\n continue;\n var kpX = kp.getX();\n var r2 = kpX.umod(this.n);\n if (r2.cmpn(0) === 0)\n continue;\n var s4 = k4.invm(this.n).mul(r2.mul(key.getPrivate()).iadd(msg));\n s4 = s4.umod(this.n);\n if (s4.cmpn(0) === 0)\n continue;\n var recoveryParam = (kp.getY().isOdd() ? 1 : 0) | (kpX.cmp(r2) !== 0 ? 2 : 0);\n if (options.canonical && s4.cmp(this.nh) > 0) {\n s4 = this.n.sub(s4);\n recoveryParam ^= 1;\n }\n return new Signature2({ r: r2, s: s4, recoveryParam });\n }\n };\n EC.prototype.verify = function verify(msg, signature, key, enc, options) {\n if (!options)\n options = {};\n msg = this._truncateToN(msg, false, options.msgBitLength);\n key = this.keyFromPublic(key, enc);\n signature = new Signature2(signature, \"hex\");\n var r2 = signature.r;\n var s4 = signature.s;\n if (r2.cmpn(1) < 0 || r2.cmp(this.n) >= 0)\n return false;\n if (s4.cmpn(1) < 0 || s4.cmp(this.n) >= 0)\n return false;\n var sinv = s4.invm(this.n);\n var u1 = sinv.mul(msg).umod(this.n);\n var u2 = sinv.mul(r2).umod(this.n);\n var p4;\n if (!this.curve._maxwellTrick) {\n p4 = this.g.mulAdd(u1, key.getPublic(), u2);\n if (p4.isInfinity())\n return false;\n return p4.getX().umod(this.n).cmp(r2) === 0;\n }\n p4 = this.g.jmulAdd(u1, key.getPublic(), u2);\n if (p4.isInfinity())\n return false;\n return p4.eqXToP(r2);\n };\n EC.prototype.recoverPubKey = function(msg, signature, j2, enc) {\n assert9((3 & j2) === j2, \"The recovery param is more than two bits\");\n signature = new Signature2(signature, enc);\n var n2 = this.n;\n var e3 = new BN(msg);\n var r2 = signature.r;\n var s4 = signature.s;\n var isYOdd = j2 & 1;\n var isSecondKey = j2 >> 1;\n if (r2.cmp(this.curve.p.umod(this.curve.n)) >= 0 && isSecondKey)\n throw new Error(\"Unable to find sencond key candinate\");\n if (isSecondKey)\n r2 = this.curve.pointFromX(r2.add(this.curve.n), isYOdd);\n else\n r2 = this.curve.pointFromX(r2, isYOdd);\n var rInv = signature.r.invm(n2);\n var s1 = n2.sub(e3).mul(rInv).umod(n2);\n var s22 = s4.mul(rInv).umod(n2);\n return this.g.mulAdd(s1, r2, s22);\n };\n EC.prototype.getKeyRecoveryParam = function(e3, signature, Q2, enc) {\n signature = new Signature2(signature, enc);\n if (signature.recoveryParam !== null)\n return signature.recoveryParam;\n for (var i3 = 0; i3 < 4; i3++) {\n var Qprime;\n try {\n Qprime = this.recoverPubKey(e3, signature, i3);\n } catch (e4) {\n continue;\n }\n if (Qprime.eq(Q2))\n return i3;\n }\n throw new Error(\"Unable to find valid recovery factor\");\n };\n }\n });\n\n // ../../../node_modules/.pnpm/elliptic@6.6.1/node_modules/elliptic/lib/elliptic/eddsa/key.js\n var require_key2 = __commonJS({\n \"../../../node_modules/.pnpm/elliptic@6.6.1/node_modules/elliptic/lib/elliptic/eddsa/key.js\"(exports3, module) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n var utils = require_utils3();\n var assert9 = utils.assert;\n var parseBytes = utils.parseBytes;\n var cachedProperty = utils.cachedProperty;\n function KeyPair(eddsa, params) {\n this.eddsa = eddsa;\n this._secret = parseBytes(params.secret);\n if (eddsa.isPoint(params.pub))\n this._pub = params.pub;\n else\n this._pubBytes = parseBytes(params.pub);\n }\n KeyPair.fromPublic = function fromPublic(eddsa, pub) {\n if (pub instanceof KeyPair)\n return pub;\n return new KeyPair(eddsa, { pub });\n };\n KeyPair.fromSecret = function fromSecret(eddsa, secret) {\n if (secret instanceof KeyPair)\n return secret;\n return new KeyPair(eddsa, { secret });\n };\n KeyPair.prototype.secret = function secret() {\n return this._secret;\n };\n cachedProperty(KeyPair, \"pubBytes\", function pubBytes() {\n return this.eddsa.encodePoint(this.pub());\n });\n cachedProperty(KeyPair, \"pub\", function pub() {\n if (this._pubBytes)\n return this.eddsa.decodePoint(this._pubBytes);\n return this.eddsa.g.mul(this.priv());\n });\n cachedProperty(KeyPair, \"privBytes\", function privBytes() {\n var eddsa = this.eddsa;\n var hash3 = this.hash();\n var lastIx = eddsa.encodingLength - 1;\n var a3 = hash3.slice(0, eddsa.encodingLength);\n a3[0] &= 248;\n a3[lastIx] &= 127;\n a3[lastIx] |= 64;\n return a3;\n });\n cachedProperty(KeyPair, \"priv\", function priv() {\n return this.eddsa.decodeInt(this.privBytes());\n });\n cachedProperty(KeyPair, \"hash\", function hash3() {\n return this.eddsa.hash().update(this.secret()).digest();\n });\n cachedProperty(KeyPair, \"messagePrefix\", function messagePrefix() {\n return this.hash().slice(this.eddsa.encodingLength);\n });\n KeyPair.prototype.sign = function sign3(message) {\n assert9(this._secret, \"KeyPair can only verify\");\n return this.eddsa.sign(message, this);\n };\n KeyPair.prototype.verify = function verify(message, sig) {\n return this.eddsa.verify(message, sig, this);\n };\n KeyPair.prototype.getSecret = function getSecret(enc) {\n assert9(this._secret, \"KeyPair is public only\");\n return utils.encode(this.secret(), enc);\n };\n KeyPair.prototype.getPublic = function getPublic(enc) {\n return utils.encode(this.pubBytes(), enc);\n };\n module.exports = KeyPair;\n }\n });\n\n // ../../../node_modules/.pnpm/elliptic@6.6.1/node_modules/elliptic/lib/elliptic/eddsa/signature.js\n var require_signature2 = __commonJS({\n \"../../../node_modules/.pnpm/elliptic@6.6.1/node_modules/elliptic/lib/elliptic/eddsa/signature.js\"(exports3, module) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n var BN = require_bn2();\n var utils = require_utils3();\n var assert9 = utils.assert;\n var cachedProperty = utils.cachedProperty;\n var parseBytes = utils.parseBytes;\n function Signature2(eddsa, sig) {\n this.eddsa = eddsa;\n if (typeof sig !== \"object\")\n sig = parseBytes(sig);\n if (Array.isArray(sig)) {\n assert9(sig.length === eddsa.encodingLength * 2, \"Signature has invalid size\");\n sig = {\n R: sig.slice(0, eddsa.encodingLength),\n S: sig.slice(eddsa.encodingLength)\n };\n }\n assert9(sig.R && sig.S, \"Signature without R or S\");\n if (eddsa.isPoint(sig.R))\n this._R = sig.R;\n if (sig.S instanceof BN)\n this._S = sig.S;\n this._Rencoded = Array.isArray(sig.R) ? sig.R : sig.Rencoded;\n this._Sencoded = Array.isArray(sig.S) ? sig.S : sig.Sencoded;\n }\n cachedProperty(Signature2, \"S\", function S3() {\n return this.eddsa.decodeInt(this.Sencoded());\n });\n cachedProperty(Signature2, \"R\", function R3() {\n return this.eddsa.decodePoint(this.Rencoded());\n });\n cachedProperty(Signature2, \"Rencoded\", function Rencoded() {\n return this.eddsa.encodePoint(this.R());\n });\n cachedProperty(Signature2, \"Sencoded\", function Sencoded() {\n return this.eddsa.encodeInt(this.S());\n });\n Signature2.prototype.toBytes = function toBytes5() {\n return this.Rencoded().concat(this.Sencoded());\n };\n Signature2.prototype.toHex = function toHex3() {\n return utils.encode(this.toBytes(), \"hex\").toUpperCase();\n };\n module.exports = Signature2;\n }\n });\n\n // ../../../node_modules/.pnpm/elliptic@6.6.1/node_modules/elliptic/lib/elliptic/eddsa/index.js\n var require_eddsa = __commonJS({\n \"../../../node_modules/.pnpm/elliptic@6.6.1/node_modules/elliptic/lib/elliptic/eddsa/index.js\"(exports3, module) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n var hash3 = require_hash();\n var curves = require_curves();\n var utils = require_utils3();\n var assert9 = utils.assert;\n var parseBytes = utils.parseBytes;\n var KeyPair = require_key2();\n var Signature2 = require_signature2();\n function EDDSA(curve) {\n assert9(curve === \"ed25519\", \"only tested with ed25519 so far\");\n if (!(this instanceof EDDSA))\n return new EDDSA(curve);\n curve = curves[curve].curve;\n this.curve = curve;\n this.g = curve.g;\n this.g.precompute(curve.n.bitLength() + 1);\n this.pointClass = curve.point().constructor;\n this.encodingLength = Math.ceil(curve.n.bitLength() / 8);\n this.hash = hash3.sha512;\n }\n module.exports = EDDSA;\n EDDSA.prototype.sign = function sign3(message, secret) {\n message = parseBytes(message);\n var key = this.keyFromSecret(secret);\n var r2 = this.hashInt(key.messagePrefix(), message);\n var R3 = this.g.mul(r2);\n var Rencoded = this.encodePoint(R3);\n var s_ = this.hashInt(Rencoded, key.pubBytes(), message).mul(key.priv());\n var S3 = r2.add(s_).umod(this.curve.n);\n return this.makeSignature({ R: R3, S: S3, Rencoded });\n };\n EDDSA.prototype.verify = function verify(message, sig, pub) {\n message = parseBytes(message);\n sig = this.makeSignature(sig);\n if (sig.S().gte(sig.eddsa.curve.n) || sig.S().isNeg()) {\n return false;\n }\n var key = this.keyFromPublic(pub);\n var h4 = this.hashInt(sig.Rencoded(), key.pubBytes(), message);\n var SG = this.g.mul(sig.S());\n var RplusAh = sig.R().add(key.pub().mul(h4));\n return RplusAh.eq(SG);\n };\n EDDSA.prototype.hashInt = function hashInt() {\n var hash4 = this.hash();\n for (var i3 = 0; i3 < arguments.length; i3++)\n hash4.update(arguments[i3]);\n return utils.intFromLE(hash4.digest()).umod(this.curve.n);\n };\n EDDSA.prototype.keyFromPublic = function keyFromPublic(pub) {\n return KeyPair.fromPublic(this, pub);\n };\n EDDSA.prototype.keyFromSecret = function keyFromSecret(secret) {\n return KeyPair.fromSecret(this, secret);\n };\n EDDSA.prototype.makeSignature = function makeSignature(sig) {\n if (sig instanceof Signature2)\n return sig;\n return new Signature2(this, sig);\n };\n EDDSA.prototype.encodePoint = function encodePoint(point) {\n var enc = point.getY().toArray(\"le\", this.encodingLength);\n enc[this.encodingLength - 1] |= point.getX().isOdd() ? 128 : 0;\n return enc;\n };\n EDDSA.prototype.decodePoint = function decodePoint(bytes) {\n bytes = utils.parseBytes(bytes);\n var lastIx = bytes.length - 1;\n var normed = bytes.slice(0, lastIx).concat(bytes[lastIx] & ~128);\n var xIsOdd = (bytes[lastIx] & 128) !== 0;\n var y6 = utils.intFromLE(normed);\n return this.curve.pointFromY(y6, xIsOdd);\n };\n EDDSA.prototype.encodeInt = function encodeInt(num2) {\n return num2.toArray(\"le\", this.encodingLength);\n };\n EDDSA.prototype.decodeInt = function decodeInt(bytes) {\n return utils.intFromLE(bytes);\n };\n EDDSA.prototype.isPoint = function isPoint(val) {\n return val instanceof this.pointClass;\n };\n }\n });\n\n // ../../../node_modules/.pnpm/elliptic@6.6.1/node_modules/elliptic/lib/elliptic.js\n var require_elliptic = __commonJS({\n \"../../../node_modules/.pnpm/elliptic@6.6.1/node_modules/elliptic/lib/elliptic.js\"(exports3) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n var elliptic = exports3;\n elliptic.version = require_package().version;\n elliptic.utils = require_utils3();\n elliptic.rand = require_brorand();\n elliptic.curve = require_curve();\n elliptic.curves = require_curves();\n elliptic.ec = require_ec();\n elliptic.eddsa = require_eddsa();\n }\n });\n\n // ../../../node_modules/.pnpm/@ethersproject+signing-key@5.8.0/node_modules/@ethersproject/signing-key/lib/elliptic.js\n var require_elliptic2 = __commonJS({\n \"../../../node_modules/.pnpm/@ethersproject+signing-key@5.8.0/node_modules/@ethersproject/signing-key/lib/elliptic.js\"(exports3) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n var __importDefault3 = exports3 && exports3.__importDefault || function(mod3) {\n return mod3 && mod3.__esModule ? mod3 : { \"default\": mod3 };\n };\n Object.defineProperty(exports3, \"__esModule\", { value: true });\n exports3.EC = void 0;\n var elliptic_1 = __importDefault3(require_elliptic());\n var EC = elliptic_1.default.ec;\n exports3.EC = EC;\n }\n });\n\n // ../../../node_modules/.pnpm/@ethersproject+signing-key@5.8.0/node_modules/@ethersproject/signing-key/lib/_version.js\n var require_version12 = __commonJS({\n \"../../../node_modules/.pnpm/@ethersproject+signing-key@5.8.0/node_modules/@ethersproject/signing-key/lib/_version.js\"(exports3) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n Object.defineProperty(exports3, \"__esModule\", { value: true });\n exports3.version = void 0;\n exports3.version = \"signing-key/5.8.0\";\n }\n });\n\n // ../../../node_modules/.pnpm/@ethersproject+signing-key@5.8.0/node_modules/@ethersproject/signing-key/lib/index.js\n var require_lib16 = __commonJS({\n \"../../../node_modules/.pnpm/@ethersproject+signing-key@5.8.0/node_modules/@ethersproject/signing-key/lib/index.js\"(exports3) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n Object.defineProperty(exports3, \"__esModule\", { value: true });\n exports3.computePublicKey = exports3.recoverPublicKey = exports3.SigningKey = void 0;\n var elliptic_1 = require_elliptic2();\n var bytes_1 = require_lib2();\n var properties_1 = require_lib4();\n var logger_1 = require_lib();\n var _version_1 = require_version12();\n var logger = new logger_1.Logger(_version_1.version);\n var _curve = null;\n function getCurve() {\n if (!_curve) {\n _curve = new elliptic_1.EC(\"secp256k1\");\n }\n return _curve;\n }\n var SigningKey = (\n /** @class */\n function() {\n function SigningKey2(privateKey) {\n (0, properties_1.defineReadOnly)(this, \"curve\", \"secp256k1\");\n (0, properties_1.defineReadOnly)(this, \"privateKey\", (0, bytes_1.hexlify)(privateKey));\n if ((0, bytes_1.hexDataLength)(this.privateKey) !== 32) {\n logger.throwArgumentError(\"invalid private key\", \"privateKey\", \"[[ REDACTED ]]\");\n }\n var keyPair = getCurve().keyFromPrivate((0, bytes_1.arrayify)(this.privateKey));\n (0, properties_1.defineReadOnly)(this, \"publicKey\", \"0x\" + keyPair.getPublic(false, \"hex\"));\n (0, properties_1.defineReadOnly)(this, \"compressedPublicKey\", \"0x\" + keyPair.getPublic(true, \"hex\"));\n (0, properties_1.defineReadOnly)(this, \"_isSigningKey\", true);\n }\n SigningKey2.prototype._addPoint = function(other) {\n var p0 = getCurve().keyFromPublic((0, bytes_1.arrayify)(this.publicKey));\n var p1 = getCurve().keyFromPublic((0, bytes_1.arrayify)(other));\n return \"0x\" + p0.pub.add(p1.pub).encodeCompressed(\"hex\");\n };\n SigningKey2.prototype.signDigest = function(digest) {\n var keyPair = getCurve().keyFromPrivate((0, bytes_1.arrayify)(this.privateKey));\n var digestBytes = (0, bytes_1.arrayify)(digest);\n if (digestBytes.length !== 32) {\n logger.throwArgumentError(\"bad digest length\", \"digest\", digest);\n }\n var signature = keyPair.sign(digestBytes, { canonical: true });\n return (0, bytes_1.splitSignature)({\n recoveryParam: signature.recoveryParam,\n r: (0, bytes_1.hexZeroPad)(\"0x\" + signature.r.toString(16), 32),\n s: (0, bytes_1.hexZeroPad)(\"0x\" + signature.s.toString(16), 32)\n });\n };\n SigningKey2.prototype.computeSharedSecret = function(otherKey) {\n var keyPair = getCurve().keyFromPrivate((0, bytes_1.arrayify)(this.privateKey));\n var otherKeyPair = getCurve().keyFromPublic((0, bytes_1.arrayify)(computePublicKey(otherKey)));\n return (0, bytes_1.hexZeroPad)(\"0x\" + keyPair.derive(otherKeyPair.getPublic()).toString(16), 32);\n };\n SigningKey2.isSigningKey = function(value) {\n return !!(value && value._isSigningKey);\n };\n return SigningKey2;\n }()\n );\n exports3.SigningKey = SigningKey;\n function recoverPublicKey3(digest, signature) {\n var sig = (0, bytes_1.splitSignature)(signature);\n var rs = { r: (0, bytes_1.arrayify)(sig.r), s: (0, bytes_1.arrayify)(sig.s) };\n return \"0x\" + getCurve().recoverPubKey((0, bytes_1.arrayify)(digest), rs, sig.recoveryParam).encode(\"hex\", false);\n }\n exports3.recoverPublicKey = recoverPublicKey3;\n function computePublicKey(key, compressed) {\n var bytes = (0, bytes_1.arrayify)(key);\n if (bytes.length === 32) {\n var signingKey = new SigningKey(bytes);\n if (compressed) {\n return \"0x\" + getCurve().keyFromPrivate(bytes).getPublic(true, \"hex\");\n }\n return signingKey.publicKey;\n } else if (bytes.length === 33) {\n if (compressed) {\n return (0, bytes_1.hexlify)(bytes);\n }\n return \"0x\" + getCurve().keyFromPublic(bytes).getPublic(false, \"hex\");\n } else if (bytes.length === 65) {\n if (!compressed) {\n return (0, bytes_1.hexlify)(bytes);\n }\n return \"0x\" + getCurve().keyFromPublic(bytes).getPublic(true, \"hex\");\n }\n return logger.throwArgumentError(\"invalid public or private key\", \"key\", \"[REDACTED]\");\n }\n exports3.computePublicKey = computePublicKey;\n }\n });\n\n // ../../../node_modules/.pnpm/@ethersproject+transactions@5.8.0/node_modules/@ethersproject/transactions/lib/_version.js\n var require_version13 = __commonJS({\n \"../../../node_modules/.pnpm/@ethersproject+transactions@5.8.0/node_modules/@ethersproject/transactions/lib/_version.js\"(exports3) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n Object.defineProperty(exports3, \"__esModule\", { value: true });\n exports3.version = void 0;\n exports3.version = \"transactions/5.8.0\";\n }\n });\n\n // ../../../node_modules/.pnpm/@ethersproject+transactions@5.8.0/node_modules/@ethersproject/transactions/lib/index.js\n var require_lib17 = __commonJS({\n \"../../../node_modules/.pnpm/@ethersproject+transactions@5.8.0/node_modules/@ethersproject/transactions/lib/index.js\"(exports3) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n var __createBinding3 = exports3 && exports3.__createBinding || (Object.create ? function(o5, m2, k4, k22) {\n if (k22 === void 0)\n k22 = k4;\n Object.defineProperty(o5, k22, { enumerable: true, get: function() {\n return m2[k4];\n } });\n } : function(o5, m2, k4, k22) {\n if (k22 === void 0)\n k22 = k4;\n o5[k22] = m2[k4];\n });\n var __setModuleDefault3 = exports3 && exports3.__setModuleDefault || (Object.create ? function(o5, v2) {\n Object.defineProperty(o5, \"default\", { enumerable: true, value: v2 });\n } : function(o5, v2) {\n o5[\"default\"] = v2;\n });\n var __importStar3 = exports3 && exports3.__importStar || function(mod3) {\n if (mod3 && mod3.__esModule)\n return mod3;\n var result = {};\n if (mod3 != null) {\n for (var k4 in mod3)\n if (k4 !== \"default\" && Object.prototype.hasOwnProperty.call(mod3, k4))\n __createBinding3(result, mod3, k4);\n }\n __setModuleDefault3(result, mod3);\n return result;\n };\n Object.defineProperty(exports3, \"__esModule\", { value: true });\n exports3.parse = exports3.serialize = exports3.accessListify = exports3.recoverAddress = exports3.computeAddress = exports3.TransactionTypes = void 0;\n var address_1 = require_lib7();\n var bignumber_1 = require_lib3();\n var bytes_1 = require_lib2();\n var constants_1 = require_lib8();\n var keccak256_1 = require_lib5();\n var properties_1 = require_lib4();\n var RLP = __importStar3(require_lib6());\n var signing_key_1 = require_lib16();\n var logger_1 = require_lib();\n var _version_1 = require_version13();\n var logger = new logger_1.Logger(_version_1.version);\n var TransactionTypes;\n (function(TransactionTypes2) {\n TransactionTypes2[TransactionTypes2[\"legacy\"] = 0] = \"legacy\";\n TransactionTypes2[TransactionTypes2[\"eip2930\"] = 1] = \"eip2930\";\n TransactionTypes2[TransactionTypes2[\"eip1559\"] = 2] = \"eip1559\";\n })(TransactionTypes = exports3.TransactionTypes || (exports3.TransactionTypes = {}));\n function handleAddress(value) {\n if (value === \"0x\") {\n return null;\n }\n return (0, address_1.getAddress)(value);\n }\n function handleNumber(value) {\n if (value === \"0x\") {\n return constants_1.Zero;\n }\n return bignumber_1.BigNumber.from(value);\n }\n var transactionFields = [\n { name: \"nonce\", maxLength: 32, numeric: true },\n { name: \"gasPrice\", maxLength: 32, numeric: true },\n { name: \"gasLimit\", maxLength: 32, numeric: true },\n { name: \"to\", length: 20 },\n { name: \"value\", maxLength: 32, numeric: true },\n { name: \"data\" }\n ];\n var allowedTransactionKeys = {\n chainId: true,\n data: true,\n gasLimit: true,\n gasPrice: true,\n nonce: true,\n to: true,\n type: true,\n value: true\n };\n function computeAddress(key) {\n var publicKey = (0, signing_key_1.computePublicKey)(key);\n return (0, address_1.getAddress)((0, bytes_1.hexDataSlice)((0, keccak256_1.keccak256)((0, bytes_1.hexDataSlice)(publicKey, 1)), 12));\n }\n exports3.computeAddress = computeAddress;\n function recoverAddress3(digest, signature) {\n return computeAddress((0, signing_key_1.recoverPublicKey)((0, bytes_1.arrayify)(digest), signature));\n }\n exports3.recoverAddress = recoverAddress3;\n function formatNumber(value, name) {\n var result = (0, bytes_1.stripZeros)(bignumber_1.BigNumber.from(value).toHexString());\n if (result.length > 32) {\n logger.throwArgumentError(\"invalid length for \" + name, \"transaction:\" + name, value);\n }\n return result;\n }\n function accessSetify(addr, storageKeys) {\n return {\n address: (0, address_1.getAddress)(addr),\n storageKeys: (storageKeys || []).map(function(storageKey, index2) {\n if ((0, bytes_1.hexDataLength)(storageKey) !== 32) {\n logger.throwArgumentError(\"invalid access list storageKey\", \"accessList[\" + addr + \":\" + index2 + \"]\", storageKey);\n }\n return storageKey.toLowerCase();\n })\n };\n }\n function accessListify(value) {\n if (Array.isArray(value)) {\n return value.map(function(set, index2) {\n if (Array.isArray(set)) {\n if (set.length > 2) {\n logger.throwArgumentError(\"access list expected to be [ address, storageKeys[] ]\", \"value[\" + index2 + \"]\", set);\n }\n return accessSetify(set[0], set[1]);\n }\n return accessSetify(set.address, set.storageKeys);\n });\n }\n var result = Object.keys(value).map(function(addr) {\n var storageKeys = value[addr].reduce(function(accum, storageKey) {\n accum[storageKey] = true;\n return accum;\n }, {});\n return accessSetify(addr, Object.keys(storageKeys).sort());\n });\n result.sort(function(a3, b4) {\n return a3.address.localeCompare(b4.address);\n });\n return result;\n }\n exports3.accessListify = accessListify;\n function formatAccessList(value) {\n return accessListify(value).map(function(set) {\n return [set.address, set.storageKeys];\n });\n }\n function _serializeEip1559(transaction, signature) {\n if (transaction.gasPrice != null) {\n var gasPrice = bignumber_1.BigNumber.from(transaction.gasPrice);\n var maxFeePerGas = bignumber_1.BigNumber.from(transaction.maxFeePerGas || 0);\n if (!gasPrice.eq(maxFeePerGas)) {\n logger.throwArgumentError(\"mismatch EIP-1559 gasPrice != maxFeePerGas\", \"tx\", {\n gasPrice,\n maxFeePerGas\n });\n }\n }\n var fields = [\n formatNumber(transaction.chainId || 0, \"chainId\"),\n formatNumber(transaction.nonce || 0, \"nonce\"),\n formatNumber(transaction.maxPriorityFeePerGas || 0, \"maxPriorityFeePerGas\"),\n formatNumber(transaction.maxFeePerGas || 0, \"maxFeePerGas\"),\n formatNumber(transaction.gasLimit || 0, \"gasLimit\"),\n transaction.to != null ? (0, address_1.getAddress)(transaction.to) : \"0x\",\n formatNumber(transaction.value || 0, \"value\"),\n transaction.data || \"0x\",\n formatAccessList(transaction.accessList || [])\n ];\n if (signature) {\n var sig = (0, bytes_1.splitSignature)(signature);\n fields.push(formatNumber(sig.recoveryParam, \"recoveryParam\"));\n fields.push((0, bytes_1.stripZeros)(sig.r));\n fields.push((0, bytes_1.stripZeros)(sig.s));\n }\n return (0, bytes_1.hexConcat)([\"0x02\", RLP.encode(fields)]);\n }\n function _serializeEip2930(transaction, signature) {\n var fields = [\n formatNumber(transaction.chainId || 0, \"chainId\"),\n formatNumber(transaction.nonce || 0, \"nonce\"),\n formatNumber(transaction.gasPrice || 0, \"gasPrice\"),\n formatNumber(transaction.gasLimit || 0, \"gasLimit\"),\n transaction.to != null ? (0, address_1.getAddress)(transaction.to) : \"0x\",\n formatNumber(transaction.value || 0, \"value\"),\n transaction.data || \"0x\",\n formatAccessList(transaction.accessList || [])\n ];\n if (signature) {\n var sig = (0, bytes_1.splitSignature)(signature);\n fields.push(formatNumber(sig.recoveryParam, \"recoveryParam\"));\n fields.push((0, bytes_1.stripZeros)(sig.r));\n fields.push((0, bytes_1.stripZeros)(sig.s));\n }\n return (0, bytes_1.hexConcat)([\"0x01\", RLP.encode(fields)]);\n }\n function _serialize(transaction, signature) {\n (0, properties_1.checkProperties)(transaction, allowedTransactionKeys);\n var raw = [];\n transactionFields.forEach(function(fieldInfo) {\n var value = transaction[fieldInfo.name] || [];\n var options = {};\n if (fieldInfo.numeric) {\n options.hexPad = \"left\";\n }\n value = (0, bytes_1.arrayify)((0, bytes_1.hexlify)(value, options));\n if (fieldInfo.length && value.length !== fieldInfo.length && value.length > 0) {\n logger.throwArgumentError(\"invalid length for \" + fieldInfo.name, \"transaction:\" + fieldInfo.name, value);\n }\n if (fieldInfo.maxLength) {\n value = (0, bytes_1.stripZeros)(value);\n if (value.length > fieldInfo.maxLength) {\n logger.throwArgumentError(\"invalid length for \" + fieldInfo.name, \"transaction:\" + fieldInfo.name, value);\n }\n }\n raw.push((0, bytes_1.hexlify)(value));\n });\n var chainId = 0;\n if (transaction.chainId != null) {\n chainId = transaction.chainId;\n if (typeof chainId !== \"number\") {\n logger.throwArgumentError(\"invalid transaction.chainId\", \"transaction\", transaction);\n }\n } else if (signature && !(0, bytes_1.isBytesLike)(signature) && signature.v > 28) {\n chainId = Math.floor((signature.v - 35) / 2);\n }\n if (chainId !== 0) {\n raw.push((0, bytes_1.hexlify)(chainId));\n raw.push(\"0x\");\n raw.push(\"0x\");\n }\n if (!signature) {\n return RLP.encode(raw);\n }\n var sig = (0, bytes_1.splitSignature)(signature);\n var v2 = 27 + sig.recoveryParam;\n if (chainId !== 0) {\n raw.pop();\n raw.pop();\n raw.pop();\n v2 += chainId * 2 + 8;\n if (sig.v > 28 && sig.v !== v2) {\n logger.throwArgumentError(\"transaction.chainId/signature.v mismatch\", \"signature\", signature);\n }\n } else if (sig.v !== v2) {\n logger.throwArgumentError(\"transaction.chainId/signature.v mismatch\", \"signature\", signature);\n }\n raw.push((0, bytes_1.hexlify)(v2));\n raw.push((0, bytes_1.stripZeros)((0, bytes_1.arrayify)(sig.r)));\n raw.push((0, bytes_1.stripZeros)((0, bytes_1.arrayify)(sig.s)));\n return RLP.encode(raw);\n }\n function serialize(transaction, signature) {\n if (transaction.type == null || transaction.type === 0) {\n if (transaction.accessList != null) {\n logger.throwArgumentError(\"untyped transactions do not support accessList; include type: 1\", \"transaction\", transaction);\n }\n return _serialize(transaction, signature);\n }\n switch (transaction.type) {\n case 1:\n return _serializeEip2930(transaction, signature);\n case 2:\n return _serializeEip1559(transaction, signature);\n default:\n break;\n }\n return logger.throwError(\"unsupported transaction type: \" + transaction.type, logger_1.Logger.errors.UNSUPPORTED_OPERATION, {\n operation: \"serializeTransaction\",\n transactionType: transaction.type\n });\n }\n exports3.serialize = serialize;\n function _parseEipSignature(tx, fields, serialize2) {\n try {\n var recid = handleNumber(fields[0]).toNumber();\n if (recid !== 0 && recid !== 1) {\n throw new Error(\"bad recid\");\n }\n tx.v = recid;\n } catch (error) {\n logger.throwArgumentError(\"invalid v for transaction type: 1\", \"v\", fields[0]);\n }\n tx.r = (0, bytes_1.hexZeroPad)(fields[1], 32);\n tx.s = (0, bytes_1.hexZeroPad)(fields[2], 32);\n try {\n var digest = (0, keccak256_1.keccak256)(serialize2(tx));\n tx.from = recoverAddress3(digest, { r: tx.r, s: tx.s, recoveryParam: tx.v });\n } catch (error) {\n }\n }\n function _parseEip1559(payload) {\n var transaction = RLP.decode(payload.slice(1));\n if (transaction.length !== 9 && transaction.length !== 12) {\n logger.throwArgumentError(\"invalid component count for transaction type: 2\", \"payload\", (0, bytes_1.hexlify)(payload));\n }\n var maxPriorityFeePerGas = handleNumber(transaction[2]);\n var maxFeePerGas = handleNumber(transaction[3]);\n var tx = {\n type: 2,\n chainId: handleNumber(transaction[0]).toNumber(),\n nonce: handleNumber(transaction[1]).toNumber(),\n maxPriorityFeePerGas,\n maxFeePerGas,\n gasPrice: null,\n gasLimit: handleNumber(transaction[4]),\n to: handleAddress(transaction[5]),\n value: handleNumber(transaction[6]),\n data: transaction[7],\n accessList: accessListify(transaction[8])\n };\n if (transaction.length === 9) {\n return tx;\n }\n tx.hash = (0, keccak256_1.keccak256)(payload);\n _parseEipSignature(tx, transaction.slice(9), _serializeEip1559);\n return tx;\n }\n function _parseEip2930(payload) {\n var transaction = RLP.decode(payload.slice(1));\n if (transaction.length !== 8 && transaction.length !== 11) {\n logger.throwArgumentError(\"invalid component count for transaction type: 1\", \"payload\", (0, bytes_1.hexlify)(payload));\n }\n var tx = {\n type: 1,\n chainId: handleNumber(transaction[0]).toNumber(),\n nonce: handleNumber(transaction[1]).toNumber(),\n gasPrice: handleNumber(transaction[2]),\n gasLimit: handleNumber(transaction[3]),\n to: handleAddress(transaction[4]),\n value: handleNumber(transaction[5]),\n data: transaction[6],\n accessList: accessListify(transaction[7])\n };\n if (transaction.length === 8) {\n return tx;\n }\n tx.hash = (0, keccak256_1.keccak256)(payload);\n _parseEipSignature(tx, transaction.slice(8), _serializeEip2930);\n return tx;\n }\n function _parse(rawTransaction) {\n var transaction = RLP.decode(rawTransaction);\n if (transaction.length !== 9 && transaction.length !== 6) {\n logger.throwArgumentError(\"invalid raw transaction\", \"rawTransaction\", rawTransaction);\n }\n var tx = {\n nonce: handleNumber(transaction[0]).toNumber(),\n gasPrice: handleNumber(transaction[1]),\n gasLimit: handleNumber(transaction[2]),\n to: handleAddress(transaction[3]),\n value: handleNumber(transaction[4]),\n data: transaction[5],\n chainId: 0\n };\n if (transaction.length === 6) {\n return tx;\n }\n try {\n tx.v = bignumber_1.BigNumber.from(transaction[6]).toNumber();\n } catch (error) {\n return tx;\n }\n tx.r = (0, bytes_1.hexZeroPad)(transaction[7], 32);\n tx.s = (0, bytes_1.hexZeroPad)(transaction[8], 32);\n if (bignumber_1.BigNumber.from(tx.r).isZero() && bignumber_1.BigNumber.from(tx.s).isZero()) {\n tx.chainId = tx.v;\n tx.v = 0;\n } else {\n tx.chainId = Math.floor((tx.v - 35) / 2);\n if (tx.chainId < 0) {\n tx.chainId = 0;\n }\n var recoveryParam = tx.v - 27;\n var raw = transaction.slice(0, 6);\n if (tx.chainId !== 0) {\n raw.push((0, bytes_1.hexlify)(tx.chainId));\n raw.push(\"0x\");\n raw.push(\"0x\");\n recoveryParam -= tx.chainId * 2 + 8;\n }\n var digest = (0, keccak256_1.keccak256)(RLP.encode(raw));\n try {\n tx.from = recoverAddress3(digest, { r: (0, bytes_1.hexlify)(tx.r), s: (0, bytes_1.hexlify)(tx.s), recoveryParam });\n } catch (error) {\n }\n tx.hash = (0, keccak256_1.keccak256)(rawTransaction);\n }\n tx.type = null;\n return tx;\n }\n function parse(rawTransaction) {\n var payload = (0, bytes_1.arrayify)(rawTransaction);\n if (payload[0] > 127) {\n return _parse(payload);\n }\n switch (payload[0]) {\n case 1:\n return _parseEip2930(payload);\n case 2:\n return _parseEip1559(payload);\n default:\n break;\n }\n return logger.throwError(\"unsupported transaction type: \" + payload[0], logger_1.Logger.errors.UNSUPPORTED_OPERATION, {\n operation: \"parseTransaction\",\n transactionType: payload[0]\n });\n }\n exports3.parse = parse;\n }\n });\n\n // ../../../node_modules/.pnpm/@ethersproject+contracts@5.8.0/node_modules/@ethersproject/contracts/lib/_version.js\n var require_version14 = __commonJS({\n \"../../../node_modules/.pnpm/@ethersproject+contracts@5.8.0/node_modules/@ethersproject/contracts/lib/_version.js\"(exports3) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n Object.defineProperty(exports3, \"__esModule\", { value: true });\n exports3.version = void 0;\n exports3.version = \"contracts/5.8.0\";\n }\n });\n\n // ../../../node_modules/.pnpm/@ethersproject+contracts@5.8.0/node_modules/@ethersproject/contracts/lib/index.js\n var require_lib18 = __commonJS({\n \"../../../node_modules/.pnpm/@ethersproject+contracts@5.8.0/node_modules/@ethersproject/contracts/lib/index.js\"(exports3) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n var __extends3 = exports3 && exports3.__extends || /* @__PURE__ */ function() {\n var extendStatics3 = function(d5, b4) {\n extendStatics3 = Object.setPrototypeOf || { __proto__: [] } instanceof Array && function(d6, b5) {\n d6.__proto__ = b5;\n } || function(d6, b5) {\n for (var p4 in b5)\n if (Object.prototype.hasOwnProperty.call(b5, p4))\n d6[p4] = b5[p4];\n };\n return extendStatics3(d5, b4);\n };\n return function(d5, b4) {\n if (typeof b4 !== \"function\" && b4 !== null)\n throw new TypeError(\"Class extends value \" + String(b4) + \" is not a constructor or null\");\n extendStatics3(d5, b4);\n function __() {\n this.constructor = d5;\n }\n d5.prototype = b4 === null ? Object.create(b4) : (__.prototype = b4.prototype, new __());\n };\n }();\n var __awaiter3 = exports3 && exports3.__awaiter || function(thisArg, _arguments, P2, generator) {\n function adopt(value) {\n return value instanceof P2 ? value : new P2(function(resolve) {\n resolve(value);\n });\n }\n return new (P2 || (P2 = Promise))(function(resolve, reject) {\n function fulfilled(value) {\n try {\n step(generator.next(value));\n } catch (e3) {\n reject(e3);\n }\n }\n function rejected(value) {\n try {\n step(generator[\"throw\"](value));\n } catch (e3) {\n reject(e3);\n }\n }\n function step(result) {\n result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected);\n }\n step((generator = generator.apply(thisArg, _arguments || [])).next());\n });\n };\n var __generator3 = exports3 && exports3.__generator || function(thisArg, body) {\n var _2 = { label: 0, sent: function() {\n if (t3[0] & 1)\n throw t3[1];\n return t3[1];\n }, trys: [], ops: [] }, f6, y6, t3, g4;\n return g4 = { next: verb(0), \"throw\": verb(1), \"return\": verb(2) }, typeof Symbol === \"function\" && (g4[Symbol.iterator] = function() {\n return this;\n }), g4;\n function verb(n2) {\n return function(v2) {\n return step([n2, v2]);\n };\n }\n function step(op) {\n if (f6)\n throw new TypeError(\"Generator is already executing.\");\n while (_2)\n try {\n if (f6 = 1, y6 && (t3 = op[0] & 2 ? y6[\"return\"] : op[0] ? y6[\"throw\"] || ((t3 = y6[\"return\"]) && t3.call(y6), 0) : y6.next) && !(t3 = t3.call(y6, op[1])).done)\n return t3;\n if (y6 = 0, t3)\n op = [op[0] & 2, t3.value];\n switch (op[0]) {\n case 0:\n case 1:\n t3 = op;\n break;\n case 4:\n _2.label++;\n return { value: op[1], done: false };\n case 5:\n _2.label++;\n y6 = op[1];\n op = [0];\n continue;\n case 7:\n op = _2.ops.pop();\n _2.trys.pop();\n continue;\n default:\n if (!(t3 = _2.trys, t3 = t3.length > 0 && t3[t3.length - 1]) && (op[0] === 6 || op[0] === 2)) {\n _2 = 0;\n continue;\n }\n if (op[0] === 3 && (!t3 || op[1] > t3[0] && op[1] < t3[3])) {\n _2.label = op[1];\n break;\n }\n if (op[0] === 6 && _2.label < t3[1]) {\n _2.label = t3[1];\n t3 = op;\n break;\n }\n if (t3 && _2.label < t3[2]) {\n _2.label = t3[2];\n _2.ops.push(op);\n break;\n }\n if (t3[2])\n _2.ops.pop();\n _2.trys.pop();\n continue;\n }\n op = body.call(thisArg, _2);\n } catch (e3) {\n op = [6, e3];\n y6 = 0;\n } finally {\n f6 = t3 = 0;\n }\n if (op[0] & 5)\n throw op[1];\n return { value: op[0] ? op[1] : void 0, done: true };\n }\n };\n var __spreadArray3 = exports3 && exports3.__spreadArray || function(to, from14, pack) {\n if (pack || arguments.length === 2)\n for (var i3 = 0, l6 = from14.length, ar; i3 < l6; i3++) {\n if (ar || !(i3 in from14)) {\n if (!ar)\n ar = Array.prototype.slice.call(from14, 0, i3);\n ar[i3] = from14[i3];\n }\n }\n return to.concat(ar || Array.prototype.slice.call(from14));\n };\n Object.defineProperty(exports3, \"__esModule\", { value: true });\n exports3.ContractFactory = exports3.Contract = exports3.BaseContract = void 0;\n var abi_1 = require_lib13();\n var abstract_provider_1 = require_lib14();\n var abstract_signer_1 = require_lib15();\n var address_1 = require_lib7();\n var bignumber_1 = require_lib3();\n var bytes_1 = require_lib2();\n var properties_1 = require_lib4();\n var transactions_1 = require_lib17();\n var logger_1 = require_lib();\n var _version_1 = require_version14();\n var logger = new logger_1.Logger(_version_1.version);\n var allowedTransactionKeys = {\n chainId: true,\n data: true,\n from: true,\n gasLimit: true,\n gasPrice: true,\n nonce: true,\n to: true,\n value: true,\n type: true,\n accessList: true,\n maxFeePerGas: true,\n maxPriorityFeePerGas: true,\n customData: true,\n ccipReadEnabled: true\n };\n function resolveName(resolver, nameOrPromise) {\n return __awaiter3(this, void 0, void 0, function() {\n var name, address;\n return __generator3(this, function(_a) {\n switch (_a.label) {\n case 0:\n return [4, nameOrPromise];\n case 1:\n name = _a.sent();\n if (typeof name !== \"string\") {\n logger.throwArgumentError(\"invalid address or ENS name\", \"name\", name);\n }\n try {\n return [2, (0, address_1.getAddress)(name)];\n } catch (error) {\n }\n if (!resolver) {\n logger.throwError(\"a provider or signer is needed to resolve ENS names\", logger_1.Logger.errors.UNSUPPORTED_OPERATION, {\n operation: \"resolveName\"\n });\n }\n return [4, resolver.resolveName(name)];\n case 2:\n address = _a.sent();\n if (address == null) {\n logger.throwArgumentError(\"resolver or addr is not configured for ENS name\", \"name\", name);\n }\n return [2, address];\n }\n });\n });\n }\n function resolveAddresses(resolver, value, paramType) {\n return __awaiter3(this, void 0, void 0, function() {\n return __generator3(this, function(_a) {\n switch (_a.label) {\n case 0:\n if (!Array.isArray(paramType))\n return [3, 2];\n return [4, Promise.all(paramType.map(function(paramType2, index2) {\n return resolveAddresses(resolver, Array.isArray(value) ? value[index2] : value[paramType2.name], paramType2);\n }))];\n case 1:\n return [2, _a.sent()];\n case 2:\n if (!(paramType.type === \"address\"))\n return [3, 4];\n return [4, resolveName(resolver, value)];\n case 3:\n return [2, _a.sent()];\n case 4:\n if (!(paramType.type === \"tuple\"))\n return [3, 6];\n return [4, resolveAddresses(resolver, value, paramType.components)];\n case 5:\n return [2, _a.sent()];\n case 6:\n if (!(paramType.baseType === \"array\"))\n return [3, 8];\n if (!Array.isArray(value)) {\n return [2, Promise.reject(logger.makeError(\"invalid value for array\", logger_1.Logger.errors.INVALID_ARGUMENT, {\n argument: \"value\",\n value\n }))];\n }\n return [4, Promise.all(value.map(function(v2) {\n return resolveAddresses(resolver, v2, paramType.arrayChildren);\n }))];\n case 7:\n return [2, _a.sent()];\n case 8:\n return [2, value];\n }\n });\n });\n }\n function populateTransaction2(contract, fragment, args) {\n return __awaiter3(this, void 0, void 0, function() {\n var overrides, resolved, data, tx, ro, intrinsic, bytes, i3, roValue, leftovers;\n var _this = this;\n return __generator3(this, function(_a) {\n switch (_a.label) {\n case 0:\n overrides = {};\n if (args.length === fragment.inputs.length + 1 && typeof args[args.length - 1] === \"object\") {\n overrides = (0, properties_1.shallowCopy)(args.pop());\n }\n logger.checkArgumentCount(args.length, fragment.inputs.length, \"passed to contract\");\n if (contract.signer) {\n if (overrides.from) {\n overrides.from = (0, properties_1.resolveProperties)({\n override: resolveName(contract.signer, overrides.from),\n signer: contract.signer.getAddress()\n }).then(function(check) {\n return __awaiter3(_this, void 0, void 0, function() {\n return __generator3(this, function(_a2) {\n if ((0, address_1.getAddress)(check.signer) !== check.override) {\n logger.throwError(\"Contract with a Signer cannot override from\", logger_1.Logger.errors.UNSUPPORTED_OPERATION, {\n operation: \"overrides.from\"\n });\n }\n return [2, check.override];\n });\n });\n });\n } else {\n overrides.from = contract.signer.getAddress();\n }\n } else if (overrides.from) {\n overrides.from = resolveName(contract.provider, overrides.from);\n }\n return [4, (0, properties_1.resolveProperties)({\n args: resolveAddresses(contract.signer || contract.provider, args, fragment.inputs),\n address: contract.resolvedAddress,\n overrides: (0, properties_1.resolveProperties)(overrides) || {}\n })];\n case 1:\n resolved = _a.sent();\n data = contract.interface.encodeFunctionData(fragment, resolved.args);\n tx = {\n data,\n to: resolved.address\n };\n ro = resolved.overrides;\n if (ro.nonce != null) {\n tx.nonce = bignumber_1.BigNumber.from(ro.nonce).toNumber();\n }\n if (ro.gasLimit != null) {\n tx.gasLimit = bignumber_1.BigNumber.from(ro.gasLimit);\n }\n if (ro.gasPrice != null) {\n tx.gasPrice = bignumber_1.BigNumber.from(ro.gasPrice);\n }\n if (ro.maxFeePerGas != null) {\n tx.maxFeePerGas = bignumber_1.BigNumber.from(ro.maxFeePerGas);\n }\n if (ro.maxPriorityFeePerGas != null) {\n tx.maxPriorityFeePerGas = bignumber_1.BigNumber.from(ro.maxPriorityFeePerGas);\n }\n if (ro.from != null) {\n tx.from = ro.from;\n }\n if (ro.type != null) {\n tx.type = ro.type;\n }\n if (ro.accessList != null) {\n tx.accessList = (0, transactions_1.accessListify)(ro.accessList);\n }\n if (tx.gasLimit == null && fragment.gas != null) {\n intrinsic = 21e3;\n bytes = (0, bytes_1.arrayify)(data);\n for (i3 = 0; i3 < bytes.length; i3++) {\n intrinsic += 4;\n if (bytes[i3]) {\n intrinsic += 64;\n }\n }\n tx.gasLimit = bignumber_1.BigNumber.from(fragment.gas).add(intrinsic);\n }\n if (ro.value) {\n roValue = bignumber_1.BigNumber.from(ro.value);\n if (!roValue.isZero() && !fragment.payable) {\n logger.throwError(\"non-payable method cannot override value\", logger_1.Logger.errors.UNSUPPORTED_OPERATION, {\n operation: \"overrides.value\",\n value: overrides.value\n });\n }\n tx.value = roValue;\n }\n if (ro.customData) {\n tx.customData = (0, properties_1.shallowCopy)(ro.customData);\n }\n if (ro.ccipReadEnabled) {\n tx.ccipReadEnabled = !!ro.ccipReadEnabled;\n }\n delete overrides.nonce;\n delete overrides.gasLimit;\n delete overrides.gasPrice;\n delete overrides.from;\n delete overrides.value;\n delete overrides.type;\n delete overrides.accessList;\n delete overrides.maxFeePerGas;\n delete overrides.maxPriorityFeePerGas;\n delete overrides.customData;\n delete overrides.ccipReadEnabled;\n leftovers = Object.keys(overrides).filter(function(key) {\n return overrides[key] != null;\n });\n if (leftovers.length) {\n logger.throwError(\"cannot override \" + leftovers.map(function(l6) {\n return JSON.stringify(l6);\n }).join(\",\"), logger_1.Logger.errors.UNSUPPORTED_OPERATION, {\n operation: \"overrides\",\n overrides: leftovers\n });\n }\n return [2, tx];\n }\n });\n });\n }\n function buildPopulate(contract, fragment) {\n return function() {\n var args = [];\n for (var _i = 0; _i < arguments.length; _i++) {\n args[_i] = arguments[_i];\n }\n return populateTransaction2(contract, fragment, args);\n };\n }\n function buildEstimate(contract, fragment) {\n var signerOrProvider = contract.signer || contract.provider;\n return function() {\n var args = [];\n for (var _i = 0; _i < arguments.length; _i++) {\n args[_i] = arguments[_i];\n }\n return __awaiter3(this, void 0, void 0, function() {\n var tx;\n return __generator3(this, function(_a) {\n switch (_a.label) {\n case 0:\n if (!signerOrProvider) {\n logger.throwError(\"estimate require a provider or signer\", logger_1.Logger.errors.UNSUPPORTED_OPERATION, {\n operation: \"estimateGas\"\n });\n }\n return [4, populateTransaction2(contract, fragment, args)];\n case 1:\n tx = _a.sent();\n return [4, signerOrProvider.estimateGas(tx)];\n case 2:\n return [2, _a.sent()];\n }\n });\n });\n };\n }\n function addContractWait(contract, tx) {\n var wait2 = tx.wait.bind(tx);\n tx.wait = function(confirmations) {\n return wait2(confirmations).then(function(receipt) {\n receipt.events = receipt.logs.map(function(log) {\n var event = (0, properties_1.deepCopy)(log);\n var parsed = null;\n try {\n parsed = contract.interface.parseLog(log);\n } catch (e3) {\n }\n if (parsed) {\n event.args = parsed.args;\n event.decode = function(data, topics) {\n return contract.interface.decodeEventLog(parsed.eventFragment, data, topics);\n };\n event.event = parsed.name;\n event.eventSignature = parsed.signature;\n }\n event.removeListener = function() {\n return contract.provider;\n };\n event.getBlock = function() {\n return contract.provider.getBlock(receipt.blockHash);\n };\n event.getTransaction = function() {\n return contract.provider.getTransaction(receipt.transactionHash);\n };\n event.getTransactionReceipt = function() {\n return Promise.resolve(receipt);\n };\n return event;\n });\n return receipt;\n });\n };\n }\n function buildCall(contract, fragment, collapseSimple) {\n var signerOrProvider = contract.signer || contract.provider;\n return function() {\n var args = [];\n for (var _i = 0; _i < arguments.length; _i++) {\n args[_i] = arguments[_i];\n }\n return __awaiter3(this, void 0, void 0, function() {\n var blockTag, overrides, tx, result, value;\n return __generator3(this, function(_a) {\n switch (_a.label) {\n case 0:\n blockTag = void 0;\n if (!(args.length === fragment.inputs.length + 1 && typeof args[args.length - 1] === \"object\"))\n return [3, 3];\n overrides = (0, properties_1.shallowCopy)(args.pop());\n if (!(overrides.blockTag != null))\n return [3, 2];\n return [4, overrides.blockTag];\n case 1:\n blockTag = _a.sent();\n _a.label = 2;\n case 2:\n delete overrides.blockTag;\n args.push(overrides);\n _a.label = 3;\n case 3:\n if (!(contract.deployTransaction != null))\n return [3, 5];\n return [4, contract._deployed(blockTag)];\n case 4:\n _a.sent();\n _a.label = 5;\n case 5:\n return [4, populateTransaction2(contract, fragment, args)];\n case 6:\n tx = _a.sent();\n return [4, signerOrProvider.call(tx, blockTag)];\n case 7:\n result = _a.sent();\n try {\n value = contract.interface.decodeFunctionResult(fragment, result);\n if (collapseSimple && fragment.outputs.length === 1) {\n value = value[0];\n }\n return [2, value];\n } catch (error) {\n if (error.code === logger_1.Logger.errors.CALL_EXCEPTION) {\n error.address = contract.address;\n error.args = args;\n error.transaction = tx;\n }\n throw error;\n }\n return [\n 2\n /*return*/\n ];\n }\n });\n });\n };\n }\n function buildSend(contract, fragment) {\n return function() {\n var args = [];\n for (var _i = 0; _i < arguments.length; _i++) {\n args[_i] = arguments[_i];\n }\n return __awaiter3(this, void 0, void 0, function() {\n var txRequest, tx;\n return __generator3(this, function(_a) {\n switch (_a.label) {\n case 0:\n if (!contract.signer) {\n logger.throwError(\"sending a transaction requires a signer\", logger_1.Logger.errors.UNSUPPORTED_OPERATION, {\n operation: \"sendTransaction\"\n });\n }\n if (!(contract.deployTransaction != null))\n return [3, 2];\n return [4, contract._deployed()];\n case 1:\n _a.sent();\n _a.label = 2;\n case 2:\n return [4, populateTransaction2(contract, fragment, args)];\n case 3:\n txRequest = _a.sent();\n return [4, contract.signer.sendTransaction(txRequest)];\n case 4:\n tx = _a.sent();\n addContractWait(contract, tx);\n return [2, tx];\n }\n });\n });\n };\n }\n function buildDefault(contract, fragment, collapseSimple) {\n if (fragment.constant) {\n return buildCall(contract, fragment, collapseSimple);\n }\n return buildSend(contract, fragment);\n }\n function getEventTag(filter) {\n if (filter.address && (filter.topics == null || filter.topics.length === 0)) {\n return \"*\";\n }\n return (filter.address || \"*\") + \"@\" + (filter.topics ? filter.topics.map(function(topic) {\n if (Array.isArray(topic)) {\n return topic.join(\"|\");\n }\n return topic;\n }).join(\":\") : \"\");\n }\n var RunningEvent = (\n /** @class */\n function() {\n function RunningEvent2(tag, filter) {\n (0, properties_1.defineReadOnly)(this, \"tag\", tag);\n (0, properties_1.defineReadOnly)(this, \"filter\", filter);\n this._listeners = [];\n }\n RunningEvent2.prototype.addListener = function(listener, once2) {\n this._listeners.push({ listener, once: once2 });\n };\n RunningEvent2.prototype.removeListener = function(listener) {\n var done = false;\n this._listeners = this._listeners.filter(function(item) {\n if (done || item.listener !== listener) {\n return true;\n }\n done = true;\n return false;\n });\n };\n RunningEvent2.prototype.removeAllListeners = function() {\n this._listeners = [];\n };\n RunningEvent2.prototype.listeners = function() {\n return this._listeners.map(function(i3) {\n return i3.listener;\n });\n };\n RunningEvent2.prototype.listenerCount = function() {\n return this._listeners.length;\n };\n RunningEvent2.prototype.run = function(args) {\n var _this = this;\n var listenerCount = this.listenerCount();\n this._listeners = this._listeners.filter(function(item) {\n var argsCopy = args.slice();\n setTimeout(function() {\n item.listener.apply(_this, argsCopy);\n }, 0);\n return !item.once;\n });\n return listenerCount;\n };\n RunningEvent2.prototype.prepareEvent = function(event) {\n };\n RunningEvent2.prototype.getEmit = function(event) {\n return [event];\n };\n return RunningEvent2;\n }()\n );\n var ErrorRunningEvent = (\n /** @class */\n function(_super) {\n __extends3(ErrorRunningEvent2, _super);\n function ErrorRunningEvent2() {\n return _super.call(this, \"error\", null) || this;\n }\n return ErrorRunningEvent2;\n }(RunningEvent)\n );\n var FragmentRunningEvent = (\n /** @class */\n function(_super) {\n __extends3(FragmentRunningEvent2, _super);\n function FragmentRunningEvent2(address, contractInterface, fragment, topics) {\n var _this = this;\n var filter = {\n address\n };\n var topic = contractInterface.getEventTopic(fragment);\n if (topics) {\n if (topic !== topics[0]) {\n logger.throwArgumentError(\"topic mismatch\", \"topics\", topics);\n }\n filter.topics = topics.slice();\n } else {\n filter.topics = [topic];\n }\n _this = _super.call(this, getEventTag(filter), filter) || this;\n (0, properties_1.defineReadOnly)(_this, \"address\", address);\n (0, properties_1.defineReadOnly)(_this, \"interface\", contractInterface);\n (0, properties_1.defineReadOnly)(_this, \"fragment\", fragment);\n return _this;\n }\n FragmentRunningEvent2.prototype.prepareEvent = function(event) {\n var _this = this;\n _super.prototype.prepareEvent.call(this, event);\n event.event = this.fragment.name;\n event.eventSignature = this.fragment.format();\n event.decode = function(data, topics) {\n return _this.interface.decodeEventLog(_this.fragment, data, topics);\n };\n try {\n event.args = this.interface.decodeEventLog(this.fragment, event.data, event.topics);\n } catch (error) {\n event.args = null;\n event.decodeError = error;\n }\n };\n FragmentRunningEvent2.prototype.getEmit = function(event) {\n var errors = (0, abi_1.checkResultErrors)(event.args);\n if (errors.length) {\n throw errors[0].error;\n }\n var args = (event.args || []).slice();\n args.push(event);\n return args;\n };\n return FragmentRunningEvent2;\n }(RunningEvent)\n );\n var WildcardRunningEvent = (\n /** @class */\n function(_super) {\n __extends3(WildcardRunningEvent2, _super);\n function WildcardRunningEvent2(address, contractInterface) {\n var _this = _super.call(this, \"*\", { address }) || this;\n (0, properties_1.defineReadOnly)(_this, \"address\", address);\n (0, properties_1.defineReadOnly)(_this, \"interface\", contractInterface);\n return _this;\n }\n WildcardRunningEvent2.prototype.prepareEvent = function(event) {\n var _this = this;\n _super.prototype.prepareEvent.call(this, event);\n try {\n var parsed_1 = this.interface.parseLog(event);\n event.event = parsed_1.name;\n event.eventSignature = parsed_1.signature;\n event.decode = function(data, topics) {\n return _this.interface.decodeEventLog(parsed_1.eventFragment, data, topics);\n };\n event.args = parsed_1.args;\n } catch (error) {\n }\n };\n return WildcardRunningEvent2;\n }(RunningEvent)\n );\n var BaseContract = (\n /** @class */\n function() {\n function BaseContract2(addressOrName, contractInterface, signerOrProvider) {\n var _newTarget = this.constructor;\n var _this = this;\n (0, properties_1.defineReadOnly)(this, \"interface\", (0, properties_1.getStatic)(_newTarget, \"getInterface\")(contractInterface));\n if (signerOrProvider == null) {\n (0, properties_1.defineReadOnly)(this, \"provider\", null);\n (0, properties_1.defineReadOnly)(this, \"signer\", null);\n } else if (abstract_signer_1.Signer.isSigner(signerOrProvider)) {\n (0, properties_1.defineReadOnly)(this, \"provider\", signerOrProvider.provider || null);\n (0, properties_1.defineReadOnly)(this, \"signer\", signerOrProvider);\n } else if (abstract_provider_1.Provider.isProvider(signerOrProvider)) {\n (0, properties_1.defineReadOnly)(this, \"provider\", signerOrProvider);\n (0, properties_1.defineReadOnly)(this, \"signer\", null);\n } else {\n logger.throwArgumentError(\"invalid signer or provider\", \"signerOrProvider\", signerOrProvider);\n }\n (0, properties_1.defineReadOnly)(this, \"callStatic\", {});\n (0, properties_1.defineReadOnly)(this, \"estimateGas\", {});\n (0, properties_1.defineReadOnly)(this, \"functions\", {});\n (0, properties_1.defineReadOnly)(this, \"populateTransaction\", {});\n (0, properties_1.defineReadOnly)(this, \"filters\", {});\n {\n var uniqueFilters_1 = {};\n Object.keys(this.interface.events).forEach(function(eventSignature) {\n var event = _this.interface.events[eventSignature];\n (0, properties_1.defineReadOnly)(_this.filters, eventSignature, function() {\n var args = [];\n for (var _i = 0; _i < arguments.length; _i++) {\n args[_i] = arguments[_i];\n }\n return {\n address: _this.address,\n topics: _this.interface.encodeFilterTopics(event, args)\n };\n });\n if (!uniqueFilters_1[event.name]) {\n uniqueFilters_1[event.name] = [];\n }\n uniqueFilters_1[event.name].push(eventSignature);\n });\n Object.keys(uniqueFilters_1).forEach(function(name) {\n var filters = uniqueFilters_1[name];\n if (filters.length === 1) {\n (0, properties_1.defineReadOnly)(_this.filters, name, _this.filters[filters[0]]);\n } else {\n logger.warn(\"Duplicate definition of \" + name + \" (\" + filters.join(\", \") + \")\");\n }\n });\n }\n (0, properties_1.defineReadOnly)(this, \"_runningEvents\", {});\n (0, properties_1.defineReadOnly)(this, \"_wrappedEmits\", {});\n if (addressOrName == null) {\n logger.throwArgumentError(\"invalid contract address or ENS name\", \"addressOrName\", addressOrName);\n }\n (0, properties_1.defineReadOnly)(this, \"address\", addressOrName);\n if (this.provider) {\n (0, properties_1.defineReadOnly)(this, \"resolvedAddress\", resolveName(this.provider, addressOrName));\n } else {\n try {\n (0, properties_1.defineReadOnly)(this, \"resolvedAddress\", Promise.resolve((0, address_1.getAddress)(addressOrName)));\n } catch (error) {\n logger.throwError(\"provider is required to use ENS name as contract address\", logger_1.Logger.errors.UNSUPPORTED_OPERATION, {\n operation: \"new Contract\"\n });\n }\n }\n this.resolvedAddress.catch(function(e3) {\n });\n var uniqueNames = {};\n var uniqueSignatures = {};\n Object.keys(this.interface.functions).forEach(function(signature) {\n var fragment = _this.interface.functions[signature];\n if (uniqueSignatures[signature]) {\n logger.warn(\"Duplicate ABI entry for \" + JSON.stringify(signature));\n return;\n }\n uniqueSignatures[signature] = true;\n {\n var name_1 = fragment.name;\n if (!uniqueNames[\"%\" + name_1]) {\n uniqueNames[\"%\" + name_1] = [];\n }\n uniqueNames[\"%\" + name_1].push(signature);\n }\n if (_this[signature] == null) {\n (0, properties_1.defineReadOnly)(_this, signature, buildDefault(_this, fragment, true));\n }\n if (_this.functions[signature] == null) {\n (0, properties_1.defineReadOnly)(_this.functions, signature, buildDefault(_this, fragment, false));\n }\n if (_this.callStatic[signature] == null) {\n (0, properties_1.defineReadOnly)(_this.callStatic, signature, buildCall(_this, fragment, true));\n }\n if (_this.populateTransaction[signature] == null) {\n (0, properties_1.defineReadOnly)(_this.populateTransaction, signature, buildPopulate(_this, fragment));\n }\n if (_this.estimateGas[signature] == null) {\n (0, properties_1.defineReadOnly)(_this.estimateGas, signature, buildEstimate(_this, fragment));\n }\n });\n Object.keys(uniqueNames).forEach(function(name) {\n var signatures = uniqueNames[name];\n if (signatures.length > 1) {\n return;\n }\n name = name.substring(1);\n var signature = signatures[0];\n try {\n if (_this[name] == null) {\n (0, properties_1.defineReadOnly)(_this, name, _this[signature]);\n }\n } catch (e3) {\n }\n if (_this.functions[name] == null) {\n (0, properties_1.defineReadOnly)(_this.functions, name, _this.functions[signature]);\n }\n if (_this.callStatic[name] == null) {\n (0, properties_1.defineReadOnly)(_this.callStatic, name, _this.callStatic[signature]);\n }\n if (_this.populateTransaction[name] == null) {\n (0, properties_1.defineReadOnly)(_this.populateTransaction, name, _this.populateTransaction[signature]);\n }\n if (_this.estimateGas[name] == null) {\n (0, properties_1.defineReadOnly)(_this.estimateGas, name, _this.estimateGas[signature]);\n }\n });\n }\n BaseContract2.getContractAddress = function(transaction) {\n return (0, address_1.getContractAddress)(transaction);\n };\n BaseContract2.getInterface = function(contractInterface) {\n if (abi_1.Interface.isInterface(contractInterface)) {\n return contractInterface;\n }\n return new abi_1.Interface(contractInterface);\n };\n BaseContract2.prototype.deployed = function() {\n return this._deployed();\n };\n BaseContract2.prototype._deployed = function(blockTag) {\n var _this = this;\n if (!this._deployedPromise) {\n if (this.deployTransaction) {\n this._deployedPromise = this.deployTransaction.wait().then(function() {\n return _this;\n });\n } else {\n this._deployedPromise = this.provider.getCode(this.address, blockTag).then(function(code) {\n if (code === \"0x\") {\n logger.throwError(\"contract not deployed\", logger_1.Logger.errors.UNSUPPORTED_OPERATION, {\n contractAddress: _this.address,\n operation: \"getDeployed\"\n });\n }\n return _this;\n });\n }\n }\n return this._deployedPromise;\n };\n BaseContract2.prototype.fallback = function(overrides) {\n var _this = this;\n if (!this.signer) {\n logger.throwError(\"sending a transactions require a signer\", logger_1.Logger.errors.UNSUPPORTED_OPERATION, { operation: \"sendTransaction(fallback)\" });\n }\n var tx = (0, properties_1.shallowCopy)(overrides || {});\n [\"from\", \"to\"].forEach(function(key) {\n if (tx[key] == null) {\n return;\n }\n logger.throwError(\"cannot override \" + key, logger_1.Logger.errors.UNSUPPORTED_OPERATION, { operation: key });\n });\n tx.to = this.resolvedAddress;\n return this.deployed().then(function() {\n return _this.signer.sendTransaction(tx);\n });\n };\n BaseContract2.prototype.connect = function(signerOrProvider) {\n if (typeof signerOrProvider === \"string\") {\n signerOrProvider = new abstract_signer_1.VoidSigner(signerOrProvider, this.provider);\n }\n var contract = new this.constructor(this.address, this.interface, signerOrProvider);\n if (this.deployTransaction) {\n (0, properties_1.defineReadOnly)(contract, \"deployTransaction\", this.deployTransaction);\n }\n return contract;\n };\n BaseContract2.prototype.attach = function(addressOrName) {\n return new this.constructor(addressOrName, this.interface, this.signer || this.provider);\n };\n BaseContract2.isIndexed = function(value) {\n return abi_1.Indexed.isIndexed(value);\n };\n BaseContract2.prototype._normalizeRunningEvent = function(runningEvent) {\n if (this._runningEvents[runningEvent.tag]) {\n return this._runningEvents[runningEvent.tag];\n }\n return runningEvent;\n };\n BaseContract2.prototype._getRunningEvent = function(eventName) {\n if (typeof eventName === \"string\") {\n if (eventName === \"error\") {\n return this._normalizeRunningEvent(new ErrorRunningEvent());\n }\n if (eventName === \"event\") {\n return this._normalizeRunningEvent(new RunningEvent(\"event\", null));\n }\n if (eventName === \"*\") {\n return this._normalizeRunningEvent(new WildcardRunningEvent(this.address, this.interface));\n }\n var fragment = this.interface.getEvent(eventName);\n return this._normalizeRunningEvent(new FragmentRunningEvent(this.address, this.interface, fragment));\n }\n if (eventName.topics && eventName.topics.length > 0) {\n try {\n var topic = eventName.topics[0];\n if (typeof topic !== \"string\") {\n throw new Error(\"invalid topic\");\n }\n var fragment = this.interface.getEvent(topic);\n return this._normalizeRunningEvent(new FragmentRunningEvent(this.address, this.interface, fragment, eventName.topics));\n } catch (error) {\n }\n var filter = {\n address: this.address,\n topics: eventName.topics\n };\n return this._normalizeRunningEvent(new RunningEvent(getEventTag(filter), filter));\n }\n return this._normalizeRunningEvent(new WildcardRunningEvent(this.address, this.interface));\n };\n BaseContract2.prototype._checkRunningEvents = function(runningEvent) {\n if (runningEvent.listenerCount() === 0) {\n delete this._runningEvents[runningEvent.tag];\n var emit2 = this._wrappedEmits[runningEvent.tag];\n if (emit2 && runningEvent.filter) {\n this.provider.off(runningEvent.filter, emit2);\n delete this._wrappedEmits[runningEvent.tag];\n }\n }\n };\n BaseContract2.prototype._wrapEvent = function(runningEvent, log, listener) {\n var _this = this;\n var event = (0, properties_1.deepCopy)(log);\n event.removeListener = function() {\n if (!listener) {\n return;\n }\n runningEvent.removeListener(listener);\n _this._checkRunningEvents(runningEvent);\n };\n event.getBlock = function() {\n return _this.provider.getBlock(log.blockHash);\n };\n event.getTransaction = function() {\n return _this.provider.getTransaction(log.transactionHash);\n };\n event.getTransactionReceipt = function() {\n return _this.provider.getTransactionReceipt(log.transactionHash);\n };\n runningEvent.prepareEvent(event);\n return event;\n };\n BaseContract2.prototype._addEventListener = function(runningEvent, listener, once2) {\n var _this = this;\n if (!this.provider) {\n logger.throwError(\"events require a provider or a signer with a provider\", logger_1.Logger.errors.UNSUPPORTED_OPERATION, { operation: \"once\" });\n }\n runningEvent.addListener(listener, once2);\n this._runningEvents[runningEvent.tag] = runningEvent;\n if (!this._wrappedEmits[runningEvent.tag]) {\n var wrappedEmit = function(log) {\n var event = _this._wrapEvent(runningEvent, log, listener);\n if (event.decodeError == null) {\n try {\n var args = runningEvent.getEmit(event);\n _this.emit.apply(_this, __spreadArray3([runningEvent.filter], args, false));\n } catch (error) {\n event.decodeError = error.error;\n }\n }\n if (runningEvent.filter != null) {\n _this.emit(\"event\", event);\n }\n if (event.decodeError != null) {\n _this.emit(\"error\", event.decodeError, event);\n }\n };\n this._wrappedEmits[runningEvent.tag] = wrappedEmit;\n if (runningEvent.filter != null) {\n this.provider.on(runningEvent.filter, wrappedEmit);\n }\n }\n };\n BaseContract2.prototype.queryFilter = function(event, fromBlockOrBlockhash, toBlock) {\n var _this = this;\n var runningEvent = this._getRunningEvent(event);\n var filter = (0, properties_1.shallowCopy)(runningEvent.filter);\n if (typeof fromBlockOrBlockhash === \"string\" && (0, bytes_1.isHexString)(fromBlockOrBlockhash, 32)) {\n if (toBlock != null) {\n logger.throwArgumentError(\"cannot specify toBlock with blockhash\", \"toBlock\", toBlock);\n }\n filter.blockHash = fromBlockOrBlockhash;\n } else {\n filter.fromBlock = fromBlockOrBlockhash != null ? fromBlockOrBlockhash : 0;\n filter.toBlock = toBlock != null ? toBlock : \"latest\";\n }\n return this.provider.getLogs(filter).then(function(logs) {\n return logs.map(function(log) {\n return _this._wrapEvent(runningEvent, log, null);\n });\n });\n };\n BaseContract2.prototype.on = function(event, listener) {\n this._addEventListener(this._getRunningEvent(event), listener, false);\n return this;\n };\n BaseContract2.prototype.once = function(event, listener) {\n this._addEventListener(this._getRunningEvent(event), listener, true);\n return this;\n };\n BaseContract2.prototype.emit = function(eventName) {\n var args = [];\n for (var _i = 1; _i < arguments.length; _i++) {\n args[_i - 1] = arguments[_i];\n }\n if (!this.provider) {\n return false;\n }\n var runningEvent = this._getRunningEvent(eventName);\n var result = runningEvent.run(args) > 0;\n this._checkRunningEvents(runningEvent);\n return result;\n };\n BaseContract2.prototype.listenerCount = function(eventName) {\n var _this = this;\n if (!this.provider) {\n return 0;\n }\n if (eventName == null) {\n return Object.keys(this._runningEvents).reduce(function(accum, key) {\n return accum + _this._runningEvents[key].listenerCount();\n }, 0);\n }\n return this._getRunningEvent(eventName).listenerCount();\n };\n BaseContract2.prototype.listeners = function(eventName) {\n if (!this.provider) {\n return [];\n }\n if (eventName == null) {\n var result_1 = [];\n for (var tag in this._runningEvents) {\n this._runningEvents[tag].listeners().forEach(function(listener) {\n result_1.push(listener);\n });\n }\n return result_1;\n }\n return this._getRunningEvent(eventName).listeners();\n };\n BaseContract2.prototype.removeAllListeners = function(eventName) {\n if (!this.provider) {\n return this;\n }\n if (eventName == null) {\n for (var tag in this._runningEvents) {\n var runningEvent_1 = this._runningEvents[tag];\n runningEvent_1.removeAllListeners();\n this._checkRunningEvents(runningEvent_1);\n }\n return this;\n }\n var runningEvent = this._getRunningEvent(eventName);\n runningEvent.removeAllListeners();\n this._checkRunningEvents(runningEvent);\n return this;\n };\n BaseContract2.prototype.off = function(eventName, listener) {\n if (!this.provider) {\n return this;\n }\n var runningEvent = this._getRunningEvent(eventName);\n runningEvent.removeListener(listener);\n this._checkRunningEvents(runningEvent);\n return this;\n };\n BaseContract2.prototype.removeListener = function(eventName, listener) {\n return this.off(eventName, listener);\n };\n return BaseContract2;\n }()\n );\n exports3.BaseContract = BaseContract;\n var Contract = (\n /** @class */\n function(_super) {\n __extends3(Contract2, _super);\n function Contract2() {\n return _super !== null && _super.apply(this, arguments) || this;\n }\n return Contract2;\n }(BaseContract)\n );\n exports3.Contract = Contract;\n var ContractFactory = (\n /** @class */\n function() {\n function ContractFactory2(contractInterface, bytecode, signer) {\n var _newTarget = this.constructor;\n var bytecodeHex = null;\n if (typeof bytecode === \"string\") {\n bytecodeHex = bytecode;\n } else if ((0, bytes_1.isBytes)(bytecode)) {\n bytecodeHex = (0, bytes_1.hexlify)(bytecode);\n } else if (bytecode && typeof bytecode.object === \"string\") {\n bytecodeHex = bytecode.object;\n } else {\n bytecodeHex = \"!\";\n }\n if (bytecodeHex.substring(0, 2) !== \"0x\") {\n bytecodeHex = \"0x\" + bytecodeHex;\n }\n if (!(0, bytes_1.isHexString)(bytecodeHex) || bytecodeHex.length % 2) {\n logger.throwArgumentError(\"invalid bytecode\", \"bytecode\", bytecode);\n }\n if (signer && !abstract_signer_1.Signer.isSigner(signer)) {\n logger.throwArgumentError(\"invalid signer\", \"signer\", signer);\n }\n (0, properties_1.defineReadOnly)(this, \"bytecode\", bytecodeHex);\n (0, properties_1.defineReadOnly)(this, \"interface\", (0, properties_1.getStatic)(_newTarget, \"getInterface\")(contractInterface));\n (0, properties_1.defineReadOnly)(this, \"signer\", signer || null);\n }\n ContractFactory2.prototype.getDeployTransaction = function() {\n var args = [];\n for (var _i = 0; _i < arguments.length; _i++) {\n args[_i] = arguments[_i];\n }\n var tx = {};\n if (args.length === this.interface.deploy.inputs.length + 1 && typeof args[args.length - 1] === \"object\") {\n tx = (0, properties_1.shallowCopy)(args.pop());\n for (var key in tx) {\n if (!allowedTransactionKeys[key]) {\n throw new Error(\"unknown transaction override \" + key);\n }\n }\n }\n [\"data\", \"from\", \"to\"].forEach(function(key2) {\n if (tx[key2] == null) {\n return;\n }\n logger.throwError(\"cannot override \" + key2, logger_1.Logger.errors.UNSUPPORTED_OPERATION, { operation: key2 });\n });\n if (tx.value) {\n var value = bignumber_1.BigNumber.from(tx.value);\n if (!value.isZero() && !this.interface.deploy.payable) {\n logger.throwError(\"non-payable constructor cannot override value\", logger_1.Logger.errors.UNSUPPORTED_OPERATION, {\n operation: \"overrides.value\",\n value: tx.value\n });\n }\n }\n logger.checkArgumentCount(args.length, this.interface.deploy.inputs.length, \" in Contract constructor\");\n tx.data = (0, bytes_1.hexlify)((0, bytes_1.concat)([\n this.bytecode,\n this.interface.encodeDeploy(args)\n ]));\n return tx;\n };\n ContractFactory2.prototype.deploy = function() {\n var args = [];\n for (var _i = 0; _i < arguments.length; _i++) {\n args[_i] = arguments[_i];\n }\n return __awaiter3(this, void 0, void 0, function() {\n var overrides, params, unsignedTx, tx, address, contract;\n return __generator3(this, function(_a) {\n switch (_a.label) {\n case 0:\n overrides = {};\n if (args.length === this.interface.deploy.inputs.length + 1) {\n overrides = args.pop();\n }\n logger.checkArgumentCount(args.length, this.interface.deploy.inputs.length, \" in Contract constructor\");\n return [4, resolveAddresses(this.signer, args, this.interface.deploy.inputs)];\n case 1:\n params = _a.sent();\n params.push(overrides);\n unsignedTx = this.getDeployTransaction.apply(this, params);\n return [4, this.signer.sendTransaction(unsignedTx)];\n case 2:\n tx = _a.sent();\n address = (0, properties_1.getStatic)(this.constructor, \"getContractAddress\")(tx);\n contract = (0, properties_1.getStatic)(this.constructor, \"getContract\")(address, this.interface, this.signer);\n addContractWait(contract, tx);\n (0, properties_1.defineReadOnly)(contract, \"deployTransaction\", tx);\n return [2, contract];\n }\n });\n });\n };\n ContractFactory2.prototype.attach = function(address) {\n return this.constructor.getContract(address, this.interface, this.signer);\n };\n ContractFactory2.prototype.connect = function(signer) {\n return new this.constructor(this.interface, this.bytecode, signer);\n };\n ContractFactory2.fromSolidity = function(compilerOutput, signer) {\n if (compilerOutput == null) {\n logger.throwError(\"missing compiler output\", logger_1.Logger.errors.MISSING_ARGUMENT, { argument: \"compilerOutput\" });\n }\n if (typeof compilerOutput === \"string\") {\n compilerOutput = JSON.parse(compilerOutput);\n }\n var abi2 = compilerOutput.abi;\n var bytecode = null;\n if (compilerOutput.bytecode) {\n bytecode = compilerOutput.bytecode;\n } else if (compilerOutput.evm && compilerOutput.evm.bytecode) {\n bytecode = compilerOutput.evm.bytecode;\n }\n return new this(abi2, bytecode, signer);\n };\n ContractFactory2.getInterface = function(contractInterface) {\n return Contract.getInterface(contractInterface);\n };\n ContractFactory2.getContractAddress = function(tx) {\n return (0, address_1.getContractAddress)(tx);\n };\n ContractFactory2.getContract = function(address, contractInterface, signer) {\n return new Contract(address, contractInterface, signer);\n };\n return ContractFactory2;\n }()\n );\n exports3.ContractFactory = ContractFactory;\n }\n });\n\n // ../../../node_modules/.pnpm/@ethersproject+basex@5.8.0/node_modules/@ethersproject/basex/lib/index.js\n var require_lib19 = __commonJS({\n \"../../../node_modules/.pnpm/@ethersproject+basex@5.8.0/node_modules/@ethersproject/basex/lib/index.js\"(exports3) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n Object.defineProperty(exports3, \"__esModule\", { value: true });\n exports3.Base58 = exports3.Base32 = exports3.BaseX = void 0;\n var bytes_1 = require_lib2();\n var properties_1 = require_lib4();\n var BaseX = (\n /** @class */\n function() {\n function BaseX2(alphabet2) {\n (0, properties_1.defineReadOnly)(this, \"alphabet\", alphabet2);\n (0, properties_1.defineReadOnly)(this, \"base\", alphabet2.length);\n (0, properties_1.defineReadOnly)(this, \"_alphabetMap\", {});\n (0, properties_1.defineReadOnly)(this, \"_leader\", alphabet2.charAt(0));\n for (var i3 = 0; i3 < alphabet2.length; i3++) {\n this._alphabetMap[alphabet2.charAt(i3)] = i3;\n }\n }\n BaseX2.prototype.encode = function(value) {\n var source = (0, bytes_1.arrayify)(value);\n if (source.length === 0) {\n return \"\";\n }\n var digits = [0];\n for (var i3 = 0; i3 < source.length; ++i3) {\n var carry = source[i3];\n for (var j2 = 0; j2 < digits.length; ++j2) {\n carry += digits[j2] << 8;\n digits[j2] = carry % this.base;\n carry = carry / this.base | 0;\n }\n while (carry > 0) {\n digits.push(carry % this.base);\n carry = carry / this.base | 0;\n }\n }\n var string2 = \"\";\n for (var k4 = 0; source[k4] === 0 && k4 < source.length - 1; ++k4) {\n string2 += this._leader;\n }\n for (var q3 = digits.length - 1; q3 >= 0; --q3) {\n string2 += this.alphabet[digits[q3]];\n }\n return string2;\n };\n BaseX2.prototype.decode = function(value) {\n if (typeof value !== \"string\") {\n throw new TypeError(\"Expected String\");\n }\n var bytes = [];\n if (value.length === 0) {\n return new Uint8Array(bytes);\n }\n bytes.push(0);\n for (var i3 = 0; i3 < value.length; i3++) {\n var byte = this._alphabetMap[value[i3]];\n if (byte === void 0) {\n throw new Error(\"Non-base\" + this.base + \" character\");\n }\n var carry = byte;\n for (var j2 = 0; j2 < bytes.length; ++j2) {\n carry += bytes[j2] * this.base;\n bytes[j2] = carry & 255;\n carry >>= 8;\n }\n while (carry > 0) {\n bytes.push(carry & 255);\n carry >>= 8;\n }\n }\n for (var k4 = 0; value[k4] === this._leader && k4 < value.length - 1; ++k4) {\n bytes.push(0);\n }\n return (0, bytes_1.arrayify)(new Uint8Array(bytes.reverse()));\n };\n return BaseX2;\n }()\n );\n exports3.BaseX = BaseX;\n var Base32 = new BaseX(\"abcdefghijklmnopqrstuvwxyz234567\");\n exports3.Base32 = Base32;\n var Base58 = new BaseX(\"123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz\");\n exports3.Base58 = Base58;\n }\n });\n\n // ../../../node_modules/.pnpm/@ethersproject+sha2@5.8.0/node_modules/@ethersproject/sha2/lib/types.js\n var require_types3 = __commonJS({\n \"../../../node_modules/.pnpm/@ethersproject+sha2@5.8.0/node_modules/@ethersproject/sha2/lib/types.js\"(exports3) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n Object.defineProperty(exports3, \"__esModule\", { value: true });\n exports3.SupportedAlgorithm = void 0;\n var SupportedAlgorithm;\n (function(SupportedAlgorithm2) {\n SupportedAlgorithm2[\"sha256\"] = \"sha256\";\n SupportedAlgorithm2[\"sha512\"] = \"sha512\";\n })(SupportedAlgorithm = exports3.SupportedAlgorithm || (exports3.SupportedAlgorithm = {}));\n }\n });\n\n // ../../../node_modules/.pnpm/@ethersproject+sha2@5.8.0/node_modules/@ethersproject/sha2/lib/_version.js\n var require_version15 = __commonJS({\n \"../../../node_modules/.pnpm/@ethersproject+sha2@5.8.0/node_modules/@ethersproject/sha2/lib/_version.js\"(exports3) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n Object.defineProperty(exports3, \"__esModule\", { value: true });\n exports3.version = void 0;\n exports3.version = \"sha2/5.8.0\";\n }\n });\n\n // ../../../node_modules/.pnpm/@ethersproject+sha2@5.8.0/node_modules/@ethersproject/sha2/lib/browser-sha2.js\n var require_browser_sha2 = __commonJS({\n \"../../../node_modules/.pnpm/@ethersproject+sha2@5.8.0/node_modules/@ethersproject/sha2/lib/browser-sha2.js\"(exports3) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n var __importDefault3 = exports3 && exports3.__importDefault || function(mod3) {\n return mod3 && mod3.__esModule ? mod3 : { \"default\": mod3 };\n };\n Object.defineProperty(exports3, \"__esModule\", { value: true });\n exports3.computeHmac = exports3.sha512 = exports3.sha256 = exports3.ripemd160 = void 0;\n var hash_js_1 = __importDefault3(require_hash());\n var bytes_1 = require_lib2();\n var types_1 = require_types3();\n var logger_1 = require_lib();\n var _version_1 = require_version15();\n var logger = new logger_1.Logger(_version_1.version);\n function ripemd1602(data) {\n return \"0x\" + hash_js_1.default.ripemd160().update((0, bytes_1.arrayify)(data)).digest(\"hex\");\n }\n exports3.ripemd160 = ripemd1602;\n function sha2564(data) {\n return \"0x\" + hash_js_1.default.sha256().update((0, bytes_1.arrayify)(data)).digest(\"hex\");\n }\n exports3.sha256 = sha2564;\n function sha5122(data) {\n return \"0x\" + hash_js_1.default.sha512().update((0, bytes_1.arrayify)(data)).digest(\"hex\");\n }\n exports3.sha512 = sha5122;\n function computeHmac(algorithm, key, data) {\n if (!types_1.SupportedAlgorithm[algorithm]) {\n logger.throwError(\"unsupported algorithm \" + algorithm, logger_1.Logger.errors.UNSUPPORTED_OPERATION, {\n operation: \"hmac\",\n algorithm\n });\n }\n return \"0x\" + hash_js_1.default.hmac(hash_js_1.default[algorithm], (0, bytes_1.arrayify)(key)).update((0, bytes_1.arrayify)(data)).digest(\"hex\");\n }\n exports3.computeHmac = computeHmac;\n }\n });\n\n // ../../../node_modules/.pnpm/@ethersproject+sha2@5.8.0/node_modules/@ethersproject/sha2/lib/index.js\n var require_lib20 = __commonJS({\n \"../../../node_modules/.pnpm/@ethersproject+sha2@5.8.0/node_modules/@ethersproject/sha2/lib/index.js\"(exports3) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n Object.defineProperty(exports3, \"__esModule\", { value: true });\n exports3.SupportedAlgorithm = exports3.sha512 = exports3.sha256 = exports3.ripemd160 = exports3.computeHmac = void 0;\n var sha2_1 = require_browser_sha2();\n Object.defineProperty(exports3, \"computeHmac\", { enumerable: true, get: function() {\n return sha2_1.computeHmac;\n } });\n Object.defineProperty(exports3, \"ripemd160\", { enumerable: true, get: function() {\n return sha2_1.ripemd160;\n } });\n Object.defineProperty(exports3, \"sha256\", { enumerable: true, get: function() {\n return sha2_1.sha256;\n } });\n Object.defineProperty(exports3, \"sha512\", { enumerable: true, get: function() {\n return sha2_1.sha512;\n } });\n var types_1 = require_types3();\n Object.defineProperty(exports3, \"SupportedAlgorithm\", { enumerable: true, get: function() {\n return types_1.SupportedAlgorithm;\n } });\n }\n });\n\n // ../../../node_modules/.pnpm/@ethersproject+pbkdf2@5.8.0/node_modules/@ethersproject/pbkdf2/lib/browser-pbkdf2.js\n var require_browser_pbkdf2 = __commonJS({\n \"../../../node_modules/.pnpm/@ethersproject+pbkdf2@5.8.0/node_modules/@ethersproject/pbkdf2/lib/browser-pbkdf2.js\"(exports3) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n Object.defineProperty(exports3, \"__esModule\", { value: true });\n exports3.pbkdf2 = void 0;\n var bytes_1 = require_lib2();\n var sha2_1 = require_lib20();\n function pbkdf22(password, salt, iterations, keylen, hashAlgorithm) {\n password = (0, bytes_1.arrayify)(password);\n salt = (0, bytes_1.arrayify)(salt);\n var hLen;\n var l6 = 1;\n var DK = new Uint8Array(keylen);\n var block1 = new Uint8Array(salt.length + 4);\n block1.set(salt);\n var r2;\n var T4;\n for (var i3 = 1; i3 <= l6; i3++) {\n block1[salt.length] = i3 >> 24 & 255;\n block1[salt.length + 1] = i3 >> 16 & 255;\n block1[salt.length + 2] = i3 >> 8 & 255;\n block1[salt.length + 3] = i3 & 255;\n var U4 = (0, bytes_1.arrayify)((0, sha2_1.computeHmac)(hashAlgorithm, password, block1));\n if (!hLen) {\n hLen = U4.length;\n T4 = new Uint8Array(hLen);\n l6 = Math.ceil(keylen / hLen);\n r2 = keylen - (l6 - 1) * hLen;\n }\n T4.set(U4);\n for (var j2 = 1; j2 < iterations; j2++) {\n U4 = (0, bytes_1.arrayify)((0, sha2_1.computeHmac)(hashAlgorithm, password, U4));\n for (var k4 = 0; k4 < hLen; k4++)\n T4[k4] ^= U4[k4];\n }\n var destPos = (i3 - 1) * hLen;\n var len = i3 === l6 ? r2 : hLen;\n DK.set((0, bytes_1.arrayify)(T4).slice(0, len), destPos);\n }\n return (0, bytes_1.hexlify)(DK);\n }\n exports3.pbkdf2 = pbkdf22;\n }\n });\n\n // ../../../node_modules/.pnpm/@ethersproject+pbkdf2@5.8.0/node_modules/@ethersproject/pbkdf2/lib/index.js\n var require_lib21 = __commonJS({\n \"../../../node_modules/.pnpm/@ethersproject+pbkdf2@5.8.0/node_modules/@ethersproject/pbkdf2/lib/index.js\"(exports3) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n Object.defineProperty(exports3, \"__esModule\", { value: true });\n exports3.pbkdf2 = void 0;\n var pbkdf2_1 = require_browser_pbkdf2();\n Object.defineProperty(exports3, \"pbkdf2\", { enumerable: true, get: function() {\n return pbkdf2_1.pbkdf2;\n } });\n }\n });\n\n // ../../../node_modules/.pnpm/@ethersproject+wordlists@5.8.0/node_modules/@ethersproject/wordlists/lib/_version.js\n var require_version16 = __commonJS({\n \"../../../node_modules/.pnpm/@ethersproject+wordlists@5.8.0/node_modules/@ethersproject/wordlists/lib/_version.js\"(exports3) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n Object.defineProperty(exports3, \"__esModule\", { value: true });\n exports3.version = void 0;\n exports3.version = \"wordlists/5.8.0\";\n }\n });\n\n // ../../../node_modules/.pnpm/@ethersproject+wordlists@5.8.0/node_modules/@ethersproject/wordlists/lib/wordlist.js\n var require_wordlist = __commonJS({\n \"../../../node_modules/.pnpm/@ethersproject+wordlists@5.8.0/node_modules/@ethersproject/wordlists/lib/wordlist.js\"(exports3) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n Object.defineProperty(exports3, \"__esModule\", { value: true });\n exports3.Wordlist = exports3.logger = void 0;\n var exportWordlist = false;\n var hash_1 = require_lib12();\n var properties_1 = require_lib4();\n var logger_1 = require_lib();\n var _version_1 = require_version16();\n exports3.logger = new logger_1.Logger(_version_1.version);\n var Wordlist = (\n /** @class */\n function() {\n function Wordlist2(locale) {\n var _newTarget = this.constructor;\n exports3.logger.checkAbstract(_newTarget, Wordlist2);\n (0, properties_1.defineReadOnly)(this, \"locale\", locale);\n }\n Wordlist2.prototype.split = function(mnemonic) {\n return mnemonic.toLowerCase().split(/ +/g);\n };\n Wordlist2.prototype.join = function(words) {\n return words.join(\" \");\n };\n Wordlist2.check = function(wordlist) {\n var words = [];\n for (var i3 = 0; i3 < 2048; i3++) {\n var word = wordlist.getWord(i3);\n if (i3 !== wordlist.getWordIndex(word)) {\n return \"0x\";\n }\n words.push(word);\n }\n return (0, hash_1.id)(words.join(\"\\n\") + \"\\n\");\n };\n Wordlist2.register = function(lang, name) {\n if (!name) {\n name = lang.locale;\n }\n if (exportWordlist) {\n try {\n var anyGlobal = window;\n if (anyGlobal._ethers && anyGlobal._ethers.wordlists) {\n if (!anyGlobal._ethers.wordlists[name]) {\n (0, properties_1.defineReadOnly)(anyGlobal._ethers.wordlists, name, lang);\n }\n }\n } catch (error) {\n }\n }\n };\n return Wordlist2;\n }()\n );\n exports3.Wordlist = Wordlist;\n }\n });\n\n // ../../../node_modules/.pnpm/@ethersproject+wordlists@5.8.0/node_modules/@ethersproject/wordlists/lib/lang-cz.js\n var require_lang_cz = __commonJS({\n \"../../../node_modules/.pnpm/@ethersproject+wordlists@5.8.0/node_modules/@ethersproject/wordlists/lib/lang-cz.js\"(exports3) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n var __extends3 = exports3 && exports3.__extends || /* @__PURE__ */ function() {\n var extendStatics3 = function(d5, b4) {\n extendStatics3 = Object.setPrototypeOf || { __proto__: [] } instanceof Array && function(d6, b5) {\n d6.__proto__ = b5;\n } || function(d6, b5) {\n for (var p4 in b5)\n if (Object.prototype.hasOwnProperty.call(b5, p4))\n d6[p4] = b5[p4];\n };\n return extendStatics3(d5, b4);\n };\n return function(d5, b4) {\n if (typeof b4 !== \"function\" && b4 !== null)\n throw new TypeError(\"Class extends value \" + String(b4) + \" is not a constructor or null\");\n extendStatics3(d5, b4);\n function __() {\n this.constructor = d5;\n }\n d5.prototype = b4 === null ? Object.create(b4) : (__.prototype = b4.prototype, new __());\n };\n }();\n Object.defineProperty(exports3, \"__esModule\", { value: true });\n exports3.langCz = void 0;\n var wordlist_1 = require_wordlist();\n var words = \"AbdikaceAbecedaAdresaAgreseAkceAktovkaAlejAlkoholAmputaceAnanasAndulkaAnekdotaAnketaAntikaAnulovatArchaAroganceAsfaltAsistentAspiraceAstmaAstronomAtlasAtletikaAtolAutobusAzylBabkaBachorBacilBaculkaBadatelBagetaBagrBahnoBakterieBaladaBaletkaBalkonBalonekBalvanBalzaBambusBankomatBarbarBaretBarmanBarokoBarvaBaterkaBatohBavlnaBazalkaBazilikaBazukaBednaBeranBesedaBestieBetonBezinkaBezmocBeztakBicyklBidloBiftekBikinyBilanceBiografBiologBitvaBizonBlahobytBlatouchBlechaBleduleBleskBlikatBliznaBlokovatBlouditBludBobekBobrBodlinaBodnoutBohatostBojkotBojovatBokorysBolestBorecBoroviceBotaBoubelBouchatBoudaBouleBouratBoxerBradavkaBramboraBrankaBratrBreptaBriketaBrkoBrlohBronzBroskevBrunetkaBrusinkaBrzdaBrzyBublinaBubnovatBuchtaBuditelBudkaBudovaBufetBujarostBukviceBuldokBulvaBundaBunkrBurzaButikBuvolBuzolaBydletBylinaBytovkaBzukotCapartCarevnaCedrCeduleCejchCejnCelaCelerCelkemCelniceCeninaCennostCenovkaCentrumCenzorCestopisCetkaChalupaChapadloCharitaChataChechtatChemieChichotChirurgChladChlebaChlubitChmelChmuraChobotChocholChodbaCholeraChomoutChopitChorobaChovChrapotChrlitChrtChrupChtivostChudinaChutnatChvatChvilkaChvostChybaChystatChytitCibuleCigaretaCihelnaCihlaCinkotCirkusCisternaCitaceCitrusCizinecCizostClonaCokolivCouvatCtitelCtnostCudnostCuketaCukrCupotCvaknoutCvalCvikCvrkotCyklistaDalekoDarebaDatelDatumDceraDebataDechovkaDecibelDeficitDeflaceDeklDekretDemokratDepreseDerbyDeskaDetektivDikobrazDiktovatDiodaDiplomDiskDisplejDivadloDivochDlahaDlouhoDluhopisDnesDobroDobytekDocentDochutitDodnesDohledDohodaDohraDojemDojniceDokladDokolaDoktorDokumentDolarDolevaDolinaDomaDominantDomluvitDomovDonutitDopadDopisDoplnitDoposudDoprovodDopustitDorazitDorostDortDosahDoslovDostatekDosudDosytaDotazDotekDotknoutDoufatDoutnatDovozceDozaduDoznatDozorceDrahotaDrakDramatikDravecDrazeDrdolDrobnostDrogerieDrozdDrsnostDrtitDrzostDubenDuchovnoDudekDuhaDuhovkaDusitDusnoDutostDvojiceDvorecDynamitEkologEkonomieElektronElipsaEmailEmiseEmoceEmpatieEpizodaEpochaEpopejEposEsejEsenceEskortaEskymoEtiketaEuforieEvoluceExekuceExkurzeExpediceExplozeExportExtraktFackaFajfkaFakultaFanatikFantazieFarmacieFavoritFazoleFederaceFejetonFenkaFialkaFigurantFilozofFiltrFinanceFintaFixaceFjordFlanelFlirtFlotilaFondFosforFotbalFotkaFotonFrakceFreskaFrontaFukarFunkceFyzikaGalejeGarantGenetikaGeologGilotinaGlazuraGlejtGolemGolfistaGotikaGrafGramofonGranuleGrepGrilGrogGroteskaGumaHadiceHadrHalaHalenkaHanbaHanopisHarfaHarpunaHavranHebkostHejkalHejnoHejtmanHektarHelmaHematomHerecHernaHesloHezkyHistorikHladovkaHlasivkyHlavaHledatHlenHlodavecHlohHloupostHltatHlubinaHluchotaHmatHmotaHmyzHnisHnojivoHnoutHoblinaHobojHochHodinyHodlatHodnotaHodovatHojnostHokejHolinkaHolkaHolubHomoleHonitbaHonoraceHoralHordaHorizontHorkoHorlivecHormonHorninaHoroskopHorstvoHospodaHostinaHotovostHoubaHoufHoupatHouskaHovorHradbaHraniceHravostHrazdaHrbolekHrdinaHrdloHrdostHrnekHrobkaHromadaHrotHroudaHrozenHrstkaHrubostHryzatHubenostHubnoutHudbaHukotHumrHusitaHustotaHvozdHybnostHydrantHygienaHymnaHysterikIdylkaIhnedIkonaIluzeImunitaInfekceInflaceInkasoInovaceInspekceInternetInvalidaInvestorInzerceIronieJablkoJachtaJahodaJakmileJakostJalovecJantarJarmarkJaroJasanJasnoJatkaJavorJazykJedinecJedleJednatelJehlanJekotJelenJelitoJemnostJenomJepiceJeseterJevitJezdecJezeroJinakJindyJinochJiskraJistotaJitrniceJizvaJmenovatJogurtJurtaKabaretKabelKabinetKachnaKadetKadidloKahanKajakKajutaKakaoKaktusKalamitaKalhotyKalibrKalnostKameraKamkolivKamnaKanibalKanoeKantorKapalinaKapelaKapitolaKapkaKapleKapotaKaprKapustaKapybaraKaramelKarotkaKartonKasaKatalogKatedraKauceKauzaKavalecKazajkaKazetaKazivostKdekolivKdesiKedlubenKempKeramikaKinoKlacekKladivoKlamKlapotKlasikaKlaunKlecKlenbaKlepatKlesnoutKlidKlimaKlisnaKloboukKlokanKlopaKloubKlubovnaKlusatKluzkostKmenKmitatKmotrKnihaKnotKoaliceKoberecKobkaKoblihaKobylaKocourKohoutKojenecKokosKoktejlKolapsKoledaKolizeKoloKomandoKometaKomikKomnataKomoraKompasKomunitaKonatKonceptKondiceKonecKonfeseKongresKoninaKonkursKontaktKonzervaKopanecKopieKopnoutKoprovkaKorbelKorektorKormidloKoroptevKorpusKorunaKorytoKorzetKosatecKostkaKotelKotletaKotoulKoukatKoupelnaKousekKouzloKovbojKozaKozorohKrabiceKrachKrajinaKralovatKrasopisKravataKreditKrejcarKresbaKrevetaKriketKritikKrizeKrkavecKrmelecKrmivoKrocanKrokKronikaKropitKroupaKrovkaKrtekKruhadloKrupiceKrutostKrvinkaKrychleKryptaKrystalKrytKudlankaKufrKujnostKuklaKulajdaKulichKulkaKulometKulturaKunaKupodivuKurtKurzorKutilKvalitaKvasinkaKvestorKynologKyselinaKytaraKyticeKytkaKytovecKyvadloLabradorLachtanLadnostLaikLakomecLamelaLampaLanovkaLasiceLasoLasturaLatinkaLavinaLebkaLeckdyLedenLedniceLedovkaLedvinaLegendaLegieLegraceLehceLehkostLehnoutLektvarLenochodLentilkaLepenkaLepidloLetadloLetecLetmoLetokruhLevhartLevitaceLevobokLibraLichotkaLidojedLidskostLihovinaLijavecLilekLimetkaLinieLinkaLinoleumListopadLitinaLitovatLobistaLodivodLogikaLogopedLokalitaLoketLomcovatLopataLopuchLordLososLotrLoudalLouhLoukaLouskatLovecLstivostLucernaLuciferLumpLuskLustraceLviceLyraLyrikaLysinaMadamMadloMagistrMahagonMajetekMajitelMajoritaMakakMakoviceMakrelaMalbaMalinaMalovatMalviceMaminkaMandleMankoMarnostMasakrMaskotMasopustMaticeMatrikaMaturitaMazanecMazivoMazlitMazurkaMdlobaMechanikMeditaceMedovinaMelasaMelounMentolkaMetlaMetodaMetrMezeraMigraceMihnoutMihuleMikinaMikrofonMilenecMilimetrMilostMimikaMincovnaMinibarMinometMinulostMiskaMistrMixovatMladostMlhaMlhovinaMlokMlsatMluvitMnichMnohemMobilMocnostModelkaModlitbaMohylaMokroMolekulaMomentkaMonarchaMonoklMonstrumMontovatMonzunMosazMoskytMostMotivaceMotorkaMotykaMouchaMoudrostMozaikaMozekMozolMramorMravenecMrkevMrtvolaMrzetMrzutostMstitelMudrcMuflonMulatMumieMuniceMusetMutaceMuzeumMuzikantMyslivecMzdaNabouratNachytatNadaceNadbytekNadhozNadobroNadpisNahlasNahnatNahodileNahraditNaivitaNajednouNajistoNajmoutNaklonitNakonecNakrmitNalevoNamazatNamluvitNanometrNaokoNaopakNaostroNapadatNapevnoNaplnitNapnoutNaposledNaprostoNaroditNarubyNarychloNasaditNasekatNaslepoNastatNatolikNavenekNavrchNavzdoryNazvatNebeNechatNeckyNedalekoNedbatNeduhNegaceNehetNehodaNejenNejprveNeklidNelibostNemilostNemocNeochotaNeonkaNepokojNerostNervNesmyslNesouladNetvorNeuronNevinaNezvykleNicotaNijakNikamNikdyNiklNikterakNitroNoclehNohaviceNominaceNoraNorekNositelNosnostNouzeNovinyNovotaNozdraNudaNudleNugetNutitNutnostNutrieNymfaObalObarvitObavaObdivObecObehnatObejmoutObezitaObhajobaObilniceObjasnitObjektObklopitOblastOblekOblibaOblohaObludaObnosObohatitObojekOboutObrazecObrnaObrubaObrysObsahObsluhaObstaratObuvObvazObvinitObvodObvykleObyvatelObzorOcasOcelOcenitOchladitOchotaOchranaOcitnoutOdbojOdbytOdchodOdcizitOdebratOdeslatOdevzdatOdezvaOdhadceOdhoditOdjetOdjinudOdkazOdkoupitOdlivOdlukaOdmlkaOdolnostOdpadOdpisOdploutOdporOdpustitOdpykatOdrazkaOdsouditOdstupOdsunOdtokOdtudOdvahaOdvetaOdvolatOdvracetOdznakOfinaOfsajdOhlasOhniskoOhradaOhrozitOhryzekOkapOkeniceOklikaOknoOkouzlitOkovyOkrasaOkresOkrsekOkruhOkupantOkurkaOkusitOlejninaOlizovatOmakOmeletaOmezitOmladinaOmlouvatOmluvaOmylOnehdyOpakovatOpasekOperaceOpiceOpilostOpisovatOporaOpoziceOpravduOprotiOrbitalOrchestrOrgieOrliceOrlojOrtelOsadaOschnoutOsikaOsivoOslavaOslepitOslnitOslovitOsnovaOsobaOsolitOspalecOstenOstrahaOstudaOstychOsvojitOteplitOtiskOtopOtrhatOtrlostOtrokOtrubyOtvorOvanoutOvarOvesOvlivnitOvoceOxidOzdobaPachatelPacientPadouchPahorekPaktPalandaPalecPalivoPalubaPamfletPamlsekPanenkaPanikaPannaPanovatPanstvoPantoflePaprikaParketaParodiePartaParukaParybaPasekaPasivitaPastelkaPatentPatronaPavoukPaznehtPazourekPeckaPedagogPejsekPekloPelotonPenaltaPendrekPenzePeriskopPeroPestrostPetardaPeticePetrolejPevninaPexesoPianistaPihaPijavicePiklePiknikPilinaPilnostPilulkaPinzetaPipetaPisatelPistolePitevnaPivnicePivovarPlacentaPlakatPlamenPlanetaPlastikaPlatitPlavidloPlazPlechPlemenoPlentaPlesPletivoPlevelPlivatPlnitPlnoPlochaPlodinaPlombaPloutPlukPlynPobavitPobytPochodPocitPoctivecPodatPodcenitPodepsatPodhledPodivitPodkladPodmanitPodnikPodobaPodporaPodrazPodstataPodvodPodzimPoeziePohankaPohnutkaPohovorPohromaPohybPointaPojistkaPojmoutPokazitPoklesPokojPokrokPokutaPokynPolednePolibekPolknoutPolohaPolynomPomaluPominoutPomlkaPomocPomstaPomysletPonechatPonorkaPonurostPopadatPopelPopisekPoplachPoprositPopsatPopudPoradcePorcePorodPoruchaPoryvPosaditPosedPosilaPoskokPoslanecPosouditPospoluPostavaPosudekPosypPotahPotkanPotleskPotomekPotravaPotupaPotvoraPoukazPoutoPouzdroPovahaPovidlaPovlakPovozPovrchPovstatPovykPovzdechPozdravPozemekPoznatekPozorPozvatPracovatPrahoryPraktikaPralesPraotecPraporekPrasePravdaPrincipPrknoProbuditProcentoProdejProfeseProhraProjektProlomitPromilePronikatPropadProrokProsbaProtonProutekProvazPrskavkaPrstenPrudkostPrutPrvekPrvohoryPsanecPsovodPstruhPtactvoPubertaPuchPudlPukavecPuklinaPukrlePultPumpaPuncPupenPusaPusinkaPustinaPutovatPutykaPyramidaPyskPytelRacekRachotRadiaceRadniceRadonRaftRagbyRaketaRakovinaRamenoRampouchRandeRarachRaritaRasovnaRastrRatolestRazanceRazidloReagovatReakceReceptRedaktorReferentReflexRejnokReklamaRekordRekrutRektorReputaceRevizeRevmaRevolverRezervaRiskovatRizikoRobotikaRodokmenRohovkaRokleRokokoRomanetoRopovodRopuchaRorejsRosolRostlinaRotmistrRotopedRotundaRoubenkaRouchoRoupRouraRovinaRovniceRozborRozchodRozdatRozeznatRozhodceRozinkaRozjezdRozkazRozlohaRozmarRozpadRozruchRozsahRoztokRozumRozvodRubrikaRuchadloRukaviceRukopisRybaRybolovRychlostRydloRypadloRytinaRyzostSadistaSahatSakoSamecSamizdatSamotaSanitkaSardinkaSasankaSatelitSazbaSazeniceSborSchovatSebrankaSeceseSedadloSedimentSedloSehnatSejmoutSekeraSektaSekundaSekvojeSemenoSenoServisSesaditSeshoraSeskokSeslatSestraSesuvSesypatSetbaSetinaSetkatSetnoutSetrvatSeverSeznamShodaShrnoutSifonSilniceSirkaSirotekSirupSituaceSkafandrSkaliskoSkanzenSkautSkeptikSkicaSkladbaSkleniceSkloSkluzSkobaSkokanSkoroSkriptaSkrzSkupinaSkvostSkvrnaSlabikaSladidloSlaninaSlastSlavnostSledovatSlepecSlevaSlezinaSlibSlinaSlizniceSlonSloupekSlovoSluchSluhaSlunceSlupkaSlzaSmaragdSmetanaSmilstvoSmlouvaSmogSmradSmrkSmrtkaSmutekSmyslSnadSnahaSnobSobotaSochaSodovkaSokolSopkaSotvaSoubojSoucitSoudceSouhlasSouladSoumrakSoupravaSousedSoutokSouvisetSpalovnaSpasitelSpisSplavSpodekSpojenecSpoluSponzorSpornostSpoustaSprchaSpustitSrandaSrazSrdceSrnaSrnecSrovnatSrpenSrstSrubStaniceStarostaStatikaStavbaStehnoStezkaStodolaStolekStopaStornoStoupatStrachStresStrhnoutStromStrunaStudnaStupniceStvolStykSubjektSubtropySucharSudostSuknoSundatSunoutSurikataSurovinaSvahSvalstvoSvetrSvatbaSvazekSvisleSvitekSvobodaSvodidloSvorkaSvrabSykavkaSykotSynekSynovecSypatSypkostSyrovostSyselSytostTabletkaTabuleTahounTajemnoTajfunTajgaTajitTajnostTaktikaTamhleTamponTancovatTanecTankerTapetaTaveninaTazatelTechnikaTehdyTekutinaTelefonTemnotaTendenceTenistaTenorTeplotaTepnaTeprveTerapieTermoskaTextilTichoTiskopisTitulekTkadlecTkaninaTlapkaTleskatTlukotTlupaTmelToaletaTopinkaTopolTorzoTouhaToulecTradiceTraktorTrampTrasaTraverzaTrefitTrestTrezorTrhavinaTrhlinaTrochuTrojiceTroskaTroubaTrpceTrpitelTrpkostTrubecTruchlitTruhliceTrusTrvatTudyTuhnoutTuhostTundraTuristaTurnajTuzemskoTvarohTvorbaTvrdostTvrzTygrTykevUbohostUbozeUbratUbrousekUbrusUbytovnaUchoUctivostUdivitUhraditUjednatUjistitUjmoutUkazatelUklidnitUklonitUkotvitUkrojitUliceUlitaUlovitUmyvadloUnavitUniformaUniknoutUpadnoutUplatnitUplynoutUpoutatUpravitUranUrazitUsednoutUsilovatUsmrtitUsnadnitUsnoutUsouditUstlatUstrnoutUtahovatUtkatUtlumitUtonoutUtopenecUtrousitUvalitUvolnitUvozovkaUzdravitUzelUzeninaUzlinaUznatVagonValchaValounVanaVandalVanilkaVaranVarhanyVarovatVcelkuVchodVdovaVedroVegetaceVejceVelbloudVeletrhVelitelVelmocVelrybaVenkovVerandaVerzeVeselkaVeskrzeVesniceVespoduVestaVeterinaVeverkaVibraceVichrVideohraVidinaVidleVilaViniceVisetVitalitaVizeVizitkaVjezdVkladVkusVlajkaVlakVlasecVlevoVlhkostVlivVlnovkaVloupatVnucovatVnukVodaVodivostVodoznakVodstvoVojenskyVojnaVojskoVolantVolbaVolitVolnoVoskovkaVozidloVozovnaVpravoVrabecVracetVrahVrataVrbaVrcholekVrhatVrstvaVrtuleVsaditVstoupitVstupVtipVybavitVybratVychovatVydatVydraVyfotitVyhledatVyhnoutVyhoditVyhraditVyhubitVyjasnitVyjetVyjmoutVyklopitVykonatVylekatVymazatVymezitVymizetVymysletVynechatVynikatVynutitVypadatVyplatitVypravitVypustitVyrazitVyrovnatVyrvatVyslovitVysokoVystavitVysunoutVysypatVytasitVytesatVytratitVyvinoutVyvolatVyvrhelVyzdobitVyznatVzaduVzbuditVzchopitVzdorVzduchVzdychatVzestupVzhledemVzkazVzlykatVznikVzorekVzpouraVztahVztekXylofonZabratZabydletZachovatZadarmoZadusitZafoukatZahltitZahoditZahradaZahynoutZajatecZajetZajistitZaklepatZakoupitZalepitZamezitZamotatZamysletZanechatZanikatZaplatitZapojitZapsatZarazitZastavitZasunoutZatajitZatemnitZatknoutZaujmoutZavalitZaveletZavinitZavolatZavrtatZazvonitZbavitZbrusuZbudovatZbytekZdalekaZdarmaZdatnostZdivoZdobitZdrojZdvihZdymadloZeleninaZemanZeminaZeptatZezaduZezdolaZhatitZhltnoutZhlubokaZhotovitZhrubaZimaZimniceZjemnitZklamatZkoumatZkratkaZkumavkaZlatoZlehkaZlobaZlomZlostZlozvykZmapovatZmarZmatekZmijeZmizetZmocnitZmodratZmrzlinaZmutovatZnakZnalostZnamenatZnovuZobrazitZotavitZoubekZoufaleZploditZpomalitZpravaZprostitZprudkaZprvuZradaZranitZrcadloZrnitostZrnoZrovnaZrychlitZrzavostZtichaZtratitZubovinaZubrZvednoutZvenkuZveselaZvonZvratZvukovodZvyk\";\n var wordlist = null;\n function loadWords(lang) {\n if (wordlist != null) {\n return;\n }\n wordlist = words.replace(/([A-Z])/g, \" $1\").toLowerCase().substring(1).split(\" \");\n if (wordlist_1.Wordlist.check(lang) !== \"0x25f44555f4af25b51a711136e1c7d6e50ce9f8917d39d6b1f076b2bb4d2fac1a\") {\n wordlist = null;\n throw new Error(\"BIP39 Wordlist for en (English) FAILED\");\n }\n }\n var LangCz = (\n /** @class */\n function(_super) {\n __extends3(LangCz2, _super);\n function LangCz2() {\n return _super.call(this, \"cz\") || this;\n }\n LangCz2.prototype.getWord = function(index2) {\n loadWords(this);\n return wordlist[index2];\n };\n LangCz2.prototype.getWordIndex = function(word) {\n loadWords(this);\n return wordlist.indexOf(word);\n };\n return LangCz2;\n }(wordlist_1.Wordlist)\n );\n var langCz = new LangCz();\n exports3.langCz = langCz;\n wordlist_1.Wordlist.register(langCz);\n }\n });\n\n // ../../../node_modules/.pnpm/@ethersproject+wordlists@5.8.0/node_modules/@ethersproject/wordlists/lib/lang-en.js\n var require_lang_en = __commonJS({\n \"../../../node_modules/.pnpm/@ethersproject+wordlists@5.8.0/node_modules/@ethersproject/wordlists/lib/lang-en.js\"(exports3) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n var __extends3 = exports3 && exports3.__extends || /* @__PURE__ */ function() {\n var extendStatics3 = function(d5, b4) {\n extendStatics3 = Object.setPrototypeOf || { __proto__: [] } instanceof Array && function(d6, b5) {\n d6.__proto__ = b5;\n } || function(d6, b5) {\n for (var p4 in b5)\n if (Object.prototype.hasOwnProperty.call(b5, p4))\n d6[p4] = b5[p4];\n };\n return extendStatics3(d5, b4);\n };\n return function(d5, b4) {\n if (typeof b4 !== \"function\" && b4 !== null)\n throw new TypeError(\"Class extends value \" + String(b4) + \" is not a constructor or null\");\n extendStatics3(d5, b4);\n function __() {\n this.constructor = d5;\n }\n d5.prototype = b4 === null ? Object.create(b4) : (__.prototype = b4.prototype, new __());\n };\n }();\n Object.defineProperty(exports3, \"__esModule\", { value: true });\n exports3.langEn = void 0;\n var wordlist_1 = require_wordlist();\n var words = \"AbandonAbilityAbleAboutAboveAbsentAbsorbAbstractAbsurdAbuseAccessAccidentAccountAccuseAchieveAcidAcousticAcquireAcrossActActionActorActressActualAdaptAddAddictAddressAdjustAdmitAdultAdvanceAdviceAerobicAffairAffordAfraidAgainAgeAgentAgreeAheadAimAirAirportAisleAlarmAlbumAlcoholAlertAlienAllAlleyAllowAlmostAloneAlphaAlreadyAlsoAlterAlwaysAmateurAmazingAmongAmountAmusedAnalystAnchorAncientAngerAngleAngryAnimalAnkleAnnounceAnnualAnotherAnswerAntennaAntiqueAnxietyAnyApartApologyAppearAppleApproveAprilArchArcticAreaArenaArgueArmArmedArmorArmyAroundArrangeArrestArriveArrowArtArtefactArtistArtworkAskAspectAssaultAssetAssistAssumeAsthmaAthleteAtomAttackAttendAttitudeAttractAuctionAuditAugustAuntAuthorAutoAutumnAverageAvocadoAvoidAwakeAwareAwayAwesomeAwfulAwkwardAxisBabyBachelorBaconBadgeBagBalanceBalconyBallBambooBananaBannerBarBarelyBargainBarrelBaseBasicBasketBattleBeachBeanBeautyBecauseBecomeBeefBeforeBeginBehaveBehindBelieveBelowBeltBenchBenefitBestBetrayBetterBetweenBeyondBicycleBidBikeBindBiologyBirdBirthBitterBlackBladeBlameBlanketBlastBleakBlessBlindBloodBlossomBlouseBlueBlurBlushBoardBoatBodyBoilBombBoneBonusBookBoostBorderBoringBorrowBossBottomBounceBoxBoyBracketBrainBrandBrassBraveBreadBreezeBrickBridgeBriefBrightBringBriskBroccoliBrokenBronzeBroomBrotherBrownBrushBubbleBuddyBudgetBuffaloBuildBulbBulkBulletBundleBunkerBurdenBurgerBurstBusBusinessBusyButterBuyerBuzzCabbageCabinCableCactusCageCakeCallCalmCameraCampCanCanalCancelCandyCannonCanoeCanvasCanyonCapableCapitalCaptainCarCarbonCardCargoCarpetCarryCartCaseCashCasinoCastleCasualCatCatalogCatchCategoryCattleCaughtCauseCautionCaveCeilingCeleryCementCensusCenturyCerealCertainChairChalkChampionChangeChaosChapterChargeChaseChatCheapCheckCheeseChefCherryChestChickenChiefChildChimneyChoiceChooseChronicChuckleChunkChurnCigarCinnamonCircleCitizenCityCivilClaimClapClarifyClawClayCleanClerkCleverClickClientCliffClimbClinicClipClockClogCloseClothCloudClownClubClumpClusterClutchCoachCoastCoconutCodeCoffeeCoilCoinCollectColorColumnCombineComeComfortComicCommonCompanyConcertConductConfirmCongressConnectConsiderControlConvinceCookCoolCopperCopyCoralCoreCornCorrectCostCottonCouchCountryCoupleCourseCousinCoverCoyoteCrackCradleCraftCramCraneCrashCraterCrawlCrazyCreamCreditCreekCrewCricketCrimeCrispCriticCropCrossCrouchCrowdCrucialCruelCruiseCrumbleCrunchCrushCryCrystalCubeCultureCupCupboardCuriousCurrentCurtainCurveCushionCustomCuteCycleDadDamageDampDanceDangerDaringDashDaughterDawnDayDealDebateDebrisDecadeDecemberDecideDeclineDecorateDecreaseDeerDefenseDefineDefyDegreeDelayDeliverDemandDemiseDenialDentistDenyDepartDependDepositDepthDeputyDeriveDescribeDesertDesignDeskDespairDestroyDetailDetectDevelopDeviceDevoteDiagramDialDiamondDiaryDiceDieselDietDifferDigitalDignityDilemmaDinnerDinosaurDirectDirtDisagreeDiscoverDiseaseDishDismissDisorderDisplayDistanceDivertDivideDivorceDizzyDoctorDocumentDogDollDolphinDomainDonateDonkeyDonorDoorDoseDoubleDoveDraftDragonDramaDrasticDrawDreamDressDriftDrillDrinkDripDriveDropDrumDryDuckDumbDuneDuringDustDutchDutyDwarfDynamicEagerEagleEarlyEarnEarthEasilyEastEasyEchoEcologyEconomyEdgeEditEducateEffortEggEightEitherElbowElderElectricElegantElementElephantElevatorEliteElseEmbarkEmbodyEmbraceEmergeEmotionEmployEmpowerEmptyEnableEnactEndEndlessEndorseEnemyEnergyEnforceEngageEngineEnhanceEnjoyEnlistEnoughEnrichEnrollEnsureEnterEntireEntryEnvelopeEpisodeEqualEquipEraEraseErodeErosionErrorEruptEscapeEssayEssenceEstateEternalEthicsEvidenceEvilEvokeEvolveExactExampleExcessExchangeExciteExcludeExcuseExecuteExerciseExhaustExhibitExileExistExitExoticExpandExpectExpireExplainExposeExpressExtendExtraEyeEyebrowFabricFaceFacultyFadeFaintFaithFallFalseFameFamilyFamousFanFancyFantasyFarmFashionFatFatalFatherFatigueFaultFavoriteFeatureFebruaryFederalFeeFeedFeelFemaleFenceFestivalFetchFeverFewFiberFictionFieldFigureFileFilmFilterFinalFindFineFingerFinishFireFirmFirstFiscalFishFitFitnessFixFlagFlameFlashFlatFlavorFleeFlightFlipFloatFlockFloorFlowerFluidFlushFlyFoamFocusFogFoilFoldFollowFoodFootForceForestForgetForkFortuneForumForwardFossilFosterFoundFoxFragileFrameFrequentFreshFriendFringeFrogFrontFrostFrownFrozenFruitFuelFunFunnyFurnaceFuryFutureGadgetGainGalaxyGalleryGameGapGarageGarbageGardenGarlicGarmentGasGaspGateGatherGaugeGazeGeneralGeniusGenreGentleGenuineGestureGhostGiantGiftGiggleGingerGiraffeGirlGiveGladGlanceGlareGlassGlideGlimpseGlobeGloomGloryGloveGlowGlueGoatGoddessGoldGoodGooseGorillaGospelGossipGovernGownGrabGraceGrainGrantGrapeGrassGravityGreatGreenGridGriefGritGroceryGroupGrowGruntGuardGuessGuideGuiltGuitarGunGymHabitHairHalfHammerHamsterHandHappyHarborHardHarshHarvestHatHaveHawkHazardHeadHealthHeartHeavyHedgehogHeightHelloHelmetHelpHenHeroHiddenHighHillHintHipHireHistoryHobbyHockeyHoldHoleHolidayHollowHomeHoneyHoodHopeHornHorrorHorseHospitalHostHotelHourHoverHubHugeHumanHumbleHumorHundredHungryHuntHurdleHurryHurtHusbandHybridIceIconIdeaIdentifyIdleIgnoreIllIllegalIllnessImageImitateImmenseImmuneImpactImposeImproveImpulseInchIncludeIncomeIncreaseIndexIndicateIndoorIndustryInfantInflictInformInhaleInheritInitialInjectInjuryInmateInnerInnocentInputInquiryInsaneInsectInsideInspireInstallIntactInterestIntoInvestInviteInvolveIronIslandIsolateIssueItemIvoryJacketJaguarJarJazzJealousJeansJellyJewelJobJoinJokeJourneyJoyJudgeJuiceJumpJungleJuniorJunkJustKangarooKeenKeepKetchupKeyKickKidKidneyKindKingdomKissKitKitchenKiteKittenKiwiKneeKnifeKnockKnowLabLabelLaborLadderLadyLakeLampLanguageLaptopLargeLaterLatinLaughLaundryLavaLawLawnLawsuitLayerLazyLeaderLeafLearnLeaveLectureLeftLegLegalLegendLeisureLemonLendLengthLensLeopardLessonLetterLevelLiarLibertyLibraryLicenseLifeLiftLightLikeLimbLimitLinkLionLiquidListLittleLiveLizardLoadLoanLobsterLocalLockLogicLonelyLongLoopLotteryLoudLoungeLoveLoyalLuckyLuggageLumberLunarLunchLuxuryLyricsMachineMadMagicMagnetMaidMailMainMajorMakeMammalManManageMandateMangoMansionManualMapleMarbleMarchMarginMarineMarketMarriageMaskMassMasterMatchMaterialMathMatrixMatterMaximumMazeMeadowMeanMeasureMeatMechanicMedalMediaMelodyMeltMemberMemoryMentionMenuMercyMergeMeritMerryMeshMessageMetalMethodMiddleMidnightMilkMillionMimicMindMinimumMinorMinuteMiracleMirrorMiseryMissMistakeMixMixedMixtureMobileModelModifyMomMomentMonitorMonkeyMonsterMonthMoonMoralMoreMorningMosquitoMotherMotionMotorMountainMouseMoveMovieMuchMuffinMuleMultiplyMuscleMuseumMushroomMusicMustMutualMyselfMysteryMythNaiveNameNapkinNarrowNastyNationNatureNearNeckNeedNegativeNeglectNeitherNephewNerveNestNetNetworkNeutralNeverNewsNextNiceNightNobleNoiseNomineeNoodleNormalNorthNoseNotableNoteNothingNoticeNovelNowNuclearNumberNurseNutOakObeyObjectObligeObscureObserveObtainObviousOccurOceanOctoberOdorOffOfferOfficeOftenOilOkayOldOliveOlympicOmitOnceOneOnionOnlineOnlyOpenOperaOpinionOpposeOptionOrangeOrbitOrchardOrderOrdinaryOrganOrientOriginalOrphanOstrichOtherOutdoorOuterOutputOutsideOvalOvenOverOwnOwnerOxygenOysterOzonePactPaddlePagePairPalacePalmPandaPanelPanicPantherPaperParadeParentParkParrotPartyPassPatchPathPatientPatrolPatternPausePavePaymentPeacePeanutPearPeasantPelicanPenPenaltyPencilPeoplePepperPerfectPermitPersonPetPhonePhotoPhrasePhysicalPianoPicnicPicturePiecePigPigeonPillPilotPinkPioneerPipePistolPitchPizzaPlacePlanetPlasticPlatePlayPleasePledgePluckPlugPlungePoemPoetPointPolarPolePolicePondPonyPoolPopularPortionPositionPossiblePostPotatoPotteryPovertyPowderPowerPracticePraisePredictPreferPreparePresentPrettyPreventPricePridePrimaryPrintPriorityPrisonPrivatePrizeProblemProcessProduceProfitProgramProjectPromoteProofPropertyProsperProtectProudProvidePublicPuddingPullPulpPulsePumpkinPunchPupilPuppyPurchasePurityPurposePursePushPutPuzzlePyramidQualityQuantumQuarterQuestionQuickQuitQuizQuoteRabbitRaccoonRaceRackRadarRadioRailRainRaiseRallyRampRanchRandomRangeRapidRareRateRatherRavenRawRazorReadyRealReasonRebelRebuildRecallReceiveRecipeRecordRecycleReduceReflectReformRefuseRegionRegretRegularRejectRelaxReleaseReliefRelyRemainRememberRemindRemoveRenderRenewRentReopenRepairRepeatReplaceReportRequireRescueResembleResistResourceResponseResultRetireRetreatReturnReunionRevealReviewRewardRhythmRibRibbonRiceRichRideRidgeRifleRightRigidRingRiotRippleRiskRitualRivalRiverRoadRoastRobotRobustRocketRomanceRoofRookieRoomRoseRotateRoughRoundRouteRoyalRubberRudeRugRuleRunRunwayRuralSadSaddleSadnessSafeSailSaladSalmonSalonSaltSaluteSameSampleSandSatisfySatoshiSauceSausageSaveSayScaleScanScareScatterSceneSchemeSchoolScienceScissorsScorpionScoutScrapScreenScriptScrubSeaSearchSeasonSeatSecondSecretSectionSecuritySeedSeekSegmentSelectSellSeminarSeniorSenseSentenceSeriesServiceSessionSettleSetupSevenShadowShaftShallowShareShedShellSheriffShieldShiftShineShipShiverShockShoeShootShopShortShoulderShoveShrimpShrugShuffleShySiblingSickSideSiegeSightSignSilentSilkSillySilverSimilarSimpleSinceSingSirenSisterSituateSixSizeSkateSketchSkiSkillSkinSkirtSkullSlabSlamSleepSlenderSliceSlideSlightSlimSloganSlotSlowSlushSmallSmartSmileSmokeSmoothSnackSnakeSnapSniffSnowSoapSoccerSocialSockSodaSoftSolarSoldierSolidSolutionSolveSomeoneSongSoonSorrySortSoulSoundSoupSourceSouthSpaceSpareSpatialSpawnSpeakSpecialSpeedSpellSpendSphereSpiceSpiderSpikeSpinSpiritSplitSpoilSponsorSpoonSportSpotSpraySpreadSpringSpySquareSqueezeSquirrelStableStadiumStaffStageStairsStampStandStartStateStaySteakSteelStemStepStereoStickStillStingStockStomachStoneStoolStoryStoveStrategyStreetStrikeStrongStruggleStudentStuffStumbleStyleSubjectSubmitSubwaySuccessSuchSuddenSufferSugarSuggestSuitSummerSunSunnySunsetSuperSupplySupremeSureSurfaceSurgeSurpriseSurroundSurveySuspectSustainSwallowSwampSwapSwarmSwearSweetSwiftSwimSwingSwitchSwordSymbolSymptomSyrupSystemTableTackleTagTailTalentTalkTankTapeTargetTaskTasteTattooTaxiTeachTeamTellTenTenantTennisTentTermTestTextThankThatThemeThenTheoryThereTheyThingThisThoughtThreeThriveThrowThumbThunderTicketTideTigerTiltTimberTimeTinyTipTiredTissueTitleToastTobaccoTodayToddlerToeTogetherToiletTokenTomatoTomorrowToneTongueTonightToolToothTopTopicToppleTorchTornadoTortoiseTossTotalTouristTowardTowerTownToyTrackTradeTrafficTragicTrainTransferTrapTrashTravelTrayTreatTreeTrendTrialTribeTrickTriggerTrimTripTrophyTroubleTruckTrueTrulyTrumpetTrustTruthTryTubeTuitionTumbleTunaTunnelTurkeyTurnTurtleTwelveTwentyTwiceTwinTwistTwoTypeTypicalUglyUmbrellaUnableUnawareUncleUncoverUnderUndoUnfairUnfoldUnhappyUniformUniqueUnitUniverseUnknownUnlockUntilUnusualUnveilUpdateUpgradeUpholdUponUpperUpsetUrbanUrgeUsageUseUsedUsefulUselessUsualUtilityVacantVacuumVagueValidValleyValveVanVanishVaporVariousVastVaultVehicleVelvetVendorVentureVenueVerbVerifyVersionVeryVesselVeteranViableVibrantViciousVictoryVideoViewVillageVintageViolinVirtualVirusVisaVisitVisualVitalVividVocalVoiceVoidVolcanoVolumeVoteVoyageWageWagonWaitWalkWallWalnutWantWarfareWarmWarriorWashWaspWasteWaterWaveWayWealthWeaponWearWeaselWeatherWebWeddingWeekendWeirdWelcomeWestWetWhaleWhatWheatWheelWhenWhereWhipWhisperWideWidthWifeWildWillWinWindowWineWingWinkWinnerWinterWireWisdomWiseWishWitnessWolfWomanWonderWoodWoolWordWorkWorldWorryWorthWrapWreckWrestleWristWriteWrongYardYearYellowYouYoungYouthZebraZeroZoneZoo\";\n var wordlist = null;\n function loadWords(lang) {\n if (wordlist != null) {\n return;\n }\n wordlist = words.replace(/([A-Z])/g, \" $1\").toLowerCase().substring(1).split(\" \");\n if (wordlist_1.Wordlist.check(lang) !== \"0x3c8acc1e7b08d8e76f9fda015ef48dc8c710a73cb7e0f77b2c18a9b5a7adde60\") {\n wordlist = null;\n throw new Error(\"BIP39 Wordlist for en (English) FAILED\");\n }\n }\n var LangEn = (\n /** @class */\n function(_super) {\n __extends3(LangEn2, _super);\n function LangEn2() {\n return _super.call(this, \"en\") || this;\n }\n LangEn2.prototype.getWord = function(index2) {\n loadWords(this);\n return wordlist[index2];\n };\n LangEn2.prototype.getWordIndex = function(word) {\n loadWords(this);\n return wordlist.indexOf(word);\n };\n return LangEn2;\n }(wordlist_1.Wordlist)\n );\n var langEn = new LangEn();\n exports3.langEn = langEn;\n wordlist_1.Wordlist.register(langEn);\n }\n });\n\n // ../../../node_modules/.pnpm/@ethersproject+wordlists@5.8.0/node_modules/@ethersproject/wordlists/lib/lang-es.js\n var require_lang_es = __commonJS({\n \"../../../node_modules/.pnpm/@ethersproject+wordlists@5.8.0/node_modules/@ethersproject/wordlists/lib/lang-es.js\"(exports3) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n var __extends3 = exports3 && exports3.__extends || /* @__PURE__ */ function() {\n var extendStatics3 = function(d5, b4) {\n extendStatics3 = Object.setPrototypeOf || { __proto__: [] } instanceof Array && function(d6, b5) {\n d6.__proto__ = b5;\n } || function(d6, b5) {\n for (var p4 in b5)\n if (Object.prototype.hasOwnProperty.call(b5, p4))\n d6[p4] = b5[p4];\n };\n return extendStatics3(d5, b4);\n };\n return function(d5, b4) {\n if (typeof b4 !== \"function\" && b4 !== null)\n throw new TypeError(\"Class extends value \" + String(b4) + \" is not a constructor or null\");\n extendStatics3(d5, b4);\n function __() {\n this.constructor = d5;\n }\n d5.prototype = b4 === null ? Object.create(b4) : (__.prototype = b4.prototype, new __());\n };\n }();\n Object.defineProperty(exports3, \"__esModule\", { value: true });\n exports3.langEs = void 0;\n var strings_1 = require_lib9();\n var wordlist_1 = require_wordlist();\n var words = \"A/bacoAbdomenAbejaAbiertoAbogadoAbonoAbortoAbrazoAbrirAbueloAbusoAcabarAcademiaAccesoAccio/nAceiteAcelgaAcentoAceptarA/cidoAclararAcne/AcogerAcosoActivoActoActrizActuarAcudirAcuerdoAcusarAdictoAdmitirAdoptarAdornoAduanaAdultoAe/reoAfectarAficio/nAfinarAfirmarA/gilAgitarAgoni/aAgostoAgotarAgregarAgrioAguaAgudoA/guilaAgujaAhogoAhorroAireAislarAjedrezAjenoAjusteAlacra/nAlambreAlarmaAlbaA/lbumAlcaldeAldeaAlegreAlejarAlertaAletaAlfilerAlgaAlgodo/nAliadoAlientoAlivioAlmaAlmejaAlmi/barAltarAltezaAltivoAltoAlturaAlumnoAlzarAmableAmanteAmapolaAmargoAmasarA/mbarA/mbitoAmenoAmigoAmistadAmorAmparoAmplioAnchoAncianoAnclaAndarAnde/nAnemiaA/nguloAnilloA/nimoAni/sAnotarAntenaAntiguoAntojoAnualAnularAnuncioA~adirA~ejoA~oApagarAparatoApetitoApioAplicarApodoAporteApoyoAprenderAprobarApuestaApuroAradoAra~aArarA/rbitroA/rbolArbustoArchivoArcoArderArdillaArduoA/reaA/ridoAriesArmoni/aArne/sAromaArpaArpo/nArregloArrozArrugaArteArtistaAsaAsadoAsaltoAscensoAsegurarAseoAsesorAsientoAsiloAsistirAsnoAsombroA/speroAstillaAstroAstutoAsumirAsuntoAtajoAtaqueAtarAtentoAteoA/ticoAtletaA/tomoAtraerAtrozAtu/nAudazAudioAugeAulaAumentoAusenteAutorAvalAvanceAvaroAveAvellanaAvenaAvestruzAvio/nAvisoAyerAyudaAyunoAzafra/nAzarAzoteAzu/carAzufreAzulBabaBaborBacheBahi/aBaileBajarBalanzaBalco/nBaldeBambu/BancoBandaBa~oBarbaBarcoBarnizBarroBa/sculaBasto/nBasuraBatallaBateri/aBatirBatutaBau/lBazarBebe/BebidaBelloBesarBesoBestiaBichoBienBingoBlancoBloqueBlusaBoaBobinaBoboBocaBocinaBodaBodegaBoinaBolaBoleroBolsaBombaBondadBonitoBonoBonsa/iBordeBorrarBosqueBoteBoti/nBo/vedaBozalBravoBrazoBrechaBreveBrilloBrincoBrisaBrocaBromaBronceBroteBrujaBruscoBrutoBuceoBucleBuenoBueyBufandaBufo/nBu/hoBuitreBultoBurbujaBurlaBurroBuscarButacaBuzo/nCaballoCabezaCabinaCabraCacaoCada/verCadenaCaerCafe/Cai/daCaima/nCajaCajo/nCalCalamarCalcioCaldoCalidadCalleCalmaCalorCalvoCamaCambioCamelloCaminoCampoCa/ncerCandilCanelaCanguroCanicaCantoCa~aCa~o/nCaobaCaosCapazCapita/nCapoteCaptarCapuchaCaraCarbo/nCa/rcelCaretaCargaCari~oCarneCarpetaCarroCartaCasaCascoCaseroCaspaCastorCatorceCatreCaudalCausaCazoCebollaCederCedroCeldaCe/lebreCelosoCe/lulaCementoCenizaCentroCercaCerdoCerezaCeroCerrarCertezaCe/spedCetroChacalChalecoChampu/ChanclaChapaCharlaChicoChisteChivoChoqueChozaChuletaChuparCiclo/nCiegoCieloCienCiertoCifraCigarroCimaCincoCineCintaCipre/sCircoCiruelaCisneCitaCiudadClamorClanClaroClaseClaveClienteClimaCli/nicaCobreCoccio/nCochinoCocinaCocoCo/digoCodoCofreCogerCoheteCoji/nCojoColaColchaColegioColgarColinaCollarColmoColumnaCombateComerComidaCo/modoCompraCondeConejoCongaConocerConsejoContarCopaCopiaCorazo/nCorbataCorchoCordo/nCoronaCorrerCoserCosmosCostaCra/neoCra/terCrearCrecerCrei/doCremaCri/aCrimenCriptaCrisisCromoCro/nicaCroquetaCrudoCruzCuadroCuartoCuatroCuboCubrirCucharaCuelloCuentoCuerdaCuestaCuevaCuidarCulebraCulpaCultoCumbreCumplirCunaCunetaCuotaCupo/nCu/pulaCurarCuriosoCursoCurvaCutisDamaDanzaDarDardoDa/tilDeberDe/bilDe/cadaDecirDedoDefensaDefinirDejarDelfi/nDelgadoDelitoDemoraDensoDentalDeporteDerechoDerrotaDesayunoDeseoDesfileDesnudoDestinoDesvi/oDetalleDetenerDeudaDi/aDiabloDiademaDiamanteDianaDiarioDibujoDictarDienteDietaDiezDifi/cilDignoDilemaDiluirDineroDirectoDirigirDiscoDise~oDisfrazDivaDivinoDobleDoceDolorDomingoDonDonarDoradoDormirDorsoDosDosisDrago/nDrogaDuchaDudaDueloDue~oDulceDu/oDuqueDurarDurezaDuroE/banoEbrioEcharEcoEcuadorEdadEdicio/nEdificioEditorEducarEfectoEficazEjeEjemploElefanteElegirElementoElevarElipseE/liteElixirElogioEludirEmbudoEmitirEmocio/nEmpateEmpe~oEmpleoEmpresaEnanoEncargoEnchufeEnci/aEnemigoEneroEnfadoEnfermoEnga~oEnigmaEnlaceEnormeEnredoEnsayoEnse~arEnteroEntrarEnvaseEnvi/oE/pocaEquipoErizoEscalaEscenaEscolarEscribirEscudoEsenciaEsferaEsfuerzoEspadaEspejoEspi/aEsposaEspumaEsqui/EstarEsteEstiloEstufaEtapaEternoE/ticaEtniaEvadirEvaluarEventoEvitarExactoExamenExcesoExcusaExentoExigirExilioExistirE/xitoExpertoExplicarExponerExtremoFa/bricaFa/bulaFachadaFa/cilFactorFaenaFajaFaldaFalloFalsoFaltarFamaFamiliaFamosoFarao/nFarmaciaFarolFarsaFaseFatigaFaunaFavorFaxFebreroFechaFelizFeoFeriaFerozFe/rtilFervorFesti/nFiableFianzaFiarFibraFiccio/nFichaFideoFiebreFielFieraFiestaFiguraFijarFijoFilaFileteFilialFiltroFinFincaFingirFinitoFirmaFlacoFlautaFlechaFlorFlotaFluirFlujoFlu/orFobiaFocaFogataFogo/nFolioFolletoFondoFormaForroFortunaForzarFosaFotoFracasoFra/gilFranjaFraseFraudeFrei/rFrenoFresaFri/oFritoFrutaFuegoFuenteFuerzaFugaFumarFuncio/nFundaFurgo/nFuriaFusilFu/tbolFuturoGacelaGafasGaitaGajoGalaGaleri/aGalloGambaGanarGanchoGangaGansoGarajeGarzaGasolinaGastarGatoGavila/nGemeloGemirGenGe/neroGenioGenteGeranioGerenteGermenGestoGiganteGimnasioGirarGiroGlaciarGloboGloriaGolGolfoGolosoGolpeGomaGordoGorilaGorraGotaGoteoGozarGradaGra/ficoGranoGrasaGratisGraveGrietaGrilloGripeGrisGritoGrosorGru/aGruesoGrumoGrupoGuanteGuapoGuardiaGuerraGui/aGui~oGuionGuisoGuitarraGusanoGustarHaberHa/bilHablarHacerHachaHadaHallarHamacaHarinaHazHaza~aHebillaHebraHechoHeladoHelioHembraHerirHermanoHe/roeHervirHieloHierroHi/gadoHigieneHijoHimnoHistoriaHocicoHogarHogueraHojaHombreHongoHonorHonraHoraHormigaHornoHostilHoyoHuecoHuelgaHuertaHuesoHuevoHuidaHuirHumanoHu/medoHumildeHumoHundirHuraca/nHurtoIconoIdealIdiomaI/doloIglesiaIglu/IgualIlegalIlusio/nImagenIma/nImitarImparImperioImponerImpulsoIncapazI/ndiceInerteInfielInformeIngenioInicioInmensoInmuneInnatoInsectoInstanteIntere/sI/ntimoIntuirInu/tilInviernoIraIrisIroni/aIslaIsloteJabali/Jabo/nJamo/nJarabeJardi/nJarraJaulaJazmi/nJefeJeringaJineteJornadaJorobaJovenJoyaJuergaJuevesJuezJugadorJugoJugueteJuicioJuncoJunglaJunioJuntarJu/piterJurarJustoJuvenilJuzgarKiloKoalaLabioLacioLacraLadoLadro/nLagartoLa/grimaLagunaLaicoLamerLa/minaLa/mparaLanaLanchaLangostaLanzaLa/pizLargoLarvaLa/stimaLataLa/texLatirLaurelLavarLazoLealLeccio/nLecheLectorLeerLegio/nLegumbreLejanoLenguaLentoLe~aLeo/nLeopardoLesio/nLetalLetraLeveLeyendaLibertadLibroLicorLi/derLidiarLienzoLigaLigeroLimaLi/miteLimo/nLimpioLinceLindoLi/neaLingoteLinoLinternaLi/quidoLisoListaLiteraLitioLitroLlagaLlamaLlantoLlaveLlegarLlenarLlevarLlorarLloverLluviaLoboLocio/nLocoLocuraLo/gicaLogroLombrizLomoLonjaLoteLuchaLucirLugarLujoLunaLunesLupaLustroLutoLuzMacetaMachoMaderaMadreMaduroMaestroMafiaMagiaMagoMai/zMaldadMaletaMallaMaloMama/MamboMamutMancoMandoManejarMangaManiqui/ManjarManoMansoMantaMa~anaMapaMa/quinaMarMarcoMareaMarfilMargenMaridoMa/rmolMarro/nMartesMarzoMasaMa/scaraMasivoMatarMateriaMatizMatrizMa/ximoMayorMazorcaMechaMedallaMedioMe/dulaMejillaMejorMelenaMelo/nMemoriaMenorMensajeMenteMenu/MercadoMerengueMe/ritoMesMeso/nMetaMeterMe/todoMetroMezclaMiedoMielMiembroMigaMilMilagroMilitarMillo/nMimoMinaMineroMi/nimoMinutoMiopeMirarMisaMiseriaMisilMismoMitadMitoMochilaMocio/nModaModeloMohoMojarMoldeMolerMolinoMomentoMomiaMonarcaMonedaMonjaMontoMo~oMoradaMorderMorenoMorirMorroMorsaMortalMoscaMostrarMotivoMoverMo/vilMozoMuchoMudarMuebleMuelaMuerteMuestraMugreMujerMulaMuletaMultaMundoMu~ecaMuralMuroMu/sculoMuseoMusgoMu/sicaMusloNa/carNacio/nNadarNaipeNaranjaNarizNarrarNasalNatalNativoNaturalNa/useaNavalNaveNavidadNecioNe/ctarNegarNegocioNegroNeo/nNervioNetoNeutroNevarNeveraNichoNidoNieblaNietoNi~ezNi~oNi/tidoNivelNoblezaNocheNo/minaNoriaNormaNorteNotaNoticiaNovatoNovelaNovioNubeNucaNu/cleoNudilloNudoNueraNueveNuezNuloNu/meroNutriaOasisObesoObispoObjetoObraObreroObservarObtenerObvioOcaOcasoOce/anoOchentaOchoOcioOcreOctavoOctubreOcultoOcuparOcurrirOdiarOdioOdiseaOesteOfensaOfertaOficioOfrecerOgroOi/doOi/rOjoOlaOleadaOlfatoOlivoOllaOlmoOlorOlvidoOmbligoOndaOnzaOpacoOpcio/nO/peraOpinarOponerOptarO/pticaOpuestoOracio/nOradorOralO/rbitaOrcaOrdenOrejaO/rganoOrgi/aOrgulloOrienteOrigenOrillaOroOrquestaOrugaOsadi/aOscuroOseznoOsoOstraOto~oOtroOvejaO/vuloO/xidoOxi/genoOyenteOzonoPactoPadrePaellaPa/ginaPagoPai/sPa/jaroPalabraPalcoPaletaPa/lidoPalmaPalomaPalparPanPanalPa/nicoPanteraPa~ueloPapa/PapelPapillaPaquetePararParcelaParedParirParoPa/rpadoParquePa/rrafoPartePasarPaseoPasio/nPasoPastaPataPatioPatriaPausaPautaPavoPayasoPeato/nPecadoPeceraPechoPedalPedirPegarPeinePelarPelda~oPeleaPeligroPellejoPeloPelucaPenaPensarPe~o/nPeo/nPeorPepinoPeque~oPeraPerchaPerderPerezaPerfilPericoPerlaPermisoPerroPersonaPesaPescaPe/simoPesta~aPe/taloPetro/leoPezPezu~aPicarPicho/nPiePiedraPiernaPiezaPijamaPilarPilotoPimientaPinoPintorPinzaPi~aPiojoPipaPirataPisarPiscinaPisoPistaPito/nPizcaPlacaPlanPlataPlayaPlazaPleitoPlenoPlomoPlumaPluralPobrePocoPoderPodioPoemaPoesi/aPoetaPolenPolici/aPolloPolvoPomadaPomeloPomoPompaPonerPorcio/nPortalPosadaPoseerPosiblePostePotenciaPotroPozoPradoPrecozPreguntaPremioPrensaPresoPrevioPrimoPri/ncipePrisio/nPrivarProaProbarProcesoProductoProezaProfesorProgramaProlePromesaProntoPropioPro/ximoPruebaPu/blicoPucheroPudorPuebloPuertaPuestoPulgaPulirPulmo/nPulpoPulsoPumaPuntoPu~alPu~oPupaPupilaPure/QuedarQuejaQuemarQuererQuesoQuietoQui/micaQuinceQuitarRa/banoRabiaRaboRacio/nRadicalRai/zRamaRampaRanchoRangoRapazRa/pidoRaptoRasgoRaspaRatoRayoRazaRazo/nReaccio/nRealidadReba~oReboteRecaerRecetaRechazoRecogerRecreoRectoRecursoRedRedondoReducirReflejoReformaRefra/nRefugioRegaloRegirReglaRegresoRehe/nReinoRei/rRejaRelatoRelevoRelieveRellenoRelojRemarRemedioRemoRencorRendirRentaRepartoRepetirReposoReptilResRescateResinaRespetoRestoResumenRetiroRetornoRetratoReunirReve/sRevistaReyRezarRicoRiegoRiendaRiesgoRifaRi/gidoRigorRinco/nRi~o/nRi/oRiquezaRisaRitmoRitoRizoRobleRoceRociarRodarRodeoRodillaRoerRojizoRojoRomeroRomperRonRoncoRondaRopaRoperoRosaRoscaRostroRotarRubi/RuborRudoRuedaRugirRuidoRuinaRuletaRuloRumboRumorRupturaRutaRutinaSa/badoSaberSabioSableSacarSagazSagradoSalaSaldoSaleroSalirSalmo/nSalo/nSalsaSaltoSaludSalvarSambaSancio/nSandi/aSanearSangreSanidadSanoSantoSapoSaqueSardinaSarte/nSastreSata/nSaunaSaxofo/nSeccio/nSecoSecretoSectaSedSeguirSeisSelloSelvaSemanaSemillaSendaSensorSe~alSe~orSepararSepiaSequi/aSerSerieSermo/nServirSesentaSesio/nSetaSetentaSeveroSexoSextoSidraSiestaSieteSigloSignoSi/labaSilbarSilencioSillaSi/mboloSimioSirenaSistemaSitioSituarSobreSocioSodioSolSolapaSoldadoSoledadSo/lidoSoltarSolucio/nSombraSondeoSonidoSonoroSonrisaSopaSoplarSoporteSordoSorpresaSorteoSoste/nSo/tanoSuaveSubirSucesoSudorSuegraSueloSue~oSuerteSufrirSujetoSulta/nSumarSuperarSuplirSuponerSupremoSurSurcoSure~oSurgirSustoSutilTabacoTabiqueTablaTabu/TacoTactoTajoTalarTalcoTalentoTallaTalo/nTama~oTamborTangoTanqueTapaTapeteTapiaTapo/nTaquillaTardeTareaTarifaTarjetaTarotTarroTartaTatuajeTauroTazaTazo/nTeatroTechoTeclaTe/cnicaTejadoTejerTejidoTelaTele/fonoTemaTemorTemploTenazTenderTenerTenisTensoTeori/aTerapiaTercoTe/rminoTernuraTerrorTesisTesoroTestigoTeteraTextoTezTibioTiburo/nTiempoTiendaTierraTiesoTigreTijeraTildeTimbreTi/midoTimoTintaTi/oTi/picoTipoTiraTiro/nTita/nTi/tereTi/tuloTizaToallaTobilloTocarTocinoTodoTogaToldoTomarTonoTontoToparTopeToqueTo/raxToreroTormentaTorneoToroTorpedoTorreTorsoTortugaTosToscoToserTo/xicoTrabajoTractorTraerTra/ficoTragoTrajeTramoTranceTratoTraumaTrazarTre/bolTreguaTreintaTrenTreparTresTribuTrigoTripaTristeTriunfoTrofeoTrompaTroncoTropaTroteTrozoTrucoTruenoTrufaTuberi/aTuboTuertoTumbaTumorTu/nelTu/nicaTurbinaTurismoTurnoTutorUbicarU/lceraUmbralUnidadUnirUniversoUnoUntarU~aUrbanoUrbeUrgenteUrnaUsarUsuarioU/tilUtopi/aUvaVacaVaci/oVacunaVagarVagoVainaVajillaValeVa/lidoValleValorVa/lvulaVampiroVaraVariarVaro/nVasoVecinoVectorVehi/culoVeinteVejezVelaVeleroVelozVenaVencerVendaVenenoVengarVenirVentaVenusVerVeranoVerboVerdeVeredaVerjaVersoVerterVi/aViajeVibrarVicioVi/ctimaVidaVi/deoVidrioViejoViernesVigorVilVillaVinagreVinoVi~edoVioli/nViralVirgoVirtudVisorVi/speraVistaVitaminaViudoVivazViveroVivirVivoVolca/nVolumenVolverVorazVotarVotoVozVueloVulgarYacerYateYeguaYemaYernoYesoYodoYogaYogurZafiroZanjaZapatoZarzaZonaZorroZumoZurdo\";\n var lookup = {};\n var wordlist = null;\n function dropDiacritic(word) {\n wordlist_1.logger.checkNormalize();\n return (0, strings_1.toUtf8String)(Array.prototype.filter.call((0, strings_1.toUtf8Bytes)(word.normalize(\"NFD\").toLowerCase()), function(c4) {\n return c4 >= 65 && c4 <= 90 || c4 >= 97 && c4 <= 123;\n }));\n }\n function expand(word) {\n var output = [];\n Array.prototype.forEach.call((0, strings_1.toUtf8Bytes)(word), function(c4) {\n if (c4 === 47) {\n output.push(204);\n output.push(129);\n } else if (c4 === 126) {\n output.push(110);\n output.push(204);\n output.push(131);\n } else {\n output.push(c4);\n }\n });\n return (0, strings_1.toUtf8String)(output);\n }\n function loadWords(lang) {\n if (wordlist != null) {\n return;\n }\n wordlist = words.replace(/([A-Z])/g, \" $1\").toLowerCase().substring(1).split(\" \").map(function(w3) {\n return expand(w3);\n });\n wordlist.forEach(function(word, index2) {\n lookup[dropDiacritic(word)] = index2;\n });\n if (wordlist_1.Wordlist.check(lang) !== \"0xf74fb7092aeacdfbf8959557de22098da512207fb9f109cb526994938cf40300\") {\n wordlist = null;\n throw new Error(\"BIP39 Wordlist for es (Spanish) FAILED\");\n }\n }\n var LangEs = (\n /** @class */\n function(_super) {\n __extends3(LangEs2, _super);\n function LangEs2() {\n return _super.call(this, \"es\") || this;\n }\n LangEs2.prototype.getWord = function(index2) {\n loadWords(this);\n return wordlist[index2];\n };\n LangEs2.prototype.getWordIndex = function(word) {\n loadWords(this);\n return lookup[dropDiacritic(word)];\n };\n return LangEs2;\n }(wordlist_1.Wordlist)\n );\n var langEs = new LangEs();\n exports3.langEs = langEs;\n wordlist_1.Wordlist.register(langEs);\n }\n });\n\n // ../../../node_modules/.pnpm/@ethersproject+wordlists@5.8.0/node_modules/@ethersproject/wordlists/lib/lang-fr.js\n var require_lang_fr = __commonJS({\n \"../../../node_modules/.pnpm/@ethersproject+wordlists@5.8.0/node_modules/@ethersproject/wordlists/lib/lang-fr.js\"(exports3) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n var __extends3 = exports3 && exports3.__extends || /* @__PURE__ */ function() {\n var extendStatics3 = function(d5, b4) {\n extendStatics3 = Object.setPrototypeOf || { __proto__: [] } instanceof Array && function(d6, b5) {\n d6.__proto__ = b5;\n } || function(d6, b5) {\n for (var p4 in b5)\n if (Object.prototype.hasOwnProperty.call(b5, p4))\n d6[p4] = b5[p4];\n };\n return extendStatics3(d5, b4);\n };\n return function(d5, b4) {\n if (typeof b4 !== \"function\" && b4 !== null)\n throw new TypeError(\"Class extends value \" + String(b4) + \" is not a constructor or null\");\n extendStatics3(d5, b4);\n function __() {\n this.constructor = d5;\n }\n d5.prototype = b4 === null ? Object.create(b4) : (__.prototype = b4.prototype, new __());\n };\n }();\n Object.defineProperty(exports3, \"__esModule\", { value: true });\n exports3.langFr = void 0;\n var strings_1 = require_lib9();\n var wordlist_1 = require_wordlist();\n var words = \"AbaisserAbandonAbdiquerAbeilleAbolirAborderAboutirAboyerAbrasifAbreuverAbriterAbrogerAbruptAbsenceAbsoluAbsurdeAbusifAbyssalAcade/mieAcajouAcarienAccablerAccepterAcclamerAccoladeAccrocheAccuserAcerbeAchatAcheterAcidulerAcierAcompteAcque/rirAcronymeActeurActifActuelAdepteAde/quatAdhe/sifAdjectifAdjugerAdmettreAdmirerAdopterAdorerAdoucirAdresseAdroitAdulteAdverbeAe/rerAe/ronefAffaireAffecterAfficheAffreuxAffublerAgacerAgencerAgileAgiterAgraferAgre/ableAgrumeAiderAiguilleAilierAimableAisanceAjouterAjusterAlarmerAlchimieAlerteAlge-breAlgueAlie/nerAlimentAlle/gerAlliageAllouerAllumerAlourdirAlpagaAltesseAlve/oleAmateurAmbiguAmbreAme/nagerAmertumeAmidonAmiralAmorcerAmourAmovibleAmphibieAmpleurAmusantAnalyseAnaphoreAnarchieAnatomieAncienAne/antirAngleAngoisseAnguleuxAnimalAnnexerAnnonceAnnuelAnodinAnomalieAnonymeAnormalAntenneAntidoteAnxieuxApaiserApe/ritifAplanirApologieAppareilAppelerApporterAppuyerAquariumAqueducArbitreArbusteArdeurArdoiseArgentArlequinArmatureArmementArmoireArmureArpenterArracherArriverArroserArsenicArte/rielArticleAspectAsphalteAspirerAssautAsservirAssietteAssocierAssurerAsticotAstreAstuceAtelierAtomeAtriumAtroceAttaqueAttentifAttirerAttraperAubaineAubergeAudaceAudibleAugurerAuroreAutomneAutrucheAvalerAvancerAvariceAvenirAverseAveugleAviateurAvideAvionAviserAvoineAvouerAvrilAxialAxiomeBadgeBafouerBagageBaguetteBaignadeBalancerBalconBaleineBalisageBambinBancaireBandageBanlieueBannie-reBanquierBarbierBarilBaronBarqueBarrageBassinBastionBatailleBateauBatterieBaudrierBavarderBeletteBe/lierBeloteBe/ne/ficeBerceauBergerBerlineBermudaBesaceBesogneBe/tailBeurreBiberonBicycleBiduleBijouBilanBilingueBillardBinaireBiologieBiopsieBiotypeBiscuitBisonBistouriBitumeBizarreBlafardBlagueBlanchirBlessantBlinderBlondBloquerBlousonBobardBobineBoireBoiserBolideBonbonBondirBonheurBonifierBonusBordureBorneBotteBoucleBoueuxBougieBoulonBouquinBourseBoussoleBoutiqueBoxeurBrancheBrasierBraveBrebisBre-cheBreuvageBricolerBrigadeBrillantBriocheBriqueBrochureBroderBronzerBrousseBroyeurBrumeBrusqueBrutalBruyantBuffleBuissonBulletinBureauBurinBustierButinerButoirBuvableBuvetteCabanonCabineCachetteCadeauCadreCafe/ineCaillouCaissonCalculerCalepinCalibreCalmerCalomnieCalvaireCamaradeCame/raCamionCampagneCanalCanetonCanonCantineCanularCapableCaporalCapriceCapsuleCapterCapucheCarabineCarboneCaresserCaribouCarnageCarotteCarreauCartonCascadeCasierCasqueCassureCauserCautionCavalierCaverneCaviarCe/dilleCeintureCe/lesteCelluleCendrierCensurerCentralCercleCe/re/bralCeriseCernerCerveauCesserChagrinChaiseChaleurChambreChanceChapitreCharbonChasseurChatonChaussonChavirerChemiseChenilleChe/quierChercherChevalChienChiffreChignonChime-reChiotChlorureChocolatChoisirChoseChouetteChromeChuteCigareCigogneCimenterCine/maCintrerCirculerCirerCirqueCiterneCitoyenCitronCivilClaironClameurClaquerClasseClavierClientClignerClimatClivageClocheClonageCloporteCobaltCobraCocasseCocotierCoderCodifierCoffreCognerCohe/sionCoifferCoincerCole-reColibriCollineColmaterColonelCombatCome/dieCommandeCompactConcertConduireConfierCongelerConnoterConsonneContactConvexeCopainCopieCorailCorbeauCordageCornicheCorpusCorrectCorte-geCosmiqueCostumeCotonCoudeCoupureCourageCouteauCouvrirCoyoteCrabeCrainteCravateCrayonCre/atureCre/diterCre/meuxCreuserCrevetteCriblerCrierCristalCrite-reCroireCroquerCrotaleCrucialCruelCrypterCubiqueCueillirCuille-reCuisineCuivreCulminerCultiverCumulerCupideCuratifCurseurCyanureCycleCylindreCyniqueDaignerDamierDangerDanseurDauphinDe/battreDe/biterDe/borderDe/briderDe/butantDe/calerDe/cembreDe/chirerDe/ciderDe/clarerDe/corerDe/crireDe/cuplerDe/daleDe/ductifDe/esseDe/fensifDe/filerDe/frayerDe/gagerDe/givrerDe/glutirDe/graferDe/jeunerDe/liceDe/logerDemanderDemeurerDe/molirDe/nicherDe/nouerDentelleDe/nuderDe/partDe/penserDe/phaserDe/placerDe/poserDe/rangerDe/roberDe/sastreDescenteDe/sertDe/signerDe/sobe/irDessinerDestrierDe/tacherDe/testerDe/tourerDe/tresseDevancerDevenirDevinerDevoirDiableDialogueDiamantDicterDiffe/rerDige/rerDigitalDigneDiluerDimancheDiminuerDioxydeDirectifDirigerDiscuterDisposerDissiperDistanceDivertirDiviserDocileDocteurDogmeDoigtDomaineDomicileDompterDonateurDonjonDonnerDopamineDortoirDorureDosageDoseurDossierDotationDouanierDoubleDouceurDouterDoyenDragonDraperDresserDribblerDroitureDuperieDuplexeDurableDurcirDynastieE/blouirE/carterE/charpeE/chelleE/clairerE/clipseE/cloreE/cluseE/coleE/conomieE/corceE/couterE/craserE/cre/merE/crivainE/crouE/cumeE/cureuilE/difierE/duquerEffacerEffectifEffigieEffortEffrayerEffusionE/galiserE/garerE/jecterE/laborerE/largirE/lectronE/le/gantE/le/phantE/le-veE/ligibleE/litismeE/logeE/luciderE/luderEmballerEmbellirEmbryonE/meraudeE/missionEmmenerE/motionE/mouvoirEmpereurEmployerEmporterEmpriseE/mulsionEncadrerEnche-reEnclaveEncocheEndiguerEndosserEndroitEnduireE/nergieEnfanceEnfermerEnfouirEngagerEnginEngloberE/nigmeEnjamberEnjeuEnleverEnnemiEnnuyeuxEnrichirEnrobageEnseigneEntasserEntendreEntierEntourerEntraverE/nume/rerEnvahirEnviableEnvoyerEnzymeE/olienE/paissirE/pargneE/patantE/pauleE/picerieE/pide/mieE/pierE/pilogueE/pineE/pisodeE/pitapheE/poqueE/preuveE/prouverE/puisantE/querreE/quipeE/rigerE/rosionErreurE/ruptionEscalierEspadonEspe-ceEspie-gleEspoirEspritEsquiverEssayerEssenceEssieuEssorerEstimeEstomacEstradeE/tage-reE/talerE/tancheE/tatiqueE/teindreE/tendoirE/ternelE/thanolE/thiqueEthnieE/tirerE/tofferE/toileE/tonnantE/tourdirE/trangeE/troitE/tudeEuphorieE/valuerE/vasionE/ventailE/videnceE/viterE/volutifE/voquerExactExage/rerExaucerExcellerExcitantExclusifExcuseExe/cuterExempleExercerExhalerExhorterExigenceExilerExisterExotiqueExpe/dierExplorerExposerExprimerExquisExtensifExtraireExulterFableFabuleuxFacetteFacileFactureFaiblirFalaiseFameuxFamilleFarceurFarfeluFarineFaroucheFascinerFatalFatigueFauconFautifFaveurFavoriFe/brileFe/conderFe/de/rerFe/linFemmeFe/murFendoirFe/odalFermerFe/roceFerveurFestivalFeuilleFeutreFe/vrierFiascoFicelerFictifFide-leFigureFilatureFiletageFilie-reFilleulFilmerFilouFiltrerFinancerFinirFioleFirmeFissureFixerFlairerFlammeFlasqueFlatteurFle/auFle-cheFleurFlexionFloconFloreFluctuerFluideFluvialFolieFonderieFongibleFontaineForcerForgeronFormulerFortuneFossileFoudreFouge-reFouillerFoulureFourmiFragileFraiseFranchirFrapperFrayeurFre/gateFreinerFrelonFre/mirFre/ne/sieFre-reFriableFrictionFrissonFrivoleFroidFromageFrontalFrotterFruitFugitifFuiteFureurFurieuxFurtifFusionFuturGagnerGalaxieGalerieGambaderGarantirGardienGarnirGarrigueGazelleGazonGe/antGe/latineGe/luleGendarmeGe/ne/ralGe/nieGenouGentilGe/ologieGe/ome-treGe/raniumGermeGestuelGeyserGibierGiclerGirafeGivreGlaceGlaiveGlisserGlobeGloireGlorieuxGolfeurGommeGonflerGorgeGorilleGoudronGouffreGoulotGoupilleGourmandGoutteGraduelGraffitiGraineGrandGrappinGratuitGravirGrenatGriffureGrillerGrimperGrognerGronderGrotteGroupeGrugerGrutierGruye-reGue/pardGuerrierGuideGuimauveGuitareGustatifGymnasteGyrostatHabitudeHachoirHalteHameauHangarHannetonHaricotHarmonieHarponHasardHe/liumHe/matomeHerbeHe/rissonHermineHe/ronHe/siterHeureuxHibernerHibouHilarantHistoireHiverHomardHommageHomoge-neHonneurHonorerHonteuxHordeHorizonHorlogeHormoneHorribleHouleuxHousseHublotHuileuxHumainHumbleHumideHumourHurlerHydromelHygie-neHymneHypnoseIdylleIgnorerIguaneIlliciteIllusionImageImbiberImiterImmenseImmobileImmuableImpactImpe/rialImplorerImposerImprimerImputerIncarnerIncendieIncidentInclinerIncoloreIndexerIndiceInductifIne/ditIneptieInexactInfiniInfligerInformerInfusionInge/rerInhalerInhiberInjecterInjureInnocentInoculerInonderInscrireInsecteInsigneInsoliteInspirerInstinctInsulterIntactIntenseIntimeIntrigueIntuitifInutileInvasionInventerInviterInvoquerIroniqueIrradierIrre/elIrriterIsolerIvoireIvresseJaguarJaillirJambeJanvierJardinJaugerJauneJavelotJetableJetonJeudiJeunesseJoindreJoncherJonglerJoueurJouissifJournalJovialJoyauJoyeuxJubilerJugementJuniorJuponJuristeJusticeJuteuxJuve/nileKayakKimonoKiosqueLabelLabialLabourerLace/rerLactoseLaguneLaineLaisserLaitierLambeauLamelleLampeLanceurLangageLanterneLapinLargeurLarmeLaurierLavaboLavoirLectureLe/galLe/gerLe/gumeLessiveLettreLevierLexiqueLe/zardLiasseLibe/rerLibreLicenceLicorneLie-geLie-vreLigatureLigoterLigueLimerLimiteLimonadeLimpideLine/aireLingotLionceauLiquideLisie-reListerLithiumLitigeLittoralLivreurLogiqueLointainLoisirLombricLoterieLouerLourdLoutreLouveLoyalLubieLucideLucratifLueurLugubreLuisantLumie-reLunaireLundiLuronLutterLuxueuxMachineMagasinMagentaMagiqueMaigreMaillonMaintienMairieMaisonMajorerMalaxerMale/ficeMalheurMaliceMalletteMammouthMandaterManiableManquantManteauManuelMarathonMarbreMarchandMardiMaritimeMarqueurMarronMartelerMascotteMassifMate/rielMatie-reMatraqueMaudireMaussadeMauveMaximalMe/chantMe/connuMe/dailleMe/decinMe/diterMe/duseMeilleurMe/langeMe/lodieMembreMe/moireMenacerMenerMenhirMensongeMentorMercrediMe/riteMerleMessagerMesureMe/talMe/te/oreMe/thodeMe/tierMeubleMiaulerMicrobeMietteMignonMigrerMilieuMillionMimiqueMinceMine/ralMinimalMinorerMinuteMiracleMiroiterMissileMixteMobileModerneMoelleuxMondialMoniteurMonnaieMonotoneMonstreMontagneMonumentMoqueurMorceauMorsureMortierMoteurMotifMoucheMoufleMoulinMoussonMoutonMouvantMultipleMunitionMurailleMure-neMurmureMuscleMuse/umMusicienMutationMuterMutuelMyriadeMyrtilleMyste-reMythiqueNageurNappeNarquoisNarrerNatationNationNatureNaufrageNautiqueNavireNe/buleuxNectarNe/fasteNe/gationNe/gligerNe/gocierNeigeNerveuxNettoyerNeuroneNeutronNeveuNicheNickelNitrateNiveauNobleNocifNocturneNoirceurNoisetteNomadeNombreuxNommerNormatifNotableNotifierNotoireNourrirNouveauNovateurNovembreNoviceNuageNuancerNuireNuisibleNume/roNuptialNuqueNutritifObe/irObjectifObligerObscurObserverObstacleObtenirObturerOccasionOccuperOce/anOctobreOctroyerOctuplerOculaireOdeurOdorantOffenserOfficierOffrirOgiveOiseauOisillonOlfactifOlivierOmbrageOmettreOnctueuxOndulerOne/reuxOniriqueOpaleOpaqueOpe/rerOpinionOpportunOpprimerOpterOptiqueOrageuxOrangeOrbiteOrdonnerOreilleOrganeOrgueilOrificeOrnementOrqueOrtieOscillerOsmoseOssatureOtarieOuraganOursonOutilOutragerOuvrageOvationOxydeOxyge-neOzonePaisiblePalacePalmare-sPalourdePalperPanachePandaPangolinPaniquerPanneauPanoramaPantalonPapayePapierPapoterPapyrusParadoxeParcelleParesseParfumerParlerParoleParrainParsemerPartagerParureParvenirPassionPaste-quePaternelPatiencePatronPavillonPavoiserPayerPaysagePeignePeintrePelagePe/licanPellePelousePeluchePendulePe/ne/trerPe/niblePensifPe/nuriePe/pitePe/plumPerdrixPerforerPe/riodePermuterPerplexePersilPertePeserPe/talePetitPe/trirPeuplePharaonPhobiePhoquePhotonPhrasePhysiquePianoPicturalPie-cePierrePieuvrePilotePinceauPipettePiquerPiroguePiscinePistonPivoterPixelPizzaPlacardPlafondPlaisirPlanerPlaquePlastronPlateauPleurerPlexusPliagePlombPlongerPluiePlumagePochettePoe/siePoe-tePointePoirierPoissonPoivrePolairePolicierPollenPolygonePommadePompierPonctuelPonde/rerPoneyPortiquePositionPosse/derPosturePotagerPoteauPotionPoucePoulainPoumonPourprePoussinPouvoirPrairiePratiquePre/cieuxPre/direPre/fixePre/ludePre/nomPre/sencePre/textePre/voirPrimitifPrincePrisonPriverProble-meProce/derProdigeProfondProgre-sProieProjeterProloguePromenerPropreProspe-reProte/gerProuesseProverbePrudencePruneauPsychosePublicPuceronPuiserPulpePulsarPunaisePunitifPupitrePurifierPuzzlePyramideQuasarQuerelleQuestionQuie/tudeQuitterQuotientRacineRaconterRadieuxRagondinRaideurRaisinRalentirRallongeRamasserRapideRasageRatisserRavagerRavinRayonnerRe/actifRe/agirRe/aliserRe/animerRecevoirRe/citerRe/clamerRe/colterRecruterReculerRecyclerRe/digerRedouterRefaireRe/flexeRe/formerRefrainRefugeRe/galienRe/gionRe/glageRe/gulierRe/ite/rerRejeterRejouerRelatifReleverReliefRemarqueReme-deRemiseRemonterRemplirRemuerRenardRenfortReniflerRenoncerRentrerRenvoiReplierReporterRepriseReptileRequinRe/serveRe/sineuxRe/soudreRespectResterRe/sultatRe/tablirRetenirRe/ticuleRetomberRetracerRe/unionRe/ussirRevancheRevivreRe/volteRe/vulsifRichesseRideauRieurRigideRigolerRincerRiposterRisibleRisqueRituelRivalRivie-reRocheuxRomanceRompreRonceRondinRoseauRosierRotatifRotorRotuleRougeRouilleRouleauRoutineRoyaumeRubanRubisRucheRuelleRugueuxRuinerRuisseauRuserRustiqueRythmeSablerSaboterSabreSacocheSafariSagesseSaisirSaladeSaliveSalonSaluerSamediSanctionSanglierSarcasmeSardineSaturerSaugrenuSaumonSauterSauvageSavantSavonnerScalpelScandaleSce/le/ratSce/narioSceptreSche/maScienceScinderScoreScrutinSculpterSe/anceSe/cableSe/cherSecouerSe/cre/terSe/datifSe/duireSeigneurSe/jourSe/lectifSemaineSemblerSemenceSe/minalSe/nateurSensibleSentenceSe/parerSe/quenceSereinSergentSe/rieuxSerrureSe/rumServiceSe/sameSe/virSevrageSextupleSide/ralSie-cleSie/gerSifflerSigleSignalSilenceSiliciumSimpleSince-reSinistreSiphonSiropSismiqueSituerSkierSocialSocleSodiumSoigneuxSoldatSoleilSolitudeSolubleSombreSommeilSomnolerSondeSongeurSonnetteSonoreSorcierSortirSosieSottiseSoucieuxSoudureSouffleSouleverSoupapeSourceSoutirerSouvenirSpacieuxSpatialSpe/cialSphe-reSpiralStableStationSternumStimulusStipulerStrictStudieuxStupeurStylisteSublimeSubstratSubtilSubvenirSucce-sSucreSuffixeSugge/rerSuiveurSulfateSuperbeSupplierSurfaceSuricateSurmenerSurpriseSursautSurvieSuspectSyllabeSymboleSyme/trieSynapseSyntaxeSyste-meTabacTablierTactileTaillerTalentTalismanTalonnerTambourTamiserTangibleTapisTaquinerTarderTarifTartineTasseTatamiTatouageTaupeTaureauTaxerTe/moinTemporelTenailleTendreTeneurTenirTensionTerminerTerneTerribleTe/tineTexteThe-meThe/orieThe/rapieThoraxTibiaTie-deTimideTirelireTiroirTissuTitaneTitreTituberTobogganTole/rantTomateToniqueTonneauToponymeTorcheTordreTornadeTorpilleTorrentTorseTortueTotemToucherTournageTousserToxineTractionTraficTragiqueTrahirTrainTrancherTravailTre-fleTremperTre/sorTreuilTriageTribunalTricoterTrilogieTriompheTriplerTriturerTrivialTromboneTroncTropicalTroupeauTuileTulipeTumulteTunnelTurbineTuteurTutoyerTuyauTympanTyphonTypiqueTyranUbuesqueUltimeUltrasonUnanimeUnifierUnionUniqueUnitaireUniversUraniumUrbainUrticantUsageUsineUsuelUsureUtileUtopieVacarmeVaccinVagabondVagueVaillantVaincreVaisseauValableValiseVallonValveVampireVanilleVapeurVarierVaseuxVassalVasteVecteurVedetteVe/ge/talVe/hiculeVeinardVe/loceVendrediVe/ne/rerVengerVenimeuxVentouseVerdureVe/rinVernirVerrouVerserVertuVestonVe/te/ranVe/tusteVexantVexerViaducViandeVictoireVidangeVide/oVignetteVigueurVilainVillageVinaigreViolonVipe-reVirementVirtuoseVirusVisageViseurVisionVisqueuxVisuelVitalVitesseViticoleVitrineVivaceVivipareVocationVoguerVoileVoisinVoitureVolailleVolcanVoltigerVolumeVoraceVortexVoterVouloirVoyageVoyelleWagonXe/nonYachtZe-breZe/nithZesteZoologie\";\n var wordlist = null;\n var lookup = {};\n function dropDiacritic(word) {\n wordlist_1.logger.checkNormalize();\n return (0, strings_1.toUtf8String)(Array.prototype.filter.call((0, strings_1.toUtf8Bytes)(word.normalize(\"NFD\").toLowerCase()), function(c4) {\n return c4 >= 65 && c4 <= 90 || c4 >= 97 && c4 <= 123;\n }));\n }\n function expand(word) {\n var output = [];\n Array.prototype.forEach.call((0, strings_1.toUtf8Bytes)(word), function(c4) {\n if (c4 === 47) {\n output.push(204);\n output.push(129);\n } else if (c4 === 45) {\n output.push(204);\n output.push(128);\n } else {\n output.push(c4);\n }\n });\n return (0, strings_1.toUtf8String)(output);\n }\n function loadWords(lang) {\n if (wordlist != null) {\n return;\n }\n wordlist = words.replace(/([A-Z])/g, \" $1\").toLowerCase().substring(1).split(\" \").map(function(w3) {\n return expand(w3);\n });\n wordlist.forEach(function(word, index2) {\n lookup[dropDiacritic(word)] = index2;\n });\n if (wordlist_1.Wordlist.check(lang) !== \"0x51deb7ae009149dc61a6bd18a918eb7ac78d2775726c68e598b92d002519b045\") {\n wordlist = null;\n throw new Error(\"BIP39 Wordlist for fr (French) FAILED\");\n }\n }\n var LangFr = (\n /** @class */\n function(_super) {\n __extends3(LangFr2, _super);\n function LangFr2() {\n return _super.call(this, \"fr\") || this;\n }\n LangFr2.prototype.getWord = function(index2) {\n loadWords(this);\n return wordlist[index2];\n };\n LangFr2.prototype.getWordIndex = function(word) {\n loadWords(this);\n return lookup[dropDiacritic(word)];\n };\n return LangFr2;\n }(wordlist_1.Wordlist)\n );\n var langFr = new LangFr();\n exports3.langFr = langFr;\n wordlist_1.Wordlist.register(langFr);\n }\n });\n\n // ../../../node_modules/.pnpm/@ethersproject+wordlists@5.8.0/node_modules/@ethersproject/wordlists/lib/lang-ja.js\n var require_lang_ja = __commonJS({\n \"../../../node_modules/.pnpm/@ethersproject+wordlists@5.8.0/node_modules/@ethersproject/wordlists/lib/lang-ja.js\"(exports3) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n var __extends3 = exports3 && exports3.__extends || /* @__PURE__ */ function() {\n var extendStatics3 = function(d5, b4) {\n extendStatics3 = Object.setPrototypeOf || { __proto__: [] } instanceof Array && function(d6, b5) {\n d6.__proto__ = b5;\n } || function(d6, b5) {\n for (var p4 in b5)\n if (Object.prototype.hasOwnProperty.call(b5, p4))\n d6[p4] = b5[p4];\n };\n return extendStatics3(d5, b4);\n };\n return function(d5, b4) {\n if (typeof b4 !== \"function\" && b4 !== null)\n throw new TypeError(\"Class extends value \" + String(b4) + \" is not a constructor or null\");\n extendStatics3(d5, b4);\n function __() {\n this.constructor = d5;\n }\n d5.prototype = b4 === null ? Object.create(b4) : (__.prototype = b4.prototype, new __());\n };\n }();\n Object.defineProperty(exports3, \"__esModule\", { value: true });\n exports3.langJa = void 0;\n var bytes_1 = require_lib2();\n var strings_1 = require_lib9();\n var wordlist_1 = require_wordlist();\n var data = [\n // 4-kana words\n \"AQRASRAGBAGUAIRAHBAghAURAdBAdcAnoAMEAFBAFCBKFBQRBSFBCXBCDBCHBGFBEQBpBBpQBIkBHNBeOBgFBVCBhBBhNBmOBmRBiHBiFBUFBZDBvFBsXBkFBlcBjYBwDBMBBTBBTRBWBBWXXaQXaRXQWXSRXCFXYBXpHXOQXHRXhRXuRXmXXbRXlXXwDXTRXrCXWQXWGaBWaKcaYgasFadQalmaMBacAKaRKKBKKXKKjKQRKDRKCYKCRKIDKeVKHcKlXKjHKrYNAHNBWNaRNKcNIBNIONmXNsXNdXNnBNMBNRBNrXNWDNWMNFOQABQAHQBrQXBQXFQaRQKXQKDQKOQKFQNBQNDQQgQCXQCDQGBQGDQGdQYXQpBQpQQpHQLXQHuQgBQhBQhCQuFQmXQiDQUFQZDQsFQdRQkHQbRQlOQlmQPDQjDQwXQMBQMDQcFQTBQTHQrDDXQDNFDGBDGQDGRDpFDhFDmXDZXDbRDMYDRdDTRDrXSAhSBCSBrSGQSEQSHBSVRShYShkSyQSuFSiBSdcSoESocSlmSMBSFBSFKSFNSFdSFcCByCaRCKcCSBCSRCCrCGbCEHCYXCpBCpQCIBCIHCeNCgBCgFCVECVcCmkCmwCZXCZFCdRClOClmClFCjDCjdCnXCwBCwXCcRCFQCFjGXhGNhGDEGDMGCDGCHGIFGgBGVXGVEGVRGmXGsXGdYGoSGbRGnXGwXGwDGWRGFNGFLGFOGFdGFkEABEBDEBFEXOEaBEKSENBENDEYXEIgEIkEgBEgQEgHEhFEudEuFEiBEiHEiFEZDEvBEsXEsFEdXEdREkFEbBEbRElFEPCEfkEFNYAEYAhYBNYQdYDXYSRYCEYYoYgQYgRYuRYmCYZTYdBYbEYlXYjQYRbYWRpKXpQopQnpSFpCXpIBpISphNpdBpdRpbRpcZpFBpFNpFDpFopFrLADLBuLXQLXcLaFLCXLEhLpBLpFLHXLeVLhILdHLdRLoDLbRLrXIABIBQIBCIBsIBoIBMIBRIXaIaRIKYIKRINBINuICDIGBIIDIIkIgRIxFIyQIiHIdRIbYIbRIlHIwRIMYIcRIRVITRIFBIFNIFQOABOAFOBQOaFONBONMOQFOSFOCDOGBOEQOpBOLXOIBOIFOgQOgFOyQOycOmXOsXOdIOkHOMEOMkOWWHBNHXNHXWHNXHDuHDRHSuHSRHHoHhkHmRHdRHkQHlcHlRHwBHWcgAEgAggAkgBNgBQgBEgXOgYcgLXgHjgyQgiBgsFgdagMYgWSgFQgFEVBTVXEVKBVKNVKDVKYVKRVNBVNYVDBVDxVSBVSRVCjVGNVLXVIFVhBVhcVsXVdRVbRVlRhBYhKYhDYhGShxWhmNhdahdkhbRhjohMXhTRxAXxXSxKBxNBxEQxeNxeQxhXxsFxdbxlHxjcxFBxFNxFQxFOxFoyNYyYoybcyMYuBQuBRuBruDMuCouHBudQukkuoBulVuMXuFEmCYmCRmpRmeDmiMmjdmTFmFQiADiBOiaRiKRiNBiNRiSFiGkiGFiERipRiLFiIFihYibHijBijEiMXiWBiFBiFCUBQUXFUaRUNDUNcUNRUNFUDBUSHUCDUGBUGFUEqULNULoUIRUeEUeYUgBUhFUuRUiFUsXUdFUkHUbBUjSUjYUwXUMDUcHURdUTBUrBUrXUrQZAFZXZZaRZKFZNBZQFZCXZGBZYdZpBZLDZIFZHXZHNZeQZVRZVFZmXZiBZvFZdFZkFZbHZbFZwXZcCZcRZRBvBQvBGvBLvBWvCovMYsAFsBDsaRsKFsNFsDrsSHsSFsCXsCRsEBsEHsEfspBsLBsLDsIgsIRseGsbRsFBsFQsFSdNBdSRdCVdGHdYDdHcdVbdySduDdsXdlRdwXdWYdWcdWRkBMkXOkaRkNIkNFkSFkCFkYBkpRkeNkgBkhVkmXksFklVkMBkWDkFNoBNoaQoaFoNBoNXoNaoNEoSRoEroYXoYCoYbopRopFomXojkowXorFbBEbEIbdBbjYlaRlDElMXlFDjKjjSRjGBjYBjYkjpRjLXjIBjOFjeVjbRjwBnXQnSHnpFnLXnINnMBnTRwXBwXNwXYwNFwQFwSBwGFwLXwLDweNwgBwuHwjDwnXMBXMpFMIBMeNMTHcaQcNBcDHcSFcCXcpBcLXcLDcgFcuFcnXcwXccDcTQcrFTQErXNrCHrpFrgFrbFrTHrFcWNYWNbWEHWMXWTR\",\n // 5-kana words\n \"ABGHABIJAEAVAYJQALZJAIaRAHNXAHdcAHbRAZJMAZJRAZTRAdVJAklmAbcNAjdRAMnRAMWYAWpRAWgRAFgBAFhBAFdcBNJBBNJDBQKBBQhcBQlmBDEJBYJkBYJTBpNBBpJFBIJBBIJDBIcABOKXBOEJBOVJBOiJBOZJBepBBeLXBeIFBegBBgGJBVJXBuocBiJRBUJQBlXVBlITBwNFBMYVBcqXBTlmBWNFBWiJBWnRBFGHBFwXXKGJXNJBXNZJXDTTXSHSXSVRXSlHXCJDXGQJXEhXXYQJXYbRXOfXXeNcXVJFXhQJXhEJXdTRXjdXXMhBXcQTXRGBXTEBXTnQXFCXXFOFXFgFaBaFaBNJaBCJaBpBaBwXaNJKaNJDaQIBaDpRaEPDaHMFamDJalEJaMZJaFaFaFNBaFQJaFLDaFVHKBCYKBEBKBHDKXaFKXGdKXEJKXpHKXIBKXZDKXwXKKwLKNacKNYJKNJoKNWcKDGdKDTRKChXKGaRKGhBKGbRKEBTKEaRKEPTKLMDKLWRKOHDKVJcKdBcKlIBKlOPKFSBKFEPKFpFNBNJNJBQNBGHNBEPNBHXNBgFNBVXNBZDNBsXNBwXNNaRNNJDNNJENNJkNDCJNDVDNGJRNJiDNZJNNsCJNJFNNFSBNFCXNFEPNFLXNFIFQJBFQCaRQJEQQLJDQLJFQIaRQOqXQHaFQHHQQVJXQVJDQhNJQmEIQZJFQsJXQJrFQWbRDJABDBYJDXNFDXCXDXLXDXZDDXsJDQqXDSJFDJCXDEPkDEqXDYmQDpSJDOCkDOGQDHEIDVJDDuDuDWEBDJFgSBNDSBSFSBGHSBIBSBTQSKVYSJQNSJQiSJCXSEqXSJYVSIiJSOMYSHAHSHaQSeCFSepQSegBSHdHSHrFShSJSJuHSJUFSkNRSrSrSWEBSFaHSJFQSFCXSFGDSFYXSFODSFgBSFVXSFhBSFxFSFkFSFbBSFMFCADdCJXBCXaFCXKFCXNFCXCXCXGBCXEJCXYBCXLDCXIBCXOPCXHXCXgBCXhBCXiBCXlDCXcHCJNBCJNFCDCJCDGBCDVXCDhBCDiDCDJdCCmNCpJFCIaRCOqXCHCHCHZJCViJCuCuCmddCJiFCdNBCdHhClEJCnUJCreSCWlgCWTRCFBFCFNBCFYBCFVFCFhFCFdSCFTBCFWDGBNBGBQFGJBCGBEqGBpBGBgQGNBEGNJYGNkOGNJRGDUFGJpQGHaBGJeNGJeEGVBlGVKjGiJDGvJHGsVJGkEBGMIJGWjNGFBFGFCXGFGBGFYXGFpBGFMFEASJEAWpEJNFECJVEIXSEIQJEOqXEOcFEeNcEHEJEHlFEJgFEhlmEmDJEmZJEiMBEUqXEoSREPBFEPXFEPKFEPSFEPEFEPpFEPLXEPIBEJPdEPcFEPTBEJnXEqlHEMpREFCXEFODEFcFYASJYJAFYBaBYBVXYXpFYDhBYCJBYJGFYYbRYeNcYJeVYiIJYZJcYvJgYvJRYJsXYsJFYMYMYreVpBNHpBEJpBwXpQxFpYEJpeNDpJeDpeSFpeCHpHUJpHbBpHcHpmUJpiiJpUJrpsJuplITpFaBpFQqpFGBpFEfpFYBpFpBpFLJpFIDpFgBpFVXpFyQpFuFpFlFpFjDpFnXpFwXpJFMpFTBLXCJLXEFLXhFLXUJLXbFLalmLNJBLSJQLCLCLGJBLLDJLHaFLeNFLeSHLeCXLepFLhaRLZsJLsJDLsJrLocaLlLlLMdbLFNBLFSBLFEHLFkFIBBFIBXFIBaQIBKXIBSFIBpHIBLXIBgBIBhBIBuHIBmXIBiFIBZXIBvFIBbFIBjQIBwXIBWFIKTRIQUJIDGFICjQIYSRIINXIJeCIVaRImEkIZJFIvJRIsJXIdCJIJoRIbBQIjYBIcqXITFVIreVIFKFIFSFIFCJIFGFIFLDIFIBIJFOIFgBIFVXIJFhIFxFIFmXIFdHIFbBIJFrIJFWOBGBOQfXOOKjOUqXOfXBOqXEOcqXORVJOFIBOFlDHBIOHXiFHNTRHCJXHIaRHHJDHHEJHVbRHZJYHbIBHRsJHRkDHWlmgBKFgBSBgBCDgBGHgBpBgBIBgBVJgBuBgBvFgKDTgQVXgDUJgGSJgOqXgmUMgZIJgTUJgWIEgFBFgFNBgFDJgFSFgFGBgFYXgJFOgFgQgFVXgFhBgFbHgJFWVJABVQKcVDgFVOfXVeDFVhaRVmGdViJYVMaRVFNHhBNDhBCXhBEqhBpFhBLXhNJBhSJRheVXhhKEhxlmhZIJhdBQhkIJhbMNhMUJhMZJxNJgxQUJxDEkxDdFxSJRxplmxeSBxeCXxeGFxeYXxepQxegBxWVcxFEQxFLXxFIBxFgBxFxDxFZtxFdcxFbBxFwXyDJXyDlcuASJuDJpuDIBuCpJuGSJuIJFueEFuZIJusJXudWEuoIBuWGJuFBcuFKEuFNFuFQFuFDJuFGJuFVJuFUtuFdHuFTBmBYJmNJYmQhkmLJDmLJomIdXmiJYmvJRmsJRmklmmMBymMuCmclmmcnQiJABiJBNiJBDiBSFiBCJiBEFiBYBiBpFiBLXiBTHiJNciDEfiCZJiECJiJEqiOkHiHKFieNDiHJQieQcieDHieSFieCXieGFieEFieIHiegFihUJixNoioNXiFaBiFKFiFNDiFEPiFYXitFOitFHiFgBiFVEiFmXiFitiFbBiFMFiFrFUCXQUIoQUIJcUHQJUeCEUHwXUUJDUUqXUdWcUcqXUrnQUFNDUFSHUFCFUFEfUFLXUtFOZBXOZXSBZXpFZXVXZEQJZEJkZpDJZOqXZeNHZeCDZUqXZFBQZFEHZFLXvBAFvBKFvBCXvBEPvBpHvBIDvBgFvBuHvQNJvFNFvFGBvFIBvJFcsXCDsXLXsXsXsXlFsXcHsQqXsJQFsEqXseIFsFEHsFjDdBxOdNpRdNJRdEJbdpJRdhZJdnSJdrjNdFNJdFQHdFhNkNJDkYaRkHNRkHSRkVbRkuMRkjSJkcqDoSJFoEiJoYZJoOfXohEBoMGQocqXbBAFbBXFbBaFbBNDbBGBbBLXbBTBbBWDbGJYbIJHbFQqbFpQlDgQlOrFlVJRjGEBjZJRnXvJnXbBnEfHnOPDngJRnxfXnUJWwXEJwNpJwDpBwEfXwrEBMDCJMDGHMDIJMLJDcQGDcQpHcqXccqNFcqCXcFCJRBSBRBGBRBEJRBpQTBNFTBQJTBpBTBVXTFABTFSBTFCFTFGBTFMDrXCJrXLDrDNJrEfHrFQJrFitWNjdWNTR\",\n // 6-kana words\n \"AKLJMANOPFASNJIAEJWXAYJNRAIIbRAIcdaAeEfDAgidRAdjNYAMYEJAMIbRAFNJBAFpJFBBIJYBDZJFBSiJhBGdEBBEJfXBEJqXBEJWRBpaUJBLXrXBIYJMBOcfXBeEfFBestXBjNJRBcDJOBFEqXXNvJRXDMBhXCJNYXOAWpXONJWXHDEBXeIaRXhYJDXZJSJXMDJOXcASJXFVJXaBQqXaBZJFasXdQaFSJQaFEfXaFpJHaFOqXKBNSRKXvJBKQJhXKEJQJKEJGFKINJBKIJjNKgJNSKVElmKVhEBKiJGFKlBgJKjnUJKwsJYKMFIJKFNJDKFIJFKFOfXNJBSFNJBCXNBpJFNJBvQNJBMBNJLJXNJOqXNJeCXNJeGFNdsJCNbTKFNwXUJQNFEPQDiJcQDMSJQSFpBQGMQJQJeOcQyCJEQUJEBQJFBrQFEJqDXDJFDJXpBDJXIMDGiJhDIJGRDJeYcDHrDJDVXgFDkAWpDkIgRDjDEqDMvJRDJFNFDJFIBSKclmSJQOFSJQVHSJQjDSJGJBSJGJFSECJoSHEJqSJHTBSJVJDSViJYSZJNBSJsJDSFSJFSFEfXSJFLXCBUJVCJXSBCJXpBCXVJXCJXsXCJXdFCJNJHCLIJgCHiJFCVNJMChCJhCUHEJCsJTRCJdYcCoQJCCFEfXCFIJgCFUJxCFstFGJBaQGJBIDGQJqXGYJNRGJHKFGeQqDGHEJFGJeLXGHIiJGHdBlGUJEBGkIJTGFQPDGJFEqEAGegEJIJBEJVJXEhQJTEiJNcEJZJFEJoEqEjDEqEPDsXEPGJBEPOqXEPeQFEfDiDEJfEFEfepQEfMiJEqXNBEqDIDEqeSFEqVJXEMvJRYXNJDYXEJHYKVJcYYJEBYJeEcYJUqXYFpJFYFstXpAZJMpBSJFpNBNFpeQPDpHLJDpHIJFpHgJFpeitFpHZJFpJFADpFSJFpJFCJpFOqXpFitBpJFZJLXIJFLIJgRLVNJWLVHJMLwNpJLFGJBLFLJDLFOqXLJFUJIBDJXIBGJBIJBYQIJBIBIBOqXIBcqDIEGJFILNJTIIJEBIOiJhIJeNBIJeIBIhiJIIWoTRIJFAHIJFpBIJFuHIFUtFIJFTHOSBYJOEcqXOHEJqOvBpFOkVJrObBVJOncqDOcNJkHhNJRHuHJuHdMhBgBUqXgBsJXgONJBgHNJDgHHJQgJeitgHsJXgJyNagyDJBgZJDrgsVJQgkEJNgkjSJgJFAHgFCJDgFZtMVJXNFVXQfXVJXDJVXoQJVQVJQVDEfXVDvJHVEqNFVeQfXVHpJFVHxfXVVJSRVVmaRVlIJOhCXVJhHjYkhxCJVhWVUJhWiJcxBNJIxeEqDxfXBFxcFEPxFSJFxFYJXyBDQJydaUJyFOPDuYCJYuLvJRuHLJXuZJLDuFOPDuFZJHuFcqXmKHJdmCQJcmOsVJiJAGFitLCFieOfXiestXiZJMEikNJQirXzFiFQqXiFIJFiFZJFiFvtFUHpJFUteIcUteOcUVCJkUhdHcUbEJEUJqXQUMNJhURjYkUFitFZDGJHZJIxDZJVJXZJFDJZJFpQvBNJBvBSJFvJxBrseQqDsVFVJdFLJDkEJNBkmNJYkFLJDoQJOPoGsJRoEAHBoEJfFbBQqDbBZJHbFVJXlFIJBjYIrXjeitcjjCEBjWMNBwXQfXwXOaFwDsJXwCJTRwrCZJMDNJQcDDJFcqDOPRYiJFTBsJXTQIJBTFEfXTFLJDrXEJFrEJXMrFZJFWEJdEWYTlm\",\n // 7-kana words\n \"ABCDEFACNJTRAMBDJdAcNJVXBLNJEBXSIdWRXErNJkXYDJMBXZJCJaXMNJaYKKVJKcKDEJqXKDcNJhKVJrNYKbgJVXKFVJSBNBYBwDNJeQfXNJeEqXNhGJWENJFiJRQlIJbEQJfXxDQqXcfXQFNDEJQFwXUJDYcnUJDJIBgQDIUJTRDJFEqDSJQSJFSJQIJFSOPeZtSJFZJHCJXQfXCTDEqFGJBSJFGJBOfXGJBcqXGJHNJDGJRLiJEJfXEqEJFEJPEFpBEJYJBZJFYBwXUJYiJMEBYJZJyTYTONJXpQMFXFpeGIDdpJFstXpJFcPDLBVSJRLHQJqXLJFZJFIJBNJDIJBUqXIBkFDJIJEJPTIYJGWRIJeQPDIJeEfHIJFsJXOqGDSFHXEJqXgJCsJCgGQJqXgdQYJEgFMFNBgJFcqDVJwXUJVJFZJchIgJCCxOEJqXxOwXUJyDJBVRuscisciJBiJBieUtqXiJFDJkiFsJXQUGEZJcUJFsJXZtXIrXZDZJDrZJFNJDZJFstXvJFQqXvJFCJEsJXQJqkhkNGBbDJdTRbYJMEBlDwXUJMEFiJFcfXNJDRcNJWMTBLJXC\",\n // 8-kana words\n \"BraFUtHBFSJFdbNBLJXVJQoYJNEBSJBEJfHSJHwXUJCJdAZJMGjaFVJXEJPNJBlEJfFiJFpFbFEJqIJBVJCrIBdHiJhOPFChvJVJZJNJWxGFNIFLueIBQJqUHEJfUFstOZJDrlXEASJRlXVJXSFwVJNJWD\",\n // 9-kana words\n \"QJEJNNJDQJEJIBSFQJEJxegBQJEJfHEPSJBmXEJFSJCDEJqXLXNJFQqXIcQsFNJFIFEJqXUJgFsJXIJBUJEJfHNFvJxEqXNJnXUJFQqD\",\n // 10-kana words\n \"IJBEJqXZJ\"\n ];\n var mapping = \"~~AzB~X~a~KN~Q~D~S~C~G~E~Y~p~L~I~O~eH~g~V~hxyumi~~U~~Z~~v~~s~~dkoblPjfnqwMcRTr~W~~~F~~~~~Jt\";\n var wordlist = null;\n function hex(word) {\n return (0, bytes_1.hexlify)((0, strings_1.toUtf8Bytes)(word));\n }\n var KiYoKu = \"0xe3818de38284e3818f\";\n var KyoKu = \"0xe3818de38283e3818f\";\n function loadWords(lang) {\n if (wordlist !== null) {\n return;\n }\n wordlist = [];\n var transform2 = {};\n transform2[(0, strings_1.toUtf8String)([227, 130, 154])] = false;\n transform2[(0, strings_1.toUtf8String)([227, 130, 153])] = false;\n transform2[(0, strings_1.toUtf8String)([227, 130, 133])] = (0, strings_1.toUtf8String)([227, 130, 134]);\n transform2[(0, strings_1.toUtf8String)([227, 129, 163])] = (0, strings_1.toUtf8String)([227, 129, 164]);\n transform2[(0, strings_1.toUtf8String)([227, 130, 131])] = (0, strings_1.toUtf8String)([227, 130, 132]);\n transform2[(0, strings_1.toUtf8String)([227, 130, 135])] = (0, strings_1.toUtf8String)([227, 130, 136]);\n function normalize2(word2) {\n var result = \"\";\n for (var i4 = 0; i4 < word2.length; i4++) {\n var kana = word2[i4];\n var target = transform2[kana];\n if (target === false) {\n continue;\n }\n if (target) {\n kana = target;\n }\n result += kana;\n }\n return result;\n }\n function sortJapanese(a3, b4) {\n a3 = normalize2(a3);\n b4 = normalize2(b4);\n if (a3 < b4) {\n return -1;\n }\n if (a3 > b4) {\n return 1;\n }\n return 0;\n }\n for (var length_1 = 3; length_1 <= 9; length_1++) {\n var d5 = data[length_1 - 3];\n for (var offset = 0; offset < d5.length; offset += length_1) {\n var word = [];\n for (var i3 = 0; i3 < length_1; i3++) {\n var k4 = mapping.indexOf(d5[offset + i3]);\n word.push(227);\n word.push(k4 & 64 ? 130 : 129);\n word.push((k4 & 63) + 128);\n }\n wordlist.push((0, strings_1.toUtf8String)(word));\n }\n }\n wordlist.sort(sortJapanese);\n if (hex(wordlist[442]) === KiYoKu && hex(wordlist[443]) === KyoKu) {\n var tmp = wordlist[442];\n wordlist[442] = wordlist[443];\n wordlist[443] = tmp;\n }\n if (wordlist_1.Wordlist.check(lang) !== \"0xcb36b09e6baa935787fd762ce65e80b0c6a8dabdfbc3a7f86ac0e2c4fd111600\") {\n wordlist = null;\n throw new Error(\"BIP39 Wordlist for ja (Japanese) FAILED\");\n }\n }\n var LangJa = (\n /** @class */\n function(_super) {\n __extends3(LangJa2, _super);\n function LangJa2() {\n return _super.call(this, \"ja\") || this;\n }\n LangJa2.prototype.getWord = function(index2) {\n loadWords(this);\n return wordlist[index2];\n };\n LangJa2.prototype.getWordIndex = function(word) {\n loadWords(this);\n return wordlist.indexOf(word);\n };\n LangJa2.prototype.split = function(mnemonic) {\n wordlist_1.logger.checkNormalize();\n return mnemonic.split(/(?:\\u3000| )+/g);\n };\n LangJa2.prototype.join = function(words) {\n return words.join(\"\\u3000\");\n };\n return LangJa2;\n }(wordlist_1.Wordlist)\n );\n var langJa = new LangJa();\n exports3.langJa = langJa;\n wordlist_1.Wordlist.register(langJa);\n }\n });\n\n // ../../../node_modules/.pnpm/@ethersproject+wordlists@5.8.0/node_modules/@ethersproject/wordlists/lib/lang-ko.js\n var require_lang_ko = __commonJS({\n \"../../../node_modules/.pnpm/@ethersproject+wordlists@5.8.0/node_modules/@ethersproject/wordlists/lib/lang-ko.js\"(exports3) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n var __extends3 = exports3 && exports3.__extends || /* @__PURE__ */ function() {\n var extendStatics3 = function(d5, b4) {\n extendStatics3 = Object.setPrototypeOf || { __proto__: [] } instanceof Array && function(d6, b5) {\n d6.__proto__ = b5;\n } || function(d6, b5) {\n for (var p4 in b5)\n if (Object.prototype.hasOwnProperty.call(b5, p4))\n d6[p4] = b5[p4];\n };\n return extendStatics3(d5, b4);\n };\n return function(d5, b4) {\n if (typeof b4 !== \"function\" && b4 !== null)\n throw new TypeError(\"Class extends value \" + String(b4) + \" is not a constructor or null\");\n extendStatics3(d5, b4);\n function __() {\n this.constructor = d5;\n }\n d5.prototype = b4 === null ? Object.create(b4) : (__.prototype = b4.prototype, new __());\n };\n }();\n Object.defineProperty(exports3, \"__esModule\", { value: true });\n exports3.langKo = void 0;\n var strings_1 = require_lib9();\n var wordlist_1 = require_wordlist();\n var data = [\n \"OYAa\",\n \"ATAZoATBl3ATCTrATCl8ATDloATGg3ATHT8ATJT8ATJl3ATLlvATLn4ATMT8ATMX8ATMboATMgoAToLbAToMTATrHgATvHnAT3AnAT3JbAT3MTAT8DbAT8JTAT8LmAT8MYAT8MbAT#LnAUHT8AUHZvAUJXrAUJX8AULnrAXJnvAXLUoAXLgvAXMn6AXRg3AXrMbAX3JTAX3QbAYLn3AZLgvAZrSUAZvAcAZ8AaAZ8AbAZ8AnAZ8HnAZ8LgAZ8MYAZ8MgAZ8OnAaAboAaDTrAaFTrAaJTrAaJboAaLVoAaMXvAaOl8AaSeoAbAUoAbAg8AbAl4AbGnrAbMT8AbMXrAbMn4AbQb8AbSV8AbvRlAb8AUAb8AnAb8HgAb8JTAb8NTAb8RbAcGboAcLnvAcMT8AcMX8AcSToAcrAaAcrFnAc8AbAc8MgAfGgrAfHboAfJnvAfLV8AfLkoAfMT8AfMnoAfQb8AfScrAfSgrAgAZ8AgFl3AgGX8AgHZvAgHgrAgJXoAgJX8AgJboAgLZoAgLn4AgOX8AgoATAgoAnAgoCUAgoJgAgoLXAgoMYAgoSeAgrDUAgrJTAhrFnAhrLjAhrQgAjAgoAjJnrAkMX8AkOnoAlCTvAlCV8AlClvAlFg4AlFl6AlFn3AloSnAlrAXAlrAfAlrFUAlrFbAlrGgAlrOXAlvKnAlvMTAl3AbAl3MnAnATrAnAcrAnCZ3AnCl8AnDg8AnFboAnFl3AnHX4AnHbrAnHgrAnIl3AnJgvAnLXoAnLX4AnLbrAnLgrAnLhrAnMXoAnMgrAnOn3AnSbrAnSeoAnvLnAn3OnCTGgvCTSlvCTvAUCTvKnCTvNTCT3CZCT3GUCT3MTCT8HnCUCZrCULf8CULnvCU3HnCU3JUCY6NUCbDb8CbFZoCbLnrCboOTCboScCbrFnCbvLnCb8AgCb8HgCb$LnCkLfoClBn3CloDUDTHT8DTLl3DTSU8DTrAaDTrLXDTrLjDTrOYDTrOgDTvFXDTvFnDT3HUDT3LfDUCT9DUDT4DUFVoDUFV8DUFkoDUGgrDUJnrDULl8DUMT8DUMXrDUMX4DUMg8DUOUoDUOgvDUOg8DUSToDUSZ8DbDXoDbDgoDbGT8DbJn3DbLg3DbLn4DbMXrDbMg8DbOToDboJXGTClvGTDT8GTFZrGTLVoGTLlvGTLl3GTMg8GTOTvGTSlrGToCUGTrDgGTrJYGTrScGTtLnGTvAnGTvQgGUCZrGUDTvGUFZoGUHXrGULnvGUMT8GUoMgGXoLnGXrMXGXrMnGXvFnGYLnvGZOnvGZvOnGZ8LaGZ8LmGbAl3GbDYvGbDlrGbHX3GbJl4GbLV8GbLn3GbMn4GboJTGboRfGbvFUGb3GUGb4JnGgDX3GgFl$GgJlrGgLX6GgLZoGgLf8GgOXoGgrAgGgrJXGgrMYGgrScGgvATGgvOYGnAgoGnJgvGnLZoGnLg3GnLnrGnQn8GnSbrGnrMgHTClvHTDToHTFT3HTQT8HToJTHToJgHTrDUHTrMnHTvFYHTvRfHT8MnHT8SUHUAZ8HUBb4HUDTvHUoMYHXFl6HXJX6HXQlrHXrAUHXrMnHXrSbHXvFYHXvKXHX3LjHX3MeHYvQlHZrScHZvDbHbAcrHbFT3HbFl3HbJT8HbLTrHbMT8HbMXrHbMbrHbQb8HbSX3HboDbHboJTHbrFUHbrHgHbrJTHb8JTHb8MnHb8QgHgAlrHgDT3HgGgrHgHgrHgJTrHgJT8HgLX@HgLnrHgMT8HgMX8HgMboHgOnrHgQToHgRg3HgoHgHgrCbHgrFnHgrLVHgvAcHgvAfHnAloHnCTrHnCnvHnGTrHnGZ8HnGnvHnJT8HnLf8HnLkvHnMg8HnRTrITvFUITvFnJTAXrJTCV8JTFT3JTFT8JTFn4JTGgvJTHT8JTJT8JTJXvJTJl3JTJnvJTLX4JTLf8JTLhvJTMT8JTMXrJTMnrJTObrJTQT8JTSlvJT8DUJT8FkJT8MTJT8OXJT8OgJT8QUJT8RfJUHZoJXFT4JXFlrJXGZ8JXGnrJXLV8JXLgvJXMXoJXMX3JXNboJXPlvJXoJTJXoLkJXrAXJXrHUJXrJgJXvJTJXvOnJX4KnJYAl3JYJT8JYLhvJYQToJYrQXJY6NUJbAl3JbCZrJbDloJbGT8JbGgrJbJXvJbJboJbLf8JbLhrJbLl3JbMnvJbRg8JbSZ8JboDbJbrCZJbrSUJb3KnJb8LnJfRn8JgAXrJgCZrJgDTrJgGZrJgGZ8JgHToJgJT8JgJXoJgJgvJgLX4JgLZ3JgLZ8JgLn4JgMgrJgMn4JgOgvJgPX6JgRnvJgSToJgoCZJgoJbJgoMYJgrJXJgrJgJgrLjJg6MTJlCn3JlGgvJlJl8Jl4AnJl8FnJl8HgJnAToJnATrJnAbvJnDUoJnGnrJnJXrJnJXvJnLhvJnLnrJnLnvJnMToJnMT8JnMXvJnMX3JnMg8JnMlrJnMn4JnOX8JnST4JnSX3JnoAgJnoAnJnoJTJnoObJnrAbJnrAkJnrHnJnrJTJnrJYJnrOYJnrScJnvCUJnvFaJnvJgJnvJnJnvOYJnvQUJnvRUJn3FnJn3JTKnFl3KnLT6LTDlvLTMnoLTOn3LTRl3LTSb4LTSlrLToAnLToJgLTrAULTrAcLTrCULTrHgLTrMgLT3JnLULnrLUMX8LUoJgLVATrLVDTrLVLb8LVoJgLV8MgLV8RTLXDg3LXFlrLXrCnLXrLXLX3GTLX4GgLX4OYLZAXrLZAcrLZAgrLZAhrLZDXyLZDlrLZFbrLZFl3LZJX6LZJX8LZLc8LZLnrLZSU8LZoJTLZoJnLZrAgLZrAnLZrJYLZrLULZrMgLZrSkLZvAnLZvGULZvJeLZvOTLZ3FZLZ4JXLZ8STLZ8ScLaAT3LaAl3LaHT8LaJTrLaJT8LaJXrLaJgvLaJl4LaLVoLaMXrLaMXvLaMX8LbClvLbFToLbHlrLbJn4LbLZ3LbLhvLbMXrLbMnoLbvSULcLnrLc8HnLc8MTLdrMnLeAgoLeOgvLeOn3LfAl3LfLnvLfMl3LfOX8Lf8AnLf8JXLf8LXLgJTrLgJXrLgJl8LgMX8LgRZrLhCToLhrAbLhrFULhrJXLhvJYLjHTrLjHX4LjJX8LjLhrLjSX3LjSZ4LkFX4LkGZ8LkGgvLkJTrLkMXoLkSToLkSU8LkSZ8LkoOYLl3FfLl3MgLmAZrLmCbrLmGgrLmHboLmJnoLmJn3LmLfoLmLhrLmSToLnAX6LnAb6LnCZ3LnCb3LnDTvLnDb8LnFl3LnGnrLnHZvLnHgvLnITvLnJT8LnJX8LnJlvLnLf8LnLg6LnLhvLnLnoLnMXrLnMg8LnQlvLnSbrLnrAgLnrAnLnrDbLnrFkLnrJdLnrMULnrOYLnrSTLnvAnLnvDULnvHgLnvOYLnvOnLn3GgLn4DULn4JTLn4JnMTAZoMTAloMTDb8MTFT8MTJnoMTJnrMTLZrMTLhrMTLkvMTMX8MTRTrMToATMTrDnMTrOnMT3JnMT4MnMT8FUMT8FaMT8FlMT8GTMT8GbMT8GnMT8HnMT8JTMT8JbMT8OTMUCl8MUJTrMUJU8MUMX8MURTrMUSToMXAX6MXAb6MXCZoMXFXrMXHXrMXLgvMXOgoMXrAUMXrAnMXrHgMXrJYMXrJnMXrMTMXrMgMXrOYMXrSZMXrSgMXvDUMXvOTMX3JgMX3OTMX4JnMX8DbMX8FnMX8HbMX8HgMX8HnMX8LbMX8MnMX8OnMYAb8MYGboMYHTvMYHX4MYLTrMYLnvMYMToMYOgvMYRg3MYSTrMbAToMbAXrMbAl3MbAn8MbGZ8MbJT8MbJXrMbMXvMbMX8MbMnoMbrMUMb8AfMb8FbMb8FkMcJXoMeLnrMgFl3MgGTvMgGXoMgGgrMgGnrMgHT8MgHZrMgJnoMgLnrMgLnvMgMT8MgQUoMgrHnMgvAnMg8HgMg8JYMg8LfMloJnMl8ATMl8AXMl8JYMnAToMnAT4MnAZ8MnAl3MnAl4MnCl8MnHT8MnHg8MnJnoMnLZoMnLhrMnMXoMnMX3MnMnrMnOgvMnrFbMnrFfMnrFnMnrNTMnvJXNTMl8OTCT3OTFV8OTFn3OTHZvOTJXrOTOl3OT3ATOT3JUOT3LZOT3LeOT3MbOT8ATOT8AbOT8AgOT8MbOUCXvOUMX3OXHXvOXLl3OXrMUOXvDbOX6NUOX8JbOYFZoOYLbrOYLkoOYMg8OYSX3ObHTrObHT4ObJgrObLhrObMX3ObOX8Ob8FnOeAlrOeJT8OeJXrOeJnrOeLToOeMb8OgJXoOgLXoOgMnrOgOXrOgOloOgoAgOgoJbOgoMYOgoSTOg8AbOjLX4OjMnoOjSV8OnLVoOnrAgOn3DUPXQlrPXvFXPbvFTPdAT3PlFn3PnvFbQTLn4QToAgQToMTQULV8QURg8QUoJnQXCXvQbFbrQb8AaQb8AcQb8FbQb8MYQb8ScQeAlrQeLhrQjAn3QlFXoQloJgQloSnRTLnvRTrGURTrJTRUJZrRUoJlRUrQnRZrLmRZrMnRZrSnRZ8ATRZ8JbRZ8ScRbMT8RbST3RfGZrRfMX8RfMgrRfSZrRnAbrRnGT8RnvJgRnvLfRnvMTRn8AaSTClvSTJgrSTOXrSTRg3STRnvSToAcSToAfSToAnSToHnSToLjSToMTSTrAaSTrEUST3BYST8AgST8LmSUAZvSUAgrSUDT4SUDT8SUGgvSUJXoSUJXvSULTrSU8JTSU8LjSV8AnSV8JgSXFToSXLf8SYvAnSZrDUSZrMUSZrMnSZ8HgSZ8JTSZ8JgSZ8MYSZ8QUSaQUoSbCT3SbHToSbQYvSbSl4SboJnSbvFbSb8HbSb8JgSb8OTScGZrScHgrScJTvScMT8ScSToScoHbScrMTScvAnSeAZrSeAcrSeHboSeJUoSeLhrSeMT8SeMXrSe6JgSgHTrSkJnoSkLnvSk8CUSlFl3SlrSnSl8GnSmAboSmGT8SmJU8\",\n \"ATLnDlATrAZoATrJX4ATrMT8ATrMX4ATrRTrATvDl8ATvJUoATvMl8AT3AToAT3MX8AT8CT3AT8DT8AT8HZrAT8HgoAUAgFnAUCTFnAXoMX8AXrAT8AXrGgvAXrJXvAXrOgoAXvLl3AZvAgoAZvFbrAZvJXoAZvJl8AZvJn3AZvMX8AZvSbrAZ8FZoAZ8LZ8AZ8MU8AZ8OTvAZ8SV8AZ8SX3AbAgFZAboJnoAbvGboAb8ATrAb8AZoAb8AgrAb8Al4Ab8Db8Ab8JnoAb8LX4Ab8LZrAb8LhrAb8MT8Ab8OUoAb8Qb8Ab8ST8AcrAUoAcrAc8AcrCZ3AcrFT3AcrFZrAcrJl4AcrJn3AcrMX3AcrOTvAc8AZ8Ac8MT8AfAcJXAgoFn4AgoGgvAgoGnrAgoLc8AgoMXoAgrLnrAkrSZ8AlFXCTAloHboAlrHbrAlrLhrAlrLkoAl3CZrAl3LUoAl3LZrAnrAl4AnrMT8An3HT4BT3IToBX4MnvBb!Ln$CTGXMnCToLZ4CTrHT8CT3JTrCT3RZrCT#GTvCU6GgvCU8Db8CU8GZrCU8HT8CboLl3CbrGgrCbrMU8Cb8DT3Cb8GnrCb8LX4Cb8MT8Cb8ObrCgrGgvCgrKX4Cl8FZoDTrAbvDTrDboDTrGT6DTrJgrDTrMX3DTrRZrDTrRg8DTvAVvDTvFZoDT3DT8DT3Ln3DT4HZrDT4MT8DT8AlrDT8MT8DUAkGbDUDbJnDYLnQlDbDUOYDbMTAnDbMXSnDboAT3DboFn4DboLnvDj6JTrGTCgFTGTGgFnGTJTMnGTLnPlGToJT8GTrCT3GTrLVoGTrLnvGTrMX3GTrMboGTvKl3GZClFnGZrDT3GZ8DTrGZ8FZ8GZ8MXvGZ8On8GZ8ST3GbCnQXGbMbFnGboFboGboJg3GboMXoGb3JTvGb3JboGb3Mn6Gb3Qb8GgDXLjGgMnAUGgrDloGgrHX4GgrSToGgvAXrGgvAZvGgvFbrGgvLl3GgvMnvGnDnLXGnrATrGnrMboGnuLl3HTATMnHTAgCnHTCTCTHTrGTvHTrHTvHTrJX8HTrLl8HTrMT8HTrMgoHTrOTrHTuOn3HTvAZrHTvDTvHTvGboHTvJU8HTvLl3HTvMXrHTvQb4HT4GT6HT4JT8HT4Jb#HT8Al3HT8GZrHT8GgrHT8HX4HT8Jb8HT8JnoHT8LTrHT8LgvHT8SToHT8SV8HUoJUoHUoJX8HUoLnrHXrLZoHXvAl3HX3LnrHX4FkvHX4LhrHX4MXoHX4OnoHZrAZ8HZrDb8HZrGZ8HZrJnrHZvGZ8HZvLnvHZ8JnvHZ8LhrHbCXJlHbMTAnHboJl4HbpLl3HbrJX8HbrLnrHbrMnvHbvRYrHgoSTrHgrFV8HgrGZ8HgrJXoHgrRnvHgvBb!HgvGTrHgvHX4HgvHn!HgvLTrHgvSU8HnDnLbHnFbJbHnvDn8Hn6GgvHn!BTvJTCTLnJTQgFnJTrAnvJTrLX4JTrOUoJTvFn3JTvLnrJTvNToJT3AgoJT3Jn4JT3LhvJT3ObrJT8AcrJT8Al3JT8JT8JT8JnoJT8LX4JT8LnrJT8MX3JT8Rg3JT8Sc8JUoBTvJU8AToJU8GZ8JU8GgvJU8JTrJU8JXrJU8JnrJU8LnvJU8ScvJXHnJlJXrGgvJXrJU8JXrLhrJXrMT8JXrMXrJXrQUoJXvCTvJXvGZ8JXvGgrJXvQT8JX8Ab8JX8DT8JX8GZ8JX8HZvJX8LnrJX8MT8JX8MXoJX8MnvJX8ST3JYGnCTJbAkGbJbCTAnJbLTAcJboDT3JboLb6JbrAnvJbrCn3JbrDl8JbrGboJbrIZoJbrJnvJbrMnvJbrQb4Jb8RZrJeAbAnJgJnFbJgScAnJgrATrJgvHZ8JgvMn4JlJlFbJlLiQXJlLjOnJlRbOlJlvNXoJlvRl3Jl4AcrJl8AUoJl8MnrJnFnMlJnHgGbJnoDT8JnoFV8JnoGgvJnoIT8JnoQToJnoRg3JnrCZ3JnrGgrJnrHTvJnrLf8JnrOX8JnvAT3JnvFZoJnvGT8JnvJl4JnvMT8JnvMX8JnvOXrJnvPX6JnvSX3JnvSZrJn3MT8Jn3MX8Jn3RTrLTATKnLTJnLTLTMXKnLTRTQlLToGb8LTrAZ8LTrCZ8LTrDb8LTrHT8LT3PX6LT4FZoLT$CTvLT$GgrLUvHX3LVoATrLVoAgoLVoJboLVoMX3LVoRg3LV8CZ3LV8FZoLV8GTvLXrDXoLXrFbrLXvAgvLXvFlrLXvLl3LXvRn6LX4Mb8LX8GT8LYCXMnLYrMnrLZoSTvLZrAZvLZrAloLZrFToLZrJXvLZrJboLZrJl4LZrLnrLZrMT8LZrOgvLZrRnvLZrST4LZvMX8LZvSlvLZ8AgoLZ8CT3LZ8JT8LZ8LV8LZ8LZoLZ8Lg8LZ8SV8LZ8SbrLZ$HT8LZ$Mn4La6CTvLbFbMnLbRYFTLbSnFZLboJT8LbrAT9LbrGb3LbrQb8LcrJX8LcrMXrLerHTvLerJbrLerNboLgrDb8LgrGZ8LgrHTrLgrMXrLgrSU8LgvJTrLgvLl3Lg6Ll3LhrLnrLhrMT8LhvAl4LiLnQXLkoAgrLkoJT8LkoJn4LlrSU8Ll3FZoLl3HTrLl3JX8Ll3JnoLl3LToLmLeFbLnDUFbLnLVAnLnrATrLnrAZoLnrAb8LnrAlrLnrGgvLnrJU8LnrLZrLnrLhrLnrMb8LnrOXrLnrSZ8LnvAb4LnvDTrLnvDl8LnvHTrLnvHbrLnvJT8LnvJU8LnvJbrLnvLhvLnvMX8LnvMb8LnvNnoLnvSU8Ln3Al3Ln4FZoLn4GT6Ln4JgvLn4LhrLn4MT8Ln4SToMToCZrMToJX8MToLX4MToLf8MToRg3MTrEloMTvGb6MT3BTrMT3Lb6MT8AcrMT8AgrMT8GZrMT8JnoMT8LnrMT8MX3MUOUAnMXAbFnMXoAloMXoJX8MXoLf8MXoLl8MXrAb8MXrDTvMXrGT8MXrGgrMXrHTrMXrLf8MXrMU8MXrOXvMXrQb8MXvGT8MXvHTrMXvLVoMX3AX3MX3Jn3MX3LhrMX3MX3MX4AlrMX4OboMX8GTvMX8GZrMX8GgrMX8JT8MX8JX8MX8LhrMX8MT8MYDUFbMYMgDbMbGnFfMbvLX4MbvLl3Mb8Mb8Mb8ST4MgGXCnMg8ATrMg8AgoMg8CZrMg8DTrMg8DboMg8HTrMg8JgrMg8LT8MloJXoMl8AhrMl8JT8MnLgAUMnoJXrMnoLX4MnoLhrMnoMT8MnrAl4MnrDb8MnrOTvMnrOgvMnrQb8MnrSU8MnvGgrMnvHZ8Mn3MToMn4DTrMn4LTrMn4Mg8NnBXAnOTFTFnOToAToOTrGgvOTrJX8OT3JXoOT6MTrOT8GgrOT8HTpOT8MToOUoHT8OUoJT8OUoLn3OXrAgoOXrDg8OXrMT8OXvSToOX6CTvOX8CZrOX8OgrOb6HgvOb8AToOb8MT8OcvLZ8OgvAlrOgvHTvOgvJTrOgvJnrOgvLZrOgvLn4OgvMT8OgvRTrOg8AZoOg8DbvOnrOXoOnvJn4OnvLhvOnvRTrOn3GgoOn3JnvOn6JbvOn8OTrPTGYFTPbBnFnPbGnDnPgDYQTPlrAnvPlrETvPlrLnvPlrMXvPlvFX4QTMTAnQTrJU8QYCnJlQYJlQlQbGTQbQb8JnrQb8LZoQb8LnvQb8MT8Qb8Ml8Qb8ST4QloAl4QloHZvQloJX8QloMn8QnJZOlRTrAZvRTrDTrRTvJn4RTvLhvRT4Jb8RZrAZrRZ8AkrRZ8JU8RZ8LV8RZ8LnvRbJlQXRg3GboRg3MnvRg8AZ8Rg8JboRg8Jl4RnLTCbRnvFl3RnvQb8SToAl4SToCZrSToFZoSToHXrSToJU8SToJgvSToJl4SToLhrSToMX3STrAlvSTrCT9STrCgrSTrGgrSTrHXrSTrHboSTrJnoSTrNboSTvLnrST4AZoST8Ab8ST8JT8SUoJn3SU6HZ#SU6JTvSU8Db8SU8HboSU8LgrSV8JT8SZrAcrSZrAl3SZrJT8SZrJnvSZrMT8SZvLUoSZ4FZoSZ8JnoSZ8RZrScoLnrScoMT8ScoMX8ScrAT4ScrAZ8ScrLZ8ScrLkvScvDb8ScvLf8ScvNToSgrFZrShvKnrSloHUoSloLnrSlrMXoSl8HgrSmrJUoSn3BX6\",\n \"ATFlOn3ATLgrDYAT4MTAnAT8LTMnAYJnRTrAbGgJnrAbLV8LnAbvNTAnAeFbLg3AgOYMXoAlQbFboAnDboAfAnJgoJTBToDgAnBUJbAl3BboDUAnCTDlvLnCTFTrSnCYoQTLnDTwAbAnDUDTrSnDUHgHgrDX8LXFnDbJXAcrETvLTLnGTFTQbrGTMnGToGT3DUFbGUJlPX3GbQg8LnGboJbFnGb3GgAYGgAg8ScGgMbAXrGgvAbAnGnJTLnvGnvATFgHTDT6ATHTrDlJnHYLnMn8HZrSbJTHZ8LTFnHbFTJUoHgSeMT8HgrLjAnHgvAbAnHlFUrDlHnDgvAnHnHTFT3HnQTGnrJTAaMXvJTGbCn3JTOgrAnJXvAXMnJbMg8SnJbMnRg3Jb8LTMnJnAl3OnJnGYrQlJnJlQY3LTDlCn3LTJjLg3LTLgvFXLTMg3GTLV8HUOgLXFZLg3LXNXrMnLX8QXFnLX9AlMYLYLXPXrLZAbJU8LZDUJU8LZMXrSnLZ$AgFnLaPXrDULbFYrMnLbMn8LXLboJgJgLeFbLg3LgLZrSnLgOYAgoLhrRnJlLkCTrSnLkOnLhrLnFX%AYLnFZoJXLnHTvJbLnLloAbMTATLf8MTHgJn3MTMXrAXMT3MTFnMUITvFnMXFX%AYMXMXvFbMXrFTDbMYAcMX3MbLf8SnMb8JbFnMgMXrMTMgvAXFnMgvGgCmMnAloSnMnFnJTrOXvMXSnOX8HTMnObJT8ScObLZFl3ObMXCZoPTLgrQXPUFnoQXPU3RXJlPX3RkQXPbrJXQlPlrJbFnQUAhrDbQXGnCXvQYLnHlvQbLfLnvRTOgvJbRXJYrQlRYLnrQlRbLnrQlRlFT8JlRlFnrQXSTClCn3STHTrAnSTLZQlrSTMnGTrSToHgGbSTrGTDnSTvGXCnST3HgFbSU3HXAXSbAnJn3SbFT8LnScLfLnv\",\n \"AT3JgJX8AT8FZoSnAT8JgFV8AT8LhrDbAZ8JT8DbAb8GgLhrAb8SkLnvAe8MT8SnAlMYJXLVAl3GYDTvAl3LfLnvBUDTvLl3CTOn3HTrCT3DUGgrCU8MT8AbCbFTrJUoCgrDb8MTDTLV8JX8DTLnLXQlDT8LZrSnDUQb8FZ8DUST4JnvDb8ScOUoDj6GbJl4GTLfCYMlGToAXvFnGboAXvLnGgAcrJn3GgvFnSToGnLf8JnvGn#HTDToHTLnFXJlHTvATFToHTvHTDToHTvMTAgoHT3STClvHT4AlFl6HT8HTDToHUoDgJTrHUoScMX3HbRZrMXoHboJg8LTHgDb8JTrHgMToLf8HgvLnLnoHnHn3HT4Hn6MgvAnJTJU8ScvJT3AaQT8JT8HTrAnJXrRg8AnJbAloMXoJbrATFToJbvMnoSnJgDb6GgvJgDb8MXoJgSX3JU8JguATFToJlPYLnQlJlQkDnLbJlQlFYJlJl8Lf8OTJnCTFnLbJnLTHXMnJnLXGXCnJnoFfRg3JnrMYRg3Jn3HgFl3KT8Dg8LnLTRlFnPTLTvPbLbvLVoSbrCZLXMY6HT3LXNU7DlrLXNXDTATLX8DX8LnLZDb8JU8LZMnoLhrLZSToJU8LZrLaLnrLZvJn3SnLZ8LhrSnLaJnoMT8LbFlrHTvLbrFTLnrLbvATLlvLb6OTFn3LcLnJZOlLeAT6Mn4LeJT3ObrLg6LXFlrLhrJg8LnLhvDlPX4LhvLfLnvLj6JTFT3LnFbrMXoLnQluCTvLnrQXCY6LnvLfLnvLnvMgLnvLnvSeLf8MTMbrJn3MT3JgST3MT8AnATrMT8LULnrMUMToCZrMUScvLf8MXoDT8SnMX6ATFToMX8AXMT8MX8FkMT8MX8HTrDUMX8ScoSnMYJT6CTvMgAcrMXoMg8SToAfMlvAXLg3MnFl3AnvOT3AnFl3OUoATHT8OU3RnLXrOXrOXrSnObPbvFn6Og8HgrSnOg8OX8DbPTvAgoJgPU3RYLnrPXrDnJZrPb8CTGgvPlrLTDlvPlvFUJnoQUvFXrQlQeMnoAl3QlrQlrSnRTFTrJUoSTDlLiLXSTFg6HT3STJgoMn4STrFTJTrSTrLZFl3ST4FnMXoSUrDlHUoScvHTvSnSfLkvMXo\",\n \"AUoAcrMXoAZ8HboAg8AbOg6ATFgAg8AloMXoAl3AT8JTrAl8MX8MXoCT3SToJU8Cl8Db8MXoDT8HgrATrDboOT8MXoGTOTrATMnGT8LhrAZ8GnvFnGnQXHToGgvAcrHTvAXvLl3HbrAZoMXoHgBlFXLg3HgMnFXrSnHgrSb8JUoHn6HT8LgvITvATrJUoJUoLZrRnvJU8HT8Jb8JXvFX8QT8JXvLToJTrJYrQnGnQXJgrJnoATrJnoJU8ScvJnvMnvMXoLTCTLgrJXLTJlRTvQlLbRnJlQYvLbrMb8LnvLbvFn3RnoLdCVSTGZrLeSTvGXCnLg3MnoLn3MToLlrETvMT8SToAl3MbrDU6GTvMb8LX4LhrPlrLXGXCnSToLf8Rg3STrDb8LTrSTvLTHXMnSb3RYLnMnSgOg6ATFg\",\n \"HUDlGnrQXrJTrHgLnrAcJYMb8DULc8LTvFgGnCk3Mg8JbAnLX4QYvFYHnMXrRUoJnGnvFnRlvFTJlQnoSTrBXHXrLYSUJgLfoMT8Se8DTrHbDb\",\n \"AbDl8SToJU8An3RbAb8ST8DUSTrGnrAgoLbFU6Db8LTrMg8AaHT8Jb8ObDl8SToJU8Pb3RlvFYoJl\"\n ];\n var codes = \"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789!@#$%^&*\";\n function getHangul(code) {\n if (code >= 40) {\n code = code + 168 - 40;\n } else if (code >= 19) {\n code = code + 97 - 19;\n }\n return (0, strings_1.toUtf8String)([225, (code >> 6) + 132, (code & 63) + 128]);\n }\n var wordlist = null;\n function loadWords(lang) {\n if (wordlist != null) {\n return;\n }\n wordlist = [];\n data.forEach(function(data2, length2) {\n length2 += 4;\n for (var i3 = 0; i3 < data2.length; i3 += length2) {\n var word = \"\";\n for (var j2 = 0; j2 < length2; j2++) {\n word += getHangul(codes.indexOf(data2[i3 + j2]));\n }\n wordlist.push(word);\n }\n });\n wordlist.sort();\n if (wordlist_1.Wordlist.check(lang) !== \"0xf9eddeace9c5d3da9c93cf7d3cd38f6a13ed3affb933259ae865714e8a3ae71a\") {\n wordlist = null;\n throw new Error(\"BIP39 Wordlist for ko (Korean) FAILED\");\n }\n }\n var LangKo = (\n /** @class */\n function(_super) {\n __extends3(LangKo2, _super);\n function LangKo2() {\n return _super.call(this, \"ko\") || this;\n }\n LangKo2.prototype.getWord = function(index2) {\n loadWords(this);\n return wordlist[index2];\n };\n LangKo2.prototype.getWordIndex = function(word) {\n loadWords(this);\n return wordlist.indexOf(word);\n };\n return LangKo2;\n }(wordlist_1.Wordlist)\n );\n var langKo = new LangKo();\n exports3.langKo = langKo;\n wordlist_1.Wordlist.register(langKo);\n }\n });\n\n // ../../../node_modules/.pnpm/@ethersproject+wordlists@5.8.0/node_modules/@ethersproject/wordlists/lib/lang-it.js\n var require_lang_it = __commonJS({\n \"../../../node_modules/.pnpm/@ethersproject+wordlists@5.8.0/node_modules/@ethersproject/wordlists/lib/lang-it.js\"(exports3) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n var __extends3 = exports3 && exports3.__extends || /* @__PURE__ */ function() {\n var extendStatics3 = function(d5, b4) {\n extendStatics3 = Object.setPrototypeOf || { __proto__: [] } instanceof Array && function(d6, b5) {\n d6.__proto__ = b5;\n } || function(d6, b5) {\n for (var p4 in b5)\n if (Object.prototype.hasOwnProperty.call(b5, p4))\n d6[p4] = b5[p4];\n };\n return extendStatics3(d5, b4);\n };\n return function(d5, b4) {\n if (typeof b4 !== \"function\" && b4 !== null)\n throw new TypeError(\"Class extends value \" + String(b4) + \" is not a constructor or null\");\n extendStatics3(d5, b4);\n function __() {\n this.constructor = d5;\n }\n d5.prototype = b4 === null ? Object.create(b4) : (__.prototype = b4.prototype, new __());\n };\n }();\n Object.defineProperty(exports3, \"__esModule\", { value: true });\n exports3.langIt = void 0;\n var wordlist_1 = require_wordlist();\n var words = \"AbacoAbbaglioAbbinatoAbeteAbissoAbolireAbrasivoAbrogatoAccadereAccennoAccusatoAcetoneAchilleAcidoAcquaAcreAcrilicoAcrobataAcutoAdagioAddebitoAddomeAdeguatoAderireAdipeAdottareAdulareAffabileAffettoAffissoAffrantoAforismaAfosoAfricanoAgaveAgenteAgevoleAggancioAgireAgitareAgonismoAgricoloAgrumetoAguzzoAlabardaAlatoAlbatroAlberatoAlboAlbumeAlceAlcolicoAlettoneAlfaAlgebraAlianteAlibiAlimentoAllagatoAllegroAllievoAllodolaAllusivoAlmenoAlogenoAlpacaAlpestreAltalenaAlternoAlticcioAltroveAlunnoAlveoloAlzareAmalgamaAmanitaAmarenaAmbitoAmbratoAmebaAmericaAmetistaAmicoAmmassoAmmendaAmmirareAmmonitoAmoreAmpioAmpliareAmuletoAnacardoAnagrafeAnalistaAnarchiaAnatraAncaAncellaAncoraAndareAndreaAnelloAngeloAngolareAngustoAnimaAnnegareAnnidatoAnnoAnnuncioAnonimoAnticipoAnziApaticoAperturaApodeApparireAppetitoAppoggioApprodoAppuntoAprileArabicaArachideAragostaAraldicaArancioAraturaArazzoArbitroArchivioArditoArenileArgentoArgineArgutoAriaArmoniaArneseArredatoArringaArrostoArsenicoArsoArteficeArzilloAsciuttoAscoltoAsepsiAsetticoAsfaltoAsinoAsolaAspiratoAsproAssaggioAsseAssolutoAssurdoAstaAstenutoAsticeAstrattoAtavicoAteismoAtomicoAtonoAttesaAttivareAttornoAttritoAttualeAusilioAustriaAutistaAutonomoAutunnoAvanzatoAvereAvvenireAvvisoAvvolgereAzioneAzotoAzzimoAzzurroBabeleBaccanoBacinoBacoBadessaBadilataBagnatoBaitaBalconeBaldoBalenaBallataBalzanoBambinoBandireBaraondaBarbaroBarcaBaritonoBarlumeBaroccoBasilicoBassoBatostaBattutoBauleBavaBavosaBeccoBeffaBelgioBelvaBendaBenevoleBenignoBenzinaBereBerlinaBetaBibitaBiciBidoneBifidoBigaBilanciaBimboBinocoloBiologoBipedeBipolareBirbanteBirraBiscottoBisestoBisnonnoBisonteBisturiBizzarroBlandoBlattaBollitoBonificoBordoBoscoBotanicoBottinoBozzoloBraccioBradipoBramaBrancaBravuraBretellaBrevettoBrezzaBrigliaBrillanteBrindareBroccoloBrodoBronzinaBrulloBrunoBubboneBucaBudinoBuffoneBuioBulboBuonoBurloneBurrascaBussolaBustaCadettoCaducoCalamaroCalcoloCalesseCalibroCalmoCaloriaCambusaCamerataCamiciaCamminoCamolaCampaleCanapaCandelaCaneCaninoCanottoCantinaCapaceCapelloCapitoloCapogiroCapperoCapraCapsulaCarapaceCarcassaCardoCarismaCarovanaCarrettoCartolinaCasaccioCascataCasermaCasoCassoneCastelloCasualeCatastaCatenaCatrameCautoCavilloCedibileCedrataCefaloCelebreCellulareCenaCenoneCentesimoCeramicaCercareCertoCerumeCervelloCesoiaCespoCetoChelaChiaroChiccaChiedereChimeraChinaChirurgoChitarraCiaoCiclismoCifrareCignoCilindroCiottoloCircaCirrosiCitricoCittadinoCiuffoCivettaCivileClassicoClinicaCloroCoccoCodardoCodiceCoerenteCognomeCollareColmatoColoreColposoColtivatoColzaComaCometaCommandoComodoComputerComuneConcisoCondurreConfermaCongelareConiugeConnessoConoscereConsumoContinuoConvegnoCopertoCopioneCoppiaCopricapoCorazzaCordataCoricatoCorniceCorollaCorpoCorredoCorsiaCorteseCosmicoCostanteCotturaCovatoCratereCravattaCreatoCredereCremosoCrescitaCretaCricetoCrinaleCrisiCriticoCroceCronacaCrostataCrucialeCruscaCucireCuculoCuginoCullatoCupolaCuratoreCursoreCurvoCuscinoCustodeDadoDainoDalmataDamerinoDanielaDannosoDanzareDatatoDavantiDavveroDebuttoDecennioDecisoDeclinoDecolloDecretoDedicatoDefinitoDeformeDegnoDelegareDelfinoDelirioDeltaDemenzaDenotatoDentroDepositoDerapataDerivareDerogaDescrittoDesertoDesiderioDesumereDetersivoDevotoDiametroDicembreDiedroDifesoDiffusoDigerireDigitaleDiluvioDinamicoDinnanziDipintoDiplomaDipoloDiradareDireDirottoDirupoDisagioDiscretoDisfareDisgeloDispostoDistanzaDisumanoDitoDivanoDiveltoDividereDivoratoDobloneDocenteDoganaleDogmaDolceDomatoDomenicaDominareDondoloDonoDormireDoteDottoreDovutoDozzinaDragoDruidoDubbioDubitareDucaleDunaDuomoDupliceDuraturoEbanoEccessoEccoEclissiEconomiaEderaEdicolaEdileEditoriaEducareEgemoniaEgliEgoismoEgregioElaboratoElargireEleganteElencatoElettoElevareElficoElicaElmoElsaElusoEmanatoEmblemaEmessoEmiroEmotivoEmozioneEmpiricoEmuloEndemicoEnduroEnergiaEnfasiEnotecaEntrareEnzimaEpatiteEpilogoEpisodioEpocaleEppureEquatoreErarioErbaErbosoEredeEremitaErigereErmeticoEroeErosivoErranteEsagonoEsameEsanimeEsaudireEscaEsempioEsercitoEsibitoEsigenteEsistereEsitoEsofagoEsortatoEsosoEspansoEspressoEssenzaEssoEstesoEstimareEstoniaEstrosoEsultareEtilicoEtnicoEtruscoEttoEuclideoEuropaEvasoEvidenzaEvitatoEvolutoEvvivaFabbricaFaccendaFachiroFalcoFamigliaFanaleFanfaraFangoFantasmaFareFarfallaFarinosoFarmacoFasciaFastosoFasulloFaticareFatoFavolosoFebbreFecolaFedeFegatoFelpaFeltroFemminaFendereFenomenoFermentoFerroFertileFessuraFestivoFettaFeudoFiabaFiduciaFifaFiguratoFiloFinanzaFinestraFinireFioreFiscaleFisicoFiumeFlaconeFlamencoFleboFlemmaFloridoFluenteFluoroFobicoFocacciaFocosoFoderatoFoglioFolataFolcloreFolgoreFondenteFoneticoFoniaFontanaForbitoForchettaForestaFormicaFornaioForoFortezzaForzareFosfatoFossoFracassoFranaFrassinoFratelloFreccettaFrenataFrescoFrigoFrollinoFrondeFrugaleFruttaFucilataFucsiaFuggenteFulmineFulvoFumanteFumettoFumosoFuneFunzioneFuocoFurboFurgoneFuroreFusoFutileGabbianoGaffeGalateoGallinaGaloppoGamberoGammaGaranziaGarboGarofanoGarzoneGasdottoGasolioGastricoGattoGaudioGazeboGazzellaGecoGelatinaGelsoGemelloGemmatoGeneGenitoreGennaioGenotipoGergoGhepardoGhiaccioGhisaGialloGildaGineproGiocareGioielloGiornoGioveGiratoGironeGittataGiudizioGiuratoGiustoGlobuloGlutineGnomoGobbaGolfGomitoGommoneGonfioGonnaGovernoGracileGradoGraficoGrammoGrandeGrattareGravosoGraziaGrecaGreggeGrifoneGrigioGrinzaGrottaGruppoGuadagnoGuaioGuantoGuardareGufoGuidareIbernatoIconaIdenticoIdillioIdoloIdraIdricoIdrogenoIgieneIgnaroIgnoratoIlareIllesoIllogicoIlludereImballoImbevutoImboccoImbutoImmaneImmersoImmolatoImpaccoImpetoImpiegoImportoImprontaInalareInarcareInattivoIncantoIncendioInchinoIncisivoInclusoIncontroIncrocioIncuboIndagineIndiaIndoleIneditoInfattiInfilareInflittoIngaggioIngegnoIngleseIngordoIngrossoInnescoInodoreInoltrareInondatoInsanoInsettoInsiemeInsonniaInsulinaIntasatoInteroIntonacoIntuitoInumidireInvalidoInveceInvitoIperboleIpnoticoIpotesiIppicaIrideIrlandaIronicoIrrigatoIrrorareIsolatoIsotopoIstericoIstitutoIstriceItaliaIterareLabbroLabirintoLaccaLaceratoLacrimaLacunaLaddoveLagoLampoLancettaLanternaLardosoLargaLaringeLastraLatenzaLatinoLattugaLavagnaLavoroLegaleLeggeroLemboLentezzaLenzaLeoneLepreLesivoLessatoLestoLetteraleLevaLevigatoLiberoLidoLievitoLillaLimaturaLimitareLimpidoLineareLinguaLiquidoLiraLiricaLiscaLiteLitigioLivreaLocandaLodeLogicaLombareLondraLongevoLoquaceLorenzoLotoLotteriaLuceLucidatoLumacaLuminosoLungoLupoLuppoloLusingaLussoLuttoMacabroMacchinaMaceroMacinatoMadamaMagicoMagliaMagneteMagroMaiolicaMalafedeMalgradoMalintesoMalsanoMaltoMalumoreManaManciaMandorlaMangiareManifestoMannaroManovraMansardaMantideManubrioMappaMaratonaMarcireMarettaMarmoMarsupioMascheraMassaiaMastinoMaterassoMatricolaMattoneMaturoMazurcaMeandroMeccanicoMecenateMedesimoMeditareMegaMelassaMelisMelodiaMeningeMenoMensolaMercurioMerendaMerloMeschinoMeseMessereMestoloMetalloMetodoMettereMiagolareMicaMicelioMicheleMicroboMidolloMieleMiglioreMilanoMiliteMimosaMineraleMiniMinoreMirinoMirtilloMiscelaMissivaMistoMisurareMitezzaMitigareMitraMittenteMnemonicoModelloModificaModuloMoganoMogioMoleMolossoMonasteroMoncoMondinaMonetarioMonileMonotonoMonsoneMontatoMonvisoMoraMordereMorsicatoMostroMotivatoMotosegaMottoMovenzaMovimentoMozzoMuccaMucosaMuffaMughettoMugnaioMulattoMulinelloMultiploMummiaMuntoMuovereMuraleMusaMuscoloMusicaMutevoleMutoNababboNaftaNanometroNarcisoNariceNarratoNascereNastrareNaturaleNauticaNaviglioNebulosaNecrosiNegativoNegozioNemmenoNeofitaNerettoNervoNessunoNettunoNeutraleNeveNevroticoNicchiaNinfaNitidoNobileNocivoNodoNomeNominaNordicoNormaleNorvegeseNostranoNotareNotiziaNotturnoNovellaNucleoNullaNumeroNuovoNutrireNuvolaNuzialeOasiObbedireObbligoObeliscoOblioOboloObsoletoOccasioneOcchioOccidenteOccorrereOccultareOcraOculatoOdiernoOdorareOffertaOffrireOffuscatoOggettoOggiOgnunoOlandeseOlfattoOliatoOlivaOlogrammaOltreOmaggioOmbelicoOmbraOmegaOmissioneOndosoOnereOniceOnnivoroOnorevoleOntaOperatoOpinioneOppostoOracoloOrafoOrdineOrecchinoOreficeOrfanoOrganicoOrigineOrizzonteOrmaOrmeggioOrnativoOrologioOrrendoOrribileOrtensiaOrticaOrzataOrzoOsareOscurareOsmosiOspedaleOspiteOssaOssidareOstacoloOsteOtiteOtreOttagonoOttimoOttobreOvaleOvestOvinoOviparoOvocitoOvunqueOvviareOzioPacchettoPacePacificoPadellaPadronePaesePagaPaginaPalazzinaPalesarePallidoPaloPaludePandoroPannelloPaoloPaonazzoPapricaParabolaParcellaParerePargoloPariParlatoParolaPartireParvenzaParzialePassivoPasticcaPataccaPatologiaPattumePavonePeccatoPedalarePedonalePeggioPelosoPenarePendicePenisolaPennutoPenombraPensarePentolaPepePepitaPerbenePercorsoPerdonatoPerforarePergamenaPeriodoPermessoPernoPerplessoPersuasoPertugioPervasoPesatorePesistaPesoPestiferoPetaloPettinePetulantePezzoPiacerePiantaPiattinoPiccinoPicozzaPiegaPietraPifferoPigiamaPigolioPigroPilaPiliferoPillolaPilotaPimpantePinetaPinnaPinoloPioggiaPiomboPiramidePireticoPiritePirolisiPitonePizzicoPlaceboPlanarePlasmaPlatanoPlenarioPochezzaPoderosoPodismoPoesiaPoggiarePolentaPoligonoPollicePolmonitePolpettaPolsoPoltronaPolverePomicePomodoroPontePopolosoPorfidoPorosoPorporaPorrePortataPosaPositivoPossessoPostulatoPotassioPoterePranzoPrassiPraticaPreclusoPredicaPrefissoPregiatoPrelievoPremerePrenotarePreparatoPresenzaPretestoPrevalsoPrimaPrincipePrivatoProblemaProcuraProdurreProfumoProgettoProlungaPromessaPronomePropostaProrogaProtesoProvaPrudentePrugnaPruritoPsichePubblicoPudicaPugilatoPugnoPulcePulitoPulsantePuntarePupazzoPupillaPuroQuadroQualcosaQuasiQuerelaQuotaRaccoltoRaddoppioRadicaleRadunatoRafficaRagazzoRagioneRagnoRamarroRamingoRamoRandagioRantolareRapatoRapinaRappresoRasaturaRaschiatoRasenteRassegnaRastrelloRataRavvedutoRealeRecepireRecintoReclutaReconditoRecuperoRedditoRedimereRegalatoRegistroRegolaRegressoRelazioneRemareRemotoRennaReplicaReprimereReputareResaResidenteResponsoRestauroReteRetinaRetoricaRettificaRevocatoRiassuntoRibadireRibelleRibrezzoRicaricaRiccoRicevereRiciclatoRicordoRicredutoRidicoloRidurreRifasareRiflessoRiformaRifugioRigareRigettatoRighelloRilassatoRilevatoRimanereRimbalzoRimedioRimorchioRinascitaRincaroRinforzoRinnovoRinomatoRinsavitoRintoccoRinunciaRinvenireRiparatoRipetutoRipienoRiportareRipresaRipulireRisataRischioRiservaRisibileRisoRispettoRistoroRisultatoRisvoltoRitardoRitegnoRitmicoRitrovoRiunioneRivaRiversoRivincitaRivoltoRizomaRobaRoboticoRobustoRocciaRocoRodaggioRodereRoditoreRogitoRollioRomanticoRompereRonzioRosolareRospoRotanteRotondoRotulaRovescioRubizzoRubricaRugaRullinoRumineRumorosoRuoloRupeRussareRusticoSabatoSabbiareSabotatoSagomaSalassoSaldaturaSalgemmaSalivareSalmoneSaloneSaltareSalutoSalvoSapereSapidoSaporitoSaracenoSarcasmoSartoSassosoSatelliteSatiraSatolloSaturnoSavanaSavioSaziatoSbadiglioSbalzoSbancatoSbarraSbattereSbavareSbendareSbirciareSbloccatoSbocciatoSbrinareSbruffoneSbuffareScabrosoScadenzaScalaScambiareScandaloScapolaScarsoScatenareScavatoSceltoScenicoScettroSchedaSchienaSciarpaScienzaScindereScippoSciroppoScivoloSclerareScodellaScolpitoScompartoSconfortoScoprireScortaScossoneScozzeseScribaScrollareScrutinioScuderiaScultoreScuolaScuroScusareSdebitareSdoganareSeccaturaSecondoSedanoSeggiolaSegnalatoSegregatoSeguitoSelciatoSelettivoSellaSelvaggioSemaforoSembrareSemeSeminatoSempreSensoSentireSepoltoSequenzaSerataSerbatoSerenoSerioSerpenteSerraglioServireSestinaSetolaSettimanaSfaceloSfaldareSfamatoSfarzosoSfaticatoSferaSfidaSfilatoSfingeSfocatoSfoderareSfogoSfoltireSforzatoSfrattoSfruttatoSfuggitoSfumareSfusoSgabelloSgarbatoSgonfiareSgorbioSgrassatoSguardoSibiloSiccomeSierraSiglaSignoreSilenzioSillabaSimboloSimpaticoSimulatoSinfoniaSingoloSinistroSinoSintesiSinusoideSiparioSismaSistoleSituatoSlittaSlogaturaSlovenoSmarritoSmemoratoSmentitoSmeraldoSmilzoSmontareSmottatoSmussatoSnellireSnervatoSnodoSobbalzoSobrioSoccorsoSocialeSodaleSoffittoSognoSoldatoSolenneSolidoSollazzoSoloSolubileSolventeSomaticoSommaSondaSonettoSonniferoSopireSoppesoSopraSorgereSorpassoSorrisoSorsoSorteggioSorvolatoSospiroSostaSottileSpadaSpallaSpargereSpatolaSpaventoSpazzolaSpecieSpedireSpegnereSpelaturaSperanzaSpessoreSpettraleSpezzatoSpiaSpigolosoSpillatoSpinosoSpiraleSplendidoSportivoSposoSprangaSprecareSpronatoSpruzzoSpuntinoSquilloSradicareSrotolatoStabileStaccoStaffaStagnareStampatoStantioStarnutoStaseraStatutoSteloSteppaSterzoStilettoStimaStirpeStivaleStizzosoStonatoStoricoStrappoStregatoStriduloStrozzareStruttoStuccareStufoStupendoSubentroSuccosoSudoreSuggeritoSugoSultanoSuonareSuperboSupportoSurgelatoSurrogatoSussurroSuturaSvagareSvedeseSveglioSvelareSvenutoSveziaSviluppoSvistaSvizzeraSvoltaSvuotareTabaccoTabulatoTacciareTaciturnoTaleTalismanoTamponeTanninoTaraTardivoTargatoTariffaTarpareTartarugaTastoTatticoTavernaTavolataTazzaTecaTecnicoTelefonoTemerarioTempoTemutoTendoneTeneroTensioneTentacoloTeoremaTermeTerrazzoTerzettoTesiTesseratoTestatoTetroTettoiaTifareTigellaTimbroTintoTipicoTipografoTiraggioTiroTitanioTitoloTitubanteTizioTizzoneToccareTollerareToltoTombolaTomoTonfoTonsillaTopazioTopologiaToppaTorbaTornareTorroneTortoraToscanoTossireTostaturaTotanoTraboccoTracheaTrafilaTragediaTralcioTramontoTransitoTrapanoTrarreTraslocoTrattatoTraveTrecciaTremolioTrespoloTributoTrichecoTrifoglioTrilloTrinceaTrioTristezzaTrituratoTrivellaTrombaTronoTroppoTrottolaTrovareTruccatoTubaturaTuffatoTulipanoTumultoTunisiaTurbareTurchinoTutaTutelaUbicatoUccelloUccisoreUdireUditivoUffaUfficioUgualeUlisseUltimatoUmanoUmileUmorismoUncinettoUngereUnghereseUnicornoUnificatoUnisonoUnitarioUnteUovoUpupaUraganoUrgenzaUrloUsanzaUsatoUscitoUsignoloUsuraioUtensileUtilizzoUtopiaVacanteVaccinatoVagabondoVagliatoValangaValgoValicoVallettaValorosoValutareValvolaVampataVangareVanitosoVanoVantaggioVanveraVaporeVaranoVarcatoVarianteVascaVedettaVedovaVedutoVegetaleVeicoloVelcroVelinaVellutoVeloceVenatoVendemmiaVentoVeraceVerbaleVergognaVerificaVeroVerrucaVerticaleVescicaVessilloVestaleVeteranoVetrinaVetustoViandanteVibranteVicendaVichingoVicinanzaVidimareVigiliaVignetoVigoreVileVillanoViminiVincitoreViolaViperaVirgolaVirologoVirulentoViscosoVisioneVispoVissutoVisuraVitaVitelloVittimaVivandaVividoViziareVoceVogaVolatileVolereVolpeVoragineVulcanoZampognaZannaZappatoZatteraZavorraZefiroZelanteZeloZenzeroZerbinoZibettoZincoZirconeZittoZollaZoticoZuccheroZufoloZuluZuppa\";\n var wordlist = null;\n function loadWords(lang) {\n if (wordlist != null) {\n return;\n }\n wordlist = words.replace(/([A-Z])/g, \" $1\").toLowerCase().substring(1).split(\" \");\n if (wordlist_1.Wordlist.check(lang) !== \"0x5c1362d88fd4cf614a96f3234941d29f7d37c08c5292fde03bf62c2db6ff7620\") {\n wordlist = null;\n throw new Error(\"BIP39 Wordlist for it (Italian) FAILED\");\n }\n }\n var LangIt = (\n /** @class */\n function(_super) {\n __extends3(LangIt2, _super);\n function LangIt2() {\n return _super.call(this, \"it\") || this;\n }\n LangIt2.prototype.getWord = function(index2) {\n loadWords(this);\n return wordlist[index2];\n };\n LangIt2.prototype.getWordIndex = function(word) {\n loadWords(this);\n return wordlist.indexOf(word);\n };\n return LangIt2;\n }(wordlist_1.Wordlist)\n );\n var langIt = new LangIt();\n exports3.langIt = langIt;\n wordlist_1.Wordlist.register(langIt);\n }\n });\n\n // ../../../node_modules/.pnpm/@ethersproject+wordlists@5.8.0/node_modules/@ethersproject/wordlists/lib/lang-zh.js\n var require_lang_zh = __commonJS({\n \"../../../node_modules/.pnpm/@ethersproject+wordlists@5.8.0/node_modules/@ethersproject/wordlists/lib/lang-zh.js\"(exports3) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n var __extends3 = exports3 && exports3.__extends || /* @__PURE__ */ function() {\n var extendStatics3 = function(d5, b4) {\n extendStatics3 = Object.setPrototypeOf || { __proto__: [] } instanceof Array && function(d6, b5) {\n d6.__proto__ = b5;\n } || function(d6, b5) {\n for (var p4 in b5)\n if (Object.prototype.hasOwnProperty.call(b5, p4))\n d6[p4] = b5[p4];\n };\n return extendStatics3(d5, b4);\n };\n return function(d5, b4) {\n if (typeof b4 !== \"function\" && b4 !== null)\n throw new TypeError(\"Class extends value \" + String(b4) + \" is not a constructor or null\");\n extendStatics3(d5, b4);\n function __() {\n this.constructor = d5;\n }\n d5.prototype = b4 === null ? Object.create(b4) : (__.prototype = b4.prototype, new __());\n };\n }();\n Object.defineProperty(exports3, \"__esModule\", { value: true });\n exports3.langZhTw = exports3.langZhCn = void 0;\n var strings_1 = require_lib9();\n var wordlist_1 = require_wordlist();\n var data = \"}aE#4A=Yv&co#4N#6G=cJ&SM#66|/Z#4t&kn~46#4K~4q%b9=IR#7l,mB#7W_X2*dl}Uo~7s}Uf&Iw#9c&cw~6O&H6&wx&IG%v5=IQ~8a&Pv#47$PR&50%Ko&QM&3l#5f,D9#4L|/H&tQ;v0~6n]nN?\";\n function loadWords(lang) {\n if (wordlist[lang.locale] !== null) {\n return;\n }\n wordlist[lang.locale] = [];\n var deltaOffset = 0;\n for (var i3 = 0; i3 < 2048; i3++) {\n var s4 = style.indexOf(data[i3 * 3]);\n var bytes = [\n 228 + (s4 >> 2),\n 128 + codes.indexOf(data[i3 * 3 + 1]),\n 128 + codes.indexOf(data[i3 * 3 + 2])\n ];\n if (lang.locale === \"zh_tw\") {\n var common = s4 % 4;\n for (var i_1 = common; i_1 < 3; i_1++) {\n bytes[i_1] = codes.indexOf(deltaData[deltaOffset++]) + (i_1 == 0 ? 228 : 128);\n }\n }\n wordlist[lang.locale].push((0, strings_1.toUtf8String)(bytes));\n }\n if (wordlist_1.Wordlist.check(lang) !== Checks[lang.locale]) {\n wordlist[lang.locale] = null;\n throw new Error(\"BIP39 Wordlist for \" + lang.locale + \" (Chinese) FAILED\");\n }\n }\n var LangZh = (\n /** @class */\n function(_super) {\n __extends3(LangZh2, _super);\n function LangZh2(country) {\n return _super.call(this, \"zh_\" + country) || this;\n }\n LangZh2.prototype.getWord = function(index2) {\n loadWords(this);\n return wordlist[this.locale][index2];\n };\n LangZh2.prototype.getWordIndex = function(word) {\n loadWords(this);\n return wordlist[this.locale].indexOf(word);\n };\n LangZh2.prototype.split = function(mnemonic) {\n mnemonic = mnemonic.replace(/(?:\\u3000| )+/g, \"\");\n return mnemonic.split(\"\");\n };\n return LangZh2;\n }(wordlist_1.Wordlist)\n );\n var langZhCn = new LangZh(\"cn\");\n exports3.langZhCn = langZhCn;\n wordlist_1.Wordlist.register(langZhCn);\n wordlist_1.Wordlist.register(langZhCn, \"zh\");\n var langZhTw = new LangZh(\"tw\");\n exports3.langZhTw = langZhTw;\n wordlist_1.Wordlist.register(langZhTw);\n }\n });\n\n // ../../../node_modules/.pnpm/@ethersproject+wordlists@5.8.0/node_modules/@ethersproject/wordlists/lib/wordlists.js\n var require_wordlists = __commonJS({\n \"../../../node_modules/.pnpm/@ethersproject+wordlists@5.8.0/node_modules/@ethersproject/wordlists/lib/wordlists.js\"(exports3) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n Object.defineProperty(exports3, \"__esModule\", { value: true });\n exports3.wordlists = void 0;\n var lang_cz_1 = require_lang_cz();\n var lang_en_1 = require_lang_en();\n var lang_es_1 = require_lang_es();\n var lang_fr_1 = require_lang_fr();\n var lang_ja_1 = require_lang_ja();\n var lang_ko_1 = require_lang_ko();\n var lang_it_1 = require_lang_it();\n var lang_zh_1 = require_lang_zh();\n exports3.wordlists = {\n cz: lang_cz_1.langCz,\n en: lang_en_1.langEn,\n es: lang_es_1.langEs,\n fr: lang_fr_1.langFr,\n it: lang_it_1.langIt,\n ja: lang_ja_1.langJa,\n ko: lang_ko_1.langKo,\n zh: lang_zh_1.langZhCn,\n zh_cn: lang_zh_1.langZhCn,\n zh_tw: lang_zh_1.langZhTw\n };\n }\n });\n\n // ../../../node_modules/.pnpm/@ethersproject+wordlists@5.8.0/node_modules/@ethersproject/wordlists/lib/index.js\n var require_lib22 = __commonJS({\n \"../../../node_modules/.pnpm/@ethersproject+wordlists@5.8.0/node_modules/@ethersproject/wordlists/lib/index.js\"(exports3) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n Object.defineProperty(exports3, \"__esModule\", { value: true });\n exports3.wordlists = exports3.Wordlist = exports3.logger = void 0;\n var wordlist_1 = require_wordlist();\n Object.defineProperty(exports3, \"logger\", { enumerable: true, get: function() {\n return wordlist_1.logger;\n } });\n Object.defineProperty(exports3, \"Wordlist\", { enumerable: true, get: function() {\n return wordlist_1.Wordlist;\n } });\n var wordlists_1 = require_wordlists();\n Object.defineProperty(exports3, \"wordlists\", { enumerable: true, get: function() {\n return wordlists_1.wordlists;\n } });\n }\n });\n\n // ../../../node_modules/.pnpm/@ethersproject+hdnode@5.8.0/node_modules/@ethersproject/hdnode/lib/_version.js\n var require_version17 = __commonJS({\n \"../../../node_modules/.pnpm/@ethersproject+hdnode@5.8.0/node_modules/@ethersproject/hdnode/lib/_version.js\"(exports3) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n Object.defineProperty(exports3, \"__esModule\", { value: true });\n exports3.version = void 0;\n exports3.version = \"hdnode/5.8.0\";\n }\n });\n\n // ../../../node_modules/.pnpm/@ethersproject+hdnode@5.8.0/node_modules/@ethersproject/hdnode/lib/index.js\n var require_lib23 = __commonJS({\n \"../../../node_modules/.pnpm/@ethersproject+hdnode@5.8.0/node_modules/@ethersproject/hdnode/lib/index.js\"(exports3) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n Object.defineProperty(exports3, \"__esModule\", { value: true });\n exports3.getAccountPath = exports3.isValidMnemonic = exports3.entropyToMnemonic = exports3.mnemonicToEntropy = exports3.mnemonicToSeed = exports3.HDNode = exports3.defaultPath = void 0;\n var basex_1 = require_lib19();\n var bytes_1 = require_lib2();\n var bignumber_1 = require_lib3();\n var strings_1 = require_lib9();\n var pbkdf2_1 = require_lib21();\n var properties_1 = require_lib4();\n var signing_key_1 = require_lib16();\n var sha2_1 = require_lib20();\n var transactions_1 = require_lib17();\n var wordlists_1 = require_lib22();\n var logger_1 = require_lib();\n var _version_1 = require_version17();\n var logger = new logger_1.Logger(_version_1.version);\n var N4 = bignumber_1.BigNumber.from(\"0xfffffffffffffffffffffffffffffffebaaedce6af48a03bbfd25e8cd0364141\");\n var MasterSecret = (0, strings_1.toUtf8Bytes)(\"Bitcoin seed\");\n var HardenedBit = 2147483648;\n function getUpperMask(bits) {\n return (1 << bits) - 1 << 8 - bits;\n }\n function getLowerMask(bits) {\n return (1 << bits) - 1;\n }\n function bytes32(value) {\n return (0, bytes_1.hexZeroPad)((0, bytes_1.hexlify)(value), 32);\n }\n function base58check2(data) {\n return basex_1.Base58.encode((0, bytes_1.concat)([data, (0, bytes_1.hexDataSlice)((0, sha2_1.sha256)((0, sha2_1.sha256)(data)), 0, 4)]));\n }\n function getWordlist(wordlist) {\n if (wordlist == null) {\n return wordlists_1.wordlists[\"en\"];\n }\n if (typeof wordlist === \"string\") {\n var words = wordlists_1.wordlists[wordlist];\n if (words == null) {\n logger.throwArgumentError(\"unknown locale\", \"wordlist\", wordlist);\n }\n return words;\n }\n return wordlist;\n }\n var _constructorGuard = {};\n exports3.defaultPath = \"m/44'/60'/0'/0/0\";\n var HDNode = (\n /** @class */\n function() {\n function HDNode2(constructorGuard, privateKey, publicKey, parentFingerprint, chainCode, index2, depth, mnemonicOrPath) {\n if (constructorGuard !== _constructorGuard) {\n throw new Error(\"HDNode constructor cannot be called directly\");\n }\n if (privateKey) {\n var signingKey = new signing_key_1.SigningKey(privateKey);\n (0, properties_1.defineReadOnly)(this, \"privateKey\", signingKey.privateKey);\n (0, properties_1.defineReadOnly)(this, \"publicKey\", signingKey.compressedPublicKey);\n } else {\n (0, properties_1.defineReadOnly)(this, \"privateKey\", null);\n (0, properties_1.defineReadOnly)(this, \"publicKey\", (0, bytes_1.hexlify)(publicKey));\n }\n (0, properties_1.defineReadOnly)(this, \"parentFingerprint\", parentFingerprint);\n (0, properties_1.defineReadOnly)(this, \"fingerprint\", (0, bytes_1.hexDataSlice)((0, sha2_1.ripemd160)((0, sha2_1.sha256)(this.publicKey)), 0, 4));\n (0, properties_1.defineReadOnly)(this, \"address\", (0, transactions_1.computeAddress)(this.publicKey));\n (0, properties_1.defineReadOnly)(this, \"chainCode\", chainCode);\n (0, properties_1.defineReadOnly)(this, \"index\", index2);\n (0, properties_1.defineReadOnly)(this, \"depth\", depth);\n if (mnemonicOrPath == null) {\n (0, properties_1.defineReadOnly)(this, \"mnemonic\", null);\n (0, properties_1.defineReadOnly)(this, \"path\", null);\n } else if (typeof mnemonicOrPath === \"string\") {\n (0, properties_1.defineReadOnly)(this, \"mnemonic\", null);\n (0, properties_1.defineReadOnly)(this, \"path\", mnemonicOrPath);\n } else {\n (0, properties_1.defineReadOnly)(this, \"mnemonic\", mnemonicOrPath);\n (0, properties_1.defineReadOnly)(this, \"path\", mnemonicOrPath.path);\n }\n }\n Object.defineProperty(HDNode2.prototype, \"extendedKey\", {\n get: function() {\n if (this.depth >= 256) {\n throw new Error(\"Depth too large!\");\n }\n return base58check2((0, bytes_1.concat)([\n this.privateKey != null ? \"0x0488ADE4\" : \"0x0488B21E\",\n (0, bytes_1.hexlify)(this.depth),\n this.parentFingerprint,\n (0, bytes_1.hexZeroPad)((0, bytes_1.hexlify)(this.index), 4),\n this.chainCode,\n this.privateKey != null ? (0, bytes_1.concat)([\"0x00\", this.privateKey]) : this.publicKey\n ]));\n },\n enumerable: false,\n configurable: true\n });\n HDNode2.prototype.neuter = function() {\n return new HDNode2(_constructorGuard, null, this.publicKey, this.parentFingerprint, this.chainCode, this.index, this.depth, this.path);\n };\n HDNode2.prototype._derive = function(index2) {\n if (index2 > 4294967295) {\n throw new Error(\"invalid index - \" + String(index2));\n }\n var path = this.path;\n if (path) {\n path += \"/\" + (index2 & ~HardenedBit);\n }\n var data = new Uint8Array(37);\n if (index2 & HardenedBit) {\n if (!this.privateKey) {\n throw new Error(\"cannot derive child of neutered node\");\n }\n data.set((0, bytes_1.arrayify)(this.privateKey), 1);\n if (path) {\n path += \"'\";\n }\n } else {\n data.set((0, bytes_1.arrayify)(this.publicKey));\n }\n for (var i3 = 24; i3 >= 0; i3 -= 8) {\n data[33 + (i3 >> 3)] = index2 >> 24 - i3 & 255;\n }\n var I2 = (0, bytes_1.arrayify)((0, sha2_1.computeHmac)(sha2_1.SupportedAlgorithm.sha512, this.chainCode, data));\n var IL = I2.slice(0, 32);\n var IR = I2.slice(32);\n var ki = null;\n var Ki = null;\n if (this.privateKey) {\n ki = bytes32(bignumber_1.BigNumber.from(IL).add(this.privateKey).mod(N4));\n } else {\n var ek = new signing_key_1.SigningKey((0, bytes_1.hexlify)(IL));\n Ki = ek._addPoint(this.publicKey);\n }\n var mnemonicOrPath = path;\n var srcMnemonic = this.mnemonic;\n if (srcMnemonic) {\n mnemonicOrPath = Object.freeze({\n phrase: srcMnemonic.phrase,\n path,\n locale: srcMnemonic.locale || \"en\"\n });\n }\n return new HDNode2(_constructorGuard, ki, Ki, this.fingerprint, bytes32(IR), index2, this.depth + 1, mnemonicOrPath);\n };\n HDNode2.prototype.derivePath = function(path) {\n var components = path.split(\"/\");\n if (components.length === 0 || components[0] === \"m\" && this.depth !== 0) {\n throw new Error(\"invalid path - \" + path);\n }\n if (components[0] === \"m\") {\n components.shift();\n }\n var result = this;\n for (var i3 = 0; i3 < components.length; i3++) {\n var component = components[i3];\n if (component.match(/^[0-9]+'$/)) {\n var index2 = parseInt(component.substring(0, component.length - 1));\n if (index2 >= HardenedBit) {\n throw new Error(\"invalid path index - \" + component);\n }\n result = result._derive(HardenedBit + index2);\n } else if (component.match(/^[0-9]+$/)) {\n var index2 = parseInt(component);\n if (index2 >= HardenedBit) {\n throw new Error(\"invalid path index - \" + component);\n }\n result = result._derive(index2);\n } else {\n throw new Error(\"invalid path component - \" + component);\n }\n }\n return result;\n };\n HDNode2._fromSeed = function(seed, mnemonic) {\n var seedArray = (0, bytes_1.arrayify)(seed);\n if (seedArray.length < 16 || seedArray.length > 64) {\n throw new Error(\"invalid seed\");\n }\n var I2 = (0, bytes_1.arrayify)((0, sha2_1.computeHmac)(sha2_1.SupportedAlgorithm.sha512, MasterSecret, seedArray));\n return new HDNode2(_constructorGuard, bytes32(I2.slice(0, 32)), null, \"0x00000000\", bytes32(I2.slice(32)), 0, 0, mnemonic);\n };\n HDNode2.fromMnemonic = function(mnemonic, password, wordlist) {\n wordlist = getWordlist(wordlist);\n mnemonic = entropyToMnemonic(mnemonicToEntropy(mnemonic, wordlist), wordlist);\n return HDNode2._fromSeed(mnemonicToSeed(mnemonic, password), {\n phrase: mnemonic,\n path: \"m\",\n locale: wordlist.locale\n });\n };\n HDNode2.fromSeed = function(seed) {\n return HDNode2._fromSeed(seed, null);\n };\n HDNode2.fromExtendedKey = function(extendedKey) {\n var bytes = basex_1.Base58.decode(extendedKey);\n if (bytes.length !== 82 || base58check2(bytes.slice(0, 78)) !== extendedKey) {\n logger.throwArgumentError(\"invalid extended key\", \"extendedKey\", \"[REDACTED]\");\n }\n var depth = bytes[4];\n var parentFingerprint = (0, bytes_1.hexlify)(bytes.slice(5, 9));\n var index2 = parseInt((0, bytes_1.hexlify)(bytes.slice(9, 13)).substring(2), 16);\n var chainCode = (0, bytes_1.hexlify)(bytes.slice(13, 45));\n var key = bytes.slice(45, 78);\n switch ((0, bytes_1.hexlify)(bytes.slice(0, 4))) {\n case \"0x0488b21e\":\n case \"0x043587cf\":\n return new HDNode2(_constructorGuard, null, (0, bytes_1.hexlify)(key), parentFingerprint, chainCode, index2, depth, null);\n case \"0x0488ade4\":\n case \"0x04358394 \":\n if (key[0] !== 0) {\n break;\n }\n return new HDNode2(_constructorGuard, (0, bytes_1.hexlify)(key.slice(1)), null, parentFingerprint, chainCode, index2, depth, null);\n }\n return logger.throwArgumentError(\"invalid extended key\", \"extendedKey\", \"[REDACTED]\");\n };\n return HDNode2;\n }()\n );\n exports3.HDNode = HDNode;\n function mnemonicToSeed(mnemonic, password) {\n if (!password) {\n password = \"\";\n }\n var salt = (0, strings_1.toUtf8Bytes)(\"mnemonic\" + password, strings_1.UnicodeNormalizationForm.NFKD);\n return (0, pbkdf2_1.pbkdf2)((0, strings_1.toUtf8Bytes)(mnemonic, strings_1.UnicodeNormalizationForm.NFKD), salt, 2048, 64, \"sha512\");\n }\n exports3.mnemonicToSeed = mnemonicToSeed;\n function mnemonicToEntropy(mnemonic, wordlist) {\n wordlist = getWordlist(wordlist);\n logger.checkNormalize();\n var words = wordlist.split(mnemonic);\n if (words.length % 3 !== 0) {\n throw new Error(\"invalid mnemonic\");\n }\n var entropy = (0, bytes_1.arrayify)(new Uint8Array(Math.ceil(11 * words.length / 8)));\n var offset = 0;\n for (var i3 = 0; i3 < words.length; i3++) {\n var index2 = wordlist.getWordIndex(words[i3].normalize(\"NFKD\"));\n if (index2 === -1) {\n throw new Error(\"invalid mnemonic\");\n }\n for (var bit = 0; bit < 11; bit++) {\n if (index2 & 1 << 10 - bit) {\n entropy[offset >> 3] |= 1 << 7 - offset % 8;\n }\n offset++;\n }\n }\n var entropyBits = 32 * words.length / 3;\n var checksumBits = words.length / 3;\n var checksumMask = getUpperMask(checksumBits);\n var checksum4 = (0, bytes_1.arrayify)((0, sha2_1.sha256)(entropy.slice(0, entropyBits / 8)))[0] & checksumMask;\n if (checksum4 !== (entropy[entropy.length - 1] & checksumMask)) {\n throw new Error(\"invalid checksum\");\n }\n return (0, bytes_1.hexlify)(entropy.slice(0, entropyBits / 8));\n }\n exports3.mnemonicToEntropy = mnemonicToEntropy;\n function entropyToMnemonic(entropy, wordlist) {\n wordlist = getWordlist(wordlist);\n entropy = (0, bytes_1.arrayify)(entropy);\n if (entropy.length % 4 !== 0 || entropy.length < 16 || entropy.length > 32) {\n throw new Error(\"invalid entropy\");\n }\n var indices = [0];\n var remainingBits = 11;\n for (var i3 = 0; i3 < entropy.length; i3++) {\n if (remainingBits > 8) {\n indices[indices.length - 1] <<= 8;\n indices[indices.length - 1] |= entropy[i3];\n remainingBits -= 8;\n } else {\n indices[indices.length - 1] <<= remainingBits;\n indices[indices.length - 1] |= entropy[i3] >> 8 - remainingBits;\n indices.push(entropy[i3] & getLowerMask(8 - remainingBits));\n remainingBits += 3;\n }\n }\n var checksumBits = entropy.length / 4;\n var checksum4 = (0, bytes_1.arrayify)((0, sha2_1.sha256)(entropy))[0] & getUpperMask(checksumBits);\n indices[indices.length - 1] <<= checksumBits;\n indices[indices.length - 1] |= checksum4 >> 8 - checksumBits;\n return wordlist.join(indices.map(function(index2) {\n return wordlist.getWord(index2);\n }));\n }\n exports3.entropyToMnemonic = entropyToMnemonic;\n function isValidMnemonic(mnemonic, wordlist) {\n try {\n mnemonicToEntropy(mnemonic, wordlist);\n return true;\n } catch (error) {\n }\n return false;\n }\n exports3.isValidMnemonic = isValidMnemonic;\n function getAccountPath(index2) {\n if (typeof index2 !== \"number\" || index2 < 0 || index2 >= HardenedBit || index2 % 1) {\n logger.throwArgumentError(\"invalid account index\", \"index\", index2);\n }\n return \"m/44'/60'/\" + index2 + \"'/0/0\";\n }\n exports3.getAccountPath = getAccountPath;\n }\n });\n\n // ../../../node_modules/.pnpm/@ethersproject+random@5.8.0/node_modules/@ethersproject/random/lib/_version.js\n var require_version18 = __commonJS({\n \"../../../node_modules/.pnpm/@ethersproject+random@5.8.0/node_modules/@ethersproject/random/lib/_version.js\"(exports3) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n Object.defineProperty(exports3, \"__esModule\", { value: true });\n exports3.version = void 0;\n exports3.version = \"random/5.8.0\";\n }\n });\n\n // ../../../node_modules/.pnpm/@ethersproject+random@5.8.0/node_modules/@ethersproject/random/lib/browser-random.js\n var require_browser_random = __commonJS({\n \"../../../node_modules/.pnpm/@ethersproject+random@5.8.0/node_modules/@ethersproject/random/lib/browser-random.js\"(exports3) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n Object.defineProperty(exports3, \"__esModule\", { value: true });\n exports3.randomBytes = void 0;\n var bytes_1 = require_lib2();\n var logger_1 = require_lib();\n var _version_1 = require_version18();\n var logger = new logger_1.Logger(_version_1.version);\n function getGlobal() {\n if (typeof self !== \"undefined\") {\n return self;\n }\n if (typeof window !== \"undefined\") {\n return window;\n }\n if (typeof global !== \"undefined\") {\n return global;\n }\n throw new Error(\"unable to locate global object\");\n }\n var anyGlobal = getGlobal();\n var crypto3 = anyGlobal.crypto || anyGlobal.msCrypto;\n if (!crypto3 || !crypto3.getRandomValues) {\n logger.warn(\"WARNING: Missing strong random number source\");\n crypto3 = {\n getRandomValues: function(buffer2) {\n return logger.throwError(\"no secure random source avaialble\", logger_1.Logger.errors.UNSUPPORTED_OPERATION, {\n operation: \"crypto.getRandomValues\"\n });\n }\n };\n }\n function randomBytes2(length2) {\n if (length2 <= 0 || length2 > 1024 || length2 % 1 || length2 != length2) {\n logger.throwArgumentError(\"invalid length\", \"length\", length2);\n }\n var result = new Uint8Array(length2);\n crypto3.getRandomValues(result);\n return (0, bytes_1.arrayify)(result);\n }\n exports3.randomBytes = randomBytes2;\n }\n });\n\n // ../../../node_modules/.pnpm/@ethersproject+random@5.8.0/node_modules/@ethersproject/random/lib/shuffle.js\n var require_shuffle = __commonJS({\n \"../../../node_modules/.pnpm/@ethersproject+random@5.8.0/node_modules/@ethersproject/random/lib/shuffle.js\"(exports3) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n Object.defineProperty(exports3, \"__esModule\", { value: true });\n exports3.shuffled = void 0;\n function shuffled(array2) {\n array2 = array2.slice();\n for (var i3 = array2.length - 1; i3 > 0; i3--) {\n var j2 = Math.floor(Math.random() * (i3 + 1));\n var tmp = array2[i3];\n array2[i3] = array2[j2];\n array2[j2] = tmp;\n }\n return array2;\n }\n exports3.shuffled = shuffled;\n }\n });\n\n // ../../../node_modules/.pnpm/@ethersproject+random@5.8.0/node_modules/@ethersproject/random/lib/index.js\n var require_lib24 = __commonJS({\n \"../../../node_modules/.pnpm/@ethersproject+random@5.8.0/node_modules/@ethersproject/random/lib/index.js\"(exports3) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n Object.defineProperty(exports3, \"__esModule\", { value: true });\n exports3.shuffled = exports3.randomBytes = void 0;\n var random_1 = require_browser_random();\n Object.defineProperty(exports3, \"randomBytes\", { enumerable: true, get: function() {\n return random_1.randomBytes;\n } });\n var shuffle_1 = require_shuffle();\n Object.defineProperty(exports3, \"shuffled\", { enumerable: true, get: function() {\n return shuffle_1.shuffled;\n } });\n }\n });\n\n // ../../../node_modules/.pnpm/aes-js@3.0.0/node_modules/aes-js/index.js\n var require_aes_js = __commonJS({\n \"../../../node_modules/.pnpm/aes-js@3.0.0/node_modules/aes-js/index.js\"(exports3, module) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n (function(root) {\n function checkInt(value) {\n return parseInt(value) === value;\n }\n function checkInts(arrayish) {\n if (!checkInt(arrayish.length)) {\n return false;\n }\n for (var i3 = 0; i3 < arrayish.length; i3++) {\n if (!checkInt(arrayish[i3]) || arrayish[i3] < 0 || arrayish[i3] > 255) {\n return false;\n }\n }\n return true;\n }\n function coerceArray(arg, copy) {\n if (arg.buffer && ArrayBuffer.isView(arg) && arg.name === \"Uint8Array\") {\n if (copy) {\n if (arg.slice) {\n arg = arg.slice();\n } else {\n arg = Array.prototype.slice.call(arg);\n }\n }\n return arg;\n }\n if (Array.isArray(arg)) {\n if (!checkInts(arg)) {\n throw new Error(\"Array contains invalid value: \" + arg);\n }\n return new Uint8Array(arg);\n }\n if (checkInt(arg.length) && checkInts(arg)) {\n return new Uint8Array(arg);\n }\n throw new Error(\"unsupported array-like object\");\n }\n function createArray(length2) {\n return new Uint8Array(length2);\n }\n function copyArray(sourceArray, targetArray, targetStart, sourceStart, sourceEnd) {\n if (sourceStart != null || sourceEnd != null) {\n if (sourceArray.slice) {\n sourceArray = sourceArray.slice(sourceStart, sourceEnd);\n } else {\n sourceArray = Array.prototype.slice.call(sourceArray, sourceStart, sourceEnd);\n }\n }\n targetArray.set(sourceArray, targetStart);\n }\n var convertUtf8 = /* @__PURE__ */ function() {\n function toBytes5(text) {\n var result = [], i3 = 0;\n text = encodeURI(text);\n while (i3 < text.length) {\n var c4 = text.charCodeAt(i3++);\n if (c4 === 37) {\n result.push(parseInt(text.substr(i3, 2), 16));\n i3 += 2;\n } else {\n result.push(c4);\n }\n }\n return coerceArray(result);\n }\n function fromBytes5(bytes) {\n var result = [], i3 = 0;\n while (i3 < bytes.length) {\n var c4 = bytes[i3];\n if (c4 < 128) {\n result.push(String.fromCharCode(c4));\n i3++;\n } else if (c4 > 191 && c4 < 224) {\n result.push(String.fromCharCode((c4 & 31) << 6 | bytes[i3 + 1] & 63));\n i3 += 2;\n } else {\n result.push(String.fromCharCode((c4 & 15) << 12 | (bytes[i3 + 1] & 63) << 6 | bytes[i3 + 2] & 63));\n i3 += 3;\n }\n }\n return result.join(\"\");\n }\n return {\n toBytes: toBytes5,\n fromBytes: fromBytes5\n };\n }();\n var convertHex = /* @__PURE__ */ function() {\n function toBytes5(text) {\n var result = [];\n for (var i3 = 0; i3 < text.length; i3 += 2) {\n result.push(parseInt(text.substr(i3, 2), 16));\n }\n return result;\n }\n var Hex2 = \"0123456789abcdef\";\n function fromBytes5(bytes) {\n var result = [];\n for (var i3 = 0; i3 < bytes.length; i3++) {\n var v2 = bytes[i3];\n result.push(Hex2[(v2 & 240) >> 4] + Hex2[v2 & 15]);\n }\n return result.join(\"\");\n }\n return {\n toBytes: toBytes5,\n fromBytes: fromBytes5\n };\n }();\n var numberOfRounds = { 16: 10, 24: 12, 32: 14 };\n var rcon = [1, 2, 4, 8, 16, 32, 64, 128, 27, 54, 108, 216, 171, 77, 154, 47, 94, 188, 99, 198, 151, 53, 106, 212, 179, 125, 250, 239, 197, 145];\n var S3 = [99, 124, 119, 123, 242, 107, 111, 197, 48, 1, 103, 43, 254, 215, 171, 118, 202, 130, 201, 125, 250, 89, 71, 240, 173, 212, 162, 175, 156, 164, 114, 192, 183, 253, 147, 38, 54, 63, 247, 204, 52, 165, 229, 241, 113, 216, 49, 21, 4, 199, 35, 195, 24, 150, 5, 154, 7, 18, 128, 226, 235, 39, 178, 117, 9, 131, 44, 26, 27, 110, 90, 160, 82, 59, 214, 179, 41, 227, 47, 132, 83, 209, 0, 237, 32, 252, 177, 91, 106, 203, 190, 57, 74, 76, 88, 207, 208, 239, 170, 251, 67, 77, 51, 133, 69, 249, 2, 127, 80, 60, 159, 168, 81, 163, 64, 143, 146, 157, 56, 245, 188, 182, 218, 33, 16, 255, 243, 210, 205, 12, 19, 236, 95, 151, 68, 23, 196, 167, 126, 61, 100, 93, 25, 115, 96, 129, 79, 220, 34, 42, 144, 136, 70, 238, 184, 20, 222, 94, 11, 219, 224, 50, 58, 10, 73, 6, 36, 92, 194, 211, 172, 98, 145, 149, 228, 121, 231, 200, 55, 109, 141, 213, 78, 169, 108, 86, 244, 234, 101, 122, 174, 8, 186, 120, 37, 46, 28, 166, 180, 198, 232, 221, 116, 31, 75, 189, 139, 138, 112, 62, 181, 102, 72, 3, 246, 14, 97, 53, 87, 185, 134, 193, 29, 158, 225, 248, 152, 17, 105, 217, 142, 148, 155, 30, 135, 233, 206, 85, 40, 223, 140, 161, 137, 13, 191, 230, 66, 104, 65, 153, 45, 15, 176, 84, 187, 22];\n var Si = [82, 9, 106, 213, 48, 54, 165, 56, 191, 64, 163, 158, 129, 243, 215, 251, 124, 227, 57, 130, 155, 47, 255, 135, 52, 142, 67, 68, 196, 222, 233, 203, 84, 123, 148, 50, 166, 194, 35, 61, 238, 76, 149, 11, 66, 250, 195, 78, 8, 46, 161, 102, 40, 217, 36, 178, 118, 91, 162, 73, 109, 139, 209, 37, 114, 248, 246, 100, 134, 104, 152, 22, 212, 164, 92, 204, 93, 101, 182, 146, 108, 112, 72, 80, 253, 237, 185, 218, 94, 21, 70, 87, 167, 141, 157, 132, 144, 216, 171, 0, 140, 188, 211, 10, 247, 228, 88, 5, 184, 179, 69, 6, 208, 44, 30, 143, 202, 63, 15, 2, 193, 175, 189, 3, 1, 19, 138, 107, 58, 145, 17, 65, 79, 103, 220, 234, 151, 242, 207, 206, 240, 180, 230, 115, 150, 172, 116, 34, 231, 173, 53, 133, 226, 249, 55, 232, 28, 117, 223, 110, 71, 241, 26, 113, 29, 41, 197, 137, 111, 183, 98, 14, 170, 24, 190, 27, 252, 86, 62, 75, 198, 210, 121, 32, 154, 219, 192, 254, 120, 205, 90, 244, 31, 221, 168, 51, 136, 7, 199, 49, 177, 18, 16, 89, 39, 128, 236, 95, 96, 81, 127, 169, 25, 181, 74, 13, 45, 229, 122, 159, 147, 201, 156, 239, 160, 224, 59, 77, 174, 42, 245, 176, 200, 235, 187, 60, 131, 83, 153, 97, 23, 43, 4, 126, 186, 119, 214, 38, 225, 105, 20, 99, 85, 33, 12, 125];\n var T1 = [3328402341, 4168907908, 4000806809, 4135287693, 4294111757, 3597364157, 3731845041, 2445657428, 1613770832, 33620227, 3462883241, 1445669757, 3892248089, 3050821474, 1303096294, 3967186586, 2412431941, 528646813, 2311702848, 4202528135, 4026202645, 2992200171, 2387036105, 4226871307, 1101901292, 3017069671, 1604494077, 1169141738, 597466303, 1403299063, 3832705686, 2613100635, 1974974402, 3791519004, 1033081774, 1277568618, 1815492186, 2118074177, 4126668546, 2211236943, 1748251740, 1369810420, 3521504564, 4193382664, 3799085459, 2883115123, 1647391059, 706024767, 134480908, 2512897874, 1176707941, 2646852446, 806885416, 932615841, 168101135, 798661301, 235341577, 605164086, 461406363, 3756188221, 3454790438, 1311188841, 2142417613, 3933566367, 302582043, 495158174, 1479289972, 874125870, 907746093, 3698224818, 3025820398, 1537253627, 2756858614, 1983593293, 3084310113, 2108928974, 1378429307, 3722699582, 1580150641, 327451799, 2790478837, 3117535592, 0, 3253595436, 1075847264, 3825007647, 2041688520, 3059440621, 3563743934, 2378943302, 1740553945, 1916352843, 2487896798, 2555137236, 2958579944, 2244988746, 3151024235, 3320835882, 1336584933, 3992714006, 2252555205, 2588757463, 1714631509, 293963156, 2319795663, 3925473552, 67240454, 4269768577, 2689618160, 2017213508, 631218106, 1269344483, 2723238387, 1571005438, 2151694528, 93294474, 1066570413, 563977660, 1882732616, 4059428100, 1673313503, 2008463041, 2950355573, 1109467491, 537923632, 3858759450, 4260623118, 3218264685, 2177748300, 403442708, 638784309, 3287084079, 3193921505, 899127202, 2286175436, 773265209, 2479146071, 1437050866, 4236148354, 2050833735, 3362022572, 3126681063, 840505643, 3866325909, 3227541664, 427917720, 2655997905, 2749160575, 1143087718, 1412049534, 999329963, 193497219, 2353415882, 3354324521, 1807268051, 672404540, 2816401017, 3160301282, 369822493, 2916866934, 3688947771, 1681011286, 1949973070, 336202270, 2454276571, 201721354, 1210328172, 3093060836, 2680341085, 3184776046, 1135389935, 3294782118, 965841320, 831886756, 3554993207, 4068047243, 3588745010, 2345191491, 1849112409, 3664604599, 26054028, 2983581028, 2622377682, 1235855840, 3630984372, 2891339514, 4092916743, 3488279077, 3395642799, 4101667470, 1202630377, 268961816, 1874508501, 4034427016, 1243948399, 1546530418, 941366308, 1470539505, 1941222599, 2546386513, 3421038627, 2715671932, 3899946140, 1042226977, 2521517021, 1639824860, 227249030, 260737669, 3765465232, 2084453954, 1907733956, 3429263018, 2420656344, 100860677, 4160157185, 470683154, 3261161891, 1781871967, 2924959737, 1773779408, 394692241, 2579611992, 974986535, 664706745, 3655459128, 3958962195, 731420851, 571543859, 3530123707, 2849626480, 126783113, 865375399, 765172662, 1008606754, 361203602, 3387549984, 2278477385, 2857719295, 1344809080, 2782912378, 59542671, 1503764984, 160008576, 437062935, 1707065306, 3622233649, 2218934982, 3496503480, 2185314755, 697932208, 1512910199, 504303377, 2075177163, 2824099068, 1841019862, 739644986];\n var T22 = [2781242211, 2230877308, 2582542199, 2381740923, 234877682, 3184946027, 2984144751, 1418839493, 1348481072, 50462977, 2848876391, 2102799147, 434634494, 1656084439, 3863849899, 2599188086, 1167051466, 2636087938, 1082771913, 2281340285, 368048890, 3954334041, 3381544775, 201060592, 3963727277, 1739838676, 4250903202, 3930435503, 3206782108, 4149453988, 2531553906, 1536934080, 3262494647, 484572669, 2923271059, 1783375398, 1517041206, 1098792767, 49674231, 1334037708, 1550332980, 4098991525, 886171109, 150598129, 2481090929, 1940642008, 1398944049, 1059722517, 201851908, 1385547719, 1699095331, 1587397571, 674240536, 2704774806, 252314885, 3039795866, 151914247, 908333586, 2602270848, 1038082786, 651029483, 1766729511, 3447698098, 2682942837, 454166793, 2652734339, 1951935532, 775166490, 758520603, 3000790638, 4004797018, 4217086112, 4137964114, 1299594043, 1639438038, 3464344499, 2068982057, 1054729187, 1901997871, 2534638724, 4121318227, 1757008337, 0, 750906861, 1614815264, 535035132, 3363418545, 3988151131, 3201591914, 1183697867, 3647454910, 1265776953, 3734260298, 3566750796, 3903871064, 1250283471, 1807470800, 717615087, 3847203498, 384695291, 3313910595, 3617213773, 1432761139, 2484176261, 3481945413, 283769337, 100925954, 2180939647, 4037038160, 1148730428, 3123027871, 3813386408, 4087501137, 4267549603, 3229630528, 2315620239, 2906624658, 3156319645, 1215313976, 82966005, 3747855548, 3245848246, 1974459098, 1665278241, 807407632, 451280895, 251524083, 1841287890, 1283575245, 337120268, 891687699, 801369324, 3787349855, 2721421207, 3431482436, 959321879, 1469301956, 4065699751, 2197585534, 1199193405, 2898814052, 3887750493, 724703513, 2514908019, 2696962144, 2551808385, 3516813135, 2141445340, 1715741218, 2119445034, 2872807568, 2198571144, 3398190662, 700968686, 3547052216, 1009259540, 2041044702, 3803995742, 487983883, 1991105499, 1004265696, 1449407026, 1316239930, 504629770, 3683797321, 168560134, 1816667172, 3837287516, 1570751170, 1857934291, 4014189740, 2797888098, 2822345105, 2754712981, 936633572, 2347923833, 852879335, 1133234376, 1500395319, 3084545389, 2348912013, 1689376213, 3533459022, 3762923945, 3034082412, 4205598294, 133428468, 634383082, 2949277029, 2398386810, 3913789102, 403703816, 3580869306, 2297460856, 1867130149, 1918643758, 607656988, 4049053350, 3346248884, 1368901318, 600565992, 2090982877, 2632479860, 557719327, 3717614411, 3697393085, 2249034635, 2232388234, 2430627952, 1115438654, 3295786421, 2865522278, 3633334344, 84280067, 33027830, 303828494, 2747425121, 1600795957, 4188952407, 3496589753, 2434238086, 1486471617, 658119965, 3106381470, 953803233, 334231800, 3005978776, 857870609, 3151128937, 1890179545, 2298973838, 2805175444, 3056442267, 574365214, 2450884487, 550103529, 1233637070, 4289353045, 2018519080, 2057691103, 2399374476, 4166623649, 2148108681, 387583245, 3664101311, 836232934, 3330556482, 3100665960, 3280093505, 2955516313, 2002398509, 287182607, 3413881008, 4238890068, 3597515707, 975967766];\n var T32 = [1671808611, 2089089148, 2006576759, 2072901243, 4061003762, 1807603307, 1873927791, 3310653893, 810573872, 16974337, 1739181671, 729634347, 4263110654, 3613570519, 2883997099, 1989864566, 3393556426, 2191335298, 3376449993, 2106063485, 4195741690, 1508618841, 1204391495, 4027317232, 2917941677, 3563566036, 2734514082, 2951366063, 2629772188, 2767672228, 1922491506, 3227229120, 3082974647, 4246528509, 2477669779, 644500518, 911895606, 1061256767, 4144166391, 3427763148, 878471220, 2784252325, 3845444069, 4043897329, 1905517169, 3631459288, 827548209, 356461077, 67897348, 3344078279, 593839651, 3277757891, 405286936, 2527147926, 84871685, 2595565466, 118033927, 305538066, 2157648768, 3795705826, 3945188843, 661212711, 2999812018, 1973414517, 152769033, 2208177539, 745822252, 439235610, 455947803, 1857215598, 1525593178, 2700827552, 1391895634, 994932283, 3596728278, 3016654259, 695947817, 3812548067, 795958831, 2224493444, 1408607827, 3513301457, 0, 3979133421, 543178784, 4229948412, 2982705585, 1542305371, 1790891114, 3410398667, 3201918910, 961245753, 1256100938, 1289001036, 1491644504, 3477767631, 3496721360, 4012557807, 2867154858, 4212583931, 1137018435, 1305975373, 861234739, 2241073541, 1171229253, 4178635257, 33948674, 2139225727, 1357946960, 1011120188, 2679776671, 2833468328, 1374921297, 2751356323, 1086357568, 2408187279, 2460827538, 2646352285, 944271416, 4110742005, 3168756668, 3066132406, 3665145818, 560153121, 271589392, 4279952895, 4077846003, 3530407890, 3444343245, 202643468, 322250259, 3962553324, 1608629855, 2543990167, 1154254916, 389623319, 3294073796, 2817676711, 2122513534, 1028094525, 1689045092, 1575467613, 422261273, 1939203699, 1621147744, 2174228865, 1339137615, 3699352540, 577127458, 712922154, 2427141008, 2290289544, 1187679302, 3995715566, 3100863416, 339486740, 3732514782, 1591917662, 186455563, 3681988059, 3762019296, 844522546, 978220090, 169743370, 1239126601, 101321734, 611076132, 1558493276, 3260915650, 3547250131, 2901361580, 1655096418, 2443721105, 2510565781, 3828863972, 2039214713, 3878868455, 3359869896, 928607799, 1840765549, 2374762893, 3580146133, 1322425422, 2850048425, 1823791212, 1459268694, 4094161908, 3928346602, 1706019429, 2056189050, 2934523822, 135794696, 3134549946, 2022240376, 628050469, 779246638, 472135708, 2800834470, 3032970164, 3327236038, 3894660072, 3715932637, 1956440180, 522272287, 1272813131, 3185336765, 2340818315, 2323976074, 1888542832, 1044544574, 3049550261, 1722469478, 1222152264, 50660867, 4127324150, 236067854, 1638122081, 895445557, 1475980887, 3117443513, 2257655686, 3243809217, 489110045, 2662934430, 3778599393, 4162055160, 2561878936, 288563729, 1773916777, 3648039385, 2391345038, 2493985684, 2612407707, 505560094, 2274497927, 3911240169, 3460925390, 1442818645, 678973480, 3749357023, 2358182796, 2717407649, 2306869641, 219617805, 3218761151, 3862026214, 1120306242, 1756942440, 1103331905, 2578459033, 762796589, 252780047, 2966125488, 1425844308, 3151392187, 372911126];\n var T4 = [1667474886, 2088535288, 2004326894, 2071694838, 4075949567, 1802223062, 1869591006, 3318043793, 808472672, 16843522, 1734846926, 724270422, 4278065639, 3621216949, 2880169549, 1987484396, 3402253711, 2189597983, 3385409673, 2105378810, 4210693615, 1499065266, 1195886990, 4042263547, 2913856577, 3570689971, 2728590687, 2947541573, 2627518243, 2762274643, 1920112356, 3233831835, 3082273397, 4261223649, 2475929149, 640051788, 909531756, 1061110142, 4160160501, 3435941763, 875846760, 2779116625, 3857003729, 4059105529, 1903268834, 3638064043, 825316194, 353713962, 67374088, 3351728789, 589522246, 3284360861, 404236336, 2526454071, 84217610, 2593830191, 117901582, 303183396, 2155911963, 3806477791, 3958056653, 656894286, 2998062463, 1970642922, 151591698, 2206440989, 741110872, 437923380, 454765878, 1852748508, 1515908788, 2694904667, 1381168804, 993742198, 3604373943, 3014905469, 690584402, 3823320797, 791638366, 2223281939, 1398011302, 3520161977, 0, 3991743681, 538992704, 4244381667, 2981218425, 1532751286, 1785380564, 3419096717, 3200178535, 960056178, 1246420628, 1280103576, 1482221744, 3486468741, 3503319995, 4025428677, 2863326543, 4227536621, 1128514950, 1296947098, 859002214, 2240123921, 1162203018, 4193849577, 33687044, 2139062782, 1347481760, 1010582648, 2678045221, 2829640523, 1364325282, 2745433693, 1077985408, 2408548869, 2459086143, 2644360225, 943212656, 4126475505, 3166494563, 3065430391, 3671750063, 555836226, 269496352, 4294908645, 4092792573, 3537006015, 3452783745, 202118168, 320025894, 3974901699, 1600119230, 2543297077, 1145359496, 387397934, 3301201811, 2812801621, 2122220284, 1027426170, 1684319432, 1566435258, 421079858, 1936954854, 1616945344, 2172753945, 1330631070, 3705438115, 572679748, 707427924, 2425400123, 2290647819, 1179044492, 4008585671, 3099120491, 336870440, 3739122087, 1583276732, 185277718, 3688593069, 3772791771, 842159716, 976899700, 168435220, 1229577106, 101059084, 606366792, 1549591736, 3267517855, 3553849021, 2897014595, 1650632388, 2442242105, 2509612081, 3840161747, 2038008818, 3890688725, 3368567691, 926374254, 1835907034, 2374863873, 3587531953, 1313788572, 2846482505, 1819063512, 1448540844, 4109633523, 3941213647, 1701162954, 2054852340, 2930698567, 134748176, 3132806511, 2021165296, 623210314, 774795868, 471606328, 2795958615, 3031746419, 3334885783, 3907527627, 3722280097, 1953799400, 522133822, 1263263126, 3183336545, 2341176845, 2324333839, 1886425312, 1044267644, 3048588401, 1718004428, 1212733584, 50529542, 4143317495, 235803164, 1633788866, 892690282, 1465383342, 3115962473, 2256965911, 3250673817, 488449850, 2661202215, 3789633753, 4177007595, 2560144171, 286339874, 1768537042, 3654906025, 2391705863, 2492770099, 2610673197, 505291324, 2273808917, 3924369609, 3469625735, 1431699370, 673740880, 3755965093, 2358021891, 2711746649, 2307489801, 218961690, 3217021541, 3873845719, 1111672452, 1751693520, 1094828930, 2576986153, 757954394, 252645662, 2964376443, 1414855848, 3149649517, 370555436];\n var T5 = [1374988112, 2118214995, 437757123, 975658646, 1001089995, 530400753, 2902087851, 1273168787, 540080725, 2910219766, 2295101073, 4110568485, 1340463100, 3307916247, 641025152, 3043140495, 3736164937, 632953703, 1172967064, 1576976609, 3274667266, 2169303058, 2370213795, 1809054150, 59727847, 361929877, 3211623147, 2505202138, 3569255213, 1484005843, 1239443753, 2395588676, 1975683434, 4102977912, 2572697195, 666464733, 3202437046, 4035489047, 3374361702, 2110667444, 1675577880, 3843699074, 2538681184, 1649639237, 2976151520, 3144396420, 4269907996, 4178062228, 1883793496, 2403728665, 2497604743, 1383856311, 2876494627, 1917518562, 3810496343, 1716890410, 3001755655, 800440835, 2261089178, 3543599269, 807962610, 599762354, 33778362, 3977675356, 2328828971, 2809771154, 4077384432, 1315562145, 1708848333, 101039829, 3509871135, 3299278474, 875451293, 2733856160, 92987698, 2767645557, 193195065, 1080094634, 1584504582, 3178106961, 1042385657, 2531067453, 3711829422, 1306967366, 2438237621, 1908694277, 67556463, 1615861247, 429456164, 3602770327, 2302690252, 1742315127, 2968011453, 126454664, 3877198648, 2043211483, 2709260871, 2084704233, 4169408201, 0, 159417987, 841739592, 504459436, 1817866830, 4245618683, 260388950, 1034867998, 908933415, 168810852, 1750902305, 2606453969, 607530554, 202008497, 2472011535, 3035535058, 463180190, 2160117071, 1641816226, 1517767529, 470948374, 3801332234, 3231722213, 1008918595, 303765277, 235474187, 4069246893, 766945465, 337553864, 1475418501, 2943682380, 4003061179, 2743034109, 4144047775, 1551037884, 1147550661, 1543208500, 2336434550, 3408119516, 3069049960, 3102011747, 3610369226, 1113818384, 328671808, 2227573024, 2236228733, 3535486456, 2935566865, 3341394285, 496906059, 3702665459, 226906860, 2009195472, 733156972, 2842737049, 294930682, 1206477858, 2835123396, 2700099354, 1451044056, 573804783, 2269728455, 3644379585, 2362090238, 2564033334, 2801107407, 2776292904, 3669462566, 1068351396, 742039012, 1350078989, 1784663195, 1417561698, 4136440770, 2430122216, 775550814, 2193862645, 2673705150, 1775276924, 1876241833, 3475313331, 3366754619, 270040487, 3902563182, 3678124923, 3441850377, 1851332852, 3969562369, 2203032232, 3868552805, 2868897406, 566021896, 4011190502, 3135740889, 1248802510, 3936291284, 699432150, 832877231, 708780849, 3332740144, 899835584, 1951317047, 4236429990, 3767586992, 866637845, 4043610186, 1106041591, 2144161806, 395441711, 1984812685, 1139781709, 3433712980, 3835036895, 2664543715, 1282050075, 3240894392, 1181045119, 2640243204, 25965917, 4203181171, 4211818798, 3009879386, 2463879762, 3910161971, 1842759443, 2597806476, 933301370, 1509430414, 3943906441, 3467192302, 3076639029, 3776767469, 2051518780, 2631065433, 1441952575, 404016761, 1942435775, 1408749034, 1610459739, 3745345300, 2017778566, 3400528769, 3110650942, 941896748, 3265478751, 371049330, 3168937228, 675039627, 4279080257, 967311729, 135050206, 3635733660, 1683407248, 2076935265, 3576870512, 1215061108, 3501741890];\n var T6 = [1347548327, 1400783205, 3273267108, 2520393566, 3409685355, 4045380933, 2880240216, 2471224067, 1428173050, 4138563181, 2441661558, 636813900, 4233094615, 3620022987, 2149987652, 2411029155, 1239331162, 1730525723, 2554718734, 3781033664, 46346101, 310463728, 2743944855, 3328955385, 3875770207, 2501218972, 3955191162, 3667219033, 768917123, 3545789473, 692707433, 1150208456, 1786102409, 2029293177, 1805211710, 3710368113, 3065962831, 401639597, 1724457132, 3028143674, 409198410, 2196052529, 1620529459, 1164071807, 3769721975, 2226875310, 486441376, 2499348523, 1483753576, 428819965, 2274680428, 3075636216, 598438867, 3799141122, 1474502543, 711349675, 129166120, 53458370, 2592523643, 2782082824, 4063242375, 2988687269, 3120694122, 1559041666, 730517276, 2460449204, 4042459122, 2706270690, 3446004468, 3573941694, 533804130, 2328143614, 2637442643, 2695033685, 839224033, 1973745387, 957055980, 2856345839, 106852767, 1371368976, 4181598602, 1033297158, 2933734917, 1179510461, 3046200461, 91341917, 1862534868, 4284502037, 605657339, 2547432937, 3431546947, 2003294622, 3182487618, 2282195339, 954669403, 3682191598, 1201765386, 3917234703, 3388507166, 0, 2198438022, 1211247597, 2887651696, 1315723890, 4227665663, 1443857720, 507358933, 657861945, 1678381017, 560487590, 3516619604, 975451694, 2970356327, 261314535, 3535072918, 2652609425, 1333838021, 2724322336, 1767536459, 370938394, 182621114, 3854606378, 1128014560, 487725847, 185469197, 2918353863, 3106780840, 3356761769, 2237133081, 1286567175, 3152976349, 4255350624, 2683765030, 3160175349, 3309594171, 878443390, 1988838185, 3704300486, 1756818940, 1673061617, 3403100636, 272786309, 1075025698, 545572369, 2105887268, 4174560061, 296679730, 1841768865, 1260232239, 4091327024, 3960309330, 3497509347, 1814803222, 2578018489, 4195456072, 575138148, 3299409036, 446754879, 3629546796, 4011996048, 3347532110, 3252238545, 4270639778, 915985419, 3483825537, 681933534, 651868046, 2755636671, 3828103837, 223377554, 2607439820, 1649704518, 3270937875, 3901806776, 1580087799, 4118987695, 3198115200, 2087309459, 2842678573, 3016697106, 1003007129, 2802849917, 1860738147, 2077965243, 164439672, 4100872472, 32283319, 2827177882, 1709610350, 2125135846, 136428751, 3874428392, 3652904859, 3460984630, 3572145929, 3593056380, 2939266226, 824852259, 818324884, 3224740454, 930369212, 2801566410, 2967507152, 355706840, 1257309336, 4148292826, 243256656, 790073846, 2373340630, 1296297904, 1422699085, 3756299780, 3818836405, 457992840, 3099667487, 2135319889, 77422314, 1560382517, 1945798516, 788204353, 1521706781, 1385356242, 870912086, 325965383, 2358957921, 2050466060, 2388260884, 2313884476, 4006521127, 901210569, 3990953189, 1014646705, 1503449823, 1062597235, 2031621326, 3212035895, 3931371469, 1533017514, 350174575, 2256028891, 2177544179, 1052338372, 741876788, 1606591296, 1914052035, 213705253, 2334669897, 1107234197, 1899603969, 3725069491, 2631447780, 2422494913, 1635502980, 1893020342, 1950903388, 1120974935];\n var T7 = [2807058932, 1699970625, 2764249623, 1586903591, 1808481195, 1173430173, 1487645946, 59984867, 4199882800, 1844882806, 1989249228, 1277555970, 3623636965, 3419915562, 1149249077, 2744104290, 1514790577, 459744698, 244860394, 3235995134, 1963115311, 4027744588, 2544078150, 4190530515, 1608975247, 2627016082, 2062270317, 1507497298, 2200818878, 567498868, 1764313568, 3359936201, 2305455554, 2037970062, 1047239e3, 1910319033, 1337376481, 2904027272, 2892417312, 984907214, 1243112415, 830661914, 861968209, 2135253587, 2011214180, 2927934315, 2686254721, 731183368, 1750626376, 4246310725, 1820824798, 4172763771, 3542330227, 48394827, 2404901663, 2871682645, 671593195, 3254988725, 2073724613, 145085239, 2280796200, 2779915199, 1790575107, 2187128086, 472615631, 3029510009, 4075877127, 3802222185, 4107101658, 3201631749, 1646252340, 4270507174, 1402811438, 1436590835, 3778151818, 3950355702, 3963161475, 4020912224, 2667994737, 273792366, 2331590177, 104699613, 95345982, 3175501286, 2377486676, 1560637892, 3564045318, 369057872, 4213447064, 3919042237, 1137477952, 2658625497, 1119727848, 2340947849, 1530455833, 4007360968, 172466556, 266959938, 516552836, 0, 2256734592, 3980931627, 1890328081, 1917742170, 4294704398, 945164165, 3575528878, 958871085, 3647212047, 2787207260, 1423022939, 775562294, 1739656202, 3876557655, 2530391278, 2443058075, 3310321856, 547512796, 1265195639, 437656594, 3121275539, 719700128, 3762502690, 387781147, 218828297, 3350065803, 2830708150, 2848461854, 428169201, 122466165, 3720081049, 1627235199, 648017665, 4122762354, 1002783846, 2117360635, 695634755, 3336358691, 4234721005, 4049844452, 3704280881, 2232435299, 574624663, 287343814, 612205898, 1039717051, 840019705, 2708326185, 793451934, 821288114, 1391201670, 3822090177, 376187827, 3113855344, 1224348052, 1679968233, 2361698556, 1058709744, 752375421, 2431590963, 1321699145, 3519142200, 2734591178, 188127444, 2177869557, 3727205754, 2384911031, 3215212461, 2648976442, 2450346104, 3432737375, 1180849278, 331544205, 3102249176, 4150144569, 2952102595, 2159976285, 2474404304, 766078933, 313773861, 2570832044, 2108100632, 1668212892, 3145456443, 2013908262, 418672217, 3070356634, 2594734927, 1852171925, 3867060991, 3473416636, 3907448597, 2614737639, 919489135, 164948639, 2094410160, 2997825956, 590424639, 2486224549, 1723872674, 3157750862, 3399941250, 3501252752, 3625268135, 2555048196, 3673637356, 1343127501, 4130281361, 3599595085, 2957853679, 1297403050, 81781910, 3051593425, 2283490410, 532201772, 1367295589, 3926170974, 895287692, 1953757831, 1093597963, 492483431, 3528626907, 1446242576, 1192455638, 1636604631, 209336225, 344873464, 1015671571, 669961897, 3375740769, 3857572124, 2973530695, 3747192018, 1933530610, 3464042516, 935293895, 3454686199, 2858115069, 1863638845, 3683022916, 4085369519, 3292445032, 875313188, 1080017571, 3279033885, 621591778, 1233856572, 2504130317, 24197544, 3017672716, 3835484340, 3247465558, 2220981195, 3060847922, 1551124588, 1463996600];\n var T8 = [4104605777, 1097159550, 396673818, 660510266, 2875968315, 2638606623, 4200115116, 3808662347, 821712160, 1986918061, 3430322568, 38544885, 3856137295, 718002117, 893681702, 1654886325, 2975484382, 3122358053, 3926825029, 4274053469, 796197571, 1290801793, 1184342925, 3556361835, 2405426947, 2459735317, 1836772287, 1381620373, 3196267988, 1948373848, 3764988233, 3385345166, 3263785589, 2390325492, 1480485785, 3111247143, 3780097726, 2293045232, 548169417, 3459953789, 3746175075, 439452389, 1362321559, 1400849762, 1685577905, 1806599355, 2174754046, 137073913, 1214797936, 1174215055, 3731654548, 2079897426, 1943217067, 1258480242, 529487843, 1437280870, 3945269170, 3049390895, 3313212038, 923313619, 679998e3, 3215307299, 57326082, 377642221, 3474729866, 2041877159, 133361907, 1776460110, 3673476453, 96392454, 878845905, 2801699524, 777231668, 4082475170, 2330014213, 4142626212, 2213296395, 1626319424, 1906247262, 1846563261, 562755902, 3708173718, 1040559837, 3871163981, 1418573201, 3294430577, 114585348, 1343618912, 2566595609, 3186202582, 1078185097, 3651041127, 3896688048, 2307622919, 425408743, 3371096953, 2081048481, 1108339068, 2216610296, 0, 2156299017, 736970802, 292596766, 1517440620, 251657213, 2235061775, 2933202493, 758720310, 265905162, 1554391400, 1532285339, 908999204, 174567692, 1474760595, 4002861748, 2610011675, 3234156416, 3693126241, 2001430874, 303699484, 2478443234, 2687165888, 585122620, 454499602, 151849742, 2345119218, 3064510765, 514443284, 4044981591, 1963412655, 2581445614, 2137062819, 19308535, 1928707164, 1715193156, 4219352155, 1126790795, 600235211, 3992742070, 3841024952, 836553431, 1669664834, 2535604243, 3323011204, 1243905413, 3141400786, 4180808110, 698445255, 2653899549, 2989552604, 2253581325, 3252932727, 3004591147, 1891211689, 2487810577, 3915653703, 4237083816, 4030667424, 2100090966, 865136418, 1229899655, 953270745, 3399679628, 3557504664, 4118925222, 2061379749, 3079546586, 2915017791, 983426092, 2022837584, 1607244650, 2118541908, 2366882550, 3635996816, 972512814, 3283088770, 1568718495, 3499326569, 3576539503, 621982671, 2895723464, 410887952, 2623762152, 1002142683, 645401037, 1494807662, 2595684844, 1335535747, 2507040230, 4293295786, 3167684641, 367585007, 3885750714, 1865862730, 2668221674, 2960971305, 2763173681, 1059270954, 2777952454, 2724642869, 1320957812, 2194319100, 2429595872, 2815956275, 77089521, 3973773121, 3444575871, 2448830231, 1305906550, 4021308739, 2857194700, 2516901860, 3518358430, 1787304780, 740276417, 1699839814, 1592394909, 2352307457, 2272556026, 188821243, 1729977011, 3687994002, 274084841, 3594982253, 3613494426, 2701949495, 4162096729, 322734571, 2837966542, 1640576439, 484830689, 1202797690, 3537852828, 4067639125, 349075736, 3342319475, 4157467219, 4255800159, 1030690015, 1155237496, 2951971274, 1757691577, 607398968, 2738905026, 499347990, 3794078908, 1011452712, 227885567, 2818666809, 213114376, 3034881240, 1455525988, 3414450555, 850817237, 1817998408, 3092726480];\n var U1 = [0, 235474187, 470948374, 303765277, 941896748, 908933415, 607530554, 708780849, 1883793496, 2118214995, 1817866830, 1649639237, 1215061108, 1181045119, 1417561698, 1517767529, 3767586992, 4003061179, 4236429990, 4069246893, 3635733660, 3602770327, 3299278474, 3400528769, 2430122216, 2664543715, 2362090238, 2193862645, 2835123396, 2801107407, 3035535058, 3135740889, 3678124923, 3576870512, 3341394285, 3374361702, 3810496343, 3977675356, 4279080257, 4043610186, 2876494627, 2776292904, 3076639029, 3110650942, 2472011535, 2640243204, 2403728665, 2169303058, 1001089995, 899835584, 666464733, 699432150, 59727847, 226906860, 530400753, 294930682, 1273168787, 1172967064, 1475418501, 1509430414, 1942435775, 2110667444, 1876241833, 1641816226, 2910219766, 2743034109, 2976151520, 3211623147, 2505202138, 2606453969, 2302690252, 2269728455, 3711829422, 3543599269, 3240894392, 3475313331, 3843699074, 3943906441, 4178062228, 4144047775, 1306967366, 1139781709, 1374988112, 1610459739, 1975683434, 2076935265, 1775276924, 1742315127, 1034867998, 866637845, 566021896, 800440835, 92987698, 193195065, 429456164, 395441711, 1984812685, 2017778566, 1784663195, 1683407248, 1315562145, 1080094634, 1383856311, 1551037884, 101039829, 135050206, 437757123, 337553864, 1042385657, 807962610, 573804783, 742039012, 2531067453, 2564033334, 2328828971, 2227573024, 2935566865, 2700099354, 3001755655, 3168937228, 3868552805, 3902563182, 4203181171, 4102977912, 3736164937, 3501741890, 3265478751, 3433712980, 1106041591, 1340463100, 1576976609, 1408749034, 2043211483, 2009195472, 1708848333, 1809054150, 832877231, 1068351396, 766945465, 599762354, 159417987, 126454664, 361929877, 463180190, 2709260871, 2943682380, 3178106961, 3009879386, 2572697195, 2538681184, 2236228733, 2336434550, 3509871135, 3745345300, 3441850377, 3274667266, 3910161971, 3877198648, 4110568485, 4211818798, 2597806476, 2497604743, 2261089178, 2295101073, 2733856160, 2902087851, 3202437046, 2968011453, 3936291284, 3835036895, 4136440770, 4169408201, 3535486456, 3702665459, 3467192302, 3231722213, 2051518780, 1951317047, 1716890410, 1750902305, 1113818384, 1282050075, 1584504582, 1350078989, 168810852, 67556463, 371049330, 404016761, 841739592, 1008918595, 775550814, 540080725, 3969562369, 3801332234, 4035489047, 4269907996, 3569255213, 3669462566, 3366754619, 3332740144, 2631065433, 2463879762, 2160117071, 2395588676, 2767645557, 2868897406, 3102011747, 3069049960, 202008497, 33778362, 270040487, 504459436, 875451293, 975658646, 675039627, 641025152, 2084704233, 1917518562, 1615861247, 1851332852, 1147550661, 1248802510, 1484005843, 1451044056, 933301370, 967311729, 733156972, 632953703, 260388950, 25965917, 328671808, 496906059, 1206477858, 1239443753, 1543208500, 1441952575, 2144161806, 1908694277, 1675577880, 1842759443, 3610369226, 3644379585, 3408119516, 3307916247, 4011190502, 3776767469, 4077384432, 4245618683, 2809771154, 2842737049, 3144396420, 3043140495, 2673705150, 2438237621, 2203032232, 2370213795];\n var U22 = [0, 185469197, 370938394, 487725847, 741876788, 657861945, 975451694, 824852259, 1483753576, 1400783205, 1315723890, 1164071807, 1950903388, 2135319889, 1649704518, 1767536459, 2967507152, 3152976349, 2801566410, 2918353863, 2631447780, 2547432937, 2328143614, 2177544179, 3901806776, 3818836405, 4270639778, 4118987695, 3299409036, 3483825537, 3535072918, 3652904859, 2077965243, 1893020342, 1841768865, 1724457132, 1474502543, 1559041666, 1107234197, 1257309336, 598438867, 681933534, 901210569, 1052338372, 261314535, 77422314, 428819965, 310463728, 3409685355, 3224740454, 3710368113, 3593056380, 3875770207, 3960309330, 4045380933, 4195456072, 2471224067, 2554718734, 2237133081, 2388260884, 3212035895, 3028143674, 2842678573, 2724322336, 4138563181, 4255350624, 3769721975, 3955191162, 3667219033, 3516619604, 3431546947, 3347532110, 2933734917, 2782082824, 3099667487, 3016697106, 2196052529, 2313884476, 2499348523, 2683765030, 1179510461, 1296297904, 1347548327, 1533017514, 1786102409, 1635502980, 2087309459, 2003294622, 507358933, 355706840, 136428751, 53458370, 839224033, 957055980, 605657339, 790073846, 2373340630, 2256028891, 2607439820, 2422494913, 2706270690, 2856345839, 3075636216, 3160175349, 3573941694, 3725069491, 3273267108, 3356761769, 4181598602, 4063242375, 4011996048, 3828103837, 1033297158, 915985419, 730517276, 545572369, 296679730, 446754879, 129166120, 213705253, 1709610350, 1860738147, 1945798516, 2029293177, 1239331162, 1120974935, 1606591296, 1422699085, 4148292826, 4233094615, 3781033664, 3931371469, 3682191598, 3497509347, 3446004468, 3328955385, 2939266226, 2755636671, 3106780840, 2988687269, 2198438022, 2282195339, 2501218972, 2652609425, 1201765386, 1286567175, 1371368976, 1521706781, 1805211710, 1620529459, 2105887268, 1988838185, 533804130, 350174575, 164439672, 46346101, 870912086, 954669403, 636813900, 788204353, 2358957921, 2274680428, 2592523643, 2441661558, 2695033685, 2880240216, 3065962831, 3182487618, 3572145929, 3756299780, 3270937875, 3388507166, 4174560061, 4091327024, 4006521127, 3854606378, 1014646705, 930369212, 711349675, 560487590, 272786309, 457992840, 106852767, 223377554, 1678381017, 1862534868, 1914052035, 2031621326, 1211247597, 1128014560, 1580087799, 1428173050, 32283319, 182621114, 401639597, 486441376, 768917123, 651868046, 1003007129, 818324884, 1503449823, 1385356242, 1333838021, 1150208456, 1973745387, 2125135846, 1673061617, 1756818940, 2970356327, 3120694122, 2802849917, 2887651696, 2637442643, 2520393566, 2334669897, 2149987652, 3917234703, 3799141122, 4284502037, 4100872472, 3309594171, 3460984630, 3545789473, 3629546796, 2050466060, 1899603969, 1814803222, 1730525723, 1443857720, 1560382517, 1075025698, 1260232239, 575138148, 692707433, 878443390, 1062597235, 243256656, 91341917, 409198410, 325965383, 3403100636, 3252238545, 3704300486, 3620022987, 3874428392, 3990953189, 4042459122, 4227665663, 2460449204, 2578018489, 2226875310, 2411029155, 3198115200, 3046200461, 2827177882, 2743944855];\n var U32 = [0, 218828297, 437656594, 387781147, 875313188, 958871085, 775562294, 590424639, 1750626376, 1699970625, 1917742170, 2135253587, 1551124588, 1367295589, 1180849278, 1265195639, 3501252752, 3720081049, 3399941250, 3350065803, 3835484340, 3919042237, 4270507174, 4085369519, 3102249176, 3051593425, 2734591178, 2952102595, 2361698556, 2177869557, 2530391278, 2614737639, 3145456443, 3060847922, 2708326185, 2892417312, 2404901663, 2187128086, 2504130317, 2555048196, 3542330227, 3727205754, 3375740769, 3292445032, 3876557655, 3926170974, 4246310725, 4027744588, 1808481195, 1723872674, 1910319033, 2094410160, 1608975247, 1391201670, 1173430173, 1224348052, 59984867, 244860394, 428169201, 344873464, 935293895, 984907214, 766078933, 547512796, 1844882806, 1627235199, 2011214180, 2062270317, 1507497298, 1423022939, 1137477952, 1321699145, 95345982, 145085239, 532201772, 313773861, 830661914, 1015671571, 731183368, 648017665, 3175501286, 2957853679, 2807058932, 2858115069, 2305455554, 2220981195, 2474404304, 2658625497, 3575528878, 3625268135, 3473416636, 3254988725, 3778151818, 3963161475, 4213447064, 4130281361, 3599595085, 3683022916, 3432737375, 3247465558, 3802222185, 4020912224, 4172763771, 4122762354, 3201631749, 3017672716, 2764249623, 2848461854, 2331590177, 2280796200, 2431590963, 2648976442, 104699613, 188127444, 472615631, 287343814, 840019705, 1058709744, 671593195, 621591778, 1852171925, 1668212892, 1953757831, 2037970062, 1514790577, 1463996600, 1080017571, 1297403050, 3673637356, 3623636965, 3235995134, 3454686199, 4007360968, 3822090177, 4107101658, 4190530515, 2997825956, 3215212461, 2830708150, 2779915199, 2256734592, 2340947849, 2627016082, 2443058075, 172466556, 122466165, 273792366, 492483431, 1047239e3, 861968209, 612205898, 695634755, 1646252340, 1863638845, 2013908262, 1963115311, 1446242576, 1530455833, 1277555970, 1093597963, 1636604631, 1820824798, 2073724613, 1989249228, 1436590835, 1487645946, 1337376481, 1119727848, 164948639, 81781910, 331544205, 516552836, 1039717051, 821288114, 669961897, 719700128, 2973530695, 3157750862, 2871682645, 2787207260, 2232435299, 2283490410, 2667994737, 2450346104, 3647212047, 3564045318, 3279033885, 3464042516, 3980931627, 3762502690, 4150144569, 4199882800, 3070356634, 3121275539, 2904027272, 2686254721, 2200818878, 2384911031, 2570832044, 2486224549, 3747192018, 3528626907, 3310321856, 3359936201, 3950355702, 3867060991, 4049844452, 4234721005, 1739656202, 1790575107, 2108100632, 1890328081, 1402811438, 1586903591, 1233856572, 1149249077, 266959938, 48394827, 369057872, 418672217, 1002783846, 919489135, 567498868, 752375421, 209336225, 24197544, 376187827, 459744698, 945164165, 895287692, 574624663, 793451934, 1679968233, 1764313568, 2117360635, 1933530610, 1343127501, 1560637892, 1243112415, 1192455638, 3704280881, 3519142200, 3336358691, 3419915562, 3907448597, 3857572124, 4075877127, 4294704398, 3029510009, 3113855344, 2927934315, 2744104290, 2159976285, 2377486676, 2594734927, 2544078150];\n var U4 = [0, 151849742, 303699484, 454499602, 607398968, 758720310, 908999204, 1059270954, 1214797936, 1097159550, 1517440620, 1400849762, 1817998408, 1699839814, 2118541908, 2001430874, 2429595872, 2581445614, 2194319100, 2345119218, 3034881240, 3186202582, 2801699524, 2951971274, 3635996816, 3518358430, 3399679628, 3283088770, 4237083816, 4118925222, 4002861748, 3885750714, 1002142683, 850817237, 698445255, 548169417, 529487843, 377642221, 227885567, 77089521, 1943217067, 2061379749, 1640576439, 1757691577, 1474760595, 1592394909, 1174215055, 1290801793, 2875968315, 2724642869, 3111247143, 2960971305, 2405426947, 2253581325, 2638606623, 2487810577, 3808662347, 3926825029, 4044981591, 4162096729, 3342319475, 3459953789, 3576539503, 3693126241, 1986918061, 2137062819, 1685577905, 1836772287, 1381620373, 1532285339, 1078185097, 1229899655, 1040559837, 923313619, 740276417, 621982671, 439452389, 322734571, 137073913, 19308535, 3871163981, 4021308739, 4104605777, 4255800159, 3263785589, 3414450555, 3499326569, 3651041127, 2933202493, 2815956275, 3167684641, 3049390895, 2330014213, 2213296395, 2566595609, 2448830231, 1305906550, 1155237496, 1607244650, 1455525988, 1776460110, 1626319424, 2079897426, 1928707164, 96392454, 213114376, 396673818, 514443284, 562755902, 679998e3, 865136418, 983426092, 3708173718, 3557504664, 3474729866, 3323011204, 4180808110, 4030667424, 3945269170, 3794078908, 2507040230, 2623762152, 2272556026, 2390325492, 2975484382, 3092726480, 2738905026, 2857194700, 3973773121, 3856137295, 4274053469, 4157467219, 3371096953, 3252932727, 3673476453, 3556361835, 2763173681, 2915017791, 3064510765, 3215307299, 2156299017, 2307622919, 2459735317, 2610011675, 2081048481, 1963412655, 1846563261, 1729977011, 1480485785, 1362321559, 1243905413, 1126790795, 878845905, 1030690015, 645401037, 796197571, 274084841, 425408743, 38544885, 188821243, 3613494426, 3731654548, 3313212038, 3430322568, 4082475170, 4200115116, 3780097726, 3896688048, 2668221674, 2516901860, 2366882550, 2216610296, 3141400786, 2989552604, 2837966542, 2687165888, 1202797690, 1320957812, 1437280870, 1554391400, 1669664834, 1787304780, 1906247262, 2022837584, 265905162, 114585348, 499347990, 349075736, 736970802, 585122620, 972512814, 821712160, 2595684844, 2478443234, 2293045232, 2174754046, 3196267988, 3079546586, 2895723464, 2777952454, 3537852828, 3687994002, 3234156416, 3385345166, 4142626212, 4293295786, 3841024952, 3992742070, 174567692, 57326082, 410887952, 292596766, 777231668, 660510266, 1011452712, 893681702, 1108339068, 1258480242, 1343618912, 1494807662, 1715193156, 1865862730, 1948373848, 2100090966, 2701949495, 2818666809, 3004591147, 3122358053, 2235061775, 2352307457, 2535604243, 2653899549, 3915653703, 3764988233, 4219352155, 4067639125, 3444575871, 3294430577, 3746175075, 3594982253, 836553431, 953270745, 600235211, 718002117, 367585007, 484830689, 133361907, 251657213, 2041877159, 1891211689, 1806599355, 1654886325, 1568718495, 1418573201, 1335535747, 1184342925];\n function convertToInt32(bytes) {\n var result = [];\n for (var i3 = 0; i3 < bytes.length; i3 += 4) {\n result.push(\n bytes[i3] << 24 | bytes[i3 + 1] << 16 | bytes[i3 + 2] << 8 | bytes[i3 + 3]\n );\n }\n return result;\n }\n var AES = function(key) {\n if (!(this instanceof AES)) {\n throw Error(\"AES must be instanitated with `new`\");\n }\n Object.defineProperty(this, \"key\", {\n value: coerceArray(key, true)\n });\n this._prepare();\n };\n AES.prototype._prepare = function() {\n var rounds = numberOfRounds[this.key.length];\n if (rounds == null) {\n throw new Error(\"invalid key size (must be 16, 24 or 32 bytes)\");\n }\n this._Ke = [];\n this._Kd = [];\n for (var i3 = 0; i3 <= rounds; i3++) {\n this._Ke.push([0, 0, 0, 0]);\n this._Kd.push([0, 0, 0, 0]);\n }\n var roundKeyCount = (rounds + 1) * 4;\n var KC = this.key.length / 4;\n var tk = convertToInt32(this.key);\n var index2;\n for (var i3 = 0; i3 < KC; i3++) {\n index2 = i3 >> 2;\n this._Ke[index2][i3 % 4] = tk[i3];\n this._Kd[rounds - index2][i3 % 4] = tk[i3];\n }\n var rconpointer = 0;\n var t3 = KC, tt;\n while (t3 < roundKeyCount) {\n tt = tk[KC - 1];\n tk[0] ^= S3[tt >> 16 & 255] << 24 ^ S3[tt >> 8 & 255] << 16 ^ S3[tt & 255] << 8 ^ S3[tt >> 24 & 255] ^ rcon[rconpointer] << 24;\n rconpointer += 1;\n if (KC != 8) {\n for (var i3 = 1; i3 < KC; i3++) {\n tk[i3] ^= tk[i3 - 1];\n }\n } else {\n for (var i3 = 1; i3 < KC / 2; i3++) {\n tk[i3] ^= tk[i3 - 1];\n }\n tt = tk[KC / 2 - 1];\n tk[KC / 2] ^= S3[tt & 255] ^ S3[tt >> 8 & 255] << 8 ^ S3[tt >> 16 & 255] << 16 ^ S3[tt >> 24 & 255] << 24;\n for (var i3 = KC / 2 + 1; i3 < KC; i3++) {\n tk[i3] ^= tk[i3 - 1];\n }\n }\n var i3 = 0, r2, c4;\n while (i3 < KC && t3 < roundKeyCount) {\n r2 = t3 >> 2;\n c4 = t3 % 4;\n this._Ke[r2][c4] = tk[i3];\n this._Kd[rounds - r2][c4] = tk[i3++];\n t3++;\n }\n }\n for (var r2 = 1; r2 < rounds; r2++) {\n for (var c4 = 0; c4 < 4; c4++) {\n tt = this._Kd[r2][c4];\n this._Kd[r2][c4] = U1[tt >> 24 & 255] ^ U22[tt >> 16 & 255] ^ U32[tt >> 8 & 255] ^ U4[tt & 255];\n }\n }\n };\n AES.prototype.encrypt = function(plaintext) {\n if (plaintext.length != 16) {\n throw new Error(\"invalid plaintext size (must be 16 bytes)\");\n }\n var rounds = this._Ke.length - 1;\n var a3 = [0, 0, 0, 0];\n var t3 = convertToInt32(plaintext);\n for (var i3 = 0; i3 < 4; i3++) {\n t3[i3] ^= this._Ke[0][i3];\n }\n for (var r2 = 1; r2 < rounds; r2++) {\n for (var i3 = 0; i3 < 4; i3++) {\n a3[i3] = T1[t3[i3] >> 24 & 255] ^ T22[t3[(i3 + 1) % 4] >> 16 & 255] ^ T32[t3[(i3 + 2) % 4] >> 8 & 255] ^ T4[t3[(i3 + 3) % 4] & 255] ^ this._Ke[r2][i3];\n }\n t3 = a3.slice();\n }\n var result = createArray(16), tt;\n for (var i3 = 0; i3 < 4; i3++) {\n tt = this._Ke[rounds][i3];\n result[4 * i3] = (S3[t3[i3] >> 24 & 255] ^ tt >> 24) & 255;\n result[4 * i3 + 1] = (S3[t3[(i3 + 1) % 4] >> 16 & 255] ^ tt >> 16) & 255;\n result[4 * i3 + 2] = (S3[t3[(i3 + 2) % 4] >> 8 & 255] ^ tt >> 8) & 255;\n result[4 * i3 + 3] = (S3[t3[(i3 + 3) % 4] & 255] ^ tt) & 255;\n }\n return result;\n };\n AES.prototype.decrypt = function(ciphertext) {\n if (ciphertext.length != 16) {\n throw new Error(\"invalid ciphertext size (must be 16 bytes)\");\n }\n var rounds = this._Kd.length - 1;\n var a3 = [0, 0, 0, 0];\n var t3 = convertToInt32(ciphertext);\n for (var i3 = 0; i3 < 4; i3++) {\n t3[i3] ^= this._Kd[0][i3];\n }\n for (var r2 = 1; r2 < rounds; r2++) {\n for (var i3 = 0; i3 < 4; i3++) {\n a3[i3] = T5[t3[i3] >> 24 & 255] ^ T6[t3[(i3 + 3) % 4] >> 16 & 255] ^ T7[t3[(i3 + 2) % 4] >> 8 & 255] ^ T8[t3[(i3 + 1) % 4] & 255] ^ this._Kd[r2][i3];\n }\n t3 = a3.slice();\n }\n var result = createArray(16), tt;\n for (var i3 = 0; i3 < 4; i3++) {\n tt = this._Kd[rounds][i3];\n result[4 * i3] = (Si[t3[i3] >> 24 & 255] ^ tt >> 24) & 255;\n result[4 * i3 + 1] = (Si[t3[(i3 + 3) % 4] >> 16 & 255] ^ tt >> 16) & 255;\n result[4 * i3 + 2] = (Si[t3[(i3 + 2) % 4] >> 8 & 255] ^ tt >> 8) & 255;\n result[4 * i3 + 3] = (Si[t3[(i3 + 1) % 4] & 255] ^ tt) & 255;\n }\n return result;\n };\n var ModeOfOperationECB = function(key) {\n if (!(this instanceof ModeOfOperationECB)) {\n throw Error(\"AES must be instanitated with `new`\");\n }\n this.description = \"Electronic Code Block\";\n this.name = \"ecb\";\n this._aes = new AES(key);\n };\n ModeOfOperationECB.prototype.encrypt = function(plaintext) {\n plaintext = coerceArray(plaintext);\n if (plaintext.length % 16 !== 0) {\n throw new Error(\"invalid plaintext size (must be multiple of 16 bytes)\");\n }\n var ciphertext = createArray(plaintext.length);\n var block = createArray(16);\n for (var i3 = 0; i3 < plaintext.length; i3 += 16) {\n copyArray(plaintext, block, 0, i3, i3 + 16);\n block = this._aes.encrypt(block);\n copyArray(block, ciphertext, i3);\n }\n return ciphertext;\n };\n ModeOfOperationECB.prototype.decrypt = function(ciphertext) {\n ciphertext = coerceArray(ciphertext);\n if (ciphertext.length % 16 !== 0) {\n throw new Error(\"invalid ciphertext size (must be multiple of 16 bytes)\");\n }\n var plaintext = createArray(ciphertext.length);\n var block = createArray(16);\n for (var i3 = 0; i3 < ciphertext.length; i3 += 16) {\n copyArray(ciphertext, block, 0, i3, i3 + 16);\n block = this._aes.decrypt(block);\n copyArray(block, plaintext, i3);\n }\n return plaintext;\n };\n var ModeOfOperationCBC = function(key, iv) {\n if (!(this instanceof ModeOfOperationCBC)) {\n throw Error(\"AES must be instanitated with `new`\");\n }\n this.description = \"Cipher Block Chaining\";\n this.name = \"cbc\";\n if (!iv) {\n iv = createArray(16);\n } else if (iv.length != 16) {\n throw new Error(\"invalid initialation vector size (must be 16 bytes)\");\n }\n this._lastCipherblock = coerceArray(iv, true);\n this._aes = new AES(key);\n };\n ModeOfOperationCBC.prototype.encrypt = function(plaintext) {\n plaintext = coerceArray(plaintext);\n if (plaintext.length % 16 !== 0) {\n throw new Error(\"invalid plaintext size (must be multiple of 16 bytes)\");\n }\n var ciphertext = createArray(plaintext.length);\n var block = createArray(16);\n for (var i3 = 0; i3 < plaintext.length; i3 += 16) {\n copyArray(plaintext, block, 0, i3, i3 + 16);\n for (var j2 = 0; j2 < 16; j2++) {\n block[j2] ^= this._lastCipherblock[j2];\n }\n this._lastCipherblock = this._aes.encrypt(block);\n copyArray(this._lastCipherblock, ciphertext, i3);\n }\n return ciphertext;\n };\n ModeOfOperationCBC.prototype.decrypt = function(ciphertext) {\n ciphertext = coerceArray(ciphertext);\n if (ciphertext.length % 16 !== 0) {\n throw new Error(\"invalid ciphertext size (must be multiple of 16 bytes)\");\n }\n var plaintext = createArray(ciphertext.length);\n var block = createArray(16);\n for (var i3 = 0; i3 < ciphertext.length; i3 += 16) {\n copyArray(ciphertext, block, 0, i3, i3 + 16);\n block = this._aes.decrypt(block);\n for (var j2 = 0; j2 < 16; j2++) {\n plaintext[i3 + j2] = block[j2] ^ this._lastCipherblock[j2];\n }\n copyArray(ciphertext, this._lastCipherblock, 0, i3, i3 + 16);\n }\n return plaintext;\n };\n var ModeOfOperationCFB = function(key, iv, segmentSize) {\n if (!(this instanceof ModeOfOperationCFB)) {\n throw Error(\"AES must be instanitated with `new`\");\n }\n this.description = \"Cipher Feedback\";\n this.name = \"cfb\";\n if (!iv) {\n iv = createArray(16);\n } else if (iv.length != 16) {\n throw new Error(\"invalid initialation vector size (must be 16 size)\");\n }\n if (!segmentSize) {\n segmentSize = 1;\n }\n this.segmentSize = segmentSize;\n this._shiftRegister = coerceArray(iv, true);\n this._aes = new AES(key);\n };\n ModeOfOperationCFB.prototype.encrypt = function(plaintext) {\n if (plaintext.length % this.segmentSize != 0) {\n throw new Error(\"invalid plaintext size (must be segmentSize bytes)\");\n }\n var encrypted = coerceArray(plaintext, true);\n var xorSegment;\n for (var i3 = 0; i3 < encrypted.length; i3 += this.segmentSize) {\n xorSegment = this._aes.encrypt(this._shiftRegister);\n for (var j2 = 0; j2 < this.segmentSize; j2++) {\n encrypted[i3 + j2] ^= xorSegment[j2];\n }\n copyArray(this._shiftRegister, this._shiftRegister, 0, this.segmentSize);\n copyArray(encrypted, this._shiftRegister, 16 - this.segmentSize, i3, i3 + this.segmentSize);\n }\n return encrypted;\n };\n ModeOfOperationCFB.prototype.decrypt = function(ciphertext) {\n if (ciphertext.length % this.segmentSize != 0) {\n throw new Error(\"invalid ciphertext size (must be segmentSize bytes)\");\n }\n var plaintext = coerceArray(ciphertext, true);\n var xorSegment;\n for (var i3 = 0; i3 < plaintext.length; i3 += this.segmentSize) {\n xorSegment = this._aes.encrypt(this._shiftRegister);\n for (var j2 = 0; j2 < this.segmentSize; j2++) {\n plaintext[i3 + j2] ^= xorSegment[j2];\n }\n copyArray(this._shiftRegister, this._shiftRegister, 0, this.segmentSize);\n copyArray(ciphertext, this._shiftRegister, 16 - this.segmentSize, i3, i3 + this.segmentSize);\n }\n return plaintext;\n };\n var ModeOfOperationOFB = function(key, iv) {\n if (!(this instanceof ModeOfOperationOFB)) {\n throw Error(\"AES must be instanitated with `new`\");\n }\n this.description = \"Output Feedback\";\n this.name = \"ofb\";\n if (!iv) {\n iv = createArray(16);\n } else if (iv.length != 16) {\n throw new Error(\"invalid initialation vector size (must be 16 bytes)\");\n }\n this._lastPrecipher = coerceArray(iv, true);\n this._lastPrecipherIndex = 16;\n this._aes = new AES(key);\n };\n ModeOfOperationOFB.prototype.encrypt = function(plaintext) {\n var encrypted = coerceArray(plaintext, true);\n for (var i3 = 0; i3 < encrypted.length; i3++) {\n if (this._lastPrecipherIndex === 16) {\n this._lastPrecipher = this._aes.encrypt(this._lastPrecipher);\n this._lastPrecipherIndex = 0;\n }\n encrypted[i3] ^= this._lastPrecipher[this._lastPrecipherIndex++];\n }\n return encrypted;\n };\n ModeOfOperationOFB.prototype.decrypt = ModeOfOperationOFB.prototype.encrypt;\n var Counter = function(initialValue) {\n if (!(this instanceof Counter)) {\n throw Error(\"Counter must be instanitated with `new`\");\n }\n if (initialValue !== 0 && !initialValue) {\n initialValue = 1;\n }\n if (typeof initialValue === \"number\") {\n this._counter = createArray(16);\n this.setValue(initialValue);\n } else {\n this.setBytes(initialValue);\n }\n };\n Counter.prototype.setValue = function(value) {\n if (typeof value !== \"number\" || parseInt(value) != value) {\n throw new Error(\"invalid counter value (must be an integer)\");\n }\n for (var index2 = 15; index2 >= 0; --index2) {\n this._counter[index2] = value % 256;\n value = value >> 8;\n }\n };\n Counter.prototype.setBytes = function(bytes) {\n bytes = coerceArray(bytes, true);\n if (bytes.length != 16) {\n throw new Error(\"invalid counter bytes size (must be 16 bytes)\");\n }\n this._counter = bytes;\n };\n Counter.prototype.increment = function() {\n for (var i3 = 15; i3 >= 0; i3--) {\n if (this._counter[i3] === 255) {\n this._counter[i3] = 0;\n } else {\n this._counter[i3]++;\n break;\n }\n }\n };\n var ModeOfOperationCTR = function(key, counter) {\n if (!(this instanceof ModeOfOperationCTR)) {\n throw Error(\"AES must be instanitated with `new`\");\n }\n this.description = \"Counter\";\n this.name = \"ctr\";\n if (!(counter instanceof Counter)) {\n counter = new Counter(counter);\n }\n this._counter = counter;\n this._remainingCounter = null;\n this._remainingCounterIndex = 16;\n this._aes = new AES(key);\n };\n ModeOfOperationCTR.prototype.encrypt = function(plaintext) {\n var encrypted = coerceArray(plaintext, true);\n for (var i3 = 0; i3 < encrypted.length; i3++) {\n if (this._remainingCounterIndex === 16) {\n this._remainingCounter = this._aes.encrypt(this._counter._counter);\n this._remainingCounterIndex = 0;\n this._counter.increment();\n }\n encrypted[i3] ^= this._remainingCounter[this._remainingCounterIndex++];\n }\n return encrypted;\n };\n ModeOfOperationCTR.prototype.decrypt = ModeOfOperationCTR.prototype.encrypt;\n function pkcs7pad(data) {\n data = coerceArray(data, true);\n var padder = 16 - data.length % 16;\n var result = createArray(data.length + padder);\n copyArray(data, result);\n for (var i3 = data.length; i3 < result.length; i3++) {\n result[i3] = padder;\n }\n return result;\n }\n function pkcs7strip(data) {\n data = coerceArray(data, true);\n if (data.length < 16) {\n throw new Error(\"PKCS#7 invalid length\");\n }\n var padder = data[data.length - 1];\n if (padder > 16) {\n throw new Error(\"PKCS#7 padding byte out of range\");\n }\n var length2 = data.length - padder;\n for (var i3 = 0; i3 < padder; i3++) {\n if (data[length2 + i3] !== padder) {\n throw new Error(\"PKCS#7 invalid padding byte\");\n }\n }\n var result = createArray(length2);\n copyArray(data, result, 0, 0, length2);\n return result;\n }\n var aesjs = {\n AES,\n Counter,\n ModeOfOperation: {\n ecb: ModeOfOperationECB,\n cbc: ModeOfOperationCBC,\n cfb: ModeOfOperationCFB,\n ofb: ModeOfOperationOFB,\n ctr: ModeOfOperationCTR\n },\n utils: {\n hex: convertHex,\n utf8: convertUtf8\n },\n padding: {\n pkcs7: {\n pad: pkcs7pad,\n strip: pkcs7strip\n }\n },\n _arrayTest: {\n coerceArray,\n createArray,\n copyArray\n }\n };\n if (typeof exports3 !== \"undefined\") {\n module.exports = aesjs;\n } else if (typeof define === \"function\" && define.amd) {\n define(aesjs);\n } else {\n if (root.aesjs) {\n aesjs._aesjs = root.aesjs;\n }\n root.aesjs = aesjs;\n }\n })(exports3);\n }\n });\n\n // ../../../node_modules/.pnpm/@ethersproject+json-wallets@5.8.0/node_modules/@ethersproject/json-wallets/lib/_version.js\n var require_version19 = __commonJS({\n \"../../../node_modules/.pnpm/@ethersproject+json-wallets@5.8.0/node_modules/@ethersproject/json-wallets/lib/_version.js\"(exports3) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n Object.defineProperty(exports3, \"__esModule\", { value: true });\n exports3.version = void 0;\n exports3.version = \"json-wallets/5.8.0\";\n }\n });\n\n // ../../../node_modules/.pnpm/@ethersproject+json-wallets@5.8.0/node_modules/@ethersproject/json-wallets/lib/utils.js\n var require_utils5 = __commonJS({\n \"../../../node_modules/.pnpm/@ethersproject+json-wallets@5.8.0/node_modules/@ethersproject/json-wallets/lib/utils.js\"(exports3) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n Object.defineProperty(exports3, \"__esModule\", { value: true });\n exports3.uuidV4 = exports3.searchPath = exports3.getPassword = exports3.zpad = exports3.looseArrayify = void 0;\n var bytes_1 = require_lib2();\n var strings_1 = require_lib9();\n function looseArrayify(hexString) {\n if (typeof hexString === \"string\" && hexString.substring(0, 2) !== \"0x\") {\n hexString = \"0x\" + hexString;\n }\n return (0, bytes_1.arrayify)(hexString);\n }\n exports3.looseArrayify = looseArrayify;\n function zpad(value, length2) {\n value = String(value);\n while (value.length < length2) {\n value = \"0\" + value;\n }\n return value;\n }\n exports3.zpad = zpad;\n function getPassword(password) {\n if (typeof password === \"string\") {\n return (0, strings_1.toUtf8Bytes)(password, strings_1.UnicodeNormalizationForm.NFKC);\n }\n return (0, bytes_1.arrayify)(password);\n }\n exports3.getPassword = getPassword;\n function searchPath(object2, path) {\n var currentChild = object2;\n var comps = path.toLowerCase().split(\"/\");\n for (var i3 = 0; i3 < comps.length; i3++) {\n var matchingChild = null;\n for (var key in currentChild) {\n if (key.toLowerCase() === comps[i3]) {\n matchingChild = currentChild[key];\n break;\n }\n }\n if (matchingChild === null) {\n return null;\n }\n currentChild = matchingChild;\n }\n return currentChild;\n }\n exports3.searchPath = searchPath;\n function uuidV4(randomBytes2) {\n var bytes = (0, bytes_1.arrayify)(randomBytes2);\n bytes[6] = bytes[6] & 15 | 64;\n bytes[8] = bytes[8] & 63 | 128;\n var value = (0, bytes_1.hexlify)(bytes);\n return [\n value.substring(2, 10),\n value.substring(10, 14),\n value.substring(14, 18),\n value.substring(18, 22),\n value.substring(22, 34)\n ].join(\"-\");\n }\n exports3.uuidV4 = uuidV4;\n }\n });\n\n // ../../../node_modules/.pnpm/@ethersproject+json-wallets@5.8.0/node_modules/@ethersproject/json-wallets/lib/crowdsale.js\n var require_crowdsale = __commonJS({\n \"../../../node_modules/.pnpm/@ethersproject+json-wallets@5.8.0/node_modules/@ethersproject/json-wallets/lib/crowdsale.js\"(exports3) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n var __extends3 = exports3 && exports3.__extends || /* @__PURE__ */ function() {\n var extendStatics3 = function(d5, b4) {\n extendStatics3 = Object.setPrototypeOf || { __proto__: [] } instanceof Array && function(d6, b5) {\n d6.__proto__ = b5;\n } || function(d6, b5) {\n for (var p4 in b5)\n if (Object.prototype.hasOwnProperty.call(b5, p4))\n d6[p4] = b5[p4];\n };\n return extendStatics3(d5, b4);\n };\n return function(d5, b4) {\n if (typeof b4 !== \"function\" && b4 !== null)\n throw new TypeError(\"Class extends value \" + String(b4) + \" is not a constructor or null\");\n extendStatics3(d5, b4);\n function __() {\n this.constructor = d5;\n }\n d5.prototype = b4 === null ? Object.create(b4) : (__.prototype = b4.prototype, new __());\n };\n }();\n var __importDefault3 = exports3 && exports3.__importDefault || function(mod3) {\n return mod3 && mod3.__esModule ? mod3 : { \"default\": mod3 };\n };\n Object.defineProperty(exports3, \"__esModule\", { value: true });\n exports3.decrypt = exports3.CrowdsaleAccount = void 0;\n var aes_js_1 = __importDefault3(require_aes_js());\n var address_1 = require_lib7();\n var bytes_1 = require_lib2();\n var keccak256_1 = require_lib5();\n var pbkdf2_1 = require_lib21();\n var strings_1 = require_lib9();\n var properties_1 = require_lib4();\n var logger_1 = require_lib();\n var _version_1 = require_version19();\n var logger = new logger_1.Logger(_version_1.version);\n var utils_1 = require_utils5();\n var CrowdsaleAccount = (\n /** @class */\n function(_super) {\n __extends3(CrowdsaleAccount2, _super);\n function CrowdsaleAccount2() {\n return _super !== null && _super.apply(this, arguments) || this;\n }\n CrowdsaleAccount2.prototype.isCrowdsaleAccount = function(value) {\n return !!(value && value._isCrowdsaleAccount);\n };\n return CrowdsaleAccount2;\n }(properties_1.Description)\n );\n exports3.CrowdsaleAccount = CrowdsaleAccount;\n function decrypt(json, password) {\n var data = JSON.parse(json);\n password = (0, utils_1.getPassword)(password);\n var ethaddr = (0, address_1.getAddress)((0, utils_1.searchPath)(data, \"ethaddr\"));\n var encseed = (0, utils_1.looseArrayify)((0, utils_1.searchPath)(data, \"encseed\"));\n if (!encseed || encseed.length % 16 !== 0) {\n logger.throwArgumentError(\"invalid encseed\", \"json\", json);\n }\n var key = (0, bytes_1.arrayify)((0, pbkdf2_1.pbkdf2)(password, password, 2e3, 32, \"sha256\")).slice(0, 16);\n var iv = encseed.slice(0, 16);\n var encryptedSeed = encseed.slice(16);\n var aesCbc = new aes_js_1.default.ModeOfOperation.cbc(key, iv);\n var seed = aes_js_1.default.padding.pkcs7.strip((0, bytes_1.arrayify)(aesCbc.decrypt(encryptedSeed)));\n var seedHex = \"\";\n for (var i3 = 0; i3 < seed.length; i3++) {\n seedHex += String.fromCharCode(seed[i3]);\n }\n var seedHexBytes = (0, strings_1.toUtf8Bytes)(seedHex);\n var privateKey = (0, keccak256_1.keccak256)(seedHexBytes);\n return new CrowdsaleAccount({\n _isCrowdsaleAccount: true,\n address: ethaddr,\n privateKey\n });\n }\n exports3.decrypt = decrypt;\n }\n });\n\n // ../../../node_modules/.pnpm/@ethersproject+json-wallets@5.8.0/node_modules/@ethersproject/json-wallets/lib/inspect.js\n var require_inspect = __commonJS({\n \"../../../node_modules/.pnpm/@ethersproject+json-wallets@5.8.0/node_modules/@ethersproject/json-wallets/lib/inspect.js\"(exports3) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n Object.defineProperty(exports3, \"__esModule\", { value: true });\n exports3.getJsonWalletAddress = exports3.isKeystoreWallet = exports3.isCrowdsaleWallet = void 0;\n var address_1 = require_lib7();\n function isCrowdsaleWallet(json) {\n var data = null;\n try {\n data = JSON.parse(json);\n } catch (error) {\n return false;\n }\n return data.encseed && data.ethaddr;\n }\n exports3.isCrowdsaleWallet = isCrowdsaleWallet;\n function isKeystoreWallet(json) {\n var data = null;\n try {\n data = JSON.parse(json);\n } catch (error) {\n return false;\n }\n if (!data.version || parseInt(data.version) !== data.version || parseInt(data.version) !== 3) {\n return false;\n }\n return true;\n }\n exports3.isKeystoreWallet = isKeystoreWallet;\n function getJsonWalletAddress(json) {\n if (isCrowdsaleWallet(json)) {\n try {\n return (0, address_1.getAddress)(JSON.parse(json).ethaddr);\n } catch (error) {\n return null;\n }\n }\n if (isKeystoreWallet(json)) {\n try {\n return (0, address_1.getAddress)(JSON.parse(json).address);\n } catch (error) {\n return null;\n }\n }\n return null;\n }\n exports3.getJsonWalletAddress = getJsonWalletAddress;\n }\n });\n\n // ../../../node_modules/.pnpm/scrypt-js@3.0.1/node_modules/scrypt-js/scrypt.js\n var require_scrypt = __commonJS({\n \"../../../node_modules/.pnpm/scrypt-js@3.0.1/node_modules/scrypt-js/scrypt.js\"(exports3, module) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n (function(root) {\n const MAX_VALUE = 2147483647;\n function SHA2562(m2) {\n const K2 = new Uint32Array([\n 1116352408,\n 1899447441,\n 3049323471,\n 3921009573,\n 961987163,\n 1508970993,\n 2453635748,\n 2870763221,\n 3624381080,\n 310598401,\n 607225278,\n 1426881987,\n 1925078388,\n 2162078206,\n 2614888103,\n 3248222580,\n 3835390401,\n 4022224774,\n 264347078,\n 604807628,\n 770255983,\n 1249150122,\n 1555081692,\n 1996064986,\n 2554220882,\n 2821834349,\n 2952996808,\n 3210313671,\n 3336571891,\n 3584528711,\n 113926993,\n 338241895,\n 666307205,\n 773529912,\n 1294757372,\n 1396182291,\n 1695183700,\n 1986661051,\n 2177026350,\n 2456956037,\n 2730485921,\n 2820302411,\n 3259730800,\n 3345764771,\n 3516065817,\n 3600352804,\n 4094571909,\n 275423344,\n 430227734,\n 506948616,\n 659060556,\n 883997877,\n 958139571,\n 1322822218,\n 1537002063,\n 1747873779,\n 1955562222,\n 2024104815,\n 2227730452,\n 2361852424,\n 2428436474,\n 2756734187,\n 3204031479,\n 3329325298\n ]);\n let h0 = 1779033703, h1 = 3144134277, h22 = 1013904242, h32 = 2773480762;\n let h4 = 1359893119, h5 = 2600822924, h6 = 528734635, h7 = 1541459225;\n const w3 = new Uint32Array(64);\n function blocks(p5) {\n let off2 = 0, len = p5.length;\n while (len >= 64) {\n let a3 = h0, b4 = h1, c4 = h22, d5 = h32, e3 = h4, f6 = h5, g4 = h6, h8 = h7, u2, i4, j2, t1, t22;\n for (i4 = 0; i4 < 16; i4++) {\n j2 = off2 + i4 * 4;\n w3[i4] = (p5[j2] & 255) << 24 | (p5[j2 + 1] & 255) << 16 | (p5[j2 + 2] & 255) << 8 | p5[j2 + 3] & 255;\n }\n for (i4 = 16; i4 < 64; i4++) {\n u2 = w3[i4 - 2];\n t1 = (u2 >>> 17 | u2 << 32 - 17) ^ (u2 >>> 19 | u2 << 32 - 19) ^ u2 >>> 10;\n u2 = w3[i4 - 15];\n t22 = (u2 >>> 7 | u2 << 32 - 7) ^ (u2 >>> 18 | u2 << 32 - 18) ^ u2 >>> 3;\n w3[i4] = (t1 + w3[i4 - 7] | 0) + (t22 + w3[i4 - 16] | 0) | 0;\n }\n for (i4 = 0; i4 < 64; i4++) {\n t1 = (((e3 >>> 6 | e3 << 32 - 6) ^ (e3 >>> 11 | e3 << 32 - 11) ^ (e3 >>> 25 | e3 << 32 - 25)) + (e3 & f6 ^ ~e3 & g4) | 0) + (h8 + (K2[i4] + w3[i4] | 0) | 0) | 0;\n t22 = ((a3 >>> 2 | a3 << 32 - 2) ^ (a3 >>> 13 | a3 << 32 - 13) ^ (a3 >>> 22 | a3 << 32 - 22)) + (a3 & b4 ^ a3 & c4 ^ b4 & c4) | 0;\n h8 = g4;\n g4 = f6;\n f6 = e3;\n e3 = d5 + t1 | 0;\n d5 = c4;\n c4 = b4;\n b4 = a3;\n a3 = t1 + t22 | 0;\n }\n h0 = h0 + a3 | 0;\n h1 = h1 + b4 | 0;\n h22 = h22 + c4 | 0;\n h32 = h32 + d5 | 0;\n h4 = h4 + e3 | 0;\n h5 = h5 + f6 | 0;\n h6 = h6 + g4 | 0;\n h7 = h7 + h8 | 0;\n off2 += 64;\n len -= 64;\n }\n }\n blocks(m2);\n let i3, bytesLeft = m2.length % 64, bitLenHi = m2.length / 536870912 | 0, bitLenLo = m2.length << 3, numZeros = bytesLeft < 56 ? 56 : 120, p4 = m2.slice(m2.length - bytesLeft, m2.length);\n p4.push(128);\n for (i3 = bytesLeft + 1; i3 < numZeros; i3++) {\n p4.push(0);\n }\n p4.push(bitLenHi >>> 24 & 255);\n p4.push(bitLenHi >>> 16 & 255);\n p4.push(bitLenHi >>> 8 & 255);\n p4.push(bitLenHi >>> 0 & 255);\n p4.push(bitLenLo >>> 24 & 255);\n p4.push(bitLenLo >>> 16 & 255);\n p4.push(bitLenLo >>> 8 & 255);\n p4.push(bitLenLo >>> 0 & 255);\n blocks(p4);\n return [\n h0 >>> 24 & 255,\n h0 >>> 16 & 255,\n h0 >>> 8 & 255,\n h0 >>> 0 & 255,\n h1 >>> 24 & 255,\n h1 >>> 16 & 255,\n h1 >>> 8 & 255,\n h1 >>> 0 & 255,\n h22 >>> 24 & 255,\n h22 >>> 16 & 255,\n h22 >>> 8 & 255,\n h22 >>> 0 & 255,\n h32 >>> 24 & 255,\n h32 >>> 16 & 255,\n h32 >>> 8 & 255,\n h32 >>> 0 & 255,\n h4 >>> 24 & 255,\n h4 >>> 16 & 255,\n h4 >>> 8 & 255,\n h4 >>> 0 & 255,\n h5 >>> 24 & 255,\n h5 >>> 16 & 255,\n h5 >>> 8 & 255,\n h5 >>> 0 & 255,\n h6 >>> 24 & 255,\n h6 >>> 16 & 255,\n h6 >>> 8 & 255,\n h6 >>> 0 & 255,\n h7 >>> 24 & 255,\n h7 >>> 16 & 255,\n h7 >>> 8 & 255,\n h7 >>> 0 & 255\n ];\n }\n function PBKDF2_HMAC_SHA256_OneIter(password, salt, dkLen) {\n password = password.length <= 64 ? password : SHA2562(password);\n const innerLen = 64 + salt.length + 4;\n const inner = new Array(innerLen);\n const outerKey = new Array(64);\n let i3;\n let dk = [];\n for (i3 = 0; i3 < 64; i3++) {\n inner[i3] = 54;\n }\n for (i3 = 0; i3 < password.length; i3++) {\n inner[i3] ^= password[i3];\n }\n for (i3 = 0; i3 < salt.length; i3++) {\n inner[64 + i3] = salt[i3];\n }\n for (i3 = innerLen - 4; i3 < innerLen; i3++) {\n inner[i3] = 0;\n }\n for (i3 = 0; i3 < 64; i3++)\n outerKey[i3] = 92;\n for (i3 = 0; i3 < password.length; i3++)\n outerKey[i3] ^= password[i3];\n function incrementCounter() {\n for (let i4 = innerLen - 1; i4 >= innerLen - 4; i4--) {\n inner[i4]++;\n if (inner[i4] <= 255)\n return;\n inner[i4] = 0;\n }\n }\n while (dkLen >= 32) {\n incrementCounter();\n dk = dk.concat(SHA2562(outerKey.concat(SHA2562(inner))));\n dkLen -= 32;\n }\n if (dkLen > 0) {\n incrementCounter();\n dk = dk.concat(SHA2562(outerKey.concat(SHA2562(inner))).slice(0, dkLen));\n }\n return dk;\n }\n function blockmix_salsa8(BY, Yi, r2, x4, _X) {\n let i3;\n arraycopy(BY, (2 * r2 - 1) * 16, _X, 0, 16);\n for (i3 = 0; i3 < 2 * r2; i3++) {\n blockxor(BY, i3 * 16, _X, 16);\n salsa20_8(_X, x4);\n arraycopy(_X, 0, BY, Yi + i3 * 16, 16);\n }\n for (i3 = 0; i3 < r2; i3++) {\n arraycopy(BY, Yi + i3 * 2 * 16, BY, i3 * 16, 16);\n }\n for (i3 = 0; i3 < r2; i3++) {\n arraycopy(BY, Yi + (i3 * 2 + 1) * 16, BY, (i3 + r2) * 16, 16);\n }\n }\n function R3(a3, b4) {\n return a3 << b4 | a3 >>> 32 - b4;\n }\n function salsa20_8(B2, x4) {\n arraycopy(B2, 0, x4, 0, 16);\n for (let i3 = 8; i3 > 0; i3 -= 2) {\n x4[4] ^= R3(x4[0] + x4[12], 7);\n x4[8] ^= R3(x4[4] + x4[0], 9);\n x4[12] ^= R3(x4[8] + x4[4], 13);\n x4[0] ^= R3(x4[12] + x4[8], 18);\n x4[9] ^= R3(x4[5] + x4[1], 7);\n x4[13] ^= R3(x4[9] + x4[5], 9);\n x4[1] ^= R3(x4[13] + x4[9], 13);\n x4[5] ^= R3(x4[1] + x4[13], 18);\n x4[14] ^= R3(x4[10] + x4[6], 7);\n x4[2] ^= R3(x4[14] + x4[10], 9);\n x4[6] ^= R3(x4[2] + x4[14], 13);\n x4[10] ^= R3(x4[6] + x4[2], 18);\n x4[3] ^= R3(x4[15] + x4[11], 7);\n x4[7] ^= R3(x4[3] + x4[15], 9);\n x4[11] ^= R3(x4[7] + x4[3], 13);\n x4[15] ^= R3(x4[11] + x4[7], 18);\n x4[1] ^= R3(x4[0] + x4[3], 7);\n x4[2] ^= R3(x4[1] + x4[0], 9);\n x4[3] ^= R3(x4[2] + x4[1], 13);\n x4[0] ^= R3(x4[3] + x4[2], 18);\n x4[6] ^= R3(x4[5] + x4[4], 7);\n x4[7] ^= R3(x4[6] + x4[5], 9);\n x4[4] ^= R3(x4[7] + x4[6], 13);\n x4[5] ^= R3(x4[4] + x4[7], 18);\n x4[11] ^= R3(x4[10] + x4[9], 7);\n x4[8] ^= R3(x4[11] + x4[10], 9);\n x4[9] ^= R3(x4[8] + x4[11], 13);\n x4[10] ^= R3(x4[9] + x4[8], 18);\n x4[12] ^= R3(x4[15] + x4[14], 7);\n x4[13] ^= R3(x4[12] + x4[15], 9);\n x4[14] ^= R3(x4[13] + x4[12], 13);\n x4[15] ^= R3(x4[14] + x4[13], 18);\n }\n for (let i3 = 0; i3 < 16; ++i3) {\n B2[i3] += x4[i3];\n }\n }\n function blockxor(S3, Si, D2, len) {\n for (let i3 = 0; i3 < len; i3++) {\n D2[i3] ^= S3[Si + i3];\n }\n }\n function arraycopy(src, srcPos, dest, destPos, length2) {\n while (length2--) {\n dest[destPos++] = src[srcPos++];\n }\n }\n function checkBufferish(o5) {\n if (!o5 || typeof o5.length !== \"number\") {\n return false;\n }\n for (let i3 = 0; i3 < o5.length; i3++) {\n const v2 = o5[i3];\n if (typeof v2 !== \"number\" || v2 % 1 || v2 < 0 || v2 >= 256) {\n return false;\n }\n }\n return true;\n }\n function ensureInteger(value, name) {\n if (typeof value !== \"number\" || value % 1) {\n throw new Error(\"invalid \" + name);\n }\n return value;\n }\n function _scrypt(password, salt, N4, r2, p4, dkLen, callback) {\n N4 = ensureInteger(N4, \"N\");\n r2 = ensureInteger(r2, \"r\");\n p4 = ensureInteger(p4, \"p\");\n dkLen = ensureInteger(dkLen, \"dkLen\");\n if (N4 === 0 || (N4 & N4 - 1) !== 0) {\n throw new Error(\"N must be power of 2\");\n }\n if (N4 > MAX_VALUE / 128 / r2) {\n throw new Error(\"N too large\");\n }\n if (r2 > MAX_VALUE / 128 / p4) {\n throw new Error(\"r too large\");\n }\n if (!checkBufferish(password)) {\n throw new Error(\"password must be an array or buffer\");\n }\n password = Array.prototype.slice.call(password);\n if (!checkBufferish(salt)) {\n throw new Error(\"salt must be an array or buffer\");\n }\n salt = Array.prototype.slice.call(salt);\n let b4 = PBKDF2_HMAC_SHA256_OneIter(password, salt, p4 * 128 * r2);\n const B2 = new Uint32Array(p4 * 32 * r2);\n for (let i3 = 0; i3 < B2.length; i3++) {\n const j2 = i3 * 4;\n B2[i3] = (b4[j2 + 3] & 255) << 24 | (b4[j2 + 2] & 255) << 16 | (b4[j2 + 1] & 255) << 8 | (b4[j2 + 0] & 255) << 0;\n }\n const XY = new Uint32Array(64 * r2);\n const V2 = new Uint32Array(32 * r2 * N4);\n const Yi = 32 * r2;\n const x4 = new Uint32Array(16);\n const _X = new Uint32Array(16);\n const totalOps = p4 * N4 * 2;\n let currentOp = 0;\n let lastPercent10 = null;\n let stop = false;\n let state = 0;\n let i0 = 0, i1;\n let Bi;\n const limit = callback ? parseInt(1e3 / r2) : 4294967295;\n const nextTick2 = typeof setImmediate !== \"undefined\" ? setImmediate : setTimeout;\n const incrementalSMix = function() {\n if (stop) {\n return callback(new Error(\"cancelled\"), currentOp / totalOps);\n }\n let steps;\n switch (state) {\n case 0:\n Bi = i0 * 32 * r2;\n arraycopy(B2, Bi, XY, 0, Yi);\n state = 1;\n i1 = 0;\n case 1:\n steps = N4 - i1;\n if (steps > limit) {\n steps = limit;\n }\n for (let i3 = 0; i3 < steps; i3++) {\n arraycopy(XY, 0, V2, (i1 + i3) * Yi, Yi);\n blockmix_salsa8(XY, Yi, r2, x4, _X);\n }\n i1 += steps;\n currentOp += steps;\n if (callback) {\n const percent10 = parseInt(1e3 * currentOp / totalOps);\n if (percent10 !== lastPercent10) {\n stop = callback(null, currentOp / totalOps);\n if (stop) {\n break;\n }\n lastPercent10 = percent10;\n }\n }\n if (i1 < N4) {\n break;\n }\n i1 = 0;\n state = 2;\n case 2:\n steps = N4 - i1;\n if (steps > limit) {\n steps = limit;\n }\n for (let i3 = 0; i3 < steps; i3++) {\n const offset = (2 * r2 - 1) * 16;\n const j2 = XY[offset] & N4 - 1;\n blockxor(V2, j2 * Yi, XY, Yi);\n blockmix_salsa8(XY, Yi, r2, x4, _X);\n }\n i1 += steps;\n currentOp += steps;\n if (callback) {\n const percent10 = parseInt(1e3 * currentOp / totalOps);\n if (percent10 !== lastPercent10) {\n stop = callback(null, currentOp / totalOps);\n if (stop) {\n break;\n }\n lastPercent10 = percent10;\n }\n }\n if (i1 < N4) {\n break;\n }\n arraycopy(XY, 0, B2, Bi, Yi);\n i0++;\n if (i0 < p4) {\n state = 0;\n break;\n }\n b4 = [];\n for (let i3 = 0; i3 < B2.length; i3++) {\n b4.push(B2[i3] >> 0 & 255);\n b4.push(B2[i3] >> 8 & 255);\n b4.push(B2[i3] >> 16 & 255);\n b4.push(B2[i3] >> 24 & 255);\n }\n const derivedKey = PBKDF2_HMAC_SHA256_OneIter(password, b4, dkLen);\n if (callback) {\n callback(null, 1, derivedKey);\n }\n return derivedKey;\n }\n if (callback) {\n nextTick2(incrementalSMix);\n }\n };\n if (!callback) {\n while (true) {\n const derivedKey = incrementalSMix();\n if (derivedKey != void 0) {\n return derivedKey;\n }\n }\n }\n incrementalSMix();\n }\n const lib = {\n scrypt: function(password, salt, N4, r2, p4, dkLen, progressCallback) {\n return new Promise(function(resolve, reject) {\n let lastProgress = 0;\n if (progressCallback) {\n progressCallback(0);\n }\n _scrypt(password, salt, N4, r2, p4, dkLen, function(error, progress, key) {\n if (error) {\n reject(error);\n } else if (key) {\n if (progressCallback && lastProgress !== 1) {\n progressCallback(1);\n }\n resolve(new Uint8Array(key));\n } else if (progressCallback && progress !== lastProgress) {\n lastProgress = progress;\n return progressCallback(progress);\n }\n });\n });\n },\n syncScrypt: function(password, salt, N4, r2, p4, dkLen) {\n return new Uint8Array(_scrypt(password, salt, N4, r2, p4, dkLen));\n }\n };\n if (typeof exports3 !== \"undefined\") {\n module.exports = lib;\n } else if (typeof define === \"function\" && define.amd) {\n define(lib);\n } else if (root) {\n if (root.scrypt) {\n root._scrypt = root.scrypt;\n }\n root.scrypt = lib;\n }\n })(exports3);\n }\n });\n\n // ../../../node_modules/.pnpm/@ethersproject+json-wallets@5.8.0/node_modules/@ethersproject/json-wallets/lib/keystore.js\n var require_keystore = __commonJS({\n \"../../../node_modules/.pnpm/@ethersproject+json-wallets@5.8.0/node_modules/@ethersproject/json-wallets/lib/keystore.js\"(exports3) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n var __extends3 = exports3 && exports3.__extends || /* @__PURE__ */ function() {\n var extendStatics3 = function(d5, b4) {\n extendStatics3 = Object.setPrototypeOf || { __proto__: [] } instanceof Array && function(d6, b5) {\n d6.__proto__ = b5;\n } || function(d6, b5) {\n for (var p4 in b5)\n if (Object.prototype.hasOwnProperty.call(b5, p4))\n d6[p4] = b5[p4];\n };\n return extendStatics3(d5, b4);\n };\n return function(d5, b4) {\n if (typeof b4 !== \"function\" && b4 !== null)\n throw new TypeError(\"Class extends value \" + String(b4) + \" is not a constructor or null\");\n extendStatics3(d5, b4);\n function __() {\n this.constructor = d5;\n }\n d5.prototype = b4 === null ? Object.create(b4) : (__.prototype = b4.prototype, new __());\n };\n }();\n var __awaiter3 = exports3 && exports3.__awaiter || function(thisArg, _arguments, P2, generator) {\n function adopt(value) {\n return value instanceof P2 ? value : new P2(function(resolve) {\n resolve(value);\n });\n }\n return new (P2 || (P2 = Promise))(function(resolve, reject) {\n function fulfilled(value) {\n try {\n step(generator.next(value));\n } catch (e3) {\n reject(e3);\n }\n }\n function rejected(value) {\n try {\n step(generator[\"throw\"](value));\n } catch (e3) {\n reject(e3);\n }\n }\n function step(result) {\n result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected);\n }\n step((generator = generator.apply(thisArg, _arguments || [])).next());\n });\n };\n var __generator3 = exports3 && exports3.__generator || function(thisArg, body) {\n var _2 = { label: 0, sent: function() {\n if (t3[0] & 1)\n throw t3[1];\n return t3[1];\n }, trys: [], ops: [] }, f6, y6, t3, g4;\n return g4 = { next: verb(0), \"throw\": verb(1), \"return\": verb(2) }, typeof Symbol === \"function\" && (g4[Symbol.iterator] = function() {\n return this;\n }), g4;\n function verb(n2) {\n return function(v2) {\n return step([n2, v2]);\n };\n }\n function step(op) {\n if (f6)\n throw new TypeError(\"Generator is already executing.\");\n while (_2)\n try {\n if (f6 = 1, y6 && (t3 = op[0] & 2 ? y6[\"return\"] : op[0] ? y6[\"throw\"] || ((t3 = y6[\"return\"]) && t3.call(y6), 0) : y6.next) && !(t3 = t3.call(y6, op[1])).done)\n return t3;\n if (y6 = 0, t3)\n op = [op[0] & 2, t3.value];\n switch (op[0]) {\n case 0:\n case 1:\n t3 = op;\n break;\n case 4:\n _2.label++;\n return { value: op[1], done: false };\n case 5:\n _2.label++;\n y6 = op[1];\n op = [0];\n continue;\n case 7:\n op = _2.ops.pop();\n _2.trys.pop();\n continue;\n default:\n if (!(t3 = _2.trys, t3 = t3.length > 0 && t3[t3.length - 1]) && (op[0] === 6 || op[0] === 2)) {\n _2 = 0;\n continue;\n }\n if (op[0] === 3 && (!t3 || op[1] > t3[0] && op[1] < t3[3])) {\n _2.label = op[1];\n break;\n }\n if (op[0] === 6 && _2.label < t3[1]) {\n _2.label = t3[1];\n t3 = op;\n break;\n }\n if (t3 && _2.label < t3[2]) {\n _2.label = t3[2];\n _2.ops.push(op);\n break;\n }\n if (t3[2])\n _2.ops.pop();\n _2.trys.pop();\n continue;\n }\n op = body.call(thisArg, _2);\n } catch (e3) {\n op = [6, e3];\n y6 = 0;\n } finally {\n f6 = t3 = 0;\n }\n if (op[0] & 5)\n throw op[1];\n return { value: op[0] ? op[1] : void 0, done: true };\n }\n };\n var __importDefault3 = exports3 && exports3.__importDefault || function(mod3) {\n return mod3 && mod3.__esModule ? mod3 : { \"default\": mod3 };\n };\n Object.defineProperty(exports3, \"__esModule\", { value: true });\n exports3.encrypt = exports3.decrypt = exports3.decryptSync = exports3.KeystoreAccount = void 0;\n var aes_js_1 = __importDefault3(require_aes_js());\n var scrypt_js_1 = __importDefault3(require_scrypt());\n var address_1 = require_lib7();\n var bytes_1 = require_lib2();\n var hdnode_1 = require_lib23();\n var keccak256_1 = require_lib5();\n var pbkdf2_1 = require_lib21();\n var random_1 = require_lib24();\n var properties_1 = require_lib4();\n var transactions_1 = require_lib17();\n var utils_1 = require_utils5();\n var logger_1 = require_lib();\n var _version_1 = require_version19();\n var logger = new logger_1.Logger(_version_1.version);\n function hasMnemonic(value) {\n return value != null && value.mnemonic && value.mnemonic.phrase;\n }\n var KeystoreAccount = (\n /** @class */\n function(_super) {\n __extends3(KeystoreAccount2, _super);\n function KeystoreAccount2() {\n return _super !== null && _super.apply(this, arguments) || this;\n }\n KeystoreAccount2.prototype.isKeystoreAccount = function(value) {\n return !!(value && value._isKeystoreAccount);\n };\n return KeystoreAccount2;\n }(properties_1.Description)\n );\n exports3.KeystoreAccount = KeystoreAccount;\n function _decrypt(data, key, ciphertext) {\n var cipher = (0, utils_1.searchPath)(data, \"crypto/cipher\");\n if (cipher === \"aes-128-ctr\") {\n var iv = (0, utils_1.looseArrayify)((0, utils_1.searchPath)(data, \"crypto/cipherparams/iv\"));\n var counter = new aes_js_1.default.Counter(iv);\n var aesCtr = new aes_js_1.default.ModeOfOperation.ctr(key, counter);\n return (0, bytes_1.arrayify)(aesCtr.decrypt(ciphertext));\n }\n return null;\n }\n function _getAccount(data, key) {\n var ciphertext = (0, utils_1.looseArrayify)((0, utils_1.searchPath)(data, \"crypto/ciphertext\"));\n var computedMAC = (0, bytes_1.hexlify)((0, keccak256_1.keccak256)((0, bytes_1.concat)([key.slice(16, 32), ciphertext]))).substring(2);\n if (computedMAC !== (0, utils_1.searchPath)(data, \"crypto/mac\").toLowerCase()) {\n throw new Error(\"invalid password\");\n }\n var privateKey = _decrypt(data, key.slice(0, 16), ciphertext);\n if (!privateKey) {\n logger.throwError(\"unsupported cipher\", logger_1.Logger.errors.UNSUPPORTED_OPERATION, {\n operation: \"decrypt\"\n });\n }\n var mnemonicKey = key.slice(32, 64);\n var address = (0, transactions_1.computeAddress)(privateKey);\n if (data.address) {\n var check = data.address.toLowerCase();\n if (check.substring(0, 2) !== \"0x\") {\n check = \"0x\" + check;\n }\n if ((0, address_1.getAddress)(check) !== address) {\n throw new Error(\"address mismatch\");\n }\n }\n var account = {\n _isKeystoreAccount: true,\n address,\n privateKey: (0, bytes_1.hexlify)(privateKey)\n };\n if ((0, utils_1.searchPath)(data, \"x-ethers/version\") === \"0.1\") {\n var mnemonicCiphertext = (0, utils_1.looseArrayify)((0, utils_1.searchPath)(data, \"x-ethers/mnemonicCiphertext\"));\n var mnemonicIv = (0, utils_1.looseArrayify)((0, utils_1.searchPath)(data, \"x-ethers/mnemonicCounter\"));\n var mnemonicCounter = new aes_js_1.default.Counter(mnemonicIv);\n var mnemonicAesCtr = new aes_js_1.default.ModeOfOperation.ctr(mnemonicKey, mnemonicCounter);\n var path = (0, utils_1.searchPath)(data, \"x-ethers/path\") || hdnode_1.defaultPath;\n var locale = (0, utils_1.searchPath)(data, \"x-ethers/locale\") || \"en\";\n var entropy = (0, bytes_1.arrayify)(mnemonicAesCtr.decrypt(mnemonicCiphertext));\n try {\n var mnemonic = (0, hdnode_1.entropyToMnemonic)(entropy, locale);\n var node = hdnode_1.HDNode.fromMnemonic(mnemonic, null, locale).derivePath(path);\n if (node.privateKey != account.privateKey) {\n throw new Error(\"mnemonic mismatch\");\n }\n account.mnemonic = node.mnemonic;\n } catch (error) {\n if (error.code !== logger_1.Logger.errors.INVALID_ARGUMENT || error.argument !== \"wordlist\") {\n throw error;\n }\n }\n }\n return new KeystoreAccount(account);\n }\n function pbkdf2Sync(passwordBytes, salt, count, dkLen, prfFunc) {\n return (0, bytes_1.arrayify)((0, pbkdf2_1.pbkdf2)(passwordBytes, salt, count, dkLen, prfFunc));\n }\n function pbkdf22(passwordBytes, salt, count, dkLen, prfFunc) {\n return Promise.resolve(pbkdf2Sync(passwordBytes, salt, count, dkLen, prfFunc));\n }\n function _computeKdfKey(data, password, pbkdf2Func, scryptFunc, progressCallback) {\n var passwordBytes = (0, utils_1.getPassword)(password);\n var kdf = (0, utils_1.searchPath)(data, \"crypto/kdf\");\n if (kdf && typeof kdf === \"string\") {\n var throwError = function(name, value) {\n return logger.throwArgumentError(\"invalid key-derivation function parameters\", name, value);\n };\n if (kdf.toLowerCase() === \"scrypt\") {\n var salt = (0, utils_1.looseArrayify)((0, utils_1.searchPath)(data, \"crypto/kdfparams/salt\"));\n var N4 = parseInt((0, utils_1.searchPath)(data, \"crypto/kdfparams/n\"));\n var r2 = parseInt((0, utils_1.searchPath)(data, \"crypto/kdfparams/r\"));\n var p4 = parseInt((0, utils_1.searchPath)(data, \"crypto/kdfparams/p\"));\n if (!N4 || !r2 || !p4) {\n throwError(\"kdf\", kdf);\n }\n if ((N4 & N4 - 1) !== 0) {\n throwError(\"N\", N4);\n }\n var dkLen = parseInt((0, utils_1.searchPath)(data, \"crypto/kdfparams/dklen\"));\n if (dkLen !== 32) {\n throwError(\"dklen\", dkLen);\n }\n return scryptFunc(passwordBytes, salt, N4, r2, p4, 64, progressCallback);\n } else if (kdf.toLowerCase() === \"pbkdf2\") {\n var salt = (0, utils_1.looseArrayify)((0, utils_1.searchPath)(data, \"crypto/kdfparams/salt\"));\n var prfFunc = null;\n var prf = (0, utils_1.searchPath)(data, \"crypto/kdfparams/prf\");\n if (prf === \"hmac-sha256\") {\n prfFunc = \"sha256\";\n } else if (prf === \"hmac-sha512\") {\n prfFunc = \"sha512\";\n } else {\n throwError(\"prf\", prf);\n }\n var count = parseInt((0, utils_1.searchPath)(data, \"crypto/kdfparams/c\"));\n var dkLen = parseInt((0, utils_1.searchPath)(data, \"crypto/kdfparams/dklen\"));\n if (dkLen !== 32) {\n throwError(\"dklen\", dkLen);\n }\n return pbkdf2Func(passwordBytes, salt, count, dkLen, prfFunc);\n }\n }\n return logger.throwArgumentError(\"unsupported key-derivation function\", \"kdf\", kdf);\n }\n function decryptSync(json, password) {\n var data = JSON.parse(json);\n var key = _computeKdfKey(data, password, pbkdf2Sync, scrypt_js_1.default.syncScrypt);\n return _getAccount(data, key);\n }\n exports3.decryptSync = decryptSync;\n function decrypt(json, password, progressCallback) {\n return __awaiter3(this, void 0, void 0, function() {\n var data, key;\n return __generator3(this, function(_a) {\n switch (_a.label) {\n case 0:\n data = JSON.parse(json);\n return [4, _computeKdfKey(data, password, pbkdf22, scrypt_js_1.default.scrypt, progressCallback)];\n case 1:\n key = _a.sent();\n return [2, _getAccount(data, key)];\n }\n });\n });\n }\n exports3.decrypt = decrypt;\n function encrypt(account, password, options, progressCallback) {\n try {\n if ((0, address_1.getAddress)(account.address) !== (0, transactions_1.computeAddress)(account.privateKey)) {\n throw new Error(\"address/privateKey mismatch\");\n }\n if (hasMnemonic(account)) {\n var mnemonic = account.mnemonic;\n var node = hdnode_1.HDNode.fromMnemonic(mnemonic.phrase, null, mnemonic.locale).derivePath(mnemonic.path || hdnode_1.defaultPath);\n if (node.privateKey != account.privateKey) {\n throw new Error(\"mnemonic mismatch\");\n }\n }\n } catch (e3) {\n return Promise.reject(e3);\n }\n if (typeof options === \"function\" && !progressCallback) {\n progressCallback = options;\n options = {};\n }\n if (!options) {\n options = {};\n }\n var privateKey = (0, bytes_1.arrayify)(account.privateKey);\n var passwordBytes = (0, utils_1.getPassword)(password);\n var entropy = null;\n var path = null;\n var locale = null;\n if (hasMnemonic(account)) {\n var srcMnemonic = account.mnemonic;\n entropy = (0, bytes_1.arrayify)((0, hdnode_1.mnemonicToEntropy)(srcMnemonic.phrase, srcMnemonic.locale || \"en\"));\n path = srcMnemonic.path || hdnode_1.defaultPath;\n locale = srcMnemonic.locale || \"en\";\n }\n var client = options.client;\n if (!client) {\n client = \"ethers.js\";\n }\n var salt = null;\n if (options.salt) {\n salt = (0, bytes_1.arrayify)(options.salt);\n } else {\n salt = (0, random_1.randomBytes)(32);\n ;\n }\n var iv = null;\n if (options.iv) {\n iv = (0, bytes_1.arrayify)(options.iv);\n if (iv.length !== 16) {\n throw new Error(\"invalid iv\");\n }\n } else {\n iv = (0, random_1.randomBytes)(16);\n }\n var uuidRandom = null;\n if (options.uuid) {\n uuidRandom = (0, bytes_1.arrayify)(options.uuid);\n if (uuidRandom.length !== 16) {\n throw new Error(\"invalid uuid\");\n }\n } else {\n uuidRandom = (0, random_1.randomBytes)(16);\n }\n var N4 = 1 << 17, r2 = 8, p4 = 1;\n if (options.scrypt) {\n if (options.scrypt.N) {\n N4 = options.scrypt.N;\n }\n if (options.scrypt.r) {\n r2 = options.scrypt.r;\n }\n if (options.scrypt.p) {\n p4 = options.scrypt.p;\n }\n }\n return scrypt_js_1.default.scrypt(passwordBytes, salt, N4, r2, p4, 64, progressCallback).then(function(key) {\n key = (0, bytes_1.arrayify)(key);\n var derivedKey = key.slice(0, 16);\n var macPrefix = key.slice(16, 32);\n var mnemonicKey = key.slice(32, 64);\n var counter = new aes_js_1.default.Counter(iv);\n var aesCtr = new aes_js_1.default.ModeOfOperation.ctr(derivedKey, counter);\n var ciphertext = (0, bytes_1.arrayify)(aesCtr.encrypt(privateKey));\n var mac = (0, keccak256_1.keccak256)((0, bytes_1.concat)([macPrefix, ciphertext]));\n var data = {\n address: account.address.substring(2).toLowerCase(),\n id: (0, utils_1.uuidV4)(uuidRandom),\n version: 3,\n crypto: {\n cipher: \"aes-128-ctr\",\n cipherparams: {\n iv: (0, bytes_1.hexlify)(iv).substring(2)\n },\n ciphertext: (0, bytes_1.hexlify)(ciphertext).substring(2),\n kdf: \"scrypt\",\n kdfparams: {\n salt: (0, bytes_1.hexlify)(salt).substring(2),\n n: N4,\n dklen: 32,\n p: p4,\n r: r2\n },\n mac: mac.substring(2)\n }\n };\n if (entropy) {\n var mnemonicIv = (0, random_1.randomBytes)(16);\n var mnemonicCounter = new aes_js_1.default.Counter(mnemonicIv);\n var mnemonicAesCtr = new aes_js_1.default.ModeOfOperation.ctr(mnemonicKey, mnemonicCounter);\n var mnemonicCiphertext = (0, bytes_1.arrayify)(mnemonicAesCtr.encrypt(entropy));\n var now = /* @__PURE__ */ new Date();\n var timestamp = now.getUTCFullYear() + \"-\" + (0, utils_1.zpad)(now.getUTCMonth() + 1, 2) + \"-\" + (0, utils_1.zpad)(now.getUTCDate(), 2) + \"T\" + (0, utils_1.zpad)(now.getUTCHours(), 2) + \"-\" + (0, utils_1.zpad)(now.getUTCMinutes(), 2) + \"-\" + (0, utils_1.zpad)(now.getUTCSeconds(), 2) + \".0Z\";\n data[\"x-ethers\"] = {\n client,\n gethFilename: \"UTC--\" + timestamp + \"--\" + data.address,\n mnemonicCounter: (0, bytes_1.hexlify)(mnemonicIv).substring(2),\n mnemonicCiphertext: (0, bytes_1.hexlify)(mnemonicCiphertext).substring(2),\n path,\n locale,\n version: \"0.1\"\n };\n }\n return JSON.stringify(data);\n });\n }\n exports3.encrypt = encrypt;\n }\n });\n\n // ../../../node_modules/.pnpm/@ethersproject+json-wallets@5.8.0/node_modules/@ethersproject/json-wallets/lib/index.js\n var require_lib25 = __commonJS({\n \"../../../node_modules/.pnpm/@ethersproject+json-wallets@5.8.0/node_modules/@ethersproject/json-wallets/lib/index.js\"(exports3) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n Object.defineProperty(exports3, \"__esModule\", { value: true });\n exports3.decryptJsonWalletSync = exports3.decryptJsonWallet = exports3.getJsonWalletAddress = exports3.isKeystoreWallet = exports3.isCrowdsaleWallet = exports3.encryptKeystore = exports3.decryptKeystoreSync = exports3.decryptKeystore = exports3.decryptCrowdsale = void 0;\n var crowdsale_1 = require_crowdsale();\n Object.defineProperty(exports3, \"decryptCrowdsale\", { enumerable: true, get: function() {\n return crowdsale_1.decrypt;\n } });\n var inspect_1 = require_inspect();\n Object.defineProperty(exports3, \"getJsonWalletAddress\", { enumerable: true, get: function() {\n return inspect_1.getJsonWalletAddress;\n } });\n Object.defineProperty(exports3, \"isCrowdsaleWallet\", { enumerable: true, get: function() {\n return inspect_1.isCrowdsaleWallet;\n } });\n Object.defineProperty(exports3, \"isKeystoreWallet\", { enumerable: true, get: function() {\n return inspect_1.isKeystoreWallet;\n } });\n var keystore_1 = require_keystore();\n Object.defineProperty(exports3, \"decryptKeystore\", { enumerable: true, get: function() {\n return keystore_1.decrypt;\n } });\n Object.defineProperty(exports3, \"decryptKeystoreSync\", { enumerable: true, get: function() {\n return keystore_1.decryptSync;\n } });\n Object.defineProperty(exports3, \"encryptKeystore\", { enumerable: true, get: function() {\n return keystore_1.encrypt;\n } });\n function decryptJsonWallet(json, password, progressCallback) {\n if ((0, inspect_1.isCrowdsaleWallet)(json)) {\n if (progressCallback) {\n progressCallback(0);\n }\n var account = (0, crowdsale_1.decrypt)(json, password);\n if (progressCallback) {\n progressCallback(1);\n }\n return Promise.resolve(account);\n }\n if ((0, inspect_1.isKeystoreWallet)(json)) {\n return (0, keystore_1.decrypt)(json, password, progressCallback);\n }\n return Promise.reject(new Error(\"invalid JSON wallet\"));\n }\n exports3.decryptJsonWallet = decryptJsonWallet;\n function decryptJsonWalletSync(json, password) {\n if ((0, inspect_1.isCrowdsaleWallet)(json)) {\n return (0, crowdsale_1.decrypt)(json, password);\n }\n if ((0, inspect_1.isKeystoreWallet)(json)) {\n return (0, keystore_1.decryptSync)(json, password);\n }\n throw new Error(\"invalid JSON wallet\");\n }\n exports3.decryptJsonWalletSync = decryptJsonWalletSync;\n }\n });\n\n // ../../../node_modules/.pnpm/@ethersproject+wallet@5.8.0/node_modules/@ethersproject/wallet/lib/_version.js\n var require_version20 = __commonJS({\n \"../../../node_modules/.pnpm/@ethersproject+wallet@5.8.0/node_modules/@ethersproject/wallet/lib/_version.js\"(exports3) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n Object.defineProperty(exports3, \"__esModule\", { value: true });\n exports3.version = void 0;\n exports3.version = \"wallet/5.8.0\";\n }\n });\n\n // ../../../node_modules/.pnpm/@ethersproject+wallet@5.8.0/node_modules/@ethersproject/wallet/lib/index.js\n var require_lib26 = __commonJS({\n \"../../../node_modules/.pnpm/@ethersproject+wallet@5.8.0/node_modules/@ethersproject/wallet/lib/index.js\"(exports3) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n var __extends3 = exports3 && exports3.__extends || /* @__PURE__ */ function() {\n var extendStatics3 = function(d5, b4) {\n extendStatics3 = Object.setPrototypeOf || { __proto__: [] } instanceof Array && function(d6, b5) {\n d6.__proto__ = b5;\n } || function(d6, b5) {\n for (var p4 in b5)\n if (Object.prototype.hasOwnProperty.call(b5, p4))\n d6[p4] = b5[p4];\n };\n return extendStatics3(d5, b4);\n };\n return function(d5, b4) {\n if (typeof b4 !== \"function\" && b4 !== null)\n throw new TypeError(\"Class extends value \" + String(b4) + \" is not a constructor or null\");\n extendStatics3(d5, b4);\n function __() {\n this.constructor = d5;\n }\n d5.prototype = b4 === null ? Object.create(b4) : (__.prototype = b4.prototype, new __());\n };\n }();\n var __awaiter3 = exports3 && exports3.__awaiter || function(thisArg, _arguments, P2, generator) {\n function adopt(value) {\n return value instanceof P2 ? value : new P2(function(resolve) {\n resolve(value);\n });\n }\n return new (P2 || (P2 = Promise))(function(resolve, reject) {\n function fulfilled(value) {\n try {\n step(generator.next(value));\n } catch (e3) {\n reject(e3);\n }\n }\n function rejected(value) {\n try {\n step(generator[\"throw\"](value));\n } catch (e3) {\n reject(e3);\n }\n }\n function step(result) {\n result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected);\n }\n step((generator = generator.apply(thisArg, _arguments || [])).next());\n });\n };\n var __generator3 = exports3 && exports3.__generator || function(thisArg, body) {\n var _2 = { label: 0, sent: function() {\n if (t3[0] & 1)\n throw t3[1];\n return t3[1];\n }, trys: [], ops: [] }, f6, y6, t3, g4;\n return g4 = { next: verb(0), \"throw\": verb(1), \"return\": verb(2) }, typeof Symbol === \"function\" && (g4[Symbol.iterator] = function() {\n return this;\n }), g4;\n function verb(n2) {\n return function(v2) {\n return step([n2, v2]);\n };\n }\n function step(op) {\n if (f6)\n throw new TypeError(\"Generator is already executing.\");\n while (_2)\n try {\n if (f6 = 1, y6 && (t3 = op[0] & 2 ? y6[\"return\"] : op[0] ? y6[\"throw\"] || ((t3 = y6[\"return\"]) && t3.call(y6), 0) : y6.next) && !(t3 = t3.call(y6, op[1])).done)\n return t3;\n if (y6 = 0, t3)\n op = [op[0] & 2, t3.value];\n switch (op[0]) {\n case 0:\n case 1:\n t3 = op;\n break;\n case 4:\n _2.label++;\n return { value: op[1], done: false };\n case 5:\n _2.label++;\n y6 = op[1];\n op = [0];\n continue;\n case 7:\n op = _2.ops.pop();\n _2.trys.pop();\n continue;\n default:\n if (!(t3 = _2.trys, t3 = t3.length > 0 && t3[t3.length - 1]) && (op[0] === 6 || op[0] === 2)) {\n _2 = 0;\n continue;\n }\n if (op[0] === 3 && (!t3 || op[1] > t3[0] && op[1] < t3[3])) {\n _2.label = op[1];\n break;\n }\n if (op[0] === 6 && _2.label < t3[1]) {\n _2.label = t3[1];\n t3 = op;\n break;\n }\n if (t3 && _2.label < t3[2]) {\n _2.label = t3[2];\n _2.ops.push(op);\n break;\n }\n if (t3[2])\n _2.ops.pop();\n _2.trys.pop();\n continue;\n }\n op = body.call(thisArg, _2);\n } catch (e3) {\n op = [6, e3];\n y6 = 0;\n } finally {\n f6 = t3 = 0;\n }\n if (op[0] & 5)\n throw op[1];\n return { value: op[0] ? op[1] : void 0, done: true };\n }\n };\n Object.defineProperty(exports3, \"__esModule\", { value: true });\n exports3.verifyTypedData = exports3.verifyMessage = exports3.Wallet = void 0;\n var address_1 = require_lib7();\n var abstract_provider_1 = require_lib14();\n var abstract_signer_1 = require_lib15();\n var bytes_1 = require_lib2();\n var hash_1 = require_lib12();\n var hdnode_1 = require_lib23();\n var keccak256_1 = require_lib5();\n var properties_1 = require_lib4();\n var random_1 = require_lib24();\n var signing_key_1 = require_lib16();\n var json_wallets_1 = require_lib25();\n var transactions_1 = require_lib17();\n var logger_1 = require_lib();\n var _version_1 = require_version20();\n var logger = new logger_1.Logger(_version_1.version);\n function isAccount(value) {\n return value != null && (0, bytes_1.isHexString)(value.privateKey, 32) && value.address != null;\n }\n function hasMnemonic(value) {\n var mnemonic = value.mnemonic;\n return mnemonic && mnemonic.phrase;\n }\n var Wallet = (\n /** @class */\n function(_super) {\n __extends3(Wallet2, _super);\n function Wallet2(privateKey, provider) {\n var _this = _super.call(this) || this;\n if (isAccount(privateKey)) {\n var signingKey_1 = new signing_key_1.SigningKey(privateKey.privateKey);\n (0, properties_1.defineReadOnly)(_this, \"_signingKey\", function() {\n return signingKey_1;\n });\n (0, properties_1.defineReadOnly)(_this, \"address\", (0, transactions_1.computeAddress)(_this.publicKey));\n if (_this.address !== (0, address_1.getAddress)(privateKey.address)) {\n logger.throwArgumentError(\"privateKey/address mismatch\", \"privateKey\", \"[REDACTED]\");\n }\n if (hasMnemonic(privateKey)) {\n var srcMnemonic_1 = privateKey.mnemonic;\n (0, properties_1.defineReadOnly)(_this, \"_mnemonic\", function() {\n return {\n phrase: srcMnemonic_1.phrase,\n path: srcMnemonic_1.path || hdnode_1.defaultPath,\n locale: srcMnemonic_1.locale || \"en\"\n };\n });\n var mnemonic = _this.mnemonic;\n var node = hdnode_1.HDNode.fromMnemonic(mnemonic.phrase, null, mnemonic.locale).derivePath(mnemonic.path);\n if ((0, transactions_1.computeAddress)(node.privateKey) !== _this.address) {\n logger.throwArgumentError(\"mnemonic/address mismatch\", \"privateKey\", \"[REDACTED]\");\n }\n } else {\n (0, properties_1.defineReadOnly)(_this, \"_mnemonic\", function() {\n return null;\n });\n }\n } else {\n if (signing_key_1.SigningKey.isSigningKey(privateKey)) {\n if (privateKey.curve !== \"secp256k1\") {\n logger.throwArgumentError(\"unsupported curve; must be secp256k1\", \"privateKey\", \"[REDACTED]\");\n }\n (0, properties_1.defineReadOnly)(_this, \"_signingKey\", function() {\n return privateKey;\n });\n } else {\n if (typeof privateKey === \"string\") {\n if (privateKey.match(/^[0-9a-f]*$/i) && privateKey.length === 64) {\n privateKey = \"0x\" + privateKey;\n }\n }\n var signingKey_2 = new signing_key_1.SigningKey(privateKey);\n (0, properties_1.defineReadOnly)(_this, \"_signingKey\", function() {\n return signingKey_2;\n });\n }\n (0, properties_1.defineReadOnly)(_this, \"_mnemonic\", function() {\n return null;\n });\n (0, properties_1.defineReadOnly)(_this, \"address\", (0, transactions_1.computeAddress)(_this.publicKey));\n }\n if (provider && !abstract_provider_1.Provider.isProvider(provider)) {\n logger.throwArgumentError(\"invalid provider\", \"provider\", provider);\n }\n (0, properties_1.defineReadOnly)(_this, \"provider\", provider || null);\n return _this;\n }\n Object.defineProperty(Wallet2.prototype, \"mnemonic\", {\n get: function() {\n return this._mnemonic();\n },\n enumerable: false,\n configurable: true\n });\n Object.defineProperty(Wallet2.prototype, \"privateKey\", {\n get: function() {\n return this._signingKey().privateKey;\n },\n enumerable: false,\n configurable: true\n });\n Object.defineProperty(Wallet2.prototype, \"publicKey\", {\n get: function() {\n return this._signingKey().publicKey;\n },\n enumerable: false,\n configurable: true\n });\n Wallet2.prototype.getAddress = function() {\n return Promise.resolve(this.address);\n };\n Wallet2.prototype.connect = function(provider) {\n return new Wallet2(this, provider);\n };\n Wallet2.prototype.signTransaction = function(transaction) {\n var _this = this;\n return (0, properties_1.resolveProperties)(transaction).then(function(tx) {\n if (tx.from != null) {\n if ((0, address_1.getAddress)(tx.from) !== _this.address) {\n logger.throwArgumentError(\"transaction from address mismatch\", \"transaction.from\", transaction.from);\n }\n delete tx.from;\n }\n var signature = _this._signingKey().signDigest((0, keccak256_1.keccak256)((0, transactions_1.serialize)(tx)));\n return (0, transactions_1.serialize)(tx, signature);\n });\n };\n Wallet2.prototype.signMessage = function(message) {\n return __awaiter3(this, void 0, void 0, function() {\n return __generator3(this, function(_a) {\n return [2, (0, bytes_1.joinSignature)(this._signingKey().signDigest((0, hash_1.hashMessage)(message)))];\n });\n });\n };\n Wallet2.prototype._signTypedData = function(domain2, types, value) {\n return __awaiter3(this, void 0, void 0, function() {\n var populated;\n var _this = this;\n return __generator3(this, function(_a) {\n switch (_a.label) {\n case 0:\n return [4, hash_1._TypedDataEncoder.resolveNames(domain2, types, value, function(name) {\n if (_this.provider == null) {\n logger.throwError(\"cannot resolve ENS names without a provider\", logger_1.Logger.errors.UNSUPPORTED_OPERATION, {\n operation: \"resolveName\",\n value: name\n });\n }\n return _this.provider.resolveName(name);\n })];\n case 1:\n populated = _a.sent();\n return [2, (0, bytes_1.joinSignature)(this._signingKey().signDigest(hash_1._TypedDataEncoder.hash(populated.domain, types, populated.value)))];\n }\n });\n });\n };\n Wallet2.prototype.encrypt = function(password, options, progressCallback) {\n if (typeof options === \"function\" && !progressCallback) {\n progressCallback = options;\n options = {};\n }\n if (progressCallback && typeof progressCallback !== \"function\") {\n throw new Error(\"invalid callback\");\n }\n if (!options) {\n options = {};\n }\n return (0, json_wallets_1.encryptKeystore)(this, password, options, progressCallback);\n };\n Wallet2.createRandom = function(options) {\n var entropy = (0, random_1.randomBytes)(16);\n if (!options) {\n options = {};\n }\n if (options.extraEntropy) {\n entropy = (0, bytes_1.arrayify)((0, bytes_1.hexDataSlice)((0, keccak256_1.keccak256)((0, bytes_1.concat)([entropy, options.extraEntropy])), 0, 16));\n }\n var mnemonic = (0, hdnode_1.entropyToMnemonic)(entropy, options.locale);\n return Wallet2.fromMnemonic(mnemonic, options.path, options.locale);\n };\n Wallet2.fromEncryptedJson = function(json, password, progressCallback) {\n return (0, json_wallets_1.decryptJsonWallet)(json, password, progressCallback).then(function(account) {\n return new Wallet2(account);\n });\n };\n Wallet2.fromEncryptedJsonSync = function(json, password) {\n return new Wallet2((0, json_wallets_1.decryptJsonWalletSync)(json, password));\n };\n Wallet2.fromMnemonic = function(mnemonic, path, wordlist) {\n if (!path) {\n path = hdnode_1.defaultPath;\n }\n return new Wallet2(hdnode_1.HDNode.fromMnemonic(mnemonic, null, wordlist).derivePath(path));\n };\n return Wallet2;\n }(abstract_signer_1.Signer)\n );\n exports3.Wallet = Wallet;\n function verifyMessage2(message, signature) {\n return (0, transactions_1.recoverAddress)((0, hash_1.hashMessage)(message), signature);\n }\n exports3.verifyMessage = verifyMessage2;\n function verifyTypedData2(domain2, types, value, signature) {\n return (0, transactions_1.recoverAddress)(hash_1._TypedDataEncoder.hash(domain2, types, value), signature);\n }\n exports3.verifyTypedData = verifyTypedData2;\n }\n });\n\n // ../../../node_modules/.pnpm/@ethersproject+networks@5.8.0/node_modules/@ethersproject/networks/lib/_version.js\n var require_version21 = __commonJS({\n \"../../../node_modules/.pnpm/@ethersproject+networks@5.8.0/node_modules/@ethersproject/networks/lib/_version.js\"(exports3) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n Object.defineProperty(exports3, \"__esModule\", { value: true });\n exports3.version = void 0;\n exports3.version = \"networks/5.8.0\";\n }\n });\n\n // ../../../node_modules/.pnpm/@ethersproject+networks@5.8.0/node_modules/@ethersproject/networks/lib/index.js\n var require_lib27 = __commonJS({\n \"../../../node_modules/.pnpm/@ethersproject+networks@5.8.0/node_modules/@ethersproject/networks/lib/index.js\"(exports3) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n Object.defineProperty(exports3, \"__esModule\", { value: true });\n exports3.getNetwork = void 0;\n var logger_1 = require_lib();\n var _version_1 = require_version21();\n var logger = new logger_1.Logger(_version_1.version);\n function isRenetworkable(value) {\n return value && typeof value.renetwork === \"function\";\n }\n function ethDefaultProvider(network) {\n var func = function(providers, options) {\n if (options == null) {\n options = {};\n }\n var providerList = [];\n if (providers.InfuraProvider && options.infura !== \"-\") {\n try {\n providerList.push(new providers.InfuraProvider(network, options.infura));\n } catch (error) {\n }\n }\n if (providers.EtherscanProvider && options.etherscan !== \"-\") {\n try {\n providerList.push(new providers.EtherscanProvider(network, options.etherscan));\n } catch (error) {\n }\n }\n if (providers.AlchemyProvider && options.alchemy !== \"-\") {\n try {\n providerList.push(new providers.AlchemyProvider(network, options.alchemy));\n } catch (error) {\n }\n }\n if (providers.PocketProvider && options.pocket !== \"-\") {\n var skip = [\"goerli\", \"ropsten\", \"rinkeby\", \"sepolia\"];\n try {\n var provider = new providers.PocketProvider(network, options.pocket);\n if (provider.network && skip.indexOf(provider.network.name) === -1) {\n providerList.push(provider);\n }\n } catch (error) {\n }\n }\n if (providers.CloudflareProvider && options.cloudflare !== \"-\") {\n try {\n providerList.push(new providers.CloudflareProvider(network));\n } catch (error) {\n }\n }\n if (providers.AnkrProvider && options.ankr !== \"-\") {\n try {\n var skip = [\"ropsten\"];\n var provider = new providers.AnkrProvider(network, options.ankr);\n if (provider.network && skip.indexOf(provider.network.name) === -1) {\n providerList.push(provider);\n }\n } catch (error) {\n }\n }\n if (providers.QuickNodeProvider && options.quicknode !== \"-\") {\n try {\n providerList.push(new providers.QuickNodeProvider(network, options.quicknode));\n } catch (error) {\n }\n }\n if (providerList.length === 0) {\n return null;\n }\n if (providers.FallbackProvider) {\n var quorum = 1;\n if (options.quorum != null) {\n quorum = options.quorum;\n } else if (network === \"homestead\") {\n quorum = 2;\n }\n return new providers.FallbackProvider(providerList, quorum);\n }\n return providerList[0];\n };\n func.renetwork = function(network2) {\n return ethDefaultProvider(network2);\n };\n return func;\n }\n function etcDefaultProvider(url, network) {\n var func = function(providers, options) {\n if (providers.JsonRpcProvider) {\n return new providers.JsonRpcProvider(url, network);\n }\n return null;\n };\n func.renetwork = function(network2) {\n return etcDefaultProvider(url, network2);\n };\n return func;\n }\n var homestead = {\n chainId: 1,\n ensAddress: \"0x00000000000C2E074eC69A0dFb2997BA6C7d2e1e\",\n name: \"homestead\",\n _defaultProvider: ethDefaultProvider(\"homestead\")\n };\n var ropsten = {\n chainId: 3,\n ensAddress: \"0x00000000000C2E074eC69A0dFb2997BA6C7d2e1e\",\n name: \"ropsten\",\n _defaultProvider: ethDefaultProvider(\"ropsten\")\n };\n var classicMordor = {\n chainId: 63,\n name: \"classicMordor\",\n _defaultProvider: etcDefaultProvider(\"https://www.ethercluster.com/mordor\", \"classicMordor\")\n };\n var networks = {\n unspecified: { chainId: 0, name: \"unspecified\" },\n homestead,\n mainnet: homestead,\n morden: { chainId: 2, name: \"morden\" },\n ropsten,\n testnet: ropsten,\n rinkeby: {\n chainId: 4,\n ensAddress: \"0x00000000000C2E074eC69A0dFb2997BA6C7d2e1e\",\n name: \"rinkeby\",\n _defaultProvider: ethDefaultProvider(\"rinkeby\")\n },\n kovan: {\n chainId: 42,\n name: \"kovan\",\n _defaultProvider: ethDefaultProvider(\"kovan\")\n },\n goerli: {\n chainId: 5,\n ensAddress: \"0x00000000000C2E074eC69A0dFb2997BA6C7d2e1e\",\n name: \"goerli\",\n _defaultProvider: ethDefaultProvider(\"goerli\")\n },\n kintsugi: { chainId: 1337702, name: \"kintsugi\" },\n sepolia: {\n chainId: 11155111,\n ensAddress: \"0x00000000000C2E074eC69A0dFb2997BA6C7d2e1e\",\n name: \"sepolia\",\n _defaultProvider: ethDefaultProvider(\"sepolia\")\n },\n holesky: {\n chainId: 17e3,\n name: \"holesky\",\n _defaultProvider: ethDefaultProvider(\"holesky\")\n },\n // ETC (See: #351)\n classic: {\n chainId: 61,\n name: \"classic\",\n _defaultProvider: etcDefaultProvider(\"https://www.ethercluster.com/etc\", \"classic\")\n },\n classicMorden: { chainId: 62, name: \"classicMorden\" },\n classicMordor,\n classicTestnet: classicMordor,\n classicKotti: {\n chainId: 6,\n name: \"classicKotti\",\n _defaultProvider: etcDefaultProvider(\"https://www.ethercluster.com/kotti\", \"classicKotti\")\n },\n xdai: { chainId: 100, name: \"xdai\" },\n matic: {\n chainId: 137,\n name: \"matic\",\n _defaultProvider: ethDefaultProvider(\"matic\")\n },\n maticmum: {\n chainId: 80001,\n name: \"maticmum\",\n _defaultProvider: ethDefaultProvider(\"maticmum\")\n },\n optimism: {\n chainId: 10,\n name: \"optimism\",\n _defaultProvider: ethDefaultProvider(\"optimism\")\n },\n \"optimism-kovan\": { chainId: 69, name: \"optimism-kovan\" },\n \"optimism-goerli\": { chainId: 420, name: \"optimism-goerli\" },\n \"optimism-sepolia\": { chainId: 11155420, name: \"optimism-sepolia\" },\n arbitrum: { chainId: 42161, name: \"arbitrum\" },\n \"arbitrum-rinkeby\": { chainId: 421611, name: \"arbitrum-rinkeby\" },\n \"arbitrum-goerli\": { chainId: 421613, name: \"arbitrum-goerli\" },\n \"arbitrum-sepolia\": { chainId: 421614, name: \"arbitrum-sepolia\" },\n bnb: { chainId: 56, name: \"bnb\" },\n bnbt: { chainId: 97, name: \"bnbt\" }\n };\n function getNetwork(network) {\n if (network == null) {\n return null;\n }\n if (typeof network === \"number\") {\n for (var name_1 in networks) {\n var standard_1 = networks[name_1];\n if (standard_1.chainId === network) {\n return {\n name: standard_1.name,\n chainId: standard_1.chainId,\n ensAddress: standard_1.ensAddress || null,\n _defaultProvider: standard_1._defaultProvider || null\n };\n }\n }\n return {\n chainId: network,\n name: \"unknown\"\n };\n }\n if (typeof network === \"string\") {\n var standard_2 = networks[network];\n if (standard_2 == null) {\n return null;\n }\n return {\n name: standard_2.name,\n chainId: standard_2.chainId,\n ensAddress: standard_2.ensAddress,\n _defaultProvider: standard_2._defaultProvider || null\n };\n }\n var standard = networks[network.name];\n if (!standard) {\n if (typeof network.chainId !== \"number\") {\n logger.throwArgumentError(\"invalid network chainId\", \"network\", network);\n }\n return network;\n }\n if (network.chainId !== 0 && network.chainId !== standard.chainId) {\n logger.throwArgumentError(\"network chainId mismatch\", \"network\", network);\n }\n var defaultProvider = network._defaultProvider || null;\n if (defaultProvider == null && standard._defaultProvider) {\n if (isRenetworkable(standard._defaultProvider)) {\n defaultProvider = standard._defaultProvider.renetwork(network);\n } else {\n defaultProvider = standard._defaultProvider;\n }\n }\n return {\n name: network.name,\n chainId: standard.chainId,\n ensAddress: network.ensAddress || standard.ensAddress || null,\n _defaultProvider: defaultProvider\n };\n }\n exports3.getNetwork = getNetwork;\n }\n });\n\n // ../../../node_modules/.pnpm/@ethersproject+web@5.8.0/node_modules/@ethersproject/web/lib/_version.js\n var require_version22 = __commonJS({\n \"../../../node_modules/.pnpm/@ethersproject+web@5.8.0/node_modules/@ethersproject/web/lib/_version.js\"(exports3) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n Object.defineProperty(exports3, \"__esModule\", { value: true });\n exports3.version = void 0;\n exports3.version = \"web/5.8.0\";\n }\n });\n\n // ../../../node_modules/.pnpm/@ethersproject+web@5.8.0/node_modules/@ethersproject/web/lib/browser-geturl.js\n var require_browser_geturl = __commonJS({\n \"../../../node_modules/.pnpm/@ethersproject+web@5.8.0/node_modules/@ethersproject/web/lib/browser-geturl.js\"(exports3) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n var __awaiter3 = exports3 && exports3.__awaiter || function(thisArg, _arguments, P2, generator) {\n function adopt(value) {\n return value instanceof P2 ? value : new P2(function(resolve) {\n resolve(value);\n });\n }\n return new (P2 || (P2 = Promise))(function(resolve, reject) {\n function fulfilled(value) {\n try {\n step(generator.next(value));\n } catch (e3) {\n reject(e3);\n }\n }\n function rejected(value) {\n try {\n step(generator[\"throw\"](value));\n } catch (e3) {\n reject(e3);\n }\n }\n function step(result) {\n result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected);\n }\n step((generator = generator.apply(thisArg, _arguments || [])).next());\n });\n };\n var __generator3 = exports3 && exports3.__generator || function(thisArg, body) {\n var _2 = { label: 0, sent: function() {\n if (t3[0] & 1)\n throw t3[1];\n return t3[1];\n }, trys: [], ops: [] }, f6, y6, t3, g4;\n return g4 = { next: verb(0), \"throw\": verb(1), \"return\": verb(2) }, typeof Symbol === \"function\" && (g4[Symbol.iterator] = function() {\n return this;\n }), g4;\n function verb(n2) {\n return function(v2) {\n return step([n2, v2]);\n };\n }\n function step(op) {\n if (f6)\n throw new TypeError(\"Generator is already executing.\");\n while (_2)\n try {\n if (f6 = 1, y6 && (t3 = op[0] & 2 ? y6[\"return\"] : op[0] ? y6[\"throw\"] || ((t3 = y6[\"return\"]) && t3.call(y6), 0) : y6.next) && !(t3 = t3.call(y6, op[1])).done)\n return t3;\n if (y6 = 0, t3)\n op = [op[0] & 2, t3.value];\n switch (op[0]) {\n case 0:\n case 1:\n t3 = op;\n break;\n case 4:\n _2.label++;\n return { value: op[1], done: false };\n case 5:\n _2.label++;\n y6 = op[1];\n op = [0];\n continue;\n case 7:\n op = _2.ops.pop();\n _2.trys.pop();\n continue;\n default:\n if (!(t3 = _2.trys, t3 = t3.length > 0 && t3[t3.length - 1]) && (op[0] === 6 || op[0] === 2)) {\n _2 = 0;\n continue;\n }\n if (op[0] === 3 && (!t3 || op[1] > t3[0] && op[1] < t3[3])) {\n _2.label = op[1];\n break;\n }\n if (op[0] === 6 && _2.label < t3[1]) {\n _2.label = t3[1];\n t3 = op;\n break;\n }\n if (t3 && _2.label < t3[2]) {\n _2.label = t3[2];\n _2.ops.push(op);\n break;\n }\n if (t3[2])\n _2.ops.pop();\n _2.trys.pop();\n continue;\n }\n op = body.call(thisArg, _2);\n } catch (e3) {\n op = [6, e3];\n y6 = 0;\n } finally {\n f6 = t3 = 0;\n }\n if (op[0] & 5)\n throw op[1];\n return { value: op[0] ? op[1] : void 0, done: true };\n }\n };\n Object.defineProperty(exports3, \"__esModule\", { value: true });\n exports3.getUrl = void 0;\n var bytes_1 = require_lib2();\n function getUrl2(href, options) {\n return __awaiter3(this, void 0, void 0, function() {\n var request, opts, response, body, headers;\n return __generator3(this, function(_a) {\n switch (_a.label) {\n case 0:\n if (options == null) {\n options = {};\n }\n request = {\n method: options.method || \"GET\",\n headers: options.headers || {},\n body: options.body || void 0\n };\n if (options.skipFetchSetup !== true) {\n request.mode = \"cors\";\n request.cache = \"no-cache\";\n request.credentials = \"same-origin\";\n request.redirect = \"follow\";\n request.referrer = \"client\";\n }\n ;\n if (options.fetchOptions != null) {\n opts = options.fetchOptions;\n if (opts.mode) {\n request.mode = opts.mode;\n }\n if (opts.cache) {\n request.cache = opts.cache;\n }\n if (opts.credentials) {\n request.credentials = opts.credentials;\n }\n if (opts.redirect) {\n request.redirect = opts.redirect;\n }\n if (opts.referrer) {\n request.referrer = opts.referrer;\n }\n }\n return [4, fetch(href, request)];\n case 1:\n response = _a.sent();\n return [4, response.arrayBuffer()];\n case 2:\n body = _a.sent();\n headers = {};\n if (response.headers.forEach) {\n response.headers.forEach(function(value, key) {\n headers[key.toLowerCase()] = value;\n });\n } else {\n response.headers.keys().forEach(function(key) {\n headers[key.toLowerCase()] = response.headers.get(key);\n });\n }\n return [2, {\n headers,\n statusCode: response.status,\n statusMessage: response.statusText,\n body: (0, bytes_1.arrayify)(new Uint8Array(body))\n }];\n }\n });\n });\n }\n exports3.getUrl = getUrl2;\n }\n });\n\n // ../../../node_modules/.pnpm/@ethersproject+web@5.8.0/node_modules/@ethersproject/web/lib/index.js\n var require_lib28 = __commonJS({\n \"../../../node_modules/.pnpm/@ethersproject+web@5.8.0/node_modules/@ethersproject/web/lib/index.js\"(exports3) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n var __awaiter3 = exports3 && exports3.__awaiter || function(thisArg, _arguments, P2, generator) {\n function adopt(value) {\n return value instanceof P2 ? value : new P2(function(resolve) {\n resolve(value);\n });\n }\n return new (P2 || (P2 = Promise))(function(resolve, reject) {\n function fulfilled(value) {\n try {\n step(generator.next(value));\n } catch (e3) {\n reject(e3);\n }\n }\n function rejected(value) {\n try {\n step(generator[\"throw\"](value));\n } catch (e3) {\n reject(e3);\n }\n }\n function step(result) {\n result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected);\n }\n step((generator = generator.apply(thisArg, _arguments || [])).next());\n });\n };\n var __generator3 = exports3 && exports3.__generator || function(thisArg, body) {\n var _2 = { label: 0, sent: function() {\n if (t3[0] & 1)\n throw t3[1];\n return t3[1];\n }, trys: [], ops: [] }, f6, y6, t3, g4;\n return g4 = { next: verb(0), \"throw\": verb(1), \"return\": verb(2) }, typeof Symbol === \"function\" && (g4[Symbol.iterator] = function() {\n return this;\n }), g4;\n function verb(n2) {\n return function(v2) {\n return step([n2, v2]);\n };\n }\n function step(op) {\n if (f6)\n throw new TypeError(\"Generator is already executing.\");\n while (_2)\n try {\n if (f6 = 1, y6 && (t3 = op[0] & 2 ? y6[\"return\"] : op[0] ? y6[\"throw\"] || ((t3 = y6[\"return\"]) && t3.call(y6), 0) : y6.next) && !(t3 = t3.call(y6, op[1])).done)\n return t3;\n if (y6 = 0, t3)\n op = [op[0] & 2, t3.value];\n switch (op[0]) {\n case 0:\n case 1:\n t3 = op;\n break;\n case 4:\n _2.label++;\n return { value: op[1], done: false };\n case 5:\n _2.label++;\n y6 = op[1];\n op = [0];\n continue;\n case 7:\n op = _2.ops.pop();\n _2.trys.pop();\n continue;\n default:\n if (!(t3 = _2.trys, t3 = t3.length > 0 && t3[t3.length - 1]) && (op[0] === 6 || op[0] === 2)) {\n _2 = 0;\n continue;\n }\n if (op[0] === 3 && (!t3 || op[1] > t3[0] && op[1] < t3[3])) {\n _2.label = op[1];\n break;\n }\n if (op[0] === 6 && _2.label < t3[1]) {\n _2.label = t3[1];\n t3 = op;\n break;\n }\n if (t3 && _2.label < t3[2]) {\n _2.label = t3[2];\n _2.ops.push(op);\n break;\n }\n if (t3[2])\n _2.ops.pop();\n _2.trys.pop();\n continue;\n }\n op = body.call(thisArg, _2);\n } catch (e3) {\n op = [6, e3];\n y6 = 0;\n } finally {\n f6 = t3 = 0;\n }\n if (op[0] & 5)\n throw op[1];\n return { value: op[0] ? op[1] : void 0, done: true };\n }\n };\n Object.defineProperty(exports3, \"__esModule\", { value: true });\n exports3.poll = exports3.fetchJson = exports3._fetchData = void 0;\n var base64_1 = require_lib10();\n var bytes_1 = require_lib2();\n var properties_1 = require_lib4();\n var strings_1 = require_lib9();\n var logger_1 = require_lib();\n var _version_1 = require_version22();\n var logger = new logger_1.Logger(_version_1.version);\n var geturl_1 = require_browser_geturl();\n function staller(duration) {\n return new Promise(function(resolve) {\n setTimeout(resolve, duration);\n });\n }\n function bodyify(value, type) {\n if (value == null) {\n return null;\n }\n if (typeof value === \"string\") {\n return value;\n }\n if ((0, bytes_1.isBytesLike)(value)) {\n if (type && (type.split(\"/\")[0] === \"text\" || type.split(\";\")[0].trim() === \"application/json\")) {\n try {\n return (0, strings_1.toUtf8String)(value);\n } catch (error) {\n }\n ;\n }\n return (0, bytes_1.hexlify)(value);\n }\n return value;\n }\n function unpercent(value) {\n return (0, strings_1.toUtf8Bytes)(value.replace(/%([0-9a-f][0-9a-f])/gi, function(all, code) {\n return String.fromCharCode(parseInt(code, 16));\n }));\n }\n function _fetchData(connection, body, processFunc) {\n var attemptLimit = typeof connection === \"object\" && connection.throttleLimit != null ? connection.throttleLimit : 12;\n logger.assertArgument(attemptLimit > 0 && attemptLimit % 1 === 0, \"invalid connection throttle limit\", \"connection.throttleLimit\", attemptLimit);\n var throttleCallback = typeof connection === \"object\" ? connection.throttleCallback : null;\n var throttleSlotInterval = typeof connection === \"object\" && typeof connection.throttleSlotInterval === \"number\" ? connection.throttleSlotInterval : 100;\n logger.assertArgument(throttleSlotInterval > 0 && throttleSlotInterval % 1 === 0, \"invalid connection throttle slot interval\", \"connection.throttleSlotInterval\", throttleSlotInterval);\n var errorPassThrough = typeof connection === \"object\" ? !!connection.errorPassThrough : false;\n var headers = {};\n var url = null;\n var options = {\n method: \"GET\"\n };\n var allow304 = false;\n var timeout = 2 * 60 * 1e3;\n if (typeof connection === \"string\") {\n url = connection;\n } else if (typeof connection === \"object\") {\n if (connection == null || connection.url == null) {\n logger.throwArgumentError(\"missing URL\", \"connection.url\", connection);\n }\n url = connection.url;\n if (typeof connection.timeout === \"number\" && connection.timeout > 0) {\n timeout = connection.timeout;\n }\n if (connection.headers) {\n for (var key in connection.headers) {\n headers[key.toLowerCase()] = { key, value: String(connection.headers[key]) };\n if ([\"if-none-match\", \"if-modified-since\"].indexOf(key.toLowerCase()) >= 0) {\n allow304 = true;\n }\n }\n }\n options.allowGzip = !!connection.allowGzip;\n if (connection.user != null && connection.password != null) {\n if (url.substring(0, 6) !== \"https:\" && connection.allowInsecureAuthentication !== true) {\n logger.throwError(\"basic authentication requires a secure https url\", logger_1.Logger.errors.INVALID_ARGUMENT, { argument: \"url\", url, user: connection.user, password: \"[REDACTED]\" });\n }\n var authorization = connection.user + \":\" + connection.password;\n headers[\"authorization\"] = {\n key: \"Authorization\",\n value: \"Basic \" + (0, base64_1.encode)((0, strings_1.toUtf8Bytes)(authorization))\n };\n }\n if (connection.skipFetchSetup != null) {\n options.skipFetchSetup = !!connection.skipFetchSetup;\n }\n if (connection.fetchOptions != null) {\n options.fetchOptions = (0, properties_1.shallowCopy)(connection.fetchOptions);\n }\n }\n var reData = new RegExp(\"^data:([^;:]*)?(;base64)?,(.*)$\", \"i\");\n var dataMatch = url ? url.match(reData) : null;\n if (dataMatch) {\n try {\n var response = {\n statusCode: 200,\n statusMessage: \"OK\",\n headers: { \"content-type\": dataMatch[1] || \"text/plain\" },\n body: dataMatch[2] ? (0, base64_1.decode)(dataMatch[3]) : unpercent(dataMatch[3])\n };\n var result = response.body;\n if (processFunc) {\n result = processFunc(response.body, response);\n }\n return Promise.resolve(result);\n } catch (error) {\n logger.throwError(\"processing response error\", logger_1.Logger.errors.SERVER_ERROR, {\n body: bodyify(dataMatch[1], dataMatch[2]),\n error,\n requestBody: null,\n requestMethod: \"GET\",\n url\n });\n }\n }\n if (body) {\n options.method = \"POST\";\n options.body = body;\n if (headers[\"content-type\"] == null) {\n headers[\"content-type\"] = { key: \"Content-Type\", value: \"application/octet-stream\" };\n }\n if (headers[\"content-length\"] == null) {\n headers[\"content-length\"] = { key: \"Content-Length\", value: String(body.length) };\n }\n }\n var flatHeaders = {};\n Object.keys(headers).forEach(function(key2) {\n var header = headers[key2];\n flatHeaders[header.key] = header.value;\n });\n options.headers = flatHeaders;\n var runningTimeout = function() {\n var timer = null;\n var promise = new Promise(function(resolve, reject) {\n if (timeout) {\n timer = setTimeout(function() {\n if (timer == null) {\n return;\n }\n timer = null;\n reject(logger.makeError(\"timeout\", logger_1.Logger.errors.TIMEOUT, {\n requestBody: bodyify(options.body, flatHeaders[\"content-type\"]),\n requestMethod: options.method,\n timeout,\n url\n }));\n }, timeout);\n }\n });\n var cancel2 = function() {\n if (timer == null) {\n return;\n }\n clearTimeout(timer);\n timer = null;\n };\n return { promise, cancel: cancel2 };\n }();\n var runningFetch = function() {\n return __awaiter3(this, void 0, void 0, function() {\n var attempt, response2, location_1, tryAgain, stall, retryAfter, error_1, body_1, result2, error_2, tryAgain, timeout_1;\n return __generator3(this, function(_a) {\n switch (_a.label) {\n case 0:\n attempt = 0;\n _a.label = 1;\n case 1:\n if (!(attempt < attemptLimit))\n return [3, 20];\n response2 = null;\n _a.label = 2;\n case 2:\n _a.trys.push([2, 9, , 10]);\n return [4, (0, geturl_1.getUrl)(url, options)];\n case 3:\n response2 = _a.sent();\n if (!(attempt < attemptLimit))\n return [3, 8];\n if (!(response2.statusCode === 301 || response2.statusCode === 302))\n return [3, 4];\n location_1 = response2.headers.location || \"\";\n if (options.method === \"GET\" && location_1.match(/^https:/)) {\n url = response2.headers.location;\n return [3, 19];\n }\n return [3, 8];\n case 4:\n if (!(response2.statusCode === 429))\n return [3, 8];\n tryAgain = true;\n if (!throttleCallback)\n return [3, 6];\n return [4, throttleCallback(attempt, url)];\n case 5:\n tryAgain = _a.sent();\n _a.label = 6;\n case 6:\n if (!tryAgain)\n return [3, 8];\n stall = 0;\n retryAfter = response2.headers[\"retry-after\"];\n if (typeof retryAfter === \"string\" && retryAfter.match(/^[1-9][0-9]*$/)) {\n stall = parseInt(retryAfter) * 1e3;\n } else {\n stall = throttleSlotInterval * parseInt(String(Math.random() * Math.pow(2, attempt)));\n }\n return [4, staller(stall)];\n case 7:\n _a.sent();\n return [3, 19];\n case 8:\n return [3, 10];\n case 9:\n error_1 = _a.sent();\n response2 = error_1.response;\n if (response2 == null) {\n runningTimeout.cancel();\n logger.throwError(\"missing response\", logger_1.Logger.errors.SERVER_ERROR, {\n requestBody: bodyify(options.body, flatHeaders[\"content-type\"]),\n requestMethod: options.method,\n serverError: error_1,\n url\n });\n }\n return [3, 10];\n case 10:\n body_1 = response2.body;\n if (allow304 && response2.statusCode === 304) {\n body_1 = null;\n } else if (!errorPassThrough && (response2.statusCode < 200 || response2.statusCode >= 300)) {\n runningTimeout.cancel();\n logger.throwError(\"bad response\", logger_1.Logger.errors.SERVER_ERROR, {\n status: response2.statusCode,\n headers: response2.headers,\n body: bodyify(body_1, response2.headers ? response2.headers[\"content-type\"] : null),\n requestBody: bodyify(options.body, flatHeaders[\"content-type\"]),\n requestMethod: options.method,\n url\n });\n }\n if (!processFunc)\n return [3, 18];\n _a.label = 11;\n case 11:\n _a.trys.push([11, 13, , 18]);\n return [4, processFunc(body_1, response2)];\n case 12:\n result2 = _a.sent();\n runningTimeout.cancel();\n return [2, result2];\n case 13:\n error_2 = _a.sent();\n if (!(error_2.throttleRetry && attempt < attemptLimit))\n return [3, 17];\n tryAgain = true;\n if (!throttleCallback)\n return [3, 15];\n return [4, throttleCallback(attempt, url)];\n case 14:\n tryAgain = _a.sent();\n _a.label = 15;\n case 15:\n if (!tryAgain)\n return [3, 17];\n timeout_1 = throttleSlotInterval * parseInt(String(Math.random() * Math.pow(2, attempt)));\n return [4, staller(timeout_1)];\n case 16:\n _a.sent();\n return [3, 19];\n case 17:\n runningTimeout.cancel();\n logger.throwError(\"processing response error\", logger_1.Logger.errors.SERVER_ERROR, {\n body: bodyify(body_1, response2.headers ? response2.headers[\"content-type\"] : null),\n error: error_2,\n requestBody: bodyify(options.body, flatHeaders[\"content-type\"]),\n requestMethod: options.method,\n url\n });\n return [3, 18];\n case 18:\n runningTimeout.cancel();\n return [2, body_1];\n case 19:\n attempt++;\n return [3, 1];\n case 20:\n return [2, logger.throwError(\"failed response\", logger_1.Logger.errors.SERVER_ERROR, {\n requestBody: bodyify(options.body, flatHeaders[\"content-type\"]),\n requestMethod: options.method,\n url\n })];\n }\n });\n });\n }();\n return Promise.race([runningTimeout.promise, runningFetch]);\n }\n exports3._fetchData = _fetchData;\n function fetchJson(connection, json, processFunc) {\n var processJsonFunc = function(value, response) {\n var result = null;\n if (value != null) {\n try {\n result = JSON.parse((0, strings_1.toUtf8String)(value));\n } catch (error) {\n logger.throwError(\"invalid JSON\", logger_1.Logger.errors.SERVER_ERROR, {\n body: value,\n error\n });\n }\n }\n if (processFunc) {\n result = processFunc(result, response);\n }\n return result;\n };\n var body = null;\n if (json != null) {\n body = (0, strings_1.toUtf8Bytes)(json);\n var updated = typeof connection === \"string\" ? { url: connection } : (0, properties_1.shallowCopy)(connection);\n if (updated.headers) {\n var hasContentType = Object.keys(updated.headers).filter(function(k4) {\n return k4.toLowerCase() === \"content-type\";\n }).length !== 0;\n if (!hasContentType) {\n updated.headers = (0, properties_1.shallowCopy)(updated.headers);\n updated.headers[\"content-type\"] = \"application/json\";\n }\n } else {\n updated.headers = { \"content-type\": \"application/json\" };\n }\n connection = updated;\n }\n return _fetchData(connection, body, processJsonFunc);\n }\n exports3.fetchJson = fetchJson;\n function poll2(func, options) {\n if (!options) {\n options = {};\n }\n options = (0, properties_1.shallowCopy)(options);\n if (options.floor == null) {\n options.floor = 0;\n }\n if (options.ceiling == null) {\n options.ceiling = 1e4;\n }\n if (options.interval == null) {\n options.interval = 250;\n }\n return new Promise(function(resolve, reject) {\n var timer = null;\n var done = false;\n var cancel2 = function() {\n if (done) {\n return false;\n }\n done = true;\n if (timer) {\n clearTimeout(timer);\n }\n return true;\n };\n if (options.timeout) {\n timer = setTimeout(function() {\n if (cancel2()) {\n reject(new Error(\"timeout\"));\n }\n }, options.timeout);\n }\n var retryLimit = options.retryLimit;\n var attempt = 0;\n function check() {\n return func().then(function(result) {\n if (result !== void 0) {\n if (cancel2()) {\n resolve(result);\n }\n } else if (options.oncePoll) {\n options.oncePoll.once(\"poll\", check);\n } else if (options.onceBlock) {\n options.onceBlock.once(\"block\", check);\n } else if (!done) {\n attempt++;\n if (attempt > retryLimit) {\n if (cancel2()) {\n reject(new Error(\"retry limit reached\"));\n }\n return;\n }\n var timeout = options.interval * parseInt(String(Math.random() * Math.pow(2, attempt)));\n if (timeout < options.floor) {\n timeout = options.floor;\n }\n if (timeout > options.ceiling) {\n timeout = options.ceiling;\n }\n setTimeout(check, timeout);\n }\n return null;\n }, function(error) {\n if (cancel2()) {\n reject(error);\n }\n });\n }\n check();\n });\n }\n exports3.poll = poll2;\n }\n });\n\n // ../../../node_modules/.pnpm/bech32@1.1.4/node_modules/bech32/index.js\n var require_bech32 = __commonJS({\n \"../../../node_modules/.pnpm/bech32@1.1.4/node_modules/bech32/index.js\"(exports3, module) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n var ALPHABET = \"qpzry9x8gf2tvdw0s3jn54khce6mua7l\";\n var ALPHABET_MAP = {};\n for (z2 = 0; z2 < ALPHABET.length; z2++) {\n x4 = ALPHABET.charAt(z2);\n if (ALPHABET_MAP[x4] !== void 0)\n throw new TypeError(x4 + \" is ambiguous\");\n ALPHABET_MAP[x4] = z2;\n }\n var x4;\n var z2;\n function polymodStep(pre) {\n var b4 = pre >> 25;\n return (pre & 33554431) << 5 ^ -(b4 >> 0 & 1) & 996825010 ^ -(b4 >> 1 & 1) & 642813549 ^ -(b4 >> 2 & 1) & 513874426 ^ -(b4 >> 3 & 1) & 1027748829 ^ -(b4 >> 4 & 1) & 705979059;\n }\n function prefixChk(prefix) {\n var chk = 1;\n for (var i3 = 0; i3 < prefix.length; ++i3) {\n var c4 = prefix.charCodeAt(i3);\n if (c4 < 33 || c4 > 126)\n return \"Invalid prefix (\" + prefix + \")\";\n chk = polymodStep(chk) ^ c4 >> 5;\n }\n chk = polymodStep(chk);\n for (i3 = 0; i3 < prefix.length; ++i3) {\n var v2 = prefix.charCodeAt(i3);\n chk = polymodStep(chk) ^ v2 & 31;\n }\n return chk;\n }\n function encode6(prefix, words, LIMIT) {\n LIMIT = LIMIT || 90;\n if (prefix.length + 7 + words.length > LIMIT)\n throw new TypeError(\"Exceeds length limit\");\n prefix = prefix.toLowerCase();\n var chk = prefixChk(prefix);\n if (typeof chk === \"string\")\n throw new Error(chk);\n var result = prefix + \"1\";\n for (var i3 = 0; i3 < words.length; ++i3) {\n var x5 = words[i3];\n if (x5 >> 5 !== 0)\n throw new Error(\"Non 5-bit word\");\n chk = polymodStep(chk) ^ x5;\n result += ALPHABET.charAt(x5);\n }\n for (i3 = 0; i3 < 6; ++i3) {\n chk = polymodStep(chk);\n }\n chk ^= 1;\n for (i3 = 0; i3 < 6; ++i3) {\n var v2 = chk >> (5 - i3) * 5 & 31;\n result += ALPHABET.charAt(v2);\n }\n return result;\n }\n function __decode(str, LIMIT) {\n LIMIT = LIMIT || 90;\n if (str.length < 8)\n return str + \" too short\";\n if (str.length > LIMIT)\n return \"Exceeds length limit\";\n var lowered = str.toLowerCase();\n var uppered = str.toUpperCase();\n if (str !== lowered && str !== uppered)\n return \"Mixed-case string \" + str;\n str = lowered;\n var split4 = str.lastIndexOf(\"1\");\n if (split4 === -1)\n return \"No separator character for \" + str;\n if (split4 === 0)\n return \"Missing prefix for \" + str;\n var prefix = str.slice(0, split4);\n var wordChars = str.slice(split4 + 1);\n if (wordChars.length < 6)\n return \"Data too short\";\n var chk = prefixChk(prefix);\n if (typeof chk === \"string\")\n return chk;\n var words = [];\n for (var i3 = 0; i3 < wordChars.length; ++i3) {\n var c4 = wordChars.charAt(i3);\n var v2 = ALPHABET_MAP[c4];\n if (v2 === void 0)\n return \"Unknown character \" + c4;\n chk = polymodStep(chk) ^ v2;\n if (i3 + 6 >= wordChars.length)\n continue;\n words.push(v2);\n }\n if (chk !== 1)\n return \"Invalid checksum for \" + str;\n return { prefix, words };\n }\n function decodeUnsafe() {\n var res = __decode.apply(null, arguments);\n if (typeof res === \"object\")\n return res;\n }\n function decode2(str) {\n var res = __decode.apply(null, arguments);\n if (typeof res === \"object\")\n return res;\n throw new Error(res);\n }\n function convert(data, inBits, outBits, pad6) {\n var value = 0;\n var bits = 0;\n var maxV = (1 << outBits) - 1;\n var result = [];\n for (var i3 = 0; i3 < data.length; ++i3) {\n value = value << inBits | data[i3];\n bits += inBits;\n while (bits >= outBits) {\n bits -= outBits;\n result.push(value >> bits & maxV);\n }\n }\n if (pad6) {\n if (bits > 0) {\n result.push(value << outBits - bits & maxV);\n }\n } else {\n if (bits >= inBits)\n return \"Excess padding\";\n if (value << outBits - bits & maxV)\n return \"Non-zero padding\";\n }\n return result;\n }\n function toWordsUnsafe(bytes) {\n var res = convert(bytes, 8, 5, true);\n if (Array.isArray(res))\n return res;\n }\n function toWords(bytes) {\n var res = convert(bytes, 8, 5, true);\n if (Array.isArray(res))\n return res;\n throw new Error(res);\n }\n function fromWordsUnsafe(words) {\n var res = convert(words, 5, 8, false);\n if (Array.isArray(res))\n return res;\n }\n function fromWords(words) {\n var res = convert(words, 5, 8, false);\n if (Array.isArray(res))\n return res;\n throw new Error(res);\n }\n module.exports = {\n decodeUnsafe,\n decode: decode2,\n encode: encode6,\n toWordsUnsafe,\n toWords,\n fromWordsUnsafe,\n fromWords\n };\n }\n });\n\n // ../../../node_modules/.pnpm/@ethersproject+providers@5.8.0_bufferutil@4.0.9_utf-8-validate@5.0.10/node_modules/@ethersproject/providers/lib/_version.js\n var require_version23 = __commonJS({\n \"../../../node_modules/.pnpm/@ethersproject+providers@5.8.0_bufferutil@4.0.9_utf-8-validate@5.0.10/node_modules/@ethersproject/providers/lib/_version.js\"(exports3) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n Object.defineProperty(exports3, \"__esModule\", { value: true });\n exports3.version = void 0;\n exports3.version = \"providers/5.8.0\";\n }\n });\n\n // ../../../node_modules/.pnpm/@ethersproject+providers@5.8.0_bufferutil@4.0.9_utf-8-validate@5.0.10/node_modules/@ethersproject/providers/lib/formatter.js\n var require_formatter = __commonJS({\n \"../../../node_modules/.pnpm/@ethersproject+providers@5.8.0_bufferutil@4.0.9_utf-8-validate@5.0.10/node_modules/@ethersproject/providers/lib/formatter.js\"(exports3) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n Object.defineProperty(exports3, \"__esModule\", { value: true });\n exports3.showThrottleMessage = exports3.isCommunityResource = exports3.isCommunityResourcable = exports3.Formatter = void 0;\n var address_1 = require_lib7();\n var bignumber_1 = require_lib3();\n var bytes_1 = require_lib2();\n var constants_1 = require_lib8();\n var properties_1 = require_lib4();\n var transactions_1 = require_lib17();\n var logger_1 = require_lib();\n var _version_1 = require_version23();\n var logger = new logger_1.Logger(_version_1.version);\n var Formatter = (\n /** @class */\n function() {\n function Formatter2() {\n this.formats = this.getDefaultFormats();\n }\n Formatter2.prototype.getDefaultFormats = function() {\n var _this = this;\n var formats = {};\n var address = this.address.bind(this);\n var bigNumber = this.bigNumber.bind(this);\n var blockTag = this.blockTag.bind(this);\n var data = this.data.bind(this);\n var hash3 = this.hash.bind(this);\n var hex = this.hex.bind(this);\n var number2 = this.number.bind(this);\n var type = this.type.bind(this);\n var strictData = function(v2) {\n return _this.data(v2, true);\n };\n formats.transaction = {\n hash: hash3,\n type,\n accessList: Formatter2.allowNull(this.accessList.bind(this), null),\n blockHash: Formatter2.allowNull(hash3, null),\n blockNumber: Formatter2.allowNull(number2, null),\n transactionIndex: Formatter2.allowNull(number2, null),\n confirmations: Formatter2.allowNull(number2, null),\n from: address,\n // either (gasPrice) or (maxPriorityFeePerGas + maxFeePerGas)\n // must be set\n gasPrice: Formatter2.allowNull(bigNumber),\n maxPriorityFeePerGas: Formatter2.allowNull(bigNumber),\n maxFeePerGas: Formatter2.allowNull(bigNumber),\n gasLimit: bigNumber,\n to: Formatter2.allowNull(address, null),\n value: bigNumber,\n nonce: number2,\n data,\n r: Formatter2.allowNull(this.uint256),\n s: Formatter2.allowNull(this.uint256),\n v: Formatter2.allowNull(number2),\n creates: Formatter2.allowNull(address, null),\n raw: Formatter2.allowNull(data)\n };\n formats.transactionRequest = {\n from: Formatter2.allowNull(address),\n nonce: Formatter2.allowNull(number2),\n gasLimit: Formatter2.allowNull(bigNumber),\n gasPrice: Formatter2.allowNull(bigNumber),\n maxPriorityFeePerGas: Formatter2.allowNull(bigNumber),\n maxFeePerGas: Formatter2.allowNull(bigNumber),\n to: Formatter2.allowNull(address),\n value: Formatter2.allowNull(bigNumber),\n data: Formatter2.allowNull(strictData),\n type: Formatter2.allowNull(number2),\n accessList: Formatter2.allowNull(this.accessList.bind(this), null)\n };\n formats.receiptLog = {\n transactionIndex: number2,\n blockNumber: number2,\n transactionHash: hash3,\n address,\n topics: Formatter2.arrayOf(hash3),\n data,\n logIndex: number2,\n blockHash: hash3\n };\n formats.receipt = {\n to: Formatter2.allowNull(this.address, null),\n from: Formatter2.allowNull(this.address, null),\n contractAddress: Formatter2.allowNull(address, null),\n transactionIndex: number2,\n // should be allowNull(hash), but broken-EIP-658 support is handled in receipt\n root: Formatter2.allowNull(hex),\n gasUsed: bigNumber,\n logsBloom: Formatter2.allowNull(data),\n blockHash: hash3,\n transactionHash: hash3,\n logs: Formatter2.arrayOf(this.receiptLog.bind(this)),\n blockNumber: number2,\n confirmations: Formatter2.allowNull(number2, null),\n cumulativeGasUsed: bigNumber,\n effectiveGasPrice: Formatter2.allowNull(bigNumber),\n status: Formatter2.allowNull(number2),\n type\n };\n formats.block = {\n hash: Formatter2.allowNull(hash3),\n parentHash: hash3,\n number: number2,\n timestamp: number2,\n nonce: Formatter2.allowNull(hex),\n difficulty: this.difficulty.bind(this),\n gasLimit: bigNumber,\n gasUsed: bigNumber,\n miner: Formatter2.allowNull(address),\n extraData: data,\n transactions: Formatter2.allowNull(Formatter2.arrayOf(hash3)),\n baseFeePerGas: Formatter2.allowNull(bigNumber)\n };\n formats.blockWithTransactions = (0, properties_1.shallowCopy)(formats.block);\n formats.blockWithTransactions.transactions = Formatter2.allowNull(Formatter2.arrayOf(this.transactionResponse.bind(this)));\n formats.filter = {\n fromBlock: Formatter2.allowNull(blockTag, void 0),\n toBlock: Formatter2.allowNull(blockTag, void 0),\n blockHash: Formatter2.allowNull(hash3, void 0),\n address: Formatter2.allowNull(address, void 0),\n topics: Formatter2.allowNull(this.topics.bind(this), void 0)\n };\n formats.filterLog = {\n blockNumber: Formatter2.allowNull(number2),\n blockHash: Formatter2.allowNull(hash3),\n transactionIndex: number2,\n removed: Formatter2.allowNull(this.boolean.bind(this)),\n address,\n data: Formatter2.allowFalsish(data, \"0x\"),\n topics: Formatter2.arrayOf(hash3),\n transactionHash: hash3,\n logIndex: number2\n };\n return formats;\n };\n Formatter2.prototype.accessList = function(accessList) {\n return (0, transactions_1.accessListify)(accessList || []);\n };\n Formatter2.prototype.number = function(number2) {\n if (number2 === \"0x\") {\n return 0;\n }\n return bignumber_1.BigNumber.from(number2).toNumber();\n };\n Formatter2.prototype.type = function(number2) {\n if (number2 === \"0x\" || number2 == null) {\n return 0;\n }\n return bignumber_1.BigNumber.from(number2).toNumber();\n };\n Formatter2.prototype.bigNumber = function(value) {\n return bignumber_1.BigNumber.from(value);\n };\n Formatter2.prototype.boolean = function(value) {\n if (typeof value === \"boolean\") {\n return value;\n }\n if (typeof value === \"string\") {\n value = value.toLowerCase();\n if (value === \"true\") {\n return true;\n }\n if (value === \"false\") {\n return false;\n }\n }\n throw new Error(\"invalid boolean - \" + value);\n };\n Formatter2.prototype.hex = function(value, strict) {\n if (typeof value === \"string\") {\n if (!strict && value.substring(0, 2) !== \"0x\") {\n value = \"0x\" + value;\n }\n if ((0, bytes_1.isHexString)(value)) {\n return value.toLowerCase();\n }\n }\n return logger.throwArgumentError(\"invalid hash\", \"value\", value);\n };\n Formatter2.prototype.data = function(value, strict) {\n var result = this.hex(value, strict);\n if (result.length % 2 !== 0) {\n throw new Error(\"invalid data; odd-length - \" + value);\n }\n return result;\n };\n Formatter2.prototype.address = function(value) {\n return (0, address_1.getAddress)(value);\n };\n Formatter2.prototype.callAddress = function(value) {\n if (!(0, bytes_1.isHexString)(value, 32)) {\n return null;\n }\n var address = (0, address_1.getAddress)((0, bytes_1.hexDataSlice)(value, 12));\n return address === constants_1.AddressZero ? null : address;\n };\n Formatter2.prototype.contractAddress = function(value) {\n return (0, address_1.getContractAddress)(value);\n };\n Formatter2.prototype.blockTag = function(blockTag) {\n if (blockTag == null) {\n return \"latest\";\n }\n if (blockTag === \"earliest\") {\n return \"0x0\";\n }\n switch (blockTag) {\n case \"earliest\":\n return \"0x0\";\n case \"latest\":\n case \"pending\":\n case \"safe\":\n case \"finalized\":\n return blockTag;\n }\n if (typeof blockTag === \"number\" || (0, bytes_1.isHexString)(blockTag)) {\n return (0, bytes_1.hexValue)(blockTag);\n }\n throw new Error(\"invalid blockTag\");\n };\n Formatter2.prototype.hash = function(value, strict) {\n var result = this.hex(value, strict);\n if ((0, bytes_1.hexDataLength)(result) !== 32) {\n return logger.throwArgumentError(\"invalid hash\", \"value\", value);\n }\n return result;\n };\n Formatter2.prototype.difficulty = function(value) {\n if (value == null) {\n return null;\n }\n var v2 = bignumber_1.BigNumber.from(value);\n try {\n return v2.toNumber();\n } catch (error) {\n }\n return null;\n };\n Formatter2.prototype.uint256 = function(value) {\n if (!(0, bytes_1.isHexString)(value)) {\n throw new Error(\"invalid uint256\");\n }\n return (0, bytes_1.hexZeroPad)(value, 32);\n };\n Formatter2.prototype._block = function(value, format) {\n if (value.author != null && value.miner == null) {\n value.miner = value.author;\n }\n var difficulty = value._difficulty != null ? value._difficulty : value.difficulty;\n var result = Formatter2.check(format, value);\n result._difficulty = difficulty == null ? null : bignumber_1.BigNumber.from(difficulty);\n return result;\n };\n Formatter2.prototype.block = function(value) {\n return this._block(value, this.formats.block);\n };\n Formatter2.prototype.blockWithTransactions = function(value) {\n return this._block(value, this.formats.blockWithTransactions);\n };\n Formatter2.prototype.transactionRequest = function(value) {\n return Formatter2.check(this.formats.transactionRequest, value);\n };\n Formatter2.prototype.transactionResponse = function(transaction) {\n if (transaction.gas != null && transaction.gasLimit == null) {\n transaction.gasLimit = transaction.gas;\n }\n if (transaction.to && bignumber_1.BigNumber.from(transaction.to).isZero()) {\n transaction.to = \"0x0000000000000000000000000000000000000000\";\n }\n if (transaction.input != null && transaction.data == null) {\n transaction.data = transaction.input;\n }\n if (transaction.to == null && transaction.creates == null) {\n transaction.creates = this.contractAddress(transaction);\n }\n if ((transaction.type === 1 || transaction.type === 2) && transaction.accessList == null) {\n transaction.accessList = [];\n }\n var result = Formatter2.check(this.formats.transaction, transaction);\n if (transaction.chainId != null) {\n var chainId = transaction.chainId;\n if ((0, bytes_1.isHexString)(chainId)) {\n chainId = bignumber_1.BigNumber.from(chainId).toNumber();\n }\n result.chainId = chainId;\n } else {\n var chainId = transaction.networkId;\n if (chainId == null && result.v == null) {\n chainId = transaction.chainId;\n }\n if ((0, bytes_1.isHexString)(chainId)) {\n chainId = bignumber_1.BigNumber.from(chainId).toNumber();\n }\n if (typeof chainId !== \"number\" && result.v != null) {\n chainId = (result.v - 35) / 2;\n if (chainId < 0) {\n chainId = 0;\n }\n chainId = parseInt(chainId);\n }\n if (typeof chainId !== \"number\") {\n chainId = 0;\n }\n result.chainId = chainId;\n }\n if (result.blockHash && result.blockHash.replace(/0/g, \"\") === \"x\") {\n result.blockHash = null;\n }\n return result;\n };\n Formatter2.prototype.transaction = function(value) {\n return (0, transactions_1.parse)(value);\n };\n Formatter2.prototype.receiptLog = function(value) {\n return Formatter2.check(this.formats.receiptLog, value);\n };\n Formatter2.prototype.receipt = function(value) {\n var result = Formatter2.check(this.formats.receipt, value);\n if (result.root != null) {\n if (result.root.length <= 4) {\n var value_1 = bignumber_1.BigNumber.from(result.root).toNumber();\n if (value_1 === 0 || value_1 === 1) {\n if (result.status != null && result.status !== value_1) {\n logger.throwArgumentError(\"alt-root-status/status mismatch\", \"value\", { root: result.root, status: result.status });\n }\n result.status = value_1;\n delete result.root;\n } else {\n logger.throwArgumentError(\"invalid alt-root-status\", \"value.root\", result.root);\n }\n } else if (result.root.length !== 66) {\n logger.throwArgumentError(\"invalid root hash\", \"value.root\", result.root);\n }\n }\n if (result.status != null) {\n result.byzantium = true;\n }\n return result;\n };\n Formatter2.prototype.topics = function(value) {\n var _this = this;\n if (Array.isArray(value)) {\n return value.map(function(v2) {\n return _this.topics(v2);\n });\n } else if (value != null) {\n return this.hash(value, true);\n }\n return null;\n };\n Formatter2.prototype.filter = function(value) {\n return Formatter2.check(this.formats.filter, value);\n };\n Formatter2.prototype.filterLog = function(value) {\n return Formatter2.check(this.formats.filterLog, value);\n };\n Formatter2.check = function(format, object2) {\n var result = {};\n for (var key in format) {\n try {\n var value = format[key](object2[key]);\n if (value !== void 0) {\n result[key] = value;\n }\n } catch (error) {\n error.checkKey = key;\n error.checkValue = object2[key];\n throw error;\n }\n }\n return result;\n };\n Formatter2.allowNull = function(format, nullValue) {\n return function(value) {\n if (value == null) {\n return nullValue;\n }\n return format(value);\n };\n };\n Formatter2.allowFalsish = function(format, replaceValue) {\n return function(value) {\n if (!value) {\n return replaceValue;\n }\n return format(value);\n };\n };\n Formatter2.arrayOf = function(format) {\n return function(array2) {\n if (!Array.isArray(array2)) {\n throw new Error(\"not an array\");\n }\n var result = [];\n array2.forEach(function(value) {\n result.push(format(value));\n });\n return result;\n };\n };\n return Formatter2;\n }()\n );\n exports3.Formatter = Formatter;\n function isCommunityResourcable(value) {\n return value && typeof value.isCommunityResource === \"function\";\n }\n exports3.isCommunityResourcable = isCommunityResourcable;\n function isCommunityResource(value) {\n return isCommunityResourcable(value) && value.isCommunityResource();\n }\n exports3.isCommunityResource = isCommunityResource;\n var throttleMessage = false;\n function showThrottleMessage() {\n if (throttleMessage) {\n return;\n }\n throttleMessage = true;\n console.log(\"========= NOTICE =========\");\n console.log(\"Request-Rate Exceeded (this message will not be repeated)\");\n console.log(\"\");\n console.log(\"The default API keys for each service are provided as a highly-throttled,\");\n console.log(\"community resource for low-traffic projects and early prototyping.\");\n console.log(\"\");\n console.log(\"While your application will continue to function, we highly recommended\");\n console.log(\"signing up for your own API keys to improve performance, increase your\");\n console.log(\"request rate/limit and enable other perks, such as metrics and advanced APIs.\");\n console.log(\"\");\n console.log(\"For more details: https://docs.ethers.io/api-keys/\");\n console.log(\"==========================\");\n }\n exports3.showThrottleMessage = showThrottleMessage;\n }\n });\n\n // ../../../node_modules/.pnpm/@ethersproject+providers@5.8.0_bufferutil@4.0.9_utf-8-validate@5.0.10/node_modules/@ethersproject/providers/lib/base-provider.js\n var require_base_provider = __commonJS({\n \"../../../node_modules/.pnpm/@ethersproject+providers@5.8.0_bufferutil@4.0.9_utf-8-validate@5.0.10/node_modules/@ethersproject/providers/lib/base-provider.js\"(exports3) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n var __extends3 = exports3 && exports3.__extends || /* @__PURE__ */ function() {\n var extendStatics3 = function(d5, b4) {\n extendStatics3 = Object.setPrototypeOf || { __proto__: [] } instanceof Array && function(d6, b5) {\n d6.__proto__ = b5;\n } || function(d6, b5) {\n for (var p4 in b5)\n if (Object.prototype.hasOwnProperty.call(b5, p4))\n d6[p4] = b5[p4];\n };\n return extendStatics3(d5, b4);\n };\n return function(d5, b4) {\n if (typeof b4 !== \"function\" && b4 !== null)\n throw new TypeError(\"Class extends value \" + String(b4) + \" is not a constructor or null\");\n extendStatics3(d5, b4);\n function __() {\n this.constructor = d5;\n }\n d5.prototype = b4 === null ? Object.create(b4) : (__.prototype = b4.prototype, new __());\n };\n }();\n var __awaiter3 = exports3 && exports3.__awaiter || function(thisArg, _arguments, P2, generator) {\n function adopt(value) {\n return value instanceof P2 ? value : new P2(function(resolve) {\n resolve(value);\n });\n }\n return new (P2 || (P2 = Promise))(function(resolve, reject) {\n function fulfilled(value) {\n try {\n step(generator.next(value));\n } catch (e3) {\n reject(e3);\n }\n }\n function rejected(value) {\n try {\n step(generator[\"throw\"](value));\n } catch (e3) {\n reject(e3);\n }\n }\n function step(result) {\n result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected);\n }\n step((generator = generator.apply(thisArg, _arguments || [])).next());\n });\n };\n var __generator3 = exports3 && exports3.__generator || function(thisArg, body) {\n var _2 = { label: 0, sent: function() {\n if (t3[0] & 1)\n throw t3[1];\n return t3[1];\n }, trys: [], ops: [] }, f6, y6, t3, g4;\n return g4 = { next: verb(0), \"throw\": verb(1), \"return\": verb(2) }, typeof Symbol === \"function\" && (g4[Symbol.iterator] = function() {\n return this;\n }), g4;\n function verb(n2) {\n return function(v2) {\n return step([n2, v2]);\n };\n }\n function step(op) {\n if (f6)\n throw new TypeError(\"Generator is already executing.\");\n while (_2)\n try {\n if (f6 = 1, y6 && (t3 = op[0] & 2 ? y6[\"return\"] : op[0] ? y6[\"throw\"] || ((t3 = y6[\"return\"]) && t3.call(y6), 0) : y6.next) && !(t3 = t3.call(y6, op[1])).done)\n return t3;\n if (y6 = 0, t3)\n op = [op[0] & 2, t3.value];\n switch (op[0]) {\n case 0:\n case 1:\n t3 = op;\n break;\n case 4:\n _2.label++;\n return { value: op[1], done: false };\n case 5:\n _2.label++;\n y6 = op[1];\n op = [0];\n continue;\n case 7:\n op = _2.ops.pop();\n _2.trys.pop();\n continue;\n default:\n if (!(t3 = _2.trys, t3 = t3.length > 0 && t3[t3.length - 1]) && (op[0] === 6 || op[0] === 2)) {\n _2 = 0;\n continue;\n }\n if (op[0] === 3 && (!t3 || op[1] > t3[0] && op[1] < t3[3])) {\n _2.label = op[1];\n break;\n }\n if (op[0] === 6 && _2.label < t3[1]) {\n _2.label = t3[1];\n t3 = op;\n break;\n }\n if (t3 && _2.label < t3[2]) {\n _2.label = t3[2];\n _2.ops.push(op);\n break;\n }\n if (t3[2])\n _2.ops.pop();\n _2.trys.pop();\n continue;\n }\n op = body.call(thisArg, _2);\n } catch (e3) {\n op = [6, e3];\n y6 = 0;\n } finally {\n f6 = t3 = 0;\n }\n if (op[0] & 5)\n throw op[1];\n return { value: op[0] ? op[1] : void 0, done: true };\n }\n };\n var __importDefault3 = exports3 && exports3.__importDefault || function(mod3) {\n return mod3 && mod3.__esModule ? mod3 : { \"default\": mod3 };\n };\n Object.defineProperty(exports3, \"__esModule\", { value: true });\n exports3.BaseProvider = exports3.Resolver = exports3.Event = void 0;\n var abstract_provider_1 = require_lib14();\n var base64_1 = require_lib10();\n var basex_1 = require_lib19();\n var bignumber_1 = require_lib3();\n var bytes_1 = require_lib2();\n var constants_1 = require_lib8();\n var hash_1 = require_lib12();\n var networks_1 = require_lib27();\n var properties_1 = require_lib4();\n var sha2_1 = require_lib20();\n var strings_1 = require_lib9();\n var web_1 = require_lib28();\n var bech32_1 = __importDefault3(require_bech32());\n var logger_1 = require_lib();\n var _version_1 = require_version23();\n var logger = new logger_1.Logger(_version_1.version);\n var formatter_1 = require_formatter();\n var MAX_CCIP_REDIRECTS = 10;\n function checkTopic(topic) {\n if (topic == null) {\n return \"null\";\n }\n if ((0, bytes_1.hexDataLength)(topic) !== 32) {\n logger.throwArgumentError(\"invalid topic\", \"topic\", topic);\n }\n return topic.toLowerCase();\n }\n function serializeTopics(topics) {\n topics = topics.slice();\n while (topics.length > 0 && topics[topics.length - 1] == null) {\n topics.pop();\n }\n return topics.map(function(topic) {\n if (Array.isArray(topic)) {\n var unique_1 = {};\n topic.forEach(function(topic2) {\n unique_1[checkTopic(topic2)] = true;\n });\n var sorted = Object.keys(unique_1);\n sorted.sort();\n return sorted.join(\"|\");\n } else {\n return checkTopic(topic);\n }\n }).join(\"&\");\n }\n function deserializeTopics(data) {\n if (data === \"\") {\n return [];\n }\n return data.split(/&/g).map(function(topic) {\n if (topic === \"\") {\n return [];\n }\n var comps = topic.split(\"|\").map(function(topic2) {\n return topic2 === \"null\" ? null : topic2;\n });\n return comps.length === 1 ? comps[0] : comps;\n });\n }\n function getEventTag(eventName) {\n if (typeof eventName === \"string\") {\n eventName = eventName.toLowerCase();\n if ((0, bytes_1.hexDataLength)(eventName) === 32) {\n return \"tx:\" + eventName;\n }\n if (eventName.indexOf(\":\") === -1) {\n return eventName;\n }\n } else if (Array.isArray(eventName)) {\n return \"filter:*:\" + serializeTopics(eventName);\n } else if (abstract_provider_1.ForkEvent.isForkEvent(eventName)) {\n logger.warn(\"not implemented\");\n throw new Error(\"not implemented\");\n } else if (eventName && typeof eventName === \"object\") {\n return \"filter:\" + (eventName.address || \"*\") + \":\" + serializeTopics(eventName.topics || []);\n }\n throw new Error(\"invalid event - \" + eventName);\n }\n function getTime() {\n return (/* @__PURE__ */ new Date()).getTime();\n }\n function stall(duration) {\n return new Promise(function(resolve) {\n setTimeout(resolve, duration);\n });\n }\n var PollableEvents = [\"block\", \"network\", \"pending\", \"poll\"];\n var Event2 = (\n /** @class */\n function() {\n function Event3(tag, listener, once2) {\n (0, properties_1.defineReadOnly)(this, \"tag\", tag);\n (0, properties_1.defineReadOnly)(this, \"listener\", listener);\n (0, properties_1.defineReadOnly)(this, \"once\", once2);\n this._lastBlockNumber = -2;\n this._inflight = false;\n }\n Object.defineProperty(Event3.prototype, \"event\", {\n get: function() {\n switch (this.type) {\n case \"tx\":\n return this.hash;\n case \"filter\":\n return this.filter;\n }\n return this.tag;\n },\n enumerable: false,\n configurable: true\n });\n Object.defineProperty(Event3.prototype, \"type\", {\n get: function() {\n return this.tag.split(\":\")[0];\n },\n enumerable: false,\n configurable: true\n });\n Object.defineProperty(Event3.prototype, \"hash\", {\n get: function() {\n var comps = this.tag.split(\":\");\n if (comps[0] !== \"tx\") {\n return null;\n }\n return comps[1];\n },\n enumerable: false,\n configurable: true\n });\n Object.defineProperty(Event3.prototype, \"filter\", {\n get: function() {\n var comps = this.tag.split(\":\");\n if (comps[0] !== \"filter\") {\n return null;\n }\n var address = comps[1];\n var topics = deserializeTopics(comps[2]);\n var filter = {};\n if (topics.length > 0) {\n filter.topics = topics;\n }\n if (address && address !== \"*\") {\n filter.address = address;\n }\n return filter;\n },\n enumerable: false,\n configurable: true\n });\n Event3.prototype.pollable = function() {\n return this.tag.indexOf(\":\") >= 0 || PollableEvents.indexOf(this.tag) >= 0;\n };\n return Event3;\n }()\n );\n exports3.Event = Event2;\n var coinInfos = {\n \"0\": { symbol: \"btc\", p2pkh: 0, p2sh: 5, prefix: \"bc\" },\n \"2\": { symbol: \"ltc\", p2pkh: 48, p2sh: 50, prefix: \"ltc\" },\n \"3\": { symbol: \"doge\", p2pkh: 30, p2sh: 22 },\n \"60\": { symbol: \"eth\", ilk: \"eth\" },\n \"61\": { symbol: \"etc\", ilk: \"eth\" },\n \"700\": { symbol: \"xdai\", ilk: \"eth\" }\n };\n function bytes32ify(value) {\n return (0, bytes_1.hexZeroPad)(bignumber_1.BigNumber.from(value).toHexString(), 32);\n }\n function base58Encode(data) {\n return basex_1.Base58.encode((0, bytes_1.concat)([data, (0, bytes_1.hexDataSlice)((0, sha2_1.sha256)((0, sha2_1.sha256)(data)), 0, 4)]));\n }\n var matcherIpfs = new RegExp(\"^(ipfs)://(.*)$\", \"i\");\n var matchers = [\n new RegExp(\"^(https)://(.*)$\", \"i\"),\n new RegExp(\"^(data):(.*)$\", \"i\"),\n matcherIpfs,\n new RegExp(\"^eip155:[0-9]+/(erc[0-9]+):(.*)$\", \"i\")\n ];\n function _parseString(result, start) {\n try {\n return (0, strings_1.toUtf8String)(_parseBytes(result, start));\n } catch (error) {\n }\n return null;\n }\n function _parseBytes(result, start) {\n if (result === \"0x\") {\n return null;\n }\n var offset = bignumber_1.BigNumber.from((0, bytes_1.hexDataSlice)(result, start, start + 32)).toNumber();\n var length2 = bignumber_1.BigNumber.from((0, bytes_1.hexDataSlice)(result, offset, offset + 32)).toNumber();\n return (0, bytes_1.hexDataSlice)(result, offset + 32, offset + 32 + length2);\n }\n function getIpfsLink(link) {\n if (link.match(/^ipfs:\\/\\/ipfs\\//i)) {\n link = link.substring(12);\n } else if (link.match(/^ipfs:\\/\\//i)) {\n link = link.substring(7);\n } else {\n logger.throwArgumentError(\"unsupported IPFS format\", \"link\", link);\n }\n return \"https://gateway.ipfs.io/ipfs/\" + link;\n }\n function numPad(value) {\n var result = (0, bytes_1.arrayify)(value);\n if (result.length > 32) {\n throw new Error(\"internal; should not happen\");\n }\n var padded = new Uint8Array(32);\n padded.set(result, 32 - result.length);\n return padded;\n }\n function bytesPad(value) {\n if (value.length % 32 === 0) {\n return value;\n }\n var result = new Uint8Array(Math.ceil(value.length / 32) * 32);\n result.set(value);\n return result;\n }\n function encodeBytes3(datas) {\n var result = [];\n var byteCount = 0;\n for (var i3 = 0; i3 < datas.length; i3++) {\n result.push(null);\n byteCount += 32;\n }\n for (var i3 = 0; i3 < datas.length; i3++) {\n var data = (0, bytes_1.arrayify)(datas[i3]);\n result[i3] = numPad(byteCount);\n result.push(numPad(data.length));\n result.push(bytesPad(data));\n byteCount += 32 + Math.ceil(data.length / 32) * 32;\n }\n return (0, bytes_1.hexConcat)(result);\n }\n var Resolver = (\n /** @class */\n function() {\n function Resolver2(provider, address, name, resolvedAddress) {\n (0, properties_1.defineReadOnly)(this, \"provider\", provider);\n (0, properties_1.defineReadOnly)(this, \"name\", name);\n (0, properties_1.defineReadOnly)(this, \"address\", provider.formatter.address(address));\n (0, properties_1.defineReadOnly)(this, \"_resolvedAddress\", resolvedAddress);\n }\n Resolver2.prototype.supportsWildcard = function() {\n var _this = this;\n if (!this._supportsEip2544) {\n this._supportsEip2544 = this.provider.call({\n to: this.address,\n data: \"0x01ffc9a79061b92300000000000000000000000000000000000000000000000000000000\"\n }).then(function(result) {\n return bignumber_1.BigNumber.from(result).eq(1);\n }).catch(function(error) {\n if (error.code === logger_1.Logger.errors.CALL_EXCEPTION) {\n return false;\n }\n _this._supportsEip2544 = null;\n throw error;\n });\n }\n return this._supportsEip2544;\n };\n Resolver2.prototype._fetch = function(selector, parameters) {\n return __awaiter3(this, void 0, void 0, function() {\n var tx, parseBytes, result, error_1;\n return __generator3(this, function(_a) {\n switch (_a.label) {\n case 0:\n tx = {\n to: this.address,\n ccipReadEnabled: true,\n data: (0, bytes_1.hexConcat)([selector, (0, hash_1.namehash)(this.name), parameters || \"0x\"])\n };\n parseBytes = false;\n return [4, this.supportsWildcard()];\n case 1:\n if (_a.sent()) {\n parseBytes = true;\n tx.data = (0, bytes_1.hexConcat)([\"0x9061b923\", encodeBytes3([(0, hash_1.dnsEncode)(this.name), tx.data])]);\n }\n _a.label = 2;\n case 2:\n _a.trys.push([2, 4, , 5]);\n return [4, this.provider.call(tx)];\n case 3:\n result = _a.sent();\n if ((0, bytes_1.arrayify)(result).length % 32 === 4) {\n logger.throwError(\"resolver threw error\", logger_1.Logger.errors.CALL_EXCEPTION, {\n transaction: tx,\n data: result\n });\n }\n if (parseBytes) {\n result = _parseBytes(result, 0);\n }\n return [2, result];\n case 4:\n error_1 = _a.sent();\n if (error_1.code === logger_1.Logger.errors.CALL_EXCEPTION) {\n return [2, null];\n }\n throw error_1;\n case 5:\n return [\n 2\n /*return*/\n ];\n }\n });\n });\n };\n Resolver2.prototype._fetchBytes = function(selector, parameters) {\n return __awaiter3(this, void 0, void 0, function() {\n var result;\n return __generator3(this, function(_a) {\n switch (_a.label) {\n case 0:\n return [4, this._fetch(selector, parameters)];\n case 1:\n result = _a.sent();\n if (result != null) {\n return [2, _parseBytes(result, 0)];\n }\n return [2, null];\n }\n });\n });\n };\n Resolver2.prototype._getAddress = function(coinType, hexBytes) {\n var coinInfo = coinInfos[String(coinType)];\n if (coinInfo == null) {\n logger.throwError(\"unsupported coin type: \" + coinType, logger_1.Logger.errors.UNSUPPORTED_OPERATION, {\n operation: \"getAddress(\" + coinType + \")\"\n });\n }\n if (coinInfo.ilk === \"eth\") {\n return this.provider.formatter.address(hexBytes);\n }\n var bytes = (0, bytes_1.arrayify)(hexBytes);\n if (coinInfo.p2pkh != null) {\n var p2pkh = hexBytes.match(/^0x76a9([0-9a-f][0-9a-f])([0-9a-f]*)88ac$/);\n if (p2pkh) {\n var length_1 = parseInt(p2pkh[1], 16);\n if (p2pkh[2].length === length_1 * 2 && length_1 >= 1 && length_1 <= 75) {\n return base58Encode((0, bytes_1.concat)([[coinInfo.p2pkh], \"0x\" + p2pkh[2]]));\n }\n }\n }\n if (coinInfo.p2sh != null) {\n var p2sh = hexBytes.match(/^0xa9([0-9a-f][0-9a-f])([0-9a-f]*)87$/);\n if (p2sh) {\n var length_2 = parseInt(p2sh[1], 16);\n if (p2sh[2].length === length_2 * 2 && length_2 >= 1 && length_2 <= 75) {\n return base58Encode((0, bytes_1.concat)([[coinInfo.p2sh], \"0x\" + p2sh[2]]));\n }\n }\n }\n if (coinInfo.prefix != null) {\n var length_3 = bytes[1];\n var version_1 = bytes[0];\n if (version_1 === 0) {\n if (length_3 !== 20 && length_3 !== 32) {\n version_1 = -1;\n }\n } else {\n version_1 = -1;\n }\n if (version_1 >= 0 && bytes.length === 2 + length_3 && length_3 >= 1 && length_3 <= 75) {\n var words = bech32_1.default.toWords(bytes.slice(2));\n words.unshift(version_1);\n return bech32_1.default.encode(coinInfo.prefix, words);\n }\n }\n return null;\n };\n Resolver2.prototype.getAddress = function(coinType) {\n return __awaiter3(this, void 0, void 0, function() {\n var result, error_2, hexBytes, address;\n return __generator3(this, function(_a) {\n switch (_a.label) {\n case 0:\n if (coinType == null) {\n coinType = 60;\n }\n if (!(coinType === 60))\n return [3, 4];\n _a.label = 1;\n case 1:\n _a.trys.push([1, 3, , 4]);\n return [4, this._fetch(\"0x3b3b57de\")];\n case 2:\n result = _a.sent();\n if (result === \"0x\" || result === constants_1.HashZero) {\n return [2, null];\n }\n return [2, this.provider.formatter.callAddress(result)];\n case 3:\n error_2 = _a.sent();\n if (error_2.code === logger_1.Logger.errors.CALL_EXCEPTION) {\n return [2, null];\n }\n throw error_2;\n case 4:\n return [4, this._fetchBytes(\"0xf1cb7e06\", bytes32ify(coinType))];\n case 5:\n hexBytes = _a.sent();\n if (hexBytes == null || hexBytes === \"0x\") {\n return [2, null];\n }\n address = this._getAddress(coinType, hexBytes);\n if (address == null) {\n logger.throwError(\"invalid or unsupported coin data\", logger_1.Logger.errors.UNSUPPORTED_OPERATION, {\n operation: \"getAddress(\" + coinType + \")\",\n coinType,\n data: hexBytes\n });\n }\n return [2, address];\n }\n });\n });\n };\n Resolver2.prototype.getAvatar = function() {\n return __awaiter3(this, void 0, void 0, function() {\n var linkage, avatar, i3, match, scheme, _a, selector, owner, _b, comps, addr, tokenId, tokenOwner, _c, _d, balance, _e, _f, tx, metadataUrl, _g, metadata, imageUrl, ipfs, error_3;\n return __generator3(this, function(_h) {\n switch (_h.label) {\n case 0:\n linkage = [{ type: \"name\", content: this.name }];\n _h.label = 1;\n case 1:\n _h.trys.push([1, 19, , 20]);\n return [4, this.getText(\"avatar\")];\n case 2:\n avatar = _h.sent();\n if (avatar == null) {\n return [2, null];\n }\n i3 = 0;\n _h.label = 3;\n case 3:\n if (!(i3 < matchers.length))\n return [3, 18];\n match = avatar.match(matchers[i3]);\n if (match == null) {\n return [3, 17];\n }\n scheme = match[1].toLowerCase();\n _a = scheme;\n switch (_a) {\n case \"https\":\n return [3, 4];\n case \"data\":\n return [3, 5];\n case \"ipfs\":\n return [3, 6];\n case \"erc721\":\n return [3, 7];\n case \"erc1155\":\n return [3, 7];\n }\n return [3, 17];\n case 4:\n linkage.push({ type: \"url\", content: avatar });\n return [2, { linkage, url: avatar }];\n case 5:\n linkage.push({ type: \"data\", content: avatar });\n return [2, { linkage, url: avatar }];\n case 6:\n linkage.push({ type: \"ipfs\", content: avatar });\n return [2, { linkage, url: getIpfsLink(avatar) }];\n case 7:\n selector = scheme === \"erc721\" ? \"0xc87b56dd\" : \"0x0e89341c\";\n linkage.push({ type: scheme, content: avatar });\n _b = this._resolvedAddress;\n if (_b)\n return [3, 9];\n return [4, this.getAddress()];\n case 8:\n _b = _h.sent();\n _h.label = 9;\n case 9:\n owner = _b;\n comps = (match[2] || \"\").split(\"/\");\n if (comps.length !== 2) {\n return [2, null];\n }\n return [4, this.provider.formatter.address(comps[0])];\n case 10:\n addr = _h.sent();\n tokenId = (0, bytes_1.hexZeroPad)(bignumber_1.BigNumber.from(comps[1]).toHexString(), 32);\n if (!(scheme === \"erc721\"))\n return [3, 12];\n _d = (_c = this.provider.formatter).callAddress;\n return [4, this.provider.call({\n to: addr,\n data: (0, bytes_1.hexConcat)([\"0x6352211e\", tokenId])\n })];\n case 11:\n tokenOwner = _d.apply(_c, [_h.sent()]);\n if (owner !== tokenOwner) {\n return [2, null];\n }\n linkage.push({ type: \"owner\", content: tokenOwner });\n return [3, 14];\n case 12:\n if (!(scheme === \"erc1155\"))\n return [3, 14];\n _f = (_e = bignumber_1.BigNumber).from;\n return [4, this.provider.call({\n to: addr,\n data: (0, bytes_1.hexConcat)([\"0x00fdd58e\", (0, bytes_1.hexZeroPad)(owner, 32), tokenId])\n })];\n case 13:\n balance = _f.apply(_e, [_h.sent()]);\n if (balance.isZero()) {\n return [2, null];\n }\n linkage.push({ type: \"balance\", content: balance.toString() });\n _h.label = 14;\n case 14:\n tx = {\n to: this.provider.formatter.address(comps[0]),\n data: (0, bytes_1.hexConcat)([selector, tokenId])\n };\n _g = _parseString;\n return [4, this.provider.call(tx)];\n case 15:\n metadataUrl = _g.apply(void 0, [_h.sent(), 0]);\n if (metadataUrl == null) {\n return [2, null];\n }\n linkage.push({ type: \"metadata-url-base\", content: metadataUrl });\n if (scheme === \"erc1155\") {\n metadataUrl = metadataUrl.replace(\"{id}\", tokenId.substring(2));\n linkage.push({ type: \"metadata-url-expanded\", content: metadataUrl });\n }\n if (metadataUrl.match(/^ipfs:/i)) {\n metadataUrl = getIpfsLink(metadataUrl);\n }\n linkage.push({ type: \"metadata-url\", content: metadataUrl });\n return [4, (0, web_1.fetchJson)(metadataUrl)];\n case 16:\n metadata = _h.sent();\n if (!metadata) {\n return [2, null];\n }\n linkage.push({ type: \"metadata\", content: JSON.stringify(metadata) });\n imageUrl = metadata.image;\n if (typeof imageUrl !== \"string\") {\n return [2, null];\n }\n if (imageUrl.match(/^(https:\\/\\/|data:)/i)) {\n } else {\n ipfs = imageUrl.match(matcherIpfs);\n if (ipfs == null) {\n return [2, null];\n }\n linkage.push({ type: \"url-ipfs\", content: imageUrl });\n imageUrl = getIpfsLink(imageUrl);\n }\n linkage.push({ type: \"url\", content: imageUrl });\n return [2, { linkage, url: imageUrl }];\n case 17:\n i3++;\n return [3, 3];\n case 18:\n return [3, 20];\n case 19:\n error_3 = _h.sent();\n return [3, 20];\n case 20:\n return [2, null];\n }\n });\n });\n };\n Resolver2.prototype.getContentHash = function() {\n return __awaiter3(this, void 0, void 0, function() {\n var hexBytes, ipfs, length_4, ipns, length_5, swarm, skynet, urlSafe_1, hash3;\n return __generator3(this, function(_a) {\n switch (_a.label) {\n case 0:\n return [4, this._fetchBytes(\"0xbc1c58d1\")];\n case 1:\n hexBytes = _a.sent();\n if (hexBytes == null || hexBytes === \"0x\") {\n return [2, null];\n }\n ipfs = hexBytes.match(/^0xe3010170(([0-9a-f][0-9a-f])([0-9a-f][0-9a-f])([0-9a-f]*))$/);\n if (ipfs) {\n length_4 = parseInt(ipfs[3], 16);\n if (ipfs[4].length === length_4 * 2) {\n return [2, \"ipfs://\" + basex_1.Base58.encode(\"0x\" + ipfs[1])];\n }\n }\n ipns = hexBytes.match(/^0xe5010172(([0-9a-f][0-9a-f])([0-9a-f][0-9a-f])([0-9a-f]*))$/);\n if (ipns) {\n length_5 = parseInt(ipns[3], 16);\n if (ipns[4].length === length_5 * 2) {\n return [2, \"ipns://\" + basex_1.Base58.encode(\"0x\" + ipns[1])];\n }\n }\n swarm = hexBytes.match(/^0xe40101fa011b20([0-9a-f]*)$/);\n if (swarm) {\n if (swarm[1].length === 32 * 2) {\n return [2, \"bzz://\" + swarm[1]];\n }\n }\n skynet = hexBytes.match(/^0x90b2c605([0-9a-f]*)$/);\n if (skynet) {\n if (skynet[1].length === 34 * 2) {\n urlSafe_1 = { \"=\": \"\", \"+\": \"-\", \"/\": \"_\" };\n hash3 = (0, base64_1.encode)(\"0x\" + skynet[1]).replace(/[=+\\/]/g, function(a3) {\n return urlSafe_1[a3];\n });\n return [2, \"sia://\" + hash3];\n }\n }\n return [2, logger.throwError(\"invalid or unsupported content hash data\", logger_1.Logger.errors.UNSUPPORTED_OPERATION, {\n operation: \"getContentHash()\",\n data: hexBytes\n })];\n }\n });\n });\n };\n Resolver2.prototype.getText = function(key) {\n return __awaiter3(this, void 0, void 0, function() {\n var keyBytes, hexBytes;\n return __generator3(this, function(_a) {\n switch (_a.label) {\n case 0:\n keyBytes = (0, strings_1.toUtf8Bytes)(key);\n keyBytes = (0, bytes_1.concat)([bytes32ify(64), bytes32ify(keyBytes.length), keyBytes]);\n if (keyBytes.length % 32 !== 0) {\n keyBytes = (0, bytes_1.concat)([keyBytes, (0, bytes_1.hexZeroPad)(\"0x\", 32 - key.length % 32)]);\n }\n return [4, this._fetchBytes(\"0x59d1d43c\", (0, bytes_1.hexlify)(keyBytes))];\n case 1:\n hexBytes = _a.sent();\n if (hexBytes == null || hexBytes === \"0x\") {\n return [2, null];\n }\n return [2, (0, strings_1.toUtf8String)(hexBytes)];\n }\n });\n });\n };\n return Resolver2;\n }()\n );\n exports3.Resolver = Resolver;\n var defaultFormatter = null;\n var nextPollId = 1;\n var BaseProvider = (\n /** @class */\n function(_super) {\n __extends3(BaseProvider2, _super);\n function BaseProvider2(network) {\n var _newTarget = this.constructor;\n var _this = _super.call(this) || this;\n _this._events = [];\n _this._emitted = { block: -2 };\n _this.disableCcipRead = false;\n _this.formatter = _newTarget.getFormatter();\n (0, properties_1.defineReadOnly)(_this, \"anyNetwork\", network === \"any\");\n if (_this.anyNetwork) {\n network = _this.detectNetwork();\n }\n if (network instanceof Promise) {\n _this._networkPromise = network;\n network.catch(function(error) {\n });\n _this._ready().catch(function(error) {\n });\n } else {\n var knownNetwork = (0, properties_1.getStatic)(_newTarget, \"getNetwork\")(network);\n if (knownNetwork) {\n (0, properties_1.defineReadOnly)(_this, \"_network\", knownNetwork);\n _this.emit(\"network\", knownNetwork, null);\n } else {\n logger.throwArgumentError(\"invalid network\", \"network\", network);\n }\n }\n _this._maxInternalBlockNumber = -1024;\n _this._lastBlockNumber = -2;\n _this._maxFilterBlockRange = 10;\n _this._pollingInterval = 4e3;\n _this._fastQueryDate = 0;\n return _this;\n }\n BaseProvider2.prototype._ready = function() {\n return __awaiter3(this, void 0, void 0, function() {\n var network, error_4;\n return __generator3(this, function(_a) {\n switch (_a.label) {\n case 0:\n if (!(this._network == null))\n return [3, 7];\n network = null;\n if (!this._networkPromise)\n return [3, 4];\n _a.label = 1;\n case 1:\n _a.trys.push([1, 3, , 4]);\n return [4, this._networkPromise];\n case 2:\n network = _a.sent();\n return [3, 4];\n case 3:\n error_4 = _a.sent();\n return [3, 4];\n case 4:\n if (!(network == null))\n return [3, 6];\n return [4, this.detectNetwork()];\n case 5:\n network = _a.sent();\n _a.label = 6;\n case 6:\n if (!network) {\n logger.throwError(\"no network detected\", logger_1.Logger.errors.UNKNOWN_ERROR, {});\n }\n if (this._network == null) {\n if (this.anyNetwork) {\n this._network = network;\n } else {\n (0, properties_1.defineReadOnly)(this, \"_network\", network);\n }\n this.emit(\"network\", network, null);\n }\n _a.label = 7;\n case 7:\n return [2, this._network];\n }\n });\n });\n };\n Object.defineProperty(BaseProvider2.prototype, \"ready\", {\n // This will always return the most recently established network.\n // For \"any\", this can change (a \"network\" event is emitted before\n // any change is reflected); otherwise this cannot change\n get: function() {\n var _this = this;\n return (0, web_1.poll)(function() {\n return _this._ready().then(function(network) {\n return network;\n }, function(error) {\n if (error.code === logger_1.Logger.errors.NETWORK_ERROR && error.event === \"noNetwork\") {\n return void 0;\n }\n throw error;\n });\n });\n },\n enumerable: false,\n configurable: true\n });\n BaseProvider2.getFormatter = function() {\n if (defaultFormatter == null) {\n defaultFormatter = new formatter_1.Formatter();\n }\n return defaultFormatter;\n };\n BaseProvider2.getNetwork = function(network) {\n return (0, networks_1.getNetwork)(network == null ? \"homestead\" : network);\n };\n BaseProvider2.prototype.ccipReadFetch = function(tx, calldata, urls) {\n return __awaiter3(this, void 0, void 0, function() {\n var sender, data, errorMessages, i3, url, href, json, result, errorMessage;\n return __generator3(this, function(_a) {\n switch (_a.label) {\n case 0:\n if (this.disableCcipRead || urls.length === 0) {\n return [2, null];\n }\n sender = tx.to.toLowerCase();\n data = calldata.toLowerCase();\n errorMessages = [];\n i3 = 0;\n _a.label = 1;\n case 1:\n if (!(i3 < urls.length))\n return [3, 4];\n url = urls[i3];\n href = url.replace(\"{sender}\", sender).replace(\"{data}\", data);\n json = url.indexOf(\"{data}\") >= 0 ? null : JSON.stringify({ data, sender });\n return [4, (0, web_1.fetchJson)({ url: href, errorPassThrough: true }, json, function(value, response) {\n value.status = response.statusCode;\n return value;\n })];\n case 2:\n result = _a.sent();\n if (result.data) {\n return [2, result.data];\n }\n errorMessage = result.message || \"unknown error\";\n if (result.status >= 400 && result.status < 500) {\n return [2, logger.throwError(\"response not found during CCIP fetch: \" + errorMessage, logger_1.Logger.errors.SERVER_ERROR, { url, errorMessage })];\n }\n errorMessages.push(errorMessage);\n _a.label = 3;\n case 3:\n i3++;\n return [3, 1];\n case 4:\n return [2, logger.throwError(\"error encountered during CCIP fetch: \" + errorMessages.map(function(m2) {\n return JSON.stringify(m2);\n }).join(\", \"), logger_1.Logger.errors.SERVER_ERROR, {\n urls,\n errorMessages\n })];\n }\n });\n });\n };\n BaseProvider2.prototype._getInternalBlockNumber = function(maxAge) {\n return __awaiter3(this, void 0, void 0, function() {\n var internalBlockNumber, result, error_5, reqTime, checkInternalBlockNumber;\n var _this = this;\n return __generator3(this, function(_a) {\n switch (_a.label) {\n case 0:\n return [4, this._ready()];\n case 1:\n _a.sent();\n if (!(maxAge > 0))\n return [3, 7];\n _a.label = 2;\n case 2:\n if (!this._internalBlockNumber)\n return [3, 7];\n internalBlockNumber = this._internalBlockNumber;\n _a.label = 3;\n case 3:\n _a.trys.push([3, 5, , 6]);\n return [4, internalBlockNumber];\n case 4:\n result = _a.sent();\n if (getTime() - result.respTime <= maxAge) {\n return [2, result.blockNumber];\n }\n return [3, 7];\n case 5:\n error_5 = _a.sent();\n if (this._internalBlockNumber === internalBlockNumber) {\n return [3, 7];\n }\n return [3, 6];\n case 6:\n return [3, 2];\n case 7:\n reqTime = getTime();\n checkInternalBlockNumber = (0, properties_1.resolveProperties)({\n blockNumber: this.perform(\"getBlockNumber\", {}),\n networkError: this.getNetwork().then(function(network) {\n return null;\n }, function(error) {\n return error;\n })\n }).then(function(_a2) {\n var blockNumber = _a2.blockNumber, networkError = _a2.networkError;\n if (networkError) {\n if (_this._internalBlockNumber === checkInternalBlockNumber) {\n _this._internalBlockNumber = null;\n }\n throw networkError;\n }\n var respTime = getTime();\n blockNumber = bignumber_1.BigNumber.from(blockNumber).toNumber();\n if (blockNumber < _this._maxInternalBlockNumber) {\n blockNumber = _this._maxInternalBlockNumber;\n }\n _this._maxInternalBlockNumber = blockNumber;\n _this._setFastBlockNumber(blockNumber);\n return { blockNumber, reqTime, respTime };\n });\n this._internalBlockNumber = checkInternalBlockNumber;\n checkInternalBlockNumber.catch(function(error) {\n if (_this._internalBlockNumber === checkInternalBlockNumber) {\n _this._internalBlockNumber = null;\n }\n });\n return [4, checkInternalBlockNumber];\n case 8:\n return [2, _a.sent().blockNumber];\n }\n });\n });\n };\n BaseProvider2.prototype.poll = function() {\n return __awaiter3(this, void 0, void 0, function() {\n var pollId, runners, blockNumber, error_6, i3;\n var _this = this;\n return __generator3(this, function(_a) {\n switch (_a.label) {\n case 0:\n pollId = nextPollId++;\n runners = [];\n blockNumber = null;\n _a.label = 1;\n case 1:\n _a.trys.push([1, 3, , 4]);\n return [4, this._getInternalBlockNumber(100 + this.pollingInterval / 2)];\n case 2:\n blockNumber = _a.sent();\n return [3, 4];\n case 3:\n error_6 = _a.sent();\n this.emit(\"error\", error_6);\n return [\n 2\n /*return*/\n ];\n case 4:\n this._setFastBlockNumber(blockNumber);\n this.emit(\"poll\", pollId, blockNumber);\n if (blockNumber === this._lastBlockNumber) {\n this.emit(\"didPoll\", pollId);\n return [\n 2\n /*return*/\n ];\n }\n if (this._emitted.block === -2) {\n this._emitted.block = blockNumber - 1;\n }\n if (Math.abs(this._emitted.block - blockNumber) > 1e3) {\n logger.warn(\"network block skew detected; skipping block events (emitted=\" + this._emitted.block + \" blockNumber\" + blockNumber + \")\");\n this.emit(\"error\", logger.makeError(\"network block skew detected\", logger_1.Logger.errors.NETWORK_ERROR, {\n blockNumber,\n event: \"blockSkew\",\n previousBlockNumber: this._emitted.block\n }));\n this.emit(\"block\", blockNumber);\n } else {\n for (i3 = this._emitted.block + 1; i3 <= blockNumber; i3++) {\n this.emit(\"block\", i3);\n }\n }\n if (this._emitted.block !== blockNumber) {\n this._emitted.block = blockNumber;\n Object.keys(this._emitted).forEach(function(key) {\n if (key === \"block\") {\n return;\n }\n var eventBlockNumber = _this._emitted[key];\n if (eventBlockNumber === \"pending\") {\n return;\n }\n if (blockNumber - eventBlockNumber > 12) {\n delete _this._emitted[key];\n }\n });\n }\n if (this._lastBlockNumber === -2) {\n this._lastBlockNumber = blockNumber - 1;\n }\n this._events.forEach(function(event) {\n switch (event.type) {\n case \"tx\": {\n var hash_2 = event.hash;\n var runner = _this.getTransactionReceipt(hash_2).then(function(receipt) {\n if (!receipt || receipt.blockNumber == null) {\n return null;\n }\n _this._emitted[\"t:\" + hash_2] = receipt.blockNumber;\n _this.emit(hash_2, receipt);\n return null;\n }).catch(function(error) {\n _this.emit(\"error\", error);\n });\n runners.push(runner);\n break;\n }\n case \"filter\": {\n if (!event._inflight) {\n event._inflight = true;\n if (event._lastBlockNumber === -2) {\n event._lastBlockNumber = blockNumber - 1;\n }\n var filter_1 = event.filter;\n filter_1.fromBlock = event._lastBlockNumber + 1;\n filter_1.toBlock = blockNumber;\n var minFromBlock = filter_1.toBlock - _this._maxFilterBlockRange;\n if (minFromBlock > filter_1.fromBlock) {\n filter_1.fromBlock = minFromBlock;\n }\n if (filter_1.fromBlock < 0) {\n filter_1.fromBlock = 0;\n }\n var runner = _this.getLogs(filter_1).then(function(logs) {\n event._inflight = false;\n if (logs.length === 0) {\n return;\n }\n logs.forEach(function(log) {\n if (log.blockNumber > event._lastBlockNumber) {\n event._lastBlockNumber = log.blockNumber;\n }\n _this._emitted[\"b:\" + log.blockHash] = log.blockNumber;\n _this._emitted[\"t:\" + log.transactionHash] = log.blockNumber;\n _this.emit(filter_1, log);\n });\n }).catch(function(error) {\n _this.emit(\"error\", error);\n event._inflight = false;\n });\n runners.push(runner);\n }\n break;\n }\n }\n });\n this._lastBlockNumber = blockNumber;\n Promise.all(runners).then(function() {\n _this.emit(\"didPoll\", pollId);\n }).catch(function(error) {\n _this.emit(\"error\", error);\n });\n return [\n 2\n /*return*/\n ];\n }\n });\n });\n };\n BaseProvider2.prototype.resetEventsBlock = function(blockNumber) {\n this._lastBlockNumber = blockNumber - 1;\n if (this.polling) {\n this.poll();\n }\n };\n Object.defineProperty(BaseProvider2.prototype, \"network\", {\n get: function() {\n return this._network;\n },\n enumerable: false,\n configurable: true\n });\n BaseProvider2.prototype.detectNetwork = function() {\n return __awaiter3(this, void 0, void 0, function() {\n return __generator3(this, function(_a) {\n return [2, logger.throwError(\"provider does not support network detection\", logger_1.Logger.errors.UNSUPPORTED_OPERATION, {\n operation: \"provider.detectNetwork\"\n })];\n });\n });\n };\n BaseProvider2.prototype.getNetwork = function() {\n return __awaiter3(this, void 0, void 0, function() {\n var network, currentNetwork, error;\n return __generator3(this, function(_a) {\n switch (_a.label) {\n case 0:\n return [4, this._ready()];\n case 1:\n network = _a.sent();\n return [4, this.detectNetwork()];\n case 2:\n currentNetwork = _a.sent();\n if (!(network.chainId !== currentNetwork.chainId))\n return [3, 5];\n if (!this.anyNetwork)\n return [3, 4];\n this._network = currentNetwork;\n this._lastBlockNumber = -2;\n this._fastBlockNumber = null;\n this._fastBlockNumberPromise = null;\n this._fastQueryDate = 0;\n this._emitted.block = -2;\n this._maxInternalBlockNumber = -1024;\n this._internalBlockNumber = null;\n this.emit(\"network\", currentNetwork, network);\n return [4, stall(0)];\n case 3:\n _a.sent();\n return [2, this._network];\n case 4:\n error = logger.makeError(\"underlying network changed\", logger_1.Logger.errors.NETWORK_ERROR, {\n event: \"changed\",\n network,\n detectedNetwork: currentNetwork\n });\n this.emit(\"error\", error);\n throw error;\n case 5:\n return [2, network];\n }\n });\n });\n };\n Object.defineProperty(BaseProvider2.prototype, \"blockNumber\", {\n get: function() {\n var _this = this;\n this._getInternalBlockNumber(100 + this.pollingInterval / 2).then(function(blockNumber) {\n _this._setFastBlockNumber(blockNumber);\n }, function(error) {\n });\n return this._fastBlockNumber != null ? this._fastBlockNumber : -1;\n },\n enumerable: false,\n configurable: true\n });\n Object.defineProperty(BaseProvider2.prototype, \"polling\", {\n get: function() {\n return this._poller != null;\n },\n set: function(value) {\n var _this = this;\n if (value && !this._poller) {\n this._poller = setInterval(function() {\n _this.poll();\n }, this.pollingInterval);\n if (!this._bootstrapPoll) {\n this._bootstrapPoll = setTimeout(function() {\n _this.poll();\n _this._bootstrapPoll = setTimeout(function() {\n if (!_this._poller) {\n _this.poll();\n }\n _this._bootstrapPoll = null;\n }, _this.pollingInterval);\n }, 0);\n }\n } else if (!value && this._poller) {\n clearInterval(this._poller);\n this._poller = null;\n }\n },\n enumerable: false,\n configurable: true\n });\n Object.defineProperty(BaseProvider2.prototype, \"pollingInterval\", {\n get: function() {\n return this._pollingInterval;\n },\n set: function(value) {\n var _this = this;\n if (typeof value !== \"number\" || value <= 0 || parseInt(String(value)) != value) {\n throw new Error(\"invalid polling interval\");\n }\n this._pollingInterval = value;\n if (this._poller) {\n clearInterval(this._poller);\n this._poller = setInterval(function() {\n _this.poll();\n }, this._pollingInterval);\n }\n },\n enumerable: false,\n configurable: true\n });\n BaseProvider2.prototype._getFastBlockNumber = function() {\n var _this = this;\n var now = getTime();\n if (now - this._fastQueryDate > 2 * this._pollingInterval) {\n this._fastQueryDate = now;\n this._fastBlockNumberPromise = this.getBlockNumber().then(function(blockNumber) {\n if (_this._fastBlockNumber == null || blockNumber > _this._fastBlockNumber) {\n _this._fastBlockNumber = blockNumber;\n }\n return _this._fastBlockNumber;\n });\n }\n return this._fastBlockNumberPromise;\n };\n BaseProvider2.prototype._setFastBlockNumber = function(blockNumber) {\n if (this._fastBlockNumber != null && blockNumber < this._fastBlockNumber) {\n return;\n }\n this._fastQueryDate = getTime();\n if (this._fastBlockNumber == null || blockNumber > this._fastBlockNumber) {\n this._fastBlockNumber = blockNumber;\n this._fastBlockNumberPromise = Promise.resolve(blockNumber);\n }\n };\n BaseProvider2.prototype.waitForTransaction = function(transactionHash, confirmations, timeout) {\n return __awaiter3(this, void 0, void 0, function() {\n return __generator3(this, function(_a) {\n return [2, this._waitForTransaction(transactionHash, confirmations == null ? 1 : confirmations, timeout || 0, null)];\n });\n });\n };\n BaseProvider2.prototype._waitForTransaction = function(transactionHash, confirmations, timeout, replaceable) {\n return __awaiter3(this, void 0, void 0, function() {\n var receipt;\n var _this = this;\n return __generator3(this, function(_a) {\n switch (_a.label) {\n case 0:\n return [4, this.getTransactionReceipt(transactionHash)];\n case 1:\n receipt = _a.sent();\n if ((receipt ? receipt.confirmations : 0) >= confirmations) {\n return [2, receipt];\n }\n return [2, new Promise(function(resolve, reject) {\n var cancelFuncs = [];\n var done = false;\n var alreadyDone = function() {\n if (done) {\n return true;\n }\n done = true;\n cancelFuncs.forEach(function(func) {\n func();\n });\n return false;\n };\n var minedHandler = function(receipt2) {\n if (receipt2.confirmations < confirmations) {\n return;\n }\n if (alreadyDone()) {\n return;\n }\n resolve(receipt2);\n };\n _this.on(transactionHash, minedHandler);\n cancelFuncs.push(function() {\n _this.removeListener(transactionHash, minedHandler);\n });\n if (replaceable) {\n var lastBlockNumber_1 = replaceable.startBlock;\n var scannedBlock_1 = null;\n var replaceHandler_1 = function(blockNumber) {\n return __awaiter3(_this, void 0, void 0, function() {\n var _this2 = this;\n return __generator3(this, function(_a2) {\n switch (_a2.label) {\n case 0:\n if (done) {\n return [\n 2\n /*return*/\n ];\n }\n return [4, stall(1e3)];\n case 1:\n _a2.sent();\n this.getTransactionCount(replaceable.from).then(function(nonce) {\n return __awaiter3(_this2, void 0, void 0, function() {\n var mined, block, ti, tx, receipt_1, reason;\n return __generator3(this, function(_a3) {\n switch (_a3.label) {\n case 0:\n if (done) {\n return [\n 2\n /*return*/\n ];\n }\n if (!(nonce <= replaceable.nonce))\n return [3, 1];\n lastBlockNumber_1 = blockNumber;\n return [3, 9];\n case 1:\n return [4, this.getTransaction(transactionHash)];\n case 2:\n mined = _a3.sent();\n if (mined && mined.blockNumber != null) {\n return [\n 2\n /*return*/\n ];\n }\n if (scannedBlock_1 == null) {\n scannedBlock_1 = lastBlockNumber_1 - 3;\n if (scannedBlock_1 < replaceable.startBlock) {\n scannedBlock_1 = replaceable.startBlock;\n }\n }\n _a3.label = 3;\n case 3:\n if (!(scannedBlock_1 <= blockNumber))\n return [3, 9];\n if (done) {\n return [\n 2\n /*return*/\n ];\n }\n return [4, this.getBlockWithTransactions(scannedBlock_1)];\n case 4:\n block = _a3.sent();\n ti = 0;\n _a3.label = 5;\n case 5:\n if (!(ti < block.transactions.length))\n return [3, 8];\n tx = block.transactions[ti];\n if (tx.hash === transactionHash) {\n return [\n 2\n /*return*/\n ];\n }\n if (!(tx.from === replaceable.from && tx.nonce === replaceable.nonce))\n return [3, 7];\n if (done) {\n return [\n 2\n /*return*/\n ];\n }\n return [4, this.waitForTransaction(tx.hash, confirmations)];\n case 6:\n receipt_1 = _a3.sent();\n if (alreadyDone()) {\n return [\n 2\n /*return*/\n ];\n }\n reason = \"replaced\";\n if (tx.data === replaceable.data && tx.to === replaceable.to && tx.value.eq(replaceable.value)) {\n reason = \"repriced\";\n } else if (tx.data === \"0x\" && tx.from === tx.to && tx.value.isZero()) {\n reason = \"cancelled\";\n }\n reject(logger.makeError(\"transaction was replaced\", logger_1.Logger.errors.TRANSACTION_REPLACED, {\n cancelled: reason === \"replaced\" || reason === \"cancelled\",\n reason,\n replacement: this._wrapTransaction(tx),\n hash: transactionHash,\n receipt: receipt_1\n }));\n return [\n 2\n /*return*/\n ];\n case 7:\n ti++;\n return [3, 5];\n case 8:\n scannedBlock_1++;\n return [3, 3];\n case 9:\n if (done) {\n return [\n 2\n /*return*/\n ];\n }\n this.once(\"block\", replaceHandler_1);\n return [\n 2\n /*return*/\n ];\n }\n });\n });\n }, function(error) {\n if (done) {\n return;\n }\n _this2.once(\"block\", replaceHandler_1);\n });\n return [\n 2\n /*return*/\n ];\n }\n });\n });\n };\n if (done) {\n return;\n }\n _this.once(\"block\", replaceHandler_1);\n cancelFuncs.push(function() {\n _this.removeListener(\"block\", replaceHandler_1);\n });\n }\n if (typeof timeout === \"number\" && timeout > 0) {\n var timer_1 = setTimeout(function() {\n if (alreadyDone()) {\n return;\n }\n reject(logger.makeError(\"timeout exceeded\", logger_1.Logger.errors.TIMEOUT, { timeout }));\n }, timeout);\n if (timer_1.unref) {\n timer_1.unref();\n }\n cancelFuncs.push(function() {\n clearTimeout(timer_1);\n });\n }\n })];\n }\n });\n });\n };\n BaseProvider2.prototype.getBlockNumber = function() {\n return __awaiter3(this, void 0, void 0, function() {\n return __generator3(this, function(_a) {\n return [2, this._getInternalBlockNumber(0)];\n });\n });\n };\n BaseProvider2.prototype.getGasPrice = function() {\n return __awaiter3(this, void 0, void 0, function() {\n var result;\n return __generator3(this, function(_a) {\n switch (_a.label) {\n case 0:\n return [4, this.getNetwork()];\n case 1:\n _a.sent();\n return [4, this.perform(\"getGasPrice\", {})];\n case 2:\n result = _a.sent();\n try {\n return [2, bignumber_1.BigNumber.from(result)];\n } catch (error) {\n return [2, logger.throwError(\"bad result from backend\", logger_1.Logger.errors.SERVER_ERROR, {\n method: \"getGasPrice\",\n result,\n error\n })];\n }\n return [\n 2\n /*return*/\n ];\n }\n });\n });\n };\n BaseProvider2.prototype.getBalance = function(addressOrName, blockTag) {\n return __awaiter3(this, void 0, void 0, function() {\n var params, result;\n return __generator3(this, function(_a) {\n switch (_a.label) {\n case 0:\n return [4, this.getNetwork()];\n case 1:\n _a.sent();\n return [4, (0, properties_1.resolveProperties)({\n address: this._getAddress(addressOrName),\n blockTag: this._getBlockTag(blockTag)\n })];\n case 2:\n params = _a.sent();\n return [4, this.perform(\"getBalance\", params)];\n case 3:\n result = _a.sent();\n try {\n return [2, bignumber_1.BigNumber.from(result)];\n } catch (error) {\n return [2, logger.throwError(\"bad result from backend\", logger_1.Logger.errors.SERVER_ERROR, {\n method: \"getBalance\",\n params,\n result,\n error\n })];\n }\n return [\n 2\n /*return*/\n ];\n }\n });\n });\n };\n BaseProvider2.prototype.getTransactionCount = function(addressOrName, blockTag) {\n return __awaiter3(this, void 0, void 0, function() {\n var params, result;\n return __generator3(this, function(_a) {\n switch (_a.label) {\n case 0:\n return [4, this.getNetwork()];\n case 1:\n _a.sent();\n return [4, (0, properties_1.resolveProperties)({\n address: this._getAddress(addressOrName),\n blockTag: this._getBlockTag(blockTag)\n })];\n case 2:\n params = _a.sent();\n return [4, this.perform(\"getTransactionCount\", params)];\n case 3:\n result = _a.sent();\n try {\n return [2, bignumber_1.BigNumber.from(result).toNumber()];\n } catch (error) {\n return [2, logger.throwError(\"bad result from backend\", logger_1.Logger.errors.SERVER_ERROR, {\n method: \"getTransactionCount\",\n params,\n result,\n error\n })];\n }\n return [\n 2\n /*return*/\n ];\n }\n });\n });\n };\n BaseProvider2.prototype.getCode = function(addressOrName, blockTag) {\n return __awaiter3(this, void 0, void 0, function() {\n var params, result;\n return __generator3(this, function(_a) {\n switch (_a.label) {\n case 0:\n return [4, this.getNetwork()];\n case 1:\n _a.sent();\n return [4, (0, properties_1.resolveProperties)({\n address: this._getAddress(addressOrName),\n blockTag: this._getBlockTag(blockTag)\n })];\n case 2:\n params = _a.sent();\n return [4, this.perform(\"getCode\", params)];\n case 3:\n result = _a.sent();\n try {\n return [2, (0, bytes_1.hexlify)(result)];\n } catch (error) {\n return [2, logger.throwError(\"bad result from backend\", logger_1.Logger.errors.SERVER_ERROR, {\n method: \"getCode\",\n params,\n result,\n error\n })];\n }\n return [\n 2\n /*return*/\n ];\n }\n });\n });\n };\n BaseProvider2.prototype.getStorageAt = function(addressOrName, position, blockTag) {\n return __awaiter3(this, void 0, void 0, function() {\n var params, result;\n return __generator3(this, function(_a) {\n switch (_a.label) {\n case 0:\n return [4, this.getNetwork()];\n case 1:\n _a.sent();\n return [4, (0, properties_1.resolveProperties)({\n address: this._getAddress(addressOrName),\n blockTag: this._getBlockTag(blockTag),\n position: Promise.resolve(position).then(function(p4) {\n return (0, bytes_1.hexValue)(p4);\n })\n })];\n case 2:\n params = _a.sent();\n return [4, this.perform(\"getStorageAt\", params)];\n case 3:\n result = _a.sent();\n try {\n return [2, (0, bytes_1.hexlify)(result)];\n } catch (error) {\n return [2, logger.throwError(\"bad result from backend\", logger_1.Logger.errors.SERVER_ERROR, {\n method: \"getStorageAt\",\n params,\n result,\n error\n })];\n }\n return [\n 2\n /*return*/\n ];\n }\n });\n });\n };\n BaseProvider2.prototype._wrapTransaction = function(tx, hash3, startBlock) {\n var _this = this;\n if (hash3 != null && (0, bytes_1.hexDataLength)(hash3) !== 32) {\n throw new Error(\"invalid response - sendTransaction\");\n }\n var result = tx;\n if (hash3 != null && tx.hash !== hash3) {\n logger.throwError(\"Transaction hash mismatch from Provider.sendTransaction.\", logger_1.Logger.errors.UNKNOWN_ERROR, { expectedHash: tx.hash, returnedHash: hash3 });\n }\n result.wait = function(confirms, timeout) {\n return __awaiter3(_this, void 0, void 0, function() {\n var replacement, receipt;\n return __generator3(this, function(_a) {\n switch (_a.label) {\n case 0:\n if (confirms == null) {\n confirms = 1;\n }\n if (timeout == null) {\n timeout = 0;\n }\n replacement = void 0;\n if (confirms !== 0 && startBlock != null) {\n replacement = {\n data: tx.data,\n from: tx.from,\n nonce: tx.nonce,\n to: tx.to,\n value: tx.value,\n startBlock\n };\n }\n return [4, this._waitForTransaction(tx.hash, confirms, timeout, replacement)];\n case 1:\n receipt = _a.sent();\n if (receipt == null && confirms === 0) {\n return [2, null];\n }\n this._emitted[\"t:\" + tx.hash] = receipt.blockNumber;\n if (receipt.status === 0) {\n logger.throwError(\"transaction failed\", logger_1.Logger.errors.CALL_EXCEPTION, {\n transactionHash: tx.hash,\n transaction: tx,\n receipt\n });\n }\n return [2, receipt];\n }\n });\n });\n };\n return result;\n };\n BaseProvider2.prototype.sendTransaction = function(signedTransaction) {\n return __awaiter3(this, void 0, void 0, function() {\n var hexTx, tx, blockNumber, hash3, error_7;\n return __generator3(this, function(_a) {\n switch (_a.label) {\n case 0:\n return [4, this.getNetwork()];\n case 1:\n _a.sent();\n return [4, Promise.resolve(signedTransaction).then(function(t3) {\n return (0, bytes_1.hexlify)(t3);\n })];\n case 2:\n hexTx = _a.sent();\n tx = this.formatter.transaction(signedTransaction);\n if (tx.confirmations == null) {\n tx.confirmations = 0;\n }\n return [4, this._getInternalBlockNumber(100 + 2 * this.pollingInterval)];\n case 3:\n blockNumber = _a.sent();\n _a.label = 4;\n case 4:\n _a.trys.push([4, 6, , 7]);\n return [4, this.perform(\"sendTransaction\", { signedTransaction: hexTx })];\n case 5:\n hash3 = _a.sent();\n return [2, this._wrapTransaction(tx, hash3, blockNumber)];\n case 6:\n error_7 = _a.sent();\n error_7.transaction = tx;\n error_7.transactionHash = tx.hash;\n throw error_7;\n case 7:\n return [\n 2\n /*return*/\n ];\n }\n });\n });\n };\n BaseProvider2.prototype._getTransactionRequest = function(transaction) {\n return __awaiter3(this, void 0, void 0, function() {\n var values, tx, _a, _b;\n var _this = this;\n return __generator3(this, function(_c) {\n switch (_c.label) {\n case 0:\n return [4, transaction];\n case 1:\n values = _c.sent();\n tx = {};\n [\"from\", \"to\"].forEach(function(key) {\n if (values[key] == null) {\n return;\n }\n tx[key] = Promise.resolve(values[key]).then(function(v2) {\n return v2 ? _this._getAddress(v2) : null;\n });\n });\n [\"gasLimit\", \"gasPrice\", \"maxFeePerGas\", \"maxPriorityFeePerGas\", \"value\"].forEach(function(key) {\n if (values[key] == null) {\n return;\n }\n tx[key] = Promise.resolve(values[key]).then(function(v2) {\n return v2 ? bignumber_1.BigNumber.from(v2) : null;\n });\n });\n [\"type\"].forEach(function(key) {\n if (values[key] == null) {\n return;\n }\n tx[key] = Promise.resolve(values[key]).then(function(v2) {\n return v2 != null ? v2 : null;\n });\n });\n if (values.accessList) {\n tx.accessList = this.formatter.accessList(values.accessList);\n }\n [\"data\"].forEach(function(key) {\n if (values[key] == null) {\n return;\n }\n tx[key] = Promise.resolve(values[key]).then(function(v2) {\n return v2 ? (0, bytes_1.hexlify)(v2) : null;\n });\n });\n _b = (_a = this.formatter).transactionRequest;\n return [4, (0, properties_1.resolveProperties)(tx)];\n case 2:\n return [2, _b.apply(_a, [_c.sent()])];\n }\n });\n });\n };\n BaseProvider2.prototype._getFilter = function(filter) {\n return __awaiter3(this, void 0, void 0, function() {\n var result, _a, _b;\n var _this = this;\n return __generator3(this, function(_c) {\n switch (_c.label) {\n case 0:\n return [4, filter];\n case 1:\n filter = _c.sent();\n result = {};\n if (filter.address != null) {\n result.address = this._getAddress(filter.address);\n }\n [\"blockHash\", \"topics\"].forEach(function(key) {\n if (filter[key] == null) {\n return;\n }\n result[key] = filter[key];\n });\n [\"fromBlock\", \"toBlock\"].forEach(function(key) {\n if (filter[key] == null) {\n return;\n }\n result[key] = _this._getBlockTag(filter[key]);\n });\n _b = (_a = this.formatter).filter;\n return [4, (0, properties_1.resolveProperties)(result)];\n case 2:\n return [2, _b.apply(_a, [_c.sent()])];\n }\n });\n });\n };\n BaseProvider2.prototype._call = function(transaction, blockTag, attempt) {\n return __awaiter3(this, void 0, void 0, function() {\n var txSender, result, data, sender, urls, urlsOffset, urlsLength, urlsData, u2, url, calldata, callbackSelector, extraData, ccipResult, tx, error_8;\n return __generator3(this, function(_a) {\n switch (_a.label) {\n case 0:\n if (attempt >= MAX_CCIP_REDIRECTS) {\n logger.throwError(\"CCIP read exceeded maximum redirections\", logger_1.Logger.errors.SERVER_ERROR, {\n redirects: attempt,\n transaction\n });\n }\n txSender = transaction.to;\n return [4, this.perform(\"call\", { transaction, blockTag })];\n case 1:\n result = _a.sent();\n if (!(attempt >= 0 && blockTag === \"latest\" && txSender != null && result.substring(0, 10) === \"0x556f1830\" && (0, bytes_1.hexDataLength)(result) % 32 === 4))\n return [3, 5];\n _a.label = 2;\n case 2:\n _a.trys.push([2, 4, , 5]);\n data = (0, bytes_1.hexDataSlice)(result, 4);\n sender = (0, bytes_1.hexDataSlice)(data, 0, 32);\n if (!bignumber_1.BigNumber.from(sender).eq(txSender)) {\n logger.throwError(\"CCIP Read sender did not match\", logger_1.Logger.errors.CALL_EXCEPTION, {\n name: \"OffchainLookup\",\n signature: \"OffchainLookup(address,string[],bytes,bytes4,bytes)\",\n transaction,\n data: result\n });\n }\n urls = [];\n urlsOffset = bignumber_1.BigNumber.from((0, bytes_1.hexDataSlice)(data, 32, 64)).toNumber();\n urlsLength = bignumber_1.BigNumber.from((0, bytes_1.hexDataSlice)(data, urlsOffset, urlsOffset + 32)).toNumber();\n urlsData = (0, bytes_1.hexDataSlice)(data, urlsOffset + 32);\n for (u2 = 0; u2 < urlsLength; u2++) {\n url = _parseString(urlsData, u2 * 32);\n if (url == null) {\n logger.throwError(\"CCIP Read contained corrupt URL string\", logger_1.Logger.errors.CALL_EXCEPTION, {\n name: \"OffchainLookup\",\n signature: \"OffchainLookup(address,string[],bytes,bytes4,bytes)\",\n transaction,\n data: result\n });\n }\n urls.push(url);\n }\n calldata = _parseBytes(data, 64);\n if (!bignumber_1.BigNumber.from((0, bytes_1.hexDataSlice)(data, 100, 128)).isZero()) {\n logger.throwError(\"CCIP Read callback selector included junk\", logger_1.Logger.errors.CALL_EXCEPTION, {\n name: \"OffchainLookup\",\n signature: \"OffchainLookup(address,string[],bytes,bytes4,bytes)\",\n transaction,\n data: result\n });\n }\n callbackSelector = (0, bytes_1.hexDataSlice)(data, 96, 100);\n extraData = _parseBytes(data, 128);\n return [4, this.ccipReadFetch(transaction, calldata, urls)];\n case 3:\n ccipResult = _a.sent();\n if (ccipResult == null) {\n logger.throwError(\"CCIP Read disabled or provided no URLs\", logger_1.Logger.errors.CALL_EXCEPTION, {\n name: \"OffchainLookup\",\n signature: \"OffchainLookup(address,string[],bytes,bytes4,bytes)\",\n transaction,\n data: result\n });\n }\n tx = {\n to: txSender,\n data: (0, bytes_1.hexConcat)([callbackSelector, encodeBytes3([ccipResult, extraData])])\n };\n return [2, this._call(tx, blockTag, attempt + 1)];\n case 4:\n error_8 = _a.sent();\n if (error_8.code === logger_1.Logger.errors.SERVER_ERROR) {\n throw error_8;\n }\n return [3, 5];\n case 5:\n try {\n return [2, (0, bytes_1.hexlify)(result)];\n } catch (error) {\n return [2, logger.throwError(\"bad result from backend\", logger_1.Logger.errors.SERVER_ERROR, {\n method: \"call\",\n params: { transaction, blockTag },\n result,\n error\n })];\n }\n return [\n 2\n /*return*/\n ];\n }\n });\n });\n };\n BaseProvider2.prototype.call = function(transaction, blockTag) {\n return __awaiter3(this, void 0, void 0, function() {\n var resolved;\n return __generator3(this, function(_a) {\n switch (_a.label) {\n case 0:\n return [4, this.getNetwork()];\n case 1:\n _a.sent();\n return [4, (0, properties_1.resolveProperties)({\n transaction: this._getTransactionRequest(transaction),\n blockTag: this._getBlockTag(blockTag),\n ccipReadEnabled: Promise.resolve(transaction.ccipReadEnabled)\n })];\n case 2:\n resolved = _a.sent();\n return [2, this._call(resolved.transaction, resolved.blockTag, resolved.ccipReadEnabled ? 0 : -1)];\n }\n });\n });\n };\n BaseProvider2.prototype.estimateGas = function(transaction) {\n return __awaiter3(this, void 0, void 0, function() {\n var params, result;\n return __generator3(this, function(_a) {\n switch (_a.label) {\n case 0:\n return [4, this.getNetwork()];\n case 1:\n _a.sent();\n return [4, (0, properties_1.resolveProperties)({\n transaction: this._getTransactionRequest(transaction)\n })];\n case 2:\n params = _a.sent();\n return [4, this.perform(\"estimateGas\", params)];\n case 3:\n result = _a.sent();\n try {\n return [2, bignumber_1.BigNumber.from(result)];\n } catch (error) {\n return [2, logger.throwError(\"bad result from backend\", logger_1.Logger.errors.SERVER_ERROR, {\n method: \"estimateGas\",\n params,\n result,\n error\n })];\n }\n return [\n 2\n /*return*/\n ];\n }\n });\n });\n };\n BaseProvider2.prototype._getAddress = function(addressOrName) {\n return __awaiter3(this, void 0, void 0, function() {\n var address;\n return __generator3(this, function(_a) {\n switch (_a.label) {\n case 0:\n return [4, addressOrName];\n case 1:\n addressOrName = _a.sent();\n if (typeof addressOrName !== \"string\") {\n logger.throwArgumentError(\"invalid address or ENS name\", \"name\", addressOrName);\n }\n return [4, this.resolveName(addressOrName)];\n case 2:\n address = _a.sent();\n if (address == null) {\n logger.throwError(\"ENS name not configured\", logger_1.Logger.errors.UNSUPPORTED_OPERATION, {\n operation: \"resolveName(\" + JSON.stringify(addressOrName) + \")\"\n });\n }\n return [2, address];\n }\n });\n });\n };\n BaseProvider2.prototype._getBlock = function(blockHashOrBlockTag, includeTransactions) {\n return __awaiter3(this, void 0, void 0, function() {\n var blockNumber, params, _a, error_9;\n var _this = this;\n return __generator3(this, function(_b) {\n switch (_b.label) {\n case 0:\n return [4, this.getNetwork()];\n case 1:\n _b.sent();\n return [4, blockHashOrBlockTag];\n case 2:\n blockHashOrBlockTag = _b.sent();\n blockNumber = -128;\n params = {\n includeTransactions: !!includeTransactions\n };\n if (!(0, bytes_1.isHexString)(blockHashOrBlockTag, 32))\n return [3, 3];\n params.blockHash = blockHashOrBlockTag;\n return [3, 6];\n case 3:\n _b.trys.push([3, 5, , 6]);\n _a = params;\n return [4, this._getBlockTag(blockHashOrBlockTag)];\n case 4:\n _a.blockTag = _b.sent();\n if ((0, bytes_1.isHexString)(params.blockTag)) {\n blockNumber = parseInt(params.blockTag.substring(2), 16);\n }\n return [3, 6];\n case 5:\n error_9 = _b.sent();\n logger.throwArgumentError(\"invalid block hash or block tag\", \"blockHashOrBlockTag\", blockHashOrBlockTag);\n return [3, 6];\n case 6:\n return [2, (0, web_1.poll)(function() {\n return __awaiter3(_this, void 0, void 0, function() {\n var block, blockNumber_1, i3, tx, confirmations, blockWithTxs;\n var _this2 = this;\n return __generator3(this, function(_a2) {\n switch (_a2.label) {\n case 0:\n return [4, this.perform(\"getBlock\", params)];\n case 1:\n block = _a2.sent();\n if (block == null) {\n if (params.blockHash != null) {\n if (this._emitted[\"b:\" + params.blockHash] == null) {\n return [2, null];\n }\n }\n if (params.blockTag != null) {\n if (blockNumber > this._emitted.block) {\n return [2, null];\n }\n }\n return [2, void 0];\n }\n if (!includeTransactions)\n return [3, 8];\n blockNumber_1 = null;\n i3 = 0;\n _a2.label = 2;\n case 2:\n if (!(i3 < block.transactions.length))\n return [3, 7];\n tx = block.transactions[i3];\n if (!(tx.blockNumber == null))\n return [3, 3];\n tx.confirmations = 0;\n return [3, 6];\n case 3:\n if (!(tx.confirmations == null))\n return [3, 6];\n if (!(blockNumber_1 == null))\n return [3, 5];\n return [4, this._getInternalBlockNumber(100 + 2 * this.pollingInterval)];\n case 4:\n blockNumber_1 = _a2.sent();\n _a2.label = 5;\n case 5:\n confirmations = blockNumber_1 - tx.blockNumber + 1;\n if (confirmations <= 0) {\n confirmations = 1;\n }\n tx.confirmations = confirmations;\n _a2.label = 6;\n case 6:\n i3++;\n return [3, 2];\n case 7:\n blockWithTxs = this.formatter.blockWithTransactions(block);\n blockWithTxs.transactions = blockWithTxs.transactions.map(function(tx2) {\n return _this2._wrapTransaction(tx2);\n });\n return [2, blockWithTxs];\n case 8:\n return [2, this.formatter.block(block)];\n }\n });\n });\n }, { oncePoll: this })];\n }\n });\n });\n };\n BaseProvider2.prototype.getBlock = function(blockHashOrBlockTag) {\n return this._getBlock(blockHashOrBlockTag, false);\n };\n BaseProvider2.prototype.getBlockWithTransactions = function(blockHashOrBlockTag) {\n return this._getBlock(blockHashOrBlockTag, true);\n };\n BaseProvider2.prototype.getTransaction = function(transactionHash) {\n return __awaiter3(this, void 0, void 0, function() {\n var params;\n var _this = this;\n return __generator3(this, function(_a) {\n switch (_a.label) {\n case 0:\n return [4, this.getNetwork()];\n case 1:\n _a.sent();\n return [4, transactionHash];\n case 2:\n transactionHash = _a.sent();\n params = { transactionHash: this.formatter.hash(transactionHash, true) };\n return [2, (0, web_1.poll)(function() {\n return __awaiter3(_this, void 0, void 0, function() {\n var result, tx, blockNumber, confirmations;\n return __generator3(this, function(_a2) {\n switch (_a2.label) {\n case 0:\n return [4, this.perform(\"getTransaction\", params)];\n case 1:\n result = _a2.sent();\n if (result == null) {\n if (this._emitted[\"t:\" + transactionHash] == null) {\n return [2, null];\n }\n return [2, void 0];\n }\n tx = this.formatter.transactionResponse(result);\n if (!(tx.blockNumber == null))\n return [3, 2];\n tx.confirmations = 0;\n return [3, 4];\n case 2:\n if (!(tx.confirmations == null))\n return [3, 4];\n return [4, this._getInternalBlockNumber(100 + 2 * this.pollingInterval)];\n case 3:\n blockNumber = _a2.sent();\n confirmations = blockNumber - tx.blockNumber + 1;\n if (confirmations <= 0) {\n confirmations = 1;\n }\n tx.confirmations = confirmations;\n _a2.label = 4;\n case 4:\n return [2, this._wrapTransaction(tx)];\n }\n });\n });\n }, { oncePoll: this })];\n }\n });\n });\n };\n BaseProvider2.prototype.getTransactionReceipt = function(transactionHash) {\n return __awaiter3(this, void 0, void 0, function() {\n var params;\n var _this = this;\n return __generator3(this, function(_a) {\n switch (_a.label) {\n case 0:\n return [4, this.getNetwork()];\n case 1:\n _a.sent();\n return [4, transactionHash];\n case 2:\n transactionHash = _a.sent();\n params = { transactionHash: this.formatter.hash(transactionHash, true) };\n return [2, (0, web_1.poll)(function() {\n return __awaiter3(_this, void 0, void 0, function() {\n var result, receipt, blockNumber, confirmations;\n return __generator3(this, function(_a2) {\n switch (_a2.label) {\n case 0:\n return [4, this.perform(\"getTransactionReceipt\", params)];\n case 1:\n result = _a2.sent();\n if (result == null) {\n if (this._emitted[\"t:\" + transactionHash] == null) {\n return [2, null];\n }\n return [2, void 0];\n }\n if (result.blockHash == null) {\n return [2, void 0];\n }\n receipt = this.formatter.receipt(result);\n if (!(receipt.blockNumber == null))\n return [3, 2];\n receipt.confirmations = 0;\n return [3, 4];\n case 2:\n if (!(receipt.confirmations == null))\n return [3, 4];\n return [4, this._getInternalBlockNumber(100 + 2 * this.pollingInterval)];\n case 3:\n blockNumber = _a2.sent();\n confirmations = blockNumber - receipt.blockNumber + 1;\n if (confirmations <= 0) {\n confirmations = 1;\n }\n receipt.confirmations = confirmations;\n _a2.label = 4;\n case 4:\n return [2, receipt];\n }\n });\n });\n }, { oncePoll: this })];\n }\n });\n });\n };\n BaseProvider2.prototype.getLogs = function(filter) {\n return __awaiter3(this, void 0, void 0, function() {\n var params, logs;\n return __generator3(this, function(_a) {\n switch (_a.label) {\n case 0:\n return [4, this.getNetwork()];\n case 1:\n _a.sent();\n return [4, (0, properties_1.resolveProperties)({ filter: this._getFilter(filter) })];\n case 2:\n params = _a.sent();\n return [4, this.perform(\"getLogs\", params)];\n case 3:\n logs = _a.sent();\n logs.forEach(function(log) {\n if (log.removed == null) {\n log.removed = false;\n }\n });\n return [2, formatter_1.Formatter.arrayOf(this.formatter.filterLog.bind(this.formatter))(logs)];\n }\n });\n });\n };\n BaseProvider2.prototype.getEtherPrice = function() {\n return __awaiter3(this, void 0, void 0, function() {\n return __generator3(this, function(_a) {\n switch (_a.label) {\n case 0:\n return [4, this.getNetwork()];\n case 1:\n _a.sent();\n return [2, this.perform(\"getEtherPrice\", {})];\n }\n });\n });\n };\n BaseProvider2.prototype._getBlockTag = function(blockTag) {\n return __awaiter3(this, void 0, void 0, function() {\n var blockNumber;\n return __generator3(this, function(_a) {\n switch (_a.label) {\n case 0:\n return [4, blockTag];\n case 1:\n blockTag = _a.sent();\n if (!(typeof blockTag === \"number\" && blockTag < 0))\n return [3, 3];\n if (blockTag % 1) {\n logger.throwArgumentError(\"invalid BlockTag\", \"blockTag\", blockTag);\n }\n return [4, this._getInternalBlockNumber(100 + 2 * this.pollingInterval)];\n case 2:\n blockNumber = _a.sent();\n blockNumber += blockTag;\n if (blockNumber < 0) {\n blockNumber = 0;\n }\n return [2, this.formatter.blockTag(blockNumber)];\n case 3:\n return [2, this.formatter.blockTag(blockTag)];\n }\n });\n });\n };\n BaseProvider2.prototype.getResolver = function(name) {\n return __awaiter3(this, void 0, void 0, function() {\n var currentName, addr, resolver, _a;\n return __generator3(this, function(_b) {\n switch (_b.label) {\n case 0:\n currentName = name;\n _b.label = 1;\n case 1:\n if (false)\n return [3, 6];\n if (currentName === \"\" || currentName === \".\") {\n return [2, null];\n }\n if (name !== \"eth\" && currentName === \"eth\") {\n return [2, null];\n }\n return [4, this._getResolver(currentName, \"getResolver\")];\n case 2:\n addr = _b.sent();\n if (!(addr != null))\n return [3, 5];\n resolver = new Resolver(this, addr, name);\n _a = currentName !== name;\n if (!_a)\n return [3, 4];\n return [4, resolver.supportsWildcard()];\n case 3:\n _a = !_b.sent();\n _b.label = 4;\n case 4:\n if (_a) {\n return [2, null];\n }\n return [2, resolver];\n case 5:\n currentName = currentName.split(\".\").slice(1).join(\".\");\n return [3, 1];\n case 6:\n return [\n 2\n /*return*/\n ];\n }\n });\n });\n };\n BaseProvider2.prototype._getResolver = function(name, operation) {\n return __awaiter3(this, void 0, void 0, function() {\n var network, addrData, error_10;\n return __generator3(this, function(_a) {\n switch (_a.label) {\n case 0:\n if (operation == null) {\n operation = \"ENS\";\n }\n return [4, this.getNetwork()];\n case 1:\n network = _a.sent();\n if (!network.ensAddress) {\n logger.throwError(\"network does not support ENS\", logger_1.Logger.errors.UNSUPPORTED_OPERATION, { operation, network: network.name });\n }\n _a.label = 2;\n case 2:\n _a.trys.push([2, 4, , 5]);\n return [4, this.call({\n to: network.ensAddress,\n data: \"0x0178b8bf\" + (0, hash_1.namehash)(name).substring(2)\n })];\n case 3:\n addrData = _a.sent();\n return [2, this.formatter.callAddress(addrData)];\n case 4:\n error_10 = _a.sent();\n return [3, 5];\n case 5:\n return [2, null];\n }\n });\n });\n };\n BaseProvider2.prototype.resolveName = function(name) {\n return __awaiter3(this, void 0, void 0, function() {\n var resolver;\n return __generator3(this, function(_a) {\n switch (_a.label) {\n case 0:\n return [4, name];\n case 1:\n name = _a.sent();\n try {\n return [2, Promise.resolve(this.formatter.address(name))];\n } catch (error) {\n if ((0, bytes_1.isHexString)(name)) {\n throw error;\n }\n }\n if (typeof name !== \"string\") {\n logger.throwArgumentError(\"invalid ENS name\", \"name\", name);\n }\n return [4, this.getResolver(name)];\n case 2:\n resolver = _a.sent();\n if (!resolver) {\n return [2, null];\n }\n return [4, resolver.getAddress()];\n case 3:\n return [2, _a.sent()];\n }\n });\n });\n };\n BaseProvider2.prototype.lookupAddress = function(address) {\n return __awaiter3(this, void 0, void 0, function() {\n var node, resolverAddr, name, _a, addr;\n return __generator3(this, function(_b) {\n switch (_b.label) {\n case 0:\n return [4, address];\n case 1:\n address = _b.sent();\n address = this.formatter.address(address);\n node = address.substring(2).toLowerCase() + \".addr.reverse\";\n return [4, this._getResolver(node, \"lookupAddress\")];\n case 2:\n resolverAddr = _b.sent();\n if (resolverAddr == null) {\n return [2, null];\n }\n _a = _parseString;\n return [4, this.call({\n to: resolverAddr,\n data: \"0x691f3431\" + (0, hash_1.namehash)(node).substring(2)\n })];\n case 3:\n name = _a.apply(void 0, [_b.sent(), 0]);\n return [4, this.resolveName(name)];\n case 4:\n addr = _b.sent();\n if (addr != address) {\n return [2, null];\n }\n return [2, name];\n }\n });\n });\n };\n BaseProvider2.prototype.getAvatar = function(nameOrAddress) {\n return __awaiter3(this, void 0, void 0, function() {\n var resolver, address, node, resolverAddress, avatar_1, error_11, name_1, _a, error_12, avatar;\n return __generator3(this, function(_b) {\n switch (_b.label) {\n case 0:\n resolver = null;\n if (!(0, bytes_1.isHexString)(nameOrAddress))\n return [3, 10];\n address = this.formatter.address(nameOrAddress);\n node = address.substring(2).toLowerCase() + \".addr.reverse\";\n return [4, this._getResolver(node, \"getAvatar\")];\n case 1:\n resolverAddress = _b.sent();\n if (!resolverAddress) {\n return [2, null];\n }\n resolver = new Resolver(this, resolverAddress, node);\n _b.label = 2;\n case 2:\n _b.trys.push([2, 4, , 5]);\n return [4, resolver.getAvatar()];\n case 3:\n avatar_1 = _b.sent();\n if (avatar_1) {\n return [2, avatar_1.url];\n }\n return [3, 5];\n case 4:\n error_11 = _b.sent();\n if (error_11.code !== logger_1.Logger.errors.CALL_EXCEPTION) {\n throw error_11;\n }\n return [3, 5];\n case 5:\n _b.trys.push([5, 8, , 9]);\n _a = _parseString;\n return [4, this.call({\n to: resolverAddress,\n data: \"0x691f3431\" + (0, hash_1.namehash)(node).substring(2)\n })];\n case 6:\n name_1 = _a.apply(void 0, [_b.sent(), 0]);\n return [4, this.getResolver(name_1)];\n case 7:\n resolver = _b.sent();\n return [3, 9];\n case 8:\n error_12 = _b.sent();\n if (error_12.code !== logger_1.Logger.errors.CALL_EXCEPTION) {\n throw error_12;\n }\n return [2, null];\n case 9:\n return [3, 12];\n case 10:\n return [4, this.getResolver(nameOrAddress)];\n case 11:\n resolver = _b.sent();\n if (!resolver) {\n return [2, null];\n }\n _b.label = 12;\n case 12:\n return [4, resolver.getAvatar()];\n case 13:\n avatar = _b.sent();\n if (avatar == null) {\n return [2, null];\n }\n return [2, avatar.url];\n }\n });\n });\n };\n BaseProvider2.prototype.perform = function(method, params) {\n return logger.throwError(method + \" not implemented\", logger_1.Logger.errors.NOT_IMPLEMENTED, { operation: method });\n };\n BaseProvider2.prototype._startEvent = function(event) {\n this.polling = this._events.filter(function(e3) {\n return e3.pollable();\n }).length > 0;\n };\n BaseProvider2.prototype._stopEvent = function(event) {\n this.polling = this._events.filter(function(e3) {\n return e3.pollable();\n }).length > 0;\n };\n BaseProvider2.prototype._addEventListener = function(eventName, listener, once2) {\n var event = new Event2(getEventTag(eventName), listener, once2);\n this._events.push(event);\n this._startEvent(event);\n return this;\n };\n BaseProvider2.prototype.on = function(eventName, listener) {\n return this._addEventListener(eventName, listener, false);\n };\n BaseProvider2.prototype.once = function(eventName, listener) {\n return this._addEventListener(eventName, listener, true);\n };\n BaseProvider2.prototype.emit = function(eventName) {\n var _this = this;\n var args = [];\n for (var _i = 1; _i < arguments.length; _i++) {\n args[_i - 1] = arguments[_i];\n }\n var result = false;\n var stopped = [];\n var eventTag = getEventTag(eventName);\n this._events = this._events.filter(function(event) {\n if (event.tag !== eventTag) {\n return true;\n }\n setTimeout(function() {\n event.listener.apply(_this, args);\n }, 0);\n result = true;\n if (event.once) {\n stopped.push(event);\n return false;\n }\n return true;\n });\n stopped.forEach(function(event) {\n _this._stopEvent(event);\n });\n return result;\n };\n BaseProvider2.prototype.listenerCount = function(eventName) {\n if (!eventName) {\n return this._events.length;\n }\n var eventTag = getEventTag(eventName);\n return this._events.filter(function(event) {\n return event.tag === eventTag;\n }).length;\n };\n BaseProvider2.prototype.listeners = function(eventName) {\n if (eventName == null) {\n return this._events.map(function(event) {\n return event.listener;\n });\n }\n var eventTag = getEventTag(eventName);\n return this._events.filter(function(event) {\n return event.tag === eventTag;\n }).map(function(event) {\n return event.listener;\n });\n };\n BaseProvider2.prototype.off = function(eventName, listener) {\n var _this = this;\n if (listener == null) {\n return this.removeAllListeners(eventName);\n }\n var stopped = [];\n var found = false;\n var eventTag = getEventTag(eventName);\n this._events = this._events.filter(function(event) {\n if (event.tag !== eventTag || event.listener != listener) {\n return true;\n }\n if (found) {\n return true;\n }\n found = true;\n stopped.push(event);\n return false;\n });\n stopped.forEach(function(event) {\n _this._stopEvent(event);\n });\n return this;\n };\n BaseProvider2.prototype.removeAllListeners = function(eventName) {\n var _this = this;\n var stopped = [];\n if (eventName == null) {\n stopped = this._events;\n this._events = [];\n } else {\n var eventTag_1 = getEventTag(eventName);\n this._events = this._events.filter(function(event) {\n if (event.tag !== eventTag_1) {\n return true;\n }\n stopped.push(event);\n return false;\n });\n }\n stopped.forEach(function(event) {\n _this._stopEvent(event);\n });\n return this;\n };\n return BaseProvider2;\n }(abstract_provider_1.Provider)\n );\n exports3.BaseProvider = BaseProvider;\n }\n });\n\n // ../../../node_modules/.pnpm/@ethersproject+providers@5.8.0_bufferutil@4.0.9_utf-8-validate@5.0.10/node_modules/@ethersproject/providers/lib/json-rpc-provider.js\n var require_json_rpc_provider = __commonJS({\n \"../../../node_modules/.pnpm/@ethersproject+providers@5.8.0_bufferutil@4.0.9_utf-8-validate@5.0.10/node_modules/@ethersproject/providers/lib/json-rpc-provider.js\"(exports3) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n var __extends3 = exports3 && exports3.__extends || /* @__PURE__ */ function() {\n var extendStatics3 = function(d5, b4) {\n extendStatics3 = Object.setPrototypeOf || { __proto__: [] } instanceof Array && function(d6, b5) {\n d6.__proto__ = b5;\n } || function(d6, b5) {\n for (var p4 in b5)\n if (Object.prototype.hasOwnProperty.call(b5, p4))\n d6[p4] = b5[p4];\n };\n return extendStatics3(d5, b4);\n };\n return function(d5, b4) {\n if (typeof b4 !== \"function\" && b4 !== null)\n throw new TypeError(\"Class extends value \" + String(b4) + \" is not a constructor or null\");\n extendStatics3(d5, b4);\n function __() {\n this.constructor = d5;\n }\n d5.prototype = b4 === null ? Object.create(b4) : (__.prototype = b4.prototype, new __());\n };\n }();\n var __awaiter3 = exports3 && exports3.__awaiter || function(thisArg, _arguments, P2, generator) {\n function adopt(value) {\n return value instanceof P2 ? value : new P2(function(resolve) {\n resolve(value);\n });\n }\n return new (P2 || (P2 = Promise))(function(resolve, reject) {\n function fulfilled(value) {\n try {\n step(generator.next(value));\n } catch (e3) {\n reject(e3);\n }\n }\n function rejected(value) {\n try {\n step(generator[\"throw\"](value));\n } catch (e3) {\n reject(e3);\n }\n }\n function step(result) {\n result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected);\n }\n step((generator = generator.apply(thisArg, _arguments || [])).next());\n });\n };\n var __generator3 = exports3 && exports3.__generator || function(thisArg, body) {\n var _2 = { label: 0, sent: function() {\n if (t3[0] & 1)\n throw t3[1];\n return t3[1];\n }, trys: [], ops: [] }, f6, y6, t3, g4;\n return g4 = { next: verb(0), \"throw\": verb(1), \"return\": verb(2) }, typeof Symbol === \"function\" && (g4[Symbol.iterator] = function() {\n return this;\n }), g4;\n function verb(n2) {\n return function(v2) {\n return step([n2, v2]);\n };\n }\n function step(op) {\n if (f6)\n throw new TypeError(\"Generator is already executing.\");\n while (_2)\n try {\n if (f6 = 1, y6 && (t3 = op[0] & 2 ? y6[\"return\"] : op[0] ? y6[\"throw\"] || ((t3 = y6[\"return\"]) && t3.call(y6), 0) : y6.next) && !(t3 = t3.call(y6, op[1])).done)\n return t3;\n if (y6 = 0, t3)\n op = [op[0] & 2, t3.value];\n switch (op[0]) {\n case 0:\n case 1:\n t3 = op;\n break;\n case 4:\n _2.label++;\n return { value: op[1], done: false };\n case 5:\n _2.label++;\n y6 = op[1];\n op = [0];\n continue;\n case 7:\n op = _2.ops.pop();\n _2.trys.pop();\n continue;\n default:\n if (!(t3 = _2.trys, t3 = t3.length > 0 && t3[t3.length - 1]) && (op[0] === 6 || op[0] === 2)) {\n _2 = 0;\n continue;\n }\n if (op[0] === 3 && (!t3 || op[1] > t3[0] && op[1] < t3[3])) {\n _2.label = op[1];\n break;\n }\n if (op[0] === 6 && _2.label < t3[1]) {\n _2.label = t3[1];\n t3 = op;\n break;\n }\n if (t3 && _2.label < t3[2]) {\n _2.label = t3[2];\n _2.ops.push(op);\n break;\n }\n if (t3[2])\n _2.ops.pop();\n _2.trys.pop();\n continue;\n }\n op = body.call(thisArg, _2);\n } catch (e3) {\n op = [6, e3];\n y6 = 0;\n } finally {\n f6 = t3 = 0;\n }\n if (op[0] & 5)\n throw op[1];\n return { value: op[0] ? op[1] : void 0, done: true };\n }\n };\n Object.defineProperty(exports3, \"__esModule\", { value: true });\n exports3.JsonRpcProvider = exports3.JsonRpcSigner = void 0;\n var abstract_signer_1 = require_lib15();\n var bignumber_1 = require_lib3();\n var bytes_1 = require_lib2();\n var hash_1 = require_lib12();\n var properties_1 = require_lib4();\n var strings_1 = require_lib9();\n var transactions_1 = require_lib17();\n var web_1 = require_lib28();\n var logger_1 = require_lib();\n var _version_1 = require_version23();\n var logger = new logger_1.Logger(_version_1.version);\n var base_provider_1 = require_base_provider();\n var errorGas = [\"call\", \"estimateGas\"];\n function spelunk(value, requireData) {\n if (value == null) {\n return null;\n }\n if (typeof value.message === \"string\" && value.message.match(\"reverted\")) {\n var data = (0, bytes_1.isHexString)(value.data) ? value.data : null;\n if (!requireData || data) {\n return { message: value.message, data };\n }\n }\n if (typeof value === \"object\") {\n for (var key in value) {\n var result = spelunk(value[key], requireData);\n if (result) {\n return result;\n }\n }\n return null;\n }\n if (typeof value === \"string\") {\n try {\n return spelunk(JSON.parse(value), requireData);\n } catch (error) {\n }\n }\n return null;\n }\n function checkError(method, error, params) {\n var transaction = params.transaction || params.signedTransaction;\n if (method === \"call\") {\n var result = spelunk(error, true);\n if (result) {\n return result.data;\n }\n logger.throwError(\"missing revert data in call exception; Transaction reverted without a reason string\", logger_1.Logger.errors.CALL_EXCEPTION, {\n data: \"0x\",\n transaction,\n error\n });\n }\n if (method === \"estimateGas\") {\n var result = spelunk(error.body, false);\n if (result == null) {\n result = spelunk(error, false);\n }\n if (result) {\n logger.throwError(\"cannot estimate gas; transaction may fail or may require manual gas limit\", logger_1.Logger.errors.UNPREDICTABLE_GAS_LIMIT, {\n reason: result.message,\n method,\n transaction,\n error\n });\n }\n }\n var message = error.message;\n if (error.code === logger_1.Logger.errors.SERVER_ERROR && error.error && typeof error.error.message === \"string\") {\n message = error.error.message;\n } else if (typeof error.body === \"string\") {\n message = error.body;\n } else if (typeof error.responseText === \"string\") {\n message = error.responseText;\n }\n message = (message || \"\").toLowerCase();\n if (message.match(/insufficient funds|base fee exceeds gas limit|InsufficientFunds/i)) {\n logger.throwError(\"insufficient funds for intrinsic transaction cost\", logger_1.Logger.errors.INSUFFICIENT_FUNDS, {\n error,\n method,\n transaction\n });\n }\n if (message.match(/nonce (is )?too low/i)) {\n logger.throwError(\"nonce has already been used\", logger_1.Logger.errors.NONCE_EXPIRED, {\n error,\n method,\n transaction\n });\n }\n if (message.match(/replacement transaction underpriced|transaction gas price.*too low/i)) {\n logger.throwError(\"replacement fee too low\", logger_1.Logger.errors.REPLACEMENT_UNDERPRICED, {\n error,\n method,\n transaction\n });\n }\n if (message.match(/only replay-protected/i)) {\n logger.throwError(\"legacy pre-eip-155 transactions not supported\", logger_1.Logger.errors.UNSUPPORTED_OPERATION, {\n error,\n method,\n transaction\n });\n }\n if (errorGas.indexOf(method) >= 0 && message.match(/gas required exceeds allowance|always failing transaction|execution reverted|revert/)) {\n logger.throwError(\"cannot estimate gas; transaction may fail or may require manual gas limit\", logger_1.Logger.errors.UNPREDICTABLE_GAS_LIMIT, {\n error,\n method,\n transaction\n });\n }\n throw error;\n }\n function timer(timeout) {\n return new Promise(function(resolve) {\n setTimeout(resolve, timeout);\n });\n }\n function getResult(payload) {\n if (payload.error) {\n var error = new Error(payload.error.message);\n error.code = payload.error.code;\n error.data = payload.error.data;\n throw error;\n }\n return payload.result;\n }\n function getLowerCase(value) {\n if (value) {\n return value.toLowerCase();\n }\n return value;\n }\n var _constructorGuard = {};\n var JsonRpcSigner = (\n /** @class */\n function(_super) {\n __extends3(JsonRpcSigner2, _super);\n function JsonRpcSigner2(constructorGuard, provider, addressOrIndex) {\n var _this = _super.call(this) || this;\n if (constructorGuard !== _constructorGuard) {\n throw new Error(\"do not call the JsonRpcSigner constructor directly; use provider.getSigner\");\n }\n (0, properties_1.defineReadOnly)(_this, \"provider\", provider);\n if (addressOrIndex == null) {\n addressOrIndex = 0;\n }\n if (typeof addressOrIndex === \"string\") {\n (0, properties_1.defineReadOnly)(_this, \"_address\", _this.provider.formatter.address(addressOrIndex));\n (0, properties_1.defineReadOnly)(_this, \"_index\", null);\n } else if (typeof addressOrIndex === \"number\") {\n (0, properties_1.defineReadOnly)(_this, \"_index\", addressOrIndex);\n (0, properties_1.defineReadOnly)(_this, \"_address\", null);\n } else {\n logger.throwArgumentError(\"invalid address or index\", \"addressOrIndex\", addressOrIndex);\n }\n return _this;\n }\n JsonRpcSigner2.prototype.connect = function(provider) {\n return logger.throwError(\"cannot alter JSON-RPC Signer connection\", logger_1.Logger.errors.UNSUPPORTED_OPERATION, {\n operation: \"connect\"\n });\n };\n JsonRpcSigner2.prototype.connectUnchecked = function() {\n return new UncheckedJsonRpcSigner(_constructorGuard, this.provider, this._address || this._index);\n };\n JsonRpcSigner2.prototype.getAddress = function() {\n var _this = this;\n if (this._address) {\n return Promise.resolve(this._address);\n }\n return this.provider.send(\"eth_accounts\", []).then(function(accounts) {\n if (accounts.length <= _this._index) {\n logger.throwError(\"unknown account #\" + _this._index, logger_1.Logger.errors.UNSUPPORTED_OPERATION, {\n operation: \"getAddress\"\n });\n }\n return _this.provider.formatter.address(accounts[_this._index]);\n });\n };\n JsonRpcSigner2.prototype.sendUncheckedTransaction = function(transaction) {\n var _this = this;\n transaction = (0, properties_1.shallowCopy)(transaction);\n var fromAddress = this.getAddress().then(function(address) {\n if (address) {\n address = address.toLowerCase();\n }\n return address;\n });\n if (transaction.gasLimit == null) {\n var estimate = (0, properties_1.shallowCopy)(transaction);\n estimate.from = fromAddress;\n transaction.gasLimit = this.provider.estimateGas(estimate);\n }\n if (transaction.to != null) {\n transaction.to = Promise.resolve(transaction.to).then(function(to) {\n return __awaiter3(_this, void 0, void 0, function() {\n var address;\n return __generator3(this, function(_a) {\n switch (_a.label) {\n case 0:\n if (to == null) {\n return [2, null];\n }\n return [4, this.provider.resolveName(to)];\n case 1:\n address = _a.sent();\n if (address == null) {\n logger.throwArgumentError(\"provided ENS name resolves to null\", \"tx.to\", to);\n }\n return [2, address];\n }\n });\n });\n });\n }\n return (0, properties_1.resolveProperties)({\n tx: (0, properties_1.resolveProperties)(transaction),\n sender: fromAddress\n }).then(function(_a) {\n var tx = _a.tx, sender = _a.sender;\n if (tx.from != null) {\n if (tx.from.toLowerCase() !== sender) {\n logger.throwArgumentError(\"from address mismatch\", \"transaction\", transaction);\n }\n } else {\n tx.from = sender;\n }\n var hexTx = _this.provider.constructor.hexlifyTransaction(tx, { from: true });\n return _this.provider.send(\"eth_sendTransaction\", [hexTx]).then(function(hash3) {\n return hash3;\n }, function(error) {\n if (typeof error.message === \"string\" && error.message.match(/user denied/i)) {\n logger.throwError(\"user rejected transaction\", logger_1.Logger.errors.ACTION_REJECTED, {\n action: \"sendTransaction\",\n transaction: tx\n });\n }\n return checkError(\"sendTransaction\", error, hexTx);\n });\n });\n };\n JsonRpcSigner2.prototype.signTransaction = function(transaction) {\n return logger.throwError(\"signing transactions is unsupported\", logger_1.Logger.errors.UNSUPPORTED_OPERATION, {\n operation: \"signTransaction\"\n });\n };\n JsonRpcSigner2.prototype.sendTransaction = function(transaction) {\n return __awaiter3(this, void 0, void 0, function() {\n var blockNumber, hash3, error_1;\n var _this = this;\n return __generator3(this, function(_a) {\n switch (_a.label) {\n case 0:\n return [4, this.provider._getInternalBlockNumber(100 + 2 * this.provider.pollingInterval)];\n case 1:\n blockNumber = _a.sent();\n return [4, this.sendUncheckedTransaction(transaction)];\n case 2:\n hash3 = _a.sent();\n _a.label = 3;\n case 3:\n _a.trys.push([3, 5, , 6]);\n return [4, (0, web_1.poll)(function() {\n return __awaiter3(_this, void 0, void 0, function() {\n var tx;\n return __generator3(this, function(_a2) {\n switch (_a2.label) {\n case 0:\n return [4, this.provider.getTransaction(hash3)];\n case 1:\n tx = _a2.sent();\n if (tx === null) {\n return [2, void 0];\n }\n return [2, this.provider._wrapTransaction(tx, hash3, blockNumber)];\n }\n });\n });\n }, { oncePoll: this.provider })];\n case 4:\n return [2, _a.sent()];\n case 5:\n error_1 = _a.sent();\n error_1.transactionHash = hash3;\n throw error_1;\n case 6:\n return [\n 2\n /*return*/\n ];\n }\n });\n });\n };\n JsonRpcSigner2.prototype.signMessage = function(message) {\n return __awaiter3(this, void 0, void 0, function() {\n var data, address, error_2;\n return __generator3(this, function(_a) {\n switch (_a.label) {\n case 0:\n data = typeof message === \"string\" ? (0, strings_1.toUtf8Bytes)(message) : message;\n return [4, this.getAddress()];\n case 1:\n address = _a.sent();\n _a.label = 2;\n case 2:\n _a.trys.push([2, 4, , 5]);\n return [4, this.provider.send(\"personal_sign\", [(0, bytes_1.hexlify)(data), address.toLowerCase()])];\n case 3:\n return [2, _a.sent()];\n case 4:\n error_2 = _a.sent();\n if (typeof error_2.message === \"string\" && error_2.message.match(/user denied/i)) {\n logger.throwError(\"user rejected signing\", logger_1.Logger.errors.ACTION_REJECTED, {\n action: \"signMessage\",\n from: address,\n messageData: message\n });\n }\n throw error_2;\n case 5:\n return [\n 2\n /*return*/\n ];\n }\n });\n });\n };\n JsonRpcSigner2.prototype._legacySignMessage = function(message) {\n return __awaiter3(this, void 0, void 0, function() {\n var data, address, error_3;\n return __generator3(this, function(_a) {\n switch (_a.label) {\n case 0:\n data = typeof message === \"string\" ? (0, strings_1.toUtf8Bytes)(message) : message;\n return [4, this.getAddress()];\n case 1:\n address = _a.sent();\n _a.label = 2;\n case 2:\n _a.trys.push([2, 4, , 5]);\n return [4, this.provider.send(\"eth_sign\", [address.toLowerCase(), (0, bytes_1.hexlify)(data)])];\n case 3:\n return [2, _a.sent()];\n case 4:\n error_3 = _a.sent();\n if (typeof error_3.message === \"string\" && error_3.message.match(/user denied/i)) {\n logger.throwError(\"user rejected signing\", logger_1.Logger.errors.ACTION_REJECTED, {\n action: \"_legacySignMessage\",\n from: address,\n messageData: message\n });\n }\n throw error_3;\n case 5:\n return [\n 2\n /*return*/\n ];\n }\n });\n });\n };\n JsonRpcSigner2.prototype._signTypedData = function(domain2, types, value) {\n return __awaiter3(this, void 0, void 0, function() {\n var populated, address, error_4;\n var _this = this;\n return __generator3(this, function(_a) {\n switch (_a.label) {\n case 0:\n return [4, hash_1._TypedDataEncoder.resolveNames(domain2, types, value, function(name) {\n return _this.provider.resolveName(name);\n })];\n case 1:\n populated = _a.sent();\n return [4, this.getAddress()];\n case 2:\n address = _a.sent();\n _a.label = 3;\n case 3:\n _a.trys.push([3, 5, , 6]);\n return [4, this.provider.send(\"eth_signTypedData_v4\", [\n address.toLowerCase(),\n JSON.stringify(hash_1._TypedDataEncoder.getPayload(populated.domain, types, populated.value))\n ])];\n case 4:\n return [2, _a.sent()];\n case 5:\n error_4 = _a.sent();\n if (typeof error_4.message === \"string\" && error_4.message.match(/user denied/i)) {\n logger.throwError(\"user rejected signing\", logger_1.Logger.errors.ACTION_REJECTED, {\n action: \"_signTypedData\",\n from: address,\n messageData: { domain: populated.domain, types, value: populated.value }\n });\n }\n throw error_4;\n case 6:\n return [\n 2\n /*return*/\n ];\n }\n });\n });\n };\n JsonRpcSigner2.prototype.unlock = function(password) {\n return __awaiter3(this, void 0, void 0, function() {\n var provider, address;\n return __generator3(this, function(_a) {\n switch (_a.label) {\n case 0:\n provider = this.provider;\n return [4, this.getAddress()];\n case 1:\n address = _a.sent();\n return [2, provider.send(\"personal_unlockAccount\", [address.toLowerCase(), password, null])];\n }\n });\n });\n };\n return JsonRpcSigner2;\n }(abstract_signer_1.Signer)\n );\n exports3.JsonRpcSigner = JsonRpcSigner;\n var UncheckedJsonRpcSigner = (\n /** @class */\n function(_super) {\n __extends3(UncheckedJsonRpcSigner2, _super);\n function UncheckedJsonRpcSigner2() {\n return _super !== null && _super.apply(this, arguments) || this;\n }\n UncheckedJsonRpcSigner2.prototype.sendTransaction = function(transaction) {\n var _this = this;\n return this.sendUncheckedTransaction(transaction).then(function(hash3) {\n return {\n hash: hash3,\n nonce: null,\n gasLimit: null,\n gasPrice: null,\n data: null,\n value: null,\n chainId: null,\n confirmations: 0,\n from: null,\n wait: function(confirmations) {\n return _this.provider.waitForTransaction(hash3, confirmations);\n }\n };\n });\n };\n return UncheckedJsonRpcSigner2;\n }(JsonRpcSigner)\n );\n var allowedTransactionKeys = {\n chainId: true,\n data: true,\n gasLimit: true,\n gasPrice: true,\n nonce: true,\n to: true,\n value: true,\n type: true,\n accessList: true,\n maxFeePerGas: true,\n maxPriorityFeePerGas: true\n };\n var JsonRpcProvider = (\n /** @class */\n function(_super) {\n __extends3(JsonRpcProvider2, _super);\n function JsonRpcProvider2(url, network) {\n var _this = this;\n var networkOrReady = network;\n if (networkOrReady == null) {\n networkOrReady = new Promise(function(resolve, reject) {\n setTimeout(function() {\n _this.detectNetwork().then(function(network2) {\n resolve(network2);\n }, function(error) {\n reject(error);\n });\n }, 0);\n });\n }\n _this = _super.call(this, networkOrReady) || this;\n if (!url) {\n url = (0, properties_1.getStatic)(_this.constructor, \"defaultUrl\")();\n }\n if (typeof url === \"string\") {\n (0, properties_1.defineReadOnly)(_this, \"connection\", Object.freeze({\n url\n }));\n } else {\n (0, properties_1.defineReadOnly)(_this, \"connection\", Object.freeze((0, properties_1.shallowCopy)(url)));\n }\n _this._nextId = 42;\n return _this;\n }\n Object.defineProperty(JsonRpcProvider2.prototype, \"_cache\", {\n get: function() {\n if (this._eventLoopCache == null) {\n this._eventLoopCache = {};\n }\n return this._eventLoopCache;\n },\n enumerable: false,\n configurable: true\n });\n JsonRpcProvider2.defaultUrl = function() {\n return \"http://localhost:8545\";\n };\n JsonRpcProvider2.prototype.detectNetwork = function() {\n var _this = this;\n if (!this._cache[\"detectNetwork\"]) {\n this._cache[\"detectNetwork\"] = this._uncachedDetectNetwork();\n setTimeout(function() {\n _this._cache[\"detectNetwork\"] = null;\n }, 0);\n }\n return this._cache[\"detectNetwork\"];\n };\n JsonRpcProvider2.prototype._uncachedDetectNetwork = function() {\n return __awaiter3(this, void 0, void 0, function() {\n var chainId, error_5, error_6, getNetwork;\n return __generator3(this, function(_a) {\n switch (_a.label) {\n case 0:\n return [4, timer(0)];\n case 1:\n _a.sent();\n chainId = null;\n _a.label = 2;\n case 2:\n _a.trys.push([2, 4, , 9]);\n return [4, this.send(\"eth_chainId\", [])];\n case 3:\n chainId = _a.sent();\n return [3, 9];\n case 4:\n error_5 = _a.sent();\n _a.label = 5;\n case 5:\n _a.trys.push([5, 7, , 8]);\n return [4, this.send(\"net_version\", [])];\n case 6:\n chainId = _a.sent();\n return [3, 8];\n case 7:\n error_6 = _a.sent();\n return [3, 8];\n case 8:\n return [3, 9];\n case 9:\n if (chainId != null) {\n getNetwork = (0, properties_1.getStatic)(this.constructor, \"getNetwork\");\n try {\n return [2, getNetwork(bignumber_1.BigNumber.from(chainId).toNumber())];\n } catch (error) {\n return [2, logger.throwError(\"could not detect network\", logger_1.Logger.errors.NETWORK_ERROR, {\n chainId,\n event: \"invalidNetwork\",\n serverError: error\n })];\n }\n }\n return [2, logger.throwError(\"could not detect network\", logger_1.Logger.errors.NETWORK_ERROR, {\n event: \"noNetwork\"\n })];\n }\n });\n });\n };\n JsonRpcProvider2.prototype.getSigner = function(addressOrIndex) {\n return new JsonRpcSigner(_constructorGuard, this, addressOrIndex);\n };\n JsonRpcProvider2.prototype.getUncheckedSigner = function(addressOrIndex) {\n return this.getSigner(addressOrIndex).connectUnchecked();\n };\n JsonRpcProvider2.prototype.listAccounts = function() {\n var _this = this;\n return this.send(\"eth_accounts\", []).then(function(accounts) {\n return accounts.map(function(a3) {\n return _this.formatter.address(a3);\n });\n });\n };\n JsonRpcProvider2.prototype.send = function(method, params) {\n var _this = this;\n var request = {\n method,\n params,\n id: this._nextId++,\n jsonrpc: \"2.0\"\n };\n this.emit(\"debug\", {\n action: \"request\",\n request: (0, properties_1.deepCopy)(request),\n provider: this\n });\n var cache = [\"eth_chainId\", \"eth_blockNumber\"].indexOf(method) >= 0;\n if (cache && this._cache[method]) {\n return this._cache[method];\n }\n var result = (0, web_1.fetchJson)(this.connection, JSON.stringify(request), getResult).then(function(result2) {\n _this.emit(\"debug\", {\n action: \"response\",\n request,\n response: result2,\n provider: _this\n });\n return result2;\n }, function(error) {\n _this.emit(\"debug\", {\n action: \"response\",\n error,\n request,\n provider: _this\n });\n throw error;\n });\n if (cache) {\n this._cache[method] = result;\n setTimeout(function() {\n _this._cache[method] = null;\n }, 0);\n }\n return result;\n };\n JsonRpcProvider2.prototype.prepareRequest = function(method, params) {\n switch (method) {\n case \"getBlockNumber\":\n return [\"eth_blockNumber\", []];\n case \"getGasPrice\":\n return [\"eth_gasPrice\", []];\n case \"getBalance\":\n return [\"eth_getBalance\", [getLowerCase(params.address), params.blockTag]];\n case \"getTransactionCount\":\n return [\"eth_getTransactionCount\", [getLowerCase(params.address), params.blockTag]];\n case \"getCode\":\n return [\"eth_getCode\", [getLowerCase(params.address), params.blockTag]];\n case \"getStorageAt\":\n return [\"eth_getStorageAt\", [getLowerCase(params.address), (0, bytes_1.hexZeroPad)(params.position, 32), params.blockTag]];\n case \"sendTransaction\":\n return [\"eth_sendRawTransaction\", [params.signedTransaction]];\n case \"getBlock\":\n if (params.blockTag) {\n return [\"eth_getBlockByNumber\", [params.blockTag, !!params.includeTransactions]];\n } else if (params.blockHash) {\n return [\"eth_getBlockByHash\", [params.blockHash, !!params.includeTransactions]];\n }\n return null;\n case \"getTransaction\":\n return [\"eth_getTransactionByHash\", [params.transactionHash]];\n case \"getTransactionReceipt\":\n return [\"eth_getTransactionReceipt\", [params.transactionHash]];\n case \"call\": {\n var hexlifyTransaction = (0, properties_1.getStatic)(this.constructor, \"hexlifyTransaction\");\n return [\"eth_call\", [hexlifyTransaction(params.transaction, { from: true }), params.blockTag]];\n }\n case \"estimateGas\": {\n var hexlifyTransaction = (0, properties_1.getStatic)(this.constructor, \"hexlifyTransaction\");\n return [\"eth_estimateGas\", [hexlifyTransaction(params.transaction, { from: true })]];\n }\n case \"getLogs\":\n if (params.filter && params.filter.address != null) {\n params.filter.address = getLowerCase(params.filter.address);\n }\n return [\"eth_getLogs\", [params.filter]];\n default:\n break;\n }\n return null;\n };\n JsonRpcProvider2.prototype.perform = function(method, params) {\n return __awaiter3(this, void 0, void 0, function() {\n var tx, feeData, args, error_7;\n return __generator3(this, function(_a) {\n switch (_a.label) {\n case 0:\n if (!(method === \"call\" || method === \"estimateGas\"))\n return [3, 2];\n tx = params.transaction;\n if (!(tx && tx.type != null && bignumber_1.BigNumber.from(tx.type).isZero()))\n return [3, 2];\n if (!(tx.maxFeePerGas == null && tx.maxPriorityFeePerGas == null))\n return [3, 2];\n return [4, this.getFeeData()];\n case 1:\n feeData = _a.sent();\n if (feeData.maxFeePerGas == null && feeData.maxPriorityFeePerGas == null) {\n params = (0, properties_1.shallowCopy)(params);\n params.transaction = (0, properties_1.shallowCopy)(tx);\n delete params.transaction.type;\n }\n _a.label = 2;\n case 2:\n args = this.prepareRequest(method, params);\n if (args == null) {\n logger.throwError(method + \" not implemented\", logger_1.Logger.errors.NOT_IMPLEMENTED, { operation: method });\n }\n _a.label = 3;\n case 3:\n _a.trys.push([3, 5, , 6]);\n return [4, this.send(args[0], args[1])];\n case 4:\n return [2, _a.sent()];\n case 5:\n error_7 = _a.sent();\n return [2, checkError(method, error_7, params)];\n case 6:\n return [\n 2\n /*return*/\n ];\n }\n });\n });\n };\n JsonRpcProvider2.prototype._startEvent = function(event) {\n if (event.tag === \"pending\") {\n this._startPending();\n }\n _super.prototype._startEvent.call(this, event);\n };\n JsonRpcProvider2.prototype._startPending = function() {\n if (this._pendingFilter != null) {\n return;\n }\n var self2 = this;\n var pendingFilter = this.send(\"eth_newPendingTransactionFilter\", []);\n this._pendingFilter = pendingFilter;\n pendingFilter.then(function(filterId) {\n function poll2() {\n self2.send(\"eth_getFilterChanges\", [filterId]).then(function(hashes) {\n if (self2._pendingFilter != pendingFilter) {\n return null;\n }\n var seq = Promise.resolve();\n hashes.forEach(function(hash3) {\n self2._emitted[\"t:\" + hash3.toLowerCase()] = \"pending\";\n seq = seq.then(function() {\n return self2.getTransaction(hash3).then(function(tx) {\n self2.emit(\"pending\", tx);\n return null;\n });\n });\n });\n return seq.then(function() {\n return timer(1e3);\n });\n }).then(function() {\n if (self2._pendingFilter != pendingFilter) {\n self2.send(\"eth_uninstallFilter\", [filterId]);\n return;\n }\n setTimeout(function() {\n poll2();\n }, 0);\n return null;\n }).catch(function(error) {\n });\n }\n poll2();\n return filterId;\n }).catch(function(error) {\n });\n };\n JsonRpcProvider2.prototype._stopEvent = function(event) {\n if (event.tag === \"pending\" && this.listenerCount(\"pending\") === 0) {\n this._pendingFilter = null;\n }\n _super.prototype._stopEvent.call(this, event);\n };\n JsonRpcProvider2.hexlifyTransaction = function(transaction, allowExtra) {\n var allowed = (0, properties_1.shallowCopy)(allowedTransactionKeys);\n if (allowExtra) {\n for (var key in allowExtra) {\n if (allowExtra[key]) {\n allowed[key] = true;\n }\n }\n }\n (0, properties_1.checkProperties)(transaction, allowed);\n var result = {};\n [\"chainId\", \"gasLimit\", \"gasPrice\", \"type\", \"maxFeePerGas\", \"maxPriorityFeePerGas\", \"nonce\", \"value\"].forEach(function(key2) {\n if (transaction[key2] == null) {\n return;\n }\n var value = (0, bytes_1.hexValue)(bignumber_1.BigNumber.from(transaction[key2]));\n if (key2 === \"gasLimit\") {\n key2 = \"gas\";\n }\n result[key2] = value;\n });\n [\"from\", \"to\", \"data\"].forEach(function(key2) {\n if (transaction[key2] == null) {\n return;\n }\n result[key2] = (0, bytes_1.hexlify)(transaction[key2]);\n });\n if (transaction.accessList) {\n result[\"accessList\"] = (0, transactions_1.accessListify)(transaction.accessList);\n }\n return result;\n };\n return JsonRpcProvider2;\n }(base_provider_1.BaseProvider)\n );\n exports3.JsonRpcProvider = JsonRpcProvider;\n }\n });\n\n // ../../../node_modules/.pnpm/@ethersproject+providers@5.8.0_bufferutil@4.0.9_utf-8-validate@5.0.10/node_modules/@ethersproject/providers/lib/browser-ws.js\n var require_browser_ws = __commonJS({\n \"../../../node_modules/.pnpm/@ethersproject+providers@5.8.0_bufferutil@4.0.9_utf-8-validate@5.0.10/node_modules/@ethersproject/providers/lib/browser-ws.js\"(exports3) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n Object.defineProperty(exports3, \"__esModule\", { value: true });\n exports3.WebSocket = void 0;\n var logger_1 = require_lib();\n var _version_1 = require_version23();\n var WS = null;\n exports3.WebSocket = WS;\n try {\n exports3.WebSocket = WS = WebSocket;\n if (WS == null) {\n throw new Error(\"inject please\");\n }\n } catch (error) {\n logger_2 = new logger_1.Logger(_version_1.version);\n exports3.WebSocket = WS = function() {\n logger_2.throwError(\"WebSockets not supported in this environment\", logger_1.Logger.errors.UNSUPPORTED_OPERATION, {\n operation: \"new WebSocket()\"\n });\n };\n }\n var logger_2;\n }\n });\n\n // ../../../node_modules/.pnpm/@ethersproject+providers@5.8.0_bufferutil@4.0.9_utf-8-validate@5.0.10/node_modules/@ethersproject/providers/lib/websocket-provider.js\n var require_websocket_provider = __commonJS({\n \"../../../node_modules/.pnpm/@ethersproject+providers@5.8.0_bufferutil@4.0.9_utf-8-validate@5.0.10/node_modules/@ethersproject/providers/lib/websocket-provider.js\"(exports3) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n var __extends3 = exports3 && exports3.__extends || /* @__PURE__ */ function() {\n var extendStatics3 = function(d5, b4) {\n extendStatics3 = Object.setPrototypeOf || { __proto__: [] } instanceof Array && function(d6, b5) {\n d6.__proto__ = b5;\n } || function(d6, b5) {\n for (var p4 in b5)\n if (Object.prototype.hasOwnProperty.call(b5, p4))\n d6[p4] = b5[p4];\n };\n return extendStatics3(d5, b4);\n };\n return function(d5, b4) {\n if (typeof b4 !== \"function\" && b4 !== null)\n throw new TypeError(\"Class extends value \" + String(b4) + \" is not a constructor or null\");\n extendStatics3(d5, b4);\n function __() {\n this.constructor = d5;\n }\n d5.prototype = b4 === null ? Object.create(b4) : (__.prototype = b4.prototype, new __());\n };\n }();\n var __awaiter3 = exports3 && exports3.__awaiter || function(thisArg, _arguments, P2, generator) {\n function adopt(value) {\n return value instanceof P2 ? value : new P2(function(resolve) {\n resolve(value);\n });\n }\n return new (P2 || (P2 = Promise))(function(resolve, reject) {\n function fulfilled(value) {\n try {\n step(generator.next(value));\n } catch (e3) {\n reject(e3);\n }\n }\n function rejected(value) {\n try {\n step(generator[\"throw\"](value));\n } catch (e3) {\n reject(e3);\n }\n }\n function step(result) {\n result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected);\n }\n step((generator = generator.apply(thisArg, _arguments || [])).next());\n });\n };\n var __generator3 = exports3 && exports3.__generator || function(thisArg, body) {\n var _2 = { label: 0, sent: function() {\n if (t3[0] & 1)\n throw t3[1];\n return t3[1];\n }, trys: [], ops: [] }, f6, y6, t3, g4;\n return g4 = { next: verb(0), \"throw\": verb(1), \"return\": verb(2) }, typeof Symbol === \"function\" && (g4[Symbol.iterator] = function() {\n return this;\n }), g4;\n function verb(n2) {\n return function(v2) {\n return step([n2, v2]);\n };\n }\n function step(op) {\n if (f6)\n throw new TypeError(\"Generator is already executing.\");\n while (_2)\n try {\n if (f6 = 1, y6 && (t3 = op[0] & 2 ? y6[\"return\"] : op[0] ? y6[\"throw\"] || ((t3 = y6[\"return\"]) && t3.call(y6), 0) : y6.next) && !(t3 = t3.call(y6, op[1])).done)\n return t3;\n if (y6 = 0, t3)\n op = [op[0] & 2, t3.value];\n switch (op[0]) {\n case 0:\n case 1:\n t3 = op;\n break;\n case 4:\n _2.label++;\n return { value: op[1], done: false };\n case 5:\n _2.label++;\n y6 = op[1];\n op = [0];\n continue;\n case 7:\n op = _2.ops.pop();\n _2.trys.pop();\n continue;\n default:\n if (!(t3 = _2.trys, t3 = t3.length > 0 && t3[t3.length - 1]) && (op[0] === 6 || op[0] === 2)) {\n _2 = 0;\n continue;\n }\n if (op[0] === 3 && (!t3 || op[1] > t3[0] && op[1] < t3[3])) {\n _2.label = op[1];\n break;\n }\n if (op[0] === 6 && _2.label < t3[1]) {\n _2.label = t3[1];\n t3 = op;\n break;\n }\n if (t3 && _2.label < t3[2]) {\n _2.label = t3[2];\n _2.ops.push(op);\n break;\n }\n if (t3[2])\n _2.ops.pop();\n _2.trys.pop();\n continue;\n }\n op = body.call(thisArg, _2);\n } catch (e3) {\n op = [6, e3];\n y6 = 0;\n } finally {\n f6 = t3 = 0;\n }\n if (op[0] & 5)\n throw op[1];\n return { value: op[0] ? op[1] : void 0, done: true };\n }\n };\n Object.defineProperty(exports3, \"__esModule\", { value: true });\n exports3.WebSocketProvider = void 0;\n var bignumber_1 = require_lib3();\n var properties_1 = require_lib4();\n var json_rpc_provider_1 = require_json_rpc_provider();\n var ws_1 = require_browser_ws();\n var logger_1 = require_lib();\n var _version_1 = require_version23();\n var logger = new logger_1.Logger(_version_1.version);\n var NextId = 1;\n var WebSocketProvider = (\n /** @class */\n function(_super) {\n __extends3(WebSocketProvider2, _super);\n function WebSocketProvider2(url, network) {\n var _this = this;\n if (network === \"any\") {\n logger.throwError(\"WebSocketProvider does not support 'any' network yet\", logger_1.Logger.errors.UNSUPPORTED_OPERATION, {\n operation: \"network:any\"\n });\n }\n if (typeof url === \"string\") {\n _this = _super.call(this, url, network) || this;\n } else {\n _this = _super.call(this, \"_websocket\", network) || this;\n }\n _this._pollingInterval = -1;\n _this._wsReady = false;\n if (typeof url === \"string\") {\n (0, properties_1.defineReadOnly)(_this, \"_websocket\", new ws_1.WebSocket(_this.connection.url));\n } else {\n (0, properties_1.defineReadOnly)(_this, \"_websocket\", url);\n }\n (0, properties_1.defineReadOnly)(_this, \"_requests\", {});\n (0, properties_1.defineReadOnly)(_this, \"_subs\", {});\n (0, properties_1.defineReadOnly)(_this, \"_subIds\", {});\n (0, properties_1.defineReadOnly)(_this, \"_detectNetwork\", _super.prototype.detectNetwork.call(_this));\n _this.websocket.onopen = function() {\n _this._wsReady = true;\n Object.keys(_this._requests).forEach(function(id) {\n _this.websocket.send(_this._requests[id].payload);\n });\n };\n _this.websocket.onmessage = function(messageEvent) {\n var data = messageEvent.data;\n var result = JSON.parse(data);\n if (result.id != null) {\n var id = String(result.id);\n var request = _this._requests[id];\n delete _this._requests[id];\n if (result.result !== void 0) {\n request.callback(null, result.result);\n _this.emit(\"debug\", {\n action: \"response\",\n request: JSON.parse(request.payload),\n response: result.result,\n provider: _this\n });\n } else {\n var error = null;\n if (result.error) {\n error = new Error(result.error.message || \"unknown error\");\n (0, properties_1.defineReadOnly)(error, \"code\", result.error.code || null);\n (0, properties_1.defineReadOnly)(error, \"response\", data);\n } else {\n error = new Error(\"unknown error\");\n }\n request.callback(error, void 0);\n _this.emit(\"debug\", {\n action: \"response\",\n error,\n request: JSON.parse(request.payload),\n provider: _this\n });\n }\n } else if (result.method === \"eth_subscription\") {\n var sub = _this._subs[result.params.subscription];\n if (sub) {\n sub.processFunc(result.params.result);\n }\n } else {\n console.warn(\"this should not happen\");\n }\n };\n var fauxPoll = setInterval(function() {\n _this.emit(\"poll\");\n }, 1e3);\n if (fauxPoll.unref) {\n fauxPoll.unref();\n }\n return _this;\n }\n Object.defineProperty(WebSocketProvider2.prototype, \"websocket\", {\n // Cannot narrow the type of _websocket, as that is not backwards compatible\n // so we add a getter and let the WebSocket be a public API.\n get: function() {\n return this._websocket;\n },\n enumerable: false,\n configurable: true\n });\n WebSocketProvider2.prototype.detectNetwork = function() {\n return this._detectNetwork;\n };\n Object.defineProperty(WebSocketProvider2.prototype, \"pollingInterval\", {\n get: function() {\n return 0;\n },\n set: function(value) {\n logger.throwError(\"cannot set polling interval on WebSocketProvider\", logger_1.Logger.errors.UNSUPPORTED_OPERATION, {\n operation: \"setPollingInterval\"\n });\n },\n enumerable: false,\n configurable: true\n });\n WebSocketProvider2.prototype.resetEventsBlock = function(blockNumber) {\n logger.throwError(\"cannot reset events block on WebSocketProvider\", logger_1.Logger.errors.UNSUPPORTED_OPERATION, {\n operation: \"resetEventBlock\"\n });\n };\n WebSocketProvider2.prototype.poll = function() {\n return __awaiter3(this, void 0, void 0, function() {\n return __generator3(this, function(_a) {\n return [2, null];\n });\n });\n };\n Object.defineProperty(WebSocketProvider2.prototype, \"polling\", {\n set: function(value) {\n if (!value) {\n return;\n }\n logger.throwError(\"cannot set polling on WebSocketProvider\", logger_1.Logger.errors.UNSUPPORTED_OPERATION, {\n operation: \"setPolling\"\n });\n },\n enumerable: false,\n configurable: true\n });\n WebSocketProvider2.prototype.send = function(method, params) {\n var _this = this;\n var rid = NextId++;\n return new Promise(function(resolve, reject) {\n function callback(error, result) {\n if (error) {\n return reject(error);\n }\n return resolve(result);\n }\n var payload = JSON.stringify({\n method,\n params,\n id: rid,\n jsonrpc: \"2.0\"\n });\n _this.emit(\"debug\", {\n action: \"request\",\n request: JSON.parse(payload),\n provider: _this\n });\n _this._requests[String(rid)] = { callback, payload };\n if (_this._wsReady) {\n _this.websocket.send(payload);\n }\n });\n };\n WebSocketProvider2.defaultUrl = function() {\n return \"ws://localhost:8546\";\n };\n WebSocketProvider2.prototype._subscribe = function(tag, param, processFunc) {\n return __awaiter3(this, void 0, void 0, function() {\n var subIdPromise, subId;\n var _this = this;\n return __generator3(this, function(_a) {\n switch (_a.label) {\n case 0:\n subIdPromise = this._subIds[tag];\n if (subIdPromise == null) {\n subIdPromise = Promise.all(param).then(function(param2) {\n return _this.send(\"eth_subscribe\", param2);\n });\n this._subIds[tag] = subIdPromise;\n }\n return [4, subIdPromise];\n case 1:\n subId = _a.sent();\n this._subs[subId] = { tag, processFunc };\n return [\n 2\n /*return*/\n ];\n }\n });\n });\n };\n WebSocketProvider2.prototype._startEvent = function(event) {\n var _this = this;\n switch (event.type) {\n case \"block\":\n this._subscribe(\"block\", [\"newHeads\"], function(result) {\n var blockNumber = bignumber_1.BigNumber.from(result.number).toNumber();\n _this._emitted.block = blockNumber;\n _this.emit(\"block\", blockNumber);\n });\n break;\n case \"pending\":\n this._subscribe(\"pending\", [\"newPendingTransactions\"], function(result) {\n _this.emit(\"pending\", result);\n });\n break;\n case \"filter\":\n this._subscribe(event.tag, [\"logs\", this._getFilter(event.filter)], function(result) {\n if (result.removed == null) {\n result.removed = false;\n }\n _this.emit(event.filter, _this.formatter.filterLog(result));\n });\n break;\n case \"tx\": {\n var emitReceipt_1 = function(event2) {\n var hash3 = event2.hash;\n _this.getTransactionReceipt(hash3).then(function(receipt) {\n if (!receipt) {\n return;\n }\n _this.emit(hash3, receipt);\n });\n };\n emitReceipt_1(event);\n this._subscribe(\"tx\", [\"newHeads\"], function(result) {\n _this._events.filter(function(e3) {\n return e3.type === \"tx\";\n }).forEach(emitReceipt_1);\n });\n break;\n }\n case \"debug\":\n case \"poll\":\n case \"willPoll\":\n case \"didPoll\":\n case \"error\":\n break;\n default:\n console.log(\"unhandled:\", event);\n break;\n }\n };\n WebSocketProvider2.prototype._stopEvent = function(event) {\n var _this = this;\n var tag = event.tag;\n if (event.type === \"tx\") {\n if (this._events.filter(function(e3) {\n return e3.type === \"tx\";\n }).length) {\n return;\n }\n tag = \"tx\";\n } else if (this.listenerCount(event.event)) {\n return;\n }\n var subId = this._subIds[tag];\n if (!subId) {\n return;\n }\n delete this._subIds[tag];\n subId.then(function(subId2) {\n if (!_this._subs[subId2]) {\n return;\n }\n delete _this._subs[subId2];\n _this.send(\"eth_unsubscribe\", [subId2]);\n });\n };\n WebSocketProvider2.prototype.destroy = function() {\n return __awaiter3(this, void 0, void 0, function() {\n var _this = this;\n return __generator3(this, function(_a) {\n switch (_a.label) {\n case 0:\n if (!(this.websocket.readyState === ws_1.WebSocket.CONNECTING))\n return [3, 2];\n return [4, new Promise(function(resolve) {\n _this.websocket.onopen = function() {\n resolve(true);\n };\n _this.websocket.onerror = function() {\n resolve(false);\n };\n })];\n case 1:\n _a.sent();\n _a.label = 2;\n case 2:\n this.websocket.close(1e3);\n return [\n 2\n /*return*/\n ];\n }\n });\n });\n };\n return WebSocketProvider2;\n }(json_rpc_provider_1.JsonRpcProvider)\n );\n exports3.WebSocketProvider = WebSocketProvider;\n }\n });\n\n // ../../../node_modules/.pnpm/@ethersproject+providers@5.8.0_bufferutil@4.0.9_utf-8-validate@5.0.10/node_modules/@ethersproject/providers/lib/url-json-rpc-provider.js\n var require_url_json_rpc_provider = __commonJS({\n \"../../../node_modules/.pnpm/@ethersproject+providers@5.8.0_bufferutil@4.0.9_utf-8-validate@5.0.10/node_modules/@ethersproject/providers/lib/url-json-rpc-provider.js\"(exports3) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n var __extends3 = exports3 && exports3.__extends || /* @__PURE__ */ function() {\n var extendStatics3 = function(d5, b4) {\n extendStatics3 = Object.setPrototypeOf || { __proto__: [] } instanceof Array && function(d6, b5) {\n d6.__proto__ = b5;\n } || function(d6, b5) {\n for (var p4 in b5)\n if (Object.prototype.hasOwnProperty.call(b5, p4))\n d6[p4] = b5[p4];\n };\n return extendStatics3(d5, b4);\n };\n return function(d5, b4) {\n if (typeof b4 !== \"function\" && b4 !== null)\n throw new TypeError(\"Class extends value \" + String(b4) + \" is not a constructor or null\");\n extendStatics3(d5, b4);\n function __() {\n this.constructor = d5;\n }\n d5.prototype = b4 === null ? Object.create(b4) : (__.prototype = b4.prototype, new __());\n };\n }();\n var __awaiter3 = exports3 && exports3.__awaiter || function(thisArg, _arguments, P2, generator) {\n function adopt(value) {\n return value instanceof P2 ? value : new P2(function(resolve) {\n resolve(value);\n });\n }\n return new (P2 || (P2 = Promise))(function(resolve, reject) {\n function fulfilled(value) {\n try {\n step(generator.next(value));\n } catch (e3) {\n reject(e3);\n }\n }\n function rejected(value) {\n try {\n step(generator[\"throw\"](value));\n } catch (e3) {\n reject(e3);\n }\n }\n function step(result) {\n result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected);\n }\n step((generator = generator.apply(thisArg, _arguments || [])).next());\n });\n };\n var __generator3 = exports3 && exports3.__generator || function(thisArg, body) {\n var _2 = { label: 0, sent: function() {\n if (t3[0] & 1)\n throw t3[1];\n return t3[1];\n }, trys: [], ops: [] }, f6, y6, t3, g4;\n return g4 = { next: verb(0), \"throw\": verb(1), \"return\": verb(2) }, typeof Symbol === \"function\" && (g4[Symbol.iterator] = function() {\n return this;\n }), g4;\n function verb(n2) {\n return function(v2) {\n return step([n2, v2]);\n };\n }\n function step(op) {\n if (f6)\n throw new TypeError(\"Generator is already executing.\");\n while (_2)\n try {\n if (f6 = 1, y6 && (t3 = op[0] & 2 ? y6[\"return\"] : op[0] ? y6[\"throw\"] || ((t3 = y6[\"return\"]) && t3.call(y6), 0) : y6.next) && !(t3 = t3.call(y6, op[1])).done)\n return t3;\n if (y6 = 0, t3)\n op = [op[0] & 2, t3.value];\n switch (op[0]) {\n case 0:\n case 1:\n t3 = op;\n break;\n case 4:\n _2.label++;\n return { value: op[1], done: false };\n case 5:\n _2.label++;\n y6 = op[1];\n op = [0];\n continue;\n case 7:\n op = _2.ops.pop();\n _2.trys.pop();\n continue;\n default:\n if (!(t3 = _2.trys, t3 = t3.length > 0 && t3[t3.length - 1]) && (op[0] === 6 || op[0] === 2)) {\n _2 = 0;\n continue;\n }\n if (op[0] === 3 && (!t3 || op[1] > t3[0] && op[1] < t3[3])) {\n _2.label = op[1];\n break;\n }\n if (op[0] === 6 && _2.label < t3[1]) {\n _2.label = t3[1];\n t3 = op;\n break;\n }\n if (t3 && _2.label < t3[2]) {\n _2.label = t3[2];\n _2.ops.push(op);\n break;\n }\n if (t3[2])\n _2.ops.pop();\n _2.trys.pop();\n continue;\n }\n op = body.call(thisArg, _2);\n } catch (e3) {\n op = [6, e3];\n y6 = 0;\n } finally {\n f6 = t3 = 0;\n }\n if (op[0] & 5)\n throw op[1];\n return { value: op[0] ? op[1] : void 0, done: true };\n }\n };\n Object.defineProperty(exports3, \"__esModule\", { value: true });\n exports3.UrlJsonRpcProvider = exports3.StaticJsonRpcProvider = void 0;\n var properties_1 = require_lib4();\n var logger_1 = require_lib();\n var _version_1 = require_version23();\n var logger = new logger_1.Logger(_version_1.version);\n var json_rpc_provider_1 = require_json_rpc_provider();\n var StaticJsonRpcProvider = (\n /** @class */\n function(_super) {\n __extends3(StaticJsonRpcProvider2, _super);\n function StaticJsonRpcProvider2() {\n return _super !== null && _super.apply(this, arguments) || this;\n }\n StaticJsonRpcProvider2.prototype.detectNetwork = function() {\n return __awaiter3(this, void 0, void 0, function() {\n var network;\n return __generator3(this, function(_a) {\n switch (_a.label) {\n case 0:\n network = this.network;\n if (!(network == null))\n return [3, 2];\n return [4, _super.prototype.detectNetwork.call(this)];\n case 1:\n network = _a.sent();\n if (!network) {\n logger.throwError(\"no network detected\", logger_1.Logger.errors.UNKNOWN_ERROR, {});\n }\n if (this._network == null) {\n (0, properties_1.defineReadOnly)(this, \"_network\", network);\n this.emit(\"network\", network, null);\n }\n _a.label = 2;\n case 2:\n return [2, network];\n }\n });\n });\n };\n return StaticJsonRpcProvider2;\n }(json_rpc_provider_1.JsonRpcProvider)\n );\n exports3.StaticJsonRpcProvider = StaticJsonRpcProvider;\n var UrlJsonRpcProvider = (\n /** @class */\n function(_super) {\n __extends3(UrlJsonRpcProvider2, _super);\n function UrlJsonRpcProvider2(network, apiKey) {\n var _newTarget = this.constructor;\n var _this = this;\n logger.checkAbstract(_newTarget, UrlJsonRpcProvider2);\n network = (0, properties_1.getStatic)(_newTarget, \"getNetwork\")(network);\n apiKey = (0, properties_1.getStatic)(_newTarget, \"getApiKey\")(apiKey);\n var connection = (0, properties_1.getStatic)(_newTarget, \"getUrl\")(network, apiKey);\n _this = _super.call(this, connection, network) || this;\n if (typeof apiKey === \"string\") {\n (0, properties_1.defineReadOnly)(_this, \"apiKey\", apiKey);\n } else if (apiKey != null) {\n Object.keys(apiKey).forEach(function(key) {\n (0, properties_1.defineReadOnly)(_this, key, apiKey[key]);\n });\n }\n return _this;\n }\n UrlJsonRpcProvider2.prototype._startPending = function() {\n logger.warn(\"WARNING: API provider does not support pending filters\");\n };\n UrlJsonRpcProvider2.prototype.isCommunityResource = function() {\n return false;\n };\n UrlJsonRpcProvider2.prototype.getSigner = function(address) {\n return logger.throwError(\"API provider does not support signing\", logger_1.Logger.errors.UNSUPPORTED_OPERATION, { operation: \"getSigner\" });\n };\n UrlJsonRpcProvider2.prototype.listAccounts = function() {\n return Promise.resolve([]);\n };\n UrlJsonRpcProvider2.getApiKey = function(apiKey) {\n return apiKey;\n };\n UrlJsonRpcProvider2.getUrl = function(network, apiKey) {\n return logger.throwError(\"not implemented; sub-classes must override getUrl\", logger_1.Logger.errors.NOT_IMPLEMENTED, {\n operation: \"getUrl\"\n });\n };\n return UrlJsonRpcProvider2;\n }(StaticJsonRpcProvider)\n );\n exports3.UrlJsonRpcProvider = UrlJsonRpcProvider;\n }\n });\n\n // ../../../node_modules/.pnpm/@ethersproject+providers@5.8.0_bufferutil@4.0.9_utf-8-validate@5.0.10/node_modules/@ethersproject/providers/lib/alchemy-provider.js\n var require_alchemy_provider = __commonJS({\n \"../../../node_modules/.pnpm/@ethersproject+providers@5.8.0_bufferutil@4.0.9_utf-8-validate@5.0.10/node_modules/@ethersproject/providers/lib/alchemy-provider.js\"(exports3) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n var __extends3 = exports3 && exports3.__extends || /* @__PURE__ */ function() {\n var extendStatics3 = function(d5, b4) {\n extendStatics3 = Object.setPrototypeOf || { __proto__: [] } instanceof Array && function(d6, b5) {\n d6.__proto__ = b5;\n } || function(d6, b5) {\n for (var p4 in b5)\n if (Object.prototype.hasOwnProperty.call(b5, p4))\n d6[p4] = b5[p4];\n };\n return extendStatics3(d5, b4);\n };\n return function(d5, b4) {\n if (typeof b4 !== \"function\" && b4 !== null)\n throw new TypeError(\"Class extends value \" + String(b4) + \" is not a constructor or null\");\n extendStatics3(d5, b4);\n function __() {\n this.constructor = d5;\n }\n d5.prototype = b4 === null ? Object.create(b4) : (__.prototype = b4.prototype, new __());\n };\n }();\n Object.defineProperty(exports3, \"__esModule\", { value: true });\n exports3.AlchemyProvider = exports3.AlchemyWebSocketProvider = void 0;\n var properties_1 = require_lib4();\n var formatter_1 = require_formatter();\n var websocket_provider_1 = require_websocket_provider();\n var logger_1 = require_lib();\n var _version_1 = require_version23();\n var logger = new logger_1.Logger(_version_1.version);\n var url_json_rpc_provider_1 = require_url_json_rpc_provider();\n var defaultApiKey = \"_gg7wSSi0KMBsdKnGVfHDueq6xMB9EkC\";\n var AlchemyWebSocketProvider = (\n /** @class */\n function(_super) {\n __extends3(AlchemyWebSocketProvider2, _super);\n function AlchemyWebSocketProvider2(network, apiKey) {\n var _this = this;\n var provider = new AlchemyProvider(network, apiKey);\n var url = provider.connection.url.replace(/^http/i, \"ws\").replace(\".alchemyapi.\", \".ws.alchemyapi.\");\n _this = _super.call(this, url, provider.network) || this;\n (0, properties_1.defineReadOnly)(_this, \"apiKey\", provider.apiKey);\n return _this;\n }\n AlchemyWebSocketProvider2.prototype.isCommunityResource = function() {\n return this.apiKey === defaultApiKey;\n };\n return AlchemyWebSocketProvider2;\n }(websocket_provider_1.WebSocketProvider)\n );\n exports3.AlchemyWebSocketProvider = AlchemyWebSocketProvider;\n var AlchemyProvider = (\n /** @class */\n function(_super) {\n __extends3(AlchemyProvider2, _super);\n function AlchemyProvider2() {\n return _super !== null && _super.apply(this, arguments) || this;\n }\n AlchemyProvider2.getWebSocketProvider = function(network, apiKey) {\n return new AlchemyWebSocketProvider(network, apiKey);\n };\n AlchemyProvider2.getApiKey = function(apiKey) {\n if (apiKey == null) {\n return defaultApiKey;\n }\n if (apiKey && typeof apiKey !== \"string\") {\n logger.throwArgumentError(\"invalid apiKey\", \"apiKey\", apiKey);\n }\n return apiKey;\n };\n AlchemyProvider2.getUrl = function(network, apiKey) {\n var host = null;\n switch (network.name) {\n case \"homestead\":\n host = \"eth-mainnet.alchemyapi.io/v2/\";\n break;\n case \"goerli\":\n host = \"eth-goerli.g.alchemy.com/v2/\";\n break;\n case \"sepolia\":\n host = \"eth-sepolia.g.alchemy.com/v2/\";\n break;\n case \"matic\":\n host = \"polygon-mainnet.g.alchemy.com/v2/\";\n break;\n case \"maticmum\":\n host = \"polygon-mumbai.g.alchemy.com/v2/\";\n break;\n case \"arbitrum\":\n host = \"arb-mainnet.g.alchemy.com/v2/\";\n break;\n case \"arbitrum-goerli\":\n host = \"arb-goerli.g.alchemy.com/v2/\";\n break;\n case \"arbitrum-sepolia\":\n host = \"arb-sepolia.g.alchemy.com/v2/\";\n break;\n case \"optimism\":\n host = \"opt-mainnet.g.alchemy.com/v2/\";\n break;\n case \"optimism-goerli\":\n host = \"opt-goerli.g.alchemy.com/v2/\";\n break;\n case \"optimism-sepolia\":\n host = \"opt-sepolia.g.alchemy.com/v2/\";\n break;\n default:\n logger.throwArgumentError(\"unsupported network\", \"network\", arguments[0]);\n }\n return {\n allowGzip: true,\n url: \"https://\" + host + apiKey,\n throttleCallback: function(attempt, url) {\n if (apiKey === defaultApiKey) {\n (0, formatter_1.showThrottleMessage)();\n }\n return Promise.resolve(true);\n }\n };\n };\n AlchemyProvider2.prototype.isCommunityResource = function() {\n return this.apiKey === defaultApiKey;\n };\n return AlchemyProvider2;\n }(url_json_rpc_provider_1.UrlJsonRpcProvider)\n );\n exports3.AlchemyProvider = AlchemyProvider;\n }\n });\n\n // ../../../node_modules/.pnpm/@ethersproject+providers@5.8.0_bufferutil@4.0.9_utf-8-validate@5.0.10/node_modules/@ethersproject/providers/lib/ankr-provider.js\n var require_ankr_provider = __commonJS({\n \"../../../node_modules/.pnpm/@ethersproject+providers@5.8.0_bufferutil@4.0.9_utf-8-validate@5.0.10/node_modules/@ethersproject/providers/lib/ankr-provider.js\"(exports3) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n var __extends3 = exports3 && exports3.__extends || /* @__PURE__ */ function() {\n var extendStatics3 = function(d5, b4) {\n extendStatics3 = Object.setPrototypeOf || { __proto__: [] } instanceof Array && function(d6, b5) {\n d6.__proto__ = b5;\n } || function(d6, b5) {\n for (var p4 in b5)\n if (Object.prototype.hasOwnProperty.call(b5, p4))\n d6[p4] = b5[p4];\n };\n return extendStatics3(d5, b4);\n };\n return function(d5, b4) {\n if (typeof b4 !== \"function\" && b4 !== null)\n throw new TypeError(\"Class extends value \" + String(b4) + \" is not a constructor or null\");\n extendStatics3(d5, b4);\n function __() {\n this.constructor = d5;\n }\n d5.prototype = b4 === null ? Object.create(b4) : (__.prototype = b4.prototype, new __());\n };\n }();\n Object.defineProperty(exports3, \"__esModule\", { value: true });\n exports3.AnkrProvider = void 0;\n var formatter_1 = require_formatter();\n var url_json_rpc_provider_1 = require_url_json_rpc_provider();\n var logger_1 = require_lib();\n var _version_1 = require_version23();\n var logger = new logger_1.Logger(_version_1.version);\n var defaultApiKey = \"9f7d929b018cdffb338517efa06f58359e86ff1ffd350bc889738523659e7972\";\n function getHost(name) {\n switch (name) {\n case \"homestead\":\n return \"rpc.ankr.com/eth/\";\n case \"ropsten\":\n return \"rpc.ankr.com/eth_ropsten/\";\n case \"rinkeby\":\n return \"rpc.ankr.com/eth_rinkeby/\";\n case \"goerli\":\n return \"rpc.ankr.com/eth_goerli/\";\n case \"sepolia\":\n return \"rpc.ankr.com/eth_sepolia/\";\n case \"matic\":\n return \"rpc.ankr.com/polygon/\";\n case \"maticmum\":\n return \"rpc.ankr.com/polygon_mumbai/\";\n case \"optimism\":\n return \"rpc.ankr.com/optimism/\";\n case \"optimism-goerli\":\n return \"rpc.ankr.com/optimism_testnet/\";\n case \"optimism-sepolia\":\n return \"rpc.ankr.com/optimism_sepolia/\";\n case \"arbitrum\":\n return \"rpc.ankr.com/arbitrum/\";\n }\n return logger.throwArgumentError(\"unsupported network\", \"name\", name);\n }\n var AnkrProvider = (\n /** @class */\n function(_super) {\n __extends3(AnkrProvider2, _super);\n function AnkrProvider2() {\n return _super !== null && _super.apply(this, arguments) || this;\n }\n AnkrProvider2.prototype.isCommunityResource = function() {\n return this.apiKey === defaultApiKey;\n };\n AnkrProvider2.getApiKey = function(apiKey) {\n if (apiKey == null) {\n return defaultApiKey;\n }\n return apiKey;\n };\n AnkrProvider2.getUrl = function(network, apiKey) {\n if (apiKey == null) {\n apiKey = defaultApiKey;\n }\n var connection = {\n allowGzip: true,\n url: \"https://\" + getHost(network.name) + apiKey,\n throttleCallback: function(attempt, url) {\n if (apiKey.apiKey === defaultApiKey) {\n (0, formatter_1.showThrottleMessage)();\n }\n return Promise.resolve(true);\n }\n };\n if (apiKey.projectSecret != null) {\n connection.user = \"\";\n connection.password = apiKey.projectSecret;\n }\n return connection;\n };\n return AnkrProvider2;\n }(url_json_rpc_provider_1.UrlJsonRpcProvider)\n );\n exports3.AnkrProvider = AnkrProvider;\n }\n });\n\n // ../../../node_modules/.pnpm/@ethersproject+providers@5.8.0_bufferutil@4.0.9_utf-8-validate@5.0.10/node_modules/@ethersproject/providers/lib/cloudflare-provider.js\n var require_cloudflare_provider = __commonJS({\n \"../../../node_modules/.pnpm/@ethersproject+providers@5.8.0_bufferutil@4.0.9_utf-8-validate@5.0.10/node_modules/@ethersproject/providers/lib/cloudflare-provider.js\"(exports3) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n var __extends3 = exports3 && exports3.__extends || /* @__PURE__ */ function() {\n var extendStatics3 = function(d5, b4) {\n extendStatics3 = Object.setPrototypeOf || { __proto__: [] } instanceof Array && function(d6, b5) {\n d6.__proto__ = b5;\n } || function(d6, b5) {\n for (var p4 in b5)\n if (Object.prototype.hasOwnProperty.call(b5, p4))\n d6[p4] = b5[p4];\n };\n return extendStatics3(d5, b4);\n };\n return function(d5, b4) {\n if (typeof b4 !== \"function\" && b4 !== null)\n throw new TypeError(\"Class extends value \" + String(b4) + \" is not a constructor or null\");\n extendStatics3(d5, b4);\n function __() {\n this.constructor = d5;\n }\n d5.prototype = b4 === null ? Object.create(b4) : (__.prototype = b4.prototype, new __());\n };\n }();\n var __awaiter3 = exports3 && exports3.__awaiter || function(thisArg, _arguments, P2, generator) {\n function adopt(value) {\n return value instanceof P2 ? value : new P2(function(resolve) {\n resolve(value);\n });\n }\n return new (P2 || (P2 = Promise))(function(resolve, reject) {\n function fulfilled(value) {\n try {\n step(generator.next(value));\n } catch (e3) {\n reject(e3);\n }\n }\n function rejected(value) {\n try {\n step(generator[\"throw\"](value));\n } catch (e3) {\n reject(e3);\n }\n }\n function step(result) {\n result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected);\n }\n step((generator = generator.apply(thisArg, _arguments || [])).next());\n });\n };\n var __generator3 = exports3 && exports3.__generator || function(thisArg, body) {\n var _2 = { label: 0, sent: function() {\n if (t3[0] & 1)\n throw t3[1];\n return t3[1];\n }, trys: [], ops: [] }, f6, y6, t3, g4;\n return g4 = { next: verb(0), \"throw\": verb(1), \"return\": verb(2) }, typeof Symbol === \"function\" && (g4[Symbol.iterator] = function() {\n return this;\n }), g4;\n function verb(n2) {\n return function(v2) {\n return step([n2, v2]);\n };\n }\n function step(op) {\n if (f6)\n throw new TypeError(\"Generator is already executing.\");\n while (_2)\n try {\n if (f6 = 1, y6 && (t3 = op[0] & 2 ? y6[\"return\"] : op[0] ? y6[\"throw\"] || ((t3 = y6[\"return\"]) && t3.call(y6), 0) : y6.next) && !(t3 = t3.call(y6, op[1])).done)\n return t3;\n if (y6 = 0, t3)\n op = [op[0] & 2, t3.value];\n switch (op[0]) {\n case 0:\n case 1:\n t3 = op;\n break;\n case 4:\n _2.label++;\n return { value: op[1], done: false };\n case 5:\n _2.label++;\n y6 = op[1];\n op = [0];\n continue;\n case 7:\n op = _2.ops.pop();\n _2.trys.pop();\n continue;\n default:\n if (!(t3 = _2.trys, t3 = t3.length > 0 && t3[t3.length - 1]) && (op[0] === 6 || op[0] === 2)) {\n _2 = 0;\n continue;\n }\n if (op[0] === 3 && (!t3 || op[1] > t3[0] && op[1] < t3[3])) {\n _2.label = op[1];\n break;\n }\n if (op[0] === 6 && _2.label < t3[1]) {\n _2.label = t3[1];\n t3 = op;\n break;\n }\n if (t3 && _2.label < t3[2]) {\n _2.label = t3[2];\n _2.ops.push(op);\n break;\n }\n if (t3[2])\n _2.ops.pop();\n _2.trys.pop();\n continue;\n }\n op = body.call(thisArg, _2);\n } catch (e3) {\n op = [6, e3];\n y6 = 0;\n } finally {\n f6 = t3 = 0;\n }\n if (op[0] & 5)\n throw op[1];\n return { value: op[0] ? op[1] : void 0, done: true };\n }\n };\n Object.defineProperty(exports3, \"__esModule\", { value: true });\n exports3.CloudflareProvider = void 0;\n var url_json_rpc_provider_1 = require_url_json_rpc_provider();\n var logger_1 = require_lib();\n var _version_1 = require_version23();\n var logger = new logger_1.Logger(_version_1.version);\n var CloudflareProvider = (\n /** @class */\n function(_super) {\n __extends3(CloudflareProvider2, _super);\n function CloudflareProvider2() {\n return _super !== null && _super.apply(this, arguments) || this;\n }\n CloudflareProvider2.getApiKey = function(apiKey) {\n if (apiKey != null) {\n logger.throwArgumentError(\"apiKey not supported for cloudflare\", \"apiKey\", apiKey);\n }\n return null;\n };\n CloudflareProvider2.getUrl = function(network, apiKey) {\n var host = null;\n switch (network.name) {\n case \"homestead\":\n host = \"https://cloudflare-eth.com/\";\n break;\n default:\n logger.throwArgumentError(\"unsupported network\", \"network\", arguments[0]);\n }\n return host;\n };\n CloudflareProvider2.prototype.perform = function(method, params) {\n return __awaiter3(this, void 0, void 0, function() {\n var block;\n return __generator3(this, function(_a) {\n switch (_a.label) {\n case 0:\n if (!(method === \"getBlockNumber\"))\n return [3, 2];\n return [4, _super.prototype.perform.call(this, \"getBlock\", { blockTag: \"latest\" })];\n case 1:\n block = _a.sent();\n return [2, block.number];\n case 2:\n return [2, _super.prototype.perform.call(this, method, params)];\n }\n });\n });\n };\n return CloudflareProvider2;\n }(url_json_rpc_provider_1.UrlJsonRpcProvider)\n );\n exports3.CloudflareProvider = CloudflareProvider;\n }\n });\n\n // ../../../node_modules/.pnpm/@ethersproject+providers@5.8.0_bufferutil@4.0.9_utf-8-validate@5.0.10/node_modules/@ethersproject/providers/lib/etherscan-provider.js\n var require_etherscan_provider = __commonJS({\n \"../../../node_modules/.pnpm/@ethersproject+providers@5.8.0_bufferutil@4.0.9_utf-8-validate@5.0.10/node_modules/@ethersproject/providers/lib/etherscan-provider.js\"(exports3) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n var __extends3 = exports3 && exports3.__extends || /* @__PURE__ */ function() {\n var extendStatics3 = function(d5, b4) {\n extendStatics3 = Object.setPrototypeOf || { __proto__: [] } instanceof Array && function(d6, b5) {\n d6.__proto__ = b5;\n } || function(d6, b5) {\n for (var p4 in b5)\n if (Object.prototype.hasOwnProperty.call(b5, p4))\n d6[p4] = b5[p4];\n };\n return extendStatics3(d5, b4);\n };\n return function(d5, b4) {\n if (typeof b4 !== \"function\" && b4 !== null)\n throw new TypeError(\"Class extends value \" + String(b4) + \" is not a constructor or null\");\n extendStatics3(d5, b4);\n function __() {\n this.constructor = d5;\n }\n d5.prototype = b4 === null ? Object.create(b4) : (__.prototype = b4.prototype, new __());\n };\n }();\n var __awaiter3 = exports3 && exports3.__awaiter || function(thisArg, _arguments, P2, generator) {\n function adopt(value) {\n return value instanceof P2 ? value : new P2(function(resolve) {\n resolve(value);\n });\n }\n return new (P2 || (P2 = Promise))(function(resolve, reject) {\n function fulfilled(value) {\n try {\n step(generator.next(value));\n } catch (e3) {\n reject(e3);\n }\n }\n function rejected(value) {\n try {\n step(generator[\"throw\"](value));\n } catch (e3) {\n reject(e3);\n }\n }\n function step(result) {\n result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected);\n }\n step((generator = generator.apply(thisArg, _arguments || [])).next());\n });\n };\n var __generator3 = exports3 && exports3.__generator || function(thisArg, body) {\n var _2 = { label: 0, sent: function() {\n if (t3[0] & 1)\n throw t3[1];\n return t3[1];\n }, trys: [], ops: [] }, f6, y6, t3, g4;\n return g4 = { next: verb(0), \"throw\": verb(1), \"return\": verb(2) }, typeof Symbol === \"function\" && (g4[Symbol.iterator] = function() {\n return this;\n }), g4;\n function verb(n2) {\n return function(v2) {\n return step([n2, v2]);\n };\n }\n function step(op) {\n if (f6)\n throw new TypeError(\"Generator is already executing.\");\n while (_2)\n try {\n if (f6 = 1, y6 && (t3 = op[0] & 2 ? y6[\"return\"] : op[0] ? y6[\"throw\"] || ((t3 = y6[\"return\"]) && t3.call(y6), 0) : y6.next) && !(t3 = t3.call(y6, op[1])).done)\n return t3;\n if (y6 = 0, t3)\n op = [op[0] & 2, t3.value];\n switch (op[0]) {\n case 0:\n case 1:\n t3 = op;\n break;\n case 4:\n _2.label++;\n return { value: op[1], done: false };\n case 5:\n _2.label++;\n y6 = op[1];\n op = [0];\n continue;\n case 7:\n op = _2.ops.pop();\n _2.trys.pop();\n continue;\n default:\n if (!(t3 = _2.trys, t3 = t3.length > 0 && t3[t3.length - 1]) && (op[0] === 6 || op[0] === 2)) {\n _2 = 0;\n continue;\n }\n if (op[0] === 3 && (!t3 || op[1] > t3[0] && op[1] < t3[3])) {\n _2.label = op[1];\n break;\n }\n if (op[0] === 6 && _2.label < t3[1]) {\n _2.label = t3[1];\n t3 = op;\n break;\n }\n if (t3 && _2.label < t3[2]) {\n _2.label = t3[2];\n _2.ops.push(op);\n break;\n }\n if (t3[2])\n _2.ops.pop();\n _2.trys.pop();\n continue;\n }\n op = body.call(thisArg, _2);\n } catch (e3) {\n op = [6, e3];\n y6 = 0;\n } finally {\n f6 = t3 = 0;\n }\n if (op[0] & 5)\n throw op[1];\n return { value: op[0] ? op[1] : void 0, done: true };\n }\n };\n Object.defineProperty(exports3, \"__esModule\", { value: true });\n exports3.EtherscanProvider = void 0;\n var bytes_1 = require_lib2();\n var properties_1 = require_lib4();\n var transactions_1 = require_lib17();\n var web_1 = require_lib28();\n var formatter_1 = require_formatter();\n var logger_1 = require_lib();\n var _version_1 = require_version23();\n var logger = new logger_1.Logger(_version_1.version);\n var base_provider_1 = require_base_provider();\n function getTransactionPostData(transaction) {\n var result = {};\n for (var key in transaction) {\n if (transaction[key] == null) {\n continue;\n }\n var value = transaction[key];\n if (key === \"type\" && value === 0) {\n continue;\n }\n if ({ type: true, gasLimit: true, gasPrice: true, maxFeePerGs: true, maxPriorityFeePerGas: true, nonce: true, value: true }[key]) {\n value = (0, bytes_1.hexValue)((0, bytes_1.hexlify)(value));\n } else if (key === \"accessList\") {\n value = \"[\" + (0, transactions_1.accessListify)(value).map(function(set) {\n return '{address:\"' + set.address + '\",storageKeys:[\"' + set.storageKeys.join('\",\"') + '\"]}';\n }).join(\",\") + \"]\";\n } else {\n value = (0, bytes_1.hexlify)(value);\n }\n result[key] = value;\n }\n return result;\n }\n function getResult(result) {\n if (result.status == 0 && (result.message === \"No records found\" || result.message === \"No transactions found\")) {\n return result.result;\n }\n if (result.status != 1 || typeof result.message !== \"string\" || !result.message.match(/^OK/)) {\n var error = new Error(\"invalid response\");\n error.result = JSON.stringify(result);\n if ((result.result || \"\").toLowerCase().indexOf(\"rate limit\") >= 0) {\n error.throttleRetry = true;\n }\n throw error;\n }\n return result.result;\n }\n function getJsonResult(result) {\n if (result && result.status == 0 && result.message == \"NOTOK\" && (result.result || \"\").toLowerCase().indexOf(\"rate limit\") >= 0) {\n var error = new Error(\"throttled response\");\n error.result = JSON.stringify(result);\n error.throttleRetry = true;\n throw error;\n }\n if (result.jsonrpc != \"2.0\") {\n var error = new Error(\"invalid response\");\n error.result = JSON.stringify(result);\n throw error;\n }\n if (result.error) {\n var error = new Error(result.error.message || \"unknown error\");\n if (result.error.code) {\n error.code = result.error.code;\n }\n if (result.error.data) {\n error.data = result.error.data;\n }\n throw error;\n }\n return result.result;\n }\n function checkLogTag(blockTag) {\n if (blockTag === \"pending\") {\n throw new Error(\"pending not supported\");\n }\n if (blockTag === \"latest\") {\n return blockTag;\n }\n return parseInt(blockTag.substring(2), 16);\n }\n function checkError(method, error, transaction) {\n if (method === \"call\" && error.code === logger_1.Logger.errors.SERVER_ERROR) {\n var e3 = error.error;\n if (e3 && (e3.message.match(/reverted/i) || e3.message.match(/VM execution error/i))) {\n var data = e3.data;\n if (data) {\n data = \"0x\" + data.replace(/^.*0x/i, \"\");\n }\n if ((0, bytes_1.isHexString)(data)) {\n return data;\n }\n logger.throwError(\"missing revert data in call exception\", logger_1.Logger.errors.CALL_EXCEPTION, {\n error,\n data: \"0x\"\n });\n }\n }\n var message = error.message;\n if (error.code === logger_1.Logger.errors.SERVER_ERROR) {\n if (error.error && typeof error.error.message === \"string\") {\n message = error.error.message;\n } else if (typeof error.body === \"string\") {\n message = error.body;\n } else if (typeof error.responseText === \"string\") {\n message = error.responseText;\n }\n }\n message = (message || \"\").toLowerCase();\n if (message.match(/insufficient funds/)) {\n logger.throwError(\"insufficient funds for intrinsic transaction cost\", logger_1.Logger.errors.INSUFFICIENT_FUNDS, {\n error,\n method,\n transaction\n });\n }\n if (message.match(/same hash was already imported|transaction nonce is too low|nonce too low/)) {\n logger.throwError(\"nonce has already been used\", logger_1.Logger.errors.NONCE_EXPIRED, {\n error,\n method,\n transaction\n });\n }\n if (message.match(/another transaction with same nonce/)) {\n logger.throwError(\"replacement fee too low\", logger_1.Logger.errors.REPLACEMENT_UNDERPRICED, {\n error,\n method,\n transaction\n });\n }\n if (message.match(/execution failed due to an exception|execution reverted/)) {\n logger.throwError(\"cannot estimate gas; transaction may fail or may require manual gas limit\", logger_1.Logger.errors.UNPREDICTABLE_GAS_LIMIT, {\n error,\n method,\n transaction\n });\n }\n throw error;\n }\n var EtherscanProvider = (\n /** @class */\n function(_super) {\n __extends3(EtherscanProvider2, _super);\n function EtherscanProvider2(network, apiKey) {\n var _this = _super.call(this, network) || this;\n (0, properties_1.defineReadOnly)(_this, \"baseUrl\", _this.getBaseUrl());\n (0, properties_1.defineReadOnly)(_this, \"apiKey\", apiKey || null);\n return _this;\n }\n EtherscanProvider2.prototype.getBaseUrl = function() {\n switch (this.network ? this.network.name : \"invalid\") {\n case \"homestead\":\n return \"https://api.etherscan.io\";\n case \"goerli\":\n return \"https://api-goerli.etherscan.io\";\n case \"sepolia\":\n return \"https://api-sepolia.etherscan.io\";\n case \"matic\":\n return \"https://api.polygonscan.com\";\n case \"maticmum\":\n return \"https://api-testnet.polygonscan.com\";\n case \"arbitrum\":\n return \"https://api.arbiscan.io\";\n case \"arbitrum-goerli\":\n return \"https://api-goerli.arbiscan.io\";\n case \"optimism\":\n return \"https://api-optimistic.etherscan.io\";\n case \"optimism-goerli\":\n return \"https://api-goerli-optimistic.etherscan.io\";\n default:\n }\n return logger.throwArgumentError(\"unsupported network\", \"network\", this.network.name);\n };\n EtherscanProvider2.prototype.getUrl = function(module2, params) {\n var query = Object.keys(params).reduce(function(accum, key) {\n var value = params[key];\n if (value != null) {\n accum += \"&\" + key + \"=\" + value;\n }\n return accum;\n }, \"\");\n var apiKey = this.apiKey ? \"&apikey=\" + this.apiKey : \"\";\n return this.baseUrl + \"/api?module=\" + module2 + query + apiKey;\n };\n EtherscanProvider2.prototype.getPostUrl = function() {\n return this.baseUrl + \"/api\";\n };\n EtherscanProvider2.prototype.getPostData = function(module2, params) {\n params.module = module2;\n params.apikey = this.apiKey;\n return params;\n };\n EtherscanProvider2.prototype.fetch = function(module2, params, post) {\n return __awaiter3(this, void 0, void 0, function() {\n var url, payload, procFunc, connection, payloadStr, result;\n var _this = this;\n return __generator3(this, function(_a) {\n switch (_a.label) {\n case 0:\n url = post ? this.getPostUrl() : this.getUrl(module2, params);\n payload = post ? this.getPostData(module2, params) : null;\n procFunc = module2 === \"proxy\" ? getJsonResult : getResult;\n this.emit(\"debug\", {\n action: \"request\",\n request: url,\n provider: this\n });\n connection = {\n url,\n throttleSlotInterval: 1e3,\n throttleCallback: function(attempt, url2) {\n if (_this.isCommunityResource()) {\n (0, formatter_1.showThrottleMessage)();\n }\n return Promise.resolve(true);\n }\n };\n payloadStr = null;\n if (payload) {\n connection.headers = { \"content-type\": \"application/x-www-form-urlencoded; charset=UTF-8\" };\n payloadStr = Object.keys(payload).map(function(key) {\n return key + \"=\" + payload[key];\n }).join(\"&\");\n }\n return [4, (0, web_1.fetchJson)(connection, payloadStr, procFunc || getJsonResult)];\n case 1:\n result = _a.sent();\n this.emit(\"debug\", {\n action: \"response\",\n request: url,\n response: (0, properties_1.deepCopy)(result),\n provider: this\n });\n return [2, result];\n }\n });\n });\n };\n EtherscanProvider2.prototype.detectNetwork = function() {\n return __awaiter3(this, void 0, void 0, function() {\n return __generator3(this, function(_a) {\n return [2, this.network];\n });\n });\n };\n EtherscanProvider2.prototype.perform = function(method, params) {\n return __awaiter3(this, void 0, void 0, function() {\n var _a, postData, error_1, postData, error_2, args, topic0, logs, blocks, i3, log, block, _b;\n return __generator3(this, function(_c) {\n switch (_c.label) {\n case 0:\n _a = method;\n switch (_a) {\n case \"getBlockNumber\":\n return [3, 1];\n case \"getGasPrice\":\n return [3, 2];\n case \"getBalance\":\n return [3, 3];\n case \"getTransactionCount\":\n return [3, 4];\n case \"getCode\":\n return [3, 5];\n case \"getStorageAt\":\n return [3, 6];\n case \"sendTransaction\":\n return [3, 7];\n case \"getBlock\":\n return [3, 8];\n case \"getTransaction\":\n return [3, 9];\n case \"getTransactionReceipt\":\n return [3, 10];\n case \"call\":\n return [3, 11];\n case \"estimateGas\":\n return [3, 15];\n case \"getLogs\":\n return [3, 19];\n case \"getEtherPrice\":\n return [3, 26];\n }\n return [3, 28];\n case 1:\n return [2, this.fetch(\"proxy\", { action: \"eth_blockNumber\" })];\n case 2:\n return [2, this.fetch(\"proxy\", { action: \"eth_gasPrice\" })];\n case 3:\n return [2, this.fetch(\"account\", {\n action: \"balance\",\n address: params.address,\n tag: params.blockTag\n })];\n case 4:\n return [2, this.fetch(\"proxy\", {\n action: \"eth_getTransactionCount\",\n address: params.address,\n tag: params.blockTag\n })];\n case 5:\n return [2, this.fetch(\"proxy\", {\n action: \"eth_getCode\",\n address: params.address,\n tag: params.blockTag\n })];\n case 6:\n return [2, this.fetch(\"proxy\", {\n action: \"eth_getStorageAt\",\n address: params.address,\n position: params.position,\n tag: params.blockTag\n })];\n case 7:\n return [2, this.fetch(\"proxy\", {\n action: \"eth_sendRawTransaction\",\n hex: params.signedTransaction\n }, true).catch(function(error) {\n return checkError(\"sendTransaction\", error, params.signedTransaction);\n })];\n case 8:\n if (params.blockTag) {\n return [2, this.fetch(\"proxy\", {\n action: \"eth_getBlockByNumber\",\n tag: params.blockTag,\n boolean: params.includeTransactions ? \"true\" : \"false\"\n })];\n }\n throw new Error(\"getBlock by blockHash not implemented\");\n case 9:\n return [2, this.fetch(\"proxy\", {\n action: \"eth_getTransactionByHash\",\n txhash: params.transactionHash\n })];\n case 10:\n return [2, this.fetch(\"proxy\", {\n action: \"eth_getTransactionReceipt\",\n txhash: params.transactionHash\n })];\n case 11:\n if (params.blockTag !== \"latest\") {\n throw new Error(\"EtherscanProvider does not support blockTag for call\");\n }\n postData = getTransactionPostData(params.transaction);\n postData.module = \"proxy\";\n postData.action = \"eth_call\";\n _c.label = 12;\n case 12:\n _c.trys.push([12, 14, , 15]);\n return [4, this.fetch(\"proxy\", postData, true)];\n case 13:\n return [2, _c.sent()];\n case 14:\n error_1 = _c.sent();\n return [2, checkError(\"call\", error_1, params.transaction)];\n case 15:\n postData = getTransactionPostData(params.transaction);\n postData.module = \"proxy\";\n postData.action = \"eth_estimateGas\";\n _c.label = 16;\n case 16:\n _c.trys.push([16, 18, , 19]);\n return [4, this.fetch(\"proxy\", postData, true)];\n case 17:\n return [2, _c.sent()];\n case 18:\n error_2 = _c.sent();\n return [2, checkError(\"estimateGas\", error_2, params.transaction)];\n case 19:\n args = { action: \"getLogs\" };\n if (params.filter.fromBlock) {\n args.fromBlock = checkLogTag(params.filter.fromBlock);\n }\n if (params.filter.toBlock) {\n args.toBlock = checkLogTag(params.filter.toBlock);\n }\n if (params.filter.address) {\n args.address = params.filter.address;\n }\n if (params.filter.topics && params.filter.topics.length > 0) {\n if (params.filter.topics.length > 1) {\n logger.throwError(\"unsupported topic count\", logger_1.Logger.errors.UNSUPPORTED_OPERATION, { topics: params.filter.topics });\n }\n if (params.filter.topics.length === 1) {\n topic0 = params.filter.topics[0];\n if (typeof topic0 !== \"string\" || topic0.length !== 66) {\n logger.throwError(\"unsupported topic format\", logger_1.Logger.errors.UNSUPPORTED_OPERATION, { topic0 });\n }\n args.topic0 = topic0;\n }\n }\n return [4, this.fetch(\"logs\", args)];\n case 20:\n logs = _c.sent();\n blocks = {};\n i3 = 0;\n _c.label = 21;\n case 21:\n if (!(i3 < logs.length))\n return [3, 25];\n log = logs[i3];\n if (log.blockHash != null) {\n return [3, 24];\n }\n if (!(blocks[log.blockNumber] == null))\n return [3, 23];\n return [4, this.getBlock(log.blockNumber)];\n case 22:\n block = _c.sent();\n if (block) {\n blocks[log.blockNumber] = block.hash;\n }\n _c.label = 23;\n case 23:\n log.blockHash = blocks[log.blockNumber];\n _c.label = 24;\n case 24:\n i3++;\n return [3, 21];\n case 25:\n return [2, logs];\n case 26:\n if (this.network.name !== \"homestead\") {\n return [2, 0];\n }\n _b = parseFloat;\n return [4, this.fetch(\"stats\", { action: \"ethprice\" })];\n case 27:\n return [2, _b.apply(void 0, [_c.sent().ethusd])];\n case 28:\n return [3, 29];\n case 29:\n return [2, _super.prototype.perform.call(this, method, params)];\n }\n });\n });\n };\n EtherscanProvider2.prototype.getHistory = function(addressOrName, startBlock, endBlock) {\n return __awaiter3(this, void 0, void 0, function() {\n var params, result;\n var _a;\n var _this = this;\n return __generator3(this, function(_b) {\n switch (_b.label) {\n case 0:\n _a = {\n action: \"txlist\"\n };\n return [4, this.resolveName(addressOrName)];\n case 1:\n params = (_a.address = _b.sent(), _a.startblock = startBlock == null ? 0 : startBlock, _a.endblock = endBlock == null ? 99999999 : endBlock, _a.sort = \"asc\", _a);\n return [4, this.fetch(\"account\", params)];\n case 2:\n result = _b.sent();\n return [2, result.map(function(tx) {\n [\"contractAddress\", \"to\"].forEach(function(key) {\n if (tx[key] == \"\") {\n delete tx[key];\n }\n });\n if (tx.creates == null && tx.contractAddress != null) {\n tx.creates = tx.contractAddress;\n }\n var item = _this.formatter.transactionResponse(tx);\n if (tx.timeStamp) {\n item.timestamp = parseInt(tx.timeStamp);\n }\n return item;\n })];\n }\n });\n });\n };\n EtherscanProvider2.prototype.isCommunityResource = function() {\n return this.apiKey == null;\n };\n return EtherscanProvider2;\n }(base_provider_1.BaseProvider)\n );\n exports3.EtherscanProvider = EtherscanProvider;\n }\n });\n\n // ../../../node_modules/.pnpm/@ethersproject+providers@5.8.0_bufferutil@4.0.9_utf-8-validate@5.0.10/node_modules/@ethersproject/providers/lib/fallback-provider.js\n var require_fallback_provider = __commonJS({\n \"../../../node_modules/.pnpm/@ethersproject+providers@5.8.0_bufferutil@4.0.9_utf-8-validate@5.0.10/node_modules/@ethersproject/providers/lib/fallback-provider.js\"(exports3) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n var __extends3 = exports3 && exports3.__extends || /* @__PURE__ */ function() {\n var extendStatics3 = function(d5, b4) {\n extendStatics3 = Object.setPrototypeOf || { __proto__: [] } instanceof Array && function(d6, b5) {\n d6.__proto__ = b5;\n } || function(d6, b5) {\n for (var p4 in b5)\n if (Object.prototype.hasOwnProperty.call(b5, p4))\n d6[p4] = b5[p4];\n };\n return extendStatics3(d5, b4);\n };\n return function(d5, b4) {\n if (typeof b4 !== \"function\" && b4 !== null)\n throw new TypeError(\"Class extends value \" + String(b4) + \" is not a constructor or null\");\n extendStatics3(d5, b4);\n function __() {\n this.constructor = d5;\n }\n d5.prototype = b4 === null ? Object.create(b4) : (__.prototype = b4.prototype, new __());\n };\n }();\n var __awaiter3 = exports3 && exports3.__awaiter || function(thisArg, _arguments, P2, generator) {\n function adopt(value) {\n return value instanceof P2 ? value : new P2(function(resolve) {\n resolve(value);\n });\n }\n return new (P2 || (P2 = Promise))(function(resolve, reject) {\n function fulfilled(value) {\n try {\n step(generator.next(value));\n } catch (e3) {\n reject(e3);\n }\n }\n function rejected(value) {\n try {\n step(generator[\"throw\"](value));\n } catch (e3) {\n reject(e3);\n }\n }\n function step(result) {\n result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected);\n }\n step((generator = generator.apply(thisArg, _arguments || [])).next());\n });\n };\n var __generator3 = exports3 && exports3.__generator || function(thisArg, body) {\n var _2 = { label: 0, sent: function() {\n if (t3[0] & 1)\n throw t3[1];\n return t3[1];\n }, trys: [], ops: [] }, f6, y6, t3, g4;\n return g4 = { next: verb(0), \"throw\": verb(1), \"return\": verb(2) }, typeof Symbol === \"function\" && (g4[Symbol.iterator] = function() {\n return this;\n }), g4;\n function verb(n2) {\n return function(v2) {\n return step([n2, v2]);\n };\n }\n function step(op) {\n if (f6)\n throw new TypeError(\"Generator is already executing.\");\n while (_2)\n try {\n if (f6 = 1, y6 && (t3 = op[0] & 2 ? y6[\"return\"] : op[0] ? y6[\"throw\"] || ((t3 = y6[\"return\"]) && t3.call(y6), 0) : y6.next) && !(t3 = t3.call(y6, op[1])).done)\n return t3;\n if (y6 = 0, t3)\n op = [op[0] & 2, t3.value];\n switch (op[0]) {\n case 0:\n case 1:\n t3 = op;\n break;\n case 4:\n _2.label++;\n return { value: op[1], done: false };\n case 5:\n _2.label++;\n y6 = op[1];\n op = [0];\n continue;\n case 7:\n op = _2.ops.pop();\n _2.trys.pop();\n continue;\n default:\n if (!(t3 = _2.trys, t3 = t3.length > 0 && t3[t3.length - 1]) && (op[0] === 6 || op[0] === 2)) {\n _2 = 0;\n continue;\n }\n if (op[0] === 3 && (!t3 || op[1] > t3[0] && op[1] < t3[3])) {\n _2.label = op[1];\n break;\n }\n if (op[0] === 6 && _2.label < t3[1]) {\n _2.label = t3[1];\n t3 = op;\n break;\n }\n if (t3 && _2.label < t3[2]) {\n _2.label = t3[2];\n _2.ops.push(op);\n break;\n }\n if (t3[2])\n _2.ops.pop();\n _2.trys.pop();\n continue;\n }\n op = body.call(thisArg, _2);\n } catch (e3) {\n op = [6, e3];\n y6 = 0;\n } finally {\n f6 = t3 = 0;\n }\n if (op[0] & 5)\n throw op[1];\n return { value: op[0] ? op[1] : void 0, done: true };\n }\n };\n Object.defineProperty(exports3, \"__esModule\", { value: true });\n exports3.FallbackProvider = void 0;\n var abstract_provider_1 = require_lib14();\n var bignumber_1 = require_lib3();\n var bytes_1 = require_lib2();\n var properties_1 = require_lib4();\n var random_1 = require_lib24();\n var web_1 = require_lib28();\n var base_provider_1 = require_base_provider();\n var formatter_1 = require_formatter();\n var logger_1 = require_lib();\n var _version_1 = require_version23();\n var logger = new logger_1.Logger(_version_1.version);\n function now() {\n return (/* @__PURE__ */ new Date()).getTime();\n }\n function checkNetworks(networks) {\n var result = null;\n for (var i3 = 0; i3 < networks.length; i3++) {\n var network = networks[i3];\n if (network == null) {\n return null;\n }\n if (result) {\n if (!(result.name === network.name && result.chainId === network.chainId && (result.ensAddress === network.ensAddress || result.ensAddress == null && network.ensAddress == null))) {\n logger.throwArgumentError(\"provider mismatch\", \"networks\", networks);\n }\n } else {\n result = network;\n }\n }\n return result;\n }\n function median(values, maxDelta) {\n values = values.slice().sort();\n var middle = Math.floor(values.length / 2);\n if (values.length % 2) {\n return values[middle];\n }\n var a3 = values[middle - 1], b4 = values[middle];\n if (maxDelta != null && Math.abs(a3 - b4) > maxDelta) {\n return null;\n }\n return (a3 + b4) / 2;\n }\n function serialize(value) {\n if (value === null) {\n return \"null\";\n } else if (typeof value === \"number\" || typeof value === \"boolean\") {\n return JSON.stringify(value);\n } else if (typeof value === \"string\") {\n return value;\n } else if (bignumber_1.BigNumber.isBigNumber(value)) {\n return value.toString();\n } else if (Array.isArray(value)) {\n return JSON.stringify(value.map(function(i3) {\n return serialize(i3);\n }));\n } else if (typeof value === \"object\") {\n var keys = Object.keys(value);\n keys.sort();\n return \"{\" + keys.map(function(key) {\n var v2 = value[key];\n if (typeof v2 === \"function\") {\n v2 = \"[function]\";\n } else {\n v2 = serialize(v2);\n }\n return JSON.stringify(key) + \":\" + v2;\n }).join(\",\") + \"}\";\n }\n throw new Error(\"unknown value type: \" + typeof value);\n }\n var nextRid = 1;\n function stall(duration) {\n var cancel2 = null;\n var timer = null;\n var promise = new Promise(function(resolve) {\n cancel2 = function() {\n if (timer) {\n clearTimeout(timer);\n timer = null;\n }\n resolve();\n };\n timer = setTimeout(cancel2, duration);\n });\n var wait2 = function(func) {\n promise = promise.then(func);\n return promise;\n };\n function getPromise() {\n return promise;\n }\n return { cancel: cancel2, getPromise, wait: wait2 };\n }\n var ForwardErrors = [\n logger_1.Logger.errors.CALL_EXCEPTION,\n logger_1.Logger.errors.INSUFFICIENT_FUNDS,\n logger_1.Logger.errors.NONCE_EXPIRED,\n logger_1.Logger.errors.REPLACEMENT_UNDERPRICED,\n logger_1.Logger.errors.UNPREDICTABLE_GAS_LIMIT\n ];\n var ForwardProperties = [\n \"address\",\n \"args\",\n \"errorArgs\",\n \"errorSignature\",\n \"method\",\n \"transaction\"\n ];\n function exposeDebugConfig(config2, now2) {\n var result = {\n weight: config2.weight\n };\n Object.defineProperty(result, \"provider\", { get: function() {\n return config2.provider;\n } });\n if (config2.start) {\n result.start = config2.start;\n }\n if (now2) {\n result.duration = now2 - config2.start;\n }\n if (config2.done) {\n if (config2.error) {\n result.error = config2.error;\n } else {\n result.result = config2.result || null;\n }\n }\n return result;\n }\n function normalizedTally(normalize2, quorum) {\n return function(configs) {\n var tally = {};\n configs.forEach(function(c4) {\n var value = normalize2(c4.result);\n if (!tally[value]) {\n tally[value] = { count: 0, result: c4.result };\n }\n tally[value].count++;\n });\n var keys = Object.keys(tally);\n for (var i3 = 0; i3 < keys.length; i3++) {\n var check = tally[keys[i3]];\n if (check.count >= quorum) {\n return check.result;\n }\n }\n return void 0;\n };\n }\n function getProcessFunc(provider, method, params) {\n var normalize2 = serialize;\n switch (method) {\n case \"getBlockNumber\":\n return function(configs) {\n var values = configs.map(function(c4) {\n return c4.result;\n });\n var blockNumber = median(configs.map(function(c4) {\n return c4.result;\n }), 2);\n if (blockNumber == null) {\n return void 0;\n }\n blockNumber = Math.ceil(blockNumber);\n if (values.indexOf(blockNumber + 1) >= 0) {\n blockNumber++;\n }\n if (blockNumber >= provider._highestBlockNumber) {\n provider._highestBlockNumber = blockNumber;\n }\n return provider._highestBlockNumber;\n };\n case \"getGasPrice\":\n return function(configs) {\n var values = configs.map(function(c4) {\n return c4.result;\n });\n values.sort();\n return values[Math.floor(values.length / 2)];\n };\n case \"getEtherPrice\":\n return function(configs) {\n return median(configs.map(function(c4) {\n return c4.result;\n }));\n };\n case \"getBalance\":\n case \"getTransactionCount\":\n case \"getCode\":\n case \"getStorageAt\":\n case \"call\":\n case \"estimateGas\":\n case \"getLogs\":\n break;\n case \"getTransaction\":\n case \"getTransactionReceipt\":\n normalize2 = function(tx) {\n if (tx == null) {\n return null;\n }\n tx = (0, properties_1.shallowCopy)(tx);\n tx.confirmations = -1;\n return serialize(tx);\n };\n break;\n case \"getBlock\":\n if (params.includeTransactions) {\n normalize2 = function(block) {\n if (block == null) {\n return null;\n }\n block = (0, properties_1.shallowCopy)(block);\n block.transactions = block.transactions.map(function(tx) {\n tx = (0, properties_1.shallowCopy)(tx);\n tx.confirmations = -1;\n return tx;\n });\n return serialize(block);\n };\n } else {\n normalize2 = function(block) {\n if (block == null) {\n return null;\n }\n return serialize(block);\n };\n }\n break;\n default:\n throw new Error(\"unknown method: \" + method);\n }\n return normalizedTally(normalize2, provider.quorum);\n }\n function waitForSync(config2, blockNumber) {\n return __awaiter3(this, void 0, void 0, function() {\n var provider;\n return __generator3(this, function(_a) {\n provider = config2.provider;\n if (provider.blockNumber != null && provider.blockNumber >= blockNumber || blockNumber === -1) {\n return [2, provider];\n }\n return [2, (0, web_1.poll)(function() {\n return new Promise(function(resolve, reject) {\n setTimeout(function() {\n if (provider.blockNumber >= blockNumber) {\n return resolve(provider);\n }\n if (config2.cancelled) {\n return resolve(null);\n }\n return resolve(void 0);\n }, 0);\n });\n }, { oncePoll: provider })];\n });\n });\n }\n function getRunner(config2, currentBlockNumber, method, params) {\n return __awaiter3(this, void 0, void 0, function() {\n var provider, _a, filter;\n return __generator3(this, function(_b) {\n switch (_b.label) {\n case 0:\n provider = config2.provider;\n _a = method;\n switch (_a) {\n case \"getBlockNumber\":\n return [3, 1];\n case \"getGasPrice\":\n return [3, 1];\n case \"getEtherPrice\":\n return [3, 2];\n case \"getBalance\":\n return [3, 3];\n case \"getTransactionCount\":\n return [3, 3];\n case \"getCode\":\n return [3, 3];\n case \"getStorageAt\":\n return [3, 6];\n case \"getBlock\":\n return [3, 9];\n case \"call\":\n return [3, 12];\n case \"estimateGas\":\n return [3, 12];\n case \"getTransaction\":\n return [3, 15];\n case \"getTransactionReceipt\":\n return [3, 15];\n case \"getLogs\":\n return [3, 16];\n }\n return [3, 19];\n case 1:\n return [2, provider[method]()];\n case 2:\n if (provider.getEtherPrice) {\n return [2, provider.getEtherPrice()];\n }\n return [3, 19];\n case 3:\n if (!(params.blockTag && (0, bytes_1.isHexString)(params.blockTag)))\n return [3, 5];\n return [4, waitForSync(config2, currentBlockNumber)];\n case 4:\n provider = _b.sent();\n _b.label = 5;\n case 5:\n return [2, provider[method](params.address, params.blockTag || \"latest\")];\n case 6:\n if (!(params.blockTag && (0, bytes_1.isHexString)(params.blockTag)))\n return [3, 8];\n return [4, waitForSync(config2, currentBlockNumber)];\n case 7:\n provider = _b.sent();\n _b.label = 8;\n case 8:\n return [2, provider.getStorageAt(params.address, params.position, params.blockTag || \"latest\")];\n case 9:\n if (!(params.blockTag && (0, bytes_1.isHexString)(params.blockTag)))\n return [3, 11];\n return [4, waitForSync(config2, currentBlockNumber)];\n case 10:\n provider = _b.sent();\n _b.label = 11;\n case 11:\n return [2, provider[params.includeTransactions ? \"getBlockWithTransactions\" : \"getBlock\"](params.blockTag || params.blockHash)];\n case 12:\n if (!(params.blockTag && (0, bytes_1.isHexString)(params.blockTag)))\n return [3, 14];\n return [4, waitForSync(config2, currentBlockNumber)];\n case 13:\n provider = _b.sent();\n _b.label = 14;\n case 14:\n if (method === \"call\" && params.blockTag) {\n return [2, provider[method](params.transaction, params.blockTag)];\n }\n return [2, provider[method](params.transaction)];\n case 15:\n return [2, provider[method](params.transactionHash)];\n case 16:\n filter = params.filter;\n if (!(filter.fromBlock && (0, bytes_1.isHexString)(filter.fromBlock) || filter.toBlock && (0, bytes_1.isHexString)(filter.toBlock)))\n return [3, 18];\n return [4, waitForSync(config2, currentBlockNumber)];\n case 17:\n provider = _b.sent();\n _b.label = 18;\n case 18:\n return [2, provider.getLogs(filter)];\n case 19:\n return [2, logger.throwError(\"unknown method error\", logger_1.Logger.errors.UNKNOWN_ERROR, {\n method,\n params\n })];\n }\n });\n });\n }\n var FallbackProvider = (\n /** @class */\n function(_super) {\n __extends3(FallbackProvider2, _super);\n function FallbackProvider2(providers, quorum) {\n var _this = this;\n if (providers.length === 0) {\n logger.throwArgumentError(\"missing providers\", \"providers\", providers);\n }\n var providerConfigs = providers.map(function(configOrProvider, index2) {\n if (abstract_provider_1.Provider.isProvider(configOrProvider)) {\n var stallTimeout = (0, formatter_1.isCommunityResource)(configOrProvider) ? 2e3 : 750;\n var priority = 1;\n return Object.freeze({ provider: configOrProvider, weight: 1, stallTimeout, priority });\n }\n var config2 = (0, properties_1.shallowCopy)(configOrProvider);\n if (config2.priority == null) {\n config2.priority = 1;\n }\n if (config2.stallTimeout == null) {\n config2.stallTimeout = (0, formatter_1.isCommunityResource)(configOrProvider) ? 2e3 : 750;\n }\n if (config2.weight == null) {\n config2.weight = 1;\n }\n var weight = config2.weight;\n if (weight % 1 || weight > 512 || weight < 1) {\n logger.throwArgumentError(\"invalid weight; must be integer in [1, 512]\", \"providers[\" + index2 + \"].weight\", weight);\n }\n return Object.freeze(config2);\n });\n var total = providerConfigs.reduce(function(accum, c4) {\n return accum + c4.weight;\n }, 0);\n if (quorum == null) {\n quorum = total / 2;\n } else if (quorum > total) {\n logger.throwArgumentError(\"quorum will always fail; larger than total weight\", \"quorum\", quorum);\n }\n var networkOrReady = checkNetworks(providerConfigs.map(function(c4) {\n return c4.provider.network;\n }));\n if (networkOrReady == null) {\n networkOrReady = new Promise(function(resolve, reject) {\n setTimeout(function() {\n _this.detectNetwork().then(resolve, reject);\n }, 0);\n });\n }\n _this = _super.call(this, networkOrReady) || this;\n (0, properties_1.defineReadOnly)(_this, \"providerConfigs\", Object.freeze(providerConfigs));\n (0, properties_1.defineReadOnly)(_this, \"quorum\", quorum);\n _this._highestBlockNumber = -1;\n return _this;\n }\n FallbackProvider2.prototype.detectNetwork = function() {\n return __awaiter3(this, void 0, void 0, function() {\n var networks;\n return __generator3(this, function(_a) {\n switch (_a.label) {\n case 0:\n return [4, Promise.all(this.providerConfigs.map(function(c4) {\n return c4.provider.getNetwork();\n }))];\n case 1:\n networks = _a.sent();\n return [2, checkNetworks(networks)];\n }\n });\n });\n };\n FallbackProvider2.prototype.perform = function(method, params) {\n return __awaiter3(this, void 0, void 0, function() {\n var results, i_1, result, processFunc, configs, currentBlockNumber, i3, first, _loop_1, this_1, state_1;\n var _this = this;\n return __generator3(this, function(_a) {\n switch (_a.label) {\n case 0:\n if (!(method === \"sendTransaction\"))\n return [3, 2];\n return [4, Promise.all(this.providerConfigs.map(function(c4) {\n return c4.provider.sendTransaction(params.signedTransaction).then(function(result2) {\n return result2.hash;\n }, function(error) {\n return error;\n });\n }))];\n case 1:\n results = _a.sent();\n for (i_1 = 0; i_1 < results.length; i_1++) {\n result = results[i_1];\n if (typeof result === \"string\") {\n return [2, result];\n }\n }\n throw results[0];\n case 2:\n if (!(this._highestBlockNumber === -1 && method !== \"getBlockNumber\"))\n return [3, 4];\n return [4, this.getBlockNumber()];\n case 3:\n _a.sent();\n _a.label = 4;\n case 4:\n processFunc = getProcessFunc(this, method, params);\n configs = (0, random_1.shuffled)(this.providerConfigs.map(properties_1.shallowCopy));\n configs.sort(function(a3, b4) {\n return a3.priority - b4.priority;\n });\n currentBlockNumber = this._highestBlockNumber;\n i3 = 0;\n first = true;\n _loop_1 = function() {\n var t0, inflightWeight, _loop_2, waiting, results2, result2, errors;\n return __generator3(this, function(_b) {\n switch (_b.label) {\n case 0:\n t0 = now();\n inflightWeight = configs.filter(function(c4) {\n return c4.runner && t0 - c4.start < c4.stallTimeout;\n }).reduce(function(accum, c4) {\n return accum + c4.weight;\n }, 0);\n _loop_2 = function() {\n var config2 = configs[i3++];\n var rid = nextRid++;\n config2.start = now();\n config2.staller = stall(config2.stallTimeout);\n config2.staller.wait(function() {\n config2.staller = null;\n });\n config2.runner = getRunner(config2, currentBlockNumber, method, params).then(function(result3) {\n config2.done = true;\n config2.result = result3;\n if (_this.listenerCount(\"debug\")) {\n _this.emit(\"debug\", {\n action: \"request\",\n rid,\n backend: exposeDebugConfig(config2, now()),\n request: { method, params: (0, properties_1.deepCopy)(params) },\n provider: _this\n });\n }\n }, function(error) {\n config2.done = true;\n config2.error = error;\n if (_this.listenerCount(\"debug\")) {\n _this.emit(\"debug\", {\n action: \"request\",\n rid,\n backend: exposeDebugConfig(config2, now()),\n request: { method, params: (0, properties_1.deepCopy)(params) },\n provider: _this\n });\n }\n });\n if (this_1.listenerCount(\"debug\")) {\n this_1.emit(\"debug\", {\n action: \"request\",\n rid,\n backend: exposeDebugConfig(config2, null),\n request: { method, params: (0, properties_1.deepCopy)(params) },\n provider: this_1\n });\n }\n inflightWeight += config2.weight;\n };\n while (inflightWeight < this_1.quorum && i3 < configs.length) {\n _loop_2();\n }\n waiting = [];\n configs.forEach(function(c4) {\n if (c4.done || !c4.runner) {\n return;\n }\n waiting.push(c4.runner);\n if (c4.staller) {\n waiting.push(c4.staller.getPromise());\n }\n });\n if (!waiting.length)\n return [3, 2];\n return [4, Promise.race(waiting)];\n case 1:\n _b.sent();\n _b.label = 2;\n case 2:\n results2 = configs.filter(function(c4) {\n return c4.done && c4.error == null;\n });\n if (!(results2.length >= this_1.quorum))\n return [3, 5];\n result2 = processFunc(results2);\n if (result2 !== void 0) {\n configs.forEach(function(c4) {\n if (c4.staller) {\n c4.staller.cancel();\n }\n c4.cancelled = true;\n });\n return [2, { value: result2 }];\n }\n if (!!first)\n return [3, 4];\n return [4, stall(100).getPromise()];\n case 3:\n _b.sent();\n _b.label = 4;\n case 4:\n first = false;\n _b.label = 5;\n case 5:\n errors = configs.reduce(function(accum, c4) {\n if (!c4.done || c4.error == null) {\n return accum;\n }\n var code = c4.error.code;\n if (ForwardErrors.indexOf(code) >= 0) {\n if (!accum[code]) {\n accum[code] = { error: c4.error, weight: 0 };\n }\n accum[code].weight += c4.weight;\n }\n return accum;\n }, {});\n Object.keys(errors).forEach(function(errorCode) {\n var tally = errors[errorCode];\n if (tally.weight < _this.quorum) {\n return;\n }\n configs.forEach(function(c4) {\n if (c4.staller) {\n c4.staller.cancel();\n }\n c4.cancelled = true;\n });\n var e3 = tally.error;\n var props = {};\n ForwardProperties.forEach(function(name) {\n if (e3[name] == null) {\n return;\n }\n props[name] = e3[name];\n });\n logger.throwError(e3.reason || e3.message, errorCode, props);\n });\n if (configs.filter(function(c4) {\n return !c4.done;\n }).length === 0) {\n return [2, \"break\"];\n }\n return [\n 2\n /*return*/\n ];\n }\n });\n };\n this_1 = this;\n _a.label = 5;\n case 5:\n if (false)\n return [3, 7];\n return [5, _loop_1()];\n case 6:\n state_1 = _a.sent();\n if (typeof state_1 === \"object\")\n return [2, state_1.value];\n if (state_1 === \"break\")\n return [3, 7];\n return [3, 5];\n case 7:\n configs.forEach(function(c4) {\n if (c4.staller) {\n c4.staller.cancel();\n }\n c4.cancelled = true;\n });\n return [2, logger.throwError(\"failed to meet quorum\", logger_1.Logger.errors.SERVER_ERROR, {\n method,\n params,\n //results: configs.map((c) => c.result),\n //errors: configs.map((c) => c.error),\n results: configs.map(function(c4) {\n return exposeDebugConfig(c4);\n }),\n provider: this\n })];\n }\n });\n });\n };\n return FallbackProvider2;\n }(base_provider_1.BaseProvider)\n );\n exports3.FallbackProvider = FallbackProvider;\n }\n });\n\n // ../../../node_modules/.pnpm/@ethersproject+providers@5.8.0_bufferutil@4.0.9_utf-8-validate@5.0.10/node_modules/@ethersproject/providers/lib/browser-ipc-provider.js\n var require_browser_ipc_provider = __commonJS({\n \"../../../node_modules/.pnpm/@ethersproject+providers@5.8.0_bufferutil@4.0.9_utf-8-validate@5.0.10/node_modules/@ethersproject/providers/lib/browser-ipc-provider.js\"(exports3) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n Object.defineProperty(exports3, \"__esModule\", { value: true });\n exports3.IpcProvider = void 0;\n var IpcProvider = null;\n exports3.IpcProvider = IpcProvider;\n }\n });\n\n // ../../../node_modules/.pnpm/@ethersproject+providers@5.8.0_bufferutil@4.0.9_utf-8-validate@5.0.10/node_modules/@ethersproject/providers/lib/infura-provider.js\n var require_infura_provider = __commonJS({\n \"../../../node_modules/.pnpm/@ethersproject+providers@5.8.0_bufferutil@4.0.9_utf-8-validate@5.0.10/node_modules/@ethersproject/providers/lib/infura-provider.js\"(exports3) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n var __extends3 = exports3 && exports3.__extends || /* @__PURE__ */ function() {\n var extendStatics3 = function(d5, b4) {\n extendStatics3 = Object.setPrototypeOf || { __proto__: [] } instanceof Array && function(d6, b5) {\n d6.__proto__ = b5;\n } || function(d6, b5) {\n for (var p4 in b5)\n if (Object.prototype.hasOwnProperty.call(b5, p4))\n d6[p4] = b5[p4];\n };\n return extendStatics3(d5, b4);\n };\n return function(d5, b4) {\n if (typeof b4 !== \"function\" && b4 !== null)\n throw new TypeError(\"Class extends value \" + String(b4) + \" is not a constructor or null\");\n extendStatics3(d5, b4);\n function __() {\n this.constructor = d5;\n }\n d5.prototype = b4 === null ? Object.create(b4) : (__.prototype = b4.prototype, new __());\n };\n }();\n Object.defineProperty(exports3, \"__esModule\", { value: true });\n exports3.InfuraProvider = exports3.InfuraWebSocketProvider = void 0;\n var properties_1 = require_lib4();\n var websocket_provider_1 = require_websocket_provider();\n var formatter_1 = require_formatter();\n var logger_1 = require_lib();\n var _version_1 = require_version23();\n var logger = new logger_1.Logger(_version_1.version);\n var url_json_rpc_provider_1 = require_url_json_rpc_provider();\n var defaultProjectId = \"84842078b09946638c03157f83405213\";\n var InfuraWebSocketProvider = (\n /** @class */\n function(_super) {\n __extends3(InfuraWebSocketProvider2, _super);\n function InfuraWebSocketProvider2(network, apiKey) {\n var _this = this;\n var provider = new InfuraProvider(network, apiKey);\n var connection = provider.connection;\n if (connection.password) {\n logger.throwError(\"INFURA WebSocket project secrets unsupported\", logger_1.Logger.errors.UNSUPPORTED_OPERATION, {\n operation: \"InfuraProvider.getWebSocketProvider()\"\n });\n }\n var url = connection.url.replace(/^http/i, \"ws\").replace(\"/v3/\", \"/ws/v3/\");\n _this = _super.call(this, url, network) || this;\n (0, properties_1.defineReadOnly)(_this, \"apiKey\", provider.projectId);\n (0, properties_1.defineReadOnly)(_this, \"projectId\", provider.projectId);\n (0, properties_1.defineReadOnly)(_this, \"projectSecret\", provider.projectSecret);\n return _this;\n }\n InfuraWebSocketProvider2.prototype.isCommunityResource = function() {\n return this.projectId === defaultProjectId;\n };\n return InfuraWebSocketProvider2;\n }(websocket_provider_1.WebSocketProvider)\n );\n exports3.InfuraWebSocketProvider = InfuraWebSocketProvider;\n var InfuraProvider = (\n /** @class */\n function(_super) {\n __extends3(InfuraProvider2, _super);\n function InfuraProvider2() {\n return _super !== null && _super.apply(this, arguments) || this;\n }\n InfuraProvider2.getWebSocketProvider = function(network, apiKey) {\n return new InfuraWebSocketProvider(network, apiKey);\n };\n InfuraProvider2.getApiKey = function(apiKey) {\n var apiKeyObj = {\n apiKey: defaultProjectId,\n projectId: defaultProjectId,\n projectSecret: null\n };\n if (apiKey == null) {\n return apiKeyObj;\n }\n if (typeof apiKey === \"string\") {\n apiKeyObj.projectId = apiKey;\n } else if (apiKey.projectSecret != null) {\n logger.assertArgument(typeof apiKey.projectId === \"string\", \"projectSecret requires a projectId\", \"projectId\", apiKey.projectId);\n logger.assertArgument(typeof apiKey.projectSecret === \"string\", \"invalid projectSecret\", \"projectSecret\", \"[REDACTED]\");\n apiKeyObj.projectId = apiKey.projectId;\n apiKeyObj.projectSecret = apiKey.projectSecret;\n } else if (apiKey.projectId) {\n apiKeyObj.projectId = apiKey.projectId;\n }\n apiKeyObj.apiKey = apiKeyObj.projectId;\n return apiKeyObj;\n };\n InfuraProvider2.getUrl = function(network, apiKey) {\n var host = null;\n switch (network ? network.name : \"unknown\") {\n case \"homestead\":\n host = \"mainnet.infura.io\";\n break;\n case \"goerli\":\n host = \"goerli.infura.io\";\n break;\n case \"sepolia\":\n host = \"sepolia.infura.io\";\n break;\n case \"matic\":\n host = \"polygon-mainnet.infura.io\";\n break;\n case \"maticmum\":\n host = \"polygon-mumbai.infura.io\";\n break;\n case \"optimism\":\n host = \"optimism-mainnet.infura.io\";\n break;\n case \"optimism-goerli\":\n host = \"optimism-goerli.infura.io\";\n break;\n case \"optimism-sepolia\":\n host = \"optimism-sepolia.infura.io\";\n break;\n case \"arbitrum\":\n host = \"arbitrum-mainnet.infura.io\";\n break;\n case \"arbitrum-goerli\":\n host = \"arbitrum-goerli.infura.io\";\n break;\n case \"arbitrum-sepolia\":\n host = \"arbitrum-sepolia.infura.io\";\n break;\n default:\n logger.throwError(\"unsupported network\", logger_1.Logger.errors.INVALID_ARGUMENT, {\n argument: \"network\",\n value: network\n });\n }\n var connection = {\n allowGzip: true,\n url: \"https://\" + host + \"/v3/\" + apiKey.projectId,\n throttleCallback: function(attempt, url) {\n if (apiKey.projectId === defaultProjectId) {\n (0, formatter_1.showThrottleMessage)();\n }\n return Promise.resolve(true);\n }\n };\n if (apiKey.projectSecret != null) {\n connection.user = \"\";\n connection.password = apiKey.projectSecret;\n }\n return connection;\n };\n InfuraProvider2.prototype.isCommunityResource = function() {\n return this.projectId === defaultProjectId;\n };\n return InfuraProvider2;\n }(url_json_rpc_provider_1.UrlJsonRpcProvider)\n );\n exports3.InfuraProvider = InfuraProvider;\n }\n });\n\n // ../../../node_modules/.pnpm/@ethersproject+providers@5.8.0_bufferutil@4.0.9_utf-8-validate@5.0.10/node_modules/@ethersproject/providers/lib/json-rpc-batch-provider.js\n var require_json_rpc_batch_provider = __commonJS({\n \"../../../node_modules/.pnpm/@ethersproject+providers@5.8.0_bufferutil@4.0.9_utf-8-validate@5.0.10/node_modules/@ethersproject/providers/lib/json-rpc-batch-provider.js\"(exports3) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n var __extends3 = exports3 && exports3.__extends || /* @__PURE__ */ function() {\n var extendStatics3 = function(d5, b4) {\n extendStatics3 = Object.setPrototypeOf || { __proto__: [] } instanceof Array && function(d6, b5) {\n d6.__proto__ = b5;\n } || function(d6, b5) {\n for (var p4 in b5)\n if (Object.prototype.hasOwnProperty.call(b5, p4))\n d6[p4] = b5[p4];\n };\n return extendStatics3(d5, b4);\n };\n return function(d5, b4) {\n if (typeof b4 !== \"function\" && b4 !== null)\n throw new TypeError(\"Class extends value \" + String(b4) + \" is not a constructor or null\");\n extendStatics3(d5, b4);\n function __() {\n this.constructor = d5;\n }\n d5.prototype = b4 === null ? Object.create(b4) : (__.prototype = b4.prototype, new __());\n };\n }();\n Object.defineProperty(exports3, \"__esModule\", { value: true });\n exports3.JsonRpcBatchProvider = void 0;\n var properties_1 = require_lib4();\n var web_1 = require_lib28();\n var json_rpc_provider_1 = require_json_rpc_provider();\n var JsonRpcBatchProvider = (\n /** @class */\n function(_super) {\n __extends3(JsonRpcBatchProvider2, _super);\n function JsonRpcBatchProvider2() {\n return _super !== null && _super.apply(this, arguments) || this;\n }\n JsonRpcBatchProvider2.prototype.send = function(method, params) {\n var _this = this;\n var request = {\n method,\n params,\n id: this._nextId++,\n jsonrpc: \"2.0\"\n };\n if (this._pendingBatch == null) {\n this._pendingBatch = [];\n }\n var inflightRequest = { request, resolve: null, reject: null };\n var promise = new Promise(function(resolve, reject) {\n inflightRequest.resolve = resolve;\n inflightRequest.reject = reject;\n });\n this._pendingBatch.push(inflightRequest);\n if (!this._pendingBatchAggregator) {\n this._pendingBatchAggregator = setTimeout(function() {\n var batch = _this._pendingBatch;\n _this._pendingBatch = null;\n _this._pendingBatchAggregator = null;\n var request2 = batch.map(function(inflight) {\n return inflight.request;\n });\n _this.emit(\"debug\", {\n action: \"requestBatch\",\n request: (0, properties_1.deepCopy)(request2),\n provider: _this\n });\n return (0, web_1.fetchJson)(_this.connection, JSON.stringify(request2)).then(function(result) {\n _this.emit(\"debug\", {\n action: \"response\",\n request: request2,\n response: result,\n provider: _this\n });\n batch.forEach(function(inflightRequest2, index2) {\n var payload = result[index2];\n if (payload.error) {\n var error = new Error(payload.error.message);\n error.code = payload.error.code;\n error.data = payload.error.data;\n inflightRequest2.reject(error);\n } else {\n inflightRequest2.resolve(payload.result);\n }\n });\n }, function(error) {\n _this.emit(\"debug\", {\n action: \"response\",\n error,\n request: request2,\n provider: _this\n });\n batch.forEach(function(inflightRequest2) {\n inflightRequest2.reject(error);\n });\n });\n }, 10);\n }\n return promise;\n };\n return JsonRpcBatchProvider2;\n }(json_rpc_provider_1.JsonRpcProvider)\n );\n exports3.JsonRpcBatchProvider = JsonRpcBatchProvider;\n }\n });\n\n // ../../../node_modules/.pnpm/@ethersproject+providers@5.8.0_bufferutil@4.0.9_utf-8-validate@5.0.10/node_modules/@ethersproject/providers/lib/nodesmith-provider.js\n var require_nodesmith_provider = __commonJS({\n \"../../../node_modules/.pnpm/@ethersproject+providers@5.8.0_bufferutil@4.0.9_utf-8-validate@5.0.10/node_modules/@ethersproject/providers/lib/nodesmith-provider.js\"(exports3) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n var __extends3 = exports3 && exports3.__extends || /* @__PURE__ */ function() {\n var extendStatics3 = function(d5, b4) {\n extendStatics3 = Object.setPrototypeOf || { __proto__: [] } instanceof Array && function(d6, b5) {\n d6.__proto__ = b5;\n } || function(d6, b5) {\n for (var p4 in b5)\n if (Object.prototype.hasOwnProperty.call(b5, p4))\n d6[p4] = b5[p4];\n };\n return extendStatics3(d5, b4);\n };\n return function(d5, b4) {\n if (typeof b4 !== \"function\" && b4 !== null)\n throw new TypeError(\"Class extends value \" + String(b4) + \" is not a constructor or null\");\n extendStatics3(d5, b4);\n function __() {\n this.constructor = d5;\n }\n d5.prototype = b4 === null ? Object.create(b4) : (__.prototype = b4.prototype, new __());\n };\n }();\n Object.defineProperty(exports3, \"__esModule\", { value: true });\n exports3.NodesmithProvider = void 0;\n var url_json_rpc_provider_1 = require_url_json_rpc_provider();\n var logger_1 = require_lib();\n var _version_1 = require_version23();\n var logger = new logger_1.Logger(_version_1.version);\n var defaultApiKey = \"ETHERS_JS_SHARED\";\n var NodesmithProvider = (\n /** @class */\n function(_super) {\n __extends3(NodesmithProvider2, _super);\n function NodesmithProvider2() {\n return _super !== null && _super.apply(this, arguments) || this;\n }\n NodesmithProvider2.getApiKey = function(apiKey) {\n if (apiKey && typeof apiKey !== \"string\") {\n logger.throwArgumentError(\"invalid apiKey\", \"apiKey\", apiKey);\n }\n return apiKey || defaultApiKey;\n };\n NodesmithProvider2.getUrl = function(network, apiKey) {\n logger.warn(\"NodeSmith will be discontinued on 2019-12-20; please migrate to another platform.\");\n var host = null;\n switch (network.name) {\n case \"homestead\":\n host = \"https://ethereum.api.nodesmith.io/v1/mainnet/jsonrpc\";\n break;\n case \"ropsten\":\n host = \"https://ethereum.api.nodesmith.io/v1/ropsten/jsonrpc\";\n break;\n case \"rinkeby\":\n host = \"https://ethereum.api.nodesmith.io/v1/rinkeby/jsonrpc\";\n break;\n case \"goerli\":\n host = \"https://ethereum.api.nodesmith.io/v1/goerli/jsonrpc\";\n break;\n case \"kovan\":\n host = \"https://ethereum.api.nodesmith.io/v1/kovan/jsonrpc\";\n break;\n default:\n logger.throwArgumentError(\"unsupported network\", \"network\", arguments[0]);\n }\n return host + \"?apiKey=\" + apiKey;\n };\n return NodesmithProvider2;\n }(url_json_rpc_provider_1.UrlJsonRpcProvider)\n );\n exports3.NodesmithProvider = NodesmithProvider;\n }\n });\n\n // ../../../node_modules/.pnpm/@ethersproject+providers@5.8.0_bufferutil@4.0.9_utf-8-validate@5.0.10/node_modules/@ethersproject/providers/lib/pocket-provider.js\n var require_pocket_provider = __commonJS({\n \"../../../node_modules/.pnpm/@ethersproject+providers@5.8.0_bufferutil@4.0.9_utf-8-validate@5.0.10/node_modules/@ethersproject/providers/lib/pocket-provider.js\"(exports3) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n var __extends3 = exports3 && exports3.__extends || /* @__PURE__ */ function() {\n var extendStatics3 = function(d5, b4) {\n extendStatics3 = Object.setPrototypeOf || { __proto__: [] } instanceof Array && function(d6, b5) {\n d6.__proto__ = b5;\n } || function(d6, b5) {\n for (var p4 in b5)\n if (Object.prototype.hasOwnProperty.call(b5, p4))\n d6[p4] = b5[p4];\n };\n return extendStatics3(d5, b4);\n };\n return function(d5, b4) {\n if (typeof b4 !== \"function\" && b4 !== null)\n throw new TypeError(\"Class extends value \" + String(b4) + \" is not a constructor or null\");\n extendStatics3(d5, b4);\n function __() {\n this.constructor = d5;\n }\n d5.prototype = b4 === null ? Object.create(b4) : (__.prototype = b4.prototype, new __());\n };\n }();\n Object.defineProperty(exports3, \"__esModule\", { value: true });\n exports3.PocketProvider = void 0;\n var logger_1 = require_lib();\n var _version_1 = require_version23();\n var logger = new logger_1.Logger(_version_1.version);\n var url_json_rpc_provider_1 = require_url_json_rpc_provider();\n var defaultApplicationId = \"62e1ad51b37b8e00394bda3b\";\n var PocketProvider = (\n /** @class */\n function(_super) {\n __extends3(PocketProvider2, _super);\n function PocketProvider2() {\n return _super !== null && _super.apply(this, arguments) || this;\n }\n PocketProvider2.getApiKey = function(apiKey) {\n var apiKeyObj = {\n applicationId: null,\n loadBalancer: true,\n applicationSecretKey: null\n };\n if (apiKey == null) {\n apiKeyObj.applicationId = defaultApplicationId;\n } else if (typeof apiKey === \"string\") {\n apiKeyObj.applicationId = apiKey;\n } else if (apiKey.applicationSecretKey != null) {\n apiKeyObj.applicationId = apiKey.applicationId;\n apiKeyObj.applicationSecretKey = apiKey.applicationSecretKey;\n } else if (apiKey.applicationId) {\n apiKeyObj.applicationId = apiKey.applicationId;\n } else {\n logger.throwArgumentError(\"unsupported PocketProvider apiKey\", \"apiKey\", apiKey);\n }\n return apiKeyObj;\n };\n PocketProvider2.getUrl = function(network, apiKey) {\n var host = null;\n switch (network ? network.name : \"unknown\") {\n case \"goerli\":\n host = \"eth-goerli.gateway.pokt.network\";\n break;\n case \"homestead\":\n host = \"eth-mainnet.gateway.pokt.network\";\n break;\n case \"kovan\":\n host = \"poa-kovan.gateway.pokt.network\";\n break;\n case \"matic\":\n host = \"poly-mainnet.gateway.pokt.network\";\n break;\n case \"maticmum\":\n host = \"polygon-mumbai-rpc.gateway.pokt.network\";\n break;\n case \"rinkeby\":\n host = \"eth-rinkeby.gateway.pokt.network\";\n break;\n case \"ropsten\":\n host = \"eth-ropsten.gateway.pokt.network\";\n break;\n default:\n logger.throwError(\"unsupported network\", logger_1.Logger.errors.INVALID_ARGUMENT, {\n argument: \"network\",\n value: network\n });\n }\n var url = \"https://\" + host + \"/v1/lb/\" + apiKey.applicationId;\n var connection = { headers: {}, url };\n if (apiKey.applicationSecretKey != null) {\n connection.user = \"\";\n connection.password = apiKey.applicationSecretKey;\n }\n return connection;\n };\n PocketProvider2.prototype.isCommunityResource = function() {\n return this.applicationId === defaultApplicationId;\n };\n return PocketProvider2;\n }(url_json_rpc_provider_1.UrlJsonRpcProvider)\n );\n exports3.PocketProvider = PocketProvider;\n }\n });\n\n // ../../../node_modules/.pnpm/@ethersproject+providers@5.8.0_bufferutil@4.0.9_utf-8-validate@5.0.10/node_modules/@ethersproject/providers/lib/quicknode-provider.js\n var require_quicknode_provider = __commonJS({\n \"../../../node_modules/.pnpm/@ethersproject+providers@5.8.0_bufferutil@4.0.9_utf-8-validate@5.0.10/node_modules/@ethersproject/providers/lib/quicknode-provider.js\"(exports3) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n var __extends3 = exports3 && exports3.__extends || /* @__PURE__ */ function() {\n var extendStatics3 = function(d5, b4) {\n extendStatics3 = Object.setPrototypeOf || { __proto__: [] } instanceof Array && function(d6, b5) {\n d6.__proto__ = b5;\n } || function(d6, b5) {\n for (var p4 in b5)\n if (Object.prototype.hasOwnProperty.call(b5, p4))\n d6[p4] = b5[p4];\n };\n return extendStatics3(d5, b4);\n };\n return function(d5, b4) {\n if (typeof b4 !== \"function\" && b4 !== null)\n throw new TypeError(\"Class extends value \" + String(b4) + \" is not a constructor or null\");\n extendStatics3(d5, b4);\n function __() {\n this.constructor = d5;\n }\n d5.prototype = b4 === null ? Object.create(b4) : (__.prototype = b4.prototype, new __());\n };\n }();\n Object.defineProperty(exports3, \"__esModule\", { value: true });\n exports3.QuickNodeProvider = void 0;\n var url_json_rpc_provider_1 = require_url_json_rpc_provider();\n var logger_1 = require_lib();\n var _version_1 = require_version23();\n var logger = new logger_1.Logger(_version_1.version);\n var defaultApiKey = \"919b412a057b5e9c9b6dce193c5a60242d6efadb\";\n var QuickNodeProvider = (\n /** @class */\n function(_super) {\n __extends3(QuickNodeProvider2, _super);\n function QuickNodeProvider2() {\n return _super !== null && _super.apply(this, arguments) || this;\n }\n QuickNodeProvider2.getApiKey = function(apiKey) {\n if (apiKey && typeof apiKey !== \"string\") {\n logger.throwArgumentError(\"invalid apiKey\", \"apiKey\", apiKey);\n }\n return apiKey || defaultApiKey;\n };\n QuickNodeProvider2.getUrl = function(network, apiKey) {\n var host = null;\n switch (network.name) {\n case \"homestead\":\n host = \"ethers.quiknode.pro\";\n break;\n case \"goerli\":\n host = \"ethers.ethereum-goerli.quiknode.pro\";\n break;\n case \"sepolia\":\n host = \"ethers.ethereum-sepolia.quiknode.pro\";\n break;\n case \"holesky\":\n host = \"ethers.ethereum-holesky.quiknode.pro\";\n break;\n case \"arbitrum\":\n host = \"ethers.arbitrum-mainnet.quiknode.pro\";\n break;\n case \"arbitrum-goerli\":\n host = \"ethers.arbitrum-goerli.quiknode.pro\";\n break;\n case \"arbitrum-sepolia\":\n host = \"ethers.arbitrum-sepolia.quiknode.pro\";\n break;\n case \"base\":\n host = \"ethers.base-mainnet.quiknode.pro\";\n break;\n case \"base-goerli\":\n host = \"ethers.base-goerli.quiknode.pro\";\n break;\n case \"base-spolia\":\n host = \"ethers.base-sepolia.quiknode.pro\";\n break;\n case \"bnb\":\n host = \"ethers.bsc.quiknode.pro\";\n break;\n case \"bnbt\":\n host = \"ethers.bsc-testnet.quiknode.pro\";\n break;\n case \"matic\":\n host = \"ethers.matic.quiknode.pro\";\n break;\n case \"maticmum\":\n host = \"ethers.matic-testnet.quiknode.pro\";\n break;\n case \"optimism\":\n host = \"ethers.optimism.quiknode.pro\";\n break;\n case \"optimism-goerli\":\n host = \"ethers.optimism-goerli.quiknode.pro\";\n break;\n case \"optimism-sepolia\":\n host = \"ethers.optimism-sepolia.quiknode.pro\";\n break;\n case \"xdai\":\n host = \"ethers.xdai.quiknode.pro\";\n break;\n default:\n logger.throwArgumentError(\"unsupported network\", \"network\", arguments[0]);\n }\n return \"https://\" + host + \"/\" + apiKey;\n };\n return QuickNodeProvider2;\n }(url_json_rpc_provider_1.UrlJsonRpcProvider)\n );\n exports3.QuickNodeProvider = QuickNodeProvider;\n }\n });\n\n // ../../../node_modules/.pnpm/@ethersproject+providers@5.8.0_bufferutil@4.0.9_utf-8-validate@5.0.10/node_modules/@ethersproject/providers/lib/web3-provider.js\n var require_web3_provider = __commonJS({\n \"../../../node_modules/.pnpm/@ethersproject+providers@5.8.0_bufferutil@4.0.9_utf-8-validate@5.0.10/node_modules/@ethersproject/providers/lib/web3-provider.js\"(exports3) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n var __extends3 = exports3 && exports3.__extends || /* @__PURE__ */ function() {\n var extendStatics3 = function(d5, b4) {\n extendStatics3 = Object.setPrototypeOf || { __proto__: [] } instanceof Array && function(d6, b5) {\n d6.__proto__ = b5;\n } || function(d6, b5) {\n for (var p4 in b5)\n if (Object.prototype.hasOwnProperty.call(b5, p4))\n d6[p4] = b5[p4];\n };\n return extendStatics3(d5, b4);\n };\n return function(d5, b4) {\n if (typeof b4 !== \"function\" && b4 !== null)\n throw new TypeError(\"Class extends value \" + String(b4) + \" is not a constructor or null\");\n extendStatics3(d5, b4);\n function __() {\n this.constructor = d5;\n }\n d5.prototype = b4 === null ? Object.create(b4) : (__.prototype = b4.prototype, new __());\n };\n }();\n Object.defineProperty(exports3, \"__esModule\", { value: true });\n exports3.Web3Provider = void 0;\n var properties_1 = require_lib4();\n var logger_1 = require_lib();\n var _version_1 = require_version23();\n var logger = new logger_1.Logger(_version_1.version);\n var json_rpc_provider_1 = require_json_rpc_provider();\n var _nextId = 1;\n function buildWeb3LegacyFetcher(provider, sendFunc) {\n var fetcher = \"Web3LegacyFetcher\";\n return function(method, params) {\n var _this = this;\n var request = {\n method,\n params,\n id: _nextId++,\n jsonrpc: \"2.0\"\n };\n return new Promise(function(resolve, reject) {\n _this.emit(\"debug\", {\n action: \"request\",\n fetcher,\n request: (0, properties_1.deepCopy)(request),\n provider: _this\n });\n sendFunc(request, function(error, response) {\n if (error) {\n _this.emit(\"debug\", {\n action: \"response\",\n fetcher,\n error,\n request,\n provider: _this\n });\n return reject(error);\n }\n _this.emit(\"debug\", {\n action: \"response\",\n fetcher,\n request,\n response,\n provider: _this\n });\n if (response.error) {\n var error_1 = new Error(response.error.message);\n error_1.code = response.error.code;\n error_1.data = response.error.data;\n return reject(error_1);\n }\n resolve(response.result);\n });\n });\n };\n }\n function buildEip1193Fetcher(provider) {\n return function(method, params) {\n var _this = this;\n if (params == null) {\n params = [];\n }\n var request = { method, params };\n this.emit(\"debug\", {\n action: \"request\",\n fetcher: \"Eip1193Fetcher\",\n request: (0, properties_1.deepCopy)(request),\n provider: this\n });\n return provider.request(request).then(function(response) {\n _this.emit(\"debug\", {\n action: \"response\",\n fetcher: \"Eip1193Fetcher\",\n request,\n response,\n provider: _this\n });\n return response;\n }, function(error) {\n _this.emit(\"debug\", {\n action: \"response\",\n fetcher: \"Eip1193Fetcher\",\n request,\n error,\n provider: _this\n });\n throw error;\n });\n };\n }\n var Web3Provider = (\n /** @class */\n function(_super) {\n __extends3(Web3Provider2, _super);\n function Web3Provider2(provider, network) {\n var _this = this;\n if (provider == null) {\n logger.throwArgumentError(\"missing provider\", \"provider\", provider);\n }\n var path = null;\n var jsonRpcFetchFunc = null;\n var subprovider = null;\n if (typeof provider === \"function\") {\n path = \"unknown:\";\n jsonRpcFetchFunc = provider;\n } else {\n path = provider.host || provider.path || \"\";\n if (!path && provider.isMetaMask) {\n path = \"metamask\";\n }\n subprovider = provider;\n if (provider.request) {\n if (path === \"\") {\n path = \"eip-1193:\";\n }\n jsonRpcFetchFunc = buildEip1193Fetcher(provider);\n } else if (provider.sendAsync) {\n jsonRpcFetchFunc = buildWeb3LegacyFetcher(provider, provider.sendAsync.bind(provider));\n } else if (provider.send) {\n jsonRpcFetchFunc = buildWeb3LegacyFetcher(provider, provider.send.bind(provider));\n } else {\n logger.throwArgumentError(\"unsupported provider\", \"provider\", provider);\n }\n if (!path) {\n path = \"unknown:\";\n }\n }\n _this = _super.call(this, path, network) || this;\n (0, properties_1.defineReadOnly)(_this, \"jsonRpcFetchFunc\", jsonRpcFetchFunc);\n (0, properties_1.defineReadOnly)(_this, \"provider\", subprovider);\n return _this;\n }\n Web3Provider2.prototype.send = function(method, params) {\n return this.jsonRpcFetchFunc(method, params);\n };\n return Web3Provider2;\n }(json_rpc_provider_1.JsonRpcProvider)\n );\n exports3.Web3Provider = Web3Provider;\n }\n });\n\n // ../../../node_modules/.pnpm/@ethersproject+providers@5.8.0_bufferutil@4.0.9_utf-8-validate@5.0.10/node_modules/@ethersproject/providers/lib/index.js\n var require_lib29 = __commonJS({\n \"../../../node_modules/.pnpm/@ethersproject+providers@5.8.0_bufferutil@4.0.9_utf-8-validate@5.0.10/node_modules/@ethersproject/providers/lib/index.js\"(exports3) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n Object.defineProperty(exports3, \"__esModule\", { value: true });\n exports3.Formatter = exports3.showThrottleMessage = exports3.isCommunityResourcable = exports3.isCommunityResource = exports3.getNetwork = exports3.getDefaultProvider = exports3.JsonRpcSigner = exports3.IpcProvider = exports3.WebSocketProvider = exports3.Web3Provider = exports3.StaticJsonRpcProvider = exports3.QuickNodeProvider = exports3.PocketProvider = exports3.NodesmithProvider = exports3.JsonRpcBatchProvider = exports3.JsonRpcProvider = exports3.InfuraWebSocketProvider = exports3.InfuraProvider = exports3.EtherscanProvider = exports3.CloudflareProvider = exports3.AnkrProvider = exports3.AlchemyWebSocketProvider = exports3.AlchemyProvider = exports3.FallbackProvider = exports3.UrlJsonRpcProvider = exports3.Resolver = exports3.BaseProvider = exports3.Provider = void 0;\n var abstract_provider_1 = require_lib14();\n Object.defineProperty(exports3, \"Provider\", { enumerable: true, get: function() {\n return abstract_provider_1.Provider;\n } });\n var networks_1 = require_lib27();\n Object.defineProperty(exports3, \"getNetwork\", { enumerable: true, get: function() {\n return networks_1.getNetwork;\n } });\n var base_provider_1 = require_base_provider();\n Object.defineProperty(exports3, \"BaseProvider\", { enumerable: true, get: function() {\n return base_provider_1.BaseProvider;\n } });\n Object.defineProperty(exports3, \"Resolver\", { enumerable: true, get: function() {\n return base_provider_1.Resolver;\n } });\n var alchemy_provider_1 = require_alchemy_provider();\n Object.defineProperty(exports3, \"AlchemyProvider\", { enumerable: true, get: function() {\n return alchemy_provider_1.AlchemyProvider;\n } });\n Object.defineProperty(exports3, \"AlchemyWebSocketProvider\", { enumerable: true, get: function() {\n return alchemy_provider_1.AlchemyWebSocketProvider;\n } });\n var ankr_provider_1 = require_ankr_provider();\n Object.defineProperty(exports3, \"AnkrProvider\", { enumerable: true, get: function() {\n return ankr_provider_1.AnkrProvider;\n } });\n var cloudflare_provider_1 = require_cloudflare_provider();\n Object.defineProperty(exports3, \"CloudflareProvider\", { enumerable: true, get: function() {\n return cloudflare_provider_1.CloudflareProvider;\n } });\n var etherscan_provider_1 = require_etherscan_provider();\n Object.defineProperty(exports3, \"EtherscanProvider\", { enumerable: true, get: function() {\n return etherscan_provider_1.EtherscanProvider;\n } });\n var fallback_provider_1 = require_fallback_provider();\n Object.defineProperty(exports3, \"FallbackProvider\", { enumerable: true, get: function() {\n return fallback_provider_1.FallbackProvider;\n } });\n var ipc_provider_1 = require_browser_ipc_provider();\n Object.defineProperty(exports3, \"IpcProvider\", { enumerable: true, get: function() {\n return ipc_provider_1.IpcProvider;\n } });\n var infura_provider_1 = require_infura_provider();\n Object.defineProperty(exports3, \"InfuraProvider\", { enumerable: true, get: function() {\n return infura_provider_1.InfuraProvider;\n } });\n Object.defineProperty(exports3, \"InfuraWebSocketProvider\", { enumerable: true, get: function() {\n return infura_provider_1.InfuraWebSocketProvider;\n } });\n var json_rpc_provider_1 = require_json_rpc_provider();\n Object.defineProperty(exports3, \"JsonRpcProvider\", { enumerable: true, get: function() {\n return json_rpc_provider_1.JsonRpcProvider;\n } });\n Object.defineProperty(exports3, \"JsonRpcSigner\", { enumerable: true, get: function() {\n return json_rpc_provider_1.JsonRpcSigner;\n } });\n var json_rpc_batch_provider_1 = require_json_rpc_batch_provider();\n Object.defineProperty(exports3, \"JsonRpcBatchProvider\", { enumerable: true, get: function() {\n return json_rpc_batch_provider_1.JsonRpcBatchProvider;\n } });\n var nodesmith_provider_1 = require_nodesmith_provider();\n Object.defineProperty(exports3, \"NodesmithProvider\", { enumerable: true, get: function() {\n return nodesmith_provider_1.NodesmithProvider;\n } });\n var pocket_provider_1 = require_pocket_provider();\n Object.defineProperty(exports3, \"PocketProvider\", { enumerable: true, get: function() {\n return pocket_provider_1.PocketProvider;\n } });\n var quicknode_provider_1 = require_quicknode_provider();\n Object.defineProperty(exports3, \"QuickNodeProvider\", { enumerable: true, get: function() {\n return quicknode_provider_1.QuickNodeProvider;\n } });\n var url_json_rpc_provider_1 = require_url_json_rpc_provider();\n Object.defineProperty(exports3, \"StaticJsonRpcProvider\", { enumerable: true, get: function() {\n return url_json_rpc_provider_1.StaticJsonRpcProvider;\n } });\n Object.defineProperty(exports3, \"UrlJsonRpcProvider\", { enumerable: true, get: function() {\n return url_json_rpc_provider_1.UrlJsonRpcProvider;\n } });\n var web3_provider_1 = require_web3_provider();\n Object.defineProperty(exports3, \"Web3Provider\", { enumerable: true, get: function() {\n return web3_provider_1.Web3Provider;\n } });\n var websocket_provider_1 = require_websocket_provider();\n Object.defineProperty(exports3, \"WebSocketProvider\", { enumerable: true, get: function() {\n return websocket_provider_1.WebSocketProvider;\n } });\n var formatter_1 = require_formatter();\n Object.defineProperty(exports3, \"Formatter\", { enumerable: true, get: function() {\n return formatter_1.Formatter;\n } });\n Object.defineProperty(exports3, \"isCommunityResourcable\", { enumerable: true, get: function() {\n return formatter_1.isCommunityResourcable;\n } });\n Object.defineProperty(exports3, \"isCommunityResource\", { enumerable: true, get: function() {\n return formatter_1.isCommunityResource;\n } });\n Object.defineProperty(exports3, \"showThrottleMessage\", { enumerable: true, get: function() {\n return formatter_1.showThrottleMessage;\n } });\n var logger_1 = require_lib();\n var _version_1 = require_version23();\n var logger = new logger_1.Logger(_version_1.version);\n function getDefaultProvider(network, options) {\n if (network == null) {\n network = \"homestead\";\n }\n if (typeof network === \"string\") {\n var match = network.match(/^(ws|http)s?:/i);\n if (match) {\n switch (match[1].toLowerCase()) {\n case \"http\":\n case \"https\":\n return new json_rpc_provider_1.JsonRpcProvider(network);\n case \"ws\":\n case \"wss\":\n return new websocket_provider_1.WebSocketProvider(network);\n default:\n logger.throwArgumentError(\"unsupported URL scheme\", \"network\", network);\n }\n }\n }\n var n2 = (0, networks_1.getNetwork)(network);\n if (!n2 || !n2._defaultProvider) {\n logger.throwError(\"unsupported getDefaultProvider network\", logger_1.Logger.errors.NETWORK_ERROR, {\n operation: \"getDefaultProvider\",\n network\n });\n }\n return n2._defaultProvider({\n FallbackProvider: fallback_provider_1.FallbackProvider,\n AlchemyProvider: alchemy_provider_1.AlchemyProvider,\n AnkrProvider: ankr_provider_1.AnkrProvider,\n CloudflareProvider: cloudflare_provider_1.CloudflareProvider,\n EtherscanProvider: etherscan_provider_1.EtherscanProvider,\n InfuraProvider: infura_provider_1.InfuraProvider,\n JsonRpcProvider: json_rpc_provider_1.JsonRpcProvider,\n NodesmithProvider: nodesmith_provider_1.NodesmithProvider,\n PocketProvider: pocket_provider_1.PocketProvider,\n QuickNodeProvider: quicknode_provider_1.QuickNodeProvider,\n Web3Provider: web3_provider_1.Web3Provider,\n IpcProvider: ipc_provider_1.IpcProvider\n }, options);\n }\n exports3.getDefaultProvider = getDefaultProvider;\n }\n });\n\n // ../../../node_modules/.pnpm/@ethersproject+solidity@5.8.0/node_modules/@ethersproject/solidity/lib/_version.js\n var require_version24 = __commonJS({\n \"../../../node_modules/.pnpm/@ethersproject+solidity@5.8.0/node_modules/@ethersproject/solidity/lib/_version.js\"(exports3) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n Object.defineProperty(exports3, \"__esModule\", { value: true });\n exports3.version = void 0;\n exports3.version = \"solidity/5.8.0\";\n }\n });\n\n // ../../../node_modules/.pnpm/@ethersproject+solidity@5.8.0/node_modules/@ethersproject/solidity/lib/index.js\n var require_lib30 = __commonJS({\n \"../../../node_modules/.pnpm/@ethersproject+solidity@5.8.0/node_modules/@ethersproject/solidity/lib/index.js\"(exports3) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n Object.defineProperty(exports3, \"__esModule\", { value: true });\n exports3.sha256 = exports3.keccak256 = exports3.pack = void 0;\n var bignumber_1 = require_lib3();\n var bytes_1 = require_lib2();\n var keccak256_1 = require_lib5();\n var sha2_1 = require_lib20();\n var strings_1 = require_lib9();\n var regexBytes = new RegExp(\"^bytes([0-9]+)$\");\n var regexNumber = new RegExp(\"^(u?int)([0-9]*)$\");\n var regexArray = new RegExp(\"^(.*)\\\\[([0-9]*)\\\\]$\");\n var Zeros = \"0000000000000000000000000000000000000000000000000000000000000000\";\n var logger_1 = require_lib();\n var _version_1 = require_version24();\n var logger = new logger_1.Logger(_version_1.version);\n function _pack(type, value, isArray) {\n switch (type) {\n case \"address\":\n if (isArray) {\n return (0, bytes_1.zeroPad)(value, 32);\n }\n return (0, bytes_1.arrayify)(value);\n case \"string\":\n return (0, strings_1.toUtf8Bytes)(value);\n case \"bytes\":\n return (0, bytes_1.arrayify)(value);\n case \"bool\":\n value = value ? \"0x01\" : \"0x00\";\n if (isArray) {\n return (0, bytes_1.zeroPad)(value, 32);\n }\n return (0, bytes_1.arrayify)(value);\n }\n var match = type.match(regexNumber);\n if (match) {\n var size6 = parseInt(match[2] || \"256\");\n if (match[2] && String(size6) !== match[2] || size6 % 8 !== 0 || size6 === 0 || size6 > 256) {\n logger.throwArgumentError(\"invalid number type\", \"type\", type);\n }\n if (isArray) {\n size6 = 256;\n }\n value = bignumber_1.BigNumber.from(value).toTwos(size6);\n return (0, bytes_1.zeroPad)(value, size6 / 8);\n }\n match = type.match(regexBytes);\n if (match) {\n var size6 = parseInt(match[1]);\n if (String(size6) !== match[1] || size6 === 0 || size6 > 32) {\n logger.throwArgumentError(\"invalid bytes type\", \"type\", type);\n }\n if ((0, bytes_1.arrayify)(value).byteLength !== size6) {\n logger.throwArgumentError(\"invalid value for \" + type, \"value\", value);\n }\n if (isArray) {\n return (0, bytes_1.arrayify)((value + Zeros).substring(0, 66));\n }\n return value;\n }\n match = type.match(regexArray);\n if (match && Array.isArray(value)) {\n var baseType_1 = match[1];\n var count = parseInt(match[2] || String(value.length));\n if (count != value.length) {\n logger.throwArgumentError(\"invalid array length for \" + type, \"value\", value);\n }\n var result_1 = [];\n value.forEach(function(value2) {\n result_1.push(_pack(baseType_1, value2, true));\n });\n return (0, bytes_1.concat)(result_1);\n }\n return logger.throwArgumentError(\"invalid type\", \"type\", type);\n }\n function pack(types, values) {\n if (types.length != values.length) {\n logger.throwArgumentError(\"wrong number of values; expected ${ types.length }\", \"values\", values);\n }\n var tight = [];\n types.forEach(function(type, index2) {\n tight.push(_pack(type, values[index2]));\n });\n return (0, bytes_1.hexlify)((0, bytes_1.concat)(tight));\n }\n exports3.pack = pack;\n function keccak2563(types, values) {\n return (0, keccak256_1.keccak256)(pack(types, values));\n }\n exports3.keccak256 = keccak2563;\n function sha2564(types, values) {\n return (0, sha2_1.sha256)(pack(types, values));\n }\n exports3.sha256 = sha2564;\n }\n });\n\n // ../../../node_modules/.pnpm/@ethersproject+units@5.8.0/node_modules/@ethersproject/units/lib/_version.js\n var require_version25 = __commonJS({\n \"../../../node_modules/.pnpm/@ethersproject+units@5.8.0/node_modules/@ethersproject/units/lib/_version.js\"(exports3) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n Object.defineProperty(exports3, \"__esModule\", { value: true });\n exports3.version = void 0;\n exports3.version = \"units/5.8.0\";\n }\n });\n\n // ../../../node_modules/.pnpm/@ethersproject+units@5.8.0/node_modules/@ethersproject/units/lib/index.js\n var require_lib31 = __commonJS({\n \"../../../node_modules/.pnpm/@ethersproject+units@5.8.0/node_modules/@ethersproject/units/lib/index.js\"(exports3) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n Object.defineProperty(exports3, \"__esModule\", { value: true });\n exports3.parseEther = exports3.formatEther = exports3.parseUnits = exports3.formatUnits = exports3.commify = void 0;\n var bignumber_1 = require_lib3();\n var logger_1 = require_lib();\n var _version_1 = require_version25();\n var logger = new logger_1.Logger(_version_1.version);\n var names = [\n \"wei\",\n \"kwei\",\n \"mwei\",\n \"gwei\",\n \"szabo\",\n \"finney\",\n \"ether\"\n ];\n function commify(value) {\n var comps = String(value).split(\".\");\n if (comps.length > 2 || !comps[0].match(/^-?[0-9]*$/) || comps[1] && !comps[1].match(/^[0-9]*$/) || value === \".\" || value === \"-.\") {\n logger.throwArgumentError(\"invalid value\", \"value\", value);\n }\n var whole = comps[0];\n var negative = \"\";\n if (whole.substring(0, 1) === \"-\") {\n negative = \"-\";\n whole = whole.substring(1);\n }\n while (whole.substring(0, 1) === \"0\") {\n whole = whole.substring(1);\n }\n if (whole === \"\") {\n whole = \"0\";\n }\n var suffix = \"\";\n if (comps.length === 2) {\n suffix = \".\" + (comps[1] || \"0\");\n }\n while (suffix.length > 2 && suffix[suffix.length - 1] === \"0\") {\n suffix = suffix.substring(0, suffix.length - 1);\n }\n var formatted = [];\n while (whole.length) {\n if (whole.length <= 3) {\n formatted.unshift(whole);\n break;\n } else {\n var index2 = whole.length - 3;\n formatted.unshift(whole.substring(index2));\n whole = whole.substring(0, index2);\n }\n }\n return negative + formatted.join(\",\") + suffix;\n }\n exports3.commify = commify;\n function formatUnits2(value, unitName) {\n if (typeof unitName === \"string\") {\n var index2 = names.indexOf(unitName);\n if (index2 !== -1) {\n unitName = 3 * index2;\n }\n }\n return (0, bignumber_1.formatFixed)(value, unitName != null ? unitName : 18);\n }\n exports3.formatUnits = formatUnits2;\n function parseUnits(value, unitName) {\n if (typeof value !== \"string\") {\n logger.throwArgumentError(\"value must be a string\", \"value\", value);\n }\n if (typeof unitName === \"string\") {\n var index2 = names.indexOf(unitName);\n if (index2 !== -1) {\n unitName = 3 * index2;\n }\n }\n return (0, bignumber_1.parseFixed)(value, unitName != null ? unitName : 18);\n }\n exports3.parseUnits = parseUnits;\n function formatEther2(wei) {\n return formatUnits2(wei, 18);\n }\n exports3.formatEther = formatEther2;\n function parseEther(ether) {\n return parseUnits(ether, 18);\n }\n exports3.parseEther = parseEther;\n }\n });\n\n // ../../../node_modules/.pnpm/ethers@5.8.0_bufferutil@4.0.9_utf-8-validate@5.0.10/node_modules/ethers/lib/utils.js\n var require_utils6 = __commonJS({\n \"../../../node_modules/.pnpm/ethers@5.8.0_bufferutil@4.0.9_utf-8-validate@5.0.10/node_modules/ethers/lib/utils.js\"(exports3) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n var __createBinding3 = exports3 && exports3.__createBinding || (Object.create ? function(o5, m2, k4, k22) {\n if (k22 === void 0)\n k22 = k4;\n Object.defineProperty(o5, k22, { enumerable: true, get: function() {\n return m2[k4];\n } });\n } : function(o5, m2, k4, k22) {\n if (k22 === void 0)\n k22 = k4;\n o5[k22] = m2[k4];\n });\n var __setModuleDefault3 = exports3 && exports3.__setModuleDefault || (Object.create ? function(o5, v2) {\n Object.defineProperty(o5, \"default\", { enumerable: true, value: v2 });\n } : function(o5, v2) {\n o5[\"default\"] = v2;\n });\n var __importStar3 = exports3 && exports3.__importStar || function(mod3) {\n if (mod3 && mod3.__esModule)\n return mod3;\n var result = {};\n if (mod3 != null) {\n for (var k4 in mod3)\n if (k4 !== \"default\" && Object.prototype.hasOwnProperty.call(mod3, k4))\n __createBinding3(result, mod3, k4);\n }\n __setModuleDefault3(result, mod3);\n return result;\n };\n Object.defineProperty(exports3, \"__esModule\", { value: true });\n exports3.formatBytes32String = exports3.Utf8ErrorFuncs = exports3.toUtf8String = exports3.toUtf8CodePoints = exports3.toUtf8Bytes = exports3._toEscapedUtf8String = exports3.nameprep = exports3.hexDataSlice = exports3.hexDataLength = exports3.hexZeroPad = exports3.hexValue = exports3.hexStripZeros = exports3.hexConcat = exports3.isHexString = exports3.hexlify = exports3.base64 = exports3.base58 = exports3.TransactionDescription = exports3.LogDescription = exports3.Interface = exports3.SigningKey = exports3.HDNode = exports3.defaultPath = exports3.isBytesLike = exports3.isBytes = exports3.zeroPad = exports3.stripZeros = exports3.concat = exports3.arrayify = exports3.shallowCopy = exports3.resolveProperties = exports3.getStatic = exports3.defineReadOnly = exports3.deepCopy = exports3.checkProperties = exports3.poll = exports3.fetchJson = exports3._fetchData = exports3.RLP = exports3.Logger = exports3.checkResultErrors = exports3.FormatTypes = exports3.ParamType = exports3.FunctionFragment = exports3.EventFragment = exports3.ErrorFragment = exports3.ConstructorFragment = exports3.Fragment = exports3.defaultAbiCoder = exports3.AbiCoder = void 0;\n exports3.Indexed = exports3.Utf8ErrorReason = exports3.UnicodeNormalizationForm = exports3.SupportedAlgorithm = exports3.mnemonicToSeed = exports3.isValidMnemonic = exports3.entropyToMnemonic = exports3.mnemonicToEntropy = exports3.getAccountPath = exports3.verifyTypedData = exports3.verifyMessage = exports3.recoverPublicKey = exports3.computePublicKey = exports3.recoverAddress = exports3.computeAddress = exports3.getJsonWalletAddress = exports3.TransactionTypes = exports3.serializeTransaction = exports3.parseTransaction = exports3.accessListify = exports3.joinSignature = exports3.splitSignature = exports3.soliditySha256 = exports3.solidityKeccak256 = exports3.solidityPack = exports3.shuffled = exports3.randomBytes = exports3.sha512 = exports3.sha256 = exports3.ripemd160 = exports3.keccak256 = exports3.computeHmac = exports3.commify = exports3.parseUnits = exports3.formatUnits = exports3.parseEther = exports3.formatEther = exports3.isAddress = exports3.getCreate2Address = exports3.getContractAddress = exports3.getIcapAddress = exports3.getAddress = exports3._TypedDataEncoder = exports3.id = exports3.isValidName = exports3.namehash = exports3.hashMessage = exports3.dnsEncode = exports3.parseBytes32String = void 0;\n var abi_1 = require_lib13();\n Object.defineProperty(exports3, \"AbiCoder\", { enumerable: true, get: function() {\n return abi_1.AbiCoder;\n } });\n Object.defineProperty(exports3, \"checkResultErrors\", { enumerable: true, get: function() {\n return abi_1.checkResultErrors;\n } });\n Object.defineProperty(exports3, \"ConstructorFragment\", { enumerable: true, get: function() {\n return abi_1.ConstructorFragment;\n } });\n Object.defineProperty(exports3, \"defaultAbiCoder\", { enumerable: true, get: function() {\n return abi_1.defaultAbiCoder;\n } });\n Object.defineProperty(exports3, \"ErrorFragment\", { enumerable: true, get: function() {\n return abi_1.ErrorFragment;\n } });\n Object.defineProperty(exports3, \"EventFragment\", { enumerable: true, get: function() {\n return abi_1.EventFragment;\n } });\n Object.defineProperty(exports3, \"FormatTypes\", { enumerable: true, get: function() {\n return abi_1.FormatTypes;\n } });\n Object.defineProperty(exports3, \"Fragment\", { enumerable: true, get: function() {\n return abi_1.Fragment;\n } });\n Object.defineProperty(exports3, \"FunctionFragment\", { enumerable: true, get: function() {\n return abi_1.FunctionFragment;\n } });\n Object.defineProperty(exports3, \"Indexed\", { enumerable: true, get: function() {\n return abi_1.Indexed;\n } });\n Object.defineProperty(exports3, \"Interface\", { enumerable: true, get: function() {\n return abi_1.Interface;\n } });\n Object.defineProperty(exports3, \"LogDescription\", { enumerable: true, get: function() {\n return abi_1.LogDescription;\n } });\n Object.defineProperty(exports3, \"ParamType\", { enumerable: true, get: function() {\n return abi_1.ParamType;\n } });\n Object.defineProperty(exports3, \"TransactionDescription\", { enumerable: true, get: function() {\n return abi_1.TransactionDescription;\n } });\n var address_1 = require_lib7();\n Object.defineProperty(exports3, \"getAddress\", { enumerable: true, get: function() {\n return address_1.getAddress;\n } });\n Object.defineProperty(exports3, \"getCreate2Address\", { enumerable: true, get: function() {\n return address_1.getCreate2Address;\n } });\n Object.defineProperty(exports3, \"getContractAddress\", { enumerable: true, get: function() {\n return address_1.getContractAddress;\n } });\n Object.defineProperty(exports3, \"getIcapAddress\", { enumerable: true, get: function() {\n return address_1.getIcapAddress;\n } });\n Object.defineProperty(exports3, \"isAddress\", { enumerable: true, get: function() {\n return address_1.isAddress;\n } });\n var base64 = __importStar3(require_lib10());\n exports3.base64 = base64;\n var basex_1 = require_lib19();\n Object.defineProperty(exports3, \"base58\", { enumerable: true, get: function() {\n return basex_1.Base58;\n } });\n var bytes_1 = require_lib2();\n Object.defineProperty(exports3, \"arrayify\", { enumerable: true, get: function() {\n return bytes_1.arrayify;\n } });\n Object.defineProperty(exports3, \"concat\", { enumerable: true, get: function() {\n return bytes_1.concat;\n } });\n Object.defineProperty(exports3, \"hexConcat\", { enumerable: true, get: function() {\n return bytes_1.hexConcat;\n } });\n Object.defineProperty(exports3, \"hexDataSlice\", { enumerable: true, get: function() {\n return bytes_1.hexDataSlice;\n } });\n Object.defineProperty(exports3, \"hexDataLength\", { enumerable: true, get: function() {\n return bytes_1.hexDataLength;\n } });\n Object.defineProperty(exports3, \"hexlify\", { enumerable: true, get: function() {\n return bytes_1.hexlify;\n } });\n Object.defineProperty(exports3, \"hexStripZeros\", { enumerable: true, get: function() {\n return bytes_1.hexStripZeros;\n } });\n Object.defineProperty(exports3, \"hexValue\", { enumerable: true, get: function() {\n return bytes_1.hexValue;\n } });\n Object.defineProperty(exports3, \"hexZeroPad\", { enumerable: true, get: function() {\n return bytes_1.hexZeroPad;\n } });\n Object.defineProperty(exports3, \"isBytes\", { enumerable: true, get: function() {\n return bytes_1.isBytes;\n } });\n Object.defineProperty(exports3, \"isBytesLike\", { enumerable: true, get: function() {\n return bytes_1.isBytesLike;\n } });\n Object.defineProperty(exports3, \"isHexString\", { enumerable: true, get: function() {\n return bytes_1.isHexString;\n } });\n Object.defineProperty(exports3, \"joinSignature\", { enumerable: true, get: function() {\n return bytes_1.joinSignature;\n } });\n Object.defineProperty(exports3, \"zeroPad\", { enumerable: true, get: function() {\n return bytes_1.zeroPad;\n } });\n Object.defineProperty(exports3, \"splitSignature\", { enumerable: true, get: function() {\n return bytes_1.splitSignature;\n } });\n Object.defineProperty(exports3, \"stripZeros\", { enumerable: true, get: function() {\n return bytes_1.stripZeros;\n } });\n var hash_1 = require_lib12();\n Object.defineProperty(exports3, \"_TypedDataEncoder\", { enumerable: true, get: function() {\n return hash_1._TypedDataEncoder;\n } });\n Object.defineProperty(exports3, \"dnsEncode\", { enumerable: true, get: function() {\n return hash_1.dnsEncode;\n } });\n Object.defineProperty(exports3, \"hashMessage\", { enumerable: true, get: function() {\n return hash_1.hashMessage;\n } });\n Object.defineProperty(exports3, \"id\", { enumerable: true, get: function() {\n return hash_1.id;\n } });\n Object.defineProperty(exports3, \"isValidName\", { enumerable: true, get: function() {\n return hash_1.isValidName;\n } });\n Object.defineProperty(exports3, \"namehash\", { enumerable: true, get: function() {\n return hash_1.namehash;\n } });\n var hdnode_1 = require_lib23();\n Object.defineProperty(exports3, \"defaultPath\", { enumerable: true, get: function() {\n return hdnode_1.defaultPath;\n } });\n Object.defineProperty(exports3, \"entropyToMnemonic\", { enumerable: true, get: function() {\n return hdnode_1.entropyToMnemonic;\n } });\n Object.defineProperty(exports3, \"getAccountPath\", { enumerable: true, get: function() {\n return hdnode_1.getAccountPath;\n } });\n Object.defineProperty(exports3, \"HDNode\", { enumerable: true, get: function() {\n return hdnode_1.HDNode;\n } });\n Object.defineProperty(exports3, \"isValidMnemonic\", { enumerable: true, get: function() {\n return hdnode_1.isValidMnemonic;\n } });\n Object.defineProperty(exports3, \"mnemonicToEntropy\", { enumerable: true, get: function() {\n return hdnode_1.mnemonicToEntropy;\n } });\n Object.defineProperty(exports3, \"mnemonicToSeed\", { enumerable: true, get: function() {\n return hdnode_1.mnemonicToSeed;\n } });\n var json_wallets_1 = require_lib25();\n Object.defineProperty(exports3, \"getJsonWalletAddress\", { enumerable: true, get: function() {\n return json_wallets_1.getJsonWalletAddress;\n } });\n var keccak256_1 = require_lib5();\n Object.defineProperty(exports3, \"keccak256\", { enumerable: true, get: function() {\n return keccak256_1.keccak256;\n } });\n var logger_1 = require_lib();\n Object.defineProperty(exports3, \"Logger\", { enumerable: true, get: function() {\n return logger_1.Logger;\n } });\n var sha2_1 = require_lib20();\n Object.defineProperty(exports3, \"computeHmac\", { enumerable: true, get: function() {\n return sha2_1.computeHmac;\n } });\n Object.defineProperty(exports3, \"ripemd160\", { enumerable: true, get: function() {\n return sha2_1.ripemd160;\n } });\n Object.defineProperty(exports3, \"sha256\", { enumerable: true, get: function() {\n return sha2_1.sha256;\n } });\n Object.defineProperty(exports3, \"sha512\", { enumerable: true, get: function() {\n return sha2_1.sha512;\n } });\n var solidity_1 = require_lib30();\n Object.defineProperty(exports3, \"solidityKeccak256\", { enumerable: true, get: function() {\n return solidity_1.keccak256;\n } });\n Object.defineProperty(exports3, \"solidityPack\", { enumerable: true, get: function() {\n return solidity_1.pack;\n } });\n Object.defineProperty(exports3, \"soliditySha256\", { enumerable: true, get: function() {\n return solidity_1.sha256;\n } });\n var random_1 = require_lib24();\n Object.defineProperty(exports3, \"randomBytes\", { enumerable: true, get: function() {\n return random_1.randomBytes;\n } });\n Object.defineProperty(exports3, \"shuffled\", { enumerable: true, get: function() {\n return random_1.shuffled;\n } });\n var properties_1 = require_lib4();\n Object.defineProperty(exports3, \"checkProperties\", { enumerable: true, get: function() {\n return properties_1.checkProperties;\n } });\n Object.defineProperty(exports3, \"deepCopy\", { enumerable: true, get: function() {\n return properties_1.deepCopy;\n } });\n Object.defineProperty(exports3, \"defineReadOnly\", { enumerable: true, get: function() {\n return properties_1.defineReadOnly;\n } });\n Object.defineProperty(exports3, \"getStatic\", { enumerable: true, get: function() {\n return properties_1.getStatic;\n } });\n Object.defineProperty(exports3, \"resolveProperties\", { enumerable: true, get: function() {\n return properties_1.resolveProperties;\n } });\n Object.defineProperty(exports3, \"shallowCopy\", { enumerable: true, get: function() {\n return properties_1.shallowCopy;\n } });\n var RLP = __importStar3(require_lib6());\n exports3.RLP = RLP;\n var signing_key_1 = require_lib16();\n Object.defineProperty(exports3, \"computePublicKey\", { enumerable: true, get: function() {\n return signing_key_1.computePublicKey;\n } });\n Object.defineProperty(exports3, \"recoverPublicKey\", { enumerable: true, get: function() {\n return signing_key_1.recoverPublicKey;\n } });\n Object.defineProperty(exports3, \"SigningKey\", { enumerable: true, get: function() {\n return signing_key_1.SigningKey;\n } });\n var strings_1 = require_lib9();\n Object.defineProperty(exports3, \"formatBytes32String\", { enumerable: true, get: function() {\n return strings_1.formatBytes32String;\n } });\n Object.defineProperty(exports3, \"nameprep\", { enumerable: true, get: function() {\n return strings_1.nameprep;\n } });\n Object.defineProperty(exports3, \"parseBytes32String\", { enumerable: true, get: function() {\n return strings_1.parseBytes32String;\n } });\n Object.defineProperty(exports3, \"_toEscapedUtf8String\", { enumerable: true, get: function() {\n return strings_1._toEscapedUtf8String;\n } });\n Object.defineProperty(exports3, \"toUtf8Bytes\", { enumerable: true, get: function() {\n return strings_1.toUtf8Bytes;\n } });\n Object.defineProperty(exports3, \"toUtf8CodePoints\", { enumerable: true, get: function() {\n return strings_1.toUtf8CodePoints;\n } });\n Object.defineProperty(exports3, \"toUtf8String\", { enumerable: true, get: function() {\n return strings_1.toUtf8String;\n } });\n Object.defineProperty(exports3, \"Utf8ErrorFuncs\", { enumerable: true, get: function() {\n return strings_1.Utf8ErrorFuncs;\n } });\n var transactions_1 = require_lib17();\n Object.defineProperty(exports3, \"accessListify\", { enumerable: true, get: function() {\n return transactions_1.accessListify;\n } });\n Object.defineProperty(exports3, \"computeAddress\", { enumerable: true, get: function() {\n return transactions_1.computeAddress;\n } });\n Object.defineProperty(exports3, \"parseTransaction\", { enumerable: true, get: function() {\n return transactions_1.parse;\n } });\n Object.defineProperty(exports3, \"recoverAddress\", { enumerable: true, get: function() {\n return transactions_1.recoverAddress;\n } });\n Object.defineProperty(exports3, \"serializeTransaction\", { enumerable: true, get: function() {\n return transactions_1.serialize;\n } });\n Object.defineProperty(exports3, \"TransactionTypes\", { enumerable: true, get: function() {\n return transactions_1.TransactionTypes;\n } });\n var units_1 = require_lib31();\n Object.defineProperty(exports3, \"commify\", { enumerable: true, get: function() {\n return units_1.commify;\n } });\n Object.defineProperty(exports3, \"formatEther\", { enumerable: true, get: function() {\n return units_1.formatEther;\n } });\n Object.defineProperty(exports3, \"parseEther\", { enumerable: true, get: function() {\n return units_1.parseEther;\n } });\n Object.defineProperty(exports3, \"formatUnits\", { enumerable: true, get: function() {\n return units_1.formatUnits;\n } });\n Object.defineProperty(exports3, \"parseUnits\", { enumerable: true, get: function() {\n return units_1.parseUnits;\n } });\n var wallet_1 = require_lib26();\n Object.defineProperty(exports3, \"verifyMessage\", { enumerable: true, get: function() {\n return wallet_1.verifyMessage;\n } });\n Object.defineProperty(exports3, \"verifyTypedData\", { enumerable: true, get: function() {\n return wallet_1.verifyTypedData;\n } });\n var web_1 = require_lib28();\n Object.defineProperty(exports3, \"_fetchData\", { enumerable: true, get: function() {\n return web_1._fetchData;\n } });\n Object.defineProperty(exports3, \"fetchJson\", { enumerable: true, get: function() {\n return web_1.fetchJson;\n } });\n Object.defineProperty(exports3, \"poll\", { enumerable: true, get: function() {\n return web_1.poll;\n } });\n var sha2_2 = require_lib20();\n Object.defineProperty(exports3, \"SupportedAlgorithm\", { enumerable: true, get: function() {\n return sha2_2.SupportedAlgorithm;\n } });\n var strings_2 = require_lib9();\n Object.defineProperty(exports3, \"UnicodeNormalizationForm\", { enumerable: true, get: function() {\n return strings_2.UnicodeNormalizationForm;\n } });\n Object.defineProperty(exports3, \"Utf8ErrorReason\", { enumerable: true, get: function() {\n return strings_2.Utf8ErrorReason;\n } });\n }\n });\n\n // ../../../node_modules/.pnpm/ethers@5.8.0_bufferutil@4.0.9_utf-8-validate@5.0.10/node_modules/ethers/lib/_version.js\n var require_version26 = __commonJS({\n \"../../../node_modules/.pnpm/ethers@5.8.0_bufferutil@4.0.9_utf-8-validate@5.0.10/node_modules/ethers/lib/_version.js\"(exports3) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n Object.defineProperty(exports3, \"__esModule\", { value: true });\n exports3.version = void 0;\n exports3.version = \"ethers/5.8.0\";\n }\n });\n\n // ../../../node_modules/.pnpm/ethers@5.8.0_bufferutil@4.0.9_utf-8-validate@5.0.10/node_modules/ethers/lib/ethers.js\n var require_ethers = __commonJS({\n \"../../../node_modules/.pnpm/ethers@5.8.0_bufferutil@4.0.9_utf-8-validate@5.0.10/node_modules/ethers/lib/ethers.js\"(exports3) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n var __createBinding3 = exports3 && exports3.__createBinding || (Object.create ? function(o5, m2, k4, k22) {\n if (k22 === void 0)\n k22 = k4;\n Object.defineProperty(o5, k22, { enumerable: true, get: function() {\n return m2[k4];\n } });\n } : function(o5, m2, k4, k22) {\n if (k22 === void 0)\n k22 = k4;\n o5[k22] = m2[k4];\n });\n var __setModuleDefault3 = exports3 && exports3.__setModuleDefault || (Object.create ? function(o5, v2) {\n Object.defineProperty(o5, \"default\", { enumerable: true, value: v2 });\n } : function(o5, v2) {\n o5[\"default\"] = v2;\n });\n var __importStar3 = exports3 && exports3.__importStar || function(mod3) {\n if (mod3 && mod3.__esModule)\n return mod3;\n var result = {};\n if (mod3 != null) {\n for (var k4 in mod3)\n if (k4 !== \"default\" && Object.prototype.hasOwnProperty.call(mod3, k4))\n __createBinding3(result, mod3, k4);\n }\n __setModuleDefault3(result, mod3);\n return result;\n };\n Object.defineProperty(exports3, \"__esModule\", { value: true });\n exports3.Wordlist = exports3.version = exports3.wordlists = exports3.utils = exports3.logger = exports3.errors = exports3.constants = exports3.FixedNumber = exports3.BigNumber = exports3.ContractFactory = exports3.Contract = exports3.BaseContract = exports3.providers = exports3.getDefaultProvider = exports3.VoidSigner = exports3.Wallet = exports3.Signer = void 0;\n var contracts_1 = require_lib18();\n Object.defineProperty(exports3, \"BaseContract\", { enumerable: true, get: function() {\n return contracts_1.BaseContract;\n } });\n Object.defineProperty(exports3, \"Contract\", { enumerable: true, get: function() {\n return contracts_1.Contract;\n } });\n Object.defineProperty(exports3, \"ContractFactory\", { enumerable: true, get: function() {\n return contracts_1.ContractFactory;\n } });\n var bignumber_1 = require_lib3();\n Object.defineProperty(exports3, \"BigNumber\", { enumerable: true, get: function() {\n return bignumber_1.BigNumber;\n } });\n Object.defineProperty(exports3, \"FixedNumber\", { enumerable: true, get: function() {\n return bignumber_1.FixedNumber;\n } });\n var abstract_signer_1 = require_lib15();\n Object.defineProperty(exports3, \"Signer\", { enumerable: true, get: function() {\n return abstract_signer_1.Signer;\n } });\n Object.defineProperty(exports3, \"VoidSigner\", { enumerable: true, get: function() {\n return abstract_signer_1.VoidSigner;\n } });\n var wallet_1 = require_lib26();\n Object.defineProperty(exports3, \"Wallet\", { enumerable: true, get: function() {\n return wallet_1.Wallet;\n } });\n var constants = __importStar3(require_lib8());\n exports3.constants = constants;\n var providers = __importStar3(require_lib29());\n exports3.providers = providers;\n var providers_1 = require_lib29();\n Object.defineProperty(exports3, \"getDefaultProvider\", { enumerable: true, get: function() {\n return providers_1.getDefaultProvider;\n } });\n var wordlists_1 = require_lib22();\n Object.defineProperty(exports3, \"Wordlist\", { enumerable: true, get: function() {\n return wordlists_1.Wordlist;\n } });\n Object.defineProperty(exports3, \"wordlists\", { enumerable: true, get: function() {\n return wordlists_1.wordlists;\n } });\n var utils = __importStar3(require_utils6());\n exports3.utils = utils;\n var logger_1 = require_lib();\n Object.defineProperty(exports3, \"errors\", { enumerable: true, get: function() {\n return logger_1.ErrorCode;\n } });\n var _version_1 = require_version26();\n Object.defineProperty(exports3, \"version\", { enumerable: true, get: function() {\n return _version_1.version;\n } });\n var logger = new logger_1.Logger(_version_1.version);\n exports3.logger = logger;\n }\n });\n\n // ../../../node_modules/.pnpm/ethers@5.8.0_bufferutil@4.0.9_utf-8-validate@5.0.10/node_modules/ethers/lib/index.js\n var require_lib32 = __commonJS({\n \"../../../node_modules/.pnpm/ethers@5.8.0_bufferutil@4.0.9_utf-8-validate@5.0.10/node_modules/ethers/lib/index.js\"(exports3) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n var __createBinding3 = exports3 && exports3.__createBinding || (Object.create ? function(o5, m2, k4, k22) {\n if (k22 === void 0)\n k22 = k4;\n Object.defineProperty(o5, k22, { enumerable: true, get: function() {\n return m2[k4];\n } });\n } : function(o5, m2, k4, k22) {\n if (k22 === void 0)\n k22 = k4;\n o5[k22] = m2[k4];\n });\n var __setModuleDefault3 = exports3 && exports3.__setModuleDefault || (Object.create ? function(o5, v2) {\n Object.defineProperty(o5, \"default\", { enumerable: true, value: v2 });\n } : function(o5, v2) {\n o5[\"default\"] = v2;\n });\n var __importStar3 = exports3 && exports3.__importStar || function(mod3) {\n if (mod3 && mod3.__esModule)\n return mod3;\n var result = {};\n if (mod3 != null) {\n for (var k4 in mod3)\n if (k4 !== \"default\" && Object.prototype.hasOwnProperty.call(mod3, k4))\n __createBinding3(result, mod3, k4);\n }\n __setModuleDefault3(result, mod3);\n return result;\n };\n Object.defineProperty(exports3, \"__esModule\", { value: true });\n exports3.Wordlist = exports3.version = exports3.wordlists = exports3.utils = exports3.logger = exports3.errors = exports3.constants = exports3.FixedNumber = exports3.BigNumber = exports3.ContractFactory = exports3.Contract = exports3.BaseContract = exports3.providers = exports3.getDefaultProvider = exports3.VoidSigner = exports3.Wallet = exports3.Signer = exports3.ethers = void 0;\n var ethers16 = __importStar3(require_ethers());\n exports3.ethers = ethers16;\n try {\n anyGlobal = window;\n if (anyGlobal._ethers == null) {\n anyGlobal._ethers = ethers16;\n }\n } catch (error) {\n }\n var anyGlobal;\n var ethers_1 = require_ethers();\n Object.defineProperty(exports3, \"Signer\", { enumerable: true, get: function() {\n return ethers_1.Signer;\n } });\n Object.defineProperty(exports3, \"Wallet\", { enumerable: true, get: function() {\n return ethers_1.Wallet;\n } });\n Object.defineProperty(exports3, \"VoidSigner\", { enumerable: true, get: function() {\n return ethers_1.VoidSigner;\n } });\n Object.defineProperty(exports3, \"getDefaultProvider\", { enumerable: true, get: function() {\n return ethers_1.getDefaultProvider;\n } });\n Object.defineProperty(exports3, \"providers\", { enumerable: true, get: function() {\n return ethers_1.providers;\n } });\n Object.defineProperty(exports3, \"BaseContract\", { enumerable: true, get: function() {\n return ethers_1.BaseContract;\n } });\n Object.defineProperty(exports3, \"Contract\", { enumerable: true, get: function() {\n return ethers_1.Contract;\n } });\n Object.defineProperty(exports3, \"ContractFactory\", { enumerable: true, get: function() {\n return ethers_1.ContractFactory;\n } });\n Object.defineProperty(exports3, \"BigNumber\", { enumerable: true, get: function() {\n return ethers_1.BigNumber;\n } });\n Object.defineProperty(exports3, \"FixedNumber\", { enumerable: true, get: function() {\n return ethers_1.FixedNumber;\n } });\n Object.defineProperty(exports3, \"constants\", { enumerable: true, get: function() {\n return ethers_1.constants;\n } });\n Object.defineProperty(exports3, \"errors\", { enumerable: true, get: function() {\n return ethers_1.errors;\n } });\n Object.defineProperty(exports3, \"logger\", { enumerable: true, get: function() {\n return ethers_1.logger;\n } });\n Object.defineProperty(exports3, \"utils\", { enumerable: true, get: function() {\n return ethers_1.utils;\n } });\n Object.defineProperty(exports3, \"wordlists\", { enumerable: true, get: function() {\n return ethers_1.wordlists;\n } });\n Object.defineProperty(exports3, \"version\", { enumerable: true, get: function() {\n return ethers_1.version;\n } });\n Object.defineProperty(exports3, \"Wordlist\", { enumerable: true, get: function() {\n return ethers_1.Wordlist;\n } });\n }\n });\n\n // ../../libs/ability-sdk/dist/src/lib/abilityCore/helpers/getMappedAbilityPolicyParams.js\n var require_getMappedAbilityPolicyParams = __commonJS({\n \"../../libs/ability-sdk/dist/src/lib/abilityCore/helpers/getMappedAbilityPolicyParams.js\"(exports3) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n Object.defineProperty(exports3, \"__esModule\", { value: true });\n exports3.getMappedAbilityPolicyParams = getMappedAbilityPolicyParams;\n function getMappedAbilityPolicyParams({ abilityParameterMappings, parsedAbilityParams }) {\n const mappedAbilityParams = {};\n for (const [abilityParamKey, policyParamKey] of Object.entries(abilityParameterMappings)) {\n if (!policyParamKey) {\n throw new Error(`Missing policy param key for ability param \"${abilityParamKey}\" (evaluateSupportedPolicies)`);\n }\n if (!(abilityParamKey in parsedAbilityParams)) {\n throw new Error(`Ability param \"${abilityParamKey}\" expected in abilityParams but was not provided`);\n }\n mappedAbilityParams[policyParamKey] = parsedAbilityParams[abilityParamKey];\n }\n return mappedAbilityParams;\n }\n }\n });\n\n // ../../libs/ability-sdk/dist/src/lib/abilityCore/helpers/getPkpInfo.js\n var require_getPkpInfo = __commonJS({\n \"../../libs/ability-sdk/dist/src/lib/abilityCore/helpers/getPkpInfo.js\"(exports3) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n Object.defineProperty(exports3, \"__esModule\", { value: true });\n exports3.getPkpInfo = void 0;\n var ethers_1 = require_lib32();\n var getPkpInfo = async ({ litPubkeyRouterAddress, yellowstoneRpcUrl, pkpEthAddress }) => {\n try {\n const PUBKEY_ROUTER_ABI = [\n \"function ethAddressToPkpId(address ethAddress) public view returns (uint256)\",\n \"function getPubkey(uint256 tokenId) public view returns (bytes memory)\"\n ];\n const pubkeyRouter = new ethers_1.ethers.Contract(litPubkeyRouterAddress, PUBKEY_ROUTER_ABI, new ethers_1.ethers.providers.StaticJsonRpcProvider(yellowstoneRpcUrl));\n const pkpTokenId = await pubkeyRouter.ethAddressToPkpId(pkpEthAddress);\n const publicKey = await pubkeyRouter.getPubkey(pkpTokenId);\n return {\n tokenId: pkpTokenId.toString(),\n ethAddress: pkpEthAddress,\n publicKey: publicKey.toString(\"hex\")\n };\n } catch (error) {\n throw new Error(`Error getting PKP info for PKP Eth Address: ${pkpEthAddress} using Lit Pubkey Router: ${litPubkeyRouterAddress} and Yellowstone RPC URL: ${yellowstoneRpcUrl}: ${error instanceof Error ? error.message : String(error)}`);\n }\n };\n exports3.getPkpInfo = getPkpInfo;\n }\n });\n\n // ../../libs/ability-sdk/dist/src/lib/abilityCore/helpers/supportedPoliciesForAbility.js\n var require_supportedPoliciesForAbility = __commonJS({\n \"../../libs/ability-sdk/dist/src/lib/abilityCore/helpers/supportedPoliciesForAbility.js\"(exports3) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n Object.defineProperty(exports3, \"__esModule\", { value: true });\n exports3.supportedPoliciesForAbility = supportedPoliciesForAbility2;\n var assertSupportedAbilityVersion_1 = require_assertSupportedAbilityVersion();\n function supportedPoliciesForAbility2(policies) {\n const policyByPackageName = {};\n const policyByIpfsCid = {};\n const cidToPackageName = /* @__PURE__ */ new Map();\n const packageNameToCid = /* @__PURE__ */ new Map();\n for (const policy of policies) {\n const { vincentAbilityApiVersion: vincentAbilityApiVersion2 } = policy;\n (0, assertSupportedAbilityVersion_1.assertSupportedAbilityVersion)(vincentAbilityApiVersion2);\n const pkg = policy.vincentPolicy.packageName;\n const cid = policy.ipfsCid;\n if (!pkg)\n throw new Error(\"Missing policy packageName\");\n if (pkg in policyByPackageName) {\n throw new Error(`Duplicate policy packageName: ${pkg}`);\n }\n policyByPackageName[pkg] = policy;\n policyByIpfsCid[cid] = policy;\n cidToPackageName.set(cid, pkg);\n packageNameToCid.set(pkg, cid);\n }\n return {\n policyByPackageName,\n policyByIpfsCid,\n cidToPackageName,\n packageNameToCid\n };\n }\n }\n });\n\n // ../../libs/ability-sdk/dist/src/lib/abilityCore/helpers/index.js\n var require_helpers2 = __commonJS({\n \"../../libs/ability-sdk/dist/src/lib/abilityCore/helpers/index.js\"(exports3) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n Object.defineProperty(exports3, \"__esModule\", { value: true });\n exports3.supportedPoliciesForAbility = exports3.getPkpInfo = exports3.getMappedAbilityPolicyParams = void 0;\n var getMappedAbilityPolicyParams_1 = require_getMappedAbilityPolicyParams();\n Object.defineProperty(exports3, \"getMappedAbilityPolicyParams\", { enumerable: true, get: function() {\n return getMappedAbilityPolicyParams_1.getMappedAbilityPolicyParams;\n } });\n var getPkpInfo_1 = require_getPkpInfo();\n Object.defineProperty(exports3, \"getPkpInfo\", { enumerable: true, get: function() {\n return getPkpInfo_1.getPkpInfo;\n } });\n var supportedPoliciesForAbility_1 = require_supportedPoliciesForAbility();\n Object.defineProperty(exports3, \"supportedPoliciesForAbility\", { enumerable: true, get: function() {\n return supportedPoliciesForAbility_1.supportedPoliciesForAbility;\n } });\n }\n });\n\n // ../../../node_modules/.pnpm/tslib@2.8.1/node_modules/tslib/tslib.es6.mjs\n var tslib_es6_exports = {};\n __export(tslib_es6_exports, {\n __addDisposableResource: () => __addDisposableResource,\n __assign: () => __assign,\n __asyncDelegator: () => __asyncDelegator,\n __asyncGenerator: () => __asyncGenerator,\n __asyncValues: () => __asyncValues,\n __await: () => __await,\n __awaiter: () => __awaiter,\n __classPrivateFieldGet: () => __classPrivateFieldGet,\n __classPrivateFieldIn: () => __classPrivateFieldIn,\n __classPrivateFieldSet: () => __classPrivateFieldSet,\n __createBinding: () => __createBinding,\n __decorate: () => __decorate,\n __disposeResources: () => __disposeResources,\n __esDecorate: () => __esDecorate,\n __exportStar: () => __exportStar,\n __extends: () => __extends,\n __generator: () => __generator,\n __importDefault: () => __importDefault,\n __importStar: () => __importStar,\n __makeTemplateObject: () => __makeTemplateObject,\n __metadata: () => __metadata,\n __param: () => __param,\n __propKey: () => __propKey,\n __read: () => __read,\n __rest: () => __rest,\n __rewriteRelativeImportExtension: () => __rewriteRelativeImportExtension,\n __runInitializers: () => __runInitializers,\n __setFunctionName: () => __setFunctionName,\n __spread: () => __spread,\n __spreadArray: () => __spreadArray,\n __spreadArrays: () => __spreadArrays,\n __values: () => __values,\n default: () => tslib_es6_default\n });\n function __extends(d5, b4) {\n if (typeof b4 !== \"function\" && b4 !== null)\n throw new TypeError(\"Class extends value \" + String(b4) + \" is not a constructor or null\");\n extendStatics(d5, b4);\n function __() {\n this.constructor = d5;\n }\n d5.prototype = b4 === null ? Object.create(b4) : (__.prototype = b4.prototype, new __());\n }\n function __rest(s4, e3) {\n var t3 = {};\n for (var p4 in s4)\n if (Object.prototype.hasOwnProperty.call(s4, p4) && e3.indexOf(p4) < 0)\n t3[p4] = s4[p4];\n if (s4 != null && typeof Object.getOwnPropertySymbols === \"function\")\n for (var i3 = 0, p4 = Object.getOwnPropertySymbols(s4); i3 < p4.length; i3++) {\n if (e3.indexOf(p4[i3]) < 0 && Object.prototype.propertyIsEnumerable.call(s4, p4[i3]))\n t3[p4[i3]] = s4[p4[i3]];\n }\n return t3;\n }\n function __decorate(decorators, target, key, desc) {\n var c4 = arguments.length, r2 = c4 < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d5;\n if (typeof Reflect === \"object\" && typeof Reflect.decorate === \"function\")\n r2 = Reflect.decorate(decorators, target, key, desc);\n else\n for (var i3 = decorators.length - 1; i3 >= 0; i3--)\n if (d5 = decorators[i3])\n r2 = (c4 < 3 ? d5(r2) : c4 > 3 ? d5(target, key, r2) : d5(target, key)) || r2;\n return c4 > 3 && r2 && Object.defineProperty(target, key, r2), r2;\n }\n function __param(paramIndex, decorator) {\n return function(target, key) {\n decorator(target, key, paramIndex);\n };\n }\n function __esDecorate(ctor, descriptorIn, decorators, contextIn, initializers, extraInitializers) {\n function accept(f6) {\n if (f6 !== void 0 && typeof f6 !== \"function\")\n throw new TypeError(\"Function expected\");\n return f6;\n }\n var kind = contextIn.kind, key = kind === \"getter\" ? \"get\" : kind === \"setter\" ? \"set\" : \"value\";\n var target = !descriptorIn && ctor ? contextIn[\"static\"] ? ctor : ctor.prototype : null;\n var descriptor = descriptorIn || (target ? Object.getOwnPropertyDescriptor(target, contextIn.name) : {});\n var _2, done = false;\n for (var i3 = decorators.length - 1; i3 >= 0; i3--) {\n var context2 = {};\n for (var p4 in contextIn)\n context2[p4] = p4 === \"access\" ? {} : contextIn[p4];\n for (var p4 in contextIn.access)\n context2.access[p4] = contextIn.access[p4];\n context2.addInitializer = function(f6) {\n if (done)\n throw new TypeError(\"Cannot add initializers after decoration has completed\");\n extraInitializers.push(accept(f6 || null));\n };\n var result = (0, decorators[i3])(kind === \"accessor\" ? { get: descriptor.get, set: descriptor.set } : descriptor[key], context2);\n if (kind === \"accessor\") {\n if (result === void 0)\n continue;\n if (result === null || typeof result !== \"object\")\n throw new TypeError(\"Object expected\");\n if (_2 = accept(result.get))\n descriptor.get = _2;\n if (_2 = accept(result.set))\n descriptor.set = _2;\n if (_2 = accept(result.init))\n initializers.unshift(_2);\n } else if (_2 = accept(result)) {\n if (kind === \"field\")\n initializers.unshift(_2);\n else\n descriptor[key] = _2;\n }\n }\n if (target)\n Object.defineProperty(target, contextIn.name, descriptor);\n done = true;\n }\n function __runInitializers(thisArg, initializers, value) {\n var useValue = arguments.length > 2;\n for (var i3 = 0; i3 < initializers.length; i3++) {\n value = useValue ? initializers[i3].call(thisArg, value) : initializers[i3].call(thisArg);\n }\n return useValue ? value : void 0;\n }\n function __propKey(x4) {\n return typeof x4 === \"symbol\" ? x4 : \"\".concat(x4);\n }\n function __setFunctionName(f6, name, prefix) {\n if (typeof name === \"symbol\")\n name = name.description ? \"[\".concat(name.description, \"]\") : \"\";\n return Object.defineProperty(f6, \"name\", { configurable: true, value: prefix ? \"\".concat(prefix, \" \", name) : name });\n }\n function __metadata(metadataKey, metadataValue) {\n if (typeof Reflect === \"object\" && typeof Reflect.metadata === \"function\")\n return Reflect.metadata(metadataKey, metadataValue);\n }\n function __awaiter(thisArg, _arguments, P2, generator) {\n function adopt(value) {\n return value instanceof P2 ? value : new P2(function(resolve) {\n resolve(value);\n });\n }\n return new (P2 || (P2 = Promise))(function(resolve, reject) {\n function fulfilled(value) {\n try {\n step(generator.next(value));\n } catch (e3) {\n reject(e3);\n }\n }\n function rejected(value) {\n try {\n step(generator[\"throw\"](value));\n } catch (e3) {\n reject(e3);\n }\n }\n function step(result) {\n result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected);\n }\n step((generator = generator.apply(thisArg, _arguments || [])).next());\n });\n }\n function __generator(thisArg, body) {\n var _2 = { label: 0, sent: function() {\n if (t3[0] & 1)\n throw t3[1];\n return t3[1];\n }, trys: [], ops: [] }, f6, y6, t3, g4 = Object.create((typeof Iterator === \"function\" ? Iterator : Object).prototype);\n return g4.next = verb(0), g4[\"throw\"] = verb(1), g4[\"return\"] = verb(2), typeof Symbol === \"function\" && (g4[Symbol.iterator] = function() {\n return this;\n }), g4;\n function verb(n2) {\n return function(v2) {\n return step([n2, v2]);\n };\n }\n function step(op) {\n if (f6)\n throw new TypeError(\"Generator is already executing.\");\n while (g4 && (g4 = 0, op[0] && (_2 = 0)), _2)\n try {\n if (f6 = 1, y6 && (t3 = op[0] & 2 ? y6[\"return\"] : op[0] ? y6[\"throw\"] || ((t3 = y6[\"return\"]) && t3.call(y6), 0) : y6.next) && !(t3 = t3.call(y6, op[1])).done)\n return t3;\n if (y6 = 0, t3)\n op = [op[0] & 2, t3.value];\n switch (op[0]) {\n case 0:\n case 1:\n t3 = op;\n break;\n case 4:\n _2.label++;\n return { value: op[1], done: false };\n case 5:\n _2.label++;\n y6 = op[1];\n op = [0];\n continue;\n case 7:\n op = _2.ops.pop();\n _2.trys.pop();\n continue;\n default:\n if (!(t3 = _2.trys, t3 = t3.length > 0 && t3[t3.length - 1]) && (op[0] === 6 || op[0] === 2)) {\n _2 = 0;\n continue;\n }\n if (op[0] === 3 && (!t3 || op[1] > t3[0] && op[1] < t3[3])) {\n _2.label = op[1];\n break;\n }\n if (op[0] === 6 && _2.label < t3[1]) {\n _2.label = t3[1];\n t3 = op;\n break;\n }\n if (t3 && _2.label < t3[2]) {\n _2.label = t3[2];\n _2.ops.push(op);\n break;\n }\n if (t3[2])\n _2.ops.pop();\n _2.trys.pop();\n continue;\n }\n op = body.call(thisArg, _2);\n } catch (e3) {\n op = [6, e3];\n y6 = 0;\n } finally {\n f6 = t3 = 0;\n }\n if (op[0] & 5)\n throw op[1];\n return { value: op[0] ? op[1] : void 0, done: true };\n }\n }\n function __exportStar(m2, o5) {\n for (var p4 in m2)\n if (p4 !== \"default\" && !Object.prototype.hasOwnProperty.call(o5, p4))\n __createBinding(o5, m2, p4);\n }\n function __values(o5) {\n var s4 = typeof Symbol === \"function\" && Symbol.iterator, m2 = s4 && o5[s4], i3 = 0;\n if (m2)\n return m2.call(o5);\n if (o5 && typeof o5.length === \"number\")\n return {\n next: function() {\n if (o5 && i3 >= o5.length)\n o5 = void 0;\n return { value: o5 && o5[i3++], done: !o5 };\n }\n };\n throw new TypeError(s4 ? \"Object is not iterable.\" : \"Symbol.iterator is not defined.\");\n }\n function __read(o5, n2) {\n var m2 = typeof Symbol === \"function\" && o5[Symbol.iterator];\n if (!m2)\n return o5;\n var i3 = m2.call(o5), r2, ar = [], e3;\n try {\n while ((n2 === void 0 || n2-- > 0) && !(r2 = i3.next()).done)\n ar.push(r2.value);\n } catch (error) {\n e3 = { error };\n } finally {\n try {\n if (r2 && !r2.done && (m2 = i3[\"return\"]))\n m2.call(i3);\n } finally {\n if (e3)\n throw e3.error;\n }\n }\n return ar;\n }\n function __spread() {\n for (var ar = [], i3 = 0; i3 < arguments.length; i3++)\n ar = ar.concat(__read(arguments[i3]));\n return ar;\n }\n function __spreadArrays() {\n for (var s4 = 0, i3 = 0, il = arguments.length; i3 < il; i3++)\n s4 += arguments[i3].length;\n for (var r2 = Array(s4), k4 = 0, i3 = 0; i3 < il; i3++)\n for (var a3 = arguments[i3], j2 = 0, jl = a3.length; j2 < jl; j2++, k4++)\n r2[k4] = a3[j2];\n return r2;\n }\n function __spreadArray(to, from14, pack) {\n if (pack || arguments.length === 2)\n for (var i3 = 0, l6 = from14.length, ar; i3 < l6; i3++) {\n if (ar || !(i3 in from14)) {\n if (!ar)\n ar = Array.prototype.slice.call(from14, 0, i3);\n ar[i3] = from14[i3];\n }\n }\n return to.concat(ar || Array.prototype.slice.call(from14));\n }\n function __await(v2) {\n return this instanceof __await ? (this.v = v2, this) : new __await(v2);\n }\n function __asyncGenerator(thisArg, _arguments, generator) {\n if (!Symbol.asyncIterator)\n throw new TypeError(\"Symbol.asyncIterator is not defined.\");\n var g4 = generator.apply(thisArg, _arguments || []), i3, q3 = [];\n return i3 = Object.create((typeof AsyncIterator === \"function\" ? AsyncIterator : Object).prototype), verb(\"next\"), verb(\"throw\"), verb(\"return\", awaitReturn), i3[Symbol.asyncIterator] = function() {\n return this;\n }, i3;\n function awaitReturn(f6) {\n return function(v2) {\n return Promise.resolve(v2).then(f6, reject);\n };\n }\n function verb(n2, f6) {\n if (g4[n2]) {\n i3[n2] = function(v2) {\n return new Promise(function(a3, b4) {\n q3.push([n2, v2, a3, b4]) > 1 || resume(n2, v2);\n });\n };\n if (f6)\n i3[n2] = f6(i3[n2]);\n }\n }\n function resume(n2, v2) {\n try {\n step(g4[n2](v2));\n } catch (e3) {\n settle(q3[0][3], e3);\n }\n }\n function step(r2) {\n r2.value instanceof __await ? Promise.resolve(r2.value.v).then(fulfill, reject) : settle(q3[0][2], r2);\n }\n function fulfill(value) {\n resume(\"next\", value);\n }\n function reject(value) {\n resume(\"throw\", value);\n }\n function settle(f6, v2) {\n if (f6(v2), q3.shift(), q3.length)\n resume(q3[0][0], q3[0][1]);\n }\n }\n function __asyncDelegator(o5) {\n var i3, p4;\n return i3 = {}, verb(\"next\"), verb(\"throw\", function(e3) {\n throw e3;\n }), verb(\"return\"), i3[Symbol.iterator] = function() {\n return this;\n }, i3;\n function verb(n2, f6) {\n i3[n2] = o5[n2] ? function(v2) {\n return (p4 = !p4) ? { value: __await(o5[n2](v2)), done: false } : f6 ? f6(v2) : v2;\n } : f6;\n }\n }\n function __asyncValues(o5) {\n if (!Symbol.asyncIterator)\n throw new TypeError(\"Symbol.asyncIterator is not defined.\");\n var m2 = o5[Symbol.asyncIterator], i3;\n return m2 ? m2.call(o5) : (o5 = typeof __values === \"function\" ? __values(o5) : o5[Symbol.iterator](), i3 = {}, verb(\"next\"), verb(\"throw\"), verb(\"return\"), i3[Symbol.asyncIterator] = function() {\n return this;\n }, i3);\n function verb(n2) {\n i3[n2] = o5[n2] && function(v2) {\n return new Promise(function(resolve, reject) {\n v2 = o5[n2](v2), settle(resolve, reject, v2.done, v2.value);\n });\n };\n }\n function settle(resolve, reject, d5, v2) {\n Promise.resolve(v2).then(function(v3) {\n resolve({ value: v3, done: d5 });\n }, reject);\n }\n }\n function __makeTemplateObject(cooked, raw) {\n if (Object.defineProperty) {\n Object.defineProperty(cooked, \"raw\", { value: raw });\n } else {\n cooked.raw = raw;\n }\n return cooked;\n }\n function __importStar(mod3) {\n if (mod3 && mod3.__esModule)\n return mod3;\n var result = {};\n if (mod3 != null) {\n for (var k4 = ownKeys(mod3), i3 = 0; i3 < k4.length; i3++)\n if (k4[i3] !== \"default\")\n __createBinding(result, mod3, k4[i3]);\n }\n __setModuleDefault(result, mod3);\n return result;\n }\n function __importDefault(mod3) {\n return mod3 && mod3.__esModule ? mod3 : { default: mod3 };\n }\n function __classPrivateFieldGet(receiver, state, kind, f6) {\n if (kind === \"a\" && !f6)\n throw new TypeError(\"Private accessor was defined without a getter\");\n if (typeof state === \"function\" ? receiver !== state || !f6 : !state.has(receiver))\n throw new TypeError(\"Cannot read private member from an object whose class did not declare it\");\n return kind === \"m\" ? f6 : kind === \"a\" ? f6.call(receiver) : f6 ? f6.value : state.get(receiver);\n }\n function __classPrivateFieldSet(receiver, state, value, kind, f6) {\n if (kind === \"m\")\n throw new TypeError(\"Private method is not writable\");\n if (kind === \"a\" && !f6)\n throw new TypeError(\"Private accessor was defined without a setter\");\n if (typeof state === \"function\" ? receiver !== state || !f6 : !state.has(receiver))\n throw new TypeError(\"Cannot write private member to an object whose class did not declare it\");\n return kind === \"a\" ? f6.call(receiver, value) : f6 ? f6.value = value : state.set(receiver, value), value;\n }\n function __classPrivateFieldIn(state, receiver) {\n if (receiver === null || typeof receiver !== \"object\" && typeof receiver !== \"function\")\n throw new TypeError(\"Cannot use 'in' operator on non-object\");\n return typeof state === \"function\" ? receiver === state : state.has(receiver);\n }\n function __addDisposableResource(env2, value, async) {\n if (value !== null && value !== void 0) {\n if (typeof value !== \"object\" && typeof value !== \"function\")\n throw new TypeError(\"Object expected.\");\n var dispose, inner;\n if (async) {\n if (!Symbol.asyncDispose)\n throw new TypeError(\"Symbol.asyncDispose is not defined.\");\n dispose = value[Symbol.asyncDispose];\n }\n if (dispose === void 0) {\n if (!Symbol.dispose)\n throw new TypeError(\"Symbol.dispose is not defined.\");\n dispose = value[Symbol.dispose];\n if (async)\n inner = dispose;\n }\n if (typeof dispose !== \"function\")\n throw new TypeError(\"Object not disposable.\");\n if (inner)\n dispose = function() {\n try {\n inner.call(this);\n } catch (e3) {\n return Promise.reject(e3);\n }\n };\n env2.stack.push({ value, dispose, async });\n } else if (async) {\n env2.stack.push({ async: true });\n }\n return value;\n }\n function __disposeResources(env2) {\n function fail(e3) {\n env2.error = env2.hasError ? new _SuppressedError(e3, env2.error, \"An error was suppressed during disposal.\") : e3;\n env2.hasError = true;\n }\n var r2, s4 = 0;\n function next() {\n while (r2 = env2.stack.pop()) {\n try {\n if (!r2.async && s4 === 1)\n return s4 = 0, env2.stack.push(r2), Promise.resolve().then(next);\n if (r2.dispose) {\n var result = r2.dispose.call(r2.value);\n if (r2.async)\n return s4 |= 2, Promise.resolve(result).then(next, function(e3) {\n fail(e3);\n return next();\n });\n } else\n s4 |= 1;\n } catch (e3) {\n fail(e3);\n }\n }\n if (s4 === 1)\n return env2.hasError ? Promise.reject(env2.error) : Promise.resolve();\n if (env2.hasError)\n throw env2.error;\n }\n return next();\n }\n function __rewriteRelativeImportExtension(path, preserveJsx) {\n if (typeof path === \"string\" && /^\\.\\.?\\//.test(path)) {\n return path.replace(/\\.(tsx)$|((?:\\.d)?)((?:\\.[^./]+?)?)\\.([cm]?)ts$/i, function(m2, tsx, d5, ext, cm) {\n return tsx ? preserveJsx ? \".jsx\" : \".js\" : d5 && (!ext || !cm) ? m2 : d5 + ext + \".\" + cm.toLowerCase() + \"js\";\n });\n }\n return path;\n }\n var extendStatics, __assign, __createBinding, __setModuleDefault, ownKeys, _SuppressedError, tslib_es6_default;\n var init_tslib_es6 = __esm({\n \"../../../node_modules/.pnpm/tslib@2.8.1/node_modules/tslib/tslib.es6.mjs\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n extendStatics = function(d5, b4) {\n extendStatics = Object.setPrototypeOf || { __proto__: [] } instanceof Array && function(d6, b5) {\n d6.__proto__ = b5;\n } || function(d6, b5) {\n for (var p4 in b5)\n if (Object.prototype.hasOwnProperty.call(b5, p4))\n d6[p4] = b5[p4];\n };\n return extendStatics(d5, b4);\n };\n __assign = function() {\n __assign = Object.assign || function __assign3(t3) {\n for (var s4, i3 = 1, n2 = arguments.length; i3 < n2; i3++) {\n s4 = arguments[i3];\n for (var p4 in s4)\n if (Object.prototype.hasOwnProperty.call(s4, p4))\n t3[p4] = s4[p4];\n }\n return t3;\n };\n return __assign.apply(this, arguments);\n };\n __createBinding = Object.create ? function(o5, m2, k4, k22) {\n if (k22 === void 0)\n k22 = k4;\n var desc = Object.getOwnPropertyDescriptor(m2, k4);\n if (!desc || (\"get\" in desc ? !m2.__esModule : desc.writable || desc.configurable)) {\n desc = { enumerable: true, get: function() {\n return m2[k4];\n } };\n }\n Object.defineProperty(o5, k22, desc);\n } : function(o5, m2, k4, k22) {\n if (k22 === void 0)\n k22 = k4;\n o5[k22] = m2[k4];\n };\n __setModuleDefault = Object.create ? function(o5, v2) {\n Object.defineProperty(o5, \"default\", { enumerable: true, value: v2 });\n } : function(o5, v2) {\n o5[\"default\"] = v2;\n };\n ownKeys = function(o5) {\n ownKeys = Object.getOwnPropertyNames || function(o6) {\n var ar = [];\n for (var k4 in o6)\n if (Object.prototype.hasOwnProperty.call(o6, k4))\n ar[ar.length] = k4;\n return ar;\n };\n return ownKeys(o5);\n };\n _SuppressedError = typeof SuppressedError === \"function\" ? SuppressedError : function(error, suppressed, message) {\n var e3 = new Error(message);\n return e3.name = \"SuppressedError\", e3.error = error, e3.suppressed = suppressed, e3;\n };\n tslib_es6_default = {\n __extends,\n __assign,\n __rest,\n __decorate,\n __param,\n __esDecorate,\n __runInitializers,\n __propKey,\n __setFunctionName,\n __metadata,\n __awaiter,\n __generator,\n __createBinding,\n __exportStar,\n __values,\n __read,\n __spread,\n __spreadArrays,\n __spreadArray,\n __await,\n __asyncGenerator,\n __asyncDelegator,\n __asyncValues,\n __makeTemplateObject,\n __importStar,\n __importDefault,\n __classPrivateFieldGet,\n __classPrivateFieldSet,\n __classPrivateFieldIn,\n __addDisposableResource,\n __disposeResources,\n __rewriteRelativeImportExtension\n };\n }\n });\n\n // ../../libs/contracts-sdk/dist/abis/VincentAppFacet.abi.json\n var require_VincentAppFacet_abi = __commonJS({\n \"../../libs/contracts-sdk/dist/abis/VincentAppFacet.abi.json\"(exports3, module) {\n module.exports = [\n {\n type: \"function\",\n name: \"addDelegatee\",\n inputs: [\n {\n name: \"appId\",\n type: \"uint40\",\n internalType: \"uint40\"\n },\n {\n name: \"delegatee\",\n type: \"address\",\n internalType: \"address\"\n }\n ],\n outputs: [],\n stateMutability: \"nonpayable\"\n },\n {\n type: \"function\",\n name: \"deleteApp\",\n inputs: [\n {\n name: \"appId\",\n type: \"uint40\",\n internalType: \"uint40\"\n }\n ],\n outputs: [],\n stateMutability: \"nonpayable\"\n },\n {\n type: \"function\",\n name: \"enableAppVersion\",\n inputs: [\n {\n name: \"appId\",\n type: \"uint40\",\n internalType: \"uint40\"\n },\n {\n name: \"appVersion\",\n type: \"uint24\",\n internalType: \"uint24\"\n },\n {\n name: \"enabled\",\n type: \"bool\",\n internalType: \"bool\"\n }\n ],\n outputs: [],\n stateMutability: \"nonpayable\"\n },\n {\n type: \"function\",\n name: \"registerApp\",\n inputs: [\n {\n name: \"appId\",\n type: \"uint40\",\n internalType: \"uint40\"\n },\n {\n name: \"delegatees\",\n type: \"address[]\",\n internalType: \"address[]\"\n },\n {\n name: \"versionAbilities\",\n type: \"tuple\",\n internalType: \"struct VincentAppFacet.AppVersionAbilities\",\n components: [\n {\n name: \"abilityIpfsCids\",\n type: \"string[]\",\n internalType: \"string[]\"\n },\n {\n name: \"abilityPolicies\",\n type: \"string[][]\",\n internalType: \"string[][]\"\n }\n ]\n }\n ],\n outputs: [\n {\n name: \"newAppVersion\",\n type: \"uint24\",\n internalType: \"uint24\"\n }\n ],\n stateMutability: \"nonpayable\"\n },\n {\n type: \"function\",\n name: \"registerNextAppVersion\",\n inputs: [\n {\n name: \"appId\",\n type: \"uint40\",\n internalType: \"uint40\"\n },\n {\n name: \"versionAbilities\",\n type: \"tuple\",\n internalType: \"struct VincentAppFacet.AppVersionAbilities\",\n components: [\n {\n name: \"abilityIpfsCids\",\n type: \"string[]\",\n internalType: \"string[]\"\n },\n {\n name: \"abilityPolicies\",\n type: \"string[][]\",\n internalType: \"string[][]\"\n }\n ]\n }\n ],\n outputs: [\n {\n name: \"newAppVersion\",\n type: \"uint24\",\n internalType: \"uint24\"\n }\n ],\n stateMutability: \"nonpayable\"\n },\n {\n type: \"function\",\n name: \"removeDelegatee\",\n inputs: [\n {\n name: \"appId\",\n type: \"uint40\",\n internalType: \"uint40\"\n },\n {\n name: \"delegatee\",\n type: \"address\",\n internalType: \"address\"\n }\n ],\n outputs: [],\n stateMutability: \"nonpayable\"\n },\n {\n type: \"function\",\n name: \"setDelegatee\",\n inputs: [\n {\n name: \"appId\",\n type: \"uint40\",\n internalType: \"uint40\"\n },\n {\n name: \"delegatees\",\n type: \"address[]\",\n internalType: \"address[]\"\n }\n ],\n outputs: [],\n stateMutability: \"nonpayable\"\n },\n {\n type: \"function\",\n name: \"undeleteApp\",\n inputs: [\n {\n name: \"appId\",\n type: \"uint40\",\n internalType: \"uint40\"\n }\n ],\n outputs: [],\n stateMutability: \"nonpayable\"\n },\n {\n type: \"event\",\n name: \"AppDeleted\",\n inputs: [\n {\n name: \"appId\",\n type: \"uint40\",\n indexed: true,\n internalType: \"uint40\"\n }\n ],\n anonymous: false\n },\n {\n type: \"event\",\n name: \"AppEnabled\",\n inputs: [\n {\n name: \"appId\",\n type: \"uint40\",\n indexed: true,\n internalType: \"uint40\"\n },\n {\n name: \"appVersion\",\n type: \"uint24\",\n indexed: true,\n internalType: \"uint24\"\n },\n {\n name: \"enabled\",\n type: \"bool\",\n indexed: true,\n internalType: \"bool\"\n }\n ],\n anonymous: false\n },\n {\n type: \"event\",\n name: \"AppUndeleted\",\n inputs: [\n {\n name: \"appId\",\n type: \"uint40\",\n indexed: true,\n internalType: \"uint40\"\n }\n ],\n anonymous: false\n },\n {\n type: \"event\",\n name: \"DelegateeAdded\",\n inputs: [\n {\n name: \"appId\",\n type: \"uint40\",\n indexed: true,\n internalType: \"uint40\"\n },\n {\n name: \"delegatee\",\n type: \"address\",\n indexed: true,\n internalType: \"address\"\n }\n ],\n anonymous: false\n },\n {\n type: \"event\",\n name: \"DelegateeRemoved\",\n inputs: [\n {\n name: \"appId\",\n type: \"uint40\",\n indexed: true,\n internalType: \"uint40\"\n },\n {\n name: \"delegatee\",\n type: \"address\",\n indexed: true,\n internalType: \"address\"\n }\n ],\n anonymous: false\n },\n {\n type: \"event\",\n name: \"NewAppRegistered\",\n inputs: [\n {\n name: \"appId\",\n type: \"uint40\",\n indexed: true,\n internalType: \"uint40\"\n },\n {\n name: \"manager\",\n type: \"address\",\n indexed: true,\n internalType: \"address\"\n }\n ],\n anonymous: false\n },\n {\n type: \"event\",\n name: \"NewAppVersionRegistered\",\n inputs: [\n {\n name: \"appId\",\n type: \"uint40\",\n indexed: true,\n internalType: \"uint40\"\n },\n {\n name: \"appVersion\",\n type: \"uint24\",\n indexed: true,\n internalType: \"uint24\"\n },\n {\n name: \"manager\",\n type: \"address\",\n indexed: true,\n internalType: \"address\"\n }\n ],\n anonymous: false\n },\n {\n type: \"event\",\n name: \"NewLitActionRegistered\",\n inputs: [\n {\n name: \"litActionIpfsCidHash\",\n type: \"bytes32\",\n indexed: true,\n internalType: \"bytes32\"\n }\n ],\n anonymous: false\n },\n {\n type: \"error\",\n name: \"AbilityArrayDimensionMismatch\",\n inputs: [\n {\n name: \"abilitiesLength\",\n type: \"uint256\",\n internalType: \"uint256\"\n },\n {\n name: \"policiesLength\",\n type: \"uint256\",\n internalType: \"uint256\"\n }\n ]\n },\n {\n type: \"error\",\n name: \"AppAlreadyDeleted\",\n inputs: [\n {\n name: \"appId\",\n type: \"uint40\",\n internalType: \"uint40\"\n }\n ]\n },\n {\n type: \"error\",\n name: \"AppAlreadyRegistered\",\n inputs: [\n {\n name: \"appId\",\n type: \"uint40\",\n internalType: \"uint40\"\n }\n ]\n },\n {\n type: \"error\",\n name: \"AppAlreadyUndeleted\",\n inputs: [\n {\n name: \"appId\",\n type: \"uint40\",\n internalType: \"uint40\"\n }\n ]\n },\n {\n type: \"error\",\n name: \"AppHasBeenDeleted\",\n inputs: [\n {\n name: \"appId\",\n type: \"uint40\",\n internalType: \"uint40\"\n }\n ]\n },\n {\n type: \"error\",\n name: \"AppNotRegistered\",\n inputs: [\n {\n name: \"appId\",\n type: \"uint40\",\n internalType: \"uint40\"\n }\n ]\n },\n {\n type: \"error\",\n name: \"AppVersionAlreadyInRequestedState\",\n inputs: [\n {\n name: \"appId\",\n type: \"uint40\",\n internalType: \"uint40\"\n },\n {\n name: \"appVersion\",\n type: \"uint24\",\n internalType: \"uint24\"\n },\n {\n name: \"enabled\",\n type: \"bool\",\n internalType: \"bool\"\n }\n ]\n },\n {\n type: \"error\",\n name: \"AppVersionNotEnabled\",\n inputs: [\n {\n name: \"appId\",\n type: \"uint40\",\n internalType: \"uint40\"\n },\n {\n name: \"appVersion\",\n type: \"uint24\",\n internalType: \"uint24\"\n }\n ]\n },\n {\n type: \"error\",\n name: \"AppVersionNotRegistered\",\n inputs: [\n {\n name: \"appId\",\n type: \"uint40\",\n internalType: \"uint40\"\n },\n {\n name: \"appVersion\",\n type: \"uint24\",\n internalType: \"uint24\"\n }\n ]\n },\n {\n type: \"error\",\n name: \"DelegateeAlreadyRegisteredToApp\",\n inputs: [\n {\n name: \"appId\",\n type: \"uint40\",\n internalType: \"uint40\"\n },\n {\n name: \"delegatee\",\n type: \"address\",\n internalType: \"address\"\n }\n ]\n },\n {\n type: \"error\",\n name: \"DelegateeNotRegisteredToApp\",\n inputs: [\n {\n name: \"appId\",\n type: \"uint40\",\n internalType: \"uint40\"\n },\n {\n name: \"delegatee\",\n type: \"address\",\n internalType: \"address\"\n }\n ]\n },\n {\n type: \"error\",\n name: \"DuplicateAbilityIpfsCidNotAllowed\",\n inputs: [\n {\n name: \"appId\",\n type: \"uint40\",\n internalType: \"uint40\"\n },\n {\n name: \"abilityIndex\",\n type: \"uint256\",\n internalType: \"uint256\"\n }\n ]\n },\n {\n type: \"error\",\n name: \"DuplicateAbilityPolicyIpfsCidNotAllowed\",\n inputs: [\n {\n name: \"appId\",\n type: \"uint40\",\n internalType: \"uint40\"\n },\n {\n name: \"abilityIndex\",\n type: \"uint256\",\n internalType: \"uint256\"\n },\n {\n name: \"policyIndex\",\n type: \"uint256\",\n internalType: \"uint256\"\n }\n ]\n },\n {\n type: \"error\",\n name: \"EmptyAbilityIpfsCidNotAllowed\",\n inputs: [\n {\n name: \"appId\",\n type: \"uint40\",\n internalType: \"uint40\"\n },\n {\n name: \"abilityIndex\",\n type: \"uint256\",\n internalType: \"uint256\"\n }\n ]\n },\n {\n type: \"error\",\n name: \"EmptyPolicyIpfsCidNotAllowed\",\n inputs: [\n {\n name: \"appId\",\n type: \"uint40\",\n internalType: \"uint40\"\n },\n {\n name: \"abilityIndex\",\n type: \"uint256\",\n internalType: \"uint256\"\n }\n ]\n },\n {\n type: \"error\",\n name: \"InvalidOffset\",\n inputs: [\n {\n name: \"offset\",\n type: \"uint256\",\n internalType: \"uint256\"\n },\n {\n name: \"totalCount\",\n type: \"uint256\",\n internalType: \"uint256\"\n }\n ]\n },\n {\n type: \"error\",\n name: \"NoAbilitiesProvided\",\n inputs: [\n {\n name: \"appId\",\n type: \"uint40\",\n internalType: \"uint40\"\n }\n ]\n },\n {\n type: \"error\",\n name: \"NotAppManager\",\n inputs: [\n {\n name: \"appId\",\n type: \"uint40\",\n internalType: \"uint40\"\n },\n {\n name: \"msgSender\",\n type: \"address\",\n internalType: \"address\"\n }\n ]\n },\n {\n type: \"error\",\n name: \"ZeroAddressDelegateeNotAllowed\",\n inputs: []\n },\n {\n type: \"error\",\n name: \"ZeroAppIdNotAllowed\",\n inputs: []\n }\n ];\n }\n });\n\n // ../../libs/contracts-sdk/dist/abis/VincentAppViewFacet.abi.json\n var require_VincentAppViewFacet_abi = __commonJS({\n \"../../libs/contracts-sdk/dist/abis/VincentAppViewFacet.abi.json\"(exports3, module) {\n module.exports = [\n {\n type: \"function\",\n name: \"APP_PAGE_SIZE\",\n inputs: [],\n outputs: [\n {\n name: \"\",\n type: \"uint256\",\n internalType: \"uint256\"\n }\n ],\n stateMutability: \"view\"\n },\n {\n type: \"function\",\n name: \"getAppByDelegatee\",\n inputs: [\n {\n name: \"delegatee\",\n type: \"address\",\n internalType: \"address\"\n }\n ],\n outputs: [\n {\n name: \"app\",\n type: \"tuple\",\n internalType: \"struct VincentAppViewFacet.App\",\n components: [\n {\n name: \"id\",\n type: \"uint40\",\n internalType: \"uint40\"\n },\n {\n name: \"isDeleted\",\n type: \"bool\",\n internalType: \"bool\"\n },\n {\n name: \"manager\",\n type: \"address\",\n internalType: \"address\"\n },\n {\n name: \"latestVersion\",\n type: \"uint24\",\n internalType: \"uint24\"\n },\n {\n name: \"delegatees\",\n type: \"address[]\",\n internalType: \"address[]\"\n }\n ]\n }\n ],\n stateMutability: \"view\"\n },\n {\n type: \"function\",\n name: \"getAppById\",\n inputs: [\n {\n name: \"appId\",\n type: \"uint40\",\n internalType: \"uint40\"\n }\n ],\n outputs: [\n {\n name: \"app\",\n type: \"tuple\",\n internalType: \"struct VincentAppViewFacet.App\",\n components: [\n {\n name: \"id\",\n type: \"uint40\",\n internalType: \"uint40\"\n },\n {\n name: \"isDeleted\",\n type: \"bool\",\n internalType: \"bool\"\n },\n {\n name: \"manager\",\n type: \"address\",\n internalType: \"address\"\n },\n {\n name: \"latestVersion\",\n type: \"uint24\",\n internalType: \"uint24\"\n },\n {\n name: \"delegatees\",\n type: \"address[]\",\n internalType: \"address[]\"\n }\n ]\n }\n ],\n stateMutability: \"view\"\n },\n {\n type: \"function\",\n name: \"getAppVersion\",\n inputs: [\n {\n name: \"appId\",\n type: \"uint40\",\n internalType: \"uint40\"\n },\n {\n name: \"version\",\n type: \"uint24\",\n internalType: \"uint24\"\n }\n ],\n outputs: [\n {\n name: \"appVersion\",\n type: \"tuple\",\n internalType: \"struct VincentAppViewFacet.AppVersion\",\n components: [\n {\n name: \"version\",\n type: \"uint24\",\n internalType: \"uint24\"\n },\n {\n name: \"enabled\",\n type: \"bool\",\n internalType: \"bool\"\n },\n {\n name: \"delegatedAgentPkpTokenIds\",\n type: \"uint256[]\",\n internalType: \"uint256[]\"\n },\n {\n name: \"abilities\",\n type: \"tuple[]\",\n internalType: \"struct VincentAppViewFacet.Ability[]\",\n components: [\n {\n name: \"abilityIpfsCid\",\n type: \"string\",\n internalType: \"string\"\n },\n {\n name: \"policyIpfsCids\",\n type: \"string[]\",\n internalType: \"string[]\"\n }\n ]\n }\n ]\n }\n ],\n stateMutability: \"view\"\n },\n {\n type: \"function\",\n name: \"getAppsByManager\",\n inputs: [\n {\n name: \"manager\",\n type: \"address\",\n internalType: \"address\"\n },\n {\n name: \"offset\",\n type: \"uint256\",\n internalType: \"uint256\"\n }\n ],\n outputs: [\n {\n name: \"appIds\",\n type: \"uint40[]\",\n internalType: \"uint40[]\"\n },\n {\n name: \"appVersionCounts\",\n type: \"uint24[]\",\n internalType: \"uint24[]\"\n }\n ],\n stateMutability: \"view\"\n },\n {\n type: \"function\",\n name: \"getDelegatedAgentPkpTokenIds\",\n inputs: [\n {\n name: \"appId\",\n type: \"uint40\",\n internalType: \"uint40\"\n },\n {\n name: \"version\",\n type: \"uint24\",\n internalType: \"uint24\"\n },\n {\n name: \"offset\",\n type: \"uint256\",\n internalType: \"uint256\"\n }\n ],\n outputs: [\n {\n name: \"delegatedAgentPkpTokenIds\",\n type: \"uint256[]\",\n internalType: \"uint256[]\"\n }\n ],\n stateMutability: \"view\"\n },\n {\n type: \"error\",\n name: \"AppHasBeenDeleted\",\n inputs: [\n {\n name: \"appId\",\n type: \"uint40\",\n internalType: \"uint40\"\n }\n ]\n },\n {\n type: \"error\",\n name: \"AppNotRegistered\",\n inputs: [\n {\n name: \"appId\",\n type: \"uint40\",\n internalType: \"uint40\"\n }\n ]\n },\n {\n type: \"error\",\n name: \"AppVersionNotEnabled\",\n inputs: [\n {\n name: \"appId\",\n type: \"uint40\",\n internalType: \"uint40\"\n },\n {\n name: \"appVersion\",\n type: \"uint24\",\n internalType: \"uint24\"\n }\n ]\n },\n {\n type: \"error\",\n name: \"AppVersionNotRegistered\",\n inputs: [\n {\n name: \"appId\",\n type: \"uint40\",\n internalType: \"uint40\"\n },\n {\n name: \"appVersion\",\n type: \"uint24\",\n internalType: \"uint24\"\n }\n ]\n },\n {\n type: \"error\",\n name: \"DelegateeNotRegistered\",\n inputs: [\n {\n name: \"delegatee\",\n type: \"address\",\n internalType: \"address\"\n }\n ]\n },\n {\n type: \"error\",\n name: \"InvalidOffset\",\n inputs: [\n {\n name: \"offset\",\n type: \"uint256\",\n internalType: \"uint256\"\n },\n {\n name: \"totalCount\",\n type: \"uint256\",\n internalType: \"uint256\"\n }\n ]\n },\n {\n type: \"error\",\n name: \"NoAppsFoundForManager\",\n inputs: [\n {\n name: \"manager\",\n type: \"address\",\n internalType: \"address\"\n }\n ]\n },\n {\n type: \"error\",\n name: \"NoDelegatedAgentPkpsFound\",\n inputs: [\n {\n name: \"appId\",\n type: \"uint40\",\n internalType: \"uint40\"\n },\n {\n name: \"version\",\n type: \"uint24\",\n internalType: \"uint24\"\n }\n ]\n },\n {\n type: \"error\",\n name: \"ZeroAddressNotAllowed\",\n inputs: []\n }\n ];\n }\n });\n\n // ../../libs/contracts-sdk/dist/abis/VincentUserFacet.abi.json\n var require_VincentUserFacet_abi = __commonJS({\n \"../../libs/contracts-sdk/dist/abis/VincentUserFacet.abi.json\"(exports3, module) {\n module.exports = [\n {\n type: \"function\",\n name: \"permitAppVersion\",\n inputs: [\n {\n name: \"pkpTokenId\",\n type: \"uint256\",\n internalType: \"uint256\"\n },\n {\n name: \"appId\",\n type: \"uint40\",\n internalType: \"uint40\"\n },\n {\n name: \"appVersion\",\n type: \"uint24\",\n internalType: \"uint24\"\n },\n {\n name: \"abilityIpfsCids\",\n type: \"string[]\",\n internalType: \"string[]\"\n },\n {\n name: \"policyIpfsCids\",\n type: \"string[][]\",\n internalType: \"string[][]\"\n },\n {\n name: \"policyParameterValues\",\n type: \"bytes[][]\",\n internalType: \"bytes[][]\"\n }\n ],\n outputs: [],\n stateMutability: \"nonpayable\"\n },\n {\n type: \"function\",\n name: \"rePermitApp\",\n inputs: [\n {\n name: \"pkpTokenId\",\n type: \"uint256\",\n internalType: \"uint256\"\n },\n {\n name: \"appId\",\n type: \"uint40\",\n internalType: \"uint40\"\n }\n ],\n outputs: [],\n stateMutability: \"nonpayable\"\n },\n {\n type: \"function\",\n name: \"setAbilityPolicyParameters\",\n inputs: [\n {\n name: \"pkpTokenId\",\n type: \"uint256\",\n internalType: \"uint256\"\n },\n {\n name: \"appId\",\n type: \"uint40\",\n internalType: \"uint40\"\n },\n {\n name: \"appVersion\",\n type: \"uint24\",\n internalType: \"uint24\"\n },\n {\n name: \"abilityIpfsCids\",\n type: \"string[]\",\n internalType: \"string[]\"\n },\n {\n name: \"policyIpfsCids\",\n type: \"string[][]\",\n internalType: \"string[][]\"\n },\n {\n name: \"policyParameterValues\",\n type: \"bytes[][]\",\n internalType: \"bytes[][]\"\n }\n ],\n outputs: [],\n stateMutability: \"nonpayable\"\n },\n {\n type: \"function\",\n name: \"unPermitAppVersion\",\n inputs: [\n {\n name: \"pkpTokenId\",\n type: \"uint256\",\n internalType: \"uint256\"\n },\n {\n name: \"appId\",\n type: \"uint40\",\n internalType: \"uint40\"\n },\n {\n name: \"appVersion\",\n type: \"uint24\",\n internalType: \"uint24\"\n }\n ],\n outputs: [],\n stateMutability: \"nonpayable\"\n },\n {\n type: \"event\",\n name: \"AbilityPolicyParametersSet\",\n inputs: [\n {\n name: \"pkpTokenId\",\n type: \"uint256\",\n indexed: true,\n internalType: \"uint256\"\n },\n {\n name: \"appId\",\n type: \"uint40\",\n indexed: true,\n internalType: \"uint40\"\n },\n {\n name: \"appVersion\",\n type: \"uint24\",\n indexed: true,\n internalType: \"uint24\"\n },\n {\n name: \"hashedAbilityIpfsCid\",\n type: \"bytes32\",\n indexed: false,\n internalType: \"bytes32\"\n },\n {\n name: \"hashedAbilityPolicyIpfsCid\",\n type: \"bytes32\",\n indexed: false,\n internalType: \"bytes32\"\n },\n {\n name: \"policyParameterValues\",\n type: \"bytes\",\n indexed: false,\n internalType: \"bytes\"\n }\n ],\n anonymous: false\n },\n {\n type: \"event\",\n name: \"AppVersionPermitted\",\n inputs: [\n {\n name: \"pkpTokenId\",\n type: \"uint256\",\n indexed: true,\n internalType: \"uint256\"\n },\n {\n name: \"appId\",\n type: \"uint40\",\n indexed: true,\n internalType: \"uint40\"\n },\n {\n name: \"appVersion\",\n type: \"uint24\",\n indexed: true,\n internalType: \"uint24\"\n }\n ],\n anonymous: false\n },\n {\n type: \"event\",\n name: \"AppVersionRePermitted\",\n inputs: [\n {\n name: \"pkpTokenId\",\n type: \"uint256\",\n indexed: true,\n internalType: \"uint256\"\n },\n {\n name: \"appId\",\n type: \"uint40\",\n indexed: true,\n internalType: \"uint40\"\n },\n {\n name: \"appVersion\",\n type: \"uint24\",\n indexed: true,\n internalType: \"uint24\"\n }\n ],\n anonymous: false\n },\n {\n type: \"event\",\n name: \"AppVersionUnPermitted\",\n inputs: [\n {\n name: \"pkpTokenId\",\n type: \"uint256\",\n indexed: true,\n internalType: \"uint256\"\n },\n {\n name: \"appId\",\n type: \"uint40\",\n indexed: true,\n internalType: \"uint40\"\n },\n {\n name: \"appVersion\",\n type: \"uint24\",\n indexed: true,\n internalType: \"uint24\"\n }\n ],\n anonymous: false\n },\n {\n type: \"event\",\n name: \"NewUserAgentPkpRegistered\",\n inputs: [\n {\n name: \"userAddress\",\n type: \"address\",\n indexed: true,\n internalType: \"address\"\n },\n {\n name: \"pkpTokenId\",\n type: \"uint256\",\n indexed: true,\n internalType: \"uint256\"\n }\n ],\n anonymous: false\n },\n {\n type: \"error\",\n name: \"AbilitiesAndPoliciesLengthMismatch\",\n inputs: []\n },\n {\n type: \"error\",\n name: \"AbilityNotRegisteredForAppVersion\",\n inputs: [\n {\n name: \"appId\",\n type: \"uint40\",\n internalType: \"uint40\"\n },\n {\n name: \"appVersion\",\n type: \"uint24\",\n internalType: \"uint24\"\n },\n {\n name: \"abilityIpfsCid\",\n type: \"string\",\n internalType: \"string\"\n }\n ]\n },\n {\n type: \"error\",\n name: \"AbilityPolicyNotRegisteredForAppVersion\",\n inputs: [\n {\n name: \"appId\",\n type: \"uint40\",\n internalType: \"uint40\"\n },\n {\n name: \"appVersion\",\n type: \"uint24\",\n internalType: \"uint24\"\n },\n {\n name: \"abilityIpfsCid\",\n type: \"string\",\n internalType: \"string\"\n },\n {\n name: \"abilityPolicyIpfsCid\",\n type: \"string\",\n internalType: \"string\"\n }\n ]\n },\n {\n type: \"error\",\n name: \"AppHasBeenDeleted\",\n inputs: [\n {\n name: \"appId\",\n type: \"uint40\",\n internalType: \"uint40\"\n }\n ]\n },\n {\n type: \"error\",\n name: \"AppNeverPermitted\",\n inputs: [\n {\n name: \"pkpTokenId\",\n type: \"uint256\",\n internalType: \"uint256\"\n },\n {\n name: \"appId\",\n type: \"uint40\",\n internalType: \"uint40\"\n },\n {\n name: \"appVersion\",\n type: \"uint24\",\n internalType: \"uint24\"\n }\n ]\n },\n {\n type: \"error\",\n name: \"AppNotRegistered\",\n inputs: [\n {\n name: \"appId\",\n type: \"uint40\",\n internalType: \"uint40\"\n }\n ]\n },\n {\n type: \"error\",\n name: \"AppVersionAlreadyPermitted\",\n inputs: [\n {\n name: \"pkpTokenId\",\n type: \"uint256\",\n internalType: \"uint256\"\n },\n {\n name: \"appId\",\n type: \"uint40\",\n internalType: \"uint40\"\n },\n {\n name: \"appVersion\",\n type: \"uint24\",\n internalType: \"uint24\"\n }\n ]\n },\n {\n type: \"error\",\n name: \"AppVersionNotEnabled\",\n inputs: [\n {\n name: \"appId\",\n type: \"uint40\",\n internalType: \"uint40\"\n },\n {\n name: \"appVersion\",\n type: \"uint24\",\n internalType: \"uint24\"\n }\n ]\n },\n {\n type: \"error\",\n name: \"AppVersionNotEnabled\",\n inputs: [\n {\n name: \"appId\",\n type: \"uint40\",\n internalType: \"uint40\"\n },\n {\n name: \"appVersion\",\n type: \"uint24\",\n internalType: \"uint24\"\n }\n ]\n },\n {\n type: \"error\",\n name: \"AppVersionNotPermitted\",\n inputs: [\n {\n name: \"pkpTokenId\",\n type: \"uint256\",\n internalType: \"uint256\"\n },\n {\n name: \"appId\",\n type: \"uint40\",\n internalType: \"uint40\"\n },\n {\n name: \"appVersion\",\n type: \"uint24\",\n internalType: \"uint24\"\n }\n ]\n },\n {\n type: \"error\",\n name: \"AppVersionNotRegistered\",\n inputs: [\n {\n name: \"appId\",\n type: \"uint40\",\n internalType: \"uint40\"\n },\n {\n name: \"appVersion\",\n type: \"uint24\",\n internalType: \"uint24\"\n }\n ]\n },\n {\n type: \"error\",\n name: \"DuplicateAbilityIpfsCid\",\n inputs: [\n {\n name: \"appId\",\n type: \"uint40\",\n internalType: \"uint40\"\n },\n {\n name: \"appVersion\",\n type: \"uint24\",\n internalType: \"uint24\"\n },\n {\n name: \"abilityIpfsCid\",\n type: \"string\",\n internalType: \"string\"\n }\n ]\n },\n {\n type: \"error\",\n name: \"DuplicateAbilityPolicyIpfsCid\",\n inputs: [\n {\n name: \"appId\",\n type: \"uint40\",\n internalType: \"uint40\"\n },\n {\n name: \"appVersion\",\n type: \"uint24\",\n internalType: \"uint24\"\n },\n {\n name: \"abilityIpfsCid\",\n type: \"string\",\n internalType: \"string\"\n },\n {\n name: \"abilityPolicyIpfsCid\",\n type: \"string\",\n internalType: \"string\"\n }\n ]\n },\n {\n type: \"error\",\n name: \"EmptyAbilityIpfsCid\",\n inputs: []\n },\n {\n type: \"error\",\n name: \"EmptyPolicyIpfsCid\",\n inputs: []\n },\n {\n type: \"error\",\n name: \"InvalidInput\",\n inputs: []\n },\n {\n type: \"error\",\n name: \"InvalidOffset\",\n inputs: [\n {\n name: \"offset\",\n type: \"uint256\",\n internalType: \"uint256\"\n },\n {\n name: \"totalCount\",\n type: \"uint256\",\n internalType: \"uint256\"\n }\n ]\n },\n {\n type: \"error\",\n name: \"NotAllRegisteredAbilitiesProvided\",\n inputs: [\n {\n name: \"appId\",\n type: \"uint40\",\n internalType: \"uint40\"\n },\n {\n name: \"appVersion\",\n type: \"uint24\",\n internalType: \"uint24\"\n }\n ]\n },\n {\n type: \"error\",\n name: \"NotPkpOwner\",\n inputs: [\n {\n name: \"pkpTokenId\",\n type: \"uint256\",\n internalType: \"uint256\"\n },\n {\n name: \"msgSender\",\n type: \"address\",\n internalType: \"address\"\n }\n ]\n },\n {\n type: \"error\",\n name: \"PkpTokenDoesNotExist\",\n inputs: [\n {\n name: \"pkpTokenId\",\n type: \"uint256\",\n internalType: \"uint256\"\n }\n ]\n },\n {\n type: \"error\",\n name: \"PolicyArrayLengthMismatch\",\n inputs: [\n {\n name: \"abilityIndex\",\n type: \"uint256\",\n internalType: \"uint256\"\n },\n {\n name: \"policiesLength\",\n type: \"uint256\",\n internalType: \"uint256\"\n },\n {\n name: \"paramValuesLength\",\n type: \"uint256\",\n internalType: \"uint256\"\n }\n ]\n },\n {\n type: \"error\",\n name: \"ZeroPkpTokenId\",\n inputs: []\n }\n ];\n }\n });\n\n // ../../libs/contracts-sdk/dist/abis/VincentUserViewFacet.abi.json\n var require_VincentUserViewFacet_abi = __commonJS({\n \"../../libs/contracts-sdk/dist/abis/VincentUserViewFacet.abi.json\"(exports3, module) {\n module.exports = [\n {\n type: \"function\",\n name: \"AGENT_PAGE_SIZE\",\n inputs: [],\n outputs: [\n {\n name: \"\",\n type: \"uint256\",\n internalType: \"uint256\"\n }\n ],\n stateMutability: \"view\"\n },\n {\n type: \"function\",\n name: \"getAllAbilitiesAndPoliciesForApp\",\n inputs: [\n {\n name: \"pkpTokenId\",\n type: \"uint256\",\n internalType: \"uint256\"\n },\n {\n name: \"appId\",\n type: \"uint40\",\n internalType: \"uint40\"\n }\n ],\n outputs: [\n {\n name: \"abilities\",\n type: \"tuple[]\",\n internalType: \"struct VincentUserViewFacet.AbilityWithPolicies[]\",\n components: [\n {\n name: \"abilityIpfsCid\",\n type: \"string\",\n internalType: \"string\"\n },\n {\n name: \"policies\",\n type: \"tuple[]\",\n internalType: \"struct VincentUserViewFacet.PolicyWithParameters[]\",\n components: [\n {\n name: \"policyIpfsCid\",\n type: \"string\",\n internalType: \"string\"\n },\n {\n name: \"policyParameterValues\",\n type: \"bytes\",\n internalType: \"bytes\"\n }\n ]\n }\n ]\n }\n ],\n stateMutability: \"view\"\n },\n {\n type: \"function\",\n name: \"getAllPermittedAppIdsForPkp\",\n inputs: [\n {\n name: \"pkpTokenId\",\n type: \"uint256\",\n internalType: \"uint256\"\n },\n {\n name: \"offset\",\n type: \"uint256\",\n internalType: \"uint256\"\n }\n ],\n outputs: [\n {\n name: \"\",\n type: \"uint40[]\",\n internalType: \"uint40[]\"\n }\n ],\n stateMutability: \"view\"\n },\n {\n type: \"function\",\n name: \"getAllRegisteredAgentPkps\",\n inputs: [\n {\n name: \"userAddress\",\n type: \"address\",\n internalType: \"address\"\n },\n {\n name: \"offset\",\n type: \"uint256\",\n internalType: \"uint256\"\n }\n ],\n outputs: [\n {\n name: \"\",\n type: \"uint256[]\",\n internalType: \"uint256[]\"\n }\n ],\n stateMutability: \"view\"\n },\n {\n type: \"function\",\n name: \"getLastPermittedAppVersionForPkp\",\n inputs: [\n {\n name: \"pkpTokenId\",\n type: \"uint256\",\n internalType: \"uint256\"\n },\n {\n name: \"appId\",\n type: \"uint40\",\n internalType: \"uint40\"\n }\n ],\n outputs: [\n {\n name: \"\",\n type: \"uint24\",\n internalType: \"uint24\"\n }\n ],\n stateMutability: \"view\"\n },\n {\n type: \"function\",\n name: \"getPermittedAppVersionForPkp\",\n inputs: [\n {\n name: \"pkpTokenId\",\n type: \"uint256\",\n internalType: \"uint256\"\n },\n {\n name: \"appId\",\n type: \"uint40\",\n internalType: \"uint40\"\n }\n ],\n outputs: [\n {\n name: \"\",\n type: \"uint24\",\n internalType: \"uint24\"\n }\n ],\n stateMutability: \"view\"\n },\n {\n type: \"function\",\n name: \"getPermittedAppsForPkps\",\n inputs: [\n {\n name: \"pkpTokenIds\",\n type: \"uint256[]\",\n internalType: \"uint256[]\"\n },\n {\n name: \"offset\",\n type: \"uint256\",\n internalType: \"uint256\"\n },\n {\n name: \"pageSize\",\n type: \"uint256\",\n internalType: \"uint256\"\n }\n ],\n outputs: [\n {\n name: \"results\",\n type: \"tuple[]\",\n internalType: \"struct VincentUserViewFacet.PkpPermittedApps[]\",\n components: [\n {\n name: \"pkpTokenId\",\n type: \"uint256\",\n internalType: \"uint256\"\n },\n {\n name: \"permittedApps\",\n type: \"tuple[]\",\n internalType: \"struct VincentUserViewFacet.PermittedApp[]\",\n components: [\n {\n name: \"appId\",\n type: \"uint40\",\n internalType: \"uint40\"\n },\n {\n name: \"version\",\n type: \"uint24\",\n internalType: \"uint24\"\n },\n {\n name: \"versionEnabled\",\n type: \"bool\",\n internalType: \"bool\"\n },\n {\n name: \"isDeleted\",\n type: \"bool\",\n internalType: \"bool\"\n }\n ]\n }\n ]\n }\n ],\n stateMutability: \"view\"\n },\n {\n type: \"function\",\n name: \"getUnpermittedAppsForPkps\",\n inputs: [\n {\n name: \"pkpTokenIds\",\n type: \"uint256[]\",\n internalType: \"uint256[]\"\n },\n {\n name: \"offset\",\n type: \"uint256\",\n internalType: \"uint256\"\n }\n ],\n outputs: [\n {\n name: \"results\",\n type: \"tuple[]\",\n internalType: \"struct VincentUserViewFacet.PkpUnpermittedApps[]\",\n components: [\n {\n name: \"pkpTokenId\",\n type: \"uint256\",\n internalType: \"uint256\"\n },\n {\n name: \"unpermittedApps\",\n type: \"tuple[]\",\n internalType: \"struct VincentUserViewFacet.UnpermittedApp[]\",\n components: [\n {\n name: \"appId\",\n type: \"uint40\",\n internalType: \"uint40\"\n },\n {\n name: \"previousPermittedVersion\",\n type: \"uint24\",\n internalType: \"uint24\"\n },\n {\n name: \"versionEnabled\",\n type: \"bool\",\n internalType: \"bool\"\n },\n {\n name: \"isDeleted\",\n type: \"bool\",\n internalType: \"bool\"\n }\n ]\n }\n ]\n }\n ],\n stateMutability: \"view\"\n },\n {\n type: \"function\",\n name: \"isDelegateePermitted\",\n inputs: [\n {\n name: \"delegatee\",\n type: \"address\",\n internalType: \"address\"\n },\n {\n name: \"pkpTokenId\",\n type: \"uint256\",\n internalType: \"uint256\"\n },\n {\n name: \"abilityIpfsCid\",\n type: \"string\",\n internalType: \"string\"\n }\n ],\n outputs: [\n {\n name: \"isPermitted\",\n type: \"bool\",\n internalType: \"bool\"\n }\n ],\n stateMutability: \"view\"\n },\n {\n type: \"function\",\n name: \"validateAbilityExecutionAndGetPolicies\",\n inputs: [\n {\n name: \"delegatee\",\n type: \"address\",\n internalType: \"address\"\n },\n {\n name: \"pkpTokenId\",\n type: \"uint256\",\n internalType: \"uint256\"\n },\n {\n name: \"abilityIpfsCid\",\n type: \"string\",\n internalType: \"string\"\n }\n ],\n outputs: [\n {\n name: \"validation\",\n type: \"tuple\",\n internalType: \"struct VincentUserViewFacet.AbilityExecutionValidation\",\n components: [\n {\n name: \"isPermitted\",\n type: \"bool\",\n internalType: \"bool\"\n },\n {\n name: \"appId\",\n type: \"uint40\",\n internalType: \"uint40\"\n },\n {\n name: \"appVersion\",\n type: \"uint24\",\n internalType: \"uint24\"\n },\n {\n name: \"policies\",\n type: \"tuple[]\",\n internalType: \"struct VincentUserViewFacet.PolicyWithParameters[]\",\n components: [\n {\n name: \"policyIpfsCid\",\n type: \"string\",\n internalType: \"string\"\n },\n {\n name: \"policyParameterValues\",\n type: \"bytes\",\n internalType: \"bytes\"\n }\n ]\n }\n ]\n }\n ],\n stateMutability: \"view\"\n },\n {\n type: \"error\",\n name: \"AppHasBeenDeleted\",\n inputs: [\n {\n name: \"appId\",\n type: \"uint40\",\n internalType: \"uint40\"\n }\n ]\n },\n {\n type: \"error\",\n name: \"AppNotRegistered\",\n inputs: [\n {\n name: \"appId\",\n type: \"uint40\",\n internalType: \"uint40\"\n }\n ]\n },\n {\n type: \"error\",\n name: \"AppVersionNotEnabled\",\n inputs: [\n {\n name: \"appId\",\n type: \"uint40\",\n internalType: \"uint40\"\n },\n {\n name: \"appVersion\",\n type: \"uint24\",\n internalType: \"uint24\"\n }\n ]\n },\n {\n type: \"error\",\n name: \"AppVersionNotRegistered\",\n inputs: [\n {\n name: \"appId\",\n type: \"uint40\",\n internalType: \"uint40\"\n },\n {\n name: \"appVersion\",\n type: \"uint24\",\n internalType: \"uint24\"\n }\n ]\n },\n {\n type: \"error\",\n name: \"DelegateeNotAssociatedWithApp\",\n inputs: [\n {\n name: \"delegatee\",\n type: \"address\",\n internalType: \"address\"\n }\n ]\n },\n {\n type: \"error\",\n name: \"EmptyAbilityIpfsCid\",\n inputs: []\n },\n {\n type: \"error\",\n name: \"InvalidAppId\",\n inputs: []\n },\n {\n type: \"error\",\n name: \"InvalidOffset\",\n inputs: [\n {\n name: \"offset\",\n type: \"uint256\",\n internalType: \"uint256\"\n },\n {\n name: \"totalCount\",\n type: \"uint256\",\n internalType: \"uint256\"\n }\n ]\n },\n {\n type: \"error\",\n name: \"InvalidPkpTokenId\",\n inputs: []\n },\n {\n type: \"error\",\n name: \"NoRegisteredPkpsFound\",\n inputs: [\n {\n name: \"userAddress\",\n type: \"address\",\n internalType: \"address\"\n }\n ]\n },\n {\n type: \"error\",\n name: \"PkpNotPermittedForAppVersion\",\n inputs: [\n {\n name: \"pkpTokenId\",\n type: \"uint256\",\n internalType: \"uint256\"\n },\n {\n name: \"appId\",\n type: \"uint40\",\n internalType: \"uint40\"\n },\n {\n name: \"appVersion\",\n type: \"uint24\",\n internalType: \"uint24\"\n }\n ]\n },\n {\n type: \"error\",\n name: \"PolicyParameterNotSetForPkp\",\n inputs: [\n {\n name: \"pkpTokenId\",\n type: \"uint256\",\n internalType: \"uint256\"\n },\n {\n name: \"appId\",\n type: \"uint40\",\n internalType: \"uint40\"\n },\n {\n name: \"appVersion\",\n type: \"uint24\",\n internalType: \"uint24\"\n },\n {\n name: \"policyIpfsCid\",\n type: \"string\",\n internalType: \"string\"\n },\n {\n name: \"parameterName\",\n type: \"string\",\n internalType: \"string\"\n }\n ]\n },\n {\n type: \"error\",\n name: \"ZeroAddressNotAllowed\",\n inputs: []\n }\n ];\n }\n });\n\n // ../../libs/contracts-sdk/dist/src/buildDiamondInterface.js\n var require_buildDiamondInterface = __commonJS({\n \"../../libs/contracts-sdk/dist/src/buildDiamondInterface.js\"(exports3) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n Object.defineProperty(exports3, \"__esModule\", { value: true });\n exports3.buildDiamondInterface = buildDiamondInterface;\n var utils_1 = require_utils6();\n function dedupeAbiFragments(abis) {\n const seen = /* @__PURE__ */ new Set();\n const deduped = [];\n for (const entry of abis) {\n try {\n const fragment = utils_1.Fragment.from(entry);\n const signature = fragment.format();\n if (!seen.has(signature)) {\n seen.add(signature);\n const jsonFragment = typeof entry === \"string\" ? JSON.parse(fragment.format(\"json\")) : entry;\n deduped.push(jsonFragment);\n }\n } catch {\n const fallbackKey = typeof entry === \"string\" ? entry : JSON.stringify(entry);\n if (!seen.has(fallbackKey)) {\n seen.add(fallbackKey);\n deduped.push(entry);\n }\n }\n }\n return deduped;\n }\n function buildDiamondInterface(facets) {\n const flattened = facets.flat();\n const deduped = dedupeAbiFragments(flattened);\n return new utils_1.Interface(deduped);\n }\n }\n });\n\n // ../../libs/contracts-sdk/dist/src/constants.js\n var require_constants3 = __commonJS({\n \"../../libs/contracts-sdk/dist/src/constants.js\"(exports3) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n Object.defineProperty(exports3, \"__esModule\", { value: true });\n exports3.DEFAULT_PAGE_SIZE = exports3.GAS_ADJUSTMENT_PERCENT = exports3.COMBINED_ABI = exports3.VINCENT_DIAMOND_CONTRACT_ADDRESS_PROD = exports3.VINCENT_DIAMOND_CONTRACT_ADDRESS_DEV = void 0;\n var tslib_1 = (init_tslib_es6(), __toCommonJS(tslib_es6_exports));\n var VincentAppFacet_abi_json_1 = tslib_1.__importDefault(require_VincentAppFacet_abi());\n var VincentAppViewFacet_abi_json_1 = tslib_1.__importDefault(require_VincentAppViewFacet_abi());\n var VincentUserFacet_abi_json_1 = tslib_1.__importDefault(require_VincentUserFacet_abi());\n var VincentUserViewFacet_abi_json_1 = tslib_1.__importDefault(require_VincentUserViewFacet_abi());\n var buildDiamondInterface_1 = require_buildDiamondInterface();\n exports3.VINCENT_DIAMOND_CONTRACT_ADDRESS_DEV = \"0x57f75581e0c9e51594C8080EcC833A3592A50df8\";\n exports3.VINCENT_DIAMOND_CONTRACT_ADDRESS_PROD = \"0xa3a602F399E9663279cdF63a290101cB6560A87e\";\n exports3.COMBINED_ABI = (0, buildDiamondInterface_1.buildDiamondInterface)([\n VincentAppFacet_abi_json_1.default,\n VincentAppViewFacet_abi_json_1.default,\n VincentUserFacet_abi_json_1.default,\n VincentUserViewFacet_abi_json_1.default\n ]);\n exports3.GAS_ADJUSTMENT_PERCENT = 120;\n exports3.DEFAULT_PAGE_SIZE = \"50\";\n }\n });\n\n // ../../libs/contracts-sdk/dist/src/utils.js\n var require_utils7 = __commonJS({\n \"../../libs/contracts-sdk/dist/src/utils.js\"(exports3) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n Object.defineProperty(exports3, \"__esModule\", { value: true });\n exports3.createContract = createContract;\n exports3.findEventByName = findEventByName;\n exports3.gasAdjustedOverrides = gasAdjustedOverrides;\n exports3.decodeContractError = decodeContractError;\n var ethers_1 = require_lib32();\n var constants_1 = require_constants3();\n function createContract({ signer, contractAddress }) {\n return new ethers_1.Contract(contractAddress, constants_1.COMBINED_ABI, signer);\n }\n function findEventByName(contract, logs, eventName) {\n return logs.find((log) => {\n try {\n const parsed = contract.interface.parseLog(log);\n return parsed?.name === eventName;\n } catch {\n return false;\n }\n });\n }\n async function gasAdjustedOverrides(contract, methodName, args, overrides = {}) {\n if (!overrides?.gasLimit) {\n const estimatedGas = await contract.estimateGas[methodName](...args, overrides);\n console.log(\"Auto estimatedGas: \", estimatedGas);\n return {\n ...overrides,\n gasLimit: estimatedGas.mul(constants_1.GAS_ADJUSTMENT_PERCENT).div(100)\n };\n }\n return overrides;\n }\n function isBigNumberOrBigInt(arg) {\n return typeof arg === \"bigint\" || ethers_1.BigNumber.isBigNumber(arg);\n }\n function decodeContractError(error, contract) {\n try {\n if (error.code === \"CALL_EXCEPTION\" || error.code === \"UNPREDICTABLE_GAS_LIMIT\") {\n let errorData = error.data;\n if (!errorData && error.error && error.error.data) {\n errorData = error.error.data;\n }\n if (!errorData && error.error && error.error.body) {\n try {\n const body = JSON.parse(error.error.body);\n if (body.error && body.error.data) {\n errorData = body.error.data;\n }\n } catch {\n }\n }\n if (errorData) {\n try {\n const decodedError = contract.interface.parseError(errorData);\n if (decodedError) {\n const formattedArgs = decodedError.args.map((arg) => {\n if (isBigNumberOrBigInt(arg)) {\n return arg.toString();\n }\n return arg;\n });\n return `Contract Error: ${decodedError.name} - ${JSON.stringify(formattedArgs)}`;\n }\n } catch {\n if (error.reason) {\n return `Contract Error: ${error.reason}`;\n }\n }\n }\n if (error.reason) {\n return `Contract Error: ${error.reason}`;\n }\n }\n if (error.transaction) {\n try {\n const decodedError = contract.interface.parseError(error.data);\n if (decodedError) {\n const formattedArgs = decodedError.args.map((arg) => {\n if (isBigNumberOrBigInt(arg)) {\n return arg.toString();\n }\n return arg;\n });\n return `Transaction Error: ${decodedError.name} - ${JSON.stringify(formattedArgs)}`;\n }\n } catch {\n }\n }\n if (error.code === \"UNPREDICTABLE_GAS_LIMIT\") {\n let errorData = error.data;\n if (!errorData && error.error && error.error.data) {\n errorData = error.error.data;\n }\n if (!errorData && error.error && error.error.body) {\n try {\n const body = JSON.parse(error.error.body);\n if (body.error && body.error.data) {\n errorData = body.error.data;\n }\n } catch {\n }\n }\n if (errorData) {\n try {\n const decodedError = contract.interface.parseError(errorData);\n if (decodedError) {\n const formattedArgs = decodedError.args.map((arg) => {\n if (isBigNumberOrBigInt(arg)) {\n return arg.toString();\n }\n return arg;\n });\n return `Gas Estimation Error: ${decodedError.name} - ${JSON.stringify(formattedArgs)}`;\n }\n } catch {\n return `Gas Estimation Error: ${error.error?.message || error.message}`;\n }\n }\n return `Gas Estimation Error: ${error.error?.message || error.message}`;\n }\n if (error.errorArgs && Array.isArray(error.errorArgs)) {\n return `Contract Error: ${error.errorSignature || \"Unknown\"} - ${JSON.stringify(error.errorArgs)}`;\n }\n return error.message || \"Unknown contract error\";\n } catch {\n return error.message || \"Unknown error\";\n }\n }\n }\n });\n\n // ../../libs/contracts-sdk/dist/src/internal/app/App.js\n var require_App = __commonJS({\n \"../../libs/contracts-sdk/dist/src/internal/app/App.js\"(exports3) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n Object.defineProperty(exports3, \"__esModule\", { value: true });\n exports3.registerApp = registerApp;\n exports3.registerNextVersion = registerNextVersion;\n exports3.enableAppVersion = enableAppVersion;\n exports3.addDelegatee = addDelegatee;\n exports3.removeDelegatee = removeDelegatee;\n exports3.setDelegatee = setDelegatee;\n exports3.deleteApp = deleteApp;\n exports3.undeleteApp = undeleteApp;\n var utils_1 = require_utils7();\n async function registerApp(params) {\n const { contract, args: { appId, delegateeAddresses, versionAbilities }, overrides } = params;\n try {\n const adjustedOverrides = await (0, utils_1.gasAdjustedOverrides)(contract, \"registerApp\", [appId, delegateeAddresses, versionAbilities], overrides);\n const tx = await contract.registerApp(appId, delegateeAddresses, versionAbilities, {\n ...adjustedOverrides\n });\n await tx.wait();\n return {\n txHash: tx.hash\n };\n } catch (error) {\n const decodedError = (0, utils_1.decodeContractError)(error, contract);\n throw new Error(`Failed to Register App: ${decodedError}`);\n }\n }\n async function registerNextVersion(params) {\n const { contract, args: { appId, versionAbilities }, overrides } = params;\n try {\n const adjustedOverrides = await (0, utils_1.gasAdjustedOverrides)(contract, \"registerNextAppVersion\", [appId, versionAbilities], overrides);\n const tx = await contract.registerNextAppVersion(appId, versionAbilities, {\n ...adjustedOverrides\n });\n const receipt = await tx.wait();\n const event = (0, utils_1.findEventByName)(contract, receipt.logs, \"NewAppVersionRegistered\");\n if (!event) {\n throw new Error(\"NewAppVersionRegistered event not found\");\n }\n const newAppVersion = contract.interface.parseLog(event)?.args?.appVersion;\n if (!newAppVersion) {\n throw new Error(\"NewAppVersionRegistered event does not contain appVersion argument\");\n }\n return {\n txHash: tx.hash,\n newAppVersion\n };\n } catch (error) {\n const decodedError = (0, utils_1.decodeContractError)(error, contract);\n throw new Error(`Failed to Register Next Version: ${decodedError}`);\n }\n }\n async function enableAppVersion(params) {\n const { contract, args: { appId, appVersion, enabled }, overrides } = params;\n try {\n const adjustedOverrides = await (0, utils_1.gasAdjustedOverrides)(contract, \"enableAppVersion\", [appId, appVersion, enabled], overrides);\n const tx = await contract.enableAppVersion(appId, appVersion, enabled, {\n ...adjustedOverrides\n });\n await tx.wait();\n return {\n txHash: tx.hash\n };\n } catch (error) {\n const decodedError = (0, utils_1.decodeContractError)(error, contract);\n throw new Error(`Failed to Enable App Version: ${decodedError}`);\n }\n }\n async function addDelegatee(params) {\n const { contract, args: { appId, delegateeAddress }, overrides } = params;\n try {\n const adjustedOverrides = await (0, utils_1.gasAdjustedOverrides)(contract, \"addDelegatee\", [appId, delegateeAddress], overrides);\n const tx = await contract.addDelegatee(appId, delegateeAddress, {\n ...adjustedOverrides\n });\n await tx.wait();\n return {\n txHash: tx.hash\n };\n } catch (error) {\n const decodedError = (0, utils_1.decodeContractError)(error, contract);\n throw new Error(`Failed to Add Delegatee: ${decodedError}`);\n }\n }\n async function removeDelegatee(params) {\n const { contract, args: { appId, delegateeAddress }, overrides } = params;\n try {\n const adjustedOverrides = await (0, utils_1.gasAdjustedOverrides)(contract, \"removeDelegatee\", [appId, delegateeAddress], overrides);\n const tx = await contract.removeDelegatee(appId, delegateeAddress, {\n ...adjustedOverrides\n });\n await tx.wait();\n return {\n txHash: tx.hash\n };\n } catch (error) {\n const decodedError = (0, utils_1.decodeContractError)(error, contract);\n throw new Error(`Failed to Remove Delegatee: ${decodedError}`);\n }\n }\n async function setDelegatee(params) {\n const { contract, args: { appId, delegateeAddresses }, overrides } = params;\n try {\n const adjustedOverrides = await (0, utils_1.gasAdjustedOverrides)(contract, \"setDelegatee\", [appId, delegateeAddresses], overrides);\n const tx = await contract.setDelegatee(appId, delegateeAddresses, {\n ...adjustedOverrides\n });\n await tx.wait();\n return {\n txHash: tx.hash\n };\n } catch (error) {\n const decodedError = (0, utils_1.decodeContractError)(error, contract);\n throw new Error(`Failed to Set Delegatee: ${decodedError}`);\n }\n }\n async function deleteApp(params) {\n const { contract, args: { appId }, overrides } = params;\n try {\n const adjustedOverrides = await (0, utils_1.gasAdjustedOverrides)(contract, \"deleteApp\", [appId], overrides);\n const tx = await contract.deleteApp(appId, {\n ...adjustedOverrides\n });\n await tx.wait();\n return {\n txHash: tx.hash\n };\n } catch (error) {\n const decodedError = (0, utils_1.decodeContractError)(error, contract);\n throw new Error(`Failed to Delete App: ${decodedError}`);\n }\n }\n async function undeleteApp(params) {\n const { contract, args: { appId }, overrides } = params;\n try {\n const adjustedOverrides = await (0, utils_1.gasAdjustedOverrides)(contract, \"undeleteApp\", [appId], overrides);\n const tx = await contract.undeleteApp(appId, {\n ...adjustedOverrides\n });\n await tx.wait();\n return {\n txHash: tx.hash\n };\n } catch (error) {\n const decodedError = (0, utils_1.decodeContractError)(error, contract);\n throw new Error(`Failed to Undelete App: ${decodedError}`);\n }\n }\n }\n });\n\n // ../../libs/contracts-sdk/dist/src/utils/pkpInfo.js\n var require_pkpInfo = __commonJS({\n \"../../libs/contracts-sdk/dist/src/utils/pkpInfo.js\"(exports3) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n Object.defineProperty(exports3, \"__esModule\", { value: true });\n exports3.getPkpTokenId = getPkpTokenId;\n exports3.getPkpEthAddress = getPkpEthAddress;\n var ethers_1 = require_lib32();\n var DATIL_PUBKEY_ROUTER_ADDRESS = \"0xF182d6bEf16Ba77e69372dD096D8B70Bc3d5B475\";\n var PUBKEY_ROUTER_ABI = [\n \"function ethAddressToPkpId(address ethAddress) public view returns (uint256)\",\n \"function getEthAddress(uint256 tokenId) public view returns (address)\"\n ];\n async function getPkpTokenId({ pkpEthAddress, signer }) {\n if (!ethers_1.ethers.utils.isAddress(pkpEthAddress)) {\n throw new Error(`Invalid Ethereum address: ${pkpEthAddress}`);\n }\n const pubkeyRouter = new ethers_1.ethers.Contract(DATIL_PUBKEY_ROUTER_ADDRESS, PUBKEY_ROUTER_ABI, signer.provider);\n return await pubkeyRouter.ethAddressToPkpId(pkpEthAddress);\n }\n async function getPkpEthAddress({ tokenId, signer }) {\n const tokenIdBN = ethers_1.ethers.BigNumber.from(tokenId);\n if (tokenIdBN.isZero()) {\n throw new Error(\"Invalid token ID: Token ID cannot be zero\");\n }\n const pubkeyRouter = new ethers_1.ethers.Contract(DATIL_PUBKEY_ROUTER_ADDRESS, PUBKEY_ROUTER_ABI, signer.provider);\n return await pubkeyRouter.getEthAddress(tokenIdBN);\n }\n }\n });\n\n // ../../libs/contracts-sdk/dist/src/internal/app/AppView.js\n var require_AppView = __commonJS({\n \"../../libs/contracts-sdk/dist/src/internal/app/AppView.js\"(exports3) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n Object.defineProperty(exports3, \"__esModule\", { value: true });\n exports3.getAppById = getAppById;\n exports3.getAppIdByDelegatee = getAppIdByDelegatee;\n exports3.getAppVersion = getAppVersion;\n exports3.getAppsByManagerAddress = getAppsByManagerAddress;\n exports3.getAppByDelegateeAddress = getAppByDelegateeAddress;\n exports3.getDelegatedPkpEthAddresses = getDelegatedPkpEthAddresses;\n var utils_1 = require_utils7();\n var pkpInfo_1 = require_pkpInfo();\n async function getAppById(params) {\n const { args: { appId }, contract } = params;\n try {\n const chainApp = await contract.getAppById(appId);\n const { delegatees, ...app } = chainApp;\n return {\n ...app,\n id: app.id,\n latestVersion: app.latestVersion,\n delegateeAddresses: delegatees\n };\n } catch (error) {\n const decodedError = (0, utils_1.decodeContractError)(error, contract);\n if (decodedError.includes(\"AppNotRegistered\")) {\n return null;\n }\n throw new Error(`Failed to Get App By ID: ${decodedError}`);\n }\n }\n async function getAppIdByDelegatee(params) {\n const { args: { delegateeAddress }, contract } = params;\n try {\n const app = await contract.getAppByDelegatee(delegateeAddress);\n return app.id;\n } catch (error) {\n const decodedError = error instanceof Error ? error.message : String(error);\n if (decodedError.includes(\"DelegateeNotRegistered\")) {\n return null;\n }\n throw new Error(`Failed to Get App ID By Delegatee: ${decodedError}`);\n }\n }\n async function getAppVersion(params) {\n const { args: { appId, version: version6 }, contract } = params;\n try {\n const appVersion = await contract.getAppVersion(appId, version6);\n const convertedAppVersion = {\n version: appVersion.version,\n enabled: appVersion.enabled,\n abilities: appVersion.abilities.map((ability) => ({\n abilityIpfsCid: ability.abilityIpfsCid,\n policyIpfsCids: ability.policyIpfsCids\n }))\n };\n return {\n appVersion: convertedAppVersion\n };\n } catch (error) {\n const decodedError = (0, utils_1.decodeContractError)(error, contract);\n if (decodedError.includes(\"AppVersionNotRegistered\") || decodedError.includes(\"AppNotRegistered\")) {\n return null;\n }\n throw new Error(`Failed to Get App Version: ${decodedError}`);\n }\n }\n async function getAppsByManagerAddress(params) {\n const { args: { managerAddress, offset }, contract } = params;\n try {\n const [appIds, appVersionCounts] = await contract.getAppsByManager(managerAddress, offset);\n return appIds.map((id, idx) => ({\n id,\n versionCount: appVersionCounts[idx]\n }));\n } catch (error) {\n const decodedError = (0, utils_1.decodeContractError)(error, contract);\n if (decodedError.includes(\"NoAppsFoundForManager\")) {\n return [];\n }\n throw new Error(`Failed to Get Apps By Manager: ${decodedError}`);\n }\n }\n async function getAppByDelegateeAddress(params) {\n const { args: { delegateeAddress }, contract } = params;\n try {\n const chainApp = await contract.getAppByDelegatee(delegateeAddress);\n const { delegatees, ...app } = chainApp;\n return {\n ...app,\n delegateeAddresses: delegatees,\n id: app.id,\n latestVersion: app.latestVersion\n };\n } catch (error) {\n const decodedError = (0, utils_1.decodeContractError)(error, contract);\n if (decodedError.includes(\"DelegateeNotRegistered\")) {\n return null;\n }\n throw new Error(`Failed to Get App By Delegatee: ${decodedError}`);\n }\n }\n async function getDelegatedPkpEthAddresses(params) {\n const { args: { appId, offset, version: version6 }, contract } = params;\n try {\n const delegatedAgentPkpTokenIds = await contract.getDelegatedAgentPkpTokenIds(appId, version6, offset);\n const delegatedAgentPkpEthAddresses = [];\n for (const tokenId of delegatedAgentPkpTokenIds) {\n const ethAddress2 = await (0, pkpInfo_1.getPkpEthAddress)({ tokenId, signer: contract.signer });\n delegatedAgentPkpEthAddresses.push(ethAddress2);\n }\n return delegatedAgentPkpEthAddresses;\n } catch (error) {\n const decodedError = (0, utils_1.decodeContractError)(error, contract);\n throw new Error(`Failed to Get Delegated Agent PKP Token IDs: ${decodedError}`);\n }\n }\n }\n });\n\n // ../../../node_modules/.pnpm/cbor2@2.0.1/node_modules/cbor2/lib/constants.js\n var f, I, o, T, N, S;\n var init_constants = __esm({\n \"../../../node_modules/.pnpm/cbor2@2.0.1/node_modules/cbor2/lib/constants.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n f = { POS_INT: 0, NEG_INT: 1, BYTE_STRING: 2, UTF8_STRING: 3, ARRAY: 4, MAP: 5, TAG: 6, SIMPLE_FLOAT: 7 };\n I = { DATE_STRING: 0, DATE_EPOCH: 1, POS_BIGINT: 2, NEG_BIGINT: 3, DECIMAL_FRAC: 4, BIGFLOAT: 5, BASE64URL_EXPECTED: 21, BASE64_EXPECTED: 22, BASE16_EXPECTED: 23, CBOR: 24, URI: 32, BASE64URL: 33, BASE64: 34, MIME: 36, SET: 258, JSON: 262, WTF8: 273, REGEXP: 21066, SELF_DESCRIBED: 55799, INVALID_16: 65535, INVALID_32: 4294967295, INVALID_64: 0xffffffffffffffffn };\n o = { ZERO: 0, ONE: 24, TWO: 25, FOUR: 26, EIGHT: 27, INDEFINITE: 31 };\n T = { FALSE: 20, TRUE: 21, NULL: 22, UNDEFINED: 23 };\n N = class {\n static BREAK = Symbol.for(\"github.com/hildjj/cbor2/break\");\n static ENCODED = Symbol.for(\"github.com/hildjj/cbor2/cbor-encoded\");\n static LENGTH = Symbol.for(\"github.com/hildjj/cbor2/length\");\n };\n S = { MIN: -(2n ** 63n), MAX: 2n ** 64n - 1n };\n }\n });\n\n // ../../../node_modules/.pnpm/cbor2@2.0.1/node_modules/cbor2/lib/tag.js\n var i;\n var init_tag = __esm({\n \"../../../node_modules/.pnpm/cbor2@2.0.1/node_modules/cbor2/lib/tag.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n i = class _i {\n static #e = /* @__PURE__ */ new Map();\n tag;\n contents;\n constructor(e3, t3 = void 0) {\n this.tag = e3, this.contents = t3;\n }\n get noChildren() {\n return !!_i.#e.get(this.tag)?.noChildren;\n }\n static registerDecoder(e3, t3, n2) {\n const o5 = this.#e.get(e3);\n return this.#e.set(e3, t3), o5 && (\"comment\" in t3 || (t3.comment = o5.comment), \"noChildren\" in t3 || (t3.noChildren = o5.noChildren)), n2 && !t3.comment && (t3.comment = () => `(${n2})`), o5;\n }\n static clearDecoder(e3) {\n const t3 = this.#e.get(e3);\n return this.#e.delete(e3), t3;\n }\n static getDecoder(e3) {\n return this.#e.get(e3);\n }\n static getAllDecoders() {\n return new Map(this.#e);\n }\n *[Symbol.iterator]() {\n yield this.contents;\n }\n push(e3) {\n return this.contents = e3, 1;\n }\n decode(e3) {\n const t3 = e3?.tags?.get(this.tag) ?? _i.#e.get(this.tag);\n return t3 ? t3(this, e3) : this;\n }\n comment(e3, t3) {\n const n2 = e3?.tags?.get(this.tag) ?? _i.#e.get(this.tag);\n if (n2?.comment)\n return n2.comment(this, e3, t3);\n }\n toCBOR() {\n return [this.tag, this.contents];\n }\n [Symbol.for(\"nodejs.util.inspect.custom\")](e3, t3, n2) {\n return `${this.tag}(${n2(this.contents, t3)})`;\n }\n };\n }\n });\n\n // ../../../node_modules/.pnpm/cbor2@2.0.1/node_modules/cbor2/lib/box.js\n function f2(n2) {\n if (n2 != null && typeof n2 == \"object\")\n return n2[N.ENCODED];\n }\n function s(n2) {\n if (n2 != null && typeof n2 == \"object\")\n return n2[N.LENGTH];\n }\n function u(n2, e3) {\n Object.defineProperty(n2, N.ENCODED, { configurable: true, enumerable: false, value: e3 });\n }\n function l(n2, e3) {\n Object.defineProperty(n2, N.LENGTH, { configurable: true, enumerable: false, value: e3 });\n }\n function d(n2, e3) {\n const r2 = Object(n2);\n return u(r2, e3), r2;\n }\n function t(n2) {\n if (!n2 || typeof n2 != \"object\")\n return n2;\n switch (n2.constructor) {\n case BigInt:\n case Boolean:\n case Number:\n case String:\n case Symbol:\n return n2.valueOf();\n case Array:\n return n2.map((e3) => t(e3));\n case Map: {\n const e3 = t([...n2.entries()]);\n return e3.every(([r2]) => typeof r2 == \"string\") ? Object.fromEntries(e3) : new Map(e3);\n }\n case i:\n return new i(t(n2.tag), t(n2.contents));\n case Object: {\n const e3 = {};\n for (const [r2, a3] of Object.entries(n2))\n e3[r2] = t(a3);\n return e3;\n }\n }\n return n2;\n }\n var init_box = __esm({\n \"../../../node_modules/.pnpm/cbor2@2.0.1/node_modules/cbor2/lib/box.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_constants();\n init_tag();\n }\n });\n\n // ../../../node_modules/.pnpm/cbor2@2.0.1/node_modules/cbor2/lib/utils.js\n function c(r2, n2) {\n Object.defineProperty(r2, g, { configurable: false, enumerable: false, writable: false, value: n2 });\n }\n function f3(r2) {\n return r2[g];\n }\n function l2(r2) {\n return f3(r2) !== void 0;\n }\n function R(r2, n2 = 0, t3 = r2.length - 1) {\n const o5 = r2.subarray(n2, t3), a3 = f3(r2);\n if (a3) {\n const s4 = [];\n for (const e3 of a3)\n if (e3[0] >= n2 && e3[0] + e3[1] <= t3) {\n const i3 = [...e3];\n i3[0] -= n2, s4.push(i3);\n }\n s4.length && c(o5, s4);\n }\n return o5;\n }\n function b(r2) {\n let n2 = Math.ceil(r2.length / 2);\n const t3 = new Uint8Array(n2);\n n2--;\n for (let o5 = r2.length, a3 = o5 - 2; o5 >= 0; o5 = a3, a3 -= 2, n2--)\n t3[n2] = parseInt(r2.substring(a3, o5), 16);\n return t3;\n }\n function A(r2) {\n return r2.reduce((n2, t3) => n2 + t3.toString(16).padStart(2, \"0\"), \"\");\n }\n function d2(r2) {\n const n2 = r2.reduce((e3, i3) => e3 + i3.length, 0), t3 = r2.some((e3) => l2(e3)), o5 = [], a3 = new Uint8Array(n2);\n let s4 = 0;\n for (const e3 of r2) {\n if (!(e3 instanceof Uint8Array))\n throw new TypeError(`Invalid array: ${e3}`);\n if (a3.set(e3, s4), t3) {\n const i3 = e3[g] ?? [[0, e3.length]];\n for (const u2 of i3)\n u2[0] += s4;\n o5.push(...i3);\n }\n s4 += e3.length;\n }\n return t3 && c(a3, o5), a3;\n }\n function y(r2) {\n const n2 = atob(r2);\n return Uint8Array.from(n2, (t3) => t3.codePointAt(0));\n }\n function x(r2) {\n const n2 = r2.replace(/[_-]/g, (t3) => p[t3]);\n return y(n2.padEnd(Math.ceil(n2.length / 4) * 4, \"=\"));\n }\n function h() {\n const r2 = new Uint8Array(4), n2 = new Uint32Array(r2.buffer);\n return !((n2[0] = 1) & r2[0]);\n }\n function U(r2) {\n let n2 = \"\";\n for (const t3 of r2) {\n const o5 = t3.codePointAt(0)?.toString(16).padStart(4, \"0\");\n n2 && (n2 += \", \"), n2 += `U+${o5}`;\n }\n return n2;\n }\n var g, p;\n var init_utils = __esm({\n \"../../../node_modules/.pnpm/cbor2@2.0.1/node_modules/cbor2/lib/utils.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n g = Symbol(\"CBOR_RANGES\");\n p = { \"-\": \"+\", _: \"/\" };\n }\n });\n\n // ../../../node_modules/.pnpm/cbor2@2.0.1/node_modules/cbor2/lib/typeEncoderMap.js\n var s2;\n var init_typeEncoderMap = __esm({\n \"../../../node_modules/.pnpm/cbor2@2.0.1/node_modules/cbor2/lib/typeEncoderMap.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n s2 = class {\n #e = /* @__PURE__ */ new Map();\n registerEncoder(e3, t3) {\n const n2 = this.#e.get(e3);\n return this.#e.set(e3, t3), n2;\n }\n get(e3) {\n return this.#e.get(e3);\n }\n delete(e3) {\n return this.#e.delete(e3);\n }\n clear() {\n this.#e.clear();\n }\n };\n }\n });\n\n // ../../../node_modules/.pnpm/cbor2@2.0.1/node_modules/cbor2/lib/sorts.js\n function f4(c4, d5) {\n const [u2, a3, n2] = c4, [l6, s4, t3] = d5, r2 = Math.min(n2.length, t3.length);\n for (let o5 = 0; o5 < r2; o5++) {\n const e3 = n2[o5] - t3[o5];\n if (e3 !== 0)\n return e3;\n }\n return 0;\n }\n var init_sorts = __esm({\n \"../../../node_modules/.pnpm/cbor2@2.0.1/node_modules/cbor2/lib/sorts.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n }\n });\n\n // ../../../node_modules/.pnpm/cbor2@2.0.1/node_modules/cbor2/lib/writer.js\n var e;\n var init_writer = __esm({\n \"../../../node_modules/.pnpm/cbor2@2.0.1/node_modules/cbor2/lib/writer.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n e = class _e {\n static defaultOptions = { chunkSize: 4096 };\n #r;\n #i = [];\n #s = null;\n #t = 0;\n #a = 0;\n constructor(t3 = {}) {\n if (this.#r = { ..._e.defaultOptions, ...t3 }, this.#r.chunkSize < 8)\n throw new RangeError(`Expected size >= 8, got ${this.#r.chunkSize}`);\n this.#n();\n }\n get length() {\n return this.#a;\n }\n read() {\n this.#o();\n const t3 = new Uint8Array(this.#a);\n let i3 = 0;\n for (const s4 of this.#i)\n t3.set(s4, i3), i3 += s4.length;\n return this.#n(), t3;\n }\n write(t3) {\n const i3 = t3.length;\n i3 > this.#l() ? (this.#o(), i3 > this.#r.chunkSize ? (this.#i.push(t3), this.#n()) : (this.#n(), this.#i[this.#i.length - 1].set(t3), this.#t = i3)) : (this.#i[this.#i.length - 1].set(t3, this.#t), this.#t += i3), this.#a += i3;\n }\n writeUint8(t3) {\n this.#e(1), this.#s.setUint8(this.#t, t3), this.#h(1);\n }\n writeUint16(t3, i3 = false) {\n this.#e(2), this.#s.setUint16(this.#t, t3, i3), this.#h(2);\n }\n writeUint32(t3, i3 = false) {\n this.#e(4), this.#s.setUint32(this.#t, t3, i3), this.#h(4);\n }\n writeBigUint64(t3, i3 = false) {\n this.#e(8), this.#s.setBigUint64(this.#t, t3, i3), this.#h(8);\n }\n writeInt16(t3, i3 = false) {\n this.#e(2), this.#s.setInt16(this.#t, t3, i3), this.#h(2);\n }\n writeInt32(t3, i3 = false) {\n this.#e(4), this.#s.setInt32(this.#t, t3, i3), this.#h(4);\n }\n writeBigInt64(t3, i3 = false) {\n this.#e(8), this.#s.setBigInt64(this.#t, t3, i3), this.#h(8);\n }\n writeFloat32(t3, i3 = false) {\n this.#e(4), this.#s.setFloat32(this.#t, t3, i3), this.#h(4);\n }\n writeFloat64(t3, i3 = false) {\n this.#e(8), this.#s.setFloat64(this.#t, t3, i3), this.#h(8);\n }\n clear() {\n this.#a = 0, this.#i = [], this.#n();\n }\n #n() {\n const t3 = new Uint8Array(this.#r.chunkSize);\n this.#i.push(t3), this.#t = 0, this.#s = new DataView(t3.buffer, t3.byteOffset, t3.byteLength);\n }\n #o() {\n if (this.#t === 0) {\n this.#i.pop();\n return;\n }\n const t3 = this.#i.length - 1;\n this.#i[t3] = this.#i[t3].subarray(0, this.#t), this.#t = 0, this.#s = null;\n }\n #l() {\n const t3 = this.#i.length - 1;\n return this.#i[t3].length - this.#t;\n }\n #e(t3) {\n this.#l() < t3 && (this.#o(), this.#n());\n }\n #h(t3) {\n this.#t += t3, this.#a += t3;\n }\n };\n }\n });\n\n // ../../../node_modules/.pnpm/cbor2@2.0.1/node_modules/cbor2/lib/float.js\n function o2(e3, n2 = 0, t3 = false) {\n const r2 = e3[n2] & 128 ? -1 : 1, f6 = (e3[n2] & 124) >> 2, a3 = (e3[n2] & 3) << 8 | e3[n2 + 1];\n if (f6 === 0) {\n if (t3 && a3 !== 0)\n throw new Error(`Unwanted subnormal: ${r2 * 5960464477539063e-23 * a3}`);\n return r2 * 5960464477539063e-23 * a3;\n } else if (f6 === 31)\n return a3 ? NaN : r2 * (1 / 0);\n return r2 * 2 ** (f6 - 25) * (1024 + a3);\n }\n function s3(e3) {\n const n2 = new DataView(new ArrayBuffer(4));\n n2.setFloat32(0, e3, false);\n const t3 = n2.getUint32(0, false);\n if ((t3 & 8191) !== 0)\n return null;\n let r2 = t3 >> 16 & 32768;\n const f6 = t3 >> 23 & 255, a3 = t3 & 8388607;\n if (!(f6 === 0 && a3 === 0))\n if (f6 >= 113 && f6 <= 142)\n r2 += (f6 - 112 << 10) + (a3 >> 13);\n else if (f6 >= 103 && f6 < 113) {\n if (a3 & (1 << 126 - f6) - 1)\n return null;\n r2 += a3 + 8388608 >> 126 - f6;\n } else if (f6 === 255)\n r2 |= 31744, r2 |= a3 >> 13;\n else\n return null;\n return r2;\n }\n function i2(e3) {\n if (e3 !== 0) {\n const n2 = new ArrayBuffer(8), t3 = new DataView(n2);\n t3.setFloat64(0, e3, false);\n const r2 = t3.getBigUint64(0, false);\n if ((r2 & 0x7ff0000000000000n) === 0n)\n return r2 & 0x8000000000000000n ? -0 : 0;\n }\n return e3;\n }\n function l3(e3) {\n switch (e3.length) {\n case 2:\n o2(e3, 0, true);\n break;\n case 4: {\n const n2 = new DataView(e3.buffer, e3.byteOffset, e3.byteLength), t3 = n2.getUint32(0, false);\n if ((t3 & 2139095040) === 0 && t3 & 8388607)\n throw new Error(`Unwanted subnormal: ${n2.getFloat32(0, false)}`);\n break;\n }\n case 8: {\n const n2 = new DataView(e3.buffer, e3.byteOffset, e3.byteLength), t3 = n2.getBigUint64(0, false);\n if ((t3 & 0x7ff0000000000000n) === 0n && t3 & 0x000fffffffffffn)\n throw new Error(`Unwanted subnormal: ${n2.getFloat64(0, false)}`);\n break;\n }\n default:\n throw new TypeError(`Bad input to isSubnormal: ${e3}`);\n }\n }\n var init_float = __esm({\n \"../../../node_modules/.pnpm/cbor2@2.0.1/node_modules/cbor2/lib/float.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n }\n });\n\n // ../../../node_modules/.pnpm/@cto.af+wtf8@0.0.2/node_modules/@cto.af/wtf8/lib/errors.js\n var DecodeError, InvalidEncodingError;\n var init_errors = __esm({\n \"../../../node_modules/.pnpm/@cto.af+wtf8@0.0.2/node_modules/@cto.af/wtf8/lib/errors.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n DecodeError = class extends TypeError {\n code = \"ERR_ENCODING_INVALID_ENCODED_DATA\";\n constructor() {\n super(\"The encoded data was not valid for encoding wtf-8\");\n }\n };\n InvalidEncodingError = class extends RangeError {\n code = \"ERR_ENCODING_NOT_SUPPORTED\";\n constructor(label) {\n super(`Invalid encoding: \"${label}\"`);\n }\n };\n }\n });\n\n // ../../../node_modules/.pnpm/@cto.af+wtf8@0.0.2/node_modules/@cto.af/wtf8/lib/const.js\n var BOM, EMPTY, MIN_HIGH_SURROGATE, MIN_LOW_SURROGATE, REPLACEMENT, WTF8;\n var init_const = __esm({\n \"../../../node_modules/.pnpm/@cto.af+wtf8@0.0.2/node_modules/@cto.af/wtf8/lib/const.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n BOM = 65279;\n EMPTY = new Uint8Array(0);\n MIN_HIGH_SURROGATE = 55296;\n MIN_LOW_SURROGATE = 56320;\n REPLACEMENT = 65533;\n WTF8 = \"wtf-8\";\n }\n });\n\n // ../../../node_modules/.pnpm/@cto.af+wtf8@0.0.2/node_modules/@cto.af/wtf8/lib/decode.js\n function isArrayBufferView(input) {\n return input && !(input instanceof ArrayBuffer) && input.buffer instanceof ArrayBuffer;\n }\n function getUint8(input) {\n if (!input) {\n return EMPTY;\n }\n if (input instanceof Uint8Array) {\n return input;\n }\n if (isArrayBufferView(input)) {\n return new Uint8Array(input.buffer, input.byteOffset, input.byteLength);\n }\n return new Uint8Array(input);\n }\n var REMAINDER, Wtf8Decoder;\n var init_decode = __esm({\n \"../../../node_modules/.pnpm/@cto.af+wtf8@0.0.2/node_modules/@cto.af/wtf8/lib/decode.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_const();\n init_errors();\n REMAINDER = [\n 0,\n 0,\n 0,\n 0,\n 0,\n 0,\n 0,\n 0,\n -1,\n -1,\n -1,\n -1,\n 1,\n 1,\n 2,\n 3\n ];\n Wtf8Decoder = class _Wtf8Decoder {\n static DEFAULT_BUFFERSIZE = 4096;\n encoding = WTF8;\n fatal;\n ignoreBOM;\n bufferSize;\n #left = 0;\n #cur = 0;\n #pending = 0;\n #first = true;\n #buf;\n constructor(label = \"wtf8\", options = void 0) {\n if (label.toLowerCase().replace(\"-\", \"\") !== \"wtf8\") {\n throw new InvalidEncodingError(label);\n }\n this.fatal = Boolean(options?.fatal);\n this.ignoreBOM = Boolean(options?.ignoreBOM);\n this.bufferSize = Math.floor(options?.bufferSize ?? _Wtf8Decoder.DEFAULT_BUFFERSIZE);\n if (isNaN(this.bufferSize) || this.bufferSize < 1) {\n throw new RangeError(`Invalid buffer size: ${options?.bufferSize}`);\n }\n this.#buf = new Uint16Array(this.bufferSize);\n }\n decode(input, options) {\n const streaming = Boolean(options?.stream);\n const bytes = getUint8(input);\n const res = [];\n const out = this.#buf;\n const maxSize = this.bufferSize - 3;\n let pos = 0;\n const fatal = () => {\n this.#cur = 0;\n this.#left = 0;\n this.#pending = 0;\n if (this.fatal) {\n throw new DecodeError();\n }\n out[pos++] = REPLACEMENT;\n };\n const fatals = () => {\n const p4 = this.#pending;\n for (let i3 = 0; i3 < p4; i3++) {\n fatal();\n }\n };\n const oneByte = (b4) => {\n if (this.#left === 0) {\n const n2 = REMAINDER[b4 >> 4];\n switch (n2) {\n case -1:\n fatal();\n break;\n case 0:\n out[pos++] = b4;\n break;\n case 1:\n this.#cur = b4 & 31;\n if ((this.#cur & 30) === 0) {\n fatal();\n } else {\n this.#left = 1;\n this.#pending = 1;\n }\n break;\n case 2:\n this.#cur = b4 & 15;\n this.#left = 2;\n this.#pending = 1;\n break;\n case 3:\n if (b4 & 8) {\n fatal();\n } else {\n this.#cur = b4 & 7;\n this.#left = 3;\n this.#pending = 1;\n }\n break;\n }\n } else {\n if ((b4 & 192) !== 128) {\n fatals();\n return oneByte(b4);\n }\n if (this.#pending === 1 && this.#left === 2 && this.#cur === 0 && (b4 & 32) === 0) {\n fatals();\n return oneByte(b4);\n }\n if (this.#left === 3 && this.#cur === 0 && (b4 & 48) === 0) {\n fatals();\n return oneByte(b4);\n }\n this.#cur = this.#cur << 6 | b4 & 63;\n this.#pending++;\n if (--this.#left === 0) {\n if (this.ignoreBOM || !this.#first || this.#cur !== BOM) {\n if (this.#cur < 65536) {\n out[pos++] = this.#cur;\n } else {\n const cp = this.#cur - 65536;\n out[pos++] = cp >>> 10 & 1023 | MIN_HIGH_SURROGATE;\n out[pos++] = cp & 1023 | MIN_LOW_SURROGATE;\n }\n }\n this.#cur = 0;\n this.#pending = 0;\n this.#first = false;\n }\n }\n };\n for (const b4 of bytes) {\n if (pos >= maxSize) {\n res.push(String.fromCharCode.apply(null, out.subarray(0, pos)));\n pos = 0;\n }\n oneByte(b4);\n }\n if (!streaming) {\n this.#first = true;\n if (this.#cur || this.#left) {\n fatals();\n }\n }\n if (pos > 0) {\n res.push(String.fromCharCode.apply(null, out.subarray(0, pos)));\n }\n return res.join(\"\");\n }\n };\n }\n });\n\n // ../../../node_modules/.pnpm/@cto.af+wtf8@0.0.2/node_modules/@cto.af/wtf8/lib/encode.js\n function utf8length(str) {\n let len = 0;\n for (const s4 of str) {\n const cp = s4.codePointAt(0);\n if (cp < 128) {\n len++;\n } else if (cp < 2048) {\n len += 2;\n } else if (cp < 65536) {\n len += 3;\n } else {\n len += 4;\n }\n }\n return len;\n }\n var Wtf8Encoder;\n var init_encode = __esm({\n \"../../../node_modules/.pnpm/@cto.af+wtf8@0.0.2/node_modules/@cto.af/wtf8/lib/encode.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_const();\n Wtf8Encoder = class {\n encoding = WTF8;\n encode(input) {\n if (!input) {\n return EMPTY;\n }\n const buf = new Uint8Array(utf8length(String(input)));\n this.encodeInto(input, buf);\n return buf;\n }\n encodeInto(source, destination) {\n const str = String(source);\n const len = str.length;\n const outLen = destination.length;\n let written = 0;\n let read = 0;\n for (read = 0; read < len; read++) {\n const c4 = str.codePointAt(read);\n if (c4 < 128) {\n if (written >= outLen) {\n break;\n }\n destination[written++] = c4;\n } else if (c4 < 2048) {\n if (written >= outLen - 1) {\n break;\n }\n destination[written++] = 192 | c4 >> 6;\n destination[written++] = 128 | c4 & 63;\n } else if (c4 < 65536) {\n if (written >= outLen - 2) {\n break;\n }\n destination[written++] = 224 | c4 >> 12;\n destination[written++] = 128 | c4 >> 6 & 63;\n destination[written++] = 128 | c4 & 63;\n } else {\n if (written >= outLen - 3) {\n break;\n }\n destination[written++] = 240 | c4 >> 18;\n destination[written++] = 128 | c4 >> 12 & 63;\n destination[written++] = 128 | c4 >> 6 & 63;\n destination[written++] = 128 | c4 & 63;\n read++;\n }\n }\n return {\n read,\n written\n };\n }\n };\n }\n });\n\n // ../../../node_modules/.pnpm/@cto.af+wtf8@0.0.2/node_modules/@cto.af/wtf8/lib/decodeStream.js\n var init_decodeStream = __esm({\n \"../../../node_modules/.pnpm/@cto.af+wtf8@0.0.2/node_modules/@cto.af/wtf8/lib/decodeStream.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_decode();\n }\n });\n\n // ../../../node_modules/.pnpm/@cto.af+wtf8@0.0.2/node_modules/@cto.af/wtf8/lib/encodeStream.js\n var init_encodeStream = __esm({\n \"../../../node_modules/.pnpm/@cto.af+wtf8@0.0.2/node_modules/@cto.af/wtf8/lib/encodeStream.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_const();\n init_encode();\n }\n });\n\n // ../../../node_modules/.pnpm/@cto.af+wtf8@0.0.2/node_modules/@cto.af/wtf8/lib/index.js\n var init_lib = __esm({\n \"../../../node_modules/.pnpm/@cto.af+wtf8@0.0.2/node_modules/@cto.af/wtf8/lib/index.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_errors();\n init_decode();\n init_encode();\n init_decodeStream();\n init_encodeStream();\n }\n });\n\n // ../../../node_modules/.pnpm/cbor2@2.0.1/node_modules/cbor2/lib/encoder.js\n function y2(e3) {\n const n2 = e3 < 0;\n return typeof e3 == \"bigint\" ? [n2 ? -e3 - 1n : e3, n2] : [n2 ? -e3 - 1 : e3, n2];\n }\n function T2(e3, n2, t3) {\n if (t3.rejectFloats)\n throw new Error(`Attempt to encode an unwanted floating point number: ${e3}`);\n if (isNaN(e3))\n n2.writeUint8(U2), n2.writeUint16(32256);\n else if (!t3.float64 && Math.fround(e3) === e3) {\n const r2 = s3(e3);\n r2 === null ? (n2.writeUint8(h2), n2.writeFloat32(e3)) : (n2.writeUint8(U2), n2.writeUint16(r2));\n } else\n n2.writeUint8(B), n2.writeFloat64(e3);\n }\n function a(e3, n2, t3) {\n const [r2, i3] = y2(e3);\n if (i3 && t3)\n throw new TypeError(`Negative size: ${e3}`);\n t3 ??= i3 ? f.NEG_INT : f.POS_INT, t3 <<= 5, r2 < 24 ? n2.writeUint8(t3 | r2) : r2 <= 255 ? (n2.writeUint8(t3 | o.ONE), n2.writeUint8(r2)) : r2 <= 65535 ? (n2.writeUint8(t3 | o.TWO), n2.writeUint16(r2)) : r2 <= 4294967295 ? (n2.writeUint8(t3 | o.FOUR), n2.writeUint32(r2)) : (n2.writeUint8(t3 | o.EIGHT), n2.writeBigUint64(BigInt(r2)));\n }\n function p2(e3, n2, t3) {\n typeof e3 == \"number\" ? a(e3, n2, f.TAG) : typeof e3 == \"object\" && !t3.ignoreOriginalEncoding && N.ENCODED in e3 ? n2.write(e3[N.ENCODED]) : e3 <= Number.MAX_SAFE_INTEGER ? a(Number(e3), n2, f.TAG) : (n2.writeUint8(f.TAG << 5 | o.EIGHT), n2.writeBigUint64(BigInt(e3)));\n }\n function N2(e3, n2, t3) {\n const [r2, i3] = y2(e3);\n if (t3.collapseBigInts && (!t3.largeNegativeAsBigInt || e3 >= -0x8000000000000000n)) {\n if (r2 <= 0xffffffffn) {\n a(Number(e3), n2);\n return;\n }\n if (r2 <= 0xffffffffffffffffn) {\n const E2 = (i3 ? f.NEG_INT : f.POS_INT) << 5;\n n2.writeUint8(E2 | o.EIGHT), n2.writeBigUint64(r2);\n return;\n }\n }\n if (t3.rejectBigInts)\n throw new Error(`Attempt to encode unwanted bigint: ${e3}`);\n const o5 = i3 ? I.NEG_BIGINT : I.POS_BIGINT, c4 = r2.toString(16), s4 = c4.length % 2 ? \"0\" : \"\";\n p2(o5, n2, t3);\n const u2 = b(s4 + c4);\n a(u2.length, n2, f.BYTE_STRING), n2.write(u2);\n }\n function Y(e3, n2, t3) {\n t3.flushToZero && (e3 = i2(e3)), Object.is(e3, -0) ? t3.simplifyNegativeZero ? t3.avoidInts ? T2(0, n2, t3) : a(0, n2) : T2(e3, n2, t3) : !t3.avoidInts && Number.isSafeInteger(e3) ? a(e3, n2) : t3.reduceUnsafeNumbers && Math.floor(e3) === e3 && e3 >= S.MIN && e3 <= S.MAX ? N2(BigInt(e3), n2, t3) : T2(e3, n2, t3);\n }\n function Z(e3, n2, t3) {\n const r2 = t3.stringNormalization ? e3.normalize(t3.stringNormalization) : e3;\n if (t3.wtf8 && !e3.isWellFormed()) {\n const i3 = K.encode(r2);\n p2(I.WTF8, n2, t3), a(i3.length, n2, f.BYTE_STRING), n2.write(i3);\n } else {\n const i3 = z.encode(r2);\n a(i3.length, n2, f.UTF8_STRING), n2.write(i3);\n }\n }\n function J(e3, n2, t3) {\n const r2 = e3;\n R2(r2, r2.length, f.ARRAY, n2, t3);\n for (const i3 of r2)\n g2(i3, n2, t3);\n }\n function V(e3, n2) {\n a(e3.length, n2, f.BYTE_STRING), n2.write(e3);\n }\n function ce(e3, n2) {\n return b2.registerEncoder(e3, n2);\n }\n function R2(e3, n2, t3, r2, i3) {\n const o5 = s(e3);\n o5 && !i3.ignoreOriginalEncoding ? r2.write(o5) : a(n2, r2, t3);\n }\n function X(e3, n2, t3) {\n if (e3 === null) {\n n2.writeUint8(q);\n return;\n }\n if (!t3.ignoreOriginalEncoding && N.ENCODED in e3) {\n n2.write(e3[N.ENCODED]);\n return;\n }\n const r2 = e3.constructor;\n if (r2) {\n const o5 = t3.types?.get(r2) ?? b2.get(r2);\n if (o5) {\n const c4 = o5(e3, n2, t3);\n if (c4 !== void 0) {\n if (!Array.isArray(c4) || c4.length !== 2)\n throw new Error(\"Invalid encoder return value\");\n (typeof c4[0] == \"bigint\" || isFinite(Number(c4[0]))) && p2(c4[0], n2, t3), g2(c4[1], n2, t3);\n }\n return;\n }\n }\n if (typeof e3.toCBOR == \"function\") {\n const o5 = e3.toCBOR(n2, t3);\n o5 && ((typeof o5[0] == \"bigint\" || isFinite(Number(o5[0]))) && p2(o5[0], n2, t3), g2(o5[1], n2, t3));\n return;\n }\n if (typeof e3.toJSON == \"function\") {\n g2(e3.toJSON(), n2, t3);\n return;\n }\n const i3 = Object.entries(e3).map((o5) => [o5[0], o5[1], Q(o5[0], t3)]);\n t3.sortKeys && i3.sort(t3.sortKeys), R2(e3, i3.length, f.MAP, n2, t3);\n for (const [o5, c4, s4] of i3)\n n2.write(s4), g2(c4, n2, t3);\n }\n function g2(e3, n2, t3) {\n switch (typeof e3) {\n case \"number\":\n Y(e3, n2, t3);\n break;\n case \"bigint\":\n N2(e3, n2, t3);\n break;\n case \"string\":\n Z(e3, n2, t3);\n break;\n case \"boolean\":\n n2.writeUint8(e3 ? j : P);\n break;\n case \"undefined\":\n if (t3.rejectUndefined)\n throw new Error(\"Attempt to encode unwanted undefined.\");\n n2.writeUint8($);\n break;\n case \"object\":\n X(e3, n2, t3);\n break;\n case \"symbol\":\n throw new TypeError(`Unknown symbol: ${e3.toString()}`);\n default:\n throw new TypeError(`Unknown type: ${typeof e3}, ${String(e3)}`);\n }\n }\n function Q(e3, n2 = {}) {\n const t3 = { ...k };\n n2.dcbor ? Object.assign(t3, H) : n2.cde && Object.assign(t3, F), Object.assign(t3, n2);\n const r2 = new e(t3);\n return g2(e3, r2, t3), r2.read();\n }\n function de(e3, n2, t3 = f.POS_INT) {\n n2 || (n2 = \"f\");\n const r2 = { ...k, collapseBigInts: false, chunkSize: 10, simplifyNegativeZero: false }, i3 = new e(r2), o5 = Number(e3);\n function c4(s4) {\n if (Object.is(e3, -0))\n throw new Error(\"Invalid integer: -0\");\n const [u2, E2] = y2(e3);\n if (E2 && t3 !== f.POS_INT)\n throw new Error(\"Invalid major type combination\");\n const w3 = typeof s4 == \"number\" && isFinite(s4);\n if (w3 && !Number.isSafeInteger(o5))\n throw new TypeError(`Unsafe number for ${n2}: ${e3}`);\n if (u2 > s4)\n throw new TypeError(`Undersized encoding ${n2} for: ${e3}`);\n const A4 = (E2 ? f.NEG_INT : t3) << 5;\n return w3 ? [A4, Number(u2)] : [A4, u2];\n }\n switch (n2) {\n case \"bigint\":\n if (Object.is(e3, -0))\n throw new TypeError(\"Invalid bigint: -0\");\n e3 = BigInt(e3), N2(e3, i3, r2);\n break;\n case \"f\":\n T2(o5, i3, r2);\n break;\n case \"f16\": {\n const s4 = s3(o5);\n if (s4 === null)\n throw new TypeError(`Invalid f16: ${e3}`);\n i3.writeUint8(U2), i3.writeUint16(s4);\n break;\n }\n case \"f32\":\n if (!isNaN(o5) && Math.fround(o5) !== o5)\n throw new TypeError(`Invalid f32: ${e3}`);\n i3.writeUint8(h2), i3.writeFloat32(o5);\n break;\n case \"f64\":\n i3.writeUint8(B), i3.writeFloat64(o5);\n break;\n case \"i\":\n if (Object.is(e3, -0))\n throw new Error(\"Invalid integer: -0\");\n if (Number.isSafeInteger(o5))\n a(o5, i3, e3 < 0 ? void 0 : t3);\n else {\n const [s4, u2] = c4(1 / 0);\n u2 > 0xffffffffffffffffn ? (e3 = BigInt(e3), N2(e3, i3, r2)) : (i3.writeUint8(s4 | o.EIGHT), i3.writeBigUint64(BigInt(u2)));\n }\n break;\n case \"i0\": {\n const [s4, u2] = c4(23);\n i3.writeUint8(s4 | u2);\n break;\n }\n case \"i8\": {\n const [s4, u2] = c4(255);\n i3.writeUint8(s4 | o.ONE), i3.writeUint8(u2);\n break;\n }\n case \"i16\": {\n const [s4, u2] = c4(65535);\n i3.writeUint8(s4 | o.TWO), i3.writeUint16(u2);\n break;\n }\n case \"i32\": {\n const [s4, u2] = c4(4294967295);\n i3.writeUint8(s4 | o.FOUR), i3.writeUint32(u2);\n break;\n }\n case \"i64\": {\n const [s4, u2] = c4(0xffffffffffffffffn);\n i3.writeUint8(s4 | o.EIGHT), i3.writeBigUint64(BigInt(u2));\n break;\n }\n default:\n throw new TypeError(`Invalid number encoding: \"${n2}\"`);\n }\n return d(e3, i3.read());\n }\n var se, U2, h2, B, j, P, $, q, z, K, k, F, H, b2;\n var init_encoder = __esm({\n \"../../../node_modules/.pnpm/cbor2@2.0.1/node_modules/cbor2/lib/encoder.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_typeEncoderMap();\n init_constants();\n init_sorts();\n init_writer();\n init_box();\n init_float();\n init_lib();\n init_utils();\n ({ ENCODED: se } = N);\n U2 = f.SIMPLE_FLOAT << 5 | o.TWO;\n h2 = f.SIMPLE_FLOAT << 5 | o.FOUR;\n B = f.SIMPLE_FLOAT << 5 | o.EIGHT;\n j = f.SIMPLE_FLOAT << 5 | T.TRUE;\n P = f.SIMPLE_FLOAT << 5 | T.FALSE;\n $ = f.SIMPLE_FLOAT << 5 | T.UNDEFINED;\n q = f.SIMPLE_FLOAT << 5 | T.NULL;\n z = new TextEncoder();\n K = new Wtf8Encoder();\n k = { ...e.defaultOptions, avoidInts: false, cde: false, collapseBigInts: true, dcbor: false, float64: false, flushToZero: false, forceEndian: null, ignoreOriginalEncoding: false, largeNegativeAsBigInt: false, reduceUnsafeNumbers: false, rejectBigInts: false, rejectCustomSimples: false, rejectDuplicateKeys: false, rejectFloats: false, rejectUndefined: false, simplifyNegativeZero: false, sortKeys: null, stringNormalization: null, types: null, wtf8: false };\n F = { cde: true, ignoreOriginalEncoding: true, sortKeys: f4 };\n H = { ...F, dcbor: true, largeNegativeAsBigInt: true, reduceUnsafeNumbers: true, rejectCustomSimples: true, rejectDuplicateKeys: true, rejectUndefined: true, simplifyNegativeZero: true, stringNormalization: \"NFC\" };\n b2 = new s2();\n b2.registerEncoder(Array, J), b2.registerEncoder(Uint8Array, V);\n }\n });\n\n // ../../../node_modules/.pnpm/cbor2@2.0.1/node_modules/cbor2/lib/options.js\n var o3;\n var init_options = __esm({\n \"../../../node_modules/.pnpm/cbor2@2.0.1/node_modules/cbor2/lib/options.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n o3 = ((e3) => (e3[e3.NEVER = -1] = \"NEVER\", e3[e3.PREFERRED = 0] = \"PREFERRED\", e3[e3.ALWAYS = 1] = \"ALWAYS\", e3))(o3 || {});\n }\n });\n\n // ../../../node_modules/.pnpm/cbor2@2.0.1/node_modules/cbor2/lib/simple.js\n var t2;\n var init_simple = __esm({\n \"../../../node_modules/.pnpm/cbor2@2.0.1/node_modules/cbor2/lib/simple.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_constants();\n init_encoder();\n t2 = class _t {\n static KnownSimple = /* @__PURE__ */ new Map([[T.FALSE, false], [T.TRUE, true], [T.NULL, null], [T.UNDEFINED, void 0]]);\n value;\n constructor(e3) {\n this.value = e3;\n }\n static create(e3) {\n return _t.KnownSimple.has(e3) ? _t.KnownSimple.get(e3) : new _t(e3);\n }\n toCBOR(e3, i3) {\n if (i3.rejectCustomSimples)\n throw new Error(`Cannot encode non-standard Simple value: ${this.value}`);\n a(this.value, e3, f.SIMPLE_FLOAT);\n }\n toString() {\n return `simple(${this.value})`;\n }\n decode() {\n return _t.KnownSimple.has(this.value) ? _t.KnownSimple.get(this.value) : this;\n }\n [Symbol.for(\"nodejs.util.inspect.custom\")](e3, i3, r2) {\n return `simple(${r2(this.value, i3)})`;\n }\n };\n }\n });\n\n // ../../../node_modules/.pnpm/cbor2@2.0.1/node_modules/cbor2/lib/decodeStream.js\n var p3, y3;\n var init_decodeStream2 = __esm({\n \"../../../node_modules/.pnpm/cbor2@2.0.1/node_modules/cbor2/lib/decodeStream.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_constants();\n init_utils();\n init_simple();\n init_float();\n p3 = new TextDecoder(\"utf8\", { fatal: true, ignoreBOM: true });\n y3 = class _y {\n static defaultOptions = { maxDepth: 1024, encoding: \"hex\", requirePreferred: false };\n #t;\n #r;\n #e = 0;\n #i;\n constructor(t3, r2) {\n if (this.#i = { ..._y.defaultOptions, ...r2 }, typeof t3 == \"string\")\n switch (this.#i.encoding) {\n case \"hex\":\n this.#t = b(t3);\n break;\n case \"base64\":\n this.#t = y(t3);\n break;\n default:\n throw new TypeError(`Encoding not implemented: \"${this.#i.encoding}\"`);\n }\n else\n this.#t = t3;\n this.#r = new DataView(this.#t.buffer, this.#t.byteOffset, this.#t.byteLength);\n }\n toHere(t3) {\n return R(this.#t, t3, this.#e);\n }\n *[Symbol.iterator]() {\n if (yield* this.#n(0), this.#e !== this.#t.length)\n throw new Error(\"Extra data in input\");\n }\n *seq() {\n for (; this.#e < this.#t.length; )\n yield* this.#n(0);\n }\n *#n(t3) {\n if (t3++ > this.#i.maxDepth)\n throw new Error(`Maximum depth ${this.#i.maxDepth} exceeded`);\n const r2 = this.#e, c4 = this.#r.getUint8(this.#e++), i3 = c4 >> 5, n2 = c4 & 31;\n let e3 = n2, f6 = false, a3 = 0;\n switch (n2) {\n case o.ONE:\n if (a3 = 1, e3 = this.#r.getUint8(this.#e), i3 === f.SIMPLE_FLOAT) {\n if (e3 < 32)\n throw new Error(`Invalid simple encoding in extra byte: ${e3}`);\n f6 = true;\n } else if (this.#i.requirePreferred && e3 < 24)\n throw new Error(`Unexpectedly long integer encoding (1) for ${e3}`);\n break;\n case o.TWO:\n if (a3 = 2, i3 === f.SIMPLE_FLOAT)\n e3 = o2(this.#t, this.#e);\n else if (e3 = this.#r.getUint16(this.#e, false), this.#i.requirePreferred && e3 <= 255)\n throw new Error(`Unexpectedly long integer encoding (2) for ${e3}`);\n break;\n case o.FOUR:\n if (a3 = 4, i3 === f.SIMPLE_FLOAT)\n e3 = this.#r.getFloat32(this.#e, false);\n else if (e3 = this.#r.getUint32(this.#e, false), this.#i.requirePreferred && e3 <= 65535)\n throw new Error(`Unexpectedly long integer encoding (4) for ${e3}`);\n break;\n case o.EIGHT: {\n if (a3 = 8, i3 === f.SIMPLE_FLOAT)\n e3 = this.#r.getFloat64(this.#e, false);\n else if (e3 = this.#r.getBigUint64(this.#e, false), e3 <= Number.MAX_SAFE_INTEGER && (e3 = Number(e3)), this.#i.requirePreferred && e3 <= 4294967295)\n throw new Error(`Unexpectedly long integer encoding (8) for ${e3}`);\n break;\n }\n case 28:\n case 29:\n case 30:\n throw new Error(`Additional info not implemented: ${n2}`);\n case o.INDEFINITE:\n switch (i3) {\n case f.POS_INT:\n case f.NEG_INT:\n case f.TAG:\n throw new Error(`Invalid indefinite encoding for MT ${i3}`);\n case f.SIMPLE_FLOAT:\n yield [i3, n2, N.BREAK, r2, 0];\n return;\n }\n e3 = 1 / 0;\n break;\n default:\n f6 = true;\n }\n switch (this.#e += a3, i3) {\n case f.POS_INT:\n yield [i3, n2, e3, r2, a3];\n break;\n case f.NEG_INT:\n yield [i3, n2, typeof e3 == \"bigint\" ? -1n - e3 : -1 - Number(e3), r2, a3];\n break;\n case f.BYTE_STRING:\n e3 === 1 / 0 ? yield* this.#s(i3, t3, r2) : yield [i3, n2, this.#a(e3), r2, e3];\n break;\n case f.UTF8_STRING:\n e3 === 1 / 0 ? yield* this.#s(i3, t3, r2) : yield [i3, n2, p3.decode(this.#a(e3)), r2, e3];\n break;\n case f.ARRAY:\n if (e3 === 1 / 0)\n yield* this.#s(i3, t3, r2, false);\n else {\n const o5 = Number(e3);\n yield [i3, n2, o5, r2, a3];\n for (let h4 = 0; h4 < o5; h4++)\n yield* this.#n(t3 + 1);\n }\n break;\n case f.MAP:\n if (e3 === 1 / 0)\n yield* this.#s(i3, t3, r2, false);\n else {\n const o5 = Number(e3);\n yield [i3, n2, o5, r2, a3];\n for (let h4 = 0; h4 < o5; h4++)\n yield* this.#n(t3), yield* this.#n(t3);\n }\n break;\n case f.TAG:\n yield [i3, n2, e3, r2, a3], yield* this.#n(t3);\n break;\n case f.SIMPLE_FLOAT: {\n const o5 = e3;\n f6 && (e3 = t2.create(Number(e3))), yield [i3, n2, e3, r2, o5];\n break;\n }\n }\n }\n #a(t3) {\n const r2 = R(this.#t, this.#e, this.#e += t3);\n if (r2.length !== t3)\n throw new Error(`Unexpected end of stream reading ${t3} bytes, got ${r2.length}`);\n return r2;\n }\n *#s(t3, r2, c4, i3 = true) {\n for (yield [t3, o.INDEFINITE, 1 / 0, c4, 1 / 0]; ; ) {\n const n2 = this.#n(r2), e3 = n2.next(), [f6, a3, o5] = e3.value;\n if (o5 === N.BREAK) {\n yield e3.value, n2.next();\n return;\n }\n if (i3) {\n if (f6 !== t3)\n throw new Error(`Unmatched major type. Expected ${t3}, got ${f6}.`);\n if (a3 === o.INDEFINITE)\n throw new Error(\"New stream started in typed stream\");\n }\n yield e3.value, yield* n2;\n }\n }\n };\n }\n });\n\n // ../../../node_modules/.pnpm/cbor2@2.0.1/node_modules/cbor2/lib/container.js\n function k2(d5, r2) {\n return !r2.boxed && !r2.preferMap && d5.every(([i3]) => typeof i3 == \"string\") ? Object.fromEntries(d5) : new Map(d5);\n }\n var v, A2, w;\n var init_container = __esm({\n \"../../../node_modules/.pnpm/cbor2@2.0.1/node_modules/cbor2/lib/container.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_constants();\n init_options();\n init_sorts();\n init_box();\n init_encoder();\n init_utils();\n init_decodeStream2();\n init_simple();\n init_tag();\n init_float();\n v = /* @__PURE__ */ new Map([[o.ZERO, 1], [o.ONE, 2], [o.TWO, 3], [o.FOUR, 5], [o.EIGHT, 9]]);\n A2 = new Uint8Array(0);\n w = class _w {\n static defaultDecodeOptions = { ...y3.defaultOptions, ParentType: _w, boxed: false, cde: false, dcbor: false, diagnosticSizes: o3.PREFERRED, convertUnsafeIntsToFloat: false, createObject: k2, pretty: false, preferMap: false, rejectLargeNegatives: false, rejectBigInts: false, rejectDuplicateKeys: false, rejectFloats: false, rejectInts: false, rejectLongLoundNaN: false, rejectLongFloats: false, rejectNegativeZero: false, rejectSimple: false, rejectStreaming: false, rejectStringsNotNormalizedAs: null, rejectSubnormals: false, rejectUndefined: false, rejectUnsafeFloatInts: false, saveOriginal: false, sortKeys: null, tags: null };\n static cdeDecodeOptions = { cde: true, rejectStreaming: true, requirePreferred: true, sortKeys: f4 };\n static dcborDecodeOptions = { ...this.cdeDecodeOptions, dcbor: true, convertUnsafeIntsToFloat: true, rejectDuplicateKeys: true, rejectLargeNegatives: true, rejectLongLoundNaN: true, rejectLongFloats: true, rejectNegativeZero: true, rejectSimple: true, rejectUndefined: true, rejectUnsafeFloatInts: true, rejectStringsNotNormalizedAs: \"NFC\" };\n parent;\n mt;\n ai;\n left;\n offset;\n count = 0;\n children = [];\n depth = 0;\n #e;\n #t = null;\n constructor(r2, i3, e3, t3) {\n if ([this.mt, this.ai, , this.offset] = r2, this.left = i3, this.parent = e3, this.#e = t3, e3 && (this.depth = e3.depth + 1), this.mt === f.MAP && (this.#e.sortKeys || this.#e.rejectDuplicateKeys) && (this.#t = []), this.#e.rejectStreaming && this.ai === o.INDEFINITE)\n throw new Error(\"Streaming not supported\");\n }\n get isStreaming() {\n return this.left === 1 / 0;\n }\n get done() {\n return this.left === 0;\n }\n static create(r2, i3, e3, t3) {\n const [s4, l6, n2, c4] = r2;\n switch (s4) {\n case f.POS_INT:\n case f.NEG_INT: {\n if (e3.rejectInts)\n throw new Error(`Unexpected integer: ${n2}`);\n if (e3.rejectLargeNegatives && n2 < -0x8000000000000000n)\n throw new Error(`Invalid 65bit negative number: ${n2}`);\n let o5 = n2;\n return e3.convertUnsafeIntsToFloat && o5 >= S.MIN && o5 <= S.MAX && (o5 = Number(n2)), e3.boxed ? d(o5, t3.toHere(c4)) : o5;\n }\n case f.SIMPLE_FLOAT:\n if (l6 > o.ONE) {\n if (e3.rejectFloats)\n throw new Error(`Decoding unwanted floating point number: ${n2}`);\n if (e3.rejectNegativeZero && Object.is(n2, -0))\n throw new Error(\"Decoding negative zero\");\n if (e3.rejectLongLoundNaN && isNaN(n2)) {\n const o5 = t3.toHere(c4);\n if (o5.length !== 3 || o5[1] !== 126 || o5[2] !== 0)\n throw new Error(`Invalid NaN encoding: \"${A(o5)}\"`);\n }\n if (e3.rejectSubnormals && l3(t3.toHere(c4 + 1)), e3.rejectLongFloats) {\n const o5 = Q(n2, { chunkSize: 9, reduceUnsafeNumbers: e3.rejectUnsafeFloatInts });\n if (o5[0] >> 5 !== s4)\n throw new Error(`Should have been encoded as int, not float: ${n2}`);\n if (o5.length < v.get(l6))\n throw new Error(`Number should have been encoded shorter: ${n2}`);\n }\n if (typeof n2 == \"number\" && e3.boxed)\n return d(n2, t3.toHere(c4));\n } else {\n if (e3.rejectSimple && n2 instanceof t2)\n throw new Error(`Invalid simple value: ${n2}`);\n if (e3.rejectUndefined && n2 === void 0)\n throw new Error(\"Unexpected undefined\");\n }\n return n2;\n case f.BYTE_STRING:\n case f.UTF8_STRING:\n if (n2 === 1 / 0)\n return new e3.ParentType(r2, 1 / 0, i3, e3);\n if (e3.rejectStringsNotNormalizedAs && typeof n2 == \"string\") {\n const o5 = n2.normalize(e3.rejectStringsNotNormalizedAs);\n if (n2 !== o5)\n throw new Error(`String not normalized as \"${e3.rejectStringsNotNormalizedAs}\", got [${U(n2)}] instead of [${U(o5)}]`);\n }\n return e3.boxed ? d(n2, t3.toHere(c4)) : n2;\n case f.ARRAY:\n return new e3.ParentType(r2, n2, i3, e3);\n case f.MAP:\n return new e3.ParentType(r2, n2 * 2, i3, e3);\n case f.TAG: {\n const o5 = new e3.ParentType(r2, 1, i3, e3);\n return o5.children = new i(n2), o5;\n }\n }\n throw new TypeError(`Invalid major type: ${s4}`);\n }\n static decodeToEncodeOpts(r2) {\n return { ...k, avoidInts: r2.rejectInts, float64: !r2.rejectLongFloats, flushToZero: r2.rejectSubnormals, largeNegativeAsBigInt: r2.rejectLargeNegatives, sortKeys: r2.sortKeys };\n }\n push(r2, i3, e3) {\n if (this.children.push(r2), this.#t) {\n const t3 = f2(r2) || i3.toHere(e3);\n this.#t.push(t3);\n }\n return --this.left;\n }\n replaceLast(r2, i3, e3) {\n let t3, s4 = -1 / 0;\n if (this.children instanceof i ? (s4 = 0, t3 = this.children.contents, this.children.contents = r2) : (s4 = this.children.length - 1, t3 = this.children[s4], this.children[s4] = r2), this.#t) {\n const l6 = f2(r2) || e3.toHere(i3.offset);\n this.#t[s4] = l6;\n }\n return t3;\n }\n convert(r2) {\n let i3;\n switch (this.mt) {\n case f.ARRAY:\n i3 = this.children;\n break;\n case f.MAP: {\n const e3 = this.#r();\n if (this.#e.sortKeys) {\n let t3;\n for (const s4 of e3) {\n if (t3 && this.#e.sortKeys(t3, s4) >= 0)\n throw new Error(`Duplicate or out of order key: \"0x${s4[2]}\"`);\n t3 = s4;\n }\n } else if (this.#e.rejectDuplicateKeys) {\n const t3 = /* @__PURE__ */ new Set();\n for (const [s4, l6, n2] of e3) {\n const c4 = A(n2);\n if (t3.has(c4))\n throw new Error(`Duplicate key: \"0x${c4}\"`);\n t3.add(c4);\n }\n }\n i3 = this.#e.createObject(e3, this.#e);\n break;\n }\n case f.BYTE_STRING:\n return d2(this.children);\n case f.UTF8_STRING: {\n const e3 = this.children.join(\"\");\n i3 = this.#e.boxed ? d(e3, r2.toHere(this.offset)) : e3;\n break;\n }\n case f.TAG:\n i3 = this.children.decode(this.#e);\n break;\n default:\n throw new TypeError(`Invalid mt on convert: ${this.mt}`);\n }\n return this.#e.saveOriginal && i3 && typeof i3 == \"object\" && u(i3, r2.toHere(this.offset)), i3;\n }\n #r() {\n const r2 = this.children, i3 = r2.length;\n if (i3 % 2)\n throw new Error(\"Missing map value\");\n const e3 = new Array(i3 / 2);\n if (this.#t)\n for (let t3 = 0; t3 < i3; t3 += 2)\n e3[t3 >> 1] = [r2[t3], r2[t3 + 1], this.#t[t3]];\n else\n for (let t3 = 0; t3 < i3; t3 += 2)\n e3[t3 >> 1] = [r2[t3], r2[t3 + 1], A2];\n return e3;\n }\n };\n }\n });\n\n // ../../../node_modules/.pnpm/cbor2@2.0.1/node_modules/cbor2/lib/diagnostic.js\n function a2(m2, l6, n2, p4) {\n let t3 = \"\";\n if (l6 === o.INDEFINITE)\n t3 += \"_\";\n else {\n if (p4.diagnosticSizes === o3.NEVER)\n return \"\";\n {\n let r2 = p4.diagnosticSizes === o3.ALWAYS;\n if (!r2) {\n let e3 = o.ZERO;\n if (Object.is(n2, -0))\n e3 = o.TWO;\n else if (m2 === f.POS_INT || m2 === f.NEG_INT) {\n const T4 = n2 < 0, u2 = typeof n2 == \"bigint\" ? 1n : 1, o5 = T4 ? -n2 - u2 : n2;\n o5 <= 23 ? e3 = Number(o5) : o5 <= 255 ? e3 = o.ONE : o5 <= 65535 ? e3 = o.TWO : o5 <= 4294967295 ? e3 = o.FOUR : e3 = o.EIGHT;\n } else\n isFinite(n2) ? Math.fround(n2) === n2 ? s3(n2) == null ? e3 = o.FOUR : e3 = o.TWO : e3 = o.EIGHT : e3 = o.TWO;\n r2 = e3 !== l6;\n }\n r2 && (t3 += \"_\", l6 < o.ONE ? t3 += \"i\" : t3 += String(l6 - 24));\n }\n }\n return t3;\n }\n function M(m2, l6) {\n const n2 = { ...w.defaultDecodeOptions, ...l6, ParentType: g3 }, p4 = new y3(m2, n2);\n let t3, r2, e3 = \"\";\n for (const T4 of p4) {\n const [u2, o5, i3] = T4;\n switch (t3 && (t3.count > 0 && i3 !== N.BREAK && (t3.mt === f.MAP && t3.count % 2 ? e3 += \": \" : (e3 += \",\", n2.pretty || (e3 += \" \"))), n2.pretty && (t3.mt !== f.MAP || t3.count % 2 === 0) && (e3 += `\n${O.repeat(t3.depth + 1)}`)), r2 = w.create(T4, t3, n2, p4), u2) {\n case f.POS_INT:\n case f.NEG_INT:\n e3 += String(i3), e3 += a2(u2, o5, i3, n2);\n break;\n case f.SIMPLE_FLOAT:\n if (i3 !== N.BREAK)\n if (typeof i3 == \"number\") {\n const c4 = Object.is(i3, -0) ? \"-0.0\" : String(i3);\n e3 += c4, isFinite(i3) && !/[.e]/.test(c4) && (e3 += \".0\"), e3 += a2(u2, o5, i3, n2);\n } else\n i3 instanceof t2 ? (e3 += \"simple(\", e3 += String(i3.value), e3 += a2(f.POS_INT, o5, i3.value, n2), e3 += \")\") : e3 += String(i3);\n break;\n case f.BYTE_STRING:\n i3 === 1 / 0 ? (e3 += \"(_ \", r2.close = \")\", r2.quote = \"'\") : (e3 += \"h'\", e3 += A(i3), e3 += \"'\", e3 += a2(f.POS_INT, o5, i3.length, n2));\n break;\n case f.UTF8_STRING:\n i3 === 1 / 0 ? (e3 += \"(_ \", r2.close = \")\") : (e3 += JSON.stringify(i3), e3 += a2(f.POS_INT, o5, y4.encode(i3).length, n2));\n break;\n case f.ARRAY: {\n e3 += \"[\";\n const c4 = a2(f.POS_INT, o5, i3, n2);\n e3 += c4, c4 && (e3 += \" \"), n2.pretty && i3 ? r2.close = `\n${O.repeat(r2.depth)}]` : r2.close = \"]\";\n break;\n }\n case f.MAP: {\n e3 += \"{\";\n const c4 = a2(f.POS_INT, o5, i3, n2);\n e3 += c4, c4 && (e3 += \" \"), n2.pretty && i3 ? r2.close = `\n${O.repeat(r2.depth)}}` : r2.close = \"}\";\n break;\n }\n case f.TAG:\n e3 += String(i3), e3 += a2(f.POS_INT, o5, i3, n2), e3 += \"(\", r2.close = \")\";\n break;\n }\n if (r2 === N.BREAK)\n if (t3?.isStreaming)\n t3.left = 0;\n else\n throw new Error(\"Unexpected BREAK\");\n else\n t3 && (t3.count++, t3.left--);\n for (r2 instanceof g3 && (t3 = r2); t3?.done; ) {\n if (t3.isEmptyStream)\n e3 = e3.slice(0, -3), e3 += `${t3.quote}${t3.quote}_`;\n else {\n if (t3.mt === f.MAP && t3.count % 2 !== 0)\n throw new Error(`Odd streaming map size: ${t3.count}`);\n e3 += t3.close;\n }\n t3 = t3.parent;\n }\n }\n return e3;\n }\n var O, y4, g3;\n var init_diagnostic = __esm({\n \"../../../node_modules/.pnpm/cbor2@2.0.1/node_modules/cbor2/lib/diagnostic.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_options();\n init_constants();\n init_container();\n init_decodeStream2();\n init_simple();\n init_float();\n init_utils();\n O = \" \";\n y4 = new TextEncoder();\n g3 = class extends w {\n close = \"\";\n quote = '\"';\n get isEmptyStream() {\n return (this.mt === f.UTF8_STRING || this.mt === f.BYTE_STRING) && this.count === 0;\n }\n };\n }\n });\n\n // ../../../node_modules/.pnpm/cbor2@2.0.1/node_modules/cbor2/lib/comment.js\n function k3(t3) {\n return t3 instanceof A3;\n }\n function O2(t3, a3) {\n return t3 === 1 / 0 ? \"Indefinite\" : a3 ? `${t3} ${a3}${t3 !== 1 && t3 !== 1n ? \"s\" : \"\"}` : String(t3);\n }\n function y5(t3) {\n return \"\".padStart(t3, \" \");\n }\n function x2(t3, a3, f6) {\n let e3 = \"\";\n e3 += y5(t3.depth * 2);\n const n2 = f2(t3);\n e3 += A(n2.subarray(0, 1));\n const r2 = t3.numBytes();\n r2 && (e3 += \" \", e3 += A(n2.subarray(1, r2 + 1))), e3 = e3.padEnd(a3.minCol + 1, \" \"), e3 += \"-- \", f6 !== void 0 && (e3 += y5(t3.depth * 2), f6 !== \"\" && (e3 += `[${f6}] `));\n let p4 = false;\n const [s4] = t3.children;\n switch (t3.mt) {\n case f.POS_INT:\n e3 += `Unsigned: ${s4}`, typeof s4 == \"bigint\" && (e3 += \"n\");\n break;\n case f.NEG_INT:\n e3 += `Negative: ${s4}`, typeof s4 == \"bigint\" && (e3 += \"n\");\n break;\n case f.BYTE_STRING:\n e3 += `Bytes (Length: ${O2(t3.length)})`;\n break;\n case f.UTF8_STRING:\n e3 += `UTF8 (Length: ${O2(t3.length)})`, t3.length !== 1 / 0 && (e3 += `: ${JSON.stringify(s4)}`);\n break;\n case f.ARRAY:\n e3 += `Array (Length: ${O2(t3.value, \"item\")})`;\n break;\n case f.MAP:\n e3 += `Map (Length: ${O2(t3.value, \"pair\")})`;\n break;\n case f.TAG: {\n e3 += `Tag #${t3.value}`;\n const o5 = t3.children, [m2] = o5.contents.children, i3 = new i(o5.tag, m2);\n u(i3, n2);\n const l6 = i3.comment(a3, t3.depth);\n l6 && (e3 += \": \", e3 += l6), p4 ||= i3.noChildren;\n break;\n }\n case f.SIMPLE_FLOAT:\n s4 === N.BREAK ? e3 += \"BREAK\" : t3.ai > o.ONE ? Object.is(s4, -0) ? e3 += \"Float: -0\" : e3 += `Float: ${s4}` : (e3 += \"Simple: \", s4 instanceof t2 ? e3 += s4.value : e3 += s4);\n break;\n }\n if (!p4)\n if (t3.leaf) {\n if (e3 += `\n`, n2.length > r2 + 1) {\n const o5 = y5((t3.depth + 1) * 2), m2 = f3(n2);\n if (m2?.length) {\n m2.sort((l6, c4) => {\n const g4 = l6[0] - c4[0];\n return g4 || c4[1] - l6[1];\n });\n let i3 = 0;\n for (const [l6, c4, g4] of m2)\n if (!(l6 < i3)) {\n if (i3 = l6 + c4, g4 === \"<<\") {\n e3 += y5(a3.minCol + 1), e3 += \"--\", e3 += o5, e3 += \"<< \";\n const d5 = R(n2, l6, l6 + c4), h4 = f3(d5);\n if (h4) {\n const $3 = h4.findIndex(([w3, D2, v2]) => w3 === 0 && D2 === c4 && v2 === \"<<\");\n $3 >= 0 && h4.splice($3, 1);\n }\n e3 += M(d5), e3 += ` >>\n`, e3 += L(d5, { initialDepth: t3.depth + 1, minCol: a3.minCol, noPrefixHex: true });\n continue;\n } else\n g4 === \"'\" && (e3 += y5(a3.minCol + 1), e3 += \"--\", e3 += o5, e3 += \"'\", e3 += H2.decode(n2.subarray(l6, l6 + c4)), e3 += `'\n`);\n if (l6 > r2)\n for (let d5 = l6; d5 < l6 + c4; d5 += 8) {\n const h4 = Math.min(d5 + 8, l6 + c4);\n e3 += o5, e3 += A(n2.subarray(d5, h4)), e3 += `\n`;\n }\n }\n } else\n for (let i3 = r2 + 1; i3 < n2.length; i3 += 8)\n e3 += o5, e3 += A(n2.subarray(i3, i3 + 8)), e3 += `\n`;\n }\n } else {\n e3 += `\n`;\n let o5 = 0;\n for (const m2 of t3.children) {\n if (k3(m2)) {\n let i3 = String(o5);\n t3.mt === f.MAP ? i3 = o5 % 2 ? `val ${(o5 - 1) / 2}` : `key ${o5 / 2}` : t3.mt === f.TAG && (i3 = \"\"), e3 += x2(m2, a3, i3);\n }\n o5++;\n }\n }\n return e3;\n }\n function L(t3, a3) {\n const f6 = { ...q2, ...a3, ParentType: A3, saveOriginal: true }, e3 = new y3(t3, f6);\n let n2, r2;\n for (const s4 of e3) {\n if (r2 = w.create(s4, n2, f6, e3), s4[2] === N.BREAK)\n if (n2?.isStreaming)\n n2.left = 1;\n else\n throw new Error(\"Unexpected BREAK\");\n if (!k3(r2)) {\n const i3 = new A3(s4, 0, n2, f6);\n i3.leaf = true, i3.children.push(r2), u(i3, e3.toHere(s4[3])), r2 = i3;\n }\n let o5 = (r2.depth + 1) * 2;\n const m2 = r2.numBytes();\n for (m2 && (o5 += 1, o5 += m2 * 2), f6.minCol = Math.max(f6.minCol, o5), n2 && n2.push(r2, e3, s4[3]), n2 = r2; n2?.done; )\n r2 = n2, r2.leaf || u(r2, e3.toHere(r2.offset)), { parent: n2 } = n2;\n }\n a3 && (a3.minCol = f6.minCol);\n let p4 = f6.noPrefixHex ? \"\" : `0x${A(e3.toHere(0))}\n`;\n return p4 += x2(r2, f6), p4;\n }\n var H2, A3, q2;\n var init_comment = __esm({\n \"../../../node_modules/.pnpm/cbor2@2.0.1/node_modules/cbor2/lib/comment.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_constants();\n init_box();\n init_utils();\n init_container();\n init_decodeStream2();\n init_simple();\n init_tag();\n init_diagnostic();\n H2 = new TextDecoder();\n A3 = class extends w {\n depth = 0;\n leaf = false;\n value;\n length;\n [N.ENCODED];\n constructor(a3, f6, e3, n2) {\n super(a3, f6, e3, n2), this.parent ? this.depth = this.parent.depth + 1 : this.depth = n2.initialDepth, [, , this.value, , this.length] = a3;\n }\n numBytes() {\n switch (this.ai) {\n case o.ONE:\n return 1;\n case o.TWO:\n return 2;\n case o.FOUR:\n return 4;\n case o.EIGHT:\n return 8;\n }\n return 0;\n }\n };\n q2 = { ...w.defaultDecodeOptions, initialDepth: 0, noPrefixHex: false, minCol: 0 };\n }\n });\n\n // ../../../node_modules/.pnpm/cbor2@2.0.1/node_modules/cbor2/lib/types.js\n function O3(e3) {\n if (typeof e3 == \"object\" && e3) {\n if (e3.constructor !== Number)\n throw new Error(`Expected number: ${e3}`);\n } else if (typeof e3 != \"number\")\n throw new Error(`Expected number: ${e3}`);\n }\n function E(e3) {\n if (typeof e3 == \"object\" && e3) {\n if (e3.constructor !== String)\n throw new Error(`Expected string: ${e3}`);\n } else if (typeof e3 != \"string\")\n throw new Error(`Expected string: ${e3}`);\n }\n function f5(e3) {\n if (!(e3 instanceof Uint8Array))\n throw new Error(`Expected Uint8Array: ${e3}`);\n }\n function U3(e3) {\n if (!Array.isArray(e3))\n throw new Error(`Expected Array: ${e3}`);\n }\n function h3(e3) {\n return E(e3.contents), new Date(e3.contents);\n }\n function N3(e3) {\n return O3(e3.contents), new Date(e3.contents * 1e3);\n }\n function T3(e3, r2, n2) {\n if (f5(r2.contents), n2.rejectBigInts)\n throw new Error(`Decoding unwanted big integer: ${r2}(h'${A(r2.contents)}')`);\n if (n2.requirePreferred && r2.contents[0] === 0)\n throw new Error(`Decoding overly-large bigint: ${r2.tag}(h'${A(r2.contents)})`);\n let t3 = r2.contents.reduce((o5, d5) => o5 << 8n | BigInt(d5), 0n);\n if (e3 && (t3 = -1n - t3), n2.requirePreferred && t3 >= Number.MIN_SAFE_INTEGER && t3 <= Number.MAX_SAFE_INTEGER)\n throw new Error(`Decoding bigint that could have been int: ${t3}n`);\n return n2.boxed ? d(t3, r2.contents) : t3;\n }\n function D(e3, r2) {\n return f5(e3.contents), e3;\n }\n function c2(e3, r2, n2) {\n f5(e3.contents);\n let t3 = e3.contents.length;\n if (t3 % r2.BYTES_PER_ELEMENT !== 0)\n throw new Error(`Number of bytes must be divisible by ${r2.BYTES_PER_ELEMENT}, got: ${t3}`);\n t3 /= r2.BYTES_PER_ELEMENT;\n const o5 = new r2(t3), d5 = new DataView(e3.contents.buffer, e3.contents.byteOffset, e3.contents.byteLength), u2 = d5[`get${r2.name.replace(/Array/, \"\")}`].bind(d5);\n for (let y6 = 0; y6 < t3; y6++)\n o5[y6] = u2(y6 * r2.BYTES_PER_ELEMENT, n2);\n return o5;\n }\n function l4(e3, r2, n2, t3, o5) {\n const d5 = o5.forceEndian ?? S2;\n if (p2(d5 ? r2 : n2, e3, o5), a(t3.byteLength, e3, f.BYTE_STRING), S2 === d5)\n e3.write(new Uint8Array(t3.buffer, t3.byteOffset, t3.byteLength));\n else {\n const y6 = `write${t3.constructor.name.replace(/Array/, \"\")}`, g4 = e3[y6].bind(e3);\n for (const p4 of t3)\n g4(p4, d5);\n }\n }\n function x3(e3) {\n return f5(e3.contents), new Wtf8Decoder().decode(e3.contents);\n }\n function w2(e3) {\n throw new Error(`Encoding ${e3.constructor.name} intentionally unimplmented. It is not concrete enough to interoperate. Convert to Uint8Array first.`);\n }\n function m(e3) {\n return [NaN, e3.valueOf()];\n }\n var S2, _, $2;\n var init_types = __esm({\n \"../../../node_modules/.pnpm/cbor2@2.0.1/node_modules/cbor2/lib/types.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_constants();\n init_box();\n init_utils();\n init_encoder();\n init_container();\n init_tag();\n init_lib();\n init_comment();\n S2 = !h();\n ce(Map, (e3, r2, n2) => {\n const t3 = [...e3.entries()].map((o5) => [o5[0], o5[1], Q(o5[0], n2)]);\n if (n2.rejectDuplicateKeys) {\n const o5 = /* @__PURE__ */ new Set();\n for (const [d5, u2, y6] of t3) {\n const g4 = A(y6);\n if (o5.has(g4))\n throw new Error(`Duplicate map key: 0x${g4}`);\n o5.add(g4);\n }\n }\n n2.sortKeys && t3.sort(n2.sortKeys), R2(e3, e3.size, f.MAP, r2, n2);\n for (const [o5, d5, u2] of t3)\n r2.write(u2), g2(d5, r2, n2);\n });\n h3.comment = (e3) => (E(e3.contents), `(String Date) ${new Date(e3.contents).toISOString()}`), i.registerDecoder(I.DATE_STRING, h3);\n N3.comment = (e3) => (O3(e3.contents), `(Epoch Date) ${new Date(e3.contents * 1e3).toISOString()}`), i.registerDecoder(I.DATE_EPOCH, N3), ce(Date, (e3) => [I.DATE_EPOCH, e3.valueOf() / 1e3]);\n _ = T3.bind(null, false);\n $2 = T3.bind(null, true);\n _.comment = (e3, r2) => `(Positive BigInt) ${T3(false, e3, r2)}n`, $2.comment = (e3, r2) => `(Negative BigInt) ${T3(true, e3, r2)}n`, i.registerDecoder(I.POS_BIGINT, _), i.registerDecoder(I.NEG_BIGINT, $2);\n D.comment = (e3, r2, n2) => {\n f5(e3.contents);\n const t3 = { ...r2, initialDepth: n2 + 2, noPrefixHex: true }, o5 = f2(e3);\n let u2 = 2 ** ((o5[0] & 31) - 24) + 1;\n const y6 = o5[u2] & 31;\n let g4 = A(o5.subarray(u2, ++u2));\n y6 >= 24 && (g4 += \" \", g4 += A(o5.subarray(u2, u2 + 2 ** (y6 - 24)))), t3.minCol = Math.max(t3.minCol, (n2 + 1) * 2 + g4.length);\n const p4 = L(e3.contents, t3);\n let I2 = `Embedded CBOR\n`;\n return I2 += `${\"\".padStart((n2 + 1) * 2, \" \")}${g4}`.padEnd(t3.minCol + 1, \" \"), I2 += `-- Bytes (Length: ${e3.contents.length})\n`, I2 += p4, I2;\n }, D.noChildren = true, i.registerDecoder(I.CBOR, D), i.registerDecoder(I.URI, (e3) => (E(e3.contents), new URL(e3.contents)), \"URI\"), ce(URL, (e3) => [I.URI, e3.toString()]), i.registerDecoder(I.BASE64URL, (e3) => (E(e3.contents), x(e3.contents)), \"Base64url-encoded\"), i.registerDecoder(I.BASE64, (e3) => (E(e3.contents), y(e3.contents)), \"Base64-encoded\"), i.registerDecoder(35, (e3) => (E(e3.contents), new RegExp(e3.contents)), \"RegExp\"), i.registerDecoder(21065, (e3) => {\n E(e3.contents);\n const r2 = `^(?:${e3.contents})$`;\n return new RegExp(r2, \"u\");\n }, \"I-RegExp\"), i.registerDecoder(I.REGEXP, (e3) => {\n if (U3(e3.contents), e3.contents.length < 1 || e3.contents.length > 2)\n throw new Error(`Invalid RegExp Array: ${e3.contents}`);\n return new RegExp(e3.contents[0], e3.contents[1]);\n }, \"RegExp\"), ce(RegExp, (e3) => [I.REGEXP, [e3.source, e3.flags]]), i.registerDecoder(64, (e3) => (f5(e3.contents), e3.contents), \"uint8 Typed Array\");\n i.registerDecoder(65, (e3) => c2(e3, Uint16Array, false), \"uint16, big endian, Typed Array\"), i.registerDecoder(66, (e3) => c2(e3, Uint32Array, false), \"uint32, big endian, Typed Array\"), i.registerDecoder(67, (e3) => c2(e3, BigUint64Array, false), \"uint64, big endian, Typed Array\"), i.registerDecoder(68, (e3) => (f5(e3.contents), new Uint8ClampedArray(e3.contents)), \"uint8 Typed Array, clamped arithmetic\"), ce(Uint8ClampedArray, (e3) => [68, new Uint8Array(e3.buffer, e3.byteOffset, e3.byteLength)]), i.registerDecoder(69, (e3) => c2(e3, Uint16Array, true), \"uint16, little endian, Typed Array\"), ce(Uint16Array, (e3, r2, n2) => l4(r2, 69, 65, e3, n2)), i.registerDecoder(70, (e3) => c2(e3, Uint32Array, true), \"uint32, little endian, Typed Array\"), ce(Uint32Array, (e3, r2, n2) => l4(r2, 70, 66, e3, n2)), i.registerDecoder(71, (e3) => c2(e3, BigUint64Array, true), \"uint64, little endian, Typed Array\"), ce(BigUint64Array, (e3, r2, n2) => l4(r2, 71, 67, e3, n2)), i.registerDecoder(72, (e3) => (f5(e3.contents), new Int8Array(e3.contents)), \"sint8 Typed Array\"), ce(Int8Array, (e3) => [72, new Uint8Array(e3.buffer, e3.byteOffset, e3.byteLength)]), i.registerDecoder(73, (e3) => c2(e3, Int16Array, false), \"sint16, big endian, Typed Array\"), i.registerDecoder(74, (e3) => c2(e3, Int32Array, false), \"sint32, big endian, Typed Array\"), i.registerDecoder(75, (e3) => c2(e3, BigInt64Array, false), \"sint64, big endian, Typed Array\"), i.registerDecoder(77, (e3) => c2(e3, Int16Array, true), \"sint16, little endian, Typed Array\"), ce(Int16Array, (e3, r2, n2) => l4(r2, 77, 73, e3, n2)), i.registerDecoder(78, (e3) => c2(e3, Int32Array, true), \"sint32, little endian, Typed Array\"), ce(Int32Array, (e3, r2, n2) => l4(r2, 78, 74, e3, n2)), i.registerDecoder(79, (e3) => c2(e3, BigInt64Array, true), \"sint64, little endian, Typed Array\"), ce(BigInt64Array, (e3, r2, n2) => l4(r2, 79, 75, e3, n2)), i.registerDecoder(81, (e3) => c2(e3, Float32Array, false), \"IEEE 754 binary32, big endian, Typed Array\"), i.registerDecoder(82, (e3) => c2(e3, Float64Array, false), \"IEEE 754 binary64, big endian, Typed Array\"), i.registerDecoder(85, (e3) => c2(e3, Float32Array, true), \"IEEE 754 binary32, little endian, Typed Array\"), ce(Float32Array, (e3, r2, n2) => l4(r2, 85, 81, e3, n2)), i.registerDecoder(86, (e3) => c2(e3, Float64Array, true), \"IEEE 754 binary64, big endian, Typed Array\"), ce(Float64Array, (e3, r2, n2) => l4(r2, 86, 82, e3, n2)), i.registerDecoder(I.SET, (e3, r2) => {\n if (U3(e3.contents), r2.sortKeys) {\n const n2 = w.decodeToEncodeOpts(r2);\n let t3 = null;\n for (const o5 of e3.contents) {\n const d5 = [o5, void 0, Q(o5, n2)];\n if (t3 && r2.sortKeys(t3, d5) >= 0)\n throw new Error(`Set items out of order in tag #${I.SET}`);\n t3 = d5;\n }\n }\n return new Set(e3.contents);\n }, \"Set\"), ce(Set, (e3, r2, n2) => {\n let t3 = [...e3];\n if (n2.sortKeys) {\n const o5 = t3.map((d5) => [d5, void 0, Q(d5, n2)]);\n o5.sort(n2.sortKeys), t3 = o5.map(([d5]) => d5);\n }\n return [I.SET, t3];\n }), i.registerDecoder(I.JSON, (e3) => (E(e3.contents), JSON.parse(e3.contents)), \"JSON-encoded\");\n x3.comment = (e3) => {\n f5(e3.contents);\n const r2 = new Wtf8Decoder();\n return `(WTF8 string): ${JSON.stringify(r2.decode(e3.contents))}`;\n }, i.registerDecoder(I.WTF8, x3), i.registerDecoder(I.SELF_DESCRIBED, (e3) => e3.contents, \"Self-Described\"), i.registerDecoder(I.INVALID_16, () => {\n throw new Error(`Tag always invalid: ${I.INVALID_16}`);\n }, \"Invalid\"), i.registerDecoder(I.INVALID_32, () => {\n throw new Error(`Tag always invalid: ${I.INVALID_32}`);\n }, \"Invalid\"), i.registerDecoder(I.INVALID_64, () => {\n throw new Error(`Tag always invalid: ${I.INVALID_64}`);\n }, \"Invalid\");\n ce(ArrayBuffer, w2), ce(DataView, w2), typeof SharedArrayBuffer < \"u\" && ce(SharedArrayBuffer, w2);\n ce(Boolean, m), ce(Number, m), ce(String, m), ce(BigInt, m);\n }\n });\n\n // ../../../node_modules/.pnpm/cbor2@2.0.1/node_modules/cbor2/lib/version.js\n var o4;\n var init_version = __esm({\n \"../../../node_modules/.pnpm/cbor2@2.0.1/node_modules/cbor2/lib/version.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n o4 = \"2.0.1\";\n }\n });\n\n // ../../../node_modules/.pnpm/cbor2@2.0.1/node_modules/cbor2/lib/decoder.js\n function c3(i3) {\n const e3 = { ...w.defaultDecodeOptions };\n if (i3.dcbor ? Object.assign(e3, w.dcborDecodeOptions) : i3.cde && Object.assign(e3, w.cdeDecodeOptions), Object.assign(e3, i3), Object.hasOwn(e3, \"rejectLongNumbers\"))\n throw new TypeError(\"rejectLongNumbers has changed to requirePreferred\");\n return e3.boxed && (e3.saveOriginal = true), e3;\n }\n function l5(i3, e3 = {}) {\n const n2 = c3(e3), t3 = new y3(i3, n2), r2 = new d3();\n for (const o5 of t3)\n r2.step(o5, n2, t3);\n return r2.ret;\n }\n function* b3(i3, e3 = {}) {\n const n2 = c3(e3), t3 = new y3(i3, n2), r2 = new d3();\n for (const o5 of t3.seq())\n r2.step(o5, n2, t3), r2.parent || (yield r2.ret);\n }\n var d3, O4;\n var init_decoder = __esm({\n \"../../../node_modules/.pnpm/cbor2@2.0.1/node_modules/cbor2/lib/decoder.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_decodeStream2();\n init_container();\n init_constants();\n d3 = class {\n parent = void 0;\n ret = void 0;\n step(e3, n2, t3) {\n if (this.ret = w.create(e3, this.parent, n2, t3), e3[2] === N.BREAK)\n if (this.parent?.isStreaming)\n this.parent.left = 0;\n else\n throw new Error(\"Unexpected BREAK\");\n else\n this.parent && this.parent.push(this.ret, t3, e3[3]);\n for (this.ret instanceof w && (this.parent = this.ret); this.parent?.done; ) {\n this.ret = this.parent.convert(t3);\n const r2 = this.parent.parent;\n r2?.replaceLast(this.ret, this.parent, t3), this.parent = r2;\n }\n }\n };\n O4 = class {\n #t;\n #e;\n constructor(e3, n2 = {}) {\n const t3 = new y3(e3, c3(n2));\n this.#t = t3.seq();\n }\n peek() {\n return this.#e || (this.#e = this.#n()), this.#e;\n }\n read() {\n const e3 = this.#e ?? this.#n();\n return this.#e = void 0, e3;\n }\n *[Symbol.iterator]() {\n for (; ; ) {\n const e3 = this.read();\n if (!e3)\n return;\n yield e3;\n }\n }\n #n() {\n const { value: e3, done: n2 } = this.#t.next();\n if (!n2)\n return e3;\n }\n };\n }\n });\n\n // ../../../node_modules/.pnpm/cbor2@2.0.1/node_modules/cbor2/lib/index.js\n var lib_exports = {};\n __export(lib_exports, {\n DiagnosticSizes: () => o3,\n SequenceEvents: () => O4,\n Simple: () => t2,\n Tag: () => i,\n TypeEncoderMap: () => s2,\n Writer: () => e,\n cdeDecodeOptions: () => r,\n cdeEncodeOptions: () => F,\n comment: () => L,\n dcborDecodeOptions: () => n,\n dcborEncodeOptions: () => H,\n decode: () => l5,\n decodeSequence: () => b3,\n defaultDecodeOptions: () => d4,\n defaultEncodeOptions: () => k,\n diagnose: () => M,\n encode: () => Q,\n encodedNumber: () => de,\n getEncoded: () => f2,\n saveEncoded: () => u,\n saveEncodedLength: () => l,\n unbox: () => t,\n version: () => o4\n });\n var r, n, d4;\n var init_lib2 = __esm({\n \"../../../node_modules/.pnpm/cbor2@2.0.1/node_modules/cbor2/lib/index.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_types();\n init_version();\n init_container();\n init_options();\n init_decoder();\n init_diagnostic();\n init_comment();\n init_encoder();\n init_simple();\n init_tag();\n init_writer();\n init_box();\n init_typeEncoderMap();\n ({ cdeDecodeOptions: r, dcborDecodeOptions: n, defaultDecodeOptions: d4 } = w);\n }\n });\n\n // ../../libs/contracts-sdk/dist/src/utils/policyParams.js\n var require_policyParams = __commonJS({\n \"../../libs/contracts-sdk/dist/src/utils/policyParams.js\"(exports3) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n Object.defineProperty(exports3, \"__esModule\", { value: true });\n exports3.encodePermissionDataForChain = encodePermissionDataForChain;\n exports3.decodePolicyParametersFromChain = decodePolicyParametersFromChain;\n exports3.decodePermissionDataFromChain = decodePermissionDataFromChain;\n exports3.decodePolicyParametersForOneAbility = decodePolicyParametersForOneAbility;\n var cbor2_1 = (init_lib2(), __toCommonJS(lib_exports));\n var utils_1 = require_utils6();\n function encodePermissionDataForChain(permissionData, deletePermissionData) {\n const abilityIpfsCids = [];\n const policyIpfsCids = [];\n const policyParameterValues = [];\n const safePermissionData = permissionData ?? {};\n if (deletePermissionData) {\n for (const abilityIpfsCid of Object.keys(deletePermissionData)) {\n if (safePermissionData[abilityIpfsCid]) {\n throw new Error(`deletePermissionData contains ability ${abilityIpfsCid} which also exists in permissionData. Please separate updates and deletes by ability.`);\n }\n }\n }\n const abilityKeys = [\n ...Object.keys(safePermissionData),\n ...deletePermissionData ? Object.keys(deletePermissionData) : []\n ];\n abilityKeys.forEach((abilityIpfsCid) => {\n abilityIpfsCids.push(abilityIpfsCid);\n const abilityPolicies = safePermissionData[abilityIpfsCid];\n const policiesToDelete = deletePermissionData?.[abilityIpfsCid];\n const abilityPolicyIpfsCids = [];\n const abilityPolicyParameterValues = [];\n if (abilityPolicies) {\n Object.keys(abilityPolicies).forEach((policyIpfsCid) => {\n abilityPolicyIpfsCids.push(policyIpfsCid);\n const policyParams = abilityPolicies[policyIpfsCid];\n const encodedParams = (0, cbor2_1.encode)(policyParams, { collapseBigInts: false });\n abilityPolicyParameterValues.push((0, utils_1.hexlify)(encodedParams));\n });\n } else if (policiesToDelete && policiesToDelete.length > 0) {\n for (const policyIpfsCid of policiesToDelete) {\n abilityPolicyIpfsCids.push(policyIpfsCid);\n abilityPolicyParameterValues.push(\"0x\");\n }\n }\n policyIpfsCids.push(abilityPolicyIpfsCids);\n policyParameterValues.push(abilityPolicyParameterValues);\n });\n return {\n abilityIpfsCids,\n policyIpfsCids,\n policyParameterValues\n };\n }\n function decodePolicyParametersFromChain(policy) {\n const encodedParams = policy.policyParameterValues;\n try {\n const byteArray = (0, utils_1.arrayify)(encodedParams);\n return (0, cbor2_1.decode)(byteArray);\n } catch (error) {\n console.error(\"Error decoding policy parameters:\", error);\n throw error;\n }\n }\n function decodePermissionDataFromChain(abilitiesWithPolicies) {\n const permissionData = {};\n for (const ability of abilitiesWithPolicies) {\n const { abilityIpfsCid, policies } = ability;\n permissionData[abilityIpfsCid] = decodePolicyParametersForOneAbility({ policies });\n }\n return permissionData;\n }\n function decodePolicyParametersForOneAbility({ policies }) {\n const policyParamsDict = {};\n for (const policy of policies) {\n const { policyIpfsCid, policyParameterValues } = policy;\n if (!policyParameterValues || policyParameterValues === \"0x\") {\n continue;\n }\n policyParamsDict[policyIpfsCid] = decodePolicyParametersFromChain(policy);\n }\n return policyParamsDict;\n }\n }\n });\n\n // ../../libs/contracts-sdk/dist/src/internal/user/User.js\n var require_User = __commonJS({\n \"../../libs/contracts-sdk/dist/src/internal/user/User.js\"(exports3) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n Object.defineProperty(exports3, \"__esModule\", { value: true });\n exports3.permitApp = permitApp;\n exports3.unPermitApp = unPermitApp;\n exports3.rePermitApp = rePermitApp;\n exports3.setAbilityPolicyParameters = setAbilityPolicyParameters;\n var utils_1 = require_utils7();\n var pkpInfo_1 = require_pkpInfo();\n var policyParams_1 = require_policyParams();\n async function permitApp(params) {\n const { contract, args: { pkpEthAddress, appId, appVersion, permissionData }, overrides } = params;\n try {\n const pkpTokenId = await (0, pkpInfo_1.getPkpTokenId)({ pkpEthAddress, signer: contract.signer });\n const flattenedParams = (0, policyParams_1.encodePermissionDataForChain)(permissionData);\n const adjustedOverrides = await (0, utils_1.gasAdjustedOverrides)(contract, \"permitAppVersion\", [\n pkpTokenId,\n appId,\n appVersion,\n flattenedParams.abilityIpfsCids,\n flattenedParams.policyIpfsCids,\n flattenedParams.policyParameterValues\n ], overrides);\n const tx = await contract.permitAppVersion(pkpTokenId, appId, appVersion, flattenedParams.abilityIpfsCids, flattenedParams.policyIpfsCids, flattenedParams.policyParameterValues, {\n ...adjustedOverrides\n });\n await tx.wait();\n return {\n txHash: tx.hash\n };\n } catch (error) {\n const decodedError = (0, utils_1.decodeContractError)(error, contract);\n throw new Error(`Failed to Permit App: ${decodedError}`);\n }\n }\n async function unPermitApp({ contract, args: { pkpEthAddress, appId, appVersion }, overrides }) {\n try {\n const pkpTokenId = await (0, pkpInfo_1.getPkpTokenId)({ pkpEthAddress, signer: contract.signer });\n const adjustedOverrides = await (0, utils_1.gasAdjustedOverrides)(contract, \"unPermitAppVersion\", [pkpTokenId, appId, appVersion], overrides);\n const tx = await contract.unPermitAppVersion(pkpTokenId, appId, appVersion, {\n ...adjustedOverrides\n });\n await tx.wait();\n return {\n txHash: tx.hash\n };\n } catch (error) {\n const decodedError = (0, utils_1.decodeContractError)(error, contract);\n throw new Error(`Failed to UnPermit App: ${decodedError}`);\n }\n }\n async function rePermitApp(params) {\n const { contract, args: { pkpEthAddress, appId }, overrides } = params;\n try {\n const pkpTokenId = await (0, pkpInfo_1.getPkpTokenId)({ pkpEthAddress, signer: contract.signer });\n const adjustedOverrides = await (0, utils_1.gasAdjustedOverrides)(contract, \"rePermitApp\", [pkpTokenId, appId], overrides);\n const tx = await contract.rePermitApp(pkpTokenId, appId, {\n ...adjustedOverrides\n });\n await tx.wait();\n return {\n txHash: tx.hash\n };\n } catch (error) {\n const decodedError = (0, utils_1.decodeContractError)(error, contract);\n throw new Error(`Failed to Re-Permit App: ${decodedError}`);\n }\n }\n async function setAbilityPolicyParameters(params) {\n const { contract, args: { appId, appVersion, pkpEthAddress, policyParams, deletePermissionData }, overrides } = params;\n try {\n const pkpTokenId = await (0, pkpInfo_1.getPkpTokenId)({ pkpEthAddress, signer: contract.signer });\n const flattenedParams = (0, policyParams_1.encodePermissionDataForChain)(policyParams, deletePermissionData);\n const adjustedOverrides = await (0, utils_1.gasAdjustedOverrides)(contract, \"setAbilityPolicyParameters\", [\n pkpTokenId,\n appId,\n appVersion,\n flattenedParams.abilityIpfsCids,\n flattenedParams.policyIpfsCids,\n flattenedParams.policyParameterValues\n ], overrides);\n const tx = await contract.setAbilityPolicyParameters(pkpTokenId, appId, appVersion, flattenedParams.abilityIpfsCids, flattenedParams.policyIpfsCids, flattenedParams.policyParameterValues, {\n ...adjustedOverrides\n });\n await tx.wait();\n return {\n txHash: tx.hash\n };\n } catch (error) {\n const decodedError = (0, utils_1.decodeContractError)(error, contract);\n throw new Error(`Failed to Set Ability Policy Parameters: ${decodedError}`);\n }\n }\n }\n });\n\n // ../../libs/contracts-sdk/dist/src/internal/user/UserView.js\n var require_UserView = __commonJS({\n \"../../libs/contracts-sdk/dist/src/internal/user/UserView.js\"(exports3) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n Object.defineProperty(exports3, \"__esModule\", { value: true });\n exports3.getAllRegisteredAgentPkpEthAddresses = getAllRegisteredAgentPkpEthAddresses;\n exports3.getPermittedAppVersionForPkp = getPermittedAppVersionForPkp;\n exports3.getAllPermittedAppIdsForPkp = getAllPermittedAppIdsForPkp;\n exports3.getPermittedAppsForPkps = getPermittedAppsForPkps;\n exports3.getAllAbilitiesAndPoliciesForApp = getAllAbilitiesAndPoliciesForApp;\n exports3.validateAbilityExecutionAndGetPolicies = validateAbilityExecutionAndGetPolicies;\n exports3.getLastPermittedAppVersionForPkp = getLastPermittedAppVersionForPkp;\n exports3.getUnpermittedAppsForPkps = getUnpermittedAppsForPkps;\n exports3.isDelegateePermitted = isDelegateePermitted;\n var constants_1 = require_constants3();\n var utils_1 = require_utils7();\n var pkpInfo_1 = require_pkpInfo();\n var policyParams_1 = require_policyParams();\n async function getAllRegisteredAgentPkpEthAddresses(params) {\n const { contract, args: { userPkpAddress, offset } } = params;\n try {\n const pkpTokenIds = await contract.getAllRegisteredAgentPkps(userPkpAddress, offset);\n const pkpEthAdddresses = [];\n for (const tokenId of pkpTokenIds) {\n const pkpEthAddress = await (0, pkpInfo_1.getPkpEthAddress)({ signer: contract.signer, tokenId });\n pkpEthAdddresses.push(pkpEthAddress);\n }\n return pkpEthAdddresses;\n } catch (error) {\n const decodedError = (0, utils_1.decodeContractError)(error, contract);\n if (decodedError.includes(\"NoRegisteredPkpsFound\")) {\n return [];\n }\n throw new Error(`Failed to Get All Registered Agent PKPs: ${decodedError}`);\n }\n }\n async function getPermittedAppVersionForPkp(params) {\n const { contract, args: { pkpEthAddress, appId } } = params;\n try {\n const pkpTokenId = await (0, pkpInfo_1.getPkpTokenId)({ pkpEthAddress, signer: contract.signer });\n const appVersion = await contract.getPermittedAppVersionForPkp(pkpTokenId, appId);\n if (!appVersion)\n return null;\n return appVersion;\n } catch (error) {\n const decodedError = (0, utils_1.decodeContractError)(error, contract);\n throw new Error(`Failed to Get Permitted App Version For PKP: ${decodedError}`);\n }\n }\n async function getAllPermittedAppIdsForPkp(params) {\n const { contract, args: { pkpEthAddress, offset } } = params;\n try {\n const pkpTokenId = await (0, pkpInfo_1.getPkpTokenId)({ pkpEthAddress, signer: contract.signer });\n const appIds = await contract.getAllPermittedAppIdsForPkp(pkpTokenId, offset);\n return appIds.map((id) => id);\n } catch (error) {\n const decodedError = (0, utils_1.decodeContractError)(error, contract);\n throw new Error(`Failed to Get All Permitted App IDs For PKP: ${decodedError}`);\n }\n }\n async function getPermittedAppsForPkps(params) {\n const { contract, args: { pkpEthAddresses, offset, pageSize = constants_1.DEFAULT_PAGE_SIZE } } = params;\n try {\n const pkpTokenIds = [];\n for (const pkpEthAddress of pkpEthAddresses) {\n const pkpTokenId = await (0, pkpInfo_1.getPkpTokenId)({ pkpEthAddress, signer: contract.signer });\n pkpTokenIds.push(pkpTokenId);\n }\n const results = await contract.getPermittedAppsForPkps(pkpTokenIds, offset, pageSize);\n return results.map((result) => ({\n pkpTokenId: result.pkpTokenId.toString(),\n permittedApps: result.permittedApps.map((app) => ({\n appId: app.appId,\n version: app.version,\n versionEnabled: app.versionEnabled,\n isDeleted: app.isDeleted\n }))\n }));\n } catch (error) {\n const decodedError = (0, utils_1.decodeContractError)(error, contract);\n throw new Error(`Failed to Get Permitted Apps For PKPs: ${decodedError}`);\n }\n }\n async function getAllAbilitiesAndPoliciesForApp(params) {\n const { contract, args: { pkpEthAddress, appId } } = params;\n try {\n const pkpTokenId = await (0, pkpInfo_1.getPkpTokenId)({ pkpEthAddress, signer: contract.signer });\n const abilities = await contract.getAllAbilitiesAndPoliciesForApp(pkpTokenId, appId);\n return (0, policyParams_1.decodePermissionDataFromChain)(abilities);\n } catch (error) {\n const decodedError = (0, utils_1.decodeContractError)(error, contract);\n throw new Error(`Failed to Get All Abilities And Policies For App: ${decodedError}`);\n }\n }\n async function validateAbilityExecutionAndGetPolicies(params) {\n const { contract, args: { delegateeAddress, pkpEthAddress, abilityIpfsCid } } = params;\n try {\n const pkpTokenId = await (0, pkpInfo_1.getPkpTokenId)({ pkpEthAddress, signer: contract.signer });\n const validationResult = await contract.validateAbilityExecutionAndGetPolicies(delegateeAddress, pkpTokenId, abilityIpfsCid);\n const { policies } = validationResult;\n const decodedPolicies = (0, policyParams_1.decodePolicyParametersForOneAbility)({ policies });\n return {\n ...validationResult,\n appId: validationResult.appId,\n appVersion: validationResult.appVersion,\n decodedPolicies\n };\n } catch (error) {\n const decodedError = (0, utils_1.decodeContractError)(error, contract);\n throw new Error(`Failed to Validate Ability Execution And Get Policies: ${decodedError}`);\n }\n }\n async function getLastPermittedAppVersionForPkp(params) {\n const { contract, args: { pkpEthAddress, appId } } = params;\n try {\n const pkpTokenId = await (0, pkpInfo_1.getPkpTokenId)({ pkpEthAddress, signer: contract.signer });\n const lastPermittedVersion = await contract.getLastPermittedAppVersionForPkp(pkpTokenId, appId);\n if (!lastPermittedVersion)\n return null;\n return lastPermittedVersion;\n } catch (error) {\n const decodedError = (0, utils_1.decodeContractError)(error, contract);\n throw new Error(`Failed to Get Last Permitted App Version: ${decodedError}`);\n }\n }\n async function getUnpermittedAppsForPkps(params) {\n const { contract, args: { pkpEthAddresses, offset } } = params;\n try {\n const pkpTokenIds = [];\n for (const pkpEthAddress of pkpEthAddresses) {\n const pkpTokenId = await (0, pkpInfo_1.getPkpTokenId)({ pkpEthAddress, signer: contract.signer });\n pkpTokenIds.push(pkpTokenId);\n }\n const results = await contract.getUnpermittedAppsForPkps(pkpTokenIds, offset);\n return results.map((result) => ({\n pkpTokenId: result.pkpTokenId.toString(),\n unpermittedApps: result.unpermittedApps.map((app) => ({\n appId: app.appId,\n previousPermittedVersion: app.previousPermittedVersion,\n versionEnabled: app.versionEnabled,\n isDeleted: app.isDeleted\n }))\n }));\n } catch (error) {\n const decodedError = (0, utils_1.decodeContractError)(error, contract);\n throw new Error(`Failed to Get Unpermitted Apps For PKPs: ${decodedError}`);\n }\n }\n async function isDelegateePermitted(params) {\n const { contract, args: { delegateeAddress, pkpEthAddress, abilityIpfsCid } } = params;\n try {\n const pkpTokenId = await (0, pkpInfo_1.getPkpTokenId)({ pkpEthAddress, signer: contract.signer });\n const isPermitted = await contract.isDelegateePermitted(delegateeAddress, pkpTokenId, abilityIpfsCid);\n return isPermitted;\n } catch (error) {\n const decodedError = (0, utils_1.decodeContractError)(error, contract);\n throw new Error(`Failed to Check If Delegatee Is Permitted: ${decodedError}`);\n }\n }\n }\n });\n\n // ../../libs/contracts-sdk/dist/src/contractClient.js\n var require_contractClient = __commonJS({\n \"../../libs/contracts-sdk/dist/src/contractClient.js\"(exports3) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n Object.defineProperty(exports3, \"__esModule\", { value: true });\n exports3.clientFromContract = clientFromContract;\n exports3.getTestClient = getTestClient;\n exports3.getClient = getClient;\n var constants_1 = require_constants3();\n var App_1 = require_App();\n var AppView_1 = require_AppView();\n var User_1 = require_User();\n var UserView_1 = require_UserView();\n var utils_1 = require_utils7();\n function clientFromContract({ contract }) {\n return {\n // App write methods\n registerApp: (params, overrides) => (0, App_1.registerApp)({ contract, args: params, overrides }),\n registerNextVersion: (params, overrides) => (0, App_1.registerNextVersion)({ contract, args: params, overrides }),\n enableAppVersion: (params, overrides) => (0, App_1.enableAppVersion)({ contract, args: params, overrides }),\n addDelegatee: (params, overrides) => (0, App_1.addDelegatee)({ contract, args: params, overrides }),\n removeDelegatee: (params, overrides) => (0, App_1.removeDelegatee)({ contract, args: params, overrides }),\n setDelegatee: (params, overrides) => (0, App_1.setDelegatee)({ contract, args: params, overrides }),\n deleteApp: (params, overrides) => (0, App_1.deleteApp)({ contract, args: params, overrides }),\n undeleteApp: (params, overrides) => (0, App_1.undeleteApp)({ contract, args: params, overrides }),\n // App view methods\n getAppById: (params) => (0, AppView_1.getAppById)({ contract, args: params }),\n getAppIdByDelegatee: (params) => (0, AppView_1.getAppIdByDelegatee)({ contract, args: params }),\n getAppVersion: (params) => (0, AppView_1.getAppVersion)({ contract, args: params }),\n getAppsByManagerAddress: (params) => (0, AppView_1.getAppsByManagerAddress)({ contract, args: params }),\n getAppByDelegateeAddress: (params) => (0, AppView_1.getAppByDelegateeAddress)({ contract, args: params }),\n getDelegatedPkpEthAddresses: (params) => (0, AppView_1.getDelegatedPkpEthAddresses)({ contract, args: params }),\n // User write methods\n permitApp: (params, overrides) => (0, User_1.permitApp)({ contract, args: params, overrides }),\n unPermitApp: (params, overrides) => (0, User_1.unPermitApp)({ contract, args: params, overrides }),\n rePermitApp: (params, overrides) => (0, User_1.rePermitApp)({ contract, args: params, overrides }),\n setAbilityPolicyParameters: (params, overrides) => (0, User_1.setAbilityPolicyParameters)({ contract, args: params, overrides }),\n // User view methods\n getAllRegisteredAgentPkpEthAddresses: (params) => (0, UserView_1.getAllRegisteredAgentPkpEthAddresses)({ contract, args: params }),\n getPermittedAppVersionForPkp: (params) => (0, UserView_1.getPermittedAppVersionForPkp)({ contract, args: params }),\n getAllPermittedAppIdsForPkp: (params) => (0, UserView_1.getAllPermittedAppIdsForPkp)({ contract, args: params }),\n getPermittedAppsForPkps: (params) => (0, UserView_1.getPermittedAppsForPkps)({ contract, args: params }),\n getAllAbilitiesAndPoliciesForApp: (params) => (0, UserView_1.getAllAbilitiesAndPoliciesForApp)({ contract, args: params }),\n validateAbilityExecutionAndGetPolicies: (params) => (0, UserView_1.validateAbilityExecutionAndGetPolicies)({ contract, args: params }),\n isDelegateePermitted: (params) => (0, UserView_1.isDelegateePermitted)({ contract, args: params }),\n getLastPermittedAppVersionForPkp: (params) => (0, UserView_1.getLastPermittedAppVersionForPkp)({ contract, args: params }),\n getUnpermittedAppsForPkps: (params) => (0, UserView_1.getUnpermittedAppsForPkps)({ contract, args: params })\n };\n }\n function getTestClient({ signer }) {\n const contract = (0, utils_1.createContract)({\n signer,\n contractAddress: constants_1.VINCENT_DIAMOND_CONTRACT_ADDRESS_DEV\n });\n return clientFromContract({ contract });\n }\n function getClient({ signer }) {\n const contract = (0, utils_1.createContract)({\n signer,\n contractAddress: constants_1.VINCENT_DIAMOND_CONTRACT_ADDRESS_PROD\n });\n return clientFromContract({ contract });\n }\n }\n });\n\n // ../../libs/contracts-sdk/dist/src/index.js\n var require_src = __commonJS({\n \"../../libs/contracts-sdk/dist/src/index.js\"(exports3) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n Object.defineProperty(exports3, \"__esModule\", { value: true });\n exports3.COMBINED_ABI = exports3.VINCENT_DIAMOND_CONTRACT_ADDRESS_PROD = exports3.getPkpTokenId = exports3.createContract = exports3.getClient = exports3.clientFromContract = exports3.getTestClient = void 0;\n var contractClient_1 = require_contractClient();\n Object.defineProperty(exports3, \"getTestClient\", { enumerable: true, get: function() {\n return contractClient_1.getTestClient;\n } });\n Object.defineProperty(exports3, \"clientFromContract\", { enumerable: true, get: function() {\n return contractClient_1.clientFromContract;\n } });\n Object.defineProperty(exports3, \"getClient\", { enumerable: true, get: function() {\n return contractClient_1.getClient;\n } });\n var utils_1 = require_utils7();\n Object.defineProperty(exports3, \"createContract\", { enumerable: true, get: function() {\n return utils_1.createContract;\n } });\n var pkpInfo_1 = require_pkpInfo();\n Object.defineProperty(exports3, \"getPkpTokenId\", { enumerable: true, get: function() {\n return pkpInfo_1.getPkpTokenId;\n } });\n var constants_1 = require_constants3();\n Object.defineProperty(exports3, \"VINCENT_DIAMOND_CONTRACT_ADDRESS_PROD\", { enumerable: true, get: function() {\n return constants_1.VINCENT_DIAMOND_CONTRACT_ADDRESS_PROD;\n } });\n Object.defineProperty(exports3, \"COMBINED_ABI\", { enumerable: true, get: function() {\n return constants_1.COMBINED_ABI;\n } });\n }\n });\n\n // ../../libs/ability-sdk/dist/src/lib/policyCore/policyParameters/getOnchainPolicyParams.js\n var require_getOnchainPolicyParams = __commonJS({\n \"../../libs/ability-sdk/dist/src/lib/policyCore/policyParameters/getOnchainPolicyParams.js\"(exports3) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n Object.defineProperty(exports3, \"__esModule\", { value: true });\n exports3.getPoliciesAndAppVersion = exports3.getDecodedPolicyParams = void 0;\n var ethers_1 = require_lib32();\n var vincent_contracts_sdk_1 = require_src();\n var utils_1 = require_utils();\n var getDecodedPolicyParams = async ({ decodedPolicies, policyIpfsCid }) => {\n console.log(\"All on-chain policy params:\", JSON.stringify(decodedPolicies, utils_1.bigintReplacer));\n const policyParams = decodedPolicies[policyIpfsCid];\n if (policyParams) {\n return policyParams;\n }\n console.log(\"Found no on-chain parameters for policy IPFS CID:\", policyIpfsCid);\n return void 0;\n };\n exports3.getDecodedPolicyParams = getDecodedPolicyParams;\n var getPoliciesAndAppVersion = async ({ delegationRpcUrl, appDelegateeAddress, agentWalletPkpEthAddress, abilityIpfsCid }) => {\n console.log(\"getPoliciesAndAppVersion\", {\n delegationRpcUrl,\n appDelegateeAddress,\n agentWalletPkpEthAddress,\n abilityIpfsCid\n });\n try {\n const signer = ethers_1.ethers.Wallet.createRandom().connect(new ethers_1.ethers.providers.StaticJsonRpcProvider(delegationRpcUrl));\n const contractClient = (0, vincent_contracts_sdk_1.getClient)({\n signer\n });\n const validationResult = await contractClient.validateAbilityExecutionAndGetPolicies({\n delegateeAddress: appDelegateeAddress,\n pkpEthAddress: agentWalletPkpEthAddress,\n abilityIpfsCid\n });\n if (!validationResult.isPermitted) {\n throw new Error(`App Delegatee: ${appDelegateeAddress} is not permitted to execute Vincent Ability: ${abilityIpfsCid} for App ID: ${validationResult.appId} App Version: ${validationResult.appVersion} using Agent Wallet PKP Address: ${agentWalletPkpEthAddress}`);\n }\n return {\n appId: ethers_1.ethers.BigNumber.from(validationResult.appId),\n appVersion: ethers_1.ethers.BigNumber.from(validationResult.appVersion),\n decodedPolicies: validationResult.decodedPolicies\n };\n } catch (error) {\n throw new Error(`Error getting on-chain policy parameters from Vincent contract using App Delegatee: ${appDelegateeAddress} and Agent Wallet PKP Address: ${agentWalletPkpEthAddress} and Vincent Ability: ${abilityIpfsCid}: ${error instanceof Error ? error.message : String(error)}`);\n }\n };\n exports3.getPoliciesAndAppVersion = getPoliciesAndAppVersion;\n }\n });\n\n // ../../libs/ability-sdk/dist/src/lib/handlers/constants.js\n var require_constants4 = __commonJS({\n \"../../libs/ability-sdk/dist/src/lib/handlers/constants.js\"(exports3) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n Object.defineProperty(exports3, \"__esModule\", { value: true });\n exports3.LIT_DATIL_PUBKEY_ROUTER_ADDRESS = void 0;\n exports3.LIT_DATIL_PUBKEY_ROUTER_ADDRESS = \"0xF182d6bEf16Ba77e69372dD096D8B70Bc3d5B475\";\n }\n });\n\n // ../../libs/ability-sdk/dist/src/lib/handlers/vincentPolicyHandler.js\n var require_vincentPolicyHandler = __commonJS({\n \"../../libs/ability-sdk/dist/src/lib/handlers/vincentPolicyHandler.js\"(exports3) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n Object.defineProperty(exports3, \"__esModule\", { value: true });\n exports3.vincentPolicyHandler = vincentPolicyHandler;\n var ethers_1 = require_lib32();\n var helpers_1 = require_helpers2();\n var assertSupportedAbilityVersion_1 = require_assertSupportedAbilityVersion();\n var helpers_2 = require_helpers();\n var getOnchainPolicyParams_1 = require_getOnchainPolicyParams();\n var utils_1 = require_utils();\n var constants_1 = require_constants4();\n async function vincentPolicyHandler({ vincentPolicy, context: context2, abilityParams: abilityParams2 }) {\n (0, assertSupportedAbilityVersion_1.assertSupportedAbilityVersion)(vincentAbilityApiVersion);\n const { delegatorPkpEthAddress, abilityIpfsCid } = context2;\n console.log(\"actionIpfsIds:\", LitAuth.actionIpfsIds.join(\",\"));\n const policyIpfsCid = LitAuth.actionIpfsIds[0];\n console.log(\"context:\", JSON.stringify(context2, utils_1.bigintReplacer));\n try {\n const delegationRpcUrl = await Lit.Actions.getRpcUrl({\n chain: \"yellowstone\"\n });\n const userPkpInfo = await (0, helpers_1.getPkpInfo)({\n litPubkeyRouterAddress: constants_1.LIT_DATIL_PUBKEY_ROUTER_ADDRESS,\n yellowstoneRpcUrl: delegationRpcUrl,\n pkpEthAddress: delegatorPkpEthAddress\n });\n const appDelegateeAddress = ethers_1.ethers.utils.getAddress(LitAuth.authSigAddress);\n console.log(\"appDelegateeAddress\", appDelegateeAddress);\n const { decodedPolicies, appId, appVersion } = await (0, getOnchainPolicyParams_1.getPoliciesAndAppVersion)({\n delegationRpcUrl,\n appDelegateeAddress,\n agentWalletPkpEthAddress: delegatorPkpEthAddress,\n abilityIpfsCid\n });\n const baseContext = {\n delegation: {\n delegateeAddress: appDelegateeAddress,\n delegatorPkpInfo: userPkpInfo\n },\n abilityIpfsCid,\n appId: appId.toNumber(),\n appVersion: appVersion.toNumber()\n };\n const onChainPolicyParams = await (0, getOnchainPolicyParams_1.getDecodedPolicyParams)({\n decodedPolicies,\n policyIpfsCid\n });\n console.log(\"onChainPolicyParams:\", JSON.stringify(onChainPolicyParams, utils_1.bigintReplacer));\n const evaluateResult = await vincentPolicy.evaluate({\n abilityParams: abilityParams2,\n userParams: onChainPolicyParams\n }, baseContext);\n console.log(\"evaluateResult:\", JSON.stringify(evaluateResult, utils_1.bigintReplacer));\n Lit.Actions.setResponse({\n response: JSON.stringify({\n ...evaluateResult\n })\n });\n } catch (error) {\n console.log(\"Policy evaluation failed:\", error.message, error.stack);\n Lit.Actions.setResponse({\n response: JSON.stringify((0, helpers_2.createDenyResult)({\n runtimeError: error instanceof Error ? error.message : String(error)\n }))\n });\n }\n }\n }\n });\n\n // ../../libs/ability-sdk/dist/src/lib/abilityCore/helpers/validatePolicies.js\n var require_validatePolicies = __commonJS({\n \"../../libs/ability-sdk/dist/src/lib/abilityCore/helpers/validatePolicies.js\"(exports3) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n Object.defineProperty(exports3, \"__esModule\", { value: true });\n exports3.validatePolicies = validatePolicies;\n var getMappedAbilityPolicyParams_1 = require_getMappedAbilityPolicyParams();\n async function validatePolicies({ decodedPolicies, vincentAbility: vincentAbility2, abilityIpfsCid, parsedAbilityParams }) {\n const validatedPolicies = [];\n for (const policyIpfsCid of Object.keys(decodedPolicies)) {\n const abilityPolicy = vincentAbility2.supportedPolicies.policyByIpfsCid[policyIpfsCid];\n console.log(\"vincentAbility.supportedPolicies\", Object.keys(vincentAbility2.supportedPolicies.policyByIpfsCid));\n if (!abilityPolicy) {\n throw new Error(`Policy with IPFS CID ${policyIpfsCid} is registered on-chain but not supported by this ability. Vincent Ability: ${abilityIpfsCid}`);\n }\n const policyPackageName = abilityPolicy.vincentPolicy.packageName;\n if (!abilityPolicy.abilityParameterMappings) {\n throw new Error(\"abilityParameterMappings missing on policy\");\n }\n console.log(\"abilityPolicy.abilityParameterMappings\", JSON.stringify(abilityPolicy.abilityParameterMappings));\n const abilityPolicyParams = (0, getMappedAbilityPolicyParams_1.getMappedAbilityPolicyParams)({\n abilityParameterMappings: abilityPolicy.abilityParameterMappings,\n parsedAbilityParams\n });\n validatedPolicies.push({\n parameters: decodedPolicies[policyIpfsCid] || {},\n policyPackageName,\n abilityPolicyParams\n });\n }\n return validatedPolicies;\n }\n }\n });\n\n // ../../libs/ability-sdk/dist/src/lib/handlers/evaluatePolicies.js\n var require_evaluatePolicies = __commonJS({\n \"../../libs/ability-sdk/dist/src/lib/handlers/evaluatePolicies.js\"(exports3) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n Object.defineProperty(exports3, \"__esModule\", { value: true });\n exports3.evaluatePolicies = evaluatePolicies;\n var zod_1 = require_cjs();\n var helpers_1 = require_helpers();\n var resultCreators_1 = require_resultCreators();\n async function evaluatePolicies({ vincentAbility: vincentAbility2, context: context2, validatedPolicies, vincentAbilityApiVersion: vincentAbilityApiVersion2 }) {\n const evaluatedPolicies = [];\n let policyDeniedResult = void 0;\n const rawAllowedPolicies = {};\n for (const { policyPackageName, abilityPolicyParams } of validatedPolicies) {\n evaluatedPolicies.push(policyPackageName);\n const policy = vincentAbility2.supportedPolicies.policyByPackageName[policyPackageName];\n try {\n const litActionResponse = await Lit.Actions.call({\n ipfsId: policy.ipfsCid,\n params: {\n abilityParams: abilityPolicyParams,\n context: {\n abilityIpfsCid: context2.abilityIpfsCid,\n delegatorPkpEthAddress: context2.delegation.delegatorPkpInfo.ethAddress\n },\n vincentAbilityApiVersion: vincentAbilityApiVersion2\n }\n });\n console.log(`evaluated ${String(policyPackageName)} policy, result is:`, JSON.stringify(litActionResponse));\n const result = parseAndValidateEvaluateResult({\n litActionResponse,\n vincentPolicy: policy.vincentPolicy\n });\n if ((0, helpers_1.isPolicyDenyResponse)(result)) {\n policyDeniedResult = {\n ...result,\n packageName: policyPackageName\n };\n } else {\n rawAllowedPolicies[policyPackageName] = {\n result: result.result\n };\n }\n } catch (err) {\n const denyResult = (0, helpers_1.createDenyResult)({\n runtimeError: err instanceof Error ? err.message : \"Unknown error\"\n });\n policyDeniedResult = { ...denyResult, packageName: policyPackageName };\n }\n }\n if (policyDeniedResult) {\n return (0, resultCreators_1.createDenyEvaluationResult)({\n allowedPolicies: rawAllowedPolicies,\n evaluatedPolicies,\n deniedPolicy: policyDeniedResult\n });\n }\n return (0, resultCreators_1.createAllowEvaluationResult)({\n evaluatedPolicies,\n allowedPolicies: rawAllowedPolicies\n });\n }\n function parseAndValidateEvaluateResult({ litActionResponse, vincentPolicy }) {\n let parsedLitActionResponse;\n try {\n parsedLitActionResponse = JSON.parse(litActionResponse);\n } catch (error) {\n console.log(\"rawLitActionResponse (parsePolicyExecutionResult)\", litActionResponse);\n throw new Error(`Failed to JSON parse Lit Action Response: ${error instanceof Error ? error.message : String(error)}. rawLitActionResponse in request logs (parsePolicyExecutionResult)`);\n }\n try {\n console.log(\"parseAndValidateEvaluateResult\", JSON.stringify(parsedLitActionResponse));\n if ((0, helpers_1.isPolicyDenyResponse)(parsedLitActionResponse) && (parsedLitActionResponse.schemaValidationError || parsedLitActionResponse.runtimeError)) {\n console.log(\"parsedLitActionResponse is a deny response with a runtime error or schema validation error; skipping schema validation\");\n return parsedLitActionResponse;\n }\n if (!(0, helpers_1.isPolicyResponse)(parsedLitActionResponse)) {\n throw new Error(`Invalid response from policy: ${JSON.stringify(parsedLitActionResponse)}`);\n }\n const { schemaToUse, parsedType } = (0, helpers_1.getSchemaForPolicyResponseResult)({\n value: parsedLitActionResponse,\n denyResultSchema: vincentPolicy.evalDenyResultSchema || zod_1.z.undefined(),\n allowResultSchema: vincentPolicy.evalAllowResultSchema || zod_1.z.undefined()\n });\n console.log(\"parsedType\", parsedType);\n const parsedResult = (0, helpers_1.validateOrDeny)(parsedLitActionResponse.result, schemaToUse, \"evaluate\", \"output\");\n if ((0, helpers_1.isPolicyDenyResponse)(parsedResult)) {\n return parsedResult;\n }\n if ((0, helpers_1.isPolicyDenyResponse)(parsedLitActionResponse)) {\n return (0, helpers_1.createDenyResult)({\n runtimeError: parsedLitActionResponse.runtimeError,\n schemaValidationError: parsedLitActionResponse.schemaValidationError,\n result: parsedResult\n });\n }\n return (0, resultCreators_1.createAllowResult)({\n result: parsedResult\n });\n } catch (err) {\n console.log(\"parseAndValidateEvaluateResult error; returning noResultDeny\", err.message, err.stack);\n return (0, resultCreators_1.returnNoResultDeny)(err instanceof Error ? err.message : \"Unknown error\");\n }\n }\n }\n });\n\n // ../../libs/ability-sdk/dist/src/lib/handlers/vincentAbilityHandler.js\n var require_vincentAbilityHandler = __commonJS({\n \"../../libs/ability-sdk/dist/src/lib/handlers/vincentAbilityHandler.js\"(exports3) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n Object.defineProperty(exports3, \"__esModule\", { value: true });\n exports3.vincentAbilityHandler = void 0;\n exports3.createAbilityExecutionContext = createAbilityExecutionContext;\n var ethers_1 = require_lib32();\n var helpers_1 = require_helpers2();\n var typeGuards_1 = require_typeGuards2();\n var validatePolicies_1 = require_validatePolicies();\n var zod_1 = require_zod2();\n var assertSupportedAbilityVersion_1 = require_assertSupportedAbilityVersion();\n var getOnchainPolicyParams_1 = require_getOnchainPolicyParams();\n var utils_1 = require_utils();\n var constants_1 = require_constants4();\n var evaluatePolicies_1 = require_evaluatePolicies();\n function createAbilityExecutionContext({ vincentAbility: vincentAbility2, policyEvaluationResults, baseContext }) {\n if (!policyEvaluationResults.allow) {\n throw new Error(\"Received denied policies to createAbilityExecutionContext()\");\n }\n const newContext = {\n allow: true,\n evaluatedPolicies: policyEvaluationResults.evaluatedPolicies,\n allowedPolicies: {}\n };\n const policyByPackageName = vincentAbility2.supportedPolicies.policyByPackageName;\n const allowedKeys = Object.keys(policyEvaluationResults.allowedPolicies);\n for (const packageName of allowedKeys) {\n const entry = policyEvaluationResults.allowedPolicies[packageName];\n const policy = policyByPackageName[packageName];\n const vincentPolicy = policy.vincentPolicy;\n if (!entry) {\n throw new Error(`Missing entry on allowedPolicies for policy: ${packageName}`);\n }\n const resultWrapper = {\n result: entry.result\n };\n if (vincentPolicy.commit) {\n const commitFn = vincentPolicy.commit;\n resultWrapper.commit = (commitParams) => {\n return commitFn(commitParams, baseContext);\n };\n }\n newContext.allowedPolicies[packageName] = resultWrapper;\n }\n return newContext;\n }\n var vincentAbilityHandler2 = ({ vincentAbility: vincentAbility2, abilityParams: abilityParams2, context: context2 }) => {\n return async () => {\n (0, assertSupportedAbilityVersion_1.assertSupportedAbilityVersion)(vincentAbilityApiVersion);\n let policyEvalResults = void 0;\n const abilityIpfsCid = LitAuth.actionIpfsIds[0];\n const appDelegateeAddress = ethers_1.ethers.utils.getAddress(LitAuth.authSigAddress);\n const baseContext = {\n delegation: {\n delegateeAddress: appDelegateeAddress\n // delegatorPkpInfo: null,\n },\n abilityIpfsCid\n // appId: undefined,\n // appVersion: undefined,\n };\n try {\n const delegationRpcUrl = await Lit.Actions.getRpcUrl({ chain: \"yellowstone\" });\n const parsedOrFail = (0, zod_1.validateOrFail)(abilityParams2, vincentAbility2.abilityParamsSchema, \"execute\", \"input\");\n if ((0, typeGuards_1.isAbilityFailureResult)(parsedOrFail)) {\n Lit.Actions.setResponse({\n response: JSON.stringify({\n abilityExecutionResult: parsedOrFail\n })\n });\n return;\n }\n const userPkpInfo = await (0, helpers_1.getPkpInfo)({\n litPubkeyRouterAddress: constants_1.LIT_DATIL_PUBKEY_ROUTER_ADDRESS,\n yellowstoneRpcUrl: delegationRpcUrl,\n pkpEthAddress: context2.delegatorPkpEthAddress\n });\n baseContext.delegation.delegatorPkpInfo = userPkpInfo;\n const { decodedPolicies, appId, appVersion } = await (0, getOnchainPolicyParams_1.getPoliciesAndAppVersion)({\n delegationRpcUrl,\n appDelegateeAddress,\n agentWalletPkpEthAddress: context2.delegatorPkpEthAddress,\n abilityIpfsCid\n });\n baseContext.appId = appId.toNumber();\n baseContext.appVersion = appVersion.toNumber();\n const validatedPolicies = await (0, validatePolicies_1.validatePolicies)({\n decodedPolicies,\n vincentAbility: vincentAbility2,\n parsedAbilityParams: parsedOrFail,\n abilityIpfsCid\n });\n console.log(\"validatedPolicies\", JSON.stringify(validatedPolicies, utils_1.bigintReplacer));\n const policyEvaluationResults = await (0, evaluatePolicies_1.evaluatePolicies)({\n validatedPolicies,\n vincentAbility: vincentAbility2,\n context: baseContext,\n vincentAbilityApiVersion\n });\n console.log(\"policyEvaluationResults\", JSON.stringify(policyEvaluationResults, utils_1.bigintReplacer));\n policyEvalResults = policyEvaluationResults;\n if (!policyEvalResults.allow) {\n Lit.Actions.setResponse({\n response: JSON.stringify({\n abilityContext: {\n ...baseContext,\n policiesContext: policyEvaluationResults\n },\n abilityExecutionResult: {\n success: false\n }\n })\n });\n return;\n }\n const executeContext = createAbilityExecutionContext({\n vincentAbility: vincentAbility2,\n policyEvaluationResults,\n baseContext\n });\n const abilityExecutionResult = await vincentAbility2.execute({\n abilityParams: parsedOrFail\n }, {\n ...baseContext,\n policiesContext: executeContext\n });\n console.log(\"abilityExecutionResult\", JSON.stringify(abilityExecutionResult, utils_1.bigintReplacer));\n Lit.Actions.setResponse({\n response: JSON.stringify({\n abilityExecutionResult,\n abilityContext: {\n ...baseContext,\n policiesContext: policyEvaluationResults\n }\n })\n });\n } catch (err) {\n Lit.Actions.setResponse({\n response: JSON.stringify({\n abilityContext: {\n ...baseContext,\n policiesContext: policyEvalResults\n },\n abilityExecutionResult: {\n success: false,\n runtimeError: err instanceof Error ? err.message : String(err)\n }\n })\n });\n }\n };\n };\n exports3.vincentAbilityHandler = vincentAbilityHandler2;\n }\n });\n\n // ../../libs/ability-sdk/dist/src/lib/abilityCore/bundledAbility/bundledAbility.js\n var require_bundledAbility = __commonJS({\n \"../../libs/ability-sdk/dist/src/lib/abilityCore/bundledAbility/bundledAbility.js\"(exports3) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n Object.defineProperty(exports3, \"__esModule\", { value: true });\n exports3.asBundledVincentAbility = asBundledVincentAbility;\n var constants_1 = require_constants2();\n function asBundledVincentAbility(vincentAbility2, ipfsCid) {\n const bundledAbility = {\n ipfsCid,\n vincentAbility: vincentAbility2\n };\n Object.defineProperty(bundledAbility, \"vincentAbilityApiVersion\", {\n value: constants_1.VINCENT_TOOL_API_VERSION,\n writable: false,\n enumerable: true,\n configurable: false\n });\n return bundledAbility;\n }\n }\n });\n\n // ../../libs/ability-sdk/dist/src/lib/policyCore/bundledPolicy/bundledPolicy.js\n var require_bundledPolicy = __commonJS({\n \"../../libs/ability-sdk/dist/src/lib/policyCore/bundledPolicy/bundledPolicy.js\"(exports3) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n Object.defineProperty(exports3, \"__esModule\", { value: true });\n exports3.asBundledVincentPolicy = asBundledVincentPolicy;\n var constants_1 = require_constants2();\n function asBundledVincentPolicy(vincentPolicy, ipfsCid) {\n const bundledPolicy = {\n ipfsCid,\n vincentPolicy\n };\n Object.defineProperty(bundledPolicy, \"vincentAbilityApiVersion\", {\n value: constants_1.VINCENT_TOOL_API_VERSION,\n writable: false,\n enumerable: true,\n configurable: false\n });\n return bundledPolicy;\n }\n }\n });\n\n // ../../../node_modules/.pnpm/tslib@2.7.0/node_modules/tslib/tslib.es6.mjs\n var tslib_es6_exports2 = {};\n __export(tslib_es6_exports2, {\n __addDisposableResource: () => __addDisposableResource2,\n __assign: () => __assign2,\n __asyncDelegator: () => __asyncDelegator2,\n __asyncGenerator: () => __asyncGenerator2,\n __asyncValues: () => __asyncValues2,\n __await: () => __await2,\n __awaiter: () => __awaiter2,\n __classPrivateFieldGet: () => __classPrivateFieldGet2,\n __classPrivateFieldIn: () => __classPrivateFieldIn2,\n __classPrivateFieldSet: () => __classPrivateFieldSet2,\n __createBinding: () => __createBinding2,\n __decorate: () => __decorate2,\n __disposeResources: () => __disposeResources2,\n __esDecorate: () => __esDecorate2,\n __exportStar: () => __exportStar2,\n __extends: () => __extends2,\n __generator: () => __generator2,\n __importDefault: () => __importDefault2,\n __importStar: () => __importStar2,\n __makeTemplateObject: () => __makeTemplateObject2,\n __metadata: () => __metadata2,\n __param: () => __param2,\n __propKey: () => __propKey2,\n __read: () => __read2,\n __rest: () => __rest2,\n __runInitializers: () => __runInitializers2,\n __setFunctionName: () => __setFunctionName2,\n __spread: () => __spread2,\n __spreadArray: () => __spreadArray2,\n __spreadArrays: () => __spreadArrays2,\n __values: () => __values2,\n default: () => tslib_es6_default2\n });\n function __extends2(d5, b4) {\n if (typeof b4 !== \"function\" && b4 !== null)\n throw new TypeError(\"Class extends value \" + String(b4) + \" is not a constructor or null\");\n extendStatics2(d5, b4);\n function __() {\n this.constructor = d5;\n }\n d5.prototype = b4 === null ? Object.create(b4) : (__.prototype = b4.prototype, new __());\n }\n function __rest2(s4, e3) {\n var t3 = {};\n for (var p4 in s4)\n if (Object.prototype.hasOwnProperty.call(s4, p4) && e3.indexOf(p4) < 0)\n t3[p4] = s4[p4];\n if (s4 != null && typeof Object.getOwnPropertySymbols === \"function\")\n for (var i3 = 0, p4 = Object.getOwnPropertySymbols(s4); i3 < p4.length; i3++) {\n if (e3.indexOf(p4[i3]) < 0 && Object.prototype.propertyIsEnumerable.call(s4, p4[i3]))\n t3[p4[i3]] = s4[p4[i3]];\n }\n return t3;\n }\n function __decorate2(decorators, target, key, desc) {\n var c4 = arguments.length, r2 = c4 < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d5;\n if (typeof Reflect === \"object\" && typeof Reflect.decorate === \"function\")\n r2 = Reflect.decorate(decorators, target, key, desc);\n else\n for (var i3 = decorators.length - 1; i3 >= 0; i3--)\n if (d5 = decorators[i3])\n r2 = (c4 < 3 ? d5(r2) : c4 > 3 ? d5(target, key, r2) : d5(target, key)) || r2;\n return c4 > 3 && r2 && Object.defineProperty(target, key, r2), r2;\n }\n function __param2(paramIndex, decorator) {\n return function(target, key) {\n decorator(target, key, paramIndex);\n };\n }\n function __esDecorate2(ctor, descriptorIn, decorators, contextIn, initializers, extraInitializers) {\n function accept(f6) {\n if (f6 !== void 0 && typeof f6 !== \"function\")\n throw new TypeError(\"Function expected\");\n return f6;\n }\n var kind = contextIn.kind, key = kind === \"getter\" ? \"get\" : kind === \"setter\" ? \"set\" : \"value\";\n var target = !descriptorIn && ctor ? contextIn[\"static\"] ? ctor : ctor.prototype : null;\n var descriptor = descriptorIn || (target ? Object.getOwnPropertyDescriptor(target, contextIn.name) : {});\n var _2, done = false;\n for (var i3 = decorators.length - 1; i3 >= 0; i3--) {\n var context2 = {};\n for (var p4 in contextIn)\n context2[p4] = p4 === \"access\" ? {} : contextIn[p4];\n for (var p4 in contextIn.access)\n context2.access[p4] = contextIn.access[p4];\n context2.addInitializer = function(f6) {\n if (done)\n throw new TypeError(\"Cannot add initializers after decoration has completed\");\n extraInitializers.push(accept(f6 || null));\n };\n var result = (0, decorators[i3])(kind === \"accessor\" ? { get: descriptor.get, set: descriptor.set } : descriptor[key], context2);\n if (kind === \"accessor\") {\n if (result === void 0)\n continue;\n if (result === null || typeof result !== \"object\")\n throw new TypeError(\"Object expected\");\n if (_2 = accept(result.get))\n descriptor.get = _2;\n if (_2 = accept(result.set))\n descriptor.set = _2;\n if (_2 = accept(result.init))\n initializers.unshift(_2);\n } else if (_2 = accept(result)) {\n if (kind === \"field\")\n initializers.unshift(_2);\n else\n descriptor[key] = _2;\n }\n }\n if (target)\n Object.defineProperty(target, contextIn.name, descriptor);\n done = true;\n }\n function __runInitializers2(thisArg, initializers, value) {\n var useValue = arguments.length > 2;\n for (var i3 = 0; i3 < initializers.length; i3++) {\n value = useValue ? initializers[i3].call(thisArg, value) : initializers[i3].call(thisArg);\n }\n return useValue ? value : void 0;\n }\n function __propKey2(x4) {\n return typeof x4 === \"symbol\" ? x4 : \"\".concat(x4);\n }\n function __setFunctionName2(f6, name, prefix) {\n if (typeof name === \"symbol\")\n name = name.description ? \"[\".concat(name.description, \"]\") : \"\";\n return Object.defineProperty(f6, \"name\", { configurable: true, value: prefix ? \"\".concat(prefix, \" \", name) : name });\n }\n function __metadata2(metadataKey, metadataValue) {\n if (typeof Reflect === \"object\" && typeof Reflect.metadata === \"function\")\n return Reflect.metadata(metadataKey, metadataValue);\n }\n function __awaiter2(thisArg, _arguments, P2, generator) {\n function adopt(value) {\n return value instanceof P2 ? value : new P2(function(resolve) {\n resolve(value);\n });\n }\n return new (P2 || (P2 = Promise))(function(resolve, reject) {\n function fulfilled(value) {\n try {\n step(generator.next(value));\n } catch (e3) {\n reject(e3);\n }\n }\n function rejected(value) {\n try {\n step(generator[\"throw\"](value));\n } catch (e3) {\n reject(e3);\n }\n }\n function step(result) {\n result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected);\n }\n step((generator = generator.apply(thisArg, _arguments || [])).next());\n });\n }\n function __generator2(thisArg, body) {\n var _2 = { label: 0, sent: function() {\n if (t3[0] & 1)\n throw t3[1];\n return t3[1];\n }, trys: [], ops: [] }, f6, y6, t3, g4 = Object.create((typeof Iterator === \"function\" ? Iterator : Object).prototype);\n return g4.next = verb(0), g4[\"throw\"] = verb(1), g4[\"return\"] = verb(2), typeof Symbol === \"function\" && (g4[Symbol.iterator] = function() {\n return this;\n }), g4;\n function verb(n2) {\n return function(v2) {\n return step([n2, v2]);\n };\n }\n function step(op) {\n if (f6)\n throw new TypeError(\"Generator is already executing.\");\n while (g4 && (g4 = 0, op[0] && (_2 = 0)), _2)\n try {\n if (f6 = 1, y6 && (t3 = op[0] & 2 ? y6[\"return\"] : op[0] ? y6[\"throw\"] || ((t3 = y6[\"return\"]) && t3.call(y6), 0) : y6.next) && !(t3 = t3.call(y6, op[1])).done)\n return t3;\n if (y6 = 0, t3)\n op = [op[0] & 2, t3.value];\n switch (op[0]) {\n case 0:\n case 1:\n t3 = op;\n break;\n case 4:\n _2.label++;\n return { value: op[1], done: false };\n case 5:\n _2.label++;\n y6 = op[1];\n op = [0];\n continue;\n case 7:\n op = _2.ops.pop();\n _2.trys.pop();\n continue;\n default:\n if (!(t3 = _2.trys, t3 = t3.length > 0 && t3[t3.length - 1]) && (op[0] === 6 || op[0] === 2)) {\n _2 = 0;\n continue;\n }\n if (op[0] === 3 && (!t3 || op[1] > t3[0] && op[1] < t3[3])) {\n _2.label = op[1];\n break;\n }\n if (op[0] === 6 && _2.label < t3[1]) {\n _2.label = t3[1];\n t3 = op;\n break;\n }\n if (t3 && _2.label < t3[2]) {\n _2.label = t3[2];\n _2.ops.push(op);\n break;\n }\n if (t3[2])\n _2.ops.pop();\n _2.trys.pop();\n continue;\n }\n op = body.call(thisArg, _2);\n } catch (e3) {\n op = [6, e3];\n y6 = 0;\n } finally {\n f6 = t3 = 0;\n }\n if (op[0] & 5)\n throw op[1];\n return { value: op[0] ? op[1] : void 0, done: true };\n }\n }\n function __exportStar2(m2, o5) {\n for (var p4 in m2)\n if (p4 !== \"default\" && !Object.prototype.hasOwnProperty.call(o5, p4))\n __createBinding2(o5, m2, p4);\n }\n function __values2(o5) {\n var s4 = typeof Symbol === \"function\" && Symbol.iterator, m2 = s4 && o5[s4], i3 = 0;\n if (m2)\n return m2.call(o5);\n if (o5 && typeof o5.length === \"number\")\n return {\n next: function() {\n if (o5 && i3 >= o5.length)\n o5 = void 0;\n return { value: o5 && o5[i3++], done: !o5 };\n }\n };\n throw new TypeError(s4 ? \"Object is not iterable.\" : \"Symbol.iterator is not defined.\");\n }\n function __read2(o5, n2) {\n var m2 = typeof Symbol === \"function\" && o5[Symbol.iterator];\n if (!m2)\n return o5;\n var i3 = m2.call(o5), r2, ar = [], e3;\n try {\n while ((n2 === void 0 || n2-- > 0) && !(r2 = i3.next()).done)\n ar.push(r2.value);\n } catch (error) {\n e3 = { error };\n } finally {\n try {\n if (r2 && !r2.done && (m2 = i3[\"return\"]))\n m2.call(i3);\n } finally {\n if (e3)\n throw e3.error;\n }\n }\n return ar;\n }\n function __spread2() {\n for (var ar = [], i3 = 0; i3 < arguments.length; i3++)\n ar = ar.concat(__read2(arguments[i3]));\n return ar;\n }\n function __spreadArrays2() {\n for (var s4 = 0, i3 = 0, il = arguments.length; i3 < il; i3++)\n s4 += arguments[i3].length;\n for (var r2 = Array(s4), k4 = 0, i3 = 0; i3 < il; i3++)\n for (var a3 = arguments[i3], j2 = 0, jl = a3.length; j2 < jl; j2++, k4++)\n r2[k4] = a3[j2];\n return r2;\n }\n function __spreadArray2(to, from14, pack) {\n if (pack || arguments.length === 2)\n for (var i3 = 0, l6 = from14.length, ar; i3 < l6; i3++) {\n if (ar || !(i3 in from14)) {\n if (!ar)\n ar = Array.prototype.slice.call(from14, 0, i3);\n ar[i3] = from14[i3];\n }\n }\n return to.concat(ar || Array.prototype.slice.call(from14));\n }\n function __await2(v2) {\n return this instanceof __await2 ? (this.v = v2, this) : new __await2(v2);\n }\n function __asyncGenerator2(thisArg, _arguments, generator) {\n if (!Symbol.asyncIterator)\n throw new TypeError(\"Symbol.asyncIterator is not defined.\");\n var g4 = generator.apply(thisArg, _arguments || []), i3, q3 = [];\n return i3 = Object.create((typeof AsyncIterator === \"function\" ? AsyncIterator : Object).prototype), verb(\"next\"), verb(\"throw\"), verb(\"return\", awaitReturn), i3[Symbol.asyncIterator] = function() {\n return this;\n }, i3;\n function awaitReturn(f6) {\n return function(v2) {\n return Promise.resolve(v2).then(f6, reject);\n };\n }\n function verb(n2, f6) {\n if (g4[n2]) {\n i3[n2] = function(v2) {\n return new Promise(function(a3, b4) {\n q3.push([n2, v2, a3, b4]) > 1 || resume(n2, v2);\n });\n };\n if (f6)\n i3[n2] = f6(i3[n2]);\n }\n }\n function resume(n2, v2) {\n try {\n step(g4[n2](v2));\n } catch (e3) {\n settle(q3[0][3], e3);\n }\n }\n function step(r2) {\n r2.value instanceof __await2 ? Promise.resolve(r2.value.v).then(fulfill, reject) : settle(q3[0][2], r2);\n }\n function fulfill(value) {\n resume(\"next\", value);\n }\n function reject(value) {\n resume(\"throw\", value);\n }\n function settle(f6, v2) {\n if (f6(v2), q3.shift(), q3.length)\n resume(q3[0][0], q3[0][1]);\n }\n }\n function __asyncDelegator2(o5) {\n var i3, p4;\n return i3 = {}, verb(\"next\"), verb(\"throw\", function(e3) {\n throw e3;\n }), verb(\"return\"), i3[Symbol.iterator] = function() {\n return this;\n }, i3;\n function verb(n2, f6) {\n i3[n2] = o5[n2] ? function(v2) {\n return (p4 = !p4) ? { value: __await2(o5[n2](v2)), done: false } : f6 ? f6(v2) : v2;\n } : f6;\n }\n }\n function __asyncValues2(o5) {\n if (!Symbol.asyncIterator)\n throw new TypeError(\"Symbol.asyncIterator is not defined.\");\n var m2 = o5[Symbol.asyncIterator], i3;\n return m2 ? m2.call(o5) : (o5 = typeof __values2 === \"function\" ? __values2(o5) : o5[Symbol.iterator](), i3 = {}, verb(\"next\"), verb(\"throw\"), verb(\"return\"), i3[Symbol.asyncIterator] = function() {\n return this;\n }, i3);\n function verb(n2) {\n i3[n2] = o5[n2] && function(v2) {\n return new Promise(function(resolve, reject) {\n v2 = o5[n2](v2), settle(resolve, reject, v2.done, v2.value);\n });\n };\n }\n function settle(resolve, reject, d5, v2) {\n Promise.resolve(v2).then(function(v3) {\n resolve({ value: v3, done: d5 });\n }, reject);\n }\n }\n function __makeTemplateObject2(cooked, raw) {\n if (Object.defineProperty) {\n Object.defineProperty(cooked, \"raw\", { value: raw });\n } else {\n cooked.raw = raw;\n }\n return cooked;\n }\n function __importStar2(mod3) {\n if (mod3 && mod3.__esModule)\n return mod3;\n var result = {};\n if (mod3 != null) {\n for (var k4 in mod3)\n if (k4 !== \"default\" && Object.prototype.hasOwnProperty.call(mod3, k4))\n __createBinding2(result, mod3, k4);\n }\n __setModuleDefault2(result, mod3);\n return result;\n }\n function __importDefault2(mod3) {\n return mod3 && mod3.__esModule ? mod3 : { default: mod3 };\n }\n function __classPrivateFieldGet2(receiver, state, kind, f6) {\n if (kind === \"a\" && !f6)\n throw new TypeError(\"Private accessor was defined without a getter\");\n if (typeof state === \"function\" ? receiver !== state || !f6 : !state.has(receiver))\n throw new TypeError(\"Cannot read private member from an object whose class did not declare it\");\n return kind === \"m\" ? f6 : kind === \"a\" ? f6.call(receiver) : f6 ? f6.value : state.get(receiver);\n }\n function __classPrivateFieldSet2(receiver, state, value, kind, f6) {\n if (kind === \"m\")\n throw new TypeError(\"Private method is not writable\");\n if (kind === \"a\" && !f6)\n throw new TypeError(\"Private accessor was defined without a setter\");\n if (typeof state === \"function\" ? receiver !== state || !f6 : !state.has(receiver))\n throw new TypeError(\"Cannot write private member to an object whose class did not declare it\");\n return kind === \"a\" ? f6.call(receiver, value) : f6 ? f6.value = value : state.set(receiver, value), value;\n }\n function __classPrivateFieldIn2(state, receiver) {\n if (receiver === null || typeof receiver !== \"object\" && typeof receiver !== \"function\")\n throw new TypeError(\"Cannot use 'in' operator on non-object\");\n return typeof state === \"function\" ? receiver === state : state.has(receiver);\n }\n function __addDisposableResource2(env2, value, async) {\n if (value !== null && value !== void 0) {\n if (typeof value !== \"object\" && typeof value !== \"function\")\n throw new TypeError(\"Object expected.\");\n var dispose, inner;\n if (async) {\n if (!Symbol.asyncDispose)\n throw new TypeError(\"Symbol.asyncDispose is not defined.\");\n dispose = value[Symbol.asyncDispose];\n }\n if (dispose === void 0) {\n if (!Symbol.dispose)\n throw new TypeError(\"Symbol.dispose is not defined.\");\n dispose = value[Symbol.dispose];\n if (async)\n inner = dispose;\n }\n if (typeof dispose !== \"function\")\n throw new TypeError(\"Object not disposable.\");\n if (inner)\n dispose = function() {\n try {\n inner.call(this);\n } catch (e3) {\n return Promise.reject(e3);\n }\n };\n env2.stack.push({ value, dispose, async });\n } else if (async) {\n env2.stack.push({ async: true });\n }\n return value;\n }\n function __disposeResources2(env2) {\n function fail(e3) {\n env2.error = env2.hasError ? new _SuppressedError2(e3, env2.error, \"An error was suppressed during disposal.\") : e3;\n env2.hasError = true;\n }\n var r2, s4 = 0;\n function next() {\n while (r2 = env2.stack.pop()) {\n try {\n if (!r2.async && s4 === 1)\n return s4 = 0, env2.stack.push(r2), Promise.resolve().then(next);\n if (r2.dispose) {\n var result = r2.dispose.call(r2.value);\n if (r2.async)\n return s4 |= 2, Promise.resolve(result).then(next, function(e3) {\n fail(e3);\n return next();\n });\n } else\n s4 |= 1;\n } catch (e3) {\n fail(e3);\n }\n }\n if (s4 === 1)\n return env2.hasError ? Promise.reject(env2.error) : Promise.resolve();\n if (env2.hasError)\n throw env2.error;\n }\n return next();\n }\n var extendStatics2, __assign2, __createBinding2, __setModuleDefault2, _SuppressedError2, tslib_es6_default2;\n var init_tslib_es62 = __esm({\n \"../../../node_modules/.pnpm/tslib@2.7.0/node_modules/tslib/tslib.es6.mjs\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n extendStatics2 = function(d5, b4) {\n extendStatics2 = Object.setPrototypeOf || { __proto__: [] } instanceof Array && function(d6, b5) {\n d6.__proto__ = b5;\n } || function(d6, b5) {\n for (var p4 in b5)\n if (Object.prototype.hasOwnProperty.call(b5, p4))\n d6[p4] = b5[p4];\n };\n return extendStatics2(d5, b4);\n };\n __assign2 = function() {\n __assign2 = Object.assign || function __assign3(t3) {\n for (var s4, i3 = 1, n2 = arguments.length; i3 < n2; i3++) {\n s4 = arguments[i3];\n for (var p4 in s4)\n if (Object.prototype.hasOwnProperty.call(s4, p4))\n t3[p4] = s4[p4];\n }\n return t3;\n };\n return __assign2.apply(this, arguments);\n };\n __createBinding2 = Object.create ? function(o5, m2, k4, k22) {\n if (k22 === void 0)\n k22 = k4;\n var desc = Object.getOwnPropertyDescriptor(m2, k4);\n if (!desc || (\"get\" in desc ? !m2.__esModule : desc.writable || desc.configurable)) {\n desc = { enumerable: true, get: function() {\n return m2[k4];\n } };\n }\n Object.defineProperty(o5, k22, desc);\n } : function(o5, m2, k4, k22) {\n if (k22 === void 0)\n k22 = k4;\n o5[k22] = m2[k4];\n };\n __setModuleDefault2 = Object.create ? function(o5, v2) {\n Object.defineProperty(o5, \"default\", { enumerable: true, value: v2 });\n } : function(o5, v2) {\n o5[\"default\"] = v2;\n };\n _SuppressedError2 = typeof SuppressedError === \"function\" ? SuppressedError : function(error, suppressed, message) {\n var e3 = new Error(message);\n return e3.name = \"SuppressedError\", e3.error = error, e3.suppressed = suppressed, e3;\n };\n tslib_es6_default2 = {\n __extends: __extends2,\n __assign: __assign2,\n __rest: __rest2,\n __decorate: __decorate2,\n __param: __param2,\n __metadata: __metadata2,\n __awaiter: __awaiter2,\n __generator: __generator2,\n __createBinding: __createBinding2,\n __exportStar: __exportStar2,\n __values: __values2,\n __read: __read2,\n __spread: __spread2,\n __spreadArrays: __spreadArrays2,\n __spreadArray: __spreadArray2,\n __await: __await2,\n __asyncGenerator: __asyncGenerator2,\n __asyncDelegator: __asyncDelegator2,\n __asyncValues: __asyncValues2,\n __makeTemplateObject: __makeTemplateObject2,\n __importStar: __importStar2,\n __importDefault: __importDefault2,\n __classPrivateFieldGet: __classPrivateFieldGet2,\n __classPrivateFieldSet: __classPrivateFieldSet2,\n __classPrivateFieldIn: __classPrivateFieldIn2,\n __addDisposableResource: __addDisposableResource2,\n __disposeResources: __disposeResources2\n };\n }\n });\n\n // ../../../node_modules/.pnpm/ethers@6.15.0_bufferutil@4.0.9_utf-8-validate@5.0.10/node_modules/ethers/lib.commonjs/_version.js\n var require_version27 = __commonJS({\n \"../../../node_modules/.pnpm/ethers@6.15.0_bufferutil@4.0.9_utf-8-validate@5.0.10/node_modules/ethers/lib.commonjs/_version.js\"(exports3) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n Object.defineProperty(exports3, \"__esModule\", { value: true });\n exports3.version = void 0;\n exports3.version = \"6.15.0\";\n }\n });\n\n // ../../../node_modules/.pnpm/ethers@6.15.0_bufferutil@4.0.9_utf-8-validate@5.0.10/node_modules/ethers/lib.commonjs/utils/properties.js\n var require_properties = __commonJS({\n \"../../../node_modules/.pnpm/ethers@6.15.0_bufferutil@4.0.9_utf-8-validate@5.0.10/node_modules/ethers/lib.commonjs/utils/properties.js\"(exports3) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n Object.defineProperty(exports3, \"__esModule\", { value: true });\n exports3.defineProperties = exports3.resolveProperties = void 0;\n function checkType(value, type, name) {\n const types = type.split(\"|\").map((t3) => t3.trim());\n for (let i3 = 0; i3 < types.length; i3++) {\n switch (type) {\n case \"any\":\n return;\n case \"bigint\":\n case \"boolean\":\n case \"number\":\n case \"string\":\n if (typeof value === type) {\n return;\n }\n }\n }\n const error = new Error(`invalid value for type ${type}`);\n error.code = \"INVALID_ARGUMENT\";\n error.argument = `value.${name}`;\n error.value = value;\n throw error;\n }\n async function resolveProperties2(value) {\n const keys = Object.keys(value);\n const results = await Promise.all(keys.map((k4) => Promise.resolve(value[k4])));\n return results.reduce((accum, v2, index2) => {\n accum[keys[index2]] = v2;\n return accum;\n }, {});\n }\n exports3.resolveProperties = resolveProperties2;\n function defineProperties(target, values, types) {\n for (let key in values) {\n let value = values[key];\n const type = types ? types[key] : null;\n if (type) {\n checkType(value, type, key);\n }\n Object.defineProperty(target, key, { enumerable: true, value, writable: false });\n }\n }\n exports3.defineProperties = defineProperties;\n }\n });\n\n // ../../../node_modules/.pnpm/ethers@6.15.0_bufferutil@4.0.9_utf-8-validate@5.0.10/node_modules/ethers/lib.commonjs/utils/errors.js\n var require_errors2 = __commonJS({\n \"../../../node_modules/.pnpm/ethers@6.15.0_bufferutil@4.0.9_utf-8-validate@5.0.10/node_modules/ethers/lib.commonjs/utils/errors.js\"(exports3) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n Object.defineProperty(exports3, \"__esModule\", { value: true });\n exports3.assertPrivate = exports3.assertNormalize = exports3.assertArgumentCount = exports3.assertArgument = exports3.assert = exports3.makeError = exports3.isCallException = exports3.isError = void 0;\n var _version_js_1 = require_version27();\n var properties_js_1 = require_properties();\n function stringify3(value, seen) {\n if (value == null) {\n return \"null\";\n }\n if (seen == null) {\n seen = /* @__PURE__ */ new Set();\n }\n if (typeof value === \"object\") {\n if (seen.has(value)) {\n return \"[Circular]\";\n }\n seen.add(value);\n }\n if (Array.isArray(value)) {\n return \"[ \" + value.map((v2) => stringify3(v2, seen)).join(\", \") + \" ]\";\n }\n if (value instanceof Uint8Array) {\n const HEX = \"0123456789abcdef\";\n let result = \"0x\";\n for (let i3 = 0; i3 < value.length; i3++) {\n result += HEX[value[i3] >> 4];\n result += HEX[value[i3] & 15];\n }\n return result;\n }\n if (typeof value === \"object\" && typeof value.toJSON === \"function\") {\n return stringify3(value.toJSON(), seen);\n }\n switch (typeof value) {\n case \"boolean\":\n case \"number\":\n case \"symbol\":\n return value.toString();\n case \"bigint\":\n return BigInt(value).toString();\n case \"string\":\n return JSON.stringify(value);\n case \"object\": {\n const keys = Object.keys(value);\n keys.sort();\n return \"{ \" + keys.map((k4) => `${stringify3(k4, seen)}: ${stringify3(value[k4], seen)}`).join(\", \") + \" }\";\n }\n }\n return `[ COULD NOT SERIALIZE ]`;\n }\n function isError(error, code) {\n return error && error.code === code;\n }\n exports3.isError = isError;\n function isCallException(error) {\n return isError(error, \"CALL_EXCEPTION\");\n }\n exports3.isCallException = isCallException;\n function makeError(message, code, info) {\n let shortMessage = message;\n {\n const details = [];\n if (info) {\n if (\"message\" in info || \"code\" in info || \"name\" in info) {\n throw new Error(`value will overwrite populated values: ${stringify3(info)}`);\n }\n for (const key in info) {\n if (key === \"shortMessage\") {\n continue;\n }\n const value = info[key];\n details.push(key + \"=\" + stringify3(value));\n }\n }\n details.push(`code=${code}`);\n details.push(`version=${_version_js_1.version}`);\n if (details.length) {\n message += \" (\" + details.join(\", \") + \")\";\n }\n }\n let error;\n switch (code) {\n case \"INVALID_ARGUMENT\":\n error = new TypeError(message);\n break;\n case \"NUMERIC_FAULT\":\n case \"BUFFER_OVERRUN\":\n error = new RangeError(message);\n break;\n default:\n error = new Error(message);\n }\n (0, properties_js_1.defineProperties)(error, { code });\n if (info) {\n Object.assign(error, info);\n }\n if (error.shortMessage == null) {\n (0, properties_js_1.defineProperties)(error, { shortMessage });\n }\n return error;\n }\n exports3.makeError = makeError;\n function assert9(check, message, code, info) {\n if (!check) {\n throw makeError(message, code, info);\n }\n }\n exports3.assert = assert9;\n function assertArgument(check, message, name, value) {\n assert9(check, message, \"INVALID_ARGUMENT\", { argument: name, value });\n }\n exports3.assertArgument = assertArgument;\n function assertArgumentCount(count, expectedCount, message) {\n if (message == null) {\n message = \"\";\n }\n if (message) {\n message = \": \" + message;\n }\n assert9(count >= expectedCount, \"missing argument\" + message, \"MISSING_ARGUMENT\", {\n count,\n expectedCount\n });\n assert9(count <= expectedCount, \"too many arguments\" + message, \"UNEXPECTED_ARGUMENT\", {\n count,\n expectedCount\n });\n }\n exports3.assertArgumentCount = assertArgumentCount;\n var _normalizeForms = [\"NFD\", \"NFC\", \"NFKD\", \"NFKC\"].reduce((accum, form) => {\n try {\n if (\"test\".normalize(form) !== \"test\") {\n throw new Error(\"bad\");\n }\n ;\n if (form === \"NFD\") {\n const check = String.fromCharCode(233).normalize(\"NFD\");\n const expected = String.fromCharCode(101, 769);\n if (check !== expected) {\n throw new Error(\"broken\");\n }\n }\n accum.push(form);\n } catch (error) {\n }\n return accum;\n }, []);\n function assertNormalize(form) {\n assert9(_normalizeForms.indexOf(form) >= 0, \"platform missing String.prototype.normalize\", \"UNSUPPORTED_OPERATION\", {\n operation: \"String.prototype.normalize\",\n info: { form }\n });\n }\n exports3.assertNormalize = assertNormalize;\n function assertPrivate(givenGuard, guard, className) {\n if (className == null) {\n className = \"\";\n }\n if (givenGuard !== guard) {\n let method = className, operation = \"new\";\n if (className) {\n method += \".\";\n operation += \" \" + className;\n }\n assert9(false, `private constructor; use ${method}from* methods`, \"UNSUPPORTED_OPERATION\", {\n operation\n });\n }\n }\n exports3.assertPrivate = assertPrivate;\n }\n });\n\n // ../../../node_modules/.pnpm/ethers@6.15.0_bufferutil@4.0.9_utf-8-validate@5.0.10/node_modules/ethers/lib.commonjs/utils/data.js\n var require_data = __commonJS({\n \"../../../node_modules/.pnpm/ethers@6.15.0_bufferutil@4.0.9_utf-8-validate@5.0.10/node_modules/ethers/lib.commonjs/utils/data.js\"(exports3) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n Object.defineProperty(exports3, \"__esModule\", { value: true });\n exports3.zeroPadBytes = exports3.zeroPadValue = exports3.stripZerosLeft = exports3.dataSlice = exports3.dataLength = exports3.concat = exports3.hexlify = exports3.isBytesLike = exports3.isHexString = exports3.getBytesCopy = exports3.getBytes = void 0;\n var errors_js_1 = require_errors2();\n function _getBytes(value, name, copy) {\n if (value instanceof Uint8Array) {\n if (copy) {\n return new Uint8Array(value);\n }\n return value;\n }\n if (typeof value === \"string\" && value.match(/^0x(?:[0-9a-f][0-9a-f])*$/i)) {\n const result = new Uint8Array((value.length - 2) / 2);\n let offset = 2;\n for (let i3 = 0; i3 < result.length; i3++) {\n result[i3] = parseInt(value.substring(offset, offset + 2), 16);\n offset += 2;\n }\n return result;\n }\n (0, errors_js_1.assertArgument)(false, \"invalid BytesLike value\", name || \"value\", value);\n }\n function getBytes(value, name) {\n return _getBytes(value, name, false);\n }\n exports3.getBytes = getBytes;\n function getBytesCopy(value, name) {\n return _getBytes(value, name, true);\n }\n exports3.getBytesCopy = getBytesCopy;\n function isHexString(value, length2) {\n if (typeof value !== \"string\" || !value.match(/^0x[0-9A-Fa-f]*$/)) {\n return false;\n }\n if (typeof length2 === \"number\" && value.length !== 2 + 2 * length2) {\n return false;\n }\n if (length2 === true && value.length % 2 !== 0) {\n return false;\n }\n return true;\n }\n exports3.isHexString = isHexString;\n function isBytesLike(value) {\n return isHexString(value, true) || value instanceof Uint8Array;\n }\n exports3.isBytesLike = isBytesLike;\n var HexCharacters = \"0123456789abcdef\";\n function hexlify(data) {\n const bytes = getBytes(data);\n let result = \"0x\";\n for (let i3 = 0; i3 < bytes.length; i3++) {\n const v2 = bytes[i3];\n result += HexCharacters[(v2 & 240) >> 4] + HexCharacters[v2 & 15];\n }\n return result;\n }\n exports3.hexlify = hexlify;\n function concat5(datas) {\n return \"0x\" + datas.map((d5) => hexlify(d5).substring(2)).join(\"\");\n }\n exports3.concat = concat5;\n function dataLength(data) {\n if (isHexString(data, true)) {\n return (data.length - 2) / 2;\n }\n return getBytes(data).length;\n }\n exports3.dataLength = dataLength;\n function dataSlice(data, start, end) {\n const bytes = getBytes(data);\n if (end != null && end > bytes.length) {\n (0, errors_js_1.assert)(false, \"cannot slice beyond data bounds\", \"BUFFER_OVERRUN\", {\n buffer: bytes,\n length: bytes.length,\n offset: end\n });\n }\n return hexlify(bytes.slice(start == null ? 0 : start, end == null ? bytes.length : end));\n }\n exports3.dataSlice = dataSlice;\n function stripZerosLeft(data) {\n let bytes = hexlify(data).substring(2);\n while (bytes.startsWith(\"00\")) {\n bytes = bytes.substring(2);\n }\n return \"0x\" + bytes;\n }\n exports3.stripZerosLeft = stripZerosLeft;\n function zeroPad(data, length2, left) {\n const bytes = getBytes(data);\n (0, errors_js_1.assert)(length2 >= bytes.length, \"padding exceeds data length\", \"BUFFER_OVERRUN\", {\n buffer: new Uint8Array(bytes),\n length: length2,\n offset: length2 + 1\n });\n const result = new Uint8Array(length2);\n result.fill(0);\n if (left) {\n result.set(bytes, length2 - bytes.length);\n } else {\n result.set(bytes, 0);\n }\n return hexlify(result);\n }\n function zeroPadValue(data, length2) {\n return zeroPad(data, length2, true);\n }\n exports3.zeroPadValue = zeroPadValue;\n function zeroPadBytes(data, length2) {\n return zeroPad(data, length2, false);\n }\n exports3.zeroPadBytes = zeroPadBytes;\n }\n });\n\n // ../../../node_modules/.pnpm/ethers@6.15.0_bufferutil@4.0.9_utf-8-validate@5.0.10/node_modules/ethers/lib.commonjs/utils/maths.js\n var require_maths = __commonJS({\n \"../../../node_modules/.pnpm/ethers@6.15.0_bufferutil@4.0.9_utf-8-validate@5.0.10/node_modules/ethers/lib.commonjs/utils/maths.js\"(exports3) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n Object.defineProperty(exports3, \"__esModule\", { value: true });\n exports3.toQuantity = exports3.toBeArray = exports3.toBeHex = exports3.toNumber = exports3.getNumber = exports3.toBigInt = exports3.getUint = exports3.getBigInt = exports3.mask = exports3.toTwos = exports3.fromTwos = void 0;\n var data_js_1 = require_data();\n var errors_js_1 = require_errors2();\n var BN_0 = BigInt(0);\n var BN_1 = BigInt(1);\n var maxValue = 9007199254740991;\n function fromTwos(_value, _width) {\n const value = getUint(_value, \"value\");\n const width = BigInt(getNumber(_width, \"width\"));\n (0, errors_js_1.assert)(value >> width === BN_0, \"overflow\", \"NUMERIC_FAULT\", {\n operation: \"fromTwos\",\n fault: \"overflow\",\n value: _value\n });\n if (value >> width - BN_1) {\n const mask2 = (BN_1 << width) - BN_1;\n return -((~value & mask2) + BN_1);\n }\n return value;\n }\n exports3.fromTwos = fromTwos;\n function toTwos(_value, _width) {\n let value = getBigInt(_value, \"value\");\n const width = BigInt(getNumber(_width, \"width\"));\n const limit = BN_1 << width - BN_1;\n if (value < BN_0) {\n value = -value;\n (0, errors_js_1.assert)(value <= limit, \"too low\", \"NUMERIC_FAULT\", {\n operation: \"toTwos\",\n fault: \"overflow\",\n value: _value\n });\n const mask2 = (BN_1 << width) - BN_1;\n return (~value & mask2) + BN_1;\n } else {\n (0, errors_js_1.assert)(value < limit, \"too high\", \"NUMERIC_FAULT\", {\n operation: \"toTwos\",\n fault: \"overflow\",\n value: _value\n });\n }\n return value;\n }\n exports3.toTwos = toTwos;\n function mask(_value, _bits) {\n const value = getUint(_value, \"value\");\n const bits = BigInt(getNumber(_bits, \"bits\"));\n return value & (BN_1 << bits) - BN_1;\n }\n exports3.mask = mask;\n function getBigInt(value, name) {\n switch (typeof value) {\n case \"bigint\":\n return value;\n case \"number\":\n (0, errors_js_1.assertArgument)(Number.isInteger(value), \"underflow\", name || \"value\", value);\n (0, errors_js_1.assertArgument)(value >= -maxValue && value <= maxValue, \"overflow\", name || \"value\", value);\n return BigInt(value);\n case \"string\":\n try {\n if (value === \"\") {\n throw new Error(\"empty string\");\n }\n if (value[0] === \"-\" && value[1] !== \"-\") {\n return -BigInt(value.substring(1));\n }\n return BigInt(value);\n } catch (e3) {\n (0, errors_js_1.assertArgument)(false, `invalid BigNumberish string: ${e3.message}`, name || \"value\", value);\n }\n }\n (0, errors_js_1.assertArgument)(false, \"invalid BigNumberish value\", name || \"value\", value);\n }\n exports3.getBigInt = getBigInt;\n function getUint(value, name) {\n const result = getBigInt(value, name);\n (0, errors_js_1.assert)(result >= BN_0, \"unsigned value cannot be negative\", \"NUMERIC_FAULT\", {\n fault: \"overflow\",\n operation: \"getUint\",\n value\n });\n return result;\n }\n exports3.getUint = getUint;\n var Nibbles = \"0123456789abcdef\";\n function toBigInt4(value) {\n if (value instanceof Uint8Array) {\n let result = \"0x0\";\n for (const v2 of value) {\n result += Nibbles[v2 >> 4];\n result += Nibbles[v2 & 15];\n }\n return BigInt(result);\n }\n return getBigInt(value);\n }\n exports3.toBigInt = toBigInt4;\n function getNumber(value, name) {\n switch (typeof value) {\n case \"bigint\":\n (0, errors_js_1.assertArgument)(value >= -maxValue && value <= maxValue, \"overflow\", name || \"value\", value);\n return Number(value);\n case \"number\":\n (0, errors_js_1.assertArgument)(Number.isInteger(value), \"underflow\", name || \"value\", value);\n (0, errors_js_1.assertArgument)(value >= -maxValue && value <= maxValue, \"overflow\", name || \"value\", value);\n return value;\n case \"string\":\n try {\n if (value === \"\") {\n throw new Error(\"empty string\");\n }\n return getNumber(BigInt(value), name);\n } catch (e3) {\n (0, errors_js_1.assertArgument)(false, `invalid numeric string: ${e3.message}`, name || \"value\", value);\n }\n }\n (0, errors_js_1.assertArgument)(false, \"invalid numeric value\", name || \"value\", value);\n }\n exports3.getNumber = getNumber;\n function toNumber4(value) {\n return getNumber(toBigInt4(value));\n }\n exports3.toNumber = toNumber4;\n function toBeHex(_value, _width) {\n const value = getUint(_value, \"value\");\n let result = value.toString(16);\n if (_width == null) {\n if (result.length % 2) {\n result = \"0\" + result;\n }\n } else {\n const width = getNumber(_width, \"width\");\n (0, errors_js_1.assert)(width * 2 >= result.length, `value exceeds width (${width} bytes)`, \"NUMERIC_FAULT\", {\n operation: \"toBeHex\",\n fault: \"overflow\",\n value: _value\n });\n while (result.length < width * 2) {\n result = \"0\" + result;\n }\n }\n return \"0x\" + result;\n }\n exports3.toBeHex = toBeHex;\n function toBeArray(_value) {\n const value = getUint(_value, \"value\");\n if (value === BN_0) {\n return new Uint8Array([]);\n }\n let hex = value.toString(16);\n if (hex.length % 2) {\n hex = \"0\" + hex;\n }\n const result = new Uint8Array(hex.length / 2);\n for (let i3 = 0; i3 < result.length; i3++) {\n const offset = i3 * 2;\n result[i3] = parseInt(hex.substring(offset, offset + 2), 16);\n }\n return result;\n }\n exports3.toBeArray = toBeArray;\n function toQuantity(value) {\n let result = (0, data_js_1.hexlify)((0, data_js_1.isBytesLike)(value) ? value : toBeArray(value)).substring(2);\n while (result.startsWith(\"0\")) {\n result = result.substring(1);\n }\n if (result === \"\") {\n result = \"0\";\n }\n return \"0x\" + result;\n }\n exports3.toQuantity = toQuantity;\n }\n });\n\n // ../../../node_modules/.pnpm/ethers@6.15.0_bufferutil@4.0.9_utf-8-validate@5.0.10/node_modules/ethers/lib.commonjs/utils/base58.js\n var require_base58 = __commonJS({\n \"../../../node_modules/.pnpm/ethers@6.15.0_bufferutil@4.0.9_utf-8-validate@5.0.10/node_modules/ethers/lib.commonjs/utils/base58.js\"(exports3) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n Object.defineProperty(exports3, \"__esModule\", { value: true });\n exports3.decodeBase58 = exports3.encodeBase58 = void 0;\n var data_js_1 = require_data();\n var errors_js_1 = require_errors2();\n var maths_js_1 = require_maths();\n var Alphabet = \"123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz\";\n var Lookup = null;\n function getAlpha(letter) {\n if (Lookup == null) {\n Lookup = {};\n for (let i3 = 0; i3 < Alphabet.length; i3++) {\n Lookup[Alphabet[i3]] = BigInt(i3);\n }\n }\n const result = Lookup[letter];\n (0, errors_js_1.assertArgument)(result != null, `invalid base58 value`, \"letter\", letter);\n return result;\n }\n var BN_0 = BigInt(0);\n var BN_58 = BigInt(58);\n function encodeBase58(_value) {\n const bytes = (0, data_js_1.getBytes)(_value);\n let value = (0, maths_js_1.toBigInt)(bytes);\n let result = \"\";\n while (value) {\n result = Alphabet[Number(value % BN_58)] + result;\n value /= BN_58;\n }\n for (let i3 = 0; i3 < bytes.length; i3++) {\n if (bytes[i3]) {\n break;\n }\n result = Alphabet[0] + result;\n }\n return result;\n }\n exports3.encodeBase58 = encodeBase58;\n function decodeBase58(value) {\n let result = BN_0;\n for (let i3 = 0; i3 < value.length; i3++) {\n result *= BN_58;\n result += getAlpha(value[i3]);\n }\n return result;\n }\n exports3.decodeBase58 = decodeBase58;\n }\n });\n\n // ../../../node_modules/.pnpm/ethers@6.15.0_bufferutil@4.0.9_utf-8-validate@5.0.10/node_modules/ethers/lib.commonjs/utils/base64-browser.js\n var require_base64_browser = __commonJS({\n \"../../../node_modules/.pnpm/ethers@6.15.0_bufferutil@4.0.9_utf-8-validate@5.0.10/node_modules/ethers/lib.commonjs/utils/base64-browser.js\"(exports3) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n Object.defineProperty(exports3, \"__esModule\", { value: true });\n exports3.encodeBase64 = exports3.decodeBase64 = void 0;\n var data_js_1 = require_data();\n function decodeBase64(textData) {\n textData = atob(textData);\n const data = new Uint8Array(textData.length);\n for (let i3 = 0; i3 < textData.length; i3++) {\n data[i3] = textData.charCodeAt(i3);\n }\n return (0, data_js_1.getBytes)(data);\n }\n exports3.decodeBase64 = decodeBase64;\n function encodeBase64(_data) {\n const data = (0, data_js_1.getBytes)(_data);\n let textData = \"\";\n for (let i3 = 0; i3 < data.length; i3++) {\n textData += String.fromCharCode(data[i3]);\n }\n return btoa(textData);\n }\n exports3.encodeBase64 = encodeBase64;\n }\n });\n\n // ../../../node_modules/.pnpm/ethers@6.15.0_bufferutil@4.0.9_utf-8-validate@5.0.10/node_modules/ethers/lib.commonjs/utils/events.js\n var require_events = __commonJS({\n \"../../../node_modules/.pnpm/ethers@6.15.0_bufferutil@4.0.9_utf-8-validate@5.0.10/node_modules/ethers/lib.commonjs/utils/events.js\"(exports3) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n Object.defineProperty(exports3, \"__esModule\", { value: true });\n exports3.EventPayload = void 0;\n var properties_js_1 = require_properties();\n var EventPayload = class {\n /**\n * The event filter.\n */\n filter;\n /**\n * The **EventEmitterable**.\n */\n emitter;\n #listener;\n /**\n * Create a new **EventPayload** for %%emitter%% with\n * the %%listener%% and for %%filter%%.\n */\n constructor(emitter, listener, filter) {\n this.#listener = listener;\n (0, properties_js_1.defineProperties)(this, { emitter, filter });\n }\n /**\n * Unregister the triggered listener for future events.\n */\n async removeListener() {\n if (this.#listener == null) {\n return;\n }\n await this.emitter.off(this.filter, this.#listener);\n }\n };\n exports3.EventPayload = EventPayload;\n }\n });\n\n // ../../../node_modules/.pnpm/ethers@6.15.0_bufferutil@4.0.9_utf-8-validate@5.0.10/node_modules/ethers/lib.commonjs/utils/utf8.js\n var require_utf82 = __commonJS({\n \"../../../node_modules/.pnpm/ethers@6.15.0_bufferutil@4.0.9_utf-8-validate@5.0.10/node_modules/ethers/lib.commonjs/utils/utf8.js\"(exports3) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n Object.defineProperty(exports3, \"__esModule\", { value: true });\n exports3.toUtf8CodePoints = exports3.toUtf8String = exports3.toUtf8Bytes = exports3.Utf8ErrorFuncs = void 0;\n var data_js_1 = require_data();\n var errors_js_1 = require_errors2();\n function errorFunc(reason, offset, bytes, output, badCodepoint) {\n (0, errors_js_1.assertArgument)(false, `invalid codepoint at offset ${offset}; ${reason}`, \"bytes\", bytes);\n }\n function ignoreFunc(reason, offset, bytes, output, badCodepoint) {\n if (reason === \"BAD_PREFIX\" || reason === \"UNEXPECTED_CONTINUE\") {\n let i3 = 0;\n for (let o5 = offset + 1; o5 < bytes.length; o5++) {\n if (bytes[o5] >> 6 !== 2) {\n break;\n }\n i3++;\n }\n return i3;\n }\n if (reason === \"OVERRUN\") {\n return bytes.length - offset - 1;\n }\n return 0;\n }\n function replaceFunc(reason, offset, bytes, output, badCodepoint) {\n if (reason === \"OVERLONG\") {\n (0, errors_js_1.assertArgument)(typeof badCodepoint === \"number\", \"invalid bad code point for replacement\", \"badCodepoint\", badCodepoint);\n output.push(badCodepoint);\n return 0;\n }\n output.push(65533);\n return ignoreFunc(reason, offset, bytes, output, badCodepoint);\n }\n exports3.Utf8ErrorFuncs = Object.freeze({\n error: errorFunc,\n ignore: ignoreFunc,\n replace: replaceFunc\n });\n function getUtf8CodePoints(_bytes, onError) {\n if (onError == null) {\n onError = exports3.Utf8ErrorFuncs.error;\n }\n const bytes = (0, data_js_1.getBytes)(_bytes, \"bytes\");\n const result = [];\n let i3 = 0;\n while (i3 < bytes.length) {\n const c4 = bytes[i3++];\n if (c4 >> 7 === 0) {\n result.push(c4);\n continue;\n }\n let extraLength = null;\n let overlongMask = null;\n if ((c4 & 224) === 192) {\n extraLength = 1;\n overlongMask = 127;\n } else if ((c4 & 240) === 224) {\n extraLength = 2;\n overlongMask = 2047;\n } else if ((c4 & 248) === 240) {\n extraLength = 3;\n overlongMask = 65535;\n } else {\n if ((c4 & 192) === 128) {\n i3 += onError(\"UNEXPECTED_CONTINUE\", i3 - 1, bytes, result);\n } else {\n i3 += onError(\"BAD_PREFIX\", i3 - 1, bytes, result);\n }\n continue;\n }\n if (i3 - 1 + extraLength >= bytes.length) {\n i3 += onError(\"OVERRUN\", i3 - 1, bytes, result);\n continue;\n }\n let res = c4 & (1 << 8 - extraLength - 1) - 1;\n for (let j2 = 0; j2 < extraLength; j2++) {\n let nextChar = bytes[i3];\n if ((nextChar & 192) != 128) {\n i3 += onError(\"MISSING_CONTINUE\", i3, bytes, result);\n res = null;\n break;\n }\n ;\n res = res << 6 | nextChar & 63;\n i3++;\n }\n if (res === null) {\n continue;\n }\n if (res > 1114111) {\n i3 += onError(\"OUT_OF_RANGE\", i3 - 1 - extraLength, bytes, result, res);\n continue;\n }\n if (res >= 55296 && res <= 57343) {\n i3 += onError(\"UTF16_SURROGATE\", i3 - 1 - extraLength, bytes, result, res);\n continue;\n }\n if (res <= overlongMask) {\n i3 += onError(\"OVERLONG\", i3 - 1 - extraLength, bytes, result, res);\n continue;\n }\n result.push(res);\n }\n return result;\n }\n function toUtf8Bytes(str, form) {\n (0, errors_js_1.assertArgument)(typeof str === \"string\", \"invalid string value\", \"str\", str);\n if (form != null) {\n (0, errors_js_1.assertNormalize)(form);\n str = str.normalize(form);\n }\n let result = [];\n for (let i3 = 0; i3 < str.length; i3++) {\n const c4 = str.charCodeAt(i3);\n if (c4 < 128) {\n result.push(c4);\n } else if (c4 < 2048) {\n result.push(c4 >> 6 | 192);\n result.push(c4 & 63 | 128);\n } else if ((c4 & 64512) == 55296) {\n i3++;\n const c22 = str.charCodeAt(i3);\n (0, errors_js_1.assertArgument)(i3 < str.length && (c22 & 64512) === 56320, \"invalid surrogate pair\", \"str\", str);\n const pair = 65536 + ((c4 & 1023) << 10) + (c22 & 1023);\n result.push(pair >> 18 | 240);\n result.push(pair >> 12 & 63 | 128);\n result.push(pair >> 6 & 63 | 128);\n result.push(pair & 63 | 128);\n } else {\n result.push(c4 >> 12 | 224);\n result.push(c4 >> 6 & 63 | 128);\n result.push(c4 & 63 | 128);\n }\n }\n return new Uint8Array(result);\n }\n exports3.toUtf8Bytes = toUtf8Bytes;\n function _toUtf8String(codePoints) {\n return codePoints.map((codePoint) => {\n if (codePoint <= 65535) {\n return String.fromCharCode(codePoint);\n }\n codePoint -= 65536;\n return String.fromCharCode((codePoint >> 10 & 1023) + 55296, (codePoint & 1023) + 56320);\n }).join(\"\");\n }\n function toUtf8String(bytes, onError) {\n return _toUtf8String(getUtf8CodePoints(bytes, onError));\n }\n exports3.toUtf8String = toUtf8String;\n function toUtf8CodePoints(str, form) {\n return getUtf8CodePoints(toUtf8Bytes(str, form));\n }\n exports3.toUtf8CodePoints = toUtf8CodePoints;\n }\n });\n\n // ../../../node_modules/.pnpm/ethers@6.15.0_bufferutil@4.0.9_utf-8-validate@5.0.10/node_modules/ethers/lib.commonjs/utils/geturl-browser.js\n var require_geturl_browser = __commonJS({\n \"../../../node_modules/.pnpm/ethers@6.15.0_bufferutil@4.0.9_utf-8-validate@5.0.10/node_modules/ethers/lib.commonjs/utils/geturl-browser.js\"(exports3) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n Object.defineProperty(exports3, \"__esModule\", { value: true });\n exports3.getUrl = exports3.createGetUrl = void 0;\n var errors_js_1 = require_errors2();\n function createGetUrl(options) {\n async function getUrl3(req, _signal) {\n (0, errors_js_1.assert)(_signal == null || !_signal.cancelled, \"request cancelled before sending\", \"CANCELLED\");\n const protocol = req.url.split(\":\")[0].toLowerCase();\n (0, errors_js_1.assert)(protocol === \"http\" || protocol === \"https\", `unsupported protocol ${protocol}`, \"UNSUPPORTED_OPERATION\", {\n info: { protocol },\n operation: \"request\"\n });\n (0, errors_js_1.assert)(protocol === \"https\" || !req.credentials || req.allowInsecureAuthentication, \"insecure authorized connections unsupported\", \"UNSUPPORTED_OPERATION\", {\n operation: \"request\"\n });\n let error = null;\n const controller = new AbortController();\n const timer = setTimeout(() => {\n error = (0, errors_js_1.makeError)(\"request timeout\", \"TIMEOUT\");\n controller.abort();\n }, req.timeout);\n if (_signal) {\n _signal.addListener(() => {\n error = (0, errors_js_1.makeError)(\"request cancelled\", \"CANCELLED\");\n controller.abort();\n });\n }\n const init = Object.assign({}, options, {\n method: req.method,\n headers: new Headers(Array.from(req)),\n body: req.body || void 0,\n signal: controller.signal\n });\n let resp;\n try {\n resp = await fetch(req.url, init);\n } catch (_error) {\n clearTimeout(timer);\n if (error) {\n throw error;\n }\n throw _error;\n }\n clearTimeout(timer);\n const headers = {};\n resp.headers.forEach((value, key) => {\n headers[key.toLowerCase()] = value;\n });\n const respBody = await resp.arrayBuffer();\n const body = respBody == null ? null : new Uint8Array(respBody);\n return {\n statusCode: resp.status,\n statusMessage: resp.statusText,\n headers,\n body\n };\n }\n return getUrl3;\n }\n exports3.createGetUrl = createGetUrl;\n var defaultGetUrl = createGetUrl({});\n async function getUrl2(req, _signal) {\n return defaultGetUrl(req, _signal);\n }\n exports3.getUrl = getUrl2;\n }\n });\n\n // ../../../node_modules/.pnpm/ethers@6.15.0_bufferutil@4.0.9_utf-8-validate@5.0.10/node_modules/ethers/lib.commonjs/utils/fetch.js\n var require_fetch = __commonJS({\n \"../../../node_modules/.pnpm/ethers@6.15.0_bufferutil@4.0.9_utf-8-validate@5.0.10/node_modules/ethers/lib.commonjs/utils/fetch.js\"(exports3) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n Object.defineProperty(exports3, \"__esModule\", { value: true });\n exports3.FetchResponse = exports3.FetchRequest = exports3.FetchCancelSignal = void 0;\n var base64_js_1 = require_base64_browser();\n var data_js_1 = require_data();\n var errors_js_1 = require_errors2();\n var properties_js_1 = require_properties();\n var utf8_js_1 = require_utf82();\n var geturl_js_1 = require_geturl_browser();\n var MAX_ATTEMPTS = 12;\n var SLOT_INTERVAL = 250;\n var defaultGetUrlFunc = (0, geturl_js_1.createGetUrl)();\n var reData = new RegExp(\"^data:([^;:]*)?(;base64)?,(.*)$\", \"i\");\n var reIpfs = new RegExp(\"^ipfs://(ipfs/)?(.*)$\", \"i\");\n var locked = false;\n async function dataGatewayFunc(url, signal) {\n try {\n const match = url.match(reData);\n if (!match) {\n throw new Error(\"invalid data\");\n }\n return new FetchResponse(200, \"OK\", {\n \"content-type\": match[1] || \"text/plain\"\n }, match[2] ? (0, base64_js_1.decodeBase64)(match[3]) : unpercent(match[3]));\n } catch (error) {\n return new FetchResponse(599, \"BAD REQUEST (invalid data: URI)\", {}, null, new FetchRequest(url));\n }\n }\n function getIpfsGatewayFunc(baseUrl) {\n async function gatewayIpfs(url, signal) {\n try {\n const match = url.match(reIpfs);\n if (!match) {\n throw new Error(\"invalid link\");\n }\n return new FetchRequest(`${baseUrl}${match[2]}`);\n } catch (error) {\n return new FetchResponse(599, \"BAD REQUEST (invalid IPFS URI)\", {}, null, new FetchRequest(url));\n }\n }\n return gatewayIpfs;\n }\n var Gateways = {\n \"data\": dataGatewayFunc,\n \"ipfs\": getIpfsGatewayFunc(\"https://gateway.ipfs.io/ipfs/\")\n };\n var fetchSignals = /* @__PURE__ */ new WeakMap();\n var FetchCancelSignal = class {\n #listeners;\n #cancelled;\n constructor(request) {\n this.#listeners = [];\n this.#cancelled = false;\n fetchSignals.set(request, () => {\n if (this.#cancelled) {\n return;\n }\n this.#cancelled = true;\n for (const listener of this.#listeners) {\n setTimeout(() => {\n listener();\n }, 0);\n }\n this.#listeners = [];\n });\n }\n addListener(listener) {\n (0, errors_js_1.assert)(!this.#cancelled, \"singal already cancelled\", \"UNSUPPORTED_OPERATION\", {\n operation: \"fetchCancelSignal.addCancelListener\"\n });\n this.#listeners.push(listener);\n }\n get cancelled() {\n return this.#cancelled;\n }\n checkSignal() {\n (0, errors_js_1.assert)(!this.cancelled, \"cancelled\", \"CANCELLED\", {});\n }\n };\n exports3.FetchCancelSignal = FetchCancelSignal;\n function checkSignal(signal) {\n if (signal == null) {\n throw new Error(\"missing signal; should not happen\");\n }\n signal.checkSignal();\n return signal;\n }\n var FetchRequest = class _FetchRequest {\n #allowInsecure;\n #gzip;\n #headers;\n #method;\n #timeout;\n #url;\n #body;\n #bodyType;\n #creds;\n // Hooks\n #preflight;\n #process;\n #retry;\n #signal;\n #throttle;\n #getUrlFunc;\n /**\n * The fetch URL to request.\n */\n get url() {\n return this.#url;\n }\n set url(url) {\n this.#url = String(url);\n }\n /**\n * The fetch body, if any, to send as the request body. //(default: null)//\n *\n * When setting a body, the intrinsic ``Content-Type`` is automatically\n * set and will be used if **not overridden** by setting a custom\n * header.\n *\n * If %%body%% is null, the body is cleared (along with the\n * intrinsic ``Content-Type``).\n *\n * If %%body%% is a string, the intrinsic ``Content-Type`` is set to\n * ``text/plain``.\n *\n * If %%body%% is a Uint8Array, the intrinsic ``Content-Type`` is set to\n * ``application/octet-stream``.\n *\n * If %%body%% is any other object, the intrinsic ``Content-Type`` is\n * set to ``application/json``.\n */\n get body() {\n if (this.#body == null) {\n return null;\n }\n return new Uint8Array(this.#body);\n }\n set body(body) {\n if (body == null) {\n this.#body = void 0;\n this.#bodyType = void 0;\n } else if (typeof body === \"string\") {\n this.#body = (0, utf8_js_1.toUtf8Bytes)(body);\n this.#bodyType = \"text/plain\";\n } else if (body instanceof Uint8Array) {\n this.#body = body;\n this.#bodyType = \"application/octet-stream\";\n } else if (typeof body === \"object\") {\n this.#body = (0, utf8_js_1.toUtf8Bytes)(JSON.stringify(body));\n this.#bodyType = \"application/json\";\n } else {\n throw new Error(\"invalid body\");\n }\n }\n /**\n * Returns true if the request has a body.\n */\n hasBody() {\n return this.#body != null;\n }\n /**\n * The HTTP method to use when requesting the URI. If no method\n * has been explicitly set, then ``GET`` is used if the body is\n * null and ``POST`` otherwise.\n */\n get method() {\n if (this.#method) {\n return this.#method;\n }\n if (this.hasBody()) {\n return \"POST\";\n }\n return \"GET\";\n }\n set method(method) {\n if (method == null) {\n method = \"\";\n }\n this.#method = String(method).toUpperCase();\n }\n /**\n * The headers that will be used when requesting the URI. All\n * keys are lower-case.\n *\n * This object is a copy, so any changes will **NOT** be reflected\n * in the ``FetchRequest``.\n *\n * To set a header entry, use the ``setHeader`` method.\n */\n get headers() {\n const headers = Object.assign({}, this.#headers);\n if (this.#creds) {\n headers[\"authorization\"] = `Basic ${(0, base64_js_1.encodeBase64)((0, utf8_js_1.toUtf8Bytes)(this.#creds))}`;\n }\n ;\n if (this.allowGzip) {\n headers[\"accept-encoding\"] = \"gzip\";\n }\n if (headers[\"content-type\"] == null && this.#bodyType) {\n headers[\"content-type\"] = this.#bodyType;\n }\n if (this.body) {\n headers[\"content-length\"] = String(this.body.length);\n }\n return headers;\n }\n /**\n * Get the header for %%key%%, ignoring case.\n */\n getHeader(key) {\n return this.headers[key.toLowerCase()];\n }\n /**\n * Set the header for %%key%% to %%value%%. All values are coerced\n * to a string.\n */\n setHeader(key, value) {\n this.#headers[String(key).toLowerCase()] = String(value);\n }\n /**\n * Clear all headers, resetting all intrinsic headers.\n */\n clearHeaders() {\n this.#headers = {};\n }\n [Symbol.iterator]() {\n const headers = this.headers;\n const keys = Object.keys(headers);\n let index2 = 0;\n return {\n next: () => {\n if (index2 < keys.length) {\n const key = keys[index2++];\n return {\n value: [key, headers[key]],\n done: false\n };\n }\n return { value: void 0, done: true };\n }\n };\n }\n /**\n * The value that will be sent for the ``Authorization`` header.\n *\n * To set the credentials, use the ``setCredentials`` method.\n */\n get credentials() {\n return this.#creds || null;\n }\n /**\n * Sets an ``Authorization`` for %%username%% with %%password%%.\n */\n setCredentials(username, password) {\n (0, errors_js_1.assertArgument)(!username.match(/:/), \"invalid basic authentication username\", \"username\", \"[REDACTED]\");\n this.#creds = `${username}:${password}`;\n }\n /**\n * Enable and request gzip-encoded responses. The response will\n * automatically be decompressed. //(default: true)//\n */\n get allowGzip() {\n return this.#gzip;\n }\n set allowGzip(value) {\n this.#gzip = !!value;\n }\n /**\n * Allow ``Authentication`` credentials to be sent over insecure\n * channels. //(default: false)//\n */\n get allowInsecureAuthentication() {\n return !!this.#allowInsecure;\n }\n set allowInsecureAuthentication(value) {\n this.#allowInsecure = !!value;\n }\n /**\n * The timeout (in milliseconds) to wait for a complete response.\n * //(default: 5 minutes)//\n */\n get timeout() {\n return this.#timeout;\n }\n set timeout(timeout) {\n (0, errors_js_1.assertArgument)(timeout >= 0, \"timeout must be non-zero\", \"timeout\", timeout);\n this.#timeout = timeout;\n }\n /**\n * This function is called prior to each request, for example\n * during a redirection or retry in case of server throttling.\n *\n * This offers an opportunity to populate headers or update\n * content before sending a request.\n */\n get preflightFunc() {\n return this.#preflight || null;\n }\n set preflightFunc(preflight) {\n this.#preflight = preflight;\n }\n /**\n * This function is called after each response, offering an\n * opportunity to provide client-level throttling or updating\n * response data.\n *\n * Any error thrown in this causes the ``send()`` to throw.\n *\n * To schedule a retry attempt (assuming the maximum retry limit\n * has not been reached), use [[response.throwThrottleError]].\n */\n get processFunc() {\n return this.#process || null;\n }\n set processFunc(process2) {\n this.#process = process2;\n }\n /**\n * This function is called on each retry attempt.\n */\n get retryFunc() {\n return this.#retry || null;\n }\n set retryFunc(retry) {\n this.#retry = retry;\n }\n /**\n * This function is called to fetch content from HTTP and\n * HTTPS URLs and is platform specific (e.g. nodejs vs\n * browsers).\n *\n * This is by default the currently registered global getUrl\n * function, which can be changed using [[registerGetUrl]].\n * If this has been set, setting is to ``null`` will cause\n * this FetchRequest (and any future clones) to revert back to\n * using the currently registered global getUrl function.\n *\n * Setting this is generally not necessary, but may be useful\n * for developers that wish to intercept requests or to\n * configurege a proxy or other agent.\n */\n get getUrlFunc() {\n return this.#getUrlFunc || defaultGetUrlFunc;\n }\n set getUrlFunc(value) {\n this.#getUrlFunc = value;\n }\n /**\n * Create a new FetchRequest instance with default values.\n *\n * Once created, each property may be set before issuing a\n * ``.send()`` to make the request.\n */\n constructor(url) {\n this.#url = String(url);\n this.#allowInsecure = false;\n this.#gzip = true;\n this.#headers = {};\n this.#method = \"\";\n this.#timeout = 3e5;\n this.#throttle = {\n slotInterval: SLOT_INTERVAL,\n maxAttempts: MAX_ATTEMPTS\n };\n this.#getUrlFunc = null;\n }\n toString() {\n return ``;\n }\n /**\n * Update the throttle parameters used to determine maximum\n * attempts and exponential-backoff properties.\n */\n setThrottleParams(params) {\n if (params.slotInterval != null) {\n this.#throttle.slotInterval = params.slotInterval;\n }\n if (params.maxAttempts != null) {\n this.#throttle.maxAttempts = params.maxAttempts;\n }\n }\n async #send(attempt, expires, delay, _request, _response) {\n if (attempt >= this.#throttle.maxAttempts) {\n return _response.makeServerError(\"exceeded maximum retry limit\");\n }\n (0, errors_js_1.assert)(getTime() <= expires, \"timeout\", \"TIMEOUT\", {\n operation: \"request.send\",\n reason: \"timeout\",\n request: _request\n });\n if (delay > 0) {\n await wait2(delay);\n }\n let req = this.clone();\n const scheme = (req.url.split(\":\")[0] || \"\").toLowerCase();\n if (scheme in Gateways) {\n const result = await Gateways[scheme](req.url, checkSignal(_request.#signal));\n if (result instanceof FetchResponse) {\n let response2 = result;\n if (this.processFunc) {\n checkSignal(_request.#signal);\n try {\n response2 = await this.processFunc(req, response2);\n } catch (error) {\n if (error.throttle == null || typeof error.stall !== \"number\") {\n response2.makeServerError(\"error in post-processing function\", error).assertOk();\n }\n }\n }\n return response2;\n }\n req = result;\n }\n if (this.preflightFunc) {\n req = await this.preflightFunc(req);\n }\n const resp = await this.getUrlFunc(req, checkSignal(_request.#signal));\n let response = new FetchResponse(resp.statusCode, resp.statusMessage, resp.headers, resp.body, _request);\n if (response.statusCode === 301 || response.statusCode === 302) {\n try {\n const location = response.headers.location || \"\";\n return req.redirect(location).#send(attempt + 1, expires, 0, _request, response);\n } catch (error) {\n }\n return response;\n } else if (response.statusCode === 429) {\n if (this.retryFunc == null || await this.retryFunc(req, response, attempt)) {\n const retryAfter = response.headers[\"retry-after\"];\n let delay2 = this.#throttle.slotInterval * Math.trunc(Math.random() * Math.pow(2, attempt));\n if (typeof retryAfter === \"string\" && retryAfter.match(/^[1-9][0-9]*$/)) {\n delay2 = parseInt(retryAfter);\n }\n return req.clone().#send(attempt + 1, expires, delay2, _request, response);\n }\n }\n if (this.processFunc) {\n checkSignal(_request.#signal);\n try {\n response = await this.processFunc(req, response);\n } catch (error) {\n if (error.throttle == null || typeof error.stall !== \"number\") {\n response.makeServerError(\"error in post-processing function\", error).assertOk();\n }\n let delay2 = this.#throttle.slotInterval * Math.trunc(Math.random() * Math.pow(2, attempt));\n ;\n if (error.stall >= 0) {\n delay2 = error.stall;\n }\n return req.clone().#send(attempt + 1, expires, delay2, _request, response);\n }\n }\n return response;\n }\n /**\n * Resolves to the response by sending the request.\n */\n send() {\n (0, errors_js_1.assert)(this.#signal == null, \"request already sent\", \"UNSUPPORTED_OPERATION\", { operation: \"fetchRequest.send\" });\n this.#signal = new FetchCancelSignal(this);\n return this.#send(0, getTime() + this.timeout, 0, this, new FetchResponse(0, \"\", {}, null, this));\n }\n /**\n * Cancels the inflight response, causing a ``CANCELLED``\n * error to be rejected from the [[send]].\n */\n cancel() {\n (0, errors_js_1.assert)(this.#signal != null, \"request has not been sent\", \"UNSUPPORTED_OPERATION\", { operation: \"fetchRequest.cancel\" });\n const signal = fetchSignals.get(this);\n if (!signal) {\n throw new Error(\"missing signal; should not happen\");\n }\n signal();\n }\n /**\n * Returns a new [[FetchRequest]] that represents the redirection\n * to %%location%%.\n */\n redirect(location) {\n const current = this.url.split(\":\")[0].toLowerCase();\n const target = location.split(\":\")[0].toLowerCase();\n (0, errors_js_1.assert)(this.method === \"GET\" && (current !== \"https\" || target !== \"http\") && location.match(/^https?:/), `unsupported redirect`, \"UNSUPPORTED_OPERATION\", {\n operation: `redirect(${this.method} ${JSON.stringify(this.url)} => ${JSON.stringify(location)})`\n });\n const req = new _FetchRequest(location);\n req.method = \"GET\";\n req.allowGzip = this.allowGzip;\n req.timeout = this.timeout;\n req.#headers = Object.assign({}, this.#headers);\n if (this.#body) {\n req.#body = new Uint8Array(this.#body);\n }\n req.#bodyType = this.#bodyType;\n return req;\n }\n /**\n * Create a new copy of this request.\n */\n clone() {\n const clone = new _FetchRequest(this.url);\n clone.#method = this.#method;\n if (this.#body) {\n clone.#body = this.#body;\n }\n clone.#bodyType = this.#bodyType;\n clone.#headers = Object.assign({}, this.#headers);\n clone.#creds = this.#creds;\n if (this.allowGzip) {\n clone.allowGzip = true;\n }\n clone.timeout = this.timeout;\n if (this.allowInsecureAuthentication) {\n clone.allowInsecureAuthentication = true;\n }\n clone.#preflight = this.#preflight;\n clone.#process = this.#process;\n clone.#retry = this.#retry;\n clone.#throttle = Object.assign({}, this.#throttle);\n clone.#getUrlFunc = this.#getUrlFunc;\n return clone;\n }\n /**\n * Locks all static configuration for gateways and FetchGetUrlFunc\n * registration.\n */\n static lockConfig() {\n locked = true;\n }\n /**\n * Get the current Gateway function for %%scheme%%.\n */\n static getGateway(scheme) {\n return Gateways[scheme.toLowerCase()] || null;\n }\n /**\n * Use the %%func%% when fetching URIs using %%scheme%%.\n *\n * This method affects all requests globally.\n *\n * If [[lockConfig]] has been called, no change is made and this\n * throws.\n */\n static registerGateway(scheme, func) {\n scheme = scheme.toLowerCase();\n if (scheme === \"http\" || scheme === \"https\") {\n throw new Error(`cannot intercept ${scheme}; use registerGetUrl`);\n }\n if (locked) {\n throw new Error(\"gateways locked\");\n }\n Gateways[scheme] = func;\n }\n /**\n * Use %%getUrl%% when fetching URIs over HTTP and HTTPS requests.\n *\n * This method affects all requests globally.\n *\n * If [[lockConfig]] has been called, no change is made and this\n * throws.\n */\n static registerGetUrl(getUrl2) {\n if (locked) {\n throw new Error(\"gateways locked\");\n }\n defaultGetUrlFunc = getUrl2;\n }\n /**\n * Creates a getUrl function that fetches content from HTTP and\n * HTTPS URLs.\n *\n * The available %%options%% are dependent on the platform\n * implementation of the default getUrl function.\n *\n * This is not generally something that is needed, but is useful\n * when trying to customize simple behaviour when fetching HTTP\n * content.\n */\n static createGetUrlFunc(options) {\n return (0, geturl_js_1.createGetUrl)(options);\n }\n /**\n * Creates a function that can \"fetch\" data URIs.\n *\n * Note that this is automatically done internally to support\n * data URIs, so it is not necessary to register it.\n *\n * This is not generally something that is needed, but may\n * be useful in a wrapper to perfom custom data URI functionality.\n */\n static createDataGateway() {\n return dataGatewayFunc;\n }\n /**\n * Creates a function that will fetch IPFS (unvalidated) from\n * a custom gateway baseUrl.\n *\n * The default IPFS gateway used internally is\n * ``\"https:/\\/gateway.ipfs.io/ipfs/\"``.\n */\n static createIpfsGatewayFunc(baseUrl) {\n return getIpfsGatewayFunc(baseUrl);\n }\n };\n exports3.FetchRequest = FetchRequest;\n var FetchResponse = class _FetchResponse {\n #statusCode;\n #statusMessage;\n #headers;\n #body;\n #request;\n #error;\n toString() {\n return ``;\n }\n /**\n * The response status code.\n */\n get statusCode() {\n return this.#statusCode;\n }\n /**\n * The response status message.\n */\n get statusMessage() {\n return this.#statusMessage;\n }\n /**\n * The response headers. All keys are lower-case.\n */\n get headers() {\n return Object.assign({}, this.#headers);\n }\n /**\n * The response body, or ``null`` if there was no body.\n */\n get body() {\n return this.#body == null ? null : new Uint8Array(this.#body);\n }\n /**\n * The response body as a UTF-8 encoded string, or the empty\n * string (i.e. ``\"\"``) if there was no body.\n *\n * An error is thrown if the body is invalid UTF-8 data.\n */\n get bodyText() {\n try {\n return this.#body == null ? \"\" : (0, utf8_js_1.toUtf8String)(this.#body);\n } catch (error) {\n (0, errors_js_1.assert)(false, \"response body is not valid UTF-8 data\", \"UNSUPPORTED_OPERATION\", {\n operation: \"bodyText\",\n info: { response: this }\n });\n }\n }\n /**\n * The response body, decoded as JSON.\n *\n * An error is thrown if the body is invalid JSON-encoded data\n * or if there was no body.\n */\n get bodyJson() {\n try {\n return JSON.parse(this.bodyText);\n } catch (error) {\n (0, errors_js_1.assert)(false, \"response body is not valid JSON\", \"UNSUPPORTED_OPERATION\", {\n operation: \"bodyJson\",\n info: { response: this }\n });\n }\n }\n [Symbol.iterator]() {\n const headers = this.headers;\n const keys = Object.keys(headers);\n let index2 = 0;\n return {\n next: () => {\n if (index2 < keys.length) {\n const key = keys[index2++];\n return {\n value: [key, headers[key]],\n done: false\n };\n }\n return { value: void 0, done: true };\n }\n };\n }\n constructor(statusCode, statusMessage, headers, body, request) {\n this.#statusCode = statusCode;\n this.#statusMessage = statusMessage;\n this.#headers = Object.keys(headers).reduce((accum, k4) => {\n accum[k4.toLowerCase()] = String(headers[k4]);\n return accum;\n }, {});\n this.#body = body == null ? null : new Uint8Array(body);\n this.#request = request || null;\n this.#error = { message: \"\" };\n }\n /**\n * Return a Response with matching headers and body, but with\n * an error status code (i.e. 599) and %%message%% with an\n * optional %%error%%.\n */\n makeServerError(message, error) {\n let statusMessage;\n if (!message) {\n message = `${this.statusCode} ${this.statusMessage}`;\n statusMessage = `CLIENT ESCALATED SERVER ERROR (${message})`;\n } else {\n statusMessage = `CLIENT ESCALATED SERVER ERROR (${this.statusCode} ${this.statusMessage}; ${message})`;\n }\n const response = new _FetchResponse(599, statusMessage, this.headers, this.body, this.#request || void 0);\n response.#error = { message, error };\n return response;\n }\n /**\n * If called within a [request.processFunc](FetchRequest-processFunc)\n * call, causes the request to retry as if throttled for %%stall%%\n * milliseconds.\n */\n throwThrottleError(message, stall) {\n if (stall == null) {\n stall = -1;\n } else {\n (0, errors_js_1.assertArgument)(Number.isInteger(stall) && stall >= 0, \"invalid stall timeout\", \"stall\", stall);\n }\n const error = new Error(message || \"throttling requests\");\n (0, properties_js_1.defineProperties)(error, { stall, throttle: true });\n throw error;\n }\n /**\n * Get the header value for %%key%%, ignoring case.\n */\n getHeader(key) {\n return this.headers[key.toLowerCase()];\n }\n /**\n * Returns true if the response has a body.\n */\n hasBody() {\n return this.#body != null;\n }\n /**\n * The request made for this response.\n */\n get request() {\n return this.#request;\n }\n /**\n * Returns true if this response was a success statusCode.\n */\n ok() {\n return this.#error.message === \"\" && this.statusCode >= 200 && this.statusCode < 300;\n }\n /**\n * Throws a ``SERVER_ERROR`` if this response is not ok.\n */\n assertOk() {\n if (this.ok()) {\n return;\n }\n let { message, error } = this.#error;\n if (message === \"\") {\n message = `server response ${this.statusCode} ${this.statusMessage}`;\n }\n let requestUrl = null;\n if (this.request) {\n requestUrl = this.request.url;\n }\n let responseBody = null;\n try {\n if (this.#body) {\n responseBody = (0, utf8_js_1.toUtf8String)(this.#body);\n }\n } catch (e3) {\n }\n (0, errors_js_1.assert)(false, message, \"SERVER_ERROR\", {\n request: this.request || \"unknown request\",\n response: this,\n error,\n info: {\n requestUrl,\n responseBody,\n responseStatus: `${this.statusCode} ${this.statusMessage}`\n }\n });\n }\n };\n exports3.FetchResponse = FetchResponse;\n function getTime() {\n return (/* @__PURE__ */ new Date()).getTime();\n }\n function unpercent(value) {\n return (0, utf8_js_1.toUtf8Bytes)(value.replace(/%([0-9a-f][0-9a-f])/gi, (all, code) => {\n return String.fromCharCode(parseInt(code, 16));\n }));\n }\n function wait2(delay) {\n return new Promise((resolve) => setTimeout(resolve, delay));\n }\n }\n });\n\n // ../../../node_modules/.pnpm/ethers@6.15.0_bufferutil@4.0.9_utf-8-validate@5.0.10/node_modules/ethers/lib.commonjs/utils/fixednumber.js\n var require_fixednumber2 = __commonJS({\n \"../../../node_modules/.pnpm/ethers@6.15.0_bufferutil@4.0.9_utf-8-validate@5.0.10/node_modules/ethers/lib.commonjs/utils/fixednumber.js\"(exports3) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n Object.defineProperty(exports3, \"__esModule\", { value: true });\n exports3.FixedNumber = void 0;\n var data_js_1 = require_data();\n var errors_js_1 = require_errors2();\n var maths_js_1 = require_maths();\n var properties_js_1 = require_properties();\n var BN_N1 = BigInt(-1);\n var BN_0 = BigInt(0);\n var BN_1 = BigInt(1);\n var BN_5 = BigInt(5);\n var _guard = {};\n var Zeros = \"0000\";\n while (Zeros.length < 80) {\n Zeros += Zeros;\n }\n function getTens(decimals) {\n let result = Zeros;\n while (result.length < decimals) {\n result += result;\n }\n return BigInt(\"1\" + result.substring(0, decimals));\n }\n function checkValue(val, format, safeOp) {\n const width = BigInt(format.width);\n if (format.signed) {\n const limit = BN_1 << width - BN_1;\n (0, errors_js_1.assert)(safeOp == null || val >= -limit && val < limit, \"overflow\", \"NUMERIC_FAULT\", {\n operation: safeOp,\n fault: \"overflow\",\n value: val\n });\n if (val > BN_0) {\n val = (0, maths_js_1.fromTwos)((0, maths_js_1.mask)(val, width), width);\n } else {\n val = -(0, maths_js_1.fromTwos)((0, maths_js_1.mask)(-val, width), width);\n }\n } else {\n const limit = BN_1 << width;\n (0, errors_js_1.assert)(safeOp == null || val >= 0 && val < limit, \"overflow\", \"NUMERIC_FAULT\", {\n operation: safeOp,\n fault: \"overflow\",\n value: val\n });\n val = (val % limit + limit) % limit & limit - BN_1;\n }\n return val;\n }\n function getFormat(value) {\n if (typeof value === \"number\") {\n value = `fixed128x${value}`;\n }\n let signed = true;\n let width = 128;\n let decimals = 18;\n if (typeof value === \"string\") {\n if (value === \"fixed\") {\n } else if (value === \"ufixed\") {\n signed = false;\n } else {\n const match = value.match(/^(u?)fixed([0-9]+)x([0-9]+)$/);\n (0, errors_js_1.assertArgument)(match, \"invalid fixed format\", \"format\", value);\n signed = match[1] !== \"u\";\n width = parseInt(match[2]);\n decimals = parseInt(match[3]);\n }\n } else if (value) {\n const v2 = value;\n const check = (key, type, defaultValue) => {\n if (v2[key] == null) {\n return defaultValue;\n }\n (0, errors_js_1.assertArgument)(typeof v2[key] === type, \"invalid fixed format (\" + key + \" not \" + type + \")\", \"format.\" + key, v2[key]);\n return v2[key];\n };\n signed = check(\"signed\", \"boolean\", signed);\n width = check(\"width\", \"number\", width);\n decimals = check(\"decimals\", \"number\", decimals);\n }\n (0, errors_js_1.assertArgument)(width % 8 === 0, \"invalid FixedNumber width (not byte aligned)\", \"format.width\", width);\n (0, errors_js_1.assertArgument)(decimals <= 80, \"invalid FixedNumber decimals (too large)\", \"format.decimals\", decimals);\n const name = (signed ? \"\" : \"u\") + \"fixed\" + String(width) + \"x\" + String(decimals);\n return { signed, width, decimals, name };\n }\n function toString2(val, decimals) {\n let negative = \"\";\n if (val < BN_0) {\n negative = \"-\";\n val *= BN_N1;\n }\n let str = val.toString();\n if (decimals === 0) {\n return negative + str;\n }\n while (str.length <= decimals) {\n str = Zeros + str;\n }\n const index2 = str.length - decimals;\n str = str.substring(0, index2) + \".\" + str.substring(index2);\n while (str[0] === \"0\" && str[1] !== \".\") {\n str = str.substring(1);\n }\n while (str[str.length - 1] === \"0\" && str[str.length - 2] !== \".\") {\n str = str.substring(0, str.length - 1);\n }\n return negative + str;\n }\n var FixedNumber = class _FixedNumber {\n /**\n * The specific fixed-point arithmetic field for this value.\n */\n format;\n #format;\n // The actual value (accounting for decimals)\n #val;\n // A base-10 value to multiple values by to maintain the magnitude\n #tens;\n /**\n * This is a property so console.log shows a human-meaningful value.\n *\n * @private\n */\n _value;\n // Use this when changing this file to get some typing info,\n // but then switch to any to mask the internal type\n //constructor(guard: any, value: bigint, format: _FixedFormat) {\n /**\n * @private\n */\n constructor(guard, value, format) {\n (0, errors_js_1.assertPrivate)(guard, _guard, \"FixedNumber\");\n this.#val = value;\n this.#format = format;\n const _value = toString2(value, format.decimals);\n (0, properties_js_1.defineProperties)(this, { format: format.name, _value });\n this.#tens = getTens(format.decimals);\n }\n /**\n * If true, negative values are permitted, otherwise only\n * positive values and zero are allowed.\n */\n get signed() {\n return this.#format.signed;\n }\n /**\n * The number of bits available to store the value.\n */\n get width() {\n return this.#format.width;\n }\n /**\n * The number of decimal places in the fixed-point arithment field.\n */\n get decimals() {\n return this.#format.decimals;\n }\n /**\n * The value as an integer, based on the smallest unit the\n * [[decimals]] allow.\n */\n get value() {\n return this.#val;\n }\n #checkFormat(other) {\n (0, errors_js_1.assertArgument)(this.format === other.format, \"incompatible format; use fixedNumber.toFormat\", \"other\", other);\n }\n #checkValue(val, safeOp) {\n val = checkValue(val, this.#format, safeOp);\n return new _FixedNumber(_guard, val, this.#format);\n }\n #add(o5, safeOp) {\n this.#checkFormat(o5);\n return this.#checkValue(this.#val + o5.#val, safeOp);\n }\n /**\n * Returns a new [[FixedNumber]] with the result of %%this%% added\n * to %%other%%, ignoring overflow.\n */\n addUnsafe(other) {\n return this.#add(other);\n }\n /**\n * Returns a new [[FixedNumber]] with the result of %%this%% added\n * to %%other%%. A [[NumericFaultError]] is thrown if overflow\n * occurs.\n */\n add(other) {\n return this.#add(other, \"add\");\n }\n #sub(o5, safeOp) {\n this.#checkFormat(o5);\n return this.#checkValue(this.#val - o5.#val, safeOp);\n }\n /**\n * Returns a new [[FixedNumber]] with the result of %%other%% subtracted\n * from %%this%%, ignoring overflow.\n */\n subUnsafe(other) {\n return this.#sub(other);\n }\n /**\n * Returns a new [[FixedNumber]] with the result of %%other%% subtracted\n * from %%this%%. A [[NumericFaultError]] is thrown if overflow\n * occurs.\n */\n sub(other) {\n return this.#sub(other, \"sub\");\n }\n #mul(o5, safeOp) {\n this.#checkFormat(o5);\n return this.#checkValue(this.#val * o5.#val / this.#tens, safeOp);\n }\n /**\n * Returns a new [[FixedNumber]] with the result of %%this%% multiplied\n * by %%other%%, ignoring overflow and underflow (precision loss).\n */\n mulUnsafe(other) {\n return this.#mul(other);\n }\n /**\n * Returns a new [[FixedNumber]] with the result of %%this%% multiplied\n * by %%other%%. A [[NumericFaultError]] is thrown if overflow\n * occurs.\n */\n mul(other) {\n return this.#mul(other, \"mul\");\n }\n /**\n * Returns a new [[FixedNumber]] with the result of %%this%% multiplied\n * by %%other%%. A [[NumericFaultError]] is thrown if overflow\n * occurs or if underflow (precision loss) occurs.\n */\n mulSignal(other) {\n this.#checkFormat(other);\n const value = this.#val * other.#val;\n (0, errors_js_1.assert)(value % this.#tens === BN_0, \"precision lost during signalling mul\", \"NUMERIC_FAULT\", {\n operation: \"mulSignal\",\n fault: \"underflow\",\n value: this\n });\n return this.#checkValue(value / this.#tens, \"mulSignal\");\n }\n #div(o5, safeOp) {\n (0, errors_js_1.assert)(o5.#val !== BN_0, \"division by zero\", \"NUMERIC_FAULT\", {\n operation: \"div\",\n fault: \"divide-by-zero\",\n value: this\n });\n this.#checkFormat(o5);\n return this.#checkValue(this.#val * this.#tens / o5.#val, safeOp);\n }\n /**\n * Returns a new [[FixedNumber]] with the result of %%this%% divided\n * by %%other%%, ignoring underflow (precision loss). A\n * [[NumericFaultError]] is thrown if overflow occurs.\n */\n divUnsafe(other) {\n return this.#div(other);\n }\n /**\n * Returns a new [[FixedNumber]] with the result of %%this%% divided\n * by %%other%%, ignoring underflow (precision loss). A\n * [[NumericFaultError]] is thrown if overflow occurs.\n */\n div(other) {\n return this.#div(other, \"div\");\n }\n /**\n * Returns a new [[FixedNumber]] with the result of %%this%% divided\n * by %%other%%. A [[NumericFaultError]] is thrown if underflow\n * (precision loss) occurs.\n */\n divSignal(other) {\n (0, errors_js_1.assert)(other.#val !== BN_0, \"division by zero\", \"NUMERIC_FAULT\", {\n operation: \"div\",\n fault: \"divide-by-zero\",\n value: this\n });\n this.#checkFormat(other);\n const value = this.#val * this.#tens;\n (0, errors_js_1.assert)(value % other.#val === BN_0, \"precision lost during signalling div\", \"NUMERIC_FAULT\", {\n operation: \"divSignal\",\n fault: \"underflow\",\n value: this\n });\n return this.#checkValue(value / other.#val, \"divSignal\");\n }\n /**\n * Returns a comparison result between %%this%% and %%other%%.\n *\n * This is suitable for use in sorting, where ``-1`` implies %%this%%\n * is smaller, ``1`` implies %%this%% is larger and ``0`` implies\n * both are equal.\n */\n cmp(other) {\n let a3 = this.value, b4 = other.value;\n const delta = this.decimals - other.decimals;\n if (delta > 0) {\n b4 *= getTens(delta);\n } else if (delta < 0) {\n a3 *= getTens(-delta);\n }\n if (a3 < b4) {\n return -1;\n }\n if (a3 > b4) {\n return 1;\n }\n return 0;\n }\n /**\n * Returns true if %%other%% is equal to %%this%%.\n */\n eq(other) {\n return this.cmp(other) === 0;\n }\n /**\n * Returns true if %%other%% is less than to %%this%%.\n */\n lt(other) {\n return this.cmp(other) < 0;\n }\n /**\n * Returns true if %%other%% is less than or equal to %%this%%.\n */\n lte(other) {\n return this.cmp(other) <= 0;\n }\n /**\n * Returns true if %%other%% is greater than to %%this%%.\n */\n gt(other) {\n return this.cmp(other) > 0;\n }\n /**\n * Returns true if %%other%% is greater than or equal to %%this%%.\n */\n gte(other) {\n return this.cmp(other) >= 0;\n }\n /**\n * Returns a new [[FixedNumber]] which is the largest **integer**\n * that is less than or equal to %%this%%.\n *\n * The decimal component of the result will always be ``0``.\n */\n floor() {\n let val = this.#val;\n if (this.#val < BN_0) {\n val -= this.#tens - BN_1;\n }\n val = this.#val / this.#tens * this.#tens;\n return this.#checkValue(val, \"floor\");\n }\n /**\n * Returns a new [[FixedNumber]] which is the smallest **integer**\n * that is greater than or equal to %%this%%.\n *\n * The decimal component of the result will always be ``0``.\n */\n ceiling() {\n let val = this.#val;\n if (this.#val > BN_0) {\n val += this.#tens - BN_1;\n }\n val = this.#val / this.#tens * this.#tens;\n return this.#checkValue(val, \"ceiling\");\n }\n /**\n * Returns a new [[FixedNumber]] with the decimal component\n * rounded up on ties at %%decimals%% places.\n */\n round(decimals) {\n if (decimals == null) {\n decimals = 0;\n }\n if (decimals >= this.decimals) {\n return this;\n }\n const delta = this.decimals - decimals;\n const bump = BN_5 * getTens(delta - 1);\n let value = this.value + bump;\n const tens = getTens(delta);\n value = value / tens * tens;\n checkValue(value, this.#format, \"round\");\n return new _FixedNumber(_guard, value, this.#format);\n }\n /**\n * Returns true if %%this%% is equal to ``0``.\n */\n isZero() {\n return this.#val === BN_0;\n }\n /**\n * Returns true if %%this%% is less than ``0``.\n */\n isNegative() {\n return this.#val < BN_0;\n }\n /**\n * Returns the string representation of %%this%%.\n */\n toString() {\n return this._value;\n }\n /**\n * Returns a float approximation.\n *\n * Due to IEEE 754 precission (or lack thereof), this function\n * can only return an approximation and most values will contain\n * rounding errors.\n */\n toUnsafeFloat() {\n return parseFloat(this.toString());\n }\n /**\n * Return a new [[FixedNumber]] with the same value but has had\n * its field set to %%format%%.\n *\n * This will throw if the value cannot fit into %%format%%.\n */\n toFormat(format) {\n return _FixedNumber.fromString(this.toString(), format);\n }\n /**\n * Creates a new [[FixedNumber]] for %%value%% divided by\n * %%decimal%% places with %%format%%.\n *\n * This will throw a [[NumericFaultError]] if %%value%% (once adjusted\n * for %%decimals%%) cannot fit in %%format%%, either due to overflow\n * or underflow (precision loss).\n */\n static fromValue(_value, _decimals, _format) {\n const decimals = _decimals == null ? 0 : (0, maths_js_1.getNumber)(_decimals);\n const format = getFormat(_format);\n let value = (0, maths_js_1.getBigInt)(_value, \"value\");\n const delta = decimals - format.decimals;\n if (delta > 0) {\n const tens = getTens(delta);\n (0, errors_js_1.assert)(value % tens === BN_0, \"value loses precision for format\", \"NUMERIC_FAULT\", {\n operation: \"fromValue\",\n fault: \"underflow\",\n value: _value\n });\n value /= tens;\n } else if (delta < 0) {\n value *= getTens(-delta);\n }\n checkValue(value, format, \"fromValue\");\n return new _FixedNumber(_guard, value, format);\n }\n /**\n * Creates a new [[FixedNumber]] for %%value%% with %%format%%.\n *\n * This will throw a [[NumericFaultError]] if %%value%% cannot fit\n * in %%format%%, either due to overflow or underflow (precision loss).\n */\n static fromString(_value, _format) {\n const match = _value.match(/^(-?)([0-9]*)\\.?([0-9]*)$/);\n (0, errors_js_1.assertArgument)(match && match[2].length + match[3].length > 0, \"invalid FixedNumber string value\", \"value\", _value);\n const format = getFormat(_format);\n let whole = match[2] || \"0\", decimal = match[3] || \"\";\n while (decimal.length < format.decimals) {\n decimal += Zeros;\n }\n (0, errors_js_1.assert)(decimal.substring(format.decimals).match(/^0*$/), \"too many decimals for format\", \"NUMERIC_FAULT\", {\n operation: \"fromString\",\n fault: \"underflow\",\n value: _value\n });\n decimal = decimal.substring(0, format.decimals);\n const value = BigInt(match[1] + whole + decimal);\n checkValue(value, format, \"fromString\");\n return new _FixedNumber(_guard, value, format);\n }\n /**\n * Creates a new [[FixedNumber]] with the big-endian representation\n * %%value%% with %%format%%.\n *\n * This will throw a [[NumericFaultError]] if %%value%% cannot fit\n * in %%format%% due to overflow.\n */\n static fromBytes(_value, _format) {\n let value = (0, maths_js_1.toBigInt)((0, data_js_1.getBytes)(_value, \"value\"));\n const format = getFormat(_format);\n if (format.signed) {\n value = (0, maths_js_1.fromTwos)(value, format.width);\n }\n checkValue(value, format, \"fromBytes\");\n return new _FixedNumber(_guard, value, format);\n }\n };\n exports3.FixedNumber = FixedNumber;\n }\n });\n\n // ../../../node_modules/.pnpm/ethers@6.15.0_bufferutil@4.0.9_utf-8-validate@5.0.10/node_modules/ethers/lib.commonjs/utils/rlp-decode.js\n var require_rlp_decode = __commonJS({\n \"../../../node_modules/.pnpm/ethers@6.15.0_bufferutil@4.0.9_utf-8-validate@5.0.10/node_modules/ethers/lib.commonjs/utils/rlp-decode.js\"(exports3) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n Object.defineProperty(exports3, \"__esModule\", { value: true });\n exports3.decodeRlp = void 0;\n var data_js_1 = require_data();\n var errors_js_1 = require_errors2();\n var data_js_2 = require_data();\n function hexlifyByte(value) {\n let result = value.toString(16);\n while (result.length < 2) {\n result = \"0\" + result;\n }\n return \"0x\" + result;\n }\n function unarrayifyInteger(data, offset, length2) {\n let result = 0;\n for (let i3 = 0; i3 < length2; i3++) {\n result = result * 256 + data[offset + i3];\n }\n return result;\n }\n function _decodeChildren(data, offset, childOffset, length2) {\n const result = [];\n while (childOffset < offset + 1 + length2) {\n const decoded = _decode(data, childOffset);\n result.push(decoded.result);\n childOffset += decoded.consumed;\n (0, errors_js_1.assert)(childOffset <= offset + 1 + length2, \"child data too short\", \"BUFFER_OVERRUN\", {\n buffer: data,\n length: length2,\n offset\n });\n }\n return { consumed: 1 + length2, result };\n }\n function _decode(data, offset) {\n (0, errors_js_1.assert)(data.length !== 0, \"data too short\", \"BUFFER_OVERRUN\", {\n buffer: data,\n length: 0,\n offset: 1\n });\n const checkOffset = (offset2) => {\n (0, errors_js_1.assert)(offset2 <= data.length, \"data short segment too short\", \"BUFFER_OVERRUN\", {\n buffer: data,\n length: data.length,\n offset: offset2\n });\n };\n if (data[offset] >= 248) {\n const lengthLength = data[offset] - 247;\n checkOffset(offset + 1 + lengthLength);\n const length2 = unarrayifyInteger(data, offset + 1, lengthLength);\n checkOffset(offset + 1 + lengthLength + length2);\n return _decodeChildren(data, offset, offset + 1 + lengthLength, lengthLength + length2);\n } else if (data[offset] >= 192) {\n const length2 = data[offset] - 192;\n checkOffset(offset + 1 + length2);\n return _decodeChildren(data, offset, offset + 1, length2);\n } else if (data[offset] >= 184) {\n const lengthLength = data[offset] - 183;\n checkOffset(offset + 1 + lengthLength);\n const length2 = unarrayifyInteger(data, offset + 1, lengthLength);\n checkOffset(offset + 1 + lengthLength + length2);\n const result = (0, data_js_1.hexlify)(data.slice(offset + 1 + lengthLength, offset + 1 + lengthLength + length2));\n return { consumed: 1 + lengthLength + length2, result };\n } else if (data[offset] >= 128) {\n const length2 = data[offset] - 128;\n checkOffset(offset + 1 + length2);\n const result = (0, data_js_1.hexlify)(data.slice(offset + 1, offset + 1 + length2));\n return { consumed: 1 + length2, result };\n }\n return { consumed: 1, result: hexlifyByte(data[offset]) };\n }\n function decodeRlp(_data) {\n const data = (0, data_js_2.getBytes)(_data, \"data\");\n const decoded = _decode(data, 0);\n (0, errors_js_1.assertArgument)(decoded.consumed === data.length, \"unexpected junk after rlp payload\", \"data\", _data);\n return decoded.result;\n }\n exports3.decodeRlp = decodeRlp;\n }\n });\n\n // ../../../node_modules/.pnpm/ethers@6.15.0_bufferutil@4.0.9_utf-8-validate@5.0.10/node_modules/ethers/lib.commonjs/utils/rlp-encode.js\n var require_rlp_encode = __commonJS({\n \"../../../node_modules/.pnpm/ethers@6.15.0_bufferutil@4.0.9_utf-8-validate@5.0.10/node_modules/ethers/lib.commonjs/utils/rlp-encode.js\"(exports3) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n Object.defineProperty(exports3, \"__esModule\", { value: true });\n exports3.encodeRlp = void 0;\n var data_js_1 = require_data();\n function arrayifyInteger(value) {\n const result = [];\n while (value) {\n result.unshift(value & 255);\n value >>= 8;\n }\n return result;\n }\n function _encode(object2) {\n if (Array.isArray(object2)) {\n let payload = [];\n object2.forEach(function(child) {\n payload = payload.concat(_encode(child));\n });\n if (payload.length <= 55) {\n payload.unshift(192 + payload.length);\n return payload;\n }\n const length3 = arrayifyInteger(payload.length);\n length3.unshift(247 + length3.length);\n return length3.concat(payload);\n }\n const data = Array.prototype.slice.call((0, data_js_1.getBytes)(object2, \"object\"));\n if (data.length === 1 && data[0] <= 127) {\n return data;\n } else if (data.length <= 55) {\n data.unshift(128 + data.length);\n return data;\n }\n const length2 = arrayifyInteger(data.length);\n length2.unshift(183 + length2.length);\n return length2.concat(data);\n }\n var nibbles = \"0123456789abcdef\";\n function encodeRlp(object2) {\n let result = \"0x\";\n for (const v2 of _encode(object2)) {\n result += nibbles[v2 >> 4];\n result += nibbles[v2 & 15];\n }\n return result;\n }\n exports3.encodeRlp = encodeRlp;\n }\n });\n\n // ../../../node_modules/.pnpm/ethers@6.15.0_bufferutil@4.0.9_utf-8-validate@5.0.10/node_modules/ethers/lib.commonjs/utils/units.js\n var require_units = __commonJS({\n \"../../../node_modules/.pnpm/ethers@6.15.0_bufferutil@4.0.9_utf-8-validate@5.0.10/node_modules/ethers/lib.commonjs/utils/units.js\"(exports3) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n Object.defineProperty(exports3, \"__esModule\", { value: true });\n exports3.parseEther = exports3.formatEther = exports3.parseUnits = exports3.formatUnits = void 0;\n var errors_js_1 = require_errors2();\n var fixednumber_js_1 = require_fixednumber2();\n var maths_js_1 = require_maths();\n var names = [\n \"wei\",\n \"kwei\",\n \"mwei\",\n \"gwei\",\n \"szabo\",\n \"finney\",\n \"ether\"\n ];\n function formatUnits2(value, unit) {\n let decimals = 18;\n if (typeof unit === \"string\") {\n const index2 = names.indexOf(unit);\n (0, errors_js_1.assertArgument)(index2 >= 0, \"invalid unit\", \"unit\", unit);\n decimals = 3 * index2;\n } else if (unit != null) {\n decimals = (0, maths_js_1.getNumber)(unit, \"unit\");\n }\n return fixednumber_js_1.FixedNumber.fromValue(value, decimals, { decimals, width: 512 }).toString();\n }\n exports3.formatUnits = formatUnits2;\n function parseUnits(value, unit) {\n (0, errors_js_1.assertArgument)(typeof value === \"string\", \"value must be a string\", \"value\", value);\n let decimals = 18;\n if (typeof unit === \"string\") {\n const index2 = names.indexOf(unit);\n (0, errors_js_1.assertArgument)(index2 >= 0, \"invalid unit\", \"unit\", unit);\n decimals = 3 * index2;\n } else if (unit != null) {\n decimals = (0, maths_js_1.getNumber)(unit, \"unit\");\n }\n return fixednumber_js_1.FixedNumber.fromString(value, { decimals, width: 512 }).value;\n }\n exports3.parseUnits = parseUnits;\n function formatEther2(wei) {\n return formatUnits2(wei, 18);\n }\n exports3.formatEther = formatEther2;\n function parseEther(ether) {\n return parseUnits(ether, 18);\n }\n exports3.parseEther = parseEther;\n }\n });\n\n // ../../../node_modules/.pnpm/ethers@6.15.0_bufferutil@4.0.9_utf-8-validate@5.0.10/node_modules/ethers/lib.commonjs/utils/uuid.js\n var require_uuid = __commonJS({\n \"../../../node_modules/.pnpm/ethers@6.15.0_bufferutil@4.0.9_utf-8-validate@5.0.10/node_modules/ethers/lib.commonjs/utils/uuid.js\"(exports3) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n Object.defineProperty(exports3, \"__esModule\", { value: true });\n exports3.uuidV4 = void 0;\n var data_js_1 = require_data();\n function uuidV4(randomBytes2) {\n const bytes = (0, data_js_1.getBytes)(randomBytes2, \"randomBytes\");\n bytes[6] = bytes[6] & 15 | 64;\n bytes[8] = bytes[8] & 63 | 128;\n const value = (0, data_js_1.hexlify)(bytes);\n return [\n value.substring(2, 10),\n value.substring(10, 14),\n value.substring(14, 18),\n value.substring(18, 22),\n value.substring(22, 34)\n ].join(\"-\");\n }\n exports3.uuidV4 = uuidV4;\n }\n });\n\n // ../../../node_modules/.pnpm/ethers@6.15.0_bufferutil@4.0.9_utf-8-validate@5.0.10/node_modules/ethers/lib.commonjs/utils/index.js\n var require_utils8 = __commonJS({\n \"../../../node_modules/.pnpm/ethers@6.15.0_bufferutil@4.0.9_utf-8-validate@5.0.10/node_modules/ethers/lib.commonjs/utils/index.js\"(exports3) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n Object.defineProperty(exports3, \"__esModule\", { value: true });\n exports3.toUtf8String = exports3.toUtf8CodePoints = exports3.toUtf8Bytes = exports3.parseUnits = exports3.formatUnits = exports3.parseEther = exports3.formatEther = exports3.encodeRlp = exports3.decodeRlp = exports3.defineProperties = exports3.resolveProperties = exports3.toQuantity = exports3.toBeArray = exports3.toBeHex = exports3.toNumber = exports3.toBigInt = exports3.getUint = exports3.getNumber = exports3.getBigInt = exports3.mask = exports3.toTwos = exports3.fromTwos = exports3.FixedNumber = exports3.FetchCancelSignal = exports3.FetchResponse = exports3.FetchRequest = exports3.EventPayload = exports3.makeError = exports3.assertNormalize = exports3.assertPrivate = exports3.assertArgumentCount = exports3.assertArgument = exports3.assert = exports3.isError = exports3.isCallException = exports3.zeroPadBytes = exports3.zeroPadValue = exports3.stripZerosLeft = exports3.dataSlice = exports3.dataLength = exports3.concat = exports3.hexlify = exports3.isBytesLike = exports3.isHexString = exports3.getBytesCopy = exports3.getBytes = exports3.encodeBase64 = exports3.decodeBase64 = exports3.encodeBase58 = exports3.decodeBase58 = void 0;\n exports3.uuidV4 = exports3.Utf8ErrorFuncs = void 0;\n var base58_js_1 = require_base58();\n Object.defineProperty(exports3, \"decodeBase58\", { enumerable: true, get: function() {\n return base58_js_1.decodeBase58;\n } });\n Object.defineProperty(exports3, \"encodeBase58\", { enumerable: true, get: function() {\n return base58_js_1.encodeBase58;\n } });\n var base64_js_1 = require_base64_browser();\n Object.defineProperty(exports3, \"decodeBase64\", { enumerable: true, get: function() {\n return base64_js_1.decodeBase64;\n } });\n Object.defineProperty(exports3, \"encodeBase64\", { enumerable: true, get: function() {\n return base64_js_1.encodeBase64;\n } });\n var data_js_1 = require_data();\n Object.defineProperty(exports3, \"getBytes\", { enumerable: true, get: function() {\n return data_js_1.getBytes;\n } });\n Object.defineProperty(exports3, \"getBytesCopy\", { enumerable: true, get: function() {\n return data_js_1.getBytesCopy;\n } });\n Object.defineProperty(exports3, \"isHexString\", { enumerable: true, get: function() {\n return data_js_1.isHexString;\n } });\n Object.defineProperty(exports3, \"isBytesLike\", { enumerable: true, get: function() {\n return data_js_1.isBytesLike;\n } });\n Object.defineProperty(exports3, \"hexlify\", { enumerable: true, get: function() {\n return data_js_1.hexlify;\n } });\n Object.defineProperty(exports3, \"concat\", { enumerable: true, get: function() {\n return data_js_1.concat;\n } });\n Object.defineProperty(exports3, \"dataLength\", { enumerable: true, get: function() {\n return data_js_1.dataLength;\n } });\n Object.defineProperty(exports3, \"dataSlice\", { enumerable: true, get: function() {\n return data_js_1.dataSlice;\n } });\n Object.defineProperty(exports3, \"stripZerosLeft\", { enumerable: true, get: function() {\n return data_js_1.stripZerosLeft;\n } });\n Object.defineProperty(exports3, \"zeroPadValue\", { enumerable: true, get: function() {\n return data_js_1.zeroPadValue;\n } });\n Object.defineProperty(exports3, \"zeroPadBytes\", { enumerable: true, get: function() {\n return data_js_1.zeroPadBytes;\n } });\n var errors_js_1 = require_errors2();\n Object.defineProperty(exports3, \"isCallException\", { enumerable: true, get: function() {\n return errors_js_1.isCallException;\n } });\n Object.defineProperty(exports3, \"isError\", { enumerable: true, get: function() {\n return errors_js_1.isError;\n } });\n Object.defineProperty(exports3, \"assert\", { enumerable: true, get: function() {\n return errors_js_1.assert;\n } });\n Object.defineProperty(exports3, \"assertArgument\", { enumerable: true, get: function() {\n return errors_js_1.assertArgument;\n } });\n Object.defineProperty(exports3, \"assertArgumentCount\", { enumerable: true, get: function() {\n return errors_js_1.assertArgumentCount;\n } });\n Object.defineProperty(exports3, \"assertPrivate\", { enumerable: true, get: function() {\n return errors_js_1.assertPrivate;\n } });\n Object.defineProperty(exports3, \"assertNormalize\", { enumerable: true, get: function() {\n return errors_js_1.assertNormalize;\n } });\n Object.defineProperty(exports3, \"makeError\", { enumerable: true, get: function() {\n return errors_js_1.makeError;\n } });\n var events_js_1 = require_events();\n Object.defineProperty(exports3, \"EventPayload\", { enumerable: true, get: function() {\n return events_js_1.EventPayload;\n } });\n var fetch_js_1 = require_fetch();\n Object.defineProperty(exports3, \"FetchRequest\", { enumerable: true, get: function() {\n return fetch_js_1.FetchRequest;\n } });\n Object.defineProperty(exports3, \"FetchResponse\", { enumerable: true, get: function() {\n return fetch_js_1.FetchResponse;\n } });\n Object.defineProperty(exports3, \"FetchCancelSignal\", { enumerable: true, get: function() {\n return fetch_js_1.FetchCancelSignal;\n } });\n var fixednumber_js_1 = require_fixednumber2();\n Object.defineProperty(exports3, \"FixedNumber\", { enumerable: true, get: function() {\n return fixednumber_js_1.FixedNumber;\n } });\n var maths_js_1 = require_maths();\n Object.defineProperty(exports3, \"fromTwos\", { enumerable: true, get: function() {\n return maths_js_1.fromTwos;\n } });\n Object.defineProperty(exports3, \"toTwos\", { enumerable: true, get: function() {\n return maths_js_1.toTwos;\n } });\n Object.defineProperty(exports3, \"mask\", { enumerable: true, get: function() {\n return maths_js_1.mask;\n } });\n Object.defineProperty(exports3, \"getBigInt\", { enumerable: true, get: function() {\n return maths_js_1.getBigInt;\n } });\n Object.defineProperty(exports3, \"getNumber\", { enumerable: true, get: function() {\n return maths_js_1.getNumber;\n } });\n Object.defineProperty(exports3, \"getUint\", { enumerable: true, get: function() {\n return maths_js_1.getUint;\n } });\n Object.defineProperty(exports3, \"toBigInt\", { enumerable: true, get: function() {\n return maths_js_1.toBigInt;\n } });\n Object.defineProperty(exports3, \"toNumber\", { enumerable: true, get: function() {\n return maths_js_1.toNumber;\n } });\n Object.defineProperty(exports3, \"toBeHex\", { enumerable: true, get: function() {\n return maths_js_1.toBeHex;\n } });\n Object.defineProperty(exports3, \"toBeArray\", { enumerable: true, get: function() {\n return maths_js_1.toBeArray;\n } });\n Object.defineProperty(exports3, \"toQuantity\", { enumerable: true, get: function() {\n return maths_js_1.toQuantity;\n } });\n var properties_js_1 = require_properties();\n Object.defineProperty(exports3, \"resolveProperties\", { enumerable: true, get: function() {\n return properties_js_1.resolveProperties;\n } });\n Object.defineProperty(exports3, \"defineProperties\", { enumerable: true, get: function() {\n return properties_js_1.defineProperties;\n } });\n var rlp_decode_js_1 = require_rlp_decode();\n Object.defineProperty(exports3, \"decodeRlp\", { enumerable: true, get: function() {\n return rlp_decode_js_1.decodeRlp;\n } });\n var rlp_encode_js_1 = require_rlp_encode();\n Object.defineProperty(exports3, \"encodeRlp\", { enumerable: true, get: function() {\n return rlp_encode_js_1.encodeRlp;\n } });\n var units_js_1 = require_units();\n Object.defineProperty(exports3, \"formatEther\", { enumerable: true, get: function() {\n return units_js_1.formatEther;\n } });\n Object.defineProperty(exports3, \"parseEther\", { enumerable: true, get: function() {\n return units_js_1.parseEther;\n } });\n Object.defineProperty(exports3, \"formatUnits\", { enumerable: true, get: function() {\n return units_js_1.formatUnits;\n } });\n Object.defineProperty(exports3, \"parseUnits\", { enumerable: true, get: function() {\n return units_js_1.parseUnits;\n } });\n var utf8_js_1 = require_utf82();\n Object.defineProperty(exports3, \"toUtf8Bytes\", { enumerable: true, get: function() {\n return utf8_js_1.toUtf8Bytes;\n } });\n Object.defineProperty(exports3, \"toUtf8CodePoints\", { enumerable: true, get: function() {\n return utf8_js_1.toUtf8CodePoints;\n } });\n Object.defineProperty(exports3, \"toUtf8String\", { enumerable: true, get: function() {\n return utf8_js_1.toUtf8String;\n } });\n Object.defineProperty(exports3, \"Utf8ErrorFuncs\", { enumerable: true, get: function() {\n return utf8_js_1.Utf8ErrorFuncs;\n } });\n var uuid_js_1 = require_uuid();\n Object.defineProperty(exports3, \"uuidV4\", { enumerable: true, get: function() {\n return uuid_js_1.uuidV4;\n } });\n }\n });\n\n // ../../../node_modules/.pnpm/ethers@6.15.0_bufferutil@4.0.9_utf-8-validate@5.0.10/node_modules/ethers/lib.commonjs/abi/coders/abstract-coder.js\n var require_abstract_coder2 = __commonJS({\n \"../../../node_modules/.pnpm/ethers@6.15.0_bufferutil@4.0.9_utf-8-validate@5.0.10/node_modules/ethers/lib.commonjs/abi/coders/abstract-coder.js\"(exports3) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n Object.defineProperty(exports3, \"__esModule\", { value: true });\n exports3.Reader = exports3.Writer = exports3.Coder = exports3.checkResultErrors = exports3.Result = exports3.WordSize = void 0;\n var index_js_1 = require_utils8();\n exports3.WordSize = 32;\n var Padding = new Uint8Array(exports3.WordSize);\n var passProperties = [\"then\"];\n var _guard = {};\n var resultNames = /* @__PURE__ */ new WeakMap();\n function getNames(result) {\n return resultNames.get(result);\n }\n function setNames(result, names) {\n resultNames.set(result, names);\n }\n function throwError(name, error) {\n const wrapped = new Error(`deferred error during ABI decoding triggered accessing ${name}`);\n wrapped.error = error;\n throw wrapped;\n }\n function toObject(names, items, deep) {\n if (names.indexOf(null) >= 0) {\n return items.map((item, index2) => {\n if (item instanceof Result) {\n return toObject(getNames(item), item, deep);\n }\n return item;\n });\n }\n return names.reduce((accum, name, index2) => {\n let item = items.getValue(name);\n if (!(name in accum)) {\n if (deep && item instanceof Result) {\n item = toObject(getNames(item), item, deep);\n }\n accum[name] = item;\n }\n return accum;\n }, {});\n }\n var Result = class _Result extends Array {\n // No longer used; but cannot be removed as it will remove the\n // #private field from the .d.ts which may break backwards\n // compatibility\n #names;\n /**\n * @private\n */\n constructor(...args) {\n const guard = args[0];\n let items = args[1];\n let names = (args[2] || []).slice();\n let wrap3 = true;\n if (guard !== _guard) {\n items = args;\n names = [];\n wrap3 = false;\n }\n super(items.length);\n items.forEach((item, index2) => {\n this[index2] = item;\n });\n const nameCounts = names.reduce((accum, name) => {\n if (typeof name === \"string\") {\n accum.set(name, (accum.get(name) || 0) + 1);\n }\n return accum;\n }, /* @__PURE__ */ new Map());\n setNames(this, Object.freeze(items.map((item, index2) => {\n const name = names[index2];\n if (name != null && nameCounts.get(name) === 1) {\n return name;\n }\n return null;\n })));\n this.#names = [];\n if (this.#names == null) {\n void this.#names;\n }\n if (!wrap3) {\n return;\n }\n Object.freeze(this);\n const proxy = new Proxy(this, {\n get: (target, prop, receiver) => {\n if (typeof prop === \"string\") {\n if (prop.match(/^[0-9]+$/)) {\n const index2 = (0, index_js_1.getNumber)(prop, \"%index\");\n if (index2 < 0 || index2 >= this.length) {\n throw new RangeError(\"out of result range\");\n }\n const item = target[index2];\n if (item instanceof Error) {\n throwError(`index ${index2}`, item);\n }\n return item;\n }\n if (passProperties.indexOf(prop) >= 0) {\n return Reflect.get(target, prop, receiver);\n }\n const value = target[prop];\n if (value instanceof Function) {\n return function(...args2) {\n return value.apply(this === receiver ? target : this, args2);\n };\n } else if (!(prop in target)) {\n return target.getValue.apply(this === receiver ? target : this, [prop]);\n }\n }\n return Reflect.get(target, prop, receiver);\n }\n });\n setNames(proxy, getNames(this));\n return proxy;\n }\n /**\n * Returns the Result as a normal Array. If %%deep%%, any children\n * which are Result objects are also converted to a normal Array.\n *\n * This will throw if there are any outstanding deferred\n * errors.\n */\n toArray(deep) {\n const result = [];\n this.forEach((item, index2) => {\n if (item instanceof Error) {\n throwError(`index ${index2}`, item);\n }\n if (deep && item instanceof _Result) {\n item = item.toArray(deep);\n }\n result.push(item);\n });\n return result;\n }\n /**\n * Returns the Result as an Object with each name-value pair. If\n * %%deep%%, any children which are Result objects are also\n * converted to an Object.\n *\n * This will throw if any value is unnamed, or if there are\n * any outstanding deferred errors.\n */\n toObject(deep) {\n const names = getNames(this);\n return names.reduce((accum, name, index2) => {\n (0, index_js_1.assert)(name != null, `value at index ${index2} unnamed`, \"UNSUPPORTED_OPERATION\", {\n operation: \"toObject()\"\n });\n return toObject(names, this, deep);\n }, {});\n }\n /**\n * @_ignore\n */\n slice(start, end) {\n if (start == null) {\n start = 0;\n }\n if (start < 0) {\n start += this.length;\n if (start < 0) {\n start = 0;\n }\n }\n if (end == null) {\n end = this.length;\n }\n if (end < 0) {\n end += this.length;\n if (end < 0) {\n end = 0;\n }\n }\n if (end > this.length) {\n end = this.length;\n }\n const _names = getNames(this);\n const result = [], names = [];\n for (let i3 = start; i3 < end; i3++) {\n result.push(this[i3]);\n names.push(_names[i3]);\n }\n return new _Result(_guard, result, names);\n }\n /**\n * @_ignore\n */\n filter(callback, thisArg) {\n const _names = getNames(this);\n const result = [], names = [];\n for (let i3 = 0; i3 < this.length; i3++) {\n const item = this[i3];\n if (item instanceof Error) {\n throwError(`index ${i3}`, item);\n }\n if (callback.call(thisArg, item, i3, this)) {\n result.push(item);\n names.push(_names[i3]);\n }\n }\n return new _Result(_guard, result, names);\n }\n /**\n * @_ignore\n */\n map(callback, thisArg) {\n const result = [];\n for (let i3 = 0; i3 < this.length; i3++) {\n const item = this[i3];\n if (item instanceof Error) {\n throwError(`index ${i3}`, item);\n }\n result.push(callback.call(thisArg, item, i3, this));\n }\n return result;\n }\n /**\n * Returns the value for %%name%%.\n *\n * Since it is possible to have a key whose name conflicts with\n * a method on a [[Result]] or its superclass Array, or any\n * JavaScript keyword, this ensures all named values are still\n * accessible by name.\n */\n getValue(name) {\n const index2 = getNames(this).indexOf(name);\n if (index2 === -1) {\n return void 0;\n }\n const value = this[index2];\n if (value instanceof Error) {\n throwError(`property ${JSON.stringify(name)}`, value.error);\n }\n return value;\n }\n /**\n * Creates a new [[Result]] for %%items%% with each entry\n * also accessible by its corresponding name in %%keys%%.\n */\n static fromItems(items, keys) {\n return new _Result(_guard, items, keys);\n }\n };\n exports3.Result = Result;\n function checkResultErrors(result) {\n const errors = [];\n const checkErrors = function(path, object2) {\n if (!Array.isArray(object2)) {\n return;\n }\n for (let key in object2) {\n const childPath = path.slice();\n childPath.push(key);\n try {\n checkErrors(childPath, object2[key]);\n } catch (error) {\n errors.push({ path: childPath, error });\n }\n }\n };\n checkErrors([], result);\n return errors;\n }\n exports3.checkResultErrors = checkResultErrors;\n function getValue(value) {\n let bytes = (0, index_js_1.toBeArray)(value);\n (0, index_js_1.assert)(bytes.length <= exports3.WordSize, \"value out-of-bounds\", \"BUFFER_OVERRUN\", { buffer: bytes, length: exports3.WordSize, offset: bytes.length });\n if (bytes.length !== exports3.WordSize) {\n bytes = (0, index_js_1.getBytesCopy)((0, index_js_1.concat)([Padding.slice(bytes.length % exports3.WordSize), bytes]));\n }\n return bytes;\n }\n var Coder = class {\n // The coder name:\n // - address, uint256, tuple, array, etc.\n name;\n // The fully expanded type, including composite types:\n // - address, uint256, tuple(address,bytes), uint256[3][4][], etc.\n type;\n // The localName bound in the signature, in this example it is \"baz\":\n // - tuple(address foo, uint bar) baz\n localName;\n // Whether this type is dynamic:\n // - Dynamic: bytes, string, address[], tuple(boolean[]), etc.\n // - Not Dynamic: address, uint256, boolean[3], tuple(address, uint8)\n dynamic;\n constructor(name, type, localName, dynamic) {\n (0, index_js_1.defineProperties)(this, { name, type, localName, dynamic }, {\n name: \"string\",\n type: \"string\",\n localName: \"string\",\n dynamic: \"boolean\"\n });\n }\n _throwError(message, value) {\n (0, index_js_1.assertArgument)(false, message, this.localName, value);\n }\n };\n exports3.Coder = Coder;\n var Writer = class {\n // An array of WordSize lengthed objects to concatenation\n #data;\n #dataLength;\n constructor() {\n this.#data = [];\n this.#dataLength = 0;\n }\n get data() {\n return (0, index_js_1.concat)(this.#data);\n }\n get length() {\n return this.#dataLength;\n }\n #writeData(data) {\n this.#data.push(data);\n this.#dataLength += data.length;\n return data.length;\n }\n appendWriter(writer) {\n return this.#writeData((0, index_js_1.getBytesCopy)(writer.data));\n }\n // Arrayish item; pad on the right to *nearest* WordSize\n writeBytes(value) {\n let bytes = (0, index_js_1.getBytesCopy)(value);\n const paddingOffset = bytes.length % exports3.WordSize;\n if (paddingOffset) {\n bytes = (0, index_js_1.getBytesCopy)((0, index_js_1.concat)([bytes, Padding.slice(paddingOffset)]));\n }\n return this.#writeData(bytes);\n }\n // Numeric item; pad on the left *to* WordSize\n writeValue(value) {\n return this.#writeData(getValue(value));\n }\n // Inserts a numeric place-holder, returning a callback that can\n // be used to asjust the value later\n writeUpdatableValue() {\n const offset = this.#data.length;\n this.#data.push(Padding);\n this.#dataLength += exports3.WordSize;\n return (value) => {\n this.#data[offset] = getValue(value);\n };\n }\n };\n exports3.Writer = Writer;\n var Reader = class _Reader {\n // Allows incomplete unpadded data to be read; otherwise an error\n // is raised if attempting to overrun the buffer. This is required\n // to deal with an old Solidity bug, in which event data for\n // external (not public thoguh) was tightly packed.\n allowLoose;\n #data;\n #offset;\n #bytesRead;\n #parent;\n #maxInflation;\n constructor(data, allowLoose, maxInflation) {\n (0, index_js_1.defineProperties)(this, { allowLoose: !!allowLoose });\n this.#data = (0, index_js_1.getBytesCopy)(data);\n this.#bytesRead = 0;\n this.#parent = null;\n this.#maxInflation = maxInflation != null ? maxInflation : 1024;\n this.#offset = 0;\n }\n get data() {\n return (0, index_js_1.hexlify)(this.#data);\n }\n get dataLength() {\n return this.#data.length;\n }\n get consumed() {\n return this.#offset;\n }\n get bytes() {\n return new Uint8Array(this.#data);\n }\n #incrementBytesRead(count) {\n if (this.#parent) {\n return this.#parent.#incrementBytesRead(count);\n }\n this.#bytesRead += count;\n (0, index_js_1.assert)(this.#maxInflation < 1 || this.#bytesRead <= this.#maxInflation * this.dataLength, `compressed ABI data exceeds inflation ratio of ${this.#maxInflation} ( see: https://github.com/ethers-io/ethers.js/issues/4537 )`, \"BUFFER_OVERRUN\", {\n buffer: (0, index_js_1.getBytesCopy)(this.#data),\n offset: this.#offset,\n length: count,\n info: {\n bytesRead: this.#bytesRead,\n dataLength: this.dataLength\n }\n });\n }\n #peekBytes(offset, length2, loose) {\n let alignedLength = Math.ceil(length2 / exports3.WordSize) * exports3.WordSize;\n if (this.#offset + alignedLength > this.#data.length) {\n if (this.allowLoose && loose && this.#offset + length2 <= this.#data.length) {\n alignedLength = length2;\n } else {\n (0, index_js_1.assert)(false, \"data out-of-bounds\", \"BUFFER_OVERRUN\", {\n buffer: (0, index_js_1.getBytesCopy)(this.#data),\n length: this.#data.length,\n offset: this.#offset + alignedLength\n });\n }\n }\n return this.#data.slice(this.#offset, this.#offset + alignedLength);\n }\n // Create a sub-reader with the same underlying data, but offset\n subReader(offset) {\n const reader = new _Reader(this.#data.slice(this.#offset + offset), this.allowLoose, this.#maxInflation);\n reader.#parent = this;\n return reader;\n }\n // Read bytes\n readBytes(length2, loose) {\n let bytes = this.#peekBytes(0, length2, !!loose);\n this.#incrementBytesRead(length2);\n this.#offset += bytes.length;\n return bytes.slice(0, length2);\n }\n // Read a numeric values\n readValue() {\n return (0, index_js_1.toBigInt)(this.readBytes(exports3.WordSize));\n }\n readIndex() {\n return (0, index_js_1.toNumber)(this.readBytes(exports3.WordSize));\n }\n };\n exports3.Reader = Reader;\n }\n });\n\n // ../../../node_modules/.pnpm/@noble+hashes@1.3.2/node_modules/@noble/hashes/_assert.js\n var require_assert = __commonJS({\n \"../../../node_modules/.pnpm/@noble+hashes@1.3.2/node_modules/@noble/hashes/_assert.js\"(exports3) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n Object.defineProperty(exports3, \"__esModule\", { value: true });\n exports3.output = exports3.exists = exports3.hash = exports3.bytes = exports3.bool = exports3.number = void 0;\n function number2(n2) {\n if (!Number.isSafeInteger(n2) || n2 < 0)\n throw new Error(`Wrong positive integer: ${n2}`);\n }\n exports3.number = number2;\n function bool(b4) {\n if (typeof b4 !== \"boolean\")\n throw new Error(`Expected boolean, not ${b4}`);\n }\n exports3.bool = bool;\n function bytes(b4, ...lengths) {\n if (!(b4 instanceof Uint8Array))\n throw new Error(\"Expected Uint8Array\");\n if (lengths.length > 0 && !lengths.includes(b4.length))\n throw new Error(`Expected Uint8Array of length ${lengths}, not of length=${b4.length}`);\n }\n exports3.bytes = bytes;\n function hash3(hash4) {\n if (typeof hash4 !== \"function\" || typeof hash4.create !== \"function\")\n throw new Error(\"Hash should be wrapped by utils.wrapConstructor\");\n number2(hash4.outputLen);\n number2(hash4.blockLen);\n }\n exports3.hash = hash3;\n function exists(instance, checkFinished = true) {\n if (instance.destroyed)\n throw new Error(\"Hash instance has been destroyed\");\n if (checkFinished && instance.finished)\n throw new Error(\"Hash#digest() has already been called\");\n }\n exports3.exists = exists;\n function output(out, instance) {\n bytes(out);\n const min = instance.outputLen;\n if (out.length < min) {\n throw new Error(`digestInto() expects output buffer of length at least ${min}`);\n }\n }\n exports3.output = output;\n var assert9 = { number: number2, bool, bytes, hash: hash3, exists, output };\n exports3.default = assert9;\n }\n });\n\n // ../../../node_modules/.pnpm/@noble+hashes@1.3.2/node_modules/@noble/hashes/crypto.js\n var require_crypto = __commonJS({\n \"../../../node_modules/.pnpm/@noble+hashes@1.3.2/node_modules/@noble/hashes/crypto.js\"(exports3) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n Object.defineProperty(exports3, \"__esModule\", { value: true });\n exports3.crypto = void 0;\n exports3.crypto = typeof globalThis === \"object\" && \"crypto\" in globalThis ? globalThis.crypto : void 0;\n }\n });\n\n // ../../../node_modules/.pnpm/@noble+hashes@1.3.2/node_modules/@noble/hashes/utils.js\n var require_utils9 = __commonJS({\n \"../../../node_modules/.pnpm/@noble+hashes@1.3.2/node_modules/@noble/hashes/utils.js\"(exports3) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n Object.defineProperty(exports3, \"__esModule\", { value: true });\n exports3.randomBytes = exports3.wrapXOFConstructorWithOpts = exports3.wrapConstructorWithOpts = exports3.wrapConstructor = exports3.checkOpts = exports3.Hash = exports3.concatBytes = exports3.toBytes = exports3.utf8ToBytes = exports3.asyncLoop = exports3.nextTick = exports3.hexToBytes = exports3.bytesToHex = exports3.isLE = exports3.rotr = exports3.createView = exports3.u32 = exports3.u8 = void 0;\n var crypto_1 = require_crypto();\n var u8a = (a3) => a3 instanceof Uint8Array;\n var u8 = (arr) => new Uint8Array(arr.buffer, arr.byteOffset, arr.byteLength);\n exports3.u8 = u8;\n var u323 = (arr) => new Uint32Array(arr.buffer, arr.byteOffset, Math.floor(arr.byteLength / 4));\n exports3.u32 = u323;\n var createView2 = (arr) => new DataView(arr.buffer, arr.byteOffset, arr.byteLength);\n exports3.createView = createView2;\n var rotr2 = (word, shift) => word << 32 - shift | word >>> shift;\n exports3.rotr = rotr2;\n exports3.isLE = new Uint8Array(new Uint32Array([287454020]).buffer)[0] === 68;\n if (!exports3.isLE)\n throw new Error(\"Non little-endian hardware is not supported\");\n var hexes7 = /* @__PURE__ */ Array.from({ length: 256 }, (_2, i3) => i3.toString(16).padStart(2, \"0\"));\n function bytesToHex6(bytes) {\n if (!u8a(bytes))\n throw new Error(\"Uint8Array expected\");\n let hex = \"\";\n for (let i3 = 0; i3 < bytes.length; i3++) {\n hex += hexes7[bytes[i3]];\n }\n return hex;\n }\n exports3.bytesToHex = bytesToHex6;\n function hexToBytes6(hex) {\n if (typeof hex !== \"string\")\n throw new Error(\"hex string expected, got \" + typeof hex);\n const len = hex.length;\n if (len % 2)\n throw new Error(\"padded hex string expected, got unpadded hex of length \" + len);\n const array2 = new Uint8Array(len / 2);\n for (let i3 = 0; i3 < array2.length; i3++) {\n const j2 = i3 * 2;\n const hexByte = hex.slice(j2, j2 + 2);\n const byte = Number.parseInt(hexByte, 16);\n if (Number.isNaN(byte) || byte < 0)\n throw new Error(\"Invalid byte sequence\");\n array2[i3] = byte;\n }\n return array2;\n }\n exports3.hexToBytes = hexToBytes6;\n var nextTick2 = async () => {\n };\n exports3.nextTick = nextTick2;\n async function asyncLoop2(iters, tick, cb) {\n let ts = Date.now();\n for (let i3 = 0; i3 < iters; i3++) {\n cb(i3);\n const diff = Date.now() - ts;\n if (diff >= 0 && diff < tick)\n continue;\n await (0, exports3.nextTick)();\n ts += diff;\n }\n }\n exports3.asyncLoop = asyncLoop2;\n function utf8ToBytes3(str) {\n if (typeof str !== \"string\")\n throw new Error(`utf8ToBytes expected string, got ${typeof str}`);\n return new Uint8Array(new TextEncoder().encode(str));\n }\n exports3.utf8ToBytes = utf8ToBytes3;\n function toBytes5(data) {\n if (typeof data === \"string\")\n data = utf8ToBytes3(data);\n if (!u8a(data))\n throw new Error(`expected Uint8Array, got ${typeof data}`);\n return data;\n }\n exports3.toBytes = toBytes5;\n function concatBytes5(...arrays) {\n const r2 = new Uint8Array(arrays.reduce((sum, a3) => sum + a3.length, 0));\n let pad6 = 0;\n arrays.forEach((a3) => {\n if (!u8a(a3))\n throw new Error(\"Uint8Array expected\");\n r2.set(a3, pad6);\n pad6 += a3.length;\n });\n return r2;\n }\n exports3.concatBytes = concatBytes5;\n var Hash2 = class {\n // Safe version that clones internal state\n clone() {\n return this._cloneInto();\n }\n };\n exports3.Hash = Hash2;\n var toStr = {}.toString;\n function checkOpts2(defaults, opts) {\n if (opts !== void 0 && toStr.call(opts) !== \"[object Object]\")\n throw new Error(\"Options should be object or undefined\");\n const merged = Object.assign(defaults, opts);\n return merged;\n }\n exports3.checkOpts = checkOpts2;\n function wrapConstructor(hashCons) {\n const hashC = (msg) => hashCons().update(toBytes5(msg)).digest();\n const tmp = hashCons();\n hashC.outputLen = tmp.outputLen;\n hashC.blockLen = tmp.blockLen;\n hashC.create = () => hashCons();\n return hashC;\n }\n exports3.wrapConstructor = wrapConstructor;\n function wrapConstructorWithOpts(hashCons) {\n const hashC = (msg, opts) => hashCons(opts).update(toBytes5(msg)).digest();\n const tmp = hashCons({});\n hashC.outputLen = tmp.outputLen;\n hashC.blockLen = tmp.blockLen;\n hashC.create = (opts) => hashCons(opts);\n return hashC;\n }\n exports3.wrapConstructorWithOpts = wrapConstructorWithOpts;\n function wrapXOFConstructorWithOpts(hashCons) {\n const hashC = (msg, opts) => hashCons(opts).update(toBytes5(msg)).digest();\n const tmp = hashCons({});\n hashC.outputLen = tmp.outputLen;\n hashC.blockLen = tmp.blockLen;\n hashC.create = (opts) => hashCons(opts);\n return hashC;\n }\n exports3.wrapXOFConstructorWithOpts = wrapXOFConstructorWithOpts;\n function randomBytes2(bytesLength = 32) {\n if (crypto_1.crypto && typeof crypto_1.crypto.getRandomValues === \"function\") {\n return crypto_1.crypto.getRandomValues(new Uint8Array(bytesLength));\n }\n throw new Error(\"crypto.getRandomValues must be defined\");\n }\n exports3.randomBytes = randomBytes2;\n }\n });\n\n // ../../../node_modules/.pnpm/@noble+hashes@1.3.2/node_modules/@noble/hashes/hmac.js\n var require_hmac2 = __commonJS({\n \"../../../node_modules/.pnpm/@noble+hashes@1.3.2/node_modules/@noble/hashes/hmac.js\"(exports3) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n Object.defineProperty(exports3, \"__esModule\", { value: true });\n exports3.hmac = exports3.HMAC = void 0;\n var _assert_js_1 = require_assert();\n var utils_js_1 = require_utils9();\n var HMAC2 = class extends utils_js_1.Hash {\n constructor(hash3, _key) {\n super();\n this.finished = false;\n this.destroyed = false;\n (0, _assert_js_1.hash)(hash3);\n const key = (0, utils_js_1.toBytes)(_key);\n this.iHash = hash3.create();\n if (typeof this.iHash.update !== \"function\")\n throw new Error(\"Expected instance of class which extends utils.Hash\");\n this.blockLen = this.iHash.blockLen;\n this.outputLen = this.iHash.outputLen;\n const blockLen = this.blockLen;\n const pad6 = new Uint8Array(blockLen);\n pad6.set(key.length > blockLen ? hash3.create().update(key).digest() : key);\n for (let i3 = 0; i3 < pad6.length; i3++)\n pad6[i3] ^= 54;\n this.iHash.update(pad6);\n this.oHash = hash3.create();\n for (let i3 = 0; i3 < pad6.length; i3++)\n pad6[i3] ^= 54 ^ 92;\n this.oHash.update(pad6);\n pad6.fill(0);\n }\n update(buf) {\n (0, _assert_js_1.exists)(this);\n this.iHash.update(buf);\n return this;\n }\n digestInto(out) {\n (0, _assert_js_1.exists)(this);\n (0, _assert_js_1.bytes)(out, this.outputLen);\n this.finished = true;\n this.iHash.digestInto(out);\n this.oHash.update(out);\n this.oHash.digestInto(out);\n this.destroy();\n }\n digest() {\n const out = new Uint8Array(this.oHash.outputLen);\n this.digestInto(out);\n return out;\n }\n _cloneInto(to) {\n to || (to = Object.create(Object.getPrototypeOf(this), {}));\n const { oHash, iHash, finished, destroyed, blockLen, outputLen } = this;\n to = to;\n to.finished = finished;\n to.destroyed = destroyed;\n to.blockLen = blockLen;\n to.outputLen = outputLen;\n to.oHash = oHash._cloneInto(to.oHash);\n to.iHash = iHash._cloneInto(to.iHash);\n return to;\n }\n destroy() {\n this.destroyed = true;\n this.oHash.destroy();\n this.iHash.destroy();\n }\n };\n exports3.HMAC = HMAC2;\n var hmac2 = (hash3, key, message) => new HMAC2(hash3, key).update(message).digest();\n exports3.hmac = hmac2;\n exports3.hmac.create = (hash3, key) => new HMAC2(hash3, key);\n }\n });\n\n // ../../../node_modules/.pnpm/@noble+hashes@1.3.2/node_modules/@noble/hashes/pbkdf2.js\n var require_pbkdf2 = __commonJS({\n \"../../../node_modules/.pnpm/@noble+hashes@1.3.2/node_modules/@noble/hashes/pbkdf2.js\"(exports3) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n Object.defineProperty(exports3, \"__esModule\", { value: true });\n exports3.pbkdf2Async = exports3.pbkdf2 = void 0;\n var _assert_js_1 = require_assert();\n var hmac_js_1 = require_hmac2();\n var utils_js_1 = require_utils9();\n function pbkdf2Init2(hash3, _password, _salt, _opts) {\n (0, _assert_js_1.hash)(hash3);\n const opts = (0, utils_js_1.checkOpts)({ dkLen: 32, asyncTick: 10 }, _opts);\n const { c: c4, dkLen, asyncTick } = opts;\n (0, _assert_js_1.number)(c4);\n (0, _assert_js_1.number)(dkLen);\n (0, _assert_js_1.number)(asyncTick);\n if (c4 < 1)\n throw new Error(\"PBKDF2: iterations (c) should be >= 1\");\n const password = (0, utils_js_1.toBytes)(_password);\n const salt = (0, utils_js_1.toBytes)(_salt);\n const DK = new Uint8Array(dkLen);\n const PRF = hmac_js_1.hmac.create(hash3, password);\n const PRFSalt = PRF._cloneInto().update(salt);\n return { c: c4, dkLen, asyncTick, DK, PRF, PRFSalt };\n }\n function pbkdf2Output2(PRF, PRFSalt, DK, prfW, u2) {\n PRF.destroy();\n PRFSalt.destroy();\n if (prfW)\n prfW.destroy();\n u2.fill(0);\n return DK;\n }\n function pbkdf22(hash3, password, salt, opts) {\n const { c: c4, dkLen, DK, PRF, PRFSalt } = pbkdf2Init2(hash3, password, salt, opts);\n let prfW;\n const arr = new Uint8Array(4);\n const view = (0, utils_js_1.createView)(arr);\n const u2 = new Uint8Array(PRF.outputLen);\n for (let ti = 1, pos = 0; pos < dkLen; ti++, pos += PRF.outputLen) {\n const Ti = DK.subarray(pos, pos + PRF.outputLen);\n view.setInt32(0, ti, false);\n (prfW = PRFSalt._cloneInto(prfW)).update(arr).digestInto(u2);\n Ti.set(u2.subarray(0, Ti.length));\n for (let ui = 1; ui < c4; ui++) {\n PRF._cloneInto(prfW).update(u2).digestInto(u2);\n for (let i3 = 0; i3 < Ti.length; i3++)\n Ti[i3] ^= u2[i3];\n }\n }\n return pbkdf2Output2(PRF, PRFSalt, DK, prfW, u2);\n }\n exports3.pbkdf2 = pbkdf22;\n async function pbkdf2Async2(hash3, password, salt, opts) {\n const { c: c4, dkLen, asyncTick, DK, PRF, PRFSalt } = pbkdf2Init2(hash3, password, salt, opts);\n let prfW;\n const arr = new Uint8Array(4);\n const view = (0, utils_js_1.createView)(arr);\n const u2 = new Uint8Array(PRF.outputLen);\n for (let ti = 1, pos = 0; pos < dkLen; ti++, pos += PRF.outputLen) {\n const Ti = DK.subarray(pos, pos + PRF.outputLen);\n view.setInt32(0, ti, false);\n (prfW = PRFSalt._cloneInto(prfW)).update(arr).digestInto(u2);\n Ti.set(u2.subarray(0, Ti.length));\n await (0, utils_js_1.asyncLoop)(c4 - 1, asyncTick, () => {\n PRF._cloneInto(prfW).update(u2).digestInto(u2);\n for (let i3 = 0; i3 < Ti.length; i3++)\n Ti[i3] ^= u2[i3];\n });\n }\n return pbkdf2Output2(PRF, PRFSalt, DK, prfW, u2);\n }\n exports3.pbkdf2Async = pbkdf2Async2;\n }\n });\n\n // ../../../node_modules/.pnpm/@noble+hashes@1.3.2/node_modules/@noble/hashes/_sha2.js\n var require_sha2 = __commonJS({\n \"../../../node_modules/.pnpm/@noble+hashes@1.3.2/node_modules/@noble/hashes/_sha2.js\"(exports3) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n Object.defineProperty(exports3, \"__esModule\", { value: true });\n exports3.SHA2 = void 0;\n var _assert_js_1 = require_assert();\n var utils_js_1 = require_utils9();\n function setBigUint642(view, byteOffset, value, isLE3) {\n if (typeof view.setBigUint64 === \"function\")\n return view.setBigUint64(byteOffset, value, isLE3);\n const _32n3 = BigInt(32);\n const _u32_max = BigInt(4294967295);\n const wh = Number(value >> _32n3 & _u32_max);\n const wl = Number(value & _u32_max);\n const h4 = isLE3 ? 4 : 0;\n const l6 = isLE3 ? 0 : 4;\n view.setUint32(byteOffset + h4, wh, isLE3);\n view.setUint32(byteOffset + l6, wl, isLE3);\n }\n var SHA2 = class extends utils_js_1.Hash {\n constructor(blockLen, outputLen, padOffset, isLE3) {\n super();\n this.blockLen = blockLen;\n this.outputLen = outputLen;\n this.padOffset = padOffset;\n this.isLE = isLE3;\n this.finished = false;\n this.length = 0;\n this.pos = 0;\n this.destroyed = false;\n this.buffer = new Uint8Array(blockLen);\n this.view = (0, utils_js_1.createView)(this.buffer);\n }\n update(data) {\n (0, _assert_js_1.exists)(this);\n const { view, buffer: buffer2, blockLen } = this;\n data = (0, utils_js_1.toBytes)(data);\n const len = data.length;\n for (let pos = 0; pos < len; ) {\n const take = Math.min(blockLen - this.pos, len - pos);\n if (take === blockLen) {\n const dataView = (0, utils_js_1.createView)(data);\n for (; blockLen <= len - pos; pos += blockLen)\n this.process(dataView, pos);\n continue;\n }\n buffer2.set(data.subarray(pos, pos + take), this.pos);\n this.pos += take;\n pos += take;\n if (this.pos === blockLen) {\n this.process(view, 0);\n this.pos = 0;\n }\n }\n this.length += data.length;\n this.roundClean();\n return this;\n }\n digestInto(out) {\n (0, _assert_js_1.exists)(this);\n (0, _assert_js_1.output)(out, this);\n this.finished = true;\n const { buffer: buffer2, view, blockLen, isLE: isLE3 } = this;\n let { pos } = this;\n buffer2[pos++] = 128;\n this.buffer.subarray(pos).fill(0);\n if (this.padOffset > blockLen - pos) {\n this.process(view, 0);\n pos = 0;\n }\n for (let i3 = pos; i3 < blockLen; i3++)\n buffer2[i3] = 0;\n setBigUint642(view, blockLen - 8, BigInt(this.length * 8), isLE3);\n this.process(view, 0);\n const oview = (0, utils_js_1.createView)(out);\n const len = this.outputLen;\n if (len % 4)\n throw new Error(\"_sha2: outputLen should be aligned to 32bit\");\n const outLen = len / 4;\n const state = this.get();\n if (outLen > state.length)\n throw new Error(\"_sha2: outputLen bigger than state\");\n for (let i3 = 0; i3 < outLen; i3++)\n oview.setUint32(4 * i3, state[i3], isLE3);\n }\n digest() {\n const { buffer: buffer2, outputLen } = this;\n this.digestInto(buffer2);\n const res = buffer2.slice(0, outputLen);\n this.destroy();\n return res;\n }\n _cloneInto(to) {\n to || (to = new this.constructor());\n to.set(...this.get());\n const { blockLen, buffer: buffer2, length: length2, finished, destroyed, pos } = this;\n to.length = length2;\n to.pos = pos;\n to.finished = finished;\n to.destroyed = destroyed;\n if (length2 % blockLen)\n to.buffer.set(buffer2);\n return to;\n }\n };\n exports3.SHA2 = SHA2;\n }\n });\n\n // ../../../node_modules/.pnpm/@noble+hashes@1.3.2/node_modules/@noble/hashes/sha256.js\n var require_sha256 = __commonJS({\n \"../../../node_modules/.pnpm/@noble+hashes@1.3.2/node_modules/@noble/hashes/sha256.js\"(exports3) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n Object.defineProperty(exports3, \"__esModule\", { value: true });\n exports3.sha224 = exports3.sha256 = void 0;\n var _sha2_js_1 = require_sha2();\n var utils_js_1 = require_utils9();\n var Chi2 = (a3, b4, c4) => a3 & b4 ^ ~a3 & c4;\n var Maj2 = (a3, b4, c4) => a3 & b4 ^ a3 & c4 ^ b4 & c4;\n var SHA256_K2 = /* @__PURE__ */ new Uint32Array([\n 1116352408,\n 1899447441,\n 3049323471,\n 3921009573,\n 961987163,\n 1508970993,\n 2453635748,\n 2870763221,\n 3624381080,\n 310598401,\n 607225278,\n 1426881987,\n 1925078388,\n 2162078206,\n 2614888103,\n 3248222580,\n 3835390401,\n 4022224774,\n 264347078,\n 604807628,\n 770255983,\n 1249150122,\n 1555081692,\n 1996064986,\n 2554220882,\n 2821834349,\n 2952996808,\n 3210313671,\n 3336571891,\n 3584528711,\n 113926993,\n 338241895,\n 666307205,\n 773529912,\n 1294757372,\n 1396182291,\n 1695183700,\n 1986661051,\n 2177026350,\n 2456956037,\n 2730485921,\n 2820302411,\n 3259730800,\n 3345764771,\n 3516065817,\n 3600352804,\n 4094571909,\n 275423344,\n 430227734,\n 506948616,\n 659060556,\n 883997877,\n 958139571,\n 1322822218,\n 1537002063,\n 1747873779,\n 1955562222,\n 2024104815,\n 2227730452,\n 2361852424,\n 2428436474,\n 2756734187,\n 3204031479,\n 3329325298\n ]);\n var IV = /* @__PURE__ */ new Uint32Array([\n 1779033703,\n 3144134277,\n 1013904242,\n 2773480762,\n 1359893119,\n 2600822924,\n 528734635,\n 1541459225\n ]);\n var SHA256_W2 = /* @__PURE__ */ new Uint32Array(64);\n var SHA2562 = class extends _sha2_js_1.SHA2 {\n constructor() {\n super(64, 32, 8, false);\n this.A = IV[0] | 0;\n this.B = IV[1] | 0;\n this.C = IV[2] | 0;\n this.D = IV[3] | 0;\n this.E = IV[4] | 0;\n this.F = IV[5] | 0;\n this.G = IV[6] | 0;\n this.H = IV[7] | 0;\n }\n get() {\n const { A: A4, B: B2, C, D: D2, E: E2, F: F2, G, H: H3 } = this;\n return [A4, B2, C, D2, E2, F2, G, H3];\n }\n // prettier-ignore\n set(A4, B2, C, D2, E2, F2, G, H3) {\n this.A = A4 | 0;\n this.B = B2 | 0;\n this.C = C | 0;\n this.D = D2 | 0;\n this.E = E2 | 0;\n this.F = F2 | 0;\n this.G = G | 0;\n this.H = H3 | 0;\n }\n process(view, offset) {\n for (let i3 = 0; i3 < 16; i3++, offset += 4)\n SHA256_W2[i3] = view.getUint32(offset, false);\n for (let i3 = 16; i3 < 64; i3++) {\n const W15 = SHA256_W2[i3 - 15];\n const W2 = SHA256_W2[i3 - 2];\n const s0 = (0, utils_js_1.rotr)(W15, 7) ^ (0, utils_js_1.rotr)(W15, 18) ^ W15 >>> 3;\n const s1 = (0, utils_js_1.rotr)(W2, 17) ^ (0, utils_js_1.rotr)(W2, 19) ^ W2 >>> 10;\n SHA256_W2[i3] = s1 + SHA256_W2[i3 - 7] + s0 + SHA256_W2[i3 - 16] | 0;\n }\n let { A: A4, B: B2, C, D: D2, E: E2, F: F2, G, H: H3 } = this;\n for (let i3 = 0; i3 < 64; i3++) {\n const sigma1 = (0, utils_js_1.rotr)(E2, 6) ^ (0, utils_js_1.rotr)(E2, 11) ^ (0, utils_js_1.rotr)(E2, 25);\n const T1 = H3 + sigma1 + Chi2(E2, F2, G) + SHA256_K2[i3] + SHA256_W2[i3] | 0;\n const sigma0 = (0, utils_js_1.rotr)(A4, 2) ^ (0, utils_js_1.rotr)(A4, 13) ^ (0, utils_js_1.rotr)(A4, 22);\n const T22 = sigma0 + Maj2(A4, B2, C) | 0;\n H3 = G;\n G = F2;\n F2 = E2;\n E2 = D2 + T1 | 0;\n D2 = C;\n C = B2;\n B2 = A4;\n A4 = T1 + T22 | 0;\n }\n A4 = A4 + this.A | 0;\n B2 = B2 + this.B | 0;\n C = C + this.C | 0;\n D2 = D2 + this.D | 0;\n E2 = E2 + this.E | 0;\n F2 = F2 + this.F | 0;\n G = G + this.G | 0;\n H3 = H3 + this.H | 0;\n this.set(A4, B2, C, D2, E2, F2, G, H3);\n }\n roundClean() {\n SHA256_W2.fill(0);\n }\n destroy() {\n this.set(0, 0, 0, 0, 0, 0, 0, 0);\n this.buffer.fill(0);\n }\n };\n var SHA2242 = class extends SHA2562 {\n constructor() {\n super();\n this.A = 3238371032 | 0;\n this.B = 914150663 | 0;\n this.C = 812702999 | 0;\n this.D = 4144912697 | 0;\n this.E = 4290775857 | 0;\n this.F = 1750603025 | 0;\n this.G = 1694076839 | 0;\n this.H = 3204075428 | 0;\n this.outputLen = 28;\n }\n };\n exports3.sha256 = (0, utils_js_1.wrapConstructor)(() => new SHA2562());\n exports3.sha224 = (0, utils_js_1.wrapConstructor)(() => new SHA2242());\n }\n });\n\n // ../../../node_modules/.pnpm/@noble+hashes@1.3.2/node_modules/@noble/hashes/_u64.js\n var require_u64 = __commonJS({\n \"../../../node_modules/.pnpm/@noble+hashes@1.3.2/node_modules/@noble/hashes/_u64.js\"(exports3) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n Object.defineProperty(exports3, \"__esModule\", { value: true });\n exports3.add5L = exports3.add5H = exports3.add4H = exports3.add4L = exports3.add3H = exports3.add3L = exports3.add = exports3.rotlBL = exports3.rotlBH = exports3.rotlSL = exports3.rotlSH = exports3.rotr32L = exports3.rotr32H = exports3.rotrBL = exports3.rotrBH = exports3.rotrSL = exports3.rotrSH = exports3.shrSL = exports3.shrSH = exports3.toBig = exports3.split = exports3.fromBig = void 0;\n var U32_MASK643 = /* @__PURE__ */ BigInt(2 ** 32 - 1);\n var _32n3 = /* @__PURE__ */ BigInt(32);\n function fromBig3(n2, le = false) {\n if (le)\n return { h: Number(n2 & U32_MASK643), l: Number(n2 >> _32n3 & U32_MASK643) };\n return { h: Number(n2 >> _32n3 & U32_MASK643) | 0, l: Number(n2 & U32_MASK643) | 0 };\n }\n exports3.fromBig = fromBig3;\n function split4(lst, le = false) {\n let Ah = new Uint32Array(lst.length);\n let Al = new Uint32Array(lst.length);\n for (let i3 = 0; i3 < lst.length; i3++) {\n const { h: h4, l: l6 } = fromBig3(lst[i3], le);\n [Ah[i3], Al[i3]] = [h4, l6];\n }\n return [Ah, Al];\n }\n exports3.split = split4;\n var toBig = (h4, l6) => BigInt(h4 >>> 0) << _32n3 | BigInt(l6 >>> 0);\n exports3.toBig = toBig;\n var shrSH2 = (h4, _l, s4) => h4 >>> s4;\n exports3.shrSH = shrSH2;\n var shrSL2 = (h4, l6, s4) => h4 << 32 - s4 | l6 >>> s4;\n exports3.shrSL = shrSL2;\n var rotrSH2 = (h4, l6, s4) => h4 >>> s4 | l6 << 32 - s4;\n exports3.rotrSH = rotrSH2;\n var rotrSL2 = (h4, l6, s4) => h4 << 32 - s4 | l6 >>> s4;\n exports3.rotrSL = rotrSL2;\n var rotrBH2 = (h4, l6, s4) => h4 << 64 - s4 | l6 >>> s4 - 32;\n exports3.rotrBH = rotrBH2;\n var rotrBL2 = (h4, l6, s4) => h4 >>> s4 - 32 | l6 << 64 - s4;\n exports3.rotrBL = rotrBL2;\n var rotr32H = (_h, l6) => l6;\n exports3.rotr32H = rotr32H;\n var rotr32L = (h4, _l) => h4;\n exports3.rotr32L = rotr32L;\n var rotlSH3 = (h4, l6, s4) => h4 << s4 | l6 >>> 32 - s4;\n exports3.rotlSH = rotlSH3;\n var rotlSL3 = (h4, l6, s4) => l6 << s4 | h4 >>> 32 - s4;\n exports3.rotlSL = rotlSL3;\n var rotlBH3 = (h4, l6, s4) => l6 << s4 - 32 | h4 >>> 64 - s4;\n exports3.rotlBH = rotlBH3;\n var rotlBL3 = (h4, l6, s4) => h4 << s4 - 32 | l6 >>> 64 - s4;\n exports3.rotlBL = rotlBL3;\n function add2(Ah, Al, Bh, Bl) {\n const l6 = (Al >>> 0) + (Bl >>> 0);\n return { h: Ah + Bh + (l6 / 2 ** 32 | 0) | 0, l: l6 | 0 };\n }\n exports3.add = add2;\n var add3L2 = (Al, Bl, Cl) => (Al >>> 0) + (Bl >>> 0) + (Cl >>> 0);\n exports3.add3L = add3L2;\n var add3H2 = (low, Ah, Bh, Ch) => Ah + Bh + Ch + (low / 2 ** 32 | 0) | 0;\n exports3.add3H = add3H2;\n var add4L2 = (Al, Bl, Cl, Dl) => (Al >>> 0) + (Bl >>> 0) + (Cl >>> 0) + (Dl >>> 0);\n exports3.add4L = add4L2;\n var add4H2 = (low, Ah, Bh, Ch, Dh) => Ah + Bh + Ch + Dh + (low / 2 ** 32 | 0) | 0;\n exports3.add4H = add4H2;\n var add5L2 = (Al, Bl, Cl, Dl, El) => (Al >>> 0) + (Bl >>> 0) + (Cl >>> 0) + (Dl >>> 0) + (El >>> 0);\n exports3.add5L = add5L2;\n var add5H2 = (low, Ah, Bh, Ch, Dh, Eh) => Ah + Bh + Ch + Dh + Eh + (low / 2 ** 32 | 0) | 0;\n exports3.add5H = add5H2;\n var u64 = {\n fromBig: fromBig3,\n split: split4,\n toBig,\n shrSH: shrSH2,\n shrSL: shrSL2,\n rotrSH: rotrSH2,\n rotrSL: rotrSL2,\n rotrBH: rotrBH2,\n rotrBL: rotrBL2,\n rotr32H,\n rotr32L,\n rotlSH: rotlSH3,\n rotlSL: rotlSL3,\n rotlBH: rotlBH3,\n rotlBL: rotlBL3,\n add: add2,\n add3L: add3L2,\n add3H: add3H2,\n add4L: add4L2,\n add4H: add4H2,\n add5H: add5H2,\n add5L: add5L2\n };\n exports3.default = u64;\n }\n });\n\n // ../../../node_modules/.pnpm/@noble+hashes@1.3.2/node_modules/@noble/hashes/sha512.js\n var require_sha512 = __commonJS({\n \"../../../node_modules/.pnpm/@noble+hashes@1.3.2/node_modules/@noble/hashes/sha512.js\"(exports3) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n Object.defineProperty(exports3, \"__esModule\", { value: true });\n exports3.sha384 = exports3.sha512_256 = exports3.sha512_224 = exports3.sha512 = exports3.SHA512 = void 0;\n var _sha2_js_1 = require_sha2();\n var _u64_js_1 = require_u64();\n var utils_js_1 = require_utils9();\n var [SHA512_Kh2, SHA512_Kl2] = /* @__PURE__ */ (() => _u64_js_1.default.split([\n \"0x428a2f98d728ae22\",\n \"0x7137449123ef65cd\",\n \"0xb5c0fbcfec4d3b2f\",\n \"0xe9b5dba58189dbbc\",\n \"0x3956c25bf348b538\",\n \"0x59f111f1b605d019\",\n \"0x923f82a4af194f9b\",\n \"0xab1c5ed5da6d8118\",\n \"0xd807aa98a3030242\",\n \"0x12835b0145706fbe\",\n \"0x243185be4ee4b28c\",\n \"0x550c7dc3d5ffb4e2\",\n \"0x72be5d74f27b896f\",\n \"0x80deb1fe3b1696b1\",\n \"0x9bdc06a725c71235\",\n \"0xc19bf174cf692694\",\n \"0xe49b69c19ef14ad2\",\n \"0xefbe4786384f25e3\",\n \"0x0fc19dc68b8cd5b5\",\n \"0x240ca1cc77ac9c65\",\n \"0x2de92c6f592b0275\",\n \"0x4a7484aa6ea6e483\",\n \"0x5cb0a9dcbd41fbd4\",\n \"0x76f988da831153b5\",\n \"0x983e5152ee66dfab\",\n \"0xa831c66d2db43210\",\n \"0xb00327c898fb213f\",\n \"0xbf597fc7beef0ee4\",\n \"0xc6e00bf33da88fc2\",\n \"0xd5a79147930aa725\",\n \"0x06ca6351e003826f\",\n \"0x142929670a0e6e70\",\n \"0x27b70a8546d22ffc\",\n \"0x2e1b21385c26c926\",\n \"0x4d2c6dfc5ac42aed\",\n \"0x53380d139d95b3df\",\n \"0x650a73548baf63de\",\n \"0x766a0abb3c77b2a8\",\n \"0x81c2c92e47edaee6\",\n \"0x92722c851482353b\",\n \"0xa2bfe8a14cf10364\",\n \"0xa81a664bbc423001\",\n \"0xc24b8b70d0f89791\",\n \"0xc76c51a30654be30\",\n \"0xd192e819d6ef5218\",\n \"0xd69906245565a910\",\n \"0xf40e35855771202a\",\n \"0x106aa07032bbd1b8\",\n \"0x19a4c116b8d2d0c8\",\n \"0x1e376c085141ab53\",\n \"0x2748774cdf8eeb99\",\n \"0x34b0bcb5e19b48a8\",\n \"0x391c0cb3c5c95a63\",\n \"0x4ed8aa4ae3418acb\",\n \"0x5b9cca4f7763e373\",\n \"0x682e6ff3d6b2b8a3\",\n \"0x748f82ee5defb2fc\",\n \"0x78a5636f43172f60\",\n \"0x84c87814a1f0ab72\",\n \"0x8cc702081a6439ec\",\n \"0x90befffa23631e28\",\n \"0xa4506cebde82bde9\",\n \"0xbef9a3f7b2c67915\",\n \"0xc67178f2e372532b\",\n \"0xca273eceea26619c\",\n \"0xd186b8c721c0c207\",\n \"0xeada7dd6cde0eb1e\",\n \"0xf57d4f7fee6ed178\",\n \"0x06f067aa72176fba\",\n \"0x0a637dc5a2c898a6\",\n \"0x113f9804bef90dae\",\n \"0x1b710b35131c471b\",\n \"0x28db77f523047d84\",\n \"0x32caab7b40c72493\",\n \"0x3c9ebe0a15c9bebc\",\n \"0x431d67c49c100d4c\",\n \"0x4cc5d4becb3e42b6\",\n \"0x597f299cfc657e2a\",\n \"0x5fcb6fab3ad6faec\",\n \"0x6c44198c4a475817\"\n ].map((n2) => BigInt(n2))))();\n var SHA512_W_H2 = /* @__PURE__ */ new Uint32Array(80);\n var SHA512_W_L2 = /* @__PURE__ */ new Uint32Array(80);\n var SHA5122 = class extends _sha2_js_1.SHA2 {\n constructor() {\n super(128, 64, 16, false);\n this.Ah = 1779033703 | 0;\n this.Al = 4089235720 | 0;\n this.Bh = 3144134277 | 0;\n this.Bl = 2227873595 | 0;\n this.Ch = 1013904242 | 0;\n this.Cl = 4271175723 | 0;\n this.Dh = 2773480762 | 0;\n this.Dl = 1595750129 | 0;\n this.Eh = 1359893119 | 0;\n this.El = 2917565137 | 0;\n this.Fh = 2600822924 | 0;\n this.Fl = 725511199 | 0;\n this.Gh = 528734635 | 0;\n this.Gl = 4215389547 | 0;\n this.Hh = 1541459225 | 0;\n this.Hl = 327033209 | 0;\n }\n // prettier-ignore\n get() {\n const { Ah, Al, Bh, Bl, Ch, Cl, Dh, Dl, Eh, El, Fh, Fl, Gh, Gl, Hh, Hl } = this;\n return [Ah, Al, Bh, Bl, Ch, Cl, Dh, Dl, Eh, El, Fh, Fl, Gh, Gl, Hh, Hl];\n }\n // prettier-ignore\n set(Ah, Al, Bh, Bl, Ch, Cl, Dh, Dl, Eh, El, Fh, Fl, Gh, Gl, Hh, Hl) {\n this.Ah = Ah | 0;\n this.Al = Al | 0;\n this.Bh = Bh | 0;\n this.Bl = Bl | 0;\n this.Ch = Ch | 0;\n this.Cl = Cl | 0;\n this.Dh = Dh | 0;\n this.Dl = Dl | 0;\n this.Eh = Eh | 0;\n this.El = El | 0;\n this.Fh = Fh | 0;\n this.Fl = Fl | 0;\n this.Gh = Gh | 0;\n this.Gl = Gl | 0;\n this.Hh = Hh | 0;\n this.Hl = Hl | 0;\n }\n process(view, offset) {\n for (let i3 = 0; i3 < 16; i3++, offset += 4) {\n SHA512_W_H2[i3] = view.getUint32(offset);\n SHA512_W_L2[i3] = view.getUint32(offset += 4);\n }\n for (let i3 = 16; i3 < 80; i3++) {\n const W15h = SHA512_W_H2[i3 - 15] | 0;\n const W15l = SHA512_W_L2[i3 - 15] | 0;\n const s0h = _u64_js_1.default.rotrSH(W15h, W15l, 1) ^ _u64_js_1.default.rotrSH(W15h, W15l, 8) ^ _u64_js_1.default.shrSH(W15h, W15l, 7);\n const s0l = _u64_js_1.default.rotrSL(W15h, W15l, 1) ^ _u64_js_1.default.rotrSL(W15h, W15l, 8) ^ _u64_js_1.default.shrSL(W15h, W15l, 7);\n const W2h = SHA512_W_H2[i3 - 2] | 0;\n const W2l = SHA512_W_L2[i3 - 2] | 0;\n const s1h = _u64_js_1.default.rotrSH(W2h, W2l, 19) ^ _u64_js_1.default.rotrBH(W2h, W2l, 61) ^ _u64_js_1.default.shrSH(W2h, W2l, 6);\n const s1l = _u64_js_1.default.rotrSL(W2h, W2l, 19) ^ _u64_js_1.default.rotrBL(W2h, W2l, 61) ^ _u64_js_1.default.shrSL(W2h, W2l, 6);\n const SUMl = _u64_js_1.default.add4L(s0l, s1l, SHA512_W_L2[i3 - 7], SHA512_W_L2[i3 - 16]);\n const SUMh = _u64_js_1.default.add4H(SUMl, s0h, s1h, SHA512_W_H2[i3 - 7], SHA512_W_H2[i3 - 16]);\n SHA512_W_H2[i3] = SUMh | 0;\n SHA512_W_L2[i3] = SUMl | 0;\n }\n let { Ah, Al, Bh, Bl, Ch, Cl, Dh, Dl, Eh, El, Fh, Fl, Gh, Gl, Hh, Hl } = this;\n for (let i3 = 0; i3 < 80; i3++) {\n const sigma1h = _u64_js_1.default.rotrSH(Eh, El, 14) ^ _u64_js_1.default.rotrSH(Eh, El, 18) ^ _u64_js_1.default.rotrBH(Eh, El, 41);\n const sigma1l = _u64_js_1.default.rotrSL(Eh, El, 14) ^ _u64_js_1.default.rotrSL(Eh, El, 18) ^ _u64_js_1.default.rotrBL(Eh, El, 41);\n const CHIh = Eh & Fh ^ ~Eh & Gh;\n const CHIl = El & Fl ^ ~El & Gl;\n const T1ll = _u64_js_1.default.add5L(Hl, sigma1l, CHIl, SHA512_Kl2[i3], SHA512_W_L2[i3]);\n const T1h = _u64_js_1.default.add5H(T1ll, Hh, sigma1h, CHIh, SHA512_Kh2[i3], SHA512_W_H2[i3]);\n const T1l = T1ll | 0;\n const sigma0h = _u64_js_1.default.rotrSH(Ah, Al, 28) ^ _u64_js_1.default.rotrBH(Ah, Al, 34) ^ _u64_js_1.default.rotrBH(Ah, Al, 39);\n const sigma0l = _u64_js_1.default.rotrSL(Ah, Al, 28) ^ _u64_js_1.default.rotrBL(Ah, Al, 34) ^ _u64_js_1.default.rotrBL(Ah, Al, 39);\n const MAJh = Ah & Bh ^ Ah & Ch ^ Bh & Ch;\n const MAJl = Al & Bl ^ Al & Cl ^ Bl & Cl;\n Hh = Gh | 0;\n Hl = Gl | 0;\n Gh = Fh | 0;\n Gl = Fl | 0;\n Fh = Eh | 0;\n Fl = El | 0;\n ({ h: Eh, l: El } = _u64_js_1.default.add(Dh | 0, Dl | 0, T1h | 0, T1l | 0));\n Dh = Ch | 0;\n Dl = Cl | 0;\n Ch = Bh | 0;\n Cl = Bl | 0;\n Bh = Ah | 0;\n Bl = Al | 0;\n const All = _u64_js_1.default.add3L(T1l, sigma0l, MAJl);\n Ah = _u64_js_1.default.add3H(All, T1h, sigma0h, MAJh);\n Al = All | 0;\n }\n ({ h: Ah, l: Al } = _u64_js_1.default.add(this.Ah | 0, this.Al | 0, Ah | 0, Al | 0));\n ({ h: Bh, l: Bl } = _u64_js_1.default.add(this.Bh | 0, this.Bl | 0, Bh | 0, Bl | 0));\n ({ h: Ch, l: Cl } = _u64_js_1.default.add(this.Ch | 0, this.Cl | 0, Ch | 0, Cl | 0));\n ({ h: Dh, l: Dl } = _u64_js_1.default.add(this.Dh | 0, this.Dl | 0, Dh | 0, Dl | 0));\n ({ h: Eh, l: El } = _u64_js_1.default.add(this.Eh | 0, this.El | 0, Eh | 0, El | 0));\n ({ h: Fh, l: Fl } = _u64_js_1.default.add(this.Fh | 0, this.Fl | 0, Fh | 0, Fl | 0));\n ({ h: Gh, l: Gl } = _u64_js_1.default.add(this.Gh | 0, this.Gl | 0, Gh | 0, Gl | 0));\n ({ h: Hh, l: Hl } = _u64_js_1.default.add(this.Hh | 0, this.Hl | 0, Hh | 0, Hl | 0));\n this.set(Ah, Al, Bh, Bl, Ch, Cl, Dh, Dl, Eh, El, Fh, Fl, Gh, Gl, Hh, Hl);\n }\n roundClean() {\n SHA512_W_H2.fill(0);\n SHA512_W_L2.fill(0);\n }\n destroy() {\n this.buffer.fill(0);\n this.set(0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0);\n }\n };\n exports3.SHA512 = SHA5122;\n var SHA512_224 = class extends SHA5122 {\n constructor() {\n super();\n this.Ah = 2352822216 | 0;\n this.Al = 424955298 | 0;\n this.Bh = 1944164710 | 0;\n this.Bl = 2312950998 | 0;\n this.Ch = 502970286 | 0;\n this.Cl = 855612546 | 0;\n this.Dh = 1738396948 | 0;\n this.Dl = 1479516111 | 0;\n this.Eh = 258812777 | 0;\n this.El = 2077511080 | 0;\n this.Fh = 2011393907 | 0;\n this.Fl = 79989058 | 0;\n this.Gh = 1067287976 | 0;\n this.Gl = 1780299464 | 0;\n this.Hh = 286451373 | 0;\n this.Hl = 2446758561 | 0;\n this.outputLen = 28;\n }\n };\n var SHA512_256 = class extends SHA5122 {\n constructor() {\n super();\n this.Ah = 573645204 | 0;\n this.Al = 4230739756 | 0;\n this.Bh = 2673172387 | 0;\n this.Bl = 3360449730 | 0;\n this.Ch = 596883563 | 0;\n this.Cl = 1867755857 | 0;\n this.Dh = 2520282905 | 0;\n this.Dl = 1497426621 | 0;\n this.Eh = 2519219938 | 0;\n this.El = 2827943907 | 0;\n this.Fh = 3193839141 | 0;\n this.Fl = 1401305490 | 0;\n this.Gh = 721525244 | 0;\n this.Gl = 746961066 | 0;\n this.Hh = 246885852 | 0;\n this.Hl = 2177182882 | 0;\n this.outputLen = 32;\n }\n };\n var SHA3842 = class extends SHA5122 {\n constructor() {\n super();\n this.Ah = 3418070365 | 0;\n this.Al = 3238371032 | 0;\n this.Bh = 1654270250 | 0;\n this.Bl = 914150663 | 0;\n this.Ch = 2438529370 | 0;\n this.Cl = 812702999 | 0;\n this.Dh = 355462360 | 0;\n this.Dl = 4144912697 | 0;\n this.Eh = 1731405415 | 0;\n this.El = 4290775857 | 0;\n this.Fh = 2394180231 | 0;\n this.Fl = 1750603025 | 0;\n this.Gh = 3675008525 | 0;\n this.Gl = 1694076839 | 0;\n this.Hh = 1203062813 | 0;\n this.Hl = 3204075428 | 0;\n this.outputLen = 48;\n }\n };\n exports3.sha512 = (0, utils_js_1.wrapConstructor)(() => new SHA5122());\n exports3.sha512_224 = (0, utils_js_1.wrapConstructor)(() => new SHA512_224());\n exports3.sha512_256 = (0, utils_js_1.wrapConstructor)(() => new SHA512_256());\n exports3.sha384 = (0, utils_js_1.wrapConstructor)(() => new SHA3842());\n }\n });\n\n // ../../../node_modules/.pnpm/ethers@6.15.0_bufferutil@4.0.9_utf-8-validate@5.0.10/node_modules/ethers/lib.commonjs/crypto/crypto-browser.js\n var require_crypto_browser = __commonJS({\n \"../../../node_modules/.pnpm/ethers@6.15.0_bufferutil@4.0.9_utf-8-validate@5.0.10/node_modules/ethers/lib.commonjs/crypto/crypto-browser.js\"(exports3) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n Object.defineProperty(exports3, \"__esModule\", { value: true });\n exports3.randomBytes = exports3.pbkdf2Sync = exports3.createHmac = exports3.createHash = void 0;\n var hmac_1 = require_hmac2();\n var pbkdf2_1 = require_pbkdf2();\n var sha256_1 = require_sha256();\n var sha512_1 = require_sha512();\n var index_js_1 = require_utils8();\n function getGlobal() {\n if (typeof self !== \"undefined\") {\n return self;\n }\n if (typeof window !== \"undefined\") {\n return window;\n }\n if (typeof global !== \"undefined\") {\n return global;\n }\n throw new Error(\"unable to locate global object\");\n }\n var anyGlobal = getGlobal();\n var crypto3 = anyGlobal.crypto || anyGlobal.msCrypto;\n function createHash(algo) {\n switch (algo) {\n case \"sha256\":\n return sha256_1.sha256.create();\n case \"sha512\":\n return sha512_1.sha512.create();\n }\n (0, index_js_1.assertArgument)(false, \"invalid hashing algorithm name\", \"algorithm\", algo);\n }\n exports3.createHash = createHash;\n function createHmac(_algo, key) {\n const algo = { sha256: sha256_1.sha256, sha512: sha512_1.sha512 }[_algo];\n (0, index_js_1.assertArgument)(algo != null, \"invalid hmac algorithm\", \"algorithm\", _algo);\n return hmac_1.hmac.create(algo, key);\n }\n exports3.createHmac = createHmac;\n function pbkdf2Sync(password, salt, iterations, keylen, _algo) {\n const algo = { sha256: sha256_1.sha256, sha512: sha512_1.sha512 }[_algo];\n (0, index_js_1.assertArgument)(algo != null, \"invalid pbkdf2 algorithm\", \"algorithm\", _algo);\n return (0, pbkdf2_1.pbkdf2)(algo, password, salt, { c: iterations, dkLen: keylen });\n }\n exports3.pbkdf2Sync = pbkdf2Sync;\n function randomBytes2(length2) {\n (0, index_js_1.assert)(crypto3 != null, \"platform does not support secure random numbers\", \"UNSUPPORTED_OPERATION\", {\n operation: \"randomBytes\"\n });\n (0, index_js_1.assertArgument)(Number.isInteger(length2) && length2 > 0 && length2 <= 1024, \"invalid length\", \"length\", length2);\n const result = new Uint8Array(length2);\n crypto3.getRandomValues(result);\n return result;\n }\n exports3.randomBytes = randomBytes2;\n }\n });\n\n // ../../../node_modules/.pnpm/ethers@6.15.0_bufferutil@4.0.9_utf-8-validate@5.0.10/node_modules/ethers/lib.commonjs/crypto/hmac.js\n var require_hmac3 = __commonJS({\n \"../../../node_modules/.pnpm/ethers@6.15.0_bufferutil@4.0.9_utf-8-validate@5.0.10/node_modules/ethers/lib.commonjs/crypto/hmac.js\"(exports3) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n Object.defineProperty(exports3, \"__esModule\", { value: true });\n exports3.computeHmac = void 0;\n var crypto_js_1 = require_crypto_browser();\n var index_js_1 = require_utils8();\n var locked = false;\n var _computeHmac = function(algorithm, key, data) {\n return (0, crypto_js_1.createHmac)(algorithm, key).update(data).digest();\n };\n var __computeHmac = _computeHmac;\n function computeHmac(algorithm, _key, _data) {\n const key = (0, index_js_1.getBytes)(_key, \"key\");\n const data = (0, index_js_1.getBytes)(_data, \"data\");\n return (0, index_js_1.hexlify)(__computeHmac(algorithm, key, data));\n }\n exports3.computeHmac = computeHmac;\n computeHmac._ = _computeHmac;\n computeHmac.lock = function() {\n locked = true;\n };\n computeHmac.register = function(func) {\n if (locked) {\n throw new Error(\"computeHmac is locked\");\n }\n __computeHmac = func;\n };\n Object.freeze(computeHmac);\n }\n });\n\n // ../../../node_modules/.pnpm/@noble+hashes@1.3.2/node_modules/@noble/hashes/sha3.js\n var require_sha32 = __commonJS({\n \"../../../node_modules/.pnpm/@noble+hashes@1.3.2/node_modules/@noble/hashes/sha3.js\"(exports3) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n Object.defineProperty(exports3, \"__esModule\", { value: true });\n exports3.shake256 = exports3.shake128 = exports3.keccak_512 = exports3.keccak_384 = exports3.keccak_256 = exports3.keccak_224 = exports3.sha3_512 = exports3.sha3_384 = exports3.sha3_256 = exports3.sha3_224 = exports3.Keccak = exports3.keccakP = void 0;\n var _assert_js_1 = require_assert();\n var _u64_js_1 = require_u64();\n var utils_js_1 = require_utils9();\n var [SHA3_PI3, SHA3_ROTL3, _SHA3_IOTA3] = [[], [], []];\n var _0n12 = /* @__PURE__ */ BigInt(0);\n var _1n12 = /* @__PURE__ */ BigInt(1);\n var _2n9 = /* @__PURE__ */ BigInt(2);\n var _7n4 = /* @__PURE__ */ BigInt(7);\n var _256n3 = /* @__PURE__ */ BigInt(256);\n var _0x71n3 = /* @__PURE__ */ BigInt(113);\n for (let round = 0, R3 = _1n12, x4 = 1, y6 = 0; round < 24; round++) {\n [x4, y6] = [y6, (2 * x4 + 3 * y6) % 5];\n SHA3_PI3.push(2 * (5 * y6 + x4));\n SHA3_ROTL3.push((round + 1) * (round + 2) / 2 % 64);\n let t3 = _0n12;\n for (let j2 = 0; j2 < 7; j2++) {\n R3 = (R3 << _1n12 ^ (R3 >> _7n4) * _0x71n3) % _256n3;\n if (R3 & _2n9)\n t3 ^= _1n12 << (_1n12 << /* @__PURE__ */ BigInt(j2)) - _1n12;\n }\n _SHA3_IOTA3.push(t3);\n }\n var [SHA3_IOTA_H3, SHA3_IOTA_L3] = /* @__PURE__ */ (0, _u64_js_1.split)(_SHA3_IOTA3, true);\n var rotlH3 = (h4, l6, s4) => s4 > 32 ? (0, _u64_js_1.rotlBH)(h4, l6, s4) : (0, _u64_js_1.rotlSH)(h4, l6, s4);\n var rotlL3 = (h4, l6, s4) => s4 > 32 ? (0, _u64_js_1.rotlBL)(h4, l6, s4) : (0, _u64_js_1.rotlSL)(h4, l6, s4);\n function keccakP3(s4, rounds = 24) {\n const B2 = new Uint32Array(5 * 2);\n for (let round = 24 - rounds; round < 24; round++) {\n for (let x4 = 0; x4 < 10; x4++)\n B2[x4] = s4[x4] ^ s4[x4 + 10] ^ s4[x4 + 20] ^ s4[x4 + 30] ^ s4[x4 + 40];\n for (let x4 = 0; x4 < 10; x4 += 2) {\n const idx1 = (x4 + 8) % 10;\n const idx0 = (x4 + 2) % 10;\n const B0 = B2[idx0];\n const B1 = B2[idx0 + 1];\n const Th = rotlH3(B0, B1, 1) ^ B2[idx1];\n const Tl = rotlL3(B0, B1, 1) ^ B2[idx1 + 1];\n for (let y6 = 0; y6 < 50; y6 += 10) {\n s4[x4 + y6] ^= Th;\n s4[x4 + y6 + 1] ^= Tl;\n }\n }\n let curH = s4[2];\n let curL = s4[3];\n for (let t3 = 0; t3 < 24; t3++) {\n const shift = SHA3_ROTL3[t3];\n const Th = rotlH3(curH, curL, shift);\n const Tl = rotlL3(curH, curL, shift);\n const PI = SHA3_PI3[t3];\n curH = s4[PI];\n curL = s4[PI + 1];\n s4[PI] = Th;\n s4[PI + 1] = Tl;\n }\n for (let y6 = 0; y6 < 50; y6 += 10) {\n for (let x4 = 0; x4 < 10; x4++)\n B2[x4] = s4[y6 + x4];\n for (let x4 = 0; x4 < 10; x4++)\n s4[y6 + x4] ^= ~B2[(x4 + 2) % 10] & B2[(x4 + 4) % 10];\n }\n s4[0] ^= SHA3_IOTA_H3[round];\n s4[1] ^= SHA3_IOTA_L3[round];\n }\n B2.fill(0);\n }\n exports3.keccakP = keccakP3;\n var Keccak3 = class _Keccak extends utils_js_1.Hash {\n // NOTE: we accept arguments in bytes instead of bits here.\n constructor(blockLen, suffix, outputLen, enableXOF = false, rounds = 24) {\n super();\n this.blockLen = blockLen;\n this.suffix = suffix;\n this.outputLen = outputLen;\n this.enableXOF = enableXOF;\n this.rounds = rounds;\n this.pos = 0;\n this.posOut = 0;\n this.finished = false;\n this.destroyed = false;\n (0, _assert_js_1.number)(outputLen);\n if (0 >= this.blockLen || this.blockLen >= 200)\n throw new Error(\"Sha3 supports only keccak-f1600 function\");\n this.state = new Uint8Array(200);\n this.state32 = (0, utils_js_1.u32)(this.state);\n }\n keccak() {\n keccakP3(this.state32, this.rounds);\n this.posOut = 0;\n this.pos = 0;\n }\n update(data) {\n (0, _assert_js_1.exists)(this);\n const { blockLen, state } = this;\n data = (0, utils_js_1.toBytes)(data);\n const len = data.length;\n for (let pos = 0; pos < len; ) {\n const take = Math.min(blockLen - this.pos, len - pos);\n for (let i3 = 0; i3 < take; i3++)\n state[this.pos++] ^= data[pos++];\n if (this.pos === blockLen)\n this.keccak();\n }\n return this;\n }\n finish() {\n if (this.finished)\n return;\n this.finished = true;\n const { state, suffix, pos, blockLen } = this;\n state[pos] ^= suffix;\n if ((suffix & 128) !== 0 && pos === blockLen - 1)\n this.keccak();\n state[blockLen - 1] ^= 128;\n this.keccak();\n }\n writeInto(out) {\n (0, _assert_js_1.exists)(this, false);\n (0, _assert_js_1.bytes)(out);\n this.finish();\n const bufferOut = this.state;\n const { blockLen } = this;\n for (let pos = 0, len = out.length; pos < len; ) {\n if (this.posOut >= blockLen)\n this.keccak();\n const take = Math.min(blockLen - this.posOut, len - pos);\n out.set(bufferOut.subarray(this.posOut, this.posOut + take), pos);\n this.posOut += take;\n pos += take;\n }\n return out;\n }\n xofInto(out) {\n if (!this.enableXOF)\n throw new Error(\"XOF is not possible for this instance\");\n return this.writeInto(out);\n }\n xof(bytes) {\n (0, _assert_js_1.number)(bytes);\n return this.xofInto(new Uint8Array(bytes));\n }\n digestInto(out) {\n (0, _assert_js_1.output)(out, this);\n if (this.finished)\n throw new Error(\"digest() was already called\");\n this.writeInto(out);\n this.destroy();\n return out;\n }\n digest() {\n return this.digestInto(new Uint8Array(this.outputLen));\n }\n destroy() {\n this.destroyed = true;\n this.state.fill(0);\n }\n _cloneInto(to) {\n const { blockLen, suffix, outputLen, rounds, enableXOF } = this;\n to || (to = new _Keccak(blockLen, suffix, outputLen, enableXOF, rounds));\n to.state32.set(this.state32);\n to.pos = this.pos;\n to.posOut = this.posOut;\n to.finished = this.finished;\n to.rounds = rounds;\n to.suffix = suffix;\n to.outputLen = outputLen;\n to.enableXOF = enableXOF;\n to.destroyed = this.destroyed;\n return to;\n }\n };\n exports3.Keccak = Keccak3;\n var gen2 = (suffix, blockLen, outputLen) => (0, utils_js_1.wrapConstructor)(() => new Keccak3(blockLen, suffix, outputLen));\n exports3.sha3_224 = gen2(6, 144, 224 / 8);\n exports3.sha3_256 = gen2(6, 136, 256 / 8);\n exports3.sha3_384 = gen2(6, 104, 384 / 8);\n exports3.sha3_512 = gen2(6, 72, 512 / 8);\n exports3.keccak_224 = gen2(1, 144, 224 / 8);\n exports3.keccak_256 = gen2(1, 136, 256 / 8);\n exports3.keccak_384 = gen2(1, 104, 384 / 8);\n exports3.keccak_512 = gen2(1, 72, 512 / 8);\n var genShake = (suffix, blockLen, outputLen) => (0, utils_js_1.wrapXOFConstructorWithOpts)((opts = {}) => new Keccak3(blockLen, suffix, opts.dkLen === void 0 ? outputLen : opts.dkLen, true));\n exports3.shake128 = genShake(31, 168, 128 / 8);\n exports3.shake256 = genShake(31, 136, 256 / 8);\n }\n });\n\n // ../../../node_modules/.pnpm/ethers@6.15.0_bufferutil@4.0.9_utf-8-validate@5.0.10/node_modules/ethers/lib.commonjs/crypto/keccak.js\n var require_keccak = __commonJS({\n \"../../../node_modules/.pnpm/ethers@6.15.0_bufferutil@4.0.9_utf-8-validate@5.0.10/node_modules/ethers/lib.commonjs/crypto/keccak.js\"(exports3) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n Object.defineProperty(exports3, \"__esModule\", { value: true });\n exports3.keccak256 = void 0;\n var sha3_1 = require_sha32();\n var index_js_1 = require_utils8();\n var locked = false;\n var _keccak256 = function(data) {\n return (0, sha3_1.keccak_256)(data);\n };\n var __keccak256 = _keccak256;\n function keccak2563(_data) {\n const data = (0, index_js_1.getBytes)(_data, \"data\");\n return (0, index_js_1.hexlify)(__keccak256(data));\n }\n exports3.keccak256 = keccak2563;\n keccak2563._ = _keccak256;\n keccak2563.lock = function() {\n locked = true;\n };\n keccak2563.register = function(func) {\n if (locked) {\n throw new TypeError(\"keccak256 is locked\");\n }\n __keccak256 = func;\n };\n Object.freeze(keccak2563);\n }\n });\n\n // ../../../node_modules/.pnpm/@noble+hashes@1.3.2/node_modules/@noble/hashes/ripemd160.js\n var require_ripemd160 = __commonJS({\n \"../../../node_modules/.pnpm/@noble+hashes@1.3.2/node_modules/@noble/hashes/ripemd160.js\"(exports3) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n Object.defineProperty(exports3, \"__esModule\", { value: true });\n exports3.ripemd160 = exports3.RIPEMD160 = void 0;\n var _sha2_js_1 = require_sha2();\n var utils_js_1 = require_utils9();\n var Rho = /* @__PURE__ */ new Uint8Array([7, 4, 13, 1, 10, 6, 15, 3, 12, 0, 9, 5, 2, 14, 11, 8]);\n var Id = /* @__PURE__ */ Uint8Array.from({ length: 16 }, (_2, i3) => i3);\n var Pi = /* @__PURE__ */ Id.map((i3) => (9 * i3 + 5) % 16);\n var idxL2 = [Id];\n var idxR2 = [Pi];\n for (let i3 = 0; i3 < 4; i3++)\n for (let j2 of [idxL2, idxR2])\n j2.push(j2[i3].map((k4) => Rho[k4]));\n var shifts = /* @__PURE__ */ [\n [11, 14, 15, 12, 5, 8, 7, 9, 11, 13, 14, 15, 6, 7, 9, 8],\n [12, 13, 11, 15, 6, 9, 9, 7, 12, 15, 11, 13, 7, 8, 7, 7],\n [13, 15, 14, 11, 7, 7, 6, 8, 13, 14, 13, 12, 5, 5, 6, 9],\n [14, 11, 12, 14, 8, 6, 5, 5, 15, 12, 15, 14, 9, 9, 8, 6],\n [15, 12, 13, 13, 9, 5, 8, 6, 14, 11, 12, 11, 8, 6, 5, 5]\n ].map((i3) => new Uint8Array(i3));\n var shiftsL = /* @__PURE__ */ idxL2.map((idx, i3) => idx.map((j2) => shifts[i3][j2]));\n var shiftsR = /* @__PURE__ */ idxR2.map((idx, i3) => idx.map((j2) => shifts[i3][j2]));\n var Kl = /* @__PURE__ */ new Uint32Array([\n 0,\n 1518500249,\n 1859775393,\n 2400959708,\n 2840853838\n ]);\n var Kr = /* @__PURE__ */ new Uint32Array([\n 1352829926,\n 1548603684,\n 1836072691,\n 2053994217,\n 0\n ]);\n var rotl2 = (word, shift) => word << shift | word >>> 32 - shift;\n function f6(group, x4, y6, z2) {\n if (group === 0)\n return x4 ^ y6 ^ z2;\n else if (group === 1)\n return x4 & y6 | ~x4 & z2;\n else if (group === 2)\n return (x4 | ~y6) ^ z2;\n else if (group === 3)\n return x4 & z2 | y6 & ~z2;\n else\n return x4 ^ (y6 | ~z2);\n }\n var BUF = /* @__PURE__ */ new Uint32Array(16);\n var RIPEMD1602 = class extends _sha2_js_1.SHA2 {\n constructor() {\n super(64, 20, 8, true);\n this.h0 = 1732584193 | 0;\n this.h1 = 4023233417 | 0;\n this.h2 = 2562383102 | 0;\n this.h3 = 271733878 | 0;\n this.h4 = 3285377520 | 0;\n }\n get() {\n const { h0, h1, h2: h22, h3: h32, h4 } = this;\n return [h0, h1, h22, h32, h4];\n }\n set(h0, h1, h22, h32, h4) {\n this.h0 = h0 | 0;\n this.h1 = h1 | 0;\n this.h2 = h22 | 0;\n this.h3 = h32 | 0;\n this.h4 = h4 | 0;\n }\n process(view, offset) {\n for (let i3 = 0; i3 < 16; i3++, offset += 4)\n BUF[i3] = view.getUint32(offset, true);\n let al = this.h0 | 0, ar = al, bl = this.h1 | 0, br = bl, cl = this.h2 | 0, cr = cl, dl = this.h3 | 0, dr = dl, el = this.h4 | 0, er = el;\n for (let group = 0; group < 5; group++) {\n const rGroup = 4 - group;\n const hbl = Kl[group], hbr = Kr[group];\n const rl = idxL2[group], rr = idxR2[group];\n const sl = shiftsL[group], sr = shiftsR[group];\n for (let i3 = 0; i3 < 16; i3++) {\n const tl = rotl2(al + f6(group, bl, cl, dl) + BUF[rl[i3]] + hbl, sl[i3]) + el | 0;\n al = el, el = dl, dl = rotl2(cl, 10) | 0, cl = bl, bl = tl;\n }\n for (let i3 = 0; i3 < 16; i3++) {\n const tr = rotl2(ar + f6(rGroup, br, cr, dr) + BUF[rr[i3]] + hbr, sr[i3]) + er | 0;\n ar = er, er = dr, dr = rotl2(cr, 10) | 0, cr = br, br = tr;\n }\n }\n this.set(this.h1 + cl + dr | 0, this.h2 + dl + er | 0, this.h3 + el + ar | 0, this.h4 + al + br | 0, this.h0 + bl + cr | 0);\n }\n roundClean() {\n BUF.fill(0);\n }\n destroy() {\n this.destroyed = true;\n this.buffer.fill(0);\n this.set(0, 0, 0, 0, 0);\n }\n };\n exports3.RIPEMD160 = RIPEMD1602;\n exports3.ripemd160 = (0, utils_js_1.wrapConstructor)(() => new RIPEMD1602());\n }\n });\n\n // ../../../node_modules/.pnpm/ethers@6.15.0_bufferutil@4.0.9_utf-8-validate@5.0.10/node_modules/ethers/lib.commonjs/crypto/ripemd160.js\n var require_ripemd1602 = __commonJS({\n \"../../../node_modules/.pnpm/ethers@6.15.0_bufferutil@4.0.9_utf-8-validate@5.0.10/node_modules/ethers/lib.commonjs/crypto/ripemd160.js\"(exports3) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n Object.defineProperty(exports3, \"__esModule\", { value: true });\n exports3.ripemd160 = void 0;\n var ripemd160_1 = require_ripemd160();\n var index_js_1 = require_utils8();\n var locked = false;\n var _ripemd160 = function(data) {\n return (0, ripemd160_1.ripemd160)(data);\n };\n var __ripemd160 = _ripemd160;\n function ripemd1602(_data) {\n const data = (0, index_js_1.getBytes)(_data, \"data\");\n return (0, index_js_1.hexlify)(__ripemd160(data));\n }\n exports3.ripemd160 = ripemd1602;\n ripemd1602._ = _ripemd160;\n ripemd1602.lock = function() {\n locked = true;\n };\n ripemd1602.register = function(func) {\n if (locked) {\n throw new TypeError(\"ripemd160 is locked\");\n }\n __ripemd160 = func;\n };\n Object.freeze(ripemd1602);\n }\n });\n\n // ../../../node_modules/.pnpm/ethers@6.15.0_bufferutil@4.0.9_utf-8-validate@5.0.10/node_modules/ethers/lib.commonjs/crypto/pbkdf2.js\n var require_pbkdf22 = __commonJS({\n \"../../../node_modules/.pnpm/ethers@6.15.0_bufferutil@4.0.9_utf-8-validate@5.0.10/node_modules/ethers/lib.commonjs/crypto/pbkdf2.js\"(exports3) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n Object.defineProperty(exports3, \"__esModule\", { value: true });\n exports3.pbkdf2 = void 0;\n var crypto_js_1 = require_crypto_browser();\n var index_js_1 = require_utils8();\n var locked = false;\n var _pbkdf2 = function(password, salt, iterations, keylen, algo) {\n return (0, crypto_js_1.pbkdf2Sync)(password, salt, iterations, keylen, algo);\n };\n var __pbkdf2 = _pbkdf2;\n function pbkdf22(_password, _salt, iterations, keylen, algo) {\n const password = (0, index_js_1.getBytes)(_password, \"password\");\n const salt = (0, index_js_1.getBytes)(_salt, \"salt\");\n return (0, index_js_1.hexlify)(__pbkdf2(password, salt, iterations, keylen, algo));\n }\n exports3.pbkdf2 = pbkdf22;\n pbkdf22._ = _pbkdf2;\n pbkdf22.lock = function() {\n locked = true;\n };\n pbkdf22.register = function(func) {\n if (locked) {\n throw new Error(\"pbkdf2 is locked\");\n }\n __pbkdf2 = func;\n };\n Object.freeze(pbkdf22);\n }\n });\n\n // ../../../node_modules/.pnpm/ethers@6.15.0_bufferutil@4.0.9_utf-8-validate@5.0.10/node_modules/ethers/lib.commonjs/crypto/random.js\n var require_random = __commonJS({\n \"../../../node_modules/.pnpm/ethers@6.15.0_bufferutil@4.0.9_utf-8-validate@5.0.10/node_modules/ethers/lib.commonjs/crypto/random.js\"(exports3) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n Object.defineProperty(exports3, \"__esModule\", { value: true });\n exports3.randomBytes = void 0;\n var crypto_js_1 = require_crypto_browser();\n var locked = false;\n var _randomBytes = function(length2) {\n return new Uint8Array((0, crypto_js_1.randomBytes)(length2));\n };\n var __randomBytes = _randomBytes;\n function randomBytes2(length2) {\n return __randomBytes(length2);\n }\n exports3.randomBytes = randomBytes2;\n randomBytes2._ = _randomBytes;\n randomBytes2.lock = function() {\n locked = true;\n };\n randomBytes2.register = function(func) {\n if (locked) {\n throw new Error(\"randomBytes is locked\");\n }\n __randomBytes = func;\n };\n Object.freeze(randomBytes2);\n }\n });\n\n // ../../../node_modules/.pnpm/@noble+hashes@1.3.2/node_modules/@noble/hashes/scrypt.js\n var require_scrypt2 = __commonJS({\n \"../../../node_modules/.pnpm/@noble+hashes@1.3.2/node_modules/@noble/hashes/scrypt.js\"(exports3) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n Object.defineProperty(exports3, \"__esModule\", { value: true });\n exports3.scryptAsync = exports3.scrypt = void 0;\n var _assert_js_1 = require_assert();\n var sha256_js_1 = require_sha256();\n var pbkdf2_js_1 = require_pbkdf2();\n var utils_js_1 = require_utils9();\n var rotl2 = (a3, b4) => a3 << b4 | a3 >>> 32 - b4;\n function XorAndSalsa(prev, pi, input, ii, out, oi) {\n let y00 = prev[pi++] ^ input[ii++], y01 = prev[pi++] ^ input[ii++];\n let y02 = prev[pi++] ^ input[ii++], y03 = prev[pi++] ^ input[ii++];\n let y04 = prev[pi++] ^ input[ii++], y05 = prev[pi++] ^ input[ii++];\n let y06 = prev[pi++] ^ input[ii++], y07 = prev[pi++] ^ input[ii++];\n let y08 = prev[pi++] ^ input[ii++], y09 = prev[pi++] ^ input[ii++];\n let y10 = prev[pi++] ^ input[ii++], y11 = prev[pi++] ^ input[ii++];\n let y12 = prev[pi++] ^ input[ii++], y13 = prev[pi++] ^ input[ii++];\n let y14 = prev[pi++] ^ input[ii++], y15 = prev[pi++] ^ input[ii++];\n let x00 = y00, x01 = y01, x02 = y02, x03 = y03, x04 = y04, x05 = y05, x06 = y06, x07 = y07, x08 = y08, x09 = y09, x10 = y10, x11 = y11, x12 = y12, x13 = y13, x14 = y14, x15 = y15;\n for (let i3 = 0; i3 < 8; i3 += 2) {\n x04 ^= rotl2(x00 + x12 | 0, 7);\n x08 ^= rotl2(x04 + x00 | 0, 9);\n x12 ^= rotl2(x08 + x04 | 0, 13);\n x00 ^= rotl2(x12 + x08 | 0, 18);\n x09 ^= rotl2(x05 + x01 | 0, 7);\n x13 ^= rotl2(x09 + x05 | 0, 9);\n x01 ^= rotl2(x13 + x09 | 0, 13);\n x05 ^= rotl2(x01 + x13 | 0, 18);\n x14 ^= rotl2(x10 + x06 | 0, 7);\n x02 ^= rotl2(x14 + x10 | 0, 9);\n x06 ^= rotl2(x02 + x14 | 0, 13);\n x10 ^= rotl2(x06 + x02 | 0, 18);\n x03 ^= rotl2(x15 + x11 | 0, 7);\n x07 ^= rotl2(x03 + x15 | 0, 9);\n x11 ^= rotl2(x07 + x03 | 0, 13);\n x15 ^= rotl2(x11 + x07 | 0, 18);\n x01 ^= rotl2(x00 + x03 | 0, 7);\n x02 ^= rotl2(x01 + x00 | 0, 9);\n x03 ^= rotl2(x02 + x01 | 0, 13);\n x00 ^= rotl2(x03 + x02 | 0, 18);\n x06 ^= rotl2(x05 + x04 | 0, 7);\n x07 ^= rotl2(x06 + x05 | 0, 9);\n x04 ^= rotl2(x07 + x06 | 0, 13);\n x05 ^= rotl2(x04 + x07 | 0, 18);\n x11 ^= rotl2(x10 + x09 | 0, 7);\n x08 ^= rotl2(x11 + x10 | 0, 9);\n x09 ^= rotl2(x08 + x11 | 0, 13);\n x10 ^= rotl2(x09 + x08 | 0, 18);\n x12 ^= rotl2(x15 + x14 | 0, 7);\n x13 ^= rotl2(x12 + x15 | 0, 9);\n x14 ^= rotl2(x13 + x12 | 0, 13);\n x15 ^= rotl2(x14 + x13 | 0, 18);\n }\n out[oi++] = y00 + x00 | 0;\n out[oi++] = y01 + x01 | 0;\n out[oi++] = y02 + x02 | 0;\n out[oi++] = y03 + x03 | 0;\n out[oi++] = y04 + x04 | 0;\n out[oi++] = y05 + x05 | 0;\n out[oi++] = y06 + x06 | 0;\n out[oi++] = y07 + x07 | 0;\n out[oi++] = y08 + x08 | 0;\n out[oi++] = y09 + x09 | 0;\n out[oi++] = y10 + x10 | 0;\n out[oi++] = y11 + x11 | 0;\n out[oi++] = y12 + x12 | 0;\n out[oi++] = y13 + x13 | 0;\n out[oi++] = y14 + x14 | 0;\n out[oi++] = y15 + x15 | 0;\n }\n function BlockMix(input, ii, out, oi, r2) {\n let head = oi + 0;\n let tail = oi + 16 * r2;\n for (let i3 = 0; i3 < 16; i3++)\n out[tail + i3] = input[ii + (2 * r2 - 1) * 16 + i3];\n for (let i3 = 0; i3 < r2; i3++, head += 16, ii += 16) {\n XorAndSalsa(out, tail, input, ii, out, head);\n if (i3 > 0)\n tail += 16;\n XorAndSalsa(out, head, input, ii += 16, out, tail);\n }\n }\n function scryptInit(password, salt, _opts) {\n const opts = (0, utils_js_1.checkOpts)({\n dkLen: 32,\n asyncTick: 10,\n maxmem: 1024 ** 3 + 1024\n }, _opts);\n const { N: N4, r: r2, p: p4, dkLen, asyncTick, maxmem, onProgress } = opts;\n (0, _assert_js_1.number)(N4);\n (0, _assert_js_1.number)(r2);\n (0, _assert_js_1.number)(p4);\n (0, _assert_js_1.number)(dkLen);\n (0, _assert_js_1.number)(asyncTick);\n (0, _assert_js_1.number)(maxmem);\n if (onProgress !== void 0 && typeof onProgress !== \"function\")\n throw new Error(\"progressCb should be function\");\n const blockSize = 128 * r2;\n const blockSize32 = blockSize / 4;\n if (N4 <= 1 || (N4 & N4 - 1) !== 0 || N4 >= 2 ** (blockSize / 8) || N4 > 2 ** 32) {\n throw new Error(\"Scrypt: N must be larger than 1, a power of 2, less than 2^(128 * r / 8) and less than 2^32\");\n }\n if (p4 < 0 || p4 > (2 ** 32 - 1) * 32 / blockSize) {\n throw new Error(\"Scrypt: p must be a positive integer less than or equal to ((2^32 - 1) * 32) / (128 * r)\");\n }\n if (dkLen < 0 || dkLen > (2 ** 32 - 1) * 32) {\n throw new Error(\"Scrypt: dkLen should be positive integer less than or equal to (2^32 - 1) * 32\");\n }\n const memUsed = blockSize * (N4 + p4);\n if (memUsed > maxmem) {\n throw new Error(`Scrypt: parameters too large, ${memUsed} (128 * r * (N + p)) > ${maxmem} (maxmem)`);\n }\n const B2 = (0, pbkdf2_js_1.pbkdf2)(sha256_js_1.sha256, password, salt, { c: 1, dkLen: blockSize * p4 });\n const B32 = (0, utils_js_1.u32)(B2);\n const V2 = (0, utils_js_1.u32)(new Uint8Array(blockSize * N4));\n const tmp = (0, utils_js_1.u32)(new Uint8Array(blockSize));\n let blockMixCb = () => {\n };\n if (onProgress) {\n const totalBlockMix = 2 * N4 * p4;\n const callbackPer = Math.max(Math.floor(totalBlockMix / 1e4), 1);\n let blockMixCnt = 0;\n blockMixCb = () => {\n blockMixCnt++;\n if (onProgress && (!(blockMixCnt % callbackPer) || blockMixCnt === totalBlockMix))\n onProgress(blockMixCnt / totalBlockMix);\n };\n }\n return { N: N4, r: r2, p: p4, dkLen, blockSize32, V: V2, B32, B: B2, tmp, blockMixCb, asyncTick };\n }\n function scryptOutput(password, dkLen, B2, V2, tmp) {\n const res = (0, pbkdf2_js_1.pbkdf2)(sha256_js_1.sha256, password, B2, { c: 1, dkLen });\n B2.fill(0);\n V2.fill(0);\n tmp.fill(0);\n return res;\n }\n function scrypt(password, salt, opts) {\n const { N: N4, r: r2, p: p4, dkLen, blockSize32, V: V2, B32, B: B2, tmp, blockMixCb } = scryptInit(password, salt, opts);\n for (let pi = 0; pi < p4; pi++) {\n const Pi = blockSize32 * pi;\n for (let i3 = 0; i3 < blockSize32; i3++)\n V2[i3] = B32[Pi + i3];\n for (let i3 = 0, pos = 0; i3 < N4 - 1; i3++) {\n BlockMix(V2, pos, V2, pos += blockSize32, r2);\n blockMixCb();\n }\n BlockMix(V2, (N4 - 1) * blockSize32, B32, Pi, r2);\n blockMixCb();\n for (let i3 = 0; i3 < N4; i3++) {\n const j2 = B32[Pi + blockSize32 - 16] % N4;\n for (let k4 = 0; k4 < blockSize32; k4++)\n tmp[k4] = B32[Pi + k4] ^ V2[j2 * blockSize32 + k4];\n BlockMix(tmp, 0, B32, Pi, r2);\n blockMixCb();\n }\n }\n return scryptOutput(password, dkLen, B2, V2, tmp);\n }\n exports3.scrypt = scrypt;\n async function scryptAsync(password, salt, opts) {\n const { N: N4, r: r2, p: p4, dkLen, blockSize32, V: V2, B32, B: B2, tmp, blockMixCb, asyncTick } = scryptInit(password, salt, opts);\n for (let pi = 0; pi < p4; pi++) {\n const Pi = blockSize32 * pi;\n for (let i3 = 0; i3 < blockSize32; i3++)\n V2[i3] = B32[Pi + i3];\n let pos = 0;\n await (0, utils_js_1.asyncLoop)(N4 - 1, asyncTick, () => {\n BlockMix(V2, pos, V2, pos += blockSize32, r2);\n blockMixCb();\n });\n BlockMix(V2, (N4 - 1) * blockSize32, B32, Pi, r2);\n blockMixCb();\n await (0, utils_js_1.asyncLoop)(N4, asyncTick, () => {\n const j2 = B32[Pi + blockSize32 - 16] % N4;\n for (let k4 = 0; k4 < blockSize32; k4++)\n tmp[k4] = B32[Pi + k4] ^ V2[j2 * blockSize32 + k4];\n BlockMix(tmp, 0, B32, Pi, r2);\n blockMixCb();\n });\n }\n return scryptOutput(password, dkLen, B2, V2, tmp);\n }\n exports3.scryptAsync = scryptAsync;\n }\n });\n\n // ../../../node_modules/.pnpm/ethers@6.15.0_bufferutil@4.0.9_utf-8-validate@5.0.10/node_modules/ethers/lib.commonjs/crypto/scrypt.js\n var require_scrypt3 = __commonJS({\n \"../../../node_modules/.pnpm/ethers@6.15.0_bufferutil@4.0.9_utf-8-validate@5.0.10/node_modules/ethers/lib.commonjs/crypto/scrypt.js\"(exports3) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n Object.defineProperty(exports3, \"__esModule\", { value: true });\n exports3.scryptSync = exports3.scrypt = void 0;\n var scrypt_1 = require_scrypt2();\n var index_js_1 = require_utils8();\n var lockedSync = false;\n var lockedAsync = false;\n var _scryptAsync = async function(passwd, salt, N4, r2, p4, dkLen, onProgress) {\n return await (0, scrypt_1.scryptAsync)(passwd, salt, { N: N4, r: r2, p: p4, dkLen, onProgress });\n };\n var _scryptSync = function(passwd, salt, N4, r2, p4, dkLen) {\n return (0, scrypt_1.scrypt)(passwd, salt, { N: N4, r: r2, p: p4, dkLen });\n };\n var __scryptAsync = _scryptAsync;\n var __scryptSync = _scryptSync;\n async function scrypt(_passwd, _salt, N4, r2, p4, dkLen, progress) {\n const passwd = (0, index_js_1.getBytes)(_passwd, \"passwd\");\n const salt = (0, index_js_1.getBytes)(_salt, \"salt\");\n return (0, index_js_1.hexlify)(await __scryptAsync(passwd, salt, N4, r2, p4, dkLen, progress));\n }\n exports3.scrypt = scrypt;\n scrypt._ = _scryptAsync;\n scrypt.lock = function() {\n lockedAsync = true;\n };\n scrypt.register = function(func) {\n if (lockedAsync) {\n throw new Error(\"scrypt is locked\");\n }\n __scryptAsync = func;\n };\n Object.freeze(scrypt);\n function scryptSync(_passwd, _salt, N4, r2, p4, dkLen) {\n const passwd = (0, index_js_1.getBytes)(_passwd, \"passwd\");\n const salt = (0, index_js_1.getBytes)(_salt, \"salt\");\n return (0, index_js_1.hexlify)(__scryptSync(passwd, salt, N4, r2, p4, dkLen));\n }\n exports3.scryptSync = scryptSync;\n scryptSync._ = _scryptSync;\n scryptSync.lock = function() {\n lockedSync = true;\n };\n scryptSync.register = function(func) {\n if (lockedSync) {\n throw new Error(\"scryptSync is locked\");\n }\n __scryptSync = func;\n };\n Object.freeze(scryptSync);\n }\n });\n\n // ../../../node_modules/.pnpm/ethers@6.15.0_bufferutil@4.0.9_utf-8-validate@5.0.10/node_modules/ethers/lib.commonjs/crypto/sha2.js\n var require_sha22 = __commonJS({\n \"../../../node_modules/.pnpm/ethers@6.15.0_bufferutil@4.0.9_utf-8-validate@5.0.10/node_modules/ethers/lib.commonjs/crypto/sha2.js\"(exports3) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n Object.defineProperty(exports3, \"__esModule\", { value: true });\n exports3.sha512 = exports3.sha256 = void 0;\n var crypto_js_1 = require_crypto_browser();\n var index_js_1 = require_utils8();\n var _sha256 = function(data) {\n return (0, crypto_js_1.createHash)(\"sha256\").update(data).digest();\n };\n var _sha512 = function(data) {\n return (0, crypto_js_1.createHash)(\"sha512\").update(data).digest();\n };\n var __sha256 = _sha256;\n var __sha512 = _sha512;\n var locked256 = false;\n var locked512 = false;\n function sha2564(_data) {\n const data = (0, index_js_1.getBytes)(_data, \"data\");\n return (0, index_js_1.hexlify)(__sha256(data));\n }\n exports3.sha256 = sha2564;\n sha2564._ = _sha256;\n sha2564.lock = function() {\n locked256 = true;\n };\n sha2564.register = function(func) {\n if (locked256) {\n throw new Error(\"sha256 is locked\");\n }\n __sha256 = func;\n };\n Object.freeze(sha2564);\n function sha5122(_data) {\n const data = (0, index_js_1.getBytes)(_data, \"data\");\n return (0, index_js_1.hexlify)(__sha512(data));\n }\n exports3.sha512 = sha5122;\n sha5122._ = _sha512;\n sha5122.lock = function() {\n locked512 = true;\n };\n sha5122.register = function(func) {\n if (locked512) {\n throw new Error(\"sha512 is locked\");\n }\n __sha512 = func;\n };\n Object.freeze(sha2564);\n }\n });\n\n // ../../../node_modules/.pnpm/@noble+curves@1.2.0/node_modules/@noble/curves/abstract/utils.js\n var require_utils10 = __commonJS({\n \"../../../node_modules/.pnpm/@noble+curves@1.2.0/node_modules/@noble/curves/abstract/utils.js\"(exports3) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n Object.defineProperty(exports3, \"__esModule\", { value: true });\n exports3.validateObject = exports3.createHmacDrbg = exports3.bitMask = exports3.bitSet = exports3.bitGet = exports3.bitLen = exports3.utf8ToBytes = exports3.equalBytes = exports3.concatBytes = exports3.ensureBytes = exports3.numberToVarBytesBE = exports3.numberToBytesLE = exports3.numberToBytesBE = exports3.bytesToNumberLE = exports3.bytesToNumberBE = exports3.hexToBytes = exports3.hexToNumber = exports3.numberToHexUnpadded = exports3.bytesToHex = void 0;\n var _0n12 = BigInt(0);\n var _1n12 = BigInt(1);\n var _2n9 = BigInt(2);\n var u8a = (a3) => a3 instanceof Uint8Array;\n var hexes7 = /* @__PURE__ */ Array.from({ length: 256 }, (_2, i3) => i3.toString(16).padStart(2, \"0\"));\n function bytesToHex6(bytes) {\n if (!u8a(bytes))\n throw new Error(\"Uint8Array expected\");\n let hex = \"\";\n for (let i3 = 0; i3 < bytes.length; i3++) {\n hex += hexes7[bytes[i3]];\n }\n return hex;\n }\n exports3.bytesToHex = bytesToHex6;\n function numberToHexUnpadded3(num2) {\n const hex = num2.toString(16);\n return hex.length & 1 ? `0${hex}` : hex;\n }\n exports3.numberToHexUnpadded = numberToHexUnpadded3;\n function hexToNumber4(hex) {\n if (typeof hex !== \"string\")\n throw new Error(\"hex string expected, got \" + typeof hex);\n return BigInt(hex === \"\" ? \"0\" : `0x${hex}`);\n }\n exports3.hexToNumber = hexToNumber4;\n function hexToBytes6(hex) {\n if (typeof hex !== \"string\")\n throw new Error(\"hex string expected, got \" + typeof hex);\n const len = hex.length;\n if (len % 2)\n throw new Error(\"padded hex string expected, got unpadded hex of length \" + len);\n const array2 = new Uint8Array(len / 2);\n for (let i3 = 0; i3 < array2.length; i3++) {\n const j2 = i3 * 2;\n const hexByte = hex.slice(j2, j2 + 2);\n const byte = Number.parseInt(hexByte, 16);\n if (Number.isNaN(byte) || byte < 0)\n throw new Error(\"Invalid byte sequence\");\n array2[i3] = byte;\n }\n return array2;\n }\n exports3.hexToBytes = hexToBytes6;\n function bytesToNumberBE3(bytes) {\n return hexToNumber4(bytesToHex6(bytes));\n }\n exports3.bytesToNumberBE = bytesToNumberBE3;\n function bytesToNumberLE3(bytes) {\n if (!u8a(bytes))\n throw new Error(\"Uint8Array expected\");\n return hexToNumber4(bytesToHex6(Uint8Array.from(bytes).reverse()));\n }\n exports3.bytesToNumberLE = bytesToNumberLE3;\n function numberToBytesBE3(n2, len) {\n return hexToBytes6(n2.toString(16).padStart(len * 2, \"0\"));\n }\n exports3.numberToBytesBE = numberToBytesBE3;\n function numberToBytesLE3(n2, len) {\n return numberToBytesBE3(n2, len).reverse();\n }\n exports3.numberToBytesLE = numberToBytesLE3;\n function numberToVarBytesBE(n2) {\n return hexToBytes6(numberToHexUnpadded3(n2));\n }\n exports3.numberToVarBytesBE = numberToVarBytesBE;\n function ensureBytes3(title2, hex, expectedLength) {\n let res;\n if (typeof hex === \"string\") {\n try {\n res = hexToBytes6(hex);\n } catch (e3) {\n throw new Error(`${title2} must be valid hex string, got \"${hex}\". Cause: ${e3}`);\n }\n } else if (u8a(hex)) {\n res = Uint8Array.from(hex);\n } else {\n throw new Error(`${title2} must be hex string or Uint8Array`);\n }\n const len = res.length;\n if (typeof expectedLength === \"number\" && len !== expectedLength)\n throw new Error(`${title2} expected ${expectedLength} bytes, got ${len}`);\n return res;\n }\n exports3.ensureBytes = ensureBytes3;\n function concatBytes5(...arrays) {\n const r2 = new Uint8Array(arrays.reduce((sum, a3) => sum + a3.length, 0));\n let pad6 = 0;\n arrays.forEach((a3) => {\n if (!u8a(a3))\n throw new Error(\"Uint8Array expected\");\n r2.set(a3, pad6);\n pad6 += a3.length;\n });\n return r2;\n }\n exports3.concatBytes = concatBytes5;\n function equalBytes(b1, b22) {\n if (b1.length !== b22.length)\n return false;\n for (let i3 = 0; i3 < b1.length; i3++)\n if (b1[i3] !== b22[i3])\n return false;\n return true;\n }\n exports3.equalBytes = equalBytes;\n function utf8ToBytes3(str) {\n if (typeof str !== \"string\")\n throw new Error(`utf8ToBytes expected string, got ${typeof str}`);\n return new Uint8Array(new TextEncoder().encode(str));\n }\n exports3.utf8ToBytes = utf8ToBytes3;\n function bitLen3(n2) {\n let len;\n for (len = 0; n2 > _0n12; n2 >>= _1n12, len += 1)\n ;\n return len;\n }\n exports3.bitLen = bitLen3;\n function bitGet(n2, pos) {\n return n2 >> BigInt(pos) & _1n12;\n }\n exports3.bitGet = bitGet;\n var bitSet = (n2, pos, value) => {\n return n2 | (value ? _1n12 : _0n12) << BigInt(pos);\n };\n exports3.bitSet = bitSet;\n var bitMask3 = (n2) => (_2n9 << BigInt(n2 - 1)) - _1n12;\n exports3.bitMask = bitMask3;\n var u8n2 = (data) => new Uint8Array(data);\n var u8fr2 = (arr) => Uint8Array.from(arr);\n function createHmacDrbg3(hashLen, qByteLen, hmacFn) {\n if (typeof hashLen !== \"number\" || hashLen < 2)\n throw new Error(\"hashLen must be a number\");\n if (typeof qByteLen !== \"number\" || qByteLen < 2)\n throw new Error(\"qByteLen must be a number\");\n if (typeof hmacFn !== \"function\")\n throw new Error(\"hmacFn must be a function\");\n let v2 = u8n2(hashLen);\n let k4 = u8n2(hashLen);\n let i3 = 0;\n const reset = () => {\n v2.fill(1);\n k4.fill(0);\n i3 = 0;\n };\n const h4 = (...b4) => hmacFn(k4, v2, ...b4);\n const reseed = (seed = u8n2()) => {\n k4 = h4(u8fr2([0]), seed);\n v2 = h4();\n if (seed.length === 0)\n return;\n k4 = h4(u8fr2([1]), seed);\n v2 = h4();\n };\n const gen2 = () => {\n if (i3++ >= 1e3)\n throw new Error(\"drbg: tried 1000 values\");\n let len = 0;\n const out = [];\n while (len < qByteLen) {\n v2 = h4();\n const sl = v2.slice();\n out.push(sl);\n len += v2.length;\n }\n return concatBytes5(...out);\n };\n const genUntil = (seed, pred) => {\n reset();\n reseed(seed);\n let res = void 0;\n while (!(res = pred(gen2())))\n reseed();\n reset();\n return res;\n };\n return genUntil;\n }\n exports3.createHmacDrbg = createHmacDrbg3;\n var validatorFns2 = {\n bigint: (val) => typeof val === \"bigint\",\n function: (val) => typeof val === \"function\",\n boolean: (val) => typeof val === \"boolean\",\n string: (val) => typeof val === \"string\",\n stringOrUint8Array: (val) => typeof val === \"string\" || val instanceof Uint8Array,\n isSafeInteger: (val) => Number.isSafeInteger(val),\n array: (val) => Array.isArray(val),\n field: (val, object2) => object2.Fp.isValid(val),\n hash: (val) => typeof val === \"function\" && Number.isSafeInteger(val.outputLen)\n };\n function validateObject3(object2, validators, optValidators = {}) {\n const checkField = (fieldName, type, isOptional) => {\n const checkVal = validatorFns2[type];\n if (typeof checkVal !== \"function\")\n throw new Error(`Invalid validator \"${type}\", expected function`);\n const val = object2[fieldName];\n if (isOptional && val === void 0)\n return;\n if (!checkVal(val, object2)) {\n throw new Error(`Invalid param ${String(fieldName)}=${val} (${typeof val}), expected ${type}`);\n }\n };\n for (const [fieldName, type] of Object.entries(validators))\n checkField(fieldName, type, false);\n for (const [fieldName, type] of Object.entries(optValidators))\n checkField(fieldName, type, true);\n return object2;\n }\n exports3.validateObject = validateObject3;\n }\n });\n\n // ../../../node_modules/.pnpm/@noble+curves@1.2.0/node_modules/@noble/curves/abstract/modular.js\n var require_modular = __commonJS({\n \"../../../node_modules/.pnpm/@noble+curves@1.2.0/node_modules/@noble/curves/abstract/modular.js\"(exports3) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n Object.defineProperty(exports3, \"__esModule\", { value: true });\n exports3.mapHashToField = exports3.getMinHashLength = exports3.getFieldBytesLength = exports3.hashToPrivateScalar = exports3.FpSqrtEven = exports3.FpSqrtOdd = exports3.Field = exports3.nLength = exports3.FpIsSquare = exports3.FpDiv = exports3.FpInvertBatch = exports3.FpPow = exports3.validateField = exports3.isNegativeLE = exports3.FpSqrt = exports3.tonelliShanks = exports3.invert = exports3.pow2 = exports3.pow = exports3.mod = void 0;\n var utils_js_1 = require_utils10();\n var _0n12 = BigInt(0);\n var _1n12 = BigInt(1);\n var _2n9 = BigInt(2);\n var _3n5 = BigInt(3);\n var _4n5 = BigInt(4);\n var _5n3 = BigInt(5);\n var _8n3 = BigInt(8);\n var _9n2 = BigInt(9);\n var _16n2 = BigInt(16);\n function mod3(a3, b4) {\n const result = a3 % b4;\n return result >= _0n12 ? result : b4 + result;\n }\n exports3.mod = mod3;\n function pow(num2, power, modulo) {\n if (modulo <= _0n12 || power < _0n12)\n throw new Error(\"Expected power/modulo > 0\");\n if (modulo === _1n12)\n return _0n12;\n let res = _1n12;\n while (power > _0n12) {\n if (power & _1n12)\n res = res * num2 % modulo;\n num2 = num2 * num2 % modulo;\n power >>= _1n12;\n }\n return res;\n }\n exports3.pow = pow;\n function pow23(x4, power, modulo) {\n let res = x4;\n while (power-- > _0n12) {\n res *= res;\n res %= modulo;\n }\n return res;\n }\n exports3.pow2 = pow23;\n function invert3(number2, modulo) {\n if (number2 === _0n12 || modulo <= _0n12) {\n throw new Error(`invert: expected positive integers, got n=${number2} mod=${modulo}`);\n }\n let a3 = mod3(number2, modulo);\n let b4 = modulo;\n let x4 = _0n12, y6 = _1n12, u2 = _1n12, v2 = _0n12;\n while (a3 !== _0n12) {\n const q3 = b4 / a3;\n const r2 = b4 % a3;\n const m2 = x4 - u2 * q3;\n const n2 = y6 - v2 * q3;\n b4 = a3, a3 = r2, x4 = u2, y6 = v2, u2 = m2, v2 = n2;\n }\n const gcd = b4;\n if (gcd !== _1n12)\n throw new Error(\"invert: does not exist\");\n return mod3(x4, modulo);\n }\n exports3.invert = invert3;\n function tonelliShanks3(P2) {\n const legendreC = (P2 - _1n12) / _2n9;\n let Q2, S3, Z2;\n for (Q2 = P2 - _1n12, S3 = 0; Q2 % _2n9 === _0n12; Q2 /= _2n9, S3++)\n ;\n for (Z2 = _2n9; Z2 < P2 && pow(Z2, legendreC, P2) !== P2 - _1n12; Z2++)\n ;\n if (S3 === 1) {\n const p1div4 = (P2 + _1n12) / _4n5;\n return function tonelliFast(Fp, n2) {\n const root = Fp.pow(n2, p1div4);\n if (!Fp.eql(Fp.sqr(root), n2))\n throw new Error(\"Cannot find square root\");\n return root;\n };\n }\n const Q1div2 = (Q2 + _1n12) / _2n9;\n return function tonelliSlow(Fp, n2) {\n if (Fp.pow(n2, legendreC) === Fp.neg(Fp.ONE))\n throw new Error(\"Cannot find square root\");\n let r2 = S3;\n let g4 = Fp.pow(Fp.mul(Fp.ONE, Z2), Q2);\n let x4 = Fp.pow(n2, Q1div2);\n let b4 = Fp.pow(n2, Q2);\n while (!Fp.eql(b4, Fp.ONE)) {\n if (Fp.eql(b4, Fp.ZERO))\n return Fp.ZERO;\n let m2 = 1;\n for (let t22 = Fp.sqr(b4); m2 < r2; m2++) {\n if (Fp.eql(t22, Fp.ONE))\n break;\n t22 = Fp.sqr(t22);\n }\n const ge = Fp.pow(g4, _1n12 << BigInt(r2 - m2 - 1));\n g4 = Fp.sqr(ge);\n x4 = Fp.mul(x4, ge);\n b4 = Fp.mul(b4, g4);\n r2 = m2;\n }\n return x4;\n };\n }\n exports3.tonelliShanks = tonelliShanks3;\n function FpSqrt3(P2) {\n if (P2 % _4n5 === _3n5) {\n const p1div4 = (P2 + _1n12) / _4n5;\n return function sqrt3mod43(Fp, n2) {\n const root = Fp.pow(n2, p1div4);\n if (!Fp.eql(Fp.sqr(root), n2))\n throw new Error(\"Cannot find square root\");\n return root;\n };\n }\n if (P2 % _8n3 === _5n3) {\n const c1 = (P2 - _5n3) / _8n3;\n return function sqrt5mod83(Fp, n2) {\n const n22 = Fp.mul(n2, _2n9);\n const v2 = Fp.pow(n22, c1);\n const nv = Fp.mul(n2, v2);\n const i3 = Fp.mul(Fp.mul(nv, _2n9), v2);\n const root = Fp.mul(nv, Fp.sub(i3, Fp.ONE));\n if (!Fp.eql(Fp.sqr(root), n2))\n throw new Error(\"Cannot find square root\");\n return root;\n };\n }\n if (P2 % _16n2 === _9n2) {\n }\n return tonelliShanks3(P2);\n }\n exports3.FpSqrt = FpSqrt3;\n var isNegativeLE = (num2, modulo) => (mod3(num2, modulo) & _1n12) === _1n12;\n exports3.isNegativeLE = isNegativeLE;\n var FIELD_FIELDS3 = [\n \"create\",\n \"isValid\",\n \"is0\",\n \"neg\",\n \"inv\",\n \"sqrt\",\n \"sqr\",\n \"eql\",\n \"add\",\n \"sub\",\n \"mul\",\n \"pow\",\n \"div\",\n \"addN\",\n \"subN\",\n \"mulN\",\n \"sqrN\"\n ];\n function validateField3(field) {\n const initial = {\n ORDER: \"bigint\",\n MASK: \"bigint\",\n BYTES: \"isSafeInteger\",\n BITS: \"isSafeInteger\"\n };\n const opts = FIELD_FIELDS3.reduce((map, val) => {\n map[val] = \"function\";\n return map;\n }, initial);\n return (0, utils_js_1.validateObject)(field, opts);\n }\n exports3.validateField = validateField3;\n function FpPow3(f6, num2, power) {\n if (power < _0n12)\n throw new Error(\"Expected power > 0\");\n if (power === _0n12)\n return f6.ONE;\n if (power === _1n12)\n return num2;\n let p4 = f6.ONE;\n let d5 = num2;\n while (power > _0n12) {\n if (power & _1n12)\n p4 = f6.mul(p4, d5);\n d5 = f6.sqr(d5);\n power >>= _1n12;\n }\n return p4;\n }\n exports3.FpPow = FpPow3;\n function FpInvertBatch3(f6, nums) {\n const tmp = new Array(nums.length);\n const lastMultiplied = nums.reduce((acc, num2, i3) => {\n if (f6.is0(num2))\n return acc;\n tmp[i3] = acc;\n return f6.mul(acc, num2);\n }, f6.ONE);\n const inverted = f6.inv(lastMultiplied);\n nums.reduceRight((acc, num2, i3) => {\n if (f6.is0(num2))\n return acc;\n tmp[i3] = f6.mul(acc, tmp[i3]);\n return f6.mul(acc, num2);\n }, inverted);\n return tmp;\n }\n exports3.FpInvertBatch = FpInvertBatch3;\n function FpDiv(f6, lhs, rhs) {\n return f6.mul(lhs, typeof rhs === \"bigint\" ? invert3(rhs, f6.ORDER) : f6.inv(rhs));\n }\n exports3.FpDiv = FpDiv;\n function FpIsSquare(f6) {\n const legendreConst = (f6.ORDER - _1n12) / _2n9;\n return (x4) => {\n const p4 = f6.pow(x4, legendreConst);\n return f6.eql(p4, f6.ZERO) || f6.eql(p4, f6.ONE);\n };\n }\n exports3.FpIsSquare = FpIsSquare;\n function nLength3(n2, nBitLength) {\n const _nBitLength = nBitLength !== void 0 ? nBitLength : n2.toString(2).length;\n const nByteLength = Math.ceil(_nBitLength / 8);\n return { nBitLength: _nBitLength, nByteLength };\n }\n exports3.nLength = nLength3;\n function Field3(ORDER, bitLen3, isLE3 = false, redef = {}) {\n if (ORDER <= _0n12)\n throw new Error(`Expected Field ORDER > 0, got ${ORDER}`);\n const { nBitLength: BITS, nByteLength: BYTES } = nLength3(ORDER, bitLen3);\n if (BYTES > 2048)\n throw new Error(\"Field lengths over 2048 bytes are not supported\");\n const sqrtP = FpSqrt3(ORDER);\n const f6 = Object.freeze({\n ORDER,\n BITS,\n BYTES,\n MASK: (0, utils_js_1.bitMask)(BITS),\n ZERO: _0n12,\n ONE: _1n12,\n create: (num2) => mod3(num2, ORDER),\n isValid: (num2) => {\n if (typeof num2 !== \"bigint\")\n throw new Error(`Invalid field element: expected bigint, got ${typeof num2}`);\n return _0n12 <= num2 && num2 < ORDER;\n },\n is0: (num2) => num2 === _0n12,\n isOdd: (num2) => (num2 & _1n12) === _1n12,\n neg: (num2) => mod3(-num2, ORDER),\n eql: (lhs, rhs) => lhs === rhs,\n sqr: (num2) => mod3(num2 * num2, ORDER),\n add: (lhs, rhs) => mod3(lhs + rhs, ORDER),\n sub: (lhs, rhs) => mod3(lhs - rhs, ORDER),\n mul: (lhs, rhs) => mod3(lhs * rhs, ORDER),\n pow: (num2, power) => FpPow3(f6, num2, power),\n div: (lhs, rhs) => mod3(lhs * invert3(rhs, ORDER), ORDER),\n // Same as above, but doesn't normalize\n sqrN: (num2) => num2 * num2,\n addN: (lhs, rhs) => lhs + rhs,\n subN: (lhs, rhs) => lhs - rhs,\n mulN: (lhs, rhs) => lhs * rhs,\n inv: (num2) => invert3(num2, ORDER),\n sqrt: redef.sqrt || ((n2) => sqrtP(f6, n2)),\n invertBatch: (lst) => FpInvertBatch3(f6, lst),\n // TODO: do we really need constant cmov?\n // We don't have const-time bigints anyway, so probably will be not very useful\n cmov: (a3, b4, c4) => c4 ? b4 : a3,\n toBytes: (num2) => isLE3 ? (0, utils_js_1.numberToBytesLE)(num2, BYTES) : (0, utils_js_1.numberToBytesBE)(num2, BYTES),\n fromBytes: (bytes) => {\n if (bytes.length !== BYTES)\n throw new Error(`Fp.fromBytes: expected ${BYTES}, got ${bytes.length}`);\n return isLE3 ? (0, utils_js_1.bytesToNumberLE)(bytes) : (0, utils_js_1.bytesToNumberBE)(bytes);\n }\n });\n return Object.freeze(f6);\n }\n exports3.Field = Field3;\n function FpSqrtOdd(Fp, elm) {\n if (!Fp.isOdd)\n throw new Error(`Field doesn't have isOdd`);\n const root = Fp.sqrt(elm);\n return Fp.isOdd(root) ? root : Fp.neg(root);\n }\n exports3.FpSqrtOdd = FpSqrtOdd;\n function FpSqrtEven(Fp, elm) {\n if (!Fp.isOdd)\n throw new Error(`Field doesn't have isOdd`);\n const root = Fp.sqrt(elm);\n return Fp.isOdd(root) ? Fp.neg(root) : root;\n }\n exports3.FpSqrtEven = FpSqrtEven;\n function hashToPrivateScalar(hash3, groupOrder, isLE3 = false) {\n hash3 = (0, utils_js_1.ensureBytes)(\"privateHash\", hash3);\n const hashLen = hash3.length;\n const minLen = nLength3(groupOrder).nByteLength + 8;\n if (minLen < 24 || hashLen < minLen || hashLen > 1024)\n throw new Error(`hashToPrivateScalar: expected ${minLen}-1024 bytes of input, got ${hashLen}`);\n const num2 = isLE3 ? (0, utils_js_1.bytesToNumberLE)(hash3) : (0, utils_js_1.bytesToNumberBE)(hash3);\n return mod3(num2, groupOrder - _1n12) + _1n12;\n }\n exports3.hashToPrivateScalar = hashToPrivateScalar;\n function getFieldBytesLength3(fieldOrder) {\n if (typeof fieldOrder !== \"bigint\")\n throw new Error(\"field order must be bigint\");\n const bitLength = fieldOrder.toString(2).length;\n return Math.ceil(bitLength / 8);\n }\n exports3.getFieldBytesLength = getFieldBytesLength3;\n function getMinHashLength3(fieldOrder) {\n const length2 = getFieldBytesLength3(fieldOrder);\n return length2 + Math.ceil(length2 / 2);\n }\n exports3.getMinHashLength = getMinHashLength3;\n function mapHashToField3(key, fieldOrder, isLE3 = false) {\n const len = key.length;\n const fieldLen = getFieldBytesLength3(fieldOrder);\n const minLen = getMinHashLength3(fieldOrder);\n if (len < 16 || len < minLen || len > 1024)\n throw new Error(`expected ${minLen}-1024 bytes of input, got ${len}`);\n const num2 = isLE3 ? (0, utils_js_1.bytesToNumberBE)(key) : (0, utils_js_1.bytesToNumberLE)(key);\n const reduced = mod3(num2, fieldOrder - _1n12) + _1n12;\n return isLE3 ? (0, utils_js_1.numberToBytesLE)(reduced, fieldLen) : (0, utils_js_1.numberToBytesBE)(reduced, fieldLen);\n }\n exports3.mapHashToField = mapHashToField3;\n }\n });\n\n // ../../../node_modules/.pnpm/@noble+curves@1.2.0/node_modules/@noble/curves/abstract/curve.js\n var require_curve2 = __commonJS({\n \"../../../node_modules/.pnpm/@noble+curves@1.2.0/node_modules/@noble/curves/abstract/curve.js\"(exports3) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n Object.defineProperty(exports3, \"__esModule\", { value: true });\n exports3.validateBasic = exports3.wNAF = void 0;\n var modular_js_1 = require_modular();\n var utils_js_1 = require_utils10();\n var _0n12 = BigInt(0);\n var _1n12 = BigInt(1);\n function wNAF3(c4, bits) {\n const constTimeNegate2 = (condition, item) => {\n const neg = item.negate();\n return condition ? neg : item;\n };\n const opts = (W) => {\n const windows = Math.ceil(bits / W) + 1;\n const windowSize = 2 ** (W - 1);\n return { windows, windowSize };\n };\n return {\n constTimeNegate: constTimeNegate2,\n // non-const time multiplication ladder\n unsafeLadder(elm, n2) {\n let p4 = c4.ZERO;\n let d5 = elm;\n while (n2 > _0n12) {\n if (n2 & _1n12)\n p4 = p4.add(d5);\n d5 = d5.double();\n n2 >>= _1n12;\n }\n return p4;\n },\n /**\n * Creates a wNAF precomputation window. Used for caching.\n * Default window size is set by `utils.precompute()` and is equal to 8.\n * Number of precomputed points depends on the curve size:\n * 2^(𝑊−1) * (Math.ceil(𝑛 / 𝑊) + 1), where:\n * - 𝑊 is the window size\n * - 𝑛 is the bitlength of the curve order.\n * For a 256-bit curve and window size 8, the number of precomputed points is 128 * 33 = 4224.\n * @returns precomputed point tables flattened to a single array\n */\n precomputeWindow(elm, W) {\n const { windows, windowSize } = opts(W);\n const points = [];\n let p4 = elm;\n let base4 = p4;\n for (let window2 = 0; window2 < windows; window2++) {\n base4 = p4;\n points.push(base4);\n for (let i3 = 1; i3 < windowSize; i3++) {\n base4 = base4.add(p4);\n points.push(base4);\n }\n p4 = base4.double();\n }\n return points;\n },\n /**\n * Implements ec multiplication using precomputed tables and w-ary non-adjacent form.\n * @param W window size\n * @param precomputes precomputed tables\n * @param n scalar (we don't check here, but should be less than curve order)\n * @returns real and fake (for const-time) points\n */\n wNAF(W, precomputes, n2) {\n const { windows, windowSize } = opts(W);\n let p4 = c4.ZERO;\n let f6 = c4.BASE;\n const mask = BigInt(2 ** W - 1);\n const maxNumber = 2 ** W;\n const shiftBy = BigInt(W);\n for (let window2 = 0; window2 < windows; window2++) {\n const offset = window2 * windowSize;\n let wbits = Number(n2 & mask);\n n2 >>= shiftBy;\n if (wbits > windowSize) {\n wbits -= maxNumber;\n n2 += _1n12;\n }\n const offset1 = offset;\n const offset2 = offset + Math.abs(wbits) - 1;\n const cond1 = window2 % 2 !== 0;\n const cond2 = wbits < 0;\n if (wbits === 0) {\n f6 = f6.add(constTimeNegate2(cond1, precomputes[offset1]));\n } else {\n p4 = p4.add(constTimeNegate2(cond2, precomputes[offset2]));\n }\n }\n return { p: p4, f: f6 };\n },\n wNAFCached(P2, precomputesMap, n2, transform2) {\n const W = P2._WINDOW_SIZE || 1;\n let comp = precomputesMap.get(P2);\n if (!comp) {\n comp = this.precomputeWindow(P2, W);\n if (W !== 1) {\n precomputesMap.set(P2, transform2(comp));\n }\n }\n return this.wNAF(W, comp, n2);\n }\n };\n }\n exports3.wNAF = wNAF3;\n function validateBasic2(curve) {\n (0, modular_js_1.validateField)(curve.Fp);\n (0, utils_js_1.validateObject)(curve, {\n n: \"bigint\",\n h: \"bigint\",\n Gx: \"field\",\n Gy: \"field\"\n }, {\n nBitLength: \"isSafeInteger\",\n nByteLength: \"isSafeInteger\"\n });\n return Object.freeze({\n ...(0, modular_js_1.nLength)(curve.n, curve.nBitLength),\n ...curve,\n ...{ p: curve.Fp.ORDER }\n });\n }\n exports3.validateBasic = validateBasic2;\n }\n });\n\n // ../../../node_modules/.pnpm/@noble+curves@1.2.0/node_modules/@noble/curves/abstract/weierstrass.js\n var require_weierstrass = __commonJS({\n \"../../../node_modules/.pnpm/@noble+curves@1.2.0/node_modules/@noble/curves/abstract/weierstrass.js\"(exports3) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n Object.defineProperty(exports3, \"__esModule\", { value: true });\n exports3.mapToCurveSimpleSWU = exports3.SWUFpSqrtRatio = exports3.weierstrass = exports3.weierstrassPoints = exports3.DER = void 0;\n var mod3 = require_modular();\n var ut = require_utils10();\n var utils_js_1 = require_utils10();\n var curve_js_1 = require_curve2();\n function validatePointOpts2(curve) {\n const opts = (0, curve_js_1.validateBasic)(curve);\n ut.validateObject(opts, {\n a: \"field\",\n b: \"field\"\n }, {\n allowedPrivateKeyLengths: \"array\",\n wrapPrivateKey: \"boolean\",\n isTorsionFree: \"function\",\n clearCofactor: \"function\",\n allowInfinityPoint: \"boolean\",\n fromBytes: \"function\",\n toBytes: \"function\"\n });\n const { endo, Fp, a: a3 } = opts;\n if (endo) {\n if (!Fp.eql(a3, Fp.ZERO)) {\n throw new Error(\"Endomorphism can only be defined for Koblitz curves that have a=0\");\n }\n if (typeof endo !== \"object\" || typeof endo.beta !== \"bigint\" || typeof endo.splitScalar !== \"function\") {\n throw new Error(\"Expected endomorphism with beta: bigint and splitScalar: function\");\n }\n }\n return Object.freeze({ ...opts });\n }\n var { bytesToNumberBE: b2n, hexToBytes: h2b } = ut;\n exports3.DER = {\n // asn.1 DER encoding utils\n Err: class DERErr extends Error {\n constructor(m2 = \"\") {\n super(m2);\n }\n },\n _parseInt(data) {\n const { Err: E2 } = exports3.DER;\n if (data.length < 2 || data[0] !== 2)\n throw new E2(\"Invalid signature integer tag\");\n const len = data[1];\n const res = data.subarray(2, len + 2);\n if (!len || res.length !== len)\n throw new E2(\"Invalid signature integer: wrong length\");\n if (res[0] & 128)\n throw new E2(\"Invalid signature integer: negative\");\n if (res[0] === 0 && !(res[1] & 128))\n throw new E2(\"Invalid signature integer: unnecessary leading zero\");\n return { d: b2n(res), l: data.subarray(len + 2) };\n },\n toSig(hex) {\n const { Err: E2 } = exports3.DER;\n const data = typeof hex === \"string\" ? h2b(hex) : hex;\n if (!(data instanceof Uint8Array))\n throw new Error(\"ui8a expected\");\n let l6 = data.length;\n if (l6 < 2 || data[0] != 48)\n throw new E2(\"Invalid signature tag\");\n if (data[1] !== l6 - 2)\n throw new E2(\"Invalid signature: incorrect length\");\n const { d: r2, l: sBytes } = exports3.DER._parseInt(data.subarray(2));\n const { d: s4, l: rBytesLeft } = exports3.DER._parseInt(sBytes);\n if (rBytesLeft.length)\n throw new E2(\"Invalid signature: left bytes after parsing\");\n return { r: r2, s: s4 };\n },\n hexFromSig(sig) {\n const slice4 = (s5) => Number.parseInt(s5[0], 16) & 8 ? \"00\" + s5 : s5;\n const h4 = (num2) => {\n const hex = num2.toString(16);\n return hex.length & 1 ? `0${hex}` : hex;\n };\n const s4 = slice4(h4(sig.s));\n const r2 = slice4(h4(sig.r));\n const shl = s4.length / 2;\n const rhl = r2.length / 2;\n const sl = h4(shl);\n const rl = h4(rhl);\n return `30${h4(rhl + shl + 4)}02${rl}${r2}02${sl}${s4}`;\n }\n };\n var _0n12 = BigInt(0);\n var _1n12 = BigInt(1);\n var _2n9 = BigInt(2);\n var _3n5 = BigInt(3);\n var _4n5 = BigInt(4);\n function weierstrassPoints2(opts) {\n const CURVE = validatePointOpts2(opts);\n const { Fp } = CURVE;\n const toBytes5 = CURVE.toBytes || ((_c, point, _isCompressed) => {\n const a3 = point.toAffine();\n return ut.concatBytes(Uint8Array.from([4]), Fp.toBytes(a3.x), Fp.toBytes(a3.y));\n });\n const fromBytes5 = CURVE.fromBytes || ((bytes) => {\n const tail = bytes.subarray(1);\n const x4 = Fp.fromBytes(tail.subarray(0, Fp.BYTES));\n const y6 = Fp.fromBytes(tail.subarray(Fp.BYTES, 2 * Fp.BYTES));\n return { x: x4, y: y6 };\n });\n function weierstrassEquation(x4) {\n const { a: a3, b: b4 } = CURVE;\n const x22 = Fp.sqr(x4);\n const x32 = Fp.mul(x22, x4);\n return Fp.add(Fp.add(x32, Fp.mul(x4, a3)), b4);\n }\n if (!Fp.eql(Fp.sqr(CURVE.Gy), weierstrassEquation(CURVE.Gx)))\n throw new Error(\"bad generator point: equation left != right\");\n function isWithinCurveOrder(num2) {\n return typeof num2 === \"bigint\" && _0n12 < num2 && num2 < CURVE.n;\n }\n function assertGE(num2) {\n if (!isWithinCurveOrder(num2))\n throw new Error(\"Expected valid bigint: 0 < bigint < curve.n\");\n }\n function normPrivateKeyToScalar(key) {\n const { allowedPrivateKeyLengths: lengths, nByteLength, wrapPrivateKey, n: n2 } = CURVE;\n if (lengths && typeof key !== \"bigint\") {\n if (key instanceof Uint8Array)\n key = ut.bytesToHex(key);\n if (typeof key !== \"string\" || !lengths.includes(key.length))\n throw new Error(\"Invalid key\");\n key = key.padStart(nByteLength * 2, \"0\");\n }\n let num2;\n try {\n num2 = typeof key === \"bigint\" ? key : ut.bytesToNumberBE((0, utils_js_1.ensureBytes)(\"private key\", key, nByteLength));\n } catch (error) {\n throw new Error(`private key must be ${nByteLength} bytes, hex or bigint, not ${typeof key}`);\n }\n if (wrapPrivateKey)\n num2 = mod3.mod(num2, n2);\n assertGE(num2);\n return num2;\n }\n const pointPrecomputes3 = /* @__PURE__ */ new Map();\n function assertPrjPoint(other) {\n if (!(other instanceof Point3))\n throw new Error(\"ProjectivePoint expected\");\n }\n class Point3 {\n constructor(px, py, pz) {\n this.px = px;\n this.py = py;\n this.pz = pz;\n if (px == null || !Fp.isValid(px))\n throw new Error(\"x required\");\n if (py == null || !Fp.isValid(py))\n throw new Error(\"y required\");\n if (pz == null || !Fp.isValid(pz))\n throw new Error(\"z required\");\n }\n // Does not validate if the point is on-curve.\n // Use fromHex instead, or call assertValidity() later.\n static fromAffine(p4) {\n const { x: x4, y: y6 } = p4 || {};\n if (!p4 || !Fp.isValid(x4) || !Fp.isValid(y6))\n throw new Error(\"invalid affine point\");\n if (p4 instanceof Point3)\n throw new Error(\"projective point not allowed\");\n const is0 = (i3) => Fp.eql(i3, Fp.ZERO);\n if (is0(x4) && is0(y6))\n return Point3.ZERO;\n return new Point3(x4, y6, Fp.ONE);\n }\n get x() {\n return this.toAffine().x;\n }\n get y() {\n return this.toAffine().y;\n }\n /**\n * Takes a bunch of Projective Points but executes only one\n * inversion on all of them. Inversion is very slow operation,\n * so this improves performance massively.\n * Optimization: converts a list of projective points to a list of identical points with Z=1.\n */\n static normalizeZ(points) {\n const toInv = Fp.invertBatch(points.map((p4) => p4.pz));\n return points.map((p4, i3) => p4.toAffine(toInv[i3])).map(Point3.fromAffine);\n }\n /**\n * Converts hash string or Uint8Array to Point.\n * @param hex short/long ECDSA hex\n */\n static fromHex(hex) {\n const P2 = Point3.fromAffine(fromBytes5((0, utils_js_1.ensureBytes)(\"pointHex\", hex)));\n P2.assertValidity();\n return P2;\n }\n // Multiplies generator point by privateKey.\n static fromPrivateKey(privateKey) {\n return Point3.BASE.multiply(normPrivateKeyToScalar(privateKey));\n }\n // \"Private method\", don't use it directly\n _setWindowSize(windowSize) {\n this._WINDOW_SIZE = windowSize;\n pointPrecomputes3.delete(this);\n }\n // A point on curve is valid if it conforms to equation.\n assertValidity() {\n if (this.is0()) {\n if (CURVE.allowInfinityPoint && !Fp.is0(this.py))\n return;\n throw new Error(\"bad point: ZERO\");\n }\n const { x: x4, y: y6 } = this.toAffine();\n if (!Fp.isValid(x4) || !Fp.isValid(y6))\n throw new Error(\"bad point: x or y not FE\");\n const left = Fp.sqr(y6);\n const right = weierstrassEquation(x4);\n if (!Fp.eql(left, right))\n throw new Error(\"bad point: equation left != right\");\n if (!this.isTorsionFree())\n throw new Error(\"bad point: not in prime-order subgroup\");\n }\n hasEvenY() {\n const { y: y6 } = this.toAffine();\n if (Fp.isOdd)\n return !Fp.isOdd(y6);\n throw new Error(\"Field doesn't support isOdd\");\n }\n /**\n * Compare one point to another.\n */\n equals(other) {\n assertPrjPoint(other);\n const { px: X1, py: Y1, pz: Z1 } = this;\n const { px: X2, py: Y2, pz: Z2 } = other;\n const U1 = Fp.eql(Fp.mul(X1, Z2), Fp.mul(X2, Z1));\n const U22 = Fp.eql(Fp.mul(Y1, Z2), Fp.mul(Y2, Z1));\n return U1 && U22;\n }\n /**\n * Flips point to one corresponding to (x, -y) in Affine coordinates.\n */\n negate() {\n return new Point3(this.px, Fp.neg(this.py), this.pz);\n }\n // Renes-Costello-Batina exception-free doubling formula.\n // There is 30% faster Jacobian formula, but it is not complete.\n // https://eprint.iacr.org/2015/1060, algorithm 3\n // Cost: 8M + 3S + 3*a + 2*b3 + 15add.\n double() {\n const { a: a3, b: b4 } = CURVE;\n const b32 = Fp.mul(b4, _3n5);\n const { px: X1, py: Y1, pz: Z1 } = this;\n let X3 = Fp.ZERO, Y3 = Fp.ZERO, Z3 = Fp.ZERO;\n let t0 = Fp.mul(X1, X1);\n let t1 = Fp.mul(Y1, Y1);\n let t22 = Fp.mul(Z1, Z1);\n let t3 = Fp.mul(X1, Y1);\n t3 = Fp.add(t3, t3);\n Z3 = Fp.mul(X1, Z1);\n Z3 = Fp.add(Z3, Z3);\n X3 = Fp.mul(a3, Z3);\n Y3 = Fp.mul(b32, t22);\n Y3 = Fp.add(X3, Y3);\n X3 = Fp.sub(t1, Y3);\n Y3 = Fp.add(t1, Y3);\n Y3 = Fp.mul(X3, Y3);\n X3 = Fp.mul(t3, X3);\n Z3 = Fp.mul(b32, Z3);\n t22 = Fp.mul(a3, t22);\n t3 = Fp.sub(t0, t22);\n t3 = Fp.mul(a3, t3);\n t3 = Fp.add(t3, Z3);\n Z3 = Fp.add(t0, t0);\n t0 = Fp.add(Z3, t0);\n t0 = Fp.add(t0, t22);\n t0 = Fp.mul(t0, t3);\n Y3 = Fp.add(Y3, t0);\n t22 = Fp.mul(Y1, Z1);\n t22 = Fp.add(t22, t22);\n t0 = Fp.mul(t22, t3);\n X3 = Fp.sub(X3, t0);\n Z3 = Fp.mul(t22, t1);\n Z3 = Fp.add(Z3, Z3);\n Z3 = Fp.add(Z3, Z3);\n return new Point3(X3, Y3, Z3);\n }\n // Renes-Costello-Batina exception-free addition formula.\n // There is 30% faster Jacobian formula, but it is not complete.\n // https://eprint.iacr.org/2015/1060, algorithm 1\n // Cost: 12M + 0S + 3*a + 3*b3 + 23add.\n add(other) {\n assertPrjPoint(other);\n const { px: X1, py: Y1, pz: Z1 } = this;\n const { px: X2, py: Y2, pz: Z2 } = other;\n let X3 = Fp.ZERO, Y3 = Fp.ZERO, Z3 = Fp.ZERO;\n const a3 = CURVE.a;\n const b32 = Fp.mul(CURVE.b, _3n5);\n let t0 = Fp.mul(X1, X2);\n let t1 = Fp.mul(Y1, Y2);\n let t22 = Fp.mul(Z1, Z2);\n let t3 = Fp.add(X1, Y1);\n let t4 = Fp.add(X2, Y2);\n t3 = Fp.mul(t3, t4);\n t4 = Fp.add(t0, t1);\n t3 = Fp.sub(t3, t4);\n t4 = Fp.add(X1, Z1);\n let t5 = Fp.add(X2, Z2);\n t4 = Fp.mul(t4, t5);\n t5 = Fp.add(t0, t22);\n t4 = Fp.sub(t4, t5);\n t5 = Fp.add(Y1, Z1);\n X3 = Fp.add(Y2, Z2);\n t5 = Fp.mul(t5, X3);\n X3 = Fp.add(t1, t22);\n t5 = Fp.sub(t5, X3);\n Z3 = Fp.mul(a3, t4);\n X3 = Fp.mul(b32, t22);\n Z3 = Fp.add(X3, Z3);\n X3 = Fp.sub(t1, Z3);\n Z3 = Fp.add(t1, Z3);\n Y3 = Fp.mul(X3, Z3);\n t1 = Fp.add(t0, t0);\n t1 = Fp.add(t1, t0);\n t22 = Fp.mul(a3, t22);\n t4 = Fp.mul(b32, t4);\n t1 = Fp.add(t1, t22);\n t22 = Fp.sub(t0, t22);\n t22 = Fp.mul(a3, t22);\n t4 = Fp.add(t4, t22);\n t0 = Fp.mul(t1, t4);\n Y3 = Fp.add(Y3, t0);\n t0 = Fp.mul(t5, t4);\n X3 = Fp.mul(t3, X3);\n X3 = Fp.sub(X3, t0);\n t0 = Fp.mul(t3, t1);\n Z3 = Fp.mul(t5, Z3);\n Z3 = Fp.add(Z3, t0);\n return new Point3(X3, Y3, Z3);\n }\n subtract(other) {\n return this.add(other.negate());\n }\n is0() {\n return this.equals(Point3.ZERO);\n }\n wNAF(n2) {\n return wnaf.wNAFCached(this, pointPrecomputes3, n2, (comp) => {\n const toInv = Fp.invertBatch(comp.map((p4) => p4.pz));\n return comp.map((p4, i3) => p4.toAffine(toInv[i3])).map(Point3.fromAffine);\n });\n }\n /**\n * Non-constant-time multiplication. Uses double-and-add algorithm.\n * It's faster, but should only be used when you don't care about\n * an exposed private key e.g. sig verification, which works over *public* keys.\n */\n multiplyUnsafe(n2) {\n const I2 = Point3.ZERO;\n if (n2 === _0n12)\n return I2;\n assertGE(n2);\n if (n2 === _1n12)\n return this;\n const { endo } = CURVE;\n if (!endo)\n return wnaf.unsafeLadder(this, n2);\n let { k1neg, k1, k2neg, k2: k22 } = endo.splitScalar(n2);\n let k1p = I2;\n let k2p = I2;\n let d5 = this;\n while (k1 > _0n12 || k22 > _0n12) {\n if (k1 & _1n12)\n k1p = k1p.add(d5);\n if (k22 & _1n12)\n k2p = k2p.add(d5);\n d5 = d5.double();\n k1 >>= _1n12;\n k22 >>= _1n12;\n }\n if (k1neg)\n k1p = k1p.negate();\n if (k2neg)\n k2p = k2p.negate();\n k2p = new Point3(Fp.mul(k2p.px, endo.beta), k2p.py, k2p.pz);\n return k1p.add(k2p);\n }\n /**\n * Constant time multiplication.\n * Uses wNAF method. Windowed method may be 10% faster,\n * but takes 2x longer to generate and consumes 2x memory.\n * Uses precomputes when available.\n * Uses endomorphism for Koblitz curves.\n * @param scalar by which the point would be multiplied\n * @returns New point\n */\n multiply(scalar) {\n assertGE(scalar);\n let n2 = scalar;\n let point, fake;\n const { endo } = CURVE;\n if (endo) {\n const { k1neg, k1, k2neg, k2: k22 } = endo.splitScalar(n2);\n let { p: k1p, f: f1p } = this.wNAF(k1);\n let { p: k2p, f: f2p } = this.wNAF(k22);\n k1p = wnaf.constTimeNegate(k1neg, k1p);\n k2p = wnaf.constTimeNegate(k2neg, k2p);\n k2p = new Point3(Fp.mul(k2p.px, endo.beta), k2p.py, k2p.pz);\n point = k1p.add(k2p);\n fake = f1p.add(f2p);\n } else {\n const { p: p4, f: f6 } = this.wNAF(n2);\n point = p4;\n fake = f6;\n }\n return Point3.normalizeZ([point, fake])[0];\n }\n /**\n * Efficiently calculate `aP + bQ`. Unsafe, can expose private key, if used incorrectly.\n * Not using Strauss-Shamir trick: precomputation tables are faster.\n * The trick could be useful if both P and Q are not G (not in our case).\n * @returns non-zero affine point\n */\n multiplyAndAddUnsafe(Q2, a3, b4) {\n const G = Point3.BASE;\n const mul = (P2, a4) => a4 === _0n12 || a4 === _1n12 || !P2.equals(G) ? P2.multiplyUnsafe(a4) : P2.multiply(a4);\n const sum = mul(this, a3).add(mul(Q2, b4));\n return sum.is0() ? void 0 : sum;\n }\n // Converts Projective point to affine (x, y) coordinates.\n // Can accept precomputed Z^-1 - for example, from invertBatch.\n // (x, y, z) ∋ (x=x/z, y=y/z)\n toAffine(iz) {\n const { px: x4, py: y6, pz: z2 } = this;\n const is0 = this.is0();\n if (iz == null)\n iz = is0 ? Fp.ONE : Fp.inv(z2);\n const ax = Fp.mul(x4, iz);\n const ay = Fp.mul(y6, iz);\n const zz = Fp.mul(z2, iz);\n if (is0)\n return { x: Fp.ZERO, y: Fp.ZERO };\n if (!Fp.eql(zz, Fp.ONE))\n throw new Error(\"invZ was invalid\");\n return { x: ax, y: ay };\n }\n isTorsionFree() {\n const { h: cofactor, isTorsionFree } = CURVE;\n if (cofactor === _1n12)\n return true;\n if (isTorsionFree)\n return isTorsionFree(Point3, this);\n throw new Error(\"isTorsionFree() has not been declared for the elliptic curve\");\n }\n clearCofactor() {\n const { h: cofactor, clearCofactor } = CURVE;\n if (cofactor === _1n12)\n return this;\n if (clearCofactor)\n return clearCofactor(Point3, this);\n return this.multiplyUnsafe(CURVE.h);\n }\n toRawBytes(isCompressed = true) {\n this.assertValidity();\n return toBytes5(Point3, this, isCompressed);\n }\n toHex(isCompressed = true) {\n return ut.bytesToHex(this.toRawBytes(isCompressed));\n }\n }\n Point3.BASE = new Point3(CURVE.Gx, CURVE.Gy, Fp.ONE);\n Point3.ZERO = new Point3(Fp.ZERO, Fp.ONE, Fp.ZERO);\n const _bits = CURVE.nBitLength;\n const wnaf = (0, curve_js_1.wNAF)(Point3, CURVE.endo ? Math.ceil(_bits / 2) : _bits);\n return {\n CURVE,\n ProjectivePoint: Point3,\n normPrivateKeyToScalar,\n weierstrassEquation,\n isWithinCurveOrder\n };\n }\n exports3.weierstrassPoints = weierstrassPoints2;\n function validateOpts2(curve) {\n const opts = (0, curve_js_1.validateBasic)(curve);\n ut.validateObject(opts, {\n hash: \"hash\",\n hmac: \"function\",\n randomBytes: \"function\"\n }, {\n bits2int: \"function\",\n bits2int_modN: \"function\",\n lowS: \"boolean\"\n });\n return Object.freeze({ lowS: true, ...opts });\n }\n function weierstrass3(curveDef) {\n const CURVE = validateOpts2(curveDef);\n const { Fp, n: CURVE_ORDER } = CURVE;\n const compressedLen = Fp.BYTES + 1;\n const uncompressedLen = 2 * Fp.BYTES + 1;\n function isValidFieldElement(num2) {\n return _0n12 < num2 && num2 < Fp.ORDER;\n }\n function modN2(a3) {\n return mod3.mod(a3, CURVE_ORDER);\n }\n function invN(a3) {\n return mod3.invert(a3, CURVE_ORDER);\n }\n const { ProjectivePoint: Point3, normPrivateKeyToScalar, weierstrassEquation, isWithinCurveOrder } = weierstrassPoints2({\n ...CURVE,\n toBytes(_c, point, isCompressed) {\n const a3 = point.toAffine();\n const x4 = Fp.toBytes(a3.x);\n const cat = ut.concatBytes;\n if (isCompressed) {\n return cat(Uint8Array.from([point.hasEvenY() ? 2 : 3]), x4);\n } else {\n return cat(Uint8Array.from([4]), x4, Fp.toBytes(a3.y));\n }\n },\n fromBytes(bytes) {\n const len = bytes.length;\n const head = bytes[0];\n const tail = bytes.subarray(1);\n if (len === compressedLen && (head === 2 || head === 3)) {\n const x4 = ut.bytesToNumberBE(tail);\n if (!isValidFieldElement(x4))\n throw new Error(\"Point is not on curve\");\n const y22 = weierstrassEquation(x4);\n let y6 = Fp.sqrt(y22);\n const isYOdd = (y6 & _1n12) === _1n12;\n const isHeadOdd = (head & 1) === 1;\n if (isHeadOdd !== isYOdd)\n y6 = Fp.neg(y6);\n return { x: x4, y: y6 };\n } else if (len === uncompressedLen && head === 4) {\n const x4 = Fp.fromBytes(tail.subarray(0, Fp.BYTES));\n const y6 = Fp.fromBytes(tail.subarray(Fp.BYTES, 2 * Fp.BYTES));\n return { x: x4, y: y6 };\n } else {\n throw new Error(`Point of length ${len} was invalid. Expected ${compressedLen} compressed bytes or ${uncompressedLen} uncompressed bytes`);\n }\n }\n });\n const numToNByteStr = (num2) => ut.bytesToHex(ut.numberToBytesBE(num2, CURVE.nByteLength));\n function isBiggerThanHalfOrder(number2) {\n const HALF = CURVE_ORDER >> _1n12;\n return number2 > HALF;\n }\n function normalizeS(s4) {\n return isBiggerThanHalfOrder(s4) ? modN2(-s4) : s4;\n }\n const slcNum = (b4, from14, to) => ut.bytesToNumberBE(b4.slice(from14, to));\n class Signature2 {\n constructor(r2, s4, recovery) {\n this.r = r2;\n this.s = s4;\n this.recovery = recovery;\n this.assertValidity();\n }\n // pair (bytes of r, bytes of s)\n static fromCompact(hex) {\n const l6 = CURVE.nByteLength;\n hex = (0, utils_js_1.ensureBytes)(\"compactSignature\", hex, l6 * 2);\n return new Signature2(slcNum(hex, 0, l6), slcNum(hex, l6, 2 * l6));\n }\n // DER encoded ECDSA signature\n // https://bitcoin.stackexchange.com/questions/57644/what-are-the-parts-of-a-bitcoin-transaction-input-script\n static fromDER(hex) {\n const { r: r2, s: s4 } = exports3.DER.toSig((0, utils_js_1.ensureBytes)(\"DER\", hex));\n return new Signature2(r2, s4);\n }\n assertValidity() {\n if (!isWithinCurveOrder(this.r))\n throw new Error(\"r must be 0 < r < CURVE.n\");\n if (!isWithinCurveOrder(this.s))\n throw new Error(\"s must be 0 < s < CURVE.n\");\n }\n addRecoveryBit(recovery) {\n return new Signature2(this.r, this.s, recovery);\n }\n recoverPublicKey(msgHash) {\n const { r: r2, s: s4, recovery: rec } = this;\n const h4 = bits2int_modN((0, utils_js_1.ensureBytes)(\"msgHash\", msgHash));\n if (rec == null || ![0, 1, 2, 3].includes(rec))\n throw new Error(\"recovery id invalid\");\n const radj = rec === 2 || rec === 3 ? r2 + CURVE.n : r2;\n if (radj >= Fp.ORDER)\n throw new Error(\"recovery id 2 or 3 invalid\");\n const prefix = (rec & 1) === 0 ? \"02\" : \"03\";\n const R3 = Point3.fromHex(prefix + numToNByteStr(radj));\n const ir = invN(radj);\n const u1 = modN2(-h4 * ir);\n const u2 = modN2(s4 * ir);\n const Q2 = Point3.BASE.multiplyAndAddUnsafe(R3, u1, u2);\n if (!Q2)\n throw new Error(\"point at infinify\");\n Q2.assertValidity();\n return Q2;\n }\n // Signatures should be low-s, to prevent malleability.\n hasHighS() {\n return isBiggerThanHalfOrder(this.s);\n }\n normalizeS() {\n return this.hasHighS() ? new Signature2(this.r, modN2(-this.s), this.recovery) : this;\n }\n // DER-encoded\n toDERRawBytes() {\n return ut.hexToBytes(this.toDERHex());\n }\n toDERHex() {\n return exports3.DER.hexFromSig({ r: this.r, s: this.s });\n }\n // padded bytes of r, then padded bytes of s\n toCompactRawBytes() {\n return ut.hexToBytes(this.toCompactHex());\n }\n toCompactHex() {\n return numToNByteStr(this.r) + numToNByteStr(this.s);\n }\n }\n const utils = {\n isValidPrivateKey(privateKey) {\n try {\n normPrivateKeyToScalar(privateKey);\n return true;\n } catch (error) {\n return false;\n }\n },\n normPrivateKeyToScalar,\n /**\n * Produces cryptographically secure private key from random of size\n * (groupLen + ceil(groupLen / 2)) with modulo bias being negligible.\n */\n randomPrivateKey: () => {\n const length2 = mod3.getMinHashLength(CURVE.n);\n return mod3.mapHashToField(CURVE.randomBytes(length2), CURVE.n);\n },\n /**\n * Creates precompute table for an arbitrary EC point. Makes point \"cached\".\n * Allows to massively speed-up `point.multiply(scalar)`.\n * @returns cached point\n * @example\n * const fast = utils.precompute(8, ProjectivePoint.fromHex(someonesPubKey));\n * fast.multiply(privKey); // much faster ECDH now\n */\n precompute(windowSize = 8, point = Point3.BASE) {\n point._setWindowSize(windowSize);\n point.multiply(BigInt(3));\n return point;\n }\n };\n function getPublicKey(privateKey, isCompressed = true) {\n return Point3.fromPrivateKey(privateKey).toRawBytes(isCompressed);\n }\n function isProbPub(item) {\n const arr = item instanceof Uint8Array;\n const str = typeof item === \"string\";\n const len = (arr || str) && item.length;\n if (arr)\n return len === compressedLen || len === uncompressedLen;\n if (str)\n return len === 2 * compressedLen || len === 2 * uncompressedLen;\n if (item instanceof Point3)\n return true;\n return false;\n }\n function getSharedSecret(privateA, publicB, isCompressed = true) {\n if (isProbPub(privateA))\n throw new Error(\"first arg must be private key\");\n if (!isProbPub(publicB))\n throw new Error(\"second arg must be public key\");\n const b4 = Point3.fromHex(publicB);\n return b4.multiply(normPrivateKeyToScalar(privateA)).toRawBytes(isCompressed);\n }\n const bits2int = CURVE.bits2int || function(bytes) {\n const num2 = ut.bytesToNumberBE(bytes);\n const delta = bytes.length * 8 - CURVE.nBitLength;\n return delta > 0 ? num2 >> BigInt(delta) : num2;\n };\n const bits2int_modN = CURVE.bits2int_modN || function(bytes) {\n return modN2(bits2int(bytes));\n };\n const ORDER_MASK = ut.bitMask(CURVE.nBitLength);\n function int2octets(num2) {\n if (typeof num2 !== \"bigint\")\n throw new Error(\"bigint expected\");\n if (!(_0n12 <= num2 && num2 < ORDER_MASK))\n throw new Error(`bigint expected < 2^${CURVE.nBitLength}`);\n return ut.numberToBytesBE(num2, CURVE.nByteLength);\n }\n function prepSig(msgHash, privateKey, opts = defaultSigOpts) {\n if ([\"recovered\", \"canonical\"].some((k4) => k4 in opts))\n throw new Error(\"sign() legacy options not supported\");\n const { hash: hash3, randomBytes: randomBytes2 } = CURVE;\n let { lowS, prehash, extraEntropy: ent } = opts;\n if (lowS == null)\n lowS = true;\n msgHash = (0, utils_js_1.ensureBytes)(\"msgHash\", msgHash);\n if (prehash)\n msgHash = (0, utils_js_1.ensureBytes)(\"prehashed msgHash\", hash3(msgHash));\n const h1int = bits2int_modN(msgHash);\n const d5 = normPrivateKeyToScalar(privateKey);\n const seedArgs = [int2octets(d5), int2octets(h1int)];\n if (ent != null) {\n const e3 = ent === true ? randomBytes2(Fp.BYTES) : ent;\n seedArgs.push((0, utils_js_1.ensureBytes)(\"extraEntropy\", e3));\n }\n const seed = ut.concatBytes(...seedArgs);\n const m2 = h1int;\n function k2sig(kBytes) {\n const k4 = bits2int(kBytes);\n if (!isWithinCurveOrder(k4))\n return;\n const ik = invN(k4);\n const q3 = Point3.BASE.multiply(k4).toAffine();\n const r2 = modN2(q3.x);\n if (r2 === _0n12)\n return;\n const s4 = modN2(ik * modN2(m2 + r2 * d5));\n if (s4 === _0n12)\n return;\n let recovery = (q3.x === r2 ? 0 : 2) | Number(q3.y & _1n12);\n let normS = s4;\n if (lowS && isBiggerThanHalfOrder(s4)) {\n normS = normalizeS(s4);\n recovery ^= 1;\n }\n return new Signature2(r2, normS, recovery);\n }\n return { seed, k2sig };\n }\n const defaultSigOpts = { lowS: CURVE.lowS, prehash: false };\n const defaultVerOpts = { lowS: CURVE.lowS, prehash: false };\n function sign3(msgHash, privKey, opts = defaultSigOpts) {\n const { seed, k2sig } = prepSig(msgHash, privKey, opts);\n const C = CURVE;\n const drbg = ut.createHmacDrbg(C.hash.outputLen, C.nByteLength, C.hmac);\n return drbg(seed, k2sig);\n }\n Point3.BASE._setWindowSize(8);\n function verify(signature, msgHash, publicKey, opts = defaultVerOpts) {\n const sg = signature;\n msgHash = (0, utils_js_1.ensureBytes)(\"msgHash\", msgHash);\n publicKey = (0, utils_js_1.ensureBytes)(\"publicKey\", publicKey);\n if (\"strict\" in opts)\n throw new Error(\"options.strict was renamed to lowS\");\n const { lowS, prehash } = opts;\n let _sig = void 0;\n let P2;\n try {\n if (typeof sg === \"string\" || sg instanceof Uint8Array) {\n try {\n _sig = Signature2.fromDER(sg);\n } catch (derError) {\n if (!(derError instanceof exports3.DER.Err))\n throw derError;\n _sig = Signature2.fromCompact(sg);\n }\n } else if (typeof sg === \"object\" && typeof sg.r === \"bigint\" && typeof sg.s === \"bigint\") {\n const { r: r3, s: s5 } = sg;\n _sig = new Signature2(r3, s5);\n } else {\n throw new Error(\"PARSE\");\n }\n P2 = Point3.fromHex(publicKey);\n } catch (error) {\n if (error.message === \"PARSE\")\n throw new Error(`signature must be Signature instance, Uint8Array or hex string`);\n return false;\n }\n if (lowS && _sig.hasHighS())\n return false;\n if (prehash)\n msgHash = CURVE.hash(msgHash);\n const { r: r2, s: s4 } = _sig;\n const h4 = bits2int_modN(msgHash);\n const is = invN(s4);\n const u1 = modN2(h4 * is);\n const u2 = modN2(r2 * is);\n const R3 = Point3.BASE.multiplyAndAddUnsafe(P2, u1, u2)?.toAffine();\n if (!R3)\n return false;\n const v2 = modN2(R3.x);\n return v2 === r2;\n }\n return {\n CURVE,\n getPublicKey,\n getSharedSecret,\n sign: sign3,\n verify,\n ProjectivePoint: Point3,\n Signature: Signature2,\n utils\n };\n }\n exports3.weierstrass = weierstrass3;\n function SWUFpSqrtRatio2(Fp, Z2) {\n const q3 = Fp.ORDER;\n let l6 = _0n12;\n for (let o5 = q3 - _1n12; o5 % _2n9 === _0n12; o5 /= _2n9)\n l6 += _1n12;\n const c1 = l6;\n const _2n_pow_c1_1 = _2n9 << c1 - _1n12 - _1n12;\n const _2n_pow_c1 = _2n_pow_c1_1 * _2n9;\n const c22 = (q3 - _1n12) / _2n_pow_c1;\n const c32 = (c22 - _1n12) / _2n9;\n const c4 = _2n_pow_c1 - _1n12;\n const c5 = _2n_pow_c1_1;\n const c6 = Fp.pow(Z2, c22);\n const c7 = Fp.pow(Z2, (c22 + _1n12) / _2n9);\n let sqrtRatio = (u2, v2) => {\n let tv1 = c6;\n let tv2 = Fp.pow(v2, c4);\n let tv3 = Fp.sqr(tv2);\n tv3 = Fp.mul(tv3, v2);\n let tv5 = Fp.mul(u2, tv3);\n tv5 = Fp.pow(tv5, c32);\n tv5 = Fp.mul(tv5, tv2);\n tv2 = Fp.mul(tv5, v2);\n tv3 = Fp.mul(tv5, u2);\n let tv4 = Fp.mul(tv3, tv2);\n tv5 = Fp.pow(tv4, c5);\n let isQR = Fp.eql(tv5, Fp.ONE);\n tv2 = Fp.mul(tv3, c7);\n tv5 = Fp.mul(tv4, tv1);\n tv3 = Fp.cmov(tv2, tv3, isQR);\n tv4 = Fp.cmov(tv5, tv4, isQR);\n for (let i3 = c1; i3 > _1n12; i3--) {\n let tv52 = i3 - _2n9;\n tv52 = _2n9 << tv52 - _1n12;\n let tvv5 = Fp.pow(tv4, tv52);\n const e1 = Fp.eql(tvv5, Fp.ONE);\n tv2 = Fp.mul(tv3, tv1);\n tv1 = Fp.mul(tv1, tv1);\n tvv5 = Fp.mul(tv4, tv1);\n tv3 = Fp.cmov(tv2, tv3, e1);\n tv4 = Fp.cmov(tvv5, tv4, e1);\n }\n return { isValid: isQR, value: tv3 };\n };\n if (Fp.ORDER % _4n5 === _3n5) {\n const c12 = (Fp.ORDER - _3n5) / _4n5;\n const c23 = Fp.sqrt(Fp.neg(Z2));\n sqrtRatio = (u2, v2) => {\n let tv1 = Fp.sqr(v2);\n const tv2 = Fp.mul(u2, v2);\n tv1 = Fp.mul(tv1, tv2);\n let y1 = Fp.pow(tv1, c12);\n y1 = Fp.mul(y1, tv2);\n const y22 = Fp.mul(y1, c23);\n const tv3 = Fp.mul(Fp.sqr(y1), v2);\n const isQR = Fp.eql(tv3, u2);\n let y6 = Fp.cmov(y22, y1, isQR);\n return { isValid: isQR, value: y6 };\n };\n }\n return sqrtRatio;\n }\n exports3.SWUFpSqrtRatio = SWUFpSqrtRatio2;\n function mapToCurveSimpleSWU2(Fp, opts) {\n mod3.validateField(Fp);\n if (!Fp.isValid(opts.A) || !Fp.isValid(opts.B) || !Fp.isValid(opts.Z))\n throw new Error(\"mapToCurveSimpleSWU: invalid opts\");\n const sqrtRatio = SWUFpSqrtRatio2(Fp, opts.Z);\n if (!Fp.isOdd)\n throw new Error(\"Fp.isOdd is not implemented!\");\n return (u2) => {\n let tv1, tv2, tv3, tv4, tv5, tv6, x4, y6;\n tv1 = Fp.sqr(u2);\n tv1 = Fp.mul(tv1, opts.Z);\n tv2 = Fp.sqr(tv1);\n tv2 = Fp.add(tv2, tv1);\n tv3 = Fp.add(tv2, Fp.ONE);\n tv3 = Fp.mul(tv3, opts.B);\n tv4 = Fp.cmov(opts.Z, Fp.neg(tv2), !Fp.eql(tv2, Fp.ZERO));\n tv4 = Fp.mul(tv4, opts.A);\n tv2 = Fp.sqr(tv3);\n tv6 = Fp.sqr(tv4);\n tv5 = Fp.mul(tv6, opts.A);\n tv2 = Fp.add(tv2, tv5);\n tv2 = Fp.mul(tv2, tv3);\n tv6 = Fp.mul(tv6, tv4);\n tv5 = Fp.mul(tv6, opts.B);\n tv2 = Fp.add(tv2, tv5);\n x4 = Fp.mul(tv1, tv3);\n const { isValid: isValid2, value } = sqrtRatio(tv2, tv6);\n y6 = Fp.mul(tv1, u2);\n y6 = Fp.mul(y6, value);\n x4 = Fp.cmov(x4, tv3, isValid2);\n y6 = Fp.cmov(y6, value, isValid2);\n const e1 = Fp.isOdd(u2) === Fp.isOdd(y6);\n y6 = Fp.cmov(Fp.neg(y6), y6, e1);\n x4 = Fp.div(x4, tv4);\n return { x: x4, y: y6 };\n };\n }\n exports3.mapToCurveSimpleSWU = mapToCurveSimpleSWU2;\n }\n });\n\n // ../../../node_modules/.pnpm/@noble+curves@1.2.0/node_modules/@noble/curves/abstract/hash-to-curve.js\n var require_hash_to_curve = __commonJS({\n \"../../../node_modules/.pnpm/@noble+curves@1.2.0/node_modules/@noble/curves/abstract/hash-to-curve.js\"(exports3) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n Object.defineProperty(exports3, \"__esModule\", { value: true });\n exports3.createHasher = exports3.isogenyMap = exports3.hash_to_field = exports3.expand_message_xof = exports3.expand_message_xmd = void 0;\n var modular_js_1 = require_modular();\n var utils_js_1 = require_utils10();\n function validateDST(dst) {\n if (dst instanceof Uint8Array)\n return dst;\n if (typeof dst === \"string\")\n return (0, utils_js_1.utf8ToBytes)(dst);\n throw new Error(\"DST must be Uint8Array or string\");\n }\n var os2ip2 = utils_js_1.bytesToNumberBE;\n function i2osp2(value, length2) {\n if (value < 0 || value >= 1 << 8 * length2) {\n throw new Error(`bad I2OSP call: value=${value} length=${length2}`);\n }\n const res = Array.from({ length: length2 }).fill(0);\n for (let i3 = length2 - 1; i3 >= 0; i3--) {\n res[i3] = value & 255;\n value >>>= 8;\n }\n return new Uint8Array(res);\n }\n function strxor2(a3, b4) {\n const arr = new Uint8Array(a3.length);\n for (let i3 = 0; i3 < a3.length; i3++) {\n arr[i3] = a3[i3] ^ b4[i3];\n }\n return arr;\n }\n function isBytes6(item) {\n if (!(item instanceof Uint8Array))\n throw new Error(\"Uint8Array expected\");\n }\n function isNum(item) {\n if (!Number.isSafeInteger(item))\n throw new Error(\"number expected\");\n }\n function expand_message_xmd2(msg, DST, lenInBytes, H3) {\n isBytes6(msg);\n isBytes6(DST);\n isNum(lenInBytes);\n if (DST.length > 255)\n DST = H3((0, utils_js_1.concatBytes)((0, utils_js_1.utf8ToBytes)(\"H2C-OVERSIZE-DST-\"), DST));\n const { outputLen: b_in_bytes, blockLen: r_in_bytes } = H3;\n const ell = Math.ceil(lenInBytes / b_in_bytes);\n if (ell > 255)\n throw new Error(\"Invalid xmd length\");\n const DST_prime = (0, utils_js_1.concatBytes)(DST, i2osp2(DST.length, 1));\n const Z_pad = i2osp2(0, r_in_bytes);\n const l_i_b_str = i2osp2(lenInBytes, 2);\n const b4 = new Array(ell);\n const b_0 = H3((0, utils_js_1.concatBytes)(Z_pad, msg, l_i_b_str, i2osp2(0, 1), DST_prime));\n b4[0] = H3((0, utils_js_1.concatBytes)(b_0, i2osp2(1, 1), DST_prime));\n for (let i3 = 1; i3 <= ell; i3++) {\n const args = [strxor2(b_0, b4[i3 - 1]), i2osp2(i3 + 1, 1), DST_prime];\n b4[i3] = H3((0, utils_js_1.concatBytes)(...args));\n }\n const pseudo_random_bytes = (0, utils_js_1.concatBytes)(...b4);\n return pseudo_random_bytes.slice(0, lenInBytes);\n }\n exports3.expand_message_xmd = expand_message_xmd2;\n function expand_message_xof2(msg, DST, lenInBytes, k4, H3) {\n isBytes6(msg);\n isBytes6(DST);\n isNum(lenInBytes);\n if (DST.length > 255) {\n const dkLen = Math.ceil(2 * k4 / 8);\n DST = H3.create({ dkLen }).update((0, utils_js_1.utf8ToBytes)(\"H2C-OVERSIZE-DST-\")).update(DST).digest();\n }\n if (lenInBytes > 65535 || DST.length > 255)\n throw new Error(\"expand_message_xof: invalid lenInBytes\");\n return H3.create({ dkLen: lenInBytes }).update(msg).update(i2osp2(lenInBytes, 2)).update(DST).update(i2osp2(DST.length, 1)).digest();\n }\n exports3.expand_message_xof = expand_message_xof2;\n function hash_to_field2(msg, count, options) {\n (0, utils_js_1.validateObject)(options, {\n DST: \"stringOrUint8Array\",\n p: \"bigint\",\n m: \"isSafeInteger\",\n k: \"isSafeInteger\",\n hash: \"hash\"\n });\n const { p: p4, k: k4, m: m2, hash: hash3, expand, DST: _DST } = options;\n isBytes6(msg);\n isNum(count);\n const DST = validateDST(_DST);\n const log2p = p4.toString(2).length;\n const L2 = Math.ceil((log2p + k4) / 8);\n const len_in_bytes = count * m2 * L2;\n let prb;\n if (expand === \"xmd\") {\n prb = expand_message_xmd2(msg, DST, len_in_bytes, hash3);\n } else if (expand === \"xof\") {\n prb = expand_message_xof2(msg, DST, len_in_bytes, k4, hash3);\n } else if (expand === \"_internal_pass\") {\n prb = msg;\n } else {\n throw new Error('expand must be \"xmd\" or \"xof\"');\n }\n const u2 = new Array(count);\n for (let i3 = 0; i3 < count; i3++) {\n const e3 = new Array(m2);\n for (let j2 = 0; j2 < m2; j2++) {\n const elm_offset = L2 * (j2 + i3 * m2);\n const tv = prb.subarray(elm_offset, elm_offset + L2);\n e3[j2] = (0, modular_js_1.mod)(os2ip2(tv), p4);\n }\n u2[i3] = e3;\n }\n return u2;\n }\n exports3.hash_to_field = hash_to_field2;\n function isogenyMap2(field, map) {\n const COEFF = map.map((i3) => Array.from(i3).reverse());\n return (x4, y6) => {\n const [xNum, xDen, yNum, yDen] = COEFF.map((val) => val.reduce((acc, i3) => field.add(field.mul(acc, x4), i3)));\n x4 = field.div(xNum, xDen);\n y6 = field.mul(y6, field.div(yNum, yDen));\n return { x: x4, y: y6 };\n };\n }\n exports3.isogenyMap = isogenyMap2;\n function createHasher4(Point3, mapToCurve, def) {\n if (typeof mapToCurve !== \"function\")\n throw new Error(\"mapToCurve() must be defined\");\n return {\n // Encodes byte string to elliptic curve.\n // hash_to_curve from https://www.rfc-editor.org/rfc/rfc9380#section-3\n hashToCurve(msg, options) {\n const u2 = hash_to_field2(msg, 2, { ...def, DST: def.DST, ...options });\n const u0 = Point3.fromAffine(mapToCurve(u2[0]));\n const u1 = Point3.fromAffine(mapToCurve(u2[1]));\n const P2 = u0.add(u1).clearCofactor();\n P2.assertValidity();\n return P2;\n },\n // Encodes byte string to elliptic curve.\n // encode_to_curve from https://www.rfc-editor.org/rfc/rfc9380#section-3\n encodeToCurve(msg, options) {\n const u2 = hash_to_field2(msg, 1, { ...def, DST: def.encodeDST, ...options });\n const P2 = Point3.fromAffine(mapToCurve(u2[0])).clearCofactor();\n P2.assertValidity();\n return P2;\n }\n };\n }\n exports3.createHasher = createHasher4;\n }\n });\n\n // ../../../node_modules/.pnpm/@noble+curves@1.2.0/node_modules/@noble/curves/_shortw_utils.js\n var require_shortw_utils = __commonJS({\n \"../../../node_modules/.pnpm/@noble+curves@1.2.0/node_modules/@noble/curves/_shortw_utils.js\"(exports3) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n Object.defineProperty(exports3, \"__esModule\", { value: true });\n exports3.createCurve = exports3.getHash = void 0;\n var hmac_1 = require_hmac2();\n var utils_1 = require_utils9();\n var weierstrass_js_1 = require_weierstrass();\n function getHash2(hash3) {\n return {\n hash: hash3,\n hmac: (key, ...msgs) => (0, hmac_1.hmac)(hash3, key, (0, utils_1.concatBytes)(...msgs)),\n randomBytes: utils_1.randomBytes\n };\n }\n exports3.getHash = getHash2;\n function createCurve3(curveDef, defHash) {\n const create2 = (hash3) => (0, weierstrass_js_1.weierstrass)({ ...curveDef, ...getHash2(hash3) });\n return Object.freeze({ ...create2(defHash), create: create2 });\n }\n exports3.createCurve = createCurve3;\n }\n });\n\n // ../../../node_modules/.pnpm/@noble+curves@1.2.0/node_modules/@noble/curves/secp256k1.js\n var require_secp256k12 = __commonJS({\n \"../../../node_modules/.pnpm/@noble+curves@1.2.0/node_modules/@noble/curves/secp256k1.js\"(exports3) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n Object.defineProperty(exports3, \"__esModule\", { value: true });\n exports3.encodeToCurve = exports3.hashToCurve = exports3.schnorr = exports3.secp256k1 = void 0;\n var sha256_1 = require_sha256();\n var utils_1 = require_utils9();\n var modular_js_1 = require_modular();\n var weierstrass_js_1 = require_weierstrass();\n var utils_js_1 = require_utils10();\n var hash_to_curve_js_1 = require_hash_to_curve();\n var _shortw_utils_js_1 = require_shortw_utils();\n var secp256k1P2 = BigInt(\"0xfffffffffffffffffffffffffffffffffffffffffffffffffffffffefffffc2f\");\n var secp256k1N2 = BigInt(\"0xfffffffffffffffffffffffffffffffebaaedce6af48a03bbfd25e8cd0364141\");\n var _1n12 = BigInt(1);\n var _2n9 = BigInt(2);\n var divNearest3 = (a3, b4) => (a3 + b4 / _2n9) / b4;\n function sqrtMod3(y6) {\n const P2 = secp256k1P2;\n const _3n5 = BigInt(3), _6n = BigInt(6), _11n = BigInt(11), _22n = BigInt(22);\n const _23n = BigInt(23), _44n = BigInt(44), _88n = BigInt(88);\n const b22 = y6 * y6 * y6 % P2;\n const b32 = b22 * b22 * y6 % P2;\n const b6 = (0, modular_js_1.pow2)(b32, _3n5, P2) * b32 % P2;\n const b9 = (0, modular_js_1.pow2)(b6, _3n5, P2) * b32 % P2;\n const b11 = (0, modular_js_1.pow2)(b9, _2n9, P2) * b22 % P2;\n const b222 = (0, modular_js_1.pow2)(b11, _11n, P2) * b11 % P2;\n const b44 = (0, modular_js_1.pow2)(b222, _22n, P2) * b222 % P2;\n const b88 = (0, modular_js_1.pow2)(b44, _44n, P2) * b44 % P2;\n const b176 = (0, modular_js_1.pow2)(b88, _88n, P2) * b88 % P2;\n const b220 = (0, modular_js_1.pow2)(b176, _44n, P2) * b44 % P2;\n const b223 = (0, modular_js_1.pow2)(b220, _3n5, P2) * b32 % P2;\n const t1 = (0, modular_js_1.pow2)(b223, _23n, P2) * b222 % P2;\n const t22 = (0, modular_js_1.pow2)(t1, _6n, P2) * b22 % P2;\n const root = (0, modular_js_1.pow2)(t22, _2n9, P2);\n if (!Fp.eql(Fp.sqr(root), y6))\n throw new Error(\"Cannot find square root\");\n return root;\n }\n var Fp = (0, modular_js_1.Field)(secp256k1P2, void 0, void 0, { sqrt: sqrtMod3 });\n exports3.secp256k1 = (0, _shortw_utils_js_1.createCurve)({\n a: BigInt(0),\n b: BigInt(7),\n Fp,\n n: secp256k1N2,\n // Base point (x, y) aka generator point\n Gx: BigInt(\"55066263022277343669578718895168534326250603453777594175500187360389116729240\"),\n Gy: BigInt(\"32670510020758816978083085130507043184471273380659243275938904335757337482424\"),\n h: BigInt(1),\n lowS: true,\n /**\n * secp256k1 belongs to Koblitz curves: it has efficiently computable endomorphism.\n * Endomorphism uses 2x less RAM, speeds up precomputation by 2x and ECDH / key recovery by 20%.\n * For precomputed wNAF it trades off 1/2 init time & 1/3 ram for 20% perf hit.\n * Explanation: https://gist.github.com/paulmillr/eb670806793e84df628a7c434a873066\n */\n endo: {\n beta: BigInt(\"0x7ae96a2b657c07106e64479eac3434e99cf0497512f58995c1396c28719501ee\"),\n splitScalar: (k4) => {\n const n2 = secp256k1N2;\n const a1 = BigInt(\"0x3086d221a7d46bcde86c90e49284eb15\");\n const b1 = -_1n12 * BigInt(\"0xe4437ed6010e88286f547fa90abfe4c3\");\n const a22 = BigInt(\"0x114ca50f7a8e2f3f657c1108d9d44cfd8\");\n const b22 = a1;\n const POW_2_128 = BigInt(\"0x100000000000000000000000000000000\");\n const c1 = divNearest3(b22 * k4, n2);\n const c22 = divNearest3(-b1 * k4, n2);\n let k1 = (0, modular_js_1.mod)(k4 - c1 * a1 - c22 * a22, n2);\n let k22 = (0, modular_js_1.mod)(-c1 * b1 - c22 * b22, n2);\n const k1neg = k1 > POW_2_128;\n const k2neg = k22 > POW_2_128;\n if (k1neg)\n k1 = n2 - k1;\n if (k2neg)\n k22 = n2 - k22;\n if (k1 > POW_2_128 || k22 > POW_2_128) {\n throw new Error(\"splitScalar: Endomorphism failed, k=\" + k4);\n }\n return { k1neg, k1, k2neg, k2: k22 };\n }\n }\n }, sha256_1.sha256);\n var _0n12 = BigInt(0);\n var fe = (x4) => typeof x4 === \"bigint\" && _0n12 < x4 && x4 < secp256k1P2;\n var ge = (x4) => typeof x4 === \"bigint\" && _0n12 < x4 && x4 < secp256k1N2;\n var TAGGED_HASH_PREFIXES2 = {};\n function taggedHash2(tag, ...messages) {\n let tagP = TAGGED_HASH_PREFIXES2[tag];\n if (tagP === void 0) {\n const tagH = (0, sha256_1.sha256)(Uint8Array.from(tag, (c4) => c4.charCodeAt(0)));\n tagP = (0, utils_js_1.concatBytes)(tagH, tagH);\n TAGGED_HASH_PREFIXES2[tag] = tagP;\n }\n return (0, sha256_1.sha256)((0, utils_js_1.concatBytes)(tagP, ...messages));\n }\n var pointToBytes2 = (point) => point.toRawBytes(true).slice(1);\n var numTo32b2 = (n2) => (0, utils_js_1.numberToBytesBE)(n2, 32);\n var modP2 = (x4) => (0, modular_js_1.mod)(x4, secp256k1P2);\n var modN2 = (x4) => (0, modular_js_1.mod)(x4, secp256k1N2);\n var Point3 = exports3.secp256k1.ProjectivePoint;\n var GmulAdd2 = (Q2, a3, b4) => Point3.BASE.multiplyAndAddUnsafe(Q2, a3, b4);\n function schnorrGetExtPubKey2(priv) {\n let d_ = exports3.secp256k1.utils.normPrivateKeyToScalar(priv);\n let p4 = Point3.fromPrivateKey(d_);\n const scalar = p4.hasEvenY() ? d_ : modN2(-d_);\n return { scalar, bytes: pointToBytes2(p4) };\n }\n function lift_x2(x4) {\n if (!fe(x4))\n throw new Error(\"bad x: need 0 < x < p\");\n const xx = modP2(x4 * x4);\n const c4 = modP2(xx * x4 + BigInt(7));\n let y6 = sqrtMod3(c4);\n if (y6 % _2n9 !== _0n12)\n y6 = modP2(-y6);\n const p4 = new Point3(x4, y6, _1n12);\n p4.assertValidity();\n return p4;\n }\n function challenge2(...args) {\n return modN2((0, utils_js_1.bytesToNumberBE)(taggedHash2(\"BIP0340/challenge\", ...args)));\n }\n function schnorrGetPublicKey2(privateKey) {\n return schnorrGetExtPubKey2(privateKey).bytes;\n }\n function schnorrSign2(message, privateKey, auxRand = (0, utils_1.randomBytes)(32)) {\n const m2 = (0, utils_js_1.ensureBytes)(\"message\", message);\n const { bytes: px, scalar: d5 } = schnorrGetExtPubKey2(privateKey);\n const a3 = (0, utils_js_1.ensureBytes)(\"auxRand\", auxRand, 32);\n const t3 = numTo32b2(d5 ^ (0, utils_js_1.bytesToNumberBE)(taggedHash2(\"BIP0340/aux\", a3)));\n const rand = taggedHash2(\"BIP0340/nonce\", t3, px, m2);\n const k_ = modN2((0, utils_js_1.bytesToNumberBE)(rand));\n if (k_ === _0n12)\n throw new Error(\"sign failed: k is zero\");\n const { bytes: rx, scalar: k4 } = schnorrGetExtPubKey2(k_);\n const e3 = challenge2(rx, px, m2);\n const sig = new Uint8Array(64);\n sig.set(rx, 0);\n sig.set(numTo32b2(modN2(k4 + e3 * d5)), 32);\n if (!schnorrVerify2(sig, m2, px))\n throw new Error(\"sign: Invalid signature produced\");\n return sig;\n }\n function schnorrVerify2(signature, message, publicKey) {\n const sig = (0, utils_js_1.ensureBytes)(\"signature\", signature, 64);\n const m2 = (0, utils_js_1.ensureBytes)(\"message\", message);\n const pub = (0, utils_js_1.ensureBytes)(\"publicKey\", publicKey, 32);\n try {\n const P2 = lift_x2((0, utils_js_1.bytesToNumberBE)(pub));\n const r2 = (0, utils_js_1.bytesToNumberBE)(sig.subarray(0, 32));\n if (!fe(r2))\n return false;\n const s4 = (0, utils_js_1.bytesToNumberBE)(sig.subarray(32, 64));\n if (!ge(s4))\n return false;\n const e3 = challenge2(numTo32b2(r2), pointToBytes2(P2), m2);\n const R3 = GmulAdd2(P2, s4, modN2(-e3));\n if (!R3 || !R3.hasEvenY() || R3.toAffine().x !== r2)\n return false;\n return true;\n } catch (error) {\n return false;\n }\n }\n exports3.schnorr = (() => ({\n getPublicKey: schnorrGetPublicKey2,\n sign: schnorrSign2,\n verify: schnorrVerify2,\n utils: {\n randomPrivateKey: exports3.secp256k1.utils.randomPrivateKey,\n lift_x: lift_x2,\n pointToBytes: pointToBytes2,\n numberToBytesBE: utils_js_1.numberToBytesBE,\n bytesToNumberBE: utils_js_1.bytesToNumberBE,\n taggedHash: taggedHash2,\n mod: modular_js_1.mod\n }\n }))();\n var isoMap2 = /* @__PURE__ */ (() => (0, hash_to_curve_js_1.isogenyMap)(Fp, [\n // xNum\n [\n \"0x8e38e38e38e38e38e38e38e38e38e38e38e38e38e38e38e38e38e38daaaaa8c7\",\n \"0x7d3d4c80bc321d5b9f315cea7fd44c5d595d2fc0bf63b92dfff1044f17c6581\",\n \"0x534c328d23f234e6e2a413deca25caece4506144037c40314ecbd0b53d9dd262\",\n \"0x8e38e38e38e38e38e38e38e38e38e38e38e38e38e38e38e38e38e38daaaaa88c\"\n ],\n // xDen\n [\n \"0xd35771193d94918a9ca34ccbb7b640dd86cd409542f8487d9fe6b745781eb49b\",\n \"0xedadc6f64383dc1df7c4b2d51b54225406d36b641f5e41bbc52a56612a8c6d14\",\n \"0x0000000000000000000000000000000000000000000000000000000000000001\"\n // LAST 1\n ],\n // yNum\n [\n \"0x4bda12f684bda12f684bda12f684bda12f684bda12f684bda12f684b8e38e23c\",\n \"0xc75e0c32d5cb7c0fa9d0a54b12a0a6d5647ab046d686da6fdffc90fc201d71a3\",\n \"0x29a6194691f91a73715209ef6512e576722830a201be2018a765e85a9ecee931\",\n \"0x2f684bda12f684bda12f684bda12f684bda12f684bda12f684bda12f38e38d84\"\n ],\n // yDen\n [\n \"0xfffffffffffffffffffffffffffffffffffffffffffffffffffffffefffff93b\",\n \"0x7a06534bb8bdb49fd5e9e6632722c2989467c1bfc8e8d978dfb425d2685c2573\",\n \"0x6484aa716545ca2cf3a70c3fa8fe337e0a3d21162f0d6299a7bf8192bfd2a76f\",\n \"0x0000000000000000000000000000000000000000000000000000000000000001\"\n // LAST 1\n ]\n ].map((i3) => i3.map((j2) => BigInt(j2)))))();\n var mapSWU2 = /* @__PURE__ */ (() => (0, weierstrass_js_1.mapToCurveSimpleSWU)(Fp, {\n A: BigInt(\"0x3f8731abdd661adca08a5558f0f5d272e953d363cb6f0e5d405447c01a444533\"),\n B: BigInt(\"1771\"),\n Z: Fp.create(BigInt(\"-11\"))\n }))();\n var htf = /* @__PURE__ */ (() => (0, hash_to_curve_js_1.createHasher)(exports3.secp256k1.ProjectivePoint, (scalars) => {\n const { x: x4, y: y6 } = mapSWU2(Fp.create(scalars[0]));\n return isoMap2(x4, y6);\n }, {\n DST: \"secp256k1_XMD:SHA-256_SSWU_RO_\",\n encodeDST: \"secp256k1_XMD:SHA-256_SSWU_NU_\",\n p: Fp.ORDER,\n m: 1,\n k: 128,\n expand: \"xmd\",\n hash: sha256_1.sha256\n }))();\n exports3.hashToCurve = (() => htf.hashToCurve)();\n exports3.encodeToCurve = (() => htf.encodeToCurve)();\n }\n });\n\n // ../../../node_modules/.pnpm/ethers@6.15.0_bufferutil@4.0.9_utf-8-validate@5.0.10/node_modules/ethers/lib.commonjs/constants/addresses.js\n var require_addresses2 = __commonJS({\n \"../../../node_modules/.pnpm/ethers@6.15.0_bufferutil@4.0.9_utf-8-validate@5.0.10/node_modules/ethers/lib.commonjs/constants/addresses.js\"(exports3) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n Object.defineProperty(exports3, \"__esModule\", { value: true });\n exports3.ZeroAddress = void 0;\n exports3.ZeroAddress = \"0x0000000000000000000000000000000000000000\";\n }\n });\n\n // ../../../node_modules/.pnpm/ethers@6.15.0_bufferutil@4.0.9_utf-8-validate@5.0.10/node_modules/ethers/lib.commonjs/constants/hashes.js\n var require_hashes2 = __commonJS({\n \"../../../node_modules/.pnpm/ethers@6.15.0_bufferutil@4.0.9_utf-8-validate@5.0.10/node_modules/ethers/lib.commonjs/constants/hashes.js\"(exports3) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n Object.defineProperty(exports3, \"__esModule\", { value: true });\n exports3.ZeroHash = void 0;\n exports3.ZeroHash = \"0x0000000000000000000000000000000000000000000000000000000000000000\";\n }\n });\n\n // ../../../node_modules/.pnpm/ethers@6.15.0_bufferutil@4.0.9_utf-8-validate@5.0.10/node_modules/ethers/lib.commonjs/constants/numbers.js\n var require_numbers = __commonJS({\n \"../../../node_modules/.pnpm/ethers@6.15.0_bufferutil@4.0.9_utf-8-validate@5.0.10/node_modules/ethers/lib.commonjs/constants/numbers.js\"(exports3) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n Object.defineProperty(exports3, \"__esModule\", { value: true });\n exports3.MaxInt256 = exports3.MinInt256 = exports3.MaxUint256 = exports3.WeiPerEther = exports3.N = void 0;\n exports3.N = BigInt(\"0xfffffffffffffffffffffffffffffffebaaedce6af48a03bbfd25e8cd0364141\");\n exports3.WeiPerEther = BigInt(\"1000000000000000000\");\n exports3.MaxUint256 = BigInt(\"0xffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff\");\n exports3.MinInt256 = BigInt(\"0x8000000000000000000000000000000000000000000000000000000000000000\") * BigInt(-1);\n exports3.MaxInt256 = BigInt(\"0x7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff\");\n }\n });\n\n // ../../../node_modules/.pnpm/ethers@6.15.0_bufferutil@4.0.9_utf-8-validate@5.0.10/node_modules/ethers/lib.commonjs/constants/strings.js\n var require_strings2 = __commonJS({\n \"../../../node_modules/.pnpm/ethers@6.15.0_bufferutil@4.0.9_utf-8-validate@5.0.10/node_modules/ethers/lib.commonjs/constants/strings.js\"(exports3) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n Object.defineProperty(exports3, \"__esModule\", { value: true });\n exports3.MessagePrefix = exports3.EtherSymbol = void 0;\n exports3.EtherSymbol = \"\\u039E\";\n exports3.MessagePrefix = \"\u0019Ethereum Signed Message:\\n\";\n }\n });\n\n // ../../../node_modules/.pnpm/ethers@6.15.0_bufferutil@4.0.9_utf-8-validate@5.0.10/node_modules/ethers/lib.commonjs/constants/index.js\n var require_constants5 = __commonJS({\n \"../../../node_modules/.pnpm/ethers@6.15.0_bufferutil@4.0.9_utf-8-validate@5.0.10/node_modules/ethers/lib.commonjs/constants/index.js\"(exports3) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n Object.defineProperty(exports3, \"__esModule\", { value: true });\n exports3.MessagePrefix = exports3.EtherSymbol = exports3.MaxInt256 = exports3.MinInt256 = exports3.MaxUint256 = exports3.WeiPerEther = exports3.N = exports3.ZeroHash = exports3.ZeroAddress = void 0;\n var addresses_js_1 = require_addresses2();\n Object.defineProperty(exports3, \"ZeroAddress\", { enumerable: true, get: function() {\n return addresses_js_1.ZeroAddress;\n } });\n var hashes_js_1 = require_hashes2();\n Object.defineProperty(exports3, \"ZeroHash\", { enumerable: true, get: function() {\n return hashes_js_1.ZeroHash;\n } });\n var numbers_js_1 = require_numbers();\n Object.defineProperty(exports3, \"N\", { enumerable: true, get: function() {\n return numbers_js_1.N;\n } });\n Object.defineProperty(exports3, \"WeiPerEther\", { enumerable: true, get: function() {\n return numbers_js_1.WeiPerEther;\n } });\n Object.defineProperty(exports3, \"MaxUint256\", { enumerable: true, get: function() {\n return numbers_js_1.MaxUint256;\n } });\n Object.defineProperty(exports3, \"MinInt256\", { enumerable: true, get: function() {\n return numbers_js_1.MinInt256;\n } });\n Object.defineProperty(exports3, \"MaxInt256\", { enumerable: true, get: function() {\n return numbers_js_1.MaxInt256;\n } });\n var strings_js_1 = require_strings2();\n Object.defineProperty(exports3, \"EtherSymbol\", { enumerable: true, get: function() {\n return strings_js_1.EtherSymbol;\n } });\n Object.defineProperty(exports3, \"MessagePrefix\", { enumerable: true, get: function() {\n return strings_js_1.MessagePrefix;\n } });\n }\n });\n\n // ../../../node_modules/.pnpm/ethers@6.15.0_bufferutil@4.0.9_utf-8-validate@5.0.10/node_modules/ethers/lib.commonjs/crypto/signature.js\n var require_signature3 = __commonJS({\n \"../../../node_modules/.pnpm/ethers@6.15.0_bufferutil@4.0.9_utf-8-validate@5.0.10/node_modules/ethers/lib.commonjs/crypto/signature.js\"(exports3) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n Object.defineProperty(exports3, \"__esModule\", { value: true });\n exports3.Signature = void 0;\n var index_js_1 = require_constants5();\n var index_js_2 = require_utils8();\n var BN_0 = BigInt(0);\n var BN_1 = BigInt(1);\n var BN_2 = BigInt(2);\n var BN_27 = BigInt(27);\n var BN_28 = BigInt(28);\n var BN_35 = BigInt(35);\n var _guard = {};\n function toUint256(value) {\n return (0, index_js_2.zeroPadValue)((0, index_js_2.toBeArray)(value), 32);\n }\n var Signature2 = class _Signature {\n #r;\n #s;\n #v;\n #networkV;\n /**\n * The ``r`` value for a signature.\n *\n * This represents the ``x`` coordinate of a \"reference\" or\n * challenge point, from which the ``y`` can be computed.\n */\n get r() {\n return this.#r;\n }\n set r(value) {\n (0, index_js_2.assertArgument)((0, index_js_2.dataLength)(value) === 32, \"invalid r\", \"value\", value);\n this.#r = (0, index_js_2.hexlify)(value);\n }\n /**\n * The ``s`` value for a signature.\n */\n get s() {\n (0, index_js_2.assertArgument)(parseInt(this.#s.substring(0, 3)) < 8, \"non-canonical s; use ._s\", \"s\", this.#s);\n return this.#s;\n }\n set s(_value) {\n (0, index_js_2.assertArgument)((0, index_js_2.dataLength)(_value) === 32, \"invalid s\", \"value\", _value);\n this.#s = (0, index_js_2.hexlify)(_value);\n }\n /**\n * Return the s value, unchecked for EIP-2 compliance.\n *\n * This should generally not be used and is for situations where\n * a non-canonical S value might be relevant, such as Frontier blocks\n * that were mined prior to EIP-2 or invalid Authorization List\n * signatures.\n */\n get _s() {\n return this.#s;\n }\n /**\n * Returns true if the Signature is valid for [[link-eip-2]] signatures.\n */\n isValid() {\n return parseInt(this.#s.substring(0, 3)) < 8;\n }\n /**\n * The ``v`` value for a signature.\n *\n * Since a given ``x`` value for ``r`` has two possible values for\n * its correspondin ``y``, the ``v`` indicates which of the two ``y``\n * values to use.\n *\n * It is normalized to the values ``27`` or ``28`` for legacy\n * purposes.\n */\n get v() {\n return this.#v;\n }\n set v(value) {\n const v2 = (0, index_js_2.getNumber)(value, \"value\");\n (0, index_js_2.assertArgument)(v2 === 27 || v2 === 28, \"invalid v\", \"v\", value);\n this.#v = v2;\n }\n /**\n * The EIP-155 ``v`` for legacy transactions. For non-legacy\n * transactions, this value is ``null``.\n */\n get networkV() {\n return this.#networkV;\n }\n /**\n * The chain ID for EIP-155 legacy transactions. For non-legacy\n * transactions, this value is ``null``.\n */\n get legacyChainId() {\n const v2 = this.networkV;\n if (v2 == null) {\n return null;\n }\n return _Signature.getChainId(v2);\n }\n /**\n * The ``yParity`` for the signature.\n *\n * See ``v`` for more details on how this value is used.\n */\n get yParity() {\n return this.v === 27 ? 0 : 1;\n }\n /**\n * The [[link-eip-2098]] compact representation of the ``yParity``\n * and ``s`` compacted into a single ``bytes32``.\n */\n get yParityAndS() {\n const yParityAndS = (0, index_js_2.getBytes)(this.s);\n if (this.yParity) {\n yParityAndS[0] |= 128;\n }\n return (0, index_js_2.hexlify)(yParityAndS);\n }\n /**\n * The [[link-eip-2098]] compact representation.\n */\n get compactSerialized() {\n return (0, index_js_2.concat)([this.r, this.yParityAndS]);\n }\n /**\n * The serialized representation.\n */\n get serialized() {\n return (0, index_js_2.concat)([this.r, this.s, this.yParity ? \"0x1c\" : \"0x1b\"]);\n }\n /**\n * @private\n */\n constructor(guard, r2, s4, v2) {\n (0, index_js_2.assertPrivate)(guard, _guard, \"Signature\");\n this.#r = r2;\n this.#s = s4;\n this.#v = v2;\n this.#networkV = null;\n }\n [Symbol.for(\"nodejs.util.inspect.custom\")]() {\n return `Signature { r: \"${this.r}\", s: \"${this._s}\"${this.isValid() ? \"\" : ', valid: \"false\"'}, yParity: ${this.yParity}, networkV: ${this.networkV} }`;\n }\n /**\n * Returns a new identical [[Signature]].\n */\n clone() {\n const clone = new _Signature(_guard, this.r, this._s, this.v);\n if (this.networkV) {\n clone.#networkV = this.networkV;\n }\n return clone;\n }\n /**\n * Returns a representation that is compatible with ``JSON.stringify``.\n */\n toJSON() {\n const networkV = this.networkV;\n return {\n _type: \"signature\",\n networkV: networkV != null ? networkV.toString() : null,\n r: this.r,\n s: this._s,\n v: this.v\n };\n }\n /**\n * Compute the chain ID from the ``v`` in a legacy EIP-155 transactions.\n *\n * @example:\n * Signature.getChainId(45)\n * //_result:\n *\n * Signature.getChainId(46)\n * //_result:\n */\n static getChainId(v2) {\n const bv = (0, index_js_2.getBigInt)(v2, \"v\");\n if (bv == BN_27 || bv == BN_28) {\n return BN_0;\n }\n (0, index_js_2.assertArgument)(bv >= BN_35, \"invalid EIP-155 v\", \"v\", v2);\n return (bv - BN_35) / BN_2;\n }\n /**\n * Compute the ``v`` for a chain ID for a legacy EIP-155 transactions.\n *\n * Legacy transactions which use [[link-eip-155]] hijack the ``v``\n * property to include the chain ID.\n *\n * @example:\n * Signature.getChainIdV(5, 27)\n * //_result:\n *\n * Signature.getChainIdV(5, 28)\n * //_result:\n *\n */\n static getChainIdV(chainId, v2) {\n return (0, index_js_2.getBigInt)(chainId) * BN_2 + BigInt(35 + v2 - 27);\n }\n /**\n * Compute the normalized legacy transaction ``v`` from a ``yParirty``,\n * a legacy transaction ``v`` or a legacy [[link-eip-155]] transaction.\n *\n * @example:\n * // The values 0 and 1 imply v is actually yParity\n * Signature.getNormalizedV(0)\n * //_result:\n *\n * // Legacy non-EIP-1559 transaction (i.e. 27 or 28)\n * Signature.getNormalizedV(27)\n * //_result:\n *\n * // Legacy EIP-155 transaction (i.e. >= 35)\n * Signature.getNormalizedV(46)\n * //_result:\n *\n * // Invalid values throw\n * Signature.getNormalizedV(5)\n * //_error:\n */\n static getNormalizedV(v2) {\n const bv = (0, index_js_2.getBigInt)(v2);\n if (bv === BN_0 || bv === BN_27) {\n return 27;\n }\n if (bv === BN_1 || bv === BN_28) {\n return 28;\n }\n (0, index_js_2.assertArgument)(bv >= BN_35, \"invalid v\", \"v\", v2);\n return bv & BN_1 ? 27 : 28;\n }\n /**\n * Creates a new [[Signature]].\n *\n * If no %%sig%% is provided, a new [[Signature]] is created\n * with default values.\n *\n * If %%sig%% is a string, it is parsed.\n */\n static from(sig) {\n function assertError(check, message) {\n (0, index_js_2.assertArgument)(check, message, \"signature\", sig);\n }\n ;\n if (sig == null) {\n return new _Signature(_guard, index_js_1.ZeroHash, index_js_1.ZeroHash, 27);\n }\n if (typeof sig === \"string\") {\n const bytes = (0, index_js_2.getBytes)(sig, \"signature\");\n if (bytes.length === 64) {\n const r3 = (0, index_js_2.hexlify)(bytes.slice(0, 32));\n const s5 = bytes.slice(32, 64);\n const v3 = s5[0] & 128 ? 28 : 27;\n s5[0] &= 127;\n return new _Signature(_guard, r3, (0, index_js_2.hexlify)(s5), v3);\n }\n if (bytes.length === 65) {\n const r3 = (0, index_js_2.hexlify)(bytes.slice(0, 32));\n const s5 = (0, index_js_2.hexlify)(bytes.slice(32, 64));\n const v3 = _Signature.getNormalizedV(bytes[64]);\n return new _Signature(_guard, r3, s5, v3);\n }\n assertError(false, \"invalid raw signature length\");\n }\n if (sig instanceof _Signature) {\n return sig.clone();\n }\n const _r = sig.r;\n assertError(_r != null, \"missing r\");\n const r2 = toUint256(_r);\n const s4 = function(s5, yParityAndS) {\n if (s5 != null) {\n return toUint256(s5);\n }\n if (yParityAndS != null) {\n assertError((0, index_js_2.isHexString)(yParityAndS, 32), \"invalid yParityAndS\");\n const bytes = (0, index_js_2.getBytes)(yParityAndS);\n bytes[0] &= 127;\n return (0, index_js_2.hexlify)(bytes);\n }\n assertError(false, \"missing s\");\n }(sig.s, sig.yParityAndS);\n const { networkV, v: v2 } = function(_v, yParityAndS, yParity) {\n if (_v != null) {\n const v3 = (0, index_js_2.getBigInt)(_v);\n return {\n networkV: v3 >= BN_35 ? v3 : void 0,\n v: _Signature.getNormalizedV(v3)\n };\n }\n if (yParityAndS != null) {\n assertError((0, index_js_2.isHexString)(yParityAndS, 32), \"invalid yParityAndS\");\n return { v: (0, index_js_2.getBytes)(yParityAndS)[0] & 128 ? 28 : 27 };\n }\n if (yParity != null) {\n switch ((0, index_js_2.getNumber)(yParity, \"sig.yParity\")) {\n case 0:\n return { v: 27 };\n case 1:\n return { v: 28 };\n }\n assertError(false, \"invalid yParity\");\n }\n assertError(false, \"missing v\");\n }(sig.v, sig.yParityAndS, sig.yParity);\n const result = new _Signature(_guard, r2, s4, v2);\n if (networkV) {\n result.#networkV = networkV;\n }\n assertError(sig.yParity == null || (0, index_js_2.getNumber)(sig.yParity, \"sig.yParity\") === result.yParity, \"yParity mismatch\");\n assertError(sig.yParityAndS == null || sig.yParityAndS === result.yParityAndS, \"yParityAndS mismatch\");\n return result;\n }\n };\n exports3.Signature = Signature2;\n }\n });\n\n // ../../../node_modules/.pnpm/ethers@6.15.0_bufferutil@4.0.9_utf-8-validate@5.0.10/node_modules/ethers/lib.commonjs/crypto/signing-key.js\n var require_signing_key = __commonJS({\n \"../../../node_modules/.pnpm/ethers@6.15.0_bufferutil@4.0.9_utf-8-validate@5.0.10/node_modules/ethers/lib.commonjs/crypto/signing-key.js\"(exports3) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n Object.defineProperty(exports3, \"__esModule\", { value: true });\n exports3.SigningKey = void 0;\n var secp256k1_1 = require_secp256k12();\n var index_js_1 = require_utils8();\n var signature_js_1 = require_signature3();\n var SigningKey = class _SigningKey {\n #privateKey;\n /**\n * Creates a new **SigningKey** for %%privateKey%%.\n */\n constructor(privateKey) {\n (0, index_js_1.assertArgument)((0, index_js_1.dataLength)(privateKey) === 32, \"invalid private key\", \"privateKey\", \"[REDACTED]\");\n this.#privateKey = (0, index_js_1.hexlify)(privateKey);\n }\n /**\n * The private key.\n */\n get privateKey() {\n return this.#privateKey;\n }\n /**\n * The uncompressed public key.\n *\n * This will always begin with the prefix ``0x04`` and be 132\n * characters long (the ``0x`` prefix and 130 hexadecimal nibbles).\n */\n get publicKey() {\n return _SigningKey.computePublicKey(this.#privateKey);\n }\n /**\n * The compressed public key.\n *\n * This will always begin with either the prefix ``0x02`` or ``0x03``\n * and be 68 characters long (the ``0x`` prefix and 33 hexadecimal\n * nibbles)\n */\n get compressedPublicKey() {\n return _SigningKey.computePublicKey(this.#privateKey, true);\n }\n /**\n * Return the signature of the signed %%digest%%.\n */\n sign(digest) {\n (0, index_js_1.assertArgument)((0, index_js_1.dataLength)(digest) === 32, \"invalid digest length\", \"digest\", digest);\n const sig = secp256k1_1.secp256k1.sign((0, index_js_1.getBytesCopy)(digest), (0, index_js_1.getBytesCopy)(this.#privateKey), {\n lowS: true\n });\n return signature_js_1.Signature.from({\n r: (0, index_js_1.toBeHex)(sig.r, 32),\n s: (0, index_js_1.toBeHex)(sig.s, 32),\n v: sig.recovery ? 28 : 27\n });\n }\n /**\n * Returns the [[link-wiki-ecdh]] shared secret between this\n * private key and the %%other%% key.\n *\n * The %%other%% key may be any type of key, a raw public key,\n * a compressed/uncompressed pubic key or aprivate key.\n *\n * Best practice is usually to use a cryptographic hash on the\n * returned value before using it as a symetric secret.\n *\n * @example:\n * sign1 = new SigningKey(id(\"some-secret-1\"))\n * sign2 = new SigningKey(id(\"some-secret-2\"))\n *\n * // Notice that privA.computeSharedSecret(pubB)...\n * sign1.computeSharedSecret(sign2.publicKey)\n * //_result:\n *\n * // ...is equal to privB.computeSharedSecret(pubA).\n * sign2.computeSharedSecret(sign1.publicKey)\n * //_result:\n */\n computeSharedSecret(other) {\n const pubKey = _SigningKey.computePublicKey(other);\n return (0, index_js_1.hexlify)(secp256k1_1.secp256k1.getSharedSecret((0, index_js_1.getBytesCopy)(this.#privateKey), (0, index_js_1.getBytes)(pubKey), false));\n }\n /**\n * Compute the public key for %%key%%, optionally %%compressed%%.\n *\n * The %%key%% may be any type of key, a raw public key, a\n * compressed/uncompressed public key or private key.\n *\n * @example:\n * sign = new SigningKey(id(\"some-secret\"));\n *\n * // Compute the uncompressed public key for a private key\n * SigningKey.computePublicKey(sign.privateKey)\n * //_result:\n *\n * // Compute the compressed public key for a private key\n * SigningKey.computePublicKey(sign.privateKey, true)\n * //_result:\n *\n * // Compute the uncompressed public key\n * SigningKey.computePublicKey(sign.publicKey, false);\n * //_result:\n *\n * // Compute the Compressed a public key\n * SigningKey.computePublicKey(sign.publicKey, true);\n * //_result:\n */\n static computePublicKey(key, compressed) {\n let bytes = (0, index_js_1.getBytes)(key, \"key\");\n if (bytes.length === 32) {\n const pubKey = secp256k1_1.secp256k1.getPublicKey(bytes, !!compressed);\n return (0, index_js_1.hexlify)(pubKey);\n }\n if (bytes.length === 64) {\n const pub = new Uint8Array(65);\n pub[0] = 4;\n pub.set(bytes, 1);\n bytes = pub;\n }\n const point = secp256k1_1.secp256k1.ProjectivePoint.fromHex(bytes);\n return (0, index_js_1.hexlify)(point.toRawBytes(compressed));\n }\n /**\n * Returns the public key for the private key which produced the\n * %%signature%% for the given %%digest%%.\n *\n * @example:\n * key = new SigningKey(id(\"some-secret\"))\n * digest = id(\"hello world\")\n * sig = key.sign(digest)\n *\n * // Notice the signer public key...\n * key.publicKey\n * //_result:\n *\n * // ...is equal to the recovered public key\n * SigningKey.recoverPublicKey(digest, sig)\n * //_result:\n *\n */\n static recoverPublicKey(digest, signature) {\n (0, index_js_1.assertArgument)((0, index_js_1.dataLength)(digest) === 32, \"invalid digest length\", \"digest\", digest);\n const sig = signature_js_1.Signature.from(signature);\n let secpSig = secp256k1_1.secp256k1.Signature.fromCompact((0, index_js_1.getBytesCopy)((0, index_js_1.concat)([sig.r, sig.s])));\n secpSig = secpSig.addRecoveryBit(sig.yParity);\n const pubKey = secpSig.recoverPublicKey((0, index_js_1.getBytesCopy)(digest));\n (0, index_js_1.assertArgument)(pubKey != null, \"invalid signature for digest\", \"signature\", signature);\n return \"0x\" + pubKey.toHex(false);\n }\n /**\n * Returns the point resulting from adding the ellipic curve points\n * %%p0%% and %%p1%%.\n *\n * This is not a common function most developers should require, but\n * can be useful for certain privacy-specific techniques.\n *\n * For example, it is used by [[HDNodeWallet]] to compute child\n * addresses from parent public keys and chain codes.\n */\n static addPoints(p0, p1, compressed) {\n const pub0 = secp256k1_1.secp256k1.ProjectivePoint.fromHex(_SigningKey.computePublicKey(p0).substring(2));\n const pub1 = secp256k1_1.secp256k1.ProjectivePoint.fromHex(_SigningKey.computePublicKey(p1).substring(2));\n return \"0x\" + pub0.add(pub1).toHex(!!compressed);\n }\n };\n exports3.SigningKey = SigningKey;\n }\n });\n\n // ../../../node_modules/.pnpm/ethers@6.15.0_bufferutil@4.0.9_utf-8-validate@5.0.10/node_modules/ethers/lib.commonjs/crypto/index.js\n var require_crypto2 = __commonJS({\n \"../../../node_modules/.pnpm/ethers@6.15.0_bufferutil@4.0.9_utf-8-validate@5.0.10/node_modules/ethers/lib.commonjs/crypto/index.js\"(exports3) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n Object.defineProperty(exports3, \"__esModule\", { value: true });\n exports3.lock = exports3.Signature = exports3.SigningKey = exports3.scryptSync = exports3.scrypt = exports3.pbkdf2 = exports3.sha512 = exports3.sha256 = exports3.ripemd160 = exports3.keccak256 = exports3.randomBytes = exports3.computeHmac = void 0;\n var hmac_js_1 = require_hmac3();\n Object.defineProperty(exports3, \"computeHmac\", { enumerable: true, get: function() {\n return hmac_js_1.computeHmac;\n } });\n var keccak_js_1 = require_keccak();\n Object.defineProperty(exports3, \"keccak256\", { enumerable: true, get: function() {\n return keccak_js_1.keccak256;\n } });\n var ripemd160_js_1 = require_ripemd1602();\n Object.defineProperty(exports3, \"ripemd160\", { enumerable: true, get: function() {\n return ripemd160_js_1.ripemd160;\n } });\n var pbkdf2_js_1 = require_pbkdf22();\n Object.defineProperty(exports3, \"pbkdf2\", { enumerable: true, get: function() {\n return pbkdf2_js_1.pbkdf2;\n } });\n var random_js_1 = require_random();\n Object.defineProperty(exports3, \"randomBytes\", { enumerable: true, get: function() {\n return random_js_1.randomBytes;\n } });\n var scrypt_js_1 = require_scrypt3();\n Object.defineProperty(exports3, \"scrypt\", { enumerable: true, get: function() {\n return scrypt_js_1.scrypt;\n } });\n Object.defineProperty(exports3, \"scryptSync\", { enumerable: true, get: function() {\n return scrypt_js_1.scryptSync;\n } });\n var sha2_js_1 = require_sha22();\n Object.defineProperty(exports3, \"sha256\", { enumerable: true, get: function() {\n return sha2_js_1.sha256;\n } });\n Object.defineProperty(exports3, \"sha512\", { enumerable: true, get: function() {\n return sha2_js_1.sha512;\n } });\n var signing_key_js_1 = require_signing_key();\n Object.defineProperty(exports3, \"SigningKey\", { enumerable: true, get: function() {\n return signing_key_js_1.SigningKey;\n } });\n var signature_js_1 = require_signature3();\n Object.defineProperty(exports3, \"Signature\", { enumerable: true, get: function() {\n return signature_js_1.Signature;\n } });\n function lock() {\n hmac_js_1.computeHmac.lock();\n keccak_js_1.keccak256.lock();\n pbkdf2_js_1.pbkdf2.lock();\n random_js_1.randomBytes.lock();\n ripemd160_js_1.ripemd160.lock();\n scrypt_js_1.scrypt.lock();\n scrypt_js_1.scryptSync.lock();\n sha2_js_1.sha256.lock();\n sha2_js_1.sha512.lock();\n random_js_1.randomBytes.lock();\n }\n exports3.lock = lock;\n }\n });\n\n // ../../../node_modules/.pnpm/ethers@6.15.0_bufferutil@4.0.9_utf-8-validate@5.0.10/node_modules/ethers/lib.commonjs/address/address.js\n var require_address2 = __commonJS({\n \"../../../node_modules/.pnpm/ethers@6.15.0_bufferutil@4.0.9_utf-8-validate@5.0.10/node_modules/ethers/lib.commonjs/address/address.js\"(exports3) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n Object.defineProperty(exports3, \"__esModule\", { value: true });\n exports3.getIcapAddress = exports3.getAddress = void 0;\n var index_js_1 = require_crypto2();\n var index_js_2 = require_utils8();\n var BN_0 = BigInt(0);\n var BN_36 = BigInt(36);\n function getChecksumAddress(address) {\n address = address.toLowerCase();\n const chars = address.substring(2).split(\"\");\n const expanded = new Uint8Array(40);\n for (let i3 = 0; i3 < 40; i3++) {\n expanded[i3] = chars[i3].charCodeAt(0);\n }\n const hashed = (0, index_js_2.getBytes)((0, index_js_1.keccak256)(expanded));\n for (let i3 = 0; i3 < 40; i3 += 2) {\n if (hashed[i3 >> 1] >> 4 >= 8) {\n chars[i3] = chars[i3].toUpperCase();\n }\n if ((hashed[i3 >> 1] & 15) >= 8) {\n chars[i3 + 1] = chars[i3 + 1].toUpperCase();\n }\n }\n return \"0x\" + chars.join(\"\");\n }\n var ibanLookup = {};\n for (let i3 = 0; i3 < 10; i3++) {\n ibanLookup[String(i3)] = String(i3);\n }\n for (let i3 = 0; i3 < 26; i3++) {\n ibanLookup[String.fromCharCode(65 + i3)] = String(10 + i3);\n }\n var safeDigits = 15;\n function ibanChecksum(address) {\n address = address.toUpperCase();\n address = address.substring(4) + address.substring(0, 2) + \"00\";\n let expanded = address.split(\"\").map((c4) => {\n return ibanLookup[c4];\n }).join(\"\");\n while (expanded.length >= safeDigits) {\n let block = expanded.substring(0, safeDigits);\n expanded = parseInt(block, 10) % 97 + expanded.substring(block.length);\n }\n let checksum4 = String(98 - parseInt(expanded, 10) % 97);\n while (checksum4.length < 2) {\n checksum4 = \"0\" + checksum4;\n }\n return checksum4;\n }\n var Base36 = function() {\n ;\n const result = {};\n for (let i3 = 0; i3 < 36; i3++) {\n const key = \"0123456789abcdefghijklmnopqrstuvwxyz\"[i3];\n result[key] = BigInt(i3);\n }\n return result;\n }();\n function fromBase36(value) {\n value = value.toLowerCase();\n let result = BN_0;\n for (let i3 = 0; i3 < value.length; i3++) {\n result = result * BN_36 + Base36[value[i3]];\n }\n return result;\n }\n function getAddress3(address) {\n (0, index_js_2.assertArgument)(typeof address === \"string\", \"invalid address\", \"address\", address);\n if (address.match(/^(0x)?[0-9a-fA-F]{40}$/)) {\n if (!address.startsWith(\"0x\")) {\n address = \"0x\" + address;\n }\n const result = getChecksumAddress(address);\n (0, index_js_2.assertArgument)(!address.match(/([A-F].*[a-f])|([a-f].*[A-F])/) || result === address, \"bad address checksum\", \"address\", address);\n return result;\n }\n if (address.match(/^XE[0-9]{2}[0-9A-Za-z]{30,31}$/)) {\n (0, index_js_2.assertArgument)(address.substring(2, 4) === ibanChecksum(address), \"bad icap checksum\", \"address\", address);\n let result = fromBase36(address.substring(4)).toString(16);\n while (result.length < 40) {\n result = \"0\" + result;\n }\n return getChecksumAddress(\"0x\" + result);\n }\n (0, index_js_2.assertArgument)(false, \"invalid address\", \"address\", address);\n }\n exports3.getAddress = getAddress3;\n function getIcapAddress(address) {\n let base36 = BigInt(getAddress3(address)).toString(36).toUpperCase();\n while (base36.length < 30) {\n base36 = \"0\" + base36;\n }\n return \"XE\" + ibanChecksum(\"XE00\" + base36) + base36;\n }\n exports3.getIcapAddress = getIcapAddress;\n }\n });\n\n // ../../../node_modules/.pnpm/ethers@6.15.0_bufferutil@4.0.9_utf-8-validate@5.0.10/node_modules/ethers/lib.commonjs/address/contract-address.js\n var require_contract_address = __commonJS({\n \"../../../node_modules/.pnpm/ethers@6.15.0_bufferutil@4.0.9_utf-8-validate@5.0.10/node_modules/ethers/lib.commonjs/address/contract-address.js\"(exports3) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n Object.defineProperty(exports3, \"__esModule\", { value: true });\n exports3.getCreate2Address = exports3.getCreateAddress = void 0;\n var index_js_1 = require_crypto2();\n var index_js_2 = require_utils8();\n var address_js_1 = require_address2();\n function getCreateAddress2(tx) {\n const from14 = (0, address_js_1.getAddress)(tx.from);\n const nonce = (0, index_js_2.getBigInt)(tx.nonce, \"tx.nonce\");\n let nonceHex = nonce.toString(16);\n if (nonceHex === \"0\") {\n nonceHex = \"0x\";\n } else if (nonceHex.length % 2) {\n nonceHex = \"0x0\" + nonceHex;\n } else {\n nonceHex = \"0x\" + nonceHex;\n }\n return (0, address_js_1.getAddress)((0, index_js_2.dataSlice)((0, index_js_1.keccak256)((0, index_js_2.encodeRlp)([from14, nonceHex])), 12));\n }\n exports3.getCreateAddress = getCreateAddress2;\n function getCreate2Address2(_from, _salt, _initCodeHash) {\n const from14 = (0, address_js_1.getAddress)(_from);\n const salt = (0, index_js_2.getBytes)(_salt, \"salt\");\n const initCodeHash = (0, index_js_2.getBytes)(_initCodeHash, \"initCodeHash\");\n (0, index_js_2.assertArgument)(salt.length === 32, \"salt must be 32 bytes\", \"salt\", _salt);\n (0, index_js_2.assertArgument)(initCodeHash.length === 32, \"initCodeHash must be 32 bytes\", \"initCodeHash\", _initCodeHash);\n return (0, address_js_1.getAddress)((0, index_js_2.dataSlice)((0, index_js_1.keccak256)((0, index_js_2.concat)([\"0xff\", from14, salt, initCodeHash])), 12));\n }\n exports3.getCreate2Address = getCreate2Address2;\n }\n });\n\n // ../../../node_modules/.pnpm/ethers@6.15.0_bufferutil@4.0.9_utf-8-validate@5.0.10/node_modules/ethers/lib.commonjs/address/checks.js\n var require_checks = __commonJS({\n \"../../../node_modules/.pnpm/ethers@6.15.0_bufferutil@4.0.9_utf-8-validate@5.0.10/node_modules/ethers/lib.commonjs/address/checks.js\"(exports3) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n Object.defineProperty(exports3, \"__esModule\", { value: true });\n exports3.resolveAddress = exports3.isAddress = exports3.isAddressable = void 0;\n var index_js_1 = require_utils8();\n var address_js_1 = require_address2();\n function isAddressable(value) {\n return value && typeof value.getAddress === \"function\";\n }\n exports3.isAddressable = isAddressable;\n function isAddress2(value) {\n try {\n (0, address_js_1.getAddress)(value);\n return true;\n } catch (error) {\n }\n return false;\n }\n exports3.isAddress = isAddress2;\n async function checkAddress(target, promise) {\n const result = await promise;\n if (result == null || result === \"0x0000000000000000000000000000000000000000\") {\n (0, index_js_1.assert)(typeof target !== \"string\", \"unconfigured name\", \"UNCONFIGURED_NAME\", { value: target });\n (0, index_js_1.assertArgument)(false, \"invalid AddressLike value; did not resolve to a value address\", \"target\", target);\n }\n return (0, address_js_1.getAddress)(result);\n }\n function resolveAddress(target, resolver) {\n if (typeof target === \"string\") {\n if (target.match(/^0x[0-9a-f]{40}$/i)) {\n return (0, address_js_1.getAddress)(target);\n }\n (0, index_js_1.assert)(resolver != null, \"ENS resolution requires a provider\", \"UNSUPPORTED_OPERATION\", { operation: \"resolveName\" });\n return checkAddress(target, resolver.resolveName(target));\n } else if (isAddressable(target)) {\n return checkAddress(target, target.getAddress());\n } else if (target && typeof target.then === \"function\") {\n return checkAddress(target, target);\n }\n (0, index_js_1.assertArgument)(false, \"unsupported addressable value\", \"target\", target);\n }\n exports3.resolveAddress = resolveAddress;\n }\n });\n\n // ../../../node_modules/.pnpm/ethers@6.15.0_bufferutil@4.0.9_utf-8-validate@5.0.10/node_modules/ethers/lib.commonjs/address/index.js\n var require_address3 = __commonJS({\n \"../../../node_modules/.pnpm/ethers@6.15.0_bufferutil@4.0.9_utf-8-validate@5.0.10/node_modules/ethers/lib.commonjs/address/index.js\"(exports3) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n Object.defineProperty(exports3, \"__esModule\", { value: true });\n exports3.resolveAddress = exports3.isAddress = exports3.isAddressable = exports3.getCreate2Address = exports3.getCreateAddress = exports3.getIcapAddress = exports3.getAddress = void 0;\n var address_js_1 = require_address2();\n Object.defineProperty(exports3, \"getAddress\", { enumerable: true, get: function() {\n return address_js_1.getAddress;\n } });\n Object.defineProperty(exports3, \"getIcapAddress\", { enumerable: true, get: function() {\n return address_js_1.getIcapAddress;\n } });\n var contract_address_js_1 = require_contract_address();\n Object.defineProperty(exports3, \"getCreateAddress\", { enumerable: true, get: function() {\n return contract_address_js_1.getCreateAddress;\n } });\n Object.defineProperty(exports3, \"getCreate2Address\", { enumerable: true, get: function() {\n return contract_address_js_1.getCreate2Address;\n } });\n var checks_js_1 = require_checks();\n Object.defineProperty(exports3, \"isAddressable\", { enumerable: true, get: function() {\n return checks_js_1.isAddressable;\n } });\n Object.defineProperty(exports3, \"isAddress\", { enumerable: true, get: function() {\n return checks_js_1.isAddress;\n } });\n Object.defineProperty(exports3, \"resolveAddress\", { enumerable: true, get: function() {\n return checks_js_1.resolveAddress;\n } });\n }\n });\n\n // ../../../node_modules/.pnpm/ethers@6.15.0_bufferutil@4.0.9_utf-8-validate@5.0.10/node_modules/ethers/lib.commonjs/abi/typed.js\n var require_typed = __commonJS({\n \"../../../node_modules/.pnpm/ethers@6.15.0_bufferutil@4.0.9_utf-8-validate@5.0.10/node_modules/ethers/lib.commonjs/abi/typed.js\"(exports3) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n Object.defineProperty(exports3, \"__esModule\", { value: true });\n exports3.Typed = void 0;\n var index_js_1 = require_utils8();\n var _gaurd = {};\n function n2(value, width) {\n let signed = false;\n if (width < 0) {\n signed = true;\n width *= -1;\n }\n return new Typed(_gaurd, `${signed ? \"\" : \"u\"}int${width}`, value, { signed, width });\n }\n function b4(value, size6) {\n return new Typed(_gaurd, `bytes${size6 ? size6 : \"\"}`, value, { size: size6 });\n }\n var _typedSymbol = Symbol.for(\"_ethers_typed\");\n var Typed = class _Typed {\n /**\n * The type, as a Solidity-compatible type.\n */\n type;\n /**\n * The actual value.\n */\n value;\n #options;\n /**\n * @_ignore:\n */\n _typedSymbol;\n /**\n * @_ignore:\n */\n constructor(gaurd, type, value, options) {\n if (options == null) {\n options = null;\n }\n (0, index_js_1.assertPrivate)(_gaurd, gaurd, \"Typed\");\n (0, index_js_1.defineProperties)(this, { _typedSymbol, type, value });\n this.#options = options;\n this.format();\n }\n /**\n * Format the type as a Human-Readable type.\n */\n format() {\n if (this.type === \"array\") {\n throw new Error(\"\");\n } else if (this.type === \"dynamicArray\") {\n throw new Error(\"\");\n } else if (this.type === \"tuple\") {\n return `tuple(${this.value.map((v2) => v2.format()).join(\",\")})`;\n }\n return this.type;\n }\n /**\n * The default value returned by this type.\n */\n defaultValue() {\n return 0;\n }\n /**\n * The minimum value for numeric types.\n */\n minValue() {\n return 0;\n }\n /**\n * The maximum value for numeric types.\n */\n maxValue() {\n return 0;\n }\n /**\n * Returns ``true`` and provides a type guard is this is a [[TypedBigInt]].\n */\n isBigInt() {\n return !!this.type.match(/^u?int[0-9]+$/);\n }\n /**\n * Returns ``true`` and provides a type guard is this is a [[TypedData]].\n */\n isData() {\n return this.type.startsWith(\"bytes\");\n }\n /**\n * Returns ``true`` and provides a type guard is this is a [[TypedString]].\n */\n isString() {\n return this.type === \"string\";\n }\n /**\n * Returns the tuple name, if this is a tuple. Throws otherwise.\n */\n get tupleName() {\n if (this.type !== \"tuple\") {\n throw TypeError(\"not a tuple\");\n }\n return this.#options;\n }\n // Returns the length of this type as an array\n // - `null` indicates the length is unforced, it could be dynamic\n // - `-1` indicates the length is dynamic\n // - any other value indicates it is a static array and is its length\n /**\n * Returns the length of the array type or ``-1`` if it is dynamic.\n *\n * Throws if the type is not an array.\n */\n get arrayLength() {\n if (this.type !== \"array\") {\n throw TypeError(\"not an array\");\n }\n if (this.#options === true) {\n return -1;\n }\n if (this.#options === false) {\n return this.value.length;\n }\n return null;\n }\n /**\n * Returns a new **Typed** of %%type%% with the %%value%%.\n */\n static from(type, value) {\n return new _Typed(_gaurd, type, value);\n }\n /**\n * Return a new ``uint8`` type for %%v%%.\n */\n static uint8(v2) {\n return n2(v2, 8);\n }\n /**\n * Return a new ``uint16`` type for %%v%%.\n */\n static uint16(v2) {\n return n2(v2, 16);\n }\n /**\n * Return a new ``uint24`` type for %%v%%.\n */\n static uint24(v2) {\n return n2(v2, 24);\n }\n /**\n * Return a new ``uint32`` type for %%v%%.\n */\n static uint32(v2) {\n return n2(v2, 32);\n }\n /**\n * Return a new ``uint40`` type for %%v%%.\n */\n static uint40(v2) {\n return n2(v2, 40);\n }\n /**\n * Return a new ``uint48`` type for %%v%%.\n */\n static uint48(v2) {\n return n2(v2, 48);\n }\n /**\n * Return a new ``uint56`` type for %%v%%.\n */\n static uint56(v2) {\n return n2(v2, 56);\n }\n /**\n * Return a new ``uint64`` type for %%v%%.\n */\n static uint64(v2) {\n return n2(v2, 64);\n }\n /**\n * Return a new ``uint72`` type for %%v%%.\n */\n static uint72(v2) {\n return n2(v2, 72);\n }\n /**\n * Return a new ``uint80`` type for %%v%%.\n */\n static uint80(v2) {\n return n2(v2, 80);\n }\n /**\n * Return a new ``uint88`` type for %%v%%.\n */\n static uint88(v2) {\n return n2(v2, 88);\n }\n /**\n * Return a new ``uint96`` type for %%v%%.\n */\n static uint96(v2) {\n return n2(v2, 96);\n }\n /**\n * Return a new ``uint104`` type for %%v%%.\n */\n static uint104(v2) {\n return n2(v2, 104);\n }\n /**\n * Return a new ``uint112`` type for %%v%%.\n */\n static uint112(v2) {\n return n2(v2, 112);\n }\n /**\n * Return a new ``uint120`` type for %%v%%.\n */\n static uint120(v2) {\n return n2(v2, 120);\n }\n /**\n * Return a new ``uint128`` type for %%v%%.\n */\n static uint128(v2) {\n return n2(v2, 128);\n }\n /**\n * Return a new ``uint136`` type for %%v%%.\n */\n static uint136(v2) {\n return n2(v2, 136);\n }\n /**\n * Return a new ``uint144`` type for %%v%%.\n */\n static uint144(v2) {\n return n2(v2, 144);\n }\n /**\n * Return a new ``uint152`` type for %%v%%.\n */\n static uint152(v2) {\n return n2(v2, 152);\n }\n /**\n * Return a new ``uint160`` type for %%v%%.\n */\n static uint160(v2) {\n return n2(v2, 160);\n }\n /**\n * Return a new ``uint168`` type for %%v%%.\n */\n static uint168(v2) {\n return n2(v2, 168);\n }\n /**\n * Return a new ``uint176`` type for %%v%%.\n */\n static uint176(v2) {\n return n2(v2, 176);\n }\n /**\n * Return a new ``uint184`` type for %%v%%.\n */\n static uint184(v2) {\n return n2(v2, 184);\n }\n /**\n * Return a new ``uint192`` type for %%v%%.\n */\n static uint192(v2) {\n return n2(v2, 192);\n }\n /**\n * Return a new ``uint200`` type for %%v%%.\n */\n static uint200(v2) {\n return n2(v2, 200);\n }\n /**\n * Return a new ``uint208`` type for %%v%%.\n */\n static uint208(v2) {\n return n2(v2, 208);\n }\n /**\n * Return a new ``uint216`` type for %%v%%.\n */\n static uint216(v2) {\n return n2(v2, 216);\n }\n /**\n * Return a new ``uint224`` type for %%v%%.\n */\n static uint224(v2) {\n return n2(v2, 224);\n }\n /**\n * Return a new ``uint232`` type for %%v%%.\n */\n static uint232(v2) {\n return n2(v2, 232);\n }\n /**\n * Return a new ``uint240`` type for %%v%%.\n */\n static uint240(v2) {\n return n2(v2, 240);\n }\n /**\n * Return a new ``uint248`` type for %%v%%.\n */\n static uint248(v2) {\n return n2(v2, 248);\n }\n /**\n * Return a new ``uint256`` type for %%v%%.\n */\n static uint256(v2) {\n return n2(v2, 256);\n }\n /**\n * Return a new ``uint256`` type for %%v%%.\n */\n static uint(v2) {\n return n2(v2, 256);\n }\n /**\n * Return a new ``int8`` type for %%v%%.\n */\n static int8(v2) {\n return n2(v2, -8);\n }\n /**\n * Return a new ``int16`` type for %%v%%.\n */\n static int16(v2) {\n return n2(v2, -16);\n }\n /**\n * Return a new ``int24`` type for %%v%%.\n */\n static int24(v2) {\n return n2(v2, -24);\n }\n /**\n * Return a new ``int32`` type for %%v%%.\n */\n static int32(v2) {\n return n2(v2, -32);\n }\n /**\n * Return a new ``int40`` type for %%v%%.\n */\n static int40(v2) {\n return n2(v2, -40);\n }\n /**\n * Return a new ``int48`` type for %%v%%.\n */\n static int48(v2) {\n return n2(v2, -48);\n }\n /**\n * Return a new ``int56`` type for %%v%%.\n */\n static int56(v2) {\n return n2(v2, -56);\n }\n /**\n * Return a new ``int64`` type for %%v%%.\n */\n static int64(v2) {\n return n2(v2, -64);\n }\n /**\n * Return a new ``int72`` type for %%v%%.\n */\n static int72(v2) {\n return n2(v2, -72);\n }\n /**\n * Return a new ``int80`` type for %%v%%.\n */\n static int80(v2) {\n return n2(v2, -80);\n }\n /**\n * Return a new ``int88`` type for %%v%%.\n */\n static int88(v2) {\n return n2(v2, -88);\n }\n /**\n * Return a new ``int96`` type for %%v%%.\n */\n static int96(v2) {\n return n2(v2, -96);\n }\n /**\n * Return a new ``int104`` type for %%v%%.\n */\n static int104(v2) {\n return n2(v2, -104);\n }\n /**\n * Return a new ``int112`` type for %%v%%.\n */\n static int112(v2) {\n return n2(v2, -112);\n }\n /**\n * Return a new ``int120`` type for %%v%%.\n */\n static int120(v2) {\n return n2(v2, -120);\n }\n /**\n * Return a new ``int128`` type for %%v%%.\n */\n static int128(v2) {\n return n2(v2, -128);\n }\n /**\n * Return a new ``int136`` type for %%v%%.\n */\n static int136(v2) {\n return n2(v2, -136);\n }\n /**\n * Return a new ``int144`` type for %%v%%.\n */\n static int144(v2) {\n return n2(v2, -144);\n }\n /**\n * Return a new ``int52`` type for %%v%%.\n */\n static int152(v2) {\n return n2(v2, -152);\n }\n /**\n * Return a new ``int160`` type for %%v%%.\n */\n static int160(v2) {\n return n2(v2, -160);\n }\n /**\n * Return a new ``int168`` type for %%v%%.\n */\n static int168(v2) {\n return n2(v2, -168);\n }\n /**\n * Return a new ``int176`` type for %%v%%.\n */\n static int176(v2) {\n return n2(v2, -176);\n }\n /**\n * Return a new ``int184`` type for %%v%%.\n */\n static int184(v2) {\n return n2(v2, -184);\n }\n /**\n * Return a new ``int92`` type for %%v%%.\n */\n static int192(v2) {\n return n2(v2, -192);\n }\n /**\n * Return a new ``int200`` type for %%v%%.\n */\n static int200(v2) {\n return n2(v2, -200);\n }\n /**\n * Return a new ``int208`` type for %%v%%.\n */\n static int208(v2) {\n return n2(v2, -208);\n }\n /**\n * Return a new ``int216`` type for %%v%%.\n */\n static int216(v2) {\n return n2(v2, -216);\n }\n /**\n * Return a new ``int224`` type for %%v%%.\n */\n static int224(v2) {\n return n2(v2, -224);\n }\n /**\n * Return a new ``int232`` type for %%v%%.\n */\n static int232(v2) {\n return n2(v2, -232);\n }\n /**\n * Return a new ``int240`` type for %%v%%.\n */\n static int240(v2) {\n return n2(v2, -240);\n }\n /**\n * Return a new ``int248`` type for %%v%%.\n */\n static int248(v2) {\n return n2(v2, -248);\n }\n /**\n * Return a new ``int256`` type for %%v%%.\n */\n static int256(v2) {\n return n2(v2, -256);\n }\n /**\n * Return a new ``int256`` type for %%v%%.\n */\n static int(v2) {\n return n2(v2, -256);\n }\n /**\n * Return a new ``bytes1`` type for %%v%%.\n */\n static bytes1(v2) {\n return b4(v2, 1);\n }\n /**\n * Return a new ``bytes2`` type for %%v%%.\n */\n static bytes2(v2) {\n return b4(v2, 2);\n }\n /**\n * Return a new ``bytes3`` type for %%v%%.\n */\n static bytes3(v2) {\n return b4(v2, 3);\n }\n /**\n * Return a new ``bytes4`` type for %%v%%.\n */\n static bytes4(v2) {\n return b4(v2, 4);\n }\n /**\n * Return a new ``bytes5`` type for %%v%%.\n */\n static bytes5(v2) {\n return b4(v2, 5);\n }\n /**\n * Return a new ``bytes6`` type for %%v%%.\n */\n static bytes6(v2) {\n return b4(v2, 6);\n }\n /**\n * Return a new ``bytes7`` type for %%v%%.\n */\n static bytes7(v2) {\n return b4(v2, 7);\n }\n /**\n * Return a new ``bytes8`` type for %%v%%.\n */\n static bytes8(v2) {\n return b4(v2, 8);\n }\n /**\n * Return a new ``bytes9`` type for %%v%%.\n */\n static bytes9(v2) {\n return b4(v2, 9);\n }\n /**\n * Return a new ``bytes10`` type for %%v%%.\n */\n static bytes10(v2) {\n return b4(v2, 10);\n }\n /**\n * Return a new ``bytes11`` type for %%v%%.\n */\n static bytes11(v2) {\n return b4(v2, 11);\n }\n /**\n * Return a new ``bytes12`` type for %%v%%.\n */\n static bytes12(v2) {\n return b4(v2, 12);\n }\n /**\n * Return a new ``bytes13`` type for %%v%%.\n */\n static bytes13(v2) {\n return b4(v2, 13);\n }\n /**\n * Return a new ``bytes14`` type for %%v%%.\n */\n static bytes14(v2) {\n return b4(v2, 14);\n }\n /**\n * Return a new ``bytes15`` type for %%v%%.\n */\n static bytes15(v2) {\n return b4(v2, 15);\n }\n /**\n * Return a new ``bytes16`` type for %%v%%.\n */\n static bytes16(v2) {\n return b4(v2, 16);\n }\n /**\n * Return a new ``bytes17`` type for %%v%%.\n */\n static bytes17(v2) {\n return b4(v2, 17);\n }\n /**\n * Return a new ``bytes18`` type for %%v%%.\n */\n static bytes18(v2) {\n return b4(v2, 18);\n }\n /**\n * Return a new ``bytes19`` type for %%v%%.\n */\n static bytes19(v2) {\n return b4(v2, 19);\n }\n /**\n * Return a new ``bytes20`` type for %%v%%.\n */\n static bytes20(v2) {\n return b4(v2, 20);\n }\n /**\n * Return a new ``bytes21`` type for %%v%%.\n */\n static bytes21(v2) {\n return b4(v2, 21);\n }\n /**\n * Return a new ``bytes22`` type for %%v%%.\n */\n static bytes22(v2) {\n return b4(v2, 22);\n }\n /**\n * Return a new ``bytes23`` type for %%v%%.\n */\n static bytes23(v2) {\n return b4(v2, 23);\n }\n /**\n * Return a new ``bytes24`` type for %%v%%.\n */\n static bytes24(v2) {\n return b4(v2, 24);\n }\n /**\n * Return a new ``bytes25`` type for %%v%%.\n */\n static bytes25(v2) {\n return b4(v2, 25);\n }\n /**\n * Return a new ``bytes26`` type for %%v%%.\n */\n static bytes26(v2) {\n return b4(v2, 26);\n }\n /**\n * Return a new ``bytes27`` type for %%v%%.\n */\n static bytes27(v2) {\n return b4(v2, 27);\n }\n /**\n * Return a new ``bytes28`` type for %%v%%.\n */\n static bytes28(v2) {\n return b4(v2, 28);\n }\n /**\n * Return a new ``bytes29`` type for %%v%%.\n */\n static bytes29(v2) {\n return b4(v2, 29);\n }\n /**\n * Return a new ``bytes30`` type for %%v%%.\n */\n static bytes30(v2) {\n return b4(v2, 30);\n }\n /**\n * Return a new ``bytes31`` type for %%v%%.\n */\n static bytes31(v2) {\n return b4(v2, 31);\n }\n /**\n * Return a new ``bytes32`` type for %%v%%.\n */\n static bytes32(v2) {\n return b4(v2, 32);\n }\n /**\n * Return a new ``address`` type for %%v%%.\n */\n static address(v2) {\n return new _Typed(_gaurd, \"address\", v2);\n }\n /**\n * Return a new ``bool`` type for %%v%%.\n */\n static bool(v2) {\n return new _Typed(_gaurd, \"bool\", !!v2);\n }\n /**\n * Return a new ``bytes`` type for %%v%%.\n */\n static bytes(v2) {\n return new _Typed(_gaurd, \"bytes\", v2);\n }\n /**\n * Return a new ``string`` type for %%v%%.\n */\n static string(v2) {\n return new _Typed(_gaurd, \"string\", v2);\n }\n /**\n * Return a new ``array`` type for %%v%%, allowing %%dynamic%% length.\n */\n static array(v2, dynamic) {\n throw new Error(\"not implemented yet\");\n return new _Typed(_gaurd, \"array\", v2, dynamic);\n }\n /**\n * Return a new ``tuple`` type for %%v%%, with the optional %%name%%.\n */\n static tuple(v2, name) {\n throw new Error(\"not implemented yet\");\n return new _Typed(_gaurd, \"tuple\", v2, name);\n }\n /**\n * Return a new ``uint8`` type for %%v%%.\n */\n static overrides(v2) {\n return new _Typed(_gaurd, \"overrides\", Object.assign({}, v2));\n }\n /**\n * Returns true only if %%value%% is a [[Typed]] instance.\n */\n static isTyped(value) {\n return value && typeof value === \"object\" && \"_typedSymbol\" in value && value._typedSymbol === _typedSymbol;\n }\n /**\n * If the value is a [[Typed]] instance, validates the underlying value\n * and returns it, otherwise returns value directly.\n *\n * This is useful for functions that with to accept either a [[Typed]]\n * object or values.\n */\n static dereference(value, type) {\n if (_Typed.isTyped(value)) {\n if (value.type !== type) {\n throw new Error(`invalid type: expecetd ${type}, got ${value.type}`);\n }\n return value.value;\n }\n return value;\n }\n };\n exports3.Typed = Typed;\n }\n });\n\n // ../../../node_modules/.pnpm/ethers@6.15.0_bufferutil@4.0.9_utf-8-validate@5.0.10/node_modules/ethers/lib.commonjs/abi/coders/address.js\n var require_address4 = __commonJS({\n \"../../../node_modules/.pnpm/ethers@6.15.0_bufferutil@4.0.9_utf-8-validate@5.0.10/node_modules/ethers/lib.commonjs/abi/coders/address.js\"(exports3) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n Object.defineProperty(exports3, \"__esModule\", { value: true });\n exports3.AddressCoder = void 0;\n var index_js_1 = require_address3();\n var maths_js_1 = require_maths();\n var typed_js_1 = require_typed();\n var abstract_coder_js_1 = require_abstract_coder2();\n var AddressCoder = class extends abstract_coder_js_1.Coder {\n constructor(localName) {\n super(\"address\", \"address\", localName, false);\n }\n defaultValue() {\n return \"0x0000000000000000000000000000000000000000\";\n }\n encode(writer, _value) {\n let value = typed_js_1.Typed.dereference(_value, \"string\");\n try {\n value = (0, index_js_1.getAddress)(value);\n } catch (error) {\n return this._throwError(error.message, _value);\n }\n return writer.writeValue(value);\n }\n decode(reader) {\n return (0, index_js_1.getAddress)((0, maths_js_1.toBeHex)(reader.readValue(), 20));\n }\n };\n exports3.AddressCoder = AddressCoder;\n }\n });\n\n // ../../../node_modules/.pnpm/ethers@6.15.0_bufferutil@4.0.9_utf-8-validate@5.0.10/node_modules/ethers/lib.commonjs/abi/coders/anonymous.js\n var require_anonymous2 = __commonJS({\n \"../../../node_modules/.pnpm/ethers@6.15.0_bufferutil@4.0.9_utf-8-validate@5.0.10/node_modules/ethers/lib.commonjs/abi/coders/anonymous.js\"(exports3) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n Object.defineProperty(exports3, \"__esModule\", { value: true });\n exports3.AnonymousCoder = void 0;\n var abstract_coder_js_1 = require_abstract_coder2();\n var AnonymousCoder = class extends abstract_coder_js_1.Coder {\n coder;\n constructor(coder) {\n super(coder.name, coder.type, \"_\", coder.dynamic);\n this.coder = coder;\n }\n defaultValue() {\n return this.coder.defaultValue();\n }\n encode(writer, value) {\n return this.coder.encode(writer, value);\n }\n decode(reader) {\n return this.coder.decode(reader);\n }\n };\n exports3.AnonymousCoder = AnonymousCoder;\n }\n });\n\n // ../../../node_modules/.pnpm/ethers@6.15.0_bufferutil@4.0.9_utf-8-validate@5.0.10/node_modules/ethers/lib.commonjs/abi/coders/array.js\n var require_array2 = __commonJS({\n \"../../../node_modules/.pnpm/ethers@6.15.0_bufferutil@4.0.9_utf-8-validate@5.0.10/node_modules/ethers/lib.commonjs/abi/coders/array.js\"(exports3) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n Object.defineProperty(exports3, \"__esModule\", { value: true });\n exports3.ArrayCoder = exports3.unpack = exports3.pack = void 0;\n var index_js_1 = require_utils8();\n var typed_js_1 = require_typed();\n var abstract_coder_js_1 = require_abstract_coder2();\n var anonymous_js_1 = require_anonymous2();\n function pack(writer, coders, values) {\n let arrayValues = [];\n if (Array.isArray(values)) {\n arrayValues = values;\n } else if (values && typeof values === \"object\") {\n let unique = {};\n arrayValues = coders.map((coder) => {\n const name = coder.localName;\n (0, index_js_1.assert)(name, \"cannot encode object for signature with missing names\", \"INVALID_ARGUMENT\", { argument: \"values\", info: { coder }, value: values });\n (0, index_js_1.assert)(!unique[name], \"cannot encode object for signature with duplicate names\", \"INVALID_ARGUMENT\", { argument: \"values\", info: { coder }, value: values });\n unique[name] = true;\n return values[name];\n });\n } else {\n (0, index_js_1.assertArgument)(false, \"invalid tuple value\", \"tuple\", values);\n }\n (0, index_js_1.assertArgument)(coders.length === arrayValues.length, \"types/value length mismatch\", \"tuple\", values);\n let staticWriter = new abstract_coder_js_1.Writer();\n let dynamicWriter = new abstract_coder_js_1.Writer();\n let updateFuncs = [];\n coders.forEach((coder, index2) => {\n let value = arrayValues[index2];\n if (coder.dynamic) {\n let dynamicOffset = dynamicWriter.length;\n coder.encode(dynamicWriter, value);\n let updateFunc = staticWriter.writeUpdatableValue();\n updateFuncs.push((baseOffset) => {\n updateFunc(baseOffset + dynamicOffset);\n });\n } else {\n coder.encode(staticWriter, value);\n }\n });\n updateFuncs.forEach((func) => {\n func(staticWriter.length);\n });\n let length2 = writer.appendWriter(staticWriter);\n length2 += writer.appendWriter(dynamicWriter);\n return length2;\n }\n exports3.pack = pack;\n function unpack(reader, coders) {\n let values = [];\n let keys = [];\n let baseReader = reader.subReader(0);\n coders.forEach((coder) => {\n let value = null;\n if (coder.dynamic) {\n let offset = reader.readIndex();\n let offsetReader = baseReader.subReader(offset);\n try {\n value = coder.decode(offsetReader);\n } catch (error) {\n if ((0, index_js_1.isError)(error, \"BUFFER_OVERRUN\")) {\n throw error;\n }\n value = error;\n value.baseType = coder.name;\n value.name = coder.localName;\n value.type = coder.type;\n }\n } else {\n try {\n value = coder.decode(reader);\n } catch (error) {\n if ((0, index_js_1.isError)(error, \"BUFFER_OVERRUN\")) {\n throw error;\n }\n value = error;\n value.baseType = coder.name;\n value.name = coder.localName;\n value.type = coder.type;\n }\n }\n if (value == void 0) {\n throw new Error(\"investigate\");\n }\n values.push(value);\n keys.push(coder.localName || null);\n });\n return abstract_coder_js_1.Result.fromItems(values, keys);\n }\n exports3.unpack = unpack;\n var ArrayCoder = class extends abstract_coder_js_1.Coder {\n coder;\n length;\n constructor(coder, length2, localName) {\n const type = coder.type + \"[\" + (length2 >= 0 ? length2 : \"\") + \"]\";\n const dynamic = length2 === -1 || coder.dynamic;\n super(\"array\", type, localName, dynamic);\n (0, index_js_1.defineProperties)(this, { coder, length: length2 });\n }\n defaultValue() {\n const defaultChild = this.coder.defaultValue();\n const result = [];\n for (let i3 = 0; i3 < this.length; i3++) {\n result.push(defaultChild);\n }\n return result;\n }\n encode(writer, _value) {\n const value = typed_js_1.Typed.dereference(_value, \"array\");\n if (!Array.isArray(value)) {\n this._throwError(\"expected array value\", value);\n }\n let count = this.length;\n if (count === -1) {\n count = value.length;\n writer.writeValue(value.length);\n }\n (0, index_js_1.assertArgumentCount)(value.length, count, \"coder array\" + (this.localName ? \" \" + this.localName : \"\"));\n let coders = [];\n for (let i3 = 0; i3 < value.length; i3++) {\n coders.push(this.coder);\n }\n return pack(writer, coders, value);\n }\n decode(reader) {\n let count = this.length;\n if (count === -1) {\n count = reader.readIndex();\n (0, index_js_1.assert)(count * abstract_coder_js_1.WordSize <= reader.dataLength, \"insufficient data length\", \"BUFFER_OVERRUN\", { buffer: reader.bytes, offset: count * abstract_coder_js_1.WordSize, length: reader.dataLength });\n }\n let coders = [];\n for (let i3 = 0; i3 < count; i3++) {\n coders.push(new anonymous_js_1.AnonymousCoder(this.coder));\n }\n return unpack(reader, coders);\n }\n };\n exports3.ArrayCoder = ArrayCoder;\n }\n });\n\n // ../../../node_modules/.pnpm/ethers@6.15.0_bufferutil@4.0.9_utf-8-validate@5.0.10/node_modules/ethers/lib.commonjs/abi/coders/boolean.js\n var require_boolean2 = __commonJS({\n \"../../../node_modules/.pnpm/ethers@6.15.0_bufferutil@4.0.9_utf-8-validate@5.0.10/node_modules/ethers/lib.commonjs/abi/coders/boolean.js\"(exports3) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n Object.defineProperty(exports3, \"__esModule\", { value: true });\n exports3.BooleanCoder = void 0;\n var typed_js_1 = require_typed();\n var abstract_coder_js_1 = require_abstract_coder2();\n var BooleanCoder = class extends abstract_coder_js_1.Coder {\n constructor(localName) {\n super(\"bool\", \"bool\", localName, false);\n }\n defaultValue() {\n return false;\n }\n encode(writer, _value) {\n const value = typed_js_1.Typed.dereference(_value, \"bool\");\n return writer.writeValue(value ? 1 : 0);\n }\n decode(reader) {\n return !!reader.readValue();\n }\n };\n exports3.BooleanCoder = BooleanCoder;\n }\n });\n\n // ../../../node_modules/.pnpm/ethers@6.15.0_bufferutil@4.0.9_utf-8-validate@5.0.10/node_modules/ethers/lib.commonjs/abi/coders/bytes.js\n var require_bytes2 = __commonJS({\n \"../../../node_modules/.pnpm/ethers@6.15.0_bufferutil@4.0.9_utf-8-validate@5.0.10/node_modules/ethers/lib.commonjs/abi/coders/bytes.js\"(exports3) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n Object.defineProperty(exports3, \"__esModule\", { value: true });\n exports3.BytesCoder = exports3.DynamicBytesCoder = void 0;\n var index_js_1 = require_utils8();\n var abstract_coder_js_1 = require_abstract_coder2();\n var DynamicBytesCoder = class extends abstract_coder_js_1.Coder {\n constructor(type, localName) {\n super(type, type, localName, true);\n }\n defaultValue() {\n return \"0x\";\n }\n encode(writer, value) {\n value = (0, index_js_1.getBytesCopy)(value);\n let length2 = writer.writeValue(value.length);\n length2 += writer.writeBytes(value);\n return length2;\n }\n decode(reader) {\n return reader.readBytes(reader.readIndex(), true);\n }\n };\n exports3.DynamicBytesCoder = DynamicBytesCoder;\n var BytesCoder = class extends DynamicBytesCoder {\n constructor(localName) {\n super(\"bytes\", localName);\n }\n decode(reader) {\n return (0, index_js_1.hexlify)(super.decode(reader));\n }\n };\n exports3.BytesCoder = BytesCoder;\n }\n });\n\n // ../../../node_modules/.pnpm/ethers@6.15.0_bufferutil@4.0.9_utf-8-validate@5.0.10/node_modules/ethers/lib.commonjs/abi/coders/fixed-bytes.js\n var require_fixed_bytes2 = __commonJS({\n \"../../../node_modules/.pnpm/ethers@6.15.0_bufferutil@4.0.9_utf-8-validate@5.0.10/node_modules/ethers/lib.commonjs/abi/coders/fixed-bytes.js\"(exports3) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n Object.defineProperty(exports3, \"__esModule\", { value: true });\n exports3.FixedBytesCoder = void 0;\n var index_js_1 = require_utils8();\n var typed_js_1 = require_typed();\n var abstract_coder_js_1 = require_abstract_coder2();\n var FixedBytesCoder = class extends abstract_coder_js_1.Coder {\n size;\n constructor(size6, localName) {\n let name = \"bytes\" + String(size6);\n super(name, name, localName, false);\n (0, index_js_1.defineProperties)(this, { size: size6 }, { size: \"number\" });\n }\n defaultValue() {\n return \"0x0000000000000000000000000000000000000000000000000000000000000000\".substring(0, 2 + this.size * 2);\n }\n encode(writer, _value) {\n let data = (0, index_js_1.getBytesCopy)(typed_js_1.Typed.dereference(_value, this.type));\n if (data.length !== this.size) {\n this._throwError(\"incorrect data length\", _value);\n }\n return writer.writeBytes(data);\n }\n decode(reader) {\n return (0, index_js_1.hexlify)(reader.readBytes(this.size));\n }\n };\n exports3.FixedBytesCoder = FixedBytesCoder;\n }\n });\n\n // ../../../node_modules/.pnpm/ethers@6.15.0_bufferutil@4.0.9_utf-8-validate@5.0.10/node_modules/ethers/lib.commonjs/abi/coders/null.js\n var require_null2 = __commonJS({\n \"../../../node_modules/.pnpm/ethers@6.15.0_bufferutil@4.0.9_utf-8-validate@5.0.10/node_modules/ethers/lib.commonjs/abi/coders/null.js\"(exports3) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n Object.defineProperty(exports3, \"__esModule\", { value: true });\n exports3.NullCoder = void 0;\n var abstract_coder_js_1 = require_abstract_coder2();\n var Empty = new Uint8Array([]);\n var NullCoder = class extends abstract_coder_js_1.Coder {\n constructor(localName) {\n super(\"null\", \"\", localName, false);\n }\n defaultValue() {\n return null;\n }\n encode(writer, value) {\n if (value != null) {\n this._throwError(\"not null\", value);\n }\n return writer.writeBytes(Empty);\n }\n decode(reader) {\n reader.readBytes(0);\n return null;\n }\n };\n exports3.NullCoder = NullCoder;\n }\n });\n\n // ../../../node_modules/.pnpm/ethers@6.15.0_bufferutil@4.0.9_utf-8-validate@5.0.10/node_modules/ethers/lib.commonjs/abi/coders/number.js\n var require_number2 = __commonJS({\n \"../../../node_modules/.pnpm/ethers@6.15.0_bufferutil@4.0.9_utf-8-validate@5.0.10/node_modules/ethers/lib.commonjs/abi/coders/number.js\"(exports3) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n Object.defineProperty(exports3, \"__esModule\", { value: true });\n exports3.NumberCoder = void 0;\n var index_js_1 = require_utils8();\n var typed_js_1 = require_typed();\n var abstract_coder_js_1 = require_abstract_coder2();\n var BN_0 = BigInt(0);\n var BN_1 = BigInt(1);\n var BN_MAX_UINT256 = BigInt(\"0xffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff\");\n var NumberCoder = class extends abstract_coder_js_1.Coder {\n size;\n signed;\n constructor(size6, signed, localName) {\n const name = (signed ? \"int\" : \"uint\") + size6 * 8;\n super(name, name, localName, false);\n (0, index_js_1.defineProperties)(this, { size: size6, signed }, { size: \"number\", signed: \"boolean\" });\n }\n defaultValue() {\n return 0;\n }\n encode(writer, _value) {\n let value = (0, index_js_1.getBigInt)(typed_js_1.Typed.dereference(_value, this.type));\n let maxUintValue = (0, index_js_1.mask)(BN_MAX_UINT256, abstract_coder_js_1.WordSize * 8);\n if (this.signed) {\n let bounds = (0, index_js_1.mask)(maxUintValue, this.size * 8 - 1);\n if (value > bounds || value < -(bounds + BN_1)) {\n this._throwError(\"value out-of-bounds\", _value);\n }\n value = (0, index_js_1.toTwos)(value, 8 * abstract_coder_js_1.WordSize);\n } else if (value < BN_0 || value > (0, index_js_1.mask)(maxUintValue, this.size * 8)) {\n this._throwError(\"value out-of-bounds\", _value);\n }\n return writer.writeValue(value);\n }\n decode(reader) {\n let value = (0, index_js_1.mask)(reader.readValue(), this.size * 8);\n if (this.signed) {\n value = (0, index_js_1.fromTwos)(value, this.size * 8);\n }\n return value;\n }\n };\n exports3.NumberCoder = NumberCoder;\n }\n });\n\n // ../../../node_modules/.pnpm/ethers@6.15.0_bufferutil@4.0.9_utf-8-validate@5.0.10/node_modules/ethers/lib.commonjs/abi/coders/string.js\n var require_string2 = __commonJS({\n \"../../../node_modules/.pnpm/ethers@6.15.0_bufferutil@4.0.9_utf-8-validate@5.0.10/node_modules/ethers/lib.commonjs/abi/coders/string.js\"(exports3) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n Object.defineProperty(exports3, \"__esModule\", { value: true });\n exports3.StringCoder = void 0;\n var utf8_js_1 = require_utf82();\n var typed_js_1 = require_typed();\n var bytes_js_1 = require_bytes2();\n var StringCoder = class extends bytes_js_1.DynamicBytesCoder {\n constructor(localName) {\n super(\"string\", localName);\n }\n defaultValue() {\n return \"\";\n }\n encode(writer, _value) {\n return super.encode(writer, (0, utf8_js_1.toUtf8Bytes)(typed_js_1.Typed.dereference(_value, \"string\")));\n }\n decode(reader) {\n return (0, utf8_js_1.toUtf8String)(super.decode(reader));\n }\n };\n exports3.StringCoder = StringCoder;\n }\n });\n\n // ../../../node_modules/.pnpm/ethers@6.15.0_bufferutil@4.0.9_utf-8-validate@5.0.10/node_modules/ethers/lib.commonjs/abi/coders/tuple.js\n var require_tuple2 = __commonJS({\n \"../../../node_modules/.pnpm/ethers@6.15.0_bufferutil@4.0.9_utf-8-validate@5.0.10/node_modules/ethers/lib.commonjs/abi/coders/tuple.js\"(exports3) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n Object.defineProperty(exports3, \"__esModule\", { value: true });\n exports3.TupleCoder = void 0;\n var properties_js_1 = require_properties();\n var typed_js_1 = require_typed();\n var abstract_coder_js_1 = require_abstract_coder2();\n var array_js_1 = require_array2();\n var TupleCoder = class extends abstract_coder_js_1.Coder {\n coders;\n constructor(coders, localName) {\n let dynamic = false;\n const types = [];\n coders.forEach((coder) => {\n if (coder.dynamic) {\n dynamic = true;\n }\n types.push(coder.type);\n });\n const type = \"tuple(\" + types.join(\",\") + \")\";\n super(\"tuple\", type, localName, dynamic);\n (0, properties_js_1.defineProperties)(this, { coders: Object.freeze(coders.slice()) });\n }\n defaultValue() {\n const values = [];\n this.coders.forEach((coder) => {\n values.push(coder.defaultValue());\n });\n const uniqueNames = this.coders.reduce((accum, coder) => {\n const name = coder.localName;\n if (name) {\n if (!accum[name]) {\n accum[name] = 0;\n }\n accum[name]++;\n }\n return accum;\n }, {});\n this.coders.forEach((coder, index2) => {\n let name = coder.localName;\n if (!name || uniqueNames[name] !== 1) {\n return;\n }\n if (name === \"length\") {\n name = \"_length\";\n }\n if (values[name] != null) {\n return;\n }\n values[name] = values[index2];\n });\n return Object.freeze(values);\n }\n encode(writer, _value) {\n const value = typed_js_1.Typed.dereference(_value, \"tuple\");\n return (0, array_js_1.pack)(writer, this.coders, value);\n }\n decode(reader) {\n return (0, array_js_1.unpack)(reader, this.coders);\n }\n };\n exports3.TupleCoder = TupleCoder;\n }\n });\n\n // ../../../node_modules/.pnpm/ethers@6.15.0_bufferutil@4.0.9_utf-8-validate@5.0.10/node_modules/ethers/lib.commonjs/transaction/accesslist.js\n var require_accesslist = __commonJS({\n \"../../../node_modules/.pnpm/ethers@6.15.0_bufferutil@4.0.9_utf-8-validate@5.0.10/node_modules/ethers/lib.commonjs/transaction/accesslist.js\"(exports3) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n Object.defineProperty(exports3, \"__esModule\", { value: true });\n exports3.accessListify = void 0;\n var index_js_1 = require_address3();\n var index_js_2 = require_utils8();\n function accessSetify(addr, storageKeys) {\n return {\n address: (0, index_js_1.getAddress)(addr),\n storageKeys: storageKeys.map((storageKey, index2) => {\n (0, index_js_2.assertArgument)((0, index_js_2.isHexString)(storageKey, 32), \"invalid slot\", `storageKeys[${index2}]`, storageKey);\n return storageKey.toLowerCase();\n })\n };\n }\n function accessListify(value) {\n if (Array.isArray(value)) {\n return value.map((set, index2) => {\n if (Array.isArray(set)) {\n (0, index_js_2.assertArgument)(set.length === 2, \"invalid slot set\", `value[${index2}]`, set);\n return accessSetify(set[0], set[1]);\n }\n (0, index_js_2.assertArgument)(set != null && typeof set === \"object\", \"invalid address-slot set\", \"value\", value);\n return accessSetify(set.address, set.storageKeys);\n });\n }\n (0, index_js_2.assertArgument)(value != null && typeof value === \"object\", \"invalid access list\", \"value\", value);\n const result = Object.keys(value).map((addr) => {\n const storageKeys = value[addr].reduce((accum, storageKey) => {\n accum[storageKey] = true;\n return accum;\n }, {});\n return accessSetify(addr, Object.keys(storageKeys).sort());\n });\n result.sort((a3, b4) => a3.address.localeCompare(b4.address));\n return result;\n }\n exports3.accessListify = accessListify;\n }\n });\n\n // ../../../node_modules/.pnpm/ethers@6.15.0_bufferutil@4.0.9_utf-8-validate@5.0.10/node_modules/ethers/lib.commonjs/transaction/authorization.js\n var require_authorization = __commonJS({\n \"../../../node_modules/.pnpm/ethers@6.15.0_bufferutil@4.0.9_utf-8-validate@5.0.10/node_modules/ethers/lib.commonjs/transaction/authorization.js\"(exports3) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n Object.defineProperty(exports3, \"__esModule\", { value: true });\n exports3.authorizationify = void 0;\n var index_js_1 = require_address3();\n var index_js_2 = require_crypto2();\n var index_js_3 = require_utils8();\n function authorizationify(auth) {\n return {\n address: (0, index_js_1.getAddress)(auth.address),\n nonce: (0, index_js_3.getBigInt)(auth.nonce != null ? auth.nonce : 0),\n chainId: (0, index_js_3.getBigInt)(auth.chainId != null ? auth.chainId : 0),\n signature: index_js_2.Signature.from(auth.signature)\n };\n }\n exports3.authorizationify = authorizationify;\n }\n });\n\n // ../../../node_modules/.pnpm/ethers@6.15.0_bufferutil@4.0.9_utf-8-validate@5.0.10/node_modules/ethers/lib.commonjs/transaction/address.js\n var require_address5 = __commonJS({\n \"../../../node_modules/.pnpm/ethers@6.15.0_bufferutil@4.0.9_utf-8-validate@5.0.10/node_modules/ethers/lib.commonjs/transaction/address.js\"(exports3) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n Object.defineProperty(exports3, \"__esModule\", { value: true });\n exports3.recoverAddress = exports3.computeAddress = void 0;\n var index_js_1 = require_address3();\n var index_js_2 = require_crypto2();\n function computeAddress(key) {\n let pubkey;\n if (typeof key === \"string\") {\n pubkey = index_js_2.SigningKey.computePublicKey(key, false);\n } else {\n pubkey = key.publicKey;\n }\n return (0, index_js_1.getAddress)((0, index_js_2.keccak256)(\"0x\" + pubkey.substring(4)).substring(26));\n }\n exports3.computeAddress = computeAddress;\n function recoverAddress3(digest, signature) {\n return computeAddress(index_js_2.SigningKey.recoverPublicKey(digest, signature));\n }\n exports3.recoverAddress = recoverAddress3;\n }\n });\n\n // ../../../node_modules/.pnpm/ethers@6.15.0_bufferutil@4.0.9_utf-8-validate@5.0.10/node_modules/ethers/lib.commonjs/transaction/transaction.js\n var require_transaction = __commonJS({\n \"../../../node_modules/.pnpm/ethers@6.15.0_bufferutil@4.0.9_utf-8-validate@5.0.10/node_modules/ethers/lib.commonjs/transaction/transaction.js\"(exports3) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n Object.defineProperty(exports3, \"__esModule\", { value: true });\n exports3.Transaction = void 0;\n var index_js_1 = require_address3();\n var addresses_js_1 = require_addresses2();\n var index_js_2 = require_crypto2();\n var index_js_3 = require_utils8();\n var accesslist_js_1 = require_accesslist();\n var authorization_js_1 = require_authorization();\n var address_js_1 = require_address5();\n var BN_0 = BigInt(0);\n var BN_2 = BigInt(2);\n var BN_27 = BigInt(27);\n var BN_28 = BigInt(28);\n var BN_35 = BigInt(35);\n var BN_MAX_UINT = BigInt(\"0xffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff\");\n var BLOB_SIZE = 4096 * 32;\n function getKzgLibrary(kzg) {\n const blobToKzgCommitment = (blob) => {\n if (\"computeBlobProof\" in kzg) {\n if (\"blobToKzgCommitment\" in kzg && typeof kzg.blobToKzgCommitment === \"function\") {\n return (0, index_js_3.getBytes)(kzg.blobToKzgCommitment((0, index_js_3.hexlify)(blob)));\n }\n } else if (\"blobToKzgCommitment\" in kzg && typeof kzg.blobToKzgCommitment === \"function\") {\n return (0, index_js_3.getBytes)(kzg.blobToKzgCommitment(blob));\n }\n if (\"blobToKZGCommitment\" in kzg && typeof kzg.blobToKZGCommitment === \"function\") {\n return (0, index_js_3.getBytes)(kzg.blobToKZGCommitment((0, index_js_3.hexlify)(blob)));\n }\n (0, index_js_3.assertArgument)(false, \"unsupported KZG library\", \"kzg\", kzg);\n };\n const computeBlobKzgProof = (blob, commitment) => {\n if (\"computeBlobProof\" in kzg && typeof kzg.computeBlobProof === \"function\") {\n return (0, index_js_3.getBytes)(kzg.computeBlobProof((0, index_js_3.hexlify)(blob), (0, index_js_3.hexlify)(commitment)));\n }\n if (\"computeBlobKzgProof\" in kzg && typeof kzg.computeBlobKzgProof === \"function\") {\n return kzg.computeBlobKzgProof(blob, commitment);\n }\n if (\"computeBlobKZGProof\" in kzg && typeof kzg.computeBlobKZGProof === \"function\") {\n return (0, index_js_3.getBytes)(kzg.computeBlobKZGProof((0, index_js_3.hexlify)(blob), (0, index_js_3.hexlify)(commitment)));\n }\n (0, index_js_3.assertArgument)(false, \"unsupported KZG library\", \"kzg\", kzg);\n };\n return { blobToKzgCommitment, computeBlobKzgProof };\n }\n function getVersionedHash(version6, hash3) {\n let versioned = version6.toString(16);\n while (versioned.length < 2) {\n versioned = \"0\" + versioned;\n }\n versioned += (0, index_js_2.sha256)(hash3).substring(4);\n return \"0x\" + versioned;\n }\n function handleAddress(value) {\n if (value === \"0x\") {\n return null;\n }\n return (0, index_js_1.getAddress)(value);\n }\n function handleAccessList(value, param) {\n try {\n return (0, accesslist_js_1.accessListify)(value);\n } catch (error) {\n (0, index_js_3.assertArgument)(false, error.message, param, value);\n }\n }\n function handleAuthorizationList(value, param) {\n try {\n if (!Array.isArray(value)) {\n throw new Error(\"authorizationList: invalid array\");\n }\n const result = [];\n for (let i3 = 0; i3 < value.length; i3++) {\n const auth = value[i3];\n if (!Array.isArray(auth)) {\n throw new Error(`authorization[${i3}]: invalid array`);\n }\n if (auth.length !== 6) {\n throw new Error(`authorization[${i3}]: wrong length`);\n }\n if (!auth[1]) {\n throw new Error(`authorization[${i3}]: null address`);\n }\n result.push({\n address: handleAddress(auth[1]),\n nonce: handleUint(auth[2], \"nonce\"),\n chainId: handleUint(auth[0], \"chainId\"),\n signature: index_js_2.Signature.from({\n yParity: handleNumber(auth[3], \"yParity\"),\n r: (0, index_js_3.zeroPadValue)(auth[4], 32),\n s: (0, index_js_3.zeroPadValue)(auth[5], 32)\n })\n });\n }\n return result;\n } catch (error) {\n (0, index_js_3.assertArgument)(false, error.message, param, value);\n }\n }\n function handleNumber(_value, param) {\n if (_value === \"0x\") {\n return 0;\n }\n return (0, index_js_3.getNumber)(_value, param);\n }\n function handleUint(_value, param) {\n if (_value === \"0x\") {\n return BN_0;\n }\n const value = (0, index_js_3.getBigInt)(_value, param);\n (0, index_js_3.assertArgument)(value <= BN_MAX_UINT, \"value exceeds uint size\", param, value);\n return value;\n }\n function formatNumber(_value, name) {\n const value = (0, index_js_3.getBigInt)(_value, \"value\");\n const result = (0, index_js_3.toBeArray)(value);\n (0, index_js_3.assertArgument)(result.length <= 32, `value too large`, `tx.${name}`, value);\n return result;\n }\n function formatAccessList(value) {\n return (0, accesslist_js_1.accessListify)(value).map((set) => [set.address, set.storageKeys]);\n }\n function formatAuthorizationList3(value) {\n return value.map((a3) => {\n return [\n formatNumber(a3.chainId, \"chainId\"),\n a3.address,\n formatNumber(a3.nonce, \"nonce\"),\n formatNumber(a3.signature.yParity, \"yParity\"),\n (0, index_js_3.toBeArray)(a3.signature.r),\n (0, index_js_3.toBeArray)(a3.signature.s)\n ];\n });\n }\n function formatHashes(value, param) {\n (0, index_js_3.assertArgument)(Array.isArray(value), `invalid ${param}`, \"value\", value);\n for (let i3 = 0; i3 < value.length; i3++) {\n (0, index_js_3.assertArgument)((0, index_js_3.isHexString)(value[i3], 32), \"invalid ${ param } hash\", `value[${i3}]`, value[i3]);\n }\n return value;\n }\n function _parseLegacy(data) {\n const fields = (0, index_js_3.decodeRlp)(data);\n (0, index_js_3.assertArgument)(Array.isArray(fields) && (fields.length === 9 || fields.length === 6), \"invalid field count for legacy transaction\", \"data\", data);\n const tx = {\n type: 0,\n nonce: handleNumber(fields[0], \"nonce\"),\n gasPrice: handleUint(fields[1], \"gasPrice\"),\n gasLimit: handleUint(fields[2], \"gasLimit\"),\n to: handleAddress(fields[3]),\n value: handleUint(fields[4], \"value\"),\n data: (0, index_js_3.hexlify)(fields[5]),\n chainId: BN_0\n };\n if (fields.length === 6) {\n return tx;\n }\n const v2 = handleUint(fields[6], \"v\");\n const r2 = handleUint(fields[7], \"r\");\n const s4 = handleUint(fields[8], \"s\");\n if (r2 === BN_0 && s4 === BN_0) {\n tx.chainId = v2;\n } else {\n let chainId = (v2 - BN_35) / BN_2;\n if (chainId < BN_0) {\n chainId = BN_0;\n }\n tx.chainId = chainId;\n (0, index_js_3.assertArgument)(chainId !== BN_0 || (v2 === BN_27 || v2 === BN_28), \"non-canonical legacy v\", \"v\", fields[6]);\n tx.signature = index_js_2.Signature.from({\n r: (0, index_js_3.zeroPadValue)(fields[7], 32),\n s: (0, index_js_3.zeroPadValue)(fields[8], 32),\n v: v2\n });\n }\n return tx;\n }\n function _serializeLegacy(tx, sig) {\n const fields = [\n formatNumber(tx.nonce, \"nonce\"),\n formatNumber(tx.gasPrice || 0, \"gasPrice\"),\n formatNumber(tx.gasLimit, \"gasLimit\"),\n tx.to || \"0x\",\n formatNumber(tx.value, \"value\"),\n tx.data\n ];\n let chainId = BN_0;\n if (tx.chainId != BN_0) {\n chainId = (0, index_js_3.getBigInt)(tx.chainId, \"tx.chainId\");\n (0, index_js_3.assertArgument)(!sig || sig.networkV == null || sig.legacyChainId === chainId, \"tx.chainId/sig.v mismatch\", \"sig\", sig);\n } else if (tx.signature) {\n const legacy = tx.signature.legacyChainId;\n if (legacy != null) {\n chainId = legacy;\n }\n }\n if (!sig) {\n if (chainId !== BN_0) {\n fields.push((0, index_js_3.toBeArray)(chainId));\n fields.push(\"0x\");\n fields.push(\"0x\");\n }\n return (0, index_js_3.encodeRlp)(fields);\n }\n let v2 = BigInt(27 + sig.yParity);\n if (chainId !== BN_0) {\n v2 = index_js_2.Signature.getChainIdV(chainId, sig.v);\n } else if (BigInt(sig.v) !== v2) {\n (0, index_js_3.assertArgument)(false, \"tx.chainId/sig.v mismatch\", \"sig\", sig);\n }\n fields.push((0, index_js_3.toBeArray)(v2));\n fields.push((0, index_js_3.toBeArray)(sig.r));\n fields.push((0, index_js_3.toBeArray)(sig.s));\n return (0, index_js_3.encodeRlp)(fields);\n }\n function _parseEipSignature(tx, fields) {\n let yParity;\n try {\n yParity = handleNumber(fields[0], \"yParity\");\n if (yParity !== 0 && yParity !== 1) {\n throw new Error(\"bad yParity\");\n }\n } catch (error) {\n (0, index_js_3.assertArgument)(false, \"invalid yParity\", \"yParity\", fields[0]);\n }\n const r2 = (0, index_js_3.zeroPadValue)(fields[1], 32);\n const s4 = (0, index_js_3.zeroPadValue)(fields[2], 32);\n const signature = index_js_2.Signature.from({ r: r2, s: s4, yParity });\n tx.signature = signature;\n }\n function _parseEip1559(data) {\n const fields = (0, index_js_3.decodeRlp)((0, index_js_3.getBytes)(data).slice(1));\n (0, index_js_3.assertArgument)(Array.isArray(fields) && (fields.length === 9 || fields.length === 12), \"invalid field count for transaction type: 2\", \"data\", (0, index_js_3.hexlify)(data));\n const tx = {\n type: 2,\n chainId: handleUint(fields[0], \"chainId\"),\n nonce: handleNumber(fields[1], \"nonce\"),\n maxPriorityFeePerGas: handleUint(fields[2], \"maxPriorityFeePerGas\"),\n maxFeePerGas: handleUint(fields[3], \"maxFeePerGas\"),\n gasPrice: null,\n gasLimit: handleUint(fields[4], \"gasLimit\"),\n to: handleAddress(fields[5]),\n value: handleUint(fields[6], \"value\"),\n data: (0, index_js_3.hexlify)(fields[7]),\n accessList: handleAccessList(fields[8], \"accessList\")\n };\n if (fields.length === 9) {\n return tx;\n }\n _parseEipSignature(tx, fields.slice(9));\n return tx;\n }\n function _serializeEip1559(tx, sig) {\n const fields = [\n formatNumber(tx.chainId, \"chainId\"),\n formatNumber(tx.nonce, \"nonce\"),\n formatNumber(tx.maxPriorityFeePerGas || 0, \"maxPriorityFeePerGas\"),\n formatNumber(tx.maxFeePerGas || 0, \"maxFeePerGas\"),\n formatNumber(tx.gasLimit, \"gasLimit\"),\n tx.to || \"0x\",\n formatNumber(tx.value, \"value\"),\n tx.data,\n formatAccessList(tx.accessList || [])\n ];\n if (sig) {\n fields.push(formatNumber(sig.yParity, \"yParity\"));\n fields.push((0, index_js_3.toBeArray)(sig.r));\n fields.push((0, index_js_3.toBeArray)(sig.s));\n }\n return (0, index_js_3.concat)([\"0x02\", (0, index_js_3.encodeRlp)(fields)]);\n }\n function _parseEip2930(data) {\n const fields = (0, index_js_3.decodeRlp)((0, index_js_3.getBytes)(data).slice(1));\n (0, index_js_3.assertArgument)(Array.isArray(fields) && (fields.length === 8 || fields.length === 11), \"invalid field count for transaction type: 1\", \"data\", (0, index_js_3.hexlify)(data));\n const tx = {\n type: 1,\n chainId: handleUint(fields[0], \"chainId\"),\n nonce: handleNumber(fields[1], \"nonce\"),\n gasPrice: handleUint(fields[2], \"gasPrice\"),\n gasLimit: handleUint(fields[3], \"gasLimit\"),\n to: handleAddress(fields[4]),\n value: handleUint(fields[5], \"value\"),\n data: (0, index_js_3.hexlify)(fields[6]),\n accessList: handleAccessList(fields[7], \"accessList\")\n };\n if (fields.length === 8) {\n return tx;\n }\n _parseEipSignature(tx, fields.slice(8));\n return tx;\n }\n function _serializeEip2930(tx, sig) {\n const fields = [\n formatNumber(tx.chainId, \"chainId\"),\n formatNumber(tx.nonce, \"nonce\"),\n formatNumber(tx.gasPrice || 0, \"gasPrice\"),\n formatNumber(tx.gasLimit, \"gasLimit\"),\n tx.to || \"0x\",\n formatNumber(tx.value, \"value\"),\n tx.data,\n formatAccessList(tx.accessList || [])\n ];\n if (sig) {\n fields.push(formatNumber(sig.yParity, \"recoveryParam\"));\n fields.push((0, index_js_3.toBeArray)(sig.r));\n fields.push((0, index_js_3.toBeArray)(sig.s));\n }\n return (0, index_js_3.concat)([\"0x01\", (0, index_js_3.encodeRlp)(fields)]);\n }\n function _parseEip4844(data) {\n let fields = (0, index_js_3.decodeRlp)((0, index_js_3.getBytes)(data).slice(1));\n let typeName = \"3\";\n let blobs = null;\n if (fields.length === 4 && Array.isArray(fields[0])) {\n typeName = \"3 (network format)\";\n const fBlobs = fields[1], fCommits = fields[2], fProofs = fields[3];\n (0, index_js_3.assertArgument)(Array.isArray(fBlobs), \"invalid network format: blobs not an array\", \"fields[1]\", fBlobs);\n (0, index_js_3.assertArgument)(Array.isArray(fCommits), \"invalid network format: commitments not an array\", \"fields[2]\", fCommits);\n (0, index_js_3.assertArgument)(Array.isArray(fProofs), \"invalid network format: proofs not an array\", \"fields[3]\", fProofs);\n (0, index_js_3.assertArgument)(fBlobs.length === fCommits.length, \"invalid network format: blobs/commitments length mismatch\", \"fields\", fields);\n (0, index_js_3.assertArgument)(fBlobs.length === fProofs.length, \"invalid network format: blobs/proofs length mismatch\", \"fields\", fields);\n blobs = [];\n for (let i3 = 0; i3 < fields[1].length; i3++) {\n blobs.push({\n data: fBlobs[i3],\n commitment: fCommits[i3],\n proof: fProofs[i3]\n });\n }\n fields = fields[0];\n }\n (0, index_js_3.assertArgument)(Array.isArray(fields) && (fields.length === 11 || fields.length === 14), `invalid field count for transaction type: ${typeName}`, \"data\", (0, index_js_3.hexlify)(data));\n const tx = {\n type: 3,\n chainId: handleUint(fields[0], \"chainId\"),\n nonce: handleNumber(fields[1], \"nonce\"),\n maxPriorityFeePerGas: handleUint(fields[2], \"maxPriorityFeePerGas\"),\n maxFeePerGas: handleUint(fields[3], \"maxFeePerGas\"),\n gasPrice: null,\n gasLimit: handleUint(fields[4], \"gasLimit\"),\n to: handleAddress(fields[5]),\n value: handleUint(fields[6], \"value\"),\n data: (0, index_js_3.hexlify)(fields[7]),\n accessList: handleAccessList(fields[8], \"accessList\"),\n maxFeePerBlobGas: handleUint(fields[9], \"maxFeePerBlobGas\"),\n blobVersionedHashes: fields[10]\n };\n if (blobs) {\n tx.blobs = blobs;\n }\n (0, index_js_3.assertArgument)(tx.to != null, `invalid address for transaction type: ${typeName}`, \"data\", data);\n (0, index_js_3.assertArgument)(Array.isArray(tx.blobVersionedHashes), \"invalid blobVersionedHashes: must be an array\", \"data\", data);\n for (let i3 = 0; i3 < tx.blobVersionedHashes.length; i3++) {\n (0, index_js_3.assertArgument)((0, index_js_3.isHexString)(tx.blobVersionedHashes[i3], 32), `invalid blobVersionedHash at index ${i3}: must be length 32`, \"data\", data);\n }\n if (fields.length === 11) {\n return tx;\n }\n _parseEipSignature(tx, fields.slice(11));\n return tx;\n }\n function _serializeEip4844(tx, sig, blobs) {\n const fields = [\n formatNumber(tx.chainId, \"chainId\"),\n formatNumber(tx.nonce, \"nonce\"),\n formatNumber(tx.maxPriorityFeePerGas || 0, \"maxPriorityFeePerGas\"),\n formatNumber(tx.maxFeePerGas || 0, \"maxFeePerGas\"),\n formatNumber(tx.gasLimit, \"gasLimit\"),\n tx.to || addresses_js_1.ZeroAddress,\n formatNumber(tx.value, \"value\"),\n tx.data,\n formatAccessList(tx.accessList || []),\n formatNumber(tx.maxFeePerBlobGas || 0, \"maxFeePerBlobGas\"),\n formatHashes(tx.blobVersionedHashes || [], \"blobVersionedHashes\")\n ];\n if (sig) {\n fields.push(formatNumber(sig.yParity, \"yParity\"));\n fields.push((0, index_js_3.toBeArray)(sig.r));\n fields.push((0, index_js_3.toBeArray)(sig.s));\n if (blobs) {\n return (0, index_js_3.concat)([\n \"0x03\",\n (0, index_js_3.encodeRlp)([\n fields,\n blobs.map((b4) => b4.data),\n blobs.map((b4) => b4.commitment),\n blobs.map((b4) => b4.proof)\n ])\n ]);\n }\n }\n return (0, index_js_3.concat)([\"0x03\", (0, index_js_3.encodeRlp)(fields)]);\n }\n function _parseEip7702(data) {\n const fields = (0, index_js_3.decodeRlp)((0, index_js_3.getBytes)(data).slice(1));\n (0, index_js_3.assertArgument)(Array.isArray(fields) && (fields.length === 10 || fields.length === 13), \"invalid field count for transaction type: 4\", \"data\", (0, index_js_3.hexlify)(data));\n const tx = {\n type: 4,\n chainId: handleUint(fields[0], \"chainId\"),\n nonce: handleNumber(fields[1], \"nonce\"),\n maxPriorityFeePerGas: handleUint(fields[2], \"maxPriorityFeePerGas\"),\n maxFeePerGas: handleUint(fields[3], \"maxFeePerGas\"),\n gasPrice: null,\n gasLimit: handleUint(fields[4], \"gasLimit\"),\n to: handleAddress(fields[5]),\n value: handleUint(fields[6], \"value\"),\n data: (0, index_js_3.hexlify)(fields[7]),\n accessList: handleAccessList(fields[8], \"accessList\"),\n authorizationList: handleAuthorizationList(fields[9], \"authorizationList\")\n };\n if (fields.length === 10) {\n return tx;\n }\n _parseEipSignature(tx, fields.slice(10));\n return tx;\n }\n function _serializeEip7702(tx, sig) {\n const fields = [\n formatNumber(tx.chainId, \"chainId\"),\n formatNumber(tx.nonce, \"nonce\"),\n formatNumber(tx.maxPriorityFeePerGas || 0, \"maxPriorityFeePerGas\"),\n formatNumber(tx.maxFeePerGas || 0, \"maxFeePerGas\"),\n formatNumber(tx.gasLimit, \"gasLimit\"),\n tx.to || \"0x\",\n formatNumber(tx.value, \"value\"),\n tx.data,\n formatAccessList(tx.accessList || []),\n formatAuthorizationList3(tx.authorizationList || [])\n ];\n if (sig) {\n fields.push(formatNumber(sig.yParity, \"yParity\"));\n fields.push((0, index_js_3.toBeArray)(sig.r));\n fields.push((0, index_js_3.toBeArray)(sig.s));\n }\n return (0, index_js_3.concat)([\"0x04\", (0, index_js_3.encodeRlp)(fields)]);\n }\n var Transaction = class _Transaction {\n #type;\n #to;\n #data;\n #nonce;\n #gasLimit;\n #gasPrice;\n #maxPriorityFeePerGas;\n #maxFeePerGas;\n #value;\n #chainId;\n #sig;\n #accessList;\n #maxFeePerBlobGas;\n #blobVersionedHashes;\n #kzg;\n #blobs;\n #auths;\n /**\n * The transaction type.\n *\n * If null, the type will be automatically inferred based on\n * explicit properties.\n */\n get type() {\n return this.#type;\n }\n set type(value) {\n switch (value) {\n case null:\n this.#type = null;\n break;\n case 0:\n case \"legacy\":\n this.#type = 0;\n break;\n case 1:\n case \"berlin\":\n case \"eip-2930\":\n this.#type = 1;\n break;\n case 2:\n case \"london\":\n case \"eip-1559\":\n this.#type = 2;\n break;\n case 3:\n case \"cancun\":\n case \"eip-4844\":\n this.#type = 3;\n break;\n case 4:\n case \"pectra\":\n case \"eip-7702\":\n this.#type = 4;\n break;\n default:\n (0, index_js_3.assertArgument)(false, \"unsupported transaction type\", \"type\", value);\n }\n }\n /**\n * The name of the transaction type.\n */\n get typeName() {\n switch (this.type) {\n case 0:\n return \"legacy\";\n case 1:\n return \"eip-2930\";\n case 2:\n return \"eip-1559\";\n case 3:\n return \"eip-4844\";\n case 4:\n return \"eip-7702\";\n }\n return null;\n }\n /**\n * The ``to`` address for the transaction or ``null`` if the\n * transaction is an ``init`` transaction.\n */\n get to() {\n const value = this.#to;\n if (value == null && this.type === 3) {\n return addresses_js_1.ZeroAddress;\n }\n return value;\n }\n set to(value) {\n this.#to = value == null ? null : (0, index_js_1.getAddress)(value);\n }\n /**\n * The transaction nonce.\n */\n get nonce() {\n return this.#nonce;\n }\n set nonce(value) {\n this.#nonce = (0, index_js_3.getNumber)(value, \"value\");\n }\n /**\n * The gas limit.\n */\n get gasLimit() {\n return this.#gasLimit;\n }\n set gasLimit(value) {\n this.#gasLimit = (0, index_js_3.getBigInt)(value);\n }\n /**\n * The gas price.\n *\n * On legacy networks this defines the fee that will be paid. On\n * EIP-1559 networks, this should be ``null``.\n */\n get gasPrice() {\n const value = this.#gasPrice;\n if (value == null && (this.type === 0 || this.type === 1)) {\n return BN_0;\n }\n return value;\n }\n set gasPrice(value) {\n this.#gasPrice = value == null ? null : (0, index_js_3.getBigInt)(value, \"gasPrice\");\n }\n /**\n * The maximum priority fee per unit of gas to pay. On legacy\n * networks this should be ``null``.\n */\n get maxPriorityFeePerGas() {\n const value = this.#maxPriorityFeePerGas;\n if (value == null) {\n if (this.type === 2 || this.type === 3) {\n return BN_0;\n }\n return null;\n }\n return value;\n }\n set maxPriorityFeePerGas(value) {\n this.#maxPriorityFeePerGas = value == null ? null : (0, index_js_3.getBigInt)(value, \"maxPriorityFeePerGas\");\n }\n /**\n * The maximum total fee per unit of gas to pay. On legacy\n * networks this should be ``null``.\n */\n get maxFeePerGas() {\n const value = this.#maxFeePerGas;\n if (value == null) {\n if (this.type === 2 || this.type === 3) {\n return BN_0;\n }\n return null;\n }\n return value;\n }\n set maxFeePerGas(value) {\n this.#maxFeePerGas = value == null ? null : (0, index_js_3.getBigInt)(value, \"maxFeePerGas\");\n }\n /**\n * The transaction data. For ``init`` transactions this is the\n * deployment code.\n */\n get data() {\n return this.#data;\n }\n set data(value) {\n this.#data = (0, index_js_3.hexlify)(value);\n }\n /**\n * The amount of ether (in wei) to send in this transactions.\n */\n get value() {\n return this.#value;\n }\n set value(value) {\n this.#value = (0, index_js_3.getBigInt)(value, \"value\");\n }\n /**\n * The chain ID this transaction is valid on.\n */\n get chainId() {\n return this.#chainId;\n }\n set chainId(value) {\n this.#chainId = (0, index_js_3.getBigInt)(value);\n }\n /**\n * If signed, the signature for this transaction.\n */\n get signature() {\n return this.#sig || null;\n }\n set signature(value) {\n this.#sig = value == null ? null : index_js_2.Signature.from(value);\n }\n /**\n * The access list.\n *\n * An access list permits discounted (but pre-paid) access to\n * bytecode and state variable access within contract execution.\n */\n get accessList() {\n const value = this.#accessList || null;\n if (value == null) {\n if (this.type === 1 || this.type === 2 || this.type === 3) {\n return [];\n }\n return null;\n }\n return value;\n }\n set accessList(value) {\n this.#accessList = value == null ? null : (0, accesslist_js_1.accessListify)(value);\n }\n get authorizationList() {\n const value = this.#auths || null;\n if (value == null) {\n if (this.type === 4) {\n return [];\n }\n }\n return value;\n }\n set authorizationList(auths) {\n this.#auths = auths == null ? null : auths.map((a3) => (0, authorization_js_1.authorizationify)(a3));\n }\n /**\n * The max fee per blob gas for Cancun transactions.\n */\n get maxFeePerBlobGas() {\n const value = this.#maxFeePerBlobGas;\n if (value == null && this.type === 3) {\n return BN_0;\n }\n return value;\n }\n set maxFeePerBlobGas(value) {\n this.#maxFeePerBlobGas = value == null ? null : (0, index_js_3.getBigInt)(value, \"maxFeePerBlobGas\");\n }\n /**\n * The BLOb versioned hashes for Cancun transactions.\n */\n get blobVersionedHashes() {\n let value = this.#blobVersionedHashes;\n if (value == null && this.type === 3) {\n return [];\n }\n return value;\n }\n set blobVersionedHashes(value) {\n if (value != null) {\n (0, index_js_3.assertArgument)(Array.isArray(value), \"blobVersionedHashes must be an Array\", \"value\", value);\n value = value.slice();\n for (let i3 = 0; i3 < value.length; i3++) {\n (0, index_js_3.assertArgument)((0, index_js_3.isHexString)(value[i3], 32), \"invalid blobVersionedHash\", `value[${i3}]`, value[i3]);\n }\n }\n this.#blobVersionedHashes = value;\n }\n /**\n * The BLObs for the Transaction, if any.\n *\n * If ``blobs`` is non-``null``, then the [[seriailized]]\n * will return the network formatted sidecar, otherwise it\n * will return the standard [[link-eip-2718]] payload. The\n * [[unsignedSerialized]] is unaffected regardless.\n *\n * When setting ``blobs``, either fully valid [[Blob]] objects\n * may be specified (i.e. correctly padded, with correct\n * committments and proofs) or a raw [[BytesLike]] may\n * be provided.\n *\n * If raw [[BytesLike]] are provided, the [[kzg]] property **must**\n * be already set. The blob will be correctly padded and the\n * [[KzgLibrary]] will be used to compute the committment and\n * proof for the blob.\n *\n * A BLOb is a sequence of field elements, each of which must\n * be within the BLS field modulo, so some additional processing\n * may be required to encode arbitrary data to ensure each 32 byte\n * field is within the valid range.\n *\n * Setting this automatically populates [[blobVersionedHashes]],\n * overwriting any existing values. Setting this to ``null``\n * does **not** remove the [[blobVersionedHashes]], leaving them\n * present.\n */\n get blobs() {\n if (this.#blobs == null) {\n return null;\n }\n return this.#blobs.map((b4) => Object.assign({}, b4));\n }\n set blobs(_blobs) {\n if (_blobs == null) {\n this.#blobs = null;\n return;\n }\n const blobs = [];\n const versionedHashes = [];\n for (let i3 = 0; i3 < _blobs.length; i3++) {\n const blob = _blobs[i3];\n if ((0, index_js_3.isBytesLike)(blob)) {\n (0, index_js_3.assert)(this.#kzg, \"adding a raw blob requires a KZG library\", \"UNSUPPORTED_OPERATION\", {\n operation: \"set blobs()\"\n });\n let data = (0, index_js_3.getBytes)(blob);\n (0, index_js_3.assertArgument)(data.length <= BLOB_SIZE, \"blob is too large\", `blobs[${i3}]`, blob);\n if (data.length !== BLOB_SIZE) {\n const padded = new Uint8Array(BLOB_SIZE);\n padded.set(data);\n data = padded;\n }\n const commit = this.#kzg.blobToKzgCommitment(data);\n const proof = (0, index_js_3.hexlify)(this.#kzg.computeBlobKzgProof(data, commit));\n blobs.push({\n data: (0, index_js_3.hexlify)(data),\n commitment: (0, index_js_3.hexlify)(commit),\n proof\n });\n versionedHashes.push(getVersionedHash(1, commit));\n } else {\n const commit = (0, index_js_3.hexlify)(blob.commitment);\n blobs.push({\n data: (0, index_js_3.hexlify)(blob.data),\n commitment: commit,\n proof: (0, index_js_3.hexlify)(blob.proof)\n });\n versionedHashes.push(getVersionedHash(1, commit));\n }\n }\n this.#blobs = blobs;\n this.#blobVersionedHashes = versionedHashes;\n }\n get kzg() {\n return this.#kzg;\n }\n set kzg(kzg) {\n if (kzg == null) {\n this.#kzg = null;\n } else {\n this.#kzg = getKzgLibrary(kzg);\n }\n }\n /**\n * Creates a new Transaction with default values.\n */\n constructor() {\n this.#type = null;\n this.#to = null;\n this.#nonce = 0;\n this.#gasLimit = BN_0;\n this.#gasPrice = null;\n this.#maxPriorityFeePerGas = null;\n this.#maxFeePerGas = null;\n this.#data = \"0x\";\n this.#value = BN_0;\n this.#chainId = BN_0;\n this.#sig = null;\n this.#accessList = null;\n this.#maxFeePerBlobGas = null;\n this.#blobVersionedHashes = null;\n this.#kzg = null;\n this.#blobs = null;\n this.#auths = null;\n }\n /**\n * The transaction hash, if signed. Otherwise, ``null``.\n */\n get hash() {\n if (this.signature == null) {\n return null;\n }\n return (0, index_js_2.keccak256)(this.#getSerialized(true, false));\n }\n /**\n * The pre-image hash of this transaction.\n *\n * This is the digest that a [[Signer]] must sign to authorize\n * this transaction.\n */\n get unsignedHash() {\n return (0, index_js_2.keccak256)(this.unsignedSerialized);\n }\n /**\n * The sending address, if signed. Otherwise, ``null``.\n */\n get from() {\n if (this.signature == null) {\n return null;\n }\n return (0, address_js_1.recoverAddress)(this.unsignedHash, this.signature);\n }\n /**\n * The public key of the sender, if signed. Otherwise, ``null``.\n */\n get fromPublicKey() {\n if (this.signature == null) {\n return null;\n }\n return index_js_2.SigningKey.recoverPublicKey(this.unsignedHash, this.signature);\n }\n /**\n * Returns true if signed.\n *\n * This provides a Type Guard that properties requiring a signed\n * transaction are non-null.\n */\n isSigned() {\n return this.signature != null;\n }\n #getSerialized(signed, sidecar) {\n (0, index_js_3.assert)(!signed || this.signature != null, \"cannot serialize unsigned transaction; maybe you meant .unsignedSerialized\", \"UNSUPPORTED_OPERATION\", { operation: \".serialized\" });\n const sig = signed ? this.signature : null;\n switch (this.inferType()) {\n case 0:\n return _serializeLegacy(this, sig);\n case 1:\n return _serializeEip2930(this, sig);\n case 2:\n return _serializeEip1559(this, sig);\n case 3:\n return _serializeEip4844(this, sig, sidecar ? this.blobs : null);\n case 4:\n return _serializeEip7702(this, sig);\n }\n (0, index_js_3.assert)(false, \"unsupported transaction type\", \"UNSUPPORTED_OPERATION\", { operation: \".serialized\" });\n }\n /**\n * The serialized transaction.\n *\n * This throws if the transaction is unsigned. For the pre-image,\n * use [[unsignedSerialized]].\n */\n get serialized() {\n return this.#getSerialized(true, true);\n }\n /**\n * The transaction pre-image.\n *\n * The hash of this is the digest which needs to be signed to\n * authorize this transaction.\n */\n get unsignedSerialized() {\n return this.#getSerialized(false, false);\n }\n /**\n * Return the most \"likely\" type; currently the highest\n * supported transaction type.\n */\n inferType() {\n const types = this.inferTypes();\n if (types.indexOf(2) >= 0) {\n return 2;\n }\n return types.pop();\n }\n /**\n * Validates the explicit properties and returns a list of compatible\n * transaction types.\n */\n inferTypes() {\n const hasGasPrice = this.gasPrice != null;\n const hasFee = this.maxFeePerGas != null || this.maxPriorityFeePerGas != null;\n const hasAccessList = this.accessList != null;\n const hasBlob = this.#maxFeePerBlobGas != null || this.#blobVersionedHashes;\n if (this.maxFeePerGas != null && this.maxPriorityFeePerGas != null) {\n (0, index_js_3.assert)(this.maxFeePerGas >= this.maxPriorityFeePerGas, \"priorityFee cannot be more than maxFee\", \"BAD_DATA\", { value: this });\n }\n (0, index_js_3.assert)(!hasFee || this.type !== 0 && this.type !== 1, \"transaction type cannot have maxFeePerGas or maxPriorityFeePerGas\", \"BAD_DATA\", { value: this });\n (0, index_js_3.assert)(this.type !== 0 || !hasAccessList, \"legacy transaction cannot have accessList\", \"BAD_DATA\", { value: this });\n const types = [];\n if (this.type != null) {\n types.push(this.type);\n } else {\n if (this.authorizationList && this.authorizationList.length) {\n types.push(4);\n } else if (hasFee) {\n types.push(2);\n } else if (hasGasPrice) {\n types.push(1);\n if (!hasAccessList) {\n types.push(0);\n }\n } else if (hasAccessList) {\n types.push(1);\n types.push(2);\n } else if (hasBlob && this.to) {\n types.push(3);\n } else {\n types.push(0);\n types.push(1);\n types.push(2);\n types.push(3);\n }\n }\n types.sort();\n return types;\n }\n /**\n * Returns true if this transaction is a legacy transaction (i.e.\n * ``type === 0``).\n *\n * This provides a Type Guard that the related properties are\n * non-null.\n */\n isLegacy() {\n return this.type === 0;\n }\n /**\n * Returns true if this transaction is berlin hardform transaction (i.e.\n * ``type === 1``).\n *\n * This provides a Type Guard that the related properties are\n * non-null.\n */\n isBerlin() {\n return this.type === 1;\n }\n /**\n * Returns true if this transaction is london hardform transaction (i.e.\n * ``type === 2``).\n *\n * This provides a Type Guard that the related properties are\n * non-null.\n */\n isLondon() {\n return this.type === 2;\n }\n /**\n * Returns true if this transaction is an [[link-eip-4844]] BLOB\n * transaction.\n *\n * This provides a Type Guard that the related properties are\n * non-null.\n */\n isCancun() {\n return this.type === 3;\n }\n /**\n * Create a copy of this transaciton.\n */\n clone() {\n return _Transaction.from(this);\n }\n /**\n * Return a JSON-friendly object.\n */\n toJSON() {\n const s4 = (v2) => {\n if (v2 == null) {\n return null;\n }\n return v2.toString();\n };\n return {\n type: this.type,\n to: this.to,\n // from: this.from,\n data: this.data,\n nonce: this.nonce,\n gasLimit: s4(this.gasLimit),\n gasPrice: s4(this.gasPrice),\n maxPriorityFeePerGas: s4(this.maxPriorityFeePerGas),\n maxFeePerGas: s4(this.maxFeePerGas),\n value: s4(this.value),\n chainId: s4(this.chainId),\n sig: this.signature ? this.signature.toJSON() : null,\n accessList: this.accessList\n };\n }\n /**\n * Create a **Transaction** from a serialized transaction or a\n * Transaction-like object.\n */\n static from(tx) {\n if (tx == null) {\n return new _Transaction();\n }\n if (typeof tx === \"string\") {\n const payload = (0, index_js_3.getBytes)(tx);\n if (payload[0] >= 127) {\n return _Transaction.from(_parseLegacy(payload));\n }\n switch (payload[0]) {\n case 1:\n return _Transaction.from(_parseEip2930(payload));\n case 2:\n return _Transaction.from(_parseEip1559(payload));\n case 3:\n return _Transaction.from(_parseEip4844(payload));\n case 4:\n return _Transaction.from(_parseEip7702(payload));\n }\n (0, index_js_3.assert)(false, \"unsupported transaction type\", \"UNSUPPORTED_OPERATION\", { operation: \"from\" });\n }\n const result = new _Transaction();\n if (tx.type != null) {\n result.type = tx.type;\n }\n if (tx.to != null) {\n result.to = tx.to;\n }\n if (tx.nonce != null) {\n result.nonce = tx.nonce;\n }\n if (tx.gasLimit != null) {\n result.gasLimit = tx.gasLimit;\n }\n if (tx.gasPrice != null) {\n result.gasPrice = tx.gasPrice;\n }\n if (tx.maxPriorityFeePerGas != null) {\n result.maxPriorityFeePerGas = tx.maxPriorityFeePerGas;\n }\n if (tx.maxFeePerGas != null) {\n result.maxFeePerGas = tx.maxFeePerGas;\n }\n if (tx.maxFeePerBlobGas != null) {\n result.maxFeePerBlobGas = tx.maxFeePerBlobGas;\n }\n if (tx.data != null) {\n result.data = tx.data;\n }\n if (tx.value != null) {\n result.value = tx.value;\n }\n if (tx.chainId != null) {\n result.chainId = tx.chainId;\n }\n if (tx.signature != null) {\n result.signature = index_js_2.Signature.from(tx.signature);\n }\n if (tx.accessList != null) {\n result.accessList = tx.accessList;\n }\n if (tx.authorizationList != null) {\n result.authorizationList = tx.authorizationList;\n }\n if (tx.blobVersionedHashes != null) {\n result.blobVersionedHashes = tx.blobVersionedHashes;\n }\n if (tx.kzg != null) {\n result.kzg = tx.kzg;\n }\n if (tx.blobs != null) {\n result.blobs = tx.blobs;\n }\n if (tx.hash != null) {\n (0, index_js_3.assertArgument)(result.isSigned(), \"unsigned transaction cannot define '.hash'\", \"tx\", tx);\n (0, index_js_3.assertArgument)(result.hash === tx.hash, \"hash mismatch\", \"tx\", tx);\n }\n if (tx.from != null) {\n (0, index_js_3.assertArgument)(result.isSigned(), \"unsigned transaction cannot define '.from'\", \"tx\", tx);\n (0, index_js_3.assertArgument)(result.from.toLowerCase() === (tx.from || \"\").toLowerCase(), \"from mismatch\", \"tx\", tx);\n }\n return result;\n }\n };\n exports3.Transaction = Transaction;\n }\n });\n\n // ../../../node_modules/.pnpm/ethers@6.15.0_bufferutil@4.0.9_utf-8-validate@5.0.10/node_modules/ethers/lib.commonjs/transaction/index.js\n var require_transaction2 = __commonJS({\n \"../../../node_modules/.pnpm/ethers@6.15.0_bufferutil@4.0.9_utf-8-validate@5.0.10/node_modules/ethers/lib.commonjs/transaction/index.js\"(exports3) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n Object.defineProperty(exports3, \"__esModule\", { value: true });\n exports3.Transaction = exports3.recoverAddress = exports3.computeAddress = exports3.authorizationify = exports3.accessListify = void 0;\n var accesslist_js_1 = require_accesslist();\n Object.defineProperty(exports3, \"accessListify\", { enumerable: true, get: function() {\n return accesslist_js_1.accessListify;\n } });\n var authorization_js_1 = require_authorization();\n Object.defineProperty(exports3, \"authorizationify\", { enumerable: true, get: function() {\n return authorization_js_1.authorizationify;\n } });\n var address_js_1 = require_address5();\n Object.defineProperty(exports3, \"computeAddress\", { enumerable: true, get: function() {\n return address_js_1.computeAddress;\n } });\n Object.defineProperty(exports3, \"recoverAddress\", { enumerable: true, get: function() {\n return address_js_1.recoverAddress;\n } });\n var transaction_js_1 = require_transaction();\n Object.defineProperty(exports3, \"Transaction\", { enumerable: true, get: function() {\n return transaction_js_1.Transaction;\n } });\n }\n });\n\n // ../../../node_modules/.pnpm/ethers@6.15.0_bufferutil@4.0.9_utf-8-validate@5.0.10/node_modules/ethers/lib.commonjs/hash/authorization.js\n var require_authorization2 = __commonJS({\n \"../../../node_modules/.pnpm/ethers@6.15.0_bufferutil@4.0.9_utf-8-validate@5.0.10/node_modules/ethers/lib.commonjs/hash/authorization.js\"(exports3) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n Object.defineProperty(exports3, \"__esModule\", { value: true });\n exports3.verifyAuthorization = exports3.hashAuthorization = void 0;\n var index_js_1 = require_address3();\n var index_js_2 = require_crypto2();\n var index_js_3 = require_transaction2();\n var index_js_4 = require_utils8();\n function hashAuthorization2(auth) {\n (0, index_js_4.assertArgument)(typeof auth.address === \"string\", \"invalid address for hashAuthorization\", \"auth.address\", auth);\n return (0, index_js_2.keccak256)((0, index_js_4.concat)([\n \"0x05\",\n (0, index_js_4.encodeRlp)([\n auth.chainId != null ? (0, index_js_4.toBeArray)(auth.chainId) : \"0x\",\n (0, index_js_1.getAddress)(auth.address),\n auth.nonce != null ? (0, index_js_4.toBeArray)(auth.nonce) : \"0x\"\n ])\n ]));\n }\n exports3.hashAuthorization = hashAuthorization2;\n function verifyAuthorization2(auth, sig) {\n return (0, index_js_3.recoverAddress)(hashAuthorization2(auth), sig);\n }\n exports3.verifyAuthorization = verifyAuthorization2;\n }\n });\n\n // ../../../node_modules/.pnpm/ethers@6.15.0_bufferutil@4.0.9_utf-8-validate@5.0.10/node_modules/ethers/lib.commonjs/hash/id.js\n var require_id2 = __commonJS({\n \"../../../node_modules/.pnpm/ethers@6.15.0_bufferutil@4.0.9_utf-8-validate@5.0.10/node_modules/ethers/lib.commonjs/hash/id.js\"(exports3) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n Object.defineProperty(exports3, \"__esModule\", { value: true });\n exports3.id = void 0;\n var index_js_1 = require_crypto2();\n var index_js_2 = require_utils8();\n function id(value) {\n return (0, index_js_1.keccak256)((0, index_js_2.toUtf8Bytes)(value));\n }\n exports3.id = id;\n }\n });\n\n // ../../../node_modules/.pnpm/@adraffy+ens-normalize@1.10.1/node_modules/@adraffy/ens-normalize/dist/index.cjs\n var require_dist = __commonJS({\n \"../../../node_modules/.pnpm/@adraffy+ens-normalize@1.10.1/node_modules/@adraffy/ens-normalize/dist/index.cjs\"(exports3) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n var COMPRESSED$1 = \"AEEUdwmgDS8BxQKKAP4BOgDjATAAngDUAIMAoABoAOAAagCOAEQAhABMAHIAOwA9ACsANgAmAGIAHgAuACgAJwAXAC0AGgAjAB8ALwAUACkAEgAeAAkAGwARABkAFgA5ACgALQArADcAFQApABAAHgAiABAAGgAeABMAGAUhBe8BFxREN8sF2wC5AK5HAW8ArQkDzQCuhzc3NzcBP68NEfMABQdHBuw5BV8FYAA9MzkI9r4ZBg7QyQAWA9CeOwLNCjcCjqkChuA/lm+RAsXTAoP6ASfnEQDytQFJAjWVCkeXAOsA6godAB/cwdAUE0WlBCN/AQUCQRjFD/MRBjHxDQSJbw0jBzUAswBxme+tnIcAYwabAysG8QAjAEMMmxcDqgPKQyDXCMMxA7kUQwD3NXOrAKmFIAAfBC0D3x4BJQDBGdUFAhEgVD8JnwmQJiNWYUzrg0oAGwAUAB0AFnNcACkAFgBP9h3gPfsDOWDKneY2ChglX1UDYD30ABsAFAAdABZzIGRAnwDD8wAjAEEMzRbDqgMB2sAFYwXqAtCnAsS4AwpUJKRtFHsadUz9AMMVbwLpABM1NJEX0ZkCgYMBEyMAxRVvAukAEzUBUFAtmUwSAy4DBTER33EftQHfSwB5MxJ/AjkWKQLzL8E/cwBB6QH9LQDPDtO9ASNriQC5DQANAwCK21EFI91zHwCoL9kBqQcHBwcHKzUDowBvAQohPvU3fAQgHwCyAc8CKQMA5zMSezr7ULgFmDp/LzVQBgEGAi8FYQVgt8AFcTtlQhpCWEmfe5tmZ6IAExsDzQ8t+X8rBKtTAltbAn0jsy8Bl6utPWMDTR8Ei2kRANkDBrNHNysDBzECQWUAcwFpJ3kAiyUhAJ0BUb8AL3EfAbfNAz81KUsFWwF3YQZtAm0A+VEfAzEJDQBRSQCzAQBlAHsAM70GD/v3IZWHBwARKQAxALsjTwHZAeMPEzmXgIHwABIAGQA8AEUAQDt3gdvIEGcQZAkGTRFMdEIVEwK0D64L7REdDNkq09PgADSxB/MDWwfzA1sDWwfzB/MDWwfzA1sDWwNbA1scEvAi28gQZw9QBHUFlgWTBN4IiyZREYkHMAjaVBV0JhxPA00BBCMtSSQ7mzMTJUpMFE0LCAQ2SmyvfUADTzGzVP2QqgPTMlc5dAkGHnkSqAAyD3skNb1OhnpPcagKU0+2tYdJak5vAsY6sEAACikJm2/Dd1YGRRAfJ6kQ+ww3AbkBPw3xS9wE9QY/BM0fgRkdD9GVoAipLeEM8SbnLqWAXiP5KocF8Uv4POELUVFsD10LaQnnOmeBUgMlAREijwrhDT0IcRD3Cs1vDekRSQc9A9lJngCpBwULFR05FbkmFGKwCw05ewb/GvoLkyazEy17AAXXGiUGUQEtGwMA0y7rhbRaNVwgT2MGBwspI8sUrFAkDSlAu3hMGh8HGSWtApVDdEqLUToelyH6PEENai4XUYAH+TwJGVMLhTyiRq9FEhHWPpE9TCJNTDAEOYMsMyePCdMPiQy9fHYBXQklCbUMdRM1ERs3yQg9Bx0xlygnGQglRplgngT7owP3E9UDDwVDCUUHFwO5HDETMhUtBRGBKNsC9zbZLrcCk1aEARsFzw8pH+MQVEfkDu0InwJpA4cl7wAxFSUAGyKfCEdnAGOP3FMJLs8Iy2pwI3gDaxTrZRF3B5UOWwerHDcVwxzlcMxeD4YMKKezCV8BeQmdAWME5wgNNV+MpCBFZ1eLXBifIGVBQ14AAjUMaRWjRMGHfAKPD28SHwE5AXcHPQ0FAnsR8RFvEJkI74YINbkz/DopBFMhhyAVCisDU2zSCysm/Qz8bQGnEmYDEDRBd/Jnr2C6KBgBBx0yyUFkIfULlk/RDKAaxRhGVDIZ6AfDA/ca9yfuQVsGAwOnBxc6UTPyBMELbQiPCUMATQ6nGwfbGG4KdYzUATWPAbudA1uVhwJzkwY7Bw8Aaw+LBX3pACECqwinAAkA0wNbAD0CsQehAB0AiUUBQQMrMwEl6QKTA5cINc8BmTMB9y0EH8cMGQD7O25OAsO1AoBuZqYF4VwCkgJNOQFRKQQJUktVA7N15QDfAE8GF+NLARmvTs8e50cB43MvAMsA/wAJOQcJRQHRAfdxALsBYws1Caa3uQFR7S0AhwAZbwHbAo0A4QA5AIP1AVcAUQVd/QXXAlNNARU1HC9bZQG/AyMBNwERAH0Gz5GpzQsjBHEH1wIQHxXlAu8yB7kFAyLjE9FCyQK94lkAMhoKPAqrCqpgX2Q3CjV2PVQAEh+sPss/UgVVO1c7XDtXO1w7VztcO1c7XDtXO1wDm8Pmw+YKcF9JYe8Mqg3YRMw6TRPfYFVgNhPMLbsUxRXSJVoZQRrAJwkl6FUNDwgt12Y0CDA0eRfAAEMpbINFY4oeNApPHOtTlVT8LR8AtUumM7MNsBsZREQFS3XxYi4WEgomAmSFAmJGX1GzAV83JAKh+wJonAJmDQKfiDgfDwJmPwJmKgRyBIMDfxcDfpY5Cjl7GzmGOicnAmwhAjI6OA4CbcsCbbLzjgM3a0kvAWsA4gDlAE4JB5wMkQECD8YAEbkCdzMCdqZDAnlPRwJ4viFg30WyRvcCfEMCeswCfQ0CfPRIBEiBZygALxlJXEpfGRtK0ALRBQLQ0EsrA4hTA4fqRMmRNgLypV0HAwOyS9JMMSkH001QTbMCi0MCitzFHwshR2sJuwKOOwKOYESbhQKO3QKOYHxRuFM5AQ5S2FSJApP/ApMQAO0AIFUiVbNV1AosHymZijLleGpFPz0Cl6MC77ZYJawAXSkClpMCloCgAK1ZsFoNhVEAPwKWuQKWUlxIXNUCmc8CmWhczl0LHQKcnznGOqECnBoCn58CnryOACETNS4TAp31Ap6WALlBYThh8wKe1wKgcgGtAp6jIwKeUqljzGQrKS8CJ7MCJoICoP8CoFDbAqYzAqXSAqgDAIECp/ZogGi1AAdNaiBq1QKs5wKssgKtawKtBgJXIQJV4AKx5dsDH1JsmwKywRECsuwbbORtZ21MYwMl0QK2YD9DbpQDKUkCuGICuUsZArkue3A6cOUCvR0DLbYDMhUCvoxyBgMzdQK+HnMmc1MCw88CwwhzhnRPOUl05AM8qwEDPJ4DPcMCxYACxksCxhSNAshtVQLISALJUwLJMgJkoQLd1nh9ZXiyeSlL1AMYp2cGAmH4GfeVKHsPXpZevxUCz28Cz3AzT1fW9xejAMqxAs93AS3uA04Wfk8JAtwrAtuOAtJTA1JgA1NjAQUDVZCAjUMEzxrxZEl5A4LSg5EC2ssC2eKEFIRNp0ADhqkAMwNkEoZ1Xf0AWQLfaQLevHd7AuIz7RgB8zQrAfSfAfLWiwLr9wLpdH0DAur9AuroAP1LAb0C7o0C66CWrpcHAu5DA4XkmH1w5HGlAvMHAG0DjhqZlwL3FwORcgOSiwL3nAL53QL4apogmq+/O5siA52HAv7+AR8APZ8gAZ+3AwWRA6ZuA6bdANXJAwZuoYyiCQ0DDE0BEwEjB3EGZb1rCQC/BG/DFY8etxEAG3k9ACcDNxJRA42DAWcrJQCM8wAlAOanC6OVCLsGI6fJBgCvBRnDBvElRUYFFoAFcD9GSDNCKUK8X3kZX8QAls0FOgCQVCGbwTsuYDoZutcONxjOGJHJ/gVfBWAFXwVgBWsFYAVfBWAFXwVgBV8FYAVfBWBOHQjfjW8KCgoKbF7xMwTRA7kGN8PDAMMEr8MA70gxFroFTj5xPnhCR0K+X30/X/AAWBkzswCNBsxzzASm70aCRS4rDDMeLz49fnXfcsH5GcoscQFz13Y4HwVnBXLJycnACNdRYwgICAqEXoWTxgA7P4kACxbZBu21Kw0AjMsTAwkVAOVtJUUsJ1JCuULESUArXy9gPi9AKwnJRQYKTD9LPoA+iT54PnkCkULEUUpDX9NWV3JVEjQAc1w3A3IBE3YnX+g7QiMJb6MKaiszRCUuQrNCxDPMCcwEX9EWJzYREBEEBwIHKn6l33JCNVIfybPJtAltydPUCmhBZw/tEKsZAJOVJU1CLRuxbUHOQAo7P0s+eEJHHA8SJVRPdGM0NVrpvBoKhfUlM0JHHGUQUhEWO1xLSj8MO0ucNAqJIzVCRxv9EFsqKyA4OQgNj2nwZgp5ZNFgE2A1K3YHS2AhQQojJmC7DgpzGG1WYFUZCQYHZO9gHWCdYIVgu2BTYJlwFh8GvRbcXbG8YgtDHrMBwzPVyQonHQgkCyYBgQJ0Ajc4nVqIAwGSCsBPIgDsK3SWEtIVBa5N8gGjAo+kVwVIZwD/AEUSCDweX4ITrRQsJ8K3TwBXFDwEAB0TvzVcAtoTS20RIwDgVgZ9BBImYgA5AL4Coi8LFnezOkCnIQFjAY4KBAPh9RcGsgZSBsEAJctdsWIRu2kTkQstRw7DAcMBKgpPBGIGMDAwKCYnKTQaLg4AKRSVAFwCdl+YUZ0JdicFD3lPAdt1F9ZZKCGxuE3yBxkFVGcA/wBFEgiCBwAOLHQSjxOtQDg1z7deFRMAZ8QTAGtKb1ApIiPHADkAvgKiLy1DFtYCmBiDAlDDWNB0eo7fpaMO/aEVRRv0ATEQZBIODyMEAc8JQhCbDRgzFD4TAEMAu9YBCgCsAOkAm5I3ABwAYxvONnR+MhXJAxgKQyxL2+kkJhMbhQKDBMkSsvF0AD9BNQ6uQC7WqSQHwxEAEEIu1hkhAH2z4iQPwyJPHNWpdyYBRSpnJALzoBAEVPPsH20MxA0CCEQKRgAFyAtFAlMNwwjEDUQJRArELtapMg7DDZgJIw+TGukEIwvDFkMAqAtDEMMMBhioe+QAO3MMRAACrgnEBSPY9Q0FDnbSBoMAB8MSYxkSxAEJAPIJAAB8FWMOFtMc/HcXwxhDAC7DAvOowwAewwJdKDKHAAHDAALrFUQVwwAbwyvzpWMWv8wA/ABpAy++bcYDUKPD0KhDCwKmJ1MAAmMA5+UZwxAagwipBRL/eADfw6fDGOMCGsOjk3l6BwOpo4sAEsMOGxMAA5sAbcMOAAvDp0MJGkMDwgipnNIPAwfIqUMGAOGDAAPzABXDAAcDAAnDAGmTABrDAA7DChjDjnEWAwABYwAOcwAuUyYABsMAF8MIKQANUgC6wy4AA8MADqMq8wCyYgAcIwAB8wqpAAXOCx0V4wAHowBCwwEKAGnDAAuDAB3DAAjDCakABdIAbqcZ3QCZCCkABdIAAAFDAAfjAB2jCCkABqIACYMAGzMAbSMA5sOIAAhjAAhDABTDBAkpAAbSAOOTAAlDC6kOzPtnAAdDAG6kQFAATwAKwwwAA0MACbUDPwAHIwAZgwACE6cDAAojAApDAAoDp/MGwwAJIwADEwAQQwgAFEMAEXMAD5MADfMADcMAGRMOFiMAFUMAbqMWuwHDAMIAE0MLAGkzEgDhUwACQwAEWgAXgwUjAAbYABjDBSYBgzBaAEFNALcQBxUMegAwMngBrA0IZgJ0KxQHBREPd1N0ZzKRJwaIHAZqNT4DqQq8BwngAB4DAwt2AX56T1ocKQNXAh1GATQGC3tOxYNagkgAMQA5CQADAQEAWxLjAIOYNAEzAH7tFRk6TglSAF8NAAlYAQ+S1ACAQwQorQBiAN4dAJ1wPyeTANVzuQDX3AIeEMp9eyMgXiUAEdkBkJizKltbVVAaRMqRAAEAhyQ/SDEz6BmfVwB6ATEsOClKIRcDOF0E/832AFNt5AByAnkCRxGCOs94NjXdAwINGBonDBwPALW2AwICAgAAAAAAAAYDBQMDARrUAwAtAAAAAgEGBgYGBgYFBQUFBQUEBQYHCAkEBQUFBQQAAAICAAAAIgCNAJAAlT0A6gC7ANwApEQAwgCyAK0AqADuAKYA2gCjAOcBCAEDAMcAgQBiANIA1AEDAN4A8gCQAKkBMQDqAN8A3AsBCQ8yO9ra2tq8xuLT1tRJOB0BUgFcNU0BWgFpAWgBWwFMUUlLbhMBUxsNEAs6PhMOACcUKy0vMj5AQENDQ0RFFEYGJFdXV1dZWVhZL1pbXVxcI2NnZ2ZoZypsbnZ1eHh4eHh4enp6enp6enp6enp8fH18e2IARPIASQCaAHgAMgBm+ACOAFcAVwA3AnbvAIsABfj4AGQAk/IAnwBPAGIAZP//sACFAIUAaQBWALEAJAC2AIMCQAJDAPwA5wD+AP4A6AD/AOkA6QDoAOYALwJ7AVEBQAE+AVQBPgE+AT4BOQE4ATgBOAEcAVgXADEQCAEAUx8SHgsdHhYAjgCWAKYAUQBqIAIxAHYAbwCXAxUDJzIDIUlGTzEAkQJPAMcCVwKkAMAClgKWApYClgKWApYCiwKWApYClgKWApYClgKVApUCmAKgApcClgKWApQClAKUApQCkgKVAnUB1AKXAp8ClgKWApUeAIETBQD+DQOfAmECOh8BVBg9AuIZEjMbAU4/G1WZAXusRAFpYQEFA0FPAQYAmTEeIJdyADFoAHEANgCRA5zMk/C2jGINwjMWygIZCaXdfDILBCs5dAE7YnQBugDlhoiHhoiGiYqKhouOjIaNkI6Ij4qQipGGkoaThpSSlYaWhpeKmIaZhpqGm4aci52QnoqfhuIC4XTpAt90AIp0LHSoAIsAdHQEQwRABEIERQRDBEkERgRBBEcESQRIBEQERgRJAJ5udACrA490ALxuAQ10ANFZdHQA13QCFHQA/mJ0AP4BIQD+APwA/AD9APwDhGZ03ASMK23HAP4A/AD8AP0A/CR0dACRYnQA/gCRASEA/gCRAvQA/gCRA4RmdNwEjCttxyR0AP9idAEhAP4A/gD8APwA/QD8AP8A/AD8AP0A/AOEZnTcBIwrbcckdHQAkWJ0ASEA/gCRAP4AkQL0AP4AkQOEZnTcBIwrbcckdAJLAT50AlIBQXQCU8l0dAJfdHQDpgL0A6YDpgOnA6cDpwOnA4RmdNwEjCttxyR0dACRYnQBIQOmAJEDpgCRAvQDpgCRA4RmdNwEjCttxyR0BDh0AJEEOQCRDpU5dSgCADR03gV2CwArdAEFAM5iCnR0AF1iAAYcOgp0dACRCnQAXAEIwWZ0CnRmdHQAkWZ0CnRmdEXgAFF03gp0dEY0tlT2u3SOAQTwscwhjZZKrhYcBSfFp9XNbKiVDOD2b+cpe4/Z17mQnbtzzhaeQtE2GGj0IDNTjRUSyTxxw/RPHW/+vS7d1NfRt9z9QPZg4X7QFfhCnkvgNPIItOsC2eV6hPannZNHlZ9xrwZXIMOlu3jSoQSq78WEjwLjw1ELSlF1aBvfzwk5ZX7AUvQzjPQKbDuQ+sm4wNOp4A6AdVuRS0t1y/DZpg4R6m7FNjM9HgvW7Bi88zaMjOo6lM8wtBBdj8LP4ylv3zCXPhebMKJc066o9sF71oFW/8JXu86HJbwDID5lzw5GWLR/LhT0Qqnp2JQxNZNfcbLIzPy+YypqRm/lBmGmex+82+PisxUumSeJkALIT6rJezxMH+CTJmQtt5uwTVbL3ptmjDUQzlSIvWi8Tl7ng1NpuRn1Ng4n14Qc+3Iil7OwkvNWogLSPkn3pihIFytyIGmMhOe3n1tWsuMy9BdKyqF4Z3v2SgggTL9KVvMXPnCbRe+oOuFFP3HejBG/w9gvmfNYvg6JuWia2lcSSN1uIjBktzoIazOHPJZ7kKHPz8mRWVdW3lA8WGF9dQF6Bm673boov3BUWDU2JNcahR23GtfHKLOz/viZ+rYnZFaIznXO67CYEJ1fXuTRpZhYZkKe54xeoagkNGLs+NTZHE0rX45/XvQ2RGADX6vcAvdxIUBV27wxGm2zjZo4X3ILgAlrOFheuZ6wtsvaIj4yLY7qqawlliaIcrz2G+c3vscAnCkCuMzMmZvMfu9lLwTvfX+3cVSyPdN9ZwgDZhfjRgNJcLiJ67b9xx8JHswprbiE3v9UphotAPIgnXVIN5KmMc0piXhc6cChPnN+MRhG9adtdttQTTwSIpl8I4/j//d3sz1326qTBTpPRM/Hgh3kzqEXs8ZAk4ErQhNO8hzrQ0DLkWMA/N+91tn2MdOJnWC2FCZehkQrwzwbKOjhvZsbM95QoeL9skYyMf4srVPVJSgg7pOLUtr/n9eT99oe9nLtFRpjA9okV2Kj8h9k5HaC0oivRD8VyXkJ81tcd4fHNXPCfloIQasxsuO18/46dR2jgul/UIet2G0kRvnyONMKhHs6J26FEoqSqd+rfYjeEGwHWVDpX1fh1jBBcKGMqRepju9Y00mDVHC+Xdij/j44rKfvfjGinNs1jO/0F3jB83XCDINN/HB84axlP+3E/klktRo+vl3U/aiyMJbIodE1XSsDn6UAzIoMtUObY2+k/4gY/l+AkZJ5Sj2vQrkyLm3FoxjhDX+31UXBFf9XrAH31fFqoBmDEZvhvvpnZ87N+oZEu7U9O/nnk+QWj3x8uyoRbEnf+O5UMr9i0nHP38IF5AvzrBW8YWBUR0mIAzIvndQq9N3v/Jto3aPjPXUPl8ASdPPyAp7jENf8bk7VMM9ol9XGmlBmeDMuGqt+WzuL6CXAxXjIhCPM5vACchgMJ/8XBGLO/D1isVvGhwwHHr1DLaI5mn2Jr/b1pUD90uciDaS8cXNDzCWvNmT/PhQe5e8nTnnnkt8Ds/SIjibcum/fqDhKopxAY8AkSrPn+IGDEKOO+U3XOP6djFs2H5N9+orhOahiQk5KnEUWa+CzkVzhp8bMHRbg81qhjjXuIKbHjSLSIBKWqockGtKinY+z4/RdBUF6pcc3JmnlxVcNgrI4SEzKUZSwcD2QCyxzKve+gAmg6ZuSRkpPFa6mfThu7LJNu3H5K42uCpNvPAsoedolKV/LHe/eJ+BbaG5MG0NaSGVPRUmNFMFFSSpXEcXwbVh7UETOZZtoVNRGOIbbkig3McEtR68cG0RZAoJevWYo7Dg/lZ1CQzblWeUvVHmr8fY4Nqd9JJiH/zEX24mJviH60fAyFr0A3c4bC1j3yZU60VgJxXn8JgJXLUIsiBnmKmMYz+7yBQFBvqb2eYnuW59joZBf56/wXvWIR4R8wTmV80i1mZy+S4+BUES+hzjk0uXpC///z/IlqHZ1monzlXp8aCfhGKMti73FI1KbL1q6IKO4fuBuZ59gagjn5xU79muMpHXg6S+e+gDM/U9BKLHbl9l6o8czQKl4RUkJJiqftQG2i3BMg/TQlUYFkJDYBOOvAugYuzYSDnZbDDd/aSd9x0Oe6F+bJcHfl9+gp6L5/TgA+BdFFovbfCrQ40s5vMPw8866pNX8zyFGeFWdxIpPVp9Rg1UPOVFbFZrvaFq/YAzHQgqMWpahMYfqHpmwXfHL1/kpYmGuHFwT55mQu0dylfNuq2Oq0hTMCPwqfxnuBIPLXfci4Y1ANy+1CUipQxld/izVh16WyG2Q0CQQ9NqtAnx1HCHwDj7sYxOSB0wopZSnOzxQOcExmxrVTF2BkOthVpGfuhaGECfCJpJKpjnihY+xOT2QJxN61+9K6QSqtv2Shr82I3jgJrqBg0wELFZPjvHpvzTtaJnLK6Vb97Yn933koO/saN7fsjwNKzp4l2lJVx2orjCGzC/4ZL4zCver6aQYtC5sdoychuFE6ufOiog+VWi5UDkbmvmtah/3aArEBIi39s5ILUnlFLgilcGuz9CQshEY7fw2ouoILAYPVT/gyAIq3TFAIwVsl+ktkRz/qGfnCDGrm5gsl/l9QdvCWGsjPz3dU7XuqKfdUrr/6XIgjp4rey6AJBmCmUJMjITHVdFb5m1p+dLMCL8t55zD42cmftmLEJC0Da04YiRCVUBLLa8D071/N5UBNBXDh0LFsmhV/5B5ExOB4j3WVG/S3lfK5o+V6ELHvy6RR9n4ac+VsK4VE4yphPvV+kG9FegTBH4ZRXL2HytUHCduJazB/KykjfetYxOXTLws267aGOd+I+JhKP//+VnXmS90OD/jvLcVu0asyqcuYN1mSb6XTlCkqv1vigZPIYwNF/zpWcT1GR/6aEIRjkh0yhg4LXJfaGobYJTY4JI58KiAKgmmgAKWdl5nYCeLqavRJGQNuYuZtZFGx+IkI4w4NS2xwbetNMunOjBu/hmKCI/w7tfiiyUd//4rbTeWt4izBY8YvGIN6vyKYmP/8X8wHKCeN+WRcKM70+tXKNGyevU9H2Dg5BsljnTf8YbsJ1TmMs74Ce2XlHisleguhyeg44rQOHZuw/6HTkhnnurK2d62q6yS7210SsAIaR+jXMQA+svkrLpsUY+F30Uw89uOdGAR6vo4FIME0EfVVeHTu6eKicfhSqOeXJhbftcd08sWEnNUL1C9fnprTgd83IMut8onVUF0hvqzZfHduPjbjwEXIcoYmy+P6tcJZHmeOv6VrvEdkHDJecjHuHeWANe79VG662qTjA/HCvumVv3qL+LrOcpqGps2ZGwQdFJ7PU4iuyRlBrwfO+xnPyr47s2cXVbWzAyznDiBGjCM3ksxjjqM62GE9C8f5U38kB3VjtabKp/nRdvMESPGDG90bWRLAt1Qk5DyLuazRR1YzdC1c+hZXvAWV8xA72S4A8B67vjVhbba3MMop293FeEXpe7zItMWrJG/LOH9ByOXmYnNJfjmfuX9KbrpgLOba4nZ+fl8Gbdv/ihv+6wFGKHCYrVwmhFC0J3V2bn2tIB1wCc1CST3d3X2OyxhguXcs4sm679UngzofuSeBewMFJboIQHbUh/m2JhW2hG9DIvG2t7yZIzKBTz9wBtnNC+2pCRYhSIuQ1j8xsz5VvqnyUIthvuoyyu7fNIrg/KQUVmGQaqkqZk/Vx5b33/gsEs8yX7SC1J+NV4icz6bvIE7C5G6McBaI8rVg56q5QBJWxn/87Q1sPK4+sQa8fLU5gXo4paaq4cOcQ4wR0VBHPGjKh+UlPCbA1nLXyEUX45qZ8J7/Ln4FPJE2TdzD0Z8MLSNQiykMMmSyOCiFfy84Rq60emYB2vD09KjYwsoIpeDcBDTElBbXxND72yhd9pC/1CMid/5HUMvAL27OtcIJDzNKpRPNqPOpyt2aPGz9QWIs9hQ9LiX5s8m9hjTUu/f7MyIatjjd+tSfQ3ufZxPpmJhTaBtZtKLUcfOCUqADuO+QoH8B9v6U+P0HV1GLQmtoNFTb3s74ivZgjES0qfK+8RdGgBbcCMSy8eBvh98+et1KIFqSe1KQPyXULBMTsIYnysIwiZBJYdI20vseV+wuJkcqGemehKjaAb9L57xZm3g2zX0bZ2xk/fU+bCo7TlnbW7JuF1YdURo/2Gw7VclDG1W7LOtas2LX4upifZ/23rzpsnY/ALfRgrcWP5hYmV9VxVOQA1fZvp9F2UNU+7d7xRyVm5wiLp3/0dlV7vdw1PMiZrbDAYzIVqEjRY2YU03sJhPnlwIPcZUG5ltL6S8XCxU1eYS5cjr34veBmXAvy7yN4ZjArIG0dfD/5UpBNlX1ZPoxJOwyqRi3wQWtOzd4oNKh0LkoTm8cwqgIfKhqqGOhwo71I+zXnMemTv2B2AUzABWyFztGgGULjDDzWYwJUVBTjKCn5K2QGMK1CQT7SzziOjo+BhAmqBjzuc3xYym2eedGeOIRJVyTwDw37iCMe4g5Vbnsb5ZBdxOAnMT7HU4DHpxWGuQ7GeiY30Cpbvzss55+5Km1YsbD5ea3NI9QNYIXol5apgSu9dZ8f8xS5dtHpido5BclDuLWY4lhik0tbJa07yJhH0BOyEut/GRbYTS6RfiTYWGMCkNpfSHi7HvdiTglEVHKZXaVhezH4kkXiIvKopYAlPusftpE4a5IZwvw1x/eLvoDIh/zpo9FiQInsTb2SAkKHV42XYBjpJDg4374XiVb3ws4qM0s9eSQ5HzsMU4OZJKuopFjBM+dAZEl8RUMx5uU2N486Kr141tVsGQfGjORYMCJAMsxELeNT4RmWjRcpdTGBwcx6XN9drWqPmJzcrGrH4+DRc7+n1w3kPZwu0BkNr6hQrqgo7JTB9A5kdJ/H7P4cWBMwsmuixAzJB3yrQpnGIq90lxAXLzDCdn1LPibsRt7rHNjgQBklRgPZ8vTbjXdgXrTWQsK5MdrXXQVPp0Rinq3frzZKJ0qD6Qhc40VzAraUXlob1gvkhK3vpmHgI6FRlQZNx6eRqkp0zy4AQlX813fAPtL3jMRaitGFFjo0zmErloC+h+YYdVQ6k4F/epxAoF0BmqEoKNTt6j4vQZNQ2BoqF9Vj53TOIoNmDiu9Xp15RkIgQIGcoLpfoIbenzpGUAtqFJp5W+LLnx38jHeECTJ/navKY1NWfN0sY1T8/pB8kIH3DU3DX+u6W3YwpypBMYOhbSxGjq84RZ84fWJow8pyHqn4S/9J15EcCMsXqrfwyd9mhiu3+rEo9pPpoJkdZqHjra4NvzFwuThNKy6hao/SlLw3ZADUcUp3w3SRVfW2rhl80zOgTYnKE0Hs2qp1J6H3xqPqIkvUDRMFDYyRbsFI3M9MEyovPk8rlw7/0a81cDVLmBsR2ze2pBuKb23fbeZC0uXoIvDppfTwIDxk1Oq2dGesGc+oJXWJLGkOha3CX+DUnzgAp9HGH9RsPZN63Hn4RMA5eSVhPHO+9RcRb/IOgtW31V1Q5IPGtoxPjC+MEJbVlIMYADd9aHYWUIQKopuPOHmoqSkubnAKnzgKHqgIOfW5RdAgotN6BN+O2ZYHkuemLnvQ8U9THVrS1RtLmKbcC7PeeDsYznvqzeg6VCNwmr0Yyx1wnLjyT84BZz3EJyCptD3yeueAyDWIs0L2qs/VQ3HUyqfrja0V1LdDzqAikeWuV4sc7RLIB69jEIBjCkyZedoUHqCrOvShVzyd73OdrJW0hPOuQv2qOoHDc9xVb6Yu6uq3Xqp2ZaH46A7lzevbxQEmfrzvAYSJuZ4WDk1Hz3QX1LVdiUK0EvlAGAYlG3Md30r7dcPN63yqBCIj25prpvZP0nI4+EgWoFG95V596CurXpKRBGRjQlHCvy5Ib/iW8nZJWwrET3mgd6mEhfP4KCuaLjopWs7h+MdXFdIv8dHQJgg1xi1eYqB0uDYjxwVmri0Sv5XKut/onqapC+FQiC2C1lvYJ9MVco6yDYsS3AANUfMtvtbYI2hfwZatiSsnoUeMZd34GVjkMMKA+XnjJpXgRW2SHTZplVowPmJsvXy6w3cfO1AK2dvtZEKTkC/TY9LFiKHCG0DnrMQdGm2lzlBHM9iEYynH2UcVMhUEjsc0oDBTgo2ZSQ1gzkAHeWeBXYFjYLuuf8yzTCy7/RFR81WDjXMbq2BOH5dURnxo6oivmxL3cKzKInlZkD31nvpHB9Kk7GfcfE1t+1V64b9LtgeJGlpRFxQCAqWJ5DoY77ski8gsOEOr2uywZaoO/NGa0X0y1pNQHBi3b2SUGNpcZxDT7rLbBf1FSnQ8guxGW3W+36BW0gBje4DOz6Ba6SVk0xiKgt+q2JOFyr4SYfnu+Ic1QZYIuwHBrgzr6UvOcSCzPTOo7D6IC4ISeS7zkl4h+2VoeHpnG/uWR3+ysNgPcOIXQbv0n4mr3BwQcdKJxgPSeyuP/z1Jjg4e9nUvoXegqQVIE30EHx5GHv+FAVUNTowYDJgyFhf5IvlYmEqRif6+WN1MkEJmDcQITx9FX23a4mxy1AQRsOHO/+eImX9l8EMJI3oPWzVXxSOeHU1dUWYr2uAA7AMb+vAEZSbU3qob9ibCyXeypEMpZ6863o6QPqlqGHZkuWABSTVNd4cOh9hv3qEpSx2Zy/DJMP6cItEmiBJ5PFqQnDEIt3NrA3COlOSgz43D7gpNFNJ5MBh4oFzhDPiglC2ypsNU4ISywY2erkyb1NC3Qh/IfWj0eDgZI4/ln8WPfBsT3meTjq1Uqt1E7Zl/qftqkx6aM9KueMCekSnMrcHj1CqTWWzEzPsZGcDe3Ue4Ws+XFYVxNbOFF8ezkvQGR6ZOtOLU2lQEnMBStx47vE6Pb7AYMBRj2OOfZXfisjJnpTfSNjo6sZ6qSvNxZNmDeS7Gk3yYyCk1HtKN2UnhMIjOXUzAqDv90lx9O/q/AT1ZMnit5XQe9wmQxnE/WSH0CqZ9/2Hy+Sfmpeg8RwsHI5Z8kC8H293m/LHVVM/BA7HaTJYg5Enk7M/xWpq0192ACfBai2LA/qrCjCr6Dh1BIMzMXINBmX96MJ5Hn2nxln/RXPFhwHxUmSV0EV2V0jm86/dxxuYSU1W7sVkEbN9EzkG0QFwPhyHKyb3t+Fj5WoUUTErcazE/N6EW6Lvp0d//SDPj7EV9UdJN+Amnf3Wwk3A0SlJ9Z00yvXZ7n3z70G47Hfsow8Wq1JXcfwnA+Yxa5mFsgV464KKP4T31wqIgzFPd3eCe3j5ory5fBF2hgCFyVFrLzI9eetNXvM7oQqyFgDo4CTp/hDV9NMX9JDHQ/nyHTLvZLNLF6ftn2OxjGm8+PqOwhxnPHWipkE/8wbtyri80Sr7pMNkQGMfo4ZYK9OcCC4ESVFFbLMIvlxSoRqWie0wxqnLfcLSXMSpMMQEJYDVObYsXIQNv4TGNwjq1kvT1UOkicTrG3IaBZ3XdScS3u8sgeZPVpOLkbiF940FjbCeNRINNvDbd01EPBrTCPpm12m43ze1bBB59Ia6Ovhnur/Nvx3IxwSWol+3H2qfCJR8df6aQf4v6WiONxkK+IqT4pKQrZK/LplgDI/PJZbOep8dtbV7oCr6CgfpWa8NczOkPx81iSHbsNhVSJBOtrLIMrL31LK9TqHqAbAHe0RLmmV806kRLDLNEhUEJfm9u0sxpkL93Zgd6rw+tqBfTMi59xqXHLXSHwSbSBl0EK0+loECOPtrl+/nsaFe197di4yUgoe4jKoAJDXc6DGDjrQOoFDWZJ9HXwt8xDrQP+7aRwWKWI1GF8s8O4KzxWBBcwnl3vnl1Oez3oh6Ea1vjR7/z7DDTrFtqU2W/KAEzAuXDNZ7MY73MF216dzdSbWmUp4lcm7keJfWaMHgut9x5C9mj66Z0lJ+yhsjVvyiWrfk1lzPOTdhG15Y7gQlXtacvI7qv/XNSscDwqkgwHT/gUsD5yB7LdRRvJxQGYINn9hTpodKFVSTPrtGvyQw+HlRFXIkodErAGu9Iy1YpfSPc3jkFh5CX3lPxv7aqjE/JAfTIpEjGb/H7MO0e2vsViSW1qa/Lmi4/n4DEI3g7lYrcanspDfEpKkdV1OjSLOy0BCUqVoECaB55vs06rXl4jqmLsPsFM/7vYJ0vrBhDCm/00A/H81l1uekJ/6Lml3Hb9+NKiLqATJmDpyzfYZFHumEjC662L0Bwkxi7E9U4cQA0XMVDuMYAIeLMPgQaMVOd8fmt5SflFIfuBoszeAw7ow5gXPE2Y/yBc/7jExARUf/BxIHQBF5Sn3i61w4z5xJdCyO1F1X3+3ax+JSvMeZ7S6QSKp1Fp/sjYz6Z+VgCZzibGeEoujryfMulH7Rai5kAft9ebcW50DyJr2uo2z97mTWIu45YsSnNSMrrNUuG1XsYBtD9TDYzQffKB87vWbkM4EbPAFgoBV4GQS+vtFDUqOFAoi1nTtmIOvg38N4hT2Sn8r8clmBCXspBlMBYTnrqFJGBT3wZOzAyJDre9dHH7+x7qaaKDOB4UQALD5ecS0DE4obubQEiuJZ0EpBVpLuYcce8Aa4PYd/V4DLDAJBYKQPCWTcrEaZ5HYbJi11Gd6hjGom1ii18VHYnG28NKpkz2UKVPxlhYSp8uZr367iOmoy7zsxehW9wzcy2zG0a80PBMCRQMb32hnaHeOR8fnNDzZhaNYhkOdDsBUZ3loDMa1YP0uS0cjUP3b/6DBlqmZOeNABDsLl5BI5QJups8uxAuWJdkUB/pO6Zax6tsg7fN5mjjDgMGngO+DPcKqiHIDbFIGudxtPTIyDi9SFMKBDcfdGQRv41q1AqmxgkVfJMnP8w/Bc7N9/TR6C7mGObFqFkIEom8sKi2xYqJLTCHK7cxzaZvqODo22c3wisBCP4HeAgcRbNPAsBkNRhSmD48dHupdBRw4mIvtS5oeF6zeT1KMCyhMnmhpkFAGWnGscoNkwvQ8ZM5lE/vgTHFYL99OuNxdFBxTEDd5v2qLR8y9WkXsWgG6kZNndFG+pO/UAkOCipqIhL3hq7cRSdrCq7YhUsTocEcnaFa6nVkhnSeRYUA1YO0z5itF9Sly3VlxYDw239TJJH6f3EUfYO5lb7bcFcz8Bp7Oo8QmnsUHOz/fagVUBtKEw1iT88j+aKkv8cscKNkMxjYr8344D1kFoZ7/td1W6LCNYN594301tUGRmFjAzeRg5vyoM1F6+bJZ/Q54jN/k8SFd3DxPTYaAUsivsBfgTn7Mx8H2SpPt4GOdYRnEJOH6jHM2p6SgB0gzIRq6fHxGMmSmqaPCmlfwxiuloaVIitLGN8wie2CDWhkzLoCJcODh7KIOAqbHEvXdUxaS4TTTs07Clzj/6GmVs9kiZDerMxEnhUB6QQPlcfqkG9882RqHoLiHGBoHfQuXIsAG8GTAtao2KVwRnvvam8jo1e312GQAKWEa4sUVEAMG4G6ckcONDwRcg1e2D3+ohXgY4UAWF8wHKQMrSnzCgfFpsxh+aHXMGtPQroQasRY4U6UdG0rz1Vjbka0MekOGRZQEvqQFlxseFor8zWFgHek3v29+WqN6gaK5gZOTOMZzpQIC1201LkMCXild3vWXSc5UX9xcFYfbRPzGFa1FDcPfPB/jUEq/FeGt419CI3YmBlVoHsa4KdcwQP5ZSwHHhFJ7/Ph/Rap/4vmG91eDwPP0lDfCDRCLszTqfzM71xpmiKi2HwS4WlqvGNwtvwF5Dqpn6KTq8ax00UMPkxDcZrEEEsIvHiUXXEphdb4GB4FymlPwBz4Gperqq5pW7TQ6/yNRhW8VT5NhuP0udlxo4gILq5ZxAZk8ZGh3g4CqxJlPKY7AQxupfUcVpWT5VItp1+30UqoyP4wWsRo3olRRgkWZZ2ZN6VC3OZFeXB8NbnUrSdikNptD1QiGuKkr8EmSR/AK9Rw+FF3s5uwuPbvHGiPeFOViltMK7AUaOsq9+x9cndk3iJEE5LKZRlWJbKOZweROzmPNVPkjE3K/TyA57Rs68TkZ3MR8akKpm7cFjnjPd/DdkWjgYoKHSr5Wu5ssoBYU4acRs5g2DHxUmdq8VXOXRbunD8QN0LhgkssgahcdoYsNvuXGUK/KXD/7oFb+VGdhqIn02veuM5bLudJOc2Ky0GMaG4W/xWBxIJcL7yliJOXOpx0AkBqUgzlDczmLT4iILXDxxtRR1oZa2JWFgiAb43obrJnG/TZC2KSK2wqOzRZTXavZZFMb1f3bXvVaNaK828w9TO610gk8JNf3gMfETzXXsbcvRGCG9JWQZ6+cDPqc4466Yo2RcKH+PILeKOqtnlbInR3MmBeGG3FH10yzkybuqEC2HSQwpA0An7d9+73BkDUTm30bZmoP/RGbgFN+GrCOfADgqr0WbI1a1okpFms8iHYw9hm0zUvlEMivBRxModrbJJ+9/p3jUdQQ9BCtQdxnOGrT5dzRUmw0593/mbRSdBg0nRvRZM5/E16m7ZHmDEtWhwvfdZCZ8J8M12W0yRMszXamWfQTwIZ4ayYktrnscQuWr8idp3PjT2eF/jmtdhIfcpMnb+IfZY2FebW6UY/AK3jP4u3Tu4zE4qlnQgLFbM19EBIsNf7KhjdbqQ/D6yiDb+NlEi2SKD+ivXVUK8ib0oBo366gXkR8ZxGjpJIDcEgZPa9TcYe0TIbiPl/rPUQDu3XBJ9X/GNq3FAUsKsll57DzaGMrjcT+gctp+9MLYXCq+sqP81eVQ0r9lt+gcQfZbACRbEjvlMskztZG8gbC8Qn9tt26Q7y7nDrbZq/LEz7kR6Jc6pg3N9rVX8Y5MJrGlML9p9lU4jbTkKqCveeZUJjHB03m2KRKR2TytoFkTXOLg7keU1s1lrPMQJpoOKLuAAC+y1HlJucU6ysB5hsXhvSPPLq5J7JtnqHKZ4vYjC4Vy8153QY+6780xDuGARsGbOs1WqzH0QS765rnSKEbbKlkO8oI/VDwUd0is13tKpqILu1mDJFNy/iJAWcvDgjxvusIT+PGz3ST/J9r9Mtfd0jpaGeiLYIqXc7DiHSS8TcjFVksi66PEkxW1z6ujbLLUGNNYnzOWpH8BZGK4bCK7iR+MbIv8ncDAz1u4StN3vTTzewr9IQjk9wxFxn+6N1ddKs0vffJiS08N3a4G1SVrlZ97Q/M+8G9fe5AP6d9/Qq4WRnORVhofPIKEdCr3llspUfE0oKIIYoByBRPh+bX1HLS3JWGJRhIvE1aW4NTd8ePi4Z+kXb+Z8snYfSNcqijhAgVsx4RCM54cXUiYkjeBmmC4ajOHrChoELscJJC7+9jjMjw5BagZKlgRMiSNYz7h7vvZIoQqbtQmspc0cUk1G/73iXtSpROl5wtLgQi0mW2Ex8i3WULhcggx6E1LMVHUsdc9GHI1PH3U2Ko0PyGdn9KdVOLm7FPBui0i9a0HpA60MsewVE4z8CAt5d401Gv6zXlIT5Ybit1VIA0FCs7wtvYreru1fUyW3oLAZ/+aTnZrOcYRNVA8spoRtlRoWflsRClFcgzkqiHOrf0/SVw+EpVaFlJ0g4Kxq1MMOmiQdpMNpte8lMMQqm6cIFXlnGbfJllysKDi+0JJMotkqgIxOSQgU9dn/lWkeVf8nUm3iwX2Nl3WDw9i6AUK3vBAbZZrcJpDQ/N64AVwjT07Jef30GSSmtNu2WlW7YoyW2FlWfZFQUwk867EdLYKk9VG6JgEnBiBxkY7LMo4YLQJJlAo9l/oTvJkSARDF/XtyAzM8O2t3eT/iXa6wDN3WewNmQHdPfsxChU/KtLG2Mn8i4ZqKdSlIaBZadxJmRzVS/o4yA65RTSViq60oa395Lqw0pzY4SipwE0SXXsKV+GZraGSkr/RW08wPRvqvSUkYBMA9lPx4m24az+IHmCbXA+0faxTRE9wuGeO06DIXa6QlKJ3puIyiuAVfPr736vzo2pBirS+Vxel3TMm3JKhz9o2ZoRvaFVpIkykb0Hcm4oHFBMcNSNj7/4GJt43ogonY2Vg4nsDQIWxAcorpXACzgBqQPjYsE/VUpXpwNManEru4NwMCFPkXvMoqvoeLN3qyu/N1eWEHttMD65v19l/0kH2mR35iv/FI+yjoHJ9gPMz67af3Mq/BoWXqu3rphiWMXVkmnPSEkpGpUI2h1MThideGFEOK6YZHPwYzMBvpNC7+ZHxPb7epfefGyIB4JzO9DTNEYnDLVVHdQyvOEVefrk6Uv5kTQYVYWWdqrdcIl7yljwwIWdfQ/y+2QB3eR/qxYObuYyB4gTbo2in4PzarU1sO9nETkmj9/AoxDA+JM3GMqQtJR4jtduHtnoCLxd1gQUscHRB/MoRYIEsP2pDZ9KvHgtlk1iTbWWbHhohwFEYX7y51fUV2nuUmnoUcqnWIQAAgl9LTVX+Bc0QGNEhChxHR4YjfE51PUdGfsSFE6ck7BL3/hTf9jLq4G1IafINxOLKeAtO7quulYvH5YOBc+zX7CrMgWnW47/jfRsWnJjYYoE7xMfWV2HN2iyIqLI\";\n var FENCED = /* @__PURE__ */ new Map([[8217, \"apostrophe\"], [8260, \"fraction slash\"], [12539, \"middle dot\"]]);\n var NSM_MAX = 4;\n function decode_arithmetic(bytes) {\n let pos = 0;\n function u16() {\n return bytes[pos++] << 8 | bytes[pos++];\n }\n let symbol_count = u16();\n let total = 1;\n let acc = [0, 1];\n for (let i3 = 1; i3 < symbol_count; i3++) {\n acc.push(total += u16());\n }\n let skip = u16();\n let pos_payload = pos;\n pos += skip;\n let read_width = 0;\n let read_buffer = 0;\n function read_bit() {\n if (read_width == 0) {\n read_buffer = read_buffer << 8 | bytes[pos++];\n read_width = 8;\n }\n return read_buffer >> --read_width & 1;\n }\n const N4 = 31;\n const FULL = 2 ** N4;\n const HALF = FULL >>> 1;\n const QRTR = HALF >> 1;\n const MASK = FULL - 1;\n let register = 0;\n for (let i3 = 0; i3 < N4; i3++)\n register = register << 1 | read_bit();\n let symbols = [];\n let low = 0;\n let range = FULL;\n while (true) {\n let value = Math.floor(((register - low + 1) * total - 1) / range);\n let start = 0;\n let end = symbol_count;\n while (end - start > 1) {\n let mid = start + end >>> 1;\n if (value < acc[mid]) {\n end = mid;\n } else {\n start = mid;\n }\n }\n if (start == 0)\n break;\n symbols.push(start);\n let a3 = low + Math.floor(range * acc[start] / total);\n let b4 = low + Math.floor(range * acc[start + 1] / total) - 1;\n while (((a3 ^ b4) & HALF) == 0) {\n register = register << 1 & MASK | read_bit();\n a3 = a3 << 1 & MASK;\n b4 = b4 << 1 & MASK | 1;\n }\n while (a3 & ~b4 & QRTR) {\n register = register & HALF | register << 1 & MASK >>> 1 | read_bit();\n a3 = a3 << 1 ^ HALF;\n b4 = (b4 ^ HALF) << 1 | HALF | 1;\n }\n low = a3;\n range = 1 + b4 - a3;\n }\n let offset = symbol_count - 4;\n return symbols.map((x4) => {\n switch (x4 - offset) {\n case 3:\n return offset + 65792 + (bytes[pos_payload++] << 16 | bytes[pos_payload++] << 8 | bytes[pos_payload++]);\n case 2:\n return offset + 256 + (bytes[pos_payload++] << 8 | bytes[pos_payload++]);\n case 1:\n return offset + bytes[pos_payload++];\n default:\n return x4 - 1;\n }\n });\n }\n function read_payload(v2) {\n let pos = 0;\n return () => v2[pos++];\n }\n function read_compressed_payload(s4) {\n return read_payload(decode_arithmetic(unsafe_atob(s4)));\n }\n function unsafe_atob(s4) {\n let lookup = [];\n [...\"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/\"].forEach((c4, i3) => lookup[c4.charCodeAt(0)] = i3);\n let n2 = s4.length;\n let ret = new Uint8Array(6 * n2 >> 3);\n for (let i3 = 0, pos = 0, width = 0, carry = 0; i3 < n2; i3++) {\n carry = carry << 6 | lookup[s4.charCodeAt(i3)];\n width += 6;\n if (width >= 8) {\n ret[pos++] = carry >> (width -= 8);\n }\n }\n return ret;\n }\n function signed(i3) {\n return i3 & 1 ? ~i3 >> 1 : i3 >> 1;\n }\n function read_deltas(n2, next) {\n let v2 = Array(n2);\n for (let i3 = 0, x4 = 0; i3 < n2; i3++)\n v2[i3] = x4 += signed(next());\n return v2;\n }\n function read_sorted(next, prev = 0) {\n let ret = [];\n while (true) {\n let x4 = next();\n let n2 = next();\n if (!n2)\n break;\n prev += x4;\n for (let i3 = 0; i3 < n2; i3++) {\n ret.push(prev + i3);\n }\n prev += n2 + 1;\n }\n return ret;\n }\n function read_sorted_arrays(next) {\n return read_array_while(() => {\n let v2 = read_sorted(next);\n if (v2.length)\n return v2;\n });\n }\n function read_mapped(next) {\n let ret = [];\n while (true) {\n let w3 = next();\n if (w3 == 0)\n break;\n ret.push(read_linear_table(w3, next));\n }\n while (true) {\n let w3 = next() - 1;\n if (w3 < 0)\n break;\n ret.push(read_replacement_table(w3, next));\n }\n return ret.flat();\n }\n function read_array_while(next) {\n let v2 = [];\n while (true) {\n let x4 = next(v2.length);\n if (!x4)\n break;\n v2.push(x4);\n }\n return v2;\n }\n function read_transposed(n2, w3, next) {\n let m2 = Array(n2).fill().map(() => []);\n for (let i3 = 0; i3 < w3; i3++) {\n read_deltas(n2, next).forEach((x4, j2) => m2[j2].push(x4));\n }\n return m2;\n }\n function read_linear_table(w3, next) {\n let dx = 1 + next();\n let dy = next();\n let vN = read_array_while(next);\n let m2 = read_transposed(vN.length, 1 + w3, next);\n return m2.flatMap((v2, i3) => {\n let [x4, ...ys] = v2;\n return Array(vN[i3]).fill().map((_2, j2) => {\n let j_dy = j2 * dy;\n return [x4 + j2 * dx, ys.map((y6) => y6 + j_dy)];\n });\n });\n }\n function read_replacement_table(w3, next) {\n let n2 = 1 + next();\n let m2 = read_transposed(n2, 1 + w3, next);\n return m2.map((v2) => [v2[0], v2.slice(1)]);\n }\n function read_trie(next) {\n let ret = [];\n let sorted = read_sorted(next);\n expand(decode2([]), []);\n return ret;\n function decode2(Q2) {\n let S3 = next();\n let B2 = read_array_while(() => {\n let cps = read_sorted(next).map((i3) => sorted[i3]);\n if (cps.length)\n return decode2(cps);\n });\n return { S: S3, B: B2, Q: Q2 };\n }\n function expand({ S: S3, B: B2 }, cps, saved) {\n if (S3 & 4 && saved === cps[cps.length - 1])\n return;\n if (S3 & 2)\n saved = cps[cps.length - 1];\n if (S3 & 1)\n ret.push(cps);\n for (let br of B2) {\n for (let cp of br.Q) {\n expand(br, [...cps, cp], saved);\n }\n }\n }\n }\n function hex_cp(cp) {\n return cp.toString(16).toUpperCase().padStart(2, \"0\");\n }\n function quote_cp(cp) {\n return `{${hex_cp(cp)}}`;\n }\n function explode_cp(s4) {\n let cps = [];\n for (let pos = 0, len = s4.length; pos < len; ) {\n let cp = s4.codePointAt(pos);\n pos += cp < 65536 ? 1 : 2;\n cps.push(cp);\n }\n return cps;\n }\n function str_from_cps(cps) {\n const chunk = 4096;\n let len = cps.length;\n if (len < chunk)\n return String.fromCodePoint(...cps);\n let buf = [];\n for (let i3 = 0; i3 < len; ) {\n buf.push(String.fromCodePoint(...cps.slice(i3, i3 += chunk)));\n }\n return buf.join(\"\");\n }\n function compare_arrays(a3, b4) {\n let n2 = a3.length;\n let c4 = n2 - b4.length;\n for (let i3 = 0; c4 == 0 && i3 < n2; i3++)\n c4 = a3[i3] - b4[i3];\n return c4;\n }\n var COMPRESSED = \"AEUDTAHBCFQATQDRADAAcgAgADQAFAAsABQAHwAOACQADQARAAoAFwAHABIACAAPAAUACwAFAAwABAAQAAMABwAEAAoABQAIAAIACgABAAQAFAALAAIACwABAAIAAQAHAAMAAwAEAAsADAAMAAwACgANAA0AAwAKAAkABAAdAAYAZwDSAdsDJgC0CkMB8xhZAqfoC190UGcThgBurwf7PT09Pb09AjgJum8OjDllxHYUKXAPxzq6tABAxgK8ysUvWAgMPT09PT09PSs6LT2HcgWXWwFLoSMEEEl5RFVMKvO0XQ8ExDdJMnIgsj26PTQyy8FfEQ8AY8IPAGcEbwRwBHEEcgRzBHQEdQR2BHcEeAR6BHsEfAR+BIAEgfndBQoBYgULAWIFDAFiBNcE2ATZBRAFEQUvBdALFAsVDPcNBw13DYcOMA4xDjMB4BllHI0B2grbAMDpHLkQ7QHVAPRNQQFnGRUEg0yEB2uaJF8AJpIBpob5AERSMAKNoAXqaQLUBMCzEiACnwRZEkkVsS7tANAsBG0RuAQLEPABv9HICTUBXigPZwRBApMDOwAamhtaABqEAY8KvKx3LQ4ArAB8UhwEBAVSagD8AEFZADkBIadVj2UMUgx5Il4ANQC9AxIB1BlbEPMAs30CGxlXAhwZKQIECBc6EbsCoxngzv7UzRQA8M0BawL6ZwkN7wABAD33OQRcsgLJCjMCjqUChtw/km+NAsXPAoP2BT84PwURAK0RAvptb6cApQS/OMMey5HJS84UdxpxTPkCogVFITaTOwERAK5pAvkNBOVyA7q3BKlOJSALAgUIBRcEdASpBXqzABXFSWZOawLCOqw//AolCZdvv3dSBkEQGyelEPcMMwG1ATsN7UvYBPEGOwTJH30ZGQ/NlZwIpS3dDO0m4y6hgFoj9SqDBe1L9DzdC01RaA9ZC2UJ4zpjgU4DIQENIosK3Q05CG0Q8wrJaw3lEUUHOQPVSZoApQcBCxEdNRW1JhBirAsJOXcG+xr2C48mrxMpevwF0xohBk0BKRr/AM8u54WwWjFcHE9fBgMLJSPHFKhQIA0lQLd4SBobBxUlqQKRQ3BKh1E2HpMh9jw9DWYuE1F8B/U8BRlPC4E8nkarRQ4R0j6NPUgiSUwsBDV/LC8niwnPD4UMuXxyAVkJIQmxDHETMREXN8UIOQcZLZckJxUIIUaVYJoE958D8xPRAwsFPwlBBxMDtRwtEy4VKQUNgSTXAvM21S6zAo9WgAEXBcsPJR/fEFBH4A7pCJsCZQODJesALRUhABcimwhDYwBfj9hTBS7LCMdqbCN0A2cU52ERcweRDlcHpxwzFb8c4XDIXguGCCijrwlbAXUJmQFfBOMICTVbjKAgQWdTi1gYmyBhQT9d/AIxDGUVn0S9h3gCiw9rEhsBNQFzBzkNAQJ3Ee0RaxCVCOuGBDW1M/g6JQRPIYMgEQonA09szgsnJvkM+GkBoxJiAww0PXfuZ6tgtiQX/QcZMsVBYCHxC5JPzQycGsEYQlQuGeQHvwPzGvMn6kFXBf8DowMTOk0z7gS9C2kIiwk/AEkOoxcH1xhqCnGM0AExiwG3mQNXkYMCb48GNwcLAGcLhwV55QAdAqcIowAFAM8DVwA5Aq0HnQAZAIVBAT0DJy8BIeUCjwOTCDHLAZUvAfMpBBvDDBUA9zduSgLDsQKAamaiBd1YAo4CSTUBTSUEBU5HUQOvceEA2wBLBhPfRwEVq0rLGuNDAd9vKwDHAPsABTUHBUEBzQHzbQC3AV8LMQmis7UBTekpAIMAFWsB1wKJAN0ANQB/8QFTAE0FWfkF0wJPSQERMRgrV2EBuwMfATMBDQB5BsuNpckHHwRtB9MCEBsV4QLvLge1AQMi3xPNQsUCvd5VoWACZIECYkJbTa9bNyACofcCaJgCZgkCn4Q4GwsCZjsCZiYEbgR/A38TA36SOQY5dxc5gjojIwJsHQIyNjgKAm3HAm2u74ozZ0UrAWcA3gDhAEoFB5gMjQD+C8IADbUCdy8CdqI/AnlLQwJ4uh1c20WuRtcCfD8CesgCfQkCfPAFWQUgSABIfWMkAoFtAoAAAoAFAn+uSVhKWxUXSswC0QEC0MxLJwOITwOH5kTFkTIC8qFdAwMDrkvOTC0lA89NTE2vAos/AorYwRsHHUNnBbcCjjcCjlxAl4ECjtkCjlx4UbRTNQpS1FSFApP7ApMMAOkAHFUeVa9V0AYsGymVhjLheGZFOzkCl58C77JYIagAWSUClo8ClnycAKlZrFoJgU0AOwKWtQKWTlxEXNECmcsCmWRcyl0HGQKcmznCOp0CnBYCn5sCnriKAB0PMSoPAp3xAp6SALU9YTRh7wKe0wKgbgGpAp6fHwKeTqVjyGQnJSsCJ68CJn4CoPsCoEwCot0CocQCpi8Cpc4Cp/8AfQKn8mh8aLEAA0lqHGrRAqzjAqyuAq1nAq0CAlcdAlXcArHh1wMfTmyXArK9DQKy6Bds4G1jbUhfAyXNArZcOz9ukAMpRQK4XgK5RxUCuSp3cDZw4QK9GQK72nCWAzIRAr6IcgIDM3ECvhpzInNPAsPLAsMEc4J0SzVFdOADPKcDPJoDPb8CxXwCxkcCxhCJAshpUQLIRALJTwLJLgJknQLd0nh5YXiueSVL0AMYo2cCAmH0GfOVJHsLXpJeuxECz2sCz2wvS1PS8xOfAMatAs9zASnqA04SfksFAtwnAtuKAtJPA1JcA1NfAQEDVYyAiT8AyxbtYEWCHILTgs6DjQLaxwLZ3oQQhEmnPAOGpQAvA2QOhnFZ+QBVAt9lAt64c3cC4i/tFAHzMCcB9JsB8tKHAuvzAulweQLq+QLq5AD5RwG5Au6JAuuclqqXAwLuPwOF4Jh5cOBxoQLzAwBpA44WmZMC9xMDkW4DkocC95gC+dkC+GaaHJqruzebHgOdgwL++gEbADmfHJ+zAwWNA6ZqA6bZANHFAwZqoYiiBQkDDEkCwAA/AwDhQRdTARHzA2sHl2cFAJMtK7evvdsBiZkUfxEEOQH7KQUhDp0JnwCS/SlXxQL3AZ0AtwW5AG8LbUEuFCaNLgFDAYD8AbUmAHUDDgRtACwCFgyhAAAKAj0CagPdA34EkQEgRQUhfAoABQBEABMANhICdwEABdUDa+8KxQIA9wqfJ7+xt+UBkSFBQgHpFH8RNMCJAAQAGwBaAkUChIsABjpTOpSNbQC4Oo860ACNOME63AClAOgAywE6gTo7Ofw5+Tt2iTpbO56JOm85GAFWATMBbAUvNV01njWtNWY1dTW2NcU1gjWRNdI14TWeNa017jX9NbI1wTYCNhE1xjXVNhY2JzXeNe02LjY9Ni41LSE2OjY9Njw2yTcIBJA8VzY4Nt03IDcPNsogN4k3MAoEsDxnNiQ3GTdsOo03IULUQwdC4EMLHA8PCZsobShRVQYA6X8A6bABFCnXAukBowC9BbcAbwNzBL8MDAMMAQgDAAkKCwsLCQoGBAVVBI/DvwDz9b29kaUCb0QtsRTNLt4eGBcSHAMZFhYZEhYEARAEBUEcQRxBHEEcQRxBHEEaQRxBHEFCSTxBPElISUhBNkM2QTYbNklISVmBVIgBFLWZAu0BhQCjBcEAbykBvwGJAaQcEZ0ePCklMAAhMvAIMAL54gC7Bm8EescjzQMpARQpKgDUABavAj626xQAJP0A3etzuf4NNRA7efy2Z9NQrCnC0OSyANz5BBIbJ5IFDR6miIavYS6tprjjmuKebxm5C74Q225X1pkaYYPb6f1DK4k3xMEBb9S2WMjEibTNWhsRJIA+vwNVEiXTE5iXs/wezV66oFLfp9NZGYW+Gk19J2+bCT6Ye2w6LDYdgzKMUabk595eLBCXANz9HUpWbATq9vqXVx9XDg+Pc9Xp4+bsS005SVM/BJBM4687WUuf+Uj9dEi8aDNaPxtpbDxcG1THTImUMZq4UCaaNYpsVqraNyKLJXDYsFZ/5jl7bLRtO88t7P3xZaAxhb5OdPMXqsSkp1WCieG8jXm1U99+blvLlXzPCS+M93VnJCiK+09LfaSaBAVBomyDgJua8dfUzR7ga34IvR2Nvj+A9heJ6lsl1KG4NkI1032Cnff1m1wof2B9oHJK4bi6JkEdSqeNeiuo6QoZZincoc73/TH9SXF8sCE7XyuYyW8WSgbGFCjPV0ihLKhdPs08Tx82fYAkLLc4I2wdl4apY7GU5lHRFzRWJep7Ww3wbeA3qmd59/86P4xuNaqDpygXt6M85glSBHOCGgJDnt+pN9bK7HApMguX6+06RZNjzVmcZJ+wcUrJ9//bpRNxNuKpNl9uFds+S9tdx7LaM5ZkIrPj6nIU9mnbFtVbs9s/uLgl8MVczAwet+iOEzzBlYW7RCMgE6gyNLeq6+1tIx4dpgZnd0DksJS5f+JNDpwwcPNXaaVspq1fbQajOrJgK0ofKtJ1Ne90L6VO4MOl5S886p7u6xo7OLjG8TGL+HU1JXGJgppg4nNbNJ5nlzSpuPYy21JUEcUA94PoFiZfjZue+QnyQ80ekOuZVkxx4g+cvhJfHgNl4hy1/a6+RKcKlar/J29y//EztlbVPHVUeQ1zX86eQVAjR/M3dA9w4W8LfaXp4EgM85wOWasli837PzVMOnsLzR+k3o75/lRPAJSE1xAKQzEi5v10ke+VBvRt1cwQRMd+U5mLCTGVd6XiZtgBG5cDi0w22GKcVNvHiu5LQbZEDVtz0onn7k5+heuKXVsZtSzilkLRAUmjMXEMB3J9YC50XBxPiz53SC+EhnPl9WsKCv92SM/OFFIMJZYfl0WW8tIO3UxYcwdMAj7FSmgrsZ2aAZO03BOhP1bNNZItyXYQFTpC3SG1VuPDqH9GkiCDmE+JwxyIVSO5siDErAOpEXFgjy6PQtOVDj+s6e1r8heWVvmZnTciuf4EiNZzCAd7SOMhXERIOlsHIMG399i9aLTy3m2hRLZjJVDNLS53iGIK11dPqQt0zBDyg6qc7YqkDm2M5Ve6dCWCaCbTXX2rToaIgz6+zh4lYUi/+6nqcFMAkQJKHYLK0wYk5N9szV6xihDbDDFr45lN1K4aCXBq/FitPSud9gLt5ZVn+ZqGX7cwm2z5EGMgfFpIFyhGGuDPmso6TItTMwny+7uPnLCf4W6goFQFV0oQSsc9VfMmVLcLr6ZetDZbaSFTLqnSO/bIPjA3/zAUoqgGFAEQS4IhuMzEp2I3jJzbzkk/IEmyax+rhZTwd6f+CGtwPixu8IvzACquPWPREu9ZvGkUzpRwvRRuaNN6cr0W1wWits9ICdYJ7ltbgMiSL3sTPeufgNcVqMVWFkCPDH4jG2jA0XcVgQj62Cb29v9f/z/+2KbYvIv/zzjpQAPkliaVDzNrW57TZ/ZOyZD0nlfMmAIBIAGAI0D3k/mdN4xr9v85ZbZbbqfH2jGd5hUqNZWwl5SPfoGmfElmazUIeNL1j/mkF7VNAzTq4jNt8JoQ11NQOcmhprXoxSxfRGJ9LDEOAQ+dmxAQH90iti9e2u/MoeuaGcDTHoC+xsmEeWmxEKefQuIzHbpw5Tc5cEocboAD09oipWQhtTO1wivf/O+DRe2rpl/E9wlrzBorjJsOeG1B/XPW4EaJEFdNlECEZga5ZoGRHXgYouGRuVkm8tDESiEyFNo+3s5M5puSdTyUL2llnINVHEt91XUNW4ewdMgJ4boJfEyt/iY5WXqbA+A2Fkt5Z0lutiWhe9nZIyIUjyXDC3UsaG1t+eNx6z4W/OYoTB7A6x+dNSTOi9AInctbESqm5gvOLww7OWXPrmHwVZasrl4eD113pm+JtT7JVOvnCXqdzzdTRHgJ0PiGTFYW5Gvt9R9LD6Lzfs0v/TZZHSmyVNq7viIHE6DBK7Qp07Iz55EM8SYtQvZf/obBniTWi5C2/ovHfw4VndkE5XYdjOhCMRjDeOEfXeN/CwfGduiUIfsoFeUxXeQXba7c7972XNv8w+dTjjUM0QeNAReW+J014dKAD/McQYXT7c0GQPIkn3Ll6R7gGjuiQoZD0TEeEqQpKoZ15g/0OPQI17QiSv9AUROa/V/TQN3dvLArec3RrsYlvBm1b8LWzltdugsC50lNKYLEp2a+ZZYqPejULRlOJh5zj/LVMyTDvwKhMxxwuDkxJ1QpoNI0OTWLom4Z71SNzI9TV1iXJrIu9Wcnd+MCaAw8o1jSXd94YU/1gnkrC9BUEOtQvEIQ7g0i6h+KL2JKk8Ydl7HruvgWMSAmNe+LshGhV4qnWHhO9/RIPQzY1tHRj2VqOyNsDpK0cww+56AdDC4gsWwY0XxoucIWIqs/GcwnWqlaT0KPr8mbK5U94/301i1WLt4YINTVvCFBrFZbIbY8eycOdeJ2teD5IfPLCRg7jjcFTwlMFNl9zdh/o3E/hHPwj7BWg0MU09pPrBLbrCgm54A6H+I6v27+jL5gkjWg/iYdks9jbfVP5y/n0dlgWEMlKasl7JvFZd56LfybW1eeaVO0gxTfXZwD8G4SI116yx7UKVRgui6Ya1YpixqXeNLc8IxtAwCU5IhwQgn+NqHnRaDv61CxKhOq4pOX7M6pkA+Pmpd4j1vn6ACUALoLLc4vpXci8VidLxzm7qFBe7s+quuJs6ETYmnpgS3LwSZxPIltgBDXz8M1k/W2ySNv2f9/NPhxLGK2D21dkHeSGmenRT3Yqcdl0m/h3OYr8V+lXNYGf8aCCpd4bWjE4QIPj7vUKN4Nrfs7ML6Y2OyS830JCnofg/k7lpFpt4SqZc5HGg1HCOrHvOdC8bP6FGDbE/VV0mX4IakzbdS/op+Kt3G24/8QbBV7y86sGSQ/vZzU8FXs7u6jIvwchsEP2BpIhW3G8uWNwa3HmjfH/ZjhhCWvluAcF+nMf14ClKg5hGgtPLJ98ueNAkc5Hs2WZlk2QHvfreCK1CCGO6nMZVSb99VM/ajr8WHTte9JSmkXq/i/U943HEbdzW6Re/S88dKgg8pGOLlAeNiqrcLkUR3/aClFpMXcOUP3rmETcWSfMXZE3TUOi8i+fqRnTYLflVx/Vb/6GJ7eIRZUA6k3RYR3iFSK9c4iDdNwJuZL2FKz/IK5VimcNWEqdXjSoxSgmF0UPlDoUlNrPcM7ftmA8Y9gKiqKEHuWN+AZRIwtVSxye2Kf8rM3lhJ5XcBXU9n4v0Oy1RU2M+4qM8AQPVwse8ErNSob5oFPWxuqZnVzo1qB/IBxkM3EVUKFUUlO3e51259GgNcJbCmlvrdjtoTW7rChm1wyCKzpCTwozUUEOIcWLneRLgMXh+SjGSFkAllzbGS5HK7LlfCMRNRDSvbQPjcXaenNYxCvu2Qyznz6StuxVj66SgI0T8B6/sfHAJYZaZ78thjOSIFumNWLQbeZixDCCC+v0YBtkxiBB3jefHqZ/dFHU+crbj6OvS1x/JDD7vlm7zOVPwpUC01nhxZuY/63E7g\";\n var S0 = 44032;\n var L0 = 4352;\n var V0 = 4449;\n var T0 = 4519;\n var L_COUNT = 19;\n var V_COUNT = 21;\n var T_COUNT = 28;\n var N_COUNT = V_COUNT * T_COUNT;\n var S_COUNT = L_COUNT * N_COUNT;\n var S1 = S0 + S_COUNT;\n var L1 = L0 + L_COUNT;\n var V1 = V0 + V_COUNT;\n var T1 = T0 + T_COUNT;\n function unpack_cc(packed) {\n return packed >> 24 & 255;\n }\n function unpack_cp(packed) {\n return packed & 16777215;\n }\n var SHIFTED_RANK;\n var EXCLUSIONS;\n var DECOMP;\n var RECOMP;\n function init$1() {\n let r2 = read_compressed_payload(COMPRESSED);\n SHIFTED_RANK = new Map(read_sorted_arrays(r2).flatMap((v2, i3) => v2.map((x4) => [x4, i3 + 1 << 24])));\n EXCLUSIONS = new Set(read_sorted(r2));\n DECOMP = /* @__PURE__ */ new Map();\n RECOMP = /* @__PURE__ */ new Map();\n for (let [cp, cps] of read_mapped(r2)) {\n if (!EXCLUSIONS.has(cp) && cps.length == 2) {\n let [a3, b4] = cps;\n let bucket = RECOMP.get(a3);\n if (!bucket) {\n bucket = /* @__PURE__ */ new Map();\n RECOMP.set(a3, bucket);\n }\n bucket.set(b4, cp);\n }\n DECOMP.set(cp, cps.reverse());\n }\n }\n function is_hangul(cp) {\n return cp >= S0 && cp < S1;\n }\n function compose_pair(a3, b4) {\n if (a3 >= L0 && a3 < L1 && b4 >= V0 && b4 < V1) {\n return S0 + (a3 - L0) * N_COUNT + (b4 - V0) * T_COUNT;\n } else if (is_hangul(a3) && b4 > T0 && b4 < T1 && (a3 - S0) % T_COUNT == 0) {\n return a3 + (b4 - T0);\n } else {\n let recomp = RECOMP.get(a3);\n if (recomp) {\n recomp = recomp.get(b4);\n if (recomp) {\n return recomp;\n }\n }\n return -1;\n }\n }\n function decomposed(cps) {\n if (!SHIFTED_RANK)\n init$1();\n let ret = [];\n let buf = [];\n let check_order = false;\n function add2(cp) {\n let cc = SHIFTED_RANK.get(cp);\n if (cc) {\n check_order = true;\n cp |= cc;\n }\n ret.push(cp);\n }\n for (let cp of cps) {\n while (true) {\n if (cp < 128) {\n ret.push(cp);\n } else if (is_hangul(cp)) {\n let s_index = cp - S0;\n let l_index = s_index / N_COUNT | 0;\n let v_index = s_index % N_COUNT / T_COUNT | 0;\n let t_index = s_index % T_COUNT;\n add2(L0 + l_index);\n add2(V0 + v_index);\n if (t_index > 0)\n add2(T0 + t_index);\n } else {\n let mapped = DECOMP.get(cp);\n if (mapped) {\n buf.push(...mapped);\n } else {\n add2(cp);\n }\n }\n if (!buf.length)\n break;\n cp = buf.pop();\n }\n }\n if (check_order && ret.length > 1) {\n let prev_cc = unpack_cc(ret[0]);\n for (let i3 = 1; i3 < ret.length; i3++) {\n let cc = unpack_cc(ret[i3]);\n if (cc == 0 || prev_cc <= cc) {\n prev_cc = cc;\n continue;\n }\n let j2 = i3 - 1;\n while (true) {\n let tmp = ret[j2 + 1];\n ret[j2 + 1] = ret[j2];\n ret[j2] = tmp;\n if (!j2)\n break;\n prev_cc = unpack_cc(ret[--j2]);\n if (prev_cc <= cc)\n break;\n }\n prev_cc = unpack_cc(ret[i3]);\n }\n }\n return ret;\n }\n function composed_from_decomposed(v2) {\n let ret = [];\n let stack = [];\n let prev_cp = -1;\n let prev_cc = 0;\n for (let packed of v2) {\n let cc = unpack_cc(packed);\n let cp = unpack_cp(packed);\n if (prev_cp == -1) {\n if (cc == 0) {\n prev_cp = cp;\n } else {\n ret.push(cp);\n }\n } else if (prev_cc > 0 && prev_cc >= cc) {\n if (cc == 0) {\n ret.push(prev_cp, ...stack);\n stack.length = 0;\n prev_cp = cp;\n } else {\n stack.push(cp);\n }\n prev_cc = cc;\n } else {\n let composed = compose_pair(prev_cp, cp);\n if (composed >= 0) {\n prev_cp = composed;\n } else if (prev_cc == 0 && cc == 0) {\n ret.push(prev_cp);\n prev_cp = cp;\n } else {\n stack.push(cp);\n prev_cc = cc;\n }\n }\n }\n if (prev_cp >= 0) {\n ret.push(prev_cp, ...stack);\n }\n return ret;\n }\n function nfd(cps) {\n return decomposed(cps).map(unpack_cp);\n }\n function nfc(cps) {\n return composed_from_decomposed(decomposed(cps));\n }\n var HYPHEN = 45;\n var STOP = 46;\n var STOP_CH = \".\";\n var FE0F = 65039;\n var UNIQUE_PH = 1;\n var Array_from = (x4) => Array.from(x4);\n function group_has_cp(g4, cp) {\n return g4.P.has(cp) || g4.Q.has(cp);\n }\n var Emoji = class extends Array {\n get is_emoji() {\n return true;\n }\n // free tagging system\n };\n var MAPPED;\n var IGNORED;\n var CM;\n var NSM;\n var ESCAPE;\n var NFC_CHECK;\n var GROUPS;\n var WHOLE_VALID;\n var WHOLE_MAP;\n var VALID;\n var EMOJI_LIST;\n var EMOJI_ROOT;\n function init() {\n if (MAPPED)\n return;\n let r2 = read_compressed_payload(COMPRESSED$1);\n const read_sorted_array = () => read_sorted(r2);\n const read_sorted_set = () => new Set(read_sorted_array());\n const set_add_many = (set, v2) => v2.forEach((x4) => set.add(x4));\n MAPPED = new Map(read_mapped(r2));\n IGNORED = read_sorted_set();\n CM = read_sorted_array();\n NSM = new Set(read_sorted_array().map((i3) => CM[i3]));\n CM = new Set(CM);\n ESCAPE = read_sorted_set();\n NFC_CHECK = read_sorted_set();\n let chunks = read_sorted_arrays(r2);\n let unrestricted = r2();\n const read_chunked = () => {\n let set = /* @__PURE__ */ new Set();\n read_sorted_array().forEach((i3) => set_add_many(set, chunks[i3]));\n set_add_many(set, read_sorted_array());\n return set;\n };\n GROUPS = read_array_while((i3) => {\n let N4 = read_array_while(r2).map((x4) => x4 + 96);\n if (N4.length) {\n let R3 = i3 >= unrestricted;\n N4[0] -= 32;\n N4 = str_from_cps(N4);\n if (R3)\n N4 = `Restricted[${N4}]`;\n let P2 = read_chunked();\n let Q2 = read_chunked();\n let M2 = !r2();\n return { N: N4, P: P2, Q: Q2, M: M2, R: R3 };\n }\n });\n WHOLE_VALID = read_sorted_set();\n WHOLE_MAP = /* @__PURE__ */ new Map();\n let wholes = read_sorted_array().concat(Array_from(WHOLE_VALID)).sort((a3, b4) => a3 - b4);\n wholes.forEach((cp, i3) => {\n let d5 = r2();\n let w3 = wholes[i3] = d5 ? wholes[i3 - d5] : { V: [], M: /* @__PURE__ */ new Map() };\n w3.V.push(cp);\n if (!WHOLE_VALID.has(cp)) {\n WHOLE_MAP.set(cp, w3);\n }\n });\n for (let { V: V2, M: M2 } of new Set(WHOLE_MAP.values())) {\n let recs = [];\n for (let cp of V2) {\n let gs = GROUPS.filter((g4) => group_has_cp(g4, cp));\n let rec = recs.find(({ G }) => gs.some((g4) => G.has(g4)));\n if (!rec) {\n rec = { G: /* @__PURE__ */ new Set(), V: [] };\n recs.push(rec);\n }\n rec.V.push(cp);\n set_add_many(rec.G, gs);\n }\n let union2 = recs.flatMap((x4) => Array_from(x4.G));\n for (let { G, V: V3 } of recs) {\n let complement = new Set(union2.filter((g4) => !G.has(g4)));\n for (let cp of V3) {\n M2.set(cp, complement);\n }\n }\n }\n VALID = /* @__PURE__ */ new Set();\n let multi = /* @__PURE__ */ new Set();\n const add_to_union = (cp) => VALID.has(cp) ? multi.add(cp) : VALID.add(cp);\n for (let g4 of GROUPS) {\n for (let cp of g4.P)\n add_to_union(cp);\n for (let cp of g4.Q)\n add_to_union(cp);\n }\n for (let cp of VALID) {\n if (!WHOLE_MAP.has(cp) && !multi.has(cp)) {\n WHOLE_MAP.set(cp, UNIQUE_PH);\n }\n }\n set_add_many(VALID, nfd(VALID));\n EMOJI_LIST = read_trie(r2).map((v2) => Emoji.from(v2)).sort(compare_arrays);\n EMOJI_ROOT = /* @__PURE__ */ new Map();\n for (let cps of EMOJI_LIST) {\n let prev = [EMOJI_ROOT];\n for (let cp of cps) {\n let next = prev.map((node) => {\n let child = node.get(cp);\n if (!child) {\n child = /* @__PURE__ */ new Map();\n node.set(cp, child);\n }\n return child;\n });\n if (cp === FE0F) {\n prev.push(...next);\n } else {\n prev = next;\n }\n }\n for (let x4 of prev) {\n x4.V = cps;\n }\n }\n }\n function quoted_cp(cp) {\n return (should_escape(cp) ? \"\" : `${bidi_qq(safe_str_from_cps([cp]))} `) + quote_cp(cp);\n }\n function bidi_qq(s4) {\n return `\"${s4}\"\\u200E`;\n }\n function check_label_extension(cps) {\n if (cps.length >= 4 && cps[2] == HYPHEN && cps[3] == HYPHEN) {\n throw new Error(`invalid label extension: \"${str_from_cps(cps.slice(0, 4))}\"`);\n }\n }\n function check_leading_underscore(cps) {\n const UNDERSCORE = 95;\n for (let i3 = cps.lastIndexOf(UNDERSCORE); i3 > 0; ) {\n if (cps[--i3] !== UNDERSCORE) {\n throw new Error(\"underscore allowed only at start\");\n }\n }\n }\n function check_fenced(cps) {\n let cp = cps[0];\n let prev = FENCED.get(cp);\n if (prev)\n throw error_placement(`leading ${prev}`);\n let n2 = cps.length;\n let last = -1;\n for (let i3 = 1; i3 < n2; i3++) {\n cp = cps[i3];\n let match = FENCED.get(cp);\n if (match) {\n if (last == i3)\n throw error_placement(`${prev} + ${match}`);\n last = i3 + 1;\n prev = match;\n }\n }\n if (last == n2)\n throw error_placement(`trailing ${prev}`);\n }\n function safe_str_from_cps(cps, max = Infinity, quoter = quote_cp) {\n let buf = [];\n if (is_combining_mark(cps[0]))\n buf.push(\"\\u25CC\");\n if (cps.length > max) {\n max >>= 1;\n cps = [...cps.slice(0, max), 8230, ...cps.slice(-max)];\n }\n let prev = 0;\n let n2 = cps.length;\n for (let i3 = 0; i3 < n2; i3++) {\n let cp = cps[i3];\n if (should_escape(cp)) {\n buf.push(str_from_cps(cps.slice(prev, i3)));\n buf.push(quoter(cp));\n prev = i3 + 1;\n }\n }\n buf.push(str_from_cps(cps.slice(prev, n2)));\n return buf.join(\"\");\n }\n function is_combining_mark(cp) {\n init();\n return CM.has(cp);\n }\n function should_escape(cp) {\n init();\n return ESCAPE.has(cp);\n }\n function ens_emoji() {\n init();\n return EMOJI_LIST.map((x4) => x4.slice());\n }\n function ens_normalize_fragment(frag, decompose) {\n init();\n let nf = decompose ? nfd : nfc;\n return frag.split(STOP_CH).map((label) => str_from_cps(tokens_from_str(explode_cp(label), nf, filter_fe0f).flat())).join(STOP_CH);\n }\n function ens_normalize(name) {\n return flatten(split4(name, nfc, filter_fe0f));\n }\n function ens_beautify(name) {\n let labels = split4(name, nfc, (x4) => x4);\n for (let { type, output, error } of labels) {\n if (error)\n break;\n if (type !== \"Greek\")\n array_replace(output, 958, 926);\n }\n return flatten(labels);\n }\n function array_replace(v2, a3, b4) {\n let prev = 0;\n while (true) {\n let next = v2.indexOf(a3, prev);\n if (next < 0)\n break;\n v2[next] = b4;\n prev = next + 1;\n }\n }\n function ens_split(name, preserve_emoji) {\n return split4(name, nfc, preserve_emoji ? (x4) => x4.slice() : filter_fe0f);\n }\n function split4(name, nf, ef) {\n if (!name)\n return [];\n init();\n let offset = 0;\n return name.split(STOP_CH).map((label) => {\n let input = explode_cp(label);\n let info = {\n input,\n offset\n // codepoint, not substring!\n };\n offset += input.length + 1;\n try {\n let tokens = info.tokens = tokens_from_str(input, nf, ef);\n let token_count = tokens.length;\n let type;\n if (!token_count) {\n throw new Error(`empty label`);\n }\n let norm = info.output = tokens.flat();\n check_leading_underscore(norm);\n let emoji = info.emoji = token_count > 1 || tokens[0].is_emoji;\n if (!emoji && norm.every((cp) => cp < 128)) {\n check_label_extension(norm);\n type = \"ASCII\";\n } else {\n let chars = tokens.flatMap((x4) => x4.is_emoji ? [] : x4);\n if (!chars.length) {\n type = \"Emoji\";\n } else {\n if (CM.has(norm[0]))\n throw error_placement(\"leading combining mark\");\n for (let i3 = 1; i3 < token_count; i3++) {\n let cps = tokens[i3];\n if (!cps.is_emoji && CM.has(cps[0])) {\n throw error_placement(`emoji + combining mark: \"${str_from_cps(tokens[i3 - 1])} + ${safe_str_from_cps([cps[0]])}\"`);\n }\n }\n check_fenced(norm);\n let unique = Array_from(new Set(chars));\n let [g4] = determine_group(unique);\n check_group(g4, chars);\n check_whole(g4, unique);\n type = g4.N;\n }\n }\n info.type = type;\n } catch (err) {\n info.error = err;\n }\n return info;\n });\n }\n function check_whole(group, unique) {\n let maker;\n let shared = [];\n for (let cp of unique) {\n let whole = WHOLE_MAP.get(cp);\n if (whole === UNIQUE_PH)\n return;\n if (whole) {\n let set = whole.M.get(cp);\n maker = maker ? maker.filter((g4) => set.has(g4)) : Array_from(set);\n if (!maker.length)\n return;\n } else {\n shared.push(cp);\n }\n }\n if (maker) {\n for (let g4 of maker) {\n if (shared.every((cp) => group_has_cp(g4, cp))) {\n throw new Error(`whole-script confusable: ${group.N}/${g4.N}`);\n }\n }\n }\n }\n function determine_group(unique) {\n let groups = GROUPS;\n for (let cp of unique) {\n let gs = groups.filter((g4) => group_has_cp(g4, cp));\n if (!gs.length) {\n if (!GROUPS.some((g4) => group_has_cp(g4, cp))) {\n throw error_disallowed(cp);\n } else {\n throw error_group_member(groups[0], cp);\n }\n }\n groups = gs;\n if (gs.length == 1)\n break;\n }\n return groups;\n }\n function flatten(split5) {\n return split5.map(({ input, error, output }) => {\n if (error) {\n let msg = error.message;\n throw new Error(split5.length == 1 ? msg : `Invalid label ${bidi_qq(safe_str_from_cps(input, 63))}: ${msg}`);\n }\n return str_from_cps(output);\n }).join(STOP_CH);\n }\n function error_disallowed(cp) {\n return new Error(`disallowed character: ${quoted_cp(cp)}`);\n }\n function error_group_member(g4, cp) {\n let quoted = quoted_cp(cp);\n let gg = GROUPS.find((g5) => g5.P.has(cp));\n if (gg) {\n quoted = `${gg.N} ${quoted}`;\n }\n return new Error(`illegal mixture: ${g4.N} + ${quoted}`);\n }\n function error_placement(where) {\n return new Error(`illegal placement: ${where}`);\n }\n function check_group(g4, cps) {\n for (let cp of cps) {\n if (!group_has_cp(g4, cp)) {\n throw error_group_member(g4, cp);\n }\n }\n if (g4.M) {\n let decomposed2 = nfd(cps);\n for (let i3 = 1, e3 = decomposed2.length; i3 < e3; i3++) {\n if (NSM.has(decomposed2[i3])) {\n let j2 = i3 + 1;\n for (let cp; j2 < e3 && NSM.has(cp = decomposed2[j2]); j2++) {\n for (let k4 = i3; k4 < j2; k4++) {\n if (decomposed2[k4] == cp) {\n throw new Error(`duplicate non-spacing marks: ${quoted_cp(cp)}`);\n }\n }\n }\n if (j2 - i3 > NSM_MAX) {\n throw new Error(`excessive non-spacing marks: ${bidi_qq(safe_str_from_cps(decomposed2.slice(i3 - 1, j2)))} (${j2 - i3}/${NSM_MAX})`);\n }\n i3 = j2;\n }\n }\n }\n }\n function tokens_from_str(input, nf, ef) {\n let ret = [];\n let chars = [];\n input = input.slice().reverse();\n while (input.length) {\n let emoji = consume_emoji_reversed(input);\n if (emoji) {\n if (chars.length) {\n ret.push(nf(chars));\n chars = [];\n }\n ret.push(ef(emoji));\n } else {\n let cp = input.pop();\n if (VALID.has(cp)) {\n chars.push(cp);\n } else {\n let cps = MAPPED.get(cp);\n if (cps) {\n chars.push(...cps);\n } else if (!IGNORED.has(cp)) {\n throw error_disallowed(cp);\n }\n }\n }\n }\n if (chars.length) {\n ret.push(nf(chars));\n }\n return ret;\n }\n function filter_fe0f(cps) {\n return cps.filter((cp) => cp != FE0F);\n }\n function consume_emoji_reversed(cps, eaten) {\n let node = EMOJI_ROOT;\n let emoji;\n let pos = cps.length;\n while (pos) {\n node = node.get(cps[--pos]);\n if (!node)\n break;\n let { V: V2 } = node;\n if (V2) {\n emoji = V2;\n if (eaten)\n eaten.push(...cps.slice(pos).reverse());\n cps.length = pos;\n }\n }\n return emoji;\n }\n var TY_VALID = \"valid\";\n var TY_MAPPED = \"mapped\";\n var TY_IGNORED = \"ignored\";\n var TY_DISALLOWED = \"disallowed\";\n var TY_EMOJI = \"emoji\";\n var TY_NFC = \"nfc\";\n var TY_STOP = \"stop\";\n function ens_tokenize(name, {\n nf = true\n // collapse unnormalized runs into a single token\n } = {}) {\n init();\n let input = explode_cp(name).reverse();\n let eaten = [];\n let tokens = [];\n while (input.length) {\n let emoji = consume_emoji_reversed(input, eaten);\n if (emoji) {\n tokens.push({\n type: TY_EMOJI,\n emoji: emoji.slice(),\n // copy emoji\n input: eaten,\n cps: filter_fe0f(emoji)\n });\n eaten = [];\n } else {\n let cp = input.pop();\n if (cp == STOP) {\n tokens.push({ type: TY_STOP, cp });\n } else if (VALID.has(cp)) {\n tokens.push({ type: TY_VALID, cps: [cp] });\n } else if (IGNORED.has(cp)) {\n tokens.push({ type: TY_IGNORED, cp });\n } else {\n let cps = MAPPED.get(cp);\n if (cps) {\n tokens.push({ type: TY_MAPPED, cp, cps: cps.slice() });\n } else {\n tokens.push({ type: TY_DISALLOWED, cp });\n }\n }\n }\n }\n if (nf) {\n for (let i3 = 0, start = -1; i3 < tokens.length; i3++) {\n let token = tokens[i3];\n if (is_valid_or_mapped(token.type)) {\n if (requires_check(token.cps)) {\n let end = i3 + 1;\n for (let pos = end; pos < tokens.length; pos++) {\n let { type, cps: cps2 } = tokens[pos];\n if (is_valid_or_mapped(type)) {\n if (!requires_check(cps2))\n break;\n end = pos + 1;\n } else if (type !== TY_IGNORED) {\n break;\n }\n }\n if (start < 0)\n start = i3;\n let slice4 = tokens.slice(start, end);\n let cps0 = slice4.flatMap((x4) => is_valid_or_mapped(x4.type) ? x4.cps : []);\n let cps = nfc(cps0);\n if (compare_arrays(cps, cps0)) {\n tokens.splice(start, end - start, {\n type: TY_NFC,\n input: cps0,\n // there are 3 states: tokens0 ==(process)=> input ==(nfc)=> tokens/cps\n cps,\n tokens0: collapse_valid_tokens(slice4),\n tokens: ens_tokenize(str_from_cps(cps), { nf: false })\n });\n i3 = start;\n } else {\n i3 = end - 1;\n }\n start = -1;\n } else {\n start = i3;\n }\n } else if (token.type !== TY_IGNORED) {\n start = -1;\n }\n }\n }\n return collapse_valid_tokens(tokens);\n }\n function is_valid_or_mapped(type) {\n return type == TY_VALID || type == TY_MAPPED;\n }\n function requires_check(cps) {\n return cps.some((cp) => NFC_CHECK.has(cp));\n }\n function collapse_valid_tokens(tokens) {\n for (let i3 = 0; i3 < tokens.length; i3++) {\n if (tokens[i3].type == TY_VALID) {\n let j2 = i3 + 1;\n while (j2 < tokens.length && tokens[j2].type == TY_VALID)\n j2++;\n tokens.splice(i3, j2 - i3, { type: TY_VALID, cps: tokens.slice(i3, j2).flatMap((x4) => x4.cps) });\n }\n }\n return tokens;\n }\n exports3.ens_beautify = ens_beautify;\n exports3.ens_emoji = ens_emoji;\n exports3.ens_normalize = ens_normalize;\n exports3.ens_normalize_fragment = ens_normalize_fragment;\n exports3.ens_split = ens_split;\n exports3.ens_tokenize = ens_tokenize;\n exports3.is_combining_mark = is_combining_mark;\n exports3.nfc = nfc;\n exports3.nfd = nfd;\n exports3.safe_str_from_cps = safe_str_from_cps;\n exports3.should_escape = should_escape;\n }\n });\n\n // ../../../node_modules/.pnpm/ethers@6.15.0_bufferutil@4.0.9_utf-8-validate@5.0.10/node_modules/ethers/lib.commonjs/hash/namehash.js\n var require_namehash2 = __commonJS({\n \"../../../node_modules/.pnpm/ethers@6.15.0_bufferutil@4.0.9_utf-8-validate@5.0.10/node_modules/ethers/lib.commonjs/hash/namehash.js\"(exports3) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n Object.defineProperty(exports3, \"__esModule\", { value: true });\n exports3.dnsEncode = exports3.namehash = exports3.isValidName = exports3.ensNormalize = void 0;\n var index_js_1 = require_crypto2();\n var index_js_2 = require_utils8();\n var ens_normalize_1 = require_dist();\n var Zeros = new Uint8Array(32);\n Zeros.fill(0);\n function checkComponent(comp) {\n (0, index_js_2.assertArgument)(comp.length !== 0, \"invalid ENS name; empty component\", \"comp\", comp);\n return comp;\n }\n function ensNameSplit(name) {\n const bytes = (0, index_js_2.toUtf8Bytes)(ensNormalize(name));\n const comps = [];\n if (name.length === 0) {\n return comps;\n }\n let last = 0;\n for (let i3 = 0; i3 < bytes.length; i3++) {\n const d5 = bytes[i3];\n if (d5 === 46) {\n comps.push(checkComponent(bytes.slice(last, i3)));\n last = i3 + 1;\n }\n }\n (0, index_js_2.assertArgument)(last < bytes.length, \"invalid ENS name; empty component\", \"name\", name);\n comps.push(checkComponent(bytes.slice(last)));\n return comps;\n }\n function ensNormalize(name) {\n try {\n if (name.length === 0) {\n throw new Error(\"empty label\");\n }\n return (0, ens_normalize_1.ens_normalize)(name);\n } catch (error) {\n (0, index_js_2.assertArgument)(false, `invalid ENS name (${error.message})`, \"name\", name);\n }\n }\n exports3.ensNormalize = ensNormalize;\n function isValidName(name) {\n try {\n return ensNameSplit(name).length !== 0;\n } catch (error) {\n }\n return false;\n }\n exports3.isValidName = isValidName;\n function namehash2(name) {\n (0, index_js_2.assertArgument)(typeof name === \"string\", \"invalid ENS name; not a string\", \"name\", name);\n (0, index_js_2.assertArgument)(name.length, `invalid ENS name (empty label)`, \"name\", name);\n let result = Zeros;\n const comps = ensNameSplit(name);\n while (comps.length) {\n result = (0, index_js_1.keccak256)((0, index_js_2.concat)([result, (0, index_js_1.keccak256)(comps.pop())]));\n }\n return (0, index_js_2.hexlify)(result);\n }\n exports3.namehash = namehash2;\n function dnsEncode(name, _maxLength) {\n const length2 = _maxLength != null ? _maxLength : 63;\n (0, index_js_2.assertArgument)(length2 <= 255, \"DNS encoded label cannot exceed 255\", \"length\", length2);\n return (0, index_js_2.hexlify)((0, index_js_2.concat)(ensNameSplit(name).map((comp) => {\n (0, index_js_2.assertArgument)(comp.length <= length2, `label ${JSON.stringify(name)} exceeds ${length2} bytes`, \"name\", name);\n const bytes = new Uint8Array(comp.length + 1);\n bytes.set(comp, 1);\n bytes[0] = bytes.length - 1;\n return bytes;\n }))) + \"00\";\n }\n exports3.dnsEncode = dnsEncode;\n }\n });\n\n // ../../../node_modules/.pnpm/ethers@6.15.0_bufferutil@4.0.9_utf-8-validate@5.0.10/node_modules/ethers/lib.commonjs/hash/message.js\n var require_message2 = __commonJS({\n \"../../../node_modules/.pnpm/ethers@6.15.0_bufferutil@4.0.9_utf-8-validate@5.0.10/node_modules/ethers/lib.commonjs/hash/message.js\"(exports3) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n Object.defineProperty(exports3, \"__esModule\", { value: true });\n exports3.verifyMessage = exports3.hashMessage = void 0;\n var index_js_1 = require_crypto2();\n var index_js_2 = require_constants5();\n var index_js_3 = require_transaction2();\n var index_js_4 = require_utils8();\n function hashMessage2(message) {\n if (typeof message === \"string\") {\n message = (0, index_js_4.toUtf8Bytes)(message);\n }\n return (0, index_js_1.keccak256)((0, index_js_4.concat)([\n (0, index_js_4.toUtf8Bytes)(index_js_2.MessagePrefix),\n (0, index_js_4.toUtf8Bytes)(String(message.length)),\n message\n ]));\n }\n exports3.hashMessage = hashMessage2;\n function verifyMessage2(message, sig) {\n const digest = hashMessage2(message);\n return (0, index_js_3.recoverAddress)(digest, sig);\n }\n exports3.verifyMessage = verifyMessage2;\n }\n });\n\n // ../../../node_modules/.pnpm/ethers@6.15.0_bufferutil@4.0.9_utf-8-validate@5.0.10/node_modules/ethers/lib.commonjs/hash/solidity.js\n var require_solidity = __commonJS({\n \"../../../node_modules/.pnpm/ethers@6.15.0_bufferutil@4.0.9_utf-8-validate@5.0.10/node_modules/ethers/lib.commonjs/hash/solidity.js\"(exports3) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n Object.defineProperty(exports3, \"__esModule\", { value: true });\n exports3.solidityPackedSha256 = exports3.solidityPackedKeccak256 = exports3.solidityPacked = void 0;\n var index_js_1 = require_address3();\n var index_js_2 = require_crypto2();\n var index_js_3 = require_utils8();\n var regexBytes = new RegExp(\"^bytes([0-9]+)$\");\n var regexNumber = new RegExp(\"^(u?int)([0-9]*)$\");\n var regexArray = new RegExp(\"^(.*)\\\\[([0-9]*)\\\\]$\");\n function _pack(type, value, isArray) {\n switch (type) {\n case \"address\":\n if (isArray) {\n return (0, index_js_3.getBytes)((0, index_js_3.zeroPadValue)(value, 32));\n }\n return (0, index_js_3.getBytes)((0, index_js_1.getAddress)(value));\n case \"string\":\n return (0, index_js_3.toUtf8Bytes)(value);\n case \"bytes\":\n return (0, index_js_3.getBytes)(value);\n case \"bool\":\n value = !!value ? \"0x01\" : \"0x00\";\n if (isArray) {\n return (0, index_js_3.getBytes)((0, index_js_3.zeroPadValue)(value, 32));\n }\n return (0, index_js_3.getBytes)(value);\n }\n let match = type.match(regexNumber);\n if (match) {\n let signed = match[1] === \"int\";\n let size6 = parseInt(match[2] || \"256\");\n (0, index_js_3.assertArgument)((!match[2] || match[2] === String(size6)) && size6 % 8 === 0 && size6 !== 0 && size6 <= 256, \"invalid number type\", \"type\", type);\n if (isArray) {\n size6 = 256;\n }\n if (signed) {\n value = (0, index_js_3.toTwos)(value, size6);\n }\n return (0, index_js_3.getBytes)((0, index_js_3.zeroPadValue)((0, index_js_3.toBeArray)(value), size6 / 8));\n }\n match = type.match(regexBytes);\n if (match) {\n const size6 = parseInt(match[1]);\n (0, index_js_3.assertArgument)(String(size6) === match[1] && size6 !== 0 && size6 <= 32, \"invalid bytes type\", \"type\", type);\n (0, index_js_3.assertArgument)((0, index_js_3.dataLength)(value) === size6, `invalid value for ${type}`, \"value\", value);\n if (isArray) {\n return (0, index_js_3.getBytes)((0, index_js_3.zeroPadBytes)(value, 32));\n }\n return value;\n }\n match = type.match(regexArray);\n if (match && Array.isArray(value)) {\n const baseType = match[1];\n const count = parseInt(match[2] || String(value.length));\n (0, index_js_3.assertArgument)(count === value.length, `invalid array length for ${type}`, \"value\", value);\n const result = [];\n value.forEach(function(value2) {\n result.push(_pack(baseType, value2, true));\n });\n return (0, index_js_3.getBytes)((0, index_js_3.concat)(result));\n }\n (0, index_js_3.assertArgument)(false, \"invalid type\", \"type\", type);\n }\n function solidityPacked(types, values) {\n (0, index_js_3.assertArgument)(types.length === values.length, \"wrong number of values; expected ${ types.length }\", \"values\", values);\n const tight = [];\n types.forEach(function(type, index2) {\n tight.push(_pack(type, values[index2]));\n });\n return (0, index_js_3.hexlify)((0, index_js_3.concat)(tight));\n }\n exports3.solidityPacked = solidityPacked;\n function solidityPackedKeccak256(types, values) {\n return (0, index_js_2.keccak256)(solidityPacked(types, values));\n }\n exports3.solidityPackedKeccak256 = solidityPackedKeccak256;\n function solidityPackedSha256(types, values) {\n return (0, index_js_2.sha256)(solidityPacked(types, values));\n }\n exports3.solidityPackedSha256 = solidityPackedSha256;\n }\n });\n\n // ../../../node_modules/.pnpm/ethers@6.15.0_bufferutil@4.0.9_utf-8-validate@5.0.10/node_modules/ethers/lib.commonjs/hash/typed-data.js\n var require_typed_data2 = __commonJS({\n \"../../../node_modules/.pnpm/ethers@6.15.0_bufferutil@4.0.9_utf-8-validate@5.0.10/node_modules/ethers/lib.commonjs/hash/typed-data.js\"(exports3) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n Object.defineProperty(exports3, \"__esModule\", { value: true });\n exports3.verifyTypedData = exports3.TypedDataEncoder = void 0;\n var index_js_1 = require_address3();\n var index_js_2 = require_crypto2();\n var index_js_3 = require_transaction2();\n var index_js_4 = require_utils8();\n var id_js_1 = require_id2();\n var padding = new Uint8Array(32);\n padding.fill(0);\n var BN__1 = BigInt(-1);\n var BN_0 = BigInt(0);\n var BN_1 = BigInt(1);\n var BN_MAX_UINT256 = BigInt(\"0xffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff\");\n function hexPadRight(value) {\n const bytes = (0, index_js_4.getBytes)(value);\n const padOffset = bytes.length % 32;\n if (padOffset) {\n return (0, index_js_4.concat)([bytes, padding.slice(padOffset)]);\n }\n return (0, index_js_4.hexlify)(bytes);\n }\n var hexTrue = (0, index_js_4.toBeHex)(BN_1, 32);\n var hexFalse = (0, index_js_4.toBeHex)(BN_0, 32);\n var domainFieldTypes = {\n name: \"string\",\n version: \"string\",\n chainId: \"uint256\",\n verifyingContract: \"address\",\n salt: \"bytes32\"\n };\n var domainFieldNames = [\n \"name\",\n \"version\",\n \"chainId\",\n \"verifyingContract\",\n \"salt\"\n ];\n function checkString(key) {\n return function(value) {\n (0, index_js_4.assertArgument)(typeof value === \"string\", `invalid domain value for ${JSON.stringify(key)}`, `domain.${key}`, value);\n return value;\n };\n }\n var domainChecks = {\n name: checkString(\"name\"),\n version: checkString(\"version\"),\n chainId: function(_value) {\n const value = (0, index_js_4.getBigInt)(_value, \"domain.chainId\");\n (0, index_js_4.assertArgument)(value >= 0, \"invalid chain ID\", \"domain.chainId\", _value);\n if (Number.isSafeInteger(value)) {\n return Number(value);\n }\n return (0, index_js_4.toQuantity)(value);\n },\n verifyingContract: function(value) {\n try {\n return (0, index_js_1.getAddress)(value).toLowerCase();\n } catch (error) {\n }\n (0, index_js_4.assertArgument)(false, `invalid domain value \"verifyingContract\"`, \"domain.verifyingContract\", value);\n },\n salt: function(value) {\n const bytes = (0, index_js_4.getBytes)(value, \"domain.salt\");\n (0, index_js_4.assertArgument)(bytes.length === 32, `invalid domain value \"salt\"`, \"domain.salt\", value);\n return (0, index_js_4.hexlify)(bytes);\n }\n };\n function getBaseEncoder(type) {\n {\n const match = type.match(/^(u?)int(\\d+)$/);\n if (match) {\n const signed = match[1] === \"\";\n const width = parseInt(match[2]);\n (0, index_js_4.assertArgument)(width % 8 === 0 && width !== 0 && width <= 256 && match[2] === String(width), \"invalid numeric width\", \"type\", type);\n const boundsUpper = (0, index_js_4.mask)(BN_MAX_UINT256, signed ? width - 1 : width);\n const boundsLower = signed ? (boundsUpper + BN_1) * BN__1 : BN_0;\n return function(_value) {\n const value = (0, index_js_4.getBigInt)(_value, \"value\");\n (0, index_js_4.assertArgument)(value >= boundsLower && value <= boundsUpper, `value out-of-bounds for ${type}`, \"value\", value);\n return (0, index_js_4.toBeHex)(signed ? (0, index_js_4.toTwos)(value, 256) : value, 32);\n };\n }\n }\n {\n const match = type.match(/^bytes(\\d+)$/);\n if (match) {\n const width = parseInt(match[1]);\n (0, index_js_4.assertArgument)(width !== 0 && width <= 32 && match[1] === String(width), \"invalid bytes width\", \"type\", type);\n return function(value) {\n const bytes = (0, index_js_4.getBytes)(value);\n (0, index_js_4.assertArgument)(bytes.length === width, `invalid length for ${type}`, \"value\", value);\n return hexPadRight(value);\n };\n }\n }\n switch (type) {\n case \"address\":\n return function(value) {\n return (0, index_js_4.zeroPadValue)((0, index_js_1.getAddress)(value), 32);\n };\n case \"bool\":\n return function(value) {\n return !value ? hexFalse : hexTrue;\n };\n case \"bytes\":\n return function(value) {\n return (0, index_js_2.keccak256)(value);\n };\n case \"string\":\n return function(value) {\n return (0, id_js_1.id)(value);\n };\n }\n return null;\n }\n function encodeType2(name, fields) {\n return `${name}(${fields.map(({ name: name2, type }) => type + \" \" + name2).join(\",\")})`;\n }\n function splitArray(type) {\n const match = type.match(/^([^\\x5b]*)((\\x5b\\d*\\x5d)*)(\\x5b(\\d*)\\x5d)$/);\n if (match) {\n return {\n base: match[1],\n index: match[2] + match[4],\n array: {\n base: match[1],\n prefix: match[1] + match[2],\n count: match[5] ? parseInt(match[5]) : -1\n }\n };\n }\n return { base: type };\n }\n var TypedDataEncoder = class _TypedDataEncoder {\n /**\n * The primary type for the structured [[types]].\n *\n * This is derived automatically from the [[types]], since no\n * recursion is possible, once the DAG for the types is consturcted\n * internally, the primary type must be the only remaining type with\n * no parent nodes.\n */\n primaryType;\n #types;\n /**\n * The types.\n */\n get types() {\n return JSON.parse(this.#types);\n }\n #fullTypes;\n #encoderCache;\n /**\n * Create a new **TypedDataEncoder** for %%types%%.\n *\n * This performs all necessary checking that types are valid and\n * do not violate the [[link-eip-712]] structural constraints as\n * well as computes the [[primaryType]].\n */\n constructor(_types) {\n this.#fullTypes = /* @__PURE__ */ new Map();\n this.#encoderCache = /* @__PURE__ */ new Map();\n const links = /* @__PURE__ */ new Map();\n const parents = /* @__PURE__ */ new Map();\n const subtypes = /* @__PURE__ */ new Map();\n const types = {};\n Object.keys(_types).forEach((type) => {\n types[type] = _types[type].map(({ name, type: type2 }) => {\n let { base: base4, index: index2 } = splitArray(type2);\n if (base4 === \"int\" && !_types[\"int\"]) {\n base4 = \"int256\";\n }\n if (base4 === \"uint\" && !_types[\"uint\"]) {\n base4 = \"uint256\";\n }\n return { name, type: base4 + (index2 || \"\") };\n });\n links.set(type, /* @__PURE__ */ new Set());\n parents.set(type, []);\n subtypes.set(type, /* @__PURE__ */ new Set());\n });\n this.#types = JSON.stringify(types);\n for (const name in types) {\n const uniqueNames = /* @__PURE__ */ new Set();\n for (const field of types[name]) {\n (0, index_js_4.assertArgument)(!uniqueNames.has(field.name), `duplicate variable name ${JSON.stringify(field.name)} in ${JSON.stringify(name)}`, \"types\", _types);\n uniqueNames.add(field.name);\n const baseType = splitArray(field.type).base;\n (0, index_js_4.assertArgument)(baseType !== name, `circular type reference to ${JSON.stringify(baseType)}`, \"types\", _types);\n const encoder6 = getBaseEncoder(baseType);\n if (encoder6) {\n continue;\n }\n (0, index_js_4.assertArgument)(parents.has(baseType), `unknown type ${JSON.stringify(baseType)}`, \"types\", _types);\n parents.get(baseType).push(name);\n links.get(name).add(baseType);\n }\n }\n const primaryTypes = Array.from(parents.keys()).filter((n2) => parents.get(n2).length === 0);\n (0, index_js_4.assertArgument)(primaryTypes.length !== 0, \"missing primary type\", \"types\", _types);\n (0, index_js_4.assertArgument)(primaryTypes.length === 1, `ambiguous primary types or unused types: ${primaryTypes.map((t3) => JSON.stringify(t3)).join(\", \")}`, \"types\", _types);\n (0, index_js_4.defineProperties)(this, { primaryType: primaryTypes[0] });\n function checkCircular(type, found) {\n (0, index_js_4.assertArgument)(!found.has(type), `circular type reference to ${JSON.stringify(type)}`, \"types\", _types);\n found.add(type);\n for (const child of links.get(type)) {\n if (!parents.has(child)) {\n continue;\n }\n checkCircular(child, found);\n for (const subtype of found) {\n subtypes.get(subtype).add(child);\n }\n }\n found.delete(type);\n }\n checkCircular(this.primaryType, /* @__PURE__ */ new Set());\n for (const [name, set] of subtypes) {\n const st = Array.from(set);\n st.sort();\n this.#fullTypes.set(name, encodeType2(name, types[name]) + st.map((t3) => encodeType2(t3, types[t3])).join(\"\"));\n }\n }\n /**\n * Returnthe encoder for the specific %%type%%.\n */\n getEncoder(type) {\n let encoder6 = this.#encoderCache.get(type);\n if (!encoder6) {\n encoder6 = this.#getEncoder(type);\n this.#encoderCache.set(type, encoder6);\n }\n return encoder6;\n }\n #getEncoder(type) {\n {\n const encoder6 = getBaseEncoder(type);\n if (encoder6) {\n return encoder6;\n }\n }\n const array2 = splitArray(type).array;\n if (array2) {\n const subtype = array2.prefix;\n const subEncoder = this.getEncoder(subtype);\n return (value) => {\n (0, index_js_4.assertArgument)(array2.count === -1 || array2.count === value.length, `array length mismatch; expected length ${array2.count}`, \"value\", value);\n let result = value.map(subEncoder);\n if (this.#fullTypes.has(subtype)) {\n result = result.map(index_js_2.keccak256);\n }\n return (0, index_js_2.keccak256)((0, index_js_4.concat)(result));\n };\n }\n const fields = this.types[type];\n if (fields) {\n const encodedType = (0, id_js_1.id)(this.#fullTypes.get(type));\n return (value) => {\n const values = fields.map(({ name, type: type2 }) => {\n const result = this.getEncoder(type2)(value[name]);\n if (this.#fullTypes.has(type2)) {\n return (0, index_js_2.keccak256)(result);\n }\n return result;\n });\n values.unshift(encodedType);\n return (0, index_js_4.concat)(values);\n };\n }\n (0, index_js_4.assertArgument)(false, `unknown type: ${type}`, \"type\", type);\n }\n /**\n * Return the full type for %%name%%.\n */\n encodeType(name) {\n const result = this.#fullTypes.get(name);\n (0, index_js_4.assertArgument)(result, `unknown type: ${JSON.stringify(name)}`, \"name\", name);\n return result;\n }\n /**\n * Return the encoded %%value%% for the %%type%%.\n */\n encodeData(type, value) {\n return this.getEncoder(type)(value);\n }\n /**\n * Returns the hash of %%value%% for the type of %%name%%.\n */\n hashStruct(name, value) {\n return (0, index_js_2.keccak256)(this.encodeData(name, value));\n }\n /**\n * Return the fulled encoded %%value%% for the [[types]].\n */\n encode(value) {\n return this.encodeData(this.primaryType, value);\n }\n /**\n * Return the hash of the fully encoded %%value%% for the [[types]].\n */\n hash(value) {\n return this.hashStruct(this.primaryType, value);\n }\n /**\n * @_ignore:\n */\n _visit(type, value, callback) {\n {\n const encoder6 = getBaseEncoder(type);\n if (encoder6) {\n return callback(type, value);\n }\n }\n const array2 = splitArray(type).array;\n if (array2) {\n (0, index_js_4.assertArgument)(array2.count === -1 || array2.count === value.length, `array length mismatch; expected length ${array2.count}`, \"value\", value);\n return value.map((v2) => this._visit(array2.prefix, v2, callback));\n }\n const fields = this.types[type];\n if (fields) {\n return fields.reduce((accum, { name, type: type2 }) => {\n accum[name] = this._visit(type2, value[name], callback);\n return accum;\n }, {});\n }\n (0, index_js_4.assertArgument)(false, `unknown type: ${type}`, \"type\", type);\n }\n /**\n * Call %%calback%% for each value in %%value%%, passing the type and\n * component within %%value%%.\n *\n * This is useful for replacing addresses or other transformation that\n * may be desired on each component, based on its type.\n */\n visit(value, callback) {\n return this._visit(this.primaryType, value, callback);\n }\n /**\n * Create a new **TypedDataEncoder** for %%types%%.\n */\n static from(types) {\n return new _TypedDataEncoder(types);\n }\n /**\n * Return the primary type for %%types%%.\n */\n static getPrimaryType(types) {\n return _TypedDataEncoder.from(types).primaryType;\n }\n /**\n * Return the hashed struct for %%value%% using %%types%% and %%name%%.\n */\n static hashStruct(name, types, value) {\n return _TypedDataEncoder.from(types).hashStruct(name, value);\n }\n /**\n * Return the domain hash for %%domain%%.\n */\n static hashDomain(domain2) {\n const domainFields = [];\n for (const name in domain2) {\n if (domain2[name] == null) {\n continue;\n }\n const type = domainFieldTypes[name];\n (0, index_js_4.assertArgument)(type, `invalid typed-data domain key: ${JSON.stringify(name)}`, \"domain\", domain2);\n domainFields.push({ name, type });\n }\n domainFields.sort((a3, b4) => {\n return domainFieldNames.indexOf(a3.name) - domainFieldNames.indexOf(b4.name);\n });\n return _TypedDataEncoder.hashStruct(\"EIP712Domain\", { EIP712Domain: domainFields }, domain2);\n }\n /**\n * Return the fully encoded [[link-eip-712]] %%value%% for %%types%% with %%domain%%.\n */\n static encode(domain2, types, value) {\n return (0, index_js_4.concat)([\n \"0x1901\",\n _TypedDataEncoder.hashDomain(domain2),\n _TypedDataEncoder.from(types).hash(value)\n ]);\n }\n /**\n * Return the hash of the fully encoded [[link-eip-712]] %%value%% for %%types%% with %%domain%%.\n */\n static hash(domain2, types, value) {\n return (0, index_js_2.keccak256)(_TypedDataEncoder.encode(domain2, types, value));\n }\n // Replaces all address types with ENS names with their looked up address\n /**\n * Resolves to the value from resolving all addresses in %%value%% for\n * %%types%% and the %%domain%%.\n */\n static async resolveNames(domain2, types, value, resolveName) {\n domain2 = Object.assign({}, domain2);\n for (const key in domain2) {\n if (domain2[key] == null) {\n delete domain2[key];\n }\n }\n const ensCache = {};\n if (domain2.verifyingContract && !(0, index_js_4.isHexString)(domain2.verifyingContract, 20)) {\n ensCache[domain2.verifyingContract] = \"0x\";\n }\n const encoder6 = _TypedDataEncoder.from(types);\n encoder6.visit(value, (type, value2) => {\n if (type === \"address\" && !(0, index_js_4.isHexString)(value2, 20)) {\n ensCache[value2] = \"0x\";\n }\n return value2;\n });\n for (const name in ensCache) {\n ensCache[name] = await resolveName(name);\n }\n if (domain2.verifyingContract && ensCache[domain2.verifyingContract]) {\n domain2.verifyingContract = ensCache[domain2.verifyingContract];\n }\n value = encoder6.visit(value, (type, value2) => {\n if (type === \"address\" && ensCache[value2]) {\n return ensCache[value2];\n }\n return value2;\n });\n return { domain: domain2, value };\n }\n /**\n * Returns the JSON-encoded payload expected by nodes which implement\n * the JSON-RPC [[link-eip-712]] method.\n */\n static getPayload(domain2, types, value) {\n _TypedDataEncoder.hashDomain(domain2);\n const domainValues = {};\n const domainTypes = [];\n domainFieldNames.forEach((name) => {\n const value2 = domain2[name];\n if (value2 == null) {\n return;\n }\n domainValues[name] = domainChecks[name](value2);\n domainTypes.push({ name, type: domainFieldTypes[name] });\n });\n const encoder6 = _TypedDataEncoder.from(types);\n types = encoder6.types;\n const typesWithDomain = Object.assign({}, types);\n (0, index_js_4.assertArgument)(typesWithDomain.EIP712Domain == null, \"types must not contain EIP712Domain type\", \"types.EIP712Domain\", types);\n typesWithDomain.EIP712Domain = domainTypes;\n encoder6.encode(value);\n return {\n types: typesWithDomain,\n domain: domainValues,\n primaryType: encoder6.primaryType,\n message: encoder6.visit(value, (type, value2) => {\n if (type.match(/^bytes(\\d*)/)) {\n return (0, index_js_4.hexlify)((0, index_js_4.getBytes)(value2));\n }\n if (type.match(/^u?int/)) {\n return (0, index_js_4.getBigInt)(value2).toString();\n }\n switch (type) {\n case \"address\":\n return value2.toLowerCase();\n case \"bool\":\n return !!value2;\n case \"string\":\n (0, index_js_4.assertArgument)(typeof value2 === \"string\", \"invalid string\", \"value\", value2);\n return value2;\n }\n (0, index_js_4.assertArgument)(false, \"unsupported type\", \"type\", type);\n })\n };\n }\n };\n exports3.TypedDataEncoder = TypedDataEncoder;\n function verifyTypedData2(domain2, types, value, signature) {\n return (0, index_js_3.recoverAddress)(TypedDataEncoder.hash(domain2, types, value), signature);\n }\n exports3.verifyTypedData = verifyTypedData2;\n }\n });\n\n // ../../../node_modules/.pnpm/ethers@6.15.0_bufferutil@4.0.9_utf-8-validate@5.0.10/node_modules/ethers/lib.commonjs/hash/index.js\n var require_hash2 = __commonJS({\n \"../../../node_modules/.pnpm/ethers@6.15.0_bufferutil@4.0.9_utf-8-validate@5.0.10/node_modules/ethers/lib.commonjs/hash/index.js\"(exports3) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n Object.defineProperty(exports3, \"__esModule\", { value: true });\n exports3.verifyTypedData = exports3.TypedDataEncoder = exports3.solidityPackedSha256 = exports3.solidityPackedKeccak256 = exports3.solidityPacked = exports3.verifyMessage = exports3.hashMessage = exports3.dnsEncode = exports3.namehash = exports3.isValidName = exports3.ensNormalize = exports3.id = exports3.verifyAuthorization = exports3.hashAuthorization = void 0;\n var authorization_js_1 = require_authorization2();\n Object.defineProperty(exports3, \"hashAuthorization\", { enumerable: true, get: function() {\n return authorization_js_1.hashAuthorization;\n } });\n Object.defineProperty(exports3, \"verifyAuthorization\", { enumerable: true, get: function() {\n return authorization_js_1.verifyAuthorization;\n } });\n var id_js_1 = require_id2();\n Object.defineProperty(exports3, \"id\", { enumerable: true, get: function() {\n return id_js_1.id;\n } });\n var namehash_js_1 = require_namehash2();\n Object.defineProperty(exports3, \"ensNormalize\", { enumerable: true, get: function() {\n return namehash_js_1.ensNormalize;\n } });\n Object.defineProperty(exports3, \"isValidName\", { enumerable: true, get: function() {\n return namehash_js_1.isValidName;\n } });\n Object.defineProperty(exports3, \"namehash\", { enumerable: true, get: function() {\n return namehash_js_1.namehash;\n } });\n Object.defineProperty(exports3, \"dnsEncode\", { enumerable: true, get: function() {\n return namehash_js_1.dnsEncode;\n } });\n var message_js_1 = require_message2();\n Object.defineProperty(exports3, \"hashMessage\", { enumerable: true, get: function() {\n return message_js_1.hashMessage;\n } });\n Object.defineProperty(exports3, \"verifyMessage\", { enumerable: true, get: function() {\n return message_js_1.verifyMessage;\n } });\n var solidity_js_1 = require_solidity();\n Object.defineProperty(exports3, \"solidityPacked\", { enumerable: true, get: function() {\n return solidity_js_1.solidityPacked;\n } });\n Object.defineProperty(exports3, \"solidityPackedKeccak256\", { enumerable: true, get: function() {\n return solidity_js_1.solidityPackedKeccak256;\n } });\n Object.defineProperty(exports3, \"solidityPackedSha256\", { enumerable: true, get: function() {\n return solidity_js_1.solidityPackedSha256;\n } });\n var typed_data_js_1 = require_typed_data2();\n Object.defineProperty(exports3, \"TypedDataEncoder\", { enumerable: true, get: function() {\n return typed_data_js_1.TypedDataEncoder;\n } });\n Object.defineProperty(exports3, \"verifyTypedData\", { enumerable: true, get: function() {\n return typed_data_js_1.verifyTypedData;\n } });\n }\n });\n\n // ../../../node_modules/.pnpm/ethers@6.15.0_bufferutil@4.0.9_utf-8-validate@5.0.10/node_modules/ethers/lib.commonjs/abi/fragments.js\n var require_fragments2 = __commonJS({\n \"../../../node_modules/.pnpm/ethers@6.15.0_bufferutil@4.0.9_utf-8-validate@5.0.10/node_modules/ethers/lib.commonjs/abi/fragments.js\"(exports3) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n Object.defineProperty(exports3, \"__esModule\", { value: true });\n exports3.StructFragment = exports3.FunctionFragment = exports3.FallbackFragment = exports3.ConstructorFragment = exports3.EventFragment = exports3.ErrorFragment = exports3.NamedFragment = exports3.Fragment = exports3.ParamType = void 0;\n var index_js_1 = require_utils8();\n var index_js_2 = require_hash2();\n function setify(items) {\n const result = /* @__PURE__ */ new Set();\n items.forEach((k4) => result.add(k4));\n return Object.freeze(result);\n }\n var _kwVisibDeploy = \"external public payable override\";\n var KwVisibDeploy = setify(_kwVisibDeploy.split(\" \"));\n var _kwVisib = \"constant external internal payable private public pure view override\";\n var KwVisib = setify(_kwVisib.split(\" \"));\n var _kwTypes = \"constructor error event fallback function receive struct\";\n var KwTypes = setify(_kwTypes.split(\" \"));\n var _kwModifiers = \"calldata memory storage payable indexed\";\n var KwModifiers = setify(_kwModifiers.split(\" \"));\n var _kwOther = \"tuple returns\";\n var _keywords = [_kwTypes, _kwModifiers, _kwOther, _kwVisib].join(\" \");\n var Keywords = setify(_keywords.split(\" \"));\n var SimpleTokens = {\n \"(\": \"OPEN_PAREN\",\n \")\": \"CLOSE_PAREN\",\n \"[\": \"OPEN_BRACKET\",\n \"]\": \"CLOSE_BRACKET\",\n \",\": \"COMMA\",\n \"@\": \"AT\"\n };\n var regexWhitespacePrefix = new RegExp(\"^(\\\\s*)\");\n var regexNumberPrefix = new RegExp(\"^([0-9]+)\");\n var regexIdPrefix = new RegExp(\"^([a-zA-Z$_][a-zA-Z0-9$_]*)\");\n var regexId = new RegExp(\"^([a-zA-Z$_][a-zA-Z0-9$_]*)$\");\n var regexType = new RegExp(\"^(address|bool|bytes([0-9]*)|string|u?int([0-9]*))$\");\n var TokenString = class _TokenString {\n #offset;\n #tokens;\n get offset() {\n return this.#offset;\n }\n get length() {\n return this.#tokens.length - this.#offset;\n }\n constructor(tokens) {\n this.#offset = 0;\n this.#tokens = tokens.slice();\n }\n clone() {\n return new _TokenString(this.#tokens);\n }\n reset() {\n this.#offset = 0;\n }\n #subTokenString(from14 = 0, to = 0) {\n return new _TokenString(this.#tokens.slice(from14, to).map((t3) => {\n return Object.freeze(Object.assign({}, t3, {\n match: t3.match - from14,\n linkBack: t3.linkBack - from14,\n linkNext: t3.linkNext - from14\n }));\n }));\n }\n // Pops and returns the value of the next token, if it is a keyword in allowed; throws if out of tokens\n popKeyword(allowed) {\n const top = this.peek();\n if (top.type !== \"KEYWORD\" || !allowed.has(top.text)) {\n throw new Error(`expected keyword ${top.text}`);\n }\n return this.pop().text;\n }\n // Pops and returns the value of the next token if it is `type`; throws if out of tokens\n popType(type) {\n if (this.peek().type !== type) {\n const top = this.peek();\n throw new Error(`expected ${type}; got ${top.type} ${JSON.stringify(top.text)}`);\n }\n return this.pop().text;\n }\n // Pops and returns a \"(\" TOKENS \")\"\n popParen() {\n const top = this.peek();\n if (top.type !== \"OPEN_PAREN\") {\n throw new Error(\"bad start\");\n }\n const result = this.#subTokenString(this.#offset + 1, top.match + 1);\n this.#offset = top.match + 1;\n return result;\n }\n // Pops and returns the items within \"(\" ITEM1 \",\" ITEM2 \",\" ... \")\"\n popParams() {\n const top = this.peek();\n if (top.type !== \"OPEN_PAREN\") {\n throw new Error(\"bad start\");\n }\n const result = [];\n while (this.#offset < top.match - 1) {\n const link = this.peek().linkNext;\n result.push(this.#subTokenString(this.#offset + 1, link));\n this.#offset = link;\n }\n this.#offset = top.match + 1;\n return result;\n }\n // Returns the top Token, throwing if out of tokens\n peek() {\n if (this.#offset >= this.#tokens.length) {\n throw new Error(\"out-of-bounds\");\n }\n return this.#tokens[this.#offset];\n }\n // Returns the next value, if it is a keyword in `allowed`\n peekKeyword(allowed) {\n const top = this.peekType(\"KEYWORD\");\n return top != null && allowed.has(top) ? top : null;\n }\n // Returns the value of the next token if it is `type`\n peekType(type) {\n if (this.length === 0) {\n return null;\n }\n const top = this.peek();\n return top.type === type ? top.text : null;\n }\n // Returns the next token; throws if out of tokens\n pop() {\n const result = this.peek();\n this.#offset++;\n return result;\n }\n toString() {\n const tokens = [];\n for (let i3 = this.#offset; i3 < this.#tokens.length; i3++) {\n const token = this.#tokens[i3];\n tokens.push(`${token.type}:${token.text}`);\n }\n return ``;\n }\n };\n function lex(text) {\n const tokens = [];\n const throwError = (message) => {\n const token = offset < text.length ? JSON.stringify(text[offset]) : \"$EOI\";\n throw new Error(`invalid token ${token} at ${offset}: ${message}`);\n };\n let brackets = [];\n let commas = [];\n let offset = 0;\n while (offset < text.length) {\n let cur = text.substring(offset);\n let match = cur.match(regexWhitespacePrefix);\n if (match) {\n offset += match[1].length;\n cur = text.substring(offset);\n }\n const token = { depth: brackets.length, linkBack: -1, linkNext: -1, match: -1, type: \"\", text: \"\", offset, value: -1 };\n tokens.push(token);\n let type = SimpleTokens[cur[0]] || \"\";\n if (type) {\n token.type = type;\n token.text = cur[0];\n offset++;\n if (type === \"OPEN_PAREN\") {\n brackets.push(tokens.length - 1);\n commas.push(tokens.length - 1);\n } else if (type == \"CLOSE_PAREN\") {\n if (brackets.length === 0) {\n throwError(\"no matching open bracket\");\n }\n token.match = brackets.pop();\n tokens[token.match].match = tokens.length - 1;\n token.depth--;\n token.linkBack = commas.pop();\n tokens[token.linkBack].linkNext = tokens.length - 1;\n } else if (type === \"COMMA\") {\n token.linkBack = commas.pop();\n tokens[token.linkBack].linkNext = tokens.length - 1;\n commas.push(tokens.length - 1);\n } else if (type === \"OPEN_BRACKET\") {\n token.type = \"BRACKET\";\n } else if (type === \"CLOSE_BRACKET\") {\n let suffix = tokens.pop().text;\n if (tokens.length > 0 && tokens[tokens.length - 1].type === \"NUMBER\") {\n const value = tokens.pop().text;\n suffix = value + suffix;\n tokens[tokens.length - 1].value = (0, index_js_1.getNumber)(value);\n }\n if (tokens.length === 0 || tokens[tokens.length - 1].type !== \"BRACKET\") {\n throw new Error(\"missing opening bracket\");\n }\n tokens[tokens.length - 1].text += suffix;\n }\n continue;\n }\n match = cur.match(regexIdPrefix);\n if (match) {\n token.text = match[1];\n offset += token.text.length;\n if (Keywords.has(token.text)) {\n token.type = \"KEYWORD\";\n continue;\n }\n if (token.text.match(regexType)) {\n token.type = \"TYPE\";\n continue;\n }\n token.type = \"ID\";\n continue;\n }\n match = cur.match(regexNumberPrefix);\n if (match) {\n token.text = match[1];\n token.type = \"NUMBER\";\n offset += token.text.length;\n continue;\n }\n throw new Error(`unexpected token ${JSON.stringify(cur[0])} at position ${offset}`);\n }\n return new TokenString(tokens.map((t3) => Object.freeze(t3)));\n }\n function allowSingle(set, allowed) {\n let included = [];\n for (const key in allowed.keys()) {\n if (set.has(key)) {\n included.push(key);\n }\n }\n if (included.length > 1) {\n throw new Error(`conflicting types: ${included.join(\", \")}`);\n }\n }\n function consumeName(type, tokens) {\n if (tokens.peekKeyword(KwTypes)) {\n const keyword = tokens.pop().text;\n if (keyword !== type) {\n throw new Error(`expected ${type}, got ${keyword}`);\n }\n }\n return tokens.popType(\"ID\");\n }\n function consumeKeywords(tokens, allowed) {\n const keywords = /* @__PURE__ */ new Set();\n while (true) {\n const keyword = tokens.peekType(\"KEYWORD\");\n if (keyword == null || allowed && !allowed.has(keyword)) {\n break;\n }\n tokens.pop();\n if (keywords.has(keyword)) {\n throw new Error(`duplicate keywords: ${JSON.stringify(keyword)}`);\n }\n keywords.add(keyword);\n }\n return Object.freeze(keywords);\n }\n function consumeMutability(tokens) {\n let modifiers2 = consumeKeywords(tokens, KwVisib);\n allowSingle(modifiers2, setify(\"constant payable nonpayable\".split(\" \")));\n allowSingle(modifiers2, setify(\"pure view payable nonpayable\".split(\" \")));\n if (modifiers2.has(\"view\")) {\n return \"view\";\n }\n if (modifiers2.has(\"pure\")) {\n return \"pure\";\n }\n if (modifiers2.has(\"payable\")) {\n return \"payable\";\n }\n if (modifiers2.has(\"nonpayable\")) {\n return \"nonpayable\";\n }\n if (modifiers2.has(\"constant\")) {\n return \"view\";\n }\n return \"nonpayable\";\n }\n function consumeParams(tokens, allowIndexed) {\n return tokens.popParams().map((t3) => ParamType.from(t3, allowIndexed));\n }\n function consumeGas(tokens) {\n if (tokens.peekType(\"AT\")) {\n tokens.pop();\n if (tokens.peekType(\"NUMBER\")) {\n return (0, index_js_1.getBigInt)(tokens.pop().text);\n }\n throw new Error(\"invalid gas\");\n }\n return null;\n }\n function consumeEoi(tokens) {\n if (tokens.length) {\n throw new Error(`unexpected tokens at offset ${tokens.offset}: ${tokens.toString()}`);\n }\n }\n var regexArrayType = new RegExp(/^(.*)\\[([0-9]*)\\]$/);\n function verifyBasicType(type) {\n const match = type.match(regexType);\n (0, index_js_1.assertArgument)(match, \"invalid type\", \"type\", type);\n if (type === \"uint\") {\n return \"uint256\";\n }\n if (type === \"int\") {\n return \"int256\";\n }\n if (match[2]) {\n const length2 = parseInt(match[2]);\n (0, index_js_1.assertArgument)(length2 !== 0 && length2 <= 32, \"invalid bytes length\", \"type\", type);\n } else if (match[3]) {\n const size6 = parseInt(match[3]);\n (0, index_js_1.assertArgument)(size6 !== 0 && size6 <= 256 && size6 % 8 === 0, \"invalid numeric width\", \"type\", type);\n }\n return type;\n }\n var _guard = {};\n var internal = Symbol.for(\"_ethers_internal\");\n var ParamTypeInternal = \"_ParamTypeInternal\";\n var ErrorFragmentInternal = \"_ErrorInternal\";\n var EventFragmentInternal = \"_EventInternal\";\n var ConstructorFragmentInternal = \"_ConstructorInternal\";\n var FallbackFragmentInternal = \"_FallbackInternal\";\n var FunctionFragmentInternal = \"_FunctionInternal\";\n var StructFragmentInternal = \"_StructInternal\";\n var ParamType = class _ParamType {\n /**\n * The local name of the parameter (or ``\"\"`` if unbound)\n */\n name;\n /**\n * The fully qualified type (e.g. ``\"address\"``, ``\"tuple(address)\"``,\n * ``\"uint256[3][]\"``)\n */\n type;\n /**\n * The base type (e.g. ``\"address\"``, ``\"tuple\"``, ``\"array\"``)\n */\n baseType;\n /**\n * True if the parameters is indexed.\n *\n * For non-indexable types this is ``null``.\n */\n indexed;\n /**\n * The components for the tuple.\n *\n * For non-tuple types this is ``null``.\n */\n components;\n /**\n * The array length, or ``-1`` for dynamic-lengthed arrays.\n *\n * For non-array types this is ``null``.\n */\n arrayLength;\n /**\n * The type of each child in the array.\n *\n * For non-array types this is ``null``.\n */\n arrayChildren;\n /**\n * @private\n */\n constructor(guard, name, type, baseType, indexed, components, arrayLength, arrayChildren) {\n (0, index_js_1.assertPrivate)(guard, _guard, \"ParamType\");\n Object.defineProperty(this, internal, { value: ParamTypeInternal });\n if (components) {\n components = Object.freeze(components.slice());\n }\n if (baseType === \"array\") {\n if (arrayLength == null || arrayChildren == null) {\n throw new Error(\"\");\n }\n } else if (arrayLength != null || arrayChildren != null) {\n throw new Error(\"\");\n }\n if (baseType === \"tuple\") {\n if (components == null) {\n throw new Error(\"\");\n }\n } else if (components != null) {\n throw new Error(\"\");\n }\n (0, index_js_1.defineProperties)(this, {\n name,\n type,\n baseType,\n indexed,\n components,\n arrayLength,\n arrayChildren\n });\n }\n /**\n * Return a string representation of this type.\n *\n * For example,\n *\n * ``sighash\" => \"(uint256,address)\"``\n *\n * ``\"minimal\" => \"tuple(uint256,address) indexed\"``\n *\n * ``\"full\" => \"tuple(uint256 foo, address bar) indexed baz\"``\n */\n format(format) {\n if (format == null) {\n format = \"sighash\";\n }\n if (format === \"json\") {\n const name = this.name || \"\";\n if (this.isArray()) {\n const result3 = JSON.parse(this.arrayChildren.format(\"json\"));\n result3.name = name;\n result3.type += `[${this.arrayLength < 0 ? \"\" : String(this.arrayLength)}]`;\n return JSON.stringify(result3);\n }\n const result2 = {\n type: this.baseType === \"tuple\" ? \"tuple\" : this.type,\n name\n };\n if (typeof this.indexed === \"boolean\") {\n result2.indexed = this.indexed;\n }\n if (this.isTuple()) {\n result2.components = this.components.map((c4) => JSON.parse(c4.format(format)));\n }\n return JSON.stringify(result2);\n }\n let result = \"\";\n if (this.isArray()) {\n result += this.arrayChildren.format(format);\n result += `[${this.arrayLength < 0 ? \"\" : String(this.arrayLength)}]`;\n } else {\n if (this.isTuple()) {\n result += \"(\" + this.components.map((comp) => comp.format(format)).join(format === \"full\" ? \", \" : \",\") + \")\";\n } else {\n result += this.type;\n }\n }\n if (format !== \"sighash\") {\n if (this.indexed === true) {\n result += \" indexed\";\n }\n if (format === \"full\" && this.name) {\n result += \" \" + this.name;\n }\n }\n return result;\n }\n /**\n * Returns true if %%this%% is an Array type.\n *\n * This provides a type gaurd ensuring that [[arrayChildren]]\n * and [[arrayLength]] are non-null.\n */\n isArray() {\n return this.baseType === \"array\";\n }\n /**\n * Returns true if %%this%% is a Tuple type.\n *\n * This provides a type gaurd ensuring that [[components]]\n * is non-null.\n */\n isTuple() {\n return this.baseType === \"tuple\";\n }\n /**\n * Returns true if %%this%% is an Indexable type.\n *\n * This provides a type gaurd ensuring that [[indexed]]\n * is non-null.\n */\n isIndexable() {\n return this.indexed != null;\n }\n /**\n * Walks the **ParamType** with %%value%%, calling %%process%%\n * on each type, destructing the %%value%% recursively.\n */\n walk(value, process2) {\n if (this.isArray()) {\n if (!Array.isArray(value)) {\n throw new Error(\"invalid array value\");\n }\n if (this.arrayLength !== -1 && value.length !== this.arrayLength) {\n throw new Error(\"array is wrong length\");\n }\n const _this = this;\n return value.map((v2) => _this.arrayChildren.walk(v2, process2));\n }\n if (this.isTuple()) {\n if (!Array.isArray(value)) {\n throw new Error(\"invalid tuple value\");\n }\n if (value.length !== this.components.length) {\n throw new Error(\"array is wrong length\");\n }\n const _this = this;\n return value.map((v2, i3) => _this.components[i3].walk(v2, process2));\n }\n return process2(this.type, value);\n }\n #walkAsync(promises, value, process2, setValue) {\n if (this.isArray()) {\n if (!Array.isArray(value)) {\n throw new Error(\"invalid array value\");\n }\n if (this.arrayLength !== -1 && value.length !== this.arrayLength) {\n throw new Error(\"array is wrong length\");\n }\n const childType = this.arrayChildren;\n const result2 = value.slice();\n result2.forEach((value2, index2) => {\n childType.#walkAsync(promises, value2, process2, (value3) => {\n result2[index2] = value3;\n });\n });\n setValue(result2);\n return;\n }\n if (this.isTuple()) {\n const components = this.components;\n let result2;\n if (Array.isArray(value)) {\n result2 = value.slice();\n } else {\n if (value == null || typeof value !== \"object\") {\n throw new Error(\"invalid tuple value\");\n }\n result2 = components.map((param) => {\n if (!param.name) {\n throw new Error(\"cannot use object value with unnamed components\");\n }\n if (!(param.name in value)) {\n throw new Error(`missing value for component ${param.name}`);\n }\n return value[param.name];\n });\n }\n if (result2.length !== this.components.length) {\n throw new Error(\"array is wrong length\");\n }\n result2.forEach((value2, index2) => {\n components[index2].#walkAsync(promises, value2, process2, (value3) => {\n result2[index2] = value3;\n });\n });\n setValue(result2);\n return;\n }\n const result = process2(this.type, value);\n if (result.then) {\n promises.push(async function() {\n setValue(await result);\n }());\n } else {\n setValue(result);\n }\n }\n /**\n * Walks the **ParamType** with %%value%%, asynchronously calling\n * %%process%% on each type, destructing the %%value%% recursively.\n *\n * This can be used to resolve ENS names by walking and resolving each\n * ``\"address\"`` type.\n */\n async walkAsync(value, process2) {\n const promises = [];\n const result = [value];\n this.#walkAsync(promises, value, process2, (value2) => {\n result[0] = value2;\n });\n if (promises.length) {\n await Promise.all(promises);\n }\n return result[0];\n }\n /**\n * Creates a new **ParamType** for %%obj%%.\n *\n * If %%allowIndexed%% then the ``indexed`` keyword is permitted,\n * otherwise the ``indexed`` keyword will throw an error.\n */\n static from(obj, allowIndexed) {\n if (_ParamType.isParamType(obj)) {\n return obj;\n }\n if (typeof obj === \"string\") {\n try {\n return _ParamType.from(lex(obj), allowIndexed);\n } catch (error) {\n (0, index_js_1.assertArgument)(false, \"invalid param type\", \"obj\", obj);\n }\n } else if (obj instanceof TokenString) {\n let type2 = \"\", baseType = \"\";\n let comps = null;\n if (consumeKeywords(obj, setify([\"tuple\"])).has(\"tuple\") || obj.peekType(\"OPEN_PAREN\")) {\n baseType = \"tuple\";\n comps = obj.popParams().map((t3) => _ParamType.from(t3));\n type2 = `tuple(${comps.map((c4) => c4.format()).join(\",\")})`;\n } else {\n type2 = verifyBasicType(obj.popType(\"TYPE\"));\n baseType = type2;\n }\n let arrayChildren = null;\n let arrayLength = null;\n while (obj.length && obj.peekType(\"BRACKET\")) {\n const bracket = obj.pop();\n arrayChildren = new _ParamType(_guard, \"\", type2, baseType, null, comps, arrayLength, arrayChildren);\n arrayLength = bracket.value;\n type2 += bracket.text;\n baseType = \"array\";\n comps = null;\n }\n let indexed2 = null;\n const keywords = consumeKeywords(obj, KwModifiers);\n if (keywords.has(\"indexed\")) {\n if (!allowIndexed) {\n throw new Error(\"\");\n }\n indexed2 = true;\n }\n const name2 = obj.peekType(\"ID\") ? obj.pop().text : \"\";\n if (obj.length) {\n throw new Error(\"leftover tokens\");\n }\n return new _ParamType(_guard, name2, type2, baseType, indexed2, comps, arrayLength, arrayChildren);\n }\n const name = obj.name;\n (0, index_js_1.assertArgument)(!name || typeof name === \"string\" && name.match(regexId), \"invalid name\", \"obj.name\", name);\n let indexed = obj.indexed;\n if (indexed != null) {\n (0, index_js_1.assertArgument)(allowIndexed, \"parameter cannot be indexed\", \"obj.indexed\", obj.indexed);\n indexed = !!indexed;\n }\n let type = obj.type;\n let arrayMatch = type.match(regexArrayType);\n if (arrayMatch) {\n const arrayLength = parseInt(arrayMatch[2] || \"-1\");\n const arrayChildren = _ParamType.from({\n type: arrayMatch[1],\n components: obj.components\n });\n return new _ParamType(_guard, name || \"\", type, \"array\", indexed, null, arrayLength, arrayChildren);\n }\n if (type === \"tuple\" || type.startsWith(\n \"tuple(\"\n /* fix: ) */\n ) || type.startsWith(\n \"(\"\n /* fix: ) */\n )) {\n const comps = obj.components != null ? obj.components.map((c4) => _ParamType.from(c4)) : null;\n const tuple2 = new _ParamType(_guard, name || \"\", type, \"tuple\", indexed, comps, null, null);\n return tuple2;\n }\n type = verifyBasicType(obj.type);\n return new _ParamType(_guard, name || \"\", type, type, indexed, null, null, null);\n }\n /**\n * Returns true if %%value%% is a **ParamType**.\n */\n static isParamType(value) {\n return value && value[internal] === ParamTypeInternal;\n }\n };\n exports3.ParamType = ParamType;\n var Fragment = class _Fragment {\n /**\n * The type of the fragment.\n */\n type;\n /**\n * The inputs for the fragment.\n */\n inputs;\n /**\n * @private\n */\n constructor(guard, type, inputs) {\n (0, index_js_1.assertPrivate)(guard, _guard, \"Fragment\");\n inputs = Object.freeze(inputs.slice());\n (0, index_js_1.defineProperties)(this, { type, inputs });\n }\n /**\n * Creates a new **Fragment** for %%obj%%, wich can be any supported\n * ABI frgament type.\n */\n static from(obj) {\n if (typeof obj === \"string\") {\n try {\n _Fragment.from(JSON.parse(obj));\n } catch (e3) {\n }\n return _Fragment.from(lex(obj));\n }\n if (obj instanceof TokenString) {\n const type = obj.peekKeyword(KwTypes);\n switch (type) {\n case \"constructor\":\n return ConstructorFragment.from(obj);\n case \"error\":\n return ErrorFragment.from(obj);\n case \"event\":\n return EventFragment.from(obj);\n case \"fallback\":\n case \"receive\":\n return FallbackFragment.from(obj);\n case \"function\":\n return FunctionFragment.from(obj);\n case \"struct\":\n return StructFragment.from(obj);\n }\n } else if (typeof obj === \"object\") {\n switch (obj.type) {\n case \"constructor\":\n return ConstructorFragment.from(obj);\n case \"error\":\n return ErrorFragment.from(obj);\n case \"event\":\n return EventFragment.from(obj);\n case \"fallback\":\n case \"receive\":\n return FallbackFragment.from(obj);\n case \"function\":\n return FunctionFragment.from(obj);\n case \"struct\":\n return StructFragment.from(obj);\n }\n (0, index_js_1.assert)(false, `unsupported type: ${obj.type}`, \"UNSUPPORTED_OPERATION\", {\n operation: \"Fragment.from\"\n });\n }\n (0, index_js_1.assertArgument)(false, \"unsupported frgament object\", \"obj\", obj);\n }\n /**\n * Returns true if %%value%% is a [[ConstructorFragment]].\n */\n static isConstructor(value) {\n return ConstructorFragment.isFragment(value);\n }\n /**\n * Returns true if %%value%% is an [[ErrorFragment]].\n */\n static isError(value) {\n return ErrorFragment.isFragment(value);\n }\n /**\n * Returns true if %%value%% is an [[EventFragment]].\n */\n static isEvent(value) {\n return EventFragment.isFragment(value);\n }\n /**\n * Returns true if %%value%% is a [[FunctionFragment]].\n */\n static isFunction(value) {\n return FunctionFragment.isFragment(value);\n }\n /**\n * Returns true if %%value%% is a [[StructFragment]].\n */\n static isStruct(value) {\n return StructFragment.isFragment(value);\n }\n };\n exports3.Fragment = Fragment;\n var NamedFragment = class extends Fragment {\n /**\n * The name of the fragment.\n */\n name;\n /**\n * @private\n */\n constructor(guard, type, name, inputs) {\n super(guard, type, inputs);\n (0, index_js_1.assertArgument)(typeof name === \"string\" && name.match(regexId), \"invalid identifier\", \"name\", name);\n inputs = Object.freeze(inputs.slice());\n (0, index_js_1.defineProperties)(this, { name });\n }\n };\n exports3.NamedFragment = NamedFragment;\n function joinParams(format, params) {\n return \"(\" + params.map((p4) => p4.format(format)).join(format === \"full\" ? \", \" : \",\") + \")\";\n }\n var ErrorFragment = class _ErrorFragment extends NamedFragment {\n /**\n * @private\n */\n constructor(guard, name, inputs) {\n super(guard, \"error\", name, inputs);\n Object.defineProperty(this, internal, { value: ErrorFragmentInternal });\n }\n /**\n * The Custom Error selector.\n */\n get selector() {\n return (0, index_js_2.id)(this.format(\"sighash\")).substring(0, 10);\n }\n /**\n * Returns a string representation of this fragment as %%format%%.\n */\n format(format) {\n if (format == null) {\n format = \"sighash\";\n }\n if (format === \"json\") {\n return JSON.stringify({\n type: \"error\",\n name: this.name,\n inputs: this.inputs.map((input) => JSON.parse(input.format(format)))\n });\n }\n const result = [];\n if (format !== \"sighash\") {\n result.push(\"error\");\n }\n result.push(this.name + joinParams(format, this.inputs));\n return result.join(\" \");\n }\n /**\n * Returns a new **ErrorFragment** for %%obj%%.\n */\n static from(obj) {\n if (_ErrorFragment.isFragment(obj)) {\n return obj;\n }\n if (typeof obj === \"string\") {\n return _ErrorFragment.from(lex(obj));\n } else if (obj instanceof TokenString) {\n const name = consumeName(\"error\", obj);\n const inputs = consumeParams(obj);\n consumeEoi(obj);\n return new _ErrorFragment(_guard, name, inputs);\n }\n return new _ErrorFragment(_guard, obj.name, obj.inputs ? obj.inputs.map(ParamType.from) : []);\n }\n /**\n * Returns ``true`` and provides a type guard if %%value%% is an\n * **ErrorFragment**.\n */\n static isFragment(value) {\n return value && value[internal] === ErrorFragmentInternal;\n }\n };\n exports3.ErrorFragment = ErrorFragment;\n var EventFragment = class _EventFragment extends NamedFragment {\n /**\n * Whether this event is anonymous.\n */\n anonymous;\n /**\n * @private\n */\n constructor(guard, name, inputs, anonymous) {\n super(guard, \"event\", name, inputs);\n Object.defineProperty(this, internal, { value: EventFragmentInternal });\n (0, index_js_1.defineProperties)(this, { anonymous });\n }\n /**\n * The Event topic hash.\n */\n get topicHash() {\n return (0, index_js_2.id)(this.format(\"sighash\"));\n }\n /**\n * Returns a string representation of this event as %%format%%.\n */\n format(format) {\n if (format == null) {\n format = \"sighash\";\n }\n if (format === \"json\") {\n return JSON.stringify({\n type: \"event\",\n anonymous: this.anonymous,\n name: this.name,\n inputs: this.inputs.map((i3) => JSON.parse(i3.format(format)))\n });\n }\n const result = [];\n if (format !== \"sighash\") {\n result.push(\"event\");\n }\n result.push(this.name + joinParams(format, this.inputs));\n if (format !== \"sighash\" && this.anonymous) {\n result.push(\"anonymous\");\n }\n return result.join(\" \");\n }\n /**\n * Return the topic hash for an event with %%name%% and %%params%%.\n */\n static getTopicHash(name, params) {\n params = (params || []).map((p4) => ParamType.from(p4));\n const fragment = new _EventFragment(_guard, name, params, false);\n return fragment.topicHash;\n }\n /**\n * Returns a new **EventFragment** for %%obj%%.\n */\n static from(obj) {\n if (_EventFragment.isFragment(obj)) {\n return obj;\n }\n if (typeof obj === \"string\") {\n try {\n return _EventFragment.from(lex(obj));\n } catch (error) {\n (0, index_js_1.assertArgument)(false, \"invalid event fragment\", \"obj\", obj);\n }\n } else if (obj instanceof TokenString) {\n const name = consumeName(\"event\", obj);\n const inputs = consumeParams(obj, true);\n const anonymous = !!consumeKeywords(obj, setify([\"anonymous\"])).has(\"anonymous\");\n consumeEoi(obj);\n return new _EventFragment(_guard, name, inputs, anonymous);\n }\n return new _EventFragment(_guard, obj.name, obj.inputs ? obj.inputs.map((p4) => ParamType.from(p4, true)) : [], !!obj.anonymous);\n }\n /**\n * Returns ``true`` and provides a type guard if %%value%% is an\n * **EventFragment**.\n */\n static isFragment(value) {\n return value && value[internal] === EventFragmentInternal;\n }\n };\n exports3.EventFragment = EventFragment;\n var ConstructorFragment = class _ConstructorFragment extends Fragment {\n /**\n * Whether the constructor can receive an endowment.\n */\n payable;\n /**\n * The recommended gas limit for deployment or ``null``.\n */\n gas;\n /**\n * @private\n */\n constructor(guard, type, inputs, payable, gas) {\n super(guard, type, inputs);\n Object.defineProperty(this, internal, { value: ConstructorFragmentInternal });\n (0, index_js_1.defineProperties)(this, { payable, gas });\n }\n /**\n * Returns a string representation of this constructor as %%format%%.\n */\n format(format) {\n (0, index_js_1.assert)(format != null && format !== \"sighash\", \"cannot format a constructor for sighash\", \"UNSUPPORTED_OPERATION\", { operation: \"format(sighash)\" });\n if (format === \"json\") {\n return JSON.stringify({\n type: \"constructor\",\n stateMutability: this.payable ? \"payable\" : \"undefined\",\n payable: this.payable,\n gas: this.gas != null ? this.gas : void 0,\n inputs: this.inputs.map((i3) => JSON.parse(i3.format(format)))\n });\n }\n const result = [`constructor${joinParams(format, this.inputs)}`];\n if (this.payable) {\n result.push(\"payable\");\n }\n if (this.gas != null) {\n result.push(`@${this.gas.toString()}`);\n }\n return result.join(\" \");\n }\n /**\n * Returns a new **ConstructorFragment** for %%obj%%.\n */\n static from(obj) {\n if (_ConstructorFragment.isFragment(obj)) {\n return obj;\n }\n if (typeof obj === \"string\") {\n try {\n return _ConstructorFragment.from(lex(obj));\n } catch (error) {\n (0, index_js_1.assertArgument)(false, \"invalid constuctor fragment\", \"obj\", obj);\n }\n } else if (obj instanceof TokenString) {\n consumeKeywords(obj, setify([\"constructor\"]));\n const inputs = consumeParams(obj);\n const payable = !!consumeKeywords(obj, KwVisibDeploy).has(\"payable\");\n const gas = consumeGas(obj);\n consumeEoi(obj);\n return new _ConstructorFragment(_guard, \"constructor\", inputs, payable, gas);\n }\n return new _ConstructorFragment(_guard, \"constructor\", obj.inputs ? obj.inputs.map(ParamType.from) : [], !!obj.payable, obj.gas != null ? obj.gas : null);\n }\n /**\n * Returns ``true`` and provides a type guard if %%value%% is a\n * **ConstructorFragment**.\n */\n static isFragment(value) {\n return value && value[internal] === ConstructorFragmentInternal;\n }\n };\n exports3.ConstructorFragment = ConstructorFragment;\n var FallbackFragment = class _FallbackFragment extends Fragment {\n /**\n * If the function can be sent value during invocation.\n */\n payable;\n constructor(guard, inputs, payable) {\n super(guard, \"fallback\", inputs);\n Object.defineProperty(this, internal, { value: FallbackFragmentInternal });\n (0, index_js_1.defineProperties)(this, { payable });\n }\n /**\n * Returns a string representation of this fallback as %%format%%.\n */\n format(format) {\n const type = this.inputs.length === 0 ? \"receive\" : \"fallback\";\n if (format === \"json\") {\n const stateMutability = this.payable ? \"payable\" : \"nonpayable\";\n return JSON.stringify({ type, stateMutability });\n }\n return `${type}()${this.payable ? \" payable\" : \"\"}`;\n }\n /**\n * Returns a new **FallbackFragment** for %%obj%%.\n */\n static from(obj) {\n if (_FallbackFragment.isFragment(obj)) {\n return obj;\n }\n if (typeof obj === \"string\") {\n try {\n return _FallbackFragment.from(lex(obj));\n } catch (error) {\n (0, index_js_1.assertArgument)(false, \"invalid fallback fragment\", \"obj\", obj);\n }\n } else if (obj instanceof TokenString) {\n const errorObj = obj.toString();\n const topIsValid = obj.peekKeyword(setify([\"fallback\", \"receive\"]));\n (0, index_js_1.assertArgument)(topIsValid, \"type must be fallback or receive\", \"obj\", errorObj);\n const type = obj.popKeyword(setify([\"fallback\", \"receive\"]));\n if (type === \"receive\") {\n const inputs2 = consumeParams(obj);\n (0, index_js_1.assertArgument)(inputs2.length === 0, `receive cannot have arguments`, \"obj.inputs\", inputs2);\n consumeKeywords(obj, setify([\"payable\"]));\n consumeEoi(obj);\n return new _FallbackFragment(_guard, [], true);\n }\n let inputs = consumeParams(obj);\n if (inputs.length) {\n (0, index_js_1.assertArgument)(inputs.length === 1 && inputs[0].type === \"bytes\", \"invalid fallback inputs\", \"obj.inputs\", inputs.map((i3) => i3.format(\"minimal\")).join(\", \"));\n } else {\n inputs = [ParamType.from(\"bytes\")];\n }\n const mutability = consumeMutability(obj);\n (0, index_js_1.assertArgument)(mutability === \"nonpayable\" || mutability === \"payable\", \"fallback cannot be constants\", \"obj.stateMutability\", mutability);\n if (consumeKeywords(obj, setify([\"returns\"])).has(\"returns\")) {\n const outputs = consumeParams(obj);\n (0, index_js_1.assertArgument)(outputs.length === 1 && outputs[0].type === \"bytes\", \"invalid fallback outputs\", \"obj.outputs\", outputs.map((i3) => i3.format(\"minimal\")).join(\", \"));\n }\n consumeEoi(obj);\n return new _FallbackFragment(_guard, inputs, mutability === \"payable\");\n }\n if (obj.type === \"receive\") {\n return new _FallbackFragment(_guard, [], true);\n }\n if (obj.type === \"fallback\") {\n const inputs = [ParamType.from(\"bytes\")];\n const payable = obj.stateMutability === \"payable\";\n return new _FallbackFragment(_guard, inputs, payable);\n }\n (0, index_js_1.assertArgument)(false, \"invalid fallback description\", \"obj\", obj);\n }\n /**\n * Returns ``true`` and provides a type guard if %%value%% is a\n * **FallbackFragment**.\n */\n static isFragment(value) {\n return value && value[internal] === FallbackFragmentInternal;\n }\n };\n exports3.FallbackFragment = FallbackFragment;\n var FunctionFragment = class _FunctionFragment extends NamedFragment {\n /**\n * If the function is constant (e.g. ``pure`` or ``view`` functions).\n */\n constant;\n /**\n * The returned types for the result of calling this function.\n */\n outputs;\n /**\n * The state mutability (e.g. ``payable``, ``nonpayable``, ``view``\n * or ``pure``)\n */\n stateMutability;\n /**\n * If the function can be sent value during invocation.\n */\n payable;\n /**\n * The recommended gas limit to send when calling this function.\n */\n gas;\n /**\n * @private\n */\n constructor(guard, name, stateMutability, inputs, outputs, gas) {\n super(guard, \"function\", name, inputs);\n Object.defineProperty(this, internal, { value: FunctionFragmentInternal });\n outputs = Object.freeze(outputs.slice());\n const constant = stateMutability === \"view\" || stateMutability === \"pure\";\n const payable = stateMutability === \"payable\";\n (0, index_js_1.defineProperties)(this, { constant, gas, outputs, payable, stateMutability });\n }\n /**\n * The Function selector.\n */\n get selector() {\n return (0, index_js_2.id)(this.format(\"sighash\")).substring(0, 10);\n }\n /**\n * Returns a string representation of this function as %%format%%.\n */\n format(format) {\n if (format == null) {\n format = \"sighash\";\n }\n if (format === \"json\") {\n return JSON.stringify({\n type: \"function\",\n name: this.name,\n constant: this.constant,\n stateMutability: this.stateMutability !== \"nonpayable\" ? this.stateMutability : void 0,\n payable: this.payable,\n gas: this.gas != null ? this.gas : void 0,\n inputs: this.inputs.map((i3) => JSON.parse(i3.format(format))),\n outputs: this.outputs.map((o5) => JSON.parse(o5.format(format)))\n });\n }\n const result = [];\n if (format !== \"sighash\") {\n result.push(\"function\");\n }\n result.push(this.name + joinParams(format, this.inputs));\n if (format !== \"sighash\") {\n if (this.stateMutability !== \"nonpayable\") {\n result.push(this.stateMutability);\n }\n if (this.outputs && this.outputs.length) {\n result.push(\"returns\");\n result.push(joinParams(format, this.outputs));\n }\n if (this.gas != null) {\n result.push(`@${this.gas.toString()}`);\n }\n }\n return result.join(\" \");\n }\n /**\n * Return the selector for a function with %%name%% and %%params%%.\n */\n static getSelector(name, params) {\n params = (params || []).map((p4) => ParamType.from(p4));\n const fragment = new _FunctionFragment(_guard, name, \"view\", params, [], null);\n return fragment.selector;\n }\n /**\n * Returns a new **FunctionFragment** for %%obj%%.\n */\n static from(obj) {\n if (_FunctionFragment.isFragment(obj)) {\n return obj;\n }\n if (typeof obj === \"string\") {\n try {\n return _FunctionFragment.from(lex(obj));\n } catch (error) {\n (0, index_js_1.assertArgument)(false, \"invalid function fragment\", \"obj\", obj);\n }\n } else if (obj instanceof TokenString) {\n const name = consumeName(\"function\", obj);\n const inputs = consumeParams(obj);\n const mutability = consumeMutability(obj);\n let outputs = [];\n if (consumeKeywords(obj, setify([\"returns\"])).has(\"returns\")) {\n outputs = consumeParams(obj);\n }\n const gas = consumeGas(obj);\n consumeEoi(obj);\n return new _FunctionFragment(_guard, name, mutability, inputs, outputs, gas);\n }\n let stateMutability = obj.stateMutability;\n if (stateMutability == null) {\n stateMutability = \"payable\";\n if (typeof obj.constant === \"boolean\") {\n stateMutability = \"view\";\n if (!obj.constant) {\n stateMutability = \"payable\";\n if (typeof obj.payable === \"boolean\" && !obj.payable) {\n stateMutability = \"nonpayable\";\n }\n }\n } else if (typeof obj.payable === \"boolean\" && !obj.payable) {\n stateMutability = \"nonpayable\";\n }\n }\n return new _FunctionFragment(_guard, obj.name, stateMutability, obj.inputs ? obj.inputs.map(ParamType.from) : [], obj.outputs ? obj.outputs.map(ParamType.from) : [], obj.gas != null ? obj.gas : null);\n }\n /**\n * Returns ``true`` and provides a type guard if %%value%% is a\n * **FunctionFragment**.\n */\n static isFragment(value) {\n return value && value[internal] === FunctionFragmentInternal;\n }\n };\n exports3.FunctionFragment = FunctionFragment;\n var StructFragment = class _StructFragment extends NamedFragment {\n /**\n * @private\n */\n constructor(guard, name, inputs) {\n super(guard, \"struct\", name, inputs);\n Object.defineProperty(this, internal, { value: StructFragmentInternal });\n }\n /**\n * Returns a string representation of this struct as %%format%%.\n */\n format() {\n throw new Error(\"@TODO\");\n }\n /**\n * Returns a new **StructFragment** for %%obj%%.\n */\n static from(obj) {\n if (typeof obj === \"string\") {\n try {\n return _StructFragment.from(lex(obj));\n } catch (error) {\n (0, index_js_1.assertArgument)(false, \"invalid struct fragment\", \"obj\", obj);\n }\n } else if (obj instanceof TokenString) {\n const name = consumeName(\"struct\", obj);\n const inputs = consumeParams(obj);\n consumeEoi(obj);\n return new _StructFragment(_guard, name, inputs);\n }\n return new _StructFragment(_guard, obj.name, obj.inputs ? obj.inputs.map(ParamType.from) : []);\n }\n // @TODO: fix this return type\n /**\n * Returns ``true`` and provides a type guard if %%value%% is a\n * **StructFragment**.\n */\n static isFragment(value) {\n return value && value[internal] === StructFragmentInternal;\n }\n };\n exports3.StructFragment = StructFragment;\n }\n });\n\n // ../../../node_modules/.pnpm/ethers@6.15.0_bufferutil@4.0.9_utf-8-validate@5.0.10/node_modules/ethers/lib.commonjs/abi/abi-coder.js\n var require_abi_coder2 = __commonJS({\n \"../../../node_modules/.pnpm/ethers@6.15.0_bufferutil@4.0.9_utf-8-validate@5.0.10/node_modules/ethers/lib.commonjs/abi/abi-coder.js\"(exports3) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n Object.defineProperty(exports3, \"__esModule\", { value: true });\n exports3.AbiCoder = void 0;\n var index_js_1 = require_utils8();\n var abstract_coder_js_1 = require_abstract_coder2();\n var address_js_1 = require_address4();\n var array_js_1 = require_array2();\n var boolean_js_1 = require_boolean2();\n var bytes_js_1 = require_bytes2();\n var fixed_bytes_js_1 = require_fixed_bytes2();\n var null_js_1 = require_null2();\n var number_js_1 = require_number2();\n var string_js_1 = require_string2();\n var tuple_js_1 = require_tuple2();\n var fragments_js_1 = require_fragments2();\n var index_js_2 = require_address3();\n var index_js_3 = require_utils8();\n var PanicReasons = /* @__PURE__ */ new Map();\n PanicReasons.set(0, \"GENERIC_PANIC\");\n PanicReasons.set(1, \"ASSERT_FALSE\");\n PanicReasons.set(17, \"OVERFLOW\");\n PanicReasons.set(18, \"DIVIDE_BY_ZERO\");\n PanicReasons.set(33, \"ENUM_RANGE_ERROR\");\n PanicReasons.set(34, \"BAD_STORAGE_DATA\");\n PanicReasons.set(49, \"STACK_UNDERFLOW\");\n PanicReasons.set(50, \"ARRAY_RANGE_ERROR\");\n PanicReasons.set(65, \"OUT_OF_MEMORY\");\n PanicReasons.set(81, \"UNINITIALIZED_FUNCTION_CALL\");\n var paramTypeBytes = new RegExp(/^bytes([0-9]*)$/);\n var paramTypeNumber = new RegExp(/^(u?int)([0-9]*)$/);\n var defaultCoder = null;\n var defaultMaxInflation = 1024;\n function getBuiltinCallException(action, tx, data, abiCoder) {\n let message = \"missing revert data\";\n let reason = null;\n const invocation = null;\n let revert = null;\n if (data) {\n message = \"execution reverted\";\n const bytes = (0, index_js_3.getBytes)(data);\n data = (0, index_js_3.hexlify)(data);\n if (bytes.length === 0) {\n message += \" (no data present; likely require(false) occurred\";\n reason = \"require(false)\";\n } else if (bytes.length % 32 !== 4) {\n message += \" (could not decode reason; invalid data length)\";\n } else if ((0, index_js_3.hexlify)(bytes.slice(0, 4)) === \"0x08c379a0\") {\n try {\n reason = abiCoder.decode([\"string\"], bytes.slice(4))[0];\n revert = {\n signature: \"Error(string)\",\n name: \"Error\",\n args: [reason]\n };\n message += `: ${JSON.stringify(reason)}`;\n } catch (error) {\n message += \" (could not decode reason; invalid string data)\";\n }\n } else if ((0, index_js_3.hexlify)(bytes.slice(0, 4)) === \"0x4e487b71\") {\n try {\n const code = Number(abiCoder.decode([\"uint256\"], bytes.slice(4))[0]);\n revert = {\n signature: \"Panic(uint256)\",\n name: \"Panic\",\n args: [code]\n };\n reason = `Panic due to ${PanicReasons.get(code) || \"UNKNOWN\"}(${code})`;\n message += `: ${reason}`;\n } catch (error) {\n message += \" (could not decode panic code)\";\n }\n } else {\n message += \" (unknown custom error)\";\n }\n }\n const transaction = {\n to: tx.to ? (0, index_js_2.getAddress)(tx.to) : null,\n data: tx.data || \"0x\"\n };\n if (tx.from) {\n transaction.from = (0, index_js_2.getAddress)(tx.from);\n }\n return (0, index_js_3.makeError)(message, \"CALL_EXCEPTION\", {\n action,\n data,\n reason,\n transaction,\n invocation,\n revert\n });\n }\n var AbiCoder = class _AbiCoder {\n #getCoder(param) {\n if (param.isArray()) {\n return new array_js_1.ArrayCoder(this.#getCoder(param.arrayChildren), param.arrayLength, param.name);\n }\n if (param.isTuple()) {\n return new tuple_js_1.TupleCoder(param.components.map((c4) => this.#getCoder(c4)), param.name);\n }\n switch (param.baseType) {\n case \"address\":\n return new address_js_1.AddressCoder(param.name);\n case \"bool\":\n return new boolean_js_1.BooleanCoder(param.name);\n case \"string\":\n return new string_js_1.StringCoder(param.name);\n case \"bytes\":\n return new bytes_js_1.BytesCoder(param.name);\n case \"\":\n return new null_js_1.NullCoder(param.name);\n }\n let match = param.type.match(paramTypeNumber);\n if (match) {\n let size6 = parseInt(match[2] || \"256\");\n (0, index_js_1.assertArgument)(size6 !== 0 && size6 <= 256 && size6 % 8 === 0, \"invalid \" + match[1] + \" bit length\", \"param\", param);\n return new number_js_1.NumberCoder(size6 / 8, match[1] === \"int\", param.name);\n }\n match = param.type.match(paramTypeBytes);\n if (match) {\n let size6 = parseInt(match[1]);\n (0, index_js_1.assertArgument)(size6 !== 0 && size6 <= 32, \"invalid bytes length\", \"param\", param);\n return new fixed_bytes_js_1.FixedBytesCoder(size6, param.name);\n }\n (0, index_js_1.assertArgument)(false, \"invalid type\", \"type\", param.type);\n }\n /**\n * Get the default values for the given %%types%%.\n *\n * For example, a ``uint`` is by default ``0`` and ``bool``\n * is by default ``false``.\n */\n getDefaultValue(types) {\n const coders = types.map((type) => this.#getCoder(fragments_js_1.ParamType.from(type)));\n const coder = new tuple_js_1.TupleCoder(coders, \"_\");\n return coder.defaultValue();\n }\n /**\n * Encode the %%values%% as the %%types%% into ABI data.\n *\n * @returns DataHexstring\n */\n encode(types, values) {\n (0, index_js_1.assertArgumentCount)(values.length, types.length, \"types/values length mismatch\");\n const coders = types.map((type) => this.#getCoder(fragments_js_1.ParamType.from(type)));\n const coder = new tuple_js_1.TupleCoder(coders, \"_\");\n const writer = new abstract_coder_js_1.Writer();\n coder.encode(writer, values);\n return writer.data;\n }\n /**\n * Decode the ABI %%data%% as the %%types%% into values.\n *\n * If %%loose%% decoding is enabled, then strict padding is\n * not enforced. Some older versions of Solidity incorrectly\n * padded event data emitted from ``external`` functions.\n */\n decode(types, data, loose) {\n const coders = types.map((type) => this.#getCoder(fragments_js_1.ParamType.from(type)));\n const coder = new tuple_js_1.TupleCoder(coders, \"_\");\n return coder.decode(new abstract_coder_js_1.Reader(data, loose, defaultMaxInflation));\n }\n static _setDefaultMaxInflation(value) {\n (0, index_js_1.assertArgument)(typeof value === \"number\" && Number.isInteger(value), \"invalid defaultMaxInflation factor\", \"value\", value);\n defaultMaxInflation = value;\n }\n /**\n * Returns the shared singleton instance of a default [[AbiCoder]].\n *\n * On the first call, the instance is created internally.\n */\n static defaultAbiCoder() {\n if (defaultCoder == null) {\n defaultCoder = new _AbiCoder();\n }\n return defaultCoder;\n }\n /**\n * Returns an ethers-compatible [[CallExceptionError]] Error for the given\n * result %%data%% for the [[CallExceptionAction]] %%action%% against\n * the Transaction %%tx%%.\n */\n static getBuiltinCallException(action, tx, data) {\n return getBuiltinCallException(action, tx, data, _AbiCoder.defaultAbiCoder());\n }\n };\n exports3.AbiCoder = AbiCoder;\n }\n });\n\n // ../../../node_modules/.pnpm/ethers@6.15.0_bufferutil@4.0.9_utf-8-validate@5.0.10/node_modules/ethers/lib.commonjs/abi/bytes32.js\n var require_bytes322 = __commonJS({\n \"../../../node_modules/.pnpm/ethers@6.15.0_bufferutil@4.0.9_utf-8-validate@5.0.10/node_modules/ethers/lib.commonjs/abi/bytes32.js\"(exports3) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n Object.defineProperty(exports3, \"__esModule\", { value: true });\n exports3.decodeBytes32String = exports3.encodeBytes32String = void 0;\n var index_js_1 = require_utils8();\n function encodeBytes32String(text) {\n const bytes = (0, index_js_1.toUtf8Bytes)(text);\n if (bytes.length > 31) {\n throw new Error(\"bytes32 string must be less than 32 bytes\");\n }\n return (0, index_js_1.zeroPadBytes)(bytes, 32);\n }\n exports3.encodeBytes32String = encodeBytes32String;\n function decodeBytes32String(_bytes) {\n const data = (0, index_js_1.getBytes)(_bytes, \"bytes\");\n if (data.length !== 32) {\n throw new Error(\"invalid bytes32 - not 32 bytes long\");\n }\n if (data[31] !== 0) {\n throw new Error(\"invalid bytes32 string - no null terminator\");\n }\n let length2 = 31;\n while (data[length2 - 1] === 0) {\n length2--;\n }\n return (0, index_js_1.toUtf8String)(data.slice(0, length2));\n }\n exports3.decodeBytes32String = decodeBytes32String;\n }\n });\n\n // ../../../node_modules/.pnpm/ethers@6.15.0_bufferutil@4.0.9_utf-8-validate@5.0.10/node_modules/ethers/lib.commonjs/abi/interface.js\n var require_interface2 = __commonJS({\n \"../../../node_modules/.pnpm/ethers@6.15.0_bufferutil@4.0.9_utf-8-validate@5.0.10/node_modules/ethers/lib.commonjs/abi/interface.js\"(exports3) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n Object.defineProperty(exports3, \"__esModule\", { value: true });\n exports3.Interface = exports3.Indexed = exports3.ErrorDescription = exports3.TransactionDescription = exports3.LogDescription = exports3.Result = exports3.checkResultErrors = void 0;\n var index_js_1 = require_crypto2();\n var index_js_2 = require_hash2();\n var index_js_3 = require_utils8();\n var abi_coder_js_1 = require_abi_coder2();\n var abstract_coder_js_1 = require_abstract_coder2();\n Object.defineProperty(exports3, \"checkResultErrors\", { enumerable: true, get: function() {\n return abstract_coder_js_1.checkResultErrors;\n } });\n Object.defineProperty(exports3, \"Result\", { enumerable: true, get: function() {\n return abstract_coder_js_1.Result;\n } });\n var fragments_js_1 = require_fragments2();\n var typed_js_1 = require_typed();\n var LogDescription = class {\n /**\n * The matching fragment for the ``topic0``.\n */\n fragment;\n /**\n * The name of the Event.\n */\n name;\n /**\n * The full Event signature.\n */\n signature;\n /**\n * The topic hash for the Event.\n */\n topic;\n /**\n * The arguments passed into the Event with ``emit``.\n */\n args;\n /**\n * @_ignore:\n */\n constructor(fragment, topic, args) {\n const name = fragment.name, signature = fragment.format();\n (0, index_js_3.defineProperties)(this, {\n fragment,\n name,\n signature,\n topic,\n args\n });\n }\n };\n exports3.LogDescription = LogDescription;\n var TransactionDescription = class {\n /**\n * The matching fragment from the transaction ``data``.\n */\n fragment;\n /**\n * The name of the Function from the transaction ``data``.\n */\n name;\n /**\n * The arguments passed to the Function from the transaction ``data``.\n */\n args;\n /**\n * The full Function signature from the transaction ``data``.\n */\n signature;\n /**\n * The selector for the Function from the transaction ``data``.\n */\n selector;\n /**\n * The ``value`` (in wei) from the transaction.\n */\n value;\n /**\n * @_ignore:\n */\n constructor(fragment, selector, args, value) {\n const name = fragment.name, signature = fragment.format();\n (0, index_js_3.defineProperties)(this, {\n fragment,\n name,\n args,\n signature,\n selector,\n value\n });\n }\n };\n exports3.TransactionDescription = TransactionDescription;\n var ErrorDescription = class {\n /**\n * The matching fragment.\n */\n fragment;\n /**\n * The name of the Error.\n */\n name;\n /**\n * The arguments passed to the Error with ``revert``.\n */\n args;\n /**\n * The full Error signature.\n */\n signature;\n /**\n * The selector for the Error.\n */\n selector;\n /**\n * @_ignore:\n */\n constructor(fragment, selector, args) {\n const name = fragment.name, signature = fragment.format();\n (0, index_js_3.defineProperties)(this, {\n fragment,\n name,\n args,\n signature,\n selector\n });\n }\n };\n exports3.ErrorDescription = ErrorDescription;\n var Indexed = class {\n /**\n * The ``keccak256`` of the value logged.\n */\n hash;\n /**\n * @_ignore:\n */\n _isIndexed;\n /**\n * Returns ``true`` if %%value%% is an **Indexed**.\n *\n * This provides a Type Guard for property access.\n */\n static isIndexed(value) {\n return !!(value && value._isIndexed);\n }\n /**\n * @_ignore:\n */\n constructor(hash3) {\n (0, index_js_3.defineProperties)(this, { hash: hash3, _isIndexed: true });\n }\n };\n exports3.Indexed = Indexed;\n var PanicReasons = {\n \"0\": \"generic panic\",\n \"1\": \"assert(false)\",\n \"17\": \"arithmetic overflow\",\n \"18\": \"division or modulo by zero\",\n \"33\": \"enum overflow\",\n \"34\": \"invalid encoded storage byte array accessed\",\n \"49\": \"out-of-bounds array access; popping on an empty array\",\n \"50\": \"out-of-bounds access of an array or bytesN\",\n \"65\": \"out of memory\",\n \"81\": \"uninitialized function\"\n };\n var BuiltinErrors = {\n \"0x08c379a0\": {\n signature: \"Error(string)\",\n name: \"Error\",\n inputs: [\"string\"],\n reason: (message) => {\n return `reverted with reason string ${JSON.stringify(message)}`;\n }\n },\n \"0x4e487b71\": {\n signature: \"Panic(uint256)\",\n name: \"Panic\",\n inputs: [\"uint256\"],\n reason: (code) => {\n let reason = \"unknown panic code\";\n if (code >= 0 && code <= 255 && PanicReasons[code.toString()]) {\n reason = PanicReasons[code.toString()];\n }\n return `reverted with panic code 0x${code.toString(16)} (${reason})`;\n }\n }\n };\n var Interface = class _Interface {\n /**\n * All the Contract ABI members (i.e. methods, events, errors, etc).\n */\n fragments;\n /**\n * The Contract constructor.\n */\n deploy;\n /**\n * The Fallback method, if any.\n */\n fallback;\n /**\n * If receiving ether is supported.\n */\n receive;\n #errors;\n #events;\n #functions;\n // #structs: Map;\n #abiCoder;\n /**\n * Create a new Interface for the %%fragments%%.\n */\n constructor(fragments) {\n let abi2 = [];\n if (typeof fragments === \"string\") {\n abi2 = JSON.parse(fragments);\n } else {\n abi2 = fragments;\n }\n this.#functions = /* @__PURE__ */ new Map();\n this.#errors = /* @__PURE__ */ new Map();\n this.#events = /* @__PURE__ */ new Map();\n const frags = [];\n for (const a3 of abi2) {\n try {\n frags.push(fragments_js_1.Fragment.from(a3));\n } catch (error) {\n console.log(`[Warning] Invalid Fragment ${JSON.stringify(a3)}:`, error.message);\n }\n }\n (0, index_js_3.defineProperties)(this, {\n fragments: Object.freeze(frags)\n });\n let fallback = null;\n let receive = false;\n this.#abiCoder = this.getAbiCoder();\n this.fragments.forEach((fragment, index2) => {\n let bucket;\n switch (fragment.type) {\n case \"constructor\":\n if (this.deploy) {\n console.log(\"duplicate definition - constructor\");\n return;\n }\n (0, index_js_3.defineProperties)(this, { deploy: fragment });\n return;\n case \"fallback\":\n if (fragment.inputs.length === 0) {\n receive = true;\n } else {\n (0, index_js_3.assertArgument)(!fallback || fragment.payable !== fallback.payable, \"conflicting fallback fragments\", `fragments[${index2}]`, fragment);\n fallback = fragment;\n receive = fallback.payable;\n }\n return;\n case \"function\":\n bucket = this.#functions;\n break;\n case \"event\":\n bucket = this.#events;\n break;\n case \"error\":\n bucket = this.#errors;\n break;\n default:\n return;\n }\n const signature = fragment.format();\n if (bucket.has(signature)) {\n return;\n }\n bucket.set(signature, fragment);\n });\n if (!this.deploy) {\n (0, index_js_3.defineProperties)(this, {\n deploy: fragments_js_1.ConstructorFragment.from(\"constructor()\")\n });\n }\n (0, index_js_3.defineProperties)(this, { fallback, receive });\n }\n /**\n * Returns the entire Human-Readable ABI, as an array of\n * signatures, optionally as %%minimal%% strings, which\n * removes parameter names and unneceesary spaces.\n */\n format(minimal) {\n const format = minimal ? \"minimal\" : \"full\";\n const abi2 = this.fragments.map((f6) => f6.format(format));\n return abi2;\n }\n /**\n * Return the JSON-encoded ABI. This is the format Solidiy\n * returns.\n */\n formatJson() {\n const abi2 = this.fragments.map((f6) => f6.format(\"json\"));\n return JSON.stringify(abi2.map((j2) => JSON.parse(j2)));\n }\n /**\n * The ABI coder that will be used to encode and decode binary\n * data.\n */\n getAbiCoder() {\n return abi_coder_js_1.AbiCoder.defaultAbiCoder();\n }\n // Find a function definition by any means necessary (unless it is ambiguous)\n #getFunction(key, values, forceUnique) {\n if ((0, index_js_3.isHexString)(key)) {\n const selector = key.toLowerCase();\n for (const fragment of this.#functions.values()) {\n if (selector === fragment.selector) {\n return fragment;\n }\n }\n return null;\n }\n if (key.indexOf(\"(\") === -1) {\n const matching = [];\n for (const [name, fragment] of this.#functions) {\n if (name.split(\n \"(\"\n /* fix:) */\n )[0] === key) {\n matching.push(fragment);\n }\n }\n if (values) {\n const lastValue = values.length > 0 ? values[values.length - 1] : null;\n let valueLength = values.length;\n let allowOptions = true;\n if (typed_js_1.Typed.isTyped(lastValue) && lastValue.type === \"overrides\") {\n allowOptions = false;\n valueLength--;\n }\n for (let i3 = matching.length - 1; i3 >= 0; i3--) {\n const inputs = matching[i3].inputs.length;\n if (inputs !== valueLength && (!allowOptions || inputs !== valueLength - 1)) {\n matching.splice(i3, 1);\n }\n }\n for (let i3 = matching.length - 1; i3 >= 0; i3--) {\n const inputs = matching[i3].inputs;\n for (let j2 = 0; j2 < values.length; j2++) {\n if (!typed_js_1.Typed.isTyped(values[j2])) {\n continue;\n }\n if (j2 >= inputs.length) {\n if (values[j2].type === \"overrides\") {\n continue;\n }\n matching.splice(i3, 1);\n break;\n }\n if (values[j2].type !== inputs[j2].baseType) {\n matching.splice(i3, 1);\n break;\n }\n }\n }\n }\n if (matching.length === 1 && values && values.length !== matching[0].inputs.length) {\n const lastArg = values[values.length - 1];\n if (lastArg == null || Array.isArray(lastArg) || typeof lastArg !== \"object\") {\n matching.splice(0, 1);\n }\n }\n if (matching.length === 0) {\n return null;\n }\n if (matching.length > 1 && forceUnique) {\n const matchStr = matching.map((m2) => JSON.stringify(m2.format())).join(\", \");\n (0, index_js_3.assertArgument)(false, `ambiguous function description (i.e. matches ${matchStr})`, \"key\", key);\n }\n return matching[0];\n }\n const result = this.#functions.get(fragments_js_1.FunctionFragment.from(key).format());\n if (result) {\n return result;\n }\n return null;\n }\n /**\n * Get the function name for %%key%%, which may be a function selector,\n * function name or function signature that belongs to the ABI.\n */\n getFunctionName(key) {\n const fragment = this.#getFunction(key, null, false);\n (0, index_js_3.assertArgument)(fragment, \"no matching function\", \"key\", key);\n return fragment.name;\n }\n /**\n * Returns true if %%key%% (a function selector, function name or\n * function signature) is present in the ABI.\n *\n * In the case of a function name, the name may be ambiguous, so\n * accessing the [[FunctionFragment]] may require refinement.\n */\n hasFunction(key) {\n return !!this.#getFunction(key, null, false);\n }\n /**\n * Get the [[FunctionFragment]] for %%key%%, which may be a function\n * selector, function name or function signature that belongs to the ABI.\n *\n * If %%values%% is provided, it will use the Typed API to handle\n * ambiguous cases where multiple functions match by name.\n *\n * If the %%key%% and %%values%% do not refine to a single function in\n * the ABI, this will throw.\n */\n getFunction(key, values) {\n return this.#getFunction(key, values || null, true);\n }\n /**\n * Iterate over all functions, calling %%callback%%, sorted by their name.\n */\n forEachFunction(callback) {\n const names = Array.from(this.#functions.keys());\n names.sort((a3, b4) => a3.localeCompare(b4));\n for (let i3 = 0; i3 < names.length; i3++) {\n const name = names[i3];\n callback(this.#functions.get(name), i3);\n }\n }\n // Find an event definition by any means necessary (unless it is ambiguous)\n #getEvent(key, values, forceUnique) {\n if ((0, index_js_3.isHexString)(key)) {\n const eventTopic = key.toLowerCase();\n for (const fragment of this.#events.values()) {\n if (eventTopic === fragment.topicHash) {\n return fragment;\n }\n }\n return null;\n }\n if (key.indexOf(\"(\") === -1) {\n const matching = [];\n for (const [name, fragment] of this.#events) {\n if (name.split(\n \"(\"\n /* fix:) */\n )[0] === key) {\n matching.push(fragment);\n }\n }\n if (values) {\n for (let i3 = matching.length - 1; i3 >= 0; i3--) {\n if (matching[i3].inputs.length < values.length) {\n matching.splice(i3, 1);\n }\n }\n for (let i3 = matching.length - 1; i3 >= 0; i3--) {\n const inputs = matching[i3].inputs;\n for (let j2 = 0; j2 < values.length; j2++) {\n if (!typed_js_1.Typed.isTyped(values[j2])) {\n continue;\n }\n if (values[j2].type !== inputs[j2].baseType) {\n matching.splice(i3, 1);\n break;\n }\n }\n }\n }\n if (matching.length === 0) {\n return null;\n }\n if (matching.length > 1 && forceUnique) {\n const matchStr = matching.map((m2) => JSON.stringify(m2.format())).join(\", \");\n (0, index_js_3.assertArgument)(false, `ambiguous event description (i.e. matches ${matchStr})`, \"key\", key);\n }\n return matching[0];\n }\n const result = this.#events.get(fragments_js_1.EventFragment.from(key).format());\n if (result) {\n return result;\n }\n return null;\n }\n /**\n * Get the event name for %%key%%, which may be a topic hash,\n * event name or event signature that belongs to the ABI.\n */\n getEventName(key) {\n const fragment = this.#getEvent(key, null, false);\n (0, index_js_3.assertArgument)(fragment, \"no matching event\", \"key\", key);\n return fragment.name;\n }\n /**\n * Returns true if %%key%% (an event topic hash, event name or\n * event signature) is present in the ABI.\n *\n * In the case of an event name, the name may be ambiguous, so\n * accessing the [[EventFragment]] may require refinement.\n */\n hasEvent(key) {\n return !!this.#getEvent(key, null, false);\n }\n /**\n * Get the [[EventFragment]] for %%key%%, which may be a topic hash,\n * event name or event signature that belongs to the ABI.\n *\n * If %%values%% is provided, it will use the Typed API to handle\n * ambiguous cases where multiple events match by name.\n *\n * If the %%key%% and %%values%% do not refine to a single event in\n * the ABI, this will throw.\n */\n getEvent(key, values) {\n return this.#getEvent(key, values || null, true);\n }\n /**\n * Iterate over all events, calling %%callback%%, sorted by their name.\n */\n forEachEvent(callback) {\n const names = Array.from(this.#events.keys());\n names.sort((a3, b4) => a3.localeCompare(b4));\n for (let i3 = 0; i3 < names.length; i3++) {\n const name = names[i3];\n callback(this.#events.get(name), i3);\n }\n }\n /**\n * Get the [[ErrorFragment]] for %%key%%, which may be an error\n * selector, error name or error signature that belongs to the ABI.\n *\n * If %%values%% is provided, it will use the Typed API to handle\n * ambiguous cases where multiple errors match by name.\n *\n * If the %%key%% and %%values%% do not refine to a single error in\n * the ABI, this will throw.\n */\n getError(key, values) {\n if ((0, index_js_3.isHexString)(key)) {\n const selector = key.toLowerCase();\n if (BuiltinErrors[selector]) {\n return fragments_js_1.ErrorFragment.from(BuiltinErrors[selector].signature);\n }\n for (const fragment of this.#errors.values()) {\n if (selector === fragment.selector) {\n return fragment;\n }\n }\n return null;\n }\n if (key.indexOf(\"(\") === -1) {\n const matching = [];\n for (const [name, fragment] of this.#errors) {\n if (name.split(\n \"(\"\n /* fix:) */\n )[0] === key) {\n matching.push(fragment);\n }\n }\n if (matching.length === 0) {\n if (key === \"Error\") {\n return fragments_js_1.ErrorFragment.from(\"error Error(string)\");\n }\n if (key === \"Panic\") {\n return fragments_js_1.ErrorFragment.from(\"error Panic(uint256)\");\n }\n return null;\n } else if (matching.length > 1) {\n const matchStr = matching.map((m2) => JSON.stringify(m2.format())).join(\", \");\n (0, index_js_3.assertArgument)(false, `ambiguous error description (i.e. ${matchStr})`, \"name\", key);\n }\n return matching[0];\n }\n key = fragments_js_1.ErrorFragment.from(key).format();\n if (key === \"Error(string)\") {\n return fragments_js_1.ErrorFragment.from(\"error Error(string)\");\n }\n if (key === \"Panic(uint256)\") {\n return fragments_js_1.ErrorFragment.from(\"error Panic(uint256)\");\n }\n const result = this.#errors.get(key);\n if (result) {\n return result;\n }\n return null;\n }\n /**\n * Iterate over all errors, calling %%callback%%, sorted by their name.\n */\n forEachError(callback) {\n const names = Array.from(this.#errors.keys());\n names.sort((a3, b4) => a3.localeCompare(b4));\n for (let i3 = 0; i3 < names.length; i3++) {\n const name = names[i3];\n callback(this.#errors.get(name), i3);\n }\n }\n // Get the 4-byte selector used by Solidity to identify a function\n /*\n getSelector(fragment: ErrorFragment | FunctionFragment): string {\n if (typeof(fragment) === \"string\") {\n const matches: Array = [ ];\n \n try { matches.push(this.getFunction(fragment)); } catch (error) { }\n try { matches.push(this.getError(fragment)); } catch (_) { }\n \n if (matches.length === 0) {\n logger.throwArgumentError(\"unknown fragment\", \"key\", fragment);\n } else if (matches.length > 1) {\n logger.throwArgumentError(\"ambiguous fragment matches function and error\", \"key\", fragment);\n }\n \n fragment = matches[0];\n }\n \n return dataSlice(id(fragment.format()), 0, 4);\n }\n */\n // Get the 32-byte topic hash used by Solidity to identify an event\n /*\n getEventTopic(fragment: EventFragment): string {\n //if (typeof(fragment) === \"string\") { fragment = this.getEvent(eventFragment); }\n return id(fragment.format());\n }\n */\n _decodeParams(params, data) {\n return this.#abiCoder.decode(params, data);\n }\n _encodeParams(params, values) {\n return this.#abiCoder.encode(params, values);\n }\n /**\n * Encodes a ``tx.data`` object for deploying the Contract with\n * the %%values%% as the constructor arguments.\n */\n encodeDeploy(values) {\n return this._encodeParams(this.deploy.inputs, values || []);\n }\n /**\n * Decodes the result %%data%% (e.g. from an ``eth_call``) for the\n * specified error (see [[getError]] for valid values for\n * %%key%%).\n *\n * Most developers should prefer the [[parseCallResult]] method instead,\n * which will automatically detect a ``CALL_EXCEPTION`` and throw the\n * corresponding error.\n */\n decodeErrorResult(fragment, data) {\n if (typeof fragment === \"string\") {\n const f6 = this.getError(fragment);\n (0, index_js_3.assertArgument)(f6, \"unknown error\", \"fragment\", fragment);\n fragment = f6;\n }\n (0, index_js_3.assertArgument)((0, index_js_3.dataSlice)(data, 0, 4) === fragment.selector, `data signature does not match error ${fragment.name}.`, \"data\", data);\n return this._decodeParams(fragment.inputs, (0, index_js_3.dataSlice)(data, 4));\n }\n /**\n * Encodes the transaction revert data for a call result that\n * reverted from the the Contract with the sepcified %%error%%\n * (see [[getError]] for valid values for %%fragment%%) with the %%values%%.\n *\n * This is generally not used by most developers, unless trying to mock\n * a result from a Contract.\n */\n encodeErrorResult(fragment, values) {\n if (typeof fragment === \"string\") {\n const f6 = this.getError(fragment);\n (0, index_js_3.assertArgument)(f6, \"unknown error\", \"fragment\", fragment);\n fragment = f6;\n }\n return (0, index_js_3.concat)([\n fragment.selector,\n this._encodeParams(fragment.inputs, values || [])\n ]);\n }\n /**\n * Decodes the %%data%% from a transaction ``tx.data`` for\n * the function specified (see [[getFunction]] for valid values\n * for %%fragment%%).\n *\n * Most developers should prefer the [[parseTransaction]] method\n * instead, which will automatically detect the fragment.\n */\n decodeFunctionData(fragment, data) {\n if (typeof fragment === \"string\") {\n const f6 = this.getFunction(fragment);\n (0, index_js_3.assertArgument)(f6, \"unknown function\", \"fragment\", fragment);\n fragment = f6;\n }\n (0, index_js_3.assertArgument)((0, index_js_3.dataSlice)(data, 0, 4) === fragment.selector, `data signature does not match function ${fragment.name}.`, \"data\", data);\n return this._decodeParams(fragment.inputs, (0, index_js_3.dataSlice)(data, 4));\n }\n /**\n * Encodes the ``tx.data`` for a transaction that calls the function\n * specified (see [[getFunction]] for valid values for %%fragment%%) with\n * the %%values%%.\n */\n encodeFunctionData(fragment, values) {\n if (typeof fragment === \"string\") {\n const f6 = this.getFunction(fragment);\n (0, index_js_3.assertArgument)(f6, \"unknown function\", \"fragment\", fragment);\n fragment = f6;\n }\n return (0, index_js_3.concat)([\n fragment.selector,\n this._encodeParams(fragment.inputs, values || [])\n ]);\n }\n /**\n * Decodes the result %%data%% (e.g. from an ``eth_call``) for the\n * specified function (see [[getFunction]] for valid values for\n * %%key%%).\n *\n * Most developers should prefer the [[parseCallResult]] method instead,\n * which will automatically detect a ``CALL_EXCEPTION`` and throw the\n * corresponding error.\n */\n decodeFunctionResult(fragment, data) {\n if (typeof fragment === \"string\") {\n const f6 = this.getFunction(fragment);\n (0, index_js_3.assertArgument)(f6, \"unknown function\", \"fragment\", fragment);\n fragment = f6;\n }\n let message = \"invalid length for result data\";\n const bytes = (0, index_js_3.getBytesCopy)(data);\n if (bytes.length % 32 === 0) {\n try {\n return this.#abiCoder.decode(fragment.outputs, bytes);\n } catch (error) {\n message = \"could not decode result data\";\n }\n }\n (0, index_js_3.assert)(false, message, \"BAD_DATA\", {\n value: (0, index_js_3.hexlify)(bytes),\n info: { method: fragment.name, signature: fragment.format() }\n });\n }\n makeError(_data, tx) {\n const data = (0, index_js_3.getBytes)(_data, \"data\");\n const error = abi_coder_js_1.AbiCoder.getBuiltinCallException(\"call\", tx, data);\n const customPrefix = \"execution reverted (unknown custom error)\";\n if (error.message.startsWith(customPrefix)) {\n const selector = (0, index_js_3.hexlify)(data.slice(0, 4));\n const ef = this.getError(selector);\n if (ef) {\n try {\n const args = this.#abiCoder.decode(ef.inputs, data.slice(4));\n error.revert = {\n name: ef.name,\n signature: ef.format(),\n args\n };\n error.reason = error.revert.signature;\n error.message = `execution reverted: ${error.reason}`;\n } catch (e3) {\n error.message = `execution reverted (coult not decode custom error)`;\n }\n }\n }\n const parsed = this.parseTransaction(tx);\n if (parsed) {\n error.invocation = {\n method: parsed.name,\n signature: parsed.signature,\n args: parsed.args\n };\n }\n return error;\n }\n /**\n * Encodes the result data (e.g. from an ``eth_call``) for the\n * specified function (see [[getFunction]] for valid values\n * for %%fragment%%) with %%values%%.\n *\n * This is generally not used by most developers, unless trying to mock\n * a result from a Contract.\n */\n encodeFunctionResult(fragment, values) {\n if (typeof fragment === \"string\") {\n const f6 = this.getFunction(fragment);\n (0, index_js_3.assertArgument)(f6, \"unknown function\", \"fragment\", fragment);\n fragment = f6;\n }\n return (0, index_js_3.hexlify)(this.#abiCoder.encode(fragment.outputs, values || []));\n }\n /*\n spelunk(inputs: Array, values: ReadonlyArray, processfunc: (type: string, value: any) => Promise): Promise> {\n const promises: Array> = [ ];\n const process = function(type: ParamType, value: any): any {\n if (type.baseType === \"array\") {\n return descend(type.child\n }\n if (type. === \"address\") {\n }\n };\n \n const descend = function (inputs: Array, values: ReadonlyArray) {\n if (inputs.length !== values.length) { throw new Error(\"length mismatch\"); }\n \n };\n \n const result: Array = [ ];\n values.forEach((value, index) => {\n if (value == null) {\n topics.push(null);\n } else if (param.baseType === \"array\" || param.baseType === \"tuple\") {\n logger.throwArgumentError(\"filtering with tuples or arrays not supported\", (\"contract.\" + param.name), value);\n } else if (Array.isArray(value)) {\n topics.push(value.map((value) => encodeTopic(param, value)));\n } else {\n topics.push(encodeTopic(param, value));\n }\n });\n }\n */\n // Create the filter for the event with search criteria (e.g. for eth_filterLog)\n encodeFilterTopics(fragment, values) {\n if (typeof fragment === \"string\") {\n const f6 = this.getEvent(fragment);\n (0, index_js_3.assertArgument)(f6, \"unknown event\", \"eventFragment\", fragment);\n fragment = f6;\n }\n (0, index_js_3.assert)(values.length <= fragment.inputs.length, `too many arguments for ${fragment.format()}`, \"UNEXPECTED_ARGUMENT\", { count: values.length, expectedCount: fragment.inputs.length });\n const topics = [];\n if (!fragment.anonymous) {\n topics.push(fragment.topicHash);\n }\n const encodeTopic = (param, value) => {\n if (param.type === \"string\") {\n return (0, index_js_2.id)(value);\n } else if (param.type === \"bytes\") {\n return (0, index_js_1.keccak256)((0, index_js_3.hexlify)(value));\n }\n if (param.type === \"bool\" && typeof value === \"boolean\") {\n value = value ? \"0x01\" : \"0x00\";\n } else if (param.type.match(/^u?int/)) {\n value = (0, index_js_3.toBeHex)(value);\n } else if (param.type.match(/^bytes/)) {\n value = (0, index_js_3.zeroPadBytes)(value, 32);\n } else if (param.type === \"address\") {\n this.#abiCoder.encode([\"address\"], [value]);\n }\n return (0, index_js_3.zeroPadValue)((0, index_js_3.hexlify)(value), 32);\n };\n values.forEach((value, index2) => {\n const param = fragment.inputs[index2];\n if (!param.indexed) {\n (0, index_js_3.assertArgument)(value == null, \"cannot filter non-indexed parameters; must be null\", \"contract.\" + param.name, value);\n return;\n }\n if (value == null) {\n topics.push(null);\n } else if (param.baseType === \"array\" || param.baseType === \"tuple\") {\n (0, index_js_3.assertArgument)(false, \"filtering with tuples or arrays not supported\", \"contract.\" + param.name, value);\n } else if (Array.isArray(value)) {\n topics.push(value.map((value2) => encodeTopic(param, value2)));\n } else {\n topics.push(encodeTopic(param, value));\n }\n });\n while (topics.length && topics[topics.length - 1] === null) {\n topics.pop();\n }\n return topics;\n }\n encodeEventLog(fragment, values) {\n if (typeof fragment === \"string\") {\n const f6 = this.getEvent(fragment);\n (0, index_js_3.assertArgument)(f6, \"unknown event\", \"eventFragment\", fragment);\n fragment = f6;\n }\n const topics = [];\n const dataTypes = [];\n const dataValues = [];\n if (!fragment.anonymous) {\n topics.push(fragment.topicHash);\n }\n (0, index_js_3.assertArgument)(values.length === fragment.inputs.length, \"event arguments/values mismatch\", \"values\", values);\n fragment.inputs.forEach((param, index2) => {\n const value = values[index2];\n if (param.indexed) {\n if (param.type === \"string\") {\n topics.push((0, index_js_2.id)(value));\n } else if (param.type === \"bytes\") {\n topics.push((0, index_js_1.keccak256)(value));\n } else if (param.baseType === \"tuple\" || param.baseType === \"array\") {\n throw new Error(\"not implemented\");\n } else {\n topics.push(this.#abiCoder.encode([param.type], [value]));\n }\n } else {\n dataTypes.push(param);\n dataValues.push(value);\n }\n });\n return {\n data: this.#abiCoder.encode(dataTypes, dataValues),\n topics\n };\n }\n // Decode a filter for the event and the search criteria\n decodeEventLog(fragment, data, topics) {\n if (typeof fragment === \"string\") {\n const f6 = this.getEvent(fragment);\n (0, index_js_3.assertArgument)(f6, \"unknown event\", \"eventFragment\", fragment);\n fragment = f6;\n }\n if (topics != null && !fragment.anonymous) {\n const eventTopic = fragment.topicHash;\n (0, index_js_3.assertArgument)((0, index_js_3.isHexString)(topics[0], 32) && topics[0].toLowerCase() === eventTopic, \"fragment/topic mismatch\", \"topics[0]\", topics[0]);\n topics = topics.slice(1);\n }\n const indexed = [];\n const nonIndexed = [];\n const dynamic = [];\n fragment.inputs.forEach((param, index2) => {\n if (param.indexed) {\n if (param.type === \"string\" || param.type === \"bytes\" || param.baseType === \"tuple\" || param.baseType === \"array\") {\n indexed.push(fragments_js_1.ParamType.from({ type: \"bytes32\", name: param.name }));\n dynamic.push(true);\n } else {\n indexed.push(param);\n dynamic.push(false);\n }\n } else {\n nonIndexed.push(param);\n dynamic.push(false);\n }\n });\n const resultIndexed = topics != null ? this.#abiCoder.decode(indexed, (0, index_js_3.concat)(topics)) : null;\n const resultNonIndexed = this.#abiCoder.decode(nonIndexed, data, true);\n const values = [];\n const keys = [];\n let nonIndexedIndex = 0, indexedIndex = 0;\n fragment.inputs.forEach((param, index2) => {\n let value = null;\n if (param.indexed) {\n if (resultIndexed == null) {\n value = new Indexed(null);\n } else if (dynamic[index2]) {\n value = new Indexed(resultIndexed[indexedIndex++]);\n } else {\n try {\n value = resultIndexed[indexedIndex++];\n } catch (error) {\n value = error;\n }\n }\n } else {\n try {\n value = resultNonIndexed[nonIndexedIndex++];\n } catch (error) {\n value = error;\n }\n }\n values.push(value);\n keys.push(param.name || null);\n });\n return abstract_coder_js_1.Result.fromItems(values, keys);\n }\n /**\n * Parses a transaction, finding the matching function and extracts\n * the parameter values along with other useful function details.\n *\n * If the matching function cannot be found, return null.\n */\n parseTransaction(tx) {\n const data = (0, index_js_3.getBytes)(tx.data, \"tx.data\");\n const value = (0, index_js_3.getBigInt)(tx.value != null ? tx.value : 0, \"tx.value\");\n const fragment = this.getFunction((0, index_js_3.hexlify)(data.slice(0, 4)));\n if (!fragment) {\n return null;\n }\n const args = this.#abiCoder.decode(fragment.inputs, data.slice(4));\n return new TransactionDescription(fragment, fragment.selector, args, value);\n }\n parseCallResult(data) {\n throw new Error(\"@TODO\");\n }\n /**\n * Parses a receipt log, finding the matching event and extracts\n * the parameter values along with other useful event details.\n *\n * If the matching event cannot be found, returns null.\n */\n parseLog(log) {\n const fragment = this.getEvent(log.topics[0]);\n if (!fragment || fragment.anonymous) {\n return null;\n }\n return new LogDescription(fragment, fragment.topicHash, this.decodeEventLog(fragment, log.data, log.topics));\n }\n /**\n * Parses a revert data, finding the matching error and extracts\n * the parameter values along with other useful error details.\n *\n * If the matching error cannot be found, returns null.\n */\n parseError(data) {\n const hexData = (0, index_js_3.hexlify)(data);\n const fragment = this.getError((0, index_js_3.dataSlice)(hexData, 0, 4));\n if (!fragment) {\n return null;\n }\n const args = this.#abiCoder.decode(fragment.inputs, (0, index_js_3.dataSlice)(hexData, 4));\n return new ErrorDescription(fragment, fragment.selector, args);\n }\n /**\n * Creates a new [[Interface]] from the ABI %%value%%.\n *\n * The %%value%% may be provided as an existing [[Interface]] object,\n * a JSON-encoded ABI or any Human-Readable ABI format.\n */\n static from(value) {\n if (value instanceof _Interface) {\n return value;\n }\n if (typeof value === \"string\") {\n return new _Interface(JSON.parse(value));\n }\n if (typeof value.formatJson === \"function\") {\n return new _Interface(value.formatJson());\n }\n if (typeof value.format === \"function\") {\n return new _Interface(value.format(\"json\"));\n }\n return new _Interface(value);\n }\n };\n exports3.Interface = Interface;\n }\n });\n\n // ../../../node_modules/.pnpm/ethers@6.15.0_bufferutil@4.0.9_utf-8-validate@5.0.10/node_modules/ethers/lib.commonjs/abi/index.js\n var require_abi = __commonJS({\n \"../../../node_modules/.pnpm/ethers@6.15.0_bufferutil@4.0.9_utf-8-validate@5.0.10/node_modules/ethers/lib.commonjs/abi/index.js\"(exports3) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n Object.defineProperty(exports3, \"__esModule\", { value: true });\n exports3.Typed = exports3.Result = exports3.TransactionDescription = exports3.LogDescription = exports3.ErrorDescription = exports3.Interface = exports3.Indexed = exports3.checkResultErrors = exports3.StructFragment = exports3.ParamType = exports3.NamedFragment = exports3.FunctionFragment = exports3.Fragment = exports3.FallbackFragment = exports3.EventFragment = exports3.ErrorFragment = exports3.ConstructorFragment = exports3.encodeBytes32String = exports3.decodeBytes32String = exports3.AbiCoder = void 0;\n var abi_coder_js_1 = require_abi_coder2();\n Object.defineProperty(exports3, \"AbiCoder\", { enumerable: true, get: function() {\n return abi_coder_js_1.AbiCoder;\n } });\n var bytes32_js_1 = require_bytes322();\n Object.defineProperty(exports3, \"decodeBytes32String\", { enumerable: true, get: function() {\n return bytes32_js_1.decodeBytes32String;\n } });\n Object.defineProperty(exports3, \"encodeBytes32String\", { enumerable: true, get: function() {\n return bytes32_js_1.encodeBytes32String;\n } });\n var fragments_js_1 = require_fragments2();\n Object.defineProperty(exports3, \"ConstructorFragment\", { enumerable: true, get: function() {\n return fragments_js_1.ConstructorFragment;\n } });\n Object.defineProperty(exports3, \"ErrorFragment\", { enumerable: true, get: function() {\n return fragments_js_1.ErrorFragment;\n } });\n Object.defineProperty(exports3, \"EventFragment\", { enumerable: true, get: function() {\n return fragments_js_1.EventFragment;\n } });\n Object.defineProperty(exports3, \"FallbackFragment\", { enumerable: true, get: function() {\n return fragments_js_1.FallbackFragment;\n } });\n Object.defineProperty(exports3, \"Fragment\", { enumerable: true, get: function() {\n return fragments_js_1.Fragment;\n } });\n Object.defineProperty(exports3, \"FunctionFragment\", { enumerable: true, get: function() {\n return fragments_js_1.FunctionFragment;\n } });\n Object.defineProperty(exports3, \"NamedFragment\", { enumerable: true, get: function() {\n return fragments_js_1.NamedFragment;\n } });\n Object.defineProperty(exports3, \"ParamType\", { enumerable: true, get: function() {\n return fragments_js_1.ParamType;\n } });\n Object.defineProperty(exports3, \"StructFragment\", { enumerable: true, get: function() {\n return fragments_js_1.StructFragment;\n } });\n var interface_js_1 = require_interface2();\n Object.defineProperty(exports3, \"checkResultErrors\", { enumerable: true, get: function() {\n return interface_js_1.checkResultErrors;\n } });\n Object.defineProperty(exports3, \"Indexed\", { enumerable: true, get: function() {\n return interface_js_1.Indexed;\n } });\n Object.defineProperty(exports3, \"Interface\", { enumerable: true, get: function() {\n return interface_js_1.Interface;\n } });\n Object.defineProperty(exports3, \"ErrorDescription\", { enumerable: true, get: function() {\n return interface_js_1.ErrorDescription;\n } });\n Object.defineProperty(exports3, \"LogDescription\", { enumerable: true, get: function() {\n return interface_js_1.LogDescription;\n } });\n Object.defineProperty(exports3, \"TransactionDescription\", { enumerable: true, get: function() {\n return interface_js_1.TransactionDescription;\n } });\n Object.defineProperty(exports3, \"Result\", { enumerable: true, get: function() {\n return interface_js_1.Result;\n } });\n var typed_js_1 = require_typed();\n Object.defineProperty(exports3, \"Typed\", { enumerable: true, get: function() {\n return typed_js_1.Typed;\n } });\n }\n });\n\n // ../../../node_modules/.pnpm/ethers@6.15.0_bufferutil@4.0.9_utf-8-validate@5.0.10/node_modules/ethers/lib.commonjs/providers/provider.js\n var require_provider = __commonJS({\n \"../../../node_modules/.pnpm/ethers@6.15.0_bufferutil@4.0.9_utf-8-validate@5.0.10/node_modules/ethers/lib.commonjs/providers/provider.js\"(exports3) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n Object.defineProperty(exports3, \"__esModule\", { value: true });\n exports3.TransactionResponse = exports3.TransactionReceipt = exports3.Log = exports3.Block = exports3.copyRequest = exports3.FeeData = void 0;\n var index_js_1 = require_utils8();\n var index_js_2 = require_transaction2();\n var BN_0 = BigInt(0);\n function getValue(value) {\n if (value == null) {\n return null;\n }\n return value;\n }\n function toJson(value) {\n if (value == null) {\n return null;\n }\n return value.toString();\n }\n var FeeData = class {\n /**\n * The gas price for legacy networks.\n */\n gasPrice;\n /**\n * The maximum fee to pay per gas.\n *\n * The base fee per gas is defined by the network and based on\n * congestion, increasing the cost during times of heavy load\n * and lowering when less busy.\n *\n * The actual fee per gas will be the base fee for the block\n * and the priority fee, up to the max fee per gas.\n *\n * This will be ``null`` on legacy networks (i.e. [pre-EIP-1559](link-eip-1559))\n */\n maxFeePerGas;\n /**\n * The additional amout to pay per gas to encourage a validator\n * to include the transaction.\n *\n * The purpose of this is to compensate the validator for the\n * adjusted risk for including a given transaction.\n *\n * This will be ``null`` on legacy networks (i.e. [pre-EIP-1559](link-eip-1559))\n */\n maxPriorityFeePerGas;\n /**\n * Creates a new FeeData for %%gasPrice%%, %%maxFeePerGas%% and\n * %%maxPriorityFeePerGas%%.\n */\n constructor(gasPrice, maxFeePerGas, maxPriorityFeePerGas) {\n (0, index_js_1.defineProperties)(this, {\n gasPrice: getValue(gasPrice),\n maxFeePerGas: getValue(maxFeePerGas),\n maxPriorityFeePerGas: getValue(maxPriorityFeePerGas)\n });\n }\n /**\n * Returns a JSON-friendly value.\n */\n toJSON() {\n const { gasPrice, maxFeePerGas, maxPriorityFeePerGas } = this;\n return {\n _type: \"FeeData\",\n gasPrice: toJson(gasPrice),\n maxFeePerGas: toJson(maxFeePerGas),\n maxPriorityFeePerGas: toJson(maxPriorityFeePerGas)\n };\n }\n };\n exports3.FeeData = FeeData;\n function copyRequest(req) {\n const result = {};\n if (req.to) {\n result.to = req.to;\n }\n if (req.from) {\n result.from = req.from;\n }\n if (req.data) {\n result.data = (0, index_js_1.hexlify)(req.data);\n }\n const bigIntKeys = \"chainId,gasLimit,gasPrice,maxFeePerBlobGas,maxFeePerGas,maxPriorityFeePerGas,value\".split(/,/);\n for (const key of bigIntKeys) {\n if (!(key in req) || req[key] == null) {\n continue;\n }\n result[key] = (0, index_js_1.getBigInt)(req[key], `request.${key}`);\n }\n const numberKeys = \"type,nonce\".split(/,/);\n for (const key of numberKeys) {\n if (!(key in req) || req[key] == null) {\n continue;\n }\n result[key] = (0, index_js_1.getNumber)(req[key], `request.${key}`);\n }\n if (req.accessList) {\n result.accessList = (0, index_js_2.accessListify)(req.accessList);\n }\n if (req.authorizationList) {\n result.authorizationList = req.authorizationList.slice();\n }\n if (\"blockTag\" in req) {\n result.blockTag = req.blockTag;\n }\n if (\"enableCcipRead\" in req) {\n result.enableCcipRead = !!req.enableCcipRead;\n }\n if (\"customData\" in req) {\n result.customData = req.customData;\n }\n if (\"blobVersionedHashes\" in req && req.blobVersionedHashes) {\n result.blobVersionedHashes = req.blobVersionedHashes.slice();\n }\n if (\"kzg\" in req) {\n result.kzg = req.kzg;\n }\n if (\"blobs\" in req && req.blobs) {\n result.blobs = req.blobs.map((b4) => {\n if ((0, index_js_1.isBytesLike)(b4)) {\n return (0, index_js_1.hexlify)(b4);\n }\n return Object.assign({}, b4);\n });\n }\n return result;\n }\n exports3.copyRequest = copyRequest;\n var Block = class {\n /**\n * The provider connected to the block used to fetch additional details\n * if necessary.\n */\n provider;\n /**\n * The block number, sometimes called the block height. This is a\n * sequential number that is one higher than the parent block.\n */\n number;\n /**\n * The block hash.\n *\n * This hash includes all properties, so can be safely used to identify\n * an exact set of block properties.\n */\n hash;\n /**\n * The timestamp for this block, which is the number of seconds since\n * epoch that this block was included.\n */\n timestamp;\n /**\n * The block hash of the parent block.\n */\n parentHash;\n /**\n * The hash tree root of the parent beacon block for the given\n * execution block. See [[link-eip-4788]].\n */\n parentBeaconBlockRoot;\n /**\n * The nonce.\n *\n * On legacy networks, this is the random number inserted which\n * permitted the difficulty target to be reached.\n */\n nonce;\n /**\n * The difficulty target.\n *\n * On legacy networks, this is the proof-of-work target required\n * for a block to meet the protocol rules to be included.\n *\n * On modern networks, this is a random number arrived at using\n * randao. @TODO: Find links?\n */\n difficulty;\n /**\n * The total gas limit for this block.\n */\n gasLimit;\n /**\n * The total gas used in this block.\n */\n gasUsed;\n /**\n * The root hash for the global state after applying changes\n * in this block.\n */\n stateRoot;\n /**\n * The hash of the transaction receipts trie.\n */\n receiptsRoot;\n /**\n * The total amount of blob gas consumed by the transactions\n * within the block. See [[link-eip-4844]].\n */\n blobGasUsed;\n /**\n * The running total of blob gas consumed in excess of the\n * target, prior to the block. See [[link-eip-4844]].\n */\n excessBlobGas;\n /**\n * The miner coinbase address, wihch receives any subsidies for\n * including this block.\n */\n miner;\n /**\n * The latest RANDAO mix of the post beacon state of\n * the previous block.\n */\n prevRandao;\n /**\n * Any extra data the validator wished to include.\n */\n extraData;\n /**\n * The base fee per gas that all transactions in this block were\n * charged.\n *\n * This adjusts after each block, depending on how congested the network\n * is.\n */\n baseFeePerGas;\n #transactions;\n /**\n * Create a new **Block** object.\n *\n * This should generally not be necessary as the unless implementing a\n * low-level library.\n */\n constructor(block, provider) {\n this.#transactions = block.transactions.map((tx) => {\n if (typeof tx !== \"string\") {\n return new TransactionResponse(tx, provider);\n }\n return tx;\n });\n (0, index_js_1.defineProperties)(this, {\n provider,\n hash: getValue(block.hash),\n number: block.number,\n timestamp: block.timestamp,\n parentHash: block.parentHash,\n parentBeaconBlockRoot: block.parentBeaconBlockRoot,\n nonce: block.nonce,\n difficulty: block.difficulty,\n gasLimit: block.gasLimit,\n gasUsed: block.gasUsed,\n blobGasUsed: block.blobGasUsed,\n excessBlobGas: block.excessBlobGas,\n miner: block.miner,\n prevRandao: getValue(block.prevRandao),\n extraData: block.extraData,\n baseFeePerGas: getValue(block.baseFeePerGas),\n stateRoot: block.stateRoot,\n receiptsRoot: block.receiptsRoot\n });\n }\n /**\n * Returns the list of transaction hashes, in the order\n * they were executed within the block.\n */\n get transactions() {\n return this.#transactions.map((tx) => {\n if (typeof tx === \"string\") {\n return tx;\n }\n return tx.hash;\n });\n }\n /**\n * Returns the complete transactions, in the order they\n * were executed within the block.\n *\n * This is only available for blocks which prefetched\n * transactions, by passing ``true`` to %%prefetchTxs%%\n * into [[Provider-getBlock]].\n */\n get prefetchedTransactions() {\n const txs = this.#transactions.slice();\n if (txs.length === 0) {\n return [];\n }\n (0, index_js_1.assert)(typeof txs[0] === \"object\", \"transactions were not prefetched with block request\", \"UNSUPPORTED_OPERATION\", {\n operation: \"transactionResponses()\"\n });\n return txs;\n }\n /**\n * Returns a JSON-friendly value.\n */\n toJSON() {\n const { baseFeePerGas, difficulty, extraData, gasLimit, gasUsed, hash: hash3, miner, prevRandao, nonce, number: number2, parentHash, parentBeaconBlockRoot, stateRoot, receiptsRoot, timestamp, transactions } = this;\n return {\n _type: \"Block\",\n baseFeePerGas: toJson(baseFeePerGas),\n difficulty: toJson(difficulty),\n extraData,\n gasLimit: toJson(gasLimit),\n gasUsed: toJson(gasUsed),\n blobGasUsed: toJson(this.blobGasUsed),\n excessBlobGas: toJson(this.excessBlobGas),\n hash: hash3,\n miner,\n prevRandao,\n nonce,\n number: number2,\n parentHash,\n timestamp,\n parentBeaconBlockRoot,\n stateRoot,\n receiptsRoot,\n transactions\n };\n }\n [Symbol.iterator]() {\n let index2 = 0;\n const txs = this.transactions;\n return {\n next: () => {\n if (index2 < this.length) {\n return {\n value: txs[index2++],\n done: false\n };\n }\n return { value: void 0, done: true };\n }\n };\n }\n /**\n * The number of transactions in this block.\n */\n get length() {\n return this.#transactions.length;\n }\n /**\n * The [[link-js-date]] this block was included at.\n */\n get date() {\n if (this.timestamp == null) {\n return null;\n }\n return new Date(this.timestamp * 1e3);\n }\n /**\n * Get the transaction at %%indexe%% within this block.\n */\n async getTransaction(indexOrHash) {\n let tx = void 0;\n if (typeof indexOrHash === \"number\") {\n tx = this.#transactions[indexOrHash];\n } else {\n const hash3 = indexOrHash.toLowerCase();\n for (const v2 of this.#transactions) {\n if (typeof v2 === \"string\") {\n if (v2 !== hash3) {\n continue;\n }\n tx = v2;\n break;\n } else {\n if (v2.hash !== hash3) {\n continue;\n }\n tx = v2;\n break;\n }\n }\n }\n if (tx == null) {\n throw new Error(\"no such tx\");\n }\n if (typeof tx === \"string\") {\n return await this.provider.getTransaction(tx);\n } else {\n return tx;\n }\n }\n /**\n * If a **Block** was fetched with a request to include the transactions\n * this will allow synchronous access to those transactions.\n *\n * If the transactions were not prefetched, this will throw.\n */\n getPrefetchedTransaction(indexOrHash) {\n const txs = this.prefetchedTransactions;\n if (typeof indexOrHash === \"number\") {\n return txs[indexOrHash];\n }\n indexOrHash = indexOrHash.toLowerCase();\n for (const tx of txs) {\n if (tx.hash === indexOrHash) {\n return tx;\n }\n }\n (0, index_js_1.assertArgument)(false, \"no matching transaction\", \"indexOrHash\", indexOrHash);\n }\n /**\n * Returns true if this block been mined. This provides a type guard\n * for all properties on a [[MinedBlock]].\n */\n isMined() {\n return !!this.hash;\n }\n /**\n * Returns true if this block is an [[link-eip-2930]] block.\n */\n isLondon() {\n return !!this.baseFeePerGas;\n }\n /**\n * @_ignore:\n */\n orphanedEvent() {\n if (!this.isMined()) {\n throw new Error(\"\");\n }\n return createOrphanedBlockFilter(this);\n }\n };\n exports3.Block = Block;\n var Log = class {\n /**\n * The provider connected to the log used to fetch additional details\n * if necessary.\n */\n provider;\n /**\n * The transaction hash of the transaction this log occurred in. Use the\n * [[Log-getTransaction]] to get the [[TransactionResponse]].\n */\n transactionHash;\n /**\n * The block hash of the block this log occurred in. Use the\n * [[Log-getBlock]] to get the [[Block]].\n */\n blockHash;\n /**\n * The block number of the block this log occurred in. It is preferred\n * to use the [[Block-hash]] when fetching the related [[Block]],\n * since in the case of an orphaned block, the block at that height may\n * have changed.\n */\n blockNumber;\n /**\n * If the **Log** represents a block that was removed due to an orphaned\n * block, this will be true.\n *\n * This can only happen within an orphan event listener.\n */\n removed;\n /**\n * The address of the contract that emitted this log.\n */\n address;\n /**\n * The data included in this log when it was emitted.\n */\n data;\n /**\n * The indexed topics included in this log when it was emitted.\n *\n * All topics are included in the bloom filters, so they can be\n * efficiently filtered using the [[Provider-getLogs]] method.\n */\n topics;\n /**\n * The index within the block this log occurred at. This is generally\n * not useful to developers, but can be used with the various roots\n * to proof inclusion within a block.\n */\n index;\n /**\n * The index within the transaction of this log.\n */\n transactionIndex;\n /**\n * @_ignore:\n */\n constructor(log, provider) {\n this.provider = provider;\n const topics = Object.freeze(log.topics.slice());\n (0, index_js_1.defineProperties)(this, {\n transactionHash: log.transactionHash,\n blockHash: log.blockHash,\n blockNumber: log.blockNumber,\n removed: log.removed,\n address: log.address,\n data: log.data,\n topics,\n index: log.index,\n transactionIndex: log.transactionIndex\n });\n }\n /**\n * Returns a JSON-compatible object.\n */\n toJSON() {\n const { address, blockHash, blockNumber, data, index: index2, removed, topics, transactionHash, transactionIndex } = this;\n return {\n _type: \"log\",\n address,\n blockHash,\n blockNumber,\n data,\n index: index2,\n removed,\n topics,\n transactionHash,\n transactionIndex\n };\n }\n /**\n * Returns the block that this log occurred in.\n */\n async getBlock() {\n const block = await this.provider.getBlock(this.blockHash);\n (0, index_js_1.assert)(!!block, \"failed to find transaction\", \"UNKNOWN_ERROR\", {});\n return block;\n }\n /**\n * Returns the transaction that this log occurred in.\n */\n async getTransaction() {\n const tx = await this.provider.getTransaction(this.transactionHash);\n (0, index_js_1.assert)(!!tx, \"failed to find transaction\", \"UNKNOWN_ERROR\", {});\n return tx;\n }\n /**\n * Returns the transaction receipt fot the transaction that this\n * log occurred in.\n */\n async getTransactionReceipt() {\n const receipt = await this.provider.getTransactionReceipt(this.transactionHash);\n (0, index_js_1.assert)(!!receipt, \"failed to find transaction receipt\", \"UNKNOWN_ERROR\", {});\n return receipt;\n }\n /**\n * @_ignore:\n */\n removedEvent() {\n return createRemovedLogFilter(this);\n }\n };\n exports3.Log = Log;\n var TransactionReceipt = class {\n /**\n * The provider connected to the log used to fetch additional details\n * if necessary.\n */\n provider;\n /**\n * The address the transaction was sent to.\n */\n to;\n /**\n * The sender of the transaction.\n */\n from;\n /**\n * The address of the contract if the transaction was directly\n * responsible for deploying one.\n *\n * This is non-null **only** if the ``to`` is empty and the ``data``\n * was successfully executed as initcode.\n */\n contractAddress;\n /**\n * The transaction hash.\n */\n hash;\n /**\n * The index of this transaction within the block transactions.\n */\n index;\n /**\n * The block hash of the [[Block]] this transaction was included in.\n */\n blockHash;\n /**\n * The block number of the [[Block]] this transaction was included in.\n */\n blockNumber;\n /**\n * The bloom filter bytes that represent all logs that occurred within\n * this transaction. This is generally not useful for most developers,\n * but can be used to validate the included logs.\n */\n logsBloom;\n /**\n * The actual amount of gas used by this transaction.\n *\n * When creating a transaction, the amount of gas that will be used can\n * only be approximated, but the sender must pay the gas fee for the\n * entire gas limit. After the transaction, the difference is refunded.\n */\n gasUsed;\n /**\n * The gas used for BLObs. See [[link-eip-4844]].\n */\n blobGasUsed;\n /**\n * The amount of gas used by all transactions within the block for this\n * and all transactions with a lower ``index``.\n *\n * This is generally not useful for developers but can be used to\n * validate certain aspects of execution.\n */\n cumulativeGasUsed;\n /**\n * The actual gas price used during execution.\n *\n * Due to the complexity of [[link-eip-1559]] this value can only\n * be caluclated after the transaction has been mined, snce the base\n * fee is protocol-enforced.\n */\n gasPrice;\n /**\n * The price paid per BLOB in gas. See [[link-eip-4844]].\n */\n blobGasPrice;\n /**\n * The [[link-eip-2718]] transaction type.\n */\n type;\n //readonly byzantium!: boolean;\n /**\n * The status of this transaction, indicating success (i.e. ``1``) or\n * a revert (i.e. ``0``).\n *\n * This is available in post-byzantium blocks, but some backends may\n * backfill this value.\n */\n status;\n /**\n * The root hash of this transaction.\n *\n * This is no present and was only included in pre-byzantium blocks, but\n * could be used to validate certain parts of the receipt.\n */\n root;\n #logs;\n /**\n * @_ignore:\n */\n constructor(tx, provider) {\n this.#logs = Object.freeze(tx.logs.map((log) => {\n return new Log(log, provider);\n }));\n let gasPrice = BN_0;\n if (tx.effectiveGasPrice != null) {\n gasPrice = tx.effectiveGasPrice;\n } else if (tx.gasPrice != null) {\n gasPrice = tx.gasPrice;\n }\n (0, index_js_1.defineProperties)(this, {\n provider,\n to: tx.to,\n from: tx.from,\n contractAddress: tx.contractAddress,\n hash: tx.hash,\n index: tx.index,\n blockHash: tx.blockHash,\n blockNumber: tx.blockNumber,\n logsBloom: tx.logsBloom,\n gasUsed: tx.gasUsed,\n cumulativeGasUsed: tx.cumulativeGasUsed,\n blobGasUsed: tx.blobGasUsed,\n gasPrice,\n blobGasPrice: tx.blobGasPrice,\n type: tx.type,\n //byzantium: tx.byzantium,\n status: tx.status,\n root: tx.root\n });\n }\n /**\n * The logs for this transaction.\n */\n get logs() {\n return this.#logs;\n }\n /**\n * Returns a JSON-compatible representation.\n */\n toJSON() {\n const {\n to,\n from: from14,\n contractAddress,\n hash: hash3,\n index: index2,\n blockHash,\n blockNumber,\n logsBloom,\n logs,\n //byzantium, \n status,\n root\n } = this;\n return {\n _type: \"TransactionReceipt\",\n blockHash,\n blockNumber,\n //byzantium, \n contractAddress,\n cumulativeGasUsed: toJson(this.cumulativeGasUsed),\n from: from14,\n gasPrice: toJson(this.gasPrice),\n blobGasUsed: toJson(this.blobGasUsed),\n blobGasPrice: toJson(this.blobGasPrice),\n gasUsed: toJson(this.gasUsed),\n hash: hash3,\n index: index2,\n logs,\n logsBloom,\n root,\n status,\n to\n };\n }\n /**\n * @_ignore:\n */\n get length() {\n return this.logs.length;\n }\n [Symbol.iterator]() {\n let index2 = 0;\n return {\n next: () => {\n if (index2 < this.length) {\n return { value: this.logs[index2++], done: false };\n }\n return { value: void 0, done: true };\n }\n };\n }\n /**\n * The total fee for this transaction, in wei.\n */\n get fee() {\n return this.gasUsed * this.gasPrice;\n }\n /**\n * Resolves to the block this transaction occurred in.\n */\n async getBlock() {\n const block = await this.provider.getBlock(this.blockHash);\n if (block == null) {\n throw new Error(\"TODO\");\n }\n return block;\n }\n /**\n * Resolves to the transaction this transaction occurred in.\n */\n async getTransaction() {\n const tx = await this.provider.getTransaction(this.hash);\n if (tx == null) {\n throw new Error(\"TODO\");\n }\n return tx;\n }\n /**\n * Resolves to the return value of the execution of this transaction.\n *\n * Support for this feature is limited, as it requires an archive node\n * with the ``debug_`` or ``trace_`` API enabled.\n */\n async getResult() {\n return await this.provider.getTransactionResult(this.hash);\n }\n /**\n * Resolves to the number of confirmations this transaction has.\n */\n async confirmations() {\n return await this.provider.getBlockNumber() - this.blockNumber + 1;\n }\n /**\n * @_ignore:\n */\n removedEvent() {\n return createRemovedTransactionFilter(this);\n }\n /**\n * @_ignore:\n */\n reorderedEvent(other) {\n (0, index_js_1.assert)(!other || other.isMined(), \"unmined 'other' transction cannot be orphaned\", \"UNSUPPORTED_OPERATION\", { operation: \"reorderedEvent(other)\" });\n return createReorderedTransactionFilter(this, other);\n }\n };\n exports3.TransactionReceipt = TransactionReceipt;\n var TransactionResponse = class _TransactionResponse {\n /**\n * The provider this is connected to, which will influence how its\n * methods will resolve its async inspection methods.\n */\n provider;\n /**\n * The block number of the block that this transaction was included in.\n *\n * This is ``null`` for pending transactions.\n */\n blockNumber;\n /**\n * The blockHash of the block that this transaction was included in.\n *\n * This is ``null`` for pending transactions.\n */\n blockHash;\n /**\n * The index within the block that this transaction resides at.\n */\n index;\n /**\n * The transaction hash.\n */\n hash;\n /**\n * The [[link-eip-2718]] transaction envelope type. This is\n * ``0`` for legacy transactions types.\n */\n type;\n /**\n * The receiver of this transaction.\n *\n * If ``null``, then the transaction is an initcode transaction.\n * This means the result of executing the [[data]] will be deployed\n * as a new contract on chain (assuming it does not revert) and the\n * address may be computed using [[getCreateAddress]].\n */\n to;\n /**\n * The sender of this transaction. It is implicitly computed\n * from the transaction pre-image hash (as the digest) and the\n * [[signature]] using ecrecover.\n */\n from;\n /**\n * The nonce, which is used to prevent replay attacks and offer\n * a method to ensure transactions from a given sender are explicitly\n * ordered.\n *\n * When sending a transaction, this must be equal to the number of\n * transactions ever sent by [[from]].\n */\n nonce;\n /**\n * The maximum units of gas this transaction can consume. If execution\n * exceeds this, the entries transaction is reverted and the sender\n * is charged for the full amount, despite not state changes being made.\n */\n gasLimit;\n /**\n * The gas price can have various values, depending on the network.\n *\n * In modern networks, for transactions that are included this is\n * the //effective gas price// (the fee per gas that was actually\n * charged), while for transactions that have not been included yet\n * is the [[maxFeePerGas]].\n *\n * For legacy transactions, or transactions on legacy networks, this\n * is the fee that will be charged per unit of gas the transaction\n * consumes.\n */\n gasPrice;\n /**\n * The maximum priority fee (per unit of gas) to allow a\n * validator to charge the sender. This is inclusive of the\n * [[maxFeeFeePerGas]].\n */\n maxPriorityFeePerGas;\n /**\n * The maximum fee (per unit of gas) to allow this transaction\n * to charge the sender.\n */\n maxFeePerGas;\n /**\n * The [[link-eip-4844]] max fee per BLOb gas.\n */\n maxFeePerBlobGas;\n /**\n * The data.\n */\n data;\n /**\n * The value, in wei. Use [[formatEther]] to format this value\n * as ether.\n */\n value;\n /**\n * The chain ID.\n */\n chainId;\n /**\n * The signature.\n */\n signature;\n /**\n * The [[link-eip-2930]] access list for transaction types that\n * support it, otherwise ``null``.\n */\n accessList;\n /**\n * The [[link-eip-4844]] BLOb versioned hashes.\n */\n blobVersionedHashes;\n /**\n * The [[link-eip-7702]] authorizations (if any).\n */\n authorizationList;\n #startBlock;\n /**\n * @_ignore:\n */\n constructor(tx, provider) {\n this.provider = provider;\n this.blockNumber = tx.blockNumber != null ? tx.blockNumber : null;\n this.blockHash = tx.blockHash != null ? tx.blockHash : null;\n this.hash = tx.hash;\n this.index = tx.index;\n this.type = tx.type;\n this.from = tx.from;\n this.to = tx.to || null;\n this.gasLimit = tx.gasLimit;\n this.nonce = tx.nonce;\n this.data = tx.data;\n this.value = tx.value;\n this.gasPrice = tx.gasPrice;\n this.maxPriorityFeePerGas = tx.maxPriorityFeePerGas != null ? tx.maxPriorityFeePerGas : null;\n this.maxFeePerGas = tx.maxFeePerGas != null ? tx.maxFeePerGas : null;\n this.maxFeePerBlobGas = tx.maxFeePerBlobGas != null ? tx.maxFeePerBlobGas : null;\n this.chainId = tx.chainId;\n this.signature = tx.signature;\n this.accessList = tx.accessList != null ? tx.accessList : null;\n this.blobVersionedHashes = tx.blobVersionedHashes != null ? tx.blobVersionedHashes : null;\n this.authorizationList = tx.authorizationList != null ? tx.authorizationList : null;\n this.#startBlock = -1;\n }\n /**\n * Returns a JSON-compatible representation of this transaction.\n */\n toJSON() {\n const { blockNumber, blockHash, index: index2, hash: hash3, type, to, from: from14, nonce, data, signature, accessList, blobVersionedHashes } = this;\n return {\n _type: \"TransactionResponse\",\n accessList,\n blockNumber,\n blockHash,\n blobVersionedHashes,\n chainId: toJson(this.chainId),\n data,\n from: from14,\n gasLimit: toJson(this.gasLimit),\n gasPrice: toJson(this.gasPrice),\n hash: hash3,\n maxFeePerGas: toJson(this.maxFeePerGas),\n maxPriorityFeePerGas: toJson(this.maxPriorityFeePerGas),\n maxFeePerBlobGas: toJson(this.maxFeePerBlobGas),\n nonce,\n signature,\n to,\n index: index2,\n type,\n value: toJson(this.value)\n };\n }\n /**\n * Resolves to the Block that this transaction was included in.\n *\n * This will return null if the transaction has not been included yet.\n */\n async getBlock() {\n let blockNumber = this.blockNumber;\n if (blockNumber == null) {\n const tx = await this.getTransaction();\n if (tx) {\n blockNumber = tx.blockNumber;\n }\n }\n if (blockNumber == null) {\n return null;\n }\n const block = this.provider.getBlock(blockNumber);\n if (block == null) {\n throw new Error(\"TODO\");\n }\n return block;\n }\n /**\n * Resolves to this transaction being re-requested from the\n * provider. This can be used if you have an unmined transaction\n * and wish to get an up-to-date populated instance.\n */\n async getTransaction() {\n return this.provider.getTransaction(this.hash);\n }\n /**\n * Resolve to the number of confirmations this transaction has.\n */\n async confirmations() {\n if (this.blockNumber == null) {\n const { tx, blockNumber: blockNumber2 } = await (0, index_js_1.resolveProperties)({\n tx: this.getTransaction(),\n blockNumber: this.provider.getBlockNumber()\n });\n if (tx == null || tx.blockNumber == null) {\n return 0;\n }\n return blockNumber2 - tx.blockNumber + 1;\n }\n const blockNumber = await this.provider.getBlockNumber();\n return blockNumber - this.blockNumber + 1;\n }\n /**\n * Resolves once this transaction has been mined and has\n * %%confirms%% blocks including it (default: ``1``) with an\n * optional %%timeout%%.\n *\n * This can resolve to ``null`` only if %%confirms%% is ``0``\n * and the transaction has not been mined, otherwise this will\n * wait until enough confirmations have completed.\n */\n async wait(_confirms, _timeout) {\n const confirms = _confirms == null ? 1 : _confirms;\n const timeout = _timeout == null ? 0 : _timeout;\n let startBlock = this.#startBlock;\n let nextScan = -1;\n let stopScanning = startBlock === -1 ? true : false;\n const checkReplacement = async () => {\n if (stopScanning) {\n return null;\n }\n const { blockNumber, nonce } = await (0, index_js_1.resolveProperties)({\n blockNumber: this.provider.getBlockNumber(),\n nonce: this.provider.getTransactionCount(this.from)\n });\n if (nonce < this.nonce) {\n startBlock = blockNumber;\n return;\n }\n if (stopScanning) {\n return null;\n }\n const mined = await this.getTransaction();\n if (mined && mined.blockNumber != null) {\n return;\n }\n if (nextScan === -1) {\n nextScan = startBlock - 3;\n if (nextScan < this.#startBlock) {\n nextScan = this.#startBlock;\n }\n }\n while (nextScan <= blockNumber) {\n if (stopScanning) {\n return null;\n }\n const block = await this.provider.getBlock(nextScan, true);\n if (block == null) {\n return;\n }\n for (const hash3 of block) {\n if (hash3 === this.hash) {\n return;\n }\n }\n for (let i3 = 0; i3 < block.length; i3++) {\n const tx = await block.getTransaction(i3);\n if (tx.from === this.from && tx.nonce === this.nonce) {\n if (stopScanning) {\n return null;\n }\n const receipt2 = await this.provider.getTransactionReceipt(tx.hash);\n if (receipt2 == null) {\n return;\n }\n if (blockNumber - receipt2.blockNumber + 1 < confirms) {\n return;\n }\n let reason = \"replaced\";\n if (tx.data === this.data && tx.to === this.to && tx.value === this.value) {\n reason = \"repriced\";\n } else if (tx.data === \"0x\" && tx.from === tx.to && tx.value === BN_0) {\n reason = \"cancelled\";\n }\n (0, index_js_1.assert)(false, \"transaction was replaced\", \"TRANSACTION_REPLACED\", {\n cancelled: reason === \"replaced\" || reason === \"cancelled\",\n reason,\n replacement: tx.replaceableTransaction(startBlock),\n hash: tx.hash,\n receipt: receipt2\n });\n }\n }\n nextScan++;\n }\n return;\n };\n const checkReceipt = (receipt2) => {\n if (receipt2 == null || receipt2.status !== 0) {\n return receipt2;\n }\n (0, index_js_1.assert)(false, \"transaction execution reverted\", \"CALL_EXCEPTION\", {\n action: \"sendTransaction\",\n data: null,\n reason: null,\n invocation: null,\n revert: null,\n transaction: {\n to: receipt2.to,\n from: receipt2.from,\n data: \"\"\n // @TODO: in v7, split out sendTransaction properties\n },\n receipt: receipt2\n });\n };\n const receipt = await this.provider.getTransactionReceipt(this.hash);\n if (confirms === 0) {\n return checkReceipt(receipt);\n }\n if (receipt) {\n if (confirms === 1 || await receipt.confirmations() >= confirms) {\n return checkReceipt(receipt);\n }\n } else {\n await checkReplacement();\n if (confirms === 0) {\n return null;\n }\n }\n const waiter = new Promise((resolve, reject) => {\n const cancellers = [];\n const cancel2 = () => {\n cancellers.forEach((c4) => c4());\n };\n cancellers.push(() => {\n stopScanning = true;\n });\n if (timeout > 0) {\n const timer = setTimeout(() => {\n cancel2();\n reject((0, index_js_1.makeError)(\"wait for transaction timeout\", \"TIMEOUT\"));\n }, timeout);\n cancellers.push(() => {\n clearTimeout(timer);\n });\n }\n const txListener = async (receipt2) => {\n if (await receipt2.confirmations() >= confirms) {\n cancel2();\n try {\n resolve(checkReceipt(receipt2));\n } catch (error) {\n reject(error);\n }\n }\n };\n cancellers.push(() => {\n this.provider.off(this.hash, txListener);\n });\n this.provider.on(this.hash, txListener);\n if (startBlock >= 0) {\n const replaceListener = async () => {\n try {\n await checkReplacement();\n } catch (error) {\n if ((0, index_js_1.isError)(error, \"TRANSACTION_REPLACED\")) {\n cancel2();\n reject(error);\n return;\n }\n }\n if (!stopScanning) {\n this.provider.once(\"block\", replaceListener);\n }\n };\n cancellers.push(() => {\n this.provider.off(\"block\", replaceListener);\n });\n this.provider.once(\"block\", replaceListener);\n }\n });\n return await waiter;\n }\n /**\n * Returns ``true`` if this transaction has been included.\n *\n * This is effective only as of the time the TransactionResponse\n * was instantiated. To get up-to-date information, use\n * [[getTransaction]].\n *\n * This provides a Type Guard that this transaction will have\n * non-null property values for properties that are null for\n * unmined transactions.\n */\n isMined() {\n return this.blockHash != null;\n }\n /**\n * Returns true if the transaction is a legacy (i.e. ``type == 0``)\n * transaction.\n *\n * This provides a Type Guard that this transaction will have\n * the ``null``-ness for hardfork-specific properties set correctly.\n */\n isLegacy() {\n return this.type === 0;\n }\n /**\n * Returns true if the transaction is a Berlin (i.e. ``type == 1``)\n * transaction. See [[link-eip-2070]].\n *\n * This provides a Type Guard that this transaction will have\n * the ``null``-ness for hardfork-specific properties set correctly.\n */\n isBerlin() {\n return this.type === 1;\n }\n /**\n * Returns true if the transaction is a London (i.e. ``type == 2``)\n * transaction. See [[link-eip-1559]].\n *\n * This provides a Type Guard that this transaction will have\n * the ``null``-ness for hardfork-specific properties set correctly.\n */\n isLondon() {\n return this.type === 2;\n }\n /**\n * Returns true if hte transaction is a Cancun (i.e. ``type == 3``)\n * transaction. See [[link-eip-4844]].\n */\n isCancun() {\n return this.type === 3;\n }\n /**\n * Returns a filter which can be used to listen for orphan events\n * that evict this transaction.\n */\n removedEvent() {\n (0, index_js_1.assert)(this.isMined(), \"unmined transaction canot be orphaned\", \"UNSUPPORTED_OPERATION\", { operation: \"removeEvent()\" });\n return createRemovedTransactionFilter(this);\n }\n /**\n * Returns a filter which can be used to listen for orphan events\n * that re-order this event against %%other%%.\n */\n reorderedEvent(other) {\n (0, index_js_1.assert)(this.isMined(), \"unmined transaction canot be orphaned\", \"UNSUPPORTED_OPERATION\", { operation: \"removeEvent()\" });\n (0, index_js_1.assert)(!other || other.isMined(), \"unmined 'other' transaction canot be orphaned\", \"UNSUPPORTED_OPERATION\", { operation: \"removeEvent()\" });\n return createReorderedTransactionFilter(this, other);\n }\n /**\n * Returns a new TransactionResponse instance which has the ability to\n * detect (and throw an error) if the transaction is replaced, which\n * will begin scanning at %%startBlock%%.\n *\n * This should generally not be used by developers and is intended\n * primarily for internal use. Setting an incorrect %%startBlock%% can\n * have devastating performance consequences if used incorrectly.\n */\n replaceableTransaction(startBlock) {\n (0, index_js_1.assertArgument)(Number.isInteger(startBlock) && startBlock >= 0, \"invalid startBlock\", \"startBlock\", startBlock);\n const tx = new _TransactionResponse(this, this.provider);\n tx.#startBlock = startBlock;\n return tx;\n }\n };\n exports3.TransactionResponse = TransactionResponse;\n function createOrphanedBlockFilter(block) {\n return { orphan: \"drop-block\", hash: block.hash, number: block.number };\n }\n function createReorderedTransactionFilter(tx, other) {\n return { orphan: \"reorder-transaction\", tx, other };\n }\n function createRemovedTransactionFilter(tx) {\n return { orphan: \"drop-transaction\", tx };\n }\n function createRemovedLogFilter(log) {\n return { orphan: \"drop-log\", log: {\n transactionHash: log.transactionHash,\n blockHash: log.blockHash,\n blockNumber: log.blockNumber,\n address: log.address,\n data: log.data,\n topics: Object.freeze(log.topics.slice()),\n index: log.index\n } };\n }\n }\n });\n\n // ../../../node_modules/.pnpm/ethers@6.15.0_bufferutil@4.0.9_utf-8-validate@5.0.10/node_modules/ethers/lib.commonjs/contract/wrappers.js\n var require_wrappers = __commonJS({\n \"../../../node_modules/.pnpm/ethers@6.15.0_bufferutil@4.0.9_utf-8-validate@5.0.10/node_modules/ethers/lib.commonjs/contract/wrappers.js\"(exports3) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n Object.defineProperty(exports3, \"__esModule\", { value: true });\n exports3.ContractEventPayload = exports3.ContractUnknownEventPayload = exports3.ContractTransactionResponse = exports3.ContractTransactionReceipt = exports3.UndecodedEventLog = exports3.EventLog = void 0;\n var provider_js_1 = require_provider();\n var index_js_1 = require_utils8();\n var EventLog = class extends provider_js_1.Log {\n /**\n * The Contract Interface.\n */\n interface;\n /**\n * The matching event.\n */\n fragment;\n /**\n * The parsed arguments passed to the event by ``emit``.\n */\n args;\n /**\n * @_ignore:\n */\n constructor(log, iface, fragment) {\n super(log, log.provider);\n const args = iface.decodeEventLog(fragment, log.data, log.topics);\n (0, index_js_1.defineProperties)(this, { args, fragment, interface: iface });\n }\n /**\n * The name of the event.\n */\n get eventName() {\n return this.fragment.name;\n }\n /**\n * The signature of the event.\n */\n get eventSignature() {\n return this.fragment.format();\n }\n };\n exports3.EventLog = EventLog;\n var UndecodedEventLog = class extends provider_js_1.Log {\n /**\n * The error encounted when trying to decode the log.\n */\n error;\n /**\n * @_ignore:\n */\n constructor(log, error) {\n super(log, log.provider);\n (0, index_js_1.defineProperties)(this, { error });\n }\n };\n exports3.UndecodedEventLog = UndecodedEventLog;\n var ContractTransactionReceipt = class extends provider_js_1.TransactionReceipt {\n #iface;\n /**\n * @_ignore:\n */\n constructor(iface, provider, tx) {\n super(tx, provider);\n this.#iface = iface;\n }\n /**\n * The parsed logs for any [[Log]] which has a matching event in the\n * Contract ABI.\n */\n get logs() {\n return super.logs.map((log) => {\n const fragment = log.topics.length ? this.#iface.getEvent(log.topics[0]) : null;\n if (fragment) {\n try {\n return new EventLog(log, this.#iface, fragment);\n } catch (error) {\n return new UndecodedEventLog(log, error);\n }\n }\n return log;\n });\n }\n };\n exports3.ContractTransactionReceipt = ContractTransactionReceipt;\n var ContractTransactionResponse = class extends provider_js_1.TransactionResponse {\n #iface;\n /**\n * @_ignore:\n */\n constructor(iface, provider, tx) {\n super(tx, provider);\n this.#iface = iface;\n }\n /**\n * Resolves once this transaction has been mined and has\n * %%confirms%% blocks including it (default: ``1``) with an\n * optional %%timeout%%.\n *\n * This can resolve to ``null`` only if %%confirms%% is ``0``\n * and the transaction has not been mined, otherwise this will\n * wait until enough confirmations have completed.\n */\n async wait(confirms, timeout) {\n const receipt = await super.wait(confirms, timeout);\n if (receipt == null) {\n return null;\n }\n return new ContractTransactionReceipt(this.#iface, this.provider, receipt);\n }\n };\n exports3.ContractTransactionResponse = ContractTransactionResponse;\n var ContractUnknownEventPayload = class extends index_js_1.EventPayload {\n /**\n * The log with no matching events.\n */\n log;\n /**\n * @_event:\n */\n constructor(contract, listener, filter, log) {\n super(contract, listener, filter);\n (0, index_js_1.defineProperties)(this, { log });\n }\n /**\n * Resolves to the block the event occured in.\n */\n async getBlock() {\n return await this.log.getBlock();\n }\n /**\n * Resolves to the transaction the event occured in.\n */\n async getTransaction() {\n return await this.log.getTransaction();\n }\n /**\n * Resolves to the transaction receipt the event occured in.\n */\n async getTransactionReceipt() {\n return await this.log.getTransactionReceipt();\n }\n };\n exports3.ContractUnknownEventPayload = ContractUnknownEventPayload;\n var ContractEventPayload = class extends ContractUnknownEventPayload {\n /**\n * @_ignore:\n */\n constructor(contract, listener, filter, fragment, _log) {\n super(contract, listener, filter, new EventLog(_log, contract.interface, fragment));\n const args = contract.interface.decodeEventLog(fragment, this.log.data, this.log.topics);\n (0, index_js_1.defineProperties)(this, { args, fragment });\n }\n /**\n * The event name.\n */\n get eventName() {\n return this.fragment.name;\n }\n /**\n * The event signature.\n */\n get eventSignature() {\n return this.fragment.format();\n }\n };\n exports3.ContractEventPayload = ContractEventPayload;\n }\n });\n\n // ../../../node_modules/.pnpm/ethers@6.15.0_bufferutil@4.0.9_utf-8-validate@5.0.10/node_modules/ethers/lib.commonjs/contract/contract.js\n var require_contract = __commonJS({\n \"../../../node_modules/.pnpm/ethers@6.15.0_bufferutil@4.0.9_utf-8-validate@5.0.10/node_modules/ethers/lib.commonjs/contract/contract.js\"(exports3) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n Object.defineProperty(exports3, \"__esModule\", { value: true });\n exports3.Contract = exports3.BaseContract = exports3.resolveArgs = exports3.copyOverrides = void 0;\n var index_js_1 = require_abi();\n var index_js_2 = require_address3();\n var provider_js_1 = require_provider();\n var index_js_3 = require_utils8();\n var wrappers_js_1 = require_wrappers();\n var BN_0 = BigInt(0);\n function canCall(value) {\n return value && typeof value.call === \"function\";\n }\n function canEstimate(value) {\n return value && typeof value.estimateGas === \"function\";\n }\n function canResolve(value) {\n return value && typeof value.resolveName === \"function\";\n }\n function canSend(value) {\n return value && typeof value.sendTransaction === \"function\";\n }\n function getResolver(value) {\n if (value != null) {\n if (canResolve(value)) {\n return value;\n }\n if (value.provider) {\n return value.provider;\n }\n }\n return void 0;\n }\n var PreparedTopicFilter = class {\n #filter;\n fragment;\n constructor(contract, fragment, args) {\n (0, index_js_3.defineProperties)(this, { fragment });\n if (fragment.inputs.length < args.length) {\n throw new Error(\"too many arguments\");\n }\n const runner = getRunner(contract.runner, \"resolveName\");\n const resolver = canResolve(runner) ? runner : null;\n this.#filter = async function() {\n const resolvedArgs = await Promise.all(fragment.inputs.map((param, index2) => {\n const arg = args[index2];\n if (arg == null) {\n return null;\n }\n return param.walkAsync(args[index2], (type, value) => {\n if (type === \"address\") {\n if (Array.isArray(value)) {\n return Promise.all(value.map((v2) => (0, index_js_2.resolveAddress)(v2, resolver)));\n }\n return (0, index_js_2.resolveAddress)(value, resolver);\n }\n return value;\n });\n }));\n return contract.interface.encodeFilterTopics(fragment, resolvedArgs);\n }();\n }\n getTopicFilter() {\n return this.#filter;\n }\n };\n function getRunner(value, feature) {\n if (value == null) {\n return null;\n }\n if (typeof value[feature] === \"function\") {\n return value;\n }\n if (value.provider && typeof value.provider[feature] === \"function\") {\n return value.provider;\n }\n return null;\n }\n function getProvider(value) {\n if (value == null) {\n return null;\n }\n return value.provider || null;\n }\n async function copyOverrides(arg, allowed) {\n const _overrides = index_js_1.Typed.dereference(arg, \"overrides\");\n (0, index_js_3.assertArgument)(typeof _overrides === \"object\", \"invalid overrides parameter\", \"overrides\", arg);\n const overrides = (0, provider_js_1.copyRequest)(_overrides);\n (0, index_js_3.assertArgument)(overrides.to == null || (allowed || []).indexOf(\"to\") >= 0, \"cannot override to\", \"overrides.to\", overrides.to);\n (0, index_js_3.assertArgument)(overrides.data == null || (allowed || []).indexOf(\"data\") >= 0, \"cannot override data\", \"overrides.data\", overrides.data);\n if (overrides.from) {\n overrides.from = overrides.from;\n }\n return overrides;\n }\n exports3.copyOverrides = copyOverrides;\n async function resolveArgs(_runner, inputs, args) {\n const runner = getRunner(_runner, \"resolveName\");\n const resolver = canResolve(runner) ? runner : null;\n return await Promise.all(inputs.map((param, index2) => {\n return param.walkAsync(args[index2], (type, value) => {\n value = index_js_1.Typed.dereference(value, type);\n if (type === \"address\") {\n return (0, index_js_2.resolveAddress)(value, resolver);\n }\n return value;\n });\n }));\n }\n exports3.resolveArgs = resolveArgs;\n function buildWrappedFallback(contract) {\n const populateTransaction2 = async function(overrides) {\n const tx = await copyOverrides(overrides, [\"data\"]);\n tx.to = await contract.getAddress();\n if (tx.from) {\n tx.from = await (0, index_js_2.resolveAddress)(tx.from, getResolver(contract.runner));\n }\n const iface = contract.interface;\n const noValue = (0, index_js_3.getBigInt)(tx.value || BN_0, \"overrides.value\") === BN_0;\n const noData = (tx.data || \"0x\") === \"0x\";\n if (iface.fallback && !iface.fallback.payable && iface.receive && !noData && !noValue) {\n (0, index_js_3.assertArgument)(false, \"cannot send data to receive or send value to non-payable fallback\", \"overrides\", overrides);\n }\n (0, index_js_3.assertArgument)(iface.fallback || noData, \"cannot send data to receive-only contract\", \"overrides.data\", tx.data);\n const payable = iface.receive || iface.fallback && iface.fallback.payable;\n (0, index_js_3.assertArgument)(payable || noValue, \"cannot send value to non-payable fallback\", \"overrides.value\", tx.value);\n (0, index_js_3.assertArgument)(iface.fallback || noData, \"cannot send data to receive-only contract\", \"overrides.data\", tx.data);\n return tx;\n };\n const staticCall = async function(overrides) {\n const runner = getRunner(contract.runner, \"call\");\n (0, index_js_3.assert)(canCall(runner), \"contract runner does not support calling\", \"UNSUPPORTED_OPERATION\", { operation: \"call\" });\n const tx = await populateTransaction2(overrides);\n try {\n return await runner.call(tx);\n } catch (error) {\n if ((0, index_js_3.isCallException)(error) && error.data) {\n throw contract.interface.makeError(error.data, tx);\n }\n throw error;\n }\n };\n const send = async function(overrides) {\n const runner = contract.runner;\n (0, index_js_3.assert)(canSend(runner), \"contract runner does not support sending transactions\", \"UNSUPPORTED_OPERATION\", { operation: \"sendTransaction\" });\n const tx = await runner.sendTransaction(await populateTransaction2(overrides));\n const provider = getProvider(contract.runner);\n return new wrappers_js_1.ContractTransactionResponse(contract.interface, provider, tx);\n };\n const estimateGas2 = async function(overrides) {\n const runner = getRunner(contract.runner, \"estimateGas\");\n (0, index_js_3.assert)(canEstimate(runner), \"contract runner does not support gas estimation\", \"UNSUPPORTED_OPERATION\", { operation: \"estimateGas\" });\n return await runner.estimateGas(await populateTransaction2(overrides));\n };\n const method = async (overrides) => {\n return await send(overrides);\n };\n (0, index_js_3.defineProperties)(method, {\n _contract: contract,\n estimateGas: estimateGas2,\n populateTransaction: populateTransaction2,\n send,\n staticCall\n });\n return method;\n }\n function buildWrappedMethod(contract, key) {\n const getFragment = function(...args) {\n const fragment = contract.interface.getFunction(key, args);\n (0, index_js_3.assert)(fragment, \"no matching fragment\", \"UNSUPPORTED_OPERATION\", {\n operation: \"fragment\",\n info: { key, args }\n });\n return fragment;\n };\n const populateTransaction2 = async function(...args) {\n const fragment = getFragment(...args);\n let overrides = {};\n if (fragment.inputs.length + 1 === args.length) {\n overrides = await copyOverrides(args.pop());\n if (overrides.from) {\n overrides.from = await (0, index_js_2.resolveAddress)(overrides.from, getResolver(contract.runner));\n }\n }\n if (fragment.inputs.length !== args.length) {\n throw new Error(\"internal error: fragment inputs doesn't match arguments; should not happen\");\n }\n const resolvedArgs = await resolveArgs(contract.runner, fragment.inputs, args);\n return Object.assign({}, overrides, await (0, index_js_3.resolveProperties)({\n to: contract.getAddress(),\n data: contract.interface.encodeFunctionData(fragment, resolvedArgs)\n }));\n };\n const staticCall = async function(...args) {\n const result = await staticCallResult(...args);\n if (result.length === 1) {\n return result[0];\n }\n return result;\n };\n const send = async function(...args) {\n const runner = contract.runner;\n (0, index_js_3.assert)(canSend(runner), \"contract runner does not support sending transactions\", \"UNSUPPORTED_OPERATION\", { operation: \"sendTransaction\" });\n const tx = await runner.sendTransaction(await populateTransaction2(...args));\n const provider = getProvider(contract.runner);\n return new wrappers_js_1.ContractTransactionResponse(contract.interface, provider, tx);\n };\n const estimateGas2 = async function(...args) {\n const runner = getRunner(contract.runner, \"estimateGas\");\n (0, index_js_3.assert)(canEstimate(runner), \"contract runner does not support gas estimation\", \"UNSUPPORTED_OPERATION\", { operation: \"estimateGas\" });\n return await runner.estimateGas(await populateTransaction2(...args));\n };\n const staticCallResult = async function(...args) {\n const runner = getRunner(contract.runner, \"call\");\n (0, index_js_3.assert)(canCall(runner), \"contract runner does not support calling\", \"UNSUPPORTED_OPERATION\", { operation: \"call\" });\n const tx = await populateTransaction2(...args);\n let result = \"0x\";\n try {\n result = await runner.call(tx);\n } catch (error) {\n if ((0, index_js_3.isCallException)(error) && error.data) {\n throw contract.interface.makeError(error.data, tx);\n }\n throw error;\n }\n const fragment = getFragment(...args);\n return contract.interface.decodeFunctionResult(fragment, result);\n };\n const method = async (...args) => {\n const fragment = getFragment(...args);\n if (fragment.constant) {\n return await staticCall(...args);\n }\n return await send(...args);\n };\n (0, index_js_3.defineProperties)(method, {\n name: contract.interface.getFunctionName(key),\n _contract: contract,\n _key: key,\n getFragment,\n estimateGas: estimateGas2,\n populateTransaction: populateTransaction2,\n send,\n staticCall,\n staticCallResult\n });\n Object.defineProperty(method, \"fragment\", {\n configurable: false,\n enumerable: true,\n get: () => {\n const fragment = contract.interface.getFunction(key);\n (0, index_js_3.assert)(fragment, \"no matching fragment\", \"UNSUPPORTED_OPERATION\", {\n operation: \"fragment\",\n info: { key }\n });\n return fragment;\n }\n });\n return method;\n }\n function buildWrappedEvent(contract, key) {\n const getFragment = function(...args) {\n const fragment = contract.interface.getEvent(key, args);\n (0, index_js_3.assert)(fragment, \"no matching fragment\", \"UNSUPPORTED_OPERATION\", {\n operation: \"fragment\",\n info: { key, args }\n });\n return fragment;\n };\n const method = function(...args) {\n return new PreparedTopicFilter(contract, getFragment(...args), args);\n };\n (0, index_js_3.defineProperties)(method, {\n name: contract.interface.getEventName(key),\n _contract: contract,\n _key: key,\n getFragment\n });\n Object.defineProperty(method, \"fragment\", {\n configurable: false,\n enumerable: true,\n get: () => {\n const fragment = contract.interface.getEvent(key);\n (0, index_js_3.assert)(fragment, \"no matching fragment\", \"UNSUPPORTED_OPERATION\", {\n operation: \"fragment\",\n info: { key }\n });\n return fragment;\n }\n });\n return method;\n }\n var internal = Symbol.for(\"_ethersInternal_contract\");\n var internalValues = /* @__PURE__ */ new WeakMap();\n function setInternal(contract, values) {\n internalValues.set(contract[internal], values);\n }\n function getInternal(contract) {\n return internalValues.get(contract[internal]);\n }\n function isDeferred(value) {\n return value && typeof value === \"object\" && \"getTopicFilter\" in value && typeof value.getTopicFilter === \"function\" && value.fragment;\n }\n async function getSubInfo(contract, event) {\n let topics;\n let fragment = null;\n if (Array.isArray(event)) {\n const topicHashify = function(name) {\n if ((0, index_js_3.isHexString)(name, 32)) {\n return name;\n }\n const fragment2 = contract.interface.getEvent(name);\n (0, index_js_3.assertArgument)(fragment2, \"unknown fragment\", \"name\", name);\n return fragment2.topicHash;\n };\n topics = event.map((e3) => {\n if (e3 == null) {\n return null;\n }\n if (Array.isArray(e3)) {\n return e3.map(topicHashify);\n }\n return topicHashify(e3);\n });\n } else if (event === \"*\") {\n topics = [null];\n } else if (typeof event === \"string\") {\n if ((0, index_js_3.isHexString)(event, 32)) {\n topics = [event];\n } else {\n fragment = contract.interface.getEvent(event);\n (0, index_js_3.assertArgument)(fragment, \"unknown fragment\", \"event\", event);\n topics = [fragment.topicHash];\n }\n } else if (isDeferred(event)) {\n topics = await event.getTopicFilter();\n } else if (\"fragment\" in event) {\n fragment = event.fragment;\n topics = [fragment.topicHash];\n } else {\n (0, index_js_3.assertArgument)(false, \"unknown event name\", \"event\", event);\n }\n topics = topics.map((t3) => {\n if (t3 == null) {\n return null;\n }\n if (Array.isArray(t3)) {\n const items = Array.from(new Set(t3.map((t4) => t4.toLowerCase())).values());\n if (items.length === 1) {\n return items[0];\n }\n items.sort();\n return items;\n }\n return t3.toLowerCase();\n });\n const tag = topics.map((t3) => {\n if (t3 == null) {\n return \"null\";\n }\n if (Array.isArray(t3)) {\n return t3.join(\"|\");\n }\n return t3;\n }).join(\"&\");\n return { fragment, tag, topics };\n }\n async function hasSub(contract, event) {\n const { subs } = getInternal(contract);\n return subs.get((await getSubInfo(contract, event)).tag) || null;\n }\n async function getSub(contract, operation, event) {\n const provider = getProvider(contract.runner);\n (0, index_js_3.assert)(provider, \"contract runner does not support subscribing\", \"UNSUPPORTED_OPERATION\", { operation });\n const { fragment, tag, topics } = await getSubInfo(contract, event);\n const { addr, subs } = getInternal(contract);\n let sub = subs.get(tag);\n if (!sub) {\n const address = addr ? addr : contract;\n const filter = { address, topics };\n const listener = (log) => {\n let foundFragment = fragment;\n if (foundFragment == null) {\n try {\n foundFragment = contract.interface.getEvent(log.topics[0]);\n } catch (error) {\n }\n }\n if (foundFragment) {\n const _foundFragment = foundFragment;\n const args = fragment ? contract.interface.decodeEventLog(fragment, log.data, log.topics) : [];\n emit2(contract, event, args, (listener2) => {\n return new wrappers_js_1.ContractEventPayload(contract, listener2, event, _foundFragment, log);\n });\n } else {\n emit2(contract, event, [], (listener2) => {\n return new wrappers_js_1.ContractUnknownEventPayload(contract, listener2, event, log);\n });\n }\n };\n let starting = [];\n const start = () => {\n if (starting.length) {\n return;\n }\n starting.push(provider.on(filter, listener));\n };\n const stop = async () => {\n if (starting.length == 0) {\n return;\n }\n let started = starting;\n starting = [];\n await Promise.all(started);\n provider.off(filter, listener);\n };\n sub = { tag, listeners: [], start, stop };\n subs.set(tag, sub);\n }\n return sub;\n }\n var lastEmit = Promise.resolve();\n async function _emit(contract, event, args, payloadFunc) {\n await lastEmit;\n const sub = await hasSub(contract, event);\n if (!sub) {\n return false;\n }\n const count = sub.listeners.length;\n sub.listeners = sub.listeners.filter(({ listener, once: once2 }) => {\n const passArgs = Array.from(args);\n if (payloadFunc) {\n passArgs.push(payloadFunc(once2 ? null : listener));\n }\n try {\n listener.call(contract, ...passArgs);\n } catch (error) {\n }\n return !once2;\n });\n if (sub.listeners.length === 0) {\n sub.stop();\n getInternal(contract).subs.delete(sub.tag);\n }\n return count > 0;\n }\n async function emit2(contract, event, args, payloadFunc) {\n try {\n await lastEmit;\n } catch (error) {\n }\n const resultPromise = _emit(contract, event, args, payloadFunc);\n lastEmit = resultPromise;\n return await resultPromise;\n }\n var passProperties = [\"then\"];\n var BaseContract = class _BaseContract {\n /**\n * The target to connect to.\n *\n * This can be an address, ENS name or any [[Addressable]], such as\n * another contract. To get the resovled address, use the ``getAddress``\n * method.\n */\n target;\n /**\n * The contract Interface.\n */\n interface;\n /**\n * The connected runner. This is generally a [[Provider]] or a\n * [[Signer]], which dictates what operations are supported.\n *\n * For example, a **Contract** connected to a [[Provider]] may\n * only execute read-only operations.\n */\n runner;\n /**\n * All the Events available on this contract.\n */\n filters;\n /**\n * @_ignore:\n */\n [internal];\n /**\n * The fallback or receive function if any.\n */\n fallback;\n /**\n * Creates a new contract connected to %%target%% with the %%abi%% and\n * optionally connected to a %%runner%% to perform operations on behalf\n * of.\n */\n constructor(target, abi2, runner, _deployTx) {\n (0, index_js_3.assertArgument)(typeof target === \"string\" || (0, index_js_2.isAddressable)(target), \"invalid value for Contract target\", \"target\", target);\n if (runner == null) {\n runner = null;\n }\n const iface = index_js_1.Interface.from(abi2);\n (0, index_js_3.defineProperties)(this, { target, runner, interface: iface });\n Object.defineProperty(this, internal, { value: {} });\n let addrPromise;\n let addr = null;\n let deployTx = null;\n if (_deployTx) {\n const provider = getProvider(runner);\n deployTx = new wrappers_js_1.ContractTransactionResponse(this.interface, provider, _deployTx);\n }\n let subs = /* @__PURE__ */ new Map();\n if (typeof target === \"string\") {\n if ((0, index_js_3.isHexString)(target)) {\n addr = target;\n addrPromise = Promise.resolve(target);\n } else {\n const resolver = getRunner(runner, \"resolveName\");\n if (!canResolve(resolver)) {\n throw (0, index_js_3.makeError)(\"contract runner does not support name resolution\", \"UNSUPPORTED_OPERATION\", {\n operation: \"resolveName\"\n });\n }\n addrPromise = resolver.resolveName(target).then((addr2) => {\n if (addr2 == null) {\n throw (0, index_js_3.makeError)(\"an ENS name used for a contract target must be correctly configured\", \"UNCONFIGURED_NAME\", {\n value: target\n });\n }\n getInternal(this).addr = addr2;\n return addr2;\n });\n }\n } else {\n addrPromise = target.getAddress().then((addr2) => {\n if (addr2 == null) {\n throw new Error(\"TODO\");\n }\n getInternal(this).addr = addr2;\n return addr2;\n });\n }\n setInternal(this, { addrPromise, addr, deployTx, subs });\n const filters = new Proxy({}, {\n get: (target2, prop, receiver) => {\n if (typeof prop === \"symbol\" || passProperties.indexOf(prop) >= 0) {\n return Reflect.get(target2, prop, receiver);\n }\n try {\n return this.getEvent(prop);\n } catch (error) {\n if (!(0, index_js_3.isError)(error, \"INVALID_ARGUMENT\") || error.argument !== \"key\") {\n throw error;\n }\n }\n return void 0;\n },\n has: (target2, prop) => {\n if (passProperties.indexOf(prop) >= 0) {\n return Reflect.has(target2, prop);\n }\n return Reflect.has(target2, prop) || this.interface.hasEvent(String(prop));\n }\n });\n (0, index_js_3.defineProperties)(this, { filters });\n (0, index_js_3.defineProperties)(this, {\n fallback: iface.receive || iface.fallback ? buildWrappedFallback(this) : null\n });\n return new Proxy(this, {\n get: (target2, prop, receiver) => {\n if (typeof prop === \"symbol\" || prop in target2 || passProperties.indexOf(prop) >= 0) {\n return Reflect.get(target2, prop, receiver);\n }\n try {\n return target2.getFunction(prop);\n } catch (error) {\n if (!(0, index_js_3.isError)(error, \"INVALID_ARGUMENT\") || error.argument !== \"key\") {\n throw error;\n }\n }\n return void 0;\n },\n has: (target2, prop) => {\n if (typeof prop === \"symbol\" || prop in target2 || passProperties.indexOf(prop) >= 0) {\n return Reflect.has(target2, prop);\n }\n return target2.interface.hasFunction(prop);\n }\n });\n }\n /**\n * Return a new Contract instance with the same target and ABI, but\n * a different %%runner%%.\n */\n connect(runner) {\n return new _BaseContract(this.target, this.interface, runner);\n }\n /**\n * Return a new Contract instance with the same ABI and runner, but\n * a different %%target%%.\n */\n attach(target) {\n return new _BaseContract(target, this.interface, this.runner);\n }\n /**\n * Return the resolved address of this Contract.\n */\n async getAddress() {\n return await getInternal(this).addrPromise;\n }\n /**\n * Return the deployed bytecode or null if no bytecode is found.\n */\n async getDeployedCode() {\n const provider = getProvider(this.runner);\n (0, index_js_3.assert)(provider, \"runner does not support .provider\", \"UNSUPPORTED_OPERATION\", { operation: \"getDeployedCode\" });\n const code = await provider.getCode(await this.getAddress());\n if (code === \"0x\") {\n return null;\n }\n return code;\n }\n /**\n * Resolve to this Contract once the bytecode has been deployed, or\n * resolve immediately if already deployed.\n */\n async waitForDeployment() {\n const deployTx = this.deploymentTransaction();\n if (deployTx) {\n await deployTx.wait();\n return this;\n }\n const code = await this.getDeployedCode();\n if (code != null) {\n return this;\n }\n const provider = getProvider(this.runner);\n (0, index_js_3.assert)(provider != null, \"contract runner does not support .provider\", \"UNSUPPORTED_OPERATION\", { operation: \"waitForDeployment\" });\n return new Promise((resolve, reject) => {\n const checkCode = async () => {\n try {\n const code2 = await this.getDeployedCode();\n if (code2 != null) {\n return resolve(this);\n }\n provider.once(\"block\", checkCode);\n } catch (error) {\n reject(error);\n }\n };\n checkCode();\n });\n }\n /**\n * Return the transaction used to deploy this contract.\n *\n * This is only available if this instance was returned from a\n * [[ContractFactory]].\n */\n deploymentTransaction() {\n return getInternal(this).deployTx;\n }\n /**\n * Return the function for a given name. This is useful when a contract\n * method name conflicts with a JavaScript name such as ``prototype`` or\n * when using a Contract programatically.\n */\n getFunction(key) {\n if (typeof key !== \"string\") {\n key = key.format();\n }\n const func = buildWrappedMethod(this, key);\n return func;\n }\n /**\n * Return the event for a given name. This is useful when a contract\n * event name conflicts with a JavaScript name such as ``prototype`` or\n * when using a Contract programatically.\n */\n getEvent(key) {\n if (typeof key !== \"string\") {\n key = key.format();\n }\n return buildWrappedEvent(this, key);\n }\n /**\n * @_ignore:\n */\n async queryTransaction(hash3) {\n throw new Error(\"@TODO\");\n }\n /*\n // @TODO: this is a non-backwards compatible change, but will be added\n // in v7 and in a potential SmartContract class in an upcoming\n // v6 release\n async getTransactionReceipt(hash: string): Promise {\n const provider = getProvider(this.runner);\n assert(provider, \"contract runner does not have a provider\",\n \"UNSUPPORTED_OPERATION\", { operation: \"queryTransaction\" });\n \n const receipt = await provider.getTransactionReceipt(hash);\n if (receipt == null) { return null; }\n \n return new ContractTransactionReceipt(this.interface, provider, receipt);\n }\n */\n /**\n * Provide historic access to event data for %%event%% in the range\n * %%fromBlock%% (default: ``0``) to %%toBlock%% (default: ``\"latest\"``)\n * inclusive.\n */\n async queryFilter(event, fromBlock, toBlock) {\n if (fromBlock == null) {\n fromBlock = 0;\n }\n if (toBlock == null) {\n toBlock = \"latest\";\n }\n const { addr, addrPromise } = getInternal(this);\n const address = addr ? addr : await addrPromise;\n const { fragment, topics } = await getSubInfo(this, event);\n const filter = { address, topics, fromBlock, toBlock };\n const provider = getProvider(this.runner);\n (0, index_js_3.assert)(provider, \"contract runner does not have a provider\", \"UNSUPPORTED_OPERATION\", { operation: \"queryFilter\" });\n return (await provider.getLogs(filter)).map((log) => {\n let foundFragment = fragment;\n if (foundFragment == null) {\n try {\n foundFragment = this.interface.getEvent(log.topics[0]);\n } catch (error) {\n }\n }\n if (foundFragment) {\n try {\n return new wrappers_js_1.EventLog(log, this.interface, foundFragment);\n } catch (error) {\n return new wrappers_js_1.UndecodedEventLog(log, error);\n }\n }\n return new provider_js_1.Log(log, provider);\n });\n }\n /**\n * Add an event %%listener%% for the %%event%%.\n */\n async on(event, listener) {\n const sub = await getSub(this, \"on\", event);\n sub.listeners.push({ listener, once: false });\n sub.start();\n return this;\n }\n /**\n * Add an event %%listener%% for the %%event%%, but remove the listener\n * after it is fired once.\n */\n async once(event, listener) {\n const sub = await getSub(this, \"once\", event);\n sub.listeners.push({ listener, once: true });\n sub.start();\n return this;\n }\n /**\n * Emit an %%event%% calling all listeners with %%args%%.\n *\n * Resolves to ``true`` if any listeners were called.\n */\n async emit(event, ...args) {\n return await emit2(this, event, args, null);\n }\n /**\n * Resolves to the number of listeners of %%event%% or the total number\n * of listeners if unspecified.\n */\n async listenerCount(event) {\n if (event) {\n const sub = await hasSub(this, event);\n if (!sub) {\n return 0;\n }\n return sub.listeners.length;\n }\n const { subs } = getInternal(this);\n let total = 0;\n for (const { listeners: listeners2 } of subs.values()) {\n total += listeners2.length;\n }\n return total;\n }\n /**\n * Resolves to the listeners subscribed to %%event%% or all listeners\n * if unspecified.\n */\n async listeners(event) {\n if (event) {\n const sub = await hasSub(this, event);\n if (!sub) {\n return [];\n }\n return sub.listeners.map(({ listener }) => listener);\n }\n const { subs } = getInternal(this);\n let result = [];\n for (const { listeners: listeners2 } of subs.values()) {\n result = result.concat(listeners2.map(({ listener }) => listener));\n }\n return result;\n }\n /**\n * Remove the %%listener%% from the listeners for %%event%% or remove\n * all listeners if unspecified.\n */\n async off(event, listener) {\n const sub = await hasSub(this, event);\n if (!sub) {\n return this;\n }\n if (listener) {\n const index2 = sub.listeners.map(({ listener: listener2 }) => listener2).indexOf(listener);\n if (index2 >= 0) {\n sub.listeners.splice(index2, 1);\n }\n }\n if (listener == null || sub.listeners.length === 0) {\n sub.stop();\n getInternal(this).subs.delete(sub.tag);\n }\n return this;\n }\n /**\n * Remove all the listeners for %%event%% or remove all listeners if\n * unspecified.\n */\n async removeAllListeners(event) {\n if (event) {\n const sub = await hasSub(this, event);\n if (!sub) {\n return this;\n }\n sub.stop();\n getInternal(this).subs.delete(sub.tag);\n } else {\n const { subs } = getInternal(this);\n for (const { tag, stop } of subs.values()) {\n stop();\n subs.delete(tag);\n }\n }\n return this;\n }\n /**\n * Alias for [on].\n */\n async addListener(event, listener) {\n return await this.on(event, listener);\n }\n /**\n * Alias for [off].\n */\n async removeListener(event, listener) {\n return await this.off(event, listener);\n }\n /**\n * Create a new Class for the %%abi%%.\n */\n static buildClass(abi2) {\n class CustomContract extends _BaseContract {\n constructor(address, runner = null) {\n super(address, abi2, runner);\n }\n }\n return CustomContract;\n }\n /**\n * Create a new BaseContract with a specified Interface.\n */\n static from(target, abi2, runner) {\n if (runner == null) {\n runner = null;\n }\n const contract = new this(target, abi2, runner);\n return contract;\n }\n };\n exports3.BaseContract = BaseContract;\n function _ContractBase() {\n return BaseContract;\n }\n var Contract = class extends _ContractBase() {\n };\n exports3.Contract = Contract;\n }\n });\n\n // ../../../node_modules/.pnpm/ethers@6.15.0_bufferutil@4.0.9_utf-8-validate@5.0.10/node_modules/ethers/lib.commonjs/contract/factory.js\n var require_factory = __commonJS({\n \"../../../node_modules/.pnpm/ethers@6.15.0_bufferutil@4.0.9_utf-8-validate@5.0.10/node_modules/ethers/lib.commonjs/contract/factory.js\"(exports3) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n Object.defineProperty(exports3, \"__esModule\", { value: true });\n exports3.ContractFactory = void 0;\n var index_js_1 = require_abi();\n var index_js_2 = require_address3();\n var index_js_3 = require_utils8();\n var contract_js_1 = require_contract();\n var ContractFactory = class _ContractFactory {\n /**\n * The Contract Interface.\n */\n interface;\n /**\n * The Contract deployment bytecode. Often called the initcode.\n */\n bytecode;\n /**\n * The ContractRunner to deploy the Contract as.\n */\n runner;\n /**\n * Create a new **ContractFactory** with %%abi%% and %%bytecode%%,\n * optionally connected to %%runner%%.\n *\n * The %%bytecode%% may be the ``bytecode`` property within the\n * standard Solidity JSON output.\n */\n constructor(abi2, bytecode, runner) {\n const iface = index_js_1.Interface.from(abi2);\n if (bytecode instanceof Uint8Array) {\n bytecode = (0, index_js_3.hexlify)((0, index_js_3.getBytes)(bytecode));\n } else {\n if (typeof bytecode === \"object\") {\n bytecode = bytecode.object;\n }\n if (!bytecode.startsWith(\"0x\")) {\n bytecode = \"0x\" + bytecode;\n }\n bytecode = (0, index_js_3.hexlify)((0, index_js_3.getBytes)(bytecode));\n }\n (0, index_js_3.defineProperties)(this, {\n bytecode,\n interface: iface,\n runner: runner || null\n });\n }\n attach(target) {\n return new contract_js_1.BaseContract(target, this.interface, this.runner);\n }\n /**\n * Resolves to the transaction to deploy the contract, passing %%args%%\n * into the constructor.\n */\n async getDeployTransaction(...args) {\n let overrides = {};\n const fragment = this.interface.deploy;\n if (fragment.inputs.length + 1 === args.length) {\n overrides = await (0, contract_js_1.copyOverrides)(args.pop());\n }\n if (fragment.inputs.length !== args.length) {\n throw new Error(\"incorrect number of arguments to constructor\");\n }\n const resolvedArgs = await (0, contract_js_1.resolveArgs)(this.runner, fragment.inputs, args);\n const data = (0, index_js_3.concat)([this.bytecode, this.interface.encodeDeploy(resolvedArgs)]);\n return Object.assign({}, overrides, { data });\n }\n /**\n * Resolves to the Contract deployed by passing %%args%% into the\n * constructor.\n *\n * This will resolve to the Contract before it has been deployed to the\n * network, so the [[BaseContract-waitForDeployment]] should be used before\n * sending any transactions to it.\n */\n async deploy(...args) {\n const tx = await this.getDeployTransaction(...args);\n (0, index_js_3.assert)(this.runner && typeof this.runner.sendTransaction === \"function\", \"factory runner does not support sending transactions\", \"UNSUPPORTED_OPERATION\", {\n operation: \"sendTransaction\"\n });\n const sentTx = await this.runner.sendTransaction(tx);\n const address = (0, index_js_2.getCreateAddress)(sentTx);\n return new contract_js_1.BaseContract(address, this.interface, this.runner, sentTx);\n }\n /**\n * Return a new **ContractFactory** with the same ABI and bytecode,\n * but connected to %%runner%%.\n */\n connect(runner) {\n return new _ContractFactory(this.interface, this.bytecode, runner);\n }\n /**\n * Create a new **ContractFactory** from the standard Solidity JSON output.\n */\n static fromSolidity(output, runner) {\n (0, index_js_3.assertArgument)(output != null, \"bad compiler output\", \"output\", output);\n if (typeof output === \"string\") {\n output = JSON.parse(output);\n }\n const abi2 = output.abi;\n let bytecode = \"\";\n if (output.bytecode) {\n bytecode = output.bytecode;\n } else if (output.evm && output.evm.bytecode) {\n bytecode = output.evm.bytecode;\n }\n return new this(abi2, bytecode, runner);\n }\n };\n exports3.ContractFactory = ContractFactory;\n }\n });\n\n // ../../../node_modules/.pnpm/ethers@6.15.0_bufferutil@4.0.9_utf-8-validate@5.0.10/node_modules/ethers/lib.commonjs/contract/index.js\n var require_contract2 = __commonJS({\n \"../../../node_modules/.pnpm/ethers@6.15.0_bufferutil@4.0.9_utf-8-validate@5.0.10/node_modules/ethers/lib.commonjs/contract/index.js\"(exports3) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n Object.defineProperty(exports3, \"__esModule\", { value: true });\n exports3.UndecodedEventLog = exports3.EventLog = exports3.ContractTransactionResponse = exports3.ContractTransactionReceipt = exports3.ContractUnknownEventPayload = exports3.ContractEventPayload = exports3.ContractFactory = exports3.Contract = exports3.BaseContract = void 0;\n var contract_js_1 = require_contract();\n Object.defineProperty(exports3, \"BaseContract\", { enumerable: true, get: function() {\n return contract_js_1.BaseContract;\n } });\n Object.defineProperty(exports3, \"Contract\", { enumerable: true, get: function() {\n return contract_js_1.Contract;\n } });\n var factory_js_1 = require_factory();\n Object.defineProperty(exports3, \"ContractFactory\", { enumerable: true, get: function() {\n return factory_js_1.ContractFactory;\n } });\n var wrappers_js_1 = require_wrappers();\n Object.defineProperty(exports3, \"ContractEventPayload\", { enumerable: true, get: function() {\n return wrappers_js_1.ContractEventPayload;\n } });\n Object.defineProperty(exports3, \"ContractUnknownEventPayload\", { enumerable: true, get: function() {\n return wrappers_js_1.ContractUnknownEventPayload;\n } });\n Object.defineProperty(exports3, \"ContractTransactionReceipt\", { enumerable: true, get: function() {\n return wrappers_js_1.ContractTransactionReceipt;\n } });\n Object.defineProperty(exports3, \"ContractTransactionResponse\", { enumerable: true, get: function() {\n return wrappers_js_1.ContractTransactionResponse;\n } });\n Object.defineProperty(exports3, \"EventLog\", { enumerable: true, get: function() {\n return wrappers_js_1.EventLog;\n } });\n Object.defineProperty(exports3, \"UndecodedEventLog\", { enumerable: true, get: function() {\n return wrappers_js_1.UndecodedEventLog;\n } });\n }\n });\n\n // ../../../node_modules/.pnpm/ethers@6.15.0_bufferutil@4.0.9_utf-8-validate@5.0.10/node_modules/ethers/lib.commonjs/providers/ens-resolver.js\n var require_ens_resolver = __commonJS({\n \"../../../node_modules/.pnpm/ethers@6.15.0_bufferutil@4.0.9_utf-8-validate@5.0.10/node_modules/ethers/lib.commonjs/providers/ens-resolver.js\"(exports3) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n Object.defineProperty(exports3, \"__esModule\", { value: true });\n exports3.EnsResolver = exports3.BasicMulticoinProviderPlugin = exports3.MulticoinProviderPlugin = void 0;\n var index_js_1 = require_address3();\n var index_js_2 = require_constants5();\n var index_js_3 = require_contract2();\n var index_js_4 = require_hash2();\n var index_js_5 = require_utils8();\n function getIpfsLink(link) {\n if (link.match(/^ipfs:\\/\\/ipfs\\//i)) {\n link = link.substring(12);\n } else if (link.match(/^ipfs:\\/\\//i)) {\n link = link.substring(7);\n } else {\n (0, index_js_5.assertArgument)(false, \"unsupported IPFS format\", \"link\", link);\n }\n return `https://gateway.ipfs.io/ipfs/${link}`;\n }\n var MulticoinProviderPlugin = class {\n /**\n * The name.\n */\n name;\n /**\n * Creates a new **MulticoinProviderPluing** for %%name%%.\n */\n constructor(name) {\n (0, index_js_5.defineProperties)(this, { name });\n }\n connect(proivder) {\n return this;\n }\n /**\n * Returns ``true`` if %%coinType%% is supported by this plugin.\n */\n supportsCoinType(coinType) {\n return false;\n }\n /**\n * Resolves to the encoded %%address%% for %%coinType%%.\n */\n async encodeAddress(coinType, address) {\n throw new Error(\"unsupported coin\");\n }\n /**\n * Resolves to the decoded %%data%% for %%coinType%%.\n */\n async decodeAddress(coinType, data) {\n throw new Error(\"unsupported coin\");\n }\n };\n exports3.MulticoinProviderPlugin = MulticoinProviderPlugin;\n var BasicMulticoinPluginId = \"org.ethers.plugins.provider.BasicMulticoin\";\n var BasicMulticoinProviderPlugin = class extends MulticoinProviderPlugin {\n /**\n * Creates a new **BasicMulticoinProviderPlugin**.\n */\n constructor() {\n super(BasicMulticoinPluginId);\n }\n };\n exports3.BasicMulticoinProviderPlugin = BasicMulticoinProviderPlugin;\n var matcherIpfs = new RegExp(\"^(ipfs)://(.*)$\", \"i\");\n var matchers = [\n new RegExp(\"^(https)://(.*)$\", \"i\"),\n new RegExp(\"^(data):(.*)$\", \"i\"),\n matcherIpfs,\n new RegExp(\"^eip155:[0-9]+/(erc[0-9]+):(.*)$\", \"i\")\n ];\n var EnsResolver = class _EnsResolver {\n /**\n * The connected provider.\n */\n provider;\n /**\n * The address of the resolver.\n */\n address;\n /**\n * The name this resolver was resolved against.\n */\n name;\n // For EIP-2544 names, the ancestor that provided the resolver\n #supports2544;\n #resolver;\n constructor(provider, address, name) {\n (0, index_js_5.defineProperties)(this, { provider, address, name });\n this.#supports2544 = null;\n this.#resolver = new index_js_3.Contract(address, [\n \"function supportsInterface(bytes4) view returns (bool)\",\n \"function resolve(bytes, bytes) view returns (bytes)\",\n \"function addr(bytes32) view returns (address)\",\n \"function addr(bytes32, uint) view returns (bytes)\",\n \"function text(bytes32, string) view returns (string)\",\n \"function contenthash(bytes32) view returns (bytes)\"\n ], provider);\n }\n /**\n * Resolves to true if the resolver supports wildcard resolution.\n */\n async supportsWildcard() {\n if (this.#supports2544 == null) {\n this.#supports2544 = (async () => {\n try {\n return await this.#resolver.supportsInterface(\"0x9061b923\");\n } catch (error) {\n if ((0, index_js_5.isError)(error, \"CALL_EXCEPTION\")) {\n return false;\n }\n this.#supports2544 = null;\n throw error;\n }\n })();\n }\n return await this.#supports2544;\n }\n async #fetch(funcName, params) {\n params = (params || []).slice();\n const iface = this.#resolver.interface;\n params.unshift((0, index_js_4.namehash)(this.name));\n let fragment = null;\n if (await this.supportsWildcard()) {\n fragment = iface.getFunction(funcName);\n (0, index_js_5.assert)(fragment, \"missing fragment\", \"UNKNOWN_ERROR\", {\n info: { funcName }\n });\n params = [\n (0, index_js_4.dnsEncode)(this.name, 255),\n iface.encodeFunctionData(fragment, params)\n ];\n funcName = \"resolve(bytes,bytes)\";\n }\n params.push({\n enableCcipRead: true\n });\n try {\n const result = await this.#resolver[funcName](...params);\n if (fragment) {\n return iface.decodeFunctionResult(fragment, result)[0];\n }\n return result;\n } catch (error) {\n if (!(0, index_js_5.isError)(error, \"CALL_EXCEPTION\")) {\n throw error;\n }\n }\n return null;\n }\n /**\n * Resolves to the address for %%coinType%% or null if the\n * provided %%coinType%% has not been configured.\n */\n async getAddress(coinType) {\n if (coinType == null) {\n coinType = 60;\n }\n if (coinType === 60) {\n try {\n const result = await this.#fetch(\"addr(bytes32)\");\n if (result == null || result === index_js_2.ZeroAddress) {\n return null;\n }\n return result;\n } catch (error) {\n if ((0, index_js_5.isError)(error, \"CALL_EXCEPTION\")) {\n return null;\n }\n throw error;\n }\n }\n if (coinType >= 0 && coinType < 2147483648) {\n let ethCoinType = coinType + 2147483648;\n const data2 = await this.#fetch(\"addr(bytes32,uint)\", [ethCoinType]);\n if ((0, index_js_5.isHexString)(data2, 20)) {\n return (0, index_js_1.getAddress)(data2);\n }\n }\n let coinPlugin = null;\n for (const plugin of this.provider.plugins) {\n if (!(plugin instanceof MulticoinProviderPlugin)) {\n continue;\n }\n if (plugin.supportsCoinType(coinType)) {\n coinPlugin = plugin;\n break;\n }\n }\n if (coinPlugin == null) {\n return null;\n }\n const data = await this.#fetch(\"addr(bytes32,uint)\", [coinType]);\n if (data == null || data === \"0x\") {\n return null;\n }\n const address = await coinPlugin.decodeAddress(coinType, data);\n if (address != null) {\n return address;\n }\n (0, index_js_5.assert)(false, `invalid coin data`, \"UNSUPPORTED_OPERATION\", {\n operation: `getAddress(${coinType})`,\n info: { coinType, data }\n });\n }\n /**\n * Resolves to the EIP-634 text record for %%key%%, or ``null``\n * if unconfigured.\n */\n async getText(key) {\n const data = await this.#fetch(\"text(bytes32,string)\", [key]);\n if (data == null || data === \"0x\") {\n return null;\n }\n return data;\n }\n /**\n * Rsolves to the content-hash or ``null`` if unconfigured.\n */\n async getContentHash() {\n const data = await this.#fetch(\"contenthash(bytes32)\");\n if (data == null || data === \"0x\") {\n return null;\n }\n const ipfs = data.match(/^0x(e3010170|e5010172)(([0-9a-f][0-9a-f])([0-9a-f][0-9a-f])([0-9a-f]*))$/);\n if (ipfs) {\n const scheme = ipfs[1] === \"e3010170\" ? \"ipfs\" : \"ipns\";\n const length2 = parseInt(ipfs[4], 16);\n if (ipfs[5].length === length2 * 2) {\n return `${scheme}://${(0, index_js_5.encodeBase58)(\"0x\" + ipfs[2])}`;\n }\n }\n const swarm = data.match(/^0xe40101fa011b20([0-9a-f]*)$/);\n if (swarm && swarm[1].length === 64) {\n return `bzz://${swarm[1]}`;\n }\n (0, index_js_5.assert)(false, `invalid or unsupported content hash data`, \"UNSUPPORTED_OPERATION\", {\n operation: \"getContentHash()\",\n info: { data }\n });\n }\n /**\n * Resolves to the avatar url or ``null`` if the avatar is either\n * unconfigured or incorrectly configured (e.g. references an NFT\n * not owned by the address).\n *\n * If diagnosing issues with configurations, the [[_getAvatar]]\n * method may be useful.\n */\n async getAvatar() {\n const avatar = await this._getAvatar();\n return avatar.url;\n }\n /**\n * When resolving an avatar, there are many steps involved, such\n * fetching metadata and possibly validating ownership of an\n * NFT.\n *\n * This method can be used to examine each step and the value it\n * was working from.\n */\n async _getAvatar() {\n const linkage = [{ type: \"name\", value: this.name }];\n try {\n const avatar = await this.getText(\"avatar\");\n if (avatar == null) {\n linkage.push({ type: \"!avatar\", value: \"\" });\n return { url: null, linkage };\n }\n linkage.push({ type: \"avatar\", value: avatar });\n for (let i3 = 0; i3 < matchers.length; i3++) {\n const match = avatar.match(matchers[i3]);\n if (match == null) {\n continue;\n }\n const scheme = match[1].toLowerCase();\n switch (scheme) {\n case \"https\":\n case \"data\":\n linkage.push({ type: \"url\", value: avatar });\n return { linkage, url: avatar };\n case \"ipfs\": {\n const url = getIpfsLink(avatar);\n linkage.push({ type: \"ipfs\", value: avatar });\n linkage.push({ type: \"url\", value: url });\n return { linkage, url };\n }\n case \"erc721\":\n case \"erc1155\": {\n const selector = scheme === \"erc721\" ? \"tokenURI(uint256)\" : \"uri(uint256)\";\n linkage.push({ type: scheme, value: avatar });\n const owner = await this.getAddress();\n if (owner == null) {\n linkage.push({ type: \"!owner\", value: \"\" });\n return { url: null, linkage };\n }\n const comps = (match[2] || \"\").split(\"/\");\n if (comps.length !== 2) {\n linkage.push({ type: `!${scheme}caip`, value: match[2] || \"\" });\n return { url: null, linkage };\n }\n const tokenId = comps[1];\n const contract = new index_js_3.Contract(comps[0], [\n // ERC-721\n \"function tokenURI(uint) view returns (string)\",\n \"function ownerOf(uint) view returns (address)\",\n // ERC-1155\n \"function uri(uint) view returns (string)\",\n \"function balanceOf(address, uint256) view returns (uint)\"\n ], this.provider);\n if (scheme === \"erc721\") {\n const tokenOwner = await contract.ownerOf(tokenId);\n if (owner !== tokenOwner) {\n linkage.push({ type: \"!owner\", value: tokenOwner });\n return { url: null, linkage };\n }\n linkage.push({ type: \"owner\", value: tokenOwner });\n } else if (scheme === \"erc1155\") {\n const balance = await contract.balanceOf(owner, tokenId);\n if (!balance) {\n linkage.push({ type: \"!balance\", value: \"0\" });\n return { url: null, linkage };\n }\n linkage.push({ type: \"balance\", value: balance.toString() });\n }\n let metadataUrl = await contract[selector](tokenId);\n if (metadataUrl == null || metadataUrl === \"0x\") {\n linkage.push({ type: \"!metadata-url\", value: \"\" });\n return { url: null, linkage };\n }\n linkage.push({ type: \"metadata-url-base\", value: metadataUrl });\n if (scheme === \"erc1155\") {\n metadataUrl = metadataUrl.replace(\"{id}\", (0, index_js_5.toBeHex)(tokenId, 32).substring(2));\n linkage.push({ type: \"metadata-url-expanded\", value: metadataUrl });\n }\n if (metadataUrl.match(/^ipfs:/i)) {\n metadataUrl = getIpfsLink(metadataUrl);\n }\n linkage.push({ type: \"metadata-url\", value: metadataUrl });\n let metadata = {};\n const response = await new index_js_5.FetchRequest(metadataUrl).send();\n response.assertOk();\n try {\n metadata = response.bodyJson;\n } catch (error) {\n try {\n linkage.push({ type: \"!metadata\", value: response.bodyText });\n } catch (error2) {\n const bytes = response.body;\n if (bytes) {\n linkage.push({ type: \"!metadata\", value: (0, index_js_5.hexlify)(bytes) });\n }\n return { url: null, linkage };\n }\n return { url: null, linkage };\n }\n if (!metadata) {\n linkage.push({ type: \"!metadata\", value: \"\" });\n return { url: null, linkage };\n }\n linkage.push({ type: \"metadata\", value: JSON.stringify(metadata) });\n let imageUrl = metadata.image;\n if (typeof imageUrl !== \"string\") {\n linkage.push({ type: \"!imageUrl\", value: \"\" });\n return { url: null, linkage };\n }\n if (imageUrl.match(/^(https:\\/\\/|data:)/i)) {\n } else {\n const ipfs = imageUrl.match(matcherIpfs);\n if (ipfs == null) {\n linkage.push({ type: \"!imageUrl-ipfs\", value: imageUrl });\n return { url: null, linkage };\n }\n linkage.push({ type: \"imageUrl-ipfs\", value: imageUrl });\n imageUrl = getIpfsLink(imageUrl);\n }\n linkage.push({ type: \"url\", value: imageUrl });\n return { linkage, url: imageUrl };\n }\n }\n }\n } catch (error) {\n }\n return { linkage, url: null };\n }\n static async getEnsAddress(provider) {\n const network = await provider.getNetwork();\n const ensPlugin = network.getPlugin(\"org.ethers.plugins.network.Ens\");\n (0, index_js_5.assert)(ensPlugin, \"network does not support ENS\", \"UNSUPPORTED_OPERATION\", {\n operation: \"getEnsAddress\",\n info: { network }\n });\n return ensPlugin.address;\n }\n static async #getResolver(provider, name) {\n const ensAddr = await _EnsResolver.getEnsAddress(provider);\n try {\n const contract = new index_js_3.Contract(ensAddr, [\n \"function resolver(bytes32) view returns (address)\"\n ], provider);\n const addr = await contract.resolver((0, index_js_4.namehash)(name), {\n enableCcipRead: true\n });\n if (addr === index_js_2.ZeroAddress) {\n return null;\n }\n return addr;\n } catch (error) {\n throw error;\n }\n return null;\n }\n /**\n * Resolve to the ENS resolver for %%name%% using %%provider%% or\n * ``null`` if unconfigured.\n */\n static async fromName(provider, name) {\n let currentName = name;\n while (true) {\n if (currentName === \"\" || currentName === \".\") {\n return null;\n }\n if (name !== \"eth\" && currentName === \"eth\") {\n return null;\n }\n const addr = await _EnsResolver.#getResolver(provider, currentName);\n if (addr != null) {\n const resolver = new _EnsResolver(provider, addr, name);\n if (currentName !== name && !await resolver.supportsWildcard()) {\n return null;\n }\n return resolver;\n }\n currentName = currentName.split(\".\").slice(1).join(\".\");\n }\n }\n };\n exports3.EnsResolver = EnsResolver;\n }\n });\n\n // ../../../node_modules/.pnpm/ethers@6.15.0_bufferutil@4.0.9_utf-8-validate@5.0.10/node_modules/ethers/lib.commonjs/providers/format.js\n var require_format = __commonJS({\n \"../../../node_modules/.pnpm/ethers@6.15.0_bufferutil@4.0.9_utf-8-validate@5.0.10/node_modules/ethers/lib.commonjs/providers/format.js\"(exports3) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n Object.defineProperty(exports3, \"__esModule\", { value: true });\n exports3.formatTransactionResponse = exports3.formatTransactionReceipt = exports3.formatReceiptLog = exports3.formatBlock = exports3.formatLog = exports3.formatUint256 = exports3.formatHash = exports3.formatData = exports3.formatBoolean = exports3.object = exports3.arrayOf = exports3.allowNull = void 0;\n var index_js_1 = require_address3();\n var index_js_2 = require_crypto2();\n var index_js_3 = require_transaction2();\n var index_js_4 = require_utils8();\n var BN_0 = BigInt(0);\n function allowNull(format, nullValue) {\n return function(value) {\n if (value == null) {\n return nullValue;\n }\n return format(value);\n };\n }\n exports3.allowNull = allowNull;\n function arrayOf(format, allowNull2) {\n return (array2) => {\n if (allowNull2 && array2 == null) {\n return null;\n }\n if (!Array.isArray(array2)) {\n throw new Error(\"not an array\");\n }\n return array2.map((i3) => format(i3));\n };\n }\n exports3.arrayOf = arrayOf;\n function object2(format, altNames) {\n return (value) => {\n const result = {};\n for (const key in format) {\n let srcKey = key;\n if (altNames && key in altNames && !(srcKey in value)) {\n for (const altKey of altNames[key]) {\n if (altKey in value) {\n srcKey = altKey;\n break;\n }\n }\n }\n try {\n const nv = format[key](value[srcKey]);\n if (nv !== void 0) {\n result[key] = nv;\n }\n } catch (error) {\n const message = error instanceof Error ? error.message : \"not-an-error\";\n (0, index_js_4.assert)(false, `invalid value for value.${key} (${message})`, \"BAD_DATA\", { value });\n }\n }\n return result;\n };\n }\n exports3.object = object2;\n function formatBoolean(value) {\n switch (value) {\n case true:\n case \"true\":\n return true;\n case false:\n case \"false\":\n return false;\n }\n (0, index_js_4.assertArgument)(false, `invalid boolean; ${JSON.stringify(value)}`, \"value\", value);\n }\n exports3.formatBoolean = formatBoolean;\n function formatData(value) {\n (0, index_js_4.assertArgument)((0, index_js_4.isHexString)(value, true), \"invalid data\", \"value\", value);\n return value;\n }\n exports3.formatData = formatData;\n function formatHash(value) {\n (0, index_js_4.assertArgument)((0, index_js_4.isHexString)(value, 32), \"invalid hash\", \"value\", value);\n return value;\n }\n exports3.formatHash = formatHash;\n function formatUint256(value) {\n if (!(0, index_js_4.isHexString)(value)) {\n throw new Error(\"invalid uint256\");\n }\n return (0, index_js_4.zeroPadValue)(value, 32);\n }\n exports3.formatUint256 = formatUint256;\n var _formatLog = object2({\n address: index_js_1.getAddress,\n blockHash: formatHash,\n blockNumber: index_js_4.getNumber,\n data: formatData,\n index: index_js_4.getNumber,\n removed: allowNull(formatBoolean, false),\n topics: arrayOf(formatHash),\n transactionHash: formatHash,\n transactionIndex: index_js_4.getNumber\n }, {\n index: [\"logIndex\"]\n });\n function formatLog2(value) {\n return _formatLog(value);\n }\n exports3.formatLog = formatLog2;\n var _formatBlock = object2({\n hash: allowNull(formatHash),\n parentHash: formatHash,\n parentBeaconBlockRoot: allowNull(formatHash, null),\n number: index_js_4.getNumber,\n timestamp: index_js_4.getNumber,\n nonce: allowNull(formatData),\n difficulty: index_js_4.getBigInt,\n gasLimit: index_js_4.getBigInt,\n gasUsed: index_js_4.getBigInt,\n stateRoot: allowNull(formatHash, null),\n receiptsRoot: allowNull(formatHash, null),\n blobGasUsed: allowNull(index_js_4.getBigInt, null),\n excessBlobGas: allowNull(index_js_4.getBigInt, null),\n miner: allowNull(index_js_1.getAddress),\n prevRandao: allowNull(formatHash, null),\n extraData: formatData,\n baseFeePerGas: allowNull(index_js_4.getBigInt)\n }, {\n prevRandao: [\"mixHash\"]\n });\n function formatBlock2(value) {\n const result = _formatBlock(value);\n result.transactions = value.transactions.map((tx) => {\n if (typeof tx === \"string\") {\n return tx;\n }\n return formatTransactionResponse(tx);\n });\n return result;\n }\n exports3.formatBlock = formatBlock2;\n var _formatReceiptLog = object2({\n transactionIndex: index_js_4.getNumber,\n blockNumber: index_js_4.getNumber,\n transactionHash: formatHash,\n address: index_js_1.getAddress,\n topics: arrayOf(formatHash),\n data: formatData,\n index: index_js_4.getNumber,\n blockHash: formatHash\n }, {\n index: [\"logIndex\"]\n });\n function formatReceiptLog(value) {\n return _formatReceiptLog(value);\n }\n exports3.formatReceiptLog = formatReceiptLog;\n var _formatTransactionReceipt = object2({\n to: allowNull(index_js_1.getAddress, null),\n from: allowNull(index_js_1.getAddress, null),\n contractAddress: allowNull(index_js_1.getAddress, null),\n // should be allowNull(hash), but broken-EIP-658 support is handled in receipt\n index: index_js_4.getNumber,\n root: allowNull(index_js_4.hexlify),\n gasUsed: index_js_4.getBigInt,\n blobGasUsed: allowNull(index_js_4.getBigInt, null),\n logsBloom: allowNull(formatData),\n blockHash: formatHash,\n hash: formatHash,\n logs: arrayOf(formatReceiptLog),\n blockNumber: index_js_4.getNumber,\n //confirmations: allowNull(getNumber, null),\n cumulativeGasUsed: index_js_4.getBigInt,\n effectiveGasPrice: allowNull(index_js_4.getBigInt),\n blobGasPrice: allowNull(index_js_4.getBigInt, null),\n status: allowNull(index_js_4.getNumber),\n type: allowNull(index_js_4.getNumber, 0)\n }, {\n effectiveGasPrice: [\"gasPrice\"],\n hash: [\"transactionHash\"],\n index: [\"transactionIndex\"]\n });\n function formatTransactionReceipt2(value) {\n return _formatTransactionReceipt(value);\n }\n exports3.formatTransactionReceipt = formatTransactionReceipt2;\n function formatTransactionResponse(value) {\n if (value.to && (0, index_js_4.getBigInt)(value.to) === BN_0) {\n value.to = \"0x0000000000000000000000000000000000000000\";\n }\n const result = object2({\n hash: formatHash,\n // Some nodes do not return this, usually test nodes (like Ganache)\n index: allowNull(index_js_4.getNumber, void 0),\n type: (value2) => {\n if (value2 === \"0x\" || value2 == null) {\n return 0;\n }\n return (0, index_js_4.getNumber)(value2);\n },\n accessList: allowNull(index_js_3.accessListify, null),\n blobVersionedHashes: allowNull(arrayOf(formatHash, true), null),\n authorizationList: allowNull(arrayOf((v2) => {\n let sig;\n if (v2.signature) {\n sig = v2.signature;\n } else {\n let yParity = v2.yParity;\n if (yParity === \"0x1b\") {\n yParity = 0;\n } else if (yParity === \"0x1c\") {\n yParity = 1;\n }\n sig = Object.assign({}, v2, { yParity });\n }\n return {\n address: (0, index_js_1.getAddress)(v2.address),\n chainId: (0, index_js_4.getBigInt)(v2.chainId),\n nonce: (0, index_js_4.getBigInt)(v2.nonce),\n signature: index_js_2.Signature.from(sig)\n };\n }, false), null),\n blockHash: allowNull(formatHash, null),\n blockNumber: allowNull(index_js_4.getNumber, null),\n transactionIndex: allowNull(index_js_4.getNumber, null),\n from: index_js_1.getAddress,\n // either (gasPrice) or (maxPriorityFeePerGas + maxFeePerGas) must be set\n gasPrice: allowNull(index_js_4.getBigInt),\n maxPriorityFeePerGas: allowNull(index_js_4.getBigInt),\n maxFeePerGas: allowNull(index_js_4.getBigInt),\n maxFeePerBlobGas: allowNull(index_js_4.getBigInt, null),\n gasLimit: index_js_4.getBigInt,\n to: allowNull(index_js_1.getAddress, null),\n value: index_js_4.getBigInt,\n nonce: index_js_4.getNumber,\n data: formatData,\n creates: allowNull(index_js_1.getAddress, null),\n chainId: allowNull(index_js_4.getBigInt, null)\n }, {\n data: [\"input\"],\n gasLimit: [\"gas\"],\n index: [\"transactionIndex\"]\n })(value);\n if (result.to == null && result.creates == null) {\n result.creates = (0, index_js_1.getCreateAddress)(result);\n }\n if ((value.type === 1 || value.type === 2) && value.accessList == null) {\n result.accessList = [];\n }\n if (value.signature) {\n result.signature = index_js_2.Signature.from(value.signature);\n } else {\n result.signature = index_js_2.Signature.from(value);\n }\n if (result.chainId == null) {\n const chainId = result.signature.legacyChainId;\n if (chainId != null) {\n result.chainId = chainId;\n }\n }\n if (result.blockHash && (0, index_js_4.getBigInt)(result.blockHash) === BN_0) {\n result.blockHash = null;\n }\n return result;\n }\n exports3.formatTransactionResponse = formatTransactionResponse;\n }\n });\n\n // ../../../node_modules/.pnpm/ethers@6.15.0_bufferutil@4.0.9_utf-8-validate@5.0.10/node_modules/ethers/lib.commonjs/providers/plugins-network.js\n var require_plugins_network = __commonJS({\n \"../../../node_modules/.pnpm/ethers@6.15.0_bufferutil@4.0.9_utf-8-validate@5.0.10/node_modules/ethers/lib.commonjs/providers/plugins-network.js\"(exports3) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n Object.defineProperty(exports3, \"__esModule\", { value: true });\n exports3.FetchUrlFeeDataNetworkPlugin = exports3.FeeDataNetworkPlugin = exports3.EnsPlugin = exports3.GasCostPlugin = exports3.NetworkPlugin = void 0;\n var properties_js_1 = require_properties();\n var index_js_1 = require_utils8();\n var EnsAddress = \"0x00000000000C2E074eC69A0dFb2997BA6C7d2e1e\";\n var NetworkPlugin = class _NetworkPlugin {\n /**\n * The name of the plugin.\n *\n * It is recommended to use reverse-domain-notation, which permits\n * unique names with a known authority as well as hierarchal entries.\n */\n name;\n /**\n * Creates a new **NetworkPlugin**.\n */\n constructor(name) {\n (0, properties_js_1.defineProperties)(this, { name });\n }\n /**\n * Creates a copy of this plugin.\n */\n clone() {\n return new _NetworkPlugin(this.name);\n }\n };\n exports3.NetworkPlugin = NetworkPlugin;\n var GasCostPlugin = class _GasCostPlugin extends NetworkPlugin {\n /**\n * The block number to treat these values as valid from.\n *\n * This allows a hardfork to have updated values included as well as\n * mulutiple hardforks to be supported.\n */\n effectiveBlock;\n /**\n * The transactions base fee.\n */\n txBase;\n /**\n * The fee for creating a new account.\n */\n txCreate;\n /**\n * The fee per zero-byte in the data.\n */\n txDataZero;\n /**\n * The fee per non-zero-byte in the data.\n */\n txDataNonzero;\n /**\n * The fee per storage key in the [[link-eip-2930]] access list.\n */\n txAccessListStorageKey;\n /**\n * The fee per address in the [[link-eip-2930]] access list.\n */\n txAccessListAddress;\n /**\n * Creates a new GasCostPlugin from %%effectiveBlock%% until the\n * latest block or another GasCostPlugin supercedes that block number,\n * with the associated %%costs%%.\n */\n constructor(effectiveBlock, costs) {\n if (effectiveBlock == null) {\n effectiveBlock = 0;\n }\n super(`org.ethers.network.plugins.GasCost#${effectiveBlock || 0}`);\n const props = { effectiveBlock };\n function set(name, nullish2) {\n let value = (costs || {})[name];\n if (value == null) {\n value = nullish2;\n }\n (0, index_js_1.assertArgument)(typeof value === \"number\", `invalud value for ${name}`, \"costs\", costs);\n props[name] = value;\n }\n set(\"txBase\", 21e3);\n set(\"txCreate\", 32e3);\n set(\"txDataZero\", 4);\n set(\"txDataNonzero\", 16);\n set(\"txAccessListStorageKey\", 1900);\n set(\"txAccessListAddress\", 2400);\n (0, properties_js_1.defineProperties)(this, props);\n }\n clone() {\n return new _GasCostPlugin(this.effectiveBlock, this);\n }\n };\n exports3.GasCostPlugin = GasCostPlugin;\n var EnsPlugin = class _EnsPlugin extends NetworkPlugin {\n /**\n * The ENS Registrty Contract address.\n */\n address;\n /**\n * The chain ID that the ENS contract lives on.\n */\n targetNetwork;\n /**\n * Creates a new **EnsPlugin** connected to %%address%% on the\n * %%targetNetwork%%. The default ENS address and mainnet is used\n * if unspecified.\n */\n constructor(address, targetNetwork) {\n super(\"org.ethers.plugins.network.Ens\");\n (0, properties_js_1.defineProperties)(this, {\n address: address || EnsAddress,\n targetNetwork: targetNetwork == null ? 1 : targetNetwork\n });\n }\n clone() {\n return new _EnsPlugin(this.address, this.targetNetwork);\n }\n };\n exports3.EnsPlugin = EnsPlugin;\n var FeeDataNetworkPlugin = class _FeeDataNetworkPlugin extends NetworkPlugin {\n #feeDataFunc;\n /**\n * The fee data function provided to the constructor.\n */\n get feeDataFunc() {\n return this.#feeDataFunc;\n }\n /**\n * Creates a new **FeeDataNetworkPlugin**.\n */\n constructor(feeDataFunc) {\n super(\"org.ethers.plugins.network.FeeData\");\n this.#feeDataFunc = feeDataFunc;\n }\n /**\n * Resolves to the fee data.\n */\n async getFeeData(provider) {\n return await this.#feeDataFunc(provider);\n }\n clone() {\n return new _FeeDataNetworkPlugin(this.#feeDataFunc);\n }\n };\n exports3.FeeDataNetworkPlugin = FeeDataNetworkPlugin;\n var FetchUrlFeeDataNetworkPlugin = class extends NetworkPlugin {\n #url;\n #processFunc;\n /**\n * The URL to initialize the FetchRequest with in %%processFunc%%.\n */\n get url() {\n return this.#url;\n }\n /**\n * The callback to use when computing the FeeData.\n */\n get processFunc() {\n return this.#processFunc;\n }\n /**\n * Creates a new **FetchUrlFeeDataNetworkPlugin** which will\n * be used when computing the fee data for the network.\n */\n constructor(url, processFunc) {\n super(\"org.ethers.plugins.network.FetchUrlFeeDataPlugin\");\n this.#url = url;\n this.#processFunc = processFunc;\n }\n // We are immutable, so we can serve as our own clone\n clone() {\n return this;\n }\n };\n exports3.FetchUrlFeeDataNetworkPlugin = FetchUrlFeeDataNetworkPlugin;\n }\n });\n\n // ../../../node_modules/.pnpm/ethers@6.15.0_bufferutil@4.0.9_utf-8-validate@5.0.10/node_modules/ethers/lib.commonjs/providers/network.js\n var require_network = __commonJS({\n \"../../../node_modules/.pnpm/ethers@6.15.0_bufferutil@4.0.9_utf-8-validate@5.0.10/node_modules/ethers/lib.commonjs/providers/network.js\"(exports3) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n Object.defineProperty(exports3, \"__esModule\", { value: true });\n exports3.Network = void 0;\n var index_js_1 = require_transaction2();\n var index_js_2 = require_utils8();\n var plugins_network_js_1 = require_plugins_network();\n var Networks = /* @__PURE__ */ new Map();\n var Network = class _Network {\n #name;\n #chainId;\n #plugins;\n /**\n * Creates a new **Network** for %%name%% and %%chainId%%.\n */\n constructor(name, chainId) {\n this.#name = name;\n this.#chainId = (0, index_js_2.getBigInt)(chainId);\n this.#plugins = /* @__PURE__ */ new Map();\n }\n /**\n * Returns a JSON-compatible representation of a Network.\n */\n toJSON() {\n return { name: this.name, chainId: String(this.chainId) };\n }\n /**\n * The network common name.\n *\n * This is the canonical name, as networks migh have multiple\n * names.\n */\n get name() {\n return this.#name;\n }\n set name(value) {\n this.#name = value;\n }\n /**\n * The network chain ID.\n */\n get chainId() {\n return this.#chainId;\n }\n set chainId(value) {\n this.#chainId = (0, index_js_2.getBigInt)(value, \"chainId\");\n }\n /**\n * Returns true if %%other%% matches this network. Any chain ID\n * must match, and if no chain ID is present, the name must match.\n *\n * This method does not currently check for additional properties,\n * such as ENS address or plug-in compatibility.\n */\n matches(other) {\n if (other == null) {\n return false;\n }\n if (typeof other === \"string\") {\n try {\n return this.chainId === (0, index_js_2.getBigInt)(other);\n } catch (error) {\n }\n return this.name === other;\n }\n if (typeof other === \"number\" || typeof other === \"bigint\") {\n try {\n return this.chainId === (0, index_js_2.getBigInt)(other);\n } catch (error) {\n }\n return false;\n }\n if (typeof other === \"object\") {\n if (other.chainId != null) {\n try {\n return this.chainId === (0, index_js_2.getBigInt)(other.chainId);\n } catch (error) {\n }\n return false;\n }\n if (other.name != null) {\n return this.name === other.name;\n }\n return false;\n }\n return false;\n }\n /**\n * Returns the list of plugins currently attached to this Network.\n */\n get plugins() {\n return Array.from(this.#plugins.values());\n }\n /**\n * Attach a new %%plugin%% to this Network. The network name\n * must be unique, excluding any fragment.\n */\n attachPlugin(plugin) {\n if (this.#plugins.get(plugin.name)) {\n throw new Error(`cannot replace existing plugin: ${plugin.name} `);\n }\n this.#plugins.set(plugin.name, plugin.clone());\n return this;\n }\n /**\n * Return the plugin, if any, matching %%name%% exactly. Plugins\n * with fragments will not be returned unless %%name%% includes\n * a fragment.\n */\n getPlugin(name) {\n return this.#plugins.get(name) || null;\n }\n /**\n * Gets a list of all plugins that match %%name%%, with otr without\n * a fragment.\n */\n getPlugins(basename) {\n return this.plugins.filter((p4) => p4.name.split(\"#\")[0] === basename);\n }\n /**\n * Create a copy of this Network.\n */\n clone() {\n const clone = new _Network(this.name, this.chainId);\n this.plugins.forEach((plugin) => {\n clone.attachPlugin(plugin.clone());\n });\n return clone;\n }\n /**\n * Compute the intrinsic gas required for a transaction.\n *\n * A GasCostPlugin can be attached to override the default\n * values.\n */\n computeIntrinsicGas(tx) {\n const costs = this.getPlugin(\"org.ethers.plugins.network.GasCost\") || new plugins_network_js_1.GasCostPlugin();\n let gas = costs.txBase;\n if (tx.to == null) {\n gas += costs.txCreate;\n }\n if (tx.data) {\n for (let i3 = 2; i3 < tx.data.length; i3 += 2) {\n if (tx.data.substring(i3, i3 + 2) === \"00\") {\n gas += costs.txDataZero;\n } else {\n gas += costs.txDataNonzero;\n }\n }\n }\n if (tx.accessList) {\n const accessList = (0, index_js_1.accessListify)(tx.accessList);\n for (const addr in accessList) {\n gas += costs.txAccessListAddress + costs.txAccessListStorageKey * accessList[addr].storageKeys.length;\n }\n }\n return gas;\n }\n /**\n * Returns a new Network for the %%network%% name or chainId.\n */\n static from(network) {\n injectCommonNetworks();\n if (network == null) {\n return _Network.from(\"mainnet\");\n }\n if (typeof network === \"number\") {\n network = BigInt(network);\n }\n if (typeof network === \"string\" || typeof network === \"bigint\") {\n const networkFunc = Networks.get(network);\n if (networkFunc) {\n return networkFunc();\n }\n if (typeof network === \"bigint\") {\n return new _Network(\"unknown\", network);\n }\n (0, index_js_2.assertArgument)(false, \"unknown network\", \"network\", network);\n }\n if (typeof network.clone === \"function\") {\n const clone = network.clone();\n return clone;\n }\n if (typeof network === \"object\") {\n (0, index_js_2.assertArgument)(typeof network.name === \"string\" && typeof network.chainId === \"number\", \"invalid network object name or chainId\", \"network\", network);\n const custom3 = new _Network(network.name, network.chainId);\n if (network.ensAddress || network.ensNetwork != null) {\n custom3.attachPlugin(new plugins_network_js_1.EnsPlugin(network.ensAddress, network.ensNetwork));\n }\n return custom3;\n }\n (0, index_js_2.assertArgument)(false, \"invalid network\", \"network\", network);\n }\n /**\n * Register %%nameOrChainId%% with a function which returns\n * an instance of a Network representing that chain.\n */\n static register(nameOrChainId, networkFunc) {\n if (typeof nameOrChainId === \"number\") {\n nameOrChainId = BigInt(nameOrChainId);\n }\n const existing = Networks.get(nameOrChainId);\n if (existing) {\n (0, index_js_2.assertArgument)(false, `conflicting network for ${JSON.stringify(existing.name)}`, \"nameOrChainId\", nameOrChainId);\n }\n Networks.set(nameOrChainId, networkFunc);\n }\n };\n exports3.Network = Network;\n function parseUnits(_value, decimals) {\n const value = String(_value);\n if (!value.match(/^[0-9.]+$/)) {\n throw new Error(`invalid gwei value: ${_value}`);\n }\n const comps = value.split(\".\");\n if (comps.length === 1) {\n comps.push(\"\");\n }\n if (comps.length !== 2) {\n throw new Error(`invalid gwei value: ${_value}`);\n }\n while (comps[1].length < decimals) {\n comps[1] += \"0\";\n }\n if (comps[1].length > 9) {\n let frac = BigInt(comps[1].substring(0, 9));\n if (!comps[1].substring(9).match(/^0+$/)) {\n frac++;\n }\n comps[1] = frac.toString();\n }\n return BigInt(comps[0] + comps[1]);\n }\n function getGasStationPlugin(url) {\n return new plugins_network_js_1.FetchUrlFeeDataNetworkPlugin(url, async (fetchFeeData, provider, request) => {\n request.setHeader(\"User-Agent\", \"ethers\");\n let response;\n try {\n const [_response, _feeData] = await Promise.all([\n request.send(),\n fetchFeeData()\n ]);\n response = _response;\n const payload = response.bodyJson.standard;\n const feeData = {\n gasPrice: _feeData.gasPrice,\n maxFeePerGas: parseUnits(payload.maxFee, 9),\n maxPriorityFeePerGas: parseUnits(payload.maxPriorityFee, 9)\n };\n return feeData;\n } catch (error) {\n (0, index_js_2.assert)(false, `error encountered with polygon gas station (${JSON.stringify(request.url)})`, \"SERVER_ERROR\", { request, response, error });\n }\n });\n }\n var injected = false;\n function injectCommonNetworks() {\n if (injected) {\n return;\n }\n injected = true;\n function registerEth(name, chainId, options) {\n const func = function() {\n const network = new Network(name, chainId);\n if (options.ensNetwork != null) {\n network.attachPlugin(new plugins_network_js_1.EnsPlugin(null, options.ensNetwork));\n }\n network.attachPlugin(new plugins_network_js_1.GasCostPlugin());\n (options.plugins || []).forEach((plugin) => {\n network.attachPlugin(plugin);\n });\n return network;\n };\n Network.register(name, func);\n Network.register(chainId, func);\n if (options.altNames) {\n options.altNames.forEach((name2) => {\n Network.register(name2, func);\n });\n }\n }\n registerEth(\"mainnet\", 1, { ensNetwork: 1, altNames: [\"homestead\"] });\n registerEth(\"ropsten\", 3, { ensNetwork: 3 });\n registerEth(\"rinkeby\", 4, { ensNetwork: 4 });\n registerEth(\"goerli\", 5, { ensNetwork: 5 });\n registerEth(\"kovan\", 42, { ensNetwork: 42 });\n registerEth(\"sepolia\", 11155111, { ensNetwork: 11155111 });\n registerEth(\"holesky\", 17e3, { ensNetwork: 17e3 });\n registerEth(\"classic\", 61, {});\n registerEth(\"classicKotti\", 6, {});\n registerEth(\"arbitrum\", 42161, {\n ensNetwork: 1\n });\n registerEth(\"arbitrum-goerli\", 421613, {});\n registerEth(\"arbitrum-sepolia\", 421614, {});\n registerEth(\"base\", 8453, { ensNetwork: 1 });\n registerEth(\"base-goerli\", 84531, {});\n registerEth(\"base-sepolia\", 84532, {});\n registerEth(\"bnb\", 56, { ensNetwork: 1 });\n registerEth(\"bnbt\", 97, {});\n registerEth(\"linea\", 59144, { ensNetwork: 1 });\n registerEth(\"linea-goerli\", 59140, {});\n registerEth(\"linea-sepolia\", 59141, {});\n registerEth(\"matic\", 137, {\n ensNetwork: 1,\n plugins: [\n getGasStationPlugin(\"https://gasstation.polygon.technology/v2\")\n ]\n });\n registerEth(\"matic-amoy\", 80002, {});\n registerEth(\"matic-mumbai\", 80001, {\n altNames: [\"maticMumbai\", \"maticmum\"],\n plugins: [\n getGasStationPlugin(\"https://gasstation-testnet.polygon.technology/v2\")\n ]\n });\n registerEth(\"optimism\", 10, {\n ensNetwork: 1,\n plugins: []\n });\n registerEth(\"optimism-goerli\", 420, {});\n registerEth(\"optimism-sepolia\", 11155420, {});\n registerEth(\"xdai\", 100, { ensNetwork: 1 });\n }\n }\n });\n\n // ../../../node_modules/.pnpm/ethers@6.15.0_bufferutil@4.0.9_utf-8-validate@5.0.10/node_modules/ethers/lib.commonjs/providers/subscriber-polling.js\n var require_subscriber_polling = __commonJS({\n \"../../../node_modules/.pnpm/ethers@6.15.0_bufferutil@4.0.9_utf-8-validate@5.0.10/node_modules/ethers/lib.commonjs/providers/subscriber-polling.js\"(exports3) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n Object.defineProperty(exports3, \"__esModule\", { value: true });\n exports3.PollingEventSubscriber = exports3.PollingTransactionSubscriber = exports3.PollingOrphanSubscriber = exports3.PollingBlockTagSubscriber = exports3.OnBlockSubscriber = exports3.PollingBlockSubscriber = exports3.getPollingSubscriber = void 0;\n var index_js_1 = require_utils8();\n function copy(obj) {\n return JSON.parse(JSON.stringify(obj));\n }\n function getPollingSubscriber(provider, event) {\n if (event === \"block\") {\n return new PollingBlockSubscriber(provider);\n }\n if ((0, index_js_1.isHexString)(event, 32)) {\n return new PollingTransactionSubscriber(provider, event);\n }\n (0, index_js_1.assert)(false, \"unsupported polling event\", \"UNSUPPORTED_OPERATION\", {\n operation: \"getPollingSubscriber\",\n info: { event }\n });\n }\n exports3.getPollingSubscriber = getPollingSubscriber;\n var PollingBlockSubscriber = class {\n #provider;\n #poller;\n #interval;\n // The most recent block we have scanned for events. The value -2\n // indicates we still need to fetch an initial block number\n #blockNumber;\n /**\n * Create a new **PollingBlockSubscriber** attached to %%provider%%.\n */\n constructor(provider) {\n this.#provider = provider;\n this.#poller = null;\n this.#interval = 4e3;\n this.#blockNumber = -2;\n }\n /**\n * The polling interval.\n */\n get pollingInterval() {\n return this.#interval;\n }\n set pollingInterval(value) {\n this.#interval = value;\n }\n async #poll() {\n try {\n const blockNumber = await this.#provider.getBlockNumber();\n if (this.#blockNumber === -2) {\n this.#blockNumber = blockNumber;\n return;\n }\n if (blockNumber !== this.#blockNumber) {\n for (let b4 = this.#blockNumber + 1; b4 <= blockNumber; b4++) {\n if (this.#poller == null) {\n return;\n }\n await this.#provider.emit(\"block\", b4);\n }\n this.#blockNumber = blockNumber;\n }\n } catch (error) {\n }\n if (this.#poller == null) {\n return;\n }\n this.#poller = this.#provider._setTimeout(this.#poll.bind(this), this.#interval);\n }\n start() {\n if (this.#poller) {\n return;\n }\n this.#poller = this.#provider._setTimeout(this.#poll.bind(this), this.#interval);\n this.#poll();\n }\n stop() {\n if (!this.#poller) {\n return;\n }\n this.#provider._clearTimeout(this.#poller);\n this.#poller = null;\n }\n pause(dropWhilePaused) {\n this.stop();\n if (dropWhilePaused) {\n this.#blockNumber = -2;\n }\n }\n resume() {\n this.start();\n }\n };\n exports3.PollingBlockSubscriber = PollingBlockSubscriber;\n var OnBlockSubscriber = class {\n #provider;\n #poll;\n #running;\n /**\n * Create a new **OnBlockSubscriber** attached to %%provider%%.\n */\n constructor(provider) {\n this.#provider = provider;\n this.#running = false;\n this.#poll = (blockNumber) => {\n this._poll(blockNumber, this.#provider);\n };\n }\n /**\n * Called on every new block.\n */\n async _poll(blockNumber, provider) {\n throw new Error(\"sub-classes must override this\");\n }\n start() {\n if (this.#running) {\n return;\n }\n this.#running = true;\n this.#poll(-2);\n this.#provider.on(\"block\", this.#poll);\n }\n stop() {\n if (!this.#running) {\n return;\n }\n this.#running = false;\n this.#provider.off(\"block\", this.#poll);\n }\n pause(dropWhilePaused) {\n this.stop();\n }\n resume() {\n this.start();\n }\n };\n exports3.OnBlockSubscriber = OnBlockSubscriber;\n var PollingBlockTagSubscriber = class extends OnBlockSubscriber {\n #tag;\n #lastBlock;\n constructor(provider, tag) {\n super(provider);\n this.#tag = tag;\n this.#lastBlock = -2;\n }\n pause(dropWhilePaused) {\n if (dropWhilePaused) {\n this.#lastBlock = -2;\n }\n super.pause(dropWhilePaused);\n }\n async _poll(blockNumber, provider) {\n const block = await provider.getBlock(this.#tag);\n if (block == null) {\n return;\n }\n if (this.#lastBlock === -2) {\n this.#lastBlock = block.number;\n } else if (block.number > this.#lastBlock) {\n provider.emit(this.#tag, block.number);\n this.#lastBlock = block.number;\n }\n }\n };\n exports3.PollingBlockTagSubscriber = PollingBlockTagSubscriber;\n var PollingOrphanSubscriber = class extends OnBlockSubscriber {\n #filter;\n constructor(provider, filter) {\n super(provider);\n this.#filter = copy(filter);\n }\n async _poll(blockNumber, provider) {\n throw new Error(\"@TODO\");\n console.log(this.#filter);\n }\n };\n exports3.PollingOrphanSubscriber = PollingOrphanSubscriber;\n var PollingTransactionSubscriber = class extends OnBlockSubscriber {\n #hash;\n /**\n * Create a new **PollingTransactionSubscriber** attached to\n * %%provider%%, listening for %%hash%%.\n */\n constructor(provider, hash3) {\n super(provider);\n this.#hash = hash3;\n }\n async _poll(blockNumber, provider) {\n const tx = await provider.getTransactionReceipt(this.#hash);\n if (tx) {\n provider.emit(this.#hash, tx);\n }\n }\n };\n exports3.PollingTransactionSubscriber = PollingTransactionSubscriber;\n var PollingEventSubscriber = class {\n #provider;\n #filter;\n #poller;\n #running;\n // The most recent block we have scanned for events. The value -2\n // indicates we still need to fetch an initial block number\n #blockNumber;\n /**\n * Create a new **PollingTransactionSubscriber** attached to\n * %%provider%%, listening for %%filter%%.\n */\n constructor(provider, filter) {\n this.#provider = provider;\n this.#filter = copy(filter);\n this.#poller = this.#poll.bind(this);\n this.#running = false;\n this.#blockNumber = -2;\n }\n async #poll(blockNumber) {\n if (this.#blockNumber === -2) {\n return;\n }\n const filter = copy(this.#filter);\n filter.fromBlock = this.#blockNumber + 1;\n filter.toBlock = blockNumber;\n const logs = await this.#provider.getLogs(filter);\n if (logs.length === 0) {\n if (this.#blockNumber < blockNumber - 60) {\n this.#blockNumber = blockNumber - 60;\n }\n return;\n }\n for (const log of logs) {\n this.#provider.emit(this.#filter, log);\n this.#blockNumber = log.blockNumber;\n }\n }\n start() {\n if (this.#running) {\n return;\n }\n this.#running = true;\n if (this.#blockNumber === -2) {\n this.#provider.getBlockNumber().then((blockNumber) => {\n this.#blockNumber = blockNumber;\n });\n }\n this.#provider.on(\"block\", this.#poller);\n }\n stop() {\n if (!this.#running) {\n return;\n }\n this.#running = false;\n this.#provider.off(\"block\", this.#poller);\n }\n pause(dropWhilePaused) {\n this.stop();\n if (dropWhilePaused) {\n this.#blockNumber = -2;\n }\n }\n resume() {\n this.start();\n }\n };\n exports3.PollingEventSubscriber = PollingEventSubscriber;\n }\n });\n\n // ../../../node_modules/.pnpm/ethers@6.15.0_bufferutil@4.0.9_utf-8-validate@5.0.10/node_modules/ethers/lib.commonjs/providers/abstract-provider.js\n var require_abstract_provider = __commonJS({\n \"../../../node_modules/.pnpm/ethers@6.15.0_bufferutil@4.0.9_utf-8-validate@5.0.10/node_modules/ethers/lib.commonjs/providers/abstract-provider.js\"(exports3) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n Object.defineProperty(exports3, \"__esModule\", { value: true });\n exports3.AbstractProvider = exports3.UnmanagedSubscriber = void 0;\n var index_js_1 = require_address3();\n var index_js_2 = require_constants5();\n var index_js_3 = require_contract2();\n var index_js_4 = require_hash2();\n var index_js_5 = require_transaction2();\n var index_js_6 = require_utils8();\n var ens_resolver_js_1 = require_ens_resolver();\n var format_js_1 = require_format();\n var network_js_1 = require_network();\n var provider_js_1 = require_provider();\n var subscriber_polling_js_1 = require_subscriber_polling();\n var BN_2 = BigInt(2);\n var MAX_CCIP_REDIRECTS = 10;\n function isPromise(value) {\n return value && typeof value.then === \"function\";\n }\n function getTag(prefix, value) {\n return prefix + \":\" + JSON.stringify(value, (k4, v2) => {\n if (v2 == null) {\n return \"null\";\n }\n if (typeof v2 === \"bigint\") {\n return `bigint:${v2.toString()}`;\n }\n if (typeof v2 === \"string\") {\n return v2.toLowerCase();\n }\n if (typeof v2 === \"object\" && !Array.isArray(v2)) {\n const keys = Object.keys(v2);\n keys.sort();\n return keys.reduce((accum, key) => {\n accum[key] = v2[key];\n return accum;\n }, {});\n }\n return v2;\n });\n }\n var UnmanagedSubscriber = class {\n /**\n * The name fof the event.\n */\n name;\n /**\n * Create a new UnmanagedSubscriber with %%name%%.\n */\n constructor(name) {\n (0, index_js_6.defineProperties)(this, { name });\n }\n start() {\n }\n stop() {\n }\n pause(dropWhilePaused) {\n }\n resume() {\n }\n };\n exports3.UnmanagedSubscriber = UnmanagedSubscriber;\n function copy(value) {\n return JSON.parse(JSON.stringify(value));\n }\n function concisify(items) {\n items = Array.from(new Set(items).values());\n items.sort();\n return items;\n }\n async function getSubscription(_event, provider) {\n if (_event == null) {\n throw new Error(\"invalid event\");\n }\n if (Array.isArray(_event)) {\n _event = { topics: _event };\n }\n if (typeof _event === \"string\") {\n switch (_event) {\n case \"block\":\n case \"debug\":\n case \"error\":\n case \"finalized\":\n case \"network\":\n case \"pending\":\n case \"safe\": {\n return { type: _event, tag: _event };\n }\n }\n }\n if ((0, index_js_6.isHexString)(_event, 32)) {\n const hash3 = _event.toLowerCase();\n return { type: \"transaction\", tag: getTag(\"tx\", { hash: hash3 }), hash: hash3 };\n }\n if (_event.orphan) {\n const event = _event;\n return { type: \"orphan\", tag: getTag(\"orphan\", event), filter: copy(event) };\n }\n if (_event.address || _event.topics) {\n const event = _event;\n const filter = {\n topics: (event.topics || []).map((t3) => {\n if (t3 == null) {\n return null;\n }\n if (Array.isArray(t3)) {\n return concisify(t3.map((t4) => t4.toLowerCase()));\n }\n return t3.toLowerCase();\n })\n };\n if (event.address) {\n const addresses4 = [];\n const promises = [];\n const addAddress = (addr) => {\n if ((0, index_js_6.isHexString)(addr)) {\n addresses4.push(addr);\n } else {\n promises.push((async () => {\n addresses4.push(await (0, index_js_1.resolveAddress)(addr, provider));\n })());\n }\n };\n if (Array.isArray(event.address)) {\n event.address.forEach(addAddress);\n } else {\n addAddress(event.address);\n }\n if (promises.length) {\n await Promise.all(promises);\n }\n filter.address = concisify(addresses4.map((a3) => a3.toLowerCase()));\n }\n return { filter, tag: getTag(\"event\", filter), type: \"event\" };\n }\n (0, index_js_6.assertArgument)(false, \"unknown ProviderEvent\", \"event\", _event);\n }\n function getTime() {\n return (/* @__PURE__ */ new Date()).getTime();\n }\n var defaultOptions = {\n cacheTimeout: 250,\n pollingInterval: 4e3\n };\n var AbstractProvider = class {\n #subs;\n #plugins;\n // null=unpaused, true=paused+dropWhilePaused, false=paused\n #pausedState;\n #destroyed;\n #networkPromise;\n #anyNetwork;\n #performCache;\n // The most recent block number if running an event or -1 if no \"block\" event\n #lastBlockNumber;\n #nextTimer;\n #timers;\n #disableCcipRead;\n #options;\n /**\n * Create a new **AbstractProvider** connected to %%network%%, or\n * use the various network detection capabilities to discover the\n * [[Network]] if necessary.\n */\n constructor(_network, options) {\n this.#options = Object.assign({}, defaultOptions, options || {});\n if (_network === \"any\") {\n this.#anyNetwork = true;\n this.#networkPromise = null;\n } else if (_network) {\n const network = network_js_1.Network.from(_network);\n this.#anyNetwork = false;\n this.#networkPromise = Promise.resolve(network);\n setTimeout(() => {\n this.emit(\"network\", network, null);\n }, 0);\n } else {\n this.#anyNetwork = false;\n this.#networkPromise = null;\n }\n this.#lastBlockNumber = -1;\n this.#performCache = /* @__PURE__ */ new Map();\n this.#subs = /* @__PURE__ */ new Map();\n this.#plugins = /* @__PURE__ */ new Map();\n this.#pausedState = null;\n this.#destroyed = false;\n this.#nextTimer = 1;\n this.#timers = /* @__PURE__ */ new Map();\n this.#disableCcipRead = false;\n }\n get pollingInterval() {\n return this.#options.pollingInterval;\n }\n /**\n * Returns ``this``, to allow an **AbstractProvider** to implement\n * the [[ContractRunner]] interface.\n */\n get provider() {\n return this;\n }\n /**\n * Returns all the registered plug-ins.\n */\n get plugins() {\n return Array.from(this.#plugins.values());\n }\n /**\n * Attach a new plug-in.\n */\n attachPlugin(plugin) {\n if (this.#plugins.get(plugin.name)) {\n throw new Error(`cannot replace existing plugin: ${plugin.name} `);\n }\n this.#plugins.set(plugin.name, plugin.connect(this));\n return this;\n }\n /**\n * Get a plugin by name.\n */\n getPlugin(name) {\n return this.#plugins.get(name) || null;\n }\n /**\n * Prevent any CCIP-read operation, regardless of whether requested\n * in a [[call]] using ``enableCcipRead``.\n */\n get disableCcipRead() {\n return this.#disableCcipRead;\n }\n set disableCcipRead(value) {\n this.#disableCcipRead = !!value;\n }\n // Shares multiple identical requests made during the same 250ms\n async #perform(req) {\n const timeout = this.#options.cacheTimeout;\n if (timeout < 0) {\n return await this._perform(req);\n }\n const tag = getTag(req.method, req);\n let perform = this.#performCache.get(tag);\n if (!perform) {\n perform = this._perform(req);\n this.#performCache.set(tag, perform);\n setTimeout(() => {\n if (this.#performCache.get(tag) === perform) {\n this.#performCache.delete(tag);\n }\n }, timeout);\n }\n return await perform;\n }\n /**\n * Resolves to the data for executing the CCIP-read operations.\n */\n async ccipReadFetch(tx, calldata, urls) {\n if (this.disableCcipRead || urls.length === 0 || tx.to == null) {\n return null;\n }\n const sender = tx.to.toLowerCase();\n const data = calldata.toLowerCase();\n const errorMessages = [];\n for (let i3 = 0; i3 < urls.length; i3++) {\n const url = urls[i3];\n const href = url.replace(\"{sender}\", sender).replace(\"{data}\", data);\n const request = new index_js_6.FetchRequest(href);\n if (url.indexOf(\"{data}\") === -1) {\n request.body = { data, sender };\n }\n this.emit(\"debug\", { action: \"sendCcipReadFetchRequest\", request, index: i3, urls });\n let errorMessage = \"unknown error\";\n let resp;\n try {\n resp = await request.send();\n } catch (error) {\n errorMessages.push(error.message);\n this.emit(\"debug\", { action: \"receiveCcipReadFetchError\", request, result: { error } });\n continue;\n }\n try {\n const result = resp.bodyJson;\n if (result.data) {\n this.emit(\"debug\", { action: \"receiveCcipReadFetchResult\", request, result });\n return result.data;\n }\n if (result.message) {\n errorMessage = result.message;\n }\n this.emit(\"debug\", { action: \"receiveCcipReadFetchError\", request, result });\n } catch (error) {\n }\n (0, index_js_6.assert)(resp.statusCode < 400 || resp.statusCode >= 500, `response not found during CCIP fetch: ${errorMessage}`, \"OFFCHAIN_FAULT\", { reason: \"404_MISSING_RESOURCE\", transaction: tx, info: { url, errorMessage } });\n errorMessages.push(errorMessage);\n }\n (0, index_js_6.assert)(false, `error encountered during CCIP fetch: ${errorMessages.map((m2) => JSON.stringify(m2)).join(\", \")}`, \"OFFCHAIN_FAULT\", {\n reason: \"500_SERVER_ERROR\",\n transaction: tx,\n info: { urls, errorMessages }\n });\n }\n /**\n * Provides the opportunity for a sub-class to wrap a block before\n * returning it, to add additional properties or an alternate\n * sub-class of [[Block]].\n */\n _wrapBlock(value, network) {\n return new provider_js_1.Block((0, format_js_1.formatBlock)(value), this);\n }\n /**\n * Provides the opportunity for a sub-class to wrap a log before\n * returning it, to add additional properties or an alternate\n * sub-class of [[Log]].\n */\n _wrapLog(value, network) {\n return new provider_js_1.Log((0, format_js_1.formatLog)(value), this);\n }\n /**\n * Provides the opportunity for a sub-class to wrap a transaction\n * receipt before returning it, to add additional properties or an\n * alternate sub-class of [[TransactionReceipt]].\n */\n _wrapTransactionReceipt(value, network) {\n return new provider_js_1.TransactionReceipt((0, format_js_1.formatTransactionReceipt)(value), this);\n }\n /**\n * Provides the opportunity for a sub-class to wrap a transaction\n * response before returning it, to add additional properties or an\n * alternate sub-class of [[TransactionResponse]].\n */\n _wrapTransactionResponse(tx, network) {\n return new provider_js_1.TransactionResponse((0, format_js_1.formatTransactionResponse)(tx), this);\n }\n /**\n * Resolves to the Network, forcing a network detection using whatever\n * technique the sub-class requires.\n *\n * Sub-classes **must** override this.\n */\n _detectNetwork() {\n (0, index_js_6.assert)(false, \"sub-classes must implement this\", \"UNSUPPORTED_OPERATION\", {\n operation: \"_detectNetwork\"\n });\n }\n /**\n * Sub-classes should use this to perform all built-in operations. All\n * methods sanitizes and normalizes the values passed into this.\n *\n * Sub-classes **must** override this.\n */\n async _perform(req) {\n (0, index_js_6.assert)(false, `unsupported method: ${req.method}`, \"UNSUPPORTED_OPERATION\", {\n operation: req.method,\n info: req\n });\n }\n // State\n async getBlockNumber() {\n const blockNumber = (0, index_js_6.getNumber)(await this.#perform({ method: \"getBlockNumber\" }), \"%response\");\n if (this.#lastBlockNumber >= 0) {\n this.#lastBlockNumber = blockNumber;\n }\n return blockNumber;\n }\n /**\n * Returns or resolves to the address for %%address%%, resolving ENS\n * names and [[Addressable]] objects and returning if already an\n * address.\n */\n _getAddress(address) {\n return (0, index_js_1.resolveAddress)(address, this);\n }\n /**\n * Returns or resolves to a valid block tag for %%blockTag%%, resolving\n * negative values and returning if already a valid block tag.\n */\n _getBlockTag(blockTag) {\n if (blockTag == null) {\n return \"latest\";\n }\n switch (blockTag) {\n case \"earliest\":\n return \"0x0\";\n case \"finalized\":\n case \"latest\":\n case \"pending\":\n case \"safe\":\n return blockTag;\n }\n if ((0, index_js_6.isHexString)(blockTag)) {\n if ((0, index_js_6.isHexString)(blockTag, 32)) {\n return blockTag;\n }\n return (0, index_js_6.toQuantity)(blockTag);\n }\n if (typeof blockTag === \"bigint\") {\n blockTag = (0, index_js_6.getNumber)(blockTag, \"blockTag\");\n }\n if (typeof blockTag === \"number\") {\n if (blockTag >= 0) {\n return (0, index_js_6.toQuantity)(blockTag);\n }\n if (this.#lastBlockNumber >= 0) {\n return (0, index_js_6.toQuantity)(this.#lastBlockNumber + blockTag);\n }\n return this.getBlockNumber().then((b4) => (0, index_js_6.toQuantity)(b4 + blockTag));\n }\n (0, index_js_6.assertArgument)(false, \"invalid blockTag\", \"blockTag\", blockTag);\n }\n /**\n * Returns or resolves to a filter for %%filter%%, resolving any ENS\n * names or [[Addressable]] object and returning if already a valid\n * filter.\n */\n _getFilter(filter) {\n const topics = (filter.topics || []).map((t3) => {\n if (t3 == null) {\n return null;\n }\n if (Array.isArray(t3)) {\n return concisify(t3.map((t4) => t4.toLowerCase()));\n }\n return t3.toLowerCase();\n });\n const blockHash = \"blockHash\" in filter ? filter.blockHash : void 0;\n const resolve = (_address, fromBlock2, toBlock2) => {\n let address2 = void 0;\n switch (_address.length) {\n case 0:\n break;\n case 1:\n address2 = _address[0];\n break;\n default:\n _address.sort();\n address2 = _address;\n }\n if (blockHash) {\n if (fromBlock2 != null || toBlock2 != null) {\n throw new Error(\"invalid filter\");\n }\n }\n const filter2 = {};\n if (address2) {\n filter2.address = address2;\n }\n if (topics.length) {\n filter2.topics = topics;\n }\n if (fromBlock2) {\n filter2.fromBlock = fromBlock2;\n }\n if (toBlock2) {\n filter2.toBlock = toBlock2;\n }\n if (blockHash) {\n filter2.blockHash = blockHash;\n }\n return filter2;\n };\n let address = [];\n if (filter.address) {\n if (Array.isArray(filter.address)) {\n for (const addr of filter.address) {\n address.push(this._getAddress(addr));\n }\n } else {\n address.push(this._getAddress(filter.address));\n }\n }\n let fromBlock = void 0;\n if (\"fromBlock\" in filter) {\n fromBlock = this._getBlockTag(filter.fromBlock);\n }\n let toBlock = void 0;\n if (\"toBlock\" in filter) {\n toBlock = this._getBlockTag(filter.toBlock);\n }\n if (address.filter((a3) => typeof a3 !== \"string\").length || fromBlock != null && typeof fromBlock !== \"string\" || toBlock != null && typeof toBlock !== \"string\") {\n return Promise.all([Promise.all(address), fromBlock, toBlock]).then((result) => {\n return resolve(result[0], result[1], result[2]);\n });\n }\n return resolve(address, fromBlock, toBlock);\n }\n /**\n * Returns or resolves to a transaction for %%request%%, resolving\n * any ENS names or [[Addressable]] and returning if already a valid\n * transaction.\n */\n _getTransactionRequest(_request) {\n const request = (0, provider_js_1.copyRequest)(_request);\n const promises = [];\n [\"to\", \"from\"].forEach((key) => {\n if (request[key] == null) {\n return;\n }\n const addr = (0, index_js_1.resolveAddress)(request[key], this);\n if (isPromise(addr)) {\n promises.push(async function() {\n request[key] = await addr;\n }());\n } else {\n request[key] = addr;\n }\n });\n if (request.blockTag != null) {\n const blockTag = this._getBlockTag(request.blockTag);\n if (isPromise(blockTag)) {\n promises.push(async function() {\n request.blockTag = await blockTag;\n }());\n } else {\n request.blockTag = blockTag;\n }\n }\n if (promises.length) {\n return async function() {\n await Promise.all(promises);\n return request;\n }();\n }\n return request;\n }\n async getNetwork() {\n if (this.#networkPromise == null) {\n const detectNetwork = (async () => {\n try {\n const network = await this._detectNetwork();\n this.emit(\"network\", network, null);\n return network;\n } catch (error) {\n if (this.#networkPromise === detectNetwork) {\n this.#networkPromise = null;\n }\n throw error;\n }\n })();\n this.#networkPromise = detectNetwork;\n return (await detectNetwork).clone();\n }\n const networkPromise = this.#networkPromise;\n const [expected, actual] = await Promise.all([\n networkPromise,\n this._detectNetwork()\n // The actual connected network\n ]);\n if (expected.chainId !== actual.chainId) {\n if (this.#anyNetwork) {\n this.emit(\"network\", actual, expected);\n if (this.#networkPromise === networkPromise) {\n this.#networkPromise = Promise.resolve(actual);\n }\n } else {\n (0, index_js_6.assert)(false, `network changed: ${expected.chainId} => ${actual.chainId} `, \"NETWORK_ERROR\", {\n event: \"changed\"\n });\n }\n }\n return expected.clone();\n }\n async getFeeData() {\n const network = await this.getNetwork();\n const getFeeDataFunc = async () => {\n const { _block, gasPrice, priorityFee } = await (0, index_js_6.resolveProperties)({\n _block: this.#getBlock(\"latest\", false),\n gasPrice: (async () => {\n try {\n const value = await this.#perform({ method: \"getGasPrice\" });\n return (0, index_js_6.getBigInt)(value, \"%response\");\n } catch (error) {\n }\n return null;\n })(),\n priorityFee: (async () => {\n try {\n const value = await this.#perform({ method: \"getPriorityFee\" });\n return (0, index_js_6.getBigInt)(value, \"%response\");\n } catch (error) {\n }\n return null;\n })()\n });\n let maxFeePerGas = null;\n let maxPriorityFeePerGas = null;\n const block = this._wrapBlock(_block, network);\n if (block && block.baseFeePerGas) {\n maxPriorityFeePerGas = priorityFee != null ? priorityFee : BigInt(\"1000000000\");\n maxFeePerGas = block.baseFeePerGas * BN_2 + maxPriorityFeePerGas;\n }\n return new provider_js_1.FeeData(gasPrice, maxFeePerGas, maxPriorityFeePerGas);\n };\n const plugin = network.getPlugin(\"org.ethers.plugins.network.FetchUrlFeeDataPlugin\");\n if (plugin) {\n const req = new index_js_6.FetchRequest(plugin.url);\n const feeData = await plugin.processFunc(getFeeDataFunc, this, req);\n return new provider_js_1.FeeData(feeData.gasPrice, feeData.maxFeePerGas, feeData.maxPriorityFeePerGas);\n }\n return await getFeeDataFunc();\n }\n async estimateGas(_tx) {\n let tx = this._getTransactionRequest(_tx);\n if (isPromise(tx)) {\n tx = await tx;\n }\n return (0, index_js_6.getBigInt)(await this.#perform({\n method: \"estimateGas\",\n transaction: tx\n }), \"%response\");\n }\n async #call(tx, blockTag, attempt) {\n (0, index_js_6.assert)(attempt < MAX_CCIP_REDIRECTS, \"CCIP read exceeded maximum redirections\", \"OFFCHAIN_FAULT\", {\n reason: \"TOO_MANY_REDIRECTS\",\n transaction: Object.assign({}, tx, { blockTag, enableCcipRead: true })\n });\n const transaction = (0, provider_js_1.copyRequest)(tx);\n try {\n return (0, index_js_6.hexlify)(await this._perform({ method: \"call\", transaction, blockTag }));\n } catch (error) {\n if (!this.disableCcipRead && (0, index_js_6.isCallException)(error) && error.data && attempt >= 0 && blockTag === \"latest\" && transaction.to != null && (0, index_js_6.dataSlice)(error.data, 0, 4) === \"0x556f1830\") {\n const data = error.data;\n const txSender = await (0, index_js_1.resolveAddress)(transaction.to, this);\n let ccipArgs;\n try {\n ccipArgs = parseOffchainLookup((0, index_js_6.dataSlice)(error.data, 4));\n } catch (error2) {\n (0, index_js_6.assert)(false, error2.message, \"OFFCHAIN_FAULT\", {\n reason: \"BAD_DATA\",\n transaction,\n info: { data }\n });\n }\n (0, index_js_6.assert)(ccipArgs.sender.toLowerCase() === txSender.toLowerCase(), \"CCIP Read sender mismatch\", \"CALL_EXCEPTION\", {\n action: \"call\",\n data,\n reason: \"OffchainLookup\",\n transaction,\n invocation: null,\n revert: {\n signature: \"OffchainLookup(address,string[],bytes,bytes4,bytes)\",\n name: \"OffchainLookup\",\n args: ccipArgs.errorArgs\n }\n });\n const ccipResult = await this.ccipReadFetch(transaction, ccipArgs.calldata, ccipArgs.urls);\n (0, index_js_6.assert)(ccipResult != null, \"CCIP Read failed to fetch data\", \"OFFCHAIN_FAULT\", {\n reason: \"FETCH_FAILED\",\n transaction,\n info: { data: error.data, errorArgs: ccipArgs.errorArgs }\n });\n const tx2 = {\n to: txSender,\n data: (0, index_js_6.concat)([ccipArgs.selector, encodeBytes3([ccipResult, ccipArgs.extraData])])\n };\n this.emit(\"debug\", { action: \"sendCcipReadCall\", transaction: tx2 });\n try {\n const result = await this.#call(tx2, blockTag, attempt + 1);\n this.emit(\"debug\", { action: \"receiveCcipReadCallResult\", transaction: Object.assign({}, tx2), result });\n return result;\n } catch (error2) {\n this.emit(\"debug\", { action: \"receiveCcipReadCallError\", transaction: Object.assign({}, tx2), error: error2 });\n throw error2;\n }\n }\n throw error;\n }\n }\n async #checkNetwork(promise) {\n const { value } = await (0, index_js_6.resolveProperties)({\n network: this.getNetwork(),\n value: promise\n });\n return value;\n }\n async call(_tx) {\n const { tx, blockTag } = await (0, index_js_6.resolveProperties)({\n tx: this._getTransactionRequest(_tx),\n blockTag: this._getBlockTag(_tx.blockTag)\n });\n return await this.#checkNetwork(this.#call(tx, blockTag, _tx.enableCcipRead ? 0 : -1));\n }\n // Account\n async #getAccountValue(request, _address, _blockTag) {\n let address = this._getAddress(_address);\n let blockTag = this._getBlockTag(_blockTag);\n if (typeof address !== \"string\" || typeof blockTag !== \"string\") {\n [address, blockTag] = await Promise.all([address, blockTag]);\n }\n return await this.#checkNetwork(this.#perform(Object.assign(request, { address, blockTag })));\n }\n async getBalance(address, blockTag) {\n return (0, index_js_6.getBigInt)(await this.#getAccountValue({ method: \"getBalance\" }, address, blockTag), \"%response\");\n }\n async getTransactionCount(address, blockTag) {\n return (0, index_js_6.getNumber)(await this.#getAccountValue({ method: \"getTransactionCount\" }, address, blockTag), \"%response\");\n }\n async getCode(address, blockTag) {\n return (0, index_js_6.hexlify)(await this.#getAccountValue({ method: \"getCode\" }, address, blockTag));\n }\n async getStorage(address, _position, blockTag) {\n const position = (0, index_js_6.getBigInt)(_position, \"position\");\n return (0, index_js_6.hexlify)(await this.#getAccountValue({ method: \"getStorage\", position }, address, blockTag));\n }\n // Write\n async broadcastTransaction(signedTx) {\n const { blockNumber, hash: hash3, network } = await (0, index_js_6.resolveProperties)({\n blockNumber: this.getBlockNumber(),\n hash: this._perform({\n method: \"broadcastTransaction\",\n signedTransaction: signedTx\n }),\n network: this.getNetwork()\n });\n const tx = index_js_5.Transaction.from(signedTx);\n if (tx.hash !== hash3) {\n throw new Error(\"@TODO: the returned hash did not match\");\n }\n return this._wrapTransactionResponse(tx, network).replaceableTransaction(blockNumber);\n }\n async #getBlock(block, includeTransactions) {\n if ((0, index_js_6.isHexString)(block, 32)) {\n return await this.#perform({\n method: \"getBlock\",\n blockHash: block,\n includeTransactions\n });\n }\n let blockTag = this._getBlockTag(block);\n if (typeof blockTag !== \"string\") {\n blockTag = await blockTag;\n }\n return await this.#perform({\n method: \"getBlock\",\n blockTag,\n includeTransactions\n });\n }\n // Queries\n async getBlock(block, prefetchTxs) {\n const { network, params } = await (0, index_js_6.resolveProperties)({\n network: this.getNetwork(),\n params: this.#getBlock(block, !!prefetchTxs)\n });\n if (params == null) {\n return null;\n }\n return this._wrapBlock(params, network);\n }\n async getTransaction(hash3) {\n const { network, params } = await (0, index_js_6.resolveProperties)({\n network: this.getNetwork(),\n params: this.#perform({ method: \"getTransaction\", hash: hash3 })\n });\n if (params == null) {\n return null;\n }\n return this._wrapTransactionResponse(params, network);\n }\n async getTransactionReceipt(hash3) {\n const { network, params } = await (0, index_js_6.resolveProperties)({\n network: this.getNetwork(),\n params: this.#perform({ method: \"getTransactionReceipt\", hash: hash3 })\n });\n if (params == null) {\n return null;\n }\n if (params.gasPrice == null && params.effectiveGasPrice == null) {\n const tx = await this.#perform({ method: \"getTransaction\", hash: hash3 });\n if (tx == null) {\n throw new Error(\"report this; could not find tx or effectiveGasPrice\");\n }\n params.effectiveGasPrice = tx.gasPrice;\n }\n return this._wrapTransactionReceipt(params, network);\n }\n async getTransactionResult(hash3) {\n const { result } = await (0, index_js_6.resolveProperties)({\n network: this.getNetwork(),\n result: this.#perform({ method: \"getTransactionResult\", hash: hash3 })\n });\n if (result == null) {\n return null;\n }\n return (0, index_js_6.hexlify)(result);\n }\n // Bloom-filter Queries\n async getLogs(_filter) {\n let filter = this._getFilter(_filter);\n if (isPromise(filter)) {\n filter = await filter;\n }\n const { network, params } = await (0, index_js_6.resolveProperties)({\n network: this.getNetwork(),\n params: this.#perform({ method: \"getLogs\", filter })\n });\n return params.map((p4) => this._wrapLog(p4, network));\n }\n // ENS\n _getProvider(chainId) {\n (0, index_js_6.assert)(false, \"provider cannot connect to target network\", \"UNSUPPORTED_OPERATION\", {\n operation: \"_getProvider()\"\n });\n }\n async getResolver(name) {\n return await ens_resolver_js_1.EnsResolver.fromName(this, name);\n }\n async getAvatar(name) {\n const resolver = await this.getResolver(name);\n if (resolver) {\n return await resolver.getAvatar();\n }\n return null;\n }\n async resolveName(name) {\n const resolver = await this.getResolver(name);\n if (resolver) {\n return await resolver.getAddress();\n }\n return null;\n }\n async lookupAddress(address) {\n address = (0, index_js_1.getAddress)(address);\n const node = (0, index_js_4.namehash)(address.substring(2).toLowerCase() + \".addr.reverse\");\n try {\n const ensAddr = await ens_resolver_js_1.EnsResolver.getEnsAddress(this);\n const ensContract = new index_js_3.Contract(ensAddr, [\n \"function resolver(bytes32) view returns (address)\"\n ], this);\n const resolver = await ensContract.resolver(node);\n if (resolver == null || resolver === index_js_2.ZeroAddress) {\n return null;\n }\n const resolverContract = new index_js_3.Contract(resolver, [\n \"function name(bytes32) view returns (string)\"\n ], this);\n const name = await resolverContract.name(node);\n const check = await this.resolveName(name);\n if (check !== address) {\n return null;\n }\n return name;\n } catch (error) {\n if ((0, index_js_6.isError)(error, \"BAD_DATA\") && error.value === \"0x\") {\n return null;\n }\n if ((0, index_js_6.isError)(error, \"CALL_EXCEPTION\")) {\n return null;\n }\n throw error;\n }\n return null;\n }\n async waitForTransaction(hash3, _confirms, timeout) {\n const confirms = _confirms != null ? _confirms : 1;\n if (confirms === 0) {\n return this.getTransactionReceipt(hash3);\n }\n return new Promise(async (resolve, reject) => {\n let timer = null;\n const listener = async (blockNumber) => {\n try {\n const receipt = await this.getTransactionReceipt(hash3);\n if (receipt != null) {\n if (blockNumber - receipt.blockNumber + 1 >= confirms) {\n resolve(receipt);\n if (timer) {\n clearTimeout(timer);\n timer = null;\n }\n return;\n }\n }\n } catch (error) {\n console.log(\"EEE\", error);\n }\n this.once(\"block\", listener);\n };\n if (timeout != null) {\n timer = setTimeout(() => {\n if (timer == null) {\n return;\n }\n timer = null;\n this.off(\"block\", listener);\n reject((0, index_js_6.makeError)(\"timeout\", \"TIMEOUT\", { reason: \"timeout\" }));\n }, timeout);\n }\n listener(await this.getBlockNumber());\n });\n }\n async waitForBlock(blockTag) {\n (0, index_js_6.assert)(false, \"not implemented yet\", \"NOT_IMPLEMENTED\", {\n operation: \"waitForBlock\"\n });\n }\n /**\n * Clear a timer created using the [[_setTimeout]] method.\n */\n _clearTimeout(timerId) {\n const timer = this.#timers.get(timerId);\n if (!timer) {\n return;\n }\n if (timer.timer) {\n clearTimeout(timer.timer);\n }\n this.#timers.delete(timerId);\n }\n /**\n * Create a timer that will execute %%func%% after at least %%timeout%%\n * (in ms). If %%timeout%% is unspecified, then %%func%% will execute\n * in the next event loop.\n *\n * [Pausing](AbstractProvider-paused) the provider will pause any\n * associated timers.\n */\n _setTimeout(_func, timeout) {\n if (timeout == null) {\n timeout = 0;\n }\n const timerId = this.#nextTimer++;\n const func = () => {\n this.#timers.delete(timerId);\n _func();\n };\n if (this.paused) {\n this.#timers.set(timerId, { timer: null, func, time: timeout });\n } else {\n const timer = setTimeout(func, timeout);\n this.#timers.set(timerId, { timer, func, time: getTime() });\n }\n return timerId;\n }\n /**\n * Perform %%func%% on each subscriber.\n */\n _forEachSubscriber(func) {\n for (const sub of this.#subs.values()) {\n func(sub.subscriber);\n }\n }\n /**\n * Sub-classes may override this to customize subscription\n * implementations.\n */\n _getSubscriber(sub) {\n switch (sub.type) {\n case \"debug\":\n case \"error\":\n case \"network\":\n return new UnmanagedSubscriber(sub.type);\n case \"block\": {\n const subscriber = new subscriber_polling_js_1.PollingBlockSubscriber(this);\n subscriber.pollingInterval = this.pollingInterval;\n return subscriber;\n }\n case \"safe\":\n case \"finalized\":\n return new subscriber_polling_js_1.PollingBlockTagSubscriber(this, sub.type);\n case \"event\":\n return new subscriber_polling_js_1.PollingEventSubscriber(this, sub.filter);\n case \"transaction\":\n return new subscriber_polling_js_1.PollingTransactionSubscriber(this, sub.hash);\n case \"orphan\":\n return new subscriber_polling_js_1.PollingOrphanSubscriber(this, sub.filter);\n }\n throw new Error(`unsupported event: ${sub.type}`);\n }\n /**\n * If a [[Subscriber]] fails and needs to replace itself, this\n * method may be used.\n *\n * For example, this is used for providers when using the\n * ``eth_getFilterChanges`` method, which can return null if state\n * filters are not supported by the backend, allowing the Subscriber\n * to swap in a [[PollingEventSubscriber]].\n */\n _recoverSubscriber(oldSub, newSub) {\n for (const sub of this.#subs.values()) {\n if (sub.subscriber === oldSub) {\n if (sub.started) {\n sub.subscriber.stop();\n }\n sub.subscriber = newSub;\n if (sub.started) {\n newSub.start();\n }\n if (this.#pausedState != null) {\n newSub.pause(this.#pausedState);\n }\n break;\n }\n }\n }\n async #hasSub(event, emitArgs) {\n let sub = await getSubscription(event, this);\n if (sub.type === \"event\" && emitArgs && emitArgs.length > 0 && emitArgs[0].removed === true) {\n sub = await getSubscription({ orphan: \"drop-log\", log: emitArgs[0] }, this);\n }\n return this.#subs.get(sub.tag) || null;\n }\n async #getSub(event) {\n const subscription = await getSubscription(event, this);\n const tag = subscription.tag;\n let sub = this.#subs.get(tag);\n if (!sub) {\n const subscriber = this._getSubscriber(subscription);\n const addressableMap = /* @__PURE__ */ new WeakMap();\n const nameMap = /* @__PURE__ */ new Map();\n sub = { subscriber, tag, addressableMap, nameMap, started: false, listeners: [] };\n this.#subs.set(tag, sub);\n }\n return sub;\n }\n async on(event, listener) {\n const sub = await this.#getSub(event);\n sub.listeners.push({ listener, once: false });\n if (!sub.started) {\n sub.subscriber.start();\n sub.started = true;\n if (this.#pausedState != null) {\n sub.subscriber.pause(this.#pausedState);\n }\n }\n return this;\n }\n async once(event, listener) {\n const sub = await this.#getSub(event);\n sub.listeners.push({ listener, once: true });\n if (!sub.started) {\n sub.subscriber.start();\n sub.started = true;\n if (this.#pausedState != null) {\n sub.subscriber.pause(this.#pausedState);\n }\n }\n return this;\n }\n async emit(event, ...args) {\n const sub = await this.#hasSub(event, args);\n if (!sub || sub.listeners.length === 0) {\n return false;\n }\n ;\n const count = sub.listeners.length;\n sub.listeners = sub.listeners.filter(({ listener, once: once2 }) => {\n const payload = new index_js_6.EventPayload(this, once2 ? null : listener, event);\n try {\n listener.call(this, ...args, payload);\n } catch (error) {\n }\n return !once2;\n });\n if (sub.listeners.length === 0) {\n if (sub.started) {\n sub.subscriber.stop();\n }\n this.#subs.delete(sub.tag);\n }\n return count > 0;\n }\n async listenerCount(event) {\n if (event) {\n const sub = await this.#hasSub(event);\n if (!sub) {\n return 0;\n }\n return sub.listeners.length;\n }\n let total = 0;\n for (const { listeners: listeners2 } of this.#subs.values()) {\n total += listeners2.length;\n }\n return total;\n }\n async listeners(event) {\n if (event) {\n const sub = await this.#hasSub(event);\n if (!sub) {\n return [];\n }\n return sub.listeners.map(({ listener }) => listener);\n }\n let result = [];\n for (const { listeners: listeners2 } of this.#subs.values()) {\n result = result.concat(listeners2.map(({ listener }) => listener));\n }\n return result;\n }\n async off(event, listener) {\n const sub = await this.#hasSub(event);\n if (!sub) {\n return this;\n }\n if (listener) {\n const index2 = sub.listeners.map(({ listener: listener2 }) => listener2).indexOf(listener);\n if (index2 >= 0) {\n sub.listeners.splice(index2, 1);\n }\n }\n if (!listener || sub.listeners.length === 0) {\n if (sub.started) {\n sub.subscriber.stop();\n }\n this.#subs.delete(sub.tag);\n }\n return this;\n }\n async removeAllListeners(event) {\n if (event) {\n const { tag, started, subscriber } = await this.#getSub(event);\n if (started) {\n subscriber.stop();\n }\n this.#subs.delete(tag);\n } else {\n for (const [tag, { started, subscriber }] of this.#subs) {\n if (started) {\n subscriber.stop();\n }\n this.#subs.delete(tag);\n }\n }\n return this;\n }\n // Alias for \"on\"\n async addListener(event, listener) {\n return await this.on(event, listener);\n }\n // Alias for \"off\"\n async removeListener(event, listener) {\n return this.off(event, listener);\n }\n /**\n * If this provider has been destroyed using the [[destroy]] method.\n *\n * Once destroyed, all resources are reclaimed, internal event loops\n * and timers are cleaned up and no further requests may be sent to\n * the provider.\n */\n get destroyed() {\n return this.#destroyed;\n }\n /**\n * Sub-classes may use this to shutdown any sockets or release their\n * resources and reject any pending requests.\n *\n * Sub-classes **must** call ``super.destroy()``.\n */\n destroy() {\n this.removeAllListeners();\n for (const timerId of this.#timers.keys()) {\n this._clearTimeout(timerId);\n }\n this.#destroyed = true;\n }\n /**\n * Whether the provider is currently paused.\n *\n * A paused provider will not emit any events, and generally should\n * not make any requests to the network, but that is up to sub-classes\n * to manage.\n *\n * Setting ``paused = true`` is identical to calling ``.pause(false)``,\n * which will buffer any events that occur while paused until the\n * provider is unpaused.\n */\n get paused() {\n return this.#pausedState != null;\n }\n set paused(pause) {\n if (!!pause === this.paused) {\n return;\n }\n if (this.paused) {\n this.resume();\n } else {\n this.pause(false);\n }\n }\n /**\n * Pause the provider. If %%dropWhilePaused%%, any events that occur\n * while paused are dropped, otherwise all events will be emitted once\n * the provider is unpaused.\n */\n pause(dropWhilePaused) {\n this.#lastBlockNumber = -1;\n if (this.#pausedState != null) {\n if (this.#pausedState == !!dropWhilePaused) {\n return;\n }\n (0, index_js_6.assert)(false, \"cannot change pause type; resume first\", \"UNSUPPORTED_OPERATION\", {\n operation: \"pause\"\n });\n }\n this._forEachSubscriber((s4) => s4.pause(dropWhilePaused));\n this.#pausedState = !!dropWhilePaused;\n for (const timer of this.#timers.values()) {\n if (timer.timer) {\n clearTimeout(timer.timer);\n }\n timer.time = getTime() - timer.time;\n }\n }\n /**\n * Resume the provider.\n */\n resume() {\n if (this.#pausedState == null) {\n return;\n }\n this._forEachSubscriber((s4) => s4.resume());\n this.#pausedState = null;\n for (const timer of this.#timers.values()) {\n let timeout = timer.time;\n if (timeout < 0) {\n timeout = 0;\n }\n timer.time = getTime();\n setTimeout(timer.func, timeout);\n }\n }\n };\n exports3.AbstractProvider = AbstractProvider;\n function _parseString(result, start) {\n try {\n const bytes = _parseBytes(result, start);\n if (bytes) {\n return (0, index_js_6.toUtf8String)(bytes);\n }\n } catch (error) {\n }\n return null;\n }\n function _parseBytes(result, start) {\n if (result === \"0x\") {\n return null;\n }\n try {\n const offset = (0, index_js_6.getNumber)((0, index_js_6.dataSlice)(result, start, start + 32));\n const length2 = (0, index_js_6.getNumber)((0, index_js_6.dataSlice)(result, offset, offset + 32));\n return (0, index_js_6.dataSlice)(result, offset + 32, offset + 32 + length2);\n } catch (error) {\n }\n return null;\n }\n function numPad(value) {\n const result = (0, index_js_6.toBeArray)(value);\n if (result.length > 32) {\n throw new Error(\"internal; should not happen\");\n }\n const padded = new Uint8Array(32);\n padded.set(result, 32 - result.length);\n return padded;\n }\n function bytesPad(value) {\n if (value.length % 32 === 0) {\n return value;\n }\n const result = new Uint8Array(Math.ceil(value.length / 32) * 32);\n result.set(value);\n return result;\n }\n var empty = new Uint8Array([]);\n function encodeBytes3(datas) {\n const result = [];\n let byteCount = 0;\n for (let i3 = 0; i3 < datas.length; i3++) {\n result.push(empty);\n byteCount += 32;\n }\n for (let i3 = 0; i3 < datas.length; i3++) {\n const data = (0, index_js_6.getBytes)(datas[i3]);\n result[i3] = numPad(byteCount);\n result.push(numPad(data.length));\n result.push(bytesPad(data));\n byteCount += 32 + Math.ceil(data.length / 32) * 32;\n }\n return (0, index_js_6.concat)(result);\n }\n var zeros = \"0x0000000000000000000000000000000000000000000000000000000000000000\";\n function parseOffchainLookup(data) {\n const result = {\n sender: \"\",\n urls: [],\n calldata: \"\",\n selector: \"\",\n extraData: \"\",\n errorArgs: []\n };\n (0, index_js_6.assert)((0, index_js_6.dataLength)(data) >= 5 * 32, \"insufficient OffchainLookup data\", \"OFFCHAIN_FAULT\", {\n reason: \"insufficient OffchainLookup data\"\n });\n const sender = (0, index_js_6.dataSlice)(data, 0, 32);\n (0, index_js_6.assert)((0, index_js_6.dataSlice)(sender, 0, 12) === (0, index_js_6.dataSlice)(zeros, 0, 12), \"corrupt OffchainLookup sender\", \"OFFCHAIN_FAULT\", {\n reason: \"corrupt OffchainLookup sender\"\n });\n result.sender = (0, index_js_6.dataSlice)(sender, 12);\n try {\n const urls = [];\n const urlsOffset = (0, index_js_6.getNumber)((0, index_js_6.dataSlice)(data, 32, 64));\n const urlsLength = (0, index_js_6.getNumber)((0, index_js_6.dataSlice)(data, urlsOffset, urlsOffset + 32));\n const urlsData = (0, index_js_6.dataSlice)(data, urlsOffset + 32);\n for (let u2 = 0; u2 < urlsLength; u2++) {\n const url = _parseString(urlsData, u2 * 32);\n if (url == null) {\n throw new Error(\"abort\");\n }\n urls.push(url);\n }\n result.urls = urls;\n } catch (error) {\n (0, index_js_6.assert)(false, \"corrupt OffchainLookup urls\", \"OFFCHAIN_FAULT\", {\n reason: \"corrupt OffchainLookup urls\"\n });\n }\n try {\n const calldata = _parseBytes(data, 64);\n if (calldata == null) {\n throw new Error(\"abort\");\n }\n result.calldata = calldata;\n } catch (error) {\n (0, index_js_6.assert)(false, \"corrupt OffchainLookup calldata\", \"OFFCHAIN_FAULT\", {\n reason: \"corrupt OffchainLookup calldata\"\n });\n }\n (0, index_js_6.assert)((0, index_js_6.dataSlice)(data, 100, 128) === (0, index_js_6.dataSlice)(zeros, 0, 28), \"corrupt OffchainLookup callbaackSelector\", \"OFFCHAIN_FAULT\", {\n reason: \"corrupt OffchainLookup callbaackSelector\"\n });\n result.selector = (0, index_js_6.dataSlice)(data, 96, 100);\n try {\n const extraData = _parseBytes(data, 128);\n if (extraData == null) {\n throw new Error(\"abort\");\n }\n result.extraData = extraData;\n } catch (error) {\n (0, index_js_6.assert)(false, \"corrupt OffchainLookup extraData\", \"OFFCHAIN_FAULT\", {\n reason: \"corrupt OffchainLookup extraData\"\n });\n }\n result.errorArgs = \"sender,urls,calldata,selector,extraData\".split(/,/).map((k4) => result[k4]);\n return result;\n }\n }\n });\n\n // ../../../node_modules/.pnpm/ethers@6.15.0_bufferutil@4.0.9_utf-8-validate@5.0.10/node_modules/ethers/lib.commonjs/providers/abstract-signer.js\n var require_abstract_signer = __commonJS({\n \"../../../node_modules/.pnpm/ethers@6.15.0_bufferutil@4.0.9_utf-8-validate@5.0.10/node_modules/ethers/lib.commonjs/providers/abstract-signer.js\"(exports3) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n Object.defineProperty(exports3, \"__esModule\", { value: true });\n exports3.VoidSigner = exports3.AbstractSigner = void 0;\n var index_js_1 = require_address3();\n var index_js_2 = require_transaction2();\n var index_js_3 = require_utils8();\n var provider_js_1 = require_provider();\n function checkProvider(signer, operation) {\n if (signer.provider) {\n return signer.provider;\n }\n (0, index_js_3.assert)(false, \"missing provider\", \"UNSUPPORTED_OPERATION\", { operation });\n }\n async function populate(signer, tx) {\n let pop = (0, provider_js_1.copyRequest)(tx);\n if (pop.to != null) {\n pop.to = (0, index_js_1.resolveAddress)(pop.to, signer);\n }\n if (pop.from != null) {\n const from14 = pop.from;\n pop.from = Promise.all([\n signer.getAddress(),\n (0, index_js_1.resolveAddress)(from14, signer)\n ]).then(([address, from15]) => {\n (0, index_js_3.assertArgument)(address.toLowerCase() === from15.toLowerCase(), \"transaction from mismatch\", \"tx.from\", from15);\n return address;\n });\n } else {\n pop.from = signer.getAddress();\n }\n return await (0, index_js_3.resolveProperties)(pop);\n }\n var AbstractSigner = class {\n /**\n * The provider this signer is connected to.\n */\n provider;\n /**\n * Creates a new Signer connected to %%provider%%.\n */\n constructor(provider) {\n (0, index_js_3.defineProperties)(this, { provider: provider || null });\n }\n async getNonce(blockTag) {\n return checkProvider(this, \"getTransactionCount\").getTransactionCount(await this.getAddress(), blockTag);\n }\n async populateCall(tx) {\n const pop = await populate(this, tx);\n return pop;\n }\n async populateTransaction(tx) {\n const provider = checkProvider(this, \"populateTransaction\");\n const pop = await populate(this, tx);\n if (pop.nonce == null) {\n pop.nonce = await this.getNonce(\"pending\");\n }\n if (pop.gasLimit == null) {\n pop.gasLimit = await this.estimateGas(pop);\n }\n const network = await this.provider.getNetwork();\n if (pop.chainId != null) {\n const chainId = (0, index_js_3.getBigInt)(pop.chainId);\n (0, index_js_3.assertArgument)(chainId === network.chainId, \"transaction chainId mismatch\", \"tx.chainId\", tx.chainId);\n } else {\n pop.chainId = network.chainId;\n }\n const hasEip1559 = pop.maxFeePerGas != null || pop.maxPriorityFeePerGas != null;\n if (pop.gasPrice != null && (pop.type === 2 || hasEip1559)) {\n (0, index_js_3.assertArgument)(false, \"eip-1559 transaction do not support gasPrice\", \"tx\", tx);\n } else if ((pop.type === 0 || pop.type === 1) && hasEip1559) {\n (0, index_js_3.assertArgument)(false, \"pre-eip-1559 transaction do not support maxFeePerGas/maxPriorityFeePerGas\", \"tx\", tx);\n }\n if ((pop.type === 2 || pop.type == null) && (pop.maxFeePerGas != null && pop.maxPriorityFeePerGas != null)) {\n pop.type = 2;\n } else if (pop.type === 0 || pop.type === 1) {\n const feeData = await provider.getFeeData();\n (0, index_js_3.assert)(feeData.gasPrice != null, \"network does not support gasPrice\", \"UNSUPPORTED_OPERATION\", {\n operation: \"getGasPrice\"\n });\n if (pop.gasPrice == null) {\n pop.gasPrice = feeData.gasPrice;\n }\n } else {\n const feeData = await provider.getFeeData();\n if (pop.type == null) {\n if (feeData.maxFeePerGas != null && feeData.maxPriorityFeePerGas != null) {\n if (pop.authorizationList && pop.authorizationList.length) {\n pop.type = 4;\n } else {\n pop.type = 2;\n }\n if (pop.gasPrice != null) {\n const gasPrice = pop.gasPrice;\n delete pop.gasPrice;\n pop.maxFeePerGas = gasPrice;\n pop.maxPriorityFeePerGas = gasPrice;\n } else {\n if (pop.maxFeePerGas == null) {\n pop.maxFeePerGas = feeData.maxFeePerGas;\n }\n if (pop.maxPriorityFeePerGas == null) {\n pop.maxPriorityFeePerGas = feeData.maxPriorityFeePerGas;\n }\n }\n } else if (feeData.gasPrice != null) {\n (0, index_js_3.assert)(!hasEip1559, \"network does not support EIP-1559\", \"UNSUPPORTED_OPERATION\", {\n operation: \"populateTransaction\"\n });\n if (pop.gasPrice == null) {\n pop.gasPrice = feeData.gasPrice;\n }\n pop.type = 0;\n } else {\n (0, index_js_3.assert)(false, \"failed to get consistent fee data\", \"UNSUPPORTED_OPERATION\", {\n operation: \"signer.getFeeData\"\n });\n }\n } else if (pop.type === 2 || pop.type === 3 || pop.type === 4) {\n if (pop.maxFeePerGas == null) {\n pop.maxFeePerGas = feeData.maxFeePerGas;\n }\n if (pop.maxPriorityFeePerGas == null) {\n pop.maxPriorityFeePerGas = feeData.maxPriorityFeePerGas;\n }\n }\n }\n return await (0, index_js_3.resolveProperties)(pop);\n }\n async populateAuthorization(_auth) {\n const auth = Object.assign({}, _auth);\n if (auth.chainId == null) {\n auth.chainId = (await checkProvider(this, \"getNetwork\").getNetwork()).chainId;\n }\n if (auth.nonce == null) {\n auth.nonce = await this.getNonce();\n }\n return auth;\n }\n async estimateGas(tx) {\n return checkProvider(this, \"estimateGas\").estimateGas(await this.populateCall(tx));\n }\n async call(tx) {\n return checkProvider(this, \"call\").call(await this.populateCall(tx));\n }\n async resolveName(name) {\n const provider = checkProvider(this, \"resolveName\");\n return await provider.resolveName(name);\n }\n async sendTransaction(tx) {\n const provider = checkProvider(this, \"sendTransaction\");\n const pop = await this.populateTransaction(tx);\n delete pop.from;\n const txObj = index_js_2.Transaction.from(pop);\n return await provider.broadcastTransaction(await this.signTransaction(txObj));\n }\n // @TODO: in v7 move this to be abstract\n authorize(authorization) {\n (0, index_js_3.assert)(false, \"authorization not implemented for this signer\", \"UNSUPPORTED_OPERATION\", { operation: \"authorize\" });\n }\n };\n exports3.AbstractSigner = AbstractSigner;\n var VoidSigner = class _VoidSigner extends AbstractSigner {\n /**\n * The signer address.\n */\n address;\n /**\n * Creates a new **VoidSigner** with %%address%% attached to\n * %%provider%%.\n */\n constructor(address, provider) {\n super(provider);\n (0, index_js_3.defineProperties)(this, { address });\n }\n async getAddress() {\n return this.address;\n }\n connect(provider) {\n return new _VoidSigner(this.address, provider);\n }\n #throwUnsupported(suffix, operation) {\n (0, index_js_3.assert)(false, `VoidSigner cannot sign ${suffix}`, \"UNSUPPORTED_OPERATION\", { operation });\n }\n async signTransaction(tx) {\n this.#throwUnsupported(\"transactions\", \"signTransaction\");\n }\n async signMessage(message) {\n this.#throwUnsupported(\"messages\", \"signMessage\");\n }\n async signTypedData(domain2, types, value) {\n this.#throwUnsupported(\"typed-data\", \"signTypedData\");\n }\n };\n exports3.VoidSigner = VoidSigner;\n }\n });\n\n // ../../../node_modules/.pnpm/ethers@6.15.0_bufferutil@4.0.9_utf-8-validate@5.0.10/node_modules/ethers/lib.commonjs/providers/community.js\n var require_community = __commonJS({\n \"../../../node_modules/.pnpm/ethers@6.15.0_bufferutil@4.0.9_utf-8-validate@5.0.10/node_modules/ethers/lib.commonjs/providers/community.js\"(exports3) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n Object.defineProperty(exports3, \"__esModule\", { value: true });\n exports3.showThrottleMessage = void 0;\n var shown = /* @__PURE__ */ new Set();\n function showThrottleMessage(service) {\n if (shown.has(service)) {\n return;\n }\n shown.add(service);\n console.log(\"========= NOTICE =========\");\n console.log(`Request-Rate Exceeded for ${service} (this message will not be repeated)`);\n console.log(\"\");\n console.log(\"The default API keys for each service are provided as a highly-throttled,\");\n console.log(\"community resource for low-traffic projects and early prototyping.\");\n console.log(\"\");\n console.log(\"While your application will continue to function, we highly recommended\");\n console.log(\"signing up for your own API keys to improve performance, increase your\");\n console.log(\"request rate/limit and enable other perks, such as metrics and advanced APIs.\");\n console.log(\"\");\n console.log(\"For more details: https://docs.ethers.org/api-keys/\");\n console.log(\"==========================\");\n }\n exports3.showThrottleMessage = showThrottleMessage;\n }\n });\n\n // ../../../node_modules/.pnpm/ethers@6.15.0_bufferutil@4.0.9_utf-8-validate@5.0.10/node_modules/ethers/lib.commonjs/providers/subscriber-filterid.js\n var require_subscriber_filterid = __commonJS({\n \"../../../node_modules/.pnpm/ethers@6.15.0_bufferutil@4.0.9_utf-8-validate@5.0.10/node_modules/ethers/lib.commonjs/providers/subscriber-filterid.js\"(exports3) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n Object.defineProperty(exports3, \"__esModule\", { value: true });\n exports3.FilterIdPendingSubscriber = exports3.FilterIdEventSubscriber = exports3.FilterIdSubscriber = void 0;\n var index_js_1 = require_utils8();\n var subscriber_polling_js_1 = require_subscriber_polling();\n function copy(obj) {\n return JSON.parse(JSON.stringify(obj));\n }\n var FilterIdSubscriber = class {\n #provider;\n #filterIdPromise;\n #poller;\n #running;\n #network;\n #hault;\n /**\n * Creates a new **FilterIdSubscriber** which will used [[_subscribe]]\n * and [[_emitResults]] to setup the subscription and provide the event\n * to the %%provider%%.\n */\n constructor(provider) {\n this.#provider = provider;\n this.#filterIdPromise = null;\n this.#poller = this.#poll.bind(this);\n this.#running = false;\n this.#network = null;\n this.#hault = false;\n }\n /**\n * Sub-classes **must** override this to begin the subscription.\n */\n _subscribe(provider) {\n throw new Error(\"subclasses must override this\");\n }\n /**\n * Sub-classes **must** override this handle the events.\n */\n _emitResults(provider, result) {\n throw new Error(\"subclasses must override this\");\n }\n /**\n * Sub-classes **must** override this handle recovery on errors.\n */\n _recover(provider) {\n throw new Error(\"subclasses must override this\");\n }\n async #poll(blockNumber) {\n try {\n if (this.#filterIdPromise == null) {\n this.#filterIdPromise = this._subscribe(this.#provider);\n }\n let filterId = null;\n try {\n filterId = await this.#filterIdPromise;\n } catch (error) {\n if (!(0, index_js_1.isError)(error, \"UNSUPPORTED_OPERATION\") || error.operation !== \"eth_newFilter\") {\n throw error;\n }\n }\n if (filterId == null) {\n this.#filterIdPromise = null;\n this.#provider._recoverSubscriber(this, this._recover(this.#provider));\n return;\n }\n const network = await this.#provider.getNetwork();\n if (!this.#network) {\n this.#network = network;\n }\n if (this.#network.chainId !== network.chainId) {\n throw new Error(\"chaid changed\");\n }\n if (this.#hault) {\n return;\n }\n const result = await this.#provider.send(\"eth_getFilterChanges\", [filterId]);\n await this._emitResults(this.#provider, result);\n } catch (error) {\n console.log(\"@TODO\", error);\n }\n this.#provider.once(\"block\", this.#poller);\n }\n #teardown() {\n const filterIdPromise = this.#filterIdPromise;\n if (filterIdPromise) {\n this.#filterIdPromise = null;\n filterIdPromise.then((filterId) => {\n if (this.#provider.destroyed) {\n return;\n }\n this.#provider.send(\"eth_uninstallFilter\", [filterId]);\n });\n }\n }\n start() {\n if (this.#running) {\n return;\n }\n this.#running = true;\n this.#poll(-2);\n }\n stop() {\n if (!this.#running) {\n return;\n }\n this.#running = false;\n this.#hault = true;\n this.#teardown();\n this.#provider.off(\"block\", this.#poller);\n }\n pause(dropWhilePaused) {\n if (dropWhilePaused) {\n this.#teardown();\n }\n this.#provider.off(\"block\", this.#poller);\n }\n resume() {\n this.start();\n }\n };\n exports3.FilterIdSubscriber = FilterIdSubscriber;\n var FilterIdEventSubscriber = class extends FilterIdSubscriber {\n #event;\n /**\n * Creates a new **FilterIdEventSubscriber** attached to %%provider%%\n * listening for %%filter%%.\n */\n constructor(provider, filter) {\n super(provider);\n this.#event = copy(filter);\n }\n _recover(provider) {\n return new subscriber_polling_js_1.PollingEventSubscriber(provider, this.#event);\n }\n async _subscribe(provider) {\n const filterId = await provider.send(\"eth_newFilter\", [this.#event]);\n return filterId;\n }\n async _emitResults(provider, results) {\n for (const result of results) {\n provider.emit(this.#event, provider._wrapLog(result, provider._network));\n }\n }\n };\n exports3.FilterIdEventSubscriber = FilterIdEventSubscriber;\n var FilterIdPendingSubscriber = class extends FilterIdSubscriber {\n async _subscribe(provider) {\n return await provider.send(\"eth_newPendingTransactionFilter\", []);\n }\n async _emitResults(provider, results) {\n for (const result of results) {\n provider.emit(\"pending\", result);\n }\n }\n };\n exports3.FilterIdPendingSubscriber = FilterIdPendingSubscriber;\n }\n });\n\n // ../../../node_modules/.pnpm/ethers@6.15.0_bufferutil@4.0.9_utf-8-validate@5.0.10/node_modules/ethers/lib.commonjs/providers/provider-jsonrpc.js\n var require_provider_jsonrpc = __commonJS({\n \"../../../node_modules/.pnpm/ethers@6.15.0_bufferutil@4.0.9_utf-8-validate@5.0.10/node_modules/ethers/lib.commonjs/providers/provider-jsonrpc.js\"(exports3) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n Object.defineProperty(exports3, \"__esModule\", { value: true });\n exports3.JsonRpcProvider = exports3.JsonRpcApiPollingProvider = exports3.JsonRpcApiProvider = exports3.JsonRpcSigner = void 0;\n var index_js_1 = require_abi();\n var index_js_2 = require_address3();\n var index_js_3 = require_hash2();\n var index_js_4 = require_transaction2();\n var index_js_5 = require_utils8();\n var abstract_provider_js_1 = require_abstract_provider();\n var abstract_signer_js_1 = require_abstract_signer();\n var network_js_1 = require_network();\n var subscriber_filterid_js_1 = require_subscriber_filterid();\n var subscriber_polling_js_1 = require_subscriber_polling();\n var Primitive = \"bigint,boolean,function,number,string,symbol\".split(/,/g);\n function deepCopy(value) {\n if (value == null || Primitive.indexOf(typeof value) >= 0) {\n return value;\n }\n if (typeof value.getAddress === \"function\") {\n return value;\n }\n if (Array.isArray(value)) {\n return value.map(deepCopy);\n }\n if (typeof value === \"object\") {\n return Object.keys(value).reduce((accum, key) => {\n accum[key] = value[key];\n return accum;\n }, {});\n }\n throw new Error(`should not happen: ${value} (${typeof value})`);\n }\n function stall(duration) {\n return new Promise((resolve) => {\n setTimeout(resolve, duration);\n });\n }\n function getLowerCase(value) {\n if (value) {\n return value.toLowerCase();\n }\n return value;\n }\n function isPollable(value) {\n return value && typeof value.pollingInterval === \"number\";\n }\n var defaultOptions = {\n polling: false,\n staticNetwork: null,\n batchStallTime: 10,\n batchMaxSize: 1 << 20,\n batchMaxCount: 100,\n cacheTimeout: 250,\n pollingInterval: 4e3\n };\n var JsonRpcSigner = class extends abstract_signer_js_1.AbstractSigner {\n address;\n constructor(provider, address) {\n super(provider);\n address = (0, index_js_2.getAddress)(address);\n (0, index_js_5.defineProperties)(this, { address });\n }\n connect(provider) {\n (0, index_js_5.assert)(false, \"cannot reconnect JsonRpcSigner\", \"UNSUPPORTED_OPERATION\", {\n operation: \"signer.connect\"\n });\n }\n async getAddress() {\n return this.address;\n }\n // JSON-RPC will automatially fill in nonce, etc. so we just check from\n async populateTransaction(tx) {\n return await this.populateCall(tx);\n }\n // Returns just the hash of the transaction after sent, which is what\n // the bare JSON-RPC API does;\n async sendUncheckedTransaction(_tx) {\n const tx = deepCopy(_tx);\n const promises = [];\n if (tx.from) {\n const _from = tx.from;\n promises.push((async () => {\n const from14 = await (0, index_js_2.resolveAddress)(_from, this.provider);\n (0, index_js_5.assertArgument)(from14 != null && from14.toLowerCase() === this.address.toLowerCase(), \"from address mismatch\", \"transaction\", _tx);\n tx.from = from14;\n })());\n } else {\n tx.from = this.address;\n }\n if (tx.gasLimit == null) {\n promises.push((async () => {\n tx.gasLimit = await this.provider.estimateGas({ ...tx, from: this.address });\n })());\n }\n if (tx.to != null) {\n const _to = tx.to;\n promises.push((async () => {\n tx.to = await (0, index_js_2.resolveAddress)(_to, this.provider);\n })());\n }\n if (promises.length) {\n await Promise.all(promises);\n }\n const hexTx = this.provider.getRpcTransaction(tx);\n return this.provider.send(\"eth_sendTransaction\", [hexTx]);\n }\n async sendTransaction(tx) {\n const blockNumber = await this.provider.getBlockNumber();\n const hash3 = await this.sendUncheckedTransaction(tx);\n return await new Promise((resolve, reject) => {\n const timeouts = [1e3, 100];\n let invalids = 0;\n const checkTx = async () => {\n try {\n const tx2 = await this.provider.getTransaction(hash3);\n if (tx2 != null) {\n resolve(tx2.replaceableTransaction(blockNumber));\n return;\n }\n } catch (error) {\n if ((0, index_js_5.isError)(error, \"CANCELLED\") || (0, index_js_5.isError)(error, \"BAD_DATA\") || (0, index_js_5.isError)(error, \"NETWORK_ERROR\") || (0, index_js_5.isError)(error, \"UNSUPPORTED_OPERATION\")) {\n if (error.info == null) {\n error.info = {};\n }\n error.info.sendTransactionHash = hash3;\n reject(error);\n return;\n }\n if ((0, index_js_5.isError)(error, \"INVALID_ARGUMENT\")) {\n invalids++;\n if (error.info == null) {\n error.info = {};\n }\n error.info.sendTransactionHash = hash3;\n if (invalids > 10) {\n reject(error);\n return;\n }\n }\n this.provider.emit(\"error\", (0, index_js_5.makeError)(\"failed to fetch transation after sending (will try again)\", \"UNKNOWN_ERROR\", { error }));\n }\n this.provider._setTimeout(() => {\n checkTx();\n }, timeouts.pop() || 4e3);\n };\n checkTx();\n });\n }\n async signTransaction(_tx) {\n const tx = deepCopy(_tx);\n if (tx.from) {\n const from14 = await (0, index_js_2.resolveAddress)(tx.from, this.provider);\n (0, index_js_5.assertArgument)(from14 != null && from14.toLowerCase() === this.address.toLowerCase(), \"from address mismatch\", \"transaction\", _tx);\n tx.from = from14;\n } else {\n tx.from = this.address;\n }\n const hexTx = this.provider.getRpcTransaction(tx);\n return await this.provider.send(\"eth_signTransaction\", [hexTx]);\n }\n async signMessage(_message) {\n const message = typeof _message === \"string\" ? (0, index_js_5.toUtf8Bytes)(_message) : _message;\n return await this.provider.send(\"personal_sign\", [\n (0, index_js_5.hexlify)(message),\n this.address.toLowerCase()\n ]);\n }\n async signTypedData(domain2, types, _value) {\n const value = deepCopy(_value);\n const populated = await index_js_3.TypedDataEncoder.resolveNames(domain2, types, value, async (value2) => {\n const address = await (0, index_js_2.resolveAddress)(value2);\n (0, index_js_5.assertArgument)(address != null, \"TypedData does not support null address\", \"value\", value2);\n return address;\n });\n return await this.provider.send(\"eth_signTypedData_v4\", [\n this.address.toLowerCase(),\n JSON.stringify(index_js_3.TypedDataEncoder.getPayload(populated.domain, types, populated.value))\n ]);\n }\n async unlock(password) {\n return this.provider.send(\"personal_unlockAccount\", [\n this.address.toLowerCase(),\n password,\n null\n ]);\n }\n // https://github.com/ethereum/wiki/wiki/JSON-RPC#eth_sign\n async _legacySignMessage(_message) {\n const message = typeof _message === \"string\" ? (0, index_js_5.toUtf8Bytes)(_message) : _message;\n return await this.provider.send(\"eth_sign\", [\n this.address.toLowerCase(),\n (0, index_js_5.hexlify)(message)\n ]);\n }\n };\n exports3.JsonRpcSigner = JsonRpcSigner;\n var JsonRpcApiProvider = class extends abstract_provider_js_1.AbstractProvider {\n #options;\n // The next ID to use for the JSON-RPC ID field\n #nextId;\n // Payloads are queued and triggered in batches using the drainTimer\n #payloads;\n #drainTimer;\n #notReady;\n #network;\n #pendingDetectNetwork;\n #scheduleDrain() {\n if (this.#drainTimer) {\n return;\n }\n const stallTime = this._getOption(\"batchMaxCount\") === 1 ? 0 : this._getOption(\"batchStallTime\");\n this.#drainTimer = setTimeout(() => {\n this.#drainTimer = null;\n const payloads = this.#payloads;\n this.#payloads = [];\n while (payloads.length) {\n const batch = [payloads.shift()];\n while (payloads.length) {\n if (batch.length === this.#options.batchMaxCount) {\n break;\n }\n batch.push(payloads.shift());\n const bytes = JSON.stringify(batch.map((p4) => p4.payload));\n if (bytes.length > this.#options.batchMaxSize) {\n payloads.unshift(batch.pop());\n break;\n }\n }\n (async () => {\n const payload = batch.length === 1 ? batch[0].payload : batch.map((p4) => p4.payload);\n this.emit(\"debug\", { action: \"sendRpcPayload\", payload });\n try {\n const result = await this._send(payload);\n this.emit(\"debug\", { action: \"receiveRpcResult\", result });\n for (const { resolve, reject, payload: payload2 } of batch) {\n if (this.destroyed) {\n reject((0, index_js_5.makeError)(\"provider destroyed; cancelled request\", \"UNSUPPORTED_OPERATION\", { operation: payload2.method }));\n continue;\n }\n const resp = result.filter((r2) => r2.id === payload2.id)[0];\n if (resp == null) {\n const error = (0, index_js_5.makeError)(\"missing response for request\", \"BAD_DATA\", {\n value: result,\n info: { payload: payload2 }\n });\n this.emit(\"error\", error);\n reject(error);\n continue;\n }\n if (\"error\" in resp) {\n reject(this.getRpcError(payload2, resp));\n continue;\n }\n resolve(resp.result);\n }\n } catch (error) {\n this.emit(\"debug\", { action: \"receiveRpcError\", error });\n for (const { reject } of batch) {\n reject(error);\n }\n }\n })();\n }\n }, stallTime);\n }\n constructor(network, options) {\n super(network, options);\n this.#nextId = 1;\n this.#options = Object.assign({}, defaultOptions, options || {});\n this.#payloads = [];\n this.#drainTimer = null;\n this.#network = null;\n this.#pendingDetectNetwork = null;\n {\n let resolve = null;\n const promise = new Promise((_resolve) => {\n resolve = _resolve;\n });\n this.#notReady = { promise, resolve };\n }\n const staticNetwork = this._getOption(\"staticNetwork\");\n if (typeof staticNetwork === \"boolean\") {\n (0, index_js_5.assertArgument)(!staticNetwork || network !== \"any\", \"staticNetwork cannot be used on special network 'any'\", \"options\", options);\n if (staticNetwork && network != null) {\n this.#network = network_js_1.Network.from(network);\n }\n } else if (staticNetwork) {\n (0, index_js_5.assertArgument)(network == null || staticNetwork.matches(network), \"staticNetwork MUST match network object\", \"options\", options);\n this.#network = staticNetwork;\n }\n }\n /**\n * Returns the value associated with the option %%key%%.\n *\n * Sub-classes can use this to inquire about configuration options.\n */\n _getOption(key) {\n return this.#options[key];\n }\n /**\n * Gets the [[Network]] this provider has committed to. On each call, the network\n * is detected, and if it has changed, the call will reject.\n */\n get _network() {\n (0, index_js_5.assert)(this.#network, \"network is not available yet\", \"NETWORK_ERROR\");\n return this.#network;\n }\n /**\n * Resolves to the non-normalized value by performing %%req%%.\n *\n * Sub-classes may override this to modify behavior of actions,\n * and should generally call ``super._perform`` as a fallback.\n */\n async _perform(req) {\n if (req.method === \"call\" || req.method === \"estimateGas\") {\n let tx = req.transaction;\n if (tx && tx.type != null && (0, index_js_5.getBigInt)(tx.type)) {\n if (tx.maxFeePerGas == null && tx.maxPriorityFeePerGas == null) {\n const feeData = await this.getFeeData();\n if (feeData.maxFeePerGas == null && feeData.maxPriorityFeePerGas == null) {\n req = Object.assign({}, req, {\n transaction: Object.assign({}, tx, { type: void 0 })\n });\n }\n }\n }\n }\n const request = this.getRpcRequest(req);\n if (request != null) {\n return await this.send(request.method, request.args);\n }\n return super._perform(req);\n }\n /**\n * Sub-classes may override this; it detects the *actual* network that\n * we are **currently** connected to.\n *\n * Keep in mind that [[send]] may only be used once [[ready]], otherwise the\n * _send primitive must be used instead.\n */\n async _detectNetwork() {\n const network = this._getOption(\"staticNetwork\");\n if (network) {\n if (network === true) {\n if (this.#network) {\n return this.#network;\n }\n } else {\n return network;\n }\n }\n if (this.#pendingDetectNetwork) {\n return await this.#pendingDetectNetwork;\n }\n if (this.ready) {\n this.#pendingDetectNetwork = (async () => {\n try {\n const result = network_js_1.Network.from((0, index_js_5.getBigInt)(await this.send(\"eth_chainId\", [])));\n this.#pendingDetectNetwork = null;\n return result;\n } catch (error) {\n this.#pendingDetectNetwork = null;\n throw error;\n }\n })();\n return await this.#pendingDetectNetwork;\n }\n this.#pendingDetectNetwork = (async () => {\n const payload = {\n id: this.#nextId++,\n method: \"eth_chainId\",\n params: [],\n jsonrpc: \"2.0\"\n };\n this.emit(\"debug\", { action: \"sendRpcPayload\", payload });\n let result;\n try {\n result = (await this._send(payload))[0];\n this.#pendingDetectNetwork = null;\n } catch (error) {\n this.#pendingDetectNetwork = null;\n this.emit(\"debug\", { action: \"receiveRpcError\", error });\n throw error;\n }\n this.emit(\"debug\", { action: \"receiveRpcResult\", result });\n if (\"result\" in result) {\n return network_js_1.Network.from((0, index_js_5.getBigInt)(result.result));\n }\n throw this.getRpcError(payload, result);\n })();\n return await this.#pendingDetectNetwork;\n }\n /**\n * Sub-classes **MUST** call this. Until [[_start]] has been called, no calls\n * will be passed to [[_send]] from [[send]]. If it is overridden, then\n * ``super._start()`` **MUST** be called.\n *\n * Calling it multiple times is safe and has no effect.\n */\n _start() {\n if (this.#notReady == null || this.#notReady.resolve == null) {\n return;\n }\n this.#notReady.resolve();\n this.#notReady = null;\n (async () => {\n while (this.#network == null && !this.destroyed) {\n try {\n this.#network = await this._detectNetwork();\n } catch (error) {\n if (this.destroyed) {\n break;\n }\n console.log(\"JsonRpcProvider failed to detect network and cannot start up; retry in 1s (perhaps the URL is wrong or the node is not started)\");\n this.emit(\"error\", (0, index_js_5.makeError)(\"failed to bootstrap network detection\", \"NETWORK_ERROR\", { event: \"initial-network-discovery\", info: { error } }));\n await stall(1e3);\n }\n }\n this.#scheduleDrain();\n })();\n }\n /**\n * Resolves once the [[_start]] has been called. This can be used in\n * sub-classes to defer sending data until the connection has been\n * established.\n */\n async _waitUntilReady() {\n if (this.#notReady == null) {\n return;\n }\n return await this.#notReady.promise;\n }\n /**\n * Return a Subscriber that will manage the %%sub%%.\n *\n * Sub-classes may override this to modify the behavior of\n * subscription management.\n */\n _getSubscriber(sub) {\n if (sub.type === \"pending\") {\n return new subscriber_filterid_js_1.FilterIdPendingSubscriber(this);\n }\n if (sub.type === \"event\") {\n if (this._getOption(\"polling\")) {\n return new subscriber_polling_js_1.PollingEventSubscriber(this, sub.filter);\n }\n return new subscriber_filterid_js_1.FilterIdEventSubscriber(this, sub.filter);\n }\n if (sub.type === \"orphan\" && sub.filter.orphan === \"drop-log\") {\n return new abstract_provider_js_1.UnmanagedSubscriber(\"orphan\");\n }\n return super._getSubscriber(sub);\n }\n /**\n * Returns true only if the [[_start]] has been called.\n */\n get ready() {\n return this.#notReady == null;\n }\n /**\n * Returns %%tx%% as a normalized JSON-RPC transaction request,\n * which has all values hexlified and any numeric values converted\n * to Quantity values.\n */\n getRpcTransaction(tx) {\n const result = {};\n [\"chainId\", \"gasLimit\", \"gasPrice\", \"type\", \"maxFeePerGas\", \"maxPriorityFeePerGas\", \"nonce\", \"value\"].forEach((key) => {\n if (tx[key] == null) {\n return;\n }\n let dstKey = key;\n if (key === \"gasLimit\") {\n dstKey = \"gas\";\n }\n result[dstKey] = (0, index_js_5.toQuantity)((0, index_js_5.getBigInt)(tx[key], `tx.${key}`));\n });\n [\"from\", \"to\", \"data\"].forEach((key) => {\n if (tx[key] == null) {\n return;\n }\n result[key] = (0, index_js_5.hexlify)(tx[key]);\n });\n if (tx.accessList) {\n result[\"accessList\"] = (0, index_js_4.accessListify)(tx.accessList);\n }\n if (tx.blobVersionedHashes) {\n result[\"blobVersionedHashes\"] = tx.blobVersionedHashes.map((h4) => h4.toLowerCase());\n }\n if (tx.authorizationList) {\n result[\"authorizationList\"] = tx.authorizationList.map((_a) => {\n const a3 = (0, index_js_4.authorizationify)(_a);\n return {\n address: a3.address,\n nonce: (0, index_js_5.toQuantity)(a3.nonce),\n chainId: (0, index_js_5.toQuantity)(a3.chainId),\n yParity: (0, index_js_5.toQuantity)(a3.signature.yParity),\n r: (0, index_js_5.toQuantity)(a3.signature.r),\n s: (0, index_js_5.toQuantity)(a3.signature.s)\n };\n });\n }\n return result;\n }\n /**\n * Returns the request method and arguments required to perform\n * %%req%%.\n */\n getRpcRequest(req) {\n switch (req.method) {\n case \"chainId\":\n return { method: \"eth_chainId\", args: [] };\n case \"getBlockNumber\":\n return { method: \"eth_blockNumber\", args: [] };\n case \"getGasPrice\":\n return { method: \"eth_gasPrice\", args: [] };\n case \"getPriorityFee\":\n return { method: \"eth_maxPriorityFeePerGas\", args: [] };\n case \"getBalance\":\n return {\n method: \"eth_getBalance\",\n args: [getLowerCase(req.address), req.blockTag]\n };\n case \"getTransactionCount\":\n return {\n method: \"eth_getTransactionCount\",\n args: [getLowerCase(req.address), req.blockTag]\n };\n case \"getCode\":\n return {\n method: \"eth_getCode\",\n args: [getLowerCase(req.address), req.blockTag]\n };\n case \"getStorage\":\n return {\n method: \"eth_getStorageAt\",\n args: [\n getLowerCase(req.address),\n \"0x\" + req.position.toString(16),\n req.blockTag\n ]\n };\n case \"broadcastTransaction\":\n return {\n method: \"eth_sendRawTransaction\",\n args: [req.signedTransaction]\n };\n case \"getBlock\":\n if (\"blockTag\" in req) {\n return {\n method: \"eth_getBlockByNumber\",\n args: [req.blockTag, !!req.includeTransactions]\n };\n } else if (\"blockHash\" in req) {\n return {\n method: \"eth_getBlockByHash\",\n args: [req.blockHash, !!req.includeTransactions]\n };\n }\n break;\n case \"getTransaction\":\n return {\n method: \"eth_getTransactionByHash\",\n args: [req.hash]\n };\n case \"getTransactionReceipt\":\n return {\n method: \"eth_getTransactionReceipt\",\n args: [req.hash]\n };\n case \"call\":\n return {\n method: \"eth_call\",\n args: [this.getRpcTransaction(req.transaction), req.blockTag]\n };\n case \"estimateGas\": {\n return {\n method: \"eth_estimateGas\",\n args: [this.getRpcTransaction(req.transaction)]\n };\n }\n case \"getLogs\":\n if (req.filter && req.filter.address != null) {\n if (Array.isArray(req.filter.address)) {\n req.filter.address = req.filter.address.map(getLowerCase);\n } else {\n req.filter.address = getLowerCase(req.filter.address);\n }\n }\n return { method: \"eth_getLogs\", args: [req.filter] };\n }\n return null;\n }\n /**\n * Returns an ethers-style Error for the given JSON-RPC error\n * %%payload%%, coalescing the various strings and error shapes\n * that different nodes return, coercing them into a machine-readable\n * standardized error.\n */\n getRpcError(payload, _error) {\n const { method } = payload;\n const { error } = _error;\n if (method === \"eth_estimateGas\" && error.message) {\n const msg = error.message;\n if (!msg.match(/revert/i) && msg.match(/insufficient funds/i)) {\n return (0, index_js_5.makeError)(\"insufficient funds\", \"INSUFFICIENT_FUNDS\", {\n transaction: payload.params[0],\n info: { payload, error }\n });\n } else if (msg.match(/nonce/i) && msg.match(/too low/i)) {\n return (0, index_js_5.makeError)(\"nonce has already been used\", \"NONCE_EXPIRED\", {\n transaction: payload.params[0],\n info: { payload, error }\n });\n }\n }\n if (method === \"eth_call\" || method === \"eth_estimateGas\") {\n const result = spelunkData(error);\n const e3 = index_js_1.AbiCoder.getBuiltinCallException(method === \"eth_call\" ? \"call\" : \"estimateGas\", payload.params[0], result ? result.data : null);\n e3.info = { error, payload };\n return e3;\n }\n const message = JSON.stringify(spelunkMessage(error));\n if (typeof error.message === \"string\" && error.message.match(/user denied|ethers-user-denied/i)) {\n const actionMap = {\n eth_sign: \"signMessage\",\n personal_sign: \"signMessage\",\n eth_signTypedData_v4: \"signTypedData\",\n eth_signTransaction: \"signTransaction\",\n eth_sendTransaction: \"sendTransaction\",\n eth_requestAccounts: \"requestAccess\",\n wallet_requestAccounts: \"requestAccess\"\n };\n return (0, index_js_5.makeError)(`user rejected action`, \"ACTION_REJECTED\", {\n action: actionMap[method] || \"unknown\",\n reason: \"rejected\",\n info: { payload, error }\n });\n }\n if (method === \"eth_sendRawTransaction\" || method === \"eth_sendTransaction\") {\n const transaction = payload.params[0];\n if (message.match(/insufficient funds|base fee exceeds gas limit/i)) {\n return (0, index_js_5.makeError)(\"insufficient funds for intrinsic transaction cost\", \"INSUFFICIENT_FUNDS\", {\n transaction,\n info: { error }\n });\n }\n if (message.match(/nonce/i) && message.match(/too low/i)) {\n return (0, index_js_5.makeError)(\"nonce has already been used\", \"NONCE_EXPIRED\", { transaction, info: { error } });\n }\n if (message.match(/replacement transaction/i) && message.match(/underpriced/i)) {\n return (0, index_js_5.makeError)(\"replacement fee too low\", \"REPLACEMENT_UNDERPRICED\", { transaction, info: { error } });\n }\n if (message.match(/only replay-protected/i)) {\n return (0, index_js_5.makeError)(\"legacy pre-eip-155 transactions not supported\", \"UNSUPPORTED_OPERATION\", {\n operation: method,\n info: { transaction, info: { error } }\n });\n }\n }\n let unsupported = !!message.match(/the method .* does not exist/i);\n if (!unsupported) {\n if (error && error.details && error.details.startsWith(\"Unauthorized method:\")) {\n unsupported = true;\n }\n }\n if (unsupported) {\n return (0, index_js_5.makeError)(\"unsupported operation\", \"UNSUPPORTED_OPERATION\", {\n operation: payload.method,\n info: { error, payload }\n });\n }\n return (0, index_js_5.makeError)(\"could not coalesce error\", \"UNKNOWN_ERROR\", { error, payload });\n }\n /**\n * Requests the %%method%% with %%params%% via the JSON-RPC protocol\n * over the underlying channel. This can be used to call methods\n * on the backend that do not have a high-level API within the Provider\n * API.\n *\n * This method queues requests according to the batch constraints\n * in the options, assigns the request a unique ID.\n *\n * **Do NOT override** this method in sub-classes; instead\n * override [[_send]] or force the options values in the\n * call to the constructor to modify this method's behavior.\n */\n send(method, params) {\n if (this.destroyed) {\n return Promise.reject((0, index_js_5.makeError)(\"provider destroyed; cancelled request\", \"UNSUPPORTED_OPERATION\", { operation: method }));\n }\n const id = this.#nextId++;\n const promise = new Promise((resolve, reject) => {\n this.#payloads.push({\n resolve,\n reject,\n payload: { method, params, id, jsonrpc: \"2.0\" }\n });\n });\n this.#scheduleDrain();\n return promise;\n }\n /**\n * Resolves to the [[Signer]] account for %%address%% managed by\n * the client.\n *\n * If the %%address%% is a number, it is used as an index in the\n * the accounts from [[listAccounts]].\n *\n * This can only be used on clients which manage accounts (such as\n * Geth with imported account or MetaMask).\n *\n * Throws if the account doesn't exist.\n */\n async getSigner(address) {\n if (address == null) {\n address = 0;\n }\n const accountsPromise = this.send(\"eth_accounts\", []);\n if (typeof address === \"number\") {\n const accounts2 = await accountsPromise;\n if (address >= accounts2.length) {\n throw new Error(\"no such account\");\n }\n return new JsonRpcSigner(this, accounts2[address]);\n }\n const { accounts } = await (0, index_js_5.resolveProperties)({\n network: this.getNetwork(),\n accounts: accountsPromise\n });\n address = (0, index_js_2.getAddress)(address);\n for (const account of accounts) {\n if ((0, index_js_2.getAddress)(account) === address) {\n return new JsonRpcSigner(this, address);\n }\n }\n throw new Error(\"invalid account\");\n }\n async listAccounts() {\n const accounts = await this.send(\"eth_accounts\", []);\n return accounts.map((a3) => new JsonRpcSigner(this, a3));\n }\n destroy() {\n if (this.#drainTimer) {\n clearTimeout(this.#drainTimer);\n this.#drainTimer = null;\n }\n for (const { payload, reject } of this.#payloads) {\n reject((0, index_js_5.makeError)(\"provider destroyed; cancelled request\", \"UNSUPPORTED_OPERATION\", { operation: payload.method }));\n }\n this.#payloads = [];\n super.destroy();\n }\n };\n exports3.JsonRpcApiProvider = JsonRpcApiProvider;\n var JsonRpcApiPollingProvider = class extends JsonRpcApiProvider {\n #pollingInterval;\n constructor(network, options) {\n super(network, options);\n let pollingInterval = this._getOption(\"pollingInterval\");\n if (pollingInterval == null) {\n pollingInterval = defaultOptions.pollingInterval;\n }\n this.#pollingInterval = pollingInterval;\n }\n _getSubscriber(sub) {\n const subscriber = super._getSubscriber(sub);\n if (isPollable(subscriber)) {\n subscriber.pollingInterval = this.#pollingInterval;\n }\n return subscriber;\n }\n /**\n * The polling interval (default: 4000 ms)\n */\n get pollingInterval() {\n return this.#pollingInterval;\n }\n set pollingInterval(value) {\n if (!Number.isInteger(value) || value < 0) {\n throw new Error(\"invalid interval\");\n }\n this.#pollingInterval = value;\n this._forEachSubscriber((sub) => {\n if (isPollable(sub)) {\n sub.pollingInterval = this.#pollingInterval;\n }\n });\n }\n };\n exports3.JsonRpcApiPollingProvider = JsonRpcApiPollingProvider;\n var JsonRpcProvider = class extends JsonRpcApiPollingProvider {\n #connect;\n constructor(url, network, options) {\n if (url == null) {\n url = \"http://localhost:8545\";\n }\n super(network, options);\n if (typeof url === \"string\") {\n this.#connect = new index_js_5.FetchRequest(url);\n } else {\n this.#connect = url.clone();\n }\n }\n _getConnection() {\n return this.#connect.clone();\n }\n async send(method, params) {\n await this._start();\n return await super.send(method, params);\n }\n async _send(payload) {\n const request = this._getConnection();\n request.body = JSON.stringify(payload);\n request.setHeader(\"content-type\", \"application/json\");\n const response = await request.send();\n response.assertOk();\n let resp = response.bodyJson;\n if (!Array.isArray(resp)) {\n resp = [resp];\n }\n return resp;\n }\n };\n exports3.JsonRpcProvider = JsonRpcProvider;\n function spelunkData(value) {\n if (value == null) {\n return null;\n }\n if (typeof value.message === \"string\" && value.message.match(/revert/i) && (0, index_js_5.isHexString)(value.data)) {\n return { message: value.message, data: value.data };\n }\n if (typeof value === \"object\") {\n for (const key in value) {\n const result = spelunkData(value[key]);\n if (result) {\n return result;\n }\n }\n return null;\n }\n if (typeof value === \"string\") {\n try {\n return spelunkData(JSON.parse(value));\n } catch (error) {\n }\n }\n return null;\n }\n function _spelunkMessage(value, result) {\n if (value == null) {\n return;\n }\n if (typeof value.message === \"string\") {\n result.push(value.message);\n }\n if (typeof value === \"object\") {\n for (const key in value) {\n _spelunkMessage(value[key], result);\n }\n }\n if (typeof value === \"string\") {\n try {\n return _spelunkMessage(JSON.parse(value), result);\n } catch (error) {\n }\n }\n }\n function spelunkMessage(value) {\n const result = [];\n _spelunkMessage(value, result);\n return result;\n }\n }\n });\n\n // ../../../node_modules/.pnpm/ethers@6.15.0_bufferutil@4.0.9_utf-8-validate@5.0.10/node_modules/ethers/lib.commonjs/providers/provider-ankr.js\n var require_provider_ankr = __commonJS({\n \"../../../node_modules/.pnpm/ethers@6.15.0_bufferutil@4.0.9_utf-8-validate@5.0.10/node_modules/ethers/lib.commonjs/providers/provider-ankr.js\"(exports3) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n Object.defineProperty(exports3, \"__esModule\", { value: true });\n exports3.AnkrProvider = void 0;\n var index_js_1 = require_utils8();\n var community_js_1 = require_community();\n var network_js_1 = require_network();\n var provider_jsonrpc_js_1 = require_provider_jsonrpc();\n var defaultApiKey = \"9f7d929b018cdffb338517efa06f58359e86ff1ffd350bc889738523659e7972\";\n function getHost(name) {\n switch (name) {\n case \"mainnet\":\n return \"rpc.ankr.com/eth\";\n case \"goerli\":\n return \"rpc.ankr.com/eth_goerli\";\n case \"sepolia\":\n return \"rpc.ankr.com/eth_sepolia\";\n case \"arbitrum\":\n return \"rpc.ankr.com/arbitrum\";\n case \"base\":\n return \"rpc.ankr.com/base\";\n case \"base-goerli\":\n return \"rpc.ankr.com/base_goerli\";\n case \"base-sepolia\":\n return \"rpc.ankr.com/base_sepolia\";\n case \"bnb\":\n return \"rpc.ankr.com/bsc\";\n case \"bnbt\":\n return \"rpc.ankr.com/bsc_testnet_chapel\";\n case \"matic\":\n return \"rpc.ankr.com/polygon\";\n case \"matic-mumbai\":\n return \"rpc.ankr.com/polygon_mumbai\";\n case \"optimism\":\n return \"rpc.ankr.com/optimism\";\n case \"optimism-goerli\":\n return \"rpc.ankr.com/optimism_testnet\";\n case \"optimism-sepolia\":\n return \"rpc.ankr.com/optimism_sepolia\";\n }\n (0, index_js_1.assertArgument)(false, \"unsupported network\", \"network\", name);\n }\n var AnkrProvider = class _AnkrProvider extends provider_jsonrpc_js_1.JsonRpcProvider {\n /**\n * The API key for the Ankr connection.\n */\n apiKey;\n /**\n * Create a new **AnkrProvider**.\n *\n * By default connecting to ``mainnet`` with a highly throttled\n * API key.\n */\n constructor(_network, apiKey) {\n if (_network == null) {\n _network = \"mainnet\";\n }\n const network = network_js_1.Network.from(_network);\n if (apiKey == null) {\n apiKey = defaultApiKey;\n }\n const options = { polling: true, staticNetwork: network };\n const request = _AnkrProvider.getRequest(network, apiKey);\n super(request, network, options);\n (0, index_js_1.defineProperties)(this, { apiKey });\n }\n _getProvider(chainId) {\n try {\n return new _AnkrProvider(chainId, this.apiKey);\n } catch (error) {\n }\n return super._getProvider(chainId);\n }\n /**\n * Returns a prepared request for connecting to %%network%% with\n * %%apiKey%%.\n */\n static getRequest(network, apiKey) {\n if (apiKey == null) {\n apiKey = defaultApiKey;\n }\n const request = new index_js_1.FetchRequest(`https://${getHost(network.name)}/${apiKey}`);\n request.allowGzip = true;\n if (apiKey === defaultApiKey) {\n request.retryFunc = async (request2, response, attempt) => {\n (0, community_js_1.showThrottleMessage)(\"AnkrProvider\");\n return true;\n };\n }\n return request;\n }\n getRpcError(payload, error) {\n if (payload.method === \"eth_sendRawTransaction\") {\n if (error && error.error && error.error.message === \"INTERNAL_ERROR: could not replace existing tx\") {\n error.error.message = \"replacement transaction underpriced\";\n }\n }\n return super.getRpcError(payload, error);\n }\n isCommunityResource() {\n return this.apiKey === defaultApiKey;\n }\n };\n exports3.AnkrProvider = AnkrProvider;\n }\n });\n\n // ../../../node_modules/.pnpm/ethers@6.15.0_bufferutil@4.0.9_utf-8-validate@5.0.10/node_modules/ethers/lib.commonjs/providers/provider-alchemy.js\n var require_provider_alchemy = __commonJS({\n \"../../../node_modules/.pnpm/ethers@6.15.0_bufferutil@4.0.9_utf-8-validate@5.0.10/node_modules/ethers/lib.commonjs/providers/provider-alchemy.js\"(exports3) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n Object.defineProperty(exports3, \"__esModule\", { value: true });\n exports3.AlchemyProvider = void 0;\n var index_js_1 = require_utils8();\n var community_js_1 = require_community();\n var network_js_1 = require_network();\n var provider_jsonrpc_js_1 = require_provider_jsonrpc();\n var defaultApiKey = \"_gg7wSSi0KMBsdKnGVfHDueq6xMB9EkC\";\n function getHost(name) {\n switch (name) {\n case \"mainnet\":\n return \"eth-mainnet.alchemyapi.io\";\n case \"goerli\":\n return \"eth-goerli.g.alchemy.com\";\n case \"sepolia\":\n return \"eth-sepolia.g.alchemy.com\";\n case \"arbitrum\":\n return \"arb-mainnet.g.alchemy.com\";\n case \"arbitrum-goerli\":\n return \"arb-goerli.g.alchemy.com\";\n case \"arbitrum-sepolia\":\n return \"arb-sepolia.g.alchemy.com\";\n case \"base\":\n return \"base-mainnet.g.alchemy.com\";\n case \"base-goerli\":\n return \"base-goerli.g.alchemy.com\";\n case \"base-sepolia\":\n return \"base-sepolia.g.alchemy.com\";\n case \"matic\":\n return \"polygon-mainnet.g.alchemy.com\";\n case \"matic-amoy\":\n return \"polygon-amoy.g.alchemy.com\";\n case \"matic-mumbai\":\n return \"polygon-mumbai.g.alchemy.com\";\n case \"optimism\":\n return \"opt-mainnet.g.alchemy.com\";\n case \"optimism-goerli\":\n return \"opt-goerli.g.alchemy.com\";\n case \"optimism-sepolia\":\n return \"opt-sepolia.g.alchemy.com\";\n }\n (0, index_js_1.assertArgument)(false, \"unsupported network\", \"network\", name);\n }\n var AlchemyProvider = class _AlchemyProvider extends provider_jsonrpc_js_1.JsonRpcProvider {\n apiKey;\n constructor(_network, apiKey) {\n if (_network == null) {\n _network = \"mainnet\";\n }\n const network = network_js_1.Network.from(_network);\n if (apiKey == null) {\n apiKey = defaultApiKey;\n }\n const request = _AlchemyProvider.getRequest(network, apiKey);\n super(request, network, { staticNetwork: network });\n (0, index_js_1.defineProperties)(this, { apiKey });\n }\n _getProvider(chainId) {\n try {\n return new _AlchemyProvider(chainId, this.apiKey);\n } catch (error) {\n }\n return super._getProvider(chainId);\n }\n async _perform(req) {\n if (req.method === \"getTransactionResult\") {\n const { trace, tx } = await (0, index_js_1.resolveProperties)({\n trace: this.send(\"trace_transaction\", [req.hash]),\n tx: this.getTransaction(req.hash)\n });\n if (trace == null || tx == null) {\n return null;\n }\n let data;\n let error = false;\n try {\n data = trace[0].result.output;\n error = trace[0].error === \"Reverted\";\n } catch (error2) {\n }\n if (data) {\n (0, index_js_1.assert)(!error, \"an error occurred during transaction executions\", \"CALL_EXCEPTION\", {\n action: \"getTransactionResult\",\n data,\n reason: null,\n transaction: tx,\n invocation: null,\n revert: null\n // @TODO\n });\n return data;\n }\n (0, index_js_1.assert)(false, \"could not parse trace result\", \"BAD_DATA\", { value: trace });\n }\n return await super._perform(req);\n }\n isCommunityResource() {\n return this.apiKey === defaultApiKey;\n }\n static getRequest(network, apiKey) {\n if (apiKey == null) {\n apiKey = defaultApiKey;\n }\n const request = new index_js_1.FetchRequest(`https://${getHost(network.name)}/v2/${apiKey}`);\n request.allowGzip = true;\n if (apiKey === defaultApiKey) {\n request.retryFunc = async (request2, response, attempt) => {\n (0, community_js_1.showThrottleMessage)(\"alchemy\");\n return true;\n };\n }\n return request;\n }\n };\n exports3.AlchemyProvider = AlchemyProvider;\n }\n });\n\n // ../../../node_modules/.pnpm/ethers@6.15.0_bufferutil@4.0.9_utf-8-validate@5.0.10/node_modules/ethers/lib.commonjs/providers/provider-chainstack.js\n var require_provider_chainstack = __commonJS({\n \"../../../node_modules/.pnpm/ethers@6.15.0_bufferutil@4.0.9_utf-8-validate@5.0.10/node_modules/ethers/lib.commonjs/providers/provider-chainstack.js\"(exports3) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n Object.defineProperty(exports3, \"__esModule\", { value: true });\n exports3.ChainstackProvider = void 0;\n var index_js_1 = require_utils8();\n var community_js_1 = require_community();\n var network_js_1 = require_network();\n var provider_jsonrpc_js_1 = require_provider_jsonrpc();\n function getApiKey(name) {\n switch (name) {\n case \"mainnet\":\n return \"39f1d67cedf8b7831010a665328c9197\";\n case \"arbitrum\":\n return \"0550c209db33c3abf4cc927e1e18cea1\";\n case \"bnb\":\n return \"98b5a77e531614387366f6fc5da097f8\";\n case \"matic\":\n return \"cd9d4d70377471aa7c142ec4a4205249\";\n }\n (0, index_js_1.assertArgument)(false, \"unsupported network\", \"network\", name);\n }\n function getHost(name) {\n switch (name) {\n case \"mainnet\":\n return \"ethereum-mainnet.core.chainstack.com\";\n case \"arbitrum\":\n return \"arbitrum-mainnet.core.chainstack.com\";\n case \"bnb\":\n return \"bsc-mainnet.core.chainstack.com\";\n case \"matic\":\n return \"polygon-mainnet.core.chainstack.com\";\n }\n (0, index_js_1.assertArgument)(false, \"unsupported network\", \"network\", name);\n }\n var ChainstackProvider = class _ChainstackProvider extends provider_jsonrpc_js_1.JsonRpcProvider {\n /**\n * The API key for the Chainstack connection.\n */\n apiKey;\n /**\n * Creates a new **ChainstackProvider**.\n */\n constructor(_network, apiKey) {\n if (_network == null) {\n _network = \"mainnet\";\n }\n const network = network_js_1.Network.from(_network);\n if (apiKey == null) {\n apiKey = getApiKey(network.name);\n }\n const request = _ChainstackProvider.getRequest(network, apiKey);\n super(request, network, { staticNetwork: network });\n (0, index_js_1.defineProperties)(this, { apiKey });\n }\n _getProvider(chainId) {\n try {\n return new _ChainstackProvider(chainId, this.apiKey);\n } catch (error) {\n }\n return super._getProvider(chainId);\n }\n isCommunityResource() {\n return this.apiKey === getApiKey(this._network.name);\n }\n /**\n * Returns a prepared request for connecting to %%network%%\n * with %%apiKey%% and %%projectSecret%%.\n */\n static getRequest(network, apiKey) {\n if (apiKey == null) {\n apiKey = getApiKey(network.name);\n }\n const request = new index_js_1.FetchRequest(`https://${getHost(network.name)}/${apiKey}`);\n request.allowGzip = true;\n if (apiKey === getApiKey(network.name)) {\n request.retryFunc = async (request2, response, attempt) => {\n (0, community_js_1.showThrottleMessage)(\"ChainstackProvider\");\n return true;\n };\n }\n return request;\n }\n };\n exports3.ChainstackProvider = ChainstackProvider;\n }\n });\n\n // ../../../node_modules/.pnpm/ethers@6.15.0_bufferutil@4.0.9_utf-8-validate@5.0.10/node_modules/ethers/lib.commonjs/providers/provider-cloudflare.js\n var require_provider_cloudflare = __commonJS({\n \"../../../node_modules/.pnpm/ethers@6.15.0_bufferutil@4.0.9_utf-8-validate@5.0.10/node_modules/ethers/lib.commonjs/providers/provider-cloudflare.js\"(exports3) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n Object.defineProperty(exports3, \"__esModule\", { value: true });\n exports3.CloudflareProvider = void 0;\n var index_js_1 = require_utils8();\n var network_js_1 = require_network();\n var provider_jsonrpc_js_1 = require_provider_jsonrpc();\n var CloudflareProvider = class extends provider_jsonrpc_js_1.JsonRpcProvider {\n constructor(_network) {\n if (_network == null) {\n _network = \"mainnet\";\n }\n const network = network_js_1.Network.from(_network);\n (0, index_js_1.assertArgument)(network.name === \"mainnet\", \"unsupported network\", \"network\", _network);\n super(\"https://cloudflare-eth.com/\", network, { staticNetwork: network });\n }\n };\n exports3.CloudflareProvider = CloudflareProvider;\n }\n });\n\n // ../../../node_modules/.pnpm/ethers@6.15.0_bufferutil@4.0.9_utf-8-validate@5.0.10/node_modules/ethers/lib.commonjs/providers/provider-etherscan.js\n var require_provider_etherscan = __commonJS({\n \"../../../node_modules/.pnpm/ethers@6.15.0_bufferutil@4.0.9_utf-8-validate@5.0.10/node_modules/ethers/lib.commonjs/providers/provider-etherscan.js\"(exports3) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n Object.defineProperty(exports3, \"__esModule\", { value: true });\n exports3.EtherscanProvider = exports3.EtherscanPlugin = void 0;\n var index_js_1 = require_abi();\n var index_js_2 = require_contract2();\n var index_js_3 = require_transaction2();\n var index_js_4 = require_utils8();\n var abstract_provider_js_1 = require_abstract_provider();\n var network_js_1 = require_network();\n var plugins_network_js_1 = require_plugins_network();\n var community_js_1 = require_community();\n var THROTTLE = 2e3;\n function isPromise(value) {\n return value && typeof value.then === \"function\";\n }\n var EtherscanPluginId = \"org.ethers.plugins.provider.Etherscan\";\n var EtherscanPlugin = class _EtherscanPlugin extends plugins_network_js_1.NetworkPlugin {\n /**\n * The Etherscan API base URL.\n */\n baseUrl;\n /**\n * Creates a new **EtherscanProvider** which will use\n * %%baseUrl%%.\n */\n constructor(baseUrl) {\n super(EtherscanPluginId);\n (0, index_js_4.defineProperties)(this, { baseUrl });\n }\n clone() {\n return new _EtherscanPlugin(this.baseUrl);\n }\n };\n exports3.EtherscanPlugin = EtherscanPlugin;\n var skipKeys = [\"enableCcipRead\"];\n var nextId = 1;\n var EtherscanProvider = class extends abstract_provider_js_1.AbstractProvider {\n /**\n * The connected network.\n */\n network;\n /**\n * The API key or null if using the community provided bandwidth.\n */\n apiKey;\n #plugin;\n /**\n * Creates a new **EtherscanBaseProvider**.\n */\n constructor(_network, _apiKey) {\n const apiKey = _apiKey != null ? _apiKey : null;\n super();\n const network = network_js_1.Network.from(_network);\n this.#plugin = network.getPlugin(EtherscanPluginId);\n (0, index_js_4.defineProperties)(this, { apiKey, network });\n }\n /**\n * Returns the base URL.\n *\n * If an [[EtherscanPlugin]] is configured on the\n * [[EtherscanBaseProvider_network]], returns the plugin's\n * baseUrl.\n *\n * Deprecated; for Etherscan v2 the base is no longer a simply\n * host, but instead a URL including a chainId parameter. Changing\n * this to return a URL prefix could break some libraries, so it\n * is left intact but will be removed in the future as it is unused.\n */\n getBaseUrl() {\n if (this.#plugin) {\n return this.#plugin.baseUrl;\n }\n switch (this.network.name) {\n case \"mainnet\":\n return \"https://api.etherscan.io\";\n case \"goerli\":\n return \"https://api-goerli.etherscan.io\";\n case \"sepolia\":\n return \"https://api-sepolia.etherscan.io\";\n case \"holesky\":\n return \"https://api-holesky.etherscan.io\";\n case \"arbitrum\":\n return \"https://api.arbiscan.io\";\n case \"arbitrum-goerli\":\n return \"https://api-goerli.arbiscan.io\";\n case \"base\":\n return \"https://api.basescan.org\";\n case \"base-sepolia\":\n return \"https://api-sepolia.basescan.org\";\n case \"bnb\":\n return \"https://api.bscscan.com\";\n case \"bnbt\":\n return \"https://api-testnet.bscscan.com\";\n case \"matic\":\n return \"https://api.polygonscan.com\";\n case \"matic-amoy\":\n return \"https://api-amoy.polygonscan.com\";\n case \"matic-mumbai\":\n return \"https://api-testnet.polygonscan.com\";\n case \"optimism\":\n return \"https://api-optimistic.etherscan.io\";\n case \"optimism-goerli\":\n return \"https://api-goerli-optimistic.etherscan.io\";\n default:\n }\n (0, index_js_4.assertArgument)(false, \"unsupported network\", \"network\", this.network);\n }\n /**\n * Returns the URL for the %%module%% and %%params%%.\n */\n getUrl(module2, params) {\n let query = Object.keys(params).reduce((accum, key) => {\n const value = params[key];\n if (value != null) {\n accum += `&${key}=${value}`;\n }\n return accum;\n }, \"\");\n if (this.apiKey) {\n query += `&apikey=${this.apiKey}`;\n }\n return `https://api.etherscan.io/v2/api?chainid=${this.network.chainId}&module=${module2}${query}`;\n }\n /**\n * Returns the URL for using POST requests.\n */\n getPostUrl() {\n return `https://api.etherscan.io/v2/api?chainid=${this.network.chainId}`;\n }\n /**\n * Returns the parameters for using POST requests.\n */\n getPostData(module2, params) {\n params.module = module2;\n params.apikey = this.apiKey;\n params.chainid = this.network.chainId;\n return params;\n }\n async detectNetwork() {\n return this.network;\n }\n /**\n * Resolves to the result of calling %%module%% with %%params%%.\n *\n * If %%post%%, the request is made as a POST request.\n */\n async fetch(module2, params, post) {\n const id = nextId++;\n const url = post ? this.getPostUrl() : this.getUrl(module2, params);\n const payload = post ? this.getPostData(module2, params) : null;\n this.emit(\"debug\", { action: \"sendRequest\", id, url, payload });\n const request = new index_js_4.FetchRequest(url);\n request.setThrottleParams({ slotInterval: 1e3 });\n request.retryFunc = (req, resp, attempt) => {\n if (this.isCommunityResource()) {\n (0, community_js_1.showThrottleMessage)(\"Etherscan\");\n }\n return Promise.resolve(true);\n };\n request.processFunc = async (request2, response2) => {\n const result2 = response2.hasBody() ? JSON.parse((0, index_js_4.toUtf8String)(response2.body)) : {};\n const throttle = (typeof result2.result === \"string\" ? result2.result : \"\").toLowerCase().indexOf(\"rate limit\") >= 0;\n if (module2 === \"proxy\") {\n if (result2 && result2.status == 0 && result2.message == \"NOTOK\" && throttle) {\n this.emit(\"debug\", { action: \"receiveError\", id, reason: \"proxy-NOTOK\", error: result2 });\n response2.throwThrottleError(result2.result, THROTTLE);\n }\n } else {\n if (throttle) {\n this.emit(\"debug\", { action: \"receiveError\", id, reason: \"null result\", error: result2.result });\n response2.throwThrottleError(result2.result, THROTTLE);\n }\n }\n return response2;\n };\n if (payload) {\n request.setHeader(\"content-type\", \"application/x-www-form-urlencoded; charset=UTF-8\");\n request.body = Object.keys(payload).map((k4) => `${k4}=${payload[k4]}`).join(\"&\");\n }\n const response = await request.send();\n try {\n response.assertOk();\n } catch (error) {\n this.emit(\"debug\", { action: \"receiveError\", id, error, reason: \"assertOk\" });\n (0, index_js_4.assert)(false, \"response error\", \"SERVER_ERROR\", { request, response });\n }\n if (!response.hasBody()) {\n this.emit(\"debug\", { action: \"receiveError\", id, error: \"missing body\", reason: \"null body\" });\n (0, index_js_4.assert)(false, \"missing response\", \"SERVER_ERROR\", { request, response });\n }\n const result = JSON.parse((0, index_js_4.toUtf8String)(response.body));\n if (module2 === \"proxy\") {\n if (result.jsonrpc != \"2.0\") {\n this.emit(\"debug\", { action: \"receiveError\", id, result, reason: \"invalid JSON-RPC\" });\n (0, index_js_4.assert)(false, \"invalid JSON-RPC response (missing jsonrpc='2.0')\", \"SERVER_ERROR\", { request, response, info: { result } });\n }\n if (result.error) {\n this.emit(\"debug\", { action: \"receiveError\", id, result, reason: \"JSON-RPC error\" });\n (0, index_js_4.assert)(false, \"error response\", \"SERVER_ERROR\", { request, response, info: { result } });\n }\n this.emit(\"debug\", { action: \"receiveRequest\", id, result });\n return result.result;\n } else {\n if (result.status == 0 && (result.message === \"No records found\" || result.message === \"No transactions found\")) {\n this.emit(\"debug\", { action: \"receiveRequest\", id, result });\n return result.result;\n }\n if (result.status != 1 || typeof result.message === \"string\" && !result.message.match(/^OK/)) {\n this.emit(\"debug\", { action: \"receiveError\", id, result });\n (0, index_js_4.assert)(false, \"error response\", \"SERVER_ERROR\", { request, response, info: { result } });\n }\n this.emit(\"debug\", { action: \"receiveRequest\", id, result });\n return result.result;\n }\n }\n /**\n * Returns %%transaction%% normalized for the Etherscan API.\n */\n _getTransactionPostData(transaction) {\n const result = {};\n for (let key in transaction) {\n if (skipKeys.indexOf(key) >= 0) {\n continue;\n }\n if (transaction[key] == null) {\n continue;\n }\n let value = transaction[key];\n if (key === \"type\" && value === 0) {\n continue;\n }\n if (key === \"blockTag\" && value === \"latest\") {\n continue;\n }\n if ({ type: true, gasLimit: true, gasPrice: true, maxFeePerGs: true, maxPriorityFeePerGas: true, nonce: true, value: true }[key]) {\n value = (0, index_js_4.toQuantity)(value);\n } else if (key === \"accessList\") {\n value = \"[\" + (0, index_js_3.accessListify)(value).map((set) => {\n return `{address:\"${set.address}\",storageKeys:[\"${set.storageKeys.join('\",\"')}\"]}`;\n }).join(\",\") + \"]\";\n } else if (key === \"blobVersionedHashes\") {\n if (value.length === 0) {\n continue;\n }\n (0, index_js_4.assert)(false, \"Etherscan API does not support blobVersionedHashes\", \"UNSUPPORTED_OPERATION\", {\n operation: \"_getTransactionPostData\",\n info: { transaction }\n });\n } else {\n value = (0, index_js_4.hexlify)(value);\n }\n result[key] = value;\n }\n return result;\n }\n /**\n * Throws the normalized Etherscan error.\n */\n _checkError(req, error, transaction) {\n let message = \"\";\n if ((0, index_js_4.isError)(error, \"SERVER_ERROR\")) {\n try {\n message = error.info.result.error.message;\n } catch (e3) {\n }\n if (!message) {\n try {\n message = error.info.message;\n } catch (e3) {\n }\n }\n }\n if (req.method === \"estimateGas\") {\n if (!message.match(/revert/i) && message.match(/insufficient funds/i)) {\n (0, index_js_4.assert)(false, \"insufficient funds\", \"INSUFFICIENT_FUNDS\", {\n transaction: req.transaction\n });\n }\n }\n if (req.method === \"call\" || req.method === \"estimateGas\") {\n if (message.match(/execution reverted/i)) {\n let data = \"\";\n try {\n data = error.info.result.error.data;\n } catch (error2) {\n }\n const e3 = index_js_1.AbiCoder.getBuiltinCallException(req.method, req.transaction, data);\n e3.info = { request: req, error };\n throw e3;\n }\n }\n if (message) {\n if (req.method === \"broadcastTransaction\") {\n const transaction2 = index_js_3.Transaction.from(req.signedTransaction);\n if (message.match(/replacement/i) && message.match(/underpriced/i)) {\n (0, index_js_4.assert)(false, \"replacement fee too low\", \"REPLACEMENT_UNDERPRICED\", {\n transaction: transaction2\n });\n }\n if (message.match(/insufficient funds/)) {\n (0, index_js_4.assert)(false, \"insufficient funds for intrinsic transaction cost\", \"INSUFFICIENT_FUNDS\", {\n transaction: transaction2\n });\n }\n if (message.match(/same hash was already imported|transaction nonce is too low|nonce too low/)) {\n (0, index_js_4.assert)(false, \"nonce has already been used\", \"NONCE_EXPIRED\", {\n transaction: transaction2\n });\n }\n }\n }\n throw error;\n }\n async _detectNetwork() {\n return this.network;\n }\n async _perform(req) {\n switch (req.method) {\n case \"chainId\":\n return this.network.chainId;\n case \"getBlockNumber\":\n return this.fetch(\"proxy\", { action: \"eth_blockNumber\" });\n case \"getGasPrice\":\n return this.fetch(\"proxy\", { action: \"eth_gasPrice\" });\n case \"getPriorityFee\":\n if (this.network.name === \"mainnet\") {\n return \"1000000000\";\n } else if (this.network.name === \"optimism\") {\n return \"1000000\";\n } else {\n throw new Error(\"fallback onto the AbstractProvider default\");\n }\n case \"getBalance\":\n return this.fetch(\"account\", {\n action: \"balance\",\n address: req.address,\n tag: req.blockTag\n });\n case \"getTransactionCount\":\n return this.fetch(\"proxy\", {\n action: \"eth_getTransactionCount\",\n address: req.address,\n tag: req.blockTag\n });\n case \"getCode\":\n return this.fetch(\"proxy\", {\n action: \"eth_getCode\",\n address: req.address,\n tag: req.blockTag\n });\n case \"getStorage\":\n return this.fetch(\"proxy\", {\n action: \"eth_getStorageAt\",\n address: req.address,\n position: req.position,\n tag: req.blockTag\n });\n case \"broadcastTransaction\":\n return this.fetch(\"proxy\", {\n action: \"eth_sendRawTransaction\",\n hex: req.signedTransaction\n }, true).catch((error) => {\n return this._checkError(req, error, req.signedTransaction);\n });\n case \"getBlock\":\n if (\"blockTag\" in req) {\n return this.fetch(\"proxy\", {\n action: \"eth_getBlockByNumber\",\n tag: req.blockTag,\n boolean: req.includeTransactions ? \"true\" : \"false\"\n });\n }\n (0, index_js_4.assert)(false, \"getBlock by blockHash not supported by Etherscan\", \"UNSUPPORTED_OPERATION\", {\n operation: \"getBlock(blockHash)\"\n });\n case \"getTransaction\":\n return this.fetch(\"proxy\", {\n action: \"eth_getTransactionByHash\",\n txhash: req.hash\n });\n case \"getTransactionReceipt\":\n return this.fetch(\"proxy\", {\n action: \"eth_getTransactionReceipt\",\n txhash: req.hash\n });\n case \"call\": {\n if (req.blockTag !== \"latest\") {\n throw new Error(\"EtherscanProvider does not support blockTag for call\");\n }\n const postData = this._getTransactionPostData(req.transaction);\n postData.module = \"proxy\";\n postData.action = \"eth_call\";\n try {\n return await this.fetch(\"proxy\", postData, true);\n } catch (error) {\n return this._checkError(req, error, req.transaction);\n }\n }\n case \"estimateGas\": {\n const postData = this._getTransactionPostData(req.transaction);\n postData.module = \"proxy\";\n postData.action = \"eth_estimateGas\";\n try {\n return await this.fetch(\"proxy\", postData, true);\n } catch (error) {\n return this._checkError(req, error, req.transaction);\n }\n }\n default:\n break;\n }\n return super._perform(req);\n }\n async getNetwork() {\n return this.network;\n }\n /**\n * Resolves to the current price of ether.\n *\n * This returns ``0`` on any network other than ``mainnet``.\n */\n async getEtherPrice() {\n if (this.network.name !== \"mainnet\") {\n return 0;\n }\n return parseFloat((await this.fetch(\"stats\", { action: \"ethprice\" })).ethusd);\n }\n /**\n * Resolves to a [Contract]] for %%address%%, using the\n * Etherscan API to retreive the Contract ABI.\n */\n async getContract(_address) {\n let address = this._getAddress(_address);\n if (isPromise(address)) {\n address = await address;\n }\n try {\n const resp = await this.fetch(\"contract\", {\n action: \"getabi\",\n address\n });\n const abi2 = JSON.parse(resp);\n return new index_js_2.Contract(address, abi2, this);\n } catch (error) {\n return null;\n }\n }\n isCommunityResource() {\n return this.apiKey == null;\n }\n };\n exports3.EtherscanProvider = EtherscanProvider;\n }\n });\n\n // ../../../node_modules/.pnpm/ethers@6.15.0_bufferutil@4.0.9_utf-8-validate@5.0.10/node_modules/ethers/lib.commonjs/providers/ws-browser.js\n var require_ws_browser = __commonJS({\n \"../../../node_modules/.pnpm/ethers@6.15.0_bufferutil@4.0.9_utf-8-validate@5.0.10/node_modules/ethers/lib.commonjs/providers/ws-browser.js\"(exports3) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n Object.defineProperty(exports3, \"__esModule\", { value: true });\n exports3.WebSocket = void 0;\n function getGlobal() {\n if (typeof self !== \"undefined\") {\n return self;\n }\n if (typeof window !== \"undefined\") {\n return window;\n }\n if (typeof global !== \"undefined\") {\n return global;\n }\n throw new Error(\"unable to locate global object\");\n }\n var _WebSocket = getGlobal().WebSocket;\n exports3.WebSocket = _WebSocket;\n }\n });\n\n // ../../../node_modules/.pnpm/ethers@6.15.0_bufferutil@4.0.9_utf-8-validate@5.0.10/node_modules/ethers/lib.commonjs/providers/provider-socket.js\n var require_provider_socket = __commonJS({\n \"../../../node_modules/.pnpm/ethers@6.15.0_bufferutil@4.0.9_utf-8-validate@5.0.10/node_modules/ethers/lib.commonjs/providers/provider-socket.js\"(exports3) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n Object.defineProperty(exports3, \"__esModule\", { value: true });\n exports3.SocketProvider = exports3.SocketEventSubscriber = exports3.SocketPendingSubscriber = exports3.SocketBlockSubscriber = exports3.SocketSubscriber = void 0;\n var abstract_provider_js_1 = require_abstract_provider();\n var index_js_1 = require_utils8();\n var provider_jsonrpc_js_1 = require_provider_jsonrpc();\n var SocketSubscriber = class {\n #provider;\n #filter;\n /**\n * The filter.\n */\n get filter() {\n return JSON.parse(this.#filter);\n }\n #filterId;\n #paused;\n #emitPromise;\n /**\n * Creates a new **SocketSubscriber** attached to %%provider%% listening\n * to %%filter%%.\n */\n constructor(provider, filter) {\n this.#provider = provider;\n this.#filter = JSON.stringify(filter);\n this.#filterId = null;\n this.#paused = null;\n this.#emitPromise = null;\n }\n start() {\n this.#filterId = this.#provider.send(\"eth_subscribe\", this.filter).then((filterId) => {\n ;\n this.#provider._register(filterId, this);\n return filterId;\n });\n }\n stop() {\n this.#filterId.then((filterId) => {\n if (this.#provider.destroyed) {\n return;\n }\n this.#provider.send(\"eth_unsubscribe\", [filterId]);\n });\n this.#filterId = null;\n }\n // @TODO: pause should trap the current blockNumber, unsub, and on resume use getLogs\n // and resume\n pause(dropWhilePaused) {\n (0, index_js_1.assert)(dropWhilePaused, \"preserve logs while paused not supported by SocketSubscriber yet\", \"UNSUPPORTED_OPERATION\", { operation: \"pause(false)\" });\n this.#paused = !!dropWhilePaused;\n }\n resume() {\n this.#paused = null;\n }\n /**\n * @_ignore:\n */\n _handleMessage(message) {\n if (this.#filterId == null) {\n return;\n }\n if (this.#paused === null) {\n let emitPromise = this.#emitPromise;\n if (emitPromise == null) {\n emitPromise = this._emit(this.#provider, message);\n } else {\n emitPromise = emitPromise.then(async () => {\n await this._emit(this.#provider, message);\n });\n }\n this.#emitPromise = emitPromise.then(() => {\n if (this.#emitPromise === emitPromise) {\n this.#emitPromise = null;\n }\n });\n }\n }\n /**\n * Sub-classes **must** override this to emit the events on the\n * provider.\n */\n async _emit(provider, message) {\n throw new Error(\"sub-classes must implemente this; _emit\");\n }\n };\n exports3.SocketSubscriber = SocketSubscriber;\n var SocketBlockSubscriber = class extends SocketSubscriber {\n /**\n * @_ignore:\n */\n constructor(provider) {\n super(provider, [\"newHeads\"]);\n }\n async _emit(provider, message) {\n provider.emit(\"block\", parseInt(message.number));\n }\n };\n exports3.SocketBlockSubscriber = SocketBlockSubscriber;\n var SocketPendingSubscriber = class extends SocketSubscriber {\n /**\n * @_ignore:\n */\n constructor(provider) {\n super(provider, [\"newPendingTransactions\"]);\n }\n async _emit(provider, message) {\n provider.emit(\"pending\", message);\n }\n };\n exports3.SocketPendingSubscriber = SocketPendingSubscriber;\n var SocketEventSubscriber = class extends SocketSubscriber {\n #logFilter;\n /**\n * The filter.\n */\n get logFilter() {\n return JSON.parse(this.#logFilter);\n }\n /**\n * @_ignore:\n */\n constructor(provider, filter) {\n super(provider, [\"logs\", filter]);\n this.#logFilter = JSON.stringify(filter);\n }\n async _emit(provider, message) {\n provider.emit(this.logFilter, provider._wrapLog(message, provider._network));\n }\n };\n exports3.SocketEventSubscriber = SocketEventSubscriber;\n var SocketProvider = class extends provider_jsonrpc_js_1.JsonRpcApiProvider {\n #callbacks;\n // Maps each filterId to its subscriber\n #subs;\n // If any events come in before a subscriber has finished\n // registering, queue them\n #pending;\n /**\n * Creates a new **SocketProvider** connected to %%network%%.\n *\n * If unspecified, the network will be discovered.\n */\n constructor(network, _options) {\n const options = Object.assign({}, _options != null ? _options : {});\n (0, index_js_1.assertArgument)(options.batchMaxCount == null || options.batchMaxCount === 1, \"sockets-based providers do not support batches\", \"options.batchMaxCount\", _options);\n options.batchMaxCount = 1;\n if (options.staticNetwork == null) {\n options.staticNetwork = true;\n }\n super(network, options);\n this.#callbacks = /* @__PURE__ */ new Map();\n this.#subs = /* @__PURE__ */ new Map();\n this.#pending = /* @__PURE__ */ new Map();\n }\n // This value is only valid after _start has been called\n /*\n get _network(): Network {\n if (this.#network == null) {\n throw new Error(\"this shouldn't happen\");\n }\n return this.#network.clone();\n }\n */\n _getSubscriber(sub) {\n switch (sub.type) {\n case \"close\":\n return new abstract_provider_js_1.UnmanagedSubscriber(\"close\");\n case \"block\":\n return new SocketBlockSubscriber(this);\n case \"pending\":\n return new SocketPendingSubscriber(this);\n case \"event\":\n return new SocketEventSubscriber(this, sub.filter);\n case \"orphan\":\n if (sub.filter.orphan === \"drop-log\") {\n return new abstract_provider_js_1.UnmanagedSubscriber(\"drop-log\");\n }\n }\n return super._getSubscriber(sub);\n }\n /**\n * Register a new subscriber. This is used internalled by Subscribers\n * and generally is unecessary unless extending capabilities.\n */\n _register(filterId, subscriber) {\n this.#subs.set(filterId, subscriber);\n const pending = this.#pending.get(filterId);\n if (pending) {\n for (const message of pending) {\n subscriber._handleMessage(message);\n }\n this.#pending.delete(filterId);\n }\n }\n async _send(payload) {\n (0, index_js_1.assertArgument)(!Array.isArray(payload), \"WebSocket does not support batch send\", \"payload\", payload);\n const promise = new Promise((resolve, reject) => {\n this.#callbacks.set(payload.id, { payload, resolve, reject });\n });\n await this._waitUntilReady();\n await this._write(JSON.stringify(payload));\n return [await promise];\n }\n // Sub-classes must call this once they are connected\n /*\n async _start(): Promise {\n if (this.#ready) { return; }\n \n for (const { payload } of this.#callbacks.values()) {\n await this._write(JSON.stringify(payload));\n }\n \n this.#ready = (async function() {\n await super._start();\n })();\n }\n */\n /**\n * Sub-classes **must** call this with messages received over their\n * transport to be processed and dispatched.\n */\n async _processMessage(message) {\n const result = JSON.parse(message);\n if (result && typeof result === \"object\" && \"id\" in result) {\n const callback = this.#callbacks.get(result.id);\n if (callback == null) {\n this.emit(\"error\", (0, index_js_1.makeError)(\"received result for unknown id\", \"UNKNOWN_ERROR\", {\n reasonCode: \"UNKNOWN_ID\",\n result\n }));\n return;\n }\n this.#callbacks.delete(result.id);\n callback.resolve(result);\n } else if (result && result.method === \"eth_subscription\") {\n const filterId = result.params.subscription;\n const subscriber = this.#subs.get(filterId);\n if (subscriber) {\n subscriber._handleMessage(result.params.result);\n } else {\n let pending = this.#pending.get(filterId);\n if (pending == null) {\n pending = [];\n this.#pending.set(filterId, pending);\n }\n pending.push(result.params.result);\n }\n } else {\n this.emit(\"error\", (0, index_js_1.makeError)(\"received unexpected message\", \"UNKNOWN_ERROR\", {\n reasonCode: \"UNEXPECTED_MESSAGE\",\n result\n }));\n return;\n }\n }\n /**\n * Sub-classes **must** override this to send %%message%% over their\n * transport.\n */\n async _write(message) {\n throw new Error(\"sub-classes must override this\");\n }\n };\n exports3.SocketProvider = SocketProvider;\n }\n });\n\n // ../../../node_modules/.pnpm/ethers@6.15.0_bufferutil@4.0.9_utf-8-validate@5.0.10/node_modules/ethers/lib.commonjs/providers/provider-websocket.js\n var require_provider_websocket = __commonJS({\n \"../../../node_modules/.pnpm/ethers@6.15.0_bufferutil@4.0.9_utf-8-validate@5.0.10/node_modules/ethers/lib.commonjs/providers/provider-websocket.js\"(exports3) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n Object.defineProperty(exports3, \"__esModule\", { value: true });\n exports3.WebSocketProvider = void 0;\n var ws_js_1 = require_ws_browser();\n var provider_socket_js_1 = require_provider_socket();\n var WebSocketProvider = class extends provider_socket_js_1.SocketProvider {\n #connect;\n #websocket;\n get websocket() {\n if (this.#websocket == null) {\n throw new Error(\"websocket closed\");\n }\n return this.#websocket;\n }\n constructor(url, network, options) {\n super(network, options);\n if (typeof url === \"string\") {\n this.#connect = () => {\n return new ws_js_1.WebSocket(url);\n };\n this.#websocket = this.#connect();\n } else if (typeof url === \"function\") {\n this.#connect = url;\n this.#websocket = url();\n } else {\n this.#connect = null;\n this.#websocket = url;\n }\n this.websocket.onopen = async () => {\n try {\n await this._start();\n this.resume();\n } catch (error) {\n console.log(\"failed to start WebsocketProvider\", error);\n }\n };\n this.websocket.onmessage = (message) => {\n this._processMessage(message.data);\n };\n }\n async _write(message) {\n this.websocket.send(message);\n }\n async destroy() {\n if (this.#websocket != null) {\n this.#websocket.close();\n this.#websocket = null;\n }\n super.destroy();\n }\n };\n exports3.WebSocketProvider = WebSocketProvider;\n }\n });\n\n // ../../../node_modules/.pnpm/ethers@6.15.0_bufferutil@4.0.9_utf-8-validate@5.0.10/node_modules/ethers/lib.commonjs/providers/provider-infura.js\n var require_provider_infura = __commonJS({\n \"../../../node_modules/.pnpm/ethers@6.15.0_bufferutil@4.0.9_utf-8-validate@5.0.10/node_modules/ethers/lib.commonjs/providers/provider-infura.js\"(exports3) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n Object.defineProperty(exports3, \"__esModule\", { value: true });\n exports3.InfuraProvider = exports3.InfuraWebSocketProvider = void 0;\n var index_js_1 = require_utils8();\n var community_js_1 = require_community();\n var network_js_1 = require_network();\n var provider_jsonrpc_js_1 = require_provider_jsonrpc();\n var provider_websocket_js_1 = require_provider_websocket();\n var defaultProjectId = \"84842078b09946638c03157f83405213\";\n function getHost(name) {\n switch (name) {\n case \"mainnet\":\n return \"mainnet.infura.io\";\n case \"goerli\":\n return \"goerli.infura.io\";\n case \"sepolia\":\n return \"sepolia.infura.io\";\n case \"arbitrum\":\n return \"arbitrum-mainnet.infura.io\";\n case \"arbitrum-goerli\":\n return \"arbitrum-goerli.infura.io\";\n case \"arbitrum-sepolia\":\n return \"arbitrum-sepolia.infura.io\";\n case \"base\":\n return \"base-mainnet.infura.io\";\n case \"base-goerlia\":\n case \"base-goerli\":\n return \"base-goerli.infura.io\";\n case \"base-sepolia\":\n return \"base-sepolia.infura.io\";\n case \"bnb\":\n return \"bsc-mainnet.infura.io\";\n case \"bnbt\":\n return \"bsc-testnet.infura.io\";\n case \"linea\":\n return \"linea-mainnet.infura.io\";\n case \"linea-goerli\":\n return \"linea-goerli.infura.io\";\n case \"linea-sepolia\":\n return \"linea-sepolia.infura.io\";\n case \"matic\":\n return \"polygon-mainnet.infura.io\";\n case \"matic-amoy\":\n return \"polygon-amoy.infura.io\";\n case \"matic-mumbai\":\n return \"polygon-mumbai.infura.io\";\n case \"optimism\":\n return \"optimism-mainnet.infura.io\";\n case \"optimism-goerli\":\n return \"optimism-goerli.infura.io\";\n case \"optimism-sepolia\":\n return \"optimism-sepolia.infura.io\";\n }\n (0, index_js_1.assertArgument)(false, \"unsupported network\", \"network\", name);\n }\n var InfuraWebSocketProvider = class extends provider_websocket_js_1.WebSocketProvider {\n /**\n * The Project ID for the INFURA connection.\n */\n projectId;\n /**\n * The Project Secret.\n *\n * If null, no authenticated requests are made. This should not\n * be used outside of private contexts.\n */\n projectSecret;\n /**\n * Creates a new **InfuraWebSocketProvider**.\n */\n constructor(network, projectId) {\n const provider = new InfuraProvider(network, projectId);\n const req = provider._getConnection();\n (0, index_js_1.assert)(!req.credentials, \"INFURA WebSocket project secrets unsupported\", \"UNSUPPORTED_OPERATION\", { operation: \"InfuraProvider.getWebSocketProvider()\" });\n const url = req.url.replace(/^http/i, \"ws\").replace(\"/v3/\", \"/ws/v3/\");\n super(url, provider._network);\n (0, index_js_1.defineProperties)(this, {\n projectId: provider.projectId,\n projectSecret: provider.projectSecret\n });\n }\n isCommunityResource() {\n return this.projectId === defaultProjectId;\n }\n };\n exports3.InfuraWebSocketProvider = InfuraWebSocketProvider;\n var InfuraProvider = class _InfuraProvider extends provider_jsonrpc_js_1.JsonRpcProvider {\n /**\n * The Project ID for the INFURA connection.\n */\n projectId;\n /**\n * The Project Secret.\n *\n * If null, no authenticated requests are made. This should not\n * be used outside of private contexts.\n */\n projectSecret;\n /**\n * Creates a new **InfuraProvider**.\n */\n constructor(_network, projectId, projectSecret) {\n if (_network == null) {\n _network = \"mainnet\";\n }\n const network = network_js_1.Network.from(_network);\n if (projectId == null) {\n projectId = defaultProjectId;\n }\n if (projectSecret == null) {\n projectSecret = null;\n }\n const request = _InfuraProvider.getRequest(network, projectId, projectSecret);\n super(request, network, { staticNetwork: network });\n (0, index_js_1.defineProperties)(this, { projectId, projectSecret });\n }\n _getProvider(chainId) {\n try {\n return new _InfuraProvider(chainId, this.projectId, this.projectSecret);\n } catch (error) {\n }\n return super._getProvider(chainId);\n }\n isCommunityResource() {\n return this.projectId === defaultProjectId;\n }\n /**\n * Creates a new **InfuraWebSocketProvider**.\n */\n static getWebSocketProvider(network, projectId) {\n return new InfuraWebSocketProvider(network, projectId);\n }\n /**\n * Returns a prepared request for connecting to %%network%%\n * with %%projectId%% and %%projectSecret%%.\n */\n static getRequest(network, projectId, projectSecret) {\n if (projectId == null) {\n projectId = defaultProjectId;\n }\n if (projectSecret == null) {\n projectSecret = null;\n }\n const request = new index_js_1.FetchRequest(`https://${getHost(network.name)}/v3/${projectId}`);\n request.allowGzip = true;\n if (projectSecret) {\n request.setCredentials(\"\", projectSecret);\n }\n if (projectId === defaultProjectId) {\n request.retryFunc = async (request2, response, attempt) => {\n (0, community_js_1.showThrottleMessage)(\"InfuraProvider\");\n return true;\n };\n }\n return request;\n }\n };\n exports3.InfuraProvider = InfuraProvider;\n }\n });\n\n // ../../../node_modules/.pnpm/ethers@6.15.0_bufferutil@4.0.9_utf-8-validate@5.0.10/node_modules/ethers/lib.commonjs/providers/provider-quicknode.js\n var require_provider_quicknode = __commonJS({\n \"../../../node_modules/.pnpm/ethers@6.15.0_bufferutil@4.0.9_utf-8-validate@5.0.10/node_modules/ethers/lib.commonjs/providers/provider-quicknode.js\"(exports3) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n Object.defineProperty(exports3, \"__esModule\", { value: true });\n exports3.QuickNodeProvider = void 0;\n var index_js_1 = require_utils8();\n var community_js_1 = require_community();\n var network_js_1 = require_network();\n var provider_jsonrpc_js_1 = require_provider_jsonrpc();\n var defaultToken = \"919b412a057b5e9c9b6dce193c5a60242d6efadb\";\n function getHost(name) {\n switch (name) {\n case \"mainnet\":\n return \"ethers.quiknode.pro\";\n case \"goerli\":\n return \"ethers.ethereum-goerli.quiknode.pro\";\n case \"sepolia\":\n return \"ethers.ethereum-sepolia.quiknode.pro\";\n case \"holesky\":\n return \"ethers.ethereum-holesky.quiknode.pro\";\n case \"arbitrum\":\n return \"ethers.arbitrum-mainnet.quiknode.pro\";\n case \"arbitrum-goerli\":\n return \"ethers.arbitrum-goerli.quiknode.pro\";\n case \"arbitrum-sepolia\":\n return \"ethers.arbitrum-sepolia.quiknode.pro\";\n case \"base\":\n return \"ethers.base-mainnet.quiknode.pro\";\n case \"base-goerli\":\n return \"ethers.base-goerli.quiknode.pro\";\n case \"base-spolia\":\n return \"ethers.base-sepolia.quiknode.pro\";\n case \"bnb\":\n return \"ethers.bsc.quiknode.pro\";\n case \"bnbt\":\n return \"ethers.bsc-testnet.quiknode.pro\";\n case \"matic\":\n return \"ethers.matic.quiknode.pro\";\n case \"matic-mumbai\":\n return \"ethers.matic-testnet.quiknode.pro\";\n case \"optimism\":\n return \"ethers.optimism.quiknode.pro\";\n case \"optimism-goerli\":\n return \"ethers.optimism-goerli.quiknode.pro\";\n case \"optimism-sepolia\":\n return \"ethers.optimism-sepolia.quiknode.pro\";\n case \"xdai\":\n return \"ethers.xdai.quiknode.pro\";\n }\n (0, index_js_1.assertArgument)(false, \"unsupported network\", \"network\", name);\n }\n var QuickNodeProvider = class _QuickNodeProvider extends provider_jsonrpc_js_1.JsonRpcProvider {\n /**\n * The API token.\n */\n token;\n /**\n * Creates a new **QuickNodeProvider**.\n */\n constructor(_network, token) {\n if (_network == null) {\n _network = \"mainnet\";\n }\n const network = network_js_1.Network.from(_network);\n if (token == null) {\n token = defaultToken;\n }\n const request = _QuickNodeProvider.getRequest(network, token);\n super(request, network, { staticNetwork: network });\n (0, index_js_1.defineProperties)(this, { token });\n }\n _getProvider(chainId) {\n try {\n return new _QuickNodeProvider(chainId, this.token);\n } catch (error) {\n }\n return super._getProvider(chainId);\n }\n isCommunityResource() {\n return this.token === defaultToken;\n }\n /**\n * Returns a new request prepared for %%network%% and the\n * %%token%%.\n */\n static getRequest(network, token) {\n if (token == null) {\n token = defaultToken;\n }\n const request = new index_js_1.FetchRequest(`https://${getHost(network.name)}/${token}`);\n request.allowGzip = true;\n if (token === defaultToken) {\n request.retryFunc = async (request2, response, attempt) => {\n (0, community_js_1.showThrottleMessage)(\"QuickNodeProvider\");\n return true;\n };\n }\n return request;\n }\n };\n exports3.QuickNodeProvider = QuickNodeProvider;\n }\n });\n\n // ../../../node_modules/.pnpm/ethers@6.15.0_bufferutil@4.0.9_utf-8-validate@5.0.10/node_modules/ethers/lib.commonjs/providers/provider-fallback.js\n var require_provider_fallback = __commonJS({\n \"../../../node_modules/.pnpm/ethers@6.15.0_bufferutil@4.0.9_utf-8-validate@5.0.10/node_modules/ethers/lib.commonjs/providers/provider-fallback.js\"(exports3) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n Object.defineProperty(exports3, \"__esModule\", { value: true });\n exports3.FallbackProvider = void 0;\n var index_js_1 = require_utils8();\n var abstract_provider_js_1 = require_abstract_provider();\n var network_js_1 = require_network();\n var BN_1 = BigInt(\"1\");\n var BN_2 = BigInt(\"2\");\n function shuffle(array2) {\n for (let i3 = array2.length - 1; i3 > 0; i3--) {\n const j2 = Math.floor(Math.random() * (i3 + 1));\n const tmp = array2[i3];\n array2[i3] = array2[j2];\n array2[j2] = tmp;\n }\n }\n function stall(duration) {\n return new Promise((resolve) => {\n setTimeout(resolve, duration);\n });\n }\n function getTime() {\n return (/* @__PURE__ */ new Date()).getTime();\n }\n function stringify3(value) {\n return JSON.stringify(value, (key, value2) => {\n if (typeof value2 === \"bigint\") {\n return { type: \"bigint\", value: value2.toString() };\n }\n return value2;\n });\n }\n var defaultConfig = { stallTimeout: 400, priority: 1, weight: 1 };\n var defaultState = {\n blockNumber: -2,\n requests: 0,\n lateResponses: 0,\n errorResponses: 0,\n outOfSync: -1,\n unsupportedEvents: 0,\n rollingDuration: 0,\n score: 0,\n _network: null,\n _updateNumber: null,\n _totalTime: 0,\n _lastFatalError: null,\n _lastFatalErrorTimestamp: 0\n };\n async function waitForSync(config2, blockNumber) {\n while (config2.blockNumber < 0 || config2.blockNumber < blockNumber) {\n if (!config2._updateNumber) {\n config2._updateNumber = (async () => {\n try {\n const blockNumber2 = await config2.provider.getBlockNumber();\n if (blockNumber2 > config2.blockNumber) {\n config2.blockNumber = blockNumber2;\n }\n } catch (error) {\n config2.blockNumber = -2;\n config2._lastFatalError = error;\n config2._lastFatalErrorTimestamp = getTime();\n }\n config2._updateNumber = null;\n })();\n }\n await config2._updateNumber;\n config2.outOfSync++;\n if (config2._lastFatalError) {\n break;\n }\n }\n }\n function _normalize(value) {\n if (value == null) {\n return \"null\";\n }\n if (Array.isArray(value)) {\n return \"[\" + value.map(_normalize).join(\",\") + \"]\";\n }\n if (typeof value === \"object\" && typeof value.toJSON === \"function\") {\n return _normalize(value.toJSON());\n }\n switch (typeof value) {\n case \"boolean\":\n case \"symbol\":\n return value.toString();\n case \"bigint\":\n case \"number\":\n return BigInt(value).toString();\n case \"string\":\n return JSON.stringify(value);\n case \"object\": {\n const keys = Object.keys(value);\n keys.sort();\n return \"{\" + keys.map((k4) => `${JSON.stringify(k4)}:${_normalize(value[k4])}`).join(\",\") + \"}\";\n }\n }\n console.log(\"Could not serialize\", value);\n throw new Error(\"Hmm...\");\n }\n function normalizeResult(method, value) {\n if (\"error\" in value) {\n const error = value.error;\n let tag;\n if ((0, index_js_1.isError)(error, \"CALL_EXCEPTION\")) {\n tag = _normalize(Object.assign({}, error, {\n shortMessage: void 0,\n reason: void 0,\n info: void 0\n }));\n } else {\n tag = _normalize(error);\n }\n return { tag, value: error };\n }\n const result = value.result;\n return { tag: _normalize(result), value: result };\n }\n function checkQuorum(quorum, results) {\n const tally = /* @__PURE__ */ new Map();\n for (const { value, tag, weight } of results) {\n const t3 = tally.get(tag) || { value, weight: 0 };\n t3.weight += weight;\n tally.set(tag, t3);\n }\n let best = null;\n for (const r2 of tally.values()) {\n if (r2.weight >= quorum && (!best || r2.weight > best.weight)) {\n best = r2;\n }\n }\n if (best) {\n return best.value;\n }\n return void 0;\n }\n function getMedian(quorum, results) {\n let resultWeight = 0;\n const errorMap2 = /* @__PURE__ */ new Map();\n let bestError = null;\n const values = [];\n for (const { value, tag, weight } of results) {\n if (value instanceof Error) {\n const e3 = errorMap2.get(tag) || { value, weight: 0 };\n e3.weight += weight;\n errorMap2.set(tag, e3);\n if (bestError == null || e3.weight > bestError.weight) {\n bestError = e3;\n }\n } else {\n values.push(BigInt(value));\n resultWeight += weight;\n }\n }\n if (resultWeight < quorum) {\n if (bestError && bestError.weight >= quorum) {\n return bestError.value;\n }\n return void 0;\n }\n values.sort((a3, b4) => a3 < b4 ? -1 : b4 > a3 ? 1 : 0);\n const mid = Math.floor(values.length / 2);\n if (values.length % 2) {\n return values[mid];\n }\n return (values[mid - 1] + values[mid] + BN_1) / BN_2;\n }\n function getAnyResult(quorum, results) {\n const result = checkQuorum(quorum, results);\n if (result !== void 0) {\n return result;\n }\n for (const r2 of results) {\n if (r2.value) {\n return r2.value;\n }\n }\n return void 0;\n }\n function getFuzzyMode(quorum, results) {\n if (quorum === 1) {\n return (0, index_js_1.getNumber)(getMedian(quorum, results), \"%internal\");\n }\n const tally = /* @__PURE__ */ new Map();\n const add2 = (result, weight) => {\n const t3 = tally.get(result) || { result, weight: 0 };\n t3.weight += weight;\n tally.set(result, t3);\n };\n for (const { weight, value } of results) {\n const r2 = (0, index_js_1.getNumber)(value);\n add2(r2 - 1, weight);\n add2(r2, weight);\n add2(r2 + 1, weight);\n }\n let bestWeight = 0;\n let bestResult = void 0;\n for (const { weight, result } of tally.values()) {\n if (weight >= quorum && (weight > bestWeight || bestResult != null && weight === bestWeight && result > bestResult)) {\n bestWeight = weight;\n bestResult = result;\n }\n }\n return bestResult;\n }\n var FallbackProvider = class extends abstract_provider_js_1.AbstractProvider {\n /**\n * The number of backends that must agree on a value before it is\n * accpeted.\n */\n quorum;\n /**\n * @_ignore:\n */\n eventQuorum;\n /**\n * @_ignore:\n */\n eventWorkers;\n #configs;\n #height;\n #initialSyncPromise;\n /**\n * Creates a new **FallbackProvider** with %%providers%% connected to\n * %%network%%.\n *\n * If a [[Provider]] is included in %%providers%%, defaults are used\n * for the configuration.\n */\n constructor(providers, network, options) {\n super(network, options);\n this.#configs = providers.map((p4) => {\n if (p4 instanceof abstract_provider_js_1.AbstractProvider) {\n return Object.assign({ provider: p4 }, defaultConfig, defaultState);\n } else {\n return Object.assign({}, defaultConfig, p4, defaultState);\n }\n });\n this.#height = -2;\n this.#initialSyncPromise = null;\n if (options && options.quorum != null) {\n this.quorum = options.quorum;\n } else {\n this.quorum = Math.ceil(this.#configs.reduce((accum, config2) => {\n accum += config2.weight;\n return accum;\n }, 0) / 2);\n }\n this.eventQuorum = 1;\n this.eventWorkers = 1;\n (0, index_js_1.assertArgument)(this.quorum <= this.#configs.reduce((a3, c4) => a3 + c4.weight, 0), \"quorum exceed provider weight\", \"quorum\", this.quorum);\n }\n get providerConfigs() {\n return this.#configs.map((c4) => {\n const result = Object.assign({}, c4);\n for (const key in result) {\n if (key[0] === \"_\") {\n delete result[key];\n }\n }\n return result;\n });\n }\n async _detectNetwork() {\n return network_js_1.Network.from((0, index_js_1.getBigInt)(await this._perform({ method: \"chainId\" })));\n }\n // @TODO: Add support to select providers to be the event subscriber\n //_getSubscriber(sub: Subscription): Subscriber {\n // throw new Error(\"@TODO\");\n //}\n /**\n * Transforms a %%req%% into the correct method call on %%provider%%.\n */\n async _translatePerform(provider, req) {\n switch (req.method) {\n case \"broadcastTransaction\":\n return await provider.broadcastTransaction(req.signedTransaction);\n case \"call\":\n return await provider.call(Object.assign({}, req.transaction, { blockTag: req.blockTag }));\n case \"chainId\":\n return (await provider.getNetwork()).chainId;\n case \"estimateGas\":\n return await provider.estimateGas(req.transaction);\n case \"getBalance\":\n return await provider.getBalance(req.address, req.blockTag);\n case \"getBlock\": {\n const block = \"blockHash\" in req ? req.blockHash : req.blockTag;\n return await provider.getBlock(block, req.includeTransactions);\n }\n case \"getBlockNumber\":\n return await provider.getBlockNumber();\n case \"getCode\":\n return await provider.getCode(req.address, req.blockTag);\n case \"getGasPrice\":\n return (await provider.getFeeData()).gasPrice;\n case \"getPriorityFee\":\n return (await provider.getFeeData()).maxPriorityFeePerGas;\n case \"getLogs\":\n return await provider.getLogs(req.filter);\n case \"getStorage\":\n return await provider.getStorage(req.address, req.position, req.blockTag);\n case \"getTransaction\":\n return await provider.getTransaction(req.hash);\n case \"getTransactionCount\":\n return await provider.getTransactionCount(req.address, req.blockTag);\n case \"getTransactionReceipt\":\n return await provider.getTransactionReceipt(req.hash);\n case \"getTransactionResult\":\n return await provider.getTransactionResult(req.hash);\n }\n }\n // Grab the next (random) config that is not already part of\n // the running set\n #getNextConfig(running) {\n const configs = Array.from(running).map((r2) => r2.config);\n const allConfigs = this.#configs.slice();\n shuffle(allConfigs);\n allConfigs.sort((a3, b4) => a3.priority - b4.priority);\n for (const config2 of allConfigs) {\n if (config2._lastFatalError) {\n continue;\n }\n if (configs.indexOf(config2) === -1) {\n return config2;\n }\n }\n return null;\n }\n // Adds a new runner (if available) to running.\n #addRunner(running, req) {\n const config2 = this.#getNextConfig(running);\n if (config2 == null) {\n return null;\n }\n const runner = {\n config: config2,\n result: null,\n didBump: false,\n perform: null,\n staller: null\n };\n const now = getTime();\n runner.perform = (async () => {\n try {\n config2.requests++;\n const result = await this._translatePerform(config2.provider, req);\n runner.result = { result };\n } catch (error) {\n config2.errorResponses++;\n runner.result = { error };\n }\n const dt = getTime() - now;\n config2._totalTime += dt;\n config2.rollingDuration = 0.95 * config2.rollingDuration + 0.05 * dt;\n runner.perform = null;\n })();\n runner.staller = (async () => {\n await stall(config2.stallTimeout);\n runner.staller = null;\n })();\n running.add(runner);\n return runner;\n }\n // Initializes the blockNumber and network for each runner and\n // blocks until initialized\n async #initialSync() {\n let initialSync = this.#initialSyncPromise;\n if (!initialSync) {\n const promises = [];\n this.#configs.forEach((config2) => {\n promises.push((async () => {\n await waitForSync(config2, 0);\n if (!config2._lastFatalError) {\n config2._network = await config2.provider.getNetwork();\n }\n })());\n });\n this.#initialSyncPromise = initialSync = (async () => {\n await Promise.all(promises);\n let chainId = null;\n for (const config2 of this.#configs) {\n if (config2._lastFatalError) {\n continue;\n }\n const network = config2._network;\n if (chainId == null) {\n chainId = network.chainId;\n } else if (network.chainId !== chainId) {\n (0, index_js_1.assert)(false, \"cannot mix providers on different networks\", \"UNSUPPORTED_OPERATION\", {\n operation: \"new FallbackProvider\"\n });\n }\n }\n })();\n }\n await initialSync;\n }\n async #checkQuorum(running, req) {\n const results = [];\n for (const runner of running) {\n if (runner.result != null) {\n const { tag, value } = normalizeResult(req.method, runner.result);\n results.push({ tag, value, weight: runner.config.weight });\n }\n }\n if (results.reduce((a3, r2) => a3 + r2.weight, 0) < this.quorum) {\n return void 0;\n }\n switch (req.method) {\n case \"getBlockNumber\": {\n if (this.#height === -2) {\n this.#height = Math.ceil((0, index_js_1.getNumber)(getMedian(this.quorum, this.#configs.filter((c4) => !c4._lastFatalError).map((c4) => ({\n value: c4.blockNumber,\n tag: (0, index_js_1.getNumber)(c4.blockNumber).toString(),\n weight: c4.weight\n })))));\n }\n const mode = getFuzzyMode(this.quorum, results);\n if (mode === void 0) {\n return void 0;\n }\n if (mode > this.#height) {\n this.#height = mode;\n }\n return this.#height;\n }\n case \"getGasPrice\":\n case \"getPriorityFee\":\n case \"estimateGas\":\n return getMedian(this.quorum, results);\n case \"getBlock\":\n if (\"blockTag\" in req && req.blockTag === \"pending\") {\n return getAnyResult(this.quorum, results);\n }\n return checkQuorum(this.quorum, results);\n case \"call\":\n case \"chainId\":\n case \"getBalance\":\n case \"getTransactionCount\":\n case \"getCode\":\n case \"getStorage\":\n case \"getTransaction\":\n case \"getTransactionReceipt\":\n case \"getLogs\":\n return checkQuorum(this.quorum, results);\n case \"broadcastTransaction\":\n return getAnyResult(this.quorum, results);\n }\n (0, index_js_1.assert)(false, \"unsupported method\", \"UNSUPPORTED_OPERATION\", {\n operation: `_perform(${stringify3(req.method)})`\n });\n }\n async #waitForQuorum(running, req) {\n if (running.size === 0) {\n throw new Error(\"no runners?!\");\n }\n const interesting = [];\n let newRunners = 0;\n for (const runner of running) {\n if (runner.perform) {\n interesting.push(runner.perform);\n }\n if (runner.staller) {\n interesting.push(runner.staller);\n continue;\n }\n if (runner.didBump) {\n continue;\n }\n runner.didBump = true;\n newRunners++;\n }\n const value = await this.#checkQuorum(running, req);\n if (value !== void 0) {\n if (value instanceof Error) {\n throw value;\n }\n return value;\n }\n for (let i3 = 0; i3 < newRunners; i3++) {\n this.#addRunner(running, req);\n }\n (0, index_js_1.assert)(interesting.length > 0, \"quorum not met\", \"SERVER_ERROR\", {\n request: \"%sub-requests\",\n info: { request: req, results: Array.from(running).map((r2) => stringify3(r2.result)) }\n });\n await Promise.race(interesting);\n return await this.#waitForQuorum(running, req);\n }\n async _perform(req) {\n if (req.method === \"broadcastTransaction\") {\n const results = this.#configs.map((c4) => null);\n const broadcasts = this.#configs.map(async ({ provider, weight }, index2) => {\n try {\n const result3 = await provider._perform(req);\n results[index2] = Object.assign(normalizeResult(req.method, { result: result3 }), { weight });\n } catch (error) {\n results[index2] = Object.assign(normalizeResult(req.method, { error }), { weight });\n }\n });\n while (true) {\n const done = results.filter((r2) => r2 != null);\n for (const { value } of done) {\n if (!(value instanceof Error)) {\n return value;\n }\n }\n const result3 = checkQuorum(this.quorum, results.filter((r2) => r2 != null));\n if ((0, index_js_1.isError)(result3, \"INSUFFICIENT_FUNDS\")) {\n throw result3;\n }\n const waiting = broadcasts.filter((b4, i3) => results[i3] == null);\n if (waiting.length === 0) {\n break;\n }\n await Promise.race(waiting);\n }\n const result2 = getAnyResult(this.quorum, results);\n (0, index_js_1.assert)(result2 !== void 0, \"problem multi-broadcasting\", \"SERVER_ERROR\", {\n request: \"%sub-requests\",\n info: { request: req, results: results.map(stringify3) }\n });\n if (result2 instanceof Error) {\n throw result2;\n }\n return result2;\n }\n await this.#initialSync();\n const running = /* @__PURE__ */ new Set();\n let inflightQuorum = 0;\n while (true) {\n const runner = this.#addRunner(running, req);\n if (runner == null) {\n break;\n }\n inflightQuorum += runner.config.weight;\n if (inflightQuorum >= this.quorum) {\n break;\n }\n }\n const result = await this.#waitForQuorum(running, req);\n for (const runner of running) {\n if (runner.perform && runner.result == null) {\n runner.config.lateResponses++;\n }\n }\n return result;\n }\n async destroy() {\n for (const { provider } of this.#configs) {\n provider.destroy();\n }\n super.destroy();\n }\n };\n exports3.FallbackProvider = FallbackProvider;\n }\n });\n\n // ../../../node_modules/.pnpm/ethers@6.15.0_bufferutil@4.0.9_utf-8-validate@5.0.10/node_modules/ethers/lib.commonjs/providers/default-provider.js\n var require_default_provider = __commonJS({\n \"../../../node_modules/.pnpm/ethers@6.15.0_bufferutil@4.0.9_utf-8-validate@5.0.10/node_modules/ethers/lib.commonjs/providers/default-provider.js\"(exports3) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n Object.defineProperty(exports3, \"__esModule\", { value: true });\n exports3.getDefaultProvider = void 0;\n var index_js_1 = require_utils8();\n var provider_ankr_js_1 = require_provider_ankr();\n var provider_alchemy_js_1 = require_provider_alchemy();\n var provider_chainstack_js_1 = require_provider_chainstack();\n var provider_cloudflare_js_1 = require_provider_cloudflare();\n var provider_etherscan_js_1 = require_provider_etherscan();\n var provider_infura_js_1 = require_provider_infura();\n var provider_quicknode_js_1 = require_provider_quicknode();\n var provider_fallback_js_1 = require_provider_fallback();\n var provider_jsonrpc_js_1 = require_provider_jsonrpc();\n var network_js_1 = require_network();\n var provider_websocket_js_1 = require_provider_websocket();\n function isWebSocketLike(value) {\n return value && typeof value.send === \"function\" && typeof value.close === \"function\";\n }\n var Testnets = \"goerli kovan sepolia classicKotti optimism-goerli arbitrum-goerli matic-mumbai bnbt\".split(\" \");\n function getDefaultProvider(network, options) {\n if (options == null) {\n options = {};\n }\n const allowService = (name) => {\n if (options[name] === \"-\") {\n return false;\n }\n if (typeof options.exclusive === \"string\") {\n return name === options.exclusive;\n }\n if (Array.isArray(options.exclusive)) {\n return options.exclusive.indexOf(name) !== -1;\n }\n return true;\n };\n if (typeof network === \"string\" && network.match(/^https?:/)) {\n return new provider_jsonrpc_js_1.JsonRpcProvider(network);\n }\n if (typeof network === \"string\" && network.match(/^wss?:/) || isWebSocketLike(network)) {\n return new provider_websocket_js_1.WebSocketProvider(network);\n }\n let staticNetwork = null;\n try {\n staticNetwork = network_js_1.Network.from(network);\n } catch (error) {\n }\n const providers = [];\n if (allowService(\"publicPolygon\") && staticNetwork) {\n if (staticNetwork.name === \"matic\") {\n providers.push(new provider_jsonrpc_js_1.JsonRpcProvider(\"https://polygon-rpc.com/\", staticNetwork, { staticNetwork }));\n } else if (staticNetwork.name === \"matic-amoy\") {\n providers.push(new provider_jsonrpc_js_1.JsonRpcProvider(\"https://rpc-amoy.polygon.technology/\", staticNetwork, { staticNetwork }));\n }\n }\n if (allowService(\"alchemy\")) {\n try {\n providers.push(new provider_alchemy_js_1.AlchemyProvider(network, options.alchemy));\n } catch (error) {\n }\n }\n if (allowService(\"ankr\") && options.ankr != null) {\n try {\n providers.push(new provider_ankr_js_1.AnkrProvider(network, options.ankr));\n } catch (error) {\n }\n }\n if (allowService(\"chainstack\")) {\n try {\n providers.push(new provider_chainstack_js_1.ChainstackProvider(network, options.chainstack));\n } catch (error) {\n }\n }\n if (allowService(\"cloudflare\")) {\n try {\n providers.push(new provider_cloudflare_js_1.CloudflareProvider(network));\n } catch (error) {\n }\n }\n if (allowService(\"etherscan\")) {\n try {\n providers.push(new provider_etherscan_js_1.EtherscanProvider(network, options.etherscan));\n } catch (error) {\n }\n }\n if (allowService(\"infura\")) {\n try {\n let projectId = options.infura;\n let projectSecret = void 0;\n if (typeof projectId === \"object\") {\n projectSecret = projectId.projectSecret;\n projectId = projectId.projectId;\n }\n providers.push(new provider_infura_js_1.InfuraProvider(network, projectId, projectSecret));\n } catch (error) {\n }\n }\n if (allowService(\"quicknode\")) {\n try {\n let token = options.quicknode;\n providers.push(new provider_quicknode_js_1.QuickNodeProvider(network, token));\n } catch (error) {\n }\n }\n (0, index_js_1.assert)(providers.length, \"unsupported default network\", \"UNSUPPORTED_OPERATION\", {\n operation: \"getDefaultProvider\"\n });\n if (providers.length === 1) {\n return providers[0];\n }\n let quorum = Math.floor(providers.length / 2);\n if (quorum > 2) {\n quorum = 2;\n }\n if (staticNetwork && Testnets.indexOf(staticNetwork.name) !== -1) {\n quorum = 1;\n }\n if (options && options.quorum) {\n quorum = options.quorum;\n }\n return new provider_fallback_js_1.FallbackProvider(providers, void 0, { quorum });\n }\n exports3.getDefaultProvider = getDefaultProvider;\n }\n });\n\n // ../../../node_modules/.pnpm/ethers@6.15.0_bufferutil@4.0.9_utf-8-validate@5.0.10/node_modules/ethers/lib.commonjs/providers/signer-noncemanager.js\n var require_signer_noncemanager = __commonJS({\n \"../../../node_modules/.pnpm/ethers@6.15.0_bufferutil@4.0.9_utf-8-validate@5.0.10/node_modules/ethers/lib.commonjs/providers/signer-noncemanager.js\"(exports3) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n Object.defineProperty(exports3, \"__esModule\", { value: true });\n exports3.NonceManager = void 0;\n var index_js_1 = require_utils8();\n var abstract_signer_js_1 = require_abstract_signer();\n var NonceManager = class _NonceManager extends abstract_signer_js_1.AbstractSigner {\n /**\n * The Signer being managed.\n */\n signer;\n #noncePromise;\n #delta;\n /**\n * Creates a new **NonceManager** to manage %%signer%%.\n */\n constructor(signer) {\n super(signer.provider);\n (0, index_js_1.defineProperties)(this, { signer });\n this.#noncePromise = null;\n this.#delta = 0;\n }\n async getAddress() {\n return this.signer.getAddress();\n }\n connect(provider) {\n return new _NonceManager(this.signer.connect(provider));\n }\n async getNonce(blockTag) {\n if (blockTag === \"pending\") {\n if (this.#noncePromise == null) {\n this.#noncePromise = super.getNonce(\"pending\");\n }\n const delta = this.#delta;\n return await this.#noncePromise + delta;\n }\n return super.getNonce(blockTag);\n }\n /**\n * Manually increment the nonce. This may be useful when managng\n * offline transactions.\n */\n increment() {\n this.#delta++;\n }\n /**\n * Resets the nonce, causing the **NonceManager** to reload the current\n * nonce from the blockchain on the next transaction.\n */\n reset() {\n this.#delta = 0;\n this.#noncePromise = null;\n }\n async sendTransaction(tx) {\n const noncePromise = this.getNonce(\"pending\");\n this.increment();\n tx = await this.signer.populateTransaction(tx);\n tx.nonce = await noncePromise;\n return await this.signer.sendTransaction(tx);\n }\n signTransaction(tx) {\n return this.signer.signTransaction(tx);\n }\n signMessage(message) {\n return this.signer.signMessage(message);\n }\n signTypedData(domain2, types, value) {\n return this.signer.signTypedData(domain2, types, value);\n }\n };\n exports3.NonceManager = NonceManager;\n }\n });\n\n // ../../../node_modules/.pnpm/ethers@6.15.0_bufferutil@4.0.9_utf-8-validate@5.0.10/node_modules/ethers/lib.commonjs/providers/provider-browser.js\n var require_provider_browser = __commonJS({\n \"../../../node_modules/.pnpm/ethers@6.15.0_bufferutil@4.0.9_utf-8-validate@5.0.10/node_modules/ethers/lib.commonjs/providers/provider-browser.js\"(exports3) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n Object.defineProperty(exports3, \"__esModule\", { value: true });\n exports3.BrowserProvider = void 0;\n var index_js_1 = require_utils8();\n var provider_jsonrpc_js_1 = require_provider_jsonrpc();\n var BrowserProvider = class _BrowserProvider extends provider_jsonrpc_js_1.JsonRpcApiPollingProvider {\n #request;\n #providerInfo;\n /**\n * Connect to the %%ethereum%% provider, optionally forcing the\n * %%network%%.\n */\n constructor(ethereum, network, _options) {\n const options = Object.assign({}, _options != null ? _options : {}, { batchMaxCount: 1 });\n (0, index_js_1.assertArgument)(ethereum && ethereum.request, \"invalid EIP-1193 provider\", \"ethereum\", ethereum);\n super(network, options);\n this.#providerInfo = null;\n if (_options && _options.providerInfo) {\n this.#providerInfo = _options.providerInfo;\n }\n this.#request = async (method, params) => {\n const payload = { method, params };\n this.emit(\"debug\", { action: \"sendEip1193Request\", payload });\n try {\n const result = await ethereum.request(payload);\n this.emit(\"debug\", { action: \"receiveEip1193Result\", result });\n return result;\n } catch (e3) {\n const error = new Error(e3.message);\n error.code = e3.code;\n error.data = e3.data;\n error.payload = payload;\n this.emit(\"debug\", { action: \"receiveEip1193Error\", error });\n throw error;\n }\n };\n }\n get providerInfo() {\n return this.#providerInfo;\n }\n async send(method, params) {\n await this._start();\n return await super.send(method, params);\n }\n async _send(payload) {\n (0, index_js_1.assertArgument)(!Array.isArray(payload), \"EIP-1193 does not support batch request\", \"payload\", payload);\n try {\n const result = await this.#request(payload.method, payload.params || []);\n return [{ id: payload.id, result }];\n } catch (e3) {\n return [{\n id: payload.id,\n error: { code: e3.code, data: e3.data, message: e3.message }\n }];\n }\n }\n getRpcError(payload, error) {\n error = JSON.parse(JSON.stringify(error));\n switch (error.error.code || -1) {\n case 4001:\n error.error.message = `ethers-user-denied: ${error.error.message}`;\n break;\n case 4200:\n error.error.message = `ethers-unsupported: ${error.error.message}`;\n break;\n }\n return super.getRpcError(payload, error);\n }\n /**\n * Resolves to ``true`` if the provider manages the %%address%%.\n */\n async hasSigner(address) {\n if (address == null) {\n address = 0;\n }\n const accounts = await this.send(\"eth_accounts\", []);\n if (typeof address === \"number\") {\n return accounts.length > address;\n }\n address = address.toLowerCase();\n return accounts.filter((a3) => a3.toLowerCase() === address).length !== 0;\n }\n async getSigner(address) {\n if (address == null) {\n address = 0;\n }\n if (!await this.hasSigner(address)) {\n try {\n await this.#request(\"eth_requestAccounts\", []);\n } catch (error) {\n const payload = error.payload;\n throw this.getRpcError(payload, { id: payload.id, error });\n }\n }\n return await super.getSigner(address);\n }\n /**\n * Discover and connect to a Provider in the Browser using the\n * [[link-eip-6963]] discovery mechanism. If no providers are\n * present, ``null`` is resolved.\n */\n static async discover(options) {\n if (options == null) {\n options = {};\n }\n if (options.provider) {\n return new _BrowserProvider(options.provider);\n }\n const context2 = options.window ? options.window : typeof window !== \"undefined\" ? window : null;\n if (context2 == null) {\n return null;\n }\n const anyProvider = options.anyProvider;\n if (anyProvider && context2.ethereum) {\n return new _BrowserProvider(context2.ethereum);\n }\n if (!(\"addEventListener\" in context2 && \"dispatchEvent\" in context2 && \"removeEventListener\" in context2)) {\n return null;\n }\n const timeout = options.timeout ? options.timeout : 300;\n if (timeout === 0) {\n return null;\n }\n return await new Promise((resolve, reject) => {\n let found = [];\n const addProvider = (event) => {\n found.push(event.detail);\n if (anyProvider) {\n finalize();\n }\n };\n const finalize = () => {\n clearTimeout(timer);\n if (found.length) {\n if (options && options.filter) {\n const filtered = options.filter(found.map((i3) => Object.assign({}, i3.info)));\n if (filtered == null) {\n resolve(null);\n } else if (filtered instanceof _BrowserProvider) {\n resolve(filtered);\n } else {\n let match = null;\n if (filtered.uuid) {\n const matches = found.filter((f6) => filtered.uuid === f6.info.uuid);\n match = matches[0];\n }\n if (match) {\n const { provider, info } = match;\n resolve(new _BrowserProvider(provider, void 0, {\n providerInfo: info\n }));\n } else {\n reject((0, index_js_1.makeError)(\"filter returned unknown info\", \"UNSUPPORTED_OPERATION\", {\n value: filtered\n }));\n }\n }\n } else {\n const { provider, info } = found[0];\n resolve(new _BrowserProvider(provider, void 0, {\n providerInfo: info\n }));\n }\n } else {\n resolve(null);\n }\n context2.removeEventListener(\"eip6963:announceProvider\", addProvider);\n };\n const timer = setTimeout(() => {\n finalize();\n }, timeout);\n context2.addEventListener(\"eip6963:announceProvider\", addProvider);\n context2.dispatchEvent(new Event(\"eip6963:requestProvider\"));\n });\n }\n };\n exports3.BrowserProvider = BrowserProvider;\n }\n });\n\n // ../../../node_modules/.pnpm/ethers@6.15.0_bufferutil@4.0.9_utf-8-validate@5.0.10/node_modules/ethers/lib.commonjs/providers/provider-blockscout.js\n var require_provider_blockscout = __commonJS({\n \"../../../node_modules/.pnpm/ethers@6.15.0_bufferutil@4.0.9_utf-8-validate@5.0.10/node_modules/ethers/lib.commonjs/providers/provider-blockscout.js\"(exports3) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n Object.defineProperty(exports3, \"__esModule\", { value: true });\n exports3.BlockscoutProvider = void 0;\n var index_js_1 = require_utils8();\n var network_js_1 = require_network();\n var provider_jsonrpc_js_1 = require_provider_jsonrpc();\n function getUrl2(name) {\n switch (name) {\n case \"mainnet\":\n return \"https://eth.blockscout.com/api/eth-rpc\";\n case \"sepolia\":\n return \"https://eth-sepolia.blockscout.com/api/eth-rpc\";\n case \"holesky\":\n return \"https://eth-holesky.blockscout.com/api/eth-rpc\";\n case \"classic\":\n return \"https://etc.blockscout.com/api/eth-rpc\";\n case \"arbitrum\":\n return \"https://arbitrum.blockscout.com/api/eth-rpc\";\n case \"base\":\n return \"https://base.blockscout.com/api/eth-rpc\";\n case \"base-sepolia\":\n return \"https://base-sepolia.blockscout.com/api/eth-rpc\";\n case \"matic\":\n return \"https://polygon.blockscout.com/api/eth-rpc\";\n case \"optimism\":\n return \"https://optimism.blockscout.com/api/eth-rpc\";\n case \"optimism-sepolia\":\n return \"https://optimism-sepolia.blockscout.com/api/eth-rpc\";\n case \"xdai\":\n return \"https://gnosis.blockscout.com/api/eth-rpc\";\n }\n (0, index_js_1.assertArgument)(false, \"unsupported network\", \"network\", name);\n }\n var BlockscoutProvider = class _BlockscoutProvider extends provider_jsonrpc_js_1.JsonRpcProvider {\n /**\n * The API key.\n */\n apiKey;\n /**\n * Creates a new **BlockscoutProvider**.\n */\n constructor(_network, apiKey) {\n if (_network == null) {\n _network = \"mainnet\";\n }\n const network = network_js_1.Network.from(_network);\n if (apiKey == null) {\n apiKey = null;\n }\n const request = _BlockscoutProvider.getRequest(network);\n super(request, network, { staticNetwork: network });\n (0, index_js_1.defineProperties)(this, { apiKey });\n }\n _getProvider(chainId) {\n try {\n return new _BlockscoutProvider(chainId, this.apiKey);\n } catch (error) {\n }\n return super._getProvider(chainId);\n }\n isCommunityResource() {\n return this.apiKey === null;\n }\n getRpcRequest(req) {\n const resp = super.getRpcRequest(req);\n if (resp && resp.method === \"eth_estimateGas\" && resp.args.length == 1) {\n resp.args = resp.args.slice();\n resp.args.push(\"latest\");\n }\n return resp;\n }\n getRpcError(payload, _error) {\n const error = _error ? _error.error : null;\n if (error && error.code === -32015 && !(0, index_js_1.isHexString)(error.data || \"\", true)) {\n const panicCodes = {\n \"assert(false)\": \"01\",\n \"arithmetic underflow or overflow\": \"11\",\n \"division or modulo by zero\": \"12\",\n \"out-of-bounds array access; popping on an empty array\": \"31\",\n \"out-of-bounds access of an array or bytesN\": \"32\"\n };\n let panicCode = \"\";\n if (error.message === \"VM execution error.\") {\n panicCode = panicCodes[error.data] || \"\";\n } else if (panicCodes[error.message || \"\"]) {\n panicCode = panicCodes[error.message || \"\"];\n }\n if (panicCode) {\n error.message += ` (reverted: ${error.data})`;\n error.data = \"0x4e487b7100000000000000000000000000000000000000000000000000000000000000\" + panicCode;\n }\n } else if (error && error.code === -32e3) {\n if (error.message === \"wrong transaction nonce\") {\n error.message += \" (nonce too low)\";\n }\n }\n return super.getRpcError(payload, _error);\n }\n /**\n * Returns a prepared request for connecting to %%network%%\n * with %%apiKey%%.\n */\n static getRequest(network) {\n const request = new index_js_1.FetchRequest(getUrl2(network.name));\n request.allowGzip = true;\n return request;\n }\n };\n exports3.BlockscoutProvider = BlockscoutProvider;\n }\n });\n\n // ../../../node_modules/.pnpm/ethers@6.15.0_bufferutil@4.0.9_utf-8-validate@5.0.10/node_modules/ethers/lib.commonjs/providers/provider-pocket.js\n var require_provider_pocket = __commonJS({\n \"../../../node_modules/.pnpm/ethers@6.15.0_bufferutil@4.0.9_utf-8-validate@5.0.10/node_modules/ethers/lib.commonjs/providers/provider-pocket.js\"(exports3) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n Object.defineProperty(exports3, \"__esModule\", { value: true });\n exports3.PocketProvider = void 0;\n var index_js_1 = require_utils8();\n var community_js_1 = require_community();\n var network_js_1 = require_network();\n var provider_jsonrpc_js_1 = require_provider_jsonrpc();\n var defaultApplicationId = \"62e1ad51b37b8e00394bda3b\";\n function getHost(name) {\n switch (name) {\n case \"mainnet\":\n return \"eth-mainnet.gateway.pokt.network\";\n case \"goerli\":\n return \"eth-goerli.gateway.pokt.network\";\n case \"matic\":\n return \"poly-mainnet.gateway.pokt.network\";\n case \"matic-mumbai\":\n return \"polygon-mumbai-rpc.gateway.pokt.network\";\n }\n (0, index_js_1.assertArgument)(false, \"unsupported network\", \"network\", name);\n }\n var PocketProvider = class _PocketProvider extends provider_jsonrpc_js_1.JsonRpcProvider {\n /**\n * The Application ID for the Pocket connection.\n */\n applicationId;\n /**\n * The Application Secret for making authenticated requests\n * to the Pocket connection.\n */\n applicationSecret;\n /**\n * Create a new **PocketProvider**.\n *\n * By default connecting to ``mainnet`` with a highly throttled\n * API key.\n */\n constructor(_network, applicationId, applicationSecret) {\n if (_network == null) {\n _network = \"mainnet\";\n }\n const network = network_js_1.Network.from(_network);\n if (applicationId == null) {\n applicationId = defaultApplicationId;\n }\n if (applicationSecret == null) {\n applicationSecret = null;\n }\n const options = { staticNetwork: network };\n const request = _PocketProvider.getRequest(network, applicationId, applicationSecret);\n super(request, network, options);\n (0, index_js_1.defineProperties)(this, { applicationId, applicationSecret });\n }\n _getProvider(chainId) {\n try {\n return new _PocketProvider(chainId, this.applicationId, this.applicationSecret);\n } catch (error) {\n }\n return super._getProvider(chainId);\n }\n /**\n * Returns a prepared request for connecting to %%network%% with\n * %%applicationId%%.\n */\n static getRequest(network, applicationId, applicationSecret) {\n if (applicationId == null) {\n applicationId = defaultApplicationId;\n }\n const request = new index_js_1.FetchRequest(`https://${getHost(network.name)}/v1/lb/${applicationId}`);\n request.allowGzip = true;\n if (applicationSecret) {\n request.setCredentials(\"\", applicationSecret);\n }\n if (applicationId === defaultApplicationId) {\n request.retryFunc = async (request2, response, attempt) => {\n (0, community_js_1.showThrottleMessage)(\"PocketProvider\");\n return true;\n };\n }\n return request;\n }\n isCommunityResource() {\n return this.applicationId === defaultApplicationId;\n }\n };\n exports3.PocketProvider = PocketProvider;\n }\n });\n\n // ../../../node_modules/.pnpm/ethers@6.15.0_bufferutil@4.0.9_utf-8-validate@5.0.10/node_modules/ethers/lib.commonjs/providers/provider-ipcsocket-browser.js\n var require_provider_ipcsocket_browser = __commonJS({\n \"../../../node_modules/.pnpm/ethers@6.15.0_bufferutil@4.0.9_utf-8-validate@5.0.10/node_modules/ethers/lib.commonjs/providers/provider-ipcsocket-browser.js\"(exports3) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n Object.defineProperty(exports3, \"__esModule\", { value: true });\n exports3.IpcSocketProvider = void 0;\n var IpcSocketProvider = void 0;\n exports3.IpcSocketProvider = IpcSocketProvider;\n }\n });\n\n // ../../../node_modules/.pnpm/ethers@6.15.0_bufferutil@4.0.9_utf-8-validate@5.0.10/node_modules/ethers/lib.commonjs/providers/index.js\n var require_providers = __commonJS({\n \"../../../node_modules/.pnpm/ethers@6.15.0_bufferutil@4.0.9_utf-8-validate@5.0.10/node_modules/ethers/lib.commonjs/providers/index.js\"(exports3) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n Object.defineProperty(exports3, \"__esModule\", { value: true });\n exports3.SocketEventSubscriber = exports3.SocketPendingSubscriber = exports3.SocketBlockSubscriber = exports3.SocketSubscriber = exports3.WebSocketProvider = exports3.SocketProvider = exports3.IpcSocketProvider = exports3.QuickNodeProvider = exports3.PocketProvider = exports3.InfuraWebSocketProvider = exports3.InfuraProvider = exports3.EtherscanPlugin = exports3.EtherscanProvider = exports3.ChainstackProvider = exports3.CloudflareProvider = exports3.AnkrProvider = exports3.BlockscoutProvider = exports3.AlchemyProvider = exports3.BrowserProvider = exports3.JsonRpcSigner = exports3.JsonRpcProvider = exports3.JsonRpcApiProvider = exports3.FallbackProvider = exports3.copyRequest = exports3.TransactionResponse = exports3.TransactionReceipt = exports3.Log = exports3.FeeData = exports3.Block = exports3.FetchUrlFeeDataNetworkPlugin = exports3.FeeDataNetworkPlugin = exports3.EnsPlugin = exports3.GasCostPlugin = exports3.NetworkPlugin = exports3.NonceManager = exports3.Network = exports3.MulticoinProviderPlugin = exports3.EnsResolver = exports3.getDefaultProvider = exports3.showThrottleMessage = exports3.VoidSigner = exports3.AbstractSigner = exports3.UnmanagedSubscriber = exports3.AbstractProvider = void 0;\n var abstract_provider_js_1 = require_abstract_provider();\n Object.defineProperty(exports3, \"AbstractProvider\", { enumerable: true, get: function() {\n return abstract_provider_js_1.AbstractProvider;\n } });\n Object.defineProperty(exports3, \"UnmanagedSubscriber\", { enumerable: true, get: function() {\n return abstract_provider_js_1.UnmanagedSubscriber;\n } });\n var abstract_signer_js_1 = require_abstract_signer();\n Object.defineProperty(exports3, \"AbstractSigner\", { enumerable: true, get: function() {\n return abstract_signer_js_1.AbstractSigner;\n } });\n Object.defineProperty(exports3, \"VoidSigner\", { enumerable: true, get: function() {\n return abstract_signer_js_1.VoidSigner;\n } });\n var community_js_1 = require_community();\n Object.defineProperty(exports3, \"showThrottleMessage\", { enumerable: true, get: function() {\n return community_js_1.showThrottleMessage;\n } });\n var default_provider_js_1 = require_default_provider();\n Object.defineProperty(exports3, \"getDefaultProvider\", { enumerable: true, get: function() {\n return default_provider_js_1.getDefaultProvider;\n } });\n var ens_resolver_js_1 = require_ens_resolver();\n Object.defineProperty(exports3, \"EnsResolver\", { enumerable: true, get: function() {\n return ens_resolver_js_1.EnsResolver;\n } });\n Object.defineProperty(exports3, \"MulticoinProviderPlugin\", { enumerable: true, get: function() {\n return ens_resolver_js_1.MulticoinProviderPlugin;\n } });\n var network_js_1 = require_network();\n Object.defineProperty(exports3, \"Network\", { enumerable: true, get: function() {\n return network_js_1.Network;\n } });\n var signer_noncemanager_js_1 = require_signer_noncemanager();\n Object.defineProperty(exports3, \"NonceManager\", { enumerable: true, get: function() {\n return signer_noncemanager_js_1.NonceManager;\n } });\n var plugins_network_js_1 = require_plugins_network();\n Object.defineProperty(exports3, \"NetworkPlugin\", { enumerable: true, get: function() {\n return plugins_network_js_1.NetworkPlugin;\n } });\n Object.defineProperty(exports3, \"GasCostPlugin\", { enumerable: true, get: function() {\n return plugins_network_js_1.GasCostPlugin;\n } });\n Object.defineProperty(exports3, \"EnsPlugin\", { enumerable: true, get: function() {\n return plugins_network_js_1.EnsPlugin;\n } });\n Object.defineProperty(exports3, \"FeeDataNetworkPlugin\", { enumerable: true, get: function() {\n return plugins_network_js_1.FeeDataNetworkPlugin;\n } });\n Object.defineProperty(exports3, \"FetchUrlFeeDataNetworkPlugin\", { enumerable: true, get: function() {\n return plugins_network_js_1.FetchUrlFeeDataNetworkPlugin;\n } });\n var provider_js_1 = require_provider();\n Object.defineProperty(exports3, \"Block\", { enumerable: true, get: function() {\n return provider_js_1.Block;\n } });\n Object.defineProperty(exports3, \"FeeData\", { enumerable: true, get: function() {\n return provider_js_1.FeeData;\n } });\n Object.defineProperty(exports3, \"Log\", { enumerable: true, get: function() {\n return provider_js_1.Log;\n } });\n Object.defineProperty(exports3, \"TransactionReceipt\", { enumerable: true, get: function() {\n return provider_js_1.TransactionReceipt;\n } });\n Object.defineProperty(exports3, \"TransactionResponse\", { enumerable: true, get: function() {\n return provider_js_1.TransactionResponse;\n } });\n Object.defineProperty(exports3, \"copyRequest\", { enumerable: true, get: function() {\n return provider_js_1.copyRequest;\n } });\n var provider_fallback_js_1 = require_provider_fallback();\n Object.defineProperty(exports3, \"FallbackProvider\", { enumerable: true, get: function() {\n return provider_fallback_js_1.FallbackProvider;\n } });\n var provider_jsonrpc_js_1 = require_provider_jsonrpc();\n Object.defineProperty(exports3, \"JsonRpcApiProvider\", { enumerable: true, get: function() {\n return provider_jsonrpc_js_1.JsonRpcApiProvider;\n } });\n Object.defineProperty(exports3, \"JsonRpcProvider\", { enumerable: true, get: function() {\n return provider_jsonrpc_js_1.JsonRpcProvider;\n } });\n Object.defineProperty(exports3, \"JsonRpcSigner\", { enumerable: true, get: function() {\n return provider_jsonrpc_js_1.JsonRpcSigner;\n } });\n var provider_browser_js_1 = require_provider_browser();\n Object.defineProperty(exports3, \"BrowserProvider\", { enumerable: true, get: function() {\n return provider_browser_js_1.BrowserProvider;\n } });\n var provider_alchemy_js_1 = require_provider_alchemy();\n Object.defineProperty(exports3, \"AlchemyProvider\", { enumerable: true, get: function() {\n return provider_alchemy_js_1.AlchemyProvider;\n } });\n var provider_blockscout_js_1 = require_provider_blockscout();\n Object.defineProperty(exports3, \"BlockscoutProvider\", { enumerable: true, get: function() {\n return provider_blockscout_js_1.BlockscoutProvider;\n } });\n var provider_ankr_js_1 = require_provider_ankr();\n Object.defineProperty(exports3, \"AnkrProvider\", { enumerable: true, get: function() {\n return provider_ankr_js_1.AnkrProvider;\n } });\n var provider_cloudflare_js_1 = require_provider_cloudflare();\n Object.defineProperty(exports3, \"CloudflareProvider\", { enumerable: true, get: function() {\n return provider_cloudflare_js_1.CloudflareProvider;\n } });\n var provider_chainstack_js_1 = require_provider_chainstack();\n Object.defineProperty(exports3, \"ChainstackProvider\", { enumerable: true, get: function() {\n return provider_chainstack_js_1.ChainstackProvider;\n } });\n var provider_etherscan_js_1 = require_provider_etherscan();\n Object.defineProperty(exports3, \"EtherscanProvider\", { enumerable: true, get: function() {\n return provider_etherscan_js_1.EtherscanProvider;\n } });\n Object.defineProperty(exports3, \"EtherscanPlugin\", { enumerable: true, get: function() {\n return provider_etherscan_js_1.EtherscanPlugin;\n } });\n var provider_infura_js_1 = require_provider_infura();\n Object.defineProperty(exports3, \"InfuraProvider\", { enumerable: true, get: function() {\n return provider_infura_js_1.InfuraProvider;\n } });\n Object.defineProperty(exports3, \"InfuraWebSocketProvider\", { enumerable: true, get: function() {\n return provider_infura_js_1.InfuraWebSocketProvider;\n } });\n var provider_pocket_js_1 = require_provider_pocket();\n Object.defineProperty(exports3, \"PocketProvider\", { enumerable: true, get: function() {\n return provider_pocket_js_1.PocketProvider;\n } });\n var provider_quicknode_js_1 = require_provider_quicknode();\n Object.defineProperty(exports3, \"QuickNodeProvider\", { enumerable: true, get: function() {\n return provider_quicknode_js_1.QuickNodeProvider;\n } });\n var provider_ipcsocket_js_1 = require_provider_ipcsocket_browser();\n Object.defineProperty(exports3, \"IpcSocketProvider\", { enumerable: true, get: function() {\n return provider_ipcsocket_js_1.IpcSocketProvider;\n } });\n var provider_socket_js_1 = require_provider_socket();\n Object.defineProperty(exports3, \"SocketProvider\", { enumerable: true, get: function() {\n return provider_socket_js_1.SocketProvider;\n } });\n var provider_websocket_js_1 = require_provider_websocket();\n Object.defineProperty(exports3, \"WebSocketProvider\", { enumerable: true, get: function() {\n return provider_websocket_js_1.WebSocketProvider;\n } });\n var provider_socket_js_2 = require_provider_socket();\n Object.defineProperty(exports3, \"SocketSubscriber\", { enumerable: true, get: function() {\n return provider_socket_js_2.SocketSubscriber;\n } });\n Object.defineProperty(exports3, \"SocketBlockSubscriber\", { enumerable: true, get: function() {\n return provider_socket_js_2.SocketBlockSubscriber;\n } });\n Object.defineProperty(exports3, \"SocketPendingSubscriber\", { enumerable: true, get: function() {\n return provider_socket_js_2.SocketPendingSubscriber;\n } });\n Object.defineProperty(exports3, \"SocketEventSubscriber\", { enumerable: true, get: function() {\n return provider_socket_js_2.SocketEventSubscriber;\n } });\n }\n });\n\n // ../../../node_modules/.pnpm/ethers@6.15.0_bufferutil@4.0.9_utf-8-validate@5.0.10/node_modules/ethers/lib.commonjs/wallet/base-wallet.js\n var require_base_wallet = __commonJS({\n \"../../../node_modules/.pnpm/ethers@6.15.0_bufferutil@4.0.9_utf-8-validate@5.0.10/node_modules/ethers/lib.commonjs/wallet/base-wallet.js\"(exports3) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n Object.defineProperty(exports3, \"__esModule\", { value: true });\n exports3.BaseWallet = void 0;\n var index_js_1 = require_address3();\n var index_js_2 = require_hash2();\n var index_js_3 = require_providers();\n var index_js_4 = require_transaction2();\n var index_js_5 = require_utils8();\n var BaseWallet = class _BaseWallet extends index_js_3.AbstractSigner {\n /**\n * The wallet address.\n */\n address;\n #signingKey;\n /**\n * Creates a new BaseWallet for %%privateKey%%, optionally\n * connected to %%provider%%.\n *\n * If %%provider%% is not specified, only offline methods can\n * be used.\n */\n constructor(privateKey, provider) {\n super(provider);\n (0, index_js_5.assertArgument)(privateKey && typeof privateKey.sign === \"function\", \"invalid private key\", \"privateKey\", \"[ REDACTED ]\");\n this.#signingKey = privateKey;\n const address = (0, index_js_4.computeAddress)(this.signingKey.publicKey);\n (0, index_js_5.defineProperties)(this, { address });\n }\n // Store private values behind getters to reduce visibility\n // in console.log\n /**\n * The [[SigningKey]] used for signing payloads.\n */\n get signingKey() {\n return this.#signingKey;\n }\n /**\n * The private key for this wallet.\n */\n get privateKey() {\n return this.signingKey.privateKey;\n }\n async getAddress() {\n return this.address;\n }\n connect(provider) {\n return new _BaseWallet(this.#signingKey, provider);\n }\n async signTransaction(tx) {\n tx = (0, index_js_3.copyRequest)(tx);\n const { to, from: from14 } = await (0, index_js_5.resolveProperties)({\n to: tx.to ? (0, index_js_1.resolveAddress)(tx.to, this) : void 0,\n from: tx.from ? (0, index_js_1.resolveAddress)(tx.from, this) : void 0\n });\n if (to != null) {\n tx.to = to;\n }\n if (from14 != null) {\n tx.from = from14;\n }\n if (tx.from != null) {\n (0, index_js_5.assertArgument)((0, index_js_1.getAddress)(tx.from) === this.address, \"transaction from address mismatch\", \"tx.from\", tx.from);\n delete tx.from;\n }\n const btx = index_js_4.Transaction.from(tx);\n btx.signature = this.signingKey.sign(btx.unsignedHash);\n return btx.serialized;\n }\n async signMessage(message) {\n return this.signMessageSync(message);\n }\n // @TODO: Add a secialized signTx and signTyped sync that enforces\n // all parameters are known?\n /**\n * Returns the signature for %%message%% signed with this wallet.\n */\n signMessageSync(message) {\n return this.signingKey.sign((0, index_js_2.hashMessage)(message)).serialized;\n }\n /**\n * Returns the Authorization for %%auth%%.\n */\n authorizeSync(auth) {\n (0, index_js_5.assertArgument)(typeof auth.address === \"string\", \"invalid address for authorizeSync\", \"auth.address\", auth);\n const signature = this.signingKey.sign((0, index_js_2.hashAuthorization)(auth));\n return Object.assign({}, {\n address: (0, index_js_1.getAddress)(auth.address),\n nonce: (0, index_js_5.getBigInt)(auth.nonce || 0),\n chainId: (0, index_js_5.getBigInt)(auth.chainId || 0)\n }, { signature });\n }\n /**\n * Resolves to the Authorization for %%auth%%.\n */\n async authorize(auth) {\n auth = Object.assign({}, auth, {\n address: await (0, index_js_1.resolveAddress)(auth.address, this)\n });\n return this.authorizeSync(await this.populateAuthorization(auth));\n }\n async signTypedData(domain2, types, value) {\n const populated = await index_js_2.TypedDataEncoder.resolveNames(domain2, types, value, async (name) => {\n (0, index_js_5.assert)(this.provider != null, \"cannot resolve ENS names without a provider\", \"UNSUPPORTED_OPERATION\", {\n operation: \"resolveName\",\n info: { name }\n });\n const address = await this.provider.resolveName(name);\n (0, index_js_5.assert)(address != null, \"unconfigured ENS name\", \"UNCONFIGURED_NAME\", {\n value: name\n });\n return address;\n });\n return this.signingKey.sign(index_js_2.TypedDataEncoder.hash(populated.domain, types, populated.value)).serialized;\n }\n };\n exports3.BaseWallet = BaseWallet;\n }\n });\n\n // ../../../node_modules/.pnpm/ethers@6.15.0_bufferutil@4.0.9_utf-8-validate@5.0.10/node_modules/ethers/lib.commonjs/wordlists/decode-owl.js\n var require_decode_owl = __commonJS({\n \"../../../node_modules/.pnpm/ethers@6.15.0_bufferutil@4.0.9_utf-8-validate@5.0.10/node_modules/ethers/lib.commonjs/wordlists/decode-owl.js\"(exports3) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n Object.defineProperty(exports3, \"__esModule\", { value: true });\n exports3.decodeOwl = exports3.decode = void 0;\n var index_js_1 = require_utils8();\n var subsChrs = \" !#$%&'()*+,-./<=>?@[]^_`{|}~\";\n var Word = /^[a-z]*$/i;\n function unfold(words, sep) {\n let initial = 97;\n return words.reduce((accum, word) => {\n if (word === sep) {\n initial++;\n } else if (word.match(Word)) {\n accum.push(String.fromCharCode(initial) + word);\n } else {\n initial = 97;\n accum.push(word);\n }\n return accum;\n }, []);\n }\n function decode2(data, subs) {\n for (let i3 = subsChrs.length - 1; i3 >= 0; i3--) {\n data = data.split(subsChrs[i3]).join(subs.substring(2 * i3, 2 * i3 + 2));\n }\n const clumps = [];\n const leftover = data.replace(/(:|([0-9])|([A-Z][a-z]*))/g, (all, item, semi, word) => {\n if (semi) {\n for (let i3 = parseInt(semi); i3 >= 0; i3--) {\n clumps.push(\";\");\n }\n } else {\n clumps.push(item.toLowerCase());\n }\n return \"\";\n });\n if (leftover) {\n throw new Error(`leftovers: ${JSON.stringify(leftover)}`);\n }\n return unfold(unfold(clumps, \";\"), \":\");\n }\n exports3.decode = decode2;\n function decodeOwl(data) {\n (0, index_js_1.assertArgument)(data[0] === \"0\", \"unsupported auwl data\", \"data\", data);\n return decode2(data.substring(1 + 2 * subsChrs.length), data.substring(1, 1 + 2 * subsChrs.length));\n }\n exports3.decodeOwl = decodeOwl;\n }\n });\n\n // ../../../node_modules/.pnpm/ethers@6.15.0_bufferutil@4.0.9_utf-8-validate@5.0.10/node_modules/ethers/lib.commonjs/wordlists/wordlist.js\n var require_wordlist2 = __commonJS({\n \"../../../node_modules/.pnpm/ethers@6.15.0_bufferutil@4.0.9_utf-8-validate@5.0.10/node_modules/ethers/lib.commonjs/wordlists/wordlist.js\"(exports3) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n Object.defineProperty(exports3, \"__esModule\", { value: true });\n exports3.Wordlist = void 0;\n var index_js_1 = require_utils8();\n var Wordlist = class {\n locale;\n /**\n * Creates a new Wordlist instance.\n *\n * Sub-classes MUST call this if they provide their own constructor,\n * passing in the locale string of the language.\n *\n * Generally there is no need to create instances of a Wordlist,\n * since each language-specific Wordlist creates an instance and\n * there is no state kept internally, so they are safe to share.\n */\n constructor(locale) {\n (0, index_js_1.defineProperties)(this, { locale });\n }\n /**\n * Sub-classes may override this to provide a language-specific\n * method for spliting %%phrase%% into individual words.\n *\n * By default, %%phrase%% is split using any sequences of\n * white-space as defined by regular expressions (i.e. ``/\\s+/``).\n */\n split(phrase) {\n return phrase.toLowerCase().split(/\\s+/g);\n }\n /**\n * Sub-classes may override this to provider a language-specific\n * method for joining %%words%% into a phrase.\n *\n * By default, %%words%% are joined by a single space.\n */\n join(words) {\n return words.join(\" \");\n }\n };\n exports3.Wordlist = Wordlist;\n }\n });\n\n // ../../../node_modules/.pnpm/ethers@6.15.0_bufferutil@4.0.9_utf-8-validate@5.0.10/node_modules/ethers/lib.commonjs/wordlists/wordlist-owl.js\n var require_wordlist_owl = __commonJS({\n \"../../../node_modules/.pnpm/ethers@6.15.0_bufferutil@4.0.9_utf-8-validate@5.0.10/node_modules/ethers/lib.commonjs/wordlists/wordlist-owl.js\"(exports3) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n Object.defineProperty(exports3, \"__esModule\", { value: true });\n exports3.WordlistOwl = void 0;\n var index_js_1 = require_hash2();\n var index_js_2 = require_utils8();\n var decode_owl_js_1 = require_decode_owl();\n var wordlist_js_1 = require_wordlist2();\n var WordlistOwl = class extends wordlist_js_1.Wordlist {\n #data;\n #checksum;\n /**\n * Creates a new Wordlist for %%locale%% using the OWL %%data%%\n * and validated against the %%checksum%%.\n */\n constructor(locale, data, checksum4) {\n super(locale);\n this.#data = data;\n this.#checksum = checksum4;\n this.#words = null;\n }\n /**\n * The OWL-encoded data.\n */\n get _data() {\n return this.#data;\n }\n /**\n * Decode all the words for the wordlist.\n */\n _decodeWords() {\n return (0, decode_owl_js_1.decodeOwl)(this.#data);\n }\n #words;\n #loadWords() {\n if (this.#words == null) {\n const words = this._decodeWords();\n const checksum4 = (0, index_js_1.id)(words.join(\"\\n\") + \"\\n\");\n if (checksum4 !== this.#checksum) {\n throw new Error(`BIP39 Wordlist for ${this.locale} FAILED`);\n }\n this.#words = words;\n }\n return this.#words;\n }\n getWord(index2) {\n const words = this.#loadWords();\n (0, index_js_2.assertArgument)(index2 >= 0 && index2 < words.length, `invalid word index: ${index2}`, \"index\", index2);\n return words[index2];\n }\n getWordIndex(word) {\n return this.#loadWords().indexOf(word);\n }\n };\n exports3.WordlistOwl = WordlistOwl;\n }\n });\n\n // ../../../node_modules/.pnpm/ethers@6.15.0_bufferutil@4.0.9_utf-8-validate@5.0.10/node_modules/ethers/lib.commonjs/wordlists/lang-en.js\n var require_lang_en2 = __commonJS({\n \"../../../node_modules/.pnpm/ethers@6.15.0_bufferutil@4.0.9_utf-8-validate@5.0.10/node_modules/ethers/lib.commonjs/wordlists/lang-en.js\"(exports3) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n Object.defineProperty(exports3, \"__esModule\", { value: true });\n exports3.LangEn = void 0;\n var wordlist_owl_js_1 = require_wordlist_owl();\n var words = \"0erleonalorenseinceregesticitStanvetearctssi#ch2Athck&tneLl0And#Il.yLeOutO=S|S%b/ra@SurdU'0Ce[Cid|CountCu'Hie=IdOu,-Qui*Ro[TT]T%T*[Tu$0AptDD-tD*[Ju,M.UltV<)Vi)0Rob-0FairF%dRaid0A(EEntRee0Ead0MRRp%tS!_rmBumCoholErtI&LLeyLowMo,O}PhaReadySoT Ways0A>urAz(gOngOuntU'd0Aly,Ch%Ci|G G!GryIm$K!Noun)Nu$O` Sw T&naTiqueXietyY1ArtOlogyPe?P!Pro=Ril1ChCt-EaEnaGueMMedM%MyOundR<+Re,Ri=RowTTefa@Ti,Tw%k0KPe@SaultSetSi,SumeThma0H!>OmTa{T&dT.udeTra@0Ct]D.Gu,NtTh%ToTumn0Era+OcadoOid0AkeA*AyEsomeFulKw?d0Is:ByChel%C#D+GL<)Lc#y~MbooN_{Ad!AftAmA}AshAt AwlAzyEamEd.EekEwI{etImeIspIt-OpO[Ou^OwdUci$UelUi'Umb!Un^UshYY,$2BeLtu*PPbo?dRiousRr|Rta(R=Sh]/omTe3C!:DMa+MpN)Ng R(gShUght WnY3AlBa>BrisCadeCemb CideCl(eC%a>C*a'ErF&'F(eFyG*eLayLiv M3AgramAlAm#dAryCeE'lEtFf G.$Gn.yLemmaNn NosaurRe@RtSag*eScov Sea'ShSmi[S%d Splay/<)V tVideV%)Zzy5Ct%Cum|G~Lph(Ma(Na>NkeyN%OrSeUb!Ve_ftAg#AmaA,-AwEamE[IftIllInkIpI=OpUmY2CkMbNeR(g/T^Ty1Arf1Nam-:G G!RlyRnR`Sily/Sy1HoOlogyOnomy0GeItUca>1F%t0G1GhtTh 2BowD E@r-EgSe0B?kBodyBra)Er+Ot]PloyPow Pty0Ab!A@DD![D%'EmyErgyF%)Ga+G(eH<)JoyLi,OughR-hRollSu*T Ti*TryVelope1Isode0U$Uip0AA'OdeOs]R%Upt0CapeSayS&)Ta>0Ern$H-s1Id&)IlOkeOl=1A@Amp!Ce[Ch<+C.eCludeCu'Ecu>Erci'Hau,Hib.I!I,ItOt-PM&'Mu}Pa@Po'Pro=Pul'0ChCludeComeC*a'DexD-a>Do%Du,ryFN Noc|PutQuirySSue0Em1Ory:CketGu?RZz3AlousAns~yWel9BInKeUr}yY5D+I)MpNg!Ni%Nk/:Ng?oo3EnEpT^upY3CkDD}yNdNgdomSsTT^&TeTt&Wi4EeIfeO{Ow:BBelB%Dd DyKeMpNgua+PtopR+T T(UghUndryVaWWnWsu.Y Zy3Ad AfArnA=Ctu*FtGG$G&dIsu*M#NdNg`NsOp?dSs#Tt Vel3ArB tyBr?yC&'FeFtGhtKeMbM.NkOnQuid/Tt!VeZ?d5AdAnB, C$CkG-NelyNgOpTt yUdUn+VeY$5CkyGga+Mb N?N^Xury3R-s:Ch(eDG-G}tIdIlInJ%KeMm$NNa+Nda>NgoNs]Nu$P!Rb!R^Rg(R(eRketRria+SkSs/ T^T i$ThTrixTt XimumZe3AdowAnAsu*AtCh<-D$DiaLodyLtMb M%yNt]NuRcyR+R.RryShSsa+T$Thod3Dd!DnightLk~]M-NdNimumN%Nu>Rac!Rr%S ySs/akeXXedXtu*5Bi!DelDifyMM|N.%NkeyN, N`OnR$ReRn(gSqu.oTh T]T%Unta(U'VeVie5ChFf(LeLtiplySc!SeumShroomS-/Tu$3Self/ yTh:I=MePk(Rrow/yT]Tu*3ArCkEdGati=G!@I` PhewR=/TTw%kUtr$V WsXt3CeGht5B!I'M(eeOd!Rm$R`SeTab!TeTh(gTi)VelW5C!?Mb R'T:K0EyJe@Li+Scu*S =Ta(Vious0CurEAyEa'Ed+U{UgUn+2EmEtIntL?LeLi)NdNyOlPul?Rt]S.]Ssib!/TatoTt yV tyWd W _@i)Ai'Ed-tEf Epa*Es|EttyEv|I)IdeIm?yIntI%.yIs#Iva>IzeOb!mO)[Odu)Of.OgramOje@Omo>OofOp tyOsp O>@OudOvide2Bl-Dd(g~LpL'Mpk(N^PilPpyR^a'R.yRpo'R'ShTZz!3Ramid:99Al.yAntumArt E,]I{ItIzO>:Bb.Cco#CeCkD?DioIlInI'~yMpN^NdomN+PidReTeTh V&WZ%3AdyAlAs#BelBuildC$lCei=CipeC%dCyc!Du)F!@F%mFu'G]G*tGul?Je@LaxLea'LiefLyMa(Memb M(dMo=Nd NewNtOp&PairPeatPla)P%tQui*ScueSemb!Si,Sour)Sp#'SultTi*T*atTurnUn]Ve$ViewW?d2Y`m0BBb#CeChDeD+F!GhtGidNgOtPp!SkTu$V$V 5AdA,BotBu,CketM<)OfOkieOmSeTa>UghUndU>Y$5Bb DeGLeNNwayR$:DDd!D}[FeIlLadLm#L#LtLu>MeMp!NdTisfyToshiU)Usa+VeY1A!AnA*Att E}HemeHoolI&)I[%sOrp]OutRapRe&RiptRub1AAr^As#AtC#dC*tCt]Cur.yEdEkGm|Le@~M(?Ni%N'Nt&)RiesRvi)Ss]Tt!TupV&_dowAftAllowA*EdEllEriffIeldIftI}IpIv O{OeOotOpOrtOuld O=RimpRugUff!Y0Bl(gCkDeE+GhtGnL|Lk~yLv Mil?Mp!N)NgR&/ Tua>XZe1A>Et^IIllInIrtUll0AbAmEepEnd I)IdeIghtImOgAyEakEelEmEpE*oI{IllIngO{Oma^O}OolOryO=Ra>gyReetRikeR#gRugg!Ud|UffUmb!Y!0Bje@Bm.BwayC)[ChDd&Ff G?G+,ItMm NNnyN'tP PplyP*meReRfa)R+Rpri'RroundR=ySpe@/a(1AllowAmpApArmE?EetIftImIngIt^Ord1MbolMptomRup/em:B!Ck!GIlL|LkNkPeR+tSk/eTtooXi3A^Am~NNGradeHoldOnP Set1BOng::Rd3Ar~ow9UUngU`:3BraRo9NeO\";\n var checksum4 = \"0x3c8acc1e7b08d8e76f9fda015ef48dc8c710a73cb7e0f77b2c18a9b5a7adde60\";\n var wordlist = null;\n var LangEn = class _LangEn extends wordlist_owl_js_1.WordlistOwl {\n /**\n * Creates a new instance of the English language Wordlist.\n *\n * This should be unnecessary most of the time as the exported\n * [[langEn]] should suffice.\n *\n * @_ignore:\n */\n constructor() {\n super(\"en\", words, checksum4);\n }\n /**\n * Returns a singleton instance of a ``LangEn``, creating it\n * if this is the first time being called.\n */\n static wordlist() {\n if (wordlist == null) {\n wordlist = new _LangEn();\n }\n return wordlist;\n }\n };\n exports3.LangEn = LangEn;\n }\n });\n\n // ../../../node_modules/.pnpm/ethers@6.15.0_bufferutil@4.0.9_utf-8-validate@5.0.10/node_modules/ethers/lib.commonjs/wallet/mnemonic.js\n var require_mnemonic = __commonJS({\n \"../../../node_modules/.pnpm/ethers@6.15.0_bufferutil@4.0.9_utf-8-validate@5.0.10/node_modules/ethers/lib.commonjs/wallet/mnemonic.js\"(exports3) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n Object.defineProperty(exports3, \"__esModule\", { value: true });\n exports3.Mnemonic = void 0;\n var index_js_1 = require_crypto2();\n var index_js_2 = require_utils8();\n var lang_en_js_1 = require_lang_en2();\n function getUpperMask(bits) {\n return (1 << bits) - 1 << 8 - bits & 255;\n }\n function getLowerMask(bits) {\n return (1 << bits) - 1 & 255;\n }\n function mnemonicToEntropy(mnemonic, wordlist) {\n (0, index_js_2.assertNormalize)(\"NFKD\");\n if (wordlist == null) {\n wordlist = lang_en_js_1.LangEn.wordlist();\n }\n const words = wordlist.split(mnemonic);\n (0, index_js_2.assertArgument)(words.length % 3 === 0 && words.length >= 12 && words.length <= 24, \"invalid mnemonic length\", \"mnemonic\", \"[ REDACTED ]\");\n const entropy = new Uint8Array(Math.ceil(11 * words.length / 8));\n let offset = 0;\n for (let i3 = 0; i3 < words.length; i3++) {\n let index2 = wordlist.getWordIndex(words[i3].normalize(\"NFKD\"));\n (0, index_js_2.assertArgument)(index2 >= 0, `invalid mnemonic word at index ${i3}`, \"mnemonic\", \"[ REDACTED ]\");\n for (let bit = 0; bit < 11; bit++) {\n if (index2 & 1 << 10 - bit) {\n entropy[offset >> 3] |= 1 << 7 - offset % 8;\n }\n offset++;\n }\n }\n const entropyBits = 32 * words.length / 3;\n const checksumBits = words.length / 3;\n const checksumMask = getUpperMask(checksumBits);\n const checksum4 = (0, index_js_2.getBytes)((0, index_js_1.sha256)(entropy.slice(0, entropyBits / 8)))[0] & checksumMask;\n (0, index_js_2.assertArgument)(checksum4 === (entropy[entropy.length - 1] & checksumMask), \"invalid mnemonic checksum\", \"mnemonic\", \"[ REDACTED ]\");\n return (0, index_js_2.hexlify)(entropy.slice(0, entropyBits / 8));\n }\n function entropyToMnemonic(entropy, wordlist) {\n (0, index_js_2.assertArgument)(entropy.length % 4 === 0 && entropy.length >= 16 && entropy.length <= 32, \"invalid entropy size\", \"entropy\", \"[ REDACTED ]\");\n if (wordlist == null) {\n wordlist = lang_en_js_1.LangEn.wordlist();\n }\n const indices = [0];\n let remainingBits = 11;\n for (let i3 = 0; i3 < entropy.length; i3++) {\n if (remainingBits > 8) {\n indices[indices.length - 1] <<= 8;\n indices[indices.length - 1] |= entropy[i3];\n remainingBits -= 8;\n } else {\n indices[indices.length - 1] <<= remainingBits;\n indices[indices.length - 1] |= entropy[i3] >> 8 - remainingBits;\n indices.push(entropy[i3] & getLowerMask(8 - remainingBits));\n remainingBits += 3;\n }\n }\n const checksumBits = entropy.length / 4;\n const checksum4 = parseInt((0, index_js_1.sha256)(entropy).substring(2, 4), 16) & getUpperMask(checksumBits);\n indices[indices.length - 1] <<= checksumBits;\n indices[indices.length - 1] |= checksum4 >> 8 - checksumBits;\n return wordlist.join(indices.map((index2) => wordlist.getWord(index2)));\n }\n var _guard = {};\n var Mnemonic = class _Mnemonic {\n /**\n * The mnemonic phrase of 12, 15, 18, 21 or 24 words.\n *\n * Use the [[wordlist]] ``split`` method to get the individual words.\n */\n phrase;\n /**\n * The password used for this mnemonic. If no password is used this\n * is the empty string (i.e. ``\"\"``) as per the specification.\n */\n password;\n /**\n * The wordlist for this mnemonic.\n */\n wordlist;\n /**\n * The underlying entropy which the mnemonic encodes.\n */\n entropy;\n /**\n * @private\n */\n constructor(guard, entropy, phrase, password, wordlist) {\n if (password == null) {\n password = \"\";\n }\n if (wordlist == null) {\n wordlist = lang_en_js_1.LangEn.wordlist();\n }\n (0, index_js_2.assertPrivate)(guard, _guard, \"Mnemonic\");\n (0, index_js_2.defineProperties)(this, { phrase, password, wordlist, entropy });\n }\n /**\n * Returns the seed for the mnemonic.\n */\n computeSeed() {\n const salt = (0, index_js_2.toUtf8Bytes)(\"mnemonic\" + this.password, \"NFKD\");\n return (0, index_js_1.pbkdf2)((0, index_js_2.toUtf8Bytes)(this.phrase, \"NFKD\"), salt, 2048, 64, \"sha512\");\n }\n /**\n * Creates a new Mnemonic for the %%phrase%%.\n *\n * The default %%password%% is the empty string and the default\n * wordlist is the [English wordlists](LangEn).\n */\n static fromPhrase(phrase, password, wordlist) {\n const entropy = mnemonicToEntropy(phrase, wordlist);\n phrase = entropyToMnemonic((0, index_js_2.getBytes)(entropy), wordlist);\n return new _Mnemonic(_guard, entropy, phrase, password, wordlist);\n }\n /**\n * Create a new **Mnemonic** from the %%entropy%%.\n *\n * The default %%password%% is the empty string and the default\n * wordlist is the [English wordlists](LangEn).\n */\n static fromEntropy(_entropy, password, wordlist) {\n const entropy = (0, index_js_2.getBytes)(_entropy, \"entropy\");\n const phrase = entropyToMnemonic(entropy, wordlist);\n return new _Mnemonic(_guard, (0, index_js_2.hexlify)(entropy), phrase, password, wordlist);\n }\n /**\n * Returns the phrase for %%mnemonic%%.\n */\n static entropyToPhrase(_entropy, wordlist) {\n const entropy = (0, index_js_2.getBytes)(_entropy, \"entropy\");\n return entropyToMnemonic(entropy, wordlist);\n }\n /**\n * Returns the entropy for %%phrase%%.\n */\n static phraseToEntropy(phrase, wordlist) {\n return mnemonicToEntropy(phrase, wordlist);\n }\n /**\n * Returns true if %%phrase%% is a valid [[link-bip-39]] phrase.\n *\n * This checks all the provided words belong to the %%wordlist%%,\n * that the length is valid and the checksum is correct.\n */\n static isValidMnemonic(phrase, wordlist) {\n try {\n mnemonicToEntropy(phrase, wordlist);\n return true;\n } catch (error) {\n }\n return false;\n }\n };\n exports3.Mnemonic = Mnemonic;\n }\n });\n\n // ../../../node_modules/.pnpm/aes-js@4.0.0-beta.5/node_modules/aes-js/lib.commonjs/aes.js\n var require_aes = __commonJS({\n \"../../../node_modules/.pnpm/aes-js@4.0.0-beta.5/node_modules/aes-js/lib.commonjs/aes.js\"(exports3) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n var __classPrivateFieldGet3 = exports3 && exports3.__classPrivateFieldGet || function(receiver, state, kind, f6) {\n if (kind === \"a\" && !f6)\n throw new TypeError(\"Private accessor was defined without a getter\");\n if (typeof state === \"function\" ? receiver !== state || !f6 : !state.has(receiver))\n throw new TypeError(\"Cannot read private member from an object whose class did not declare it\");\n return kind === \"m\" ? f6 : kind === \"a\" ? f6.call(receiver) : f6 ? f6.value : state.get(receiver);\n };\n var __classPrivateFieldSet3 = exports3 && exports3.__classPrivateFieldSet || function(receiver, state, value, kind, f6) {\n if (kind === \"m\")\n throw new TypeError(\"Private method is not writable\");\n if (kind === \"a\" && !f6)\n throw new TypeError(\"Private accessor was defined without a setter\");\n if (typeof state === \"function\" ? receiver !== state || !f6 : !state.has(receiver))\n throw new TypeError(\"Cannot write private member to an object whose class did not declare it\");\n return kind === \"a\" ? f6.call(receiver, value) : f6 ? f6.value = value : state.set(receiver, value), value;\n };\n var _AES_key;\n var _AES_Kd;\n var _AES_Ke;\n Object.defineProperty(exports3, \"__esModule\", { value: true });\n exports3.AES = void 0;\n var numberOfRounds = { 16: 10, 24: 12, 32: 14 };\n var rcon = [1, 2, 4, 8, 16, 32, 64, 128, 27, 54, 108, 216, 171, 77, 154, 47, 94, 188, 99, 198, 151, 53, 106, 212, 179, 125, 250, 239, 197, 145];\n var S3 = [99, 124, 119, 123, 242, 107, 111, 197, 48, 1, 103, 43, 254, 215, 171, 118, 202, 130, 201, 125, 250, 89, 71, 240, 173, 212, 162, 175, 156, 164, 114, 192, 183, 253, 147, 38, 54, 63, 247, 204, 52, 165, 229, 241, 113, 216, 49, 21, 4, 199, 35, 195, 24, 150, 5, 154, 7, 18, 128, 226, 235, 39, 178, 117, 9, 131, 44, 26, 27, 110, 90, 160, 82, 59, 214, 179, 41, 227, 47, 132, 83, 209, 0, 237, 32, 252, 177, 91, 106, 203, 190, 57, 74, 76, 88, 207, 208, 239, 170, 251, 67, 77, 51, 133, 69, 249, 2, 127, 80, 60, 159, 168, 81, 163, 64, 143, 146, 157, 56, 245, 188, 182, 218, 33, 16, 255, 243, 210, 205, 12, 19, 236, 95, 151, 68, 23, 196, 167, 126, 61, 100, 93, 25, 115, 96, 129, 79, 220, 34, 42, 144, 136, 70, 238, 184, 20, 222, 94, 11, 219, 224, 50, 58, 10, 73, 6, 36, 92, 194, 211, 172, 98, 145, 149, 228, 121, 231, 200, 55, 109, 141, 213, 78, 169, 108, 86, 244, 234, 101, 122, 174, 8, 186, 120, 37, 46, 28, 166, 180, 198, 232, 221, 116, 31, 75, 189, 139, 138, 112, 62, 181, 102, 72, 3, 246, 14, 97, 53, 87, 185, 134, 193, 29, 158, 225, 248, 152, 17, 105, 217, 142, 148, 155, 30, 135, 233, 206, 85, 40, 223, 140, 161, 137, 13, 191, 230, 66, 104, 65, 153, 45, 15, 176, 84, 187, 22];\n var Si = [82, 9, 106, 213, 48, 54, 165, 56, 191, 64, 163, 158, 129, 243, 215, 251, 124, 227, 57, 130, 155, 47, 255, 135, 52, 142, 67, 68, 196, 222, 233, 203, 84, 123, 148, 50, 166, 194, 35, 61, 238, 76, 149, 11, 66, 250, 195, 78, 8, 46, 161, 102, 40, 217, 36, 178, 118, 91, 162, 73, 109, 139, 209, 37, 114, 248, 246, 100, 134, 104, 152, 22, 212, 164, 92, 204, 93, 101, 182, 146, 108, 112, 72, 80, 253, 237, 185, 218, 94, 21, 70, 87, 167, 141, 157, 132, 144, 216, 171, 0, 140, 188, 211, 10, 247, 228, 88, 5, 184, 179, 69, 6, 208, 44, 30, 143, 202, 63, 15, 2, 193, 175, 189, 3, 1, 19, 138, 107, 58, 145, 17, 65, 79, 103, 220, 234, 151, 242, 207, 206, 240, 180, 230, 115, 150, 172, 116, 34, 231, 173, 53, 133, 226, 249, 55, 232, 28, 117, 223, 110, 71, 241, 26, 113, 29, 41, 197, 137, 111, 183, 98, 14, 170, 24, 190, 27, 252, 86, 62, 75, 198, 210, 121, 32, 154, 219, 192, 254, 120, 205, 90, 244, 31, 221, 168, 51, 136, 7, 199, 49, 177, 18, 16, 89, 39, 128, 236, 95, 96, 81, 127, 169, 25, 181, 74, 13, 45, 229, 122, 159, 147, 201, 156, 239, 160, 224, 59, 77, 174, 42, 245, 176, 200, 235, 187, 60, 131, 83, 153, 97, 23, 43, 4, 126, 186, 119, 214, 38, 225, 105, 20, 99, 85, 33, 12, 125];\n var T1 = [3328402341, 4168907908, 4000806809, 4135287693, 4294111757, 3597364157, 3731845041, 2445657428, 1613770832, 33620227, 3462883241, 1445669757, 3892248089, 3050821474, 1303096294, 3967186586, 2412431941, 528646813, 2311702848, 4202528135, 4026202645, 2992200171, 2387036105, 4226871307, 1101901292, 3017069671, 1604494077, 1169141738, 597466303, 1403299063, 3832705686, 2613100635, 1974974402, 3791519004, 1033081774, 1277568618, 1815492186, 2118074177, 4126668546, 2211236943, 1748251740, 1369810420, 3521504564, 4193382664, 3799085459, 2883115123, 1647391059, 706024767, 134480908, 2512897874, 1176707941, 2646852446, 806885416, 932615841, 168101135, 798661301, 235341577, 605164086, 461406363, 3756188221, 3454790438, 1311188841, 2142417613, 3933566367, 302582043, 495158174, 1479289972, 874125870, 907746093, 3698224818, 3025820398, 1537253627, 2756858614, 1983593293, 3084310113, 2108928974, 1378429307, 3722699582, 1580150641, 327451799, 2790478837, 3117535592, 0, 3253595436, 1075847264, 3825007647, 2041688520, 3059440621, 3563743934, 2378943302, 1740553945, 1916352843, 2487896798, 2555137236, 2958579944, 2244988746, 3151024235, 3320835882, 1336584933, 3992714006, 2252555205, 2588757463, 1714631509, 293963156, 2319795663, 3925473552, 67240454, 4269768577, 2689618160, 2017213508, 631218106, 1269344483, 2723238387, 1571005438, 2151694528, 93294474, 1066570413, 563977660, 1882732616, 4059428100, 1673313503, 2008463041, 2950355573, 1109467491, 537923632, 3858759450, 4260623118, 3218264685, 2177748300, 403442708, 638784309, 3287084079, 3193921505, 899127202, 2286175436, 773265209, 2479146071, 1437050866, 4236148354, 2050833735, 3362022572, 3126681063, 840505643, 3866325909, 3227541664, 427917720, 2655997905, 2749160575, 1143087718, 1412049534, 999329963, 193497219, 2353415882, 3354324521, 1807268051, 672404540, 2816401017, 3160301282, 369822493, 2916866934, 3688947771, 1681011286, 1949973070, 336202270, 2454276571, 201721354, 1210328172, 3093060836, 2680341085, 3184776046, 1135389935, 3294782118, 965841320, 831886756, 3554993207, 4068047243, 3588745010, 2345191491, 1849112409, 3664604599, 26054028, 2983581028, 2622377682, 1235855840, 3630984372, 2891339514, 4092916743, 3488279077, 3395642799, 4101667470, 1202630377, 268961816, 1874508501, 4034427016, 1243948399, 1546530418, 941366308, 1470539505, 1941222599, 2546386513, 3421038627, 2715671932, 3899946140, 1042226977, 2521517021, 1639824860, 227249030, 260737669, 3765465232, 2084453954, 1907733956, 3429263018, 2420656344, 100860677, 4160157185, 470683154, 3261161891, 1781871967, 2924959737, 1773779408, 394692241, 2579611992, 974986535, 664706745, 3655459128, 3958962195, 731420851, 571543859, 3530123707, 2849626480, 126783113, 865375399, 765172662, 1008606754, 361203602, 3387549984, 2278477385, 2857719295, 1344809080, 2782912378, 59542671, 1503764984, 160008576, 437062935, 1707065306, 3622233649, 2218934982, 3496503480, 2185314755, 697932208, 1512910199, 504303377, 2075177163, 2824099068, 1841019862, 739644986];\n var T22 = [2781242211, 2230877308, 2582542199, 2381740923, 234877682, 3184946027, 2984144751, 1418839493, 1348481072, 50462977, 2848876391, 2102799147, 434634494, 1656084439, 3863849899, 2599188086, 1167051466, 2636087938, 1082771913, 2281340285, 368048890, 3954334041, 3381544775, 201060592, 3963727277, 1739838676, 4250903202, 3930435503, 3206782108, 4149453988, 2531553906, 1536934080, 3262494647, 484572669, 2923271059, 1783375398, 1517041206, 1098792767, 49674231, 1334037708, 1550332980, 4098991525, 886171109, 150598129, 2481090929, 1940642008, 1398944049, 1059722517, 201851908, 1385547719, 1699095331, 1587397571, 674240536, 2704774806, 252314885, 3039795866, 151914247, 908333586, 2602270848, 1038082786, 651029483, 1766729511, 3447698098, 2682942837, 454166793, 2652734339, 1951935532, 775166490, 758520603, 3000790638, 4004797018, 4217086112, 4137964114, 1299594043, 1639438038, 3464344499, 2068982057, 1054729187, 1901997871, 2534638724, 4121318227, 1757008337, 0, 750906861, 1614815264, 535035132, 3363418545, 3988151131, 3201591914, 1183697867, 3647454910, 1265776953, 3734260298, 3566750796, 3903871064, 1250283471, 1807470800, 717615087, 3847203498, 384695291, 3313910595, 3617213773, 1432761139, 2484176261, 3481945413, 283769337, 100925954, 2180939647, 4037038160, 1148730428, 3123027871, 3813386408, 4087501137, 4267549603, 3229630528, 2315620239, 2906624658, 3156319645, 1215313976, 82966005, 3747855548, 3245848246, 1974459098, 1665278241, 807407632, 451280895, 251524083, 1841287890, 1283575245, 337120268, 891687699, 801369324, 3787349855, 2721421207, 3431482436, 959321879, 1469301956, 4065699751, 2197585534, 1199193405, 2898814052, 3887750493, 724703513, 2514908019, 2696962144, 2551808385, 3516813135, 2141445340, 1715741218, 2119445034, 2872807568, 2198571144, 3398190662, 700968686, 3547052216, 1009259540, 2041044702, 3803995742, 487983883, 1991105499, 1004265696, 1449407026, 1316239930, 504629770, 3683797321, 168560134, 1816667172, 3837287516, 1570751170, 1857934291, 4014189740, 2797888098, 2822345105, 2754712981, 936633572, 2347923833, 852879335, 1133234376, 1500395319, 3084545389, 2348912013, 1689376213, 3533459022, 3762923945, 3034082412, 4205598294, 133428468, 634383082, 2949277029, 2398386810, 3913789102, 403703816, 3580869306, 2297460856, 1867130149, 1918643758, 607656988, 4049053350, 3346248884, 1368901318, 600565992, 2090982877, 2632479860, 557719327, 3717614411, 3697393085, 2249034635, 2232388234, 2430627952, 1115438654, 3295786421, 2865522278, 3633334344, 84280067, 33027830, 303828494, 2747425121, 1600795957, 4188952407, 3496589753, 2434238086, 1486471617, 658119965, 3106381470, 953803233, 334231800, 3005978776, 857870609, 3151128937, 1890179545, 2298973838, 2805175444, 3056442267, 574365214, 2450884487, 550103529, 1233637070, 4289353045, 2018519080, 2057691103, 2399374476, 4166623649, 2148108681, 387583245, 3664101311, 836232934, 3330556482, 3100665960, 3280093505, 2955516313, 2002398509, 287182607, 3413881008, 4238890068, 3597515707, 975967766];\n var T32 = [1671808611, 2089089148, 2006576759, 2072901243, 4061003762, 1807603307, 1873927791, 3310653893, 810573872, 16974337, 1739181671, 729634347, 4263110654, 3613570519, 2883997099, 1989864566, 3393556426, 2191335298, 3376449993, 2106063485, 4195741690, 1508618841, 1204391495, 4027317232, 2917941677, 3563566036, 2734514082, 2951366063, 2629772188, 2767672228, 1922491506, 3227229120, 3082974647, 4246528509, 2477669779, 644500518, 911895606, 1061256767, 4144166391, 3427763148, 878471220, 2784252325, 3845444069, 4043897329, 1905517169, 3631459288, 827548209, 356461077, 67897348, 3344078279, 593839651, 3277757891, 405286936, 2527147926, 84871685, 2595565466, 118033927, 305538066, 2157648768, 3795705826, 3945188843, 661212711, 2999812018, 1973414517, 152769033, 2208177539, 745822252, 439235610, 455947803, 1857215598, 1525593178, 2700827552, 1391895634, 994932283, 3596728278, 3016654259, 695947817, 3812548067, 795958831, 2224493444, 1408607827, 3513301457, 0, 3979133421, 543178784, 4229948412, 2982705585, 1542305371, 1790891114, 3410398667, 3201918910, 961245753, 1256100938, 1289001036, 1491644504, 3477767631, 3496721360, 4012557807, 2867154858, 4212583931, 1137018435, 1305975373, 861234739, 2241073541, 1171229253, 4178635257, 33948674, 2139225727, 1357946960, 1011120188, 2679776671, 2833468328, 1374921297, 2751356323, 1086357568, 2408187279, 2460827538, 2646352285, 944271416, 4110742005, 3168756668, 3066132406, 3665145818, 560153121, 271589392, 4279952895, 4077846003, 3530407890, 3444343245, 202643468, 322250259, 3962553324, 1608629855, 2543990167, 1154254916, 389623319, 3294073796, 2817676711, 2122513534, 1028094525, 1689045092, 1575467613, 422261273, 1939203699, 1621147744, 2174228865, 1339137615, 3699352540, 577127458, 712922154, 2427141008, 2290289544, 1187679302, 3995715566, 3100863416, 339486740, 3732514782, 1591917662, 186455563, 3681988059, 3762019296, 844522546, 978220090, 169743370, 1239126601, 101321734, 611076132, 1558493276, 3260915650, 3547250131, 2901361580, 1655096418, 2443721105, 2510565781, 3828863972, 2039214713, 3878868455, 3359869896, 928607799, 1840765549, 2374762893, 3580146133, 1322425422, 2850048425, 1823791212, 1459268694, 4094161908, 3928346602, 1706019429, 2056189050, 2934523822, 135794696, 3134549946, 2022240376, 628050469, 779246638, 472135708, 2800834470, 3032970164, 3327236038, 3894660072, 3715932637, 1956440180, 522272287, 1272813131, 3185336765, 2340818315, 2323976074, 1888542832, 1044544574, 3049550261, 1722469478, 1222152264, 50660867, 4127324150, 236067854, 1638122081, 895445557, 1475980887, 3117443513, 2257655686, 3243809217, 489110045, 2662934430, 3778599393, 4162055160, 2561878936, 288563729, 1773916777, 3648039385, 2391345038, 2493985684, 2612407707, 505560094, 2274497927, 3911240169, 3460925390, 1442818645, 678973480, 3749357023, 2358182796, 2717407649, 2306869641, 219617805, 3218761151, 3862026214, 1120306242, 1756942440, 1103331905, 2578459033, 762796589, 252780047, 2966125488, 1425844308, 3151392187, 372911126];\n var T4 = [1667474886, 2088535288, 2004326894, 2071694838, 4075949567, 1802223062, 1869591006, 3318043793, 808472672, 16843522, 1734846926, 724270422, 4278065639, 3621216949, 2880169549, 1987484396, 3402253711, 2189597983, 3385409673, 2105378810, 4210693615, 1499065266, 1195886990, 4042263547, 2913856577, 3570689971, 2728590687, 2947541573, 2627518243, 2762274643, 1920112356, 3233831835, 3082273397, 4261223649, 2475929149, 640051788, 909531756, 1061110142, 4160160501, 3435941763, 875846760, 2779116625, 3857003729, 4059105529, 1903268834, 3638064043, 825316194, 353713962, 67374088, 3351728789, 589522246, 3284360861, 404236336, 2526454071, 84217610, 2593830191, 117901582, 303183396, 2155911963, 3806477791, 3958056653, 656894286, 2998062463, 1970642922, 151591698, 2206440989, 741110872, 437923380, 454765878, 1852748508, 1515908788, 2694904667, 1381168804, 993742198, 3604373943, 3014905469, 690584402, 3823320797, 791638366, 2223281939, 1398011302, 3520161977, 0, 3991743681, 538992704, 4244381667, 2981218425, 1532751286, 1785380564, 3419096717, 3200178535, 960056178, 1246420628, 1280103576, 1482221744, 3486468741, 3503319995, 4025428677, 2863326543, 4227536621, 1128514950, 1296947098, 859002214, 2240123921, 1162203018, 4193849577, 33687044, 2139062782, 1347481760, 1010582648, 2678045221, 2829640523, 1364325282, 2745433693, 1077985408, 2408548869, 2459086143, 2644360225, 943212656, 4126475505, 3166494563, 3065430391, 3671750063, 555836226, 269496352, 4294908645, 4092792573, 3537006015, 3452783745, 202118168, 320025894, 3974901699, 1600119230, 2543297077, 1145359496, 387397934, 3301201811, 2812801621, 2122220284, 1027426170, 1684319432, 1566435258, 421079858, 1936954854, 1616945344, 2172753945, 1330631070, 3705438115, 572679748, 707427924, 2425400123, 2290647819, 1179044492, 4008585671, 3099120491, 336870440, 3739122087, 1583276732, 185277718, 3688593069, 3772791771, 842159716, 976899700, 168435220, 1229577106, 101059084, 606366792, 1549591736, 3267517855, 3553849021, 2897014595, 1650632388, 2442242105, 2509612081, 3840161747, 2038008818, 3890688725, 3368567691, 926374254, 1835907034, 2374863873, 3587531953, 1313788572, 2846482505, 1819063512, 1448540844, 4109633523, 3941213647, 1701162954, 2054852340, 2930698567, 134748176, 3132806511, 2021165296, 623210314, 774795868, 471606328, 2795958615, 3031746419, 3334885783, 3907527627, 3722280097, 1953799400, 522133822, 1263263126, 3183336545, 2341176845, 2324333839, 1886425312, 1044267644, 3048588401, 1718004428, 1212733584, 50529542, 4143317495, 235803164, 1633788866, 892690282, 1465383342, 3115962473, 2256965911, 3250673817, 488449850, 2661202215, 3789633753, 4177007595, 2560144171, 286339874, 1768537042, 3654906025, 2391705863, 2492770099, 2610673197, 505291324, 2273808917, 3924369609, 3469625735, 1431699370, 673740880, 3755965093, 2358021891, 2711746649, 2307489801, 218961690, 3217021541, 3873845719, 1111672452, 1751693520, 1094828930, 2576986153, 757954394, 252645662, 2964376443, 1414855848, 3149649517, 370555436];\n var T5 = [1374988112, 2118214995, 437757123, 975658646, 1001089995, 530400753, 2902087851, 1273168787, 540080725, 2910219766, 2295101073, 4110568485, 1340463100, 3307916247, 641025152, 3043140495, 3736164937, 632953703, 1172967064, 1576976609, 3274667266, 2169303058, 2370213795, 1809054150, 59727847, 361929877, 3211623147, 2505202138, 3569255213, 1484005843, 1239443753, 2395588676, 1975683434, 4102977912, 2572697195, 666464733, 3202437046, 4035489047, 3374361702, 2110667444, 1675577880, 3843699074, 2538681184, 1649639237, 2976151520, 3144396420, 4269907996, 4178062228, 1883793496, 2403728665, 2497604743, 1383856311, 2876494627, 1917518562, 3810496343, 1716890410, 3001755655, 800440835, 2261089178, 3543599269, 807962610, 599762354, 33778362, 3977675356, 2328828971, 2809771154, 4077384432, 1315562145, 1708848333, 101039829, 3509871135, 3299278474, 875451293, 2733856160, 92987698, 2767645557, 193195065, 1080094634, 1584504582, 3178106961, 1042385657, 2531067453, 3711829422, 1306967366, 2438237621, 1908694277, 67556463, 1615861247, 429456164, 3602770327, 2302690252, 1742315127, 2968011453, 126454664, 3877198648, 2043211483, 2709260871, 2084704233, 4169408201, 0, 159417987, 841739592, 504459436, 1817866830, 4245618683, 260388950, 1034867998, 908933415, 168810852, 1750902305, 2606453969, 607530554, 202008497, 2472011535, 3035535058, 463180190, 2160117071, 1641816226, 1517767529, 470948374, 3801332234, 3231722213, 1008918595, 303765277, 235474187, 4069246893, 766945465, 337553864, 1475418501, 2943682380, 4003061179, 2743034109, 4144047775, 1551037884, 1147550661, 1543208500, 2336434550, 3408119516, 3069049960, 3102011747, 3610369226, 1113818384, 328671808, 2227573024, 2236228733, 3535486456, 2935566865, 3341394285, 496906059, 3702665459, 226906860, 2009195472, 733156972, 2842737049, 294930682, 1206477858, 2835123396, 2700099354, 1451044056, 573804783, 2269728455, 3644379585, 2362090238, 2564033334, 2801107407, 2776292904, 3669462566, 1068351396, 742039012, 1350078989, 1784663195, 1417561698, 4136440770, 2430122216, 775550814, 2193862645, 2673705150, 1775276924, 1876241833, 3475313331, 3366754619, 270040487, 3902563182, 3678124923, 3441850377, 1851332852, 3969562369, 2203032232, 3868552805, 2868897406, 566021896, 4011190502, 3135740889, 1248802510, 3936291284, 699432150, 832877231, 708780849, 3332740144, 899835584, 1951317047, 4236429990, 3767586992, 866637845, 4043610186, 1106041591, 2144161806, 395441711, 1984812685, 1139781709, 3433712980, 3835036895, 2664543715, 1282050075, 3240894392, 1181045119, 2640243204, 25965917, 4203181171, 4211818798, 3009879386, 2463879762, 3910161971, 1842759443, 2597806476, 933301370, 1509430414, 3943906441, 3467192302, 3076639029, 3776767469, 2051518780, 2631065433, 1441952575, 404016761, 1942435775, 1408749034, 1610459739, 3745345300, 2017778566, 3400528769, 3110650942, 941896748, 3265478751, 371049330, 3168937228, 675039627, 4279080257, 967311729, 135050206, 3635733660, 1683407248, 2076935265, 3576870512, 1215061108, 3501741890];\n var T6 = [1347548327, 1400783205, 3273267108, 2520393566, 3409685355, 4045380933, 2880240216, 2471224067, 1428173050, 4138563181, 2441661558, 636813900, 4233094615, 3620022987, 2149987652, 2411029155, 1239331162, 1730525723, 2554718734, 3781033664, 46346101, 310463728, 2743944855, 3328955385, 3875770207, 2501218972, 3955191162, 3667219033, 768917123, 3545789473, 692707433, 1150208456, 1786102409, 2029293177, 1805211710, 3710368113, 3065962831, 401639597, 1724457132, 3028143674, 409198410, 2196052529, 1620529459, 1164071807, 3769721975, 2226875310, 486441376, 2499348523, 1483753576, 428819965, 2274680428, 3075636216, 598438867, 3799141122, 1474502543, 711349675, 129166120, 53458370, 2592523643, 2782082824, 4063242375, 2988687269, 3120694122, 1559041666, 730517276, 2460449204, 4042459122, 2706270690, 3446004468, 3573941694, 533804130, 2328143614, 2637442643, 2695033685, 839224033, 1973745387, 957055980, 2856345839, 106852767, 1371368976, 4181598602, 1033297158, 2933734917, 1179510461, 3046200461, 91341917, 1862534868, 4284502037, 605657339, 2547432937, 3431546947, 2003294622, 3182487618, 2282195339, 954669403, 3682191598, 1201765386, 3917234703, 3388507166, 0, 2198438022, 1211247597, 2887651696, 1315723890, 4227665663, 1443857720, 507358933, 657861945, 1678381017, 560487590, 3516619604, 975451694, 2970356327, 261314535, 3535072918, 2652609425, 1333838021, 2724322336, 1767536459, 370938394, 182621114, 3854606378, 1128014560, 487725847, 185469197, 2918353863, 3106780840, 3356761769, 2237133081, 1286567175, 3152976349, 4255350624, 2683765030, 3160175349, 3309594171, 878443390, 1988838185, 3704300486, 1756818940, 1673061617, 3403100636, 272786309, 1075025698, 545572369, 2105887268, 4174560061, 296679730, 1841768865, 1260232239, 4091327024, 3960309330, 3497509347, 1814803222, 2578018489, 4195456072, 575138148, 3299409036, 446754879, 3629546796, 4011996048, 3347532110, 3252238545, 4270639778, 915985419, 3483825537, 681933534, 651868046, 2755636671, 3828103837, 223377554, 2607439820, 1649704518, 3270937875, 3901806776, 1580087799, 4118987695, 3198115200, 2087309459, 2842678573, 3016697106, 1003007129, 2802849917, 1860738147, 2077965243, 164439672, 4100872472, 32283319, 2827177882, 1709610350, 2125135846, 136428751, 3874428392, 3652904859, 3460984630, 3572145929, 3593056380, 2939266226, 824852259, 818324884, 3224740454, 930369212, 2801566410, 2967507152, 355706840, 1257309336, 4148292826, 243256656, 790073846, 2373340630, 1296297904, 1422699085, 3756299780, 3818836405, 457992840, 3099667487, 2135319889, 77422314, 1560382517, 1945798516, 788204353, 1521706781, 1385356242, 870912086, 325965383, 2358957921, 2050466060, 2388260884, 2313884476, 4006521127, 901210569, 3990953189, 1014646705, 1503449823, 1062597235, 2031621326, 3212035895, 3931371469, 1533017514, 350174575, 2256028891, 2177544179, 1052338372, 741876788, 1606591296, 1914052035, 213705253, 2334669897, 1107234197, 1899603969, 3725069491, 2631447780, 2422494913, 1635502980, 1893020342, 1950903388, 1120974935];\n var T7 = [2807058932, 1699970625, 2764249623, 1586903591, 1808481195, 1173430173, 1487645946, 59984867, 4199882800, 1844882806, 1989249228, 1277555970, 3623636965, 3419915562, 1149249077, 2744104290, 1514790577, 459744698, 244860394, 3235995134, 1963115311, 4027744588, 2544078150, 4190530515, 1608975247, 2627016082, 2062270317, 1507497298, 2200818878, 567498868, 1764313568, 3359936201, 2305455554, 2037970062, 1047239e3, 1910319033, 1337376481, 2904027272, 2892417312, 984907214, 1243112415, 830661914, 861968209, 2135253587, 2011214180, 2927934315, 2686254721, 731183368, 1750626376, 4246310725, 1820824798, 4172763771, 3542330227, 48394827, 2404901663, 2871682645, 671593195, 3254988725, 2073724613, 145085239, 2280796200, 2779915199, 1790575107, 2187128086, 472615631, 3029510009, 4075877127, 3802222185, 4107101658, 3201631749, 1646252340, 4270507174, 1402811438, 1436590835, 3778151818, 3950355702, 3963161475, 4020912224, 2667994737, 273792366, 2331590177, 104699613, 95345982, 3175501286, 2377486676, 1560637892, 3564045318, 369057872, 4213447064, 3919042237, 1137477952, 2658625497, 1119727848, 2340947849, 1530455833, 4007360968, 172466556, 266959938, 516552836, 0, 2256734592, 3980931627, 1890328081, 1917742170, 4294704398, 945164165, 3575528878, 958871085, 3647212047, 2787207260, 1423022939, 775562294, 1739656202, 3876557655, 2530391278, 2443058075, 3310321856, 547512796, 1265195639, 437656594, 3121275539, 719700128, 3762502690, 387781147, 218828297, 3350065803, 2830708150, 2848461854, 428169201, 122466165, 3720081049, 1627235199, 648017665, 4122762354, 1002783846, 2117360635, 695634755, 3336358691, 4234721005, 4049844452, 3704280881, 2232435299, 574624663, 287343814, 612205898, 1039717051, 840019705, 2708326185, 793451934, 821288114, 1391201670, 3822090177, 376187827, 3113855344, 1224348052, 1679968233, 2361698556, 1058709744, 752375421, 2431590963, 1321699145, 3519142200, 2734591178, 188127444, 2177869557, 3727205754, 2384911031, 3215212461, 2648976442, 2450346104, 3432737375, 1180849278, 331544205, 3102249176, 4150144569, 2952102595, 2159976285, 2474404304, 766078933, 313773861, 2570832044, 2108100632, 1668212892, 3145456443, 2013908262, 418672217, 3070356634, 2594734927, 1852171925, 3867060991, 3473416636, 3907448597, 2614737639, 919489135, 164948639, 2094410160, 2997825956, 590424639, 2486224549, 1723872674, 3157750862, 3399941250, 3501252752, 3625268135, 2555048196, 3673637356, 1343127501, 4130281361, 3599595085, 2957853679, 1297403050, 81781910, 3051593425, 2283490410, 532201772, 1367295589, 3926170974, 895287692, 1953757831, 1093597963, 492483431, 3528626907, 1446242576, 1192455638, 1636604631, 209336225, 344873464, 1015671571, 669961897, 3375740769, 3857572124, 2973530695, 3747192018, 1933530610, 3464042516, 935293895, 3454686199, 2858115069, 1863638845, 3683022916, 4085369519, 3292445032, 875313188, 1080017571, 3279033885, 621591778, 1233856572, 2504130317, 24197544, 3017672716, 3835484340, 3247465558, 2220981195, 3060847922, 1551124588, 1463996600];\n var T8 = [4104605777, 1097159550, 396673818, 660510266, 2875968315, 2638606623, 4200115116, 3808662347, 821712160, 1986918061, 3430322568, 38544885, 3856137295, 718002117, 893681702, 1654886325, 2975484382, 3122358053, 3926825029, 4274053469, 796197571, 1290801793, 1184342925, 3556361835, 2405426947, 2459735317, 1836772287, 1381620373, 3196267988, 1948373848, 3764988233, 3385345166, 3263785589, 2390325492, 1480485785, 3111247143, 3780097726, 2293045232, 548169417, 3459953789, 3746175075, 439452389, 1362321559, 1400849762, 1685577905, 1806599355, 2174754046, 137073913, 1214797936, 1174215055, 3731654548, 2079897426, 1943217067, 1258480242, 529487843, 1437280870, 3945269170, 3049390895, 3313212038, 923313619, 679998e3, 3215307299, 57326082, 377642221, 3474729866, 2041877159, 133361907, 1776460110, 3673476453, 96392454, 878845905, 2801699524, 777231668, 4082475170, 2330014213, 4142626212, 2213296395, 1626319424, 1906247262, 1846563261, 562755902, 3708173718, 1040559837, 3871163981, 1418573201, 3294430577, 114585348, 1343618912, 2566595609, 3186202582, 1078185097, 3651041127, 3896688048, 2307622919, 425408743, 3371096953, 2081048481, 1108339068, 2216610296, 0, 2156299017, 736970802, 292596766, 1517440620, 251657213, 2235061775, 2933202493, 758720310, 265905162, 1554391400, 1532285339, 908999204, 174567692, 1474760595, 4002861748, 2610011675, 3234156416, 3693126241, 2001430874, 303699484, 2478443234, 2687165888, 585122620, 454499602, 151849742, 2345119218, 3064510765, 514443284, 4044981591, 1963412655, 2581445614, 2137062819, 19308535, 1928707164, 1715193156, 4219352155, 1126790795, 600235211, 3992742070, 3841024952, 836553431, 1669664834, 2535604243, 3323011204, 1243905413, 3141400786, 4180808110, 698445255, 2653899549, 2989552604, 2253581325, 3252932727, 3004591147, 1891211689, 2487810577, 3915653703, 4237083816, 4030667424, 2100090966, 865136418, 1229899655, 953270745, 3399679628, 3557504664, 4118925222, 2061379749, 3079546586, 2915017791, 983426092, 2022837584, 1607244650, 2118541908, 2366882550, 3635996816, 972512814, 3283088770, 1568718495, 3499326569, 3576539503, 621982671, 2895723464, 410887952, 2623762152, 1002142683, 645401037, 1494807662, 2595684844, 1335535747, 2507040230, 4293295786, 3167684641, 367585007, 3885750714, 1865862730, 2668221674, 2960971305, 2763173681, 1059270954, 2777952454, 2724642869, 1320957812, 2194319100, 2429595872, 2815956275, 77089521, 3973773121, 3444575871, 2448830231, 1305906550, 4021308739, 2857194700, 2516901860, 3518358430, 1787304780, 740276417, 1699839814, 1592394909, 2352307457, 2272556026, 188821243, 1729977011, 3687994002, 274084841, 3594982253, 3613494426, 2701949495, 4162096729, 322734571, 2837966542, 1640576439, 484830689, 1202797690, 3537852828, 4067639125, 349075736, 3342319475, 4157467219, 4255800159, 1030690015, 1155237496, 2951971274, 1757691577, 607398968, 2738905026, 499347990, 3794078908, 1011452712, 227885567, 2818666809, 213114376, 3034881240, 1455525988, 3414450555, 850817237, 1817998408, 3092726480];\n var U1 = [0, 235474187, 470948374, 303765277, 941896748, 908933415, 607530554, 708780849, 1883793496, 2118214995, 1817866830, 1649639237, 1215061108, 1181045119, 1417561698, 1517767529, 3767586992, 4003061179, 4236429990, 4069246893, 3635733660, 3602770327, 3299278474, 3400528769, 2430122216, 2664543715, 2362090238, 2193862645, 2835123396, 2801107407, 3035535058, 3135740889, 3678124923, 3576870512, 3341394285, 3374361702, 3810496343, 3977675356, 4279080257, 4043610186, 2876494627, 2776292904, 3076639029, 3110650942, 2472011535, 2640243204, 2403728665, 2169303058, 1001089995, 899835584, 666464733, 699432150, 59727847, 226906860, 530400753, 294930682, 1273168787, 1172967064, 1475418501, 1509430414, 1942435775, 2110667444, 1876241833, 1641816226, 2910219766, 2743034109, 2976151520, 3211623147, 2505202138, 2606453969, 2302690252, 2269728455, 3711829422, 3543599269, 3240894392, 3475313331, 3843699074, 3943906441, 4178062228, 4144047775, 1306967366, 1139781709, 1374988112, 1610459739, 1975683434, 2076935265, 1775276924, 1742315127, 1034867998, 866637845, 566021896, 800440835, 92987698, 193195065, 429456164, 395441711, 1984812685, 2017778566, 1784663195, 1683407248, 1315562145, 1080094634, 1383856311, 1551037884, 101039829, 135050206, 437757123, 337553864, 1042385657, 807962610, 573804783, 742039012, 2531067453, 2564033334, 2328828971, 2227573024, 2935566865, 2700099354, 3001755655, 3168937228, 3868552805, 3902563182, 4203181171, 4102977912, 3736164937, 3501741890, 3265478751, 3433712980, 1106041591, 1340463100, 1576976609, 1408749034, 2043211483, 2009195472, 1708848333, 1809054150, 832877231, 1068351396, 766945465, 599762354, 159417987, 126454664, 361929877, 463180190, 2709260871, 2943682380, 3178106961, 3009879386, 2572697195, 2538681184, 2236228733, 2336434550, 3509871135, 3745345300, 3441850377, 3274667266, 3910161971, 3877198648, 4110568485, 4211818798, 2597806476, 2497604743, 2261089178, 2295101073, 2733856160, 2902087851, 3202437046, 2968011453, 3936291284, 3835036895, 4136440770, 4169408201, 3535486456, 3702665459, 3467192302, 3231722213, 2051518780, 1951317047, 1716890410, 1750902305, 1113818384, 1282050075, 1584504582, 1350078989, 168810852, 67556463, 371049330, 404016761, 841739592, 1008918595, 775550814, 540080725, 3969562369, 3801332234, 4035489047, 4269907996, 3569255213, 3669462566, 3366754619, 3332740144, 2631065433, 2463879762, 2160117071, 2395588676, 2767645557, 2868897406, 3102011747, 3069049960, 202008497, 33778362, 270040487, 504459436, 875451293, 975658646, 675039627, 641025152, 2084704233, 1917518562, 1615861247, 1851332852, 1147550661, 1248802510, 1484005843, 1451044056, 933301370, 967311729, 733156972, 632953703, 260388950, 25965917, 328671808, 496906059, 1206477858, 1239443753, 1543208500, 1441952575, 2144161806, 1908694277, 1675577880, 1842759443, 3610369226, 3644379585, 3408119516, 3307916247, 4011190502, 3776767469, 4077384432, 4245618683, 2809771154, 2842737049, 3144396420, 3043140495, 2673705150, 2438237621, 2203032232, 2370213795];\n var U22 = [0, 185469197, 370938394, 487725847, 741876788, 657861945, 975451694, 824852259, 1483753576, 1400783205, 1315723890, 1164071807, 1950903388, 2135319889, 1649704518, 1767536459, 2967507152, 3152976349, 2801566410, 2918353863, 2631447780, 2547432937, 2328143614, 2177544179, 3901806776, 3818836405, 4270639778, 4118987695, 3299409036, 3483825537, 3535072918, 3652904859, 2077965243, 1893020342, 1841768865, 1724457132, 1474502543, 1559041666, 1107234197, 1257309336, 598438867, 681933534, 901210569, 1052338372, 261314535, 77422314, 428819965, 310463728, 3409685355, 3224740454, 3710368113, 3593056380, 3875770207, 3960309330, 4045380933, 4195456072, 2471224067, 2554718734, 2237133081, 2388260884, 3212035895, 3028143674, 2842678573, 2724322336, 4138563181, 4255350624, 3769721975, 3955191162, 3667219033, 3516619604, 3431546947, 3347532110, 2933734917, 2782082824, 3099667487, 3016697106, 2196052529, 2313884476, 2499348523, 2683765030, 1179510461, 1296297904, 1347548327, 1533017514, 1786102409, 1635502980, 2087309459, 2003294622, 507358933, 355706840, 136428751, 53458370, 839224033, 957055980, 605657339, 790073846, 2373340630, 2256028891, 2607439820, 2422494913, 2706270690, 2856345839, 3075636216, 3160175349, 3573941694, 3725069491, 3273267108, 3356761769, 4181598602, 4063242375, 4011996048, 3828103837, 1033297158, 915985419, 730517276, 545572369, 296679730, 446754879, 129166120, 213705253, 1709610350, 1860738147, 1945798516, 2029293177, 1239331162, 1120974935, 1606591296, 1422699085, 4148292826, 4233094615, 3781033664, 3931371469, 3682191598, 3497509347, 3446004468, 3328955385, 2939266226, 2755636671, 3106780840, 2988687269, 2198438022, 2282195339, 2501218972, 2652609425, 1201765386, 1286567175, 1371368976, 1521706781, 1805211710, 1620529459, 2105887268, 1988838185, 533804130, 350174575, 164439672, 46346101, 870912086, 954669403, 636813900, 788204353, 2358957921, 2274680428, 2592523643, 2441661558, 2695033685, 2880240216, 3065962831, 3182487618, 3572145929, 3756299780, 3270937875, 3388507166, 4174560061, 4091327024, 4006521127, 3854606378, 1014646705, 930369212, 711349675, 560487590, 272786309, 457992840, 106852767, 223377554, 1678381017, 1862534868, 1914052035, 2031621326, 1211247597, 1128014560, 1580087799, 1428173050, 32283319, 182621114, 401639597, 486441376, 768917123, 651868046, 1003007129, 818324884, 1503449823, 1385356242, 1333838021, 1150208456, 1973745387, 2125135846, 1673061617, 1756818940, 2970356327, 3120694122, 2802849917, 2887651696, 2637442643, 2520393566, 2334669897, 2149987652, 3917234703, 3799141122, 4284502037, 4100872472, 3309594171, 3460984630, 3545789473, 3629546796, 2050466060, 1899603969, 1814803222, 1730525723, 1443857720, 1560382517, 1075025698, 1260232239, 575138148, 692707433, 878443390, 1062597235, 243256656, 91341917, 409198410, 325965383, 3403100636, 3252238545, 3704300486, 3620022987, 3874428392, 3990953189, 4042459122, 4227665663, 2460449204, 2578018489, 2226875310, 2411029155, 3198115200, 3046200461, 2827177882, 2743944855];\n var U32 = [0, 218828297, 437656594, 387781147, 875313188, 958871085, 775562294, 590424639, 1750626376, 1699970625, 1917742170, 2135253587, 1551124588, 1367295589, 1180849278, 1265195639, 3501252752, 3720081049, 3399941250, 3350065803, 3835484340, 3919042237, 4270507174, 4085369519, 3102249176, 3051593425, 2734591178, 2952102595, 2361698556, 2177869557, 2530391278, 2614737639, 3145456443, 3060847922, 2708326185, 2892417312, 2404901663, 2187128086, 2504130317, 2555048196, 3542330227, 3727205754, 3375740769, 3292445032, 3876557655, 3926170974, 4246310725, 4027744588, 1808481195, 1723872674, 1910319033, 2094410160, 1608975247, 1391201670, 1173430173, 1224348052, 59984867, 244860394, 428169201, 344873464, 935293895, 984907214, 766078933, 547512796, 1844882806, 1627235199, 2011214180, 2062270317, 1507497298, 1423022939, 1137477952, 1321699145, 95345982, 145085239, 532201772, 313773861, 830661914, 1015671571, 731183368, 648017665, 3175501286, 2957853679, 2807058932, 2858115069, 2305455554, 2220981195, 2474404304, 2658625497, 3575528878, 3625268135, 3473416636, 3254988725, 3778151818, 3963161475, 4213447064, 4130281361, 3599595085, 3683022916, 3432737375, 3247465558, 3802222185, 4020912224, 4172763771, 4122762354, 3201631749, 3017672716, 2764249623, 2848461854, 2331590177, 2280796200, 2431590963, 2648976442, 104699613, 188127444, 472615631, 287343814, 840019705, 1058709744, 671593195, 621591778, 1852171925, 1668212892, 1953757831, 2037970062, 1514790577, 1463996600, 1080017571, 1297403050, 3673637356, 3623636965, 3235995134, 3454686199, 4007360968, 3822090177, 4107101658, 4190530515, 2997825956, 3215212461, 2830708150, 2779915199, 2256734592, 2340947849, 2627016082, 2443058075, 172466556, 122466165, 273792366, 492483431, 1047239e3, 861968209, 612205898, 695634755, 1646252340, 1863638845, 2013908262, 1963115311, 1446242576, 1530455833, 1277555970, 1093597963, 1636604631, 1820824798, 2073724613, 1989249228, 1436590835, 1487645946, 1337376481, 1119727848, 164948639, 81781910, 331544205, 516552836, 1039717051, 821288114, 669961897, 719700128, 2973530695, 3157750862, 2871682645, 2787207260, 2232435299, 2283490410, 2667994737, 2450346104, 3647212047, 3564045318, 3279033885, 3464042516, 3980931627, 3762502690, 4150144569, 4199882800, 3070356634, 3121275539, 2904027272, 2686254721, 2200818878, 2384911031, 2570832044, 2486224549, 3747192018, 3528626907, 3310321856, 3359936201, 3950355702, 3867060991, 4049844452, 4234721005, 1739656202, 1790575107, 2108100632, 1890328081, 1402811438, 1586903591, 1233856572, 1149249077, 266959938, 48394827, 369057872, 418672217, 1002783846, 919489135, 567498868, 752375421, 209336225, 24197544, 376187827, 459744698, 945164165, 895287692, 574624663, 793451934, 1679968233, 1764313568, 2117360635, 1933530610, 1343127501, 1560637892, 1243112415, 1192455638, 3704280881, 3519142200, 3336358691, 3419915562, 3907448597, 3857572124, 4075877127, 4294704398, 3029510009, 3113855344, 2927934315, 2744104290, 2159976285, 2377486676, 2594734927, 2544078150];\n var U4 = [0, 151849742, 303699484, 454499602, 607398968, 758720310, 908999204, 1059270954, 1214797936, 1097159550, 1517440620, 1400849762, 1817998408, 1699839814, 2118541908, 2001430874, 2429595872, 2581445614, 2194319100, 2345119218, 3034881240, 3186202582, 2801699524, 2951971274, 3635996816, 3518358430, 3399679628, 3283088770, 4237083816, 4118925222, 4002861748, 3885750714, 1002142683, 850817237, 698445255, 548169417, 529487843, 377642221, 227885567, 77089521, 1943217067, 2061379749, 1640576439, 1757691577, 1474760595, 1592394909, 1174215055, 1290801793, 2875968315, 2724642869, 3111247143, 2960971305, 2405426947, 2253581325, 2638606623, 2487810577, 3808662347, 3926825029, 4044981591, 4162096729, 3342319475, 3459953789, 3576539503, 3693126241, 1986918061, 2137062819, 1685577905, 1836772287, 1381620373, 1532285339, 1078185097, 1229899655, 1040559837, 923313619, 740276417, 621982671, 439452389, 322734571, 137073913, 19308535, 3871163981, 4021308739, 4104605777, 4255800159, 3263785589, 3414450555, 3499326569, 3651041127, 2933202493, 2815956275, 3167684641, 3049390895, 2330014213, 2213296395, 2566595609, 2448830231, 1305906550, 1155237496, 1607244650, 1455525988, 1776460110, 1626319424, 2079897426, 1928707164, 96392454, 213114376, 396673818, 514443284, 562755902, 679998e3, 865136418, 983426092, 3708173718, 3557504664, 3474729866, 3323011204, 4180808110, 4030667424, 3945269170, 3794078908, 2507040230, 2623762152, 2272556026, 2390325492, 2975484382, 3092726480, 2738905026, 2857194700, 3973773121, 3856137295, 4274053469, 4157467219, 3371096953, 3252932727, 3673476453, 3556361835, 2763173681, 2915017791, 3064510765, 3215307299, 2156299017, 2307622919, 2459735317, 2610011675, 2081048481, 1963412655, 1846563261, 1729977011, 1480485785, 1362321559, 1243905413, 1126790795, 878845905, 1030690015, 645401037, 796197571, 274084841, 425408743, 38544885, 188821243, 3613494426, 3731654548, 3313212038, 3430322568, 4082475170, 4200115116, 3780097726, 3896688048, 2668221674, 2516901860, 2366882550, 2216610296, 3141400786, 2989552604, 2837966542, 2687165888, 1202797690, 1320957812, 1437280870, 1554391400, 1669664834, 1787304780, 1906247262, 2022837584, 265905162, 114585348, 499347990, 349075736, 736970802, 585122620, 972512814, 821712160, 2595684844, 2478443234, 2293045232, 2174754046, 3196267988, 3079546586, 2895723464, 2777952454, 3537852828, 3687994002, 3234156416, 3385345166, 4142626212, 4293295786, 3841024952, 3992742070, 174567692, 57326082, 410887952, 292596766, 777231668, 660510266, 1011452712, 893681702, 1108339068, 1258480242, 1343618912, 1494807662, 1715193156, 1865862730, 1948373848, 2100090966, 2701949495, 2818666809, 3004591147, 3122358053, 2235061775, 2352307457, 2535604243, 2653899549, 3915653703, 3764988233, 4219352155, 4067639125, 3444575871, 3294430577, 3746175075, 3594982253, 836553431, 953270745, 600235211, 718002117, 367585007, 484830689, 133361907, 251657213, 2041877159, 1891211689, 1806599355, 1654886325, 1568718495, 1418573201, 1335535747, 1184342925];\n function convertToInt32(bytes) {\n const result = [];\n for (let i3 = 0; i3 < bytes.length; i3 += 4) {\n result.push(bytes[i3] << 24 | bytes[i3 + 1] << 16 | bytes[i3 + 2] << 8 | bytes[i3 + 3]);\n }\n return result;\n }\n var AES = class _AES {\n get key() {\n return __classPrivateFieldGet3(this, _AES_key, \"f\").slice();\n }\n constructor(key) {\n _AES_key.set(this, void 0);\n _AES_Kd.set(this, void 0);\n _AES_Ke.set(this, void 0);\n if (!(this instanceof _AES)) {\n throw Error(\"AES must be instanitated with `new`\");\n }\n __classPrivateFieldSet3(this, _AES_key, new Uint8Array(key), \"f\");\n const rounds = numberOfRounds[this.key.length];\n if (rounds == null) {\n throw new TypeError(\"invalid key size (must be 16, 24 or 32 bytes)\");\n }\n __classPrivateFieldSet3(this, _AES_Ke, [], \"f\");\n __classPrivateFieldSet3(this, _AES_Kd, [], \"f\");\n for (let i3 = 0; i3 <= rounds; i3++) {\n __classPrivateFieldGet3(this, _AES_Ke, \"f\").push([0, 0, 0, 0]);\n __classPrivateFieldGet3(this, _AES_Kd, \"f\").push([0, 0, 0, 0]);\n }\n const roundKeyCount = (rounds + 1) * 4;\n const KC = this.key.length / 4;\n const tk = convertToInt32(this.key);\n let index2;\n for (let i3 = 0; i3 < KC; i3++) {\n index2 = i3 >> 2;\n __classPrivateFieldGet3(this, _AES_Ke, \"f\")[index2][i3 % 4] = tk[i3];\n __classPrivateFieldGet3(this, _AES_Kd, \"f\")[rounds - index2][i3 % 4] = tk[i3];\n }\n let rconpointer = 0;\n let t3 = KC, tt;\n while (t3 < roundKeyCount) {\n tt = tk[KC - 1];\n tk[0] ^= S3[tt >> 16 & 255] << 24 ^ S3[tt >> 8 & 255] << 16 ^ S3[tt & 255] << 8 ^ S3[tt >> 24 & 255] ^ rcon[rconpointer] << 24;\n rconpointer += 1;\n if (KC != 8) {\n for (let i4 = 1; i4 < KC; i4++) {\n tk[i4] ^= tk[i4 - 1];\n }\n } else {\n for (let i4 = 1; i4 < KC / 2; i4++) {\n tk[i4] ^= tk[i4 - 1];\n }\n tt = tk[KC / 2 - 1];\n tk[KC / 2] ^= S3[tt & 255] ^ S3[tt >> 8 & 255] << 8 ^ S3[tt >> 16 & 255] << 16 ^ S3[tt >> 24 & 255] << 24;\n for (let i4 = KC / 2 + 1; i4 < KC; i4++) {\n tk[i4] ^= tk[i4 - 1];\n }\n }\n let i3 = 0, r2, c4;\n while (i3 < KC && t3 < roundKeyCount) {\n r2 = t3 >> 2;\n c4 = t3 % 4;\n __classPrivateFieldGet3(this, _AES_Ke, \"f\")[r2][c4] = tk[i3];\n __classPrivateFieldGet3(this, _AES_Kd, \"f\")[rounds - r2][c4] = tk[i3++];\n t3++;\n }\n }\n for (let r2 = 1; r2 < rounds; r2++) {\n for (let c4 = 0; c4 < 4; c4++) {\n tt = __classPrivateFieldGet3(this, _AES_Kd, \"f\")[r2][c4];\n __classPrivateFieldGet3(this, _AES_Kd, \"f\")[r2][c4] = U1[tt >> 24 & 255] ^ U22[tt >> 16 & 255] ^ U32[tt >> 8 & 255] ^ U4[tt & 255];\n }\n }\n }\n encrypt(plaintext) {\n if (plaintext.length != 16) {\n throw new TypeError(\"invalid plaintext size (must be 16 bytes)\");\n }\n const rounds = __classPrivateFieldGet3(this, _AES_Ke, \"f\").length - 1;\n const a3 = [0, 0, 0, 0];\n let t3 = convertToInt32(plaintext);\n for (let i3 = 0; i3 < 4; i3++) {\n t3[i3] ^= __classPrivateFieldGet3(this, _AES_Ke, \"f\")[0][i3];\n }\n for (let r2 = 1; r2 < rounds; r2++) {\n for (let i3 = 0; i3 < 4; i3++) {\n a3[i3] = T1[t3[i3] >> 24 & 255] ^ T22[t3[(i3 + 1) % 4] >> 16 & 255] ^ T32[t3[(i3 + 2) % 4] >> 8 & 255] ^ T4[t3[(i3 + 3) % 4] & 255] ^ __classPrivateFieldGet3(this, _AES_Ke, \"f\")[r2][i3];\n }\n t3 = a3.slice();\n }\n const result = new Uint8Array(16);\n let tt = 0;\n for (let i3 = 0; i3 < 4; i3++) {\n tt = __classPrivateFieldGet3(this, _AES_Ke, \"f\")[rounds][i3];\n result[4 * i3] = (S3[t3[i3] >> 24 & 255] ^ tt >> 24) & 255;\n result[4 * i3 + 1] = (S3[t3[(i3 + 1) % 4] >> 16 & 255] ^ tt >> 16) & 255;\n result[4 * i3 + 2] = (S3[t3[(i3 + 2) % 4] >> 8 & 255] ^ tt >> 8) & 255;\n result[4 * i3 + 3] = (S3[t3[(i3 + 3) % 4] & 255] ^ tt) & 255;\n }\n return result;\n }\n decrypt(ciphertext) {\n if (ciphertext.length != 16) {\n throw new TypeError(\"invalid ciphertext size (must be 16 bytes)\");\n }\n const rounds = __classPrivateFieldGet3(this, _AES_Kd, \"f\").length - 1;\n const a3 = [0, 0, 0, 0];\n let t3 = convertToInt32(ciphertext);\n for (let i3 = 0; i3 < 4; i3++) {\n t3[i3] ^= __classPrivateFieldGet3(this, _AES_Kd, \"f\")[0][i3];\n }\n for (let r2 = 1; r2 < rounds; r2++) {\n for (let i3 = 0; i3 < 4; i3++) {\n a3[i3] = T5[t3[i3] >> 24 & 255] ^ T6[t3[(i3 + 3) % 4] >> 16 & 255] ^ T7[t3[(i3 + 2) % 4] >> 8 & 255] ^ T8[t3[(i3 + 1) % 4] & 255] ^ __classPrivateFieldGet3(this, _AES_Kd, \"f\")[r2][i3];\n }\n t3 = a3.slice();\n }\n const result = new Uint8Array(16);\n let tt = 0;\n for (let i3 = 0; i3 < 4; i3++) {\n tt = __classPrivateFieldGet3(this, _AES_Kd, \"f\")[rounds][i3];\n result[4 * i3] = (Si[t3[i3] >> 24 & 255] ^ tt >> 24) & 255;\n result[4 * i3 + 1] = (Si[t3[(i3 + 3) % 4] >> 16 & 255] ^ tt >> 16) & 255;\n result[4 * i3 + 2] = (Si[t3[(i3 + 2) % 4] >> 8 & 255] ^ tt >> 8) & 255;\n result[4 * i3 + 3] = (Si[t3[(i3 + 1) % 4] & 255] ^ tt) & 255;\n }\n return result;\n }\n };\n exports3.AES = AES;\n _AES_key = /* @__PURE__ */ new WeakMap(), _AES_Kd = /* @__PURE__ */ new WeakMap(), _AES_Ke = /* @__PURE__ */ new WeakMap();\n }\n });\n\n // ../../../node_modules/.pnpm/aes-js@4.0.0-beta.5/node_modules/aes-js/lib.commonjs/mode.js\n var require_mode = __commonJS({\n \"../../../node_modules/.pnpm/aes-js@4.0.0-beta.5/node_modules/aes-js/lib.commonjs/mode.js\"(exports3) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n Object.defineProperty(exports3, \"__esModule\", { value: true });\n exports3.ModeOfOperation = void 0;\n var aes_js_1 = require_aes();\n var ModeOfOperation = class {\n constructor(name, key, cls) {\n if (cls && !(this instanceof cls)) {\n throw new Error(`${name} must be instantiated with \"new\"`);\n }\n Object.defineProperties(this, {\n aes: { enumerable: true, value: new aes_js_1.AES(key) },\n name: { enumerable: true, value: name }\n });\n }\n };\n exports3.ModeOfOperation = ModeOfOperation;\n }\n });\n\n // ../../../node_modules/.pnpm/aes-js@4.0.0-beta.5/node_modules/aes-js/lib.commonjs/mode-cbc.js\n var require_mode_cbc = __commonJS({\n \"../../../node_modules/.pnpm/aes-js@4.0.0-beta.5/node_modules/aes-js/lib.commonjs/mode-cbc.js\"(exports3) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n var __classPrivateFieldSet3 = exports3 && exports3.__classPrivateFieldSet || function(receiver, state, value, kind, f6) {\n if (kind === \"m\")\n throw new TypeError(\"Private method is not writable\");\n if (kind === \"a\" && !f6)\n throw new TypeError(\"Private accessor was defined without a setter\");\n if (typeof state === \"function\" ? receiver !== state || !f6 : !state.has(receiver))\n throw new TypeError(\"Cannot write private member to an object whose class did not declare it\");\n return kind === \"a\" ? f6.call(receiver, value) : f6 ? f6.value = value : state.set(receiver, value), value;\n };\n var __classPrivateFieldGet3 = exports3 && exports3.__classPrivateFieldGet || function(receiver, state, kind, f6) {\n if (kind === \"a\" && !f6)\n throw new TypeError(\"Private accessor was defined without a getter\");\n if (typeof state === \"function\" ? receiver !== state || !f6 : !state.has(receiver))\n throw new TypeError(\"Cannot read private member from an object whose class did not declare it\");\n return kind === \"m\" ? f6 : kind === \"a\" ? f6.call(receiver) : f6 ? f6.value : state.get(receiver);\n };\n var _CBC_iv;\n var _CBC_lastBlock;\n Object.defineProperty(exports3, \"__esModule\", { value: true });\n exports3.CBC = void 0;\n var mode_js_1 = require_mode();\n var CBC = class _CBC extends mode_js_1.ModeOfOperation {\n constructor(key, iv) {\n super(\"ECC\", key, _CBC);\n _CBC_iv.set(this, void 0);\n _CBC_lastBlock.set(this, void 0);\n if (iv) {\n if (iv.length % 16) {\n throw new TypeError(\"invalid iv size (must be 16 bytes)\");\n }\n __classPrivateFieldSet3(this, _CBC_iv, new Uint8Array(iv), \"f\");\n } else {\n __classPrivateFieldSet3(this, _CBC_iv, new Uint8Array(16), \"f\");\n }\n __classPrivateFieldSet3(this, _CBC_lastBlock, this.iv, \"f\");\n }\n get iv() {\n return new Uint8Array(__classPrivateFieldGet3(this, _CBC_iv, \"f\"));\n }\n encrypt(plaintext) {\n if (plaintext.length % 16) {\n throw new TypeError(\"invalid plaintext size (must be multiple of 16 bytes)\");\n }\n const ciphertext = new Uint8Array(plaintext.length);\n for (let i3 = 0; i3 < plaintext.length; i3 += 16) {\n for (let j2 = 0; j2 < 16; j2++) {\n __classPrivateFieldGet3(this, _CBC_lastBlock, \"f\")[j2] ^= plaintext[i3 + j2];\n }\n __classPrivateFieldSet3(this, _CBC_lastBlock, this.aes.encrypt(__classPrivateFieldGet3(this, _CBC_lastBlock, \"f\")), \"f\");\n ciphertext.set(__classPrivateFieldGet3(this, _CBC_lastBlock, \"f\"), i3);\n }\n return ciphertext;\n }\n decrypt(ciphertext) {\n if (ciphertext.length % 16) {\n throw new TypeError(\"invalid ciphertext size (must be multiple of 16 bytes)\");\n }\n const plaintext = new Uint8Array(ciphertext.length);\n for (let i3 = 0; i3 < ciphertext.length; i3 += 16) {\n const block = this.aes.decrypt(ciphertext.subarray(i3, i3 + 16));\n for (let j2 = 0; j2 < 16; j2++) {\n plaintext[i3 + j2] = block[j2] ^ __classPrivateFieldGet3(this, _CBC_lastBlock, \"f\")[j2];\n __classPrivateFieldGet3(this, _CBC_lastBlock, \"f\")[j2] = ciphertext[i3 + j2];\n }\n }\n return plaintext;\n }\n };\n exports3.CBC = CBC;\n _CBC_iv = /* @__PURE__ */ new WeakMap(), _CBC_lastBlock = /* @__PURE__ */ new WeakMap();\n }\n });\n\n // ../../../node_modules/.pnpm/aes-js@4.0.0-beta.5/node_modules/aes-js/lib.commonjs/mode-cfb.js\n var require_mode_cfb = __commonJS({\n \"../../../node_modules/.pnpm/aes-js@4.0.0-beta.5/node_modules/aes-js/lib.commonjs/mode-cfb.js\"(exports3) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n var __classPrivateFieldSet3 = exports3 && exports3.__classPrivateFieldSet || function(receiver, state, value, kind, f6) {\n if (kind === \"m\")\n throw new TypeError(\"Private method is not writable\");\n if (kind === \"a\" && !f6)\n throw new TypeError(\"Private accessor was defined without a setter\");\n if (typeof state === \"function\" ? receiver !== state || !f6 : !state.has(receiver))\n throw new TypeError(\"Cannot write private member to an object whose class did not declare it\");\n return kind === \"a\" ? f6.call(receiver, value) : f6 ? f6.value = value : state.set(receiver, value), value;\n };\n var __classPrivateFieldGet3 = exports3 && exports3.__classPrivateFieldGet || function(receiver, state, kind, f6) {\n if (kind === \"a\" && !f6)\n throw new TypeError(\"Private accessor was defined without a getter\");\n if (typeof state === \"function\" ? receiver !== state || !f6 : !state.has(receiver))\n throw new TypeError(\"Cannot read private member from an object whose class did not declare it\");\n return kind === \"m\" ? f6 : kind === \"a\" ? f6.call(receiver) : f6 ? f6.value : state.get(receiver);\n };\n var _CFB_instances;\n var _CFB_iv;\n var _CFB_shiftRegister;\n var _CFB_shift;\n Object.defineProperty(exports3, \"__esModule\", { value: true });\n exports3.CFB = void 0;\n var mode_js_1 = require_mode();\n var CFB = class _CFB extends mode_js_1.ModeOfOperation {\n constructor(key, iv, segmentSize = 8) {\n super(\"CFB\", key, _CFB);\n _CFB_instances.add(this);\n _CFB_iv.set(this, void 0);\n _CFB_shiftRegister.set(this, void 0);\n if (!Number.isInteger(segmentSize) || segmentSize % 8) {\n throw new TypeError(\"invalid segmentSize\");\n }\n Object.defineProperties(this, {\n segmentSize: { enumerable: true, value: segmentSize }\n });\n if (iv) {\n if (iv.length % 16) {\n throw new TypeError(\"invalid iv size (must be 16 bytes)\");\n }\n __classPrivateFieldSet3(this, _CFB_iv, new Uint8Array(iv), \"f\");\n } else {\n __classPrivateFieldSet3(this, _CFB_iv, new Uint8Array(16), \"f\");\n }\n __classPrivateFieldSet3(this, _CFB_shiftRegister, this.iv, \"f\");\n }\n get iv() {\n return new Uint8Array(__classPrivateFieldGet3(this, _CFB_iv, \"f\"));\n }\n encrypt(plaintext) {\n if (8 * plaintext.length % this.segmentSize) {\n throw new TypeError(\"invalid plaintext size (must be multiple of segmentSize bytes)\");\n }\n const segmentSize = this.segmentSize / 8;\n const ciphertext = new Uint8Array(plaintext);\n for (let i3 = 0; i3 < ciphertext.length; i3 += segmentSize) {\n const xorSegment = this.aes.encrypt(__classPrivateFieldGet3(this, _CFB_shiftRegister, \"f\"));\n for (let j2 = 0; j2 < segmentSize; j2++) {\n ciphertext[i3 + j2] ^= xorSegment[j2];\n }\n __classPrivateFieldGet3(this, _CFB_instances, \"m\", _CFB_shift).call(this, ciphertext.subarray(i3));\n }\n return ciphertext;\n }\n decrypt(ciphertext) {\n if (8 * ciphertext.length % this.segmentSize) {\n throw new TypeError(\"invalid ciphertext size (must be multiple of segmentSize bytes)\");\n }\n const segmentSize = this.segmentSize / 8;\n const plaintext = new Uint8Array(ciphertext);\n for (let i3 = 0; i3 < plaintext.length; i3 += segmentSize) {\n const xorSegment = this.aes.encrypt(__classPrivateFieldGet3(this, _CFB_shiftRegister, \"f\"));\n for (let j2 = 0; j2 < segmentSize; j2++) {\n plaintext[i3 + j2] ^= xorSegment[j2];\n }\n __classPrivateFieldGet3(this, _CFB_instances, \"m\", _CFB_shift).call(this, ciphertext.subarray(i3));\n }\n return plaintext;\n }\n };\n exports3.CFB = CFB;\n _CFB_iv = /* @__PURE__ */ new WeakMap(), _CFB_shiftRegister = /* @__PURE__ */ new WeakMap(), _CFB_instances = /* @__PURE__ */ new WeakSet(), _CFB_shift = function _CFB_shift2(data) {\n const segmentSize = this.segmentSize / 8;\n __classPrivateFieldGet3(this, _CFB_shiftRegister, \"f\").set(__classPrivateFieldGet3(this, _CFB_shiftRegister, \"f\").subarray(segmentSize));\n __classPrivateFieldGet3(this, _CFB_shiftRegister, \"f\").set(data.subarray(0, segmentSize), 16 - segmentSize);\n };\n }\n });\n\n // ../../../node_modules/.pnpm/aes-js@4.0.0-beta.5/node_modules/aes-js/lib.commonjs/mode-ctr.js\n var require_mode_ctr = __commonJS({\n \"../../../node_modules/.pnpm/aes-js@4.0.0-beta.5/node_modules/aes-js/lib.commonjs/mode-ctr.js\"(exports3) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n var __classPrivateFieldSet3 = exports3 && exports3.__classPrivateFieldSet || function(receiver, state, value, kind, f6) {\n if (kind === \"m\")\n throw new TypeError(\"Private method is not writable\");\n if (kind === \"a\" && !f6)\n throw new TypeError(\"Private accessor was defined without a setter\");\n if (typeof state === \"function\" ? receiver !== state || !f6 : !state.has(receiver))\n throw new TypeError(\"Cannot write private member to an object whose class did not declare it\");\n return kind === \"a\" ? f6.call(receiver, value) : f6 ? f6.value = value : state.set(receiver, value), value;\n };\n var __classPrivateFieldGet3 = exports3 && exports3.__classPrivateFieldGet || function(receiver, state, kind, f6) {\n if (kind === \"a\" && !f6)\n throw new TypeError(\"Private accessor was defined without a getter\");\n if (typeof state === \"function\" ? receiver !== state || !f6 : !state.has(receiver))\n throw new TypeError(\"Cannot read private member from an object whose class did not declare it\");\n return kind === \"m\" ? f6 : kind === \"a\" ? f6.call(receiver) : f6 ? f6.value : state.get(receiver);\n };\n var _CTR_remaining;\n var _CTR_remainingIndex;\n var _CTR_counter;\n Object.defineProperty(exports3, \"__esModule\", { value: true });\n exports3.CTR = void 0;\n var mode_js_1 = require_mode();\n var CTR = class _CTR extends mode_js_1.ModeOfOperation {\n constructor(key, initialValue) {\n super(\"CTR\", key, _CTR);\n _CTR_remaining.set(this, void 0);\n _CTR_remainingIndex.set(this, void 0);\n _CTR_counter.set(this, void 0);\n __classPrivateFieldSet3(this, _CTR_counter, new Uint8Array(16), \"f\");\n __classPrivateFieldGet3(this, _CTR_counter, \"f\").fill(0);\n __classPrivateFieldSet3(this, _CTR_remaining, __classPrivateFieldGet3(this, _CTR_counter, \"f\"), \"f\");\n __classPrivateFieldSet3(this, _CTR_remainingIndex, 16, \"f\");\n if (initialValue == null) {\n initialValue = 1;\n }\n if (typeof initialValue === \"number\") {\n this.setCounterValue(initialValue);\n } else {\n this.setCounterBytes(initialValue);\n }\n }\n get counter() {\n return new Uint8Array(__classPrivateFieldGet3(this, _CTR_counter, \"f\"));\n }\n setCounterValue(value) {\n if (!Number.isInteger(value) || value < 0 || value > Number.MAX_SAFE_INTEGER) {\n throw new TypeError(\"invalid counter initial integer value\");\n }\n for (let index2 = 15; index2 >= 0; --index2) {\n __classPrivateFieldGet3(this, _CTR_counter, \"f\")[index2] = value % 256;\n value = Math.floor(value / 256);\n }\n }\n setCounterBytes(value) {\n if (value.length !== 16) {\n throw new TypeError(\"invalid counter initial Uint8Array value length\");\n }\n __classPrivateFieldGet3(this, _CTR_counter, \"f\").set(value);\n }\n increment() {\n for (let i3 = 15; i3 >= 0; i3--) {\n if (__classPrivateFieldGet3(this, _CTR_counter, \"f\")[i3] === 255) {\n __classPrivateFieldGet3(this, _CTR_counter, \"f\")[i3] = 0;\n } else {\n __classPrivateFieldGet3(this, _CTR_counter, \"f\")[i3]++;\n break;\n }\n }\n }\n encrypt(plaintext) {\n var _a, _b;\n const crypttext = new Uint8Array(plaintext);\n for (let i3 = 0; i3 < crypttext.length; i3++) {\n if (__classPrivateFieldGet3(this, _CTR_remainingIndex, \"f\") === 16) {\n __classPrivateFieldSet3(this, _CTR_remaining, this.aes.encrypt(__classPrivateFieldGet3(this, _CTR_counter, \"f\")), \"f\");\n __classPrivateFieldSet3(this, _CTR_remainingIndex, 0, \"f\");\n this.increment();\n }\n crypttext[i3] ^= __classPrivateFieldGet3(this, _CTR_remaining, \"f\")[__classPrivateFieldSet3(this, _CTR_remainingIndex, (_b = __classPrivateFieldGet3(this, _CTR_remainingIndex, \"f\"), _a = _b++, _b), \"f\"), _a];\n }\n return crypttext;\n }\n decrypt(ciphertext) {\n return this.encrypt(ciphertext);\n }\n };\n exports3.CTR = CTR;\n _CTR_remaining = /* @__PURE__ */ new WeakMap(), _CTR_remainingIndex = /* @__PURE__ */ new WeakMap(), _CTR_counter = /* @__PURE__ */ new WeakMap();\n }\n });\n\n // ../../../node_modules/.pnpm/aes-js@4.0.0-beta.5/node_modules/aes-js/lib.commonjs/mode-ecb.js\n var require_mode_ecb = __commonJS({\n \"../../../node_modules/.pnpm/aes-js@4.0.0-beta.5/node_modules/aes-js/lib.commonjs/mode-ecb.js\"(exports3) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n Object.defineProperty(exports3, \"__esModule\", { value: true });\n exports3.ECB = void 0;\n var mode_js_1 = require_mode();\n var ECB = class _ECB extends mode_js_1.ModeOfOperation {\n constructor(key) {\n super(\"ECB\", key, _ECB);\n }\n encrypt(plaintext) {\n if (plaintext.length % 16) {\n throw new TypeError(\"invalid plaintext size (must be multiple of 16 bytes)\");\n }\n const crypttext = new Uint8Array(plaintext.length);\n for (let i3 = 0; i3 < plaintext.length; i3 += 16) {\n crypttext.set(this.aes.encrypt(plaintext.subarray(i3, i3 + 16)), i3);\n }\n return crypttext;\n }\n decrypt(crypttext) {\n if (crypttext.length % 16) {\n throw new TypeError(\"invalid ciphertext size (must be multiple of 16 bytes)\");\n }\n const plaintext = new Uint8Array(crypttext.length);\n for (let i3 = 0; i3 < crypttext.length; i3 += 16) {\n plaintext.set(this.aes.decrypt(crypttext.subarray(i3, i3 + 16)), i3);\n }\n return plaintext;\n }\n };\n exports3.ECB = ECB;\n }\n });\n\n // ../../../node_modules/.pnpm/aes-js@4.0.0-beta.5/node_modules/aes-js/lib.commonjs/mode-ofb.js\n var require_mode_ofb = __commonJS({\n \"../../../node_modules/.pnpm/aes-js@4.0.0-beta.5/node_modules/aes-js/lib.commonjs/mode-ofb.js\"(exports3) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n var __classPrivateFieldSet3 = exports3 && exports3.__classPrivateFieldSet || function(receiver, state, value, kind, f6) {\n if (kind === \"m\")\n throw new TypeError(\"Private method is not writable\");\n if (kind === \"a\" && !f6)\n throw new TypeError(\"Private accessor was defined without a setter\");\n if (typeof state === \"function\" ? receiver !== state || !f6 : !state.has(receiver))\n throw new TypeError(\"Cannot write private member to an object whose class did not declare it\");\n return kind === \"a\" ? f6.call(receiver, value) : f6 ? f6.value = value : state.set(receiver, value), value;\n };\n var __classPrivateFieldGet3 = exports3 && exports3.__classPrivateFieldGet || function(receiver, state, kind, f6) {\n if (kind === \"a\" && !f6)\n throw new TypeError(\"Private accessor was defined without a getter\");\n if (typeof state === \"function\" ? receiver !== state || !f6 : !state.has(receiver))\n throw new TypeError(\"Cannot read private member from an object whose class did not declare it\");\n return kind === \"m\" ? f6 : kind === \"a\" ? f6.call(receiver) : f6 ? f6.value : state.get(receiver);\n };\n var _OFB_iv;\n var _OFB_lastPrecipher;\n var _OFB_lastPrecipherIndex;\n Object.defineProperty(exports3, \"__esModule\", { value: true });\n exports3.OFB = void 0;\n var mode_js_1 = require_mode();\n var OFB = class _OFB extends mode_js_1.ModeOfOperation {\n constructor(key, iv) {\n super(\"OFB\", key, _OFB);\n _OFB_iv.set(this, void 0);\n _OFB_lastPrecipher.set(this, void 0);\n _OFB_lastPrecipherIndex.set(this, void 0);\n if (iv) {\n if (iv.length % 16) {\n throw new TypeError(\"invalid iv size (must be 16 bytes)\");\n }\n __classPrivateFieldSet3(this, _OFB_iv, new Uint8Array(iv), \"f\");\n } else {\n __classPrivateFieldSet3(this, _OFB_iv, new Uint8Array(16), \"f\");\n }\n __classPrivateFieldSet3(this, _OFB_lastPrecipher, this.iv, \"f\");\n __classPrivateFieldSet3(this, _OFB_lastPrecipherIndex, 16, \"f\");\n }\n get iv() {\n return new Uint8Array(__classPrivateFieldGet3(this, _OFB_iv, \"f\"));\n }\n encrypt(plaintext) {\n var _a, _b;\n if (plaintext.length % 16) {\n throw new TypeError(\"invalid plaintext size (must be multiple of 16 bytes)\");\n }\n const ciphertext = new Uint8Array(plaintext);\n for (let i3 = 0; i3 < ciphertext.length; i3++) {\n if (__classPrivateFieldGet3(this, _OFB_lastPrecipherIndex, \"f\") === 16) {\n __classPrivateFieldSet3(this, _OFB_lastPrecipher, this.aes.encrypt(__classPrivateFieldGet3(this, _OFB_lastPrecipher, \"f\")), \"f\");\n __classPrivateFieldSet3(this, _OFB_lastPrecipherIndex, 0, \"f\");\n }\n ciphertext[i3] ^= __classPrivateFieldGet3(this, _OFB_lastPrecipher, \"f\")[__classPrivateFieldSet3(this, _OFB_lastPrecipherIndex, (_b = __classPrivateFieldGet3(this, _OFB_lastPrecipherIndex, \"f\"), _a = _b++, _b), \"f\"), _a];\n }\n return ciphertext;\n }\n decrypt(ciphertext) {\n if (ciphertext.length % 16) {\n throw new TypeError(\"invalid ciphertext size (must be multiple of 16 bytes)\");\n }\n return this.encrypt(ciphertext);\n }\n };\n exports3.OFB = OFB;\n _OFB_iv = /* @__PURE__ */ new WeakMap(), _OFB_lastPrecipher = /* @__PURE__ */ new WeakMap(), _OFB_lastPrecipherIndex = /* @__PURE__ */ new WeakMap();\n }\n });\n\n // ../../../node_modules/.pnpm/aes-js@4.0.0-beta.5/node_modules/aes-js/lib.commonjs/padding.js\n var require_padding = __commonJS({\n \"../../../node_modules/.pnpm/aes-js@4.0.0-beta.5/node_modules/aes-js/lib.commonjs/padding.js\"(exports3) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n Object.defineProperty(exports3, \"__esModule\", { value: true });\n exports3.pkcs7Strip = exports3.pkcs7Pad = void 0;\n function pkcs7Pad(data) {\n const padder = 16 - data.length % 16;\n const result = new Uint8Array(data.length + padder);\n result.set(data);\n for (let i3 = data.length; i3 < result.length; i3++) {\n result[i3] = padder;\n }\n return result;\n }\n exports3.pkcs7Pad = pkcs7Pad;\n function pkcs7Strip(data) {\n if (data.length < 16) {\n throw new TypeError(\"PKCS#7 invalid length\");\n }\n const padder = data[data.length - 1];\n if (padder > 16) {\n throw new TypeError(\"PKCS#7 padding byte out of range\");\n }\n const length2 = data.length - padder;\n for (let i3 = 0; i3 < padder; i3++) {\n if (data[length2 + i3] !== padder) {\n throw new TypeError(\"PKCS#7 invalid padding byte\");\n }\n }\n return new Uint8Array(data.subarray(0, length2));\n }\n exports3.pkcs7Strip = pkcs7Strip;\n }\n });\n\n // ../../../node_modules/.pnpm/aes-js@4.0.0-beta.5/node_modules/aes-js/lib.commonjs/index.js\n var require_lib33 = __commonJS({\n \"../../../node_modules/.pnpm/aes-js@4.0.0-beta.5/node_modules/aes-js/lib.commonjs/index.js\"(exports3) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n Object.defineProperty(exports3, \"__esModule\", { value: true });\n exports3.pkcs7Strip = exports3.pkcs7Pad = exports3.OFB = exports3.ECB = exports3.CTR = exports3.CFB = exports3.CBC = exports3.ModeOfOperation = exports3.AES = void 0;\n var aes_js_1 = require_aes();\n Object.defineProperty(exports3, \"AES\", { enumerable: true, get: function() {\n return aes_js_1.AES;\n } });\n var mode_js_1 = require_mode();\n Object.defineProperty(exports3, \"ModeOfOperation\", { enumerable: true, get: function() {\n return mode_js_1.ModeOfOperation;\n } });\n var mode_cbc_js_1 = require_mode_cbc();\n Object.defineProperty(exports3, \"CBC\", { enumerable: true, get: function() {\n return mode_cbc_js_1.CBC;\n } });\n var mode_cfb_js_1 = require_mode_cfb();\n Object.defineProperty(exports3, \"CFB\", { enumerable: true, get: function() {\n return mode_cfb_js_1.CFB;\n } });\n var mode_ctr_js_1 = require_mode_ctr();\n Object.defineProperty(exports3, \"CTR\", { enumerable: true, get: function() {\n return mode_ctr_js_1.CTR;\n } });\n var mode_ecb_js_1 = require_mode_ecb();\n Object.defineProperty(exports3, \"ECB\", { enumerable: true, get: function() {\n return mode_ecb_js_1.ECB;\n } });\n var mode_ofb_js_1 = require_mode_ofb();\n Object.defineProperty(exports3, \"OFB\", { enumerable: true, get: function() {\n return mode_ofb_js_1.OFB;\n } });\n var padding_js_1 = require_padding();\n Object.defineProperty(exports3, \"pkcs7Pad\", { enumerable: true, get: function() {\n return padding_js_1.pkcs7Pad;\n } });\n Object.defineProperty(exports3, \"pkcs7Strip\", { enumerable: true, get: function() {\n return padding_js_1.pkcs7Strip;\n } });\n }\n });\n\n // ../../../node_modules/.pnpm/ethers@6.15.0_bufferutil@4.0.9_utf-8-validate@5.0.10/node_modules/ethers/lib.commonjs/wallet/utils.js\n var require_utils11 = __commonJS({\n \"../../../node_modules/.pnpm/ethers@6.15.0_bufferutil@4.0.9_utf-8-validate@5.0.10/node_modules/ethers/lib.commonjs/wallet/utils.js\"(exports3) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n Object.defineProperty(exports3, \"__esModule\", { value: true });\n exports3.spelunk = exports3.getPassword = exports3.zpad = exports3.looseArrayify = void 0;\n var index_js_1 = require_utils8();\n function looseArrayify(hexString) {\n if (typeof hexString === \"string\" && !hexString.startsWith(\"0x\")) {\n hexString = \"0x\" + hexString;\n }\n return (0, index_js_1.getBytesCopy)(hexString);\n }\n exports3.looseArrayify = looseArrayify;\n function zpad(value, length2) {\n value = String(value);\n while (value.length < length2) {\n value = \"0\" + value;\n }\n return value;\n }\n exports3.zpad = zpad;\n function getPassword(password) {\n if (typeof password === \"string\") {\n return (0, index_js_1.toUtf8Bytes)(password, \"NFKC\");\n }\n return (0, index_js_1.getBytesCopy)(password);\n }\n exports3.getPassword = getPassword;\n function spelunk(object2, _path) {\n const match = _path.match(/^([a-z0-9$_.-]*)(:([a-z]+))?(!)?$/i);\n (0, index_js_1.assertArgument)(match != null, \"invalid path\", \"path\", _path);\n const path = match[1];\n const type = match[3];\n const reqd = match[4] === \"!\";\n let cur = object2;\n for (const comp of path.toLowerCase().split(\".\")) {\n if (Array.isArray(cur)) {\n if (!comp.match(/^[0-9]+$/)) {\n break;\n }\n cur = cur[parseInt(comp)];\n } else if (typeof cur === \"object\") {\n let found = null;\n for (const key in cur) {\n if (key.toLowerCase() === comp) {\n found = cur[key];\n break;\n }\n }\n cur = found;\n } else {\n cur = null;\n }\n if (cur == null) {\n break;\n }\n }\n (0, index_js_1.assertArgument)(!reqd || cur != null, \"missing required value\", \"path\", path);\n if (type && cur != null) {\n if (type === \"int\") {\n if (typeof cur === \"string\" && cur.match(/^-?[0-9]+$/)) {\n return parseInt(cur);\n } else if (Number.isSafeInteger(cur)) {\n return cur;\n }\n }\n if (type === \"number\") {\n if (typeof cur === \"string\" && cur.match(/^-?[0-9.]*$/)) {\n return parseFloat(cur);\n }\n }\n if (type === \"data\") {\n if (typeof cur === \"string\") {\n return looseArrayify(cur);\n }\n }\n if (type === \"array\" && Array.isArray(cur)) {\n return cur;\n }\n if (type === typeof cur) {\n return cur;\n }\n (0, index_js_1.assertArgument)(false, `wrong type found for ${type} `, \"path\", path);\n }\n return cur;\n }\n exports3.spelunk = spelunk;\n }\n });\n\n // ../../../node_modules/.pnpm/ethers@6.15.0_bufferutil@4.0.9_utf-8-validate@5.0.10/node_modules/ethers/lib.commonjs/wallet/json-keystore.js\n var require_json_keystore = __commonJS({\n \"../../../node_modules/.pnpm/ethers@6.15.0_bufferutil@4.0.9_utf-8-validate@5.0.10/node_modules/ethers/lib.commonjs/wallet/json-keystore.js\"(exports3) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n Object.defineProperty(exports3, \"__esModule\", { value: true });\n exports3.encryptKeystoreJson = exports3.encryptKeystoreJsonSync = exports3.decryptKeystoreJson = exports3.decryptKeystoreJsonSync = exports3.isKeystoreJson = void 0;\n var aes_js_1 = require_lib33();\n var index_js_1 = require_address3();\n var index_js_2 = require_crypto2();\n var index_js_3 = require_transaction2();\n var index_js_4 = require_utils8();\n var utils_js_1 = require_utils11();\n var _version_js_1 = require_version27();\n var defaultPath = \"m/44'/60'/0'/0/0\";\n function isKeystoreJson(json) {\n try {\n const data = JSON.parse(json);\n const version6 = data.version != null ? parseInt(data.version) : 0;\n if (version6 === 3) {\n return true;\n }\n } catch (error) {\n }\n return false;\n }\n exports3.isKeystoreJson = isKeystoreJson;\n function decrypt(data, key, ciphertext) {\n const cipher = (0, utils_js_1.spelunk)(data, \"crypto.cipher:string\");\n if (cipher === \"aes-128-ctr\") {\n const iv = (0, utils_js_1.spelunk)(data, \"crypto.cipherparams.iv:data!\");\n const aesCtr = new aes_js_1.CTR(key, iv);\n return (0, index_js_4.hexlify)(aesCtr.decrypt(ciphertext));\n }\n (0, index_js_4.assert)(false, \"unsupported cipher\", \"UNSUPPORTED_OPERATION\", {\n operation: \"decrypt\"\n });\n }\n function getAccount(data, _key) {\n const key = (0, index_js_4.getBytes)(_key);\n const ciphertext = (0, utils_js_1.spelunk)(data, \"crypto.ciphertext:data!\");\n const computedMAC = (0, index_js_4.hexlify)((0, index_js_2.keccak256)((0, index_js_4.concat)([key.slice(16, 32), ciphertext]))).substring(2);\n (0, index_js_4.assertArgument)(computedMAC === (0, utils_js_1.spelunk)(data, \"crypto.mac:string!\").toLowerCase(), \"incorrect password\", \"password\", \"[ REDACTED ]\");\n const privateKey = decrypt(data, key.slice(0, 16), ciphertext);\n const address = (0, index_js_3.computeAddress)(privateKey);\n if (data.address) {\n let check = data.address.toLowerCase();\n if (!check.startsWith(\"0x\")) {\n check = \"0x\" + check;\n }\n (0, index_js_4.assertArgument)((0, index_js_1.getAddress)(check) === address, \"keystore address/privateKey mismatch\", \"address\", data.address);\n }\n const account = { address, privateKey };\n const version6 = (0, utils_js_1.spelunk)(data, \"x-ethers.version:string\");\n if (version6 === \"0.1\") {\n const mnemonicKey = key.slice(32, 64);\n const mnemonicCiphertext = (0, utils_js_1.spelunk)(data, \"x-ethers.mnemonicCiphertext:data!\");\n const mnemonicIv = (0, utils_js_1.spelunk)(data, \"x-ethers.mnemonicCounter:data!\");\n const mnemonicAesCtr = new aes_js_1.CTR(mnemonicKey, mnemonicIv);\n account.mnemonic = {\n path: (0, utils_js_1.spelunk)(data, \"x-ethers.path:string\") || defaultPath,\n locale: (0, utils_js_1.spelunk)(data, \"x-ethers.locale:string\") || \"en\",\n entropy: (0, index_js_4.hexlify)((0, index_js_4.getBytes)(mnemonicAesCtr.decrypt(mnemonicCiphertext)))\n };\n }\n return account;\n }\n function getDecryptKdfParams(data) {\n const kdf = (0, utils_js_1.spelunk)(data, \"crypto.kdf:string\");\n if (kdf && typeof kdf === \"string\") {\n if (kdf.toLowerCase() === \"scrypt\") {\n const salt = (0, utils_js_1.spelunk)(data, \"crypto.kdfparams.salt:data!\");\n const N4 = (0, utils_js_1.spelunk)(data, \"crypto.kdfparams.n:int!\");\n const r2 = (0, utils_js_1.spelunk)(data, \"crypto.kdfparams.r:int!\");\n const p4 = (0, utils_js_1.spelunk)(data, \"crypto.kdfparams.p:int!\");\n (0, index_js_4.assertArgument)(N4 > 0 && (N4 & N4 - 1) === 0, \"invalid kdf.N\", \"kdf.N\", N4);\n (0, index_js_4.assertArgument)(r2 > 0 && p4 > 0, \"invalid kdf\", \"kdf\", kdf);\n const dkLen = (0, utils_js_1.spelunk)(data, \"crypto.kdfparams.dklen:int!\");\n (0, index_js_4.assertArgument)(dkLen === 32, \"invalid kdf.dklen\", \"kdf.dflen\", dkLen);\n return { name: \"scrypt\", salt, N: N4, r: r2, p: p4, dkLen: 64 };\n } else if (kdf.toLowerCase() === \"pbkdf2\") {\n const salt = (0, utils_js_1.spelunk)(data, \"crypto.kdfparams.salt:data!\");\n const prf = (0, utils_js_1.spelunk)(data, \"crypto.kdfparams.prf:string!\");\n const algorithm = prf.split(\"-\").pop();\n (0, index_js_4.assertArgument)(algorithm === \"sha256\" || algorithm === \"sha512\", \"invalid kdf.pdf\", \"kdf.pdf\", prf);\n const count = (0, utils_js_1.spelunk)(data, \"crypto.kdfparams.c:int!\");\n const dkLen = (0, utils_js_1.spelunk)(data, \"crypto.kdfparams.dklen:int!\");\n (0, index_js_4.assertArgument)(dkLen === 32, \"invalid kdf.dklen\", \"kdf.dklen\", dkLen);\n return { name: \"pbkdf2\", salt, count, dkLen, algorithm };\n }\n }\n (0, index_js_4.assertArgument)(false, \"unsupported key-derivation function\", \"kdf\", kdf);\n }\n function decryptKeystoreJsonSync(json, _password) {\n const data = JSON.parse(json);\n const password = (0, utils_js_1.getPassword)(_password);\n const params = getDecryptKdfParams(data);\n if (params.name === \"pbkdf2\") {\n const { salt: salt2, count, dkLen: dkLen2, algorithm } = params;\n const key2 = (0, index_js_2.pbkdf2)(password, salt2, count, dkLen2, algorithm);\n return getAccount(data, key2);\n }\n (0, index_js_4.assert)(params.name === \"scrypt\", \"cannot be reached\", \"UNKNOWN_ERROR\", { params });\n const { salt, N: N4, r: r2, p: p4, dkLen } = params;\n const key = (0, index_js_2.scryptSync)(password, salt, N4, r2, p4, dkLen);\n return getAccount(data, key);\n }\n exports3.decryptKeystoreJsonSync = decryptKeystoreJsonSync;\n function stall(duration) {\n return new Promise((resolve) => {\n setTimeout(() => {\n resolve();\n }, duration);\n });\n }\n async function decryptKeystoreJson(json, _password, progress) {\n const data = JSON.parse(json);\n const password = (0, utils_js_1.getPassword)(_password);\n const params = getDecryptKdfParams(data);\n if (params.name === \"pbkdf2\") {\n if (progress) {\n progress(0);\n await stall(0);\n }\n const { salt: salt2, count, dkLen: dkLen2, algorithm } = params;\n const key2 = (0, index_js_2.pbkdf2)(password, salt2, count, dkLen2, algorithm);\n if (progress) {\n progress(1);\n await stall(0);\n }\n return getAccount(data, key2);\n }\n (0, index_js_4.assert)(params.name === \"scrypt\", \"cannot be reached\", \"UNKNOWN_ERROR\", { params });\n const { salt, N: N4, r: r2, p: p4, dkLen } = params;\n const key = await (0, index_js_2.scrypt)(password, salt, N4, r2, p4, dkLen, progress);\n return getAccount(data, key);\n }\n exports3.decryptKeystoreJson = decryptKeystoreJson;\n function getEncryptKdfParams(options) {\n const salt = options.salt != null ? (0, index_js_4.getBytes)(options.salt, \"options.salt\") : (0, index_js_2.randomBytes)(32);\n let N4 = 1 << 17, r2 = 8, p4 = 1;\n if (options.scrypt) {\n if (options.scrypt.N) {\n N4 = options.scrypt.N;\n }\n if (options.scrypt.r) {\n r2 = options.scrypt.r;\n }\n if (options.scrypt.p) {\n p4 = options.scrypt.p;\n }\n }\n (0, index_js_4.assertArgument)(typeof N4 === \"number\" && N4 > 0 && Number.isSafeInteger(N4) && (BigInt(N4) & BigInt(N4 - 1)) === BigInt(0), \"invalid scrypt N parameter\", \"options.N\", N4);\n (0, index_js_4.assertArgument)(typeof r2 === \"number\" && r2 > 0 && Number.isSafeInteger(r2), \"invalid scrypt r parameter\", \"options.r\", r2);\n (0, index_js_4.assertArgument)(typeof p4 === \"number\" && p4 > 0 && Number.isSafeInteger(p4), \"invalid scrypt p parameter\", \"options.p\", p4);\n return { name: \"scrypt\", dkLen: 32, salt, N: N4, r: r2, p: p4 };\n }\n function _encryptKeystore(key, kdf, account, options) {\n const privateKey = (0, index_js_4.getBytes)(account.privateKey, \"privateKey\");\n const iv = options.iv != null ? (0, index_js_4.getBytes)(options.iv, \"options.iv\") : (0, index_js_2.randomBytes)(16);\n (0, index_js_4.assertArgument)(iv.length === 16, \"invalid options.iv length\", \"options.iv\", options.iv);\n const uuidRandom = options.uuid != null ? (0, index_js_4.getBytes)(options.uuid, \"options.uuid\") : (0, index_js_2.randomBytes)(16);\n (0, index_js_4.assertArgument)(uuidRandom.length === 16, \"invalid options.uuid length\", \"options.uuid\", options.iv);\n const derivedKey = key.slice(0, 16);\n const macPrefix = key.slice(16, 32);\n const aesCtr = new aes_js_1.CTR(derivedKey, iv);\n const ciphertext = (0, index_js_4.getBytes)(aesCtr.encrypt(privateKey));\n const mac = (0, index_js_2.keccak256)((0, index_js_4.concat)([macPrefix, ciphertext]));\n const data = {\n address: account.address.substring(2).toLowerCase(),\n id: (0, index_js_4.uuidV4)(uuidRandom),\n version: 3,\n Crypto: {\n cipher: \"aes-128-ctr\",\n cipherparams: {\n iv: (0, index_js_4.hexlify)(iv).substring(2)\n },\n ciphertext: (0, index_js_4.hexlify)(ciphertext).substring(2),\n kdf: \"scrypt\",\n kdfparams: {\n salt: (0, index_js_4.hexlify)(kdf.salt).substring(2),\n n: kdf.N,\n dklen: 32,\n p: kdf.p,\n r: kdf.r\n },\n mac: mac.substring(2)\n }\n };\n if (account.mnemonic) {\n const client = options.client != null ? options.client : `ethers/${_version_js_1.version}`;\n const path = account.mnemonic.path || defaultPath;\n const locale = account.mnemonic.locale || \"en\";\n const mnemonicKey = key.slice(32, 64);\n const entropy = (0, index_js_4.getBytes)(account.mnemonic.entropy, \"account.mnemonic.entropy\");\n const mnemonicIv = (0, index_js_2.randomBytes)(16);\n const mnemonicAesCtr = new aes_js_1.CTR(mnemonicKey, mnemonicIv);\n const mnemonicCiphertext = (0, index_js_4.getBytes)(mnemonicAesCtr.encrypt(entropy));\n const now = /* @__PURE__ */ new Date();\n const timestamp = now.getUTCFullYear() + \"-\" + (0, utils_js_1.zpad)(now.getUTCMonth() + 1, 2) + \"-\" + (0, utils_js_1.zpad)(now.getUTCDate(), 2) + \"T\" + (0, utils_js_1.zpad)(now.getUTCHours(), 2) + \"-\" + (0, utils_js_1.zpad)(now.getUTCMinutes(), 2) + \"-\" + (0, utils_js_1.zpad)(now.getUTCSeconds(), 2) + \".0Z\";\n const gethFilename = \"UTC--\" + timestamp + \"--\" + data.address;\n data[\"x-ethers\"] = {\n client,\n gethFilename,\n path,\n locale,\n mnemonicCounter: (0, index_js_4.hexlify)(mnemonicIv).substring(2),\n mnemonicCiphertext: (0, index_js_4.hexlify)(mnemonicCiphertext).substring(2),\n version: \"0.1\"\n };\n }\n return JSON.stringify(data);\n }\n function encryptKeystoreJsonSync(account, password, options) {\n if (options == null) {\n options = {};\n }\n const passwordBytes = (0, utils_js_1.getPassword)(password);\n const kdf = getEncryptKdfParams(options);\n const key = (0, index_js_2.scryptSync)(passwordBytes, kdf.salt, kdf.N, kdf.r, kdf.p, 64);\n return _encryptKeystore((0, index_js_4.getBytes)(key), kdf, account, options);\n }\n exports3.encryptKeystoreJsonSync = encryptKeystoreJsonSync;\n async function encryptKeystoreJson(account, password, options) {\n if (options == null) {\n options = {};\n }\n const passwordBytes = (0, utils_js_1.getPassword)(password);\n const kdf = getEncryptKdfParams(options);\n const key = await (0, index_js_2.scrypt)(passwordBytes, kdf.salt, kdf.N, kdf.r, kdf.p, 64, options.progressCallback);\n return _encryptKeystore((0, index_js_4.getBytes)(key), kdf, account, options);\n }\n exports3.encryptKeystoreJson = encryptKeystoreJson;\n }\n });\n\n // ../../../node_modules/.pnpm/ethers@6.15.0_bufferutil@4.0.9_utf-8-validate@5.0.10/node_modules/ethers/lib.commonjs/wallet/hdwallet.js\n var require_hdwallet = __commonJS({\n \"../../../node_modules/.pnpm/ethers@6.15.0_bufferutil@4.0.9_utf-8-validate@5.0.10/node_modules/ethers/lib.commonjs/wallet/hdwallet.js\"(exports3) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n Object.defineProperty(exports3, \"__esModule\", { value: true });\n exports3.getIndexedAccountPath = exports3.getAccountPath = exports3.HDNodeVoidWallet = exports3.HDNodeWallet = exports3.defaultPath = void 0;\n var index_js_1 = require_crypto2();\n var index_js_2 = require_providers();\n var index_js_3 = require_transaction2();\n var index_js_4 = require_utils8();\n var lang_en_js_1 = require_lang_en2();\n var base_wallet_js_1 = require_base_wallet();\n var mnemonic_js_1 = require_mnemonic();\n var json_keystore_js_1 = require_json_keystore();\n exports3.defaultPath = \"m/44'/60'/0'/0/0\";\n var MasterSecret = new Uint8Array([66, 105, 116, 99, 111, 105, 110, 32, 115, 101, 101, 100]);\n var HardenedBit = 2147483648;\n var N4 = BigInt(\"0xfffffffffffffffffffffffffffffffebaaedce6af48a03bbfd25e8cd0364141\");\n var Nibbles = \"0123456789abcdef\";\n function zpad(value, length2) {\n let result = \"\";\n while (value) {\n result = Nibbles[value % 16] + result;\n value = Math.trunc(value / 16);\n }\n while (result.length < length2 * 2) {\n result = \"0\" + result;\n }\n return \"0x\" + result;\n }\n function encodeBase58Check(_value) {\n const value = (0, index_js_4.getBytes)(_value);\n const check = (0, index_js_4.dataSlice)((0, index_js_1.sha256)((0, index_js_1.sha256)(value)), 0, 4);\n const bytes = (0, index_js_4.concat)([value, check]);\n return (0, index_js_4.encodeBase58)(bytes);\n }\n var _guard = {};\n function ser_I(index2, chainCode, publicKey, privateKey) {\n const data = new Uint8Array(37);\n if (index2 & HardenedBit) {\n (0, index_js_4.assert)(privateKey != null, \"cannot derive child of neutered node\", \"UNSUPPORTED_OPERATION\", {\n operation: \"deriveChild\"\n });\n data.set((0, index_js_4.getBytes)(privateKey), 1);\n } else {\n data.set((0, index_js_4.getBytes)(publicKey));\n }\n for (let i3 = 24; i3 >= 0; i3 -= 8) {\n data[33 + (i3 >> 3)] = index2 >> 24 - i3 & 255;\n }\n const I2 = (0, index_js_4.getBytes)((0, index_js_1.computeHmac)(\"sha512\", chainCode, data));\n return { IL: I2.slice(0, 32), IR: I2.slice(32) };\n }\n function derivePath(node, path) {\n const components = path.split(\"/\");\n (0, index_js_4.assertArgument)(components.length > 0, \"invalid path\", \"path\", path);\n if (components[0] === \"m\") {\n (0, index_js_4.assertArgument)(node.depth === 0, `cannot derive root path (i.e. path starting with \"m/\") for a node at non-zero depth ${node.depth}`, \"path\", path);\n components.shift();\n }\n let result = node;\n for (let i3 = 0; i3 < components.length; i3++) {\n const component = components[i3];\n if (component.match(/^[0-9]+'$/)) {\n const index2 = parseInt(component.substring(0, component.length - 1));\n (0, index_js_4.assertArgument)(index2 < HardenedBit, \"invalid path index\", `path[${i3}]`, component);\n result = result.deriveChild(HardenedBit + index2);\n } else if (component.match(/^[0-9]+$/)) {\n const index2 = parseInt(component);\n (0, index_js_4.assertArgument)(index2 < HardenedBit, \"invalid path index\", `path[${i3}]`, component);\n result = result.deriveChild(index2);\n } else {\n (0, index_js_4.assertArgument)(false, \"invalid path component\", `path[${i3}]`, component);\n }\n }\n return result;\n }\n var HDNodeWallet = class _HDNodeWallet extends base_wallet_js_1.BaseWallet {\n /**\n * The compressed public key.\n */\n publicKey;\n /**\n * The fingerprint.\n *\n * A fingerprint allows quick qay to detect parent and child nodes,\n * but developers should be prepared to deal with collisions as it\n * is only 4 bytes.\n */\n fingerprint;\n /**\n * The parent fingerprint.\n */\n parentFingerprint;\n /**\n * The mnemonic used to create this HD Node, if available.\n *\n * Sources such as extended keys do not encode the mnemonic, in\n * which case this will be ``null``.\n */\n mnemonic;\n /**\n * The chaincode, which is effectively a public key used\n * to derive children.\n */\n chainCode;\n /**\n * The derivation path of this wallet.\n *\n * Since extended keys do not provide full path details, this\n * may be ``null``, if instantiated from a source that does not\n * encode it.\n */\n path;\n /**\n * The child index of this wallet. Values over ``2 *\\* 31`` indicate\n * the node is hardened.\n */\n index;\n /**\n * The depth of this wallet, which is the number of components\n * in its path.\n */\n depth;\n /**\n * @private\n */\n constructor(guard, signingKey, parentFingerprint, chainCode, path, index2, depth, mnemonic, provider) {\n super(signingKey, provider);\n (0, index_js_4.assertPrivate)(guard, _guard, \"HDNodeWallet\");\n (0, index_js_4.defineProperties)(this, { publicKey: signingKey.compressedPublicKey });\n const fingerprint = (0, index_js_4.dataSlice)((0, index_js_1.ripemd160)((0, index_js_1.sha256)(this.publicKey)), 0, 4);\n (0, index_js_4.defineProperties)(this, {\n parentFingerprint,\n fingerprint,\n chainCode,\n path,\n index: index2,\n depth\n });\n (0, index_js_4.defineProperties)(this, { mnemonic });\n }\n connect(provider) {\n return new _HDNodeWallet(_guard, this.signingKey, this.parentFingerprint, this.chainCode, this.path, this.index, this.depth, this.mnemonic, provider);\n }\n #account() {\n const account = { address: this.address, privateKey: this.privateKey };\n const m2 = this.mnemonic;\n if (this.path && m2 && m2.wordlist.locale === \"en\" && m2.password === \"\") {\n account.mnemonic = {\n path: this.path,\n locale: \"en\",\n entropy: m2.entropy\n };\n }\n return account;\n }\n /**\n * Resolves to a [JSON Keystore Wallet](json-wallets) encrypted with\n * %%password%%.\n *\n * If %%progressCallback%% is specified, it will receive periodic\n * updates as the encryption process progreses.\n */\n async encrypt(password, progressCallback) {\n return await (0, json_keystore_js_1.encryptKeystoreJson)(this.#account(), password, { progressCallback });\n }\n /**\n * Returns a [JSON Keystore Wallet](json-wallets) encryped with\n * %%password%%.\n *\n * It is preferred to use the [async version](encrypt) instead,\n * which allows a [[ProgressCallback]] to keep the user informed.\n *\n * This method will block the event loop (freezing all UI) until\n * it is complete, which may be a non-trivial duration.\n */\n encryptSync(password) {\n return (0, json_keystore_js_1.encryptKeystoreJsonSync)(this.#account(), password);\n }\n /**\n * The extended key.\n *\n * This key will begin with the prefix ``xpriv`` and can be used to\n * reconstruct this HD Node to derive its children.\n */\n get extendedKey() {\n (0, index_js_4.assert)(this.depth < 256, \"Depth too deep\", \"UNSUPPORTED_OPERATION\", { operation: \"extendedKey\" });\n return encodeBase58Check((0, index_js_4.concat)([\n \"0x0488ADE4\",\n zpad(this.depth, 1),\n this.parentFingerprint,\n zpad(this.index, 4),\n this.chainCode,\n (0, index_js_4.concat)([\"0x00\", this.privateKey])\n ]));\n }\n /**\n * Returns true if this wallet has a path, providing a Type Guard\n * that the path is non-null.\n */\n hasPath() {\n return this.path != null;\n }\n /**\n * Returns a neutered HD Node, which removes the private details\n * of an HD Node.\n *\n * A neutered node has no private key, but can be used to derive\n * child addresses and other public data about the HD Node.\n */\n neuter() {\n return new HDNodeVoidWallet(_guard, this.address, this.publicKey, this.parentFingerprint, this.chainCode, this.path, this.index, this.depth, this.provider);\n }\n /**\n * Return the child for %%index%%.\n */\n deriveChild(_index) {\n const index2 = (0, index_js_4.getNumber)(_index, \"index\");\n (0, index_js_4.assertArgument)(index2 <= 4294967295, \"invalid index\", \"index\", index2);\n let path = this.path;\n if (path) {\n path += \"/\" + (index2 & ~HardenedBit);\n if (index2 & HardenedBit) {\n path += \"'\";\n }\n }\n const { IR, IL } = ser_I(index2, this.chainCode, this.publicKey, this.privateKey);\n const ki = new index_js_1.SigningKey((0, index_js_4.toBeHex)(((0, index_js_4.toBigInt)(IL) + BigInt(this.privateKey)) % N4, 32));\n return new _HDNodeWallet(_guard, ki, this.fingerprint, (0, index_js_4.hexlify)(IR), path, index2, this.depth + 1, this.mnemonic, this.provider);\n }\n /**\n * Return the HDNode for %%path%% from this node.\n */\n derivePath(path) {\n return derivePath(this, path);\n }\n static #fromSeed(_seed, mnemonic) {\n (0, index_js_4.assertArgument)((0, index_js_4.isBytesLike)(_seed), \"invalid seed\", \"seed\", \"[REDACTED]\");\n const seed = (0, index_js_4.getBytes)(_seed, \"seed\");\n (0, index_js_4.assertArgument)(seed.length >= 16 && seed.length <= 64, \"invalid seed\", \"seed\", \"[REDACTED]\");\n const I2 = (0, index_js_4.getBytes)((0, index_js_1.computeHmac)(\"sha512\", MasterSecret, seed));\n const signingKey = new index_js_1.SigningKey((0, index_js_4.hexlify)(I2.slice(0, 32)));\n return new _HDNodeWallet(_guard, signingKey, \"0x00000000\", (0, index_js_4.hexlify)(I2.slice(32)), \"m\", 0, 0, mnemonic, null);\n }\n /**\n * Creates a new HD Node from %%extendedKey%%.\n *\n * If the %%extendedKey%% will either have a prefix or ``xpub`` or\n * ``xpriv``, returning a neutered HD Node ([[HDNodeVoidWallet]])\n * or full HD Node ([[HDNodeWallet) respectively.\n */\n static fromExtendedKey(extendedKey) {\n const bytes = (0, index_js_4.toBeArray)((0, index_js_4.decodeBase58)(extendedKey));\n (0, index_js_4.assertArgument)(bytes.length === 82 || encodeBase58Check(bytes.slice(0, 78)) === extendedKey, \"invalid extended key\", \"extendedKey\", \"[ REDACTED ]\");\n const depth = bytes[4];\n const parentFingerprint = (0, index_js_4.hexlify)(bytes.slice(5, 9));\n const index2 = parseInt((0, index_js_4.hexlify)(bytes.slice(9, 13)).substring(2), 16);\n const chainCode = (0, index_js_4.hexlify)(bytes.slice(13, 45));\n const key = bytes.slice(45, 78);\n switch ((0, index_js_4.hexlify)(bytes.slice(0, 4))) {\n case \"0x0488b21e\":\n case \"0x043587cf\": {\n const publicKey = (0, index_js_4.hexlify)(key);\n return new HDNodeVoidWallet(_guard, (0, index_js_3.computeAddress)(publicKey), publicKey, parentFingerprint, chainCode, null, index2, depth, null);\n }\n case \"0x0488ade4\":\n case \"0x04358394 \":\n if (key[0] !== 0) {\n break;\n }\n return new _HDNodeWallet(_guard, new index_js_1.SigningKey(key.slice(1)), parentFingerprint, chainCode, null, index2, depth, null, null);\n }\n (0, index_js_4.assertArgument)(false, \"invalid extended key prefix\", \"extendedKey\", \"[ REDACTED ]\");\n }\n /**\n * Creates a new random HDNode.\n */\n static createRandom(password, path, wordlist) {\n if (password == null) {\n password = \"\";\n }\n if (path == null) {\n path = exports3.defaultPath;\n }\n if (wordlist == null) {\n wordlist = lang_en_js_1.LangEn.wordlist();\n }\n const mnemonic = mnemonic_js_1.Mnemonic.fromEntropy((0, index_js_1.randomBytes)(16), password, wordlist);\n return _HDNodeWallet.#fromSeed(mnemonic.computeSeed(), mnemonic).derivePath(path);\n }\n /**\n * Create an HD Node from %%mnemonic%%.\n */\n static fromMnemonic(mnemonic, path) {\n if (!path) {\n path = exports3.defaultPath;\n }\n return _HDNodeWallet.#fromSeed(mnemonic.computeSeed(), mnemonic).derivePath(path);\n }\n /**\n * Creates an HD Node from a mnemonic %%phrase%%.\n */\n static fromPhrase(phrase, password, path, wordlist) {\n if (password == null) {\n password = \"\";\n }\n if (path == null) {\n path = exports3.defaultPath;\n }\n if (wordlist == null) {\n wordlist = lang_en_js_1.LangEn.wordlist();\n }\n const mnemonic = mnemonic_js_1.Mnemonic.fromPhrase(phrase, password, wordlist);\n return _HDNodeWallet.#fromSeed(mnemonic.computeSeed(), mnemonic).derivePath(path);\n }\n /**\n * Creates an HD Node from a %%seed%%.\n */\n static fromSeed(seed) {\n return _HDNodeWallet.#fromSeed(seed, null);\n }\n };\n exports3.HDNodeWallet = HDNodeWallet;\n var HDNodeVoidWallet = class _HDNodeVoidWallet extends index_js_2.VoidSigner {\n /**\n * The compressed public key.\n */\n publicKey;\n /**\n * The fingerprint.\n *\n * A fingerprint allows quick qay to detect parent and child nodes,\n * but developers should be prepared to deal with collisions as it\n * is only 4 bytes.\n */\n fingerprint;\n /**\n * The parent node fingerprint.\n */\n parentFingerprint;\n /**\n * The chaincode, which is effectively a public key used\n * to derive children.\n */\n chainCode;\n /**\n * The derivation path of this wallet.\n *\n * Since extended keys do not provider full path details, this\n * may be ``null``, if instantiated from a source that does not\n * enocde it.\n */\n path;\n /**\n * The child index of this wallet. Values over ``2 *\\* 31`` indicate\n * the node is hardened.\n */\n index;\n /**\n * The depth of this wallet, which is the number of components\n * in its path.\n */\n depth;\n /**\n * @private\n */\n constructor(guard, address, publicKey, parentFingerprint, chainCode, path, index2, depth, provider) {\n super(address, provider);\n (0, index_js_4.assertPrivate)(guard, _guard, \"HDNodeVoidWallet\");\n (0, index_js_4.defineProperties)(this, { publicKey });\n const fingerprint = (0, index_js_4.dataSlice)((0, index_js_1.ripemd160)((0, index_js_1.sha256)(publicKey)), 0, 4);\n (0, index_js_4.defineProperties)(this, {\n publicKey,\n fingerprint,\n parentFingerprint,\n chainCode,\n path,\n index: index2,\n depth\n });\n }\n connect(provider) {\n return new _HDNodeVoidWallet(_guard, this.address, this.publicKey, this.parentFingerprint, this.chainCode, this.path, this.index, this.depth, provider);\n }\n /**\n * The extended key.\n *\n * This key will begin with the prefix ``xpub`` and can be used to\n * reconstruct this neutered key to derive its children addresses.\n */\n get extendedKey() {\n (0, index_js_4.assert)(this.depth < 256, \"Depth too deep\", \"UNSUPPORTED_OPERATION\", { operation: \"extendedKey\" });\n return encodeBase58Check((0, index_js_4.concat)([\n \"0x0488B21E\",\n zpad(this.depth, 1),\n this.parentFingerprint,\n zpad(this.index, 4),\n this.chainCode,\n this.publicKey\n ]));\n }\n /**\n * Returns true if this wallet has a path, providing a Type Guard\n * that the path is non-null.\n */\n hasPath() {\n return this.path != null;\n }\n /**\n * Return the child for %%index%%.\n */\n deriveChild(_index) {\n const index2 = (0, index_js_4.getNumber)(_index, \"index\");\n (0, index_js_4.assertArgument)(index2 <= 4294967295, \"invalid index\", \"index\", index2);\n let path = this.path;\n if (path) {\n path += \"/\" + (index2 & ~HardenedBit);\n if (index2 & HardenedBit) {\n path += \"'\";\n }\n }\n const { IR, IL } = ser_I(index2, this.chainCode, this.publicKey, null);\n const Ki = index_js_1.SigningKey.addPoints(IL, this.publicKey, true);\n const address = (0, index_js_3.computeAddress)(Ki);\n return new _HDNodeVoidWallet(_guard, address, Ki, this.fingerprint, (0, index_js_4.hexlify)(IR), path, index2, this.depth + 1, this.provider);\n }\n /**\n * Return the signer for %%path%% from this node.\n */\n derivePath(path) {\n return derivePath(this, path);\n }\n };\n exports3.HDNodeVoidWallet = HDNodeVoidWallet;\n function getAccountPath(_index) {\n const index2 = (0, index_js_4.getNumber)(_index, \"index\");\n (0, index_js_4.assertArgument)(index2 >= 0 && index2 < HardenedBit, \"invalid account index\", \"index\", index2);\n return `m/44'/60'/${index2}'/0/0`;\n }\n exports3.getAccountPath = getAccountPath;\n function getIndexedAccountPath(_index) {\n const index2 = (0, index_js_4.getNumber)(_index, \"index\");\n (0, index_js_4.assertArgument)(index2 >= 0 && index2 < HardenedBit, \"invalid account index\", \"index\", index2);\n return `m/44'/60'/0'/0/${index2}`;\n }\n exports3.getIndexedAccountPath = getIndexedAccountPath;\n }\n });\n\n // ../../../node_modules/.pnpm/ethers@6.15.0_bufferutil@4.0.9_utf-8-validate@5.0.10/node_modules/ethers/lib.commonjs/wallet/json-crowdsale.js\n var require_json_crowdsale = __commonJS({\n \"../../../node_modules/.pnpm/ethers@6.15.0_bufferutil@4.0.9_utf-8-validate@5.0.10/node_modules/ethers/lib.commonjs/wallet/json-crowdsale.js\"(exports3) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n Object.defineProperty(exports3, \"__esModule\", { value: true });\n exports3.decryptCrowdsaleJson = exports3.isCrowdsaleJson = void 0;\n var aes_js_1 = require_lib33();\n var index_js_1 = require_address3();\n var index_js_2 = require_crypto2();\n var index_js_3 = require_hash2();\n var index_js_4 = require_utils8();\n var utils_js_1 = require_utils11();\n function isCrowdsaleJson(json) {\n try {\n const data = JSON.parse(json);\n if (data.encseed) {\n return true;\n }\n } catch (error) {\n }\n return false;\n }\n exports3.isCrowdsaleJson = isCrowdsaleJson;\n function decryptCrowdsaleJson(json, _password) {\n const data = JSON.parse(json);\n const password = (0, utils_js_1.getPassword)(_password);\n const address = (0, index_js_1.getAddress)((0, utils_js_1.spelunk)(data, \"ethaddr:string!\"));\n const encseed = (0, utils_js_1.looseArrayify)((0, utils_js_1.spelunk)(data, \"encseed:string!\"));\n (0, index_js_4.assertArgument)(encseed && encseed.length % 16 === 0, \"invalid encseed\", \"json\", json);\n const key = (0, index_js_4.getBytes)((0, index_js_2.pbkdf2)(password, password, 2e3, 32, \"sha256\")).slice(0, 16);\n const iv = encseed.slice(0, 16);\n const encryptedSeed = encseed.slice(16);\n const aesCbc = new aes_js_1.CBC(key, iv);\n const seed = (0, aes_js_1.pkcs7Strip)((0, index_js_4.getBytes)(aesCbc.decrypt(encryptedSeed)));\n let seedHex = \"\";\n for (let i3 = 0; i3 < seed.length; i3++) {\n seedHex += String.fromCharCode(seed[i3]);\n }\n return { address, privateKey: (0, index_js_3.id)(seedHex) };\n }\n exports3.decryptCrowdsaleJson = decryptCrowdsaleJson;\n }\n });\n\n // ../../../node_modules/.pnpm/ethers@6.15.0_bufferutil@4.0.9_utf-8-validate@5.0.10/node_modules/ethers/lib.commonjs/wallet/wallet.js\n var require_wallet = __commonJS({\n \"../../../node_modules/.pnpm/ethers@6.15.0_bufferutil@4.0.9_utf-8-validate@5.0.10/node_modules/ethers/lib.commonjs/wallet/wallet.js\"(exports3) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n Object.defineProperty(exports3, \"__esModule\", { value: true });\n exports3.Wallet = void 0;\n var index_js_1 = require_crypto2();\n var index_js_2 = require_utils8();\n var base_wallet_js_1 = require_base_wallet();\n var hdwallet_js_1 = require_hdwallet();\n var json_crowdsale_js_1 = require_json_crowdsale();\n var json_keystore_js_1 = require_json_keystore();\n var mnemonic_js_1 = require_mnemonic();\n function stall(duration) {\n return new Promise((resolve) => {\n setTimeout(() => {\n resolve();\n }, duration);\n });\n }\n var Wallet = class _Wallet extends base_wallet_js_1.BaseWallet {\n /**\n * Create a new wallet for the private %%key%%, optionally connected\n * to %%provider%%.\n */\n constructor(key, provider) {\n if (typeof key === \"string\" && !key.startsWith(\"0x\")) {\n key = \"0x\" + key;\n }\n let signingKey = typeof key === \"string\" ? new index_js_1.SigningKey(key) : key;\n super(signingKey, provider);\n }\n connect(provider) {\n return new _Wallet(this.signingKey, provider);\n }\n /**\n * Resolves to a [JSON Keystore Wallet](json-wallets) encrypted with\n * %%password%%.\n *\n * If %%progressCallback%% is specified, it will receive periodic\n * updates as the encryption process progreses.\n */\n async encrypt(password, progressCallback) {\n const account = { address: this.address, privateKey: this.privateKey };\n return await (0, json_keystore_js_1.encryptKeystoreJson)(account, password, { progressCallback });\n }\n /**\n * Returns a [JSON Keystore Wallet](json-wallets) encryped with\n * %%password%%.\n *\n * It is preferred to use the [async version](encrypt) instead,\n * which allows a [[ProgressCallback]] to keep the user informed.\n *\n * This method will block the event loop (freezing all UI) until\n * it is complete, which may be a non-trivial duration.\n */\n encryptSync(password) {\n const account = { address: this.address, privateKey: this.privateKey };\n return (0, json_keystore_js_1.encryptKeystoreJsonSync)(account, password);\n }\n static #fromAccount(account) {\n (0, index_js_2.assertArgument)(account, \"invalid JSON wallet\", \"json\", \"[ REDACTED ]\");\n if (\"mnemonic\" in account && account.mnemonic && account.mnemonic.locale === \"en\") {\n const mnemonic = mnemonic_js_1.Mnemonic.fromEntropy(account.mnemonic.entropy);\n const wallet2 = hdwallet_js_1.HDNodeWallet.fromMnemonic(mnemonic, account.mnemonic.path);\n if (wallet2.address === account.address && wallet2.privateKey === account.privateKey) {\n return wallet2;\n }\n console.log(\"WARNING: JSON mismatch address/privateKey != mnemonic; fallback onto private key\");\n }\n const wallet = new _Wallet(account.privateKey);\n (0, index_js_2.assertArgument)(wallet.address === account.address, \"address/privateKey mismatch\", \"json\", \"[ REDACTED ]\");\n return wallet;\n }\n /**\n * Creates (asynchronously) a **Wallet** by decrypting the %%json%%\n * with %%password%%.\n *\n * If %%progress%% is provided, it is called periodically during\n * decryption so that any UI can be updated.\n */\n static async fromEncryptedJson(json, password, progress) {\n let account = null;\n if ((0, json_keystore_js_1.isKeystoreJson)(json)) {\n account = await (0, json_keystore_js_1.decryptKeystoreJson)(json, password, progress);\n } else if ((0, json_crowdsale_js_1.isCrowdsaleJson)(json)) {\n if (progress) {\n progress(0);\n await stall(0);\n }\n account = (0, json_crowdsale_js_1.decryptCrowdsaleJson)(json, password);\n if (progress) {\n progress(1);\n await stall(0);\n }\n }\n return _Wallet.#fromAccount(account);\n }\n /**\n * Creates a **Wallet** by decrypting the %%json%% with %%password%%.\n *\n * The [[fromEncryptedJson]] method is preferred, as this method\n * will lock up and freeze the UI during decryption, which may take\n * some time.\n */\n static fromEncryptedJsonSync(json, password) {\n let account = null;\n if ((0, json_keystore_js_1.isKeystoreJson)(json)) {\n account = (0, json_keystore_js_1.decryptKeystoreJsonSync)(json, password);\n } else if ((0, json_crowdsale_js_1.isCrowdsaleJson)(json)) {\n account = (0, json_crowdsale_js_1.decryptCrowdsaleJson)(json, password);\n } else {\n (0, index_js_2.assertArgument)(false, \"invalid JSON wallet\", \"json\", \"[ REDACTED ]\");\n }\n return _Wallet.#fromAccount(account);\n }\n /**\n * Creates a new random [[HDNodeWallet]] using the available\n * [cryptographic random source](randomBytes).\n *\n * If there is no crytographic random source, this will throw.\n */\n static createRandom(provider) {\n const wallet = hdwallet_js_1.HDNodeWallet.createRandom();\n if (provider) {\n return wallet.connect(provider);\n }\n return wallet;\n }\n /**\n * Creates a [[HDNodeWallet]] for %%phrase%%.\n */\n static fromPhrase(phrase, provider) {\n const wallet = hdwallet_js_1.HDNodeWallet.fromPhrase(phrase);\n if (provider) {\n return wallet.connect(provider);\n }\n return wallet;\n }\n };\n exports3.Wallet = Wallet;\n }\n });\n\n // ../../../node_modules/.pnpm/ethers@6.15.0_bufferutil@4.0.9_utf-8-validate@5.0.10/node_modules/ethers/lib.commonjs/wallet/index.js\n var require_wallet2 = __commonJS({\n \"../../../node_modules/.pnpm/ethers@6.15.0_bufferutil@4.0.9_utf-8-validate@5.0.10/node_modules/ethers/lib.commonjs/wallet/index.js\"(exports3) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n Object.defineProperty(exports3, \"__esModule\", { value: true });\n exports3.Wallet = exports3.Mnemonic = exports3.encryptKeystoreJsonSync = exports3.encryptKeystoreJson = exports3.decryptKeystoreJson = exports3.decryptKeystoreJsonSync = exports3.isKeystoreJson = exports3.decryptCrowdsaleJson = exports3.isCrowdsaleJson = exports3.HDNodeVoidWallet = exports3.HDNodeWallet = exports3.getIndexedAccountPath = exports3.getAccountPath = exports3.defaultPath = exports3.BaseWallet = void 0;\n var base_wallet_js_1 = require_base_wallet();\n Object.defineProperty(exports3, \"BaseWallet\", { enumerable: true, get: function() {\n return base_wallet_js_1.BaseWallet;\n } });\n var hdwallet_js_1 = require_hdwallet();\n Object.defineProperty(exports3, \"defaultPath\", { enumerable: true, get: function() {\n return hdwallet_js_1.defaultPath;\n } });\n Object.defineProperty(exports3, \"getAccountPath\", { enumerable: true, get: function() {\n return hdwallet_js_1.getAccountPath;\n } });\n Object.defineProperty(exports3, \"getIndexedAccountPath\", { enumerable: true, get: function() {\n return hdwallet_js_1.getIndexedAccountPath;\n } });\n Object.defineProperty(exports3, \"HDNodeWallet\", { enumerable: true, get: function() {\n return hdwallet_js_1.HDNodeWallet;\n } });\n Object.defineProperty(exports3, \"HDNodeVoidWallet\", { enumerable: true, get: function() {\n return hdwallet_js_1.HDNodeVoidWallet;\n } });\n var json_crowdsale_js_1 = require_json_crowdsale();\n Object.defineProperty(exports3, \"isCrowdsaleJson\", { enumerable: true, get: function() {\n return json_crowdsale_js_1.isCrowdsaleJson;\n } });\n Object.defineProperty(exports3, \"decryptCrowdsaleJson\", { enumerable: true, get: function() {\n return json_crowdsale_js_1.decryptCrowdsaleJson;\n } });\n var json_keystore_js_1 = require_json_keystore();\n Object.defineProperty(exports3, \"isKeystoreJson\", { enumerable: true, get: function() {\n return json_keystore_js_1.isKeystoreJson;\n } });\n Object.defineProperty(exports3, \"decryptKeystoreJsonSync\", { enumerable: true, get: function() {\n return json_keystore_js_1.decryptKeystoreJsonSync;\n } });\n Object.defineProperty(exports3, \"decryptKeystoreJson\", { enumerable: true, get: function() {\n return json_keystore_js_1.decryptKeystoreJson;\n } });\n Object.defineProperty(exports3, \"encryptKeystoreJson\", { enumerable: true, get: function() {\n return json_keystore_js_1.encryptKeystoreJson;\n } });\n Object.defineProperty(exports3, \"encryptKeystoreJsonSync\", { enumerable: true, get: function() {\n return json_keystore_js_1.encryptKeystoreJsonSync;\n } });\n var mnemonic_js_1 = require_mnemonic();\n Object.defineProperty(exports3, \"Mnemonic\", { enumerable: true, get: function() {\n return mnemonic_js_1.Mnemonic;\n } });\n var wallet_js_1 = require_wallet();\n Object.defineProperty(exports3, \"Wallet\", { enumerable: true, get: function() {\n return wallet_js_1.Wallet;\n } });\n }\n });\n\n // ../../../node_modules/.pnpm/ethers@6.15.0_bufferutil@4.0.9_utf-8-validate@5.0.10/node_modules/ethers/lib.commonjs/wordlists/bit-reader.js\n var require_bit_reader = __commonJS({\n \"../../../node_modules/.pnpm/ethers@6.15.0_bufferutil@4.0.9_utf-8-validate@5.0.10/node_modules/ethers/lib.commonjs/wordlists/bit-reader.js\"(exports3) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n Object.defineProperty(exports3, \"__esModule\", { value: true });\n exports3.decodeBits = void 0;\n var Base64 = \")!@#$%^&*(ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz-_\";\n function decodeBits(width, data) {\n const maxValue = (1 << width) - 1;\n const result = [];\n let accum = 0, bits = 0, flood = 0;\n for (let i3 = 0; i3 < data.length; i3++) {\n accum = accum << 6 | Base64.indexOf(data[i3]);\n bits += 6;\n while (bits >= width) {\n const value = accum >> bits - width;\n accum &= (1 << bits - width) - 1;\n bits -= width;\n if (value === 0) {\n flood += maxValue;\n } else {\n result.push(value + flood);\n flood = 0;\n }\n }\n }\n return result;\n }\n exports3.decodeBits = decodeBits;\n }\n });\n\n // ../../../node_modules/.pnpm/ethers@6.15.0_bufferutil@4.0.9_utf-8-validate@5.0.10/node_modules/ethers/lib.commonjs/wordlists/decode-owla.js\n var require_decode_owla = __commonJS({\n \"../../../node_modules/.pnpm/ethers@6.15.0_bufferutil@4.0.9_utf-8-validate@5.0.10/node_modules/ethers/lib.commonjs/wordlists/decode-owla.js\"(exports3) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n Object.defineProperty(exports3, \"__esModule\", { value: true });\n exports3.decodeOwlA = void 0;\n var index_js_1 = require_utils8();\n var bit_reader_js_1 = require_bit_reader();\n var decode_owl_js_1 = require_decode_owl();\n function decodeOwlA(data, accents) {\n let words = (0, decode_owl_js_1.decodeOwl)(data).join(\",\");\n accents.split(/,/g).forEach((accent) => {\n const match = accent.match(/^([a-z]*)([0-9]+)([0-9])(.*)$/);\n (0, index_js_1.assertArgument)(match !== null, \"internal error parsing accents\", \"accents\", accents);\n let posOffset = 0;\n const positions = (0, bit_reader_js_1.decodeBits)(parseInt(match[3]), match[4]);\n const charCode = parseInt(match[2]);\n const regex2 = new RegExp(`([${match[1]}])`, \"g\");\n words = words.replace(regex2, (all, letter) => {\n const rem = --positions[posOffset];\n if (rem === 0) {\n letter = String.fromCharCode(letter.charCodeAt(0), charCode);\n posOffset++;\n }\n return letter;\n });\n });\n return words.split(\",\");\n }\n exports3.decodeOwlA = decodeOwlA;\n }\n });\n\n // ../../../node_modules/.pnpm/ethers@6.15.0_bufferutil@4.0.9_utf-8-validate@5.0.10/node_modules/ethers/lib.commonjs/wordlists/wordlist-owla.js\n var require_wordlist_owla = __commonJS({\n \"../../../node_modules/.pnpm/ethers@6.15.0_bufferutil@4.0.9_utf-8-validate@5.0.10/node_modules/ethers/lib.commonjs/wordlists/wordlist-owla.js\"(exports3) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n Object.defineProperty(exports3, \"__esModule\", { value: true });\n exports3.WordlistOwlA = void 0;\n var wordlist_owl_js_1 = require_wordlist_owl();\n var decode_owla_js_1 = require_decode_owla();\n var WordlistOwlA = class extends wordlist_owl_js_1.WordlistOwl {\n #accent;\n /**\n * Creates a new Wordlist for %%locale%% using the OWLA %%data%%\n * and %%accent%% data and validated against the %%checksum%%.\n */\n constructor(locale, data, accent, checksum4) {\n super(locale, data, checksum4);\n this.#accent = accent;\n }\n /**\n * The OWLA-encoded accent data.\n */\n get _accent() {\n return this.#accent;\n }\n /**\n * Decode all the words for the wordlist.\n */\n _decodeWords() {\n return (0, decode_owla_js_1.decodeOwlA)(this._data, this._accent);\n }\n };\n exports3.WordlistOwlA = WordlistOwlA;\n }\n });\n\n // ../../../node_modules/.pnpm/ethers@6.15.0_bufferutil@4.0.9_utf-8-validate@5.0.10/node_modules/ethers/lib.commonjs/wordlists/wordlists-browser.js\n var require_wordlists_browser = __commonJS({\n \"../../../node_modules/.pnpm/ethers@6.15.0_bufferutil@4.0.9_utf-8-validate@5.0.10/node_modules/ethers/lib.commonjs/wordlists/wordlists-browser.js\"(exports3) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n Object.defineProperty(exports3, \"__esModule\", { value: true });\n exports3.wordlists = void 0;\n var lang_en_js_1 = require_lang_en2();\n exports3.wordlists = {\n en: lang_en_js_1.LangEn.wordlist()\n };\n }\n });\n\n // ../../../node_modules/.pnpm/ethers@6.15.0_bufferutil@4.0.9_utf-8-validate@5.0.10/node_modules/ethers/lib.commonjs/wordlists/index.js\n var require_wordlists2 = __commonJS({\n \"../../../node_modules/.pnpm/ethers@6.15.0_bufferutil@4.0.9_utf-8-validate@5.0.10/node_modules/ethers/lib.commonjs/wordlists/index.js\"(exports3) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n Object.defineProperty(exports3, \"__esModule\", { value: true });\n exports3.wordlists = exports3.WordlistOwlA = exports3.WordlistOwl = exports3.LangEn = exports3.Wordlist = void 0;\n var wordlist_js_1 = require_wordlist2();\n Object.defineProperty(exports3, \"Wordlist\", { enumerable: true, get: function() {\n return wordlist_js_1.Wordlist;\n } });\n var lang_en_js_1 = require_lang_en2();\n Object.defineProperty(exports3, \"LangEn\", { enumerable: true, get: function() {\n return lang_en_js_1.LangEn;\n } });\n var wordlist_owl_js_1 = require_wordlist_owl();\n Object.defineProperty(exports3, \"WordlistOwl\", { enumerable: true, get: function() {\n return wordlist_owl_js_1.WordlistOwl;\n } });\n var wordlist_owla_js_1 = require_wordlist_owla();\n Object.defineProperty(exports3, \"WordlistOwlA\", { enumerable: true, get: function() {\n return wordlist_owla_js_1.WordlistOwlA;\n } });\n var wordlists_js_1 = require_wordlists_browser();\n Object.defineProperty(exports3, \"wordlists\", { enumerable: true, get: function() {\n return wordlists_js_1.wordlists;\n } });\n }\n });\n\n // ../../../node_modules/.pnpm/ethers@6.15.0_bufferutil@4.0.9_utf-8-validate@5.0.10/node_modules/ethers/lib.commonjs/ethers.js\n var require_ethers2 = __commonJS({\n \"../../../node_modules/.pnpm/ethers@6.15.0_bufferutil@4.0.9_utf-8-validate@5.0.10/node_modules/ethers/lib.commonjs/ethers.js\"(exports3) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n Object.defineProperty(exports3, \"__esModule\", { value: true });\n exports3.ripemd160 = exports3.keccak256 = exports3.randomBytes = exports3.computeHmac = exports3.UndecodedEventLog = exports3.EventLog = exports3.ContractUnknownEventPayload = exports3.ContractTransactionResponse = exports3.ContractTransactionReceipt = exports3.ContractEventPayload = exports3.ContractFactory = exports3.Contract = exports3.BaseContract = exports3.MessagePrefix = exports3.EtherSymbol = exports3.ZeroHash = exports3.N = exports3.MaxInt256 = exports3.MinInt256 = exports3.MaxUint256 = exports3.WeiPerEther = exports3.ZeroAddress = exports3.resolveAddress = exports3.isAddress = exports3.isAddressable = exports3.getCreate2Address = exports3.getCreateAddress = exports3.getIcapAddress = exports3.getAddress = exports3.Typed = exports3.TransactionDescription = exports3.Result = exports3.LogDescription = exports3.Interface = exports3.Indexed = exports3.ErrorDescription = exports3.checkResultErrors = exports3.StructFragment = exports3.ParamType = exports3.NamedFragment = exports3.FunctionFragment = exports3.FallbackFragment = exports3.Fragment = exports3.EventFragment = exports3.ErrorFragment = exports3.ConstructorFragment = exports3.AbiCoder = exports3.encodeBytes32String = exports3.decodeBytes32String = exports3.version = void 0;\n exports3.WebSocketProvider = exports3.SocketProvider = exports3.IpcSocketProvider = exports3.QuickNodeProvider = exports3.PocketProvider = exports3.InfuraWebSocketProvider = exports3.InfuraProvider = exports3.EtherscanProvider = exports3.CloudflareProvider = exports3.ChainstackProvider = exports3.BlockscoutProvider = exports3.AnkrProvider = exports3.AlchemyProvider = exports3.BrowserProvider = exports3.JsonRpcSigner = exports3.JsonRpcProvider = exports3.JsonRpcApiProvider = exports3.FallbackProvider = exports3.AbstractProvider = exports3.VoidSigner = exports3.NonceManager = exports3.AbstractSigner = exports3.TransactionResponse = exports3.TransactionReceipt = exports3.Log = exports3.FeeData = exports3.Block = exports3.getDefaultProvider = exports3.verifyTypedData = exports3.TypedDataEncoder = exports3.solidityPackedSha256 = exports3.solidityPackedKeccak256 = exports3.solidityPacked = exports3.verifyMessage = exports3.hashMessage = exports3.verifyAuthorization = exports3.hashAuthorization = exports3.dnsEncode = exports3.namehash = exports3.isValidName = exports3.ensNormalize = exports3.id = exports3.SigningKey = exports3.Signature = exports3.lock = exports3.scryptSync = exports3.scrypt = exports3.pbkdf2 = exports3.sha512 = exports3.sha256 = void 0;\n exports3.FetchCancelSignal = exports3.FetchResponse = exports3.FetchRequest = exports3.EventPayload = exports3.isError = exports3.isCallException = exports3.makeError = exports3.assertPrivate = exports3.assertNormalize = exports3.assertArgumentCount = exports3.assertArgument = exports3.assert = exports3.resolveProperties = exports3.defineProperties = exports3.zeroPadValue = exports3.zeroPadBytes = exports3.stripZerosLeft = exports3.isBytesLike = exports3.isHexString = exports3.hexlify = exports3.getBytesCopy = exports3.getBytes = exports3.dataSlice = exports3.dataLength = exports3.concat = exports3.encodeBase64 = exports3.decodeBase64 = exports3.encodeBase58 = exports3.decodeBase58 = exports3.Transaction = exports3.recoverAddress = exports3.computeAddress = exports3.authorizationify = exports3.accessListify = exports3.showThrottleMessage = exports3.copyRequest = exports3.UnmanagedSubscriber = exports3.SocketSubscriber = exports3.SocketPendingSubscriber = exports3.SocketEventSubscriber = exports3.SocketBlockSubscriber = exports3.MulticoinProviderPlugin = exports3.NetworkPlugin = exports3.GasCostPlugin = exports3.FetchUrlFeeDataNetworkPlugin = exports3.FeeDataNetworkPlugin = exports3.EtherscanPlugin = exports3.EnsPlugin = exports3.Network = exports3.EnsResolver = void 0;\n exports3.wordlists = exports3.WordlistOwlA = exports3.WordlistOwl = exports3.LangEn = exports3.Wordlist = exports3.encryptKeystoreJsonSync = exports3.encryptKeystoreJson = exports3.decryptKeystoreJson = exports3.decryptKeystoreJsonSync = exports3.decryptCrowdsaleJson = exports3.isKeystoreJson = exports3.isCrowdsaleJson = exports3.getIndexedAccountPath = exports3.getAccountPath = exports3.defaultPath = exports3.Wallet = exports3.HDNodeVoidWallet = exports3.HDNodeWallet = exports3.BaseWallet = exports3.Mnemonic = exports3.uuidV4 = exports3.encodeRlp = exports3.decodeRlp = exports3.Utf8ErrorFuncs = exports3.toUtf8String = exports3.toUtf8CodePoints = exports3.toUtf8Bytes = exports3.parseUnits = exports3.formatUnits = exports3.parseEther = exports3.formatEther = exports3.mask = exports3.toTwos = exports3.fromTwos = exports3.toQuantity = exports3.toNumber = exports3.toBeHex = exports3.toBigInt = exports3.toBeArray = exports3.getUint = exports3.getNumber = exports3.getBigInt = exports3.FixedNumber = void 0;\n var _version_js_1 = require_version27();\n Object.defineProperty(exports3, \"version\", { enumerable: true, get: function() {\n return _version_js_1.version;\n } });\n var index_js_1 = require_abi();\n Object.defineProperty(exports3, \"decodeBytes32String\", { enumerable: true, get: function() {\n return index_js_1.decodeBytes32String;\n } });\n Object.defineProperty(exports3, \"encodeBytes32String\", { enumerable: true, get: function() {\n return index_js_1.encodeBytes32String;\n } });\n Object.defineProperty(exports3, \"AbiCoder\", { enumerable: true, get: function() {\n return index_js_1.AbiCoder;\n } });\n Object.defineProperty(exports3, \"ConstructorFragment\", { enumerable: true, get: function() {\n return index_js_1.ConstructorFragment;\n } });\n Object.defineProperty(exports3, \"ErrorFragment\", { enumerable: true, get: function() {\n return index_js_1.ErrorFragment;\n } });\n Object.defineProperty(exports3, \"EventFragment\", { enumerable: true, get: function() {\n return index_js_1.EventFragment;\n } });\n Object.defineProperty(exports3, \"Fragment\", { enumerable: true, get: function() {\n return index_js_1.Fragment;\n } });\n Object.defineProperty(exports3, \"FallbackFragment\", { enumerable: true, get: function() {\n return index_js_1.FallbackFragment;\n } });\n Object.defineProperty(exports3, \"FunctionFragment\", { enumerable: true, get: function() {\n return index_js_1.FunctionFragment;\n } });\n Object.defineProperty(exports3, \"NamedFragment\", { enumerable: true, get: function() {\n return index_js_1.NamedFragment;\n } });\n Object.defineProperty(exports3, \"ParamType\", { enumerable: true, get: function() {\n return index_js_1.ParamType;\n } });\n Object.defineProperty(exports3, \"StructFragment\", { enumerable: true, get: function() {\n return index_js_1.StructFragment;\n } });\n Object.defineProperty(exports3, \"checkResultErrors\", { enumerable: true, get: function() {\n return index_js_1.checkResultErrors;\n } });\n Object.defineProperty(exports3, \"ErrorDescription\", { enumerable: true, get: function() {\n return index_js_1.ErrorDescription;\n } });\n Object.defineProperty(exports3, \"Indexed\", { enumerable: true, get: function() {\n return index_js_1.Indexed;\n } });\n Object.defineProperty(exports3, \"Interface\", { enumerable: true, get: function() {\n return index_js_1.Interface;\n } });\n Object.defineProperty(exports3, \"LogDescription\", { enumerable: true, get: function() {\n return index_js_1.LogDescription;\n } });\n Object.defineProperty(exports3, \"Result\", { enumerable: true, get: function() {\n return index_js_1.Result;\n } });\n Object.defineProperty(exports3, \"TransactionDescription\", { enumerable: true, get: function() {\n return index_js_1.TransactionDescription;\n } });\n Object.defineProperty(exports3, \"Typed\", { enumerable: true, get: function() {\n return index_js_1.Typed;\n } });\n var index_js_2 = require_address3();\n Object.defineProperty(exports3, \"getAddress\", { enumerable: true, get: function() {\n return index_js_2.getAddress;\n } });\n Object.defineProperty(exports3, \"getIcapAddress\", { enumerable: true, get: function() {\n return index_js_2.getIcapAddress;\n } });\n Object.defineProperty(exports3, \"getCreateAddress\", { enumerable: true, get: function() {\n return index_js_2.getCreateAddress;\n } });\n Object.defineProperty(exports3, \"getCreate2Address\", { enumerable: true, get: function() {\n return index_js_2.getCreate2Address;\n } });\n Object.defineProperty(exports3, \"isAddressable\", { enumerable: true, get: function() {\n return index_js_2.isAddressable;\n } });\n Object.defineProperty(exports3, \"isAddress\", { enumerable: true, get: function() {\n return index_js_2.isAddress;\n } });\n Object.defineProperty(exports3, \"resolveAddress\", { enumerable: true, get: function() {\n return index_js_2.resolveAddress;\n } });\n var index_js_3 = require_constants5();\n Object.defineProperty(exports3, \"ZeroAddress\", { enumerable: true, get: function() {\n return index_js_3.ZeroAddress;\n } });\n Object.defineProperty(exports3, \"WeiPerEther\", { enumerable: true, get: function() {\n return index_js_3.WeiPerEther;\n } });\n Object.defineProperty(exports3, \"MaxUint256\", { enumerable: true, get: function() {\n return index_js_3.MaxUint256;\n } });\n Object.defineProperty(exports3, \"MinInt256\", { enumerable: true, get: function() {\n return index_js_3.MinInt256;\n } });\n Object.defineProperty(exports3, \"MaxInt256\", { enumerable: true, get: function() {\n return index_js_3.MaxInt256;\n } });\n Object.defineProperty(exports3, \"N\", { enumerable: true, get: function() {\n return index_js_3.N;\n } });\n Object.defineProperty(exports3, \"ZeroHash\", { enumerable: true, get: function() {\n return index_js_3.ZeroHash;\n } });\n Object.defineProperty(exports3, \"EtherSymbol\", { enumerable: true, get: function() {\n return index_js_3.EtherSymbol;\n } });\n Object.defineProperty(exports3, \"MessagePrefix\", { enumerable: true, get: function() {\n return index_js_3.MessagePrefix;\n } });\n var index_js_4 = require_contract2();\n Object.defineProperty(exports3, \"BaseContract\", { enumerable: true, get: function() {\n return index_js_4.BaseContract;\n } });\n Object.defineProperty(exports3, \"Contract\", { enumerable: true, get: function() {\n return index_js_4.Contract;\n } });\n Object.defineProperty(exports3, \"ContractFactory\", { enumerable: true, get: function() {\n return index_js_4.ContractFactory;\n } });\n Object.defineProperty(exports3, \"ContractEventPayload\", { enumerable: true, get: function() {\n return index_js_4.ContractEventPayload;\n } });\n Object.defineProperty(exports3, \"ContractTransactionReceipt\", { enumerable: true, get: function() {\n return index_js_4.ContractTransactionReceipt;\n } });\n Object.defineProperty(exports3, \"ContractTransactionResponse\", { enumerable: true, get: function() {\n return index_js_4.ContractTransactionResponse;\n } });\n Object.defineProperty(exports3, \"ContractUnknownEventPayload\", { enumerable: true, get: function() {\n return index_js_4.ContractUnknownEventPayload;\n } });\n Object.defineProperty(exports3, \"EventLog\", { enumerable: true, get: function() {\n return index_js_4.EventLog;\n } });\n Object.defineProperty(exports3, \"UndecodedEventLog\", { enumerable: true, get: function() {\n return index_js_4.UndecodedEventLog;\n } });\n var index_js_5 = require_crypto2();\n Object.defineProperty(exports3, \"computeHmac\", { enumerable: true, get: function() {\n return index_js_5.computeHmac;\n } });\n Object.defineProperty(exports3, \"randomBytes\", { enumerable: true, get: function() {\n return index_js_5.randomBytes;\n } });\n Object.defineProperty(exports3, \"keccak256\", { enumerable: true, get: function() {\n return index_js_5.keccak256;\n } });\n Object.defineProperty(exports3, \"ripemd160\", { enumerable: true, get: function() {\n return index_js_5.ripemd160;\n } });\n Object.defineProperty(exports3, \"sha256\", { enumerable: true, get: function() {\n return index_js_5.sha256;\n } });\n Object.defineProperty(exports3, \"sha512\", { enumerable: true, get: function() {\n return index_js_5.sha512;\n } });\n Object.defineProperty(exports3, \"pbkdf2\", { enumerable: true, get: function() {\n return index_js_5.pbkdf2;\n } });\n Object.defineProperty(exports3, \"scrypt\", { enumerable: true, get: function() {\n return index_js_5.scrypt;\n } });\n Object.defineProperty(exports3, \"scryptSync\", { enumerable: true, get: function() {\n return index_js_5.scryptSync;\n } });\n Object.defineProperty(exports3, \"lock\", { enumerable: true, get: function() {\n return index_js_5.lock;\n } });\n Object.defineProperty(exports3, \"Signature\", { enumerable: true, get: function() {\n return index_js_5.Signature;\n } });\n Object.defineProperty(exports3, \"SigningKey\", { enumerable: true, get: function() {\n return index_js_5.SigningKey;\n } });\n var index_js_6 = require_hash2();\n Object.defineProperty(exports3, \"id\", { enumerable: true, get: function() {\n return index_js_6.id;\n } });\n Object.defineProperty(exports3, \"ensNormalize\", { enumerable: true, get: function() {\n return index_js_6.ensNormalize;\n } });\n Object.defineProperty(exports3, \"isValidName\", { enumerable: true, get: function() {\n return index_js_6.isValidName;\n } });\n Object.defineProperty(exports3, \"namehash\", { enumerable: true, get: function() {\n return index_js_6.namehash;\n } });\n Object.defineProperty(exports3, \"dnsEncode\", { enumerable: true, get: function() {\n return index_js_6.dnsEncode;\n } });\n Object.defineProperty(exports3, \"hashAuthorization\", { enumerable: true, get: function() {\n return index_js_6.hashAuthorization;\n } });\n Object.defineProperty(exports3, \"verifyAuthorization\", { enumerable: true, get: function() {\n return index_js_6.verifyAuthorization;\n } });\n Object.defineProperty(exports3, \"hashMessage\", { enumerable: true, get: function() {\n return index_js_6.hashMessage;\n } });\n Object.defineProperty(exports3, \"verifyMessage\", { enumerable: true, get: function() {\n return index_js_6.verifyMessage;\n } });\n Object.defineProperty(exports3, \"solidityPacked\", { enumerable: true, get: function() {\n return index_js_6.solidityPacked;\n } });\n Object.defineProperty(exports3, \"solidityPackedKeccak256\", { enumerable: true, get: function() {\n return index_js_6.solidityPackedKeccak256;\n } });\n Object.defineProperty(exports3, \"solidityPackedSha256\", { enumerable: true, get: function() {\n return index_js_6.solidityPackedSha256;\n } });\n Object.defineProperty(exports3, \"TypedDataEncoder\", { enumerable: true, get: function() {\n return index_js_6.TypedDataEncoder;\n } });\n Object.defineProperty(exports3, \"verifyTypedData\", { enumerable: true, get: function() {\n return index_js_6.verifyTypedData;\n } });\n var index_js_7 = require_providers();\n Object.defineProperty(exports3, \"getDefaultProvider\", { enumerable: true, get: function() {\n return index_js_7.getDefaultProvider;\n } });\n Object.defineProperty(exports3, \"Block\", { enumerable: true, get: function() {\n return index_js_7.Block;\n } });\n Object.defineProperty(exports3, \"FeeData\", { enumerable: true, get: function() {\n return index_js_7.FeeData;\n } });\n Object.defineProperty(exports3, \"Log\", { enumerable: true, get: function() {\n return index_js_7.Log;\n } });\n Object.defineProperty(exports3, \"TransactionReceipt\", { enumerable: true, get: function() {\n return index_js_7.TransactionReceipt;\n } });\n Object.defineProperty(exports3, \"TransactionResponse\", { enumerable: true, get: function() {\n return index_js_7.TransactionResponse;\n } });\n Object.defineProperty(exports3, \"AbstractSigner\", { enumerable: true, get: function() {\n return index_js_7.AbstractSigner;\n } });\n Object.defineProperty(exports3, \"NonceManager\", { enumerable: true, get: function() {\n return index_js_7.NonceManager;\n } });\n Object.defineProperty(exports3, \"VoidSigner\", { enumerable: true, get: function() {\n return index_js_7.VoidSigner;\n } });\n Object.defineProperty(exports3, \"AbstractProvider\", { enumerable: true, get: function() {\n return index_js_7.AbstractProvider;\n } });\n Object.defineProperty(exports3, \"FallbackProvider\", { enumerable: true, get: function() {\n return index_js_7.FallbackProvider;\n } });\n Object.defineProperty(exports3, \"JsonRpcApiProvider\", { enumerable: true, get: function() {\n return index_js_7.JsonRpcApiProvider;\n } });\n Object.defineProperty(exports3, \"JsonRpcProvider\", { enumerable: true, get: function() {\n return index_js_7.JsonRpcProvider;\n } });\n Object.defineProperty(exports3, \"JsonRpcSigner\", { enumerable: true, get: function() {\n return index_js_7.JsonRpcSigner;\n } });\n Object.defineProperty(exports3, \"BrowserProvider\", { enumerable: true, get: function() {\n return index_js_7.BrowserProvider;\n } });\n Object.defineProperty(exports3, \"AlchemyProvider\", { enumerable: true, get: function() {\n return index_js_7.AlchemyProvider;\n } });\n Object.defineProperty(exports3, \"AnkrProvider\", { enumerable: true, get: function() {\n return index_js_7.AnkrProvider;\n } });\n Object.defineProperty(exports3, \"BlockscoutProvider\", { enumerable: true, get: function() {\n return index_js_7.BlockscoutProvider;\n } });\n Object.defineProperty(exports3, \"ChainstackProvider\", { enumerable: true, get: function() {\n return index_js_7.ChainstackProvider;\n } });\n Object.defineProperty(exports3, \"CloudflareProvider\", { enumerable: true, get: function() {\n return index_js_7.CloudflareProvider;\n } });\n Object.defineProperty(exports3, \"EtherscanProvider\", { enumerable: true, get: function() {\n return index_js_7.EtherscanProvider;\n } });\n Object.defineProperty(exports3, \"InfuraProvider\", { enumerable: true, get: function() {\n return index_js_7.InfuraProvider;\n } });\n Object.defineProperty(exports3, \"InfuraWebSocketProvider\", { enumerable: true, get: function() {\n return index_js_7.InfuraWebSocketProvider;\n } });\n Object.defineProperty(exports3, \"PocketProvider\", { enumerable: true, get: function() {\n return index_js_7.PocketProvider;\n } });\n Object.defineProperty(exports3, \"QuickNodeProvider\", { enumerable: true, get: function() {\n return index_js_7.QuickNodeProvider;\n } });\n Object.defineProperty(exports3, \"IpcSocketProvider\", { enumerable: true, get: function() {\n return index_js_7.IpcSocketProvider;\n } });\n Object.defineProperty(exports3, \"SocketProvider\", { enumerable: true, get: function() {\n return index_js_7.SocketProvider;\n } });\n Object.defineProperty(exports3, \"WebSocketProvider\", { enumerable: true, get: function() {\n return index_js_7.WebSocketProvider;\n } });\n Object.defineProperty(exports3, \"EnsResolver\", { enumerable: true, get: function() {\n return index_js_7.EnsResolver;\n } });\n Object.defineProperty(exports3, \"Network\", { enumerable: true, get: function() {\n return index_js_7.Network;\n } });\n Object.defineProperty(exports3, \"EnsPlugin\", { enumerable: true, get: function() {\n return index_js_7.EnsPlugin;\n } });\n Object.defineProperty(exports3, \"EtherscanPlugin\", { enumerable: true, get: function() {\n return index_js_7.EtherscanPlugin;\n } });\n Object.defineProperty(exports3, \"FeeDataNetworkPlugin\", { enumerable: true, get: function() {\n return index_js_7.FeeDataNetworkPlugin;\n } });\n Object.defineProperty(exports3, \"FetchUrlFeeDataNetworkPlugin\", { enumerable: true, get: function() {\n return index_js_7.FetchUrlFeeDataNetworkPlugin;\n } });\n Object.defineProperty(exports3, \"GasCostPlugin\", { enumerable: true, get: function() {\n return index_js_7.GasCostPlugin;\n } });\n Object.defineProperty(exports3, \"NetworkPlugin\", { enumerable: true, get: function() {\n return index_js_7.NetworkPlugin;\n } });\n Object.defineProperty(exports3, \"MulticoinProviderPlugin\", { enumerable: true, get: function() {\n return index_js_7.MulticoinProviderPlugin;\n } });\n Object.defineProperty(exports3, \"SocketBlockSubscriber\", { enumerable: true, get: function() {\n return index_js_7.SocketBlockSubscriber;\n } });\n Object.defineProperty(exports3, \"SocketEventSubscriber\", { enumerable: true, get: function() {\n return index_js_7.SocketEventSubscriber;\n } });\n Object.defineProperty(exports3, \"SocketPendingSubscriber\", { enumerable: true, get: function() {\n return index_js_7.SocketPendingSubscriber;\n } });\n Object.defineProperty(exports3, \"SocketSubscriber\", { enumerable: true, get: function() {\n return index_js_7.SocketSubscriber;\n } });\n Object.defineProperty(exports3, \"UnmanagedSubscriber\", { enumerable: true, get: function() {\n return index_js_7.UnmanagedSubscriber;\n } });\n Object.defineProperty(exports3, \"copyRequest\", { enumerable: true, get: function() {\n return index_js_7.copyRequest;\n } });\n Object.defineProperty(exports3, \"showThrottleMessage\", { enumerable: true, get: function() {\n return index_js_7.showThrottleMessage;\n } });\n var index_js_8 = require_transaction2();\n Object.defineProperty(exports3, \"accessListify\", { enumerable: true, get: function() {\n return index_js_8.accessListify;\n } });\n Object.defineProperty(exports3, \"authorizationify\", { enumerable: true, get: function() {\n return index_js_8.authorizationify;\n } });\n Object.defineProperty(exports3, \"computeAddress\", { enumerable: true, get: function() {\n return index_js_8.computeAddress;\n } });\n Object.defineProperty(exports3, \"recoverAddress\", { enumerable: true, get: function() {\n return index_js_8.recoverAddress;\n } });\n Object.defineProperty(exports3, \"Transaction\", { enumerable: true, get: function() {\n return index_js_8.Transaction;\n } });\n var index_js_9 = require_utils8();\n Object.defineProperty(exports3, \"decodeBase58\", { enumerable: true, get: function() {\n return index_js_9.decodeBase58;\n } });\n Object.defineProperty(exports3, \"encodeBase58\", { enumerable: true, get: function() {\n return index_js_9.encodeBase58;\n } });\n Object.defineProperty(exports3, \"decodeBase64\", { enumerable: true, get: function() {\n return index_js_9.decodeBase64;\n } });\n Object.defineProperty(exports3, \"encodeBase64\", { enumerable: true, get: function() {\n return index_js_9.encodeBase64;\n } });\n Object.defineProperty(exports3, \"concat\", { enumerable: true, get: function() {\n return index_js_9.concat;\n } });\n Object.defineProperty(exports3, \"dataLength\", { enumerable: true, get: function() {\n return index_js_9.dataLength;\n } });\n Object.defineProperty(exports3, \"dataSlice\", { enumerable: true, get: function() {\n return index_js_9.dataSlice;\n } });\n Object.defineProperty(exports3, \"getBytes\", { enumerable: true, get: function() {\n return index_js_9.getBytes;\n } });\n Object.defineProperty(exports3, \"getBytesCopy\", { enumerable: true, get: function() {\n return index_js_9.getBytesCopy;\n } });\n Object.defineProperty(exports3, \"hexlify\", { enumerable: true, get: function() {\n return index_js_9.hexlify;\n } });\n Object.defineProperty(exports3, \"isHexString\", { enumerable: true, get: function() {\n return index_js_9.isHexString;\n } });\n Object.defineProperty(exports3, \"isBytesLike\", { enumerable: true, get: function() {\n return index_js_9.isBytesLike;\n } });\n Object.defineProperty(exports3, \"stripZerosLeft\", { enumerable: true, get: function() {\n return index_js_9.stripZerosLeft;\n } });\n Object.defineProperty(exports3, \"zeroPadBytes\", { enumerable: true, get: function() {\n return index_js_9.zeroPadBytes;\n } });\n Object.defineProperty(exports3, \"zeroPadValue\", { enumerable: true, get: function() {\n return index_js_9.zeroPadValue;\n } });\n Object.defineProperty(exports3, \"defineProperties\", { enumerable: true, get: function() {\n return index_js_9.defineProperties;\n } });\n Object.defineProperty(exports3, \"resolveProperties\", { enumerable: true, get: function() {\n return index_js_9.resolveProperties;\n } });\n Object.defineProperty(exports3, \"assert\", { enumerable: true, get: function() {\n return index_js_9.assert;\n } });\n Object.defineProperty(exports3, \"assertArgument\", { enumerable: true, get: function() {\n return index_js_9.assertArgument;\n } });\n Object.defineProperty(exports3, \"assertArgumentCount\", { enumerable: true, get: function() {\n return index_js_9.assertArgumentCount;\n } });\n Object.defineProperty(exports3, \"assertNormalize\", { enumerable: true, get: function() {\n return index_js_9.assertNormalize;\n } });\n Object.defineProperty(exports3, \"assertPrivate\", { enumerable: true, get: function() {\n return index_js_9.assertPrivate;\n } });\n Object.defineProperty(exports3, \"makeError\", { enumerable: true, get: function() {\n return index_js_9.makeError;\n } });\n Object.defineProperty(exports3, \"isCallException\", { enumerable: true, get: function() {\n return index_js_9.isCallException;\n } });\n Object.defineProperty(exports3, \"isError\", { enumerable: true, get: function() {\n return index_js_9.isError;\n } });\n Object.defineProperty(exports3, \"EventPayload\", { enumerable: true, get: function() {\n return index_js_9.EventPayload;\n } });\n Object.defineProperty(exports3, \"FetchRequest\", { enumerable: true, get: function() {\n return index_js_9.FetchRequest;\n } });\n Object.defineProperty(exports3, \"FetchResponse\", { enumerable: true, get: function() {\n return index_js_9.FetchResponse;\n } });\n Object.defineProperty(exports3, \"FetchCancelSignal\", { enumerable: true, get: function() {\n return index_js_9.FetchCancelSignal;\n } });\n Object.defineProperty(exports3, \"FixedNumber\", { enumerable: true, get: function() {\n return index_js_9.FixedNumber;\n } });\n Object.defineProperty(exports3, \"getBigInt\", { enumerable: true, get: function() {\n return index_js_9.getBigInt;\n } });\n Object.defineProperty(exports3, \"getNumber\", { enumerable: true, get: function() {\n return index_js_9.getNumber;\n } });\n Object.defineProperty(exports3, \"getUint\", { enumerable: true, get: function() {\n return index_js_9.getUint;\n } });\n Object.defineProperty(exports3, \"toBeArray\", { enumerable: true, get: function() {\n return index_js_9.toBeArray;\n } });\n Object.defineProperty(exports3, \"toBigInt\", { enumerable: true, get: function() {\n return index_js_9.toBigInt;\n } });\n Object.defineProperty(exports3, \"toBeHex\", { enumerable: true, get: function() {\n return index_js_9.toBeHex;\n } });\n Object.defineProperty(exports3, \"toNumber\", { enumerable: true, get: function() {\n return index_js_9.toNumber;\n } });\n Object.defineProperty(exports3, \"toQuantity\", { enumerable: true, get: function() {\n return index_js_9.toQuantity;\n } });\n Object.defineProperty(exports3, \"fromTwos\", { enumerable: true, get: function() {\n return index_js_9.fromTwos;\n } });\n Object.defineProperty(exports3, \"toTwos\", { enumerable: true, get: function() {\n return index_js_9.toTwos;\n } });\n Object.defineProperty(exports3, \"mask\", { enumerable: true, get: function() {\n return index_js_9.mask;\n } });\n Object.defineProperty(exports3, \"formatEther\", { enumerable: true, get: function() {\n return index_js_9.formatEther;\n } });\n Object.defineProperty(exports3, \"parseEther\", { enumerable: true, get: function() {\n return index_js_9.parseEther;\n } });\n Object.defineProperty(exports3, \"formatUnits\", { enumerable: true, get: function() {\n return index_js_9.formatUnits;\n } });\n Object.defineProperty(exports3, \"parseUnits\", { enumerable: true, get: function() {\n return index_js_9.parseUnits;\n } });\n Object.defineProperty(exports3, \"toUtf8Bytes\", { enumerable: true, get: function() {\n return index_js_9.toUtf8Bytes;\n } });\n Object.defineProperty(exports3, \"toUtf8CodePoints\", { enumerable: true, get: function() {\n return index_js_9.toUtf8CodePoints;\n } });\n Object.defineProperty(exports3, \"toUtf8String\", { enumerable: true, get: function() {\n return index_js_9.toUtf8String;\n } });\n Object.defineProperty(exports3, \"Utf8ErrorFuncs\", { enumerable: true, get: function() {\n return index_js_9.Utf8ErrorFuncs;\n } });\n Object.defineProperty(exports3, \"decodeRlp\", { enumerable: true, get: function() {\n return index_js_9.decodeRlp;\n } });\n Object.defineProperty(exports3, \"encodeRlp\", { enumerable: true, get: function() {\n return index_js_9.encodeRlp;\n } });\n Object.defineProperty(exports3, \"uuidV4\", { enumerable: true, get: function() {\n return index_js_9.uuidV4;\n } });\n var index_js_10 = require_wallet2();\n Object.defineProperty(exports3, \"Mnemonic\", { enumerable: true, get: function() {\n return index_js_10.Mnemonic;\n } });\n Object.defineProperty(exports3, \"BaseWallet\", { enumerable: true, get: function() {\n return index_js_10.BaseWallet;\n } });\n Object.defineProperty(exports3, \"HDNodeWallet\", { enumerable: true, get: function() {\n return index_js_10.HDNodeWallet;\n } });\n Object.defineProperty(exports3, \"HDNodeVoidWallet\", { enumerable: true, get: function() {\n return index_js_10.HDNodeVoidWallet;\n } });\n Object.defineProperty(exports3, \"Wallet\", { enumerable: true, get: function() {\n return index_js_10.Wallet;\n } });\n Object.defineProperty(exports3, \"defaultPath\", { enumerable: true, get: function() {\n return index_js_10.defaultPath;\n } });\n Object.defineProperty(exports3, \"getAccountPath\", { enumerable: true, get: function() {\n return index_js_10.getAccountPath;\n } });\n Object.defineProperty(exports3, \"getIndexedAccountPath\", { enumerable: true, get: function() {\n return index_js_10.getIndexedAccountPath;\n } });\n Object.defineProperty(exports3, \"isCrowdsaleJson\", { enumerable: true, get: function() {\n return index_js_10.isCrowdsaleJson;\n } });\n Object.defineProperty(exports3, \"isKeystoreJson\", { enumerable: true, get: function() {\n return index_js_10.isKeystoreJson;\n } });\n Object.defineProperty(exports3, \"decryptCrowdsaleJson\", { enumerable: true, get: function() {\n return index_js_10.decryptCrowdsaleJson;\n } });\n Object.defineProperty(exports3, \"decryptKeystoreJsonSync\", { enumerable: true, get: function() {\n return index_js_10.decryptKeystoreJsonSync;\n } });\n Object.defineProperty(exports3, \"decryptKeystoreJson\", { enumerable: true, get: function() {\n return index_js_10.decryptKeystoreJson;\n } });\n Object.defineProperty(exports3, \"encryptKeystoreJson\", { enumerable: true, get: function() {\n return index_js_10.encryptKeystoreJson;\n } });\n Object.defineProperty(exports3, \"encryptKeystoreJsonSync\", { enumerable: true, get: function() {\n return index_js_10.encryptKeystoreJsonSync;\n } });\n var index_js_11 = require_wordlists2();\n Object.defineProperty(exports3, \"Wordlist\", { enumerable: true, get: function() {\n return index_js_11.Wordlist;\n } });\n Object.defineProperty(exports3, \"LangEn\", { enumerable: true, get: function() {\n return index_js_11.LangEn;\n } });\n Object.defineProperty(exports3, \"WordlistOwl\", { enumerable: true, get: function() {\n return index_js_11.WordlistOwl;\n } });\n Object.defineProperty(exports3, \"WordlistOwlA\", { enumerable: true, get: function() {\n return index_js_11.WordlistOwlA;\n } });\n Object.defineProperty(exports3, \"wordlists\", { enumerable: true, get: function() {\n return index_js_11.wordlists;\n } });\n }\n });\n\n // ../../../node_modules/.pnpm/ethers@6.15.0_bufferutil@4.0.9_utf-8-validate@5.0.10/node_modules/ethers/lib.commonjs/index.js\n var require_lib34 = __commonJS({\n \"../../../node_modules/.pnpm/ethers@6.15.0_bufferutil@4.0.9_utf-8-validate@5.0.10/node_modules/ethers/lib.commonjs/index.js\"(exports3) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n Object.defineProperty(exports3, \"__esModule\", { value: true });\n exports3.ethers = void 0;\n var tslib_1 = (init_tslib_es62(), __toCommonJS(tslib_es6_exports2));\n var ethers16 = tslib_1.__importStar(require_ethers2());\n exports3.ethers = ethers16;\n tslib_1.__exportStar(require_ethers2(), exports3);\n }\n });\n\n // ../../libs/ability-sdk/dist/src/lib/abilityHelpers/populateTransaction.js\n var require_populateTransaction = __commonJS({\n \"../../libs/ability-sdk/dist/src/lib/abilityHelpers/populateTransaction.js\"(exports3) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n Object.defineProperty(exports3, \"__esModule\", { value: true });\n exports3.populateTransaction = void 0;\n var ethers_v6_1 = require_lib34();\n var populateTransaction2 = async ({ to, from: from14, data, value, rpcUrl, chainId, gasBufferPercentage, baseFeePerGasBufferPercentage }) => {\n if (gasBufferPercentage !== void 0 && !Number.isInteger(gasBufferPercentage)) {\n throw new Error(\"[populateTransaction] gasBufferPercentage must be an integer\");\n }\n if (baseFeePerGasBufferPercentage !== void 0 && !Number.isInteger(baseFeePerGasBufferPercentage)) {\n throw new Error(\"[populateTransaction] baseFeePerGasBufferPercentage must be an integer\");\n }\n const provider = new ethers_v6_1.JsonRpcProvider(rpcUrl);\n const signer = new ethers_v6_1.VoidSigner(from14, provider);\n const populatedTx = await signer.populateTransaction({\n to,\n from: from14,\n data,\n value,\n chainId\n });\n if (!populatedTx.gasLimit) {\n throw new Error(`[estimateGas] Unable to estimate gas for transaction: ${JSON.stringify({\n to,\n from: from14,\n data,\n value\n })}`);\n }\n if (gasBufferPercentage !== void 0) {\n populatedTx.gasLimit = BigInt(populatedTx.gasLimit) * BigInt(100 + gasBufferPercentage) / 100n;\n }\n const partialUnsignedTx = {\n to: populatedTx.to ?? void 0,\n nonce: populatedTx.nonce ?? void 0,\n gasLimit: (0, ethers_v6_1.toQuantity)(populatedTx.gasLimit),\n data: populatedTx.data ?? void 0,\n value: populatedTx.value ? (0, ethers_v6_1.toQuantity)(populatedTx.value) : \"0x0\",\n chainId: populatedTx.chainId ? (0, ethers_v6_1.toNumber)(populatedTx.chainId) : void 0,\n // Typed-Transaction features\n type: populatedTx.type ?? void 0,\n // EIP-2930; Type 1 & EIP-1559; Type 2\n accessList: populatedTx.accessList ?? void 0\n };\n if (populatedTx.gasPrice != null) {\n return {\n ...partialUnsignedTx,\n gasPrice: (0, ethers_v6_1.toQuantity)(populatedTx.gasPrice)\n };\n }\n if (populatedTx.maxFeePerGas == null) {\n throw new Error(\"[estimateGas] maxFeePerGas is missing from populated transaction\");\n }\n if (populatedTx.maxPriorityFeePerGas == null) {\n throw new Error(\"[estimateGas] maxPriorityFeePerGas is missing from populated transaction\");\n }\n if (baseFeePerGasBufferPercentage !== void 0) {\n populatedTx.maxFeePerGas = BigInt(populatedTx.maxFeePerGas) * BigInt(100 + baseFeePerGasBufferPercentage) / 100n;\n }\n return {\n ...partialUnsignedTx,\n maxFeePerGas: (0, ethers_v6_1.toQuantity)(populatedTx.maxFeePerGas),\n maxPriorityFeePerGas: (0, ethers_v6_1.toQuantity)(populatedTx.maxPriorityFeePerGas)\n };\n };\n exports3.populateTransaction = populateTransaction2;\n }\n });\n\n // ../../../node_modules/.pnpm/@aa-sdk+core@4.62.0_typescript@5.8.3_viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64_/node_modules/@aa-sdk/core/dist/esm/abis/EntryPointAbi_v6.js\n var EntryPointAbi_v6;\n var init_EntryPointAbi_v6 = __esm({\n \"../../../node_modules/.pnpm/@aa-sdk+core@4.62.0_typescript@5.8.3_viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64_/node_modules/@aa-sdk/core/dist/esm/abis/EntryPointAbi_v6.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n EntryPointAbi_v6 = [\n {\n inputs: [\n {\n internalType: \"uint256\",\n name: \"preOpGas\",\n type: \"uint256\"\n },\n {\n internalType: \"uint256\",\n name: \"paid\",\n type: \"uint256\"\n },\n {\n internalType: \"uint48\",\n name: \"validAfter\",\n type: \"uint48\"\n },\n {\n internalType: \"uint48\",\n name: \"validUntil\",\n type: \"uint48\"\n },\n {\n internalType: \"bool\",\n name: \"targetSuccess\",\n type: \"bool\"\n },\n {\n internalType: \"bytes\",\n name: \"targetResult\",\n type: \"bytes\"\n }\n ],\n name: \"ExecutionResult\",\n type: \"error\"\n },\n {\n inputs: [\n {\n internalType: \"uint256\",\n name: \"opIndex\",\n type: \"uint256\"\n },\n {\n internalType: \"string\",\n name: \"reason\",\n type: \"string\"\n }\n ],\n name: \"FailedOp\",\n type: \"error\"\n },\n {\n inputs: [\n {\n internalType: \"address\",\n name: \"sender\",\n type: \"address\"\n }\n ],\n name: \"SenderAddressResult\",\n type: \"error\"\n },\n {\n inputs: [\n {\n internalType: \"address\",\n name: \"aggregator\",\n type: \"address\"\n }\n ],\n name: \"SignatureValidationFailed\",\n type: \"error\"\n },\n {\n inputs: [\n {\n components: [\n {\n internalType: \"uint256\",\n name: \"preOpGas\",\n type: \"uint256\"\n },\n {\n internalType: \"uint256\",\n name: \"prefund\",\n type: \"uint256\"\n },\n {\n internalType: \"bool\",\n name: \"sigFailed\",\n type: \"bool\"\n },\n {\n internalType: \"uint48\",\n name: \"validAfter\",\n type: \"uint48\"\n },\n {\n internalType: \"uint48\",\n name: \"validUntil\",\n type: \"uint48\"\n },\n {\n internalType: \"bytes\",\n name: \"paymasterContext\",\n type: \"bytes\"\n }\n ],\n internalType: \"struct IEntryPoint.ReturnInfo\",\n name: \"returnInfo\",\n type: \"tuple\"\n },\n {\n components: [\n {\n internalType: \"uint256\",\n name: \"stake\",\n type: \"uint256\"\n },\n {\n internalType: \"uint256\",\n name: \"unstakeDelaySec\",\n type: \"uint256\"\n }\n ],\n internalType: \"struct IStakeManager.StakeInfo\",\n name: \"senderInfo\",\n type: \"tuple\"\n },\n {\n components: [\n {\n internalType: \"uint256\",\n name: \"stake\",\n type: \"uint256\"\n },\n {\n internalType: \"uint256\",\n name: \"unstakeDelaySec\",\n type: \"uint256\"\n }\n ],\n internalType: \"struct IStakeManager.StakeInfo\",\n name: \"factoryInfo\",\n type: \"tuple\"\n },\n {\n components: [\n {\n internalType: \"uint256\",\n name: \"stake\",\n type: \"uint256\"\n },\n {\n internalType: \"uint256\",\n name: \"unstakeDelaySec\",\n type: \"uint256\"\n }\n ],\n internalType: \"struct IStakeManager.StakeInfo\",\n name: \"paymasterInfo\",\n type: \"tuple\"\n }\n ],\n name: \"ValidationResult\",\n type: \"error\"\n },\n {\n inputs: [\n {\n components: [\n {\n internalType: \"uint256\",\n name: \"preOpGas\",\n type: \"uint256\"\n },\n {\n internalType: \"uint256\",\n name: \"prefund\",\n type: \"uint256\"\n },\n {\n internalType: \"bool\",\n name: \"sigFailed\",\n type: \"bool\"\n },\n {\n internalType: \"uint48\",\n name: \"validAfter\",\n type: \"uint48\"\n },\n {\n internalType: \"uint48\",\n name: \"validUntil\",\n type: \"uint48\"\n },\n {\n internalType: \"bytes\",\n name: \"paymasterContext\",\n type: \"bytes\"\n }\n ],\n internalType: \"struct IEntryPoint.ReturnInfo\",\n name: \"returnInfo\",\n type: \"tuple\"\n },\n {\n components: [\n {\n internalType: \"uint256\",\n name: \"stake\",\n type: \"uint256\"\n },\n {\n internalType: \"uint256\",\n name: \"unstakeDelaySec\",\n type: \"uint256\"\n }\n ],\n internalType: \"struct IStakeManager.StakeInfo\",\n name: \"senderInfo\",\n type: \"tuple\"\n },\n {\n components: [\n {\n internalType: \"uint256\",\n name: \"stake\",\n type: \"uint256\"\n },\n {\n internalType: \"uint256\",\n name: \"unstakeDelaySec\",\n type: \"uint256\"\n }\n ],\n internalType: \"struct IStakeManager.StakeInfo\",\n name: \"factoryInfo\",\n type: \"tuple\"\n },\n {\n components: [\n {\n internalType: \"uint256\",\n name: \"stake\",\n type: \"uint256\"\n },\n {\n internalType: \"uint256\",\n name: \"unstakeDelaySec\",\n type: \"uint256\"\n }\n ],\n internalType: \"struct IStakeManager.StakeInfo\",\n name: \"paymasterInfo\",\n type: \"tuple\"\n },\n {\n components: [\n {\n internalType: \"address\",\n name: \"aggregator\",\n type: \"address\"\n },\n {\n components: [\n {\n internalType: \"uint256\",\n name: \"stake\",\n type: \"uint256\"\n },\n {\n internalType: \"uint256\",\n name: \"unstakeDelaySec\",\n type: \"uint256\"\n }\n ],\n internalType: \"struct IStakeManager.StakeInfo\",\n name: \"stakeInfo\",\n type: \"tuple\"\n }\n ],\n internalType: \"struct IEntryPoint.AggregatorStakeInfo\",\n name: \"aggregatorInfo\",\n type: \"tuple\"\n }\n ],\n name: \"ValidationResultWithAggregation\",\n type: \"error\"\n },\n {\n anonymous: false,\n inputs: [\n {\n indexed: true,\n internalType: \"bytes32\",\n name: \"userOpHash\",\n type: \"bytes32\"\n },\n {\n indexed: true,\n internalType: \"address\",\n name: \"sender\",\n type: \"address\"\n },\n {\n indexed: false,\n internalType: \"address\",\n name: \"factory\",\n type: \"address\"\n },\n {\n indexed: false,\n internalType: \"address\",\n name: \"paymaster\",\n type: \"address\"\n }\n ],\n name: \"AccountDeployed\",\n type: \"event\"\n },\n {\n anonymous: false,\n inputs: [],\n name: \"BeforeExecution\",\n type: \"event\"\n },\n {\n anonymous: false,\n inputs: [\n {\n indexed: true,\n internalType: \"address\",\n name: \"account\",\n type: \"address\"\n },\n {\n indexed: false,\n internalType: \"uint256\",\n name: \"totalDeposit\",\n type: \"uint256\"\n }\n ],\n name: \"Deposited\",\n type: \"event\"\n },\n {\n anonymous: false,\n inputs: [\n {\n indexed: true,\n internalType: \"address\",\n name: \"aggregator\",\n type: \"address\"\n }\n ],\n name: \"SignatureAggregatorChanged\",\n type: \"event\"\n },\n {\n anonymous: false,\n inputs: [\n {\n indexed: true,\n internalType: \"address\",\n name: \"account\",\n type: \"address\"\n },\n {\n indexed: false,\n internalType: \"uint256\",\n name: \"totalStaked\",\n type: \"uint256\"\n },\n {\n indexed: false,\n internalType: \"uint256\",\n name: \"unstakeDelaySec\",\n type: \"uint256\"\n }\n ],\n name: \"StakeLocked\",\n type: \"event\"\n },\n {\n anonymous: false,\n inputs: [\n {\n indexed: true,\n internalType: \"address\",\n name: \"account\",\n type: \"address\"\n },\n {\n indexed: false,\n internalType: \"uint256\",\n name: \"withdrawTime\",\n type: \"uint256\"\n }\n ],\n name: \"StakeUnlocked\",\n type: \"event\"\n },\n {\n anonymous: false,\n inputs: [\n {\n indexed: true,\n internalType: \"address\",\n name: \"account\",\n type: \"address\"\n },\n {\n indexed: false,\n internalType: \"address\",\n name: \"withdrawAddress\",\n type: \"address\"\n },\n {\n indexed: false,\n internalType: \"uint256\",\n name: \"amount\",\n type: \"uint256\"\n }\n ],\n name: \"StakeWithdrawn\",\n type: \"event\"\n },\n {\n anonymous: false,\n inputs: [\n {\n indexed: true,\n internalType: \"bytes32\",\n name: \"userOpHash\",\n type: \"bytes32\"\n },\n {\n indexed: true,\n internalType: \"address\",\n name: \"sender\",\n type: \"address\"\n },\n {\n indexed: true,\n internalType: \"address\",\n name: \"paymaster\",\n type: \"address\"\n },\n {\n indexed: false,\n internalType: \"uint256\",\n name: \"nonce\",\n type: \"uint256\"\n },\n {\n indexed: false,\n internalType: \"bool\",\n name: \"success\",\n type: \"bool\"\n },\n {\n indexed: false,\n internalType: \"uint256\",\n name: \"actualGasCost\",\n type: \"uint256\"\n },\n {\n indexed: false,\n internalType: \"uint256\",\n name: \"actualGasUsed\",\n type: \"uint256\"\n }\n ],\n name: \"UserOperationEvent\",\n type: \"event\"\n },\n {\n anonymous: false,\n inputs: [\n {\n indexed: true,\n internalType: \"bytes32\",\n name: \"userOpHash\",\n type: \"bytes32\"\n },\n {\n indexed: true,\n internalType: \"address\",\n name: \"sender\",\n type: \"address\"\n },\n {\n indexed: false,\n internalType: \"uint256\",\n name: \"nonce\",\n type: \"uint256\"\n },\n {\n indexed: false,\n internalType: \"bytes\",\n name: \"revertReason\",\n type: \"bytes\"\n }\n ],\n name: \"UserOperationRevertReason\",\n type: \"event\"\n },\n {\n anonymous: false,\n inputs: [\n {\n indexed: true,\n internalType: \"address\",\n name: \"account\",\n type: \"address\"\n },\n {\n indexed: false,\n internalType: \"address\",\n name: \"withdrawAddress\",\n type: \"address\"\n },\n {\n indexed: false,\n internalType: \"uint256\",\n name: \"amount\",\n type: \"uint256\"\n }\n ],\n name: \"Withdrawn\",\n type: \"event\"\n },\n {\n inputs: [],\n name: \"SIG_VALIDATION_FAILED\",\n outputs: [\n {\n internalType: \"uint256\",\n name: \"\",\n type: \"uint256\"\n }\n ],\n stateMutability: \"view\",\n type: \"function\"\n },\n {\n inputs: [\n {\n internalType: \"bytes\",\n name: \"initCode\",\n type: \"bytes\"\n },\n {\n internalType: \"address\",\n name: \"sender\",\n type: \"address\"\n },\n {\n internalType: \"bytes\",\n name: \"paymasterAndData\",\n type: \"bytes\"\n }\n ],\n name: \"_validateSenderAndPaymaster\",\n outputs: [],\n stateMutability: \"view\",\n type: \"function\"\n },\n {\n inputs: [\n {\n internalType: \"uint32\",\n name: \"unstakeDelaySec\",\n type: \"uint32\"\n }\n ],\n name: \"addStake\",\n outputs: [],\n stateMutability: \"payable\",\n type: \"function\"\n },\n {\n inputs: [\n {\n internalType: \"address\",\n name: \"account\",\n type: \"address\"\n }\n ],\n name: \"balanceOf\",\n outputs: [\n {\n internalType: \"uint256\",\n name: \"\",\n type: \"uint256\"\n }\n ],\n stateMutability: \"view\",\n type: \"function\"\n },\n {\n inputs: [\n {\n internalType: \"address\",\n name: \"account\",\n type: \"address\"\n }\n ],\n name: \"depositTo\",\n outputs: [],\n stateMutability: \"payable\",\n type: \"function\"\n },\n {\n inputs: [\n {\n internalType: \"address\",\n name: \"\",\n type: \"address\"\n }\n ],\n name: \"deposits\",\n outputs: [\n {\n internalType: \"uint112\",\n name: \"deposit\",\n type: \"uint112\"\n },\n {\n internalType: \"bool\",\n name: \"staked\",\n type: \"bool\"\n },\n {\n internalType: \"uint112\",\n name: \"stake\",\n type: \"uint112\"\n },\n {\n internalType: \"uint32\",\n name: \"unstakeDelaySec\",\n type: \"uint32\"\n },\n {\n internalType: \"uint48\",\n name: \"withdrawTime\",\n type: \"uint48\"\n }\n ],\n stateMutability: \"view\",\n type: \"function\"\n },\n {\n inputs: [\n {\n internalType: \"address\",\n name: \"account\",\n type: \"address\"\n }\n ],\n name: \"getDepositInfo\",\n outputs: [\n {\n components: [\n {\n internalType: \"uint112\",\n name: \"deposit\",\n type: \"uint112\"\n },\n {\n internalType: \"bool\",\n name: \"staked\",\n type: \"bool\"\n },\n {\n internalType: \"uint112\",\n name: \"stake\",\n type: \"uint112\"\n },\n {\n internalType: \"uint32\",\n name: \"unstakeDelaySec\",\n type: \"uint32\"\n },\n {\n internalType: \"uint48\",\n name: \"withdrawTime\",\n type: \"uint48\"\n }\n ],\n internalType: \"struct IStakeManager.DepositInfo\",\n name: \"info\",\n type: \"tuple\"\n }\n ],\n stateMutability: \"view\",\n type: \"function\"\n },\n {\n inputs: [\n {\n internalType: \"address\",\n name: \"sender\",\n type: \"address\"\n },\n {\n internalType: \"uint192\",\n name: \"key\",\n type: \"uint192\"\n }\n ],\n name: \"getNonce\",\n outputs: [\n {\n internalType: \"uint256\",\n name: \"nonce\",\n type: \"uint256\"\n }\n ],\n stateMutability: \"view\",\n type: \"function\"\n },\n {\n inputs: [\n {\n internalType: \"bytes\",\n name: \"initCode\",\n type: \"bytes\"\n }\n ],\n name: \"getSenderAddress\",\n outputs: [],\n stateMutability: \"nonpayable\",\n type: \"function\"\n },\n {\n inputs: [\n {\n components: [\n {\n internalType: \"address\",\n name: \"sender\",\n type: \"address\"\n },\n {\n internalType: \"uint256\",\n name: \"nonce\",\n type: \"uint256\"\n },\n {\n internalType: \"bytes\",\n name: \"initCode\",\n type: \"bytes\"\n },\n {\n internalType: \"bytes\",\n name: \"callData\",\n type: \"bytes\"\n },\n {\n internalType: \"uint256\",\n name: \"callGasLimit\",\n type: \"uint256\"\n },\n {\n internalType: \"uint256\",\n name: \"verificationGasLimit\",\n type: \"uint256\"\n },\n {\n internalType: \"uint256\",\n name: \"preVerificationGas\",\n type: \"uint256\"\n },\n {\n internalType: \"uint256\",\n name: \"maxFeePerGas\",\n type: \"uint256\"\n },\n {\n internalType: \"uint256\",\n name: \"maxPriorityFeePerGas\",\n type: \"uint256\"\n },\n {\n internalType: \"bytes\",\n name: \"paymasterAndData\",\n type: \"bytes\"\n },\n {\n internalType: \"bytes\",\n name: \"signature\",\n type: \"bytes\"\n }\n ],\n internalType: \"struct UserOperation\",\n name: \"userOp\",\n type: \"tuple\"\n }\n ],\n name: \"getUserOpHash\",\n outputs: [\n {\n internalType: \"bytes32\",\n name: \"\",\n type: \"bytes32\"\n }\n ],\n stateMutability: \"view\",\n type: \"function\"\n },\n {\n inputs: [\n {\n components: [\n {\n components: [\n {\n internalType: \"address\",\n name: \"sender\",\n type: \"address\"\n },\n {\n internalType: \"uint256\",\n name: \"nonce\",\n type: \"uint256\"\n },\n {\n internalType: \"bytes\",\n name: \"initCode\",\n type: \"bytes\"\n },\n {\n internalType: \"bytes\",\n name: \"callData\",\n type: \"bytes\"\n },\n {\n internalType: \"uint256\",\n name: \"callGasLimit\",\n type: \"uint256\"\n },\n {\n internalType: \"uint256\",\n name: \"verificationGasLimit\",\n type: \"uint256\"\n },\n {\n internalType: \"uint256\",\n name: \"preVerificationGas\",\n type: \"uint256\"\n },\n {\n internalType: \"uint256\",\n name: \"maxFeePerGas\",\n type: \"uint256\"\n },\n {\n internalType: \"uint256\",\n name: \"maxPriorityFeePerGas\",\n type: \"uint256\"\n },\n {\n internalType: \"bytes\",\n name: \"paymasterAndData\",\n type: \"bytes\"\n },\n {\n internalType: \"bytes\",\n name: \"signature\",\n type: \"bytes\"\n }\n ],\n internalType: \"struct UserOperation[]\",\n name: \"userOps\",\n type: \"tuple[]\"\n },\n {\n internalType: \"contract IAggregator\",\n name: \"aggregator\",\n type: \"address\"\n },\n {\n internalType: \"bytes\",\n name: \"signature\",\n type: \"bytes\"\n }\n ],\n internalType: \"struct IEntryPoint.UserOpsPerAggregator[]\",\n name: \"opsPerAggregator\",\n type: \"tuple[]\"\n },\n {\n internalType: \"address payable\",\n name: \"beneficiary\",\n type: \"address\"\n }\n ],\n name: \"handleAggregatedOps\",\n outputs: [],\n stateMutability: \"nonpayable\",\n type: \"function\"\n },\n {\n inputs: [\n {\n components: [\n {\n internalType: \"address\",\n name: \"sender\",\n type: \"address\"\n },\n {\n internalType: \"uint256\",\n name: \"nonce\",\n type: \"uint256\"\n },\n {\n internalType: \"bytes\",\n name: \"initCode\",\n type: \"bytes\"\n },\n {\n internalType: \"bytes\",\n name: \"callData\",\n type: \"bytes\"\n },\n {\n internalType: \"uint256\",\n name: \"callGasLimit\",\n type: \"uint256\"\n },\n {\n internalType: \"uint256\",\n name: \"verificationGasLimit\",\n type: \"uint256\"\n },\n {\n internalType: \"uint256\",\n name: \"preVerificationGas\",\n type: \"uint256\"\n },\n {\n internalType: \"uint256\",\n name: \"maxFeePerGas\",\n type: \"uint256\"\n },\n {\n internalType: \"uint256\",\n name: \"maxPriorityFeePerGas\",\n type: \"uint256\"\n },\n {\n internalType: \"bytes\",\n name: \"paymasterAndData\",\n type: \"bytes\"\n },\n {\n internalType: \"bytes\",\n name: \"signature\",\n type: \"bytes\"\n }\n ],\n internalType: \"struct UserOperation[]\",\n name: \"ops\",\n type: \"tuple[]\"\n },\n {\n internalType: \"address payable\",\n name: \"beneficiary\",\n type: \"address\"\n }\n ],\n name: \"handleOps\",\n outputs: [],\n stateMutability: \"nonpayable\",\n type: \"function\"\n },\n {\n inputs: [\n {\n internalType: \"uint192\",\n name: \"key\",\n type: \"uint192\"\n }\n ],\n name: \"incrementNonce\",\n outputs: [],\n stateMutability: \"nonpayable\",\n type: \"function\"\n },\n {\n inputs: [\n {\n internalType: \"bytes\",\n name: \"callData\",\n type: \"bytes\"\n },\n {\n components: [\n {\n components: [\n {\n internalType: \"address\",\n name: \"sender\",\n type: \"address\"\n },\n {\n internalType: \"uint256\",\n name: \"nonce\",\n type: \"uint256\"\n },\n {\n internalType: \"uint256\",\n name: \"callGasLimit\",\n type: \"uint256\"\n },\n {\n internalType: \"uint256\",\n name: \"verificationGasLimit\",\n type: \"uint256\"\n },\n {\n internalType: \"uint256\",\n name: \"preVerificationGas\",\n type: \"uint256\"\n },\n {\n internalType: \"address\",\n name: \"paymaster\",\n type: \"address\"\n },\n {\n internalType: \"uint256\",\n name: \"maxFeePerGas\",\n type: \"uint256\"\n },\n {\n internalType: \"uint256\",\n name: \"maxPriorityFeePerGas\",\n type: \"uint256\"\n }\n ],\n internalType: \"struct EntryPoint.MemoryUserOp\",\n name: \"mUserOp\",\n type: \"tuple\"\n },\n {\n internalType: \"bytes32\",\n name: \"userOpHash\",\n type: \"bytes32\"\n },\n {\n internalType: \"uint256\",\n name: \"prefund\",\n type: \"uint256\"\n },\n {\n internalType: \"uint256\",\n name: \"contextOffset\",\n type: \"uint256\"\n },\n {\n internalType: \"uint256\",\n name: \"preOpGas\",\n type: \"uint256\"\n }\n ],\n internalType: \"struct EntryPoint.UserOpInfo\",\n name: \"opInfo\",\n type: \"tuple\"\n },\n {\n internalType: \"bytes\",\n name: \"context\",\n type: \"bytes\"\n }\n ],\n name: \"innerHandleOp\",\n outputs: [\n {\n internalType: \"uint256\",\n name: \"actualGasCost\",\n type: \"uint256\"\n }\n ],\n stateMutability: \"nonpayable\",\n type: \"function\"\n },\n {\n inputs: [\n {\n internalType: \"address\",\n name: \"\",\n type: \"address\"\n },\n {\n internalType: \"uint192\",\n name: \"\",\n type: \"uint192\"\n }\n ],\n name: \"nonceSequenceNumber\",\n outputs: [\n {\n internalType: \"uint256\",\n name: \"\",\n type: \"uint256\"\n }\n ],\n stateMutability: \"view\",\n type: \"function\"\n },\n {\n inputs: [\n {\n components: [\n {\n internalType: \"address\",\n name: \"sender\",\n type: \"address\"\n },\n {\n internalType: \"uint256\",\n name: \"nonce\",\n type: \"uint256\"\n },\n {\n internalType: \"bytes\",\n name: \"initCode\",\n type: \"bytes\"\n },\n {\n internalType: \"bytes\",\n name: \"callData\",\n type: \"bytes\"\n },\n {\n internalType: \"uint256\",\n name: \"callGasLimit\",\n type: \"uint256\"\n },\n {\n internalType: \"uint256\",\n name: \"verificationGasLimit\",\n type: \"uint256\"\n },\n {\n internalType: \"uint256\",\n name: \"preVerificationGas\",\n type: \"uint256\"\n },\n {\n internalType: \"uint256\",\n name: \"maxFeePerGas\",\n type: \"uint256\"\n },\n {\n internalType: \"uint256\",\n name: \"maxPriorityFeePerGas\",\n type: \"uint256\"\n },\n {\n internalType: \"bytes\",\n name: \"paymasterAndData\",\n type: \"bytes\"\n },\n {\n internalType: \"bytes\",\n name: \"signature\",\n type: \"bytes\"\n }\n ],\n internalType: \"struct UserOperation\",\n name: \"op\",\n type: \"tuple\"\n },\n {\n internalType: \"address\",\n name: \"target\",\n type: \"address\"\n },\n {\n internalType: \"bytes\",\n name: \"targetCallData\",\n type: \"bytes\"\n }\n ],\n name: \"simulateHandleOp\",\n outputs: [],\n stateMutability: \"nonpayable\",\n type: \"function\"\n },\n {\n inputs: [\n {\n components: [\n {\n internalType: \"address\",\n name: \"sender\",\n type: \"address\"\n },\n {\n internalType: \"uint256\",\n name: \"nonce\",\n type: \"uint256\"\n },\n {\n internalType: \"bytes\",\n name: \"initCode\",\n type: \"bytes\"\n },\n {\n internalType: \"bytes\",\n name: \"callData\",\n type: \"bytes\"\n },\n {\n internalType: \"uint256\",\n name: \"callGasLimit\",\n type: \"uint256\"\n },\n {\n internalType: \"uint256\",\n name: \"verificationGasLimit\",\n type: \"uint256\"\n },\n {\n internalType: \"uint256\",\n name: \"preVerificationGas\",\n type: \"uint256\"\n },\n {\n internalType: \"uint256\",\n name: \"maxFeePerGas\",\n type: \"uint256\"\n },\n {\n internalType: \"uint256\",\n name: \"maxPriorityFeePerGas\",\n type: \"uint256\"\n },\n {\n internalType: \"bytes\",\n name: \"paymasterAndData\",\n type: \"bytes\"\n },\n {\n internalType: \"bytes\",\n name: \"signature\",\n type: \"bytes\"\n }\n ],\n internalType: \"struct UserOperation\",\n name: \"userOp\",\n type: \"tuple\"\n }\n ],\n name: \"simulateValidation\",\n outputs: [],\n stateMutability: \"nonpayable\",\n type: \"function\"\n },\n {\n inputs: [],\n name: \"unlockStake\",\n outputs: [],\n stateMutability: \"nonpayable\",\n type: \"function\"\n },\n {\n inputs: [\n {\n internalType: \"address payable\",\n name: \"withdrawAddress\",\n type: \"address\"\n }\n ],\n name: \"withdrawStake\",\n outputs: [],\n stateMutability: \"nonpayable\",\n type: \"function\"\n },\n {\n inputs: [\n {\n internalType: \"address payable\",\n name: \"withdrawAddress\",\n type: \"address\"\n },\n {\n internalType: \"uint256\",\n name: \"withdrawAmount\",\n type: \"uint256\"\n }\n ],\n name: \"withdrawTo\",\n outputs: [],\n stateMutability: \"nonpayable\",\n type: \"function\"\n },\n {\n stateMutability: \"payable\",\n type: \"receive\"\n }\n ];\n }\n });\n\n // ../../../node_modules/.pnpm/@aa-sdk+core@4.62.0_typescript@5.8.3_viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64_/node_modules/@aa-sdk/core/dist/esm/abis/EntryPointAbi_v7.js\n var EntryPointAbi_v7;\n var init_EntryPointAbi_v7 = __esm({\n \"../../../node_modules/.pnpm/@aa-sdk+core@4.62.0_typescript@5.8.3_viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64_/node_modules/@aa-sdk/core/dist/esm/abis/EntryPointAbi_v7.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n EntryPointAbi_v7 = [\n {\n inputs: [\n { internalType: \"bool\", name: \"success\", type: \"bool\" },\n { internalType: \"bytes\", name: \"ret\", type: \"bytes\" }\n ],\n name: \"DelegateAndRevert\",\n type: \"error\"\n },\n {\n inputs: [\n { internalType: \"uint256\", name: \"opIndex\", type: \"uint256\" },\n { internalType: \"string\", name: \"reason\", type: \"string\" }\n ],\n name: \"FailedOp\",\n type: \"error\"\n },\n {\n inputs: [\n { internalType: \"uint256\", name: \"opIndex\", type: \"uint256\" },\n { internalType: \"string\", name: \"reason\", type: \"string\" },\n { internalType: \"bytes\", name: \"inner\", type: \"bytes\" }\n ],\n name: \"FailedOpWithRevert\",\n type: \"error\"\n },\n {\n inputs: [{ internalType: \"bytes\", name: \"returnData\", type: \"bytes\" }],\n name: \"PostOpReverted\",\n type: \"error\"\n },\n { inputs: [], name: \"ReentrancyGuardReentrantCall\", type: \"error\" },\n {\n inputs: [{ internalType: \"address\", name: \"sender\", type: \"address\" }],\n name: \"SenderAddressResult\",\n type: \"error\"\n },\n {\n inputs: [{ internalType: \"address\", name: \"aggregator\", type: \"address\" }],\n name: \"SignatureValidationFailed\",\n type: \"error\"\n },\n {\n anonymous: false,\n inputs: [\n {\n indexed: true,\n internalType: \"bytes32\",\n name: \"userOpHash\",\n type: \"bytes32\"\n },\n {\n indexed: true,\n internalType: \"address\",\n name: \"sender\",\n type: \"address\"\n },\n {\n indexed: false,\n internalType: \"address\",\n name: \"factory\",\n type: \"address\"\n },\n {\n indexed: false,\n internalType: \"address\",\n name: \"paymaster\",\n type: \"address\"\n }\n ],\n name: \"AccountDeployed\",\n type: \"event\"\n },\n { anonymous: false, inputs: [], name: \"BeforeExecution\", type: \"event\" },\n {\n anonymous: false,\n inputs: [\n {\n indexed: true,\n internalType: \"address\",\n name: \"account\",\n type: \"address\"\n },\n {\n indexed: false,\n internalType: \"uint256\",\n name: \"totalDeposit\",\n type: \"uint256\"\n }\n ],\n name: \"Deposited\",\n type: \"event\"\n },\n {\n anonymous: false,\n inputs: [\n {\n indexed: true,\n internalType: \"bytes32\",\n name: \"userOpHash\",\n type: \"bytes32\"\n },\n {\n indexed: true,\n internalType: \"address\",\n name: \"sender\",\n type: \"address\"\n },\n {\n indexed: false,\n internalType: \"uint256\",\n name: \"nonce\",\n type: \"uint256\"\n },\n {\n indexed: false,\n internalType: \"bytes\",\n name: \"revertReason\",\n type: \"bytes\"\n }\n ],\n name: \"PostOpRevertReason\",\n type: \"event\"\n },\n {\n anonymous: false,\n inputs: [\n {\n indexed: true,\n internalType: \"address\",\n name: \"aggregator\",\n type: \"address\"\n }\n ],\n name: \"SignatureAggregatorChanged\",\n type: \"event\"\n },\n {\n anonymous: false,\n inputs: [\n {\n indexed: true,\n internalType: \"address\",\n name: \"account\",\n type: \"address\"\n },\n {\n indexed: false,\n internalType: \"uint256\",\n name: \"totalStaked\",\n type: \"uint256\"\n },\n {\n indexed: false,\n internalType: \"uint256\",\n name: \"unstakeDelaySec\",\n type: \"uint256\"\n }\n ],\n name: \"StakeLocked\",\n type: \"event\"\n },\n {\n anonymous: false,\n inputs: [\n {\n indexed: true,\n internalType: \"address\",\n name: \"account\",\n type: \"address\"\n },\n {\n indexed: false,\n internalType: \"uint256\",\n name: \"withdrawTime\",\n type: \"uint256\"\n }\n ],\n name: \"StakeUnlocked\",\n type: \"event\"\n },\n {\n anonymous: false,\n inputs: [\n {\n indexed: true,\n internalType: \"address\",\n name: \"account\",\n type: \"address\"\n },\n {\n indexed: false,\n internalType: \"address\",\n name: \"withdrawAddress\",\n type: \"address\"\n },\n {\n indexed: false,\n internalType: \"uint256\",\n name: \"amount\",\n type: \"uint256\"\n }\n ],\n name: \"StakeWithdrawn\",\n type: \"event\"\n },\n {\n anonymous: false,\n inputs: [\n {\n indexed: true,\n internalType: \"bytes32\",\n name: \"userOpHash\",\n type: \"bytes32\"\n },\n {\n indexed: true,\n internalType: \"address\",\n name: \"sender\",\n type: \"address\"\n },\n {\n indexed: true,\n internalType: \"address\",\n name: \"paymaster\",\n type: \"address\"\n },\n {\n indexed: false,\n internalType: \"uint256\",\n name: \"nonce\",\n type: \"uint256\"\n },\n { indexed: false, internalType: \"bool\", name: \"success\", type: \"bool\" },\n {\n indexed: false,\n internalType: \"uint256\",\n name: \"actualGasCost\",\n type: \"uint256\"\n },\n {\n indexed: false,\n internalType: \"uint256\",\n name: \"actualGasUsed\",\n type: \"uint256\"\n }\n ],\n name: \"UserOperationEvent\",\n type: \"event\"\n },\n {\n anonymous: false,\n inputs: [\n {\n indexed: true,\n internalType: \"bytes32\",\n name: \"userOpHash\",\n type: \"bytes32\"\n },\n {\n indexed: true,\n internalType: \"address\",\n name: \"sender\",\n type: \"address\"\n },\n {\n indexed: false,\n internalType: \"uint256\",\n name: \"nonce\",\n type: \"uint256\"\n }\n ],\n name: \"UserOperationPrefundTooLow\",\n type: \"event\"\n },\n {\n anonymous: false,\n inputs: [\n {\n indexed: true,\n internalType: \"bytes32\",\n name: \"userOpHash\",\n type: \"bytes32\"\n },\n {\n indexed: true,\n internalType: \"address\",\n name: \"sender\",\n type: \"address\"\n },\n {\n indexed: false,\n internalType: \"uint256\",\n name: \"nonce\",\n type: \"uint256\"\n },\n {\n indexed: false,\n internalType: \"bytes\",\n name: \"revertReason\",\n type: \"bytes\"\n }\n ],\n name: \"UserOperationRevertReason\",\n type: \"event\"\n },\n {\n anonymous: false,\n inputs: [\n {\n indexed: true,\n internalType: \"address\",\n name: \"account\",\n type: \"address\"\n },\n {\n indexed: false,\n internalType: \"address\",\n name: \"withdrawAddress\",\n type: \"address\"\n },\n {\n indexed: false,\n internalType: \"uint256\",\n name: \"amount\",\n type: \"uint256\"\n }\n ],\n name: \"Withdrawn\",\n type: \"event\"\n },\n {\n inputs: [\n { internalType: \"uint32\", name: \"unstakeDelaySec\", type: \"uint32\" }\n ],\n name: \"addStake\",\n outputs: [],\n stateMutability: \"payable\",\n type: \"function\"\n },\n {\n inputs: [{ internalType: \"address\", name: \"account\", type: \"address\" }],\n name: \"balanceOf\",\n outputs: [{ internalType: \"uint256\", name: \"\", type: \"uint256\" }],\n stateMutability: \"view\",\n type: \"function\"\n },\n {\n inputs: [\n { internalType: \"address\", name: \"target\", type: \"address\" },\n { internalType: \"bytes\", name: \"data\", type: \"bytes\" }\n ],\n name: \"delegateAndRevert\",\n outputs: [],\n stateMutability: \"nonpayable\",\n type: \"function\"\n },\n {\n inputs: [{ internalType: \"address\", name: \"account\", type: \"address\" }],\n name: \"depositTo\",\n outputs: [],\n stateMutability: \"payable\",\n type: \"function\"\n },\n {\n inputs: [{ internalType: \"address\", name: \"\", type: \"address\" }],\n name: \"deposits\",\n outputs: [\n { internalType: \"uint256\", name: \"deposit\", type: \"uint256\" },\n { internalType: \"bool\", name: \"staked\", type: \"bool\" },\n { internalType: \"uint112\", name: \"stake\", type: \"uint112\" },\n { internalType: \"uint32\", name: \"unstakeDelaySec\", type: \"uint32\" },\n { internalType: \"uint48\", name: \"withdrawTime\", type: \"uint48\" }\n ],\n stateMutability: \"view\",\n type: \"function\"\n },\n {\n inputs: [{ internalType: \"address\", name: \"account\", type: \"address\" }],\n name: \"getDepositInfo\",\n outputs: [\n {\n components: [\n { internalType: \"uint256\", name: \"deposit\", type: \"uint256\" },\n { internalType: \"bool\", name: \"staked\", type: \"bool\" },\n { internalType: \"uint112\", name: \"stake\", type: \"uint112\" },\n { internalType: \"uint32\", name: \"unstakeDelaySec\", type: \"uint32\" },\n { internalType: \"uint48\", name: \"withdrawTime\", type: \"uint48\" }\n ],\n internalType: \"struct IStakeManager.DepositInfo\",\n name: \"info\",\n type: \"tuple\"\n }\n ],\n stateMutability: \"view\",\n type: \"function\"\n },\n {\n inputs: [\n { internalType: \"address\", name: \"sender\", type: \"address\" },\n { internalType: \"uint192\", name: \"key\", type: \"uint192\" }\n ],\n name: \"getNonce\",\n outputs: [{ internalType: \"uint256\", name: \"nonce\", type: \"uint256\" }],\n stateMutability: \"view\",\n type: \"function\"\n },\n {\n inputs: [{ internalType: \"bytes\", name: \"initCode\", type: \"bytes\" }],\n name: \"getSenderAddress\",\n outputs: [],\n stateMutability: \"nonpayable\",\n type: \"function\"\n },\n {\n inputs: [\n {\n components: [\n { internalType: \"address\", name: \"sender\", type: \"address\" },\n { internalType: \"uint256\", name: \"nonce\", type: \"uint256\" },\n { internalType: \"bytes\", name: \"initCode\", type: \"bytes\" },\n { internalType: \"bytes\", name: \"callData\", type: \"bytes\" },\n {\n internalType: \"bytes32\",\n name: \"accountGasLimits\",\n type: \"bytes32\"\n },\n {\n internalType: \"uint256\",\n name: \"preVerificationGas\",\n type: \"uint256\"\n },\n { internalType: \"bytes32\", name: \"gasFees\", type: \"bytes32\" },\n { internalType: \"bytes\", name: \"paymasterAndData\", type: \"bytes\" },\n { internalType: \"bytes\", name: \"signature\", type: \"bytes\" }\n ],\n internalType: \"struct PackedUserOperation\",\n name: \"userOp\",\n type: \"tuple\"\n }\n ],\n name: \"getUserOpHash\",\n outputs: [{ internalType: \"bytes32\", name: \"\", type: \"bytes32\" }],\n stateMutability: \"view\",\n type: \"function\"\n },\n {\n inputs: [\n {\n components: [\n {\n components: [\n { internalType: \"address\", name: \"sender\", type: \"address\" },\n { internalType: \"uint256\", name: \"nonce\", type: \"uint256\" },\n { internalType: \"bytes\", name: \"initCode\", type: \"bytes\" },\n { internalType: \"bytes\", name: \"callData\", type: \"bytes\" },\n {\n internalType: \"bytes32\",\n name: \"accountGasLimits\",\n type: \"bytes32\"\n },\n {\n internalType: \"uint256\",\n name: \"preVerificationGas\",\n type: \"uint256\"\n },\n { internalType: \"bytes32\", name: \"gasFees\", type: \"bytes32\" },\n {\n internalType: \"bytes\",\n name: \"paymasterAndData\",\n type: \"bytes\"\n },\n { internalType: \"bytes\", name: \"signature\", type: \"bytes\" }\n ],\n internalType: \"struct PackedUserOperation[]\",\n name: \"userOps\",\n type: \"tuple[]\"\n },\n {\n internalType: \"contract IAggregator\",\n name: \"aggregator\",\n type: \"address\"\n },\n { internalType: \"bytes\", name: \"signature\", type: \"bytes\" }\n ],\n internalType: \"struct IEntryPoint.UserOpsPerAggregator[]\",\n name: \"opsPerAggregator\",\n type: \"tuple[]\"\n },\n { internalType: \"address payable\", name: \"beneficiary\", type: \"address\" }\n ],\n name: \"handleAggregatedOps\",\n outputs: [],\n stateMutability: \"nonpayable\",\n type: \"function\"\n },\n {\n inputs: [\n {\n components: [\n { internalType: \"address\", name: \"sender\", type: \"address\" },\n { internalType: \"uint256\", name: \"nonce\", type: \"uint256\" },\n { internalType: \"bytes\", name: \"initCode\", type: \"bytes\" },\n { internalType: \"bytes\", name: \"callData\", type: \"bytes\" },\n {\n internalType: \"bytes32\",\n name: \"accountGasLimits\",\n type: \"bytes32\"\n },\n {\n internalType: \"uint256\",\n name: \"preVerificationGas\",\n type: \"uint256\"\n },\n { internalType: \"bytes32\", name: \"gasFees\", type: \"bytes32\" },\n { internalType: \"bytes\", name: \"paymasterAndData\", type: \"bytes\" },\n { internalType: \"bytes\", name: \"signature\", type: \"bytes\" }\n ],\n internalType: \"struct PackedUserOperation[]\",\n name: \"ops\",\n type: \"tuple[]\"\n },\n { internalType: \"address payable\", name: \"beneficiary\", type: \"address\" }\n ],\n name: \"handleOps\",\n outputs: [],\n stateMutability: \"nonpayable\",\n type: \"function\"\n },\n {\n inputs: [{ internalType: \"uint192\", name: \"key\", type: \"uint192\" }],\n name: \"incrementNonce\",\n outputs: [],\n stateMutability: \"nonpayable\",\n type: \"function\"\n },\n {\n inputs: [\n { internalType: \"bytes\", name: \"callData\", type: \"bytes\" },\n {\n components: [\n {\n components: [\n { internalType: \"address\", name: \"sender\", type: \"address\" },\n { internalType: \"uint256\", name: \"nonce\", type: \"uint256\" },\n {\n internalType: \"uint256\",\n name: \"verificationGasLimit\",\n type: \"uint256\"\n },\n {\n internalType: \"uint256\",\n name: \"callGasLimit\",\n type: \"uint256\"\n },\n {\n internalType: \"uint256\",\n name: \"paymasterVerificationGasLimit\",\n type: \"uint256\"\n },\n {\n internalType: \"uint256\",\n name: \"paymasterPostOpGasLimit\",\n type: \"uint256\"\n },\n {\n internalType: \"uint256\",\n name: \"preVerificationGas\",\n type: \"uint256\"\n },\n { internalType: \"address\", name: \"paymaster\", type: \"address\" },\n {\n internalType: \"uint256\",\n name: \"maxFeePerGas\",\n type: \"uint256\"\n },\n {\n internalType: \"uint256\",\n name: \"maxPriorityFeePerGas\",\n type: \"uint256\"\n }\n ],\n internalType: \"struct EntryPoint.MemoryUserOp\",\n name: \"mUserOp\",\n type: \"tuple\"\n },\n { internalType: \"bytes32\", name: \"userOpHash\", type: \"bytes32\" },\n { internalType: \"uint256\", name: \"prefund\", type: \"uint256\" },\n { internalType: \"uint256\", name: \"contextOffset\", type: \"uint256\" },\n { internalType: \"uint256\", name: \"preOpGas\", type: \"uint256\" }\n ],\n internalType: \"struct EntryPoint.UserOpInfo\",\n name: \"opInfo\",\n type: \"tuple\"\n },\n { internalType: \"bytes\", name: \"context\", type: \"bytes\" }\n ],\n name: \"innerHandleOp\",\n outputs: [\n { internalType: \"uint256\", name: \"actualGasCost\", type: \"uint256\" }\n ],\n stateMutability: \"nonpayable\",\n type: \"function\"\n },\n {\n inputs: [\n { internalType: \"address\", name: \"\", type: \"address\" },\n { internalType: \"uint192\", name: \"\", type: \"uint192\" }\n ],\n name: \"nonceSequenceNumber\",\n outputs: [{ internalType: \"uint256\", name: \"\", type: \"uint256\" }],\n stateMutability: \"view\",\n type: \"function\"\n },\n {\n inputs: [{ internalType: \"bytes4\", name: \"interfaceId\", type: \"bytes4\" }],\n name: \"supportsInterface\",\n outputs: [{ internalType: \"bool\", name: \"\", type: \"bool\" }],\n stateMutability: \"view\",\n type: \"function\"\n },\n {\n inputs: [],\n name: \"unlockStake\",\n outputs: [],\n stateMutability: \"nonpayable\",\n type: \"function\"\n },\n {\n inputs: [\n {\n internalType: \"address payable\",\n name: \"withdrawAddress\",\n type: \"address\"\n }\n ],\n name: \"withdrawStake\",\n outputs: [],\n stateMutability: \"nonpayable\",\n type: \"function\"\n },\n {\n inputs: [\n {\n internalType: \"address payable\",\n name: \"withdrawAddress\",\n type: \"address\"\n },\n { internalType: \"uint256\", name: \"withdrawAmount\", type: \"uint256\" }\n ],\n name: \"withdrawTo\",\n outputs: [],\n stateMutability: \"nonpayable\",\n type: \"function\"\n },\n { stateMutability: \"payable\", type: \"receive\" }\n ];\n }\n });\n\n // ../../../node_modules/.pnpm/abitype@1.1.0_typescript@5.8.3_zod@3.25.64/node_modules/abitype/dist/esm/version.js\n var version2;\n var init_version2 = __esm({\n \"../../../node_modules/.pnpm/abitype@1.1.0_typescript@5.8.3_zod@3.25.64/node_modules/abitype/dist/esm/version.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n version2 = \"1.1.0\";\n }\n });\n\n // ../../../node_modules/.pnpm/abitype@1.1.0_typescript@5.8.3_zod@3.25.64/node_modules/abitype/dist/esm/errors.js\n var BaseError;\n var init_errors2 = __esm({\n \"../../../node_modules/.pnpm/abitype@1.1.0_typescript@5.8.3_zod@3.25.64/node_modules/abitype/dist/esm/errors.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_version2();\n BaseError = class _BaseError extends Error {\n constructor(shortMessage, args = {}) {\n const details = args.cause instanceof _BaseError ? args.cause.details : args.cause?.message ? args.cause.message : args.details;\n const docsPath8 = args.cause instanceof _BaseError ? args.cause.docsPath || args.docsPath : args.docsPath;\n const message = [\n shortMessage || \"An error occurred.\",\n \"\",\n ...args.metaMessages ? [...args.metaMessages, \"\"] : [],\n ...docsPath8 ? [`Docs: https://abitype.dev${docsPath8}`] : [],\n ...details ? [`Details: ${details}`] : [],\n `Version: abitype@${version2}`\n ].join(\"\\n\");\n super(message);\n Object.defineProperty(this, \"details\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: void 0\n });\n Object.defineProperty(this, \"docsPath\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: void 0\n });\n Object.defineProperty(this, \"metaMessages\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: void 0\n });\n Object.defineProperty(this, \"shortMessage\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: void 0\n });\n Object.defineProperty(this, \"name\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: \"AbiTypeError\"\n });\n if (args.cause)\n this.cause = args.cause;\n this.details = details;\n this.docsPath = docsPath8;\n this.metaMessages = args.metaMessages;\n this.shortMessage = shortMessage;\n }\n };\n }\n });\n\n // ../../../node_modules/.pnpm/abitype@1.1.0_typescript@5.8.3_zod@3.25.64/node_modules/abitype/dist/esm/regex.js\n function execTyped(regex2, string2) {\n const match = regex2.exec(string2);\n return match?.groups;\n }\n var bytesRegex, integerRegex, isTupleRegex;\n var init_regex = __esm({\n \"../../../node_modules/.pnpm/abitype@1.1.0_typescript@5.8.3_zod@3.25.64/node_modules/abitype/dist/esm/regex.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n bytesRegex = /^bytes([1-9]|1[0-9]|2[0-9]|3[0-2])?$/;\n integerRegex = /^u?int(8|16|24|32|40|48|56|64|72|80|88|96|104|112|120|128|136|144|152|160|168|176|184|192|200|208|216|224|232|240|248|256)?$/;\n isTupleRegex = /^\\(.+?\\).*?$/;\n }\n });\n\n // ../../../node_modules/.pnpm/abitype@1.1.0_typescript@5.8.3_zod@3.25.64/node_modules/abitype/dist/esm/human-readable/formatAbiParameter.js\n function formatAbiParameter(abiParameter) {\n let type = abiParameter.type;\n if (tupleRegex.test(abiParameter.type) && \"components\" in abiParameter) {\n type = \"(\";\n const length2 = abiParameter.components.length;\n for (let i3 = 0; i3 < length2; i3++) {\n const component = abiParameter.components[i3];\n type += formatAbiParameter(component);\n if (i3 < length2 - 1)\n type += \", \";\n }\n const result = execTyped(tupleRegex, abiParameter.type);\n type += `)${result?.array ?? \"\"}`;\n return formatAbiParameter({\n ...abiParameter,\n type\n });\n }\n if (\"indexed\" in abiParameter && abiParameter.indexed)\n type = `${type} indexed`;\n if (abiParameter.name)\n return `${type} ${abiParameter.name}`;\n return type;\n }\n var tupleRegex;\n var init_formatAbiParameter = __esm({\n \"../../../node_modules/.pnpm/abitype@1.1.0_typescript@5.8.3_zod@3.25.64/node_modules/abitype/dist/esm/human-readable/formatAbiParameter.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_regex();\n tupleRegex = /^tuple(?(\\[(\\d*)\\])*)$/;\n }\n });\n\n // ../../../node_modules/.pnpm/abitype@1.1.0_typescript@5.8.3_zod@3.25.64/node_modules/abitype/dist/esm/human-readable/formatAbiParameters.js\n function formatAbiParameters(abiParameters) {\n let params = \"\";\n const length2 = abiParameters.length;\n for (let i3 = 0; i3 < length2; i3++) {\n const abiParameter = abiParameters[i3];\n params += formatAbiParameter(abiParameter);\n if (i3 !== length2 - 1)\n params += \", \";\n }\n return params;\n }\n var init_formatAbiParameters = __esm({\n \"../../../node_modules/.pnpm/abitype@1.1.0_typescript@5.8.3_zod@3.25.64/node_modules/abitype/dist/esm/human-readable/formatAbiParameters.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_formatAbiParameter();\n }\n });\n\n // ../../../node_modules/.pnpm/abitype@1.1.0_typescript@5.8.3_zod@3.25.64/node_modules/abitype/dist/esm/human-readable/formatAbiItem.js\n function formatAbiItem(abiItem) {\n if (abiItem.type === \"function\")\n return `function ${abiItem.name}(${formatAbiParameters(abiItem.inputs)})${abiItem.stateMutability && abiItem.stateMutability !== \"nonpayable\" ? ` ${abiItem.stateMutability}` : \"\"}${abiItem.outputs?.length ? ` returns (${formatAbiParameters(abiItem.outputs)})` : \"\"}`;\n if (abiItem.type === \"event\")\n return `event ${abiItem.name}(${formatAbiParameters(abiItem.inputs)})`;\n if (abiItem.type === \"error\")\n return `error ${abiItem.name}(${formatAbiParameters(abiItem.inputs)})`;\n if (abiItem.type === \"constructor\")\n return `constructor(${formatAbiParameters(abiItem.inputs)})${abiItem.stateMutability === \"payable\" ? \" payable\" : \"\"}`;\n if (abiItem.type === \"fallback\")\n return `fallback() external${abiItem.stateMutability === \"payable\" ? \" payable\" : \"\"}`;\n return \"receive() external payable\";\n }\n var init_formatAbiItem = __esm({\n \"../../../node_modules/.pnpm/abitype@1.1.0_typescript@5.8.3_zod@3.25.64/node_modules/abitype/dist/esm/human-readable/formatAbiItem.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_formatAbiParameters();\n }\n });\n\n // ../../../node_modules/.pnpm/abitype@1.1.0_typescript@5.8.3_zod@3.25.64/node_modules/abitype/dist/esm/human-readable/runtime/signatures.js\n function isErrorSignature(signature) {\n return errorSignatureRegex.test(signature);\n }\n function execErrorSignature(signature) {\n return execTyped(errorSignatureRegex, signature);\n }\n function isEventSignature(signature) {\n return eventSignatureRegex.test(signature);\n }\n function execEventSignature(signature) {\n return execTyped(eventSignatureRegex, signature);\n }\n function isFunctionSignature(signature) {\n return functionSignatureRegex.test(signature);\n }\n function execFunctionSignature(signature) {\n return execTyped(functionSignatureRegex, signature);\n }\n function isStructSignature(signature) {\n return structSignatureRegex.test(signature);\n }\n function execStructSignature(signature) {\n return execTyped(structSignatureRegex, signature);\n }\n function isConstructorSignature(signature) {\n return constructorSignatureRegex.test(signature);\n }\n function execConstructorSignature(signature) {\n return execTyped(constructorSignatureRegex, signature);\n }\n function isFallbackSignature(signature) {\n return fallbackSignatureRegex.test(signature);\n }\n function execFallbackSignature(signature) {\n return execTyped(fallbackSignatureRegex, signature);\n }\n function isReceiveSignature(signature) {\n return receiveSignatureRegex.test(signature);\n }\n var errorSignatureRegex, eventSignatureRegex, functionSignatureRegex, structSignatureRegex, constructorSignatureRegex, fallbackSignatureRegex, receiveSignatureRegex, modifiers, eventModifiers, functionModifiers;\n var init_signatures = __esm({\n \"../../../node_modules/.pnpm/abitype@1.1.0_typescript@5.8.3_zod@3.25.64/node_modules/abitype/dist/esm/human-readable/runtime/signatures.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_regex();\n errorSignatureRegex = /^error (?[a-zA-Z$_][a-zA-Z0-9$_]*)\\((?.*?)\\)$/;\n eventSignatureRegex = /^event (?[a-zA-Z$_][a-zA-Z0-9$_]*)\\((?.*?)\\)$/;\n functionSignatureRegex = /^function (?[a-zA-Z$_][a-zA-Z0-9$_]*)\\((?.*?)\\)(?: (?external|public{1}))?(?: (?pure|view|nonpayable|payable{1}))?(?: returns\\s?\\((?.*?)\\))?$/;\n structSignatureRegex = /^struct (?[a-zA-Z$_][a-zA-Z0-9$_]*) \\{(?.*?)\\}$/;\n constructorSignatureRegex = /^constructor\\((?.*?)\\)(?:\\s(?payable{1}))?$/;\n fallbackSignatureRegex = /^fallback\\(\\) external(?:\\s(?payable{1}))?$/;\n receiveSignatureRegex = /^receive\\(\\) external payable$/;\n modifiers = /* @__PURE__ */ new Set([\n \"memory\",\n \"indexed\",\n \"storage\",\n \"calldata\"\n ]);\n eventModifiers = /* @__PURE__ */ new Set([\"indexed\"]);\n functionModifiers = /* @__PURE__ */ new Set([\n \"calldata\",\n \"memory\",\n \"storage\"\n ]);\n }\n });\n\n // ../../../node_modules/.pnpm/abitype@1.1.0_typescript@5.8.3_zod@3.25.64/node_modules/abitype/dist/esm/human-readable/errors/abiItem.js\n var InvalidAbiItemError, UnknownTypeError, UnknownSolidityTypeError;\n var init_abiItem = __esm({\n \"../../../node_modules/.pnpm/abitype@1.1.0_typescript@5.8.3_zod@3.25.64/node_modules/abitype/dist/esm/human-readable/errors/abiItem.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_errors2();\n InvalidAbiItemError = class extends BaseError {\n constructor({ signature }) {\n super(\"Failed to parse ABI item.\", {\n details: `parseAbiItem(${JSON.stringify(signature, null, 2)})`,\n docsPath: \"/api/human#parseabiitem-1\"\n });\n Object.defineProperty(this, \"name\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: \"InvalidAbiItemError\"\n });\n }\n };\n UnknownTypeError = class extends BaseError {\n constructor({ type }) {\n super(\"Unknown type.\", {\n metaMessages: [\n `Type \"${type}\" is not a valid ABI type. Perhaps you forgot to include a struct signature?`\n ]\n });\n Object.defineProperty(this, \"name\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: \"UnknownTypeError\"\n });\n }\n };\n UnknownSolidityTypeError = class extends BaseError {\n constructor({ type }) {\n super(\"Unknown type.\", {\n metaMessages: [`Type \"${type}\" is not a valid ABI type.`]\n });\n Object.defineProperty(this, \"name\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: \"UnknownSolidityTypeError\"\n });\n }\n };\n }\n });\n\n // ../../../node_modules/.pnpm/abitype@1.1.0_typescript@5.8.3_zod@3.25.64/node_modules/abitype/dist/esm/human-readable/errors/abiParameter.js\n var InvalidAbiParametersError, InvalidParameterError, SolidityProtectedKeywordError, InvalidModifierError, InvalidFunctionModifierError, InvalidAbiTypeParameterError;\n var init_abiParameter = __esm({\n \"../../../node_modules/.pnpm/abitype@1.1.0_typescript@5.8.3_zod@3.25.64/node_modules/abitype/dist/esm/human-readable/errors/abiParameter.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_errors2();\n InvalidAbiParametersError = class extends BaseError {\n constructor({ params }) {\n super(\"Failed to parse ABI parameters.\", {\n details: `parseAbiParameters(${JSON.stringify(params, null, 2)})`,\n docsPath: \"/api/human#parseabiparameters-1\"\n });\n Object.defineProperty(this, \"name\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: \"InvalidAbiParametersError\"\n });\n }\n };\n InvalidParameterError = class extends BaseError {\n constructor({ param }) {\n super(\"Invalid ABI parameter.\", {\n details: param\n });\n Object.defineProperty(this, \"name\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: \"InvalidParameterError\"\n });\n }\n };\n SolidityProtectedKeywordError = class extends BaseError {\n constructor({ param, name }) {\n super(\"Invalid ABI parameter.\", {\n details: param,\n metaMessages: [\n `\"${name}\" is a protected Solidity keyword. More info: https://docs.soliditylang.org/en/latest/cheatsheet.html`\n ]\n });\n Object.defineProperty(this, \"name\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: \"SolidityProtectedKeywordError\"\n });\n }\n };\n InvalidModifierError = class extends BaseError {\n constructor({ param, type, modifier }) {\n super(\"Invalid ABI parameter.\", {\n details: param,\n metaMessages: [\n `Modifier \"${modifier}\" not allowed${type ? ` in \"${type}\" type` : \"\"}.`\n ]\n });\n Object.defineProperty(this, \"name\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: \"InvalidModifierError\"\n });\n }\n };\n InvalidFunctionModifierError = class extends BaseError {\n constructor({ param, type, modifier }) {\n super(\"Invalid ABI parameter.\", {\n details: param,\n metaMessages: [\n `Modifier \"${modifier}\" not allowed${type ? ` in \"${type}\" type` : \"\"}.`,\n `Data location can only be specified for array, struct, or mapping types, but \"${modifier}\" was given.`\n ]\n });\n Object.defineProperty(this, \"name\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: \"InvalidFunctionModifierError\"\n });\n }\n };\n InvalidAbiTypeParameterError = class extends BaseError {\n constructor({ abiParameter }) {\n super(\"Invalid ABI parameter.\", {\n details: JSON.stringify(abiParameter, null, 2),\n metaMessages: [\"ABI parameter type is invalid.\"]\n });\n Object.defineProperty(this, \"name\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: \"InvalidAbiTypeParameterError\"\n });\n }\n };\n }\n });\n\n // ../../../node_modules/.pnpm/abitype@1.1.0_typescript@5.8.3_zod@3.25.64/node_modules/abitype/dist/esm/human-readable/errors/signature.js\n var InvalidSignatureError, UnknownSignatureError, InvalidStructSignatureError;\n var init_signature = __esm({\n \"../../../node_modules/.pnpm/abitype@1.1.0_typescript@5.8.3_zod@3.25.64/node_modules/abitype/dist/esm/human-readable/errors/signature.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_errors2();\n InvalidSignatureError = class extends BaseError {\n constructor({ signature, type }) {\n super(`Invalid ${type} signature.`, {\n details: signature\n });\n Object.defineProperty(this, \"name\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: \"InvalidSignatureError\"\n });\n }\n };\n UnknownSignatureError = class extends BaseError {\n constructor({ signature }) {\n super(\"Unknown signature.\", {\n details: signature\n });\n Object.defineProperty(this, \"name\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: \"UnknownSignatureError\"\n });\n }\n };\n InvalidStructSignatureError = class extends BaseError {\n constructor({ signature }) {\n super(\"Invalid struct signature.\", {\n details: signature,\n metaMessages: [\"No properties exist.\"]\n });\n Object.defineProperty(this, \"name\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: \"InvalidStructSignatureError\"\n });\n }\n };\n }\n });\n\n // ../../../node_modules/.pnpm/abitype@1.1.0_typescript@5.8.3_zod@3.25.64/node_modules/abitype/dist/esm/human-readable/errors/struct.js\n var CircularReferenceError;\n var init_struct = __esm({\n \"../../../node_modules/.pnpm/abitype@1.1.0_typescript@5.8.3_zod@3.25.64/node_modules/abitype/dist/esm/human-readable/errors/struct.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_errors2();\n CircularReferenceError = class extends BaseError {\n constructor({ type }) {\n super(\"Circular reference detected.\", {\n metaMessages: [`Struct \"${type}\" is a circular reference.`]\n });\n Object.defineProperty(this, \"name\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: \"CircularReferenceError\"\n });\n }\n };\n }\n });\n\n // ../../../node_modules/.pnpm/abitype@1.1.0_typescript@5.8.3_zod@3.25.64/node_modules/abitype/dist/esm/human-readable/errors/splitParameters.js\n var InvalidParenthesisError;\n var init_splitParameters = __esm({\n \"../../../node_modules/.pnpm/abitype@1.1.0_typescript@5.8.3_zod@3.25.64/node_modules/abitype/dist/esm/human-readable/errors/splitParameters.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_errors2();\n InvalidParenthesisError = class extends BaseError {\n constructor({ current, depth }) {\n super(\"Unbalanced parentheses.\", {\n metaMessages: [\n `\"${current.trim()}\" has too many ${depth > 0 ? \"opening\" : \"closing\"} parentheses.`\n ],\n details: `Depth \"${depth}\"`\n });\n Object.defineProperty(this, \"name\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: \"InvalidParenthesisError\"\n });\n }\n };\n }\n });\n\n // ../../../node_modules/.pnpm/abitype@1.1.0_typescript@5.8.3_zod@3.25.64/node_modules/abitype/dist/esm/human-readable/runtime/cache.js\n function getParameterCacheKey(param, type, structs) {\n let structKey = \"\";\n if (structs)\n for (const struct of Object.entries(structs)) {\n if (!struct)\n continue;\n let propertyKey = \"\";\n for (const property of struct[1]) {\n propertyKey += `[${property.type}${property.name ? `:${property.name}` : \"\"}]`;\n }\n structKey += `(${struct[0]}{${propertyKey}})`;\n }\n if (type)\n return `${type}:${param}${structKey}`;\n return param;\n }\n var parameterCache;\n var init_cache = __esm({\n \"../../../node_modules/.pnpm/abitype@1.1.0_typescript@5.8.3_zod@3.25.64/node_modules/abitype/dist/esm/human-readable/runtime/cache.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n parameterCache = /* @__PURE__ */ new Map([\n // Unnamed\n [\"address\", { type: \"address\" }],\n [\"bool\", { type: \"bool\" }],\n [\"bytes\", { type: \"bytes\" }],\n [\"bytes32\", { type: \"bytes32\" }],\n [\"int\", { type: \"int256\" }],\n [\"int256\", { type: \"int256\" }],\n [\"string\", { type: \"string\" }],\n [\"uint\", { type: \"uint256\" }],\n [\"uint8\", { type: \"uint8\" }],\n [\"uint16\", { type: \"uint16\" }],\n [\"uint24\", { type: \"uint24\" }],\n [\"uint32\", { type: \"uint32\" }],\n [\"uint64\", { type: \"uint64\" }],\n [\"uint96\", { type: \"uint96\" }],\n [\"uint112\", { type: \"uint112\" }],\n [\"uint160\", { type: \"uint160\" }],\n [\"uint192\", { type: \"uint192\" }],\n [\"uint256\", { type: \"uint256\" }],\n // Named\n [\"address owner\", { type: \"address\", name: \"owner\" }],\n [\"address to\", { type: \"address\", name: \"to\" }],\n [\"bool approved\", { type: \"bool\", name: \"approved\" }],\n [\"bytes _data\", { type: \"bytes\", name: \"_data\" }],\n [\"bytes data\", { type: \"bytes\", name: \"data\" }],\n [\"bytes signature\", { type: \"bytes\", name: \"signature\" }],\n [\"bytes32 hash\", { type: \"bytes32\", name: \"hash\" }],\n [\"bytes32 r\", { type: \"bytes32\", name: \"r\" }],\n [\"bytes32 root\", { type: \"bytes32\", name: \"root\" }],\n [\"bytes32 s\", { type: \"bytes32\", name: \"s\" }],\n [\"string name\", { type: \"string\", name: \"name\" }],\n [\"string symbol\", { type: \"string\", name: \"symbol\" }],\n [\"string tokenURI\", { type: \"string\", name: \"tokenURI\" }],\n [\"uint tokenId\", { type: \"uint256\", name: \"tokenId\" }],\n [\"uint8 v\", { type: \"uint8\", name: \"v\" }],\n [\"uint256 balance\", { type: \"uint256\", name: \"balance\" }],\n [\"uint256 tokenId\", { type: \"uint256\", name: \"tokenId\" }],\n [\"uint256 value\", { type: \"uint256\", name: \"value\" }],\n // Indexed\n [\n \"event:address indexed from\",\n { type: \"address\", name: \"from\", indexed: true }\n ],\n [\"event:address indexed to\", { type: \"address\", name: \"to\", indexed: true }],\n [\n \"event:uint indexed tokenId\",\n { type: \"uint256\", name: \"tokenId\", indexed: true }\n ],\n [\n \"event:uint256 indexed tokenId\",\n { type: \"uint256\", name: \"tokenId\", indexed: true }\n ]\n ]);\n }\n });\n\n // ../../../node_modules/.pnpm/abitype@1.1.0_typescript@5.8.3_zod@3.25.64/node_modules/abitype/dist/esm/human-readable/runtime/utils.js\n function parseSignature(signature, structs = {}) {\n if (isFunctionSignature(signature))\n return parseFunctionSignature(signature, structs);\n if (isEventSignature(signature))\n return parseEventSignature(signature, structs);\n if (isErrorSignature(signature))\n return parseErrorSignature(signature, structs);\n if (isConstructorSignature(signature))\n return parseConstructorSignature(signature, structs);\n if (isFallbackSignature(signature))\n return parseFallbackSignature(signature);\n if (isReceiveSignature(signature))\n return {\n type: \"receive\",\n stateMutability: \"payable\"\n };\n throw new UnknownSignatureError({ signature });\n }\n function parseFunctionSignature(signature, structs = {}) {\n const match = execFunctionSignature(signature);\n if (!match)\n throw new InvalidSignatureError({ signature, type: \"function\" });\n const inputParams = splitParameters(match.parameters);\n const inputs = [];\n const inputLength = inputParams.length;\n for (let i3 = 0; i3 < inputLength; i3++) {\n inputs.push(parseAbiParameter(inputParams[i3], {\n modifiers: functionModifiers,\n structs,\n type: \"function\"\n }));\n }\n const outputs = [];\n if (match.returns) {\n const outputParams = splitParameters(match.returns);\n const outputLength = outputParams.length;\n for (let i3 = 0; i3 < outputLength; i3++) {\n outputs.push(parseAbiParameter(outputParams[i3], {\n modifiers: functionModifiers,\n structs,\n type: \"function\"\n }));\n }\n }\n return {\n name: match.name,\n type: \"function\",\n stateMutability: match.stateMutability ?? \"nonpayable\",\n inputs,\n outputs\n };\n }\n function parseEventSignature(signature, structs = {}) {\n const match = execEventSignature(signature);\n if (!match)\n throw new InvalidSignatureError({ signature, type: \"event\" });\n const params = splitParameters(match.parameters);\n const abiParameters = [];\n const length2 = params.length;\n for (let i3 = 0; i3 < length2; i3++)\n abiParameters.push(parseAbiParameter(params[i3], {\n modifiers: eventModifiers,\n structs,\n type: \"event\"\n }));\n return { name: match.name, type: \"event\", inputs: abiParameters };\n }\n function parseErrorSignature(signature, structs = {}) {\n const match = execErrorSignature(signature);\n if (!match)\n throw new InvalidSignatureError({ signature, type: \"error\" });\n const params = splitParameters(match.parameters);\n const abiParameters = [];\n const length2 = params.length;\n for (let i3 = 0; i3 < length2; i3++)\n abiParameters.push(parseAbiParameter(params[i3], { structs, type: \"error\" }));\n return { name: match.name, type: \"error\", inputs: abiParameters };\n }\n function parseConstructorSignature(signature, structs = {}) {\n const match = execConstructorSignature(signature);\n if (!match)\n throw new InvalidSignatureError({ signature, type: \"constructor\" });\n const params = splitParameters(match.parameters);\n const abiParameters = [];\n const length2 = params.length;\n for (let i3 = 0; i3 < length2; i3++)\n abiParameters.push(parseAbiParameter(params[i3], { structs, type: \"constructor\" }));\n return {\n type: \"constructor\",\n stateMutability: match.stateMutability ?? \"nonpayable\",\n inputs: abiParameters\n };\n }\n function parseFallbackSignature(signature) {\n const match = execFallbackSignature(signature);\n if (!match)\n throw new InvalidSignatureError({ signature, type: \"fallback\" });\n return {\n type: \"fallback\",\n stateMutability: match.stateMutability ?? \"nonpayable\"\n };\n }\n function parseAbiParameter(param, options) {\n const parameterCacheKey = getParameterCacheKey(param, options?.type, options?.structs);\n if (parameterCache.has(parameterCacheKey))\n return parameterCache.get(parameterCacheKey);\n const isTuple = isTupleRegex.test(param);\n const match = execTyped(isTuple ? abiParameterWithTupleRegex : abiParameterWithoutTupleRegex, param);\n if (!match)\n throw new InvalidParameterError({ param });\n if (match.name && isSolidityKeyword(match.name))\n throw new SolidityProtectedKeywordError({ param, name: match.name });\n const name = match.name ? { name: match.name } : {};\n const indexed = match.modifier === \"indexed\" ? { indexed: true } : {};\n const structs = options?.structs ?? {};\n let type;\n let components = {};\n if (isTuple) {\n type = \"tuple\";\n const params = splitParameters(match.type);\n const components_ = [];\n const length2 = params.length;\n for (let i3 = 0; i3 < length2; i3++) {\n components_.push(parseAbiParameter(params[i3], { structs }));\n }\n components = { components: components_ };\n } else if (match.type in structs) {\n type = \"tuple\";\n components = { components: structs[match.type] };\n } else if (dynamicIntegerRegex.test(match.type)) {\n type = `${match.type}256`;\n } else if (match.type === \"address payable\") {\n type = \"address\";\n } else {\n type = match.type;\n if (!(options?.type === \"struct\") && !isSolidityType(type))\n throw new UnknownSolidityTypeError({ type });\n }\n if (match.modifier) {\n if (!options?.modifiers?.has?.(match.modifier))\n throw new InvalidModifierError({\n param,\n type: options?.type,\n modifier: match.modifier\n });\n if (functionModifiers.has(match.modifier) && !isValidDataLocation(type, !!match.array))\n throw new InvalidFunctionModifierError({\n param,\n type: options?.type,\n modifier: match.modifier\n });\n }\n const abiParameter = {\n type: `${type}${match.array ?? \"\"}`,\n ...name,\n ...indexed,\n ...components\n };\n parameterCache.set(parameterCacheKey, abiParameter);\n return abiParameter;\n }\n function splitParameters(params, result = [], current = \"\", depth = 0) {\n const length2 = params.trim().length;\n for (let i3 = 0; i3 < length2; i3++) {\n const char = params[i3];\n const tail = params.slice(i3 + 1);\n switch (char) {\n case \",\":\n return depth === 0 ? splitParameters(tail, [...result, current.trim()]) : splitParameters(tail, result, `${current}${char}`, depth);\n case \"(\":\n return splitParameters(tail, result, `${current}${char}`, depth + 1);\n case \")\":\n return splitParameters(tail, result, `${current}${char}`, depth - 1);\n default:\n return splitParameters(tail, result, `${current}${char}`, depth);\n }\n }\n if (current === \"\")\n return result;\n if (depth !== 0)\n throw new InvalidParenthesisError({ current, depth });\n result.push(current.trim());\n return result;\n }\n function isSolidityType(type) {\n return type === \"address\" || type === \"bool\" || type === \"function\" || type === \"string\" || bytesRegex.test(type) || integerRegex.test(type);\n }\n function isSolidityKeyword(name) {\n return name === \"address\" || name === \"bool\" || name === \"function\" || name === \"string\" || name === \"tuple\" || bytesRegex.test(name) || integerRegex.test(name) || protectedKeywordsRegex.test(name);\n }\n function isValidDataLocation(type, isArray) {\n return isArray || type === \"bytes\" || type === \"string\" || type === \"tuple\";\n }\n var abiParameterWithoutTupleRegex, abiParameterWithTupleRegex, dynamicIntegerRegex, protectedKeywordsRegex;\n var init_utils2 = __esm({\n \"../../../node_modules/.pnpm/abitype@1.1.0_typescript@5.8.3_zod@3.25.64/node_modules/abitype/dist/esm/human-readable/runtime/utils.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_regex();\n init_abiItem();\n init_abiParameter();\n init_signature();\n init_splitParameters();\n init_cache();\n init_signatures();\n abiParameterWithoutTupleRegex = /^(?[a-zA-Z$_][a-zA-Z0-9$_]*(?:\\spayable)?)(?(?:\\[\\d*?\\])+?)?(?:\\s(?calldata|indexed|memory|storage{1}))?(?:\\s(?[a-zA-Z$_][a-zA-Z0-9$_]*))?$/;\n abiParameterWithTupleRegex = /^\\((?.+?)\\)(?(?:\\[\\d*?\\])+?)?(?:\\s(?calldata|indexed|memory|storage{1}))?(?:\\s(?[a-zA-Z$_][a-zA-Z0-9$_]*))?$/;\n dynamicIntegerRegex = /^u?int$/;\n protectedKeywordsRegex = /^(?:after|alias|anonymous|apply|auto|byte|calldata|case|catch|constant|copyof|default|defined|error|event|external|false|final|function|immutable|implements|in|indexed|inline|internal|let|mapping|match|memory|mutable|null|of|override|partial|private|promise|public|pure|reference|relocatable|return|returns|sizeof|static|storage|struct|super|supports|switch|this|true|try|typedef|typeof|var|view|virtual)$/;\n }\n });\n\n // ../../../node_modules/.pnpm/abitype@1.1.0_typescript@5.8.3_zod@3.25.64/node_modules/abitype/dist/esm/human-readable/runtime/structs.js\n function parseStructs(signatures) {\n const shallowStructs = {};\n const signaturesLength = signatures.length;\n for (let i3 = 0; i3 < signaturesLength; i3++) {\n const signature = signatures[i3];\n if (!isStructSignature(signature))\n continue;\n const match = execStructSignature(signature);\n if (!match)\n throw new InvalidSignatureError({ signature, type: \"struct\" });\n const properties = match.properties.split(\";\");\n const components = [];\n const propertiesLength = properties.length;\n for (let k4 = 0; k4 < propertiesLength; k4++) {\n const property = properties[k4];\n const trimmed = property.trim();\n if (!trimmed)\n continue;\n const abiParameter = parseAbiParameter(trimmed, {\n type: \"struct\"\n });\n components.push(abiParameter);\n }\n if (!components.length)\n throw new InvalidStructSignatureError({ signature });\n shallowStructs[match.name] = components;\n }\n const resolvedStructs = {};\n const entries = Object.entries(shallowStructs);\n const entriesLength = entries.length;\n for (let i3 = 0; i3 < entriesLength; i3++) {\n const [name, parameters] = entries[i3];\n resolvedStructs[name] = resolveStructs(parameters, shallowStructs);\n }\n return resolvedStructs;\n }\n function resolveStructs(abiParameters, structs, ancestors = /* @__PURE__ */ new Set()) {\n const components = [];\n const length2 = abiParameters.length;\n for (let i3 = 0; i3 < length2; i3++) {\n const abiParameter = abiParameters[i3];\n const isTuple = isTupleRegex.test(abiParameter.type);\n if (isTuple)\n components.push(abiParameter);\n else {\n const match = execTyped(typeWithoutTupleRegex, abiParameter.type);\n if (!match?.type)\n throw new InvalidAbiTypeParameterError({ abiParameter });\n const { array: array2, type } = match;\n if (type in structs) {\n if (ancestors.has(type))\n throw new CircularReferenceError({ type });\n components.push({\n ...abiParameter,\n type: `tuple${array2 ?? \"\"}`,\n components: resolveStructs(structs[type] ?? [], structs, /* @__PURE__ */ new Set([...ancestors, type]))\n });\n } else {\n if (isSolidityType(type))\n components.push(abiParameter);\n else\n throw new UnknownTypeError({ type });\n }\n }\n }\n return components;\n }\n var typeWithoutTupleRegex;\n var init_structs = __esm({\n \"../../../node_modules/.pnpm/abitype@1.1.0_typescript@5.8.3_zod@3.25.64/node_modules/abitype/dist/esm/human-readable/runtime/structs.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_regex();\n init_abiItem();\n init_abiParameter();\n init_signature();\n init_struct();\n init_signatures();\n init_utils2();\n typeWithoutTupleRegex = /^(?[a-zA-Z$_][a-zA-Z0-9$_]*)(?(?:\\[\\d*?\\])+?)?$/;\n }\n });\n\n // ../../../node_modules/.pnpm/abitype@1.1.0_typescript@5.8.3_zod@3.25.64/node_modules/abitype/dist/esm/human-readable/parseAbi.js\n function parseAbi(signatures) {\n const structs = parseStructs(signatures);\n const abi2 = [];\n const length2 = signatures.length;\n for (let i3 = 0; i3 < length2; i3++) {\n const signature = signatures[i3];\n if (isStructSignature(signature))\n continue;\n abi2.push(parseSignature(signature, structs));\n }\n return abi2;\n }\n var init_parseAbi = __esm({\n \"../../../node_modules/.pnpm/abitype@1.1.0_typescript@5.8.3_zod@3.25.64/node_modules/abitype/dist/esm/human-readable/parseAbi.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_signatures();\n init_structs();\n init_utils2();\n }\n });\n\n // ../../../node_modules/.pnpm/abitype@1.1.0_typescript@5.8.3_zod@3.25.64/node_modules/abitype/dist/esm/human-readable/parseAbiItem.js\n function parseAbiItem(signature) {\n let abiItem;\n if (typeof signature === \"string\")\n abiItem = parseSignature(signature);\n else {\n const structs = parseStructs(signature);\n const length2 = signature.length;\n for (let i3 = 0; i3 < length2; i3++) {\n const signature_ = signature[i3];\n if (isStructSignature(signature_))\n continue;\n abiItem = parseSignature(signature_, structs);\n break;\n }\n }\n if (!abiItem)\n throw new InvalidAbiItemError({ signature });\n return abiItem;\n }\n var init_parseAbiItem = __esm({\n \"../../../node_modules/.pnpm/abitype@1.1.0_typescript@5.8.3_zod@3.25.64/node_modules/abitype/dist/esm/human-readable/parseAbiItem.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_abiItem();\n init_signatures();\n init_structs();\n init_utils2();\n }\n });\n\n // ../../../node_modules/.pnpm/abitype@1.1.0_typescript@5.8.3_zod@3.25.64/node_modules/abitype/dist/esm/human-readable/parseAbiParameters.js\n function parseAbiParameters(params) {\n const abiParameters = [];\n if (typeof params === \"string\") {\n const parameters = splitParameters(params);\n const length2 = parameters.length;\n for (let i3 = 0; i3 < length2; i3++) {\n abiParameters.push(parseAbiParameter(parameters[i3], { modifiers }));\n }\n } else {\n const structs = parseStructs(params);\n const length2 = params.length;\n for (let i3 = 0; i3 < length2; i3++) {\n const signature = params[i3];\n if (isStructSignature(signature))\n continue;\n const parameters = splitParameters(signature);\n const length3 = parameters.length;\n for (let k4 = 0; k4 < length3; k4++) {\n abiParameters.push(parseAbiParameter(parameters[k4], { modifiers, structs }));\n }\n }\n }\n if (abiParameters.length === 0)\n throw new InvalidAbiParametersError({ params });\n return abiParameters;\n }\n var init_parseAbiParameters = __esm({\n \"../../../node_modules/.pnpm/abitype@1.1.0_typescript@5.8.3_zod@3.25.64/node_modules/abitype/dist/esm/human-readable/parseAbiParameters.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_abiParameter();\n init_signatures();\n init_structs();\n init_utils2();\n init_utils2();\n }\n });\n\n // ../../../node_modules/.pnpm/abitype@1.1.0_typescript@5.8.3_zod@3.25.64/node_modules/abitype/dist/esm/exports/index.js\n var init_exports = __esm({\n \"../../../node_modules/.pnpm/abitype@1.1.0_typescript@5.8.3_zod@3.25.64/node_modules/abitype/dist/esm/exports/index.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_formatAbiItem();\n init_formatAbiParameters();\n init_parseAbi();\n init_parseAbiItem();\n init_parseAbiParameters();\n }\n });\n\n // ../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/utils/getAction.js\n function getAction(client, actionFn, name) {\n const action_implicit = client[actionFn.name];\n if (typeof action_implicit === \"function\")\n return action_implicit;\n const action_explicit = client[name];\n if (typeof action_explicit === \"function\")\n return action_explicit;\n return (params) => actionFn(client, params);\n }\n var init_getAction = __esm({\n \"../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/utils/getAction.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n }\n });\n\n // ../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/utils/abi/formatAbiItem.js\n function formatAbiItem2(abiItem, { includeName = false } = {}) {\n if (abiItem.type !== \"function\" && abiItem.type !== \"event\" && abiItem.type !== \"error\")\n throw new InvalidDefinitionTypeError(abiItem.type);\n return `${abiItem.name}(${formatAbiParams(abiItem.inputs, { includeName })})`;\n }\n function formatAbiParams(params, { includeName = false } = {}) {\n if (!params)\n return \"\";\n return params.map((param) => formatAbiParam(param, { includeName })).join(includeName ? \", \" : \",\");\n }\n function formatAbiParam(param, { includeName }) {\n if (param.type.startsWith(\"tuple\")) {\n return `(${formatAbiParams(param.components, { includeName })})${param.type.slice(\"tuple\".length)}`;\n }\n return param.type + (includeName && param.name ? ` ${param.name}` : \"\");\n }\n var init_formatAbiItem2 = __esm({\n \"../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/utils/abi/formatAbiItem.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_abi();\n }\n });\n\n // ../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/utils/data/isHex.js\n function isHex(value, { strict = true } = {}) {\n if (!value)\n return false;\n if (typeof value !== \"string\")\n return false;\n return strict ? /^0x[0-9a-fA-F]*$/.test(value) : value.startsWith(\"0x\");\n }\n var init_isHex = __esm({\n \"../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/utils/data/isHex.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n }\n });\n\n // ../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/utils/data/size.js\n function size(value) {\n if (isHex(value, { strict: false }))\n return Math.ceil((value.length - 2) / 2);\n return value.length;\n }\n var init_size = __esm({\n \"../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/utils/data/size.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_isHex();\n }\n });\n\n // ../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/errors/version.js\n var version3;\n var init_version3 = __esm({\n \"../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/errors/version.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n version3 = \"2.38.4\";\n }\n });\n\n // ../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/errors/base.js\n function walk(err, fn) {\n if (fn?.(err))\n return err;\n if (err && typeof err === \"object\" && \"cause\" in err && err.cause !== void 0)\n return walk(err.cause, fn);\n return fn ? null : err;\n }\n var errorConfig, BaseError2;\n var init_base = __esm({\n \"../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/errors/base.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_version3();\n errorConfig = {\n getDocsUrl: ({ docsBaseUrl, docsPath: docsPath8 = \"\", docsSlug }) => docsPath8 ? `${docsBaseUrl ?? \"https://viem.sh\"}${docsPath8}${docsSlug ? `#${docsSlug}` : \"\"}` : void 0,\n version: `viem@${version3}`\n };\n BaseError2 = class _BaseError extends Error {\n constructor(shortMessage, args = {}) {\n const details = (() => {\n if (args.cause instanceof _BaseError)\n return args.cause.details;\n if (args.cause?.message)\n return args.cause.message;\n return args.details;\n })();\n const docsPath8 = (() => {\n if (args.cause instanceof _BaseError)\n return args.cause.docsPath || args.docsPath;\n return args.docsPath;\n })();\n const docsUrl = errorConfig.getDocsUrl?.({ ...args, docsPath: docsPath8 });\n const message = [\n shortMessage || \"An error occurred.\",\n \"\",\n ...args.metaMessages ? [...args.metaMessages, \"\"] : [],\n ...docsUrl ? [`Docs: ${docsUrl}`] : [],\n ...details ? [`Details: ${details}`] : [],\n ...errorConfig.version ? [`Version: ${errorConfig.version}`] : []\n ].join(\"\\n\");\n super(message, args.cause ? { cause: args.cause } : void 0);\n Object.defineProperty(this, \"details\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: void 0\n });\n Object.defineProperty(this, \"docsPath\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: void 0\n });\n Object.defineProperty(this, \"metaMessages\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: void 0\n });\n Object.defineProperty(this, \"shortMessage\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: void 0\n });\n Object.defineProperty(this, \"version\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: void 0\n });\n Object.defineProperty(this, \"name\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: \"BaseError\"\n });\n this.details = details;\n this.docsPath = docsPath8;\n this.metaMessages = args.metaMessages;\n this.name = args.name ?? this.name;\n this.shortMessage = shortMessage;\n this.version = version3;\n }\n walk(fn) {\n return walk(this, fn);\n }\n };\n }\n });\n\n // ../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/errors/abi.js\n var AbiConstructorNotFoundError, AbiConstructorParamsNotFoundError, AbiDecodingDataSizeTooSmallError, AbiDecodingZeroDataError, AbiEncodingArrayLengthMismatchError, AbiEncodingBytesSizeMismatchError, AbiEncodingLengthMismatchError, AbiErrorInputsNotFoundError, AbiErrorNotFoundError, AbiErrorSignatureNotFoundError, AbiEventSignatureEmptyTopicsError, AbiEventSignatureNotFoundError, AbiEventNotFoundError, AbiFunctionNotFoundError, AbiFunctionOutputsNotFoundError, AbiFunctionSignatureNotFoundError, AbiItemAmbiguityError, BytesSizeMismatchError, DecodeLogDataMismatch, DecodeLogTopicsMismatch, InvalidAbiEncodingTypeError, InvalidAbiDecodingTypeError, InvalidArrayError, InvalidDefinitionTypeError, UnsupportedPackedAbiType;\n var init_abi = __esm({\n \"../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/errors/abi.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_formatAbiItem2();\n init_size();\n init_base();\n AbiConstructorNotFoundError = class extends BaseError2 {\n constructor({ docsPath: docsPath8 }) {\n super([\n \"A constructor was not found on the ABI.\",\n \"Make sure you are using the correct ABI and that the constructor exists on it.\"\n ].join(\"\\n\"), {\n docsPath: docsPath8,\n name: \"AbiConstructorNotFoundError\"\n });\n }\n };\n AbiConstructorParamsNotFoundError = class extends BaseError2 {\n constructor({ docsPath: docsPath8 }) {\n super([\n \"Constructor arguments were provided (`args`), but a constructor parameters (`inputs`) were not found on the ABI.\",\n \"Make sure you are using the correct ABI, and that the `inputs` attribute on the constructor exists.\"\n ].join(\"\\n\"), {\n docsPath: docsPath8,\n name: \"AbiConstructorParamsNotFoundError\"\n });\n }\n };\n AbiDecodingDataSizeTooSmallError = class extends BaseError2 {\n constructor({ data, params, size: size6 }) {\n super([`Data size of ${size6} bytes is too small for given parameters.`].join(\"\\n\"), {\n metaMessages: [\n `Params: (${formatAbiParams(params, { includeName: true })})`,\n `Data: ${data} (${size6} bytes)`\n ],\n name: \"AbiDecodingDataSizeTooSmallError\"\n });\n Object.defineProperty(this, \"data\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: void 0\n });\n Object.defineProperty(this, \"params\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: void 0\n });\n Object.defineProperty(this, \"size\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: void 0\n });\n this.data = data;\n this.params = params;\n this.size = size6;\n }\n };\n AbiDecodingZeroDataError = class extends BaseError2 {\n constructor() {\n super('Cannot decode zero data (\"0x\") with ABI parameters.', {\n name: \"AbiDecodingZeroDataError\"\n });\n }\n };\n AbiEncodingArrayLengthMismatchError = class extends BaseError2 {\n constructor({ expectedLength, givenLength, type }) {\n super([\n `ABI encoding array length mismatch for type ${type}.`,\n `Expected length: ${expectedLength}`,\n `Given length: ${givenLength}`\n ].join(\"\\n\"), { name: \"AbiEncodingArrayLengthMismatchError\" });\n }\n };\n AbiEncodingBytesSizeMismatchError = class extends BaseError2 {\n constructor({ expectedSize, value }) {\n super(`Size of bytes \"${value}\" (bytes${size(value)}) does not match expected size (bytes${expectedSize}).`, { name: \"AbiEncodingBytesSizeMismatchError\" });\n }\n };\n AbiEncodingLengthMismatchError = class extends BaseError2 {\n constructor({ expectedLength, givenLength }) {\n super([\n \"ABI encoding params/values length mismatch.\",\n `Expected length (params): ${expectedLength}`,\n `Given length (values): ${givenLength}`\n ].join(\"\\n\"), { name: \"AbiEncodingLengthMismatchError\" });\n }\n };\n AbiErrorInputsNotFoundError = class extends BaseError2 {\n constructor(errorName, { docsPath: docsPath8 }) {\n super([\n `Arguments (\\`args\\`) were provided to \"${errorName}\", but \"${errorName}\" on the ABI does not contain any parameters (\\`inputs\\`).`,\n \"Cannot encode error result without knowing what the parameter types are.\",\n \"Make sure you are using the correct ABI and that the inputs exist on it.\"\n ].join(\"\\n\"), {\n docsPath: docsPath8,\n name: \"AbiErrorInputsNotFoundError\"\n });\n }\n };\n AbiErrorNotFoundError = class extends BaseError2 {\n constructor(errorName, { docsPath: docsPath8 } = {}) {\n super([\n `Error ${errorName ? `\"${errorName}\" ` : \"\"}not found on ABI.`,\n \"Make sure you are using the correct ABI and that the error exists on it.\"\n ].join(\"\\n\"), {\n docsPath: docsPath8,\n name: \"AbiErrorNotFoundError\"\n });\n }\n };\n AbiErrorSignatureNotFoundError = class extends BaseError2 {\n constructor(signature, { docsPath: docsPath8 }) {\n super([\n `Encoded error signature \"${signature}\" not found on ABI.`,\n \"Make sure you are using the correct ABI and that the error exists on it.\",\n `You can look up the decoded signature here: https://openchain.xyz/signatures?query=${signature}.`\n ].join(\"\\n\"), {\n docsPath: docsPath8,\n name: \"AbiErrorSignatureNotFoundError\"\n });\n Object.defineProperty(this, \"signature\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: void 0\n });\n this.signature = signature;\n }\n };\n AbiEventSignatureEmptyTopicsError = class extends BaseError2 {\n constructor({ docsPath: docsPath8 }) {\n super(\"Cannot extract event signature from empty topics.\", {\n docsPath: docsPath8,\n name: \"AbiEventSignatureEmptyTopicsError\"\n });\n }\n };\n AbiEventSignatureNotFoundError = class extends BaseError2 {\n constructor(signature, { docsPath: docsPath8 }) {\n super([\n `Encoded event signature \"${signature}\" not found on ABI.`,\n \"Make sure you are using the correct ABI and that the event exists on it.\",\n `You can look up the signature here: https://openchain.xyz/signatures?query=${signature}.`\n ].join(\"\\n\"), {\n docsPath: docsPath8,\n name: \"AbiEventSignatureNotFoundError\"\n });\n }\n };\n AbiEventNotFoundError = class extends BaseError2 {\n constructor(eventName, { docsPath: docsPath8 } = {}) {\n super([\n `Event ${eventName ? `\"${eventName}\" ` : \"\"}not found on ABI.`,\n \"Make sure you are using the correct ABI and that the event exists on it.\"\n ].join(\"\\n\"), {\n docsPath: docsPath8,\n name: \"AbiEventNotFoundError\"\n });\n }\n };\n AbiFunctionNotFoundError = class extends BaseError2 {\n constructor(functionName, { docsPath: docsPath8 } = {}) {\n super([\n `Function ${functionName ? `\"${functionName}\" ` : \"\"}not found on ABI.`,\n \"Make sure you are using the correct ABI and that the function exists on it.\"\n ].join(\"\\n\"), {\n docsPath: docsPath8,\n name: \"AbiFunctionNotFoundError\"\n });\n }\n };\n AbiFunctionOutputsNotFoundError = class extends BaseError2 {\n constructor(functionName, { docsPath: docsPath8 }) {\n super([\n `Function \"${functionName}\" does not contain any \\`outputs\\` on ABI.`,\n \"Cannot decode function result without knowing what the parameter types are.\",\n \"Make sure you are using the correct ABI and that the function exists on it.\"\n ].join(\"\\n\"), {\n docsPath: docsPath8,\n name: \"AbiFunctionOutputsNotFoundError\"\n });\n }\n };\n AbiFunctionSignatureNotFoundError = class extends BaseError2 {\n constructor(signature, { docsPath: docsPath8 }) {\n super([\n `Encoded function signature \"${signature}\" not found on ABI.`,\n \"Make sure you are using the correct ABI and that the function exists on it.\",\n `You can look up the signature here: https://openchain.xyz/signatures?query=${signature}.`\n ].join(\"\\n\"), {\n docsPath: docsPath8,\n name: \"AbiFunctionSignatureNotFoundError\"\n });\n }\n };\n AbiItemAmbiguityError = class extends BaseError2 {\n constructor(x4, y6) {\n super(\"Found ambiguous types in overloaded ABI items.\", {\n metaMessages: [\n `\\`${x4.type}\\` in \\`${formatAbiItem2(x4.abiItem)}\\`, and`,\n `\\`${y6.type}\\` in \\`${formatAbiItem2(y6.abiItem)}\\``,\n \"\",\n \"These types encode differently and cannot be distinguished at runtime.\",\n \"Remove one of the ambiguous items in the ABI.\"\n ],\n name: \"AbiItemAmbiguityError\"\n });\n }\n };\n BytesSizeMismatchError = class extends BaseError2 {\n constructor({ expectedSize, givenSize }) {\n super(`Expected bytes${expectedSize}, got bytes${givenSize}.`, {\n name: \"BytesSizeMismatchError\"\n });\n }\n };\n DecodeLogDataMismatch = class extends BaseError2 {\n constructor({ abiItem, data, params, size: size6 }) {\n super([\n `Data size of ${size6} bytes is too small for non-indexed event parameters.`\n ].join(\"\\n\"), {\n metaMessages: [\n `Params: (${formatAbiParams(params, { includeName: true })})`,\n `Data: ${data} (${size6} bytes)`\n ],\n name: \"DecodeLogDataMismatch\"\n });\n Object.defineProperty(this, \"abiItem\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: void 0\n });\n Object.defineProperty(this, \"data\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: void 0\n });\n Object.defineProperty(this, \"params\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: void 0\n });\n Object.defineProperty(this, \"size\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: void 0\n });\n this.abiItem = abiItem;\n this.data = data;\n this.params = params;\n this.size = size6;\n }\n };\n DecodeLogTopicsMismatch = class extends BaseError2 {\n constructor({ abiItem, param }) {\n super([\n `Expected a topic for indexed event parameter${param.name ? ` \"${param.name}\"` : \"\"} on event \"${formatAbiItem2(abiItem, { includeName: true })}\".`\n ].join(\"\\n\"), { name: \"DecodeLogTopicsMismatch\" });\n Object.defineProperty(this, \"abiItem\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: void 0\n });\n this.abiItem = abiItem;\n }\n };\n InvalidAbiEncodingTypeError = class extends BaseError2 {\n constructor(type, { docsPath: docsPath8 }) {\n super([\n `Type \"${type}\" is not a valid encoding type.`,\n \"Please provide a valid ABI type.\"\n ].join(\"\\n\"), { docsPath: docsPath8, name: \"InvalidAbiEncodingType\" });\n }\n };\n InvalidAbiDecodingTypeError = class extends BaseError2 {\n constructor(type, { docsPath: docsPath8 }) {\n super([\n `Type \"${type}\" is not a valid decoding type.`,\n \"Please provide a valid ABI type.\"\n ].join(\"\\n\"), { docsPath: docsPath8, name: \"InvalidAbiDecodingType\" });\n }\n };\n InvalidArrayError = class extends BaseError2 {\n constructor(value) {\n super([`Value \"${value}\" is not a valid array.`].join(\"\\n\"), {\n name: \"InvalidArrayError\"\n });\n }\n };\n InvalidDefinitionTypeError = class extends BaseError2 {\n constructor(type) {\n super([\n `\"${type}\" is not a valid definition type.`,\n 'Valid types: \"function\", \"event\", \"error\"'\n ].join(\"\\n\"), { name: \"InvalidDefinitionTypeError\" });\n }\n };\n UnsupportedPackedAbiType = class extends BaseError2 {\n constructor(type) {\n super(`Type \"${type}\" is not supported for packed encoding.`, {\n name: \"UnsupportedPackedAbiType\"\n });\n }\n };\n }\n });\n\n // ../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/errors/log.js\n var FilterTypeNotSupportedError;\n var init_log = __esm({\n \"../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/errors/log.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_base();\n FilterTypeNotSupportedError = class extends BaseError2 {\n constructor(type) {\n super(`Filter type \"${type}\" is not supported.`, {\n name: \"FilterTypeNotSupportedError\"\n });\n }\n };\n }\n });\n\n // ../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/errors/data.js\n var SliceOffsetOutOfBoundsError, SizeExceedsPaddingSizeError, InvalidBytesLengthError;\n var init_data = __esm({\n \"../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/errors/data.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_base();\n SliceOffsetOutOfBoundsError = class extends BaseError2 {\n constructor({ offset, position, size: size6 }) {\n super(`Slice ${position === \"start\" ? \"starting\" : \"ending\"} at offset \"${offset}\" is out-of-bounds (size: ${size6}).`, { name: \"SliceOffsetOutOfBoundsError\" });\n }\n };\n SizeExceedsPaddingSizeError = class extends BaseError2 {\n constructor({ size: size6, targetSize, type }) {\n super(`${type.charAt(0).toUpperCase()}${type.slice(1).toLowerCase()} size (${size6}) exceeds padding size (${targetSize}).`, { name: \"SizeExceedsPaddingSizeError\" });\n }\n };\n InvalidBytesLengthError = class extends BaseError2 {\n constructor({ size: size6, targetSize, type }) {\n super(`${type.charAt(0).toUpperCase()}${type.slice(1).toLowerCase()} is expected to be ${targetSize} ${type} long, but is ${size6} ${type} long.`, { name: \"InvalidBytesLengthError\" });\n }\n };\n }\n });\n\n // ../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/utils/data/pad.js\n function pad(hexOrBytes, { dir, size: size6 = 32 } = {}) {\n if (typeof hexOrBytes === \"string\")\n return padHex(hexOrBytes, { dir, size: size6 });\n return padBytes(hexOrBytes, { dir, size: size6 });\n }\n function padHex(hex_, { dir, size: size6 = 32 } = {}) {\n if (size6 === null)\n return hex_;\n const hex = hex_.replace(\"0x\", \"\");\n if (hex.length > size6 * 2)\n throw new SizeExceedsPaddingSizeError({\n size: Math.ceil(hex.length / 2),\n targetSize: size6,\n type: \"hex\"\n });\n return `0x${hex[dir === \"right\" ? \"padEnd\" : \"padStart\"](size6 * 2, \"0\")}`;\n }\n function padBytes(bytes, { dir, size: size6 = 32 } = {}) {\n if (size6 === null)\n return bytes;\n if (bytes.length > size6)\n throw new SizeExceedsPaddingSizeError({\n size: bytes.length,\n targetSize: size6,\n type: \"bytes\"\n });\n const paddedBytes = new Uint8Array(size6);\n for (let i3 = 0; i3 < size6; i3++) {\n const padEnd = dir === \"right\";\n paddedBytes[padEnd ? i3 : size6 - i3 - 1] = bytes[padEnd ? i3 : bytes.length - i3 - 1];\n }\n return paddedBytes;\n }\n var init_pad = __esm({\n \"../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/utils/data/pad.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_data();\n }\n });\n\n // ../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/errors/encoding.js\n var IntegerOutOfRangeError, InvalidBytesBooleanError, InvalidHexBooleanError, SizeOverflowError;\n var init_encoding = __esm({\n \"../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/errors/encoding.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_base();\n IntegerOutOfRangeError = class extends BaseError2 {\n constructor({ max, min, signed, size: size6, value }) {\n super(`Number \"${value}\" is not in safe ${size6 ? `${size6 * 8}-bit ${signed ? \"signed\" : \"unsigned\"} ` : \"\"}integer range ${max ? `(${min} to ${max})` : `(above ${min})`}`, { name: \"IntegerOutOfRangeError\" });\n }\n };\n InvalidBytesBooleanError = class extends BaseError2 {\n constructor(bytes) {\n super(`Bytes value \"${bytes}\" is not a valid boolean. The bytes array must contain a single byte of either a 0 or 1 value.`, {\n name: \"InvalidBytesBooleanError\"\n });\n }\n };\n InvalidHexBooleanError = class extends BaseError2 {\n constructor(hex) {\n super(`Hex value \"${hex}\" is not a valid boolean. The hex value must be \"0x0\" (false) or \"0x1\" (true).`, { name: \"InvalidHexBooleanError\" });\n }\n };\n SizeOverflowError = class extends BaseError2 {\n constructor({ givenSize, maxSize }) {\n super(`Size cannot exceed ${maxSize} bytes. Given size: ${givenSize} bytes.`, { name: \"SizeOverflowError\" });\n }\n };\n }\n });\n\n // ../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/utils/data/trim.js\n function trim(hexOrBytes, { dir = \"left\" } = {}) {\n let data = typeof hexOrBytes === \"string\" ? hexOrBytes.replace(\"0x\", \"\") : hexOrBytes;\n let sliceLength = 0;\n for (let i3 = 0; i3 < data.length - 1; i3++) {\n if (data[dir === \"left\" ? i3 : data.length - i3 - 1].toString() === \"0\")\n sliceLength++;\n else\n break;\n }\n data = dir === \"left\" ? data.slice(sliceLength) : data.slice(0, data.length - sliceLength);\n if (typeof hexOrBytes === \"string\") {\n if (data.length === 1 && dir === \"right\")\n data = `${data}0`;\n return `0x${data.length % 2 === 1 ? `0${data}` : data}`;\n }\n return data;\n }\n var init_trim = __esm({\n \"../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/utils/data/trim.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n }\n });\n\n // ../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/utils/encoding/fromHex.js\n function assertSize(hexOrBytes, { size: size6 }) {\n if (size(hexOrBytes) > size6)\n throw new SizeOverflowError({\n givenSize: size(hexOrBytes),\n maxSize: size6\n });\n }\n function fromHex(hex, toOrOpts) {\n const opts = typeof toOrOpts === \"string\" ? { to: toOrOpts } : toOrOpts;\n const to = opts.to;\n if (to === \"number\")\n return hexToNumber(hex, opts);\n if (to === \"bigint\")\n return hexToBigInt(hex, opts);\n if (to === \"string\")\n return hexToString(hex, opts);\n if (to === \"boolean\")\n return hexToBool(hex, opts);\n return hexToBytes(hex, opts);\n }\n function hexToBigInt(hex, opts = {}) {\n const { signed } = opts;\n if (opts.size)\n assertSize(hex, { size: opts.size });\n const value = BigInt(hex);\n if (!signed)\n return value;\n const size6 = (hex.length - 2) / 2;\n const max = (1n << BigInt(size6) * 8n - 1n) - 1n;\n if (value <= max)\n return value;\n return value - BigInt(`0x${\"f\".padStart(size6 * 2, \"f\")}`) - 1n;\n }\n function hexToBool(hex_, opts = {}) {\n let hex = hex_;\n if (opts.size) {\n assertSize(hex, { size: opts.size });\n hex = trim(hex);\n }\n if (trim(hex) === \"0x00\")\n return false;\n if (trim(hex) === \"0x01\")\n return true;\n throw new InvalidHexBooleanError(hex);\n }\n function hexToNumber(hex, opts = {}) {\n return Number(hexToBigInt(hex, opts));\n }\n function hexToString(hex, opts = {}) {\n let bytes = hexToBytes(hex);\n if (opts.size) {\n assertSize(bytes, { size: opts.size });\n bytes = trim(bytes, { dir: \"right\" });\n }\n return new TextDecoder().decode(bytes);\n }\n var init_fromHex = __esm({\n \"../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/utils/encoding/fromHex.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_encoding();\n init_size();\n init_trim();\n init_toBytes();\n }\n });\n\n // ../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/utils/encoding/toHex.js\n function toHex(value, opts = {}) {\n if (typeof value === \"number\" || typeof value === \"bigint\")\n return numberToHex(value, opts);\n if (typeof value === \"string\") {\n return stringToHex(value, opts);\n }\n if (typeof value === \"boolean\")\n return boolToHex(value, opts);\n return bytesToHex(value, opts);\n }\n function boolToHex(value, opts = {}) {\n const hex = `0x${Number(value)}`;\n if (typeof opts.size === \"number\") {\n assertSize(hex, { size: opts.size });\n return pad(hex, { size: opts.size });\n }\n return hex;\n }\n function bytesToHex(value, opts = {}) {\n let string2 = \"\";\n for (let i3 = 0; i3 < value.length; i3++) {\n string2 += hexes[value[i3]];\n }\n const hex = `0x${string2}`;\n if (typeof opts.size === \"number\") {\n assertSize(hex, { size: opts.size });\n return pad(hex, { dir: \"right\", size: opts.size });\n }\n return hex;\n }\n function numberToHex(value_, opts = {}) {\n const { signed, size: size6 } = opts;\n const value = BigInt(value_);\n let maxValue;\n if (size6) {\n if (signed)\n maxValue = (1n << BigInt(size6) * 8n - 1n) - 1n;\n else\n maxValue = 2n ** (BigInt(size6) * 8n) - 1n;\n } else if (typeof value_ === \"number\") {\n maxValue = BigInt(Number.MAX_SAFE_INTEGER);\n }\n const minValue2 = typeof maxValue === \"bigint\" && signed ? -maxValue - 1n : 0;\n if (maxValue && value > maxValue || value < minValue2) {\n const suffix = typeof value_ === \"bigint\" ? \"n\" : \"\";\n throw new IntegerOutOfRangeError({\n max: maxValue ? `${maxValue}${suffix}` : void 0,\n min: `${minValue2}${suffix}`,\n signed,\n size: size6,\n value: `${value_}${suffix}`\n });\n }\n const hex = `0x${(signed && value < 0 ? (1n << BigInt(size6 * 8)) + BigInt(value) : value).toString(16)}`;\n if (size6)\n return pad(hex, { size: size6 });\n return hex;\n }\n function stringToHex(value_, opts = {}) {\n const value = encoder.encode(value_);\n return bytesToHex(value, opts);\n }\n var hexes, encoder;\n var init_toHex = __esm({\n \"../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/utils/encoding/toHex.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_encoding();\n init_pad();\n init_fromHex();\n hexes = /* @__PURE__ */ Array.from({ length: 256 }, (_v, i3) => i3.toString(16).padStart(2, \"0\"));\n encoder = /* @__PURE__ */ new TextEncoder();\n }\n });\n\n // ../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/utils/encoding/toBytes.js\n function toBytes(value, opts = {}) {\n if (typeof value === \"number\" || typeof value === \"bigint\")\n return numberToBytes(value, opts);\n if (typeof value === \"boolean\")\n return boolToBytes(value, opts);\n if (isHex(value))\n return hexToBytes(value, opts);\n return stringToBytes(value, opts);\n }\n function boolToBytes(value, opts = {}) {\n const bytes = new Uint8Array(1);\n bytes[0] = Number(value);\n if (typeof opts.size === \"number\") {\n assertSize(bytes, { size: opts.size });\n return pad(bytes, { size: opts.size });\n }\n return bytes;\n }\n function charCodeToBase16(char) {\n if (char >= charCodeMap.zero && char <= charCodeMap.nine)\n return char - charCodeMap.zero;\n if (char >= charCodeMap.A && char <= charCodeMap.F)\n return char - (charCodeMap.A - 10);\n if (char >= charCodeMap.a && char <= charCodeMap.f)\n return char - (charCodeMap.a - 10);\n return void 0;\n }\n function hexToBytes(hex_, opts = {}) {\n let hex = hex_;\n if (opts.size) {\n assertSize(hex, { size: opts.size });\n hex = pad(hex, { dir: \"right\", size: opts.size });\n }\n let hexString = hex.slice(2);\n if (hexString.length % 2)\n hexString = `0${hexString}`;\n const length2 = hexString.length / 2;\n const bytes = new Uint8Array(length2);\n for (let index2 = 0, j2 = 0; index2 < length2; index2++) {\n const nibbleLeft = charCodeToBase16(hexString.charCodeAt(j2++));\n const nibbleRight = charCodeToBase16(hexString.charCodeAt(j2++));\n if (nibbleLeft === void 0 || nibbleRight === void 0) {\n throw new BaseError2(`Invalid byte sequence (\"${hexString[j2 - 2]}${hexString[j2 - 1]}\" in \"${hexString}\").`);\n }\n bytes[index2] = nibbleLeft * 16 + nibbleRight;\n }\n return bytes;\n }\n function numberToBytes(value, opts) {\n const hex = numberToHex(value, opts);\n return hexToBytes(hex);\n }\n function stringToBytes(value, opts = {}) {\n const bytes = encoder2.encode(value);\n if (typeof opts.size === \"number\") {\n assertSize(bytes, { size: opts.size });\n return pad(bytes, { dir: \"right\", size: opts.size });\n }\n return bytes;\n }\n var encoder2, charCodeMap;\n var init_toBytes = __esm({\n \"../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/utils/encoding/toBytes.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_base();\n init_isHex();\n init_pad();\n init_fromHex();\n init_toHex();\n encoder2 = /* @__PURE__ */ new TextEncoder();\n charCodeMap = {\n zero: 48,\n nine: 57,\n A: 65,\n F: 70,\n a: 97,\n f: 102\n };\n }\n });\n\n // ../../../node_modules/.pnpm/@noble+hashes@1.8.0/node_modules/@noble/hashes/esm/_u64.js\n function fromBig(n2, le = false) {\n if (le)\n return { h: Number(n2 & U32_MASK64), l: Number(n2 >> _32n & U32_MASK64) };\n return { h: Number(n2 >> _32n & U32_MASK64) | 0, l: Number(n2 & U32_MASK64) | 0 };\n }\n function split(lst, le = false) {\n const len = lst.length;\n let Ah = new Uint32Array(len);\n let Al = new Uint32Array(len);\n for (let i3 = 0; i3 < len; i3++) {\n const { h: h4, l: l6 } = fromBig(lst[i3], le);\n [Ah[i3], Al[i3]] = [h4, l6];\n }\n return [Ah, Al];\n }\n function add(Ah, Al, Bh, Bl) {\n const l6 = (Al >>> 0) + (Bl >>> 0);\n return { h: Ah + Bh + (l6 / 2 ** 32 | 0) | 0, l: l6 | 0 };\n }\n var U32_MASK64, _32n, shrSH, shrSL, rotrSH, rotrSL, rotrBH, rotrBL, rotlSH, rotlSL, rotlBH, rotlBL, add3L, add3H, add4L, add4H, add5L, add5H;\n var init_u64 = __esm({\n \"../../../node_modules/.pnpm/@noble+hashes@1.8.0/node_modules/@noble/hashes/esm/_u64.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n U32_MASK64 = /* @__PURE__ */ BigInt(2 ** 32 - 1);\n _32n = /* @__PURE__ */ BigInt(32);\n shrSH = (h4, _l, s4) => h4 >>> s4;\n shrSL = (h4, l6, s4) => h4 << 32 - s4 | l6 >>> s4;\n rotrSH = (h4, l6, s4) => h4 >>> s4 | l6 << 32 - s4;\n rotrSL = (h4, l6, s4) => h4 << 32 - s4 | l6 >>> s4;\n rotrBH = (h4, l6, s4) => h4 << 64 - s4 | l6 >>> s4 - 32;\n rotrBL = (h4, l6, s4) => h4 >>> s4 - 32 | l6 << 64 - s4;\n rotlSH = (h4, l6, s4) => h4 << s4 | l6 >>> 32 - s4;\n rotlSL = (h4, l6, s4) => l6 << s4 | h4 >>> 32 - s4;\n rotlBH = (h4, l6, s4) => l6 << s4 - 32 | h4 >>> 64 - s4;\n rotlBL = (h4, l6, s4) => h4 << s4 - 32 | l6 >>> 64 - s4;\n add3L = (Al, Bl, Cl) => (Al >>> 0) + (Bl >>> 0) + (Cl >>> 0);\n add3H = (low, Ah, Bh, Ch) => Ah + Bh + Ch + (low / 2 ** 32 | 0) | 0;\n add4L = (Al, Bl, Cl, Dl) => (Al >>> 0) + (Bl >>> 0) + (Cl >>> 0) + (Dl >>> 0);\n add4H = (low, Ah, Bh, Ch, Dh) => Ah + Bh + Ch + Dh + (low / 2 ** 32 | 0) | 0;\n add5L = (Al, Bl, Cl, Dl, El) => (Al >>> 0) + (Bl >>> 0) + (Cl >>> 0) + (Dl >>> 0) + (El >>> 0);\n add5H = (low, Ah, Bh, Ch, Dh, Eh) => Ah + Bh + Ch + Dh + Eh + (low / 2 ** 32 | 0) | 0;\n }\n });\n\n // ../../../node_modules/.pnpm/@noble+hashes@1.8.0/node_modules/@noble/hashes/esm/crypto.js\n var crypto2;\n var init_crypto = __esm({\n \"../../../node_modules/.pnpm/@noble+hashes@1.8.0/node_modules/@noble/hashes/esm/crypto.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n crypto2 = typeof globalThis === \"object\" && \"crypto\" in globalThis ? globalThis.crypto : void 0;\n }\n });\n\n // ../../../node_modules/.pnpm/@noble+hashes@1.8.0/node_modules/@noble/hashes/esm/utils.js\n function isBytes(a3) {\n return a3 instanceof Uint8Array || ArrayBuffer.isView(a3) && a3.constructor.name === \"Uint8Array\";\n }\n function anumber(n2) {\n if (!Number.isSafeInteger(n2) || n2 < 0)\n throw new Error(\"positive integer expected, got \" + n2);\n }\n function abytes(b4, ...lengths) {\n if (!isBytes(b4))\n throw new Error(\"Uint8Array expected\");\n if (lengths.length > 0 && !lengths.includes(b4.length))\n throw new Error(\"Uint8Array expected of length \" + lengths + \", got length=\" + b4.length);\n }\n function ahash(h4) {\n if (typeof h4 !== \"function\" || typeof h4.create !== \"function\")\n throw new Error(\"Hash should be wrapped by utils.createHasher\");\n anumber(h4.outputLen);\n anumber(h4.blockLen);\n }\n function aexists(instance, checkFinished = true) {\n if (instance.destroyed)\n throw new Error(\"Hash instance has been destroyed\");\n if (checkFinished && instance.finished)\n throw new Error(\"Hash#digest() has already been called\");\n }\n function aoutput(out, instance) {\n abytes(out);\n const min = instance.outputLen;\n if (out.length < min) {\n throw new Error(\"digestInto() expects output buffer of length at least \" + min);\n }\n }\n function u32(arr) {\n return new Uint32Array(arr.buffer, arr.byteOffset, Math.floor(arr.byteLength / 4));\n }\n function clean(...arrays) {\n for (let i3 = 0; i3 < arrays.length; i3++) {\n arrays[i3].fill(0);\n }\n }\n function createView(arr) {\n return new DataView(arr.buffer, arr.byteOffset, arr.byteLength);\n }\n function rotr(word, shift) {\n return word << 32 - shift | word >>> shift;\n }\n function rotl(word, shift) {\n return word << shift | word >>> 32 - shift >>> 0;\n }\n function byteSwap(word) {\n return word << 24 & 4278190080 | word << 8 & 16711680 | word >>> 8 & 65280 | word >>> 24 & 255;\n }\n function byteSwap32(arr) {\n for (let i3 = 0; i3 < arr.length; i3++) {\n arr[i3] = byteSwap(arr[i3]);\n }\n return arr;\n }\n function bytesToHex2(bytes) {\n abytes(bytes);\n if (hasHexBuiltin)\n return bytes.toHex();\n let hex = \"\";\n for (let i3 = 0; i3 < bytes.length; i3++) {\n hex += hexes2[bytes[i3]];\n }\n return hex;\n }\n function asciiToBase16(ch) {\n if (ch >= asciis._0 && ch <= asciis._9)\n return ch - asciis._0;\n if (ch >= asciis.A && ch <= asciis.F)\n return ch - (asciis.A - 10);\n if (ch >= asciis.a && ch <= asciis.f)\n return ch - (asciis.a - 10);\n return;\n }\n function hexToBytes2(hex) {\n if (typeof hex !== \"string\")\n throw new Error(\"hex string expected, got \" + typeof hex);\n if (hasHexBuiltin)\n return Uint8Array.fromHex(hex);\n const hl = hex.length;\n const al = hl / 2;\n if (hl % 2)\n throw new Error(\"hex string expected, got unpadded hex of length \" + hl);\n const array2 = new Uint8Array(al);\n for (let ai = 0, hi = 0; ai < al; ai++, hi += 2) {\n const n1 = asciiToBase16(hex.charCodeAt(hi));\n const n2 = asciiToBase16(hex.charCodeAt(hi + 1));\n if (n1 === void 0 || n2 === void 0) {\n const char = hex[hi] + hex[hi + 1];\n throw new Error('hex string expected, got non-hex character \"' + char + '\" at index ' + hi);\n }\n array2[ai] = n1 * 16 + n2;\n }\n return array2;\n }\n function utf8ToBytes(str) {\n if (typeof str !== \"string\")\n throw new Error(\"string expected\");\n return new Uint8Array(new TextEncoder().encode(str));\n }\n function toBytes2(data) {\n if (typeof data === \"string\")\n data = utf8ToBytes(data);\n abytes(data);\n return data;\n }\n function kdfInputToBytes(data) {\n if (typeof data === \"string\")\n data = utf8ToBytes(data);\n abytes(data);\n return data;\n }\n function concatBytes(...arrays) {\n let sum = 0;\n for (let i3 = 0; i3 < arrays.length; i3++) {\n const a3 = arrays[i3];\n abytes(a3);\n sum += a3.length;\n }\n const res = new Uint8Array(sum);\n for (let i3 = 0, pad6 = 0; i3 < arrays.length; i3++) {\n const a3 = arrays[i3];\n res.set(a3, pad6);\n pad6 += a3.length;\n }\n return res;\n }\n function checkOpts(defaults, opts) {\n if (opts !== void 0 && {}.toString.call(opts) !== \"[object Object]\")\n throw new Error(\"options should be object or undefined\");\n const merged = Object.assign(defaults, opts);\n return merged;\n }\n function createHasher(hashCons) {\n const hashC = (msg) => hashCons().update(toBytes2(msg)).digest();\n const tmp = hashCons();\n hashC.outputLen = tmp.outputLen;\n hashC.blockLen = tmp.blockLen;\n hashC.create = () => hashCons();\n return hashC;\n }\n function randomBytes(bytesLength = 32) {\n if (crypto2 && typeof crypto2.getRandomValues === \"function\") {\n return crypto2.getRandomValues(new Uint8Array(bytesLength));\n }\n if (crypto2 && typeof crypto2.randomBytes === \"function\") {\n return Uint8Array.from(crypto2.randomBytes(bytesLength));\n }\n throw new Error(\"crypto.getRandomValues must be defined\");\n }\n var isLE, swap32IfBE, hasHexBuiltin, hexes2, asciis, Hash;\n var init_utils3 = __esm({\n \"../../../node_modules/.pnpm/@noble+hashes@1.8.0/node_modules/@noble/hashes/esm/utils.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_crypto();\n isLE = /* @__PURE__ */ (() => new Uint8Array(new Uint32Array([287454020]).buffer)[0] === 68)();\n swap32IfBE = isLE ? (u2) => u2 : byteSwap32;\n hasHexBuiltin = /* @__PURE__ */ (() => (\n // @ts-ignore\n typeof Uint8Array.from([]).toHex === \"function\" && typeof Uint8Array.fromHex === \"function\"\n ))();\n hexes2 = /* @__PURE__ */ Array.from({ length: 256 }, (_2, i3) => i3.toString(16).padStart(2, \"0\"));\n asciis = { _0: 48, _9: 57, A: 65, F: 70, a: 97, f: 102 };\n Hash = class {\n };\n }\n });\n\n // ../../../node_modules/.pnpm/@noble+hashes@1.8.0/node_modules/@noble/hashes/esm/sha3.js\n function keccakP(s4, rounds = 24) {\n const B2 = new Uint32Array(5 * 2);\n for (let round = 24 - rounds; round < 24; round++) {\n for (let x4 = 0; x4 < 10; x4++)\n B2[x4] = s4[x4] ^ s4[x4 + 10] ^ s4[x4 + 20] ^ s4[x4 + 30] ^ s4[x4 + 40];\n for (let x4 = 0; x4 < 10; x4 += 2) {\n const idx1 = (x4 + 8) % 10;\n const idx0 = (x4 + 2) % 10;\n const B0 = B2[idx0];\n const B1 = B2[idx0 + 1];\n const Th = rotlH(B0, B1, 1) ^ B2[idx1];\n const Tl = rotlL(B0, B1, 1) ^ B2[idx1 + 1];\n for (let y6 = 0; y6 < 50; y6 += 10) {\n s4[x4 + y6] ^= Th;\n s4[x4 + y6 + 1] ^= Tl;\n }\n }\n let curH = s4[2];\n let curL = s4[3];\n for (let t3 = 0; t3 < 24; t3++) {\n const shift = SHA3_ROTL[t3];\n const Th = rotlH(curH, curL, shift);\n const Tl = rotlL(curH, curL, shift);\n const PI = SHA3_PI[t3];\n curH = s4[PI];\n curL = s4[PI + 1];\n s4[PI] = Th;\n s4[PI + 1] = Tl;\n }\n for (let y6 = 0; y6 < 50; y6 += 10) {\n for (let x4 = 0; x4 < 10; x4++)\n B2[x4] = s4[y6 + x4];\n for (let x4 = 0; x4 < 10; x4++)\n s4[y6 + x4] ^= ~B2[(x4 + 2) % 10] & B2[(x4 + 4) % 10];\n }\n s4[0] ^= SHA3_IOTA_H[round];\n s4[1] ^= SHA3_IOTA_L[round];\n }\n clean(B2);\n }\n var _0n, _1n, _2n, _7n, _256n, _0x71n, SHA3_PI, SHA3_ROTL, _SHA3_IOTA, IOTAS, SHA3_IOTA_H, SHA3_IOTA_L, rotlH, rotlL, Keccak, gen, keccak_256;\n var init_sha3 = __esm({\n \"../../../node_modules/.pnpm/@noble+hashes@1.8.0/node_modules/@noble/hashes/esm/sha3.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_u64();\n init_utils3();\n _0n = BigInt(0);\n _1n = BigInt(1);\n _2n = BigInt(2);\n _7n = BigInt(7);\n _256n = BigInt(256);\n _0x71n = BigInt(113);\n SHA3_PI = [];\n SHA3_ROTL = [];\n _SHA3_IOTA = [];\n for (let round = 0, R3 = _1n, x4 = 1, y6 = 0; round < 24; round++) {\n [x4, y6] = [y6, (2 * x4 + 3 * y6) % 5];\n SHA3_PI.push(2 * (5 * y6 + x4));\n SHA3_ROTL.push((round + 1) * (round + 2) / 2 % 64);\n let t3 = _0n;\n for (let j2 = 0; j2 < 7; j2++) {\n R3 = (R3 << _1n ^ (R3 >> _7n) * _0x71n) % _256n;\n if (R3 & _2n)\n t3 ^= _1n << (_1n << /* @__PURE__ */ BigInt(j2)) - _1n;\n }\n _SHA3_IOTA.push(t3);\n }\n IOTAS = split(_SHA3_IOTA, true);\n SHA3_IOTA_H = IOTAS[0];\n SHA3_IOTA_L = IOTAS[1];\n rotlH = (h4, l6, s4) => s4 > 32 ? rotlBH(h4, l6, s4) : rotlSH(h4, l6, s4);\n rotlL = (h4, l6, s4) => s4 > 32 ? rotlBL(h4, l6, s4) : rotlSL(h4, l6, s4);\n Keccak = class _Keccak extends Hash {\n // NOTE: we accept arguments in bytes instead of bits here.\n constructor(blockLen, suffix, outputLen, enableXOF = false, rounds = 24) {\n super();\n this.pos = 0;\n this.posOut = 0;\n this.finished = false;\n this.destroyed = false;\n this.enableXOF = false;\n this.blockLen = blockLen;\n this.suffix = suffix;\n this.outputLen = outputLen;\n this.enableXOF = enableXOF;\n this.rounds = rounds;\n anumber(outputLen);\n if (!(0 < blockLen && blockLen < 200))\n throw new Error(\"only keccak-f1600 function is supported\");\n this.state = new Uint8Array(200);\n this.state32 = u32(this.state);\n }\n clone() {\n return this._cloneInto();\n }\n keccak() {\n swap32IfBE(this.state32);\n keccakP(this.state32, this.rounds);\n swap32IfBE(this.state32);\n this.posOut = 0;\n this.pos = 0;\n }\n update(data) {\n aexists(this);\n data = toBytes2(data);\n abytes(data);\n const { blockLen, state } = this;\n const len = data.length;\n for (let pos = 0; pos < len; ) {\n const take = Math.min(blockLen - this.pos, len - pos);\n for (let i3 = 0; i3 < take; i3++)\n state[this.pos++] ^= data[pos++];\n if (this.pos === blockLen)\n this.keccak();\n }\n return this;\n }\n finish() {\n if (this.finished)\n return;\n this.finished = true;\n const { state, suffix, pos, blockLen } = this;\n state[pos] ^= suffix;\n if ((suffix & 128) !== 0 && pos === blockLen - 1)\n this.keccak();\n state[blockLen - 1] ^= 128;\n this.keccak();\n }\n writeInto(out) {\n aexists(this, false);\n abytes(out);\n this.finish();\n const bufferOut = this.state;\n const { blockLen } = this;\n for (let pos = 0, len = out.length; pos < len; ) {\n if (this.posOut >= blockLen)\n this.keccak();\n const take = Math.min(blockLen - this.posOut, len - pos);\n out.set(bufferOut.subarray(this.posOut, this.posOut + take), pos);\n this.posOut += take;\n pos += take;\n }\n return out;\n }\n xofInto(out) {\n if (!this.enableXOF)\n throw new Error(\"XOF is not possible for this instance\");\n return this.writeInto(out);\n }\n xof(bytes) {\n anumber(bytes);\n return this.xofInto(new Uint8Array(bytes));\n }\n digestInto(out) {\n aoutput(out, this);\n if (this.finished)\n throw new Error(\"digest() was already called\");\n this.writeInto(out);\n this.destroy();\n return out;\n }\n digest() {\n return this.digestInto(new Uint8Array(this.outputLen));\n }\n destroy() {\n this.destroyed = true;\n clean(this.state);\n }\n _cloneInto(to) {\n const { blockLen, suffix, outputLen, rounds, enableXOF } = this;\n to || (to = new _Keccak(blockLen, suffix, outputLen, enableXOF, rounds));\n to.state32.set(this.state32);\n to.pos = this.pos;\n to.posOut = this.posOut;\n to.finished = this.finished;\n to.rounds = rounds;\n to.suffix = suffix;\n to.outputLen = outputLen;\n to.enableXOF = enableXOF;\n to.destroyed = this.destroyed;\n return to;\n }\n };\n gen = (suffix, blockLen, outputLen) => createHasher(() => new Keccak(blockLen, suffix, outputLen));\n keccak_256 = /* @__PURE__ */ (() => gen(1, 136, 256 / 8))();\n }\n });\n\n // ../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/utils/hash/keccak256.js\n function keccak256(value, to_) {\n const to = to_ || \"hex\";\n const bytes = keccak_256(isHex(value, { strict: false }) ? toBytes(value) : value);\n if (to === \"bytes\")\n return bytes;\n return toHex(bytes);\n }\n var init_keccak256 = __esm({\n \"../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/utils/hash/keccak256.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_sha3();\n init_isHex();\n init_toBytes();\n init_toHex();\n }\n });\n\n // ../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/utils/hash/hashSignature.js\n function hashSignature(sig) {\n return hash(sig);\n }\n var hash;\n var init_hashSignature = __esm({\n \"../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/utils/hash/hashSignature.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_toBytes();\n init_keccak256();\n hash = (value) => keccak256(toBytes(value));\n }\n });\n\n // ../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/utils/hash/normalizeSignature.js\n function normalizeSignature(signature) {\n let active = true;\n let current = \"\";\n let level = 0;\n let result = \"\";\n let valid = false;\n for (let i3 = 0; i3 < signature.length; i3++) {\n const char = signature[i3];\n if ([\"(\", \")\", \",\"].includes(char))\n active = true;\n if (char === \"(\")\n level++;\n if (char === \")\")\n level--;\n if (!active)\n continue;\n if (level === 0) {\n if (char === \" \" && [\"event\", \"function\", \"\"].includes(result))\n result = \"\";\n else {\n result += char;\n if (char === \")\") {\n valid = true;\n break;\n }\n }\n continue;\n }\n if (char === \" \") {\n if (signature[i3 - 1] !== \",\" && current !== \",\" && current !== \",(\") {\n current = \"\";\n active = false;\n }\n continue;\n }\n result += char;\n current += char;\n }\n if (!valid)\n throw new BaseError2(\"Unable to normalize signature.\");\n return result;\n }\n var init_normalizeSignature = __esm({\n \"../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/utils/hash/normalizeSignature.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_base();\n }\n });\n\n // ../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/utils/hash/toSignature.js\n var toSignature;\n var init_toSignature = __esm({\n \"../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/utils/hash/toSignature.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_exports();\n init_normalizeSignature();\n toSignature = (def) => {\n const def_ = (() => {\n if (typeof def === \"string\")\n return def;\n return formatAbiItem(def);\n })();\n return normalizeSignature(def_);\n };\n }\n });\n\n // ../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/utils/hash/toSignatureHash.js\n function toSignatureHash(fn) {\n return hashSignature(toSignature(fn));\n }\n var init_toSignatureHash = __esm({\n \"../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/utils/hash/toSignatureHash.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_hashSignature();\n init_toSignature();\n }\n });\n\n // ../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/utils/hash/toEventSelector.js\n var toEventSelector;\n var init_toEventSelector = __esm({\n \"../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/utils/hash/toEventSelector.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_toSignatureHash();\n toEventSelector = toSignatureHash;\n }\n });\n\n // ../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/errors/address.js\n var InvalidAddressError;\n var init_address = __esm({\n \"../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/errors/address.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_base();\n InvalidAddressError = class extends BaseError2 {\n constructor({ address }) {\n super(`Address \"${address}\" is invalid.`, {\n metaMessages: [\n \"- Address must be a hex value of 20 bytes (40 hex characters).\",\n \"- Address must match its checksum counterpart.\"\n ],\n name: \"InvalidAddressError\"\n });\n }\n };\n }\n });\n\n // ../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/utils/lru.js\n var LruMap;\n var init_lru = __esm({\n \"../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/utils/lru.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n LruMap = class extends Map {\n constructor(size6) {\n super();\n Object.defineProperty(this, \"maxSize\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: void 0\n });\n this.maxSize = size6;\n }\n get(key) {\n const value = super.get(key);\n if (super.has(key) && value !== void 0) {\n this.delete(key);\n super.set(key, value);\n }\n return value;\n }\n set(key, value) {\n super.set(key, value);\n if (this.maxSize && this.size > this.maxSize) {\n const firstKey = this.keys().next().value;\n if (firstKey)\n this.delete(firstKey);\n }\n return this;\n }\n };\n }\n });\n\n // ../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/utils/address/getAddress.js\n function checksumAddress(address_, chainId) {\n if (checksumAddressCache.has(`${address_}.${chainId}`))\n return checksumAddressCache.get(`${address_}.${chainId}`);\n const hexAddress = chainId ? `${chainId}${address_.toLowerCase()}` : address_.substring(2).toLowerCase();\n const hash3 = keccak256(stringToBytes(hexAddress), \"bytes\");\n const address = (chainId ? hexAddress.substring(`${chainId}0x`.length) : hexAddress).split(\"\");\n for (let i3 = 0; i3 < 40; i3 += 2) {\n if (hash3[i3 >> 1] >> 4 >= 8 && address[i3]) {\n address[i3] = address[i3].toUpperCase();\n }\n if ((hash3[i3 >> 1] & 15) >= 8 && address[i3 + 1]) {\n address[i3 + 1] = address[i3 + 1].toUpperCase();\n }\n }\n const result = `0x${address.join(\"\")}`;\n checksumAddressCache.set(`${address_}.${chainId}`, result);\n return result;\n }\n function getAddress(address, chainId) {\n if (!isAddress(address, { strict: false }))\n throw new InvalidAddressError({ address });\n return checksumAddress(address, chainId);\n }\n var checksumAddressCache;\n var init_getAddress = __esm({\n \"../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/utils/address/getAddress.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_address();\n init_toBytes();\n init_keccak256();\n init_lru();\n init_isAddress();\n checksumAddressCache = /* @__PURE__ */ new LruMap(8192);\n }\n });\n\n // ../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/utils/address/isAddress.js\n function isAddress(address, options) {\n const { strict = true } = options ?? {};\n const cacheKey2 = `${address}.${strict}`;\n if (isAddressCache.has(cacheKey2))\n return isAddressCache.get(cacheKey2);\n const result = (() => {\n if (!addressRegex.test(address))\n return false;\n if (address.toLowerCase() === address)\n return true;\n if (strict)\n return checksumAddress(address) === address;\n return true;\n })();\n isAddressCache.set(cacheKey2, result);\n return result;\n }\n var addressRegex, isAddressCache;\n var init_isAddress = __esm({\n \"../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/utils/address/isAddress.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_lru();\n init_getAddress();\n addressRegex = /^0x[a-fA-F0-9]{40}$/;\n isAddressCache = /* @__PURE__ */ new LruMap(8192);\n }\n });\n\n // ../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/utils/data/concat.js\n function concat(values) {\n if (typeof values[0] === \"string\")\n return concatHex(values);\n return concatBytes2(values);\n }\n function concatBytes2(values) {\n let length2 = 0;\n for (const arr of values) {\n length2 += arr.length;\n }\n const result = new Uint8Array(length2);\n let offset = 0;\n for (const arr of values) {\n result.set(arr, offset);\n offset += arr.length;\n }\n return result;\n }\n function concatHex(values) {\n return `0x${values.reduce((acc, x4) => acc + x4.replace(\"0x\", \"\"), \"\")}`;\n }\n var init_concat = __esm({\n \"../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/utils/data/concat.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n }\n });\n\n // ../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/utils/data/slice.js\n function slice(value, start, end, { strict } = {}) {\n if (isHex(value, { strict: false }))\n return sliceHex(value, start, end, {\n strict\n });\n return sliceBytes(value, start, end, {\n strict\n });\n }\n function assertStartOffset(value, start) {\n if (typeof start === \"number\" && start > 0 && start > size(value) - 1)\n throw new SliceOffsetOutOfBoundsError({\n offset: start,\n position: \"start\",\n size: size(value)\n });\n }\n function assertEndOffset(value, start, end) {\n if (typeof start === \"number\" && typeof end === \"number\" && size(value) !== end - start) {\n throw new SliceOffsetOutOfBoundsError({\n offset: end,\n position: \"end\",\n size: size(value)\n });\n }\n }\n function sliceBytes(value_, start, end, { strict } = {}) {\n assertStartOffset(value_, start);\n const value = value_.slice(start, end);\n if (strict)\n assertEndOffset(value, start, end);\n return value;\n }\n function sliceHex(value_, start, end, { strict } = {}) {\n assertStartOffset(value_, start);\n const value = `0x${value_.replace(\"0x\", \"\").slice((start ?? 0) * 2, (end ?? value_.length) * 2)}`;\n if (strict)\n assertEndOffset(value, start, end);\n return value;\n }\n var init_slice = __esm({\n \"../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/utils/data/slice.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_data();\n init_isHex();\n init_size();\n }\n });\n\n // ../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/utils/regex.js\n var arrayRegex, bytesRegex2, integerRegex2;\n var init_regex2 = __esm({\n \"../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/utils/regex.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n arrayRegex = /^(.*)\\[([0-9]*)\\]$/;\n bytesRegex2 = /^bytes([1-9]|1[0-9]|2[0-9]|3[0-2])?$/;\n integerRegex2 = /^(u?int)(8|16|24|32|40|48|56|64|72|80|88|96|104|112|120|128|136|144|152|160|168|176|184|192|200|208|216|224|232|240|248|256)?$/;\n }\n });\n\n // ../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/utils/abi/encodeAbiParameters.js\n function encodeAbiParameters(params, values) {\n if (params.length !== values.length)\n throw new AbiEncodingLengthMismatchError({\n expectedLength: params.length,\n givenLength: values.length\n });\n const preparedParams = prepareParams({\n params,\n values\n });\n const data = encodeParams(preparedParams);\n if (data.length === 0)\n return \"0x\";\n return data;\n }\n function prepareParams({ params, values }) {\n const preparedParams = [];\n for (let i3 = 0; i3 < params.length; i3++) {\n preparedParams.push(prepareParam({ param: params[i3], value: values[i3] }));\n }\n return preparedParams;\n }\n function prepareParam({ param, value }) {\n const arrayComponents = getArrayComponents(param.type);\n if (arrayComponents) {\n const [length2, type] = arrayComponents;\n return encodeArray(value, { length: length2, param: { ...param, type } });\n }\n if (param.type === \"tuple\") {\n return encodeTuple(value, {\n param\n });\n }\n if (param.type === \"address\") {\n return encodeAddress(value);\n }\n if (param.type === \"bool\") {\n return encodeBool(value);\n }\n if (param.type.startsWith(\"uint\") || param.type.startsWith(\"int\")) {\n const signed = param.type.startsWith(\"int\");\n const [, , size6 = \"256\"] = integerRegex2.exec(param.type) ?? [];\n return encodeNumber(value, {\n signed,\n size: Number(size6)\n });\n }\n if (param.type.startsWith(\"bytes\")) {\n return encodeBytes(value, { param });\n }\n if (param.type === \"string\") {\n return encodeString(value);\n }\n throw new InvalidAbiEncodingTypeError(param.type, {\n docsPath: \"/docs/contract/encodeAbiParameters\"\n });\n }\n function encodeParams(preparedParams) {\n let staticSize = 0;\n for (let i3 = 0; i3 < preparedParams.length; i3++) {\n const { dynamic, encoded } = preparedParams[i3];\n if (dynamic)\n staticSize += 32;\n else\n staticSize += size(encoded);\n }\n const staticParams = [];\n const dynamicParams = [];\n let dynamicSize = 0;\n for (let i3 = 0; i3 < preparedParams.length; i3++) {\n const { dynamic, encoded } = preparedParams[i3];\n if (dynamic) {\n staticParams.push(numberToHex(staticSize + dynamicSize, { size: 32 }));\n dynamicParams.push(encoded);\n dynamicSize += size(encoded);\n } else {\n staticParams.push(encoded);\n }\n }\n return concat([...staticParams, ...dynamicParams]);\n }\n function encodeAddress(value) {\n if (!isAddress(value))\n throw new InvalidAddressError({ address: value });\n return { dynamic: false, encoded: padHex(value.toLowerCase()) };\n }\n function encodeArray(value, { length: length2, param }) {\n const dynamic = length2 === null;\n if (!Array.isArray(value))\n throw new InvalidArrayError(value);\n if (!dynamic && value.length !== length2)\n throw new AbiEncodingArrayLengthMismatchError({\n expectedLength: length2,\n givenLength: value.length,\n type: `${param.type}[${length2}]`\n });\n let dynamicChild = false;\n const preparedParams = [];\n for (let i3 = 0; i3 < value.length; i3++) {\n const preparedParam = prepareParam({ param, value: value[i3] });\n if (preparedParam.dynamic)\n dynamicChild = true;\n preparedParams.push(preparedParam);\n }\n if (dynamic || dynamicChild) {\n const data = encodeParams(preparedParams);\n if (dynamic) {\n const length3 = numberToHex(preparedParams.length, { size: 32 });\n return {\n dynamic: true,\n encoded: preparedParams.length > 0 ? concat([length3, data]) : length3\n };\n }\n if (dynamicChild)\n return { dynamic: true, encoded: data };\n }\n return {\n dynamic: false,\n encoded: concat(preparedParams.map(({ encoded }) => encoded))\n };\n }\n function encodeBytes(value, { param }) {\n const [, paramSize] = param.type.split(\"bytes\");\n const bytesSize = size(value);\n if (!paramSize) {\n let value_ = value;\n if (bytesSize % 32 !== 0)\n value_ = padHex(value_, {\n dir: \"right\",\n size: Math.ceil((value.length - 2) / 2 / 32) * 32\n });\n return {\n dynamic: true,\n encoded: concat([padHex(numberToHex(bytesSize, { size: 32 })), value_])\n };\n }\n if (bytesSize !== Number.parseInt(paramSize, 10))\n throw new AbiEncodingBytesSizeMismatchError({\n expectedSize: Number.parseInt(paramSize, 10),\n value\n });\n return { dynamic: false, encoded: padHex(value, { dir: \"right\" }) };\n }\n function encodeBool(value) {\n if (typeof value !== \"boolean\")\n throw new BaseError2(`Invalid boolean value: \"${value}\" (type: ${typeof value}). Expected: \\`true\\` or \\`false\\`.`);\n return { dynamic: false, encoded: padHex(boolToHex(value)) };\n }\n function encodeNumber(value, { signed, size: size6 = 256 }) {\n if (typeof size6 === \"number\") {\n const max = 2n ** (BigInt(size6) - (signed ? 1n : 0n)) - 1n;\n const min = signed ? -max - 1n : 0n;\n if (value > max || value < min)\n throw new IntegerOutOfRangeError({\n max: max.toString(),\n min: min.toString(),\n signed,\n size: size6 / 8,\n value: value.toString()\n });\n }\n return {\n dynamic: false,\n encoded: numberToHex(value, {\n size: 32,\n signed\n })\n };\n }\n function encodeString(value) {\n const hexValue = stringToHex(value);\n const partsLength = Math.ceil(size(hexValue) / 32);\n const parts = [];\n for (let i3 = 0; i3 < partsLength; i3++) {\n parts.push(padHex(slice(hexValue, i3 * 32, (i3 + 1) * 32), {\n dir: \"right\"\n }));\n }\n return {\n dynamic: true,\n encoded: concat([\n padHex(numberToHex(size(hexValue), { size: 32 })),\n ...parts\n ])\n };\n }\n function encodeTuple(value, { param }) {\n let dynamic = false;\n const preparedParams = [];\n for (let i3 = 0; i3 < param.components.length; i3++) {\n const param_ = param.components[i3];\n const index2 = Array.isArray(value) ? i3 : param_.name;\n const preparedParam = prepareParam({\n param: param_,\n value: value[index2]\n });\n preparedParams.push(preparedParam);\n if (preparedParam.dynamic)\n dynamic = true;\n }\n return {\n dynamic,\n encoded: dynamic ? encodeParams(preparedParams) : concat(preparedParams.map(({ encoded }) => encoded))\n };\n }\n function getArrayComponents(type) {\n const matches = type.match(/^(.*)\\[(\\d+)?\\]$/);\n return matches ? (\n // Return `null` if the array is dynamic.\n [matches[2] ? Number(matches[2]) : null, matches[1]]\n ) : void 0;\n }\n var init_encodeAbiParameters = __esm({\n \"../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/utils/abi/encodeAbiParameters.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_abi();\n init_address();\n init_base();\n init_encoding();\n init_isAddress();\n init_concat();\n init_pad();\n init_size();\n init_slice();\n init_toHex();\n init_regex2();\n }\n });\n\n // ../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/utils/hash/toFunctionSelector.js\n var toFunctionSelector;\n var init_toFunctionSelector = __esm({\n \"../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/utils/hash/toFunctionSelector.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_slice();\n init_toSignatureHash();\n toFunctionSelector = (fn) => slice(toSignatureHash(fn), 0, 4);\n }\n });\n\n // ../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/utils/abi/getAbiItem.js\n function getAbiItem(parameters) {\n const { abi: abi2, args = [], name } = parameters;\n const isSelector = isHex(name, { strict: false });\n const abiItems = abi2.filter((abiItem) => {\n if (isSelector) {\n if (abiItem.type === \"function\")\n return toFunctionSelector(abiItem) === name;\n if (abiItem.type === \"event\")\n return toEventSelector(abiItem) === name;\n return false;\n }\n return \"name\" in abiItem && abiItem.name === name;\n });\n if (abiItems.length === 0)\n return void 0;\n if (abiItems.length === 1)\n return abiItems[0];\n let matchedAbiItem;\n for (const abiItem of abiItems) {\n if (!(\"inputs\" in abiItem))\n continue;\n if (!args || args.length === 0) {\n if (!abiItem.inputs || abiItem.inputs.length === 0)\n return abiItem;\n continue;\n }\n if (!abiItem.inputs)\n continue;\n if (abiItem.inputs.length === 0)\n continue;\n if (abiItem.inputs.length !== args.length)\n continue;\n const matched = args.every((arg, index2) => {\n const abiParameter = \"inputs\" in abiItem && abiItem.inputs[index2];\n if (!abiParameter)\n return false;\n return isArgOfType(arg, abiParameter);\n });\n if (matched) {\n if (matchedAbiItem && \"inputs\" in matchedAbiItem && matchedAbiItem.inputs) {\n const ambiguousTypes = getAmbiguousTypes(abiItem.inputs, matchedAbiItem.inputs, args);\n if (ambiguousTypes)\n throw new AbiItemAmbiguityError({\n abiItem,\n type: ambiguousTypes[0]\n }, {\n abiItem: matchedAbiItem,\n type: ambiguousTypes[1]\n });\n }\n matchedAbiItem = abiItem;\n }\n }\n if (matchedAbiItem)\n return matchedAbiItem;\n return abiItems[0];\n }\n function isArgOfType(arg, abiParameter) {\n const argType = typeof arg;\n const abiParameterType = abiParameter.type;\n switch (abiParameterType) {\n case \"address\":\n return isAddress(arg, { strict: false });\n case \"bool\":\n return argType === \"boolean\";\n case \"function\":\n return argType === \"string\";\n case \"string\":\n return argType === \"string\";\n default: {\n if (abiParameterType === \"tuple\" && \"components\" in abiParameter)\n return Object.values(abiParameter.components).every((component, index2) => {\n return isArgOfType(Object.values(arg)[index2], component);\n });\n if (/^u?int(8|16|24|32|40|48|56|64|72|80|88|96|104|112|120|128|136|144|152|160|168|176|184|192|200|208|216|224|232|240|248|256)?$/.test(abiParameterType))\n return argType === \"number\" || argType === \"bigint\";\n if (/^bytes([1-9]|1[0-9]|2[0-9]|3[0-2])?$/.test(abiParameterType))\n return argType === \"string\" || arg instanceof Uint8Array;\n if (/[a-z]+[1-9]{0,3}(\\[[0-9]{0,}\\])+$/.test(abiParameterType)) {\n return Array.isArray(arg) && arg.every((x4) => isArgOfType(x4, {\n ...abiParameter,\n // Pop off `[]` or `[M]` from end of type\n type: abiParameterType.replace(/(\\[[0-9]{0,}\\])$/, \"\")\n }));\n }\n return false;\n }\n }\n }\n function getAmbiguousTypes(sourceParameters, targetParameters, args) {\n for (const parameterIndex in sourceParameters) {\n const sourceParameter = sourceParameters[parameterIndex];\n const targetParameter = targetParameters[parameterIndex];\n if (sourceParameter.type === \"tuple\" && targetParameter.type === \"tuple\" && \"components\" in sourceParameter && \"components\" in targetParameter)\n return getAmbiguousTypes(sourceParameter.components, targetParameter.components, args[parameterIndex]);\n const types = [sourceParameter.type, targetParameter.type];\n const ambiguous = (() => {\n if (types.includes(\"address\") && types.includes(\"bytes20\"))\n return true;\n if (types.includes(\"address\") && types.includes(\"string\"))\n return isAddress(args[parameterIndex], { strict: false });\n if (types.includes(\"address\") && types.includes(\"bytes\"))\n return isAddress(args[parameterIndex], { strict: false });\n return false;\n })();\n if (ambiguous)\n return types;\n }\n return;\n }\n var init_getAbiItem = __esm({\n \"../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/utils/abi/getAbiItem.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_abi();\n init_isHex();\n init_isAddress();\n init_toEventSelector();\n init_toFunctionSelector();\n }\n });\n\n // ../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/utils/abi/encodeEventTopics.js\n function encodeEventTopics(parameters) {\n const { abi: abi2, eventName, args } = parameters;\n let abiItem = abi2[0];\n if (eventName) {\n const item = getAbiItem({ abi: abi2, name: eventName });\n if (!item)\n throw new AbiEventNotFoundError(eventName, { docsPath });\n abiItem = item;\n }\n if (abiItem.type !== \"event\")\n throw new AbiEventNotFoundError(void 0, { docsPath });\n const definition = formatAbiItem2(abiItem);\n const signature = toEventSelector(definition);\n let topics = [];\n if (args && \"inputs\" in abiItem) {\n const indexedInputs = abiItem.inputs?.filter((param) => \"indexed\" in param && param.indexed);\n const args_ = Array.isArray(args) ? args : Object.values(args).length > 0 ? indexedInputs?.map((x4) => args[x4.name]) ?? [] : [];\n if (args_.length > 0) {\n topics = indexedInputs?.map((param, i3) => {\n if (Array.isArray(args_[i3]))\n return args_[i3].map((_2, j2) => encodeArg({ param, value: args_[i3][j2] }));\n return typeof args_[i3] !== \"undefined\" && args_[i3] !== null ? encodeArg({ param, value: args_[i3] }) : null;\n }) ?? [];\n }\n }\n return [signature, ...topics];\n }\n function encodeArg({ param, value }) {\n if (param.type === \"string\" || param.type === \"bytes\")\n return keccak256(toBytes(value));\n if (param.type === \"tuple\" || param.type.match(/^(.*)\\[(\\d+)?\\]$/))\n throw new FilterTypeNotSupportedError(param.type);\n return encodeAbiParameters([param], [value]);\n }\n var docsPath;\n var init_encodeEventTopics = __esm({\n \"../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/utils/abi/encodeEventTopics.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_abi();\n init_log();\n init_toBytes();\n init_keccak256();\n init_toEventSelector();\n init_encodeAbiParameters();\n init_formatAbiItem2();\n init_getAbiItem();\n docsPath = \"/docs/contract/encodeEventTopics\";\n }\n });\n\n // ../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/utils/filters/createFilterRequestScope.js\n function createFilterRequestScope(client, { method }) {\n const requestMap = {};\n if (client.transport.type === \"fallback\")\n client.transport.onResponse?.(({ method: method_, response: id, status, transport }) => {\n if (status === \"success\" && method === method_)\n requestMap[id] = transport.request;\n });\n return (id) => requestMap[id] || client.request;\n }\n var init_createFilterRequestScope = __esm({\n \"../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/utils/filters/createFilterRequestScope.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n }\n });\n\n // ../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/actions/public/createContractEventFilter.js\n async function createContractEventFilter(client, parameters) {\n const { address, abi: abi2, args, eventName, fromBlock, strict, toBlock } = parameters;\n const getRequest = createFilterRequestScope(client, {\n method: \"eth_newFilter\"\n });\n const topics = eventName ? encodeEventTopics({\n abi: abi2,\n args,\n eventName\n }) : void 0;\n const id = await client.request({\n method: \"eth_newFilter\",\n params: [\n {\n address,\n fromBlock: typeof fromBlock === \"bigint\" ? numberToHex(fromBlock) : fromBlock,\n toBlock: typeof toBlock === \"bigint\" ? numberToHex(toBlock) : toBlock,\n topics\n }\n ]\n });\n return {\n abi: abi2,\n args,\n eventName,\n id,\n request: getRequest(id),\n strict: Boolean(strict),\n type: \"event\"\n };\n }\n var init_createContractEventFilter = __esm({\n \"../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/actions/public/createContractEventFilter.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_encodeEventTopics();\n init_toHex();\n init_createFilterRequestScope();\n }\n });\n\n // ../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/accounts/utils/parseAccount.js\n function parseAccount(account) {\n if (typeof account === \"string\")\n return { address: account, type: \"json-rpc\" };\n return account;\n }\n var init_parseAccount = __esm({\n \"../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/accounts/utils/parseAccount.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n }\n });\n\n // ../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/utils/abi/prepareEncodeFunctionData.js\n function prepareEncodeFunctionData(parameters) {\n const { abi: abi2, args, functionName } = parameters;\n let abiItem = abi2[0];\n if (functionName) {\n const item = getAbiItem({\n abi: abi2,\n args,\n name: functionName\n });\n if (!item)\n throw new AbiFunctionNotFoundError(functionName, { docsPath: docsPath2 });\n abiItem = item;\n }\n if (abiItem.type !== \"function\")\n throw new AbiFunctionNotFoundError(void 0, { docsPath: docsPath2 });\n return {\n abi: [abiItem],\n functionName: toFunctionSelector(formatAbiItem2(abiItem))\n };\n }\n var docsPath2;\n var init_prepareEncodeFunctionData = __esm({\n \"../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/utils/abi/prepareEncodeFunctionData.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_abi();\n init_toFunctionSelector();\n init_formatAbiItem2();\n init_getAbiItem();\n docsPath2 = \"/docs/contract/encodeFunctionData\";\n }\n });\n\n // ../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/utils/abi/encodeFunctionData.js\n function encodeFunctionData(parameters) {\n const { args } = parameters;\n const { abi: abi2, functionName } = (() => {\n if (parameters.abi.length === 1 && parameters.functionName?.startsWith(\"0x\"))\n return parameters;\n return prepareEncodeFunctionData(parameters);\n })();\n const abiItem = abi2[0];\n const signature = functionName;\n const data = \"inputs\" in abiItem && abiItem.inputs ? encodeAbiParameters(abiItem.inputs, args ?? []) : void 0;\n return concatHex([signature, data ?? \"0x\"]);\n }\n var init_encodeFunctionData = __esm({\n \"../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/utils/abi/encodeFunctionData.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_concat();\n init_encodeAbiParameters();\n init_prepareEncodeFunctionData();\n }\n });\n\n // ../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/constants/solidity.js\n var panicReasons, solidityError, solidityPanic;\n var init_solidity = __esm({\n \"../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/constants/solidity.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n panicReasons = {\n 1: \"An `assert` condition failed.\",\n 17: \"Arithmetic operation resulted in underflow or overflow.\",\n 18: \"Division or modulo by zero (e.g. `5 / 0` or `23 % 0`).\",\n 33: \"Attempted to convert to an invalid type.\",\n 34: \"Attempted to access a storage byte array that is incorrectly encoded.\",\n 49: \"Performed `.pop()` on an empty array\",\n 50: \"Array index is out of bounds.\",\n 65: \"Allocated too much memory or created an array which is too large.\",\n 81: \"Attempted to call a zero-initialized variable of internal function type.\"\n };\n solidityError = {\n inputs: [\n {\n name: \"message\",\n type: \"string\"\n }\n ],\n name: \"Error\",\n type: \"error\"\n };\n solidityPanic = {\n inputs: [\n {\n name: \"reason\",\n type: \"uint256\"\n }\n ],\n name: \"Panic\",\n type: \"error\"\n };\n }\n });\n\n // ../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/errors/cursor.js\n var NegativeOffsetError, PositionOutOfBoundsError, RecursiveReadLimitExceededError;\n var init_cursor = __esm({\n \"../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/errors/cursor.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_base();\n NegativeOffsetError = class extends BaseError2 {\n constructor({ offset }) {\n super(`Offset \\`${offset}\\` cannot be negative.`, {\n name: \"NegativeOffsetError\"\n });\n }\n };\n PositionOutOfBoundsError = class extends BaseError2 {\n constructor({ length: length2, position }) {\n super(`Position \\`${position}\\` is out of bounds (\\`0 < position < ${length2}\\`).`, { name: \"PositionOutOfBoundsError\" });\n }\n };\n RecursiveReadLimitExceededError = class extends BaseError2 {\n constructor({ count, limit }) {\n super(`Recursive read limit of \\`${limit}\\` exceeded (recursive read count: \\`${count}\\`).`, { name: \"RecursiveReadLimitExceededError\" });\n }\n };\n }\n });\n\n // ../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/utils/cursor.js\n function createCursor(bytes, { recursiveReadLimit = 8192 } = {}) {\n const cursor = Object.create(staticCursor);\n cursor.bytes = bytes;\n cursor.dataView = new DataView(bytes.buffer, bytes.byteOffset, bytes.byteLength);\n cursor.positionReadCount = /* @__PURE__ */ new Map();\n cursor.recursiveReadLimit = recursiveReadLimit;\n return cursor;\n }\n var staticCursor;\n var init_cursor2 = __esm({\n \"../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/utils/cursor.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_cursor();\n staticCursor = {\n bytes: new Uint8Array(),\n dataView: new DataView(new ArrayBuffer(0)),\n position: 0,\n positionReadCount: /* @__PURE__ */ new Map(),\n recursiveReadCount: 0,\n recursiveReadLimit: Number.POSITIVE_INFINITY,\n assertReadLimit() {\n if (this.recursiveReadCount >= this.recursiveReadLimit)\n throw new RecursiveReadLimitExceededError({\n count: this.recursiveReadCount + 1,\n limit: this.recursiveReadLimit\n });\n },\n assertPosition(position) {\n if (position < 0 || position > this.bytes.length - 1)\n throw new PositionOutOfBoundsError({\n length: this.bytes.length,\n position\n });\n },\n decrementPosition(offset) {\n if (offset < 0)\n throw new NegativeOffsetError({ offset });\n const position = this.position - offset;\n this.assertPosition(position);\n this.position = position;\n },\n getReadCount(position) {\n return this.positionReadCount.get(position || this.position) || 0;\n },\n incrementPosition(offset) {\n if (offset < 0)\n throw new NegativeOffsetError({ offset });\n const position = this.position + offset;\n this.assertPosition(position);\n this.position = position;\n },\n inspectByte(position_) {\n const position = position_ ?? this.position;\n this.assertPosition(position);\n return this.bytes[position];\n },\n inspectBytes(length2, position_) {\n const position = position_ ?? this.position;\n this.assertPosition(position + length2 - 1);\n return this.bytes.subarray(position, position + length2);\n },\n inspectUint8(position_) {\n const position = position_ ?? this.position;\n this.assertPosition(position);\n return this.bytes[position];\n },\n inspectUint16(position_) {\n const position = position_ ?? this.position;\n this.assertPosition(position + 1);\n return this.dataView.getUint16(position);\n },\n inspectUint24(position_) {\n const position = position_ ?? this.position;\n this.assertPosition(position + 2);\n return (this.dataView.getUint16(position) << 8) + this.dataView.getUint8(position + 2);\n },\n inspectUint32(position_) {\n const position = position_ ?? this.position;\n this.assertPosition(position + 3);\n return this.dataView.getUint32(position);\n },\n pushByte(byte) {\n this.assertPosition(this.position);\n this.bytes[this.position] = byte;\n this.position++;\n },\n pushBytes(bytes) {\n this.assertPosition(this.position + bytes.length - 1);\n this.bytes.set(bytes, this.position);\n this.position += bytes.length;\n },\n pushUint8(value) {\n this.assertPosition(this.position);\n this.bytes[this.position] = value;\n this.position++;\n },\n pushUint16(value) {\n this.assertPosition(this.position + 1);\n this.dataView.setUint16(this.position, value);\n this.position += 2;\n },\n pushUint24(value) {\n this.assertPosition(this.position + 2);\n this.dataView.setUint16(this.position, value >> 8);\n this.dataView.setUint8(this.position + 2, value & ~4294967040);\n this.position += 3;\n },\n pushUint32(value) {\n this.assertPosition(this.position + 3);\n this.dataView.setUint32(this.position, value);\n this.position += 4;\n },\n readByte() {\n this.assertReadLimit();\n this._touch();\n const value = this.inspectByte();\n this.position++;\n return value;\n },\n readBytes(length2, size6) {\n this.assertReadLimit();\n this._touch();\n const value = this.inspectBytes(length2);\n this.position += size6 ?? length2;\n return value;\n },\n readUint8() {\n this.assertReadLimit();\n this._touch();\n const value = this.inspectUint8();\n this.position += 1;\n return value;\n },\n readUint16() {\n this.assertReadLimit();\n this._touch();\n const value = this.inspectUint16();\n this.position += 2;\n return value;\n },\n readUint24() {\n this.assertReadLimit();\n this._touch();\n const value = this.inspectUint24();\n this.position += 3;\n return value;\n },\n readUint32() {\n this.assertReadLimit();\n this._touch();\n const value = this.inspectUint32();\n this.position += 4;\n return value;\n },\n get remaining() {\n return this.bytes.length - this.position;\n },\n setPosition(position) {\n const oldPosition = this.position;\n this.assertPosition(position);\n this.position = position;\n return () => this.position = oldPosition;\n },\n _touch() {\n if (this.recursiveReadLimit === Number.POSITIVE_INFINITY)\n return;\n const count = this.getReadCount();\n this.positionReadCount.set(this.position, count + 1);\n if (count > 0)\n this.recursiveReadCount++;\n }\n };\n }\n });\n\n // ../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/utils/encoding/fromBytes.js\n function bytesToBigInt(bytes, opts = {}) {\n if (typeof opts.size !== \"undefined\")\n assertSize(bytes, { size: opts.size });\n const hex = bytesToHex(bytes, opts);\n return hexToBigInt(hex, opts);\n }\n function bytesToBool(bytes_, opts = {}) {\n let bytes = bytes_;\n if (typeof opts.size !== \"undefined\") {\n assertSize(bytes, { size: opts.size });\n bytes = trim(bytes);\n }\n if (bytes.length > 1 || bytes[0] > 1)\n throw new InvalidBytesBooleanError(bytes);\n return Boolean(bytes[0]);\n }\n function bytesToNumber(bytes, opts = {}) {\n if (typeof opts.size !== \"undefined\")\n assertSize(bytes, { size: opts.size });\n const hex = bytesToHex(bytes, opts);\n return hexToNumber(hex, opts);\n }\n function bytesToString(bytes_, opts = {}) {\n let bytes = bytes_;\n if (typeof opts.size !== \"undefined\") {\n assertSize(bytes, { size: opts.size });\n bytes = trim(bytes, { dir: \"right\" });\n }\n return new TextDecoder().decode(bytes);\n }\n var init_fromBytes = __esm({\n \"../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/utils/encoding/fromBytes.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_encoding();\n init_trim();\n init_fromHex();\n init_toHex();\n }\n });\n\n // ../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/utils/abi/decodeAbiParameters.js\n function decodeAbiParameters(params, data) {\n const bytes = typeof data === \"string\" ? hexToBytes(data) : data;\n const cursor = createCursor(bytes);\n if (size(bytes) === 0 && params.length > 0)\n throw new AbiDecodingZeroDataError();\n if (size(data) && size(data) < 32)\n throw new AbiDecodingDataSizeTooSmallError({\n data: typeof data === \"string\" ? data : bytesToHex(data),\n params,\n size: size(data)\n });\n let consumed = 0;\n const values = [];\n for (let i3 = 0; i3 < params.length; ++i3) {\n const param = params[i3];\n cursor.setPosition(consumed);\n const [data2, consumed_] = decodeParameter(cursor, param, {\n staticPosition: 0\n });\n consumed += consumed_;\n values.push(data2);\n }\n return values;\n }\n function decodeParameter(cursor, param, { staticPosition }) {\n const arrayComponents = getArrayComponents(param.type);\n if (arrayComponents) {\n const [length2, type] = arrayComponents;\n return decodeArray(cursor, { ...param, type }, { length: length2, staticPosition });\n }\n if (param.type === \"tuple\")\n return decodeTuple(cursor, param, { staticPosition });\n if (param.type === \"address\")\n return decodeAddress(cursor);\n if (param.type === \"bool\")\n return decodeBool(cursor);\n if (param.type.startsWith(\"bytes\"))\n return decodeBytes(cursor, param, { staticPosition });\n if (param.type.startsWith(\"uint\") || param.type.startsWith(\"int\"))\n return decodeNumber(cursor, param);\n if (param.type === \"string\")\n return decodeString(cursor, { staticPosition });\n throw new InvalidAbiDecodingTypeError(param.type, {\n docsPath: \"/docs/contract/decodeAbiParameters\"\n });\n }\n function decodeAddress(cursor) {\n const value = cursor.readBytes(32);\n return [checksumAddress(bytesToHex(sliceBytes(value, -20))), 32];\n }\n function decodeArray(cursor, param, { length: length2, staticPosition }) {\n if (!length2) {\n const offset = bytesToNumber(cursor.readBytes(sizeOfOffset));\n const start = staticPosition + offset;\n const startOfData = start + sizeOfLength;\n cursor.setPosition(start);\n const length3 = bytesToNumber(cursor.readBytes(sizeOfLength));\n const dynamicChild = hasDynamicChild(param);\n let consumed2 = 0;\n const value2 = [];\n for (let i3 = 0; i3 < length3; ++i3) {\n cursor.setPosition(startOfData + (dynamicChild ? i3 * 32 : consumed2));\n const [data, consumed_] = decodeParameter(cursor, param, {\n staticPosition: startOfData\n });\n consumed2 += consumed_;\n value2.push(data);\n }\n cursor.setPosition(staticPosition + 32);\n return [value2, 32];\n }\n if (hasDynamicChild(param)) {\n const offset = bytesToNumber(cursor.readBytes(sizeOfOffset));\n const start = staticPosition + offset;\n const value2 = [];\n for (let i3 = 0; i3 < length2; ++i3) {\n cursor.setPosition(start + i3 * 32);\n const [data] = decodeParameter(cursor, param, {\n staticPosition: start\n });\n value2.push(data);\n }\n cursor.setPosition(staticPosition + 32);\n return [value2, 32];\n }\n let consumed = 0;\n const value = [];\n for (let i3 = 0; i3 < length2; ++i3) {\n const [data, consumed_] = decodeParameter(cursor, param, {\n staticPosition: staticPosition + consumed\n });\n consumed += consumed_;\n value.push(data);\n }\n return [value, consumed];\n }\n function decodeBool(cursor) {\n return [bytesToBool(cursor.readBytes(32), { size: 32 }), 32];\n }\n function decodeBytes(cursor, param, { staticPosition }) {\n const [_2, size6] = param.type.split(\"bytes\");\n if (!size6) {\n const offset = bytesToNumber(cursor.readBytes(32));\n cursor.setPosition(staticPosition + offset);\n const length2 = bytesToNumber(cursor.readBytes(32));\n if (length2 === 0) {\n cursor.setPosition(staticPosition + 32);\n return [\"0x\", 32];\n }\n const data = cursor.readBytes(length2);\n cursor.setPosition(staticPosition + 32);\n return [bytesToHex(data), 32];\n }\n const value = bytesToHex(cursor.readBytes(Number.parseInt(size6, 10), 32));\n return [value, 32];\n }\n function decodeNumber(cursor, param) {\n const signed = param.type.startsWith(\"int\");\n const size6 = Number.parseInt(param.type.split(\"int\")[1] || \"256\", 10);\n const value = cursor.readBytes(32);\n return [\n size6 > 48 ? bytesToBigInt(value, { signed }) : bytesToNumber(value, { signed }),\n 32\n ];\n }\n function decodeTuple(cursor, param, { staticPosition }) {\n const hasUnnamedChild = param.components.length === 0 || param.components.some(({ name }) => !name);\n const value = hasUnnamedChild ? [] : {};\n let consumed = 0;\n if (hasDynamicChild(param)) {\n const offset = bytesToNumber(cursor.readBytes(sizeOfOffset));\n const start = staticPosition + offset;\n for (let i3 = 0; i3 < param.components.length; ++i3) {\n const component = param.components[i3];\n cursor.setPosition(start + consumed);\n const [data, consumed_] = decodeParameter(cursor, component, {\n staticPosition: start\n });\n consumed += consumed_;\n value[hasUnnamedChild ? i3 : component?.name] = data;\n }\n cursor.setPosition(staticPosition + 32);\n return [value, 32];\n }\n for (let i3 = 0; i3 < param.components.length; ++i3) {\n const component = param.components[i3];\n const [data, consumed_] = decodeParameter(cursor, component, {\n staticPosition\n });\n value[hasUnnamedChild ? i3 : component?.name] = data;\n consumed += consumed_;\n }\n return [value, consumed];\n }\n function decodeString(cursor, { staticPosition }) {\n const offset = bytesToNumber(cursor.readBytes(32));\n const start = staticPosition + offset;\n cursor.setPosition(start);\n const length2 = bytesToNumber(cursor.readBytes(32));\n if (length2 === 0) {\n cursor.setPosition(staticPosition + 32);\n return [\"\", 32];\n }\n const data = cursor.readBytes(length2, 32);\n const value = bytesToString(trim(data));\n cursor.setPosition(staticPosition + 32);\n return [value, 32];\n }\n function hasDynamicChild(param) {\n const { type } = param;\n if (type === \"string\")\n return true;\n if (type === \"bytes\")\n return true;\n if (type.endsWith(\"[]\"))\n return true;\n if (type === \"tuple\")\n return param.components?.some(hasDynamicChild);\n const arrayComponents = getArrayComponents(param.type);\n if (arrayComponents && hasDynamicChild({ ...param, type: arrayComponents[1] }))\n return true;\n return false;\n }\n var sizeOfLength, sizeOfOffset;\n var init_decodeAbiParameters = __esm({\n \"../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/utils/abi/decodeAbiParameters.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_abi();\n init_getAddress();\n init_cursor2();\n init_size();\n init_slice();\n init_trim();\n init_fromBytes();\n init_toBytes();\n init_toHex();\n init_encodeAbiParameters();\n sizeOfLength = 32;\n sizeOfOffset = 32;\n }\n });\n\n // ../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/utils/abi/decodeErrorResult.js\n function decodeErrorResult(parameters) {\n const { abi: abi2, data } = parameters;\n const signature = slice(data, 0, 4);\n if (signature === \"0x\")\n throw new AbiDecodingZeroDataError();\n const abi_ = [...abi2 || [], solidityError, solidityPanic];\n const abiItem = abi_.find((x4) => x4.type === \"error\" && signature === toFunctionSelector(formatAbiItem2(x4)));\n if (!abiItem)\n throw new AbiErrorSignatureNotFoundError(signature, {\n docsPath: \"/docs/contract/decodeErrorResult\"\n });\n return {\n abiItem,\n args: \"inputs\" in abiItem && abiItem.inputs && abiItem.inputs.length > 0 ? decodeAbiParameters(abiItem.inputs, slice(data, 4)) : void 0,\n errorName: abiItem.name\n };\n }\n var init_decodeErrorResult = __esm({\n \"../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/utils/abi/decodeErrorResult.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_solidity();\n init_abi();\n init_slice();\n init_toFunctionSelector();\n init_decodeAbiParameters();\n init_formatAbiItem2();\n }\n });\n\n // ../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/utils/stringify.js\n var stringify;\n var init_stringify = __esm({\n \"../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/utils/stringify.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n stringify = (value, replacer, space) => JSON.stringify(value, (key, value_) => {\n const value2 = typeof value_ === \"bigint\" ? value_.toString() : value_;\n return typeof replacer === \"function\" ? replacer(key, value2) : value2;\n }, space);\n }\n });\n\n // ../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/utils/abi/formatAbiItemWithArgs.js\n function formatAbiItemWithArgs({ abiItem, args, includeFunctionName = true, includeName = false }) {\n if (!(\"name\" in abiItem))\n return;\n if (!(\"inputs\" in abiItem))\n return;\n if (!abiItem.inputs)\n return;\n return `${includeFunctionName ? abiItem.name : \"\"}(${abiItem.inputs.map((input, i3) => `${includeName && input.name ? `${input.name}: ` : \"\"}${typeof args[i3] === \"object\" ? stringify(args[i3]) : args[i3]}`).join(\", \")})`;\n }\n var init_formatAbiItemWithArgs = __esm({\n \"../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/utils/abi/formatAbiItemWithArgs.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_stringify();\n }\n });\n\n // ../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/constants/unit.js\n var etherUnits, gweiUnits;\n var init_unit = __esm({\n \"../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/constants/unit.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n etherUnits = {\n gwei: 9,\n wei: 18\n };\n gweiUnits = {\n ether: -9,\n wei: 9\n };\n }\n });\n\n // ../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/utils/unit/formatUnits.js\n function formatUnits(value, decimals) {\n let display = value.toString();\n const negative = display.startsWith(\"-\");\n if (negative)\n display = display.slice(1);\n display = display.padStart(decimals, \"0\");\n let [integer2, fraction] = [\n display.slice(0, display.length - decimals),\n display.slice(display.length - decimals)\n ];\n fraction = fraction.replace(/(0+)$/, \"\");\n return `${negative ? \"-\" : \"\"}${integer2 || \"0\"}${fraction ? `.${fraction}` : \"\"}`;\n }\n var init_formatUnits = __esm({\n \"../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/utils/unit/formatUnits.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n }\n });\n\n // ../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/utils/unit/formatEther.js\n function formatEther(wei, unit = \"wei\") {\n return formatUnits(wei, etherUnits[unit]);\n }\n var init_formatEther = __esm({\n \"../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/utils/unit/formatEther.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_unit();\n init_formatUnits();\n }\n });\n\n // ../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/utils/unit/formatGwei.js\n function formatGwei(wei, unit = \"wei\") {\n return formatUnits(wei, gweiUnits[unit]);\n }\n var init_formatGwei = __esm({\n \"../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/utils/unit/formatGwei.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_unit();\n init_formatUnits();\n }\n });\n\n // ../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/errors/stateOverride.js\n function prettyStateMapping(stateMapping) {\n return stateMapping.reduce((pretty, { slot, value }) => {\n return `${pretty} ${slot}: ${value}\n`;\n }, \"\");\n }\n function prettyStateOverride(stateOverride) {\n return stateOverride.reduce((pretty, { address, ...state }) => {\n let val = `${pretty} ${address}:\n`;\n if (state.nonce)\n val += ` nonce: ${state.nonce}\n`;\n if (state.balance)\n val += ` balance: ${state.balance}\n`;\n if (state.code)\n val += ` code: ${state.code}\n`;\n if (state.state) {\n val += \" state:\\n\";\n val += prettyStateMapping(state.state);\n }\n if (state.stateDiff) {\n val += \" stateDiff:\\n\";\n val += prettyStateMapping(state.stateDiff);\n }\n return val;\n }, \" State Override:\\n\").slice(0, -1);\n }\n var AccountStateConflictError, StateAssignmentConflictError;\n var init_stateOverride = __esm({\n \"../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/errors/stateOverride.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_base();\n AccountStateConflictError = class extends BaseError2 {\n constructor({ address }) {\n super(`State for account \"${address}\" is set multiple times.`, {\n name: \"AccountStateConflictError\"\n });\n }\n };\n StateAssignmentConflictError = class extends BaseError2 {\n constructor() {\n super(\"state and stateDiff are set on the same account.\", {\n name: \"StateAssignmentConflictError\"\n });\n }\n };\n }\n });\n\n // ../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/errors/transaction.js\n function prettyPrint(args) {\n const entries = Object.entries(args).map(([key, value]) => {\n if (value === void 0 || value === false)\n return null;\n return [key, value];\n }).filter(Boolean);\n const maxLength = entries.reduce((acc, [key]) => Math.max(acc, key.length), 0);\n return entries.map(([key, value]) => ` ${`${key}:`.padEnd(maxLength + 1)} ${value}`).join(\"\\n\");\n }\n var FeeConflictError, InvalidLegacyVError, InvalidSerializableTransactionError, InvalidStorageKeySizeError, TransactionExecutionError, TransactionNotFoundError, TransactionReceiptNotFoundError, TransactionReceiptRevertedError, WaitForTransactionReceiptTimeoutError;\n var init_transaction = __esm({\n \"../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/errors/transaction.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_formatEther();\n init_formatGwei();\n init_base();\n FeeConflictError = class extends BaseError2 {\n constructor() {\n super([\n \"Cannot specify both a `gasPrice` and a `maxFeePerGas`/`maxPriorityFeePerGas`.\",\n \"Use `maxFeePerGas`/`maxPriorityFeePerGas` for EIP-1559 compatible networks, and `gasPrice` for others.\"\n ].join(\"\\n\"), { name: \"FeeConflictError\" });\n }\n };\n InvalidLegacyVError = class extends BaseError2 {\n constructor({ v: v2 }) {\n super(`Invalid \\`v\\` value \"${v2}\". Expected 27 or 28.`, {\n name: \"InvalidLegacyVError\"\n });\n }\n };\n InvalidSerializableTransactionError = class extends BaseError2 {\n constructor({ transaction }) {\n super(\"Cannot infer a transaction type from provided transaction.\", {\n metaMessages: [\n \"Provided Transaction:\",\n \"{\",\n prettyPrint(transaction),\n \"}\",\n \"\",\n \"To infer the type, either provide:\",\n \"- a `type` to the Transaction, or\",\n \"- an EIP-1559 Transaction with `maxFeePerGas`, or\",\n \"- an EIP-2930 Transaction with `gasPrice` & `accessList`, or\",\n \"- an EIP-4844 Transaction with `blobs`, `blobVersionedHashes`, `sidecars`, or\",\n \"- an EIP-7702 Transaction with `authorizationList`, or\",\n \"- a Legacy Transaction with `gasPrice`\"\n ],\n name: \"InvalidSerializableTransactionError\"\n });\n }\n };\n InvalidStorageKeySizeError = class extends BaseError2 {\n constructor({ storageKey }) {\n super(`Size for storage key \"${storageKey}\" is invalid. Expected 32 bytes. Got ${Math.floor((storageKey.length - 2) / 2)} bytes.`, { name: \"InvalidStorageKeySizeError\" });\n }\n };\n TransactionExecutionError = class extends BaseError2 {\n constructor(cause, { account, docsPath: docsPath8, chain: chain2, data, gas, gasPrice, maxFeePerGas, maxPriorityFeePerGas, nonce, to, value }) {\n const prettyArgs = prettyPrint({\n chain: chain2 && `${chain2?.name} (id: ${chain2?.id})`,\n from: account?.address,\n to,\n value: typeof value !== \"undefined\" && `${formatEther(value)} ${chain2?.nativeCurrency?.symbol || \"ETH\"}`,\n data,\n gas,\n gasPrice: typeof gasPrice !== \"undefined\" && `${formatGwei(gasPrice)} gwei`,\n maxFeePerGas: typeof maxFeePerGas !== \"undefined\" && `${formatGwei(maxFeePerGas)} gwei`,\n maxPriorityFeePerGas: typeof maxPriorityFeePerGas !== \"undefined\" && `${formatGwei(maxPriorityFeePerGas)} gwei`,\n nonce\n });\n super(cause.shortMessage, {\n cause,\n docsPath: docsPath8,\n metaMessages: [\n ...cause.metaMessages ? [...cause.metaMessages, \" \"] : [],\n \"Request Arguments:\",\n prettyArgs\n ].filter(Boolean),\n name: \"TransactionExecutionError\"\n });\n Object.defineProperty(this, \"cause\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: void 0\n });\n this.cause = cause;\n }\n };\n TransactionNotFoundError = class extends BaseError2 {\n constructor({ blockHash, blockNumber, blockTag, hash: hash3, index: index2 }) {\n let identifier = \"Transaction\";\n if (blockTag && index2 !== void 0)\n identifier = `Transaction at block time \"${blockTag}\" at index \"${index2}\"`;\n if (blockHash && index2 !== void 0)\n identifier = `Transaction at block hash \"${blockHash}\" at index \"${index2}\"`;\n if (blockNumber && index2 !== void 0)\n identifier = `Transaction at block number \"${blockNumber}\" at index \"${index2}\"`;\n if (hash3)\n identifier = `Transaction with hash \"${hash3}\"`;\n super(`${identifier} could not be found.`, {\n name: \"TransactionNotFoundError\"\n });\n }\n };\n TransactionReceiptNotFoundError = class extends BaseError2 {\n constructor({ hash: hash3 }) {\n super(`Transaction receipt with hash \"${hash3}\" could not be found. The Transaction may not be processed on a block yet.`, {\n name: \"TransactionReceiptNotFoundError\"\n });\n }\n };\n TransactionReceiptRevertedError = class extends BaseError2 {\n constructor({ receipt }) {\n super(`Transaction with hash \"${receipt.transactionHash}\" reverted.`, {\n metaMessages: [\n 'The receipt marked the transaction as \"reverted\". This could mean that the function on the contract you are trying to call threw an error.',\n \" \",\n \"You can attempt to extract the revert reason by:\",\n \"- calling the `simulateContract` or `simulateCalls` Action with the `abi` and `functionName` of the contract\",\n \"- using the `call` Action with raw `data`\"\n ],\n name: \"TransactionReceiptRevertedError\"\n });\n Object.defineProperty(this, \"receipt\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: void 0\n });\n this.receipt = receipt;\n }\n };\n WaitForTransactionReceiptTimeoutError = class extends BaseError2 {\n constructor({ hash: hash3 }) {\n super(`Timed out while waiting for transaction with hash \"${hash3}\" to be confirmed.`, { name: \"WaitForTransactionReceiptTimeoutError\" });\n }\n };\n }\n });\n\n // ../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/errors/utils.js\n var getContractAddress, getUrl;\n var init_utils4 = __esm({\n \"../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/errors/utils.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n getContractAddress = (address) => address;\n getUrl = (url) => url;\n }\n });\n\n // ../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/errors/contract.js\n var CallExecutionError, ContractFunctionExecutionError, ContractFunctionRevertedError, ContractFunctionZeroDataError, CounterfactualDeploymentFailedError, RawContractError;\n var init_contract = __esm({\n \"../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/errors/contract.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_parseAccount();\n init_solidity();\n init_decodeErrorResult();\n init_formatAbiItem2();\n init_formatAbiItemWithArgs();\n init_getAbiItem();\n init_formatEther();\n init_formatGwei();\n init_abi();\n init_base();\n init_stateOverride();\n init_transaction();\n init_utils4();\n CallExecutionError = class extends BaseError2 {\n constructor(cause, { account: account_, docsPath: docsPath8, chain: chain2, data, gas, gasPrice, maxFeePerGas, maxPriorityFeePerGas, nonce, to, value, stateOverride }) {\n const account = account_ ? parseAccount(account_) : void 0;\n let prettyArgs = prettyPrint({\n from: account?.address,\n to,\n value: typeof value !== \"undefined\" && `${formatEther(value)} ${chain2?.nativeCurrency?.symbol || \"ETH\"}`,\n data,\n gas,\n gasPrice: typeof gasPrice !== \"undefined\" && `${formatGwei(gasPrice)} gwei`,\n maxFeePerGas: typeof maxFeePerGas !== \"undefined\" && `${formatGwei(maxFeePerGas)} gwei`,\n maxPriorityFeePerGas: typeof maxPriorityFeePerGas !== \"undefined\" && `${formatGwei(maxPriorityFeePerGas)} gwei`,\n nonce\n });\n if (stateOverride) {\n prettyArgs += `\n${prettyStateOverride(stateOverride)}`;\n }\n super(cause.shortMessage, {\n cause,\n docsPath: docsPath8,\n metaMessages: [\n ...cause.metaMessages ? [...cause.metaMessages, \" \"] : [],\n \"Raw Call Arguments:\",\n prettyArgs\n ].filter(Boolean),\n name: \"CallExecutionError\"\n });\n Object.defineProperty(this, \"cause\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: void 0\n });\n this.cause = cause;\n }\n };\n ContractFunctionExecutionError = class extends BaseError2 {\n constructor(cause, { abi: abi2, args, contractAddress, docsPath: docsPath8, functionName, sender }) {\n const abiItem = getAbiItem({ abi: abi2, args, name: functionName });\n const formattedArgs = abiItem ? formatAbiItemWithArgs({\n abiItem,\n args,\n includeFunctionName: false,\n includeName: false\n }) : void 0;\n const functionWithParams = abiItem ? formatAbiItem2(abiItem, { includeName: true }) : void 0;\n const prettyArgs = prettyPrint({\n address: contractAddress && getContractAddress(contractAddress),\n function: functionWithParams,\n args: formattedArgs && formattedArgs !== \"()\" && `${[...Array(functionName?.length ?? 0).keys()].map(() => \" \").join(\"\")}${formattedArgs}`,\n sender\n });\n super(cause.shortMessage || `An unknown error occurred while executing the contract function \"${functionName}\".`, {\n cause,\n docsPath: docsPath8,\n metaMessages: [\n ...cause.metaMessages ? [...cause.metaMessages, \" \"] : [],\n prettyArgs && \"Contract Call:\",\n prettyArgs\n ].filter(Boolean),\n name: \"ContractFunctionExecutionError\"\n });\n Object.defineProperty(this, \"abi\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: void 0\n });\n Object.defineProperty(this, \"args\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: void 0\n });\n Object.defineProperty(this, \"cause\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: void 0\n });\n Object.defineProperty(this, \"contractAddress\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: void 0\n });\n Object.defineProperty(this, \"formattedArgs\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: void 0\n });\n Object.defineProperty(this, \"functionName\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: void 0\n });\n Object.defineProperty(this, \"sender\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: void 0\n });\n this.abi = abi2;\n this.args = args;\n this.cause = cause;\n this.contractAddress = contractAddress;\n this.functionName = functionName;\n this.sender = sender;\n }\n };\n ContractFunctionRevertedError = class extends BaseError2 {\n constructor({ abi: abi2, data, functionName, message }) {\n let cause;\n let decodedData;\n let metaMessages;\n let reason;\n if (data && data !== \"0x\") {\n try {\n decodedData = decodeErrorResult({ abi: abi2, data });\n const { abiItem, errorName, args: errorArgs } = decodedData;\n if (errorName === \"Error\") {\n reason = errorArgs[0];\n } else if (errorName === \"Panic\") {\n const [firstArg] = errorArgs;\n reason = panicReasons[firstArg];\n } else {\n const errorWithParams = abiItem ? formatAbiItem2(abiItem, { includeName: true }) : void 0;\n const formattedArgs = abiItem && errorArgs ? formatAbiItemWithArgs({\n abiItem,\n args: errorArgs,\n includeFunctionName: false,\n includeName: false\n }) : void 0;\n metaMessages = [\n errorWithParams ? `Error: ${errorWithParams}` : \"\",\n formattedArgs && formattedArgs !== \"()\" ? ` ${[...Array(errorName?.length ?? 0).keys()].map(() => \" \").join(\"\")}${formattedArgs}` : \"\"\n ];\n }\n } catch (err) {\n cause = err;\n }\n } else if (message)\n reason = message;\n let signature;\n if (cause instanceof AbiErrorSignatureNotFoundError) {\n signature = cause.signature;\n metaMessages = [\n `Unable to decode signature \"${signature}\" as it was not found on the provided ABI.`,\n \"Make sure you are using the correct ABI and that the error exists on it.\",\n `You can look up the decoded signature here: https://openchain.xyz/signatures?query=${signature}.`\n ];\n }\n super(reason && reason !== \"execution reverted\" || signature ? [\n `The contract function \"${functionName}\" reverted with the following ${signature ? \"signature\" : \"reason\"}:`,\n reason || signature\n ].join(\"\\n\") : `The contract function \"${functionName}\" reverted.`, {\n cause,\n metaMessages,\n name: \"ContractFunctionRevertedError\"\n });\n Object.defineProperty(this, \"data\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: void 0\n });\n Object.defineProperty(this, \"raw\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: void 0\n });\n Object.defineProperty(this, \"reason\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: void 0\n });\n Object.defineProperty(this, \"signature\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: void 0\n });\n this.data = decodedData;\n this.raw = data;\n this.reason = reason;\n this.signature = signature;\n }\n };\n ContractFunctionZeroDataError = class extends BaseError2 {\n constructor({ functionName }) {\n super(`The contract function \"${functionName}\" returned no data (\"0x\").`, {\n metaMessages: [\n \"This could be due to any of the following:\",\n ` - The contract does not have the function \"${functionName}\",`,\n \" - The parameters passed to the contract function may be invalid, or\",\n \" - The address is not a contract.\"\n ],\n name: \"ContractFunctionZeroDataError\"\n });\n }\n };\n CounterfactualDeploymentFailedError = class extends BaseError2 {\n constructor({ factory }) {\n super(`Deployment for counterfactual contract call failed${factory ? ` for factory \"${factory}\".` : \"\"}`, {\n metaMessages: [\n \"Please ensure:\",\n \"- The `factory` is a valid contract deployment factory (ie. Create2 Factory, ERC-4337 Factory, etc).\",\n \"- The `factoryData` is a valid encoded function call for contract deployment function on the factory.\"\n ],\n name: \"CounterfactualDeploymentFailedError\"\n });\n }\n };\n RawContractError = class extends BaseError2 {\n constructor({ data, message }) {\n super(message || \"\", { name: \"RawContractError\" });\n Object.defineProperty(this, \"code\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: 3\n });\n Object.defineProperty(this, \"data\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: void 0\n });\n this.data = data;\n }\n };\n }\n });\n\n // ../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/errors/request.js\n var HttpRequestError, RpcRequestError, TimeoutError;\n var init_request = __esm({\n \"../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/errors/request.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_stringify();\n init_base();\n init_utils4();\n HttpRequestError = class extends BaseError2 {\n constructor({ body, cause, details, headers, status, url }) {\n super(\"HTTP request failed.\", {\n cause,\n details,\n metaMessages: [\n status && `Status: ${status}`,\n `URL: ${getUrl(url)}`,\n body && `Request body: ${stringify(body)}`\n ].filter(Boolean),\n name: \"HttpRequestError\"\n });\n Object.defineProperty(this, \"body\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: void 0\n });\n Object.defineProperty(this, \"headers\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: void 0\n });\n Object.defineProperty(this, \"status\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: void 0\n });\n Object.defineProperty(this, \"url\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: void 0\n });\n this.body = body;\n this.headers = headers;\n this.status = status;\n this.url = url;\n }\n };\n RpcRequestError = class extends BaseError2 {\n constructor({ body, error, url }) {\n super(\"RPC Request failed.\", {\n cause: error,\n details: error.message,\n metaMessages: [`URL: ${getUrl(url)}`, `Request body: ${stringify(body)}`],\n name: \"RpcRequestError\"\n });\n Object.defineProperty(this, \"code\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: void 0\n });\n Object.defineProperty(this, \"data\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: void 0\n });\n this.code = error.code;\n this.data = error.data;\n }\n };\n TimeoutError = class extends BaseError2 {\n constructor({ body, url }) {\n super(\"The request took too long to respond.\", {\n details: \"The request timed out.\",\n metaMessages: [`URL: ${getUrl(url)}`, `Request body: ${stringify(body)}`],\n name: \"TimeoutError\"\n });\n }\n };\n }\n });\n\n // ../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/errors/rpc.js\n var unknownErrorCode, RpcError, ProviderRpcError, ParseRpcError, InvalidRequestRpcError, MethodNotFoundRpcError, InvalidParamsRpcError, InternalRpcError, InvalidInputRpcError, ResourceNotFoundRpcError, ResourceUnavailableRpcError, TransactionRejectedRpcError, MethodNotSupportedRpcError, LimitExceededRpcError, JsonRpcVersionUnsupportedError, UserRejectedRequestError, UnauthorizedProviderError, UnsupportedProviderMethodError, ProviderDisconnectedError, ChainDisconnectedError, SwitchChainError, UnsupportedNonOptionalCapabilityError, UnsupportedChainIdError, DuplicateIdError, UnknownBundleIdError, BundleTooLargeError, AtomicReadyWalletRejectedUpgradeError, AtomicityNotSupportedError, UnknownRpcError;\n var init_rpc = __esm({\n \"../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/errors/rpc.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_base();\n init_request();\n unknownErrorCode = -1;\n RpcError = class extends BaseError2 {\n constructor(cause, { code, docsPath: docsPath8, metaMessages, name, shortMessage }) {\n super(shortMessage, {\n cause,\n docsPath: docsPath8,\n metaMessages: metaMessages || cause?.metaMessages,\n name: name || \"RpcError\"\n });\n Object.defineProperty(this, \"code\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: void 0\n });\n this.name = name || cause.name;\n this.code = cause instanceof RpcRequestError ? cause.code : code ?? unknownErrorCode;\n }\n };\n ProviderRpcError = class extends RpcError {\n constructor(cause, options) {\n super(cause, options);\n Object.defineProperty(this, \"data\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: void 0\n });\n this.data = options.data;\n }\n };\n ParseRpcError = class _ParseRpcError extends RpcError {\n constructor(cause) {\n super(cause, {\n code: _ParseRpcError.code,\n name: \"ParseRpcError\",\n shortMessage: \"Invalid JSON was received by the server. An error occurred on the server while parsing the JSON text.\"\n });\n }\n };\n Object.defineProperty(ParseRpcError, \"code\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: -32700\n });\n InvalidRequestRpcError = class _InvalidRequestRpcError extends RpcError {\n constructor(cause) {\n super(cause, {\n code: _InvalidRequestRpcError.code,\n name: \"InvalidRequestRpcError\",\n shortMessage: \"JSON is not a valid request object.\"\n });\n }\n };\n Object.defineProperty(InvalidRequestRpcError, \"code\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: -32600\n });\n MethodNotFoundRpcError = class _MethodNotFoundRpcError extends RpcError {\n constructor(cause, { method } = {}) {\n super(cause, {\n code: _MethodNotFoundRpcError.code,\n name: \"MethodNotFoundRpcError\",\n shortMessage: `The method${method ? ` \"${method}\"` : \"\"} does not exist / is not available.`\n });\n }\n };\n Object.defineProperty(MethodNotFoundRpcError, \"code\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: -32601\n });\n InvalidParamsRpcError = class _InvalidParamsRpcError extends RpcError {\n constructor(cause) {\n super(cause, {\n code: _InvalidParamsRpcError.code,\n name: \"InvalidParamsRpcError\",\n shortMessage: [\n \"Invalid parameters were provided to the RPC method.\",\n \"Double check you have provided the correct parameters.\"\n ].join(\"\\n\")\n });\n }\n };\n Object.defineProperty(InvalidParamsRpcError, \"code\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: -32602\n });\n InternalRpcError = class _InternalRpcError extends RpcError {\n constructor(cause) {\n super(cause, {\n code: _InternalRpcError.code,\n name: \"InternalRpcError\",\n shortMessage: \"An internal error was received.\"\n });\n }\n };\n Object.defineProperty(InternalRpcError, \"code\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: -32603\n });\n InvalidInputRpcError = class _InvalidInputRpcError extends RpcError {\n constructor(cause) {\n super(cause, {\n code: _InvalidInputRpcError.code,\n name: \"InvalidInputRpcError\",\n shortMessage: [\n \"Missing or invalid parameters.\",\n \"Double check you have provided the correct parameters.\"\n ].join(\"\\n\")\n });\n }\n };\n Object.defineProperty(InvalidInputRpcError, \"code\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: -32e3\n });\n ResourceNotFoundRpcError = class _ResourceNotFoundRpcError extends RpcError {\n constructor(cause) {\n super(cause, {\n code: _ResourceNotFoundRpcError.code,\n name: \"ResourceNotFoundRpcError\",\n shortMessage: \"Requested resource not found.\"\n });\n Object.defineProperty(this, \"name\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: \"ResourceNotFoundRpcError\"\n });\n }\n };\n Object.defineProperty(ResourceNotFoundRpcError, \"code\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: -32001\n });\n ResourceUnavailableRpcError = class _ResourceUnavailableRpcError extends RpcError {\n constructor(cause) {\n super(cause, {\n code: _ResourceUnavailableRpcError.code,\n name: \"ResourceUnavailableRpcError\",\n shortMessage: \"Requested resource not available.\"\n });\n }\n };\n Object.defineProperty(ResourceUnavailableRpcError, \"code\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: -32002\n });\n TransactionRejectedRpcError = class _TransactionRejectedRpcError extends RpcError {\n constructor(cause) {\n super(cause, {\n code: _TransactionRejectedRpcError.code,\n name: \"TransactionRejectedRpcError\",\n shortMessage: \"Transaction creation failed.\"\n });\n }\n };\n Object.defineProperty(TransactionRejectedRpcError, \"code\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: -32003\n });\n MethodNotSupportedRpcError = class _MethodNotSupportedRpcError extends RpcError {\n constructor(cause, { method } = {}) {\n super(cause, {\n code: _MethodNotSupportedRpcError.code,\n name: \"MethodNotSupportedRpcError\",\n shortMessage: `Method${method ? ` \"${method}\"` : \"\"} is not supported.`\n });\n }\n };\n Object.defineProperty(MethodNotSupportedRpcError, \"code\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: -32004\n });\n LimitExceededRpcError = class _LimitExceededRpcError extends RpcError {\n constructor(cause) {\n super(cause, {\n code: _LimitExceededRpcError.code,\n name: \"LimitExceededRpcError\",\n shortMessage: \"Request exceeds defined limit.\"\n });\n }\n };\n Object.defineProperty(LimitExceededRpcError, \"code\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: -32005\n });\n JsonRpcVersionUnsupportedError = class _JsonRpcVersionUnsupportedError extends RpcError {\n constructor(cause) {\n super(cause, {\n code: _JsonRpcVersionUnsupportedError.code,\n name: \"JsonRpcVersionUnsupportedError\",\n shortMessage: \"Version of JSON-RPC protocol is not supported.\"\n });\n }\n };\n Object.defineProperty(JsonRpcVersionUnsupportedError, \"code\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: -32006\n });\n UserRejectedRequestError = class _UserRejectedRequestError extends ProviderRpcError {\n constructor(cause) {\n super(cause, {\n code: _UserRejectedRequestError.code,\n name: \"UserRejectedRequestError\",\n shortMessage: \"User rejected the request.\"\n });\n }\n };\n Object.defineProperty(UserRejectedRequestError, \"code\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: 4001\n });\n UnauthorizedProviderError = class _UnauthorizedProviderError extends ProviderRpcError {\n constructor(cause) {\n super(cause, {\n code: _UnauthorizedProviderError.code,\n name: \"UnauthorizedProviderError\",\n shortMessage: \"The requested method and/or account has not been authorized by the user.\"\n });\n }\n };\n Object.defineProperty(UnauthorizedProviderError, \"code\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: 4100\n });\n UnsupportedProviderMethodError = class _UnsupportedProviderMethodError extends ProviderRpcError {\n constructor(cause, { method } = {}) {\n super(cause, {\n code: _UnsupportedProviderMethodError.code,\n name: \"UnsupportedProviderMethodError\",\n shortMessage: `The Provider does not support the requested method${method ? ` \" ${method}\"` : \"\"}.`\n });\n }\n };\n Object.defineProperty(UnsupportedProviderMethodError, \"code\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: 4200\n });\n ProviderDisconnectedError = class _ProviderDisconnectedError extends ProviderRpcError {\n constructor(cause) {\n super(cause, {\n code: _ProviderDisconnectedError.code,\n name: \"ProviderDisconnectedError\",\n shortMessage: \"The Provider is disconnected from all chains.\"\n });\n }\n };\n Object.defineProperty(ProviderDisconnectedError, \"code\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: 4900\n });\n ChainDisconnectedError = class _ChainDisconnectedError extends ProviderRpcError {\n constructor(cause) {\n super(cause, {\n code: _ChainDisconnectedError.code,\n name: \"ChainDisconnectedError\",\n shortMessage: \"The Provider is not connected to the requested chain.\"\n });\n }\n };\n Object.defineProperty(ChainDisconnectedError, \"code\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: 4901\n });\n SwitchChainError = class _SwitchChainError extends ProviderRpcError {\n constructor(cause) {\n super(cause, {\n code: _SwitchChainError.code,\n name: \"SwitchChainError\",\n shortMessage: \"An error occurred when attempting to switch chain.\"\n });\n }\n };\n Object.defineProperty(SwitchChainError, \"code\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: 4902\n });\n UnsupportedNonOptionalCapabilityError = class _UnsupportedNonOptionalCapabilityError extends ProviderRpcError {\n constructor(cause) {\n super(cause, {\n code: _UnsupportedNonOptionalCapabilityError.code,\n name: \"UnsupportedNonOptionalCapabilityError\",\n shortMessage: \"This Wallet does not support a capability that was not marked as optional.\"\n });\n }\n };\n Object.defineProperty(UnsupportedNonOptionalCapabilityError, \"code\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: 5700\n });\n UnsupportedChainIdError = class _UnsupportedChainIdError extends ProviderRpcError {\n constructor(cause) {\n super(cause, {\n code: _UnsupportedChainIdError.code,\n name: \"UnsupportedChainIdError\",\n shortMessage: \"This Wallet does not support the requested chain ID.\"\n });\n }\n };\n Object.defineProperty(UnsupportedChainIdError, \"code\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: 5710\n });\n DuplicateIdError = class _DuplicateIdError extends ProviderRpcError {\n constructor(cause) {\n super(cause, {\n code: _DuplicateIdError.code,\n name: \"DuplicateIdError\",\n shortMessage: \"There is already a bundle submitted with this ID.\"\n });\n }\n };\n Object.defineProperty(DuplicateIdError, \"code\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: 5720\n });\n UnknownBundleIdError = class _UnknownBundleIdError extends ProviderRpcError {\n constructor(cause) {\n super(cause, {\n code: _UnknownBundleIdError.code,\n name: \"UnknownBundleIdError\",\n shortMessage: \"This bundle id is unknown / has not been submitted\"\n });\n }\n };\n Object.defineProperty(UnknownBundleIdError, \"code\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: 5730\n });\n BundleTooLargeError = class _BundleTooLargeError extends ProviderRpcError {\n constructor(cause) {\n super(cause, {\n code: _BundleTooLargeError.code,\n name: \"BundleTooLargeError\",\n shortMessage: \"The call bundle is too large for the Wallet to process.\"\n });\n }\n };\n Object.defineProperty(BundleTooLargeError, \"code\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: 5740\n });\n AtomicReadyWalletRejectedUpgradeError = class _AtomicReadyWalletRejectedUpgradeError extends ProviderRpcError {\n constructor(cause) {\n super(cause, {\n code: _AtomicReadyWalletRejectedUpgradeError.code,\n name: \"AtomicReadyWalletRejectedUpgradeError\",\n shortMessage: \"The Wallet can support atomicity after an upgrade, but the user rejected the upgrade.\"\n });\n }\n };\n Object.defineProperty(AtomicReadyWalletRejectedUpgradeError, \"code\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: 5750\n });\n AtomicityNotSupportedError = class _AtomicityNotSupportedError extends ProviderRpcError {\n constructor(cause) {\n super(cause, {\n code: _AtomicityNotSupportedError.code,\n name: \"AtomicityNotSupportedError\",\n shortMessage: \"The wallet does not support atomic execution but the request requires it.\"\n });\n }\n };\n Object.defineProperty(AtomicityNotSupportedError, \"code\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: 5760\n });\n UnknownRpcError = class extends RpcError {\n constructor(cause) {\n super(cause, {\n name: \"UnknownRpcError\",\n shortMessage: \"An unknown RPC error occurred.\"\n });\n }\n };\n }\n });\n\n // ../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/utils/errors/getContractError.js\n function getContractError(err, { abi: abi2, address, args, docsPath: docsPath8, functionName, sender }) {\n const error = err instanceof RawContractError ? err : err instanceof BaseError2 ? err.walk((err2) => \"data\" in err2) || err.walk() : {};\n const { code, data, details, message, shortMessage } = error;\n const cause = (() => {\n if (err instanceof AbiDecodingZeroDataError)\n return new ContractFunctionZeroDataError({ functionName });\n if ([EXECUTION_REVERTED_ERROR_CODE, InternalRpcError.code].includes(code) && (data || details || message || shortMessage)) {\n return new ContractFunctionRevertedError({\n abi: abi2,\n data: typeof data === \"object\" ? data.data : data,\n functionName,\n message: error instanceof RpcRequestError ? details : shortMessage ?? message\n });\n }\n return err;\n })();\n return new ContractFunctionExecutionError(cause, {\n abi: abi2,\n args,\n contractAddress: address,\n docsPath: docsPath8,\n functionName,\n sender\n });\n }\n var EXECUTION_REVERTED_ERROR_CODE;\n var init_getContractError = __esm({\n \"../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/utils/errors/getContractError.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_abi();\n init_base();\n init_contract();\n init_request();\n init_rpc();\n EXECUTION_REVERTED_ERROR_CODE = 3;\n }\n });\n\n // ../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/accounts/utils/publicKeyToAddress.js\n function publicKeyToAddress(publicKey) {\n const address = keccak256(`0x${publicKey.substring(4)}`).substring(26);\n return checksumAddress(`0x${address}`);\n }\n var init_publicKeyToAddress = __esm({\n \"../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/accounts/utils/publicKeyToAddress.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_getAddress();\n init_keccak256();\n }\n });\n\n // ../../../node_modules/.pnpm/@noble+hashes@1.8.0/node_modules/@noble/hashes/esm/_md.js\n function setBigUint64(view, byteOffset, value, isLE3) {\n if (typeof view.setBigUint64 === \"function\")\n return view.setBigUint64(byteOffset, value, isLE3);\n const _32n3 = BigInt(32);\n const _u32_max = BigInt(4294967295);\n const wh = Number(value >> _32n3 & _u32_max);\n const wl = Number(value & _u32_max);\n const h4 = isLE3 ? 4 : 0;\n const l6 = isLE3 ? 0 : 4;\n view.setUint32(byteOffset + h4, wh, isLE3);\n view.setUint32(byteOffset + l6, wl, isLE3);\n }\n function Chi(a3, b4, c4) {\n return a3 & b4 ^ ~a3 & c4;\n }\n function Maj(a3, b4, c4) {\n return a3 & b4 ^ a3 & c4 ^ b4 & c4;\n }\n var HashMD, SHA256_IV, SHA384_IV, SHA512_IV;\n var init_md = __esm({\n \"../../../node_modules/.pnpm/@noble+hashes@1.8.0/node_modules/@noble/hashes/esm/_md.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_utils3();\n HashMD = class extends Hash {\n constructor(blockLen, outputLen, padOffset, isLE3) {\n super();\n this.finished = false;\n this.length = 0;\n this.pos = 0;\n this.destroyed = false;\n this.blockLen = blockLen;\n this.outputLen = outputLen;\n this.padOffset = padOffset;\n this.isLE = isLE3;\n this.buffer = new Uint8Array(blockLen);\n this.view = createView(this.buffer);\n }\n update(data) {\n aexists(this);\n data = toBytes2(data);\n abytes(data);\n const { view, buffer: buffer2, blockLen } = this;\n const len = data.length;\n for (let pos = 0; pos < len; ) {\n const take = Math.min(blockLen - this.pos, len - pos);\n if (take === blockLen) {\n const dataView = createView(data);\n for (; blockLen <= len - pos; pos += blockLen)\n this.process(dataView, pos);\n continue;\n }\n buffer2.set(data.subarray(pos, pos + take), this.pos);\n this.pos += take;\n pos += take;\n if (this.pos === blockLen) {\n this.process(view, 0);\n this.pos = 0;\n }\n }\n this.length += data.length;\n this.roundClean();\n return this;\n }\n digestInto(out) {\n aexists(this);\n aoutput(out, this);\n this.finished = true;\n const { buffer: buffer2, view, blockLen, isLE: isLE3 } = this;\n let { pos } = this;\n buffer2[pos++] = 128;\n clean(this.buffer.subarray(pos));\n if (this.padOffset > blockLen - pos) {\n this.process(view, 0);\n pos = 0;\n }\n for (let i3 = pos; i3 < blockLen; i3++)\n buffer2[i3] = 0;\n setBigUint64(view, blockLen - 8, BigInt(this.length * 8), isLE3);\n this.process(view, 0);\n const oview = createView(out);\n const len = this.outputLen;\n if (len % 4)\n throw new Error(\"_sha2: outputLen should be aligned to 32bit\");\n const outLen = len / 4;\n const state = this.get();\n if (outLen > state.length)\n throw new Error(\"_sha2: outputLen bigger than state\");\n for (let i3 = 0; i3 < outLen; i3++)\n oview.setUint32(4 * i3, state[i3], isLE3);\n }\n digest() {\n const { buffer: buffer2, outputLen } = this;\n this.digestInto(buffer2);\n const res = buffer2.slice(0, outputLen);\n this.destroy();\n return res;\n }\n _cloneInto(to) {\n to || (to = new this.constructor());\n to.set(...this.get());\n const { blockLen, buffer: buffer2, length: length2, finished, destroyed, pos } = this;\n to.destroyed = destroyed;\n to.finished = finished;\n to.length = length2;\n to.pos = pos;\n if (length2 % blockLen)\n to.buffer.set(buffer2);\n return to;\n }\n clone() {\n return this._cloneInto();\n }\n };\n SHA256_IV = /* @__PURE__ */ Uint32Array.from([\n 1779033703,\n 3144134277,\n 1013904242,\n 2773480762,\n 1359893119,\n 2600822924,\n 528734635,\n 1541459225\n ]);\n SHA384_IV = /* @__PURE__ */ Uint32Array.from([\n 3418070365,\n 3238371032,\n 1654270250,\n 914150663,\n 2438529370,\n 812702999,\n 355462360,\n 4144912697,\n 1731405415,\n 4290775857,\n 2394180231,\n 1750603025,\n 3675008525,\n 1694076839,\n 1203062813,\n 3204075428\n ]);\n SHA512_IV = /* @__PURE__ */ Uint32Array.from([\n 1779033703,\n 4089235720,\n 3144134277,\n 2227873595,\n 1013904242,\n 4271175723,\n 2773480762,\n 1595750129,\n 1359893119,\n 2917565137,\n 2600822924,\n 725511199,\n 528734635,\n 4215389547,\n 1541459225,\n 327033209\n ]);\n }\n });\n\n // ../../../node_modules/.pnpm/@noble+hashes@1.8.0/node_modules/@noble/hashes/esm/sha2.js\n var SHA256_K, SHA256_W, SHA256, K512, SHA512_Kh, SHA512_Kl, SHA512_W_H, SHA512_W_L, SHA512, SHA384, sha256, sha512, sha384;\n var init_sha2 = __esm({\n \"../../../node_modules/.pnpm/@noble+hashes@1.8.0/node_modules/@noble/hashes/esm/sha2.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_md();\n init_u64();\n init_utils3();\n SHA256_K = /* @__PURE__ */ Uint32Array.from([\n 1116352408,\n 1899447441,\n 3049323471,\n 3921009573,\n 961987163,\n 1508970993,\n 2453635748,\n 2870763221,\n 3624381080,\n 310598401,\n 607225278,\n 1426881987,\n 1925078388,\n 2162078206,\n 2614888103,\n 3248222580,\n 3835390401,\n 4022224774,\n 264347078,\n 604807628,\n 770255983,\n 1249150122,\n 1555081692,\n 1996064986,\n 2554220882,\n 2821834349,\n 2952996808,\n 3210313671,\n 3336571891,\n 3584528711,\n 113926993,\n 338241895,\n 666307205,\n 773529912,\n 1294757372,\n 1396182291,\n 1695183700,\n 1986661051,\n 2177026350,\n 2456956037,\n 2730485921,\n 2820302411,\n 3259730800,\n 3345764771,\n 3516065817,\n 3600352804,\n 4094571909,\n 275423344,\n 430227734,\n 506948616,\n 659060556,\n 883997877,\n 958139571,\n 1322822218,\n 1537002063,\n 1747873779,\n 1955562222,\n 2024104815,\n 2227730452,\n 2361852424,\n 2428436474,\n 2756734187,\n 3204031479,\n 3329325298\n ]);\n SHA256_W = /* @__PURE__ */ new Uint32Array(64);\n SHA256 = class extends HashMD {\n constructor(outputLen = 32) {\n super(64, outputLen, 8, false);\n this.A = SHA256_IV[0] | 0;\n this.B = SHA256_IV[1] | 0;\n this.C = SHA256_IV[2] | 0;\n this.D = SHA256_IV[3] | 0;\n this.E = SHA256_IV[4] | 0;\n this.F = SHA256_IV[5] | 0;\n this.G = SHA256_IV[6] | 0;\n this.H = SHA256_IV[7] | 0;\n }\n get() {\n const { A: A4, B: B2, C, D: D2, E: E2, F: F2, G, H: H3 } = this;\n return [A4, B2, C, D2, E2, F2, G, H3];\n }\n // prettier-ignore\n set(A4, B2, C, D2, E2, F2, G, H3) {\n this.A = A4 | 0;\n this.B = B2 | 0;\n this.C = C | 0;\n this.D = D2 | 0;\n this.E = E2 | 0;\n this.F = F2 | 0;\n this.G = G | 0;\n this.H = H3 | 0;\n }\n process(view, offset) {\n for (let i3 = 0; i3 < 16; i3++, offset += 4)\n SHA256_W[i3] = view.getUint32(offset, false);\n for (let i3 = 16; i3 < 64; i3++) {\n const W15 = SHA256_W[i3 - 15];\n const W2 = SHA256_W[i3 - 2];\n const s0 = rotr(W15, 7) ^ rotr(W15, 18) ^ W15 >>> 3;\n const s1 = rotr(W2, 17) ^ rotr(W2, 19) ^ W2 >>> 10;\n SHA256_W[i3] = s1 + SHA256_W[i3 - 7] + s0 + SHA256_W[i3 - 16] | 0;\n }\n let { A: A4, B: B2, C, D: D2, E: E2, F: F2, G, H: H3 } = this;\n for (let i3 = 0; i3 < 64; i3++) {\n const sigma1 = rotr(E2, 6) ^ rotr(E2, 11) ^ rotr(E2, 25);\n const T1 = H3 + sigma1 + Chi(E2, F2, G) + SHA256_K[i3] + SHA256_W[i3] | 0;\n const sigma0 = rotr(A4, 2) ^ rotr(A4, 13) ^ rotr(A4, 22);\n const T22 = sigma0 + Maj(A4, B2, C) | 0;\n H3 = G;\n G = F2;\n F2 = E2;\n E2 = D2 + T1 | 0;\n D2 = C;\n C = B2;\n B2 = A4;\n A4 = T1 + T22 | 0;\n }\n A4 = A4 + this.A | 0;\n B2 = B2 + this.B | 0;\n C = C + this.C | 0;\n D2 = D2 + this.D | 0;\n E2 = E2 + this.E | 0;\n F2 = F2 + this.F | 0;\n G = G + this.G | 0;\n H3 = H3 + this.H | 0;\n this.set(A4, B2, C, D2, E2, F2, G, H3);\n }\n roundClean() {\n clean(SHA256_W);\n }\n destroy() {\n this.set(0, 0, 0, 0, 0, 0, 0, 0);\n clean(this.buffer);\n }\n };\n K512 = /* @__PURE__ */ (() => split([\n \"0x428a2f98d728ae22\",\n \"0x7137449123ef65cd\",\n \"0xb5c0fbcfec4d3b2f\",\n \"0xe9b5dba58189dbbc\",\n \"0x3956c25bf348b538\",\n \"0x59f111f1b605d019\",\n \"0x923f82a4af194f9b\",\n \"0xab1c5ed5da6d8118\",\n \"0xd807aa98a3030242\",\n \"0x12835b0145706fbe\",\n \"0x243185be4ee4b28c\",\n \"0x550c7dc3d5ffb4e2\",\n \"0x72be5d74f27b896f\",\n \"0x80deb1fe3b1696b1\",\n \"0x9bdc06a725c71235\",\n \"0xc19bf174cf692694\",\n \"0xe49b69c19ef14ad2\",\n \"0xefbe4786384f25e3\",\n \"0x0fc19dc68b8cd5b5\",\n \"0x240ca1cc77ac9c65\",\n \"0x2de92c6f592b0275\",\n \"0x4a7484aa6ea6e483\",\n \"0x5cb0a9dcbd41fbd4\",\n \"0x76f988da831153b5\",\n \"0x983e5152ee66dfab\",\n \"0xa831c66d2db43210\",\n \"0xb00327c898fb213f\",\n \"0xbf597fc7beef0ee4\",\n \"0xc6e00bf33da88fc2\",\n \"0xd5a79147930aa725\",\n \"0x06ca6351e003826f\",\n \"0x142929670a0e6e70\",\n \"0x27b70a8546d22ffc\",\n \"0x2e1b21385c26c926\",\n \"0x4d2c6dfc5ac42aed\",\n \"0x53380d139d95b3df\",\n \"0x650a73548baf63de\",\n \"0x766a0abb3c77b2a8\",\n \"0x81c2c92e47edaee6\",\n \"0x92722c851482353b\",\n \"0xa2bfe8a14cf10364\",\n \"0xa81a664bbc423001\",\n \"0xc24b8b70d0f89791\",\n \"0xc76c51a30654be30\",\n \"0xd192e819d6ef5218\",\n \"0xd69906245565a910\",\n \"0xf40e35855771202a\",\n \"0x106aa07032bbd1b8\",\n \"0x19a4c116b8d2d0c8\",\n \"0x1e376c085141ab53\",\n \"0x2748774cdf8eeb99\",\n \"0x34b0bcb5e19b48a8\",\n \"0x391c0cb3c5c95a63\",\n \"0x4ed8aa4ae3418acb\",\n \"0x5b9cca4f7763e373\",\n \"0x682e6ff3d6b2b8a3\",\n \"0x748f82ee5defb2fc\",\n \"0x78a5636f43172f60\",\n \"0x84c87814a1f0ab72\",\n \"0x8cc702081a6439ec\",\n \"0x90befffa23631e28\",\n \"0xa4506cebde82bde9\",\n \"0xbef9a3f7b2c67915\",\n \"0xc67178f2e372532b\",\n \"0xca273eceea26619c\",\n \"0xd186b8c721c0c207\",\n \"0xeada7dd6cde0eb1e\",\n \"0xf57d4f7fee6ed178\",\n \"0x06f067aa72176fba\",\n \"0x0a637dc5a2c898a6\",\n \"0x113f9804bef90dae\",\n \"0x1b710b35131c471b\",\n \"0x28db77f523047d84\",\n \"0x32caab7b40c72493\",\n \"0x3c9ebe0a15c9bebc\",\n \"0x431d67c49c100d4c\",\n \"0x4cc5d4becb3e42b6\",\n \"0x597f299cfc657e2a\",\n \"0x5fcb6fab3ad6faec\",\n \"0x6c44198c4a475817\"\n ].map((n2) => BigInt(n2))))();\n SHA512_Kh = /* @__PURE__ */ (() => K512[0])();\n SHA512_Kl = /* @__PURE__ */ (() => K512[1])();\n SHA512_W_H = /* @__PURE__ */ new Uint32Array(80);\n SHA512_W_L = /* @__PURE__ */ new Uint32Array(80);\n SHA512 = class extends HashMD {\n constructor(outputLen = 64) {\n super(128, outputLen, 16, false);\n this.Ah = SHA512_IV[0] | 0;\n this.Al = SHA512_IV[1] | 0;\n this.Bh = SHA512_IV[2] | 0;\n this.Bl = SHA512_IV[3] | 0;\n this.Ch = SHA512_IV[4] | 0;\n this.Cl = SHA512_IV[5] | 0;\n this.Dh = SHA512_IV[6] | 0;\n this.Dl = SHA512_IV[7] | 0;\n this.Eh = SHA512_IV[8] | 0;\n this.El = SHA512_IV[9] | 0;\n this.Fh = SHA512_IV[10] | 0;\n this.Fl = SHA512_IV[11] | 0;\n this.Gh = SHA512_IV[12] | 0;\n this.Gl = SHA512_IV[13] | 0;\n this.Hh = SHA512_IV[14] | 0;\n this.Hl = SHA512_IV[15] | 0;\n }\n // prettier-ignore\n get() {\n const { Ah, Al, Bh, Bl, Ch, Cl, Dh, Dl, Eh, El, Fh, Fl, Gh, Gl, Hh, Hl } = this;\n return [Ah, Al, Bh, Bl, Ch, Cl, Dh, Dl, Eh, El, Fh, Fl, Gh, Gl, Hh, Hl];\n }\n // prettier-ignore\n set(Ah, Al, Bh, Bl, Ch, Cl, Dh, Dl, Eh, El, Fh, Fl, Gh, Gl, Hh, Hl) {\n this.Ah = Ah | 0;\n this.Al = Al | 0;\n this.Bh = Bh | 0;\n this.Bl = Bl | 0;\n this.Ch = Ch | 0;\n this.Cl = Cl | 0;\n this.Dh = Dh | 0;\n this.Dl = Dl | 0;\n this.Eh = Eh | 0;\n this.El = El | 0;\n this.Fh = Fh | 0;\n this.Fl = Fl | 0;\n this.Gh = Gh | 0;\n this.Gl = Gl | 0;\n this.Hh = Hh | 0;\n this.Hl = Hl | 0;\n }\n process(view, offset) {\n for (let i3 = 0; i3 < 16; i3++, offset += 4) {\n SHA512_W_H[i3] = view.getUint32(offset);\n SHA512_W_L[i3] = view.getUint32(offset += 4);\n }\n for (let i3 = 16; i3 < 80; i3++) {\n const W15h = SHA512_W_H[i3 - 15] | 0;\n const W15l = SHA512_W_L[i3 - 15] | 0;\n const s0h = rotrSH(W15h, W15l, 1) ^ rotrSH(W15h, W15l, 8) ^ shrSH(W15h, W15l, 7);\n const s0l = rotrSL(W15h, W15l, 1) ^ rotrSL(W15h, W15l, 8) ^ shrSL(W15h, W15l, 7);\n const W2h = SHA512_W_H[i3 - 2] | 0;\n const W2l = SHA512_W_L[i3 - 2] | 0;\n const s1h = rotrSH(W2h, W2l, 19) ^ rotrBH(W2h, W2l, 61) ^ shrSH(W2h, W2l, 6);\n const s1l = rotrSL(W2h, W2l, 19) ^ rotrBL(W2h, W2l, 61) ^ shrSL(W2h, W2l, 6);\n const SUMl = add4L(s0l, s1l, SHA512_W_L[i3 - 7], SHA512_W_L[i3 - 16]);\n const SUMh = add4H(SUMl, s0h, s1h, SHA512_W_H[i3 - 7], SHA512_W_H[i3 - 16]);\n SHA512_W_H[i3] = SUMh | 0;\n SHA512_W_L[i3] = SUMl | 0;\n }\n let { Ah, Al, Bh, Bl, Ch, Cl, Dh, Dl, Eh, El, Fh, Fl, Gh, Gl, Hh, Hl } = this;\n for (let i3 = 0; i3 < 80; i3++) {\n const sigma1h = rotrSH(Eh, El, 14) ^ rotrSH(Eh, El, 18) ^ rotrBH(Eh, El, 41);\n const sigma1l = rotrSL(Eh, El, 14) ^ rotrSL(Eh, El, 18) ^ rotrBL(Eh, El, 41);\n const CHIh = Eh & Fh ^ ~Eh & Gh;\n const CHIl = El & Fl ^ ~El & Gl;\n const T1ll = add5L(Hl, sigma1l, CHIl, SHA512_Kl[i3], SHA512_W_L[i3]);\n const T1h = add5H(T1ll, Hh, sigma1h, CHIh, SHA512_Kh[i3], SHA512_W_H[i3]);\n const T1l = T1ll | 0;\n const sigma0h = rotrSH(Ah, Al, 28) ^ rotrBH(Ah, Al, 34) ^ rotrBH(Ah, Al, 39);\n const sigma0l = rotrSL(Ah, Al, 28) ^ rotrBL(Ah, Al, 34) ^ rotrBL(Ah, Al, 39);\n const MAJh = Ah & Bh ^ Ah & Ch ^ Bh & Ch;\n const MAJl = Al & Bl ^ Al & Cl ^ Bl & Cl;\n Hh = Gh | 0;\n Hl = Gl | 0;\n Gh = Fh | 0;\n Gl = Fl | 0;\n Fh = Eh | 0;\n Fl = El | 0;\n ({ h: Eh, l: El } = add(Dh | 0, Dl | 0, T1h | 0, T1l | 0));\n Dh = Ch | 0;\n Dl = Cl | 0;\n Ch = Bh | 0;\n Cl = Bl | 0;\n Bh = Ah | 0;\n Bl = Al | 0;\n const All = add3L(T1l, sigma0l, MAJl);\n Ah = add3H(All, T1h, sigma0h, MAJh);\n Al = All | 0;\n }\n ({ h: Ah, l: Al } = add(this.Ah | 0, this.Al | 0, Ah | 0, Al | 0));\n ({ h: Bh, l: Bl } = add(this.Bh | 0, this.Bl | 0, Bh | 0, Bl | 0));\n ({ h: Ch, l: Cl } = add(this.Ch | 0, this.Cl | 0, Ch | 0, Cl | 0));\n ({ h: Dh, l: Dl } = add(this.Dh | 0, this.Dl | 0, Dh | 0, Dl | 0));\n ({ h: Eh, l: El } = add(this.Eh | 0, this.El | 0, Eh | 0, El | 0));\n ({ h: Fh, l: Fl } = add(this.Fh | 0, this.Fl | 0, Fh | 0, Fl | 0));\n ({ h: Gh, l: Gl } = add(this.Gh | 0, this.Gl | 0, Gh | 0, Gl | 0));\n ({ h: Hh, l: Hl } = add(this.Hh | 0, this.Hl | 0, Hh | 0, Hl | 0));\n this.set(Ah, Al, Bh, Bl, Ch, Cl, Dh, Dl, Eh, El, Fh, Fl, Gh, Gl, Hh, Hl);\n }\n roundClean() {\n clean(SHA512_W_H, SHA512_W_L);\n }\n destroy() {\n clean(this.buffer);\n this.set(0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0);\n }\n };\n SHA384 = class extends SHA512 {\n constructor() {\n super(48);\n this.Ah = SHA384_IV[0] | 0;\n this.Al = SHA384_IV[1] | 0;\n this.Bh = SHA384_IV[2] | 0;\n this.Bl = SHA384_IV[3] | 0;\n this.Ch = SHA384_IV[4] | 0;\n this.Cl = SHA384_IV[5] | 0;\n this.Dh = SHA384_IV[6] | 0;\n this.Dl = SHA384_IV[7] | 0;\n this.Eh = SHA384_IV[8] | 0;\n this.El = SHA384_IV[9] | 0;\n this.Fh = SHA384_IV[10] | 0;\n this.Fl = SHA384_IV[11] | 0;\n this.Gh = SHA384_IV[12] | 0;\n this.Gl = SHA384_IV[13] | 0;\n this.Hh = SHA384_IV[14] | 0;\n this.Hl = SHA384_IV[15] | 0;\n }\n };\n sha256 = /* @__PURE__ */ createHasher(() => new SHA256());\n sha512 = /* @__PURE__ */ createHasher(() => new SHA512());\n sha384 = /* @__PURE__ */ createHasher(() => new SHA384());\n }\n });\n\n // ../../../node_modules/.pnpm/@noble+hashes@1.8.0/node_modules/@noble/hashes/esm/hmac.js\n var HMAC, hmac;\n var init_hmac = __esm({\n \"../../../node_modules/.pnpm/@noble+hashes@1.8.0/node_modules/@noble/hashes/esm/hmac.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_utils3();\n HMAC = class extends Hash {\n constructor(hash3, _key) {\n super();\n this.finished = false;\n this.destroyed = false;\n ahash(hash3);\n const key = toBytes2(_key);\n this.iHash = hash3.create();\n if (typeof this.iHash.update !== \"function\")\n throw new Error(\"Expected instance of class which extends utils.Hash\");\n this.blockLen = this.iHash.blockLen;\n this.outputLen = this.iHash.outputLen;\n const blockLen = this.blockLen;\n const pad6 = new Uint8Array(blockLen);\n pad6.set(key.length > blockLen ? hash3.create().update(key).digest() : key);\n for (let i3 = 0; i3 < pad6.length; i3++)\n pad6[i3] ^= 54;\n this.iHash.update(pad6);\n this.oHash = hash3.create();\n for (let i3 = 0; i3 < pad6.length; i3++)\n pad6[i3] ^= 54 ^ 92;\n this.oHash.update(pad6);\n clean(pad6);\n }\n update(buf) {\n aexists(this);\n this.iHash.update(buf);\n return this;\n }\n digestInto(out) {\n aexists(this);\n abytes(out, this.outputLen);\n this.finished = true;\n this.iHash.digestInto(out);\n this.oHash.update(out);\n this.oHash.digestInto(out);\n this.destroy();\n }\n digest() {\n const out = new Uint8Array(this.oHash.outputLen);\n this.digestInto(out);\n return out;\n }\n _cloneInto(to) {\n to || (to = Object.create(Object.getPrototypeOf(this), {}));\n const { oHash, iHash, finished, destroyed, blockLen, outputLen } = this;\n to = to;\n to.finished = finished;\n to.destroyed = destroyed;\n to.blockLen = blockLen;\n to.outputLen = outputLen;\n to.oHash = oHash._cloneInto(to.oHash);\n to.iHash = iHash._cloneInto(to.iHash);\n return to;\n }\n clone() {\n return this._cloneInto();\n }\n destroy() {\n this.destroyed = true;\n this.oHash.destroy();\n this.iHash.destroy();\n }\n };\n hmac = (hash3, key, message) => new HMAC(hash3, key).update(message).digest();\n hmac.create = (hash3, key) => new HMAC(hash3, key);\n }\n });\n\n // ../../../node_modules/.pnpm/@noble+curves@1.9.1/node_modules/@noble/curves/esm/abstract/utils.js\n function isBytes2(a3) {\n return a3 instanceof Uint8Array || ArrayBuffer.isView(a3) && a3.constructor.name === \"Uint8Array\";\n }\n function abytes2(item) {\n if (!isBytes2(item))\n throw new Error(\"Uint8Array expected\");\n }\n function abool(title2, value) {\n if (typeof value !== \"boolean\")\n throw new Error(title2 + \" boolean expected, got \" + value);\n }\n function numberToHexUnpadded(num2) {\n const hex = num2.toString(16);\n return hex.length & 1 ? \"0\" + hex : hex;\n }\n function hexToNumber2(hex) {\n if (typeof hex !== \"string\")\n throw new Error(\"hex string expected, got \" + typeof hex);\n return hex === \"\" ? _0n2 : BigInt(\"0x\" + hex);\n }\n function bytesToHex3(bytes) {\n abytes2(bytes);\n if (hasHexBuiltin2)\n return bytes.toHex();\n let hex = \"\";\n for (let i3 = 0; i3 < bytes.length; i3++) {\n hex += hexes3[bytes[i3]];\n }\n return hex;\n }\n function asciiToBase162(ch) {\n if (ch >= asciis2._0 && ch <= asciis2._9)\n return ch - asciis2._0;\n if (ch >= asciis2.A && ch <= asciis2.F)\n return ch - (asciis2.A - 10);\n if (ch >= asciis2.a && ch <= asciis2.f)\n return ch - (asciis2.a - 10);\n return;\n }\n function hexToBytes3(hex) {\n if (typeof hex !== \"string\")\n throw new Error(\"hex string expected, got \" + typeof hex);\n if (hasHexBuiltin2)\n return Uint8Array.fromHex(hex);\n const hl = hex.length;\n const al = hl / 2;\n if (hl % 2)\n throw new Error(\"hex string expected, got unpadded hex of length \" + hl);\n const array2 = new Uint8Array(al);\n for (let ai = 0, hi = 0; ai < al; ai++, hi += 2) {\n const n1 = asciiToBase162(hex.charCodeAt(hi));\n const n2 = asciiToBase162(hex.charCodeAt(hi + 1));\n if (n1 === void 0 || n2 === void 0) {\n const char = hex[hi] + hex[hi + 1];\n throw new Error('hex string expected, got non-hex character \"' + char + '\" at index ' + hi);\n }\n array2[ai] = n1 * 16 + n2;\n }\n return array2;\n }\n function bytesToNumberBE(bytes) {\n return hexToNumber2(bytesToHex3(bytes));\n }\n function bytesToNumberLE(bytes) {\n abytes2(bytes);\n return hexToNumber2(bytesToHex3(Uint8Array.from(bytes).reverse()));\n }\n function numberToBytesBE(n2, len) {\n return hexToBytes3(n2.toString(16).padStart(len * 2, \"0\"));\n }\n function numberToBytesLE(n2, len) {\n return numberToBytesBE(n2, len).reverse();\n }\n function ensureBytes(title2, hex, expectedLength) {\n let res;\n if (typeof hex === \"string\") {\n try {\n res = hexToBytes3(hex);\n } catch (e3) {\n throw new Error(title2 + \" must be hex string or Uint8Array, cause: \" + e3);\n }\n } else if (isBytes2(hex)) {\n res = Uint8Array.from(hex);\n } else {\n throw new Error(title2 + \" must be hex string or Uint8Array\");\n }\n const len = res.length;\n if (typeof expectedLength === \"number\" && len !== expectedLength)\n throw new Error(title2 + \" of length \" + expectedLength + \" expected, got \" + len);\n return res;\n }\n function concatBytes3(...arrays) {\n let sum = 0;\n for (let i3 = 0; i3 < arrays.length; i3++) {\n const a3 = arrays[i3];\n abytes2(a3);\n sum += a3.length;\n }\n const res = new Uint8Array(sum);\n for (let i3 = 0, pad6 = 0; i3 < arrays.length; i3++) {\n const a3 = arrays[i3];\n res.set(a3, pad6);\n pad6 += a3.length;\n }\n return res;\n }\n function utf8ToBytes2(str) {\n if (typeof str !== \"string\")\n throw new Error(\"string expected\");\n return new Uint8Array(new TextEncoder().encode(str));\n }\n function inRange(n2, min, max) {\n return isPosBig(n2) && isPosBig(min) && isPosBig(max) && min <= n2 && n2 < max;\n }\n function aInRange(title2, n2, min, max) {\n if (!inRange(n2, min, max))\n throw new Error(\"expected valid \" + title2 + \": \" + min + \" <= n < \" + max + \", got \" + n2);\n }\n function bitLen(n2) {\n let len;\n for (len = 0; n2 > _0n2; n2 >>= _1n2, len += 1)\n ;\n return len;\n }\n function createHmacDrbg(hashLen, qByteLen, hmacFn) {\n if (typeof hashLen !== \"number\" || hashLen < 2)\n throw new Error(\"hashLen must be a number\");\n if (typeof qByteLen !== \"number\" || qByteLen < 2)\n throw new Error(\"qByteLen must be a number\");\n if (typeof hmacFn !== \"function\")\n throw new Error(\"hmacFn must be a function\");\n let v2 = u8n(hashLen);\n let k4 = u8n(hashLen);\n let i3 = 0;\n const reset = () => {\n v2.fill(1);\n k4.fill(0);\n i3 = 0;\n };\n const h4 = (...b4) => hmacFn(k4, v2, ...b4);\n const reseed = (seed = u8n(0)) => {\n k4 = h4(u8fr([0]), seed);\n v2 = h4();\n if (seed.length === 0)\n return;\n k4 = h4(u8fr([1]), seed);\n v2 = h4();\n };\n const gen2 = () => {\n if (i3++ >= 1e3)\n throw new Error(\"drbg: tried 1000 values\");\n let len = 0;\n const out = [];\n while (len < qByteLen) {\n v2 = h4();\n const sl = v2.slice();\n out.push(sl);\n len += v2.length;\n }\n return concatBytes3(...out);\n };\n const genUntil = (seed, pred) => {\n reset();\n reseed(seed);\n let res = void 0;\n while (!(res = pred(gen2())))\n reseed();\n reset();\n return res;\n };\n return genUntil;\n }\n function validateObject(object2, validators, optValidators = {}) {\n const checkField = (fieldName, type, isOptional) => {\n const checkVal = validatorFns[type];\n if (typeof checkVal !== \"function\")\n throw new Error(\"invalid validator function\");\n const val = object2[fieldName];\n if (isOptional && val === void 0)\n return;\n if (!checkVal(val, object2)) {\n throw new Error(\"param \" + String(fieldName) + \" is invalid. Expected \" + type + \", got \" + val);\n }\n };\n for (const [fieldName, type] of Object.entries(validators))\n checkField(fieldName, type, false);\n for (const [fieldName, type] of Object.entries(optValidators))\n checkField(fieldName, type, true);\n return object2;\n }\n function memoized(fn) {\n const map = /* @__PURE__ */ new WeakMap();\n return (arg, ...args) => {\n const val = map.get(arg);\n if (val !== void 0)\n return val;\n const computed = fn(arg, ...args);\n map.set(arg, computed);\n return computed;\n };\n }\n var _0n2, _1n2, hasHexBuiltin2, hexes3, asciis2, isPosBig, bitMask, u8n, u8fr, validatorFns;\n var init_utils5 = __esm({\n \"../../../node_modules/.pnpm/@noble+curves@1.9.1/node_modules/@noble/curves/esm/abstract/utils.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n _0n2 = /* @__PURE__ */ BigInt(0);\n _1n2 = /* @__PURE__ */ BigInt(1);\n hasHexBuiltin2 = // @ts-ignore\n typeof Uint8Array.from([]).toHex === \"function\" && typeof Uint8Array.fromHex === \"function\";\n hexes3 = /* @__PURE__ */ Array.from({ length: 256 }, (_2, i3) => i3.toString(16).padStart(2, \"0\"));\n asciis2 = { _0: 48, _9: 57, A: 65, F: 70, a: 97, f: 102 };\n isPosBig = (n2) => typeof n2 === \"bigint\" && _0n2 <= n2;\n bitMask = (n2) => (_1n2 << BigInt(n2)) - _1n2;\n u8n = (len) => new Uint8Array(len);\n u8fr = (arr) => Uint8Array.from(arr);\n validatorFns = {\n bigint: (val) => typeof val === \"bigint\",\n function: (val) => typeof val === \"function\",\n boolean: (val) => typeof val === \"boolean\",\n string: (val) => typeof val === \"string\",\n stringOrUint8Array: (val) => typeof val === \"string\" || isBytes2(val),\n isSafeInteger: (val) => Number.isSafeInteger(val),\n array: (val) => Array.isArray(val),\n field: (val, object2) => object2.Fp.isValid(val),\n hash: (val) => typeof val === \"function\" && Number.isSafeInteger(val.outputLen)\n };\n }\n });\n\n // ../../../node_modules/.pnpm/@noble+curves@1.9.1/node_modules/@noble/curves/esm/abstract/modular.js\n function mod(a3, b4) {\n const result = a3 % b4;\n return result >= _0n3 ? result : b4 + result;\n }\n function pow2(x4, power, modulo) {\n let res = x4;\n while (power-- > _0n3) {\n res *= res;\n res %= modulo;\n }\n return res;\n }\n function invert(number2, modulo) {\n if (number2 === _0n3)\n throw new Error(\"invert: expected non-zero number\");\n if (modulo <= _0n3)\n throw new Error(\"invert: expected positive modulus, got \" + modulo);\n let a3 = mod(number2, modulo);\n let b4 = modulo;\n let x4 = _0n3, y6 = _1n3, u2 = _1n3, v2 = _0n3;\n while (a3 !== _0n3) {\n const q3 = b4 / a3;\n const r2 = b4 % a3;\n const m2 = x4 - u2 * q3;\n const n2 = y6 - v2 * q3;\n b4 = a3, a3 = r2, x4 = u2, y6 = v2, u2 = m2, v2 = n2;\n }\n const gcd = b4;\n if (gcd !== _1n3)\n throw new Error(\"invert: does not exist\");\n return mod(x4, modulo);\n }\n function sqrt3mod4(Fp, n2) {\n const p1div4 = (Fp.ORDER + _1n3) / _4n;\n const root = Fp.pow(n2, p1div4);\n if (!Fp.eql(Fp.sqr(root), n2))\n throw new Error(\"Cannot find square root\");\n return root;\n }\n function sqrt5mod8(Fp, n2) {\n const p5div8 = (Fp.ORDER - _5n) / _8n;\n const n22 = Fp.mul(n2, _2n2);\n const v2 = Fp.pow(n22, p5div8);\n const nv = Fp.mul(n2, v2);\n const i3 = Fp.mul(Fp.mul(nv, _2n2), v2);\n const root = Fp.mul(nv, Fp.sub(i3, Fp.ONE));\n if (!Fp.eql(Fp.sqr(root), n2))\n throw new Error(\"Cannot find square root\");\n return root;\n }\n function tonelliShanks(P2) {\n if (P2 < BigInt(3))\n throw new Error(\"sqrt is not defined for small field\");\n let Q2 = P2 - _1n3;\n let S3 = 0;\n while (Q2 % _2n2 === _0n3) {\n Q2 /= _2n2;\n S3++;\n }\n let Z2 = _2n2;\n const _Fp = Field(P2);\n while (FpLegendre(_Fp, Z2) === 1) {\n if (Z2++ > 1e3)\n throw new Error(\"Cannot find square root: probably non-prime P\");\n }\n if (S3 === 1)\n return sqrt3mod4;\n let cc = _Fp.pow(Z2, Q2);\n const Q1div2 = (Q2 + _1n3) / _2n2;\n return function tonelliSlow(Fp, n2) {\n if (Fp.is0(n2))\n return n2;\n if (FpLegendre(Fp, n2) !== 1)\n throw new Error(\"Cannot find square root\");\n let M2 = S3;\n let c4 = Fp.mul(Fp.ONE, cc);\n let t3 = Fp.pow(n2, Q2);\n let R3 = Fp.pow(n2, Q1div2);\n while (!Fp.eql(t3, Fp.ONE)) {\n if (Fp.is0(t3))\n return Fp.ZERO;\n let i3 = 1;\n let t_tmp = Fp.sqr(t3);\n while (!Fp.eql(t_tmp, Fp.ONE)) {\n i3++;\n t_tmp = Fp.sqr(t_tmp);\n if (i3 === M2)\n throw new Error(\"Cannot find square root\");\n }\n const exponent = _1n3 << BigInt(M2 - i3 - 1);\n const b4 = Fp.pow(c4, exponent);\n M2 = i3;\n c4 = Fp.sqr(b4);\n t3 = Fp.mul(t3, c4);\n R3 = Fp.mul(R3, b4);\n }\n return R3;\n };\n }\n function FpSqrt(P2) {\n if (P2 % _4n === _3n)\n return sqrt3mod4;\n if (P2 % _8n === _5n)\n return sqrt5mod8;\n return tonelliShanks(P2);\n }\n function validateField(field) {\n const initial = {\n ORDER: \"bigint\",\n MASK: \"bigint\",\n BYTES: \"isSafeInteger\",\n BITS: \"isSafeInteger\"\n };\n const opts = FIELD_FIELDS.reduce((map, val) => {\n map[val] = \"function\";\n return map;\n }, initial);\n return validateObject(field, opts);\n }\n function FpPow(Fp, num2, power) {\n if (power < _0n3)\n throw new Error(\"invalid exponent, negatives unsupported\");\n if (power === _0n3)\n return Fp.ONE;\n if (power === _1n3)\n return num2;\n let p4 = Fp.ONE;\n let d5 = num2;\n while (power > _0n3) {\n if (power & _1n3)\n p4 = Fp.mul(p4, d5);\n d5 = Fp.sqr(d5);\n power >>= _1n3;\n }\n return p4;\n }\n function FpInvertBatch(Fp, nums, passZero = false) {\n const inverted = new Array(nums.length).fill(passZero ? Fp.ZERO : void 0);\n const multipliedAcc = nums.reduce((acc, num2, i3) => {\n if (Fp.is0(num2))\n return acc;\n inverted[i3] = acc;\n return Fp.mul(acc, num2);\n }, Fp.ONE);\n const invertedAcc = Fp.inv(multipliedAcc);\n nums.reduceRight((acc, num2, i3) => {\n if (Fp.is0(num2))\n return acc;\n inverted[i3] = Fp.mul(acc, inverted[i3]);\n return Fp.mul(acc, num2);\n }, invertedAcc);\n return inverted;\n }\n function FpLegendre(Fp, n2) {\n const p1mod2 = (Fp.ORDER - _1n3) / _2n2;\n const powered = Fp.pow(n2, p1mod2);\n const yes = Fp.eql(powered, Fp.ONE);\n const zero = Fp.eql(powered, Fp.ZERO);\n const no = Fp.eql(powered, Fp.neg(Fp.ONE));\n if (!yes && !zero && !no)\n throw new Error(\"invalid Legendre symbol result\");\n return yes ? 1 : zero ? 0 : -1;\n }\n function nLength(n2, nBitLength) {\n if (nBitLength !== void 0)\n anumber(nBitLength);\n const _nBitLength = nBitLength !== void 0 ? nBitLength : n2.toString(2).length;\n const nByteLength = Math.ceil(_nBitLength / 8);\n return { nBitLength: _nBitLength, nByteLength };\n }\n function Field(ORDER, bitLen3, isLE3 = false, redef = {}) {\n if (ORDER <= _0n3)\n throw new Error(\"invalid field: expected ORDER > 0, got \" + ORDER);\n const { nBitLength: BITS, nByteLength: BYTES } = nLength(ORDER, bitLen3);\n if (BYTES > 2048)\n throw new Error(\"invalid field: expected ORDER of <= 2048 bytes\");\n let sqrtP;\n const f6 = Object.freeze({\n ORDER,\n isLE: isLE3,\n BITS,\n BYTES,\n MASK: bitMask(BITS),\n ZERO: _0n3,\n ONE: _1n3,\n create: (num2) => mod(num2, ORDER),\n isValid: (num2) => {\n if (typeof num2 !== \"bigint\")\n throw new Error(\"invalid field element: expected bigint, got \" + typeof num2);\n return _0n3 <= num2 && num2 < ORDER;\n },\n is0: (num2) => num2 === _0n3,\n isOdd: (num2) => (num2 & _1n3) === _1n3,\n neg: (num2) => mod(-num2, ORDER),\n eql: (lhs, rhs) => lhs === rhs,\n sqr: (num2) => mod(num2 * num2, ORDER),\n add: (lhs, rhs) => mod(lhs + rhs, ORDER),\n sub: (lhs, rhs) => mod(lhs - rhs, ORDER),\n mul: (lhs, rhs) => mod(lhs * rhs, ORDER),\n pow: (num2, power) => FpPow(f6, num2, power),\n div: (lhs, rhs) => mod(lhs * invert(rhs, ORDER), ORDER),\n // Same as above, but doesn't normalize\n sqrN: (num2) => num2 * num2,\n addN: (lhs, rhs) => lhs + rhs,\n subN: (lhs, rhs) => lhs - rhs,\n mulN: (lhs, rhs) => lhs * rhs,\n inv: (num2) => invert(num2, ORDER),\n sqrt: redef.sqrt || ((n2) => {\n if (!sqrtP)\n sqrtP = FpSqrt(ORDER);\n return sqrtP(f6, n2);\n }),\n toBytes: (num2) => isLE3 ? numberToBytesLE(num2, BYTES) : numberToBytesBE(num2, BYTES),\n fromBytes: (bytes) => {\n if (bytes.length !== BYTES)\n throw new Error(\"Field.fromBytes: expected \" + BYTES + \" bytes, got \" + bytes.length);\n return isLE3 ? bytesToNumberLE(bytes) : bytesToNumberBE(bytes);\n },\n // TODO: we don't need it here, move out to separate fn\n invertBatch: (lst) => FpInvertBatch(f6, lst),\n // We can't move this out because Fp6, Fp12 implement it\n // and it's unclear what to return in there.\n cmov: (a3, b4, c4) => c4 ? b4 : a3\n });\n return Object.freeze(f6);\n }\n function getFieldBytesLength(fieldOrder) {\n if (typeof fieldOrder !== \"bigint\")\n throw new Error(\"field order must be bigint\");\n const bitLength = fieldOrder.toString(2).length;\n return Math.ceil(bitLength / 8);\n }\n function getMinHashLength(fieldOrder) {\n const length2 = getFieldBytesLength(fieldOrder);\n return length2 + Math.ceil(length2 / 2);\n }\n function mapHashToField(key, fieldOrder, isLE3 = false) {\n const len = key.length;\n const fieldLen = getFieldBytesLength(fieldOrder);\n const minLen = getMinHashLength(fieldOrder);\n if (len < 16 || len < minLen || len > 1024)\n throw new Error(\"expected \" + minLen + \"-1024 bytes of input, got \" + len);\n const num2 = isLE3 ? bytesToNumberLE(key) : bytesToNumberBE(key);\n const reduced = mod(num2, fieldOrder - _1n3) + _1n3;\n return isLE3 ? numberToBytesLE(reduced, fieldLen) : numberToBytesBE(reduced, fieldLen);\n }\n var _0n3, _1n3, _2n2, _3n, _4n, _5n, _8n, FIELD_FIELDS;\n var init_modular = __esm({\n \"../../../node_modules/.pnpm/@noble+curves@1.9.1/node_modules/@noble/curves/esm/abstract/modular.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_utils3();\n init_utils5();\n _0n3 = BigInt(0);\n _1n3 = BigInt(1);\n _2n2 = /* @__PURE__ */ BigInt(2);\n _3n = /* @__PURE__ */ BigInt(3);\n _4n = /* @__PURE__ */ BigInt(4);\n _5n = /* @__PURE__ */ BigInt(5);\n _8n = /* @__PURE__ */ BigInt(8);\n FIELD_FIELDS = [\n \"create\",\n \"isValid\",\n \"is0\",\n \"neg\",\n \"inv\",\n \"sqrt\",\n \"sqr\",\n \"eql\",\n \"add\",\n \"sub\",\n \"mul\",\n \"pow\",\n \"div\",\n \"addN\",\n \"subN\",\n \"mulN\",\n \"sqrN\"\n ];\n }\n });\n\n // ../../../node_modules/.pnpm/@noble+curves@1.9.1/node_modules/@noble/curves/esm/abstract/curve.js\n function constTimeNegate(condition, item) {\n const neg = item.negate();\n return condition ? neg : item;\n }\n function validateW(W, bits) {\n if (!Number.isSafeInteger(W) || W <= 0 || W > bits)\n throw new Error(\"invalid window size, expected [1..\" + bits + \"], got W=\" + W);\n }\n function calcWOpts(W, scalarBits) {\n validateW(W, scalarBits);\n const windows = Math.ceil(scalarBits / W) + 1;\n const windowSize = 2 ** (W - 1);\n const maxNumber = 2 ** W;\n const mask = bitMask(W);\n const shiftBy = BigInt(W);\n return { windows, windowSize, mask, maxNumber, shiftBy };\n }\n function calcOffsets(n2, window2, wOpts) {\n const { windowSize, mask, maxNumber, shiftBy } = wOpts;\n let wbits = Number(n2 & mask);\n let nextN = n2 >> shiftBy;\n if (wbits > windowSize) {\n wbits -= maxNumber;\n nextN += _1n4;\n }\n const offsetStart = window2 * windowSize;\n const offset = offsetStart + Math.abs(wbits) - 1;\n const isZero = wbits === 0;\n const isNeg = wbits < 0;\n const isNegF = window2 % 2 !== 0;\n const offsetF = offsetStart;\n return { nextN, offset, isZero, isNeg, isNegF, offsetF };\n }\n function validateMSMPoints(points, c4) {\n if (!Array.isArray(points))\n throw new Error(\"array expected\");\n points.forEach((p4, i3) => {\n if (!(p4 instanceof c4))\n throw new Error(\"invalid point at index \" + i3);\n });\n }\n function validateMSMScalars(scalars, field) {\n if (!Array.isArray(scalars))\n throw new Error(\"array of scalars expected\");\n scalars.forEach((s4, i3) => {\n if (!field.isValid(s4))\n throw new Error(\"invalid scalar at index \" + i3);\n });\n }\n function getW(P2) {\n return pointWindowSizes.get(P2) || 1;\n }\n function wNAF(c4, bits) {\n return {\n constTimeNegate,\n hasPrecomputes(elm) {\n return getW(elm) !== 1;\n },\n // non-const time multiplication ladder\n unsafeLadder(elm, n2, p4 = c4.ZERO) {\n let d5 = elm;\n while (n2 > _0n4) {\n if (n2 & _1n4)\n p4 = p4.add(d5);\n d5 = d5.double();\n n2 >>= _1n4;\n }\n return p4;\n },\n /**\n * Creates a wNAF precomputation window. Used for caching.\n * Default window size is set by `utils.precompute()` and is equal to 8.\n * Number of precomputed points depends on the curve size:\n * 2^(𝑊−1) * (Math.ceil(𝑛 / 𝑊) + 1), where:\n * - 𝑊 is the window size\n * - 𝑛 is the bitlength of the curve order.\n * For a 256-bit curve and window size 8, the number of precomputed points is 128 * 33 = 4224.\n * @param elm Point instance\n * @param W window size\n * @returns precomputed point tables flattened to a single array\n */\n precomputeWindow(elm, W) {\n const { windows, windowSize } = calcWOpts(W, bits);\n const points = [];\n let p4 = elm;\n let base4 = p4;\n for (let window2 = 0; window2 < windows; window2++) {\n base4 = p4;\n points.push(base4);\n for (let i3 = 1; i3 < windowSize; i3++) {\n base4 = base4.add(p4);\n points.push(base4);\n }\n p4 = base4.double();\n }\n return points;\n },\n /**\n * Implements ec multiplication using precomputed tables and w-ary non-adjacent form.\n * @param W window size\n * @param precomputes precomputed tables\n * @param n scalar (we don't check here, but should be less than curve order)\n * @returns real and fake (for const-time) points\n */\n wNAF(W, precomputes, n2) {\n let p4 = c4.ZERO;\n let f6 = c4.BASE;\n const wo = calcWOpts(W, bits);\n for (let window2 = 0; window2 < wo.windows; window2++) {\n const { nextN, offset, isZero, isNeg, isNegF, offsetF } = calcOffsets(n2, window2, wo);\n n2 = nextN;\n if (isZero) {\n f6 = f6.add(constTimeNegate(isNegF, precomputes[offsetF]));\n } else {\n p4 = p4.add(constTimeNegate(isNeg, precomputes[offset]));\n }\n }\n return { p: p4, f: f6 };\n },\n /**\n * Implements ec unsafe (non const-time) multiplication using precomputed tables and w-ary non-adjacent form.\n * @param W window size\n * @param precomputes precomputed tables\n * @param n scalar (we don't check here, but should be less than curve order)\n * @param acc accumulator point to add result of multiplication\n * @returns point\n */\n wNAFUnsafe(W, precomputes, n2, acc = c4.ZERO) {\n const wo = calcWOpts(W, bits);\n for (let window2 = 0; window2 < wo.windows; window2++) {\n if (n2 === _0n4)\n break;\n const { nextN, offset, isZero, isNeg } = calcOffsets(n2, window2, wo);\n n2 = nextN;\n if (isZero) {\n continue;\n } else {\n const item = precomputes[offset];\n acc = acc.add(isNeg ? item.negate() : item);\n }\n }\n return acc;\n },\n getPrecomputes(W, P2, transform2) {\n let comp = pointPrecomputes.get(P2);\n if (!comp) {\n comp = this.precomputeWindow(P2, W);\n if (W !== 1)\n pointPrecomputes.set(P2, transform2(comp));\n }\n return comp;\n },\n wNAFCached(P2, n2, transform2) {\n const W = getW(P2);\n return this.wNAF(W, this.getPrecomputes(W, P2, transform2), n2);\n },\n wNAFCachedUnsafe(P2, n2, transform2, prev) {\n const W = getW(P2);\n if (W === 1)\n return this.unsafeLadder(P2, n2, prev);\n return this.wNAFUnsafe(W, this.getPrecomputes(W, P2, transform2), n2, prev);\n },\n // We calculate precomputes for elliptic curve point multiplication\n // using windowed method. This specifies window size and\n // stores precomputed values. Usually only base point would be precomputed.\n setWindowSize(P2, W) {\n validateW(W, bits);\n pointWindowSizes.set(P2, W);\n pointPrecomputes.delete(P2);\n }\n };\n }\n function pippenger(c4, fieldN, points, scalars) {\n validateMSMPoints(points, c4);\n validateMSMScalars(scalars, fieldN);\n const plength = points.length;\n const slength = scalars.length;\n if (plength !== slength)\n throw new Error(\"arrays of points and scalars must have equal length\");\n const zero = c4.ZERO;\n const wbits = bitLen(BigInt(plength));\n let windowSize = 1;\n if (wbits > 12)\n windowSize = wbits - 3;\n else if (wbits > 4)\n windowSize = wbits - 2;\n else if (wbits > 0)\n windowSize = 2;\n const MASK = bitMask(windowSize);\n const buckets = new Array(Number(MASK) + 1).fill(zero);\n const lastBits = Math.floor((fieldN.BITS - 1) / windowSize) * windowSize;\n let sum = zero;\n for (let i3 = lastBits; i3 >= 0; i3 -= windowSize) {\n buckets.fill(zero);\n for (let j2 = 0; j2 < slength; j2++) {\n const scalar = scalars[j2];\n const wbits2 = Number(scalar >> BigInt(i3) & MASK);\n buckets[wbits2] = buckets[wbits2].add(points[j2]);\n }\n let resI = zero;\n for (let j2 = buckets.length - 1, sumI = zero; j2 > 0; j2--) {\n sumI = sumI.add(buckets[j2]);\n resI = resI.add(sumI);\n }\n sum = sum.add(resI);\n if (i3 !== 0)\n for (let j2 = 0; j2 < windowSize; j2++)\n sum = sum.double();\n }\n return sum;\n }\n function validateBasic(curve) {\n validateField(curve.Fp);\n validateObject(curve, {\n n: \"bigint\",\n h: \"bigint\",\n Gx: \"field\",\n Gy: \"field\"\n }, {\n nBitLength: \"isSafeInteger\",\n nByteLength: \"isSafeInteger\"\n });\n return Object.freeze({\n ...nLength(curve.n, curve.nBitLength),\n ...curve,\n ...{ p: curve.Fp.ORDER }\n });\n }\n var _0n4, _1n4, pointPrecomputes, pointWindowSizes;\n var init_curve = __esm({\n \"../../../node_modules/.pnpm/@noble+curves@1.9.1/node_modules/@noble/curves/esm/abstract/curve.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_modular();\n init_utils5();\n _0n4 = BigInt(0);\n _1n4 = BigInt(1);\n pointPrecomputes = /* @__PURE__ */ new WeakMap();\n pointWindowSizes = /* @__PURE__ */ new WeakMap();\n }\n });\n\n // ../../../node_modules/.pnpm/@noble+curves@1.9.1/node_modules/@noble/curves/esm/abstract/weierstrass.js\n function validateSigVerOpts(opts) {\n if (opts.lowS !== void 0)\n abool(\"lowS\", opts.lowS);\n if (opts.prehash !== void 0)\n abool(\"prehash\", opts.prehash);\n }\n function validatePointOpts(curve) {\n const opts = validateBasic(curve);\n validateObject(opts, {\n a: \"field\",\n b: \"field\"\n }, {\n allowInfinityPoint: \"boolean\",\n allowedPrivateKeyLengths: \"array\",\n clearCofactor: \"function\",\n fromBytes: \"function\",\n isTorsionFree: \"function\",\n toBytes: \"function\",\n wrapPrivateKey: \"boolean\"\n });\n const { endo, Fp, a: a3 } = opts;\n if (endo) {\n if (!Fp.eql(a3, Fp.ZERO)) {\n throw new Error(\"invalid endo: CURVE.a must be 0\");\n }\n if (typeof endo !== \"object\" || typeof endo.beta !== \"bigint\" || typeof endo.splitScalar !== \"function\") {\n throw new Error('invalid endo: expected \"beta\": bigint and \"splitScalar\": function');\n }\n }\n return Object.freeze({ ...opts });\n }\n function numToSizedHex(num2, size6) {\n return bytesToHex3(numberToBytesBE(num2, size6));\n }\n function weierstrassPoints(opts) {\n const CURVE = validatePointOpts(opts);\n const { Fp } = CURVE;\n const Fn = Field(CURVE.n, CURVE.nBitLength);\n const toBytes5 = CURVE.toBytes || ((_c, point, _isCompressed) => {\n const a3 = point.toAffine();\n return concatBytes3(Uint8Array.from([4]), Fp.toBytes(a3.x), Fp.toBytes(a3.y));\n });\n const fromBytes5 = CURVE.fromBytes || ((bytes) => {\n const tail = bytes.subarray(1);\n const x4 = Fp.fromBytes(tail.subarray(0, Fp.BYTES));\n const y6 = Fp.fromBytes(tail.subarray(Fp.BYTES, 2 * Fp.BYTES));\n return { x: x4, y: y6 };\n });\n function weierstrassEquation(x4) {\n const { a: a3, b: b4 } = CURVE;\n const x22 = Fp.sqr(x4);\n const x32 = Fp.mul(x22, x4);\n return Fp.add(Fp.add(x32, Fp.mul(x4, a3)), b4);\n }\n function isValidXY(x4, y6) {\n const left = Fp.sqr(y6);\n const right = weierstrassEquation(x4);\n return Fp.eql(left, right);\n }\n if (!isValidXY(CURVE.Gx, CURVE.Gy))\n throw new Error(\"bad curve params: generator point\");\n const _4a3 = Fp.mul(Fp.pow(CURVE.a, _3n2), _4n2);\n const _27b2 = Fp.mul(Fp.sqr(CURVE.b), BigInt(27));\n if (Fp.is0(Fp.add(_4a3, _27b2)))\n throw new Error(\"bad curve params: a or b\");\n function isWithinCurveOrder(num2) {\n return inRange(num2, _1n5, CURVE.n);\n }\n function normPrivateKeyToScalar(key) {\n const { allowedPrivateKeyLengths: lengths, nByteLength, wrapPrivateKey, n: N4 } = CURVE;\n if (lengths && typeof key !== \"bigint\") {\n if (isBytes2(key))\n key = bytesToHex3(key);\n if (typeof key !== \"string\" || !lengths.includes(key.length))\n throw new Error(\"invalid private key\");\n key = key.padStart(nByteLength * 2, \"0\");\n }\n let num2;\n try {\n num2 = typeof key === \"bigint\" ? key : bytesToNumberBE(ensureBytes(\"private key\", key, nByteLength));\n } catch (error) {\n throw new Error(\"invalid private key, expected hex or \" + nByteLength + \" bytes, got \" + typeof key);\n }\n if (wrapPrivateKey)\n num2 = mod(num2, N4);\n aInRange(\"private key\", num2, _1n5, N4);\n return num2;\n }\n function aprjpoint(other) {\n if (!(other instanceof Point3))\n throw new Error(\"ProjectivePoint expected\");\n }\n const toAffineMemo = memoized((p4, iz) => {\n const { px: x4, py: y6, pz: z2 } = p4;\n if (Fp.eql(z2, Fp.ONE))\n return { x: x4, y: y6 };\n const is0 = p4.is0();\n if (iz == null)\n iz = is0 ? Fp.ONE : Fp.inv(z2);\n const ax = Fp.mul(x4, iz);\n const ay = Fp.mul(y6, iz);\n const zz = Fp.mul(z2, iz);\n if (is0)\n return { x: Fp.ZERO, y: Fp.ZERO };\n if (!Fp.eql(zz, Fp.ONE))\n throw new Error(\"invZ was invalid\");\n return { x: ax, y: ay };\n });\n const assertValidMemo = memoized((p4) => {\n if (p4.is0()) {\n if (CURVE.allowInfinityPoint && !Fp.is0(p4.py))\n return;\n throw new Error(\"bad point: ZERO\");\n }\n const { x: x4, y: y6 } = p4.toAffine();\n if (!Fp.isValid(x4) || !Fp.isValid(y6))\n throw new Error(\"bad point: x or y not FE\");\n if (!isValidXY(x4, y6))\n throw new Error(\"bad point: equation left != right\");\n if (!p4.isTorsionFree())\n throw new Error(\"bad point: not in prime-order subgroup\");\n return true;\n });\n class Point3 {\n constructor(px, py, pz) {\n if (px == null || !Fp.isValid(px))\n throw new Error(\"x required\");\n if (py == null || !Fp.isValid(py) || Fp.is0(py))\n throw new Error(\"y required\");\n if (pz == null || !Fp.isValid(pz))\n throw new Error(\"z required\");\n this.px = px;\n this.py = py;\n this.pz = pz;\n Object.freeze(this);\n }\n // Does not validate if the point is on-curve.\n // Use fromHex instead, or call assertValidity() later.\n static fromAffine(p4) {\n const { x: x4, y: y6 } = p4 || {};\n if (!p4 || !Fp.isValid(x4) || !Fp.isValid(y6))\n throw new Error(\"invalid affine point\");\n if (p4 instanceof Point3)\n throw new Error(\"projective point not allowed\");\n const is0 = (i3) => Fp.eql(i3, Fp.ZERO);\n if (is0(x4) && is0(y6))\n return Point3.ZERO;\n return new Point3(x4, y6, Fp.ONE);\n }\n get x() {\n return this.toAffine().x;\n }\n get y() {\n return this.toAffine().y;\n }\n /**\n * Takes a bunch of Projective Points but executes only one\n * inversion on all of them. Inversion is very slow operation,\n * so this improves performance massively.\n * Optimization: converts a list of projective points to a list of identical points with Z=1.\n */\n static normalizeZ(points) {\n const toInv = FpInvertBatch(Fp, points.map((p4) => p4.pz));\n return points.map((p4, i3) => p4.toAffine(toInv[i3])).map(Point3.fromAffine);\n }\n /**\n * Converts hash string or Uint8Array to Point.\n * @param hex short/long ECDSA hex\n */\n static fromHex(hex) {\n const P2 = Point3.fromAffine(fromBytes5(ensureBytes(\"pointHex\", hex)));\n P2.assertValidity();\n return P2;\n }\n // Multiplies generator point by privateKey.\n static fromPrivateKey(privateKey) {\n return Point3.BASE.multiply(normPrivateKeyToScalar(privateKey));\n }\n // Multiscalar Multiplication\n static msm(points, scalars) {\n return pippenger(Point3, Fn, points, scalars);\n }\n // \"Private method\", don't use it directly\n _setWindowSize(windowSize) {\n wnaf.setWindowSize(this, windowSize);\n }\n // A point on curve is valid if it conforms to equation.\n assertValidity() {\n assertValidMemo(this);\n }\n hasEvenY() {\n const { y: y6 } = this.toAffine();\n if (Fp.isOdd)\n return !Fp.isOdd(y6);\n throw new Error(\"Field doesn't support isOdd\");\n }\n /**\n * Compare one point to another.\n */\n equals(other) {\n aprjpoint(other);\n const { px: X1, py: Y1, pz: Z1 } = this;\n const { px: X2, py: Y2, pz: Z2 } = other;\n const U1 = Fp.eql(Fp.mul(X1, Z2), Fp.mul(X2, Z1));\n const U22 = Fp.eql(Fp.mul(Y1, Z2), Fp.mul(Y2, Z1));\n return U1 && U22;\n }\n /**\n * Flips point to one corresponding to (x, -y) in Affine coordinates.\n */\n negate() {\n return new Point3(this.px, Fp.neg(this.py), this.pz);\n }\n // Renes-Costello-Batina exception-free doubling formula.\n // There is 30% faster Jacobian formula, but it is not complete.\n // https://eprint.iacr.org/2015/1060, algorithm 3\n // Cost: 8M + 3S + 3*a + 2*b3 + 15add.\n double() {\n const { a: a3, b: b4 } = CURVE;\n const b32 = Fp.mul(b4, _3n2);\n const { px: X1, py: Y1, pz: Z1 } = this;\n let X3 = Fp.ZERO, Y3 = Fp.ZERO, Z3 = Fp.ZERO;\n let t0 = Fp.mul(X1, X1);\n let t1 = Fp.mul(Y1, Y1);\n let t22 = Fp.mul(Z1, Z1);\n let t3 = Fp.mul(X1, Y1);\n t3 = Fp.add(t3, t3);\n Z3 = Fp.mul(X1, Z1);\n Z3 = Fp.add(Z3, Z3);\n X3 = Fp.mul(a3, Z3);\n Y3 = Fp.mul(b32, t22);\n Y3 = Fp.add(X3, Y3);\n X3 = Fp.sub(t1, Y3);\n Y3 = Fp.add(t1, Y3);\n Y3 = Fp.mul(X3, Y3);\n X3 = Fp.mul(t3, X3);\n Z3 = Fp.mul(b32, Z3);\n t22 = Fp.mul(a3, t22);\n t3 = Fp.sub(t0, t22);\n t3 = Fp.mul(a3, t3);\n t3 = Fp.add(t3, Z3);\n Z3 = Fp.add(t0, t0);\n t0 = Fp.add(Z3, t0);\n t0 = Fp.add(t0, t22);\n t0 = Fp.mul(t0, t3);\n Y3 = Fp.add(Y3, t0);\n t22 = Fp.mul(Y1, Z1);\n t22 = Fp.add(t22, t22);\n t0 = Fp.mul(t22, t3);\n X3 = Fp.sub(X3, t0);\n Z3 = Fp.mul(t22, t1);\n Z3 = Fp.add(Z3, Z3);\n Z3 = Fp.add(Z3, Z3);\n return new Point3(X3, Y3, Z3);\n }\n // Renes-Costello-Batina exception-free addition formula.\n // There is 30% faster Jacobian formula, but it is not complete.\n // https://eprint.iacr.org/2015/1060, algorithm 1\n // Cost: 12M + 0S + 3*a + 3*b3 + 23add.\n add(other) {\n aprjpoint(other);\n const { px: X1, py: Y1, pz: Z1 } = this;\n const { px: X2, py: Y2, pz: Z2 } = other;\n let X3 = Fp.ZERO, Y3 = Fp.ZERO, Z3 = Fp.ZERO;\n const a3 = CURVE.a;\n const b32 = Fp.mul(CURVE.b, _3n2);\n let t0 = Fp.mul(X1, X2);\n let t1 = Fp.mul(Y1, Y2);\n let t22 = Fp.mul(Z1, Z2);\n let t3 = Fp.add(X1, Y1);\n let t4 = Fp.add(X2, Y2);\n t3 = Fp.mul(t3, t4);\n t4 = Fp.add(t0, t1);\n t3 = Fp.sub(t3, t4);\n t4 = Fp.add(X1, Z1);\n let t5 = Fp.add(X2, Z2);\n t4 = Fp.mul(t4, t5);\n t5 = Fp.add(t0, t22);\n t4 = Fp.sub(t4, t5);\n t5 = Fp.add(Y1, Z1);\n X3 = Fp.add(Y2, Z2);\n t5 = Fp.mul(t5, X3);\n X3 = Fp.add(t1, t22);\n t5 = Fp.sub(t5, X3);\n Z3 = Fp.mul(a3, t4);\n X3 = Fp.mul(b32, t22);\n Z3 = Fp.add(X3, Z3);\n X3 = Fp.sub(t1, Z3);\n Z3 = Fp.add(t1, Z3);\n Y3 = Fp.mul(X3, Z3);\n t1 = Fp.add(t0, t0);\n t1 = Fp.add(t1, t0);\n t22 = Fp.mul(a3, t22);\n t4 = Fp.mul(b32, t4);\n t1 = Fp.add(t1, t22);\n t22 = Fp.sub(t0, t22);\n t22 = Fp.mul(a3, t22);\n t4 = Fp.add(t4, t22);\n t0 = Fp.mul(t1, t4);\n Y3 = Fp.add(Y3, t0);\n t0 = Fp.mul(t5, t4);\n X3 = Fp.mul(t3, X3);\n X3 = Fp.sub(X3, t0);\n t0 = Fp.mul(t3, t1);\n Z3 = Fp.mul(t5, Z3);\n Z3 = Fp.add(Z3, t0);\n return new Point3(X3, Y3, Z3);\n }\n subtract(other) {\n return this.add(other.negate());\n }\n is0() {\n return this.equals(Point3.ZERO);\n }\n wNAF(n2) {\n return wnaf.wNAFCached(this, n2, Point3.normalizeZ);\n }\n /**\n * Non-constant-time multiplication. Uses double-and-add algorithm.\n * It's faster, but should only be used when you don't care about\n * an exposed private key e.g. sig verification, which works over *public* keys.\n */\n multiplyUnsafe(sc) {\n const { endo: endo2, n: N4 } = CURVE;\n aInRange(\"scalar\", sc, _0n5, N4);\n const I2 = Point3.ZERO;\n if (sc === _0n5)\n return I2;\n if (this.is0() || sc === _1n5)\n return this;\n if (!endo2 || wnaf.hasPrecomputes(this))\n return wnaf.wNAFCachedUnsafe(this, sc, Point3.normalizeZ);\n let { k1neg, k1, k2neg, k2: k22 } = endo2.splitScalar(sc);\n let k1p = I2;\n let k2p = I2;\n let d5 = this;\n while (k1 > _0n5 || k22 > _0n5) {\n if (k1 & _1n5)\n k1p = k1p.add(d5);\n if (k22 & _1n5)\n k2p = k2p.add(d5);\n d5 = d5.double();\n k1 >>= _1n5;\n k22 >>= _1n5;\n }\n if (k1neg)\n k1p = k1p.negate();\n if (k2neg)\n k2p = k2p.negate();\n k2p = new Point3(Fp.mul(k2p.px, endo2.beta), k2p.py, k2p.pz);\n return k1p.add(k2p);\n }\n /**\n * Constant time multiplication.\n * Uses wNAF method. Windowed method may be 10% faster,\n * but takes 2x longer to generate and consumes 2x memory.\n * Uses precomputes when available.\n * Uses endomorphism for Koblitz curves.\n * @param scalar by which the point would be multiplied\n * @returns New point\n */\n multiply(scalar) {\n const { endo: endo2, n: N4 } = CURVE;\n aInRange(\"scalar\", scalar, _1n5, N4);\n let point, fake;\n if (endo2) {\n const { k1neg, k1, k2neg, k2: k22 } = endo2.splitScalar(scalar);\n let { p: k1p, f: f1p } = this.wNAF(k1);\n let { p: k2p, f: f2p } = this.wNAF(k22);\n k1p = wnaf.constTimeNegate(k1neg, k1p);\n k2p = wnaf.constTimeNegate(k2neg, k2p);\n k2p = new Point3(Fp.mul(k2p.px, endo2.beta), k2p.py, k2p.pz);\n point = k1p.add(k2p);\n fake = f1p.add(f2p);\n } else {\n const { p: p4, f: f6 } = this.wNAF(scalar);\n point = p4;\n fake = f6;\n }\n return Point3.normalizeZ([point, fake])[0];\n }\n /**\n * Efficiently calculate `aP + bQ`. Unsafe, can expose private key, if used incorrectly.\n * Not using Strauss-Shamir trick: precomputation tables are faster.\n * The trick could be useful if both P and Q are not G (not in our case).\n * @returns non-zero affine point\n */\n multiplyAndAddUnsafe(Q2, a3, b4) {\n const G = Point3.BASE;\n const mul = (P2, a4) => a4 === _0n5 || a4 === _1n5 || !P2.equals(G) ? P2.multiplyUnsafe(a4) : P2.multiply(a4);\n const sum = mul(this, a3).add(mul(Q2, b4));\n return sum.is0() ? void 0 : sum;\n }\n // Converts Projective point to affine (x, y) coordinates.\n // Can accept precomputed Z^-1 - for example, from invertBatch.\n // (x, y, z) ∋ (x=x/z, y=y/z)\n toAffine(iz) {\n return toAffineMemo(this, iz);\n }\n isTorsionFree() {\n const { h: cofactor, isTorsionFree } = CURVE;\n if (cofactor === _1n5)\n return true;\n if (isTorsionFree)\n return isTorsionFree(Point3, this);\n throw new Error(\"isTorsionFree() has not been declared for the elliptic curve\");\n }\n clearCofactor() {\n const { h: cofactor, clearCofactor } = CURVE;\n if (cofactor === _1n5)\n return this;\n if (clearCofactor)\n return clearCofactor(Point3, this);\n return this.multiplyUnsafe(CURVE.h);\n }\n toRawBytes(isCompressed = true) {\n abool(\"isCompressed\", isCompressed);\n this.assertValidity();\n return toBytes5(Point3, this, isCompressed);\n }\n toHex(isCompressed = true) {\n abool(\"isCompressed\", isCompressed);\n return bytesToHex3(this.toRawBytes(isCompressed));\n }\n }\n Point3.BASE = new Point3(CURVE.Gx, CURVE.Gy, Fp.ONE);\n Point3.ZERO = new Point3(Fp.ZERO, Fp.ONE, Fp.ZERO);\n const { endo, nBitLength } = CURVE;\n const wnaf = wNAF(Point3, endo ? Math.ceil(nBitLength / 2) : nBitLength);\n return {\n CURVE,\n ProjectivePoint: Point3,\n normPrivateKeyToScalar,\n weierstrassEquation,\n isWithinCurveOrder\n };\n }\n function validateOpts(curve) {\n const opts = validateBasic(curve);\n validateObject(opts, {\n hash: \"hash\",\n hmac: \"function\",\n randomBytes: \"function\"\n }, {\n bits2int: \"function\",\n bits2int_modN: \"function\",\n lowS: \"boolean\"\n });\n return Object.freeze({ lowS: true, ...opts });\n }\n function weierstrass(curveDef) {\n const CURVE = validateOpts(curveDef);\n const { Fp, n: CURVE_ORDER, nByteLength, nBitLength } = CURVE;\n const compressedLen = Fp.BYTES + 1;\n const uncompressedLen = 2 * Fp.BYTES + 1;\n function modN2(a3) {\n return mod(a3, CURVE_ORDER);\n }\n function invN(a3) {\n return invert(a3, CURVE_ORDER);\n }\n const { ProjectivePoint: Point3, normPrivateKeyToScalar, weierstrassEquation, isWithinCurveOrder } = weierstrassPoints({\n ...CURVE,\n toBytes(_c, point, isCompressed) {\n const a3 = point.toAffine();\n const x4 = Fp.toBytes(a3.x);\n const cat = concatBytes3;\n abool(\"isCompressed\", isCompressed);\n if (isCompressed) {\n return cat(Uint8Array.from([point.hasEvenY() ? 2 : 3]), x4);\n } else {\n return cat(Uint8Array.from([4]), x4, Fp.toBytes(a3.y));\n }\n },\n fromBytes(bytes) {\n const len = bytes.length;\n const head = bytes[0];\n const tail = bytes.subarray(1);\n if (len === compressedLen && (head === 2 || head === 3)) {\n const x4 = bytesToNumberBE(tail);\n if (!inRange(x4, _1n5, Fp.ORDER))\n throw new Error(\"Point is not on curve\");\n const y22 = weierstrassEquation(x4);\n let y6;\n try {\n y6 = Fp.sqrt(y22);\n } catch (sqrtError) {\n const suffix = sqrtError instanceof Error ? \": \" + sqrtError.message : \"\";\n throw new Error(\"Point is not on curve\" + suffix);\n }\n const isYOdd = (y6 & _1n5) === _1n5;\n const isHeadOdd = (head & 1) === 1;\n if (isHeadOdd !== isYOdd)\n y6 = Fp.neg(y6);\n return { x: x4, y: y6 };\n } else if (len === uncompressedLen && head === 4) {\n const x4 = Fp.fromBytes(tail.subarray(0, Fp.BYTES));\n const y6 = Fp.fromBytes(tail.subarray(Fp.BYTES, 2 * Fp.BYTES));\n return { x: x4, y: y6 };\n } else {\n const cl = compressedLen;\n const ul = uncompressedLen;\n throw new Error(\"invalid Point, expected length of \" + cl + \", or uncompressed \" + ul + \", got \" + len);\n }\n }\n });\n function isBiggerThanHalfOrder(number2) {\n const HALF = CURVE_ORDER >> _1n5;\n return number2 > HALF;\n }\n function normalizeS(s4) {\n return isBiggerThanHalfOrder(s4) ? modN2(-s4) : s4;\n }\n const slcNum = (b4, from14, to) => bytesToNumberBE(b4.slice(from14, to));\n class Signature2 {\n constructor(r2, s4, recovery) {\n aInRange(\"r\", r2, _1n5, CURVE_ORDER);\n aInRange(\"s\", s4, _1n5, CURVE_ORDER);\n this.r = r2;\n this.s = s4;\n if (recovery != null)\n this.recovery = recovery;\n Object.freeze(this);\n }\n // pair (bytes of r, bytes of s)\n static fromCompact(hex) {\n const l6 = nByteLength;\n hex = ensureBytes(\"compactSignature\", hex, l6 * 2);\n return new Signature2(slcNum(hex, 0, l6), slcNum(hex, l6, 2 * l6));\n }\n // DER encoded ECDSA signature\n // https://bitcoin.stackexchange.com/questions/57644/what-are-the-parts-of-a-bitcoin-transaction-input-script\n static fromDER(hex) {\n const { r: r2, s: s4 } = DER.toSig(ensureBytes(\"DER\", hex));\n return new Signature2(r2, s4);\n }\n /**\n * @todo remove\n * @deprecated\n */\n assertValidity() {\n }\n addRecoveryBit(recovery) {\n return new Signature2(this.r, this.s, recovery);\n }\n recoverPublicKey(msgHash) {\n const { r: r2, s: s4, recovery: rec } = this;\n const h4 = bits2int_modN(ensureBytes(\"msgHash\", msgHash));\n if (rec == null || ![0, 1, 2, 3].includes(rec))\n throw new Error(\"recovery id invalid\");\n const radj = rec === 2 || rec === 3 ? r2 + CURVE.n : r2;\n if (radj >= Fp.ORDER)\n throw new Error(\"recovery id 2 or 3 invalid\");\n const prefix = (rec & 1) === 0 ? \"02\" : \"03\";\n const R3 = Point3.fromHex(prefix + numToSizedHex(radj, Fp.BYTES));\n const ir = invN(radj);\n const u1 = modN2(-h4 * ir);\n const u2 = modN2(s4 * ir);\n const Q2 = Point3.BASE.multiplyAndAddUnsafe(R3, u1, u2);\n if (!Q2)\n throw new Error(\"point at infinify\");\n Q2.assertValidity();\n return Q2;\n }\n // Signatures should be low-s, to prevent malleability.\n hasHighS() {\n return isBiggerThanHalfOrder(this.s);\n }\n normalizeS() {\n return this.hasHighS() ? new Signature2(this.r, modN2(-this.s), this.recovery) : this;\n }\n // DER-encoded\n toDERRawBytes() {\n return hexToBytes3(this.toDERHex());\n }\n toDERHex() {\n return DER.hexFromSig(this);\n }\n // padded bytes of r, then padded bytes of s\n toCompactRawBytes() {\n return hexToBytes3(this.toCompactHex());\n }\n toCompactHex() {\n const l6 = nByteLength;\n return numToSizedHex(this.r, l6) + numToSizedHex(this.s, l6);\n }\n }\n const utils = {\n isValidPrivateKey(privateKey) {\n try {\n normPrivateKeyToScalar(privateKey);\n return true;\n } catch (error) {\n return false;\n }\n },\n normPrivateKeyToScalar,\n /**\n * Produces cryptographically secure private key from random of size\n * (groupLen + ceil(groupLen / 2)) with modulo bias being negligible.\n */\n randomPrivateKey: () => {\n const length2 = getMinHashLength(CURVE.n);\n return mapHashToField(CURVE.randomBytes(length2), CURVE.n);\n },\n /**\n * Creates precompute table for an arbitrary EC point. Makes point \"cached\".\n * Allows to massively speed-up `point.multiply(scalar)`.\n * @returns cached point\n * @example\n * const fast = utils.precompute(8, ProjectivePoint.fromHex(someonesPubKey));\n * fast.multiply(privKey); // much faster ECDH now\n */\n precompute(windowSize = 8, point = Point3.BASE) {\n point._setWindowSize(windowSize);\n point.multiply(BigInt(3));\n return point;\n }\n };\n function getPublicKey(privateKey, isCompressed = true) {\n return Point3.fromPrivateKey(privateKey).toRawBytes(isCompressed);\n }\n function isProbPub(item) {\n if (typeof item === \"bigint\")\n return false;\n if (item instanceof Point3)\n return true;\n const arr = ensureBytes(\"key\", item);\n const len = arr.length;\n const fpl = Fp.BYTES;\n const compLen = fpl + 1;\n const uncompLen = 2 * fpl + 1;\n if (CURVE.allowedPrivateKeyLengths || nByteLength === compLen) {\n return void 0;\n } else {\n return len === compLen || len === uncompLen;\n }\n }\n function getSharedSecret(privateA, publicB, isCompressed = true) {\n if (isProbPub(privateA) === true)\n throw new Error(\"first arg must be private key\");\n if (isProbPub(publicB) === false)\n throw new Error(\"second arg must be public key\");\n const b4 = Point3.fromHex(publicB);\n return b4.multiply(normPrivateKeyToScalar(privateA)).toRawBytes(isCompressed);\n }\n const bits2int = CURVE.bits2int || function(bytes) {\n if (bytes.length > 8192)\n throw new Error(\"input is too large\");\n const num2 = bytesToNumberBE(bytes);\n const delta = bytes.length * 8 - nBitLength;\n return delta > 0 ? num2 >> BigInt(delta) : num2;\n };\n const bits2int_modN = CURVE.bits2int_modN || function(bytes) {\n return modN2(bits2int(bytes));\n };\n const ORDER_MASK = bitMask(nBitLength);\n function int2octets(num2) {\n aInRange(\"num < 2^\" + nBitLength, num2, _0n5, ORDER_MASK);\n return numberToBytesBE(num2, nByteLength);\n }\n function prepSig(msgHash, privateKey, opts = defaultSigOpts) {\n if ([\"recovered\", \"canonical\"].some((k4) => k4 in opts))\n throw new Error(\"sign() legacy options not supported\");\n const { hash: hash3, randomBytes: randomBytes2 } = CURVE;\n let { lowS, prehash, extraEntropy: ent } = opts;\n if (lowS == null)\n lowS = true;\n msgHash = ensureBytes(\"msgHash\", msgHash);\n validateSigVerOpts(opts);\n if (prehash)\n msgHash = ensureBytes(\"prehashed msgHash\", hash3(msgHash));\n const h1int = bits2int_modN(msgHash);\n const d5 = normPrivateKeyToScalar(privateKey);\n const seedArgs = [int2octets(d5), int2octets(h1int)];\n if (ent != null && ent !== false) {\n const e3 = ent === true ? randomBytes2(Fp.BYTES) : ent;\n seedArgs.push(ensureBytes(\"extraEntropy\", e3));\n }\n const seed = concatBytes3(...seedArgs);\n const m2 = h1int;\n function k2sig(kBytes) {\n const k4 = bits2int(kBytes);\n if (!isWithinCurveOrder(k4))\n return;\n const ik = invN(k4);\n const q3 = Point3.BASE.multiply(k4).toAffine();\n const r2 = modN2(q3.x);\n if (r2 === _0n5)\n return;\n const s4 = modN2(ik * modN2(m2 + r2 * d5));\n if (s4 === _0n5)\n return;\n let recovery = (q3.x === r2 ? 0 : 2) | Number(q3.y & _1n5);\n let normS = s4;\n if (lowS && isBiggerThanHalfOrder(s4)) {\n normS = normalizeS(s4);\n recovery ^= 1;\n }\n return new Signature2(r2, normS, recovery);\n }\n return { seed, k2sig };\n }\n const defaultSigOpts = { lowS: CURVE.lowS, prehash: false };\n const defaultVerOpts = { lowS: CURVE.lowS, prehash: false };\n function sign3(msgHash, privKey, opts = defaultSigOpts) {\n const { seed, k2sig } = prepSig(msgHash, privKey, opts);\n const C = CURVE;\n const drbg = createHmacDrbg(C.hash.outputLen, C.nByteLength, C.hmac);\n return drbg(seed, k2sig);\n }\n Point3.BASE._setWindowSize(8);\n function verify(signature, msgHash, publicKey, opts = defaultVerOpts) {\n const sg = signature;\n msgHash = ensureBytes(\"msgHash\", msgHash);\n publicKey = ensureBytes(\"publicKey\", publicKey);\n const { lowS, prehash, format } = opts;\n validateSigVerOpts(opts);\n if (\"strict\" in opts)\n throw new Error(\"options.strict was renamed to lowS\");\n if (format !== void 0 && format !== \"compact\" && format !== \"der\")\n throw new Error(\"format must be compact or der\");\n const isHex2 = typeof sg === \"string\" || isBytes2(sg);\n const isObj = !isHex2 && !format && typeof sg === \"object\" && sg !== null && typeof sg.r === \"bigint\" && typeof sg.s === \"bigint\";\n if (!isHex2 && !isObj)\n throw new Error(\"invalid signature, expected Uint8Array, hex string or Signature instance\");\n let _sig = void 0;\n let P2;\n try {\n if (isObj)\n _sig = new Signature2(sg.r, sg.s);\n if (isHex2) {\n try {\n if (format !== \"compact\")\n _sig = Signature2.fromDER(sg);\n } catch (derError) {\n if (!(derError instanceof DER.Err))\n throw derError;\n }\n if (!_sig && format !== \"der\")\n _sig = Signature2.fromCompact(sg);\n }\n P2 = Point3.fromHex(publicKey);\n } catch (error) {\n return false;\n }\n if (!_sig)\n return false;\n if (lowS && _sig.hasHighS())\n return false;\n if (prehash)\n msgHash = CURVE.hash(msgHash);\n const { r: r2, s: s4 } = _sig;\n const h4 = bits2int_modN(msgHash);\n const is = invN(s4);\n const u1 = modN2(h4 * is);\n const u2 = modN2(r2 * is);\n const R3 = Point3.BASE.multiplyAndAddUnsafe(P2, u1, u2)?.toAffine();\n if (!R3)\n return false;\n const v2 = modN2(R3.x);\n return v2 === r2;\n }\n return {\n CURVE,\n getPublicKey,\n getSharedSecret,\n sign: sign3,\n verify,\n ProjectivePoint: Point3,\n Signature: Signature2,\n utils\n };\n }\n function SWUFpSqrtRatio(Fp, Z2) {\n const q3 = Fp.ORDER;\n let l6 = _0n5;\n for (let o5 = q3 - _1n5; o5 % _2n3 === _0n5; o5 /= _2n3)\n l6 += _1n5;\n const c1 = l6;\n const _2n_pow_c1_1 = _2n3 << c1 - _1n5 - _1n5;\n const _2n_pow_c1 = _2n_pow_c1_1 * _2n3;\n const c22 = (q3 - _1n5) / _2n_pow_c1;\n const c32 = (c22 - _1n5) / _2n3;\n const c4 = _2n_pow_c1 - _1n5;\n const c5 = _2n_pow_c1_1;\n const c6 = Fp.pow(Z2, c22);\n const c7 = Fp.pow(Z2, (c22 + _1n5) / _2n3);\n let sqrtRatio = (u2, v2) => {\n let tv1 = c6;\n let tv2 = Fp.pow(v2, c4);\n let tv3 = Fp.sqr(tv2);\n tv3 = Fp.mul(tv3, v2);\n let tv5 = Fp.mul(u2, tv3);\n tv5 = Fp.pow(tv5, c32);\n tv5 = Fp.mul(tv5, tv2);\n tv2 = Fp.mul(tv5, v2);\n tv3 = Fp.mul(tv5, u2);\n let tv4 = Fp.mul(tv3, tv2);\n tv5 = Fp.pow(tv4, c5);\n let isQR = Fp.eql(tv5, Fp.ONE);\n tv2 = Fp.mul(tv3, c7);\n tv5 = Fp.mul(tv4, tv1);\n tv3 = Fp.cmov(tv2, tv3, isQR);\n tv4 = Fp.cmov(tv5, tv4, isQR);\n for (let i3 = c1; i3 > _1n5; i3--) {\n let tv52 = i3 - _2n3;\n tv52 = _2n3 << tv52 - _1n5;\n let tvv5 = Fp.pow(tv4, tv52);\n const e1 = Fp.eql(tvv5, Fp.ONE);\n tv2 = Fp.mul(tv3, tv1);\n tv1 = Fp.mul(tv1, tv1);\n tvv5 = Fp.mul(tv4, tv1);\n tv3 = Fp.cmov(tv2, tv3, e1);\n tv4 = Fp.cmov(tvv5, tv4, e1);\n }\n return { isValid: isQR, value: tv3 };\n };\n if (Fp.ORDER % _4n2 === _3n2) {\n const c12 = (Fp.ORDER - _3n2) / _4n2;\n const c23 = Fp.sqrt(Fp.neg(Z2));\n sqrtRatio = (u2, v2) => {\n let tv1 = Fp.sqr(v2);\n const tv2 = Fp.mul(u2, v2);\n tv1 = Fp.mul(tv1, tv2);\n let y1 = Fp.pow(tv1, c12);\n y1 = Fp.mul(y1, tv2);\n const y22 = Fp.mul(y1, c23);\n const tv3 = Fp.mul(Fp.sqr(y1), v2);\n const isQR = Fp.eql(tv3, u2);\n let y6 = Fp.cmov(y22, y1, isQR);\n return { isValid: isQR, value: y6 };\n };\n }\n return sqrtRatio;\n }\n function mapToCurveSimpleSWU(Fp, opts) {\n validateField(Fp);\n if (!Fp.isValid(opts.A) || !Fp.isValid(opts.B) || !Fp.isValid(opts.Z))\n throw new Error(\"mapToCurveSimpleSWU: invalid opts\");\n const sqrtRatio = SWUFpSqrtRatio(Fp, opts.Z);\n if (!Fp.isOdd)\n throw new Error(\"Fp.isOdd is not implemented!\");\n return (u2) => {\n let tv1, tv2, tv3, tv4, tv5, tv6, x4, y6;\n tv1 = Fp.sqr(u2);\n tv1 = Fp.mul(tv1, opts.Z);\n tv2 = Fp.sqr(tv1);\n tv2 = Fp.add(tv2, tv1);\n tv3 = Fp.add(tv2, Fp.ONE);\n tv3 = Fp.mul(tv3, opts.B);\n tv4 = Fp.cmov(opts.Z, Fp.neg(tv2), !Fp.eql(tv2, Fp.ZERO));\n tv4 = Fp.mul(tv4, opts.A);\n tv2 = Fp.sqr(tv3);\n tv6 = Fp.sqr(tv4);\n tv5 = Fp.mul(tv6, opts.A);\n tv2 = Fp.add(tv2, tv5);\n tv2 = Fp.mul(tv2, tv3);\n tv6 = Fp.mul(tv6, tv4);\n tv5 = Fp.mul(tv6, opts.B);\n tv2 = Fp.add(tv2, tv5);\n x4 = Fp.mul(tv1, tv3);\n const { isValid: isValid2, value } = sqrtRatio(tv2, tv6);\n y6 = Fp.mul(tv1, u2);\n y6 = Fp.mul(y6, value);\n x4 = Fp.cmov(x4, tv3, isValid2);\n y6 = Fp.cmov(y6, value, isValid2);\n const e1 = Fp.isOdd(u2) === Fp.isOdd(y6);\n y6 = Fp.cmov(Fp.neg(y6), y6, e1);\n const tv4_inv = FpInvertBatch(Fp, [tv4], true)[0];\n x4 = Fp.mul(x4, tv4_inv);\n return { x: x4, y: y6 };\n };\n }\n var DERErr, DER, _0n5, _1n5, _2n3, _3n2, _4n2;\n var init_weierstrass = __esm({\n \"../../../node_modules/.pnpm/@noble+curves@1.9.1/node_modules/@noble/curves/esm/abstract/weierstrass.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_curve();\n init_modular();\n init_utils5();\n DERErr = class extends Error {\n constructor(m2 = \"\") {\n super(m2);\n }\n };\n DER = {\n // asn.1 DER encoding utils\n Err: DERErr,\n // Basic building block is TLV (Tag-Length-Value)\n _tlv: {\n encode: (tag, data) => {\n const { Err: E2 } = DER;\n if (tag < 0 || tag > 256)\n throw new E2(\"tlv.encode: wrong tag\");\n if (data.length & 1)\n throw new E2(\"tlv.encode: unpadded data\");\n const dataLen = data.length / 2;\n const len = numberToHexUnpadded(dataLen);\n if (len.length / 2 & 128)\n throw new E2(\"tlv.encode: long form length too big\");\n const lenLen = dataLen > 127 ? numberToHexUnpadded(len.length / 2 | 128) : \"\";\n const t3 = numberToHexUnpadded(tag);\n return t3 + lenLen + len + data;\n },\n // v - value, l - left bytes (unparsed)\n decode(tag, data) {\n const { Err: E2 } = DER;\n let pos = 0;\n if (tag < 0 || tag > 256)\n throw new E2(\"tlv.encode: wrong tag\");\n if (data.length < 2 || data[pos++] !== tag)\n throw new E2(\"tlv.decode: wrong tlv\");\n const first = data[pos++];\n const isLong = !!(first & 128);\n let length2 = 0;\n if (!isLong)\n length2 = first;\n else {\n const lenLen = first & 127;\n if (!lenLen)\n throw new E2(\"tlv.decode(long): indefinite length not supported\");\n if (lenLen > 4)\n throw new E2(\"tlv.decode(long): byte length is too big\");\n const lengthBytes = data.subarray(pos, pos + lenLen);\n if (lengthBytes.length !== lenLen)\n throw new E2(\"tlv.decode: length bytes not complete\");\n if (lengthBytes[0] === 0)\n throw new E2(\"tlv.decode(long): zero leftmost byte\");\n for (const b4 of lengthBytes)\n length2 = length2 << 8 | b4;\n pos += lenLen;\n if (length2 < 128)\n throw new E2(\"tlv.decode(long): not minimal encoding\");\n }\n const v2 = data.subarray(pos, pos + length2);\n if (v2.length !== length2)\n throw new E2(\"tlv.decode: wrong value length\");\n return { v: v2, l: data.subarray(pos + length2) };\n }\n },\n // https://crypto.stackexchange.com/a/57734 Leftmost bit of first byte is 'negative' flag,\n // since we always use positive integers here. It must always be empty:\n // - add zero byte if exists\n // - if next byte doesn't have a flag, leading zero is not allowed (minimal encoding)\n _int: {\n encode(num2) {\n const { Err: E2 } = DER;\n if (num2 < _0n5)\n throw new E2(\"integer: negative integers are not allowed\");\n let hex = numberToHexUnpadded(num2);\n if (Number.parseInt(hex[0], 16) & 8)\n hex = \"00\" + hex;\n if (hex.length & 1)\n throw new E2(\"unexpected DER parsing assertion: unpadded hex\");\n return hex;\n },\n decode(data) {\n const { Err: E2 } = DER;\n if (data[0] & 128)\n throw new E2(\"invalid signature integer: negative\");\n if (data[0] === 0 && !(data[1] & 128))\n throw new E2(\"invalid signature integer: unnecessary leading zero\");\n return bytesToNumberBE(data);\n }\n },\n toSig(hex) {\n const { Err: E2, _int: int, _tlv: tlv } = DER;\n const data = ensureBytes(\"signature\", hex);\n const { v: seqBytes, l: seqLeftBytes } = tlv.decode(48, data);\n if (seqLeftBytes.length)\n throw new E2(\"invalid signature: left bytes after parsing\");\n const { v: rBytes, l: rLeftBytes } = tlv.decode(2, seqBytes);\n const { v: sBytes, l: sLeftBytes } = tlv.decode(2, rLeftBytes);\n if (sLeftBytes.length)\n throw new E2(\"invalid signature: left bytes after parsing\");\n return { r: int.decode(rBytes), s: int.decode(sBytes) };\n },\n hexFromSig(sig) {\n const { _tlv: tlv, _int: int } = DER;\n const rs = tlv.encode(2, int.encode(sig.r));\n const ss = tlv.encode(2, int.encode(sig.s));\n const seq = rs + ss;\n return tlv.encode(48, seq);\n }\n };\n _0n5 = BigInt(0);\n _1n5 = BigInt(1);\n _2n3 = BigInt(2);\n _3n2 = BigInt(3);\n _4n2 = BigInt(4);\n }\n });\n\n // ../../../node_modules/.pnpm/@noble+curves@1.9.1/node_modules/@noble/curves/esm/_shortw_utils.js\n function getHash(hash3) {\n return {\n hash: hash3,\n hmac: (key, ...msgs) => hmac(hash3, key, concatBytes(...msgs)),\n randomBytes\n };\n }\n function createCurve(curveDef, defHash) {\n const create2 = (hash3) => weierstrass({ ...curveDef, ...getHash(hash3) });\n return { ...create2(defHash), create: create2 };\n }\n var init_shortw_utils = __esm({\n \"../../../node_modules/.pnpm/@noble+curves@1.9.1/node_modules/@noble/curves/esm/_shortw_utils.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_hmac();\n init_utils3();\n init_weierstrass();\n }\n });\n\n // ../../../node_modules/.pnpm/@noble+curves@1.9.1/node_modules/@noble/curves/esm/abstract/hash-to-curve.js\n function i2osp(value, length2) {\n anum(value);\n anum(length2);\n if (value < 0 || value >= 1 << 8 * length2)\n throw new Error(\"invalid I2OSP input: \" + value);\n const res = Array.from({ length: length2 }).fill(0);\n for (let i3 = length2 - 1; i3 >= 0; i3--) {\n res[i3] = value & 255;\n value >>>= 8;\n }\n return new Uint8Array(res);\n }\n function strxor(a3, b4) {\n const arr = new Uint8Array(a3.length);\n for (let i3 = 0; i3 < a3.length; i3++) {\n arr[i3] = a3[i3] ^ b4[i3];\n }\n return arr;\n }\n function anum(item) {\n if (!Number.isSafeInteger(item))\n throw new Error(\"number expected\");\n }\n function expand_message_xmd(msg, DST, lenInBytes, H3) {\n abytes2(msg);\n abytes2(DST);\n anum(lenInBytes);\n if (DST.length > 255)\n DST = H3(concatBytes3(utf8ToBytes2(\"H2C-OVERSIZE-DST-\"), DST));\n const { outputLen: b_in_bytes, blockLen: r_in_bytes } = H3;\n const ell = Math.ceil(lenInBytes / b_in_bytes);\n if (lenInBytes > 65535 || ell > 255)\n throw new Error(\"expand_message_xmd: invalid lenInBytes\");\n const DST_prime = concatBytes3(DST, i2osp(DST.length, 1));\n const Z_pad = i2osp(0, r_in_bytes);\n const l_i_b_str = i2osp(lenInBytes, 2);\n const b4 = new Array(ell);\n const b_0 = H3(concatBytes3(Z_pad, msg, l_i_b_str, i2osp(0, 1), DST_prime));\n b4[0] = H3(concatBytes3(b_0, i2osp(1, 1), DST_prime));\n for (let i3 = 1; i3 <= ell; i3++) {\n const args = [strxor(b_0, b4[i3 - 1]), i2osp(i3 + 1, 1), DST_prime];\n b4[i3] = H3(concatBytes3(...args));\n }\n const pseudo_random_bytes = concatBytes3(...b4);\n return pseudo_random_bytes.slice(0, lenInBytes);\n }\n function expand_message_xof(msg, DST, lenInBytes, k4, H3) {\n abytes2(msg);\n abytes2(DST);\n anum(lenInBytes);\n if (DST.length > 255) {\n const dkLen = Math.ceil(2 * k4 / 8);\n DST = H3.create({ dkLen }).update(utf8ToBytes2(\"H2C-OVERSIZE-DST-\")).update(DST).digest();\n }\n if (lenInBytes > 65535 || DST.length > 255)\n throw new Error(\"expand_message_xof: invalid lenInBytes\");\n return H3.create({ dkLen: lenInBytes }).update(msg).update(i2osp(lenInBytes, 2)).update(DST).update(i2osp(DST.length, 1)).digest();\n }\n function hash_to_field(msg, count, options) {\n validateObject(options, {\n DST: \"stringOrUint8Array\",\n p: \"bigint\",\n m: \"isSafeInteger\",\n k: \"isSafeInteger\",\n hash: \"hash\"\n });\n const { p: p4, k: k4, m: m2, hash: hash3, expand, DST: _DST } = options;\n abytes2(msg);\n anum(count);\n const DST = typeof _DST === \"string\" ? utf8ToBytes2(_DST) : _DST;\n const log2p = p4.toString(2).length;\n const L2 = Math.ceil((log2p + k4) / 8);\n const len_in_bytes = count * m2 * L2;\n let prb;\n if (expand === \"xmd\") {\n prb = expand_message_xmd(msg, DST, len_in_bytes, hash3);\n } else if (expand === \"xof\") {\n prb = expand_message_xof(msg, DST, len_in_bytes, k4, hash3);\n } else if (expand === \"_internal_pass\") {\n prb = msg;\n } else {\n throw new Error('expand must be \"xmd\" or \"xof\"');\n }\n const u2 = new Array(count);\n for (let i3 = 0; i3 < count; i3++) {\n const e3 = new Array(m2);\n for (let j2 = 0; j2 < m2; j2++) {\n const elm_offset = L2 * (j2 + i3 * m2);\n const tv = prb.subarray(elm_offset, elm_offset + L2);\n e3[j2] = mod(os2ip(tv), p4);\n }\n u2[i3] = e3;\n }\n return u2;\n }\n function isogenyMap(field, map) {\n const coeff = map.map((i3) => Array.from(i3).reverse());\n return (x4, y6) => {\n const [xn, xd, yn, yd] = coeff.map((val) => val.reduce((acc, i3) => field.add(field.mul(acc, x4), i3)));\n const [xd_inv, yd_inv] = FpInvertBatch(field, [xd, yd], true);\n x4 = field.mul(xn, xd_inv);\n y6 = field.mul(y6, field.mul(yn, yd_inv));\n return { x: x4, y: y6 };\n };\n }\n function createHasher2(Point3, mapToCurve, defaults) {\n if (typeof mapToCurve !== \"function\")\n throw new Error(\"mapToCurve() must be defined\");\n function map(num2) {\n return Point3.fromAffine(mapToCurve(num2));\n }\n function clear(initial) {\n const P2 = initial.clearCofactor();\n if (P2.equals(Point3.ZERO))\n return Point3.ZERO;\n P2.assertValidity();\n return P2;\n }\n return {\n defaults,\n // Encodes byte string to elliptic curve.\n // hash_to_curve from https://www.rfc-editor.org/rfc/rfc9380#section-3\n hashToCurve(msg, options) {\n const u2 = hash_to_field(msg, 2, { ...defaults, DST: defaults.DST, ...options });\n const u0 = map(u2[0]);\n const u1 = map(u2[1]);\n return clear(u0.add(u1));\n },\n // Encodes byte string to elliptic curve.\n // encode_to_curve from https://www.rfc-editor.org/rfc/rfc9380#section-3\n encodeToCurve(msg, options) {\n const u2 = hash_to_field(msg, 1, { ...defaults, DST: defaults.encodeDST, ...options });\n return clear(map(u2[0]));\n },\n // Same as encodeToCurve, but without hash\n mapToCurve(scalars) {\n if (!Array.isArray(scalars))\n throw new Error(\"expected array of bigints\");\n for (const i3 of scalars)\n if (typeof i3 !== \"bigint\")\n throw new Error(\"expected array of bigints\");\n return clear(map(scalars));\n }\n };\n }\n var os2ip;\n var init_hash_to_curve = __esm({\n \"../../../node_modules/.pnpm/@noble+curves@1.9.1/node_modules/@noble/curves/esm/abstract/hash-to-curve.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_modular();\n init_utils5();\n os2ip = bytesToNumberBE;\n }\n });\n\n // ../../../node_modules/.pnpm/@noble+curves@1.9.1/node_modules/@noble/curves/esm/secp256k1.js\n var secp256k1_exports = {};\n __export(secp256k1_exports, {\n encodeToCurve: () => encodeToCurve,\n hashToCurve: () => hashToCurve,\n schnorr: () => schnorr,\n secp256k1: () => secp256k1,\n secp256k1_hasher: () => secp256k1_hasher\n });\n function sqrtMod(y6) {\n const P2 = secp256k1P;\n const _3n5 = BigInt(3), _6n = BigInt(6), _11n = BigInt(11), _22n = BigInt(22);\n const _23n = BigInt(23), _44n = BigInt(44), _88n = BigInt(88);\n const b22 = y6 * y6 * y6 % P2;\n const b32 = b22 * b22 * y6 % P2;\n const b6 = pow2(b32, _3n5, P2) * b32 % P2;\n const b9 = pow2(b6, _3n5, P2) * b32 % P2;\n const b11 = pow2(b9, _2n4, P2) * b22 % P2;\n const b222 = pow2(b11, _11n, P2) * b11 % P2;\n const b44 = pow2(b222, _22n, P2) * b222 % P2;\n const b88 = pow2(b44, _44n, P2) * b44 % P2;\n const b176 = pow2(b88, _88n, P2) * b88 % P2;\n const b220 = pow2(b176, _44n, P2) * b44 % P2;\n const b223 = pow2(b220, _3n5, P2) * b32 % P2;\n const t1 = pow2(b223, _23n, P2) * b222 % P2;\n const t22 = pow2(t1, _6n, P2) * b22 % P2;\n const root = pow2(t22, _2n4, P2);\n if (!Fpk1.eql(Fpk1.sqr(root), y6))\n throw new Error(\"Cannot find square root\");\n return root;\n }\n function taggedHash(tag, ...messages) {\n let tagP = TAGGED_HASH_PREFIXES[tag];\n if (tagP === void 0) {\n const tagH = sha256(Uint8Array.from(tag, (c4) => c4.charCodeAt(0)));\n tagP = concatBytes3(tagH, tagH);\n TAGGED_HASH_PREFIXES[tag] = tagP;\n }\n return sha256(concatBytes3(tagP, ...messages));\n }\n function schnorrGetExtPubKey(priv) {\n let d_ = secp256k1.utils.normPrivateKeyToScalar(priv);\n let p4 = Point.fromPrivateKey(d_);\n const scalar = p4.hasEvenY() ? d_ : modN(-d_);\n return { scalar, bytes: pointToBytes(p4) };\n }\n function lift_x(x4) {\n aInRange(\"x\", x4, _1n6, secp256k1P);\n const xx = modP(x4 * x4);\n const c4 = modP(xx * x4 + BigInt(7));\n let y6 = sqrtMod(c4);\n if (y6 % _2n4 !== _0n6)\n y6 = modP(-y6);\n const p4 = new Point(x4, y6, _1n6);\n p4.assertValidity();\n return p4;\n }\n function challenge(...args) {\n return modN(num(taggedHash(\"BIP0340/challenge\", ...args)));\n }\n function schnorrGetPublicKey(privateKey) {\n return schnorrGetExtPubKey(privateKey).bytes;\n }\n function schnorrSign(message, privateKey, auxRand = randomBytes(32)) {\n const m2 = ensureBytes(\"message\", message);\n const { bytes: px, scalar: d5 } = schnorrGetExtPubKey(privateKey);\n const a3 = ensureBytes(\"auxRand\", auxRand, 32);\n const t3 = numTo32b(d5 ^ num(taggedHash(\"BIP0340/aux\", a3)));\n const rand = taggedHash(\"BIP0340/nonce\", t3, px, m2);\n const k_ = modN(num(rand));\n if (k_ === _0n6)\n throw new Error(\"sign failed: k is zero\");\n const { bytes: rx, scalar: k4 } = schnorrGetExtPubKey(k_);\n const e3 = challenge(rx, px, m2);\n const sig = new Uint8Array(64);\n sig.set(rx, 0);\n sig.set(numTo32b(modN(k4 + e3 * d5)), 32);\n if (!schnorrVerify(sig, m2, px))\n throw new Error(\"sign: Invalid signature produced\");\n return sig;\n }\n function schnorrVerify(signature, message, publicKey) {\n const sig = ensureBytes(\"signature\", signature, 64);\n const m2 = ensureBytes(\"message\", message);\n const pub = ensureBytes(\"publicKey\", publicKey, 32);\n try {\n const P2 = lift_x(num(pub));\n const r2 = num(sig.subarray(0, 32));\n if (!inRange(r2, _1n6, secp256k1P))\n return false;\n const s4 = num(sig.subarray(32, 64));\n if (!inRange(s4, _1n6, secp256k1N))\n return false;\n const e3 = challenge(numTo32b(r2), pointToBytes(P2), m2);\n const R3 = GmulAdd(P2, s4, modN(-e3));\n if (!R3 || !R3.hasEvenY() || R3.toAffine().x !== r2)\n return false;\n return true;\n } catch (error) {\n return false;\n }\n }\n var secp256k1P, secp256k1N, _0n6, _1n6, _2n4, divNearest, Fpk1, secp256k1, TAGGED_HASH_PREFIXES, pointToBytes, numTo32b, modP, modN, Point, GmulAdd, num, schnorr, isoMap, mapSWU, secp256k1_hasher, hashToCurve, encodeToCurve;\n var init_secp256k1 = __esm({\n \"../../../node_modules/.pnpm/@noble+curves@1.9.1/node_modules/@noble/curves/esm/secp256k1.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_sha2();\n init_utils3();\n init_shortw_utils();\n init_hash_to_curve();\n init_modular();\n init_utils5();\n init_weierstrass();\n secp256k1P = BigInt(\"0xfffffffffffffffffffffffffffffffffffffffffffffffffffffffefffffc2f\");\n secp256k1N = BigInt(\"0xfffffffffffffffffffffffffffffffebaaedce6af48a03bbfd25e8cd0364141\");\n _0n6 = BigInt(0);\n _1n6 = BigInt(1);\n _2n4 = BigInt(2);\n divNearest = (a3, b4) => (a3 + b4 / _2n4) / b4;\n Fpk1 = Field(secp256k1P, void 0, void 0, { sqrt: sqrtMod });\n secp256k1 = createCurve({\n a: _0n6,\n b: BigInt(7),\n Fp: Fpk1,\n n: secp256k1N,\n Gx: BigInt(\"55066263022277343669578718895168534326250603453777594175500187360389116729240\"),\n Gy: BigInt(\"32670510020758816978083085130507043184471273380659243275938904335757337482424\"),\n h: BigInt(1),\n lowS: true,\n // Allow only low-S signatures by default in sign() and verify()\n endo: {\n // Endomorphism, see above\n beta: BigInt(\"0x7ae96a2b657c07106e64479eac3434e99cf0497512f58995c1396c28719501ee\"),\n splitScalar: (k4) => {\n const n2 = secp256k1N;\n const a1 = BigInt(\"0x3086d221a7d46bcde86c90e49284eb15\");\n const b1 = -_1n6 * BigInt(\"0xe4437ed6010e88286f547fa90abfe4c3\");\n const a22 = BigInt(\"0x114ca50f7a8e2f3f657c1108d9d44cfd8\");\n const b22 = a1;\n const POW_2_128 = BigInt(\"0x100000000000000000000000000000000\");\n const c1 = divNearest(b22 * k4, n2);\n const c22 = divNearest(-b1 * k4, n2);\n let k1 = mod(k4 - c1 * a1 - c22 * a22, n2);\n let k22 = mod(-c1 * b1 - c22 * b22, n2);\n const k1neg = k1 > POW_2_128;\n const k2neg = k22 > POW_2_128;\n if (k1neg)\n k1 = n2 - k1;\n if (k2neg)\n k22 = n2 - k22;\n if (k1 > POW_2_128 || k22 > POW_2_128) {\n throw new Error(\"splitScalar: Endomorphism failed, k=\" + k4);\n }\n return { k1neg, k1, k2neg, k2: k22 };\n }\n }\n }, sha256);\n TAGGED_HASH_PREFIXES = {};\n pointToBytes = (point) => point.toRawBytes(true).slice(1);\n numTo32b = (n2) => numberToBytesBE(n2, 32);\n modP = (x4) => mod(x4, secp256k1P);\n modN = (x4) => mod(x4, secp256k1N);\n Point = /* @__PURE__ */ (() => secp256k1.ProjectivePoint)();\n GmulAdd = (Q2, a3, b4) => Point.BASE.multiplyAndAddUnsafe(Q2, a3, b4);\n num = bytesToNumberBE;\n schnorr = /* @__PURE__ */ (() => ({\n getPublicKey: schnorrGetPublicKey,\n sign: schnorrSign,\n verify: schnorrVerify,\n utils: {\n randomPrivateKey: secp256k1.utils.randomPrivateKey,\n lift_x,\n pointToBytes,\n numberToBytesBE,\n bytesToNumberBE,\n taggedHash,\n mod\n }\n }))();\n isoMap = /* @__PURE__ */ (() => isogenyMap(Fpk1, [\n // xNum\n [\n \"0x8e38e38e38e38e38e38e38e38e38e38e38e38e38e38e38e38e38e38daaaaa8c7\",\n \"0x7d3d4c80bc321d5b9f315cea7fd44c5d595d2fc0bf63b92dfff1044f17c6581\",\n \"0x534c328d23f234e6e2a413deca25caece4506144037c40314ecbd0b53d9dd262\",\n \"0x8e38e38e38e38e38e38e38e38e38e38e38e38e38e38e38e38e38e38daaaaa88c\"\n ],\n // xDen\n [\n \"0xd35771193d94918a9ca34ccbb7b640dd86cd409542f8487d9fe6b745781eb49b\",\n \"0xedadc6f64383dc1df7c4b2d51b54225406d36b641f5e41bbc52a56612a8c6d14\",\n \"0x0000000000000000000000000000000000000000000000000000000000000001\"\n // LAST 1\n ],\n // yNum\n [\n \"0x4bda12f684bda12f684bda12f684bda12f684bda12f684bda12f684b8e38e23c\",\n \"0xc75e0c32d5cb7c0fa9d0a54b12a0a6d5647ab046d686da6fdffc90fc201d71a3\",\n \"0x29a6194691f91a73715209ef6512e576722830a201be2018a765e85a9ecee931\",\n \"0x2f684bda12f684bda12f684bda12f684bda12f684bda12f684bda12f38e38d84\"\n ],\n // yDen\n [\n \"0xfffffffffffffffffffffffffffffffffffffffffffffffffffffffefffff93b\",\n \"0x7a06534bb8bdb49fd5e9e6632722c2989467c1bfc8e8d978dfb425d2685c2573\",\n \"0x6484aa716545ca2cf3a70c3fa8fe337e0a3d21162f0d6299a7bf8192bfd2a76f\",\n \"0x0000000000000000000000000000000000000000000000000000000000000001\"\n // LAST 1\n ]\n ].map((i3) => i3.map((j2) => BigInt(j2)))))();\n mapSWU = /* @__PURE__ */ (() => mapToCurveSimpleSWU(Fpk1, {\n A: BigInt(\"0x3f8731abdd661adca08a5558f0f5d272e953d363cb6f0e5d405447c01a444533\"),\n B: BigInt(\"1771\"),\n Z: Fpk1.create(BigInt(\"-11\"))\n }))();\n secp256k1_hasher = /* @__PURE__ */ (() => createHasher2(secp256k1.ProjectivePoint, (scalars) => {\n const { x: x4, y: y6 } = mapSWU(Fpk1.create(scalars[0]));\n return isoMap(x4, y6);\n }, {\n DST: \"secp256k1_XMD:SHA-256_SSWU_RO_\",\n encodeDST: \"secp256k1_XMD:SHA-256_SSWU_NU_\",\n p: Fpk1.ORDER,\n m: 1,\n k: 128,\n expand: \"xmd\",\n hash: sha256\n }))();\n hashToCurve = /* @__PURE__ */ (() => secp256k1_hasher.hashToCurve)();\n encodeToCurve = /* @__PURE__ */ (() => secp256k1_hasher.encodeToCurve)();\n }\n });\n\n // ../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/utils/signature/recoverPublicKey.js\n async function recoverPublicKey({ hash: hash3, signature }) {\n const hashHex = isHex(hash3) ? hash3 : toHex(hash3);\n const { secp256k1: secp256k13 } = await Promise.resolve().then(() => (init_secp256k1(), secp256k1_exports));\n const signature_ = (() => {\n if (typeof signature === \"object\" && \"r\" in signature && \"s\" in signature) {\n const { r: r2, s: s4, v: v2, yParity } = signature;\n const yParityOrV2 = Number(yParity ?? v2);\n const recoveryBit2 = toRecoveryBit(yParityOrV2);\n return new secp256k13.Signature(hexToBigInt(r2), hexToBigInt(s4)).addRecoveryBit(recoveryBit2);\n }\n const signatureHex = isHex(signature) ? signature : toHex(signature);\n if (size(signatureHex) !== 65)\n throw new Error(\"invalid signature length\");\n const yParityOrV = hexToNumber(`0x${signatureHex.slice(130)}`);\n const recoveryBit = toRecoveryBit(yParityOrV);\n return secp256k13.Signature.fromCompact(signatureHex.substring(2, 130)).addRecoveryBit(recoveryBit);\n })();\n const publicKey = signature_.recoverPublicKey(hashHex.substring(2)).toHex(false);\n return `0x${publicKey}`;\n }\n function toRecoveryBit(yParityOrV) {\n if (yParityOrV === 0 || yParityOrV === 1)\n return yParityOrV;\n if (yParityOrV === 27)\n return 0;\n if (yParityOrV === 28)\n return 1;\n throw new Error(\"Invalid yParityOrV value\");\n }\n var init_recoverPublicKey = __esm({\n \"../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/utils/signature/recoverPublicKey.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_isHex();\n init_size();\n init_fromHex();\n init_toHex();\n }\n });\n\n // ../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/utils/signature/recoverAddress.js\n async function recoverAddress({ hash: hash3, signature }) {\n return publicKeyToAddress(await recoverPublicKey({ hash: hash3, signature }));\n }\n var init_recoverAddress = __esm({\n \"../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/utils/signature/recoverAddress.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_publicKeyToAddress();\n init_recoverPublicKey();\n }\n });\n\n // ../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/utils/encoding/toRlp.js\n function toRlp(bytes, to = \"hex\") {\n const encodable = getEncodable(bytes);\n const cursor = createCursor(new Uint8Array(encodable.length));\n encodable.encode(cursor);\n if (to === \"hex\")\n return bytesToHex(cursor.bytes);\n return cursor.bytes;\n }\n function getEncodable(bytes) {\n if (Array.isArray(bytes))\n return getEncodableList(bytes.map((x4) => getEncodable(x4)));\n return getEncodableBytes(bytes);\n }\n function getEncodableList(list) {\n const bodyLength = list.reduce((acc, x4) => acc + x4.length, 0);\n const sizeOfBodyLength = getSizeOfLength(bodyLength);\n const length2 = (() => {\n if (bodyLength <= 55)\n return 1 + bodyLength;\n return 1 + sizeOfBodyLength + bodyLength;\n })();\n return {\n length: length2,\n encode(cursor) {\n if (bodyLength <= 55) {\n cursor.pushByte(192 + bodyLength);\n } else {\n cursor.pushByte(192 + 55 + sizeOfBodyLength);\n if (sizeOfBodyLength === 1)\n cursor.pushUint8(bodyLength);\n else if (sizeOfBodyLength === 2)\n cursor.pushUint16(bodyLength);\n else if (sizeOfBodyLength === 3)\n cursor.pushUint24(bodyLength);\n else\n cursor.pushUint32(bodyLength);\n }\n for (const { encode: encode6 } of list) {\n encode6(cursor);\n }\n }\n };\n }\n function getEncodableBytes(bytesOrHex) {\n const bytes = typeof bytesOrHex === \"string\" ? hexToBytes(bytesOrHex) : bytesOrHex;\n const sizeOfBytesLength = getSizeOfLength(bytes.length);\n const length2 = (() => {\n if (bytes.length === 1 && bytes[0] < 128)\n return 1;\n if (bytes.length <= 55)\n return 1 + bytes.length;\n return 1 + sizeOfBytesLength + bytes.length;\n })();\n return {\n length: length2,\n encode(cursor) {\n if (bytes.length === 1 && bytes[0] < 128) {\n cursor.pushBytes(bytes);\n } else if (bytes.length <= 55) {\n cursor.pushByte(128 + bytes.length);\n cursor.pushBytes(bytes);\n } else {\n cursor.pushByte(128 + 55 + sizeOfBytesLength);\n if (sizeOfBytesLength === 1)\n cursor.pushUint8(bytes.length);\n else if (sizeOfBytesLength === 2)\n cursor.pushUint16(bytes.length);\n else if (sizeOfBytesLength === 3)\n cursor.pushUint24(bytes.length);\n else\n cursor.pushUint32(bytes.length);\n cursor.pushBytes(bytes);\n }\n }\n };\n }\n function getSizeOfLength(length2) {\n if (length2 < 2 ** 8)\n return 1;\n if (length2 < 2 ** 16)\n return 2;\n if (length2 < 2 ** 24)\n return 3;\n if (length2 < 2 ** 32)\n return 4;\n throw new BaseError2(\"Length is too large.\");\n }\n var init_toRlp = __esm({\n \"../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/utils/encoding/toRlp.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_base();\n init_cursor2();\n init_toBytes();\n init_toHex();\n }\n });\n\n // ../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/utils/authorization/hashAuthorization.js\n function hashAuthorization(parameters) {\n const { chainId, nonce, to } = parameters;\n const address = parameters.contractAddress ?? parameters.address;\n const hash3 = keccak256(concatHex([\n \"0x05\",\n toRlp([\n chainId ? numberToHex(chainId) : \"0x\",\n address,\n nonce ? numberToHex(nonce) : \"0x\"\n ])\n ]));\n if (to === \"bytes\")\n return hexToBytes(hash3);\n return hash3;\n }\n var init_hashAuthorization = __esm({\n \"../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/utils/authorization/hashAuthorization.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_concat();\n init_toBytes();\n init_toHex();\n init_toRlp();\n init_keccak256();\n }\n });\n\n // ../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/utils/authorization/recoverAuthorizationAddress.js\n async function recoverAuthorizationAddress(parameters) {\n const { authorization, signature } = parameters;\n return recoverAddress({\n hash: hashAuthorization(authorization),\n signature: signature ?? authorization\n });\n }\n var init_recoverAuthorizationAddress = __esm({\n \"../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/utils/authorization/recoverAuthorizationAddress.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_recoverAddress();\n init_hashAuthorization();\n }\n });\n\n // ../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/errors/estimateGas.js\n var EstimateGasExecutionError;\n var init_estimateGas = __esm({\n \"../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/errors/estimateGas.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_formatEther();\n init_formatGwei();\n init_base();\n init_transaction();\n EstimateGasExecutionError = class extends BaseError2 {\n constructor(cause, { account, docsPath: docsPath8, chain: chain2, data, gas, gasPrice, maxFeePerGas, maxPriorityFeePerGas, nonce, to, value }) {\n const prettyArgs = prettyPrint({\n from: account?.address,\n to,\n value: typeof value !== \"undefined\" && `${formatEther(value)} ${chain2?.nativeCurrency?.symbol || \"ETH\"}`,\n data,\n gas,\n gasPrice: typeof gasPrice !== \"undefined\" && `${formatGwei(gasPrice)} gwei`,\n maxFeePerGas: typeof maxFeePerGas !== \"undefined\" && `${formatGwei(maxFeePerGas)} gwei`,\n maxPriorityFeePerGas: typeof maxPriorityFeePerGas !== \"undefined\" && `${formatGwei(maxPriorityFeePerGas)} gwei`,\n nonce\n });\n super(cause.shortMessage, {\n cause,\n docsPath: docsPath8,\n metaMessages: [\n ...cause.metaMessages ? [...cause.metaMessages, \" \"] : [],\n \"Estimate Gas Arguments:\",\n prettyArgs\n ].filter(Boolean),\n name: \"EstimateGasExecutionError\"\n });\n Object.defineProperty(this, \"cause\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: void 0\n });\n this.cause = cause;\n }\n };\n }\n });\n\n // ../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/errors/node.js\n var ExecutionRevertedError, FeeCapTooHighError, FeeCapTooLowError, NonceTooHighError, NonceTooLowError, NonceMaxValueError, InsufficientFundsError, IntrinsicGasTooHighError, IntrinsicGasTooLowError, TransactionTypeNotSupportedError, TipAboveFeeCapError, UnknownNodeError;\n var init_node = __esm({\n \"../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/errors/node.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_formatGwei();\n init_base();\n ExecutionRevertedError = class extends BaseError2 {\n constructor({ cause, message } = {}) {\n const reason = message?.replace(\"execution reverted: \", \"\")?.replace(\"execution reverted\", \"\");\n super(`Execution reverted ${reason ? `with reason: ${reason}` : \"for an unknown reason\"}.`, {\n cause,\n name: \"ExecutionRevertedError\"\n });\n }\n };\n Object.defineProperty(ExecutionRevertedError, \"code\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: 3\n });\n Object.defineProperty(ExecutionRevertedError, \"nodeMessage\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: /execution reverted/\n });\n FeeCapTooHighError = class extends BaseError2 {\n constructor({ cause, maxFeePerGas } = {}) {\n super(`The fee cap (\\`maxFeePerGas\\`${maxFeePerGas ? ` = ${formatGwei(maxFeePerGas)} gwei` : \"\"}) cannot be higher than the maximum allowed value (2^256-1).`, {\n cause,\n name: \"FeeCapTooHighError\"\n });\n }\n };\n Object.defineProperty(FeeCapTooHighError, \"nodeMessage\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: /max fee per gas higher than 2\\^256-1|fee cap higher than 2\\^256-1/\n });\n FeeCapTooLowError = class extends BaseError2 {\n constructor({ cause, maxFeePerGas } = {}) {\n super(`The fee cap (\\`maxFeePerGas\\`${maxFeePerGas ? ` = ${formatGwei(maxFeePerGas)}` : \"\"} gwei) cannot be lower than the block base fee.`, {\n cause,\n name: \"FeeCapTooLowError\"\n });\n }\n };\n Object.defineProperty(FeeCapTooLowError, \"nodeMessage\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: /max fee per gas less than block base fee|fee cap less than block base fee|transaction is outdated/\n });\n NonceTooHighError = class extends BaseError2 {\n constructor({ cause, nonce } = {}) {\n super(`Nonce provided for the transaction ${nonce ? `(${nonce}) ` : \"\"}is higher than the next one expected.`, { cause, name: \"NonceTooHighError\" });\n }\n };\n Object.defineProperty(NonceTooHighError, \"nodeMessage\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: /nonce too high/\n });\n NonceTooLowError = class extends BaseError2 {\n constructor({ cause, nonce } = {}) {\n super([\n `Nonce provided for the transaction ${nonce ? `(${nonce}) ` : \"\"}is lower than the current nonce of the account.`,\n \"Try increasing the nonce or find the latest nonce with `getTransactionCount`.\"\n ].join(\"\\n\"), { cause, name: \"NonceTooLowError\" });\n }\n };\n Object.defineProperty(NonceTooLowError, \"nodeMessage\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: /nonce too low|transaction already imported|already known/\n });\n NonceMaxValueError = class extends BaseError2 {\n constructor({ cause, nonce } = {}) {\n super(`Nonce provided for the transaction ${nonce ? `(${nonce}) ` : \"\"}exceeds the maximum allowed nonce.`, { cause, name: \"NonceMaxValueError\" });\n }\n };\n Object.defineProperty(NonceMaxValueError, \"nodeMessage\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: /nonce has max value/\n });\n InsufficientFundsError = class extends BaseError2 {\n constructor({ cause } = {}) {\n super([\n \"The total cost (gas * gas fee + value) of executing this transaction exceeds the balance of the account.\"\n ].join(\"\\n\"), {\n cause,\n metaMessages: [\n \"This error could arise when the account does not have enough funds to:\",\n \" - pay for the total gas fee,\",\n \" - pay for the value to send.\",\n \" \",\n \"The cost of the transaction is calculated as `gas * gas fee + value`, where:\",\n \" - `gas` is the amount of gas needed for transaction to execute,\",\n \" - `gas fee` is the gas fee,\",\n \" - `value` is the amount of ether to send to the recipient.\"\n ],\n name: \"InsufficientFundsError\"\n });\n }\n };\n Object.defineProperty(InsufficientFundsError, \"nodeMessage\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: /insufficient funds|exceeds transaction sender account balance/\n });\n IntrinsicGasTooHighError = class extends BaseError2 {\n constructor({ cause, gas } = {}) {\n super(`The amount of gas ${gas ? `(${gas}) ` : \"\"}provided for the transaction exceeds the limit allowed for the block.`, {\n cause,\n name: \"IntrinsicGasTooHighError\"\n });\n }\n };\n Object.defineProperty(IntrinsicGasTooHighError, \"nodeMessage\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: /intrinsic gas too high|gas limit reached/\n });\n IntrinsicGasTooLowError = class extends BaseError2 {\n constructor({ cause, gas } = {}) {\n super(`The amount of gas ${gas ? `(${gas}) ` : \"\"}provided for the transaction is too low.`, {\n cause,\n name: \"IntrinsicGasTooLowError\"\n });\n }\n };\n Object.defineProperty(IntrinsicGasTooLowError, \"nodeMessage\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: /intrinsic gas too low/\n });\n TransactionTypeNotSupportedError = class extends BaseError2 {\n constructor({ cause }) {\n super(\"The transaction type is not supported for this chain.\", {\n cause,\n name: \"TransactionTypeNotSupportedError\"\n });\n }\n };\n Object.defineProperty(TransactionTypeNotSupportedError, \"nodeMessage\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: /transaction type not valid/\n });\n TipAboveFeeCapError = class extends BaseError2 {\n constructor({ cause, maxPriorityFeePerGas, maxFeePerGas } = {}) {\n super([\n `The provided tip (\\`maxPriorityFeePerGas\\`${maxPriorityFeePerGas ? ` = ${formatGwei(maxPriorityFeePerGas)} gwei` : \"\"}) cannot be higher than the fee cap (\\`maxFeePerGas\\`${maxFeePerGas ? ` = ${formatGwei(maxFeePerGas)} gwei` : \"\"}).`\n ].join(\"\\n\"), {\n cause,\n name: \"TipAboveFeeCapError\"\n });\n }\n };\n Object.defineProperty(TipAboveFeeCapError, \"nodeMessage\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: /max priority fee per gas higher than max fee per gas|tip higher than fee cap/\n });\n UnknownNodeError = class extends BaseError2 {\n constructor({ cause }) {\n super(`An error occurred while executing: ${cause?.shortMessage}`, {\n cause,\n name: \"UnknownNodeError\"\n });\n }\n };\n }\n });\n\n // ../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/utils/errors/getNodeError.js\n function getNodeError(err, args) {\n const message = (err.details || \"\").toLowerCase();\n const executionRevertedError = err instanceof BaseError2 ? err.walk((e3) => e3?.code === ExecutionRevertedError.code) : err;\n if (executionRevertedError instanceof BaseError2)\n return new ExecutionRevertedError({\n cause: err,\n message: executionRevertedError.details\n });\n if (ExecutionRevertedError.nodeMessage.test(message))\n return new ExecutionRevertedError({\n cause: err,\n message: err.details\n });\n if (FeeCapTooHighError.nodeMessage.test(message))\n return new FeeCapTooHighError({\n cause: err,\n maxFeePerGas: args?.maxFeePerGas\n });\n if (FeeCapTooLowError.nodeMessage.test(message))\n return new FeeCapTooLowError({\n cause: err,\n maxFeePerGas: args?.maxFeePerGas\n });\n if (NonceTooHighError.nodeMessage.test(message))\n return new NonceTooHighError({ cause: err, nonce: args?.nonce });\n if (NonceTooLowError.nodeMessage.test(message))\n return new NonceTooLowError({ cause: err, nonce: args?.nonce });\n if (NonceMaxValueError.nodeMessage.test(message))\n return new NonceMaxValueError({ cause: err, nonce: args?.nonce });\n if (InsufficientFundsError.nodeMessage.test(message))\n return new InsufficientFundsError({ cause: err });\n if (IntrinsicGasTooHighError.nodeMessage.test(message))\n return new IntrinsicGasTooHighError({ cause: err, gas: args?.gas });\n if (IntrinsicGasTooLowError.nodeMessage.test(message))\n return new IntrinsicGasTooLowError({ cause: err, gas: args?.gas });\n if (TransactionTypeNotSupportedError.nodeMessage.test(message))\n return new TransactionTypeNotSupportedError({ cause: err });\n if (TipAboveFeeCapError.nodeMessage.test(message))\n return new TipAboveFeeCapError({\n cause: err,\n maxFeePerGas: args?.maxFeePerGas,\n maxPriorityFeePerGas: args?.maxPriorityFeePerGas\n });\n return new UnknownNodeError({\n cause: err\n });\n }\n var init_getNodeError = __esm({\n \"../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/utils/errors/getNodeError.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_base();\n init_node();\n }\n });\n\n // ../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/utils/errors/getEstimateGasError.js\n function getEstimateGasError(err, { docsPath: docsPath8, ...args }) {\n const cause = (() => {\n const cause2 = getNodeError(err, args);\n if (cause2 instanceof UnknownNodeError)\n return err;\n return cause2;\n })();\n return new EstimateGasExecutionError(cause, {\n docsPath: docsPath8,\n ...args\n });\n }\n var init_getEstimateGasError = __esm({\n \"../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/utils/errors/getEstimateGasError.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_estimateGas();\n init_node();\n init_getNodeError();\n }\n });\n\n // ../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/utils/formatters/extract.js\n function extract(value_, { format }) {\n if (!format)\n return {};\n const value = {};\n function extract_(formatted2) {\n const keys = Object.keys(formatted2);\n for (const key of keys) {\n if (key in value_)\n value[key] = value_[key];\n if (formatted2[key] && typeof formatted2[key] === \"object\" && !Array.isArray(formatted2[key]))\n extract_(formatted2[key]);\n }\n }\n const formatted = format(value_ || {});\n extract_(formatted);\n return value;\n }\n var init_extract = __esm({\n \"../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/utils/formatters/extract.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n }\n });\n\n // ../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/utils/formatters/formatter.js\n function defineFormatter(type, format) {\n return ({ exclude, format: overrides }) => {\n return {\n exclude,\n format: (args, action) => {\n const formatted = format(args, action);\n if (exclude) {\n for (const key of exclude) {\n delete formatted[key];\n }\n }\n return {\n ...formatted,\n ...overrides(args, action)\n };\n },\n type\n };\n };\n }\n var init_formatter = __esm({\n \"../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/utils/formatters/formatter.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n }\n });\n\n // ../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/utils/formatters/transactionRequest.js\n function formatTransactionRequest(request, _2) {\n const rpcRequest = {};\n if (typeof request.authorizationList !== \"undefined\")\n rpcRequest.authorizationList = formatAuthorizationList(request.authorizationList);\n if (typeof request.accessList !== \"undefined\")\n rpcRequest.accessList = request.accessList;\n if (typeof request.blobVersionedHashes !== \"undefined\")\n rpcRequest.blobVersionedHashes = request.blobVersionedHashes;\n if (typeof request.blobs !== \"undefined\") {\n if (typeof request.blobs[0] !== \"string\")\n rpcRequest.blobs = request.blobs.map((x4) => bytesToHex(x4));\n else\n rpcRequest.blobs = request.blobs;\n }\n if (typeof request.data !== \"undefined\")\n rpcRequest.data = request.data;\n if (request.account)\n rpcRequest.from = request.account.address;\n if (typeof request.from !== \"undefined\")\n rpcRequest.from = request.from;\n if (typeof request.gas !== \"undefined\")\n rpcRequest.gas = numberToHex(request.gas);\n if (typeof request.gasPrice !== \"undefined\")\n rpcRequest.gasPrice = numberToHex(request.gasPrice);\n if (typeof request.maxFeePerBlobGas !== \"undefined\")\n rpcRequest.maxFeePerBlobGas = numberToHex(request.maxFeePerBlobGas);\n if (typeof request.maxFeePerGas !== \"undefined\")\n rpcRequest.maxFeePerGas = numberToHex(request.maxFeePerGas);\n if (typeof request.maxPriorityFeePerGas !== \"undefined\")\n rpcRequest.maxPriorityFeePerGas = numberToHex(request.maxPriorityFeePerGas);\n if (typeof request.nonce !== \"undefined\")\n rpcRequest.nonce = numberToHex(request.nonce);\n if (typeof request.to !== \"undefined\")\n rpcRequest.to = request.to;\n if (typeof request.type !== \"undefined\")\n rpcRequest.type = rpcTransactionType[request.type];\n if (typeof request.value !== \"undefined\")\n rpcRequest.value = numberToHex(request.value);\n return rpcRequest;\n }\n function formatAuthorizationList(authorizationList) {\n return authorizationList.map((authorization) => ({\n address: authorization.address,\n r: authorization.r ? numberToHex(BigInt(authorization.r)) : authorization.r,\n s: authorization.s ? numberToHex(BigInt(authorization.s)) : authorization.s,\n chainId: numberToHex(authorization.chainId),\n nonce: numberToHex(authorization.nonce),\n ...typeof authorization.yParity !== \"undefined\" ? { yParity: numberToHex(authorization.yParity) } : {},\n ...typeof authorization.v !== \"undefined\" && typeof authorization.yParity === \"undefined\" ? { v: numberToHex(authorization.v) } : {}\n }));\n }\n var rpcTransactionType;\n var init_transactionRequest = __esm({\n \"../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/utils/formatters/transactionRequest.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_toHex();\n rpcTransactionType = {\n legacy: \"0x0\",\n eip2930: \"0x1\",\n eip1559: \"0x2\",\n eip4844: \"0x3\",\n eip7702: \"0x4\"\n };\n }\n });\n\n // ../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/utils/stateOverride.js\n function serializeStateMapping(stateMapping) {\n if (!stateMapping || stateMapping.length === 0)\n return void 0;\n return stateMapping.reduce((acc, { slot, value }) => {\n if (slot.length !== 66)\n throw new InvalidBytesLengthError({\n size: slot.length,\n targetSize: 66,\n type: \"hex\"\n });\n if (value.length !== 66)\n throw new InvalidBytesLengthError({\n size: value.length,\n targetSize: 66,\n type: \"hex\"\n });\n acc[slot] = value;\n return acc;\n }, {});\n }\n function serializeAccountStateOverride(parameters) {\n const { balance, nonce, state, stateDiff, code } = parameters;\n const rpcAccountStateOverride = {};\n if (code !== void 0)\n rpcAccountStateOverride.code = code;\n if (balance !== void 0)\n rpcAccountStateOverride.balance = numberToHex(balance);\n if (nonce !== void 0)\n rpcAccountStateOverride.nonce = numberToHex(nonce);\n if (state !== void 0)\n rpcAccountStateOverride.state = serializeStateMapping(state);\n if (stateDiff !== void 0) {\n if (rpcAccountStateOverride.state)\n throw new StateAssignmentConflictError();\n rpcAccountStateOverride.stateDiff = serializeStateMapping(stateDiff);\n }\n return rpcAccountStateOverride;\n }\n function serializeStateOverride(parameters) {\n if (!parameters)\n return void 0;\n const rpcStateOverride = {};\n for (const { address, ...accountState } of parameters) {\n if (!isAddress(address, { strict: false }))\n throw new InvalidAddressError({ address });\n if (rpcStateOverride[address])\n throw new AccountStateConflictError({ address });\n rpcStateOverride[address] = serializeAccountStateOverride(accountState);\n }\n return rpcStateOverride;\n }\n var init_stateOverride2 = __esm({\n \"../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/utils/stateOverride.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_address();\n init_data();\n init_stateOverride();\n init_isAddress();\n init_toHex();\n }\n });\n\n // ../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/constants/number.js\n var maxInt8, maxInt16, maxInt24, maxInt32, maxInt40, maxInt48, maxInt56, maxInt64, maxInt72, maxInt80, maxInt88, maxInt96, maxInt104, maxInt112, maxInt120, maxInt128, maxInt136, maxInt144, maxInt152, maxInt160, maxInt168, maxInt176, maxInt184, maxInt192, maxInt200, maxInt208, maxInt216, maxInt224, maxInt232, maxInt240, maxInt248, maxInt256, minInt8, minInt16, minInt24, minInt32, minInt40, minInt48, minInt56, minInt64, minInt72, minInt80, minInt88, minInt96, minInt104, minInt112, minInt120, minInt128, minInt136, minInt144, minInt152, minInt160, minInt168, minInt176, minInt184, minInt192, minInt200, minInt208, minInt216, minInt224, minInt232, minInt240, minInt248, minInt256, maxUint8, maxUint16, maxUint24, maxUint32, maxUint40, maxUint48, maxUint56, maxUint64, maxUint72, maxUint80, maxUint88, maxUint96, maxUint104, maxUint112, maxUint120, maxUint128, maxUint136, maxUint144, maxUint152, maxUint160, maxUint168, maxUint176, maxUint184, maxUint192, maxUint200, maxUint208, maxUint216, maxUint224, maxUint232, maxUint240, maxUint248, maxUint256;\n var init_number = __esm({\n \"../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/constants/number.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n maxInt8 = 2n ** (8n - 1n) - 1n;\n maxInt16 = 2n ** (16n - 1n) - 1n;\n maxInt24 = 2n ** (24n - 1n) - 1n;\n maxInt32 = 2n ** (32n - 1n) - 1n;\n maxInt40 = 2n ** (40n - 1n) - 1n;\n maxInt48 = 2n ** (48n - 1n) - 1n;\n maxInt56 = 2n ** (56n - 1n) - 1n;\n maxInt64 = 2n ** (64n - 1n) - 1n;\n maxInt72 = 2n ** (72n - 1n) - 1n;\n maxInt80 = 2n ** (80n - 1n) - 1n;\n maxInt88 = 2n ** (88n - 1n) - 1n;\n maxInt96 = 2n ** (96n - 1n) - 1n;\n maxInt104 = 2n ** (104n - 1n) - 1n;\n maxInt112 = 2n ** (112n - 1n) - 1n;\n maxInt120 = 2n ** (120n - 1n) - 1n;\n maxInt128 = 2n ** (128n - 1n) - 1n;\n maxInt136 = 2n ** (136n - 1n) - 1n;\n maxInt144 = 2n ** (144n - 1n) - 1n;\n maxInt152 = 2n ** (152n - 1n) - 1n;\n maxInt160 = 2n ** (160n - 1n) - 1n;\n maxInt168 = 2n ** (168n - 1n) - 1n;\n maxInt176 = 2n ** (176n - 1n) - 1n;\n maxInt184 = 2n ** (184n - 1n) - 1n;\n maxInt192 = 2n ** (192n - 1n) - 1n;\n maxInt200 = 2n ** (200n - 1n) - 1n;\n maxInt208 = 2n ** (208n - 1n) - 1n;\n maxInt216 = 2n ** (216n - 1n) - 1n;\n maxInt224 = 2n ** (224n - 1n) - 1n;\n maxInt232 = 2n ** (232n - 1n) - 1n;\n maxInt240 = 2n ** (240n - 1n) - 1n;\n maxInt248 = 2n ** (248n - 1n) - 1n;\n maxInt256 = 2n ** (256n - 1n) - 1n;\n minInt8 = -(2n ** (8n - 1n));\n minInt16 = -(2n ** (16n - 1n));\n minInt24 = -(2n ** (24n - 1n));\n minInt32 = -(2n ** (32n - 1n));\n minInt40 = -(2n ** (40n - 1n));\n minInt48 = -(2n ** (48n - 1n));\n minInt56 = -(2n ** (56n - 1n));\n minInt64 = -(2n ** (64n - 1n));\n minInt72 = -(2n ** (72n - 1n));\n minInt80 = -(2n ** (80n - 1n));\n minInt88 = -(2n ** (88n - 1n));\n minInt96 = -(2n ** (96n - 1n));\n minInt104 = -(2n ** (104n - 1n));\n minInt112 = -(2n ** (112n - 1n));\n minInt120 = -(2n ** (120n - 1n));\n minInt128 = -(2n ** (128n - 1n));\n minInt136 = -(2n ** (136n - 1n));\n minInt144 = -(2n ** (144n - 1n));\n minInt152 = -(2n ** (152n - 1n));\n minInt160 = -(2n ** (160n - 1n));\n minInt168 = -(2n ** (168n - 1n));\n minInt176 = -(2n ** (176n - 1n));\n minInt184 = -(2n ** (184n - 1n));\n minInt192 = -(2n ** (192n - 1n));\n minInt200 = -(2n ** (200n - 1n));\n minInt208 = -(2n ** (208n - 1n));\n minInt216 = -(2n ** (216n - 1n));\n minInt224 = -(2n ** (224n - 1n));\n minInt232 = -(2n ** (232n - 1n));\n minInt240 = -(2n ** (240n - 1n));\n minInt248 = -(2n ** (248n - 1n));\n minInt256 = -(2n ** (256n - 1n));\n maxUint8 = 2n ** 8n - 1n;\n maxUint16 = 2n ** 16n - 1n;\n maxUint24 = 2n ** 24n - 1n;\n maxUint32 = 2n ** 32n - 1n;\n maxUint40 = 2n ** 40n - 1n;\n maxUint48 = 2n ** 48n - 1n;\n maxUint56 = 2n ** 56n - 1n;\n maxUint64 = 2n ** 64n - 1n;\n maxUint72 = 2n ** 72n - 1n;\n maxUint80 = 2n ** 80n - 1n;\n maxUint88 = 2n ** 88n - 1n;\n maxUint96 = 2n ** 96n - 1n;\n maxUint104 = 2n ** 104n - 1n;\n maxUint112 = 2n ** 112n - 1n;\n maxUint120 = 2n ** 120n - 1n;\n maxUint128 = 2n ** 128n - 1n;\n maxUint136 = 2n ** 136n - 1n;\n maxUint144 = 2n ** 144n - 1n;\n maxUint152 = 2n ** 152n - 1n;\n maxUint160 = 2n ** 160n - 1n;\n maxUint168 = 2n ** 168n - 1n;\n maxUint176 = 2n ** 176n - 1n;\n maxUint184 = 2n ** 184n - 1n;\n maxUint192 = 2n ** 192n - 1n;\n maxUint200 = 2n ** 200n - 1n;\n maxUint208 = 2n ** 208n - 1n;\n maxUint216 = 2n ** 216n - 1n;\n maxUint224 = 2n ** 224n - 1n;\n maxUint232 = 2n ** 232n - 1n;\n maxUint240 = 2n ** 240n - 1n;\n maxUint248 = 2n ** 248n - 1n;\n maxUint256 = 2n ** 256n - 1n;\n }\n });\n\n // ../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/utils/transaction/assertRequest.js\n function assertRequest(args) {\n const { account: account_, gasPrice, maxFeePerGas, maxPriorityFeePerGas, to } = args;\n const account = account_ ? parseAccount(account_) : void 0;\n if (account && !isAddress(account.address))\n throw new InvalidAddressError({ address: account.address });\n if (to && !isAddress(to))\n throw new InvalidAddressError({ address: to });\n if (typeof gasPrice !== \"undefined\" && (typeof maxFeePerGas !== \"undefined\" || typeof maxPriorityFeePerGas !== \"undefined\"))\n throw new FeeConflictError();\n if (maxFeePerGas && maxFeePerGas > maxUint256)\n throw new FeeCapTooHighError({ maxFeePerGas });\n if (maxPriorityFeePerGas && maxFeePerGas && maxPriorityFeePerGas > maxFeePerGas)\n throw new TipAboveFeeCapError({ maxFeePerGas, maxPriorityFeePerGas });\n }\n var init_assertRequest = __esm({\n \"../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/utils/transaction/assertRequest.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_parseAccount();\n init_number();\n init_address();\n init_node();\n init_transaction();\n init_isAddress();\n }\n });\n\n // ../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/errors/fee.js\n var BaseFeeScalarError, Eip1559FeesNotSupportedError, MaxFeePerGasTooLowError;\n var init_fee = __esm({\n \"../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/errors/fee.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_formatGwei();\n init_base();\n BaseFeeScalarError = class extends BaseError2 {\n constructor() {\n super(\"`baseFeeMultiplier` must be greater than 1.\", {\n name: \"BaseFeeScalarError\"\n });\n }\n };\n Eip1559FeesNotSupportedError = class extends BaseError2 {\n constructor() {\n super(\"Chain does not support EIP-1559 fees.\", {\n name: \"Eip1559FeesNotSupportedError\"\n });\n }\n };\n MaxFeePerGasTooLowError = class extends BaseError2 {\n constructor({ maxPriorityFeePerGas }) {\n super(`\\`maxFeePerGas\\` cannot be less than the \\`maxPriorityFeePerGas\\` (${formatGwei(maxPriorityFeePerGas)} gwei).`, { name: \"MaxFeePerGasTooLowError\" });\n }\n };\n }\n });\n\n // ../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/errors/block.js\n var BlockNotFoundError;\n var init_block = __esm({\n \"../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/errors/block.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_base();\n BlockNotFoundError = class extends BaseError2 {\n constructor({ blockHash, blockNumber }) {\n let identifier = \"Block\";\n if (blockHash)\n identifier = `Block at hash \"${blockHash}\"`;\n if (blockNumber)\n identifier = `Block at number \"${blockNumber}\"`;\n super(`${identifier} could not be found.`, { name: \"BlockNotFoundError\" });\n }\n };\n }\n });\n\n // ../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/utils/formatters/transaction.js\n function formatTransaction(transaction, _2) {\n const transaction_ = {\n ...transaction,\n blockHash: transaction.blockHash ? transaction.blockHash : null,\n blockNumber: transaction.blockNumber ? BigInt(transaction.blockNumber) : null,\n chainId: transaction.chainId ? hexToNumber(transaction.chainId) : void 0,\n gas: transaction.gas ? BigInt(transaction.gas) : void 0,\n gasPrice: transaction.gasPrice ? BigInt(transaction.gasPrice) : void 0,\n maxFeePerBlobGas: transaction.maxFeePerBlobGas ? BigInt(transaction.maxFeePerBlobGas) : void 0,\n maxFeePerGas: transaction.maxFeePerGas ? BigInt(transaction.maxFeePerGas) : void 0,\n maxPriorityFeePerGas: transaction.maxPriorityFeePerGas ? BigInt(transaction.maxPriorityFeePerGas) : void 0,\n nonce: transaction.nonce ? hexToNumber(transaction.nonce) : void 0,\n to: transaction.to ? transaction.to : null,\n transactionIndex: transaction.transactionIndex ? Number(transaction.transactionIndex) : null,\n type: transaction.type ? transactionType[transaction.type] : void 0,\n typeHex: transaction.type ? transaction.type : void 0,\n value: transaction.value ? BigInt(transaction.value) : void 0,\n v: transaction.v ? BigInt(transaction.v) : void 0\n };\n if (transaction.authorizationList)\n transaction_.authorizationList = formatAuthorizationList2(transaction.authorizationList);\n transaction_.yParity = (() => {\n if (transaction.yParity)\n return Number(transaction.yParity);\n if (typeof transaction_.v === \"bigint\") {\n if (transaction_.v === 0n || transaction_.v === 27n)\n return 0;\n if (transaction_.v === 1n || transaction_.v === 28n)\n return 1;\n if (transaction_.v >= 35n)\n return transaction_.v % 2n === 0n ? 1 : 0;\n }\n return void 0;\n })();\n if (transaction_.type === \"legacy\") {\n delete transaction_.accessList;\n delete transaction_.maxFeePerBlobGas;\n delete transaction_.maxFeePerGas;\n delete transaction_.maxPriorityFeePerGas;\n delete transaction_.yParity;\n }\n if (transaction_.type === \"eip2930\") {\n delete transaction_.maxFeePerBlobGas;\n delete transaction_.maxFeePerGas;\n delete transaction_.maxPriorityFeePerGas;\n }\n if (transaction_.type === \"eip1559\") {\n delete transaction_.maxFeePerBlobGas;\n }\n return transaction_;\n }\n function formatAuthorizationList2(authorizationList) {\n return authorizationList.map((authorization) => ({\n address: authorization.address,\n chainId: Number(authorization.chainId),\n nonce: Number(authorization.nonce),\n r: authorization.r,\n s: authorization.s,\n yParity: Number(authorization.yParity)\n }));\n }\n var transactionType, defineTransaction;\n var init_transaction2 = __esm({\n \"../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/utils/formatters/transaction.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_fromHex();\n init_formatter();\n transactionType = {\n \"0x0\": \"legacy\",\n \"0x1\": \"eip2930\",\n \"0x2\": \"eip1559\",\n \"0x3\": \"eip4844\",\n \"0x4\": \"eip7702\"\n };\n defineTransaction = /* @__PURE__ */ defineFormatter(\"transaction\", formatTransaction);\n }\n });\n\n // ../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/utils/formatters/block.js\n function formatBlock(block, _2) {\n const transactions = (block.transactions ?? []).map((transaction) => {\n if (typeof transaction === \"string\")\n return transaction;\n return formatTransaction(transaction);\n });\n return {\n ...block,\n baseFeePerGas: block.baseFeePerGas ? BigInt(block.baseFeePerGas) : null,\n blobGasUsed: block.blobGasUsed ? BigInt(block.blobGasUsed) : void 0,\n difficulty: block.difficulty ? BigInt(block.difficulty) : void 0,\n excessBlobGas: block.excessBlobGas ? BigInt(block.excessBlobGas) : void 0,\n gasLimit: block.gasLimit ? BigInt(block.gasLimit) : void 0,\n gasUsed: block.gasUsed ? BigInt(block.gasUsed) : void 0,\n hash: block.hash ? block.hash : null,\n logsBloom: block.logsBloom ? block.logsBloom : null,\n nonce: block.nonce ? block.nonce : null,\n number: block.number ? BigInt(block.number) : null,\n size: block.size ? BigInt(block.size) : void 0,\n timestamp: block.timestamp ? BigInt(block.timestamp) : void 0,\n transactions,\n totalDifficulty: block.totalDifficulty ? BigInt(block.totalDifficulty) : null\n };\n }\n var defineBlock;\n var init_block2 = __esm({\n \"../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/utils/formatters/block.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_formatter();\n init_transaction2();\n defineBlock = /* @__PURE__ */ defineFormatter(\"block\", formatBlock);\n }\n });\n\n // ../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/actions/public/getBlock.js\n async function getBlock(client, { blockHash, blockNumber, blockTag = client.experimental_blockTag ?? \"latest\", includeTransactions: includeTransactions_ } = {}) {\n const includeTransactions = includeTransactions_ ?? false;\n const blockNumberHex = blockNumber !== void 0 ? numberToHex(blockNumber) : void 0;\n let block = null;\n if (blockHash) {\n block = await client.request({\n method: \"eth_getBlockByHash\",\n params: [blockHash, includeTransactions]\n }, { dedupe: true });\n } else {\n block = await client.request({\n method: \"eth_getBlockByNumber\",\n params: [blockNumberHex || blockTag, includeTransactions]\n }, { dedupe: Boolean(blockNumberHex) });\n }\n if (!block)\n throw new BlockNotFoundError({ blockHash, blockNumber });\n const format = client.chain?.formatters?.block?.format || formatBlock;\n return format(block, \"getBlock\");\n }\n var init_getBlock = __esm({\n \"../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/actions/public/getBlock.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_block();\n init_toHex();\n init_block2();\n }\n });\n\n // ../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/actions/public/getGasPrice.js\n async function getGasPrice(client) {\n const gasPrice = await client.request({\n method: \"eth_gasPrice\"\n });\n return BigInt(gasPrice);\n }\n var init_getGasPrice = __esm({\n \"../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/actions/public/getGasPrice.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n }\n });\n\n // ../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/actions/public/estimateMaxPriorityFeePerGas.js\n async function estimateMaxPriorityFeePerGas(client, args) {\n return internal_estimateMaxPriorityFeePerGas(client, args);\n }\n async function internal_estimateMaxPriorityFeePerGas(client, args) {\n const { block: block_, chain: chain2 = client.chain, request } = args || {};\n try {\n const maxPriorityFeePerGas = chain2?.fees?.maxPriorityFeePerGas ?? chain2?.fees?.defaultPriorityFee;\n if (typeof maxPriorityFeePerGas === \"function\") {\n const block = block_ || await getAction(client, getBlock, \"getBlock\")({});\n const maxPriorityFeePerGas_ = await maxPriorityFeePerGas({\n block,\n client,\n request\n });\n if (maxPriorityFeePerGas_ === null)\n throw new Error();\n return maxPriorityFeePerGas_;\n }\n if (typeof maxPriorityFeePerGas !== \"undefined\")\n return maxPriorityFeePerGas;\n const maxPriorityFeePerGasHex = await client.request({\n method: \"eth_maxPriorityFeePerGas\"\n });\n return hexToBigInt(maxPriorityFeePerGasHex);\n } catch {\n const [block, gasPrice] = await Promise.all([\n block_ ? Promise.resolve(block_) : getAction(client, getBlock, \"getBlock\")({}),\n getAction(client, getGasPrice, \"getGasPrice\")({})\n ]);\n if (typeof block.baseFeePerGas !== \"bigint\")\n throw new Eip1559FeesNotSupportedError();\n const maxPriorityFeePerGas = gasPrice - block.baseFeePerGas;\n if (maxPriorityFeePerGas < 0n)\n return 0n;\n return maxPriorityFeePerGas;\n }\n }\n var init_estimateMaxPriorityFeePerGas = __esm({\n \"../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/actions/public/estimateMaxPriorityFeePerGas.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_fee();\n init_fromHex();\n init_getAction();\n init_getBlock();\n init_getGasPrice();\n }\n });\n\n // ../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/actions/public/estimateFeesPerGas.js\n async function estimateFeesPerGas(client, args) {\n return internal_estimateFeesPerGas(client, args);\n }\n async function internal_estimateFeesPerGas(client, args) {\n const { block: block_, chain: chain2 = client.chain, request, type = \"eip1559\" } = args || {};\n const baseFeeMultiplier = await (async () => {\n if (typeof chain2?.fees?.baseFeeMultiplier === \"function\")\n return chain2.fees.baseFeeMultiplier({\n block: block_,\n client,\n request\n });\n return chain2?.fees?.baseFeeMultiplier ?? 1.2;\n })();\n if (baseFeeMultiplier < 1)\n throw new BaseFeeScalarError();\n const decimals = baseFeeMultiplier.toString().split(\".\")[1]?.length ?? 0;\n const denominator = 10 ** decimals;\n const multiply = (base4) => base4 * BigInt(Math.ceil(baseFeeMultiplier * denominator)) / BigInt(denominator);\n const block = block_ ? block_ : await getAction(client, getBlock, \"getBlock\")({});\n if (typeof chain2?.fees?.estimateFeesPerGas === \"function\") {\n const fees = await chain2.fees.estimateFeesPerGas({\n block: block_,\n client,\n multiply,\n request,\n type\n });\n if (fees !== null)\n return fees;\n }\n if (type === \"eip1559\") {\n if (typeof block.baseFeePerGas !== \"bigint\")\n throw new Eip1559FeesNotSupportedError();\n const maxPriorityFeePerGas = typeof request?.maxPriorityFeePerGas === \"bigint\" ? request.maxPriorityFeePerGas : await internal_estimateMaxPriorityFeePerGas(client, {\n block,\n chain: chain2,\n request\n });\n const baseFeePerGas = multiply(block.baseFeePerGas);\n const maxFeePerGas = request?.maxFeePerGas ?? baseFeePerGas + maxPriorityFeePerGas;\n return {\n maxFeePerGas,\n maxPriorityFeePerGas\n };\n }\n const gasPrice = request?.gasPrice ?? multiply(await getAction(client, getGasPrice, \"getGasPrice\")({}));\n return {\n gasPrice\n };\n }\n var init_estimateFeesPerGas = __esm({\n \"../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/actions/public/estimateFeesPerGas.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_fee();\n init_getAction();\n init_estimateMaxPriorityFeePerGas();\n init_getBlock();\n init_getGasPrice();\n }\n });\n\n // ../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/actions/public/getTransactionCount.js\n async function getTransactionCount(client, { address, blockTag = \"latest\", blockNumber }) {\n const count = await client.request({\n method: \"eth_getTransactionCount\",\n params: [\n address,\n typeof blockNumber === \"bigint\" ? numberToHex(blockNumber) : blockTag\n ]\n }, {\n dedupe: Boolean(blockNumber)\n });\n return hexToNumber(count);\n }\n var init_getTransactionCount = __esm({\n \"../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/actions/public/getTransactionCount.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_fromHex();\n init_toHex();\n }\n });\n\n // ../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/utils/blob/blobsToCommitments.js\n function blobsToCommitments(parameters) {\n const { kzg } = parameters;\n const to = parameters.to ?? (typeof parameters.blobs[0] === \"string\" ? \"hex\" : \"bytes\");\n const blobs = typeof parameters.blobs[0] === \"string\" ? parameters.blobs.map((x4) => hexToBytes(x4)) : parameters.blobs;\n const commitments = [];\n for (const blob of blobs)\n commitments.push(Uint8Array.from(kzg.blobToKzgCommitment(blob)));\n return to === \"bytes\" ? commitments : commitments.map((x4) => bytesToHex(x4));\n }\n var init_blobsToCommitments = __esm({\n \"../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/utils/blob/blobsToCommitments.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_toBytes();\n init_toHex();\n }\n });\n\n // ../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/utils/blob/blobsToProofs.js\n function blobsToProofs(parameters) {\n const { kzg } = parameters;\n const to = parameters.to ?? (typeof parameters.blobs[0] === \"string\" ? \"hex\" : \"bytes\");\n const blobs = typeof parameters.blobs[0] === \"string\" ? parameters.blobs.map((x4) => hexToBytes(x4)) : parameters.blobs;\n const commitments = typeof parameters.commitments[0] === \"string\" ? parameters.commitments.map((x4) => hexToBytes(x4)) : parameters.commitments;\n const proofs = [];\n for (let i3 = 0; i3 < blobs.length; i3++) {\n const blob = blobs[i3];\n const commitment = commitments[i3];\n proofs.push(Uint8Array.from(kzg.computeBlobKzgProof(blob, commitment)));\n }\n return to === \"bytes\" ? proofs : proofs.map((x4) => bytesToHex(x4));\n }\n var init_blobsToProofs = __esm({\n \"../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/utils/blob/blobsToProofs.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_toBytes();\n init_toHex();\n }\n });\n\n // ../../../node_modules/.pnpm/@noble+hashes@1.8.0/node_modules/@noble/hashes/esm/sha256.js\n var sha2562;\n var init_sha256 = __esm({\n \"../../../node_modules/.pnpm/@noble+hashes@1.8.0/node_modules/@noble/hashes/esm/sha256.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_sha2();\n sha2562 = sha256;\n }\n });\n\n // ../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/utils/hash/sha256.js\n function sha2563(value, to_) {\n const to = to_ || \"hex\";\n const bytes = sha2562(isHex(value, { strict: false }) ? toBytes(value) : value);\n if (to === \"bytes\")\n return bytes;\n return toHex(bytes);\n }\n var init_sha2562 = __esm({\n \"../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/utils/hash/sha256.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_sha256();\n init_isHex();\n init_toBytes();\n init_toHex();\n }\n });\n\n // ../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/utils/blob/commitmentToVersionedHash.js\n function commitmentToVersionedHash(parameters) {\n const { commitment, version: version6 = 1 } = parameters;\n const to = parameters.to ?? (typeof commitment === \"string\" ? \"hex\" : \"bytes\");\n const versionedHash = sha2563(commitment, \"bytes\");\n versionedHash.set([version6], 0);\n return to === \"bytes\" ? versionedHash : bytesToHex(versionedHash);\n }\n var init_commitmentToVersionedHash = __esm({\n \"../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/utils/blob/commitmentToVersionedHash.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_toHex();\n init_sha2562();\n }\n });\n\n // ../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/utils/blob/commitmentsToVersionedHashes.js\n function commitmentsToVersionedHashes(parameters) {\n const { commitments, version: version6 } = parameters;\n const to = parameters.to ?? (typeof commitments[0] === \"string\" ? \"hex\" : \"bytes\");\n const hashes = [];\n for (const commitment of commitments) {\n hashes.push(commitmentToVersionedHash({\n commitment,\n to,\n version: version6\n }));\n }\n return hashes;\n }\n var init_commitmentsToVersionedHashes = __esm({\n \"../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/utils/blob/commitmentsToVersionedHashes.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_commitmentToVersionedHash();\n }\n });\n\n // ../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/constants/blob.js\n var blobsPerTransaction, bytesPerFieldElement, fieldElementsPerBlob, bytesPerBlob, maxBytesPerTransaction;\n var init_blob = __esm({\n \"../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/constants/blob.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n blobsPerTransaction = 6;\n bytesPerFieldElement = 32;\n fieldElementsPerBlob = 4096;\n bytesPerBlob = bytesPerFieldElement * fieldElementsPerBlob;\n maxBytesPerTransaction = bytesPerBlob * blobsPerTransaction - // terminator byte (0x80).\n 1 - // zero byte (0x00) appended to each field element.\n 1 * fieldElementsPerBlob * blobsPerTransaction;\n }\n });\n\n // ../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/constants/kzg.js\n var versionedHashVersionKzg;\n var init_kzg = __esm({\n \"../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/constants/kzg.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n versionedHashVersionKzg = 1;\n }\n });\n\n // ../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/errors/blob.js\n var BlobSizeTooLargeError, EmptyBlobError, InvalidVersionedHashSizeError, InvalidVersionedHashVersionError;\n var init_blob2 = __esm({\n \"../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/errors/blob.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_kzg();\n init_base();\n BlobSizeTooLargeError = class extends BaseError2 {\n constructor({ maxSize, size: size6 }) {\n super(\"Blob size is too large.\", {\n metaMessages: [`Max: ${maxSize} bytes`, `Given: ${size6} bytes`],\n name: \"BlobSizeTooLargeError\"\n });\n }\n };\n EmptyBlobError = class extends BaseError2 {\n constructor() {\n super(\"Blob data must not be empty.\", { name: \"EmptyBlobError\" });\n }\n };\n InvalidVersionedHashSizeError = class extends BaseError2 {\n constructor({ hash: hash3, size: size6 }) {\n super(`Versioned hash \"${hash3}\" size is invalid.`, {\n metaMessages: [\"Expected: 32\", `Received: ${size6}`],\n name: \"InvalidVersionedHashSizeError\"\n });\n }\n };\n InvalidVersionedHashVersionError = class extends BaseError2 {\n constructor({ hash: hash3, version: version6 }) {\n super(`Versioned hash \"${hash3}\" version is invalid.`, {\n metaMessages: [\n `Expected: ${versionedHashVersionKzg}`,\n `Received: ${version6}`\n ],\n name: \"InvalidVersionedHashVersionError\"\n });\n }\n };\n }\n });\n\n // ../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/utils/blob/toBlobs.js\n function toBlobs(parameters) {\n const to = parameters.to ?? (typeof parameters.data === \"string\" ? \"hex\" : \"bytes\");\n const data = typeof parameters.data === \"string\" ? hexToBytes(parameters.data) : parameters.data;\n const size_ = size(data);\n if (!size_)\n throw new EmptyBlobError();\n if (size_ > maxBytesPerTransaction)\n throw new BlobSizeTooLargeError({\n maxSize: maxBytesPerTransaction,\n size: size_\n });\n const blobs = [];\n let active = true;\n let position = 0;\n while (active) {\n const blob = createCursor(new Uint8Array(bytesPerBlob));\n let size6 = 0;\n while (size6 < fieldElementsPerBlob) {\n const bytes = data.slice(position, position + (bytesPerFieldElement - 1));\n blob.pushByte(0);\n blob.pushBytes(bytes);\n if (bytes.length < 31) {\n blob.pushByte(128);\n active = false;\n break;\n }\n size6++;\n position += 31;\n }\n blobs.push(blob);\n }\n return to === \"bytes\" ? blobs.map((x4) => x4.bytes) : blobs.map((x4) => bytesToHex(x4.bytes));\n }\n var init_toBlobs = __esm({\n \"../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/utils/blob/toBlobs.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_blob();\n init_blob2();\n init_cursor2();\n init_size();\n init_toBytes();\n init_toHex();\n }\n });\n\n // ../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/utils/blob/toBlobSidecars.js\n function toBlobSidecars(parameters) {\n const { data, kzg, to } = parameters;\n const blobs = parameters.blobs ?? toBlobs({ data, to });\n const commitments = parameters.commitments ?? blobsToCommitments({ blobs, kzg, to });\n const proofs = parameters.proofs ?? blobsToProofs({ blobs, commitments, kzg, to });\n const sidecars = [];\n for (let i3 = 0; i3 < blobs.length; i3++)\n sidecars.push({\n blob: blobs[i3],\n commitment: commitments[i3],\n proof: proofs[i3]\n });\n return sidecars;\n }\n var init_toBlobSidecars = __esm({\n \"../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/utils/blob/toBlobSidecars.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_blobsToCommitments();\n init_blobsToProofs();\n init_toBlobs();\n }\n });\n\n // ../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/utils/transaction/getTransactionType.js\n function getTransactionType(transaction) {\n if (transaction.type)\n return transaction.type;\n if (typeof transaction.authorizationList !== \"undefined\")\n return \"eip7702\";\n if (typeof transaction.blobs !== \"undefined\" || typeof transaction.blobVersionedHashes !== \"undefined\" || typeof transaction.maxFeePerBlobGas !== \"undefined\" || typeof transaction.sidecars !== \"undefined\")\n return \"eip4844\";\n if (typeof transaction.maxFeePerGas !== \"undefined\" || typeof transaction.maxPriorityFeePerGas !== \"undefined\") {\n return \"eip1559\";\n }\n if (typeof transaction.gasPrice !== \"undefined\") {\n if (typeof transaction.accessList !== \"undefined\")\n return \"eip2930\";\n return \"legacy\";\n }\n throw new InvalidSerializableTransactionError({ transaction });\n }\n var init_getTransactionType = __esm({\n \"../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/utils/transaction/getTransactionType.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_transaction();\n }\n });\n\n // ../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/actions/public/getChainId.js\n async function getChainId(client) {\n const chainIdHex = await client.request({\n method: \"eth_chainId\"\n }, { dedupe: true });\n return hexToNumber(chainIdHex);\n }\n var init_getChainId = __esm({\n \"../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/actions/public/getChainId.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_fromHex();\n }\n });\n\n // ../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/actions/wallet/prepareTransactionRequest.js\n async function prepareTransactionRequest(client, args) {\n const { account: account_ = client.account, blobs, chain: chain2, gas, kzg, nonce, nonceManager, parameters = defaultParameters, type } = args;\n const account = account_ ? parseAccount(account_) : account_;\n const request = { ...args, ...account ? { from: account?.address } : {} };\n let block;\n async function getBlock2() {\n if (block)\n return block;\n block = await getAction(client, getBlock, \"getBlock\")({ blockTag: \"latest\" });\n return block;\n }\n let chainId;\n async function getChainId2() {\n if (chainId)\n return chainId;\n if (chain2)\n return chain2.id;\n if (typeof args.chainId !== \"undefined\")\n return args.chainId;\n const chainId_ = await getAction(client, getChainId, \"getChainId\")({});\n chainId = chainId_;\n return chainId;\n }\n if (parameters.includes(\"nonce\") && typeof nonce === \"undefined\" && account) {\n if (nonceManager) {\n const chainId2 = await getChainId2();\n request.nonce = await nonceManager.consume({\n address: account.address,\n chainId: chainId2,\n client\n });\n } else {\n request.nonce = await getAction(client, getTransactionCount, \"getTransactionCount\")({\n address: account.address,\n blockTag: \"pending\"\n });\n }\n }\n if ((parameters.includes(\"blobVersionedHashes\") || parameters.includes(\"sidecars\")) && blobs && kzg) {\n const commitments = blobsToCommitments({ blobs, kzg });\n if (parameters.includes(\"blobVersionedHashes\")) {\n const versionedHashes = commitmentsToVersionedHashes({\n commitments,\n to: \"hex\"\n });\n request.blobVersionedHashes = versionedHashes;\n }\n if (parameters.includes(\"sidecars\")) {\n const proofs = blobsToProofs({ blobs, commitments, kzg });\n const sidecars = toBlobSidecars({\n blobs,\n commitments,\n proofs,\n to: \"hex\"\n });\n request.sidecars = sidecars;\n }\n }\n if (parameters.includes(\"chainId\"))\n request.chainId = await getChainId2();\n if ((parameters.includes(\"fees\") || parameters.includes(\"type\")) && typeof type === \"undefined\") {\n try {\n request.type = getTransactionType(request);\n } catch {\n let isEip1559Network = eip1559NetworkCache.get(client.uid);\n if (typeof isEip1559Network === \"undefined\") {\n const block2 = await getBlock2();\n isEip1559Network = typeof block2?.baseFeePerGas === \"bigint\";\n eip1559NetworkCache.set(client.uid, isEip1559Network);\n }\n request.type = isEip1559Network ? \"eip1559\" : \"legacy\";\n }\n }\n if (parameters.includes(\"fees\")) {\n if (request.type !== \"legacy\" && request.type !== \"eip2930\") {\n if (typeof request.maxFeePerGas === \"undefined\" || typeof request.maxPriorityFeePerGas === \"undefined\") {\n const block2 = await getBlock2();\n const { maxFeePerGas, maxPriorityFeePerGas } = await internal_estimateFeesPerGas(client, {\n block: block2,\n chain: chain2,\n request\n });\n if (typeof args.maxPriorityFeePerGas === \"undefined\" && args.maxFeePerGas && args.maxFeePerGas < maxPriorityFeePerGas)\n throw new MaxFeePerGasTooLowError({\n maxPriorityFeePerGas\n });\n request.maxPriorityFeePerGas = maxPriorityFeePerGas;\n request.maxFeePerGas = maxFeePerGas;\n }\n } else {\n if (typeof args.maxFeePerGas !== \"undefined\" || typeof args.maxPriorityFeePerGas !== \"undefined\")\n throw new Eip1559FeesNotSupportedError();\n if (typeof args.gasPrice === \"undefined\") {\n const block2 = await getBlock2();\n const { gasPrice: gasPrice_ } = await internal_estimateFeesPerGas(client, {\n block: block2,\n chain: chain2,\n request,\n type: \"legacy\"\n });\n request.gasPrice = gasPrice_;\n }\n }\n }\n if (parameters.includes(\"gas\") && typeof gas === \"undefined\")\n request.gas = await getAction(client, estimateGas, \"estimateGas\")({\n ...request,\n account,\n prepare: account?.type === \"local\" ? [] : [\"blobVersionedHashes\"]\n });\n assertRequest(request);\n delete request.parameters;\n return request;\n }\n var defaultParameters, eip1559NetworkCache;\n var init_prepareTransactionRequest = __esm({\n \"../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/actions/wallet/prepareTransactionRequest.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_parseAccount();\n init_estimateFeesPerGas();\n init_estimateGas2();\n init_getBlock();\n init_getTransactionCount();\n init_fee();\n init_blobsToCommitments();\n init_blobsToProofs();\n init_commitmentsToVersionedHashes();\n init_toBlobSidecars();\n init_getAction();\n init_assertRequest();\n init_getTransactionType();\n init_getChainId();\n defaultParameters = [\n \"blobVersionedHashes\",\n \"chainId\",\n \"fees\",\n \"gas\",\n \"nonce\",\n \"type\"\n ];\n eip1559NetworkCache = /* @__PURE__ */ new Map();\n }\n });\n\n // ../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/actions/public/estimateGas.js\n async function estimateGas(client, args) {\n const { account: account_ = client.account, prepare = true } = args;\n const account = account_ ? parseAccount(account_) : void 0;\n const parameters = (() => {\n if (Array.isArray(prepare))\n return prepare;\n if (account?.type !== \"local\")\n return [\"blobVersionedHashes\"];\n return void 0;\n })();\n try {\n const { accessList, authorizationList, blobs, blobVersionedHashes, blockNumber, blockTag, data, gas, gasPrice, maxFeePerBlobGas, maxFeePerGas, maxPriorityFeePerGas, nonce, value, stateOverride, ...rest } = prepare ? await prepareTransactionRequest(client, {\n ...args,\n parameters\n }) : args;\n const blockNumberHex = typeof blockNumber === \"bigint\" ? numberToHex(blockNumber) : void 0;\n const block = blockNumberHex || blockTag;\n const rpcStateOverride = serializeStateOverride(stateOverride);\n const to = await (async () => {\n if (rest.to)\n return rest.to;\n if (authorizationList && authorizationList.length > 0)\n return await recoverAuthorizationAddress({\n authorization: authorizationList[0]\n }).catch(() => {\n throw new BaseError2(\"`to` is required. Could not infer from `authorizationList`\");\n });\n return void 0;\n })();\n assertRequest(args);\n const chainFormat = client.chain?.formatters?.transactionRequest?.format;\n const format = chainFormat || formatTransactionRequest;\n const request = format({\n // Pick out extra data that might exist on the chain's transaction request type.\n ...extract(rest, { format: chainFormat }),\n account,\n accessList,\n authorizationList,\n blobs,\n blobVersionedHashes,\n data,\n gas,\n gasPrice,\n maxFeePerBlobGas,\n maxFeePerGas,\n maxPriorityFeePerGas,\n nonce,\n to,\n value\n }, \"estimateGas\");\n return BigInt(await client.request({\n method: \"eth_estimateGas\",\n params: rpcStateOverride ? [\n request,\n block ?? client.experimental_blockTag ?? \"latest\",\n rpcStateOverride\n ] : block ? [request, block] : [request]\n }));\n } catch (err) {\n throw getEstimateGasError(err, {\n ...args,\n account,\n chain: client.chain\n });\n }\n }\n var init_estimateGas2 = __esm({\n \"../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/actions/public/estimateGas.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_parseAccount();\n init_base();\n init_recoverAuthorizationAddress();\n init_toHex();\n init_getEstimateGasError();\n init_extract();\n init_transactionRequest();\n init_stateOverride2();\n init_assertRequest();\n init_prepareTransactionRequest();\n }\n });\n\n // ../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/actions/public/estimateContractGas.js\n async function estimateContractGas(client, parameters) {\n const { abi: abi2, address, args, functionName, dataSuffix, ...request } = parameters;\n const data = encodeFunctionData({\n abi: abi2,\n args,\n functionName\n });\n try {\n const gas = await getAction(client, estimateGas, \"estimateGas\")({\n data: `${data}${dataSuffix ? dataSuffix.replace(\"0x\", \"\") : \"\"}`,\n to: address,\n ...request\n });\n return gas;\n } catch (error) {\n const account = request.account ? parseAccount(request.account) : void 0;\n throw getContractError(error, {\n abi: abi2,\n address,\n args,\n docsPath: \"/docs/contract/estimateContractGas\",\n functionName,\n sender: account?.address\n });\n }\n }\n var init_estimateContractGas = __esm({\n \"../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/actions/public/estimateContractGas.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_parseAccount();\n init_encodeFunctionData();\n init_getContractError();\n init_getAction();\n init_estimateGas2();\n }\n });\n\n // ../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/utils/address/isAddressEqual.js\n function isAddressEqual(a3, b4) {\n if (!isAddress(a3, { strict: false }))\n throw new InvalidAddressError({ address: a3 });\n if (!isAddress(b4, { strict: false }))\n throw new InvalidAddressError({ address: b4 });\n return a3.toLowerCase() === b4.toLowerCase();\n }\n var init_isAddressEqual = __esm({\n \"../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/utils/address/isAddressEqual.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_address();\n init_isAddress();\n }\n });\n\n // ../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/utils/abi/decodeEventLog.js\n function decodeEventLog(parameters) {\n const { abi: abi2, data, strict: strict_, topics } = parameters;\n const strict = strict_ ?? true;\n const [signature, ...argTopics] = topics;\n if (!signature)\n throw new AbiEventSignatureEmptyTopicsError({ docsPath: docsPath3 });\n const abiItem = abi2.find((x4) => x4.type === \"event\" && signature === toEventSelector(formatAbiItem2(x4)));\n if (!(abiItem && \"name\" in abiItem) || abiItem.type !== \"event\")\n throw new AbiEventSignatureNotFoundError(signature, { docsPath: docsPath3 });\n const { name, inputs } = abiItem;\n const isUnnamed = inputs?.some((x4) => !(\"name\" in x4 && x4.name));\n const args = isUnnamed ? [] : {};\n const indexedInputs = inputs.map((x4, i3) => [x4, i3]).filter(([x4]) => \"indexed\" in x4 && x4.indexed);\n for (let i3 = 0; i3 < indexedInputs.length; i3++) {\n const [param, argIndex] = indexedInputs[i3];\n const topic = argTopics[i3];\n if (!topic)\n throw new DecodeLogTopicsMismatch({\n abiItem,\n param\n });\n args[isUnnamed ? argIndex : param.name || argIndex] = decodeTopic({\n param,\n value: topic\n });\n }\n const nonIndexedInputs = inputs.filter((x4) => !(\"indexed\" in x4 && x4.indexed));\n if (nonIndexedInputs.length > 0) {\n if (data && data !== \"0x\") {\n try {\n const decodedData = decodeAbiParameters(nonIndexedInputs, data);\n if (decodedData) {\n if (isUnnamed)\n for (let i3 = 0; i3 < inputs.length; i3++)\n args[i3] = args[i3] ?? decodedData.shift();\n else\n for (let i3 = 0; i3 < nonIndexedInputs.length; i3++)\n args[nonIndexedInputs[i3].name] = decodedData[i3];\n }\n } catch (err) {\n if (strict) {\n if (err instanceof AbiDecodingDataSizeTooSmallError || err instanceof PositionOutOfBoundsError)\n throw new DecodeLogDataMismatch({\n abiItem,\n data,\n params: nonIndexedInputs,\n size: size(data)\n });\n throw err;\n }\n }\n } else if (strict) {\n throw new DecodeLogDataMismatch({\n abiItem,\n data: \"0x\",\n params: nonIndexedInputs,\n size: 0\n });\n }\n }\n return {\n eventName: name,\n args: Object.values(args).length > 0 ? args : void 0\n };\n }\n function decodeTopic({ param, value }) {\n if (param.type === \"string\" || param.type === \"bytes\" || param.type === \"tuple\" || param.type.match(/^(.*)\\[(\\d+)?\\]$/))\n return value;\n const decodedArg = decodeAbiParameters([param], value) || [];\n return decodedArg[0];\n }\n var docsPath3;\n var init_decodeEventLog = __esm({\n \"../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/utils/abi/decodeEventLog.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_abi();\n init_cursor();\n init_size();\n init_toEventSelector();\n init_decodeAbiParameters();\n init_formatAbiItem2();\n docsPath3 = \"/docs/contract/decodeEventLog\";\n }\n });\n\n // ../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/utils/abi/parseEventLogs.js\n function parseEventLogs(parameters) {\n const { abi: abi2, args, logs, strict = true } = parameters;\n const eventName = (() => {\n if (!parameters.eventName)\n return void 0;\n if (Array.isArray(parameters.eventName))\n return parameters.eventName;\n return [parameters.eventName];\n })();\n return logs.map((log) => {\n try {\n const abiItem = abi2.find((abiItem2) => abiItem2.type === \"event\" && log.topics[0] === toEventSelector(abiItem2));\n if (!abiItem)\n return null;\n const event = decodeEventLog({\n ...log,\n abi: [abiItem],\n strict\n });\n if (eventName && !eventName.includes(event.eventName))\n return null;\n if (!includesArgs({\n args: event.args,\n inputs: abiItem.inputs,\n matchArgs: args\n }))\n return null;\n return { ...event, ...log };\n } catch (err) {\n let eventName2;\n let isUnnamed;\n if (err instanceof AbiEventSignatureNotFoundError)\n return null;\n if (err instanceof DecodeLogDataMismatch || err instanceof DecodeLogTopicsMismatch) {\n if (strict)\n return null;\n eventName2 = err.abiItem.name;\n isUnnamed = err.abiItem.inputs?.some((x4) => !(\"name\" in x4 && x4.name));\n }\n return { ...log, args: isUnnamed ? [] : {}, eventName: eventName2 };\n }\n }).filter(Boolean);\n }\n function includesArgs(parameters) {\n const { args, inputs, matchArgs } = parameters;\n if (!matchArgs)\n return true;\n if (!args)\n return false;\n function isEqual2(input, value, arg) {\n try {\n if (input.type === \"address\")\n return isAddressEqual(value, arg);\n if (input.type === \"string\" || input.type === \"bytes\")\n return keccak256(toBytes(value)) === arg;\n return value === arg;\n } catch {\n return false;\n }\n }\n if (Array.isArray(args) && Array.isArray(matchArgs)) {\n return matchArgs.every((value, index2) => {\n if (value === null || value === void 0)\n return true;\n const input = inputs[index2];\n if (!input)\n return false;\n const value_ = Array.isArray(value) ? value : [value];\n return value_.some((value2) => isEqual2(input, value2, args[index2]));\n });\n }\n if (typeof args === \"object\" && !Array.isArray(args) && typeof matchArgs === \"object\" && !Array.isArray(matchArgs))\n return Object.entries(matchArgs).every(([key, value]) => {\n if (value === null || value === void 0)\n return true;\n const input = inputs.find((input2) => input2.name === key);\n if (!input)\n return false;\n const value_ = Array.isArray(value) ? value : [value];\n return value_.some((value2) => isEqual2(input, value2, args[key]));\n });\n return false;\n }\n var init_parseEventLogs = __esm({\n \"../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/utils/abi/parseEventLogs.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_abi();\n init_isAddressEqual();\n init_toBytes();\n init_keccak256();\n init_toEventSelector();\n init_decodeEventLog();\n }\n });\n\n // ../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/utils/formatters/log.js\n function formatLog(log, { args, eventName } = {}) {\n return {\n ...log,\n blockHash: log.blockHash ? log.blockHash : null,\n blockNumber: log.blockNumber ? BigInt(log.blockNumber) : null,\n logIndex: log.logIndex ? Number(log.logIndex) : null,\n transactionHash: log.transactionHash ? log.transactionHash : null,\n transactionIndex: log.transactionIndex ? Number(log.transactionIndex) : null,\n ...eventName ? { args, eventName } : {}\n };\n }\n var init_log2 = __esm({\n \"../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/utils/formatters/log.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n }\n });\n\n // ../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/actions/public/getLogs.js\n async function getLogs(client, { address, blockHash, fromBlock, toBlock, event, events: events_, args, strict: strict_ } = {}) {\n const strict = strict_ ?? false;\n const events = events_ ?? (event ? [event] : void 0);\n let topics = [];\n if (events) {\n const encoded = events.flatMap((event2) => encodeEventTopics({\n abi: [event2],\n eventName: event2.name,\n args: events_ ? void 0 : args\n }));\n topics = [encoded];\n if (event)\n topics = topics[0];\n }\n let logs;\n if (blockHash) {\n logs = await client.request({\n method: \"eth_getLogs\",\n params: [{ address, topics, blockHash }]\n });\n } else {\n logs = await client.request({\n method: \"eth_getLogs\",\n params: [\n {\n address,\n topics,\n fromBlock: typeof fromBlock === \"bigint\" ? numberToHex(fromBlock) : fromBlock,\n toBlock: typeof toBlock === \"bigint\" ? numberToHex(toBlock) : toBlock\n }\n ]\n });\n }\n const formattedLogs = logs.map((log) => formatLog(log));\n if (!events)\n return formattedLogs;\n return parseEventLogs({\n abi: events,\n args,\n logs: formattedLogs,\n strict\n });\n }\n var init_getLogs = __esm({\n \"../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/actions/public/getLogs.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_encodeEventTopics();\n init_parseEventLogs();\n init_toHex();\n init_log2();\n }\n });\n\n // ../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/actions/public/getContractEvents.js\n async function getContractEvents(client, parameters) {\n const { abi: abi2, address, args, blockHash, eventName, fromBlock, toBlock, strict } = parameters;\n const event = eventName ? getAbiItem({ abi: abi2, name: eventName }) : void 0;\n const events = !event ? abi2.filter((x4) => x4.type === \"event\") : void 0;\n return getAction(client, getLogs, \"getLogs\")({\n address,\n args,\n blockHash,\n event,\n events,\n fromBlock,\n toBlock,\n strict\n });\n }\n var init_getContractEvents = __esm({\n \"../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/actions/public/getContractEvents.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_getAbiItem();\n init_getAction();\n init_getLogs();\n }\n });\n\n // ../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/utils/abi/decodeFunctionResult.js\n function decodeFunctionResult(parameters) {\n const { abi: abi2, args, functionName, data } = parameters;\n let abiItem = abi2[0];\n if (functionName) {\n const item = getAbiItem({ abi: abi2, args, name: functionName });\n if (!item)\n throw new AbiFunctionNotFoundError(functionName, { docsPath: docsPath4 });\n abiItem = item;\n }\n if (abiItem.type !== \"function\")\n throw new AbiFunctionNotFoundError(void 0, { docsPath: docsPath4 });\n if (!abiItem.outputs)\n throw new AbiFunctionOutputsNotFoundError(abiItem.name, { docsPath: docsPath4 });\n const values = decodeAbiParameters(abiItem.outputs, data);\n if (values && values.length > 1)\n return values;\n if (values && values.length === 1)\n return values[0];\n return void 0;\n }\n var docsPath4;\n var init_decodeFunctionResult = __esm({\n \"../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/utils/abi/decodeFunctionResult.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_abi();\n init_decodeAbiParameters();\n init_getAbiItem();\n docsPath4 = \"/docs/contract/decodeFunctionResult\";\n }\n });\n\n // ../../../node_modules/.pnpm/ox@0.9.6_typescript@5.8.3_zod@3.25.64/node_modules/ox/_esm/core/version.js\n var version4;\n var init_version4 = __esm({\n \"../../../node_modules/.pnpm/ox@0.9.6_typescript@5.8.3_zod@3.25.64/node_modules/ox/_esm/core/version.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n version4 = \"0.1.1\";\n }\n });\n\n // ../../../node_modules/.pnpm/ox@0.9.6_typescript@5.8.3_zod@3.25.64/node_modules/ox/_esm/core/internal/errors.js\n function getVersion() {\n return version4;\n }\n var init_errors3 = __esm({\n \"../../../node_modules/.pnpm/ox@0.9.6_typescript@5.8.3_zod@3.25.64/node_modules/ox/_esm/core/internal/errors.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_version4();\n }\n });\n\n // ../../../node_modules/.pnpm/ox@0.9.6_typescript@5.8.3_zod@3.25.64/node_modules/ox/_esm/core/Errors.js\n function walk2(err, fn) {\n if (fn?.(err))\n return err;\n if (err && typeof err === \"object\" && \"cause\" in err && err.cause)\n return walk2(err.cause, fn);\n return fn ? null : err;\n }\n var BaseError3;\n var init_Errors = __esm({\n \"../../../node_modules/.pnpm/ox@0.9.6_typescript@5.8.3_zod@3.25.64/node_modules/ox/_esm/core/Errors.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_errors3();\n BaseError3 = class _BaseError extends Error {\n constructor(shortMessage, options = {}) {\n const details = (() => {\n if (options.cause instanceof _BaseError) {\n if (options.cause.details)\n return options.cause.details;\n if (options.cause.shortMessage)\n return options.cause.shortMessage;\n }\n if (options.cause && \"details\" in options.cause && typeof options.cause.details === \"string\")\n return options.cause.details;\n if (options.cause?.message)\n return options.cause.message;\n return options.details;\n })();\n const docsPath8 = (() => {\n if (options.cause instanceof _BaseError)\n return options.cause.docsPath || options.docsPath;\n return options.docsPath;\n })();\n const docsBaseUrl = \"https://oxlib.sh\";\n const docs = `${docsBaseUrl}${docsPath8 ?? \"\"}`;\n const message = [\n shortMessage || \"An error occurred.\",\n ...options.metaMessages ? [\"\", ...options.metaMessages] : [],\n ...details || docsPath8 ? [\n \"\",\n details ? `Details: ${details}` : void 0,\n docsPath8 ? `See: ${docs}` : void 0\n ] : []\n ].filter((x4) => typeof x4 === \"string\").join(\"\\n\");\n super(message, options.cause ? { cause: options.cause } : void 0);\n Object.defineProperty(this, \"details\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: void 0\n });\n Object.defineProperty(this, \"docs\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: void 0\n });\n Object.defineProperty(this, \"docsPath\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: void 0\n });\n Object.defineProperty(this, \"shortMessage\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: void 0\n });\n Object.defineProperty(this, \"cause\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: void 0\n });\n Object.defineProperty(this, \"name\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: \"BaseError\"\n });\n Object.defineProperty(this, \"version\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: `ox@${getVersion()}`\n });\n this.cause = options.cause;\n this.details = details;\n this.docs = docs;\n this.docsPath = docsPath8;\n this.shortMessage = shortMessage;\n }\n walk(fn) {\n return walk2(this, fn);\n }\n };\n }\n });\n\n // ../../../node_modules/.pnpm/ox@0.9.6_typescript@5.8.3_zod@3.25.64/node_modules/ox/_esm/core/internal/bytes.js\n function assertSize2(bytes, size_) {\n if (size2(bytes) > size_)\n throw new SizeOverflowError2({\n givenSize: size2(bytes),\n maxSize: size_\n });\n }\n function assertStartOffset2(value, start) {\n if (typeof start === \"number\" && start > 0 && start > size2(value) - 1)\n throw new SliceOffsetOutOfBoundsError2({\n offset: start,\n position: \"start\",\n size: size2(value)\n });\n }\n function assertEndOffset2(value, start, end) {\n if (typeof start === \"number\" && typeof end === \"number\" && size2(value) !== end - start) {\n throw new SliceOffsetOutOfBoundsError2({\n offset: end,\n position: \"end\",\n size: size2(value)\n });\n }\n }\n function charCodeToBase162(char) {\n if (char >= charCodeMap2.zero && char <= charCodeMap2.nine)\n return char - charCodeMap2.zero;\n if (char >= charCodeMap2.A && char <= charCodeMap2.F)\n return char - (charCodeMap2.A - 10);\n if (char >= charCodeMap2.a && char <= charCodeMap2.f)\n return char - (charCodeMap2.a - 10);\n return void 0;\n }\n function pad2(bytes, options = {}) {\n const { dir, size: size6 = 32 } = options;\n if (size6 === 0)\n return bytes;\n if (bytes.length > size6)\n throw new SizeExceedsPaddingSizeError2({\n size: bytes.length,\n targetSize: size6,\n type: \"Bytes\"\n });\n const paddedBytes = new Uint8Array(size6);\n for (let i3 = 0; i3 < size6; i3++) {\n const padEnd = dir === \"right\";\n paddedBytes[padEnd ? i3 : size6 - i3 - 1] = bytes[padEnd ? i3 : bytes.length - i3 - 1];\n }\n return paddedBytes;\n }\n function trim2(value, options = {}) {\n const { dir = \"left\" } = options;\n let data = value;\n let sliceLength = 0;\n for (let i3 = 0; i3 < data.length - 1; i3++) {\n if (data[dir === \"left\" ? i3 : data.length - i3 - 1].toString() === \"0\")\n sliceLength++;\n else\n break;\n }\n data = dir === \"left\" ? data.slice(sliceLength) : data.slice(0, data.length - sliceLength);\n return data;\n }\n var charCodeMap2;\n var init_bytes = __esm({\n \"../../../node_modules/.pnpm/ox@0.9.6_typescript@5.8.3_zod@3.25.64/node_modules/ox/_esm/core/internal/bytes.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_Bytes();\n charCodeMap2 = {\n zero: 48,\n nine: 57,\n A: 65,\n F: 70,\n a: 97,\n f: 102\n };\n }\n });\n\n // ../../../node_modules/.pnpm/ox@0.9.6_typescript@5.8.3_zod@3.25.64/node_modules/ox/_esm/core/internal/hex.js\n function assertSize3(hex, size_) {\n if (size3(hex) > size_)\n throw new SizeOverflowError3({\n givenSize: size3(hex),\n maxSize: size_\n });\n }\n function assertStartOffset3(value, start) {\n if (typeof start === \"number\" && start > 0 && start > size3(value) - 1)\n throw new SliceOffsetOutOfBoundsError3({\n offset: start,\n position: \"start\",\n size: size3(value)\n });\n }\n function assertEndOffset3(value, start, end) {\n if (typeof start === \"number\" && typeof end === \"number\" && size3(value) !== end - start) {\n throw new SliceOffsetOutOfBoundsError3({\n offset: end,\n position: \"end\",\n size: size3(value)\n });\n }\n }\n function pad3(hex_, options = {}) {\n const { dir, size: size6 = 32 } = options;\n if (size6 === 0)\n return hex_;\n const hex = hex_.replace(\"0x\", \"\");\n if (hex.length > size6 * 2)\n throw new SizeExceedsPaddingSizeError3({\n size: Math.ceil(hex.length / 2),\n targetSize: size6,\n type: \"Hex\"\n });\n return `0x${hex[dir === \"right\" ? \"padEnd\" : \"padStart\"](size6 * 2, \"0\")}`;\n }\n function trim3(value, options = {}) {\n const { dir = \"left\" } = options;\n let data = value.replace(\"0x\", \"\");\n let sliceLength = 0;\n for (let i3 = 0; i3 < data.length - 1; i3++) {\n if (data[dir === \"left\" ? i3 : data.length - i3 - 1].toString() === \"0\")\n sliceLength++;\n else\n break;\n }\n data = dir === \"left\" ? data.slice(sliceLength) : data.slice(0, data.length - sliceLength);\n if (data === \"0\")\n return \"0x\";\n if (dir === \"right\" && data.length % 2 === 1)\n return `0x${data}0`;\n return `0x${data}`;\n }\n var init_hex = __esm({\n \"../../../node_modules/.pnpm/ox@0.9.6_typescript@5.8.3_zod@3.25.64/node_modules/ox/_esm/core/internal/hex.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_Hex();\n }\n });\n\n // ../../../node_modules/.pnpm/ox@0.9.6_typescript@5.8.3_zod@3.25.64/node_modules/ox/_esm/core/Json.js\n function stringify2(value, replacer, space) {\n return JSON.stringify(value, (key, value2) => {\n if (typeof replacer === \"function\")\n return replacer(key, value2);\n if (typeof value2 === \"bigint\")\n return value2.toString() + bigIntSuffix;\n return value2;\n }, space);\n }\n var bigIntSuffix;\n var init_Json = __esm({\n \"../../../node_modules/.pnpm/ox@0.9.6_typescript@5.8.3_zod@3.25.64/node_modules/ox/_esm/core/Json.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n bigIntSuffix = \"#__bigint\";\n }\n });\n\n // ../../../node_modules/.pnpm/ox@0.9.6_typescript@5.8.3_zod@3.25.64/node_modules/ox/_esm/core/Bytes.js\n function assert2(value) {\n if (value instanceof Uint8Array)\n return;\n if (!value)\n throw new InvalidBytesTypeError(value);\n if (typeof value !== \"object\")\n throw new InvalidBytesTypeError(value);\n if (!(\"BYTES_PER_ELEMENT\" in value))\n throw new InvalidBytesTypeError(value);\n if (value.BYTES_PER_ELEMENT !== 1 || value.constructor.name !== \"Uint8Array\")\n throw new InvalidBytesTypeError(value);\n }\n function from(value) {\n if (value instanceof Uint8Array)\n return value;\n if (typeof value === \"string\")\n return fromHex2(value);\n return fromArray(value);\n }\n function fromArray(value) {\n return value instanceof Uint8Array ? value : new Uint8Array(value);\n }\n function fromHex2(value, options = {}) {\n const { size: size6 } = options;\n let hex = value;\n if (size6) {\n assertSize3(value, size6);\n hex = padRight(value, size6);\n }\n let hexString = hex.slice(2);\n if (hexString.length % 2)\n hexString = `0${hexString}`;\n const length2 = hexString.length / 2;\n const bytes = new Uint8Array(length2);\n for (let index2 = 0, j2 = 0; index2 < length2; index2++) {\n const nibbleLeft = charCodeToBase162(hexString.charCodeAt(j2++));\n const nibbleRight = charCodeToBase162(hexString.charCodeAt(j2++));\n if (nibbleLeft === void 0 || nibbleRight === void 0) {\n throw new BaseError3(`Invalid byte sequence (\"${hexString[j2 - 2]}${hexString[j2 - 1]}\" in \"${hexString}\").`);\n }\n bytes[index2] = nibbleLeft * 16 + nibbleRight;\n }\n return bytes;\n }\n function fromString(value, options = {}) {\n const { size: size6 } = options;\n const bytes = encoder3.encode(value);\n if (typeof size6 === \"number\") {\n assertSize2(bytes, size6);\n return padRight2(bytes, size6);\n }\n return bytes;\n }\n function padRight2(value, size6) {\n return pad2(value, { dir: \"right\", size: size6 });\n }\n function size2(value) {\n return value.length;\n }\n function slice2(value, start, end, options = {}) {\n const { strict } = options;\n assertStartOffset2(value, start);\n const value_ = value.slice(start, end);\n if (strict)\n assertEndOffset2(value_, start, end);\n return value_;\n }\n function toBigInt2(bytes, options = {}) {\n const { size: size6 } = options;\n if (typeof size6 !== \"undefined\")\n assertSize2(bytes, size6);\n const hex = fromBytes(bytes, options);\n return toBigInt(hex, options);\n }\n function toBoolean(bytes, options = {}) {\n const { size: size6 } = options;\n let bytes_ = bytes;\n if (typeof size6 !== \"undefined\") {\n assertSize2(bytes_, size6);\n bytes_ = trimLeft(bytes_);\n }\n if (bytes_.length > 1 || bytes_[0] > 1)\n throw new InvalidBytesBooleanError2(bytes_);\n return Boolean(bytes_[0]);\n }\n function toNumber2(bytes, options = {}) {\n const { size: size6 } = options;\n if (typeof size6 !== \"undefined\")\n assertSize2(bytes, size6);\n const hex = fromBytes(bytes, options);\n return toNumber(hex, options);\n }\n function toString(bytes, options = {}) {\n const { size: size6 } = options;\n let bytes_ = bytes;\n if (typeof size6 !== \"undefined\") {\n assertSize2(bytes_, size6);\n bytes_ = trimRight(bytes_);\n }\n return decoder.decode(bytes_);\n }\n function trimLeft(value) {\n return trim2(value, { dir: \"left\" });\n }\n function trimRight(value) {\n return trim2(value, { dir: \"right\" });\n }\n function validate(value) {\n try {\n assert2(value);\n return true;\n } catch {\n return false;\n }\n }\n var decoder, encoder3, InvalidBytesBooleanError2, InvalidBytesTypeError, SizeOverflowError2, SliceOffsetOutOfBoundsError2, SizeExceedsPaddingSizeError2;\n var init_Bytes = __esm({\n \"../../../node_modules/.pnpm/ox@0.9.6_typescript@5.8.3_zod@3.25.64/node_modules/ox/_esm/core/Bytes.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_Errors();\n init_Hex();\n init_bytes();\n init_hex();\n init_Json();\n decoder = /* @__PURE__ */ new TextDecoder();\n encoder3 = /* @__PURE__ */ new TextEncoder();\n InvalidBytesBooleanError2 = class extends BaseError3 {\n constructor(bytes) {\n super(`Bytes value \\`${bytes}\\` is not a valid boolean.`, {\n metaMessages: [\n \"The bytes array must contain a single byte of either a `0` or `1` value.\"\n ]\n });\n Object.defineProperty(this, \"name\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: \"Bytes.InvalidBytesBooleanError\"\n });\n }\n };\n InvalidBytesTypeError = class extends BaseError3 {\n constructor(value) {\n super(`Value \\`${typeof value === \"object\" ? stringify2(value) : value}\\` of type \\`${typeof value}\\` is an invalid Bytes value.`, {\n metaMessages: [\"Bytes values must be of type `Bytes`.\"]\n });\n Object.defineProperty(this, \"name\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: \"Bytes.InvalidBytesTypeError\"\n });\n }\n };\n SizeOverflowError2 = class extends BaseError3 {\n constructor({ givenSize, maxSize }) {\n super(`Size cannot exceed \\`${maxSize}\\` bytes. Given size: \\`${givenSize}\\` bytes.`);\n Object.defineProperty(this, \"name\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: \"Bytes.SizeOverflowError\"\n });\n }\n };\n SliceOffsetOutOfBoundsError2 = class extends BaseError3 {\n constructor({ offset, position, size: size6 }) {\n super(`Slice ${position === \"start\" ? \"starting\" : \"ending\"} at offset \\`${offset}\\` is out-of-bounds (size: \\`${size6}\\`).`);\n Object.defineProperty(this, \"name\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: \"Bytes.SliceOffsetOutOfBoundsError\"\n });\n }\n };\n SizeExceedsPaddingSizeError2 = class extends BaseError3 {\n constructor({ size: size6, targetSize, type }) {\n super(`${type.charAt(0).toUpperCase()}${type.slice(1).toLowerCase()} size (\\`${size6}\\`) exceeds padding size (\\`${targetSize}\\`).`);\n Object.defineProperty(this, \"name\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: \"Bytes.SizeExceedsPaddingSizeError\"\n });\n }\n };\n }\n });\n\n // ../../../node_modules/.pnpm/ox@0.9.6_typescript@5.8.3_zod@3.25.64/node_modules/ox/_esm/core/Hex.js\n function assert3(value, options = {}) {\n const { strict = false } = options;\n if (!value)\n throw new InvalidHexTypeError(value);\n if (typeof value !== \"string\")\n throw new InvalidHexTypeError(value);\n if (strict) {\n if (!/^0x[0-9a-fA-F]*$/.test(value))\n throw new InvalidHexValueError(value);\n }\n if (!value.startsWith(\"0x\"))\n throw new InvalidHexValueError(value);\n }\n function concat2(...values) {\n return `0x${values.reduce((acc, x4) => acc + x4.replace(\"0x\", \"\"), \"\")}`;\n }\n function from2(value) {\n if (value instanceof Uint8Array)\n return fromBytes(value);\n if (Array.isArray(value))\n return fromBytes(new Uint8Array(value));\n return value;\n }\n function fromBoolean(value, options = {}) {\n const hex = `0x${Number(value)}`;\n if (typeof options.size === \"number\") {\n assertSize3(hex, options.size);\n return padLeft(hex, options.size);\n }\n return hex;\n }\n function fromBytes(value, options = {}) {\n let string2 = \"\";\n for (let i3 = 0; i3 < value.length; i3++)\n string2 += hexes4[value[i3]];\n const hex = `0x${string2}`;\n if (typeof options.size === \"number\") {\n assertSize3(hex, options.size);\n return padRight(hex, options.size);\n }\n return hex;\n }\n function fromNumber(value, options = {}) {\n const { signed, size: size6 } = options;\n const value_ = BigInt(value);\n let maxValue;\n if (size6) {\n if (signed)\n maxValue = (1n << BigInt(size6) * 8n - 1n) - 1n;\n else\n maxValue = 2n ** (BigInt(size6) * 8n) - 1n;\n } else if (typeof value === \"number\") {\n maxValue = BigInt(Number.MAX_SAFE_INTEGER);\n }\n const minValue2 = typeof maxValue === \"bigint\" && signed ? -maxValue - 1n : 0;\n if (maxValue && value_ > maxValue || value_ < minValue2) {\n const suffix = typeof value === \"bigint\" ? \"n\" : \"\";\n throw new IntegerOutOfRangeError2({\n max: maxValue ? `${maxValue}${suffix}` : void 0,\n min: `${minValue2}${suffix}`,\n signed,\n size: size6,\n value: `${value}${suffix}`\n });\n }\n const stringValue = (signed && value_ < 0 ? (1n << BigInt(size6 * 8)) + BigInt(value_) : value_).toString(16);\n const hex = `0x${stringValue}`;\n if (size6)\n return padLeft(hex, size6);\n return hex;\n }\n function fromString2(value, options = {}) {\n return fromBytes(encoder4.encode(value), options);\n }\n function padLeft(value, size6) {\n return pad3(value, { dir: \"left\", size: size6 });\n }\n function padRight(value, size6) {\n return pad3(value, { dir: \"right\", size: size6 });\n }\n function slice3(value, start, end, options = {}) {\n const { strict } = options;\n assertStartOffset3(value, start);\n const value_ = `0x${value.replace(\"0x\", \"\").slice((start ?? 0) * 2, (end ?? value.length) * 2)}`;\n if (strict)\n assertEndOffset3(value_, start, end);\n return value_;\n }\n function size3(value) {\n return Math.ceil((value.length - 2) / 2);\n }\n function trimLeft2(value) {\n return trim3(value, { dir: \"left\" });\n }\n function toBigInt(hex, options = {}) {\n const { signed } = options;\n if (options.size)\n assertSize3(hex, options.size);\n const value = BigInt(hex);\n if (!signed)\n return value;\n const size6 = (hex.length - 2) / 2;\n const max_unsigned = (1n << BigInt(size6) * 8n) - 1n;\n const max_signed = max_unsigned >> 1n;\n if (value <= max_signed)\n return value;\n return value - max_unsigned - 1n;\n }\n function toNumber(hex, options = {}) {\n const { signed, size: size6 } = options;\n if (!signed && !size6)\n return Number(hex);\n return Number(toBigInt(hex, options));\n }\n function validate2(value, options = {}) {\n const { strict = false } = options;\n try {\n assert3(value, { strict });\n return true;\n } catch {\n return false;\n }\n }\n var encoder4, hexes4, IntegerOutOfRangeError2, InvalidHexTypeError, InvalidHexValueError, SizeOverflowError3, SliceOffsetOutOfBoundsError3, SizeExceedsPaddingSizeError3;\n var init_Hex = __esm({\n \"../../../node_modules/.pnpm/ox@0.9.6_typescript@5.8.3_zod@3.25.64/node_modules/ox/_esm/core/Hex.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_Errors();\n init_hex();\n init_Json();\n encoder4 = /* @__PURE__ */ new TextEncoder();\n hexes4 = /* @__PURE__ */ Array.from({ length: 256 }, (_v, i3) => i3.toString(16).padStart(2, \"0\"));\n IntegerOutOfRangeError2 = class extends BaseError3 {\n constructor({ max, min, signed, size: size6, value }) {\n super(`Number \\`${value}\\` is not in safe${size6 ? ` ${size6 * 8}-bit` : \"\"}${signed ? \" signed\" : \" unsigned\"} integer range ${max ? `(\\`${min}\\` to \\`${max}\\`)` : `(above \\`${min}\\`)`}`);\n Object.defineProperty(this, \"name\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: \"Hex.IntegerOutOfRangeError\"\n });\n }\n };\n InvalidHexTypeError = class extends BaseError3 {\n constructor(value) {\n super(`Value \\`${typeof value === \"object\" ? stringify2(value) : value}\\` of type \\`${typeof value}\\` is an invalid hex type.`, {\n metaMessages: ['Hex types must be represented as `\"0x${string}\"`.']\n });\n Object.defineProperty(this, \"name\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: \"Hex.InvalidHexTypeError\"\n });\n }\n };\n InvalidHexValueError = class extends BaseError3 {\n constructor(value) {\n super(`Value \\`${value}\\` is an invalid hex value.`, {\n metaMessages: [\n 'Hex values must start with `\"0x\"` and contain only hexadecimal characters (0-9, a-f, A-F).'\n ]\n });\n Object.defineProperty(this, \"name\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: \"Hex.InvalidHexValueError\"\n });\n }\n };\n SizeOverflowError3 = class extends BaseError3 {\n constructor({ givenSize, maxSize }) {\n super(`Size cannot exceed \\`${maxSize}\\` bytes. Given size: \\`${givenSize}\\` bytes.`);\n Object.defineProperty(this, \"name\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: \"Hex.SizeOverflowError\"\n });\n }\n };\n SliceOffsetOutOfBoundsError3 = class extends BaseError3 {\n constructor({ offset, position, size: size6 }) {\n super(`Slice ${position === \"start\" ? \"starting\" : \"ending\"} at offset \\`${offset}\\` is out-of-bounds (size: \\`${size6}\\`).`);\n Object.defineProperty(this, \"name\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: \"Hex.SliceOffsetOutOfBoundsError\"\n });\n }\n };\n SizeExceedsPaddingSizeError3 = class extends BaseError3 {\n constructor({ size: size6, targetSize, type }) {\n super(`${type.charAt(0).toUpperCase()}${type.slice(1).toLowerCase()} size (\\`${size6}\\`) exceeds padding size (\\`${targetSize}\\`).`);\n Object.defineProperty(this, \"name\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: \"Hex.SizeExceedsPaddingSizeError\"\n });\n }\n };\n }\n });\n\n // ../../../node_modules/.pnpm/ox@0.9.6_typescript@5.8.3_zod@3.25.64/node_modules/ox/_esm/core/Withdrawal.js\n function toRpc(withdrawal) {\n return {\n address: withdrawal.address,\n amount: fromNumber(withdrawal.amount),\n index: fromNumber(withdrawal.index),\n validatorIndex: fromNumber(withdrawal.validatorIndex)\n };\n }\n var init_Withdrawal = __esm({\n \"../../../node_modules/.pnpm/ox@0.9.6_typescript@5.8.3_zod@3.25.64/node_modules/ox/_esm/core/Withdrawal.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_Hex();\n }\n });\n\n // ../../../node_modules/.pnpm/ox@0.9.6_typescript@5.8.3_zod@3.25.64/node_modules/ox/_esm/core/BlockOverrides.js\n function toRpc2(blockOverrides) {\n return {\n ...typeof blockOverrides.baseFeePerGas === \"bigint\" && {\n baseFeePerGas: fromNumber(blockOverrides.baseFeePerGas)\n },\n ...typeof blockOverrides.blobBaseFee === \"bigint\" && {\n blobBaseFee: fromNumber(blockOverrides.blobBaseFee)\n },\n ...typeof blockOverrides.feeRecipient === \"string\" && {\n feeRecipient: blockOverrides.feeRecipient\n },\n ...typeof blockOverrides.gasLimit === \"bigint\" && {\n gasLimit: fromNumber(blockOverrides.gasLimit)\n },\n ...typeof blockOverrides.number === \"bigint\" && {\n number: fromNumber(blockOverrides.number)\n },\n ...typeof blockOverrides.prevRandao === \"bigint\" && {\n prevRandao: fromNumber(blockOverrides.prevRandao)\n },\n ...typeof blockOverrides.time === \"bigint\" && {\n time: fromNumber(blockOverrides.time)\n },\n ...blockOverrides.withdrawals && {\n withdrawals: blockOverrides.withdrawals.map(toRpc)\n }\n };\n }\n var init_BlockOverrides = __esm({\n \"../../../node_modules/.pnpm/ox@0.9.6_typescript@5.8.3_zod@3.25.64/node_modules/ox/_esm/core/BlockOverrides.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_Hex();\n init_Withdrawal();\n }\n });\n\n // ../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/constants/abis.js\n var multicall3Abi, batchGatewayAbi, universalResolverErrors, universalResolverResolveAbi, universalResolverReverseAbi, textResolverAbi, addressResolverAbi, erc1271Abi, erc6492SignatureValidatorAbi;\n var init_abis = __esm({\n \"../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/constants/abis.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n multicall3Abi = [\n {\n inputs: [\n {\n components: [\n {\n name: \"target\",\n type: \"address\"\n },\n {\n name: \"allowFailure\",\n type: \"bool\"\n },\n {\n name: \"callData\",\n type: \"bytes\"\n }\n ],\n name: \"calls\",\n type: \"tuple[]\"\n }\n ],\n name: \"aggregate3\",\n outputs: [\n {\n components: [\n {\n name: \"success\",\n type: \"bool\"\n },\n {\n name: \"returnData\",\n type: \"bytes\"\n }\n ],\n name: \"returnData\",\n type: \"tuple[]\"\n }\n ],\n stateMutability: \"view\",\n type: \"function\"\n },\n {\n inputs: [],\n name: \"getCurrentBlockTimestamp\",\n outputs: [\n {\n internalType: \"uint256\",\n name: \"timestamp\",\n type: \"uint256\"\n }\n ],\n stateMutability: \"view\",\n type: \"function\"\n }\n ];\n batchGatewayAbi = [\n {\n name: \"query\",\n type: \"function\",\n stateMutability: \"view\",\n inputs: [\n {\n type: \"tuple[]\",\n name: \"queries\",\n components: [\n {\n type: \"address\",\n name: \"sender\"\n },\n {\n type: \"string[]\",\n name: \"urls\"\n },\n {\n type: \"bytes\",\n name: \"data\"\n }\n ]\n }\n ],\n outputs: [\n {\n type: \"bool[]\",\n name: \"failures\"\n },\n {\n type: \"bytes[]\",\n name: \"responses\"\n }\n ]\n },\n {\n name: \"HttpError\",\n type: \"error\",\n inputs: [\n {\n type: \"uint16\",\n name: \"status\"\n },\n {\n type: \"string\",\n name: \"message\"\n }\n ]\n }\n ];\n universalResolverErrors = [\n {\n inputs: [\n {\n name: \"dns\",\n type: \"bytes\"\n }\n ],\n name: \"DNSDecodingFailed\",\n type: \"error\"\n },\n {\n inputs: [\n {\n name: \"ens\",\n type: \"string\"\n }\n ],\n name: \"DNSEncodingFailed\",\n type: \"error\"\n },\n {\n inputs: [],\n name: \"EmptyAddress\",\n type: \"error\"\n },\n {\n inputs: [\n {\n name: \"status\",\n type: \"uint16\"\n },\n {\n name: \"message\",\n type: \"string\"\n }\n ],\n name: \"HttpError\",\n type: \"error\"\n },\n {\n inputs: [],\n name: \"InvalidBatchGatewayResponse\",\n type: \"error\"\n },\n {\n inputs: [\n {\n name: \"errorData\",\n type: \"bytes\"\n }\n ],\n name: \"ResolverError\",\n type: \"error\"\n },\n {\n inputs: [\n {\n name: \"name\",\n type: \"bytes\"\n },\n {\n name: \"resolver\",\n type: \"address\"\n }\n ],\n name: \"ResolverNotContract\",\n type: \"error\"\n },\n {\n inputs: [\n {\n name: \"name\",\n type: \"bytes\"\n }\n ],\n name: \"ResolverNotFound\",\n type: \"error\"\n },\n {\n inputs: [\n {\n name: \"primary\",\n type: \"string\"\n },\n {\n name: \"primaryAddress\",\n type: \"bytes\"\n }\n ],\n name: \"ReverseAddressMismatch\",\n type: \"error\"\n },\n {\n inputs: [\n {\n internalType: \"bytes4\",\n name: \"selector\",\n type: \"bytes4\"\n }\n ],\n name: \"UnsupportedResolverProfile\",\n type: \"error\"\n }\n ];\n universalResolverResolveAbi = [\n ...universalResolverErrors,\n {\n name: \"resolveWithGateways\",\n type: \"function\",\n stateMutability: \"view\",\n inputs: [\n { name: \"name\", type: \"bytes\" },\n { name: \"data\", type: \"bytes\" },\n { name: \"gateways\", type: \"string[]\" }\n ],\n outputs: [\n { name: \"\", type: \"bytes\" },\n { name: \"address\", type: \"address\" }\n ]\n }\n ];\n universalResolverReverseAbi = [\n ...universalResolverErrors,\n {\n name: \"reverseWithGateways\",\n type: \"function\",\n stateMutability: \"view\",\n inputs: [\n { type: \"bytes\", name: \"reverseName\" },\n { type: \"uint256\", name: \"coinType\" },\n { type: \"string[]\", name: \"gateways\" }\n ],\n outputs: [\n { type: \"string\", name: \"resolvedName\" },\n { type: \"address\", name: \"resolver\" },\n { type: \"address\", name: \"reverseResolver\" }\n ]\n }\n ];\n textResolverAbi = [\n {\n name: \"text\",\n type: \"function\",\n stateMutability: \"view\",\n inputs: [\n { name: \"name\", type: \"bytes32\" },\n { name: \"key\", type: \"string\" }\n ],\n outputs: [{ name: \"\", type: \"string\" }]\n }\n ];\n addressResolverAbi = [\n {\n name: \"addr\",\n type: \"function\",\n stateMutability: \"view\",\n inputs: [{ name: \"name\", type: \"bytes32\" }],\n outputs: [{ name: \"\", type: \"address\" }]\n },\n {\n name: \"addr\",\n type: \"function\",\n stateMutability: \"view\",\n inputs: [\n { name: \"name\", type: \"bytes32\" },\n { name: \"coinType\", type: \"uint256\" }\n ],\n outputs: [{ name: \"\", type: \"bytes\" }]\n }\n ];\n erc1271Abi = [\n {\n name: \"isValidSignature\",\n type: \"function\",\n stateMutability: \"view\",\n inputs: [\n { name: \"hash\", type: \"bytes32\" },\n { name: \"signature\", type: \"bytes\" }\n ],\n outputs: [{ name: \"\", type: \"bytes4\" }]\n }\n ];\n erc6492SignatureValidatorAbi = [\n {\n inputs: [\n {\n name: \"_signer\",\n type: \"address\"\n },\n {\n name: \"_hash\",\n type: \"bytes32\"\n },\n {\n name: \"_signature\",\n type: \"bytes\"\n }\n ],\n stateMutability: \"nonpayable\",\n type: \"constructor\"\n },\n {\n inputs: [\n {\n name: \"_signer\",\n type: \"address\"\n },\n {\n name: \"_hash\",\n type: \"bytes32\"\n },\n {\n name: \"_signature\",\n type: \"bytes\"\n }\n ],\n outputs: [\n {\n type: \"bool\"\n }\n ],\n stateMutability: \"nonpayable\",\n type: \"function\",\n name: \"isValidSig\"\n }\n ];\n }\n });\n\n // ../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/constants/contract.js\n var aggregate3Signature;\n var init_contract2 = __esm({\n \"../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/constants/contract.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n aggregate3Signature = \"0x82ad56cb\";\n }\n });\n\n // ../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/constants/contracts.js\n var deploylessCallViaBytecodeBytecode, deploylessCallViaFactoryBytecode, erc6492SignatureValidatorByteCode, multicall3Bytecode;\n var init_contracts = __esm({\n \"../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/constants/contracts.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n deploylessCallViaBytecodeBytecode = \"0x608060405234801561001057600080fd5b5060405161018e38038061018e83398101604081905261002f91610124565b6000808351602085016000f59050803b61004857600080fd5b6000808351602085016000855af16040513d6000823e81610067573d81fd5b3d81f35b634e487b7160e01b600052604160045260246000fd5b600082601f83011261009257600080fd5b81516001600160401b038111156100ab576100ab61006b565b604051601f8201601f19908116603f011681016001600160401b03811182821017156100d9576100d961006b565b6040528181528382016020018510156100f157600080fd5b60005b82811015610110576020818601810151838301820152016100f4565b506000918101602001919091529392505050565b6000806040838503121561013757600080fd5b82516001600160401b0381111561014d57600080fd5b61015985828601610081565b602085015190935090506001600160401b0381111561017757600080fd5b61018385828601610081565b915050925092905056fe\";\n deploylessCallViaFactoryBytecode = \"0x608060405234801561001057600080fd5b506040516102c03803806102c083398101604081905261002f916101e6565b836001600160a01b03163b6000036100e457600080836001600160a01b03168360405161005c9190610270565b6000604051808303816000865af19150503d8060008114610099576040519150601f19603f3d011682016040523d82523d6000602084013e61009e565b606091505b50915091508115806100b857506001600160a01b0386163b155b156100e1578060405163101bb98d60e01b81526004016100d8919061028c565b60405180910390fd5b50505b6000808451602086016000885af16040513d6000823e81610103573d81fd5b3d81f35b80516001600160a01b038116811461011e57600080fd5b919050565b634e487b7160e01b600052604160045260246000fd5b60005b8381101561015457818101518382015260200161013c565b50506000910152565b600082601f83011261016e57600080fd5b81516001600160401b0381111561018757610187610123565b604051601f8201601f19908116603f011681016001600160401b03811182821017156101b5576101b5610123565b6040528181528382016020018510156101cd57600080fd5b6101de826020830160208701610139565b949350505050565b600080600080608085870312156101fc57600080fd5b61020585610107565b60208601519094506001600160401b0381111561022157600080fd5b61022d8782880161015d565b93505061023c60408601610107565b60608601519092506001600160401b0381111561025857600080fd5b6102648782880161015d565b91505092959194509250565b60008251610282818460208701610139565b9190910192915050565b60208152600082518060208401526102ab816040850160208701610139565b601f01601f1916919091016040019291505056fe\";\n erc6492SignatureValidatorByteCode = \"0x608060405234801561001057600080fd5b5060405161069438038061069483398101604081905261002f9161051e565b600061003c848484610048565b9050806000526001601ff35b60007f64926492649264926492649264926492649264926492649264926492649264926100748361040c565b036101e7576000606080848060200190518101906100929190610577565b60405192955090935091506000906001600160a01b038516906100b69085906105dd565b6000604051808303816000865af19150503d80600081146100f3576040519150601f19603f3d011682016040523d82523d6000602084013e6100f8565b606091505b50509050876001600160a01b03163b60000361016057806101605760405162461bcd60e51b815260206004820152601e60248201527f5369676e617475726556616c696461746f723a206465706c6f796d656e74000060448201526064015b60405180910390fd5b604051630b135d3f60e11b808252906001600160a01b038a1690631626ba7e90610190908b9087906004016105f9565b602060405180830381865afa1580156101ad573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906101d19190610633565b6001600160e01b03191614945050505050610405565b6001600160a01b0384163b1561027a57604051630b135d3f60e11b808252906001600160a01b03861690631626ba7e9061022790879087906004016105f9565b602060405180830381865afa158015610244573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906102689190610633565b6001600160e01b031916149050610405565b81516041146102df5760405162461bcd60e51b815260206004820152603a602482015260008051602061067483398151915260448201527f3a20696e76616c6964207369676e6174757265206c656e6774680000000000006064820152608401610157565b6102e7610425565b5060208201516040808401518451859392600091859190811061030c5761030c61065d565b016020015160f81c9050601b811480159061032b57508060ff16601c14155b1561038c5760405162461bcd60e51b815260206004820152603b602482015260008051602061067483398151915260448201527f3a20696e76616c6964207369676e617475726520762076616c756500000000006064820152608401610157565b60408051600081526020810180835289905260ff83169181019190915260608101849052608081018390526001600160a01b0389169060019060a0016020604051602081039080840390855afa1580156103ea573d6000803e3d6000fd5b505050602060405103516001600160a01b0316149450505050505b9392505050565b600060208251101561041d57600080fd5b508051015190565b60405180606001604052806003906020820280368337509192915050565b6001600160a01b038116811461045857600080fd5b50565b634e487b7160e01b600052604160045260246000fd5b60005b8381101561048c578181015183820152602001610474565b50506000910152565b600082601f8301126104a657600080fd5b81516001600160401b038111156104bf576104bf61045b565b604051601f8201601f19908116603f011681016001600160401b03811182821017156104ed576104ed61045b565b60405281815283820160200185101561050557600080fd5b610516826020830160208701610471565b949350505050565b60008060006060848603121561053357600080fd5b835161053e81610443565b6020850151604086015191945092506001600160401b0381111561056157600080fd5b61056d86828701610495565b9150509250925092565b60008060006060848603121561058c57600080fd5b835161059781610443565b60208501519093506001600160401b038111156105b357600080fd5b6105bf86828701610495565b604086015190935090506001600160401b0381111561056157600080fd5b600082516105ef818460208701610471565b9190910192915050565b828152604060208201526000825180604084015261061e816060850160208701610471565b601f01601f1916919091016060019392505050565b60006020828403121561064557600080fd5b81516001600160e01b03198116811461040557600080fd5b634e487b7160e01b600052603260045260246000fdfe5369676e617475726556616c696461746f72237265636f7665725369676e6572\";\n multicall3Bytecode = \"0x608060405234801561001057600080fd5b506115b9806100206000396000f3fe6080604052600436106100f35760003560e01c80634d2301cc1161008a578063a8b0574e11610059578063a8b0574e14610325578063bce38bd714610350578063c3077fa914610380578063ee82ac5e146103b2576100f3565b80634d2301cc1461026257806372425d9d1461029f57806382ad56cb146102ca57806386d516e8146102fa576100f3565b80633408e470116100c65780633408e470146101af578063399542e9146101da5780633e64a6961461020c57806342cbb15c14610237576100f3565b80630f28c97d146100f8578063174dea7114610123578063252dba421461015357806327e86d6e14610184575b600080fd5b34801561010457600080fd5b5061010d6103ef565b60405161011a9190610c0a565b60405180910390f35b61013d60048036038101906101389190610c94565b6103f7565b60405161014a9190610e94565b60405180910390f35b61016d60048036038101906101689190610f0c565b610615565b60405161017b92919061101b565b60405180910390f35b34801561019057600080fd5b506101996107ab565b6040516101a69190611064565b60405180910390f35b3480156101bb57600080fd5b506101c46107b7565b6040516101d19190610c0a565b60405180910390f35b6101f460048036038101906101ef91906110ab565b6107bf565b6040516102039392919061110b565b60405180910390f35b34801561021857600080fd5b506102216107e1565b60405161022e9190610c0a565b60405180910390f35b34801561024357600080fd5b5061024c6107e9565b6040516102599190610c0a565b60405180910390f35b34801561026e57600080fd5b50610289600480360381019061028491906111a7565b6107f1565b6040516102969190610c0a565b60405180910390f35b3480156102ab57600080fd5b506102b4610812565b6040516102c19190610c0a565b60405180910390f35b6102e460048036038101906102df919061122a565b61081a565b6040516102f19190610e94565b60405180910390f35b34801561030657600080fd5b5061030f6109e4565b60405161031c9190610c0a565b60405180910390f35b34801561033157600080fd5b5061033a6109ec565b6040516103479190611286565b60405180910390f35b61036a600480360381019061036591906110ab565b6109f4565b6040516103779190610e94565b60405180910390f35b61039a60048036038101906103959190610f0c565b610ba6565b6040516103a99392919061110b565b60405180910390f35b3480156103be57600080fd5b506103d960048036038101906103d491906112cd565b610bca565b6040516103e69190611064565b60405180910390f35b600042905090565b60606000808484905090508067ffffffffffffffff81111561041c5761041b6112fa565b5b60405190808252806020026020018201604052801561045557816020015b610442610bd5565b81526020019060019003908161043a5790505b5092503660005b828110156105c957600085828151811061047957610478611329565b5b6020026020010151905087878381811061049657610495611329565b5b90506020028101906104a89190611367565b925060008360400135905080860195508360000160208101906104cb91906111a7565b73ffffffffffffffffffffffffffffffffffffffff16818580606001906104f2919061138f565b604051610500929190611431565b60006040518083038185875af1925050503d806000811461053d576040519150601f19603f3d011682016040523d82523d6000602084013e610542565b606091505b5083600001846020018290528215151515815250505081516020850135176105bc577f08c379a000000000000000000000000000000000000000000000000000000000600052602060045260176024527f4d756c746963616c6c333a2063616c6c206661696c656400000000000000000060445260846000fd5b826001019250505061045c565b5082341461060c576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610603906114a7565b60405180910390fd5b50505092915050565b6000606043915060008484905090508067ffffffffffffffff81111561063e5761063d6112fa565b5b60405190808252806020026020018201604052801561067157816020015b606081526020019060019003908161065c5790505b5091503660005b828110156107a157600087878381811061069557610694611329565b5b90506020028101906106a791906114c7565b92508260000160208101906106bc91906111a7565b73ffffffffffffffffffffffffffffffffffffffff168380602001906106e2919061138f565b6040516106f0929190611431565b6000604051808303816000865af19150503d806000811461072d576040519150601f19603f3d011682016040523d82523d6000602084013e610732565b606091505b5086848151811061074657610745611329565b5b60200260200101819052819250505080610795576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161078c9061153b565b60405180910390fd5b81600101915050610678565b5050509250929050565b60006001430340905090565b600046905090565b6000806060439250434091506107d68686866109f4565b905093509350939050565b600048905090565b600043905090565b60008173ffffffffffffffffffffffffffffffffffffffff16319050919050565b600044905090565b606060008383905090508067ffffffffffffffff81111561083e5761083d6112fa565b5b60405190808252806020026020018201604052801561087757816020015b610864610bd5565b81526020019060019003908161085c5790505b5091503660005b828110156109db57600084828151811061089b5761089a611329565b5b602002602001015190508686838181106108b8576108b7611329565b5b90506020028101906108ca919061155b565b92508260000160208101906108df91906111a7565b73ffffffffffffffffffffffffffffffffffffffff16838060400190610905919061138f565b604051610913929190611431565b6000604051808303816000865af19150503d8060008114610950576040519150601f19603f3d011682016040523d82523d6000602084013e610955565b606091505b5082600001836020018290528215151515815250505080516020840135176109cf577f08c379a000000000000000000000000000000000000000000000000000000000600052602060045260176024527f4d756c746963616c6c333a2063616c6c206661696c656400000000000000000060445260646000fd5b8160010191505061087e565b50505092915050565b600045905090565b600041905090565b606060008383905090508067ffffffffffffffff811115610a1857610a176112fa565b5b604051908082528060200260200182016040528015610a5157816020015b610a3e610bd5565b815260200190600190039081610a365790505b5091503660005b82811015610b9c576000848281518110610a7557610a74611329565b5b60200260200101519050868683818110610a9257610a91611329565b5b9050602002810190610aa491906114c7565b9250826000016020810190610ab991906111a7565b73ffffffffffffffffffffffffffffffffffffffff16838060200190610adf919061138f565b604051610aed929190611431565b6000604051808303816000865af19150503d8060008114610b2a576040519150601f19603f3d011682016040523d82523d6000602084013e610b2f565b606091505b508260000183602001829052821515151581525050508715610b90578060000151610b8f576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610b869061153b565b60405180910390fd5b5b81600101915050610a58565b5050509392505050565b6000806060610bb7600186866107bf565b8093508194508295505050509250925092565b600081409050919050565b6040518060400160405280600015158152602001606081525090565b6000819050919050565b610c0481610bf1565b82525050565b6000602082019050610c1f6000830184610bfb565b92915050565b600080fd5b600080fd5b600080fd5b600080fd5b600080fd5b60008083601f840112610c5457610c53610c2f565b5b8235905067ffffffffffffffff811115610c7157610c70610c34565b5b602083019150836020820283011115610c8d57610c8c610c39565b5b9250929050565b60008060208385031215610cab57610caa610c25565b5b600083013567ffffffffffffffff811115610cc957610cc8610c2a565b5b610cd585828601610c3e565b92509250509250929050565b600081519050919050565b600082825260208201905092915050565b6000819050602082019050919050565b60008115159050919050565b610d2281610d0d565b82525050565b600081519050919050565b600082825260208201905092915050565b60005b83811015610d62578082015181840152602081019050610d47565b83811115610d71576000848401525b50505050565b6000601f19601f8301169050919050565b6000610d9382610d28565b610d9d8185610d33565b9350610dad818560208601610d44565b610db681610d77565b840191505092915050565b6000604083016000830151610dd96000860182610d19565b5060208301518482036020860152610df18282610d88565b9150508091505092915050565b6000610e0a8383610dc1565b905092915050565b6000602082019050919050565b6000610e2a82610ce1565b610e348185610cec565b935083602082028501610e4685610cfd565b8060005b85811015610e825784840389528151610e638582610dfe565b9450610e6e83610e12565b925060208a01995050600181019050610e4a565b50829750879550505050505092915050565b60006020820190508181036000830152610eae8184610e1f565b905092915050565b60008083601f840112610ecc57610ecb610c2f565b5b8235905067ffffffffffffffff811115610ee957610ee8610c34565b5b602083019150836020820283011115610f0557610f04610c39565b5b9250929050565b60008060208385031215610f2357610f22610c25565b5b600083013567ffffffffffffffff811115610f4157610f40610c2a565b5b610f4d85828601610eb6565b92509250509250929050565b600081519050919050565b600082825260208201905092915050565b6000819050602082019050919050565b6000610f918383610d88565b905092915050565b6000602082019050919050565b6000610fb182610f59565b610fbb8185610f64565b935083602082028501610fcd85610f75565b8060005b858110156110095784840389528151610fea8582610f85565b9450610ff583610f99565b925060208a01995050600181019050610fd1565b50829750879550505050505092915050565b60006040820190506110306000830185610bfb565b81810360208301526110428184610fa6565b90509392505050565b6000819050919050565b61105e8161104b565b82525050565b60006020820190506110796000830184611055565b92915050565b61108881610d0d565b811461109357600080fd5b50565b6000813590506110a58161107f565b92915050565b6000806000604084860312156110c4576110c3610c25565b5b60006110d286828701611096565b935050602084013567ffffffffffffffff8111156110f3576110f2610c2a565b5b6110ff86828701610eb6565b92509250509250925092565b60006060820190506111206000830186610bfb565b61112d6020830185611055565b818103604083015261113f8184610e1f565b9050949350505050565b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b600061117482611149565b9050919050565b61118481611169565b811461118f57600080fd5b50565b6000813590506111a18161117b565b92915050565b6000602082840312156111bd576111bc610c25565b5b60006111cb84828501611192565b91505092915050565b60008083601f8401126111ea576111e9610c2f565b5b8235905067ffffffffffffffff81111561120757611206610c34565b5b60208301915083602082028301111561122357611222610c39565b5b9250929050565b6000806020838503121561124157611240610c25565b5b600083013567ffffffffffffffff81111561125f5761125e610c2a565b5b61126b858286016111d4565b92509250509250929050565b61128081611169565b82525050565b600060208201905061129b6000830184611277565b92915050565b6112aa81610bf1565b81146112b557600080fd5b50565b6000813590506112c7816112a1565b92915050565b6000602082840312156112e3576112e2610c25565b5b60006112f1848285016112b8565b91505092915050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b600080fd5b600080fd5b600080fd5b60008235600160800383360303811261138357611382611358565b5b80830191505092915050565b600080833560016020038436030381126113ac576113ab611358565b5b80840192508235915067ffffffffffffffff8211156113ce576113cd61135d565b5b6020830192506001820236038313156113ea576113e9611362565b5b509250929050565b600081905092915050565b82818337600083830152505050565b600061141883856113f2565b93506114258385846113fd565b82840190509392505050565b600061143e82848661140c565b91508190509392505050565b600082825260208201905092915050565b7f4d756c746963616c6c333a2076616c7565206d69736d61746368000000000000600082015250565b6000611491601a8361144a565b915061149c8261145b565b602082019050919050565b600060208201905081810360008301526114c081611484565b9050919050565b6000823560016040038336030381126114e3576114e2611358565b5b80830191505092915050565b7f4d756c746963616c6c333a2063616c6c206661696c6564000000000000000000600082015250565b600061152560178361144a565b9150611530826114ef565b602082019050919050565b6000602082019050818103600083015261155481611518565b9050919050565b60008235600160600383360303811261157757611576611358565b5b8083019150509291505056fea264697066735822122020c1bc9aacf8e4a6507193432a895a8e77094f45a1395583f07b24e860ef06cd64736f6c634300080c0033\";\n }\n });\n\n // ../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/errors/chain.js\n var ChainDoesNotSupportContract, ChainMismatchError, ChainNotFoundError, ClientChainNotConfiguredError, InvalidChainIdError;\n var init_chain = __esm({\n \"../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/errors/chain.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_base();\n ChainDoesNotSupportContract = class extends BaseError2 {\n constructor({ blockNumber, chain: chain2, contract }) {\n super(`Chain \"${chain2.name}\" does not support contract \"${contract.name}\".`, {\n metaMessages: [\n \"This could be due to any of the following:\",\n ...blockNumber && contract.blockCreated && contract.blockCreated > blockNumber ? [\n `- The contract \"${contract.name}\" was not deployed until block ${contract.blockCreated} (current block ${blockNumber}).`\n ] : [\n `- The chain does not have the contract \"${contract.name}\" configured.`\n ]\n ],\n name: \"ChainDoesNotSupportContract\"\n });\n }\n };\n ChainMismatchError = class extends BaseError2 {\n constructor({ chain: chain2, currentChainId }) {\n super(`The current chain of the wallet (id: ${currentChainId}) does not match the target chain for the transaction (id: ${chain2.id} \\u2013 ${chain2.name}).`, {\n metaMessages: [\n `Current Chain ID: ${currentChainId}`,\n `Expected Chain ID: ${chain2.id} \\u2013 ${chain2.name}`\n ],\n name: \"ChainMismatchError\"\n });\n }\n };\n ChainNotFoundError = class extends BaseError2 {\n constructor() {\n super([\n \"No chain was provided to the request.\",\n \"Please provide a chain with the `chain` argument on the Action, or by supplying a `chain` to WalletClient.\"\n ].join(\"\\n\"), {\n name: \"ChainNotFoundError\"\n });\n }\n };\n ClientChainNotConfiguredError = class extends BaseError2 {\n constructor() {\n super(\"No chain was provided to the Client.\", {\n name: \"ClientChainNotConfiguredError\"\n });\n }\n };\n InvalidChainIdError = class extends BaseError2 {\n constructor({ chainId }) {\n super(typeof chainId === \"number\" ? `Chain ID \"${chainId}\" is invalid.` : \"Chain ID is invalid.\", { name: \"InvalidChainIdError\" });\n }\n };\n }\n });\n\n // ../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/utils/abi/encodeDeployData.js\n function encodeDeployData(parameters) {\n const { abi: abi2, args, bytecode } = parameters;\n if (!args || args.length === 0)\n return bytecode;\n const description2 = abi2.find((x4) => \"type\" in x4 && x4.type === \"constructor\");\n if (!description2)\n throw new AbiConstructorNotFoundError({ docsPath: docsPath5 });\n if (!(\"inputs\" in description2))\n throw new AbiConstructorParamsNotFoundError({ docsPath: docsPath5 });\n if (!description2.inputs || description2.inputs.length === 0)\n throw new AbiConstructorParamsNotFoundError({ docsPath: docsPath5 });\n const data = encodeAbiParameters(description2.inputs, args);\n return concatHex([bytecode, data]);\n }\n var docsPath5;\n var init_encodeDeployData = __esm({\n \"../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/utils/abi/encodeDeployData.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_abi();\n init_concat();\n init_encodeAbiParameters();\n docsPath5 = \"/docs/contract/encodeDeployData\";\n }\n });\n\n // ../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/utils/chain/getChainContractAddress.js\n function getChainContractAddress({ blockNumber, chain: chain2, contract: name }) {\n const contract = chain2?.contracts?.[name];\n if (!contract)\n throw new ChainDoesNotSupportContract({\n chain: chain2,\n contract: { name }\n });\n if (blockNumber && contract.blockCreated && contract.blockCreated > blockNumber)\n throw new ChainDoesNotSupportContract({\n blockNumber,\n chain: chain2,\n contract: {\n name,\n blockCreated: contract.blockCreated\n }\n });\n return contract.address;\n }\n var init_getChainContractAddress = __esm({\n \"../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/utils/chain/getChainContractAddress.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_chain();\n }\n });\n\n // ../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/utils/errors/getCallError.js\n function getCallError(err, { docsPath: docsPath8, ...args }) {\n const cause = (() => {\n const cause2 = getNodeError(err, args);\n if (cause2 instanceof UnknownNodeError)\n return err;\n return cause2;\n })();\n return new CallExecutionError(cause, {\n docsPath: docsPath8,\n ...args\n });\n }\n var init_getCallError = __esm({\n \"../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/utils/errors/getCallError.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_contract();\n init_node();\n init_getNodeError();\n }\n });\n\n // ../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/utils/promise/withResolvers.js\n function withResolvers() {\n let resolve = () => void 0;\n let reject = () => void 0;\n const promise = new Promise((resolve_, reject_) => {\n resolve = resolve_;\n reject = reject_;\n });\n return { promise, resolve, reject };\n }\n var init_withResolvers = __esm({\n \"../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/utils/promise/withResolvers.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n }\n });\n\n // ../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/utils/promise/createBatchScheduler.js\n function createBatchScheduler({ fn, id, shouldSplitBatch, wait: wait2 = 0, sort }) {\n const exec = async () => {\n const scheduler = getScheduler();\n flush();\n const args = scheduler.map(({ args: args2 }) => args2);\n if (args.length === 0)\n return;\n fn(args).then((data) => {\n if (sort && Array.isArray(data))\n data.sort(sort);\n for (let i3 = 0; i3 < scheduler.length; i3++) {\n const { resolve } = scheduler[i3];\n resolve?.([data[i3], data]);\n }\n }).catch((err) => {\n for (let i3 = 0; i3 < scheduler.length; i3++) {\n const { reject } = scheduler[i3];\n reject?.(err);\n }\n });\n };\n const flush = () => schedulerCache.delete(id);\n const getBatchedArgs = () => getScheduler().map(({ args }) => args);\n const getScheduler = () => schedulerCache.get(id) || [];\n const setScheduler = (item) => schedulerCache.set(id, [...getScheduler(), item]);\n return {\n flush,\n async schedule(args) {\n const { promise, resolve, reject } = withResolvers();\n const split4 = shouldSplitBatch?.([...getBatchedArgs(), args]);\n if (split4)\n exec();\n const hasActiveScheduler = getScheduler().length > 0;\n if (hasActiveScheduler) {\n setScheduler({ args, resolve, reject });\n return promise;\n }\n setScheduler({ args, resolve, reject });\n setTimeout(exec, wait2);\n return promise;\n }\n };\n }\n var schedulerCache;\n var init_createBatchScheduler = __esm({\n \"../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/utils/promise/createBatchScheduler.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_withResolvers();\n schedulerCache = /* @__PURE__ */ new Map();\n }\n });\n\n // ../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/errors/ccip.js\n var OffchainLookupError, OffchainLookupResponseMalformedError, OffchainLookupSenderMismatchError;\n var init_ccip = __esm({\n \"../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/errors/ccip.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_stringify();\n init_base();\n init_utils4();\n OffchainLookupError = class extends BaseError2 {\n constructor({ callbackSelector, cause, data, extraData, sender, urls }) {\n super(cause.shortMessage || \"An error occurred while fetching for an offchain result.\", {\n cause,\n metaMessages: [\n ...cause.metaMessages || [],\n cause.metaMessages?.length ? \"\" : [],\n \"Offchain Gateway Call:\",\n urls && [\n \" Gateway URL(s):\",\n ...urls.map((url) => ` ${getUrl(url)}`)\n ],\n ` Sender: ${sender}`,\n ` Data: ${data}`,\n ` Callback selector: ${callbackSelector}`,\n ` Extra data: ${extraData}`\n ].flat(),\n name: \"OffchainLookupError\"\n });\n }\n };\n OffchainLookupResponseMalformedError = class extends BaseError2 {\n constructor({ result, url }) {\n super(\"Offchain gateway response is malformed. Response data must be a hex value.\", {\n metaMessages: [\n `Gateway URL: ${getUrl(url)}`,\n `Response: ${stringify(result)}`\n ],\n name: \"OffchainLookupResponseMalformedError\"\n });\n }\n };\n OffchainLookupSenderMismatchError = class extends BaseError2 {\n constructor({ sender, to }) {\n super(\"Reverted sender address does not match target contract address (`to`).\", {\n metaMessages: [\n `Contract address: ${to}`,\n `OffchainLookup sender address: ${sender}`\n ],\n name: \"OffchainLookupSenderMismatchError\"\n });\n }\n };\n }\n });\n\n // ../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/utils/abi/decodeFunctionData.js\n function decodeFunctionData(parameters) {\n const { abi: abi2, data } = parameters;\n const signature = slice(data, 0, 4);\n const description2 = abi2.find((x4) => x4.type === \"function\" && signature === toFunctionSelector(formatAbiItem2(x4)));\n if (!description2)\n throw new AbiFunctionSignatureNotFoundError(signature, {\n docsPath: \"/docs/contract/decodeFunctionData\"\n });\n return {\n functionName: description2.name,\n args: \"inputs\" in description2 && description2.inputs && description2.inputs.length > 0 ? decodeAbiParameters(description2.inputs, slice(data, 4)) : void 0\n };\n }\n var init_decodeFunctionData = __esm({\n \"../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/utils/abi/decodeFunctionData.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_abi();\n init_slice();\n init_toFunctionSelector();\n init_decodeAbiParameters();\n init_formatAbiItem2();\n }\n });\n\n // ../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/utils/abi/encodeErrorResult.js\n function encodeErrorResult(parameters) {\n const { abi: abi2, errorName, args } = parameters;\n let abiItem = abi2[0];\n if (errorName) {\n const item = getAbiItem({ abi: abi2, args, name: errorName });\n if (!item)\n throw new AbiErrorNotFoundError(errorName, { docsPath: docsPath6 });\n abiItem = item;\n }\n if (abiItem.type !== \"error\")\n throw new AbiErrorNotFoundError(void 0, { docsPath: docsPath6 });\n const definition = formatAbiItem2(abiItem);\n const signature = toFunctionSelector(definition);\n let data = \"0x\";\n if (args && args.length > 0) {\n if (!abiItem.inputs)\n throw new AbiErrorInputsNotFoundError(abiItem.name, { docsPath: docsPath6 });\n data = encodeAbiParameters(abiItem.inputs, args);\n }\n return concatHex([signature, data]);\n }\n var docsPath6;\n var init_encodeErrorResult = __esm({\n \"../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/utils/abi/encodeErrorResult.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_abi();\n init_concat();\n init_toFunctionSelector();\n init_encodeAbiParameters();\n init_formatAbiItem2();\n init_getAbiItem();\n docsPath6 = \"/docs/contract/encodeErrorResult\";\n }\n });\n\n // ../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/utils/abi/encodeFunctionResult.js\n function encodeFunctionResult(parameters) {\n const { abi: abi2, functionName, result } = parameters;\n let abiItem = abi2[0];\n if (functionName) {\n const item = getAbiItem({ abi: abi2, name: functionName });\n if (!item)\n throw new AbiFunctionNotFoundError(functionName, { docsPath: docsPath7 });\n abiItem = item;\n }\n if (abiItem.type !== \"function\")\n throw new AbiFunctionNotFoundError(void 0, { docsPath: docsPath7 });\n if (!abiItem.outputs)\n throw new AbiFunctionOutputsNotFoundError(abiItem.name, { docsPath: docsPath7 });\n const values = (() => {\n if (abiItem.outputs.length === 0)\n return [];\n if (abiItem.outputs.length === 1)\n return [result];\n if (Array.isArray(result))\n return result;\n throw new InvalidArrayError(result);\n })();\n return encodeAbiParameters(abiItem.outputs, values);\n }\n var docsPath7;\n var init_encodeFunctionResult = __esm({\n \"../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/utils/abi/encodeFunctionResult.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_abi();\n init_encodeAbiParameters();\n init_getAbiItem();\n docsPath7 = \"/docs/contract/encodeFunctionResult\";\n }\n });\n\n // ../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/utils/ens/localBatchGatewayRequest.js\n async function localBatchGatewayRequest(parameters) {\n const { data, ccipRequest: ccipRequest2 } = parameters;\n const { args: [queries] } = decodeFunctionData({ abi: batchGatewayAbi, data });\n const failures = [];\n const responses = [];\n await Promise.all(queries.map(async (query, i3) => {\n try {\n responses[i3] = query.urls.includes(localBatchGatewayUrl) ? await localBatchGatewayRequest({ data: query.data, ccipRequest: ccipRequest2 }) : await ccipRequest2(query);\n failures[i3] = false;\n } catch (err) {\n failures[i3] = true;\n responses[i3] = encodeError(err);\n }\n }));\n return encodeFunctionResult({\n abi: batchGatewayAbi,\n functionName: \"query\",\n result: [failures, responses]\n });\n }\n function encodeError(error) {\n if (error.name === \"HttpRequestError\" && error.status)\n return encodeErrorResult({\n abi: batchGatewayAbi,\n errorName: \"HttpError\",\n args: [error.status, error.shortMessage]\n });\n return encodeErrorResult({\n abi: [solidityError],\n errorName: \"Error\",\n args: [\"shortMessage\" in error ? error.shortMessage : error.message]\n });\n }\n var localBatchGatewayUrl;\n var init_localBatchGatewayRequest = __esm({\n \"../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/utils/ens/localBatchGatewayRequest.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_abis();\n init_solidity();\n init_decodeFunctionData();\n init_encodeErrorResult();\n init_encodeFunctionResult();\n localBatchGatewayUrl = \"x-batch-gateway:true\";\n }\n });\n\n // ../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/utils/ccip.js\n var ccip_exports = {};\n __export(ccip_exports, {\n ccipRequest: () => ccipRequest,\n offchainLookup: () => offchainLookup,\n offchainLookupAbiItem: () => offchainLookupAbiItem,\n offchainLookupSignature: () => offchainLookupSignature\n });\n async function offchainLookup(client, { blockNumber, blockTag, data, to }) {\n const { args } = decodeErrorResult({\n data,\n abi: [offchainLookupAbiItem]\n });\n const [sender, urls, callData, callbackSelector, extraData] = args;\n const { ccipRead } = client;\n const ccipRequest_ = ccipRead && typeof ccipRead?.request === \"function\" ? ccipRead.request : ccipRequest;\n try {\n if (!isAddressEqual(to, sender))\n throw new OffchainLookupSenderMismatchError({ sender, to });\n const result = urls.includes(localBatchGatewayUrl) ? await localBatchGatewayRequest({\n data: callData,\n ccipRequest: ccipRequest_\n }) : await ccipRequest_({ data: callData, sender, urls });\n const { data: data_ } = await call(client, {\n blockNumber,\n blockTag,\n data: concat([\n callbackSelector,\n encodeAbiParameters([{ type: \"bytes\" }, { type: \"bytes\" }], [result, extraData])\n ]),\n to\n });\n return data_;\n } catch (err) {\n throw new OffchainLookupError({\n callbackSelector,\n cause: err,\n data,\n extraData,\n sender,\n urls\n });\n }\n }\n async function ccipRequest({ data, sender, urls }) {\n let error = new Error(\"An unknown error occurred.\");\n for (let i3 = 0; i3 < urls.length; i3++) {\n const url = urls[i3];\n const method = url.includes(\"{data}\") ? \"GET\" : \"POST\";\n const body = method === \"POST\" ? { data, sender } : void 0;\n const headers = method === \"POST\" ? { \"Content-Type\": \"application/json\" } : {};\n try {\n const response = await fetch(url.replace(\"{sender}\", sender.toLowerCase()).replace(\"{data}\", data), {\n body: JSON.stringify(body),\n headers,\n method\n });\n let result;\n if (response.headers.get(\"Content-Type\")?.startsWith(\"application/json\")) {\n result = (await response.json()).data;\n } else {\n result = await response.text();\n }\n if (!response.ok) {\n error = new HttpRequestError({\n body,\n details: result?.error ? stringify(result.error) : response.statusText,\n headers: response.headers,\n status: response.status,\n url\n });\n continue;\n }\n if (!isHex(result)) {\n error = new OffchainLookupResponseMalformedError({\n result,\n url\n });\n continue;\n }\n return result;\n } catch (err) {\n error = new HttpRequestError({\n body,\n details: err.message,\n url\n });\n }\n }\n throw error;\n }\n var offchainLookupSignature, offchainLookupAbiItem;\n var init_ccip2 = __esm({\n \"../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/utils/ccip.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_call();\n init_ccip();\n init_request();\n init_decodeErrorResult();\n init_encodeAbiParameters();\n init_isAddressEqual();\n init_concat();\n init_isHex();\n init_localBatchGatewayRequest();\n init_stringify();\n offchainLookupSignature = \"0x556f1830\";\n offchainLookupAbiItem = {\n name: \"OffchainLookup\",\n type: \"error\",\n inputs: [\n {\n name: \"sender\",\n type: \"address\"\n },\n {\n name: \"urls\",\n type: \"string[]\"\n },\n {\n name: \"callData\",\n type: \"bytes\"\n },\n {\n name: \"callbackFunction\",\n type: \"bytes4\"\n },\n {\n name: \"extraData\",\n type: \"bytes\"\n }\n ]\n };\n }\n });\n\n // ../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/actions/public/call.js\n async function call(client, args) {\n const { account: account_ = client.account, authorizationList, batch = Boolean(client.batch?.multicall), blockNumber, blockTag = client.experimental_blockTag ?? \"latest\", accessList, blobs, blockOverrides, code, data: data_, factory, factoryData, gas, gasPrice, maxFeePerBlobGas, maxFeePerGas, maxPriorityFeePerGas, nonce, to, value, stateOverride, ...rest } = args;\n const account = account_ ? parseAccount(account_) : void 0;\n if (code && (factory || factoryData))\n throw new BaseError2(\"Cannot provide both `code` & `factory`/`factoryData` as parameters.\");\n if (code && to)\n throw new BaseError2(\"Cannot provide both `code` & `to` as parameters.\");\n const deploylessCallViaBytecode = code && data_;\n const deploylessCallViaFactory = factory && factoryData && to && data_;\n const deploylessCall = deploylessCallViaBytecode || deploylessCallViaFactory;\n const data = (() => {\n if (deploylessCallViaBytecode)\n return toDeploylessCallViaBytecodeData({\n code,\n data: data_\n });\n if (deploylessCallViaFactory)\n return toDeploylessCallViaFactoryData({\n data: data_,\n factory,\n factoryData,\n to\n });\n return data_;\n })();\n try {\n assertRequest(args);\n const blockNumberHex = typeof blockNumber === \"bigint\" ? numberToHex(blockNumber) : void 0;\n const block = blockNumberHex || blockTag;\n const rpcBlockOverrides = blockOverrides ? toRpc2(blockOverrides) : void 0;\n const rpcStateOverride = serializeStateOverride(stateOverride);\n const chainFormat = client.chain?.formatters?.transactionRequest?.format;\n const format = chainFormat || formatTransactionRequest;\n const request = format({\n // Pick out extra data that might exist on the chain's transaction request type.\n ...extract(rest, { format: chainFormat }),\n accessList,\n account,\n authorizationList,\n blobs,\n data,\n gas,\n gasPrice,\n maxFeePerBlobGas,\n maxFeePerGas,\n maxPriorityFeePerGas,\n nonce,\n to: deploylessCall ? void 0 : to,\n value\n }, \"call\");\n if (batch && shouldPerformMulticall({ request }) && !rpcStateOverride && !rpcBlockOverrides) {\n try {\n return await scheduleMulticall(client, {\n ...request,\n blockNumber,\n blockTag\n });\n } catch (err) {\n if (!(err instanceof ClientChainNotConfiguredError) && !(err instanceof ChainDoesNotSupportContract))\n throw err;\n }\n }\n const params = (() => {\n const base4 = [\n request,\n block\n ];\n if (rpcStateOverride && rpcBlockOverrides)\n return [...base4, rpcStateOverride, rpcBlockOverrides];\n if (rpcStateOverride)\n return [...base4, rpcStateOverride];\n if (rpcBlockOverrides)\n return [...base4, {}, rpcBlockOverrides];\n return base4;\n })();\n const response = await client.request({\n method: \"eth_call\",\n params\n });\n if (response === \"0x\")\n return { data: void 0 };\n return { data: response };\n } catch (err) {\n const data2 = getRevertErrorData(err);\n const { offchainLookup: offchainLookup2, offchainLookupSignature: offchainLookupSignature2 } = await Promise.resolve().then(() => (init_ccip2(), ccip_exports));\n if (client.ccipRead !== false && data2?.slice(0, 10) === offchainLookupSignature2 && to)\n return { data: await offchainLookup2(client, { data: data2, to }) };\n if (deploylessCall && data2?.slice(0, 10) === \"0x101bb98d\")\n throw new CounterfactualDeploymentFailedError({ factory });\n throw getCallError(err, {\n ...args,\n account,\n chain: client.chain\n });\n }\n }\n function shouldPerformMulticall({ request }) {\n const { data, to, ...request_ } = request;\n if (!data)\n return false;\n if (data.startsWith(aggregate3Signature))\n return false;\n if (!to)\n return false;\n if (Object.values(request_).filter((x4) => typeof x4 !== \"undefined\").length > 0)\n return false;\n return true;\n }\n async function scheduleMulticall(client, args) {\n const { batchSize = 1024, deployless = false, wait: wait2 = 0 } = typeof client.batch?.multicall === \"object\" ? client.batch.multicall : {};\n const { blockNumber, blockTag = client.experimental_blockTag ?? \"latest\", data, to } = args;\n const multicallAddress = (() => {\n if (deployless)\n return null;\n if (args.multicallAddress)\n return args.multicallAddress;\n if (client.chain) {\n return getChainContractAddress({\n blockNumber,\n chain: client.chain,\n contract: \"multicall3\"\n });\n }\n throw new ClientChainNotConfiguredError();\n })();\n const blockNumberHex = typeof blockNumber === \"bigint\" ? numberToHex(blockNumber) : void 0;\n const block = blockNumberHex || blockTag;\n const { schedule } = createBatchScheduler({\n id: `${client.uid}.${block}`,\n wait: wait2,\n shouldSplitBatch(args2) {\n const size6 = args2.reduce((size7, { data: data2 }) => size7 + (data2.length - 2), 0);\n return size6 > batchSize * 2;\n },\n fn: async (requests) => {\n const calls = requests.map((request) => ({\n allowFailure: true,\n callData: request.data,\n target: request.to\n }));\n const calldata = encodeFunctionData({\n abi: multicall3Abi,\n args: [calls],\n functionName: \"aggregate3\"\n });\n const data2 = await client.request({\n method: \"eth_call\",\n params: [\n {\n ...multicallAddress === null ? {\n data: toDeploylessCallViaBytecodeData({\n code: multicall3Bytecode,\n data: calldata\n })\n } : { to: multicallAddress, data: calldata }\n },\n block\n ]\n });\n return decodeFunctionResult({\n abi: multicall3Abi,\n args: [calls],\n functionName: \"aggregate3\",\n data: data2 || \"0x\"\n });\n }\n });\n const [{ returnData, success }] = await schedule({ data, to });\n if (!success)\n throw new RawContractError({ data: returnData });\n if (returnData === \"0x\")\n return { data: void 0 };\n return { data: returnData };\n }\n function toDeploylessCallViaBytecodeData(parameters) {\n const { code, data } = parameters;\n return encodeDeployData({\n abi: parseAbi([\"constructor(bytes, bytes)\"]),\n bytecode: deploylessCallViaBytecodeBytecode,\n args: [code, data]\n });\n }\n function toDeploylessCallViaFactoryData(parameters) {\n const { data, factory, factoryData, to } = parameters;\n return encodeDeployData({\n abi: parseAbi([\"constructor(address, bytes, address, bytes)\"]),\n bytecode: deploylessCallViaFactoryBytecode,\n args: [to, data, factory, factoryData]\n });\n }\n function getRevertErrorData(err) {\n if (!(err instanceof BaseError2))\n return void 0;\n const error = err.walk();\n return typeof error?.data === \"object\" ? error.data?.data : error.data;\n }\n var init_call = __esm({\n \"../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/actions/public/call.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_exports();\n init_BlockOverrides();\n init_parseAccount();\n init_abis();\n init_contract2();\n init_contracts();\n init_base();\n init_chain();\n init_contract();\n init_decodeFunctionResult();\n init_encodeDeployData();\n init_encodeFunctionData();\n init_getChainContractAddress();\n init_toHex();\n init_getCallError();\n init_extract();\n init_transactionRequest();\n init_createBatchScheduler();\n init_stateOverride2();\n init_assertRequest();\n }\n });\n\n // ../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/actions/public/readContract.js\n async function readContract(client, parameters) {\n const { abi: abi2, address, args, functionName, ...rest } = parameters;\n const calldata = encodeFunctionData({\n abi: abi2,\n args,\n functionName\n });\n try {\n const { data } = await getAction(client, call, \"call\")({\n ...rest,\n data: calldata,\n to: address\n });\n return decodeFunctionResult({\n abi: abi2,\n args,\n functionName,\n data: data || \"0x\"\n });\n } catch (error) {\n throw getContractError(error, {\n abi: abi2,\n address,\n args,\n docsPath: \"/docs/contract/readContract\",\n functionName\n });\n }\n }\n var init_readContract = __esm({\n \"../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/actions/public/readContract.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_decodeFunctionResult();\n init_encodeFunctionData();\n init_getContractError();\n init_getAction();\n init_call();\n }\n });\n\n // ../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/actions/public/simulateContract.js\n async function simulateContract(client, parameters) {\n const { abi: abi2, address, args, dataSuffix, functionName, ...callRequest } = parameters;\n const account = callRequest.account ? parseAccount(callRequest.account) : client.account;\n const calldata = encodeFunctionData({ abi: abi2, args, functionName });\n try {\n const { data } = await getAction(client, call, \"call\")({\n batch: false,\n data: `${calldata}${dataSuffix ? dataSuffix.replace(\"0x\", \"\") : \"\"}`,\n to: address,\n ...callRequest,\n account\n });\n const result = decodeFunctionResult({\n abi: abi2,\n args,\n functionName,\n data: data || \"0x\"\n });\n const minimizedAbi = abi2.filter((abiItem) => \"name\" in abiItem && abiItem.name === parameters.functionName);\n return {\n result,\n request: {\n abi: minimizedAbi,\n address,\n args,\n dataSuffix,\n functionName,\n ...callRequest,\n account\n }\n };\n } catch (error) {\n throw getContractError(error, {\n abi: abi2,\n address,\n args,\n docsPath: \"/docs/contract/simulateContract\",\n functionName,\n sender: account?.address\n });\n }\n }\n var init_simulateContract = __esm({\n \"../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/actions/public/simulateContract.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_parseAccount();\n init_decodeFunctionResult();\n init_encodeFunctionData();\n init_getContractError();\n init_getAction();\n init_call();\n }\n });\n\n // ../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/utils/observe.js\n function observe(observerId, callbacks, fn) {\n const callbackId = ++callbackCount;\n const getListeners = () => listenersCache.get(observerId) || [];\n const unsubscribe = () => {\n const listeners3 = getListeners();\n listenersCache.set(observerId, listeners3.filter((cb) => cb.id !== callbackId));\n };\n const unwatch = () => {\n const listeners3 = getListeners();\n if (!listeners3.some((cb) => cb.id === callbackId))\n return;\n const cleanup2 = cleanupCache.get(observerId);\n if (listeners3.length === 1 && cleanup2) {\n const p4 = cleanup2();\n if (p4 instanceof Promise)\n p4.catch(() => {\n });\n }\n unsubscribe();\n };\n const listeners2 = getListeners();\n listenersCache.set(observerId, [\n ...listeners2,\n { id: callbackId, fns: callbacks }\n ]);\n if (listeners2 && listeners2.length > 0)\n return unwatch;\n const emit2 = {};\n for (const key in callbacks) {\n emit2[key] = (...args) => {\n const listeners3 = getListeners();\n if (listeners3.length === 0)\n return;\n for (const listener of listeners3)\n listener.fns[key]?.(...args);\n };\n }\n const cleanup = fn(emit2);\n if (typeof cleanup === \"function\")\n cleanupCache.set(observerId, cleanup);\n return unwatch;\n }\n var listenersCache, cleanupCache, callbackCount;\n var init_observe = __esm({\n \"../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/utils/observe.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n listenersCache = /* @__PURE__ */ new Map();\n cleanupCache = /* @__PURE__ */ new Map();\n callbackCount = 0;\n }\n });\n\n // ../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/utils/wait.js\n async function wait(time) {\n return new Promise((res) => setTimeout(res, time));\n }\n var init_wait = __esm({\n \"../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/utils/wait.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n }\n });\n\n // ../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/utils/poll.js\n function poll(fn, { emitOnBegin, initialWaitTime, interval }) {\n let active = true;\n const unwatch = () => active = false;\n const watch = async () => {\n let data;\n if (emitOnBegin)\n data = await fn({ unpoll: unwatch });\n const initialWait = await initialWaitTime?.(data) ?? interval;\n await wait(initialWait);\n const poll2 = async () => {\n if (!active)\n return;\n await fn({ unpoll: unwatch });\n await wait(interval);\n poll2();\n };\n poll2();\n };\n watch();\n return unwatch;\n }\n var init_poll = __esm({\n \"../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/utils/poll.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_wait();\n }\n });\n\n // ../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/utils/promise/withCache.js\n function getCache(cacheKey2) {\n const buildCache = (cacheKey3, cache) => ({\n clear: () => cache.delete(cacheKey3),\n get: () => cache.get(cacheKey3),\n set: (data) => cache.set(cacheKey3, data)\n });\n const promise = buildCache(cacheKey2, promiseCache);\n const response = buildCache(cacheKey2, responseCache);\n return {\n clear: () => {\n promise.clear();\n response.clear();\n },\n promise,\n response\n };\n }\n async function withCache(fn, { cacheKey: cacheKey2, cacheTime = Number.POSITIVE_INFINITY }) {\n const cache = getCache(cacheKey2);\n const response = cache.response.get();\n if (response && cacheTime > 0) {\n const age = Date.now() - response.created.getTime();\n if (age < cacheTime)\n return response.data;\n }\n let promise = cache.promise.get();\n if (!promise) {\n promise = fn();\n cache.promise.set(promise);\n }\n try {\n const data = await promise;\n cache.response.set({ created: /* @__PURE__ */ new Date(), data });\n return data;\n } finally {\n cache.promise.clear();\n }\n }\n var promiseCache, responseCache;\n var init_withCache = __esm({\n \"../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/utils/promise/withCache.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n promiseCache = /* @__PURE__ */ new Map();\n responseCache = /* @__PURE__ */ new Map();\n }\n });\n\n // ../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/actions/public/getBlockNumber.js\n async function getBlockNumber(client, { cacheTime = client.cacheTime } = {}) {\n const blockNumberHex = await withCache(() => client.request({\n method: \"eth_blockNumber\"\n }), { cacheKey: cacheKey(client.uid), cacheTime });\n return BigInt(blockNumberHex);\n }\n var cacheKey;\n var init_getBlockNumber = __esm({\n \"../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/actions/public/getBlockNumber.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_withCache();\n cacheKey = (id) => `blockNumber.${id}`;\n }\n });\n\n // ../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/actions/public/getFilterChanges.js\n async function getFilterChanges(_client, { filter }) {\n const strict = \"strict\" in filter && filter.strict;\n const logs = await filter.request({\n method: \"eth_getFilterChanges\",\n params: [filter.id]\n });\n if (typeof logs[0] === \"string\")\n return logs;\n const formattedLogs = logs.map((log) => formatLog(log));\n if (!(\"abi\" in filter) || !filter.abi)\n return formattedLogs;\n return parseEventLogs({\n abi: filter.abi,\n logs: formattedLogs,\n strict\n });\n }\n var init_getFilterChanges = __esm({\n \"../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/actions/public/getFilterChanges.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_parseEventLogs();\n init_log2();\n }\n });\n\n // ../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/actions/public/uninstallFilter.js\n async function uninstallFilter(_client, { filter }) {\n return filter.request({\n method: \"eth_uninstallFilter\",\n params: [filter.id]\n });\n }\n var init_uninstallFilter = __esm({\n \"../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/actions/public/uninstallFilter.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n }\n });\n\n // ../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/actions/public/watchContractEvent.js\n function watchContractEvent(client, parameters) {\n const { abi: abi2, address, args, batch = true, eventName, fromBlock, onError, onLogs, poll: poll_, pollingInterval = client.pollingInterval, strict: strict_ } = parameters;\n const enablePolling = (() => {\n if (typeof poll_ !== \"undefined\")\n return poll_;\n if (typeof fromBlock === \"bigint\")\n return true;\n if (client.transport.type === \"webSocket\" || client.transport.type === \"ipc\")\n return false;\n if (client.transport.type === \"fallback\" && (client.transport.transports[0].config.type === \"webSocket\" || client.transport.transports[0].config.type === \"ipc\"))\n return false;\n return true;\n })();\n const pollContractEvent = () => {\n const strict = strict_ ?? false;\n const observerId = stringify([\n \"watchContractEvent\",\n address,\n args,\n batch,\n client.uid,\n eventName,\n pollingInterval,\n strict,\n fromBlock\n ]);\n return observe(observerId, { onLogs, onError }, (emit2) => {\n let previousBlockNumber;\n if (fromBlock !== void 0)\n previousBlockNumber = fromBlock - 1n;\n let filter;\n let initialized = false;\n const unwatch = poll(async () => {\n if (!initialized) {\n try {\n filter = await getAction(client, createContractEventFilter, \"createContractEventFilter\")({\n abi: abi2,\n address,\n args,\n eventName,\n strict,\n fromBlock\n });\n } catch {\n }\n initialized = true;\n return;\n }\n try {\n let logs;\n if (filter) {\n logs = await getAction(client, getFilterChanges, \"getFilterChanges\")({ filter });\n } else {\n const blockNumber = await getAction(client, getBlockNumber, \"getBlockNumber\")({});\n if (previousBlockNumber && previousBlockNumber < blockNumber) {\n logs = await getAction(client, getContractEvents, \"getContractEvents\")({\n abi: abi2,\n address,\n args,\n eventName,\n fromBlock: previousBlockNumber + 1n,\n toBlock: blockNumber,\n strict\n });\n } else {\n logs = [];\n }\n previousBlockNumber = blockNumber;\n }\n if (logs.length === 0)\n return;\n if (batch)\n emit2.onLogs(logs);\n else\n for (const log of logs)\n emit2.onLogs([log]);\n } catch (err) {\n if (filter && err instanceof InvalidInputRpcError)\n initialized = false;\n emit2.onError?.(err);\n }\n }, {\n emitOnBegin: true,\n interval: pollingInterval\n });\n return async () => {\n if (filter)\n await getAction(client, uninstallFilter, \"uninstallFilter\")({ filter });\n unwatch();\n };\n });\n };\n const subscribeContractEvent = () => {\n const strict = strict_ ?? false;\n const observerId = stringify([\n \"watchContractEvent\",\n address,\n args,\n batch,\n client.uid,\n eventName,\n pollingInterval,\n strict\n ]);\n let active = true;\n let unsubscribe = () => active = false;\n return observe(observerId, { onLogs, onError }, (emit2) => {\n ;\n (async () => {\n try {\n const transport = (() => {\n if (client.transport.type === \"fallback\") {\n const transport2 = client.transport.transports.find((transport3) => transport3.config.type === \"webSocket\" || transport3.config.type === \"ipc\");\n if (!transport2)\n return client.transport;\n return transport2.value;\n }\n return client.transport;\n })();\n const topics = eventName ? encodeEventTopics({\n abi: abi2,\n eventName,\n args\n }) : [];\n const { unsubscribe: unsubscribe_ } = await transport.subscribe({\n params: [\"logs\", { address, topics }],\n onData(data) {\n if (!active)\n return;\n const log = data.result;\n try {\n const { eventName: eventName2, args: args2 } = decodeEventLog({\n abi: abi2,\n data: log.data,\n topics: log.topics,\n strict: strict_\n });\n const formatted = formatLog(log, {\n args: args2,\n eventName: eventName2\n });\n emit2.onLogs([formatted]);\n } catch (err) {\n let eventName2;\n let isUnnamed;\n if (err instanceof DecodeLogDataMismatch || err instanceof DecodeLogTopicsMismatch) {\n if (strict_)\n return;\n eventName2 = err.abiItem.name;\n isUnnamed = err.abiItem.inputs?.some((x4) => !(\"name\" in x4 && x4.name));\n }\n const formatted = formatLog(log, {\n args: isUnnamed ? [] : {},\n eventName: eventName2\n });\n emit2.onLogs([formatted]);\n }\n },\n onError(error) {\n emit2.onError?.(error);\n }\n });\n unsubscribe = unsubscribe_;\n if (!active)\n unsubscribe();\n } catch (err) {\n onError?.(err);\n }\n })();\n return () => unsubscribe();\n });\n };\n return enablePolling ? pollContractEvent() : subscribeContractEvent();\n }\n var init_watchContractEvent = __esm({\n \"../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/actions/public/watchContractEvent.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_abi();\n init_rpc();\n init_decodeEventLog();\n init_encodeEventTopics();\n init_log2();\n init_getAction();\n init_observe();\n init_poll();\n init_stringify();\n init_createContractEventFilter();\n init_getBlockNumber();\n init_getContractEvents();\n init_getFilterChanges();\n init_uninstallFilter();\n }\n });\n\n // ../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/errors/account.js\n var AccountNotFoundError, AccountTypeNotSupportedError;\n var init_account = __esm({\n \"../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/errors/account.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_base();\n AccountNotFoundError = class extends BaseError2 {\n constructor({ docsPath: docsPath8 } = {}) {\n super([\n \"Could not find an Account to execute with this Action.\",\n \"Please provide an Account with the `account` argument on the Action, or by supplying an `account` to the Client.\"\n ].join(\"\\n\"), {\n docsPath: docsPath8,\n docsSlug: \"account\",\n name: \"AccountNotFoundError\"\n });\n }\n };\n AccountTypeNotSupportedError = class extends BaseError2 {\n constructor({ docsPath: docsPath8, metaMessages, type }) {\n super(`Account type \"${type}\" is not supported.`, {\n docsPath: docsPath8,\n metaMessages,\n name: \"AccountTypeNotSupportedError\"\n });\n }\n };\n }\n });\n\n // ../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/utils/chain/assertCurrentChain.js\n function assertCurrentChain({ chain: chain2, currentChainId }) {\n if (!chain2)\n throw new ChainNotFoundError();\n if (currentChainId !== chain2.id)\n throw new ChainMismatchError({ chain: chain2, currentChainId });\n }\n var init_assertCurrentChain = __esm({\n \"../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/utils/chain/assertCurrentChain.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_chain();\n }\n });\n\n // ../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/utils/errors/getTransactionError.js\n function getTransactionError(err, { docsPath: docsPath8, ...args }) {\n const cause = (() => {\n const cause2 = getNodeError(err, args);\n if (cause2 instanceof UnknownNodeError)\n return err;\n return cause2;\n })();\n return new TransactionExecutionError(cause, {\n docsPath: docsPath8,\n ...args\n });\n }\n var init_getTransactionError = __esm({\n \"../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/utils/errors/getTransactionError.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_node();\n init_transaction();\n init_getNodeError();\n }\n });\n\n // ../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/actions/wallet/sendRawTransaction.js\n async function sendRawTransaction(client, { serializedTransaction }) {\n return client.request({\n method: \"eth_sendRawTransaction\",\n params: [serializedTransaction]\n }, { retryCount: 0 });\n }\n var init_sendRawTransaction = __esm({\n \"../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/actions/wallet/sendRawTransaction.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n }\n });\n\n // ../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/actions/wallet/sendTransaction.js\n async function sendTransaction(client, parameters) {\n const { account: account_ = client.account, chain: chain2 = client.chain, accessList, authorizationList, blobs, data, gas, gasPrice, maxFeePerBlobGas, maxFeePerGas, maxPriorityFeePerGas, nonce, type, value, ...rest } = parameters;\n if (typeof account_ === \"undefined\")\n throw new AccountNotFoundError({\n docsPath: \"/docs/actions/wallet/sendTransaction\"\n });\n const account = account_ ? parseAccount(account_) : null;\n try {\n assertRequest(parameters);\n const to = await (async () => {\n if (parameters.to)\n return parameters.to;\n if (parameters.to === null)\n return void 0;\n if (authorizationList && authorizationList.length > 0)\n return await recoverAuthorizationAddress({\n authorization: authorizationList[0]\n }).catch(() => {\n throw new BaseError2(\"`to` is required. Could not infer from `authorizationList`.\");\n });\n return void 0;\n })();\n if (account?.type === \"json-rpc\" || account === null) {\n let chainId;\n if (chain2 !== null) {\n chainId = await getAction(client, getChainId, \"getChainId\")({});\n assertCurrentChain({\n currentChainId: chainId,\n chain: chain2\n });\n }\n const chainFormat = client.chain?.formatters?.transactionRequest?.format;\n const format = chainFormat || formatTransactionRequest;\n const request = format({\n // Pick out extra data that might exist on the chain's transaction request type.\n ...extract(rest, { format: chainFormat }),\n accessList,\n account,\n authorizationList,\n blobs,\n chainId,\n data,\n gas,\n gasPrice,\n maxFeePerBlobGas,\n maxFeePerGas,\n maxPriorityFeePerGas,\n nonce,\n to,\n type,\n value\n }, \"sendTransaction\");\n const isWalletNamespaceSupported = supportsWalletNamespace.get(client.uid);\n const method = isWalletNamespaceSupported ? \"wallet_sendTransaction\" : \"eth_sendTransaction\";\n try {\n return await client.request({\n method,\n params: [request]\n }, { retryCount: 0 });\n } catch (e3) {\n if (isWalletNamespaceSupported === false)\n throw e3;\n const error = e3;\n if (error.name === \"InvalidInputRpcError\" || error.name === \"InvalidParamsRpcError\" || error.name === \"MethodNotFoundRpcError\" || error.name === \"MethodNotSupportedRpcError\") {\n return await client.request({\n method: \"wallet_sendTransaction\",\n params: [request]\n }, { retryCount: 0 }).then((hash3) => {\n supportsWalletNamespace.set(client.uid, true);\n return hash3;\n }).catch((e4) => {\n const walletNamespaceError = e4;\n if (walletNamespaceError.name === \"MethodNotFoundRpcError\" || walletNamespaceError.name === \"MethodNotSupportedRpcError\") {\n supportsWalletNamespace.set(client.uid, false);\n throw error;\n }\n throw walletNamespaceError;\n });\n }\n throw error;\n }\n }\n if (account?.type === \"local\") {\n const request = await getAction(client, prepareTransactionRequest, \"prepareTransactionRequest\")({\n account,\n accessList,\n authorizationList,\n blobs,\n chain: chain2,\n data,\n gas,\n gasPrice,\n maxFeePerBlobGas,\n maxFeePerGas,\n maxPriorityFeePerGas,\n nonce,\n nonceManager: account.nonceManager,\n parameters: [...defaultParameters, \"sidecars\"],\n type,\n value,\n ...rest,\n to\n });\n const serializer = chain2?.serializers?.transaction;\n const serializedTransaction = await account.signTransaction(request, {\n serializer\n });\n return await getAction(client, sendRawTransaction, \"sendRawTransaction\")({\n serializedTransaction\n });\n }\n if (account?.type === \"smart\")\n throw new AccountTypeNotSupportedError({\n metaMessages: [\n \"Consider using the `sendUserOperation` Action instead.\"\n ],\n docsPath: \"/docs/actions/bundler/sendUserOperation\",\n type: \"smart\"\n });\n throw new AccountTypeNotSupportedError({\n docsPath: \"/docs/actions/wallet/sendTransaction\",\n type: account?.type\n });\n } catch (err) {\n if (err instanceof AccountTypeNotSupportedError)\n throw err;\n throw getTransactionError(err, {\n ...parameters,\n account,\n chain: parameters.chain || void 0\n });\n }\n }\n var supportsWalletNamespace;\n var init_sendTransaction = __esm({\n \"../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/actions/wallet/sendTransaction.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_parseAccount();\n init_account();\n init_base();\n init_recoverAuthorizationAddress();\n init_assertCurrentChain();\n init_getTransactionError();\n init_extract();\n init_transactionRequest();\n init_getAction();\n init_lru();\n init_assertRequest();\n init_getChainId();\n init_prepareTransactionRequest();\n init_sendRawTransaction();\n supportsWalletNamespace = new LruMap(128);\n }\n });\n\n // ../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/actions/wallet/writeContract.js\n async function writeContract(client, parameters) {\n return writeContract.internal(client, sendTransaction, \"sendTransaction\", parameters);\n }\n var init_writeContract = __esm({\n \"../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/actions/wallet/writeContract.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_parseAccount();\n init_account();\n init_encodeFunctionData();\n init_getContractError();\n init_getAction();\n init_sendTransaction();\n (function(writeContract2) {\n async function internal(client, actionFn, name, parameters) {\n const { abi: abi2, account: account_ = client.account, address, args, dataSuffix, functionName, ...request } = parameters;\n if (typeof account_ === \"undefined\")\n throw new AccountNotFoundError({\n docsPath: \"/docs/contract/writeContract\"\n });\n const account = account_ ? parseAccount(account_) : null;\n const data = encodeFunctionData({\n abi: abi2,\n args,\n functionName\n });\n try {\n return await getAction(client, actionFn, name)({\n data: `${data}${dataSuffix ? dataSuffix.replace(\"0x\", \"\") : \"\"}`,\n to: address,\n account,\n ...request\n });\n } catch (error) {\n throw getContractError(error, {\n abi: abi2,\n address,\n args,\n docsPath: \"/docs/contract/writeContract\",\n functionName,\n sender: account?.address\n });\n }\n }\n writeContract2.internal = internal;\n })(writeContract || (writeContract = {}));\n }\n });\n\n // ../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/actions/getContract.js\n function getContract({ abi: abi2, address, client: client_ }) {\n const client = client_;\n const [publicClient, walletClient] = (() => {\n if (!client)\n return [void 0, void 0];\n if (\"public\" in client && \"wallet\" in client)\n return [client.public, client.wallet];\n if (\"public\" in client)\n return [client.public, void 0];\n if (\"wallet\" in client)\n return [void 0, client.wallet];\n return [client, client];\n })();\n const hasPublicClient = publicClient !== void 0 && publicClient !== null;\n const hasWalletClient = walletClient !== void 0 && walletClient !== null;\n const contract = {};\n let hasReadFunction = false;\n let hasWriteFunction = false;\n let hasEvent = false;\n for (const item of abi2) {\n if (item.type === \"function\")\n if (item.stateMutability === \"view\" || item.stateMutability === \"pure\")\n hasReadFunction = true;\n else\n hasWriteFunction = true;\n else if (item.type === \"event\")\n hasEvent = true;\n if (hasReadFunction && hasWriteFunction && hasEvent)\n break;\n }\n if (hasPublicClient) {\n if (hasReadFunction)\n contract.read = new Proxy({}, {\n get(_2, functionName) {\n return (...parameters) => {\n const { args, options } = getFunctionParameters(parameters);\n return getAction(publicClient, readContract, \"readContract\")({\n abi: abi2,\n address,\n functionName,\n args,\n ...options\n });\n };\n }\n });\n if (hasWriteFunction)\n contract.simulate = new Proxy({}, {\n get(_2, functionName) {\n return (...parameters) => {\n const { args, options } = getFunctionParameters(parameters);\n return getAction(publicClient, simulateContract, \"simulateContract\")({\n abi: abi2,\n address,\n functionName,\n args,\n ...options\n });\n };\n }\n });\n if (hasEvent) {\n contract.createEventFilter = new Proxy({}, {\n get(_2, eventName) {\n return (...parameters) => {\n const abiEvent = abi2.find((x4) => x4.type === \"event\" && x4.name === eventName);\n const { args, options } = getEventParameters(parameters, abiEvent);\n return getAction(publicClient, createContractEventFilter, \"createContractEventFilter\")({\n abi: abi2,\n address,\n eventName,\n args,\n ...options\n });\n };\n }\n });\n contract.getEvents = new Proxy({}, {\n get(_2, eventName) {\n return (...parameters) => {\n const abiEvent = abi2.find((x4) => x4.type === \"event\" && x4.name === eventName);\n const { args, options } = getEventParameters(parameters, abiEvent);\n return getAction(publicClient, getContractEvents, \"getContractEvents\")({\n abi: abi2,\n address,\n eventName,\n args,\n ...options\n });\n };\n }\n });\n contract.watchEvent = new Proxy({}, {\n get(_2, eventName) {\n return (...parameters) => {\n const abiEvent = abi2.find((x4) => x4.type === \"event\" && x4.name === eventName);\n const { args, options } = getEventParameters(parameters, abiEvent);\n return getAction(publicClient, watchContractEvent, \"watchContractEvent\")({\n abi: abi2,\n address,\n eventName,\n args,\n ...options\n });\n };\n }\n });\n }\n }\n if (hasWalletClient) {\n if (hasWriteFunction)\n contract.write = new Proxy({}, {\n get(_2, functionName) {\n return (...parameters) => {\n const { args, options } = getFunctionParameters(parameters);\n return getAction(walletClient, writeContract, \"writeContract\")({\n abi: abi2,\n address,\n functionName,\n args,\n ...options\n });\n };\n }\n });\n }\n if (hasPublicClient || hasWalletClient) {\n if (hasWriteFunction)\n contract.estimateGas = new Proxy({}, {\n get(_2, functionName) {\n return (...parameters) => {\n const { args, options } = getFunctionParameters(parameters);\n const client2 = publicClient ?? walletClient;\n return getAction(client2, estimateContractGas, \"estimateContractGas\")({\n abi: abi2,\n address,\n functionName,\n args,\n ...options,\n account: options.account ?? walletClient.account\n });\n };\n }\n });\n }\n contract.address = address;\n contract.abi = abi2;\n return contract;\n }\n function getFunctionParameters(values) {\n const hasArgs = values.length && Array.isArray(values[0]);\n const args = hasArgs ? values[0] : [];\n const options = (hasArgs ? values[1] : values[0]) ?? {};\n return { args, options };\n }\n function getEventParameters(values, abiEvent) {\n let hasArgs = false;\n if (Array.isArray(values[0]))\n hasArgs = true;\n else if (values.length === 1) {\n hasArgs = abiEvent.inputs.some((x4) => x4.indexed);\n } else if (values.length === 2) {\n hasArgs = true;\n }\n const args = hasArgs ? values[0] : void 0;\n const options = (hasArgs ? values[1] : values[0]) ?? {};\n return { args, options };\n }\n var init_getContract = __esm({\n \"../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/actions/getContract.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_getAction();\n init_createContractEventFilter();\n init_estimateContractGas();\n init_getContractEvents();\n init_readContract();\n init_simulateContract();\n init_watchContractEvent();\n init_writeContract();\n }\n });\n\n // ../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/utils/promise/withRetry.js\n function withRetry(fn, { delay: delay_ = 100, retryCount = 2, shouldRetry: shouldRetry2 = () => true } = {}) {\n return new Promise((resolve, reject) => {\n const attemptRetry = async ({ count = 0 } = {}) => {\n const retry = async ({ error }) => {\n const delay = typeof delay_ === \"function\" ? delay_({ count, error }) : delay_;\n if (delay)\n await wait(delay);\n attemptRetry({ count: count + 1 });\n };\n try {\n const data = await fn();\n resolve(data);\n } catch (err) {\n if (count < retryCount && await shouldRetry2({ count, error: err }))\n return retry({ error: err });\n reject(err);\n }\n };\n attemptRetry();\n });\n }\n var init_withRetry = __esm({\n \"../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/utils/promise/withRetry.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_wait();\n }\n });\n\n // ../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/utils/formatters/transactionReceipt.js\n function formatTransactionReceipt(transactionReceipt, _2) {\n const receipt = {\n ...transactionReceipt,\n blockNumber: transactionReceipt.blockNumber ? BigInt(transactionReceipt.blockNumber) : null,\n contractAddress: transactionReceipt.contractAddress ? transactionReceipt.contractAddress : null,\n cumulativeGasUsed: transactionReceipt.cumulativeGasUsed ? BigInt(transactionReceipt.cumulativeGasUsed) : null,\n effectiveGasPrice: transactionReceipt.effectiveGasPrice ? BigInt(transactionReceipt.effectiveGasPrice) : null,\n gasUsed: transactionReceipt.gasUsed ? BigInt(transactionReceipt.gasUsed) : null,\n logs: transactionReceipt.logs ? transactionReceipt.logs.map((log) => formatLog(log)) : null,\n to: transactionReceipt.to ? transactionReceipt.to : null,\n transactionIndex: transactionReceipt.transactionIndex ? hexToNumber(transactionReceipt.transactionIndex) : null,\n status: transactionReceipt.status ? receiptStatuses[transactionReceipt.status] : null,\n type: transactionReceipt.type ? transactionType[transactionReceipt.type] || transactionReceipt.type : null\n };\n if (transactionReceipt.blobGasPrice)\n receipt.blobGasPrice = BigInt(transactionReceipt.blobGasPrice);\n if (transactionReceipt.blobGasUsed)\n receipt.blobGasUsed = BigInt(transactionReceipt.blobGasUsed);\n return receipt;\n }\n var receiptStatuses, defineTransactionReceipt;\n var init_transactionReceipt = __esm({\n \"../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/utils/formatters/transactionReceipt.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_fromHex();\n init_formatter();\n init_log2();\n init_transaction2();\n receiptStatuses = {\n \"0x0\": \"reverted\",\n \"0x1\": \"success\"\n };\n defineTransactionReceipt = /* @__PURE__ */ defineFormatter(\"transactionReceipt\", formatTransactionReceipt);\n }\n });\n\n // ../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/utils/uid.js\n function uid(length2 = 11) {\n if (!buffer || index + length2 > size4 * 2) {\n buffer = \"\";\n index = 0;\n for (let i3 = 0; i3 < size4; i3++) {\n buffer += (256 + Math.random() * 256 | 0).toString(16).substring(1);\n }\n }\n return buffer.substring(index, index++ + length2);\n }\n var size4, index, buffer;\n var init_uid = __esm({\n \"../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/utils/uid.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n size4 = 256;\n index = size4;\n }\n });\n\n // ../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/clients/createClient.js\n function createClient(parameters) {\n const { batch, chain: chain2, ccipRead, key = \"base\", name = \"Base Client\", type = \"base\" } = parameters;\n const experimental_blockTag = parameters.experimental_blockTag ?? (typeof chain2?.experimental_preconfirmationTime === \"number\" ? \"pending\" : void 0);\n const blockTime = chain2?.blockTime ?? 12e3;\n const defaultPollingInterval = Math.min(Math.max(Math.floor(blockTime / 2), 500), 4e3);\n const pollingInterval = parameters.pollingInterval ?? defaultPollingInterval;\n const cacheTime = parameters.cacheTime ?? pollingInterval;\n const account = parameters.account ? parseAccount(parameters.account) : void 0;\n const { config: config2, request, value } = parameters.transport({\n chain: chain2,\n pollingInterval\n });\n const transport = { ...config2, ...value };\n const client = {\n account,\n batch,\n cacheTime,\n ccipRead,\n chain: chain2,\n key,\n name,\n pollingInterval,\n request,\n transport,\n type,\n uid: uid(),\n ...experimental_blockTag ? { experimental_blockTag } : {}\n };\n function extend(base4) {\n return (extendFn) => {\n const extended = extendFn(base4);\n for (const key2 in client)\n delete extended[key2];\n const combined = { ...base4, ...extended };\n return Object.assign(combined, { extend: extend(combined) });\n };\n }\n return Object.assign(client, { extend: extend(client) });\n }\n var init_createClient = __esm({\n \"../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/clients/createClient.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_parseAccount();\n init_uid();\n }\n });\n\n // ../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/utils/ens/errors.js\n function isNullUniversalResolverError(err) {\n if (!(err instanceof BaseError2))\n return false;\n const cause = err.walk((e3) => e3 instanceof ContractFunctionRevertedError);\n if (!(cause instanceof ContractFunctionRevertedError))\n return false;\n if (cause.data?.errorName === \"HttpError\")\n return true;\n if (cause.data?.errorName === \"ResolverError\")\n return true;\n if (cause.data?.errorName === \"ResolverNotContract\")\n return true;\n if (cause.data?.errorName === \"ResolverNotFound\")\n return true;\n if (cause.data?.errorName === \"ReverseAddressMismatch\")\n return true;\n if (cause.data?.errorName === \"UnsupportedResolverProfile\")\n return true;\n return false;\n }\n var init_errors4 = __esm({\n \"../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/utils/ens/errors.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_base();\n init_contract();\n }\n });\n\n // ../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/utils/ens/encodedLabelToLabelhash.js\n function encodedLabelToLabelhash(label) {\n if (label.length !== 66)\n return null;\n if (label.indexOf(\"[\") !== 0)\n return null;\n if (label.indexOf(\"]\") !== 65)\n return null;\n const hash3 = `0x${label.slice(1, 65)}`;\n if (!isHex(hash3))\n return null;\n return hash3;\n }\n var init_encodedLabelToLabelhash = __esm({\n \"../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/utils/ens/encodedLabelToLabelhash.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_isHex();\n }\n });\n\n // ../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/utils/ens/namehash.js\n function namehash(name) {\n let result = new Uint8Array(32).fill(0);\n if (!name)\n return bytesToHex(result);\n const labels = name.split(\".\");\n for (let i3 = labels.length - 1; i3 >= 0; i3 -= 1) {\n const hashFromEncodedLabel = encodedLabelToLabelhash(labels[i3]);\n const hashed = hashFromEncodedLabel ? toBytes(hashFromEncodedLabel) : keccak256(stringToBytes(labels[i3]), \"bytes\");\n result = keccak256(concat([result, hashed]), \"bytes\");\n }\n return bytesToHex(result);\n }\n var init_namehash = __esm({\n \"../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/utils/ens/namehash.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_concat();\n init_toBytes();\n init_toHex();\n init_keccak256();\n init_encodedLabelToLabelhash();\n }\n });\n\n // ../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/utils/ens/encodeLabelhash.js\n function encodeLabelhash(hash3) {\n return `[${hash3.slice(2)}]`;\n }\n var init_encodeLabelhash = __esm({\n \"../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/utils/ens/encodeLabelhash.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n }\n });\n\n // ../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/utils/ens/labelhash.js\n function labelhash(label) {\n const result = new Uint8Array(32).fill(0);\n if (!label)\n return bytesToHex(result);\n return encodedLabelToLabelhash(label) || keccak256(stringToBytes(label));\n }\n var init_labelhash = __esm({\n \"../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/utils/ens/labelhash.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_toBytes();\n init_toHex();\n init_keccak256();\n init_encodedLabelToLabelhash();\n }\n });\n\n // ../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/utils/ens/packetToBytes.js\n function packetToBytes(packet) {\n const value = packet.replace(/^\\.|\\.$/gm, \"\");\n if (value.length === 0)\n return new Uint8Array(1);\n const bytes = new Uint8Array(stringToBytes(value).byteLength + 2);\n let offset = 0;\n const list = value.split(\".\");\n for (let i3 = 0; i3 < list.length; i3++) {\n let encoded = stringToBytes(list[i3]);\n if (encoded.byteLength > 255)\n encoded = stringToBytes(encodeLabelhash(labelhash(list[i3])));\n bytes[offset] = encoded.length;\n bytes.set(encoded, offset + 1);\n offset += encoded.length + 1;\n }\n if (bytes.byteLength !== offset + 1)\n return bytes.slice(0, offset + 1);\n return bytes;\n }\n var init_packetToBytes = __esm({\n \"../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/utils/ens/packetToBytes.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_toBytes();\n init_encodeLabelhash();\n init_labelhash();\n }\n });\n\n // ../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/actions/ens/getEnsAddress.js\n async function getEnsAddress(client, parameters) {\n const { blockNumber, blockTag, coinType, name, gatewayUrls, strict } = parameters;\n const { chain: chain2 } = client;\n const universalResolverAddress = (() => {\n if (parameters.universalResolverAddress)\n return parameters.universalResolverAddress;\n if (!chain2)\n throw new Error(\"client chain not configured. universalResolverAddress is required.\");\n return getChainContractAddress({\n blockNumber,\n chain: chain2,\n contract: \"ensUniversalResolver\"\n });\n })();\n const tlds = chain2?.ensTlds;\n if (tlds && !tlds.some((tld) => name.endsWith(tld)))\n return null;\n const args = (() => {\n if (coinType != null)\n return [namehash(name), BigInt(coinType)];\n return [namehash(name)];\n })();\n try {\n const functionData = encodeFunctionData({\n abi: addressResolverAbi,\n functionName: \"addr\",\n args\n });\n const readContractParameters = {\n address: universalResolverAddress,\n abi: universalResolverResolveAbi,\n functionName: \"resolveWithGateways\",\n args: [\n toHex(packetToBytes(name)),\n functionData,\n gatewayUrls ?? [localBatchGatewayUrl]\n ],\n blockNumber,\n blockTag\n };\n const readContractAction = getAction(client, readContract, \"readContract\");\n const res = await readContractAction(readContractParameters);\n if (res[0] === \"0x\")\n return null;\n const address = decodeFunctionResult({\n abi: addressResolverAbi,\n args,\n functionName: \"addr\",\n data: res[0]\n });\n if (address === \"0x\")\n return null;\n if (trim(address) === \"0x00\")\n return null;\n return address;\n } catch (err) {\n if (strict)\n throw err;\n if (isNullUniversalResolverError(err))\n return null;\n throw err;\n }\n }\n var init_getEnsAddress = __esm({\n \"../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/actions/ens/getEnsAddress.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_abis();\n init_decodeFunctionResult();\n init_encodeFunctionData();\n init_getChainContractAddress();\n init_trim();\n init_toHex();\n init_errors4();\n init_localBatchGatewayRequest();\n init_namehash();\n init_packetToBytes();\n init_getAction();\n init_readContract();\n }\n });\n\n // ../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/errors/ens.js\n var EnsAvatarInvalidMetadataError, EnsAvatarInvalidNftUriError, EnsAvatarUriResolutionError, EnsAvatarUnsupportedNamespaceError;\n var init_ens = __esm({\n \"../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/errors/ens.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_base();\n EnsAvatarInvalidMetadataError = class extends BaseError2 {\n constructor({ data }) {\n super(\"Unable to extract image from metadata. The metadata may be malformed or invalid.\", {\n metaMessages: [\n \"- Metadata must be a JSON object with at least an `image`, `image_url` or `image_data` property.\",\n \"\",\n `Provided data: ${JSON.stringify(data)}`\n ],\n name: \"EnsAvatarInvalidMetadataError\"\n });\n }\n };\n EnsAvatarInvalidNftUriError = class extends BaseError2 {\n constructor({ reason }) {\n super(`ENS NFT avatar URI is invalid. ${reason}`, {\n name: \"EnsAvatarInvalidNftUriError\"\n });\n }\n };\n EnsAvatarUriResolutionError = class extends BaseError2 {\n constructor({ uri }) {\n super(`Unable to resolve ENS avatar URI \"${uri}\". The URI may be malformed, invalid, or does not respond with a valid image.`, { name: \"EnsAvatarUriResolutionError\" });\n }\n };\n EnsAvatarUnsupportedNamespaceError = class extends BaseError2 {\n constructor({ namespace }) {\n super(`ENS NFT avatar namespace \"${namespace}\" is not supported. Must be \"erc721\" or \"erc1155\".`, { name: \"EnsAvatarUnsupportedNamespaceError\" });\n }\n };\n }\n });\n\n // ../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/utils/ens/avatar/utils.js\n async function isImageUri(uri) {\n try {\n const res = await fetch(uri, { method: \"HEAD\" });\n if (res.status === 200) {\n const contentType = res.headers.get(\"content-type\");\n return contentType?.startsWith(\"image/\");\n }\n return false;\n } catch (error) {\n if (typeof error === \"object\" && typeof error.response !== \"undefined\") {\n return false;\n }\n if (!Object.hasOwn(globalThis, \"Image\"))\n return false;\n return new Promise((resolve) => {\n const img = new Image();\n img.onload = () => {\n resolve(true);\n };\n img.onerror = () => {\n resolve(false);\n };\n img.src = uri;\n });\n }\n }\n function getGateway(custom3, defaultGateway) {\n if (!custom3)\n return defaultGateway;\n if (custom3.endsWith(\"/\"))\n return custom3.slice(0, -1);\n return custom3;\n }\n function resolveAvatarUri({ uri, gatewayUrls }) {\n const isEncoded = base64Regex.test(uri);\n if (isEncoded)\n return { uri, isOnChain: true, isEncoded };\n const ipfsGateway = getGateway(gatewayUrls?.ipfs, \"https://ipfs.io\");\n const arweaveGateway = getGateway(gatewayUrls?.arweave, \"https://arweave.net\");\n const networkRegexMatch = uri.match(networkRegex);\n const { protocol, subpath, target, subtarget = \"\" } = networkRegexMatch?.groups || {};\n const isIPNS = protocol === \"ipns:/\" || subpath === \"ipns/\";\n const isIPFS = protocol === \"ipfs:/\" || subpath === \"ipfs/\" || ipfsHashRegex.test(uri);\n if (uri.startsWith(\"http\") && !isIPNS && !isIPFS) {\n let replacedUri = uri;\n if (gatewayUrls?.arweave)\n replacedUri = uri.replace(/https:\\/\\/arweave.net/g, gatewayUrls?.arweave);\n return { uri: replacedUri, isOnChain: false, isEncoded: false };\n }\n if ((isIPNS || isIPFS) && target) {\n return {\n uri: `${ipfsGateway}/${isIPNS ? \"ipns\" : \"ipfs\"}/${target}${subtarget}`,\n isOnChain: false,\n isEncoded: false\n };\n }\n if (protocol === \"ar:/\" && target) {\n return {\n uri: `${arweaveGateway}/${target}${subtarget || \"\"}`,\n isOnChain: false,\n isEncoded: false\n };\n }\n let parsedUri = uri.replace(dataURIRegex, \"\");\n if (parsedUri.startsWith(\" res2.json());\n const image = await parseAvatarUri({\n gatewayUrls,\n uri: getJsonImage(res)\n });\n return image;\n } catch {\n throw new EnsAvatarUriResolutionError({ uri });\n }\n }\n async function parseAvatarUri({ gatewayUrls, uri }) {\n const { uri: resolvedURI, isOnChain } = resolveAvatarUri({ uri, gatewayUrls });\n if (isOnChain)\n return resolvedURI;\n const isImage = await isImageUri(resolvedURI);\n if (isImage)\n return resolvedURI;\n throw new EnsAvatarUriResolutionError({ uri });\n }\n function parseNftUri(uri_) {\n let uri = uri_;\n if (uri.startsWith(\"did:nft:\")) {\n uri = uri.replace(\"did:nft:\", \"\").replace(/_/g, \"/\");\n }\n const [reference, asset_namespace, tokenID] = uri.split(\"/\");\n const [eip_namespace, chainID] = reference.split(\":\");\n const [erc_namespace, contractAddress] = asset_namespace.split(\":\");\n if (!eip_namespace || eip_namespace.toLowerCase() !== \"eip155\")\n throw new EnsAvatarInvalidNftUriError({ reason: \"Only EIP-155 supported\" });\n if (!chainID)\n throw new EnsAvatarInvalidNftUriError({ reason: \"Chain ID not found\" });\n if (!contractAddress)\n throw new EnsAvatarInvalidNftUriError({\n reason: \"Contract address not found\"\n });\n if (!tokenID)\n throw new EnsAvatarInvalidNftUriError({ reason: \"Token ID not found\" });\n if (!erc_namespace)\n throw new EnsAvatarInvalidNftUriError({ reason: \"ERC namespace not found\" });\n return {\n chainID: Number.parseInt(chainID, 10),\n namespace: erc_namespace.toLowerCase(),\n contractAddress,\n tokenID\n };\n }\n async function getNftTokenUri(client, { nft }) {\n if (nft.namespace === \"erc721\") {\n return readContract(client, {\n address: nft.contractAddress,\n abi: [\n {\n name: \"tokenURI\",\n type: \"function\",\n stateMutability: \"view\",\n inputs: [{ name: \"tokenId\", type: \"uint256\" }],\n outputs: [{ name: \"\", type: \"string\" }]\n }\n ],\n functionName: \"tokenURI\",\n args: [BigInt(nft.tokenID)]\n });\n }\n if (nft.namespace === \"erc1155\") {\n return readContract(client, {\n address: nft.contractAddress,\n abi: [\n {\n name: \"uri\",\n type: \"function\",\n stateMutability: \"view\",\n inputs: [{ name: \"_id\", type: \"uint256\" }],\n outputs: [{ name: \"\", type: \"string\" }]\n }\n ],\n functionName: \"uri\",\n args: [BigInt(nft.tokenID)]\n });\n }\n throw new EnsAvatarUnsupportedNamespaceError({ namespace: nft.namespace });\n }\n var networkRegex, ipfsHashRegex, base64Regex, dataURIRegex;\n var init_utils6 = __esm({\n \"../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/utils/ens/avatar/utils.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_readContract();\n init_ens();\n networkRegex = /(?https?:\\/\\/[^/]*|ipfs:\\/|ipns:\\/|ar:\\/)?(?\\/)?(?ipfs\\/|ipns\\/)?(?[\\w\\-.]+)(?\\/.*)?/;\n ipfsHashRegex = /^(Qm[1-9A-HJ-NP-Za-km-z]{44,}|b[A-Za-z2-7]{58,}|B[A-Z2-7]{58,}|z[1-9A-HJ-NP-Za-km-z]{48,}|F[0-9A-F]{50,})(\\/(?[\\w\\-.]+))?(?\\/.*)?$/;\n base64Regex = /^data:([a-zA-Z\\-/+]*);base64,([^\"].*)/;\n dataURIRegex = /^data:([a-zA-Z\\-/+]*)?(;[a-zA-Z0-9].*?)?(,)/;\n }\n });\n\n // ../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/utils/ens/avatar/parseAvatarRecord.js\n async function parseAvatarRecord(client, { gatewayUrls, record: record2 }) {\n if (/eip155:/i.test(record2))\n return parseNftAvatarUri(client, { gatewayUrls, record: record2 });\n return parseAvatarUri({ uri: record2, gatewayUrls });\n }\n async function parseNftAvatarUri(client, { gatewayUrls, record: record2 }) {\n const nft = parseNftUri(record2);\n const nftUri = await getNftTokenUri(client, { nft });\n const { uri: resolvedNftUri, isOnChain, isEncoded } = resolveAvatarUri({ uri: nftUri, gatewayUrls });\n if (isOnChain && (resolvedNftUri.includes(\"data:application/json;base64,\") || resolvedNftUri.startsWith(\"{\"))) {\n const encodedJson = isEncoded ? (\n // if it is encoded, decode it\n atob(resolvedNftUri.replace(\"data:application/json;base64,\", \"\"))\n ) : (\n // if it isn't encoded assume it is a JSON string, but it could be anything (it will error if it is)\n resolvedNftUri\n );\n const decoded = JSON.parse(encodedJson);\n return parseAvatarUri({ uri: getJsonImage(decoded), gatewayUrls });\n }\n let uriTokenId = nft.tokenID;\n if (nft.namespace === \"erc1155\")\n uriTokenId = uriTokenId.replace(\"0x\", \"\").padStart(64, \"0\");\n return getMetadataAvatarUri({\n gatewayUrls,\n uri: resolvedNftUri.replace(/(?:0x)?{id}/, uriTokenId)\n });\n }\n var init_parseAvatarRecord = __esm({\n \"../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/utils/ens/avatar/parseAvatarRecord.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_utils6();\n }\n });\n\n // ../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/actions/ens/getEnsText.js\n async function getEnsText(client, parameters) {\n const { blockNumber, blockTag, key, name, gatewayUrls, strict } = parameters;\n const { chain: chain2 } = client;\n const universalResolverAddress = (() => {\n if (parameters.universalResolverAddress)\n return parameters.universalResolverAddress;\n if (!chain2)\n throw new Error(\"client chain not configured. universalResolverAddress is required.\");\n return getChainContractAddress({\n blockNumber,\n chain: chain2,\n contract: \"ensUniversalResolver\"\n });\n })();\n const tlds = chain2?.ensTlds;\n if (tlds && !tlds.some((tld) => name.endsWith(tld)))\n return null;\n try {\n const readContractParameters = {\n address: universalResolverAddress,\n abi: universalResolverResolveAbi,\n args: [\n toHex(packetToBytes(name)),\n encodeFunctionData({\n abi: textResolverAbi,\n functionName: \"text\",\n args: [namehash(name), key]\n }),\n gatewayUrls ?? [localBatchGatewayUrl]\n ],\n functionName: \"resolveWithGateways\",\n blockNumber,\n blockTag\n };\n const readContractAction = getAction(client, readContract, \"readContract\");\n const res = await readContractAction(readContractParameters);\n if (res[0] === \"0x\")\n return null;\n const record2 = decodeFunctionResult({\n abi: textResolverAbi,\n functionName: \"text\",\n data: res[0]\n });\n return record2 === \"\" ? null : record2;\n } catch (err) {\n if (strict)\n throw err;\n if (isNullUniversalResolverError(err))\n return null;\n throw err;\n }\n }\n var init_getEnsText = __esm({\n \"../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/actions/ens/getEnsText.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_abis();\n init_decodeFunctionResult();\n init_encodeFunctionData();\n init_getChainContractAddress();\n init_toHex();\n init_errors4();\n init_localBatchGatewayRequest();\n init_namehash();\n init_packetToBytes();\n init_getAction();\n init_readContract();\n }\n });\n\n // ../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/actions/ens/getEnsAvatar.js\n async function getEnsAvatar(client, { blockNumber, blockTag, assetGatewayUrls, name, gatewayUrls, strict, universalResolverAddress }) {\n const record2 = await getAction(client, getEnsText, \"getEnsText\")({\n blockNumber,\n blockTag,\n key: \"avatar\",\n name,\n universalResolverAddress,\n gatewayUrls,\n strict\n });\n if (!record2)\n return null;\n try {\n return await parseAvatarRecord(client, {\n record: record2,\n gatewayUrls: assetGatewayUrls\n });\n } catch {\n return null;\n }\n }\n var init_getEnsAvatar = __esm({\n \"../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/actions/ens/getEnsAvatar.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_parseAvatarRecord();\n init_getAction();\n init_getEnsText();\n }\n });\n\n // ../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/actions/ens/getEnsName.js\n async function getEnsName(client, parameters) {\n const { address, blockNumber, blockTag, coinType = 60n, gatewayUrls, strict } = parameters;\n const { chain: chain2 } = client;\n const universalResolverAddress = (() => {\n if (parameters.universalResolverAddress)\n return parameters.universalResolverAddress;\n if (!chain2)\n throw new Error(\"client chain not configured. universalResolverAddress is required.\");\n return getChainContractAddress({\n blockNumber,\n chain: chain2,\n contract: \"ensUniversalResolver\"\n });\n })();\n try {\n const readContractParameters = {\n address: universalResolverAddress,\n abi: universalResolverReverseAbi,\n args: [address, coinType, gatewayUrls ?? [localBatchGatewayUrl]],\n functionName: \"reverseWithGateways\",\n blockNumber,\n blockTag\n };\n const readContractAction = getAction(client, readContract, \"readContract\");\n const [name] = await readContractAction(readContractParameters);\n return name || null;\n } catch (err) {\n if (strict)\n throw err;\n if (isNullUniversalResolverError(err))\n return null;\n throw err;\n }\n }\n var init_getEnsName = __esm({\n \"../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/actions/ens/getEnsName.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_abis();\n init_getChainContractAddress();\n init_errors4();\n init_localBatchGatewayRequest();\n init_getAction();\n init_readContract();\n }\n });\n\n // ../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/actions/ens/getEnsResolver.js\n async function getEnsResolver(client, parameters) {\n const { blockNumber, blockTag, name } = parameters;\n const { chain: chain2 } = client;\n const universalResolverAddress = (() => {\n if (parameters.universalResolverAddress)\n return parameters.universalResolverAddress;\n if (!chain2)\n throw new Error(\"client chain not configured. universalResolverAddress is required.\");\n return getChainContractAddress({\n blockNumber,\n chain: chain2,\n contract: \"ensUniversalResolver\"\n });\n })();\n const tlds = chain2?.ensTlds;\n if (tlds && !tlds.some((tld) => name.endsWith(tld)))\n throw new Error(`${name} is not a valid ENS TLD (${tlds?.join(\", \")}) for chain \"${chain2.name}\" (id: ${chain2.id}).`);\n const [resolverAddress] = await getAction(client, readContract, \"readContract\")({\n address: universalResolverAddress,\n abi: [\n {\n inputs: [{ type: \"bytes\" }],\n name: \"findResolver\",\n outputs: [\n { type: \"address\" },\n { type: \"bytes32\" },\n { type: \"uint256\" }\n ],\n stateMutability: \"view\",\n type: \"function\"\n }\n ],\n functionName: \"findResolver\",\n args: [toHex(packetToBytes(name))],\n blockNumber,\n blockTag\n });\n return resolverAddress;\n }\n var init_getEnsResolver = __esm({\n \"../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/actions/ens/getEnsResolver.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_getChainContractAddress();\n init_toHex();\n init_packetToBytes();\n init_getAction();\n init_readContract();\n }\n });\n\n // ../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/actions/public/createAccessList.js\n async function createAccessList(client, args) {\n const { account: account_ = client.account, blockNumber, blockTag = \"latest\", blobs, data, gas, gasPrice, maxFeePerBlobGas, maxFeePerGas, maxPriorityFeePerGas, to, value, ...rest } = args;\n const account = account_ ? parseAccount(account_) : void 0;\n try {\n assertRequest(args);\n const blockNumberHex = typeof blockNumber === \"bigint\" ? numberToHex(blockNumber) : void 0;\n const block = blockNumberHex || blockTag;\n const chainFormat = client.chain?.formatters?.transactionRequest?.format;\n const format = chainFormat || formatTransactionRequest;\n const request = format({\n // Pick out extra data that might exist on the chain's transaction request type.\n ...extract(rest, { format: chainFormat }),\n account,\n blobs,\n data,\n gas,\n gasPrice,\n maxFeePerBlobGas,\n maxFeePerGas,\n maxPriorityFeePerGas,\n to,\n value\n }, \"createAccessList\");\n const response = await client.request({\n method: \"eth_createAccessList\",\n params: [request, block]\n });\n return {\n accessList: response.accessList,\n gasUsed: BigInt(response.gasUsed)\n };\n } catch (err) {\n throw getCallError(err, {\n ...args,\n account,\n chain: client.chain\n });\n }\n }\n var init_createAccessList = __esm({\n \"../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/actions/public/createAccessList.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_parseAccount();\n init_toHex();\n init_getCallError();\n init_extract();\n init_transactionRequest();\n init_assertRequest();\n }\n });\n\n // ../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/actions/public/createBlockFilter.js\n async function createBlockFilter(client) {\n const getRequest = createFilterRequestScope(client, {\n method: \"eth_newBlockFilter\"\n });\n const id = await client.request({\n method: \"eth_newBlockFilter\"\n });\n return { id, request: getRequest(id), type: \"block\" };\n }\n var init_createBlockFilter = __esm({\n \"../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/actions/public/createBlockFilter.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_createFilterRequestScope();\n }\n });\n\n // ../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/actions/public/createEventFilter.js\n async function createEventFilter(client, { address, args, event, events: events_, fromBlock, strict, toBlock } = {}) {\n const events = events_ ?? (event ? [event] : void 0);\n const getRequest = createFilterRequestScope(client, {\n method: \"eth_newFilter\"\n });\n let topics = [];\n if (events) {\n const encoded = events.flatMap((event2) => encodeEventTopics({\n abi: [event2],\n eventName: event2.name,\n args\n }));\n topics = [encoded];\n if (event)\n topics = topics[0];\n }\n const id = await client.request({\n method: \"eth_newFilter\",\n params: [\n {\n address,\n fromBlock: typeof fromBlock === \"bigint\" ? numberToHex(fromBlock) : fromBlock,\n toBlock: typeof toBlock === \"bigint\" ? numberToHex(toBlock) : toBlock,\n ...topics.length ? { topics } : {}\n }\n ]\n });\n return {\n abi: events,\n args,\n eventName: event ? event.name : void 0,\n fromBlock,\n id,\n request: getRequest(id),\n strict: Boolean(strict),\n toBlock,\n type: \"event\"\n };\n }\n var init_createEventFilter = __esm({\n \"../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/actions/public/createEventFilter.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_encodeEventTopics();\n init_toHex();\n init_createFilterRequestScope();\n }\n });\n\n // ../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/actions/public/createPendingTransactionFilter.js\n async function createPendingTransactionFilter(client) {\n const getRequest = createFilterRequestScope(client, {\n method: \"eth_newPendingTransactionFilter\"\n });\n const id = await client.request({\n method: \"eth_newPendingTransactionFilter\"\n });\n return { id, request: getRequest(id), type: \"transaction\" };\n }\n var init_createPendingTransactionFilter = __esm({\n \"../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/actions/public/createPendingTransactionFilter.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_createFilterRequestScope();\n }\n });\n\n // ../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/actions/public/getBalance.js\n async function getBalance(client, { address, blockNumber, blockTag = client.experimental_blockTag ?? \"latest\" }) {\n const blockNumberHex = typeof blockNumber === \"bigint\" ? numberToHex(blockNumber) : void 0;\n const balance = await client.request({\n method: \"eth_getBalance\",\n params: [address, blockNumberHex || blockTag]\n });\n return BigInt(balance);\n }\n var init_getBalance = __esm({\n \"../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/actions/public/getBalance.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_toHex();\n }\n });\n\n // ../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/actions/public/getBlobBaseFee.js\n async function getBlobBaseFee(client) {\n const baseFee = await client.request({\n method: \"eth_blobBaseFee\"\n });\n return BigInt(baseFee);\n }\n var init_getBlobBaseFee = __esm({\n \"../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/actions/public/getBlobBaseFee.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n }\n });\n\n // ../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/actions/public/getBlockTransactionCount.js\n async function getBlockTransactionCount(client, { blockHash, blockNumber, blockTag = \"latest\" } = {}) {\n const blockNumberHex = blockNumber !== void 0 ? numberToHex(blockNumber) : void 0;\n let count;\n if (blockHash) {\n count = await client.request({\n method: \"eth_getBlockTransactionCountByHash\",\n params: [blockHash]\n }, { dedupe: true });\n } else {\n count = await client.request({\n method: \"eth_getBlockTransactionCountByNumber\",\n params: [blockNumberHex || blockTag]\n }, { dedupe: Boolean(blockNumberHex) });\n }\n return hexToNumber(count);\n }\n var init_getBlockTransactionCount = __esm({\n \"../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/actions/public/getBlockTransactionCount.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_fromHex();\n init_toHex();\n }\n });\n\n // ../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/actions/public/getCode.js\n async function getCode(client, { address, blockNumber, blockTag = \"latest\" }) {\n const blockNumberHex = blockNumber !== void 0 ? numberToHex(blockNumber) : void 0;\n const hex = await client.request({\n method: \"eth_getCode\",\n params: [address, blockNumberHex || blockTag]\n }, { dedupe: Boolean(blockNumberHex) });\n if (hex === \"0x\")\n return void 0;\n return hex;\n }\n var init_getCode = __esm({\n \"../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/actions/public/getCode.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_toHex();\n }\n });\n\n // ../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/errors/eip712.js\n var Eip712DomainNotFoundError;\n var init_eip712 = __esm({\n \"../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/errors/eip712.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_base();\n Eip712DomainNotFoundError = class extends BaseError2 {\n constructor({ address }) {\n super(`No EIP-712 domain found on contract \"${address}\".`, {\n metaMessages: [\n \"Ensure that:\",\n `- The contract is deployed at the address \"${address}\".`,\n \"- `eip712Domain()` function exists on the contract.\",\n \"- `eip712Domain()` function matches signature to ERC-5267 specification.\"\n ],\n name: \"Eip712DomainNotFoundError\"\n });\n }\n };\n }\n });\n\n // ../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/actions/public/getEip712Domain.js\n async function getEip712Domain(client, parameters) {\n const { address, factory, factoryData } = parameters;\n try {\n const [fields, name, version6, chainId, verifyingContract, salt, extensions] = await getAction(client, readContract, \"readContract\")({\n abi,\n address,\n functionName: \"eip712Domain\",\n factory,\n factoryData\n });\n return {\n domain: {\n name,\n version: version6,\n chainId: Number(chainId),\n verifyingContract,\n salt\n },\n extensions,\n fields\n };\n } catch (e3) {\n const error = e3;\n if (error.name === \"ContractFunctionExecutionError\" && error.cause.name === \"ContractFunctionZeroDataError\") {\n throw new Eip712DomainNotFoundError({ address });\n }\n throw error;\n }\n }\n var abi;\n var init_getEip712Domain = __esm({\n \"../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/actions/public/getEip712Domain.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_eip712();\n init_getAction();\n init_readContract();\n abi = [\n {\n inputs: [],\n name: \"eip712Domain\",\n outputs: [\n { name: \"fields\", type: \"bytes1\" },\n { name: \"name\", type: \"string\" },\n { name: \"version\", type: \"string\" },\n { name: \"chainId\", type: \"uint256\" },\n { name: \"verifyingContract\", type: \"address\" },\n { name: \"salt\", type: \"bytes32\" },\n { name: \"extensions\", type: \"uint256[]\" }\n ],\n stateMutability: \"view\",\n type: \"function\"\n }\n ];\n }\n });\n\n // ../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/utils/formatters/feeHistory.js\n function formatFeeHistory(feeHistory) {\n return {\n baseFeePerGas: feeHistory.baseFeePerGas.map((value) => BigInt(value)),\n gasUsedRatio: feeHistory.gasUsedRatio,\n oldestBlock: BigInt(feeHistory.oldestBlock),\n reward: feeHistory.reward?.map((reward) => reward.map((value) => BigInt(value)))\n };\n }\n var init_feeHistory = __esm({\n \"../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/utils/formatters/feeHistory.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n }\n });\n\n // ../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/actions/public/getFeeHistory.js\n async function getFeeHistory(client, { blockCount, blockNumber, blockTag = \"latest\", rewardPercentiles }) {\n const blockNumberHex = typeof blockNumber === \"bigint\" ? numberToHex(blockNumber) : void 0;\n const feeHistory = await client.request({\n method: \"eth_feeHistory\",\n params: [\n numberToHex(blockCount),\n blockNumberHex || blockTag,\n rewardPercentiles\n ]\n }, { dedupe: Boolean(blockNumberHex) });\n return formatFeeHistory(feeHistory);\n }\n var init_getFeeHistory = __esm({\n \"../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/actions/public/getFeeHistory.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_toHex();\n init_feeHistory();\n }\n });\n\n // ../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/actions/public/getFilterLogs.js\n async function getFilterLogs(_client, { filter }) {\n const strict = filter.strict ?? false;\n const logs = await filter.request({\n method: \"eth_getFilterLogs\",\n params: [filter.id]\n });\n const formattedLogs = logs.map((log) => formatLog(log));\n if (!filter.abi)\n return formattedLogs;\n return parseEventLogs({\n abi: filter.abi,\n logs: formattedLogs,\n strict\n });\n }\n var init_getFilterLogs = __esm({\n \"../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/actions/public/getFilterLogs.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_parseEventLogs();\n init_log2();\n }\n });\n\n // ../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/utils/abi/encodePacked.js\n function encodePacked(types, values) {\n if (types.length !== values.length)\n throw new AbiEncodingLengthMismatchError({\n expectedLength: types.length,\n givenLength: values.length\n });\n const data = [];\n for (let i3 = 0; i3 < types.length; i3++) {\n const type = types[i3];\n const value = values[i3];\n data.push(encode(type, value));\n }\n return concatHex(data);\n }\n function encode(type, value, isArray = false) {\n if (type === \"address\") {\n const address = value;\n if (!isAddress(address))\n throw new InvalidAddressError({ address });\n return pad(address.toLowerCase(), {\n size: isArray ? 32 : null\n });\n }\n if (type === \"string\")\n return stringToHex(value);\n if (type === \"bytes\")\n return value;\n if (type === \"bool\")\n return pad(boolToHex(value), { size: isArray ? 32 : 1 });\n const intMatch = type.match(integerRegex2);\n if (intMatch) {\n const [_type, baseType, bits = \"256\"] = intMatch;\n const size6 = Number.parseInt(bits, 10) / 8;\n return numberToHex(value, {\n size: isArray ? 32 : size6,\n signed: baseType === \"int\"\n });\n }\n const bytesMatch = type.match(bytesRegex2);\n if (bytesMatch) {\n const [_type, size6] = bytesMatch;\n if (Number.parseInt(size6, 10) !== (value.length - 2) / 2)\n throw new BytesSizeMismatchError({\n expectedSize: Number.parseInt(size6, 10),\n givenSize: (value.length - 2) / 2\n });\n return pad(value, { dir: \"right\", size: isArray ? 32 : null });\n }\n const arrayMatch = type.match(arrayRegex);\n if (arrayMatch && Array.isArray(value)) {\n const [_type, childType] = arrayMatch;\n const data = [];\n for (let i3 = 0; i3 < value.length; i3++) {\n data.push(encode(childType, value[i3], true));\n }\n if (data.length === 0)\n return \"0x\";\n return concatHex(data);\n }\n throw new UnsupportedPackedAbiType(type);\n }\n var init_encodePacked = __esm({\n \"../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/utils/abi/encodePacked.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_abi();\n init_address();\n init_isAddress();\n init_concat();\n init_pad();\n init_toHex();\n init_regex2();\n }\n });\n\n // ../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/utils/data/isBytes.js\n function isBytes3(value) {\n if (!value)\n return false;\n if (typeof value !== \"object\")\n return false;\n if (!(\"BYTES_PER_ELEMENT\" in value))\n return false;\n return value.BYTES_PER_ELEMENT === 1 && value.constructor.name === \"Uint8Array\";\n }\n var init_isBytes = __esm({\n \"../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/utils/data/isBytes.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n }\n });\n\n // ../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/utils/address/getContractAddress.js\n function getContractAddress2(opts) {\n if (opts.opcode === \"CREATE2\")\n return getCreate2Address(opts);\n return getCreateAddress(opts);\n }\n function getCreateAddress(opts) {\n const from14 = toBytes(getAddress(opts.from));\n let nonce = toBytes(opts.nonce);\n if (nonce[0] === 0)\n nonce = new Uint8Array([]);\n return getAddress(`0x${keccak256(toRlp([from14, nonce], \"bytes\")).slice(26)}`);\n }\n function getCreate2Address(opts) {\n const from14 = toBytes(getAddress(opts.from));\n const salt = pad(isBytes3(opts.salt) ? opts.salt : toBytes(opts.salt), {\n size: 32\n });\n const bytecodeHash = (() => {\n if (\"bytecodeHash\" in opts) {\n if (isBytes3(opts.bytecodeHash))\n return opts.bytecodeHash;\n return toBytes(opts.bytecodeHash);\n }\n return keccak256(opts.bytecode, \"bytes\");\n })();\n return getAddress(slice(keccak256(concat([toBytes(\"0xff\"), from14, salt, bytecodeHash])), 12));\n }\n var init_getContractAddress = __esm({\n \"../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/utils/address/getContractAddress.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_concat();\n init_isBytes();\n init_pad();\n init_slice();\n init_toBytes();\n init_toRlp();\n init_keccak256();\n init_getAddress();\n }\n });\n\n // ../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/utils/transaction/assertTransaction.js\n function assertTransactionEIP7702(transaction) {\n const { authorizationList } = transaction;\n if (authorizationList) {\n for (const authorization of authorizationList) {\n const { chainId } = authorization;\n const address = authorization.address;\n if (!isAddress(address))\n throw new InvalidAddressError({ address });\n if (chainId < 0)\n throw new InvalidChainIdError({ chainId });\n }\n }\n assertTransactionEIP1559(transaction);\n }\n function assertTransactionEIP4844(transaction) {\n const { blobVersionedHashes } = transaction;\n if (blobVersionedHashes) {\n if (blobVersionedHashes.length === 0)\n throw new EmptyBlobError();\n for (const hash3 of blobVersionedHashes) {\n const size_ = size(hash3);\n const version6 = hexToNumber(slice(hash3, 0, 1));\n if (size_ !== 32)\n throw new InvalidVersionedHashSizeError({ hash: hash3, size: size_ });\n if (version6 !== versionedHashVersionKzg)\n throw new InvalidVersionedHashVersionError({\n hash: hash3,\n version: version6\n });\n }\n }\n assertTransactionEIP1559(transaction);\n }\n function assertTransactionEIP1559(transaction) {\n const { chainId, maxPriorityFeePerGas, maxFeePerGas, to } = transaction;\n if (chainId <= 0)\n throw new InvalidChainIdError({ chainId });\n if (to && !isAddress(to))\n throw new InvalidAddressError({ address: to });\n if (maxFeePerGas && maxFeePerGas > maxUint256)\n throw new FeeCapTooHighError({ maxFeePerGas });\n if (maxPriorityFeePerGas && maxFeePerGas && maxPriorityFeePerGas > maxFeePerGas)\n throw new TipAboveFeeCapError({ maxFeePerGas, maxPriorityFeePerGas });\n }\n function assertTransactionEIP2930(transaction) {\n const { chainId, maxPriorityFeePerGas, gasPrice, maxFeePerGas, to } = transaction;\n if (chainId <= 0)\n throw new InvalidChainIdError({ chainId });\n if (to && !isAddress(to))\n throw new InvalidAddressError({ address: to });\n if (maxPriorityFeePerGas || maxFeePerGas)\n throw new BaseError2(\"`maxFeePerGas`/`maxPriorityFeePerGas` is not a valid EIP-2930 Transaction attribute.\");\n if (gasPrice && gasPrice > maxUint256)\n throw new FeeCapTooHighError({ maxFeePerGas: gasPrice });\n }\n function assertTransactionLegacy(transaction) {\n const { chainId, maxPriorityFeePerGas, gasPrice, maxFeePerGas, to } = transaction;\n if (to && !isAddress(to))\n throw new InvalidAddressError({ address: to });\n if (typeof chainId !== \"undefined\" && chainId <= 0)\n throw new InvalidChainIdError({ chainId });\n if (maxPriorityFeePerGas || maxFeePerGas)\n throw new BaseError2(\"`maxFeePerGas`/`maxPriorityFeePerGas` is not a valid Legacy Transaction attribute.\");\n if (gasPrice && gasPrice > maxUint256)\n throw new FeeCapTooHighError({ maxFeePerGas: gasPrice });\n }\n var init_assertTransaction = __esm({\n \"../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/utils/transaction/assertTransaction.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_kzg();\n init_number();\n init_address();\n init_base();\n init_blob2();\n init_chain();\n init_node();\n init_isAddress();\n init_size();\n init_slice();\n init_fromHex();\n }\n });\n\n // ../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/utils/transaction/serializeAccessList.js\n function serializeAccessList(accessList) {\n if (!accessList || accessList.length === 0)\n return [];\n const serializedAccessList = [];\n for (let i3 = 0; i3 < accessList.length; i3++) {\n const { address, storageKeys } = accessList[i3];\n for (let j2 = 0; j2 < storageKeys.length; j2++) {\n if (storageKeys[j2].length - 2 !== 64) {\n throw new InvalidStorageKeySizeError({ storageKey: storageKeys[j2] });\n }\n }\n if (!isAddress(address, { strict: false })) {\n throw new InvalidAddressError({ address });\n }\n serializedAccessList.push([address, storageKeys]);\n }\n return serializedAccessList;\n }\n var init_serializeAccessList = __esm({\n \"../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/utils/transaction/serializeAccessList.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_address();\n init_transaction();\n init_isAddress();\n }\n });\n\n // ../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/utils/transaction/serializeTransaction.js\n function serializeTransaction(transaction, signature) {\n const type = getTransactionType(transaction);\n if (type === \"eip1559\")\n return serializeTransactionEIP1559(transaction, signature);\n if (type === \"eip2930\")\n return serializeTransactionEIP2930(transaction, signature);\n if (type === \"eip4844\")\n return serializeTransactionEIP4844(transaction, signature);\n if (type === \"eip7702\")\n return serializeTransactionEIP7702(transaction, signature);\n return serializeTransactionLegacy(transaction, signature);\n }\n function serializeTransactionEIP7702(transaction, signature) {\n const { authorizationList, chainId, gas, nonce, to, value, maxFeePerGas, maxPriorityFeePerGas, accessList, data } = transaction;\n assertTransactionEIP7702(transaction);\n const serializedAccessList = serializeAccessList(accessList);\n const serializedAuthorizationList = serializeAuthorizationList(authorizationList);\n return concatHex([\n \"0x04\",\n toRlp([\n numberToHex(chainId),\n nonce ? numberToHex(nonce) : \"0x\",\n maxPriorityFeePerGas ? numberToHex(maxPriorityFeePerGas) : \"0x\",\n maxFeePerGas ? numberToHex(maxFeePerGas) : \"0x\",\n gas ? numberToHex(gas) : \"0x\",\n to ?? \"0x\",\n value ? numberToHex(value) : \"0x\",\n data ?? \"0x\",\n serializedAccessList,\n serializedAuthorizationList,\n ...toYParitySignatureArray(transaction, signature)\n ])\n ]);\n }\n function serializeTransactionEIP4844(transaction, signature) {\n const { chainId, gas, nonce, to, value, maxFeePerBlobGas, maxFeePerGas, maxPriorityFeePerGas, accessList, data } = transaction;\n assertTransactionEIP4844(transaction);\n let blobVersionedHashes = transaction.blobVersionedHashes;\n let sidecars = transaction.sidecars;\n if (transaction.blobs && (typeof blobVersionedHashes === \"undefined\" || typeof sidecars === \"undefined\")) {\n const blobs2 = typeof transaction.blobs[0] === \"string\" ? transaction.blobs : transaction.blobs.map((x4) => bytesToHex(x4));\n const kzg = transaction.kzg;\n const commitments2 = blobsToCommitments({\n blobs: blobs2,\n kzg\n });\n if (typeof blobVersionedHashes === \"undefined\")\n blobVersionedHashes = commitmentsToVersionedHashes({\n commitments: commitments2\n });\n if (typeof sidecars === \"undefined\") {\n const proofs2 = blobsToProofs({ blobs: blobs2, commitments: commitments2, kzg });\n sidecars = toBlobSidecars({ blobs: blobs2, commitments: commitments2, proofs: proofs2 });\n }\n }\n const serializedAccessList = serializeAccessList(accessList);\n const serializedTransaction = [\n numberToHex(chainId),\n nonce ? numberToHex(nonce) : \"0x\",\n maxPriorityFeePerGas ? numberToHex(maxPriorityFeePerGas) : \"0x\",\n maxFeePerGas ? numberToHex(maxFeePerGas) : \"0x\",\n gas ? numberToHex(gas) : \"0x\",\n to ?? \"0x\",\n value ? numberToHex(value) : \"0x\",\n data ?? \"0x\",\n serializedAccessList,\n maxFeePerBlobGas ? numberToHex(maxFeePerBlobGas) : \"0x\",\n blobVersionedHashes ?? [],\n ...toYParitySignatureArray(transaction, signature)\n ];\n const blobs = [];\n const commitments = [];\n const proofs = [];\n if (sidecars)\n for (let i3 = 0; i3 < sidecars.length; i3++) {\n const { blob, commitment, proof } = sidecars[i3];\n blobs.push(blob);\n commitments.push(commitment);\n proofs.push(proof);\n }\n return concatHex([\n \"0x03\",\n sidecars ? (\n // If sidecars are enabled, envelope turns into a \"wrapper\":\n toRlp([serializedTransaction, blobs, commitments, proofs])\n ) : (\n // If sidecars are disabled, standard envelope is used:\n toRlp(serializedTransaction)\n )\n ]);\n }\n function serializeTransactionEIP1559(transaction, signature) {\n const { chainId, gas, nonce, to, value, maxFeePerGas, maxPriorityFeePerGas, accessList, data } = transaction;\n assertTransactionEIP1559(transaction);\n const serializedAccessList = serializeAccessList(accessList);\n const serializedTransaction = [\n numberToHex(chainId),\n nonce ? numberToHex(nonce) : \"0x\",\n maxPriorityFeePerGas ? numberToHex(maxPriorityFeePerGas) : \"0x\",\n maxFeePerGas ? numberToHex(maxFeePerGas) : \"0x\",\n gas ? numberToHex(gas) : \"0x\",\n to ?? \"0x\",\n value ? numberToHex(value) : \"0x\",\n data ?? \"0x\",\n serializedAccessList,\n ...toYParitySignatureArray(transaction, signature)\n ];\n return concatHex([\n \"0x02\",\n toRlp(serializedTransaction)\n ]);\n }\n function serializeTransactionEIP2930(transaction, signature) {\n const { chainId, gas, data, nonce, to, value, accessList, gasPrice } = transaction;\n assertTransactionEIP2930(transaction);\n const serializedAccessList = serializeAccessList(accessList);\n const serializedTransaction = [\n numberToHex(chainId),\n nonce ? numberToHex(nonce) : \"0x\",\n gasPrice ? numberToHex(gasPrice) : \"0x\",\n gas ? numberToHex(gas) : \"0x\",\n to ?? \"0x\",\n value ? numberToHex(value) : \"0x\",\n data ?? \"0x\",\n serializedAccessList,\n ...toYParitySignatureArray(transaction, signature)\n ];\n return concatHex([\n \"0x01\",\n toRlp(serializedTransaction)\n ]);\n }\n function serializeTransactionLegacy(transaction, signature) {\n const { chainId = 0, gas, data, nonce, to, value, gasPrice } = transaction;\n assertTransactionLegacy(transaction);\n let serializedTransaction = [\n nonce ? numberToHex(nonce) : \"0x\",\n gasPrice ? numberToHex(gasPrice) : \"0x\",\n gas ? numberToHex(gas) : \"0x\",\n to ?? \"0x\",\n value ? numberToHex(value) : \"0x\",\n data ?? \"0x\"\n ];\n if (signature) {\n const v2 = (() => {\n if (signature.v >= 35n) {\n const inferredChainId = (signature.v - 35n) / 2n;\n if (inferredChainId > 0)\n return signature.v;\n return 27n + (signature.v === 35n ? 0n : 1n);\n }\n if (chainId > 0)\n return BigInt(chainId * 2) + BigInt(35n + signature.v - 27n);\n const v3 = 27n + (signature.v === 27n ? 0n : 1n);\n if (signature.v !== v3)\n throw new InvalidLegacyVError({ v: signature.v });\n return v3;\n })();\n const r2 = trim(signature.r);\n const s4 = trim(signature.s);\n serializedTransaction = [\n ...serializedTransaction,\n numberToHex(v2),\n r2 === \"0x00\" ? \"0x\" : r2,\n s4 === \"0x00\" ? \"0x\" : s4\n ];\n } else if (chainId > 0) {\n serializedTransaction = [\n ...serializedTransaction,\n numberToHex(chainId),\n \"0x\",\n \"0x\"\n ];\n }\n return toRlp(serializedTransaction);\n }\n function toYParitySignatureArray(transaction, signature_) {\n const signature = signature_ ?? transaction;\n const { v: v2, yParity } = signature;\n if (typeof signature.r === \"undefined\")\n return [];\n if (typeof signature.s === \"undefined\")\n return [];\n if (typeof v2 === \"undefined\" && typeof yParity === \"undefined\")\n return [];\n const r2 = trim(signature.r);\n const s4 = trim(signature.s);\n const yParity_ = (() => {\n if (typeof yParity === \"number\")\n return yParity ? numberToHex(1) : \"0x\";\n if (v2 === 0n)\n return \"0x\";\n if (v2 === 1n)\n return numberToHex(1);\n return v2 === 27n ? \"0x\" : numberToHex(1);\n })();\n return [yParity_, r2 === \"0x00\" ? \"0x\" : r2, s4 === \"0x00\" ? \"0x\" : s4];\n }\n var init_serializeTransaction = __esm({\n \"../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/utils/transaction/serializeTransaction.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_transaction();\n init_serializeAuthorizationList();\n init_blobsToCommitments();\n init_blobsToProofs();\n init_commitmentsToVersionedHashes();\n init_toBlobSidecars();\n init_concat();\n init_trim();\n init_toHex();\n init_toRlp();\n init_assertTransaction();\n init_getTransactionType();\n init_serializeAccessList();\n }\n });\n\n // ../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/utils/authorization/serializeAuthorizationList.js\n function serializeAuthorizationList(authorizationList) {\n if (!authorizationList || authorizationList.length === 0)\n return [];\n const serializedAuthorizationList = [];\n for (const authorization of authorizationList) {\n const { chainId, nonce, ...signature } = authorization;\n const contractAddress = authorization.address;\n serializedAuthorizationList.push([\n chainId ? toHex(chainId) : \"0x\",\n contractAddress,\n nonce ? toHex(nonce) : \"0x\",\n ...toYParitySignatureArray({}, signature)\n ]);\n }\n return serializedAuthorizationList;\n }\n var init_serializeAuthorizationList = __esm({\n \"../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/utils/authorization/serializeAuthorizationList.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_toHex();\n init_serializeTransaction();\n }\n });\n\n // ../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/utils/authorization/verifyAuthorization.js\n async function verifyAuthorization({ address, authorization, signature }) {\n return isAddressEqual(getAddress(address), await recoverAuthorizationAddress({\n authorization,\n signature\n }));\n }\n var init_verifyAuthorization = __esm({\n \"../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/utils/authorization/verifyAuthorization.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_getAddress();\n init_isAddressEqual();\n init_recoverAuthorizationAddress();\n }\n });\n\n // ../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/utils/promise/withDedupe.js\n function withDedupe(fn, { enabled = true, id }) {\n if (!enabled || !id)\n return fn();\n if (promiseCache2.get(id))\n return promiseCache2.get(id);\n const promise = fn().finally(() => promiseCache2.delete(id));\n promiseCache2.set(id, promise);\n return promise;\n }\n var promiseCache2;\n var init_withDedupe = __esm({\n \"../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/utils/promise/withDedupe.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_lru();\n promiseCache2 = /* @__PURE__ */ new LruMap(8192);\n }\n });\n\n // ../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/utils/buildRequest.js\n function buildRequest(request, options = {}) {\n return async (args, overrideOptions = {}) => {\n const { dedupe = false, methods, retryDelay = 150, retryCount = 3, uid: uid2 } = {\n ...options,\n ...overrideOptions\n };\n const { method } = args;\n if (methods?.exclude?.includes(method))\n throw new MethodNotSupportedRpcError(new Error(\"method not supported\"), {\n method\n });\n if (methods?.include && !methods.include.includes(method))\n throw new MethodNotSupportedRpcError(new Error(\"method not supported\"), {\n method\n });\n const requestId = dedupe ? stringToHex(`${uid2}.${stringify(args)}`) : void 0;\n return withDedupe(() => withRetry(async () => {\n try {\n return await request(args);\n } catch (err_) {\n const err = err_;\n switch (err.code) {\n case ParseRpcError.code:\n throw new ParseRpcError(err);\n case InvalidRequestRpcError.code:\n throw new InvalidRequestRpcError(err);\n case MethodNotFoundRpcError.code:\n throw new MethodNotFoundRpcError(err, { method: args.method });\n case InvalidParamsRpcError.code:\n throw new InvalidParamsRpcError(err);\n case InternalRpcError.code:\n throw new InternalRpcError(err);\n case InvalidInputRpcError.code:\n throw new InvalidInputRpcError(err);\n case ResourceNotFoundRpcError.code:\n throw new ResourceNotFoundRpcError(err);\n case ResourceUnavailableRpcError.code:\n throw new ResourceUnavailableRpcError(err);\n case TransactionRejectedRpcError.code:\n throw new TransactionRejectedRpcError(err);\n case MethodNotSupportedRpcError.code:\n throw new MethodNotSupportedRpcError(err, {\n method: args.method\n });\n case LimitExceededRpcError.code:\n throw new LimitExceededRpcError(err);\n case JsonRpcVersionUnsupportedError.code:\n throw new JsonRpcVersionUnsupportedError(err);\n case UserRejectedRequestError.code:\n throw new UserRejectedRequestError(err);\n case UnauthorizedProviderError.code:\n throw new UnauthorizedProviderError(err);\n case UnsupportedProviderMethodError.code:\n throw new UnsupportedProviderMethodError(err);\n case ProviderDisconnectedError.code:\n throw new ProviderDisconnectedError(err);\n case ChainDisconnectedError.code:\n throw new ChainDisconnectedError(err);\n case SwitchChainError.code:\n throw new SwitchChainError(err);\n case UnsupportedNonOptionalCapabilityError.code:\n throw new UnsupportedNonOptionalCapabilityError(err);\n case UnsupportedChainIdError.code:\n throw new UnsupportedChainIdError(err);\n case DuplicateIdError.code:\n throw new DuplicateIdError(err);\n case UnknownBundleIdError.code:\n throw new UnknownBundleIdError(err);\n case BundleTooLargeError.code:\n throw new BundleTooLargeError(err);\n case AtomicReadyWalletRejectedUpgradeError.code:\n throw new AtomicReadyWalletRejectedUpgradeError(err);\n case AtomicityNotSupportedError.code:\n throw new AtomicityNotSupportedError(err);\n case 5e3:\n throw new UserRejectedRequestError(err);\n default:\n if (err_ instanceof BaseError2)\n throw err_;\n throw new UnknownRpcError(err);\n }\n }\n }, {\n delay: ({ count, error }) => {\n if (error && error instanceof HttpRequestError) {\n const retryAfter = error?.headers?.get(\"Retry-After\");\n if (retryAfter?.match(/\\d/))\n return Number.parseInt(retryAfter, 10) * 1e3;\n }\n return ~~(1 << count) * retryDelay;\n },\n retryCount,\n shouldRetry: ({ error }) => shouldRetry(error)\n }), { enabled: dedupe, id: requestId });\n };\n }\n function shouldRetry(error) {\n if (\"code\" in error && typeof error.code === \"number\") {\n if (error.code === -1)\n return true;\n if (error.code === LimitExceededRpcError.code)\n return true;\n if (error.code === InternalRpcError.code)\n return true;\n return false;\n }\n if (error instanceof HttpRequestError && error.status) {\n if (error.status === 403)\n return true;\n if (error.status === 408)\n return true;\n if (error.status === 413)\n return true;\n if (error.status === 429)\n return true;\n if (error.status === 500)\n return true;\n if (error.status === 502)\n return true;\n if (error.status === 503)\n return true;\n if (error.status === 504)\n return true;\n return false;\n }\n return true;\n }\n var init_buildRequest = __esm({\n \"../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/utils/buildRequest.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_base();\n init_request();\n init_rpc();\n init_toHex();\n init_withDedupe();\n init_withRetry();\n init_stringify();\n }\n });\n\n // ../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/utils/chain/defineChain.js\n function defineChain(chain2) {\n return {\n formatters: void 0,\n fees: void 0,\n serializers: void 0,\n ...chain2\n };\n }\n var init_defineChain = __esm({\n \"../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/utils/chain/defineChain.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n }\n });\n\n // ../../../node_modules/.pnpm/@noble+hashes@1.8.0/node_modules/@noble/hashes/esm/legacy.js\n function ripemd_f(group, x4, y6, z2) {\n if (group === 0)\n return x4 ^ y6 ^ z2;\n if (group === 1)\n return x4 & y6 | ~x4 & z2;\n if (group === 2)\n return (x4 | ~y6) ^ z2;\n if (group === 3)\n return x4 & z2 | y6 & ~z2;\n return x4 ^ (y6 | ~z2);\n }\n var Rho160, Id160, Pi160, idxLR, idxL, idxR, shifts160, shiftsL160, shiftsR160, Kl160, Kr160, BUF_160, RIPEMD160, ripemd160;\n var init_legacy = __esm({\n \"../../../node_modules/.pnpm/@noble+hashes@1.8.0/node_modules/@noble/hashes/esm/legacy.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_md();\n init_utils3();\n Rho160 = /* @__PURE__ */ Uint8Array.from([\n 7,\n 4,\n 13,\n 1,\n 10,\n 6,\n 15,\n 3,\n 12,\n 0,\n 9,\n 5,\n 2,\n 14,\n 11,\n 8\n ]);\n Id160 = /* @__PURE__ */ (() => Uint8Array.from(new Array(16).fill(0).map((_2, i3) => i3)))();\n Pi160 = /* @__PURE__ */ (() => Id160.map((i3) => (9 * i3 + 5) % 16))();\n idxLR = /* @__PURE__ */ (() => {\n const L2 = [Id160];\n const R3 = [Pi160];\n const res = [L2, R3];\n for (let i3 = 0; i3 < 4; i3++)\n for (let j2 of res)\n j2.push(j2[i3].map((k4) => Rho160[k4]));\n return res;\n })();\n idxL = /* @__PURE__ */ (() => idxLR[0])();\n idxR = /* @__PURE__ */ (() => idxLR[1])();\n shifts160 = /* @__PURE__ */ [\n [11, 14, 15, 12, 5, 8, 7, 9, 11, 13, 14, 15, 6, 7, 9, 8],\n [12, 13, 11, 15, 6, 9, 9, 7, 12, 15, 11, 13, 7, 8, 7, 7],\n [13, 15, 14, 11, 7, 7, 6, 8, 13, 14, 13, 12, 5, 5, 6, 9],\n [14, 11, 12, 14, 8, 6, 5, 5, 15, 12, 15, 14, 9, 9, 8, 6],\n [15, 12, 13, 13, 9, 5, 8, 6, 14, 11, 12, 11, 8, 6, 5, 5]\n ].map((i3) => Uint8Array.from(i3));\n shiftsL160 = /* @__PURE__ */ idxL.map((idx, i3) => idx.map((j2) => shifts160[i3][j2]));\n shiftsR160 = /* @__PURE__ */ idxR.map((idx, i3) => idx.map((j2) => shifts160[i3][j2]));\n Kl160 = /* @__PURE__ */ Uint32Array.from([\n 0,\n 1518500249,\n 1859775393,\n 2400959708,\n 2840853838\n ]);\n Kr160 = /* @__PURE__ */ Uint32Array.from([\n 1352829926,\n 1548603684,\n 1836072691,\n 2053994217,\n 0\n ]);\n BUF_160 = /* @__PURE__ */ new Uint32Array(16);\n RIPEMD160 = class extends HashMD {\n constructor() {\n super(64, 20, 8, true);\n this.h0 = 1732584193 | 0;\n this.h1 = 4023233417 | 0;\n this.h2 = 2562383102 | 0;\n this.h3 = 271733878 | 0;\n this.h4 = 3285377520 | 0;\n }\n get() {\n const { h0, h1, h2: h22, h3: h32, h4 } = this;\n return [h0, h1, h22, h32, h4];\n }\n set(h0, h1, h22, h32, h4) {\n this.h0 = h0 | 0;\n this.h1 = h1 | 0;\n this.h2 = h22 | 0;\n this.h3 = h32 | 0;\n this.h4 = h4 | 0;\n }\n process(view, offset) {\n for (let i3 = 0; i3 < 16; i3++, offset += 4)\n BUF_160[i3] = view.getUint32(offset, true);\n let al = this.h0 | 0, ar = al, bl = this.h1 | 0, br = bl, cl = this.h2 | 0, cr = cl, dl = this.h3 | 0, dr = dl, el = this.h4 | 0, er = el;\n for (let group = 0; group < 5; group++) {\n const rGroup = 4 - group;\n const hbl = Kl160[group], hbr = Kr160[group];\n const rl = idxL[group], rr = idxR[group];\n const sl = shiftsL160[group], sr = shiftsR160[group];\n for (let i3 = 0; i3 < 16; i3++) {\n const tl = rotl(al + ripemd_f(group, bl, cl, dl) + BUF_160[rl[i3]] + hbl, sl[i3]) + el | 0;\n al = el, el = dl, dl = rotl(cl, 10) | 0, cl = bl, bl = tl;\n }\n for (let i3 = 0; i3 < 16; i3++) {\n const tr = rotl(ar + ripemd_f(rGroup, br, cr, dr) + BUF_160[rr[i3]] + hbr, sr[i3]) + er | 0;\n ar = er, er = dr, dr = rotl(cr, 10) | 0, cr = br, br = tr;\n }\n }\n this.set(this.h1 + cl + dr | 0, this.h2 + dl + er | 0, this.h3 + el + ar | 0, this.h4 + al + br | 0, this.h0 + bl + cr | 0);\n }\n roundClean() {\n clean(BUF_160);\n }\n destroy() {\n this.destroyed = true;\n clean(this.buffer);\n this.set(0, 0, 0, 0, 0);\n }\n };\n ripemd160 = /* @__PURE__ */ createHasher(() => new RIPEMD160());\n }\n });\n\n // ../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/utils/promise/withTimeout.js\n function withTimeout(fn, { errorInstance = new Error(\"timed out\"), timeout, signal }) {\n return new Promise((resolve, reject) => {\n ;\n (async () => {\n let timeoutId;\n try {\n const controller = new AbortController();\n if (timeout > 0) {\n timeoutId = setTimeout(() => {\n if (signal) {\n controller.abort();\n } else {\n reject(errorInstance);\n }\n }, timeout);\n }\n resolve(await fn({ signal: controller?.signal || null }));\n } catch (err) {\n if (err?.name === \"AbortError\")\n reject(errorInstance);\n reject(err);\n } finally {\n clearTimeout(timeoutId);\n }\n })();\n });\n }\n var init_withTimeout = __esm({\n \"../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/utils/promise/withTimeout.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n }\n });\n\n // ../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/utils/rpc/id.js\n function createIdStore() {\n return {\n current: 0,\n take() {\n return this.current++;\n },\n reset() {\n this.current = 0;\n }\n };\n }\n var idCache;\n var init_id = __esm({\n \"../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/utils/rpc/id.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n idCache = /* @__PURE__ */ createIdStore();\n }\n });\n\n // ../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/utils/rpc/http.js\n function getHttpRpcClient(url, options = {}) {\n return {\n async request(params) {\n const { body, fetchFn = options.fetchFn ?? fetch, onRequest = options.onRequest, onResponse = options.onResponse, timeout = options.timeout ?? 1e4 } = params;\n const fetchOptions = {\n ...options.fetchOptions ?? {},\n ...params.fetchOptions ?? {}\n };\n const { headers, method, signal: signal_ } = fetchOptions;\n try {\n const response = await withTimeout(async ({ signal }) => {\n const init = {\n ...fetchOptions,\n body: Array.isArray(body) ? stringify(body.map((body2) => ({\n jsonrpc: \"2.0\",\n id: body2.id ?? idCache.take(),\n ...body2\n }))) : stringify({\n jsonrpc: \"2.0\",\n id: body.id ?? idCache.take(),\n ...body\n }),\n headers: {\n \"Content-Type\": \"application/json\",\n ...headers\n },\n method: method || \"POST\",\n signal: signal_ || (timeout > 0 ? signal : null)\n };\n const request = new Request(url, init);\n const args = await onRequest?.(request, init) ?? { ...init, url };\n const response2 = await fetchFn(args.url ?? url, args);\n return response2;\n }, {\n errorInstance: new TimeoutError({ body, url }),\n timeout,\n signal: true\n });\n if (onResponse)\n await onResponse(response);\n let data;\n if (response.headers.get(\"Content-Type\")?.startsWith(\"application/json\"))\n data = await response.json();\n else {\n data = await response.text();\n try {\n data = JSON.parse(data || \"{}\");\n } catch (err) {\n if (response.ok)\n throw err;\n data = { error: data };\n }\n }\n if (!response.ok) {\n throw new HttpRequestError({\n body,\n details: stringify(data.error) || response.statusText,\n headers: response.headers,\n status: response.status,\n url\n });\n }\n return data;\n } catch (err) {\n if (err instanceof HttpRequestError)\n throw err;\n if (err instanceof TimeoutError)\n throw err;\n throw new HttpRequestError({\n body,\n cause: err,\n url\n });\n }\n }\n };\n }\n var init_http = __esm({\n \"../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/utils/rpc/http.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_request();\n init_withTimeout();\n init_stringify();\n init_id();\n }\n });\n\n // ../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/constants/strings.js\n var presignMessagePrefix;\n var init_strings = __esm({\n \"../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/constants/strings.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n presignMessagePrefix = \"\u0019Ethereum Signed Message:\\n\";\n }\n });\n\n // ../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/utils/signature/toPrefixedMessage.js\n function toPrefixedMessage(message_) {\n const message = (() => {\n if (typeof message_ === \"string\")\n return stringToHex(message_);\n if (typeof message_.raw === \"string\")\n return message_.raw;\n return bytesToHex(message_.raw);\n })();\n const prefix = stringToHex(`${presignMessagePrefix}${size(message)}`);\n return concat([prefix, message]);\n }\n var init_toPrefixedMessage = __esm({\n \"../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/utils/signature/toPrefixedMessage.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_strings();\n init_concat();\n init_size();\n init_toHex();\n }\n });\n\n // ../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/utils/signature/hashMessage.js\n function hashMessage(message, to_) {\n return keccak256(toPrefixedMessage(message), to_);\n }\n var init_hashMessage = __esm({\n \"../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/utils/signature/hashMessage.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_keccak256();\n init_toPrefixedMessage();\n }\n });\n\n // ../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/errors/typedData.js\n var InvalidDomainError, InvalidPrimaryTypeError, InvalidStructTypeError;\n var init_typedData = __esm({\n \"../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/errors/typedData.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_stringify();\n init_base();\n InvalidDomainError = class extends BaseError2 {\n constructor({ domain: domain2 }) {\n super(`Invalid domain \"${stringify(domain2)}\".`, {\n metaMessages: [\"Must be a valid EIP-712 domain.\"]\n });\n }\n };\n InvalidPrimaryTypeError = class extends BaseError2 {\n constructor({ primaryType, types }) {\n super(`Invalid primary type \\`${primaryType}\\` must be one of \\`${JSON.stringify(Object.keys(types))}\\`.`, {\n docsPath: \"/api/glossary/Errors#typeddatainvalidprimarytypeerror\",\n metaMessages: [\"Check that the primary type is a key in `types`.\"]\n });\n }\n };\n InvalidStructTypeError = class extends BaseError2 {\n constructor({ type }) {\n super(`Struct type \"${type}\" is invalid.`, {\n metaMessages: [\"Struct type must not be a Solidity type.\"],\n name: \"InvalidStructTypeError\"\n });\n }\n };\n }\n });\n\n // ../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/utils/typedData.js\n function validateTypedData(parameters) {\n const { domain: domain2, message, primaryType, types } = parameters;\n const validateData = (struct, data) => {\n for (const param of struct) {\n const { name, type } = param;\n const value = data[name];\n const integerMatch = type.match(integerRegex2);\n if (integerMatch && (typeof value === \"number\" || typeof value === \"bigint\")) {\n const [_type, base4, size_] = integerMatch;\n numberToHex(value, {\n signed: base4 === \"int\",\n size: Number.parseInt(size_, 10) / 8\n });\n }\n if (type === \"address\" && typeof value === \"string\" && !isAddress(value))\n throw new InvalidAddressError({ address: value });\n const bytesMatch = type.match(bytesRegex2);\n if (bytesMatch) {\n const [_type, size_] = bytesMatch;\n if (size_ && size(value) !== Number.parseInt(size_, 10))\n throw new BytesSizeMismatchError({\n expectedSize: Number.parseInt(size_, 10),\n givenSize: size(value)\n });\n }\n const struct2 = types[type];\n if (struct2) {\n validateReference(type);\n validateData(struct2, value);\n }\n }\n };\n if (types.EIP712Domain && domain2) {\n if (typeof domain2 !== \"object\")\n throw new InvalidDomainError({ domain: domain2 });\n validateData(types.EIP712Domain, domain2);\n }\n if (primaryType !== \"EIP712Domain\") {\n if (types[primaryType])\n validateData(types[primaryType], message);\n else\n throw new InvalidPrimaryTypeError({ primaryType, types });\n }\n }\n function getTypesForEIP712Domain({ domain: domain2 }) {\n return [\n typeof domain2?.name === \"string\" && { name: \"name\", type: \"string\" },\n domain2?.version && { name: \"version\", type: \"string\" },\n (typeof domain2?.chainId === \"number\" || typeof domain2?.chainId === \"bigint\") && {\n name: \"chainId\",\n type: \"uint256\"\n },\n domain2?.verifyingContract && {\n name: \"verifyingContract\",\n type: \"address\"\n },\n domain2?.salt && { name: \"salt\", type: \"bytes32\" }\n ].filter(Boolean);\n }\n function validateReference(type) {\n if (type === \"address\" || type === \"bool\" || type === \"string\" || type.startsWith(\"bytes\") || type.startsWith(\"uint\") || type.startsWith(\"int\"))\n throw new InvalidStructTypeError({ type });\n }\n var init_typedData2 = __esm({\n \"../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/utils/typedData.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_abi();\n init_address();\n init_typedData();\n init_isAddress();\n init_size();\n init_toHex();\n init_regex2();\n }\n });\n\n // ../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/utils/signature/hashTypedData.js\n function hashTypedData(parameters) {\n const { domain: domain2 = {}, message, primaryType } = parameters;\n const types = {\n EIP712Domain: getTypesForEIP712Domain({ domain: domain2 }),\n ...parameters.types\n };\n validateTypedData({\n domain: domain2,\n message,\n primaryType,\n types\n });\n const parts = [\"0x1901\"];\n if (domain2)\n parts.push(hashDomain({\n domain: domain2,\n types\n }));\n if (primaryType !== \"EIP712Domain\")\n parts.push(hashStruct({\n data: message,\n primaryType,\n types\n }));\n return keccak256(concat(parts));\n }\n function hashDomain({ domain: domain2, types }) {\n return hashStruct({\n data: domain2,\n primaryType: \"EIP712Domain\",\n types\n });\n }\n function hashStruct({ data, primaryType, types }) {\n const encoded = encodeData({\n data,\n primaryType,\n types\n });\n return keccak256(encoded);\n }\n function encodeData({ data, primaryType, types }) {\n const encodedTypes = [{ type: \"bytes32\" }];\n const encodedValues = [hashType({ primaryType, types })];\n for (const field of types[primaryType]) {\n const [type, value] = encodeField({\n types,\n name: field.name,\n type: field.type,\n value: data[field.name]\n });\n encodedTypes.push(type);\n encodedValues.push(value);\n }\n return encodeAbiParameters(encodedTypes, encodedValues);\n }\n function hashType({ primaryType, types }) {\n const encodedHashType = toHex(encodeType({ primaryType, types }));\n return keccak256(encodedHashType);\n }\n function encodeType({ primaryType, types }) {\n let result = \"\";\n const unsortedDeps = findTypeDependencies({ primaryType, types });\n unsortedDeps.delete(primaryType);\n const deps = [primaryType, ...Array.from(unsortedDeps).sort()];\n for (const type of deps) {\n result += `${type}(${types[type].map(({ name, type: t3 }) => `${t3} ${name}`).join(\",\")})`;\n }\n return result;\n }\n function findTypeDependencies({ primaryType: primaryType_, types }, results = /* @__PURE__ */ new Set()) {\n const match = primaryType_.match(/^\\w*/u);\n const primaryType = match?.[0];\n if (results.has(primaryType) || types[primaryType] === void 0) {\n return results;\n }\n results.add(primaryType);\n for (const field of types[primaryType]) {\n findTypeDependencies({ primaryType: field.type, types }, results);\n }\n return results;\n }\n function encodeField({ types, name, type, value }) {\n if (types[type] !== void 0) {\n return [\n { type: \"bytes32\" },\n keccak256(encodeData({ data: value, primaryType: type, types }))\n ];\n }\n if (type === \"bytes\") {\n const prepend = value.length % 2 ? \"0\" : \"\";\n value = `0x${prepend + value.slice(2)}`;\n return [{ type: \"bytes32\" }, keccak256(value)];\n }\n if (type === \"string\")\n return [{ type: \"bytes32\" }, keccak256(toHex(value))];\n if (type.lastIndexOf(\"]\") === type.length - 1) {\n const parsedType = type.slice(0, type.lastIndexOf(\"[\"));\n const typeValuePairs = value.map((item) => encodeField({\n name,\n type: parsedType,\n types,\n value: item\n }));\n return [\n { type: \"bytes32\" },\n keccak256(encodeAbiParameters(typeValuePairs.map(([t3]) => t3), typeValuePairs.map(([, v2]) => v2)))\n ];\n }\n return [{ type }, value];\n }\n var init_hashTypedData = __esm({\n \"../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/utils/signature/hashTypedData.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_encodeAbiParameters();\n init_concat();\n init_toHex();\n init_keccak256();\n init_typedData2();\n }\n });\n\n // ../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/constants/bytes.js\n var zeroHash;\n var init_bytes2 = __esm({\n \"../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/constants/bytes.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n zeroHash = \"0x0000000000000000000000000000000000000000000000000000000000000000\";\n }\n });\n\n // ../../../node_modules/.pnpm/ox@0.9.6_typescript@5.8.3_zod@3.25.64/node_modules/ox/_esm/core/internal/lru.js\n var LruMap2;\n var init_lru2 = __esm({\n \"../../../node_modules/.pnpm/ox@0.9.6_typescript@5.8.3_zod@3.25.64/node_modules/ox/_esm/core/internal/lru.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n LruMap2 = class extends Map {\n constructor(size6) {\n super();\n Object.defineProperty(this, \"maxSize\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: void 0\n });\n this.maxSize = size6;\n }\n get(key) {\n const value = super.get(key);\n if (super.has(key) && value !== void 0) {\n this.delete(key);\n super.set(key, value);\n }\n return value;\n }\n set(key, value) {\n super.set(key, value);\n if (this.maxSize && this.size > this.maxSize) {\n const firstKey = this.keys().next().value;\n if (firstKey)\n this.delete(firstKey);\n }\n return this;\n }\n };\n }\n });\n\n // ../../../node_modules/.pnpm/ox@0.9.6_typescript@5.8.3_zod@3.25.64/node_modules/ox/_esm/core/Caches.js\n var caches, checksum;\n var init_Caches = __esm({\n \"../../../node_modules/.pnpm/ox@0.9.6_typescript@5.8.3_zod@3.25.64/node_modules/ox/_esm/core/Caches.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_lru2();\n caches = {\n checksum: /* @__PURE__ */ new LruMap2(8192)\n };\n checksum = caches.checksum;\n }\n });\n\n // ../../../node_modules/.pnpm/ox@0.9.6_typescript@5.8.3_zod@3.25.64/node_modules/ox/_esm/core/Hash.js\n function keccak2562(value, options = {}) {\n const { as = typeof value === \"string\" ? \"Hex\" : \"Bytes\" } = options;\n const bytes = keccak_256(from(value));\n if (as === \"Bytes\")\n return bytes;\n return fromBytes(bytes);\n }\n var init_Hash = __esm({\n \"../../../node_modules/.pnpm/ox@0.9.6_typescript@5.8.3_zod@3.25.64/node_modules/ox/_esm/core/Hash.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_sha3();\n init_Bytes();\n init_Hex();\n }\n });\n\n // ../../../node_modules/.pnpm/ox@0.9.6_typescript@5.8.3_zod@3.25.64/node_modules/ox/_esm/core/PublicKey.js\n function assert4(publicKey, options = {}) {\n const { compressed } = options;\n const { prefix, x: x4, y: y6 } = publicKey;\n if (compressed === false || typeof x4 === \"bigint\" && typeof y6 === \"bigint\") {\n if (prefix !== 4)\n throw new InvalidPrefixError({\n prefix,\n cause: new InvalidUncompressedPrefixError()\n });\n return;\n }\n if (compressed === true || typeof x4 === \"bigint\" && typeof y6 === \"undefined\") {\n if (prefix !== 3 && prefix !== 2)\n throw new InvalidPrefixError({\n prefix,\n cause: new InvalidCompressedPrefixError()\n });\n return;\n }\n throw new InvalidError({ publicKey });\n }\n function from3(value) {\n const publicKey = (() => {\n if (validate2(value))\n return fromHex3(value);\n if (validate(value))\n return fromBytes2(value);\n const { prefix, x: x4, y: y6 } = value;\n if (typeof x4 === \"bigint\" && typeof y6 === \"bigint\")\n return { prefix: prefix ?? 4, x: x4, y: y6 };\n return { prefix, x: x4 };\n })();\n assert4(publicKey);\n return publicKey;\n }\n function fromBytes2(publicKey) {\n return fromHex3(fromBytes(publicKey));\n }\n function fromHex3(publicKey) {\n if (publicKey.length !== 132 && publicKey.length !== 130 && publicKey.length !== 68)\n throw new InvalidSerializedSizeError({ publicKey });\n if (publicKey.length === 130) {\n const x5 = BigInt(slice3(publicKey, 0, 32));\n const y6 = BigInt(slice3(publicKey, 32, 64));\n return {\n prefix: 4,\n x: x5,\n y: y6\n };\n }\n if (publicKey.length === 132) {\n const prefix2 = Number(slice3(publicKey, 0, 1));\n const x5 = BigInt(slice3(publicKey, 1, 33));\n const y6 = BigInt(slice3(publicKey, 33, 65));\n return {\n prefix: prefix2,\n x: x5,\n y: y6\n };\n }\n const prefix = Number(slice3(publicKey, 0, 1));\n const x4 = BigInt(slice3(publicKey, 1, 33));\n return {\n prefix,\n x: x4\n };\n }\n function toHex2(publicKey, options = {}) {\n assert4(publicKey);\n const { prefix, x: x4, y: y6 } = publicKey;\n const { includePrefix = true } = options;\n const publicKey_ = concat2(\n includePrefix ? fromNumber(prefix, { size: 1 }) : \"0x\",\n fromNumber(x4, { size: 32 }),\n // If the public key is not compressed, add the y coordinate.\n typeof y6 === \"bigint\" ? fromNumber(y6, { size: 32 }) : \"0x\"\n );\n return publicKey_;\n }\n var InvalidError, InvalidPrefixError, InvalidCompressedPrefixError, InvalidUncompressedPrefixError, InvalidSerializedSizeError;\n var init_PublicKey = __esm({\n \"../../../node_modules/.pnpm/ox@0.9.6_typescript@5.8.3_zod@3.25.64/node_modules/ox/_esm/core/PublicKey.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_Bytes();\n init_Errors();\n init_Hex();\n init_Json();\n InvalidError = class extends BaseError3 {\n constructor({ publicKey }) {\n super(`Value \\`${stringify2(publicKey)}\\` is not a valid public key.`, {\n metaMessages: [\n \"Public key must contain:\",\n \"- an `x` and `prefix` value (compressed)\",\n \"- an `x`, `y`, and `prefix` value (uncompressed)\"\n ]\n });\n Object.defineProperty(this, \"name\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: \"PublicKey.InvalidError\"\n });\n }\n };\n InvalidPrefixError = class extends BaseError3 {\n constructor({ prefix, cause }) {\n super(`Prefix \"${prefix}\" is invalid.`, {\n cause\n });\n Object.defineProperty(this, \"name\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: \"PublicKey.InvalidPrefixError\"\n });\n }\n };\n InvalidCompressedPrefixError = class extends BaseError3 {\n constructor() {\n super(\"Prefix must be 2 or 3 for compressed public keys.\");\n Object.defineProperty(this, \"name\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: \"PublicKey.InvalidCompressedPrefixError\"\n });\n }\n };\n InvalidUncompressedPrefixError = class extends BaseError3 {\n constructor() {\n super(\"Prefix must be 4 for uncompressed public keys.\");\n Object.defineProperty(this, \"name\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: \"PublicKey.InvalidUncompressedPrefixError\"\n });\n }\n };\n InvalidSerializedSizeError = class extends BaseError3 {\n constructor({ publicKey }) {\n super(`Value \\`${publicKey}\\` is an invalid public key size.`, {\n metaMessages: [\n \"Expected: 33 bytes (compressed + prefix), 64 bytes (uncompressed) or 65 bytes (uncompressed + prefix).\",\n `Received ${size3(from2(publicKey))} bytes.`\n ]\n });\n Object.defineProperty(this, \"name\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: \"PublicKey.InvalidSerializedSizeError\"\n });\n }\n };\n }\n });\n\n // ../../../node_modules/.pnpm/ox@0.9.6_typescript@5.8.3_zod@3.25.64/node_modules/ox/_esm/core/Address.js\n function assert5(value, options = {}) {\n const { strict = true } = options;\n if (!addressRegex2.test(value))\n throw new InvalidAddressError2({\n address: value,\n cause: new InvalidInputError()\n });\n if (strict) {\n if (value.toLowerCase() === value)\n return;\n if (checksum2(value) !== value)\n throw new InvalidAddressError2({\n address: value,\n cause: new InvalidChecksumError()\n });\n }\n }\n function checksum2(address) {\n if (checksum.has(address))\n return checksum.get(address);\n assert5(address, { strict: false });\n const hexAddress = address.substring(2).toLowerCase();\n const hash3 = keccak2562(fromString(hexAddress), { as: \"Bytes\" });\n const characters = hexAddress.split(\"\");\n for (let i3 = 0; i3 < 40; i3 += 2) {\n if (hash3[i3 >> 1] >> 4 >= 8 && characters[i3]) {\n characters[i3] = characters[i3].toUpperCase();\n }\n if ((hash3[i3 >> 1] & 15) >= 8 && characters[i3 + 1]) {\n characters[i3 + 1] = characters[i3 + 1].toUpperCase();\n }\n }\n const result = `0x${characters.join(\"\")}`;\n checksum.set(address, result);\n return result;\n }\n function from4(address, options = {}) {\n const { checksum: checksumVal = false } = options;\n assert5(address);\n if (checksumVal)\n return checksum2(address);\n return address;\n }\n function fromPublicKey(publicKey, options = {}) {\n const address = keccak2562(`0x${toHex2(publicKey).slice(4)}`).substring(26);\n return from4(`0x${address}`, options);\n }\n function validate3(address, options = {}) {\n const { strict = true } = options ?? {};\n try {\n assert5(address, { strict });\n return true;\n } catch {\n return false;\n }\n }\n var addressRegex2, InvalidAddressError2, InvalidInputError, InvalidChecksumError;\n var init_Address = __esm({\n \"../../../node_modules/.pnpm/ox@0.9.6_typescript@5.8.3_zod@3.25.64/node_modules/ox/_esm/core/Address.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_Bytes();\n init_Caches();\n init_Errors();\n init_Hash();\n init_PublicKey();\n addressRegex2 = /^0x[a-fA-F0-9]{40}$/;\n InvalidAddressError2 = class extends BaseError3 {\n constructor({ address, cause }) {\n super(`Address \"${address}\" is invalid.`, {\n cause\n });\n Object.defineProperty(this, \"name\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: \"Address.InvalidAddressError\"\n });\n }\n };\n InvalidInputError = class extends BaseError3 {\n constructor() {\n super(\"Address is not a 20 byte (40 hexadecimal character) value.\");\n Object.defineProperty(this, \"name\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: \"Address.InvalidInputError\"\n });\n }\n };\n InvalidChecksumError = class extends BaseError3 {\n constructor() {\n super(\"Address does not match its checksum counterpart.\");\n Object.defineProperty(this, \"name\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: \"Address.InvalidChecksumError\"\n });\n }\n };\n }\n });\n\n // ../../../node_modules/.pnpm/ox@0.9.6_typescript@5.8.3_zod@3.25.64/node_modules/ox/_esm/core/Solidity.js\n var arrayRegex2, bytesRegex3, integerRegex3, maxInt82, maxInt162, maxInt242, maxInt322, maxInt402, maxInt482, maxInt562, maxInt642, maxInt722, maxInt802, maxInt882, maxInt962, maxInt1042, maxInt1122, maxInt1202, maxInt1282, maxInt1362, maxInt1442, maxInt1522, maxInt1602, maxInt1682, maxInt1762, maxInt1842, maxInt1922, maxInt2002, maxInt2082, maxInt2162, maxInt2242, maxInt2322, maxInt2402, maxInt2482, maxInt2562, minInt82, minInt162, minInt242, minInt322, minInt402, minInt482, minInt562, minInt642, minInt722, minInt802, minInt882, minInt962, minInt1042, minInt1122, minInt1202, minInt1282, minInt1362, minInt1442, minInt1522, minInt1602, minInt1682, minInt1762, minInt1842, minInt1922, minInt2002, minInt2082, minInt2162, minInt2242, minInt2322, minInt2402, minInt2482, minInt2562, maxUint82, maxUint162, maxUint242, maxUint322, maxUint402, maxUint482, maxUint562, maxUint642, maxUint722, maxUint802, maxUint882, maxUint962, maxUint1042, maxUint1122, maxUint1202, maxUint1282, maxUint1362, maxUint1442, maxUint1522, maxUint1602, maxUint1682, maxUint1762, maxUint1842, maxUint1922, maxUint2002, maxUint2082, maxUint2162, maxUint2242, maxUint2322, maxUint2402, maxUint2482, maxUint2562;\n var init_Solidity = __esm({\n \"../../../node_modules/.pnpm/ox@0.9.6_typescript@5.8.3_zod@3.25.64/node_modules/ox/_esm/core/Solidity.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n arrayRegex2 = /^(.*)\\[([0-9]*)\\]$/;\n bytesRegex3 = /^bytes([1-9]|1[0-9]|2[0-9]|3[0-2])?$/;\n integerRegex3 = /^(u?int)(8|16|24|32|40|48|56|64|72|80|88|96|104|112|120|128|136|144|152|160|168|176|184|192|200|208|216|224|232|240|248|256)?$/;\n maxInt82 = 2n ** (8n - 1n) - 1n;\n maxInt162 = 2n ** (16n - 1n) - 1n;\n maxInt242 = 2n ** (24n - 1n) - 1n;\n maxInt322 = 2n ** (32n - 1n) - 1n;\n maxInt402 = 2n ** (40n - 1n) - 1n;\n maxInt482 = 2n ** (48n - 1n) - 1n;\n maxInt562 = 2n ** (56n - 1n) - 1n;\n maxInt642 = 2n ** (64n - 1n) - 1n;\n maxInt722 = 2n ** (72n - 1n) - 1n;\n maxInt802 = 2n ** (80n - 1n) - 1n;\n maxInt882 = 2n ** (88n - 1n) - 1n;\n maxInt962 = 2n ** (96n - 1n) - 1n;\n maxInt1042 = 2n ** (104n - 1n) - 1n;\n maxInt1122 = 2n ** (112n - 1n) - 1n;\n maxInt1202 = 2n ** (120n - 1n) - 1n;\n maxInt1282 = 2n ** (128n - 1n) - 1n;\n maxInt1362 = 2n ** (136n - 1n) - 1n;\n maxInt1442 = 2n ** (144n - 1n) - 1n;\n maxInt1522 = 2n ** (152n - 1n) - 1n;\n maxInt1602 = 2n ** (160n - 1n) - 1n;\n maxInt1682 = 2n ** (168n - 1n) - 1n;\n maxInt1762 = 2n ** (176n - 1n) - 1n;\n maxInt1842 = 2n ** (184n - 1n) - 1n;\n maxInt1922 = 2n ** (192n - 1n) - 1n;\n maxInt2002 = 2n ** (200n - 1n) - 1n;\n maxInt2082 = 2n ** (208n - 1n) - 1n;\n maxInt2162 = 2n ** (216n - 1n) - 1n;\n maxInt2242 = 2n ** (224n - 1n) - 1n;\n maxInt2322 = 2n ** (232n - 1n) - 1n;\n maxInt2402 = 2n ** (240n - 1n) - 1n;\n maxInt2482 = 2n ** (248n - 1n) - 1n;\n maxInt2562 = 2n ** (256n - 1n) - 1n;\n minInt82 = -(2n ** (8n - 1n));\n minInt162 = -(2n ** (16n - 1n));\n minInt242 = -(2n ** (24n - 1n));\n minInt322 = -(2n ** (32n - 1n));\n minInt402 = -(2n ** (40n - 1n));\n minInt482 = -(2n ** (48n - 1n));\n minInt562 = -(2n ** (56n - 1n));\n minInt642 = -(2n ** (64n - 1n));\n minInt722 = -(2n ** (72n - 1n));\n minInt802 = -(2n ** (80n - 1n));\n minInt882 = -(2n ** (88n - 1n));\n minInt962 = -(2n ** (96n - 1n));\n minInt1042 = -(2n ** (104n - 1n));\n minInt1122 = -(2n ** (112n - 1n));\n minInt1202 = -(2n ** (120n - 1n));\n minInt1282 = -(2n ** (128n - 1n));\n minInt1362 = -(2n ** (136n - 1n));\n minInt1442 = -(2n ** (144n - 1n));\n minInt1522 = -(2n ** (152n - 1n));\n minInt1602 = -(2n ** (160n - 1n));\n minInt1682 = -(2n ** (168n - 1n));\n minInt1762 = -(2n ** (176n - 1n));\n minInt1842 = -(2n ** (184n - 1n));\n minInt1922 = -(2n ** (192n - 1n));\n minInt2002 = -(2n ** (200n - 1n));\n minInt2082 = -(2n ** (208n - 1n));\n minInt2162 = -(2n ** (216n - 1n));\n minInt2242 = -(2n ** (224n - 1n));\n minInt2322 = -(2n ** (232n - 1n));\n minInt2402 = -(2n ** (240n - 1n));\n minInt2482 = -(2n ** (248n - 1n));\n minInt2562 = -(2n ** (256n - 1n));\n maxUint82 = 2n ** 8n - 1n;\n maxUint162 = 2n ** 16n - 1n;\n maxUint242 = 2n ** 24n - 1n;\n maxUint322 = 2n ** 32n - 1n;\n maxUint402 = 2n ** 40n - 1n;\n maxUint482 = 2n ** 48n - 1n;\n maxUint562 = 2n ** 56n - 1n;\n maxUint642 = 2n ** 64n - 1n;\n maxUint722 = 2n ** 72n - 1n;\n maxUint802 = 2n ** 80n - 1n;\n maxUint882 = 2n ** 88n - 1n;\n maxUint962 = 2n ** 96n - 1n;\n maxUint1042 = 2n ** 104n - 1n;\n maxUint1122 = 2n ** 112n - 1n;\n maxUint1202 = 2n ** 120n - 1n;\n maxUint1282 = 2n ** 128n - 1n;\n maxUint1362 = 2n ** 136n - 1n;\n maxUint1442 = 2n ** 144n - 1n;\n maxUint1522 = 2n ** 152n - 1n;\n maxUint1602 = 2n ** 160n - 1n;\n maxUint1682 = 2n ** 168n - 1n;\n maxUint1762 = 2n ** 176n - 1n;\n maxUint1842 = 2n ** 184n - 1n;\n maxUint1922 = 2n ** 192n - 1n;\n maxUint2002 = 2n ** 200n - 1n;\n maxUint2082 = 2n ** 208n - 1n;\n maxUint2162 = 2n ** 216n - 1n;\n maxUint2242 = 2n ** 224n - 1n;\n maxUint2322 = 2n ** 232n - 1n;\n maxUint2402 = 2n ** 240n - 1n;\n maxUint2482 = 2n ** 248n - 1n;\n maxUint2562 = 2n ** 256n - 1n;\n }\n });\n\n // ../../../node_modules/.pnpm/ox@0.9.6_typescript@5.8.3_zod@3.25.64/node_modules/ox/_esm/core/internal/abiParameters.js\n function decodeParameter2(cursor, param, options) {\n const { checksumAddress: checksumAddress2, staticPosition } = options;\n const arrayComponents = getArrayComponents2(param.type);\n if (arrayComponents) {\n const [length2, type] = arrayComponents;\n return decodeArray2(cursor, { ...param, type }, { checksumAddress: checksumAddress2, length: length2, staticPosition });\n }\n if (param.type === \"tuple\")\n return decodeTuple2(cursor, param, {\n checksumAddress: checksumAddress2,\n staticPosition\n });\n if (param.type === \"address\")\n return decodeAddress2(cursor, { checksum: checksumAddress2 });\n if (param.type === \"bool\")\n return decodeBool2(cursor);\n if (param.type.startsWith(\"bytes\"))\n return decodeBytes2(cursor, param, { staticPosition });\n if (param.type.startsWith(\"uint\") || param.type.startsWith(\"int\"))\n return decodeNumber2(cursor, param);\n if (param.type === \"string\")\n return decodeString2(cursor, { staticPosition });\n throw new InvalidTypeError(param.type);\n }\n function decodeAddress2(cursor, options = {}) {\n const { checksum: checksum4 = false } = options;\n const value = cursor.readBytes(32);\n const wrap3 = (address) => checksum4 ? checksum2(address) : address;\n return [wrap3(fromBytes(slice2(value, -20))), 32];\n }\n function decodeArray2(cursor, param, options) {\n const { checksumAddress: checksumAddress2, length: length2, staticPosition } = options;\n if (!length2) {\n const offset = toNumber2(cursor.readBytes(sizeOfOffset2));\n const start = staticPosition + offset;\n const startOfData = start + sizeOfLength2;\n cursor.setPosition(start);\n const length3 = toNumber2(cursor.readBytes(sizeOfLength2));\n const dynamicChild = hasDynamicChild2(param);\n let consumed2 = 0;\n const value2 = [];\n for (let i3 = 0; i3 < length3; ++i3) {\n cursor.setPosition(startOfData + (dynamicChild ? i3 * 32 : consumed2));\n const [data, consumed_] = decodeParameter2(cursor, param, {\n checksumAddress: checksumAddress2,\n staticPosition: startOfData\n });\n consumed2 += consumed_;\n value2.push(data);\n }\n cursor.setPosition(staticPosition + 32);\n return [value2, 32];\n }\n if (hasDynamicChild2(param)) {\n const offset = toNumber2(cursor.readBytes(sizeOfOffset2));\n const start = staticPosition + offset;\n const value2 = [];\n for (let i3 = 0; i3 < length2; ++i3) {\n cursor.setPosition(start + i3 * 32);\n const [data] = decodeParameter2(cursor, param, {\n checksumAddress: checksumAddress2,\n staticPosition: start\n });\n value2.push(data);\n }\n cursor.setPosition(staticPosition + 32);\n return [value2, 32];\n }\n let consumed = 0;\n const value = [];\n for (let i3 = 0; i3 < length2; ++i3) {\n const [data, consumed_] = decodeParameter2(cursor, param, {\n checksumAddress: checksumAddress2,\n staticPosition: staticPosition + consumed\n });\n consumed += consumed_;\n value.push(data);\n }\n return [value, consumed];\n }\n function decodeBool2(cursor) {\n return [toBoolean(cursor.readBytes(32), { size: 32 }), 32];\n }\n function decodeBytes2(cursor, param, { staticPosition }) {\n const [_2, size6] = param.type.split(\"bytes\");\n if (!size6) {\n const offset = toNumber2(cursor.readBytes(32));\n cursor.setPosition(staticPosition + offset);\n const length2 = toNumber2(cursor.readBytes(32));\n if (length2 === 0) {\n cursor.setPosition(staticPosition + 32);\n return [\"0x\", 32];\n }\n const data = cursor.readBytes(length2);\n cursor.setPosition(staticPosition + 32);\n return [fromBytes(data), 32];\n }\n const value = fromBytes(cursor.readBytes(Number.parseInt(size6, 10), 32));\n return [value, 32];\n }\n function decodeNumber2(cursor, param) {\n const signed = param.type.startsWith(\"int\");\n const size6 = Number.parseInt(param.type.split(\"int\")[1] || \"256\", 10);\n const value = cursor.readBytes(32);\n return [\n size6 > 48 ? toBigInt2(value, { signed }) : toNumber2(value, { signed }),\n 32\n ];\n }\n function decodeTuple2(cursor, param, options) {\n const { checksumAddress: checksumAddress2, staticPosition } = options;\n const hasUnnamedChild = param.components.length === 0 || param.components.some(({ name }) => !name);\n const value = hasUnnamedChild ? [] : {};\n let consumed = 0;\n if (hasDynamicChild2(param)) {\n const offset = toNumber2(cursor.readBytes(sizeOfOffset2));\n const start = staticPosition + offset;\n for (let i3 = 0; i3 < param.components.length; ++i3) {\n const component = param.components[i3];\n cursor.setPosition(start + consumed);\n const [data, consumed_] = decodeParameter2(cursor, component, {\n checksumAddress: checksumAddress2,\n staticPosition: start\n });\n consumed += consumed_;\n value[hasUnnamedChild ? i3 : component?.name] = data;\n }\n cursor.setPosition(staticPosition + 32);\n return [value, 32];\n }\n for (let i3 = 0; i3 < param.components.length; ++i3) {\n const component = param.components[i3];\n const [data, consumed_] = decodeParameter2(cursor, component, {\n checksumAddress: checksumAddress2,\n staticPosition\n });\n value[hasUnnamedChild ? i3 : component?.name] = data;\n consumed += consumed_;\n }\n return [value, consumed];\n }\n function decodeString2(cursor, { staticPosition }) {\n const offset = toNumber2(cursor.readBytes(32));\n const start = staticPosition + offset;\n cursor.setPosition(start);\n const length2 = toNumber2(cursor.readBytes(32));\n if (length2 === 0) {\n cursor.setPosition(staticPosition + 32);\n return [\"\", 32];\n }\n const data = cursor.readBytes(length2, 32);\n const value = toString(trimLeft(data));\n cursor.setPosition(staticPosition + 32);\n return [value, 32];\n }\n function prepareParameters({ checksumAddress: checksumAddress2, parameters, values }) {\n const preparedParameters = [];\n for (let i3 = 0; i3 < parameters.length; i3++) {\n preparedParameters.push(prepareParameter({\n checksumAddress: checksumAddress2,\n parameter: parameters[i3],\n value: values[i3]\n }));\n }\n return preparedParameters;\n }\n function prepareParameter({ checksumAddress: checksumAddress2 = false, parameter: parameter_, value }) {\n const parameter = parameter_;\n const arrayComponents = getArrayComponents2(parameter.type);\n if (arrayComponents) {\n const [length2, type] = arrayComponents;\n return encodeArray2(value, {\n checksumAddress: checksumAddress2,\n length: length2,\n parameter: {\n ...parameter,\n type\n }\n });\n }\n if (parameter.type === \"tuple\") {\n return encodeTuple2(value, {\n checksumAddress: checksumAddress2,\n parameter\n });\n }\n if (parameter.type === \"address\") {\n return encodeAddress2(value, {\n checksum: checksumAddress2\n });\n }\n if (parameter.type === \"bool\") {\n return encodeBoolean(value);\n }\n if (parameter.type.startsWith(\"uint\") || parameter.type.startsWith(\"int\")) {\n const signed = parameter.type.startsWith(\"int\");\n const [, , size6 = \"256\"] = integerRegex3.exec(parameter.type) ?? [];\n return encodeNumber2(value, {\n signed,\n size: Number(size6)\n });\n }\n if (parameter.type.startsWith(\"bytes\")) {\n return encodeBytes2(value, { type: parameter.type });\n }\n if (parameter.type === \"string\") {\n return encodeString2(value);\n }\n throw new InvalidTypeError(parameter.type);\n }\n function encode2(preparedParameters) {\n let staticSize = 0;\n for (let i3 = 0; i3 < preparedParameters.length; i3++) {\n const { dynamic, encoded } = preparedParameters[i3];\n if (dynamic)\n staticSize += 32;\n else\n staticSize += size3(encoded);\n }\n const staticParameters = [];\n const dynamicParameters = [];\n let dynamicSize = 0;\n for (let i3 = 0; i3 < preparedParameters.length; i3++) {\n const { dynamic, encoded } = preparedParameters[i3];\n if (dynamic) {\n staticParameters.push(fromNumber(staticSize + dynamicSize, { size: 32 }));\n dynamicParameters.push(encoded);\n dynamicSize += size3(encoded);\n } else {\n staticParameters.push(encoded);\n }\n }\n return concat2(...staticParameters, ...dynamicParameters);\n }\n function encodeAddress2(value, options) {\n const { checksum: checksum4 = false } = options;\n assert5(value, { strict: checksum4 });\n return {\n dynamic: false,\n encoded: padLeft(value.toLowerCase())\n };\n }\n function encodeArray2(value, options) {\n const { checksumAddress: checksumAddress2, length: length2, parameter } = options;\n const dynamic = length2 === null;\n if (!Array.isArray(value))\n throw new InvalidArrayError2(value);\n if (!dynamic && value.length !== length2)\n throw new ArrayLengthMismatchError({\n expectedLength: length2,\n givenLength: value.length,\n type: `${parameter.type}[${length2}]`\n });\n let dynamicChild = false;\n const preparedParameters = [];\n for (let i3 = 0; i3 < value.length; i3++) {\n const preparedParam = prepareParameter({\n checksumAddress: checksumAddress2,\n parameter,\n value: value[i3]\n });\n if (preparedParam.dynamic)\n dynamicChild = true;\n preparedParameters.push(preparedParam);\n }\n if (dynamic || dynamicChild) {\n const data = encode2(preparedParameters);\n if (dynamic) {\n const length3 = fromNumber(preparedParameters.length, { size: 32 });\n return {\n dynamic: true,\n encoded: preparedParameters.length > 0 ? concat2(length3, data) : length3\n };\n }\n if (dynamicChild)\n return { dynamic: true, encoded: data };\n }\n return {\n dynamic: false,\n encoded: concat2(...preparedParameters.map(({ encoded }) => encoded))\n };\n }\n function encodeBytes2(value, { type }) {\n const [, parametersize] = type.split(\"bytes\");\n const bytesSize = size3(value);\n if (!parametersize) {\n let value_ = value;\n if (bytesSize % 32 !== 0)\n value_ = padRight(value_, Math.ceil((value.length - 2) / 2 / 32) * 32);\n return {\n dynamic: true,\n encoded: concat2(padLeft(fromNumber(bytesSize, { size: 32 })), value_)\n };\n }\n if (bytesSize !== Number.parseInt(parametersize, 10))\n throw new BytesSizeMismatchError2({\n expectedSize: Number.parseInt(parametersize, 10),\n value\n });\n return { dynamic: false, encoded: padRight(value) };\n }\n function encodeBoolean(value) {\n if (typeof value !== \"boolean\")\n throw new BaseError3(`Invalid boolean value: \"${value}\" (type: ${typeof value}). Expected: \\`true\\` or \\`false\\`.`);\n return { dynamic: false, encoded: padLeft(fromBoolean(value)) };\n }\n function encodeNumber2(value, { signed, size: size6 }) {\n if (typeof size6 === \"number\") {\n const max = 2n ** (BigInt(size6) - (signed ? 1n : 0n)) - 1n;\n const min = signed ? -max - 1n : 0n;\n if (value > max || value < min)\n throw new IntegerOutOfRangeError2({\n max: max.toString(),\n min: min.toString(),\n signed,\n size: size6 / 8,\n value: value.toString()\n });\n }\n return {\n dynamic: false,\n encoded: fromNumber(value, {\n size: 32,\n signed\n })\n };\n }\n function encodeString2(value) {\n const hexValue = fromString2(value);\n const partsLength = Math.ceil(size3(hexValue) / 32);\n const parts = [];\n for (let i3 = 0; i3 < partsLength; i3++) {\n parts.push(padRight(slice3(hexValue, i3 * 32, (i3 + 1) * 32)));\n }\n return {\n dynamic: true,\n encoded: concat2(padRight(fromNumber(size3(hexValue), { size: 32 })), ...parts)\n };\n }\n function encodeTuple2(value, options) {\n const { checksumAddress: checksumAddress2, parameter } = options;\n let dynamic = false;\n const preparedParameters = [];\n for (let i3 = 0; i3 < parameter.components.length; i3++) {\n const param_ = parameter.components[i3];\n const index2 = Array.isArray(value) ? i3 : param_.name;\n const preparedParam = prepareParameter({\n checksumAddress: checksumAddress2,\n parameter: param_,\n value: value[index2]\n });\n preparedParameters.push(preparedParam);\n if (preparedParam.dynamic)\n dynamic = true;\n }\n return {\n dynamic,\n encoded: dynamic ? encode2(preparedParameters) : concat2(...preparedParameters.map(({ encoded }) => encoded))\n };\n }\n function getArrayComponents2(type) {\n const matches = type.match(/^(.*)\\[(\\d+)?\\]$/);\n return matches ? (\n // Return `null` if the array is dynamic.\n [matches[2] ? Number(matches[2]) : null, matches[1]]\n ) : void 0;\n }\n function hasDynamicChild2(param) {\n const { type } = param;\n if (type === \"string\")\n return true;\n if (type === \"bytes\")\n return true;\n if (type.endsWith(\"[]\"))\n return true;\n if (type === \"tuple\")\n return param.components?.some(hasDynamicChild2);\n const arrayComponents = getArrayComponents2(param.type);\n if (arrayComponents && hasDynamicChild2({\n ...param,\n type: arrayComponents[1]\n }))\n return true;\n return false;\n }\n var sizeOfLength2, sizeOfOffset2;\n var init_abiParameters = __esm({\n \"../../../node_modules/.pnpm/ox@0.9.6_typescript@5.8.3_zod@3.25.64/node_modules/ox/_esm/core/internal/abiParameters.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_AbiParameters();\n init_Address();\n init_Bytes();\n init_Errors();\n init_Hex();\n init_Solidity();\n sizeOfLength2 = 32;\n sizeOfOffset2 = 32;\n }\n });\n\n // ../../../node_modules/.pnpm/ox@0.9.6_typescript@5.8.3_zod@3.25.64/node_modules/ox/_esm/core/internal/cursor.js\n function create(bytes, { recursiveReadLimit = 8192 } = {}) {\n const cursor = Object.create(staticCursor2);\n cursor.bytes = bytes;\n cursor.dataView = new DataView(bytes.buffer, bytes.byteOffset, bytes.byteLength);\n cursor.positionReadCount = /* @__PURE__ */ new Map();\n cursor.recursiveReadLimit = recursiveReadLimit;\n return cursor;\n }\n var staticCursor2, NegativeOffsetError2, PositionOutOfBoundsError2, RecursiveReadLimitExceededError2;\n var init_cursor3 = __esm({\n \"../../../node_modules/.pnpm/ox@0.9.6_typescript@5.8.3_zod@3.25.64/node_modules/ox/_esm/core/internal/cursor.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_Errors();\n staticCursor2 = {\n bytes: new Uint8Array(),\n dataView: new DataView(new ArrayBuffer(0)),\n position: 0,\n positionReadCount: /* @__PURE__ */ new Map(),\n recursiveReadCount: 0,\n recursiveReadLimit: Number.POSITIVE_INFINITY,\n assertReadLimit() {\n if (this.recursiveReadCount >= this.recursiveReadLimit)\n throw new RecursiveReadLimitExceededError2({\n count: this.recursiveReadCount + 1,\n limit: this.recursiveReadLimit\n });\n },\n assertPosition(position) {\n if (position < 0 || position > this.bytes.length - 1)\n throw new PositionOutOfBoundsError2({\n length: this.bytes.length,\n position\n });\n },\n decrementPosition(offset) {\n if (offset < 0)\n throw new NegativeOffsetError2({ offset });\n const position = this.position - offset;\n this.assertPosition(position);\n this.position = position;\n },\n getReadCount(position) {\n return this.positionReadCount.get(position || this.position) || 0;\n },\n incrementPosition(offset) {\n if (offset < 0)\n throw new NegativeOffsetError2({ offset });\n const position = this.position + offset;\n this.assertPosition(position);\n this.position = position;\n },\n inspectByte(position_) {\n const position = position_ ?? this.position;\n this.assertPosition(position);\n return this.bytes[position];\n },\n inspectBytes(length2, position_) {\n const position = position_ ?? this.position;\n this.assertPosition(position + length2 - 1);\n return this.bytes.subarray(position, position + length2);\n },\n inspectUint8(position_) {\n const position = position_ ?? this.position;\n this.assertPosition(position);\n return this.bytes[position];\n },\n inspectUint16(position_) {\n const position = position_ ?? this.position;\n this.assertPosition(position + 1);\n return this.dataView.getUint16(position);\n },\n inspectUint24(position_) {\n const position = position_ ?? this.position;\n this.assertPosition(position + 2);\n return (this.dataView.getUint16(position) << 8) + this.dataView.getUint8(position + 2);\n },\n inspectUint32(position_) {\n const position = position_ ?? this.position;\n this.assertPosition(position + 3);\n return this.dataView.getUint32(position);\n },\n pushByte(byte) {\n this.assertPosition(this.position);\n this.bytes[this.position] = byte;\n this.position++;\n },\n pushBytes(bytes) {\n this.assertPosition(this.position + bytes.length - 1);\n this.bytes.set(bytes, this.position);\n this.position += bytes.length;\n },\n pushUint8(value) {\n this.assertPosition(this.position);\n this.bytes[this.position] = value;\n this.position++;\n },\n pushUint16(value) {\n this.assertPosition(this.position + 1);\n this.dataView.setUint16(this.position, value);\n this.position += 2;\n },\n pushUint24(value) {\n this.assertPosition(this.position + 2);\n this.dataView.setUint16(this.position, value >> 8);\n this.dataView.setUint8(this.position + 2, value & ~4294967040);\n this.position += 3;\n },\n pushUint32(value) {\n this.assertPosition(this.position + 3);\n this.dataView.setUint32(this.position, value);\n this.position += 4;\n },\n readByte() {\n this.assertReadLimit();\n this._touch();\n const value = this.inspectByte();\n this.position++;\n return value;\n },\n readBytes(length2, size6) {\n this.assertReadLimit();\n this._touch();\n const value = this.inspectBytes(length2);\n this.position += size6 ?? length2;\n return value;\n },\n readUint8() {\n this.assertReadLimit();\n this._touch();\n const value = this.inspectUint8();\n this.position += 1;\n return value;\n },\n readUint16() {\n this.assertReadLimit();\n this._touch();\n const value = this.inspectUint16();\n this.position += 2;\n return value;\n },\n readUint24() {\n this.assertReadLimit();\n this._touch();\n const value = this.inspectUint24();\n this.position += 3;\n return value;\n },\n readUint32() {\n this.assertReadLimit();\n this._touch();\n const value = this.inspectUint32();\n this.position += 4;\n return value;\n },\n get remaining() {\n return this.bytes.length - this.position;\n },\n setPosition(position) {\n const oldPosition = this.position;\n this.assertPosition(position);\n this.position = position;\n return () => this.position = oldPosition;\n },\n _touch() {\n if (this.recursiveReadLimit === Number.POSITIVE_INFINITY)\n return;\n const count = this.getReadCount();\n this.positionReadCount.set(this.position, count + 1);\n if (count > 0)\n this.recursiveReadCount++;\n }\n };\n NegativeOffsetError2 = class extends BaseError3 {\n constructor({ offset }) {\n super(`Offset \\`${offset}\\` cannot be negative.`);\n Object.defineProperty(this, \"name\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: \"Cursor.NegativeOffsetError\"\n });\n }\n };\n PositionOutOfBoundsError2 = class extends BaseError3 {\n constructor({ length: length2, position }) {\n super(`Position \\`${position}\\` is out of bounds (\\`0 < position < ${length2}\\`).`);\n Object.defineProperty(this, \"name\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: \"Cursor.PositionOutOfBoundsError\"\n });\n }\n };\n RecursiveReadLimitExceededError2 = class extends BaseError3 {\n constructor({ count, limit }) {\n super(`Recursive read limit of \\`${limit}\\` exceeded (recursive read count: \\`${count}\\`).`);\n Object.defineProperty(this, \"name\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: \"Cursor.RecursiveReadLimitExceededError\"\n });\n }\n };\n }\n });\n\n // ../../../node_modules/.pnpm/ox@0.9.6_typescript@5.8.3_zod@3.25.64/node_modules/ox/_esm/core/AbiParameters.js\n function decode(parameters, data, options = {}) {\n const { as = \"Array\", checksumAddress: checksumAddress2 = false } = options;\n const bytes = typeof data === \"string\" ? fromHex2(data) : data;\n const cursor = create(bytes);\n if (size2(bytes) === 0 && parameters.length > 0)\n throw new ZeroDataError();\n if (size2(bytes) && size2(bytes) < 32)\n throw new DataSizeTooSmallError({\n data: typeof data === \"string\" ? data : fromBytes(data),\n parameters,\n size: size2(bytes)\n });\n let consumed = 0;\n const values = as === \"Array\" ? [] : {};\n for (let i3 = 0; i3 < parameters.length; ++i3) {\n const param = parameters[i3];\n cursor.setPosition(consumed);\n const [data2, consumed_] = decodeParameter2(cursor, param, {\n checksumAddress: checksumAddress2,\n staticPosition: 0\n });\n consumed += consumed_;\n if (as === \"Array\")\n values.push(data2);\n else\n values[param.name ?? i3] = data2;\n }\n return values;\n }\n function encode3(parameters, values, options) {\n const { checksumAddress: checksumAddress2 = false } = options ?? {};\n if (parameters.length !== values.length)\n throw new LengthMismatchError({\n expectedLength: parameters.length,\n givenLength: values.length\n });\n const preparedParameters = prepareParameters({\n checksumAddress: checksumAddress2,\n parameters,\n values\n });\n const data = encode2(preparedParameters);\n if (data.length === 0)\n return \"0x\";\n return data;\n }\n function encodePacked2(types, values) {\n if (types.length !== values.length)\n throw new LengthMismatchError({\n expectedLength: types.length,\n givenLength: values.length\n });\n const data = [];\n for (let i3 = 0; i3 < types.length; i3++) {\n const type = types[i3];\n const value = values[i3];\n data.push(encodePacked2.encode(type, value));\n }\n return concat2(...data);\n }\n function from5(parameters) {\n if (Array.isArray(parameters) && typeof parameters[0] === \"string\")\n return parseAbiParameters(parameters);\n if (typeof parameters === \"string\")\n return parseAbiParameters(parameters);\n return parameters;\n }\n var DataSizeTooSmallError, ZeroDataError, ArrayLengthMismatchError, BytesSizeMismatchError2, LengthMismatchError, InvalidArrayError2, InvalidTypeError;\n var init_AbiParameters = __esm({\n \"../../../node_modules/.pnpm/ox@0.9.6_typescript@5.8.3_zod@3.25.64/node_modules/ox/_esm/core/AbiParameters.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_exports();\n init_Address();\n init_Bytes();\n init_Errors();\n init_Hex();\n init_abiParameters();\n init_cursor3();\n init_Solidity();\n (function(encodePacked3) {\n function encode6(type, value, isArray = false) {\n if (type === \"address\") {\n const address = value;\n assert5(address);\n return padLeft(address.toLowerCase(), isArray ? 32 : 0);\n }\n if (type === \"string\")\n return fromString2(value);\n if (type === \"bytes\")\n return value;\n if (type === \"bool\")\n return padLeft(fromBoolean(value), isArray ? 32 : 1);\n const intMatch = type.match(integerRegex3);\n if (intMatch) {\n const [_type, baseType, bits = \"256\"] = intMatch;\n const size6 = Number.parseInt(bits, 10) / 8;\n return fromNumber(value, {\n size: isArray ? 32 : size6,\n signed: baseType === \"int\"\n });\n }\n const bytesMatch = type.match(bytesRegex3);\n if (bytesMatch) {\n const [_type, size6] = bytesMatch;\n if (Number.parseInt(size6, 10) !== (value.length - 2) / 2)\n throw new BytesSizeMismatchError2({\n expectedSize: Number.parseInt(size6, 10),\n value\n });\n return padRight(value, isArray ? 32 : 0);\n }\n const arrayMatch = type.match(arrayRegex2);\n if (arrayMatch && Array.isArray(value)) {\n const [_type, childType] = arrayMatch;\n const data = [];\n for (let i3 = 0; i3 < value.length; i3++) {\n data.push(encode6(childType, value[i3], true));\n }\n if (data.length === 0)\n return \"0x\";\n return concat2(...data);\n }\n throw new InvalidTypeError(type);\n }\n encodePacked3.encode = encode6;\n })(encodePacked2 || (encodePacked2 = {}));\n DataSizeTooSmallError = class extends BaseError3 {\n constructor({ data, parameters, size: size6 }) {\n super(`Data size of ${size6} bytes is too small for given parameters.`, {\n metaMessages: [\n `Params: (${formatAbiParameters(parameters)})`,\n `Data: ${data} (${size6} bytes)`\n ]\n });\n Object.defineProperty(this, \"name\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: \"AbiParameters.DataSizeTooSmallError\"\n });\n }\n };\n ZeroDataError = class extends BaseError3 {\n constructor() {\n super('Cannot decode zero data (\"0x\") with ABI parameters.');\n Object.defineProperty(this, \"name\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: \"AbiParameters.ZeroDataError\"\n });\n }\n };\n ArrayLengthMismatchError = class extends BaseError3 {\n constructor({ expectedLength, givenLength, type }) {\n super(`Array length mismatch for type \\`${type}\\`. Expected: \\`${expectedLength}\\`. Given: \\`${givenLength}\\`.`);\n Object.defineProperty(this, \"name\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: \"AbiParameters.ArrayLengthMismatchError\"\n });\n }\n };\n BytesSizeMismatchError2 = class extends BaseError3 {\n constructor({ expectedSize, value }) {\n super(`Size of bytes \"${value}\" (bytes${size3(value)}) does not match expected size (bytes${expectedSize}).`);\n Object.defineProperty(this, \"name\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: \"AbiParameters.BytesSizeMismatchError\"\n });\n }\n };\n LengthMismatchError = class extends BaseError3 {\n constructor({ expectedLength, givenLength }) {\n super([\n \"ABI encoding parameters/values length mismatch.\",\n `Expected length (parameters): ${expectedLength}`,\n `Given length (values): ${givenLength}`\n ].join(\"\\n\"));\n Object.defineProperty(this, \"name\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: \"AbiParameters.LengthMismatchError\"\n });\n }\n };\n InvalidArrayError2 = class extends BaseError3 {\n constructor(value) {\n super(`Value \\`${value}\\` is not a valid array.`);\n Object.defineProperty(this, \"name\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: \"AbiParameters.InvalidArrayError\"\n });\n }\n };\n InvalidTypeError = class extends BaseError3 {\n constructor(type) {\n super(`Type \\`${type}\\` is not a valid ABI Type.`);\n Object.defineProperty(this, \"name\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: \"AbiParameters.InvalidTypeError\"\n });\n }\n };\n }\n });\n\n // ../../../node_modules/.pnpm/ox@0.9.6_typescript@5.8.3_zod@3.25.64/node_modules/ox/_esm/core/Rlp.js\n function from6(value, options) {\n const { as } = options;\n const encodable = getEncodable2(value);\n const cursor = create(new Uint8Array(encodable.length));\n encodable.encode(cursor);\n if (as === \"Hex\")\n return fromBytes(cursor.bytes);\n return cursor.bytes;\n }\n function fromHex4(hex, options = {}) {\n const { as = \"Hex\" } = options;\n return from6(hex, { as });\n }\n function getEncodable2(bytes) {\n if (Array.isArray(bytes))\n return getEncodableList2(bytes.map((x4) => getEncodable2(x4)));\n return getEncodableBytes2(bytes);\n }\n function getEncodableList2(list) {\n const bodyLength = list.reduce((acc, x4) => acc + x4.length, 0);\n const sizeOfBodyLength = getSizeOfLength2(bodyLength);\n const length2 = (() => {\n if (bodyLength <= 55)\n return 1 + bodyLength;\n return 1 + sizeOfBodyLength + bodyLength;\n })();\n return {\n length: length2,\n encode(cursor) {\n if (bodyLength <= 55) {\n cursor.pushByte(192 + bodyLength);\n } else {\n cursor.pushByte(192 + 55 + sizeOfBodyLength);\n if (sizeOfBodyLength === 1)\n cursor.pushUint8(bodyLength);\n else if (sizeOfBodyLength === 2)\n cursor.pushUint16(bodyLength);\n else if (sizeOfBodyLength === 3)\n cursor.pushUint24(bodyLength);\n else\n cursor.pushUint32(bodyLength);\n }\n for (const { encode: encode6 } of list) {\n encode6(cursor);\n }\n }\n };\n }\n function getEncodableBytes2(bytesOrHex) {\n const bytes = typeof bytesOrHex === \"string\" ? fromHex2(bytesOrHex) : bytesOrHex;\n const sizeOfBytesLength = getSizeOfLength2(bytes.length);\n const length2 = (() => {\n if (bytes.length === 1 && bytes[0] < 128)\n return 1;\n if (bytes.length <= 55)\n return 1 + bytes.length;\n return 1 + sizeOfBytesLength + bytes.length;\n })();\n return {\n length: length2,\n encode(cursor) {\n if (bytes.length === 1 && bytes[0] < 128) {\n cursor.pushBytes(bytes);\n } else if (bytes.length <= 55) {\n cursor.pushByte(128 + bytes.length);\n cursor.pushBytes(bytes);\n } else {\n cursor.pushByte(128 + 55 + sizeOfBytesLength);\n if (sizeOfBytesLength === 1)\n cursor.pushUint8(bytes.length);\n else if (sizeOfBytesLength === 2)\n cursor.pushUint16(bytes.length);\n else if (sizeOfBytesLength === 3)\n cursor.pushUint24(bytes.length);\n else\n cursor.pushUint32(bytes.length);\n cursor.pushBytes(bytes);\n }\n }\n };\n }\n function getSizeOfLength2(length2) {\n if (length2 < 2 ** 8)\n return 1;\n if (length2 < 2 ** 16)\n return 2;\n if (length2 < 2 ** 24)\n return 3;\n if (length2 < 2 ** 32)\n return 4;\n throw new BaseError3(\"Length is too large.\");\n }\n var init_Rlp = __esm({\n \"../../../node_modules/.pnpm/ox@0.9.6_typescript@5.8.3_zod@3.25.64/node_modules/ox/_esm/core/Rlp.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_Bytes();\n init_Errors();\n init_Hex();\n init_cursor3();\n }\n });\n\n // ../../../node_modules/.pnpm/ox@0.9.6_typescript@5.8.3_zod@3.25.64/node_modules/ox/_esm/core/Signature.js\n function assert6(signature, options = {}) {\n const { recovered } = options;\n if (typeof signature.r === \"undefined\")\n throw new MissingPropertiesError({ signature });\n if (typeof signature.s === \"undefined\")\n throw new MissingPropertiesError({ signature });\n if (recovered && typeof signature.yParity === \"undefined\")\n throw new MissingPropertiesError({ signature });\n if (signature.r < 0n || signature.r > maxUint2562)\n throw new InvalidRError({ value: signature.r });\n if (signature.s < 0n || signature.s > maxUint2562)\n throw new InvalidSError({ value: signature.s });\n if (typeof signature.yParity === \"number\" && signature.yParity !== 0 && signature.yParity !== 1)\n throw new InvalidYParityError({ value: signature.yParity });\n }\n function fromBytes3(signature) {\n return fromHex5(fromBytes(signature));\n }\n function fromHex5(signature) {\n if (signature.length !== 130 && signature.length !== 132)\n throw new InvalidSerializedSizeError2({ signature });\n const r2 = BigInt(slice3(signature, 0, 32));\n const s4 = BigInt(slice3(signature, 32, 64));\n const yParity = (() => {\n const yParity2 = Number(`0x${signature.slice(130)}`);\n if (Number.isNaN(yParity2))\n return void 0;\n try {\n return vToYParity(yParity2);\n } catch {\n throw new InvalidYParityError({ value: yParity2 });\n }\n })();\n if (typeof yParity === \"undefined\")\n return {\n r: r2,\n s: s4\n };\n return {\n r: r2,\n s: s4,\n yParity\n };\n }\n function extract2(value) {\n if (typeof value.r === \"undefined\")\n return void 0;\n if (typeof value.s === \"undefined\")\n return void 0;\n return from7(value);\n }\n function from7(signature) {\n const signature_ = (() => {\n if (typeof signature === \"string\")\n return fromHex5(signature);\n if (signature instanceof Uint8Array)\n return fromBytes3(signature);\n if (typeof signature.r === \"string\")\n return fromRpc2(signature);\n if (signature.v)\n return fromLegacy(signature);\n return {\n r: signature.r,\n s: signature.s,\n ...typeof signature.yParity !== \"undefined\" ? { yParity: signature.yParity } : {}\n };\n })();\n assert6(signature_);\n return signature_;\n }\n function fromLegacy(signature) {\n return {\n r: signature.r,\n s: signature.s,\n yParity: vToYParity(signature.v)\n };\n }\n function fromRpc2(signature) {\n const yParity = (() => {\n const v2 = signature.v ? Number(signature.v) : void 0;\n let yParity2 = signature.yParity ? Number(signature.yParity) : void 0;\n if (typeof v2 === \"number\" && typeof yParity2 !== \"number\")\n yParity2 = vToYParity(v2);\n if (typeof yParity2 !== \"number\")\n throw new InvalidYParityError({ value: signature.yParity });\n return yParity2;\n })();\n return {\n r: BigInt(signature.r),\n s: BigInt(signature.s),\n yParity\n };\n }\n function toTuple(signature) {\n const { r: r2, s: s4, yParity } = signature;\n return [\n yParity ? \"0x01\" : \"0x\",\n r2 === 0n ? \"0x\" : trimLeft2(fromNumber(r2)),\n s4 === 0n ? \"0x\" : trimLeft2(fromNumber(s4))\n ];\n }\n function vToYParity(v2) {\n if (v2 === 0 || v2 === 27)\n return 0;\n if (v2 === 1 || v2 === 28)\n return 1;\n if (v2 >= 35)\n return v2 % 2 === 0 ? 1 : 0;\n throw new InvalidVError({ value: v2 });\n }\n var InvalidSerializedSizeError2, MissingPropertiesError, InvalidRError, InvalidSError, InvalidYParityError, InvalidVError;\n var init_Signature = __esm({\n \"../../../node_modules/.pnpm/ox@0.9.6_typescript@5.8.3_zod@3.25.64/node_modules/ox/_esm/core/Signature.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_Errors();\n init_Hex();\n init_Json();\n init_Solidity();\n InvalidSerializedSizeError2 = class extends BaseError3 {\n constructor({ signature }) {\n super(`Value \\`${signature}\\` is an invalid signature size.`, {\n metaMessages: [\n \"Expected: 64 bytes or 65 bytes.\",\n `Received ${size3(from2(signature))} bytes.`\n ]\n });\n Object.defineProperty(this, \"name\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: \"Signature.InvalidSerializedSizeError\"\n });\n }\n };\n MissingPropertiesError = class extends BaseError3 {\n constructor({ signature }) {\n super(`Signature \\`${stringify2(signature)}\\` is missing either an \\`r\\`, \\`s\\`, or \\`yParity\\` property.`);\n Object.defineProperty(this, \"name\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: \"Signature.MissingPropertiesError\"\n });\n }\n };\n InvalidRError = class extends BaseError3 {\n constructor({ value }) {\n super(`Value \\`${value}\\` is an invalid r value. r must be a positive integer less than 2^256.`);\n Object.defineProperty(this, \"name\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: \"Signature.InvalidRError\"\n });\n }\n };\n InvalidSError = class extends BaseError3 {\n constructor({ value }) {\n super(`Value \\`${value}\\` is an invalid s value. s must be a positive integer less than 2^256.`);\n Object.defineProperty(this, \"name\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: \"Signature.InvalidSError\"\n });\n }\n };\n InvalidYParityError = class extends BaseError3 {\n constructor({ value }) {\n super(`Value \\`${value}\\` is an invalid y-parity value. Y-parity must be 0 or 1.`);\n Object.defineProperty(this, \"name\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: \"Signature.InvalidYParityError\"\n });\n }\n };\n InvalidVError = class extends BaseError3 {\n constructor({ value }) {\n super(`Value \\`${value}\\` is an invalid v value. v must be 27, 28 or >=35.`);\n Object.defineProperty(this, \"name\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: \"Signature.InvalidVError\"\n });\n }\n };\n }\n });\n\n // ../../../node_modules/.pnpm/ox@0.9.6_typescript@5.8.3_zod@3.25.64/node_modules/ox/_esm/core/Authorization.js\n function from8(authorization, options = {}) {\n if (typeof authorization.chainId === \"string\")\n return fromRpc3(authorization);\n return { ...authorization, ...options.signature };\n }\n function fromRpc3(authorization) {\n const { address, chainId, nonce } = authorization;\n const signature = extract2(authorization);\n return {\n address,\n chainId: Number(chainId),\n nonce: BigInt(nonce),\n ...signature\n };\n }\n function getSignPayload(authorization) {\n return hash2(authorization, { presign: true });\n }\n function hash2(authorization, options = {}) {\n const { presign } = options;\n return keccak2562(concat2(\"0x05\", fromHex4(toTuple2(presign ? {\n address: authorization.address,\n chainId: authorization.chainId,\n nonce: authorization.nonce\n } : authorization))));\n }\n function toTuple2(authorization) {\n const { address, chainId, nonce } = authorization;\n const signature = extract2(authorization);\n return [\n chainId ? fromNumber(chainId) : \"0x\",\n address,\n nonce ? fromNumber(nonce) : \"0x\",\n ...signature ? toTuple(signature) : []\n ];\n }\n var init_Authorization = __esm({\n \"../../../node_modules/.pnpm/ox@0.9.6_typescript@5.8.3_zod@3.25.64/node_modules/ox/_esm/core/Authorization.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_Hash();\n init_Hex();\n init_Rlp();\n init_Signature();\n }\n });\n\n // ../../../node_modules/.pnpm/ox@0.9.6_typescript@5.8.3_zod@3.25.64/node_modules/ox/_esm/core/Secp256k1.js\n function recoverAddress2(options) {\n return fromPublicKey(recoverPublicKey2(options));\n }\n function recoverPublicKey2(options) {\n const { payload, signature } = options;\n const { r: r2, s: s4, yParity } = signature;\n const signature_ = new secp256k1.Signature(BigInt(r2), BigInt(s4)).addRecoveryBit(yParity);\n const point = signature_.recoverPublicKey(from2(payload).substring(2));\n return from3(point);\n }\n var init_Secp256k1 = __esm({\n \"../../../node_modules/.pnpm/ox@0.9.6_typescript@5.8.3_zod@3.25.64/node_modules/ox/_esm/core/Secp256k1.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_secp256k1();\n init_Address();\n init_Hex();\n init_PublicKey();\n }\n });\n\n // ../../../node_modules/.pnpm/ox@0.9.6_typescript@5.8.3_zod@3.25.64/node_modules/ox/_esm/erc8010/SignatureErc8010.js\n var SignatureErc8010_exports = {};\n __export(SignatureErc8010_exports, {\n InvalidWrappedSignatureError: () => InvalidWrappedSignatureError,\n assert: () => assert7,\n from: () => from9,\n magicBytes: () => magicBytes,\n suffixParameters: () => suffixParameters,\n unwrap: () => unwrap,\n validate: () => validate4,\n wrap: () => wrap\n });\n function assert7(value) {\n if (typeof value === \"string\") {\n if (slice3(value, -32) !== magicBytes)\n throw new InvalidWrappedSignatureError(value);\n } else\n assert6(value.authorization);\n }\n function from9(value) {\n if (typeof value === \"string\")\n return unwrap(value);\n return value;\n }\n function unwrap(wrapped) {\n assert7(wrapped);\n const suffixLength = toNumber(slice3(wrapped, -64, -32));\n const suffix = slice3(wrapped, -suffixLength - 64, -64);\n const signature = slice3(wrapped, 0, -suffixLength - 64);\n const [auth, to, data] = decode(suffixParameters, suffix);\n const authorization = from8({\n address: auth.delegation,\n chainId: Number(auth.chainId),\n nonce: auth.nonce,\n yParity: auth.yParity,\n r: auth.r,\n s: auth.s\n });\n return {\n authorization,\n signature,\n ...data && data !== \"0x\" ? { data, to } : {}\n };\n }\n function wrap(value) {\n const { data, signature } = value;\n assert7(value);\n const self2 = recoverAddress2({\n payload: getSignPayload(value.authorization),\n signature: from7(value.authorization)\n });\n const suffix = encode3(suffixParameters, [\n {\n ...value.authorization,\n delegation: value.authorization.address,\n chainId: BigInt(value.authorization.chainId)\n },\n value.to ?? self2,\n data ?? \"0x\"\n ]);\n const suffixLength = fromNumber(size3(suffix), { size: 32 });\n return concat2(signature, suffix, suffixLength, magicBytes);\n }\n function validate4(value) {\n try {\n assert7(value);\n return true;\n } catch {\n return false;\n }\n }\n var magicBytes, suffixParameters, InvalidWrappedSignatureError;\n var init_SignatureErc8010 = __esm({\n \"../../../node_modules/.pnpm/ox@0.9.6_typescript@5.8.3_zod@3.25.64/node_modules/ox/_esm/erc8010/SignatureErc8010.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_AbiParameters();\n init_Authorization();\n init_Errors();\n init_Hex();\n init_Secp256k1();\n init_Signature();\n magicBytes = \"0x8010801080108010801080108010801080108010801080108010801080108010\";\n suffixParameters = from5(\"(uint256 chainId, address delegation, uint256 nonce, uint8 yParity, uint256 r, uint256 s), address to, bytes data\");\n InvalidWrappedSignatureError = class extends BaseError3 {\n constructor(wrapped) {\n super(`Value \\`${wrapped}\\` is an invalid ERC-8010 wrapped signature.`);\n Object.defineProperty(this, \"name\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: \"SignatureErc8010.InvalidWrappedSignatureError\"\n });\n }\n };\n }\n });\n\n // ../../../node_modules/.pnpm/ox@0.9.6_typescript@5.8.3_zod@3.25.64/node_modules/ox/_esm/erc8010/index.js\n var init_erc8010 = __esm({\n \"../../../node_modules/.pnpm/ox@0.9.6_typescript@5.8.3_zod@3.25.64/node_modules/ox/_esm/erc8010/index.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_SignatureErc8010();\n }\n });\n\n // ../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/utils/index.js\n var init_utils7 = __esm({\n \"../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/utils/index.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_fromHex();\n init_toHex();\n }\n });\n\n // ../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/utils/formatters/proof.js\n function formatStorageProof(storageProof) {\n return storageProof.map((proof) => ({\n ...proof,\n value: BigInt(proof.value)\n }));\n }\n function formatProof(proof) {\n return {\n ...proof,\n balance: proof.balance ? BigInt(proof.balance) : void 0,\n nonce: proof.nonce ? hexToNumber(proof.nonce) : void 0,\n storageProof: proof.storageProof ? formatStorageProof(proof.storageProof) : void 0\n };\n }\n var init_proof = __esm({\n \"../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/utils/formatters/proof.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_utils7();\n }\n });\n\n // ../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/actions/public/getProof.js\n async function getProof(client, { address, blockNumber, blockTag: blockTag_, storageKeys }) {\n const blockTag = blockTag_ ?? \"latest\";\n const blockNumberHex = blockNumber !== void 0 ? numberToHex(blockNumber) : void 0;\n const proof = await client.request({\n method: \"eth_getProof\",\n params: [address, storageKeys, blockNumberHex || blockTag]\n });\n return formatProof(proof);\n }\n var init_getProof = __esm({\n \"../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/actions/public/getProof.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_toHex();\n init_proof();\n }\n });\n\n // ../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/actions/public/getStorageAt.js\n async function getStorageAt(client, { address, blockNumber, blockTag = \"latest\", slot }) {\n const blockNumberHex = blockNumber !== void 0 ? numberToHex(blockNumber) : void 0;\n const data = await client.request({\n method: \"eth_getStorageAt\",\n params: [address, slot, blockNumberHex || blockTag]\n });\n return data;\n }\n var init_getStorageAt = __esm({\n \"../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/actions/public/getStorageAt.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_toHex();\n }\n });\n\n // ../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/actions/public/getTransaction.js\n async function getTransaction(client, { blockHash, blockNumber, blockTag: blockTag_, hash: hash3, index: index2 }) {\n const blockTag = blockTag_ || \"latest\";\n const blockNumberHex = blockNumber !== void 0 ? numberToHex(blockNumber) : void 0;\n let transaction = null;\n if (hash3) {\n transaction = await client.request({\n method: \"eth_getTransactionByHash\",\n params: [hash3]\n }, { dedupe: true });\n } else if (blockHash) {\n transaction = await client.request({\n method: \"eth_getTransactionByBlockHashAndIndex\",\n params: [blockHash, numberToHex(index2)]\n }, { dedupe: true });\n } else if (blockNumberHex || blockTag) {\n transaction = await client.request({\n method: \"eth_getTransactionByBlockNumberAndIndex\",\n params: [blockNumberHex || blockTag, numberToHex(index2)]\n }, { dedupe: Boolean(blockNumberHex) });\n }\n if (!transaction)\n throw new TransactionNotFoundError({\n blockHash,\n blockNumber,\n blockTag,\n hash: hash3,\n index: index2\n });\n const format = client.chain?.formatters?.transaction?.format || formatTransaction;\n return format(transaction, \"getTransaction\");\n }\n var init_getTransaction = __esm({\n \"../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/actions/public/getTransaction.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_transaction();\n init_toHex();\n init_transaction2();\n }\n });\n\n // ../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/actions/public/getTransactionConfirmations.js\n async function getTransactionConfirmations(client, { hash: hash3, transactionReceipt }) {\n const [blockNumber, transaction] = await Promise.all([\n getAction(client, getBlockNumber, \"getBlockNumber\")({}),\n hash3 ? getAction(client, getTransaction, \"getTransaction\")({ hash: hash3 }) : void 0\n ]);\n const transactionBlockNumber = transactionReceipt?.blockNumber || transaction?.blockNumber;\n if (!transactionBlockNumber)\n return 0n;\n return blockNumber - transactionBlockNumber + 1n;\n }\n var init_getTransactionConfirmations = __esm({\n \"../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/actions/public/getTransactionConfirmations.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_getAction();\n init_getBlockNumber();\n init_getTransaction();\n }\n });\n\n // ../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/actions/public/getTransactionReceipt.js\n async function getTransactionReceipt(client, { hash: hash3 }) {\n const receipt = await client.request({\n method: \"eth_getTransactionReceipt\",\n params: [hash3]\n }, { dedupe: true });\n if (!receipt)\n throw new TransactionReceiptNotFoundError({ hash: hash3 });\n const format = client.chain?.formatters?.transactionReceipt?.format || formatTransactionReceipt;\n return format(receipt, \"getTransactionReceipt\");\n }\n var init_getTransactionReceipt = __esm({\n \"../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/actions/public/getTransactionReceipt.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_transaction();\n init_transactionReceipt();\n }\n });\n\n // ../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/actions/public/multicall.js\n async function multicall(client, parameters) {\n const { account, authorizationList, allowFailure = true, blockNumber, blockOverrides, blockTag, stateOverride } = parameters;\n const contracts2 = parameters.contracts;\n const { batchSize = parameters.batchSize ?? 1024, deployless = parameters.deployless ?? false } = typeof client.batch?.multicall === \"object\" ? client.batch.multicall : {};\n const multicallAddress = (() => {\n if (parameters.multicallAddress)\n return parameters.multicallAddress;\n if (deployless)\n return null;\n if (client.chain) {\n return getChainContractAddress({\n blockNumber,\n chain: client.chain,\n contract: \"multicall3\"\n });\n }\n throw new Error(\"client chain not configured. multicallAddress is required.\");\n })();\n const chunkedCalls = [[]];\n let currentChunk = 0;\n let currentChunkSize = 0;\n for (let i3 = 0; i3 < contracts2.length; i3++) {\n const { abi: abi2, address, args, functionName } = contracts2[i3];\n try {\n const callData = encodeFunctionData({ abi: abi2, args, functionName });\n currentChunkSize += (callData.length - 2) / 2;\n if (\n // Check if batching is enabled.\n batchSize > 0 && // Check if the current size of the batch exceeds the size limit.\n currentChunkSize > batchSize && // Check if the current chunk is not already empty.\n chunkedCalls[currentChunk].length > 0\n ) {\n currentChunk++;\n currentChunkSize = (callData.length - 2) / 2;\n chunkedCalls[currentChunk] = [];\n }\n chunkedCalls[currentChunk] = [\n ...chunkedCalls[currentChunk],\n {\n allowFailure: true,\n callData,\n target: address\n }\n ];\n } catch (err) {\n const error = getContractError(err, {\n abi: abi2,\n address,\n args,\n docsPath: \"/docs/contract/multicall\",\n functionName,\n sender: account\n });\n if (!allowFailure)\n throw error;\n chunkedCalls[currentChunk] = [\n ...chunkedCalls[currentChunk],\n {\n allowFailure: true,\n callData: \"0x\",\n target: address\n }\n ];\n }\n }\n const aggregate3Results = await Promise.allSettled(chunkedCalls.map((calls) => getAction(client, readContract, \"readContract\")({\n ...multicallAddress === null ? { code: multicall3Bytecode } : { address: multicallAddress },\n abi: multicall3Abi,\n account,\n args: [calls],\n authorizationList,\n blockNumber,\n blockOverrides,\n blockTag,\n functionName: \"aggregate3\",\n stateOverride\n })));\n const results = [];\n for (let i3 = 0; i3 < aggregate3Results.length; i3++) {\n const result = aggregate3Results[i3];\n if (result.status === \"rejected\") {\n if (!allowFailure)\n throw result.reason;\n for (let j2 = 0; j2 < chunkedCalls[i3].length; j2++) {\n results.push({\n status: \"failure\",\n error: result.reason,\n result: void 0\n });\n }\n continue;\n }\n const aggregate3Result = result.value;\n for (let j2 = 0; j2 < aggregate3Result.length; j2++) {\n const { returnData, success } = aggregate3Result[j2];\n const { callData } = chunkedCalls[i3][j2];\n const { abi: abi2, address, functionName, args } = contracts2[results.length];\n try {\n if (callData === \"0x\")\n throw new AbiDecodingZeroDataError();\n if (!success)\n throw new RawContractError({ data: returnData });\n const result2 = decodeFunctionResult({\n abi: abi2,\n args,\n data: returnData,\n functionName\n });\n results.push(allowFailure ? { result: result2, status: \"success\" } : result2);\n } catch (err) {\n const error = getContractError(err, {\n abi: abi2,\n address,\n args,\n docsPath: \"/docs/contract/multicall\",\n functionName\n });\n if (!allowFailure)\n throw error;\n results.push({ error, result: void 0, status: \"failure\" });\n }\n }\n }\n if (results.length !== contracts2.length)\n throw new BaseError2(\"multicall results mismatch\");\n return results;\n }\n var init_multicall = __esm({\n \"../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/actions/public/multicall.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_abis();\n init_contracts();\n init_abi();\n init_base();\n init_contract();\n init_decodeFunctionResult();\n init_encodeFunctionData();\n init_getChainContractAddress();\n init_getContractError();\n init_getAction();\n init_readContract();\n }\n });\n\n // ../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/actions/public/simulateBlocks.js\n async function simulateBlocks(client, parameters) {\n const { blockNumber, blockTag = client.experimental_blockTag ?? \"latest\", blocks, returnFullTransactions, traceTransfers, validation } = parameters;\n try {\n const blockStateCalls = [];\n for (const block2 of blocks) {\n const blockOverrides = block2.blockOverrides ? toRpc2(block2.blockOverrides) : void 0;\n const calls = block2.calls.map((call_) => {\n const call2 = call_;\n const account = call2.account ? parseAccount(call2.account) : void 0;\n const data = call2.abi ? encodeFunctionData(call2) : call2.data;\n const request = {\n ...call2,\n account,\n data: call2.dataSuffix ? concat([data || \"0x\", call2.dataSuffix]) : data,\n from: call2.from ?? account?.address\n };\n assertRequest(request);\n return formatTransactionRequest(request);\n });\n const stateOverrides = block2.stateOverrides ? serializeStateOverride(block2.stateOverrides) : void 0;\n blockStateCalls.push({\n blockOverrides,\n calls,\n stateOverrides\n });\n }\n const blockNumberHex = typeof blockNumber === \"bigint\" ? numberToHex(blockNumber) : void 0;\n const block = blockNumberHex || blockTag;\n const result = await client.request({\n method: \"eth_simulateV1\",\n params: [\n { blockStateCalls, returnFullTransactions, traceTransfers, validation },\n block\n ]\n });\n return result.map((block2, i3) => ({\n ...formatBlock(block2),\n calls: block2.calls.map((call2, j2) => {\n const { abi: abi2, args, functionName, to } = blocks[i3].calls[j2];\n const data = call2.error?.data ?? call2.returnData;\n const gasUsed = BigInt(call2.gasUsed);\n const logs = call2.logs?.map((log) => formatLog(log));\n const status = call2.status === \"0x1\" ? \"success\" : \"failure\";\n const result2 = abi2 && status === \"success\" && data !== \"0x\" ? decodeFunctionResult({\n abi: abi2,\n data,\n functionName\n }) : null;\n const error = (() => {\n if (status === \"success\")\n return void 0;\n let error2;\n if (call2.error?.data === \"0x\")\n error2 = new AbiDecodingZeroDataError();\n else if (call2.error)\n error2 = new RawContractError(call2.error);\n if (!error2)\n return void 0;\n return getContractError(error2, {\n abi: abi2 ?? [],\n address: to ?? \"0x\",\n args,\n functionName: functionName ?? \"\"\n });\n })();\n return {\n data,\n gasUsed,\n logs,\n status,\n ...status === \"success\" ? {\n result: result2\n } : {\n error\n }\n };\n })\n }));\n } catch (e3) {\n const cause = e3;\n const error = getNodeError(cause, {});\n if (error instanceof UnknownNodeError)\n throw cause;\n throw error;\n }\n }\n var init_simulateBlocks = __esm({\n \"../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/actions/public/simulateBlocks.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_BlockOverrides();\n init_parseAccount();\n init_abi();\n init_contract();\n init_node();\n init_decodeFunctionResult();\n init_encodeFunctionData();\n init_concat();\n init_toHex();\n init_getContractError();\n init_getNodeError();\n init_block2();\n init_log2();\n init_transactionRequest();\n init_stateOverride2();\n init_assertRequest();\n }\n });\n\n // ../../../node_modules/.pnpm/ox@0.9.6_typescript@5.8.3_zod@3.25.64/node_modules/ox/_esm/core/internal/abiItem.js\n function normalizeSignature2(signature) {\n let active = true;\n let current = \"\";\n let level = 0;\n let result = \"\";\n let valid = false;\n for (let i3 = 0; i3 < signature.length; i3++) {\n const char = signature[i3];\n if ([\"(\", \")\", \",\"].includes(char))\n active = true;\n if (char === \"(\")\n level++;\n if (char === \")\")\n level--;\n if (!active)\n continue;\n if (level === 0) {\n if (char === \" \" && [\"event\", \"function\", \"error\", \"\"].includes(result))\n result = \"\";\n else {\n result += char;\n if (char === \")\") {\n valid = true;\n break;\n }\n }\n continue;\n }\n if (char === \" \") {\n if (signature[i3 - 1] !== \",\" && current !== \",\" && current !== \",(\") {\n current = \"\";\n active = false;\n }\n continue;\n }\n result += char;\n current += char;\n }\n if (!valid)\n throw new BaseError3(\"Unable to normalize signature.\");\n return result;\n }\n function isArgOfType2(arg, abiParameter) {\n const argType = typeof arg;\n const abiParameterType = abiParameter.type;\n switch (abiParameterType) {\n case \"address\":\n return validate3(arg, { strict: false });\n case \"bool\":\n return argType === \"boolean\";\n case \"function\":\n return argType === \"string\";\n case \"string\":\n return argType === \"string\";\n default: {\n if (abiParameterType === \"tuple\" && \"components\" in abiParameter)\n return Object.values(abiParameter.components).every((component, index2) => {\n return isArgOfType2(Object.values(arg)[index2], component);\n });\n if (/^u?int(8|16|24|32|40|48|56|64|72|80|88|96|104|112|120|128|136|144|152|160|168|176|184|192|200|208|216|224|232|240|248|256)?$/.test(abiParameterType))\n return argType === \"number\" || argType === \"bigint\";\n if (/^bytes([1-9]|1[0-9]|2[0-9]|3[0-2])?$/.test(abiParameterType))\n return argType === \"string\" || arg instanceof Uint8Array;\n if (/[a-z]+[1-9]{0,3}(\\[[0-9]{0,}\\])+$/.test(abiParameterType)) {\n return Array.isArray(arg) && arg.every((x4) => isArgOfType2(x4, {\n ...abiParameter,\n // Pop off `[]` or `[M]` from end of type\n type: abiParameterType.replace(/(\\[[0-9]{0,}\\])$/, \"\")\n }));\n }\n return false;\n }\n }\n }\n function getAmbiguousTypes2(sourceParameters, targetParameters, args) {\n for (const parameterIndex in sourceParameters) {\n const sourceParameter = sourceParameters[parameterIndex];\n const targetParameter = targetParameters[parameterIndex];\n if (sourceParameter.type === \"tuple\" && targetParameter.type === \"tuple\" && \"components\" in sourceParameter && \"components\" in targetParameter)\n return getAmbiguousTypes2(sourceParameter.components, targetParameter.components, args[parameterIndex]);\n const types = [sourceParameter.type, targetParameter.type];\n const ambiguous = (() => {\n if (types.includes(\"address\") && types.includes(\"bytes20\"))\n return true;\n if (types.includes(\"address\") && types.includes(\"string\"))\n return validate3(args[parameterIndex], {\n strict: false\n });\n if (types.includes(\"address\") && types.includes(\"bytes\"))\n return validate3(args[parameterIndex], {\n strict: false\n });\n return false;\n })();\n if (ambiguous)\n return types;\n }\n return;\n }\n var init_abiItem2 = __esm({\n \"../../../node_modules/.pnpm/ox@0.9.6_typescript@5.8.3_zod@3.25.64/node_modules/ox/_esm/core/internal/abiItem.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_Address();\n init_Errors();\n }\n });\n\n // ../../../node_modules/.pnpm/ox@0.9.6_typescript@5.8.3_zod@3.25.64/node_modules/ox/_esm/core/AbiItem.js\n function from10(abiItem, options = {}) {\n const { prepare = true } = options;\n const item = (() => {\n if (Array.isArray(abiItem))\n return parseAbiItem(abiItem);\n if (typeof abiItem === \"string\")\n return parseAbiItem(abiItem);\n return abiItem;\n })();\n return {\n ...item,\n ...prepare ? { hash: getSignatureHash(item) } : {}\n };\n }\n function fromAbi(abi2, name, options) {\n const { args = [], prepare = true } = options ?? {};\n const isSelector = validate2(name, { strict: false });\n const abiItems = abi2.filter((abiItem2) => {\n if (isSelector) {\n if (abiItem2.type === \"function\" || abiItem2.type === \"error\")\n return getSelector(abiItem2) === slice3(name, 0, 4);\n if (abiItem2.type === \"event\")\n return getSignatureHash(abiItem2) === name;\n return false;\n }\n return \"name\" in abiItem2 && abiItem2.name === name;\n });\n if (abiItems.length === 0)\n throw new NotFoundError({ name });\n if (abiItems.length === 1)\n return {\n ...abiItems[0],\n ...prepare ? { hash: getSignatureHash(abiItems[0]) } : {}\n };\n let matchedAbiItem;\n for (const abiItem2 of abiItems) {\n if (!(\"inputs\" in abiItem2))\n continue;\n if (!args || args.length === 0) {\n if (!abiItem2.inputs || abiItem2.inputs.length === 0)\n return {\n ...abiItem2,\n ...prepare ? { hash: getSignatureHash(abiItem2) } : {}\n };\n continue;\n }\n if (!abiItem2.inputs)\n continue;\n if (abiItem2.inputs.length === 0)\n continue;\n if (abiItem2.inputs.length !== args.length)\n continue;\n const matched = args.every((arg, index2) => {\n const abiParameter = \"inputs\" in abiItem2 && abiItem2.inputs[index2];\n if (!abiParameter)\n return false;\n return isArgOfType2(arg, abiParameter);\n });\n if (matched) {\n if (matchedAbiItem && \"inputs\" in matchedAbiItem && matchedAbiItem.inputs) {\n const ambiguousTypes = getAmbiguousTypes2(abiItem2.inputs, matchedAbiItem.inputs, args);\n if (ambiguousTypes)\n throw new AmbiguityError({\n abiItem: abiItem2,\n type: ambiguousTypes[0]\n }, {\n abiItem: matchedAbiItem,\n type: ambiguousTypes[1]\n });\n }\n matchedAbiItem = abiItem2;\n }\n }\n const abiItem = (() => {\n if (matchedAbiItem)\n return matchedAbiItem;\n const [abiItem2, ...overloads] = abiItems;\n return { ...abiItem2, overloads };\n })();\n if (!abiItem)\n throw new NotFoundError({ name });\n return {\n ...abiItem,\n ...prepare ? { hash: getSignatureHash(abiItem) } : {}\n };\n }\n function getSelector(...parameters) {\n const abiItem = (() => {\n if (Array.isArray(parameters[0])) {\n const [abi2, name] = parameters;\n return fromAbi(abi2, name);\n }\n return parameters[0];\n })();\n return slice3(getSignatureHash(abiItem), 0, 4);\n }\n function getSignature(...parameters) {\n const abiItem = (() => {\n if (Array.isArray(parameters[0])) {\n const [abi2, name] = parameters;\n return fromAbi(abi2, name);\n }\n return parameters[0];\n })();\n const signature = (() => {\n if (typeof abiItem === \"string\")\n return abiItem;\n return formatAbiItem(abiItem);\n })();\n return normalizeSignature2(signature);\n }\n function getSignatureHash(...parameters) {\n const abiItem = (() => {\n if (Array.isArray(parameters[0])) {\n const [abi2, name] = parameters;\n return fromAbi(abi2, name);\n }\n return parameters[0];\n })();\n if (typeof abiItem !== \"string\" && \"hash\" in abiItem && abiItem.hash)\n return abiItem.hash;\n return keccak2562(fromString2(getSignature(abiItem)));\n }\n var AmbiguityError, NotFoundError;\n var init_AbiItem = __esm({\n \"../../../node_modules/.pnpm/ox@0.9.6_typescript@5.8.3_zod@3.25.64/node_modules/ox/_esm/core/AbiItem.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_exports();\n init_Errors();\n init_Hash();\n init_Hex();\n init_abiItem2();\n AmbiguityError = class extends BaseError3 {\n constructor(x4, y6) {\n super(\"Found ambiguous types in overloaded ABI Items.\", {\n metaMessages: [\n // TODO: abitype to add support for signature-formatted ABI items.\n `\\`${x4.type}\\` in \\`${normalizeSignature2(formatAbiItem(x4.abiItem))}\\`, and`,\n `\\`${y6.type}\\` in \\`${normalizeSignature2(formatAbiItem(y6.abiItem))}\\``,\n \"\",\n \"These types encode differently and cannot be distinguished at runtime.\",\n \"Remove one of the ambiguous items in the ABI.\"\n ]\n });\n Object.defineProperty(this, \"name\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: \"AbiItem.AmbiguityError\"\n });\n }\n };\n NotFoundError = class extends BaseError3 {\n constructor({ name, data, type = \"item\" }) {\n const selector = (() => {\n if (name)\n return ` with name \"${name}\"`;\n if (data)\n return ` with data \"${data}\"`;\n return \"\";\n })();\n super(`ABI ${type}${selector} not found.`);\n Object.defineProperty(this, \"name\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: \"AbiItem.NotFoundError\"\n });\n }\n };\n }\n });\n\n // ../../../node_modules/.pnpm/ox@0.9.6_typescript@5.8.3_zod@3.25.64/node_modules/ox/_esm/core/AbiConstructor.js\n function encode4(...parameters) {\n const [abiConstructor, options] = (() => {\n if (Array.isArray(parameters[0])) {\n const [abi2, options2] = parameters;\n return [fromAbi2(abi2), options2];\n }\n return parameters;\n })();\n const { bytecode, args } = options;\n return concat2(bytecode, abiConstructor.inputs?.length && args?.length ? encode3(abiConstructor.inputs, args) : \"0x\");\n }\n function from11(abiConstructor) {\n return from10(abiConstructor);\n }\n function fromAbi2(abi2) {\n const item = abi2.find((item2) => item2.type === \"constructor\");\n if (!item)\n throw new NotFoundError({ name: \"constructor\" });\n return item;\n }\n var init_AbiConstructor = __esm({\n \"../../../node_modules/.pnpm/ox@0.9.6_typescript@5.8.3_zod@3.25.64/node_modules/ox/_esm/core/AbiConstructor.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_AbiItem();\n init_AbiParameters();\n init_Hex();\n }\n });\n\n // ../../../node_modules/.pnpm/ox@0.9.6_typescript@5.8.3_zod@3.25.64/node_modules/ox/_esm/core/AbiFunction.js\n function encodeData2(...parameters) {\n const [abiFunction, args = []] = (() => {\n if (Array.isArray(parameters[0])) {\n const [abi2, name, args3] = parameters;\n return [fromAbi3(abi2, name, { args: args3 }), args3];\n }\n const [abiFunction2, args2] = parameters;\n return [abiFunction2, args2];\n })();\n const { overloads } = abiFunction;\n const item = overloads ? fromAbi3([abiFunction, ...overloads], abiFunction.name, {\n args\n }) : abiFunction;\n const selector = getSelector2(item);\n const data = args.length > 0 ? encode3(item.inputs, args) : void 0;\n return data ? concat2(selector, data) : selector;\n }\n function from12(abiFunction, options = {}) {\n return from10(abiFunction, options);\n }\n function fromAbi3(abi2, name, options) {\n const item = fromAbi(abi2, name, options);\n if (item.type !== \"function\")\n throw new NotFoundError({ name, type: \"function\" });\n return item;\n }\n function getSelector2(abiItem) {\n return getSelector(abiItem);\n }\n var init_AbiFunction = __esm({\n \"../../../node_modules/.pnpm/ox@0.9.6_typescript@5.8.3_zod@3.25.64/node_modules/ox/_esm/core/AbiFunction.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_AbiItem();\n init_AbiParameters();\n init_Hex();\n }\n });\n\n // ../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/constants/address.js\n var ethAddress, zeroAddress;\n var init_address2 = __esm({\n \"../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/constants/address.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n ethAddress = \"0xeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee\";\n zeroAddress = \"0x0000000000000000000000000000000000000000\";\n }\n });\n\n // ../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/actions/public/simulateCalls.js\n async function simulateCalls(client, parameters) {\n const { blockNumber, blockTag, calls, stateOverrides, traceAssetChanges, traceTransfers, validation } = parameters;\n const account = parameters.account ? parseAccount(parameters.account) : void 0;\n if (traceAssetChanges && !account)\n throw new BaseError2(\"`account` is required when `traceAssetChanges` is true\");\n const getBalanceData = account ? encode4(from11(\"constructor(bytes, bytes)\"), {\n bytecode: deploylessCallViaBytecodeBytecode,\n args: [\n getBalanceCode,\n encodeData2(from12(\"function getBalance(address)\"), [account.address])\n ]\n }) : void 0;\n const assetAddresses = traceAssetChanges ? await Promise.all(parameters.calls.map(async (call2) => {\n if (!call2.data && !call2.abi)\n return;\n const { accessList } = await createAccessList(client, {\n account: account.address,\n ...call2,\n data: call2.abi ? encodeFunctionData(call2) : call2.data\n });\n return accessList.map(({ address, storageKeys }) => storageKeys.length > 0 ? address : null);\n })).then((x4) => x4.flat().filter(Boolean)) : [];\n const blocks = await simulateBlocks(client, {\n blockNumber,\n blockTag,\n blocks: [\n ...traceAssetChanges ? [\n // ETH pre balances\n {\n calls: [{ data: getBalanceData }],\n stateOverrides\n },\n // Asset pre balances\n {\n calls: assetAddresses.map((address, i3) => ({\n abi: [\n from12(\"function balanceOf(address) returns (uint256)\")\n ],\n functionName: \"balanceOf\",\n args: [account.address],\n to: address,\n from: zeroAddress,\n nonce: i3\n })),\n stateOverrides: [\n {\n address: zeroAddress,\n nonce: 0\n }\n ]\n }\n ] : [],\n {\n calls: [...calls, {}].map((call2) => ({\n ...call2,\n from: account?.address\n })),\n stateOverrides\n },\n ...traceAssetChanges ? [\n // ETH post balances\n {\n calls: [{ data: getBalanceData }]\n },\n // Asset post balances\n {\n calls: assetAddresses.map((address, i3) => ({\n abi: [\n from12(\"function balanceOf(address) returns (uint256)\")\n ],\n functionName: \"balanceOf\",\n args: [account.address],\n to: address,\n from: zeroAddress,\n nonce: i3\n })),\n stateOverrides: [\n {\n address: zeroAddress,\n nonce: 0\n }\n ]\n },\n // Decimals\n {\n calls: assetAddresses.map((address, i3) => ({\n to: address,\n abi: [\n from12(\"function decimals() returns (uint256)\")\n ],\n functionName: \"decimals\",\n from: zeroAddress,\n nonce: i3\n })),\n stateOverrides: [\n {\n address: zeroAddress,\n nonce: 0\n }\n ]\n },\n // Token URI\n {\n calls: assetAddresses.map((address, i3) => ({\n to: address,\n abi: [\n from12(\"function tokenURI(uint256) returns (string)\")\n ],\n functionName: \"tokenURI\",\n args: [0n],\n from: zeroAddress,\n nonce: i3\n })),\n stateOverrides: [\n {\n address: zeroAddress,\n nonce: 0\n }\n ]\n },\n // Symbols\n {\n calls: assetAddresses.map((address, i3) => ({\n to: address,\n abi: [from12(\"function symbol() returns (string)\")],\n functionName: \"symbol\",\n from: zeroAddress,\n nonce: i3\n })),\n stateOverrides: [\n {\n address: zeroAddress,\n nonce: 0\n }\n ]\n }\n ] : []\n ],\n traceTransfers,\n validation\n });\n const block_results = traceAssetChanges ? blocks[2] : blocks[0];\n const [block_ethPre, block_assetsPre, , block_ethPost, block_assetsPost, block_decimals, block_tokenURI, block_symbols] = traceAssetChanges ? blocks : [];\n const { calls: block_calls, ...block } = block_results;\n const results = block_calls.slice(0, -1) ?? [];\n const ethPre = block_ethPre?.calls ?? [];\n const assetsPre = block_assetsPre?.calls ?? [];\n const balancesPre = [...ethPre, ...assetsPre].map((call2) => call2.status === \"success\" ? hexToBigInt(call2.data) : null);\n const ethPost = block_ethPost?.calls ?? [];\n const assetsPost = block_assetsPost?.calls ?? [];\n const balancesPost = [...ethPost, ...assetsPost].map((call2) => call2.status === \"success\" ? hexToBigInt(call2.data) : null);\n const decimals = (block_decimals?.calls ?? []).map((x4) => x4.status === \"success\" ? x4.result : null);\n const symbols = (block_symbols?.calls ?? []).map((x4) => x4.status === \"success\" ? x4.result : null);\n const tokenURI = (block_tokenURI?.calls ?? []).map((x4) => x4.status === \"success\" ? x4.result : null);\n const changes = [];\n for (const [i3, balancePost] of balancesPost.entries()) {\n const balancePre = balancesPre[i3];\n if (typeof balancePost !== \"bigint\")\n continue;\n if (typeof balancePre !== \"bigint\")\n continue;\n const decimals_ = decimals[i3 - 1];\n const symbol_ = symbols[i3 - 1];\n const tokenURI_ = tokenURI[i3 - 1];\n const token = (() => {\n if (i3 === 0)\n return {\n address: ethAddress,\n decimals: 18,\n symbol: \"ETH\"\n };\n return {\n address: assetAddresses[i3 - 1],\n decimals: tokenURI_ || decimals_ ? Number(decimals_ ?? 1) : void 0,\n symbol: symbol_ ?? void 0\n };\n })();\n if (changes.some((change) => change.token.address === token.address))\n continue;\n changes.push({\n token,\n value: {\n pre: balancePre,\n post: balancePost,\n diff: balancePost - balancePre\n }\n });\n }\n return {\n assetChanges: changes,\n block,\n results\n };\n }\n var getBalanceCode;\n var init_simulateCalls = __esm({\n \"../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/actions/public/simulateCalls.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_AbiConstructor();\n init_AbiFunction();\n init_parseAccount();\n init_address2();\n init_contracts();\n init_base();\n init_encodeFunctionData();\n init_utils7();\n init_createAccessList();\n init_simulateBlocks();\n getBalanceCode = \"0x6080604052348015600e575f80fd5b5061016d8061001c5f395ff3fe608060405234801561000f575f80fd5b5060043610610029575f3560e01c8063f8b2cb4f1461002d575b5f80fd5b610047600480360381019061004291906100db565b61005d565b604051610054919061011e565b60405180910390f35b5f8173ffffffffffffffffffffffffffffffffffffffff16319050919050565b5f80fd5b5f73ffffffffffffffffffffffffffffffffffffffff82169050919050565b5f6100aa82610081565b9050919050565b6100ba816100a0565b81146100c4575f80fd5b50565b5f813590506100d5816100b1565b92915050565b5f602082840312156100f0576100ef61007d565b5b5f6100fd848285016100c7565b91505092915050565b5f819050919050565b61011881610106565b82525050565b5f6020820190506101315f83018461010f565b9291505056fea26469706673582212203b9fe929fe995c7cf9887f0bdba8a36dd78e8b73f149b17d2d9ad7cd09d2dc6264736f6c634300081a0033\";\n }\n });\n\n // ../../../node_modules/.pnpm/ox@0.9.6_typescript@5.8.3_zod@3.25.64/node_modules/ox/_esm/erc6492/SignatureErc6492.js\n var SignatureErc6492_exports = {};\n __export(SignatureErc6492_exports, {\n InvalidWrappedSignatureError: () => InvalidWrappedSignatureError2,\n assert: () => assert8,\n from: () => from13,\n magicBytes: () => magicBytes2,\n universalSignatureValidatorAbi: () => universalSignatureValidatorAbi,\n universalSignatureValidatorBytecode: () => universalSignatureValidatorBytecode,\n unwrap: () => unwrap2,\n validate: () => validate5,\n wrap: () => wrap2\n });\n function assert8(wrapped) {\n if (slice3(wrapped, -32) !== magicBytes2)\n throw new InvalidWrappedSignatureError2(wrapped);\n }\n function from13(wrapped) {\n if (typeof wrapped === \"string\")\n return unwrap2(wrapped);\n return wrapped;\n }\n function unwrap2(wrapped) {\n assert8(wrapped);\n const [to, data, signature] = decode(from5(\"address, bytes, bytes\"), wrapped);\n return { data, signature, to };\n }\n function wrap2(value) {\n const { data, signature, to } = value;\n return concat2(encode3(from5(\"address, bytes, bytes\"), [\n to,\n data,\n signature\n ]), magicBytes2);\n }\n function validate5(wrapped) {\n try {\n assert8(wrapped);\n return true;\n } catch {\n return false;\n }\n }\n var magicBytes2, universalSignatureValidatorBytecode, universalSignatureValidatorAbi, InvalidWrappedSignatureError2;\n var init_SignatureErc6492 = __esm({\n \"../../../node_modules/.pnpm/ox@0.9.6_typescript@5.8.3_zod@3.25.64/node_modules/ox/_esm/erc6492/SignatureErc6492.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_AbiParameters();\n init_Errors();\n init_Hex();\n magicBytes2 = \"0x6492649264926492649264926492649264926492649264926492649264926492\";\n universalSignatureValidatorBytecode = \"0x608060405234801561001057600080fd5b5060405161069438038061069483398101604081905261002f9161051e565b600061003c848484610048565b9050806000526001601ff35b60007f64926492649264926492649264926492649264926492649264926492649264926100748361040c565b036101e7576000606080848060200190518101906100929190610577565b60405192955090935091506000906001600160a01b038516906100b69085906105dd565b6000604051808303816000865af19150503d80600081146100f3576040519150601f19603f3d011682016040523d82523d6000602084013e6100f8565b606091505b50509050876001600160a01b03163b60000361016057806101605760405162461bcd60e51b815260206004820152601e60248201527f5369676e617475726556616c696461746f723a206465706c6f796d656e74000060448201526064015b60405180910390fd5b604051630b135d3f60e11b808252906001600160a01b038a1690631626ba7e90610190908b9087906004016105f9565b602060405180830381865afa1580156101ad573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906101d19190610633565b6001600160e01b03191614945050505050610405565b6001600160a01b0384163b1561027a57604051630b135d3f60e11b808252906001600160a01b03861690631626ba7e9061022790879087906004016105f9565b602060405180830381865afa158015610244573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906102689190610633565b6001600160e01b031916149050610405565b81516041146102df5760405162461bcd60e51b815260206004820152603a602482015260008051602061067483398151915260448201527f3a20696e76616c6964207369676e6174757265206c656e6774680000000000006064820152608401610157565b6102e7610425565b5060208201516040808401518451859392600091859190811061030c5761030c61065d565b016020015160f81c9050601b811480159061032b57508060ff16601c14155b1561038c5760405162461bcd60e51b815260206004820152603b602482015260008051602061067483398151915260448201527f3a20696e76616c6964207369676e617475726520762076616c756500000000006064820152608401610157565b60408051600081526020810180835289905260ff83169181019190915260608101849052608081018390526001600160a01b0389169060019060a0016020604051602081039080840390855afa1580156103ea573d6000803e3d6000fd5b505050602060405103516001600160a01b0316149450505050505b9392505050565b600060208251101561041d57600080fd5b508051015190565b60405180606001604052806003906020820280368337509192915050565b6001600160a01b038116811461045857600080fd5b50565b634e487b7160e01b600052604160045260246000fd5b60005b8381101561048c578181015183820152602001610474565b50506000910152565b600082601f8301126104a657600080fd5b81516001600160401b038111156104bf576104bf61045b565b604051601f8201601f19908116603f011681016001600160401b03811182821017156104ed576104ed61045b565b60405281815283820160200185101561050557600080fd5b610516826020830160208701610471565b949350505050565b60008060006060848603121561053357600080fd5b835161053e81610443565b6020850151604086015191945092506001600160401b0381111561056157600080fd5b61056d86828701610495565b9150509250925092565b60008060006060848603121561058c57600080fd5b835161059781610443565b60208501519093506001600160401b038111156105b357600080fd5b6105bf86828701610495565b604086015190935090506001600160401b0381111561056157600080fd5b600082516105ef818460208701610471565b9190910192915050565b828152604060208201526000825180604084015261061e816060850160208701610471565b601f01601f1916919091016060019392505050565b60006020828403121561064557600080fd5b81516001600160e01b03198116811461040557600080fd5b634e487b7160e01b600052603260045260246000fdfe5369676e617475726556616c696461746f72237265636f7665725369676e6572\";\n universalSignatureValidatorAbi = [\n {\n inputs: [\n {\n name: \"_signer\",\n type: \"address\"\n },\n {\n name: \"_hash\",\n type: \"bytes32\"\n },\n {\n name: \"_signature\",\n type: \"bytes\"\n }\n ],\n stateMutability: \"nonpayable\",\n type: \"constructor\"\n },\n {\n inputs: [\n {\n name: \"_signer\",\n type: \"address\"\n },\n {\n name: \"_hash\",\n type: \"bytes32\"\n },\n {\n name: \"_signature\",\n type: \"bytes\"\n }\n ],\n outputs: [\n {\n type: \"bool\"\n }\n ],\n stateMutability: \"nonpayable\",\n type: \"function\",\n name: \"isValidSig\"\n }\n ];\n InvalidWrappedSignatureError2 = class extends BaseError3 {\n constructor(wrapped) {\n super(`Value \\`${wrapped}\\` is an invalid ERC-6492 wrapped signature.`);\n Object.defineProperty(this, \"name\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: \"SignatureErc6492.InvalidWrappedSignatureError\"\n });\n }\n };\n }\n });\n\n // ../../../node_modules/.pnpm/ox@0.9.6_typescript@5.8.3_zod@3.25.64/node_modules/ox/_esm/erc6492/index.js\n var init_erc6492 = __esm({\n \"../../../node_modules/.pnpm/ox@0.9.6_typescript@5.8.3_zod@3.25.64/node_modules/ox/_esm/erc6492/index.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_SignatureErc6492();\n }\n });\n\n // ../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/utils/signature/serializeSignature.js\n function serializeSignature({ r: r2, s: s4, to = \"hex\", v: v2, yParity }) {\n const yParity_ = (() => {\n if (yParity === 0 || yParity === 1)\n return yParity;\n if (v2 && (v2 === 27n || v2 === 28n || v2 >= 35n))\n return v2 % 2n === 0n ? 1 : 0;\n throw new Error(\"Invalid `v` or `yParity` value\");\n })();\n const signature = `0x${new secp256k1.Signature(hexToBigInt(r2), hexToBigInt(s4)).toCompactHex()}${yParity_ === 0 ? \"1b\" : \"1c\"}`;\n if (to === \"hex\")\n return signature;\n return hexToBytes(signature);\n }\n var init_serializeSignature = __esm({\n \"../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/utils/signature/serializeSignature.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_secp256k1();\n init_fromHex();\n init_toBytes();\n }\n });\n\n // ../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/actions/public/verifyHash.js\n async function verifyHash(client, parameters) {\n const { address, hash: hash3, erc6492VerifierAddress: verifierAddress = parameters.universalSignatureVerifierAddress ?? client.chain?.contracts?.erc6492Verifier?.address, multicallAddress = parameters.multicallAddress ?? client.chain?.contracts?.multicall3?.address } = parameters;\n const signature = (() => {\n const signature2 = parameters.signature;\n if (isHex(signature2))\n return signature2;\n if (typeof signature2 === \"object\" && \"r\" in signature2 && \"s\" in signature2)\n return serializeSignature(signature2);\n return bytesToHex(signature2);\n })();\n try {\n if (SignatureErc8010_exports.validate(signature))\n return await verifyErc8010(client, {\n ...parameters,\n multicallAddress,\n signature\n });\n return await verifyErc6492(client, {\n ...parameters,\n verifierAddress,\n signature\n });\n } catch (error) {\n try {\n const verified = isAddressEqual(getAddress(address), await recoverAddress({ hash: hash3, signature }));\n if (verified)\n return true;\n } catch {\n }\n if (error instanceof VerificationError) {\n return false;\n }\n throw error;\n }\n }\n async function verifyErc8010(client, parameters) {\n const { address, blockNumber, blockTag, hash: hash3, multicallAddress } = parameters;\n const { authorization: authorization_ox, data: initData, signature, to } = SignatureErc8010_exports.unwrap(parameters.signature);\n const code = await getCode(client, {\n address,\n blockNumber,\n blockTag\n });\n if (code === concatHex([\"0xef0100\", authorization_ox.address]))\n return await verifyErc1271(client, {\n address,\n blockNumber,\n blockTag,\n hash: hash3,\n signature\n });\n const authorization = {\n address: authorization_ox.address,\n chainId: Number(authorization_ox.chainId),\n nonce: Number(authorization_ox.nonce),\n r: numberToHex(authorization_ox.r, { size: 32 }),\n s: numberToHex(authorization_ox.s, { size: 32 }),\n yParity: authorization_ox.yParity\n };\n const valid = await verifyAuthorization({\n address,\n authorization\n });\n if (!valid)\n throw new VerificationError();\n const results = await getAction(client, readContract, \"readContract\")({\n ...multicallAddress ? { address: multicallAddress } : { code: multicall3Bytecode },\n authorizationList: [authorization],\n abi: multicall3Abi,\n blockNumber,\n blockTag: \"pending\",\n functionName: \"aggregate3\",\n args: [\n [\n ...initData ? [\n {\n allowFailure: true,\n target: to ?? address,\n callData: initData\n }\n ] : [],\n {\n allowFailure: true,\n target: address,\n callData: encodeFunctionData({\n abi: erc1271Abi,\n functionName: \"isValidSignature\",\n args: [hash3, signature]\n })\n }\n ]\n ]\n });\n const data = results[results.length - 1]?.returnData;\n if (data?.startsWith(\"0x1626ba7e\"))\n return true;\n throw new VerificationError();\n }\n async function verifyErc6492(client, parameters) {\n const { address, factory, factoryData, hash: hash3, signature, verifierAddress, ...rest } = parameters;\n const wrappedSignature = await (async () => {\n if (!factory && !factoryData)\n return signature;\n if (SignatureErc6492_exports.validate(signature))\n return signature;\n return SignatureErc6492_exports.wrap({\n data: factoryData,\n signature,\n to: factory\n });\n })();\n const args = verifierAddress ? {\n to: verifierAddress,\n data: encodeFunctionData({\n abi: erc6492SignatureValidatorAbi,\n functionName: \"isValidSig\",\n args: [address, hash3, wrappedSignature]\n }),\n ...rest\n } : {\n data: encodeDeployData({\n abi: erc6492SignatureValidatorAbi,\n args: [address, hash3, wrappedSignature],\n bytecode: erc6492SignatureValidatorByteCode\n }),\n ...rest\n };\n const { data } = await getAction(client, call, \"call\")(args).catch((error) => {\n if (error instanceof CallExecutionError)\n throw new VerificationError();\n throw error;\n });\n if (hexToBool(data ?? \"0x0\"))\n return true;\n throw new VerificationError();\n }\n async function verifyErc1271(client, parameters) {\n const { address, blockNumber, blockTag, hash: hash3, signature } = parameters;\n const result = await getAction(client, readContract, \"readContract\")({\n address,\n abi: erc1271Abi,\n args: [hash3, signature],\n blockNumber,\n blockTag,\n functionName: \"isValidSignature\"\n }).catch((error) => {\n if (error instanceof ContractFunctionExecutionError)\n throw new VerificationError();\n throw error;\n });\n if (result.startsWith(\"0x1626ba7e\"))\n return true;\n throw new VerificationError();\n }\n var VerificationError;\n var init_verifyHash = __esm({\n \"../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/actions/public/verifyHash.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_erc6492();\n init_erc8010();\n init_abis();\n init_contracts();\n init_contract();\n init_encodeDeployData();\n init_encodeFunctionData();\n init_getAddress();\n init_isAddressEqual();\n init_verifyAuthorization();\n init_concat();\n init_isHex();\n init_fromHex();\n init_toHex();\n init_getAction();\n init_recoverAddress();\n init_serializeSignature();\n init_call();\n init_getCode();\n init_readContract();\n VerificationError = class extends Error {\n };\n }\n });\n\n // ../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/actions/public/verifyMessage.js\n async function verifyMessage(client, { address, message, factory, factoryData, signature, ...callRequest }) {\n const hash3 = hashMessage(message);\n return verifyHash(client, {\n address,\n factory,\n factoryData,\n hash: hash3,\n signature,\n ...callRequest\n });\n }\n var init_verifyMessage = __esm({\n \"../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/actions/public/verifyMessage.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_hashMessage();\n init_verifyHash();\n }\n });\n\n // ../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/actions/public/verifyTypedData.js\n async function verifyTypedData(client, parameters) {\n const { address, factory, factoryData, signature, message, primaryType, types, domain: domain2, ...callRequest } = parameters;\n const hash3 = hashTypedData({ message, primaryType, types, domain: domain2 });\n return verifyHash(client, {\n address,\n factory,\n factoryData,\n hash: hash3,\n signature,\n ...callRequest\n });\n }\n var init_verifyTypedData = __esm({\n \"../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/actions/public/verifyTypedData.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_hashTypedData();\n init_verifyHash();\n }\n });\n\n // ../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/actions/public/watchBlockNumber.js\n function watchBlockNumber(client, { emitOnBegin = false, emitMissed = false, onBlockNumber, onError, poll: poll_, pollingInterval = client.pollingInterval }) {\n const enablePolling = (() => {\n if (typeof poll_ !== \"undefined\")\n return poll_;\n if (client.transport.type === \"webSocket\" || client.transport.type === \"ipc\")\n return false;\n if (client.transport.type === \"fallback\" && (client.transport.transports[0].config.type === \"webSocket\" || client.transport.transports[0].config.type === \"ipc\"))\n return false;\n return true;\n })();\n let prevBlockNumber;\n const pollBlockNumber = () => {\n const observerId = stringify([\n \"watchBlockNumber\",\n client.uid,\n emitOnBegin,\n emitMissed,\n pollingInterval\n ]);\n return observe(observerId, { onBlockNumber, onError }, (emit2) => poll(async () => {\n try {\n const blockNumber = await getAction(client, getBlockNumber, \"getBlockNumber\")({ cacheTime: 0 });\n if (prevBlockNumber !== void 0) {\n if (blockNumber === prevBlockNumber)\n return;\n if (blockNumber - prevBlockNumber > 1 && emitMissed) {\n for (let i3 = prevBlockNumber + 1n; i3 < blockNumber; i3++) {\n emit2.onBlockNumber(i3, prevBlockNumber);\n prevBlockNumber = i3;\n }\n }\n }\n if (prevBlockNumber === void 0 || blockNumber > prevBlockNumber) {\n emit2.onBlockNumber(blockNumber, prevBlockNumber);\n prevBlockNumber = blockNumber;\n }\n } catch (err) {\n emit2.onError?.(err);\n }\n }, {\n emitOnBegin,\n interval: pollingInterval\n }));\n };\n const subscribeBlockNumber = () => {\n const observerId = stringify([\n \"watchBlockNumber\",\n client.uid,\n emitOnBegin,\n emitMissed\n ]);\n return observe(observerId, { onBlockNumber, onError }, (emit2) => {\n let active = true;\n let unsubscribe = () => active = false;\n (async () => {\n try {\n const transport = (() => {\n if (client.transport.type === \"fallback\") {\n const transport2 = client.transport.transports.find((transport3) => transport3.config.type === \"webSocket\" || transport3.config.type === \"ipc\");\n if (!transport2)\n return client.transport;\n return transport2.value;\n }\n return client.transport;\n })();\n const { unsubscribe: unsubscribe_ } = await transport.subscribe({\n params: [\"newHeads\"],\n onData(data) {\n if (!active)\n return;\n const blockNumber = hexToBigInt(data.result?.number);\n emit2.onBlockNumber(blockNumber, prevBlockNumber);\n prevBlockNumber = blockNumber;\n },\n onError(error) {\n emit2.onError?.(error);\n }\n });\n unsubscribe = unsubscribe_;\n if (!active)\n unsubscribe();\n } catch (err) {\n onError?.(err);\n }\n })();\n return () => unsubscribe();\n });\n };\n return enablePolling ? pollBlockNumber() : subscribeBlockNumber();\n }\n var init_watchBlockNumber = __esm({\n \"../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/actions/public/watchBlockNumber.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_fromHex();\n init_getAction();\n init_observe();\n init_poll();\n init_stringify();\n init_getBlockNumber();\n }\n });\n\n // ../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/actions/public/waitForTransactionReceipt.js\n async function waitForTransactionReceipt(client, parameters) {\n const {\n checkReplacement = true,\n confirmations = 1,\n hash: hash3,\n onReplaced,\n retryCount = 6,\n retryDelay = ({ count }) => ~~(1 << count) * 200,\n // exponential backoff\n timeout = 18e4\n } = parameters;\n const observerId = stringify([\"waitForTransactionReceipt\", client.uid, hash3]);\n const pollingInterval = (() => {\n if (parameters.pollingInterval)\n return parameters.pollingInterval;\n if (client.chain?.experimental_preconfirmationTime)\n return client.chain.experimental_preconfirmationTime;\n return client.pollingInterval;\n })();\n let transaction;\n let replacedTransaction;\n let receipt;\n let retrying = false;\n let _unobserve;\n let _unwatch;\n const { promise, resolve, reject } = withResolvers();\n const timer = timeout ? setTimeout(() => {\n _unwatch?.();\n _unobserve?.();\n reject(new WaitForTransactionReceiptTimeoutError({ hash: hash3 }));\n }, timeout) : void 0;\n _unobserve = observe(observerId, { onReplaced, resolve, reject }, async (emit2) => {\n receipt = await getAction(client, getTransactionReceipt, \"getTransactionReceipt\")({ hash: hash3 }).catch(() => void 0);\n if (receipt && confirmations <= 1) {\n clearTimeout(timer);\n emit2.resolve(receipt);\n _unobserve?.();\n return;\n }\n _unwatch = getAction(client, watchBlockNumber, \"watchBlockNumber\")({\n emitMissed: true,\n emitOnBegin: true,\n poll: true,\n pollingInterval,\n async onBlockNumber(blockNumber_) {\n const done = (fn) => {\n clearTimeout(timer);\n _unwatch?.();\n fn();\n _unobserve?.();\n };\n let blockNumber = blockNumber_;\n if (retrying)\n return;\n try {\n if (receipt) {\n if (confirmations > 1 && (!receipt.blockNumber || blockNumber - receipt.blockNumber + 1n < confirmations))\n return;\n done(() => emit2.resolve(receipt));\n return;\n }\n if (checkReplacement && !transaction) {\n retrying = true;\n await withRetry(async () => {\n transaction = await getAction(client, getTransaction, \"getTransaction\")({ hash: hash3 });\n if (transaction.blockNumber)\n blockNumber = transaction.blockNumber;\n }, {\n delay: retryDelay,\n retryCount\n });\n retrying = false;\n }\n receipt = await getAction(client, getTransactionReceipt, \"getTransactionReceipt\")({ hash: hash3 });\n if (confirmations > 1 && (!receipt.blockNumber || blockNumber - receipt.blockNumber + 1n < confirmations))\n return;\n done(() => emit2.resolve(receipt));\n } catch (err) {\n if (err instanceof TransactionNotFoundError || err instanceof TransactionReceiptNotFoundError) {\n if (!transaction) {\n retrying = false;\n return;\n }\n try {\n replacedTransaction = transaction;\n retrying = true;\n const block = await withRetry(() => getAction(client, getBlock, \"getBlock\")({\n blockNumber,\n includeTransactions: true\n }), {\n delay: retryDelay,\n retryCount,\n shouldRetry: ({ error }) => error instanceof BlockNotFoundError\n });\n retrying = false;\n const replacementTransaction = block.transactions.find(({ from: from14, nonce }) => from14 === replacedTransaction.from && nonce === replacedTransaction.nonce);\n if (!replacementTransaction)\n return;\n receipt = await getAction(client, getTransactionReceipt, \"getTransactionReceipt\")({\n hash: replacementTransaction.hash\n });\n if (confirmations > 1 && (!receipt.blockNumber || blockNumber - receipt.blockNumber + 1n < confirmations))\n return;\n let reason = \"replaced\";\n if (replacementTransaction.to === replacedTransaction.to && replacementTransaction.value === replacedTransaction.value && replacementTransaction.input === replacedTransaction.input) {\n reason = \"repriced\";\n } else if (replacementTransaction.from === replacementTransaction.to && replacementTransaction.value === 0n) {\n reason = \"cancelled\";\n }\n done(() => {\n emit2.onReplaced?.({\n reason,\n replacedTransaction,\n transaction: replacementTransaction,\n transactionReceipt: receipt\n });\n emit2.resolve(receipt);\n });\n } catch (err_) {\n done(() => emit2.reject(err_));\n }\n } else {\n done(() => emit2.reject(err));\n }\n }\n }\n });\n });\n return promise;\n }\n var init_waitForTransactionReceipt = __esm({\n \"../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/actions/public/waitForTransactionReceipt.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_block();\n init_transaction();\n init_getAction();\n init_observe();\n init_withResolvers();\n init_withRetry();\n init_stringify();\n init_getBlock();\n init_getTransaction();\n init_getTransactionReceipt();\n init_watchBlockNumber();\n }\n });\n\n // ../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/actions/public/watchBlocks.js\n function watchBlocks(client, { blockTag = client.experimental_blockTag ?? \"latest\", emitMissed = false, emitOnBegin = false, onBlock, onError, includeTransactions: includeTransactions_, poll: poll_, pollingInterval = client.pollingInterval }) {\n const enablePolling = (() => {\n if (typeof poll_ !== \"undefined\")\n return poll_;\n if (client.transport.type === \"webSocket\" || client.transport.type === \"ipc\")\n return false;\n if (client.transport.type === \"fallback\" && (client.transport.transports[0].config.type === \"webSocket\" || client.transport.transports[0].config.type === \"ipc\"))\n return false;\n return true;\n })();\n const includeTransactions = includeTransactions_ ?? false;\n let prevBlock;\n const pollBlocks = () => {\n const observerId = stringify([\n \"watchBlocks\",\n client.uid,\n blockTag,\n emitMissed,\n emitOnBegin,\n includeTransactions,\n pollingInterval\n ]);\n return observe(observerId, { onBlock, onError }, (emit2) => poll(async () => {\n try {\n const block = await getAction(client, getBlock, \"getBlock\")({\n blockTag,\n includeTransactions\n });\n if (block.number !== null && prevBlock?.number != null) {\n if (block.number === prevBlock.number)\n return;\n if (block.number - prevBlock.number > 1 && emitMissed) {\n for (let i3 = prevBlock?.number + 1n; i3 < block.number; i3++) {\n const block2 = await getAction(client, getBlock, \"getBlock\")({\n blockNumber: i3,\n includeTransactions\n });\n emit2.onBlock(block2, prevBlock);\n prevBlock = block2;\n }\n }\n }\n if (\n // If no previous block exists, emit.\n prevBlock?.number == null || // If the block tag is \"pending\" with no block number, emit.\n blockTag === \"pending\" && block?.number == null || // If the next block number is greater than the previous block number, emit.\n // We don't want to emit blocks in the past.\n block.number !== null && block.number > prevBlock.number\n ) {\n emit2.onBlock(block, prevBlock);\n prevBlock = block;\n }\n } catch (err) {\n emit2.onError?.(err);\n }\n }, {\n emitOnBegin,\n interval: pollingInterval\n }));\n };\n const subscribeBlocks = () => {\n let active = true;\n let emitFetched = true;\n let unsubscribe = () => active = false;\n (async () => {\n try {\n if (emitOnBegin) {\n getAction(client, getBlock, \"getBlock\")({\n blockTag,\n includeTransactions\n }).then((block) => {\n if (!active)\n return;\n if (!emitFetched)\n return;\n onBlock(block, void 0);\n emitFetched = false;\n }).catch(onError);\n }\n const transport = (() => {\n if (client.transport.type === \"fallback\") {\n const transport2 = client.transport.transports.find((transport3) => transport3.config.type === \"webSocket\" || transport3.config.type === \"ipc\");\n if (!transport2)\n return client.transport;\n return transport2.value;\n }\n return client.transport;\n })();\n const { unsubscribe: unsubscribe_ } = await transport.subscribe({\n params: [\"newHeads\"],\n async onData(data) {\n if (!active)\n return;\n const block = await getAction(client, getBlock, \"getBlock\")({\n blockNumber: data.result?.number,\n includeTransactions\n }).catch(() => {\n });\n if (!active)\n return;\n onBlock(block, prevBlock);\n emitFetched = false;\n prevBlock = block;\n },\n onError(error) {\n onError?.(error);\n }\n });\n unsubscribe = unsubscribe_;\n if (!active)\n unsubscribe();\n } catch (err) {\n onError?.(err);\n }\n })();\n return () => unsubscribe();\n };\n return enablePolling ? pollBlocks() : subscribeBlocks();\n }\n var init_watchBlocks = __esm({\n \"../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/actions/public/watchBlocks.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_getAction();\n init_observe();\n init_poll();\n init_stringify();\n init_getBlock();\n }\n });\n\n // ../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/actions/public/watchEvent.js\n function watchEvent(client, { address, args, batch = true, event, events, fromBlock, onError, onLogs, poll: poll_, pollingInterval = client.pollingInterval, strict: strict_ }) {\n const enablePolling = (() => {\n if (typeof poll_ !== \"undefined\")\n return poll_;\n if (typeof fromBlock === \"bigint\")\n return true;\n if (client.transport.type === \"webSocket\" || client.transport.type === \"ipc\")\n return false;\n if (client.transport.type === \"fallback\" && (client.transport.transports[0].config.type === \"webSocket\" || client.transport.transports[0].config.type === \"ipc\"))\n return false;\n return true;\n })();\n const strict = strict_ ?? false;\n const pollEvent = () => {\n const observerId = stringify([\n \"watchEvent\",\n address,\n args,\n batch,\n client.uid,\n event,\n pollingInterval,\n fromBlock\n ]);\n return observe(observerId, { onLogs, onError }, (emit2) => {\n let previousBlockNumber;\n if (fromBlock !== void 0)\n previousBlockNumber = fromBlock - 1n;\n let filter;\n let initialized = false;\n const unwatch = poll(async () => {\n if (!initialized) {\n try {\n filter = await getAction(client, createEventFilter, \"createEventFilter\")({\n address,\n args,\n event,\n events,\n strict,\n fromBlock\n });\n } catch {\n }\n initialized = true;\n return;\n }\n try {\n let logs;\n if (filter) {\n logs = await getAction(client, getFilterChanges, \"getFilterChanges\")({ filter });\n } else {\n const blockNumber = await getAction(client, getBlockNumber, \"getBlockNumber\")({});\n if (previousBlockNumber && previousBlockNumber !== blockNumber) {\n logs = await getAction(client, getLogs, \"getLogs\")({\n address,\n args,\n event,\n events,\n fromBlock: previousBlockNumber + 1n,\n toBlock: blockNumber\n });\n } else {\n logs = [];\n }\n previousBlockNumber = blockNumber;\n }\n if (logs.length === 0)\n return;\n if (batch)\n emit2.onLogs(logs);\n else\n for (const log of logs)\n emit2.onLogs([log]);\n } catch (err) {\n if (filter && err instanceof InvalidInputRpcError)\n initialized = false;\n emit2.onError?.(err);\n }\n }, {\n emitOnBegin: true,\n interval: pollingInterval\n });\n return async () => {\n if (filter)\n await getAction(client, uninstallFilter, \"uninstallFilter\")({ filter });\n unwatch();\n };\n });\n };\n const subscribeEvent = () => {\n let active = true;\n let unsubscribe = () => active = false;\n (async () => {\n try {\n const transport = (() => {\n if (client.transport.type === \"fallback\") {\n const transport2 = client.transport.transports.find((transport3) => transport3.config.type === \"webSocket\" || transport3.config.type === \"ipc\");\n if (!transport2)\n return client.transport;\n return transport2.value;\n }\n return client.transport;\n })();\n const events_ = events ?? (event ? [event] : void 0);\n let topics = [];\n if (events_) {\n const encoded = events_.flatMap((event2) => encodeEventTopics({\n abi: [event2],\n eventName: event2.name,\n args\n }));\n topics = [encoded];\n if (event)\n topics = topics[0];\n }\n const { unsubscribe: unsubscribe_ } = await transport.subscribe({\n params: [\"logs\", { address, topics }],\n onData(data) {\n if (!active)\n return;\n const log = data.result;\n try {\n const { eventName, args: args2 } = decodeEventLog({\n abi: events_ ?? [],\n data: log.data,\n topics: log.topics,\n strict\n });\n const formatted = formatLog(log, { args: args2, eventName });\n onLogs([formatted]);\n } catch (err) {\n let eventName;\n let isUnnamed;\n if (err instanceof DecodeLogDataMismatch || err instanceof DecodeLogTopicsMismatch) {\n if (strict_)\n return;\n eventName = err.abiItem.name;\n isUnnamed = err.abiItem.inputs?.some((x4) => !(\"name\" in x4 && x4.name));\n }\n const formatted = formatLog(log, {\n args: isUnnamed ? [] : {},\n eventName\n });\n onLogs([formatted]);\n }\n },\n onError(error) {\n onError?.(error);\n }\n });\n unsubscribe = unsubscribe_;\n if (!active)\n unsubscribe();\n } catch (err) {\n onError?.(err);\n }\n })();\n return () => unsubscribe();\n };\n return enablePolling ? pollEvent() : subscribeEvent();\n }\n var init_watchEvent = __esm({\n \"../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/actions/public/watchEvent.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_abi();\n init_rpc();\n init_decodeEventLog();\n init_encodeEventTopics();\n init_log2();\n init_getAction();\n init_observe();\n init_poll();\n init_stringify();\n init_createEventFilter();\n init_getBlockNumber();\n init_getFilterChanges();\n init_getLogs();\n init_uninstallFilter();\n }\n });\n\n // ../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/actions/public/watchPendingTransactions.js\n function watchPendingTransactions(client, { batch = true, onError, onTransactions, poll: poll_, pollingInterval = client.pollingInterval }) {\n const enablePolling = typeof poll_ !== \"undefined\" ? poll_ : client.transport.type !== \"webSocket\" && client.transport.type !== \"ipc\";\n const pollPendingTransactions = () => {\n const observerId = stringify([\n \"watchPendingTransactions\",\n client.uid,\n batch,\n pollingInterval\n ]);\n return observe(observerId, { onTransactions, onError }, (emit2) => {\n let filter;\n const unwatch = poll(async () => {\n try {\n if (!filter) {\n try {\n filter = await getAction(client, createPendingTransactionFilter, \"createPendingTransactionFilter\")({});\n return;\n } catch (err) {\n unwatch();\n throw err;\n }\n }\n const hashes = await getAction(client, getFilterChanges, \"getFilterChanges\")({ filter });\n if (hashes.length === 0)\n return;\n if (batch)\n emit2.onTransactions(hashes);\n else\n for (const hash3 of hashes)\n emit2.onTransactions([hash3]);\n } catch (err) {\n emit2.onError?.(err);\n }\n }, {\n emitOnBegin: true,\n interval: pollingInterval\n });\n return async () => {\n if (filter)\n await getAction(client, uninstallFilter, \"uninstallFilter\")({ filter });\n unwatch();\n };\n });\n };\n const subscribePendingTransactions = () => {\n let active = true;\n let unsubscribe = () => active = false;\n (async () => {\n try {\n const { unsubscribe: unsubscribe_ } = await client.transport.subscribe({\n params: [\"newPendingTransactions\"],\n onData(data) {\n if (!active)\n return;\n const transaction = data.result;\n onTransactions([transaction]);\n },\n onError(error) {\n onError?.(error);\n }\n });\n unsubscribe = unsubscribe_;\n if (!active)\n unsubscribe();\n } catch (err) {\n onError?.(err);\n }\n })();\n return () => unsubscribe();\n };\n return enablePolling ? pollPendingTransactions() : subscribePendingTransactions();\n }\n var init_watchPendingTransactions = __esm({\n \"../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/actions/public/watchPendingTransactions.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_getAction();\n init_observe();\n init_poll();\n init_stringify();\n init_createPendingTransactionFilter();\n init_getFilterChanges();\n init_uninstallFilter();\n }\n });\n\n // ../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/utils/siwe/parseSiweMessage.js\n function parseSiweMessage(message) {\n const { scheme, statement, ...prefix } = message.match(prefixRegex)?.groups ?? {};\n const { chainId, expirationTime, issuedAt, notBefore, requestId, ...suffix } = message.match(suffixRegex)?.groups ?? {};\n const resources = message.split(\"Resources:\")[1]?.split(\"\\n- \").slice(1);\n return {\n ...prefix,\n ...suffix,\n ...chainId ? { chainId: Number(chainId) } : {},\n ...expirationTime ? { expirationTime: new Date(expirationTime) } : {},\n ...issuedAt ? { issuedAt: new Date(issuedAt) } : {},\n ...notBefore ? { notBefore: new Date(notBefore) } : {},\n ...requestId ? { requestId } : {},\n ...resources ? { resources } : {},\n ...scheme ? { scheme } : {},\n ...statement ? { statement } : {}\n };\n }\n var prefixRegex, suffixRegex;\n var init_parseSiweMessage = __esm({\n \"../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/utils/siwe/parseSiweMessage.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n prefixRegex = /^(?:(?[a-zA-Z][a-zA-Z0-9+-.]*):\\/\\/)?(?[a-zA-Z0-9+-.]*(?::[0-9]{1,5})?) (?:wants you to sign in with your Ethereum account:\\n)(?
0x[a-fA-F0-9]{40})\\n\\n(?:(?.*)\\n\\n)?/;\n suffixRegex = /(?:URI: (?.+))\\n(?:Version: (?.+))\\n(?:Chain ID: (?\\d+))\\n(?:Nonce: (?[a-zA-Z0-9]+))\\n(?:Issued At: (?.+))(?:\\nExpiration Time: (?.+))?(?:\\nNot Before: (?.+))?(?:\\nRequest ID: (?.+))?/;\n }\n });\n\n // ../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/utils/siwe/validateSiweMessage.js\n function validateSiweMessage(parameters) {\n const { address, domain: domain2, message, nonce, scheme, time = /* @__PURE__ */ new Date() } = parameters;\n if (domain2 && message.domain !== domain2)\n return false;\n if (nonce && message.nonce !== nonce)\n return false;\n if (scheme && message.scheme !== scheme)\n return false;\n if (message.expirationTime && time >= message.expirationTime)\n return false;\n if (message.notBefore && time < message.notBefore)\n return false;\n try {\n if (!message.address)\n return false;\n if (!isAddress(message.address, { strict: false }))\n return false;\n if (address && !isAddressEqual(message.address, address))\n return false;\n } catch {\n return false;\n }\n return true;\n }\n var init_validateSiweMessage = __esm({\n \"../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/utils/siwe/validateSiweMessage.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_isAddress();\n init_isAddressEqual();\n }\n });\n\n // ../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/actions/siwe/verifySiweMessage.js\n async function verifySiweMessage(client, parameters) {\n const { address, domain: domain2, message, nonce, scheme, signature, time = /* @__PURE__ */ new Date(), ...callRequest } = parameters;\n const parsed = parseSiweMessage(message);\n if (!parsed.address)\n return false;\n const isValid2 = validateSiweMessage({\n address,\n domain: domain2,\n message: parsed,\n nonce,\n scheme,\n time\n });\n if (!isValid2)\n return false;\n const hash3 = hashMessage(message);\n return verifyHash(client, {\n address: parsed.address,\n hash: hash3,\n signature,\n ...callRequest\n });\n }\n var init_verifySiweMessage = __esm({\n \"../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/actions/siwe/verifySiweMessage.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_hashMessage();\n init_parseSiweMessage();\n init_validateSiweMessage();\n init_verifyHash();\n }\n });\n\n // ../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/actions/wallet/sendRawTransactionSync.js\n async function sendRawTransactionSync(client, { serializedTransaction, throwOnReceiptRevert, timeout }) {\n const receipt = await client.request({\n method: \"eth_sendRawTransactionSync\",\n params: timeout ? [serializedTransaction, numberToHex(timeout)] : [serializedTransaction]\n }, { retryCount: 0 });\n const format = client.chain?.formatters?.transactionReceipt?.format || formatTransactionReceipt;\n const formatted = format(receipt);\n if (formatted.status === \"reverted\" && throwOnReceiptRevert)\n throw new TransactionReceiptRevertedError({ receipt: formatted });\n return formatted;\n }\n var init_sendRawTransactionSync = __esm({\n \"../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/actions/wallet/sendRawTransactionSync.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_transaction();\n init_transactionReceipt();\n init_utils7();\n }\n });\n\n // ../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/clients/decorators/public.js\n function publicActions(client) {\n return {\n call: (args) => call(client, args),\n createAccessList: (args) => createAccessList(client, args),\n createBlockFilter: () => createBlockFilter(client),\n createContractEventFilter: (args) => createContractEventFilter(client, args),\n createEventFilter: (args) => createEventFilter(client, args),\n createPendingTransactionFilter: () => createPendingTransactionFilter(client),\n estimateContractGas: (args) => estimateContractGas(client, args),\n estimateGas: (args) => estimateGas(client, args),\n getBalance: (args) => getBalance(client, args),\n getBlobBaseFee: () => getBlobBaseFee(client),\n getBlock: (args) => getBlock(client, args),\n getBlockNumber: (args) => getBlockNumber(client, args),\n getBlockTransactionCount: (args) => getBlockTransactionCount(client, args),\n getBytecode: (args) => getCode(client, args),\n getChainId: () => getChainId(client),\n getCode: (args) => getCode(client, args),\n getContractEvents: (args) => getContractEvents(client, args),\n getEip712Domain: (args) => getEip712Domain(client, args),\n getEnsAddress: (args) => getEnsAddress(client, args),\n getEnsAvatar: (args) => getEnsAvatar(client, args),\n getEnsName: (args) => getEnsName(client, args),\n getEnsResolver: (args) => getEnsResolver(client, args),\n getEnsText: (args) => getEnsText(client, args),\n getFeeHistory: (args) => getFeeHistory(client, args),\n estimateFeesPerGas: (args) => estimateFeesPerGas(client, args),\n getFilterChanges: (args) => getFilterChanges(client, args),\n getFilterLogs: (args) => getFilterLogs(client, args),\n getGasPrice: () => getGasPrice(client),\n getLogs: (args) => getLogs(client, args),\n getProof: (args) => getProof(client, args),\n estimateMaxPriorityFeePerGas: (args) => estimateMaxPriorityFeePerGas(client, args),\n getStorageAt: (args) => getStorageAt(client, args),\n getTransaction: (args) => getTransaction(client, args),\n getTransactionConfirmations: (args) => getTransactionConfirmations(client, args),\n getTransactionCount: (args) => getTransactionCount(client, args),\n getTransactionReceipt: (args) => getTransactionReceipt(client, args),\n multicall: (args) => multicall(client, args),\n prepareTransactionRequest: (args) => prepareTransactionRequest(client, args),\n readContract: (args) => readContract(client, args),\n sendRawTransaction: (args) => sendRawTransaction(client, args),\n sendRawTransactionSync: (args) => sendRawTransactionSync(client, args),\n simulate: (args) => simulateBlocks(client, args),\n simulateBlocks: (args) => simulateBlocks(client, args),\n simulateCalls: (args) => simulateCalls(client, args),\n simulateContract: (args) => simulateContract(client, args),\n verifyHash: (args) => verifyHash(client, args),\n verifyMessage: (args) => verifyMessage(client, args),\n verifySiweMessage: (args) => verifySiweMessage(client, args),\n verifyTypedData: (args) => verifyTypedData(client, args),\n uninstallFilter: (args) => uninstallFilter(client, args),\n waitForTransactionReceipt: (args) => waitForTransactionReceipt(client, args),\n watchBlocks: (args) => watchBlocks(client, args),\n watchBlockNumber: (args) => watchBlockNumber(client, args),\n watchContractEvent: (args) => watchContractEvent(client, args),\n watchEvent: (args) => watchEvent(client, args),\n watchPendingTransactions: (args) => watchPendingTransactions(client, args)\n };\n }\n var init_public = __esm({\n \"../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/clients/decorators/public.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_getEnsAddress();\n init_getEnsAvatar();\n init_getEnsName();\n init_getEnsResolver();\n init_getEnsText();\n init_call();\n init_createAccessList();\n init_createBlockFilter();\n init_createContractEventFilter();\n init_createEventFilter();\n init_createPendingTransactionFilter();\n init_estimateContractGas();\n init_estimateFeesPerGas();\n init_estimateGas2();\n init_estimateMaxPriorityFeePerGas();\n init_getBalance();\n init_getBlobBaseFee();\n init_getBlock();\n init_getBlockNumber();\n init_getBlockTransactionCount();\n init_getChainId();\n init_getCode();\n init_getContractEvents();\n init_getEip712Domain();\n init_getFeeHistory();\n init_getFilterChanges();\n init_getFilterLogs();\n init_getGasPrice();\n init_getLogs();\n init_getProof();\n init_getStorageAt();\n init_getTransaction();\n init_getTransactionConfirmations();\n init_getTransactionCount();\n init_getTransactionReceipt();\n init_multicall();\n init_readContract();\n init_simulateBlocks();\n init_simulateCalls();\n init_simulateContract();\n init_uninstallFilter();\n init_verifyHash();\n init_verifyMessage();\n init_verifyTypedData();\n init_waitForTransactionReceipt();\n init_watchBlockNumber();\n init_watchBlocks();\n init_watchContractEvent();\n init_watchEvent();\n init_watchPendingTransactions();\n init_verifySiweMessage();\n init_prepareTransactionRequest();\n init_sendRawTransaction();\n init_sendRawTransactionSync();\n }\n });\n\n // ../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/clients/transports/createTransport.js\n function createTransport({ key, methods, name, request, retryCount = 3, retryDelay = 150, timeout, type }, value) {\n const uid2 = uid();\n return {\n config: {\n key,\n methods,\n name,\n request,\n retryCount,\n retryDelay,\n timeout,\n type\n },\n request: buildRequest(request, { methods, retryCount, retryDelay, uid: uid2 }),\n value\n };\n }\n var init_createTransport = __esm({\n \"../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/clients/transports/createTransport.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_buildRequest();\n init_uid();\n }\n });\n\n // ../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/clients/transports/custom.js\n function custom(provider, config2 = {}) {\n const { key = \"custom\", methods, name = \"Custom Provider\", retryDelay } = config2;\n return ({ retryCount: defaultRetryCount }) => createTransport({\n key,\n methods,\n name,\n request: provider.request.bind(provider),\n retryCount: config2.retryCount ?? defaultRetryCount,\n retryDelay,\n type: \"custom\"\n });\n }\n var init_custom = __esm({\n \"../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/clients/transports/custom.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_createTransport();\n }\n });\n\n // ../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/errors/transport.js\n var UrlRequiredError;\n var init_transport = __esm({\n \"../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/errors/transport.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_base();\n UrlRequiredError = class extends BaseError2 {\n constructor() {\n super(\"No URL was provided to the Transport. Please provide a valid RPC URL to the Transport.\", {\n docsPath: \"/docs/clients/intro\",\n name: \"UrlRequiredError\"\n });\n }\n };\n }\n });\n\n // ../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/clients/transports/http.js\n function http(url, config2 = {}) {\n const { batch, fetchFn, fetchOptions, key = \"http\", methods, name = \"HTTP JSON-RPC\", onFetchRequest, onFetchResponse, retryDelay, raw } = config2;\n return ({ chain: chain2, retryCount: retryCount_, timeout: timeout_ }) => {\n const { batchSize = 1e3, wait: wait2 = 0 } = typeof batch === \"object\" ? batch : {};\n const retryCount = config2.retryCount ?? retryCount_;\n const timeout = timeout_ ?? config2.timeout ?? 1e4;\n const url_ = url || chain2?.rpcUrls.default.http[0];\n if (!url_)\n throw new UrlRequiredError();\n const rpcClient = getHttpRpcClient(url_, {\n fetchFn,\n fetchOptions,\n onRequest: onFetchRequest,\n onResponse: onFetchResponse,\n timeout\n });\n return createTransport({\n key,\n methods,\n name,\n async request({ method, params }) {\n const body = { method, params };\n const { schedule } = createBatchScheduler({\n id: url_,\n wait: wait2,\n shouldSplitBatch(requests) {\n return requests.length > batchSize;\n },\n fn: (body2) => rpcClient.request({\n body: body2\n }),\n sort: (a3, b4) => a3.id - b4.id\n });\n const fn = async (body2) => batch ? schedule(body2) : [\n await rpcClient.request({\n body: body2\n })\n ];\n const [{ error, result }] = await fn(body);\n if (raw)\n return { error, result };\n if (error)\n throw new RpcRequestError({\n body,\n error,\n url: url_\n });\n return result;\n },\n retryCount,\n retryDelay,\n timeout,\n type: \"http\"\n }, {\n fetchOptions,\n url: url_\n });\n };\n }\n var init_http2 = __esm({\n \"../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/clients/transports/http.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_request();\n init_transport();\n init_createBatchScheduler();\n init_http();\n init_createTransport();\n }\n });\n\n // ../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/index.js\n var init_esm = __esm({\n \"../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/index.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_exports();\n init_getContract();\n init_createClient();\n init_public();\n init_createTransport();\n init_custom();\n init_http2();\n init_address2();\n init_bytes2();\n init_number();\n init_address();\n init_base();\n init_stateOverride();\n init_decodeErrorResult();\n init_encodeAbiParameters();\n init_encodeDeployData();\n init_encodeFunctionData();\n init_encodeFunctionResult();\n init_encodePacked();\n init_getContractAddress();\n init_isAddress();\n init_defineChain();\n init_concat();\n init_isHex();\n init_pad();\n init_size();\n init_trim();\n init_fromHex();\n init_toBytes();\n init_toHex();\n init_keccak256();\n init_hashMessage();\n init_hashTypedData();\n init_recoverAddress();\n }\n });\n\n // ../../../node_modules/.pnpm/@noble+curves@1.9.7/node_modules/@noble/curves/esm/utils.js\n function _abool2(value, title2 = \"\") {\n if (typeof value !== \"boolean\") {\n const prefix = title2 && `\"${title2}\"`;\n throw new Error(prefix + \"expected boolean, got type=\" + typeof value);\n }\n return value;\n }\n function _abytes2(value, length2, title2 = \"\") {\n const bytes = isBytes(value);\n const len = value?.length;\n const needsLen = length2 !== void 0;\n if (!bytes || needsLen && len !== length2) {\n const prefix = title2 && `\"${title2}\" `;\n const ofLen = needsLen ? ` of length ${length2}` : \"\";\n const got = bytes ? `length=${len}` : `type=${typeof value}`;\n throw new Error(prefix + \"expected Uint8Array\" + ofLen + \", got \" + got);\n }\n return value;\n }\n function numberToHexUnpadded2(num2) {\n const hex = num2.toString(16);\n return hex.length & 1 ? \"0\" + hex : hex;\n }\n function hexToNumber3(hex) {\n if (typeof hex !== \"string\")\n throw new Error(\"hex string expected, got \" + typeof hex);\n return hex === \"\" ? _0n7 : BigInt(\"0x\" + hex);\n }\n function bytesToNumberBE2(bytes) {\n return hexToNumber3(bytesToHex2(bytes));\n }\n function bytesToNumberLE2(bytes) {\n abytes(bytes);\n return hexToNumber3(bytesToHex2(Uint8Array.from(bytes).reverse()));\n }\n function numberToBytesBE2(n2, len) {\n return hexToBytes2(n2.toString(16).padStart(len * 2, \"0\"));\n }\n function numberToBytesLE2(n2, len) {\n return numberToBytesBE2(n2, len).reverse();\n }\n function ensureBytes2(title2, hex, expectedLength) {\n let res;\n if (typeof hex === \"string\") {\n try {\n res = hexToBytes2(hex);\n } catch (e3) {\n throw new Error(title2 + \" must be hex string or Uint8Array, cause: \" + e3);\n }\n } else if (isBytes(hex)) {\n res = Uint8Array.from(hex);\n } else {\n throw new Error(title2 + \" must be hex string or Uint8Array\");\n }\n const len = res.length;\n if (typeof expectedLength === \"number\" && len !== expectedLength)\n throw new Error(title2 + \" of length \" + expectedLength + \" expected, got \" + len);\n return res;\n }\n function inRange2(n2, min, max) {\n return isPosBig2(n2) && isPosBig2(min) && isPosBig2(max) && min <= n2 && n2 < max;\n }\n function aInRange2(title2, n2, min, max) {\n if (!inRange2(n2, min, max))\n throw new Error(\"expected valid \" + title2 + \": \" + min + \" <= n < \" + max + \", got \" + n2);\n }\n function bitLen2(n2) {\n let len;\n for (len = 0; n2 > _0n7; n2 >>= _1n7, len += 1)\n ;\n return len;\n }\n function createHmacDrbg2(hashLen, qByteLen, hmacFn) {\n if (typeof hashLen !== \"number\" || hashLen < 2)\n throw new Error(\"hashLen must be a number\");\n if (typeof qByteLen !== \"number\" || qByteLen < 2)\n throw new Error(\"qByteLen must be a number\");\n if (typeof hmacFn !== \"function\")\n throw new Error(\"hmacFn must be a function\");\n const u8n2 = (len) => new Uint8Array(len);\n const u8of = (byte) => Uint8Array.of(byte);\n let v2 = u8n2(hashLen);\n let k4 = u8n2(hashLen);\n let i3 = 0;\n const reset = () => {\n v2.fill(1);\n k4.fill(0);\n i3 = 0;\n };\n const h4 = (...b4) => hmacFn(k4, v2, ...b4);\n const reseed = (seed = u8n2(0)) => {\n k4 = h4(u8of(0), seed);\n v2 = h4();\n if (seed.length === 0)\n return;\n k4 = h4(u8of(1), seed);\n v2 = h4();\n };\n const gen2 = () => {\n if (i3++ >= 1e3)\n throw new Error(\"drbg: tried 1000 values\");\n let len = 0;\n const out = [];\n while (len < qByteLen) {\n v2 = h4();\n const sl = v2.slice();\n out.push(sl);\n len += v2.length;\n }\n return concatBytes(...out);\n };\n const genUntil = (seed, pred) => {\n reset();\n reseed(seed);\n let res = void 0;\n while (!(res = pred(gen2())))\n reseed();\n reset();\n return res;\n };\n return genUntil;\n }\n function _validateObject(object2, fields, optFields = {}) {\n if (!object2 || typeof object2 !== \"object\")\n throw new Error(\"expected valid options object\");\n function checkField(fieldName, expectedType, isOpt) {\n const val = object2[fieldName];\n if (isOpt && val === void 0)\n return;\n const current = typeof val;\n if (current !== expectedType || val === null)\n throw new Error(`param \"${fieldName}\" is invalid: expected ${expectedType}, got ${current}`);\n }\n Object.entries(fields).forEach(([k4, v2]) => checkField(k4, v2, false));\n Object.entries(optFields).forEach(([k4, v2]) => checkField(k4, v2, true));\n }\n function memoized2(fn) {\n const map = /* @__PURE__ */ new WeakMap();\n return (arg, ...args) => {\n const val = map.get(arg);\n if (val !== void 0)\n return val;\n const computed = fn(arg, ...args);\n map.set(arg, computed);\n return computed;\n };\n }\n var _0n7, _1n7, isPosBig2, bitMask2;\n var init_utils8 = __esm({\n \"../../../node_modules/.pnpm/@noble+curves@1.9.7/node_modules/@noble/curves/esm/utils.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_utils3();\n init_utils3();\n _0n7 = /* @__PURE__ */ BigInt(0);\n _1n7 = /* @__PURE__ */ BigInt(1);\n isPosBig2 = (n2) => typeof n2 === \"bigint\" && _0n7 <= n2;\n bitMask2 = (n2) => (_1n7 << BigInt(n2)) - _1n7;\n }\n });\n\n // ../../../node_modules/.pnpm/@noble+curves@1.9.7/node_modules/@noble/curves/esm/abstract/modular.js\n function mod2(a3, b4) {\n const result = a3 % b4;\n return result >= _0n8 ? result : b4 + result;\n }\n function pow22(x4, power, modulo) {\n let res = x4;\n while (power-- > _0n8) {\n res *= res;\n res %= modulo;\n }\n return res;\n }\n function invert2(number2, modulo) {\n if (number2 === _0n8)\n throw new Error(\"invert: expected non-zero number\");\n if (modulo <= _0n8)\n throw new Error(\"invert: expected positive modulus, got \" + modulo);\n let a3 = mod2(number2, modulo);\n let b4 = modulo;\n let x4 = _0n8, y6 = _1n8, u2 = _1n8, v2 = _0n8;\n while (a3 !== _0n8) {\n const q3 = b4 / a3;\n const r2 = b4 % a3;\n const m2 = x4 - u2 * q3;\n const n2 = y6 - v2 * q3;\n b4 = a3, a3 = r2, x4 = u2, y6 = v2, u2 = m2, v2 = n2;\n }\n const gcd = b4;\n if (gcd !== _1n8)\n throw new Error(\"invert: does not exist\");\n return mod2(x4, modulo);\n }\n function assertIsSquare(Fp, root, n2) {\n if (!Fp.eql(Fp.sqr(root), n2))\n throw new Error(\"Cannot find square root\");\n }\n function sqrt3mod42(Fp, n2) {\n const p1div4 = (Fp.ORDER + _1n8) / _4n3;\n const root = Fp.pow(n2, p1div4);\n assertIsSquare(Fp, root, n2);\n return root;\n }\n function sqrt5mod82(Fp, n2) {\n const p5div8 = (Fp.ORDER - _5n2) / _8n2;\n const n22 = Fp.mul(n2, _2n5);\n const v2 = Fp.pow(n22, p5div8);\n const nv = Fp.mul(n2, v2);\n const i3 = Fp.mul(Fp.mul(nv, _2n5), v2);\n const root = Fp.mul(nv, Fp.sub(i3, Fp.ONE));\n assertIsSquare(Fp, root, n2);\n return root;\n }\n function sqrt9mod16(P2) {\n const Fp_ = Field2(P2);\n const tn = tonelliShanks2(P2);\n const c1 = tn(Fp_, Fp_.neg(Fp_.ONE));\n const c22 = tn(Fp_, c1);\n const c32 = tn(Fp_, Fp_.neg(c1));\n const c4 = (P2 + _7n2) / _16n;\n return (Fp, n2) => {\n let tv1 = Fp.pow(n2, c4);\n let tv2 = Fp.mul(tv1, c1);\n const tv3 = Fp.mul(tv1, c22);\n const tv4 = Fp.mul(tv1, c32);\n const e1 = Fp.eql(Fp.sqr(tv2), n2);\n const e22 = Fp.eql(Fp.sqr(tv3), n2);\n tv1 = Fp.cmov(tv1, tv2, e1);\n tv2 = Fp.cmov(tv4, tv3, e22);\n const e3 = Fp.eql(Fp.sqr(tv2), n2);\n const root = Fp.cmov(tv1, tv2, e3);\n assertIsSquare(Fp, root, n2);\n return root;\n };\n }\n function tonelliShanks2(P2) {\n if (P2 < _3n3)\n throw new Error(\"sqrt is not defined for small field\");\n let Q2 = P2 - _1n8;\n let S3 = 0;\n while (Q2 % _2n5 === _0n8) {\n Q2 /= _2n5;\n S3++;\n }\n let Z2 = _2n5;\n const _Fp = Field2(P2);\n while (FpLegendre2(_Fp, Z2) === 1) {\n if (Z2++ > 1e3)\n throw new Error(\"Cannot find square root: probably non-prime P\");\n }\n if (S3 === 1)\n return sqrt3mod42;\n let cc = _Fp.pow(Z2, Q2);\n const Q1div2 = (Q2 + _1n8) / _2n5;\n return function tonelliSlow(Fp, n2) {\n if (Fp.is0(n2))\n return n2;\n if (FpLegendre2(Fp, n2) !== 1)\n throw new Error(\"Cannot find square root\");\n let M2 = S3;\n let c4 = Fp.mul(Fp.ONE, cc);\n let t3 = Fp.pow(n2, Q2);\n let R3 = Fp.pow(n2, Q1div2);\n while (!Fp.eql(t3, Fp.ONE)) {\n if (Fp.is0(t3))\n return Fp.ZERO;\n let i3 = 1;\n let t_tmp = Fp.sqr(t3);\n while (!Fp.eql(t_tmp, Fp.ONE)) {\n i3++;\n t_tmp = Fp.sqr(t_tmp);\n if (i3 === M2)\n throw new Error(\"Cannot find square root\");\n }\n const exponent = _1n8 << BigInt(M2 - i3 - 1);\n const b4 = Fp.pow(c4, exponent);\n M2 = i3;\n c4 = Fp.sqr(b4);\n t3 = Fp.mul(t3, c4);\n R3 = Fp.mul(R3, b4);\n }\n return R3;\n };\n }\n function FpSqrt2(P2) {\n if (P2 % _4n3 === _3n3)\n return sqrt3mod42;\n if (P2 % _8n2 === _5n2)\n return sqrt5mod82;\n if (P2 % _16n === _9n)\n return sqrt9mod16(P2);\n return tonelliShanks2(P2);\n }\n function validateField2(field) {\n const initial = {\n ORDER: \"bigint\",\n MASK: \"bigint\",\n BYTES: \"number\",\n BITS: \"number\"\n };\n const opts = FIELD_FIELDS2.reduce((map, val) => {\n map[val] = \"function\";\n return map;\n }, initial);\n _validateObject(field, opts);\n return field;\n }\n function FpPow2(Fp, num2, power) {\n if (power < _0n8)\n throw new Error(\"invalid exponent, negatives unsupported\");\n if (power === _0n8)\n return Fp.ONE;\n if (power === _1n8)\n return num2;\n let p4 = Fp.ONE;\n let d5 = num2;\n while (power > _0n8) {\n if (power & _1n8)\n p4 = Fp.mul(p4, d5);\n d5 = Fp.sqr(d5);\n power >>= _1n8;\n }\n return p4;\n }\n function FpInvertBatch2(Fp, nums, passZero = false) {\n const inverted = new Array(nums.length).fill(passZero ? Fp.ZERO : void 0);\n const multipliedAcc = nums.reduce((acc, num2, i3) => {\n if (Fp.is0(num2))\n return acc;\n inverted[i3] = acc;\n return Fp.mul(acc, num2);\n }, Fp.ONE);\n const invertedAcc = Fp.inv(multipliedAcc);\n nums.reduceRight((acc, num2, i3) => {\n if (Fp.is0(num2))\n return acc;\n inverted[i3] = Fp.mul(acc, inverted[i3]);\n return Fp.mul(acc, num2);\n }, invertedAcc);\n return inverted;\n }\n function FpLegendre2(Fp, n2) {\n const p1mod2 = (Fp.ORDER - _1n8) / _2n5;\n const powered = Fp.pow(n2, p1mod2);\n const yes = Fp.eql(powered, Fp.ONE);\n const zero = Fp.eql(powered, Fp.ZERO);\n const no = Fp.eql(powered, Fp.neg(Fp.ONE));\n if (!yes && !zero && !no)\n throw new Error(\"invalid Legendre symbol result\");\n return yes ? 1 : zero ? 0 : -1;\n }\n function nLength2(n2, nBitLength) {\n if (nBitLength !== void 0)\n anumber(nBitLength);\n const _nBitLength = nBitLength !== void 0 ? nBitLength : n2.toString(2).length;\n const nByteLength = Math.ceil(_nBitLength / 8);\n return { nBitLength: _nBitLength, nByteLength };\n }\n function Field2(ORDER, bitLenOrOpts, isLE3 = false, opts = {}) {\n if (ORDER <= _0n8)\n throw new Error(\"invalid field: expected ORDER > 0, got \" + ORDER);\n let _nbitLength = void 0;\n let _sqrt = void 0;\n let modFromBytes = false;\n let allowedLengths = void 0;\n if (typeof bitLenOrOpts === \"object\" && bitLenOrOpts != null) {\n if (opts.sqrt || isLE3)\n throw new Error(\"cannot specify opts in two arguments\");\n const _opts = bitLenOrOpts;\n if (_opts.BITS)\n _nbitLength = _opts.BITS;\n if (_opts.sqrt)\n _sqrt = _opts.sqrt;\n if (typeof _opts.isLE === \"boolean\")\n isLE3 = _opts.isLE;\n if (typeof _opts.modFromBytes === \"boolean\")\n modFromBytes = _opts.modFromBytes;\n allowedLengths = _opts.allowedLengths;\n } else {\n if (typeof bitLenOrOpts === \"number\")\n _nbitLength = bitLenOrOpts;\n if (opts.sqrt)\n _sqrt = opts.sqrt;\n }\n const { nBitLength: BITS, nByteLength: BYTES } = nLength2(ORDER, _nbitLength);\n if (BYTES > 2048)\n throw new Error(\"invalid field: expected ORDER of <= 2048 bytes\");\n let sqrtP;\n const f6 = Object.freeze({\n ORDER,\n isLE: isLE3,\n BITS,\n BYTES,\n MASK: bitMask2(BITS),\n ZERO: _0n8,\n ONE: _1n8,\n allowedLengths,\n create: (num2) => mod2(num2, ORDER),\n isValid: (num2) => {\n if (typeof num2 !== \"bigint\")\n throw new Error(\"invalid field element: expected bigint, got \" + typeof num2);\n return _0n8 <= num2 && num2 < ORDER;\n },\n is0: (num2) => num2 === _0n8,\n // is valid and invertible\n isValidNot0: (num2) => !f6.is0(num2) && f6.isValid(num2),\n isOdd: (num2) => (num2 & _1n8) === _1n8,\n neg: (num2) => mod2(-num2, ORDER),\n eql: (lhs, rhs) => lhs === rhs,\n sqr: (num2) => mod2(num2 * num2, ORDER),\n add: (lhs, rhs) => mod2(lhs + rhs, ORDER),\n sub: (lhs, rhs) => mod2(lhs - rhs, ORDER),\n mul: (lhs, rhs) => mod2(lhs * rhs, ORDER),\n pow: (num2, power) => FpPow2(f6, num2, power),\n div: (lhs, rhs) => mod2(lhs * invert2(rhs, ORDER), ORDER),\n // Same as above, but doesn't normalize\n sqrN: (num2) => num2 * num2,\n addN: (lhs, rhs) => lhs + rhs,\n subN: (lhs, rhs) => lhs - rhs,\n mulN: (lhs, rhs) => lhs * rhs,\n inv: (num2) => invert2(num2, ORDER),\n sqrt: _sqrt || ((n2) => {\n if (!sqrtP)\n sqrtP = FpSqrt2(ORDER);\n return sqrtP(f6, n2);\n }),\n toBytes: (num2) => isLE3 ? numberToBytesLE2(num2, BYTES) : numberToBytesBE2(num2, BYTES),\n fromBytes: (bytes, skipValidation = true) => {\n if (allowedLengths) {\n if (!allowedLengths.includes(bytes.length) || bytes.length > BYTES) {\n throw new Error(\"Field.fromBytes: expected \" + allowedLengths + \" bytes, got \" + bytes.length);\n }\n const padded = new Uint8Array(BYTES);\n padded.set(bytes, isLE3 ? 0 : padded.length - bytes.length);\n bytes = padded;\n }\n if (bytes.length !== BYTES)\n throw new Error(\"Field.fromBytes: expected \" + BYTES + \" bytes, got \" + bytes.length);\n let scalar = isLE3 ? bytesToNumberLE2(bytes) : bytesToNumberBE2(bytes);\n if (modFromBytes)\n scalar = mod2(scalar, ORDER);\n if (!skipValidation) {\n if (!f6.isValid(scalar))\n throw new Error(\"invalid field element: outside of range 0..ORDER\");\n }\n return scalar;\n },\n // TODO: we don't need it here, move out to separate fn\n invertBatch: (lst) => FpInvertBatch2(f6, lst),\n // We can't move this out because Fp6, Fp12 implement it\n // and it's unclear what to return in there.\n cmov: (a3, b4, c4) => c4 ? b4 : a3\n });\n return Object.freeze(f6);\n }\n function getFieldBytesLength2(fieldOrder) {\n if (typeof fieldOrder !== \"bigint\")\n throw new Error(\"field order must be bigint\");\n const bitLength = fieldOrder.toString(2).length;\n return Math.ceil(bitLength / 8);\n }\n function getMinHashLength2(fieldOrder) {\n const length2 = getFieldBytesLength2(fieldOrder);\n return length2 + Math.ceil(length2 / 2);\n }\n function mapHashToField2(key, fieldOrder, isLE3 = false) {\n const len = key.length;\n const fieldLen = getFieldBytesLength2(fieldOrder);\n const minLen = getMinHashLength2(fieldOrder);\n if (len < 16 || len < minLen || len > 1024)\n throw new Error(\"expected \" + minLen + \"-1024 bytes of input, got \" + len);\n const num2 = isLE3 ? bytesToNumberLE2(key) : bytesToNumberBE2(key);\n const reduced = mod2(num2, fieldOrder - _1n8) + _1n8;\n return isLE3 ? numberToBytesLE2(reduced, fieldLen) : numberToBytesBE2(reduced, fieldLen);\n }\n var _0n8, _1n8, _2n5, _3n3, _4n3, _5n2, _7n2, _8n2, _9n, _16n, FIELD_FIELDS2;\n var init_modular2 = __esm({\n \"../../../node_modules/.pnpm/@noble+curves@1.9.7/node_modules/@noble/curves/esm/abstract/modular.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_utils8();\n _0n8 = BigInt(0);\n _1n8 = BigInt(1);\n _2n5 = /* @__PURE__ */ BigInt(2);\n _3n3 = /* @__PURE__ */ BigInt(3);\n _4n3 = /* @__PURE__ */ BigInt(4);\n _5n2 = /* @__PURE__ */ BigInt(5);\n _7n2 = /* @__PURE__ */ BigInt(7);\n _8n2 = /* @__PURE__ */ BigInt(8);\n _9n = /* @__PURE__ */ BigInt(9);\n _16n = /* @__PURE__ */ BigInt(16);\n FIELD_FIELDS2 = [\n \"create\",\n \"isValid\",\n \"is0\",\n \"neg\",\n \"inv\",\n \"sqrt\",\n \"sqr\",\n \"eql\",\n \"add\",\n \"sub\",\n \"mul\",\n \"pow\",\n \"div\",\n \"addN\",\n \"subN\",\n \"mulN\",\n \"sqrN\"\n ];\n }\n });\n\n // ../../../node_modules/.pnpm/@noble+curves@1.9.7/node_modules/@noble/curves/esm/abstract/curve.js\n function negateCt(condition, item) {\n const neg = item.negate();\n return condition ? neg : item;\n }\n function normalizeZ(c4, points) {\n const invertedZs = FpInvertBatch2(c4.Fp, points.map((p4) => p4.Z));\n return points.map((p4, i3) => c4.fromAffine(p4.toAffine(invertedZs[i3])));\n }\n function validateW2(W, bits) {\n if (!Number.isSafeInteger(W) || W <= 0 || W > bits)\n throw new Error(\"invalid window size, expected [1..\" + bits + \"], got W=\" + W);\n }\n function calcWOpts2(W, scalarBits) {\n validateW2(W, scalarBits);\n const windows = Math.ceil(scalarBits / W) + 1;\n const windowSize = 2 ** (W - 1);\n const maxNumber = 2 ** W;\n const mask = bitMask2(W);\n const shiftBy = BigInt(W);\n return { windows, windowSize, mask, maxNumber, shiftBy };\n }\n function calcOffsets2(n2, window2, wOpts) {\n const { windowSize, mask, maxNumber, shiftBy } = wOpts;\n let wbits = Number(n2 & mask);\n let nextN = n2 >> shiftBy;\n if (wbits > windowSize) {\n wbits -= maxNumber;\n nextN += _1n9;\n }\n const offsetStart = window2 * windowSize;\n const offset = offsetStart + Math.abs(wbits) - 1;\n const isZero = wbits === 0;\n const isNeg = wbits < 0;\n const isNegF = window2 % 2 !== 0;\n const offsetF = offsetStart;\n return { nextN, offset, isZero, isNeg, isNegF, offsetF };\n }\n function validateMSMPoints2(points, c4) {\n if (!Array.isArray(points))\n throw new Error(\"array expected\");\n points.forEach((p4, i3) => {\n if (!(p4 instanceof c4))\n throw new Error(\"invalid point at index \" + i3);\n });\n }\n function validateMSMScalars2(scalars, field) {\n if (!Array.isArray(scalars))\n throw new Error(\"array of scalars expected\");\n scalars.forEach((s4, i3) => {\n if (!field.isValid(s4))\n throw new Error(\"invalid scalar at index \" + i3);\n });\n }\n function getW2(P2) {\n return pointWindowSizes2.get(P2) || 1;\n }\n function assert0(n2) {\n if (n2 !== _0n9)\n throw new Error(\"invalid wNAF\");\n }\n function mulEndoUnsafe(Point3, point, k1, k22) {\n let acc = point;\n let p1 = Point3.ZERO;\n let p22 = Point3.ZERO;\n while (k1 > _0n9 || k22 > _0n9) {\n if (k1 & _1n9)\n p1 = p1.add(acc);\n if (k22 & _1n9)\n p22 = p22.add(acc);\n acc = acc.double();\n k1 >>= _1n9;\n k22 >>= _1n9;\n }\n return { p1, p2: p22 };\n }\n function pippenger2(c4, fieldN, points, scalars) {\n validateMSMPoints2(points, c4);\n validateMSMScalars2(scalars, fieldN);\n const plength = points.length;\n const slength = scalars.length;\n if (plength !== slength)\n throw new Error(\"arrays of points and scalars must have equal length\");\n const zero = c4.ZERO;\n const wbits = bitLen2(BigInt(plength));\n let windowSize = 1;\n if (wbits > 12)\n windowSize = wbits - 3;\n else if (wbits > 4)\n windowSize = wbits - 2;\n else if (wbits > 0)\n windowSize = 2;\n const MASK = bitMask2(windowSize);\n const buckets = new Array(Number(MASK) + 1).fill(zero);\n const lastBits = Math.floor((fieldN.BITS - 1) / windowSize) * windowSize;\n let sum = zero;\n for (let i3 = lastBits; i3 >= 0; i3 -= windowSize) {\n buckets.fill(zero);\n for (let j2 = 0; j2 < slength; j2++) {\n const scalar = scalars[j2];\n const wbits2 = Number(scalar >> BigInt(i3) & MASK);\n buckets[wbits2] = buckets[wbits2].add(points[j2]);\n }\n let resI = zero;\n for (let j2 = buckets.length - 1, sumI = zero; j2 > 0; j2--) {\n sumI = sumI.add(buckets[j2]);\n resI = resI.add(sumI);\n }\n sum = sum.add(resI);\n if (i3 !== 0)\n for (let j2 = 0; j2 < windowSize; j2++)\n sum = sum.double();\n }\n return sum;\n }\n function createField(order2, field, isLE3) {\n if (field) {\n if (field.ORDER !== order2)\n throw new Error(\"Field.ORDER must match order: Fp == p, Fn == n\");\n validateField2(field);\n return field;\n } else {\n return Field2(order2, { isLE: isLE3 });\n }\n }\n function _createCurveFields(type, CURVE, curveOpts = {}, FpFnLE) {\n if (FpFnLE === void 0)\n FpFnLE = type === \"edwards\";\n if (!CURVE || typeof CURVE !== \"object\")\n throw new Error(`expected valid ${type} CURVE object`);\n for (const p4 of [\"p\", \"n\", \"h\"]) {\n const val = CURVE[p4];\n if (!(typeof val === \"bigint\" && val > _0n9))\n throw new Error(`CURVE.${p4} must be positive bigint`);\n }\n const Fp = createField(CURVE.p, curveOpts.Fp, FpFnLE);\n const Fn = createField(CURVE.n, curveOpts.Fn, FpFnLE);\n const _b = type === \"weierstrass\" ? \"b\" : \"d\";\n const params = [\"Gx\", \"Gy\", \"a\", _b];\n for (const p4 of params) {\n if (!Fp.isValid(CURVE[p4]))\n throw new Error(`CURVE.${p4} must be valid field element of CURVE.Fp`);\n }\n CURVE = Object.freeze(Object.assign({}, CURVE));\n return { CURVE, Fp, Fn };\n }\n var _0n9, _1n9, pointPrecomputes2, pointWindowSizes2, wNAF2;\n var init_curve2 = __esm({\n \"../../../node_modules/.pnpm/@noble+curves@1.9.7/node_modules/@noble/curves/esm/abstract/curve.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_utils8();\n init_modular2();\n _0n9 = BigInt(0);\n _1n9 = BigInt(1);\n pointPrecomputes2 = /* @__PURE__ */ new WeakMap();\n pointWindowSizes2 = /* @__PURE__ */ new WeakMap();\n wNAF2 = class {\n // Parametrized with a given Point class (not individual point)\n constructor(Point3, bits) {\n this.BASE = Point3.BASE;\n this.ZERO = Point3.ZERO;\n this.Fn = Point3.Fn;\n this.bits = bits;\n }\n // non-const time multiplication ladder\n _unsafeLadder(elm, n2, p4 = this.ZERO) {\n let d5 = elm;\n while (n2 > _0n9) {\n if (n2 & _1n9)\n p4 = p4.add(d5);\n d5 = d5.double();\n n2 >>= _1n9;\n }\n return p4;\n }\n /**\n * Creates a wNAF precomputation window. Used for caching.\n * Default window size is set by `utils.precompute()` and is equal to 8.\n * Number of precomputed points depends on the curve size:\n * 2^(𝑊−1) * (Math.ceil(𝑛 / 𝑊) + 1), where:\n * - 𝑊 is the window size\n * - 𝑛 is the bitlength of the curve order.\n * For a 256-bit curve and window size 8, the number of precomputed points is 128 * 33 = 4224.\n * @param point Point instance\n * @param W window size\n * @returns precomputed point tables flattened to a single array\n */\n precomputeWindow(point, W) {\n const { windows, windowSize } = calcWOpts2(W, this.bits);\n const points = [];\n let p4 = point;\n let base4 = p4;\n for (let window2 = 0; window2 < windows; window2++) {\n base4 = p4;\n points.push(base4);\n for (let i3 = 1; i3 < windowSize; i3++) {\n base4 = base4.add(p4);\n points.push(base4);\n }\n p4 = base4.double();\n }\n return points;\n }\n /**\n * Implements ec multiplication using precomputed tables and w-ary non-adjacent form.\n * More compact implementation:\n * https://github.com/paulmillr/noble-secp256k1/blob/47cb1669b6e506ad66b35fe7d76132ae97465da2/index.ts#L502-L541\n * @returns real and fake (for const-time) points\n */\n wNAF(W, precomputes, n2) {\n if (!this.Fn.isValid(n2))\n throw new Error(\"invalid scalar\");\n let p4 = this.ZERO;\n let f6 = this.BASE;\n const wo = calcWOpts2(W, this.bits);\n for (let window2 = 0; window2 < wo.windows; window2++) {\n const { nextN, offset, isZero, isNeg, isNegF, offsetF } = calcOffsets2(n2, window2, wo);\n n2 = nextN;\n if (isZero) {\n f6 = f6.add(negateCt(isNegF, precomputes[offsetF]));\n } else {\n p4 = p4.add(negateCt(isNeg, precomputes[offset]));\n }\n }\n assert0(n2);\n return { p: p4, f: f6 };\n }\n /**\n * Implements ec unsafe (non const-time) multiplication using precomputed tables and w-ary non-adjacent form.\n * @param acc accumulator point to add result of multiplication\n * @returns point\n */\n wNAFUnsafe(W, precomputes, n2, acc = this.ZERO) {\n const wo = calcWOpts2(W, this.bits);\n for (let window2 = 0; window2 < wo.windows; window2++) {\n if (n2 === _0n9)\n break;\n const { nextN, offset, isZero, isNeg } = calcOffsets2(n2, window2, wo);\n n2 = nextN;\n if (isZero) {\n continue;\n } else {\n const item = precomputes[offset];\n acc = acc.add(isNeg ? item.negate() : item);\n }\n }\n assert0(n2);\n return acc;\n }\n getPrecomputes(W, point, transform2) {\n let comp = pointPrecomputes2.get(point);\n if (!comp) {\n comp = this.precomputeWindow(point, W);\n if (W !== 1) {\n if (typeof transform2 === \"function\")\n comp = transform2(comp);\n pointPrecomputes2.set(point, comp);\n }\n }\n return comp;\n }\n cached(point, scalar, transform2) {\n const W = getW2(point);\n return this.wNAF(W, this.getPrecomputes(W, point, transform2), scalar);\n }\n unsafe(point, scalar, transform2, prev) {\n const W = getW2(point);\n if (W === 1)\n return this._unsafeLadder(point, scalar, prev);\n return this.wNAFUnsafe(W, this.getPrecomputes(W, point, transform2), scalar, prev);\n }\n // We calculate precomputes for elliptic curve point multiplication\n // using windowed method. This specifies window size and\n // stores precomputed values. Usually only base point would be precomputed.\n createCache(P2, W) {\n validateW2(W, this.bits);\n pointWindowSizes2.set(P2, W);\n pointPrecomputes2.delete(P2);\n }\n hasCache(elm) {\n return getW2(elm) !== 1;\n }\n };\n }\n });\n\n // ../../../node_modules/.pnpm/@noble+curves@1.9.7/node_modules/@noble/curves/esm/abstract/weierstrass.js\n function _splitEndoScalar(k4, basis, n2) {\n const [[a1, b1], [a22, b22]] = basis;\n const c1 = divNearest2(b22 * k4, n2);\n const c22 = divNearest2(-b1 * k4, n2);\n let k1 = k4 - c1 * a1 - c22 * a22;\n let k22 = -c1 * b1 - c22 * b22;\n const k1neg = k1 < _0n10;\n const k2neg = k22 < _0n10;\n if (k1neg)\n k1 = -k1;\n if (k2neg)\n k22 = -k22;\n const MAX_NUM = bitMask2(Math.ceil(bitLen2(n2) / 2)) + _1n10;\n if (k1 < _0n10 || k1 >= MAX_NUM || k22 < _0n10 || k22 >= MAX_NUM) {\n throw new Error(\"splitScalar (endomorphism): failed, k=\" + k4);\n }\n return { k1neg, k1, k2neg, k2: k22 };\n }\n function validateSigFormat(format) {\n if (![\"compact\", \"recovered\", \"der\"].includes(format))\n throw new Error('Signature format must be \"compact\", \"recovered\", or \"der\"');\n return format;\n }\n function validateSigOpts(opts, def) {\n const optsn = {};\n for (let optName of Object.keys(def)) {\n optsn[optName] = opts[optName] === void 0 ? def[optName] : opts[optName];\n }\n _abool2(optsn.lowS, \"lowS\");\n _abool2(optsn.prehash, \"prehash\");\n if (optsn.format !== void 0)\n validateSigFormat(optsn.format);\n return optsn;\n }\n function _normFnElement(Fn, key) {\n const { BYTES: expected } = Fn;\n let num2;\n if (typeof key === \"bigint\") {\n num2 = key;\n } else {\n let bytes = ensureBytes2(\"private key\", key);\n try {\n num2 = Fn.fromBytes(bytes);\n } catch (error) {\n throw new Error(`invalid private key: expected ui8a of size ${expected}, got ${typeof key}`);\n }\n }\n if (!Fn.isValidNot0(num2))\n throw new Error(\"invalid private key: out of range [1..N-1]\");\n return num2;\n }\n function weierstrassN(params, extraOpts = {}) {\n const validated = _createCurveFields(\"weierstrass\", params, extraOpts);\n const { Fp, Fn } = validated;\n let CURVE = validated.CURVE;\n const { h: cofactor, n: CURVE_ORDER } = CURVE;\n _validateObject(extraOpts, {}, {\n allowInfinityPoint: \"boolean\",\n clearCofactor: \"function\",\n isTorsionFree: \"function\",\n fromBytes: \"function\",\n toBytes: \"function\",\n endo: \"object\",\n wrapPrivateKey: \"boolean\"\n });\n const { endo } = extraOpts;\n if (endo) {\n if (!Fp.is0(CURVE.a) || typeof endo.beta !== \"bigint\" || !Array.isArray(endo.basises)) {\n throw new Error('invalid endo: expected \"beta\": bigint and \"basises\": array');\n }\n }\n const lengths = getWLengths(Fp, Fn);\n function assertCompressionIsSupported() {\n if (!Fp.isOdd)\n throw new Error(\"compression is not supported: Field does not have .isOdd()\");\n }\n function pointToBytes2(_c, point, isCompressed) {\n const { x: x4, y: y6 } = point.toAffine();\n const bx = Fp.toBytes(x4);\n _abool2(isCompressed, \"isCompressed\");\n if (isCompressed) {\n assertCompressionIsSupported();\n const hasEvenY = !Fp.isOdd(y6);\n return concatBytes(pprefix(hasEvenY), bx);\n } else {\n return concatBytes(Uint8Array.of(4), bx, Fp.toBytes(y6));\n }\n }\n function pointFromBytes(bytes) {\n _abytes2(bytes, void 0, \"Point\");\n const { publicKey: comp, publicKeyUncompressed: uncomp } = lengths;\n const length2 = bytes.length;\n const head = bytes[0];\n const tail = bytes.subarray(1);\n if (length2 === comp && (head === 2 || head === 3)) {\n const x4 = Fp.fromBytes(tail);\n if (!Fp.isValid(x4))\n throw new Error(\"bad point: is not on curve, wrong x\");\n const y22 = weierstrassEquation(x4);\n let y6;\n try {\n y6 = Fp.sqrt(y22);\n } catch (sqrtError) {\n const err = sqrtError instanceof Error ? \": \" + sqrtError.message : \"\";\n throw new Error(\"bad point: is not on curve, sqrt error\" + err);\n }\n assertCompressionIsSupported();\n const isYOdd = Fp.isOdd(y6);\n const isHeadOdd = (head & 1) === 1;\n if (isHeadOdd !== isYOdd)\n y6 = Fp.neg(y6);\n return { x: x4, y: y6 };\n } else if (length2 === uncomp && head === 4) {\n const L2 = Fp.BYTES;\n const x4 = Fp.fromBytes(tail.subarray(0, L2));\n const y6 = Fp.fromBytes(tail.subarray(L2, L2 * 2));\n if (!isValidXY(x4, y6))\n throw new Error(\"bad point: is not on curve\");\n return { x: x4, y: y6 };\n } else {\n throw new Error(`bad point: got length ${length2}, expected compressed=${comp} or uncompressed=${uncomp}`);\n }\n }\n const encodePoint = extraOpts.toBytes || pointToBytes2;\n const decodePoint = extraOpts.fromBytes || pointFromBytes;\n function weierstrassEquation(x4) {\n const x22 = Fp.sqr(x4);\n const x32 = Fp.mul(x22, x4);\n return Fp.add(Fp.add(x32, Fp.mul(x4, CURVE.a)), CURVE.b);\n }\n function isValidXY(x4, y6) {\n const left = Fp.sqr(y6);\n const right = weierstrassEquation(x4);\n return Fp.eql(left, right);\n }\n if (!isValidXY(CURVE.Gx, CURVE.Gy))\n throw new Error(\"bad curve params: generator point\");\n const _4a3 = Fp.mul(Fp.pow(CURVE.a, _3n4), _4n4);\n const _27b2 = Fp.mul(Fp.sqr(CURVE.b), BigInt(27));\n if (Fp.is0(Fp.add(_4a3, _27b2)))\n throw new Error(\"bad curve params: a or b\");\n function acoord(title2, n2, banZero = false) {\n if (!Fp.isValid(n2) || banZero && Fp.is0(n2))\n throw new Error(`bad point coordinate ${title2}`);\n return n2;\n }\n function aprjpoint(other) {\n if (!(other instanceof Point3))\n throw new Error(\"ProjectivePoint expected\");\n }\n function splitEndoScalarN(k4) {\n if (!endo || !endo.basises)\n throw new Error(\"no endo\");\n return _splitEndoScalar(k4, endo.basises, Fn.ORDER);\n }\n const toAffineMemo = memoized2((p4, iz) => {\n const { X: X2, Y: Y2, Z: Z2 } = p4;\n if (Fp.eql(Z2, Fp.ONE))\n return { x: X2, y: Y2 };\n const is0 = p4.is0();\n if (iz == null)\n iz = is0 ? Fp.ONE : Fp.inv(Z2);\n const x4 = Fp.mul(X2, iz);\n const y6 = Fp.mul(Y2, iz);\n const zz = Fp.mul(Z2, iz);\n if (is0)\n return { x: Fp.ZERO, y: Fp.ZERO };\n if (!Fp.eql(zz, Fp.ONE))\n throw new Error(\"invZ was invalid\");\n return { x: x4, y: y6 };\n });\n const assertValidMemo = memoized2((p4) => {\n if (p4.is0()) {\n if (extraOpts.allowInfinityPoint && !Fp.is0(p4.Y))\n return;\n throw new Error(\"bad point: ZERO\");\n }\n const { x: x4, y: y6 } = p4.toAffine();\n if (!Fp.isValid(x4) || !Fp.isValid(y6))\n throw new Error(\"bad point: x or y not field elements\");\n if (!isValidXY(x4, y6))\n throw new Error(\"bad point: equation left != right\");\n if (!p4.isTorsionFree())\n throw new Error(\"bad point: not in prime-order subgroup\");\n return true;\n });\n function finishEndo(endoBeta, k1p, k2p, k1neg, k2neg) {\n k2p = new Point3(Fp.mul(k2p.X, endoBeta), k2p.Y, k2p.Z);\n k1p = negateCt(k1neg, k1p);\n k2p = negateCt(k2neg, k2p);\n return k1p.add(k2p);\n }\n class Point3 {\n /** Does NOT validate if the point is valid. Use `.assertValidity()`. */\n constructor(X2, Y2, Z2) {\n this.X = acoord(\"x\", X2);\n this.Y = acoord(\"y\", Y2, true);\n this.Z = acoord(\"z\", Z2);\n Object.freeze(this);\n }\n static CURVE() {\n return CURVE;\n }\n /** Does NOT validate if the point is valid. Use `.assertValidity()`. */\n static fromAffine(p4) {\n const { x: x4, y: y6 } = p4 || {};\n if (!p4 || !Fp.isValid(x4) || !Fp.isValid(y6))\n throw new Error(\"invalid affine point\");\n if (p4 instanceof Point3)\n throw new Error(\"projective point not allowed\");\n if (Fp.is0(x4) && Fp.is0(y6))\n return Point3.ZERO;\n return new Point3(x4, y6, Fp.ONE);\n }\n static fromBytes(bytes) {\n const P2 = Point3.fromAffine(decodePoint(_abytes2(bytes, void 0, \"point\")));\n P2.assertValidity();\n return P2;\n }\n static fromHex(hex) {\n return Point3.fromBytes(ensureBytes2(\"pointHex\", hex));\n }\n get x() {\n return this.toAffine().x;\n }\n get y() {\n return this.toAffine().y;\n }\n /**\n *\n * @param windowSize\n * @param isLazy true will defer table computation until the first multiplication\n * @returns\n */\n precompute(windowSize = 8, isLazy = true) {\n wnaf.createCache(this, windowSize);\n if (!isLazy)\n this.multiply(_3n4);\n return this;\n }\n // TODO: return `this`\n /** A point on curve is valid if it conforms to equation. */\n assertValidity() {\n assertValidMemo(this);\n }\n hasEvenY() {\n const { y: y6 } = this.toAffine();\n if (!Fp.isOdd)\n throw new Error(\"Field doesn't support isOdd\");\n return !Fp.isOdd(y6);\n }\n /** Compare one point to another. */\n equals(other) {\n aprjpoint(other);\n const { X: X1, Y: Y1, Z: Z1 } = this;\n const { X: X2, Y: Y2, Z: Z2 } = other;\n const U1 = Fp.eql(Fp.mul(X1, Z2), Fp.mul(X2, Z1));\n const U22 = Fp.eql(Fp.mul(Y1, Z2), Fp.mul(Y2, Z1));\n return U1 && U22;\n }\n /** Flips point to one corresponding to (x, -y) in Affine coordinates. */\n negate() {\n return new Point3(this.X, Fp.neg(this.Y), this.Z);\n }\n // Renes-Costello-Batina exception-free doubling formula.\n // There is 30% faster Jacobian formula, but it is not complete.\n // https://eprint.iacr.org/2015/1060, algorithm 3\n // Cost: 8M + 3S + 3*a + 2*b3 + 15add.\n double() {\n const { a: a3, b: b4 } = CURVE;\n const b32 = Fp.mul(b4, _3n4);\n const { X: X1, Y: Y1, Z: Z1 } = this;\n let X3 = Fp.ZERO, Y3 = Fp.ZERO, Z3 = Fp.ZERO;\n let t0 = Fp.mul(X1, X1);\n let t1 = Fp.mul(Y1, Y1);\n let t22 = Fp.mul(Z1, Z1);\n let t3 = Fp.mul(X1, Y1);\n t3 = Fp.add(t3, t3);\n Z3 = Fp.mul(X1, Z1);\n Z3 = Fp.add(Z3, Z3);\n X3 = Fp.mul(a3, Z3);\n Y3 = Fp.mul(b32, t22);\n Y3 = Fp.add(X3, Y3);\n X3 = Fp.sub(t1, Y3);\n Y3 = Fp.add(t1, Y3);\n Y3 = Fp.mul(X3, Y3);\n X3 = Fp.mul(t3, X3);\n Z3 = Fp.mul(b32, Z3);\n t22 = Fp.mul(a3, t22);\n t3 = Fp.sub(t0, t22);\n t3 = Fp.mul(a3, t3);\n t3 = Fp.add(t3, Z3);\n Z3 = Fp.add(t0, t0);\n t0 = Fp.add(Z3, t0);\n t0 = Fp.add(t0, t22);\n t0 = Fp.mul(t0, t3);\n Y3 = Fp.add(Y3, t0);\n t22 = Fp.mul(Y1, Z1);\n t22 = Fp.add(t22, t22);\n t0 = Fp.mul(t22, t3);\n X3 = Fp.sub(X3, t0);\n Z3 = Fp.mul(t22, t1);\n Z3 = Fp.add(Z3, Z3);\n Z3 = Fp.add(Z3, Z3);\n return new Point3(X3, Y3, Z3);\n }\n // Renes-Costello-Batina exception-free addition formula.\n // There is 30% faster Jacobian formula, but it is not complete.\n // https://eprint.iacr.org/2015/1060, algorithm 1\n // Cost: 12M + 0S + 3*a + 3*b3 + 23add.\n add(other) {\n aprjpoint(other);\n const { X: X1, Y: Y1, Z: Z1 } = this;\n const { X: X2, Y: Y2, Z: Z2 } = other;\n let X3 = Fp.ZERO, Y3 = Fp.ZERO, Z3 = Fp.ZERO;\n const a3 = CURVE.a;\n const b32 = Fp.mul(CURVE.b, _3n4);\n let t0 = Fp.mul(X1, X2);\n let t1 = Fp.mul(Y1, Y2);\n let t22 = Fp.mul(Z1, Z2);\n let t3 = Fp.add(X1, Y1);\n let t4 = Fp.add(X2, Y2);\n t3 = Fp.mul(t3, t4);\n t4 = Fp.add(t0, t1);\n t3 = Fp.sub(t3, t4);\n t4 = Fp.add(X1, Z1);\n let t5 = Fp.add(X2, Z2);\n t4 = Fp.mul(t4, t5);\n t5 = Fp.add(t0, t22);\n t4 = Fp.sub(t4, t5);\n t5 = Fp.add(Y1, Z1);\n X3 = Fp.add(Y2, Z2);\n t5 = Fp.mul(t5, X3);\n X3 = Fp.add(t1, t22);\n t5 = Fp.sub(t5, X3);\n Z3 = Fp.mul(a3, t4);\n X3 = Fp.mul(b32, t22);\n Z3 = Fp.add(X3, Z3);\n X3 = Fp.sub(t1, Z3);\n Z3 = Fp.add(t1, Z3);\n Y3 = Fp.mul(X3, Z3);\n t1 = Fp.add(t0, t0);\n t1 = Fp.add(t1, t0);\n t22 = Fp.mul(a3, t22);\n t4 = Fp.mul(b32, t4);\n t1 = Fp.add(t1, t22);\n t22 = Fp.sub(t0, t22);\n t22 = Fp.mul(a3, t22);\n t4 = Fp.add(t4, t22);\n t0 = Fp.mul(t1, t4);\n Y3 = Fp.add(Y3, t0);\n t0 = Fp.mul(t5, t4);\n X3 = Fp.mul(t3, X3);\n X3 = Fp.sub(X3, t0);\n t0 = Fp.mul(t3, t1);\n Z3 = Fp.mul(t5, Z3);\n Z3 = Fp.add(Z3, t0);\n return new Point3(X3, Y3, Z3);\n }\n subtract(other) {\n return this.add(other.negate());\n }\n is0() {\n return this.equals(Point3.ZERO);\n }\n /**\n * Constant time multiplication.\n * Uses wNAF method. Windowed method may be 10% faster,\n * but takes 2x longer to generate and consumes 2x memory.\n * Uses precomputes when available.\n * Uses endomorphism for Koblitz curves.\n * @param scalar by which the point would be multiplied\n * @returns New point\n */\n multiply(scalar) {\n const { endo: endo2 } = extraOpts;\n if (!Fn.isValidNot0(scalar))\n throw new Error(\"invalid scalar: out of range\");\n let point, fake;\n const mul = (n2) => wnaf.cached(this, n2, (p4) => normalizeZ(Point3, p4));\n if (endo2) {\n const { k1neg, k1, k2neg, k2: k22 } = splitEndoScalarN(scalar);\n const { p: k1p, f: k1f } = mul(k1);\n const { p: k2p, f: k2f } = mul(k22);\n fake = k1f.add(k2f);\n point = finishEndo(endo2.beta, k1p, k2p, k1neg, k2neg);\n } else {\n const { p: p4, f: f6 } = mul(scalar);\n point = p4;\n fake = f6;\n }\n return normalizeZ(Point3, [point, fake])[0];\n }\n /**\n * Non-constant-time multiplication. Uses double-and-add algorithm.\n * It's faster, but should only be used when you don't care about\n * an exposed secret key e.g. sig verification, which works over *public* keys.\n */\n multiplyUnsafe(sc) {\n const { endo: endo2 } = extraOpts;\n const p4 = this;\n if (!Fn.isValid(sc))\n throw new Error(\"invalid scalar: out of range\");\n if (sc === _0n10 || p4.is0())\n return Point3.ZERO;\n if (sc === _1n10)\n return p4;\n if (wnaf.hasCache(this))\n return this.multiply(sc);\n if (endo2) {\n const { k1neg, k1, k2neg, k2: k22 } = splitEndoScalarN(sc);\n const { p1, p2: p22 } = mulEndoUnsafe(Point3, p4, k1, k22);\n return finishEndo(endo2.beta, p1, p22, k1neg, k2neg);\n } else {\n return wnaf.unsafe(p4, sc);\n }\n }\n multiplyAndAddUnsafe(Q2, a3, b4) {\n const sum = this.multiplyUnsafe(a3).add(Q2.multiplyUnsafe(b4));\n return sum.is0() ? void 0 : sum;\n }\n /**\n * Converts Projective point to affine (x, y) coordinates.\n * @param invertedZ Z^-1 (inverted zero) - optional, precomputation is useful for invertBatch\n */\n toAffine(invertedZ) {\n return toAffineMemo(this, invertedZ);\n }\n /**\n * Checks whether Point is free of torsion elements (is in prime subgroup).\n * Always torsion-free for cofactor=1 curves.\n */\n isTorsionFree() {\n const { isTorsionFree } = extraOpts;\n if (cofactor === _1n10)\n return true;\n if (isTorsionFree)\n return isTorsionFree(Point3, this);\n return wnaf.unsafe(this, CURVE_ORDER).is0();\n }\n clearCofactor() {\n const { clearCofactor } = extraOpts;\n if (cofactor === _1n10)\n return this;\n if (clearCofactor)\n return clearCofactor(Point3, this);\n return this.multiplyUnsafe(cofactor);\n }\n isSmallOrder() {\n return this.multiplyUnsafe(cofactor).is0();\n }\n toBytes(isCompressed = true) {\n _abool2(isCompressed, \"isCompressed\");\n this.assertValidity();\n return encodePoint(Point3, this, isCompressed);\n }\n toHex(isCompressed = true) {\n return bytesToHex2(this.toBytes(isCompressed));\n }\n toString() {\n return ``;\n }\n // TODO: remove\n get px() {\n return this.X;\n }\n get py() {\n return this.X;\n }\n get pz() {\n return this.Z;\n }\n toRawBytes(isCompressed = true) {\n return this.toBytes(isCompressed);\n }\n _setWindowSize(windowSize) {\n this.precompute(windowSize);\n }\n static normalizeZ(points) {\n return normalizeZ(Point3, points);\n }\n static msm(points, scalars) {\n return pippenger2(Point3, Fn, points, scalars);\n }\n static fromPrivateKey(privateKey) {\n return Point3.BASE.multiply(_normFnElement(Fn, privateKey));\n }\n }\n Point3.BASE = new Point3(CURVE.Gx, CURVE.Gy, Fp.ONE);\n Point3.ZERO = new Point3(Fp.ZERO, Fp.ONE, Fp.ZERO);\n Point3.Fp = Fp;\n Point3.Fn = Fn;\n const bits = Fn.BITS;\n const wnaf = new wNAF2(Point3, extraOpts.endo ? Math.ceil(bits / 2) : bits);\n Point3.BASE.precompute(8);\n return Point3;\n }\n function pprefix(hasEvenY) {\n return Uint8Array.of(hasEvenY ? 2 : 3);\n }\n function getWLengths(Fp, Fn) {\n return {\n secretKey: Fn.BYTES,\n publicKey: 1 + Fp.BYTES,\n publicKeyUncompressed: 1 + 2 * Fp.BYTES,\n publicKeyHasPrefix: true,\n signature: 2 * Fn.BYTES\n };\n }\n function ecdh(Point3, ecdhOpts = {}) {\n const { Fn } = Point3;\n const randomBytes_ = ecdhOpts.randomBytes || randomBytes;\n const lengths = Object.assign(getWLengths(Point3.Fp, Fn), { seed: getMinHashLength2(Fn.ORDER) });\n function isValidSecretKey(secretKey) {\n try {\n return !!_normFnElement(Fn, secretKey);\n } catch (error) {\n return false;\n }\n }\n function isValidPublicKey(publicKey, isCompressed) {\n const { publicKey: comp, publicKeyUncompressed } = lengths;\n try {\n const l6 = publicKey.length;\n if (isCompressed === true && l6 !== comp)\n return false;\n if (isCompressed === false && l6 !== publicKeyUncompressed)\n return false;\n return !!Point3.fromBytes(publicKey);\n } catch (error) {\n return false;\n }\n }\n function randomSecretKey(seed = randomBytes_(lengths.seed)) {\n return mapHashToField2(_abytes2(seed, lengths.seed, \"seed\"), Fn.ORDER);\n }\n function getPublicKey(secretKey, isCompressed = true) {\n return Point3.BASE.multiply(_normFnElement(Fn, secretKey)).toBytes(isCompressed);\n }\n function keygen(seed) {\n const secretKey = randomSecretKey(seed);\n return { secretKey, publicKey: getPublicKey(secretKey) };\n }\n function isProbPub(item) {\n if (typeof item === \"bigint\")\n return false;\n if (item instanceof Point3)\n return true;\n const { secretKey, publicKey, publicKeyUncompressed } = lengths;\n if (Fn.allowedLengths || secretKey === publicKey)\n return void 0;\n const l6 = ensureBytes2(\"key\", item).length;\n return l6 === publicKey || l6 === publicKeyUncompressed;\n }\n function getSharedSecret(secretKeyA, publicKeyB, isCompressed = true) {\n if (isProbPub(secretKeyA) === true)\n throw new Error(\"first arg must be private key\");\n if (isProbPub(publicKeyB) === false)\n throw new Error(\"second arg must be public key\");\n const s4 = _normFnElement(Fn, secretKeyA);\n const b4 = Point3.fromHex(publicKeyB);\n return b4.multiply(s4).toBytes(isCompressed);\n }\n const utils = {\n isValidSecretKey,\n isValidPublicKey,\n randomSecretKey,\n // TODO: remove\n isValidPrivateKey: isValidSecretKey,\n randomPrivateKey: randomSecretKey,\n normPrivateKeyToScalar: (key) => _normFnElement(Fn, key),\n precompute(windowSize = 8, point = Point3.BASE) {\n return point.precompute(windowSize, false);\n }\n };\n return Object.freeze({ getPublicKey, getSharedSecret, keygen, Point: Point3, utils, lengths });\n }\n function ecdsa(Point3, hash3, ecdsaOpts = {}) {\n ahash(hash3);\n _validateObject(ecdsaOpts, {}, {\n hmac: \"function\",\n lowS: \"boolean\",\n randomBytes: \"function\",\n bits2int: \"function\",\n bits2int_modN: \"function\"\n });\n const randomBytes2 = ecdsaOpts.randomBytes || randomBytes;\n const hmac2 = ecdsaOpts.hmac || ((key, ...msgs) => hmac(hash3, key, concatBytes(...msgs)));\n const { Fp, Fn } = Point3;\n const { ORDER: CURVE_ORDER, BITS: fnBits } = Fn;\n const { keygen, getPublicKey, getSharedSecret, utils, lengths } = ecdh(Point3, ecdsaOpts);\n const defaultSigOpts = {\n prehash: false,\n lowS: typeof ecdsaOpts.lowS === \"boolean\" ? ecdsaOpts.lowS : false,\n format: void 0,\n //'compact' as ECDSASigFormat,\n extraEntropy: false\n };\n const defaultSigOpts_format = \"compact\";\n function isBiggerThanHalfOrder(number2) {\n const HALF = CURVE_ORDER >> _1n10;\n return number2 > HALF;\n }\n function validateRS(title2, num2) {\n if (!Fn.isValidNot0(num2))\n throw new Error(`invalid signature ${title2}: out of range 1..Point.Fn.ORDER`);\n return num2;\n }\n function validateSigLength(bytes, format) {\n validateSigFormat(format);\n const size6 = lengths.signature;\n const sizer = format === \"compact\" ? size6 : format === \"recovered\" ? size6 + 1 : void 0;\n return _abytes2(bytes, sizer, `${format} signature`);\n }\n class Signature2 {\n constructor(r2, s4, recovery) {\n this.r = validateRS(\"r\", r2);\n this.s = validateRS(\"s\", s4);\n if (recovery != null)\n this.recovery = recovery;\n Object.freeze(this);\n }\n static fromBytes(bytes, format = defaultSigOpts_format) {\n validateSigLength(bytes, format);\n let recid;\n if (format === \"der\") {\n const { r: r3, s: s5 } = DER2.toSig(_abytes2(bytes));\n return new Signature2(r3, s5);\n }\n if (format === \"recovered\") {\n recid = bytes[0];\n format = \"compact\";\n bytes = bytes.subarray(1);\n }\n const L2 = Fn.BYTES;\n const r2 = bytes.subarray(0, L2);\n const s4 = bytes.subarray(L2, L2 * 2);\n return new Signature2(Fn.fromBytes(r2), Fn.fromBytes(s4), recid);\n }\n static fromHex(hex, format) {\n return this.fromBytes(hexToBytes2(hex), format);\n }\n addRecoveryBit(recovery) {\n return new Signature2(this.r, this.s, recovery);\n }\n recoverPublicKey(messageHash) {\n const FIELD_ORDER = Fp.ORDER;\n const { r: r2, s: s4, recovery: rec } = this;\n if (rec == null || ![0, 1, 2, 3].includes(rec))\n throw new Error(\"recovery id invalid\");\n const hasCofactor = CURVE_ORDER * _2n6 < FIELD_ORDER;\n if (hasCofactor && rec > 1)\n throw new Error(\"recovery id is ambiguous for h>1 curve\");\n const radj = rec === 2 || rec === 3 ? r2 + CURVE_ORDER : r2;\n if (!Fp.isValid(radj))\n throw new Error(\"recovery id 2 or 3 invalid\");\n const x4 = Fp.toBytes(radj);\n const R3 = Point3.fromBytes(concatBytes(pprefix((rec & 1) === 0), x4));\n const ir = Fn.inv(radj);\n const h4 = bits2int_modN(ensureBytes2(\"msgHash\", messageHash));\n const u1 = Fn.create(-h4 * ir);\n const u2 = Fn.create(s4 * ir);\n const Q2 = Point3.BASE.multiplyUnsafe(u1).add(R3.multiplyUnsafe(u2));\n if (Q2.is0())\n throw new Error(\"point at infinify\");\n Q2.assertValidity();\n return Q2;\n }\n // Signatures should be low-s, to prevent malleability.\n hasHighS() {\n return isBiggerThanHalfOrder(this.s);\n }\n toBytes(format = defaultSigOpts_format) {\n validateSigFormat(format);\n if (format === \"der\")\n return hexToBytes2(DER2.hexFromSig(this));\n const r2 = Fn.toBytes(this.r);\n const s4 = Fn.toBytes(this.s);\n if (format === \"recovered\") {\n if (this.recovery == null)\n throw new Error(\"recovery bit must be present\");\n return concatBytes(Uint8Array.of(this.recovery), r2, s4);\n }\n return concatBytes(r2, s4);\n }\n toHex(format) {\n return bytesToHex2(this.toBytes(format));\n }\n // TODO: remove\n assertValidity() {\n }\n static fromCompact(hex) {\n return Signature2.fromBytes(ensureBytes2(\"sig\", hex), \"compact\");\n }\n static fromDER(hex) {\n return Signature2.fromBytes(ensureBytes2(\"sig\", hex), \"der\");\n }\n normalizeS() {\n return this.hasHighS() ? new Signature2(this.r, Fn.neg(this.s), this.recovery) : this;\n }\n toDERRawBytes() {\n return this.toBytes(\"der\");\n }\n toDERHex() {\n return bytesToHex2(this.toBytes(\"der\"));\n }\n toCompactRawBytes() {\n return this.toBytes(\"compact\");\n }\n toCompactHex() {\n return bytesToHex2(this.toBytes(\"compact\"));\n }\n }\n const bits2int = ecdsaOpts.bits2int || function bits2int_def(bytes) {\n if (bytes.length > 8192)\n throw new Error(\"input is too large\");\n const num2 = bytesToNumberBE2(bytes);\n const delta = bytes.length * 8 - fnBits;\n return delta > 0 ? num2 >> BigInt(delta) : num2;\n };\n const bits2int_modN = ecdsaOpts.bits2int_modN || function bits2int_modN_def(bytes) {\n return Fn.create(bits2int(bytes));\n };\n const ORDER_MASK = bitMask2(fnBits);\n function int2octets(num2) {\n aInRange2(\"num < 2^\" + fnBits, num2, _0n10, ORDER_MASK);\n return Fn.toBytes(num2);\n }\n function validateMsgAndHash(message, prehash) {\n _abytes2(message, void 0, \"message\");\n return prehash ? _abytes2(hash3(message), void 0, \"prehashed message\") : message;\n }\n function prepSig(message, privateKey, opts) {\n if ([\"recovered\", \"canonical\"].some((k4) => k4 in opts))\n throw new Error(\"sign() legacy options not supported\");\n const { lowS, prehash, extraEntropy: extraEntropy2 } = validateSigOpts(opts, defaultSigOpts);\n message = validateMsgAndHash(message, prehash);\n const h1int = bits2int_modN(message);\n const d5 = _normFnElement(Fn, privateKey);\n const seedArgs = [int2octets(d5), int2octets(h1int)];\n if (extraEntropy2 != null && extraEntropy2 !== false) {\n const e3 = extraEntropy2 === true ? randomBytes2(lengths.secretKey) : extraEntropy2;\n seedArgs.push(ensureBytes2(\"extraEntropy\", e3));\n }\n const seed = concatBytes(...seedArgs);\n const m2 = h1int;\n function k2sig(kBytes) {\n const k4 = bits2int(kBytes);\n if (!Fn.isValidNot0(k4))\n return;\n const ik = Fn.inv(k4);\n const q3 = Point3.BASE.multiply(k4).toAffine();\n const r2 = Fn.create(q3.x);\n if (r2 === _0n10)\n return;\n const s4 = Fn.create(ik * Fn.create(m2 + r2 * d5));\n if (s4 === _0n10)\n return;\n let recovery = (q3.x === r2 ? 0 : 2) | Number(q3.y & _1n10);\n let normS = s4;\n if (lowS && isBiggerThanHalfOrder(s4)) {\n normS = Fn.neg(s4);\n recovery ^= 1;\n }\n return new Signature2(r2, normS, recovery);\n }\n return { seed, k2sig };\n }\n function sign3(message, secretKey, opts = {}) {\n message = ensureBytes2(\"message\", message);\n const { seed, k2sig } = prepSig(message, secretKey, opts);\n const drbg = createHmacDrbg2(hash3.outputLen, Fn.BYTES, hmac2);\n const sig = drbg(seed, k2sig);\n return sig;\n }\n function tryParsingSig(sg) {\n let sig = void 0;\n const isHex2 = typeof sg === \"string\" || isBytes(sg);\n const isObj = !isHex2 && sg !== null && typeof sg === \"object\" && typeof sg.r === \"bigint\" && typeof sg.s === \"bigint\";\n if (!isHex2 && !isObj)\n throw new Error(\"invalid signature, expected Uint8Array, hex string or Signature instance\");\n if (isObj) {\n sig = new Signature2(sg.r, sg.s);\n } else if (isHex2) {\n try {\n sig = Signature2.fromBytes(ensureBytes2(\"sig\", sg), \"der\");\n } catch (derError) {\n if (!(derError instanceof DER2.Err))\n throw derError;\n }\n if (!sig) {\n try {\n sig = Signature2.fromBytes(ensureBytes2(\"sig\", sg), \"compact\");\n } catch (error) {\n return false;\n }\n }\n }\n if (!sig)\n return false;\n return sig;\n }\n function verify(signature, message, publicKey, opts = {}) {\n const { lowS, prehash, format } = validateSigOpts(opts, defaultSigOpts);\n publicKey = ensureBytes2(\"publicKey\", publicKey);\n message = validateMsgAndHash(ensureBytes2(\"message\", message), prehash);\n if (\"strict\" in opts)\n throw new Error(\"options.strict was renamed to lowS\");\n const sig = format === void 0 ? tryParsingSig(signature) : Signature2.fromBytes(ensureBytes2(\"sig\", signature), format);\n if (sig === false)\n return false;\n try {\n const P2 = Point3.fromBytes(publicKey);\n if (lowS && sig.hasHighS())\n return false;\n const { r: r2, s: s4 } = sig;\n const h4 = bits2int_modN(message);\n const is = Fn.inv(s4);\n const u1 = Fn.create(h4 * is);\n const u2 = Fn.create(r2 * is);\n const R3 = Point3.BASE.multiplyUnsafe(u1).add(P2.multiplyUnsafe(u2));\n if (R3.is0())\n return false;\n const v2 = Fn.create(R3.x);\n return v2 === r2;\n } catch (e3) {\n return false;\n }\n }\n function recoverPublicKey3(signature, message, opts = {}) {\n const { prehash } = validateSigOpts(opts, defaultSigOpts);\n message = validateMsgAndHash(message, prehash);\n return Signature2.fromBytes(signature, \"recovered\").recoverPublicKey(message).toBytes();\n }\n return Object.freeze({\n keygen,\n getPublicKey,\n getSharedSecret,\n utils,\n lengths,\n Point: Point3,\n sign: sign3,\n verify,\n recoverPublicKey: recoverPublicKey3,\n Signature: Signature2,\n hash: hash3\n });\n }\n function _weierstrass_legacy_opts_to_new(c4) {\n const CURVE = {\n a: c4.a,\n b: c4.b,\n p: c4.Fp.ORDER,\n n: c4.n,\n h: c4.h,\n Gx: c4.Gx,\n Gy: c4.Gy\n };\n const Fp = c4.Fp;\n let allowedLengths = c4.allowedPrivateKeyLengths ? Array.from(new Set(c4.allowedPrivateKeyLengths.map((l6) => Math.ceil(l6 / 2)))) : void 0;\n const Fn = Field2(CURVE.n, {\n BITS: c4.nBitLength,\n allowedLengths,\n modFromBytes: c4.wrapPrivateKey\n });\n const curveOpts = {\n Fp,\n Fn,\n allowInfinityPoint: c4.allowInfinityPoint,\n endo: c4.endo,\n isTorsionFree: c4.isTorsionFree,\n clearCofactor: c4.clearCofactor,\n fromBytes: c4.fromBytes,\n toBytes: c4.toBytes\n };\n return { CURVE, curveOpts };\n }\n function _ecdsa_legacy_opts_to_new(c4) {\n const { CURVE, curveOpts } = _weierstrass_legacy_opts_to_new(c4);\n const ecdsaOpts = {\n hmac: c4.hmac,\n randomBytes: c4.randomBytes,\n lowS: c4.lowS,\n bits2int: c4.bits2int,\n bits2int_modN: c4.bits2int_modN\n };\n return { CURVE, curveOpts, hash: c4.hash, ecdsaOpts };\n }\n function _ecdsa_new_output_to_legacy(c4, _ecdsa) {\n const Point3 = _ecdsa.Point;\n return Object.assign({}, _ecdsa, {\n ProjectivePoint: Point3,\n CURVE: Object.assign({}, c4, nLength2(Point3.Fn.ORDER, Point3.Fn.BITS))\n });\n }\n function weierstrass2(c4) {\n const { CURVE, curveOpts, hash: hash3, ecdsaOpts } = _ecdsa_legacy_opts_to_new(c4);\n const Point3 = weierstrassN(CURVE, curveOpts);\n const signs = ecdsa(Point3, hash3, ecdsaOpts);\n return _ecdsa_new_output_to_legacy(c4, signs);\n }\n var divNearest2, DERErr2, DER2, _0n10, _1n10, _2n6, _3n4, _4n4;\n var init_weierstrass2 = __esm({\n \"../../../node_modules/.pnpm/@noble+curves@1.9.7/node_modules/@noble/curves/esm/abstract/weierstrass.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_hmac();\n init_utils3();\n init_utils8();\n init_curve2();\n init_modular2();\n divNearest2 = (num2, den) => (num2 + (num2 >= 0 ? den : -den) / _2n6) / den;\n DERErr2 = class extends Error {\n constructor(m2 = \"\") {\n super(m2);\n }\n };\n DER2 = {\n // asn.1 DER encoding utils\n Err: DERErr2,\n // Basic building block is TLV (Tag-Length-Value)\n _tlv: {\n encode: (tag, data) => {\n const { Err: E2 } = DER2;\n if (tag < 0 || tag > 256)\n throw new E2(\"tlv.encode: wrong tag\");\n if (data.length & 1)\n throw new E2(\"tlv.encode: unpadded data\");\n const dataLen = data.length / 2;\n const len = numberToHexUnpadded2(dataLen);\n if (len.length / 2 & 128)\n throw new E2(\"tlv.encode: long form length too big\");\n const lenLen = dataLen > 127 ? numberToHexUnpadded2(len.length / 2 | 128) : \"\";\n const t3 = numberToHexUnpadded2(tag);\n return t3 + lenLen + len + data;\n },\n // v - value, l - left bytes (unparsed)\n decode(tag, data) {\n const { Err: E2 } = DER2;\n let pos = 0;\n if (tag < 0 || tag > 256)\n throw new E2(\"tlv.encode: wrong tag\");\n if (data.length < 2 || data[pos++] !== tag)\n throw new E2(\"tlv.decode: wrong tlv\");\n const first = data[pos++];\n const isLong = !!(first & 128);\n let length2 = 0;\n if (!isLong)\n length2 = first;\n else {\n const lenLen = first & 127;\n if (!lenLen)\n throw new E2(\"tlv.decode(long): indefinite length not supported\");\n if (lenLen > 4)\n throw new E2(\"tlv.decode(long): byte length is too big\");\n const lengthBytes = data.subarray(pos, pos + lenLen);\n if (lengthBytes.length !== lenLen)\n throw new E2(\"tlv.decode: length bytes not complete\");\n if (lengthBytes[0] === 0)\n throw new E2(\"tlv.decode(long): zero leftmost byte\");\n for (const b4 of lengthBytes)\n length2 = length2 << 8 | b4;\n pos += lenLen;\n if (length2 < 128)\n throw new E2(\"tlv.decode(long): not minimal encoding\");\n }\n const v2 = data.subarray(pos, pos + length2);\n if (v2.length !== length2)\n throw new E2(\"tlv.decode: wrong value length\");\n return { v: v2, l: data.subarray(pos + length2) };\n }\n },\n // https://crypto.stackexchange.com/a/57734 Leftmost bit of first byte is 'negative' flag,\n // since we always use positive integers here. It must always be empty:\n // - add zero byte if exists\n // - if next byte doesn't have a flag, leading zero is not allowed (minimal encoding)\n _int: {\n encode(num2) {\n const { Err: E2 } = DER2;\n if (num2 < _0n10)\n throw new E2(\"integer: negative integers are not allowed\");\n let hex = numberToHexUnpadded2(num2);\n if (Number.parseInt(hex[0], 16) & 8)\n hex = \"00\" + hex;\n if (hex.length & 1)\n throw new E2(\"unexpected DER parsing assertion: unpadded hex\");\n return hex;\n },\n decode(data) {\n const { Err: E2 } = DER2;\n if (data[0] & 128)\n throw new E2(\"invalid signature integer: negative\");\n if (data[0] === 0 && !(data[1] & 128))\n throw new E2(\"invalid signature integer: unnecessary leading zero\");\n return bytesToNumberBE2(data);\n }\n },\n toSig(hex) {\n const { Err: E2, _int: int, _tlv: tlv } = DER2;\n const data = ensureBytes2(\"signature\", hex);\n const { v: seqBytes, l: seqLeftBytes } = tlv.decode(48, data);\n if (seqLeftBytes.length)\n throw new E2(\"invalid signature: left bytes after parsing\");\n const { v: rBytes, l: rLeftBytes } = tlv.decode(2, seqBytes);\n const { v: sBytes, l: sLeftBytes } = tlv.decode(2, rLeftBytes);\n if (sLeftBytes.length)\n throw new E2(\"invalid signature: left bytes after parsing\");\n return { r: int.decode(rBytes), s: int.decode(sBytes) };\n },\n hexFromSig(sig) {\n const { _tlv: tlv, _int: int } = DER2;\n const rs = tlv.encode(2, int.encode(sig.r));\n const ss = tlv.encode(2, int.encode(sig.s));\n const seq = rs + ss;\n return tlv.encode(48, seq);\n }\n };\n _0n10 = BigInt(0);\n _1n10 = BigInt(1);\n _2n6 = BigInt(2);\n _3n4 = BigInt(3);\n _4n4 = BigInt(4);\n }\n });\n\n // ../../../node_modules/.pnpm/@noble+curves@1.9.7/node_modules/@noble/curves/esm/_shortw_utils.js\n function createCurve2(curveDef, defHash) {\n const create2 = (hash3) => weierstrass2({ ...curveDef, hash: hash3 });\n return { ...create2(defHash), create: create2 };\n }\n var init_shortw_utils2 = __esm({\n \"../../../node_modules/.pnpm/@noble+curves@1.9.7/node_modules/@noble/curves/esm/_shortw_utils.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_weierstrass2();\n }\n });\n\n // ../../../node_modules/.pnpm/@noble+curves@1.9.7/node_modules/@noble/curves/esm/secp256k1.js\n function sqrtMod2(y6) {\n const P2 = secp256k1_CURVE.p;\n const _3n5 = BigInt(3), _6n = BigInt(6), _11n = BigInt(11), _22n = BigInt(22);\n const _23n = BigInt(23), _44n = BigInt(44), _88n = BigInt(88);\n const b22 = y6 * y6 * y6 % P2;\n const b32 = b22 * b22 * y6 % P2;\n const b6 = pow22(b32, _3n5, P2) * b32 % P2;\n const b9 = pow22(b6, _3n5, P2) * b32 % P2;\n const b11 = pow22(b9, _2n7, P2) * b22 % P2;\n const b222 = pow22(b11, _11n, P2) * b11 % P2;\n const b44 = pow22(b222, _22n, P2) * b222 % P2;\n const b88 = pow22(b44, _44n, P2) * b44 % P2;\n const b176 = pow22(b88, _88n, P2) * b88 % P2;\n const b220 = pow22(b176, _44n, P2) * b44 % P2;\n const b223 = pow22(b220, _3n5, P2) * b32 % P2;\n const t1 = pow22(b223, _23n, P2) * b222 % P2;\n const t22 = pow22(t1, _6n, P2) * b22 % P2;\n const root = pow22(t22, _2n7, P2);\n if (!Fpk12.eql(Fpk12.sqr(root), y6))\n throw new Error(\"Cannot find square root\");\n return root;\n }\n var secp256k1_CURVE, secp256k1_ENDO, _2n7, Fpk12, secp256k12;\n var init_secp256k12 = __esm({\n \"../../../node_modules/.pnpm/@noble+curves@1.9.7/node_modules/@noble/curves/esm/secp256k1.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_sha2();\n init_shortw_utils2();\n init_modular2();\n secp256k1_CURVE = {\n p: BigInt(\"0xfffffffffffffffffffffffffffffffffffffffffffffffffffffffefffffc2f\"),\n n: BigInt(\"0xfffffffffffffffffffffffffffffffebaaedce6af48a03bbfd25e8cd0364141\"),\n h: BigInt(1),\n a: BigInt(0),\n b: BigInt(7),\n Gx: BigInt(\"0x79be667ef9dcbbac55a06295ce870b07029bfcdb2dce28d959f2815b16f81798\"),\n Gy: BigInt(\"0x483ada7726a3c4655da4fbfc0e1108a8fd17b448a68554199c47d08ffb10d4b8\")\n };\n secp256k1_ENDO = {\n beta: BigInt(\"0x7ae96a2b657c07106e64479eac3434e99cf0497512f58995c1396c28719501ee\"),\n basises: [\n [BigInt(\"0x3086d221a7d46bcde86c90e49284eb15\"), -BigInt(\"0xe4437ed6010e88286f547fa90abfe4c3\")],\n [BigInt(\"0x114ca50f7a8e2f3f657c1108d9d44cfd8\"), BigInt(\"0x3086d221a7d46bcde86c90e49284eb15\")]\n ]\n };\n _2n7 = /* @__PURE__ */ BigInt(2);\n Fpk12 = Field2(secp256k1_CURVE.p, { sqrt: sqrtMod2 });\n secp256k12 = createCurve2({ ...secp256k1_CURVE, Fp: Fpk12, lowS: true, endo: secp256k1_ENDO }, sha256);\n }\n });\n\n // ../../../node_modules/.pnpm/@scure+base@1.2.6/node_modules/@scure/base/lib/esm/index.js\n function isBytes4(a3) {\n return a3 instanceof Uint8Array || ArrayBuffer.isView(a3) && a3.constructor.name === \"Uint8Array\";\n }\n function isArrayOf(isString, arr) {\n if (!Array.isArray(arr))\n return false;\n if (arr.length === 0)\n return true;\n if (isString) {\n return arr.every((item) => typeof item === \"string\");\n } else {\n return arr.every((item) => Number.isSafeInteger(item));\n }\n }\n function afn(input) {\n if (typeof input !== \"function\")\n throw new Error(\"function expected\");\n return true;\n }\n function astr(label, input) {\n if (typeof input !== \"string\")\n throw new Error(`${label}: string expected`);\n return true;\n }\n function anumber2(n2) {\n if (!Number.isSafeInteger(n2))\n throw new Error(`invalid integer: ${n2}`);\n }\n function aArr(input) {\n if (!Array.isArray(input))\n throw new Error(\"array expected\");\n }\n function astrArr(label, input) {\n if (!isArrayOf(true, input))\n throw new Error(`${label}: array of strings expected`);\n }\n function anumArr(label, input) {\n if (!isArrayOf(false, input))\n throw new Error(`${label}: array of numbers expected`);\n }\n // @__NO_SIDE_EFFECTS__\n function chain(...args) {\n const id = (a3) => a3;\n const wrap3 = (a3, b4) => (c4) => a3(b4(c4));\n const encode6 = args.map((x4) => x4.encode).reduceRight(wrap3, id);\n const decode2 = args.map((x4) => x4.decode).reduce(wrap3, id);\n return { encode: encode6, decode: decode2 };\n }\n // @__NO_SIDE_EFFECTS__\n function alphabet(letters) {\n const lettersA = typeof letters === \"string\" ? letters.split(\"\") : letters;\n const len = lettersA.length;\n astrArr(\"alphabet\", lettersA);\n const indexes = new Map(lettersA.map((l6, i3) => [l6, i3]));\n return {\n encode: (digits) => {\n aArr(digits);\n return digits.map((i3) => {\n if (!Number.isSafeInteger(i3) || i3 < 0 || i3 >= len)\n throw new Error(`alphabet.encode: digit index outside alphabet \"${i3}\". Allowed: ${letters}`);\n return lettersA[i3];\n });\n },\n decode: (input) => {\n aArr(input);\n return input.map((letter) => {\n astr(\"alphabet.decode\", letter);\n const i3 = indexes.get(letter);\n if (i3 === void 0)\n throw new Error(`Unknown letter: \"${letter}\". Allowed: ${letters}`);\n return i3;\n });\n }\n };\n }\n // @__NO_SIDE_EFFECTS__\n function join(separator = \"\") {\n astr(\"join\", separator);\n return {\n encode: (from14) => {\n astrArr(\"join.decode\", from14);\n return from14.join(separator);\n },\n decode: (to) => {\n astr(\"join.decode\", to);\n return to.split(separator);\n }\n };\n }\n function convertRadix(data, from14, to) {\n if (from14 < 2)\n throw new Error(`convertRadix: invalid from=${from14}, base cannot be less than 2`);\n if (to < 2)\n throw new Error(`convertRadix: invalid to=${to}, base cannot be less than 2`);\n aArr(data);\n if (!data.length)\n return [];\n let pos = 0;\n const res = [];\n const digits = Array.from(data, (d5) => {\n anumber2(d5);\n if (d5 < 0 || d5 >= from14)\n throw new Error(`invalid integer: ${d5}`);\n return d5;\n });\n const dlen = digits.length;\n while (true) {\n let carry = 0;\n let done = true;\n for (let i3 = pos; i3 < dlen; i3++) {\n const digit = digits[i3];\n const fromCarry = from14 * carry;\n const digitBase = fromCarry + digit;\n if (!Number.isSafeInteger(digitBase) || fromCarry / from14 !== carry || digitBase - digit !== fromCarry) {\n throw new Error(\"convertRadix: carry overflow\");\n }\n const div = digitBase / to;\n carry = digitBase % to;\n const rounded = Math.floor(div);\n digits[i3] = rounded;\n if (!Number.isSafeInteger(rounded) || rounded * to + carry !== digitBase)\n throw new Error(\"convertRadix: carry overflow\");\n if (!done)\n continue;\n else if (!rounded)\n pos = i3;\n else\n done = false;\n }\n res.push(carry);\n if (done)\n break;\n }\n for (let i3 = 0; i3 < data.length - 1 && data[i3] === 0; i3++)\n res.push(0);\n return res.reverse();\n }\n // @__NO_SIDE_EFFECTS__\n function radix(num2) {\n anumber2(num2);\n const _256 = 2 ** 8;\n return {\n encode: (bytes) => {\n if (!isBytes4(bytes))\n throw new Error(\"radix.encode input should be Uint8Array\");\n return convertRadix(Array.from(bytes), _256, num2);\n },\n decode: (digits) => {\n anumArr(\"radix.decode\", digits);\n return Uint8Array.from(convertRadix(digits, num2, _256));\n }\n };\n }\n function checksum3(len, fn) {\n anumber2(len);\n afn(fn);\n return {\n encode(data) {\n if (!isBytes4(data))\n throw new Error(\"checksum.encode: input should be Uint8Array\");\n const sum = fn(data).slice(0, len);\n const res = new Uint8Array(data.length + len);\n res.set(data);\n res.set(sum, data.length);\n return res;\n },\n decode(data) {\n if (!isBytes4(data))\n throw new Error(\"checksum.decode: input should be Uint8Array\");\n const payload = data.slice(0, -len);\n const oldChecksum = data.slice(-len);\n const newChecksum = fn(payload).slice(0, len);\n for (let i3 = 0; i3 < len; i3++)\n if (newChecksum[i3] !== oldChecksum[i3])\n throw new Error(\"Invalid checksum\");\n return payload;\n }\n };\n }\n var genBase58, base58, createBase58check;\n var init_esm2 = __esm({\n \"../../../node_modules/.pnpm/@scure+base@1.2.6/node_modules/@scure/base/lib/esm/index.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n genBase58 = /* @__NO_SIDE_EFFECTS__ */ (abc) => /* @__PURE__ */ chain(/* @__PURE__ */ radix(58), /* @__PURE__ */ alphabet(abc), /* @__PURE__ */ join(\"\"));\n base58 = /* @__PURE__ */ genBase58(\"123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz\");\n createBase58check = (sha2564) => /* @__PURE__ */ chain(checksum3(4, (data) => sha2564(sha2564(data))), base58);\n }\n });\n\n // ../../../node_modules/.pnpm/@scure+bip32@1.7.0/node_modules/@scure/bip32/lib/esm/index.js\n function bytesToNumber2(bytes) {\n abytes(bytes);\n const h4 = bytes.length === 0 ? \"0\" : bytesToHex2(bytes);\n return BigInt(\"0x\" + h4);\n }\n function numberToBytes2(num2) {\n if (typeof num2 !== \"bigint\")\n throw new Error(\"bigint expected\");\n return hexToBytes2(num2.toString(16).padStart(64, \"0\"));\n }\n var Point2, base58check, MASTER_SECRET, BITCOIN_VERSIONS, HARDENED_OFFSET, hash160, fromU32, toU32, HDKey;\n var init_esm3 = __esm({\n \"../../../node_modules/.pnpm/@scure+bip32@1.7.0/node_modules/@scure/bip32/lib/esm/index.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_modular2();\n init_secp256k12();\n init_hmac();\n init_legacy();\n init_sha2();\n init_utils3();\n init_esm2();\n Point2 = secp256k12.ProjectivePoint;\n base58check = createBase58check(sha256);\n MASTER_SECRET = utf8ToBytes(\"Bitcoin seed\");\n BITCOIN_VERSIONS = { private: 76066276, public: 76067358 };\n HARDENED_OFFSET = 2147483648;\n hash160 = (data) => ripemd160(sha256(data));\n fromU32 = (data) => createView(data).getUint32(0, false);\n toU32 = (n2) => {\n if (!Number.isSafeInteger(n2) || n2 < 0 || n2 > 2 ** 32 - 1) {\n throw new Error(\"invalid number, should be from 0 to 2**32-1, got \" + n2);\n }\n const buf = new Uint8Array(4);\n createView(buf).setUint32(0, n2, false);\n return buf;\n };\n HDKey = class _HDKey {\n get fingerprint() {\n if (!this.pubHash) {\n throw new Error(\"No publicKey set!\");\n }\n return fromU32(this.pubHash);\n }\n get identifier() {\n return this.pubHash;\n }\n get pubKeyHash() {\n return this.pubHash;\n }\n get privateKey() {\n return this.privKeyBytes || null;\n }\n get publicKey() {\n return this.pubKey || null;\n }\n get privateExtendedKey() {\n const priv = this.privateKey;\n if (!priv) {\n throw new Error(\"No private key\");\n }\n return base58check.encode(this.serialize(this.versions.private, concatBytes(new Uint8Array([0]), priv)));\n }\n get publicExtendedKey() {\n if (!this.pubKey) {\n throw new Error(\"No public key\");\n }\n return base58check.encode(this.serialize(this.versions.public, this.pubKey));\n }\n static fromMasterSeed(seed, versions2 = BITCOIN_VERSIONS) {\n abytes(seed);\n if (8 * seed.length < 128 || 8 * seed.length > 512) {\n throw new Error(\"HDKey: seed length must be between 128 and 512 bits; 256 bits is advised, got \" + seed.length);\n }\n const I2 = hmac(sha512, MASTER_SECRET, seed);\n return new _HDKey({\n versions: versions2,\n chainCode: I2.slice(32),\n privateKey: I2.slice(0, 32)\n });\n }\n static fromExtendedKey(base58key, versions2 = BITCOIN_VERSIONS) {\n const keyBuffer = base58check.decode(base58key);\n const keyView = createView(keyBuffer);\n const version6 = keyView.getUint32(0, false);\n const opt = {\n versions: versions2,\n depth: keyBuffer[4],\n parentFingerprint: keyView.getUint32(5, false),\n index: keyView.getUint32(9, false),\n chainCode: keyBuffer.slice(13, 45)\n };\n const key = keyBuffer.slice(45);\n const isPriv = key[0] === 0;\n if (version6 !== versions2[isPriv ? \"private\" : \"public\"]) {\n throw new Error(\"Version mismatch\");\n }\n if (isPriv) {\n return new _HDKey({ ...opt, privateKey: key.slice(1) });\n } else {\n return new _HDKey({ ...opt, publicKey: key });\n }\n }\n static fromJSON(json) {\n return _HDKey.fromExtendedKey(json.xpriv);\n }\n constructor(opt) {\n this.depth = 0;\n this.index = 0;\n this.chainCode = null;\n this.parentFingerprint = 0;\n if (!opt || typeof opt !== \"object\") {\n throw new Error(\"HDKey.constructor must not be called directly\");\n }\n this.versions = opt.versions || BITCOIN_VERSIONS;\n this.depth = opt.depth || 0;\n this.chainCode = opt.chainCode || null;\n this.index = opt.index || 0;\n this.parentFingerprint = opt.parentFingerprint || 0;\n if (!this.depth) {\n if (this.parentFingerprint || this.index) {\n throw new Error(\"HDKey: zero depth with non-zero index/parent fingerprint\");\n }\n }\n if (opt.publicKey && opt.privateKey) {\n throw new Error(\"HDKey: publicKey and privateKey at same time.\");\n }\n if (opt.privateKey) {\n if (!secp256k12.utils.isValidPrivateKey(opt.privateKey)) {\n throw new Error(\"Invalid private key\");\n }\n this.privKey = typeof opt.privateKey === \"bigint\" ? opt.privateKey : bytesToNumber2(opt.privateKey);\n this.privKeyBytes = numberToBytes2(this.privKey);\n this.pubKey = secp256k12.getPublicKey(opt.privateKey, true);\n } else if (opt.publicKey) {\n this.pubKey = Point2.fromHex(opt.publicKey).toRawBytes(true);\n } else {\n throw new Error(\"HDKey: no public or private key provided\");\n }\n this.pubHash = hash160(this.pubKey);\n }\n derive(path) {\n if (!/^[mM]'?/.test(path)) {\n throw new Error('Path must start with \"m\" or \"M\"');\n }\n if (/^[mM]'?$/.test(path)) {\n return this;\n }\n const parts = path.replace(/^[mM]'?\\//, \"\").split(\"/\");\n let child = this;\n for (const c4 of parts) {\n const m2 = /^(\\d+)('?)$/.exec(c4);\n const m1 = m2 && m2[1];\n if (!m2 || m2.length !== 3 || typeof m1 !== \"string\")\n throw new Error(\"invalid child index: \" + c4);\n let idx = +m1;\n if (!Number.isSafeInteger(idx) || idx >= HARDENED_OFFSET) {\n throw new Error(\"Invalid index\");\n }\n if (m2[2] === \"'\") {\n idx += HARDENED_OFFSET;\n }\n child = child.deriveChild(idx);\n }\n return child;\n }\n deriveChild(index2) {\n if (!this.pubKey || !this.chainCode) {\n throw new Error(\"No publicKey or chainCode set\");\n }\n let data = toU32(index2);\n if (index2 >= HARDENED_OFFSET) {\n const priv = this.privateKey;\n if (!priv) {\n throw new Error(\"Could not derive hardened child key\");\n }\n data = concatBytes(new Uint8Array([0]), priv, data);\n } else {\n data = concatBytes(this.pubKey, data);\n }\n const I2 = hmac(sha512, this.chainCode, data);\n const childTweak = bytesToNumber2(I2.slice(0, 32));\n const chainCode = I2.slice(32);\n if (!secp256k12.utils.isValidPrivateKey(childTweak)) {\n throw new Error(\"Tweak bigger than curve order\");\n }\n const opt = {\n versions: this.versions,\n chainCode,\n depth: this.depth + 1,\n parentFingerprint: this.fingerprint,\n index: index2\n };\n try {\n if (this.privateKey) {\n const added = mod2(this.privKey + childTweak, secp256k12.CURVE.n);\n if (!secp256k12.utils.isValidPrivateKey(added)) {\n throw new Error(\"The tweak was out of range or the resulted private key is invalid\");\n }\n opt.privateKey = added;\n } else {\n const added = Point2.fromHex(this.pubKey).add(Point2.fromPrivateKey(childTweak));\n if (added.equals(Point2.ZERO)) {\n throw new Error(\"The tweak was equal to negative P, which made the result key invalid\");\n }\n opt.publicKey = added.toRawBytes(true);\n }\n return new _HDKey(opt);\n } catch (err) {\n return this.deriveChild(index2 + 1);\n }\n }\n sign(hash3) {\n if (!this.privateKey) {\n throw new Error(\"No privateKey set!\");\n }\n abytes(hash3, 32);\n return secp256k12.sign(hash3, this.privKey).toCompactRawBytes();\n }\n verify(hash3, signature) {\n abytes(hash3, 32);\n abytes(signature, 64);\n if (!this.publicKey) {\n throw new Error(\"No publicKey set!\");\n }\n let sig;\n try {\n sig = secp256k12.Signature.fromCompact(signature);\n } catch (error) {\n return false;\n }\n return secp256k12.verify(sig, hash3, this.publicKey);\n }\n wipePrivateData() {\n this.privKey = void 0;\n if (this.privKeyBytes) {\n this.privKeyBytes.fill(0);\n this.privKeyBytes = void 0;\n }\n return this;\n }\n toJSON() {\n return {\n xpriv: this.privateExtendedKey,\n xpub: this.publicExtendedKey\n };\n }\n serialize(version6, key) {\n if (!this.chainCode) {\n throw new Error(\"No chainCode set\");\n }\n abytes(key, 33);\n return concatBytes(toU32(version6), new Uint8Array([this.depth]), toU32(this.parentFingerprint), toU32(this.index), this.chainCode, key);\n }\n };\n }\n });\n\n // ../../../node_modules/.pnpm/@noble+hashes@1.8.0/node_modules/@noble/hashes/esm/pbkdf2.js\n function pbkdf2Init(hash3, _password, _salt, _opts) {\n ahash(hash3);\n const opts = checkOpts({ dkLen: 32, asyncTick: 10 }, _opts);\n const { c: c4, dkLen, asyncTick } = opts;\n anumber(c4);\n anumber(dkLen);\n anumber(asyncTick);\n if (c4 < 1)\n throw new Error(\"iterations (c) should be >= 1\");\n const password = kdfInputToBytes(_password);\n const salt = kdfInputToBytes(_salt);\n const DK = new Uint8Array(dkLen);\n const PRF = hmac.create(hash3, password);\n const PRFSalt = PRF._cloneInto().update(salt);\n return { c: c4, dkLen, asyncTick, DK, PRF, PRFSalt };\n }\n function pbkdf2Output(PRF, PRFSalt, DK, prfW, u2) {\n PRF.destroy();\n PRFSalt.destroy();\n if (prfW)\n prfW.destroy();\n clean(u2);\n return DK;\n }\n function pbkdf2(hash3, password, salt, opts) {\n const { c: c4, dkLen, DK, PRF, PRFSalt } = pbkdf2Init(hash3, password, salt, opts);\n let prfW;\n const arr = new Uint8Array(4);\n const view = createView(arr);\n const u2 = new Uint8Array(PRF.outputLen);\n for (let ti = 1, pos = 0; pos < dkLen; ti++, pos += PRF.outputLen) {\n const Ti = DK.subarray(pos, pos + PRF.outputLen);\n view.setInt32(0, ti, false);\n (prfW = PRFSalt._cloneInto(prfW)).update(arr).digestInto(u2);\n Ti.set(u2.subarray(0, Ti.length));\n for (let ui = 1; ui < c4; ui++) {\n PRF._cloneInto(prfW).update(u2).digestInto(u2);\n for (let i3 = 0; i3 < Ti.length; i3++)\n Ti[i3] ^= u2[i3];\n }\n }\n return pbkdf2Output(PRF, PRFSalt, DK, prfW, u2);\n }\n var init_pbkdf2 = __esm({\n \"../../../node_modules/.pnpm/@noble+hashes@1.8.0/node_modules/@noble/hashes/esm/pbkdf2.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_hmac();\n init_utils3();\n }\n });\n\n // ../../../node_modules/.pnpm/@scure+bip39@1.6.0/node_modules/@scure/bip39/esm/index.js\n function nfkd(str) {\n if (typeof str !== \"string\")\n throw new TypeError(\"invalid mnemonic type: \" + typeof str);\n return str.normalize(\"NFKD\");\n }\n function normalize(str) {\n const norm = nfkd(str);\n const words = norm.split(\" \");\n if (![12, 15, 18, 21, 24].includes(words.length))\n throw new Error(\"Invalid mnemonic\");\n return { nfkd: norm, words };\n }\n function mnemonicToSeedSync(mnemonic, passphrase = \"\") {\n return pbkdf2(sha512, normalize(mnemonic).nfkd, psalt(passphrase), { c: 2048, dkLen: 64 });\n }\n var psalt;\n var init_esm4 = __esm({\n \"../../../node_modules/.pnpm/@scure+bip39@1.6.0/node_modules/@scure/bip39/esm/index.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_pbkdf2();\n init_sha2();\n psalt = (passphrase) => nfkd(\"mnemonic\" + passphrase);\n }\n });\n\n // ../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/accounts/generatePrivateKey.js\n function generatePrivateKey() {\n return toHex(secp256k1.utils.randomPrivateKey());\n }\n var init_generatePrivateKey = __esm({\n \"../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/accounts/generatePrivateKey.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_secp256k1();\n init_toHex();\n }\n });\n\n // ../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/accounts/toAccount.js\n function toAccount(source) {\n if (typeof source === \"string\") {\n if (!isAddress(source, { strict: false }))\n throw new InvalidAddressError({ address: source });\n return {\n address: source,\n type: \"json-rpc\"\n };\n }\n if (!isAddress(source.address, { strict: false }))\n throw new InvalidAddressError({ address: source.address });\n return {\n address: source.address,\n nonceManager: source.nonceManager,\n sign: source.sign,\n signAuthorization: source.signAuthorization,\n signMessage: source.signMessage,\n signTransaction: source.signTransaction,\n signTypedData: source.signTypedData,\n source: \"custom\",\n type: \"local\"\n };\n }\n var init_toAccount = __esm({\n \"../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/accounts/toAccount.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_address();\n init_isAddress();\n }\n });\n\n // ../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/accounts/utils/sign.js\n async function sign({ hash: hash3, privateKey, to = \"object\" }) {\n const { r: r2, s: s4, recovery } = secp256k1.sign(hash3.slice(2), privateKey.slice(2), {\n lowS: true,\n extraEntropy: isHex(extraEntropy, { strict: false }) ? hexToBytes(extraEntropy) : extraEntropy\n });\n const signature = {\n r: numberToHex(r2, { size: 32 }),\n s: numberToHex(s4, { size: 32 }),\n v: recovery ? 28n : 27n,\n yParity: recovery\n };\n return (() => {\n if (to === \"bytes\" || to === \"hex\")\n return serializeSignature({ ...signature, to });\n return signature;\n })();\n }\n var extraEntropy;\n var init_sign = __esm({\n \"../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/accounts/utils/sign.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_secp256k1();\n init_isHex();\n init_toBytes();\n init_toHex();\n init_serializeSignature();\n extraEntropy = false;\n }\n });\n\n // ../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/accounts/utils/signAuthorization.js\n async function signAuthorization(parameters) {\n const { chainId, nonce, privateKey, to = \"object\" } = parameters;\n const address = parameters.contractAddress ?? parameters.address;\n const signature = await sign({\n hash: hashAuthorization({ address, chainId, nonce }),\n privateKey,\n to\n });\n if (to === \"object\")\n return {\n address,\n chainId,\n nonce,\n ...signature\n };\n return signature;\n }\n var init_signAuthorization = __esm({\n \"../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/accounts/utils/signAuthorization.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_hashAuthorization();\n init_sign();\n }\n });\n\n // ../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/accounts/utils/signMessage.js\n async function signMessage({ message, privateKey }) {\n return await sign({ hash: hashMessage(message), privateKey, to: \"hex\" });\n }\n var init_signMessage = __esm({\n \"../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/accounts/utils/signMessage.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_hashMessage();\n init_sign();\n }\n });\n\n // ../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/accounts/utils/signTransaction.js\n async function signTransaction(parameters) {\n const { privateKey, transaction, serializer = serializeTransaction } = parameters;\n const signableTransaction = (() => {\n if (transaction.type === \"eip4844\")\n return {\n ...transaction,\n sidecars: false\n };\n return transaction;\n })();\n const signature = await sign({\n hash: keccak256(await serializer(signableTransaction)),\n privateKey\n });\n return await serializer(transaction, signature);\n }\n var init_signTransaction = __esm({\n \"../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/accounts/utils/signTransaction.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_keccak256();\n init_serializeTransaction();\n init_sign();\n }\n });\n\n // ../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/accounts/utils/signTypedData.js\n async function signTypedData(parameters) {\n const { privateKey, ...typedData } = parameters;\n return await sign({\n hash: hashTypedData(typedData),\n privateKey,\n to: \"hex\"\n });\n }\n var init_signTypedData = __esm({\n \"../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/accounts/utils/signTypedData.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_hashTypedData();\n init_sign();\n }\n });\n\n // ../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/accounts/privateKeyToAccount.js\n function privateKeyToAccount(privateKey, options = {}) {\n const { nonceManager } = options;\n const publicKey = toHex(secp256k1.getPublicKey(privateKey.slice(2), false));\n const address = publicKeyToAddress(publicKey);\n const account = toAccount({\n address,\n nonceManager,\n async sign({ hash: hash3 }) {\n return sign({ hash: hash3, privateKey, to: \"hex\" });\n },\n async signAuthorization(authorization) {\n return signAuthorization({ ...authorization, privateKey });\n },\n async signMessage({ message }) {\n return signMessage({ message, privateKey });\n },\n async signTransaction(transaction, { serializer } = {}) {\n return signTransaction({ privateKey, transaction, serializer });\n },\n async signTypedData(typedData) {\n return signTypedData({ ...typedData, privateKey });\n }\n });\n return {\n ...account,\n publicKey,\n source: \"privateKey\"\n };\n }\n var init_privateKeyToAccount = __esm({\n \"../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/accounts/privateKeyToAccount.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_secp256k1();\n init_toHex();\n init_toAccount();\n init_publicKeyToAddress();\n init_sign();\n init_signAuthorization();\n init_signMessage();\n init_signTransaction();\n init_signTypedData();\n }\n });\n\n // ../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/accounts/hdKeyToAccount.js\n function hdKeyToAccount(hdKey_, { accountIndex = 0, addressIndex = 0, changeIndex = 0, path, ...options } = {}) {\n const hdKey = hdKey_.derive(path || `m/44'/60'/${accountIndex}'/${changeIndex}/${addressIndex}`);\n const account = privateKeyToAccount(toHex(hdKey.privateKey), options);\n return {\n ...account,\n getHdKey: () => hdKey,\n source: \"hd\"\n };\n }\n var init_hdKeyToAccount = __esm({\n \"../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/accounts/hdKeyToAccount.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_toHex();\n init_privateKeyToAccount();\n }\n });\n\n // ../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/accounts/mnemonicToAccount.js\n function mnemonicToAccount(mnemonic, opts = {}) {\n const seed = mnemonicToSeedSync(mnemonic);\n return hdKeyToAccount(HDKey.fromMasterSeed(seed), opts);\n }\n var init_mnemonicToAccount = __esm({\n \"../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/accounts/mnemonicToAccount.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_esm3();\n init_esm4();\n init_hdKeyToAccount();\n }\n });\n\n // ../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/accounts/index.js\n var init_accounts = __esm({\n \"../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/accounts/index.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_generatePrivateKey();\n init_mnemonicToAccount();\n init_privateKeyToAccount();\n init_toAccount();\n }\n });\n\n // ../../../node_modules/.pnpm/@aa-sdk+core@4.62.0_typescript@5.8.3_viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64_/node_modules/@aa-sdk/core/dist/esm/version.js\n var VERSION;\n var init_version5 = __esm({\n \"../../../node_modules/.pnpm/@aa-sdk+core@4.62.0_typescript@5.8.3_viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64_/node_modules/@aa-sdk/core/dist/esm/version.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n VERSION = \"4.62.0\";\n }\n });\n\n // ../../../node_modules/.pnpm/@aa-sdk+core@4.62.0_typescript@5.8.3_viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64_/node_modules/@aa-sdk/core/dist/esm/errors/base.js\n var BaseError4;\n var init_base2 = __esm({\n \"../../../node_modules/.pnpm/@aa-sdk+core@4.62.0_typescript@5.8.3_viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64_/node_modules/@aa-sdk/core/dist/esm/errors/base.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_esm();\n init_version5();\n BaseError4 = class _BaseError extends BaseError2 {\n constructor(shortMessage, args = {}) {\n super(shortMessage, args);\n Object.defineProperty(this, \"name\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: \"AASDKError\"\n });\n Object.defineProperty(this, \"version\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: VERSION\n });\n const docsPath8 = args.cause instanceof _BaseError ? args.cause.docsPath || args.docsPath : args.docsPath;\n this.message = [\n shortMessage || \"An error occurred.\",\n \"\",\n ...args.metaMessages ? [...args.metaMessages, \"\"] : [],\n ...docsPath8 ? [\n `Docs: https://www.alchemy.com/docs/wallets${docsPath8}${args.docsSlug ? `#${args.docsSlug}` : \"\"}`\n ] : [],\n ...this.details ? [`Details: ${this.details}`] : [],\n `Version: ${this.version}`\n ].join(\"\\n\");\n }\n };\n }\n });\n\n // ../../../node_modules/.pnpm/@aa-sdk+core@4.62.0_typescript@5.8.3_viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64_/node_modules/@aa-sdk/core/dist/esm/errors/client.js\n var IncompatibleClientError, InvalidRpcUrlError, ChainNotFoundError2, InvalidEntityIdError, InvalidNonceKeyError, EntityIdOverrideError, InvalidModularAccountV2Mode, InvalidDeferredActionNonce;\n var init_client = __esm({\n \"../../../node_modules/.pnpm/@aa-sdk+core@4.62.0_typescript@5.8.3_viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64_/node_modules/@aa-sdk/core/dist/esm/errors/client.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_base2();\n IncompatibleClientError = class extends BaseError4 {\n /**\n * Throws an error when the client type does not match the expected client type.\n *\n * @param {string} expectedClient The expected type of the client.\n * @param {string} method The method that was called.\n * @param {Client} client The client instance.\n */\n constructor(expectedClient, method, client) {\n super([\n `Client of type (${client.type}) is not a ${expectedClient}.`,\n `Create one with \\`createSmartAccountClient\\` first before using \\`${method}\\``\n ].join(\"\\n\"));\n Object.defineProperty(this, \"name\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: \"IncompatibleClientError\"\n });\n }\n };\n InvalidRpcUrlError = class extends BaseError4 {\n /**\n * Creates an instance of an error with a message indicating an invalid RPC URL.\n *\n * @param {string} [rpcUrl] The invalid RPC URL that caused the error\n */\n constructor(rpcUrl) {\n super(`Invalid RPC URL ${rpcUrl}`);\n Object.defineProperty(this, \"name\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: \"InvalidRpcUrlError\"\n });\n }\n };\n ChainNotFoundError2 = class extends BaseError4 {\n /**\n * Initializes a new instance of the error message with a default message indicating that no chain was supplied to the client.\n */\n constructor() {\n super(\"No chain supplied to the client\");\n Object.defineProperty(this, \"name\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: \"ChainNotFoundError\"\n });\n }\n };\n InvalidEntityIdError = class extends BaseError4 {\n /**\n * Initializes a new instance of the error message with a default message indicating that the entity id is invalid because it's too large.\n *\n * @param {number} entityId the invalid entityId used\n */\n constructor(entityId) {\n super(`Entity ID used is ${entityId}, but must be less than or equal to uint32.max`);\n Object.defineProperty(this, \"name\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: \"InvalidEntityIdError\"\n });\n }\n };\n InvalidNonceKeyError = class extends BaseError4 {\n /**\n * Initializes a new instance of the error message with a default message indicating that the nonce key is invalid.\n *\n * @param {bigint} nonceKey the invalid nonceKey used\n */\n constructor(nonceKey) {\n super(`Nonce key is ${nonceKey} but has to be less than or equal to 2**152`);\n Object.defineProperty(this, \"name\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: \"InvalidNonceKeyError\"\n });\n }\n };\n EntityIdOverrideError = class extends BaseError4 {\n /**\n * Initializes a new instance of the error message with a default message indicating that the nonce key is invalid.\n */\n constructor() {\n super(`EntityId of 0 is reserved for the owner and cannot be used`);\n Object.defineProperty(this, \"name\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: \"EntityIdOverrideError\"\n });\n }\n };\n InvalidModularAccountV2Mode = class extends BaseError4 {\n /**\n * Initializes a new instance of the error message with a default message indicating that the provided ma v2 account mode is invalid.\n */\n constructor() {\n super(`The provided account mode is invalid for ModularAccount V2`);\n Object.defineProperty(this, \"name\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: \"InvalidModularAccountV2Mode\"\n });\n }\n };\n InvalidDeferredActionNonce = class extends BaseError4 {\n /**\n * Initializes a new instance of the error message with a default message indicating that the provided deferred action nonce is invalid.\n */\n constructor() {\n super(`The provided deferred action nonce is invalid`);\n Object.defineProperty(this, \"name\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: \"InvalidDeferredActionNonce\"\n });\n }\n };\n }\n });\n\n // ../../../node_modules/.pnpm/@aa-sdk+core@4.62.0_typescript@5.8.3_viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64_/node_modules/@aa-sdk/core/dist/esm/utils/stateOverride.js\n function serializeStateMapping2(stateMapping) {\n if (!stateMapping || stateMapping.length === 0)\n return void 0;\n return stateMapping.reduce((acc, { slot, value }) => {\n validateBytes32HexLength(slot);\n validateBytes32HexLength(value);\n acc[slot] = value;\n return acc;\n }, {});\n }\n function validateBytes32HexLength(value) {\n if (value.length !== 66) {\n throw new Error(`Hex is expected to be 66 hex long, but is ${value.length} hex long.`);\n }\n }\n function serializeAccountStateOverride2(parameters) {\n const { balance, nonce, state, stateDiff, code } = parameters;\n const rpcAccountStateOverride = {};\n if (code !== void 0)\n rpcAccountStateOverride.code = code;\n if (balance !== void 0)\n rpcAccountStateOverride.balance = numberToHex(balance);\n if (nonce !== void 0)\n rpcAccountStateOverride.nonce = numberToHex(nonce);\n if (state !== void 0)\n rpcAccountStateOverride.state = serializeStateMapping2(state);\n if (stateDiff !== void 0) {\n if (rpcAccountStateOverride.state)\n throw new StateAssignmentConflictError();\n rpcAccountStateOverride.stateDiff = serializeStateMapping2(stateDiff);\n }\n return rpcAccountStateOverride;\n }\n function serializeStateOverride2(parameters) {\n if (!parameters)\n return void 0;\n const rpcStateOverride = {};\n for (const { address, ...accountState } of parameters) {\n if (!isAddress(address, { strict: false }))\n throw new InvalidAddressError({ address });\n if (rpcStateOverride[address])\n throw new AccountStateConflictError({ address });\n rpcStateOverride[address] = serializeAccountStateOverride2(accountState);\n }\n return rpcStateOverride;\n }\n var init_stateOverride3 = __esm({\n \"../../../node_modules/.pnpm/@aa-sdk+core@4.62.0_typescript@5.8.3_viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64_/node_modules/@aa-sdk/core/dist/esm/utils/stateOverride.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_esm();\n }\n });\n\n // ../../../node_modules/.pnpm/@aa-sdk+core@4.62.0_typescript@5.8.3_viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64_/node_modules/@aa-sdk/core/dist/esm/actions/bundler/estimateUserOperationGas.js\n var estimateUserOperationGas;\n var init_estimateUserOperationGas = __esm({\n \"../../../node_modules/.pnpm/@aa-sdk+core@4.62.0_typescript@5.8.3_viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64_/node_modules/@aa-sdk/core/dist/esm/actions/bundler/estimateUserOperationGas.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_stateOverride3();\n estimateUserOperationGas = async (client, args) => {\n return client.request({\n method: \"eth_estimateUserOperationGas\",\n params: args.stateOverride != null ? [\n args.request,\n args.entryPoint,\n serializeStateOverride2(args.stateOverride)\n ] : [args.request, args.entryPoint]\n });\n };\n }\n });\n\n // ../../../node_modules/.pnpm/@aa-sdk+core@4.62.0_typescript@5.8.3_viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64_/node_modules/@aa-sdk/core/dist/esm/actions/bundler/getSupportedEntryPoints.js\n var getSupportedEntryPoints;\n var init_getSupportedEntryPoints = __esm({\n \"../../../node_modules/.pnpm/@aa-sdk+core@4.62.0_typescript@5.8.3_viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64_/node_modules/@aa-sdk/core/dist/esm/actions/bundler/getSupportedEntryPoints.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n getSupportedEntryPoints = async (client) => {\n return client.request({\n method: \"eth_supportedEntryPoints\",\n params: []\n });\n };\n }\n });\n\n // ../../../node_modules/.pnpm/@aa-sdk+core@4.62.0_typescript@5.8.3_viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64_/node_modules/@aa-sdk/core/dist/esm/actions/bundler/getUserOperationByHash.js\n var getUserOperationByHash;\n var init_getUserOperationByHash = __esm({\n \"../../../node_modules/.pnpm/@aa-sdk+core@4.62.0_typescript@5.8.3_viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64_/node_modules/@aa-sdk/core/dist/esm/actions/bundler/getUserOperationByHash.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n getUserOperationByHash = async (client, args) => {\n return client.request({\n method: \"eth_getUserOperationByHash\",\n params: [args.hash]\n });\n };\n }\n });\n\n // ../../../node_modules/.pnpm/@aa-sdk+core@4.62.0_typescript@5.8.3_viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64_/node_modules/@aa-sdk/core/dist/esm/actions/bundler/getUserOperationReceipt.js\n var getUserOperationReceipt;\n var init_getUserOperationReceipt = __esm({\n \"../../../node_modules/.pnpm/@aa-sdk+core@4.62.0_typescript@5.8.3_viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64_/node_modules/@aa-sdk/core/dist/esm/actions/bundler/getUserOperationReceipt.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n getUserOperationReceipt = async (client, args) => {\n if (args.tag === void 0) {\n return client.request({\n method: \"eth_getUserOperationReceipt\",\n params: [args.hash]\n });\n }\n return client.request({\n method: \"eth_getUserOperationReceipt\",\n params: [args.hash, args.tag]\n });\n };\n }\n });\n\n // ../../../node_modules/.pnpm/@aa-sdk+core@4.62.0_typescript@5.8.3_viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64_/node_modules/@aa-sdk/core/dist/esm/actions/bundler/sendRawUserOperation.js\n var sendRawUserOperation;\n var init_sendRawUserOperation = __esm({\n \"../../../node_modules/.pnpm/@aa-sdk+core@4.62.0_typescript@5.8.3_viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64_/node_modules/@aa-sdk/core/dist/esm/actions/bundler/sendRawUserOperation.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n sendRawUserOperation = async (client, args) => {\n return client.request({\n method: \"eth_sendUserOperation\",\n params: [args.request, args.entryPoint]\n });\n };\n }\n });\n\n // ../../../node_modules/.pnpm/@aa-sdk+core@4.62.0_typescript@5.8.3_viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64_/node_modules/@aa-sdk/core/dist/esm/client/decorators/bundlerClient.js\n var bundlerActions;\n var init_bundlerClient = __esm({\n \"../../../node_modules/.pnpm/@aa-sdk+core@4.62.0_typescript@5.8.3_viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64_/node_modules/@aa-sdk/core/dist/esm/client/decorators/bundlerClient.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_estimateUserOperationGas();\n init_getSupportedEntryPoints();\n init_getUserOperationByHash();\n init_getUserOperationReceipt();\n init_sendRawUserOperation();\n bundlerActions = (client) => ({\n estimateUserOperationGas: async (request, entryPoint, stateOverride) => estimateUserOperationGas(client, { request, entryPoint, stateOverride }),\n sendRawUserOperation: async (request, entryPoint) => sendRawUserOperation(client, { request, entryPoint }),\n getUserOperationByHash: async (hash3) => getUserOperationByHash(client, { hash: hash3 }),\n getSupportedEntryPoints: async () => getSupportedEntryPoints(client),\n getUserOperationReceipt: async (hash3, tag) => getUserOperationReceipt(client, {\n hash: hash3,\n tag\n })\n });\n }\n });\n\n // ../../../node_modules/.pnpm/@aa-sdk+core@4.62.0_typescript@5.8.3_viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64_/node_modules/@aa-sdk/core/dist/esm/client/bundlerClient.js\n function createBundlerClient(args) {\n if (!args.chain) {\n throw new ChainNotFoundError2();\n }\n const { key = \"bundler-public\", name = \"Public Bundler Client\", type = \"bundlerClient\" } = args;\n const { transport, ...opts } = args;\n const resolvedTransport = transport({\n chain: args.chain,\n pollingInterval: opts.pollingInterval\n });\n const baseParameters = {\n ...args,\n key,\n name,\n type\n };\n const client = (() => {\n if (resolvedTransport.config.type === \"http\") {\n const { url, fetchOptions: fetchOptions_ } = resolvedTransport.value;\n const fetchOptions = fetchOptions_ ?? {};\n if (url.toLowerCase().indexOf(\"alchemy\") > -1) {\n fetchOptions.headers = {\n ...fetchOptions.headers,\n \"Alchemy-AA-Sdk-Version\": VERSION\n };\n }\n return createClient({\n ...baseParameters,\n transport: http(url, {\n ...resolvedTransport.config,\n fetchOptions\n })\n });\n }\n return createClient(baseParameters);\n })();\n return client.extend(publicActions).extend(bundlerActions);\n }\n var init_bundlerClient2 = __esm({\n \"../../../node_modules/.pnpm/@aa-sdk+core@4.62.0_typescript@5.8.3_viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64_/node_modules/@aa-sdk/core/dist/esm/client/bundlerClient.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_esm();\n init_client();\n init_version5();\n init_bundlerClient();\n }\n });\n\n // ../../../node_modules/.pnpm/@aa-sdk+core@4.62.0_typescript@5.8.3_viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64_/node_modules/@aa-sdk/core/dist/esm/errors/account.js\n var AccountNotFoundError2, GetCounterFactualAddressError, UpgradesNotSupportedError, SignTransactionNotSupportedError, FailedToGetStorageSlotError, BatchExecutionNotSupportedError, SmartAccountWithSignerRequiredError;\n var init_account2 = __esm({\n \"../../../node_modules/.pnpm/@aa-sdk+core@4.62.0_typescript@5.8.3_viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64_/node_modules/@aa-sdk/core/dist/esm/errors/account.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_base2();\n AccountNotFoundError2 = class extends BaseError4 {\n // TODO: extend this further using docs path as well\n /**\n * Constructor for initializing an error message indicating that an account could not be found to execute the specified action.\n */\n constructor() {\n super(\"Could not find an Account to execute with this Action.\");\n Object.defineProperty(this, \"name\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: \"AccountNotFoundError\"\n });\n }\n };\n GetCounterFactualAddressError = class extends BaseError4 {\n /**\n * Constructor for initializing an error message indicating the failure of fetching the counter-factual address.\n */\n constructor() {\n super(\"getCounterFactualAddress failed\");\n Object.defineProperty(this, \"name\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: \"GetCounterFactualAddressError\"\n });\n }\n };\n UpgradesNotSupportedError = class extends BaseError4 {\n /**\n * Error constructor for indicating that upgrades are not supported by the given account type.\n *\n * @param {string} accountType The type of account that does not support upgrades\n */\n constructor(accountType) {\n super(`Upgrades are not supported by ${accountType}`);\n Object.defineProperty(this, \"name\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: \"UpgradesNotSupported\"\n });\n }\n };\n SignTransactionNotSupportedError = class extends BaseError4 {\n /**\n * Throws an error indicating that signing a transaction is not supported by smart contracts.\n *\n \n */\n constructor() {\n super(`SignTransaction is not supported by smart contracts`);\n Object.defineProperty(this, \"name\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: \"SignTransactionNotSupported\"\n });\n }\n };\n FailedToGetStorageSlotError = class extends BaseError4 {\n /**\n * Custom error message constructor for failing to get a specific storage slot.\n *\n * @param {string} slot The storage slot that failed to be accessed or retrieved\n * @param {string} slotDescriptor A description of the storage slot, for additional context in the error message\n */\n constructor(slot, slotDescriptor) {\n super(`Failed to get storage slot ${slot} (${slotDescriptor})`);\n Object.defineProperty(this, \"name\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: \"FailedToGetStorageSlotError\"\n });\n }\n };\n BatchExecutionNotSupportedError = class extends BaseError4 {\n /**\n * Constructs an error message indicating that batch execution is not supported by the specified account type.\n *\n * @param {string} accountType the type of account that does not support batch execution\n */\n constructor(accountType) {\n super(`Batch execution is not supported by ${accountType}`);\n Object.defineProperty(this, \"name\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: \"BatchExecutionNotSupportedError\"\n });\n }\n };\n SmartAccountWithSignerRequiredError = class extends BaseError4 {\n /**\n * Initializes a new instance of the error class with a predefined error message indicating that a smart account requires a signer.\n */\n constructor() {\n super(\"Smart account requires a signer\");\n Object.defineProperty(this, \"name\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: \"SmartAccountWithSignerRequiredError\"\n });\n }\n };\n }\n });\n\n // ../../../node_modules/.pnpm/@aa-sdk+core@4.62.0_typescript@5.8.3_viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64_/node_modules/@aa-sdk/core/dist/esm/errors/entrypoint.js\n var EntryPointNotFoundError, InvalidEntryPointError;\n var init_entrypoint = __esm({\n \"../../../node_modules/.pnpm/@aa-sdk+core@4.62.0_typescript@5.8.3_viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64_/node_modules/@aa-sdk/core/dist/esm/errors/entrypoint.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_base2();\n EntryPointNotFoundError = class extends BaseError4 {\n /**\n * Constructs an error message indicating that no default entry point exists for the given chain and entry point version.\n *\n * @param {Chain} chain The blockchain network for which the entry point is being queried\n * @param {any} entryPointVersion The version of the entry point for which no default exists\n */\n constructor(chain2, entryPointVersion) {\n super([\n `No default entry point v${entryPointVersion} exists for ${chain2.name}.`,\n `Supply an override.`\n ].join(\"\\n\"));\n Object.defineProperty(this, \"name\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: \"EntryPointNotFoundError\"\n });\n }\n };\n InvalidEntryPointError = class extends BaseError4 {\n /**\n * Constructs an error indicating an invalid entry point version for a specific chain.\n *\n * @param {Chain} chain The chain object containing information about the blockchain\n * @param {any} entryPointVersion The entry point version that is invalid\n */\n constructor(chain2, entryPointVersion) {\n super(`Invalid entry point: unexpected version ${entryPointVersion} for ${chain2.name}.`);\n Object.defineProperty(this, \"name\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: \"InvalidEntryPointError\"\n });\n }\n };\n }\n });\n\n // ../../../node_modules/.pnpm/@aa-sdk+core@4.62.0_typescript@5.8.3_viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64_/node_modules/@aa-sdk/core/dist/esm/logger.js\n var LogLevel, Logger;\n var init_logger = __esm({\n \"../../../node_modules/.pnpm/@aa-sdk+core@4.62.0_typescript@5.8.3_viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64_/node_modules/@aa-sdk/core/dist/esm/logger.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n (function(LogLevel2) {\n LogLevel2[LogLevel2[\"VERBOSE\"] = 5] = \"VERBOSE\";\n LogLevel2[LogLevel2[\"DEBUG\"] = 4] = \"DEBUG\";\n LogLevel2[LogLevel2[\"INFO\"] = 3] = \"INFO\";\n LogLevel2[LogLevel2[\"WARN\"] = 2] = \"WARN\";\n LogLevel2[LogLevel2[\"ERROR\"] = 1] = \"ERROR\";\n LogLevel2[LogLevel2[\"NONE\"] = 0] = \"NONE\";\n })(LogLevel || (LogLevel = {}));\n Logger = class {\n /**\n * Sets the log level for logging purposes.\n *\n * @example\n * ```ts\n * import { Logger, LogLevel } from \"@aa-sdk/core\";\n * Logger.setLogLevel(LogLevel.DEBUG);\n * ```\n *\n * @param {LogLevel} logLevel The desired log level\n */\n static setLogLevel(logLevel) {\n this.logLevel = logLevel;\n }\n /**\n * Sets the log filter pattern.\n *\n * @example\n * ```ts\n * import { Logger } from \"@aa-sdk/core\";\n *\n * Logger.setLogFilter(\"error\");\n * ```\n *\n * @param {string} pattern The pattern to set as the log filter\n */\n static setLogFilter(pattern) {\n this.logFilter = pattern;\n }\n /**\n * Logs an error message to the console if the logging condition is met.\n *\n * @example\n * ```ts\n * import { Logger } from \"@aa-sdk/core\";\n *\n * Logger.error(\"An error occurred while processing the request\");\n * ```\n *\n * @param {string} msg The primary error message to be logged\n * @param {...any[]} args Additional arguments to be logged along with the error message\n */\n static error(msg, ...args) {\n if (!this.shouldLog(msg, LogLevel.ERROR))\n return;\n console.error(msg, ...args);\n }\n /**\n * Logs a warning message if the logging conditions are met.\n *\n * @example\n * ```ts\n * import { Logger } from \"@aa-sdk/core\";\n *\n * Logger.warn(\"Careful...\");\n * ```\n *\n * @param {string} msg The message to log as a warning\n * @param {...any[]} args Additional parameters to log along with the message\n */\n static warn(msg, ...args) {\n if (!this.shouldLog(msg, LogLevel.WARN))\n return;\n console.warn(msg, ...args);\n }\n /**\n * Logs a debug message to the console if the log level allows it.\n *\n * @example\n * ```ts\n * import { Logger } from \"@aa-sdk/core\";\n *\n * Logger.debug(\"Something is happening\");\n * ```\n *\n * @param {string} msg The message to log\n * @param {...any[]} args Additional arguments to pass to the console.debug method\n */\n static debug(msg, ...args) {\n if (!this.shouldLog(msg, LogLevel.DEBUG))\n return;\n console.debug(msg, ...args);\n }\n /**\n * Logs an informational message to the console if the logging level is set to INFO.\n *\n * @example\n * ```ts\n * import { Logger } from \"@aa-sdk/core\";\n *\n * Logger.info(\"Something is happening\");\n * ```\n *\n * @param {string} msg the message to log\n * @param {...any[]} args additional arguments to log alongside the message\n */\n static info(msg, ...args) {\n if (!this.shouldLog(msg, LogLevel.INFO))\n return;\n console.info(msg, ...args);\n }\n /**\n * Logs a message with additional arguments if the logging level permits it.\n *\n * @example\n * ```ts\n * import { Logger } from \"@aa-sdk/core\";\n *\n * Logger.verbose(\"Something is happening\");\n * ```\n *\n * @param {string} msg The message to log\n * @param {...any[]} args Additional arguments to be logged\n */\n static verbose(msg, ...args) {\n if (!this.shouldLog(msg, LogLevel.VERBOSE))\n return;\n console.log(msg, ...args);\n }\n static shouldLog(msg, level) {\n if (this.logLevel < level)\n return false;\n if (this.logFilter && !msg.includes(this.logFilter))\n return false;\n return true;\n }\n };\n Object.defineProperty(Logger, \"logLevel\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: LogLevel.INFO\n });\n }\n });\n\n // ../../../node_modules/.pnpm/@aa-sdk+core@4.62.0_typescript@5.8.3_viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64_/node_modules/@aa-sdk/core/dist/esm/signer/utils.js\n var wrapSignatureWith6492;\n var init_utils9 = __esm({\n \"../../../node_modules/.pnpm/@aa-sdk+core@4.62.0_typescript@5.8.3_viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64_/node_modules/@aa-sdk/core/dist/esm/signer/utils.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_esm();\n wrapSignatureWith6492 = ({ factoryAddress, factoryCalldata, signature }) => {\n return concat([\n encodeAbiParameters(parseAbiParameters(\"address, bytes, bytes\"), [\n factoryAddress,\n factoryCalldata,\n signature\n ]),\n \"0x6492649264926492649264926492649264926492649264926492649264926492\"\n ]);\n };\n }\n });\n\n // ../../../node_modules/.pnpm/@aa-sdk+core@4.62.0_typescript@5.8.3_viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64_/node_modules/@aa-sdk/core/dist/esm/account/smartContractAccount.js\n async function toSmartContractAccount(params) {\n const { transport, chain: chain2, entryPoint, source, accountAddress, getAccountInitCode, signMessage: signMessage3, signTypedData: signTypedData4, encodeExecute, encodeBatchExecute, getNonce, getDummySignature, signUserOperationHash, encodeUpgradeToAndCall, getImplementationAddress, prepareSign: prepareSign_, formatSign: formatSign_ } = params;\n const client = createBundlerClient({\n // we set the retry count to 0 so that viem doesn't retry during\n // getting the address. That call always reverts and without this\n // viem will retry 3 times, making this call very slow\n transport: (opts) => transport({ ...opts, chain: chain2, retryCount: 0 }),\n chain: chain2\n });\n const entryPointContract = getContract({\n address: entryPoint.address,\n abi: entryPoint.abi,\n client\n });\n const accountAddress_ = await getAccountAddress({\n client,\n entryPoint,\n accountAddress,\n getAccountInitCode\n });\n let deploymentState = DeploymentState.UNDEFINED;\n const getInitCode = async () => {\n if (deploymentState === DeploymentState.DEPLOYED) {\n return \"0x\";\n }\n const contractCode = await client.getCode({\n address: accountAddress_\n });\n if ((contractCode?.length ?? 0) > 2) {\n deploymentState = DeploymentState.DEPLOYED;\n return \"0x\";\n } else {\n deploymentState = DeploymentState.NOT_DEPLOYED;\n }\n return getAccountInitCode();\n };\n const signUserOperationHash_ = signUserOperationHash ?? (async (uoHash) => {\n return signMessage3({ message: { raw: hexToBytes(uoHash) } });\n });\n const getFactoryAddress = async () => parseFactoryAddressFromAccountInitCode(await getAccountInitCode())[0];\n const getFactoryData = async () => parseFactoryAddressFromAccountInitCode(await getAccountInitCode())[1];\n const encodeUpgradeToAndCall_ = encodeUpgradeToAndCall ?? (() => {\n throw new UpgradesNotSupportedError(source);\n });\n const isAccountDeployed = async () => {\n const initCode = await getInitCode();\n return initCode === \"0x\";\n };\n const getNonce_ = getNonce ?? (async (nonceKey = 0n) => {\n return entryPointContract.read.getNonce([\n accountAddress_,\n nonceKey\n ]);\n });\n const account = toAccount({\n address: accountAddress_,\n signMessage: signMessage3,\n signTypedData: signTypedData4,\n signTransaction: () => {\n throw new SignTransactionNotSupportedError();\n }\n });\n const create6492Signature = async (isDeployed, signature) => {\n if (isDeployed) {\n return signature;\n }\n const [factoryAddress, factoryCalldata] = parseFactoryAddressFromAccountInitCode(await getAccountInitCode());\n return wrapSignatureWith6492({\n factoryAddress,\n factoryCalldata,\n signature\n });\n };\n const signMessageWith6492 = async (message) => {\n const [isDeployed, signature] = await Promise.all([\n isAccountDeployed(),\n account.signMessage(message)\n ]);\n return create6492Signature(isDeployed, signature);\n };\n const signTypedDataWith6492 = async (typedDataDefinition) => {\n const [isDeployed, signature] = await Promise.all([\n isAccountDeployed(),\n account.signTypedData(typedDataDefinition)\n ]);\n return create6492Signature(isDeployed, signature);\n };\n const getImplementationAddress_ = getImplementationAddress ?? (async () => {\n const storage = await client.getStorageAt({\n address: account.address,\n // This is the default slot for the implementation address for Proxies\n slot: \"0x360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc\"\n });\n if (storage == null) {\n throw new FailedToGetStorageSlotError(\"0x360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc\", \"Proxy Implementation Address\");\n }\n return `0x${storage.slice(26)}`;\n });\n if (entryPoint.version !== \"0.6.0\" && entryPoint.version !== \"0.7.0\") {\n throw new InvalidEntryPointError(chain2, entryPoint.version);\n }\n if (prepareSign_ && !formatSign_ || !prepareSign_ && formatSign_) {\n throw new Error(\"Must implement both prepareSign and formatSign or neither\");\n }\n const prepareSign = prepareSign_ ?? (() => {\n throw new Error(\"prepareSign not implemented\");\n });\n const formatSign = formatSign_ ?? (() => {\n throw new Error(\"formatSign not implemented\");\n });\n return {\n ...account,\n source,\n // TODO: I think this should probably be signUserOperation instead\n // and allow for generating the UO hash based on the EP version\n signUserOperationHash: signUserOperationHash_,\n getFactoryAddress,\n getFactoryData,\n encodeBatchExecute: encodeBatchExecute ?? (() => {\n throw new BatchExecutionNotSupportedError(source);\n }),\n encodeExecute,\n getDummySignature,\n getInitCode,\n encodeUpgradeToAndCall: encodeUpgradeToAndCall_,\n getEntryPoint: () => entryPoint,\n isAccountDeployed,\n getAccountNonce: getNonce_,\n signMessageWith6492,\n signTypedDataWith6492,\n getImplementationAddress: getImplementationAddress_,\n prepareSign,\n formatSign\n };\n }\n var DeploymentState, isSmartAccountWithSigner, parseFactoryAddressFromAccountInitCode, getAccountAddress;\n var init_smartContractAccount = __esm({\n \"../../../node_modules/.pnpm/@aa-sdk+core@4.62.0_typescript@5.8.3_viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64_/node_modules/@aa-sdk/core/dist/esm/account/smartContractAccount.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_esm();\n init_accounts();\n init_bundlerClient2();\n init_account2();\n init_client();\n init_entrypoint();\n init_logger();\n init_utils9();\n (function(DeploymentState2) {\n DeploymentState2[\"UNDEFINED\"] = \"0x0\";\n DeploymentState2[\"NOT_DEPLOYED\"] = \"0x1\";\n DeploymentState2[\"DEPLOYED\"] = \"0x2\";\n })(DeploymentState || (DeploymentState = {}));\n isSmartAccountWithSigner = (account) => {\n return \"getSigner\" in account;\n };\n parseFactoryAddressFromAccountInitCode = (initCode) => {\n const factoryAddress = `0x${initCode.substring(2, 42)}`;\n const factoryCalldata = `0x${initCode.substring(42)}`;\n return [factoryAddress, factoryCalldata];\n };\n getAccountAddress = async ({ client, entryPoint, accountAddress, getAccountInitCode }) => {\n if (accountAddress)\n return accountAddress;\n const entryPointContract = getContract({\n address: entryPoint.address,\n abi: entryPoint.abi,\n client\n });\n const initCode = await getAccountInitCode();\n Logger.verbose(\"[BaseSmartContractAccount](getAddress) initCode: \", initCode);\n try {\n await entryPointContract.simulate.getSenderAddress([initCode]);\n } catch (err) {\n Logger.verbose(\"[BaseSmartContractAccount](getAddress) getSenderAddress err: \", err);\n if (err.cause?.data?.errorName === \"SenderAddressResult\") {\n Logger.verbose(\"[BaseSmartContractAccount](getAddress) entryPoint.getSenderAddress result:\", err.cause.data.args[0]);\n return err.cause.data.args[0];\n }\n if (err.details === \"Invalid URL\") {\n throw new InvalidRpcUrlError();\n }\n }\n throw new GetCounterFactualAddressError();\n };\n }\n });\n\n // ../../../node_modules/.pnpm/@aa-sdk+core@4.62.0_typescript@5.8.3_viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64_/node_modules/@aa-sdk/core/dist/esm/errors/transaction.js\n var TransactionMissingToParamError, FailedToFindTransactionError;\n var init_transaction3 = __esm({\n \"../../../node_modules/.pnpm/@aa-sdk+core@4.62.0_typescript@5.8.3_viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64_/node_modules/@aa-sdk/core/dist/esm/errors/transaction.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_base2();\n TransactionMissingToParamError = class extends BaseError4 {\n /**\n * Throws an error indicating that a transaction is missing the `to` address in the request.\n */\n constructor() {\n super(\"Transaction is missing `to` address set on request\");\n Object.defineProperty(this, \"name\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: \"TransactionMissingToParamError\"\n });\n }\n };\n FailedToFindTransactionError = class extends BaseError4 {\n /**\n * Constructs a new error message indicating a failure to find the transaction for the specified user operation hash.\n *\n * @param {Hex} hash The hexadecimal value representing the user operation hash.\n */\n constructor(hash3) {\n super(`Failed to find transaction for user operation ${hash3}`);\n Object.defineProperty(this, \"name\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: \"FailedToFindTransactionError\"\n });\n }\n };\n }\n });\n\n // ../../../node_modules/.pnpm/@aa-sdk+core@4.62.0_typescript@5.8.3_viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64_/node_modules/@aa-sdk/core/dist/esm/actions/smartAccount/buildUserOperationFromTx.js\n async function buildUserOperationFromTx(client_, args, overrides, context2) {\n const client = clientHeaderTrack(client_, \"buildUserOperationFromTx\");\n const { account = client.account, ...request } = args;\n if (!account || typeof account === \"string\") {\n throw new AccountNotFoundError2();\n }\n if (!request.to) {\n throw new TransactionMissingToParamError();\n }\n if (!isBaseSmartAccountClient(client)) {\n throw new IncompatibleClientError(\"BaseSmartAccountClient\", \"buildUserOperationFromTx\", client);\n }\n const _overrides = {\n ...overrides,\n maxFeePerGas: request.maxFeePerGas ? request.maxFeePerGas : void 0,\n maxPriorityFeePerGas: request.maxPriorityFeePerGas ? request.maxPriorityFeePerGas : void 0\n };\n return buildUserOperation(client, {\n uo: {\n target: request.to,\n data: request.data ?? \"0x\",\n value: request.value ? request.value : 0n\n },\n account,\n context: context2,\n overrides: _overrides\n });\n }\n var init_buildUserOperationFromTx = __esm({\n \"../../../node_modules/.pnpm/@aa-sdk+core@4.62.0_typescript@5.8.3_viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64_/node_modules/@aa-sdk/core/dist/esm/actions/smartAccount/buildUserOperationFromTx.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_isSmartAccountClient();\n init_account2();\n init_client();\n init_transaction3();\n init_buildUserOperation();\n init_esm6();\n }\n });\n\n // ../../../node_modules/.pnpm/zod@3.25.64/node_modules/zod/dist/esm/v3/helpers/util.js\n var util, objectUtil, ZodParsedType, getParsedType;\n var init_util = __esm({\n \"../../../node_modules/.pnpm/zod@3.25.64/node_modules/zod/dist/esm/v3/helpers/util.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n (function(util2) {\n util2.assertEqual = (_2) => {\n };\n function assertIs(_arg) {\n }\n util2.assertIs = assertIs;\n function assertNever2(_x) {\n throw new Error();\n }\n util2.assertNever = assertNever2;\n util2.arrayToEnum = (items) => {\n const obj = {};\n for (const item of items) {\n obj[item] = item;\n }\n return obj;\n };\n util2.getValidEnumValues = (obj) => {\n const validKeys = util2.objectKeys(obj).filter((k4) => typeof obj[obj[k4]] !== \"number\");\n const filtered = {};\n for (const k4 of validKeys) {\n filtered[k4] = obj[k4];\n }\n return util2.objectValues(filtered);\n };\n util2.objectValues = (obj) => {\n return util2.objectKeys(obj).map(function(e3) {\n return obj[e3];\n });\n };\n util2.objectKeys = typeof Object.keys === \"function\" ? (obj) => Object.keys(obj) : (object2) => {\n const keys = [];\n for (const key in object2) {\n if (Object.prototype.hasOwnProperty.call(object2, key)) {\n keys.push(key);\n }\n }\n return keys;\n };\n util2.find = (arr, checker) => {\n for (const item of arr) {\n if (checker(item))\n return item;\n }\n return void 0;\n };\n util2.isInteger = typeof Number.isInteger === \"function\" ? (val) => Number.isInteger(val) : (val) => typeof val === \"number\" && Number.isFinite(val) && Math.floor(val) === val;\n function joinValues(array2, separator = \" | \") {\n return array2.map((val) => typeof val === \"string\" ? `'${val}'` : val).join(separator);\n }\n util2.joinValues = joinValues;\n util2.jsonStringifyReplacer = (_2, value) => {\n if (typeof value === \"bigint\") {\n return value.toString();\n }\n return value;\n };\n })(util || (util = {}));\n (function(objectUtil2) {\n objectUtil2.mergeShapes = (first, second) => {\n return {\n ...first,\n ...second\n // second overwrites first\n };\n };\n })(objectUtil || (objectUtil = {}));\n ZodParsedType = util.arrayToEnum([\n \"string\",\n \"nan\",\n \"number\",\n \"integer\",\n \"float\",\n \"boolean\",\n \"date\",\n \"bigint\",\n \"symbol\",\n \"function\",\n \"undefined\",\n \"null\",\n \"array\",\n \"object\",\n \"unknown\",\n \"promise\",\n \"void\",\n \"never\",\n \"map\",\n \"set\"\n ]);\n getParsedType = (data) => {\n const t3 = typeof data;\n switch (t3) {\n case \"undefined\":\n return ZodParsedType.undefined;\n case \"string\":\n return ZodParsedType.string;\n case \"number\":\n return Number.isNaN(data) ? ZodParsedType.nan : ZodParsedType.number;\n case \"boolean\":\n return ZodParsedType.boolean;\n case \"function\":\n return ZodParsedType.function;\n case \"bigint\":\n return ZodParsedType.bigint;\n case \"symbol\":\n return ZodParsedType.symbol;\n case \"object\":\n if (Array.isArray(data)) {\n return ZodParsedType.array;\n }\n if (data === null) {\n return ZodParsedType.null;\n }\n if (data.then && typeof data.then === \"function\" && data.catch && typeof data.catch === \"function\") {\n return ZodParsedType.promise;\n }\n if (typeof Map !== \"undefined\" && data instanceof Map) {\n return ZodParsedType.map;\n }\n if (typeof Set !== \"undefined\" && data instanceof Set) {\n return ZodParsedType.set;\n }\n if (typeof Date !== \"undefined\" && data instanceof Date) {\n return ZodParsedType.date;\n }\n return ZodParsedType.object;\n default:\n return ZodParsedType.unknown;\n }\n };\n }\n });\n\n // ../../../node_modules/.pnpm/zod@3.25.64/node_modules/zod/dist/esm/v3/ZodError.js\n var ZodIssueCode, quotelessJson, ZodError;\n var init_ZodError = __esm({\n \"../../../node_modules/.pnpm/zod@3.25.64/node_modules/zod/dist/esm/v3/ZodError.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_util();\n ZodIssueCode = util.arrayToEnum([\n \"invalid_type\",\n \"invalid_literal\",\n \"custom\",\n \"invalid_union\",\n \"invalid_union_discriminator\",\n \"invalid_enum_value\",\n \"unrecognized_keys\",\n \"invalid_arguments\",\n \"invalid_return_type\",\n \"invalid_date\",\n \"invalid_string\",\n \"too_small\",\n \"too_big\",\n \"invalid_intersection_types\",\n \"not_multiple_of\",\n \"not_finite\"\n ]);\n quotelessJson = (obj) => {\n const json = JSON.stringify(obj, null, 2);\n return json.replace(/\"([^\"]+)\":/g, \"$1:\");\n };\n ZodError = class _ZodError extends Error {\n get errors() {\n return this.issues;\n }\n constructor(issues) {\n super();\n this.issues = [];\n this.addIssue = (sub) => {\n this.issues = [...this.issues, sub];\n };\n this.addIssues = (subs = []) => {\n this.issues = [...this.issues, ...subs];\n };\n const actualProto = new.target.prototype;\n if (Object.setPrototypeOf) {\n Object.setPrototypeOf(this, actualProto);\n } else {\n this.__proto__ = actualProto;\n }\n this.name = \"ZodError\";\n this.issues = issues;\n }\n format(_mapper) {\n const mapper = _mapper || function(issue) {\n return issue.message;\n };\n const fieldErrors = { _errors: [] };\n const processError = (error) => {\n for (const issue of error.issues) {\n if (issue.code === \"invalid_union\") {\n issue.unionErrors.map(processError);\n } else if (issue.code === \"invalid_return_type\") {\n processError(issue.returnTypeError);\n } else if (issue.code === \"invalid_arguments\") {\n processError(issue.argumentsError);\n } else if (issue.path.length === 0) {\n fieldErrors._errors.push(mapper(issue));\n } else {\n let curr = fieldErrors;\n let i3 = 0;\n while (i3 < issue.path.length) {\n const el = issue.path[i3];\n const terminal = i3 === issue.path.length - 1;\n if (!terminal) {\n curr[el] = curr[el] || { _errors: [] };\n } else {\n curr[el] = curr[el] || { _errors: [] };\n curr[el]._errors.push(mapper(issue));\n }\n curr = curr[el];\n i3++;\n }\n }\n }\n };\n processError(this);\n return fieldErrors;\n }\n static assert(value) {\n if (!(value instanceof _ZodError)) {\n throw new Error(`Not a ZodError: ${value}`);\n }\n }\n toString() {\n return this.message;\n }\n get message() {\n return JSON.stringify(this.issues, util.jsonStringifyReplacer, 2);\n }\n get isEmpty() {\n return this.issues.length === 0;\n }\n flatten(mapper = (issue) => issue.message) {\n const fieldErrors = {};\n const formErrors = [];\n for (const sub of this.issues) {\n if (sub.path.length > 0) {\n fieldErrors[sub.path[0]] = fieldErrors[sub.path[0]] || [];\n fieldErrors[sub.path[0]].push(mapper(sub));\n } else {\n formErrors.push(mapper(sub));\n }\n }\n return { formErrors, fieldErrors };\n }\n get formErrors() {\n return this.flatten();\n }\n };\n ZodError.create = (issues) => {\n const error = new ZodError(issues);\n return error;\n };\n }\n });\n\n // ../../../node_modules/.pnpm/zod@3.25.64/node_modules/zod/dist/esm/v3/locales/en.js\n var errorMap, en_default;\n var init_en = __esm({\n \"../../../node_modules/.pnpm/zod@3.25.64/node_modules/zod/dist/esm/v3/locales/en.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_ZodError();\n init_util();\n errorMap = (issue, _ctx) => {\n let message;\n switch (issue.code) {\n case ZodIssueCode.invalid_type:\n if (issue.received === ZodParsedType.undefined) {\n message = \"Required\";\n } else {\n message = `Expected ${issue.expected}, received ${issue.received}`;\n }\n break;\n case ZodIssueCode.invalid_literal:\n message = `Invalid literal value, expected ${JSON.stringify(issue.expected, util.jsonStringifyReplacer)}`;\n break;\n case ZodIssueCode.unrecognized_keys:\n message = `Unrecognized key(s) in object: ${util.joinValues(issue.keys, \", \")}`;\n break;\n case ZodIssueCode.invalid_union:\n message = `Invalid input`;\n break;\n case ZodIssueCode.invalid_union_discriminator:\n message = `Invalid discriminator value. Expected ${util.joinValues(issue.options)}`;\n break;\n case ZodIssueCode.invalid_enum_value:\n message = `Invalid enum value. Expected ${util.joinValues(issue.options)}, received '${issue.received}'`;\n break;\n case ZodIssueCode.invalid_arguments:\n message = `Invalid function arguments`;\n break;\n case ZodIssueCode.invalid_return_type:\n message = `Invalid function return type`;\n break;\n case ZodIssueCode.invalid_date:\n message = `Invalid date`;\n break;\n case ZodIssueCode.invalid_string:\n if (typeof issue.validation === \"object\") {\n if (\"includes\" in issue.validation) {\n message = `Invalid input: must include \"${issue.validation.includes}\"`;\n if (typeof issue.validation.position === \"number\") {\n message = `${message} at one or more positions greater than or equal to ${issue.validation.position}`;\n }\n } else if (\"startsWith\" in issue.validation) {\n message = `Invalid input: must start with \"${issue.validation.startsWith}\"`;\n } else if (\"endsWith\" in issue.validation) {\n message = `Invalid input: must end with \"${issue.validation.endsWith}\"`;\n } else {\n util.assertNever(issue.validation);\n }\n } else if (issue.validation !== \"regex\") {\n message = `Invalid ${issue.validation}`;\n } else {\n message = \"Invalid\";\n }\n break;\n case ZodIssueCode.too_small:\n if (issue.type === \"array\")\n message = `Array must contain ${issue.exact ? \"exactly\" : issue.inclusive ? `at least` : `more than`} ${issue.minimum} element(s)`;\n else if (issue.type === \"string\")\n message = `String must contain ${issue.exact ? \"exactly\" : issue.inclusive ? `at least` : `over`} ${issue.minimum} character(s)`;\n else if (issue.type === \"number\")\n message = `Number must be ${issue.exact ? `exactly equal to ` : issue.inclusive ? `greater than or equal to ` : `greater than `}${issue.minimum}`;\n else if (issue.type === \"date\")\n message = `Date must be ${issue.exact ? `exactly equal to ` : issue.inclusive ? `greater than or equal to ` : `greater than `}${new Date(Number(issue.minimum))}`;\n else\n message = \"Invalid input\";\n break;\n case ZodIssueCode.too_big:\n if (issue.type === \"array\")\n message = `Array must contain ${issue.exact ? `exactly` : issue.inclusive ? `at most` : `less than`} ${issue.maximum} element(s)`;\n else if (issue.type === \"string\")\n message = `String must contain ${issue.exact ? `exactly` : issue.inclusive ? `at most` : `under`} ${issue.maximum} character(s)`;\n else if (issue.type === \"number\")\n message = `Number must be ${issue.exact ? `exactly` : issue.inclusive ? `less than or equal to` : `less than`} ${issue.maximum}`;\n else if (issue.type === \"bigint\")\n message = `BigInt must be ${issue.exact ? `exactly` : issue.inclusive ? `less than or equal to` : `less than`} ${issue.maximum}`;\n else if (issue.type === \"date\")\n message = `Date must be ${issue.exact ? `exactly` : issue.inclusive ? `smaller than or equal to` : `smaller than`} ${new Date(Number(issue.maximum))}`;\n else\n message = \"Invalid input\";\n break;\n case ZodIssueCode.custom:\n message = `Invalid input`;\n break;\n case ZodIssueCode.invalid_intersection_types:\n message = `Intersection results could not be merged`;\n break;\n case ZodIssueCode.not_multiple_of:\n message = `Number must be a multiple of ${issue.multipleOf}`;\n break;\n case ZodIssueCode.not_finite:\n message = \"Number must be finite\";\n break;\n default:\n message = _ctx.defaultError;\n util.assertNever(issue);\n }\n return { message };\n };\n en_default = errorMap;\n }\n });\n\n // ../../../node_modules/.pnpm/zod@3.25.64/node_modules/zod/dist/esm/v3/errors.js\n function setErrorMap(map) {\n overrideErrorMap = map;\n }\n function getErrorMap() {\n return overrideErrorMap;\n }\n var overrideErrorMap;\n var init_errors5 = __esm({\n \"../../../node_modules/.pnpm/zod@3.25.64/node_modules/zod/dist/esm/v3/errors.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_en();\n overrideErrorMap = en_default;\n }\n });\n\n // ../../../node_modules/.pnpm/zod@3.25.64/node_modules/zod/dist/esm/v3/helpers/parseUtil.js\n function addIssueToContext(ctx, issueData) {\n const overrideMap = getErrorMap();\n const issue = makeIssue({\n issueData,\n data: ctx.data,\n path: ctx.path,\n errorMaps: [\n ctx.common.contextualErrorMap,\n // contextual error map is first priority\n ctx.schemaErrorMap,\n // then schema-bound map if available\n overrideMap,\n // then global override map\n overrideMap === en_default ? void 0 : en_default\n // then global default map\n ].filter((x4) => !!x4)\n });\n ctx.common.issues.push(issue);\n }\n var makeIssue, EMPTY_PATH, ParseStatus, INVALID, DIRTY, OK, isAborted, isDirty, isValid, isAsync;\n var init_parseUtil = __esm({\n \"../../../node_modules/.pnpm/zod@3.25.64/node_modules/zod/dist/esm/v3/helpers/parseUtil.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_errors5();\n init_en();\n makeIssue = (params) => {\n const { data, path, errorMaps, issueData } = params;\n const fullPath = [...path, ...issueData.path || []];\n const fullIssue = {\n ...issueData,\n path: fullPath\n };\n if (issueData.message !== void 0) {\n return {\n ...issueData,\n path: fullPath,\n message: issueData.message\n };\n }\n let errorMessage = \"\";\n const maps = errorMaps.filter((m2) => !!m2).slice().reverse();\n for (const map of maps) {\n errorMessage = map(fullIssue, { data, defaultError: errorMessage }).message;\n }\n return {\n ...issueData,\n path: fullPath,\n message: errorMessage\n };\n };\n EMPTY_PATH = [];\n ParseStatus = class _ParseStatus {\n constructor() {\n this.value = \"valid\";\n }\n dirty() {\n if (this.value === \"valid\")\n this.value = \"dirty\";\n }\n abort() {\n if (this.value !== \"aborted\")\n this.value = \"aborted\";\n }\n static mergeArray(status, results) {\n const arrayValue = [];\n for (const s4 of results) {\n if (s4.status === \"aborted\")\n return INVALID;\n if (s4.status === \"dirty\")\n status.dirty();\n arrayValue.push(s4.value);\n }\n return { status: status.value, value: arrayValue };\n }\n static async mergeObjectAsync(status, pairs) {\n const syncPairs = [];\n for (const pair of pairs) {\n const key = await pair.key;\n const value = await pair.value;\n syncPairs.push({\n key,\n value\n });\n }\n return _ParseStatus.mergeObjectSync(status, syncPairs);\n }\n static mergeObjectSync(status, pairs) {\n const finalObject = {};\n for (const pair of pairs) {\n const { key, value } = pair;\n if (key.status === \"aborted\")\n return INVALID;\n if (value.status === \"aborted\")\n return INVALID;\n if (key.status === \"dirty\")\n status.dirty();\n if (value.status === \"dirty\")\n status.dirty();\n if (key.value !== \"__proto__\" && (typeof value.value !== \"undefined\" || pair.alwaysSet)) {\n finalObject[key.value] = value.value;\n }\n }\n return { status: status.value, value: finalObject };\n }\n };\n INVALID = Object.freeze({\n status: \"aborted\"\n });\n DIRTY = (value) => ({ status: \"dirty\", value });\n OK = (value) => ({ status: \"valid\", value });\n isAborted = (x4) => x4.status === \"aborted\";\n isDirty = (x4) => x4.status === \"dirty\";\n isValid = (x4) => x4.status === \"valid\";\n isAsync = (x4) => typeof Promise !== \"undefined\" && x4 instanceof Promise;\n }\n });\n\n // ../../../node_modules/.pnpm/zod@3.25.64/node_modules/zod/dist/esm/v3/helpers/typeAliases.js\n var init_typeAliases = __esm({\n \"../../../node_modules/.pnpm/zod@3.25.64/node_modules/zod/dist/esm/v3/helpers/typeAliases.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n }\n });\n\n // ../../../node_modules/.pnpm/zod@3.25.64/node_modules/zod/dist/esm/v3/helpers/errorUtil.js\n var errorUtil;\n var init_errorUtil = __esm({\n \"../../../node_modules/.pnpm/zod@3.25.64/node_modules/zod/dist/esm/v3/helpers/errorUtil.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n (function(errorUtil2) {\n errorUtil2.errToObj = (message) => typeof message === \"string\" ? { message } : message || {};\n errorUtil2.toString = (message) => typeof message === \"string\" ? message : message?.message;\n })(errorUtil || (errorUtil = {}));\n }\n });\n\n // ../../../node_modules/.pnpm/zod@3.25.64/node_modules/zod/dist/esm/v3/types.js\n function processCreateParams(params) {\n if (!params)\n return {};\n const { errorMap: errorMap2, invalid_type_error, required_error, description: description2 } = params;\n if (errorMap2 && (invalid_type_error || required_error)) {\n throw new Error(`Can't use \"invalid_type_error\" or \"required_error\" in conjunction with custom error map.`);\n }\n if (errorMap2)\n return { errorMap: errorMap2, description: description2 };\n const customMap = (iss, ctx) => {\n const { message } = params;\n if (iss.code === \"invalid_enum_value\") {\n return { message: message ?? ctx.defaultError };\n }\n if (typeof ctx.data === \"undefined\") {\n return { message: message ?? required_error ?? ctx.defaultError };\n }\n if (iss.code !== \"invalid_type\")\n return { message: ctx.defaultError };\n return { message: message ?? invalid_type_error ?? ctx.defaultError };\n };\n return { errorMap: customMap, description: description2 };\n }\n function timeRegexSource(args) {\n let secondsRegexSource = `[0-5]\\\\d`;\n if (args.precision) {\n secondsRegexSource = `${secondsRegexSource}\\\\.\\\\d{${args.precision}}`;\n } else if (args.precision == null) {\n secondsRegexSource = `${secondsRegexSource}(\\\\.\\\\d+)?`;\n }\n const secondsQuantifier = args.precision ? \"+\" : \"?\";\n return `([01]\\\\d|2[0-3]):[0-5]\\\\d(:${secondsRegexSource})${secondsQuantifier}`;\n }\n function timeRegex(args) {\n return new RegExp(`^${timeRegexSource(args)}$`);\n }\n function datetimeRegex(args) {\n let regex2 = `${dateRegexSource}T${timeRegexSource(args)}`;\n const opts = [];\n opts.push(args.local ? `Z?` : `Z`);\n if (args.offset)\n opts.push(`([+-]\\\\d{2}:?\\\\d{2})`);\n regex2 = `${regex2}(${opts.join(\"|\")})`;\n return new RegExp(`^${regex2}$`);\n }\n function isValidIP(ip, version6) {\n if ((version6 === \"v4\" || !version6) && ipv4Regex.test(ip)) {\n return true;\n }\n if ((version6 === \"v6\" || !version6) && ipv6Regex.test(ip)) {\n return true;\n }\n return false;\n }\n function isValidJWT(jwt, alg) {\n if (!jwtRegex.test(jwt))\n return false;\n try {\n const [header] = jwt.split(\".\");\n const base64 = header.replace(/-/g, \"+\").replace(/_/g, \"/\").padEnd(header.length + (4 - header.length % 4) % 4, \"=\");\n const decoded = JSON.parse(atob(base64));\n if (typeof decoded !== \"object\" || decoded === null)\n return false;\n if (\"typ\" in decoded && decoded?.typ !== \"JWT\")\n return false;\n if (!decoded.alg)\n return false;\n if (alg && decoded.alg !== alg)\n return false;\n return true;\n } catch {\n return false;\n }\n }\n function isValidCidr(ip, version6) {\n if ((version6 === \"v4\" || !version6) && ipv4CidrRegex.test(ip)) {\n return true;\n }\n if ((version6 === \"v6\" || !version6) && ipv6CidrRegex.test(ip)) {\n return true;\n }\n return false;\n }\n function floatSafeRemainder(val, step) {\n const valDecCount = (val.toString().split(\".\")[1] || \"\").length;\n const stepDecCount = (step.toString().split(\".\")[1] || \"\").length;\n const decCount = valDecCount > stepDecCount ? valDecCount : stepDecCount;\n const valInt = Number.parseInt(val.toFixed(decCount).replace(\".\", \"\"));\n const stepInt = Number.parseInt(step.toFixed(decCount).replace(\".\", \"\"));\n return valInt % stepInt / 10 ** decCount;\n }\n function deepPartialify(schema) {\n if (schema instanceof ZodObject) {\n const newShape = {};\n for (const key in schema.shape) {\n const fieldSchema = schema.shape[key];\n newShape[key] = ZodOptional.create(deepPartialify(fieldSchema));\n }\n return new ZodObject({\n ...schema._def,\n shape: () => newShape\n });\n } else if (schema instanceof ZodArray) {\n return new ZodArray({\n ...schema._def,\n type: deepPartialify(schema.element)\n });\n } else if (schema instanceof ZodOptional) {\n return ZodOptional.create(deepPartialify(schema.unwrap()));\n } else if (schema instanceof ZodNullable) {\n return ZodNullable.create(deepPartialify(schema.unwrap()));\n } else if (schema instanceof ZodTuple) {\n return ZodTuple.create(schema.items.map((item) => deepPartialify(item)));\n } else {\n return schema;\n }\n }\n function mergeValues(a3, b4) {\n const aType = getParsedType(a3);\n const bType = getParsedType(b4);\n if (a3 === b4) {\n return { valid: true, data: a3 };\n } else if (aType === ZodParsedType.object && bType === ZodParsedType.object) {\n const bKeys = util.objectKeys(b4);\n const sharedKeys = util.objectKeys(a3).filter((key) => bKeys.indexOf(key) !== -1);\n const newObj = { ...a3, ...b4 };\n for (const key of sharedKeys) {\n const sharedValue = mergeValues(a3[key], b4[key]);\n if (!sharedValue.valid) {\n return { valid: false };\n }\n newObj[key] = sharedValue.data;\n }\n return { valid: true, data: newObj };\n } else if (aType === ZodParsedType.array && bType === ZodParsedType.array) {\n if (a3.length !== b4.length) {\n return { valid: false };\n }\n const newArray = [];\n for (let index2 = 0; index2 < a3.length; index2++) {\n const itemA = a3[index2];\n const itemB = b4[index2];\n const sharedValue = mergeValues(itemA, itemB);\n if (!sharedValue.valid) {\n return { valid: false };\n }\n newArray.push(sharedValue.data);\n }\n return { valid: true, data: newArray };\n } else if (aType === ZodParsedType.date && bType === ZodParsedType.date && +a3 === +b4) {\n return { valid: true, data: a3 };\n } else {\n return { valid: false };\n }\n }\n function createZodEnum(values, params) {\n return new ZodEnum({\n values,\n typeName: ZodFirstPartyTypeKind.ZodEnum,\n ...processCreateParams(params)\n });\n }\n function cleanParams(params, data) {\n const p4 = typeof params === \"function\" ? params(data) : typeof params === \"string\" ? { message: params } : params;\n const p22 = typeof p4 === \"string\" ? { message: p4 } : p4;\n return p22;\n }\n function custom2(check, _params = {}, fatal) {\n if (check)\n return ZodAny.create().superRefine((data, ctx) => {\n const r2 = check(data);\n if (r2 instanceof Promise) {\n return r2.then((r3) => {\n if (!r3) {\n const params = cleanParams(_params, data);\n const _fatal = params.fatal ?? fatal ?? true;\n ctx.addIssue({ code: \"custom\", ...params, fatal: _fatal });\n }\n });\n }\n if (!r2) {\n const params = cleanParams(_params, data);\n const _fatal = params.fatal ?? fatal ?? true;\n ctx.addIssue({ code: \"custom\", ...params, fatal: _fatal });\n }\n return;\n });\n return ZodAny.create();\n }\n var ParseInputLazyPath, handleResult, ZodType, cuidRegex, cuid2Regex, ulidRegex, uuidRegex, nanoidRegex, jwtRegex, durationRegex, emailRegex, _emojiRegex, emojiRegex, ipv4Regex, ipv4CidrRegex, ipv6Regex, ipv6CidrRegex, base64Regex2, base64urlRegex, dateRegexSource, dateRegex, ZodString, ZodNumber, ZodBigInt, ZodBoolean, ZodDate, ZodSymbol, ZodUndefined, ZodNull, ZodAny, ZodUnknown, ZodNever, ZodVoid, ZodArray, ZodObject, ZodUnion, getDiscriminator, ZodDiscriminatedUnion, ZodIntersection, ZodTuple, ZodRecord, ZodMap, ZodSet, ZodFunction, ZodLazy, ZodLiteral, ZodEnum, ZodNativeEnum, ZodPromise, ZodEffects, ZodOptional, ZodNullable, ZodDefault, ZodCatch, ZodNaN, BRAND, ZodBranded, ZodPipeline, ZodReadonly, late, ZodFirstPartyTypeKind, instanceOfType, stringType, numberType, nanType, bigIntType, booleanType, dateType, symbolType, undefinedType, nullType, anyType, unknownType, neverType, voidType, arrayType, objectType, strictObjectType, unionType, discriminatedUnionType, intersectionType, tupleType, recordType, mapType, setType, functionType, lazyType, literalType, enumType, nativeEnumType, promiseType, effectsType, optionalType, nullableType, preprocessType, pipelineType, ostring, onumber, oboolean, coerce, NEVER;\n var init_types2 = __esm({\n \"../../../node_modules/.pnpm/zod@3.25.64/node_modules/zod/dist/esm/v3/types.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_ZodError();\n init_errors5();\n init_errorUtil();\n init_parseUtil();\n init_util();\n ParseInputLazyPath = class {\n constructor(parent, value, path, key) {\n this._cachedPath = [];\n this.parent = parent;\n this.data = value;\n this._path = path;\n this._key = key;\n }\n get path() {\n if (!this._cachedPath.length) {\n if (Array.isArray(this._key)) {\n this._cachedPath.push(...this._path, ...this._key);\n } else {\n this._cachedPath.push(...this._path, this._key);\n }\n }\n return this._cachedPath;\n }\n };\n handleResult = (ctx, result) => {\n if (isValid(result)) {\n return { success: true, data: result.value };\n } else {\n if (!ctx.common.issues.length) {\n throw new Error(\"Validation failed but no issues detected.\");\n }\n return {\n success: false,\n get error() {\n if (this._error)\n return this._error;\n const error = new ZodError(ctx.common.issues);\n this._error = error;\n return this._error;\n }\n };\n }\n };\n ZodType = class {\n get description() {\n return this._def.description;\n }\n _getType(input) {\n return getParsedType(input.data);\n }\n _getOrReturnCtx(input, ctx) {\n return ctx || {\n common: input.parent.common,\n data: input.data,\n parsedType: getParsedType(input.data),\n schemaErrorMap: this._def.errorMap,\n path: input.path,\n parent: input.parent\n };\n }\n _processInputParams(input) {\n return {\n status: new ParseStatus(),\n ctx: {\n common: input.parent.common,\n data: input.data,\n parsedType: getParsedType(input.data),\n schemaErrorMap: this._def.errorMap,\n path: input.path,\n parent: input.parent\n }\n };\n }\n _parseSync(input) {\n const result = this._parse(input);\n if (isAsync(result)) {\n throw new Error(\"Synchronous parse encountered promise.\");\n }\n return result;\n }\n _parseAsync(input) {\n const result = this._parse(input);\n return Promise.resolve(result);\n }\n parse(data, params) {\n const result = this.safeParse(data, params);\n if (result.success)\n return result.data;\n throw result.error;\n }\n safeParse(data, params) {\n const ctx = {\n common: {\n issues: [],\n async: params?.async ?? false,\n contextualErrorMap: params?.errorMap\n },\n path: params?.path || [],\n schemaErrorMap: this._def.errorMap,\n parent: null,\n data,\n parsedType: getParsedType(data)\n };\n const result = this._parseSync({ data, path: ctx.path, parent: ctx });\n return handleResult(ctx, result);\n }\n \"~validate\"(data) {\n const ctx = {\n common: {\n issues: [],\n async: !!this[\"~standard\"].async\n },\n path: [],\n schemaErrorMap: this._def.errorMap,\n parent: null,\n data,\n parsedType: getParsedType(data)\n };\n if (!this[\"~standard\"].async) {\n try {\n const result = this._parseSync({ data, path: [], parent: ctx });\n return isValid(result) ? {\n value: result.value\n } : {\n issues: ctx.common.issues\n };\n } catch (err) {\n if (err?.message?.toLowerCase()?.includes(\"encountered\")) {\n this[\"~standard\"].async = true;\n }\n ctx.common = {\n issues: [],\n async: true\n };\n }\n }\n return this._parseAsync({ data, path: [], parent: ctx }).then((result) => isValid(result) ? {\n value: result.value\n } : {\n issues: ctx.common.issues\n });\n }\n async parseAsync(data, params) {\n const result = await this.safeParseAsync(data, params);\n if (result.success)\n return result.data;\n throw result.error;\n }\n async safeParseAsync(data, params) {\n const ctx = {\n common: {\n issues: [],\n contextualErrorMap: params?.errorMap,\n async: true\n },\n path: params?.path || [],\n schemaErrorMap: this._def.errorMap,\n parent: null,\n data,\n parsedType: getParsedType(data)\n };\n const maybeAsyncResult = this._parse({ data, path: ctx.path, parent: ctx });\n const result = await (isAsync(maybeAsyncResult) ? maybeAsyncResult : Promise.resolve(maybeAsyncResult));\n return handleResult(ctx, result);\n }\n refine(check, message) {\n const getIssueProperties = (val) => {\n if (typeof message === \"string\" || typeof message === \"undefined\") {\n return { message };\n } else if (typeof message === \"function\") {\n return message(val);\n } else {\n return message;\n }\n };\n return this._refinement((val, ctx) => {\n const result = check(val);\n const setError = () => ctx.addIssue({\n code: ZodIssueCode.custom,\n ...getIssueProperties(val)\n });\n if (typeof Promise !== \"undefined\" && result instanceof Promise) {\n return result.then((data) => {\n if (!data) {\n setError();\n return false;\n } else {\n return true;\n }\n });\n }\n if (!result) {\n setError();\n return false;\n } else {\n return true;\n }\n });\n }\n refinement(check, refinementData) {\n return this._refinement((val, ctx) => {\n if (!check(val)) {\n ctx.addIssue(typeof refinementData === \"function\" ? refinementData(val, ctx) : refinementData);\n return false;\n } else {\n return true;\n }\n });\n }\n _refinement(refinement) {\n return new ZodEffects({\n schema: this,\n typeName: ZodFirstPartyTypeKind.ZodEffects,\n effect: { type: \"refinement\", refinement }\n });\n }\n superRefine(refinement) {\n return this._refinement(refinement);\n }\n constructor(def) {\n this.spa = this.safeParseAsync;\n this._def = def;\n this.parse = this.parse.bind(this);\n this.safeParse = this.safeParse.bind(this);\n this.parseAsync = this.parseAsync.bind(this);\n this.safeParseAsync = this.safeParseAsync.bind(this);\n this.spa = this.spa.bind(this);\n this.refine = this.refine.bind(this);\n this.refinement = this.refinement.bind(this);\n this.superRefine = this.superRefine.bind(this);\n this.optional = this.optional.bind(this);\n this.nullable = this.nullable.bind(this);\n this.nullish = this.nullish.bind(this);\n this.array = this.array.bind(this);\n this.promise = this.promise.bind(this);\n this.or = this.or.bind(this);\n this.and = this.and.bind(this);\n this.transform = this.transform.bind(this);\n this.brand = this.brand.bind(this);\n this.default = this.default.bind(this);\n this.catch = this.catch.bind(this);\n this.describe = this.describe.bind(this);\n this.pipe = this.pipe.bind(this);\n this.readonly = this.readonly.bind(this);\n this.isNullable = this.isNullable.bind(this);\n this.isOptional = this.isOptional.bind(this);\n this[\"~standard\"] = {\n version: 1,\n vendor: \"zod\",\n validate: (data) => this[\"~validate\"](data)\n };\n }\n optional() {\n return ZodOptional.create(this, this._def);\n }\n nullable() {\n return ZodNullable.create(this, this._def);\n }\n nullish() {\n return this.nullable().optional();\n }\n array() {\n return ZodArray.create(this);\n }\n promise() {\n return ZodPromise.create(this, this._def);\n }\n or(option) {\n return ZodUnion.create([this, option], this._def);\n }\n and(incoming) {\n return ZodIntersection.create(this, incoming, this._def);\n }\n transform(transform2) {\n return new ZodEffects({\n ...processCreateParams(this._def),\n schema: this,\n typeName: ZodFirstPartyTypeKind.ZodEffects,\n effect: { type: \"transform\", transform: transform2 }\n });\n }\n default(def) {\n const defaultValueFunc = typeof def === \"function\" ? def : () => def;\n return new ZodDefault({\n ...processCreateParams(this._def),\n innerType: this,\n defaultValue: defaultValueFunc,\n typeName: ZodFirstPartyTypeKind.ZodDefault\n });\n }\n brand() {\n return new ZodBranded({\n typeName: ZodFirstPartyTypeKind.ZodBranded,\n type: this,\n ...processCreateParams(this._def)\n });\n }\n catch(def) {\n const catchValueFunc = typeof def === \"function\" ? def : () => def;\n return new ZodCatch({\n ...processCreateParams(this._def),\n innerType: this,\n catchValue: catchValueFunc,\n typeName: ZodFirstPartyTypeKind.ZodCatch\n });\n }\n describe(description2) {\n const This = this.constructor;\n return new This({\n ...this._def,\n description: description2\n });\n }\n pipe(target) {\n return ZodPipeline.create(this, target);\n }\n readonly() {\n return ZodReadonly.create(this);\n }\n isOptional() {\n return this.safeParse(void 0).success;\n }\n isNullable() {\n return this.safeParse(null).success;\n }\n };\n cuidRegex = /^c[^\\s-]{8,}$/i;\n cuid2Regex = /^[0-9a-z]+$/;\n ulidRegex = /^[0-9A-HJKMNP-TV-Z]{26}$/i;\n uuidRegex = /^[0-9a-fA-F]{8}\\b-[0-9a-fA-F]{4}\\b-[0-9a-fA-F]{4}\\b-[0-9a-fA-F]{4}\\b-[0-9a-fA-F]{12}$/i;\n nanoidRegex = /^[a-z0-9_-]{21}$/i;\n jwtRegex = /^[A-Za-z0-9-_]+\\.[A-Za-z0-9-_]+\\.[A-Za-z0-9-_]*$/;\n durationRegex = /^[-+]?P(?!$)(?:(?:[-+]?\\d+Y)|(?:[-+]?\\d+[.,]\\d+Y$))?(?:(?:[-+]?\\d+M)|(?:[-+]?\\d+[.,]\\d+M$))?(?:(?:[-+]?\\d+W)|(?:[-+]?\\d+[.,]\\d+W$))?(?:(?:[-+]?\\d+D)|(?:[-+]?\\d+[.,]\\d+D$))?(?:T(?=[\\d+-])(?:(?:[-+]?\\d+H)|(?:[-+]?\\d+[.,]\\d+H$))?(?:(?:[-+]?\\d+M)|(?:[-+]?\\d+[.,]\\d+M$))?(?:[-+]?\\d+(?:[.,]\\d+)?S)?)??$/;\n emailRegex = /^(?!\\.)(?!.*\\.\\.)([A-Z0-9_'+\\-\\.]*)[A-Z0-9_+-]@([A-Z0-9][A-Z0-9\\-]*\\.)+[A-Z]{2,}$/i;\n _emojiRegex = `^(\\\\p{Extended_Pictographic}|\\\\p{Emoji_Component})+$`;\n ipv4Regex = /^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\\.){3}(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])$/;\n ipv4CidrRegex = /^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\\.){3}(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\\/(3[0-2]|[12]?[0-9])$/;\n ipv6Regex = /^(([0-9a-fA-F]{1,4}:){7,7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:)|fe80:(:[0-9a-fA-F]{0,4}){0,4}%[0-9a-zA-Z]{1,}|::(ffff(:0{1,4}){0,1}:){0,1}((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])|([0-9a-fA-F]{1,4}:){1,4}:((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9]))$/;\n ipv6CidrRegex = /^(([0-9a-fA-F]{1,4}:){7,7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:)|fe80:(:[0-9a-fA-F]{0,4}){0,4}%[0-9a-zA-Z]{1,}|::(ffff(:0{1,4}){0,1}:){0,1}((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])|([0-9a-fA-F]{1,4}:){1,4}:((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9]))\\/(12[0-8]|1[01][0-9]|[1-9]?[0-9])$/;\n base64Regex2 = /^([0-9a-zA-Z+/]{4})*(([0-9a-zA-Z+/]{2}==)|([0-9a-zA-Z+/]{3}=))?$/;\n base64urlRegex = /^([0-9a-zA-Z-_]{4})*(([0-9a-zA-Z-_]{2}(==)?)|([0-9a-zA-Z-_]{3}(=)?))?$/;\n dateRegexSource = `((\\\\d\\\\d[2468][048]|\\\\d\\\\d[13579][26]|\\\\d\\\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\\\d{4}-((0[13578]|1[02])-(0[1-9]|[12]\\\\d|3[01])|(0[469]|11)-(0[1-9]|[12]\\\\d|30)|(02)-(0[1-9]|1\\\\d|2[0-8])))`;\n dateRegex = new RegExp(`^${dateRegexSource}$`);\n ZodString = class _ZodString extends ZodType {\n _parse(input) {\n if (this._def.coerce) {\n input.data = String(input.data);\n }\n const parsedType = this._getType(input);\n if (parsedType !== ZodParsedType.string) {\n const ctx2 = this._getOrReturnCtx(input);\n addIssueToContext(ctx2, {\n code: ZodIssueCode.invalid_type,\n expected: ZodParsedType.string,\n received: ctx2.parsedType\n });\n return INVALID;\n }\n const status = new ParseStatus();\n let ctx = void 0;\n for (const check of this._def.checks) {\n if (check.kind === \"min\") {\n if (input.data.length < check.value) {\n ctx = this._getOrReturnCtx(input, ctx);\n addIssueToContext(ctx, {\n code: ZodIssueCode.too_small,\n minimum: check.value,\n type: \"string\",\n inclusive: true,\n exact: false,\n message: check.message\n });\n status.dirty();\n }\n } else if (check.kind === \"max\") {\n if (input.data.length > check.value) {\n ctx = this._getOrReturnCtx(input, ctx);\n addIssueToContext(ctx, {\n code: ZodIssueCode.too_big,\n maximum: check.value,\n type: \"string\",\n inclusive: true,\n exact: false,\n message: check.message\n });\n status.dirty();\n }\n } else if (check.kind === \"length\") {\n const tooBig = input.data.length > check.value;\n const tooSmall = input.data.length < check.value;\n if (tooBig || tooSmall) {\n ctx = this._getOrReturnCtx(input, ctx);\n if (tooBig) {\n addIssueToContext(ctx, {\n code: ZodIssueCode.too_big,\n maximum: check.value,\n type: \"string\",\n inclusive: true,\n exact: true,\n message: check.message\n });\n } else if (tooSmall) {\n addIssueToContext(ctx, {\n code: ZodIssueCode.too_small,\n minimum: check.value,\n type: \"string\",\n inclusive: true,\n exact: true,\n message: check.message\n });\n }\n status.dirty();\n }\n } else if (check.kind === \"email\") {\n if (!emailRegex.test(input.data)) {\n ctx = this._getOrReturnCtx(input, ctx);\n addIssueToContext(ctx, {\n validation: \"email\",\n code: ZodIssueCode.invalid_string,\n message: check.message\n });\n status.dirty();\n }\n } else if (check.kind === \"emoji\") {\n if (!emojiRegex) {\n emojiRegex = new RegExp(_emojiRegex, \"u\");\n }\n if (!emojiRegex.test(input.data)) {\n ctx = this._getOrReturnCtx(input, ctx);\n addIssueToContext(ctx, {\n validation: \"emoji\",\n code: ZodIssueCode.invalid_string,\n message: check.message\n });\n status.dirty();\n }\n } else if (check.kind === \"uuid\") {\n if (!uuidRegex.test(input.data)) {\n ctx = this._getOrReturnCtx(input, ctx);\n addIssueToContext(ctx, {\n validation: \"uuid\",\n code: ZodIssueCode.invalid_string,\n message: check.message\n });\n status.dirty();\n }\n } else if (check.kind === \"nanoid\") {\n if (!nanoidRegex.test(input.data)) {\n ctx = this._getOrReturnCtx(input, ctx);\n addIssueToContext(ctx, {\n validation: \"nanoid\",\n code: ZodIssueCode.invalid_string,\n message: check.message\n });\n status.dirty();\n }\n } else if (check.kind === \"cuid\") {\n if (!cuidRegex.test(input.data)) {\n ctx = this._getOrReturnCtx(input, ctx);\n addIssueToContext(ctx, {\n validation: \"cuid\",\n code: ZodIssueCode.invalid_string,\n message: check.message\n });\n status.dirty();\n }\n } else if (check.kind === \"cuid2\") {\n if (!cuid2Regex.test(input.data)) {\n ctx = this._getOrReturnCtx(input, ctx);\n addIssueToContext(ctx, {\n validation: \"cuid2\",\n code: ZodIssueCode.invalid_string,\n message: check.message\n });\n status.dirty();\n }\n } else if (check.kind === \"ulid\") {\n if (!ulidRegex.test(input.data)) {\n ctx = this._getOrReturnCtx(input, ctx);\n addIssueToContext(ctx, {\n validation: \"ulid\",\n code: ZodIssueCode.invalid_string,\n message: check.message\n });\n status.dirty();\n }\n } else if (check.kind === \"url\") {\n try {\n new URL(input.data);\n } catch {\n ctx = this._getOrReturnCtx(input, ctx);\n addIssueToContext(ctx, {\n validation: \"url\",\n code: ZodIssueCode.invalid_string,\n message: check.message\n });\n status.dirty();\n }\n } else if (check.kind === \"regex\") {\n check.regex.lastIndex = 0;\n const testResult = check.regex.test(input.data);\n if (!testResult) {\n ctx = this._getOrReturnCtx(input, ctx);\n addIssueToContext(ctx, {\n validation: \"regex\",\n code: ZodIssueCode.invalid_string,\n message: check.message\n });\n status.dirty();\n }\n } else if (check.kind === \"trim\") {\n input.data = input.data.trim();\n } else if (check.kind === \"includes\") {\n if (!input.data.includes(check.value, check.position)) {\n ctx = this._getOrReturnCtx(input, ctx);\n addIssueToContext(ctx, {\n code: ZodIssueCode.invalid_string,\n validation: { includes: check.value, position: check.position },\n message: check.message\n });\n status.dirty();\n }\n } else if (check.kind === \"toLowerCase\") {\n input.data = input.data.toLowerCase();\n } else if (check.kind === \"toUpperCase\") {\n input.data = input.data.toUpperCase();\n } else if (check.kind === \"startsWith\") {\n if (!input.data.startsWith(check.value)) {\n ctx = this._getOrReturnCtx(input, ctx);\n addIssueToContext(ctx, {\n code: ZodIssueCode.invalid_string,\n validation: { startsWith: check.value },\n message: check.message\n });\n status.dirty();\n }\n } else if (check.kind === \"endsWith\") {\n if (!input.data.endsWith(check.value)) {\n ctx = this._getOrReturnCtx(input, ctx);\n addIssueToContext(ctx, {\n code: ZodIssueCode.invalid_string,\n validation: { endsWith: check.value },\n message: check.message\n });\n status.dirty();\n }\n } else if (check.kind === \"datetime\") {\n const regex2 = datetimeRegex(check);\n if (!regex2.test(input.data)) {\n ctx = this._getOrReturnCtx(input, ctx);\n addIssueToContext(ctx, {\n code: ZodIssueCode.invalid_string,\n validation: \"datetime\",\n message: check.message\n });\n status.dirty();\n }\n } else if (check.kind === \"date\") {\n const regex2 = dateRegex;\n if (!regex2.test(input.data)) {\n ctx = this._getOrReturnCtx(input, ctx);\n addIssueToContext(ctx, {\n code: ZodIssueCode.invalid_string,\n validation: \"date\",\n message: check.message\n });\n status.dirty();\n }\n } else if (check.kind === \"time\") {\n const regex2 = timeRegex(check);\n if (!regex2.test(input.data)) {\n ctx = this._getOrReturnCtx(input, ctx);\n addIssueToContext(ctx, {\n code: ZodIssueCode.invalid_string,\n validation: \"time\",\n message: check.message\n });\n status.dirty();\n }\n } else if (check.kind === \"duration\") {\n if (!durationRegex.test(input.data)) {\n ctx = this._getOrReturnCtx(input, ctx);\n addIssueToContext(ctx, {\n validation: \"duration\",\n code: ZodIssueCode.invalid_string,\n message: check.message\n });\n status.dirty();\n }\n } else if (check.kind === \"ip\") {\n if (!isValidIP(input.data, check.version)) {\n ctx = this._getOrReturnCtx(input, ctx);\n addIssueToContext(ctx, {\n validation: \"ip\",\n code: ZodIssueCode.invalid_string,\n message: check.message\n });\n status.dirty();\n }\n } else if (check.kind === \"jwt\") {\n if (!isValidJWT(input.data, check.alg)) {\n ctx = this._getOrReturnCtx(input, ctx);\n addIssueToContext(ctx, {\n validation: \"jwt\",\n code: ZodIssueCode.invalid_string,\n message: check.message\n });\n status.dirty();\n }\n } else if (check.kind === \"cidr\") {\n if (!isValidCidr(input.data, check.version)) {\n ctx = this._getOrReturnCtx(input, ctx);\n addIssueToContext(ctx, {\n validation: \"cidr\",\n code: ZodIssueCode.invalid_string,\n message: check.message\n });\n status.dirty();\n }\n } else if (check.kind === \"base64\") {\n if (!base64Regex2.test(input.data)) {\n ctx = this._getOrReturnCtx(input, ctx);\n addIssueToContext(ctx, {\n validation: \"base64\",\n code: ZodIssueCode.invalid_string,\n message: check.message\n });\n status.dirty();\n }\n } else if (check.kind === \"base64url\") {\n if (!base64urlRegex.test(input.data)) {\n ctx = this._getOrReturnCtx(input, ctx);\n addIssueToContext(ctx, {\n validation: \"base64url\",\n code: ZodIssueCode.invalid_string,\n message: check.message\n });\n status.dirty();\n }\n } else {\n util.assertNever(check);\n }\n }\n return { status: status.value, value: input.data };\n }\n _regex(regex2, validation, message) {\n return this.refinement((data) => regex2.test(data), {\n validation,\n code: ZodIssueCode.invalid_string,\n ...errorUtil.errToObj(message)\n });\n }\n _addCheck(check) {\n return new _ZodString({\n ...this._def,\n checks: [...this._def.checks, check]\n });\n }\n email(message) {\n return this._addCheck({ kind: \"email\", ...errorUtil.errToObj(message) });\n }\n url(message) {\n return this._addCheck({ kind: \"url\", ...errorUtil.errToObj(message) });\n }\n emoji(message) {\n return this._addCheck({ kind: \"emoji\", ...errorUtil.errToObj(message) });\n }\n uuid(message) {\n return this._addCheck({ kind: \"uuid\", ...errorUtil.errToObj(message) });\n }\n nanoid(message) {\n return this._addCheck({ kind: \"nanoid\", ...errorUtil.errToObj(message) });\n }\n cuid(message) {\n return this._addCheck({ kind: \"cuid\", ...errorUtil.errToObj(message) });\n }\n cuid2(message) {\n return this._addCheck({ kind: \"cuid2\", ...errorUtil.errToObj(message) });\n }\n ulid(message) {\n return this._addCheck({ kind: \"ulid\", ...errorUtil.errToObj(message) });\n }\n base64(message) {\n return this._addCheck({ kind: \"base64\", ...errorUtil.errToObj(message) });\n }\n base64url(message) {\n return this._addCheck({\n kind: \"base64url\",\n ...errorUtil.errToObj(message)\n });\n }\n jwt(options) {\n return this._addCheck({ kind: \"jwt\", ...errorUtil.errToObj(options) });\n }\n ip(options) {\n return this._addCheck({ kind: \"ip\", ...errorUtil.errToObj(options) });\n }\n cidr(options) {\n return this._addCheck({ kind: \"cidr\", ...errorUtil.errToObj(options) });\n }\n datetime(options) {\n if (typeof options === \"string\") {\n return this._addCheck({\n kind: \"datetime\",\n precision: null,\n offset: false,\n local: false,\n message: options\n });\n }\n return this._addCheck({\n kind: \"datetime\",\n precision: typeof options?.precision === \"undefined\" ? null : options?.precision,\n offset: options?.offset ?? false,\n local: options?.local ?? false,\n ...errorUtil.errToObj(options?.message)\n });\n }\n date(message) {\n return this._addCheck({ kind: \"date\", message });\n }\n time(options) {\n if (typeof options === \"string\") {\n return this._addCheck({\n kind: \"time\",\n precision: null,\n message: options\n });\n }\n return this._addCheck({\n kind: \"time\",\n precision: typeof options?.precision === \"undefined\" ? null : options?.precision,\n ...errorUtil.errToObj(options?.message)\n });\n }\n duration(message) {\n return this._addCheck({ kind: \"duration\", ...errorUtil.errToObj(message) });\n }\n regex(regex2, message) {\n return this._addCheck({\n kind: \"regex\",\n regex: regex2,\n ...errorUtil.errToObj(message)\n });\n }\n includes(value, options) {\n return this._addCheck({\n kind: \"includes\",\n value,\n position: options?.position,\n ...errorUtil.errToObj(options?.message)\n });\n }\n startsWith(value, message) {\n return this._addCheck({\n kind: \"startsWith\",\n value,\n ...errorUtil.errToObj(message)\n });\n }\n endsWith(value, message) {\n return this._addCheck({\n kind: \"endsWith\",\n value,\n ...errorUtil.errToObj(message)\n });\n }\n min(minLength2, message) {\n return this._addCheck({\n kind: \"min\",\n value: minLength2,\n ...errorUtil.errToObj(message)\n });\n }\n max(maxLength, message) {\n return this._addCheck({\n kind: \"max\",\n value: maxLength,\n ...errorUtil.errToObj(message)\n });\n }\n length(len, message) {\n return this._addCheck({\n kind: \"length\",\n value: len,\n ...errorUtil.errToObj(message)\n });\n }\n /**\n * Equivalent to `.min(1)`\n */\n nonempty(message) {\n return this.min(1, errorUtil.errToObj(message));\n }\n trim() {\n return new _ZodString({\n ...this._def,\n checks: [...this._def.checks, { kind: \"trim\" }]\n });\n }\n toLowerCase() {\n return new _ZodString({\n ...this._def,\n checks: [...this._def.checks, { kind: \"toLowerCase\" }]\n });\n }\n toUpperCase() {\n return new _ZodString({\n ...this._def,\n checks: [...this._def.checks, { kind: \"toUpperCase\" }]\n });\n }\n get isDatetime() {\n return !!this._def.checks.find((ch) => ch.kind === \"datetime\");\n }\n get isDate() {\n return !!this._def.checks.find((ch) => ch.kind === \"date\");\n }\n get isTime() {\n return !!this._def.checks.find((ch) => ch.kind === \"time\");\n }\n get isDuration() {\n return !!this._def.checks.find((ch) => ch.kind === \"duration\");\n }\n get isEmail() {\n return !!this._def.checks.find((ch) => ch.kind === \"email\");\n }\n get isURL() {\n return !!this._def.checks.find((ch) => ch.kind === \"url\");\n }\n get isEmoji() {\n return !!this._def.checks.find((ch) => ch.kind === \"emoji\");\n }\n get isUUID() {\n return !!this._def.checks.find((ch) => ch.kind === \"uuid\");\n }\n get isNANOID() {\n return !!this._def.checks.find((ch) => ch.kind === \"nanoid\");\n }\n get isCUID() {\n return !!this._def.checks.find((ch) => ch.kind === \"cuid\");\n }\n get isCUID2() {\n return !!this._def.checks.find((ch) => ch.kind === \"cuid2\");\n }\n get isULID() {\n return !!this._def.checks.find((ch) => ch.kind === \"ulid\");\n }\n get isIP() {\n return !!this._def.checks.find((ch) => ch.kind === \"ip\");\n }\n get isCIDR() {\n return !!this._def.checks.find((ch) => ch.kind === \"cidr\");\n }\n get isBase64() {\n return !!this._def.checks.find((ch) => ch.kind === \"base64\");\n }\n get isBase64url() {\n return !!this._def.checks.find((ch) => ch.kind === \"base64url\");\n }\n get minLength() {\n let min = null;\n for (const ch of this._def.checks) {\n if (ch.kind === \"min\") {\n if (min === null || ch.value > min)\n min = ch.value;\n }\n }\n return min;\n }\n get maxLength() {\n let max = null;\n for (const ch of this._def.checks) {\n if (ch.kind === \"max\") {\n if (max === null || ch.value < max)\n max = ch.value;\n }\n }\n return max;\n }\n };\n ZodString.create = (params) => {\n return new ZodString({\n checks: [],\n typeName: ZodFirstPartyTypeKind.ZodString,\n coerce: params?.coerce ?? false,\n ...processCreateParams(params)\n });\n };\n ZodNumber = class _ZodNumber extends ZodType {\n constructor() {\n super(...arguments);\n this.min = this.gte;\n this.max = this.lte;\n this.step = this.multipleOf;\n }\n _parse(input) {\n if (this._def.coerce) {\n input.data = Number(input.data);\n }\n const parsedType = this._getType(input);\n if (parsedType !== ZodParsedType.number) {\n const ctx2 = this._getOrReturnCtx(input);\n addIssueToContext(ctx2, {\n code: ZodIssueCode.invalid_type,\n expected: ZodParsedType.number,\n received: ctx2.parsedType\n });\n return INVALID;\n }\n let ctx = void 0;\n const status = new ParseStatus();\n for (const check of this._def.checks) {\n if (check.kind === \"int\") {\n if (!util.isInteger(input.data)) {\n ctx = this._getOrReturnCtx(input, ctx);\n addIssueToContext(ctx, {\n code: ZodIssueCode.invalid_type,\n expected: \"integer\",\n received: \"float\",\n message: check.message\n });\n status.dirty();\n }\n } else if (check.kind === \"min\") {\n const tooSmall = check.inclusive ? input.data < check.value : input.data <= check.value;\n if (tooSmall) {\n ctx = this._getOrReturnCtx(input, ctx);\n addIssueToContext(ctx, {\n code: ZodIssueCode.too_small,\n minimum: check.value,\n type: \"number\",\n inclusive: check.inclusive,\n exact: false,\n message: check.message\n });\n status.dirty();\n }\n } else if (check.kind === \"max\") {\n const tooBig = check.inclusive ? input.data > check.value : input.data >= check.value;\n if (tooBig) {\n ctx = this._getOrReturnCtx(input, ctx);\n addIssueToContext(ctx, {\n code: ZodIssueCode.too_big,\n maximum: check.value,\n type: \"number\",\n inclusive: check.inclusive,\n exact: false,\n message: check.message\n });\n status.dirty();\n }\n } else if (check.kind === \"multipleOf\") {\n if (floatSafeRemainder(input.data, check.value) !== 0) {\n ctx = this._getOrReturnCtx(input, ctx);\n addIssueToContext(ctx, {\n code: ZodIssueCode.not_multiple_of,\n multipleOf: check.value,\n message: check.message\n });\n status.dirty();\n }\n } else if (check.kind === \"finite\") {\n if (!Number.isFinite(input.data)) {\n ctx = this._getOrReturnCtx(input, ctx);\n addIssueToContext(ctx, {\n code: ZodIssueCode.not_finite,\n message: check.message\n });\n status.dirty();\n }\n } else {\n util.assertNever(check);\n }\n }\n return { status: status.value, value: input.data };\n }\n gte(value, message) {\n return this.setLimit(\"min\", value, true, errorUtil.toString(message));\n }\n gt(value, message) {\n return this.setLimit(\"min\", value, false, errorUtil.toString(message));\n }\n lte(value, message) {\n return this.setLimit(\"max\", value, true, errorUtil.toString(message));\n }\n lt(value, message) {\n return this.setLimit(\"max\", value, false, errorUtil.toString(message));\n }\n setLimit(kind, value, inclusive, message) {\n return new _ZodNumber({\n ...this._def,\n checks: [\n ...this._def.checks,\n {\n kind,\n value,\n inclusive,\n message: errorUtil.toString(message)\n }\n ]\n });\n }\n _addCheck(check) {\n return new _ZodNumber({\n ...this._def,\n checks: [...this._def.checks, check]\n });\n }\n int(message) {\n return this._addCheck({\n kind: \"int\",\n message: errorUtil.toString(message)\n });\n }\n positive(message) {\n return this._addCheck({\n kind: \"min\",\n value: 0,\n inclusive: false,\n message: errorUtil.toString(message)\n });\n }\n negative(message) {\n return this._addCheck({\n kind: \"max\",\n value: 0,\n inclusive: false,\n message: errorUtil.toString(message)\n });\n }\n nonpositive(message) {\n return this._addCheck({\n kind: \"max\",\n value: 0,\n inclusive: true,\n message: errorUtil.toString(message)\n });\n }\n nonnegative(message) {\n return this._addCheck({\n kind: \"min\",\n value: 0,\n inclusive: true,\n message: errorUtil.toString(message)\n });\n }\n multipleOf(value, message) {\n return this._addCheck({\n kind: \"multipleOf\",\n value,\n message: errorUtil.toString(message)\n });\n }\n finite(message) {\n return this._addCheck({\n kind: \"finite\",\n message: errorUtil.toString(message)\n });\n }\n safe(message) {\n return this._addCheck({\n kind: \"min\",\n inclusive: true,\n value: Number.MIN_SAFE_INTEGER,\n message: errorUtil.toString(message)\n })._addCheck({\n kind: \"max\",\n inclusive: true,\n value: Number.MAX_SAFE_INTEGER,\n message: errorUtil.toString(message)\n });\n }\n get minValue() {\n let min = null;\n for (const ch of this._def.checks) {\n if (ch.kind === \"min\") {\n if (min === null || ch.value > min)\n min = ch.value;\n }\n }\n return min;\n }\n get maxValue() {\n let max = null;\n for (const ch of this._def.checks) {\n if (ch.kind === \"max\") {\n if (max === null || ch.value < max)\n max = ch.value;\n }\n }\n return max;\n }\n get isInt() {\n return !!this._def.checks.find((ch) => ch.kind === \"int\" || ch.kind === \"multipleOf\" && util.isInteger(ch.value));\n }\n get isFinite() {\n let max = null;\n let min = null;\n for (const ch of this._def.checks) {\n if (ch.kind === \"finite\" || ch.kind === \"int\" || ch.kind === \"multipleOf\") {\n return true;\n } else if (ch.kind === \"min\") {\n if (min === null || ch.value > min)\n min = ch.value;\n } else if (ch.kind === \"max\") {\n if (max === null || ch.value < max)\n max = ch.value;\n }\n }\n return Number.isFinite(min) && Number.isFinite(max);\n }\n };\n ZodNumber.create = (params) => {\n return new ZodNumber({\n checks: [],\n typeName: ZodFirstPartyTypeKind.ZodNumber,\n coerce: params?.coerce || false,\n ...processCreateParams(params)\n });\n };\n ZodBigInt = class _ZodBigInt extends ZodType {\n constructor() {\n super(...arguments);\n this.min = this.gte;\n this.max = this.lte;\n }\n _parse(input) {\n if (this._def.coerce) {\n try {\n input.data = BigInt(input.data);\n } catch {\n return this._getInvalidInput(input);\n }\n }\n const parsedType = this._getType(input);\n if (parsedType !== ZodParsedType.bigint) {\n return this._getInvalidInput(input);\n }\n let ctx = void 0;\n const status = new ParseStatus();\n for (const check of this._def.checks) {\n if (check.kind === \"min\") {\n const tooSmall = check.inclusive ? input.data < check.value : input.data <= check.value;\n if (tooSmall) {\n ctx = this._getOrReturnCtx(input, ctx);\n addIssueToContext(ctx, {\n code: ZodIssueCode.too_small,\n type: \"bigint\",\n minimum: check.value,\n inclusive: check.inclusive,\n message: check.message\n });\n status.dirty();\n }\n } else if (check.kind === \"max\") {\n const tooBig = check.inclusive ? input.data > check.value : input.data >= check.value;\n if (tooBig) {\n ctx = this._getOrReturnCtx(input, ctx);\n addIssueToContext(ctx, {\n code: ZodIssueCode.too_big,\n type: \"bigint\",\n maximum: check.value,\n inclusive: check.inclusive,\n message: check.message\n });\n status.dirty();\n }\n } else if (check.kind === \"multipleOf\") {\n if (input.data % check.value !== BigInt(0)) {\n ctx = this._getOrReturnCtx(input, ctx);\n addIssueToContext(ctx, {\n code: ZodIssueCode.not_multiple_of,\n multipleOf: check.value,\n message: check.message\n });\n status.dirty();\n }\n } else {\n util.assertNever(check);\n }\n }\n return { status: status.value, value: input.data };\n }\n _getInvalidInput(input) {\n const ctx = this._getOrReturnCtx(input);\n addIssueToContext(ctx, {\n code: ZodIssueCode.invalid_type,\n expected: ZodParsedType.bigint,\n received: ctx.parsedType\n });\n return INVALID;\n }\n gte(value, message) {\n return this.setLimit(\"min\", value, true, errorUtil.toString(message));\n }\n gt(value, message) {\n return this.setLimit(\"min\", value, false, errorUtil.toString(message));\n }\n lte(value, message) {\n return this.setLimit(\"max\", value, true, errorUtil.toString(message));\n }\n lt(value, message) {\n return this.setLimit(\"max\", value, false, errorUtil.toString(message));\n }\n setLimit(kind, value, inclusive, message) {\n return new _ZodBigInt({\n ...this._def,\n checks: [\n ...this._def.checks,\n {\n kind,\n value,\n inclusive,\n message: errorUtil.toString(message)\n }\n ]\n });\n }\n _addCheck(check) {\n return new _ZodBigInt({\n ...this._def,\n checks: [...this._def.checks, check]\n });\n }\n positive(message) {\n return this._addCheck({\n kind: \"min\",\n value: BigInt(0),\n inclusive: false,\n message: errorUtil.toString(message)\n });\n }\n negative(message) {\n return this._addCheck({\n kind: \"max\",\n value: BigInt(0),\n inclusive: false,\n message: errorUtil.toString(message)\n });\n }\n nonpositive(message) {\n return this._addCheck({\n kind: \"max\",\n value: BigInt(0),\n inclusive: true,\n message: errorUtil.toString(message)\n });\n }\n nonnegative(message) {\n return this._addCheck({\n kind: \"min\",\n value: BigInt(0),\n inclusive: true,\n message: errorUtil.toString(message)\n });\n }\n multipleOf(value, message) {\n return this._addCheck({\n kind: \"multipleOf\",\n value,\n message: errorUtil.toString(message)\n });\n }\n get minValue() {\n let min = null;\n for (const ch of this._def.checks) {\n if (ch.kind === \"min\") {\n if (min === null || ch.value > min)\n min = ch.value;\n }\n }\n return min;\n }\n get maxValue() {\n let max = null;\n for (const ch of this._def.checks) {\n if (ch.kind === \"max\") {\n if (max === null || ch.value < max)\n max = ch.value;\n }\n }\n return max;\n }\n };\n ZodBigInt.create = (params) => {\n return new ZodBigInt({\n checks: [],\n typeName: ZodFirstPartyTypeKind.ZodBigInt,\n coerce: params?.coerce ?? false,\n ...processCreateParams(params)\n });\n };\n ZodBoolean = class extends ZodType {\n _parse(input) {\n if (this._def.coerce) {\n input.data = Boolean(input.data);\n }\n const parsedType = this._getType(input);\n if (parsedType !== ZodParsedType.boolean) {\n const ctx = this._getOrReturnCtx(input);\n addIssueToContext(ctx, {\n code: ZodIssueCode.invalid_type,\n expected: ZodParsedType.boolean,\n received: ctx.parsedType\n });\n return INVALID;\n }\n return OK(input.data);\n }\n };\n ZodBoolean.create = (params) => {\n return new ZodBoolean({\n typeName: ZodFirstPartyTypeKind.ZodBoolean,\n coerce: params?.coerce || false,\n ...processCreateParams(params)\n });\n };\n ZodDate = class _ZodDate extends ZodType {\n _parse(input) {\n if (this._def.coerce) {\n input.data = new Date(input.data);\n }\n const parsedType = this._getType(input);\n if (parsedType !== ZodParsedType.date) {\n const ctx2 = this._getOrReturnCtx(input);\n addIssueToContext(ctx2, {\n code: ZodIssueCode.invalid_type,\n expected: ZodParsedType.date,\n received: ctx2.parsedType\n });\n return INVALID;\n }\n if (Number.isNaN(input.data.getTime())) {\n const ctx2 = this._getOrReturnCtx(input);\n addIssueToContext(ctx2, {\n code: ZodIssueCode.invalid_date\n });\n return INVALID;\n }\n const status = new ParseStatus();\n let ctx = void 0;\n for (const check of this._def.checks) {\n if (check.kind === \"min\") {\n if (input.data.getTime() < check.value) {\n ctx = this._getOrReturnCtx(input, ctx);\n addIssueToContext(ctx, {\n code: ZodIssueCode.too_small,\n message: check.message,\n inclusive: true,\n exact: false,\n minimum: check.value,\n type: \"date\"\n });\n status.dirty();\n }\n } else if (check.kind === \"max\") {\n if (input.data.getTime() > check.value) {\n ctx = this._getOrReturnCtx(input, ctx);\n addIssueToContext(ctx, {\n code: ZodIssueCode.too_big,\n message: check.message,\n inclusive: true,\n exact: false,\n maximum: check.value,\n type: \"date\"\n });\n status.dirty();\n }\n } else {\n util.assertNever(check);\n }\n }\n return {\n status: status.value,\n value: new Date(input.data.getTime())\n };\n }\n _addCheck(check) {\n return new _ZodDate({\n ...this._def,\n checks: [...this._def.checks, check]\n });\n }\n min(minDate, message) {\n return this._addCheck({\n kind: \"min\",\n value: minDate.getTime(),\n message: errorUtil.toString(message)\n });\n }\n max(maxDate, message) {\n return this._addCheck({\n kind: \"max\",\n value: maxDate.getTime(),\n message: errorUtil.toString(message)\n });\n }\n get minDate() {\n let min = null;\n for (const ch of this._def.checks) {\n if (ch.kind === \"min\") {\n if (min === null || ch.value > min)\n min = ch.value;\n }\n }\n return min != null ? new Date(min) : null;\n }\n get maxDate() {\n let max = null;\n for (const ch of this._def.checks) {\n if (ch.kind === \"max\") {\n if (max === null || ch.value < max)\n max = ch.value;\n }\n }\n return max != null ? new Date(max) : null;\n }\n };\n ZodDate.create = (params) => {\n return new ZodDate({\n checks: [],\n coerce: params?.coerce || false,\n typeName: ZodFirstPartyTypeKind.ZodDate,\n ...processCreateParams(params)\n });\n };\n ZodSymbol = class extends ZodType {\n _parse(input) {\n const parsedType = this._getType(input);\n if (parsedType !== ZodParsedType.symbol) {\n const ctx = this._getOrReturnCtx(input);\n addIssueToContext(ctx, {\n code: ZodIssueCode.invalid_type,\n expected: ZodParsedType.symbol,\n received: ctx.parsedType\n });\n return INVALID;\n }\n return OK(input.data);\n }\n };\n ZodSymbol.create = (params) => {\n return new ZodSymbol({\n typeName: ZodFirstPartyTypeKind.ZodSymbol,\n ...processCreateParams(params)\n });\n };\n ZodUndefined = class extends ZodType {\n _parse(input) {\n const parsedType = this._getType(input);\n if (parsedType !== ZodParsedType.undefined) {\n const ctx = this._getOrReturnCtx(input);\n addIssueToContext(ctx, {\n code: ZodIssueCode.invalid_type,\n expected: ZodParsedType.undefined,\n received: ctx.parsedType\n });\n return INVALID;\n }\n return OK(input.data);\n }\n };\n ZodUndefined.create = (params) => {\n return new ZodUndefined({\n typeName: ZodFirstPartyTypeKind.ZodUndefined,\n ...processCreateParams(params)\n });\n };\n ZodNull = class extends ZodType {\n _parse(input) {\n const parsedType = this._getType(input);\n if (parsedType !== ZodParsedType.null) {\n const ctx = this._getOrReturnCtx(input);\n addIssueToContext(ctx, {\n code: ZodIssueCode.invalid_type,\n expected: ZodParsedType.null,\n received: ctx.parsedType\n });\n return INVALID;\n }\n return OK(input.data);\n }\n };\n ZodNull.create = (params) => {\n return new ZodNull({\n typeName: ZodFirstPartyTypeKind.ZodNull,\n ...processCreateParams(params)\n });\n };\n ZodAny = class extends ZodType {\n constructor() {\n super(...arguments);\n this._any = true;\n }\n _parse(input) {\n return OK(input.data);\n }\n };\n ZodAny.create = (params) => {\n return new ZodAny({\n typeName: ZodFirstPartyTypeKind.ZodAny,\n ...processCreateParams(params)\n });\n };\n ZodUnknown = class extends ZodType {\n constructor() {\n super(...arguments);\n this._unknown = true;\n }\n _parse(input) {\n return OK(input.data);\n }\n };\n ZodUnknown.create = (params) => {\n return new ZodUnknown({\n typeName: ZodFirstPartyTypeKind.ZodUnknown,\n ...processCreateParams(params)\n });\n };\n ZodNever = class extends ZodType {\n _parse(input) {\n const ctx = this._getOrReturnCtx(input);\n addIssueToContext(ctx, {\n code: ZodIssueCode.invalid_type,\n expected: ZodParsedType.never,\n received: ctx.parsedType\n });\n return INVALID;\n }\n };\n ZodNever.create = (params) => {\n return new ZodNever({\n typeName: ZodFirstPartyTypeKind.ZodNever,\n ...processCreateParams(params)\n });\n };\n ZodVoid = class extends ZodType {\n _parse(input) {\n const parsedType = this._getType(input);\n if (parsedType !== ZodParsedType.undefined) {\n const ctx = this._getOrReturnCtx(input);\n addIssueToContext(ctx, {\n code: ZodIssueCode.invalid_type,\n expected: ZodParsedType.void,\n received: ctx.parsedType\n });\n return INVALID;\n }\n return OK(input.data);\n }\n };\n ZodVoid.create = (params) => {\n return new ZodVoid({\n typeName: ZodFirstPartyTypeKind.ZodVoid,\n ...processCreateParams(params)\n });\n };\n ZodArray = class _ZodArray extends ZodType {\n _parse(input) {\n const { ctx, status } = this._processInputParams(input);\n const def = this._def;\n if (ctx.parsedType !== ZodParsedType.array) {\n addIssueToContext(ctx, {\n code: ZodIssueCode.invalid_type,\n expected: ZodParsedType.array,\n received: ctx.parsedType\n });\n return INVALID;\n }\n if (def.exactLength !== null) {\n const tooBig = ctx.data.length > def.exactLength.value;\n const tooSmall = ctx.data.length < def.exactLength.value;\n if (tooBig || tooSmall) {\n addIssueToContext(ctx, {\n code: tooBig ? ZodIssueCode.too_big : ZodIssueCode.too_small,\n minimum: tooSmall ? def.exactLength.value : void 0,\n maximum: tooBig ? def.exactLength.value : void 0,\n type: \"array\",\n inclusive: true,\n exact: true,\n message: def.exactLength.message\n });\n status.dirty();\n }\n }\n if (def.minLength !== null) {\n if (ctx.data.length < def.minLength.value) {\n addIssueToContext(ctx, {\n code: ZodIssueCode.too_small,\n minimum: def.minLength.value,\n type: \"array\",\n inclusive: true,\n exact: false,\n message: def.minLength.message\n });\n status.dirty();\n }\n }\n if (def.maxLength !== null) {\n if (ctx.data.length > def.maxLength.value) {\n addIssueToContext(ctx, {\n code: ZodIssueCode.too_big,\n maximum: def.maxLength.value,\n type: \"array\",\n inclusive: true,\n exact: false,\n message: def.maxLength.message\n });\n status.dirty();\n }\n }\n if (ctx.common.async) {\n return Promise.all([...ctx.data].map((item, i3) => {\n return def.type._parseAsync(new ParseInputLazyPath(ctx, item, ctx.path, i3));\n })).then((result2) => {\n return ParseStatus.mergeArray(status, result2);\n });\n }\n const result = [...ctx.data].map((item, i3) => {\n return def.type._parseSync(new ParseInputLazyPath(ctx, item, ctx.path, i3));\n });\n return ParseStatus.mergeArray(status, result);\n }\n get element() {\n return this._def.type;\n }\n min(minLength2, message) {\n return new _ZodArray({\n ...this._def,\n minLength: { value: minLength2, message: errorUtil.toString(message) }\n });\n }\n max(maxLength, message) {\n return new _ZodArray({\n ...this._def,\n maxLength: { value: maxLength, message: errorUtil.toString(message) }\n });\n }\n length(len, message) {\n return new _ZodArray({\n ...this._def,\n exactLength: { value: len, message: errorUtil.toString(message) }\n });\n }\n nonempty(message) {\n return this.min(1, message);\n }\n };\n ZodArray.create = (schema, params) => {\n return new ZodArray({\n type: schema,\n minLength: null,\n maxLength: null,\n exactLength: null,\n typeName: ZodFirstPartyTypeKind.ZodArray,\n ...processCreateParams(params)\n });\n };\n ZodObject = class _ZodObject extends ZodType {\n constructor() {\n super(...arguments);\n this._cached = null;\n this.nonstrict = this.passthrough;\n this.augment = this.extend;\n }\n _getCached() {\n if (this._cached !== null)\n return this._cached;\n const shape3 = this._def.shape();\n const keys = util.objectKeys(shape3);\n this._cached = { shape: shape3, keys };\n return this._cached;\n }\n _parse(input) {\n const parsedType = this._getType(input);\n if (parsedType !== ZodParsedType.object) {\n const ctx2 = this._getOrReturnCtx(input);\n addIssueToContext(ctx2, {\n code: ZodIssueCode.invalid_type,\n expected: ZodParsedType.object,\n received: ctx2.parsedType\n });\n return INVALID;\n }\n const { status, ctx } = this._processInputParams(input);\n const { shape: shape3, keys: shapeKeys } = this._getCached();\n const extraKeys = [];\n if (!(this._def.catchall instanceof ZodNever && this._def.unknownKeys === \"strip\")) {\n for (const key in ctx.data) {\n if (!shapeKeys.includes(key)) {\n extraKeys.push(key);\n }\n }\n }\n const pairs = [];\n for (const key of shapeKeys) {\n const keyValidator = shape3[key];\n const value = ctx.data[key];\n pairs.push({\n key: { status: \"valid\", value: key },\n value: keyValidator._parse(new ParseInputLazyPath(ctx, value, ctx.path, key)),\n alwaysSet: key in ctx.data\n });\n }\n if (this._def.catchall instanceof ZodNever) {\n const unknownKeys = this._def.unknownKeys;\n if (unknownKeys === \"passthrough\") {\n for (const key of extraKeys) {\n pairs.push({\n key: { status: \"valid\", value: key },\n value: { status: \"valid\", value: ctx.data[key] }\n });\n }\n } else if (unknownKeys === \"strict\") {\n if (extraKeys.length > 0) {\n addIssueToContext(ctx, {\n code: ZodIssueCode.unrecognized_keys,\n keys: extraKeys\n });\n status.dirty();\n }\n } else if (unknownKeys === \"strip\") {\n } else {\n throw new Error(`Internal ZodObject error: invalid unknownKeys value.`);\n }\n } else {\n const catchall = this._def.catchall;\n for (const key of extraKeys) {\n const value = ctx.data[key];\n pairs.push({\n key: { status: \"valid\", value: key },\n value: catchall._parse(\n new ParseInputLazyPath(ctx, value, ctx.path, key)\n //, ctx.child(key), value, getParsedType(value)\n ),\n alwaysSet: key in ctx.data\n });\n }\n }\n if (ctx.common.async) {\n return Promise.resolve().then(async () => {\n const syncPairs = [];\n for (const pair of pairs) {\n const key = await pair.key;\n const value = await pair.value;\n syncPairs.push({\n key,\n value,\n alwaysSet: pair.alwaysSet\n });\n }\n return syncPairs;\n }).then((syncPairs) => {\n return ParseStatus.mergeObjectSync(status, syncPairs);\n });\n } else {\n return ParseStatus.mergeObjectSync(status, pairs);\n }\n }\n get shape() {\n return this._def.shape();\n }\n strict(message) {\n errorUtil.errToObj;\n return new _ZodObject({\n ...this._def,\n unknownKeys: \"strict\",\n ...message !== void 0 ? {\n errorMap: (issue, ctx) => {\n const defaultError = this._def.errorMap?.(issue, ctx).message ?? ctx.defaultError;\n if (issue.code === \"unrecognized_keys\")\n return {\n message: errorUtil.errToObj(message).message ?? defaultError\n };\n return {\n message: defaultError\n };\n }\n } : {}\n });\n }\n strip() {\n return new _ZodObject({\n ...this._def,\n unknownKeys: \"strip\"\n });\n }\n passthrough() {\n return new _ZodObject({\n ...this._def,\n unknownKeys: \"passthrough\"\n });\n }\n // const AugmentFactory =\n // (def: Def) =>\n // (\n // augmentation: Augmentation\n // ): ZodObject<\n // extendShape, Augmentation>,\n // Def[\"unknownKeys\"],\n // Def[\"catchall\"]\n // > => {\n // return new ZodObject({\n // ...def,\n // shape: () => ({\n // ...def.shape(),\n // ...augmentation,\n // }),\n // }) as any;\n // };\n extend(augmentation) {\n return new _ZodObject({\n ...this._def,\n shape: () => ({\n ...this._def.shape(),\n ...augmentation\n })\n });\n }\n /**\n * Prior to zod@1.0.12 there was a bug in the\n * inferred type of merged objects. Please\n * upgrade if you are experiencing issues.\n */\n merge(merging) {\n const merged = new _ZodObject({\n unknownKeys: merging._def.unknownKeys,\n catchall: merging._def.catchall,\n shape: () => ({\n ...this._def.shape(),\n ...merging._def.shape()\n }),\n typeName: ZodFirstPartyTypeKind.ZodObject\n });\n return merged;\n }\n // merge<\n // Incoming extends AnyZodObject,\n // Augmentation extends Incoming[\"shape\"],\n // NewOutput extends {\n // [k in keyof Augmentation | keyof Output]: k extends keyof Augmentation\n // ? Augmentation[k][\"_output\"]\n // : k extends keyof Output\n // ? Output[k]\n // : never;\n // },\n // NewInput extends {\n // [k in keyof Augmentation | keyof Input]: k extends keyof Augmentation\n // ? Augmentation[k][\"_input\"]\n // : k extends keyof Input\n // ? Input[k]\n // : never;\n // }\n // >(\n // merging: Incoming\n // ): ZodObject<\n // extendShape>,\n // Incoming[\"_def\"][\"unknownKeys\"],\n // Incoming[\"_def\"][\"catchall\"],\n // NewOutput,\n // NewInput\n // > {\n // const merged: any = new ZodObject({\n // unknownKeys: merging._def.unknownKeys,\n // catchall: merging._def.catchall,\n // shape: () =>\n // objectUtil.mergeShapes(this._def.shape(), merging._def.shape()),\n // typeName: ZodFirstPartyTypeKind.ZodObject,\n // }) as any;\n // return merged;\n // }\n setKey(key, schema) {\n return this.augment({ [key]: schema });\n }\n // merge(\n // merging: Incoming\n // ): //ZodObject = (merging) => {\n // ZodObject<\n // extendShape>,\n // Incoming[\"_def\"][\"unknownKeys\"],\n // Incoming[\"_def\"][\"catchall\"]\n // > {\n // // const mergedShape = objectUtil.mergeShapes(\n // // this._def.shape(),\n // // merging._def.shape()\n // // );\n // const merged: any = new ZodObject({\n // unknownKeys: merging._def.unknownKeys,\n // catchall: merging._def.catchall,\n // shape: () =>\n // objectUtil.mergeShapes(this._def.shape(), merging._def.shape()),\n // typeName: ZodFirstPartyTypeKind.ZodObject,\n // }) as any;\n // return merged;\n // }\n catchall(index2) {\n return new _ZodObject({\n ...this._def,\n catchall: index2\n });\n }\n pick(mask) {\n const shape3 = {};\n for (const key of util.objectKeys(mask)) {\n if (mask[key] && this.shape[key]) {\n shape3[key] = this.shape[key];\n }\n }\n return new _ZodObject({\n ...this._def,\n shape: () => shape3\n });\n }\n omit(mask) {\n const shape3 = {};\n for (const key of util.objectKeys(this.shape)) {\n if (!mask[key]) {\n shape3[key] = this.shape[key];\n }\n }\n return new _ZodObject({\n ...this._def,\n shape: () => shape3\n });\n }\n /**\n * @deprecated\n */\n deepPartial() {\n return deepPartialify(this);\n }\n partial(mask) {\n const newShape = {};\n for (const key of util.objectKeys(this.shape)) {\n const fieldSchema = this.shape[key];\n if (mask && !mask[key]) {\n newShape[key] = fieldSchema;\n } else {\n newShape[key] = fieldSchema.optional();\n }\n }\n return new _ZodObject({\n ...this._def,\n shape: () => newShape\n });\n }\n required(mask) {\n const newShape = {};\n for (const key of util.objectKeys(this.shape)) {\n if (mask && !mask[key]) {\n newShape[key] = this.shape[key];\n } else {\n const fieldSchema = this.shape[key];\n let newField = fieldSchema;\n while (newField instanceof ZodOptional) {\n newField = newField._def.innerType;\n }\n newShape[key] = newField;\n }\n }\n return new _ZodObject({\n ...this._def,\n shape: () => newShape\n });\n }\n keyof() {\n return createZodEnum(util.objectKeys(this.shape));\n }\n };\n ZodObject.create = (shape3, params) => {\n return new ZodObject({\n shape: () => shape3,\n unknownKeys: \"strip\",\n catchall: ZodNever.create(),\n typeName: ZodFirstPartyTypeKind.ZodObject,\n ...processCreateParams(params)\n });\n };\n ZodObject.strictCreate = (shape3, params) => {\n return new ZodObject({\n shape: () => shape3,\n unknownKeys: \"strict\",\n catchall: ZodNever.create(),\n typeName: ZodFirstPartyTypeKind.ZodObject,\n ...processCreateParams(params)\n });\n };\n ZodObject.lazycreate = (shape3, params) => {\n return new ZodObject({\n shape: shape3,\n unknownKeys: \"strip\",\n catchall: ZodNever.create(),\n typeName: ZodFirstPartyTypeKind.ZodObject,\n ...processCreateParams(params)\n });\n };\n ZodUnion = class extends ZodType {\n _parse(input) {\n const { ctx } = this._processInputParams(input);\n const options = this._def.options;\n function handleResults(results) {\n for (const result of results) {\n if (result.result.status === \"valid\") {\n return result.result;\n }\n }\n for (const result of results) {\n if (result.result.status === \"dirty\") {\n ctx.common.issues.push(...result.ctx.common.issues);\n return result.result;\n }\n }\n const unionErrors = results.map((result) => new ZodError(result.ctx.common.issues));\n addIssueToContext(ctx, {\n code: ZodIssueCode.invalid_union,\n unionErrors\n });\n return INVALID;\n }\n if (ctx.common.async) {\n return Promise.all(options.map(async (option) => {\n const childCtx = {\n ...ctx,\n common: {\n ...ctx.common,\n issues: []\n },\n parent: null\n };\n return {\n result: await option._parseAsync({\n data: ctx.data,\n path: ctx.path,\n parent: childCtx\n }),\n ctx: childCtx\n };\n })).then(handleResults);\n } else {\n let dirty = void 0;\n const issues = [];\n for (const option of options) {\n const childCtx = {\n ...ctx,\n common: {\n ...ctx.common,\n issues: []\n },\n parent: null\n };\n const result = option._parseSync({\n data: ctx.data,\n path: ctx.path,\n parent: childCtx\n });\n if (result.status === \"valid\") {\n return result;\n } else if (result.status === \"dirty\" && !dirty) {\n dirty = { result, ctx: childCtx };\n }\n if (childCtx.common.issues.length) {\n issues.push(childCtx.common.issues);\n }\n }\n if (dirty) {\n ctx.common.issues.push(...dirty.ctx.common.issues);\n return dirty.result;\n }\n const unionErrors = issues.map((issues2) => new ZodError(issues2));\n addIssueToContext(ctx, {\n code: ZodIssueCode.invalid_union,\n unionErrors\n });\n return INVALID;\n }\n }\n get options() {\n return this._def.options;\n }\n };\n ZodUnion.create = (types, params) => {\n return new ZodUnion({\n options: types,\n typeName: ZodFirstPartyTypeKind.ZodUnion,\n ...processCreateParams(params)\n });\n };\n getDiscriminator = (type) => {\n if (type instanceof ZodLazy) {\n return getDiscriminator(type.schema);\n } else if (type instanceof ZodEffects) {\n return getDiscriminator(type.innerType());\n } else if (type instanceof ZodLiteral) {\n return [type.value];\n } else if (type instanceof ZodEnum) {\n return type.options;\n } else if (type instanceof ZodNativeEnum) {\n return util.objectValues(type.enum);\n } else if (type instanceof ZodDefault) {\n return getDiscriminator(type._def.innerType);\n } else if (type instanceof ZodUndefined) {\n return [void 0];\n } else if (type instanceof ZodNull) {\n return [null];\n } else if (type instanceof ZodOptional) {\n return [void 0, ...getDiscriminator(type.unwrap())];\n } else if (type instanceof ZodNullable) {\n return [null, ...getDiscriminator(type.unwrap())];\n } else if (type instanceof ZodBranded) {\n return getDiscriminator(type.unwrap());\n } else if (type instanceof ZodReadonly) {\n return getDiscriminator(type.unwrap());\n } else if (type instanceof ZodCatch) {\n return getDiscriminator(type._def.innerType);\n } else {\n return [];\n }\n };\n ZodDiscriminatedUnion = class _ZodDiscriminatedUnion extends ZodType {\n _parse(input) {\n const { ctx } = this._processInputParams(input);\n if (ctx.parsedType !== ZodParsedType.object) {\n addIssueToContext(ctx, {\n code: ZodIssueCode.invalid_type,\n expected: ZodParsedType.object,\n received: ctx.parsedType\n });\n return INVALID;\n }\n const discriminator = this.discriminator;\n const discriminatorValue = ctx.data[discriminator];\n const option = this.optionsMap.get(discriminatorValue);\n if (!option) {\n addIssueToContext(ctx, {\n code: ZodIssueCode.invalid_union_discriminator,\n options: Array.from(this.optionsMap.keys()),\n path: [discriminator]\n });\n return INVALID;\n }\n if (ctx.common.async) {\n return option._parseAsync({\n data: ctx.data,\n path: ctx.path,\n parent: ctx\n });\n } else {\n return option._parseSync({\n data: ctx.data,\n path: ctx.path,\n parent: ctx\n });\n }\n }\n get discriminator() {\n return this._def.discriminator;\n }\n get options() {\n return this._def.options;\n }\n get optionsMap() {\n return this._def.optionsMap;\n }\n /**\n * The constructor of the discriminated union schema. Its behaviour is very similar to that of the normal z.union() constructor.\n * However, it only allows a union of objects, all of which need to share a discriminator property. This property must\n * have a different value for each object in the union.\n * @param discriminator the name of the discriminator property\n * @param types an array of object schemas\n * @param params\n */\n static create(discriminator, options, params) {\n const optionsMap = /* @__PURE__ */ new Map();\n for (const type of options) {\n const discriminatorValues = getDiscriminator(type.shape[discriminator]);\n if (!discriminatorValues.length) {\n throw new Error(`A discriminator value for key \\`${discriminator}\\` could not be extracted from all schema options`);\n }\n for (const value of discriminatorValues) {\n if (optionsMap.has(value)) {\n throw new Error(`Discriminator property ${String(discriminator)} has duplicate value ${String(value)}`);\n }\n optionsMap.set(value, type);\n }\n }\n return new _ZodDiscriminatedUnion({\n typeName: ZodFirstPartyTypeKind.ZodDiscriminatedUnion,\n discriminator,\n options,\n optionsMap,\n ...processCreateParams(params)\n });\n }\n };\n ZodIntersection = class extends ZodType {\n _parse(input) {\n const { status, ctx } = this._processInputParams(input);\n const handleParsed = (parsedLeft, parsedRight) => {\n if (isAborted(parsedLeft) || isAborted(parsedRight)) {\n return INVALID;\n }\n const merged = mergeValues(parsedLeft.value, parsedRight.value);\n if (!merged.valid) {\n addIssueToContext(ctx, {\n code: ZodIssueCode.invalid_intersection_types\n });\n return INVALID;\n }\n if (isDirty(parsedLeft) || isDirty(parsedRight)) {\n status.dirty();\n }\n return { status: status.value, value: merged.data };\n };\n if (ctx.common.async) {\n return Promise.all([\n this._def.left._parseAsync({\n data: ctx.data,\n path: ctx.path,\n parent: ctx\n }),\n this._def.right._parseAsync({\n data: ctx.data,\n path: ctx.path,\n parent: ctx\n })\n ]).then(([left, right]) => handleParsed(left, right));\n } else {\n return handleParsed(this._def.left._parseSync({\n data: ctx.data,\n path: ctx.path,\n parent: ctx\n }), this._def.right._parseSync({\n data: ctx.data,\n path: ctx.path,\n parent: ctx\n }));\n }\n }\n };\n ZodIntersection.create = (left, right, params) => {\n return new ZodIntersection({\n left,\n right,\n typeName: ZodFirstPartyTypeKind.ZodIntersection,\n ...processCreateParams(params)\n });\n };\n ZodTuple = class _ZodTuple extends ZodType {\n _parse(input) {\n const { status, ctx } = this._processInputParams(input);\n if (ctx.parsedType !== ZodParsedType.array) {\n addIssueToContext(ctx, {\n code: ZodIssueCode.invalid_type,\n expected: ZodParsedType.array,\n received: ctx.parsedType\n });\n return INVALID;\n }\n if (ctx.data.length < this._def.items.length) {\n addIssueToContext(ctx, {\n code: ZodIssueCode.too_small,\n minimum: this._def.items.length,\n inclusive: true,\n exact: false,\n type: \"array\"\n });\n return INVALID;\n }\n const rest = this._def.rest;\n if (!rest && ctx.data.length > this._def.items.length) {\n addIssueToContext(ctx, {\n code: ZodIssueCode.too_big,\n maximum: this._def.items.length,\n inclusive: true,\n exact: false,\n type: \"array\"\n });\n status.dirty();\n }\n const items = [...ctx.data].map((item, itemIndex) => {\n const schema = this._def.items[itemIndex] || this._def.rest;\n if (!schema)\n return null;\n return schema._parse(new ParseInputLazyPath(ctx, item, ctx.path, itemIndex));\n }).filter((x4) => !!x4);\n if (ctx.common.async) {\n return Promise.all(items).then((results) => {\n return ParseStatus.mergeArray(status, results);\n });\n } else {\n return ParseStatus.mergeArray(status, items);\n }\n }\n get items() {\n return this._def.items;\n }\n rest(rest) {\n return new _ZodTuple({\n ...this._def,\n rest\n });\n }\n };\n ZodTuple.create = (schemas, params) => {\n if (!Array.isArray(schemas)) {\n throw new Error(\"You must pass an array of schemas to z.tuple([ ... ])\");\n }\n return new ZodTuple({\n items: schemas,\n typeName: ZodFirstPartyTypeKind.ZodTuple,\n rest: null,\n ...processCreateParams(params)\n });\n };\n ZodRecord = class _ZodRecord extends ZodType {\n get keySchema() {\n return this._def.keyType;\n }\n get valueSchema() {\n return this._def.valueType;\n }\n _parse(input) {\n const { status, ctx } = this._processInputParams(input);\n if (ctx.parsedType !== ZodParsedType.object) {\n addIssueToContext(ctx, {\n code: ZodIssueCode.invalid_type,\n expected: ZodParsedType.object,\n received: ctx.parsedType\n });\n return INVALID;\n }\n const pairs = [];\n const keyType = this._def.keyType;\n const valueType = this._def.valueType;\n for (const key in ctx.data) {\n pairs.push({\n key: keyType._parse(new ParseInputLazyPath(ctx, key, ctx.path, key)),\n value: valueType._parse(new ParseInputLazyPath(ctx, ctx.data[key], ctx.path, key)),\n alwaysSet: key in ctx.data\n });\n }\n if (ctx.common.async) {\n return ParseStatus.mergeObjectAsync(status, pairs);\n } else {\n return ParseStatus.mergeObjectSync(status, pairs);\n }\n }\n get element() {\n return this._def.valueType;\n }\n static create(first, second, third) {\n if (second instanceof ZodType) {\n return new _ZodRecord({\n keyType: first,\n valueType: second,\n typeName: ZodFirstPartyTypeKind.ZodRecord,\n ...processCreateParams(third)\n });\n }\n return new _ZodRecord({\n keyType: ZodString.create(),\n valueType: first,\n typeName: ZodFirstPartyTypeKind.ZodRecord,\n ...processCreateParams(second)\n });\n }\n };\n ZodMap = class extends ZodType {\n get keySchema() {\n return this._def.keyType;\n }\n get valueSchema() {\n return this._def.valueType;\n }\n _parse(input) {\n const { status, ctx } = this._processInputParams(input);\n if (ctx.parsedType !== ZodParsedType.map) {\n addIssueToContext(ctx, {\n code: ZodIssueCode.invalid_type,\n expected: ZodParsedType.map,\n received: ctx.parsedType\n });\n return INVALID;\n }\n const keyType = this._def.keyType;\n const valueType = this._def.valueType;\n const pairs = [...ctx.data.entries()].map(([key, value], index2) => {\n return {\n key: keyType._parse(new ParseInputLazyPath(ctx, key, ctx.path, [index2, \"key\"])),\n value: valueType._parse(new ParseInputLazyPath(ctx, value, ctx.path, [index2, \"value\"]))\n };\n });\n if (ctx.common.async) {\n const finalMap = /* @__PURE__ */ new Map();\n return Promise.resolve().then(async () => {\n for (const pair of pairs) {\n const key = await pair.key;\n const value = await pair.value;\n if (key.status === \"aborted\" || value.status === \"aborted\") {\n return INVALID;\n }\n if (key.status === \"dirty\" || value.status === \"dirty\") {\n status.dirty();\n }\n finalMap.set(key.value, value.value);\n }\n return { status: status.value, value: finalMap };\n });\n } else {\n const finalMap = /* @__PURE__ */ new Map();\n for (const pair of pairs) {\n const key = pair.key;\n const value = pair.value;\n if (key.status === \"aborted\" || value.status === \"aborted\") {\n return INVALID;\n }\n if (key.status === \"dirty\" || value.status === \"dirty\") {\n status.dirty();\n }\n finalMap.set(key.value, value.value);\n }\n return { status: status.value, value: finalMap };\n }\n }\n };\n ZodMap.create = (keyType, valueType, params) => {\n return new ZodMap({\n valueType,\n keyType,\n typeName: ZodFirstPartyTypeKind.ZodMap,\n ...processCreateParams(params)\n });\n };\n ZodSet = class _ZodSet extends ZodType {\n _parse(input) {\n const { status, ctx } = this._processInputParams(input);\n if (ctx.parsedType !== ZodParsedType.set) {\n addIssueToContext(ctx, {\n code: ZodIssueCode.invalid_type,\n expected: ZodParsedType.set,\n received: ctx.parsedType\n });\n return INVALID;\n }\n const def = this._def;\n if (def.minSize !== null) {\n if (ctx.data.size < def.minSize.value) {\n addIssueToContext(ctx, {\n code: ZodIssueCode.too_small,\n minimum: def.minSize.value,\n type: \"set\",\n inclusive: true,\n exact: false,\n message: def.minSize.message\n });\n status.dirty();\n }\n }\n if (def.maxSize !== null) {\n if (ctx.data.size > def.maxSize.value) {\n addIssueToContext(ctx, {\n code: ZodIssueCode.too_big,\n maximum: def.maxSize.value,\n type: \"set\",\n inclusive: true,\n exact: false,\n message: def.maxSize.message\n });\n status.dirty();\n }\n }\n const valueType = this._def.valueType;\n function finalizeSet(elements2) {\n const parsedSet = /* @__PURE__ */ new Set();\n for (const element of elements2) {\n if (element.status === \"aborted\")\n return INVALID;\n if (element.status === \"dirty\")\n status.dirty();\n parsedSet.add(element.value);\n }\n return { status: status.value, value: parsedSet };\n }\n const elements = [...ctx.data.values()].map((item, i3) => valueType._parse(new ParseInputLazyPath(ctx, item, ctx.path, i3)));\n if (ctx.common.async) {\n return Promise.all(elements).then((elements2) => finalizeSet(elements2));\n } else {\n return finalizeSet(elements);\n }\n }\n min(minSize, message) {\n return new _ZodSet({\n ...this._def,\n minSize: { value: minSize, message: errorUtil.toString(message) }\n });\n }\n max(maxSize, message) {\n return new _ZodSet({\n ...this._def,\n maxSize: { value: maxSize, message: errorUtil.toString(message) }\n });\n }\n size(size6, message) {\n return this.min(size6, message).max(size6, message);\n }\n nonempty(message) {\n return this.min(1, message);\n }\n };\n ZodSet.create = (valueType, params) => {\n return new ZodSet({\n valueType,\n minSize: null,\n maxSize: null,\n typeName: ZodFirstPartyTypeKind.ZodSet,\n ...processCreateParams(params)\n });\n };\n ZodFunction = class _ZodFunction extends ZodType {\n constructor() {\n super(...arguments);\n this.validate = this.implement;\n }\n _parse(input) {\n const { ctx } = this._processInputParams(input);\n if (ctx.parsedType !== ZodParsedType.function) {\n addIssueToContext(ctx, {\n code: ZodIssueCode.invalid_type,\n expected: ZodParsedType.function,\n received: ctx.parsedType\n });\n return INVALID;\n }\n function makeArgsIssue(args, error) {\n return makeIssue({\n data: args,\n path: ctx.path,\n errorMaps: [ctx.common.contextualErrorMap, ctx.schemaErrorMap, getErrorMap(), en_default].filter((x4) => !!x4),\n issueData: {\n code: ZodIssueCode.invalid_arguments,\n argumentsError: error\n }\n });\n }\n function makeReturnsIssue(returns, error) {\n return makeIssue({\n data: returns,\n path: ctx.path,\n errorMaps: [ctx.common.contextualErrorMap, ctx.schemaErrorMap, getErrorMap(), en_default].filter((x4) => !!x4),\n issueData: {\n code: ZodIssueCode.invalid_return_type,\n returnTypeError: error\n }\n });\n }\n const params = { errorMap: ctx.common.contextualErrorMap };\n const fn = ctx.data;\n if (this._def.returns instanceof ZodPromise) {\n const me = this;\n return OK(async function(...args) {\n const error = new ZodError([]);\n const parsedArgs = await me._def.args.parseAsync(args, params).catch((e3) => {\n error.addIssue(makeArgsIssue(args, e3));\n throw error;\n });\n const result = await Reflect.apply(fn, this, parsedArgs);\n const parsedReturns = await me._def.returns._def.type.parseAsync(result, params).catch((e3) => {\n error.addIssue(makeReturnsIssue(result, e3));\n throw error;\n });\n return parsedReturns;\n });\n } else {\n const me = this;\n return OK(function(...args) {\n const parsedArgs = me._def.args.safeParse(args, params);\n if (!parsedArgs.success) {\n throw new ZodError([makeArgsIssue(args, parsedArgs.error)]);\n }\n const result = Reflect.apply(fn, this, parsedArgs.data);\n const parsedReturns = me._def.returns.safeParse(result, params);\n if (!parsedReturns.success) {\n throw new ZodError([makeReturnsIssue(result, parsedReturns.error)]);\n }\n return parsedReturns.data;\n });\n }\n }\n parameters() {\n return this._def.args;\n }\n returnType() {\n return this._def.returns;\n }\n args(...items) {\n return new _ZodFunction({\n ...this._def,\n args: ZodTuple.create(items).rest(ZodUnknown.create())\n });\n }\n returns(returnType) {\n return new _ZodFunction({\n ...this._def,\n returns: returnType\n });\n }\n implement(func) {\n const validatedFunc = this.parse(func);\n return validatedFunc;\n }\n strictImplement(func) {\n const validatedFunc = this.parse(func);\n return validatedFunc;\n }\n static create(args, returns, params) {\n return new _ZodFunction({\n args: args ? args : ZodTuple.create([]).rest(ZodUnknown.create()),\n returns: returns || ZodUnknown.create(),\n typeName: ZodFirstPartyTypeKind.ZodFunction,\n ...processCreateParams(params)\n });\n }\n };\n ZodLazy = class extends ZodType {\n get schema() {\n return this._def.getter();\n }\n _parse(input) {\n const { ctx } = this._processInputParams(input);\n const lazySchema = this._def.getter();\n return lazySchema._parse({ data: ctx.data, path: ctx.path, parent: ctx });\n }\n };\n ZodLazy.create = (getter, params) => {\n return new ZodLazy({\n getter,\n typeName: ZodFirstPartyTypeKind.ZodLazy,\n ...processCreateParams(params)\n });\n };\n ZodLiteral = class extends ZodType {\n _parse(input) {\n if (input.data !== this._def.value) {\n const ctx = this._getOrReturnCtx(input);\n addIssueToContext(ctx, {\n received: ctx.data,\n code: ZodIssueCode.invalid_literal,\n expected: this._def.value\n });\n return INVALID;\n }\n return { status: \"valid\", value: input.data };\n }\n get value() {\n return this._def.value;\n }\n };\n ZodLiteral.create = (value, params) => {\n return new ZodLiteral({\n value,\n typeName: ZodFirstPartyTypeKind.ZodLiteral,\n ...processCreateParams(params)\n });\n };\n ZodEnum = class _ZodEnum extends ZodType {\n _parse(input) {\n if (typeof input.data !== \"string\") {\n const ctx = this._getOrReturnCtx(input);\n const expectedValues = this._def.values;\n addIssueToContext(ctx, {\n expected: util.joinValues(expectedValues),\n received: ctx.parsedType,\n code: ZodIssueCode.invalid_type\n });\n return INVALID;\n }\n if (!this._cache) {\n this._cache = new Set(this._def.values);\n }\n if (!this._cache.has(input.data)) {\n const ctx = this._getOrReturnCtx(input);\n const expectedValues = this._def.values;\n addIssueToContext(ctx, {\n received: ctx.data,\n code: ZodIssueCode.invalid_enum_value,\n options: expectedValues\n });\n return INVALID;\n }\n return OK(input.data);\n }\n get options() {\n return this._def.values;\n }\n get enum() {\n const enumValues = {};\n for (const val of this._def.values) {\n enumValues[val] = val;\n }\n return enumValues;\n }\n get Values() {\n const enumValues = {};\n for (const val of this._def.values) {\n enumValues[val] = val;\n }\n return enumValues;\n }\n get Enum() {\n const enumValues = {};\n for (const val of this._def.values) {\n enumValues[val] = val;\n }\n return enumValues;\n }\n extract(values, newDef = this._def) {\n return _ZodEnum.create(values, {\n ...this._def,\n ...newDef\n });\n }\n exclude(values, newDef = this._def) {\n return _ZodEnum.create(this.options.filter((opt) => !values.includes(opt)), {\n ...this._def,\n ...newDef\n });\n }\n };\n ZodEnum.create = createZodEnum;\n ZodNativeEnum = class extends ZodType {\n _parse(input) {\n const nativeEnumValues = util.getValidEnumValues(this._def.values);\n const ctx = this._getOrReturnCtx(input);\n if (ctx.parsedType !== ZodParsedType.string && ctx.parsedType !== ZodParsedType.number) {\n const expectedValues = util.objectValues(nativeEnumValues);\n addIssueToContext(ctx, {\n expected: util.joinValues(expectedValues),\n received: ctx.parsedType,\n code: ZodIssueCode.invalid_type\n });\n return INVALID;\n }\n if (!this._cache) {\n this._cache = new Set(util.getValidEnumValues(this._def.values));\n }\n if (!this._cache.has(input.data)) {\n const expectedValues = util.objectValues(nativeEnumValues);\n addIssueToContext(ctx, {\n received: ctx.data,\n code: ZodIssueCode.invalid_enum_value,\n options: expectedValues\n });\n return INVALID;\n }\n return OK(input.data);\n }\n get enum() {\n return this._def.values;\n }\n };\n ZodNativeEnum.create = (values, params) => {\n return new ZodNativeEnum({\n values,\n typeName: ZodFirstPartyTypeKind.ZodNativeEnum,\n ...processCreateParams(params)\n });\n };\n ZodPromise = class extends ZodType {\n unwrap() {\n return this._def.type;\n }\n _parse(input) {\n const { ctx } = this._processInputParams(input);\n if (ctx.parsedType !== ZodParsedType.promise && ctx.common.async === false) {\n addIssueToContext(ctx, {\n code: ZodIssueCode.invalid_type,\n expected: ZodParsedType.promise,\n received: ctx.parsedType\n });\n return INVALID;\n }\n const promisified = ctx.parsedType === ZodParsedType.promise ? ctx.data : Promise.resolve(ctx.data);\n return OK(promisified.then((data) => {\n return this._def.type.parseAsync(data, {\n path: ctx.path,\n errorMap: ctx.common.contextualErrorMap\n });\n }));\n }\n };\n ZodPromise.create = (schema, params) => {\n return new ZodPromise({\n type: schema,\n typeName: ZodFirstPartyTypeKind.ZodPromise,\n ...processCreateParams(params)\n });\n };\n ZodEffects = class extends ZodType {\n innerType() {\n return this._def.schema;\n }\n sourceType() {\n return this._def.schema._def.typeName === ZodFirstPartyTypeKind.ZodEffects ? this._def.schema.sourceType() : this._def.schema;\n }\n _parse(input) {\n const { status, ctx } = this._processInputParams(input);\n const effect = this._def.effect || null;\n const checkCtx = {\n addIssue: (arg) => {\n addIssueToContext(ctx, arg);\n if (arg.fatal) {\n status.abort();\n } else {\n status.dirty();\n }\n },\n get path() {\n return ctx.path;\n }\n };\n checkCtx.addIssue = checkCtx.addIssue.bind(checkCtx);\n if (effect.type === \"preprocess\") {\n const processed = effect.transform(ctx.data, checkCtx);\n if (ctx.common.async) {\n return Promise.resolve(processed).then(async (processed2) => {\n if (status.value === \"aborted\")\n return INVALID;\n const result = await this._def.schema._parseAsync({\n data: processed2,\n path: ctx.path,\n parent: ctx\n });\n if (result.status === \"aborted\")\n return INVALID;\n if (result.status === \"dirty\")\n return DIRTY(result.value);\n if (status.value === \"dirty\")\n return DIRTY(result.value);\n return result;\n });\n } else {\n if (status.value === \"aborted\")\n return INVALID;\n const result = this._def.schema._parseSync({\n data: processed,\n path: ctx.path,\n parent: ctx\n });\n if (result.status === \"aborted\")\n return INVALID;\n if (result.status === \"dirty\")\n return DIRTY(result.value);\n if (status.value === \"dirty\")\n return DIRTY(result.value);\n return result;\n }\n }\n if (effect.type === \"refinement\") {\n const executeRefinement = (acc) => {\n const result = effect.refinement(acc, checkCtx);\n if (ctx.common.async) {\n return Promise.resolve(result);\n }\n if (result instanceof Promise) {\n throw new Error(\"Async refinement encountered during synchronous parse operation. Use .parseAsync instead.\");\n }\n return acc;\n };\n if (ctx.common.async === false) {\n const inner = this._def.schema._parseSync({\n data: ctx.data,\n path: ctx.path,\n parent: ctx\n });\n if (inner.status === \"aborted\")\n return INVALID;\n if (inner.status === \"dirty\")\n status.dirty();\n executeRefinement(inner.value);\n return { status: status.value, value: inner.value };\n } else {\n return this._def.schema._parseAsync({ data: ctx.data, path: ctx.path, parent: ctx }).then((inner) => {\n if (inner.status === \"aborted\")\n return INVALID;\n if (inner.status === \"dirty\")\n status.dirty();\n return executeRefinement(inner.value).then(() => {\n return { status: status.value, value: inner.value };\n });\n });\n }\n }\n if (effect.type === \"transform\") {\n if (ctx.common.async === false) {\n const base4 = this._def.schema._parseSync({\n data: ctx.data,\n path: ctx.path,\n parent: ctx\n });\n if (!isValid(base4))\n return INVALID;\n const result = effect.transform(base4.value, checkCtx);\n if (result instanceof Promise) {\n throw new Error(`Asynchronous transform encountered during synchronous parse operation. Use .parseAsync instead.`);\n }\n return { status: status.value, value: result };\n } else {\n return this._def.schema._parseAsync({ data: ctx.data, path: ctx.path, parent: ctx }).then((base4) => {\n if (!isValid(base4))\n return INVALID;\n return Promise.resolve(effect.transform(base4.value, checkCtx)).then((result) => ({\n status: status.value,\n value: result\n }));\n });\n }\n }\n util.assertNever(effect);\n }\n };\n ZodEffects.create = (schema, effect, params) => {\n return new ZodEffects({\n schema,\n typeName: ZodFirstPartyTypeKind.ZodEffects,\n effect,\n ...processCreateParams(params)\n });\n };\n ZodEffects.createWithPreprocess = (preprocess, schema, params) => {\n return new ZodEffects({\n schema,\n effect: { type: \"preprocess\", transform: preprocess },\n typeName: ZodFirstPartyTypeKind.ZodEffects,\n ...processCreateParams(params)\n });\n };\n ZodOptional = class extends ZodType {\n _parse(input) {\n const parsedType = this._getType(input);\n if (parsedType === ZodParsedType.undefined) {\n return OK(void 0);\n }\n return this._def.innerType._parse(input);\n }\n unwrap() {\n return this._def.innerType;\n }\n };\n ZodOptional.create = (type, params) => {\n return new ZodOptional({\n innerType: type,\n typeName: ZodFirstPartyTypeKind.ZodOptional,\n ...processCreateParams(params)\n });\n };\n ZodNullable = class extends ZodType {\n _parse(input) {\n const parsedType = this._getType(input);\n if (parsedType === ZodParsedType.null) {\n return OK(null);\n }\n return this._def.innerType._parse(input);\n }\n unwrap() {\n return this._def.innerType;\n }\n };\n ZodNullable.create = (type, params) => {\n return new ZodNullable({\n innerType: type,\n typeName: ZodFirstPartyTypeKind.ZodNullable,\n ...processCreateParams(params)\n });\n };\n ZodDefault = class extends ZodType {\n _parse(input) {\n const { ctx } = this._processInputParams(input);\n let data = ctx.data;\n if (ctx.parsedType === ZodParsedType.undefined) {\n data = this._def.defaultValue();\n }\n return this._def.innerType._parse({\n data,\n path: ctx.path,\n parent: ctx\n });\n }\n removeDefault() {\n return this._def.innerType;\n }\n };\n ZodDefault.create = (type, params) => {\n return new ZodDefault({\n innerType: type,\n typeName: ZodFirstPartyTypeKind.ZodDefault,\n defaultValue: typeof params.default === \"function\" ? params.default : () => params.default,\n ...processCreateParams(params)\n });\n };\n ZodCatch = class extends ZodType {\n _parse(input) {\n const { ctx } = this._processInputParams(input);\n const newCtx = {\n ...ctx,\n common: {\n ...ctx.common,\n issues: []\n }\n };\n const result = this._def.innerType._parse({\n data: newCtx.data,\n path: newCtx.path,\n parent: {\n ...newCtx\n }\n });\n if (isAsync(result)) {\n return result.then((result2) => {\n return {\n status: \"valid\",\n value: result2.status === \"valid\" ? result2.value : this._def.catchValue({\n get error() {\n return new ZodError(newCtx.common.issues);\n },\n input: newCtx.data\n })\n };\n });\n } else {\n return {\n status: \"valid\",\n value: result.status === \"valid\" ? result.value : this._def.catchValue({\n get error() {\n return new ZodError(newCtx.common.issues);\n },\n input: newCtx.data\n })\n };\n }\n }\n removeCatch() {\n return this._def.innerType;\n }\n };\n ZodCatch.create = (type, params) => {\n return new ZodCatch({\n innerType: type,\n typeName: ZodFirstPartyTypeKind.ZodCatch,\n catchValue: typeof params.catch === \"function\" ? params.catch : () => params.catch,\n ...processCreateParams(params)\n });\n };\n ZodNaN = class extends ZodType {\n _parse(input) {\n const parsedType = this._getType(input);\n if (parsedType !== ZodParsedType.nan) {\n const ctx = this._getOrReturnCtx(input);\n addIssueToContext(ctx, {\n code: ZodIssueCode.invalid_type,\n expected: ZodParsedType.nan,\n received: ctx.parsedType\n });\n return INVALID;\n }\n return { status: \"valid\", value: input.data };\n }\n };\n ZodNaN.create = (params) => {\n return new ZodNaN({\n typeName: ZodFirstPartyTypeKind.ZodNaN,\n ...processCreateParams(params)\n });\n };\n BRAND = Symbol(\"zod_brand\");\n ZodBranded = class extends ZodType {\n _parse(input) {\n const { ctx } = this._processInputParams(input);\n const data = ctx.data;\n return this._def.type._parse({\n data,\n path: ctx.path,\n parent: ctx\n });\n }\n unwrap() {\n return this._def.type;\n }\n };\n ZodPipeline = class _ZodPipeline extends ZodType {\n _parse(input) {\n const { status, ctx } = this._processInputParams(input);\n if (ctx.common.async) {\n const handleAsync = async () => {\n const inResult = await this._def.in._parseAsync({\n data: ctx.data,\n path: ctx.path,\n parent: ctx\n });\n if (inResult.status === \"aborted\")\n return INVALID;\n if (inResult.status === \"dirty\") {\n status.dirty();\n return DIRTY(inResult.value);\n } else {\n return this._def.out._parseAsync({\n data: inResult.value,\n path: ctx.path,\n parent: ctx\n });\n }\n };\n return handleAsync();\n } else {\n const inResult = this._def.in._parseSync({\n data: ctx.data,\n path: ctx.path,\n parent: ctx\n });\n if (inResult.status === \"aborted\")\n return INVALID;\n if (inResult.status === \"dirty\") {\n status.dirty();\n return {\n status: \"dirty\",\n value: inResult.value\n };\n } else {\n return this._def.out._parseSync({\n data: inResult.value,\n path: ctx.path,\n parent: ctx\n });\n }\n }\n }\n static create(a3, b4) {\n return new _ZodPipeline({\n in: a3,\n out: b4,\n typeName: ZodFirstPartyTypeKind.ZodPipeline\n });\n }\n };\n ZodReadonly = class extends ZodType {\n _parse(input) {\n const result = this._def.innerType._parse(input);\n const freeze = (data) => {\n if (isValid(data)) {\n data.value = Object.freeze(data.value);\n }\n return data;\n };\n return isAsync(result) ? result.then((data) => freeze(data)) : freeze(result);\n }\n unwrap() {\n return this._def.innerType;\n }\n };\n ZodReadonly.create = (type, params) => {\n return new ZodReadonly({\n innerType: type,\n typeName: ZodFirstPartyTypeKind.ZodReadonly,\n ...processCreateParams(params)\n });\n };\n late = {\n object: ZodObject.lazycreate\n };\n (function(ZodFirstPartyTypeKind2) {\n ZodFirstPartyTypeKind2[\"ZodString\"] = \"ZodString\";\n ZodFirstPartyTypeKind2[\"ZodNumber\"] = \"ZodNumber\";\n ZodFirstPartyTypeKind2[\"ZodNaN\"] = \"ZodNaN\";\n ZodFirstPartyTypeKind2[\"ZodBigInt\"] = \"ZodBigInt\";\n ZodFirstPartyTypeKind2[\"ZodBoolean\"] = \"ZodBoolean\";\n ZodFirstPartyTypeKind2[\"ZodDate\"] = \"ZodDate\";\n ZodFirstPartyTypeKind2[\"ZodSymbol\"] = \"ZodSymbol\";\n ZodFirstPartyTypeKind2[\"ZodUndefined\"] = \"ZodUndefined\";\n ZodFirstPartyTypeKind2[\"ZodNull\"] = \"ZodNull\";\n ZodFirstPartyTypeKind2[\"ZodAny\"] = \"ZodAny\";\n ZodFirstPartyTypeKind2[\"ZodUnknown\"] = \"ZodUnknown\";\n ZodFirstPartyTypeKind2[\"ZodNever\"] = \"ZodNever\";\n ZodFirstPartyTypeKind2[\"ZodVoid\"] = \"ZodVoid\";\n ZodFirstPartyTypeKind2[\"ZodArray\"] = \"ZodArray\";\n ZodFirstPartyTypeKind2[\"ZodObject\"] = \"ZodObject\";\n ZodFirstPartyTypeKind2[\"ZodUnion\"] = \"ZodUnion\";\n ZodFirstPartyTypeKind2[\"ZodDiscriminatedUnion\"] = \"ZodDiscriminatedUnion\";\n ZodFirstPartyTypeKind2[\"ZodIntersection\"] = \"ZodIntersection\";\n ZodFirstPartyTypeKind2[\"ZodTuple\"] = \"ZodTuple\";\n ZodFirstPartyTypeKind2[\"ZodRecord\"] = \"ZodRecord\";\n ZodFirstPartyTypeKind2[\"ZodMap\"] = \"ZodMap\";\n ZodFirstPartyTypeKind2[\"ZodSet\"] = \"ZodSet\";\n ZodFirstPartyTypeKind2[\"ZodFunction\"] = \"ZodFunction\";\n ZodFirstPartyTypeKind2[\"ZodLazy\"] = \"ZodLazy\";\n ZodFirstPartyTypeKind2[\"ZodLiteral\"] = \"ZodLiteral\";\n ZodFirstPartyTypeKind2[\"ZodEnum\"] = \"ZodEnum\";\n ZodFirstPartyTypeKind2[\"ZodEffects\"] = \"ZodEffects\";\n ZodFirstPartyTypeKind2[\"ZodNativeEnum\"] = \"ZodNativeEnum\";\n ZodFirstPartyTypeKind2[\"ZodOptional\"] = \"ZodOptional\";\n ZodFirstPartyTypeKind2[\"ZodNullable\"] = \"ZodNullable\";\n ZodFirstPartyTypeKind2[\"ZodDefault\"] = \"ZodDefault\";\n ZodFirstPartyTypeKind2[\"ZodCatch\"] = \"ZodCatch\";\n ZodFirstPartyTypeKind2[\"ZodPromise\"] = \"ZodPromise\";\n ZodFirstPartyTypeKind2[\"ZodBranded\"] = \"ZodBranded\";\n ZodFirstPartyTypeKind2[\"ZodPipeline\"] = \"ZodPipeline\";\n ZodFirstPartyTypeKind2[\"ZodReadonly\"] = \"ZodReadonly\";\n })(ZodFirstPartyTypeKind || (ZodFirstPartyTypeKind = {}));\n instanceOfType = (cls, params = {\n message: `Input not instance of ${cls.name}`\n }) => custom2((data) => data instanceof cls, params);\n stringType = ZodString.create;\n numberType = ZodNumber.create;\n nanType = ZodNaN.create;\n bigIntType = ZodBigInt.create;\n booleanType = ZodBoolean.create;\n dateType = ZodDate.create;\n symbolType = ZodSymbol.create;\n undefinedType = ZodUndefined.create;\n nullType = ZodNull.create;\n anyType = ZodAny.create;\n unknownType = ZodUnknown.create;\n neverType = ZodNever.create;\n voidType = ZodVoid.create;\n arrayType = ZodArray.create;\n objectType = ZodObject.create;\n strictObjectType = ZodObject.strictCreate;\n unionType = ZodUnion.create;\n discriminatedUnionType = ZodDiscriminatedUnion.create;\n intersectionType = ZodIntersection.create;\n tupleType = ZodTuple.create;\n recordType = ZodRecord.create;\n mapType = ZodMap.create;\n setType = ZodSet.create;\n functionType = ZodFunction.create;\n lazyType = ZodLazy.create;\n literalType = ZodLiteral.create;\n enumType = ZodEnum.create;\n nativeEnumType = ZodNativeEnum.create;\n promiseType = ZodPromise.create;\n effectsType = ZodEffects.create;\n optionalType = ZodOptional.create;\n nullableType = ZodNullable.create;\n preprocessType = ZodEffects.createWithPreprocess;\n pipelineType = ZodPipeline.create;\n ostring = () => stringType().optional();\n onumber = () => numberType().optional();\n oboolean = () => booleanType().optional();\n coerce = {\n string: (arg) => ZodString.create({ ...arg, coerce: true }),\n number: (arg) => ZodNumber.create({ ...arg, coerce: true }),\n boolean: (arg) => ZodBoolean.create({\n ...arg,\n coerce: true\n }),\n bigint: (arg) => ZodBigInt.create({ ...arg, coerce: true }),\n date: (arg) => ZodDate.create({ ...arg, coerce: true })\n };\n NEVER = INVALID;\n }\n });\n\n // ../../../node_modules/.pnpm/zod@3.25.64/node_modules/zod/dist/esm/v3/external.js\n var external_exports = {};\n __export(external_exports, {\n BRAND: () => BRAND,\n DIRTY: () => DIRTY,\n EMPTY_PATH: () => EMPTY_PATH,\n INVALID: () => INVALID,\n NEVER: () => NEVER,\n OK: () => OK,\n ParseStatus: () => ParseStatus,\n Schema: () => ZodType,\n ZodAny: () => ZodAny,\n ZodArray: () => ZodArray,\n ZodBigInt: () => ZodBigInt,\n ZodBoolean: () => ZodBoolean,\n ZodBranded: () => ZodBranded,\n ZodCatch: () => ZodCatch,\n ZodDate: () => ZodDate,\n ZodDefault: () => ZodDefault,\n ZodDiscriminatedUnion: () => ZodDiscriminatedUnion,\n ZodEffects: () => ZodEffects,\n ZodEnum: () => ZodEnum,\n ZodError: () => ZodError,\n ZodFirstPartyTypeKind: () => ZodFirstPartyTypeKind,\n ZodFunction: () => ZodFunction,\n ZodIntersection: () => ZodIntersection,\n ZodIssueCode: () => ZodIssueCode,\n ZodLazy: () => ZodLazy,\n ZodLiteral: () => ZodLiteral,\n ZodMap: () => ZodMap,\n ZodNaN: () => ZodNaN,\n ZodNativeEnum: () => ZodNativeEnum,\n ZodNever: () => ZodNever,\n ZodNull: () => ZodNull,\n ZodNullable: () => ZodNullable,\n ZodNumber: () => ZodNumber,\n ZodObject: () => ZodObject,\n ZodOptional: () => ZodOptional,\n ZodParsedType: () => ZodParsedType,\n ZodPipeline: () => ZodPipeline,\n ZodPromise: () => ZodPromise,\n ZodReadonly: () => ZodReadonly,\n ZodRecord: () => ZodRecord,\n ZodSchema: () => ZodType,\n ZodSet: () => ZodSet,\n ZodString: () => ZodString,\n ZodSymbol: () => ZodSymbol,\n ZodTransformer: () => ZodEffects,\n ZodTuple: () => ZodTuple,\n ZodType: () => ZodType,\n ZodUndefined: () => ZodUndefined,\n ZodUnion: () => ZodUnion,\n ZodUnknown: () => ZodUnknown,\n ZodVoid: () => ZodVoid,\n addIssueToContext: () => addIssueToContext,\n any: () => anyType,\n array: () => arrayType,\n bigint: () => bigIntType,\n boolean: () => booleanType,\n coerce: () => coerce,\n custom: () => custom2,\n date: () => dateType,\n datetimeRegex: () => datetimeRegex,\n defaultErrorMap: () => en_default,\n discriminatedUnion: () => discriminatedUnionType,\n effect: () => effectsType,\n enum: () => enumType,\n function: () => functionType,\n getErrorMap: () => getErrorMap,\n getParsedType: () => getParsedType,\n instanceof: () => instanceOfType,\n intersection: () => intersectionType,\n isAborted: () => isAborted,\n isAsync: () => isAsync,\n isDirty: () => isDirty,\n isValid: () => isValid,\n late: () => late,\n lazy: () => lazyType,\n literal: () => literalType,\n makeIssue: () => makeIssue,\n map: () => mapType,\n nan: () => nanType,\n nativeEnum: () => nativeEnumType,\n never: () => neverType,\n null: () => nullType,\n nullable: () => nullableType,\n number: () => numberType,\n object: () => objectType,\n objectUtil: () => objectUtil,\n oboolean: () => oboolean,\n onumber: () => onumber,\n optional: () => optionalType,\n ostring: () => ostring,\n pipeline: () => pipelineType,\n preprocess: () => preprocessType,\n promise: () => promiseType,\n quotelessJson: () => quotelessJson,\n record: () => recordType,\n set: () => setType,\n setErrorMap: () => setErrorMap,\n strictObject: () => strictObjectType,\n string: () => stringType,\n symbol: () => symbolType,\n transformer: () => effectsType,\n tuple: () => tupleType,\n undefined: () => undefinedType,\n union: () => unionType,\n unknown: () => unknownType,\n util: () => util,\n void: () => voidType\n });\n var init_external = __esm({\n \"../../../node_modules/.pnpm/zod@3.25.64/node_modules/zod/dist/esm/v3/external.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_errors5();\n init_parseUtil();\n init_typeAliases();\n init_util();\n init_types2();\n init_ZodError();\n }\n });\n\n // ../../../node_modules/.pnpm/zod@3.25.64/node_modules/zod/dist/esm/v3/index.js\n var v3_default;\n var init_v3 = __esm({\n \"../../../node_modules/.pnpm/zod@3.25.64/node_modules/zod/dist/esm/v3/index.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_external();\n init_external();\n v3_default = external_exports;\n }\n });\n\n // ../../../node_modules/.pnpm/zod@3.25.64/node_modules/zod/dist/esm/index.js\n var esm_default;\n var init_esm5 = __esm({\n \"../../../node_modules/.pnpm/zod@3.25.64/node_modules/zod/dist/esm/index.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_v3();\n init_v3();\n esm_default = v3_default;\n }\n });\n\n // ../../../node_modules/.pnpm/@aa-sdk+core@4.62.0_typescript@5.8.3_viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64_/node_modules/@aa-sdk/core/dist/esm/utils/schema.js\n function isBigNumberish(x4) {\n return x4 != null && BigNumberishSchema.safeParse(x4).success;\n }\n function isMultiplier(x4) {\n return x4 != null && MultiplierSchema.safeParse(x4).success;\n }\n var ChainSchema, HexSchema, BigNumberishSchema, BigNumberishRangeSchema, MultiplierSchema;\n var init_schema = __esm({\n \"../../../node_modules/.pnpm/@aa-sdk+core@4.62.0_typescript@5.8.3_viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64_/node_modules/@aa-sdk/core/dist/esm/utils/schema.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_esm();\n init_esm5();\n ChainSchema = external_exports.custom((chain2) => chain2 != null && typeof chain2 === \"object\" && \"id\" in chain2 && typeof chain2.id === \"number\");\n HexSchema = external_exports.custom((val) => {\n return isHex(val, { strict: true });\n });\n BigNumberishSchema = external_exports.union([HexSchema, external_exports.number(), external_exports.bigint()]);\n BigNumberishRangeSchema = external_exports.object({\n min: BigNumberishSchema.optional(),\n max: BigNumberishSchema.optional()\n }).strict();\n MultiplierSchema = external_exports.object({\n /**\n * Multiplier value with max precision of 4 decimal places\n */\n multiplier: external_exports.number().refine((n2) => {\n return (n2.toString().split(\".\")[1]?.length ?? 0) <= 4;\n }, { message: \"Max precision is 4 decimal places\" })\n }).strict();\n }\n });\n\n // ../../../node_modules/.pnpm/@aa-sdk+core@4.62.0_typescript@5.8.3_viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64_/node_modules/@aa-sdk/core/dist/esm/utils/bigint.js\n var bigIntMax, bigIntClamp, RoundingMode, bigIntMultiply;\n var init_bigint = __esm({\n \"../../../node_modules/.pnpm/@aa-sdk+core@4.62.0_typescript@5.8.3_viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64_/node_modules/@aa-sdk/core/dist/esm/utils/bigint.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_schema();\n bigIntMax = (...args) => {\n if (!args.length) {\n throw new Error(\"bigIntMax requires at least one argument\");\n }\n return args.reduce((m2, c4) => m2 > c4 ? m2 : c4);\n };\n bigIntClamp = (value, lower, upper) => {\n lower = lower != null ? BigInt(lower) : null;\n upper = upper != null ? BigInt(upper) : null;\n if (upper != null && lower != null && upper < lower) {\n throw new Error(`invalid range: upper bound ${upper} is less than lower bound ${lower}`);\n }\n let ret = BigInt(value);\n if (lower != null && lower > ret) {\n ret = lower;\n }\n if (upper != null && upper < ret) {\n ret = upper;\n }\n return ret;\n };\n (function(RoundingMode2) {\n RoundingMode2[RoundingMode2[\"ROUND_DOWN\"] = 0] = \"ROUND_DOWN\";\n RoundingMode2[RoundingMode2[\"ROUND_UP\"] = 1] = \"ROUND_UP\";\n })(RoundingMode || (RoundingMode = {}));\n bigIntMultiply = (base4, multiplier, roundingMode = RoundingMode.ROUND_UP) => {\n if (!isMultiplier({ multiplier })) {\n throw new Error(\"bigIntMultiply requires a multiplier validated number as the second argument\");\n }\n const decimalPlaces = multiplier.toString().split(\".\")[1]?.length ?? 0;\n const val = roundingMode === RoundingMode.ROUND_UP ? BigInt(base4) * BigInt(Math.round(multiplier * 10 ** decimalPlaces)) + BigInt(10 ** decimalPlaces - 1) : BigInt(base4) * BigInt(Math.round(multiplier * 10 ** decimalPlaces));\n return val / BigInt(10 ** decimalPlaces);\n };\n }\n });\n\n // ../../../node_modules/.pnpm/@aa-sdk+core@4.62.0_typescript@5.8.3_viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64_/node_modules/@aa-sdk/core/dist/esm/utils/bytes.js\n var takeBytes;\n var init_bytes3 = __esm({\n \"../../../node_modules/.pnpm/@aa-sdk+core@4.62.0_typescript@5.8.3_viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64_/node_modules/@aa-sdk/core/dist/esm/utils/bytes.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n takeBytes = (bytes, opts = {}) => {\n const { offset, count } = opts;\n const start = (offset ? offset * 2 : 0) + 2;\n const end = count ? start + count * 2 : void 0;\n return `0x${bytes.slice(start, end)}`;\n };\n }\n });\n\n // ../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/op-stack/contracts.js\n var contracts;\n var init_contracts2 = __esm({\n \"../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/op-stack/contracts.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n contracts = {\n gasPriceOracle: { address: \"0x420000000000000000000000000000000000000F\" },\n l1Block: { address: \"0x4200000000000000000000000000000000000015\" },\n l2CrossDomainMessenger: {\n address: \"0x4200000000000000000000000000000000000007\"\n },\n l2Erc721Bridge: { address: \"0x4200000000000000000000000000000000000014\" },\n l2StandardBridge: { address: \"0x4200000000000000000000000000000000000010\" },\n l2ToL1MessagePasser: {\n address: \"0x4200000000000000000000000000000000000016\"\n }\n };\n }\n });\n\n // ../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/op-stack/formatters.js\n var formatters;\n var init_formatters = __esm({\n \"../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/op-stack/formatters.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_fromHex();\n init_block2();\n init_transaction2();\n init_transactionReceipt();\n formatters = {\n block: /* @__PURE__ */ defineBlock({\n format(args) {\n const transactions = args.transactions?.map((transaction) => {\n if (typeof transaction === \"string\")\n return transaction;\n const formatted = formatTransaction(transaction);\n if (formatted.typeHex === \"0x7e\") {\n formatted.isSystemTx = transaction.isSystemTx;\n formatted.mint = transaction.mint ? hexToBigInt(transaction.mint) : void 0;\n formatted.sourceHash = transaction.sourceHash;\n formatted.type = \"deposit\";\n }\n return formatted;\n });\n return {\n transactions,\n stateRoot: args.stateRoot\n };\n }\n }),\n transaction: /* @__PURE__ */ defineTransaction({\n format(args) {\n const transaction = {};\n if (args.type === \"0x7e\") {\n transaction.isSystemTx = args.isSystemTx;\n transaction.mint = args.mint ? hexToBigInt(args.mint) : void 0;\n transaction.sourceHash = args.sourceHash;\n transaction.type = \"deposit\";\n }\n return transaction;\n }\n }),\n transactionReceipt: /* @__PURE__ */ defineTransactionReceipt({\n format(args) {\n return {\n l1GasPrice: args.l1GasPrice ? hexToBigInt(args.l1GasPrice) : null,\n l1GasUsed: args.l1GasUsed ? hexToBigInt(args.l1GasUsed) : null,\n l1Fee: args.l1Fee ? hexToBigInt(args.l1Fee) : null,\n l1FeeScalar: args.l1FeeScalar ? Number(args.l1FeeScalar) : null\n };\n }\n })\n };\n }\n });\n\n // ../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/op-stack/serializers.js\n function serializeTransaction2(transaction, signature) {\n if (isDeposit(transaction))\n return serializeTransactionDeposit(transaction);\n return serializeTransaction(transaction, signature);\n }\n function serializeTransactionDeposit(transaction) {\n assertTransactionDeposit(transaction);\n const { sourceHash, data, from: from14, gas, isSystemTx, mint, to, value } = transaction;\n const serializedTransaction = [\n sourceHash,\n from14,\n to ?? \"0x\",\n mint ? toHex(mint) : \"0x\",\n value ? toHex(value) : \"0x\",\n gas ? toHex(gas) : \"0x\",\n isSystemTx ? \"0x1\" : \"0x\",\n data ?? \"0x\"\n ];\n return concatHex([\n \"0x7e\",\n toRlp(serializedTransaction)\n ]);\n }\n function isDeposit(transaction) {\n if (transaction.type === \"deposit\")\n return true;\n if (typeof transaction.sourceHash !== \"undefined\")\n return true;\n return false;\n }\n function assertTransactionDeposit(transaction) {\n const { from: from14, to } = transaction;\n if (from14 && !isAddress(from14))\n throw new InvalidAddressError({ address: from14 });\n if (to && !isAddress(to))\n throw new InvalidAddressError({ address: to });\n }\n var serializers;\n var init_serializers = __esm({\n \"../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/op-stack/serializers.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_address();\n init_isAddress();\n init_concat();\n init_toHex();\n init_toRlp();\n init_serializeTransaction();\n serializers = {\n transaction: serializeTransaction2\n };\n }\n });\n\n // ../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/op-stack/chainConfig.js\n var chainConfig;\n var init_chainConfig = __esm({\n \"../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/op-stack/chainConfig.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_contracts2();\n init_formatters();\n init_serializers();\n chainConfig = {\n blockTime: 2e3,\n contracts,\n formatters,\n serializers\n };\n }\n });\n\n // ../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/chains/definitions/arbitrum.js\n var arbitrum;\n var init_arbitrum = __esm({\n \"../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/chains/definitions/arbitrum.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_defineChain();\n arbitrum = /* @__PURE__ */ defineChain({\n id: 42161,\n name: \"Arbitrum One\",\n nativeCurrency: { name: \"Ether\", symbol: \"ETH\", decimals: 18 },\n blockTime: 250,\n rpcUrls: {\n default: {\n http: [\"https://arb1.arbitrum.io/rpc\"]\n }\n },\n blockExplorers: {\n default: {\n name: \"Arbiscan\",\n url: \"https://arbiscan.io\",\n apiUrl: \"https://api.arbiscan.io/api\"\n }\n },\n contracts: {\n multicall3: {\n address: \"0xca11bde05977b3631167028862be2a173976ca11\",\n blockCreated: 7654707\n }\n }\n });\n }\n });\n\n // ../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/chains/definitions/arbitrumGoerli.js\n var arbitrumGoerli;\n var init_arbitrumGoerli = __esm({\n \"../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/chains/definitions/arbitrumGoerli.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_defineChain();\n arbitrumGoerli = /* @__PURE__ */ defineChain({\n id: 421613,\n name: \"Arbitrum Goerli\",\n nativeCurrency: {\n name: \"Arbitrum Goerli Ether\",\n symbol: \"ETH\",\n decimals: 18\n },\n rpcUrls: {\n default: {\n http: [\"https://goerli-rollup.arbitrum.io/rpc\"]\n }\n },\n blockExplorers: {\n default: {\n name: \"Arbiscan\",\n url: \"https://goerli.arbiscan.io\"\n }\n },\n contracts: {\n multicall3: {\n address: \"0xca11bde05977b3631167028862be2a173976ca11\",\n blockCreated: 88114\n }\n },\n testnet: true\n });\n }\n });\n\n // ../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/chains/definitions/arbitrumNova.js\n var arbitrumNova;\n var init_arbitrumNova = __esm({\n \"../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/chains/definitions/arbitrumNova.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_defineChain();\n arbitrumNova = /* @__PURE__ */ defineChain({\n id: 42170,\n name: \"Arbitrum Nova\",\n nativeCurrency: { name: \"Ether\", symbol: \"ETH\", decimals: 18 },\n rpcUrls: {\n default: {\n http: [\"https://nova.arbitrum.io/rpc\"]\n }\n },\n blockExplorers: {\n default: {\n name: \"Arbiscan\",\n url: \"https://nova.arbiscan.io\",\n apiUrl: \"https://api-nova.arbiscan.io/api\"\n }\n },\n contracts: {\n multicall3: {\n address: \"0xca11bde05977b3631167028862be2a173976ca11\",\n blockCreated: 1746963\n }\n }\n });\n }\n });\n\n // ../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/chains/definitions/arbitrumSepolia.js\n var arbitrumSepolia;\n var init_arbitrumSepolia = __esm({\n \"../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/chains/definitions/arbitrumSepolia.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_defineChain();\n arbitrumSepolia = /* @__PURE__ */ defineChain({\n id: 421614,\n name: \"Arbitrum Sepolia\",\n blockTime: 250,\n nativeCurrency: {\n name: \"Arbitrum Sepolia Ether\",\n symbol: \"ETH\",\n decimals: 18\n },\n rpcUrls: {\n default: {\n http: [\"https://sepolia-rollup.arbitrum.io/rpc\"]\n }\n },\n blockExplorers: {\n default: {\n name: \"Arbiscan\",\n url: \"https://sepolia.arbiscan.io\",\n apiUrl: \"https://api-sepolia.arbiscan.io/api\"\n }\n },\n contracts: {\n multicall3: {\n address: \"0xca11bde05977b3631167028862be2a173976ca11\",\n blockCreated: 81930\n }\n },\n testnet: true\n });\n }\n });\n\n // ../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/chains/definitions/base.js\n var sourceId, base, basePreconf;\n var init_base3 = __esm({\n \"../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/chains/definitions/base.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_chainConfig();\n init_defineChain();\n sourceId = 1;\n base = /* @__PURE__ */ defineChain({\n ...chainConfig,\n id: 8453,\n name: \"Base\",\n nativeCurrency: { name: \"Ether\", symbol: \"ETH\", decimals: 18 },\n rpcUrls: {\n default: {\n http: [\"https://mainnet.base.org\"]\n }\n },\n blockExplorers: {\n default: {\n name: \"Basescan\",\n url: \"https://basescan.org\",\n apiUrl: \"https://api.basescan.org/api\"\n }\n },\n contracts: {\n ...chainConfig.contracts,\n disputeGameFactory: {\n [sourceId]: {\n address: \"0x43edB88C4B80fDD2AdFF2412A7BebF9dF42cB40e\"\n }\n },\n l2OutputOracle: {\n [sourceId]: {\n address: \"0x56315b90c40730925ec5485cf004d835058518A0\"\n }\n },\n multicall3: {\n address: \"0xca11bde05977b3631167028862be2a173976ca11\",\n blockCreated: 5022\n },\n portal: {\n [sourceId]: {\n address: \"0x49048044D57e1C92A77f79988d21Fa8fAF74E97e\",\n blockCreated: 17482143\n }\n },\n l1StandardBridge: {\n [sourceId]: {\n address: \"0x3154Cf16ccdb4C6d922629664174b904d80F2C35\",\n blockCreated: 17482143\n }\n }\n },\n sourceId\n });\n basePreconf = /* @__PURE__ */ defineChain({\n ...base,\n experimental_preconfirmationTime: 200,\n rpcUrls: {\n default: {\n http: [\"https://mainnet-preconf.base.org\"]\n }\n }\n });\n }\n });\n\n // ../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/chains/definitions/baseGoerli.js\n var sourceId2, baseGoerli;\n var init_baseGoerli = __esm({\n \"../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/chains/definitions/baseGoerli.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_chainConfig();\n init_defineChain();\n sourceId2 = 5;\n baseGoerli = /* @__PURE__ */ defineChain({\n ...chainConfig,\n id: 84531,\n name: \"Base Goerli\",\n nativeCurrency: { name: \"Goerli Ether\", symbol: \"ETH\", decimals: 18 },\n rpcUrls: {\n default: { http: [\"https://goerli.base.org\"] }\n },\n blockExplorers: {\n default: {\n name: \"Basescan\",\n url: \"https://goerli.basescan.org\",\n apiUrl: \"https://goerli.basescan.org/api\"\n }\n },\n contracts: {\n ...chainConfig.contracts,\n l2OutputOracle: {\n [sourceId2]: {\n address: \"0x2A35891ff30313CcFa6CE88dcf3858bb075A2298\"\n }\n },\n multicall3: {\n address: \"0xca11bde05977b3631167028862be2a173976ca11\",\n blockCreated: 1376988\n },\n portal: {\n [sourceId2]: {\n address: \"0xe93c8cD0D409341205A592f8c4Ac1A5fe5585cfA\"\n }\n },\n l1StandardBridge: {\n [sourceId2]: {\n address: \"0xfA6D8Ee5BE770F84FC001D098C4bD604Fe01284a\"\n }\n }\n },\n testnet: true,\n sourceId: sourceId2\n });\n }\n });\n\n // ../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/chains/definitions/baseSepolia.js\n var sourceId3, baseSepolia, baseSepoliaPreconf;\n var init_baseSepolia = __esm({\n \"../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/chains/definitions/baseSepolia.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_chainConfig();\n init_defineChain();\n sourceId3 = 11155111;\n baseSepolia = /* @__PURE__ */ defineChain({\n ...chainConfig,\n id: 84532,\n network: \"base-sepolia\",\n name: \"Base Sepolia\",\n nativeCurrency: { name: \"Sepolia Ether\", symbol: \"ETH\", decimals: 18 },\n rpcUrls: {\n default: {\n http: [\"https://sepolia.base.org\"]\n }\n },\n blockExplorers: {\n default: {\n name: \"Basescan\",\n url: \"https://sepolia.basescan.org\",\n apiUrl: \"https://api-sepolia.basescan.org/api\"\n }\n },\n contracts: {\n ...chainConfig.contracts,\n disputeGameFactory: {\n [sourceId3]: {\n address: \"0xd6E6dBf4F7EA0ac412fD8b65ED297e64BB7a06E1\"\n }\n },\n l2OutputOracle: {\n [sourceId3]: {\n address: \"0x84457ca9D0163FbC4bbfe4Dfbb20ba46e48DF254\"\n }\n },\n portal: {\n [sourceId3]: {\n address: \"0x49f53e41452c74589e85ca1677426ba426459e85\",\n blockCreated: 4446677\n }\n },\n l1StandardBridge: {\n [sourceId3]: {\n address: \"0xfd0Bf71F60660E2f608ed56e1659C450eB113120\",\n blockCreated: 4446677\n }\n },\n multicall3: {\n address: \"0xca11bde05977b3631167028862be2a173976ca11\",\n blockCreated: 1059647\n }\n },\n testnet: true,\n sourceId: sourceId3\n });\n baseSepoliaPreconf = /* @__PURE__ */ defineChain({\n ...baseSepolia,\n experimental_preconfirmationTime: 200,\n rpcUrls: {\n default: {\n http: [\"https://sepolia-preconf.base.org\"]\n }\n }\n });\n }\n });\n\n // ../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/chains/definitions/fraxtal.js\n var sourceId4, fraxtal;\n var init_fraxtal = __esm({\n \"../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/chains/definitions/fraxtal.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_chainConfig();\n init_defineChain();\n sourceId4 = 1;\n fraxtal = /* @__PURE__ */ defineChain({\n ...chainConfig,\n id: 252,\n name: \"Fraxtal\",\n nativeCurrency: { name: \"Frax\", symbol: \"FRAX\", decimals: 18 },\n rpcUrls: {\n default: {\n http: [\"https://rpc.frax.com\"]\n }\n },\n blockExplorers: {\n default: {\n name: \"fraxscan\",\n url: \"https://fraxscan.com\",\n apiUrl: \"https://api.fraxscan.com/api\"\n }\n },\n contracts: {\n ...chainConfig.contracts,\n l2OutputOracle: {\n [sourceId4]: {\n address: \"0x66CC916Ed5C6C2FA97014f7D1cD141528Ae171e4\"\n }\n },\n multicall3: {\n address: \"0xca11bde05977b3631167028862be2a173976ca11\"\n },\n portal: {\n [sourceId4]: {\n address: \"0x36cb65c1967A0Fb0EEE11569C51C2f2aA1Ca6f6D\",\n blockCreated: 19135323\n }\n },\n l1StandardBridge: {\n [sourceId4]: {\n address: \"0x34C0bD5877A5Ee7099D0f5688D65F4bB9158BDE2\",\n blockCreated: 19135323\n }\n }\n },\n sourceId: sourceId4\n });\n }\n });\n\n // ../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/chains/definitions/goerli.js\n var goerli;\n var init_goerli = __esm({\n \"../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/chains/definitions/goerli.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_defineChain();\n goerli = /* @__PURE__ */ defineChain({\n id: 5,\n name: \"Goerli\",\n nativeCurrency: { name: \"Goerli Ether\", symbol: \"ETH\", decimals: 18 },\n rpcUrls: {\n default: {\n http: [\"https://5.rpc.thirdweb.com\"]\n }\n },\n blockExplorers: {\n default: {\n name: \"Etherscan\",\n url: \"https://goerli.etherscan.io\",\n apiUrl: \"https://api-goerli.etherscan.io/api\"\n }\n },\n contracts: {\n ensRegistry: {\n address: \"0x00000000000C2E074eC69A0dFb2997BA6C7d2e1e\"\n },\n ensUniversalResolver: {\n address: \"0xfc4AC75C46C914aF5892d6d3eFFcebD7917293F1\",\n blockCreated: 10339206\n },\n multicall3: {\n address: \"0xca11bde05977b3631167028862be2a173976ca11\",\n blockCreated: 6507670\n }\n },\n testnet: true\n });\n }\n });\n\n // ../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/chains/definitions/mainnet.js\n var mainnet;\n var init_mainnet = __esm({\n \"../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/chains/definitions/mainnet.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_defineChain();\n mainnet = /* @__PURE__ */ defineChain({\n id: 1,\n name: \"Ethereum\",\n nativeCurrency: { name: \"Ether\", symbol: \"ETH\", decimals: 18 },\n blockTime: 12e3,\n rpcUrls: {\n default: {\n http: [\"https://eth.merkle.io\"]\n }\n },\n blockExplorers: {\n default: {\n name: \"Etherscan\",\n url: \"https://etherscan.io\",\n apiUrl: \"https://api.etherscan.io/api\"\n }\n },\n contracts: {\n ensUniversalResolver: {\n address: \"0xeeeeeeee14d718c2b47d9923deab1335e144eeee\",\n blockCreated: 23085558\n },\n multicall3: {\n address: \"0xca11bde05977b3631167028862be2a173976ca11\",\n blockCreated: 14353601\n }\n }\n });\n }\n });\n\n // ../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/chains/definitions/optimism.js\n var sourceId5, optimism;\n var init_optimism = __esm({\n \"../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/chains/definitions/optimism.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_chainConfig();\n init_defineChain();\n sourceId5 = 1;\n optimism = /* @__PURE__ */ defineChain({\n ...chainConfig,\n id: 10,\n name: \"OP Mainnet\",\n nativeCurrency: { name: \"Ether\", symbol: \"ETH\", decimals: 18 },\n rpcUrls: {\n default: {\n http: [\"https://mainnet.optimism.io\"]\n }\n },\n blockExplorers: {\n default: {\n name: \"Optimism Explorer\",\n url: \"https://optimistic.etherscan.io\",\n apiUrl: \"https://api-optimistic.etherscan.io/api\"\n }\n },\n contracts: {\n ...chainConfig.contracts,\n disputeGameFactory: {\n [sourceId5]: {\n address: \"0xe5965Ab5962eDc7477C8520243A95517CD252fA9\"\n }\n },\n l2OutputOracle: {\n [sourceId5]: {\n address: \"0xdfe97868233d1aa22e815a266982f2cf17685a27\"\n }\n },\n multicall3: {\n address: \"0xca11bde05977b3631167028862be2a173976ca11\",\n blockCreated: 4286263\n },\n portal: {\n [sourceId5]: {\n address: \"0xbEb5Fc579115071764c7423A4f12eDde41f106Ed\"\n }\n },\n l1StandardBridge: {\n [sourceId5]: {\n address: \"0x99C9fc46f92E8a1c0deC1b1747d010903E884bE1\"\n }\n }\n },\n sourceId: sourceId5\n });\n }\n });\n\n // ../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/chains/definitions/optimismGoerli.js\n var sourceId6, optimismGoerli;\n var init_optimismGoerli = __esm({\n \"../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/chains/definitions/optimismGoerli.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_chainConfig();\n init_defineChain();\n sourceId6 = 5;\n optimismGoerli = /* @__PURE__ */ defineChain({\n ...chainConfig,\n id: 420,\n name: \"Optimism Goerli\",\n nativeCurrency: { name: \"Goerli Ether\", symbol: \"ETH\", decimals: 18 },\n rpcUrls: {\n default: {\n http: [\"https://goerli.optimism.io\"]\n }\n },\n blockExplorers: {\n default: {\n name: \"Etherscan\",\n url: \"https://goerli-optimism.etherscan.io\",\n apiUrl: \"https://goerli-optimism.etherscan.io/api\"\n }\n },\n contracts: {\n ...chainConfig.contracts,\n l2OutputOracle: {\n [sourceId6]: {\n address: \"0xE6Dfba0953616Bacab0c9A8ecb3a9BBa77FC15c0\"\n }\n },\n multicall3: {\n address: \"0xca11bde05977b3631167028862be2a173976ca11\",\n blockCreated: 49461\n },\n portal: {\n [sourceId6]: {\n address: \"0x5b47E1A08Ea6d985D6649300584e6722Ec4B1383\"\n }\n },\n l1StandardBridge: {\n [sourceId6]: {\n address: \"0x636Af16bf2f682dD3109e60102b8E1A089FedAa8\"\n }\n }\n },\n testnet: true,\n sourceId: sourceId6\n });\n }\n });\n\n // ../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/chains/definitions/optimismSepolia.js\n var sourceId7, optimismSepolia;\n var init_optimismSepolia = __esm({\n \"../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/chains/definitions/optimismSepolia.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_chainConfig();\n init_defineChain();\n sourceId7 = 11155111;\n optimismSepolia = /* @__PURE__ */ defineChain({\n ...chainConfig,\n id: 11155420,\n name: \"OP Sepolia\",\n nativeCurrency: { name: \"Sepolia Ether\", symbol: \"ETH\", decimals: 18 },\n rpcUrls: {\n default: {\n http: [\"https://sepolia.optimism.io\"]\n }\n },\n blockExplorers: {\n default: {\n name: \"Blockscout\",\n url: \"https://optimism-sepolia.blockscout.com\",\n apiUrl: \"https://optimism-sepolia.blockscout.com/api\"\n }\n },\n contracts: {\n ...chainConfig.contracts,\n disputeGameFactory: {\n [sourceId7]: {\n address: \"0x05F9613aDB30026FFd634f38e5C4dFd30a197Fa1\"\n }\n },\n l2OutputOracle: {\n [sourceId7]: {\n address: \"0x90E9c4f8a994a250F6aEfd61CAFb4F2e895D458F\"\n }\n },\n multicall3: {\n address: \"0xca11bde05977b3631167028862be2a173976ca11\",\n blockCreated: 1620204\n },\n portal: {\n [sourceId7]: {\n address: \"0x16Fc5058F25648194471939df75CF27A2fdC48BC\"\n }\n },\n l1StandardBridge: {\n [sourceId7]: {\n address: \"0xFBb0621E0B23b5478B630BD55a5f21f67730B0F1\"\n }\n }\n },\n testnet: true,\n sourceId: sourceId7\n });\n }\n });\n\n // ../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/chains/definitions/polygon.js\n var polygon;\n var init_polygon = __esm({\n \"../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/chains/definitions/polygon.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_defineChain();\n polygon = /* @__PURE__ */ defineChain({\n id: 137,\n name: \"Polygon\",\n blockTime: 2e3,\n nativeCurrency: { name: \"POL\", symbol: \"POL\", decimals: 18 },\n rpcUrls: {\n default: {\n http: [\"https://polygon-rpc.com\"]\n }\n },\n blockExplorers: {\n default: {\n name: \"PolygonScan\",\n url: \"https://polygonscan.com\",\n apiUrl: \"https://api.polygonscan.com/api\"\n }\n },\n contracts: {\n multicall3: {\n address: \"0xca11bde05977b3631167028862be2a173976ca11\",\n blockCreated: 25770160\n }\n }\n });\n }\n });\n\n // ../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/chains/definitions/polygonAmoy.js\n var polygonAmoy;\n var init_polygonAmoy = __esm({\n \"../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/chains/definitions/polygonAmoy.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_defineChain();\n polygonAmoy = /* @__PURE__ */ defineChain({\n id: 80002,\n name: \"Polygon Amoy\",\n nativeCurrency: { name: \"POL\", symbol: \"POL\", decimals: 18 },\n rpcUrls: {\n default: {\n http: [\"https://rpc-amoy.polygon.technology\"]\n }\n },\n blockExplorers: {\n default: {\n name: \"PolygonScan\",\n url: \"https://amoy.polygonscan.com\",\n apiUrl: \"https://api-amoy.polygonscan.com/api\"\n }\n },\n contracts: {\n multicall3: {\n address: \"0xca11bde05977b3631167028862be2a173976ca11\",\n blockCreated: 3127388\n }\n },\n testnet: true\n });\n }\n });\n\n // ../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/chains/definitions/polygonMumbai.js\n var polygonMumbai;\n var init_polygonMumbai = __esm({\n \"../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/chains/definitions/polygonMumbai.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_defineChain();\n polygonMumbai = /* @__PURE__ */ defineChain({\n id: 80001,\n name: \"Polygon Mumbai\",\n nativeCurrency: { name: \"MATIC\", symbol: \"MATIC\", decimals: 18 },\n rpcUrls: {\n default: {\n http: [\"https://80001.rpc.thirdweb.com\"]\n }\n },\n blockExplorers: {\n default: {\n name: \"PolygonScan\",\n url: \"https://mumbai.polygonscan.com\",\n apiUrl: \"https://api-testnet.polygonscan.com/api\"\n }\n },\n contracts: {\n multicall3: {\n address: \"0xca11bde05977b3631167028862be2a173976ca11\",\n blockCreated: 25770160\n }\n },\n testnet: true\n });\n }\n });\n\n // ../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/chains/definitions/sepolia.js\n var sepolia;\n var init_sepolia = __esm({\n \"../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/chains/definitions/sepolia.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_defineChain();\n sepolia = /* @__PURE__ */ defineChain({\n id: 11155111,\n name: \"Sepolia\",\n nativeCurrency: { name: \"Sepolia Ether\", symbol: \"ETH\", decimals: 18 },\n rpcUrls: {\n default: {\n http: [\"https://11155111.rpc.thirdweb.com\"]\n }\n },\n blockExplorers: {\n default: {\n name: \"Etherscan\",\n url: \"https://sepolia.etherscan.io\",\n apiUrl: \"https://api-sepolia.etherscan.io/api\"\n }\n },\n contracts: {\n multicall3: {\n address: \"0xca11bde05977b3631167028862be2a173976ca11\",\n blockCreated: 751532\n },\n ensUniversalResolver: {\n address: \"0xeeeeeeee14d718c2b47d9923deab1335e144eeee\",\n blockCreated: 8928790\n }\n },\n testnet: true\n });\n }\n });\n\n // ../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/chains/definitions/zora.js\n var sourceId8, zora;\n var init_zora = __esm({\n \"../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/chains/definitions/zora.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_chainConfig();\n init_defineChain();\n sourceId8 = 1;\n zora = /* @__PURE__ */ defineChain({\n ...chainConfig,\n id: 7777777,\n name: \"Zora\",\n nativeCurrency: {\n decimals: 18,\n name: \"Ether\",\n symbol: \"ETH\"\n },\n rpcUrls: {\n default: {\n http: [\"https://rpc.zora.energy\"],\n webSocket: [\"wss://rpc.zora.energy\"]\n }\n },\n blockExplorers: {\n default: {\n name: \"Explorer\",\n url: \"https://explorer.zora.energy\",\n apiUrl: \"https://explorer.zora.energy/api\"\n }\n },\n contracts: {\n ...chainConfig.contracts,\n l2OutputOracle: {\n [sourceId8]: {\n address: \"0x9E6204F750cD866b299594e2aC9eA824E2e5f95c\"\n }\n },\n multicall3: {\n address: \"0xcA11bde05977b3631167028862bE2a173976CA11\",\n blockCreated: 5882\n },\n portal: {\n [sourceId8]: {\n address: \"0x1a0ad011913A150f69f6A19DF447A0CfD9551054\"\n }\n },\n l1StandardBridge: {\n [sourceId8]: {\n address: \"0x3e2Ea9B92B7E48A52296fD261dc26fd995284631\"\n }\n }\n },\n sourceId: sourceId8\n });\n }\n });\n\n // ../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/chains/definitions/zoraSepolia.js\n var sourceId9, zoraSepolia;\n var init_zoraSepolia = __esm({\n \"../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/chains/definitions/zoraSepolia.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_chainConfig();\n init_defineChain();\n sourceId9 = 11155111;\n zoraSepolia = /* @__PURE__ */ defineChain({\n ...chainConfig,\n id: 999999999,\n name: \"Zora Sepolia\",\n network: \"zora-sepolia\",\n nativeCurrency: {\n decimals: 18,\n name: \"Zora Sepolia\",\n symbol: \"ETH\"\n },\n rpcUrls: {\n default: {\n http: [\"https://sepolia.rpc.zora.energy\"],\n webSocket: [\"wss://sepolia.rpc.zora.energy\"]\n }\n },\n blockExplorers: {\n default: {\n name: \"Zora Sepolia Explorer\",\n url: \"https://sepolia.explorer.zora.energy/\",\n apiUrl: \"https://sepolia.explorer.zora.energy/api\"\n }\n },\n contracts: {\n ...chainConfig.contracts,\n l2OutputOracle: {\n [sourceId9]: {\n address: \"0x2615B481Bd3E5A1C0C7Ca3Da1bdc663E8615Ade9\"\n }\n },\n multicall3: {\n address: \"0xcA11bde05977b3631167028862bE2a173976CA11\",\n blockCreated: 83160\n },\n portal: {\n [sourceId9]: {\n address: \"0xeffE2C6cA9Ab797D418f0D91eA60807713f3536f\"\n }\n },\n l1StandardBridge: {\n [sourceId9]: {\n address: \"0x5376f1D543dcbB5BD416c56C189e4cB7399fCcCB\"\n }\n }\n },\n sourceId: sourceId9,\n testnet: true\n });\n }\n });\n\n // ../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/chains/index.js\n var init_chains = __esm({\n \"../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/chains/index.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_arbitrum();\n init_arbitrumGoerli();\n init_arbitrumNova();\n init_arbitrumSepolia();\n init_base3();\n init_baseGoerli();\n init_baseSepolia();\n init_fraxtal();\n init_goerli();\n init_mainnet();\n init_optimism();\n init_optimismGoerli();\n init_optimismSepolia();\n init_polygon();\n init_polygonAmoy();\n init_polygonMumbai();\n init_sepolia();\n init_zora();\n init_zoraSepolia();\n }\n });\n\n // ../../../node_modules/.pnpm/@aa-sdk+core@4.62.0_typescript@5.8.3_viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64_/node_modules/@aa-sdk/core/dist/esm/utils/defaults.js\n var minPriorityFeePerBidDefaults;\n var init_defaults = __esm({\n \"../../../node_modules/.pnpm/@aa-sdk+core@4.62.0_typescript@5.8.3_viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64_/node_modules/@aa-sdk/core/dist/esm/utils/defaults.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_chains();\n minPriorityFeePerBidDefaults = /* @__PURE__ */ new Map([\n [arbitrum.id, 10000000n],\n [arbitrumGoerli.id, 10000000n],\n [arbitrumSepolia.id, 10000000n]\n ]);\n }\n });\n\n // ../../../node_modules/.pnpm/@aa-sdk+core@4.62.0_typescript@5.8.3_viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64_/node_modules/@aa-sdk/core/dist/esm/utils/userop.js\n function isValidRequest(request) {\n return request.callGasLimit != null && request.preVerificationGas != null && request.verificationGasLimit != null && request.maxFeePerGas != null && request.maxPriorityFeePerGas != null && isValidPaymasterAndData(request) && isValidFactoryAndData(request);\n }\n function isValidPaymasterAndData(request) {\n if (\"paymasterAndData\" in request) {\n return request.paymasterAndData != null;\n }\n return allEqual(request.paymaster == null, request.paymasterData == null, request.paymasterPostOpGasLimit == null, request.paymasterVerificationGasLimit == null);\n }\n function isValidFactoryAndData(request) {\n if (\"initCode\" in request) {\n const { initCode } = request;\n return initCode != null;\n }\n return allEqual(request.factory == null, request.factoryData == null);\n }\n function applyUserOpOverride(value, override) {\n if (override == null) {\n return value;\n }\n if (isBigNumberish(override)) {\n return override;\n } else {\n return value != null ? bigIntMultiply(value, override.multiplier) : value;\n }\n }\n function applyUserOpFeeOption(value, feeOption) {\n if (feeOption == null) {\n return value;\n }\n return value != null ? bigIntClamp(feeOption.multiplier ? bigIntMultiply(value, feeOption.multiplier) : value, feeOption.min, feeOption.max) : feeOption.min ?? 0n;\n }\n function applyUserOpOverrideOrFeeOption(value, override, feeOption) {\n return value != null && override != null ? applyUserOpOverride(value, override) : applyUserOpFeeOption(value, feeOption);\n }\n var bypassPaymasterAndData;\n var init_userop = __esm({\n \"../../../node_modules/.pnpm/@aa-sdk+core@4.62.0_typescript@5.8.3_viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64_/node_modules/@aa-sdk/core/dist/esm/utils/userop.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_bigint();\n init_utils10();\n bypassPaymasterAndData = (overrides) => !!overrides && (\"paymasterAndData\" in overrides || \"paymasterData\" in overrides);\n }\n });\n\n // ../../../node_modules/.pnpm/@aa-sdk+core@4.62.0_typescript@5.8.3_viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64_/node_modules/@aa-sdk/core/dist/esm/utils/index.js\n async function resolveProperties(object2) {\n const promises = Object.keys(object2).map((key) => {\n const value = object2[key];\n return Promise.resolve(value).then((v2) => ({ key, value: v2 }));\n });\n const results = await Promise.all(promises);\n return filterUndefined(results.reduce((accum, curr) => {\n accum[curr.key] = curr.value;\n return accum;\n }, {}));\n }\n function deepHexlify(obj) {\n if (typeof obj === \"function\") {\n return void 0;\n }\n if (obj == null || typeof obj === \"string\" || typeof obj === \"boolean\") {\n return obj;\n } else if (typeof obj === \"bigint\") {\n return toHex(obj);\n } else if (obj._isBigNumber != null || typeof obj !== \"object\") {\n return toHex(obj).replace(/^0x0/, \"0x\");\n }\n if (Array.isArray(obj)) {\n return obj.map((member) => deepHexlify(member));\n }\n return Object.keys(obj).reduce((set, key) => ({\n ...set,\n [key]: deepHexlify(obj[key])\n }), {});\n }\n function filterUndefined(obj) {\n for (const key in obj) {\n if (obj[key] == null) {\n delete obj[key];\n }\n }\n return obj;\n }\n var allEqual, conditionalReturn;\n var init_utils10 = __esm({\n \"../../../node_modules/.pnpm/@aa-sdk+core@4.62.0_typescript@5.8.3_viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64_/node_modules/@aa-sdk/core/dist/esm/utils/index.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_esm();\n init_bigint();\n init_bytes3();\n init_defaults();\n init_schema();\n init_userop();\n allEqual = (...params) => {\n if (params.length === 0) {\n throw new Error(\"no values passed in\");\n }\n return params.every((v2) => v2 === params[0]);\n };\n conditionalReturn = (condition, value) => condition.then((t3) => t3 ? value() : void 0);\n }\n });\n\n // ../../../node_modules/.pnpm/@aa-sdk+core@4.62.0_typescript@5.8.3_viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64_/node_modules/@aa-sdk/core/dist/esm/actions/smartAccount/buildUserOperationFromTxs.js\n async function buildUserOperationFromTxs(client_, args) {\n const client = clientHeaderTrack(client_, \"buildUserOperationFromTxs\");\n const { account = client.account, requests, overrides, context: context2 } = args;\n if (!account) {\n throw new AccountNotFoundError2();\n }\n if (!isBaseSmartAccountClient(client)) {\n throw new IncompatibleClientError(\"BaseSmartAccountClient\", \"buildUserOperationFromTxs\", client);\n }\n const batch = requests.map((request) => {\n if (!request.to) {\n throw new TransactionMissingToParamError();\n }\n return {\n target: request.to,\n data: request.data ?? \"0x\",\n value: request.value ? fromHex(request.value, \"bigint\") : 0n\n };\n });\n const mfpgOverridesInTx = () => requests.filter((x4) => x4.maxFeePerGas != null).map((x4) => fromHex(x4.maxFeePerGas, \"bigint\"));\n const maxFeePerGas = overrides?.maxFeePerGas != null ? overrides?.maxFeePerGas : mfpgOverridesInTx().length > 0 ? bigIntMax(...mfpgOverridesInTx()) : void 0;\n const mpfpgOverridesInTx = () => requests.filter((x4) => x4.maxPriorityFeePerGas != null).map((x4) => fromHex(x4.maxPriorityFeePerGas, \"bigint\"));\n const maxPriorityFeePerGas = overrides?.maxPriorityFeePerGas != null ? overrides?.maxPriorityFeePerGas : mpfpgOverridesInTx().length > 0 ? bigIntMax(...mpfpgOverridesInTx()) : void 0;\n const _overrides = {\n maxFeePerGas,\n maxPriorityFeePerGas\n };\n const uoStruct = await buildUserOperation(client, {\n uo: batch,\n account,\n context: context2,\n overrides: _overrides\n });\n return {\n uoStruct,\n // TODO: in v4 major version update, remove these as below parameters are not needed\n batch,\n overrides: _overrides\n };\n }\n var init_buildUserOperationFromTxs = __esm({\n \"../../../node_modules/.pnpm/@aa-sdk+core@4.62.0_typescript@5.8.3_viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64_/node_modules/@aa-sdk/core/dist/esm/actions/smartAccount/buildUserOperationFromTxs.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_esm();\n init_isSmartAccountClient();\n init_account2();\n init_client();\n init_transaction3();\n init_utils10();\n init_buildUserOperation();\n init_esm6();\n }\n });\n\n // ../../../node_modules/.pnpm/@aa-sdk+core@4.62.0_typescript@5.8.3_viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64_/node_modules/@aa-sdk/core/dist/esm/actions/smartAccount/checkGasSponsorshipEligibility.js\n function checkGasSponsorshipEligibility(client_, args) {\n const client = clientHeaderTrack(client_, \"checkGasSponsorshipEligibility\");\n const { account = client.account, overrides, context: context2 } = args;\n if (!account) {\n throw new AccountNotFoundError2();\n }\n if (!isBaseSmartAccountClient(client)) {\n throw new IncompatibleClientError(\"BaseSmartAccountClient\", \"checkGasSponsorshipEligibility\", client);\n }\n return buildUserOperation(client, {\n uo: args.uo,\n account,\n overrides,\n context: context2\n }).then((userOperationStruct) => ({\n eligible: account.getEntryPoint().version === \"0.6.0\" ? userOperationStruct.paymasterAndData !== \"0x\" && userOperationStruct.paymasterAndData !== null : userOperationStruct.paymasterData !== \"0x\" && userOperationStruct.paymasterData !== null,\n request: userOperationStruct\n })).catch(() => ({\n eligible: false\n }));\n }\n var init_checkGasSponsorshipEligibility = __esm({\n \"../../../node_modules/.pnpm/@aa-sdk+core@4.62.0_typescript@5.8.3_viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64_/node_modules/@aa-sdk/core/dist/esm/actions/smartAccount/checkGasSponsorshipEligibility.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_isSmartAccountClient();\n init_account2();\n init_client();\n init_buildUserOperation();\n init_esm6();\n }\n });\n\n // ../../../node_modules/.pnpm/@aa-sdk+core@4.62.0_typescript@5.8.3_viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64_/node_modules/@aa-sdk/core/dist/esm/middleware/noopMiddleware.js\n var noopMiddleware;\n var init_noopMiddleware = __esm({\n \"../../../node_modules/.pnpm/@aa-sdk+core@4.62.0_typescript@5.8.3_viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64_/node_modules/@aa-sdk/core/dist/esm/middleware/noopMiddleware.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n noopMiddleware = async (args) => {\n return args;\n };\n }\n });\n\n // ../../../node_modules/.pnpm/@aa-sdk+core@4.62.0_typescript@5.8.3_viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64_/node_modules/@aa-sdk/core/dist/esm/actions/smartAccount/internal/runMiddlewareStack.js\n async function _runMiddlewareStack(client, args) {\n const { uo, overrides, account = client.account, context: context2 } = args;\n if (!account) {\n throw new AccountNotFoundError2();\n }\n const { dummyPaymasterAndData, paymasterAndData } = bypassPaymasterAndData(overrides) ? {\n dummyPaymasterAndData: async (uo2, { overrides: overrides2 }) => {\n return {\n ...uo2,\n ...\"paymasterAndData\" in overrides2 ? { paymasterAndData: overrides2.paymasterAndData } : \"paymasterData\" in overrides2 && \"paymaster\" in overrides2 && overrides2.paymasterData !== \"0x\" ? {\n paymasterData: overrides2.paymasterData,\n paymaster: overrides2.paymaster\n } : (\n // At this point, nothing has run so no fields are set\n // for 0.7 when not using a paymaster, all fields should be undefined\n void 0\n )\n };\n },\n paymasterAndData: noopMiddleware\n } : {\n dummyPaymasterAndData: client.middleware.dummyPaymasterAndData,\n paymasterAndData: client.middleware.paymasterAndData\n };\n const result = await asyncPipe(dummyPaymasterAndData, client.middleware.feeEstimator, client.middleware.gasEstimator, client.middleware.customMiddleware, paymasterAndData, client.middleware.userOperationSimulator)(uo, { overrides, feeOptions: client.feeOptions, account, client, context: context2 });\n return resolveProperties(result);\n }\n var asyncPipe;\n var init_runMiddlewareStack = __esm({\n \"../../../node_modules/.pnpm/@aa-sdk+core@4.62.0_typescript@5.8.3_viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64_/node_modules/@aa-sdk/core/dist/esm/actions/smartAccount/internal/runMiddlewareStack.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_account2();\n init_noopMiddleware();\n init_utils10();\n asyncPipe = (...fns) => async (s4, opts) => {\n let result = s4;\n for (const fn of fns) {\n result = await fn(result, opts);\n }\n return result;\n };\n }\n });\n\n // ../../../node_modules/.pnpm/@aa-sdk+core@4.62.0_typescript@5.8.3_viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64_/node_modules/@aa-sdk/core/dist/esm/actions/smartAccount/signUserOperation.js\n async function signUserOperation(client, args) {\n const { account = client.account, context: context2 } = args;\n if (!account) {\n throw new AccountNotFoundError2();\n }\n if (!isBaseSmartAccountClient(client)) {\n throw new IncompatibleClientError(\"BaseSmartAccountClient\", \"signUserOperation\", client);\n }\n if (!client.chain) {\n throw new ChainNotFoundError2();\n }\n return await client.middleware.signUserOperation(args.uoStruct, {\n ...args,\n account,\n client,\n context: context2\n }).then(resolveProperties).then(deepHexlify);\n }\n var init_signUserOperation = __esm({\n \"../../../node_modules/.pnpm/@aa-sdk+core@4.62.0_typescript@5.8.3_viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64_/node_modules/@aa-sdk/core/dist/esm/actions/smartAccount/signUserOperation.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_isSmartAccountClient();\n init_account2();\n init_client();\n init_utils10();\n }\n });\n\n // ../../../node_modules/.pnpm/@aa-sdk+core@4.62.0_typescript@5.8.3_viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64_/node_modules/@aa-sdk/core/dist/esm/entrypoint/0.7.js\n function packAccountGasLimits(data) {\n return concat(Object.values(data).map((v2) => pad(v2, { size: 16 })));\n }\n function packPaymasterData({ paymaster, paymasterVerificationGasLimit, paymasterPostOpGasLimit, paymasterData }) {\n if (!paymaster || !paymasterVerificationGasLimit || !paymasterPostOpGasLimit || !paymasterData) {\n return \"0x\";\n }\n return concat([\n paymaster,\n pad(paymasterVerificationGasLimit, { size: 16 }),\n pad(paymasterPostOpGasLimit, { size: 16 }),\n paymasterData\n ]);\n }\n var packUserOperation, __default;\n var init__ = __esm({\n \"../../../node_modules/.pnpm/@aa-sdk+core@4.62.0_typescript@5.8.3_viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64_/node_modules/@aa-sdk/core/dist/esm/entrypoint/0.7.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_esm();\n init_EntryPointAbi_v7();\n packUserOperation = (request) => {\n const initCode = request.factory && request.factoryData ? concat([request.factory, request.factoryData]) : \"0x\";\n const accountGasLimits = packAccountGasLimits({\n verificationGasLimit: request.verificationGasLimit,\n callGasLimit: request.callGasLimit\n });\n const gasFees = packAccountGasLimits({\n maxPriorityFeePerGas: request.maxPriorityFeePerGas,\n maxFeePerGas: request.maxFeePerGas\n });\n const paymasterAndData = request.paymaster && isAddress(request.paymaster) ? packPaymasterData({\n paymaster: request.paymaster,\n paymasterVerificationGasLimit: request.paymasterVerificationGasLimit,\n paymasterPostOpGasLimit: request.paymasterPostOpGasLimit,\n paymasterData: request.paymasterData\n }) : \"0x\";\n return encodeAbiParameters([\n { type: \"address\" },\n { type: \"uint256\" },\n { type: \"bytes32\" },\n { type: \"bytes32\" },\n { type: \"bytes32\" },\n { type: \"uint256\" },\n { type: \"bytes32\" },\n { type: \"bytes32\" }\n ], [\n request.sender,\n hexToBigInt(request.nonce),\n keccak256(initCode),\n keccak256(request.callData),\n accountGasLimits,\n hexToBigInt(request.preVerificationGas),\n gasFees,\n keccak256(paymasterAndData)\n ]);\n };\n __default = {\n version: \"0.7.0\",\n address: {\n default: \"0x0000000071727De22E5E9d8BAf0edAc6f37da032\"\n },\n abi: EntryPointAbi_v7,\n getUserOperationHash: (request, entryPointAddress, chainId) => {\n const encoded = encodeAbiParameters([{ type: \"bytes32\" }, { type: \"address\" }, { type: \"uint256\" }], [\n keccak256(packUserOperation(request)),\n entryPointAddress,\n BigInt(chainId)\n ]);\n return keccak256(encoded);\n },\n packUserOperation\n };\n }\n });\n\n // ../../../node_modules/.pnpm/@aa-sdk+core@4.62.0_typescript@5.8.3_viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64_/node_modules/@aa-sdk/core/dist/esm/actions/smartAccount/getUserOperationError.js\n async function getUserOperationError(client, request, entryPoint) {\n if (!client.account) {\n throw new AccountNotFoundError2();\n }\n const uo = deepHexlify(request);\n try {\n switch (entryPoint.version) {\n case \"0.6.0\":\n break;\n case \"0.7.0\":\n await client.simulateContract({\n address: entryPoint.address,\n abi: entryPoint.abi,\n functionName: \"handleOps\",\n args: [\n [\n {\n sender: client.account.address,\n nonce: fromHex(uo.nonce, \"bigint\"),\n initCode: uo.factory && uo.factoryData ? concat([uo.factory, uo.factoryData]) : \"0x\",\n callData: uo.callData,\n accountGasLimits: packAccountGasLimits({\n verificationGasLimit: uo.verificationGasLimit,\n callGasLimit: uo.callGasLimit\n }),\n preVerificationGas: fromHex(uo.preVerificationGas, \"bigint\"),\n gasFees: packAccountGasLimits({\n maxPriorityFeePerGas: uo.maxPriorityFeePerGas,\n maxFeePerGas: uo.maxFeePerGas\n }),\n paymasterAndData: uo.paymaster && isAddress(uo.paymaster) ? packPaymasterData({\n paymaster: uo.paymaster,\n paymasterVerificationGasLimit: uo.paymasterVerificationGasLimit,\n paymasterPostOpGasLimit: uo.paymasterPostOpGasLimit,\n paymasterData: uo.paymasterData\n }) : \"0x\",\n signature: uo.signature\n }\n ],\n client.account.address\n ]\n });\n }\n } catch (err) {\n if (err?.cause && err?.cause?.raw) {\n try {\n const { errorName, args } = decodeErrorResult({\n abi: entryPoint.abi,\n data: err.cause.raw\n });\n console.error(`Failed with '${errorName}':`);\n switch (errorName) {\n case \"FailedOpWithRevert\":\n case \"FailedOp\":\n const argsIdx = errorName === \"FailedOp\" ? 1 : 2;\n console.error(args && args[argsIdx] ? `Smart contract account reverted with error: ${args[argsIdx]}` : \"No revert data from smart contract account\");\n break;\n default:\n args && args.forEach((arg) => console.error(`\n${arg}`));\n }\n return;\n } catch (err2) {\n }\n }\n console.error(\"Entrypoint reverted with error: \");\n console.error(err);\n }\n }\n var init_getUserOperationError = __esm({\n \"../../../node_modules/.pnpm/@aa-sdk+core@4.62.0_typescript@5.8.3_viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64_/node_modules/@aa-sdk/core/dist/esm/actions/smartAccount/getUserOperationError.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_esm();\n init_account2();\n init_utils10();\n init__();\n }\n });\n\n // ../../../node_modules/.pnpm/@aa-sdk+core@4.62.0_typescript@5.8.3_viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64_/node_modules/@aa-sdk/core/dist/esm/actions/smartAccount/internal/sendUserOperation.js\n async function _sendUserOperation(client, args) {\n const { account = client.account, uoStruct, context: context2, overrides } = args;\n if (!account) {\n throw new AccountNotFoundError2();\n }\n if (!client.chain) {\n throw new ChainNotFoundError2();\n }\n const entryPoint = account.getEntryPoint();\n const request = await signUserOperation(client, {\n uoStruct,\n account,\n context: context2,\n overrides\n });\n try {\n return {\n hash: await client.sendRawUserOperation(request, entryPoint.address),\n request\n };\n } catch (err) {\n getUserOperationError(client, request, entryPoint);\n throw err;\n }\n }\n var init_sendUserOperation = __esm({\n \"../../../node_modules/.pnpm/@aa-sdk+core@4.62.0_typescript@5.8.3_viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64_/node_modules/@aa-sdk/core/dist/esm/actions/smartAccount/internal/sendUserOperation.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_account2();\n init_client();\n init_signUserOperation();\n init_getUserOperationError();\n }\n });\n\n // ../../../node_modules/.pnpm/@aa-sdk+core@4.62.0_typescript@5.8.3_viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64_/node_modules/@aa-sdk/core/dist/esm/actions/smartAccount/dropAndReplaceUserOperation.js\n async function dropAndReplaceUserOperation(client_, args) {\n const client = clientHeaderTrack(client_, \"dropAndReplaceUserOperation\");\n const { account = client.account, uoToDrop, overrides, context: context2 } = args;\n if (!account) {\n throw new AccountNotFoundError2();\n }\n if (!isBaseSmartAccountClient(client)) {\n throw new IncompatibleClientError(\"BaseSmartAccountClient\", \"dropAndReplaceUserOperation\", client);\n }\n const entryPoint = account.getEntryPoint();\n const uoToSubmit = entryPoint.version === \"0.6.0\" ? {\n initCode: uoToDrop.initCode,\n sender: uoToDrop.sender,\n nonce: uoToDrop.nonce,\n callData: uoToDrop.callData,\n signature: await account.getDummySignature()\n } : {\n ...uoToDrop.factory && uoToDrop.factoryData ? {\n factory: uoToDrop.factory,\n factoryData: uoToDrop.factoryData\n } : {},\n sender: uoToDrop.sender,\n nonce: uoToDrop.nonce,\n callData: uoToDrop.callData,\n signature: await account.getDummySignature()\n };\n const { maxFeePerGas, maxPriorityFeePerGas } = await resolveProperties(await client.middleware.feeEstimator(uoToSubmit, { account, client }));\n const _overrides = {\n ...overrides,\n maxFeePerGas: bigIntMax(BigInt(maxFeePerGas ?? 0n), bigIntMultiply(uoToDrop.maxFeePerGas, 1.1)),\n maxPriorityFeePerGas: bigIntMax(BigInt(maxPriorityFeePerGas ?? 0n), bigIntMultiply(uoToDrop.maxPriorityFeePerGas, 1.1))\n };\n const uoToSend = await _runMiddlewareStack(client, {\n uo: uoToSubmit,\n overrides: _overrides,\n account\n });\n return _sendUserOperation(client, {\n uoStruct: uoToSend,\n account,\n context: context2,\n overrides: _overrides\n });\n }\n var init_dropAndReplaceUserOperation = __esm({\n \"../../../node_modules/.pnpm/@aa-sdk+core@4.62.0_typescript@5.8.3_viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64_/node_modules/@aa-sdk/core/dist/esm/actions/smartAccount/dropAndReplaceUserOperation.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_isSmartAccountClient();\n init_account2();\n init_client();\n init_utils10();\n init_runMiddlewareStack();\n init_sendUserOperation();\n init_esm6();\n }\n });\n\n // ../../../node_modules/.pnpm/@aa-sdk+core@4.62.0_typescript@5.8.3_viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64_/node_modules/@aa-sdk/core/dist/esm/actions/smartAccount/getAddress.js\n var getAddress2;\n var init_getAddress2 = __esm({\n \"../../../node_modules/.pnpm/@aa-sdk+core@4.62.0_typescript@5.8.3_viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64_/node_modules/@aa-sdk/core/dist/esm/actions/smartAccount/getAddress.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_account2();\n getAddress2 = (client, args) => {\n const { account } = args ?? { account: client.account };\n if (!account) {\n throw new AccountNotFoundError2();\n }\n return account.address;\n };\n }\n });\n\n // ../../../node_modules/.pnpm/@aa-sdk+core@4.62.0_typescript@5.8.3_viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64_/node_modules/@aa-sdk/core/dist/esm/errors/useroperation.js\n var InvalidUserOperationError, WaitForUserOperationError;\n var init_useroperation = __esm({\n \"../../../node_modules/.pnpm/@aa-sdk+core@4.62.0_typescript@5.8.3_viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64_/node_modules/@aa-sdk/core/dist/esm/errors/useroperation.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_base2();\n InvalidUserOperationError = class extends BaseError4 {\n /**\n * Creates an instance of InvalidUserOperationError.\n *\n * InvalidUserOperationError constructor\n *\n * @param {UserOperationStruct} uo the invalid user operation struct\n */\n constructor(uo) {\n super(`Request is missing parameters. All properties on UserOperationStruct must be set. uo: ${JSON.stringify(uo, (_key, value) => typeof value === \"bigint\" ? {\n type: \"bigint\",\n value: value.toString()\n } : value, 2)}`);\n Object.defineProperty(this, \"name\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: \"InvalidUserOperationError\"\n });\n }\n };\n WaitForUserOperationError = class extends BaseError4 {\n /**\n * @param {UserOperationRequest} request the user operation request that failed\n * @param {Error} error the underlying error that caused the failure\n */\n constructor(request, error) {\n super(`Failed to find User Operation: ${error.message}`);\n Object.defineProperty(this, \"request\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: request\n });\n }\n };\n }\n });\n\n // ../../../node_modules/.pnpm/@aa-sdk+core@4.62.0_typescript@5.8.3_viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64_/node_modules/@aa-sdk/core/dist/esm/actions/smartAccount/waitForUserOperationTransacation.js\n var waitForUserOperationTransaction;\n var init_waitForUserOperationTransacation = __esm({\n \"../../../node_modules/.pnpm/@aa-sdk+core@4.62.0_typescript@5.8.3_viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64_/node_modules/@aa-sdk/core/dist/esm/actions/smartAccount/waitForUserOperationTransacation.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_isSmartAccountClient();\n init_client();\n init_transaction3();\n init_logger();\n init_esm6();\n waitForUserOperationTransaction = async (client_, args) => {\n const client = clientHeaderTrack(client_, \"waitForUserOperationTransaction\");\n if (!isBaseSmartAccountClient(client)) {\n throw new IncompatibleClientError(\"BaseSmartAccountClient\", \"waitForUserOperationTransaction\", client);\n }\n const { hash: hash3, retries = {\n maxRetries: client.txMaxRetries,\n intervalMs: client.txRetryIntervalMs,\n multiplier: client.txRetryMultiplier\n } } = args;\n for (let i3 = 0; i3 < retries.maxRetries; i3++) {\n const txRetryIntervalWithJitterMs = retries.intervalMs * Math.pow(retries.multiplier, i3) + Math.random() * 100;\n await new Promise((resolve) => setTimeout(resolve, txRetryIntervalWithJitterMs));\n const receipt = await client.getUserOperationReceipt(hash3, args.tag).catch((e3) => {\n Logger.error(`[SmartAccountProvider] waitForUserOperationTransaction error fetching receipt for ${hash3}: ${e3}`);\n });\n if (receipt) {\n return receipt?.receipt.transactionHash;\n }\n }\n throw new FailedToFindTransactionError(hash3);\n };\n }\n });\n\n // ../../../node_modules/.pnpm/@aa-sdk+core@4.62.0_typescript@5.8.3_viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64_/node_modules/@aa-sdk/core/dist/esm/actions/smartAccount/sendTransaction.js\n async function sendTransaction2(client_, args, overrides, context2) {\n const client = clientHeaderTrack(client_, \"estimateUserOperationGas\");\n const { account = client.account } = args;\n if (!account || typeof account === \"string\") {\n throw new AccountNotFoundError2();\n }\n if (!args.to) {\n throw new TransactionMissingToParamError();\n }\n if (!isBaseSmartAccountClient(client)) {\n throw new IncompatibleClientError(\"BaseSmartAccountClient\", \"sendTransaction\", client);\n }\n const uoStruct = await buildUserOperationFromTx(client, args, overrides, context2);\n const { hash: hash3, request } = await _sendUserOperation(client, {\n account,\n uoStruct,\n context: context2,\n overrides\n });\n return waitForUserOperationTransaction(client, { hash: hash3 }).catch((e3) => {\n throw new WaitForUserOperationError(request, e3);\n });\n }\n var init_sendTransaction2 = __esm({\n \"../../../node_modules/.pnpm/@aa-sdk+core@4.62.0_typescript@5.8.3_viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64_/node_modules/@aa-sdk/core/dist/esm/actions/smartAccount/sendTransaction.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_isSmartAccountClient();\n init_account2();\n init_client();\n init_transaction3();\n init_useroperation();\n init_buildUserOperationFromTx();\n init_sendUserOperation();\n init_waitForUserOperationTransacation();\n init_esm6();\n }\n });\n\n // ../../../node_modules/.pnpm/@aa-sdk+core@4.62.0_typescript@5.8.3_viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64_/node_modules/@aa-sdk/core/dist/esm/actions/smartAccount/sendTransactions.js\n async function sendTransactions(client_, args) {\n const client = clientHeaderTrack(client_, \"estimateUserOperationGas\");\n const { requests, overrides, account = client.account, context: context2 } = args;\n if (!account) {\n throw new AccountNotFoundError2();\n }\n if (!isBaseSmartAccountClient(client)) {\n throw new IncompatibleClientError(\"BaseSmartAccountClient\", \"sendTransactions\", client);\n }\n const { uoStruct } = await buildUserOperationFromTxs(client, {\n requests,\n overrides,\n account,\n context: context2\n });\n const { hash: hash3, request } = await _sendUserOperation(client, {\n account,\n uoStruct,\n context: context2,\n overrides\n });\n return waitForUserOperationTransaction(client, { hash: hash3 }).catch((e3) => {\n throw new WaitForUserOperationError(request, e3);\n });\n }\n var init_sendTransactions = __esm({\n \"../../../node_modules/.pnpm/@aa-sdk+core@4.62.0_typescript@5.8.3_viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64_/node_modules/@aa-sdk/core/dist/esm/actions/smartAccount/sendTransactions.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_isSmartAccountClient();\n init_account2();\n init_client();\n init_useroperation();\n init_buildUserOperationFromTxs();\n init_sendUserOperation();\n init_waitForUserOperationTransacation();\n init_esm6();\n }\n });\n\n // ../../../node_modules/.pnpm/@aa-sdk+core@4.62.0_typescript@5.8.3_viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64_/node_modules/@aa-sdk/core/dist/esm/actions/smartAccount/sendUserOperation.js\n async function sendUserOperation(client_, args) {\n const client = clientHeaderTrack(client_, \"sendUserOperation\");\n const { account = client.account, context: context2, overrides } = args;\n if (!account) {\n throw new AccountNotFoundError2();\n }\n if (!isBaseSmartAccountClient(client)) {\n throw new IncompatibleClientError(\"BaseSmartAccountClient\", \"sendUserOperation\", client);\n }\n const uoStruct = await buildUserOperation(client, {\n uo: args.uo,\n account,\n context: context2,\n overrides\n });\n return _sendUserOperation(client, {\n account,\n uoStruct,\n context: context2,\n overrides\n });\n }\n var init_sendUserOperation2 = __esm({\n \"../../../node_modules/.pnpm/@aa-sdk+core@4.62.0_typescript@5.8.3_viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64_/node_modules/@aa-sdk/core/dist/esm/actions/smartAccount/sendUserOperation.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_isSmartAccountClient();\n init_account2();\n init_client();\n init_buildUserOperation();\n init_sendUserOperation();\n init_esm6();\n }\n });\n\n // ../../../node_modules/.pnpm/@aa-sdk+core@4.62.0_typescript@5.8.3_viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64_/node_modules/@aa-sdk/core/dist/esm/actions/smartAccount/signMessage.js\n var signMessage2;\n var init_signMessage2 = __esm({\n \"../../../node_modules/.pnpm/@aa-sdk+core@4.62.0_typescript@5.8.3_viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64_/node_modules/@aa-sdk/core/dist/esm/actions/smartAccount/signMessage.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_account2();\n signMessage2 = async (client, { account = client.account, message }) => {\n if (!account) {\n throw new AccountNotFoundError2();\n }\n return account.signMessageWith6492({ message });\n };\n }\n });\n\n // ../../../node_modules/.pnpm/@aa-sdk+core@4.62.0_typescript@5.8.3_viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64_/node_modules/@aa-sdk/core/dist/esm/actions/smartAccount/signTypedData.js\n var signTypedData2;\n var init_signTypedData2 = __esm({\n \"../../../node_modules/.pnpm/@aa-sdk+core@4.62.0_typescript@5.8.3_viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64_/node_modules/@aa-sdk/core/dist/esm/actions/smartAccount/signTypedData.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_account2();\n signTypedData2 = async (client, { account = client.account, typedData }) => {\n if (!account) {\n throw new AccountNotFoundError2();\n }\n return account.signTypedDataWith6492(typedData);\n };\n }\n });\n\n // ../../../node_modules/.pnpm/@aa-sdk+core@4.62.0_typescript@5.8.3_viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64_/node_modules/@aa-sdk/core/dist/esm/actions/smartAccount/upgradeAccount.js\n var upgradeAccount;\n var init_upgradeAccount = __esm({\n \"../../../node_modules/.pnpm/@aa-sdk+core@4.62.0_typescript@5.8.3_viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64_/node_modules/@aa-sdk/core/dist/esm/actions/smartAccount/upgradeAccount.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_isSmartAccountClient();\n init_account2();\n init_client();\n init_sendUserOperation2();\n init_waitForUserOperationTransacation();\n init_esm6();\n upgradeAccount = async (client_, args) => {\n const client = clientHeaderTrack(client_, \"upgradeAccount\");\n const { account = client.account, upgradeTo, overrides, waitForTx, context: context2 } = args;\n if (!account) {\n throw new AccountNotFoundError2();\n }\n if (!isBaseSmartAccountClient(client)) {\n throw new IncompatibleClientError(\"BaseSmartAccountClient\", \"upgradeAccount\", client);\n }\n const { implAddress: accountImplAddress, initializationData } = upgradeTo;\n const encodeUpgradeData = await account.encodeUpgradeToAndCall({\n upgradeToAddress: accountImplAddress,\n upgradeToInitData: initializationData\n });\n const result = await sendUserOperation(client, {\n uo: {\n target: account.address,\n data: encodeUpgradeData\n },\n account,\n overrides,\n context: context2\n });\n let hash3 = result.hash;\n if (waitForTx) {\n hash3 = await waitForUserOperationTransaction(client, result);\n }\n return hash3;\n };\n }\n });\n\n // ../../../node_modules/.pnpm/@aa-sdk+core@4.62.0_typescript@5.8.3_viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64_/node_modules/@aa-sdk/core/dist/esm/client/decorators/smartAccountClient.js\n var smartAccountClientActions, smartAccountClientMethodKeys;\n var init_smartAccountClient = __esm({\n \"../../../node_modules/.pnpm/@aa-sdk+core@4.62.0_typescript@5.8.3_viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64_/node_modules/@aa-sdk/core/dist/esm/client/decorators/smartAccountClient.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_buildUserOperation();\n init_buildUserOperationFromTx();\n init_buildUserOperationFromTxs();\n init_checkGasSponsorshipEligibility();\n init_dropAndReplaceUserOperation();\n init_getAddress2();\n init_sendTransaction2();\n init_sendTransactions();\n init_sendUserOperation2();\n init_signMessage2();\n init_signTypedData2();\n init_signUserOperation();\n init_upgradeAccount();\n init_waitForUserOperationTransacation();\n smartAccountClientActions = (client) => ({\n buildUserOperation: (args) => buildUserOperation(client, args),\n buildUserOperationFromTx: (args, overrides, context2) => buildUserOperationFromTx(client, args, overrides, context2),\n buildUserOperationFromTxs: (args) => buildUserOperationFromTxs(client, args),\n checkGasSponsorshipEligibility: (args) => checkGasSponsorshipEligibility(client, args),\n signUserOperation: (args) => signUserOperation(client, args),\n dropAndReplaceUserOperation: (args) => dropAndReplaceUserOperation(client, args),\n sendTransaction: (args, overrides, context2) => sendTransaction2(client, args, overrides, context2),\n sendTransactions: (args) => sendTransactions(client, args),\n sendUserOperation: (args) => sendUserOperation(client, args),\n waitForUserOperationTransaction: (args) => waitForUserOperationTransaction.bind(client)(client, args),\n upgradeAccount: (args) => upgradeAccount(client, args),\n getAddress: (args) => getAddress2(client, args),\n signMessage: (args) => signMessage2(client, args),\n signTypedData: (args) => signTypedData2(client, args)\n });\n smartAccountClientMethodKeys = Object.keys(\n // @ts-expect-error we just want to get the keys\n smartAccountClientActions(void 0)\n ).reduce((accum, curr) => {\n accum.add(curr);\n return accum;\n }, /* @__PURE__ */ new Set());\n }\n });\n\n // ../../../node_modules/.pnpm/@aa-sdk+core@4.62.0_typescript@5.8.3_viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64_/node_modules/@aa-sdk/core/dist/esm/client/isSmartAccountClient.js\n function isSmartAccountClient(client) {\n for (const key of smartAccountClientMethodKeys) {\n if (!(key in client)) {\n return false;\n }\n }\n return client && \"middleware\" in client;\n }\n function isBaseSmartAccountClient(client) {\n return client && \"middleware\" in client;\n }\n var init_isSmartAccountClient = __esm({\n \"../../../node_modules/.pnpm/@aa-sdk+core@4.62.0_typescript@5.8.3_viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64_/node_modules/@aa-sdk/core/dist/esm/client/isSmartAccountClient.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_smartAccountClient();\n }\n });\n\n // ../../../node_modules/.pnpm/@aa-sdk+core@4.62.0_typescript@5.8.3_viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64_/node_modules/@aa-sdk/core/dist/esm/actions/smartAccount/internal/initUserOperation.js\n async function _initUserOperation(client, args) {\n const { account = client.account, uo, overrides } = args;\n if (!account) {\n throw new AccountNotFoundError2();\n }\n if (!client.chain) {\n throw new ChainNotFoundError2();\n }\n const entryPoint = account.getEntryPoint();\n const callData = Array.isArray(uo) ? account.encodeBatchExecute(uo) : typeof uo === \"string\" ? uo : account.encodeExecute(uo);\n const signature = account.getDummySignature();\n const nonce = overrides?.nonce ?? account.getAccountNonce(overrides?.nonceKey);\n const struct = entryPoint.version === \"0.6.0\" ? {\n initCode: account.getInitCode(),\n sender: account.address,\n nonce,\n callData,\n signature\n } : {\n factory: conditionalReturn(account.isAccountDeployed().then((deployed) => !deployed), account.getFactoryAddress),\n factoryData: conditionalReturn(account.isAccountDeployed().then((deployed) => !deployed), account.getFactoryData),\n sender: account.address,\n nonce,\n callData,\n signature\n };\n return struct;\n }\n var init_initUserOperation = __esm({\n \"../../../node_modules/.pnpm/@aa-sdk+core@4.62.0_typescript@5.8.3_viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64_/node_modules/@aa-sdk/core/dist/esm/actions/smartAccount/internal/initUserOperation.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_account2();\n init_client();\n init_utils10();\n }\n });\n\n // ../../../node_modules/.pnpm/@aa-sdk+core@4.62.0_typescript@5.8.3_viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64_/node_modules/@aa-sdk/core/dist/esm/client/addBreadcrumb.js\n function hasAddBreadcrumb(a3) {\n return ADD_BREADCRUMB in a3;\n }\n function clientHeaderTrack(client, crumb) {\n if (hasAddBreadcrumb(client)) {\n return client[ADD_BREADCRUMB](crumb);\n }\n return client;\n }\n var ADD_BREADCRUMB;\n var init_addBreadcrumb = __esm({\n \"../../../node_modules/.pnpm/@aa-sdk+core@4.62.0_typescript@5.8.3_viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64_/node_modules/@aa-sdk/core/dist/esm/client/addBreadcrumb.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n ADD_BREADCRUMB = Symbol(\"addBreadcrumb\");\n }\n });\n\n // ../../../node_modules/.pnpm/@aa-sdk+core@4.62.0_typescript@5.8.3_viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64_/node_modules/@aa-sdk/core/dist/esm/actions/smartAccount/buildUserOperation.js\n async function buildUserOperation(client_, args) {\n const client = clientHeaderTrack(client_, USER_OPERATION_METHOD);\n const { account = client.account, overrides, context: context2 } = args;\n if (!account) {\n throw new AccountNotFoundError2();\n }\n if (!isBaseSmartAccountClient(client)) {\n throw new IncompatibleClientError(\"BaseSmartAccountClient\", USER_OPERATION_METHOD, client);\n }\n return _initUserOperation(client, args).then((_uo) => _runMiddlewareStack(client, {\n uo: _uo,\n overrides,\n account,\n context: context2\n }));\n }\n var USER_OPERATION_METHOD;\n var init_buildUserOperation = __esm({\n \"../../../node_modules/.pnpm/@aa-sdk+core@4.62.0_typescript@5.8.3_viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64_/node_modules/@aa-sdk/core/dist/esm/actions/smartAccount/buildUserOperation.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_isSmartAccountClient();\n init_account2();\n init_client();\n init_initUserOperation();\n init_runMiddlewareStack();\n init_addBreadcrumb();\n USER_OPERATION_METHOD = \"buildUserOperation\";\n }\n });\n\n // ../../../node_modules/.pnpm/@aa-sdk+core@4.62.0_typescript@5.8.3_viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64_/node_modules/@aa-sdk/core/dist/esm/client/schema.js\n var ConnectionConfigSchema, UserOperationFeeOptionsFieldSchema, UserOperationFeeOptionsSchema_v6, UserOperationFeeOptionsSchema_v7, UserOperationFeeOptionsSchema, SmartAccountClientOptsSchema;\n var init_schema2 = __esm({\n \"../../../node_modules/.pnpm/@aa-sdk+core@4.62.0_typescript@5.8.3_viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64_/node_modules/@aa-sdk/core/dist/esm/client/schema.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_esm5();\n init_utils10();\n ConnectionConfigSchema = external_exports.intersection(external_exports.union([\n external_exports.object({\n rpcUrl: external_exports.never().optional(),\n apiKey: external_exports.string(),\n jwt: external_exports.never().optional()\n }),\n external_exports.object({\n rpcUrl: external_exports.never().optional(),\n apiKey: external_exports.never().optional(),\n jwt: external_exports.string()\n }),\n external_exports.object({\n rpcUrl: external_exports.string(),\n apiKey: external_exports.never().optional(),\n jwt: external_exports.never().optional()\n }),\n external_exports.object({\n rpcUrl: external_exports.string(),\n apiKey: external_exports.never().optional(),\n jwt: external_exports.string()\n })\n ]), external_exports.object({\n chainAgnosticUrl: external_exports.string().optional()\n }));\n UserOperationFeeOptionsFieldSchema = BigNumberishRangeSchema.merge(MultiplierSchema).partial();\n UserOperationFeeOptionsSchema_v6 = external_exports.object({\n maxFeePerGas: UserOperationFeeOptionsFieldSchema,\n maxPriorityFeePerGas: UserOperationFeeOptionsFieldSchema,\n callGasLimit: UserOperationFeeOptionsFieldSchema,\n verificationGasLimit: UserOperationFeeOptionsFieldSchema,\n preVerificationGas: UserOperationFeeOptionsFieldSchema\n }).partial().strict();\n UserOperationFeeOptionsSchema_v7 = UserOperationFeeOptionsSchema_v6.extend({\n paymasterVerificationGasLimit: UserOperationFeeOptionsFieldSchema,\n paymasterPostOpGasLimit: UserOperationFeeOptionsFieldSchema\n }).partial().strict();\n UserOperationFeeOptionsSchema = UserOperationFeeOptionsSchema_v7;\n SmartAccountClientOptsSchema = external_exports.object({\n /**\n * The maximum number of times to try fetching a transaction receipt before giving up (default: 5)\n */\n txMaxRetries: external_exports.number().min(0).optional().default(5),\n /**\n * The interval in milliseconds to wait between retries while waiting for tx receipts (default: 2_000)\n */\n txRetryIntervalMs: external_exports.number().min(0).optional().default(2e3),\n /**\n * The multiplier on interval length to wait between retries while waiting for tx receipts (default: 1.5)\n */\n txRetryMultiplier: external_exports.number().min(0).optional().default(1.5),\n /**\n * Optional user operation fee options to be set globally at the provider level\n */\n feeOptions: UserOperationFeeOptionsSchema.optional()\n }).strict();\n }\n });\n\n // ../../../node_modules/.pnpm/@aa-sdk+core@4.62.0_typescript@5.8.3_viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64_/node_modules/@aa-sdk/core/dist/esm/middleware/defaults/feeEstimator.js\n function defaultFeeEstimator(client) {\n return async (struct, { overrides, feeOptions }) => {\n const feeData = await client.estimateFeesPerGas();\n if (!feeData.maxFeePerGas || feeData.maxPriorityFeePerGas == null) {\n throw new Error(\"feeData is missing maxFeePerGas or maxPriorityFeePerGas\");\n }\n let maxPriorityFeePerGas = await client.estimateMaxPriorityFeePerGas();\n maxPriorityFeePerGas = applyUserOpOverrideOrFeeOption(maxPriorityFeePerGas, overrides?.maxPriorityFeePerGas, feeOptions?.maxPriorityFeePerGas);\n let maxFeePerGas = feeData.maxFeePerGas - feeData.maxPriorityFeePerGas + BigInt(maxPriorityFeePerGas);\n maxFeePerGas = applyUserOpOverrideOrFeeOption(maxFeePerGas, overrides?.maxFeePerGas, feeOptions?.maxFeePerGas);\n struct.maxFeePerGas = maxFeePerGas;\n struct.maxPriorityFeePerGas = maxPriorityFeePerGas;\n return struct;\n };\n }\n var init_feeEstimator = __esm({\n \"../../../node_modules/.pnpm/@aa-sdk+core@4.62.0_typescript@5.8.3_viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64_/node_modules/@aa-sdk/core/dist/esm/middleware/defaults/feeEstimator.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_utils10();\n }\n });\n\n // ../../../node_modules/.pnpm/@aa-sdk+core@4.62.0_typescript@5.8.3_viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64_/node_modules/@aa-sdk/core/dist/esm/middleware/defaults/gasEstimator.js\n var defaultGasEstimator;\n var init_gasEstimator = __esm({\n \"../../../node_modules/.pnpm/@aa-sdk+core@4.62.0_typescript@5.8.3_viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64_/node_modules/@aa-sdk/core/dist/esm/middleware/defaults/gasEstimator.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_utils10();\n init_userop();\n defaultGasEstimator = (client) => async (struct, { account, overrides, feeOptions }) => {\n const request = deepHexlify(await resolveProperties(struct));\n const estimates = await client.estimateUserOperationGas(request, account.getEntryPoint().address, overrides?.stateOverride);\n const callGasLimit = applyUserOpOverrideOrFeeOption(estimates.callGasLimit, overrides?.callGasLimit, feeOptions?.callGasLimit);\n const verificationGasLimit = applyUserOpOverrideOrFeeOption(estimates.verificationGasLimit, overrides?.verificationGasLimit, feeOptions?.verificationGasLimit);\n const preVerificationGas = applyUserOpOverrideOrFeeOption(estimates.preVerificationGas, overrides?.preVerificationGas, feeOptions?.preVerificationGas);\n struct.callGasLimit = callGasLimit;\n struct.verificationGasLimit = verificationGasLimit;\n struct.preVerificationGas = preVerificationGas;\n const entryPoint = account.getEntryPoint();\n if (entryPoint.version === \"0.7.0\") {\n const paymasterVerificationGasLimit = applyUserOpOverrideOrFeeOption(estimates.paymasterVerificationGasLimit, overrides?.paymasterVerificationGasLimit, feeOptions?.paymasterVerificationGasLimit);\n const uo_v7 = struct;\n uo_v7.paymasterVerificationGasLimit = paymasterVerificationGasLimit;\n uo_v7.paymasterPostOpGasLimit = uo_v7.paymasterPostOpGasLimit ?? (uo_v7.paymaster ? \"0x0\" : void 0);\n }\n return struct;\n };\n }\n });\n\n // ../../../node_modules/.pnpm/@aa-sdk+core@4.62.0_typescript@5.8.3_viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64_/node_modules/@aa-sdk/core/dist/esm/middleware/defaults/paymasterAndData.js\n var defaultPaymasterAndData;\n var init_paymasterAndData = __esm({\n \"../../../node_modules/.pnpm/@aa-sdk+core@4.62.0_typescript@5.8.3_viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64_/node_modules/@aa-sdk/core/dist/esm/middleware/defaults/paymasterAndData.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n defaultPaymasterAndData = async (struct, { account }) => {\n const entryPoint = account.getEntryPoint();\n if (entryPoint.version === \"0.6.0\") {\n struct.paymasterAndData = \"0x\";\n }\n return struct;\n };\n }\n });\n\n // ../../../node_modules/.pnpm/@aa-sdk+core@4.62.0_typescript@5.8.3_viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64_/node_modules/@aa-sdk/core/dist/esm/middleware/defaults/userOpSigner.js\n var defaultUserOpSigner;\n var init_userOpSigner = __esm({\n \"../../../node_modules/.pnpm/@aa-sdk+core@4.62.0_typescript@5.8.3_viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64_/node_modules/@aa-sdk/core/dist/esm/middleware/defaults/userOpSigner.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_account2();\n init_client();\n init_useroperation();\n init_utils10();\n defaultUserOpSigner = async (struct, { client, account = client.account }) => {\n if (!account) {\n throw new AccountNotFoundError2();\n }\n if (!client?.chain) {\n throw new ChainNotFoundError2();\n }\n const resolvedStruct = await resolveProperties(struct);\n const request = deepHexlify(resolvedStruct);\n if (!isValidRequest(request)) {\n throw new InvalidUserOperationError(resolvedStruct);\n }\n return {\n ...resolvedStruct,\n signature: await account.signUserOperationHash(account.getEntryPoint().getUserOperationHash(request))\n };\n };\n }\n });\n\n // ../../../node_modules/.pnpm/@aa-sdk+core@4.62.0_typescript@5.8.3_viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64_/node_modules/@aa-sdk/core/dist/esm/middleware/actions.js\n var middlewareActions;\n var init_actions = __esm({\n \"../../../node_modules/.pnpm/@aa-sdk+core@4.62.0_typescript@5.8.3_viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64_/node_modules/@aa-sdk/core/dist/esm/middleware/actions.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_feeEstimator();\n init_gasEstimator();\n init_paymasterAndData();\n init_userOpSigner();\n init_noopMiddleware();\n middlewareActions = (overrides) => (client) => ({\n middleware: {\n customMiddleware: overrides.customMiddleware ?? noopMiddleware,\n dummyPaymasterAndData: overrides.dummyPaymasterAndData ?? defaultPaymasterAndData,\n feeEstimator: overrides.feeEstimator ?? defaultFeeEstimator(client),\n gasEstimator: overrides.gasEstimator ?? defaultGasEstimator(client),\n paymasterAndData: overrides.paymasterAndData ?? defaultPaymasterAndData,\n userOperationSimulator: overrides.userOperationSimulator ?? noopMiddleware,\n signUserOperation: overrides.signUserOperation ?? defaultUserOpSigner\n }\n });\n }\n });\n\n // ../../../node_modules/.pnpm/@aa-sdk+core@4.62.0_typescript@5.8.3_viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64_/node_modules/@aa-sdk/core/dist/esm/client/smartAccountClient.js\n function createSmartAccountClient(config2) {\n const { key = \"account\", name = \"account provider\", transport, type = \"SmartAccountClient\", addBreadCrumb, ...params } = config2;\n const client = createBundlerClient({\n ...params,\n key,\n name,\n // we start out with this because the base methods for a SmartAccountClient\n // require a smart account client, but once we have completed building everything\n // we want to override this value with the one passed in by the extender\n type: \"SmartAccountClient\",\n // TODO: this needs to be tested\n transport: (opts) => {\n const rpcTransport = transport(opts);\n return custom(\n {\n name: \"SmartAccountClientTransport\",\n async request({ method, params: params2 }) {\n switch (method) {\n case \"eth_accounts\": {\n if (!client.account) {\n throw new AccountNotFoundError2();\n }\n return [client.account.address];\n }\n case \"eth_sendTransaction\":\n if (!client.account) {\n throw new AccountNotFoundError2();\n }\n if (!client.chain) {\n throw new ChainNotFoundError2();\n }\n const [tx] = params2;\n return client.sendTransaction({\n ...tx,\n account: client.account,\n chain: client.chain\n });\n case \"eth_sign\":\n if (!client.account) {\n throw new AccountNotFoundError2();\n }\n const [address, data] = params2;\n if (address?.toLowerCase() !== client.account.address.toLowerCase()) {\n throw new Error(\"cannot sign for address that is not the current account\");\n }\n return client.signMessage({\n message: data,\n account: client.account\n });\n case \"personal_sign\": {\n if (!client.account) {\n throw new AccountNotFoundError2();\n }\n const [data2, address2] = params2;\n if (address2?.toLowerCase() !== client.account.address.toLowerCase()) {\n throw new Error(\"cannot sign for address that is not the current account\");\n }\n return client.signMessage({\n message: data2,\n account: client.account\n });\n }\n case \"eth_signTypedData_v4\": {\n if (!client.account) {\n throw new AccountNotFoundError2();\n }\n const [address2, dataParams] = params2;\n if (address2?.toLowerCase() !== client.account.address.toLowerCase()) {\n throw new Error(\"cannot sign for address that is not the current account\");\n }\n try {\n return client.signTypedData({\n account: client.account,\n typedData: typeof dataParams === \"string\" ? JSON.parse(dataParams) : dataParams\n });\n } catch {\n throw new Error(\"invalid JSON data params\");\n }\n }\n case \"eth_chainId\":\n if (!opts.chain) {\n throw new ChainNotFoundError2();\n }\n return opts.chain.id;\n default:\n return rpcTransport.request(\n { method, params: params2 },\n // Retry count must be 0 here in order to respect the retry\n // count that is already specified on the underlying transport.\n { retryCount: 0 }\n );\n }\n }\n },\n // Retry count must be 0 here in order to respect the retry\n // count that is already specified on the underlying transport.\n { retryCount: 0 }\n )(opts);\n }\n }).extend(() => {\n const addBreadCrumbs = addBreadCrumb ? {\n [ADD_BREADCRUMB]: addBreadCrumb\n } : {};\n return {\n ...SmartAccountClientOptsSchema.parse(config2.opts ?? {}),\n ...addBreadCrumbs\n };\n }).extend(middlewareActions(config2)).extend(smartAccountClientActions);\n return { ...client, type };\n }\n var init_smartAccountClient2 = __esm({\n \"../../../node_modules/.pnpm/@aa-sdk+core@4.62.0_typescript@5.8.3_viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64_/node_modules/@aa-sdk/core/dist/esm/client/smartAccountClient.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_esm();\n init_esm5();\n init_account2();\n init_client();\n init_actions();\n init_bundlerClient2();\n init_smartAccountClient();\n init_schema2();\n init_addBreadcrumb();\n }\n });\n\n // ../../../node_modules/.pnpm/@aa-sdk+core@4.62.0_typescript@5.8.3_viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64_/node_modules/@aa-sdk/core/dist/esm/entrypoint/0.6.js\n var packUserOperation2, __default2;\n var init__2 = __esm({\n \"../../../node_modules/.pnpm/@aa-sdk+core@4.62.0_typescript@5.8.3_viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64_/node_modules/@aa-sdk/core/dist/esm/entrypoint/0.6.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_esm();\n init_EntryPointAbi_v6();\n packUserOperation2 = (request) => {\n const hashedInitCode = keccak256(request.initCode);\n const hashedCallData = keccak256(request.callData);\n const hashedPaymasterAndData = keccak256(request.paymasterAndData);\n return encodeAbiParameters([\n { type: \"address\" },\n { type: \"uint256\" },\n { type: \"bytes32\" },\n { type: \"bytes32\" },\n { type: \"uint256\" },\n { type: \"uint256\" },\n { type: \"uint256\" },\n { type: \"uint256\" },\n { type: \"uint256\" },\n { type: \"bytes32\" }\n ], [\n request.sender,\n hexToBigInt(request.nonce),\n hashedInitCode,\n hashedCallData,\n hexToBigInt(request.callGasLimit),\n hexToBigInt(request.verificationGasLimit),\n hexToBigInt(request.preVerificationGas),\n hexToBigInt(request.maxFeePerGas),\n hexToBigInt(request.maxPriorityFeePerGas),\n hashedPaymasterAndData\n ]);\n };\n __default2 = {\n version: \"0.6.0\",\n address: {\n default: \"0x5FF137D4b0FDCD49DcA30c7CF57E578a026d2789\"\n },\n abi: EntryPointAbi_v6,\n getUserOperationHash: (request, entryPointAddress, chainId) => {\n const encoded = encodeAbiParameters([{ type: \"bytes32\" }, { type: \"address\" }, { type: \"uint256\" }], [\n keccak256(packUserOperation2(request)),\n entryPointAddress,\n BigInt(chainId)\n ]);\n return keccak256(encoded);\n },\n packUserOperation: packUserOperation2\n };\n }\n });\n\n // ../../../node_modules/.pnpm/@aa-sdk+core@4.62.0_typescript@5.8.3_viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64_/node_modules/@aa-sdk/core/dist/esm/entrypoint/index.js\n function getEntryPoint(chain2, options) {\n const { version: version6 = defaultEntryPointVersion, addressOverride } = options ?? {\n version: defaultEntryPointVersion\n };\n const entryPoint = entryPointRegistry[version6 ?? defaultEntryPointVersion];\n const address = addressOverride ?? entryPoint.address[chain2.id] ?? entryPoint.address.default;\n if (!address) {\n throw new EntryPointNotFoundError(chain2, version6);\n }\n if (entryPoint.version === \"0.6.0\") {\n return {\n version: entryPoint.version,\n address,\n chain: chain2,\n abi: entryPoint.abi,\n getUserOperationHash: (r2) => entryPoint.getUserOperationHash(r2, address, chain2.id),\n packUserOperation: entryPoint.packUserOperation\n };\n } else if (entryPoint.version === \"0.7.0\") {\n return {\n version: entryPoint.version,\n address,\n chain: chain2,\n abi: entryPoint.abi,\n getUserOperationHash: (r2) => entryPoint.getUserOperationHash(r2, address, chain2.id),\n packUserOperation: entryPoint.packUserOperation\n };\n }\n throw new EntryPointNotFoundError(chain2, version6);\n }\n var defaultEntryPointVersion, entryPointRegistry;\n var init_entrypoint2 = __esm({\n \"../../../node_modules/.pnpm/@aa-sdk+core@4.62.0_typescript@5.8.3_viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64_/node_modules/@aa-sdk/core/dist/esm/entrypoint/index.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_entrypoint();\n init__2();\n init__();\n defaultEntryPointVersion = \"0.6.0\";\n entryPointRegistry = {\n \"0.6.0\": __default2,\n \"0.7.0\": __default\n };\n }\n });\n\n // ../../../node_modules/.pnpm/@aa-sdk+core@4.62.0_typescript@5.8.3_viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64_/node_modules/@aa-sdk/core/dist/esm/middleware/defaults/7702signer.js\n var default7702UserOpSigner;\n var init_signer = __esm({\n \"../../../node_modules/.pnpm/@aa-sdk+core@4.62.0_typescript@5.8.3_viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64_/node_modules/@aa-sdk/core/dist/esm/middleware/defaults/7702signer.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_esm();\n init_smartContractAccount();\n init_account2();\n init_client();\n init_userOpSigner();\n default7702UserOpSigner = (userOpSigner) => async (struct, params) => {\n const userOpSigner_ = userOpSigner ?? defaultUserOpSigner;\n const uo = await userOpSigner_({\n ...struct,\n // Strip out the dummy eip7702 fields.\n eip7702Auth: void 0\n }, params);\n const account = params.account ?? params.client.account;\n const { client } = params;\n if (!account || !isSmartAccountWithSigner(account)) {\n throw new AccountNotFoundError2();\n }\n const signer = account.getSigner();\n if (!signer.signAuthorization) {\n return uo;\n }\n if (!client.chain) {\n throw new ChainNotFoundError2();\n }\n const code = await client.getCode({ address: account.address }) ?? \"0x\";\n const implAddress = await account.getImplementationAddress();\n const expectedCode = \"0xef0100\" + implAddress.slice(2);\n if (code.toLowerCase() === expectedCode.toLowerCase()) {\n return uo;\n }\n const accountNonce = await params.client.getTransactionCount({\n address: account.address\n });\n const authSignature = await signer.signAuthorization({\n chainId: client.chain.id,\n contractAddress: implAddress,\n nonce: accountNonce\n });\n const { r: r2, s: s4 } = authSignature;\n const yParity = authSignature.yParity ?? authSignature.v - 27n;\n return {\n ...uo,\n eip7702Auth: {\n // deepHexlify doesn't encode number(0) correctly, it returns \"0x\"\n chainId: toHex(client.chain.id),\n nonce: toHex(accountNonce),\n address: implAddress,\n r: r2,\n s: s4,\n yParity: toHex(yParity)\n }\n };\n };\n }\n });\n\n // ../../../node_modules/.pnpm/@aa-sdk+core@4.62.0_typescript@5.8.3_viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64_/node_modules/@aa-sdk/core/dist/esm/middleware/defaults/7702gasEstimator.js\n var default7702GasEstimator;\n var init_gasEstimator2 = __esm({\n \"../../../node_modules/.pnpm/@aa-sdk+core@4.62.0_typescript@5.8.3_viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64_/node_modules/@aa-sdk/core/dist/esm/middleware/defaults/7702gasEstimator.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_esm();\n init_account2();\n init_gasEstimator();\n default7702GasEstimator = (gasEstimator) => async (struct, params) => {\n const gasEstimator_ = gasEstimator ?? defaultGasEstimator(params.client);\n const account = params.account ?? params.client.account;\n if (!account) {\n throw new AccountNotFoundError2();\n }\n const entryPoint = account.getEntryPoint();\n if (entryPoint.version !== \"0.7.0\") {\n throw new Error(\"This middleware is only compatible with EntryPoint v0.7.0\");\n }\n const [implementationAddress, code = \"0x\"] = await Promise.all([\n account.getImplementationAddress(),\n params.client.getCode({ address: params.account.address })\n ]);\n const isAlreadyDelegated = code.toLowerCase() === concatHex([\"0xef0100\", implementationAddress]);\n if (!isAlreadyDelegated) {\n struct.eip7702Auth = {\n chainId: numberToHex(params.client.chain?.id ?? 0),\n nonce: numberToHex(await params.client.getTransactionCount({\n address: params.account.address\n })),\n address: implementationAddress,\n r: zeroHash,\n // aka `bytes32(0)`\n s: zeroHash,\n yParity: \"0x0\"\n };\n }\n return gasEstimator_(struct, params);\n };\n }\n });\n\n // ../../../node_modules/.pnpm/@aa-sdk+core@4.62.0_typescript@5.8.3_viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64_/node_modules/@aa-sdk/core/dist/esm/middleware/defaults/webauthnGasEstimator.js\n var rip7212CheckBytecode, webauthnGasEstimator;\n var init_webauthnGasEstimator = __esm({\n \"../../../node_modules/.pnpm/@aa-sdk+core@4.62.0_typescript@5.8.3_viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64_/node_modules/@aa-sdk/core/dist/esm/middleware/defaults/webauthnGasEstimator.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_account2();\n init_gasEstimator();\n rip7212CheckBytecode = \"0x60806040526040517f532eaabd9574880dbf76b9b8cc00832c20a6ec113d682299550d7a6e0f345e25815260056020820152600160408201527f4a03ef9f92eb268cafa601072489a56380fa0dc43171d7712813b3a19a1eb5e560608201527f3e213e28a608ce9a2f4a17fd830c6654018a79b3e0263d91a8ba90622df6f2f0608082015260208160a0836101005afa503d5f823e3d81f3fe\";\n webauthnGasEstimator = (gasEstimator) => async (struct, params) => {\n const gasEstimator_ = gasEstimator ?? defaultGasEstimator(params.client);\n const account = params.account ?? params.client.account;\n if (!account) {\n throw new AccountNotFoundError2();\n }\n const entryPoint = account.getEntryPoint();\n if (entryPoint.version !== \"0.7.0\") {\n throw new Error(\"This middleware is only compatible with EntryPoint v0.7.0\");\n }\n const uo = await gasEstimator_(struct, params);\n const pvg = uo.verificationGasLimit instanceof Promise ? await uo.verificationGasLimit : uo?.verificationGasLimit ?? 0n;\n if (!pvg) {\n throw new Error(\"WebauthnGasEstimator: verificationGasLimit is 0 or not defined\");\n }\n const { data } = await params.client.call({ data: rip7212CheckBytecode });\n const chainHas7212 = data ? BigInt(data) === 1n : false;\n return {\n ...uo,\n verificationGasLimit: BigInt(typeof pvg === \"string\" ? BigInt(pvg) : pvg) + (chainHas7212 ? 10000n : 300000n)\n };\n };\n }\n });\n\n // ../../../node_modules/.pnpm/@aa-sdk+core@4.62.0_typescript@5.8.3_viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64_/node_modules/@aa-sdk/core/dist/esm/middleware/erc7677middleware.js\n function erc7677Middleware(params) {\n const dummyPaymasterAndData = async (uo, { client, account, feeOptions, overrides }) => {\n const userOp = deepHexlify(await resolveProperties(uo));\n userOp.maxFeePerGas = \"0x0\";\n userOp.maxPriorityFeePerGas = \"0x0\";\n userOp.callGasLimit = \"0x0\";\n userOp.verificationGasLimit = \"0x0\";\n userOp.preVerificationGas = \"0x0\";\n const entrypoint = account.getEntryPoint();\n if (entrypoint.version === \"0.7.0\") {\n userOp.paymasterVerificationGasLimit = \"0x0\";\n userOp.paymasterPostOpGasLimit = \"0x0\";\n }\n const context2 = (typeof params?.context === \"function\" ? await params?.context(userOp, { overrides, feeOptions }) : params?.context) ?? {};\n if (!client.chain) {\n throw new ChainNotFoundError2();\n }\n const erc7677client = client;\n const { paymaster, paymasterAndData: paymasterAndData2, paymasterData, paymasterPostOpGasLimit, paymasterVerificationGasLimit } = await erc7677client.request({\n method: \"pm_getPaymasterStubData\",\n params: [userOp, entrypoint.address, toHex(client.chain.id), context2]\n });\n if (entrypoint.version === \"0.6.0\") {\n return {\n ...uo,\n paymasterAndData: paymasterAndData2\n };\n }\n return {\n ...uo,\n paymaster,\n paymasterData,\n // these values are currently not override-able, so can be set here directly\n paymasterVerificationGasLimit,\n paymasterPostOpGasLimit\n };\n };\n const paymasterAndData = async (uo, { client, account, feeOptions, overrides }) => {\n const userOp = deepHexlify(await resolveProperties(uo));\n const context2 = (typeof params?.context === \"function\" ? await params?.context(userOp, { overrides, feeOptions }) : params?.context) ?? {};\n if (!client.chain) {\n throw new ChainNotFoundError2();\n }\n const erc7677client = client;\n const entrypoint = account.getEntryPoint();\n const { paymaster, paymasterAndData: paymasterAndData2, paymasterData, paymasterPostOpGasLimit, paymasterVerificationGasLimit } = await erc7677client.request({\n method: \"pm_getPaymasterData\",\n params: [userOp, entrypoint.address, toHex(client.chain.id), context2]\n });\n if (entrypoint.version === \"0.6.0\") {\n return {\n ...uo,\n paymasterAndData: paymasterAndData2\n };\n }\n return {\n ...uo,\n paymaster,\n paymasterData,\n // if these fields are returned they should override the ones set by user operation gas estimation,\n // otherwise they shouldn't modify\n ...paymasterVerificationGasLimit ? { paymasterVerificationGasLimit } : {},\n ...paymasterPostOpGasLimit ? { paymasterPostOpGasLimit } : {}\n };\n };\n return {\n dummyPaymasterAndData,\n paymasterAndData\n };\n }\n var init_erc7677middleware = __esm({\n \"../../../node_modules/.pnpm/@aa-sdk+core@4.62.0_typescript@5.8.3_viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64_/node_modules/@aa-sdk/core/dist/esm/middleware/erc7677middleware.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_esm();\n init_client();\n init_utils10();\n }\n });\n\n // ../../../node_modules/.pnpm/@aa-sdk+core@4.62.0_typescript@5.8.3_viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64_/node_modules/@aa-sdk/core/dist/esm/signer/local-account.js\n var LocalAccountSigner;\n var init_local_account = __esm({\n \"../../../node_modules/.pnpm/@aa-sdk+core@4.62.0_typescript@5.8.3_viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64_/node_modules/@aa-sdk/core/dist/esm/signer/local-account.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_accounts();\n LocalAccountSigner = class _LocalAccountSigner {\n /**\n * A function to initialize an object with an inner parameter and derive a signerType from it.\n *\n * @example\n * ```ts\n * import { LocalAccountSigner } from \"@aa-sdk/core\";\n * import { privateKeyToAccount, generatePrivateKey } from \"viem\";\n *\n * const signer = new LocalAccountSigner(\n * privateKeyToAccount(generatePrivateKey()),\n * );\n * ```\n *\n * @param {T} inner The inner parameter containing the necessary data\n */\n constructor(inner) {\n Object.defineProperty(this, \"inner\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: void 0\n });\n Object.defineProperty(this, \"signerType\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: void 0\n });\n Object.defineProperty(this, \"signMessage\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: (message) => {\n return this.inner.signMessage({ message });\n }\n });\n Object.defineProperty(this, \"signTypedData\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: async (params) => {\n return this.inner.signTypedData(params);\n }\n });\n Object.defineProperty(this, \"getAddress\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: async () => {\n return this.inner.address;\n }\n });\n this.inner = inner;\n this.signerType = inner.type;\n }\n /**\n * Signs an unsigned authorization using the provided private key account.\n *\n * @example\n * ```ts twoslash\n * import { LocalAccountSigner } from \"@aa-sdk/core\";\n * import { generatePrivateKey } from \"viem/accounts\";\n *\n * const signer = LocalAccountSigner.privateKeyToAccountSigner(generatePrivateKey());\n * const signedAuthorization = await signer.signAuthorization({\n * contractAddress: \"0x1234123412341234123412341234123412341234\",\n * chainId: 1,\n * nonce: 3,\n * });\n * ```\n *\n * @param {AuthorizationRequest} unsignedAuthorization - The unsigned authorization to be signed.\n * @returns {Promise>} A promise that resolves to the signed authorization.\n */\n signAuthorization(unsignedAuthorization) {\n return this.inner.signAuthorization(unsignedAuthorization);\n }\n /**\n * Creates a LocalAccountSigner using the provided mnemonic key and optional HD options.\n *\n * @example\n * ```ts\n * import { LocalAccountSigner } from \"@aa-sdk/core\";\n * import { generateMnemonic } from \"viem\";\n *\n * const signer = LocalAccountSigner.mnemonicToAccountSigner(generateMnemonic());\n * ```\n *\n * @param {string} key The mnemonic key to derive the account from.\n * @param {HDOptions} [opts] Optional HD options for deriving the account.\n * @returns {LocalAccountSigner} A LocalAccountSigner object for the derived account.\n */\n static mnemonicToAccountSigner(key, opts) {\n const signer = mnemonicToAccount(key, opts);\n return new _LocalAccountSigner(signer);\n }\n /**\n * Creates a `LocalAccountSigner` instance using the provided private key.\n *\n * @example\n * ```ts\n * import { LocalAccountSigner } from \"@aa-sdk/core\";\n * import { generatePrivateKey } from \"viem\";\n *\n * const signer = LocalAccountSigner.privateKeyToAccountSigner(generatePrivateKey());\n * ```\n *\n * @param {Hex} key The private key in hexadecimal format\n * @returns {LocalAccountSigner} An instance of `LocalAccountSigner` initialized with the provided private key\n */\n static privateKeyToAccountSigner(key) {\n const signer = privateKeyToAccount(key);\n return new _LocalAccountSigner(signer);\n }\n /**\n * Generates a new private key and creates a `LocalAccountSigner` for a `PrivateKeyAccount`.\n *\n * @example\n * ```ts\n * import { LocalAccountSigner } from \"@aa-sdk/core\";\n *\n * const signer = LocalAccountSigner.generatePrivateKeySigner();\n * ```\n *\n * @returns {LocalAccountSigner} A `LocalAccountSigner` instance initialized with the generated private key account\n */\n static generatePrivateKeySigner() {\n const signer = privateKeyToAccount(generatePrivateKey());\n return new _LocalAccountSigner(signer);\n }\n };\n }\n });\n\n // ../../../node_modules/.pnpm/@aa-sdk+core@4.62.0_typescript@5.8.3_viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64_/node_modules/@aa-sdk/core/dist/esm/transport/split.js\n var split2;\n var init_split = __esm({\n \"../../../node_modules/.pnpm/@aa-sdk+core@4.62.0_typescript@5.8.3_viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64_/node_modules/@aa-sdk/core/dist/esm/transport/split.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_esm();\n split2 = (params) => {\n const overrideMap = params.overrides.reduce((accum, curr) => {\n curr.methods.forEach((method) => {\n if (accum.has(method) && accum.get(method) !== curr.transport) {\n throw new Error(\"A method cannot be handled by more than one transport\");\n }\n accum.set(method, curr.transport);\n });\n return accum;\n }, /* @__PURE__ */ new Map());\n return (opts) => custom({\n request: async (args) => {\n const transportOverride = overrideMap.get(args.method);\n if (transportOverride != null) {\n return transportOverride(opts).request(args);\n }\n return params.fallback(opts).request(args);\n }\n })(opts);\n };\n }\n });\n\n // ../../../node_modules/.pnpm/@aa-sdk+core@4.62.0_typescript@5.8.3_viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64_/node_modules/@aa-sdk/core/dist/esm/utils/traceHeader.js\n function generateRandomHexString(numBytes) {\n const hexPairs = new Array(numBytes).fill(0).map(() => Math.floor(Math.random() * 16).toString(16).padStart(2, \"0\"));\n return hexPairs.join(\"\");\n }\n var TRACE_HEADER_NAME, TRACE_HEADER_STATE, clientTraceId, TraceHeader;\n var init_traceHeader = __esm({\n \"../../../node_modules/.pnpm/@aa-sdk+core@4.62.0_typescript@5.8.3_viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64_/node_modules/@aa-sdk/core/dist/esm/utils/traceHeader.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n TRACE_HEADER_NAME = \"traceparent\";\n TRACE_HEADER_STATE = \"tracestate\";\n clientTraceId = generateRandomHexString(16);\n TraceHeader = class _TraceHeader {\n /**\n * Initializes a new instance with the provided trace identifiers and state information.\n *\n * @param {string} traceId The unique identifier for the trace\n * @param {string} parentId The identifier of the parent trace\n * @param {string} traceFlags Flags containing trace-related options\n * @param {TraceHeader[\"traceState\"]} traceState The trace state information for additional trace context\n */\n constructor(traceId, parentId, traceFlags, traceState) {\n Object.defineProperty(this, \"traceId\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: void 0\n });\n Object.defineProperty(this, \"parentId\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: void 0\n });\n Object.defineProperty(this, \"traceFlags\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: void 0\n });\n Object.defineProperty(this, \"traceState\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: void 0\n });\n this.traceId = traceId;\n this.parentId = parentId;\n this.traceFlags = traceFlags;\n this.traceState = traceState;\n }\n /**\n * Creating a default trace id that is a random setup for both trace id and parent id\n *\n * @example ```ts\n * const traceHeader = TraceHeader.fromTraceHeader(headers) || TraceHeader.default();\n * ```\n *\n * @returns {TraceHeader} A default trace header\n */\n static default() {\n return new _TraceHeader(\n clientTraceId,\n generateRandomHexString(8),\n \"00\",\n //Means no flag have been set, and no sampled state https://www.w3.org/TR/trace-context/#trace-flags\n {}\n );\n }\n /**\n * Should be able to consume a trace header from the headers of an http request\n *\n * @example ```ts\n * const traceHeader = TraceHeader.fromTraceHeader(headers);\n * ```\n *\n * @param {Record} headers The headers from the http request\n * @returns {TraceHeader | undefined} The trace header object, or nothing if not found\n */\n static fromTraceHeader(headers) {\n if (!headers[TRACE_HEADER_NAME]) {\n return void 0;\n }\n const [version6, traceId, parentId, traceFlags] = headers[TRACE_HEADER_NAME]?.split(\"-\");\n const traceState = headers[TRACE_HEADER_STATE]?.split(\",\").reduce((acc, curr) => {\n const [key, value] = curr.split(\"=\");\n acc[key] = value;\n return acc;\n }, {}) || {};\n if (version6 !== \"00\") {\n console.debug(new Error(`Invalid version for traceheader: ${headers[TRACE_HEADER_NAME]}`));\n return void 0;\n }\n return new _TraceHeader(traceId, parentId, traceFlags, traceState);\n }\n /**\n * Should be able to convert the trace header to the format that is used in the headers of an http request\n *\n * @example ```ts\n * const traceHeader = TraceHeader.fromTraceHeader(headers) || TraceHeader.default();\n * const headers = traceHeader.toTraceHeader();\n * ```\n *\n * @returns {{traceparent: string, tracestate: string}} The trace header in the format of a record, used in our http client\n */\n toTraceHeader() {\n return {\n [TRACE_HEADER_NAME]: `00-${this.traceId}-${this.parentId}-${this.traceFlags}`,\n [TRACE_HEADER_STATE]: Object.entries(this.traceState).map(([key, value]) => `${key}=${value}`).join(\",\")\n };\n }\n /**\n * Should be able to create a new trace header with a new event in the trace state,\n * as the key of the eventName as breadcrumbs appending onto previous breadcrumbs with the - infix if exists. And the\n * trace parent gets updated as according to the docs\n *\n * @example ```ts\n * const traceHeader = TraceHeader.fromTraceHeader(headers) || TraceHeader.default();\n * const newTraceHeader = traceHeader.withEvent(\"newEvent\");\n * ```\n *\n * @param {string} eventName The key of the new event\n * @returns {TraceHeader} The new trace header\n */\n withEvent(eventName) {\n const breadcrumbs = this.traceState.breadcrumbs ? `${this.traceState.breadcrumbs}-${eventName}` : eventName;\n return new _TraceHeader(this.traceId, this.parentId, this.traceFlags, {\n ...this.traceState,\n breadcrumbs\n });\n }\n };\n }\n });\n\n // ../../../node_modules/.pnpm/@aa-sdk+core@4.62.0_typescript@5.8.3_viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64_/node_modules/@aa-sdk/core/dist/esm/index.js\n var init_esm6 = __esm({\n \"../../../node_modules/.pnpm/@aa-sdk+core@4.62.0_typescript@5.8.3_viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64_/node_modules/@aa-sdk/core/dist/esm/index.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_smartContractAccount();\n init_sendTransaction2();\n init_sendTransactions();\n init_sendUserOperation2();\n init_bundlerClient2();\n init_smartAccountClient();\n init_isSmartAccountClient();\n init_schema2();\n init_smartAccountClient2();\n init_entrypoint2();\n init_account2();\n init_base2();\n init_client();\n init_useroperation();\n init_addBreadcrumb();\n init_signer();\n init_gasEstimator2();\n init_webauthnGasEstimator();\n init_gasEstimator();\n init_erc7677middleware();\n init_noopMiddleware();\n init_local_account();\n init_split();\n init_traceHeader();\n init_utils10();\n }\n });\n\n // ../../../node_modules/.pnpm/@account-kit+infra@4.62.0_bufferutil@4.0.9_debug@4.4.1_typescript@5.8.3_utf-8-validate@_91850b8a2849fb827e3616547e4ccff7/node_modules/@account-kit/infra/dist/esm/client/isAlchemySmartAccountClient.js\n function isAlchemySmartAccountClient(client) {\n return client.transport.type === \"alchemy\";\n }\n var init_isAlchemySmartAccountClient = __esm({\n \"../../../node_modules/.pnpm/@account-kit+infra@4.62.0_bufferutil@4.0.9_debug@4.4.1_typescript@5.8.3_utf-8-validate@_91850b8a2849fb827e3616547e4ccff7/node_modules/@account-kit/infra/dist/esm/client/isAlchemySmartAccountClient.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n }\n });\n\n // ../../../node_modules/.pnpm/@account-kit+infra@4.62.0_bufferutil@4.0.9_debug@4.4.1_typescript@5.8.3_utf-8-validate@_91850b8a2849fb827e3616547e4ccff7/node_modules/@account-kit/infra/dist/esm/actions/simulateUserOperationChanges.js\n var simulateUserOperationChanges;\n var init_simulateUserOperationChanges = __esm({\n \"../../../node_modules/.pnpm/@account-kit+infra@4.62.0_bufferutil@4.0.9_debug@4.4.1_typescript@5.8.3_utf-8-validate@_91850b8a2849fb827e3616547e4ccff7/node_modules/@account-kit/infra/dist/esm/actions/simulateUserOperationChanges.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_esm6();\n init_isAlchemySmartAccountClient();\n simulateUserOperationChanges = async (client, { account = client.account, overrides, ...params }) => {\n if (!account) {\n throw new AccountNotFoundError2();\n }\n if (!isAlchemySmartAccountClient(client)) {\n throw new IncompatibleClientError(\"AlchemySmartAccountClient\", \"SimulateUserOperationAssetChanges\", client);\n }\n const uoStruct = deepHexlify(await client.buildUserOperation({\n ...params,\n account,\n overrides\n }));\n return client.request({\n method: \"alchemy_simulateUserOperationAssetChanges\",\n params: [uoStruct, account.getEntryPoint().address]\n });\n };\n }\n });\n\n // ../../../node_modules/.pnpm/@account-kit+infra@4.62.0_bufferutil@4.0.9_debug@4.4.1_typescript@5.8.3_utf-8-validate@_91850b8a2849fb827e3616547e4ccff7/node_modules/@account-kit/infra/dist/esm/alchemyTrackerHeaders.js\n function mutateRemoveTrackingHeaders(x4) {\n if (!x4)\n return;\n if (Array.isArray(x4))\n return;\n if (typeof x4 !== \"object\")\n return;\n TRACKER_HEADER in x4 && delete x4[TRACKER_HEADER];\n TRACKER_BREADCRUMB in x4 && delete x4[TRACKER_BREADCRUMB];\n TRACE_HEADER_NAME in x4 && delete x4[TRACE_HEADER_NAME];\n TRACE_HEADER_STATE in x4 && delete x4[TRACE_HEADER_STATE];\n }\n function addCrumb(previous, crumb) {\n if (!previous)\n return crumb;\n return `${previous} > ${crumb}`;\n }\n function headersUpdate(crumb) {\n const headerUpdate_ = (x4) => {\n const traceHeader = (TraceHeader.fromTraceHeader(x4) || TraceHeader.default()).withEvent(crumb);\n return {\n [TRACKER_HEADER]: traceHeader.parentId,\n ...x4,\n [TRACKER_BREADCRUMB]: addCrumb(x4[TRACKER_BREADCRUMB], crumb),\n ...traceHeader.toTraceHeader()\n };\n };\n return headerUpdate_;\n }\n var TRACKER_HEADER, TRACKER_BREADCRUMB;\n var init_alchemyTrackerHeaders = __esm({\n \"../../../node_modules/.pnpm/@account-kit+infra@4.62.0_bufferutil@4.0.9_debug@4.4.1_typescript@5.8.3_utf-8-validate@_91850b8a2849fb827e3616547e4ccff7/node_modules/@account-kit/infra/dist/esm/alchemyTrackerHeaders.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_esm6();\n init_esm6();\n init_esm6();\n TRACKER_HEADER = \"X-Alchemy-Client-Trace-Id\";\n TRACKER_BREADCRUMB = \"X-Alchemy-Client-Breadcrumb\";\n }\n });\n\n // ../../../node_modules/.pnpm/@account-kit+infra@4.62.0_bufferutil@4.0.9_debug@4.4.1_typescript@5.8.3_utf-8-validate@_91850b8a2849fb827e3616547e4ccff7/node_modules/@account-kit/infra/dist/esm/schema.js\n var AlchemyChainSchema;\n var init_schema3 = __esm({\n \"../../../node_modules/.pnpm/@account-kit+infra@4.62.0_bufferutil@4.0.9_debug@4.4.1_typescript@5.8.3_utf-8-validate@_91850b8a2849fb827e3616547e4ccff7/node_modules/@account-kit/infra/dist/esm/schema.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_esm6();\n init_esm5();\n AlchemyChainSchema = esm_default.custom((chain2) => {\n const chain_ = ChainSchema.parse(chain2);\n return chain_.rpcUrls.alchemy != null;\n }, \"chain must include an alchemy rpc url. See `defineAlchemyChain` or import a chain from `@account-kit/infra`.\");\n }\n });\n\n // ../../../node_modules/.pnpm/@account-kit+infra@4.62.0_bufferutil@4.0.9_debug@4.4.1_typescript@5.8.3_utf-8-validate@_91850b8a2849fb827e3616547e4ccff7/node_modules/@account-kit/infra/dist/esm/version.js\n var VERSION2;\n var init_version6 = __esm({\n \"../../../node_modules/.pnpm/@account-kit+infra@4.62.0_bufferutil@4.0.9_debug@4.4.1_typescript@5.8.3_utf-8-validate@_91850b8a2849fb827e3616547e4ccff7/node_modules/@account-kit/infra/dist/esm/version.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n VERSION2 = \"4.62.0\";\n }\n });\n\n // ../../../node_modules/.pnpm/@account-kit+infra@4.62.0_bufferutil@4.0.9_debug@4.4.1_typescript@5.8.3_utf-8-validate@_91850b8a2849fb827e3616547e4ccff7/node_modules/@account-kit/infra/dist/esm/alchemyTransport.js\n function isAlchemyTransport(transport, chain2) {\n return transport({ chain: chain2 }).config.type === \"alchemy\";\n }\n function alchemy(config2) {\n const { retryDelay, retryCount = 0 } = config2;\n const fetchOptions = { ...config2.fetchOptions };\n const connectionConfig = ConnectionConfigSchema.parse(config2.alchemyConnection ?? config2);\n const headersAsObject = convertHeadersToObject(fetchOptions.headers);\n fetchOptions.headers = {\n ...headersAsObject,\n \"Alchemy-AA-Sdk-Version\": VERSION2\n };\n if (connectionConfig.jwt != null || connectionConfig.apiKey != null) {\n fetchOptions.headers = {\n ...fetchOptions.headers,\n Authorization: `Bearer ${connectionConfig.jwt ?? connectionConfig.apiKey}`\n };\n }\n const transport = (opts) => {\n const { chain: chain_ } = opts;\n if (!chain_) {\n throw new ChainNotFoundError2();\n }\n const chain2 = AlchemyChainSchema.parse(chain_);\n const rpcUrl = connectionConfig.rpcUrl == null ? chain2.rpcUrls.alchemy.http[0] : connectionConfig.rpcUrl;\n const chainAgnosticRpcUrl = connectionConfig.rpcUrl == null ? \"https://api.g.alchemy.com/v2\" : connectionConfig.chainAgnosticUrl ?? connectionConfig.rpcUrl;\n const innerTransport = (() => {\n mutateRemoveTrackingHeaders(config2?.fetchOptions?.headers);\n if (config2.alchemyConnection && config2.nodeRpcUrl) {\n return split2({\n overrides: [\n {\n methods: alchemyMethods,\n transport: http(rpcUrl, { fetchOptions, retryCount })\n },\n {\n methods: chainAgnosticMethods,\n transport: http(chainAgnosticRpcUrl, {\n fetchOptions,\n retryCount,\n retryDelay\n })\n }\n ],\n fallback: http(config2.nodeRpcUrl, {\n fetchOptions: config2.fetchOptions,\n retryCount,\n retryDelay\n })\n });\n }\n return split2({\n overrides: [\n {\n methods: chainAgnosticMethods,\n transport: http(chainAgnosticRpcUrl, {\n fetchOptions,\n retryCount,\n retryDelay\n })\n }\n ],\n fallback: http(rpcUrl, { fetchOptions, retryCount, retryDelay })\n });\n })();\n return createTransport({\n key: \"alchemy\",\n name: \"Alchemy Transport\",\n request: innerTransport({\n ...opts,\n // Retries are already handled above within the split transport,\n // so `retryCount` must be 0 here for the expected behavior.\n retryCount: 0\n }).request,\n // Retries are already handled above within the split transport,\n // so `retryCount` must be 0 here too for the expected behavior.\n retryCount: 0,\n retryDelay,\n type: \"alchemy\"\n }, { alchemyRpcUrl: rpcUrl, fetchOptions });\n };\n return Object.assign(transport, {\n dynamicFetchOptions: fetchOptions,\n updateHeaders(newHeaders_) {\n const newHeaders = convertHeadersToObject(newHeaders_);\n fetchOptions.headers = {\n ...fetchOptions.headers,\n ...newHeaders\n };\n },\n config: config2\n });\n }\n var alchemyMethods, chainAgnosticMethods, convertHeadersToObject;\n var init_alchemyTransport = __esm({\n \"../../../node_modules/.pnpm/@account-kit+infra@4.62.0_bufferutil@4.0.9_debug@4.4.1_typescript@5.8.3_utf-8-validate@_91850b8a2849fb827e3616547e4ccff7/node_modules/@account-kit/infra/dist/esm/alchemyTransport.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_esm6();\n init_esm();\n init_alchemyTrackerHeaders();\n init_schema3();\n init_version6();\n alchemyMethods = [\n \"eth_sendUserOperation\",\n \"eth_estimateUserOperationGas\",\n \"eth_getUserOperationReceipt\",\n \"eth_getUserOperationByHash\",\n \"eth_supportedEntryPoints\",\n \"rundler_maxPriorityFeePerGas\",\n \"pm_getPaymasterData\",\n \"pm_getPaymasterStubData\",\n \"alchemy_requestGasAndPaymasterAndData\"\n ];\n chainAgnosticMethods = [\n \"wallet_prepareCalls\",\n \"wallet_sendPreparedCalls\",\n \"wallet_requestAccount\",\n \"wallet_createAccount\",\n \"wallet_listAccounts\",\n \"wallet_createSession\",\n \"wallet_getCallsStatus\"\n ];\n convertHeadersToObject = (headers) => {\n if (!headers) {\n return {};\n }\n if (headers instanceof Headers) {\n const headersObject = {};\n headers.forEach((value, key) => {\n headersObject[key] = value;\n });\n return headersObject;\n }\n if (Array.isArray(headers)) {\n return headers.reduce((acc, header) => {\n acc[header[0]] = header[1];\n return acc;\n }, {});\n }\n return headers;\n };\n }\n });\n\n // ../../../node_modules/.pnpm/@account-kit+infra@4.62.0_bufferutil@4.0.9_debug@4.4.1_typescript@5.8.3_utf-8-validate@_91850b8a2849fb827e3616547e4ccff7/node_modules/@account-kit/infra/dist/esm/chains.js\n var defineAlchemyChain, arbitrum2, arbitrumGoerli2, arbitrumSepolia2, goerli2, mainnet2, optimism2, optimismGoerli2, optimismSepolia2, sepolia2, base2, baseGoerli2, baseSepolia2, polygonMumbai2, polygonAmoy2, polygon2, fraxtal2, fraxtalSepolia, zora2, zoraSepolia2, worldChainSepolia, worldChain, shapeSepolia, shape, unichainMainnet, unichainSepolia, soneiumMinato, soneiumMainnet, opbnbTestnet, opbnbMainnet, beraChainBartio, inkMainnet, inkSepolia, arbitrumNova2, monadTestnet, mekong, openlootSepolia, gensynTestnet, riseTestnet, storyMainnet, storyAeneid, celoAlfajores, celoMainnet, teaSepolia, bobaSepolia, bobaMainnet;\n var init_chains2 = __esm({\n \"../../../node_modules/.pnpm/@account-kit+infra@4.62.0_bufferutil@4.0.9_debug@4.4.1_typescript@5.8.3_utf-8-validate@_91850b8a2849fb827e3616547e4ccff7/node_modules/@account-kit/infra/dist/esm/chains.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_esm();\n init_chains();\n defineAlchemyChain = ({ chain: chain2, rpcBaseUrl }) => {\n return {\n ...chain2,\n rpcUrls: {\n ...chain2.rpcUrls,\n alchemy: {\n http: [rpcBaseUrl]\n }\n }\n };\n };\n arbitrum2 = {\n ...arbitrum,\n rpcUrls: {\n ...arbitrum.rpcUrls,\n alchemy: {\n http: [\"https://arb-mainnet.g.alchemy.com/v2\"]\n }\n }\n };\n arbitrumGoerli2 = {\n ...arbitrumGoerli,\n rpcUrls: {\n ...arbitrumGoerli.rpcUrls,\n alchemy: {\n http: [\"https://arb-goerli.g.alchemy.com/v2\"]\n }\n }\n };\n arbitrumSepolia2 = {\n ...arbitrumSepolia,\n rpcUrls: {\n ...arbitrumSepolia.rpcUrls,\n alchemy: {\n http: [\"https://arb-sepolia.g.alchemy.com/v2\"]\n }\n }\n };\n goerli2 = {\n ...goerli,\n rpcUrls: {\n ...goerli.rpcUrls,\n alchemy: {\n http: [\"https://eth-goerli.g.alchemy.com/v2\"]\n }\n }\n };\n mainnet2 = {\n ...mainnet,\n rpcUrls: {\n ...mainnet.rpcUrls,\n alchemy: {\n http: [\"https://eth-mainnet.g.alchemy.com/v2\"]\n }\n }\n };\n optimism2 = {\n ...optimism,\n rpcUrls: {\n ...optimism.rpcUrls,\n alchemy: {\n http: [\"https://opt-mainnet.g.alchemy.com/v2\"]\n }\n }\n };\n optimismGoerli2 = {\n ...optimismGoerli,\n rpcUrls: {\n ...optimismGoerli.rpcUrls,\n alchemy: {\n http: [\"https://opt-goerli.g.alchemy.com/v2\"]\n }\n }\n };\n optimismSepolia2 = {\n ...optimismSepolia,\n rpcUrls: {\n ...optimismSepolia.rpcUrls,\n alchemy: {\n http: [\"https://opt-sepolia.g.alchemy.com/v2\"]\n }\n }\n };\n sepolia2 = {\n ...sepolia,\n rpcUrls: {\n ...sepolia.rpcUrls,\n alchemy: {\n http: [\"https://eth-sepolia.g.alchemy.com/v2\"]\n }\n }\n };\n base2 = {\n ...base,\n rpcUrls: {\n ...base.rpcUrls,\n alchemy: {\n http: [\"https://base-mainnet.g.alchemy.com/v2\"]\n }\n }\n };\n baseGoerli2 = {\n ...baseGoerli,\n rpcUrls: {\n ...baseGoerli.rpcUrls,\n alchemy: {\n http: [\"https://base-goerli.g.alchemy.com/v2\"]\n }\n }\n };\n baseSepolia2 = {\n ...baseSepolia,\n rpcUrls: {\n ...baseSepolia.rpcUrls,\n alchemy: {\n http: [\"https://base-sepolia.g.alchemy.com/v2\"]\n }\n }\n };\n polygonMumbai2 = {\n ...polygonMumbai,\n rpcUrls: {\n ...polygonMumbai.rpcUrls,\n alchemy: {\n http: [\"https://polygon-mumbai.g.alchemy.com/v2\"]\n }\n }\n };\n polygonAmoy2 = {\n ...polygonAmoy,\n rpcUrls: {\n ...polygonAmoy.rpcUrls,\n alchemy: {\n http: [\"https://polygon-amoy.g.alchemy.com/v2\"]\n }\n }\n };\n polygon2 = {\n ...polygon,\n rpcUrls: {\n ...polygon.rpcUrls,\n alchemy: {\n http: [\"https://polygon-mainnet.g.alchemy.com/v2\"]\n }\n }\n };\n fraxtal2 = {\n ...fraxtal,\n rpcUrls: {\n ...fraxtal.rpcUrls\n }\n };\n fraxtalSepolia = defineChain({\n id: 2523,\n name: \"Fraxtal Sepolia\",\n nativeCurrency: { name: \"Frax Ether\", symbol: \"frxETH\", decimals: 18 },\n rpcUrls: {\n default: {\n http: [\"https://rpc.testnet-sepolia.frax.com\"]\n }\n }\n });\n zora2 = {\n ...zora,\n rpcUrls: {\n ...zora.rpcUrls\n }\n };\n zoraSepolia2 = {\n ...zoraSepolia,\n rpcUrls: {\n ...zoraSepolia.rpcUrls\n }\n };\n worldChainSepolia = defineChain({\n id: 4801,\n name: \"World Chain Sepolia\",\n network: \"World Chain Sepolia\",\n nativeCurrency: { name: \"Ether\", symbol: \"ETH\", decimals: 18 },\n rpcUrls: {\n default: {\n http: [\"https://worldchain-sepolia.g.alchemy.com/v2\"]\n },\n public: {\n http: [\"https://worldchain-sepolia.g.alchemy.com/v2\"]\n },\n alchemy: {\n http: [\"https://worldchain-sepolia.g.alchemy.com/v2\"]\n }\n }\n });\n worldChain = defineChain({\n id: 480,\n name: \"World Chain\",\n network: \"World Chain\",\n nativeCurrency: { name: \"Ether\", symbol: \"ETH\", decimals: 18 },\n rpcUrls: {\n default: {\n http: [\"https://worldchain-mainnet.g.alchemy.com/v2\"]\n },\n public: {\n http: [\"https://worldchain-mainnet.g.alchemy.com/v2\"]\n },\n alchemy: {\n http: [\"https://worldchain-mainnet.g.alchemy.com/v2\"]\n }\n }\n });\n shapeSepolia = defineChain({\n id: 11011,\n name: \"Shape Sepolia\",\n network: \"Shape Sepolia\",\n nativeCurrency: { name: \"Ether\", symbol: \"ETH\", decimals: 18 },\n rpcUrls: {\n default: {\n http: [\"https://shape-sepolia.g.alchemy.com/v2\"]\n },\n public: {\n http: [\"https://shape-sepolia.g.alchemy.com/v2\"]\n },\n alchemy: {\n http: [\"https://shape-sepolia.g.alchemy.com/v2\"]\n }\n }\n });\n shape = defineChain({\n id: 360,\n name: \"Shape\",\n network: \"Shape\",\n nativeCurrency: { name: \"Ether\", symbol: \"ETH\", decimals: 18 },\n rpcUrls: {\n default: {\n http: [\"https://shape-mainnet.g.alchemy.com/v2\"]\n },\n public: {\n http: [\"https://shape-mainnet.g.alchemy.com/v2\"]\n },\n alchemy: {\n http: [\"https://shape-mainnet.g.alchemy.com/v2\"]\n }\n }\n });\n unichainMainnet = defineChain({\n id: 130,\n name: \"Unichain Mainnet\",\n network: \"Unichain Mainnet\",\n nativeCurrency: { name: \"Ether\", symbol: \"ETH\", decimals: 18 },\n rpcUrls: {\n default: {\n http: [\"https://unichain-mainnet.g.alchemy.com/v2\"]\n },\n public: {\n http: [\"https://unichain-mainnet.g.alchemy.com/v2\"]\n },\n alchemy: {\n http: [\"https://unichain-mainnet.g.alchemy.com/v2\"]\n }\n }\n });\n unichainSepolia = defineChain({\n id: 1301,\n name: \"Unichain Sepolia\",\n network: \"Unichain Sepolia\",\n nativeCurrency: { name: \"Ether\", symbol: \"ETH\", decimals: 18 },\n rpcUrls: {\n default: {\n http: [\"https://unichain-sepolia.g.alchemy.com/v2\"]\n },\n public: {\n http: [\"https://unichain-sepolia.g.alchemy.com/v2\"]\n },\n alchemy: {\n http: [\"https://unichain-sepolia.g.alchemy.com/v2\"]\n }\n }\n });\n soneiumMinato = defineChain({\n id: 1946,\n name: \"Soneium Minato\",\n network: \"Soneium Minato\",\n nativeCurrency: { name: \"Ether\", symbol: \"ETH\", decimals: 18 },\n rpcUrls: {\n default: {\n http: [\"https://soneium-minato.g.alchemy.com/v2\"]\n },\n public: {\n http: [\"https://soneium-minato.g.alchemy.com/v2\"]\n },\n alchemy: {\n http: [\"https://soneium-minato.g.alchemy.com/v2\"]\n }\n }\n });\n soneiumMainnet = defineChain({\n id: 1868,\n name: \"Soneium Mainnet\",\n network: \"Soneium Mainnet\",\n nativeCurrency: { name: \"Ether\", symbol: \"ETH\", decimals: 18 },\n rpcUrls: {\n default: {\n http: [\"https://soneium-mainnet.g.alchemy.com/v2\"]\n },\n public: {\n http: [\"https://soneium-mainnet.g.alchemy.com/v2\"]\n },\n alchemy: {\n http: [\"https://soneium-mainnet.g.alchemy.com/v2\"]\n }\n }\n });\n opbnbTestnet = defineChain({\n id: 5611,\n name: \"OPBNB Testnet\",\n network: \"OPBNB Testnet\",\n nativeCurrency: { name: \"BNB\", symbol: \"BNB\", decimals: 18 },\n rpcUrls: {\n default: {\n http: [\"https://opbnb-testnet.g.alchemy.com/v2\"]\n },\n public: {\n http: [\"https://opbnb-testnet.g.alchemy.com/v2\"]\n },\n alchemy: {\n http: [\"https://opbnb-testnet.g.alchemy.com/v2\"]\n }\n }\n });\n opbnbMainnet = defineChain({\n id: 204,\n name: \"OPBNB Mainnet\",\n network: \"OPBNB Mainnet\",\n nativeCurrency: { name: \"BNB\", symbol: \"BNB\", decimals: 18 },\n rpcUrls: {\n default: {\n http: [\"https://opbnb-mainnet.g.alchemy.com/v2\"]\n },\n public: {\n http: [\"https://opbnb-mainnet.g.alchemy.com/v2\"]\n },\n alchemy: {\n http: [\"https://opbnb-mainnet.g.alchemy.com/v2\"]\n }\n }\n });\n beraChainBartio = defineChain({\n id: 80084,\n name: \"BeraChain Bartio\",\n network: \"BeraChain Bartio\",\n nativeCurrency: { name: \"Bera\", symbol: \"BERA\", decimals: 18 },\n rpcUrls: {\n default: {\n http: [\"https://berachain-bartio.g.alchemy.com/v2\"]\n },\n public: {\n http: [\"https://berachain-bartio.g.alchemy.com/v2\"]\n },\n alchemy: {\n http: [\"https://berachain-bartio.g.alchemy.com/v2\"]\n }\n }\n });\n inkMainnet = defineChain({\n id: 57073,\n name: \"Ink Mainnet\",\n network: \"Ink Mainnet\",\n nativeCurrency: { name: \"Ether\", symbol: \"ETH\", decimals: 18 },\n rpcUrls: {\n default: {\n http: [\"https://ink-mainnet.g.alchemy.com/v2\"]\n },\n public: {\n http: [\"https://ink-mainnet.g.alchemy.com/v2\"]\n },\n alchemy: {\n http: [\"https://ink-mainnet.g.alchemy.com/v2\"]\n }\n }\n });\n inkSepolia = defineChain({\n id: 763373,\n name: \"Ink Sepolia\",\n network: \"Ink Sepolia\",\n nativeCurrency: { name: \"Ether\", symbol: \"ETH\", decimals: 18 },\n rpcUrls: {\n default: {\n http: [\"https://ink-sepolia.g.alchemy.com/v2\"]\n },\n public: {\n http: [\"https://ink-sepolia.g.alchemy.com/v2\"]\n },\n alchemy: {\n http: [\"https://ink-sepolia.g.alchemy.com/v2\"]\n }\n }\n });\n arbitrumNova2 = {\n ...arbitrumNova,\n rpcUrls: {\n ...arbitrumNova.rpcUrls\n }\n };\n monadTestnet = defineChain({\n id: 10143,\n name: \"Monad Testnet\",\n nativeCurrency: { name: \"Monad\", symbol: \"MON\", decimals: 18 },\n rpcUrls: {\n default: {\n http: [\"https://monad-testnet.g.alchemy.com/v2\"]\n },\n public: {\n http: [\"https://monad-testnet.g.alchemy.com/v2\"]\n },\n alchemy: {\n http: [\"https://monad-testnet.g.alchemy.com/v2\"]\n }\n },\n blockExplorers: {\n default: {\n name: \"Block Explorer\",\n url: \"https://testnet.monadexplorer.com\"\n }\n },\n testnet: true\n });\n mekong = defineChain({\n id: 7078815900,\n name: \"Mekong Pectra Devnet\",\n nativeCurrency: { name: \"eth\", symbol: \"eth\", decimals: 18 },\n rpcUrls: {\n default: {\n http: [\"https://rpc.mekong.ethpandaops.io\"]\n }\n },\n blockExplorers: {\n default: {\n name: \"Block Explorer\",\n url: \"https://explorer.mekong.ethpandaops.io\"\n }\n },\n testnet: true\n });\n openlootSepolia = defineChain({\n id: 905905,\n name: \"Openloot Sepolia\",\n nativeCurrency: { name: \"Openloot\", symbol: \"OL\", decimals: 18 },\n rpcUrls: {\n default: {\n http: [\"https://openloot-sepolia.g.alchemy.com/v2\"]\n },\n public: {\n http: [\"https://openloot-sepolia.g.alchemy.com/v2\"]\n },\n alchemy: {\n http: [\"https://openloot-sepolia.g.alchemy.com/v2\"]\n }\n },\n blockExplorers: {\n default: {\n name: \"Block Explorer\",\n url: \"https://openloot-sepolia.explorer.alchemy.com\"\n }\n },\n testnet: true\n });\n gensynTestnet = defineChain({\n id: 685685,\n name: \"Gensyn Testnet\",\n nativeCurrency: { name: \"eth\", symbol: \"eth\", decimals: 18 },\n rpcUrls: {\n default: {\n http: [\"https://gensyn-testnet.g.alchemy.com/v2\"]\n },\n public: {\n http: [\"https://gensyn-testnet.g.alchemy.com/v2\"]\n },\n alchemy: {\n http: [\"https://gensyn-testnet.g.alchemy.com/v2\"]\n }\n },\n blockExplorers: {\n default: {\n name: \"Block Explorer\",\n url: \"https://gensyn-testnet.explorer.alchemy.com\"\n }\n },\n testnet: true\n });\n riseTestnet = defineChain({\n id: 11155931,\n name: \"Rise Testnet\",\n nativeCurrency: { name: \"eth\", symbol: \"eth\", decimals: 18 },\n rpcUrls: {\n default: {\n http: [\"https://rise-testnet.g.alchemy.com/v2\"]\n },\n public: {\n http: [\"https://rise-testnet.g.alchemy.com/v2\"]\n },\n alchemy: {\n http: [\"https://rise-testnet.g.alchemy.com/v2\"]\n }\n },\n blockExplorers: {\n default: {\n name: \"Block Explorer\",\n url: \"https://explorer.testnet.riselabs.xyz\"\n }\n },\n testnet: true\n });\n storyMainnet = defineChain({\n id: 1514,\n name: \"Story Mainnet\",\n nativeCurrency: { name: \"IP\", symbol: \"IP\", decimals: 18 },\n rpcUrls: {\n default: {\n http: [\"https://story-mainnet.g.alchemy.com/v2\"]\n },\n public: {\n http: [\"https://story-mainnet.g.alchemy.com/v2\"]\n },\n alchemy: {\n http: [\"https://story-mainnet.g.alchemy.com/v2\"]\n }\n },\n blockExplorers: {\n default: {\n name: \"Block Explorer\",\n url: \"https://www.storyscan.io\"\n }\n },\n testnet: false\n });\n storyAeneid = defineChain({\n id: 1315,\n name: \"Story Aeneid\",\n nativeCurrency: { name: \"IP\", symbol: \"IP\", decimals: 18 },\n rpcUrls: {\n default: {\n http: [\"https://story-aeneid.g.alchemy.com/v2\"]\n },\n public: {\n http: [\"https://story-aeneid.g.alchemy.com/v2\"]\n },\n alchemy: {\n http: [\"https://story-aeneid.g.alchemy.com/v2\"]\n }\n },\n blockExplorers: {\n default: {\n name: \"Block Explorer\",\n url: \"https://aeneid.storyscan.io\"\n }\n },\n testnet: true\n });\n celoAlfajores = defineChain({\n id: 44787,\n name: \"Celo Alfajores\",\n nativeCurrency: { name: \"Celo native asset\", symbol: \"CELO\", decimals: 18 },\n rpcUrls: {\n default: {\n http: [\"https://celo-alfajores.g.alchemy.com/v2\"]\n },\n public: {\n http: [\"https://celo-alfajores.g.alchemy.com/v2\"]\n },\n alchemy: {\n http: [\"https://celo-alfajores.g.alchemy.com/v2\"]\n }\n },\n blockExplorers: {\n default: {\n name: \"Block Explorer\",\n url: \"https://celo-alfajores.blockscout.com/\"\n }\n },\n testnet: true\n });\n celoMainnet = defineChain({\n id: 42220,\n name: \"Celo Mainnet\",\n nativeCurrency: { name: \"Celo native asset\", symbol: \"CELO\", decimals: 18 },\n rpcUrls: {\n default: {\n http: [\"https://celo-mainnet.g.alchemy.com/v2\"]\n },\n public: {\n http: [\"https://celo-mainnet.g.alchemy.com/v2\"]\n },\n alchemy: {\n http: [\"https://celo-mainnet.g.alchemy.com/v2\"]\n }\n },\n blockExplorers: {\n default: {\n name: \"Block Explorer\",\n url: \"https://celo.blockscout.com/\"\n }\n },\n testnet: false\n });\n teaSepolia = defineChain({\n id: 10218,\n name: \"Tea Sepolia\",\n nativeCurrency: { name: \"TEA\", symbol: \"TEA\", decimals: 18 },\n rpcUrls: {\n default: {\n http: [\"https://tea-sepolia.g.alchemy.com/v2\"]\n },\n public: {\n http: [\"https://tea-sepolia.g.alchemy.com/v2\"]\n },\n alchemy: {\n http: [\"https://tea-sepolia.g.alchemy.com/v2\"]\n }\n },\n blockExplorers: {\n default: {\n name: \"Block Explorer\",\n url: \"https://sepolia.tea.xyz/\"\n }\n },\n testnet: true\n });\n bobaSepolia = defineChain({\n id: 28882,\n name: \"Boba Sepolia\",\n nativeCurrency: { name: \"eth\", symbol: \"eth\", decimals: 18 },\n rpcUrls: {\n default: {\n http: [\"https://boba-sepolia.g.alchemy.com/v2\"]\n },\n public: {\n http: [\"https://boba-sepolia.g.alchemy.com/v2\"]\n },\n alchemy: {\n http: [\"https://boba-sepolia.g.alchemy.com/v2\"]\n }\n },\n blockExplorers: {\n default: {\n name: \"Block Explorer\",\n url: \"https://sepolia.testnet.bobascan.com/\"\n }\n },\n testnet: true\n });\n bobaMainnet = defineChain({\n id: 288,\n name: \"Boba Mainnet\",\n nativeCurrency: { name: \"eth\", symbol: \"eth\", decimals: 18 },\n rpcUrls: {\n default: {\n http: [\"https://boba-mainnet.g.alchemy.com/v2\"]\n },\n public: {\n http: [\"https://boba-mainnet.g.alchemy.com/v2\"]\n },\n alchemy: {\n http: [\"https://boba-mainnet.g.alchemy.com/v2\"]\n }\n },\n blockExplorers: {\n default: {\n name: \"Block Explorer\",\n url: \"https://bobascan.com/\"\n }\n },\n testnet: false\n });\n }\n });\n\n // ../../../node_modules/.pnpm/@account-kit+logging@4.62.0/node_modules/@account-kit/logging/dist/esm/noop.js\n var noopLogger;\n var init_noop = __esm({\n \"../../../node_modules/.pnpm/@account-kit+logging@4.62.0/node_modules/@account-kit/logging/dist/esm/noop.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n noopLogger = {\n trackEvent: async () => {\n },\n _internal: {\n ready: Promise.resolve(),\n anonId: \"\"\n }\n };\n }\n });\n\n // ../../../node_modules/.pnpm/@account-kit+logging@4.62.0/node_modules/@account-kit/logging/dist/esm/index.js\n function createLogger(_context) {\n const innerLogger = noopLogger;\n const logger = {\n ...innerLogger,\n profiled(name, func) {\n return function(...args) {\n const start = Date.now();\n const result = func.apply(this, args);\n if (result instanceof Promise) {\n return result.then((res) => {\n innerLogger.trackEvent({\n name: \"performance\",\n data: {\n executionTimeMs: Date.now() - start,\n functionName: name\n }\n });\n return res;\n });\n }\n innerLogger.trackEvent({\n name: \"performance\",\n data: {\n executionTimeMs: Date.now() - start,\n functionName: name\n }\n });\n return result;\n };\n }\n };\n return logger;\n }\n var init_esm7 = __esm({\n \"../../../node_modules/.pnpm/@account-kit+logging@4.62.0/node_modules/@account-kit/logging/dist/esm/index.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_noop();\n }\n });\n\n // ../../../node_modules/.pnpm/@account-kit+infra@4.62.0_bufferutil@4.0.9_debug@4.4.1_typescript@5.8.3_utf-8-validate@_91850b8a2849fb827e3616547e4ccff7/node_modules/@account-kit/infra/dist/esm/metrics.js\n var InfraLogger;\n var init_metrics = __esm({\n \"../../../node_modules/.pnpm/@account-kit+infra@4.62.0_bufferutil@4.0.9_debug@4.4.1_typescript@5.8.3_utf-8-validate@_91850b8a2849fb827e3616547e4ccff7/node_modules/@account-kit/infra/dist/esm/metrics.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_esm7();\n init_version6();\n InfraLogger = createLogger({\n package: \"@account-kit/infra\",\n version: VERSION2\n });\n }\n });\n\n // ../../../node_modules/.pnpm/@account-kit+infra@4.62.0_bufferutil@4.0.9_debug@4.4.1_typescript@5.8.3_utf-8-validate@_91850b8a2849fb827e3616547e4ccff7/node_modules/@account-kit/infra/dist/esm/client/decorators/smartAccount.js\n function logSendUoEvent(chainId, account) {\n const signerType = isSmartAccountWithSigner(account) ? account.getSigner().signerType : \"unknown\";\n InfraLogger.trackEvent({\n name: \"client_send_uo\",\n data: {\n chainId,\n signerType,\n entryPoint: account.getEntryPoint().address\n }\n });\n }\n var alchemyActions;\n var init_smartAccount = __esm({\n \"../../../node_modules/.pnpm/@account-kit+infra@4.62.0_bufferutil@4.0.9_debug@4.4.1_typescript@5.8.3_utf-8-validate@_91850b8a2849fb827e3616547e4ccff7/node_modules/@account-kit/infra/dist/esm/client/decorators/smartAccount.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_esm6();\n init_simulateUserOperationChanges();\n init_metrics();\n alchemyActions = (client_) => ({\n simulateUserOperation: async (args) => {\n const client = clientHeaderTrack(client_, \"simulateUserOperation\");\n return simulateUserOperationChanges(client, args);\n },\n async sendUserOperation(args) {\n const client = clientHeaderTrack(client_, \"infraSendUserOperation\");\n const { account = client.account } = args;\n const result = sendUserOperation(client, args);\n logSendUoEvent(client.chain.id, account);\n return result;\n },\n sendTransaction: async (args, overrides, context2) => {\n const client = clientHeaderTrack(client_, \"sendTransaction\");\n const { account = client.account } = args;\n const result = await sendTransaction2(client, args, overrides, context2);\n logSendUoEvent(client.chain.id, account);\n return result;\n },\n async sendTransactions(args) {\n const client = clientHeaderTrack(client_, \"sendTransactions\");\n const { account = client.account } = args;\n const result = sendTransactions(client, args);\n logSendUoEvent(client.chain.id, account);\n return result;\n }\n });\n }\n });\n\n // ../../../node_modules/.pnpm/@account-kit+infra@4.62.0_bufferutil@4.0.9_debug@4.4.1_typescript@5.8.3_utf-8-validate@_91850b8a2849fb827e3616547e4ccff7/node_modules/@account-kit/infra/dist/esm/client/rpcClient.js\n var createAlchemyPublicRpcClient;\n var init_rpcClient = __esm({\n \"../../../node_modules/.pnpm/@account-kit+infra@4.62.0_bufferutil@4.0.9_debug@4.4.1_typescript@5.8.3_utf-8-validate@_91850b8a2849fb827e3616547e4ccff7/node_modules/@account-kit/infra/dist/esm/client/rpcClient.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_esm6();\n createAlchemyPublicRpcClient = ({ transport, chain: chain2 }) => {\n return createBundlerClient({\n chain: chain2,\n transport\n });\n };\n }\n });\n\n // ../../../node_modules/.pnpm/@account-kit+infra@4.62.0_bufferutil@4.0.9_debug@4.4.1_typescript@5.8.3_utf-8-validate@_91850b8a2849fb827e3616547e4ccff7/node_modules/@account-kit/infra/dist/esm/defaults.js\n var getDefaultUserOperationFeeOptions2;\n var init_defaults2 = __esm({\n \"../../../node_modules/.pnpm/@account-kit+infra@4.62.0_bufferutil@4.0.9_debug@4.4.1_typescript@5.8.3_utf-8-validate@_91850b8a2849fb827e3616547e4ccff7/node_modules/@account-kit/infra/dist/esm/defaults.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_chains2();\n getDefaultUserOperationFeeOptions2 = (chain2) => {\n const feeOptions = {\n maxFeePerGas: { multiplier: 1.5 },\n maxPriorityFeePerGas: { multiplier: 1.05 }\n };\n if ((/* @__PURE__ */ new Set([\n arbitrum2.id,\n arbitrumGoerli2.id,\n arbitrumSepolia2.id,\n optimism2.id,\n optimismGoerli2.id,\n optimismSepolia2.id\n ])).has(chain2.id)) {\n feeOptions.preVerificationGas = { multiplier: 1.05 };\n }\n return feeOptions;\n };\n }\n });\n\n // ../../../node_modules/.pnpm/@account-kit+infra@4.62.0_bufferutil@4.0.9_debug@4.4.1_typescript@5.8.3_utf-8-validate@_91850b8a2849fb827e3616547e4ccff7/node_modules/@account-kit/infra/dist/esm/middleware/feeEstimator.js\n var alchemyFeeEstimator;\n var init_feeEstimator2 = __esm({\n \"../../../node_modules/.pnpm/@account-kit+infra@4.62.0_bufferutil@4.0.9_debug@4.4.1_typescript@5.8.3_utf-8-validate@_91850b8a2849fb827e3616547e4ccff7/node_modules/@account-kit/infra/dist/esm/middleware/feeEstimator.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_esm6();\n alchemyFeeEstimator = (transport) => async (struct, { overrides, feeOptions, client: client_ }) => {\n const client = clientHeaderTrack(client_, \"alchemyFeeEstimator\");\n const transport_ = transport({ chain: client.chain });\n let [block, maxPriorityFeePerGasEstimate] = await Promise.all([\n client.getBlock({ blockTag: \"latest\" }),\n // it is a fair assumption that if someone is using this Alchemy Middleware, then they are using Alchemy RPC\n transport_.request({\n method: \"rundler_maxPriorityFeePerGas\",\n params: []\n })\n ]);\n const baseFeePerGas = block.baseFeePerGas;\n if (baseFeePerGas == null) {\n throw new Error(\"baseFeePerGas is null\");\n }\n const maxPriorityFeePerGas = applyUserOpOverrideOrFeeOption(maxPriorityFeePerGasEstimate, overrides?.maxPriorityFeePerGas, feeOptions?.maxPriorityFeePerGas);\n const maxFeePerGas = applyUserOpOverrideOrFeeOption(bigIntMultiply(baseFeePerGas, 1.5) + BigInt(maxPriorityFeePerGas), overrides?.maxFeePerGas, feeOptions?.maxFeePerGas);\n return {\n ...struct,\n maxPriorityFeePerGas,\n maxFeePerGas\n };\n };\n }\n });\n\n // ../../../node_modules/.pnpm/@account-kit+infra@4.62.0_bufferutil@4.0.9_debug@4.4.1_typescript@5.8.3_utf-8-validate@_91850b8a2849fb827e3616547e4ccff7/node_modules/@account-kit/infra/dist/esm/gas-manager.js\n var AlchemyPaymasterAddressV06Unify, AlchemyPaymasterAddressV07Unify, AlchemyPaymasterAddressV4, AlchemyPaymasterAddressV3, AlchemyPaymasterAddressV2, ArbSepoliaPaymasterAddress, AlchemyPaymasterAddressV1, AlchemyPaymasterAddressV07V2, AlchemyPaymasterAddressV07V1, getAlchemyPaymasterAddress, PermitTypes, ERC20Abis, EIP7597Abis;\n var init_gas_manager = __esm({\n \"../../../node_modules/.pnpm/@account-kit+infra@4.62.0_bufferutil@4.0.9_debug@4.4.1_typescript@5.8.3_utf-8-validate@_91850b8a2849fb827e3616547e4ccff7/node_modules/@account-kit/infra/dist/esm/gas-manager.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_chains2();\n AlchemyPaymasterAddressV06Unify = \"0x0000000000ce04e2359130e7d0204A5249958921\";\n AlchemyPaymasterAddressV07Unify = \"0x00000000000667F27D4DB42334ec11a25db7EBb4\";\n AlchemyPaymasterAddressV4 = \"0xEaf0Cde110a5d503f2dD69B3a49E031e29b3F9D2\";\n AlchemyPaymasterAddressV3 = \"0x4f84a207A80c39E9e8BaE717c1F25bA7AD1fB08F\";\n AlchemyPaymasterAddressV2 = \"0x4Fd9098af9ddcB41DA48A1d78F91F1398965addc\";\n ArbSepoliaPaymasterAddress = \"0x0804Afe6EEFb73ce7F93CD0d5e7079a5a8068592\";\n AlchemyPaymasterAddressV1 = \"0xc03aac639bb21233e0139381970328db8bceeb67\";\n AlchemyPaymasterAddressV07V2 = \"0x2cc0c7981D846b9F2a16276556f6e8cb52BfB633\";\n AlchemyPaymasterAddressV07V1 = \"0xEF725Aa22d43Ea69FB22bE2EBe6ECa205a6BCf5B\";\n getAlchemyPaymasterAddress = (chain2, version6) => {\n switch (version6) {\n case \"0.6.0\":\n switch (chain2.id) {\n case fraxtalSepolia.id:\n case worldChainSepolia.id:\n case shapeSepolia.id:\n case unichainSepolia.id:\n case opbnbTestnet.id:\n case inkSepolia.id:\n case monadTestnet.id:\n case openlootSepolia.id:\n case gensynTestnet.id:\n case riseTestnet.id:\n case storyAeneid.id:\n case teaSepolia.id:\n case arbitrumGoerli2.id:\n case goerli2.id:\n case optimismGoerli2.id:\n case baseGoerli2.id:\n case polygonMumbai2.id:\n case worldChain.id:\n case shape.id:\n case unichainMainnet.id:\n case soneiumMinato.id:\n case soneiumMainnet.id:\n case opbnbMainnet.id:\n case beraChainBartio.id:\n case inkMainnet.id:\n case arbitrumNova2.id:\n case storyMainnet.id:\n case celoAlfajores.id:\n case celoMainnet.id:\n return AlchemyPaymasterAddressV4;\n case polygonAmoy2.id:\n case optimismSepolia2.id:\n case baseSepolia2.id:\n case zora2.id:\n case zoraSepolia2.id:\n case fraxtal2.id:\n return AlchemyPaymasterAddressV3;\n case mainnet2.id:\n case arbitrum2.id:\n case optimism2.id:\n case polygon2.id:\n case base2.id:\n return AlchemyPaymasterAddressV2;\n case arbitrumSepolia2.id:\n return ArbSepoliaPaymasterAddress;\n case sepolia2.id:\n return AlchemyPaymasterAddressV1;\n default:\n return AlchemyPaymasterAddressV06Unify;\n }\n case \"0.7.0\":\n switch (chain2.id) {\n case arbitrumNova2.id:\n case celoAlfajores.id:\n case celoMainnet.id:\n case gensynTestnet.id:\n case inkMainnet.id:\n case inkSepolia.id:\n case monadTestnet.id:\n case opbnbMainnet.id:\n case opbnbTestnet.id:\n case openlootSepolia.id:\n case riseTestnet.id:\n case shape.id:\n case shapeSepolia.id:\n case soneiumMainnet.id:\n case soneiumMinato.id:\n case storyAeneid.id:\n case storyMainnet.id:\n case teaSepolia.id:\n case unichainMainnet.id:\n case unichainSepolia.id:\n case worldChain.id:\n case worldChainSepolia.id:\n return AlchemyPaymasterAddressV07V1;\n case arbitrum2.id:\n case arbitrumGoerli2.id:\n case arbitrumSepolia2.id:\n case base2.id:\n case baseGoerli2.id:\n case baseSepolia2.id:\n case beraChainBartio.id:\n case fraxtal2.id:\n case fraxtalSepolia.id:\n case goerli2.id:\n case mainnet2.id:\n case optimism2.id:\n case optimismGoerli2.id:\n case optimismSepolia2.id:\n case polygon2.id:\n case polygonAmoy2.id:\n case polygonMumbai2.id:\n case sepolia2.id:\n case zora2.id:\n case zoraSepolia2.id:\n return AlchemyPaymasterAddressV07V2;\n default:\n return AlchemyPaymasterAddressV07Unify;\n }\n default:\n throw new Error(`Unsupported EntryPointVersion: ${version6}`);\n }\n };\n PermitTypes = {\n EIP712Domain: [\n { name: \"name\", type: \"string\" },\n { name: \"version\", type: \"string\" },\n { name: \"chainId\", type: \"uint256\" },\n { name: \"verifyingContract\", type: \"address\" }\n ],\n Permit: [\n { name: \"owner\", type: \"address\" },\n { name: \"spender\", type: \"address\" },\n { name: \"value\", type: \"uint256\" },\n { name: \"nonce\", type: \"uint256\" },\n { name: \"deadline\", type: \"uint256\" }\n ]\n };\n ERC20Abis = [\n \"function decimals() public view returns (uint8)\",\n \"function balanceOf(address owner) external view returns (uint256)\",\n \"function allowance(address owner, address spender) external view returns (uint256)\",\n \"function approve(address spender, uint256 amount) external returns (bool)\"\n ];\n EIP7597Abis = [\n \"function nonces(address owner) external view returns (uint)\"\n ];\n }\n });\n\n // ../../../node_modules/.pnpm/@account-kit+infra@4.62.0_bufferutil@4.0.9_debug@4.4.1_typescript@5.8.3_utf-8-validate@_91850b8a2849fb827e3616547e4ccff7/node_modules/@account-kit/infra/dist/esm/errors/base.js\n var BaseError5;\n var init_base4 = __esm({\n \"../../../node_modules/.pnpm/@account-kit+infra@4.62.0_bufferutil@4.0.9_debug@4.4.1_typescript@5.8.3_utf-8-validate@_91850b8a2849fb827e3616547e4ccff7/node_modules/@account-kit/infra/dist/esm/errors/base.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_esm6();\n init_version6();\n BaseError5 = class extends BaseError4 {\n constructor() {\n super(...arguments);\n Object.defineProperty(this, \"version\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: VERSION2\n });\n }\n };\n }\n });\n\n // ../../../node_modules/.pnpm/@account-kit+infra@4.62.0_bufferutil@4.0.9_debug@4.4.1_typescript@5.8.3_utf-8-validate@_91850b8a2849fb827e3616547e4ccff7/node_modules/@account-kit/infra/dist/esm/errors/invalidSignedPermit.js\n var InvalidSignedPermit;\n var init_invalidSignedPermit = __esm({\n \"../../../node_modules/.pnpm/@account-kit+infra@4.62.0_bufferutil@4.0.9_debug@4.4.1_typescript@5.8.3_utf-8-validate@_91850b8a2849fb827e3616547e4ccff7/node_modules/@account-kit/infra/dist/esm/errors/invalidSignedPermit.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_base4();\n InvalidSignedPermit = class extends BaseError5 {\n constructor(reason) {\n super([\"Invalid signed permit\"].join(\"\\n\"), {\n details: [reason, \"Please provide a valid signed permit\"].join(\"\\n\")\n });\n Object.defineProperty(this, \"name\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: \"InvalidSignedPermit\"\n });\n }\n };\n }\n });\n\n // ../../../node_modules/.pnpm/@account-kit+infra@4.62.0_bufferutil@4.0.9_debug@4.4.1_typescript@5.8.3_utf-8-validate@_91850b8a2849fb827e3616547e4ccff7/node_modules/@account-kit/infra/dist/esm/middleware/gasManager.js\n function alchemyGasManagerMiddleware(policyId, policyToken) {\n const buildContext = async (args) => {\n const context2 = { policyId };\n const { account, client } = args;\n if (!client.chain) {\n throw new ChainNotFoundError2();\n }\n if (policyToken !== void 0) {\n context2.erc20Context = {\n tokenAddress: policyToken.address,\n maxTokenAmount: policyToken.maxTokenAmount\n };\n if (policyToken.permit !== void 0) {\n const permit = await generateSignedPermit(client, account, policyToken);\n if (permit !== void 0) {\n context2.erc20Context.permit = permit;\n }\n } else if (args.context !== void 0) {\n context2.erc20Context.permit = extractSignedPermitFromContext(args.context);\n }\n }\n return context2;\n };\n return {\n dummyPaymasterAndData: async (uo, args) => {\n const context2 = await buildContext(args);\n const baseMiddleware = erc7677Middleware({ context: context2 });\n return baseMiddleware.dummyPaymasterAndData(uo, args);\n },\n paymasterAndData: async (uo, args) => {\n const context2 = await buildContext(args);\n const baseMiddleware = erc7677Middleware({ context: context2 });\n return baseMiddleware.paymasterAndData(uo, args);\n }\n };\n }\n function alchemyGasAndPaymasterAndDataMiddleware(params) {\n const { policyId, policyToken, transport, gasEstimatorOverride, feeEstimatorOverride } = params;\n return {\n dummyPaymasterAndData: async (uo, args) => {\n if (\n // No reason to generate dummy data if we are bypassing the paymaster.\n bypassPaymasterAndData(args.overrides) || // When using alchemy_requestGasAndPaymasterAndData, there is generally no reason to generate dummy\n // data. However, if the gas/feeEstimator is overriden, then this option should be enabled.\n !(gasEstimatorOverride || feeEstimatorOverride)\n ) {\n return noopMiddleware(uo, args);\n }\n return alchemyGasManagerMiddleware(policyId, policyToken).dummyPaymasterAndData(uo, args);\n },\n feeEstimator: (uo, args) => {\n return feeEstimatorOverride ? feeEstimatorOverride(uo, args) : bypassPaymasterAndData(args.overrides) ? alchemyFeeEstimator(transport)(uo, args) : noopMiddleware(uo, args);\n },\n gasEstimator: (uo, args) => {\n return gasEstimatorOverride ? gasEstimatorOverride(uo, args) : bypassPaymasterAndData(args.overrides) ? defaultGasEstimator(args.client)(uo, args) : noopMiddleware(uo, args);\n },\n paymasterAndData: async (uo, { account, client: client_, feeOptions, overrides: overrides_, context: uoContext }) => {\n const client = clientHeaderTrack(client_, \"alchemyFeeEstimator\");\n if (!client.chain) {\n throw new ChainNotFoundError2();\n }\n const userOp = deepHexlify(await resolveProperties(uo));\n const overrides = filterUndefined({\n maxFeePerGas: overrideField(\"maxFeePerGas\", overrides_, feeOptions, userOp),\n maxPriorityFeePerGas: overrideField(\"maxPriorityFeePerGas\", overrides_, feeOptions, userOp),\n callGasLimit: overrideField(\"callGasLimit\", overrides_, feeOptions, userOp),\n verificationGasLimit: overrideField(\"verificationGasLimit\", overrides_, feeOptions, userOp),\n preVerificationGas: overrideField(\"preVerificationGas\", overrides_, feeOptions, userOp),\n ...account.getEntryPoint().version === \"0.7.0\" ? {\n paymasterVerificationGasLimit: overrideField(\"paymasterVerificationGasLimit\", overrides_, feeOptions, userOp),\n paymasterPostOpGasLimit: overrideField(\"paymasterPostOpGasLimit\", overrides_, feeOptions, userOp)\n } : {}\n });\n let erc20Context = void 0;\n if (policyToken !== void 0) {\n erc20Context = {\n tokenAddress: policyToken.address,\n maxTokenAmount: policyToken.maxTokenAmount\n };\n if (policyToken.permit !== void 0) {\n const permit = await generateSignedPermit(client, account, policyToken);\n if (permit !== void 0) {\n erc20Context.permit = permit;\n }\n } else if (uoContext !== void 0) {\n erc20Context.permit = extractSignedPermitFromContext(uoContext);\n }\n }\n const result = await client.request({\n method: \"alchemy_requestGasAndPaymasterAndData\",\n params: [\n {\n policyId,\n entryPoint: account.getEntryPoint().address,\n userOperation: userOp,\n dummySignature: await account.getDummySignature(),\n overrides,\n ...erc20Context ? {\n erc20Context\n } : {}\n }\n ]\n });\n return {\n ...uo,\n ...result\n };\n }\n };\n }\n function extractSignedPermitFromContext(context2) {\n if (context2.signedPermit === void 0) {\n return void 0;\n }\n if (typeof context2.signedPermit !== \"object\") {\n throw new InvalidSignedPermit(\"signedPermit is not an object\");\n }\n if (typeof context2.signedPermit.value !== \"bigint\") {\n throw new InvalidSignedPermit(\"signedPermit.value is not a bigint\");\n }\n if (typeof context2.signedPermit.deadline !== \"bigint\") {\n throw new InvalidSignedPermit(\"signedPermit.deadline is not a bigint\");\n }\n if (!isHex(context2.signedPermit.signature)) {\n throw new InvalidSignedPermit(\"signedPermit.signature is not a hex string\");\n }\n return encodeSignedPermit(context2.signedPermit.value, context2.signedPermit.deadline, context2.signedPermit.signature);\n }\n function encodeSignedPermit(value, deadline, signedPermit) {\n return encodeAbiParameters([{ type: \"uint256\" }, { type: \"uint256\" }, { type: \"bytes\" }], [value, deadline, signedPermit]);\n }\n var overrideField, generateSignedPermit;\n var init_gasManager = __esm({\n \"../../../node_modules/.pnpm/@account-kit+infra@4.62.0_bufferutil@4.0.9_debug@4.4.1_typescript@5.8.3_utf-8-validate@_91850b8a2849fb827e3616547e4ccff7/node_modules/@account-kit/infra/dist/esm/middleware/gasManager.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_esm6();\n init_esm();\n init_feeEstimator2();\n init_gas_manager();\n init_invalidSignedPermit();\n overrideField = (field, overrides, feeOptions, userOperation) => {\n let _field = field;\n if (overrides?.[_field] != null) {\n if (isBigNumberish(overrides[_field])) {\n return deepHexlify(overrides[_field]);\n } else {\n return {\n multiplier: Number(overrides[_field].multiplier)\n };\n }\n }\n if (isMultiplier(feeOptions?.[field])) {\n return {\n multiplier: Number(feeOptions[field].multiplier)\n };\n }\n const userOpField = userOperation[field];\n if (isHex(userOpField) && fromHex(userOpField, \"bigint\") > 0n) {\n return userOpField;\n }\n return void 0;\n };\n generateSignedPermit = async (client, account, policyToken) => {\n if (!client.chain) {\n throw new ChainNotFoundError2();\n }\n if (!policyToken.permit) {\n throw new Error(\"permit is missing\");\n }\n if (!policyToken.permit?.erc20Name || !policyToken.permit?.version) {\n throw new Error(\"erc20Name or version is missing\");\n }\n const paymasterAddress = policyToken.permit.paymasterAddress ?? getAlchemyPaymasterAddress(client.chain, account.getEntryPoint().version);\n if (paymasterAddress === void 0 || paymasterAddress === \"0x\") {\n throw new Error(\"no paymaster contract address available\");\n }\n let allowanceFuture = client.call({\n to: policyToken.address,\n data: encodeFunctionData({\n abi: parseAbi(ERC20Abis),\n functionName: \"allowance\",\n args: [account.address, paymasterAddress]\n })\n });\n let nonceFuture = client.call({\n to: policyToken.address,\n data: encodeFunctionData({\n abi: parseAbi(EIP7597Abis),\n functionName: \"nonces\",\n args: [account.address]\n })\n });\n const [allowanceResponse, nonceResponse] = await Promise.all([\n allowanceFuture,\n nonceFuture\n ]);\n if (!allowanceResponse.data) {\n throw new Error(\"No allowance returned from erc20 contract call\");\n }\n if (!nonceResponse.data) {\n throw new Error(\"No nonces returned from erc20 contract call\");\n }\n const permitLimit = policyToken.permit.autoPermitApproveTo;\n const currentAllowance = BigInt(allowanceResponse.data);\n if (currentAllowance > policyToken.permit.autoPermitBelow) {\n return void 0;\n }\n const nonce = BigInt(nonceResponse.data);\n const deadline = BigInt(Math.floor(Date.now() / 1e3) + 60 * 10);\n const typedPermitData = {\n types: PermitTypes,\n primaryType: \"Permit\",\n domain: {\n name: policyToken.permit.erc20Name ?? \"\",\n version: policyToken.permit.version ?? \"\",\n chainId: BigInt(client.chain.id),\n verifyingContract: policyToken.address\n },\n message: {\n owner: account.address,\n spender: paymasterAddress,\n value: permitLimit,\n nonce,\n deadline\n }\n };\n const signedPermit = await account.signTypedData(typedPermitData);\n return encodeSignedPermit(permitLimit, deadline, signedPermit);\n };\n }\n });\n\n // ../../../node_modules/.pnpm/@account-kit+infra@4.62.0_bufferutil@4.0.9_debug@4.4.1_typescript@5.8.3_utf-8-validate@_91850b8a2849fb827e3616547e4ccff7/node_modules/@account-kit/infra/dist/esm/middleware/userOperationSimulator.js\n function alchemyUserOperationSimulator(transport) {\n return async (struct, { account, client }) => {\n const uoSimResult = await transport({ chain: client.chain }).request({\n method: \"alchemy_simulateUserOperationAssetChanges\",\n params: [\n deepHexlify(await resolveProperties(struct)),\n account.getEntryPoint().address\n ]\n });\n if (uoSimResult.error) {\n throw new Error(uoSimResult.error.message);\n }\n return struct;\n };\n }\n var init_userOperationSimulator = __esm({\n \"../../../node_modules/.pnpm/@account-kit+infra@4.62.0_bufferutil@4.0.9_debug@4.4.1_typescript@5.8.3_utf-8-validate@_91850b8a2849fb827e3616547e4ccff7/node_modules/@account-kit/infra/dist/esm/middleware/userOperationSimulator.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_esm6();\n }\n });\n\n // ../../../node_modules/.pnpm/@account-kit+infra@4.62.0_bufferutil@4.0.9_debug@4.4.1_typescript@5.8.3_utf-8-validate@_91850b8a2849fb827e3616547e4ccff7/node_modules/@account-kit/infra/dist/esm/client/smartAccountClient.js\n function getSignerTypeHeader(account) {\n return { \"Alchemy-Aa-Sdk-Signer\": account.getSigner().signerType };\n }\n function createAlchemySmartAccountClient(config2) {\n if (!config2.chain) {\n throw new ChainNotFoundError2();\n }\n const feeOptions = config2.opts?.feeOptions ?? getDefaultUserOperationFeeOptions2(config2.chain);\n const scaClient = createSmartAccountClient({\n account: config2.account,\n transport: config2.transport,\n chain: config2.chain,\n type: \"AlchemySmartAccountClient\",\n opts: {\n ...config2.opts,\n feeOptions\n },\n feeEstimator: config2.feeEstimator ?? alchemyFeeEstimator(config2.transport),\n gasEstimator: config2.gasEstimator,\n customMiddleware: async (struct, args) => {\n if (isSmartAccountWithSigner(args.account)) {\n config2.transport.updateHeaders(getSignerTypeHeader(args.account));\n }\n return config2.customMiddleware ? config2.customMiddleware(struct, args) : struct;\n },\n ...config2.policyId ? alchemyGasAndPaymasterAndDataMiddleware({\n policyId: config2.policyId,\n policyToken: config2.policyToken,\n transport: config2.transport,\n gasEstimatorOverride: config2.gasEstimator,\n feeEstimatorOverride: config2.feeEstimator\n }) : {},\n userOperationSimulator: config2.useSimulation ? alchemyUserOperationSimulator(config2.transport) : void 0,\n signUserOperation: config2.signUserOperation,\n addBreadCrumb(breadcrumb) {\n const oldConfig = config2.transport.config;\n const dynamicFetchOptions = config2.transport.dynamicFetchOptions;\n const newTransport = alchemy({ ...oldConfig });\n newTransport.updateHeaders(headersUpdate(breadcrumb)(convertHeadersToObject(dynamicFetchOptions?.headers)));\n return createAlchemySmartAccountClient({\n ...config2,\n transport: newTransport\n });\n }\n }).extend(alchemyActions).extend((client_) => ({\n addBreadcrumb(breadcrumb) {\n return clientHeaderTrack(client_, breadcrumb);\n }\n }));\n if (config2.account && isSmartAccountWithSigner(config2.account)) {\n config2.transport.updateHeaders(getSignerTypeHeader(config2.account));\n }\n return scaClient;\n }\n var init_smartAccountClient3 = __esm({\n \"../../../node_modules/.pnpm/@account-kit+infra@4.62.0_bufferutil@4.0.9_debug@4.4.1_typescript@5.8.3_utf-8-validate@_91850b8a2849fb827e3616547e4ccff7/node_modules/@account-kit/infra/dist/esm/client/smartAccountClient.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_esm6();\n init_alchemyTransport();\n init_defaults2();\n init_feeEstimator2();\n init_gasManager();\n init_userOperationSimulator();\n init_smartAccount();\n init_alchemyTrackerHeaders();\n }\n });\n\n // ../../../node_modules/.pnpm/@account-kit+infra@4.62.0_bufferutil@4.0.9_debug@4.4.1_typescript@5.8.3_utf-8-validate@_91850b8a2849fb827e3616547e4ccff7/node_modules/@account-kit/infra/dist/esm/exports/index.js\n var exports_exports2 = {};\n __export(exports_exports2, {\n alchemy: () => alchemy,\n alchemyActions: () => alchemyActions,\n alchemyFeeEstimator: () => alchemyFeeEstimator,\n alchemyGasAndPaymasterAndDataMiddleware: () => alchemyGasAndPaymasterAndDataMiddleware,\n alchemyGasManagerMiddleware: () => alchemyGasManagerMiddleware,\n alchemyUserOperationSimulator: () => alchemyUserOperationSimulator,\n arbitrum: () => arbitrum2,\n arbitrumGoerli: () => arbitrumGoerli2,\n arbitrumNova: () => arbitrumNova2,\n arbitrumSepolia: () => arbitrumSepolia2,\n base: () => base2,\n baseGoerli: () => baseGoerli2,\n baseSepolia: () => baseSepolia2,\n beraChainBartio: () => beraChainBartio,\n bobaMainnet: () => bobaMainnet,\n bobaSepolia: () => bobaSepolia,\n celoAlfajores: () => celoAlfajores,\n celoMainnet: () => celoMainnet,\n createAlchemyPublicRpcClient: () => createAlchemyPublicRpcClient,\n createAlchemySmartAccountClient: () => createAlchemySmartAccountClient,\n defineAlchemyChain: () => defineAlchemyChain,\n fraxtal: () => fraxtal2,\n fraxtalSepolia: () => fraxtalSepolia,\n gensynTestnet: () => gensynTestnet,\n getAlchemyPaymasterAddress: () => getAlchemyPaymasterAddress,\n getDefaultUserOperationFeeOptions: () => getDefaultUserOperationFeeOptions2,\n goerli: () => goerli2,\n headersUpdate: () => headersUpdate,\n inkMainnet: () => inkMainnet,\n inkSepolia: () => inkSepolia,\n isAlchemySmartAccountClient: () => isAlchemySmartAccountClient,\n isAlchemyTransport: () => isAlchemyTransport,\n mainnet: () => mainnet2,\n mekong: () => mekong,\n monadTestnet: () => monadTestnet,\n mutateRemoveTrackingHeaders: () => mutateRemoveTrackingHeaders,\n opbnbMainnet: () => opbnbMainnet,\n opbnbTestnet: () => opbnbTestnet,\n openlootSepolia: () => openlootSepolia,\n optimism: () => optimism2,\n optimismGoerli: () => optimismGoerli2,\n optimismSepolia: () => optimismSepolia2,\n polygon: () => polygon2,\n polygonAmoy: () => polygonAmoy2,\n polygonMumbai: () => polygonMumbai2,\n riseTestnet: () => riseTestnet,\n sepolia: () => sepolia2,\n shape: () => shape,\n shapeSepolia: () => shapeSepolia,\n simulateUserOperationChanges: () => simulateUserOperationChanges,\n soneiumMainnet: () => soneiumMainnet,\n soneiumMinato: () => soneiumMinato,\n storyAeneid: () => storyAeneid,\n storyMainnet: () => storyMainnet,\n teaSepolia: () => teaSepolia,\n unichainMainnet: () => unichainMainnet,\n unichainSepolia: () => unichainSepolia,\n worldChain: () => worldChain,\n worldChainSepolia: () => worldChainSepolia,\n zora: () => zora2,\n zoraSepolia: () => zoraSepolia2\n });\n var init_exports2 = __esm({\n \"../../../node_modules/.pnpm/@account-kit+infra@4.62.0_bufferutil@4.0.9_debug@4.4.1_typescript@5.8.3_utf-8-validate@_91850b8a2849fb827e3616547e4ccff7/node_modules/@account-kit/infra/dist/esm/exports/index.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_simulateUserOperationChanges();\n init_alchemyTransport();\n init_chains2();\n init_smartAccount();\n init_isAlchemySmartAccountClient();\n init_rpcClient();\n init_smartAccountClient3();\n init_defaults2();\n init_gas_manager();\n init_feeEstimator2();\n init_alchemyTrackerHeaders();\n init_gasManager();\n init_userOperationSimulator();\n }\n });\n\n // ../../../node_modules/.pnpm/@account-kit+smart-contracts@4.62.0_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5._65dee0153d50ca3a2d2c6830319271d9/node_modules/@account-kit/smart-contracts/dist/esm/src/light-account/abis/LightAccountAbi_v1.js\n var LightAccountAbi_v1;\n var init_LightAccountAbi_v1 = __esm({\n \"../../../node_modules/.pnpm/@account-kit+smart-contracts@4.62.0_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5._65dee0153d50ca3a2d2c6830319271d9/node_modules/@account-kit/smart-contracts/dist/esm/src/light-account/abis/LightAccountAbi_v1.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n LightAccountAbi_v1 = [\n {\n inputs: [\n {\n internalType: \"contract IEntryPoint\",\n name: \"anEntryPoint\",\n type: \"address\"\n }\n ],\n stateMutability: \"nonpayable\",\n type: \"constructor\"\n },\n { inputs: [], name: \"ArrayLengthMismatch\", type: \"error\" },\n { inputs: [], name: \"InvalidInitialization\", type: \"error\" },\n {\n inputs: [{ internalType: \"address\", name: \"owner\", type: \"address\" }],\n name: \"InvalidOwner\",\n type: \"error\"\n },\n {\n inputs: [{ internalType: \"address\", name: \"caller\", type: \"address\" }],\n name: \"NotAuthorized\",\n type: \"error\"\n },\n { inputs: [], name: \"NotInitializing\", type: \"error\" },\n {\n anonymous: false,\n inputs: [\n {\n indexed: false,\n internalType: \"address\",\n name: \"previousAdmin\",\n type: \"address\"\n },\n {\n indexed: false,\n internalType: \"address\",\n name: \"newAdmin\",\n type: \"address\"\n }\n ],\n name: \"AdminChanged\",\n type: \"event\"\n },\n {\n anonymous: false,\n inputs: [\n {\n indexed: true,\n internalType: \"address\",\n name: \"beacon\",\n type: \"address\"\n }\n ],\n name: \"BeaconUpgraded\",\n type: \"event\"\n },\n {\n anonymous: false,\n inputs: [\n {\n indexed: false,\n internalType: \"uint64\",\n name: \"version\",\n type: \"uint64\"\n }\n ],\n name: \"Initialized\",\n type: \"event\"\n },\n {\n anonymous: false,\n inputs: [\n {\n indexed: true,\n internalType: \"contract IEntryPoint\",\n name: \"entryPoint\",\n type: \"address\"\n },\n {\n indexed: true,\n internalType: \"address\",\n name: \"owner\",\n type: \"address\"\n }\n ],\n name: \"LightAccountInitialized\",\n type: \"event\"\n },\n {\n anonymous: false,\n inputs: [\n {\n indexed: true,\n internalType: \"address\",\n name: \"previousOwner\",\n type: \"address\"\n },\n {\n indexed: true,\n internalType: \"address\",\n name: \"newOwner\",\n type: \"address\"\n }\n ],\n name: \"OwnershipTransferred\",\n type: \"event\"\n },\n {\n anonymous: false,\n inputs: [\n {\n indexed: true,\n internalType: \"address\",\n name: \"implementation\",\n type: \"address\"\n }\n ],\n name: \"Upgraded\",\n type: \"event\"\n },\n {\n inputs: [],\n name: \"addDeposit\",\n outputs: [],\n stateMutability: \"payable\",\n type: \"function\"\n },\n {\n inputs: [],\n name: \"domainSeparator\",\n outputs: [{ internalType: \"bytes32\", name: \"\", type: \"bytes32\" }],\n stateMutability: \"view\",\n type: \"function\"\n },\n {\n inputs: [{ internalType: \"bytes\", name: \"message\", type: \"bytes\" }],\n name: \"encodeMessageData\",\n outputs: [{ internalType: \"bytes\", name: \"\", type: \"bytes\" }],\n stateMutability: \"view\",\n type: \"function\"\n },\n {\n inputs: [],\n name: \"entryPoint\",\n outputs: [\n { internalType: \"contract IEntryPoint\", name: \"\", type: \"address\" }\n ],\n stateMutability: \"view\",\n type: \"function\"\n },\n {\n inputs: [\n { internalType: \"address\", name: \"dest\", type: \"address\" },\n { internalType: \"uint256\", name: \"value\", type: \"uint256\" },\n { internalType: \"bytes\", name: \"func\", type: \"bytes\" }\n ],\n name: \"execute\",\n outputs: [],\n stateMutability: \"nonpayable\",\n type: \"function\"\n },\n {\n inputs: [\n { internalType: \"address[]\", name: \"dest\", type: \"address[]\" },\n { internalType: \"bytes[]\", name: \"func\", type: \"bytes[]\" }\n ],\n name: \"executeBatch\",\n outputs: [],\n stateMutability: \"nonpayable\",\n type: \"function\"\n },\n {\n inputs: [\n { internalType: \"address[]\", name: \"dest\", type: \"address[]\" },\n { internalType: \"uint256[]\", name: \"value\", type: \"uint256[]\" },\n { internalType: \"bytes[]\", name: \"func\", type: \"bytes[]\" }\n ],\n name: \"executeBatch\",\n outputs: [],\n stateMutability: \"nonpayable\",\n type: \"function\"\n },\n {\n inputs: [],\n name: \"getDeposit\",\n outputs: [{ internalType: \"uint256\", name: \"\", type: \"uint256\" }],\n stateMutability: \"view\",\n type: \"function\"\n },\n {\n inputs: [{ internalType: \"bytes\", name: \"message\", type: \"bytes\" }],\n name: \"getMessageHash\",\n outputs: [{ internalType: \"bytes32\", name: \"\", type: \"bytes32\" }],\n stateMutability: \"view\",\n type: \"function\"\n },\n {\n inputs: [],\n name: \"getNonce\",\n outputs: [{ internalType: \"uint256\", name: \"\", type: \"uint256\" }],\n stateMutability: \"view\",\n type: \"function\"\n },\n {\n inputs: [{ internalType: \"address\", name: \"anOwner\", type: \"address\" }],\n name: \"initialize\",\n outputs: [],\n stateMutability: \"nonpayable\",\n type: \"function\"\n },\n {\n inputs: [\n { internalType: \"bytes32\", name: \"digest\", type: \"bytes32\" },\n { internalType: \"bytes\", name: \"signature\", type: \"bytes\" }\n ],\n name: \"isValidSignature\",\n outputs: [{ internalType: \"bytes4\", name: \"\", type: \"bytes4\" }],\n stateMutability: \"view\",\n type: \"function\"\n },\n {\n inputs: [\n { internalType: \"address\", name: \"\", type: \"address\" },\n { internalType: \"address\", name: \"\", type: \"address\" },\n { internalType: \"uint256[]\", name: \"\", type: \"uint256[]\" },\n { internalType: \"uint256[]\", name: \"\", type: \"uint256[]\" },\n { internalType: \"bytes\", name: \"\", type: \"bytes\" }\n ],\n name: \"onERC1155BatchReceived\",\n outputs: [{ internalType: \"bytes4\", name: \"\", type: \"bytes4\" }],\n stateMutability: \"pure\",\n type: \"function\"\n },\n {\n inputs: [\n { internalType: \"address\", name: \"\", type: \"address\" },\n { internalType: \"address\", name: \"\", type: \"address\" },\n { internalType: \"uint256\", name: \"\", type: \"uint256\" },\n { internalType: \"uint256\", name: \"\", type: \"uint256\" },\n { internalType: \"bytes\", name: \"\", type: \"bytes\" }\n ],\n name: \"onERC1155Received\",\n outputs: [{ internalType: \"bytes4\", name: \"\", type: \"bytes4\" }],\n stateMutability: \"pure\",\n type: \"function\"\n },\n {\n inputs: [\n { internalType: \"address\", name: \"\", type: \"address\" },\n { internalType: \"address\", name: \"\", type: \"address\" },\n { internalType: \"uint256\", name: \"\", type: \"uint256\" },\n { internalType: \"bytes\", name: \"\", type: \"bytes\" }\n ],\n name: \"onERC721Received\",\n outputs: [{ internalType: \"bytes4\", name: \"\", type: \"bytes4\" }],\n stateMutability: \"pure\",\n type: \"function\"\n },\n {\n inputs: [],\n name: \"owner\",\n outputs: [{ internalType: \"address\", name: \"\", type: \"address\" }],\n stateMutability: \"view\",\n type: \"function\"\n },\n {\n inputs: [],\n name: \"proxiableUUID\",\n outputs: [{ internalType: \"bytes32\", name: \"\", type: \"bytes32\" }],\n stateMutability: \"view\",\n type: \"function\"\n },\n {\n inputs: [{ internalType: \"bytes4\", name: \"interfaceId\", type: \"bytes4\" }],\n name: \"supportsInterface\",\n outputs: [{ internalType: \"bool\", name: \"\", type: \"bool\" }],\n stateMutability: \"view\",\n type: \"function\"\n },\n {\n inputs: [\n { internalType: \"address\", name: \"\", type: \"address\" },\n { internalType: \"address\", name: \"\", type: \"address\" },\n { internalType: \"address\", name: \"\", type: \"address\" },\n { internalType: \"uint256\", name: \"\", type: \"uint256\" },\n { internalType: \"bytes\", name: \"\", type: \"bytes\" },\n { internalType: \"bytes\", name: \"\", type: \"bytes\" }\n ],\n name: \"tokensReceived\",\n outputs: [],\n stateMutability: \"pure\",\n type: \"function\"\n },\n {\n inputs: [{ internalType: \"address\", name: \"newOwner\", type: \"address\" }],\n name: \"transferOwnership\",\n outputs: [],\n stateMutability: \"nonpayable\",\n type: \"function\"\n },\n {\n inputs: [\n { internalType: \"address\", name: \"newImplementation\", type: \"address\" }\n ],\n name: \"upgradeTo\",\n outputs: [],\n stateMutability: \"nonpayable\",\n type: \"function\"\n },\n {\n inputs: [\n { internalType: \"address\", name: \"newImplementation\", type: \"address\" },\n { internalType: \"bytes\", name: \"data\", type: \"bytes\" }\n ],\n name: \"upgradeToAndCall\",\n outputs: [],\n stateMutability: \"payable\",\n type: \"function\"\n },\n {\n inputs: [\n {\n components: [\n { internalType: \"address\", name: \"sender\", type: \"address\" },\n { internalType: \"uint256\", name: \"nonce\", type: \"uint256\" },\n { internalType: \"bytes\", name: \"initCode\", type: \"bytes\" },\n { internalType: \"bytes\", name: \"callData\", type: \"bytes\" },\n { internalType: \"uint256\", name: \"callGasLimit\", type: \"uint256\" },\n {\n internalType: \"uint256\",\n name: \"verificationGasLimit\",\n type: \"uint256\"\n },\n {\n internalType: \"uint256\",\n name: \"preVerificationGas\",\n type: \"uint256\"\n },\n { internalType: \"uint256\", name: \"maxFeePerGas\", type: \"uint256\" },\n {\n internalType: \"uint256\",\n name: \"maxPriorityFeePerGas\",\n type: \"uint256\"\n },\n { internalType: \"bytes\", name: \"paymasterAndData\", type: \"bytes\" },\n { internalType: \"bytes\", name: \"signature\", type: \"bytes\" }\n ],\n internalType: \"struct UserOperation\",\n name: \"userOp\",\n type: \"tuple\"\n },\n { internalType: \"bytes32\", name: \"userOpHash\", type: \"bytes32\" },\n { internalType: \"uint256\", name: \"missingAccountFunds\", type: \"uint256\" }\n ],\n name: \"validateUserOp\",\n outputs: [\n { internalType: \"uint256\", name: \"validationData\", type: \"uint256\" }\n ],\n stateMutability: \"nonpayable\",\n type: \"function\"\n },\n {\n inputs: [\n {\n internalType: \"address payable\",\n name: \"withdrawAddress\",\n type: \"address\"\n },\n { internalType: \"uint256\", name: \"amount\", type: \"uint256\" }\n ],\n name: \"withdrawDepositTo\",\n outputs: [],\n stateMutability: \"nonpayable\",\n type: \"function\"\n },\n { stateMutability: \"payable\", type: \"receive\" }\n ];\n }\n });\n\n // ../../../node_modules/.pnpm/@account-kit+smart-contracts@4.62.0_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5._65dee0153d50ca3a2d2c6830319271d9/node_modules/@account-kit/smart-contracts/dist/esm/src/light-account/abis/LightAccountAbi_v2.js\n var LightAccountAbi_v2;\n var init_LightAccountAbi_v2 = __esm({\n \"../../../node_modules/.pnpm/@account-kit+smart-contracts@4.62.0_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5._65dee0153d50ca3a2d2c6830319271d9/node_modules/@account-kit/smart-contracts/dist/esm/src/light-account/abis/LightAccountAbi_v2.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n LightAccountAbi_v2 = [\n {\n type: \"constructor\",\n inputs: [\n {\n name: \"entryPoint_\",\n type: \"address\",\n internalType: \"contract IEntryPoint\"\n }\n ],\n stateMutability: \"nonpayable\"\n },\n { type: \"receive\", stateMutability: \"payable\" },\n {\n type: \"function\",\n name: \"addDeposit\",\n inputs: [],\n outputs: [],\n stateMutability: \"payable\"\n },\n {\n type: \"function\",\n name: \"eip712Domain\",\n inputs: [],\n outputs: [\n { name: \"fields\", type: \"bytes1\", internalType: \"bytes1\" },\n { name: \"name\", type: \"string\", internalType: \"string\" },\n { name: \"version\", type: \"string\", internalType: \"string\" },\n { name: \"chainId\", type: \"uint256\", internalType: \"uint256\" },\n {\n name: \"verifyingContract\",\n type: \"address\",\n internalType: \"address\"\n },\n { name: \"salt\", type: \"bytes32\", internalType: \"bytes32\" },\n {\n name: \"extensions\",\n type: \"uint256[]\",\n internalType: \"uint256[]\"\n }\n ],\n stateMutability: \"view\"\n },\n {\n type: \"function\",\n name: \"entryPoint\",\n inputs: [],\n outputs: [\n {\n name: \"\",\n type: \"address\",\n internalType: \"contract IEntryPoint\"\n }\n ],\n stateMutability: \"view\"\n },\n {\n type: \"function\",\n name: \"execute\",\n inputs: [\n { name: \"dest\", type: \"address\", internalType: \"address\" },\n { name: \"value\", type: \"uint256\", internalType: \"uint256\" },\n { name: \"func\", type: \"bytes\", internalType: \"bytes\" }\n ],\n outputs: [],\n stateMutability: \"nonpayable\"\n },\n {\n type: \"function\",\n name: \"executeBatch\",\n inputs: [\n { name: \"dest\", type: \"address[]\", internalType: \"address[]\" },\n { name: \"func\", type: \"bytes[]\", internalType: \"bytes[]\" }\n ],\n outputs: [],\n stateMutability: \"nonpayable\"\n },\n {\n type: \"function\",\n name: \"executeBatch\",\n inputs: [\n { name: \"dest\", type: \"address[]\", internalType: \"address[]\" },\n { name: \"value\", type: \"uint256[]\", internalType: \"uint256[]\" },\n { name: \"func\", type: \"bytes[]\", internalType: \"bytes[]\" }\n ],\n outputs: [],\n stateMutability: \"nonpayable\"\n },\n {\n type: \"function\",\n name: \"getDeposit\",\n inputs: [],\n outputs: [{ name: \"\", type: \"uint256\", internalType: \"uint256\" }],\n stateMutability: \"view\"\n },\n {\n type: \"function\",\n name: \"getNonce\",\n inputs: [],\n outputs: [{ name: \"\", type: \"uint256\", internalType: \"uint256\" }],\n stateMutability: \"view\"\n },\n {\n type: \"function\",\n name: \"initialize\",\n inputs: [{ name: \"owner_\", type: \"address\", internalType: \"address\" }],\n outputs: [],\n stateMutability: \"nonpayable\"\n },\n {\n type: \"function\",\n name: \"isValidSignature\",\n inputs: [\n { name: \"hash\", type: \"bytes32\", internalType: \"bytes32\" },\n { name: \"signature\", type: \"bytes\", internalType: \"bytes\" }\n ],\n outputs: [{ name: \"result\", type: \"bytes4\", internalType: \"bytes4\" }],\n stateMutability: \"view\"\n },\n {\n type: \"function\",\n name: \"onERC1155BatchReceived\",\n inputs: [\n { name: \"\", type: \"address\", internalType: \"address\" },\n { name: \"\", type: \"address\", internalType: \"address\" },\n { name: \"\", type: \"uint256[]\", internalType: \"uint256[]\" },\n { name: \"\", type: \"uint256[]\", internalType: \"uint256[]\" },\n { name: \"\", type: \"bytes\", internalType: \"bytes\" }\n ],\n outputs: [{ name: \"\", type: \"bytes4\", internalType: \"bytes4\" }],\n stateMutability: \"pure\"\n },\n {\n type: \"function\",\n name: \"onERC1155Received\",\n inputs: [\n { name: \"\", type: \"address\", internalType: \"address\" },\n { name: \"\", type: \"address\", internalType: \"address\" },\n { name: \"\", type: \"uint256\", internalType: \"uint256\" },\n { name: \"\", type: \"uint256\", internalType: \"uint256\" },\n { name: \"\", type: \"bytes\", internalType: \"bytes\" }\n ],\n outputs: [{ name: \"\", type: \"bytes4\", internalType: \"bytes4\" }],\n stateMutability: \"pure\"\n },\n {\n type: \"function\",\n name: \"onERC721Received\",\n inputs: [\n { name: \"\", type: \"address\", internalType: \"address\" },\n { name: \"\", type: \"address\", internalType: \"address\" },\n { name: \"\", type: \"uint256\", internalType: \"uint256\" },\n { name: \"\", type: \"bytes\", internalType: \"bytes\" }\n ],\n outputs: [{ name: \"\", type: \"bytes4\", internalType: \"bytes4\" }],\n stateMutability: \"pure\"\n },\n {\n type: \"function\",\n name: \"owner\",\n inputs: [],\n outputs: [{ name: \"\", type: \"address\", internalType: \"address\" }],\n stateMutability: \"view\"\n },\n {\n type: \"function\",\n name: \"proxiableUUID\",\n inputs: [],\n outputs: [{ name: \"\", type: \"bytes32\", internalType: \"bytes32\" }],\n stateMutability: \"view\"\n },\n {\n type: \"function\",\n name: \"supportsInterface\",\n inputs: [{ name: \"interfaceId\", type: \"bytes4\", internalType: \"bytes4\" }],\n outputs: [{ name: \"\", type: \"bool\", internalType: \"bool\" }],\n stateMutability: \"view\"\n },\n {\n type: \"function\",\n name: \"transferOwnership\",\n inputs: [{ name: \"newOwner\", type: \"address\", internalType: \"address\" }],\n outputs: [],\n stateMutability: \"nonpayable\"\n },\n {\n type: \"function\",\n name: \"upgradeToAndCall\",\n inputs: [\n {\n name: \"newImplementation\",\n type: \"address\",\n internalType: \"address\"\n },\n { name: \"data\", type: \"bytes\", internalType: \"bytes\" }\n ],\n outputs: [],\n stateMutability: \"payable\"\n },\n {\n type: \"function\",\n name: \"validateUserOp\",\n inputs: [\n {\n name: \"userOp\",\n type: \"tuple\",\n internalType: \"struct PackedUserOperation\",\n components: [\n { name: \"sender\", type: \"address\", internalType: \"address\" },\n { name: \"nonce\", type: \"uint256\", internalType: \"uint256\" },\n { name: \"initCode\", type: \"bytes\", internalType: \"bytes\" },\n { name: \"callData\", type: \"bytes\", internalType: \"bytes\" },\n {\n name: \"accountGasLimits\",\n type: \"bytes32\",\n internalType: \"bytes32\"\n },\n {\n name: \"preVerificationGas\",\n type: \"uint256\",\n internalType: \"uint256\"\n },\n { name: \"gasFees\", type: \"bytes32\", internalType: \"bytes32\" },\n {\n name: \"paymasterAndData\",\n type: \"bytes\",\n internalType: \"bytes\"\n },\n { name: \"signature\", type: \"bytes\", internalType: \"bytes\" }\n ]\n },\n { name: \"userOpHash\", type: \"bytes32\", internalType: \"bytes32\" },\n {\n name: \"missingAccountFunds\",\n type: \"uint256\",\n internalType: \"uint256\"\n }\n ],\n outputs: [\n {\n name: \"validationData\",\n type: \"uint256\",\n internalType: \"uint256\"\n }\n ],\n stateMutability: \"nonpayable\"\n },\n {\n type: \"function\",\n name: \"withdrawDepositTo\",\n inputs: [\n {\n name: \"withdrawAddress\",\n type: \"address\",\n internalType: \"address payable\"\n },\n { name: \"amount\", type: \"uint256\", internalType: \"uint256\" }\n ],\n outputs: [],\n stateMutability: \"nonpayable\"\n },\n {\n type: \"event\",\n name: \"Initialized\",\n inputs: [\n {\n name: \"version\",\n type: \"uint64\",\n indexed: false,\n internalType: \"uint64\"\n }\n ],\n anonymous: false\n },\n {\n type: \"event\",\n name: \"LightAccountInitialized\",\n inputs: [\n {\n name: \"entryPoint\",\n type: \"address\",\n indexed: true,\n internalType: \"contract IEntryPoint\"\n },\n {\n name: \"owner\",\n type: \"address\",\n indexed: true,\n internalType: \"address\"\n }\n ],\n anonymous: false\n },\n {\n type: \"event\",\n name: \"OwnershipTransferred\",\n inputs: [\n {\n name: \"previousOwner\",\n type: \"address\",\n indexed: true,\n internalType: \"address\"\n },\n {\n name: \"newOwner\",\n type: \"address\",\n indexed: true,\n internalType: \"address\"\n }\n ],\n anonymous: false\n },\n {\n type: \"event\",\n name: \"Upgraded\",\n inputs: [\n {\n name: \"implementation\",\n type: \"address\",\n indexed: true,\n internalType: \"address\"\n }\n ],\n anonymous: false\n },\n { type: \"error\", name: \"ArrayLengthMismatch\", inputs: [] },\n { type: \"error\", name: \"ECDSAInvalidSignature\", inputs: [] },\n {\n type: \"error\",\n name: \"ECDSAInvalidSignatureLength\",\n inputs: [{ name: \"length\", type: \"uint256\", internalType: \"uint256\" }]\n },\n {\n type: \"error\",\n name: \"ECDSAInvalidSignatureS\",\n inputs: [{ name: \"s\", type: \"bytes32\", internalType: \"bytes32\" }]\n },\n { type: \"error\", name: \"InvalidInitialization\", inputs: [] },\n {\n type: \"error\",\n name: \"InvalidOwner\",\n inputs: [{ name: \"owner\", type: \"address\", internalType: \"address\" }]\n },\n { type: \"error\", name: \"InvalidSignatureType\", inputs: [] },\n {\n type: \"error\",\n name: \"NotAuthorized\",\n inputs: [{ name: \"caller\", type: \"address\", internalType: \"address\" }]\n },\n { type: \"error\", name: \"NotInitializing\", inputs: [] },\n { type: \"error\", name: \"UnauthorizedCallContext\", inputs: [] },\n { type: \"error\", name: \"UpgradeFailed\", inputs: [] },\n { type: \"error\", name: \"ZeroAddressNotAllowed\", inputs: [] }\n ];\n }\n });\n\n // ../../../node_modules/.pnpm/@account-kit+smart-contracts@4.62.0_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5._65dee0153d50ca3a2d2c6830319271d9/node_modules/@account-kit/smart-contracts/dist/esm/src/light-account/abis/LightAccountFactoryAbi_v1.js\n var LightAccountFactoryAbi_v1;\n var init_LightAccountFactoryAbi_v1 = __esm({\n \"../../../node_modules/.pnpm/@account-kit+smart-contracts@4.62.0_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5._65dee0153d50ca3a2d2c6830319271d9/node_modules/@account-kit/smart-contracts/dist/esm/src/light-account/abis/LightAccountFactoryAbi_v1.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n LightAccountFactoryAbi_v1 = [\n {\n inputs: [\n {\n internalType: \"contract IEntryPoint\",\n name: \"_entryPoint\",\n type: \"address\"\n }\n ],\n stateMutability: \"nonpayable\",\n type: \"constructor\"\n },\n {\n inputs: [],\n name: \"accountImplementation\",\n outputs: [\n {\n internalType: \"contract LightAccount\",\n name: \"\",\n type: \"address\"\n }\n ],\n stateMutability: \"view\",\n type: \"function\"\n },\n {\n inputs: [\n {\n internalType: \"address\",\n name: \"owner\",\n type: \"address\"\n },\n {\n internalType: \"uint256\",\n name: \"salt\",\n type: \"uint256\"\n }\n ],\n name: \"createAccount\",\n outputs: [\n {\n internalType: \"contract LightAccount\",\n name: \"ret\",\n type: \"address\"\n }\n ],\n stateMutability: \"nonpayable\",\n type: \"function\"\n },\n {\n inputs: [\n {\n internalType: \"address\",\n name: \"owner\",\n type: \"address\"\n },\n {\n internalType: \"uint256\",\n name: \"salt\",\n type: \"uint256\"\n }\n ],\n name: \"getAddress\",\n outputs: [\n {\n internalType: \"address\",\n name: \"\",\n type: \"address\"\n }\n ],\n stateMutability: \"view\",\n type: \"function\"\n }\n ];\n }\n });\n\n // ../../../node_modules/.pnpm/@account-kit+smart-contracts@4.62.0_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5._65dee0153d50ca3a2d2c6830319271d9/node_modules/@account-kit/smart-contracts/dist/esm/src/light-account/abis/LightAccountFactoryAbi_v2.js\n var LightAccountFactoryAbi_v2;\n var init_LightAccountFactoryAbi_v2 = __esm({\n \"../../../node_modules/.pnpm/@account-kit+smart-contracts@4.62.0_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5._65dee0153d50ca3a2d2c6830319271d9/node_modules/@account-kit/smart-contracts/dist/esm/src/light-account/abis/LightAccountFactoryAbi_v2.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n LightAccountFactoryAbi_v2 = [\n {\n type: \"constructor\",\n inputs: [\n { name: \"owner\", type: \"address\", internalType: \"address\" },\n {\n name: \"entryPoint\",\n type: \"address\",\n internalType: \"contract IEntryPoint\"\n }\n ],\n stateMutability: \"nonpayable\"\n },\n { type: \"receive\", stateMutability: \"payable\" },\n {\n type: \"function\",\n name: \"ACCOUNT_IMPLEMENTATION\",\n inputs: [],\n outputs: [\n {\n name: \"\",\n type: \"address\",\n internalType: \"contract LightAccount\"\n }\n ],\n stateMutability: \"view\"\n },\n {\n type: \"function\",\n name: \"ENTRY_POINT\",\n inputs: [],\n outputs: [\n {\n name: \"\",\n type: \"address\",\n internalType: \"contract IEntryPoint\"\n }\n ],\n stateMutability: \"view\"\n },\n {\n type: \"function\",\n name: \"acceptOwnership\",\n inputs: [],\n outputs: [],\n stateMutability: \"nonpayable\"\n },\n {\n type: \"function\",\n name: \"addStake\",\n inputs: [\n { name: \"unstakeDelay\", type: \"uint32\", internalType: \"uint32\" },\n { name: \"amount\", type: \"uint256\", internalType: \"uint256\" }\n ],\n outputs: [],\n stateMutability: \"payable\"\n },\n {\n type: \"function\",\n name: \"createAccount\",\n inputs: [\n { name: \"owner\", type: \"address\", internalType: \"address\" },\n { name: \"salt\", type: \"uint256\", internalType: \"uint256\" }\n ],\n outputs: [\n {\n name: \"account\",\n type: \"address\",\n internalType: \"contract LightAccount\"\n }\n ],\n stateMutability: \"nonpayable\"\n },\n {\n type: \"function\",\n name: \"getAddress\",\n inputs: [\n { name: \"owner\", type: \"address\", internalType: \"address\" },\n { name: \"salt\", type: \"uint256\", internalType: \"uint256\" }\n ],\n outputs: [{ name: \"\", type: \"address\", internalType: \"address\" }],\n stateMutability: \"view\"\n },\n {\n type: \"function\",\n name: \"owner\",\n inputs: [],\n outputs: [{ name: \"\", type: \"address\", internalType: \"address\" }],\n stateMutability: \"view\"\n },\n {\n type: \"function\",\n name: \"pendingOwner\",\n inputs: [],\n outputs: [{ name: \"\", type: \"address\", internalType: \"address\" }],\n stateMutability: \"view\"\n },\n {\n type: \"function\",\n name: \"renounceOwnership\",\n inputs: [],\n outputs: [],\n stateMutability: \"view\"\n },\n {\n type: \"function\",\n name: \"transferOwnership\",\n inputs: [{ name: \"newOwner\", type: \"address\", internalType: \"address\" }],\n outputs: [],\n stateMutability: \"nonpayable\"\n },\n {\n type: \"function\",\n name: \"unlockStake\",\n inputs: [],\n outputs: [],\n stateMutability: \"nonpayable\"\n },\n {\n type: \"function\",\n name: \"withdraw\",\n inputs: [\n { name: \"to\", type: \"address\", internalType: \"address payable\" },\n { name: \"token\", type: \"address\", internalType: \"address\" },\n { name: \"amount\", type: \"uint256\", internalType: \"uint256\" }\n ],\n outputs: [],\n stateMutability: \"nonpayable\"\n },\n {\n type: \"function\",\n name: \"withdrawStake\",\n inputs: [{ name: \"to\", type: \"address\", internalType: \"address payable\" }],\n outputs: [],\n stateMutability: \"nonpayable\"\n },\n {\n type: \"event\",\n name: \"OwnershipTransferStarted\",\n inputs: [\n {\n name: \"previousOwner\",\n type: \"address\",\n indexed: true,\n internalType: \"address\"\n },\n {\n name: \"newOwner\",\n type: \"address\",\n indexed: true,\n internalType: \"address\"\n }\n ],\n anonymous: false\n },\n {\n type: \"event\",\n name: \"OwnershipTransferred\",\n inputs: [\n {\n name: \"previousOwner\",\n type: \"address\",\n indexed: true,\n internalType: \"address\"\n },\n {\n name: \"newOwner\",\n type: \"address\",\n indexed: true,\n internalType: \"address\"\n }\n ],\n anonymous: false\n },\n {\n type: \"error\",\n name: \"AddressEmptyCode\",\n inputs: [{ name: \"target\", type: \"address\", internalType: \"address\" }]\n },\n {\n type: \"error\",\n name: \"AddressInsufficientBalance\",\n inputs: [{ name: \"account\", type: \"address\", internalType: \"address\" }]\n },\n { type: \"error\", name: \"FailedInnerCall\", inputs: [] },\n { type: \"error\", name: \"InvalidAction\", inputs: [] },\n {\n type: \"error\",\n name: \"InvalidEntryPoint\",\n inputs: [{ name: \"entryPoint\", type: \"address\", internalType: \"address\" }]\n },\n {\n type: \"error\",\n name: \"OwnableInvalidOwner\",\n inputs: [{ name: \"owner\", type: \"address\", internalType: \"address\" }]\n },\n {\n type: \"error\",\n name: \"OwnableUnauthorizedAccount\",\n inputs: [{ name: \"account\", type: \"address\", internalType: \"address\" }]\n },\n {\n type: \"error\",\n name: \"SafeERC20FailedOperation\",\n inputs: [{ name: \"token\", type: \"address\", internalType: \"address\" }]\n },\n { type: \"error\", name: \"TransferFailed\", inputs: [] },\n { type: \"error\", name: \"ZeroAddressNotAllowed\", inputs: [] }\n ];\n }\n });\n\n // ../../../node_modules/.pnpm/@account-kit+smart-contracts@4.62.0_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5._65dee0153d50ca3a2d2c6830319271d9/node_modules/@account-kit/smart-contracts/dist/esm/src/light-account/utils.js\n async function getLightAccountVersionForAccount(account, chain2) {\n const accountType = account.source;\n const factoryAddress = await account.getFactoryAddress();\n const implAddress = await account.getImplementationAddress();\n const implToVersion = new Map(Object.entries(AccountVersionRegistry[accountType]).map((pair) => {\n const [version7, def] = pair;\n if (def.addresses.overrides != null && chain2.id in def.addresses.overrides) {\n return [def.addresses.overrides[chain2.id].impl, version7];\n }\n return [def.addresses.default.impl, version7];\n }));\n const factoryToVersion = new Map(Object.entries(AccountVersionRegistry[accountType]).map((pair) => {\n const [version7, def] = pair;\n if (def.addresses.overrides != null && chain2.id in def.addresses.overrides) {\n return [def.addresses.overrides[chain2.id].factory, version7];\n }\n return [def.addresses.default.factory, version7];\n }));\n const version6 = fromHex(implAddress, \"bigint\") === 0n ? factoryToVersion.get(factoryAddress.toLowerCase()) : implToVersion.get(implAddress.toLowerCase());\n if (!version6) {\n throw new Error(`Could not determine ${account.source} version for chain ${chain2.id}`);\n }\n return AccountVersionRegistry[accountType][version6];\n }\n var AccountVersionRegistry, defaultLightAccountVersion, getDefaultLightAccountFactoryAddress, getDefaultMultiOwnerLightAccountFactoryAddress, LightAccountUnsupported1271Impls, LightAccountUnsupported1271Factories;\n var init_utils11 = __esm({\n \"../../../node_modules/.pnpm/@account-kit+smart-contracts@4.62.0_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5._65dee0153d50ca3a2d2c6830319271d9/node_modules/@account-kit/smart-contracts/dist/esm/src/light-account/utils.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_esm();\n AccountVersionRegistry = {\n LightAccount: {\n \"v1.0.1\": {\n entryPointVersion: \"0.6.0\",\n addresses: {\n default: {\n factory: \"0x000000893A26168158fbeaDD9335Be5bC96592E2\".toLowerCase(),\n impl: \"0xc1b2fc4197c9187853243e6e4eb5a4af8879a1c0\".toLowerCase()\n }\n }\n },\n \"v1.0.2\": {\n entryPointVersion: \"0.6.0\",\n addresses: {\n default: {\n factory: \"0x00000055C0b4fA41dde26A74435ff03692292FBD\".toLowerCase(),\n impl: \"0x5467b1947F47d0646704EB801E075e72aeAe8113\".toLowerCase()\n }\n }\n },\n \"v1.1.0\": {\n entryPointVersion: \"0.6.0\",\n addresses: {\n default: {\n factory: \"0x00004EC70002a32400f8ae005A26081065620D20\".toLowerCase(),\n impl: \"0xae8c656ad28F2B59a196AB61815C16A0AE1c3cba\".toLowerCase()\n }\n }\n },\n \"v2.0.0\": {\n entryPointVersion: \"0.7.0\",\n addresses: {\n default: {\n factory: \"0x0000000000400CdFef5E2714E63d8040b700BC24\".toLowerCase(),\n impl: \"0x8E8e658E22B12ada97B402fF0b044D6A325013C7\".toLowerCase()\n }\n }\n }\n },\n MultiOwnerLightAccount: {\n \"v2.0.0\": {\n entryPointVersion: \"0.7.0\",\n addresses: {\n default: {\n factory: \"0x000000000019d2Ee9F2729A65AfE20bb0020AefC\".toLowerCase(),\n impl: \"0xd2c27F9eE8E4355f71915ffD5568cB3433b6823D\".toLowerCase()\n }\n }\n }\n }\n };\n defaultLightAccountVersion = () => \"v2.0.0\";\n getDefaultLightAccountFactoryAddress = (chain2, version6) => {\n return AccountVersionRegistry.LightAccount[version6].addresses.overrides?.[chain2.id]?.factory ?? AccountVersionRegistry.LightAccount[version6].addresses.default.factory;\n };\n getDefaultMultiOwnerLightAccountFactoryAddress = (chain2, version6) => {\n return AccountVersionRegistry.MultiOwnerLightAccount[version6].addresses.overrides?.[chain2.id]?.factory ?? AccountVersionRegistry.MultiOwnerLightAccount[version6].addresses.default.factory;\n };\n LightAccountUnsupported1271Impls = [\n AccountVersionRegistry.LightAccount[\"v1.0.1\"],\n AccountVersionRegistry.LightAccount[\"v1.0.2\"]\n ];\n LightAccountUnsupported1271Factories = new Set(LightAccountUnsupported1271Impls.map((x4) => [\n x4.addresses.default.factory,\n ...Object.values(x4.addresses.overrides ?? {}).map((z2) => z2.factory)\n ]).flat());\n }\n });\n\n // ../../../node_modules/.pnpm/@account-kit+smart-contracts@4.62.0_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5._65dee0153d50ca3a2d2c6830319271d9/node_modules/@account-kit/smart-contracts/dist/esm/src/light-account/accounts/base.js\n async function createLightAccountBase({ transport, chain: chain2, signer, abi: abi2, version: version6, type, entryPoint, accountAddress, getAccountInitCode }) {\n const client = createBundlerClient({\n transport,\n chain: chain2\n });\n const encodeUpgradeToAndCall = async ({ upgradeToAddress, upgradeToInitData }) => {\n const storage = await client.getStorageAt({\n address: accountAddress,\n // the slot at which impl addresses are stored by UUPS\n slot: \"0x360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc\"\n });\n if (storage == null) {\n throw new FailedToGetStorageSlotError(\"0x360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc\", \"Proxy Implementation Address\");\n }\n const implementationAddresses = Object.values(AccountVersionRegistry[type]).map((x4) => x4.addresses.overrides?.[chain2.id]?.impl ?? x4.addresses.default.impl);\n if (fromHex(storage, \"number\") !== 0 && !implementationAddresses.some((x4) => x4 === trim(storage))) {\n throw new Error(`could not determine if smart account implementation is ${type} ${String(version6)}`);\n }\n return encodeFunctionData({\n abi: abi2,\n functionName: \"upgradeToAndCall\",\n args: [upgradeToAddress, upgradeToInitData]\n });\n };\n const get1271Wrapper = (hashedMessage, version7) => {\n return {\n // EIP712Domain(string name,string version,uint256 chainId,address verifyingContract)\n // https://github.com/alchemyplatform/light-account/blob/main/src/LightAccount.sol#L236\n domain: {\n chainId: Number(client.chain.id),\n name: type,\n verifyingContract: accountAddress,\n version: version7\n },\n types: {\n LightAccountMessage: [{ name: \"message\", type: \"bytes\" }]\n },\n message: {\n message: hashedMessage\n },\n primaryType: \"LightAccountMessage\"\n };\n };\n const prepareSign = async (params) => {\n const messageHash = params.type === \"personal_sign\" ? hashMessage(params.data) : hashTypedData(params.data);\n switch (version6) {\n case \"v1.0.1\":\n return params;\n case \"v1.0.2\":\n throw new Error(`Version ${String(version6)} of LightAccount doesn't support 1271`);\n case \"v1.1.0\":\n return {\n type: \"eth_signTypedData_v4\",\n data: get1271Wrapper(messageHash, \"1\")\n };\n case \"v2.0.0\":\n return {\n type: \"eth_signTypedData_v4\",\n data: get1271Wrapper(messageHash, \"2\")\n };\n default:\n throw new Error(`Unknown version ${String(version6)} of LightAccount`);\n }\n };\n const formatSign = async (signature) => {\n return version6 === \"v2.0.0\" ? concat([SignatureType.EOA, signature]) : signature;\n };\n const account = await toSmartContractAccount({\n transport,\n chain: chain2,\n entryPoint,\n accountAddress,\n source: type,\n getAccountInitCode,\n prepareSign,\n formatSign,\n encodeExecute: async ({ target, data, value }) => {\n return encodeFunctionData({\n abi: abi2,\n functionName: \"execute\",\n args: [target, value ?? 0n, data]\n });\n },\n encodeBatchExecute: async (txs) => {\n const [targets, values, datas] = txs.reduce((accum, curr) => {\n accum[0].push(curr.target);\n accum[1].push(curr.value ?? 0n);\n accum[2].push(curr.data);\n return accum;\n }, [[], [], []]);\n return encodeFunctionData({\n abi: abi2,\n functionName: \"executeBatch\",\n args: [targets, values, datas]\n });\n },\n signUserOperationHash: async (uoHash) => {\n const signature = await signer.signMessage({ raw: uoHash });\n switch (version6) {\n case \"v2.0.0\":\n return concat([SignatureType.EOA, signature]);\n default:\n return signature;\n }\n },\n async signMessage({ message }) {\n const { type: type2, data } = await prepareSign({\n type: \"personal_sign\",\n data: message\n });\n const sig = type2 === \"personal_sign\" ? await signer.signMessage(data) : await signer.signTypedData(data);\n return formatSign(sig);\n },\n async signTypedData(params) {\n const { type: type2, data } = await prepareSign({\n type: \"eth_signTypedData_v4\",\n data: params\n });\n const sig = type2 === \"personal_sign\" ? await signer.signMessage(data) : await signer.signTypedData(data);\n return formatSign(sig);\n },\n getDummySignature: () => {\n const signature = \"0xfffffffffffffffffffffffffffffff0000000000000000000000000000000007aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa1c\";\n switch (version6) {\n case \"v1.0.1\":\n case \"v1.0.2\":\n case \"v1.1.0\":\n return signature;\n case \"v2.0.0\":\n return concat([SignatureType.EOA, signature]);\n default:\n throw new Error(`Unknown version ${type} of ${String(version6)}`);\n }\n },\n encodeUpgradeToAndCall\n });\n return {\n ...account,\n source: type,\n getLightAccountVersion: () => version6,\n getSigner: () => signer\n };\n }\n var SignatureType;\n var init_base5 = __esm({\n \"../../../node_modules/.pnpm/@account-kit+smart-contracts@4.62.0_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5._65dee0153d50ca3a2d2c6830319271d9/node_modules/@account-kit/smart-contracts/dist/esm/src/light-account/accounts/base.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_esm6();\n init_esm();\n init_utils11();\n (function(SignatureType3) {\n SignatureType3[\"EOA\"] = \"0x00\";\n SignatureType3[\"CONTRACT\"] = \"0x01\";\n SignatureType3[\"CONTRACT_WITH_ADDR\"] = \"0x02\";\n })(SignatureType || (SignatureType = {}));\n }\n });\n\n // ../../../node_modules/.pnpm/@account-kit+smart-contracts@4.62.0_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5._65dee0153d50ca3a2d2c6830319271d9/node_modules/@account-kit/smart-contracts/dist/esm/src/light-account/abis/OZ_ERC1967Proxy.js\n var OZ_ERC1967Proxy_ConstructorAbi;\n var init_OZ_ERC1967Proxy = __esm({\n \"../../../node_modules/.pnpm/@account-kit+smart-contracts@4.62.0_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5._65dee0153d50ca3a2d2c6830319271d9/node_modules/@account-kit/smart-contracts/dist/esm/src/light-account/abis/OZ_ERC1967Proxy.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n OZ_ERC1967Proxy_ConstructorAbi = [\n {\n type: \"constructor\",\n inputs: [\n {\n name: \"_logic\",\n type: \"address\",\n internalType: \"address\"\n },\n {\n name: \"_data\",\n type: \"bytes\",\n internalType: \"bytes\"\n }\n ],\n stateMutability: \"payable\"\n }\n ];\n }\n });\n\n // ../../../node_modules/.pnpm/@account-kit+smart-contracts@4.62.0_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5._65dee0153d50ca3a2d2c6830319271d9/node_modules/@account-kit/smart-contracts/dist/esm/src/light-account/accounts/predictAddress.js\n function predictLightAccountAddress({ factoryAddress, salt, ownerAddress, version: version6 }) {\n const implementationAddress = (\n // If we aren't using the default factory address, we compute the implementation address from the factory's `create` deployment.\n // This is accurate for both LA v1 and v2 factories. If we are using the default factory address, we use the implementation address from the registry.\n factoryAddress !== AccountVersionRegistry.LightAccount[version6].addresses.default.factory ? getContractAddress2({\n from: factoryAddress,\n nonce: 1n\n }) : AccountVersionRegistry.LightAccount[version6].addresses.default.impl\n );\n switch (version6) {\n case \"v1.0.1\":\n case \"v1.0.2\":\n case \"v1.1.0\":\n const LAv1_proxy_bytecode = \"0x60406080815261042c908138038061001681610218565b93843982019181818403126102135780516001600160a01b038116808203610213576020838101516001600160401b0394919391858211610213570186601f820112156102135780519061007161006c83610253565b610218565b918083528583019886828401011161021357888661008f930161026e565b813b156101b9577f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc80546001600160a01b031916841790556000927fbc7cd75a20ee27fd9adebab32041f755214dbc6bffa90cc0225b39da2e5c2d3b8480a28051158015906101b2575b61010b575b855160e790816103458239f35b855194606086019081118682101761019e578697849283926101889952602788527f416464726573733a206c6f772d6c6576656c2064656c65676174652063616c6c87890152660819985a5b195960ca1b8a8901525190845af4913d15610194573d9061017a61006c83610253565b91825281943d92013e610291565b508038808080806100fe565b5060609250610291565b634e487b7160e01b84526041600452602484fd5b50826100f9565b855162461bcd60e51b815260048101859052602d60248201527f455243313936373a206e657720696d706c656d656e746174696f6e206973206e60448201526c1bdd08184818dbdb9d1c9858dd609a1b6064820152608490fd5b600080fd5b6040519190601f01601f191682016001600160401b0381118382101761023d57604052565b634e487b7160e01b600052604160045260246000fd5b6001600160401b03811161023d57601f01601f191660200190565b60005b8381106102815750506000910152565b8181015183820152602001610271565b919290156102f357508151156102a5575090565b3b156102ae5790565b60405162461bcd60e51b815260206004820152601d60248201527f416464726573733a2063616c6c20746f206e6f6e2d636f6e74726163740000006044820152606490fd5b8251909150156103065750805190602001fd5b6044604051809262461bcd60e51b825260206004830152610336815180928160248601526020868601910161026e565b601f01601f19168101030190fdfe60806040523615605f5773ffffffffffffffffffffffffffffffffffffffff7f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc54166000808092368280378136915af43d82803e15605b573d90f35b3d90fd5b73ffffffffffffffffffffffffffffffffffffffff7f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc54166000808092368280378136915af43d82803e15605b573d90f3fea26469706673582212205da2750cd2b0cadfd354d8a1ca4752ed7f22214c8069d852f7dc6b8e9e5ee66964736f6c63430008150033\";\n return getContractAddress2({\n from: factoryAddress,\n opcode: \"CREATE2\",\n salt: toHex(salt, { size: 32 }),\n bytecode: encodeDeployData({\n bytecode: LAv1_proxy_bytecode,\n abi: OZ_ERC1967Proxy_ConstructorAbi,\n args: [\n implementationAddress,\n encodeFunctionData({\n abi: LightAccountAbi_v1,\n functionName: \"initialize\",\n args: [ownerAddress]\n })\n ]\n })\n });\n case \"v2.0.0\":\n const combinedSalt = keccak256(encodeAbiParameters([{ type: \"address\" }, { type: \"uint256\" }], [ownerAddress, salt]));\n const initCode = getLAv2ProxyBytecode(implementationAddress);\n return getContractAddress2({\n from: factoryAddress,\n opcode: \"CREATE2\",\n salt: combinedSalt,\n bytecode: initCode\n });\n default:\n assertNeverLightAccountVersion(version6);\n }\n }\n function predictMultiOwnerLightAccountAddress({ factoryAddress, salt, ownerAddresses }) {\n const implementationAddress = (\n // If we aren't using the default factory address, we compute the implementation address from the factory's `create` deployment.\n // This is accurate for both LA v1 and v2 factories. If we are using the default factory address, we use the implementation address from the registry.\n factoryAddress !== AccountVersionRegistry.MultiOwnerLightAccount[\"v2.0.0\"].addresses.default.factory ? getContractAddress2({\n from: factoryAddress,\n nonce: 1n\n }) : AccountVersionRegistry.MultiOwnerLightAccount[\"v2.0.0\"].addresses.default.impl\n );\n const combinedSalt = keccak256(encodeAbiParameters([{ type: \"address[]\" }, { type: \"uint256\" }], [ownerAddresses, salt]));\n const initCode = getLAv2ProxyBytecode(implementationAddress);\n return getContractAddress2({\n from: factoryAddress,\n opcode: \"CREATE2\",\n salt: combinedSalt,\n bytecode: initCode\n });\n }\n function getLAv2ProxyBytecode(implementationAddress) {\n return `0x603d3d8160223d3973${implementationAddress.slice(2)}60095155f3363d3d373d3d363d7f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc545af43d6000803e6038573d6000fd5b3d6000f3`;\n }\n function assertNeverLightAccountVersion(version6) {\n throw new Error(`Unknown light account version: ${version6}`);\n }\n var init_predictAddress = __esm({\n \"../../../node_modules/.pnpm/@account-kit+smart-contracts@4.62.0_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5._65dee0153d50ca3a2d2c6830319271d9/node_modules/@account-kit/smart-contracts/dist/esm/src/light-account/accounts/predictAddress.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_esm();\n init_OZ_ERC1967Proxy();\n init_utils11();\n init_LightAccountAbi_v1();\n }\n });\n\n // ../../../node_modules/.pnpm/@account-kit+smart-contracts@4.62.0_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5._65dee0153d50ca3a2d2c6830319271d9/node_modules/@account-kit/smart-contracts/dist/esm/src/light-account/accounts/account.js\n async function createLightAccount({ transport, chain: chain2, signer, initCode, version: version6 = defaultLightAccountVersion(), entryPoint = getEntryPoint(chain2, {\n version: AccountVersionRegistry[\"LightAccount\"][version6].entryPointVersion\n }), accountAddress, factoryAddress = getDefaultLightAccountFactoryAddress(chain2, version6), salt: salt_ = 0n }) {\n const client = createBundlerClient({\n transport,\n chain: chain2\n });\n const accountAbi = version6 === \"v2.0.0\" ? LightAccountAbi_v2 : LightAccountAbi_v1;\n const factoryAbi = version6 === \"v2.0.0\" ? LightAccountFactoryAbi_v1 : LightAccountFactoryAbi_v2;\n const signerAddress = await signer.getAddress();\n const salt = LightAccountUnsupported1271Factories.has(factoryAddress.toLowerCase()) ? 0n : salt_;\n const getAccountInitCode = async () => {\n if (initCode)\n return initCode;\n return concatHex([\n factoryAddress,\n encodeFunctionData({\n abi: factoryAbi,\n functionName: \"createAccount\",\n args: [signerAddress, salt]\n })\n ]);\n };\n const address = accountAddress ?? predictLightAccountAddress({\n factoryAddress,\n salt,\n ownerAddress: signerAddress,\n version: version6\n });\n const account = await createLightAccountBase({\n transport,\n chain: chain2,\n signer,\n abi: accountAbi,\n type: \"LightAccount\",\n version: version6,\n entryPoint,\n accountAddress: address,\n getAccountInitCode\n });\n return {\n ...account,\n encodeTransferOwnership: (newOwner) => {\n return encodeFunctionData({\n abi: accountAbi,\n functionName: \"transferOwnership\",\n args: [newOwner]\n });\n },\n async getOwnerAddress() {\n const callResult = await client.readContract({\n address,\n abi: accountAbi,\n functionName: \"owner\"\n });\n if (callResult == null) {\n throw new Error(\"could not get on-chain owner\");\n }\n return callResult;\n }\n };\n }\n var init_account3 = __esm({\n \"../../../node_modules/.pnpm/@account-kit+smart-contracts@4.62.0_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5._65dee0153d50ca3a2d2c6830319271d9/node_modules/@account-kit/smart-contracts/dist/esm/src/light-account/accounts/account.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_esm6();\n init_esm();\n init_LightAccountAbi_v1();\n init_LightAccountAbi_v2();\n init_LightAccountFactoryAbi_v1();\n init_LightAccountFactoryAbi_v2();\n init_utils11();\n init_base5();\n init_predictAddress();\n }\n });\n\n // ../../../node_modules/.pnpm/@account-kit+smart-contracts@4.62.0_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5._65dee0153d50ca3a2d2c6830319271d9/node_modules/@account-kit/smart-contracts/dist/esm/src/light-account/actions/transferOwnership.js\n var transferOwnership;\n var init_transferOwnership = __esm({\n \"../../../node_modules/.pnpm/@account-kit+smart-contracts@4.62.0_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5._65dee0153d50ca3a2d2c6830319271d9/node_modules/@account-kit/smart-contracts/dist/esm/src/light-account/actions/transferOwnership.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_esm6();\n transferOwnership = async (client, args) => {\n const { newOwner, waitForTxn, overrides, account = client.account } = args;\n if (!account) {\n throw new AccountNotFoundError2();\n }\n if (!isSmartAccountClient(client)) {\n throw new IncompatibleClientError(\"SmartAccountClient\", \"transferOwnership\", client);\n }\n const data = account.encodeTransferOwnership(await newOwner.getAddress());\n const result = await client.sendUserOperation({\n uo: {\n target: account.address,\n data\n },\n account,\n overrides\n });\n if (waitForTxn) {\n return client.waitForUserOperationTransaction(result);\n }\n return result.hash;\n };\n }\n });\n\n // ../../../node_modules/.pnpm/@account-kit+infra@4.62.0_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_viem@_d0fd590584a0b3dca5b842750d667454/node_modules/@account-kit/infra/dist/esm/client/isAlchemySmartAccountClient.js\n function isAlchemySmartAccountClient2(client) {\n return client.transport.type === \"alchemy\";\n }\n var init_isAlchemySmartAccountClient2 = __esm({\n \"../../../node_modules/.pnpm/@account-kit+infra@4.62.0_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_viem@_d0fd590584a0b3dca5b842750d667454/node_modules/@account-kit/infra/dist/esm/client/isAlchemySmartAccountClient.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n }\n });\n\n // ../../../node_modules/.pnpm/@account-kit+infra@4.62.0_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_viem@_d0fd590584a0b3dca5b842750d667454/node_modules/@account-kit/infra/dist/esm/actions/simulateUserOperationChanges.js\n var simulateUserOperationChanges2;\n var init_simulateUserOperationChanges2 = __esm({\n \"../../../node_modules/.pnpm/@account-kit+infra@4.62.0_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_viem@_d0fd590584a0b3dca5b842750d667454/node_modules/@account-kit/infra/dist/esm/actions/simulateUserOperationChanges.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_esm6();\n init_isAlchemySmartAccountClient2();\n simulateUserOperationChanges2 = async (client, { account = client.account, overrides, ...params }) => {\n if (!account) {\n throw new AccountNotFoundError2();\n }\n if (!isAlchemySmartAccountClient2(client)) {\n throw new IncompatibleClientError(\"AlchemySmartAccountClient\", \"SimulateUserOperationAssetChanges\", client);\n }\n const uoStruct = deepHexlify(await client.buildUserOperation({\n ...params,\n account,\n overrides\n }));\n return client.request({\n method: \"alchemy_simulateUserOperationAssetChanges\",\n params: [uoStruct, account.getEntryPoint().address]\n });\n };\n }\n });\n\n // ../../../node_modules/.pnpm/@account-kit+infra@4.62.0_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_viem@_d0fd590584a0b3dca5b842750d667454/node_modules/@account-kit/infra/dist/esm/alchemyTrackerHeaders.js\n function mutateRemoveTrackingHeaders2(x4) {\n if (!x4)\n return;\n if (Array.isArray(x4))\n return;\n if (typeof x4 !== \"object\")\n return;\n TRACKER_HEADER2 in x4 && delete x4[TRACKER_HEADER2];\n TRACKER_BREADCRUMB2 in x4 && delete x4[TRACKER_BREADCRUMB2];\n TRACE_HEADER_NAME in x4 && delete x4[TRACE_HEADER_NAME];\n TRACE_HEADER_STATE in x4 && delete x4[TRACE_HEADER_STATE];\n }\n function addCrumb2(previous, crumb) {\n if (!previous)\n return crumb;\n return `${previous} > ${crumb}`;\n }\n function headersUpdate2(crumb) {\n const headerUpdate_ = (x4) => {\n const traceHeader = (TraceHeader.fromTraceHeader(x4) || TraceHeader.default()).withEvent(crumb);\n return {\n [TRACKER_HEADER2]: traceHeader.parentId,\n ...x4,\n [TRACKER_BREADCRUMB2]: addCrumb2(x4[TRACKER_BREADCRUMB2], crumb),\n ...traceHeader.toTraceHeader()\n };\n };\n return headerUpdate_;\n }\n var TRACKER_HEADER2, TRACKER_BREADCRUMB2;\n var init_alchemyTrackerHeaders2 = __esm({\n \"../../../node_modules/.pnpm/@account-kit+infra@4.62.0_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_viem@_d0fd590584a0b3dca5b842750d667454/node_modules/@account-kit/infra/dist/esm/alchemyTrackerHeaders.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_esm6();\n init_esm6();\n init_esm6();\n TRACKER_HEADER2 = \"X-Alchemy-Client-Trace-Id\";\n TRACKER_BREADCRUMB2 = \"X-Alchemy-Client-Breadcrumb\";\n }\n });\n\n // ../../../node_modules/.pnpm/@account-kit+infra@4.62.0_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_viem@_d0fd590584a0b3dca5b842750d667454/node_modules/@account-kit/infra/dist/esm/schema.js\n var AlchemyChainSchema2;\n var init_schema4 = __esm({\n \"../../../node_modules/.pnpm/@account-kit+infra@4.62.0_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_viem@_d0fd590584a0b3dca5b842750d667454/node_modules/@account-kit/infra/dist/esm/schema.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_esm6();\n init_esm5();\n AlchemyChainSchema2 = esm_default.custom((chain2) => {\n const chain_ = ChainSchema.parse(chain2);\n return chain_.rpcUrls.alchemy != null;\n }, \"chain must include an alchemy rpc url. See `defineAlchemyChain` or import a chain from `@account-kit/infra`.\");\n }\n });\n\n // ../../../node_modules/.pnpm/@account-kit+infra@4.62.0_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_viem@_d0fd590584a0b3dca5b842750d667454/node_modules/@account-kit/infra/dist/esm/version.js\n var VERSION3;\n var init_version7 = __esm({\n \"../../../node_modules/.pnpm/@account-kit+infra@4.62.0_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_viem@_d0fd590584a0b3dca5b842750d667454/node_modules/@account-kit/infra/dist/esm/version.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n VERSION3 = \"4.62.0\";\n }\n });\n\n // ../../../node_modules/.pnpm/@account-kit+infra@4.62.0_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_viem@_d0fd590584a0b3dca5b842750d667454/node_modules/@account-kit/infra/dist/esm/alchemyTransport.js\n function isAlchemyTransport2(transport, chain2) {\n return transport({ chain: chain2 }).config.type === \"alchemy\";\n }\n function alchemy2(config2) {\n const { retryDelay, retryCount = 0 } = config2;\n const fetchOptions = { ...config2.fetchOptions };\n const connectionConfig = ConnectionConfigSchema.parse(config2.alchemyConnection ?? config2);\n const headersAsObject = convertHeadersToObject2(fetchOptions.headers);\n fetchOptions.headers = {\n ...headersAsObject,\n \"Alchemy-AA-Sdk-Version\": VERSION3\n };\n if (connectionConfig.jwt != null || connectionConfig.apiKey != null) {\n fetchOptions.headers = {\n ...fetchOptions.headers,\n Authorization: `Bearer ${connectionConfig.jwt ?? connectionConfig.apiKey}`\n };\n }\n const transport = (opts) => {\n const { chain: chain_ } = opts;\n if (!chain_) {\n throw new ChainNotFoundError2();\n }\n const chain2 = AlchemyChainSchema2.parse(chain_);\n const rpcUrl = connectionConfig.rpcUrl == null ? chain2.rpcUrls.alchemy.http[0] : connectionConfig.rpcUrl;\n const chainAgnosticRpcUrl = connectionConfig.rpcUrl == null ? \"https://api.g.alchemy.com/v2\" : connectionConfig.chainAgnosticUrl ?? connectionConfig.rpcUrl;\n const innerTransport = (() => {\n mutateRemoveTrackingHeaders2(config2?.fetchOptions?.headers);\n if (config2.alchemyConnection && config2.nodeRpcUrl) {\n return split2({\n overrides: [\n {\n methods: alchemyMethods2,\n transport: http(rpcUrl, { fetchOptions, retryCount })\n },\n {\n methods: chainAgnosticMethods2,\n transport: http(chainAgnosticRpcUrl, {\n fetchOptions,\n retryCount,\n retryDelay\n })\n }\n ],\n fallback: http(config2.nodeRpcUrl, {\n fetchOptions: config2.fetchOptions,\n retryCount,\n retryDelay\n })\n });\n }\n return split2({\n overrides: [\n {\n methods: chainAgnosticMethods2,\n transport: http(chainAgnosticRpcUrl, {\n fetchOptions,\n retryCount,\n retryDelay\n })\n }\n ],\n fallback: http(rpcUrl, { fetchOptions, retryCount, retryDelay })\n });\n })();\n return createTransport({\n key: \"alchemy\",\n name: \"Alchemy Transport\",\n request: innerTransport({\n ...opts,\n // Retries are already handled above within the split transport,\n // so `retryCount` must be 0 here for the expected behavior.\n retryCount: 0\n }).request,\n // Retries are already handled above within the split transport,\n // so `retryCount` must be 0 here too for the expected behavior.\n retryCount: 0,\n retryDelay,\n type: \"alchemy\"\n }, { alchemyRpcUrl: rpcUrl, fetchOptions });\n };\n return Object.assign(transport, {\n dynamicFetchOptions: fetchOptions,\n updateHeaders(newHeaders_) {\n const newHeaders = convertHeadersToObject2(newHeaders_);\n fetchOptions.headers = {\n ...fetchOptions.headers,\n ...newHeaders\n };\n },\n config: config2\n });\n }\n var alchemyMethods2, chainAgnosticMethods2, convertHeadersToObject2;\n var init_alchemyTransport2 = __esm({\n \"../../../node_modules/.pnpm/@account-kit+infra@4.62.0_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_viem@_d0fd590584a0b3dca5b842750d667454/node_modules/@account-kit/infra/dist/esm/alchemyTransport.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_esm6();\n init_esm();\n init_alchemyTrackerHeaders2();\n init_schema4();\n init_version7();\n alchemyMethods2 = [\n \"eth_sendUserOperation\",\n \"eth_estimateUserOperationGas\",\n \"eth_getUserOperationReceipt\",\n \"eth_getUserOperationByHash\",\n \"eth_supportedEntryPoints\",\n \"rundler_maxPriorityFeePerGas\",\n \"pm_getPaymasterData\",\n \"pm_getPaymasterStubData\",\n \"alchemy_requestGasAndPaymasterAndData\"\n ];\n chainAgnosticMethods2 = [\n \"wallet_prepareCalls\",\n \"wallet_sendPreparedCalls\",\n \"wallet_requestAccount\",\n \"wallet_createAccount\",\n \"wallet_listAccounts\",\n \"wallet_createSession\",\n \"wallet_getCallsStatus\"\n ];\n convertHeadersToObject2 = (headers) => {\n if (!headers) {\n return {};\n }\n if (headers instanceof Headers) {\n const headersObject = {};\n headers.forEach((value, key) => {\n headersObject[key] = value;\n });\n return headersObject;\n }\n if (Array.isArray(headers)) {\n return headers.reduce((acc, header) => {\n acc[header[0]] = header[1];\n return acc;\n }, {});\n }\n return headers;\n };\n }\n });\n\n // ../../../node_modules/.pnpm/@account-kit+infra@4.62.0_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_viem@_d0fd590584a0b3dca5b842750d667454/node_modules/@account-kit/infra/dist/esm/chains.js\n var arbitrum3, arbitrumGoerli3, arbitrumSepolia3, goerli3, mainnet3, optimism3, optimismGoerli3, optimismSepolia3, sepolia3, base3, baseGoerli3, baseSepolia3, polygonMumbai3, polygonAmoy3, polygon3, fraxtal3, fraxtalSepolia2, zora3, zoraSepolia3, worldChainSepolia2, worldChain2, shapeSepolia2, shape2, unichainMainnet2, unichainSepolia2, soneiumMinato2, soneiumMainnet2, opbnbTestnet2, opbnbMainnet2, beraChainBartio2, inkMainnet2, inkSepolia2, arbitrumNova3, monadTestnet2, mekong2, openlootSepolia2, gensynTestnet2, riseTestnet2, storyMainnet2, storyAeneid2, celoAlfajores2, celoMainnet2, teaSepolia2, bobaSepolia2, bobaMainnet2;\n var init_chains3 = __esm({\n \"../../../node_modules/.pnpm/@account-kit+infra@4.62.0_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_viem@_d0fd590584a0b3dca5b842750d667454/node_modules/@account-kit/infra/dist/esm/chains.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_esm();\n init_chains();\n arbitrum3 = {\n ...arbitrum,\n rpcUrls: {\n ...arbitrum.rpcUrls,\n alchemy: {\n http: [\"https://arb-mainnet.g.alchemy.com/v2\"]\n }\n }\n };\n arbitrumGoerli3 = {\n ...arbitrumGoerli,\n rpcUrls: {\n ...arbitrumGoerli.rpcUrls,\n alchemy: {\n http: [\"https://arb-goerli.g.alchemy.com/v2\"]\n }\n }\n };\n arbitrumSepolia3 = {\n ...arbitrumSepolia,\n rpcUrls: {\n ...arbitrumSepolia.rpcUrls,\n alchemy: {\n http: [\"https://arb-sepolia.g.alchemy.com/v2\"]\n }\n }\n };\n goerli3 = {\n ...goerli,\n rpcUrls: {\n ...goerli.rpcUrls,\n alchemy: {\n http: [\"https://eth-goerli.g.alchemy.com/v2\"]\n }\n }\n };\n mainnet3 = {\n ...mainnet,\n rpcUrls: {\n ...mainnet.rpcUrls,\n alchemy: {\n http: [\"https://eth-mainnet.g.alchemy.com/v2\"]\n }\n }\n };\n optimism3 = {\n ...optimism,\n rpcUrls: {\n ...optimism.rpcUrls,\n alchemy: {\n http: [\"https://opt-mainnet.g.alchemy.com/v2\"]\n }\n }\n };\n optimismGoerli3 = {\n ...optimismGoerli,\n rpcUrls: {\n ...optimismGoerli.rpcUrls,\n alchemy: {\n http: [\"https://opt-goerli.g.alchemy.com/v2\"]\n }\n }\n };\n optimismSepolia3 = {\n ...optimismSepolia,\n rpcUrls: {\n ...optimismSepolia.rpcUrls,\n alchemy: {\n http: [\"https://opt-sepolia.g.alchemy.com/v2\"]\n }\n }\n };\n sepolia3 = {\n ...sepolia,\n rpcUrls: {\n ...sepolia.rpcUrls,\n alchemy: {\n http: [\"https://eth-sepolia.g.alchemy.com/v2\"]\n }\n }\n };\n base3 = {\n ...base,\n rpcUrls: {\n ...base.rpcUrls,\n alchemy: {\n http: [\"https://base-mainnet.g.alchemy.com/v2\"]\n }\n }\n };\n baseGoerli3 = {\n ...baseGoerli,\n rpcUrls: {\n ...baseGoerli.rpcUrls,\n alchemy: {\n http: [\"https://base-goerli.g.alchemy.com/v2\"]\n }\n }\n };\n baseSepolia3 = {\n ...baseSepolia,\n rpcUrls: {\n ...baseSepolia.rpcUrls,\n alchemy: {\n http: [\"https://base-sepolia.g.alchemy.com/v2\"]\n }\n }\n };\n polygonMumbai3 = {\n ...polygonMumbai,\n rpcUrls: {\n ...polygonMumbai.rpcUrls,\n alchemy: {\n http: [\"https://polygon-mumbai.g.alchemy.com/v2\"]\n }\n }\n };\n polygonAmoy3 = {\n ...polygonAmoy,\n rpcUrls: {\n ...polygonAmoy.rpcUrls,\n alchemy: {\n http: [\"https://polygon-amoy.g.alchemy.com/v2\"]\n }\n }\n };\n polygon3 = {\n ...polygon,\n rpcUrls: {\n ...polygon.rpcUrls,\n alchemy: {\n http: [\"https://polygon-mainnet.g.alchemy.com/v2\"]\n }\n }\n };\n fraxtal3 = {\n ...fraxtal,\n rpcUrls: {\n ...fraxtal.rpcUrls\n }\n };\n fraxtalSepolia2 = defineChain({\n id: 2523,\n name: \"Fraxtal Sepolia\",\n nativeCurrency: { name: \"Frax Ether\", symbol: \"frxETH\", decimals: 18 },\n rpcUrls: {\n default: {\n http: [\"https://rpc.testnet-sepolia.frax.com\"]\n }\n }\n });\n zora3 = {\n ...zora,\n rpcUrls: {\n ...zora.rpcUrls\n }\n };\n zoraSepolia3 = {\n ...zoraSepolia,\n rpcUrls: {\n ...zoraSepolia.rpcUrls\n }\n };\n worldChainSepolia2 = defineChain({\n id: 4801,\n name: \"World Chain Sepolia\",\n network: \"World Chain Sepolia\",\n nativeCurrency: { name: \"Ether\", symbol: \"ETH\", decimals: 18 },\n rpcUrls: {\n default: {\n http: [\"https://worldchain-sepolia.g.alchemy.com/v2\"]\n },\n public: {\n http: [\"https://worldchain-sepolia.g.alchemy.com/v2\"]\n },\n alchemy: {\n http: [\"https://worldchain-sepolia.g.alchemy.com/v2\"]\n }\n }\n });\n worldChain2 = defineChain({\n id: 480,\n name: \"World Chain\",\n network: \"World Chain\",\n nativeCurrency: { name: \"Ether\", symbol: \"ETH\", decimals: 18 },\n rpcUrls: {\n default: {\n http: [\"https://worldchain-mainnet.g.alchemy.com/v2\"]\n },\n public: {\n http: [\"https://worldchain-mainnet.g.alchemy.com/v2\"]\n },\n alchemy: {\n http: [\"https://worldchain-mainnet.g.alchemy.com/v2\"]\n }\n }\n });\n shapeSepolia2 = defineChain({\n id: 11011,\n name: \"Shape Sepolia\",\n network: \"Shape Sepolia\",\n nativeCurrency: { name: \"Ether\", symbol: \"ETH\", decimals: 18 },\n rpcUrls: {\n default: {\n http: [\"https://shape-sepolia.g.alchemy.com/v2\"]\n },\n public: {\n http: [\"https://shape-sepolia.g.alchemy.com/v2\"]\n },\n alchemy: {\n http: [\"https://shape-sepolia.g.alchemy.com/v2\"]\n }\n }\n });\n shape2 = defineChain({\n id: 360,\n name: \"Shape\",\n network: \"Shape\",\n nativeCurrency: { name: \"Ether\", symbol: \"ETH\", decimals: 18 },\n rpcUrls: {\n default: {\n http: [\"https://shape-mainnet.g.alchemy.com/v2\"]\n },\n public: {\n http: [\"https://shape-mainnet.g.alchemy.com/v2\"]\n },\n alchemy: {\n http: [\"https://shape-mainnet.g.alchemy.com/v2\"]\n }\n }\n });\n unichainMainnet2 = defineChain({\n id: 130,\n name: \"Unichain Mainnet\",\n network: \"Unichain Mainnet\",\n nativeCurrency: { name: \"Ether\", symbol: \"ETH\", decimals: 18 },\n rpcUrls: {\n default: {\n http: [\"https://unichain-mainnet.g.alchemy.com/v2\"]\n },\n public: {\n http: [\"https://unichain-mainnet.g.alchemy.com/v2\"]\n },\n alchemy: {\n http: [\"https://unichain-mainnet.g.alchemy.com/v2\"]\n }\n }\n });\n unichainSepolia2 = defineChain({\n id: 1301,\n name: \"Unichain Sepolia\",\n network: \"Unichain Sepolia\",\n nativeCurrency: { name: \"Ether\", symbol: \"ETH\", decimals: 18 },\n rpcUrls: {\n default: {\n http: [\"https://unichain-sepolia.g.alchemy.com/v2\"]\n },\n public: {\n http: [\"https://unichain-sepolia.g.alchemy.com/v2\"]\n },\n alchemy: {\n http: [\"https://unichain-sepolia.g.alchemy.com/v2\"]\n }\n }\n });\n soneiumMinato2 = defineChain({\n id: 1946,\n name: \"Soneium Minato\",\n network: \"Soneium Minato\",\n nativeCurrency: { name: \"Ether\", symbol: \"ETH\", decimals: 18 },\n rpcUrls: {\n default: {\n http: [\"https://soneium-minato.g.alchemy.com/v2\"]\n },\n public: {\n http: [\"https://soneium-minato.g.alchemy.com/v2\"]\n },\n alchemy: {\n http: [\"https://soneium-minato.g.alchemy.com/v2\"]\n }\n }\n });\n soneiumMainnet2 = defineChain({\n id: 1868,\n name: \"Soneium Mainnet\",\n network: \"Soneium Mainnet\",\n nativeCurrency: { name: \"Ether\", symbol: \"ETH\", decimals: 18 },\n rpcUrls: {\n default: {\n http: [\"https://soneium-mainnet.g.alchemy.com/v2\"]\n },\n public: {\n http: [\"https://soneium-mainnet.g.alchemy.com/v2\"]\n },\n alchemy: {\n http: [\"https://soneium-mainnet.g.alchemy.com/v2\"]\n }\n }\n });\n opbnbTestnet2 = defineChain({\n id: 5611,\n name: \"OPBNB Testnet\",\n network: \"OPBNB Testnet\",\n nativeCurrency: { name: \"BNB\", symbol: \"BNB\", decimals: 18 },\n rpcUrls: {\n default: {\n http: [\"https://opbnb-testnet.g.alchemy.com/v2\"]\n },\n public: {\n http: [\"https://opbnb-testnet.g.alchemy.com/v2\"]\n },\n alchemy: {\n http: [\"https://opbnb-testnet.g.alchemy.com/v2\"]\n }\n }\n });\n opbnbMainnet2 = defineChain({\n id: 204,\n name: \"OPBNB Mainnet\",\n network: \"OPBNB Mainnet\",\n nativeCurrency: { name: \"BNB\", symbol: \"BNB\", decimals: 18 },\n rpcUrls: {\n default: {\n http: [\"https://opbnb-mainnet.g.alchemy.com/v2\"]\n },\n public: {\n http: [\"https://opbnb-mainnet.g.alchemy.com/v2\"]\n },\n alchemy: {\n http: [\"https://opbnb-mainnet.g.alchemy.com/v2\"]\n }\n }\n });\n beraChainBartio2 = defineChain({\n id: 80084,\n name: \"BeraChain Bartio\",\n network: \"BeraChain Bartio\",\n nativeCurrency: { name: \"Bera\", symbol: \"BERA\", decimals: 18 },\n rpcUrls: {\n default: {\n http: [\"https://berachain-bartio.g.alchemy.com/v2\"]\n },\n public: {\n http: [\"https://berachain-bartio.g.alchemy.com/v2\"]\n },\n alchemy: {\n http: [\"https://berachain-bartio.g.alchemy.com/v2\"]\n }\n }\n });\n inkMainnet2 = defineChain({\n id: 57073,\n name: \"Ink Mainnet\",\n network: \"Ink Mainnet\",\n nativeCurrency: { name: \"Ether\", symbol: \"ETH\", decimals: 18 },\n rpcUrls: {\n default: {\n http: [\"https://ink-mainnet.g.alchemy.com/v2\"]\n },\n public: {\n http: [\"https://ink-mainnet.g.alchemy.com/v2\"]\n },\n alchemy: {\n http: [\"https://ink-mainnet.g.alchemy.com/v2\"]\n }\n }\n });\n inkSepolia2 = defineChain({\n id: 763373,\n name: \"Ink Sepolia\",\n network: \"Ink Sepolia\",\n nativeCurrency: { name: \"Ether\", symbol: \"ETH\", decimals: 18 },\n rpcUrls: {\n default: {\n http: [\"https://ink-sepolia.g.alchemy.com/v2\"]\n },\n public: {\n http: [\"https://ink-sepolia.g.alchemy.com/v2\"]\n },\n alchemy: {\n http: [\"https://ink-sepolia.g.alchemy.com/v2\"]\n }\n }\n });\n arbitrumNova3 = {\n ...arbitrumNova,\n rpcUrls: {\n ...arbitrumNova.rpcUrls\n }\n };\n monadTestnet2 = defineChain({\n id: 10143,\n name: \"Monad Testnet\",\n nativeCurrency: { name: \"Monad\", symbol: \"MON\", decimals: 18 },\n rpcUrls: {\n default: {\n http: [\"https://monad-testnet.g.alchemy.com/v2\"]\n },\n public: {\n http: [\"https://monad-testnet.g.alchemy.com/v2\"]\n },\n alchemy: {\n http: [\"https://monad-testnet.g.alchemy.com/v2\"]\n }\n },\n blockExplorers: {\n default: {\n name: \"Block Explorer\",\n url: \"https://testnet.monadexplorer.com\"\n }\n },\n testnet: true\n });\n mekong2 = defineChain({\n id: 7078815900,\n name: \"Mekong Pectra Devnet\",\n nativeCurrency: { name: \"eth\", symbol: \"eth\", decimals: 18 },\n rpcUrls: {\n default: {\n http: [\"https://rpc.mekong.ethpandaops.io\"]\n }\n },\n blockExplorers: {\n default: {\n name: \"Block Explorer\",\n url: \"https://explorer.mekong.ethpandaops.io\"\n }\n },\n testnet: true\n });\n openlootSepolia2 = defineChain({\n id: 905905,\n name: \"Openloot Sepolia\",\n nativeCurrency: { name: \"Openloot\", symbol: \"OL\", decimals: 18 },\n rpcUrls: {\n default: {\n http: [\"https://openloot-sepolia.g.alchemy.com/v2\"]\n },\n public: {\n http: [\"https://openloot-sepolia.g.alchemy.com/v2\"]\n },\n alchemy: {\n http: [\"https://openloot-sepolia.g.alchemy.com/v2\"]\n }\n },\n blockExplorers: {\n default: {\n name: \"Block Explorer\",\n url: \"https://openloot-sepolia.explorer.alchemy.com\"\n }\n },\n testnet: true\n });\n gensynTestnet2 = defineChain({\n id: 685685,\n name: \"Gensyn Testnet\",\n nativeCurrency: { name: \"eth\", symbol: \"eth\", decimals: 18 },\n rpcUrls: {\n default: {\n http: [\"https://gensyn-testnet.g.alchemy.com/v2\"]\n },\n public: {\n http: [\"https://gensyn-testnet.g.alchemy.com/v2\"]\n },\n alchemy: {\n http: [\"https://gensyn-testnet.g.alchemy.com/v2\"]\n }\n },\n blockExplorers: {\n default: {\n name: \"Block Explorer\",\n url: \"https://gensyn-testnet.explorer.alchemy.com\"\n }\n },\n testnet: true\n });\n riseTestnet2 = defineChain({\n id: 11155931,\n name: \"Rise Testnet\",\n nativeCurrency: { name: \"eth\", symbol: \"eth\", decimals: 18 },\n rpcUrls: {\n default: {\n http: [\"https://rise-testnet.g.alchemy.com/v2\"]\n },\n public: {\n http: [\"https://rise-testnet.g.alchemy.com/v2\"]\n },\n alchemy: {\n http: [\"https://rise-testnet.g.alchemy.com/v2\"]\n }\n },\n blockExplorers: {\n default: {\n name: \"Block Explorer\",\n url: \"https://explorer.testnet.riselabs.xyz\"\n }\n },\n testnet: true\n });\n storyMainnet2 = defineChain({\n id: 1514,\n name: \"Story Mainnet\",\n nativeCurrency: { name: \"IP\", symbol: \"IP\", decimals: 18 },\n rpcUrls: {\n default: {\n http: [\"https://story-mainnet.g.alchemy.com/v2\"]\n },\n public: {\n http: [\"https://story-mainnet.g.alchemy.com/v2\"]\n },\n alchemy: {\n http: [\"https://story-mainnet.g.alchemy.com/v2\"]\n }\n },\n blockExplorers: {\n default: {\n name: \"Block Explorer\",\n url: \"https://www.storyscan.io\"\n }\n },\n testnet: false\n });\n storyAeneid2 = defineChain({\n id: 1315,\n name: \"Story Aeneid\",\n nativeCurrency: { name: \"IP\", symbol: \"IP\", decimals: 18 },\n rpcUrls: {\n default: {\n http: [\"https://story-aeneid.g.alchemy.com/v2\"]\n },\n public: {\n http: [\"https://story-aeneid.g.alchemy.com/v2\"]\n },\n alchemy: {\n http: [\"https://story-aeneid.g.alchemy.com/v2\"]\n }\n },\n blockExplorers: {\n default: {\n name: \"Block Explorer\",\n url: \"https://aeneid.storyscan.io\"\n }\n },\n testnet: true\n });\n celoAlfajores2 = defineChain({\n id: 44787,\n name: \"Celo Alfajores\",\n nativeCurrency: { name: \"Celo native asset\", symbol: \"CELO\", decimals: 18 },\n rpcUrls: {\n default: {\n http: [\"https://celo-alfajores.g.alchemy.com/v2\"]\n },\n public: {\n http: [\"https://celo-alfajores.g.alchemy.com/v2\"]\n },\n alchemy: {\n http: [\"https://celo-alfajores.g.alchemy.com/v2\"]\n }\n },\n blockExplorers: {\n default: {\n name: \"Block Explorer\",\n url: \"https://celo-alfajores.blockscout.com/\"\n }\n },\n testnet: true\n });\n celoMainnet2 = defineChain({\n id: 42220,\n name: \"Celo Mainnet\",\n nativeCurrency: { name: \"Celo native asset\", symbol: \"CELO\", decimals: 18 },\n rpcUrls: {\n default: {\n http: [\"https://celo-mainnet.g.alchemy.com/v2\"]\n },\n public: {\n http: [\"https://celo-mainnet.g.alchemy.com/v2\"]\n },\n alchemy: {\n http: [\"https://celo-mainnet.g.alchemy.com/v2\"]\n }\n },\n blockExplorers: {\n default: {\n name: \"Block Explorer\",\n url: \"https://celo.blockscout.com/\"\n }\n },\n testnet: false\n });\n teaSepolia2 = defineChain({\n id: 10218,\n name: \"Tea Sepolia\",\n nativeCurrency: { name: \"TEA\", symbol: \"TEA\", decimals: 18 },\n rpcUrls: {\n default: {\n http: [\"https://tea-sepolia.g.alchemy.com/v2\"]\n },\n public: {\n http: [\"https://tea-sepolia.g.alchemy.com/v2\"]\n },\n alchemy: {\n http: [\"https://tea-sepolia.g.alchemy.com/v2\"]\n }\n },\n blockExplorers: {\n default: {\n name: \"Block Explorer\",\n url: \"https://sepolia.tea.xyz/\"\n }\n },\n testnet: true\n });\n bobaSepolia2 = defineChain({\n id: 28882,\n name: \"Boba Sepolia\",\n nativeCurrency: { name: \"eth\", symbol: \"eth\", decimals: 18 },\n rpcUrls: {\n default: {\n http: [\"https://boba-sepolia.g.alchemy.com/v2\"]\n },\n public: {\n http: [\"https://boba-sepolia.g.alchemy.com/v2\"]\n },\n alchemy: {\n http: [\"https://boba-sepolia.g.alchemy.com/v2\"]\n }\n },\n blockExplorers: {\n default: {\n name: \"Block Explorer\",\n url: \"https://sepolia.testnet.bobascan.com/\"\n }\n },\n testnet: true\n });\n bobaMainnet2 = defineChain({\n id: 288,\n name: \"Boba Mainnet\",\n nativeCurrency: { name: \"eth\", symbol: \"eth\", decimals: 18 },\n rpcUrls: {\n default: {\n http: [\"https://boba-mainnet.g.alchemy.com/v2\"]\n },\n public: {\n http: [\"https://boba-mainnet.g.alchemy.com/v2\"]\n },\n alchemy: {\n http: [\"https://boba-mainnet.g.alchemy.com/v2\"]\n }\n },\n blockExplorers: {\n default: {\n name: \"Block Explorer\",\n url: \"https://bobascan.com/\"\n }\n },\n testnet: false\n });\n }\n });\n\n // ../../../node_modules/.pnpm/@account-kit+infra@4.62.0_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_viem@_d0fd590584a0b3dca5b842750d667454/node_modules/@account-kit/infra/dist/esm/metrics.js\n var InfraLogger2;\n var init_metrics2 = __esm({\n \"../../../node_modules/.pnpm/@account-kit+infra@4.62.0_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_viem@_d0fd590584a0b3dca5b842750d667454/node_modules/@account-kit/infra/dist/esm/metrics.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_esm7();\n init_version7();\n InfraLogger2 = createLogger({\n package: \"@account-kit/infra\",\n version: VERSION3\n });\n }\n });\n\n // ../../../node_modules/.pnpm/@account-kit+infra@4.62.0_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_viem@_d0fd590584a0b3dca5b842750d667454/node_modules/@account-kit/infra/dist/esm/client/decorators/smartAccount.js\n function logSendUoEvent2(chainId, account) {\n const signerType = isSmartAccountWithSigner(account) ? account.getSigner().signerType : \"unknown\";\n InfraLogger2.trackEvent({\n name: \"client_send_uo\",\n data: {\n chainId,\n signerType,\n entryPoint: account.getEntryPoint().address\n }\n });\n }\n var alchemyActions2;\n var init_smartAccount2 = __esm({\n \"../../../node_modules/.pnpm/@account-kit+infra@4.62.0_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_viem@_d0fd590584a0b3dca5b842750d667454/node_modules/@account-kit/infra/dist/esm/client/decorators/smartAccount.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_esm6();\n init_simulateUserOperationChanges2();\n init_metrics2();\n alchemyActions2 = (client_) => ({\n simulateUserOperation: async (args) => {\n const client = clientHeaderTrack(client_, \"simulateUserOperation\");\n return simulateUserOperationChanges2(client, args);\n },\n async sendUserOperation(args) {\n const client = clientHeaderTrack(client_, \"infraSendUserOperation\");\n const { account = client.account } = args;\n const result = sendUserOperation(client, args);\n logSendUoEvent2(client.chain.id, account);\n return result;\n },\n sendTransaction: async (args, overrides, context2) => {\n const client = clientHeaderTrack(client_, \"sendTransaction\");\n const { account = client.account } = args;\n const result = await sendTransaction2(client, args, overrides, context2);\n logSendUoEvent2(client.chain.id, account);\n return result;\n },\n async sendTransactions(args) {\n const client = clientHeaderTrack(client_, \"sendTransactions\");\n const { account = client.account } = args;\n const result = sendTransactions(client, args);\n logSendUoEvent2(client.chain.id, account);\n return result;\n }\n });\n }\n });\n\n // ../../../node_modules/.pnpm/@account-kit+infra@4.62.0_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_viem@_d0fd590584a0b3dca5b842750d667454/node_modules/@account-kit/infra/dist/esm/defaults.js\n var getDefaultUserOperationFeeOptions3;\n var init_defaults3 = __esm({\n \"../../../node_modules/.pnpm/@account-kit+infra@4.62.0_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_viem@_d0fd590584a0b3dca5b842750d667454/node_modules/@account-kit/infra/dist/esm/defaults.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_chains3();\n getDefaultUserOperationFeeOptions3 = (chain2) => {\n const feeOptions = {\n maxFeePerGas: { multiplier: 1.5 },\n maxPriorityFeePerGas: { multiplier: 1.05 }\n };\n if ((/* @__PURE__ */ new Set([\n arbitrum3.id,\n arbitrumGoerli3.id,\n arbitrumSepolia3.id,\n optimism3.id,\n optimismGoerli3.id,\n optimismSepolia3.id\n ])).has(chain2.id)) {\n feeOptions.preVerificationGas = { multiplier: 1.05 };\n }\n return feeOptions;\n };\n }\n });\n\n // ../../../node_modules/.pnpm/@account-kit+infra@4.62.0_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_viem@_d0fd590584a0b3dca5b842750d667454/node_modules/@account-kit/infra/dist/esm/middleware/feeEstimator.js\n var alchemyFeeEstimator2;\n var init_feeEstimator3 = __esm({\n \"../../../node_modules/.pnpm/@account-kit+infra@4.62.0_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_viem@_d0fd590584a0b3dca5b842750d667454/node_modules/@account-kit/infra/dist/esm/middleware/feeEstimator.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_esm6();\n alchemyFeeEstimator2 = (transport) => async (struct, { overrides, feeOptions, client: client_ }) => {\n const client = clientHeaderTrack(client_, \"alchemyFeeEstimator\");\n const transport_ = transport({ chain: client.chain });\n let [block, maxPriorityFeePerGasEstimate] = await Promise.all([\n client.getBlock({ blockTag: \"latest\" }),\n // it is a fair assumption that if someone is using this Alchemy Middleware, then they are using Alchemy RPC\n transport_.request({\n method: \"rundler_maxPriorityFeePerGas\",\n params: []\n })\n ]);\n const baseFeePerGas = block.baseFeePerGas;\n if (baseFeePerGas == null) {\n throw new Error(\"baseFeePerGas is null\");\n }\n const maxPriorityFeePerGas = applyUserOpOverrideOrFeeOption(maxPriorityFeePerGasEstimate, overrides?.maxPriorityFeePerGas, feeOptions?.maxPriorityFeePerGas);\n const maxFeePerGas = applyUserOpOverrideOrFeeOption(bigIntMultiply(baseFeePerGas, 1.5) + BigInt(maxPriorityFeePerGas), overrides?.maxFeePerGas, feeOptions?.maxFeePerGas);\n return {\n ...struct,\n maxPriorityFeePerGas,\n maxFeePerGas\n };\n };\n }\n });\n\n // ../../../node_modules/.pnpm/@account-kit+infra@4.62.0_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_viem@_d0fd590584a0b3dca5b842750d667454/node_modules/@account-kit/infra/dist/esm/gas-manager.js\n var AlchemyPaymasterAddressV06Unify2, AlchemyPaymasterAddressV07Unify2, AlchemyPaymasterAddressV42, AlchemyPaymasterAddressV32, AlchemyPaymasterAddressV22, ArbSepoliaPaymasterAddress2, AlchemyPaymasterAddressV12, AlchemyPaymasterAddressV07V22, AlchemyPaymasterAddressV07V12, getAlchemyPaymasterAddress2, PermitTypes2, ERC20Abis2, EIP7597Abis2;\n var init_gas_manager2 = __esm({\n \"../../../node_modules/.pnpm/@account-kit+infra@4.62.0_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_viem@_d0fd590584a0b3dca5b842750d667454/node_modules/@account-kit/infra/dist/esm/gas-manager.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_chains3();\n AlchemyPaymasterAddressV06Unify2 = \"0x0000000000ce04e2359130e7d0204A5249958921\";\n AlchemyPaymasterAddressV07Unify2 = \"0x00000000000667F27D4DB42334ec11a25db7EBb4\";\n AlchemyPaymasterAddressV42 = \"0xEaf0Cde110a5d503f2dD69B3a49E031e29b3F9D2\";\n AlchemyPaymasterAddressV32 = \"0x4f84a207A80c39E9e8BaE717c1F25bA7AD1fB08F\";\n AlchemyPaymasterAddressV22 = \"0x4Fd9098af9ddcB41DA48A1d78F91F1398965addc\";\n ArbSepoliaPaymasterAddress2 = \"0x0804Afe6EEFb73ce7F93CD0d5e7079a5a8068592\";\n AlchemyPaymasterAddressV12 = \"0xc03aac639bb21233e0139381970328db8bceeb67\";\n AlchemyPaymasterAddressV07V22 = \"0x2cc0c7981D846b9F2a16276556f6e8cb52BfB633\";\n AlchemyPaymasterAddressV07V12 = \"0xEF725Aa22d43Ea69FB22bE2EBe6ECa205a6BCf5B\";\n getAlchemyPaymasterAddress2 = (chain2, version6) => {\n switch (version6) {\n case \"0.6.0\":\n switch (chain2.id) {\n case fraxtalSepolia2.id:\n case worldChainSepolia2.id:\n case shapeSepolia2.id:\n case unichainSepolia2.id:\n case opbnbTestnet2.id:\n case inkSepolia2.id:\n case monadTestnet2.id:\n case openlootSepolia2.id:\n case gensynTestnet2.id:\n case riseTestnet2.id:\n case storyAeneid2.id:\n case teaSepolia2.id:\n case arbitrumGoerli3.id:\n case goerli3.id:\n case optimismGoerli3.id:\n case baseGoerli3.id:\n case polygonMumbai3.id:\n case worldChain2.id:\n case shape2.id:\n case unichainMainnet2.id:\n case soneiumMinato2.id:\n case soneiumMainnet2.id:\n case opbnbMainnet2.id:\n case beraChainBartio2.id:\n case inkMainnet2.id:\n case arbitrumNova3.id:\n case storyMainnet2.id:\n case celoAlfajores2.id:\n case celoMainnet2.id:\n return AlchemyPaymasterAddressV42;\n case polygonAmoy3.id:\n case optimismSepolia3.id:\n case baseSepolia3.id:\n case zora3.id:\n case zoraSepolia3.id:\n case fraxtal3.id:\n return AlchemyPaymasterAddressV32;\n case mainnet3.id:\n case arbitrum3.id:\n case optimism3.id:\n case polygon3.id:\n case base3.id:\n return AlchemyPaymasterAddressV22;\n case arbitrumSepolia3.id:\n return ArbSepoliaPaymasterAddress2;\n case sepolia3.id:\n return AlchemyPaymasterAddressV12;\n default:\n return AlchemyPaymasterAddressV06Unify2;\n }\n case \"0.7.0\":\n switch (chain2.id) {\n case arbitrumNova3.id:\n case celoAlfajores2.id:\n case celoMainnet2.id:\n case gensynTestnet2.id:\n case inkMainnet2.id:\n case inkSepolia2.id:\n case monadTestnet2.id:\n case opbnbMainnet2.id:\n case opbnbTestnet2.id:\n case openlootSepolia2.id:\n case riseTestnet2.id:\n case shape2.id:\n case shapeSepolia2.id:\n case soneiumMainnet2.id:\n case soneiumMinato2.id:\n case storyAeneid2.id:\n case storyMainnet2.id:\n case teaSepolia2.id:\n case unichainMainnet2.id:\n case unichainSepolia2.id:\n case worldChain2.id:\n case worldChainSepolia2.id:\n return AlchemyPaymasterAddressV07V12;\n case arbitrum3.id:\n case arbitrumGoerli3.id:\n case arbitrumSepolia3.id:\n case base3.id:\n case baseGoerli3.id:\n case baseSepolia3.id:\n case beraChainBartio2.id:\n case fraxtal3.id:\n case fraxtalSepolia2.id:\n case goerli3.id:\n case mainnet3.id:\n case optimism3.id:\n case optimismGoerli3.id:\n case optimismSepolia3.id:\n case polygon3.id:\n case polygonAmoy3.id:\n case polygonMumbai3.id:\n case sepolia3.id:\n case zora3.id:\n case zoraSepolia3.id:\n return AlchemyPaymasterAddressV07V22;\n default:\n return AlchemyPaymasterAddressV07Unify2;\n }\n default:\n throw new Error(`Unsupported EntryPointVersion: ${version6}`);\n }\n };\n PermitTypes2 = {\n EIP712Domain: [\n { name: \"name\", type: \"string\" },\n { name: \"version\", type: \"string\" },\n { name: \"chainId\", type: \"uint256\" },\n { name: \"verifyingContract\", type: \"address\" }\n ],\n Permit: [\n { name: \"owner\", type: \"address\" },\n { name: \"spender\", type: \"address\" },\n { name: \"value\", type: \"uint256\" },\n { name: \"nonce\", type: \"uint256\" },\n { name: \"deadline\", type: \"uint256\" }\n ]\n };\n ERC20Abis2 = [\n \"function decimals() public view returns (uint8)\",\n \"function balanceOf(address owner) external view returns (uint256)\",\n \"function allowance(address owner, address spender) external view returns (uint256)\",\n \"function approve(address spender, uint256 amount) external returns (bool)\"\n ];\n EIP7597Abis2 = [\n \"function nonces(address owner) external view returns (uint)\"\n ];\n }\n });\n\n // ../../../node_modules/.pnpm/@account-kit+infra@4.62.0_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_viem@_d0fd590584a0b3dca5b842750d667454/node_modules/@account-kit/infra/dist/esm/errors/base.js\n var BaseError6;\n var init_base6 = __esm({\n \"../../../node_modules/.pnpm/@account-kit+infra@4.62.0_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_viem@_d0fd590584a0b3dca5b842750d667454/node_modules/@account-kit/infra/dist/esm/errors/base.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_esm6();\n init_version7();\n BaseError6 = class extends BaseError4 {\n constructor() {\n super(...arguments);\n Object.defineProperty(this, \"version\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: VERSION3\n });\n }\n };\n }\n });\n\n // ../../../node_modules/.pnpm/@account-kit+infra@4.62.0_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_viem@_d0fd590584a0b3dca5b842750d667454/node_modules/@account-kit/infra/dist/esm/errors/invalidSignedPermit.js\n var InvalidSignedPermit2;\n var init_invalidSignedPermit2 = __esm({\n \"../../../node_modules/.pnpm/@account-kit+infra@4.62.0_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_viem@_d0fd590584a0b3dca5b842750d667454/node_modules/@account-kit/infra/dist/esm/errors/invalidSignedPermit.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_base6();\n InvalidSignedPermit2 = class extends BaseError6 {\n constructor(reason) {\n super([\"Invalid signed permit\"].join(\"\\n\"), {\n details: [reason, \"Please provide a valid signed permit\"].join(\"\\n\")\n });\n Object.defineProperty(this, \"name\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: \"InvalidSignedPermit\"\n });\n }\n };\n }\n });\n\n // ../../../node_modules/.pnpm/@account-kit+infra@4.62.0_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_viem@_d0fd590584a0b3dca5b842750d667454/node_modules/@account-kit/infra/dist/esm/middleware/gasManager.js\n function alchemyGasManagerMiddleware2(policyId, policyToken) {\n const buildContext = async (args) => {\n const context2 = { policyId };\n const { account, client } = args;\n if (!client.chain) {\n throw new ChainNotFoundError2();\n }\n if (policyToken !== void 0) {\n context2.erc20Context = {\n tokenAddress: policyToken.address,\n maxTokenAmount: policyToken.maxTokenAmount\n };\n if (policyToken.permit !== void 0) {\n const permit = await generateSignedPermit2(client, account, policyToken);\n if (permit !== void 0) {\n context2.erc20Context.permit = permit;\n }\n } else if (args.context !== void 0) {\n context2.erc20Context.permit = extractSignedPermitFromContext2(args.context);\n }\n }\n return context2;\n };\n return {\n dummyPaymasterAndData: async (uo, args) => {\n const context2 = await buildContext(args);\n const baseMiddleware = erc7677Middleware({ context: context2 });\n return baseMiddleware.dummyPaymasterAndData(uo, args);\n },\n paymasterAndData: async (uo, args) => {\n const context2 = await buildContext(args);\n const baseMiddleware = erc7677Middleware({ context: context2 });\n return baseMiddleware.paymasterAndData(uo, args);\n }\n };\n }\n function alchemyGasAndPaymasterAndDataMiddleware2(params) {\n const { policyId, policyToken, transport, gasEstimatorOverride, feeEstimatorOverride } = params;\n return {\n dummyPaymasterAndData: async (uo, args) => {\n if (\n // No reason to generate dummy data if we are bypassing the paymaster.\n bypassPaymasterAndData(args.overrides) || // When using alchemy_requestGasAndPaymasterAndData, there is generally no reason to generate dummy\n // data. However, if the gas/feeEstimator is overriden, then this option should be enabled.\n !(gasEstimatorOverride || feeEstimatorOverride)\n ) {\n return noopMiddleware(uo, args);\n }\n return alchemyGasManagerMiddleware2(policyId, policyToken).dummyPaymasterAndData(uo, args);\n },\n feeEstimator: (uo, args) => {\n return feeEstimatorOverride ? feeEstimatorOverride(uo, args) : bypassPaymasterAndData(args.overrides) ? alchemyFeeEstimator2(transport)(uo, args) : noopMiddleware(uo, args);\n },\n gasEstimator: (uo, args) => {\n return gasEstimatorOverride ? gasEstimatorOverride(uo, args) : bypassPaymasterAndData(args.overrides) ? defaultGasEstimator(args.client)(uo, args) : noopMiddleware(uo, args);\n },\n paymasterAndData: async (uo, { account, client: client_, feeOptions, overrides: overrides_, context: uoContext }) => {\n const client = clientHeaderTrack(client_, \"alchemyFeeEstimator\");\n if (!client.chain) {\n throw new ChainNotFoundError2();\n }\n const userOp = deepHexlify(await resolveProperties(uo));\n const overrides = filterUndefined({\n maxFeePerGas: overrideField2(\"maxFeePerGas\", overrides_, feeOptions, userOp),\n maxPriorityFeePerGas: overrideField2(\"maxPriorityFeePerGas\", overrides_, feeOptions, userOp),\n callGasLimit: overrideField2(\"callGasLimit\", overrides_, feeOptions, userOp),\n verificationGasLimit: overrideField2(\"verificationGasLimit\", overrides_, feeOptions, userOp),\n preVerificationGas: overrideField2(\"preVerificationGas\", overrides_, feeOptions, userOp),\n ...account.getEntryPoint().version === \"0.7.0\" ? {\n paymasterVerificationGasLimit: overrideField2(\"paymasterVerificationGasLimit\", overrides_, feeOptions, userOp),\n paymasterPostOpGasLimit: overrideField2(\"paymasterPostOpGasLimit\", overrides_, feeOptions, userOp)\n } : {}\n });\n let erc20Context = void 0;\n if (policyToken !== void 0) {\n erc20Context = {\n tokenAddress: policyToken.address,\n maxTokenAmount: policyToken.maxTokenAmount\n };\n if (policyToken.permit !== void 0) {\n const permit = await generateSignedPermit2(client, account, policyToken);\n if (permit !== void 0) {\n erc20Context.permit = permit;\n }\n } else if (uoContext !== void 0) {\n erc20Context.permit = extractSignedPermitFromContext2(uoContext);\n }\n }\n const result = await client.request({\n method: \"alchemy_requestGasAndPaymasterAndData\",\n params: [\n {\n policyId,\n entryPoint: account.getEntryPoint().address,\n userOperation: userOp,\n dummySignature: await account.getDummySignature(),\n overrides,\n ...erc20Context ? {\n erc20Context\n } : {}\n }\n ]\n });\n return {\n ...uo,\n ...result\n };\n }\n };\n }\n function extractSignedPermitFromContext2(context2) {\n if (context2.signedPermit === void 0) {\n return void 0;\n }\n if (typeof context2.signedPermit !== \"object\") {\n throw new InvalidSignedPermit2(\"signedPermit is not an object\");\n }\n if (typeof context2.signedPermit.value !== \"bigint\") {\n throw new InvalidSignedPermit2(\"signedPermit.value is not a bigint\");\n }\n if (typeof context2.signedPermit.deadline !== \"bigint\") {\n throw new InvalidSignedPermit2(\"signedPermit.deadline is not a bigint\");\n }\n if (!isHex(context2.signedPermit.signature)) {\n throw new InvalidSignedPermit2(\"signedPermit.signature is not a hex string\");\n }\n return encodeSignedPermit2(context2.signedPermit.value, context2.signedPermit.deadline, context2.signedPermit.signature);\n }\n function encodeSignedPermit2(value, deadline, signedPermit) {\n return encodeAbiParameters([{ type: \"uint256\" }, { type: \"uint256\" }, { type: \"bytes\" }], [value, deadline, signedPermit]);\n }\n var overrideField2, generateSignedPermit2;\n var init_gasManager2 = __esm({\n \"../../../node_modules/.pnpm/@account-kit+infra@4.62.0_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_viem@_d0fd590584a0b3dca5b842750d667454/node_modules/@account-kit/infra/dist/esm/middleware/gasManager.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_esm6();\n init_esm();\n init_feeEstimator3();\n init_gas_manager2();\n init_invalidSignedPermit2();\n overrideField2 = (field, overrides, feeOptions, userOperation) => {\n let _field = field;\n if (overrides?.[_field] != null) {\n if (isBigNumberish(overrides[_field])) {\n return deepHexlify(overrides[_field]);\n } else {\n return {\n multiplier: Number(overrides[_field].multiplier)\n };\n }\n }\n if (isMultiplier(feeOptions?.[field])) {\n return {\n multiplier: Number(feeOptions[field].multiplier)\n };\n }\n const userOpField = userOperation[field];\n if (isHex(userOpField) && fromHex(userOpField, \"bigint\") > 0n) {\n return userOpField;\n }\n return void 0;\n };\n generateSignedPermit2 = async (client, account, policyToken) => {\n if (!client.chain) {\n throw new ChainNotFoundError2();\n }\n if (!policyToken.permit) {\n throw new Error(\"permit is missing\");\n }\n if (!policyToken.permit?.erc20Name || !policyToken.permit?.version) {\n throw new Error(\"erc20Name or version is missing\");\n }\n const paymasterAddress = policyToken.permit.paymasterAddress ?? getAlchemyPaymasterAddress2(client.chain, account.getEntryPoint().version);\n if (paymasterAddress === void 0 || paymasterAddress === \"0x\") {\n throw new Error(\"no paymaster contract address available\");\n }\n let allowanceFuture = client.call({\n to: policyToken.address,\n data: encodeFunctionData({\n abi: parseAbi(ERC20Abis2),\n functionName: \"allowance\",\n args: [account.address, paymasterAddress]\n })\n });\n let nonceFuture = client.call({\n to: policyToken.address,\n data: encodeFunctionData({\n abi: parseAbi(EIP7597Abis2),\n functionName: \"nonces\",\n args: [account.address]\n })\n });\n const [allowanceResponse, nonceResponse] = await Promise.all([\n allowanceFuture,\n nonceFuture\n ]);\n if (!allowanceResponse.data) {\n throw new Error(\"No allowance returned from erc20 contract call\");\n }\n if (!nonceResponse.data) {\n throw new Error(\"No nonces returned from erc20 contract call\");\n }\n const permitLimit = policyToken.permit.autoPermitApproveTo;\n const currentAllowance = BigInt(allowanceResponse.data);\n if (currentAllowance > policyToken.permit.autoPermitBelow) {\n return void 0;\n }\n const nonce = BigInt(nonceResponse.data);\n const deadline = BigInt(Math.floor(Date.now() / 1e3) + 60 * 10);\n const typedPermitData = {\n types: PermitTypes2,\n primaryType: \"Permit\",\n domain: {\n name: policyToken.permit.erc20Name ?? \"\",\n version: policyToken.permit.version ?? \"\",\n chainId: BigInt(client.chain.id),\n verifyingContract: policyToken.address\n },\n message: {\n owner: account.address,\n spender: paymasterAddress,\n value: permitLimit,\n nonce,\n deadline\n }\n };\n const signedPermit = await account.signTypedData(typedPermitData);\n return encodeSignedPermit2(permitLimit, deadline, signedPermit);\n };\n }\n });\n\n // ../../../node_modules/.pnpm/@account-kit+infra@4.62.0_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_viem@_d0fd590584a0b3dca5b842750d667454/node_modules/@account-kit/infra/dist/esm/middleware/userOperationSimulator.js\n function alchemyUserOperationSimulator2(transport) {\n return async (struct, { account, client }) => {\n const uoSimResult = await transport({ chain: client.chain }).request({\n method: \"alchemy_simulateUserOperationAssetChanges\",\n params: [\n deepHexlify(await resolveProperties(struct)),\n account.getEntryPoint().address\n ]\n });\n if (uoSimResult.error) {\n throw new Error(uoSimResult.error.message);\n }\n return struct;\n };\n }\n var init_userOperationSimulator2 = __esm({\n \"../../../node_modules/.pnpm/@account-kit+infra@4.62.0_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_viem@_d0fd590584a0b3dca5b842750d667454/node_modules/@account-kit/infra/dist/esm/middleware/userOperationSimulator.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_esm6();\n }\n });\n\n // ../../../node_modules/.pnpm/@account-kit+infra@4.62.0_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_viem@_d0fd590584a0b3dca5b842750d667454/node_modules/@account-kit/infra/dist/esm/client/smartAccountClient.js\n function getSignerTypeHeader2(account) {\n return { \"Alchemy-Aa-Sdk-Signer\": account.getSigner().signerType };\n }\n function createAlchemySmartAccountClient2(config2) {\n if (!config2.chain) {\n throw new ChainNotFoundError2();\n }\n const feeOptions = config2.opts?.feeOptions ?? getDefaultUserOperationFeeOptions3(config2.chain);\n const scaClient = createSmartAccountClient({\n account: config2.account,\n transport: config2.transport,\n chain: config2.chain,\n type: \"AlchemySmartAccountClient\",\n opts: {\n ...config2.opts,\n feeOptions\n },\n feeEstimator: config2.feeEstimator ?? alchemyFeeEstimator2(config2.transport),\n gasEstimator: config2.gasEstimator,\n customMiddleware: async (struct, args) => {\n if (isSmartAccountWithSigner(args.account)) {\n config2.transport.updateHeaders(getSignerTypeHeader2(args.account));\n }\n return config2.customMiddleware ? config2.customMiddleware(struct, args) : struct;\n },\n ...config2.policyId ? alchemyGasAndPaymasterAndDataMiddleware2({\n policyId: config2.policyId,\n policyToken: config2.policyToken,\n transport: config2.transport,\n gasEstimatorOverride: config2.gasEstimator,\n feeEstimatorOverride: config2.feeEstimator\n }) : {},\n userOperationSimulator: config2.useSimulation ? alchemyUserOperationSimulator2(config2.transport) : void 0,\n signUserOperation: config2.signUserOperation,\n addBreadCrumb(breadcrumb) {\n const oldConfig = config2.transport.config;\n const dynamicFetchOptions = config2.transport.dynamicFetchOptions;\n const newTransport = alchemy2({ ...oldConfig });\n newTransport.updateHeaders(headersUpdate2(breadcrumb)(convertHeadersToObject2(dynamicFetchOptions?.headers)));\n return createAlchemySmartAccountClient2({\n ...config2,\n transport: newTransport\n });\n }\n }).extend(alchemyActions2).extend((client_) => ({\n addBreadcrumb(breadcrumb) {\n return clientHeaderTrack(client_, breadcrumb);\n }\n }));\n if (config2.account && isSmartAccountWithSigner(config2.account)) {\n config2.transport.updateHeaders(getSignerTypeHeader2(config2.account));\n }\n return scaClient;\n }\n var init_smartAccountClient4 = __esm({\n \"../../../node_modules/.pnpm/@account-kit+infra@4.62.0_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_viem@_d0fd590584a0b3dca5b842750d667454/node_modules/@account-kit/infra/dist/esm/client/smartAccountClient.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_esm6();\n init_alchemyTransport2();\n init_defaults3();\n init_feeEstimator3();\n init_gasManager2();\n init_userOperationSimulator2();\n init_smartAccount2();\n init_alchemyTrackerHeaders2();\n }\n });\n\n // ../../../node_modules/.pnpm/@account-kit+infra@4.62.0_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_viem@_d0fd590584a0b3dca5b842750d667454/node_modules/@account-kit/infra/dist/esm/exports/index.js\n var init_exports3 = __esm({\n \"../../../node_modules/.pnpm/@account-kit+infra@4.62.0_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_viem@_d0fd590584a0b3dca5b842750d667454/node_modules/@account-kit/infra/dist/esm/exports/index.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_alchemyTransport2();\n init_chains3();\n init_smartAccountClient4();\n init_alchemyTrackerHeaders2();\n }\n });\n\n // ../../../node_modules/.pnpm/@account-kit+smart-contracts@4.62.0_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5._65dee0153d50ca3a2d2c6830319271d9/node_modules/@account-kit/smart-contracts/dist/esm/src/light-account/clients/alchemyClient.js\n async function createLightAccountAlchemyClient({ opts, transport, chain: chain2, ...config2 }) {\n return createLightAccountClient({\n opts,\n transport,\n chain: chain2,\n ...config2\n });\n }\n var init_alchemyClient = __esm({\n \"../../../node_modules/.pnpm/@account-kit+smart-contracts@4.62.0_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5._65dee0153d50ca3a2d2c6830319271d9/node_modules/@account-kit/smart-contracts/dist/esm/src/light-account/clients/alchemyClient.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_src();\n }\n });\n\n // ../../../node_modules/.pnpm/@account-kit+smart-contracts@4.62.0_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5._65dee0153d50ca3a2d2c6830319271d9/node_modules/@account-kit/smart-contracts/dist/esm/src/light-account/decorators/lightAccount.js\n var lightAccountClientActions;\n var init_lightAccount = __esm({\n \"../../../node_modules/.pnpm/@account-kit+smart-contracts@4.62.0_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5._65dee0153d50ca3a2d2c6830319271d9/node_modules/@account-kit/smart-contracts/dist/esm/src/light-account/decorators/lightAccount.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_transferOwnership();\n lightAccountClientActions = (client) => ({\n transferOwnership: async (args) => transferOwnership(client, args)\n });\n }\n });\n\n // ../../../node_modules/.pnpm/@account-kit+smart-contracts@4.62.0_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5._65dee0153d50ca3a2d2c6830319271d9/node_modules/@account-kit/smart-contracts/dist/esm/src/light-account/clients/client.js\n async function createLightAccountClient(params) {\n const { transport, chain: chain2 } = params;\n const lightAccount = await createLightAccount({\n ...params,\n transport,\n chain: chain2\n });\n if (isAlchemyTransport2(transport, chain2)) {\n return createAlchemySmartAccountClient2({\n ...params,\n transport,\n chain: chain2,\n account: lightAccount\n }).extend(lightAccountClientActions);\n }\n return createSmartAccountClient({\n ...params,\n transport,\n chain: chain2,\n account: lightAccount\n }).extend(lightAccountClientActions);\n }\n var init_client2 = __esm({\n \"../../../node_modules/.pnpm/@account-kit+smart-contracts@4.62.0_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5._65dee0153d50ca3a2d2c6830319271d9/node_modules/@account-kit/smart-contracts/dist/esm/src/light-account/clients/client.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_esm6();\n init_src();\n init_lightAccount();\n init_exports3();\n }\n });\n\n // ../../../node_modules/.pnpm/@account-kit+smart-contracts@4.62.0_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5._65dee0153d50ca3a2d2c6830319271d9/node_modules/@account-kit/smart-contracts/dist/esm/src/light-account/clients/multiOwnerAlchemyClient.js\n async function createMultiOwnerLightAccountAlchemyClient({ opts, transport, chain: chain2, ...config2 }) {\n return createMultiOwnerLightAccountClient({\n opts,\n transport,\n chain: chain2,\n ...config2\n });\n }\n var init_multiOwnerAlchemyClient = __esm({\n \"../../../node_modules/.pnpm/@account-kit+smart-contracts@4.62.0_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5._65dee0153d50ca3a2d2c6830319271d9/node_modules/@account-kit/smart-contracts/dist/esm/src/light-account/clients/multiOwnerAlchemyClient.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_src();\n }\n });\n\n // ../../../node_modules/.pnpm/@account-kit+smart-contracts@4.62.0_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5._65dee0153d50ca3a2d2c6830319271d9/node_modules/@account-kit/smart-contracts/dist/esm/src/light-account/abis/MultiOwnerLightAccountAbi.js\n var MultiOwnerLightAccountAbi;\n var init_MultiOwnerLightAccountAbi = __esm({\n \"../../../node_modules/.pnpm/@account-kit+smart-contracts@4.62.0_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5._65dee0153d50ca3a2d2c6830319271d9/node_modules/@account-kit/smart-contracts/dist/esm/src/light-account/abis/MultiOwnerLightAccountAbi.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n MultiOwnerLightAccountAbi = [\n {\n type: \"constructor\",\n inputs: [\n {\n name: \"entryPoint_\",\n type: \"address\",\n internalType: \"contract IEntryPoint\"\n }\n ],\n stateMutability: \"nonpayable\"\n },\n { type: \"receive\", stateMutability: \"payable\" },\n {\n type: \"function\",\n name: \"addDeposit\",\n inputs: [],\n outputs: [],\n stateMutability: \"payable\"\n },\n {\n type: \"function\",\n name: \"eip712Domain\",\n inputs: [],\n outputs: [\n { name: \"fields\", type: \"bytes1\", internalType: \"bytes1\" },\n { name: \"name\", type: \"string\", internalType: \"string\" },\n { name: \"version\", type: \"string\", internalType: \"string\" },\n { name: \"chainId\", type: \"uint256\", internalType: \"uint256\" },\n {\n name: \"verifyingContract\",\n type: \"address\",\n internalType: \"address\"\n },\n { name: \"salt\", type: \"bytes32\", internalType: \"bytes32\" },\n {\n name: \"extensions\",\n type: \"uint256[]\",\n internalType: \"uint256[]\"\n }\n ],\n stateMutability: \"view\"\n },\n {\n type: \"function\",\n name: \"entryPoint\",\n inputs: [],\n outputs: [\n {\n name: \"\",\n type: \"address\",\n internalType: \"contract IEntryPoint\"\n }\n ],\n stateMutability: \"view\"\n },\n {\n type: \"function\",\n name: \"execute\",\n inputs: [\n { name: \"dest\", type: \"address\", internalType: \"address\" },\n { name: \"value\", type: \"uint256\", internalType: \"uint256\" },\n { name: \"func\", type: \"bytes\", internalType: \"bytes\" }\n ],\n outputs: [],\n stateMutability: \"nonpayable\"\n },\n {\n type: \"function\",\n name: \"executeBatch\",\n inputs: [\n { name: \"dest\", type: \"address[]\", internalType: \"address[]\" },\n { name: \"func\", type: \"bytes[]\", internalType: \"bytes[]\" }\n ],\n outputs: [],\n stateMutability: \"nonpayable\"\n },\n {\n type: \"function\",\n name: \"executeBatch\",\n inputs: [\n { name: \"dest\", type: \"address[]\", internalType: \"address[]\" },\n { name: \"value\", type: \"uint256[]\", internalType: \"uint256[]\" },\n { name: \"func\", type: \"bytes[]\", internalType: \"bytes[]\" }\n ],\n outputs: [],\n stateMutability: \"nonpayable\"\n },\n {\n type: \"function\",\n name: \"getDeposit\",\n inputs: [],\n outputs: [{ name: \"\", type: \"uint256\", internalType: \"uint256\" }],\n stateMutability: \"view\"\n },\n {\n type: \"function\",\n name: \"getNonce\",\n inputs: [],\n outputs: [{ name: \"\", type: \"uint256\", internalType: \"uint256\" }],\n stateMutability: \"view\"\n },\n {\n type: \"function\",\n name: \"initialize\",\n inputs: [{ name: \"owners_\", type: \"address[]\", internalType: \"address[]\" }],\n outputs: [],\n stateMutability: \"nonpayable\"\n },\n {\n type: \"function\",\n name: \"isValidSignature\",\n inputs: [\n { name: \"hash\", type: \"bytes32\", internalType: \"bytes32\" },\n { name: \"signature\", type: \"bytes\", internalType: \"bytes\" }\n ],\n outputs: [{ name: \"result\", type: \"bytes4\", internalType: \"bytes4\" }],\n stateMutability: \"view\"\n },\n {\n type: \"function\",\n name: \"onERC1155BatchReceived\",\n inputs: [\n { name: \"\", type: \"address\", internalType: \"address\" },\n { name: \"\", type: \"address\", internalType: \"address\" },\n { name: \"\", type: \"uint256[]\", internalType: \"uint256[]\" },\n { name: \"\", type: \"uint256[]\", internalType: \"uint256[]\" },\n { name: \"\", type: \"bytes\", internalType: \"bytes\" }\n ],\n outputs: [{ name: \"\", type: \"bytes4\", internalType: \"bytes4\" }],\n stateMutability: \"pure\"\n },\n {\n type: \"function\",\n name: \"onERC1155Received\",\n inputs: [\n { name: \"\", type: \"address\", internalType: \"address\" },\n { name: \"\", type: \"address\", internalType: \"address\" },\n { name: \"\", type: \"uint256\", internalType: \"uint256\" },\n { name: \"\", type: \"uint256\", internalType: \"uint256\" },\n { name: \"\", type: \"bytes\", internalType: \"bytes\" }\n ],\n outputs: [{ name: \"\", type: \"bytes4\", internalType: \"bytes4\" }],\n stateMutability: \"pure\"\n },\n {\n type: \"function\",\n name: \"onERC721Received\",\n inputs: [\n { name: \"\", type: \"address\", internalType: \"address\" },\n { name: \"\", type: \"address\", internalType: \"address\" },\n { name: \"\", type: \"uint256\", internalType: \"uint256\" },\n { name: \"\", type: \"bytes\", internalType: \"bytes\" }\n ],\n outputs: [{ name: \"\", type: \"bytes4\", internalType: \"bytes4\" }],\n stateMutability: \"pure\"\n },\n {\n type: \"function\",\n name: \"owners\",\n inputs: [],\n outputs: [{ name: \"\", type: \"address[]\", internalType: \"address[]\" }],\n stateMutability: \"view\"\n },\n {\n type: \"function\",\n name: \"proxiableUUID\",\n inputs: [],\n outputs: [{ name: \"\", type: \"bytes32\", internalType: \"bytes32\" }],\n stateMutability: \"view\"\n },\n {\n type: \"function\",\n name: \"supportsInterface\",\n inputs: [{ name: \"interfaceId\", type: \"bytes4\", internalType: \"bytes4\" }],\n outputs: [{ name: \"\", type: \"bool\", internalType: \"bool\" }],\n stateMutability: \"view\"\n },\n {\n type: \"function\",\n name: \"updateOwners\",\n inputs: [\n {\n name: \"ownersToAdd\",\n type: \"address[]\",\n internalType: \"address[]\"\n },\n {\n name: \"ownersToRemove\",\n type: \"address[]\",\n internalType: \"address[]\"\n }\n ],\n outputs: [],\n stateMutability: \"nonpayable\"\n },\n {\n type: \"function\",\n name: \"upgradeToAndCall\",\n inputs: [\n {\n name: \"newImplementation\",\n type: \"address\",\n internalType: \"address\"\n },\n { name: \"data\", type: \"bytes\", internalType: \"bytes\" }\n ],\n outputs: [],\n stateMutability: \"payable\"\n },\n {\n type: \"function\",\n name: \"validateUserOp\",\n inputs: [\n {\n name: \"userOp\",\n type: \"tuple\",\n internalType: \"struct PackedUserOperation\",\n components: [\n { name: \"sender\", type: \"address\", internalType: \"address\" },\n { name: \"nonce\", type: \"uint256\", internalType: \"uint256\" },\n { name: \"initCode\", type: \"bytes\", internalType: \"bytes\" },\n { name: \"callData\", type: \"bytes\", internalType: \"bytes\" },\n {\n name: \"accountGasLimits\",\n type: \"bytes32\",\n internalType: \"bytes32\"\n },\n {\n name: \"preVerificationGas\",\n type: \"uint256\",\n internalType: \"uint256\"\n },\n { name: \"gasFees\", type: \"bytes32\", internalType: \"bytes32\" },\n {\n name: \"paymasterAndData\",\n type: \"bytes\",\n internalType: \"bytes\"\n },\n { name: \"signature\", type: \"bytes\", internalType: \"bytes\" }\n ]\n },\n { name: \"userOpHash\", type: \"bytes32\", internalType: \"bytes32\" },\n {\n name: \"missingAccountFunds\",\n type: \"uint256\",\n internalType: \"uint256\"\n }\n ],\n outputs: [\n {\n name: \"validationData\",\n type: \"uint256\",\n internalType: \"uint256\"\n }\n ],\n stateMutability: \"nonpayable\"\n },\n {\n type: \"function\",\n name: \"withdrawDepositTo\",\n inputs: [\n {\n name: \"withdrawAddress\",\n type: \"address\",\n internalType: \"address payable\"\n },\n { name: \"amount\", type: \"uint256\", internalType: \"uint256\" }\n ],\n outputs: [],\n stateMutability: \"nonpayable\"\n },\n {\n type: \"event\",\n name: \"Initialized\",\n inputs: [\n {\n name: \"version\",\n type: \"uint64\",\n indexed: false,\n internalType: \"uint64\"\n }\n ],\n anonymous: false\n },\n {\n type: \"event\",\n name: \"LightAccountInitialized\",\n inputs: [\n {\n name: \"entryPoint\",\n type: \"address\",\n indexed: true,\n internalType: \"contract IEntryPoint\"\n },\n {\n name: \"owners\",\n type: \"address[]\",\n indexed: false,\n internalType: \"address[]\"\n }\n ],\n anonymous: false\n },\n {\n type: \"event\",\n name: \"OwnersUpdated\",\n inputs: [\n {\n name: \"addedOwners\",\n type: \"address[]\",\n indexed: false,\n internalType: \"address[]\"\n },\n {\n name: \"removedOwners\",\n type: \"address[]\",\n indexed: false,\n internalType: \"address[]\"\n }\n ],\n anonymous: false\n },\n {\n type: \"event\",\n name: \"Upgraded\",\n inputs: [\n {\n name: \"implementation\",\n type: \"address\",\n indexed: true,\n internalType: \"address\"\n }\n ],\n anonymous: false\n },\n { type: \"error\", name: \"ArrayLengthMismatch\", inputs: [] },\n { type: \"error\", name: \"ECDSAInvalidSignature\", inputs: [] },\n {\n type: \"error\",\n name: \"ECDSAInvalidSignatureLength\",\n inputs: [{ name: \"length\", type: \"uint256\", internalType: \"uint256\" }]\n },\n {\n type: \"error\",\n name: \"ECDSAInvalidSignatureS\",\n inputs: [{ name: \"s\", type: \"bytes32\", internalType: \"bytes32\" }]\n },\n { type: \"error\", name: \"EmptyOwnersNotAllowed\", inputs: [] },\n { type: \"error\", name: \"InvalidInitialization\", inputs: [] },\n {\n type: \"error\",\n name: \"InvalidOwner\",\n inputs: [{ name: \"owner\", type: \"address\", internalType: \"address\" }]\n },\n { type: \"error\", name: \"InvalidSignatureType\", inputs: [] },\n {\n type: \"error\",\n name: \"NotAuthorized\",\n inputs: [{ name: \"caller\", type: \"address\", internalType: \"address\" }]\n },\n { type: \"error\", name: \"NotInitializing\", inputs: [] },\n {\n type: \"error\",\n name: \"OwnerDoesNotExist\",\n inputs: [{ name: \"owner\", type: \"address\", internalType: \"address\" }]\n },\n { type: \"error\", name: \"UnauthorizedCallContext\", inputs: [] },\n { type: \"error\", name: \"UpgradeFailed\", inputs: [] },\n { type: \"error\", name: \"ZeroAddressNotAllowed\", inputs: [] }\n ];\n }\n });\n\n // ../../../node_modules/.pnpm/@account-kit+smart-contracts@4.62.0_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5._65dee0153d50ca3a2d2c6830319271d9/node_modules/@account-kit/smart-contracts/dist/esm/src/light-account/abis/MultiOwnerLightAccountFactoryAbi.js\n var MultiOwnerLightAccountFactoryAbi;\n var init_MultiOwnerLightAccountFactoryAbi = __esm({\n \"../../../node_modules/.pnpm/@account-kit+smart-contracts@4.62.0_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5._65dee0153d50ca3a2d2c6830319271d9/node_modules/@account-kit/smart-contracts/dist/esm/src/light-account/abis/MultiOwnerLightAccountFactoryAbi.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n MultiOwnerLightAccountFactoryAbi = [\n {\n type: \"constructor\",\n inputs: [\n { name: \"owner\", type: \"address\", internalType: \"address\" },\n {\n name: \"entryPoint\",\n type: \"address\",\n internalType: \"contract IEntryPoint\"\n }\n ],\n stateMutability: \"nonpayable\"\n },\n { type: \"receive\", stateMutability: \"payable\" },\n {\n type: \"function\",\n name: \"ACCOUNT_IMPLEMENTATION\",\n inputs: [],\n outputs: [\n {\n name: \"\",\n type: \"address\",\n internalType: \"contract MultiOwnerLightAccount\"\n }\n ],\n stateMutability: \"view\"\n },\n {\n type: \"function\",\n name: \"ENTRY_POINT\",\n inputs: [],\n outputs: [\n {\n name: \"\",\n type: \"address\",\n internalType: \"contract IEntryPoint\"\n }\n ],\n stateMutability: \"view\"\n },\n {\n type: \"function\",\n name: \"acceptOwnership\",\n inputs: [],\n outputs: [],\n stateMutability: \"nonpayable\"\n },\n {\n type: \"function\",\n name: \"addStake\",\n inputs: [\n { name: \"unstakeDelay\", type: \"uint32\", internalType: \"uint32\" },\n { name: \"amount\", type: \"uint256\", internalType: \"uint256\" }\n ],\n outputs: [],\n stateMutability: \"payable\"\n },\n {\n type: \"function\",\n name: \"createAccount\",\n inputs: [\n { name: \"owners\", type: \"address[]\", internalType: \"address[]\" },\n { name: \"salt\", type: \"uint256\", internalType: \"uint256\" }\n ],\n outputs: [\n {\n name: \"account\",\n type: \"address\",\n internalType: \"contract MultiOwnerLightAccount\"\n }\n ],\n stateMutability: \"nonpayable\"\n },\n {\n type: \"function\",\n name: \"createAccountSingle\",\n inputs: [\n { name: \"owner\", type: \"address\", internalType: \"address\" },\n { name: \"salt\", type: \"uint256\", internalType: \"uint256\" }\n ],\n outputs: [\n {\n name: \"account\",\n type: \"address\",\n internalType: \"contract MultiOwnerLightAccount\"\n }\n ],\n stateMutability: \"nonpayable\"\n },\n {\n type: \"function\",\n name: \"getAddress\",\n inputs: [\n { name: \"owners\", type: \"address[]\", internalType: \"address[]\" },\n { name: \"salt\", type: \"uint256\", internalType: \"uint256\" }\n ],\n outputs: [{ name: \"\", type: \"address\", internalType: \"address\" }],\n stateMutability: \"view\"\n },\n {\n type: \"function\",\n name: \"owner\",\n inputs: [],\n outputs: [{ name: \"\", type: \"address\", internalType: \"address\" }],\n stateMutability: \"view\"\n },\n {\n type: \"function\",\n name: \"pendingOwner\",\n inputs: [],\n outputs: [{ name: \"\", type: \"address\", internalType: \"address\" }],\n stateMutability: \"view\"\n },\n {\n type: \"function\",\n name: \"renounceOwnership\",\n inputs: [],\n outputs: [],\n stateMutability: \"view\"\n },\n {\n type: \"function\",\n name: \"transferOwnership\",\n inputs: [{ name: \"newOwner\", type: \"address\", internalType: \"address\" }],\n outputs: [],\n stateMutability: \"nonpayable\"\n },\n {\n type: \"function\",\n name: \"unlockStake\",\n inputs: [],\n outputs: [],\n stateMutability: \"nonpayable\"\n },\n {\n type: \"function\",\n name: \"withdraw\",\n inputs: [\n { name: \"to\", type: \"address\", internalType: \"address payable\" },\n { name: \"token\", type: \"address\", internalType: \"address\" },\n { name: \"amount\", type: \"uint256\", internalType: \"uint256\" }\n ],\n outputs: [],\n stateMutability: \"nonpayable\"\n },\n {\n type: \"function\",\n name: \"withdrawStake\",\n inputs: [{ name: \"to\", type: \"address\", internalType: \"address payable\" }],\n outputs: [],\n stateMutability: \"nonpayable\"\n },\n {\n type: \"event\",\n name: \"OwnershipTransferStarted\",\n inputs: [\n {\n name: \"previousOwner\",\n type: \"address\",\n indexed: true,\n internalType: \"address\"\n },\n {\n name: \"newOwner\",\n type: \"address\",\n indexed: true,\n internalType: \"address\"\n }\n ],\n anonymous: false\n },\n {\n type: \"event\",\n name: \"OwnershipTransferred\",\n inputs: [\n {\n name: \"previousOwner\",\n type: \"address\",\n indexed: true,\n internalType: \"address\"\n },\n {\n name: \"newOwner\",\n type: \"address\",\n indexed: true,\n internalType: \"address\"\n }\n ],\n anonymous: false\n },\n {\n type: \"error\",\n name: \"AddressEmptyCode\",\n inputs: [{ name: \"target\", type: \"address\", internalType: \"address\" }]\n },\n {\n type: \"error\",\n name: \"AddressInsufficientBalance\",\n inputs: [{ name: \"account\", type: \"address\", internalType: \"address\" }]\n },\n { type: \"error\", name: \"FailedInnerCall\", inputs: [] },\n { type: \"error\", name: \"InvalidAction\", inputs: [] },\n {\n type: \"error\",\n name: \"InvalidEntryPoint\",\n inputs: [{ name: \"entryPoint\", type: \"address\", internalType: \"address\" }]\n },\n { type: \"error\", name: \"InvalidOwners\", inputs: [] },\n {\n type: \"error\",\n name: \"OwnableInvalidOwner\",\n inputs: [{ name: \"owner\", type: \"address\", internalType: \"address\" }]\n },\n {\n type: \"error\",\n name: \"OwnableUnauthorizedAccount\",\n inputs: [{ name: \"account\", type: \"address\", internalType: \"address\" }]\n },\n { type: \"error\", name: \"OwnersArrayEmpty\", inputs: [] },\n { type: \"error\", name: \"OwnersLimitExceeded\", inputs: [] },\n {\n type: \"error\",\n name: \"SafeERC20FailedOperation\",\n inputs: [{ name: \"token\", type: \"address\", internalType: \"address\" }]\n },\n { type: \"error\", name: \"TransferFailed\", inputs: [] },\n { type: \"error\", name: \"ZeroAddressNotAllowed\", inputs: [] }\n ];\n }\n });\n\n // ../../../node_modules/.pnpm/@account-kit+smart-contracts@4.62.0_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5._65dee0153d50ca3a2d2c6830319271d9/node_modules/@account-kit/smart-contracts/dist/esm/src/light-account/accounts/multiOwner.js\n async function createMultiOwnerLightAccount({ transport, chain: chain2, signer, initCode, version: version6 = defaultLightAccountVersion(), entryPoint = getEntryPoint(chain2, {\n version: \"0.7.0\"\n }), accountAddress, factoryAddress = getDefaultMultiOwnerLightAccountFactoryAddress(chain2, version6), salt: salt_ = 0n, owners = [] }) {\n const client = createBundlerClient({\n transport,\n chain: chain2\n });\n const ownerAddress = await signer.getAddress();\n const owners_ = Array.from(/* @__PURE__ */ new Set([...owners, ownerAddress])).filter((x4) => hexToBigInt(x4) !== 0n).sort((a3, b4) => {\n const bigintA = hexToBigInt(a3);\n const bigintB = hexToBigInt(b4);\n return bigintA < bigintB ? -1 : bigintA > bigintB ? 1 : 0;\n });\n const getAccountInitCode = async () => {\n if (initCode)\n return initCode;\n return concatHex([\n factoryAddress,\n encodeFunctionData({\n abi: MultiOwnerLightAccountFactoryAbi,\n functionName: \"createAccount\",\n args: [owners_, salt_]\n })\n ]);\n };\n const address = accountAddress ?? predictMultiOwnerLightAccountAddress({\n factoryAddress,\n salt: salt_,\n ownerAddresses: owners_\n });\n const account = await createLightAccountBase({\n transport,\n chain: chain2,\n signer,\n abi: MultiOwnerLightAccountAbi,\n version: version6,\n type: \"MultiOwnerLightAccount\",\n entryPoint,\n accountAddress: address,\n getAccountInitCode\n });\n return {\n ...account,\n encodeUpdateOwners: (ownersToAdd, ownersToRemove) => {\n return encodeFunctionData({\n abi: MultiOwnerLightAccountAbi,\n functionName: \"updateOwners\",\n args: [ownersToAdd, ownersToRemove]\n });\n },\n async getOwnerAddresses() {\n const callResult = await client.readContract({\n address,\n abi: MultiOwnerLightAccountAbi,\n functionName: \"owners\"\n });\n if (callResult == null) {\n throw new Error(\"could not get on-chain owners\");\n }\n if (!callResult.includes(await signer.getAddress())) {\n throw new Error(\"on-chain owners does not include the current signer\");\n }\n return callResult;\n }\n };\n }\n var init_multiOwner = __esm({\n \"../../../node_modules/.pnpm/@account-kit+smart-contracts@4.62.0_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5._65dee0153d50ca3a2d2c6830319271d9/node_modules/@account-kit/smart-contracts/dist/esm/src/light-account/accounts/multiOwner.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_esm6();\n init_esm();\n init_MultiOwnerLightAccountAbi();\n init_MultiOwnerLightAccountFactoryAbi();\n init_utils11();\n init_base5();\n init_predictAddress();\n }\n });\n\n // ../../../node_modules/.pnpm/@account-kit+smart-contracts@4.62.0_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5._65dee0153d50ca3a2d2c6830319271d9/node_modules/@account-kit/smart-contracts/dist/esm/src/light-account/actions/updateOwners.js\n var updateOwners;\n var init_updateOwners = __esm({\n \"../../../node_modules/.pnpm/@account-kit+smart-contracts@4.62.0_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5._65dee0153d50ca3a2d2c6830319271d9/node_modules/@account-kit/smart-contracts/dist/esm/src/light-account/actions/updateOwners.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_esm6();\n updateOwners = async (client, { ownersToAdd, ownersToRemove, waitForTxn, overrides, account = client.account }) => {\n if (!account) {\n throw new AccountNotFoundError2();\n }\n if (!isSmartAccountClient(client)) {\n throw new IncompatibleClientError(\"SmartAccountClient\", \"updateOwners\", client);\n }\n const data = account.encodeUpdateOwners(ownersToAdd, ownersToRemove);\n const result = await client.sendUserOperation({\n uo: {\n target: account.address,\n data\n },\n account,\n overrides\n });\n if (waitForTxn) {\n return client.waitForUserOperationTransaction(result);\n }\n return result.hash;\n };\n }\n });\n\n // ../../../node_modules/.pnpm/@account-kit+smart-contracts@4.62.0_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5._65dee0153d50ca3a2d2c6830319271d9/node_modules/@account-kit/smart-contracts/dist/esm/src/light-account/clients/multiOwnerLightAccount.js\n async function createMultiOwnerLightAccountClient(params) {\n const { transport, chain: chain2 } = params;\n const lightAccount = await createMultiOwnerLightAccount({\n ...params,\n transport,\n chain: chain2\n });\n if (isAlchemyTransport2(transport, chain2)) {\n return createAlchemySmartAccountClient2({\n ...params,\n transport,\n chain: chain2,\n account: lightAccount\n }).extend(multiOwnerLightAccountClientActions);\n }\n return createSmartAccountClient({\n ...params,\n transport,\n chain: chain2,\n account: lightAccount\n }).extend(multiOwnerLightAccountClientActions);\n }\n var init_multiOwnerLightAccount = __esm({\n \"../../../node_modules/.pnpm/@account-kit+smart-contracts@4.62.0_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5._65dee0153d50ca3a2d2c6830319271d9/node_modules/@account-kit/smart-contracts/dist/esm/src/light-account/clients/multiOwnerLightAccount.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_esm6();\n init_src();\n init_exports3();\n }\n });\n\n // ../../../node_modules/.pnpm/@account-kit+smart-contracts@4.62.0_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5._65dee0153d50ca3a2d2c6830319271d9/node_modules/@account-kit/smart-contracts/dist/esm/src/light-account/decorators/multiOwnerLightAccount.js\n var multiOwnerLightAccountClientActions;\n var init_multiOwnerLightAccount2 = __esm({\n \"../../../node_modules/.pnpm/@account-kit+smart-contracts@4.62.0_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5._65dee0153d50ca3a2d2c6830319271d9/node_modules/@account-kit/smart-contracts/dist/esm/src/light-account/decorators/multiOwnerLightAccount.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_updateOwners();\n multiOwnerLightAccountClientActions = (client) => ({\n updateOwners: async (args) => updateOwners(client, args)\n });\n }\n });\n\n // ../../../node_modules/.pnpm/@account-kit+smart-contracts@4.62.0_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5._65dee0153d50ca3a2d2c6830319271d9/node_modules/@account-kit/smart-contracts/dist/esm/src/msca/abis/IAccountLoupe.js\n var IAccountLoupeAbi;\n var init_IAccountLoupe = __esm({\n \"../../../node_modules/.pnpm/@account-kit+smart-contracts@4.62.0_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5._65dee0153d50ca3a2d2c6830319271d9/node_modules/@account-kit/smart-contracts/dist/esm/src/msca/abis/IAccountLoupe.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n IAccountLoupeAbi = [\n {\n type: \"function\",\n name: \"getExecutionFunctionConfig\",\n inputs: [{ name: \"selector\", type: \"bytes4\", internalType: \"bytes4\" }],\n outputs: [\n {\n name: \"\",\n type: \"tuple\",\n internalType: \"struct IAccountLoupe.ExecutionFunctionConfig\",\n components: [\n { name: \"plugin\", type: \"address\", internalType: \"address\" },\n {\n name: \"userOpValidationFunction\",\n type: \"bytes21\",\n internalType: \"FunctionReference\"\n },\n {\n name: \"runtimeValidationFunction\",\n type: \"bytes21\",\n internalType: \"FunctionReference\"\n }\n ]\n }\n ],\n stateMutability: \"view\"\n },\n {\n type: \"function\",\n name: \"getExecutionHooks\",\n inputs: [{ name: \"selector\", type: \"bytes4\", internalType: \"bytes4\" }],\n outputs: [\n {\n name: \"\",\n type: \"tuple[]\",\n internalType: \"struct IAccountLoupe.ExecutionHooks[]\",\n components: [\n {\n name: \"preExecHook\",\n type: \"bytes21\",\n internalType: \"FunctionReference\"\n },\n {\n name: \"postExecHook\",\n type: \"bytes21\",\n internalType: \"FunctionReference\"\n }\n ]\n }\n ],\n stateMutability: \"view\"\n },\n {\n type: \"function\",\n name: \"getInstalledPlugins\",\n inputs: [],\n outputs: [{ name: \"\", type: \"address[]\", internalType: \"address[]\" }],\n stateMutability: \"view\"\n },\n {\n type: \"function\",\n name: \"getPreValidationHooks\",\n inputs: [{ name: \"selector\", type: \"bytes4\", internalType: \"bytes4\" }],\n outputs: [\n {\n name: \"preUserOpValidationHooks\",\n type: \"bytes21[]\",\n internalType: \"FunctionReference[]\"\n },\n {\n name: \"preRuntimeValidationHooks\",\n type: \"bytes21[]\",\n internalType: \"FunctionReference[]\"\n }\n ],\n stateMutability: \"view\"\n }\n ];\n }\n });\n\n // ../../../node_modules/.pnpm/@account-kit+smart-contracts@4.62.0_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5._65dee0153d50ca3a2d2c6830319271d9/node_modules/@account-kit/smart-contracts/dist/esm/src/msca/abis/IPlugin.js\n var IPluginAbi;\n var init_IPlugin = __esm({\n \"../../../node_modules/.pnpm/@account-kit+smart-contracts@4.62.0_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5._65dee0153d50ca3a2d2c6830319271d9/node_modules/@account-kit/smart-contracts/dist/esm/src/msca/abis/IPlugin.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n IPluginAbi = [\n {\n type: \"function\",\n name: \"onInstall\",\n inputs: [{ name: \"data\", type: \"bytes\", internalType: \"bytes\" }],\n outputs: [],\n stateMutability: \"nonpayable\"\n },\n {\n type: \"function\",\n name: \"onUninstall\",\n inputs: [{ name: \"data\", type: \"bytes\", internalType: \"bytes\" }],\n outputs: [],\n stateMutability: \"nonpayable\"\n },\n {\n type: \"function\",\n name: \"pluginManifest\",\n inputs: [],\n outputs: [\n {\n name: \"\",\n type: \"tuple\",\n internalType: \"struct PluginManifest\",\n components: [\n { name: \"interfaceIds\", type: \"bytes4[]\", internalType: \"bytes4[]\" },\n {\n name: \"dependencyInterfaceIds\",\n type: \"bytes4[]\",\n internalType: \"bytes4[]\"\n },\n {\n name: \"executionFunctions\",\n type: \"bytes4[]\",\n internalType: \"bytes4[]\"\n },\n {\n name: \"permittedExecutionSelectors\",\n type: \"bytes4[]\",\n internalType: \"bytes4[]\"\n },\n {\n name: \"permitAnyExternalAddress\",\n type: \"bool\",\n internalType: \"bool\"\n },\n { name: \"canSpendNativeToken\", type: \"bool\", internalType: \"bool\" },\n {\n name: \"permittedExternalCalls\",\n type: \"tuple[]\",\n internalType: \"struct ManifestExternalCallPermission[]\",\n components: [\n {\n name: \"externalAddress\",\n type: \"address\",\n internalType: \"address\"\n },\n { name: \"permitAnySelector\", type: \"bool\", internalType: \"bool\" },\n { name: \"selectors\", type: \"bytes4[]\", internalType: \"bytes4[]\" }\n ]\n },\n {\n name: \"userOpValidationFunctions\",\n type: \"tuple[]\",\n internalType: \"struct ManifestAssociatedFunction[]\",\n components: [\n {\n name: \"executionSelector\",\n type: \"bytes4\",\n internalType: \"bytes4\"\n },\n {\n name: \"associatedFunction\",\n type: \"tuple\",\n internalType: \"struct ManifestFunction\",\n components: [\n {\n name: \"functionType\",\n type: \"uint8\",\n internalType: \"enum ManifestAssociatedFunctionType\"\n },\n { name: \"functionId\", type: \"uint8\", internalType: \"uint8\" },\n {\n name: \"dependencyIndex\",\n type: \"uint256\",\n internalType: \"uint256\"\n }\n ]\n }\n ]\n },\n {\n name: \"runtimeValidationFunctions\",\n type: \"tuple[]\",\n internalType: \"struct ManifestAssociatedFunction[]\",\n components: [\n {\n name: \"executionSelector\",\n type: \"bytes4\",\n internalType: \"bytes4\"\n },\n {\n name: \"associatedFunction\",\n type: \"tuple\",\n internalType: \"struct ManifestFunction\",\n components: [\n {\n name: \"functionType\",\n type: \"uint8\",\n internalType: \"enum ManifestAssociatedFunctionType\"\n },\n { name: \"functionId\", type: \"uint8\", internalType: \"uint8\" },\n {\n name: \"dependencyIndex\",\n type: \"uint256\",\n internalType: \"uint256\"\n }\n ]\n }\n ]\n },\n {\n name: \"preUserOpValidationHooks\",\n type: \"tuple[]\",\n internalType: \"struct ManifestAssociatedFunction[]\",\n components: [\n {\n name: \"executionSelector\",\n type: \"bytes4\",\n internalType: \"bytes4\"\n },\n {\n name: \"associatedFunction\",\n type: \"tuple\",\n internalType: \"struct ManifestFunction\",\n components: [\n {\n name: \"functionType\",\n type: \"uint8\",\n internalType: \"enum ManifestAssociatedFunctionType\"\n },\n { name: \"functionId\", type: \"uint8\", internalType: \"uint8\" },\n {\n name: \"dependencyIndex\",\n type: \"uint256\",\n internalType: \"uint256\"\n }\n ]\n }\n ]\n },\n {\n name: \"preRuntimeValidationHooks\",\n type: \"tuple[]\",\n internalType: \"struct ManifestAssociatedFunction[]\",\n components: [\n {\n name: \"executionSelector\",\n type: \"bytes4\",\n internalType: \"bytes4\"\n },\n {\n name: \"associatedFunction\",\n type: \"tuple\",\n internalType: \"struct ManifestFunction\",\n components: [\n {\n name: \"functionType\",\n type: \"uint8\",\n internalType: \"enum ManifestAssociatedFunctionType\"\n },\n { name: \"functionId\", type: \"uint8\", internalType: \"uint8\" },\n {\n name: \"dependencyIndex\",\n type: \"uint256\",\n internalType: \"uint256\"\n }\n ]\n }\n ]\n },\n {\n name: \"executionHooks\",\n type: \"tuple[]\",\n internalType: \"struct ManifestExecutionHook[]\",\n components: [\n {\n name: \"executionSelector\",\n type: \"bytes4\",\n internalType: \"bytes4\"\n },\n {\n name: \"preExecHook\",\n type: \"tuple\",\n internalType: \"struct ManifestFunction\",\n components: [\n {\n name: \"functionType\",\n type: \"uint8\",\n internalType: \"enum ManifestAssociatedFunctionType\"\n },\n { name: \"functionId\", type: \"uint8\", internalType: \"uint8\" },\n {\n name: \"dependencyIndex\",\n type: \"uint256\",\n internalType: \"uint256\"\n }\n ]\n },\n {\n name: \"postExecHook\",\n type: \"tuple\",\n internalType: \"struct ManifestFunction\",\n components: [\n {\n name: \"functionType\",\n type: \"uint8\",\n internalType: \"enum ManifestAssociatedFunctionType\"\n },\n { name: \"functionId\", type: \"uint8\", internalType: \"uint8\" },\n {\n name: \"dependencyIndex\",\n type: \"uint256\",\n internalType: \"uint256\"\n }\n ]\n }\n ]\n }\n ]\n }\n ],\n stateMutability: \"pure\"\n },\n {\n type: \"function\",\n name: \"pluginMetadata\",\n inputs: [],\n outputs: [\n {\n name: \"\",\n type: \"tuple\",\n internalType: \"struct PluginMetadata\",\n components: [\n { name: \"name\", type: \"string\", internalType: \"string\" },\n { name: \"version\", type: \"string\", internalType: \"string\" },\n { name: \"author\", type: \"string\", internalType: \"string\" },\n {\n name: \"permissionDescriptors\",\n type: \"tuple[]\",\n internalType: \"struct SelectorPermission[]\",\n components: [\n {\n name: \"functionSelector\",\n type: \"bytes4\",\n internalType: \"bytes4\"\n },\n {\n name: \"permissionDescription\",\n type: \"string\",\n internalType: \"string\"\n }\n ]\n }\n ]\n }\n ],\n stateMutability: \"pure\"\n },\n {\n type: \"function\",\n name: \"postExecutionHook\",\n inputs: [\n { name: \"functionId\", type: \"uint8\", internalType: \"uint8\" },\n { name: \"preExecHookData\", type: \"bytes\", internalType: \"bytes\" }\n ],\n outputs: [],\n stateMutability: \"nonpayable\"\n },\n {\n type: \"function\",\n name: \"preExecutionHook\",\n inputs: [\n { name: \"functionId\", type: \"uint8\", internalType: \"uint8\" },\n { name: \"sender\", type: \"address\", internalType: \"address\" },\n { name: \"value\", type: \"uint256\", internalType: \"uint256\" },\n { name: \"data\", type: \"bytes\", internalType: \"bytes\" }\n ],\n outputs: [{ name: \"\", type: \"bytes\", internalType: \"bytes\" }],\n stateMutability: \"nonpayable\"\n },\n {\n type: \"function\",\n name: \"preRuntimeValidationHook\",\n inputs: [\n { name: \"functionId\", type: \"uint8\", internalType: \"uint8\" },\n { name: \"sender\", type: \"address\", internalType: \"address\" },\n { name: \"value\", type: \"uint256\", internalType: \"uint256\" },\n { name: \"data\", type: \"bytes\", internalType: \"bytes\" }\n ],\n outputs: [],\n stateMutability: \"nonpayable\"\n },\n {\n type: \"function\",\n name: \"preUserOpValidationHook\",\n inputs: [\n { name: \"functionId\", type: \"uint8\", internalType: \"uint8\" },\n {\n name: \"userOp\",\n type: \"tuple\",\n internalType: \"struct UserOperation\",\n components: [\n { name: \"sender\", type: \"address\", internalType: \"address\" },\n { name: \"nonce\", type: \"uint256\", internalType: \"uint256\" },\n { name: \"initCode\", type: \"bytes\", internalType: \"bytes\" },\n { name: \"callData\", type: \"bytes\", internalType: \"bytes\" },\n { name: \"callGasLimit\", type: \"uint256\", internalType: \"uint256\" },\n {\n name: \"verificationGasLimit\",\n type: \"uint256\",\n internalType: \"uint256\"\n },\n {\n name: \"preVerificationGas\",\n type: \"uint256\",\n internalType: \"uint256\"\n },\n { name: \"maxFeePerGas\", type: \"uint256\", internalType: \"uint256\" },\n {\n name: \"maxPriorityFeePerGas\",\n type: \"uint256\",\n internalType: \"uint256\"\n },\n { name: \"paymasterAndData\", type: \"bytes\", internalType: \"bytes\" },\n { name: \"signature\", type: \"bytes\", internalType: \"bytes\" }\n ]\n },\n { name: \"userOpHash\", type: \"bytes32\", internalType: \"bytes32\" }\n ],\n outputs: [{ name: \"\", type: \"uint256\", internalType: \"uint256\" }],\n stateMutability: \"nonpayable\"\n },\n {\n type: \"function\",\n name: \"runtimeValidationFunction\",\n inputs: [\n { name: \"functionId\", type: \"uint8\", internalType: \"uint8\" },\n { name: \"sender\", type: \"address\", internalType: \"address\" },\n { name: \"value\", type: \"uint256\", internalType: \"uint256\" },\n { name: \"data\", type: \"bytes\", internalType: \"bytes\" }\n ],\n outputs: [],\n stateMutability: \"nonpayable\"\n },\n {\n type: \"function\",\n name: \"userOpValidationFunction\",\n inputs: [\n { name: \"functionId\", type: \"uint8\", internalType: \"uint8\" },\n {\n name: \"userOp\",\n type: \"tuple\",\n internalType: \"struct UserOperation\",\n components: [\n { name: \"sender\", type: \"address\", internalType: \"address\" },\n { name: \"nonce\", type: \"uint256\", internalType: \"uint256\" },\n { name: \"initCode\", type: \"bytes\", internalType: \"bytes\" },\n { name: \"callData\", type: \"bytes\", internalType: \"bytes\" },\n { name: \"callGasLimit\", type: \"uint256\", internalType: \"uint256\" },\n {\n name: \"verificationGasLimit\",\n type: \"uint256\",\n internalType: \"uint256\"\n },\n {\n name: \"preVerificationGas\",\n type: \"uint256\",\n internalType: \"uint256\"\n },\n { name: \"maxFeePerGas\", type: \"uint256\", internalType: \"uint256\" },\n {\n name: \"maxPriorityFeePerGas\",\n type: \"uint256\",\n internalType: \"uint256\"\n },\n { name: \"paymasterAndData\", type: \"bytes\", internalType: \"bytes\" },\n { name: \"signature\", type: \"bytes\", internalType: \"bytes\" }\n ]\n },\n { name: \"userOpHash\", type: \"bytes32\", internalType: \"bytes32\" }\n ],\n outputs: [{ name: \"\", type: \"uint256\", internalType: \"uint256\" }],\n stateMutability: \"nonpayable\"\n }\n ];\n }\n });\n\n // ../../../node_modules/.pnpm/@account-kit+smart-contracts@4.62.0_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5._65dee0153d50ca3a2d2c6830319271d9/node_modules/@account-kit/smart-contracts/dist/esm/src/msca/abis/IPluginManager.js\n var IPluginManagerAbi;\n var init_IPluginManager = __esm({\n \"../../../node_modules/.pnpm/@account-kit+smart-contracts@4.62.0_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5._65dee0153d50ca3a2d2c6830319271d9/node_modules/@account-kit/smart-contracts/dist/esm/src/msca/abis/IPluginManager.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n IPluginManagerAbi = [\n {\n type: \"function\",\n name: \"installPlugin\",\n inputs: [\n { name: \"plugin\", type: \"address\", internalType: \"address\" },\n { name: \"manifestHash\", type: \"bytes32\", internalType: \"bytes32\" },\n { name: \"pluginInitData\", type: \"bytes\", internalType: \"bytes\" },\n {\n name: \"dependencies\",\n type: \"bytes21[]\",\n internalType: \"FunctionReference[]\"\n }\n ],\n outputs: [],\n stateMutability: \"nonpayable\"\n },\n {\n type: \"function\",\n name: \"uninstallPlugin\",\n inputs: [\n { name: \"plugin\", type: \"address\", internalType: \"address\" },\n { name: \"config\", type: \"bytes\", internalType: \"bytes\" },\n { name: \"pluginUninstallData\", type: \"bytes\", internalType: \"bytes\" }\n ],\n outputs: [],\n stateMutability: \"nonpayable\"\n },\n {\n type: \"event\",\n name: \"PluginIgnoredHookUnapplyCallbackFailure\",\n inputs: [\n {\n name: \"plugin\",\n type: \"address\",\n indexed: true,\n internalType: \"address\"\n },\n {\n name: \"providingPlugin\",\n type: \"address\",\n indexed: true,\n internalType: \"address\"\n }\n ],\n anonymous: false\n },\n {\n type: \"event\",\n name: \"PluginIgnoredUninstallCallbackFailure\",\n inputs: [\n {\n name: \"plugin\",\n type: \"address\",\n indexed: true,\n internalType: \"address\"\n }\n ],\n anonymous: false\n },\n {\n type: \"event\",\n name: \"PluginInstalled\",\n inputs: [\n {\n name: \"plugin\",\n type: \"address\",\n indexed: true,\n internalType: \"address\"\n },\n {\n name: \"manifestHash\",\n type: \"bytes32\",\n indexed: false,\n internalType: \"bytes32\"\n },\n {\n name: \"dependencies\",\n type: \"bytes21[]\",\n indexed: false,\n internalType: \"FunctionReference[]\"\n }\n ],\n anonymous: false\n },\n {\n type: \"event\",\n name: \"PluginUninstalled\",\n inputs: [\n {\n name: \"plugin\",\n type: \"address\",\n indexed: true,\n internalType: \"address\"\n },\n {\n name: \"callbacksSucceeded\",\n type: \"bool\",\n indexed: true,\n internalType: \"bool\"\n }\n ],\n anonymous: false\n }\n ];\n }\n });\n\n // ../../../node_modules/.pnpm/@account-kit+smart-contracts@4.62.0_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5._65dee0153d50ca3a2d2c6830319271d9/node_modules/@account-kit/smart-contracts/dist/esm/src/msca/abis/IStandardExecutor.js\n var IStandardExecutorAbi;\n var init_IStandardExecutor = __esm({\n \"../../../node_modules/.pnpm/@account-kit+smart-contracts@4.62.0_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5._65dee0153d50ca3a2d2c6830319271d9/node_modules/@account-kit/smart-contracts/dist/esm/src/msca/abis/IStandardExecutor.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n IStandardExecutorAbi = [\n {\n type: \"function\",\n name: \"execute\",\n inputs: [\n { name: \"target\", type: \"address\", internalType: \"address\" },\n { name: \"value\", type: \"uint256\", internalType: \"uint256\" },\n { name: \"data\", type: \"bytes\", internalType: \"bytes\" }\n ],\n outputs: [{ name: \"\", type: \"bytes\", internalType: \"bytes\" }],\n stateMutability: \"payable\"\n },\n {\n type: \"function\",\n name: \"executeBatch\",\n inputs: [\n {\n name: \"calls\",\n type: \"tuple[]\",\n internalType: \"struct Call[]\",\n components: [\n { name: \"target\", type: \"address\", internalType: \"address\" },\n { name: \"value\", type: \"uint256\", internalType: \"uint256\" },\n { name: \"data\", type: \"bytes\", internalType: \"bytes\" }\n ]\n }\n ],\n outputs: [{ name: \"\", type: \"bytes[]\", internalType: \"bytes[]\" }],\n stateMutability: \"payable\"\n }\n ];\n }\n });\n\n // ../../../node_modules/.pnpm/@account-kit+smart-contracts@4.62.0_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5._65dee0153d50ca3a2d2c6830319271d9/node_modules/@account-kit/smart-contracts/dist/esm/src/msca/abis/MultiOwnerModularAccountFactory.js\n var MultiOwnerModularAccountFactoryAbi;\n var init_MultiOwnerModularAccountFactory = __esm({\n \"../../../node_modules/.pnpm/@account-kit+smart-contracts@4.62.0_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5._65dee0153d50ca3a2d2c6830319271d9/node_modules/@account-kit/smart-contracts/dist/esm/src/msca/abis/MultiOwnerModularAccountFactory.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n MultiOwnerModularAccountFactoryAbi = [\n {\n type: \"constructor\",\n inputs: [\n { name: \"owner\", type: \"address\", internalType: \"address\" },\n {\n name: \"multiOwnerPlugin\",\n type: \"address\",\n internalType: \"address\"\n },\n {\n name: \"implementation\",\n type: \"address\",\n internalType: \"address\"\n },\n {\n name: \"multiOwnerPluginManifestHash\",\n type: \"bytes32\",\n internalType: \"bytes32\"\n },\n {\n name: \"entryPoint\",\n type: \"address\",\n internalType: \"contract IEntryPoint\"\n }\n ],\n stateMutability: \"nonpayable\"\n },\n { type: \"receive\", stateMutability: \"payable\" },\n {\n type: \"function\",\n name: \"ENTRYPOINT\",\n inputs: [],\n outputs: [\n {\n name: \"\",\n type: \"address\",\n internalType: \"contract IEntryPoint\"\n }\n ],\n stateMutability: \"view\"\n },\n {\n type: \"function\",\n name: \"IMPL\",\n inputs: [],\n outputs: [{ name: \"\", type: \"address\", internalType: \"address\" }],\n stateMutability: \"view\"\n },\n {\n type: \"function\",\n name: \"MULTI_OWNER_PLUGIN\",\n inputs: [],\n outputs: [{ name: \"\", type: \"address\", internalType: \"address\" }],\n stateMutability: \"view\"\n },\n {\n type: \"function\",\n name: \"acceptOwnership\",\n inputs: [],\n outputs: [],\n stateMutability: \"nonpayable\"\n },\n {\n type: \"function\",\n name: \"addStake\",\n inputs: [\n { name: \"unstakeDelay\", type: \"uint32\", internalType: \"uint32\" },\n { name: \"amount\", type: \"uint256\", internalType: \"uint256\" }\n ],\n outputs: [],\n stateMutability: \"payable\"\n },\n {\n type: \"function\",\n name: \"createAccount\",\n inputs: [\n { name: \"salt\", type: \"uint256\", internalType: \"uint256\" },\n { name: \"owners\", type: \"address[]\", internalType: \"address[]\" }\n ],\n outputs: [{ name: \"addr\", type: \"address\", internalType: \"address\" }],\n stateMutability: \"nonpayable\"\n },\n {\n type: \"function\",\n name: \"getAddress\",\n inputs: [\n { name: \"salt\", type: \"uint256\", internalType: \"uint256\" },\n { name: \"owners\", type: \"address[]\", internalType: \"address[]\" }\n ],\n outputs: [{ name: \"\", type: \"address\", internalType: \"address\" }],\n stateMutability: \"view\"\n },\n {\n type: \"function\",\n name: \"owner\",\n inputs: [],\n outputs: [{ name: \"\", type: \"address\", internalType: \"address\" }],\n stateMutability: \"view\"\n },\n {\n type: \"function\",\n name: \"pendingOwner\",\n inputs: [],\n outputs: [{ name: \"\", type: \"address\", internalType: \"address\" }],\n stateMutability: \"view\"\n },\n {\n type: \"function\",\n name: \"renounceOwnership\",\n inputs: [],\n outputs: [],\n stateMutability: \"view\"\n },\n {\n type: \"function\",\n name: \"transferOwnership\",\n inputs: [{ name: \"newOwner\", type: \"address\", internalType: \"address\" }],\n outputs: [],\n stateMutability: \"nonpayable\"\n },\n {\n type: \"function\",\n name: \"unlockStake\",\n inputs: [],\n outputs: [],\n stateMutability: \"nonpayable\"\n },\n {\n type: \"function\",\n name: \"withdraw\",\n inputs: [\n { name: \"to\", type: \"address\", internalType: \"address payable\" },\n { name: \"token\", type: \"address\", internalType: \"address\" },\n { name: \"amount\", type: \"uint256\", internalType: \"uint256\" }\n ],\n outputs: [],\n stateMutability: \"nonpayable\"\n },\n {\n type: \"function\",\n name: \"withdrawStake\",\n inputs: [{ name: \"to\", type: \"address\", internalType: \"address payable\" }],\n outputs: [],\n stateMutability: \"nonpayable\"\n },\n {\n type: \"event\",\n name: \"OwnershipTransferStarted\",\n inputs: [\n {\n name: \"previousOwner\",\n type: \"address\",\n indexed: true,\n internalType: \"address\"\n },\n {\n name: \"newOwner\",\n type: \"address\",\n indexed: true,\n internalType: \"address\"\n }\n ],\n anonymous: false\n },\n {\n type: \"event\",\n name: \"OwnershipTransferred\",\n inputs: [\n {\n name: \"previousOwner\",\n type: \"address\",\n indexed: true,\n internalType: \"address\"\n },\n {\n name: \"newOwner\",\n type: \"address\",\n indexed: true,\n internalType: \"address\"\n }\n ],\n anonymous: false\n },\n { type: \"error\", name: \"InvalidAction\", inputs: [] },\n { type: \"error\", name: \"InvalidOwner\", inputs: [] },\n { type: \"error\", name: \"OwnersArrayEmpty\", inputs: [] },\n { type: \"error\", name: \"OwnersLimitExceeded\", inputs: [] },\n { type: \"error\", name: \"TransferFailed\", inputs: [] }\n ];\n }\n });\n\n // ../../../node_modules/.pnpm/@account-kit+smart-contracts@4.62.0_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5._65dee0153d50ca3a2d2c6830319271d9/node_modules/@account-kit/smart-contracts/dist/esm/src/msca/abis/MultisigModularAccountFactory.js\n var MultisigModularAccountFactoryAbi;\n var init_MultisigModularAccountFactory = __esm({\n \"../../../node_modules/.pnpm/@account-kit+smart-contracts@4.62.0_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5._65dee0153d50ca3a2d2c6830319271d9/node_modules/@account-kit/smart-contracts/dist/esm/src/msca/abis/MultisigModularAccountFactory.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n MultisigModularAccountFactoryAbi = [\n {\n type: \"constructor\",\n inputs: [\n {\n name: \"owner\",\n type: \"address\",\n internalType: \"address\"\n },\n {\n name: \"multisigPlugin\",\n type: \"address\",\n internalType: \"address\"\n },\n {\n name: \"implementation\",\n type: \"address\",\n internalType: \"address\"\n },\n {\n name: \"multisigPluginManifestHash\",\n type: \"bytes32\",\n internalType: \"bytes32\"\n },\n {\n name: \"entryPoint\",\n type: \"address\",\n internalType: \"contract IEntryPoint\"\n }\n ],\n stateMutability: \"nonpayable\"\n },\n {\n type: \"receive\",\n stateMutability: \"payable\"\n },\n {\n type: \"function\",\n name: \"ENTRYPOINT\",\n inputs: [],\n outputs: [\n {\n name: \"\",\n type: \"address\",\n internalType: \"contract IEntryPoint\"\n }\n ],\n stateMutability: \"view\"\n },\n {\n type: \"function\",\n name: \"IMPL\",\n inputs: [],\n outputs: [\n {\n name: \"\",\n type: \"address\",\n internalType: \"address\"\n }\n ],\n stateMutability: \"view\"\n },\n {\n type: \"function\",\n name: \"MULTISIG_PLUGIN\",\n inputs: [],\n outputs: [\n {\n name: \"\",\n type: \"address\",\n internalType: \"address\"\n }\n ],\n stateMutability: \"view\"\n },\n {\n type: \"function\",\n name: \"acceptOwnership\",\n inputs: [],\n outputs: [],\n stateMutability: \"nonpayable\"\n },\n {\n type: \"function\",\n name: \"addStake\",\n inputs: [\n {\n name: \"unstakeDelay\",\n type: \"uint32\",\n internalType: \"uint32\"\n },\n {\n name: \"amount\",\n type: \"uint256\",\n internalType: \"uint256\"\n }\n ],\n outputs: [],\n stateMutability: \"payable\"\n },\n {\n type: \"function\",\n name: \"createAccount\",\n inputs: [\n {\n name: \"salt\",\n type: \"uint256\",\n internalType: \"uint256\"\n },\n {\n name: \"owners\",\n type: \"address[]\",\n internalType: \"address[]\"\n },\n {\n name: \"threshold\",\n type: \"uint128\",\n internalType: \"uint128\"\n }\n ],\n outputs: [\n {\n name: \"addr\",\n type: \"address\",\n internalType: \"address\"\n }\n ],\n stateMutability: \"nonpayable\"\n },\n {\n type: \"function\",\n name: \"getAddress\",\n inputs: [\n {\n name: \"salt\",\n type: \"uint256\",\n internalType: \"uint256\"\n },\n {\n name: \"owners\",\n type: \"address[]\",\n internalType: \"address[]\"\n },\n {\n name: \"threshold\",\n type: \"uint256\",\n internalType: \"uint256\"\n }\n ],\n outputs: [\n {\n name: \"\",\n type: \"address\",\n internalType: \"address\"\n }\n ],\n stateMutability: \"view\"\n },\n {\n type: \"function\",\n name: \"owner\",\n inputs: [],\n outputs: [\n {\n name: \"\",\n type: \"address\",\n internalType: \"address\"\n }\n ],\n stateMutability: \"view\"\n },\n {\n type: \"function\",\n name: \"pendingOwner\",\n inputs: [],\n outputs: [\n {\n name: \"\",\n type: \"address\",\n internalType: \"address\"\n }\n ],\n stateMutability: \"view\"\n },\n {\n type: \"function\",\n name: \"renounceOwnership\",\n inputs: [],\n outputs: [],\n stateMutability: \"view\"\n },\n {\n type: \"function\",\n name: \"transferOwnership\",\n inputs: [\n {\n name: \"newOwner\",\n type: \"address\",\n internalType: \"address\"\n }\n ],\n outputs: [],\n stateMutability: \"nonpayable\"\n },\n {\n type: \"function\",\n name: \"unlockStake\",\n inputs: [],\n outputs: [],\n stateMutability: \"nonpayable\"\n },\n {\n type: \"function\",\n name: \"withdraw\",\n inputs: [\n {\n name: \"to\",\n type: \"address\",\n internalType: \"address payable\"\n },\n {\n name: \"token\",\n type: \"address\",\n internalType: \"address\"\n },\n {\n name: \"amount\",\n type: \"uint256\",\n internalType: \"uint256\"\n }\n ],\n outputs: [],\n stateMutability: \"nonpayable\"\n },\n {\n type: \"function\",\n name: \"withdrawStake\",\n inputs: [\n {\n name: \"to\",\n type: \"address\",\n internalType: \"address payable\"\n }\n ],\n outputs: [],\n stateMutability: \"nonpayable\"\n },\n {\n type: \"event\",\n name: \"OwnershipTransferStarted\",\n inputs: [\n {\n name: \"previousOwner\",\n type: \"address\",\n indexed: true,\n internalType: \"address\"\n },\n {\n name: \"newOwner\",\n type: \"address\",\n indexed: true,\n internalType: \"address\"\n }\n ],\n anonymous: false\n },\n {\n type: \"event\",\n name: \"OwnershipTransferred\",\n inputs: [\n {\n name: \"previousOwner\",\n type: \"address\",\n indexed: true,\n internalType: \"address\"\n },\n {\n name: \"newOwner\",\n type: \"address\",\n indexed: true,\n internalType: \"address\"\n }\n ],\n anonymous: false\n },\n {\n type: \"error\",\n name: \"InvalidAction\",\n inputs: []\n },\n {\n type: \"error\",\n name: \"InvalidOwner\",\n inputs: []\n },\n {\n type: \"error\",\n name: \"InvalidThreshold\",\n inputs: []\n },\n {\n type: \"error\",\n name: \"OwnersArrayEmpty\",\n inputs: []\n },\n {\n type: \"error\",\n name: \"OwnersLimitExceeded\",\n inputs: []\n },\n {\n type: \"error\",\n name: \"TransferFailed\",\n inputs: []\n }\n ];\n }\n });\n\n // ../../../node_modules/.pnpm/@account-kit+smart-contracts@4.62.0_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5._65dee0153d50ca3a2d2c6830319271d9/node_modules/@account-kit/smart-contracts/dist/esm/src/msca/abis/UpgradeableModularAccount.js\n var UpgradeableModularAccountAbi;\n var init_UpgradeableModularAccount = __esm({\n \"../../../node_modules/.pnpm/@account-kit+smart-contracts@4.62.0_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5._65dee0153d50ca3a2d2c6830319271d9/node_modules/@account-kit/smart-contracts/dist/esm/src/msca/abis/UpgradeableModularAccount.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n UpgradeableModularAccountAbi = [\n {\n type: \"constructor\",\n inputs: [\n {\n name: \"anEntryPoint\",\n type: \"address\",\n internalType: \"contract IEntryPoint\"\n }\n ],\n stateMutability: \"nonpayable\"\n },\n { type: \"fallback\", stateMutability: \"payable\" },\n { type: \"receive\", stateMutability: \"payable\" },\n {\n type: \"function\",\n name: \"entryPoint\",\n inputs: [],\n outputs: [\n {\n name: \"\",\n type: \"address\",\n internalType: \"contract IEntryPoint\"\n }\n ],\n stateMutability: \"view\"\n },\n {\n type: \"function\",\n name: \"execute\",\n inputs: [\n { name: \"target\", type: \"address\", internalType: \"address\" },\n { name: \"value\", type: \"uint256\", internalType: \"uint256\" },\n { name: \"data\", type: \"bytes\", internalType: \"bytes\" }\n ],\n outputs: [{ name: \"result\", type: \"bytes\", internalType: \"bytes\" }],\n stateMutability: \"payable\"\n },\n {\n type: \"function\",\n name: \"executeBatch\",\n inputs: [\n {\n name: \"calls\",\n type: \"tuple[]\",\n internalType: \"struct Call[]\",\n components: [\n { name: \"target\", type: \"address\", internalType: \"address\" },\n { name: \"value\", type: \"uint256\", internalType: \"uint256\" },\n { name: \"data\", type: \"bytes\", internalType: \"bytes\" }\n ]\n }\n ],\n outputs: [{ name: \"results\", type: \"bytes[]\", internalType: \"bytes[]\" }],\n stateMutability: \"payable\"\n },\n {\n type: \"function\",\n name: \"executeFromPlugin\",\n inputs: [{ name: \"data\", type: \"bytes\", internalType: \"bytes\" }],\n outputs: [{ name: \"returnData\", type: \"bytes\", internalType: \"bytes\" }],\n stateMutability: \"payable\"\n },\n {\n type: \"function\",\n name: \"executeFromPluginExternal\",\n inputs: [\n { name: \"target\", type: \"address\", internalType: \"address\" },\n { name: \"value\", type: \"uint256\", internalType: \"uint256\" },\n { name: \"data\", type: \"bytes\", internalType: \"bytes\" }\n ],\n outputs: [{ name: \"\", type: \"bytes\", internalType: \"bytes\" }],\n stateMutability: \"payable\"\n },\n {\n type: \"function\",\n name: \"getExecutionFunctionConfig\",\n inputs: [{ name: \"selector\", type: \"bytes4\", internalType: \"bytes4\" }],\n outputs: [\n {\n name: \"config\",\n type: \"tuple\",\n internalType: \"struct IAccountLoupe.ExecutionFunctionConfig\",\n components: [\n { name: \"plugin\", type: \"address\", internalType: \"address\" },\n {\n name: \"userOpValidationFunction\",\n type: \"bytes21\",\n internalType: \"FunctionReference\"\n },\n {\n name: \"runtimeValidationFunction\",\n type: \"bytes21\",\n internalType: \"FunctionReference\"\n }\n ]\n }\n ],\n stateMutability: \"view\"\n },\n {\n type: \"function\",\n name: \"getExecutionHooks\",\n inputs: [{ name: \"selector\", type: \"bytes4\", internalType: \"bytes4\" }],\n outputs: [\n {\n name: \"execHooks\",\n type: \"tuple[]\",\n internalType: \"struct IAccountLoupe.ExecutionHooks[]\",\n components: [\n {\n name: \"preExecHook\",\n type: \"bytes21\",\n internalType: \"FunctionReference\"\n },\n {\n name: \"postExecHook\",\n type: \"bytes21\",\n internalType: \"FunctionReference\"\n }\n ]\n }\n ],\n stateMutability: \"view\"\n },\n {\n type: \"function\",\n name: \"getInstalledPlugins\",\n inputs: [],\n outputs: [\n {\n name: \"pluginAddresses\",\n type: \"address[]\",\n internalType: \"address[]\"\n }\n ],\n stateMutability: \"view\"\n },\n {\n type: \"function\",\n name: \"getNonce\",\n inputs: [],\n outputs: [{ name: \"\", type: \"uint256\", internalType: \"uint256\" }],\n stateMutability: \"view\"\n },\n {\n type: \"function\",\n name: \"getPreValidationHooks\",\n inputs: [{ name: \"selector\", type: \"bytes4\", internalType: \"bytes4\" }],\n outputs: [\n {\n name: \"preUserOpValidationHooks\",\n type: \"bytes21[]\",\n internalType: \"FunctionReference[]\"\n },\n {\n name: \"preRuntimeValidationHooks\",\n type: \"bytes21[]\",\n internalType: \"FunctionReference[]\"\n }\n ],\n stateMutability: \"view\"\n },\n {\n type: \"function\",\n name: \"initialize\",\n inputs: [\n { name: \"plugins\", type: \"address[]\", internalType: \"address[]\" },\n { name: \"pluginInitData\", type: \"bytes\", internalType: \"bytes\" }\n ],\n outputs: [],\n stateMutability: \"nonpayable\"\n },\n {\n type: \"function\",\n name: \"installPlugin\",\n inputs: [\n { name: \"plugin\", type: \"address\", internalType: \"address\" },\n {\n name: \"manifestHash\",\n type: \"bytes32\",\n internalType: \"bytes32\"\n },\n {\n name: \"pluginInstallData\",\n type: \"bytes\",\n internalType: \"bytes\"\n },\n {\n name: \"dependencies\",\n type: \"bytes21[]\",\n internalType: \"FunctionReference[]\"\n }\n ],\n outputs: [],\n stateMutability: \"nonpayable\"\n },\n {\n type: \"function\",\n name: \"onERC1155BatchReceived\",\n inputs: [\n { name: \"operator\", type: \"address\", internalType: \"address\" },\n { name: \"from\", type: \"address\", internalType: \"address\" },\n { name: \"ids\", type: \"uint256[]\", internalType: \"uint256[]\" },\n { name: \"values\", type: \"uint256[]\", internalType: \"uint256[]\" },\n { name: \"data\", type: \"bytes\", internalType: \"bytes\" }\n ],\n outputs: [{ name: \"selector\", type: \"bytes4\", internalType: \"bytes4\" }],\n stateMutability: \"nonpayable\"\n },\n {\n type: \"function\",\n name: \"onERC1155Received\",\n inputs: [\n { name: \"operator\", type: \"address\", internalType: \"address\" },\n { name: \"from\", type: \"address\", internalType: \"address\" },\n { name: \"id\", type: \"uint256\", internalType: \"uint256\" },\n { name: \"value\", type: \"uint256\", internalType: \"uint256\" },\n { name: \"data\", type: \"bytes\", internalType: \"bytes\" }\n ],\n outputs: [{ name: \"selector\", type: \"bytes4\", internalType: \"bytes4\" }],\n stateMutability: \"nonpayable\"\n },\n {\n type: \"function\",\n name: \"onERC721Received\",\n inputs: [\n { name: \"operator\", type: \"address\", internalType: \"address\" },\n { name: \"from\", type: \"address\", internalType: \"address\" },\n { name: \"tokenId\", type: \"uint256\", internalType: \"uint256\" },\n { name: \"data\", type: \"bytes\", internalType: \"bytes\" }\n ],\n outputs: [{ name: \"selector\", type: \"bytes4\", internalType: \"bytes4\" }],\n stateMutability: \"nonpayable\"\n },\n {\n type: \"function\",\n name: \"proxiableUUID\",\n inputs: [],\n outputs: [{ name: \"\", type: \"bytes32\", internalType: \"bytes32\" }],\n stateMutability: \"view\"\n },\n {\n type: \"function\",\n name: \"supportsInterface\",\n inputs: [{ name: \"interfaceId\", type: \"bytes4\", internalType: \"bytes4\" }],\n outputs: [{ name: \"\", type: \"bool\", internalType: \"bool\" }],\n stateMutability: \"view\"\n },\n {\n type: \"function\",\n name: \"tokensReceived\",\n inputs: [\n { name: \"operator\", type: \"address\", internalType: \"address\" },\n { name: \"from\", type: \"address\", internalType: \"address\" },\n { name: \"to\", type: \"address\", internalType: \"address\" },\n { name: \"amount\", type: \"uint256\", internalType: \"uint256\" },\n { name: \"userData\", type: \"bytes\", internalType: \"bytes\" },\n { name: \"operatorData\", type: \"bytes\", internalType: \"bytes\" }\n ],\n outputs: [],\n stateMutability: \"nonpayable\"\n },\n {\n type: \"function\",\n name: \"uninstallPlugin\",\n inputs: [\n { name: \"plugin\", type: \"address\", internalType: \"address\" },\n { name: \"config\", type: \"bytes\", internalType: \"bytes\" },\n {\n name: \"pluginUninstallData\",\n type: \"bytes\",\n internalType: \"bytes\"\n }\n ],\n outputs: [],\n stateMutability: \"nonpayable\"\n },\n {\n type: \"function\",\n name: \"upgradeToAndCall\",\n inputs: [\n {\n name: \"newImplementation\",\n type: \"address\",\n internalType: \"address\"\n },\n { name: \"data\", type: \"bytes\", internalType: \"bytes\" }\n ],\n outputs: [],\n stateMutability: \"payable\"\n },\n {\n type: \"function\",\n name: \"validateUserOp\",\n inputs: [\n {\n name: \"userOp\",\n type: \"tuple\",\n internalType: \"struct UserOperation\",\n components: [\n { name: \"sender\", type: \"address\", internalType: \"address\" },\n { name: \"nonce\", type: \"uint256\", internalType: \"uint256\" },\n { name: \"initCode\", type: \"bytes\", internalType: \"bytes\" },\n { name: \"callData\", type: \"bytes\", internalType: \"bytes\" },\n {\n name: \"callGasLimit\",\n type: \"uint256\",\n internalType: \"uint256\"\n },\n {\n name: \"verificationGasLimit\",\n type: \"uint256\",\n internalType: \"uint256\"\n },\n {\n name: \"preVerificationGas\",\n type: \"uint256\",\n internalType: \"uint256\"\n },\n {\n name: \"maxFeePerGas\",\n type: \"uint256\",\n internalType: \"uint256\"\n },\n {\n name: \"maxPriorityFeePerGas\",\n type: \"uint256\",\n internalType: \"uint256\"\n },\n {\n name: \"paymasterAndData\",\n type: \"bytes\",\n internalType: \"bytes\"\n },\n { name: \"signature\", type: \"bytes\", internalType: \"bytes\" }\n ]\n },\n { name: \"userOpHash\", type: \"bytes32\", internalType: \"bytes32\" },\n {\n name: \"missingAccountFunds\",\n type: \"uint256\",\n internalType: \"uint256\"\n }\n ],\n outputs: [\n {\n name: \"validationData\",\n type: \"uint256\",\n internalType: \"uint256\"\n }\n ],\n stateMutability: \"nonpayable\"\n },\n {\n type: \"event\",\n name: \"ModularAccountInitialized\",\n inputs: [\n {\n name: \"entryPoint\",\n type: \"address\",\n indexed: true,\n internalType: \"contract IEntryPoint\"\n }\n ],\n anonymous: false\n },\n {\n type: \"event\",\n name: \"PluginInstalled\",\n inputs: [\n {\n name: \"plugin\",\n type: \"address\",\n indexed: true,\n internalType: \"address\"\n },\n {\n name: \"manifestHash\",\n type: \"bytes32\",\n indexed: false,\n internalType: \"bytes32\"\n },\n {\n name: \"dependencies\",\n type: \"bytes21[]\",\n indexed: false,\n internalType: \"FunctionReference[]\"\n }\n ],\n anonymous: false\n },\n {\n type: \"event\",\n name: \"PluginUninstalled\",\n inputs: [\n {\n name: \"plugin\",\n type: \"address\",\n indexed: true,\n internalType: \"address\"\n },\n {\n name: \"onUninstallSucceeded\",\n type: \"bool\",\n indexed: true,\n internalType: \"bool\"\n }\n ],\n anonymous: false\n },\n {\n type: \"event\",\n name: \"Upgraded\",\n inputs: [\n {\n name: \"implementation\",\n type: \"address\",\n indexed: true,\n internalType: \"address\"\n }\n ],\n anonymous: false\n },\n { type: \"error\", name: \"AlreadyInitialized\", inputs: [] },\n { type: \"error\", name: \"AlreadyInitializing\", inputs: [] },\n { type: \"error\", name: \"AlwaysDenyRule\", inputs: [] },\n { type: \"error\", name: \"ArrayLengthMismatch\", inputs: [] },\n {\n type: \"error\",\n name: \"DuplicateHookLimitExceeded\",\n inputs: [\n { name: \"selector\", type: \"bytes4\", internalType: \"bytes4\" },\n {\n name: \"hook\",\n type: \"bytes21\",\n internalType: \"FunctionReference\"\n }\n ]\n },\n {\n type: \"error\",\n name: \"DuplicatePreRuntimeValidationHookLimitExceeded\",\n inputs: [\n { name: \"selector\", type: \"bytes4\", internalType: \"bytes4\" },\n {\n name: \"hook\",\n type: \"bytes21\",\n internalType: \"FunctionReference\"\n }\n ]\n },\n {\n type: \"error\",\n name: \"DuplicatePreUserOpValidationHookLimitExceeded\",\n inputs: [\n { name: \"selector\", type: \"bytes4\", internalType: \"bytes4\" },\n {\n name: \"hook\",\n type: \"bytes21\",\n internalType: \"FunctionReference\"\n }\n ]\n },\n {\n type: \"error\",\n name: \"Erc4337FunctionNotAllowed\",\n inputs: [{ name: \"selector\", type: \"bytes4\", internalType: \"bytes4\" }]\n },\n {\n type: \"error\",\n name: \"ExecFromPluginExternalNotPermitted\",\n inputs: [\n { name: \"plugin\", type: \"address\", internalType: \"address\" },\n { name: \"target\", type: \"address\", internalType: \"address\" },\n { name: \"value\", type: \"uint256\", internalType: \"uint256\" },\n { name: \"data\", type: \"bytes\", internalType: \"bytes\" }\n ]\n },\n {\n type: \"error\",\n name: \"ExecFromPluginNotPermitted\",\n inputs: [\n { name: \"plugin\", type: \"address\", internalType: \"address\" },\n { name: \"selector\", type: \"bytes4\", internalType: \"bytes4\" }\n ]\n },\n {\n type: \"error\",\n name: \"ExecutionFunctionAlreadySet\",\n inputs: [{ name: \"selector\", type: \"bytes4\", internalType: \"bytes4\" }]\n },\n {\n type: \"error\",\n name: \"IPluginFunctionNotAllowed\",\n inputs: [{ name: \"selector\", type: \"bytes4\", internalType: \"bytes4\" }]\n },\n { type: \"error\", name: \"InterfaceNotAllowed\", inputs: [] },\n { type: \"error\", name: \"InvalidDependenciesProvided\", inputs: [] },\n { type: \"error\", name: \"InvalidPluginManifest\", inputs: [] },\n {\n type: \"error\",\n name: \"MissingPluginDependency\",\n inputs: [{ name: \"dependency\", type: \"address\", internalType: \"address\" }]\n },\n {\n type: \"error\",\n name: \"NativeFunctionNotAllowed\",\n inputs: [{ name: \"selector\", type: \"bytes4\", internalType: \"bytes4\" }]\n },\n {\n type: \"error\",\n name: \"NativeTokenSpendingNotPermitted\",\n inputs: [{ name: \"plugin\", type: \"address\", internalType: \"address\" }]\n },\n { type: \"error\", name: \"NullFunctionReference\", inputs: [] },\n {\n type: \"error\",\n name: \"PluginAlreadyInstalled\",\n inputs: [{ name: \"plugin\", type: \"address\", internalType: \"address\" }]\n },\n {\n type: \"error\",\n name: \"PluginCallDenied\",\n inputs: [{ name: \"plugin\", type: \"address\", internalType: \"address\" }]\n },\n {\n type: \"error\",\n name: \"PluginDependencyViolation\",\n inputs: [{ name: \"plugin\", type: \"address\", internalType: \"address\" }]\n },\n {\n type: \"error\",\n name: \"PluginInstallCallbackFailed\",\n inputs: [\n { name: \"plugin\", type: \"address\", internalType: \"address\" },\n { name: \"revertReason\", type: \"bytes\", internalType: \"bytes\" }\n ]\n },\n {\n type: \"error\",\n name: \"PluginInterfaceNotSupported\",\n inputs: [{ name: \"plugin\", type: \"address\", internalType: \"address\" }]\n },\n {\n type: \"error\",\n name: \"PluginNotInstalled\",\n inputs: [{ name: \"plugin\", type: \"address\", internalType: \"address\" }]\n },\n {\n type: \"error\",\n name: \"PluginUninstallCallbackFailed\",\n inputs: [\n { name: \"plugin\", type: \"address\", internalType: \"address\" },\n { name: \"revertReason\", type: \"bytes\", internalType: \"bytes\" }\n ]\n },\n {\n type: \"error\",\n name: \"PostExecHookReverted\",\n inputs: [\n { name: \"plugin\", type: \"address\", internalType: \"address\" },\n { name: \"functionId\", type: \"uint8\", internalType: \"uint8\" },\n { name: \"revertReason\", type: \"bytes\", internalType: \"bytes\" }\n ]\n },\n {\n type: \"error\",\n name: \"PreExecHookReverted\",\n inputs: [\n { name: \"plugin\", type: \"address\", internalType: \"address\" },\n { name: \"functionId\", type: \"uint8\", internalType: \"uint8\" },\n { name: \"revertReason\", type: \"bytes\", internalType: \"bytes\" }\n ]\n },\n {\n type: \"error\",\n name: \"PreRuntimeValidationHookFailed\",\n inputs: [\n { name: \"plugin\", type: \"address\", internalType: \"address\" },\n { name: \"functionId\", type: \"uint8\", internalType: \"uint8\" },\n { name: \"revertReason\", type: \"bytes\", internalType: \"bytes\" }\n ]\n },\n {\n type: \"error\",\n name: \"RuntimeValidationFunctionAlreadySet\",\n inputs: [\n { name: \"selector\", type: \"bytes4\", internalType: \"bytes4\" },\n {\n name: \"validationFunction\",\n type: \"bytes21\",\n internalType: \"FunctionReference\"\n }\n ]\n },\n {\n type: \"error\",\n name: \"RuntimeValidationFunctionMissing\",\n inputs: [{ name: \"selector\", type: \"bytes4\", internalType: \"bytes4\" }]\n },\n {\n type: \"error\",\n name: \"RuntimeValidationFunctionReverted\",\n inputs: [\n { name: \"plugin\", type: \"address\", internalType: \"address\" },\n { name: \"functionId\", type: \"uint8\", internalType: \"uint8\" },\n { name: \"revertReason\", type: \"bytes\", internalType: \"bytes\" }\n ]\n },\n { type: \"error\", name: \"UnauthorizedCallContext\", inputs: [] },\n {\n type: \"error\",\n name: \"UnexpectedAggregator\",\n inputs: [\n { name: \"plugin\", type: \"address\", internalType: \"address\" },\n { name: \"functionId\", type: \"uint8\", internalType: \"uint8\" },\n { name: \"aggregator\", type: \"address\", internalType: \"address\" }\n ]\n },\n {\n type: \"error\",\n name: \"UnrecognizedFunction\",\n inputs: [{ name: \"selector\", type: \"bytes4\", internalType: \"bytes4\" }]\n },\n { type: \"error\", name: \"UpgradeFailed\", inputs: [] },\n { type: \"error\", name: \"UserOpNotFromEntryPoint\", inputs: [] },\n {\n type: \"error\",\n name: \"UserOpValidationFunctionAlreadySet\",\n inputs: [\n { name: \"selector\", type: \"bytes4\", internalType: \"bytes4\" },\n {\n name: \"validationFunction\",\n type: \"bytes21\",\n internalType: \"FunctionReference\"\n }\n ]\n },\n {\n type: \"error\",\n name: \"UserOpValidationFunctionMissing\",\n inputs: [{ name: \"selector\", type: \"bytes4\", internalType: \"bytes4\" }]\n }\n ];\n }\n });\n\n // ../../../node_modules/.pnpm/@account-kit+smart-contracts@4.62.0_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5._65dee0153d50ca3a2d2c6830319271d9/node_modules/@account-kit/smart-contracts/dist/esm/src/msca/account-loupe/decorator.js\n var accountLoupeActions;\n var init_decorator = __esm({\n \"../../../node_modules/.pnpm/@account-kit+smart-contracts@4.62.0_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5._65dee0153d50ca3a2d2c6830319271d9/node_modules/@account-kit/smart-contracts/dist/esm/src/msca/account-loupe/decorator.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_esm6();\n init_IAccountLoupe();\n accountLoupeActions = (client) => ({\n getExecutionFunctionConfig: async ({ selector, account = client.account }) => {\n if (!account) {\n throw new AccountNotFoundError2();\n }\n if (!isSmartAccountClient(client)) {\n throw new IncompatibleClientError(\"SmartAccountClient\", \"getExecutionFunctionConfig\", client);\n }\n return client.readContract({\n address: account.address,\n abi: IAccountLoupeAbi,\n functionName: \"getExecutionFunctionConfig\",\n args: [selector]\n });\n },\n getExecutionHooks: async ({ selector, account = client.account }) => {\n if (!account) {\n throw new AccountNotFoundError2();\n }\n if (!isSmartAccountClient(client)) {\n throw new IncompatibleClientError(\"SmartAccountClient\", \"getExecutionHooks\", client);\n }\n return client.readContract({\n address: account.address,\n abi: IAccountLoupeAbi,\n functionName: \"getExecutionHooks\",\n args: [selector]\n });\n },\n getPreValidationHooks: async ({ selector, account = client.account }) => {\n if (!account) {\n throw new AccountNotFoundError2();\n }\n if (!isSmartAccountClient(client)) {\n throw new IncompatibleClientError(\"SmartAccountClient\", \"getPreValidationHooks\", client);\n }\n return client.readContract({\n address: account.address,\n abi: IAccountLoupeAbi,\n functionName: \"getPreValidationHooks\",\n args: [selector]\n });\n },\n getInstalledPlugins: async ({ account = client.account }) => {\n if (!account) {\n throw new AccountNotFoundError2();\n }\n if (!isSmartAccountClient(client)) {\n throw new IncompatibleClientError(\"SmartAccountClient\", \"getInstalledPlugins\", client);\n }\n return client.readContract({\n address: account.address,\n abi: IAccountLoupeAbi,\n functionName: \"getInstalledPlugins\"\n }).catch(() => []);\n }\n });\n }\n });\n\n // ../../../node_modules/.pnpm/@account-kit+smart-contracts@4.62.0_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5._65dee0153d50ca3a2d2c6830319271d9/node_modules/@account-kit/smart-contracts/dist/esm/src/msca/plugins/multi-owner/plugin.js\n var addresses, MultiOwnerPlugin, multiOwnerPluginActions, MultiOwnerPluginExecutionFunctionAbi, MultiOwnerPluginAbi;\n var init_plugin = __esm({\n \"../../../node_modules/.pnpm/@account-kit+smart-contracts@4.62.0_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5._65dee0153d50ca3a2d2c6830319271d9/node_modules/@account-kit/smart-contracts/dist/esm/src/msca/plugins/multi-owner/plugin.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_esm();\n init_esm6();\n init_src();\n addresses = {\n 1: \"0xcE0000007B008F50d762D155002600004cD6c647\",\n 10: \"0xcE0000007B008F50d762D155002600004cD6c647\",\n 137: \"0xcE0000007B008F50d762D155002600004cD6c647\",\n 252: \"0xcE0000007B008F50d762D155002600004cD6c647\",\n 2523: \"0xcE0000007B008F50d762D155002600004cD6c647\",\n 8453: \"0xcE0000007B008F50d762D155002600004cD6c647\",\n 42161: \"0xcE0000007B008F50d762D155002600004cD6c647\",\n 80001: \"0xcE0000007B008F50d762D155002600004cD6c647\",\n 80002: \"0xcE0000007B008F50d762D155002600004cD6c647\",\n 84532: \"0xcE0000007B008F50d762D155002600004cD6c647\",\n 421614: \"0xcE0000007B008F50d762D155002600004cD6c647\",\n 7777777: \"0xcE0000007B008F50d762D155002600004cD6c647\",\n 11155111: \"0xcE0000007B008F50d762D155002600004cD6c647\",\n 11155420: \"0xcE0000007B008F50d762D155002600004cD6c647\",\n 999999999: \"0xcE0000007B008F50d762D155002600004cD6c647\"\n };\n MultiOwnerPlugin = {\n meta: {\n name: \"Multi Owner Plugin\",\n version: \"1.0.0\",\n addresses\n },\n getContract: (client, address) => {\n if (!client.chain)\n throw new ChainNotFoundError2();\n return getContract({\n address: address || addresses[client.chain.id],\n abi: MultiOwnerPluginAbi,\n client\n });\n }\n };\n multiOwnerPluginActions = (client) => ({\n updateOwners({ args, overrides, context: context2, account = client.account }) {\n if (!account) {\n throw new AccountNotFoundError2();\n }\n if (!isSmartAccountClient(client)) {\n throw new IncompatibleClientError(\"SmartAccountClient\", \"updateOwners\", client);\n }\n const uo = encodeFunctionData({\n abi: MultiOwnerPluginExecutionFunctionAbi,\n functionName: \"updateOwners\",\n args\n });\n return client.sendUserOperation({ uo, overrides, account, context: context2 });\n },\n installMultiOwnerPlugin({ account = client.account, overrides, context: context2, ...params }) {\n if (!account) {\n throw new AccountNotFoundError2();\n }\n if (!isSmartAccountClient(client)) {\n throw new IncompatibleClientError(\"SmartAccountClient\", \"installMultiOwnerPlugin\", client);\n }\n const chain2 = client.chain;\n if (!chain2) {\n throw new ChainNotFoundError2();\n }\n const dependencies = params.dependencyOverrides ?? [];\n const pluginAddress = params.pluginAddress ?? MultiOwnerPlugin.meta.addresses[chain2.id];\n if (!pluginAddress) {\n throw new Error(\"missing MultiOwnerPlugin address for chain \" + chain2.name);\n }\n return installPlugin(client, {\n pluginAddress,\n pluginInitData: encodeAbiParameters([{ type: \"address[]\" }], params.args),\n dependencies,\n overrides,\n account,\n context: context2\n });\n },\n encodeUpdateOwners({ args }) {\n return encodeFunctionData({\n abi: MultiOwnerPluginExecutionFunctionAbi,\n functionName: \"updateOwners\",\n args\n });\n },\n encodeEip712Domain() {\n return encodeFunctionData({\n abi: MultiOwnerPluginExecutionFunctionAbi,\n functionName: \"eip712Domain\"\n });\n },\n async readEip712Domain({ account = client.account }) {\n if (!account) {\n throw new AccountNotFoundError2();\n }\n if (!isSmartAccountClient(client)) {\n throw new IncompatibleClientError(\"SmartAccountClient\", \"readEip712Domain\", client);\n }\n return client.readContract({\n address: account.address,\n abi: MultiOwnerPluginExecutionFunctionAbi,\n functionName: \"eip712Domain\"\n });\n },\n encodeIsValidSignature({ args }) {\n return encodeFunctionData({\n abi: MultiOwnerPluginExecutionFunctionAbi,\n functionName: \"isValidSignature\",\n args\n });\n },\n async readIsValidSignature({ args, account = client.account }) {\n if (!account) {\n throw new AccountNotFoundError2();\n }\n if (!isSmartAccountClient(client)) {\n throw new IncompatibleClientError(\"SmartAccountClient\", \"readIsValidSignature\", client);\n }\n return client.readContract({\n address: account.address,\n abi: MultiOwnerPluginExecutionFunctionAbi,\n functionName: \"isValidSignature\",\n args\n });\n }\n });\n MultiOwnerPluginExecutionFunctionAbi = [\n {\n type: \"function\",\n name: \"updateOwners\",\n inputs: [\n { name: \"ownersToAdd\", type: \"address[]\", internalType: \"address[]\" },\n { name: \"ownersToRemove\", type: \"address[]\", internalType: \"address[]\" }\n ],\n outputs: [],\n stateMutability: \"nonpayable\"\n },\n {\n type: \"function\",\n name: \"eip712Domain\",\n inputs: [],\n outputs: [\n { name: \"fields\", type: \"bytes1\", internalType: \"bytes1\" },\n { name: \"name\", type: \"string\", internalType: \"string\" },\n { name: \"version\", type: \"string\", internalType: \"string\" },\n { name: \"chainId\", type: \"uint256\", internalType: \"uint256\" },\n { name: \"verifyingContract\", type: \"address\", internalType: \"address\" },\n { name: \"salt\", type: \"bytes32\", internalType: \"bytes32\" },\n { name: \"extensions\", type: \"uint256[]\", internalType: \"uint256[]\" }\n ],\n stateMutability: \"view\"\n },\n {\n type: \"function\",\n name: \"isValidSignature\",\n inputs: [\n { name: \"digest\", type: \"bytes32\", internalType: \"bytes32\" },\n { name: \"signature\", type: \"bytes\", internalType: \"bytes\" }\n ],\n outputs: [{ name: \"\", type: \"bytes4\", internalType: \"bytes4\" }],\n stateMutability: \"view\"\n }\n ];\n MultiOwnerPluginAbi = [\n {\n type: \"function\",\n name: \"eip712Domain\",\n inputs: [],\n outputs: [\n { name: \"fields\", type: \"bytes1\", internalType: \"bytes1\" },\n { name: \"name\", type: \"string\", internalType: \"string\" },\n { name: \"version\", type: \"string\", internalType: \"string\" },\n { name: \"chainId\", type: \"uint256\", internalType: \"uint256\" },\n { name: \"verifyingContract\", type: \"address\", internalType: \"address\" },\n { name: \"salt\", type: \"bytes32\", internalType: \"bytes32\" },\n { name: \"extensions\", type: \"uint256[]\", internalType: \"uint256[]\" }\n ],\n stateMutability: \"view\"\n },\n {\n type: \"function\",\n name: \"encodeMessageData\",\n inputs: [\n { name: \"account\", type: \"address\", internalType: \"address\" },\n { name: \"message\", type: \"bytes\", internalType: \"bytes\" }\n ],\n outputs: [{ name: \"\", type: \"bytes\", internalType: \"bytes\" }],\n stateMutability: \"view\"\n },\n {\n type: \"function\",\n name: \"getMessageHash\",\n inputs: [\n { name: \"account\", type: \"address\", internalType: \"address\" },\n { name: \"message\", type: \"bytes\", internalType: \"bytes\" }\n ],\n outputs: [{ name: \"\", type: \"bytes32\", internalType: \"bytes32\" }],\n stateMutability: \"view\"\n },\n {\n type: \"function\",\n name: \"isOwnerOf\",\n inputs: [\n { name: \"account\", type: \"address\", internalType: \"address\" },\n { name: \"ownerToCheck\", type: \"address\", internalType: \"address\" }\n ],\n outputs: [{ name: \"\", type: \"bool\", internalType: \"bool\" }],\n stateMutability: \"view\"\n },\n {\n type: \"function\",\n name: \"isValidSignature\",\n inputs: [\n { name: \"digest\", type: \"bytes32\", internalType: \"bytes32\" },\n { name: \"signature\", type: \"bytes\", internalType: \"bytes\" }\n ],\n outputs: [{ name: \"\", type: \"bytes4\", internalType: \"bytes4\" }],\n stateMutability: \"view\"\n },\n {\n type: \"function\",\n name: \"onInstall\",\n inputs: [{ name: \"data\", type: \"bytes\", internalType: \"bytes\" }],\n outputs: [],\n stateMutability: \"nonpayable\"\n },\n {\n type: \"function\",\n name: \"onUninstall\",\n inputs: [{ name: \"\", type: \"bytes\", internalType: \"bytes\" }],\n outputs: [],\n stateMutability: \"nonpayable\"\n },\n {\n type: \"function\",\n name: \"ownersOf\",\n inputs: [{ name: \"account\", type: \"address\", internalType: \"address\" }],\n outputs: [{ name: \"\", type: \"address[]\", internalType: \"address[]\" }],\n stateMutability: \"view\"\n },\n {\n type: \"function\",\n name: \"pluginManifest\",\n inputs: [],\n outputs: [\n {\n name: \"\",\n type: \"tuple\",\n internalType: \"struct PluginManifest\",\n components: [\n { name: \"interfaceIds\", type: \"bytes4[]\", internalType: \"bytes4[]\" },\n {\n name: \"dependencyInterfaceIds\",\n type: \"bytes4[]\",\n internalType: \"bytes4[]\"\n },\n {\n name: \"executionFunctions\",\n type: \"bytes4[]\",\n internalType: \"bytes4[]\"\n },\n {\n name: \"permittedExecutionSelectors\",\n type: \"bytes4[]\",\n internalType: \"bytes4[]\"\n },\n {\n name: \"permitAnyExternalAddress\",\n type: \"bool\",\n internalType: \"bool\"\n },\n { name: \"canSpendNativeToken\", type: \"bool\", internalType: \"bool\" },\n {\n name: \"permittedExternalCalls\",\n type: \"tuple[]\",\n internalType: \"struct ManifestExternalCallPermission[]\",\n components: [\n {\n name: \"externalAddress\",\n type: \"address\",\n internalType: \"address\"\n },\n { name: \"permitAnySelector\", type: \"bool\", internalType: \"bool\" },\n { name: \"selectors\", type: \"bytes4[]\", internalType: \"bytes4[]\" }\n ]\n },\n {\n name: \"userOpValidationFunctions\",\n type: \"tuple[]\",\n internalType: \"struct ManifestAssociatedFunction[]\",\n components: [\n {\n name: \"executionSelector\",\n type: \"bytes4\",\n internalType: \"bytes4\"\n },\n {\n name: \"associatedFunction\",\n type: \"tuple\",\n internalType: \"struct ManifestFunction\",\n components: [\n {\n name: \"functionType\",\n type: \"uint8\",\n internalType: \"enum ManifestAssociatedFunctionType\"\n },\n { name: \"functionId\", type: \"uint8\", internalType: \"uint8\" },\n {\n name: \"dependencyIndex\",\n type: \"uint256\",\n internalType: \"uint256\"\n }\n ]\n }\n ]\n },\n {\n name: \"runtimeValidationFunctions\",\n type: \"tuple[]\",\n internalType: \"struct ManifestAssociatedFunction[]\",\n components: [\n {\n name: \"executionSelector\",\n type: \"bytes4\",\n internalType: \"bytes4\"\n },\n {\n name: \"associatedFunction\",\n type: \"tuple\",\n internalType: \"struct ManifestFunction\",\n components: [\n {\n name: \"functionType\",\n type: \"uint8\",\n internalType: \"enum ManifestAssociatedFunctionType\"\n },\n { name: \"functionId\", type: \"uint8\", internalType: \"uint8\" },\n {\n name: \"dependencyIndex\",\n type: \"uint256\",\n internalType: \"uint256\"\n }\n ]\n }\n ]\n },\n {\n name: \"preUserOpValidationHooks\",\n type: \"tuple[]\",\n internalType: \"struct ManifestAssociatedFunction[]\",\n components: [\n {\n name: \"executionSelector\",\n type: \"bytes4\",\n internalType: \"bytes4\"\n },\n {\n name: \"associatedFunction\",\n type: \"tuple\",\n internalType: \"struct ManifestFunction\",\n components: [\n {\n name: \"functionType\",\n type: \"uint8\",\n internalType: \"enum ManifestAssociatedFunctionType\"\n },\n { name: \"functionId\", type: \"uint8\", internalType: \"uint8\" },\n {\n name: \"dependencyIndex\",\n type: \"uint256\",\n internalType: \"uint256\"\n }\n ]\n }\n ]\n },\n {\n name: \"preRuntimeValidationHooks\",\n type: \"tuple[]\",\n internalType: \"struct ManifestAssociatedFunction[]\",\n components: [\n {\n name: \"executionSelector\",\n type: \"bytes4\",\n internalType: \"bytes4\"\n },\n {\n name: \"associatedFunction\",\n type: \"tuple\",\n internalType: \"struct ManifestFunction\",\n components: [\n {\n name: \"functionType\",\n type: \"uint8\",\n internalType: \"enum ManifestAssociatedFunctionType\"\n },\n { name: \"functionId\", type: \"uint8\", internalType: \"uint8\" },\n {\n name: \"dependencyIndex\",\n type: \"uint256\",\n internalType: \"uint256\"\n }\n ]\n }\n ]\n },\n {\n name: \"executionHooks\",\n type: \"tuple[]\",\n internalType: \"struct ManifestExecutionHook[]\",\n components: [\n {\n name: \"executionSelector\",\n type: \"bytes4\",\n internalType: \"bytes4\"\n },\n {\n name: \"preExecHook\",\n type: \"tuple\",\n internalType: \"struct ManifestFunction\",\n components: [\n {\n name: \"functionType\",\n type: \"uint8\",\n internalType: \"enum ManifestAssociatedFunctionType\"\n },\n { name: \"functionId\", type: \"uint8\", internalType: \"uint8\" },\n {\n name: \"dependencyIndex\",\n type: \"uint256\",\n internalType: \"uint256\"\n }\n ]\n },\n {\n name: \"postExecHook\",\n type: \"tuple\",\n internalType: \"struct ManifestFunction\",\n components: [\n {\n name: \"functionType\",\n type: \"uint8\",\n internalType: \"enum ManifestAssociatedFunctionType\"\n },\n { name: \"functionId\", type: \"uint8\", internalType: \"uint8\" },\n {\n name: \"dependencyIndex\",\n type: \"uint256\",\n internalType: \"uint256\"\n }\n ]\n }\n ]\n }\n ]\n }\n ],\n stateMutability: \"pure\"\n },\n {\n type: \"function\",\n name: \"pluginMetadata\",\n inputs: [],\n outputs: [\n {\n name: \"\",\n type: \"tuple\",\n internalType: \"struct PluginMetadata\",\n components: [\n { name: \"name\", type: \"string\", internalType: \"string\" },\n { name: \"version\", type: \"string\", internalType: \"string\" },\n { name: \"author\", type: \"string\", internalType: \"string\" },\n {\n name: \"permissionDescriptors\",\n type: \"tuple[]\",\n internalType: \"struct SelectorPermission[]\",\n components: [\n {\n name: \"functionSelector\",\n type: \"bytes4\",\n internalType: \"bytes4\"\n },\n {\n name: \"permissionDescription\",\n type: \"string\",\n internalType: \"string\"\n }\n ]\n }\n ]\n }\n ],\n stateMutability: \"pure\"\n },\n {\n type: \"function\",\n name: \"postExecutionHook\",\n inputs: [\n { name: \"functionId\", type: \"uint8\", internalType: \"uint8\" },\n { name: \"preExecHookData\", type: \"bytes\", internalType: \"bytes\" }\n ],\n outputs: [],\n stateMutability: \"nonpayable\"\n },\n {\n type: \"function\",\n name: \"preExecutionHook\",\n inputs: [\n { name: \"functionId\", type: \"uint8\", internalType: \"uint8\" },\n { name: \"sender\", type: \"address\", internalType: \"address\" },\n { name: \"value\", type: \"uint256\", internalType: \"uint256\" },\n { name: \"data\", type: \"bytes\", internalType: \"bytes\" }\n ],\n outputs: [{ name: \"\", type: \"bytes\", internalType: \"bytes\" }],\n stateMutability: \"nonpayable\"\n },\n {\n type: \"function\",\n name: \"preRuntimeValidationHook\",\n inputs: [\n { name: \"functionId\", type: \"uint8\", internalType: \"uint8\" },\n { name: \"sender\", type: \"address\", internalType: \"address\" },\n { name: \"value\", type: \"uint256\", internalType: \"uint256\" },\n { name: \"data\", type: \"bytes\", internalType: \"bytes\" }\n ],\n outputs: [],\n stateMutability: \"nonpayable\"\n },\n {\n type: \"function\",\n name: \"preUserOpValidationHook\",\n inputs: [\n { name: \"functionId\", type: \"uint8\", internalType: \"uint8\" },\n {\n name: \"userOp\",\n type: \"tuple\",\n internalType: \"struct UserOperation\",\n components: [\n { name: \"sender\", type: \"address\", internalType: \"address\" },\n { name: \"nonce\", type: \"uint256\", internalType: \"uint256\" },\n { name: \"initCode\", type: \"bytes\", internalType: \"bytes\" },\n { name: \"callData\", type: \"bytes\", internalType: \"bytes\" },\n { name: \"callGasLimit\", type: \"uint256\", internalType: \"uint256\" },\n {\n name: \"verificationGasLimit\",\n type: \"uint256\",\n internalType: \"uint256\"\n },\n {\n name: \"preVerificationGas\",\n type: \"uint256\",\n internalType: \"uint256\"\n },\n { name: \"maxFeePerGas\", type: \"uint256\", internalType: \"uint256\" },\n {\n name: \"maxPriorityFeePerGas\",\n type: \"uint256\",\n internalType: \"uint256\"\n },\n { name: \"paymasterAndData\", type: \"bytes\", internalType: \"bytes\" },\n { name: \"signature\", type: \"bytes\", internalType: \"bytes\" }\n ]\n },\n { name: \"userOpHash\", type: \"bytes32\", internalType: \"bytes32\" }\n ],\n outputs: [{ name: \"\", type: \"uint256\", internalType: \"uint256\" }],\n stateMutability: \"nonpayable\"\n },\n {\n type: \"function\",\n name: \"runtimeValidationFunction\",\n inputs: [\n { name: \"functionId\", type: \"uint8\", internalType: \"uint8\" },\n { name: \"sender\", type: \"address\", internalType: \"address\" },\n { name: \"\", type: \"uint256\", internalType: \"uint256\" },\n { name: \"\", type: \"bytes\", internalType: \"bytes\" }\n ],\n outputs: [],\n stateMutability: \"view\"\n },\n {\n type: \"function\",\n name: \"supportsInterface\",\n inputs: [{ name: \"interfaceId\", type: \"bytes4\", internalType: \"bytes4\" }],\n outputs: [{ name: \"\", type: \"bool\", internalType: \"bool\" }],\n stateMutability: \"view\"\n },\n {\n type: \"function\",\n name: \"updateOwners\",\n inputs: [\n { name: \"ownersToAdd\", type: \"address[]\", internalType: \"address[]\" },\n { name: \"ownersToRemove\", type: \"address[]\", internalType: \"address[]\" }\n ],\n outputs: [],\n stateMutability: \"nonpayable\"\n },\n {\n type: \"function\",\n name: \"userOpValidationFunction\",\n inputs: [\n { name: \"functionId\", type: \"uint8\", internalType: \"uint8\" },\n {\n name: \"userOp\",\n type: \"tuple\",\n internalType: \"struct UserOperation\",\n components: [\n { name: \"sender\", type: \"address\", internalType: \"address\" },\n { name: \"nonce\", type: \"uint256\", internalType: \"uint256\" },\n { name: \"initCode\", type: \"bytes\", internalType: \"bytes\" },\n { name: \"callData\", type: \"bytes\", internalType: \"bytes\" },\n { name: \"callGasLimit\", type: \"uint256\", internalType: \"uint256\" },\n {\n name: \"verificationGasLimit\",\n type: \"uint256\",\n internalType: \"uint256\"\n },\n {\n name: \"preVerificationGas\",\n type: \"uint256\",\n internalType: \"uint256\"\n },\n { name: \"maxFeePerGas\", type: \"uint256\", internalType: \"uint256\" },\n {\n name: \"maxPriorityFeePerGas\",\n type: \"uint256\",\n internalType: \"uint256\"\n },\n { name: \"paymasterAndData\", type: \"bytes\", internalType: \"bytes\" },\n { name: \"signature\", type: \"bytes\", internalType: \"bytes\" }\n ]\n },\n { name: \"userOpHash\", type: \"bytes32\", internalType: \"bytes32\" }\n ],\n outputs: [{ name: \"\", type: \"uint256\", internalType: \"uint256\" }],\n stateMutability: \"view\"\n },\n {\n type: \"event\",\n name: \"OwnerUpdated\",\n inputs: [\n {\n name: \"account\",\n type: \"address\",\n indexed: true,\n internalType: \"address\"\n },\n {\n name: \"addedOwners\",\n type: \"address[]\",\n indexed: false,\n internalType: \"address[]\"\n },\n {\n name: \"removedOwners\",\n type: \"address[]\",\n indexed: false,\n internalType: \"address[]\"\n }\n ],\n anonymous: false\n },\n { type: \"error\", name: \"AlreadyInitialized\", inputs: [] },\n { type: \"error\", name: \"EmptyOwnersNotAllowed\", inputs: [] },\n { type: \"error\", name: \"InvalidAction\", inputs: [] },\n {\n type: \"error\",\n name: \"InvalidOwner\",\n inputs: [{ name: \"owner\", type: \"address\", internalType: \"address\" }]\n },\n { type: \"error\", name: \"NotAuthorized\", inputs: [] },\n {\n type: \"error\",\n name: \"NotContractCaller\",\n inputs: [{ name: \"caller\", type: \"address\", internalType: \"address\" }]\n },\n {\n type: \"error\",\n name: \"NotImplemented\",\n inputs: [\n { name: \"selector\", type: \"bytes4\", internalType: \"bytes4\" },\n { name: \"functionId\", type: \"uint8\", internalType: \"uint8\" }\n ]\n },\n { type: \"error\", name: \"NotInitialized\", inputs: [] },\n {\n type: \"error\",\n name: \"OwnerDoesNotExist\",\n inputs: [{ name: \"owner\", type: \"address\", internalType: \"address\" }]\n }\n ];\n }\n });\n\n // ../../../node_modules/.pnpm/@account-kit+smart-contracts@4.62.0_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5._65dee0153d50ca3a2d2c6830319271d9/node_modules/@account-kit/smart-contracts/dist/esm/src/msca/plugins/multi-owner/signer.js\n var multiOwnerMessageSigner;\n var init_signer2 = __esm({\n \"../../../node_modules/.pnpm/@account-kit+smart-contracts@4.62.0_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5._65dee0153d50ca3a2d2c6830319271d9/node_modules/@account-kit/smart-contracts/dist/esm/src/msca/plugins/multi-owner/signer.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_esm();\n init_plugin();\n multiOwnerMessageSigner = (client, accountAddress, signer, pluginAddress = MultiOwnerPlugin.meta.addresses[client.chain.id]) => {\n const get712Wrapper = async (msg) => {\n const [, name, version6, chainId, verifyingContract, salt] = await client.readContract({\n abi: MultiOwnerPluginAbi,\n address: pluginAddress,\n functionName: \"eip712Domain\",\n account: accountAddress\n });\n return {\n domain: {\n chainId: Number(chainId),\n name,\n salt,\n verifyingContract,\n version: version6\n },\n types: {\n AlchemyModularAccountMessage: [{ name: \"message\", type: \"bytes\" }]\n },\n message: {\n message: msg\n },\n primaryType: \"AlchemyModularAccountMessage\"\n };\n };\n const prepareSign = async (params) => {\n const data = await get712Wrapper(params.type === \"personal_sign\" ? hashMessage(params.data) : hashTypedData(params.data));\n return {\n type: \"eth_signTypedData_v4\",\n data\n };\n };\n const formatSign = async (signature) => {\n return signature;\n };\n return {\n prepareSign,\n formatSign,\n getDummySignature: () => {\n return \"0xfffffffffffffffffffffffffffffff0000000000000000000000000000000007aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa1c\";\n },\n signUserOperationHash: (uoHash) => {\n return signer().signMessage({ raw: uoHash });\n },\n async signMessage({ message }) {\n const { type, data } = await prepareSign({\n type: \"personal_sign\",\n data: message\n });\n return type === \"personal_sign\" ? signer().signMessage(data) : signer().signTypedData(data);\n },\n signTypedData: async (typedDataDefinition) => {\n const { type, data } = await prepareSign({\n type: \"eth_signTypedData_v4\",\n data: typedDataDefinition\n });\n return type === \"personal_sign\" ? signer().signMessage(data) : signer().signTypedData(data);\n }\n };\n };\n }\n });\n\n // ../../../node_modules/.pnpm/@account-kit+smart-contracts@4.62.0_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5._65dee0153d50ca3a2d2c6830319271d9/node_modules/@account-kit/smart-contracts/dist/esm/src/msca/utils.js\n async function getMSCAUpgradeToData(client, args) {\n const { account: account_ = client.account, multiOwnerPluginAddress } = args;\n if (!account_) {\n throw new AccountNotFoundError2();\n }\n const account = account_;\n const chain2 = client.chain;\n if (!chain2) {\n throw new ChainNotFoundError2();\n }\n const initData = await getMAInitializationData({\n client,\n multiOwnerPluginAddress,\n signerAddress: await account.getSigner().getAddress()\n });\n return {\n ...initData,\n createMAAccount: async () => createMultiOwnerModularAccount({\n transport: custom(client.transport),\n chain: chain2,\n signer: account.getSigner(),\n accountAddress: account.address\n })\n };\n }\n async function getMAInitializationData({ client, multiOwnerPluginAddress, signerAddress }) {\n if (!client.chain) {\n throw new ChainNotFoundError2();\n }\n const factoryAddress = getDefaultMultiOwnerModularAccountFactoryAddress(client.chain);\n const implAddress = await client.readContract({\n abi: MultiOwnerModularAccountFactoryAbi,\n address: factoryAddress,\n functionName: \"IMPL\"\n });\n const multiOwnerAddress = multiOwnerPluginAddress ?? MultiOwnerPlugin.meta.addresses[client.chain.id];\n if (!multiOwnerAddress) {\n throw new Error(\"could not get multi owner plugin address\");\n }\n const moPluginManifest = await client.readContract({\n abi: IPluginAbi,\n address: multiOwnerAddress,\n functionName: \"pluginManifest\"\n });\n const hashedMultiOwnerPluginManifest = keccak256(encodeFunctionResult({\n abi: IPluginAbi,\n functionName: \"pluginManifest\",\n result: moPluginManifest\n }));\n const encodedOwner = encodeAbiParameters(parseAbiParameters(\"address[]\"), Array.isArray(signerAddress) ? [signerAddress] : [[signerAddress]]);\n const encodedPluginInitData = encodeAbiParameters(parseAbiParameters(\"bytes32[], bytes[]\"), [[hashedMultiOwnerPluginManifest], [encodedOwner]]);\n const encodedMSCAInitializeData = encodeFunctionData({\n abi: UpgradeableModularAccountAbi,\n functionName: \"initialize\",\n args: [[multiOwnerAddress], encodedPluginInitData]\n });\n return {\n implAddress,\n initializationData: encodedMSCAInitializeData\n };\n }\n var getDefaultMultisigModularAccountFactoryAddress, getDefaultMultiOwnerModularAccountFactoryAddress;\n var init_utils12 = __esm({\n \"../../../node_modules/.pnpm/@account-kit+smart-contracts@4.62.0_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5._65dee0153d50ca3a2d2c6830319271d9/node_modules/@account-kit/smart-contracts/dist/esm/src/msca/utils.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_esm6();\n init_exports3();\n init_esm();\n init_IPlugin();\n init_MultiOwnerModularAccountFactory();\n init_UpgradeableModularAccount();\n init_multiOwnerAccount();\n init_plugin();\n getDefaultMultisigModularAccountFactoryAddress = (chain2) => {\n switch (chain2.id) {\n case sepolia3.id:\n case baseSepolia3.id:\n case polygon3.id:\n case mainnet3.id:\n case polygonAmoy3.id:\n case optimism3.id:\n case optimismSepolia3.id:\n case arbitrum3.id:\n case arbitrumSepolia3.id:\n case base3.id:\n default:\n return \"0x000000000000204327E6669f00901a57CE15aE15\";\n }\n };\n getDefaultMultiOwnerModularAccountFactoryAddress = (chain2) => {\n switch (chain2.id) {\n default:\n return \"0x000000e92D78D90000007F0082006FDA09BD5f11\";\n }\n };\n }\n });\n\n // ../../../node_modules/.pnpm/@account-kit+smart-contracts@4.62.0_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5._65dee0153d50ca3a2d2c6830319271d9/node_modules/@account-kit/smart-contracts/dist/esm/src/msca/account/standardExecutor.js\n var standardExecutor;\n var init_standardExecutor = __esm({\n \"../../../node_modules/.pnpm/@account-kit+smart-contracts@4.62.0_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5._65dee0153d50ca3a2d2c6830319271d9/node_modules/@account-kit/smart-contracts/dist/esm/src/msca/account/standardExecutor.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_esm();\n init_IStandardExecutor();\n standardExecutor = {\n encodeExecute: async ({ target, data, value }) => {\n return encodeFunctionData({\n abi: IStandardExecutorAbi,\n functionName: \"execute\",\n args: [target, value ?? 0n, data]\n });\n },\n encodeBatchExecute: async (txs) => {\n return encodeFunctionData({\n abi: IStandardExecutorAbi,\n functionName: \"executeBatch\",\n args: [\n txs.map((tx) => ({\n target: tx.target,\n data: tx.data,\n value: tx.value ?? 0n\n }))\n ]\n });\n }\n };\n }\n });\n\n // ../../../node_modules/.pnpm/@account-kit+smart-contracts@4.62.0_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5._65dee0153d50ca3a2d2c6830319271d9/node_modules/@account-kit/smart-contracts/dist/esm/src/msca/account/multiOwnerAccount.js\n async function createMultiOwnerModularAccount(config2) {\n const { transport, chain: chain2, signer, accountAddress, initCode, entryPoint = getEntryPoint(chain2, { version: \"0.6.0\" }), factoryAddress = getDefaultMultiOwnerModularAccountFactoryAddress(chain2), owners = [], salt = 0n } = config2;\n const client = createBundlerClient({\n transport,\n chain: chain2\n });\n const getAccountInitCode = async () => {\n if (initCode) {\n return initCode;\n }\n const ownerAddress = await signer.getAddress();\n const owners_ = Array.from(/* @__PURE__ */ new Set([...owners, ownerAddress])).filter((x4) => hexToBigInt(x4) !== 0n).sort((a3, b4) => {\n const bigintA = hexToBigInt(a3);\n const bigintB = hexToBigInt(b4);\n return bigintA < bigintB ? -1 : bigintA > bigintB ? 1 : 0;\n });\n return concatHex([\n factoryAddress,\n encodeFunctionData({\n abi: MultiOwnerModularAccountFactoryAbi,\n functionName: \"createAccount\",\n args: [salt, owners_]\n })\n ]);\n };\n const _accountAddress = await getAccountAddress({\n client,\n entryPoint,\n accountAddress,\n getAccountInitCode\n });\n const baseAccount = await toSmartContractAccount({\n transport,\n chain: chain2,\n entryPoint,\n accountAddress: _accountAddress,\n source: `MultiOwnerModularAccount`,\n getAccountInitCode,\n ...standardExecutor,\n ...multiOwnerMessageSigner(client, _accountAddress, () => signer)\n });\n return {\n ...baseAccount,\n publicKey: await signer.getAddress(),\n getSigner: () => signer\n };\n }\n var init_multiOwnerAccount = __esm({\n \"../../../node_modules/.pnpm/@account-kit+smart-contracts@4.62.0_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5._65dee0153d50ca3a2d2c6830319271d9/node_modules/@account-kit/smart-contracts/dist/esm/src/msca/account/multiOwnerAccount.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_esm6();\n init_esm();\n init_MultiOwnerModularAccountFactory();\n init_signer2();\n init_utils12();\n init_standardExecutor();\n }\n });\n\n // ../../../node_modules/.pnpm/@account-kit+smart-contracts@4.62.0_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5._65dee0153d50ca3a2d2c6830319271d9/node_modules/@account-kit/smart-contracts/dist/esm/src/msca/plugins/multisig/plugin.js\n var addresses2, MultisigPlugin, multisigPluginActions, MultisigPluginExecutionFunctionAbi, MultisigPluginAbi;\n var init_plugin2 = __esm({\n \"../../../node_modules/.pnpm/@account-kit+smart-contracts@4.62.0_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5._65dee0153d50ca3a2d2c6830319271d9/node_modules/@account-kit/smart-contracts/dist/esm/src/msca/plugins/multisig/plugin.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_esm();\n init_esm6();\n init_src();\n addresses2 = {\n 1: \"0x000000000000A53f64b7bcf4Cd59624943C43Fc7\",\n 10: \"0x000000000000A53f64b7bcf4Cd59624943C43Fc7\",\n 137: \"0x000000000000A53f64b7bcf4Cd59624943C43Fc7\",\n 252: \"0x000000000000A53f64b7bcf4Cd59624943C43Fc7\",\n 1337: \"0x000000000000A53f64b7bcf4Cd59624943C43Fc7\",\n 2523: \"0x000000000000A53f64b7bcf4Cd59624943C43Fc7\",\n 8453: \"0x000000000000A53f64b7bcf4Cd59624943C43Fc7\",\n 42161: \"0x000000000000A53f64b7bcf4Cd59624943C43Fc7\",\n 80002: \"0x000000000000A53f64b7bcf4Cd59624943C43Fc7\",\n 84532: \"0x000000000000A53f64b7bcf4Cd59624943C43Fc7\",\n 421614: \"0x000000000000A53f64b7bcf4Cd59624943C43Fc7\",\n 7777777: \"0x000000000000A53f64b7bcf4Cd59624943C43Fc7\",\n 11155111: \"0x000000000000A53f64b7bcf4Cd59624943C43Fc7\",\n 11155420: \"0x000000000000A53f64b7bcf4Cd59624943C43Fc7\",\n 999999999: \"0x000000000000A53f64b7bcf4Cd59624943C43Fc7\"\n };\n MultisigPlugin = {\n meta: {\n name: \"Multisig Plugin\",\n version: \"1.0.0\",\n addresses: addresses2\n },\n getContract: (client, address) => {\n if (!client.chain)\n throw new ChainNotFoundError2();\n return getContract({\n address: address || addresses2[client.chain.id],\n abi: MultisigPluginAbi,\n client\n });\n }\n };\n multisigPluginActions = (client) => ({\n updateOwnership({ args, overrides, context: context2, account = client.account }) {\n if (!account) {\n throw new AccountNotFoundError2();\n }\n if (!isSmartAccountClient(client)) {\n throw new IncompatibleClientError(\"SmartAccountClient\", \"updateOwnership\", client);\n }\n const uo = encodeFunctionData({\n abi: MultisigPluginExecutionFunctionAbi,\n functionName: \"updateOwnership\",\n args\n });\n return client.sendUserOperation({ uo, overrides, account, context: context2 });\n },\n installMultisigPlugin({ account = client.account, overrides, context: context2, ...params }) {\n if (!account) {\n throw new AccountNotFoundError2();\n }\n if (!isSmartAccountClient(client)) {\n throw new IncompatibleClientError(\"SmartAccountClient\", \"installMultisigPlugin\", client);\n }\n const chain2 = client.chain;\n if (!chain2) {\n throw new ChainNotFoundError2();\n }\n const dependencies = params.dependencyOverrides ?? [];\n const pluginAddress = params.pluginAddress ?? MultisigPlugin.meta.addresses[chain2.id];\n if (!pluginAddress) {\n throw new Error(\"missing MultisigPlugin address for chain \" + chain2.name);\n }\n return installPlugin(client, {\n pluginAddress,\n pluginInitData: encodeAbiParameters([{ type: \"address[]\" }, { type: \"uint256\" }], params.args),\n dependencies,\n overrides,\n account,\n context: context2\n });\n },\n encodeUpdateOwnership({ args }) {\n return encodeFunctionData({\n abi: MultisigPluginExecutionFunctionAbi,\n functionName: \"updateOwnership\",\n args\n });\n },\n encodeEip712Domain() {\n return encodeFunctionData({\n abi: MultisigPluginExecutionFunctionAbi,\n functionName: \"eip712Domain\"\n });\n },\n async readEip712Domain({ account = client.account }) {\n if (!account) {\n throw new AccountNotFoundError2();\n }\n if (!isSmartAccountClient(client)) {\n throw new IncompatibleClientError(\"SmartAccountClient\", \"readEip712Domain\", client);\n }\n return client.readContract({\n address: account.address,\n abi: MultisigPluginExecutionFunctionAbi,\n functionName: \"eip712Domain\"\n });\n },\n encodeIsValidSignature({ args }) {\n return encodeFunctionData({\n abi: MultisigPluginExecutionFunctionAbi,\n functionName: \"isValidSignature\",\n args\n });\n },\n async readIsValidSignature({ args, account = client.account }) {\n if (!account) {\n throw new AccountNotFoundError2();\n }\n if (!isSmartAccountClient(client)) {\n throw new IncompatibleClientError(\"SmartAccountClient\", \"readIsValidSignature\", client);\n }\n return client.readContract({\n address: account.address,\n abi: MultisigPluginExecutionFunctionAbi,\n functionName: \"isValidSignature\",\n args\n });\n }\n });\n MultisigPluginExecutionFunctionAbi = [\n {\n type: \"function\",\n name: \"updateOwnership\",\n inputs: [\n { name: \"ownersToAdd\", type: \"address[]\", internalType: \"address[]\" },\n { name: \"ownersToRemove\", type: \"address[]\", internalType: \"address[]\" },\n { name: \"newThreshold\", type: \"uint128\", internalType: \"uint128\" }\n ],\n outputs: [],\n stateMutability: \"nonpayable\"\n },\n {\n type: \"function\",\n name: \"eip712Domain\",\n inputs: [],\n outputs: [\n { name: \"fields\", type: \"bytes1\", internalType: \"bytes1\" },\n { name: \"name\", type: \"string\", internalType: \"string\" },\n { name: \"version\", type: \"string\", internalType: \"string\" },\n { name: \"chainId\", type: \"uint256\", internalType: \"uint256\" },\n { name: \"verifyingContract\", type: \"address\", internalType: \"address\" },\n { name: \"salt\", type: \"bytes32\", internalType: \"bytes32\" },\n { name: \"extensions\", type: \"uint256[]\", internalType: \"uint256[]\" }\n ],\n stateMutability: \"view\"\n },\n {\n type: \"function\",\n name: \"isValidSignature\",\n inputs: [\n { name: \"digest\", type: \"bytes32\", internalType: \"bytes32\" },\n { name: \"signature\", type: \"bytes\", internalType: \"bytes\" }\n ],\n outputs: [{ name: \"\", type: \"bytes4\", internalType: \"bytes4\" }],\n stateMutability: \"view\"\n }\n ];\n MultisigPluginAbi = [\n {\n type: \"constructor\",\n inputs: [{ name: \"entryPoint\", type: \"address\", internalType: \"address\" }],\n stateMutability: \"nonpayable\"\n },\n {\n type: \"function\",\n name: \"ENTRYPOINT\",\n inputs: [],\n outputs: [{ name: \"\", type: \"address\", internalType: \"address\" }],\n stateMutability: \"view\"\n },\n {\n type: \"function\",\n name: \"checkNSignatures\",\n inputs: [\n { name: \"actualDigest\", type: \"bytes32\", internalType: \"bytes32\" },\n { name: \"upperLimitGasDigest\", type: \"bytes32\", internalType: \"bytes32\" },\n { name: \"account\", type: \"address\", internalType: \"address\" },\n { name: \"signatures\", type: \"bytes\", internalType: \"bytes\" }\n ],\n outputs: [\n { name: \"success\", type: \"bool\", internalType: \"bool\" },\n { name: \"firstFailure\", type: \"uint256\", internalType: \"uint256\" }\n ],\n stateMutability: \"view\"\n },\n {\n type: \"function\",\n name: \"eip712Domain\",\n inputs: [],\n outputs: [\n { name: \"fields\", type: \"bytes1\", internalType: \"bytes1\" },\n { name: \"name\", type: \"string\", internalType: \"string\" },\n { name: \"version\", type: \"string\", internalType: \"string\" },\n { name: \"chainId\", type: \"uint256\", internalType: \"uint256\" },\n { name: \"verifyingContract\", type: \"address\", internalType: \"address\" },\n { name: \"salt\", type: \"bytes32\", internalType: \"bytes32\" },\n { name: \"extensions\", type: \"uint256[]\", internalType: \"uint256[]\" }\n ],\n stateMutability: \"view\"\n },\n {\n type: \"function\",\n name: \"encodeMessageData\",\n inputs: [\n { name: \"account\", type: \"address\", internalType: \"address\" },\n { name: \"message\", type: \"bytes\", internalType: \"bytes\" }\n ],\n outputs: [{ name: \"\", type: \"bytes\", internalType: \"bytes\" }],\n stateMutability: \"view\"\n },\n {\n type: \"function\",\n name: \"getMessageHash\",\n inputs: [\n { name: \"account\", type: \"address\", internalType: \"address\" },\n { name: \"message\", type: \"bytes\", internalType: \"bytes\" }\n ],\n outputs: [{ name: \"\", type: \"bytes32\", internalType: \"bytes32\" }],\n stateMutability: \"view\"\n },\n {\n type: \"function\",\n name: \"isOwnerOf\",\n inputs: [\n { name: \"account\", type: \"address\", internalType: \"address\" },\n { name: \"ownerToCheck\", type: \"address\", internalType: \"address\" }\n ],\n outputs: [{ name: \"\", type: \"bool\", internalType: \"bool\" }],\n stateMutability: \"view\"\n },\n {\n type: \"function\",\n name: \"isValidSignature\",\n inputs: [\n { name: \"digest\", type: \"bytes32\", internalType: \"bytes32\" },\n { name: \"signature\", type: \"bytes\", internalType: \"bytes\" }\n ],\n outputs: [{ name: \"\", type: \"bytes4\", internalType: \"bytes4\" }],\n stateMutability: \"view\"\n },\n {\n type: \"function\",\n name: \"onInstall\",\n inputs: [{ name: \"data\", type: \"bytes\", internalType: \"bytes\" }],\n outputs: [],\n stateMutability: \"nonpayable\"\n },\n {\n type: \"function\",\n name: \"onUninstall\",\n inputs: [{ name: \"\", type: \"bytes\", internalType: \"bytes\" }],\n outputs: [],\n stateMutability: \"nonpayable\"\n },\n {\n type: \"function\",\n name: \"ownershipInfoOf\",\n inputs: [{ name: \"account\", type: \"address\", internalType: \"address\" }],\n outputs: [\n { name: \"\", type: \"address[]\", internalType: \"address[]\" },\n { name: \"\", type: \"uint256\", internalType: \"uint256\" }\n ],\n stateMutability: \"view\"\n },\n {\n type: \"function\",\n name: \"pluginManifest\",\n inputs: [],\n outputs: [\n {\n name: \"\",\n type: \"tuple\",\n internalType: \"struct PluginManifest\",\n components: [\n { name: \"interfaceIds\", type: \"bytes4[]\", internalType: \"bytes4[]\" },\n {\n name: \"dependencyInterfaceIds\",\n type: \"bytes4[]\",\n internalType: \"bytes4[]\"\n },\n {\n name: \"executionFunctions\",\n type: \"bytes4[]\",\n internalType: \"bytes4[]\"\n },\n {\n name: \"permittedExecutionSelectors\",\n type: \"bytes4[]\",\n internalType: \"bytes4[]\"\n },\n {\n name: \"permitAnyExternalAddress\",\n type: \"bool\",\n internalType: \"bool\"\n },\n { name: \"canSpendNativeToken\", type: \"bool\", internalType: \"bool\" },\n {\n name: \"permittedExternalCalls\",\n type: \"tuple[]\",\n internalType: \"struct ManifestExternalCallPermission[]\",\n components: [\n {\n name: \"externalAddress\",\n type: \"address\",\n internalType: \"address\"\n },\n { name: \"permitAnySelector\", type: \"bool\", internalType: \"bool\" },\n { name: \"selectors\", type: \"bytes4[]\", internalType: \"bytes4[]\" }\n ]\n },\n {\n name: \"userOpValidationFunctions\",\n type: \"tuple[]\",\n internalType: \"struct ManifestAssociatedFunction[]\",\n components: [\n {\n name: \"executionSelector\",\n type: \"bytes4\",\n internalType: \"bytes4\"\n },\n {\n name: \"associatedFunction\",\n type: \"tuple\",\n internalType: \"struct ManifestFunction\",\n components: [\n {\n name: \"functionType\",\n type: \"uint8\",\n internalType: \"enum ManifestAssociatedFunctionType\"\n },\n { name: \"functionId\", type: \"uint8\", internalType: \"uint8\" },\n {\n name: \"dependencyIndex\",\n type: \"uint256\",\n internalType: \"uint256\"\n }\n ]\n }\n ]\n },\n {\n name: \"runtimeValidationFunctions\",\n type: \"tuple[]\",\n internalType: \"struct ManifestAssociatedFunction[]\",\n components: [\n {\n name: \"executionSelector\",\n type: \"bytes4\",\n internalType: \"bytes4\"\n },\n {\n name: \"associatedFunction\",\n type: \"tuple\",\n internalType: \"struct ManifestFunction\",\n components: [\n {\n name: \"functionType\",\n type: \"uint8\",\n internalType: \"enum ManifestAssociatedFunctionType\"\n },\n { name: \"functionId\", type: \"uint8\", internalType: \"uint8\" },\n {\n name: \"dependencyIndex\",\n type: \"uint256\",\n internalType: \"uint256\"\n }\n ]\n }\n ]\n },\n {\n name: \"preUserOpValidationHooks\",\n type: \"tuple[]\",\n internalType: \"struct ManifestAssociatedFunction[]\",\n components: [\n {\n name: \"executionSelector\",\n type: \"bytes4\",\n internalType: \"bytes4\"\n },\n {\n name: \"associatedFunction\",\n type: \"tuple\",\n internalType: \"struct ManifestFunction\",\n components: [\n {\n name: \"functionType\",\n type: \"uint8\",\n internalType: \"enum ManifestAssociatedFunctionType\"\n },\n { name: \"functionId\", type: \"uint8\", internalType: \"uint8\" },\n {\n name: \"dependencyIndex\",\n type: \"uint256\",\n internalType: \"uint256\"\n }\n ]\n }\n ]\n },\n {\n name: \"preRuntimeValidationHooks\",\n type: \"tuple[]\",\n internalType: \"struct ManifestAssociatedFunction[]\",\n components: [\n {\n name: \"executionSelector\",\n type: \"bytes4\",\n internalType: \"bytes4\"\n },\n {\n name: \"associatedFunction\",\n type: \"tuple\",\n internalType: \"struct ManifestFunction\",\n components: [\n {\n name: \"functionType\",\n type: \"uint8\",\n internalType: \"enum ManifestAssociatedFunctionType\"\n },\n { name: \"functionId\", type: \"uint8\", internalType: \"uint8\" },\n {\n name: \"dependencyIndex\",\n type: \"uint256\",\n internalType: \"uint256\"\n }\n ]\n }\n ]\n },\n {\n name: \"executionHooks\",\n type: \"tuple[]\",\n internalType: \"struct ManifestExecutionHook[]\",\n components: [\n {\n name: \"executionSelector\",\n type: \"bytes4\",\n internalType: \"bytes4\"\n },\n {\n name: \"preExecHook\",\n type: \"tuple\",\n internalType: \"struct ManifestFunction\",\n components: [\n {\n name: \"functionType\",\n type: \"uint8\",\n internalType: \"enum ManifestAssociatedFunctionType\"\n },\n { name: \"functionId\", type: \"uint8\", internalType: \"uint8\" },\n {\n name: \"dependencyIndex\",\n type: \"uint256\",\n internalType: \"uint256\"\n }\n ]\n },\n {\n name: \"postExecHook\",\n type: \"tuple\",\n internalType: \"struct ManifestFunction\",\n components: [\n {\n name: \"functionType\",\n type: \"uint8\",\n internalType: \"enum ManifestAssociatedFunctionType\"\n },\n { name: \"functionId\", type: \"uint8\", internalType: \"uint8\" },\n {\n name: \"dependencyIndex\",\n type: \"uint256\",\n internalType: \"uint256\"\n }\n ]\n }\n ]\n }\n ]\n }\n ],\n stateMutability: \"pure\"\n },\n {\n type: \"function\",\n name: \"pluginMetadata\",\n inputs: [],\n outputs: [\n {\n name: \"\",\n type: \"tuple\",\n internalType: \"struct PluginMetadata\",\n components: [\n { name: \"name\", type: \"string\", internalType: \"string\" },\n { name: \"version\", type: \"string\", internalType: \"string\" },\n { name: \"author\", type: \"string\", internalType: \"string\" },\n {\n name: \"permissionDescriptors\",\n type: \"tuple[]\",\n internalType: \"struct SelectorPermission[]\",\n components: [\n {\n name: \"functionSelector\",\n type: \"bytes4\",\n internalType: \"bytes4\"\n },\n {\n name: \"permissionDescription\",\n type: \"string\",\n internalType: \"string\"\n }\n ]\n }\n ]\n }\n ],\n stateMutability: \"pure\"\n },\n {\n type: \"function\",\n name: \"postExecutionHook\",\n inputs: [\n { name: \"functionId\", type: \"uint8\", internalType: \"uint8\" },\n { name: \"preExecHookData\", type: \"bytes\", internalType: \"bytes\" }\n ],\n outputs: [],\n stateMutability: \"nonpayable\"\n },\n {\n type: \"function\",\n name: \"preExecutionHook\",\n inputs: [\n { name: \"functionId\", type: \"uint8\", internalType: \"uint8\" },\n { name: \"sender\", type: \"address\", internalType: \"address\" },\n { name: \"value\", type: \"uint256\", internalType: \"uint256\" },\n { name: \"data\", type: \"bytes\", internalType: \"bytes\" }\n ],\n outputs: [{ name: \"\", type: \"bytes\", internalType: \"bytes\" }],\n stateMutability: \"nonpayable\"\n },\n {\n type: \"function\",\n name: \"preRuntimeValidationHook\",\n inputs: [\n { name: \"functionId\", type: \"uint8\", internalType: \"uint8\" },\n { name: \"sender\", type: \"address\", internalType: \"address\" },\n { name: \"value\", type: \"uint256\", internalType: \"uint256\" },\n { name: \"data\", type: \"bytes\", internalType: \"bytes\" }\n ],\n outputs: [],\n stateMutability: \"nonpayable\"\n },\n {\n type: \"function\",\n name: \"preUserOpValidationHook\",\n inputs: [\n { name: \"functionId\", type: \"uint8\", internalType: \"uint8\" },\n {\n name: \"userOp\",\n type: \"tuple\",\n internalType: \"struct UserOperation\",\n components: [\n { name: \"sender\", type: \"address\", internalType: \"address\" },\n { name: \"nonce\", type: \"uint256\", internalType: \"uint256\" },\n { name: \"initCode\", type: \"bytes\", internalType: \"bytes\" },\n { name: \"callData\", type: \"bytes\", internalType: \"bytes\" },\n { name: \"callGasLimit\", type: \"uint256\", internalType: \"uint256\" },\n {\n name: \"verificationGasLimit\",\n type: \"uint256\",\n internalType: \"uint256\"\n },\n {\n name: \"preVerificationGas\",\n type: \"uint256\",\n internalType: \"uint256\"\n },\n { name: \"maxFeePerGas\", type: \"uint256\", internalType: \"uint256\" },\n {\n name: \"maxPriorityFeePerGas\",\n type: \"uint256\",\n internalType: \"uint256\"\n },\n { name: \"paymasterAndData\", type: \"bytes\", internalType: \"bytes\" },\n { name: \"signature\", type: \"bytes\", internalType: \"bytes\" }\n ]\n },\n { name: \"userOpHash\", type: \"bytes32\", internalType: \"bytes32\" }\n ],\n outputs: [{ name: \"\", type: \"uint256\", internalType: \"uint256\" }],\n stateMutability: \"nonpayable\"\n },\n {\n type: \"function\",\n name: \"runtimeValidationFunction\",\n inputs: [\n { name: \"functionId\", type: \"uint8\", internalType: \"uint8\" },\n { name: \"sender\", type: \"address\", internalType: \"address\" },\n { name: \"value\", type: \"uint256\", internalType: \"uint256\" },\n { name: \"data\", type: \"bytes\", internalType: \"bytes\" }\n ],\n outputs: [],\n stateMutability: \"nonpayable\"\n },\n {\n type: \"function\",\n name: \"supportsInterface\",\n inputs: [{ name: \"interfaceId\", type: \"bytes4\", internalType: \"bytes4\" }],\n outputs: [{ name: \"\", type: \"bool\", internalType: \"bool\" }],\n stateMutability: \"view\"\n },\n {\n type: \"function\",\n name: \"updateOwnership\",\n inputs: [\n { name: \"ownersToAdd\", type: \"address[]\", internalType: \"address[]\" },\n { name: \"ownersToRemove\", type: \"address[]\", internalType: \"address[]\" },\n { name: \"newThreshold\", type: \"uint128\", internalType: \"uint128\" }\n ],\n outputs: [],\n stateMutability: \"nonpayable\"\n },\n {\n type: \"function\",\n name: \"userOpValidationFunction\",\n inputs: [\n { name: \"functionId\", type: \"uint8\", internalType: \"uint8\" },\n {\n name: \"userOp\",\n type: \"tuple\",\n internalType: \"struct UserOperation\",\n components: [\n { name: \"sender\", type: \"address\", internalType: \"address\" },\n { name: \"nonce\", type: \"uint256\", internalType: \"uint256\" },\n { name: \"initCode\", type: \"bytes\", internalType: \"bytes\" },\n { name: \"callData\", type: \"bytes\", internalType: \"bytes\" },\n { name: \"callGasLimit\", type: \"uint256\", internalType: \"uint256\" },\n {\n name: \"verificationGasLimit\",\n type: \"uint256\",\n internalType: \"uint256\"\n },\n {\n name: \"preVerificationGas\",\n type: \"uint256\",\n internalType: \"uint256\"\n },\n { name: \"maxFeePerGas\", type: \"uint256\", internalType: \"uint256\" },\n {\n name: \"maxPriorityFeePerGas\",\n type: \"uint256\",\n internalType: \"uint256\"\n },\n { name: \"paymasterAndData\", type: \"bytes\", internalType: \"bytes\" },\n { name: \"signature\", type: \"bytes\", internalType: \"bytes\" }\n ]\n },\n { name: \"userOpHash\", type: \"bytes32\", internalType: \"bytes32\" }\n ],\n outputs: [{ name: \"\", type: \"uint256\", internalType: \"uint256\" }],\n stateMutability: \"view\"\n },\n {\n type: \"event\",\n name: \"OwnerUpdated\",\n inputs: [\n {\n name: \"account\",\n type: \"address\",\n indexed: true,\n internalType: \"address\"\n },\n {\n name: \"addedOwners\",\n type: \"address[]\",\n indexed: false,\n internalType: \"address[]\"\n },\n {\n name: \"removedOwners\",\n type: \"address[]\",\n indexed: false,\n internalType: \"address[]\"\n },\n {\n name: \"threshold\",\n type: \"uint256\",\n indexed: false,\n internalType: \"uint256\"\n }\n ],\n anonymous: false\n },\n { type: \"error\", name: \"AlreadyInitialized\", inputs: [] },\n { type: \"error\", name: \"ECDSARecoverFailure\", inputs: [] },\n { type: \"error\", name: \"EmptyOwnersNotAllowed\", inputs: [] },\n { type: \"error\", name: \"InvalidAction\", inputs: [] },\n { type: \"error\", name: \"InvalidAddress\", inputs: [] },\n { type: \"error\", name: \"InvalidMaxFeePerGas\", inputs: [] },\n { type: \"error\", name: \"InvalidMaxPriorityFeePerGas\", inputs: [] },\n { type: \"error\", name: \"InvalidNumSigsOnActualGas\", inputs: [] },\n {\n type: \"error\",\n name: \"InvalidOwner\",\n inputs: [{ name: \"owner\", type: \"address\", internalType: \"address\" }]\n },\n { type: \"error\", name: \"InvalidPreVerificationGas\", inputs: [] },\n { type: \"error\", name: \"InvalidSigLength\", inputs: [] },\n { type: \"error\", name: \"InvalidSigOffset\", inputs: [] },\n { type: \"error\", name: \"InvalidThreshold\", inputs: [] },\n {\n type: \"error\",\n name: \"NotContractCaller\",\n inputs: [{ name: \"caller\", type: \"address\", internalType: \"address\" }]\n },\n {\n type: \"error\",\n name: \"NotImplemented\",\n inputs: [\n { name: \"selector\", type: \"bytes4\", internalType: \"bytes4\" },\n { name: \"functionId\", type: \"uint8\", internalType: \"uint8\" }\n ]\n },\n { type: \"error\", name: \"NotInitialized\", inputs: [] },\n {\n type: \"error\",\n name: \"OwnerDoesNotExist\",\n inputs: [{ name: \"owner\", type: \"address\", internalType: \"address\" }]\n }\n ];\n }\n });\n\n // ../../../node_modules/.pnpm/@account-kit+smart-contracts@4.62.0_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5._65dee0153d50ca3a2d2c6830319271d9/node_modules/@account-kit/smart-contracts/dist/esm/src/msca/plugins/multisig/signer.js\n var multisigSignMethods;\n var init_signer3 = __esm({\n \"../../../node_modules/.pnpm/@account-kit+smart-contracts@4.62.0_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5._65dee0153d50ca3a2d2c6830319271d9/node_modules/@account-kit/smart-contracts/dist/esm/src/msca/plugins/multisig/signer.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_esm();\n init_plugin2();\n multisigSignMethods = ({ client, accountAddress, signer, threshold, pluginAddress = MultisigPlugin.meta.addresses[client.chain.id] }) => {\n const get712Wrapper = async (msg) => {\n const [, name, version6, chainId, verifyingContract, salt] = await client.readContract({\n abi: MultisigPluginAbi,\n address: pluginAddress,\n functionName: \"eip712Domain\",\n account: accountAddress\n });\n return {\n domain: {\n chainId: Number(chainId),\n name,\n salt,\n verifyingContract,\n version: version6\n },\n types: {\n AlchemyMultisigMessage: [{ name: \"message\", type: \"bytes\" }]\n },\n message: {\n message: msg\n },\n primaryType: \"AlchemyMultisigMessage\"\n };\n };\n const prepareSign = async (params) => {\n const messageHash = params.type === \"personal_sign\" ? hashMessage(params.data) : hashTypedData(params.data);\n return {\n type: \"eth_signTypedData_v4\",\n data: await get712Wrapper(messageHash)\n };\n };\n const formatSign = async (signature) => {\n return signature;\n };\n return {\n prepareSign,\n formatSign,\n getDummySignature: async () => {\n const [, thresholdRead] = await client.readContract({\n abi: MultisigPluginAbi,\n address: pluginAddress,\n functionName: \"ownershipInfoOf\",\n args: [accountAddress]\n });\n const actualThreshold = thresholdRead === 0n ? threshold : thresholdRead;\n return \"0x\" + \"FF\".repeat(32 * 3) + \"fffffffffffffffffffffffffffffff0000000000000000000000000000000007aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa3c\" + \"fffffffffffffffffffffffffffffff0000000000000000000000000000000007aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa1c\".repeat(Number(actualThreshold) - 1);\n },\n signUserOperationHash: (uoHash) => {\n return signer().signMessage({ raw: uoHash });\n },\n async signMessage({ message }) {\n const { type, data } = await prepareSign({\n type: \"personal_sign\",\n data: message\n });\n return type === \"personal_sign\" ? signer().signMessage(data) : signer().signTypedData(data);\n },\n signTypedData: async (typedDataDefinition) => {\n const { type, data } = await prepareSign({\n type: \"eth_signTypedData_v4\",\n data: typedDataDefinition\n });\n return type === \"personal_sign\" ? signer().signMessage(data) : signer().signTypedData(data);\n }\n };\n };\n }\n });\n\n // ../../../node_modules/.pnpm/@account-kit+smart-contracts@4.62.0_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5._65dee0153d50ca3a2d2c6830319271d9/node_modules/@account-kit/smart-contracts/dist/esm/src/msca/account/multisigAccount.js\n async function createMultisigModularAccount(config2) {\n const { transport, chain: chain2, signer, accountAddress: accountAddress_, initCode, entryPoint = getEntryPoint(chain2, { version: \"0.6.0\" }), factoryAddress = getDefaultMultisigModularAccountFactoryAddress(chain2), owners = [], salt = 0n, threshold } = config2;\n const client = createBundlerClient({\n transport,\n chain: chain2\n });\n const getAccountInitCode = async () => {\n if (initCode) {\n return initCode;\n }\n const sigAddress = await signer.getAddress();\n const sigs_ = Array.from(/* @__PURE__ */ new Set([...owners, sigAddress])).filter((x4) => hexToBigInt(x4) !== 0n).sort((a3, b4) => {\n const bigintA = hexToBigInt(a3);\n const bigintB = hexToBigInt(b4);\n return bigintA < bigintB ? -1 : bigintA > bigintB ? 1 : 0;\n });\n return concatHex([\n factoryAddress,\n encodeFunctionData({\n abi: MultisigModularAccountFactoryAbi,\n functionName: \"createAccount\",\n args: [salt, sigs_, threshold]\n })\n ]);\n };\n const accountAddress = await getAccountAddress({\n client,\n entryPoint,\n accountAddress: accountAddress_,\n getAccountInitCode\n });\n const baseAccount = await toSmartContractAccount({\n transport,\n chain: chain2,\n entryPoint,\n accountAddress,\n source: MULTISIG_ACCOUNT_SOURCE,\n getAccountInitCode,\n ...standardExecutor,\n ...multisigSignMethods({\n client,\n accountAddress,\n threshold,\n signer: () => signer\n })\n });\n return {\n ...baseAccount,\n getLocalThreshold: () => threshold,\n publicKey: await signer.getAddress(),\n getSigner: () => signer\n };\n }\n var MULTISIG_ACCOUNT_SOURCE, isMultisigModularAccount;\n var init_multisigAccount = __esm({\n \"../../../node_modules/.pnpm/@account-kit+smart-contracts@4.62.0_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5._65dee0153d50ca3a2d2c6830319271d9/node_modules/@account-kit/smart-contracts/dist/esm/src/msca/account/multisigAccount.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_esm6();\n init_esm();\n init_MultisigModularAccountFactory();\n init_signer3();\n init_utils12();\n init_standardExecutor();\n MULTISIG_ACCOUNT_SOURCE = \"MultisigModularAccount\";\n isMultisigModularAccount = (acct) => {\n return acct.source === MULTISIG_ACCOUNT_SOURCE;\n };\n }\n });\n\n // ../../../node_modules/.pnpm/@account-kit+smart-contracts@4.62.0_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5._65dee0153d50ca3a2d2c6830319271d9/node_modules/@account-kit/smart-contracts/dist/esm/src/msca/client/alchemyClient.js\n async function createModularAccountAlchemyClient(config2) {\n return createMultiOwnerModularAccountClient(config2);\n }\n var init_alchemyClient2 = __esm({\n \"../../../node_modules/.pnpm/@account-kit+smart-contracts@4.62.0_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5._65dee0153d50ca3a2d2c6830319271d9/node_modules/@account-kit/smart-contracts/dist/esm/src/msca/client/alchemyClient.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_src();\n }\n });\n\n // ../../../node_modules/.pnpm/@account-kit+smart-contracts@4.62.0_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5._65dee0153d50ca3a2d2c6830319271d9/node_modules/@account-kit/smart-contracts/dist/esm/src/msca/plugin-manager/installPlugin.js\n async function installPlugin(client, { overrides, context: context2, account = client.account, ...params }) {\n if (!account) {\n throw new AccountNotFoundError2();\n }\n if (!isSmartAccountClient(client)) {\n throw new IncompatibleClientError(\"SmartAccountClient\", \"installPlugin\", client);\n }\n const callData = await encodeInstallPluginUserOperation(client, params);\n return client.sendUserOperation({\n uo: callData,\n overrides,\n account,\n context: context2\n });\n }\n async function encodeInstallPluginUserOperation(client, params) {\n const pluginManifest = await client.readContract({\n abi: IPluginAbi,\n address: params.pluginAddress,\n functionName: \"pluginManifest\"\n });\n const manifestHash = params.manifestHash ?? keccak256(encodeFunctionResult({\n abi: IPluginAbi,\n functionName: \"pluginManifest\",\n result: pluginManifest\n }));\n return encodeFunctionData({\n abi: IPluginManagerAbi,\n functionName: \"installPlugin\",\n args: [\n params.pluginAddress,\n manifestHash,\n params.pluginInitData ?? \"0x\",\n params.dependencies ?? []\n ]\n });\n }\n var init_installPlugin = __esm({\n \"../../../node_modules/.pnpm/@account-kit+smart-contracts@4.62.0_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5._65dee0153d50ca3a2d2c6830319271d9/node_modules/@account-kit/smart-contracts/dist/esm/src/msca/plugin-manager/installPlugin.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_esm6();\n init_esm();\n init_IPlugin();\n init_IPluginManager();\n }\n });\n\n // ../../../node_modules/.pnpm/@account-kit+smart-contracts@4.62.0_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5._65dee0153d50ca3a2d2c6830319271d9/node_modules/@account-kit/smart-contracts/dist/esm/src/msca/plugin-manager/uninstallPlugin.js\n async function uninstallPlugin(client, { overrides, account = client.account, context: context2, ...params }) {\n if (!account) {\n throw new AccountNotFoundError2();\n }\n if (!isSmartAccountClient(client)) {\n throw new IncompatibleClientError(\"SmartAccountClient\", \"uninstallPlugin\", client);\n }\n const callData = await encodeUninstallPluginUserOperation(params);\n return client.sendUserOperation({\n uo: callData,\n overrides,\n account,\n context: context2\n });\n }\n async function encodeUninstallPluginUserOperation(params) {\n return encodeFunctionData({\n abi: IPluginManagerAbi,\n functionName: \"uninstallPlugin\",\n args: [\n params.pluginAddress,\n params.config ?? \"0x\",\n params.pluginUninstallData ?? \"0x\"\n ]\n });\n }\n var init_uninstallPlugin = __esm({\n \"../../../node_modules/.pnpm/@account-kit+smart-contracts@4.62.0_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5._65dee0153d50ca3a2d2c6830319271d9/node_modules/@account-kit/smart-contracts/dist/esm/src/msca/plugin-manager/uninstallPlugin.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_esm6();\n init_esm();\n init_IPluginManager();\n }\n });\n\n // ../../../node_modules/.pnpm/@account-kit+smart-contracts@4.62.0_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5._65dee0153d50ca3a2d2c6830319271d9/node_modules/@account-kit/smart-contracts/dist/esm/src/msca/plugin-manager/decorator.js\n function pluginManagerActions(client) {\n return {\n installPlugin: async (params) => installPlugin(client, params),\n uninstallPlugin: async (params) => uninstallPlugin(client, params)\n };\n }\n var init_decorator2 = __esm({\n \"../../../node_modules/.pnpm/@account-kit+smart-contracts@4.62.0_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5._65dee0153d50ca3a2d2c6830319271d9/node_modules/@account-kit/smart-contracts/dist/esm/src/msca/plugin-manager/decorator.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_installPlugin();\n init_uninstallPlugin();\n }\n });\n\n // ../../../node_modules/.pnpm/@account-kit+smart-contracts@4.62.0_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5._65dee0153d50ca3a2d2c6830319271d9/node_modules/@account-kit/smart-contracts/dist/esm/src/msca/plugins/multi-owner/extension.js\n var multiOwnerPluginActions2;\n var init_extension = __esm({\n \"../../../node_modules/.pnpm/@account-kit+smart-contracts@4.62.0_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5._65dee0153d50ca3a2d2c6830319271d9/node_modules/@account-kit/smart-contracts/dist/esm/src/msca/plugins/multi-owner/extension.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_esm6();\n init_plugin();\n multiOwnerPluginActions2 = (client) => ({\n ...multiOwnerPluginActions(client),\n async readOwners(args) {\n const account = args?.account ?? client.account;\n if (!account) {\n throw new AccountNotFoundError2();\n }\n const contract = MultiOwnerPlugin.getContract(client, args?.pluginAddress);\n return contract.read.ownersOf([account.address]);\n },\n async isOwnerOf(args) {\n const account = args.account ?? client.account;\n if (!account) {\n throw new AccountNotFoundError2();\n }\n const contract = MultiOwnerPlugin.getContract(client, args.pluginAddress);\n return contract.read.isOwnerOf([account.address, args.address]);\n }\n });\n }\n });\n\n // ../../../node_modules/.pnpm/@account-kit+smart-contracts@4.62.0_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5._65dee0153d50ca3a2d2c6830319271d9/node_modules/@account-kit/smart-contracts/dist/esm/src/msca/plugins/multi-owner/index.js\n var init_multi_owner = __esm({\n \"../../../node_modules/.pnpm/@account-kit+smart-contracts@4.62.0_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5._65dee0153d50ca3a2d2c6830319271d9/node_modules/@account-kit/smart-contracts/dist/esm/src/msca/plugins/multi-owner/index.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_extension();\n }\n });\n\n // ../../../node_modules/.pnpm/@account-kit+smart-contracts@4.62.0_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5._65dee0153d50ca3a2d2c6830319271d9/node_modules/@account-kit/smart-contracts/dist/esm/src/msca/errors.js\n var InvalidAggregatedSignatureError, InvalidContextSignatureError, MultisigAccountExpectedError, MultisigMissingSignatureError;\n var init_errors6 = __esm({\n \"../../../node_modules/.pnpm/@account-kit+smart-contracts@4.62.0_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5._65dee0153d50ca3a2d2c6830319271d9/node_modules/@account-kit/smart-contracts/dist/esm/src/msca/errors.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_esm6();\n InvalidAggregatedSignatureError = class extends BaseError4 {\n constructor() {\n super(\"Invalid aggregated signature\");\n Object.defineProperty(this, \"name\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: \"InvalidAggregatedSignatureError\"\n });\n }\n };\n InvalidContextSignatureError = class extends BaseError4 {\n constructor() {\n super(\"Expected context.signature to be a hex string\");\n Object.defineProperty(this, \"name\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: \"InvalidContextSignatureError\"\n });\n }\n };\n MultisigAccountExpectedError = class extends BaseError4 {\n constructor() {\n super(\"Expected account to be a multisig modular account\");\n Object.defineProperty(this, \"name\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: \"MultisigAccountExpectedError\"\n });\n }\n };\n MultisigMissingSignatureError = class extends BaseError4 {\n constructor() {\n super(\"UserOp must have at least one signature already\");\n Object.defineProperty(this, \"name\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: \"MultisigMissingSignatureError\"\n });\n }\n };\n }\n });\n\n // ../../../node_modules/.pnpm/@account-kit+smart-contracts@4.62.0_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5._65dee0153d50ca3a2d2c6830319271d9/node_modules/@account-kit/smart-contracts/dist/esm/src/msca/plugins/multisig/actions/getThreshold.js\n async function getThreshold(client, args) {\n const account = args.account ?? client.account;\n if (!account) {\n throw new AccountNotFoundError2();\n }\n if (!isMultisigModularAccount(account)) {\n throw new MultisigAccountExpectedError();\n }\n const [, threshold] = await MultisigPlugin.getContract(client, args.pluginAddress).read.ownershipInfoOf([account.address]);\n return threshold === 0n ? account.getLocalThreshold() : threshold;\n }\n var init_getThreshold = __esm({\n \"../../../node_modules/.pnpm/@account-kit+smart-contracts@4.62.0_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5._65dee0153d50ca3a2d2c6830319271d9/node_modules/@account-kit/smart-contracts/dist/esm/src/msca/plugins/multisig/actions/getThreshold.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_esm6();\n init_multisigAccount();\n init_plugin2();\n init_errors6();\n }\n });\n\n // ../../../node_modules/.pnpm/@account-kit+smart-contracts@4.62.0_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5._65dee0153d50ca3a2d2c6830319271d9/node_modules/@account-kit/smart-contracts/dist/esm/src/msca/plugins/multisig/actions/isOwnerOf.js\n async function isOwnerOf(client, args) {\n const account = args.account ?? client.account;\n if (!account) {\n throw new AccountNotFoundError2();\n }\n const contract = MultisigPlugin.getContract(client, args.pluginAddress);\n return await contract.read.isOwnerOf([account.address, args.address]);\n }\n var init_isOwnerOf = __esm({\n \"../../../node_modules/.pnpm/@account-kit+smart-contracts@4.62.0_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5._65dee0153d50ca3a2d2c6830319271d9/node_modules/@account-kit/smart-contracts/dist/esm/src/msca/plugins/multisig/actions/isOwnerOf.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_esm6();\n init_plugin2();\n }\n });\n\n // ../../../node_modules/.pnpm/@account-kit+smart-contracts@4.62.0_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5._65dee0153d50ca3a2d2c6830319271d9/node_modules/@account-kit/smart-contracts/dist/esm/src/msca/plugins/multisig/utils/splitAggregatedSignature.js\n var splitAggregatedSignature;\n var init_splitAggregatedSignature = __esm({\n \"../../../node_modules/.pnpm/@account-kit+smart-contracts@4.62.0_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5._65dee0153d50ca3a2d2c6830319271d9/node_modules/@account-kit/smart-contracts/dist/esm/src/msca/plugins/multisig/utils/splitAggregatedSignature.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_esm6();\n init_esm();\n init_errors6();\n splitAggregatedSignature = async (args) => {\n const { aggregatedSignature, threshold, account, request } = args;\n if (aggregatedSignature.length < 192 + (65 * threshold - 1)) {\n throw new InvalidAggregatedSignatureError();\n }\n const pvg = takeBytes(aggregatedSignature, { count: 32 });\n const maxFeePerGas = takeBytes(aggregatedSignature, {\n count: 32,\n offset: 32\n });\n const maxPriorityFeePerGas = takeBytes(aggregatedSignature, {\n count: 32,\n offset: 64\n });\n const signaturesAndData = takeBytes(aggregatedSignature, {\n offset: 96\n });\n const signatureHexes = (() => {\n const signatureStr = takeBytes(signaturesAndData, {\n count: 65 * threshold - 1\n });\n const signatures2 = [];\n for (let i3 = 0; i3 < threshold - 1; i3++) {\n signatures2.push(takeBytes(signatureStr, { count: 65, offset: i3 * 65 }));\n }\n return signatures2;\n })();\n const signatures = signatureHexes.map(async (signature) => {\n const v2 = BigInt(takeBytes(signature, { count: 1, offset: 64 }));\n const signerType = v2 === 0n ? \"CONTRACT\" : \"EOA\";\n if (signerType === \"EOA\") {\n const hash3 = hashMessage({\n raw: account.getEntryPoint().getUserOperationHash({\n ...request,\n preVerificationGas: pvg,\n maxFeePerGas,\n maxPriorityFeePerGas\n })\n });\n return {\n // the signer doesn't get used here for EOAs\n // TODO: nope. this needs to actually do an ec recover\n signer: await recoverAddress({ hash: hash3, signature }),\n signature,\n signerType,\n userOpSigType: \"UPPERLIMIT\"\n };\n }\n const signer = takeBytes(signature, { count: 20, offset: 12 });\n const offset = fromHex(takeBytes(signature, { count: 32, offset: 32 }), \"number\");\n const signatureLength = fromHex(takeBytes(signaturesAndData, { count: 32, offset }), \"number\");\n return {\n signer,\n signerType,\n userOpSigType: \"UPPERLIMIT\",\n signature: takeBytes(signaturesAndData, {\n count: signatureLength,\n offset: offset + 32\n })\n };\n });\n return {\n upperLimitPvg: pvg,\n upperLimitMaxFeePerGas: maxFeePerGas,\n upperLimitMaxPriorityFeePerGas: maxPriorityFeePerGas,\n signatures: await Promise.all(signatures)\n };\n };\n }\n });\n\n // ../../../node_modules/.pnpm/@account-kit+smart-contracts@4.62.0_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5._65dee0153d50ca3a2d2c6830319271d9/node_modules/@account-kit/smart-contracts/dist/esm/src/msca/plugins/multisig/actions/proposeUserOperation.js\n async function proposeUserOperation(client, { uo, account = client.account, overrides: overrides_ }) {\n const overrides = {\n maxFeePerGas: { multiplier: 3 },\n maxPriorityFeePerGas: { multiplier: 2 },\n preVerificationGas: { multiplier: 1e3 },\n ...overrides_\n };\n if (!account) {\n throw new AccountNotFoundError2();\n }\n if (!isSmartAccountClient(client)) {\n throw new IncompatibleClientError(\"SmartAccountClient\", \"proposeUserOperation\", client);\n }\n if (!isSmartAccountWithSigner(account)) {\n throw new SmartAccountWithSignerRequiredError();\n }\n const builtUo = await client.buildUserOperation({\n account,\n uo,\n overrides\n });\n const request = await client.signUserOperation({\n uoStruct: builtUo,\n account,\n context: {\n userOpSignatureType: \"UPPERLIMIT\"\n }\n });\n const splitSignatures = await splitAggregatedSignature({\n request,\n aggregatedSignature: request.signature,\n account,\n // split works on the assumption that we have t - 1 signatures\n threshold: 2\n });\n return {\n request,\n signatureObj: splitSignatures.signatures[0],\n aggregatedSignature: request.signature\n };\n }\n var init_proposeUserOperation = __esm({\n \"../../../node_modules/.pnpm/@account-kit+smart-contracts@4.62.0_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5._65dee0153d50ca3a2d2c6830319271d9/node_modules/@account-kit/smart-contracts/dist/esm/src/msca/plugins/multisig/actions/proposeUserOperation.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_esm6();\n init_splitAggregatedSignature();\n }\n });\n\n // ../../../node_modules/.pnpm/@account-kit+smart-contracts@4.62.0_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5._65dee0153d50ca3a2d2c6830319271d9/node_modules/@account-kit/smart-contracts/dist/esm/src/msca/plugins/multisig/actions/readOwners.js\n async function readOwners(client, args) {\n const account = args?.account ?? client.account;\n if (!account) {\n throw new AccountNotFoundError2();\n }\n const [owners] = await MultisigPlugin.getContract(client, args?.pluginAddress).read.ownershipInfoOf([account.address]);\n return owners;\n }\n var init_readOwners = __esm({\n \"../../../node_modules/.pnpm/@account-kit+smart-contracts@4.62.0_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5._65dee0153d50ca3a2d2c6830319271d9/node_modules/@account-kit/smart-contracts/dist/esm/src/msca/plugins/multisig/actions/readOwners.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_esm6();\n init_plugin2();\n }\n });\n\n // ../../../node_modules/.pnpm/@account-kit+smart-contracts@4.62.0_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5._65dee0153d50ca3a2d2c6830319271d9/node_modules/@account-kit/smart-contracts/dist/esm/src/msca/plugins/multisig/utils/formatSignatures.js\n var formatSignatures;\n var init_formatSignatures = __esm({\n \"../../../node_modules/.pnpm/@account-kit+smart-contracts@4.62.0_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5._65dee0153d50ca3a2d2c6830319271d9/node_modules/@account-kit/smart-contracts/dist/esm/src/msca/plugins/multisig/utils/formatSignatures.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_esm6();\n init_esm();\n formatSignatures = (signatures, usingMaxValues = false) => {\n let eoaSigs = \"\";\n let contractSigs = \"\";\n let offset = BigInt(65 * signatures.length);\n signatures.sort((a3, b4) => {\n const bigintA = hexToBigInt(a3.signer);\n const bigintB = hexToBigInt(b4.signer);\n return bigintA < bigintB ? -1 : bigintA > bigintB ? 1 : 0;\n }).forEach((sig) => {\n const addV = sig.userOpSigType === \"ACTUAL\" && !usingMaxValues ? 32 : 0;\n if (sig.signerType === \"EOA\") {\n let v2 = parseInt(takeBytes(sig.signature, { count: 1, offset: 64 })) + addV;\n eoaSigs += concat([\n takeBytes(sig.signature, { count: 64 }),\n toHex(v2, { size: 1 })\n ]).slice(2);\n } else {\n const sigLen = BigInt(sig.signature.slice(2).length / 2);\n eoaSigs += concat([\n pad(sig.signer),\n toHex(offset, { size: 32 }),\n toHex(addV, { size: 1 })\n ]).slice(2);\n contractSigs += concat([\n toHex(sigLen, { size: 32 }),\n sig.signature\n ]).slice(2);\n offset += sigLen;\n }\n });\n return \"0x\" + eoaSigs + contractSigs;\n };\n }\n });\n\n // ../../../node_modules/.pnpm/@account-kit+smart-contracts@4.62.0_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5._65dee0153d50ca3a2d2c6830319271d9/node_modules/@account-kit/smart-contracts/dist/esm/src/msca/plugins/multisig/utils/combineSignatures.js\n function combineSignatures({ signatures, upperLimitMaxFeePerGas, upperLimitMaxPriorityFeePerGas, upperLimitPvg, usingMaxValues }) {\n return concat([\n pad(upperLimitPvg),\n pad(upperLimitMaxFeePerGas),\n pad(upperLimitMaxPriorityFeePerGas),\n formatSignatures(signatures, usingMaxValues)\n ]);\n }\n var init_combineSignatures = __esm({\n \"../../../node_modules/.pnpm/@account-kit+smart-contracts@4.62.0_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5._65dee0153d50ca3a2d2c6830319271d9/node_modules/@account-kit/smart-contracts/dist/esm/src/msca/plugins/multisig/utils/combineSignatures.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_esm();\n init_formatSignatures();\n }\n });\n\n // ../../../node_modules/.pnpm/@account-kit+smart-contracts@4.62.0_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5._65dee0153d50ca3a2d2c6830319271d9/node_modules/@account-kit/smart-contracts/dist/esm/src/msca/plugins/multisig/utils/getSignerType.js\n var getSignerType;\n var init_getSignerType = __esm({\n \"../../../node_modules/.pnpm/@account-kit+smart-contracts@4.62.0_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5._65dee0153d50ca3a2d2c6830319271d9/node_modules/@account-kit/smart-contracts/dist/esm/src/msca/plugins/multisig/utils/getSignerType.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_esm();\n getSignerType = async ({ client, signature, signer }) => {\n const signerAddress = await signer.getAddress();\n const byteCode = await client.getBytecode({ address: signerAddress });\n return (byteCode ?? \"0x\") === \"0x\" && size(signature) === 65 ? \"EOA\" : \"CONTRACT\";\n };\n }\n });\n\n // ../../../node_modules/.pnpm/@account-kit+smart-contracts@4.62.0_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5._65dee0153d50ca3a2d2c6830319271d9/node_modules/@account-kit/smart-contracts/dist/esm/src/msca/plugins/multisig/utils/index.js\n var init_utils13 = __esm({\n \"../../../node_modules/.pnpm/@account-kit+smart-contracts@4.62.0_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5._65dee0153d50ca3a2d2c6830319271d9/node_modules/@account-kit/smart-contracts/dist/esm/src/msca/plugins/multisig/utils/index.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_combineSignatures();\n init_formatSignatures();\n init_getSignerType();\n init_splitAggregatedSignature();\n }\n });\n\n // ../../../node_modules/.pnpm/@account-kit+smart-contracts@4.62.0_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5._65dee0153d50ca3a2d2c6830319271d9/node_modules/@account-kit/smart-contracts/dist/esm/src/msca/plugins/multisig/actions/signMultisigUserOperation.js\n async function signMultisigUserOperation(client, params) {\n const { account = client.account, signatures, userOperationRequest } = params;\n if (!account) {\n throw new AccountNotFoundError2();\n }\n if (!isSmartAccountClient(client)) {\n throw new IncompatibleClientError(\"SmartAccountClient\", \"signMultisigUserOperation\", client);\n }\n if (!isSmartAccountWithSigner(account)) {\n throw new SmartAccountWithSignerRequiredError();\n }\n if (!signatures.length) {\n throw new MultisigMissingSignatureError();\n }\n const signerAddress = await account.getSigner().getAddress();\n const signedRequest = await client.signUserOperation({\n account,\n uoStruct: userOperationRequest,\n context: {\n aggregatedSignature: combineSignatures({\n signatures,\n upperLimitMaxFeePerGas: userOperationRequest.maxFeePerGas,\n upperLimitMaxPriorityFeePerGas: userOperationRequest.maxPriorityFeePerGas,\n upperLimitPvg: userOperationRequest.preVerificationGas,\n usingMaxValues: false\n }),\n signatures,\n userOpSignatureType: \"UPPERLIMIT\"\n }\n });\n const splitSignatures = await splitAggregatedSignature({\n account,\n request: signedRequest,\n aggregatedSignature: signedRequest.signature,\n // split works on the assumption that we have t - 1 signatures\n // we have signatures.length + 1 signatures now, so we need sl + 1 + 1\n threshold: signatures.length + 2\n });\n const signatureObj = splitSignatures.signatures.find((x4) => x4.signer === signerAddress);\n if (!signatureObj) {\n throw new Error(\"INTERNAL ERROR: signature not found in split signatures, this is an internal bug please report\");\n }\n return {\n signatureObj,\n signature: signatureObj.signature,\n aggregatedSignature: signedRequest.signature\n };\n }\n var init_signMultisigUserOperation = __esm({\n \"../../../node_modules/.pnpm/@account-kit+smart-contracts@4.62.0_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5._65dee0153d50ca3a2d2c6830319271d9/node_modules/@account-kit/smart-contracts/dist/esm/src/msca/plugins/multisig/actions/signMultisigUserOperation.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_esm6();\n init_errors6();\n init_utils13();\n }\n });\n\n // ../../../node_modules/.pnpm/@account-kit+smart-contracts@4.62.0_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5._65dee0153d50ca3a2d2c6830319271d9/node_modules/@account-kit/smart-contracts/dist/esm/src/msca/plugins/multisig/extension.js\n var multisigPluginActions2;\n var init_extension2 = __esm({\n \"../../../node_modules/.pnpm/@account-kit+smart-contracts@4.62.0_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5._65dee0153d50ca3a2d2c6830319271d9/node_modules/@account-kit/smart-contracts/dist/esm/src/msca/plugins/multisig/extension.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_getThreshold();\n init_isOwnerOf();\n init_proposeUserOperation();\n init_readOwners();\n init_signMultisigUserOperation();\n init_plugin2();\n multisigPluginActions2 = (client) => ({\n ...multisigPluginActions(client),\n readOwners: (args) => readOwners(client, args),\n isOwnerOf: (args) => isOwnerOf(client, args),\n getThreshold: (args) => getThreshold(client, args),\n proposeUserOperation: (args) => proposeUserOperation(client, args),\n signMultisigUserOperation: (params) => signMultisigUserOperation(client, params)\n });\n }\n });\n\n // ../../../node_modules/.pnpm/@account-kit+smart-contracts@4.62.0_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5._65dee0153d50ca3a2d2c6830319271d9/node_modules/@account-kit/smart-contracts/dist/esm/src/msca/plugins/multisig/middleware.js\n var multisigSignatureMiddleware, isUsingMaxValues;\n var init_middleware = __esm({\n \"../../../node_modules/.pnpm/@account-kit+smart-contracts@4.62.0_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5._65dee0153d50ca3a2d2c6830319271d9/node_modules/@account-kit/smart-contracts/dist/esm/src/msca/plugins/multisig/middleware.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_esm6();\n init_multisigAccount();\n init_errors6();\n init_utils13();\n multisigSignatureMiddleware = async (struct, { account, client, context: context2 }) => {\n if (!context2) {\n throw new InvalidContextSignatureError();\n }\n if (!isSmartAccountWithSigner(account)) {\n throw new SmartAccountWithSignerRequiredError();\n }\n if (!isMultisigModularAccount(account)) {\n throw new MultisigAccountExpectedError();\n }\n const resolvedStruct = await resolveProperties(struct);\n const request = deepHexlify(resolvedStruct);\n if (!isValidRequest(request)) {\n throw new InvalidUserOperationError(resolvedStruct);\n }\n const signature = await account.signUserOperationHash(account.getEntryPoint().getUserOperationHash(request));\n const signerType = await getSignerType({\n client,\n signature,\n signer: account.getSigner()\n });\n if (context2?.signatures?.length == null && context2?.aggregatedSignature == null) {\n return {\n ...resolvedStruct,\n signature: combineSignatures({\n signatures: [\n {\n signature,\n signer: await account.getSigner().getAddress(),\n signerType,\n userOpSigType: context2.userOpSignatureType\n }\n ],\n upperLimitMaxFeePerGas: request.maxFeePerGas,\n upperLimitMaxPriorityFeePerGas: request.maxPriorityFeePerGas,\n upperLimitPvg: request.preVerificationGas,\n usingMaxValues: context2.userOpSignatureType === \"ACTUAL\"\n })\n };\n }\n if (context2.aggregatedSignature == null || context2.signatures == null) {\n throw new InvalidContextSignatureError();\n }\n const { upperLimitPvg, upperLimitMaxFeePerGas, upperLimitMaxPriorityFeePerGas } = await splitAggregatedSignature({\n aggregatedSignature: context2.aggregatedSignature,\n threshold: context2.signatures.length + 1,\n account,\n request\n });\n const finalSignature = combineSignatures({\n signatures: context2.signatures.concat({\n userOpSigType: context2.userOpSignatureType,\n signerType,\n signature,\n signer: await account.getSigner().getAddress()\n }),\n upperLimitPvg,\n upperLimitMaxFeePerGas,\n upperLimitMaxPriorityFeePerGas,\n usingMaxValues: isUsingMaxValues(request, {\n upperLimitPvg,\n upperLimitMaxFeePerGas,\n upperLimitMaxPriorityFeePerGas\n })\n });\n return {\n ...resolvedStruct,\n signature: finalSignature\n };\n };\n isUsingMaxValues = (request, upperLimits) => {\n if (BigInt(request.preVerificationGas) !== BigInt(upperLimits.upperLimitPvg)) {\n return false;\n }\n if (BigInt(request.maxFeePerGas) !== BigInt(upperLimits.upperLimitMaxFeePerGas)) {\n return false;\n }\n if (BigInt(request.maxPriorityFeePerGas) !== BigInt(upperLimits.upperLimitMaxPriorityFeePerGas)) {\n return false;\n }\n return true;\n };\n }\n });\n\n // ../../../node_modules/.pnpm/@account-kit+smart-contracts@4.62.0_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5._65dee0153d50ca3a2d2c6830319271d9/node_modules/@account-kit/smart-contracts/dist/esm/src/msca/plugins/multisig/index.js\n var init_multisig = __esm({\n \"../../../node_modules/.pnpm/@account-kit+smart-contracts@4.62.0_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5._65dee0153d50ca3a2d2c6830319271d9/node_modules/@account-kit/smart-contracts/dist/esm/src/msca/plugins/multisig/index.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_extension2();\n init_middleware();\n init_plugin2();\n }\n });\n\n // ../../../node_modules/.pnpm/@account-kit+smart-contracts@4.62.0_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5._65dee0153d50ca3a2d2c6830319271d9/node_modules/@account-kit/smart-contracts/dist/esm/src/msca/client/client.js\n async function createMultiOwnerModularAccountClient({ transport, chain: chain2, ...params }) {\n const modularAccount = await createMultiOwnerModularAccount({\n ...params,\n transport,\n chain: chain2\n });\n if (isAlchemyTransport2(transport, chain2)) {\n const { opts } = params;\n return createAlchemySmartAccountClient2({\n ...params,\n account: modularAccount,\n transport,\n chain: chain2,\n opts\n }).extend(multiOwnerPluginActions2).extend(pluginManagerActions).extend(accountLoupeActions);\n }\n return createSmartAccountClient({\n ...params,\n transport,\n chain: chain2,\n account: modularAccount\n }).extend(pluginManagerActions).extend(multiOwnerPluginActions2).extend(accountLoupeActions);\n }\n async function createMultisigModularAccountClient({ transport, chain: chain2, ...params }) {\n const modularAccount = await createMultisigModularAccount({\n ...params,\n transport,\n chain: chain2\n });\n if (isAlchemyTransport2(transport, chain2)) {\n let config2 = {\n ...params,\n chain: chain2,\n transport\n };\n const { opts } = config2;\n return createAlchemySmartAccountClient2({\n ...config2,\n account: modularAccount,\n opts,\n signUserOperation: multisigSignatureMiddleware\n }).extend(smartAccountClientActions).extend(multisigPluginActions2).extend(pluginManagerActions).extend(accountLoupeActions);\n }\n const client = createSmartAccountClient({\n ...params,\n transport,\n chain: chain2,\n account: modularAccount,\n signUserOperation: multisigSignatureMiddleware\n }).extend(smartAccountClientActions).extend(pluginManagerActions).extend(multisigPluginActions2).extend(accountLoupeActions);\n return client;\n }\n var init_client3 = __esm({\n \"../../../node_modules/.pnpm/@account-kit+smart-contracts@4.62.0_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5._65dee0153d50ca3a2d2c6830319271d9/node_modules/@account-kit/smart-contracts/dist/esm/src/msca/client/client.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_esm6();\n init_decorator();\n init_multiOwnerAccount();\n init_multisigAccount();\n init_decorator2();\n init_multi_owner();\n init_multisig();\n init_middleware();\n init_exports3();\n }\n });\n\n // ../../../node_modules/.pnpm/@account-kit+smart-contracts@4.62.0_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5._65dee0153d50ca3a2d2c6830319271d9/node_modules/@account-kit/smart-contracts/dist/esm/src/msca/client/multiSigAlchemyClient.js\n async function createMultisigAccountAlchemyClient(config2) {\n return createMultisigModularAccountClient(config2);\n }\n var init_multiSigAlchemyClient = __esm({\n \"../../../node_modules/.pnpm/@account-kit+smart-contracts@4.62.0_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5._65dee0153d50ca3a2d2c6830319271d9/node_modules/@account-kit/smart-contracts/dist/esm/src/msca/client/multiSigAlchemyClient.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_src();\n }\n });\n\n // ../../../node_modules/.pnpm/@account-kit+smart-contracts@4.62.0_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5._65dee0153d50ca3a2d2c6830319271d9/node_modules/@account-kit/smart-contracts/dist/esm/src/msca/plugins/session-key/plugin.js\n var addresses3, SessionKeyPlugin, sessionKeyPluginActions, SessionKeyPluginExecutionFunctionAbi, SessionKeyPluginAbi;\n var init_plugin3 = __esm({\n \"../../../node_modules/.pnpm/@account-kit+smart-contracts@4.62.0_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5._65dee0153d50ca3a2d2c6830319271d9/node_modules/@account-kit/smart-contracts/dist/esm/src/msca/plugins/session-key/plugin.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_esm();\n init_esm6();\n init_src();\n init_plugin();\n addresses3 = {\n 1: \"0x0000003E0000a96de4058e1E02a62FaaeCf23d8d\",\n 10: \"0x0000003E0000a96de4058e1E02a62FaaeCf23d8d\",\n 137: \"0x0000003E0000a96de4058e1E02a62FaaeCf23d8d\",\n 252: \"0x0000003E0000a96de4058e1E02a62FaaeCf23d8d\",\n 2523: \"0x0000003E0000a96de4058e1E02a62FaaeCf23d8d\",\n 8453: \"0x0000003E0000a96de4058e1E02a62FaaeCf23d8d\",\n 42161: \"0x0000003E0000a96de4058e1E02a62FaaeCf23d8d\",\n 80001: \"0x0000003E0000a96de4058e1E02a62FaaeCf23d8d\",\n 80002: \"0x0000003E0000a96de4058e1E02a62FaaeCf23d8d\",\n 84532: \"0x0000003E0000a96de4058e1E02a62FaaeCf23d8d\",\n 421614: \"0x0000003E0000a96de4058e1E02a62FaaeCf23d8d\",\n 7777777: \"0x0000003E0000a96de4058e1E02a62FaaeCf23d8d\",\n 11155111: \"0x0000003E0000a96de4058e1E02a62FaaeCf23d8d\",\n 11155420: \"0x0000003E0000a96de4058e1E02a62FaaeCf23d8d\",\n 999999999: \"0x0000003E0000a96de4058e1E02a62FaaeCf23d8d\"\n };\n SessionKeyPlugin = {\n meta: {\n name: \"Session Key Plugin\",\n version: \"1.0.1\",\n addresses: addresses3\n },\n getContract: (client, address) => {\n if (!client.chain)\n throw new ChainNotFoundError2();\n return getContract({\n address: address || addresses3[client.chain.id],\n abi: SessionKeyPluginAbi,\n client\n });\n }\n };\n sessionKeyPluginActions = (client) => ({\n executeWithSessionKey({ args, overrides, context: context2, account = client.account }) {\n if (!account) {\n throw new AccountNotFoundError2();\n }\n if (!isSmartAccountClient(client)) {\n throw new IncompatibleClientError(\"SmartAccountClient\", \"executeWithSessionKey\", client);\n }\n const uo = encodeFunctionData({\n abi: SessionKeyPluginExecutionFunctionAbi,\n functionName: \"executeWithSessionKey\",\n args\n });\n return client.sendUserOperation({ uo, overrides, account, context: context2 });\n },\n addSessionKey({ args, overrides, context: context2, account = client.account }) {\n if (!account) {\n throw new AccountNotFoundError2();\n }\n if (!isSmartAccountClient(client)) {\n throw new IncompatibleClientError(\"SmartAccountClient\", \"addSessionKey\", client);\n }\n const uo = encodeFunctionData({\n abi: SessionKeyPluginExecutionFunctionAbi,\n functionName: \"addSessionKey\",\n args\n });\n return client.sendUserOperation({ uo, overrides, account, context: context2 });\n },\n removeSessionKey({ args, overrides, context: context2, account = client.account }) {\n if (!account) {\n throw new AccountNotFoundError2();\n }\n if (!isSmartAccountClient(client)) {\n throw new IncompatibleClientError(\"SmartAccountClient\", \"removeSessionKey\", client);\n }\n const uo = encodeFunctionData({\n abi: SessionKeyPluginExecutionFunctionAbi,\n functionName: \"removeSessionKey\",\n args\n });\n return client.sendUserOperation({ uo, overrides, account, context: context2 });\n },\n rotateSessionKey({ args, overrides, context: context2, account = client.account }) {\n if (!account) {\n throw new AccountNotFoundError2();\n }\n if (!isSmartAccountClient(client)) {\n throw new IncompatibleClientError(\"SmartAccountClient\", \"rotateSessionKey\", client);\n }\n const uo = encodeFunctionData({\n abi: SessionKeyPluginExecutionFunctionAbi,\n functionName: \"rotateSessionKey\",\n args\n });\n return client.sendUserOperation({ uo, overrides, account, context: context2 });\n },\n updateKeyPermissions({ args, overrides, context: context2, account = client.account }) {\n if (!account) {\n throw new AccountNotFoundError2();\n }\n if (!isSmartAccountClient(client)) {\n throw new IncompatibleClientError(\"SmartAccountClient\", \"updateKeyPermissions\", client);\n }\n const uo = encodeFunctionData({\n abi: SessionKeyPluginExecutionFunctionAbi,\n functionName: \"updateKeyPermissions\",\n args\n });\n return client.sendUserOperation({ uo, overrides, account, context: context2 });\n },\n installSessionKeyPlugin({ account = client.account, overrides, context: context2, ...params }) {\n if (!account) {\n throw new AccountNotFoundError2();\n }\n if (!isSmartAccountClient(client)) {\n throw new IncompatibleClientError(\"SmartAccountClient\", \"installSessionKeyPlugin\", client);\n }\n const chain2 = client.chain;\n if (!chain2) {\n throw new ChainNotFoundError2();\n }\n const dependencies = params.dependencyOverrides ?? [\n (() => {\n const pluginAddress2 = MultiOwnerPlugin.meta.addresses[chain2.id];\n if (!pluginAddress2) {\n throw new Error(\"missing MultiOwnerPlugin address for chain \" + chain2.name);\n }\n return encodePacked([\"address\", \"uint8\"], [pluginAddress2, 0]);\n })(),\n (() => {\n const pluginAddress2 = MultiOwnerPlugin.meta.addresses[chain2.id];\n if (!pluginAddress2) {\n throw new Error(\"missing MultiOwnerPlugin address for chain \" + chain2.name);\n }\n return encodePacked([\"address\", \"uint8\"], [pluginAddress2, 1]);\n })()\n ];\n const pluginAddress = params.pluginAddress ?? SessionKeyPlugin.meta.addresses[chain2.id];\n if (!pluginAddress) {\n throw new Error(\"missing SessionKeyPlugin address for chain \" + chain2.name);\n }\n return installPlugin(client, {\n pluginAddress,\n pluginInitData: encodeAbiParameters([\n { type: \"address[]\", name: \"initialKeys\" },\n { type: \"bytes32[]\", name: \"tags\" },\n { type: \"bytes[][]\", name: \"initialPermissions\" }\n ], params.args),\n dependencies,\n overrides,\n account,\n context: context2\n });\n },\n encodeExecuteWithSessionKey({ args }) {\n return encodeFunctionData({\n abi: SessionKeyPluginExecutionFunctionAbi,\n functionName: \"executeWithSessionKey\",\n args\n });\n },\n encodeAddSessionKey({ args }) {\n return encodeFunctionData({\n abi: SessionKeyPluginExecutionFunctionAbi,\n functionName: \"addSessionKey\",\n args\n });\n },\n encodeRemoveSessionKey({ args }) {\n return encodeFunctionData({\n abi: SessionKeyPluginExecutionFunctionAbi,\n functionName: \"removeSessionKey\",\n args\n });\n },\n encodeRotateSessionKey({ args }) {\n return encodeFunctionData({\n abi: SessionKeyPluginExecutionFunctionAbi,\n functionName: \"rotateSessionKey\",\n args\n });\n },\n encodeUpdateKeyPermissions({ args }) {\n return encodeFunctionData({\n abi: SessionKeyPluginExecutionFunctionAbi,\n functionName: \"updateKeyPermissions\",\n args\n });\n }\n });\n SessionKeyPluginExecutionFunctionAbi = [\n {\n type: \"function\",\n name: \"executeWithSessionKey\",\n inputs: [\n {\n name: \"calls\",\n type: \"tuple[]\",\n internalType: \"struct Call[]\",\n components: [\n { name: \"target\", type: \"address\", internalType: \"address\" },\n { name: \"value\", type: \"uint256\", internalType: \"uint256\" },\n { name: \"data\", type: \"bytes\", internalType: \"bytes\" }\n ]\n },\n { name: \"sessionKey\", type: \"address\", internalType: \"address\" }\n ],\n outputs: [{ name: \"\", type: \"bytes[]\", internalType: \"bytes[]\" }],\n stateMutability: \"nonpayable\"\n },\n {\n type: \"function\",\n name: \"addSessionKey\",\n inputs: [\n { name: \"sessionKey\", type: \"address\", internalType: \"address\" },\n { name: \"tag\", type: \"bytes32\", internalType: \"bytes32\" },\n { name: \"permissionUpdates\", type: \"bytes[]\", internalType: \"bytes[]\" }\n ],\n outputs: [],\n stateMutability: \"nonpayable\"\n },\n {\n type: \"function\",\n name: \"removeSessionKey\",\n inputs: [\n { name: \"sessionKey\", type: \"address\", internalType: \"address\" },\n { name: \"predecessor\", type: \"bytes32\", internalType: \"bytes32\" }\n ],\n outputs: [],\n stateMutability: \"nonpayable\"\n },\n {\n type: \"function\",\n name: \"rotateSessionKey\",\n inputs: [\n { name: \"oldSessionKey\", type: \"address\", internalType: \"address\" },\n { name: \"predecessor\", type: \"bytes32\", internalType: \"bytes32\" },\n { name: \"newSessionKey\", type: \"address\", internalType: \"address\" }\n ],\n outputs: [],\n stateMutability: \"nonpayable\"\n },\n {\n type: \"function\",\n name: \"updateKeyPermissions\",\n inputs: [\n { name: \"sessionKey\", type: \"address\", internalType: \"address\" },\n { name: \"updates\", type: \"bytes[]\", internalType: \"bytes[]\" }\n ],\n outputs: [],\n stateMutability: \"nonpayable\"\n }\n ];\n SessionKeyPluginAbi = [\n {\n type: \"function\",\n name: \"addSessionKey\",\n inputs: [\n { name: \"sessionKey\", type: \"address\", internalType: \"address\" },\n { name: \"tag\", type: \"bytes32\", internalType: \"bytes32\" },\n { name: \"permissionUpdates\", type: \"bytes[]\", internalType: \"bytes[]\" }\n ],\n outputs: [],\n stateMutability: \"nonpayable\"\n },\n {\n type: \"function\",\n name: \"executeWithSessionKey\",\n inputs: [\n {\n name: \"calls\",\n type: \"tuple[]\",\n internalType: \"struct Call[]\",\n components: [\n { name: \"target\", type: \"address\", internalType: \"address\" },\n { name: \"value\", type: \"uint256\", internalType: \"uint256\" },\n { name: \"data\", type: \"bytes\", internalType: \"bytes\" }\n ]\n },\n { name: \"sessionKey\", type: \"address\", internalType: \"address\" }\n ],\n outputs: [{ name: \"\", type: \"bytes[]\", internalType: \"bytes[]\" }],\n stateMutability: \"nonpayable\"\n },\n {\n type: \"function\",\n name: \"findPredecessor\",\n inputs: [\n { name: \"account\", type: \"address\", internalType: \"address\" },\n { name: \"sessionKey\", type: \"address\", internalType: \"address\" }\n ],\n outputs: [{ name: \"\", type: \"bytes32\", internalType: \"bytes32\" }],\n stateMutability: \"view\"\n },\n {\n type: \"function\",\n name: \"getAccessControlEntry\",\n inputs: [\n { name: \"account\", type: \"address\", internalType: \"address\" },\n { name: \"sessionKey\", type: \"address\", internalType: \"address\" },\n { name: \"contractAddress\", type: \"address\", internalType: \"address\" }\n ],\n outputs: [\n { name: \"isOnList\", type: \"bool\", internalType: \"bool\" },\n { name: \"checkSelectors\", type: \"bool\", internalType: \"bool\" }\n ],\n stateMutability: \"view\"\n },\n {\n type: \"function\",\n name: \"getAccessControlType\",\n inputs: [\n { name: \"account\", type: \"address\", internalType: \"address\" },\n { name: \"sessionKey\", type: \"address\", internalType: \"address\" }\n ],\n outputs: [\n {\n name: \"\",\n type: \"uint8\",\n internalType: \"enum ISessionKeyPlugin.ContractAccessControlType\"\n }\n ],\n stateMutability: \"view\"\n },\n {\n type: \"function\",\n name: \"getERC20SpendLimitInfo\",\n inputs: [\n { name: \"account\", type: \"address\", internalType: \"address\" },\n { name: \"sessionKey\", type: \"address\", internalType: \"address\" },\n { name: \"token\", type: \"address\", internalType: \"address\" }\n ],\n outputs: [\n {\n name: \"\",\n type: \"tuple\",\n internalType: \"struct ISessionKeyPlugin.SpendLimitInfo\",\n components: [\n { name: \"hasLimit\", type: \"bool\", internalType: \"bool\" },\n { name: \"limit\", type: \"uint256\", internalType: \"uint256\" },\n { name: \"limitUsed\", type: \"uint256\", internalType: \"uint256\" },\n { name: \"refreshInterval\", type: \"uint48\", internalType: \"uint48\" },\n { name: \"lastUsedTime\", type: \"uint48\", internalType: \"uint48\" }\n ]\n }\n ],\n stateMutability: \"view\"\n },\n {\n type: \"function\",\n name: \"getGasSpendLimit\",\n inputs: [\n { name: \"account\", type: \"address\", internalType: \"address\" },\n { name: \"sessionKey\", type: \"address\", internalType: \"address\" }\n ],\n outputs: [\n {\n name: \"info\",\n type: \"tuple\",\n internalType: \"struct ISessionKeyPlugin.SpendLimitInfo\",\n components: [\n { name: \"hasLimit\", type: \"bool\", internalType: \"bool\" },\n { name: \"limit\", type: \"uint256\", internalType: \"uint256\" },\n { name: \"limitUsed\", type: \"uint256\", internalType: \"uint256\" },\n { name: \"refreshInterval\", type: \"uint48\", internalType: \"uint48\" },\n { name: \"lastUsedTime\", type: \"uint48\", internalType: \"uint48\" }\n ]\n },\n { name: \"shouldReset\", type: \"bool\", internalType: \"bool\" }\n ],\n stateMutability: \"view\"\n },\n {\n type: \"function\",\n name: \"getKeyTimeRange\",\n inputs: [\n { name: \"account\", type: \"address\", internalType: \"address\" },\n { name: \"sessionKey\", type: \"address\", internalType: \"address\" }\n ],\n outputs: [\n { name: \"validAfter\", type: \"uint48\", internalType: \"uint48\" },\n { name: \"validUntil\", type: \"uint48\", internalType: \"uint48\" }\n ],\n stateMutability: \"view\"\n },\n {\n type: \"function\",\n name: \"getNativeTokenSpendLimitInfo\",\n inputs: [\n { name: \"account\", type: \"address\", internalType: \"address\" },\n { name: \"sessionKey\", type: \"address\", internalType: \"address\" }\n ],\n outputs: [\n {\n name: \"info\",\n type: \"tuple\",\n internalType: \"struct ISessionKeyPlugin.SpendLimitInfo\",\n components: [\n { name: \"hasLimit\", type: \"bool\", internalType: \"bool\" },\n { name: \"limit\", type: \"uint256\", internalType: \"uint256\" },\n { name: \"limitUsed\", type: \"uint256\", internalType: \"uint256\" },\n { name: \"refreshInterval\", type: \"uint48\", internalType: \"uint48\" },\n { name: \"lastUsedTime\", type: \"uint48\", internalType: \"uint48\" }\n ]\n }\n ],\n stateMutability: \"view\"\n },\n {\n type: \"function\",\n name: \"getRequiredPaymaster\",\n inputs: [\n { name: \"account\", type: \"address\", internalType: \"address\" },\n { name: \"sessionKey\", type: \"address\", internalType: \"address\" }\n ],\n outputs: [{ name: \"\", type: \"address\", internalType: \"address\" }],\n stateMutability: \"view\"\n },\n {\n type: \"function\",\n name: \"isSelectorOnAccessControlList\",\n inputs: [\n { name: \"account\", type: \"address\", internalType: \"address\" },\n { name: \"sessionKey\", type: \"address\", internalType: \"address\" },\n { name: \"contractAddress\", type: \"address\", internalType: \"address\" },\n { name: \"selector\", type: \"bytes4\", internalType: \"bytes4\" }\n ],\n outputs: [{ name: \"isOnList\", type: \"bool\", internalType: \"bool\" }],\n stateMutability: \"view\"\n },\n {\n type: \"function\",\n name: \"isSessionKeyOf\",\n inputs: [\n { name: \"account\", type: \"address\", internalType: \"address\" },\n { name: \"sessionKey\", type: \"address\", internalType: \"address\" }\n ],\n outputs: [{ name: \"\", type: \"bool\", internalType: \"bool\" }],\n stateMutability: \"view\"\n },\n {\n type: \"function\",\n name: \"onInstall\",\n inputs: [{ name: \"data\", type: \"bytes\", internalType: \"bytes\" }],\n outputs: [],\n stateMutability: \"nonpayable\"\n },\n {\n type: \"function\",\n name: \"onUninstall\",\n inputs: [{ name: \"\", type: \"bytes\", internalType: \"bytes\" }],\n outputs: [],\n stateMutability: \"nonpayable\"\n },\n {\n type: \"function\",\n name: \"pluginManifest\",\n inputs: [],\n outputs: [\n {\n name: \"\",\n type: \"tuple\",\n internalType: \"struct PluginManifest\",\n components: [\n { name: \"interfaceIds\", type: \"bytes4[]\", internalType: \"bytes4[]\" },\n {\n name: \"dependencyInterfaceIds\",\n type: \"bytes4[]\",\n internalType: \"bytes4[]\"\n },\n {\n name: \"executionFunctions\",\n type: \"bytes4[]\",\n internalType: \"bytes4[]\"\n },\n {\n name: \"permittedExecutionSelectors\",\n type: \"bytes4[]\",\n internalType: \"bytes4[]\"\n },\n {\n name: \"permitAnyExternalAddress\",\n type: \"bool\",\n internalType: \"bool\"\n },\n { name: \"canSpendNativeToken\", type: \"bool\", internalType: \"bool\" },\n {\n name: \"permittedExternalCalls\",\n type: \"tuple[]\",\n internalType: \"struct ManifestExternalCallPermission[]\",\n components: [\n {\n name: \"externalAddress\",\n type: \"address\",\n internalType: \"address\"\n },\n { name: \"permitAnySelector\", type: \"bool\", internalType: \"bool\" },\n { name: \"selectors\", type: \"bytes4[]\", internalType: \"bytes4[]\" }\n ]\n },\n {\n name: \"userOpValidationFunctions\",\n type: \"tuple[]\",\n internalType: \"struct ManifestAssociatedFunction[]\",\n components: [\n {\n name: \"executionSelector\",\n type: \"bytes4\",\n internalType: \"bytes4\"\n },\n {\n name: \"associatedFunction\",\n type: \"tuple\",\n internalType: \"struct ManifestFunction\",\n components: [\n {\n name: \"functionType\",\n type: \"uint8\",\n internalType: \"enum ManifestAssociatedFunctionType\"\n },\n { name: \"functionId\", type: \"uint8\", internalType: \"uint8\" },\n {\n name: \"dependencyIndex\",\n type: \"uint256\",\n internalType: \"uint256\"\n }\n ]\n }\n ]\n },\n {\n name: \"runtimeValidationFunctions\",\n type: \"tuple[]\",\n internalType: \"struct ManifestAssociatedFunction[]\",\n components: [\n {\n name: \"executionSelector\",\n type: \"bytes4\",\n internalType: \"bytes4\"\n },\n {\n name: \"associatedFunction\",\n type: \"tuple\",\n internalType: \"struct ManifestFunction\",\n components: [\n {\n name: \"functionType\",\n type: \"uint8\",\n internalType: \"enum ManifestAssociatedFunctionType\"\n },\n { name: \"functionId\", type: \"uint8\", internalType: \"uint8\" },\n {\n name: \"dependencyIndex\",\n type: \"uint256\",\n internalType: \"uint256\"\n }\n ]\n }\n ]\n },\n {\n name: \"preUserOpValidationHooks\",\n type: \"tuple[]\",\n internalType: \"struct ManifestAssociatedFunction[]\",\n components: [\n {\n name: \"executionSelector\",\n type: \"bytes4\",\n internalType: \"bytes4\"\n },\n {\n name: \"associatedFunction\",\n type: \"tuple\",\n internalType: \"struct ManifestFunction\",\n components: [\n {\n name: \"functionType\",\n type: \"uint8\",\n internalType: \"enum ManifestAssociatedFunctionType\"\n },\n { name: \"functionId\", type: \"uint8\", internalType: \"uint8\" },\n {\n name: \"dependencyIndex\",\n type: \"uint256\",\n internalType: \"uint256\"\n }\n ]\n }\n ]\n },\n {\n name: \"preRuntimeValidationHooks\",\n type: \"tuple[]\",\n internalType: \"struct ManifestAssociatedFunction[]\",\n components: [\n {\n name: \"executionSelector\",\n type: \"bytes4\",\n internalType: \"bytes4\"\n },\n {\n name: \"associatedFunction\",\n type: \"tuple\",\n internalType: \"struct ManifestFunction\",\n components: [\n {\n name: \"functionType\",\n type: \"uint8\",\n internalType: \"enum ManifestAssociatedFunctionType\"\n },\n { name: \"functionId\", type: \"uint8\", internalType: \"uint8\" },\n {\n name: \"dependencyIndex\",\n type: \"uint256\",\n internalType: \"uint256\"\n }\n ]\n }\n ]\n },\n {\n name: \"executionHooks\",\n type: \"tuple[]\",\n internalType: \"struct ManifestExecutionHook[]\",\n components: [\n {\n name: \"executionSelector\",\n type: \"bytes4\",\n internalType: \"bytes4\"\n },\n {\n name: \"preExecHook\",\n type: \"tuple\",\n internalType: \"struct ManifestFunction\",\n components: [\n {\n name: \"functionType\",\n type: \"uint8\",\n internalType: \"enum ManifestAssociatedFunctionType\"\n },\n { name: \"functionId\", type: \"uint8\", internalType: \"uint8\" },\n {\n name: \"dependencyIndex\",\n type: \"uint256\",\n internalType: \"uint256\"\n }\n ]\n },\n {\n name: \"postExecHook\",\n type: \"tuple\",\n internalType: \"struct ManifestFunction\",\n components: [\n {\n name: \"functionType\",\n type: \"uint8\",\n internalType: \"enum ManifestAssociatedFunctionType\"\n },\n { name: \"functionId\", type: \"uint8\", internalType: \"uint8\" },\n {\n name: \"dependencyIndex\",\n type: \"uint256\",\n internalType: \"uint256\"\n }\n ]\n }\n ]\n }\n ]\n }\n ],\n stateMutability: \"pure\"\n },\n {\n type: \"function\",\n name: \"pluginMetadata\",\n inputs: [],\n outputs: [\n {\n name: \"\",\n type: \"tuple\",\n internalType: \"struct PluginMetadata\",\n components: [\n { name: \"name\", type: \"string\", internalType: \"string\" },\n { name: \"version\", type: \"string\", internalType: \"string\" },\n { name: \"author\", type: \"string\", internalType: \"string\" },\n {\n name: \"permissionDescriptors\",\n type: \"tuple[]\",\n internalType: \"struct SelectorPermission[]\",\n components: [\n {\n name: \"functionSelector\",\n type: \"bytes4\",\n internalType: \"bytes4\"\n },\n {\n name: \"permissionDescription\",\n type: \"string\",\n internalType: \"string\"\n }\n ]\n }\n ]\n }\n ],\n stateMutability: \"pure\"\n },\n {\n type: \"function\",\n name: \"postExecutionHook\",\n inputs: [\n { name: \"functionId\", type: \"uint8\", internalType: \"uint8\" },\n { name: \"preExecHookData\", type: \"bytes\", internalType: \"bytes\" }\n ],\n outputs: [],\n stateMutability: \"nonpayable\"\n },\n {\n type: \"function\",\n name: \"preExecutionHook\",\n inputs: [\n { name: \"functionId\", type: \"uint8\", internalType: \"uint8\" },\n { name: \"sender\", type: \"address\", internalType: \"address\" },\n { name: \"value\", type: \"uint256\", internalType: \"uint256\" },\n { name: \"data\", type: \"bytes\", internalType: \"bytes\" }\n ],\n outputs: [{ name: \"\", type: \"bytes\", internalType: \"bytes\" }],\n stateMutability: \"nonpayable\"\n },\n {\n type: \"function\",\n name: \"preRuntimeValidationHook\",\n inputs: [\n { name: \"functionId\", type: \"uint8\", internalType: \"uint8\" },\n { name: \"sender\", type: \"address\", internalType: \"address\" },\n { name: \"value\", type: \"uint256\", internalType: \"uint256\" },\n { name: \"data\", type: \"bytes\", internalType: \"bytes\" }\n ],\n outputs: [],\n stateMutability: \"nonpayable\"\n },\n {\n type: \"function\",\n name: \"preUserOpValidationHook\",\n inputs: [\n { name: \"functionId\", type: \"uint8\", internalType: \"uint8\" },\n {\n name: \"userOp\",\n type: \"tuple\",\n internalType: \"struct UserOperation\",\n components: [\n { name: \"sender\", type: \"address\", internalType: \"address\" },\n { name: \"nonce\", type: \"uint256\", internalType: \"uint256\" },\n { name: \"initCode\", type: \"bytes\", internalType: \"bytes\" },\n { name: \"callData\", type: \"bytes\", internalType: \"bytes\" },\n { name: \"callGasLimit\", type: \"uint256\", internalType: \"uint256\" },\n {\n name: \"verificationGasLimit\",\n type: \"uint256\",\n internalType: \"uint256\"\n },\n {\n name: \"preVerificationGas\",\n type: \"uint256\",\n internalType: \"uint256\"\n },\n { name: \"maxFeePerGas\", type: \"uint256\", internalType: \"uint256\" },\n {\n name: \"maxPriorityFeePerGas\",\n type: \"uint256\",\n internalType: \"uint256\"\n },\n { name: \"paymasterAndData\", type: \"bytes\", internalType: \"bytes\" },\n { name: \"signature\", type: \"bytes\", internalType: \"bytes\" }\n ]\n },\n { name: \"userOpHash\", type: \"bytes32\", internalType: \"bytes32\" }\n ],\n outputs: [{ name: \"\", type: \"uint256\", internalType: \"uint256\" }],\n stateMutability: \"nonpayable\"\n },\n {\n type: \"function\",\n name: \"removeSessionKey\",\n inputs: [\n { name: \"sessionKey\", type: \"address\", internalType: \"address\" },\n { name: \"predecessor\", type: \"bytes32\", internalType: \"bytes32\" }\n ],\n outputs: [],\n stateMutability: \"nonpayable\"\n },\n {\n type: \"function\",\n name: \"resetSessionKeyGasLimitTimestamp\",\n inputs: [\n { name: \"account\", type: \"address\", internalType: \"address\" },\n { name: \"sessionKey\", type: \"address\", internalType: \"address\" }\n ],\n outputs: [],\n stateMutability: \"nonpayable\"\n },\n {\n type: \"function\",\n name: \"rotateSessionKey\",\n inputs: [\n { name: \"oldSessionKey\", type: \"address\", internalType: \"address\" },\n { name: \"predecessor\", type: \"bytes32\", internalType: \"bytes32\" },\n { name: \"newSessionKey\", type: \"address\", internalType: \"address\" }\n ],\n outputs: [],\n stateMutability: \"nonpayable\"\n },\n {\n type: \"function\",\n name: \"runtimeValidationFunction\",\n inputs: [\n { name: \"functionId\", type: \"uint8\", internalType: \"uint8\" },\n { name: \"sender\", type: \"address\", internalType: \"address\" },\n { name: \"value\", type: \"uint256\", internalType: \"uint256\" },\n { name: \"data\", type: \"bytes\", internalType: \"bytes\" }\n ],\n outputs: [],\n stateMutability: \"nonpayable\"\n },\n {\n type: \"function\",\n name: \"sessionKeysOf\",\n inputs: [{ name: \"account\", type: \"address\", internalType: \"address\" }],\n outputs: [{ name: \"\", type: \"address[]\", internalType: \"address[]\" }],\n stateMutability: \"view\"\n },\n {\n type: \"function\",\n name: \"supportsInterface\",\n inputs: [{ name: \"interfaceId\", type: \"bytes4\", internalType: \"bytes4\" }],\n outputs: [{ name: \"\", type: \"bool\", internalType: \"bool\" }],\n stateMutability: \"view\"\n },\n {\n type: \"function\",\n name: \"updateKeyPermissions\",\n inputs: [\n { name: \"sessionKey\", type: \"address\", internalType: \"address\" },\n { name: \"updates\", type: \"bytes[]\", internalType: \"bytes[]\" }\n ],\n outputs: [],\n stateMutability: \"nonpayable\"\n },\n {\n type: \"function\",\n name: \"userOpValidationFunction\",\n inputs: [\n { name: \"functionId\", type: \"uint8\", internalType: \"uint8\" },\n {\n name: \"userOp\",\n type: \"tuple\",\n internalType: \"struct UserOperation\",\n components: [\n { name: \"sender\", type: \"address\", internalType: \"address\" },\n { name: \"nonce\", type: \"uint256\", internalType: \"uint256\" },\n { name: \"initCode\", type: \"bytes\", internalType: \"bytes\" },\n { name: \"callData\", type: \"bytes\", internalType: \"bytes\" },\n { name: \"callGasLimit\", type: \"uint256\", internalType: \"uint256\" },\n {\n name: \"verificationGasLimit\",\n type: \"uint256\",\n internalType: \"uint256\"\n },\n {\n name: \"preVerificationGas\",\n type: \"uint256\",\n internalType: \"uint256\"\n },\n { name: \"maxFeePerGas\", type: \"uint256\", internalType: \"uint256\" },\n {\n name: \"maxPriorityFeePerGas\",\n type: \"uint256\",\n internalType: \"uint256\"\n },\n { name: \"paymasterAndData\", type: \"bytes\", internalType: \"bytes\" },\n { name: \"signature\", type: \"bytes\", internalType: \"bytes\" }\n ]\n },\n { name: \"userOpHash\", type: \"bytes32\", internalType: \"bytes32\" }\n ],\n outputs: [{ name: \"\", type: \"uint256\", internalType: \"uint256\" }],\n stateMutability: \"nonpayable\"\n },\n {\n type: \"event\",\n name: \"PermissionsUpdated\",\n inputs: [\n {\n name: \"account\",\n type: \"address\",\n indexed: true,\n internalType: \"address\"\n },\n {\n name: \"sessionKey\",\n type: \"address\",\n indexed: true,\n internalType: \"address\"\n },\n {\n name: \"updates\",\n type: \"bytes[]\",\n indexed: false,\n internalType: \"bytes[]\"\n }\n ],\n anonymous: false\n },\n {\n type: \"event\",\n name: \"SessionKeyAdded\",\n inputs: [\n {\n name: \"account\",\n type: \"address\",\n indexed: true,\n internalType: \"address\"\n },\n {\n name: \"sessionKey\",\n type: \"address\",\n indexed: true,\n internalType: \"address\"\n },\n { name: \"tag\", type: \"bytes32\", indexed: true, internalType: \"bytes32\" }\n ],\n anonymous: false\n },\n {\n type: \"event\",\n name: \"SessionKeyRemoved\",\n inputs: [\n {\n name: \"account\",\n type: \"address\",\n indexed: true,\n internalType: \"address\"\n },\n {\n name: \"sessionKey\",\n type: \"address\",\n indexed: true,\n internalType: \"address\"\n }\n ],\n anonymous: false\n },\n {\n type: \"event\",\n name: \"SessionKeyRotated\",\n inputs: [\n {\n name: \"account\",\n type: \"address\",\n indexed: true,\n internalType: \"address\"\n },\n {\n name: \"oldSessionKey\",\n type: \"address\",\n indexed: true,\n internalType: \"address\"\n },\n {\n name: \"newSessionKey\",\n type: \"address\",\n indexed: true,\n internalType: \"address\"\n }\n ],\n anonymous: false\n },\n { type: \"error\", name: \"AlreadyInitialized\", inputs: [] },\n {\n type: \"error\",\n name: \"ERC20SpendLimitExceeded\",\n inputs: [\n { name: \"account\", type: \"address\", internalType: \"address\" },\n { name: \"sessionKey\", type: \"address\", internalType: \"address\" },\n { name: \"token\", type: \"address\", internalType: \"address\" }\n ]\n },\n { type: \"error\", name: \"InvalidAction\", inputs: [] },\n {\n type: \"error\",\n name: \"InvalidPermissionsUpdate\",\n inputs: [\n { name: \"updateSelector\", type: \"bytes4\", internalType: \"bytes4\" }\n ]\n },\n {\n type: \"error\",\n name: \"InvalidSessionKey\",\n inputs: [{ name: \"sessionKey\", type: \"address\", internalType: \"address\" }]\n },\n {\n type: \"error\",\n name: \"InvalidSignature\",\n inputs: [{ name: \"sessionKey\", type: \"address\", internalType: \"address\" }]\n },\n {\n type: \"error\",\n name: \"InvalidToken\",\n inputs: [{ name: \"token\", type: \"address\", internalType: \"address\" }]\n },\n { type: \"error\", name: \"LengthMismatch\", inputs: [] },\n {\n type: \"error\",\n name: \"NativeTokenSpendLimitExceeded\",\n inputs: [\n { name: \"account\", type: \"address\", internalType: \"address\" },\n { name: \"sessionKey\", type: \"address\", internalType: \"address\" }\n ]\n },\n {\n type: \"error\",\n name: \"NotContractCaller\",\n inputs: [{ name: \"caller\", type: \"address\", internalType: \"address\" }]\n },\n {\n type: \"error\",\n name: \"NotImplemented\",\n inputs: [\n { name: \"selector\", type: \"bytes4\", internalType: \"bytes4\" },\n { name: \"functionId\", type: \"uint8\", internalType: \"uint8\" }\n ]\n },\n { type: \"error\", name: \"NotInitialized\", inputs: [] },\n {\n type: \"error\",\n name: \"SessionKeyNotFound\",\n inputs: [{ name: \"sessionKey\", type: \"address\", internalType: \"address\" }]\n }\n ];\n }\n });\n\n // ../../../node_modules/.pnpm/@account-kit+smart-contracts@4.62.0_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5._65dee0153d50ca3a2d2c6830319271d9/node_modules/@account-kit/smart-contracts/dist/esm/src/msca/plugins/session-key/utils.js\n async function buildSessionKeysToRemoveStruct(client, args) {\n const { keys, pluginAddress, account = client.account } = args;\n if (!account)\n throw new AccountNotFoundError2();\n const contract = SessionKeyPlugin.getContract(client, pluginAddress);\n return (await Promise.all(keys.map(async (key) => {\n return [\n key,\n await contract.read.findPredecessor([account.address, key])\n ];\n }))).map(([key, predecessor]) => ({\n sessionKey: key,\n predecessor\n }));\n }\n var init_utils14 = __esm({\n \"../../../node_modules/.pnpm/@account-kit+smart-contracts@4.62.0_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5._65dee0153d50ca3a2d2c6830319271d9/node_modules/@account-kit/smart-contracts/dist/esm/src/msca/plugins/session-key/utils.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_esm6();\n init_plugin3();\n }\n });\n\n // ../../../node_modules/.pnpm/@account-kit+smart-contracts@4.62.0_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5._65dee0153d50ca3a2d2c6830319271d9/node_modules/@account-kit/smart-contracts/dist/esm/src/msca/plugins/session-key/debug-session-key-bytecode.js\n var debug_session_key_bytecode_exports = {};\n __export(debug_session_key_bytecode_exports, {\n DEBUG_SESSION_KEY_BYTECODE: () => DEBUG_SESSION_KEY_BYTECODE\n });\n var DEBUG_SESSION_KEY_BYTECODE;\n var init_debug_session_key_bytecode = __esm({\n \"../../../node_modules/.pnpm/@account-kit+smart-contracts@4.62.0_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5._65dee0153d50ca3a2d2c6830319271d9/node_modules/@account-kit/smart-contracts/dist/esm/src/msca/plugins/session-key/debug-session-key-bytecode.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n DEBUG_SESSION_KEY_BYTECODE = \"0x6040608081526004908136101561001557600080fd5b6000803560e01c806331d99c2c146100975763af8734831461003657600080fd5b34610090576003196060368201126100935783359160ff83168303610090576024359167ffffffffffffffff831161009357610160908336030112610090575092610089916020946044359201906106ed565b9051908152f35b80fd5b5080fd5b50823461009357826003193601126100935767ffffffffffffffff81358181116105255736602382011215610525578083013590828211610521576024926024820191602436918560051b01011161051d576001600160a01b0394602435868116810361051957604080516080810182526060808252336020830190815263068076b960e21b938301939093526001600160a01b039093169083015220548761016f8233606091826040516001600160a01b03602082019460808301604052838352168452630b5ff94b60e11b604082015201522090565b91895b87811061045d57505060ff825460781c16156103ef575b5080549060ff8260801c166103b6575b50506101a88497959894610584565b956101b58551978861054c565b8787526101c188610584565b98602098601f19809b01885b8181106103a7575050875b818110610256575050505050505080519380850191818652845180935281818701918460051b880101950193965b8388106102135786860387f35b9091929394838080600193603f198b820301875285601f8b5161024181518092818752878088019101610529565b01160101970193019701969093929193610206565b6102668183899e9b9d9a9e61059c565b803585811680910361039557908c8a928f898e610285838701876105d9565b9790935196879586947f38997b1100000000000000000000000000000000000000000000000000000000865285015201358a83015260606044830152866064830152866084938484013784838884010152601f80970116810103018183335af191821561039d578d9261031a575b505090600191610303828d610628565b5261030e818c610628565b50019a9699979a6101d8565b9091503d808e843e61032c818461054c565b8201918a818403126103915780519089821161039957019081018213156103955790818e92519161036861035f8461060c565b9451948561054c565b8284528b8383010111610391578291610389918c8060019796019101610529565b90918e6102f3565b8d80fd5b8c80fd5b8e80fd5b8e513d8f823e3d90fd5b60608b82018d01528b016101cd565b70ff00000000000000000000000000000000199091168155600101805465ffffffffffff19164265ffffffffffff161790558880610199565b6104029060068301906002840190611191565b1561040d5789610189565b610459828a5191829162461bcd60e51b8352820160609060208152601460208201527f5370656e64206c696d697420657863656564656400000000000000000000000060408201520190565b0390fd5b6104713661046c838b8b61059c565b610673565b926104826020918286015190611042565b938d6104928d83511686336110b0565b9160ff835460101c166104ac575b50505050600101610172565b6104ca92916104bc910151611146565b600160028301920190611191565b156104d757808d816104a0565b85601a8b8f93606494519362461bcd60e51b85528401528201527f4552433230207370656e64206c696d69742065786365656465640000000000006044820152fd5b8780fd5b8580fd5b8480fd5b8380fd5b60005b83811061053c5750506000910152565b818101518382015260200161052c565b90601f8019910116810190811067ffffffffffffffff82111761056e57604052565b634e487b7160e01b600052604160045260246000fd5b67ffffffffffffffff811161056e5760051b60200190565b91908110156105c35760051b81013590605e19813603018212156105be570190565b600080fd5b634e487b7160e01b600052603260045260246000fd5b903590601e19813603018212156105be570180359067ffffffffffffffff82116105be576020019181360383136105be57565b67ffffffffffffffff811161056e57601f01601f191660200190565b80518210156105c35760209160051b010190565b9291926106488261060c565b91610656604051938461054c565b8294818452818301116105be578281602093846000960137010152565b91906060838203126105be576040519067ffffffffffffffff606083018181118482101761056e57604052829480356001600160a01b03811681036105be5784526020810135602085015260408101359182116105be570181601f820112156105be576040918160206106e89335910161063c565b910152565b60ff161561073957606460405162461bcd60e51b815260206004820152602060248201527f57726f6e672066756e6374696f6e20696420666f722076616c69646174696f6e6044820152fd5b61074660608201826105d9565b806004949294116105be57830192604081850360031901126105be5767ffffffffffffffff9360048201358581116105be57820194816023870112156105be5760048601359561079587610584565b966107a3604051988961054c565b8088526024602089019160051b830101928484116105be5760248301915b84831061101b5750505050505060240135906001600160a01b03821682036105be577f19457468657265756d205369676e6564204d6573736167653a0a333200000000600052601c52610830603c60002061082a6108236101408601866105d9565b369161063c565b90611065565b600581101561100557610f9c5760806040513381527ff938c976000000000000000000000000000000000000000000000000000000006020820152600160408201526bffffffffffffffffffffffff198460601b166060820152205415610f5857604080516080810182526060808252336020830190815263068076b960e21b938301939093526001600160a01b03851691810191909152902054926109058433606091826040516001600160a01b03602082019460808301604052838352168452630b5ff94b60e11b604082015201522090565b9081549465ffffffffffff8660081c16966000918151918215610f145760005b838110610ed2575050505060ff8660781c1615610d50575b5060ff8560701c16610aa8575b60ff825460681c166109db575b50506001600160a01b039182169116036109a85765ffffffffffff60a01b7fffffffffffff00000000000000000000000000000000000000000000000000006000935b60d01b169160681b16171790565b65ffffffffffff60a01b7fffffffffffff000000000000000000000000000000000000000000000000000060019361099a565b806101206109ea9201906105d9565b6bffffffffffffffffffffffff199135918216929160148210610a6c575b505060036001600160a01b03910154169060601c03610a28573880610957565b606460405162461bcd60e51b815260206004820152601b60248201527f4d75737420757365207265717569726564207061796d617374657200000000006044820152fd5b6001600160a01b03929350906003916bffffffffffffffffffffffff19916bffffffffffffffffffffffff1990601403841b1b16169291610a08565b946001600160a01b038416602087013560401c03610cc057610ace6101208701876105d9565b159050610cab57610b11610b06610afb610af160ff60035b1660a08b013561109d565b60808a0135611042565b60c089013590611042565b60e08801359061109d565b9060009060018401546005850154906004860154908583810110610c675765ffffffffffff8160301c1615600014610ba6575081850111610b6157610b5b9301600585015561154f565b9461094a565b60405162461bcd60e51b815260206004820152601260248201527f476173206c696d697420657863656564656400000000000000000000000000006044820152606490fd5b92935093848282011115600014610bf657610b5b945001600585015560ff8760801c16600014610bee578065ffffffffffff80610be89360301c169116611177565b9061154f565b506000610be8565b809392949150111580610c59575b15610b6157610c248365ffffffffffff80610b5b9660301c169116611177565b9170010000000000000000000000000000000070ff00000000000000000000000000000000198916178555600585015561154f565b5060ff8760801c1615610c04565b606460405162461bcd60e51b815260206004820152601260248201527f476173206c696d6974206f766572666c6f7700000000000000000000000000006044820152fd5b610b11610b06610afb610af160ff6001610ae6565b60a460405162461bcd60e51b815260206004820152604f60248201527f4d757374207573652073657373696f6e206b6579206173206b657920706f727460448201527f696f6e206f66206e6f6e6365207768656e20676173206c696d6974206368656360648201527f6b696e6720697320656e61626c656400000000000000000000000000000000006084820152fd5b6000969196906002840154906007850154906006860154928183810110610e8e5765ffffffffffff8160301c1615600014610de157500111610d9c57610d959161154f565b943861093d565b60405162461bcd60e51b815260206004820152601460248201527f5370656e64206c696d69742065786365656465640000000000000000000000006044820152606490fd5b94928092820111610df9575b5050610d95925061154f565b91925010610e2457610e1c8265ffffffffffff80610d959560301c169116611177565b903880610ded565b608460405162461bcd60e51b815260206004820152603260248201527f5370656e64206c696d69742065786365656465642c206576656e20696e636c7560448201527f64696e67206e65787420696e74657276616c00000000000000000000000000006064820152fd5b606460405162461bcd60e51b815260206004820152601460248201527f5370656e64206c696d6974206f766572666c6f770000000000000000000000006044820152fd5b80610f0e8b610ef3610ee660019587610628565b519860208a015190611042565b978660ff60406001600160a01b0384511693015193166112bf565b01610925565b606460405162461bcd60e51b815260206004820152601b60248201527f4d7573742068617665206174206c65617374206f6e652063616c6c00000000006044820152fd5b606460405162461bcd60e51b815260206004820152601360248201527f556e6b6e6f776e2073657373696f6e206b6579000000000000000000000000006044820152fd5b608460405162461bcd60e51b8152602060048201526024808201527f5369676e617475726520646f6573206e6f74206d617463682073657373696f6e60448201527f206b6579000000000000000000000000000000000000000000000000000000006064820152fd5b634e487b7160e01b600052602160045260246000fd5b82358281116105be576020916110378860248594890101610673565b8152019201916107c1565b9190820180921161104f57565b634e487b7160e01b600052601160045260246000fd5b9060418151146000146110935761108f916020820151906060604084015193015160001a90611230565b9091565b5050600090600290565b8181029291811591840414171561104f57565b9061111192916040519260a08401604052608084526001600160a01b0380921660208501527f634c29f50000000000000000000000000000000000000000000000000000000060408501521690606083015260808201526020815191012090565b90565b90602082519201516001600160e01b031990818116936004811061113757505050565b60040360031b82901b16169150565b61115761115282611114565b61156c565b6111615750600090565b6044815110611171576044015190565b50600090565b91909165ffffffffffff8080941691160191821161104f57565b9181549165ffffffffffff90818460301c169160018454940194855493828115928315611218575b5050506000146111ee57505083019283109081156111e4575b506111dd5755600190565b5050600090565b90508211386111d2565b9391509391821161120f5755421665ffffffffffff19825416179055600190565b50505050600090565b611223935016611177565b81429116113882816111b9565b9291907f7fffffffffffffffffffffffffffffff5d576e7357a4501ddfe92f46681b20a083116112b35791608094939160ff602094604051948552168484015260408301526060820152600093849182805260015afa156112a65781516001600160a01b038116156112a0579190565b50600190565b50604051903d90823e3d90fd5b50505050600090600390565b91926112ca90611114565b926112d68183336110b0565b926003811015611005578061147d5750825460ff8116156114395760081c60ff1615611433578361130a9160ff93336115cb565b5416156113c95760ff905b5460101c1690816113b8575b5061132857565b60a460405162461bcd60e51b815260206004820152604460248201527f46756e6374696f6e2073656c6563746f72206e6f7420616c6c6f77656420666f60448201527f7220455243323020636f6e74726163742077697468207370656e64696e67206c60648201527f696d6974000000000000000000000000000000000000000000000000000000006084820152fd5b6113c2915061156c565b1538611321565b608460405162461bcd60e51b815260206004820152602260248201527f46756e6374696f6e2073656c6563746f72206e6f74206f6e20616c6c6f776c6960448201527f73740000000000000000000000000000000000000000000000000000000000006064820152fd5b50505050565b606460405162461bcd60e51b815260206004820152601f60248201527f5461726765742061646472657373206e6f74206f6e20616c6c6f776c697374006044820152fd5b60011461148f575b505060ff90611315565b825460ff8116156115485760081c60ff161561150457836114b39160ff93336115cb565b54166114c0573880611485565b606460405162461bcd60e51b815260206004820152601d60248201527f46756e6374696f6e2073656c6563746f72206f6e2064656e796c6973740000006044820152fd5b606460405162461bcd60e51b815260206004820152601a60248201527f5461726765742061646472657373206f6e2064656e796c6973740000000000006044820152fd5b5050505050565b9065ffffffffffff8082169083161115611567575090565b905090565b6001600160e01b0319167fa9059cbb0000000000000000000000000000000000000000000000000000000081149081156115a4575090565b7f095ea7b30000000000000000000000000000000000000000000000000000000091501490565b926001600160e01b0319611111946040519460a08601604052608086526001600160a01b0380921660208701527fd50536f0000000000000000000000000000000000000000000000000000000006040870152169116179060608301526080820152602081519101209056fea26469706673582212201c78177154c86c4d5ed4f532b4017a1d665037d4831a7cd69e8e8bd8408ab3e764736f6c63430008160033\";\n }\n });\n\n // ../../../node_modules/.pnpm/@account-kit+smart-contracts@4.62.0_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5._65dee0153d50ca3a2d2c6830319271d9/node_modules/@account-kit/smart-contracts/dist/esm/src/msca/plugins/session-key/extension.js\n function getRpcErrorMessageFromViemError(error) {\n const details = error?.details;\n return typeof details === \"string\" ? details : void 0;\n }\n var sessionKeyPluginActions2, SessionKeyPermissionError;\n var init_extension3 = __esm({\n \"../../../node_modules/.pnpm/@account-kit+smart-contracts@4.62.0_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5._65dee0153d50ca3a2d2c6830319271d9/node_modules/@account-kit/smart-contracts/dist/esm/src/msca/plugins/session-key/extension.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_esm6();\n init_plugin3();\n init_utils14();\n sessionKeyPluginActions2 = (client) => {\n const { removeSessionKey, addSessionKey, rotateSessionKey, updateKeyPermissions, executeWithSessionKey, ...og } = sessionKeyPluginActions(client);\n const fixedExecuteWithSessionKey = async (...originalArgs) => {\n let initialError;\n try {\n return await executeWithSessionKey(...originalArgs);\n } catch (error) {\n initialError = error;\n }\n const details = getRpcErrorMessageFromViemError(initialError);\n if (!details?.includes(\"AA23 reverted (or OOG)\")) {\n throw initialError;\n }\n if (!isSmartAccountClient(client) || !client.chain) {\n throw initialError;\n }\n const { args, overrides, context: context2, account = client.account } = originalArgs[0];\n if (!account) {\n throw initialError;\n }\n const data = og.encodeExecuteWithSessionKey({ args });\n const sessionKeyPluginAddress = SessionKeyPlugin.meta.addresses[client.chain.id];\n const { DEBUG_SESSION_KEY_BYTECODE: DEBUG_SESSION_KEY_BYTECODE2 } = await Promise.resolve().then(() => (init_debug_session_key_bytecode(), debug_session_key_bytecode_exports));\n const updatedOverrides = {\n ...overrides,\n stateOverride: [\n ...overrides?.stateOverride ?? [],\n {\n address: sessionKeyPluginAddress,\n code: DEBUG_SESSION_KEY_BYTECODE2\n }\n ]\n };\n try {\n await client.buildUserOperation({\n uo: data,\n overrides: updatedOverrides,\n context: context2,\n account\n });\n throw initialError;\n } catch (improvedError) {\n const details2 = getRpcErrorMessageFromViemError(improvedError) ?? \"\";\n const reason = details2.match(/AA23 reverted: (.+)/)?.[1];\n if (!reason) {\n throw initialError;\n }\n throw new SessionKeyPermissionError(reason);\n }\n };\n return {\n ...og,\n executeWithSessionKey: fixedExecuteWithSessionKey,\n isAccountSessionKey: async ({ key, pluginAddress, account = client.account }) => {\n if (!account)\n throw new AccountNotFoundError2();\n const contract = SessionKeyPlugin.getContract(client, pluginAddress);\n return await contract.read.isSessionKeyOf([account.address, key]);\n },\n getAccountSessionKeys: async (args) => {\n const account = args?.account ?? client.account;\n if (!account)\n throw new AccountNotFoundError2();\n const contract = SessionKeyPlugin.getContract(client, args?.pluginAddress);\n return await contract.read.sessionKeysOf([account.address]);\n },\n removeSessionKey: async ({ key, overrides, account = client.account, pluginAddress }) => {\n if (!account)\n throw new AccountNotFoundError2();\n const sessionKeysToRemove = await buildSessionKeysToRemoveStruct(client, {\n keys: [key],\n account,\n pluginAddress\n });\n return removeSessionKey({\n args: [key, sessionKeysToRemove[0].predecessor],\n overrides,\n account\n });\n },\n addSessionKey: async ({ key, tag, permissions, overrides, pluginAddress, account = client.account }) => {\n if (!account)\n throw new AccountNotFoundError2();\n return addSessionKey({\n args: [key, tag, permissions],\n overrides,\n account,\n pluginAddress\n });\n },\n rotateSessionKey: async ({ newKey, oldKey, overrides, pluginAddress, account = client.account }) => {\n if (!account)\n throw new AccountNotFoundError2();\n const contract = SessionKeyPlugin.getContract(client, pluginAddress);\n const predecessor = await contract.read.findPredecessor([\n account.address,\n oldKey\n ]);\n return rotateSessionKey({\n args: [oldKey, predecessor, newKey],\n overrides,\n account,\n pluginAddress\n });\n },\n updateSessionKeyPermissions: async ({ key, permissions, overrides, pluginAddress, account = client.account }) => {\n if (!account)\n throw new AccountNotFoundError2();\n return updateKeyPermissions({\n args: [key, permissions],\n overrides,\n account,\n pluginAddress\n });\n }\n };\n };\n SessionKeyPermissionError = class extends Error {\n };\n }\n });\n\n // ../../../node_modules/.pnpm/@account-kit+smart-contracts@4.62.0_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5._65dee0153d50ca3a2d2c6830319271d9/node_modules/@account-kit/smart-contracts/dist/esm/src/msca/plugins/session-key/SessionKeyPermissionsUpdatesAbi.js\n var SessionKeyPermissionsUpdatesAbi;\n var init_SessionKeyPermissionsUpdatesAbi = __esm({\n \"../../../node_modules/.pnpm/@account-kit+smart-contracts@4.62.0_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5._65dee0153d50ca3a2d2c6830319271d9/node_modules/@account-kit/smart-contracts/dist/esm/src/msca/plugins/session-key/SessionKeyPermissionsUpdatesAbi.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n SessionKeyPermissionsUpdatesAbi = [\n {\n type: \"function\",\n name: \"setAccessListType\",\n inputs: [\n {\n name: \"contractAccessControlType\",\n type: \"uint8\",\n internalType: \"enum ISessionKeyPlugin.ContractAccessControlType\"\n }\n ],\n outputs: [],\n stateMutability: \"nonpayable\"\n },\n {\n type: \"function\",\n name: \"setERC20SpendLimit\",\n inputs: [\n { name: \"token\", type: \"address\", internalType: \"address\" },\n { name: \"spendLimit\", type: \"uint256\", internalType: \"uint256\" },\n {\n name: \"refreshInterval\",\n type: \"uint48\",\n internalType: \"uint48\"\n }\n ],\n outputs: [],\n stateMutability: \"nonpayable\"\n },\n {\n type: \"function\",\n name: \"setGasSpendLimit\",\n inputs: [\n { name: \"spendLimit\", type: \"uint256\", internalType: \"uint256\" },\n {\n name: \"refreshInterval\",\n type: \"uint48\",\n internalType: \"uint48\"\n }\n ],\n outputs: [],\n stateMutability: \"nonpayable\"\n },\n {\n type: \"function\",\n name: \"setNativeTokenSpendLimit\",\n inputs: [\n { name: \"spendLimit\", type: \"uint256\", internalType: \"uint256\" },\n {\n name: \"refreshInterval\",\n type: \"uint48\",\n internalType: \"uint48\"\n }\n ],\n outputs: [],\n stateMutability: \"nonpayable\"\n },\n {\n type: \"function\",\n name: \"setRequiredPaymaster\",\n inputs: [\n {\n name: \"requiredPaymaster\",\n type: \"address\",\n internalType: \"address\"\n }\n ],\n outputs: [],\n stateMutability: \"nonpayable\"\n },\n {\n type: \"function\",\n name: \"updateAccessListAddressEntry\",\n inputs: [\n {\n name: \"contractAddress\",\n type: \"address\",\n internalType: \"address\"\n },\n { name: \"isOnList\", type: \"bool\", internalType: \"bool\" },\n { name: \"checkSelectors\", type: \"bool\", internalType: \"bool\" }\n ],\n outputs: [],\n stateMutability: \"nonpayable\"\n },\n {\n type: \"function\",\n name: \"updateAccessListFunctionEntry\",\n inputs: [\n {\n name: \"contractAddress\",\n type: \"address\",\n internalType: \"address\"\n },\n { name: \"selector\", type: \"bytes4\", internalType: \"bytes4\" },\n { name: \"isOnList\", type: \"bool\", internalType: \"bool\" }\n ],\n outputs: [],\n stateMutability: \"nonpayable\"\n },\n {\n type: \"function\",\n name: \"updateTimeRange\",\n inputs: [\n { name: \"validAfter\", type: \"uint48\", internalType: \"uint48\" },\n { name: \"validUntil\", type: \"uint48\", internalType: \"uint48\" }\n ],\n outputs: [],\n stateMutability: \"nonpayable\"\n }\n ];\n }\n });\n\n // ../../../node_modules/.pnpm/@account-kit+smart-contracts@4.62.0_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5._65dee0153d50ca3a2d2c6830319271d9/node_modules/@account-kit/smart-contracts/dist/esm/src/msca/plugins/session-key/permissions.js\n var SessionKeyAccessListType, SessionKeyPermissionsBuilder;\n var init_permissions = __esm({\n \"../../../node_modules/.pnpm/@account-kit+smart-contracts@4.62.0_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5._65dee0153d50ca3a2d2c6830319271d9/node_modules/@account-kit/smart-contracts/dist/esm/src/msca/plugins/session-key/permissions.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_esm();\n init_SessionKeyPermissionsUpdatesAbi();\n (function(SessionKeyAccessListType2) {\n SessionKeyAccessListType2[SessionKeyAccessListType2[\"ALLOWLIST\"] = 0] = \"ALLOWLIST\";\n SessionKeyAccessListType2[SessionKeyAccessListType2[\"DENYLIST\"] = 1] = \"DENYLIST\";\n SessionKeyAccessListType2[SessionKeyAccessListType2[\"ALLOW_ALL_ACCESS\"] = 2] = \"ALLOW_ALL_ACCESS\";\n })(SessionKeyAccessListType || (SessionKeyAccessListType = {}));\n SessionKeyPermissionsBuilder = class {\n constructor() {\n Object.defineProperty(this, \"_contractAccessControlType\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: SessionKeyAccessListType.ALLOWLIST\n });\n Object.defineProperty(this, \"_contractAddressAccessEntrys\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: []\n });\n Object.defineProperty(this, \"_contractMethodAccessEntrys\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: []\n });\n Object.defineProperty(this, \"_timeRange\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: void 0\n });\n Object.defineProperty(this, \"_nativeTokenSpendLimit\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: void 0\n });\n Object.defineProperty(this, \"_erc20TokenSpendLimits\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: []\n });\n Object.defineProperty(this, \"_gasSpendLimit\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: void 0\n });\n Object.defineProperty(this, \"_requiredPaymaster\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: void 0\n });\n }\n /**\n * Sets the access control type for the contract and returns the current instance for method chaining.\n *\n * @example\n * ```ts\n * import { SessionKeyPermissionsBuilder } from \"@account-kit/smart-contracts\";\n *\n * const builder = new SessionKeyPermissionsBuilder();\n * builder.setContractAccessControlType(SessionKeyAccessListType.ALLOWLIST);\n * ```\n *\n * @param {SessionKeyAccessListType} aclType The access control type for the session key\n * @returns {SessionKeyPermissionsBuilder} The current instance for method chaining\n */\n setContractAccessControlType(aclType) {\n this._contractAccessControlType = aclType;\n return this;\n }\n /**\n * Adds a contract access entry to the internal list of contract address access entries.\n *\n * @example\n * ```ts\n * import { SessionKeyPermissionsBuilder } from \"@account-kit/smart-contracts\";\n *\n * const builder = new SessionKeyPermissionsBuilder();\n * builder.addContractAddressAccessEntry({\n * contractAddress: \"0x1234\",\n * isOnList: true,\n * checkSelectors: true,\n * });\n * ```\n *\n * @param {ContractAccessEntry} entry the contract access entry to be added\n * @returns {SessionKeyPermissionsBuilder} the instance of the current class for chaining\n */\n addContractAddressAccessEntry(entry) {\n this._contractAddressAccessEntrys.push(entry);\n return this;\n }\n /**\n * Adds a contract method entry to the `_contractMethodAccessEntrys` array.\n *\n * @example\n * ```ts\n * import { SessionKeyPermissionsBuilder } from \"@account-kit/smart-contracts\";\n *\n * const builder = new SessionKeyPermissionsBuilder();\n * builder.addContractAddressAccessEntry({\n * contractAddress: \"0x1234\",\n * methodSelector: \"0x45678\",\n * isOnList: true,\n * });\n * ```\n *\n * @param {ContractMethodEntry} entry The contract method entry to be added\n * @returns {SessionKeyPermissionsBuilder} The instance of the class for method chaining\n */\n addContractFunctionAccessEntry(entry) {\n this._contractMethodAccessEntrys.push(entry);\n return this;\n }\n /**\n * Sets the time range for an object and returns the object itself for chaining.\n *\n * @example\n * ```ts\n * import { SessionKeyPermissionsBuilder } from \"@account-kit/smart-contracts\";\n *\n * const builder = new SessionKeyPermissionsBuilder();\n * builder.setTimeRange({\n * validFrom: Date.now(),\n * validUntil: Date.now() + (15 * 60 * 1000),\n * });\n * ```\n *\n * @param {TimeRange} timeRange The time range to be set\n * @returns {SessionKeyPermissionsBuilder} The current object for method chaining\n */\n setTimeRange(timeRange) {\n this._timeRange = timeRange;\n return this;\n }\n /**\n * Sets the native token spend limit and returns the instance for chaining.\n *\n * @example\n * ```ts\n * import { SessionKeyPermissionsBuilder } from \"@account-kit/smart-contracts\";\n *\n * const builder = new SessionKeyPermissionsBuilder();\n * builder.setNativeTokenSpendLimit({\n * spendLimit: 1000000000000000000n,\n * refreshInterval: 3600,\n * });\n * ```\n *\n * @param {NativeTokenLimit} limit The limit to set for native token spending\n * @returns {SessionKeyPermissionsBuilder} The instance for chaining\n */\n setNativeTokenSpendLimit(limit) {\n this._nativeTokenSpendLimit = limit;\n return this;\n }\n /**\n * Adds an ERC20 token spend limit to the list of limits and returns the updated object.\n *\n * @example\n * ```ts\n * import { SessionKeyPermissionsBuilder } from \"@account-kit/smart-contracts\";\n *\n * const builder = new SessionKeyPermissionsBuilder();\n * builder.addErc20TokenSpendLimit({\n * tokenAddress: \"0x1234\",\n * spendLimit: 1000000000000000000n,\n * refreshInterval: 3600,\n * });\n * ```\n *\n * @param {Erc20TokenLimit} limit The ERC20 token spend limit to be added\n * @returns {object} The updated object with the new ERC20 token spend limit\n */\n addErc20TokenSpendLimit(limit) {\n this._erc20TokenSpendLimits.push(limit);\n return this;\n }\n /**\n * Sets the gas spend limit and returns the current instance for method chaining.\n *\n * @example\n * ```ts\n * import { SessionKeyPermissionsBuilder } from \"@account-kit/smart-contracts\";\n *\n * const builder = new SessionKeyPermissionsBuilder();\n * builder.setGasSpendLimit({\n * spendLimit: 1000000000000000000n,\n * refreshInterval: 3600,\n * });\n * ```\n *\n * @param {GasSpendLimit} limit - The gas spend limit to be set\n * @returns {SessionKeyPermissionsBuilder} The current instance for chaining\n */\n setGasSpendLimit(limit) {\n this._gasSpendLimit = limit;\n return this;\n }\n /**\n * Sets the required paymaster address.\n *\n * @example\n * ```ts\n * import { SessionKeyPermissionsBuilder } from \"@account-kit/smart-contracts\";\n *\n * const builder = new SessionKeyPermissionsBuilder();\n * builder.setRequiredPaymaster(\"0x1234\");\n * ```\n *\n * @param {Address} paymaster the address of the paymaster to be set\n * @returns {SessionKeyPermissionsBuilder} the current instance for method chaining\n */\n setRequiredPaymaster(paymaster) {\n this._requiredPaymaster = paymaster;\n return this;\n }\n /**\n * Encodes various function calls into an array of hexadecimal strings based on the provided permissions and limits.\n *\n * @example\n * ```ts\n * import { SessionKeyPermissionsBuilder } from \"@account-kit/smart-contracts\";\n *\n * const builder = new SessionKeyPermissionsBuilder();\n * builder.setRequiredPaymaster(\"0x1234\");\n * const encoded = builder.encode();\n * ```\n *\n * @returns {Hex[]} An array of encoded hexadecimal strings representing the function calls for setting access control, permissions, and limits.\n */\n encode() {\n return [\n encodeFunctionData({\n abi: SessionKeyPermissionsUpdatesAbi,\n functionName: \"setAccessListType\",\n args: [this._contractAccessControlType]\n }),\n ...this._contractAddressAccessEntrys.map((entry) => encodeFunctionData({\n abi: SessionKeyPermissionsUpdatesAbi,\n functionName: \"updateAccessListAddressEntry\",\n args: [entry.contractAddress, entry.isOnList, entry.checkSelectors]\n })),\n ...this._contractMethodAccessEntrys.map((entry) => encodeFunctionData({\n abi: SessionKeyPermissionsUpdatesAbi,\n functionName: \"updateAccessListFunctionEntry\",\n args: [entry.contractAddress, entry.methodSelector, entry.isOnList]\n })),\n this.encodeIfDefined((timeRange) => encodeFunctionData({\n abi: SessionKeyPermissionsUpdatesAbi,\n functionName: \"updateTimeRange\",\n args: [timeRange.validFrom, timeRange.validUntil]\n }), this._timeRange),\n this.encodeIfDefined((nativeSpendLimit) => encodeFunctionData({\n abi: SessionKeyPermissionsUpdatesAbi,\n functionName: \"setNativeTokenSpendLimit\",\n args: [\n nativeSpendLimit.spendLimit,\n nativeSpendLimit.refreshInterval ?? 0\n ]\n }), this._nativeTokenSpendLimit),\n ...this._erc20TokenSpendLimits.map((erc20SpendLimit) => encodeFunctionData({\n abi: SessionKeyPermissionsUpdatesAbi,\n functionName: \"setERC20SpendLimit\",\n args: [\n erc20SpendLimit.tokenAddress,\n erc20SpendLimit.spendLimit,\n erc20SpendLimit.refreshInterval ?? 0\n ]\n })),\n this.encodeIfDefined((spendLimit) => encodeFunctionData({\n abi: SessionKeyPermissionsUpdatesAbi,\n functionName: \"setGasSpendLimit\",\n args: [spendLimit.spendLimit, spendLimit.refreshInterval ?? 0]\n }), this._gasSpendLimit),\n this.encodeIfDefined((paymaster) => encodeFunctionData({\n abi: SessionKeyPermissionsUpdatesAbi,\n functionName: \"setRequiredPaymaster\",\n args: [paymaster]\n }), this._requiredPaymaster)\n ].filter((x4) => x4 !== \"0x\");\n }\n encodeIfDefined(encode6, param) {\n if (!param)\n return \"0x\";\n return encode6(param);\n }\n };\n }\n });\n\n // ../../../node_modules/.pnpm/@account-kit+smart-contracts@4.62.0_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5._65dee0153d50ca3a2d2c6830319271d9/node_modules/@account-kit/smart-contracts/dist/esm/src/msca/plugins/session-key/signer.js\n var SessionKeySignerSchema, SESSION_KEY_SIGNER_TYPE_PFX, SessionKeySigner;\n var init_signer4 = __esm({\n \"../../../node_modules/.pnpm/@account-kit+smart-contracts@4.62.0_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5._65dee0153d50ca3a2d2c6830319271d9/node_modules/@account-kit/smart-contracts/dist/esm/src/msca/plugins/session-key/signer.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_esm6();\n init_accounts();\n init_esm5();\n SessionKeySignerSchema = external_exports.object({\n storageType: external_exports.union([external_exports.literal(\"local-storage\"), external_exports.literal(\"session-storage\")]).or(external_exports.custom()).default(\"local-storage\"),\n storageKey: external_exports.string().default(\"session-key-signer:session-key\")\n });\n SESSION_KEY_SIGNER_TYPE_PFX = \"alchemy:session-key\";\n SessionKeySigner = class {\n /**\n * Initializes a new instance of a session key signer with the provided configuration. This will set the `signerType`, `storageKey`, and `storageType`. It will also manage the session key, either fetching it from storage or generating a new one if it doesn't exist.\n *\n * @example\n * ```ts\n * import { SessionKeySigner } from \"@account-kit/smart-contracts\";\n *\n * const signer = new SessionKeySigner();\n * ```\n *\n * @param {SessionKeySignerConfig} config_ the configuration for initializing the session key signer\n */\n constructor(config_ = {}) {\n Object.defineProperty(this, \"signerType\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: void 0\n });\n Object.defineProperty(this, \"inner\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: void 0\n });\n Object.defineProperty(this, \"storageType\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: void 0\n });\n Object.defineProperty(this, \"storageKey\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: void 0\n });\n Object.defineProperty(this, \"getAddress\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: async () => {\n return this.inner.getAddress();\n }\n });\n Object.defineProperty(this, \"signMessage\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: async (msg) => {\n return this.inner.signMessage(msg);\n }\n });\n Object.defineProperty(this, \"signTypedData\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: async (params) => {\n return this.inner.signTypedData(params);\n }\n });\n Object.defineProperty(this, \"generateNewKey\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: () => {\n const storage = this.storageType === \"session-storage\" ? sessionStorage : localStorage;\n const newKey = generatePrivateKey();\n storage.setItem(this.storageKey, newKey);\n this.inner = LocalAccountSigner.privateKeyToAccountSigner(newKey);\n return this.inner.inner.address;\n }\n });\n const config2 = SessionKeySignerSchema.parse(config_);\n this.signerType = `${SESSION_KEY_SIGNER_TYPE_PFX}`;\n this.storageKey = config2.storageKey;\n this.storageType = config2.storageType;\n const sessionKey = (() => {\n const storage = typeof this.storageType !== \"string\" ? this.storageType : this.storageType === \"session-storage\" ? sessionStorage : localStorage;\n const key = storage.getItem(this.storageKey);\n if (key) {\n return key;\n } else {\n const newKey = generatePrivateKey();\n storage.setItem(this.storageKey, newKey);\n return newKey;\n }\n })();\n this.inner = LocalAccountSigner.privateKeyToAccountSigner(sessionKey);\n }\n };\n }\n });\n\n // ../../../node_modules/.pnpm/@account-kit+smart-contracts@4.62.0_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5._65dee0153d50ca3a2d2c6830319271d9/node_modules/@account-kit/smart-contracts/dist/esm/src/ma-v2/abis/accountFactoryAbi.js\n var accountFactoryAbi;\n var init_accountFactoryAbi = __esm({\n \"../../../node_modules/.pnpm/@account-kit+smart-contracts@4.62.0_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5._65dee0153d50ca3a2d2c6830319271d9/node_modules/@account-kit/smart-contracts/dist/esm/src/ma-v2/abis/accountFactoryAbi.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n accountFactoryAbi = [\n {\n type: \"constructor\",\n inputs: [\n {\n name: \"_entryPoint\",\n type: \"address\",\n internalType: \"contract IEntryPoint\"\n },\n {\n name: \"_accountImpl\",\n type: \"address\",\n internalType: \"contract ModularAccount\"\n },\n {\n name: \"_semiModularImpl\",\n type: \"address\",\n internalType: \"contract SemiModularAccountBytecode\"\n },\n {\n name: \"_singleSignerValidationModule\",\n type: \"address\",\n internalType: \"address\"\n },\n {\n name: \"_webAuthnValidationModule\",\n type: \"address\",\n internalType: \"address\"\n },\n {\n name: \"owner\",\n type: \"address\",\n internalType: \"address\"\n }\n ],\n stateMutability: \"nonpayable\"\n },\n {\n type: \"function\",\n name: \"ACCOUNT_IMPL\",\n inputs: [],\n outputs: [\n {\n name: \"\",\n type: \"address\",\n internalType: \"contract ModularAccount\"\n }\n ],\n stateMutability: \"view\"\n },\n {\n type: \"function\",\n name: \"ENTRY_POINT\",\n inputs: [],\n outputs: [\n {\n name: \"\",\n type: \"address\",\n internalType: \"contract IEntryPoint\"\n }\n ],\n stateMutability: \"view\"\n },\n {\n type: \"function\",\n name: \"SEMI_MODULAR_ACCOUNT_IMPL\",\n inputs: [],\n outputs: [\n {\n name: \"\",\n type: \"address\",\n internalType: \"contract SemiModularAccountBytecode\"\n }\n ],\n stateMutability: \"view\"\n },\n {\n type: \"function\",\n name: \"SINGLE_SIGNER_VALIDATION_MODULE\",\n inputs: [],\n outputs: [\n {\n name: \"\",\n type: \"address\",\n internalType: \"address\"\n }\n ],\n stateMutability: \"view\"\n },\n {\n type: \"function\",\n name: \"WEBAUTHN_VALIDATION_MODULE\",\n inputs: [],\n outputs: [\n {\n name: \"\",\n type: \"address\",\n internalType: \"address\"\n }\n ],\n stateMutability: \"view\"\n },\n {\n type: \"function\",\n name: \"acceptOwnership\",\n inputs: [],\n outputs: [],\n stateMutability: \"nonpayable\"\n },\n {\n type: \"function\",\n name: \"addStake\",\n inputs: [\n {\n name: \"unstakeDelay\",\n type: \"uint32\",\n internalType: \"uint32\"\n }\n ],\n outputs: [],\n stateMutability: \"payable\"\n },\n {\n type: \"function\",\n name: \"createAccount\",\n inputs: [\n {\n name: \"owner\",\n type: \"address\",\n internalType: \"address\"\n },\n {\n name: \"salt\",\n type: \"uint256\",\n internalType: \"uint256\"\n },\n {\n name: \"entityId\",\n type: \"uint32\",\n internalType: \"uint32\"\n }\n ],\n outputs: [\n {\n name: \"\",\n type: \"address\",\n internalType: \"contract ModularAccount\"\n }\n ],\n stateMutability: \"nonpayable\"\n },\n {\n type: \"function\",\n name: \"createSemiModularAccount\",\n inputs: [\n {\n name: \"owner\",\n type: \"address\",\n internalType: \"address\"\n },\n {\n name: \"salt\",\n type: \"uint256\",\n internalType: \"uint256\"\n }\n ],\n outputs: [\n {\n name: \"\",\n type: \"address\",\n internalType: \"contract SemiModularAccountBytecode\"\n }\n ],\n stateMutability: \"nonpayable\"\n },\n {\n type: \"function\",\n name: \"createWebAuthnAccount\",\n inputs: [\n {\n name: \"ownerX\",\n type: \"uint256\",\n internalType: \"uint256\"\n },\n {\n name: \"ownerY\",\n type: \"uint256\",\n internalType: \"uint256\"\n },\n {\n name: \"salt\",\n type: \"uint256\",\n internalType: \"uint256\"\n },\n {\n name: \"entityId\",\n type: \"uint32\",\n internalType: \"uint32\"\n }\n ],\n outputs: [\n {\n name: \"\",\n type: \"address\",\n internalType: \"contract ModularAccount\"\n }\n ],\n stateMutability: \"nonpayable\"\n },\n {\n type: \"function\",\n name: \"getAddress\",\n inputs: [\n {\n name: \"owner\",\n type: \"address\",\n internalType: \"address\"\n },\n {\n name: \"salt\",\n type: \"uint256\",\n internalType: \"uint256\"\n },\n {\n name: \"entityId\",\n type: \"uint32\",\n internalType: \"uint32\"\n }\n ],\n outputs: [\n {\n name: \"\",\n type: \"address\",\n internalType: \"address\"\n }\n ],\n stateMutability: \"view\"\n },\n {\n type: \"function\",\n name: \"getAddressSemiModular\",\n inputs: [\n {\n name: \"owner\",\n type: \"address\",\n internalType: \"address\"\n },\n {\n name: \"salt\",\n type: \"uint256\",\n internalType: \"uint256\"\n }\n ],\n outputs: [\n {\n name: \"\",\n type: \"address\",\n internalType: \"address\"\n }\n ],\n stateMutability: \"view\"\n },\n {\n type: \"function\",\n name: \"getAddressWebAuthn\",\n inputs: [\n {\n name: \"ownerX\",\n type: \"uint256\",\n internalType: \"uint256\"\n },\n {\n name: \"ownerY\",\n type: \"uint256\",\n internalType: \"uint256\"\n },\n {\n name: \"salt\",\n type: \"uint256\",\n internalType: \"uint256\"\n },\n {\n name: \"entityId\",\n type: \"uint32\",\n internalType: \"uint32\"\n }\n ],\n outputs: [\n {\n name: \"\",\n type: \"address\",\n internalType: \"address\"\n }\n ],\n stateMutability: \"view\"\n },\n {\n type: \"function\",\n name: \"getSalt\",\n inputs: [\n {\n name: \"owner\",\n type: \"address\",\n internalType: \"address\"\n },\n {\n name: \"salt\",\n type: \"uint256\",\n internalType: \"uint256\"\n },\n {\n name: \"entityId\",\n type: \"uint32\",\n internalType: \"uint32\"\n }\n ],\n outputs: [\n {\n name: \"\",\n type: \"bytes32\",\n internalType: \"bytes32\"\n }\n ],\n stateMutability: \"pure\"\n },\n {\n type: \"function\",\n name: \"getSaltWebAuthn\",\n inputs: [\n {\n name: \"ownerX\",\n type: \"uint256\",\n internalType: \"uint256\"\n },\n {\n name: \"ownerY\",\n type: \"uint256\",\n internalType: \"uint256\"\n },\n {\n name: \"salt\",\n type: \"uint256\",\n internalType: \"uint256\"\n },\n {\n name: \"entityId\",\n type: \"uint32\",\n internalType: \"uint32\"\n }\n ],\n outputs: [\n {\n name: \"\",\n type: \"bytes32\",\n internalType: \"bytes32\"\n }\n ],\n stateMutability: \"pure\"\n },\n {\n type: \"function\",\n name: \"owner\",\n inputs: [],\n outputs: [\n {\n name: \"\",\n type: \"address\",\n internalType: \"address\"\n }\n ],\n stateMutability: \"view\"\n },\n {\n type: \"function\",\n name: \"pendingOwner\",\n inputs: [],\n outputs: [\n {\n name: \"\",\n type: \"address\",\n internalType: \"address\"\n }\n ],\n stateMutability: \"view\"\n },\n {\n type: \"function\",\n name: \"renounceOwnership\",\n inputs: [],\n outputs: [],\n stateMutability: \"view\"\n },\n {\n type: \"function\",\n name: \"transferOwnership\",\n inputs: [\n {\n name: \"newOwner\",\n type: \"address\",\n internalType: \"address\"\n }\n ],\n outputs: [],\n stateMutability: \"nonpayable\"\n },\n {\n type: \"function\",\n name: \"unlockStake\",\n inputs: [],\n outputs: [],\n stateMutability: \"nonpayable\"\n },\n {\n type: \"function\",\n name: \"withdraw\",\n inputs: [\n {\n name: \"to\",\n type: \"address\",\n internalType: \"address payable\"\n },\n {\n name: \"token\",\n type: \"address\",\n internalType: \"address\"\n },\n {\n name: \"amount\",\n type: \"uint256\",\n internalType: \"uint256\"\n }\n ],\n outputs: [],\n stateMutability: \"nonpayable\"\n },\n {\n type: \"function\",\n name: \"withdrawStake\",\n inputs: [\n {\n name: \"withdrawAddress\",\n type: \"address\",\n internalType: \"address payable\"\n }\n ],\n outputs: [],\n stateMutability: \"nonpayable\"\n },\n {\n type: \"event\",\n name: \"ModularAccountDeployed\",\n inputs: [\n {\n name: \"account\",\n type: \"address\",\n indexed: true,\n internalType: \"address\"\n },\n {\n name: \"owner\",\n type: \"address\",\n indexed: true,\n internalType: \"address\"\n },\n {\n name: \"salt\",\n type: \"uint256\",\n indexed: false,\n internalType: \"uint256\"\n }\n ],\n anonymous: false\n },\n {\n type: \"event\",\n name: \"OwnershipTransferStarted\",\n inputs: [\n {\n name: \"previousOwner\",\n type: \"address\",\n indexed: true,\n internalType: \"address\"\n },\n {\n name: \"newOwner\",\n type: \"address\",\n indexed: true,\n internalType: \"address\"\n }\n ],\n anonymous: false\n },\n {\n type: \"event\",\n name: \"OwnershipTransferred\",\n inputs: [\n {\n name: \"previousOwner\",\n type: \"address\",\n indexed: true,\n internalType: \"address\"\n },\n {\n name: \"newOwner\",\n type: \"address\",\n indexed: true,\n internalType: \"address\"\n }\n ],\n anonymous: false\n },\n {\n type: \"event\",\n name: \"SemiModularAccountDeployed\",\n inputs: [\n {\n name: \"account\",\n type: \"address\",\n indexed: true,\n internalType: \"address\"\n },\n {\n name: \"owner\",\n type: \"address\",\n indexed: true,\n internalType: \"address\"\n },\n {\n name: \"salt\",\n type: \"uint256\",\n indexed: false,\n internalType: \"uint256\"\n }\n ],\n anonymous: false\n },\n {\n type: \"event\",\n name: \"WebAuthnModularAccountDeployed\",\n inputs: [\n {\n name: \"account\",\n type: \"address\",\n indexed: true,\n internalType: \"address\"\n },\n {\n name: \"ownerX\",\n type: \"uint256\",\n indexed: true,\n internalType: \"uint256\"\n },\n {\n name: \"ownerY\",\n type: \"uint256\",\n indexed: true,\n internalType: \"uint256\"\n },\n {\n name: \"salt\",\n type: \"uint256\",\n indexed: false,\n internalType: \"uint256\"\n }\n ],\n anonymous: false\n },\n {\n type: \"error\",\n name: \"AddressEmptyCode\",\n inputs: [\n {\n name: \"target\",\n type: \"address\",\n internalType: \"address\"\n }\n ]\n },\n {\n type: \"error\",\n name: \"AddressInsufficientBalance\",\n inputs: [\n {\n name: \"account\",\n type: \"address\",\n internalType: \"address\"\n }\n ]\n },\n {\n type: \"error\",\n name: \"FailedInnerCall\",\n inputs: []\n },\n {\n type: \"error\",\n name: \"InvalidAction\",\n inputs: []\n },\n {\n type: \"error\",\n name: \"OwnableInvalidOwner\",\n inputs: [\n {\n name: \"owner\",\n type: \"address\",\n internalType: \"address\"\n }\n ]\n },\n {\n type: \"error\",\n name: \"OwnableUnauthorizedAccount\",\n inputs: [\n {\n name: \"account\",\n type: \"address\",\n internalType: \"address\"\n }\n ]\n },\n {\n type: \"error\",\n name: \"SafeERC20FailedOperation\",\n inputs: [\n {\n name: \"token\",\n type: \"address\",\n internalType: \"address\"\n }\n ]\n },\n {\n type: \"error\",\n name: \"TransferFailed\",\n inputs: []\n }\n ];\n }\n });\n\n // ../../../node_modules/.pnpm/@account-kit+smart-contracts@4.62.0_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5._65dee0153d50ca3a2d2c6830319271d9/node_modules/@account-kit/smart-contracts/dist/esm/src/ma-v2/abis/modularAccountAbi.js\n var modularAccountAbi;\n var init_modularAccountAbi = __esm({\n \"../../../node_modules/.pnpm/@account-kit+smart-contracts@4.62.0_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5._65dee0153d50ca3a2d2c6830319271d9/node_modules/@account-kit/smart-contracts/dist/esm/src/ma-v2/abis/modularAccountAbi.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n modularAccountAbi = [\n {\n type: \"constructor\",\n inputs: [\n {\n name: \"entryPoint\",\n type: \"address\",\n internalType: \"contract IEntryPoint\"\n },\n {\n name: \"executionInstallDelegate\",\n type: \"address\",\n internalType: \"contract ExecutionInstallDelegate\"\n }\n ],\n stateMutability: \"nonpayable\"\n },\n {\n type: \"fallback\",\n stateMutability: \"payable\"\n },\n {\n type: \"receive\",\n stateMutability: \"payable\"\n },\n {\n type: \"function\",\n name: \"accountId\",\n inputs: [],\n outputs: [\n {\n name: \"\",\n type: \"string\",\n internalType: \"string\"\n }\n ],\n stateMutability: \"pure\"\n },\n {\n type: \"function\",\n name: \"entryPoint\",\n inputs: [],\n outputs: [\n {\n name: \"\",\n type: \"address\",\n internalType: \"contract IEntryPoint\"\n }\n ],\n stateMutability: \"view\"\n },\n {\n type: \"function\",\n name: \"execute\",\n inputs: [\n {\n name: \"target\",\n type: \"address\",\n internalType: \"address\"\n },\n {\n name: \"value\",\n type: \"uint256\",\n internalType: \"uint256\"\n },\n {\n name: \"data\",\n type: \"bytes\",\n internalType: \"bytes\"\n }\n ],\n outputs: [\n {\n name: \"result\",\n type: \"bytes\",\n internalType: \"bytes\"\n }\n ],\n stateMutability: \"payable\"\n },\n {\n type: \"function\",\n name: \"executeBatch\",\n inputs: [\n {\n name: \"calls\",\n type: \"tuple[]\",\n internalType: \"struct Call[]\",\n components: [\n {\n name: \"target\",\n type: \"address\",\n internalType: \"address\"\n },\n {\n name: \"value\",\n type: \"uint256\",\n internalType: \"uint256\"\n },\n {\n name: \"data\",\n type: \"bytes\",\n internalType: \"bytes\"\n }\n ]\n }\n ],\n outputs: [\n {\n name: \"results\",\n type: \"bytes[]\",\n internalType: \"bytes[]\"\n }\n ],\n stateMutability: \"payable\"\n },\n {\n type: \"function\",\n name: \"executeUserOp\",\n inputs: [\n {\n name: \"userOp\",\n type: \"tuple\",\n internalType: \"struct PackedUserOperation\",\n components: [\n {\n name: \"sender\",\n type: \"address\",\n internalType: \"address\"\n },\n {\n name: \"nonce\",\n type: \"uint256\",\n internalType: \"uint256\"\n },\n {\n name: \"initCode\",\n type: \"bytes\",\n internalType: \"bytes\"\n },\n {\n name: \"callData\",\n type: \"bytes\",\n internalType: \"bytes\"\n },\n {\n name: \"accountGasLimits\",\n type: \"bytes32\",\n internalType: \"bytes32\"\n },\n {\n name: \"preVerificationGas\",\n type: \"uint256\",\n internalType: \"uint256\"\n },\n {\n name: \"gasFees\",\n type: \"bytes32\",\n internalType: \"bytes32\"\n },\n {\n name: \"paymasterAndData\",\n type: \"bytes\",\n internalType: \"bytes\"\n },\n {\n name: \"signature\",\n type: \"bytes\",\n internalType: \"bytes\"\n }\n ]\n },\n {\n name: \"\",\n type: \"bytes32\",\n internalType: \"bytes32\"\n }\n ],\n outputs: [],\n stateMutability: \"nonpayable\"\n },\n {\n type: \"function\",\n name: \"executeWithRuntimeValidation\",\n inputs: [\n {\n name: \"data\",\n type: \"bytes\",\n internalType: \"bytes\"\n },\n {\n name: \"authorization\",\n type: \"bytes\",\n internalType: \"bytes\"\n }\n ],\n outputs: [\n {\n name: \"\",\n type: \"bytes\",\n internalType: \"bytes\"\n }\n ],\n stateMutability: \"payable\"\n },\n {\n type: \"function\",\n name: \"getExecutionData\",\n inputs: [\n {\n name: \"selector\",\n type: \"bytes4\",\n internalType: \"bytes4\"\n }\n ],\n outputs: [\n {\n name: \"data\",\n type: \"tuple\",\n internalType: \"struct ExecutionDataView\",\n components: [\n {\n name: \"module\",\n type: \"address\",\n internalType: \"address\"\n },\n {\n name: \"skipRuntimeValidation\",\n type: \"bool\",\n internalType: \"bool\"\n },\n {\n name: \"allowGlobalValidation\",\n type: \"bool\",\n internalType: \"bool\"\n },\n {\n name: \"executionHooks\",\n type: \"bytes25[]\",\n internalType: \"HookConfig[]\"\n }\n ]\n }\n ],\n stateMutability: \"view\"\n },\n {\n type: \"function\",\n name: \"getValidationData\",\n inputs: [\n {\n name: \"validationFunction\",\n type: \"bytes24\",\n internalType: \"ModuleEntity\"\n }\n ],\n outputs: [\n {\n name: \"data\",\n type: \"tuple\",\n internalType: \"struct ValidationDataView\",\n components: [\n {\n name: \"validationFlags\",\n type: \"uint8\",\n internalType: \"ValidationFlags\"\n },\n {\n name: \"validationHooks\",\n type: \"bytes25[]\",\n internalType: \"HookConfig[]\"\n },\n {\n name: \"executionHooks\",\n type: \"bytes25[]\",\n internalType: \"HookConfig[]\"\n },\n {\n name: \"selectors\",\n type: \"bytes4[]\",\n internalType: \"bytes4[]\"\n }\n ]\n }\n ],\n stateMutability: \"view\"\n },\n {\n type: \"function\",\n name: \"initializeWithValidation\",\n inputs: [\n {\n name: \"validationConfig\",\n type: \"bytes25\",\n internalType: \"ValidationConfig\"\n },\n {\n name: \"selectors\",\n type: \"bytes4[]\",\n internalType: \"bytes4[]\"\n },\n {\n name: \"installData\",\n type: \"bytes\",\n internalType: \"bytes\"\n },\n {\n name: \"hooks\",\n type: \"bytes[]\",\n internalType: \"bytes[]\"\n }\n ],\n outputs: [],\n stateMutability: \"nonpayable\"\n },\n {\n type: \"function\",\n name: \"installExecution\",\n inputs: [\n {\n name: \"module\",\n type: \"address\",\n internalType: \"address\"\n },\n {\n name: \"manifest\",\n type: \"tuple\",\n internalType: \"struct ExecutionManifest\",\n components: [\n {\n name: \"executionFunctions\",\n type: \"tuple[]\",\n internalType: \"struct ManifestExecutionFunction[]\",\n components: [\n {\n name: \"executionSelector\",\n type: \"bytes4\",\n internalType: \"bytes4\"\n },\n {\n name: \"skipRuntimeValidation\",\n type: \"bool\",\n internalType: \"bool\"\n },\n {\n name: \"allowGlobalValidation\",\n type: \"bool\",\n internalType: \"bool\"\n }\n ]\n },\n {\n name: \"executionHooks\",\n type: \"tuple[]\",\n internalType: \"struct ManifestExecutionHook[]\",\n components: [\n {\n name: \"executionSelector\",\n type: \"bytes4\",\n internalType: \"bytes4\"\n },\n {\n name: \"entityId\",\n type: \"uint32\",\n internalType: \"uint32\"\n },\n {\n name: \"isPreHook\",\n type: \"bool\",\n internalType: \"bool\"\n },\n {\n name: \"isPostHook\",\n type: \"bool\",\n internalType: \"bool\"\n }\n ]\n },\n {\n name: \"interfaceIds\",\n type: \"bytes4[]\",\n internalType: \"bytes4[]\"\n }\n ]\n },\n {\n name: \"moduleInstallData\",\n type: \"bytes\",\n internalType: \"bytes\"\n }\n ],\n outputs: [],\n stateMutability: \"nonpayable\"\n },\n {\n type: \"function\",\n name: \"installValidation\",\n inputs: [\n {\n name: \"validationConfig\",\n type: \"bytes25\",\n internalType: \"ValidationConfig\"\n },\n {\n name: \"selectors\",\n type: \"bytes4[]\",\n internalType: \"bytes4[]\"\n },\n {\n name: \"installData\",\n type: \"bytes\",\n internalType: \"bytes\"\n },\n {\n name: \"hooks\",\n type: \"bytes[]\",\n internalType: \"bytes[]\"\n }\n ],\n outputs: [],\n stateMutability: \"nonpayable\"\n },\n {\n type: \"function\",\n name: \"isValidSignature\",\n inputs: [\n {\n name: \"hash\",\n type: \"bytes32\",\n internalType: \"bytes32\"\n },\n {\n name: \"signature\",\n type: \"bytes\",\n internalType: \"bytes\"\n }\n ],\n outputs: [\n {\n name: \"\",\n type: \"bytes4\",\n internalType: \"bytes4\"\n }\n ],\n stateMutability: \"view\"\n },\n {\n type: \"function\",\n name: \"onERC1155BatchReceived\",\n inputs: [\n {\n name: \"\",\n type: \"address\",\n internalType: \"address\"\n },\n {\n name: \"\",\n type: \"address\",\n internalType: \"address\"\n },\n {\n name: \"\",\n type: \"uint256[]\",\n internalType: \"uint256[]\"\n },\n {\n name: \"\",\n type: \"uint256[]\",\n internalType: \"uint256[]\"\n },\n {\n name: \"\",\n type: \"bytes\",\n internalType: \"bytes\"\n }\n ],\n outputs: [\n {\n name: \"\",\n type: \"bytes4\",\n internalType: \"bytes4\"\n }\n ],\n stateMutability: \"pure\"\n },\n {\n type: \"function\",\n name: \"onERC1155Received\",\n inputs: [\n {\n name: \"\",\n type: \"address\",\n internalType: \"address\"\n },\n {\n name: \"\",\n type: \"address\",\n internalType: \"address\"\n },\n {\n name: \"\",\n type: \"uint256\",\n internalType: \"uint256\"\n },\n {\n name: \"\",\n type: \"uint256\",\n internalType: \"uint256\"\n },\n {\n name: \"\",\n type: \"bytes\",\n internalType: \"bytes\"\n }\n ],\n outputs: [\n {\n name: \"\",\n type: \"bytes4\",\n internalType: \"bytes4\"\n }\n ],\n stateMutability: \"pure\"\n },\n {\n type: \"function\",\n name: \"onERC721Received\",\n inputs: [\n {\n name: \"\",\n type: \"address\",\n internalType: \"address\"\n },\n {\n name: \"\",\n type: \"address\",\n internalType: \"address\"\n },\n {\n name: \"\",\n type: \"uint256\",\n internalType: \"uint256\"\n },\n {\n name: \"\",\n type: \"bytes\",\n internalType: \"bytes\"\n }\n ],\n outputs: [\n {\n name: \"\",\n type: \"bytes4\",\n internalType: \"bytes4\"\n }\n ],\n stateMutability: \"pure\"\n },\n {\n type: \"function\",\n name: \"performCreate\",\n inputs: [\n {\n name: \"value\",\n type: \"uint256\",\n internalType: \"uint256\"\n },\n {\n name: \"initCode\",\n type: \"bytes\",\n internalType: \"bytes\"\n },\n {\n name: \"isCreate2\",\n type: \"bool\",\n internalType: \"bool\"\n },\n {\n name: \"salt\",\n type: \"bytes32\",\n internalType: \"bytes32\"\n }\n ],\n outputs: [\n {\n name: \"createdAddr\",\n type: \"address\",\n internalType: \"address\"\n }\n ],\n stateMutability: \"payable\"\n },\n {\n type: \"function\",\n name: \"proxiableUUID\",\n inputs: [],\n outputs: [\n {\n name: \"\",\n type: \"bytes32\",\n internalType: \"bytes32\"\n }\n ],\n stateMutability: \"view\"\n },\n {\n type: \"function\",\n name: \"supportsInterface\",\n inputs: [\n {\n name: \"interfaceId\",\n type: \"bytes4\",\n internalType: \"bytes4\"\n }\n ],\n outputs: [\n {\n name: \"\",\n type: \"bool\",\n internalType: \"bool\"\n }\n ],\n stateMutability: \"view\"\n },\n {\n type: \"function\",\n name: \"uninstallExecution\",\n inputs: [\n {\n name: \"module\",\n type: \"address\",\n internalType: \"address\"\n },\n {\n name: \"manifest\",\n type: \"tuple\",\n internalType: \"struct ExecutionManifest\",\n components: [\n {\n name: \"executionFunctions\",\n type: \"tuple[]\",\n internalType: \"struct ManifestExecutionFunction[]\",\n components: [\n {\n name: \"executionSelector\",\n type: \"bytes4\",\n internalType: \"bytes4\"\n },\n {\n name: \"skipRuntimeValidation\",\n type: \"bool\",\n internalType: \"bool\"\n },\n {\n name: \"allowGlobalValidation\",\n type: \"bool\",\n internalType: \"bool\"\n }\n ]\n },\n {\n name: \"executionHooks\",\n type: \"tuple[]\",\n internalType: \"struct ManifestExecutionHook[]\",\n components: [\n {\n name: \"executionSelector\",\n type: \"bytes4\",\n internalType: \"bytes4\"\n },\n {\n name: \"entityId\",\n type: \"uint32\",\n internalType: \"uint32\"\n },\n {\n name: \"isPreHook\",\n type: \"bool\",\n internalType: \"bool\"\n },\n {\n name: \"isPostHook\",\n type: \"bool\",\n internalType: \"bool\"\n }\n ]\n },\n {\n name: \"interfaceIds\",\n type: \"bytes4[]\",\n internalType: \"bytes4[]\"\n }\n ]\n },\n {\n name: \"moduleUninstallData\",\n type: \"bytes\",\n internalType: \"bytes\"\n }\n ],\n outputs: [],\n stateMutability: \"nonpayable\"\n },\n {\n type: \"function\",\n name: \"uninstallValidation\",\n inputs: [\n {\n name: \"validationFunction\",\n type: \"bytes24\",\n internalType: \"ModuleEntity\"\n },\n {\n name: \"uninstallData\",\n type: \"bytes\",\n internalType: \"bytes\"\n },\n {\n name: \"hookUninstallData\",\n type: \"bytes[]\",\n internalType: \"bytes[]\"\n }\n ],\n outputs: [],\n stateMutability: \"nonpayable\"\n },\n {\n type: \"function\",\n name: \"upgradeToAndCall\",\n inputs: [\n {\n name: \"newImplementation\",\n type: \"address\",\n internalType: \"address\"\n },\n {\n name: \"data\",\n type: \"bytes\",\n internalType: \"bytes\"\n }\n ],\n outputs: [],\n stateMutability: \"payable\"\n },\n {\n type: \"function\",\n name: \"validateUserOp\",\n inputs: [\n {\n name: \"userOp\",\n type: \"tuple\",\n internalType: \"struct PackedUserOperation\",\n components: [\n {\n name: \"sender\",\n type: \"address\",\n internalType: \"address\"\n },\n {\n name: \"nonce\",\n type: \"uint256\",\n internalType: \"uint256\"\n },\n {\n name: \"initCode\",\n type: \"bytes\",\n internalType: \"bytes\"\n },\n {\n name: \"callData\",\n type: \"bytes\",\n internalType: \"bytes\"\n },\n {\n name: \"accountGasLimits\",\n type: \"bytes32\",\n internalType: \"bytes32\"\n },\n {\n name: \"preVerificationGas\",\n type: \"uint256\",\n internalType: \"uint256\"\n },\n {\n name: \"gasFees\",\n type: \"bytes32\",\n internalType: \"bytes32\"\n },\n {\n name: \"paymasterAndData\",\n type: \"bytes\",\n internalType: \"bytes\"\n },\n {\n name: \"signature\",\n type: \"bytes\",\n internalType: \"bytes\"\n }\n ]\n },\n {\n name: \"userOpHash\",\n type: \"bytes32\",\n internalType: \"bytes32\"\n },\n {\n name: \"missingAccountFunds\",\n type: \"uint256\",\n internalType: \"uint256\"\n }\n ],\n outputs: [\n {\n name: \"validationData\",\n type: \"uint256\",\n internalType: \"uint256\"\n }\n ],\n stateMutability: \"nonpayable\"\n },\n {\n type: \"event\",\n name: \"ExecutionInstalled\",\n inputs: [\n {\n name: \"module\",\n type: \"address\",\n indexed: true,\n internalType: \"address\"\n },\n {\n name: \"manifest\",\n type: \"tuple\",\n indexed: false,\n internalType: \"struct ExecutionManifest\",\n components: [\n {\n name: \"executionFunctions\",\n type: \"tuple[]\",\n internalType: \"struct ManifestExecutionFunction[]\",\n components: [\n {\n name: \"executionSelector\",\n type: \"bytes4\",\n internalType: \"bytes4\"\n },\n {\n name: \"skipRuntimeValidation\",\n type: \"bool\",\n internalType: \"bool\"\n },\n {\n name: \"allowGlobalValidation\",\n type: \"bool\",\n internalType: \"bool\"\n }\n ]\n },\n {\n name: \"executionHooks\",\n type: \"tuple[]\",\n internalType: \"struct ManifestExecutionHook[]\",\n components: [\n {\n name: \"executionSelector\",\n type: \"bytes4\",\n internalType: \"bytes4\"\n },\n {\n name: \"entityId\",\n type: \"uint32\",\n internalType: \"uint32\"\n },\n {\n name: \"isPreHook\",\n type: \"bool\",\n internalType: \"bool\"\n },\n {\n name: \"isPostHook\",\n type: \"bool\",\n internalType: \"bool\"\n }\n ]\n },\n {\n name: \"interfaceIds\",\n type: \"bytes4[]\",\n internalType: \"bytes4[]\"\n }\n ]\n }\n ],\n anonymous: false\n },\n {\n type: \"event\",\n name: \"ExecutionUninstalled\",\n inputs: [\n {\n name: \"module\",\n type: \"address\",\n indexed: true,\n internalType: \"address\"\n },\n {\n name: \"onUninstallSucceeded\",\n type: \"bool\",\n indexed: false,\n internalType: \"bool\"\n },\n {\n name: \"manifest\",\n type: \"tuple\",\n indexed: false,\n internalType: \"struct ExecutionManifest\",\n components: [\n {\n name: \"executionFunctions\",\n type: \"tuple[]\",\n internalType: \"struct ManifestExecutionFunction[]\",\n components: [\n {\n name: \"executionSelector\",\n type: \"bytes4\",\n internalType: \"bytes4\"\n },\n {\n name: \"skipRuntimeValidation\",\n type: \"bool\",\n internalType: \"bool\"\n },\n {\n name: \"allowGlobalValidation\",\n type: \"bool\",\n internalType: \"bool\"\n }\n ]\n },\n {\n name: \"executionHooks\",\n type: \"tuple[]\",\n internalType: \"struct ManifestExecutionHook[]\",\n components: [\n {\n name: \"executionSelector\",\n type: \"bytes4\",\n internalType: \"bytes4\"\n },\n {\n name: \"entityId\",\n type: \"uint32\",\n internalType: \"uint32\"\n },\n {\n name: \"isPreHook\",\n type: \"bool\",\n internalType: \"bool\"\n },\n {\n name: \"isPostHook\",\n type: \"bool\",\n internalType: \"bool\"\n }\n ]\n },\n {\n name: \"interfaceIds\",\n type: \"bytes4[]\",\n internalType: \"bytes4[]\"\n }\n ]\n }\n ],\n anonymous: false\n },\n {\n type: \"event\",\n name: \"Initialized\",\n inputs: [\n {\n name: \"version\",\n type: \"uint64\",\n indexed: false,\n internalType: \"uint64\"\n }\n ],\n anonymous: false\n },\n {\n type: \"event\",\n name: \"Upgraded\",\n inputs: [\n {\n name: \"implementation\",\n type: \"address\",\n indexed: true,\n internalType: \"address\"\n }\n ],\n anonymous: false\n },\n {\n type: \"event\",\n name: \"ValidationInstalled\",\n inputs: [\n {\n name: \"module\",\n type: \"address\",\n indexed: true,\n internalType: \"address\"\n },\n {\n name: \"entityId\",\n type: \"uint32\",\n indexed: true,\n internalType: \"uint32\"\n }\n ],\n anonymous: false\n },\n {\n type: \"event\",\n name: \"ValidationUninstalled\",\n inputs: [\n {\n name: \"module\",\n type: \"address\",\n indexed: true,\n internalType: \"address\"\n },\n {\n name: \"entityId\",\n type: \"uint32\",\n indexed: true,\n internalType: \"uint32\"\n },\n {\n name: \"onUninstallSucceeded\",\n type: \"bool\",\n indexed: false,\n internalType: \"bool\"\n }\n ],\n anonymous: false\n },\n {\n type: \"error\",\n name: \"ArrayLengthMismatch\",\n inputs: []\n },\n {\n type: \"error\",\n name: \"CreateFailed\",\n inputs: []\n },\n {\n type: \"error\",\n name: \"DeferredActionSignatureInvalid\",\n inputs: []\n },\n {\n type: \"error\",\n name: \"DeferredValidationHasValidationHooks\",\n inputs: []\n },\n {\n type: \"error\",\n name: \"ExecutionHookAlreadySet\",\n inputs: [\n {\n name: \"hookConfig\",\n type: \"bytes25\",\n internalType: \"HookConfig\"\n }\n ]\n },\n {\n type: \"error\",\n name: \"InterfaceNotSupported\",\n inputs: [\n {\n name: \"module\",\n type: \"address\",\n internalType: \"address\"\n }\n ]\n },\n {\n type: \"error\",\n name: \"InvalidInitialization\",\n inputs: []\n },\n {\n type: \"error\",\n name: \"ModuleInstallCallbackFailed\",\n inputs: [\n {\n name: \"module\",\n type: \"address\",\n internalType: \"address\"\n },\n {\n name: \"revertReason\",\n type: \"bytes\",\n internalType: \"bytes\"\n }\n ]\n },\n {\n type: \"error\",\n name: \"NonCanonicalEncoding\",\n inputs: []\n },\n {\n type: \"error\",\n name: \"NotEntryPoint\",\n inputs: []\n },\n {\n type: \"error\",\n name: \"PreValidationHookDuplicate\",\n inputs: []\n },\n {\n type: \"error\",\n name: \"RequireUserOperationContext\",\n inputs: []\n },\n {\n type: \"error\",\n name: \"SegmentOutOfOrder\",\n inputs: []\n },\n {\n type: \"error\",\n name: \"SelfCallRecursionDepthExceeded\",\n inputs: []\n },\n {\n type: \"error\",\n name: \"SignatureValidationInvalid\",\n inputs: [\n {\n name: \"validationFunction\",\n type: \"bytes24\",\n internalType: \"ModuleEntity\"\n }\n ]\n },\n {\n type: \"error\",\n name: \"UnauthorizedCallContext\",\n inputs: []\n },\n {\n type: \"error\",\n name: \"UnexpectedAggregator\",\n inputs: [\n {\n name: \"validationFunction\",\n type: \"bytes24\",\n internalType: \"ModuleEntity\"\n },\n {\n name: \"aggregator\",\n type: \"address\",\n internalType: \"address\"\n }\n ]\n },\n {\n type: \"error\",\n name: \"UnrecognizedFunction\",\n inputs: [\n {\n name: \"selector\",\n type: \"bytes4\",\n internalType: \"bytes4\"\n }\n ]\n },\n {\n type: \"error\",\n name: \"UpgradeFailed\",\n inputs: []\n },\n {\n type: \"error\",\n name: \"UserOpValidationInvalid\",\n inputs: [\n {\n name: \"validationFunction\",\n type: \"bytes24\",\n internalType: \"ModuleEntity\"\n }\n ]\n },\n {\n type: \"error\",\n name: \"ValidationAlreadySet\",\n inputs: [\n {\n name: \"selector\",\n type: \"bytes4\",\n internalType: \"bytes4\"\n },\n {\n name: \"validationFunction\",\n type: \"bytes24\",\n internalType: \"ModuleEntity\"\n }\n ]\n },\n {\n type: \"error\",\n name: \"ValidationAssocHookLimitExceeded\",\n inputs: []\n },\n {\n type: \"error\",\n name: \"ValidationEntityIdInUse\",\n inputs: []\n },\n {\n type: \"error\",\n name: \"ValidationFunctionMissing\",\n inputs: [\n {\n name: \"selector\",\n type: \"bytes4\",\n internalType: \"bytes4\"\n }\n ]\n },\n {\n type: \"error\",\n name: \"ValidationSignatureSegmentMissing\",\n inputs: []\n }\n ];\n }\n });\n\n // ../../../node_modules/.pnpm/@account-kit+smart-contracts@4.62.0_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5._65dee0153d50ca3a2d2c6830319271d9/node_modules/@account-kit/smart-contracts/dist/esm/src/ma-v2/actions/common/utils.js\n function serializeModuleEntity(config2) {\n return concatHex([config2.moduleAddress, toHex(config2.entityId, { size: 4 })]);\n }\n var init_utils15 = __esm({\n \"../../../node_modules/.pnpm/@account-kit+smart-contracts@4.62.0_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5._65dee0153d50ca3a2d2c6830319271d9/node_modules/@account-kit/smart-contracts/dist/esm/src/ma-v2/actions/common/utils.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_esm();\n }\n });\n\n // ../../../node_modules/.pnpm/@account-kit+smart-contracts@4.62.0_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5._65dee0153d50ca3a2d2c6830319271d9/node_modules/@account-kit/smart-contracts/dist/esm/src/ma-v2/modules/utils.js\n var SignatureType2, getDefaultWebauthnValidationModuleAddress, getDefaultSingleSignerValidationModuleAddress;\n var init_utils16 = __esm({\n \"../../../node_modules/.pnpm/@account-kit+smart-contracts@4.62.0_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5._65dee0153d50ca3a2d2c6830319271d9/node_modules/@account-kit/smart-contracts/dist/esm/src/ma-v2/modules/utils.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_exports3();\n (function(SignatureType3) {\n SignatureType3[\"EOA\"] = \"0x00\";\n SignatureType3[\"CONTRACT\"] = \"0x01\";\n })(SignatureType2 || (SignatureType2 = {}));\n getDefaultWebauthnValidationModuleAddress = (chain2) => {\n switch (chain2.id) {\n case sepolia3.id:\n case baseSepolia3.id:\n case polygon3.id:\n case mainnet3.id:\n case polygonAmoy3.id:\n case optimism3.id:\n case optimismSepolia3.id:\n case arbitrum3.id:\n case arbitrumSepolia3.id:\n case base3.id:\n default:\n return \"0x0000000000001D9d34E07D9834274dF9ae575217\";\n }\n };\n getDefaultSingleSignerValidationModuleAddress = (chain2) => {\n switch (chain2.id) {\n case sepolia3.id:\n case baseSepolia3.id:\n case polygon3.id:\n case mainnet3.id:\n case polygonAmoy3.id:\n case optimism3.id:\n case optimismSepolia3.id:\n case arbitrum3.id:\n case arbitrumSepolia3.id:\n case base3.id:\n default:\n return \"0x00000000000099DE0BF6fA90dEB851E2A2df7d83\";\n }\n };\n }\n });\n\n // ../../../node_modules/.pnpm/@account-kit+smart-contracts@4.62.0_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5._65dee0153d50ca3a2d2c6830319271d9/node_modules/@account-kit/smart-contracts/dist/esm/src/ma-v2/modules/single-signer-validation/signer.js\n var singleSignerMessageSigner;\n var init_signer5 = __esm({\n \"../../../node_modules/.pnpm/@account-kit+smart-contracts@4.62.0_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5._65dee0153d50ca3a2d2c6830319271d9/node_modules/@account-kit/smart-contracts/dist/esm/src/ma-v2/modules/single-signer-validation/signer.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_esm();\n init_utils16();\n init_utils17();\n singleSignerMessageSigner = (signer, chain2, accountAddress, entityId, deferredActionData) => {\n const signingMethods = {\n prepareSign: async (request) => {\n let hash3;\n switch (request.type) {\n case \"personal_sign\":\n hash3 = hashMessage(request.data);\n break;\n case \"eth_signTypedData_v4\":\n hash3 = await hashTypedData(request.data);\n break;\n default:\n assertNeverSignatureRequestType();\n }\n return {\n type: \"eth_signTypedData_v4\",\n data: {\n domain: {\n chainId: Number(chain2.id),\n verifyingContract: getDefaultSingleSignerValidationModuleAddress(chain2),\n salt: concatHex([`0x${\"00\".repeat(12)}`, accountAddress])\n },\n types: {\n ReplaySafeHash: [{ name: \"hash\", type: \"bytes32\" }]\n },\n message: {\n hash: hash3\n },\n primaryType: \"ReplaySafeHash\"\n }\n };\n },\n formatSign: async (signature) => {\n return pack1271Signature({\n validationSignature: signature,\n entityId\n });\n }\n };\n return {\n ...signingMethods,\n getDummySignature: () => {\n const sig = packUOSignature({\n // orderedHookData: [],\n validationSignature: \"0xfffffffffffffffffffffffffffffff0000000000000000000000000000000007aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa1c\"\n });\n return deferredActionData ? concatHex([deferredActionData, sig]) : sig;\n },\n signUserOperationHash: async (uoHash) => {\n let sig = await signer.signMessage({ raw: uoHash }).then((signature) => packUOSignature({\n // orderedHookData: [],\n validationSignature: signature\n }));\n if (deferredActionData) {\n sig = concatHex([deferredActionData, sig]);\n deferredActionData = void 0;\n }\n return sig;\n },\n // we apply the expected 1271 packing here since the account contract will expect it\n async signMessage({ message }) {\n const { type, data } = await signingMethods.prepareSign({\n type: \"personal_sign\",\n data: message\n });\n if (type !== \"eth_signTypedData_v4\") {\n throw new Error(\"Invalid signature request type\");\n }\n const sig = await signer.signTypedData(data);\n return signingMethods.formatSign(sig);\n },\n // TODO: maybe move \"sign deferred actions\" to a separate function?\n // we don't apply the expected 1271 packing since deferred sigs use typed data sigs and don't expect the 1271 packing\n signTypedData: async (typedDataDefinition) => {\n const { type, data } = await signingMethods.prepareSign({\n type: \"eth_signTypedData_v4\",\n data: typedDataDefinition\n });\n if (type !== \"eth_signTypedData_v4\") {\n throw new Error(\"Invalid signature request type\");\n }\n const sig = await signer.signTypedData(data);\n const isDeferredAction = typedDataDefinition.primaryType === \"DeferredAction\" && typedDataDefinition.domain != null && // @ts-expect-error the domain type I think changed in viem, so this is not working correctly (TODO: fix this)\n \"verifyingContract\" in typedDataDefinition.domain && typedDataDefinition.domain.verifyingContract === accountAddress;\n return isDeferredAction ? concat([SignatureType2.EOA, sig]) : signingMethods.formatSign(sig);\n }\n };\n };\n }\n });\n\n // ../../../node_modules/.pnpm/ox@0.4.4_typescript@5.8.3_zod@3.25.64/node_modules/ox/_esm/core/version.js\n var version5;\n var init_version8 = __esm({\n \"../../../node_modules/.pnpm/ox@0.4.4_typescript@5.8.3_zod@3.25.64/node_modules/ox/_esm/core/version.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n version5 = \"0.1.1\";\n }\n });\n\n // ../../../node_modules/.pnpm/ox@0.4.4_typescript@5.8.3_zod@3.25.64/node_modules/ox/_esm/core/internal/errors.js\n function getVersion2() {\n return version5;\n }\n var init_errors7 = __esm({\n \"../../../node_modules/.pnpm/ox@0.4.4_typescript@5.8.3_zod@3.25.64/node_modules/ox/_esm/core/internal/errors.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_version8();\n }\n });\n\n // ../../../node_modules/.pnpm/ox@0.4.4_typescript@5.8.3_zod@3.25.64/node_modules/ox/_esm/core/Errors.js\n function walk3(err, fn) {\n if (fn?.(err))\n return err;\n if (err && typeof err === \"object\" && \"cause\" in err && err.cause)\n return walk3(err.cause, fn);\n return fn ? null : err;\n }\n var BaseError7;\n var init_Errors2 = __esm({\n \"../../../node_modules/.pnpm/ox@0.4.4_typescript@5.8.3_zod@3.25.64/node_modules/ox/_esm/core/Errors.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_errors7();\n BaseError7 = class _BaseError extends Error {\n constructor(shortMessage, options = {}) {\n const details = (() => {\n if (options.cause instanceof _BaseError) {\n if (options.cause.details)\n return options.cause.details;\n if (options.cause.shortMessage)\n return options.cause.shortMessage;\n }\n if (options.cause?.message)\n return options.cause.message;\n return options.details;\n })();\n const docsPath8 = (() => {\n if (options.cause instanceof _BaseError)\n return options.cause.docsPath || options.docsPath;\n return options.docsPath;\n })();\n const docsBaseUrl = \"https://oxlib.sh\";\n const docs = `${docsBaseUrl}${docsPath8 ?? \"\"}`;\n const message = [\n shortMessage || \"An error occurred.\",\n ...options.metaMessages ? [\"\", ...options.metaMessages] : [],\n ...details || docsPath8 ? [\n \"\",\n details ? `Details: ${details}` : void 0,\n docsPath8 ? `See: ${docs}` : void 0\n ] : []\n ].filter((x4) => typeof x4 === \"string\").join(\"\\n\");\n super(message, options.cause ? { cause: options.cause } : void 0);\n Object.defineProperty(this, \"details\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: void 0\n });\n Object.defineProperty(this, \"docs\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: void 0\n });\n Object.defineProperty(this, \"docsPath\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: void 0\n });\n Object.defineProperty(this, \"shortMessage\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: void 0\n });\n Object.defineProperty(this, \"cause\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: void 0\n });\n Object.defineProperty(this, \"name\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: \"BaseError\"\n });\n Object.defineProperty(this, \"version\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: `ox@${getVersion2()}`\n });\n this.cause = options.cause;\n this.details = details;\n this.docs = docs;\n this.docsPath = docsPath8;\n this.shortMessage = shortMessage;\n }\n walk(fn) {\n return walk3(this, fn);\n }\n };\n }\n });\n\n // ../../../node_modules/.pnpm/ox@0.4.4_typescript@5.8.3_zod@3.25.64/node_modules/ox/_esm/core/internal/bytes.js\n function charCodeToBase163(char) {\n if (char >= charCodeMap3.zero && char <= charCodeMap3.nine)\n return char - charCodeMap3.zero;\n if (char >= charCodeMap3.A && char <= charCodeMap3.F)\n return char - (charCodeMap3.A - 10);\n if (char >= charCodeMap3.a && char <= charCodeMap3.f)\n return char - (charCodeMap3.a - 10);\n return void 0;\n }\n var charCodeMap3;\n var init_bytes4 = __esm({\n \"../../../node_modules/.pnpm/ox@0.4.4_typescript@5.8.3_zod@3.25.64/node_modules/ox/_esm/core/internal/bytes.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n charCodeMap3 = {\n zero: 48,\n nine: 57,\n A: 65,\n F: 70,\n a: 97,\n f: 102\n };\n }\n });\n\n // ../../../node_modules/.pnpm/ox@0.4.4_typescript@5.8.3_zod@3.25.64/node_modules/ox/_esm/core/internal/hex.js\n function assertSize4(hex, size_) {\n if (size5(hex) > size_)\n throw new SizeOverflowError4({\n givenSize: size5(hex),\n maxSize: size_\n });\n }\n function pad4(hex_, options = {}) {\n const { dir, size: size6 = 32 } = options;\n if (size6 === 0)\n return hex_;\n const hex = hex_.replace(\"0x\", \"\");\n if (hex.length > size6 * 2)\n throw new SizeExceedsPaddingSizeError4({\n size: Math.ceil(hex.length / 2),\n targetSize: size6,\n type: \"Hex\"\n });\n return `0x${hex[dir === \"right\" ? \"padEnd\" : \"padStart\"](size6 * 2, \"0\")}`;\n }\n var init_hex2 = __esm({\n \"../../../node_modules/.pnpm/ox@0.4.4_typescript@5.8.3_zod@3.25.64/node_modules/ox/_esm/core/internal/hex.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_Hex2();\n }\n });\n\n // ../../../node_modules/.pnpm/ox@0.4.4_typescript@5.8.3_zod@3.25.64/node_modules/ox/_esm/core/Hex.js\n function fromBytes4(value, options = {}) {\n let string2 = \"\";\n for (let i3 = 0; i3 < value.length; i3++)\n string2 += hexes5[value[i3]];\n const hex = `0x${string2}`;\n if (typeof options.size === \"number\") {\n assertSize4(hex, options.size);\n return padRight3(hex, options.size);\n }\n return hex;\n }\n function padRight3(value, size6) {\n return pad4(value, { dir: \"right\", size: size6 });\n }\n function size5(value) {\n return Math.ceil((value.length - 2) / 2);\n }\n var hexes5, SizeOverflowError4, SizeExceedsPaddingSizeError4;\n var init_Hex2 = __esm({\n \"../../../node_modules/.pnpm/ox@0.4.4_typescript@5.8.3_zod@3.25.64/node_modules/ox/_esm/core/Hex.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_Errors2();\n init_hex2();\n hexes5 = /* @__PURE__ */ Array.from({ length: 256 }, (_v, i3) => i3.toString(16).padStart(2, \"0\"));\n SizeOverflowError4 = class extends BaseError7 {\n constructor({ givenSize, maxSize }) {\n super(`Size cannot exceed \\`${maxSize}\\` bytes. Given size: \\`${givenSize}\\` bytes.`);\n Object.defineProperty(this, \"name\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: \"Hex.SizeOverflowError\"\n });\n }\n };\n SizeExceedsPaddingSizeError4 = class extends BaseError7 {\n constructor({ size: size6, targetSize, type }) {\n super(`${type.charAt(0).toUpperCase()}${type.slice(1).toLowerCase()} size (\\`${size6}\\`) exceeds padding size (\\`${targetSize}\\`).`);\n Object.defineProperty(this, \"name\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: \"Hex.SizeExceedsPaddingSizeError\"\n });\n }\n };\n }\n });\n\n // ../../../node_modules/.pnpm/ox@0.4.4_typescript@5.8.3_zod@3.25.64/node_modules/ox/_esm/core/Bytes.js\n function fromHex6(value, options = {}) {\n const { size: size6 } = options;\n let hex = value;\n if (size6) {\n assertSize4(value, size6);\n hex = padRight3(value, size6);\n }\n let hexString = hex.slice(2);\n if (hexString.length % 2)\n hexString = `0${hexString}`;\n const length2 = hexString.length / 2;\n const bytes = new Uint8Array(length2);\n for (let index2 = 0, j2 = 0; index2 < length2; index2++) {\n const nibbleLeft = charCodeToBase163(hexString.charCodeAt(j2++));\n const nibbleRight = charCodeToBase163(hexString.charCodeAt(j2++));\n if (nibbleLeft === void 0 || nibbleRight === void 0) {\n throw new BaseError7(`Invalid byte sequence (\"${hexString[j2 - 2]}${hexString[j2 - 1]}\" in \"${hexString}\").`);\n }\n bytes[index2] = nibbleLeft * 16 + nibbleRight;\n }\n return bytes;\n }\n var init_Bytes2 = __esm({\n \"../../../node_modules/.pnpm/ox@0.4.4_typescript@5.8.3_zod@3.25.64/node_modules/ox/_esm/core/Bytes.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_Errors2();\n init_Hex2();\n init_bytes4();\n init_hex2();\n }\n });\n\n // ../../../node_modules/.pnpm/ox@0.4.4_typescript@5.8.3_zod@3.25.64/node_modules/ox/_esm/core/Base64.js\n function toBytes4(value) {\n const base64 = value.replace(/=+$/, \"\");\n const size6 = base64.length;\n const decoded = new Uint8Array(size6 + 3);\n encoder5.encodeInto(base64 + \"===\", decoded);\n for (let i3 = 0, j2 = 0; i3 < base64.length; i3 += 4, j2 += 3) {\n const x4 = (characterToInteger[decoded[i3]] << 18) + (characterToInteger[decoded[i3 + 1]] << 12) + (characterToInteger[decoded[i3 + 2]] << 6) + characterToInteger[decoded[i3 + 3]];\n decoded[j2] = x4 >> 16;\n decoded[j2 + 1] = x4 >> 8 & 255;\n decoded[j2 + 2] = x4 & 255;\n }\n const decodedSize = (size6 >> 2) * 3 + (size6 % 4 && size6 % 4 - 1);\n return new Uint8Array(decoded.buffer, 0, decodedSize);\n }\n var encoder5, integerToCharacter, characterToInteger;\n var init_Base64 = __esm({\n \"../../../node_modules/.pnpm/ox@0.4.4_typescript@5.8.3_zod@3.25.64/node_modules/ox/_esm/core/Base64.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n encoder5 = /* @__PURE__ */ new TextEncoder();\n integerToCharacter = /* @__PURE__ */ Object.fromEntries(Array.from(\"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/\").map((a3, i3) => [i3, a3.charCodeAt(0)]));\n characterToInteger = {\n ...Object.fromEntries(Array.from(\"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/\").map((a3, i3) => [a3.charCodeAt(0), i3])),\n [\"=\".charCodeAt(0)]: 0,\n [\"-\".charCodeAt(0)]: 62,\n [\"_\".charCodeAt(0)]: 63\n };\n }\n });\n\n // ../../../node_modules/.pnpm/@noble+curves@1.9.7/node_modules/@noble/curves/esm/nist.js\n var p256_CURVE, p384_CURVE, p521_CURVE, Fp256, Fp384, Fp521, p256, p384, p521;\n var init_nist = __esm({\n \"../../../node_modules/.pnpm/@noble+curves@1.9.7/node_modules/@noble/curves/esm/nist.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_sha2();\n init_shortw_utils2();\n init_modular2();\n p256_CURVE = {\n p: BigInt(\"0xffffffff00000001000000000000000000000000ffffffffffffffffffffffff\"),\n n: BigInt(\"0xffffffff00000000ffffffffffffffffbce6faada7179e84f3b9cac2fc632551\"),\n h: BigInt(1),\n a: BigInt(\"0xffffffff00000001000000000000000000000000fffffffffffffffffffffffc\"),\n b: BigInt(\"0x5ac635d8aa3a93e7b3ebbd55769886bc651d06b0cc53b0f63bce3c3e27d2604b\"),\n Gx: BigInt(\"0x6b17d1f2e12c4247f8bce6e563a440f277037d812deb33a0f4a13945d898c296\"),\n Gy: BigInt(\"0x4fe342e2fe1a7f9b8ee7eb4a7c0f9e162bce33576b315ececbb6406837bf51f5\")\n };\n p384_CURVE = {\n p: BigInt(\"0xfffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffeffffffff0000000000000000ffffffff\"),\n n: BigInt(\"0xffffffffffffffffffffffffffffffffffffffffffffffffc7634d81f4372ddf581a0db248b0a77aecec196accc52973\"),\n h: BigInt(1),\n a: BigInt(\"0xfffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffeffffffff0000000000000000fffffffc\"),\n b: BigInt(\"0xb3312fa7e23ee7e4988e056be3f82d19181d9c6efe8141120314088f5013875ac656398d8a2ed19d2a85c8edd3ec2aef\"),\n Gx: BigInt(\"0xaa87ca22be8b05378eb1c71ef320ad746e1d3b628ba79b9859f741e082542a385502f25dbf55296c3a545e3872760ab7\"),\n Gy: BigInt(\"0x3617de4a96262c6f5d9e98bf9292dc29f8f41dbd289a147ce9da3113b5f0b8c00a60b1ce1d7e819d7a431d7c90ea0e5f\")\n };\n p521_CURVE = {\n p: BigInt(\"0x1ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff\"),\n n: BigInt(\"0x01fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffa51868783bf2f966b7fcc0148f709a5d03bb5c9b8899c47aebb6fb71e91386409\"),\n h: BigInt(1),\n a: BigInt(\"0x1fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc\"),\n b: BigInt(\"0x0051953eb9618e1c9a1f929a21a0b68540eea2da725b99b315f3b8b489918ef109e156193951ec7e937b1652c0bd3bb1bf073573df883d2c34f1ef451fd46b503f00\"),\n Gx: BigInt(\"0x00c6858e06b70404e9cd9e3ecb662395b4429c648139053fb521f828af606b4d3dbaa14b5e77efe75928fe1dc127a2ffa8de3348b3c1856a429bf97e7e31c2e5bd66\"),\n Gy: BigInt(\"0x011839296a789a3bc0045c8a5fb42c7d1bd998f54449579b446817afbd17273e662c97ee72995ef42640c550b9013fad0761353c7086a272c24088be94769fd16650\")\n };\n Fp256 = Field2(p256_CURVE.p);\n Fp384 = Field2(p384_CURVE.p);\n Fp521 = Field2(p521_CURVE.p);\n p256 = createCurve2({ ...p256_CURVE, Fp: Fp256, lowS: false }, sha256);\n p384 = createCurve2({ ...p384_CURVE, Fp: Fp384, lowS: false }, sha384);\n p521 = createCurve2({ ...p521_CURVE, Fp: Fp521, lowS: false, allowedPrivateKeyLengths: [130, 131, 132] }, sha512);\n }\n });\n\n // ../../../node_modules/.pnpm/@noble+curves@1.9.7/node_modules/@noble/curves/esm/p256.js\n var p2562;\n var init_p256 = __esm({\n \"../../../node_modules/.pnpm/@noble+curves@1.9.7/node_modules/@noble/curves/esm/p256.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_nist();\n p2562 = p256;\n }\n });\n\n // ../../../node_modules/.pnpm/ox@0.4.4_typescript@5.8.3_zod@3.25.64/node_modules/ox/_esm/core/internal/webauthn.js\n function parseAsn1Signature(bytes) {\n const r_start = bytes[4] === 0 ? 5 : 4;\n const r_end = r_start + 32;\n const s_start = bytes[r_end + 2] === 0 ? r_end + 3 : r_end + 2;\n const r2 = BigInt(fromBytes4(bytes.slice(r_start, r_end)));\n const s4 = BigInt(fromBytes4(bytes.slice(s_start)));\n return {\n r: r2,\n s: s4 > p2562.CURVE.n / 2n ? p2562.CURVE.n - s4 : s4\n };\n }\n var init_webauthn = __esm({\n \"../../../node_modules/.pnpm/ox@0.4.4_typescript@5.8.3_zod@3.25.64/node_modules/ox/_esm/core/internal/webauthn.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_p256();\n init_Hex2();\n }\n });\n\n // ../../../node_modules/.pnpm/ox@0.4.4_typescript@5.8.3_zod@3.25.64/node_modules/ox/_esm/core/WebAuthnP256.js\n function getCredentialRequestOptions(options) {\n const { credentialId, challenge: challenge2, rpId = window.location.hostname, userVerification = \"required\" } = options;\n return {\n publicKey: {\n ...credentialId ? {\n allowCredentials: [\n {\n id: toBytes4(credentialId),\n type: \"public-key\"\n }\n ]\n } : {},\n challenge: fromHex6(challenge2),\n rpId,\n userVerification\n }\n };\n }\n async function sign2(options) {\n const { getFn = window.navigator.credentials.get.bind(window.navigator.credentials), ...rest } = options;\n const requestOptions = getCredentialRequestOptions(rest);\n try {\n const credential = await getFn(requestOptions);\n if (!credential)\n throw new CredentialRequestFailedError();\n const response = credential.response;\n const clientDataJSON = String.fromCharCode(...new Uint8Array(response.clientDataJSON));\n const challengeIndex = clientDataJSON.indexOf('\"challenge\"');\n const typeIndex = clientDataJSON.indexOf('\"type\"');\n const signature = parseAsn1Signature(new Uint8Array(response.signature));\n return {\n metadata: {\n authenticatorData: fromBytes4(new Uint8Array(response.authenticatorData)),\n clientDataJSON,\n challengeIndex,\n typeIndex,\n userVerificationRequired: requestOptions.publicKey.userVerification === \"required\"\n },\n signature,\n raw: credential\n };\n } catch (error) {\n throw new CredentialRequestFailedError({\n cause: error\n });\n }\n }\n var createChallenge, CredentialRequestFailedError;\n var init_WebAuthnP256 = __esm({\n \"../../../node_modules/.pnpm/ox@0.4.4_typescript@5.8.3_zod@3.25.64/node_modules/ox/_esm/core/WebAuthnP256.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_Base64();\n init_Bytes2();\n init_Errors2();\n init_Hex2();\n init_webauthn();\n createChallenge = Uint8Array.from([\n 105,\n 171,\n 180,\n 181,\n 160,\n 222,\n 75,\n 198,\n 42,\n 42,\n 32,\n 31,\n 141,\n 37,\n 186,\n 233\n ]);\n CredentialRequestFailedError = class extends BaseError7 {\n constructor({ cause } = {}) {\n super(\"Failed to request credential.\", {\n cause\n });\n Object.defineProperty(this, \"name\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: \"WebAuthnP256.CredentialRequestFailedError\"\n });\n }\n };\n }\n });\n\n // ../../../node_modules/.pnpm/@account-kit+smart-contracts@4.62.0_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5._65dee0153d50ca3a2d2c6830319271d9/node_modules/@account-kit/smart-contracts/dist/esm/src/ma-v2/modules/webauthn-validation/signingMethods.js\n var webauthnSigningFunctions;\n var init_signingMethods = __esm({\n \"../../../node_modules/.pnpm/@account-kit+smart-contracts@4.62.0_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5._65dee0153d50ca3a2d2c6830319271d9/node_modules/@account-kit/smart-contracts/dist/esm/src/ma-v2/modules/webauthn-validation/signingMethods.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_WebAuthnP256();\n init_esm();\n init_utils17();\n init_utils16();\n webauthnSigningFunctions = (credential, getFn, rpId, chain2, accountAddress, entityId, deferredActionData) => {\n const { id, publicKey } = credential;\n const sign3 = async ({ hash: hash3 }) => {\n const { metadata, signature } = await sign2({\n credentialId: id,\n getFn,\n challenge: hash3,\n rpId\n });\n return encodeAbiParameters([\n {\n name: \"params\",\n type: \"tuple\",\n components: [\n { name: \"authenticatorData\", type: \"bytes\" },\n { name: \"clientDataJSON\", type: \"string\" },\n { name: \"challengeIndex\", type: \"uint256\" },\n { name: \"typeIndex\", type: \"uint256\" },\n { name: \"r\", type: \"uint256\" },\n { name: \"s\", type: \"uint256\" }\n ]\n }\n ], [\n {\n authenticatorData: metadata.authenticatorData,\n clientDataJSON: metadata.clientDataJSON,\n challengeIndex: BigInt(metadata.challengeIndex),\n typeIndex: BigInt(metadata.typeIndex),\n r: signature.r,\n s: signature.s\n }\n ]);\n };\n return {\n id,\n publicKey,\n getDummySignature: () => \"0xff000000000000000000000000000000000000000000000000000000000000002000000000000000000000000000000000000000000000000000000000000000c0000000000000000000000000000000000000000000000000000000000000012000000000000000000000000000000000000000000000000000000000000000170000000000000000000000000000000000000000000000000000000000000001949fc7c88032b9fcb5f6efc7a7b8c63668eae9871b765e23123bb473ff57aa831a7c0d9276168ebcc29f2875a0239cffdf2a9cd1c2007c5c77c071db9264df1d000000000000000000000000000000000000000000000000000000000000002549960de5880e8c687434170f6476605b8fe4aeb9a28632c7995cf3ba831d97630500000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000008a7b2274797065223a22776562617574686e2e676574222c226368616c6c656e6765223a2273496a396e6164474850596759334b7156384f7a4a666c726275504b474f716d59576f4d57516869467773222c226f726967696e223a2268747470733a2f2f7369676e2e636f696e626173652e636f6d222c2263726f73734f726967696e223a66616c73657d00000000000000000000000000000000000000000000\",\n sign: sign3,\n signUserOperationHash: async (uoHash) => {\n let sig = await sign3({ hash: hashMessage({ raw: uoHash }) });\n if (deferredActionData) {\n sig = concatHex([deferredActionData, sig]);\n deferredActionData = void 0;\n }\n return concatHex([\"0xff\", sig]);\n },\n async signMessage({ message }) {\n const hash3 = hashTypedData({\n domain: {\n chainId: Number(chain2.id),\n verifyingContract: getDefaultWebauthnValidationModuleAddress(chain2),\n salt: concatHex([`0x${\"00\".repeat(12)}`, accountAddress])\n },\n types: {\n ReplaySafeHash: [{ name: \"hash\", type: \"bytes32\" }]\n },\n message: {\n hash: hashMessage(message)\n },\n primaryType: \"ReplaySafeHash\"\n });\n return pack1271Signature({\n validationSignature: await sign3({ hash: hash3 }),\n entityId\n });\n },\n signTypedData: async (typedDataDefinition) => {\n const isDeferredAction = typedDataDefinition?.primaryType === \"DeferredAction\" && // @ts-expect-error the domain type I think changed in viem, so this is not working correctly (TODO: fix this)\n \"verifyingContract\" in typedDataDefinition.domain && typedDataDefinition.domain.verifyingContract === accountAddress;\n const hash3 = await hashTypedData({\n domain: {\n chainId: Number(chain2.id),\n verifyingContract: getDefaultWebauthnValidationModuleAddress(chain2),\n salt: concatHex([`0x${\"00\".repeat(12)}`, accountAddress])\n },\n types: {\n ReplaySafeHash: [{ name: \"hash\", type: \"bytes32\" }]\n },\n message: {\n hash: hashTypedData(typedDataDefinition)\n },\n primaryType: \"ReplaySafeHash\"\n });\n const validationSignature = await sign3({ hash: hash3 });\n return isDeferredAction ? pack1271Signature({ validationSignature, entityId }) : validationSignature;\n }\n };\n };\n }\n });\n\n // ../../../node_modules/.pnpm/@account-kit+smart-contracts@4.62.0_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5._65dee0153d50ca3a2d2c6830319271d9/node_modules/@account-kit/smart-contracts/dist/esm/src/ma-v2/account/nativeSMASigner.js\n var nativeSMASigner;\n var init_nativeSMASigner = __esm({\n \"../../../node_modules/.pnpm/@account-kit+smart-contracts@4.62.0_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5._65dee0153d50ca3a2d2c6830319271d9/node_modules/@account-kit/smart-contracts/dist/esm/src/ma-v2/account/nativeSMASigner.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_esm();\n init_utils17();\n init_utils16();\n nativeSMASigner = (signer, chain2, accountAddress, deferredActionData) => {\n const signingMethods = {\n prepareSign: async (request) => {\n let hash3;\n switch (request.type) {\n case \"personal_sign\":\n hash3 = hashMessage(request.data);\n break;\n case \"eth_signTypedData_v4\":\n const isDeferredAction = request.data?.primaryType === \"DeferredAction\" && request.data?.domain?.verifyingContract === accountAddress;\n if (isDeferredAction) {\n return request;\n } else {\n hash3 = await hashTypedData(request.data);\n break;\n }\n default:\n assertNeverSignatureRequestType();\n }\n return {\n type: \"eth_signTypedData_v4\",\n data: {\n domain: {\n chainId: Number(chain2.id),\n verifyingContract: accountAddress\n },\n types: {\n ReplaySafeHash: [{ name: \"hash\", type: \"bytes32\" }]\n },\n message: {\n hash: hash3\n },\n primaryType: \"ReplaySafeHash\"\n }\n };\n },\n formatSign: async (signature) => {\n return pack1271Signature({\n validationSignature: signature,\n entityId: DEFAULT_OWNER_ENTITY_ID\n });\n }\n };\n return {\n ...signingMethods,\n getDummySignature: () => {\n const sig = packUOSignature({\n // orderedHookData: [],\n validationSignature: \"0xfffffffffffffffffffffffffffffff0000000000000000000000000000000007aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa1c\"\n });\n return deferredActionData ? concatHex([deferredActionData, sig]) : sig;\n },\n signUserOperationHash: async (uoHash) => {\n let sig = await signer.signMessage({ raw: uoHash }).then((signature) => packUOSignature({\n // orderedHookData: [],\n validationSignature: signature\n }));\n if (deferredActionData) {\n sig = concatHex([deferredActionData, sig]);\n deferredActionData = void 0;\n }\n return sig;\n },\n // we apply the expected 1271 packing here since the account contract will expect it\n async signMessage({ message }) {\n const { type, data } = await signingMethods.prepareSign({\n type: \"personal_sign\",\n data: message\n });\n if (type !== \"eth_signTypedData_v4\") {\n throw new Error(\"Invalid signature request type\");\n }\n const sig = await signer.signTypedData(data);\n return signingMethods.formatSign(sig);\n },\n // TODO: maybe move \"sign deferred actions\" to a separate function?\n // we don't apply the expected 1271 packing since deferred sigs use typed data sigs and don't expect the 1271 packing\n signTypedData: async (typedDataDefinition) => {\n const { type, data } = await signingMethods.prepareSign({\n type: \"eth_signTypedData_v4\",\n data: typedDataDefinition\n });\n if (type !== \"eth_signTypedData_v4\") {\n throw new Error(\"Invalid signature request type\");\n }\n const sig = await signer.signTypedData(data);\n const isDeferredAction = typedDataDefinition.primaryType === \"DeferredAction\" && typedDataDefinition.domain != null && // @ts-expect-error the domain type I think changed in viem, so this is not working correctly (TODO: fix this)\n \"verifyingContract\" in typedDataDefinition.domain && typedDataDefinition.domain.verifyingContract === accountAddress;\n return isDeferredAction ? concat([SignatureType2.EOA, sig]) : signingMethods.formatSign(sig);\n }\n };\n };\n }\n });\n\n // ../../../node_modules/.pnpm/@account-kit+smart-contracts@4.62.0_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5._65dee0153d50ca3a2d2c6830319271d9/node_modules/@account-kit/smart-contracts/dist/esm/src/ma-v2/account/common/modularAccountV2Base.js\n async function createMAv2Base(config2) {\n let { transport, chain: chain2, entryPoint = getEntryPoint(chain2, { version: \"0.7.0\" }), signerEntity = {\n isGlobalValidation: true,\n entityId: DEFAULT_OWNER_ENTITY_ID\n }, signerEntity: { isGlobalValidation = true, entityId = DEFAULT_OWNER_ENTITY_ID } = {}, accountAddress, deferredAction, ...remainingToSmartContractAccountParams } = config2;\n const signer = \"signer\" in config2 ? config2.signer : void 0;\n const credential = \"credential\" in config2 ? config2.credential : void 0;\n const getFn = \"getFn\" in config2 ? config2.getFn : void 0;\n const rpId = \"rpId\" in config2 ? config2.rpId : void 0;\n if (entityId > Number(maxUint32)) {\n throw new InvalidEntityIdError(entityId);\n }\n const client = createBundlerClient({\n transport,\n chain: chain2\n });\n const entryPointContract = getContract({\n address: entryPoint.address,\n abi: entryPoint.abi,\n client\n });\n let nonce;\n let deferredActionData;\n let hasAssociatedExecHooks = false;\n if (deferredAction) {\n let deferredActionNonce = 0n;\n ({\n entityId,\n isGlobalValidation,\n nonce: deferredActionNonce\n } = parseDeferredAction(deferredAction));\n const nextNonceForDeferredAction = await entryPointContract.read.getNonce([\n accountAddress,\n deferredActionNonce >> 64n\n ]);\n if (deferredActionNonce === nextNonceForDeferredAction) {\n ({ nonce, deferredActionData, hasAssociatedExecHooks } = parseDeferredAction(deferredAction));\n } else if (deferredActionNonce > nextNonceForDeferredAction) {\n throw new InvalidDeferredActionNonce();\n }\n }\n const encodeExecute = async ({ target, data, value }) => await encodeCallData(encodeFunctionData({\n abi: modularAccountAbi,\n functionName: \"execute\",\n args: [target, value ?? 0n, data]\n }));\n const encodeBatchExecute = async (txs) => await encodeCallData(encodeFunctionData({\n abi: modularAccountAbi,\n functionName: \"executeBatch\",\n args: [\n txs.map((tx) => ({\n target: tx.target,\n data: tx.data,\n value: tx.value ?? 0n\n }))\n ]\n }));\n const isAccountDeployed = async () => !!await client.getCode({ address: accountAddress });\n const getNonce = async (nonceKey = 0n) => {\n if (nonce) {\n const tempNonce = nonce;\n nonce = void 0;\n return tempNonce;\n }\n if (nonceKey > maxUint152) {\n throw new InvalidNonceKeyError(nonceKey);\n }\n const fullNonceKey = (nonceKey << 40n) + (BigInt(entityId) << 8n) + (isGlobalValidation ? 1n : 0n);\n return entryPointContract.read.getNonce([\n accountAddress,\n fullNonceKey\n ]);\n };\n const accountContract = getContract({\n address: accountAddress,\n abi: modularAccountAbi,\n client\n });\n const getExecutionData = async (selector) => {\n if (!await isAccountDeployed()) {\n return {\n module: zeroAddress,\n skipRuntimeValidation: false,\n allowGlobalValidation: false,\n executionHooks: []\n };\n }\n return await accountContract.read.getExecutionData([selector]);\n };\n const getValidationData = async (args) => {\n if (!await isAccountDeployed()) {\n return {\n validationHooks: [],\n executionHooks: [],\n selectors: [],\n validationFlags: 0\n };\n }\n const { validationModuleAddress, entityId: entityId2 } = args;\n return await accountContract.read.getValidationData([\n serializeModuleEntity({\n moduleAddress: validationModuleAddress ?? zeroAddress,\n entityId: entityId2 ?? Number(maxUint32)\n })\n ]);\n };\n const encodeCallData = async (callData) => {\n const validationData = await getValidationData({\n entityId: Number(entityId)\n });\n if (hasAssociatedExecHooks) {\n hasAssociatedExecHooks = false;\n return concatHex([executeUserOpSelector, callData]);\n }\n if (validationData.executionHooks.length) {\n return concatHex([executeUserOpSelector, callData]);\n }\n return callData;\n };\n const baseAccount = await toSmartContractAccount({\n ...remainingToSmartContractAccountParams,\n transport,\n chain: chain2,\n entryPoint,\n accountAddress,\n encodeExecute,\n encodeBatchExecute,\n getNonce,\n ...signer ? entityId === DEFAULT_OWNER_ENTITY_ID ? nativeSMASigner(signer, chain2, accountAddress, deferredActionData) : singleSignerMessageSigner(signer, chain2, accountAddress, entityId, deferredActionData) : webauthnSigningFunctions(\n // credential required for webauthn mode is checked at modularAccountV2 creation level\n credential,\n getFn,\n rpId,\n chain2,\n accountAddress,\n entityId,\n deferredActionData\n )\n });\n if (!signer) {\n return {\n ...baseAccount,\n signerEntity,\n getExecutionData,\n getValidationData,\n encodeCallData\n };\n }\n return {\n ...baseAccount,\n getSigner: () => signer,\n signerEntity,\n getExecutionData,\n getValidationData,\n encodeCallData\n };\n }\n var executeUserOpSelector;\n var init_modularAccountV2Base = __esm({\n \"../../../node_modules/.pnpm/@account-kit+smart-contracts@4.62.0_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5._65dee0153d50ca3a2d2c6830319271d9/node_modules/@account-kit/smart-contracts/dist/esm/src/ma-v2/account/common/modularAccountV2Base.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_esm6();\n init_esm();\n init_modularAccountAbi();\n init_utils15();\n init_signer5();\n init_signingMethods();\n init_utils17();\n init_nativeSMASigner();\n executeUserOpSelector = \"0x8DD7712F\";\n }\n });\n\n // ../../../node_modules/.pnpm/@account-kit+smart-contracts@4.62.0_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5._65dee0153d50ca3a2d2c6830319271d9/node_modules/@account-kit/smart-contracts/dist/esm/src/ma-v2/abis/semiModularAccountStorageAbi.js\n var semiModularAccountStorageAbi;\n var init_semiModularAccountStorageAbi = __esm({\n \"../../../node_modules/.pnpm/@account-kit+smart-contracts@4.62.0_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5._65dee0153d50ca3a2d2c6830319271d9/node_modules/@account-kit/smart-contracts/dist/esm/src/ma-v2/abis/semiModularAccountStorageAbi.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n semiModularAccountStorageAbi = [\n {\n type: \"constructor\",\n inputs: [\n {\n name: \"entryPoint\",\n type: \"address\",\n internalType: \"contract IEntryPoint\"\n },\n {\n name: \"executionInstallDelegate\",\n type: \"address\",\n internalType: \"contract ExecutionInstallDelegate\"\n }\n ],\n stateMutability: \"nonpayable\"\n },\n {\n type: \"fallback\",\n stateMutability: \"payable\"\n },\n {\n type: \"receive\",\n stateMutability: \"payable\"\n },\n {\n type: \"function\",\n name: \"accountId\",\n inputs: [],\n outputs: [\n {\n name: \"\",\n type: \"string\",\n internalType: \"string\"\n }\n ],\n stateMutability: \"pure\"\n },\n {\n type: \"function\",\n name: \"entryPoint\",\n inputs: [],\n outputs: [\n {\n name: \"\",\n type: \"address\",\n internalType: \"contract IEntryPoint\"\n }\n ],\n stateMutability: \"view\"\n },\n {\n type: \"function\",\n name: \"execute\",\n inputs: [\n {\n name: \"target\",\n type: \"address\",\n internalType: \"address\"\n },\n {\n name: \"value\",\n type: \"uint256\",\n internalType: \"uint256\"\n },\n {\n name: \"data\",\n type: \"bytes\",\n internalType: \"bytes\"\n }\n ],\n outputs: [\n {\n name: \"result\",\n type: \"bytes\",\n internalType: \"bytes\"\n }\n ],\n stateMutability: \"payable\"\n },\n {\n type: \"function\",\n name: \"executeBatch\",\n inputs: [\n {\n name: \"calls\",\n type: \"tuple[]\",\n internalType: \"struct Call[]\",\n components: [\n {\n name: \"target\",\n type: \"address\",\n internalType: \"address\"\n },\n {\n name: \"value\",\n type: \"uint256\",\n internalType: \"uint256\"\n },\n {\n name: \"data\",\n type: \"bytes\",\n internalType: \"bytes\"\n }\n ]\n }\n ],\n outputs: [\n {\n name: \"results\",\n type: \"bytes[]\",\n internalType: \"bytes[]\"\n }\n ],\n stateMutability: \"payable\"\n },\n {\n type: \"function\",\n name: \"executeUserOp\",\n inputs: [\n {\n name: \"userOp\",\n type: \"tuple\",\n internalType: \"struct PackedUserOperation\",\n components: [\n {\n name: \"sender\",\n type: \"address\",\n internalType: \"address\"\n },\n {\n name: \"nonce\",\n type: \"uint256\",\n internalType: \"uint256\"\n },\n {\n name: \"initCode\",\n type: \"bytes\",\n internalType: \"bytes\"\n },\n {\n name: \"callData\",\n type: \"bytes\",\n internalType: \"bytes\"\n },\n {\n name: \"accountGasLimits\",\n type: \"bytes32\",\n internalType: \"bytes32\"\n },\n {\n name: \"preVerificationGas\",\n type: \"uint256\",\n internalType: \"uint256\"\n },\n {\n name: \"gasFees\",\n type: \"bytes32\",\n internalType: \"bytes32\"\n },\n {\n name: \"paymasterAndData\",\n type: \"bytes\",\n internalType: \"bytes\"\n },\n {\n name: \"signature\",\n type: \"bytes\",\n internalType: \"bytes\"\n }\n ]\n },\n {\n name: \"\",\n type: \"bytes32\",\n internalType: \"bytes32\"\n }\n ],\n outputs: [],\n stateMutability: \"nonpayable\"\n },\n {\n type: \"function\",\n name: \"executeWithRuntimeValidation\",\n inputs: [\n {\n name: \"data\",\n type: \"bytes\",\n internalType: \"bytes\"\n },\n {\n name: \"authorization\",\n type: \"bytes\",\n internalType: \"bytes\"\n }\n ],\n outputs: [\n {\n name: \"\",\n type: \"bytes\",\n internalType: \"bytes\"\n }\n ],\n stateMutability: \"payable\"\n },\n {\n type: \"function\",\n name: \"getExecutionData\",\n inputs: [\n {\n name: \"selector\",\n type: \"bytes4\",\n internalType: \"bytes4\"\n }\n ],\n outputs: [\n {\n name: \"data\",\n type: \"tuple\",\n internalType: \"struct ExecutionDataView\",\n components: [\n {\n name: \"module\",\n type: \"address\",\n internalType: \"address\"\n },\n {\n name: \"skipRuntimeValidation\",\n type: \"bool\",\n internalType: \"bool\"\n },\n {\n name: \"allowGlobalValidation\",\n type: \"bool\",\n internalType: \"bool\"\n },\n {\n name: \"executionHooks\",\n type: \"bytes25[]\",\n internalType: \"HookConfig[]\"\n }\n ]\n }\n ],\n stateMutability: \"view\"\n },\n {\n type: \"function\",\n name: \"getFallbackSignerData\",\n inputs: [],\n outputs: [\n {\n name: \"\",\n type: \"address\",\n internalType: \"address\"\n },\n {\n name: \"\",\n type: \"bool\",\n internalType: \"bool\"\n }\n ],\n stateMutability: \"view\"\n },\n {\n type: \"function\",\n name: \"getValidationData\",\n inputs: [\n {\n name: \"validationFunction\",\n type: \"bytes24\",\n internalType: \"ModuleEntity\"\n }\n ],\n outputs: [\n {\n name: \"data\",\n type: \"tuple\",\n internalType: \"struct ValidationDataView\",\n components: [\n {\n name: \"validationFlags\",\n type: \"uint8\",\n internalType: \"ValidationFlags\"\n },\n {\n name: \"validationHooks\",\n type: \"bytes25[]\",\n internalType: \"HookConfig[]\"\n },\n {\n name: \"executionHooks\",\n type: \"bytes25[]\",\n internalType: \"HookConfig[]\"\n },\n {\n name: \"selectors\",\n type: \"bytes4[]\",\n internalType: \"bytes4[]\"\n }\n ]\n }\n ],\n stateMutability: \"view\"\n },\n {\n type: \"function\",\n name: \"initialize\",\n inputs: [\n {\n name: \"initialSigner\",\n type: \"address\",\n internalType: \"address\"\n }\n ],\n outputs: [],\n stateMutability: \"nonpayable\"\n },\n {\n type: \"function\",\n name: \"installExecution\",\n inputs: [\n {\n name: \"module\",\n type: \"address\",\n internalType: \"address\"\n },\n {\n name: \"manifest\",\n type: \"tuple\",\n internalType: \"struct ExecutionManifest\",\n components: [\n {\n name: \"executionFunctions\",\n type: \"tuple[]\",\n internalType: \"struct ManifestExecutionFunction[]\",\n components: [\n {\n name: \"executionSelector\",\n type: \"bytes4\",\n internalType: \"bytes4\"\n },\n {\n name: \"skipRuntimeValidation\",\n type: \"bool\",\n internalType: \"bool\"\n },\n {\n name: \"allowGlobalValidation\",\n type: \"bool\",\n internalType: \"bool\"\n }\n ]\n },\n {\n name: \"executionHooks\",\n type: \"tuple[]\",\n internalType: \"struct ManifestExecutionHook[]\",\n components: [\n {\n name: \"executionSelector\",\n type: \"bytes4\",\n internalType: \"bytes4\"\n },\n {\n name: \"entityId\",\n type: \"uint32\",\n internalType: \"uint32\"\n },\n {\n name: \"isPreHook\",\n type: \"bool\",\n internalType: \"bool\"\n },\n {\n name: \"isPostHook\",\n type: \"bool\",\n internalType: \"bool\"\n }\n ]\n },\n {\n name: \"interfaceIds\",\n type: \"bytes4[]\",\n internalType: \"bytes4[]\"\n }\n ]\n },\n {\n name: \"moduleInstallData\",\n type: \"bytes\",\n internalType: \"bytes\"\n }\n ],\n outputs: [],\n stateMutability: \"nonpayable\"\n },\n {\n type: \"function\",\n name: \"installValidation\",\n inputs: [\n {\n name: \"validationConfig\",\n type: \"bytes25\",\n internalType: \"ValidationConfig\"\n },\n {\n name: \"selectors\",\n type: \"bytes4[]\",\n internalType: \"bytes4[]\"\n },\n {\n name: \"installData\",\n type: \"bytes\",\n internalType: \"bytes\"\n },\n {\n name: \"hooks\",\n type: \"bytes[]\",\n internalType: \"bytes[]\"\n }\n ],\n outputs: [],\n stateMutability: \"nonpayable\"\n },\n {\n type: \"function\",\n name: \"isValidSignature\",\n inputs: [\n {\n name: \"hash\",\n type: \"bytes32\",\n internalType: \"bytes32\"\n },\n {\n name: \"signature\",\n type: \"bytes\",\n internalType: \"bytes\"\n }\n ],\n outputs: [\n {\n name: \"\",\n type: \"bytes4\",\n internalType: \"bytes4\"\n }\n ],\n stateMutability: \"view\"\n },\n {\n type: \"function\",\n name: \"onERC1155BatchReceived\",\n inputs: [\n {\n name: \"\",\n type: \"address\",\n internalType: \"address\"\n },\n {\n name: \"\",\n type: \"address\",\n internalType: \"address\"\n },\n {\n name: \"\",\n type: \"uint256[]\",\n internalType: \"uint256[]\"\n },\n {\n name: \"\",\n type: \"uint256[]\",\n internalType: \"uint256[]\"\n },\n {\n name: \"\",\n type: \"bytes\",\n internalType: \"bytes\"\n }\n ],\n outputs: [\n {\n name: \"\",\n type: \"bytes4\",\n internalType: \"bytes4\"\n }\n ],\n stateMutability: \"pure\"\n },\n {\n type: \"function\",\n name: \"onERC1155Received\",\n inputs: [\n {\n name: \"\",\n type: \"address\",\n internalType: \"address\"\n },\n {\n name: \"\",\n type: \"address\",\n internalType: \"address\"\n },\n {\n name: \"\",\n type: \"uint256\",\n internalType: \"uint256\"\n },\n {\n name: \"\",\n type: \"uint256\",\n internalType: \"uint256\"\n },\n {\n name: \"\",\n type: \"bytes\",\n internalType: \"bytes\"\n }\n ],\n outputs: [\n {\n name: \"\",\n type: \"bytes4\",\n internalType: \"bytes4\"\n }\n ],\n stateMutability: \"pure\"\n },\n {\n type: \"function\",\n name: \"onERC721Received\",\n inputs: [\n {\n name: \"\",\n type: \"address\",\n internalType: \"address\"\n },\n {\n name: \"\",\n type: \"address\",\n internalType: \"address\"\n },\n {\n name: \"\",\n type: \"uint256\",\n internalType: \"uint256\"\n },\n {\n name: \"\",\n type: \"bytes\",\n internalType: \"bytes\"\n }\n ],\n outputs: [\n {\n name: \"\",\n type: \"bytes4\",\n internalType: \"bytes4\"\n }\n ],\n stateMutability: \"pure\"\n },\n {\n type: \"function\",\n name: \"performCreate\",\n inputs: [\n {\n name: \"value\",\n type: \"uint256\",\n internalType: \"uint256\"\n },\n {\n name: \"initCode\",\n type: \"bytes\",\n internalType: \"bytes\"\n },\n {\n name: \"isCreate2\",\n type: \"bool\",\n internalType: \"bool\"\n },\n {\n name: \"salt\",\n type: \"bytes32\",\n internalType: \"bytes32\"\n }\n ],\n outputs: [\n {\n name: \"createdAddr\",\n type: \"address\",\n internalType: \"address\"\n }\n ],\n stateMutability: \"payable\"\n },\n {\n type: \"function\",\n name: \"proxiableUUID\",\n inputs: [],\n outputs: [\n {\n name: \"\",\n type: \"bytes32\",\n internalType: \"bytes32\"\n }\n ],\n stateMutability: \"view\"\n },\n {\n type: \"function\",\n name: \"supportsInterface\",\n inputs: [\n {\n name: \"interfaceId\",\n type: \"bytes4\",\n internalType: \"bytes4\"\n }\n ],\n outputs: [\n {\n name: \"\",\n type: \"bool\",\n internalType: \"bool\"\n }\n ],\n stateMutability: \"view\"\n },\n {\n type: \"function\",\n name: \"uninstallExecution\",\n inputs: [\n {\n name: \"module\",\n type: \"address\",\n internalType: \"address\"\n },\n {\n name: \"manifest\",\n type: \"tuple\",\n internalType: \"struct ExecutionManifest\",\n components: [\n {\n name: \"executionFunctions\",\n type: \"tuple[]\",\n internalType: \"struct ManifestExecutionFunction[]\",\n components: [\n {\n name: \"executionSelector\",\n type: \"bytes4\",\n internalType: \"bytes4\"\n },\n {\n name: \"skipRuntimeValidation\",\n type: \"bool\",\n internalType: \"bool\"\n },\n {\n name: \"allowGlobalValidation\",\n type: \"bool\",\n internalType: \"bool\"\n }\n ]\n },\n {\n name: \"executionHooks\",\n type: \"tuple[]\",\n internalType: \"struct ManifestExecutionHook[]\",\n components: [\n {\n name: \"executionSelector\",\n type: \"bytes4\",\n internalType: \"bytes4\"\n },\n {\n name: \"entityId\",\n type: \"uint32\",\n internalType: \"uint32\"\n },\n {\n name: \"isPreHook\",\n type: \"bool\",\n internalType: \"bool\"\n },\n {\n name: \"isPostHook\",\n type: \"bool\",\n internalType: \"bool\"\n }\n ]\n },\n {\n name: \"interfaceIds\",\n type: \"bytes4[]\",\n internalType: \"bytes4[]\"\n }\n ]\n },\n {\n name: \"moduleUninstallData\",\n type: \"bytes\",\n internalType: \"bytes\"\n }\n ],\n outputs: [],\n stateMutability: \"nonpayable\"\n },\n {\n type: \"function\",\n name: \"uninstallValidation\",\n inputs: [\n {\n name: \"validationFunction\",\n type: \"bytes24\",\n internalType: \"ModuleEntity\"\n },\n {\n name: \"uninstallData\",\n type: \"bytes\",\n internalType: \"bytes\"\n },\n {\n name: \"hookUninstallData\",\n type: \"bytes[]\",\n internalType: \"bytes[]\"\n }\n ],\n outputs: [],\n stateMutability: \"nonpayable\"\n },\n {\n type: \"function\",\n name: \"updateFallbackSignerData\",\n inputs: [\n {\n name: \"fallbackSigner\",\n type: \"address\",\n internalType: \"address\"\n },\n {\n name: \"isDisabled\",\n type: \"bool\",\n internalType: \"bool\"\n }\n ],\n outputs: [],\n stateMutability: \"nonpayable\"\n },\n {\n type: \"function\",\n name: \"upgradeToAndCall\",\n inputs: [\n {\n name: \"newImplementation\",\n type: \"address\",\n internalType: \"address\"\n },\n {\n name: \"data\",\n type: \"bytes\",\n internalType: \"bytes\"\n }\n ],\n outputs: [],\n stateMutability: \"payable\"\n },\n {\n type: \"function\",\n name: \"validateUserOp\",\n inputs: [\n {\n name: \"userOp\",\n type: \"tuple\",\n internalType: \"struct PackedUserOperation\",\n components: [\n {\n name: \"sender\",\n type: \"address\",\n internalType: \"address\"\n },\n {\n name: \"nonce\",\n type: \"uint256\",\n internalType: \"uint256\"\n },\n {\n name: \"initCode\",\n type: \"bytes\",\n internalType: \"bytes\"\n },\n {\n name: \"callData\",\n type: \"bytes\",\n internalType: \"bytes\"\n },\n {\n name: \"accountGasLimits\",\n type: \"bytes32\",\n internalType: \"bytes32\"\n },\n {\n name: \"preVerificationGas\",\n type: \"uint256\",\n internalType: \"uint256\"\n },\n {\n name: \"gasFees\",\n type: \"bytes32\",\n internalType: \"bytes32\"\n },\n {\n name: \"paymasterAndData\",\n type: \"bytes\",\n internalType: \"bytes\"\n },\n {\n name: \"signature\",\n type: \"bytes\",\n internalType: \"bytes\"\n }\n ]\n },\n {\n name: \"userOpHash\",\n type: \"bytes32\",\n internalType: \"bytes32\"\n },\n {\n name: \"missingAccountFunds\",\n type: \"uint256\",\n internalType: \"uint256\"\n }\n ],\n outputs: [\n {\n name: \"validationData\",\n type: \"uint256\",\n internalType: \"uint256\"\n }\n ],\n stateMutability: \"nonpayable\"\n },\n {\n type: \"event\",\n name: \"ExecutionInstalled\",\n inputs: [\n {\n name: \"module\",\n type: \"address\",\n indexed: true,\n internalType: \"address\"\n },\n {\n name: \"manifest\",\n type: \"tuple\",\n indexed: false,\n internalType: \"struct ExecutionManifest\",\n components: [\n {\n name: \"executionFunctions\",\n type: \"tuple[]\",\n internalType: \"struct ManifestExecutionFunction[]\",\n components: [\n {\n name: \"executionSelector\",\n type: \"bytes4\",\n internalType: \"bytes4\"\n },\n {\n name: \"skipRuntimeValidation\",\n type: \"bool\",\n internalType: \"bool\"\n },\n {\n name: \"allowGlobalValidation\",\n type: \"bool\",\n internalType: \"bool\"\n }\n ]\n },\n {\n name: \"executionHooks\",\n type: \"tuple[]\",\n internalType: \"struct ManifestExecutionHook[]\",\n components: [\n {\n name: \"executionSelector\",\n type: \"bytes4\",\n internalType: \"bytes4\"\n },\n {\n name: \"entityId\",\n type: \"uint32\",\n internalType: \"uint32\"\n },\n {\n name: \"isPreHook\",\n type: \"bool\",\n internalType: \"bool\"\n },\n {\n name: \"isPostHook\",\n type: \"bool\",\n internalType: \"bool\"\n }\n ]\n },\n {\n name: \"interfaceIds\",\n type: \"bytes4[]\",\n internalType: \"bytes4[]\"\n }\n ]\n }\n ],\n anonymous: false\n },\n {\n type: \"event\",\n name: \"ExecutionUninstalled\",\n inputs: [\n {\n name: \"module\",\n type: \"address\",\n indexed: true,\n internalType: \"address\"\n },\n {\n name: \"onUninstallSucceeded\",\n type: \"bool\",\n indexed: false,\n internalType: \"bool\"\n },\n {\n name: \"manifest\",\n type: \"tuple\",\n indexed: false,\n internalType: \"struct ExecutionManifest\",\n components: [\n {\n name: \"executionFunctions\",\n type: \"tuple[]\",\n internalType: \"struct ManifestExecutionFunction[]\",\n components: [\n {\n name: \"executionSelector\",\n type: \"bytes4\",\n internalType: \"bytes4\"\n },\n {\n name: \"skipRuntimeValidation\",\n type: \"bool\",\n internalType: \"bool\"\n },\n {\n name: \"allowGlobalValidation\",\n type: \"bool\",\n internalType: \"bool\"\n }\n ]\n },\n {\n name: \"executionHooks\",\n type: \"tuple[]\",\n internalType: \"struct ManifestExecutionHook[]\",\n components: [\n {\n name: \"executionSelector\",\n type: \"bytes4\",\n internalType: \"bytes4\"\n },\n {\n name: \"entityId\",\n type: \"uint32\",\n internalType: \"uint32\"\n },\n {\n name: \"isPreHook\",\n type: \"bool\",\n internalType: \"bool\"\n },\n {\n name: \"isPostHook\",\n type: \"bool\",\n internalType: \"bool\"\n }\n ]\n },\n {\n name: \"interfaceIds\",\n type: \"bytes4[]\",\n internalType: \"bytes4[]\"\n }\n ]\n }\n ],\n anonymous: false\n },\n {\n type: \"event\",\n name: \"FallbackSignerUpdated\",\n inputs: [\n {\n name: \"newFallbackSigner\",\n type: \"address\",\n indexed: true,\n internalType: \"address\"\n },\n {\n name: \"isDisabled\",\n type: \"bool\",\n indexed: false,\n internalType: \"bool\"\n }\n ],\n anonymous: false\n },\n {\n type: \"event\",\n name: \"Initialized\",\n inputs: [\n {\n name: \"version\",\n type: \"uint64\",\n indexed: false,\n internalType: \"uint64\"\n }\n ],\n anonymous: false\n },\n {\n type: \"event\",\n name: \"Upgraded\",\n inputs: [\n {\n name: \"implementation\",\n type: \"address\",\n indexed: true,\n internalType: \"address\"\n }\n ],\n anonymous: false\n },\n {\n type: \"event\",\n name: \"ValidationInstalled\",\n inputs: [\n {\n name: \"module\",\n type: \"address\",\n indexed: true,\n internalType: \"address\"\n },\n {\n name: \"entityId\",\n type: \"uint32\",\n indexed: true,\n internalType: \"uint32\"\n }\n ],\n anonymous: false\n },\n {\n type: \"event\",\n name: \"ValidationUninstalled\",\n inputs: [\n {\n name: \"module\",\n type: \"address\",\n indexed: true,\n internalType: \"address\"\n },\n {\n name: \"entityId\",\n type: \"uint32\",\n indexed: true,\n internalType: \"uint32\"\n },\n {\n name: \"onUninstallSucceeded\",\n type: \"bool\",\n indexed: false,\n internalType: \"bool\"\n }\n ],\n anonymous: false\n },\n {\n type: \"error\",\n name: \"ArrayLengthMismatch\",\n inputs: []\n },\n {\n type: \"error\",\n name: \"CreateFailed\",\n inputs: []\n },\n {\n type: \"error\",\n name: \"DeferredActionSignatureInvalid\",\n inputs: []\n },\n {\n type: \"error\",\n name: \"DeferredValidationHasValidationHooks\",\n inputs: []\n },\n {\n type: \"error\",\n name: \"ExecutionHookAlreadySet\",\n inputs: [\n {\n name: \"hookConfig\",\n type: \"bytes25\",\n internalType: \"HookConfig\"\n }\n ]\n },\n {\n type: \"error\",\n name: \"FallbackSignerDisabled\",\n inputs: []\n },\n {\n type: \"error\",\n name: \"FallbackSignerMismatch\",\n inputs: []\n },\n {\n type: \"error\",\n name: \"FallbackValidationInstallationNotAllowed\",\n inputs: []\n },\n {\n type: \"error\",\n name: \"InterfaceNotSupported\",\n inputs: [\n {\n name: \"module\",\n type: \"address\",\n internalType: \"address\"\n }\n ]\n },\n {\n type: \"error\",\n name: \"InvalidInitialization\",\n inputs: []\n },\n {\n type: \"error\",\n name: \"InvalidSignatureType\",\n inputs: []\n },\n {\n type: \"error\",\n name: \"ModuleInstallCallbackFailed\",\n inputs: [\n {\n name: \"module\",\n type: \"address\",\n internalType: \"address\"\n },\n {\n name: \"revertReason\",\n type: \"bytes\",\n internalType: \"bytes\"\n }\n ]\n },\n {\n type: \"error\",\n name: \"NonCanonicalEncoding\",\n inputs: []\n },\n {\n type: \"error\",\n name: \"NotEntryPoint\",\n inputs: []\n },\n {\n type: \"error\",\n name: \"PreValidationHookDuplicate\",\n inputs: []\n },\n {\n type: \"error\",\n name: \"RequireUserOperationContext\",\n inputs: []\n },\n {\n type: \"error\",\n name: \"SegmentOutOfOrder\",\n inputs: []\n },\n {\n type: \"error\",\n name: \"SelfCallRecursionDepthExceeded\",\n inputs: []\n },\n {\n type: \"error\",\n name: \"SignatureValidationInvalid\",\n inputs: [\n {\n name: \"validationFunction\",\n type: \"bytes24\",\n internalType: \"ModuleEntity\"\n }\n ]\n },\n {\n type: \"error\",\n name: \"UnauthorizedCallContext\",\n inputs: []\n },\n {\n type: \"error\",\n name: \"UnexpectedAggregator\",\n inputs: [\n {\n name: \"validationFunction\",\n type: \"bytes24\",\n internalType: \"ModuleEntity\"\n },\n {\n name: \"aggregator\",\n type: \"address\",\n internalType: \"address\"\n }\n ]\n },\n {\n type: \"error\",\n name: \"UnrecognizedFunction\",\n inputs: [\n {\n name: \"selector\",\n type: \"bytes4\",\n internalType: \"bytes4\"\n }\n ]\n },\n {\n type: \"error\",\n name: \"UpgradeFailed\",\n inputs: []\n },\n {\n type: \"error\",\n name: \"UserOpValidationInvalid\",\n inputs: [\n {\n name: \"validationFunction\",\n type: \"bytes24\",\n internalType: \"ModuleEntity\"\n }\n ]\n },\n {\n type: \"error\",\n name: \"ValidationAlreadySet\",\n inputs: [\n {\n name: \"selector\",\n type: \"bytes4\",\n internalType: \"bytes4\"\n },\n {\n name: \"validationFunction\",\n type: \"bytes24\",\n internalType: \"ModuleEntity\"\n }\n ]\n },\n {\n type: \"error\",\n name: \"ValidationAssocHookLimitExceeded\",\n inputs: []\n },\n {\n type: \"error\",\n name: \"ValidationEntityIdInUse\",\n inputs: []\n },\n {\n type: \"error\",\n name: \"ValidationFunctionMissing\",\n inputs: [\n {\n name: \"selector\",\n type: \"bytes4\",\n internalType: \"bytes4\"\n }\n ]\n },\n {\n type: \"error\",\n name: \"ValidationSignatureSegmentMissing\",\n inputs: []\n }\n ];\n }\n });\n\n // ../../../node_modules/.pnpm/@account-kit+smart-contracts@4.62.0_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5._65dee0153d50ca3a2d2c6830319271d9/node_modules/@account-kit/smart-contracts/dist/esm/src/ma-v2/utils.js\n async function getMAV2UpgradeToData(client, args) {\n const { account: account_ = client.account } = args;\n if (!account_) {\n throw new AccountNotFoundError2();\n }\n const account = account_;\n const chain2 = client.chain;\n if (!chain2) {\n throw new ChainNotFoundError2();\n }\n const initData = encodeFunctionData({\n abi: semiModularAccountStorageAbi,\n functionName: \"initialize\",\n args: [await account.getSigner().getAddress()]\n });\n return {\n implAddress: getDefaultSMAV2StorageAddress(chain2),\n initializationData: initData,\n createModularAccountV2FromExisting: async () => createModularAccountV2({\n transport: custom(client.transport),\n chain: chain2,\n signer: account.getSigner(),\n accountAddress: account.address\n })\n };\n }\n var DEFAULT_OWNER_ENTITY_ID, packUOSignature, pack1271Signature, getDefaultWebAuthnMAV2FactoryAddress, getDefaultMAV2FactoryAddress, getDefaultSMAV2BytecodeAddress, getDefaultSMAV2StorageAddress, mintableERC20Abi, parseDeferredAction, assertNeverSignatureRequestType;\n var init_utils17 = __esm({\n \"../../../node_modules/.pnpm/@account-kit+smart-contracts@4.62.0_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5._65dee0153d50ca3a2d2c6830319271d9/node_modules/@account-kit/smart-contracts/dist/esm/src/ma-v2/utils.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_esm();\n init_exports3();\n init_modularAccountV2();\n init_semiModularAccountStorageAbi();\n init_esm6();\n DEFAULT_OWNER_ENTITY_ID = 0;\n packUOSignature = ({\n // orderedHookData, TODO: integrate in next iteration of MAv2 sdk\n validationSignature\n }) => {\n return concat([\"0xFF\", \"0x00\", validationSignature]);\n };\n pack1271Signature = ({ validationSignature, entityId }) => {\n return concat([\n \"0x00\",\n toHex(entityId, { size: 4 }),\n \"0xFF\",\n \"0x00\",\n // EOA type signature\n validationSignature\n ]);\n };\n getDefaultWebAuthnMAV2FactoryAddress = () => {\n return \"0x55010E571dCf07e254994bfc88b9C1C8FAe31960\";\n };\n getDefaultMAV2FactoryAddress = (chain2) => {\n switch (chain2.id) {\n case sepolia3.id:\n case baseSepolia3.id:\n case polygon3.id:\n case mainnet3.id:\n case polygonAmoy3.id:\n case optimism3.id:\n case optimismSepolia3.id:\n case arbitrum3.id:\n case arbitrumSepolia3.id:\n case base3.id:\n default:\n return \"0x00000000000017c61b5bEe81050EC8eFc9c6fecd\";\n }\n };\n getDefaultSMAV2BytecodeAddress = (chain2) => {\n switch (chain2.id) {\n case sepolia3.id:\n case baseSepolia3.id:\n case polygon3.id:\n case mainnet3.id:\n case polygonAmoy3.id:\n case optimism3.id:\n case optimismSepolia3.id:\n case arbitrum3.id:\n case arbitrumSepolia3.id:\n case base3.id:\n default:\n return \"0x000000000000c5A9089039570Dd36455b5C07383\";\n }\n };\n getDefaultSMAV2StorageAddress = (chain2) => {\n switch (chain2.id) {\n case sepolia3.id:\n case baseSepolia3.id:\n case polygon3.id:\n case mainnet3.id:\n case polygonAmoy3.id:\n case optimism3.id:\n case optimismSepolia3.id:\n case arbitrum3.id:\n case arbitrumSepolia3.id:\n case base3.id:\n default:\n return \"0x0000000000006E2f9d80CaEc0Da6500f005EB25A\";\n }\n };\n mintableERC20Abi = parseAbi([\n \"function transfer(address to, uint256 amount) external\",\n \"function mint(address to, uint256 amount) external\",\n \"function balanceOf(address target) external returns (uint256)\"\n ]);\n parseDeferredAction = (deferredAction) => {\n return {\n entityId: hexToNumber(`0x${deferredAction.slice(42, 50)}`),\n isGlobalValidation: hexToNumber(`0x${deferredAction.slice(50, 52)}`) % 2 === 1,\n nonce: BigInt(`0x${deferredAction.slice(4, 68)}`),\n deferredActionData: `0x${deferredAction.slice(68)}`,\n hasAssociatedExecHooks: deferredAction[3] === \"1\"\n };\n };\n assertNeverSignatureRequestType = () => {\n throw new Error(\"Invalid signature request type \");\n };\n }\n });\n\n // ../../../node_modules/.pnpm/@account-kit+smart-contracts@4.62.0_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5._65dee0153d50ca3a2d2c6830319271d9/node_modules/@account-kit/smart-contracts/dist/esm/src/ma-v2/account/predictAddress.js\n function predictModularAccountV2Address(params) {\n const { factoryAddress, salt, implementationAddress } = params;\n let combinedSalt;\n let initcode;\n switch (params.type) {\n case \"SMA\":\n combinedSalt = getCombinedSaltK1(params.ownerAddress, salt, 4294967295);\n const immutableArgs = params.ownerAddress;\n initcode = getProxyBytecodeWithImmutableArgs(implementationAddress, immutableArgs);\n break;\n case \"MA\":\n combinedSalt = getCombinedSaltK1(params.ownerAddress, salt, params.entityId);\n initcode = getProxyBytecode(implementationAddress);\n break;\n case \"WebAuthn\":\n const { ownerPublicKey: { x: x4, y: y6 } } = params;\n combinedSalt = keccak256(encodePacked([\"uint256\", \"uint256\", \"uint256\", \"uint32\"], [x4, y6, salt, params.entityId]));\n initcode = getProxyBytecode(implementationAddress);\n break;\n default:\n return assertNeverModularAccountV2Type(params);\n }\n return getContractAddress2({\n from: factoryAddress,\n opcode: \"CREATE2\",\n salt: combinedSalt,\n bytecode: initcode\n });\n }\n function getCombinedSaltK1(ownerAddress, salt, entityId) {\n return keccak256(encodePacked([\"address\", \"uint256\", \"uint32\"], [ownerAddress, salt, entityId]));\n }\n function getProxyBytecode(implementationAddress) {\n return `0x603d3d8160223d3973${implementationAddress.slice(2)}60095155f3363d3d373d3d363d7f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc545af43d6000803e6038573d6000fd5b3d6000f3`;\n }\n function getProxyBytecodeWithImmutableArgs(implementationAddress, immutableArgs) {\n return `0x6100513d8160233d3973${implementationAddress.slice(2)}60095155f3363d3d373d3d363d7f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc545af43d6000803e6038573d6000fd5b3d6000f3${immutableArgs.slice(2)}`;\n }\n function assertNeverModularAccountV2Type(_2) {\n throw new Error(\"Unknown modular account type in predictModularAccountV2Address\");\n }\n var init_predictAddress2 = __esm({\n \"../../../node_modules/.pnpm/@account-kit+smart-contracts@4.62.0_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5._65dee0153d50ca3a2d2c6830319271d9/node_modules/@account-kit/smart-contracts/dist/esm/src/ma-v2/account/predictAddress.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_esm();\n }\n });\n\n // ../../../node_modules/.pnpm/webauthn-p256@0.0.10/node_modules/webauthn-p256/_esm/utils.js\n function bytesToHex4(bytes) {\n return `0x${bytesToHex2(bytes)}`;\n }\n function hexToBytes4(value) {\n return hexToBytes2(value.slice(2));\n }\n var init_utils18 = __esm({\n \"../../../node_modules/.pnpm/webauthn-p256@0.0.10/node_modules/webauthn-p256/_esm/utils.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_utils3();\n }\n });\n\n // ../../../node_modules/.pnpm/webauthn-p256@0.0.10/node_modules/webauthn-p256/_esm/publicKey.js\n function parsePublicKey(publicKey) {\n const bytes = typeof publicKey === \"string\" ? hexToBytes4(publicKey) : publicKey;\n const offset = bytes.length === 65 ? 1 : 0;\n const x4 = bytes.slice(offset, 32 + offset);\n const y6 = bytes.slice(32 + offset, 64 + offset);\n return {\n prefix: bytes.length === 65 ? bytes[0] : void 0,\n x: BigInt(bytesToHex4(x4)),\n y: BigInt(bytesToHex4(y6))\n };\n }\n var init_publicKey = __esm({\n \"../../../node_modules/.pnpm/webauthn-p256@0.0.10/node_modules/webauthn-p256/_esm/publicKey.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_utils18();\n }\n });\n\n // ../../../node_modules/.pnpm/webauthn-p256@0.0.10/node_modules/webauthn-p256/_esm/index.js\n var init_esm8 = __esm({\n \"../../../node_modules/.pnpm/webauthn-p256@0.0.10/node_modules/webauthn-p256/_esm/index.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_publicKey();\n }\n });\n\n // ../../../node_modules/.pnpm/@account-kit+smart-contracts@4.62.0_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5._65dee0153d50ca3a2d2c6830319271d9/node_modules/@account-kit/smart-contracts/dist/esm/src/ma-v2/errors.js\n var WebauthnCredentialsRequiredError, SignerRequiredFor7702Error, SignerRequiredForDefaultError;\n var init_errors8 = __esm({\n \"../../../node_modules/.pnpm/@account-kit+smart-contracts@4.62.0_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5._65dee0153d50ca3a2d2c6830319271d9/node_modules/@account-kit/smart-contracts/dist/esm/src/ma-v2/errors.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_esm6();\n WebauthnCredentialsRequiredError = class extends BaseError4 {\n constructor() {\n super(\"Webauthn credentials are required to create a Webauthn Modular Account V2\");\n Object.defineProperty(this, \"name\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: \"WebauthnCredentialsRequiredError\"\n });\n }\n };\n SignerRequiredFor7702Error = class extends BaseError4 {\n constructor() {\n super(\"A signer is required to create a 7702 Modular Account V2\");\n Object.defineProperty(this, \"name\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: \"SignerRequiredFor7702Error\"\n });\n }\n };\n SignerRequiredForDefaultError = class extends BaseError4 {\n constructor() {\n super(\"A signer is required to create a default Modular Account V2\");\n Object.defineProperty(this, \"name\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: \"SignerRequiredForDefaultError\"\n });\n }\n };\n }\n });\n\n // ../../../node_modules/.pnpm/@account-kit+smart-contracts@4.62.0_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5._65dee0153d50ca3a2d2c6830319271d9/node_modules/@account-kit/smart-contracts/dist/esm/src/ma-v2/account/modularAccountV2.js\n async function createModularAccountV2(config2) {\n const { transport, chain: chain2, accountAddress: _accountAddress, entryPoint = getEntryPoint(chain2, { version: \"0.7.0\" }), signerEntity = {\n isGlobalValidation: true,\n entityId: DEFAULT_OWNER_ENTITY_ID\n }, signerEntity: { entityId = DEFAULT_OWNER_ENTITY_ID } = {}, deferredAction } = config2;\n const signer = \"signer\" in config2 ? config2.signer : void 0;\n const credential = \"credential\" in config2 ? config2.credential : void 0;\n const getFn = \"getFn\" in config2 ? config2.getFn : void 0;\n const rpId = \"rpId\" in config2 ? config2.rpId : void 0;\n const client = createBundlerClient({\n transport,\n chain: chain2\n });\n const accountFunctions = await (async () => {\n switch (config2.mode) {\n case \"webauthn\": {\n if (!credential)\n throw new WebauthnCredentialsRequiredError();\n const publicKey = credential.publicKey;\n const { x: x4, y: y6 } = parsePublicKey(publicKey);\n const { salt = 0n, factoryAddress = getDefaultWebAuthnMAV2FactoryAddress(), initCode } = config2;\n const getAccountInitCode = async () => {\n if (initCode) {\n return initCode;\n }\n return concatHex([\n factoryAddress,\n encodeFunctionData({\n abi: accountFactoryAbi,\n functionName: \"createWebAuthnAccount\",\n args: [x4, y6, salt, entityId]\n })\n ]);\n };\n const accountAddress = await getAccountAddress({\n client,\n entryPoint,\n accountAddress: _accountAddress,\n getAccountInitCode\n });\n return {\n getAccountInitCode,\n accountAddress\n };\n }\n case \"7702\": {\n const getAccountInitCode = async () => {\n return \"0x\";\n };\n if (!signer)\n throw new SignerRequiredFor7702Error();\n const signerAddress = await signer.getAddress();\n const accountAddress = _accountAddress ?? signerAddress;\n if (entityId === DEFAULT_OWNER_ENTITY_ID && signerAddress !== accountAddress) {\n throw new EntityIdOverrideError();\n }\n const implementation = \"0x69007702764179f14F51cdce752f4f775d74E139\";\n const getImplementationAddress = async () => implementation;\n return {\n getAccountInitCode,\n accountAddress,\n getImplementationAddress\n };\n }\n case \"default\":\n case void 0: {\n if (!signer)\n throw new SignerRequiredForDefaultError();\n const { salt = 0n, factoryAddress = getDefaultMAV2FactoryAddress(chain2), implementationAddress = getDefaultSMAV2BytecodeAddress(chain2), initCode } = config2;\n const signerAddress = await signer.getAddress();\n const getAccountInitCode = async () => {\n if (initCode) {\n return initCode;\n }\n return concatHex([\n factoryAddress,\n encodeFunctionData({\n abi: accountFactoryAbi,\n functionName: \"createSemiModularAccount\",\n args: [await signer.getAddress(), salt]\n })\n ]);\n };\n const accountAddress = _accountAddress ?? predictModularAccountV2Address({\n factoryAddress,\n implementationAddress,\n salt,\n type: \"SMA\",\n ownerAddress: signerAddress\n });\n return {\n getAccountInitCode,\n accountAddress\n };\n }\n default:\n assertNever(config2);\n }\n })();\n if (!signer) {\n if (!credential)\n throw new WebauthnCredentialsRequiredError();\n return await createMAv2Base({\n source: \"ModularAccountV2\",\n // TO DO: remove need to pass in source?\n transport,\n chain: chain2,\n entryPoint,\n signerEntity,\n deferredAction,\n credential,\n getFn,\n rpId,\n ...accountFunctions\n });\n }\n return await createMAv2Base({\n source: \"ModularAccountV2\",\n // TO DO: remove need to pass in source?\n transport,\n chain: chain2,\n signer,\n entryPoint,\n signerEntity,\n deferredAction,\n ...accountFunctions\n });\n }\n function assertNever(_valid) {\n throw new InvalidModularAccountV2Mode();\n }\n var init_modularAccountV2 = __esm({\n \"../../../node_modules/.pnpm/@account-kit+smart-contracts@4.62.0_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5._65dee0153d50ca3a2d2c6830319271d9/node_modules/@account-kit/smart-contracts/dist/esm/src/ma-v2/account/modularAccountV2.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_esm6();\n init_esm();\n init_accountFactoryAbi();\n init_utils17();\n init_modularAccountV2Base();\n init_utils17();\n init_predictAddress2();\n init_esm8();\n init_errors8();\n }\n });\n\n // ../../../node_modules/.pnpm/@account-kit+smart-contracts@4.62.0_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5._65dee0153d50ca3a2d2c6830319271d9/node_modules/@account-kit/smart-contracts/dist/esm/src/ma-v2/client/client.js\n async function createModularAccountV2Client(config2) {\n const { transport, chain: chain2 } = config2;\n let account;\n if (config2.mode === \"webauthn\") {\n account = await createModularAccountV2(config2);\n } else {\n account = await createModularAccountV2(config2);\n }\n const middlewareToAppend = await (async () => {\n switch (config2.mode) {\n case \"7702\":\n return {\n gasEstimator: default7702GasEstimator(config2.gasEstimator),\n signUserOperation: default7702UserOpSigner(config2.signUserOperation)\n };\n case \"webauthn\":\n return {\n gasEstimator: webauthnGasEstimator(config2.gasEstimator)\n };\n case \"default\":\n default:\n return {};\n }\n })();\n if (isAlchemyTransport2(transport, chain2)) {\n return createAlchemySmartAccountClient2({\n ...config2,\n transport,\n chain: chain2,\n account,\n ...middlewareToAppend\n });\n }\n return createSmartAccountClient({\n ...config2,\n account,\n ...middlewareToAppend\n });\n }\n var init_client4 = __esm({\n \"../../../node_modules/.pnpm/@account-kit+smart-contracts@4.62.0_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5._65dee0153d50ca3a2d2c6830319271d9/node_modules/@account-kit/smart-contracts/dist/esm/src/ma-v2/client/client.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_esm6();\n init_modularAccountV2();\n init_exports3();\n }\n });\n\n // ../../../node_modules/.pnpm/@account-kit+smart-contracts@4.62.0_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5._65dee0153d50ca3a2d2c6830319271d9/node_modules/@account-kit/smart-contracts/dist/esm/src/ma-v2/abis/semiModularAccountBytecodeAbi.js\n var semiModularAccountBytecodeAbi;\n var init_semiModularAccountBytecodeAbi = __esm({\n \"../../../node_modules/.pnpm/@account-kit+smart-contracts@4.62.0_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5._65dee0153d50ca3a2d2c6830319271d9/node_modules/@account-kit/smart-contracts/dist/esm/src/ma-v2/abis/semiModularAccountBytecodeAbi.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n semiModularAccountBytecodeAbi = [\n {\n type: \"constructor\",\n inputs: [\n {\n name: \"entryPoint\",\n type: \"address\",\n internalType: \"contract IEntryPoint\"\n },\n {\n name: \"executionInstallDelegate\",\n type: \"address\",\n internalType: \"contract ExecutionInstallDelegate\"\n }\n ],\n stateMutability: \"nonpayable\"\n },\n {\n type: \"fallback\",\n stateMutability: \"payable\"\n },\n {\n type: \"receive\",\n stateMutability: \"payable\"\n },\n {\n type: \"function\",\n name: \"accountId\",\n inputs: [],\n outputs: [\n {\n name: \"\",\n type: \"string\",\n internalType: \"string\"\n }\n ],\n stateMutability: \"pure\"\n },\n {\n type: \"function\",\n name: \"entryPoint\",\n inputs: [],\n outputs: [\n {\n name: \"\",\n type: \"address\",\n internalType: \"contract IEntryPoint\"\n }\n ],\n stateMutability: \"view\"\n },\n {\n type: \"function\",\n name: \"execute\",\n inputs: [\n {\n name: \"target\",\n type: \"address\",\n internalType: \"address\"\n },\n {\n name: \"value\",\n type: \"uint256\",\n internalType: \"uint256\"\n },\n {\n name: \"data\",\n type: \"bytes\",\n internalType: \"bytes\"\n }\n ],\n outputs: [\n {\n name: \"result\",\n type: \"bytes\",\n internalType: \"bytes\"\n }\n ],\n stateMutability: \"payable\"\n },\n {\n type: \"function\",\n name: \"executeBatch\",\n inputs: [\n {\n name: \"calls\",\n type: \"tuple[]\",\n internalType: \"struct Call[]\",\n components: [\n {\n name: \"target\",\n type: \"address\",\n internalType: \"address\"\n },\n {\n name: \"value\",\n type: \"uint256\",\n internalType: \"uint256\"\n },\n {\n name: \"data\",\n type: \"bytes\",\n internalType: \"bytes\"\n }\n ]\n }\n ],\n outputs: [\n {\n name: \"results\",\n type: \"bytes[]\",\n internalType: \"bytes[]\"\n }\n ],\n stateMutability: \"payable\"\n },\n {\n type: \"function\",\n name: \"executeUserOp\",\n inputs: [\n {\n name: \"userOp\",\n type: \"tuple\",\n internalType: \"struct PackedUserOperation\",\n components: [\n {\n name: \"sender\",\n type: \"address\",\n internalType: \"address\"\n },\n {\n name: \"nonce\",\n type: \"uint256\",\n internalType: \"uint256\"\n },\n {\n name: \"initCode\",\n type: \"bytes\",\n internalType: \"bytes\"\n },\n {\n name: \"callData\",\n type: \"bytes\",\n internalType: \"bytes\"\n },\n {\n name: \"accountGasLimits\",\n type: \"bytes32\",\n internalType: \"bytes32\"\n },\n {\n name: \"preVerificationGas\",\n type: \"uint256\",\n internalType: \"uint256\"\n },\n {\n name: \"gasFees\",\n type: \"bytes32\",\n internalType: \"bytes32\"\n },\n {\n name: \"paymasterAndData\",\n type: \"bytes\",\n internalType: \"bytes\"\n },\n {\n name: \"signature\",\n type: \"bytes\",\n internalType: \"bytes\"\n }\n ]\n },\n {\n name: \"\",\n type: \"bytes32\",\n internalType: \"bytes32\"\n }\n ],\n outputs: [],\n stateMutability: \"nonpayable\"\n },\n {\n type: \"function\",\n name: \"executeWithRuntimeValidation\",\n inputs: [\n {\n name: \"data\",\n type: \"bytes\",\n internalType: \"bytes\"\n },\n {\n name: \"authorization\",\n type: \"bytes\",\n internalType: \"bytes\"\n }\n ],\n outputs: [\n {\n name: \"\",\n type: \"bytes\",\n internalType: \"bytes\"\n }\n ],\n stateMutability: \"payable\"\n },\n {\n type: \"function\",\n name: \"getExecutionData\",\n inputs: [\n {\n name: \"selector\",\n type: \"bytes4\",\n internalType: \"bytes4\"\n }\n ],\n outputs: [\n {\n name: \"data\",\n type: \"tuple\",\n internalType: \"struct ExecutionDataView\",\n components: [\n {\n name: \"module\",\n type: \"address\",\n internalType: \"address\"\n },\n {\n name: \"skipRuntimeValidation\",\n type: \"bool\",\n internalType: \"bool\"\n },\n {\n name: \"allowGlobalValidation\",\n type: \"bool\",\n internalType: \"bool\"\n },\n {\n name: \"executionHooks\",\n type: \"bytes25[]\",\n internalType: \"HookConfig[]\"\n }\n ]\n }\n ],\n stateMutability: \"view\"\n },\n {\n type: \"function\",\n name: \"getFallbackSignerData\",\n inputs: [],\n outputs: [\n {\n name: \"\",\n type: \"address\",\n internalType: \"address\"\n },\n {\n name: \"\",\n type: \"bool\",\n internalType: \"bool\"\n }\n ],\n stateMutability: \"view\"\n },\n {\n type: \"function\",\n name: \"getValidationData\",\n inputs: [\n {\n name: \"validationFunction\",\n type: \"bytes24\",\n internalType: \"ModuleEntity\"\n }\n ],\n outputs: [\n {\n name: \"data\",\n type: \"tuple\",\n internalType: \"struct ValidationDataView\",\n components: [\n {\n name: \"validationFlags\",\n type: \"uint8\",\n internalType: \"ValidationFlags\"\n },\n {\n name: \"validationHooks\",\n type: \"bytes25[]\",\n internalType: \"HookConfig[]\"\n },\n {\n name: \"executionHooks\",\n type: \"bytes25[]\",\n internalType: \"HookConfig[]\"\n },\n {\n name: \"selectors\",\n type: \"bytes4[]\",\n internalType: \"bytes4[]\"\n }\n ]\n }\n ],\n stateMutability: \"view\"\n },\n {\n type: \"function\",\n name: \"installExecution\",\n inputs: [\n {\n name: \"module\",\n type: \"address\",\n internalType: \"address\"\n },\n {\n name: \"manifest\",\n type: \"tuple\",\n internalType: \"struct ExecutionManifest\",\n components: [\n {\n name: \"executionFunctions\",\n type: \"tuple[]\",\n internalType: \"struct ManifestExecutionFunction[]\",\n components: [\n {\n name: \"executionSelector\",\n type: \"bytes4\",\n internalType: \"bytes4\"\n },\n {\n name: \"skipRuntimeValidation\",\n type: \"bool\",\n internalType: \"bool\"\n },\n {\n name: \"allowGlobalValidation\",\n type: \"bool\",\n internalType: \"bool\"\n }\n ]\n },\n {\n name: \"executionHooks\",\n type: \"tuple[]\",\n internalType: \"struct ManifestExecutionHook[]\",\n components: [\n {\n name: \"executionSelector\",\n type: \"bytes4\",\n internalType: \"bytes4\"\n },\n {\n name: \"entityId\",\n type: \"uint32\",\n internalType: \"uint32\"\n },\n {\n name: \"isPreHook\",\n type: \"bool\",\n internalType: \"bool\"\n },\n {\n name: \"isPostHook\",\n type: \"bool\",\n internalType: \"bool\"\n }\n ]\n },\n {\n name: \"interfaceIds\",\n type: \"bytes4[]\",\n internalType: \"bytes4[]\"\n }\n ]\n },\n {\n name: \"moduleInstallData\",\n type: \"bytes\",\n internalType: \"bytes\"\n }\n ],\n outputs: [],\n stateMutability: \"nonpayable\"\n },\n {\n type: \"function\",\n name: \"installValidation\",\n inputs: [\n {\n name: \"validationConfig\",\n type: \"bytes25\",\n internalType: \"ValidationConfig\"\n },\n {\n name: \"selectors\",\n type: \"bytes4[]\",\n internalType: \"bytes4[]\"\n },\n {\n name: \"installData\",\n type: \"bytes\",\n internalType: \"bytes\"\n },\n {\n name: \"hooks\",\n type: \"bytes[]\",\n internalType: \"bytes[]\"\n }\n ],\n outputs: [],\n stateMutability: \"nonpayable\"\n },\n {\n type: \"function\",\n name: \"isValidSignature\",\n inputs: [\n {\n name: \"hash\",\n type: \"bytes32\",\n internalType: \"bytes32\"\n },\n {\n name: \"signature\",\n type: \"bytes\",\n internalType: \"bytes\"\n }\n ],\n outputs: [\n {\n name: \"\",\n type: \"bytes4\",\n internalType: \"bytes4\"\n }\n ],\n stateMutability: \"view\"\n },\n {\n type: \"function\",\n name: \"onERC1155BatchReceived\",\n inputs: [\n {\n name: \"\",\n type: \"address\",\n internalType: \"address\"\n },\n {\n name: \"\",\n type: \"address\",\n internalType: \"address\"\n },\n {\n name: \"\",\n type: \"uint256[]\",\n internalType: \"uint256[]\"\n },\n {\n name: \"\",\n type: \"uint256[]\",\n internalType: \"uint256[]\"\n },\n {\n name: \"\",\n type: \"bytes\",\n internalType: \"bytes\"\n }\n ],\n outputs: [\n {\n name: \"\",\n type: \"bytes4\",\n internalType: \"bytes4\"\n }\n ],\n stateMutability: \"pure\"\n },\n {\n type: \"function\",\n name: \"onERC1155Received\",\n inputs: [\n {\n name: \"\",\n type: \"address\",\n internalType: \"address\"\n },\n {\n name: \"\",\n type: \"address\",\n internalType: \"address\"\n },\n {\n name: \"\",\n type: \"uint256\",\n internalType: \"uint256\"\n },\n {\n name: \"\",\n type: \"uint256\",\n internalType: \"uint256\"\n },\n {\n name: \"\",\n type: \"bytes\",\n internalType: \"bytes\"\n }\n ],\n outputs: [\n {\n name: \"\",\n type: \"bytes4\",\n internalType: \"bytes4\"\n }\n ],\n stateMutability: \"pure\"\n },\n {\n type: \"function\",\n name: \"onERC721Received\",\n inputs: [\n {\n name: \"\",\n type: \"address\",\n internalType: \"address\"\n },\n {\n name: \"\",\n type: \"address\",\n internalType: \"address\"\n },\n {\n name: \"\",\n type: \"uint256\",\n internalType: \"uint256\"\n },\n {\n name: \"\",\n type: \"bytes\",\n internalType: \"bytes\"\n }\n ],\n outputs: [\n {\n name: \"\",\n type: \"bytes4\",\n internalType: \"bytes4\"\n }\n ],\n stateMutability: \"pure\"\n },\n {\n type: \"function\",\n name: \"performCreate\",\n inputs: [\n {\n name: \"value\",\n type: \"uint256\",\n internalType: \"uint256\"\n },\n {\n name: \"initCode\",\n type: \"bytes\",\n internalType: \"bytes\"\n },\n {\n name: \"isCreate2\",\n type: \"bool\",\n internalType: \"bool\"\n },\n {\n name: \"salt\",\n type: \"bytes32\",\n internalType: \"bytes32\"\n }\n ],\n outputs: [\n {\n name: \"createdAddr\",\n type: \"address\",\n internalType: \"address\"\n }\n ],\n stateMutability: \"payable\"\n },\n {\n type: \"function\",\n name: \"proxiableUUID\",\n inputs: [],\n outputs: [\n {\n name: \"\",\n type: \"bytes32\",\n internalType: \"bytes32\"\n }\n ],\n stateMutability: \"view\"\n },\n {\n type: \"function\",\n name: \"supportsInterface\",\n inputs: [\n {\n name: \"interfaceId\",\n type: \"bytes4\",\n internalType: \"bytes4\"\n }\n ],\n outputs: [\n {\n name: \"\",\n type: \"bool\",\n internalType: \"bool\"\n }\n ],\n stateMutability: \"view\"\n },\n {\n type: \"function\",\n name: \"uninstallExecution\",\n inputs: [\n {\n name: \"module\",\n type: \"address\",\n internalType: \"address\"\n },\n {\n name: \"manifest\",\n type: \"tuple\",\n internalType: \"struct ExecutionManifest\",\n components: [\n {\n name: \"executionFunctions\",\n type: \"tuple[]\",\n internalType: \"struct ManifestExecutionFunction[]\",\n components: [\n {\n name: \"executionSelector\",\n type: \"bytes4\",\n internalType: \"bytes4\"\n },\n {\n name: \"skipRuntimeValidation\",\n type: \"bool\",\n internalType: \"bool\"\n },\n {\n name: \"allowGlobalValidation\",\n type: \"bool\",\n internalType: \"bool\"\n }\n ]\n },\n {\n name: \"executionHooks\",\n type: \"tuple[]\",\n internalType: \"struct ManifestExecutionHook[]\",\n components: [\n {\n name: \"executionSelector\",\n type: \"bytes4\",\n internalType: \"bytes4\"\n },\n {\n name: \"entityId\",\n type: \"uint32\",\n internalType: \"uint32\"\n },\n {\n name: \"isPreHook\",\n type: \"bool\",\n internalType: \"bool\"\n },\n {\n name: \"isPostHook\",\n type: \"bool\",\n internalType: \"bool\"\n }\n ]\n },\n {\n name: \"interfaceIds\",\n type: \"bytes4[]\",\n internalType: \"bytes4[]\"\n }\n ]\n },\n {\n name: \"moduleUninstallData\",\n type: \"bytes\",\n internalType: \"bytes\"\n }\n ],\n outputs: [],\n stateMutability: \"nonpayable\"\n },\n {\n type: \"function\",\n name: \"uninstallValidation\",\n inputs: [\n {\n name: \"validationFunction\",\n type: \"bytes24\",\n internalType: \"ModuleEntity\"\n },\n {\n name: \"uninstallData\",\n type: \"bytes\",\n internalType: \"bytes\"\n },\n {\n name: \"hookUninstallData\",\n type: \"bytes[]\",\n internalType: \"bytes[]\"\n }\n ],\n outputs: [],\n stateMutability: \"nonpayable\"\n },\n {\n type: \"function\",\n name: \"updateFallbackSignerData\",\n inputs: [\n {\n name: \"fallbackSigner\",\n type: \"address\",\n internalType: \"address\"\n },\n {\n name: \"isDisabled\",\n type: \"bool\",\n internalType: \"bool\"\n }\n ],\n outputs: [],\n stateMutability: \"nonpayable\"\n },\n {\n type: \"function\",\n name: \"upgradeToAndCall\",\n inputs: [\n {\n name: \"newImplementation\",\n type: \"address\",\n internalType: \"address\"\n },\n {\n name: \"data\",\n type: \"bytes\",\n internalType: \"bytes\"\n }\n ],\n outputs: [],\n stateMutability: \"payable\"\n },\n {\n type: \"function\",\n name: \"validateUserOp\",\n inputs: [\n {\n name: \"userOp\",\n type: \"tuple\",\n internalType: \"struct PackedUserOperation\",\n components: [\n {\n name: \"sender\",\n type: \"address\",\n internalType: \"address\"\n },\n {\n name: \"nonce\",\n type: \"uint256\",\n internalType: \"uint256\"\n },\n {\n name: \"initCode\",\n type: \"bytes\",\n internalType: \"bytes\"\n },\n {\n name: \"callData\",\n type: \"bytes\",\n internalType: \"bytes\"\n },\n {\n name: \"accountGasLimits\",\n type: \"bytes32\",\n internalType: \"bytes32\"\n },\n {\n name: \"preVerificationGas\",\n type: \"uint256\",\n internalType: \"uint256\"\n },\n {\n name: \"gasFees\",\n type: \"bytes32\",\n internalType: \"bytes32\"\n },\n {\n name: \"paymasterAndData\",\n type: \"bytes\",\n internalType: \"bytes\"\n },\n {\n name: \"signature\",\n type: \"bytes\",\n internalType: \"bytes\"\n }\n ]\n },\n {\n name: \"userOpHash\",\n type: \"bytes32\",\n internalType: \"bytes32\"\n },\n {\n name: \"missingAccountFunds\",\n type: \"uint256\",\n internalType: \"uint256\"\n }\n ],\n outputs: [\n {\n name: \"validationData\",\n type: \"uint256\",\n internalType: \"uint256\"\n }\n ],\n stateMutability: \"nonpayable\"\n },\n {\n type: \"event\",\n name: \"ExecutionInstalled\",\n inputs: [\n {\n name: \"module\",\n type: \"address\",\n indexed: true,\n internalType: \"address\"\n },\n {\n name: \"manifest\",\n type: \"tuple\",\n indexed: false,\n internalType: \"struct ExecutionManifest\",\n components: [\n {\n name: \"executionFunctions\",\n type: \"tuple[]\",\n internalType: \"struct ManifestExecutionFunction[]\",\n components: [\n {\n name: \"executionSelector\",\n type: \"bytes4\",\n internalType: \"bytes4\"\n },\n {\n name: \"skipRuntimeValidation\",\n type: \"bool\",\n internalType: \"bool\"\n },\n {\n name: \"allowGlobalValidation\",\n type: \"bool\",\n internalType: \"bool\"\n }\n ]\n },\n {\n name: \"executionHooks\",\n type: \"tuple[]\",\n internalType: \"struct ManifestExecutionHook[]\",\n components: [\n {\n name: \"executionSelector\",\n type: \"bytes4\",\n internalType: \"bytes4\"\n },\n {\n name: \"entityId\",\n type: \"uint32\",\n internalType: \"uint32\"\n },\n {\n name: \"isPreHook\",\n type: \"bool\",\n internalType: \"bool\"\n },\n {\n name: \"isPostHook\",\n type: \"bool\",\n internalType: \"bool\"\n }\n ]\n },\n {\n name: \"interfaceIds\",\n type: \"bytes4[]\",\n internalType: \"bytes4[]\"\n }\n ]\n }\n ],\n anonymous: false\n },\n {\n type: \"event\",\n name: \"ExecutionUninstalled\",\n inputs: [\n {\n name: \"module\",\n type: \"address\",\n indexed: true,\n internalType: \"address\"\n },\n {\n name: \"onUninstallSucceeded\",\n type: \"bool\",\n indexed: false,\n internalType: \"bool\"\n },\n {\n name: \"manifest\",\n type: \"tuple\",\n indexed: false,\n internalType: \"struct ExecutionManifest\",\n components: [\n {\n name: \"executionFunctions\",\n type: \"tuple[]\",\n internalType: \"struct ManifestExecutionFunction[]\",\n components: [\n {\n name: \"executionSelector\",\n type: \"bytes4\",\n internalType: \"bytes4\"\n },\n {\n name: \"skipRuntimeValidation\",\n type: \"bool\",\n internalType: \"bool\"\n },\n {\n name: \"allowGlobalValidation\",\n type: \"bool\",\n internalType: \"bool\"\n }\n ]\n },\n {\n name: \"executionHooks\",\n type: \"tuple[]\",\n internalType: \"struct ManifestExecutionHook[]\",\n components: [\n {\n name: \"executionSelector\",\n type: \"bytes4\",\n internalType: \"bytes4\"\n },\n {\n name: \"entityId\",\n type: \"uint32\",\n internalType: \"uint32\"\n },\n {\n name: \"isPreHook\",\n type: \"bool\",\n internalType: \"bool\"\n },\n {\n name: \"isPostHook\",\n type: \"bool\",\n internalType: \"bool\"\n }\n ]\n },\n {\n name: \"interfaceIds\",\n type: \"bytes4[]\",\n internalType: \"bytes4[]\"\n }\n ]\n }\n ],\n anonymous: false\n },\n {\n type: \"event\",\n name: \"FallbackSignerUpdated\",\n inputs: [\n {\n name: \"newFallbackSigner\",\n type: \"address\",\n indexed: true,\n internalType: \"address\"\n },\n {\n name: \"isDisabled\",\n type: \"bool\",\n indexed: false,\n internalType: \"bool\"\n }\n ],\n anonymous: false\n },\n {\n type: \"event\",\n name: \"Initialized\",\n inputs: [\n {\n name: \"version\",\n type: \"uint64\",\n indexed: false,\n internalType: \"uint64\"\n }\n ],\n anonymous: false\n },\n {\n type: \"event\",\n name: \"Upgraded\",\n inputs: [\n {\n name: \"implementation\",\n type: \"address\",\n indexed: true,\n internalType: \"address\"\n }\n ],\n anonymous: false\n },\n {\n type: \"event\",\n name: \"ValidationInstalled\",\n inputs: [\n {\n name: \"module\",\n type: \"address\",\n indexed: true,\n internalType: \"address\"\n },\n {\n name: \"entityId\",\n type: \"uint32\",\n indexed: true,\n internalType: \"uint32\"\n }\n ],\n anonymous: false\n },\n {\n type: \"event\",\n name: \"ValidationUninstalled\",\n inputs: [\n {\n name: \"module\",\n type: \"address\",\n indexed: true,\n internalType: \"address\"\n },\n {\n name: \"entityId\",\n type: \"uint32\",\n indexed: true,\n internalType: \"uint32\"\n },\n {\n name: \"onUninstallSucceeded\",\n type: \"bool\",\n indexed: false,\n internalType: \"bool\"\n }\n ],\n anonymous: false\n },\n {\n type: \"error\",\n name: \"ArrayLengthMismatch\",\n inputs: []\n },\n {\n type: \"error\",\n name: \"CreateFailed\",\n inputs: []\n },\n {\n type: \"error\",\n name: \"DeferredActionSignatureInvalid\",\n inputs: []\n },\n {\n type: \"error\",\n name: \"DeferredValidationHasValidationHooks\",\n inputs: []\n },\n {\n type: \"error\",\n name: \"ExecutionHookAlreadySet\",\n inputs: [\n {\n name: \"hookConfig\",\n type: \"bytes25\",\n internalType: \"HookConfig\"\n }\n ]\n },\n {\n type: \"error\",\n name: \"FallbackSignerDisabled\",\n inputs: []\n },\n {\n type: \"error\",\n name: \"FallbackSignerMismatch\",\n inputs: []\n },\n {\n type: \"error\",\n name: \"FallbackValidationInstallationNotAllowed\",\n inputs: []\n },\n {\n type: \"error\",\n name: \"InterfaceNotSupported\",\n inputs: [\n {\n name: \"module\",\n type: \"address\",\n internalType: \"address\"\n }\n ]\n },\n {\n type: \"error\",\n name: \"InvalidInitialization\",\n inputs: []\n },\n {\n type: \"error\",\n name: \"InvalidSignatureType\",\n inputs: []\n },\n {\n type: \"error\",\n name: \"ModuleInstallCallbackFailed\",\n inputs: [\n {\n name: \"module\",\n type: \"address\",\n internalType: \"address\"\n },\n {\n name: \"revertReason\",\n type: \"bytes\",\n internalType: \"bytes\"\n }\n ]\n },\n {\n type: \"error\",\n name: \"NonCanonicalEncoding\",\n inputs: []\n },\n {\n type: \"error\",\n name: \"NotEntryPoint\",\n inputs: []\n },\n {\n type: \"error\",\n name: \"PreValidationHookDuplicate\",\n inputs: []\n },\n {\n type: \"error\",\n name: \"RequireUserOperationContext\",\n inputs: []\n },\n {\n type: \"error\",\n name: \"SegmentOutOfOrder\",\n inputs: []\n },\n {\n type: \"error\",\n name: \"SelfCallRecursionDepthExceeded\",\n inputs: []\n },\n {\n type: \"error\",\n name: \"SignatureValidationInvalid\",\n inputs: [\n {\n name: \"validationFunction\",\n type: \"bytes24\",\n internalType: \"ModuleEntity\"\n }\n ]\n },\n {\n type: \"error\",\n name: \"UnauthorizedCallContext\",\n inputs: []\n },\n {\n type: \"error\",\n name: \"UnexpectedAggregator\",\n inputs: [\n {\n name: \"validationFunction\",\n type: \"bytes24\",\n internalType: \"ModuleEntity\"\n },\n {\n name: \"aggregator\",\n type: \"address\",\n internalType: \"address\"\n }\n ]\n },\n {\n type: \"error\",\n name: \"UnrecognizedFunction\",\n inputs: [\n {\n name: \"selector\",\n type: \"bytes4\",\n internalType: \"bytes4\"\n }\n ]\n },\n {\n type: \"error\",\n name: \"UpgradeFailed\",\n inputs: []\n },\n {\n type: \"error\",\n name: \"UserOpValidationInvalid\",\n inputs: [\n {\n name: \"validationFunction\",\n type: \"bytes24\",\n internalType: \"ModuleEntity\"\n }\n ]\n },\n {\n type: \"error\",\n name: \"ValidationAlreadySet\",\n inputs: [\n {\n name: \"selector\",\n type: \"bytes4\",\n internalType: \"bytes4\"\n },\n {\n name: \"validationFunction\",\n type: \"bytes24\",\n internalType: \"ModuleEntity\"\n }\n ]\n },\n {\n type: \"error\",\n name: \"ValidationAssocHookLimitExceeded\",\n inputs: []\n },\n {\n type: \"error\",\n name: \"ValidationEntityIdInUse\",\n inputs: []\n },\n {\n type: \"error\",\n name: \"ValidationFunctionMissing\",\n inputs: [\n {\n name: \"selector\",\n type: \"bytes4\",\n internalType: \"bytes4\"\n }\n ]\n },\n {\n type: \"error\",\n name: \"ValidationSignatureSegmentMissing\",\n inputs: []\n }\n ];\n }\n });\n\n // ../../../node_modules/.pnpm/@account-kit+smart-contracts@4.62.0_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5._65dee0153d50ca3a2d2c6830319271d9/node_modules/@account-kit/smart-contracts/dist/esm/src/index.js\n var src_exports = {};\n __export(src_exports, {\n AccountVersionRegistry: () => AccountVersionRegistry,\n IAccountLoupeAbi: () => IAccountLoupeAbi,\n IPluginAbi: () => IPluginAbi,\n IPluginManagerAbi: () => IPluginManagerAbi,\n IStandardExecutorAbi: () => IStandardExecutorAbi,\n InvalidAggregatedSignatureError: () => InvalidAggregatedSignatureError,\n InvalidContextSignatureError: () => InvalidContextSignatureError,\n LightAccountUnsupported1271Factories: () => LightAccountUnsupported1271Factories,\n LightAccountUnsupported1271Impls: () => LightAccountUnsupported1271Impls,\n MultiOwnerModularAccountFactoryAbi: () => MultiOwnerModularAccountFactoryAbi,\n MultiOwnerPlugin: () => MultiOwnerPlugin,\n MultiOwnerPluginAbi: () => MultiOwnerPluginAbi,\n MultiOwnerPluginExecutionFunctionAbi: () => MultiOwnerPluginExecutionFunctionAbi,\n MultisigAccountExpectedError: () => MultisigAccountExpectedError,\n MultisigMissingSignatureError: () => MultisigMissingSignatureError,\n MultisigModularAccountFactoryAbi: () => MultisigModularAccountFactoryAbi,\n MultisigPlugin: () => MultisigPlugin,\n MultisigPluginAbi: () => MultisigPluginAbi,\n MultisigPluginExecutionFunctionAbi: () => MultisigPluginExecutionFunctionAbi,\n SessionKeyAccessListType: () => SessionKeyAccessListType,\n SessionKeyPermissionsBuilder: () => SessionKeyPermissionsBuilder,\n SessionKeyPlugin: () => SessionKeyPlugin,\n SessionKeyPluginAbi: () => SessionKeyPluginAbi,\n SessionKeyPluginExecutionFunctionAbi: () => SessionKeyPluginExecutionFunctionAbi,\n SessionKeySigner: () => SessionKeySigner,\n UpgradeableModularAccountAbi: () => UpgradeableModularAccountAbi,\n accountLoupeActions: () => accountLoupeActions,\n buildSessionKeysToRemoveStruct: () => buildSessionKeysToRemoveStruct,\n combineSignatures: () => combineSignatures,\n createLightAccount: () => createLightAccount,\n createLightAccountAlchemyClient: () => createLightAccountAlchemyClient,\n createLightAccountClient: () => createLightAccountClient,\n createModularAccountAlchemyClient: () => createModularAccountAlchemyClient,\n createModularAccountV2: () => createModularAccountV2,\n createModularAccountV2Client: () => createModularAccountV2Client,\n createMultiOwnerLightAccount: () => createMultiOwnerLightAccount,\n createMultiOwnerLightAccountAlchemyClient: () => createMultiOwnerLightAccountAlchemyClient,\n createMultiOwnerLightAccountClient: () => createMultiOwnerLightAccountClient,\n createMultiOwnerModularAccount: () => createMultiOwnerModularAccount,\n createMultiOwnerModularAccountClient: () => createMultiOwnerModularAccountClient,\n createMultisigAccountAlchemyClient: () => createMultisigAccountAlchemyClient,\n createMultisigModularAccount: () => createMultisigModularAccount,\n createMultisigModularAccountClient: () => createMultisigModularAccountClient,\n defaultLightAccountVersion: () => defaultLightAccountVersion,\n formatSignatures: () => formatSignatures,\n getDefaultLightAccountFactoryAddress: () => getDefaultLightAccountFactoryAddress,\n getDefaultMultiOwnerLightAccountFactoryAddress: () => getDefaultMultiOwnerLightAccountFactoryAddress,\n getDefaultMultiOwnerModularAccountFactoryAddress: () => getDefaultMultiOwnerModularAccountFactoryAddress,\n getDefaultMultisigModularAccountFactoryAddress: () => getDefaultMultisigModularAccountFactoryAddress,\n getLightAccountVersionForAccount: () => getLightAccountVersionForAccount,\n getMAInitializationData: () => getMAInitializationData,\n getMAV2UpgradeToData: () => getMAV2UpgradeToData,\n getMSCAUpgradeToData: () => getMSCAUpgradeToData,\n getSignerType: () => getSignerType,\n installPlugin: () => installPlugin,\n lightAccountClientActions: () => lightAccountClientActions,\n multiOwnerLightAccountClientActions: () => multiOwnerLightAccountClientActions,\n multiOwnerPluginActions: () => multiOwnerPluginActions2,\n multisigPluginActions: () => multisigPluginActions2,\n multisigSignatureMiddleware: () => multisigSignatureMiddleware,\n pluginManagerActions: () => pluginManagerActions,\n predictLightAccountAddress: () => predictLightAccountAddress,\n predictModularAccountV2Address: () => predictModularAccountV2Address,\n predictMultiOwnerLightAccountAddress: () => predictMultiOwnerLightAccountAddress,\n semiModularAccountBytecodeAbi: () => semiModularAccountBytecodeAbi,\n sessionKeyPluginActions: () => sessionKeyPluginActions2,\n splitAggregatedSignature: () => splitAggregatedSignature,\n standardExecutor: () => standardExecutor,\n transferLightAccountOwnership: () => transferOwnership,\n updateMultiOwnerLightAccountOwners: () => updateOwners\n });\n var init_src = __esm({\n \"../../../node_modules/.pnpm/@account-kit+smart-contracts@4.62.0_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5._65dee0153d50ca3a2d2c6830319271d9/node_modules/@account-kit/smart-contracts/dist/esm/src/index.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_account3();\n init_transferOwnership();\n init_alchemyClient();\n init_client2();\n init_multiOwnerAlchemyClient();\n init_lightAccount();\n init_predictAddress();\n init_predictAddress();\n init_utils11();\n init_multiOwner();\n init_updateOwners();\n init_multiOwnerLightAccount();\n init_multiOwnerLightAccount2();\n init_IAccountLoupe();\n init_IPlugin();\n init_IPluginManager();\n init_IStandardExecutor();\n init_MultiOwnerModularAccountFactory();\n init_MultisigModularAccountFactory();\n init_UpgradeableModularAccount();\n init_decorator();\n init_multiOwnerAccount();\n init_multisigAccount();\n init_standardExecutor();\n init_alchemyClient2();\n init_client3();\n init_multiSigAlchemyClient();\n init_errors6();\n init_decorator2();\n init_installPlugin();\n init_extension();\n init_plugin();\n init_multisig();\n init_utils13();\n init_extension3();\n init_permissions();\n init_plugin3();\n init_signer4();\n init_utils14();\n init_utils12();\n init_modularAccountV2();\n init_client4();\n init_utils17();\n init_predictAddress2();\n init_semiModularAccountBytecodeAbi();\n }\n });\n\n // ../../libs/ability-sdk/dist/src/lib/abilityHelpers/gasSponsorship/get-alchemy-chain-config.js\n var require_get_alchemy_chain_config = __commonJS({\n \"../../libs/ability-sdk/dist/src/lib/abilityHelpers/gasSponsorship/get-alchemy-chain-config.js\"(exports3) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n Object.defineProperty(exports3, \"__esModule\", { value: true });\n exports3.getAlchemyChainConfig = getAlchemyChainConfig;\n var infra_1 = (init_exports2(), __toCommonJS(exports_exports2));\n function getAlchemyChainConfig(chainId) {\n const supportedChains = [\n infra_1.arbitrum,\n infra_1.arbitrumGoerli,\n infra_1.arbitrumNova,\n infra_1.arbitrumSepolia,\n infra_1.base,\n infra_1.baseGoerli,\n infra_1.baseSepolia,\n infra_1.fraxtal,\n infra_1.fraxtalSepolia,\n infra_1.goerli,\n infra_1.mainnet,\n infra_1.optimism,\n infra_1.optimismGoerli,\n infra_1.optimismSepolia,\n infra_1.polygon,\n infra_1.polygonAmoy,\n infra_1.polygonMumbai,\n infra_1.sepolia,\n infra_1.shape,\n infra_1.shapeSepolia,\n infra_1.worldChain,\n infra_1.worldChainSepolia,\n infra_1.zora,\n infra_1.zoraSepolia,\n infra_1.beraChainBartio,\n infra_1.opbnbMainnet,\n infra_1.opbnbTestnet,\n infra_1.soneiumMinato,\n infra_1.soneiumMainnet,\n infra_1.unichainMainnet,\n infra_1.unichainSepolia,\n infra_1.inkMainnet,\n infra_1.inkSepolia,\n infra_1.mekong,\n infra_1.monadTestnet,\n infra_1.openlootSepolia,\n infra_1.gensynTestnet,\n infra_1.riseTestnet,\n infra_1.storyMainnet,\n infra_1.storyAeneid,\n infra_1.celoAlfajores,\n infra_1.celoMainnet,\n infra_1.teaSepolia,\n infra_1.bobaSepolia,\n infra_1.bobaMainnet\n ];\n const chain2 = supportedChains.find((c4) => c4.id === chainId);\n if (!chain2) {\n throw new Error(`Chain ID ${chainId} not supported by @account-kit/infra. Supported chain IDs: ${supportedChains.map((c4) => c4.id).join(\", \")}`);\n }\n return chain2;\n }\n }\n });\n\n // ../../libs/ability-sdk/dist/src/lib/abilityHelpers/gasSponsorship/lit-actions-smart-signer.js\n var require_lit_actions_smart_signer = __commonJS({\n \"../../libs/ability-sdk/dist/src/lib/abilityHelpers/gasSponsorship/lit-actions-smart-signer.js\"(exports3) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n Object.defineProperty(exports3, \"__esModule\", { value: true });\n exports3.LitActionsSmartSigner = void 0;\n var LitActionsSmartSigner = class {\n signerType = \"lit-actions\";\n inner;\n pkpPublicKey;\n signerAddress;\n constructor(config2) {\n if (config2.pkpPublicKey.startsWith(\"0x\")) {\n config2.pkpPublicKey = config2.pkpPublicKey.slice(2);\n }\n this.pkpPublicKey = config2.pkpPublicKey;\n this.signerAddress = ethers.utils.computeAddress(\"0x\" + config2.pkpPublicKey);\n this.inner = {\n pkpPublicKey: config2.pkpPublicKey,\n chainId: config2.chainId\n };\n }\n async getAddress() {\n return this.signerAddress;\n }\n async signMessage(message) {\n let messageToSign;\n if (typeof message === \"string\") {\n messageToSign = message;\n } else {\n messageToSign = typeof message.raw === \"string\" ? ethers.utils.arrayify(message.raw) : message.raw;\n }\n const messageHash = ethers.utils.hashMessage(messageToSign);\n const sig = await Lit.Actions.signAndCombineEcdsa({\n toSign: ethers.utils.arrayify(messageHash),\n publicKey: this.pkpPublicKey,\n sigName: `alchemyMessage`\n });\n const parsedSig = JSON.parse(sig);\n return ethers.utils.joinSignature({\n r: \"0x\" + parsedSig.r.substring(2),\n s: \"0x\" + parsedSig.s,\n v: parsedSig.v\n });\n }\n async signTypedData(params) {\n const hash3 = ethers.utils._TypedDataEncoder.hash(params.domain || {}, params.types || {}, params.message || {});\n const sig = await Lit.Actions.signAndCombineEcdsa({\n toSign: ethers.utils.arrayify(hash3),\n publicKey: this.pkpPublicKey,\n sigName: `alchemyTypedData`\n });\n const parsedSig = JSON.parse(sig);\n return ethers.utils.joinSignature({\n r: \"0x\" + parsedSig.r.substring(2),\n s: \"0x\" + parsedSig.s,\n v: parsedSig.v\n });\n }\n // reference implementation is from Viem SmartAccountSigner\n async signAuthorization(unsignedAuthorization) {\n const { contractAddress, chainId, nonce } = unsignedAuthorization;\n if (!contractAddress || !chainId) {\n throw new Error(\"Invalid authorization: contractAddress and chainId are required\");\n }\n const hash3 = ethers.utils.keccak256(ethers.utils.hexConcat([\n \"0x05\",\n ethers.utils.RLP.encode([\n ethers.utils.hexlify(chainId),\n contractAddress,\n nonce ? ethers.utils.hexlify(nonce) : \"0x\"\n ])\n ]));\n const sig = await Lit.Actions.signAndCombineEcdsa({\n toSign: ethers.utils.arrayify(hash3),\n publicKey: this.pkpPublicKey,\n sigName: `alchemyAuth7702`\n });\n const sigObj = JSON.parse(sig);\n return {\n address: unsignedAuthorization.address || contractAddress,\n chainId,\n nonce,\n r: \"0x\" + sigObj.r.substring(2),\n s: \"0x\" + sigObj.s,\n v: BigInt(sigObj.v),\n yParity: sigObj.v\n };\n }\n };\n exports3.LitActionsSmartSigner = LitActionsSmartSigner;\n }\n });\n\n // ../../libs/ability-sdk/dist/src/lib/abilityHelpers/gasSponsorship/sponsored-gas-raw-transaction.js\n var require_sponsored_gas_raw_transaction = __commonJS({\n \"../../libs/ability-sdk/dist/src/lib/abilityHelpers/gasSponsorship/sponsored-gas-raw-transaction.js\"(exports3) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n Object.defineProperty(exports3, \"__esModule\", { value: true });\n exports3.sponsoredGasRawTransaction = void 0;\n var infra_1 = (init_exports2(), __toCommonJS(exports_exports2));\n var smart_contracts_1 = (init_src(), __toCommonJS(src_exports));\n var get_alchemy_chain_config_1 = require_get_alchemy_chain_config();\n var lit_actions_smart_signer_1 = require_lit_actions_smart_signer();\n var sponsoredGasRawTransaction2 = async ({ pkpPublicKey, to, value, data, chainId, eip7702AlchemyApiKey, eip7702AlchemyPolicyId }) => {\n if (!eip7702AlchemyApiKey || !eip7702AlchemyPolicyId) {\n throw new Error(\"EIP7702 Alchemy API key and policy ID are required when using Alchemy for gas sponsorship\");\n }\n if (!chainId) {\n throw new Error(\"Chain ID is required when using Alchemy for gas sponsorship\");\n }\n console.log(\"[sponsoredGasRawTransaction] Encoded data:\", data);\n const txValue = value ? BigInt(value.toString()) : 0n;\n const litSigner = new lit_actions_smart_signer_1.LitActionsSmartSigner({\n pkpPublicKey,\n chainId\n });\n const alchemyChain = (0, get_alchemy_chain_config_1.getAlchemyChainConfig)(chainId);\n const smartAccountClient = await (0, smart_contracts_1.createModularAccountV2Client)({\n mode: \"7702\",\n transport: (0, infra_1.alchemy)({ apiKey: eip7702AlchemyApiKey }),\n chain: alchemyChain,\n signer: litSigner,\n policyId: eip7702AlchemyPolicyId\n });\n console.log(\"[sponsoredGasRawTransaction] Smart account client created\");\n const userOperation = {\n target: to,\n value: txValue,\n data\n };\n console.log(\"[sponsoredGasRawTransaction] User operation prepared\", userOperation);\n const uoStructResponse = await Lit.Actions.runOnce({\n waitForResponse: true,\n name: \"buildUserOperation\"\n }, async () => {\n try {\n const uoStruct2 = await smartAccountClient.buildUserOperation({\n uo: userOperation,\n account: smartAccountClient.account\n });\n return JSON.stringify(uoStruct2, (_2, v2) => typeof v2 === \"bigint\" ? { type: \"BigInt\", value: v2.toString() } : v2);\n } catch (e3) {\n console.log(\"[sponsoredGasRawTransaction] Failed to build user operation, error below\");\n console.log(e3);\n console.log(e3.stack);\n return \"\";\n }\n });\n if (uoStructResponse === \"\") {\n throw new Error(\"[sponsoredGasRawTransaction] Failed to build user operation\");\n }\n const uoStruct = JSON.parse(uoStructResponse, (_2, v2) => {\n if (v2 && typeof v2 === \"object\" && v2.type === \"BigInt\" && typeof v2.value === \"string\") {\n return BigInt(v2.value);\n }\n return v2;\n });\n console.log(\"[sponsoredGasRawTransaction] User operation built, starting signing...\", uoStruct);\n const signedUserOperation = await smartAccountClient.signUserOperation({\n account: smartAccountClient.account,\n uoStruct\n });\n console.log(\"[sponsoredGasRawTransaction] User operation signed\", signedUserOperation);\n const entryPoint = smartAccountClient.account.getEntryPoint();\n const uoHash = await Lit.Actions.runOnce({\n waitForResponse: true,\n name: \"sendWithAlchemy\"\n }, async () => {\n try {\n const userOpResult = await smartAccountClient.sendRawUserOperation(signedUserOperation, entryPoint.address);\n console.log(`[sponsoredGasRawTransaction] User operation sent`, {\n userOpHash: userOpResult\n });\n return userOpResult;\n } catch (e3) {\n console.log(\"[sponsoredGasRawTransaction] Failed to send user operation, error below\");\n console.log(e3);\n console.log(e3.stack);\n return \"\";\n }\n });\n if (uoHash === \"\") {\n throw new Error(\"[sponsoredGasRawTransaction] Failed to send user operation\");\n }\n return uoHash;\n };\n exports3.sponsoredGasRawTransaction = sponsoredGasRawTransaction2;\n }\n });\n\n // ../../libs/ability-sdk/dist/src/lib/abilityHelpers/gasSponsorship/sponsored-gas-contract-call.js\n var require_sponsored_gas_contract_call = __commonJS({\n \"../../libs/ability-sdk/dist/src/lib/abilityHelpers/gasSponsorship/sponsored-gas-contract-call.js\"(exports3) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n Object.defineProperty(exports3, \"__esModule\", { value: true });\n exports3.sponsoredGasContractCall = void 0;\n var sponsored_gas_raw_transaction_1 = require_sponsored_gas_raw_transaction();\n var sponsoredGasContractCall = async ({ pkpPublicKey, abi: abi2, contractAddress, functionName, args, overrides = {}, chainId, eip7702AlchemyApiKey, eip7702AlchemyPolicyId }) => {\n const iface = new ethers.utils.Interface(abi2);\n const encodedData = iface.encodeFunctionData(functionName, args);\n console.log(\"Encoded data:\", encodedData);\n if (!eip7702AlchemyApiKey || !eip7702AlchemyPolicyId) {\n throw new Error(\"EIP7702 Alchemy API key and policy ID are required when using Alchemy for gas sponsorship\");\n }\n if (!chainId) {\n throw new Error(\"Chain ID is required when using Alchemy for gas sponsorship\");\n }\n const txValue = overrides.value ? BigInt(overrides.value.toString()) : 0n;\n return (0, sponsored_gas_raw_transaction_1.sponsoredGasRawTransaction)({\n pkpPublicKey,\n to: contractAddress,\n value: txValue.toString(),\n data: encodedData,\n chainId,\n eip7702AlchemyApiKey,\n eip7702AlchemyPolicyId\n });\n };\n exports3.sponsoredGasContractCall = sponsoredGasContractCall;\n }\n });\n\n // ../../libs/ability-sdk/dist/src/lib/abilityHelpers/gasSponsorship/index.js\n var require_gasSponsorship = __commonJS({\n \"../../libs/ability-sdk/dist/src/lib/abilityHelpers/gasSponsorship/index.js\"(exports3) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n Object.defineProperty(exports3, \"__esModule\", { value: true });\n exports3.sponsoredGasContractCall = exports3.sponsoredGasRawTransaction = void 0;\n var sponsored_gas_raw_transaction_1 = require_sponsored_gas_raw_transaction();\n Object.defineProperty(exports3, \"sponsoredGasRawTransaction\", { enumerable: true, get: function() {\n return sponsored_gas_raw_transaction_1.sponsoredGasRawTransaction;\n } });\n var sponsored_gas_contract_call_1 = require_sponsored_gas_contract_call();\n Object.defineProperty(exports3, \"sponsoredGasContractCall\", { enumerable: true, get: function() {\n return sponsored_gas_contract_call_1.sponsoredGasContractCall;\n } });\n }\n });\n\n // ../../libs/ability-sdk/dist/src/lib/abilityHelpers/erc20-abi.js\n var require_erc20_abi = __commonJS({\n \"../../libs/ability-sdk/dist/src/lib/abilityHelpers/erc20-abi.js\"(exports3) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n Object.defineProperty(exports3, \"__esModule\", { value: true });\n exports3.ERC20_ABI = void 0;\n exports3.ERC20_ABI = [\n {\n inputs: [],\n name: \"name\",\n outputs: [{ internalType: \"string\", name: \"\", type: \"string\" }],\n stateMutability: \"view\",\n type: \"function\"\n },\n {\n inputs: [],\n name: \"symbol\",\n outputs: [{ internalType: \"string\", name: \"\", type: \"string\" }],\n stateMutability: \"view\",\n type: \"function\"\n },\n {\n inputs: [],\n name: \"decimals\",\n outputs: [{ internalType: \"uint8\", name: \"\", type: \"uint8\" }],\n stateMutability: \"view\",\n type: \"function\"\n },\n {\n inputs: [],\n name: \"totalSupply\",\n outputs: [{ internalType: \"uint256\", name: \"\", type: \"uint256\" }],\n stateMutability: \"view\",\n type: \"function\"\n },\n {\n inputs: [{ internalType: \"address\", name: \"account\", type: \"address\" }],\n name: \"balanceOf\",\n outputs: [{ internalType: \"uint256\", name: \"\", type: \"uint256\" }],\n stateMutability: \"view\",\n type: \"function\"\n },\n {\n inputs: [\n { internalType: \"address\", name: \"to\", type: \"address\" },\n { internalType: \"uint256\", name: \"value\", type: \"uint256\" }\n ],\n name: \"transfer\",\n outputs: [{ internalType: \"bool\", name: \"\", type: \"bool\" }],\n stateMutability: \"nonpayable\",\n type: \"function\"\n },\n {\n inputs: [\n { internalType: \"address\", name: \"owner\", type: \"address\" },\n { internalType: \"address\", name: \"spender\", type: \"address\" }\n ],\n name: \"allowance\",\n outputs: [{ internalType: \"uint256\", name: \"\", type: \"uint256\" }],\n stateMutability: \"view\",\n type: \"function\"\n },\n {\n inputs: [\n { internalType: \"address\", name: \"spender\", type: \"address\" },\n { internalType: \"uint256\", name: \"value\", type: \"uint256\" }\n ],\n name: \"approve\",\n outputs: [{ internalType: \"bool\", name: \"\", type: \"bool\" }],\n stateMutability: \"nonpayable\",\n type: \"function\"\n },\n {\n inputs: [\n { internalType: \"address\", name: \"from\", type: \"address\" },\n { internalType: \"address\", name: \"to\", type: \"address\" },\n { internalType: \"uint256\", name: \"value\", type: \"uint256\" }\n ],\n name: \"transferFrom\",\n outputs: [{ internalType: \"bool\", name: \"\", type: \"bool\" }],\n stateMutability: \"nonpayable\",\n type: \"function\"\n },\n {\n inputs: [\n { internalType: \"address\", name: \"spender\", type: \"address\" },\n { internalType: \"uint256\", name: \"addedValue\", type: \"uint256\" }\n ],\n name: \"increaseAllowance\",\n outputs: [{ internalType: \"bool\", name: \"\", type: \"bool\" }],\n stateMutability: \"nonpayable\",\n type: \"function\"\n },\n {\n inputs: [\n { internalType: \"address\", name: \"spender\", type: \"address\" },\n { internalType: \"uint256\", name: \"subtractedValue\", type: \"uint256\" }\n ],\n name: \"decreaseAllowance\",\n outputs: [{ internalType: \"bool\", name: \"\", type: \"bool\" }],\n stateMutability: \"nonpayable\",\n type: \"function\"\n },\n {\n anonymous: false,\n inputs: [\n { indexed: true, internalType: \"address\", name: \"from\", type: \"address\" },\n { indexed: true, internalType: \"address\", name: \"to\", type: \"address\" },\n { indexed: false, internalType: \"uint256\", name: \"value\", type: \"uint256\" }\n ],\n name: \"Transfer\",\n type: \"event\"\n },\n {\n anonymous: false,\n inputs: [\n { indexed: true, internalType: \"address\", name: \"owner\", type: \"address\" },\n { indexed: true, internalType: \"address\", name: \"spender\", type: \"address\" },\n { indexed: false, internalType: \"uint256\", name: \"value\", type: \"uint256\" }\n ],\n name: \"Approval\",\n type: \"event\"\n }\n ];\n }\n });\n\n // ../../libs/ability-sdk/dist/src/lib/abilityHelpers/bigint-replace.js\n var require_bigint_replace = __commonJS({\n \"../../libs/ability-sdk/dist/src/lib/abilityHelpers/bigint-replace.js\"(exports3) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n Object.defineProperty(exports3, \"__esModule\", { value: true });\n exports3.bigIntReplacer = void 0;\n var bigIntReplacer10 = (key, value) => {\n return typeof value === \"bigint\" ? value.toString() : value;\n };\n exports3.bigIntReplacer = bigIntReplacer10;\n }\n });\n\n // ../../libs/ability-sdk/dist/src/lib/abilityHelpers/index.js\n var require_abilityHelpers = __commonJS({\n \"../../libs/ability-sdk/dist/src/lib/abilityHelpers/index.js\"(exports3) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n Object.defineProperty(exports3, \"__esModule\", { value: true });\n exports3.bigIntReplacer = exports3.ERC20_ABI = exports3.sponsoredGasContractCall = exports3.sponsoredGasRawTransaction = exports3.populateTransaction = void 0;\n var populateTransaction_1 = require_populateTransaction();\n Object.defineProperty(exports3, \"populateTransaction\", { enumerable: true, get: function() {\n return populateTransaction_1.populateTransaction;\n } });\n var gasSponsorship_1 = require_gasSponsorship();\n Object.defineProperty(exports3, \"sponsoredGasRawTransaction\", { enumerable: true, get: function() {\n return gasSponsorship_1.sponsoredGasRawTransaction;\n } });\n Object.defineProperty(exports3, \"sponsoredGasContractCall\", { enumerable: true, get: function() {\n return gasSponsorship_1.sponsoredGasContractCall;\n } });\n var erc20_abi_1 = require_erc20_abi();\n Object.defineProperty(exports3, \"ERC20_ABI\", { enumerable: true, get: function() {\n return erc20_abi_1.ERC20_ABI;\n } });\n var bigint_replace_1 = require_bigint_replace();\n Object.defineProperty(exports3, \"bigIntReplacer\", { enumerable: true, get: function() {\n return bigint_replace_1.bigIntReplacer;\n } });\n }\n });\n\n // ../../libs/ability-sdk/dist/src/index.js\n var require_src2 = __commonJS({\n \"../../libs/ability-sdk/dist/src/index.js\"(exports3) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n Object.defineProperty(exports3, \"__esModule\", { value: true });\n exports3.bigIntReplacer = exports3.ERC20_ABI = exports3.sponsoredGasContractCall = exports3.sponsoredGasRawTransaction = exports3.populateTransaction = exports3.supportedPoliciesForAbility = exports3.asBundledVincentPolicy = exports3.asBundledVincentAbility = exports3.vincentAbilityHandler = exports3.vincentPolicyHandler = exports3.VINCENT_TOOL_API_VERSION = exports3.createVincentAbility = exports3.createVincentAbilityPolicy = exports3.createVincentPolicy = void 0;\n var vincentPolicy_1 = require_vincentPolicy();\n Object.defineProperty(exports3, \"createVincentPolicy\", { enumerable: true, get: function() {\n return vincentPolicy_1.createVincentPolicy;\n } });\n Object.defineProperty(exports3, \"createVincentAbilityPolicy\", { enumerable: true, get: function() {\n return vincentPolicy_1.createVincentAbilityPolicy;\n } });\n var vincentAbility_1 = require_vincentAbility();\n Object.defineProperty(exports3, \"createVincentAbility\", { enumerable: true, get: function() {\n return vincentAbility_1.createVincentAbility;\n } });\n var constants_1 = require_constants2();\n Object.defineProperty(exports3, \"VINCENT_TOOL_API_VERSION\", { enumerable: true, get: function() {\n return constants_1.VINCENT_TOOL_API_VERSION;\n } });\n var vincentPolicyHandler_1 = require_vincentPolicyHandler();\n Object.defineProperty(exports3, \"vincentPolicyHandler\", { enumerable: true, get: function() {\n return vincentPolicyHandler_1.vincentPolicyHandler;\n } });\n var vincentAbilityHandler_1 = require_vincentAbilityHandler();\n Object.defineProperty(exports3, \"vincentAbilityHandler\", { enumerable: true, get: function() {\n return vincentAbilityHandler_1.vincentAbilityHandler;\n } });\n var bundledAbility_1 = require_bundledAbility();\n Object.defineProperty(exports3, \"asBundledVincentAbility\", { enumerable: true, get: function() {\n return bundledAbility_1.asBundledVincentAbility;\n } });\n var bundledPolicy_1 = require_bundledPolicy();\n Object.defineProperty(exports3, \"asBundledVincentPolicy\", { enumerable: true, get: function() {\n return bundledPolicy_1.asBundledVincentPolicy;\n } });\n var supportedPoliciesForAbility_1 = require_supportedPoliciesForAbility();\n Object.defineProperty(exports3, \"supportedPoliciesForAbility\", { enumerable: true, get: function() {\n return supportedPoliciesForAbility_1.supportedPoliciesForAbility;\n } });\n var abilityHelpers_1 = require_abilityHelpers();\n Object.defineProperty(exports3, \"populateTransaction\", { enumerable: true, get: function() {\n return abilityHelpers_1.populateTransaction;\n } });\n Object.defineProperty(exports3, \"sponsoredGasRawTransaction\", { enumerable: true, get: function() {\n return abilityHelpers_1.sponsoredGasRawTransaction;\n } });\n Object.defineProperty(exports3, \"sponsoredGasContractCall\", { enumerable: true, get: function() {\n return abilityHelpers_1.sponsoredGasContractCall;\n } });\n Object.defineProperty(exports3, \"ERC20_ABI\", { enumerable: true, get: function() {\n return abilityHelpers_1.ERC20_ABI;\n } });\n Object.defineProperty(exports3, \"bigIntReplacer\", { enumerable: true, get: function() {\n return abilityHelpers_1.bigIntReplacer;\n } });\n }\n });\n\n // src/lib/lit-action.ts\n init_dirname();\n init_buffer2();\n init_process2();\n var import_vincent_ability_sdk12 = __toESM(require_src2());\n\n // src/lib/vincent-ability.ts\n init_dirname();\n init_buffer2();\n init_process2();\n var import_vincent_ability_sdk11 = __toESM(require_src2());\n var import_ethers14 = __toESM(require_lib32());\n\n // ../../../node_modules/.pnpm/@nktkas+hyperliquid@0.25.7_typescript@5.8.3/node_modules/@nktkas/hyperliquid/esm/src/mod.js\n init_dirname();\n init_buffer2();\n init_process2();\n\n // ../../../node_modules/.pnpm/@nktkas+hyperliquid@0.25.7_typescript@5.8.3/node_modules/@nktkas/hyperliquid/esm/src/_base.js\n init_dirname();\n init_buffer2();\n init_process2();\n var HyperliquidError = class extends Error {\n constructor(message, options) {\n super(message, options);\n this.name = \"HyperliquidError\";\n }\n };\n\n // ../../../node_modules/.pnpm/@nktkas+hyperliquid@0.25.7_typescript@5.8.3/node_modules/@nktkas/hyperliquid/esm/src/api/_base.js\n init_dirname();\n init_buffer2();\n init_process2();\n\n // ../../../node_modules/.pnpm/valibot@1.1.0_typescript@5.8.3/node_modules/valibot/dist/index.js\n init_dirname();\n init_buffer2();\n init_process2();\n var store;\n // @__NO_SIDE_EFFECTS__\n function getGlobalConfig(config2) {\n return {\n lang: config2?.lang ?? store?.lang,\n message: config2?.message,\n abortEarly: config2?.abortEarly ?? store?.abortEarly,\n abortPipeEarly: config2?.abortPipeEarly ?? store?.abortPipeEarly\n };\n }\n var store2;\n // @__NO_SIDE_EFFECTS__\n function getGlobalMessage(lang) {\n return store2?.get(lang);\n }\n var store3;\n // @__NO_SIDE_EFFECTS__\n function getSchemaMessage(lang) {\n return store3?.get(lang);\n }\n var store4;\n // @__NO_SIDE_EFFECTS__\n function getSpecificMessage(reference, lang) {\n return store4?.get(reference)?.get(lang);\n }\n // @__NO_SIDE_EFFECTS__\n function _stringify(input) {\n const type = typeof input;\n if (type === \"string\") {\n return `\"${input}\"`;\n }\n if (type === \"number\" || type === \"bigint\" || type === \"boolean\") {\n return `${input}`;\n }\n if (type === \"object\" || type === \"function\") {\n return (input && Object.getPrototypeOf(input)?.constructor?.name) ?? \"null\";\n }\n return type;\n }\n function _addIssue(context2, label, dataset, config2, other) {\n const input = other && \"input\" in other ? other.input : dataset.value;\n const expected = other?.expected ?? context2.expects ?? null;\n const received = other?.received ?? /* @__PURE__ */ _stringify(input);\n const issue = {\n kind: context2.kind,\n type: context2.type,\n input,\n expected,\n received,\n message: `Invalid ${label}: ${expected ? `Expected ${expected} but r` : \"R\"}eceived ${received}`,\n requirement: context2.requirement,\n path: other?.path,\n issues: other?.issues,\n lang: config2.lang,\n abortEarly: config2.abortEarly,\n abortPipeEarly: config2.abortPipeEarly\n };\n const isSchema = context2.kind === \"schema\";\n const message2 = other?.message ?? context2.message ?? /* @__PURE__ */ getSpecificMessage(context2.reference, issue.lang) ?? (isSchema ? /* @__PURE__ */ getSchemaMessage(issue.lang) : null) ?? config2.message ?? /* @__PURE__ */ getGlobalMessage(issue.lang);\n if (message2 !== void 0) {\n issue.message = typeof message2 === \"function\" ? (\n // @ts-expect-error\n message2(issue)\n ) : message2;\n }\n if (isSchema) {\n dataset.typed = false;\n }\n if (dataset.issues) {\n dataset.issues.push(issue);\n } else {\n dataset.issues = [issue];\n }\n }\n // @__NO_SIDE_EFFECTS__\n function _getStandardProps(context2) {\n return {\n version: 1,\n vendor: \"valibot\",\n validate(value2) {\n return context2[\"~run\"]({ value: value2 }, /* @__PURE__ */ getGlobalConfig());\n }\n };\n }\n // @__NO_SIDE_EFFECTS__\n function _joinExpects(values2, separator) {\n const list = [...new Set(values2)];\n if (list.length > 1) {\n return `(${list.join(` ${separator} `)})`;\n }\n return list[0] ?? \"never\";\n }\n // @__NO_SIDE_EFFECTS__\n function getDotPath(issue) {\n if (issue.path) {\n let key = \"\";\n for (const item of issue.path) {\n if (typeof item.key === \"string\" || typeof item.key === \"number\") {\n if (key) {\n key += `.${item.key}`;\n } else {\n key += item.key;\n }\n } else {\n return null;\n }\n }\n return key;\n }\n return null;\n }\n // @__NO_SIDE_EFFECTS__\n function description(description_) {\n return {\n kind: \"metadata\",\n type: \"description\",\n reference: description,\n description: description_\n };\n }\n // @__NO_SIDE_EFFECTS__\n function length(requirement, message2) {\n return {\n kind: \"validation\",\n type: \"length\",\n reference: length,\n async: false,\n expects: `${requirement}`,\n requirement,\n message: message2,\n \"~run\"(dataset, config2) {\n if (dataset.typed && dataset.value.length !== this.requirement) {\n _addIssue(this, \"length\", dataset, config2, {\n received: `${dataset.value.length}`\n });\n }\n return dataset;\n }\n };\n }\n // @__NO_SIDE_EFFECTS__\n function minValue(requirement, message2) {\n return {\n kind: \"validation\",\n type: \"min_value\",\n reference: minValue,\n async: false,\n expects: `>=${requirement instanceof Date ? requirement.toJSON() : /* @__PURE__ */ _stringify(requirement)}`,\n requirement,\n message: message2,\n \"~run\"(dataset, config2) {\n if (dataset.typed && !(dataset.value >= this.requirement)) {\n _addIssue(this, \"value\", dataset, config2, {\n received: dataset.value instanceof Date ? dataset.value.toJSON() : /* @__PURE__ */ _stringify(dataset.value)\n });\n }\n return dataset;\n }\n };\n }\n // @__NO_SIDE_EFFECTS__\n function regex(requirement, message2) {\n return {\n kind: \"validation\",\n type: \"regex\",\n reference: regex,\n async: false,\n expects: `${requirement}`,\n requirement,\n message: message2,\n \"~run\"(dataset, config2) {\n if (dataset.typed && !this.requirement.test(dataset.value)) {\n _addIssue(this, \"format\", dataset, config2);\n }\n return dataset;\n }\n };\n }\n // @__NO_SIDE_EFFECTS__\n function safeInteger(message2) {\n return {\n kind: \"validation\",\n type: \"safe_integer\",\n reference: safeInteger,\n async: false,\n expects: null,\n requirement: Number.isSafeInteger,\n message: message2,\n \"~run\"(dataset, config2) {\n if (dataset.typed && !this.requirement(dataset.value)) {\n _addIssue(this, \"safe integer\", dataset, config2);\n }\n return dataset;\n }\n };\n }\n // @__NO_SIDE_EFFECTS__\n function transform(operation) {\n return {\n kind: \"transformation\",\n type: \"transform\",\n reference: transform,\n async: false,\n operation,\n \"~run\"(dataset) {\n dataset.value = this.operation(dataset.value);\n return dataset;\n }\n };\n }\n // @__NO_SIDE_EFFECTS__\n function trim6() {\n return {\n kind: \"transformation\",\n type: \"trim\",\n reference: trim6,\n async: false,\n \"~run\"(dataset) {\n dataset.value = dataset.value.trim();\n return dataset;\n }\n };\n }\n // @__NO_SIDE_EFFECTS__\n function getFallback(schema, dataset, config2) {\n return typeof schema.fallback === \"function\" ? (\n // @ts-expect-error\n schema.fallback(dataset, config2)\n ) : (\n // @ts-expect-error\n schema.fallback\n );\n }\n // @__NO_SIDE_EFFECTS__\n function getDefault(schema, dataset, config2) {\n return typeof schema.default === \"function\" ? (\n // @ts-expect-error\n schema.default(dataset, config2)\n ) : (\n // @ts-expect-error\n schema.default\n );\n }\n // @__NO_SIDE_EFFECTS__\n function array(item, message2) {\n return {\n kind: \"schema\",\n type: \"array\",\n reference: array,\n expects: \"Array\",\n async: false,\n item,\n message: message2,\n get \"~standard\"() {\n return /* @__PURE__ */ _getStandardProps(this);\n },\n \"~run\"(dataset, config2) {\n const input = dataset.value;\n if (Array.isArray(input)) {\n dataset.typed = true;\n dataset.value = [];\n for (let key = 0; key < input.length; key++) {\n const value2 = input[key];\n const itemDataset = this.item[\"~run\"]({ value: value2 }, config2);\n if (itemDataset.issues) {\n const pathItem = {\n type: \"array\",\n origin: \"value\",\n input,\n key,\n value: value2\n };\n for (const issue of itemDataset.issues) {\n if (issue.path) {\n issue.path.unshift(pathItem);\n } else {\n issue.path = [pathItem];\n }\n dataset.issues?.push(issue);\n }\n if (!dataset.issues) {\n dataset.issues = itemDataset.issues;\n }\n if (config2.abortEarly) {\n dataset.typed = false;\n break;\n }\n }\n if (!itemDataset.typed) {\n dataset.typed = false;\n }\n dataset.value.push(itemDataset.value);\n }\n } else {\n _addIssue(this, \"type\", dataset, config2);\n }\n return dataset;\n }\n };\n }\n // @__NO_SIDE_EFFECTS__\n function boolean(message2) {\n return {\n kind: \"schema\",\n type: \"boolean\",\n reference: boolean,\n expects: \"boolean\",\n async: false,\n message: message2,\n get \"~standard\"() {\n return /* @__PURE__ */ _getStandardProps(this);\n },\n \"~run\"(dataset, config2) {\n if (typeof dataset.value === \"boolean\") {\n dataset.typed = true;\n } else {\n _addIssue(this, \"type\", dataset, config2);\n }\n return dataset;\n }\n };\n }\n // @__NO_SIDE_EFFECTS__\n function literal(literal_, message2) {\n return {\n kind: \"schema\",\n type: \"literal\",\n reference: literal,\n expects: /* @__PURE__ */ _stringify(literal_),\n async: false,\n literal: literal_,\n message: message2,\n get \"~standard\"() {\n return /* @__PURE__ */ _getStandardProps(this);\n },\n \"~run\"(dataset, config2) {\n if (dataset.value === this.literal) {\n dataset.typed = true;\n } else {\n _addIssue(this, \"type\", dataset, config2);\n }\n return dataset;\n }\n };\n }\n // @__NO_SIDE_EFFECTS__\n function nullish(wrapped, default_) {\n return {\n kind: \"schema\",\n type: \"nullish\",\n reference: nullish,\n expects: `(${wrapped.expects} | null | undefined)`,\n async: false,\n wrapped,\n default: default_,\n get \"~standard\"() {\n return /* @__PURE__ */ _getStandardProps(this);\n },\n \"~run\"(dataset, config2) {\n if (dataset.value === null || dataset.value === void 0) {\n if (this.default !== void 0) {\n dataset.value = /* @__PURE__ */ getDefault(this, dataset, config2);\n }\n if (dataset.value === null || dataset.value === void 0) {\n dataset.typed = true;\n return dataset;\n }\n }\n return this.wrapped[\"~run\"](dataset, config2);\n }\n };\n }\n // @__NO_SIDE_EFFECTS__\n function number(message2) {\n return {\n kind: \"schema\",\n type: \"number\",\n reference: number,\n expects: \"number\",\n async: false,\n message: message2,\n get \"~standard\"() {\n return /* @__PURE__ */ _getStandardProps(this);\n },\n \"~run\"(dataset, config2) {\n if (typeof dataset.value === \"number\" && !isNaN(dataset.value)) {\n dataset.typed = true;\n } else {\n _addIssue(this, \"type\", dataset, config2);\n }\n return dataset;\n }\n };\n }\n // @__NO_SIDE_EFFECTS__\n function object(entries2, message2) {\n return {\n kind: \"schema\",\n type: \"object\",\n reference: object,\n expects: \"Object\",\n async: false,\n entries: entries2,\n message: message2,\n get \"~standard\"() {\n return /* @__PURE__ */ _getStandardProps(this);\n },\n \"~run\"(dataset, config2) {\n const input = dataset.value;\n if (input && typeof input === \"object\") {\n dataset.typed = true;\n dataset.value = {};\n for (const key in this.entries) {\n const valueSchema = this.entries[key];\n if (key in input || (valueSchema.type === \"exact_optional\" || valueSchema.type === \"optional\" || valueSchema.type === \"nullish\") && // @ts-expect-error\n valueSchema.default !== void 0) {\n const value2 = key in input ? (\n // @ts-expect-error\n input[key]\n ) : /* @__PURE__ */ getDefault(valueSchema);\n const valueDataset = valueSchema[\"~run\"]({ value: value2 }, config2);\n if (valueDataset.issues) {\n const pathItem = {\n type: \"object\",\n origin: \"value\",\n input,\n key,\n value: value2\n };\n for (const issue of valueDataset.issues) {\n if (issue.path) {\n issue.path.unshift(pathItem);\n } else {\n issue.path = [pathItem];\n }\n dataset.issues?.push(issue);\n }\n if (!dataset.issues) {\n dataset.issues = valueDataset.issues;\n }\n if (config2.abortEarly) {\n dataset.typed = false;\n break;\n }\n }\n if (!valueDataset.typed) {\n dataset.typed = false;\n }\n dataset.value[key] = valueDataset.value;\n } else if (valueSchema.fallback !== void 0) {\n dataset.value[key] = /* @__PURE__ */ getFallback(valueSchema);\n } else if (valueSchema.type !== \"exact_optional\" && valueSchema.type !== \"optional\" && valueSchema.type !== \"nullish\") {\n _addIssue(this, \"key\", dataset, config2, {\n input: void 0,\n expected: `\"${key}\"`,\n path: [\n {\n type: \"object\",\n origin: \"key\",\n input,\n key,\n // @ts-expect-error\n value: input[key]\n }\n ]\n });\n if (config2.abortEarly) {\n break;\n }\n }\n }\n } else {\n _addIssue(this, \"type\", dataset, config2);\n }\n return dataset;\n }\n };\n }\n // @__NO_SIDE_EFFECTS__\n function optional(wrapped, default_) {\n return {\n kind: \"schema\",\n type: \"optional\",\n reference: optional,\n expects: `(${wrapped.expects} | undefined)`,\n async: false,\n wrapped,\n default: default_,\n get \"~standard\"() {\n return /* @__PURE__ */ _getStandardProps(this);\n },\n \"~run\"(dataset, config2) {\n if (dataset.value === void 0) {\n if (this.default !== void 0) {\n dataset.value = /* @__PURE__ */ getDefault(this, dataset, config2);\n }\n if (dataset.value === void 0) {\n dataset.typed = true;\n return dataset;\n }\n }\n return this.wrapped[\"~run\"](dataset, config2);\n }\n };\n }\n // @__NO_SIDE_EFFECTS__\n function string(message2) {\n return {\n kind: \"schema\",\n type: \"string\",\n reference: string,\n expects: \"string\",\n async: false,\n message: message2,\n get \"~standard\"() {\n return /* @__PURE__ */ _getStandardProps(this);\n },\n \"~run\"(dataset, config2) {\n if (typeof dataset.value === \"string\") {\n dataset.typed = true;\n } else {\n _addIssue(this, \"type\", dataset, config2);\n }\n return dataset;\n }\n };\n }\n // @__NO_SIDE_EFFECTS__\n function _subIssues(datasets) {\n let issues;\n if (datasets) {\n for (const dataset of datasets) {\n if (issues) {\n issues.push(...dataset.issues);\n } else {\n issues = dataset.issues;\n }\n }\n }\n return issues;\n }\n // @__NO_SIDE_EFFECTS__\n function union(options, message2) {\n return {\n kind: \"schema\",\n type: \"union\",\n reference: union,\n expects: /* @__PURE__ */ _joinExpects(\n options.map((option) => option.expects),\n \"|\"\n ),\n async: false,\n options,\n message: message2,\n get \"~standard\"() {\n return /* @__PURE__ */ _getStandardProps(this);\n },\n \"~run\"(dataset, config2) {\n let validDataset;\n let typedDatasets;\n let untypedDatasets;\n for (const schema of this.options) {\n const optionDataset = schema[\"~run\"]({ value: dataset.value }, config2);\n if (optionDataset.typed) {\n if (optionDataset.issues) {\n if (typedDatasets) {\n typedDatasets.push(optionDataset);\n } else {\n typedDatasets = [optionDataset];\n }\n } else {\n validDataset = optionDataset;\n break;\n }\n } else {\n if (untypedDatasets) {\n untypedDatasets.push(optionDataset);\n } else {\n untypedDatasets = [optionDataset];\n }\n }\n }\n if (validDataset) {\n return validDataset;\n }\n if (typedDatasets) {\n if (typedDatasets.length === 1) {\n return typedDatasets[0];\n }\n _addIssue(this, \"type\", dataset, config2, {\n issues: /* @__PURE__ */ _subIssues(typedDatasets)\n });\n dataset.typed = true;\n } else if (untypedDatasets?.length === 1) {\n return untypedDatasets[0];\n } else {\n _addIssue(this, \"type\", dataset, config2, {\n issues: /* @__PURE__ */ _subIssues(untypedDatasets)\n });\n }\n return dataset;\n }\n };\n }\n // @__NO_SIDE_EFFECTS__\n function pipe(...pipe2) {\n return {\n ...pipe2[0],\n pipe: pipe2,\n get \"~standard\"() {\n return /* @__PURE__ */ _getStandardProps(this);\n },\n \"~run\"(dataset, config2) {\n for (const item of pipe2) {\n if (item.kind !== \"metadata\") {\n if (dataset.issues && (item.kind === \"schema\" || item.kind === \"transformation\")) {\n dataset.typed = false;\n break;\n }\n if (!dataset.issues || !config2.abortEarly && !config2.abortPipeEarly) {\n dataset = item[\"~run\"](dataset, config2);\n }\n }\n }\n return dataset;\n }\n };\n }\n // @__NO_SIDE_EFFECTS__\n function safeParse(schema, input, config2) {\n const dataset = schema[\"~run\"]({ value: input }, /* @__PURE__ */ getGlobalConfig(config2));\n return {\n typed: dataset.typed,\n success: !dataset.issues,\n output: dataset.value,\n issues: dataset.issues\n };\n }\n // @__NO_SIDE_EFFECTS__\n function safeParser(schema, config2) {\n const func = (input) => /* @__PURE__ */ safeParse(schema, input, config2);\n func.schema = schema;\n func.config = config2;\n return func;\n }\n // @__NO_SIDE_EFFECTS__\n function summarize(issues) {\n let summary = \"\";\n for (const issue of issues) {\n if (summary) {\n summary += \"\\n\";\n }\n summary += `\\xD7 ${issue.message}`;\n const dotPath = /* @__PURE__ */ getDotPath(issue);\n if (dotPath) {\n summary += `\n \\u2192 at ${dotPath}`;\n }\n }\n return summary;\n }\n\n // ../../../node_modules/.pnpm/@nktkas+hyperliquid@0.25.7_typescript@5.8.3/node_modules/@nktkas/hyperliquid/esm/src/api/_base.js\n var UnsignedDecimal = /* @__PURE__ */ (() => {\n return pipe(union([string(), number()]), transform(String), trim6(), regex(/^[0-9]+(\\.[0-9]+)?$/), transform((value) => formatDecimal(value)));\n })();\n var Integer = /* @__PURE__ */ (() => {\n return pipe(union([string(), number()]), transform(Number), safeInteger());\n })();\n var UnsignedInteger = /* @__PURE__ */ (() => {\n return pipe(union([string(), number()]), transform(Number), safeInteger(), minValue(0));\n })();\n var Hex = /* @__PURE__ */ (() => {\n return pipe(string(), regex(/^0[xX][0-9a-fA-F]+$/), transform((value) => value.toLowerCase()));\n })();\n var Address = /* @__PURE__ */ (() => {\n return pipe(Hex, length(42));\n })();\n var TokenId = /* @__PURE__ */ (() => {\n return pipe(string(), regex(/^[^:]+:0x[0-9a-fA-F]+$/), transform((value) => value));\n })();\n var Percent = /* @__PURE__ */ (() => {\n return pipe(string(), regex(/^[0-9]+(\\.[0-9]+)?%$/), transform((value) => value));\n })();\n function formatDecimal(numStr) {\n return numStr.trim().replace(/^(-?)0+(?=\\d)/, \"$1\").replace(/(\\.\\d*?)0+$/, \"$1\").replace(/\\.$/, \"\");\n }\n var SchemaError = class extends HyperliquidError {\n constructor(message) {\n super(message);\n this.name = \"SchemaError\";\n }\n };\n function parser(schema) {\n const safeParser2 = safeParser(schema);\n const parser2 = (input) => {\n const result = safeParser2(input);\n if (result.issues)\n throw new SchemaError(\"\\n\" + summarize(result.issues));\n return result.output;\n };\n parser2.schema = schema;\n parser2.config = void 0;\n return parser2;\n }\n\n // ../../../node_modules/.pnpm/@nktkas+hyperliquid@0.25.7_typescript@5.8.3/node_modules/@nktkas/hyperliquid/esm/src/transport/base.js\n init_dirname();\n init_buffer2();\n init_process2();\n var TransportError = class extends HyperliquidError {\n constructor(message, options) {\n super(message, options);\n this.name = \"TransportError\";\n }\n };\n\n // ../../../node_modules/.pnpm/@nktkas+hyperliquid@0.25.7_typescript@5.8.3/node_modules/@nktkas/hyperliquid/esm/src/transport/http/mod.js\n init_dirname();\n init_buffer2();\n init_process2();\n\n // ../../../node_modules/.pnpm/@nktkas+hyperliquid@0.25.7_typescript@5.8.3/node_modules/@nktkas/hyperliquid/esm/src/transport/_polyfills.js\n init_dirname();\n init_buffer2();\n init_process2();\n var AbortSignal_ = /* @__PURE__ */ (() => {\n return {\n any: AbortSignal.any ? (signals) => AbortSignal.any(signals) : (signals) => {\n const controller = new AbortController();\n for (const signal of signals) {\n if (signal.aborted) {\n controller.abort(signal.reason);\n return controller.signal;\n }\n signal.addEventListener(\"abort\", () => {\n controller.abort(signal.reason);\n }, { once: true, signal: controller.signal });\n }\n return controller.signal;\n },\n timeout: AbortSignal.timeout ? (ms) => AbortSignal.timeout(ms) : (ms) => {\n const controller = new AbortController();\n setTimeout(() => controller.abort(new Error(\"Signal timed out\")), ms);\n return controller.signal;\n }\n };\n })();\n\n // ../../../node_modules/.pnpm/@nktkas+hyperliquid@0.25.7_typescript@5.8.3/node_modules/@nktkas/hyperliquid/esm/src/transport/http/mod.js\n var HttpRequestError2 = class extends TransportError {\n response;\n body;\n constructor(args, options) {\n const { response, body } = args ?? {};\n let message;\n if (response) {\n message = `${response.status} ${response.statusText}`.trim();\n if (body)\n message += ` - ${body}`;\n } else {\n message = `Unknown error while making an HTTP request: ${options?.cause}`;\n }\n super(message, options);\n this.name = \"HttpRequestError\";\n this.response = response;\n this.body = body;\n }\n };\n var HttpTransport = class {\n isTestnet;\n timeout;\n server;\n fetchOptions;\n onRequest;\n onResponse;\n onError;\n /**\n * Creates a new HTTP transport instance.\n * @param options - Configuration options for the HTTP transport layer.\n */\n constructor(options) {\n this.isTestnet = options?.isTestnet ?? false;\n this.timeout = options?.timeout === void 0 ? 1e4 : options.timeout;\n this.server = {\n mainnet: {\n api: options?.server?.mainnet?.api ?? \"https://api.hyperliquid.xyz\",\n rpc: options?.server?.mainnet?.rpc ?? \"https://rpc.hyperliquid.xyz\"\n },\n testnet: {\n api: options?.server?.testnet?.api ?? \"https://api.hyperliquid-testnet.xyz\",\n rpc: options?.server?.testnet?.rpc ?? \"https://rpc.hyperliquid-testnet.xyz\"\n }\n };\n this.fetchOptions = options?.fetchOptions ?? {};\n this.onRequest = options?.onRequest;\n this.onResponse = options?.onResponse;\n this.onError = options?.onError;\n }\n /**\n * Sends a request to the Hyperliquid API via fetch.\n * @param endpoint - The API endpoint to send the request to.\n * @param payload - The payload to send with the request.\n * @param signal - An [`AbortSignal`](https://developer.mozilla.org/en-US/docs/Web/API/AbortSignal) can be used to cancel the request by calling [`abort()`](https://developer.mozilla.org/en-US/docs/Web/API/AbortController/abort) on the corresponding [`AbortController`](https://developer.mozilla.org/en-US/docs/Web/API/AbortController).\n * @returns A promise that resolves with parsed JSON response body.\n *\n * @throws {HttpRequestError} Thrown when the HTTP request fails.\n */\n async request(endpoint, payload, signal) {\n try {\n const url = new URL(endpoint, this.server[this.isTestnet ? \"testnet\" : \"mainnet\"][endpoint === \"explorer\" ? \"rpc\" : \"api\"]);\n const init = mergeRequestInit({\n body: JSON.stringify(payload),\n headers: {\n \"Accept-Encoding\": \"gzip, deflate, br, zstd\",\n \"Content-Type\": \"application/json\"\n },\n keepalive: true,\n method: \"POST\",\n signal: this.timeout ? AbortSignal_.timeout(this.timeout) : void 0\n }, this.fetchOptions, { signal });\n let request = new Request(url, init);\n if (this.onRequest) {\n const customRequest = await this.onRequest(request);\n if (customRequest instanceof Request)\n request = customRequest;\n }\n let response = await fetch(request).catch(async (error) => {\n if (this.onError) {\n const customError = await this.onError(error);\n if (customError instanceof Error)\n error = customError;\n }\n throw error;\n });\n if (this.onResponse) {\n const customResponse = await this.onResponse(response);\n if (customResponse instanceof Response)\n response = customResponse;\n }\n if (!response.ok || !response.headers.get(\"Content-Type\")?.includes(\"application/json\")) {\n const body2 = await response.text().catch(() => void 0);\n throw new HttpRequestError2({ response, body: body2 });\n }\n const body = await response.json();\n if (body?.type === \"error\") {\n throw new HttpRequestError2({ response, body: body?.message });\n }\n return body;\n } catch (error) {\n if (error instanceof TransportError)\n throw error;\n throw new HttpRequestError2(void 0, { cause: error });\n }\n }\n };\n function mergeHeadersInit(...inits) {\n if (inits.length === 0 || inits.length === 1) {\n return new Headers(inits[0]);\n }\n const merged = new Headers();\n for (const headers of inits) {\n const iterator = Symbol.iterator in headers ? headers : Object.entries(headers);\n for (const [key, value] of iterator) {\n merged.set(key, value);\n }\n }\n return merged;\n }\n function mergeRequestInit(...inits) {\n const merged = inits.reduce((acc, init) => ({ ...acc, ...init }), {});\n const headersList = inits.map((init) => init.headers).filter((headers) => typeof headers === \"object\");\n if (headersList.length > 0) {\n merged.headers = mergeHeadersInit(...headersList);\n }\n const signals = inits.map((init) => init.signal).filter((signal) => signal instanceof AbortSignal);\n if (signals.length > 0) {\n merged.signal = signals.length > 1 ? AbortSignal_.any(signals) : signals[0];\n }\n return merged;\n }\n\n // ../../../node_modules/.pnpm/@nktkas+hyperliquid@0.25.7_typescript@5.8.3/node_modules/@nktkas/hyperliquid/esm/src/transport/websocket/mod.js\n init_dirname();\n init_buffer2();\n init_process2();\n\n // ../../../node_modules/.pnpm/@nktkas+hyperliquid@0.25.7_typescript@5.8.3/node_modules/@nktkas/hyperliquid/esm/src/transport/websocket/_reconnecting_websocket.js\n init_dirname();\n init_buffer2();\n init_process2();\n\n // ../../../node_modules/.pnpm/@nktkas+hyperliquid@0.25.7_typescript@5.8.3/node_modules/@nktkas/hyperliquid/esm/src/transport/websocket/_hyperliquid_event_target.js\n init_dirname();\n init_buffer2();\n init_process2();\n\n // ../../../node_modules/.pnpm/typescript-event-target@1.1.1/node_modules/typescript-event-target/dist/index.mjs\n init_dirname();\n init_buffer2();\n init_process2();\n\n // ../../../node_modules/.pnpm/@nktkas+hyperliquid@0.25.7_typescript@5.8.3/node_modules/@nktkas/hyperliquid/esm/src/transport/websocket/_websocket_async_request.js\n init_dirname();\n init_buffer2();\n init_process2();\n\n // ../../../node_modules/.pnpm/@nktkas+hyperliquid@0.25.7_typescript@5.8.3/node_modules/@nktkas/hyperliquid/esm/src/api/exchange/~client.js\n init_dirname();\n init_buffer2();\n init_process2();\n\n // ../../../node_modules/.pnpm/@nktkas+hyperliquid@0.25.7_typescript@5.8.3/node_modules/@nktkas/hyperliquid/esm/src/utils/_minimalEIP712Signer.js\n init_dirname();\n init_buffer2();\n init_process2();\n\n // ../../../node_modules/.pnpm/@noble+hashes@2.0.1/node_modules/@noble/hashes/sha3.js\n init_dirname();\n init_buffer2();\n init_process2();\n\n // ../../../node_modules/.pnpm/@noble+hashes@2.0.1/node_modules/@noble/hashes/_u64.js\n init_dirname();\n init_buffer2();\n init_process2();\n var U32_MASK642 = /* @__PURE__ */ BigInt(2 ** 32 - 1);\n var _32n2 = /* @__PURE__ */ BigInt(32);\n function fromBig2(n2, le = false) {\n if (le)\n return { h: Number(n2 & U32_MASK642), l: Number(n2 >> _32n2 & U32_MASK642) };\n return { h: Number(n2 >> _32n2 & U32_MASK642) | 0, l: Number(n2 & U32_MASK642) | 0 };\n }\n function split3(lst, le = false) {\n const len = lst.length;\n let Ah = new Uint32Array(len);\n let Al = new Uint32Array(len);\n for (let i3 = 0; i3 < len; i3++) {\n const { h: h4, l: l6 } = fromBig2(lst[i3], le);\n [Ah[i3], Al[i3]] = [h4, l6];\n }\n return [Ah, Al];\n }\n var rotlSH2 = (h4, l6, s4) => h4 << s4 | l6 >>> 32 - s4;\n var rotlSL2 = (h4, l6, s4) => l6 << s4 | h4 >>> 32 - s4;\n var rotlBH2 = (h4, l6, s4) => l6 << s4 - 32 | h4 >>> 64 - s4;\n var rotlBL2 = (h4, l6, s4) => h4 << s4 - 32 | l6 >>> 64 - s4;\n\n // ../../../node_modules/.pnpm/@noble+hashes@2.0.1/node_modules/@noble/hashes/utils.js\n init_dirname();\n init_buffer2();\n init_process2();\n function isBytes5(a3) {\n return a3 instanceof Uint8Array || ArrayBuffer.isView(a3) && a3.constructor.name === \"Uint8Array\";\n }\n function anumber3(n2, title2 = \"\") {\n if (!Number.isSafeInteger(n2) || n2 < 0) {\n const prefix = title2 && `\"${title2}\" `;\n throw new Error(`${prefix}expected integer >= 0, got ${n2}`);\n }\n }\n function abytes3(value, length2, title2 = \"\") {\n const bytes = isBytes5(value);\n const len = value?.length;\n const needsLen = length2 !== void 0;\n if (!bytes || needsLen && len !== length2) {\n const prefix = title2 && `\"${title2}\" `;\n const ofLen = needsLen ? ` of length ${length2}` : \"\";\n const got = bytes ? `length=${len}` : `type=${typeof value}`;\n throw new Error(prefix + \"expected Uint8Array\" + ofLen + \", got \" + got);\n }\n return value;\n }\n function aexists2(instance, checkFinished = true) {\n if (instance.destroyed)\n throw new Error(\"Hash instance has been destroyed\");\n if (checkFinished && instance.finished)\n throw new Error(\"Hash#digest() has already been called\");\n }\n function aoutput2(out, instance) {\n abytes3(out, void 0, \"digestInto() output\");\n const min = instance.outputLen;\n if (out.length < min) {\n throw new Error('\"digestInto() output\" expected to be of length >=' + min);\n }\n }\n function u322(arr) {\n return new Uint32Array(arr.buffer, arr.byteOffset, Math.floor(arr.byteLength / 4));\n }\n function clean2(...arrays) {\n for (let i3 = 0; i3 < arrays.length; i3++) {\n arrays[i3].fill(0);\n }\n }\n var isLE2 = /* @__PURE__ */ (() => new Uint8Array(new Uint32Array([287454020]).buffer)[0] === 68)();\n function byteSwap2(word) {\n return word << 24 & 4278190080 | word << 8 & 16711680 | word >>> 8 & 65280 | word >>> 24 & 255;\n }\n function byteSwap322(arr) {\n for (let i3 = 0; i3 < arr.length; i3++) {\n arr[i3] = byteSwap2(arr[i3]);\n }\n return arr;\n }\n var swap32IfBE2 = isLE2 ? (u2) => u2 : byteSwap322;\n var hasHexBuiltin3 = /* @__PURE__ */ (() => (\n // @ts-ignore\n typeof Uint8Array.from([]).toHex === \"function\" && typeof Uint8Array.fromHex === \"function\"\n ))();\n var hexes6 = /* @__PURE__ */ Array.from({ length: 256 }, (_2, i3) => i3.toString(16).padStart(2, \"0\"));\n function bytesToHex5(bytes) {\n abytes3(bytes);\n if (hasHexBuiltin3)\n return bytes.toHex();\n let hex = \"\";\n for (let i3 = 0; i3 < bytes.length; i3++) {\n hex += hexes6[bytes[i3]];\n }\n return hex;\n }\n var asciis3 = { _0: 48, _9: 57, A: 65, F: 70, a: 97, f: 102 };\n function asciiToBase163(ch) {\n if (ch >= asciis3._0 && ch <= asciis3._9)\n return ch - asciis3._0;\n if (ch >= asciis3.A && ch <= asciis3.F)\n return ch - (asciis3.A - 10);\n if (ch >= asciis3.a && ch <= asciis3.f)\n return ch - (asciis3.a - 10);\n return;\n }\n function hexToBytes5(hex) {\n if (typeof hex !== \"string\")\n throw new Error(\"hex string expected, got \" + typeof hex);\n if (hasHexBuiltin3)\n return Uint8Array.fromHex(hex);\n const hl = hex.length;\n const al = hl / 2;\n if (hl % 2)\n throw new Error(\"hex string expected, got unpadded hex of length \" + hl);\n const array2 = new Uint8Array(al);\n for (let ai = 0, hi = 0; ai < al; ai++, hi += 2) {\n const n1 = asciiToBase163(hex.charCodeAt(hi));\n const n2 = asciiToBase163(hex.charCodeAt(hi + 1));\n if (n1 === void 0 || n2 === void 0) {\n const char = hex[hi] + hex[hi + 1];\n throw new Error('hex string expected, got non-hex character \"' + char + '\" at index ' + hi);\n }\n array2[ai] = n1 * 16 + n2;\n }\n return array2;\n }\n function concatBytes4(...arrays) {\n let sum = 0;\n for (let i3 = 0; i3 < arrays.length; i3++) {\n const a3 = arrays[i3];\n abytes3(a3);\n sum += a3.length;\n }\n const res = new Uint8Array(sum);\n for (let i3 = 0, pad6 = 0; i3 < arrays.length; i3++) {\n const a3 = arrays[i3];\n res.set(a3, pad6);\n pad6 += a3.length;\n }\n return res;\n }\n function createHasher3(hashCons, info = {}) {\n const hashC = (msg, opts) => hashCons(opts).update(msg).digest();\n const tmp = hashCons(void 0);\n hashC.outputLen = tmp.outputLen;\n hashC.blockLen = tmp.blockLen;\n hashC.create = (opts) => hashCons(opts);\n Object.assign(hashC, info);\n return Object.freeze(hashC);\n }\n\n // ../../../node_modules/.pnpm/@noble+hashes@2.0.1/node_modules/@noble/hashes/sha3.js\n var _0n11 = BigInt(0);\n var _1n11 = BigInt(1);\n var _2n8 = BigInt(2);\n var _7n3 = BigInt(7);\n var _256n2 = BigInt(256);\n var _0x71n2 = BigInt(113);\n var SHA3_PI2 = [];\n var SHA3_ROTL2 = [];\n var _SHA3_IOTA2 = [];\n for (let round = 0, R3 = _1n11, x4 = 1, y6 = 0; round < 24; round++) {\n [x4, y6] = [y6, (2 * x4 + 3 * y6) % 5];\n SHA3_PI2.push(2 * (5 * y6 + x4));\n SHA3_ROTL2.push((round + 1) * (round + 2) / 2 % 64);\n let t3 = _0n11;\n for (let j2 = 0; j2 < 7; j2++) {\n R3 = (R3 << _1n11 ^ (R3 >> _7n3) * _0x71n2) % _256n2;\n if (R3 & _2n8)\n t3 ^= _1n11 << (_1n11 << BigInt(j2)) - _1n11;\n }\n _SHA3_IOTA2.push(t3);\n }\n var IOTAS2 = split3(_SHA3_IOTA2, true);\n var SHA3_IOTA_H2 = IOTAS2[0];\n var SHA3_IOTA_L2 = IOTAS2[1];\n var rotlH2 = (h4, l6, s4) => s4 > 32 ? rotlBH2(h4, l6, s4) : rotlSH2(h4, l6, s4);\n var rotlL2 = (h4, l6, s4) => s4 > 32 ? rotlBL2(h4, l6, s4) : rotlSL2(h4, l6, s4);\n function keccakP2(s4, rounds = 24) {\n const B2 = new Uint32Array(5 * 2);\n for (let round = 24 - rounds; round < 24; round++) {\n for (let x4 = 0; x4 < 10; x4++)\n B2[x4] = s4[x4] ^ s4[x4 + 10] ^ s4[x4 + 20] ^ s4[x4 + 30] ^ s4[x4 + 40];\n for (let x4 = 0; x4 < 10; x4 += 2) {\n const idx1 = (x4 + 8) % 10;\n const idx0 = (x4 + 2) % 10;\n const B0 = B2[idx0];\n const B1 = B2[idx0 + 1];\n const Th = rotlH2(B0, B1, 1) ^ B2[idx1];\n const Tl = rotlL2(B0, B1, 1) ^ B2[idx1 + 1];\n for (let y6 = 0; y6 < 50; y6 += 10) {\n s4[x4 + y6] ^= Th;\n s4[x4 + y6 + 1] ^= Tl;\n }\n }\n let curH = s4[2];\n let curL = s4[3];\n for (let t3 = 0; t3 < 24; t3++) {\n const shift = SHA3_ROTL2[t3];\n const Th = rotlH2(curH, curL, shift);\n const Tl = rotlL2(curH, curL, shift);\n const PI = SHA3_PI2[t3];\n curH = s4[PI];\n curL = s4[PI + 1];\n s4[PI] = Th;\n s4[PI + 1] = Tl;\n }\n for (let y6 = 0; y6 < 50; y6 += 10) {\n for (let x4 = 0; x4 < 10; x4++)\n B2[x4] = s4[y6 + x4];\n for (let x4 = 0; x4 < 10; x4++)\n s4[y6 + x4] ^= ~B2[(x4 + 2) % 10] & B2[(x4 + 4) % 10];\n }\n s4[0] ^= SHA3_IOTA_H2[round];\n s4[1] ^= SHA3_IOTA_L2[round];\n }\n clean2(B2);\n }\n var Keccak2 = class _Keccak {\n state;\n pos = 0;\n posOut = 0;\n finished = false;\n state32;\n destroyed = false;\n blockLen;\n suffix;\n outputLen;\n enableXOF = false;\n rounds;\n // NOTE: we accept arguments in bytes instead of bits here.\n constructor(blockLen, suffix, outputLen, enableXOF = false, rounds = 24) {\n this.blockLen = blockLen;\n this.suffix = suffix;\n this.outputLen = outputLen;\n this.enableXOF = enableXOF;\n this.rounds = rounds;\n anumber3(outputLen, \"outputLen\");\n if (!(0 < blockLen && blockLen < 200))\n throw new Error(\"only keccak-f1600 function is supported\");\n this.state = new Uint8Array(200);\n this.state32 = u322(this.state);\n }\n clone() {\n return this._cloneInto();\n }\n keccak() {\n swap32IfBE2(this.state32);\n keccakP2(this.state32, this.rounds);\n swap32IfBE2(this.state32);\n this.posOut = 0;\n this.pos = 0;\n }\n update(data) {\n aexists2(this);\n abytes3(data);\n const { blockLen, state } = this;\n const len = data.length;\n for (let pos = 0; pos < len; ) {\n const take = Math.min(blockLen - this.pos, len - pos);\n for (let i3 = 0; i3 < take; i3++)\n state[this.pos++] ^= data[pos++];\n if (this.pos === blockLen)\n this.keccak();\n }\n return this;\n }\n finish() {\n if (this.finished)\n return;\n this.finished = true;\n const { state, suffix, pos, blockLen } = this;\n state[pos] ^= suffix;\n if ((suffix & 128) !== 0 && pos === blockLen - 1)\n this.keccak();\n state[blockLen - 1] ^= 128;\n this.keccak();\n }\n writeInto(out) {\n aexists2(this, false);\n abytes3(out);\n this.finish();\n const bufferOut = this.state;\n const { blockLen } = this;\n for (let pos = 0, len = out.length; pos < len; ) {\n if (this.posOut >= blockLen)\n this.keccak();\n const take = Math.min(blockLen - this.posOut, len - pos);\n out.set(bufferOut.subarray(this.posOut, this.posOut + take), pos);\n this.posOut += take;\n pos += take;\n }\n return out;\n }\n xofInto(out) {\n if (!this.enableXOF)\n throw new Error(\"XOF is not possible for this instance\");\n return this.writeInto(out);\n }\n xof(bytes) {\n anumber3(bytes);\n return this.xofInto(new Uint8Array(bytes));\n }\n digestInto(out) {\n aoutput2(out, this);\n if (this.finished)\n throw new Error(\"digest() was already called\");\n this.writeInto(out);\n this.destroy();\n return out;\n }\n digest() {\n return this.digestInto(new Uint8Array(this.outputLen));\n }\n destroy() {\n this.destroyed = true;\n clean2(this.state);\n }\n _cloneInto(to) {\n const { blockLen, suffix, outputLen, rounds, enableXOF } = this;\n to ||= new _Keccak(blockLen, suffix, outputLen, enableXOF, rounds);\n to.state32.set(this.state32);\n to.pos = this.pos;\n to.posOut = this.posOut;\n to.finished = this.finished;\n to.rounds = rounds;\n to.suffix = suffix;\n to.outputLen = outputLen;\n to.enableXOF = enableXOF;\n to.destroyed = this.destroyed;\n return to;\n }\n };\n var genKeccak = (suffix, blockLen, outputLen, info = {}) => createHasher3(() => new Keccak2(blockLen, suffix, outputLen), info);\n var keccak_2562 = /* @__PURE__ */ genKeccak(1, 136, 32);\n\n // ../../../node_modules/.pnpm/@nktkas+hyperliquid@0.25.7_typescript@5.8.3/node_modules/@nktkas/hyperliquid/esm/src/api/exchange/agentEnableDexAbstraction.js\n init_dirname();\n init_buffer2();\n init_process2();\n\n // ../../../node_modules/.pnpm/@nktkas+hyperliquid@0.25.7_typescript@5.8.3/node_modules/@nktkas/hyperliquid/esm/src/api/exchange/_base/mod.js\n init_dirname();\n init_buffer2();\n init_process2();\n\n // ../../../node_modules/.pnpm/@nktkas+hyperliquid@0.25.7_typescript@5.8.3/node_modules/@nktkas/hyperliquid/esm/src/api/exchange/_base/_errors.js\n init_dirname();\n init_buffer2();\n init_process2();\n\n // ../../../node_modules/.pnpm/@nktkas+hyperliquid@0.25.7_typescript@5.8.3/node_modules/@nktkas/hyperliquid/esm/src/api/exchange/_base/_execute.js\n init_dirname();\n init_buffer2();\n init_process2();\n\n // ../../../node_modules/.pnpm/@nktkas+hyperliquid@0.25.7_typescript@5.8.3/node_modules/@nktkas/hyperliquid/esm/src/signing/mod.js\n init_dirname();\n init_buffer2();\n init_process2();\n\n // ../../../node_modules/.pnpm/@msgpack+msgpack@3.1.2/node_modules/@msgpack/msgpack/dist.esm/index.mjs\n init_dirname();\n init_buffer2();\n init_process2();\n\n // ../../../node_modules/.pnpm/@msgpack+msgpack@3.1.2/node_modules/@msgpack/msgpack/dist.esm/encode.mjs\n init_dirname();\n init_buffer2();\n init_process2();\n\n // ../../../node_modules/.pnpm/@msgpack+msgpack@3.1.2/node_modules/@msgpack/msgpack/dist.esm/Encoder.mjs\n init_dirname();\n init_buffer2();\n init_process2();\n\n // ../../../node_modules/.pnpm/@msgpack+msgpack@3.1.2/node_modules/@msgpack/msgpack/dist.esm/utils/utf8.mjs\n init_dirname();\n init_buffer2();\n init_process2();\n function utf8Count(str) {\n const strLength = str.length;\n let byteLength = 0;\n let pos = 0;\n while (pos < strLength) {\n let value = str.charCodeAt(pos++);\n if ((value & 4294967168) === 0) {\n byteLength++;\n continue;\n } else if ((value & 4294965248) === 0) {\n byteLength += 2;\n } else {\n if (value >= 55296 && value <= 56319) {\n if (pos < strLength) {\n const extra = str.charCodeAt(pos);\n if ((extra & 64512) === 56320) {\n ++pos;\n value = ((value & 1023) << 10) + (extra & 1023) + 65536;\n }\n }\n }\n if ((value & 4294901760) === 0) {\n byteLength += 3;\n } else {\n byteLength += 4;\n }\n }\n }\n return byteLength;\n }\n function utf8EncodeJs(str, output, outputOffset) {\n const strLength = str.length;\n let offset = outputOffset;\n let pos = 0;\n while (pos < strLength) {\n let value = str.charCodeAt(pos++);\n if ((value & 4294967168) === 0) {\n output[offset++] = value;\n continue;\n } else if ((value & 4294965248) === 0) {\n output[offset++] = value >> 6 & 31 | 192;\n } else {\n if (value >= 55296 && value <= 56319) {\n if (pos < strLength) {\n const extra = str.charCodeAt(pos);\n if ((extra & 64512) === 56320) {\n ++pos;\n value = ((value & 1023) << 10) + (extra & 1023) + 65536;\n }\n }\n }\n if ((value & 4294901760) === 0) {\n output[offset++] = value >> 12 & 15 | 224;\n output[offset++] = value >> 6 & 63 | 128;\n } else {\n output[offset++] = value >> 18 & 7 | 240;\n output[offset++] = value >> 12 & 63 | 128;\n output[offset++] = value >> 6 & 63 | 128;\n }\n }\n output[offset++] = value & 63 | 128;\n }\n }\n var sharedTextEncoder = new TextEncoder();\n var TEXT_ENCODER_THRESHOLD = 50;\n function utf8EncodeTE(str, output, outputOffset) {\n sharedTextEncoder.encodeInto(str, output.subarray(outputOffset));\n }\n function utf8Encode(str, output, outputOffset) {\n if (str.length > TEXT_ENCODER_THRESHOLD) {\n utf8EncodeTE(str, output, outputOffset);\n } else {\n utf8EncodeJs(str, output, outputOffset);\n }\n }\n var sharedTextDecoder = new TextDecoder();\n\n // ../../../node_modules/.pnpm/@msgpack+msgpack@3.1.2/node_modules/@msgpack/msgpack/dist.esm/ExtensionCodec.mjs\n init_dirname();\n init_buffer2();\n init_process2();\n\n // ../../../node_modules/.pnpm/@msgpack+msgpack@3.1.2/node_modules/@msgpack/msgpack/dist.esm/ExtData.mjs\n init_dirname();\n init_buffer2();\n init_process2();\n var ExtData = class {\n constructor(type, data) {\n this.type = type;\n this.data = data;\n }\n };\n\n // ../../../node_modules/.pnpm/@msgpack+msgpack@3.1.2/node_modules/@msgpack/msgpack/dist.esm/timestamp.mjs\n init_dirname();\n init_buffer2();\n init_process2();\n\n // ../../../node_modules/.pnpm/@msgpack+msgpack@3.1.2/node_modules/@msgpack/msgpack/dist.esm/DecodeError.mjs\n init_dirname();\n init_buffer2();\n init_process2();\n var DecodeError2 = class _DecodeError extends Error {\n constructor(message) {\n super(message);\n const proto = Object.create(_DecodeError.prototype);\n Object.setPrototypeOf(this, proto);\n Object.defineProperty(this, \"name\", {\n configurable: true,\n enumerable: false,\n value: _DecodeError.name\n });\n }\n };\n\n // ../../../node_modules/.pnpm/@msgpack+msgpack@3.1.2/node_modules/@msgpack/msgpack/dist.esm/utils/int.mjs\n init_dirname();\n init_buffer2();\n init_process2();\n function setUint64(view, offset, value) {\n const high = value / 4294967296;\n const low = value;\n view.setUint32(offset, high);\n view.setUint32(offset + 4, low);\n }\n function setInt64(view, offset, value) {\n const high = Math.floor(value / 4294967296);\n const low = value;\n view.setUint32(offset, high);\n view.setUint32(offset + 4, low);\n }\n function getInt64(view, offset) {\n const high = view.getInt32(offset);\n const low = view.getUint32(offset + 4);\n return high * 4294967296 + low;\n }\n\n // ../../../node_modules/.pnpm/@msgpack+msgpack@3.1.2/node_modules/@msgpack/msgpack/dist.esm/timestamp.mjs\n var EXT_TIMESTAMP = -1;\n var TIMESTAMP32_MAX_SEC = 4294967296 - 1;\n var TIMESTAMP64_MAX_SEC = 17179869184 - 1;\n function encodeTimeSpecToTimestamp({ sec, nsec }) {\n if (sec >= 0 && nsec >= 0 && sec <= TIMESTAMP64_MAX_SEC) {\n if (nsec === 0 && sec <= TIMESTAMP32_MAX_SEC) {\n const rv = new Uint8Array(4);\n const view = new DataView(rv.buffer);\n view.setUint32(0, sec);\n return rv;\n } else {\n const secHigh = sec / 4294967296;\n const secLow = sec & 4294967295;\n const rv = new Uint8Array(8);\n const view = new DataView(rv.buffer);\n view.setUint32(0, nsec << 2 | secHigh & 3);\n view.setUint32(4, secLow);\n return rv;\n }\n } else {\n const rv = new Uint8Array(12);\n const view = new DataView(rv.buffer);\n view.setUint32(0, nsec);\n setInt64(view, 4, sec);\n return rv;\n }\n }\n function encodeDateToTimeSpec(date) {\n const msec = date.getTime();\n const sec = Math.floor(msec / 1e3);\n const nsec = (msec - sec * 1e3) * 1e6;\n const nsecInSec = Math.floor(nsec / 1e9);\n return {\n sec: sec + nsecInSec,\n nsec: nsec - nsecInSec * 1e9\n };\n }\n function encodeTimestampExtension(object2) {\n if (object2 instanceof Date) {\n const timeSpec = encodeDateToTimeSpec(object2);\n return encodeTimeSpecToTimestamp(timeSpec);\n } else {\n return null;\n }\n }\n function decodeTimestampToTimeSpec(data) {\n const view = new DataView(data.buffer, data.byteOffset, data.byteLength);\n switch (data.byteLength) {\n case 4: {\n const sec = view.getUint32(0);\n const nsec = 0;\n return { sec, nsec };\n }\n case 8: {\n const nsec30AndSecHigh2 = view.getUint32(0);\n const secLow32 = view.getUint32(4);\n const sec = (nsec30AndSecHigh2 & 3) * 4294967296 + secLow32;\n const nsec = nsec30AndSecHigh2 >>> 2;\n return { sec, nsec };\n }\n case 12: {\n const sec = getInt64(view, 4);\n const nsec = view.getUint32(0);\n return { sec, nsec };\n }\n default:\n throw new DecodeError2(`Unrecognized data size for timestamp (expected 4, 8, or 12): ${data.length}`);\n }\n }\n function decodeTimestampExtension(data) {\n const timeSpec = decodeTimestampToTimeSpec(data);\n return new Date(timeSpec.sec * 1e3 + timeSpec.nsec / 1e6);\n }\n var timestampExtension = {\n type: EXT_TIMESTAMP,\n encode: encodeTimestampExtension,\n decode: decodeTimestampExtension\n };\n\n // ../../../node_modules/.pnpm/@msgpack+msgpack@3.1.2/node_modules/@msgpack/msgpack/dist.esm/ExtensionCodec.mjs\n var ExtensionCodec = class {\n constructor() {\n this.builtInEncoders = [];\n this.builtInDecoders = [];\n this.encoders = [];\n this.decoders = [];\n this.register(timestampExtension);\n }\n register({ type, encode: encode6, decode: decode2 }) {\n if (type >= 0) {\n this.encoders[type] = encode6;\n this.decoders[type] = decode2;\n } else {\n const index2 = -1 - type;\n this.builtInEncoders[index2] = encode6;\n this.builtInDecoders[index2] = decode2;\n }\n }\n tryToEncode(object2, context2) {\n for (let i3 = 0; i3 < this.builtInEncoders.length; i3++) {\n const encodeExt = this.builtInEncoders[i3];\n if (encodeExt != null) {\n const data = encodeExt(object2, context2);\n if (data != null) {\n const type = -1 - i3;\n return new ExtData(type, data);\n }\n }\n }\n for (let i3 = 0; i3 < this.encoders.length; i3++) {\n const encodeExt = this.encoders[i3];\n if (encodeExt != null) {\n const data = encodeExt(object2, context2);\n if (data != null) {\n const type = i3;\n return new ExtData(type, data);\n }\n }\n }\n if (object2 instanceof ExtData) {\n return object2;\n }\n return null;\n }\n decode(data, type, context2) {\n const decodeExt = type < 0 ? this.builtInDecoders[-1 - type] : this.decoders[type];\n if (decodeExt) {\n return decodeExt(data, type, context2);\n } else {\n return new ExtData(type, data);\n }\n }\n };\n ExtensionCodec.defaultCodec = new ExtensionCodec();\n\n // ../../../node_modules/.pnpm/@msgpack+msgpack@3.1.2/node_modules/@msgpack/msgpack/dist.esm/utils/typedArrays.mjs\n init_dirname();\n init_buffer2();\n init_process2();\n function isArrayBufferLike(buffer2) {\n return buffer2 instanceof ArrayBuffer || typeof SharedArrayBuffer !== \"undefined\" && buffer2 instanceof SharedArrayBuffer;\n }\n function ensureUint8Array(buffer2) {\n if (buffer2 instanceof Uint8Array) {\n return buffer2;\n } else if (ArrayBuffer.isView(buffer2)) {\n return new Uint8Array(buffer2.buffer, buffer2.byteOffset, buffer2.byteLength);\n } else if (isArrayBufferLike(buffer2)) {\n return new Uint8Array(buffer2);\n } else {\n return Uint8Array.from(buffer2);\n }\n }\n\n // ../../../node_modules/.pnpm/@msgpack+msgpack@3.1.2/node_modules/@msgpack/msgpack/dist.esm/Encoder.mjs\n var DEFAULT_MAX_DEPTH = 100;\n var DEFAULT_INITIAL_BUFFER_SIZE = 2048;\n var Encoder = class _Encoder {\n constructor(options) {\n this.entered = false;\n this.extensionCodec = options?.extensionCodec ?? ExtensionCodec.defaultCodec;\n this.context = options?.context;\n this.useBigInt64 = options?.useBigInt64 ?? false;\n this.maxDepth = options?.maxDepth ?? DEFAULT_MAX_DEPTH;\n this.initialBufferSize = options?.initialBufferSize ?? DEFAULT_INITIAL_BUFFER_SIZE;\n this.sortKeys = options?.sortKeys ?? false;\n this.forceFloat32 = options?.forceFloat32 ?? false;\n this.ignoreUndefined = options?.ignoreUndefined ?? false;\n this.forceIntegerToFloat = options?.forceIntegerToFloat ?? false;\n this.pos = 0;\n this.view = new DataView(new ArrayBuffer(this.initialBufferSize));\n this.bytes = new Uint8Array(this.view.buffer);\n }\n clone() {\n return new _Encoder({\n extensionCodec: this.extensionCodec,\n context: this.context,\n useBigInt64: this.useBigInt64,\n maxDepth: this.maxDepth,\n initialBufferSize: this.initialBufferSize,\n sortKeys: this.sortKeys,\n forceFloat32: this.forceFloat32,\n ignoreUndefined: this.ignoreUndefined,\n forceIntegerToFloat: this.forceIntegerToFloat\n });\n }\n reinitializeState() {\n this.pos = 0;\n }\n /**\n * This is almost equivalent to {@link Encoder#encode}, but it returns an reference of the encoder's internal buffer and thus much faster than {@link Encoder#encode}.\n *\n * @returns Encodes the object and returns a shared reference the encoder's internal buffer.\n */\n encodeSharedRef(object2) {\n if (this.entered) {\n const instance = this.clone();\n return instance.encodeSharedRef(object2);\n }\n try {\n this.entered = true;\n this.reinitializeState();\n this.doEncode(object2, 1);\n return this.bytes.subarray(0, this.pos);\n } finally {\n this.entered = false;\n }\n }\n /**\n * @returns Encodes the object and returns a copy of the encoder's internal buffer.\n */\n encode(object2) {\n if (this.entered) {\n const instance = this.clone();\n return instance.encode(object2);\n }\n try {\n this.entered = true;\n this.reinitializeState();\n this.doEncode(object2, 1);\n return this.bytes.slice(0, this.pos);\n } finally {\n this.entered = false;\n }\n }\n doEncode(object2, depth) {\n if (depth > this.maxDepth) {\n throw new Error(`Too deep objects in depth ${depth}`);\n }\n if (object2 == null) {\n this.encodeNil();\n } else if (typeof object2 === \"boolean\") {\n this.encodeBoolean(object2);\n } else if (typeof object2 === \"number\") {\n if (!this.forceIntegerToFloat) {\n this.encodeNumber(object2);\n } else {\n this.encodeNumberAsFloat(object2);\n }\n } else if (typeof object2 === \"string\") {\n this.encodeString(object2);\n } else if (this.useBigInt64 && typeof object2 === \"bigint\") {\n this.encodeBigInt64(object2);\n } else {\n this.encodeObject(object2, depth);\n }\n }\n ensureBufferSizeToWrite(sizeToWrite) {\n const requiredSize = this.pos + sizeToWrite;\n if (this.view.byteLength < requiredSize) {\n this.resizeBuffer(requiredSize * 2);\n }\n }\n resizeBuffer(newSize) {\n const newBuffer = new ArrayBuffer(newSize);\n const newBytes = new Uint8Array(newBuffer);\n const newView = new DataView(newBuffer);\n newBytes.set(this.bytes);\n this.view = newView;\n this.bytes = newBytes;\n }\n encodeNil() {\n this.writeU8(192);\n }\n encodeBoolean(object2) {\n if (object2 === false) {\n this.writeU8(194);\n } else {\n this.writeU8(195);\n }\n }\n encodeNumber(object2) {\n if (!this.forceIntegerToFloat && Number.isSafeInteger(object2)) {\n if (object2 >= 0) {\n if (object2 < 128) {\n this.writeU8(object2);\n } else if (object2 < 256) {\n this.writeU8(204);\n this.writeU8(object2);\n } else if (object2 < 65536) {\n this.writeU8(205);\n this.writeU16(object2);\n } else if (object2 < 4294967296) {\n this.writeU8(206);\n this.writeU32(object2);\n } else if (!this.useBigInt64) {\n this.writeU8(207);\n this.writeU64(object2);\n } else {\n this.encodeNumberAsFloat(object2);\n }\n } else {\n if (object2 >= -32) {\n this.writeU8(224 | object2 + 32);\n } else if (object2 >= -128) {\n this.writeU8(208);\n this.writeI8(object2);\n } else if (object2 >= -32768) {\n this.writeU8(209);\n this.writeI16(object2);\n } else if (object2 >= -2147483648) {\n this.writeU8(210);\n this.writeI32(object2);\n } else if (!this.useBigInt64) {\n this.writeU8(211);\n this.writeI64(object2);\n } else {\n this.encodeNumberAsFloat(object2);\n }\n }\n } else {\n this.encodeNumberAsFloat(object2);\n }\n }\n encodeNumberAsFloat(object2) {\n if (this.forceFloat32) {\n this.writeU8(202);\n this.writeF32(object2);\n } else {\n this.writeU8(203);\n this.writeF64(object2);\n }\n }\n encodeBigInt64(object2) {\n if (object2 >= BigInt(0)) {\n this.writeU8(207);\n this.writeBigUint64(object2);\n } else {\n this.writeU8(211);\n this.writeBigInt64(object2);\n }\n }\n writeStringHeader(byteLength) {\n if (byteLength < 32) {\n this.writeU8(160 + byteLength);\n } else if (byteLength < 256) {\n this.writeU8(217);\n this.writeU8(byteLength);\n } else if (byteLength < 65536) {\n this.writeU8(218);\n this.writeU16(byteLength);\n } else if (byteLength < 4294967296) {\n this.writeU8(219);\n this.writeU32(byteLength);\n } else {\n throw new Error(`Too long string: ${byteLength} bytes in UTF-8`);\n }\n }\n encodeString(object2) {\n const maxHeaderSize = 1 + 4;\n const byteLength = utf8Count(object2);\n this.ensureBufferSizeToWrite(maxHeaderSize + byteLength);\n this.writeStringHeader(byteLength);\n utf8Encode(object2, this.bytes, this.pos);\n this.pos += byteLength;\n }\n encodeObject(object2, depth) {\n const ext = this.extensionCodec.tryToEncode(object2, this.context);\n if (ext != null) {\n this.encodeExtension(ext);\n } else if (Array.isArray(object2)) {\n this.encodeArray(object2, depth);\n } else if (ArrayBuffer.isView(object2)) {\n this.encodeBinary(object2);\n } else if (typeof object2 === \"object\") {\n this.encodeMap(object2, depth);\n } else {\n throw new Error(`Unrecognized object: ${Object.prototype.toString.apply(object2)}`);\n }\n }\n encodeBinary(object2) {\n const size6 = object2.byteLength;\n if (size6 < 256) {\n this.writeU8(196);\n this.writeU8(size6);\n } else if (size6 < 65536) {\n this.writeU8(197);\n this.writeU16(size6);\n } else if (size6 < 4294967296) {\n this.writeU8(198);\n this.writeU32(size6);\n } else {\n throw new Error(`Too large binary: ${size6}`);\n }\n const bytes = ensureUint8Array(object2);\n this.writeU8a(bytes);\n }\n encodeArray(object2, depth) {\n const size6 = object2.length;\n if (size6 < 16) {\n this.writeU8(144 + size6);\n } else if (size6 < 65536) {\n this.writeU8(220);\n this.writeU16(size6);\n } else if (size6 < 4294967296) {\n this.writeU8(221);\n this.writeU32(size6);\n } else {\n throw new Error(`Too large array: ${size6}`);\n }\n for (const item of object2) {\n this.doEncode(item, depth + 1);\n }\n }\n countWithoutUndefined(object2, keys) {\n let count = 0;\n for (const key of keys) {\n if (object2[key] !== void 0) {\n count++;\n }\n }\n return count;\n }\n encodeMap(object2, depth) {\n const keys = Object.keys(object2);\n if (this.sortKeys) {\n keys.sort();\n }\n const size6 = this.ignoreUndefined ? this.countWithoutUndefined(object2, keys) : keys.length;\n if (size6 < 16) {\n this.writeU8(128 + size6);\n } else if (size6 < 65536) {\n this.writeU8(222);\n this.writeU16(size6);\n } else if (size6 < 4294967296) {\n this.writeU8(223);\n this.writeU32(size6);\n } else {\n throw new Error(`Too large map object: ${size6}`);\n }\n for (const key of keys) {\n const value = object2[key];\n if (!(this.ignoreUndefined && value === void 0)) {\n this.encodeString(key);\n this.doEncode(value, depth + 1);\n }\n }\n }\n encodeExtension(ext) {\n if (typeof ext.data === \"function\") {\n const data = ext.data(this.pos + 6);\n const size7 = data.length;\n if (size7 >= 4294967296) {\n throw new Error(`Too large extension object: ${size7}`);\n }\n this.writeU8(201);\n this.writeU32(size7);\n this.writeI8(ext.type);\n this.writeU8a(data);\n return;\n }\n const size6 = ext.data.length;\n if (size6 === 1) {\n this.writeU8(212);\n } else if (size6 === 2) {\n this.writeU8(213);\n } else if (size6 === 4) {\n this.writeU8(214);\n } else if (size6 === 8) {\n this.writeU8(215);\n } else if (size6 === 16) {\n this.writeU8(216);\n } else if (size6 < 256) {\n this.writeU8(199);\n this.writeU8(size6);\n } else if (size6 < 65536) {\n this.writeU8(200);\n this.writeU16(size6);\n } else if (size6 < 4294967296) {\n this.writeU8(201);\n this.writeU32(size6);\n } else {\n throw new Error(`Too large extension object: ${size6}`);\n }\n this.writeI8(ext.type);\n this.writeU8a(ext.data);\n }\n writeU8(value) {\n this.ensureBufferSizeToWrite(1);\n this.view.setUint8(this.pos, value);\n this.pos++;\n }\n writeU8a(values) {\n const size6 = values.length;\n this.ensureBufferSizeToWrite(size6);\n this.bytes.set(values, this.pos);\n this.pos += size6;\n }\n writeI8(value) {\n this.ensureBufferSizeToWrite(1);\n this.view.setInt8(this.pos, value);\n this.pos++;\n }\n writeU16(value) {\n this.ensureBufferSizeToWrite(2);\n this.view.setUint16(this.pos, value);\n this.pos += 2;\n }\n writeI16(value) {\n this.ensureBufferSizeToWrite(2);\n this.view.setInt16(this.pos, value);\n this.pos += 2;\n }\n writeU32(value) {\n this.ensureBufferSizeToWrite(4);\n this.view.setUint32(this.pos, value);\n this.pos += 4;\n }\n writeI32(value) {\n this.ensureBufferSizeToWrite(4);\n this.view.setInt32(this.pos, value);\n this.pos += 4;\n }\n writeF32(value) {\n this.ensureBufferSizeToWrite(4);\n this.view.setFloat32(this.pos, value);\n this.pos += 4;\n }\n writeF64(value) {\n this.ensureBufferSizeToWrite(8);\n this.view.setFloat64(this.pos, value);\n this.pos += 8;\n }\n writeU64(value) {\n this.ensureBufferSizeToWrite(8);\n setUint64(this.view, this.pos, value);\n this.pos += 8;\n }\n writeI64(value) {\n this.ensureBufferSizeToWrite(8);\n setInt64(this.view, this.pos, value);\n this.pos += 8;\n }\n writeBigUint64(value) {\n this.ensureBufferSizeToWrite(8);\n this.view.setBigUint64(this.pos, value);\n this.pos += 8;\n }\n writeBigInt64(value) {\n this.ensureBufferSizeToWrite(8);\n this.view.setBigInt64(this.pos, value);\n this.pos += 8;\n }\n };\n\n // ../../../node_modules/.pnpm/@msgpack+msgpack@3.1.2/node_modules/@msgpack/msgpack/dist.esm/encode.mjs\n function encode5(value, options) {\n const encoder6 = new Encoder(options);\n return encoder6.encodeSharedRef(value);\n }\n\n // ../../../node_modules/.pnpm/@nktkas+hyperliquid@0.25.7_typescript@5.8.3/node_modules/@nktkas/hyperliquid/esm/src/signing/_signTypedData.js\n init_dirname();\n init_buffer2();\n init_process2();\n function isAbstractEthersV6Signer(client) {\n return typeof client === \"object\" && client !== null && \"signTypedData\" in client && typeof client.signTypedData === \"function\" && client.signTypedData.length === 3;\n }\n function isAbstractEthersV5Signer(client) {\n return typeof client === \"object\" && client !== null && \"_signTypedData\" in client && typeof client._signTypedData === \"function\" && client._signTypedData.length === 3;\n }\n function isAbstractViemWallet(client) {\n return typeof client === \"object\" && client !== null && \"signTypedData\" in client && typeof client.signTypedData === \"function\" && (client.signTypedData.length === 1 || client.signTypedData.length === 2);\n }\n async function signTypedData3(args) {\n const { wallet, domain: domain2, types, primaryType, message } = args;\n let signature;\n if (isAbstractViemWallet(wallet)) {\n signature = await wallet.signTypedData({\n domain: domain2,\n types: {\n EIP712Domain: [\n { name: \"name\", type: \"string\" },\n { name: \"version\", type: \"string\" },\n { name: \"chainId\", type: \"uint256\" },\n { name: \"verifyingContract\", type: \"address\" }\n ],\n ...types\n },\n primaryType,\n message\n });\n } else if (isAbstractEthersV6Signer(wallet)) {\n signature = await wallet.signTypedData(domain2, types, message);\n } else if (isAbstractEthersV5Signer(wallet)) {\n signature = await wallet._signTypedData(domain2, types, message);\n } else {\n throw new Error(\"Unsupported wallet for signing typed data\");\n }\n return splitSignature(signature);\n }\n function splitSignature(signature) {\n const r2 = `0x${signature.slice(2, 66)}`;\n const s4 = `0x${signature.slice(66, 130)}`;\n const v2 = parseInt(signature.slice(130, 132), 16);\n return { r: r2, s: s4, v: v2 };\n }\n\n // ../../../node_modules/.pnpm/@nktkas+hyperliquid@0.25.7_typescript@5.8.3/node_modules/@nktkas/hyperliquid/esm/src/signing/mod.js\n function createL1ActionHash(args) {\n const { action, nonce, vaultAddress, expiresAfter } = args;\n const actionBytes = encode5(action, { ignoreUndefined: true });\n const nonceBytes = toUint64Bytes(nonce);\n const vaultMarker = vaultAddress ? new Uint8Array([1]) : new Uint8Array([0]);\n const vaultBytes = vaultAddress ? hexToBytes5(vaultAddress.slice(2)) : new Uint8Array();\n const expiresMarker = expiresAfter !== void 0 ? new Uint8Array([0]) : new Uint8Array();\n const expiresBytes = expiresAfter !== void 0 ? toUint64Bytes(expiresAfter) : new Uint8Array();\n const bytes = concatBytes4(actionBytes, nonceBytes, vaultMarker, vaultBytes, expiresMarker, expiresBytes);\n const hash3 = keccak_2562(bytes);\n return `0x${bytesToHex5(hash3)}`;\n }\n function toUint64Bytes(n2) {\n const bytes = new Uint8Array(8);\n new DataView(bytes.buffer).setBigUint64(0, BigInt(n2));\n return bytes;\n }\n async function signL1Action(args) {\n const { wallet, action, nonce, isTestnet = false, vaultAddress, expiresAfter } = args;\n const actionHash = createL1ActionHash({ action, nonce, vaultAddress, expiresAfter });\n const message = {\n source: isTestnet ? \"b\" : \"a\",\n connectionId: actionHash\n };\n return await signTypedData3({\n wallet,\n domain: {\n name: \"Exchange\",\n version: \"1\",\n chainId: 1337,\n // hyperliquid requires chainId to be 1337\n verifyingContract: \"0x0000000000000000000000000000000000000000\"\n },\n types: {\n Agent: [\n { name: \"source\", type: \"string\" },\n { name: \"connectionId\", type: \"bytes32\" }\n ]\n },\n primaryType: \"Agent\",\n message\n });\n }\n async function signUserSignedAction(args) {\n let { wallet, action, types } = args;\n if (action.type === \"approveAgent\" && !action.agentName) {\n action = { ...action, agentName: \"\" };\n }\n if (\"payloadMultiSigUser\" in action && \"outerSigner\" in action) {\n types = structuredClone(types);\n Object.values(types)[0].splice(\n // array mutation\n 1,\n // after `hyperliquidChain`\n 0,\n // do not remove any elements\n { name: \"payloadMultiSigUser\", type: \"address\" },\n { name: \"outerSigner\", type: \"address\" }\n );\n }\n return await signTypedData3({\n wallet,\n domain: {\n name: \"HyperliquidSignTransaction\",\n version: \"1\",\n chainId: parseInt(action.signatureChainId),\n verifyingContract: \"0x0000000000000000000000000000000000000000\"\n },\n types,\n primaryType: Object.keys(types)[0],\n message: action\n });\n }\n\n // ../../../node_modules/.pnpm/@nktkas+hyperliquid@0.25.7_typescript@5.8.3/node_modules/@nktkas/hyperliquid/esm/src/api/exchange/_base/_nonce.js\n init_dirname();\n init_buffer2();\n init_process2();\n\n // ../../../node_modules/.pnpm/@nktkas+hyperliquid@0.25.7_typescript@5.8.3/node_modules/@nktkas/hyperliquid/esm/src/api/exchange/_base/_helpers.js\n init_dirname();\n init_buffer2();\n init_process2();\n\n // ../../../node_modules/.pnpm/@nktkas+hyperliquid@0.25.7_typescript@5.8.3/node_modules/@nktkas/hyperliquid/esm/src/api/exchange/_base/_sequential.js\n init_dirname();\n init_buffer2();\n init_process2();\n\n // ../../../node_modules/.pnpm/@nktkas+hyperliquid@0.25.7_typescript@5.8.3/node_modules/@nktkas/hyperliquid/esm/src/api/exchange/_base/_schemas.js\n init_dirname();\n init_buffer2();\n init_process2();\n var Signature = /* @__PURE__ */ (() => {\n return pipe(object({\n /** First 32-byte component of ECDSA signature. */\n r: pipe(pipe(Hex, length(66)), description(\"First 32-byte component of ECDSA signature.\")),\n /** Second 32-byte component of ECDSA signature. */\n s: pipe(pipe(Hex, length(66)), description(\"Second 32-byte component of ECDSA signature.\")),\n /** Recovery identifier. */\n v: pipe(union([literal(27), literal(28)]), description(\"Recovery identifier.\"))\n }), description(\"ECDSA signature components for Ethereum typed data.\"));\n })();\n\n // ../../../node_modules/.pnpm/@nktkas+hyperliquid@0.25.7_typescript@5.8.3/node_modules/@nktkas/hyperliquid/esm/src/api/exchange/_base/_types.js\n init_dirname();\n init_buffer2();\n init_process2();\n\n // ../../../node_modules/.pnpm/@nktkas+hyperliquid@0.25.7_typescript@5.8.3/node_modules/@nktkas/hyperliquid/esm/src/api/exchange/approveAgent.js\n init_dirname();\n init_buffer2();\n init_process2();\n\n // ../../../node_modules/.pnpm/@nktkas+hyperliquid@0.25.7_typescript@5.8.3/node_modules/@nktkas/hyperliquid/esm/src/api/exchange/approveBuilderFee.js\n init_dirname();\n init_buffer2();\n init_process2();\n var ApproveBuilderFeeRequest = /* @__PURE__ */ (() => {\n return pipe(object({\n /** Action to perform. */\n action: pipe(object({\n /** Type of action. */\n type: pipe(literal(\"approveBuilderFee\"), description(\"Type of action.\")),\n /** Chain ID used for signing. */\n signatureChainId: pipe(Hex, description(\"Chain ID used for signing.\")),\n /** HyperLiquid network. */\n hyperliquidChain: pipe(union([literal(\"Mainnet\"), literal(\"Testnet\")]), description(\"HyperLiquid network.\")),\n /** Max fee rate (e.g., \"0.01%\"). */\n maxFeeRate: pipe(Percent, description('Max fee rate (e.g., \"0.01%\").')),\n /** Builder address. */\n builder: pipe(Address, description(\"Builder address.\")),\n /** Unique request identifier (current timestamp in ms). */\n nonce: pipe(UnsignedInteger, description(\"Unique request identifier (current timestamp in ms).\"))\n }), description(\"Action to perform.\")),\n /** Unique request identifier (current timestamp in ms). */\n nonce: pipe(UnsignedInteger, description(\"Unique request identifier (current timestamp in ms).\")),\n /** Cryptographic signature. */\n signature: pipe(Signature, description(\"Cryptographic signature.\"))\n }), description(\"Approve a maximum fee rate for a builder.\"));\n })();\n var ApproveBuilderFeeTypes = {\n \"HyperliquidTransaction:ApproveBuilderFee\": [\n { name: \"hyperliquidChain\", type: \"string\" },\n { name: \"maxFeeRate\", type: \"string\" },\n { name: \"builder\", type: \"address\" },\n { name: \"nonce\", type: \"uint64\" }\n ]\n };\n\n // ../../../node_modules/.pnpm/@nktkas+hyperliquid@0.25.7_typescript@5.8.3/node_modules/@nktkas/hyperliquid/esm/src/api/exchange/batchModify.js\n init_dirname();\n init_buffer2();\n init_process2();\n\n // ../../../node_modules/.pnpm/@nktkas+hyperliquid@0.25.7_typescript@5.8.3/node_modules/@nktkas/hyperliquid/esm/src/api/_common_schemas.js\n init_dirname();\n init_buffer2();\n init_process2();\n var TIFSchema = /* @__PURE__ */ (() => {\n return pipe(union([\n literal(\"Gtc\"),\n literal(\"Ioc\"),\n literal(\"Alo\"),\n literal(\"FrontendMarket\"),\n literal(\"LiquidationMarket\")\n ]), description('Time-in-force.\\n- `\"Gtc\"`: Remains active until filled or canceled.\\n- `\"Ioc\"`: Fills immediately or cancels any unfilled portion.\\n- `\"Alo\"`: Adds liquidity only.\\n- `\"FrontendMarket\"`: Similar to Ioc, used in Hyperliquid UI.\\n- `\"LiquidationMarket\"`: Similar to Ioc, used in Hyperliquid UI.'));\n })();\n var PlaceOrderParamsSchema = /* @__PURE__ */ (() => {\n return pipe(object({\n /** Asset ID. */\n a: pipe(UnsignedInteger, description(\"Asset ID.\")),\n /** Position side (`true` for long, `false` for short). */\n b: pipe(boolean(), description(\"Position side (`true` for long, `false` for short).\")),\n /** Price. */\n p: pipe(UnsignedDecimal, description(\"Price.\")),\n /** Size (in base currency units). */\n s: pipe(UnsignedDecimal, description(\"Size (in base currency units).\")),\n /** Is reduce-only? */\n r: pipe(boolean(), description(\"Is reduce-only?\")),\n /** Order type. */\n t: pipe(union([\n object({\n /** Limit order parameters. */\n limit: pipe(object({\n /**\n * Time-in-force.\n * - `\"Gtc\"`: Remains active until filled or canceled.\n * - `\"Ioc\"`: Fills immediately or cancels any unfilled portion.\n * - `\"Alo\"`: Adds liquidity only.\n * - `\"FrontendMarket\"`: Similar to Ioc, used in Hyperliquid UI.\n * - `\"LiquidationMarket\"`: Similar to Ioc, used in Hyperliquid UI.\n */\n tif: TIFSchema\n }), description(\"Limit order parameters.\"))\n }),\n object({\n /** Trigger order parameters. */\n trigger: pipe(object({\n /** Is market order? */\n isMarket: pipe(boolean(), description(\"Is market order?\")),\n /** Trigger price. */\n triggerPx: pipe(UnsignedDecimal, description(\"Trigger price.\")),\n /** Indicates whether it is take profit or stop loss. */\n tpsl: pipe(union([literal(\"tp\"), literal(\"sl\")]), description(\"Indicates whether it is take profit or stop loss.\"))\n }), description(\"Trigger order parameters.\"))\n })\n ]), description(\"Order type.\")),\n /** Client Order ID. */\n c: pipe(optional(pipe(Hex, length(34))), description(\"Client Order ID.\"))\n }), description(\"Place order parameters.\"));\n })();\n var CandleIntervalSchema = /* @__PURE__ */ (() => {\n return pipe(union([\n literal(\"1m\"),\n literal(\"3m\"),\n literal(\"5m\"),\n literal(\"15m\"),\n literal(\"30m\"),\n literal(\"1h\"),\n literal(\"2h\"),\n literal(\"4h\"),\n literal(\"8h\"),\n literal(\"12h\"),\n literal(\"1d\"),\n literal(\"3d\"),\n literal(\"1w\"),\n literal(\"1M\")\n ]), description(\"Time interval.\"));\n })();\n\n // ../../../node_modules/.pnpm/@nktkas+hyperliquid@0.25.7_typescript@5.8.3/node_modules/@nktkas/hyperliquid/esm/src/api/exchange/order.js\n init_dirname();\n init_buffer2();\n init_process2();\n var OrderRequest = /* @__PURE__ */ (() => {\n return pipe(object({\n /** Action to perform. */\n action: pipe(object({\n /** Type of action. */\n type: pipe(literal(\"order\"), description(\"Type of action.\")),\n /** Order parameters. */\n orders: pipe(array(PlaceOrderParamsSchema), description(\"Order parameters.\")),\n /**\n * Order grouping strategy:\n * - `na`: Standard order without grouping (default).\n * - `normalTpsl`: TP/SL order with fixed size that doesn't adjust with position changes.\n * - `positionTpsl`: TP/SL order that adjusts proportionally with the position size.\n */\n grouping: pipe(optional(union([\n literal(\"na\"),\n literal(\"normalTpsl\"),\n literal(\"positionTpsl\")\n ]), \"na\"), description(\"Order grouping strategy:\\n- `na`: Standard order without grouping.\\n- `normalTpsl`: TP/SL order with fixed size that doesn't adjust with position changes.\\n- `positionTpsl`: TP/SL order that adjusts proportionally with the position size.\")),\n /** Builder fee. */\n builder: pipe(optional(object({\n /** Builder address. */\n b: pipe(Address, description(\"Builder address.\")),\n /** Builder fee in 0.1bps (1 = 0.0001%). */\n f: pipe(UnsignedInteger, description(\"Builder fee in 0.1bps (1 = 0.0001%).\"))\n })), description(\"Builder fee.\"))\n }), description(\"Action to perform.\")),\n /** Unique request identifier (current timestamp in ms). */\n nonce: pipe(UnsignedInteger, description(\"Unique request identifier (current timestamp in ms).\")),\n /** Cryptographic signature. */\n signature: pipe(Signature, description(\"Cryptographic signature.\")),\n /** Vault address (for vault trading). */\n vaultAddress: pipe(optional(Address), description(\"Vault address (for vault trading).\")),\n /** Expiration time of the action. */\n expiresAfter: pipe(optional(UnsignedInteger), description(\"Expiration time of the action.\"))\n }), description(\"Place an order(s).\"));\n })();\n\n // ../../../node_modules/.pnpm/@nktkas+hyperliquid@0.25.7_typescript@5.8.3/node_modules/@nktkas/hyperliquid/esm/src/api/exchange/cancel.js\n init_dirname();\n init_buffer2();\n init_process2();\n var CancelRequest = /* @__PURE__ */ (() => {\n return pipe(object({\n /** Action to perform. */\n action: pipe(object({\n /** Type of action. */\n type: pipe(literal(\"cancel\"), description(\"Type of action.\")),\n /** Orders to cancel. */\n cancels: pipe(array(object({\n /** Asset ID. */\n a: pipe(UnsignedInteger, description(\"Asset ID.\")),\n /** Order ID. */\n o: pipe(UnsignedInteger, description(\"Order ID.\"))\n })), description(\"Orders to cancel.\"))\n }), description(\"Action to perform.\")),\n /** Unique request identifier (current timestamp in ms). */\n nonce: pipe(UnsignedInteger, description(\"Unique request identifier (current timestamp in ms).\")),\n /** Cryptographic signature. */\n signature: pipe(Signature, description(\"Cryptographic signature.\")),\n /** Vault address (for vault trading). */\n vaultAddress: pipe(optional(Address), description(\"Vault address (for vault trading).\")),\n /** Expiration time of the action. */\n expiresAfter: pipe(optional(UnsignedInteger), description(\"Expiration time of the action.\"))\n }), description(\"Cancel order(s).\"));\n })();\n\n // ../../../node_modules/.pnpm/@nktkas+hyperliquid@0.25.7_typescript@5.8.3/node_modules/@nktkas/hyperliquid/esm/src/api/exchange/cancelByCloid.js\n init_dirname();\n init_buffer2();\n init_process2();\n\n // ../../../node_modules/.pnpm/@nktkas+hyperliquid@0.25.7_typescript@5.8.3/node_modules/@nktkas/hyperliquid/esm/src/api/exchange/cDeposit.js\n init_dirname();\n init_buffer2();\n init_process2();\n\n // ../../../node_modules/.pnpm/@nktkas+hyperliquid@0.25.7_typescript@5.8.3/node_modules/@nktkas/hyperliquid/esm/src/api/exchange/claimRewards.js\n init_dirname();\n init_buffer2();\n init_process2();\n\n // ../../../node_modules/.pnpm/@nktkas+hyperliquid@0.25.7_typescript@5.8.3/node_modules/@nktkas/hyperliquid/esm/src/api/exchange/convertToMultiSigUser.js\n init_dirname();\n init_buffer2();\n init_process2();\n\n // ../../../node_modules/.pnpm/@nktkas+hyperliquid@0.25.7_typescript@5.8.3/node_modules/@nktkas/hyperliquid/esm/src/api/exchange/createSubAccount.js\n init_dirname();\n init_buffer2();\n init_process2();\n\n // ../../../node_modules/.pnpm/@nktkas+hyperliquid@0.25.7_typescript@5.8.3/node_modules/@nktkas/hyperliquid/esm/src/api/exchange/createVault.js\n init_dirname();\n init_buffer2();\n init_process2();\n\n // ../../../node_modules/.pnpm/@nktkas+hyperliquid@0.25.7_typescript@5.8.3/node_modules/@nktkas/hyperliquid/esm/src/api/exchange/cSignerAction.js\n init_dirname();\n init_buffer2();\n init_process2();\n\n // ../../../node_modules/.pnpm/@nktkas+hyperliquid@0.25.7_typescript@5.8.3/node_modules/@nktkas/hyperliquid/esm/src/api/exchange/cValidatorAction.js\n init_dirname();\n init_buffer2();\n init_process2();\n\n // ../../../node_modules/.pnpm/@nktkas+hyperliquid@0.25.7_typescript@5.8.3/node_modules/@nktkas/hyperliquid/esm/src/api/exchange/cWithdraw.js\n init_dirname();\n init_buffer2();\n init_process2();\n\n // ../../../node_modules/.pnpm/@nktkas+hyperliquid@0.25.7_typescript@5.8.3/node_modules/@nktkas/hyperliquid/esm/src/api/exchange/evmUserModify.js\n init_dirname();\n init_buffer2();\n init_process2();\n\n // ../../../node_modules/.pnpm/@nktkas+hyperliquid@0.25.7_typescript@5.8.3/node_modules/@nktkas/hyperliquid/esm/src/api/exchange/modify.js\n init_dirname();\n init_buffer2();\n init_process2();\n\n // ../../../node_modules/.pnpm/@nktkas+hyperliquid@0.25.7_typescript@5.8.3/node_modules/@nktkas/hyperliquid/esm/src/api/exchange/multiSig.js\n init_dirname();\n init_buffer2();\n init_process2();\n\n // ../../../node_modules/.pnpm/@nktkas+hyperliquid@0.25.7_typescript@5.8.3/node_modules/@nktkas/hyperliquid/esm/src/api/exchange/noop.js\n init_dirname();\n init_buffer2();\n init_process2();\n\n // ../../../node_modules/.pnpm/@nktkas+hyperliquid@0.25.7_typescript@5.8.3/node_modules/@nktkas/hyperliquid/esm/src/api/exchange/registerReferrer.js\n init_dirname();\n init_buffer2();\n init_process2();\n\n // ../../../node_modules/.pnpm/@nktkas+hyperliquid@0.25.7_typescript@5.8.3/node_modules/@nktkas/hyperliquid/esm/src/api/exchange/reserveRequestWeight.js\n init_dirname();\n init_buffer2();\n init_process2();\n\n // ../../../node_modules/.pnpm/@nktkas+hyperliquid@0.25.7_typescript@5.8.3/node_modules/@nktkas/hyperliquid/esm/src/api/exchange/scheduleCancel.js\n init_dirname();\n init_buffer2();\n init_process2();\n\n // ../../../node_modules/.pnpm/@nktkas+hyperliquid@0.25.7_typescript@5.8.3/node_modules/@nktkas/hyperliquid/esm/src/api/exchange/setDisplayName.js\n init_dirname();\n init_buffer2();\n init_process2();\n\n // ../../../node_modules/.pnpm/@nktkas+hyperliquid@0.25.7_typescript@5.8.3/node_modules/@nktkas/hyperliquid/esm/src/api/exchange/setReferrer.js\n init_dirname();\n init_buffer2();\n init_process2();\n\n // ../../../node_modules/.pnpm/@nktkas+hyperliquid@0.25.7_typescript@5.8.3/node_modules/@nktkas/hyperliquid/esm/src/api/exchange/spotDeploy.js\n init_dirname();\n init_buffer2();\n init_process2();\n\n // ../../../node_modules/.pnpm/@nktkas+hyperliquid@0.25.7_typescript@5.8.3/node_modules/@nktkas/hyperliquid/esm/src/api/exchange/subAccountModify.js\n init_dirname();\n init_buffer2();\n init_process2();\n\n // ../../../node_modules/.pnpm/@nktkas+hyperliquid@0.25.7_typescript@5.8.3/node_modules/@nktkas/hyperliquid/esm/src/api/exchange/tokenDelegate.js\n init_dirname();\n init_buffer2();\n init_process2();\n\n // ../../../node_modules/.pnpm/@nktkas+hyperliquid@0.25.7_typescript@5.8.3/node_modules/@nktkas/hyperliquid/esm/src/api/exchange/twapOrder.js\n init_dirname();\n init_buffer2();\n init_process2();\n\n // ../../../node_modules/.pnpm/@nktkas+hyperliquid@0.25.7_typescript@5.8.3/node_modules/@nktkas/hyperliquid/esm/src/api/exchange/usdClassTransfer.js\n init_dirname();\n init_buffer2();\n init_process2();\n var UsdClassTransferRequest = /* @__PURE__ */ (() => {\n return pipe(object({\n /** Action to perform. */\n action: pipe(object({\n /** Type of action. */\n type: pipe(literal(\"usdClassTransfer\"), description(\"Type of action.\")),\n /** Chain ID used for signing. */\n signatureChainId: pipe(Hex, description(\"Chain ID used for signing.\")),\n /** HyperLiquid network. */\n hyperliquidChain: pipe(union([literal(\"Mainnet\"), literal(\"Testnet\")]), description(\"HyperLiquid network.\")),\n /** Amount to transfer (1 = $1). */\n amount: pipe(UnsignedDecimal, description(\"Amount to transfer (1 = $1).\")),\n /** `true` for Spot to Perp, `false` for Perp to Spot. */\n toPerp: pipe(boolean(), description(\"`true` for Spot to Perp, `false` for Perp to Spot.\")),\n /** Unique request identifier (current timestamp in ms). */\n nonce: pipe(UnsignedInteger, description(\"Unique request identifier (current timestamp in ms).\"))\n }), description(\"Action to perform.\")),\n /** Unique request identifier (current timestamp in ms). */\n nonce: pipe(UnsignedInteger, description(\"Unique request identifier (current timestamp in ms).\")),\n /** Cryptographic signature. */\n signature: pipe(Signature, description(\"Cryptographic signature.\"))\n }), description(\"Transfer funds between Spot account and Perp account.\"));\n })();\n var UsdClassTransferTypes = {\n \"HyperliquidTransaction:UsdClassTransfer\": [\n { name: \"hyperliquidChain\", type: \"string\" },\n { name: \"amount\", type: \"string\" },\n { name: \"toPerp\", type: \"bool\" },\n { name: \"nonce\", type: \"uint64\" }\n ]\n };\n\n // ../../../node_modules/.pnpm/@nktkas+hyperliquid@0.25.7_typescript@5.8.3/node_modules/@nktkas/hyperliquid/esm/src/api/exchange/vaultDistribute.js\n init_dirname();\n init_buffer2();\n init_process2();\n\n // ../../../node_modules/.pnpm/@nktkas+hyperliquid@0.25.7_typescript@5.8.3/node_modules/@nktkas/hyperliquid/esm/src/api/exchange/withdraw3.js\n init_dirname();\n init_buffer2();\n init_process2();\n var Withdraw3Request = /* @__PURE__ */ (() => {\n return pipe(object({\n /** Action to perform. */\n action: pipe(object({\n /** Type of action. */\n type: pipe(literal(\"withdraw3\"), description(\"Type of action.\")),\n /** Chain ID used for signing. */\n signatureChainId: pipe(Hex, description(\"Chain ID used for signing.\")),\n /** HyperLiquid network. */\n hyperliquidChain: pipe(union([literal(\"Mainnet\"), literal(\"Testnet\")]), description(\"HyperLiquid network.\")),\n /** Destination address. */\n destination: pipe(Address, description(\"Destination address.\")),\n /** Amount to withdraw (1 = $1). */\n amount: pipe(UnsignedDecimal, description(\"Amount to withdraw (1 = $1).\")),\n /** Unique request identifier (current timestamp in ms). */\n time: pipe(UnsignedInteger, description(\"Unique request identifier (current timestamp in ms).\"))\n }), description(\"Action to perform.\")),\n /** Unique request identifier (current timestamp in ms). */\n nonce: pipe(UnsignedInteger, description(\"Unique request identifier (current timestamp in ms).\")),\n /** Cryptographic signature. */\n signature: pipe(Signature, description(\"Cryptographic signature.\"))\n }), description(\"Initiate a withdrawal request.\"));\n })();\n var Withdraw3Types = {\n \"HyperliquidTransaction:Withdraw\": [\n { name: \"hyperliquidChain\", type: \"string\" },\n { name: \"destination\", type: \"string\" },\n { name: \"amount\", type: \"string\" },\n { name: \"time\", type: \"uint64\" }\n ]\n };\n\n // ../../../node_modules/.pnpm/@nktkas+hyperliquid@0.25.7_typescript@5.8.3/node_modules/@nktkas/hyperliquid/esm/src/api/exchange/perpDeploy.js\n init_dirname();\n init_buffer2();\n init_process2();\n\n // ../../../node_modules/.pnpm/@nktkas+hyperliquid@0.25.7_typescript@5.8.3/node_modules/@nktkas/hyperliquid/esm/src/api/exchange/sendAsset.js\n init_dirname();\n init_buffer2();\n init_process2();\n\n // ../../../node_modules/.pnpm/@nktkas+hyperliquid@0.25.7_typescript@5.8.3/node_modules/@nktkas/hyperliquid/esm/src/api/exchange/spotSend.js\n init_dirname();\n init_buffer2();\n init_process2();\n var SpotSendRequest = /* @__PURE__ */ (() => {\n return pipe(object({\n /** Action to perform. */\n action: pipe(object({\n /** Type of action. */\n type: pipe(literal(\"spotSend\"), description(\"Type of action.\")),\n /** Chain ID used for signing. */\n signatureChainId: pipe(Hex, description(\"Chain ID used for signing.\")),\n /** HyperLiquid network. */\n hyperliquidChain: pipe(union([literal(\"Mainnet\"), literal(\"Testnet\")]), description(\"HyperLiquid network.\")),\n /** Destination address. */\n destination: pipe(Address, description(\"Destination address.\")),\n /** Token identifier. */\n token: pipe(TokenId, description(\"Token identifier.\")),\n /** Amount to send (not in wei). */\n amount: pipe(UnsignedDecimal, description(\"Amount to send (not in wei).\")),\n /** Unique request identifier (current timestamp in ms). */\n time: pipe(UnsignedInteger, description(\"Unique request identifier (current timestamp in ms).\"))\n }), description(\"Action to perform.\")),\n /** Unique request identifier (current timestamp in ms). */\n nonce: pipe(UnsignedInteger, description(\"Unique request identifier (current timestamp in ms).\")),\n /** Cryptographic signature. */\n signature: pipe(Signature, description(\"Cryptographic signature.\"))\n }), description(\"Send spot assets to another address.\"));\n })();\n var SpotSendTypes = {\n \"HyperliquidTransaction:SpotSend\": [\n { name: \"hyperliquidChain\", type: \"string\" },\n { name: \"destination\", type: \"string\" },\n { name: \"token\", type: \"string\" },\n { name: \"amount\", type: \"string\" },\n { name: \"time\", type: \"uint64\" }\n ]\n };\n\n // ../../../node_modules/.pnpm/@nktkas+hyperliquid@0.25.7_typescript@5.8.3/node_modules/@nktkas/hyperliquid/esm/src/api/exchange/spotUser.js\n init_dirname();\n init_buffer2();\n init_process2();\n\n // ../../../node_modules/.pnpm/@nktkas+hyperliquid@0.25.7_typescript@5.8.3/node_modules/@nktkas/hyperliquid/esm/src/api/exchange/subAccountSpotTransfer.js\n init_dirname();\n init_buffer2();\n init_process2();\n\n // ../../../node_modules/.pnpm/@nktkas+hyperliquid@0.25.7_typescript@5.8.3/node_modules/@nktkas/hyperliquid/esm/src/api/exchange/subAccountTransfer.js\n init_dirname();\n init_buffer2();\n init_process2();\n\n // ../../../node_modules/.pnpm/@nktkas+hyperliquid@0.25.7_typescript@5.8.3/node_modules/@nktkas/hyperliquid/esm/src/api/exchange/twapCancel.js\n init_dirname();\n init_buffer2();\n init_process2();\n\n // ../../../node_modules/.pnpm/@nktkas+hyperliquid@0.25.7_typescript@5.8.3/node_modules/@nktkas/hyperliquid/esm/src/api/exchange/updateIsolatedMargin.js\n init_dirname();\n init_buffer2();\n init_process2();\n\n // ../../../node_modules/.pnpm/@nktkas+hyperliquid@0.25.7_typescript@5.8.3/node_modules/@nktkas/hyperliquid/esm/src/api/exchange/updateLeverage.js\n init_dirname();\n init_buffer2();\n init_process2();\n var UpdateLeverageRequest = /* @__PURE__ */ (() => {\n return pipe(object({\n /** Action to perform. */\n action: pipe(object({\n /** Type of action. */\n type: pipe(literal(\"updateLeverage\"), description(\"Type of action.\")),\n /** Asset ID. */\n asset: pipe(UnsignedInteger, description(\"Asset ID.\")),\n /** `true` for cross leverage, `false` for isolated leverage. */\n isCross: pipe(boolean(), description(\"`true` for cross leverage, `false` for isolated leverage.\")),\n /** New leverage value. */\n leverage: pipe(pipe(UnsignedInteger, minValue(1)), description(\"New leverage value.\"))\n }), description(\"Action to perform.\")),\n /** Unique request identifier (current timestamp in ms). */\n nonce: pipe(UnsignedInteger, description(\"Unique request identifier (current timestamp in ms).\")),\n /** Cryptographic signature. */\n signature: pipe(Signature, description(\"Cryptographic signature.\")),\n /** Vault address (for vault trading). */\n vaultAddress: pipe(optional(Address), description(\"Vault address (for vault trading).\")),\n /** Expiration time of the action. */\n expiresAfter: pipe(optional(UnsignedInteger), description(\"Expiration time of the action.\"))\n }), description(\"Update cross or isolated leverage on a coin.\"));\n })();\n\n // ../../../node_modules/.pnpm/@nktkas+hyperliquid@0.25.7_typescript@5.8.3/node_modules/@nktkas/hyperliquid/esm/src/api/exchange/usdSend.js\n init_dirname();\n init_buffer2();\n init_process2();\n var UsdSendRequest = /* @__PURE__ */ (() => {\n return pipe(object({\n /** Action to perform. */\n action: pipe(object({\n /** Type of action. */\n type: pipe(literal(\"usdSend\"), description(\"Type of action.\")),\n /** Chain ID used for signing. */\n signatureChainId: pipe(Hex, description(\"Chain ID used for signing.\")),\n /** HyperLiquid network. */\n hyperliquidChain: pipe(union([literal(\"Mainnet\"), literal(\"Testnet\")]), description(\"HyperLiquid network.\")),\n /** Destination address. */\n destination: pipe(Address, description(\"Destination address.\")),\n /** Amount to send (1 = $1). */\n amount: pipe(UnsignedDecimal, description(\"Amount to send (1 = $1).\")),\n /** Unique request identifier (current timestamp in ms). */\n time: pipe(UnsignedInteger, description(\"Unique request identifier (current timestamp in ms).\"))\n }), description(\"Action to perform.\")),\n /** Unique request identifier (current timestamp in ms). */\n nonce: pipe(UnsignedInteger, description(\"Unique request identifier (current timestamp in ms).\")),\n /** Cryptographic signature. */\n signature: pipe(Signature, description(\"Cryptographic signature.\"))\n }), description(\"Send usd to another address.\"));\n })();\n var UsdSendTypes = {\n \"HyperliquidTransaction:UsdSend\": [\n { name: \"hyperliquidChain\", type: \"string\" },\n { name: \"destination\", type: \"string\" },\n { name: \"amount\", type: \"string\" },\n { name: \"time\", type: \"uint64\" }\n ]\n };\n\n // ../../../node_modules/.pnpm/@nktkas+hyperliquid@0.25.7_typescript@5.8.3/node_modules/@nktkas/hyperliquid/esm/src/api/exchange/vaultModify.js\n init_dirname();\n init_buffer2();\n init_process2();\n\n // ../../../node_modules/.pnpm/@nktkas+hyperliquid@0.25.7_typescript@5.8.3/node_modules/@nktkas/hyperliquid/esm/src/api/exchange/vaultTransfer.js\n init_dirname();\n init_buffer2();\n init_process2();\n\n // ../../../node_modules/.pnpm/@nktkas+hyperliquid@0.25.7_typescript@5.8.3/node_modules/@nktkas/hyperliquid/esm/src/api/exchange/userDexAbstraction.js\n init_dirname();\n init_buffer2();\n init_process2();\n\n // ../../../node_modules/.pnpm/@nktkas+hyperliquid@0.25.7_typescript@5.8.3/node_modules/@nktkas/hyperliquid/esm/src/api/info/~client.js\n init_dirname();\n init_buffer2();\n init_process2();\n\n // ../../../node_modules/.pnpm/@nktkas+hyperliquid@0.25.7_typescript@5.8.3/node_modules/@nktkas/hyperliquid/esm/src/api/info/activeAssetData.js\n init_dirname();\n init_buffer2();\n init_process2();\n var ActiveAssetDataRequest = /* @__PURE__ */ (() => {\n return pipe(object({\n /** Type of request. */\n type: pipe(literal(\"activeAssetData\"), description(\"Type of request.\")),\n /** Asset symbol (e.g., BTC). */\n coin: pipe(string(), description(\"Asset symbol (e.g., BTC).\")),\n /** User address. */\n user: pipe(Address, description(\"User address.\"))\n }), description(\"Request user active asset data.\"));\n })();\n function activeAssetData(config2, params, signal) {\n const request = parser(ActiveAssetDataRequest)({\n type: \"activeAssetData\",\n ...params\n });\n return config2.transport.request(\"info\", request, signal);\n }\n\n // ../../../node_modules/.pnpm/@nktkas+hyperliquid@0.25.7_typescript@5.8.3/node_modules/@nktkas/hyperliquid/esm/src/api/info/alignedQuoteTokenInfo.js\n init_dirname();\n init_buffer2();\n init_process2();\n var AlignedQuoteTokenInfoRequest = /* @__PURE__ */ (() => {\n return pipe(object({\n /** Type of request. */\n type: pipe(literal(\"alignedQuoteTokenInfo\"), description(\"Type of request.\")),\n /** Token index. */\n token: pipe(UnsignedInteger, description(\"Token index.\"))\n }), description(\"Request supply, rate, and pending payment information for an aligned quote token.\"));\n })();\n function alignedQuoteTokenInfo(config2, params, signal) {\n const request = parser(AlignedQuoteTokenInfoRequest)({\n type: \"alignedQuoteTokenInfo\",\n ...params\n });\n return config2.transport.request(\"info\", request, signal);\n }\n\n // ../../../node_modules/.pnpm/@nktkas+hyperliquid@0.25.7_typescript@5.8.3/node_modules/@nktkas/hyperliquid/esm/src/api/info/allMids.js\n init_dirname();\n init_buffer2();\n init_process2();\n var AllMidsRequest = /* @__PURE__ */ (() => {\n return pipe(object({\n /** Type of request. */\n type: pipe(literal(\"allMids\"), description(\"Type of request.\")),\n /** DEX name (empty string for main dex). */\n dex: pipe(optional(string()), description(\"DEX name (empty string for main dex).\"))\n }), description(\"Request mid coin prices.\"));\n })();\n function allMids(config2, paramsOrSignal, maybeSignal) {\n const params = paramsOrSignal instanceof AbortSignal ? {} : paramsOrSignal;\n const signal = paramsOrSignal instanceof AbortSignal ? paramsOrSignal : maybeSignal;\n const request = parser(AllMidsRequest)({\n type: \"allMids\",\n ...params\n });\n return config2.transport.request(\"info\", request, signal);\n }\n\n // ../../../node_modules/.pnpm/@nktkas+hyperliquid@0.25.7_typescript@5.8.3/node_modules/@nktkas/hyperliquid/esm/src/api/info/allPerpMetas.js\n init_dirname();\n init_buffer2();\n init_process2();\n\n // ../../../node_modules/.pnpm/@nktkas+hyperliquid@0.25.7_typescript@5.8.3/node_modules/@nktkas/hyperliquid/esm/src/api/info/meta.js\n init_dirname();\n init_buffer2();\n init_process2();\n\n // ../../../node_modules/.pnpm/@nktkas+hyperliquid@0.25.7_typescript@5.8.3/node_modules/@nktkas/hyperliquid/esm/src/api/info/marginTable.js\n init_dirname();\n init_buffer2();\n init_process2();\n var MarginTableRequest = /* @__PURE__ */ (() => {\n return pipe(object({\n /** Type of request. */\n type: pipe(literal(\"marginTable\"), description(\"Type of request.\")),\n /** Margin requirements table. */\n id: pipe(UnsignedInteger, description(\"Margin requirements table.\"))\n }), description(\"Request margin table data.\"));\n })();\n function marginTable(config2, params, signal) {\n const request = parser(MarginTableRequest)({\n type: \"marginTable\",\n ...params\n });\n return config2.transport.request(\"info\", request, signal);\n }\n\n // ../../../node_modules/.pnpm/@nktkas+hyperliquid@0.25.7_typescript@5.8.3/node_modules/@nktkas/hyperliquid/esm/src/api/info/meta.js\n var MetaRequest = /* @__PURE__ */ (() => {\n return pipe(object({\n /** Type of request. */\n type: pipe(literal(\"meta\"), description(\"Type of request.\")),\n /** DEX name (empty string for main dex). */\n dex: pipe(optional(string()), description(\"DEX name (empty string for main dex).\"))\n }), description(\"Request trading metadata.\"));\n })();\n function meta(config2, paramsOrSignal, maybeSignal) {\n const params = paramsOrSignal instanceof AbortSignal ? {} : paramsOrSignal;\n const signal = paramsOrSignal instanceof AbortSignal ? paramsOrSignal : maybeSignal;\n const request = parser(MetaRequest)({\n type: \"meta\",\n ...params\n });\n return config2.transport.request(\"info\", request, signal);\n }\n\n // ../../../node_modules/.pnpm/@nktkas+hyperliquid@0.25.7_typescript@5.8.3/node_modules/@nktkas/hyperliquid/esm/src/api/info/allPerpMetas.js\n var AllPerpMetasRequest = /* @__PURE__ */ (() => {\n return pipe(object({\n /** Type of request. */\n type: pipe(literal(\"allPerpMetas\"), description(\"Type of request.\"))\n }), description(\"Request trading metadata for all DEXes.\"));\n })();\n function allPerpMetas(config2, signal) {\n const request = parser(AllPerpMetasRequest)({\n type: \"allPerpMetas\"\n });\n return config2.transport.request(\"info\", request, signal);\n }\n\n // ../../../node_modules/.pnpm/@nktkas+hyperliquid@0.25.7_typescript@5.8.3/node_modules/@nktkas/hyperliquid/esm/src/api/info/blockDetails.js\n init_dirname();\n init_buffer2();\n init_process2();\n var BlockDetailsRequest = /* @__PURE__ */ (() => {\n return pipe(object({\n /** Type of request. */\n type: pipe(literal(\"blockDetails\"), description(\"Type of request.\")),\n /** Block height. */\n height: pipe(UnsignedInteger, description(\"Block height.\"))\n }), description(\"Request block details by block height.\"));\n })();\n function blockDetails(config2, params, signal) {\n const request = parser(BlockDetailsRequest)({\n type: \"blockDetails\",\n ...params\n });\n return config2.transport.request(\"explorer\", request, signal);\n }\n\n // ../../../node_modules/.pnpm/@nktkas+hyperliquid@0.25.7_typescript@5.8.3/node_modules/@nktkas/hyperliquid/esm/src/api/info/candleSnapshot.js\n init_dirname();\n init_buffer2();\n init_process2();\n var CandleSnapshotRequest = /* @__PURE__ */ (() => {\n return pipe(object({\n /** Type of request. */\n type: pipe(literal(\"candleSnapshot\"), description(\"Type of request.\")),\n /** Request parameters. */\n req: pipe(object({\n /** Asset symbol (e.g., BTC). */\n coin: pipe(string(), description(\"Asset symbol (e.g., BTC).\")),\n /** Time interval. */\n interval: CandleIntervalSchema,\n /** Start time (in ms since epoch). */\n startTime: pipe(UnsignedInteger, description(\"Start time (in ms since epoch).\")),\n /** End time (in ms since epoch). */\n endTime: pipe(nullish(UnsignedInteger), description(\"End time (in ms since epoch).\"))\n }), description(\"Request parameters.\"))\n }), description(\"Request candlestick snapshots.\"));\n })();\n function candleSnapshot(config2, params, signal) {\n const request = parser(CandleSnapshotRequest)({\n type: \"candleSnapshot\",\n req: params\n });\n return config2.transport.request(\"info\", request, signal);\n }\n\n // ../../../node_modules/.pnpm/@nktkas+hyperliquid@0.25.7_typescript@5.8.3/node_modules/@nktkas/hyperliquid/esm/src/api/info/clearinghouseState.js\n init_dirname();\n init_buffer2();\n init_process2();\n var ClearinghouseStateRequest = /* @__PURE__ */ (() => {\n return pipe(object({\n /** Type of request. */\n type: pipe(literal(\"clearinghouseState\"), description(\"Type of request.\")),\n /** User address. */\n user: pipe(Address, description(\"User address.\")),\n /** DEX name (empty string for main dex). */\n dex: pipe(optional(string()), description(\"DEX name (empty string for main dex).\"))\n }), description(\"Request clearinghouse state.\"));\n })();\n function clearinghouseState(config2, params, signal) {\n const request = parser(ClearinghouseStateRequest)({\n type: \"clearinghouseState\",\n ...params\n });\n return config2.transport.request(\"info\", request, signal);\n }\n\n // ../../../node_modules/.pnpm/@nktkas+hyperliquid@0.25.7_typescript@5.8.3/node_modules/@nktkas/hyperliquid/esm/src/api/info/delegations.js\n init_dirname();\n init_buffer2();\n init_process2();\n var DelegationsRequest = /* @__PURE__ */ (() => {\n return pipe(object({\n /** Type of request. */\n type: pipe(literal(\"delegations\"), description(\"Type of request.\")),\n /** User address. */\n user: pipe(Address, description(\"User address.\"))\n }), description(\"Request user staking delegations.\"));\n })();\n function delegations(config2, params, signal) {\n const request = parser(DelegationsRequest)({\n type: \"delegations\",\n ...params\n });\n return config2.transport.request(\"info\", request, signal);\n }\n\n // ../../../node_modules/.pnpm/@nktkas+hyperliquid@0.25.7_typescript@5.8.3/node_modules/@nktkas/hyperliquid/esm/src/api/info/delegatorHistory.js\n init_dirname();\n init_buffer2();\n init_process2();\n var DelegatorHistoryRequest = /* @__PURE__ */ (() => {\n return pipe(object({\n /** Type of request. */\n type: pipe(literal(\"delegatorHistory\"), description(\"Type of request.\")),\n /** User address. */\n user: pipe(Address, description(\"User address.\"))\n }), description(\"Request user staking history.\"));\n })();\n function delegatorHistory(config2, params, signal) {\n const request = parser(DelegatorHistoryRequest)({\n type: \"delegatorHistory\",\n ...params\n });\n return config2.transport.request(\"info\", request, signal);\n }\n\n // ../../../node_modules/.pnpm/@nktkas+hyperliquid@0.25.7_typescript@5.8.3/node_modules/@nktkas/hyperliquid/esm/src/api/info/delegatorRewards.js\n init_dirname();\n init_buffer2();\n init_process2();\n var DelegatorRewardsRequest = /* @__PURE__ */ (() => {\n return pipe(object({\n /** Type of request. */\n type: pipe(literal(\"delegatorRewards\"), description(\"Type of request.\")),\n /** User address. */\n user: pipe(Address, description(\"User address.\"))\n }), description(\"Request user staking rewards.\"));\n })();\n function delegatorRewards(config2, params, signal) {\n const request = parser(DelegatorRewardsRequest)({\n type: \"delegatorRewards\",\n ...params\n });\n return config2.transport.request(\"info\", request, signal);\n }\n\n // ../../../node_modules/.pnpm/@nktkas+hyperliquid@0.25.7_typescript@5.8.3/node_modules/@nktkas/hyperliquid/esm/src/api/info/delegatorSummary.js\n init_dirname();\n init_buffer2();\n init_process2();\n var DelegatorSummaryRequest = /* @__PURE__ */ (() => {\n return pipe(object({\n /** Type of request. */\n type: pipe(literal(\"delegatorSummary\"), description(\"Type of request.\")),\n /** User address. */\n user: pipe(Address, description(\"User address.\"))\n }), description(\"Request user's staking summary.\"));\n })();\n function delegatorSummary(config2, params, signal) {\n const request = parser(DelegatorSummaryRequest)({\n type: \"delegatorSummary\",\n ...params\n });\n return config2.transport.request(\"info\", request, signal);\n }\n\n // ../../../node_modules/.pnpm/@nktkas+hyperliquid@0.25.7_typescript@5.8.3/node_modules/@nktkas/hyperliquid/esm/src/api/info/exchangeStatus.js\n init_dirname();\n init_buffer2();\n init_process2();\n var ExchangeStatusRequest = /* @__PURE__ */ (() => {\n return pipe(object({\n /** Type of request. */\n type: pipe(literal(\"exchangeStatus\"), description(\"Type of request.\"))\n }), description(\"Request exchange system status information.\"));\n })();\n function exchangeStatus(config2, signal) {\n const request = parser(ExchangeStatusRequest)({\n type: \"exchangeStatus\"\n });\n return config2.transport.request(\"info\", request, signal);\n }\n\n // ../../../node_modules/.pnpm/@nktkas+hyperliquid@0.25.7_typescript@5.8.3/node_modules/@nktkas/hyperliquid/esm/src/api/info/extraAgents.js\n init_dirname();\n init_buffer2();\n init_process2();\n var ExtraAgentsRequest = /* @__PURE__ */ (() => {\n return pipe(object({\n /** Type of request. */\n type: pipe(literal(\"extraAgents\"), description(\"Type of request.\")),\n /** User address. */\n user: pipe(Address, description(\"User address.\"))\n }), description(\"Request user extra agents.\"));\n })();\n function extraAgents(config2, params, signal) {\n const request = parser(ExtraAgentsRequest)({\n type: \"extraAgents\",\n ...params\n });\n return config2.transport.request(\"info\", request, signal);\n }\n\n // ../../../node_modules/.pnpm/@nktkas+hyperliquid@0.25.7_typescript@5.8.3/node_modules/@nktkas/hyperliquid/esm/src/api/info/frontendOpenOrders.js\n init_dirname();\n init_buffer2();\n init_process2();\n var FrontendOpenOrdersRequest = /* @__PURE__ */ (() => {\n return pipe(object({\n /** Type of request. */\n type: pipe(literal(\"frontendOpenOrders\"), description(\"Type of request.\")),\n /** User address. */\n user: pipe(Address, description(\"User address.\")),\n /** DEX name (empty string for main dex). */\n dex: pipe(optional(string()), description(\"DEX name (empty string for main dex).\"))\n }), description(\"Request frontend open orders.\"));\n })();\n function frontendOpenOrders(config2, params, signal) {\n const request = parser(FrontendOpenOrdersRequest)({\n type: \"frontendOpenOrders\",\n ...params\n });\n return config2.transport.request(\"info\", request, signal);\n }\n\n // ../../../node_modules/.pnpm/@nktkas+hyperliquid@0.25.7_typescript@5.8.3/node_modules/@nktkas/hyperliquid/esm/src/api/info/fundingHistory.js\n init_dirname();\n init_buffer2();\n init_process2();\n var FundingHistoryRequest = /* @__PURE__ */ (() => {\n return pipe(object({\n /** Type of request. */\n type: pipe(literal(\"fundingHistory\"), description(\"Type of request.\")),\n /** Asset symbol (e.g., BTC). */\n coin: pipe(string(), description(\"Asset symbol (e.g., BTC).\")),\n /** Start time (in ms since epoch). */\n startTime: pipe(UnsignedInteger, description(\"Start time (in ms since epoch).\")),\n /** End time (in ms since epoch). */\n endTime: pipe(nullish(UnsignedInteger), description(\"End time (in ms since epoch).\"))\n }), description(\"Request funding history.\"));\n })();\n function fundingHistory(config2, params, signal) {\n const request = parser(FundingHistoryRequest)({\n type: \"fundingHistory\",\n ...params\n });\n return config2.transport.request(\"info\", request, signal);\n }\n\n // ../../../node_modules/.pnpm/@nktkas+hyperliquid@0.25.7_typescript@5.8.3/node_modules/@nktkas/hyperliquid/esm/src/api/info/gossipRootIps.js\n init_dirname();\n init_buffer2();\n init_process2();\n var GossipRootIpsRequest = /* @__PURE__ */ (() => {\n return pipe(object({\n /** Type of request. */\n type: pipe(literal(\"gossipRootIps\"), description(\"Type of request.\"))\n }), description(\"Request gossip root IPs.\"));\n })();\n function gossipRootIps(config2, signal) {\n const request = parser(GossipRootIpsRequest)({\n type: \"gossipRootIps\"\n });\n return config2.transport.request(\"info\", request, signal);\n }\n\n // ../../../node_modules/.pnpm/@nktkas+hyperliquid@0.25.7_typescript@5.8.3/node_modules/@nktkas/hyperliquid/esm/src/api/info/historicalOrders.js\n init_dirname();\n init_buffer2();\n init_process2();\n var HistoricalOrdersRequest = /* @__PURE__ */ (() => {\n return pipe(object({\n /** Type of request. */\n type: pipe(literal(\"historicalOrders\"), description(\"Type of request.\")),\n /** User address. */\n user: pipe(Address, description(\"User address.\"))\n }), description(\"Request user historical orders.\"));\n })();\n function historicalOrders(config2, params, signal) {\n const request = parser(HistoricalOrdersRequest)({\n type: \"historicalOrders\",\n ...params\n });\n return config2.transport.request(\"info\", request, signal);\n }\n\n // ../../../node_modules/.pnpm/@nktkas+hyperliquid@0.25.7_typescript@5.8.3/node_modules/@nktkas/hyperliquid/esm/src/api/info/isVip.js\n init_dirname();\n init_buffer2();\n init_process2();\n var IsVipRequest = /* @__PURE__ */ (() => {\n return pipe(object({\n /** Type of request. */\n type: pipe(literal(\"isVip\"), description(\"Type of request.\")),\n /** User address. */\n user: pipe(Address, description(\"User address.\"))\n }), description(\"Request to check if a user is a VIP.\"));\n })();\n function isVip(config2, params, signal) {\n const request = parser(IsVipRequest)({\n type: \"isVip\",\n ...params\n });\n return config2.transport.request(\"info\", request, signal);\n }\n\n // ../../../node_modules/.pnpm/@nktkas+hyperliquid@0.25.7_typescript@5.8.3/node_modules/@nktkas/hyperliquid/esm/src/api/info/l2Book.js\n init_dirname();\n init_buffer2();\n init_process2();\n var L2BookRequest = /* @__PURE__ */ (() => {\n return pipe(object({\n /** Type of request. */\n type: pipe(literal(\"l2Book\"), description(\"Type of request.\")),\n /** Asset symbol (e.g., BTC). */\n coin: pipe(string(), description(\"Asset symbol (e.g., BTC).\")),\n /** Number of significant figures. */\n nSigFigs: pipe(nullish(pipe(Integer, union([literal(2), literal(3), literal(4), literal(5)]))), description(\"Number of significant figures.\")),\n /** Mantissa for aggregation (if `nSigFigs` is 5). */\n mantissa: pipe(nullish(pipe(Integer, union([literal(2), literal(5)]))), description(\"Mantissa for aggregation (if `nSigFigs` is 5).\"))\n }), description(\"Request L2 order book.\"));\n })();\n function l2Book(config2, params, signal) {\n const request = parser(L2BookRequest)({\n type: \"l2Book\",\n ...params\n });\n return config2.transport.request(\"info\", request, signal);\n }\n\n // ../../../node_modules/.pnpm/@nktkas+hyperliquid@0.25.7_typescript@5.8.3/node_modules/@nktkas/hyperliquid/esm/src/api/info/leadingVaults.js\n init_dirname();\n init_buffer2();\n init_process2();\n var LeadingVaultsRequest = /* @__PURE__ */ (() => {\n return pipe(object({\n /** Type of request. */\n type: pipe(literal(\"leadingVaults\"), description(\"Type of request.\")),\n /** User address. */\n user: pipe(Address, description(\"User address.\"))\n }), description(\"Request leading vaults for a user.\"));\n })();\n function leadingVaults(config2, params, signal) {\n const request = parser(LeadingVaultsRequest)({\n type: \"leadingVaults\",\n ...params\n });\n return config2.transport.request(\"info\", request, signal);\n }\n\n // ../../../node_modules/.pnpm/@nktkas+hyperliquid@0.25.7_typescript@5.8.3/node_modules/@nktkas/hyperliquid/esm/src/api/info/legalCheck.js\n init_dirname();\n init_buffer2();\n init_process2();\n var LegalCheckRequest = /* @__PURE__ */ (() => {\n return pipe(object({\n /** Type of request. */\n type: pipe(literal(\"legalCheck\"), description(\"Type of request.\")),\n /** User address. */\n user: pipe(Address, description(\"User address.\"))\n }), description(\"Request legal verification status of a user.\"));\n })();\n function legalCheck(config2, params, signal) {\n const request = parser(LegalCheckRequest)({\n type: \"legalCheck\",\n ...params\n });\n return config2.transport.request(\"info\", request, signal);\n }\n\n // ../../../node_modules/.pnpm/@nktkas+hyperliquid@0.25.7_typescript@5.8.3/node_modules/@nktkas/hyperliquid/esm/src/api/info/liquidatable.js\n init_dirname();\n init_buffer2();\n init_process2();\n var LiquidatableRequest = /* @__PURE__ */ (() => {\n return pipe(object({\n /** Type of request. */\n type: pipe(literal(\"liquidatable\"), description(\"Type of request.\"))\n }), description(\"Request liquidatable.\"));\n })();\n function liquidatable(config2, signal) {\n const request = parser(LiquidatableRequest)({\n type: \"liquidatable\"\n });\n return config2.transport.request(\"info\", request, signal);\n }\n\n // ../../../node_modules/.pnpm/@nktkas+hyperliquid@0.25.7_typescript@5.8.3/node_modules/@nktkas/hyperliquid/esm/src/api/info/maxBuilderFee.js\n init_dirname();\n init_buffer2();\n init_process2();\n var MaxBuilderFeeRequest = /* @__PURE__ */ (() => {\n return pipe(object({\n /** Type of request. */\n type: pipe(literal(\"maxBuilderFee\"), description(\"Type of request.\")),\n /** User address. */\n user: pipe(Address, description(\"User address.\")),\n /** Builder address. */\n builder: pipe(Address, description(\"Builder address.\"))\n }), description(\"Request builder fee approval.\"));\n })();\n function maxBuilderFee(config2, params, signal) {\n const request = parser(MaxBuilderFeeRequest)({\n type: \"maxBuilderFee\",\n ...params\n });\n return config2.transport.request(\"info\", request, signal);\n }\n\n // ../../../node_modules/.pnpm/@nktkas+hyperliquid@0.25.7_typescript@5.8.3/node_modules/@nktkas/hyperliquid/esm/src/api/info/maxMarketOrderNtls.js\n init_dirname();\n init_buffer2();\n init_process2();\n var MaxMarketOrderNtlsRequest = /* @__PURE__ */ (() => {\n return pipe(object({\n /** Type of request. */\n type: pipe(literal(\"maxMarketOrderNtls\"), description(\"Type of request.\"))\n }), description(\"Request maximum market order notionals.\"));\n })();\n function maxMarketOrderNtls(config2, signal) {\n const request = parser(MaxMarketOrderNtlsRequest)({\n type: \"maxMarketOrderNtls\"\n });\n return config2.transport.request(\"info\", request, signal);\n }\n\n // ../../../node_modules/.pnpm/@nktkas+hyperliquid@0.25.7_typescript@5.8.3/node_modules/@nktkas/hyperliquid/esm/src/api/info/metaAndAssetCtxs.js\n init_dirname();\n init_buffer2();\n init_process2();\n var MetaAndAssetCtxsRequest = /* @__PURE__ */ (() => {\n return pipe(object({\n /** Type of request. */\n type: pipe(literal(\"metaAndAssetCtxs\"), description(\"Type of request.\")),\n /** DEX name (empty string for main dex). */\n dex: pipe(optional(string()), description(\"DEX name (empty string for main dex).\"))\n }), description(\"Request metadata and asset contexts.\"));\n })();\n function metaAndAssetCtxs(config2, paramsOrSignal, maybeSignal) {\n const params = paramsOrSignal instanceof AbortSignal ? {} : paramsOrSignal;\n const signal = paramsOrSignal instanceof AbortSignal ? paramsOrSignal : maybeSignal;\n const request = parser(MetaAndAssetCtxsRequest)({\n type: \"metaAndAssetCtxs\",\n ...params\n });\n return config2.transport.request(\"info\", request, signal);\n }\n\n // ../../../node_modules/.pnpm/@nktkas+hyperliquid@0.25.7_typescript@5.8.3/node_modules/@nktkas/hyperliquid/esm/src/api/info/openOrders.js\n init_dirname();\n init_buffer2();\n init_process2();\n var OpenOrdersRequest = /* @__PURE__ */ (() => {\n return pipe(object({\n /** Type of request. */\n type: pipe(literal(\"openOrders\"), description(\"Type of request.\")),\n /** User address. */\n user: pipe(Address, description(\"User address.\")),\n /** DEX name (empty string for main dex). */\n dex: pipe(optional(string()), description(\"DEX name (empty string for main dex).\"))\n }), description(\"Request open orders.\"));\n })();\n function openOrders(config2, params, signal) {\n const request = parser(OpenOrdersRequest)({\n type: \"openOrders\",\n ...params\n });\n return config2.transport.request(\"info\", request, signal);\n }\n\n // ../../../node_modules/.pnpm/@nktkas+hyperliquid@0.25.7_typescript@5.8.3/node_modules/@nktkas/hyperliquid/esm/src/api/info/orderStatus.js\n init_dirname();\n init_buffer2();\n init_process2();\n var OrderStatusRequest = /* @__PURE__ */ (() => {\n return pipe(object({\n /** Type of request. */\n type: pipe(literal(\"orderStatus\"), description(\"Type of request.\")),\n /** User address. */\n user: pipe(Address, description(\"User address.\")),\n /** Order ID or Client Order ID. */\n oid: pipe(union([UnsignedInteger, pipe(Hex, length(34))]), description(\"Order ID or Client Order ID.\"))\n }), description(\"Request order status.\"));\n })();\n function orderStatus(config2, params, signal) {\n const request = parser(OrderStatusRequest)({\n type: \"orderStatus\",\n ...params\n });\n return config2.transport.request(\"info\", request, signal);\n }\n\n // ../../../node_modules/.pnpm/@nktkas+hyperliquid@0.25.7_typescript@5.8.3/node_modules/@nktkas/hyperliquid/esm/src/api/info/perpDeployAuctionStatus.js\n init_dirname();\n init_buffer2();\n init_process2();\n var PerpDeployAuctionStatusRequest = /* @__PURE__ */ (() => {\n return pipe(object({\n /** Type of request. */\n type: pipe(literal(\"perpDeployAuctionStatus\"), description(\"Type of request.\"))\n }), description(\"Request for the status of the perpetual deploy auction.\"));\n })();\n function perpDeployAuctionStatus(config2, signal) {\n const request = parser(PerpDeployAuctionStatusRequest)({\n type: \"perpDeployAuctionStatus\"\n });\n return config2.transport.request(\"info\", request, signal);\n }\n\n // ../../../node_modules/.pnpm/@nktkas+hyperliquid@0.25.7_typescript@5.8.3/node_modules/@nktkas/hyperliquid/esm/src/api/info/perpDexLimits.js\n init_dirname();\n init_buffer2();\n init_process2();\n var PerpDexLimitsRequest = /* @__PURE__ */ (() => {\n return pipe(object({\n /** Type of request. */\n type: pipe(literal(\"perpDexLimits\"), description(\"Type of request.\")),\n /** DEX name (empty string for main dex). */\n dex: pipe(string(), description(\"DEX name (empty string for main dex).\"))\n }), description(\"Request builder deployed perpetual market limits.\"));\n })();\n function perpDexLimits(config2, params, signal) {\n const request = parser(PerpDexLimitsRequest)({\n type: \"perpDexLimits\",\n ...params\n });\n return config2.transport.request(\"info\", request, signal);\n }\n\n // ../../../node_modules/.pnpm/@nktkas+hyperliquid@0.25.7_typescript@5.8.3/node_modules/@nktkas/hyperliquid/esm/src/api/info/perpDexs.js\n init_dirname();\n init_buffer2();\n init_process2();\n var PerpDexsRequest = /* @__PURE__ */ (() => {\n return pipe(object({\n /** Type of request. */\n type: pipe(literal(\"perpDexs\"), description(\"Type of request.\"))\n }), description(\"Request all perpetual dexs.\"));\n })();\n function perpDexs(config2, signal) {\n const request = parser(PerpDexsRequest)({\n type: \"perpDexs\"\n });\n return config2.transport.request(\"info\", request, signal);\n }\n\n // ../../../node_modules/.pnpm/@nktkas+hyperliquid@0.25.7_typescript@5.8.3/node_modules/@nktkas/hyperliquid/esm/src/api/info/perpsAtOpenInterestCap.js\n init_dirname();\n init_buffer2();\n init_process2();\n var PerpsAtOpenInterestCapRequest = /* @__PURE__ */ (() => {\n return pipe(object({\n /** Type of request. */\n type: pipe(literal(\"perpsAtOpenInterestCap\"), description(\"Type of request.\")),\n /** DEX name (empty string for main dex). */\n dex: pipe(optional(string()), description(\"DEX name (empty string for main dex).\"))\n }), description(\"Request perpetuals at open interest cap.\"));\n })();\n function perpsAtOpenInterestCap(config2, paramsOrSignal, maybeSignal) {\n const params = paramsOrSignal instanceof AbortSignal ? {} : paramsOrSignal;\n const signal = paramsOrSignal instanceof AbortSignal ? paramsOrSignal : maybeSignal;\n const request = parser(PerpsAtOpenInterestCapRequest)({\n type: \"perpsAtOpenInterestCap\",\n ...params\n });\n return config2.transport.request(\"info\", request, signal);\n }\n\n // ../../../node_modules/.pnpm/@nktkas+hyperliquid@0.25.7_typescript@5.8.3/node_modules/@nktkas/hyperliquid/esm/src/api/info/portfolio.js\n init_dirname();\n init_buffer2();\n init_process2();\n var PortfolioRequest = /* @__PURE__ */ (() => {\n return pipe(object({\n /** Type of request. */\n type: pipe(literal(\"portfolio\"), description(\"Type of request.\")),\n /** User address. */\n user: pipe(Address, description(\"User address.\"))\n }), description(\"Request user portfolio.\"));\n })();\n function portfolio(config2, params, signal) {\n const request = parser(PortfolioRequest)({\n type: \"portfolio\",\n ...params\n });\n return config2.transport.request(\"info\", request, signal);\n }\n\n // ../../../node_modules/.pnpm/@nktkas+hyperliquid@0.25.7_typescript@5.8.3/node_modules/@nktkas/hyperliquid/esm/src/api/info/predictedFundings.js\n init_dirname();\n init_buffer2();\n init_process2();\n var PredictedFundingsRequest = /* @__PURE__ */ (() => {\n return pipe(object({\n /** Type of request. */\n type: pipe(literal(\"predictedFundings\"), description(\"Type of request.\"))\n }), description(\"Request predicted funding rates.\"));\n })();\n function predictedFundings(config2, signal) {\n const request = parser(PredictedFundingsRequest)({\n type: \"predictedFundings\"\n });\n return config2.transport.request(\"info\", request, signal);\n }\n\n // ../../../node_modules/.pnpm/@nktkas+hyperliquid@0.25.7_typescript@5.8.3/node_modules/@nktkas/hyperliquid/esm/src/api/info/preTransferCheck.js\n init_dirname();\n init_buffer2();\n init_process2();\n var PreTransferCheckRequest = /* @__PURE__ */ (() => {\n return pipe(object({\n /** Type of request. */\n type: pipe(literal(\"preTransferCheck\"), description(\"Type of request.\")),\n /** User address. */\n user: pipe(Address, description(\"User address.\")),\n /** Source address. */\n source: pipe(Address, description(\"Source address.\"))\n }), description(\"Request user existence check before transfer.\"));\n })();\n function preTransferCheck(config2, params, signal) {\n const request = parser(PreTransferCheckRequest)({\n type: \"preTransferCheck\",\n ...params\n });\n return config2.transport.request(\"info\", request, signal);\n }\n\n // ../../../node_modules/.pnpm/@nktkas+hyperliquid@0.25.7_typescript@5.8.3/node_modules/@nktkas/hyperliquid/esm/src/api/info/recentTrades.js\n init_dirname();\n init_buffer2();\n init_process2();\n var RecentTradesRequest = /* @__PURE__ */ (() => {\n return pipe(object({\n /** Type of request. */\n type: pipe(literal(\"recentTrades\"), description(\"Type of request.\")),\n /** Asset symbol (e.g., BTC). */\n coin: pipe(string(), description(\"Asset symbol (e.g., BTC).\"))\n }), description(\"Request recent trades.\"));\n })();\n function recentTrades(config2, params, signal) {\n const request = parser(RecentTradesRequest)({\n type: \"recentTrades\",\n ...params\n });\n return config2.transport.request(\"info\", request, signal);\n }\n\n // ../../../node_modules/.pnpm/@nktkas+hyperliquid@0.25.7_typescript@5.8.3/node_modules/@nktkas/hyperliquid/esm/src/api/info/referral.js\n init_dirname();\n init_buffer2();\n init_process2();\n var ReferralRequest = /* @__PURE__ */ (() => {\n return pipe(object({\n /** Type of request. */\n type: pipe(literal(\"referral\"), description(\"Type of request.\")),\n /** User address. */\n user: pipe(Address, description(\"User address.\"))\n }), description(\"Request user referral.\"));\n })();\n function referral(config2, params, signal) {\n const request = parser(ReferralRequest)({\n type: \"referral\",\n ...params\n });\n return config2.transport.request(\"info\", request, signal);\n }\n\n // ../../../node_modules/.pnpm/@nktkas+hyperliquid@0.25.7_typescript@5.8.3/node_modules/@nktkas/hyperliquid/esm/src/api/info/spotClearinghouseState.js\n init_dirname();\n init_buffer2();\n init_process2();\n var SpotClearinghouseStateRequest = /* @__PURE__ */ (() => {\n return pipe(object({\n /** Type of request. */\n type: pipe(literal(\"spotClearinghouseState\"), description(\"Type of request.\")),\n /** User address. */\n user: pipe(Address, description(\"User address.\")),\n /** DEX name (empty string for main dex). */\n dex: pipe(optional(string()), description(\"DEX name (empty string for main dex).\"))\n }), description(\"Request spot clearinghouse state.\"));\n })();\n function spotClearinghouseState(config2, params, signal) {\n const request = parser(SpotClearinghouseStateRequest)({\n type: \"spotClearinghouseState\",\n ...params\n });\n return config2.transport.request(\"info\", request, signal);\n }\n\n // ../../../node_modules/.pnpm/@nktkas+hyperliquid@0.25.7_typescript@5.8.3/node_modules/@nktkas/hyperliquid/esm/src/api/info/spotDeployState.js\n init_dirname();\n init_buffer2();\n init_process2();\n var SpotDeployStateRequest = /* @__PURE__ */ (() => {\n return pipe(object({\n /** Type of request. */\n type: pipe(literal(\"spotDeployState\"), description(\"Type of request.\")),\n /** User address. */\n user: pipe(Address, description(\"User address.\"))\n }), description(\"Request spot deploy state.\"));\n })();\n function spotDeployState(config2, params, signal) {\n const request = parser(SpotDeployStateRequest)({\n type: \"spotDeployState\",\n ...params\n });\n return config2.transport.request(\"info\", request, signal);\n }\n\n // ../../../node_modules/.pnpm/@nktkas+hyperliquid@0.25.7_typescript@5.8.3/node_modules/@nktkas/hyperliquid/esm/src/api/info/spotMeta.js\n init_dirname();\n init_buffer2();\n init_process2();\n var SpotMetaRequest = /* @__PURE__ */ (() => {\n return pipe(object({\n /** Type of request. */\n type: pipe(literal(\"spotMeta\"), description(\"Type of request.\"))\n }), description(\"Request spot trading metadata.\"));\n })();\n function spotMeta(config2, signal) {\n const request = parser(SpotMetaRequest)({\n type: \"spotMeta\"\n });\n return config2.transport.request(\"info\", request, signal);\n }\n\n // ../../../node_modules/.pnpm/@nktkas+hyperliquid@0.25.7_typescript@5.8.3/node_modules/@nktkas/hyperliquid/esm/src/api/info/spotMetaAndAssetCtxs.js\n init_dirname();\n init_buffer2();\n init_process2();\n var SpotMetaAndAssetCtxsRequest = /* @__PURE__ */ (() => {\n return pipe(object({\n /** Type of request. */\n type: pipe(literal(\"spotMetaAndAssetCtxs\"), description(\"Type of request.\"))\n }), description(\"Request spot metadata and asset contexts.\"));\n })();\n function spotMetaAndAssetCtxs(config2, signal) {\n const request = parser(SpotMetaAndAssetCtxsRequest)({\n type: \"spotMetaAndAssetCtxs\"\n });\n return config2.transport.request(\"info\", request, signal);\n }\n\n // ../../../node_modules/.pnpm/@nktkas+hyperliquid@0.25.7_typescript@5.8.3/node_modules/@nktkas/hyperliquid/esm/src/api/info/spotPairDeployAuctionStatus.js\n init_dirname();\n init_buffer2();\n init_process2();\n var SpotPairDeployAuctionStatusRequest = /* @__PURE__ */ (() => {\n return pipe(object({\n /** Type of request. */\n type: pipe(literal(\"spotPairDeployAuctionStatus\"), description(\"Type of request.\"))\n }), description(\"Request for the status of the spot deploy auction.\"));\n })();\n function spotPairDeployAuctionStatus(config2, signal) {\n const request = parser(SpotPairDeployAuctionStatusRequest)({\n type: \"spotPairDeployAuctionStatus\"\n });\n return config2.transport.request(\"info\", request, signal);\n }\n\n // ../../../node_modules/.pnpm/@nktkas+hyperliquid@0.25.7_typescript@5.8.3/node_modules/@nktkas/hyperliquid/esm/src/api/info/subAccounts.js\n init_dirname();\n init_buffer2();\n init_process2();\n var SubAccountsRequest = /* @__PURE__ */ (() => {\n return pipe(object({\n /** Type of request. */\n type: pipe(literal(\"subAccounts\"), description(\"Type of request.\")),\n /** User address. */\n user: pipe(Address, description(\"User address.\"))\n }), description(\"Request user sub-accounts.\"));\n })();\n function subAccounts(config2, params, signal) {\n const request = parser(SubAccountsRequest)({\n type: \"subAccounts\",\n ...params\n });\n return config2.transport.request(\"info\", request, signal);\n }\n\n // ../../../node_modules/.pnpm/@nktkas+hyperliquid@0.25.7_typescript@5.8.3/node_modules/@nktkas/hyperliquid/esm/src/api/info/subAccounts2.js\n init_dirname();\n init_buffer2();\n init_process2();\n var SubAccounts2Request = /* @__PURE__ */ (() => {\n return pipe(object({\n /** Type of request. */\n type: pipe(literal(\"subAccounts2\"), description(\"Type of request.\")),\n /** User address. */\n user: pipe(Address, description(\"User address.\"))\n }), description(\"Request user sub-accounts.\"));\n })();\n function subAccounts2(config2, params, signal) {\n const request = parser(SubAccounts2Request)({\n type: \"subAccounts2\",\n ...params\n });\n return config2.transport.request(\"info\", request, signal);\n }\n\n // ../../../node_modules/.pnpm/@nktkas+hyperliquid@0.25.7_typescript@5.8.3/node_modules/@nktkas/hyperliquid/esm/src/api/info/tokenDetails.js\n init_dirname();\n init_buffer2();\n init_process2();\n var TokenDetailsRequest = /* @__PURE__ */ (() => {\n return pipe(object({\n /** Type of request. */\n type: pipe(literal(\"tokenDetails\"), description(\"Type of request.\")),\n /** Token ID. */\n tokenId: pipe(pipe(Hex, length(34)), description(\"Token ID.\"))\n }), description(\"Request token details.\"));\n })();\n function tokenDetails(config2, params, signal) {\n const request = parser(TokenDetailsRequest)({\n type: \"tokenDetails\",\n ...params\n });\n return config2.transport.request(\"info\", request, signal);\n }\n\n // ../../../node_modules/.pnpm/@nktkas+hyperliquid@0.25.7_typescript@5.8.3/node_modules/@nktkas/hyperliquid/esm/src/api/info/twapHistory.js\n init_dirname();\n init_buffer2();\n init_process2();\n var TwapHistoryRequest = /* @__PURE__ */ (() => {\n return pipe(object({\n /** Type of request. */\n type: pipe(literal(\"twapHistory\"), description(\"Type of request.\")),\n /** User address. */\n user: pipe(Address, description(\"User address.\"))\n }), description(\"Request twap history of a user.\"));\n })();\n function twapHistory(config2, params, signal) {\n const request = parser(TwapHistoryRequest)({\n type: \"twapHistory\",\n ...params\n });\n return config2.transport.request(\"info\", request, signal);\n }\n\n // ../../../node_modules/.pnpm/@nktkas+hyperliquid@0.25.7_typescript@5.8.3/node_modules/@nktkas/hyperliquid/esm/src/api/info/txDetails.js\n init_dirname();\n init_buffer2();\n init_process2();\n var TxDetailsRequest = /* @__PURE__ */ (() => {\n return pipe(object({\n /** Type of request. */\n type: pipe(literal(\"txDetails\"), description(\"Type of request.\")),\n /** Transaction hash. */\n hash: pipe(pipe(Hex, length(66)), description(\"Transaction hash.\"))\n }), description(\"Request transaction details by transaction hash.\"));\n })();\n function txDetails(config2, params, signal) {\n const request = parser(TxDetailsRequest)({\n type: \"txDetails\",\n ...params\n });\n return config2.transport.request(\"explorer\", request, signal);\n }\n\n // ../../../node_modules/.pnpm/@nktkas+hyperliquid@0.25.7_typescript@5.8.3/node_modules/@nktkas/hyperliquid/esm/src/api/info/userDetails.js\n init_dirname();\n init_buffer2();\n init_process2();\n var UserDetailsRequest = /* @__PURE__ */ (() => {\n return pipe(object({\n /** Type of request. */\n type: pipe(literal(\"userDetails\"), description(\"Type of request.\")),\n /** User address. */\n user: pipe(Address, description(\"User address.\"))\n }), description(\"Request array of user transaction details.\"));\n })();\n function userDetails(config2, params, signal) {\n const request = parser(UserDetailsRequest)({\n type: \"userDetails\",\n ...params\n });\n return config2.transport.request(\"explorer\", request, signal);\n }\n\n // ../../../node_modules/.pnpm/@nktkas+hyperliquid@0.25.7_typescript@5.8.3/node_modules/@nktkas/hyperliquid/esm/src/api/info/userDexAbstraction.js\n init_dirname();\n init_buffer2();\n init_process2();\n var UserDexAbstractionInfoRequest = /* @__PURE__ */ (() => {\n return pipe(object({\n /** Type of request. */\n type: pipe(literal(\"userDexAbstraction\"), description(\"Type of request.\")),\n /** User address. */\n user: pipe(Address, description(\"User address.\"))\n }), description(\"Request user referral.\"));\n })();\n function userDexAbstraction2(config2, params, signal) {\n const request = parser(UserDexAbstractionInfoRequest)({\n type: \"userDexAbstraction\",\n ...params\n });\n return config2.transport.request(\"info\", request, signal);\n }\n\n // ../../../node_modules/.pnpm/@nktkas+hyperliquid@0.25.7_typescript@5.8.3/node_modules/@nktkas/hyperliquid/esm/src/api/info/userFees.js\n init_dirname();\n init_buffer2();\n init_process2();\n var UserFeesRequest = /* @__PURE__ */ (() => {\n return pipe(object({\n /** Type of request. */\n type: pipe(literal(\"userFees\"), description(\"Type of request.\")),\n /** User address. */\n user: pipe(Address, description(\"User address.\"))\n }), description(\"Request user fees.\"));\n })();\n function userFees(config2, params, signal) {\n const request = parser(UserFeesRequest)({\n type: \"userFees\",\n ...params\n });\n return config2.transport.request(\"info\", request, signal);\n }\n\n // ../../../node_modules/.pnpm/@nktkas+hyperliquid@0.25.7_typescript@5.8.3/node_modules/@nktkas/hyperliquid/esm/src/api/info/userFills.js\n init_dirname();\n init_buffer2();\n init_process2();\n var UserFillsRequest = /* @__PURE__ */ (() => {\n return pipe(object({\n /** Type of request. */\n type: pipe(literal(\"userFills\"), description(\"Type of request.\")),\n /** User address. */\n user: pipe(Address, description(\"User address.\")),\n /** If true, partial fills are aggregated when a crossing order fills multiple resting orders. */\n aggregateByTime: pipe(optional(boolean()), description(\"If true, partial fills are aggregated when a crossing order fills multiple resting orders.\"))\n }), description(\"Request array of user fills.\"));\n })();\n function userFills(config2, params, signal) {\n const request = parser(UserFillsRequest)({\n type: \"userFills\",\n ...params\n });\n return config2.transport.request(\"info\", request, signal);\n }\n\n // ../../../node_modules/.pnpm/@nktkas+hyperliquid@0.25.7_typescript@5.8.3/node_modules/@nktkas/hyperliquid/esm/src/api/info/userFillsByTime.js\n init_dirname();\n init_buffer2();\n init_process2();\n var UserFillsByTimeRequest = /* @__PURE__ */ (() => {\n return pipe(object({\n /** Type of request. */\n type: pipe(literal(\"userFillsByTime\"), description(\"Type of request.\")),\n /** User address. */\n user: pipe(Address, description(\"User address.\")),\n /** Start time (in ms since epoch). */\n startTime: pipe(UnsignedInteger, description(\"Start time (in ms since epoch).\")),\n /** End time (in ms since epoch). */\n endTime: pipe(nullish(UnsignedInteger), description(\"End time (in ms since epoch).\")),\n /** If true, partial fills are aggregated when a crossing order fills multiple resting orders. */\n aggregateByTime: pipe(optional(boolean()), description(\"If true, partial fills are aggregated when a crossing order fills multiple resting orders.\"))\n }), description(\"Request array of user fills by time.\"));\n })();\n function userFillsByTime(config2, params, signal) {\n const request = parser(UserFillsByTimeRequest)({\n type: \"userFillsByTime\",\n ...params\n });\n return config2.transport.request(\"info\", request, signal);\n }\n\n // ../../../node_modules/.pnpm/@nktkas+hyperliquid@0.25.7_typescript@5.8.3/node_modules/@nktkas/hyperliquid/esm/src/api/info/userFunding.js\n init_dirname();\n init_buffer2();\n init_process2();\n var UserFundingRequest = /* @__PURE__ */ (() => {\n return pipe(object({\n /** Type of request. */\n type: pipe(literal(\"userFunding\"), description(\"Type of request.\")),\n /** User address. */\n user: pipe(Address, description(\"User address.\")),\n /** Start time (in ms since epoch). */\n startTime: pipe(UnsignedInteger, description(\"Start time (in ms since epoch).\")),\n /** End time (in ms since epoch). */\n endTime: pipe(nullish(UnsignedInteger), description(\"End time (in ms since epoch).\"))\n }), description(\"Request array of user funding ledger updates.\"));\n })();\n function userFunding(config2, params, signal) {\n const request = parser(UserFundingRequest)({\n type: \"userFunding\",\n ...params\n });\n return config2.transport.request(\"info\", request, signal);\n }\n\n // ../../../node_modules/.pnpm/@nktkas+hyperliquid@0.25.7_typescript@5.8.3/node_modules/@nktkas/hyperliquid/esm/src/api/info/userNonFundingLedgerUpdates.js\n init_dirname();\n init_buffer2();\n init_process2();\n var UserNonFundingLedgerUpdatesRequest = /* @__PURE__ */ (() => {\n return pipe(object({\n /** Type of request. */\n type: pipe(literal(\"userNonFundingLedgerUpdates\"), description(\"Type of request.\")),\n /** User address. */\n user: pipe(Address, description(\"User address.\")),\n /** Start time (in ms since epoch). */\n startTime: pipe(UnsignedInteger, description(\"Start time (in ms since epoch).\")),\n /** End time (in ms since epoch). */\n endTime: pipe(nullish(UnsignedInteger), description(\"End time (in ms since epoch).\"))\n }), description(\"Request user non-funding ledger updates.\"));\n })();\n function userNonFundingLedgerUpdates(config2, params, signal) {\n const request = parser(UserNonFundingLedgerUpdatesRequest)({\n type: \"userNonFundingLedgerUpdates\",\n ...params\n });\n return config2.transport.request(\"info\", request, signal);\n }\n\n // ../../../node_modules/.pnpm/@nktkas+hyperliquid@0.25.7_typescript@5.8.3/node_modules/@nktkas/hyperliquid/esm/src/api/info/userRateLimit.js\n init_dirname();\n init_buffer2();\n init_process2();\n var UserRateLimitRequest = /* @__PURE__ */ (() => {\n return pipe(object({\n /** Type of request. */\n type: pipe(literal(\"userRateLimit\"), description(\"Type of request.\")),\n /** User address. */\n user: pipe(Address, description(\"User address.\"))\n }), description(\"Request user rate limits.\"));\n })();\n function userRateLimit(config2, params, signal) {\n const request = parser(UserRateLimitRequest)({\n type: \"userRateLimit\",\n ...params\n });\n return config2.transport.request(\"info\", request, signal);\n }\n\n // ../../../node_modules/.pnpm/@nktkas+hyperliquid@0.25.7_typescript@5.8.3/node_modules/@nktkas/hyperliquid/esm/src/api/info/userRole.js\n init_dirname();\n init_buffer2();\n init_process2();\n var UserRoleRequest = /* @__PURE__ */ (() => {\n return pipe(object({\n /** Type of request. */\n type: pipe(literal(\"userRole\"), description(\"Type of request.\")),\n /** User address. */\n user: pipe(Address, description(\"User address.\"))\n }), description(\"Request user role.\"));\n })();\n function userRole(config2, params, signal) {\n const request = parser(UserRoleRequest)({\n type: \"userRole\",\n ...params\n });\n return config2.transport.request(\"info\", request, signal);\n }\n\n // ../../../node_modules/.pnpm/@nktkas+hyperliquid@0.25.7_typescript@5.8.3/node_modules/@nktkas/hyperliquid/esm/src/api/info/userToMultiSigSigners.js\n init_dirname();\n init_buffer2();\n init_process2();\n var UserToMultiSigSignersRequest = /* @__PURE__ */ (() => {\n return pipe(object({\n /** Type of request. */\n type: pipe(literal(\"userToMultiSigSigners\"), description(\"Type of request.\")),\n /** User address. */\n user: pipe(Address, description(\"User address.\"))\n }), description(\"Request multi-sig signers for a user.\"));\n })();\n function userToMultiSigSigners(config2, params, signal) {\n const request = parser(UserToMultiSigSignersRequest)({\n type: \"userToMultiSigSigners\",\n ...params\n });\n return config2.transport.request(\"info\", request, signal);\n }\n\n // ../../../node_modules/.pnpm/@nktkas+hyperliquid@0.25.7_typescript@5.8.3/node_modules/@nktkas/hyperliquid/esm/src/api/info/userTwapSliceFills.js\n init_dirname();\n init_buffer2();\n init_process2();\n var UserTwapSliceFillsRequest = /* @__PURE__ */ (() => {\n return pipe(object({\n /** Type of request. */\n type: pipe(literal(\"userTwapSliceFills\"), description(\"Type of request.\")),\n /** User address. */\n user: pipe(Address, description(\"User address.\"))\n }), description(\"Request user TWAP slice fills.\"));\n })();\n function userTwapSliceFills(config2, params, signal) {\n const request = parser(UserTwapSliceFillsRequest)({\n type: \"userTwapSliceFills\",\n ...params\n });\n return config2.transport.request(\"info\", request, signal);\n }\n\n // ../../../node_modules/.pnpm/@nktkas+hyperliquid@0.25.7_typescript@5.8.3/node_modules/@nktkas/hyperliquid/esm/src/api/info/userTwapSliceFillsByTime.js\n init_dirname();\n init_buffer2();\n init_process2();\n var UserTwapSliceFillsByTimeRequest = /* @__PURE__ */ (() => {\n return pipe(object({\n /** Type of request. */\n type: pipe(literal(\"userTwapSliceFillsByTime\"), description(\"Type of request.\")),\n /** User address. */\n user: pipe(Address, description(\"User address.\")),\n /** Start time (in ms since epoch). */\n startTime: pipe(UnsignedInteger, description(\"Start time (in ms since epoch).\")),\n /** End time (in ms since epoch). */\n endTime: pipe(nullish(UnsignedInteger), description(\"End time (in ms since epoch).\")),\n /** If true, partial fills are aggregated when a crossing order fills multiple resting orders. */\n aggregateByTime: pipe(optional(boolean()), description(\"If true, partial fills are aggregated when a crossing order fills multiple resting orders.\"))\n }), description(\"Request user TWAP slice fills by time.\"));\n })();\n function userTwapSliceFillsByTime(config2, params, signal) {\n const request = parser(UserTwapSliceFillsByTimeRequest)({\n type: \"userTwapSliceFillsByTime\",\n ...params\n });\n return config2.transport.request(\"info\", request, signal);\n }\n\n // ../../../node_modules/.pnpm/@nktkas+hyperliquid@0.25.7_typescript@5.8.3/node_modules/@nktkas/hyperliquid/esm/src/api/info/userVaultEquities.js\n init_dirname();\n init_buffer2();\n init_process2();\n var UserVaultEquitiesRequest = /* @__PURE__ */ (() => {\n return pipe(object({\n /** Type of request. */\n type: pipe(literal(\"userVaultEquities\"), description(\"Type of request.\")),\n /** User address. */\n user: pipe(Address, description(\"User address.\"))\n }), description(\"Request user vault deposits.\"));\n })();\n function userVaultEquities(config2, params, signal) {\n const request = parser(UserVaultEquitiesRequest)({\n type: \"userVaultEquities\",\n ...params\n });\n return config2.transport.request(\"info\", request, signal);\n }\n\n // ../../../node_modules/.pnpm/@nktkas+hyperliquid@0.25.7_typescript@5.8.3/node_modules/@nktkas/hyperliquid/esm/src/api/info/validatorL1Votes.js\n init_dirname();\n init_buffer2();\n init_process2();\n var ValidatorL1VotesRequest = /* @__PURE__ */ (() => {\n return pipe(object({\n /** Type of request. */\n type: pipe(literal(\"validatorL1Votes\"), description(\"Type of request.\"))\n }), description(\"Request validator L1 votes.\"));\n })();\n function validatorL1Votes(config2, signal) {\n const request = parser(ValidatorL1VotesRequest)({\n type: \"validatorL1Votes\"\n });\n return config2.transport.request(\"info\", request, signal);\n }\n\n // ../../../node_modules/.pnpm/@nktkas+hyperliquid@0.25.7_typescript@5.8.3/node_modules/@nktkas/hyperliquid/esm/src/api/info/validatorSummaries.js\n init_dirname();\n init_buffer2();\n init_process2();\n var ValidatorSummariesRequest = /* @__PURE__ */ (() => {\n return pipe(object({\n /** Type of request. */\n type: pipe(literal(\"validatorSummaries\"), description(\"Type of request.\"))\n }), description(\"Request validator summaries.\"));\n })();\n function validatorSummaries(config2, signal) {\n const request = parser(ValidatorSummariesRequest)({\n type: \"validatorSummaries\"\n });\n return config2.transport.request(\"info\", request, signal);\n }\n\n // ../../../node_modules/.pnpm/@nktkas+hyperliquid@0.25.7_typescript@5.8.3/node_modules/@nktkas/hyperliquid/esm/src/api/info/vaultDetails.js\n init_dirname();\n init_buffer2();\n init_process2();\n var VaultDetailsRequest = /* @__PURE__ */ (() => {\n return pipe(object({\n /** Type of request. */\n type: pipe(literal(\"vaultDetails\"), description(\"Type of request.\")),\n /** Vault address. */\n vaultAddress: pipe(Address, description(\"Vault address.\")),\n /** User address. */\n user: pipe(nullish(Address), description(\"User address.\"))\n }), description(\"Request details of a vault.\"));\n })();\n function vaultDetails(config2, params, signal) {\n const request = parser(VaultDetailsRequest)({\n type: \"vaultDetails\",\n ...params\n });\n return config2.transport.request(\"info\", request, signal);\n }\n\n // ../../../node_modules/.pnpm/@nktkas+hyperliquid@0.25.7_typescript@5.8.3/node_modules/@nktkas/hyperliquid/esm/src/api/info/vaultSummaries.js\n init_dirname();\n init_buffer2();\n init_process2();\n var VaultSummariesRequest = /* @__PURE__ */ (() => {\n return pipe(object({\n /** Type of request. */\n type: pipe(literal(\"vaultSummaries\"), description(\"Type of request.\"))\n }), description(\"Request a list of vaults less than 2 hours old.\"));\n })();\n function vaultSummaries(config2, signal) {\n const request = parser(VaultSummariesRequest)({\n type: \"vaultSummaries\"\n });\n return config2.transport.request(\"info\", request, signal);\n }\n\n // ../../../node_modules/.pnpm/@nktkas+hyperliquid@0.25.7_typescript@5.8.3/node_modules/@nktkas/hyperliquid/esm/src/api/info/webData2.js\n init_dirname();\n init_buffer2();\n init_process2();\n\n // ../../../node_modules/.pnpm/@nktkas+hyperliquid@0.25.7_typescript@5.8.3/node_modules/@nktkas/hyperliquid/esm/src/api/subscription/webData2.js\n init_dirname();\n init_buffer2();\n init_process2();\n\n // ../../../node_modules/.pnpm/@nktkas+hyperliquid@0.25.7_typescript@5.8.3/node_modules/@nktkas/hyperliquid/esm/src/api/info/webData2.js\n var WebData2Request = /* @__PURE__ */ (() => {\n return pipe(object({\n /** Type of request. */\n type: pipe(literal(\"webData2\"), description(\"Type of request.\")),\n /** User address. */\n user: pipe(Address, description(\"User address.\"))\n }), description(\"Request comprehensive user and market data.\"));\n })();\n function webData2(config2, params, signal) {\n const request = parser(WebData2Request)({\n type: \"webData2\",\n ...params\n });\n return config2.transport.request(\"info\", request, signal);\n }\n\n // ../../../node_modules/.pnpm/@nktkas+hyperliquid@0.25.7_typescript@5.8.3/node_modules/@nktkas/hyperliquid/esm/src/api/info/~client.js\n var InfoClient = class {\n transport;\n /**\n * Initialises a new instance.\n * @param args - The arguments for initialisation.\n *\n * @example\n * ```ts\n * import * as hl from \"@nktkas/hyperliquid\";\n *\n * const transport = new hl.HttpTransport();\n * const infoClient = new hl.InfoClient({ transport });\n * ```\n */\n constructor(args) {\n this.transport = args.transport;\n }\n /**\n * Request user active asset data.\n * @param params - Parameters specific to the API request.\n * @param signal - An [`AbortSignal`](https://developer.mozilla.org/en-US/docs/Web/API/AbortSignal) can be used to cancel the request by calling [`abort()`](https://developer.mozilla.org/en-US/docs/Web/API/AbortController/abort) on the corresponding [`AbortController`](https://developer.mozilla.org/en-US/docs/Web/API/AbortController).\n * @returns User active asset data.\n *\n * @throws {TransportError} When the transport layer throws an error.\n *\n * @see https://hyperliquid.gitbook.io/hyperliquid-docs/for-developers/api/info-endpoint/perpetuals#retrieve-users-active-asset-data\n * @example\n * ```ts\n * import * as hl from \"@nktkas/hyperliquid\";\n *\n * const transport = new hl.HttpTransport(); // or `WebSocketTransport`\n *\n * const client = new hl.InfoClient({ transport });\n * const data = await client.activeAssetData({ user: \"0x...\", coin: \"ETH\" });\n * ```\n */\n activeAssetData(...args) {\n return activeAssetData(this, ...args);\n }\n /**\n * Request supply, rate, and pending payment information for an aligned quote token.\n * @param params - Parameters specific to the API request.\n * @param signal - An [`AbortSignal`](https://developer.mozilla.org/en-US/docs/Web/API/AbortSignal) can be used to cancel the request by calling [`abort()`](https://developer.mozilla.org/en-US/docs/Web/API/AbortController/abort) on the corresponding [`AbortController`](https://developer.mozilla.org/en-US/docs/Web/API/AbortController).\n * @returns Supply, rate, and pending payment information for an aligned quote token.\n *\n * @throws {TransportError} When the transport layer throws an error.\n *\n * @see null\n * @example\n * ```ts\n * import * as hl from \"@nktkas/hyperliquid\";\n *\n * const transport = new hl.HttpTransport(); // or `WebSocketTransport`\n *\n * const client = new hl.InfoClient({ transport });\n * const data = await client.alignedQuoteTokenInfo({ token: 1328 });\n * ```\n */\n alignedQuoteTokenInfo(...args) {\n return alignedQuoteTokenInfo(this, ...args);\n }\n /**\n * Request mid coin prices.\n * @param params - Parameters specific to the API request.\n * @param signal - An [`AbortSignal`](https://developer.mozilla.org/en-US/docs/Web/API/AbortSignal) can be used to cancel the request by calling [`abort()`](https://developer.mozilla.org/en-US/docs/Web/API/AbortController/abort) on the corresponding [`AbortController`](https://developer.mozilla.org/en-US/docs/Web/API/AbortController).\n * @returns Mapping of coin symbols to mid prices.\n *\n * @throws {TransportError} When the transport layer throws an error.\n *\n * @see https://hyperliquid.gitbook.io/hyperliquid-docs/for-developers/api/info-endpoint#retrieve-mids-for-all-coins\n * @example\n * ```ts\n * import * as hl from \"@nktkas/hyperliquid\";\n *\n * const transport = new hl.HttpTransport(); // or `WebSocketTransport`\n *\n * const client = new hl.InfoClient({ transport });\n * const data = await client.allMids();\n * ```\n */\n allMids(...args) {\n return allMids(\n this,\n ...args\n );\n }\n /**\n * Request trading metadata for all DEXes.\n * @param signal - An [`AbortSignal`](https://developer.mozilla.org/en-US/docs/Web/API/AbortSignal) can be used to cancel the request by calling [`abort()`](https://developer.mozilla.org/en-US/docs/Web/API/AbortController/abort) on the corresponding [`AbortController`](https://developer.mozilla.org/en-US/docs/Web/API/AbortController).\n * @returns Metadata for perpetual assets across all DEXes.\n *\n * @throws {TransportError} When the transport layer throws an error.\n *\n * @see null\n * @example\n * ```ts\n * import * as hl from \"@nktkas/hyperliquid\";\n *\n * const transport = new hl.HttpTransport(); // or `WebSocketTransport`\n *\n * const client = new hl.InfoClient({ transport });\n * const data = await client.allPerpMetas();\n * ```\n */\n allPerpMetas() {\n return allPerpMetas(this);\n }\n /**\n * Request block details by block height.\n * @param params - Parameters specific to the API request.\n * @param signal - An [`AbortSignal`](https://developer.mozilla.org/en-US/docs/Web/API/AbortSignal) can be used to cancel the request by calling [`abort()`](https://developer.mozilla.org/en-US/docs/Web/API/AbortController/abort) on the corresponding [`AbortController`](https://developer.mozilla.org/en-US/docs/Web/API/AbortController).\n * @returns Response containing block information.\n *\n * @throws {TransportError} When the transport layer throws an error.\n *\n * @see null\n * @example\n * ```ts\n * import * as hl from \"@nktkas/hyperliquid\";\n *\n * const transport = new hl.HttpTransport(); // only `HttpTransport` supports this API\n *\n * const client = new hl.InfoClient({ transport });\n * const data = await client.blockDetails({ height: 123 });\n * ```\n */\n blockDetails(...args) {\n return blockDetails(this, ...args);\n }\n /**\n * Request candlestick snapshots.\n * @param params - Parameters specific to the API request.\n * @param signal - An [`AbortSignal`](https://developer.mozilla.org/en-US/docs/Web/API/AbortSignal) can be used to cancel the request by calling [`abort()`](https://developer.mozilla.org/en-US/docs/Web/API/AbortController/abort) on the corresponding [`AbortController`](https://developer.mozilla.org/en-US/docs/Web/API/AbortController).\n * @returns Array of candlestick data points.\n *\n * @throws {TransportError} When the transport layer throws an error.\n *\n * @see https://hyperliquid.gitbook.io/hyperliquid-docs/for-developers/api/info-endpoint#candle-snapshot\n * @example\n * ```ts\n * import * as hl from \"@nktkas/hyperliquid\";\n *\n * const transport = new hl.HttpTransport(); // or `WebSocketTransport`\n *\n * const client = new hl.InfoClient({ transport });\n * const data = await client.candleSnapshot({\n * coin: \"ETH\",\n * interval: \"1h\",\n * startTime: Date.now() - 1000 * 60 * 60 * 24,\n * });\n * ```\n */\n candleSnapshot(...args) {\n return candleSnapshot(this, ...args);\n }\n /**\n * Request clearinghouse state.\n * @param params - Parameters specific to the API request.\n * @param signal - An [`AbortSignal`](https://developer.mozilla.org/en-US/docs/Web/API/AbortSignal) can be used to cancel the request by calling [`abort()`](https://developer.mozilla.org/en-US/docs/Web/API/AbortController/abort) on the corresponding [`AbortController`](https://developer.mozilla.org/en-US/docs/Web/API/AbortController).\n * @returns Account summary for perpetual trading.\n *\n * @throws {TransportError} When the transport layer throws an error.\n *\n * @see https://hyperliquid.gitbook.io/hyperliquid-docs/for-developers/api/info-endpoint/perpetuals#retrieve-users-perpetuals-account-summary\n * @example\n * ```ts\n * import * as hl from \"@nktkas/hyperliquid\";\n *\n * const transport = new hl.HttpTransport(); // or `WebSocketTransport`\n *\n * const client = new hl.InfoClient({ transport });\n * const data = await client.clearinghouseState({ user: \"0x...\" });\n * ```\n */\n clearinghouseState(...args) {\n return clearinghouseState(this, ...args);\n }\n /**\n * Request user staking delegations.\n * @param params - Parameters specific to the API request.\n * @param signal - An [`AbortSignal`](https://developer.mozilla.org/en-US/docs/Web/API/AbortSignal) can be used to cancel the request by calling [`abort()`](https://developer.mozilla.org/en-US/docs/Web/API/AbortController/abort) on the corresponding [`AbortController`](https://developer.mozilla.org/en-US/docs/Web/API/AbortController).\n * @returns Array of user's delegations to validators.\n *\n * @throws {TransportError} When the transport layer throws an error.\n *\n * @see https://hyperliquid.gitbook.io/hyperliquid-docs/for-developers/api/info-endpoint#query-a-users-staking-delegations\n * @example\n * ```ts\n * import * as hl from \"@nktkas/hyperliquid\";\n *\n * const transport = new hl.HttpTransport(); // or `WebSocketTransport`\n *\n * const client = new hl.InfoClient({ transport });\n * const data = await client.delegations({ user: \"0x...\" });\n * ```\n */\n delegations(...args) {\n return delegations(this, ...args);\n }\n /**\n * Request user staking history.\n * @param params - Parameters specific to the API request.\n * @param signal - An [`AbortSignal`](https://developer.mozilla.org/en-US/docs/Web/API/AbortSignal) can be used to cancel the request by calling [`abort()`](https://developer.mozilla.org/en-US/docs/Web/API/AbortController/abort) on the corresponding [`AbortController`](https://developer.mozilla.org/en-US/docs/Web/API/AbortController).\n * @returns Array of records of staking events by a delegator.\n *\n * @throws {TransportError} When the transport layer throws an error.\n *\n * @see https://hyperliquid.gitbook.io/hyperliquid-docs/for-developers/api/info-endpoint#query-a-users-staking-history\n * @example\n * ```ts\n * import * as hl from \"@nktkas/hyperliquid\";\n *\n * const transport = new hl.HttpTransport(); // or `WebSocketTransport`\n *\n * const client = new hl.InfoClient({ transport });\n * const data = await client.delegatorHistory({ user: \"0x...\" });\n * ```\n */\n delegatorHistory(...args) {\n return delegatorHistory(this, ...args);\n }\n /**\n * Request user staking rewards.\n * @param params - Parameters specific to the API request.\n * @param signal - An [`AbortSignal`](https://developer.mozilla.org/en-US/docs/Web/API/AbortSignal) can be used to cancel the request by calling [`abort()`](https://developer.mozilla.org/en-US/docs/Web/API/AbortController/abort) on the corresponding [`AbortController`](https://developer.mozilla.org/en-US/docs/Web/API/AbortController).\n * @returns Array of rewards received from staking activities.\n *\n * @throws {TransportError} When the transport layer throws an error.\n *\n * @see https://hyperliquid.gitbook.io/hyperliquid-docs/for-developers/api/info-endpoint#query-a-users-staking-rewards\n * @example\n * ```ts\n * import * as hl from \"@nktkas/hyperliquid\";\n *\n * const transport = new hl.HttpTransport(); // or `WebSocketTransport`\n *\n * const client = new hl.InfoClient({ transport });\n * const data = await client.delegatorRewards({ user: \"0x...\" });\n * ```\n */\n delegatorRewards(...args) {\n return delegatorRewards(this, ...args);\n }\n /**\n * Request user's staking summary.\n * @param params - Parameters specific to the API request.\n * @param signal - An [`AbortSignal`](https://developer.mozilla.org/en-US/docs/Web/API/AbortSignal) can be used to cancel the request by calling [`abort()`](https://developer.mozilla.org/en-US/docs/Web/API/AbortController/abort) on the corresponding [`AbortController`](https://developer.mozilla.org/en-US/docs/Web/API/AbortController).\n * @returns User's staking summary.\n *\n * @throws {TransportError} When the transport layer throws an error.\n *\n * @see https://hyperliquid.gitbook.io/hyperliquid-docs/for-developers/api/info-endpoint#query-a-users-staking-summary\n * @example\n * ```ts\n * import * as hl from \"@nktkas/hyperliquid\";\n *\n * const transport = new hl.HttpTransport(); // or `WebSocketTransport`\n *\n * const client = new hl.InfoClient({ transport });\n * const data = await client.delegatorSummary({ user: \"0x...\" });\n * ```\n */\n delegatorSummary(...args) {\n return delegatorSummary(this, ...args);\n }\n /**\n * Request exchange system status information.\n * @param signal - An [`AbortSignal`](https://developer.mozilla.org/en-US/docs/Web/API/AbortSignal) can be used to cancel the request by calling [`abort()`](https://developer.mozilla.org/en-US/docs/Web/API/AbortController/abort) on the corresponding [`AbortController`](https://developer.mozilla.org/en-US/docs/Web/API/AbortController).\n * @returns Exchange system status information.\n *\n * @throws {TransportError} When the transport layer throws an error.\n *\n * @see null\n * @example\n * ```ts\n * import * as hl from \"@nktkas/hyperliquid\";\n *\n * const transport = new hl.HttpTransport(); // or `WebSocketTransport`\n *\n * const client = new hl.InfoClient({ transport });\n * const data = await client.exchangeStatus();\n * ```\n */\n exchangeStatus(...args) {\n return exchangeStatus(this, ...args);\n }\n /**\n * Request user extra agents.\n * @param params - Parameters specific to the API request.\n * @param signal - An [`AbortSignal`](https://developer.mozilla.org/en-US/docs/Web/API/AbortSignal) can be used to cancel the request by calling [`abort()`](https://developer.mozilla.org/en-US/docs/Web/API/AbortController/abort) on the corresponding [`AbortController`](https://developer.mozilla.org/en-US/docs/Web/API/AbortController).\n * @returns Array of extra agent details for a user.\n *\n * @throws {TransportError} When the transport layer throws an error.\n *\n * @see null\n * @example\n * ```ts\n * import * as hl from \"@nktkas/hyperliquid\";\n *\n * const transport = new hl.HttpTransport(); // or `WebSocketTransport`\n *\n * const client = new hl.InfoClient({ transport });\n * const data = await client.extraAgents({ user: \"0x...\" });\n * ```\n */\n extraAgents(...args) {\n return extraAgents(this, ...args);\n }\n /**\n * Request frontend open orders.\n * @param params - Parameters specific to the API request.\n * @param signal - An [`AbortSignal`](https://developer.mozilla.org/en-US/docs/Web/API/AbortSignal) can be used to cancel the request by calling [`abort()`](https://developer.mozilla.org/en-US/docs/Web/API/AbortController/abort) on the corresponding [`AbortController`](https://developer.mozilla.org/en-US/docs/Web/API/AbortController).\n * @returns Array of open orders with additional display information.\n *\n * @throws {TransportError} When the transport layer throws an error.\n *\n * @see https://hyperliquid.gitbook.io/hyperliquid-docs/for-developers/api/info-endpoint#retrieve-a-users-open-orders-with-additional-frontend-info\n * @example\n * ```ts\n * import * as hl from \"@nktkas/hyperliquid\";\n *\n * const transport = new hl.HttpTransport(); // or `WebSocketTransport`\n *\n * const client = new hl.InfoClient({ transport });\n * const data = await client.frontendOpenOrders({ user: \"0x...\" });\n * ```\n */\n frontendOpenOrders(...args) {\n return frontendOpenOrders(this, ...args);\n }\n /**\n * Request funding history.\n * @param params - Parameters specific to the API request.\n * @param signal - An [`AbortSignal`](https://developer.mozilla.org/en-US/docs/Web/API/AbortSignal) can be used to cancel the request by calling [`abort()`](https://developer.mozilla.org/en-US/docs/Web/API/AbortController/abort) on the corresponding [`AbortController`](https://developer.mozilla.org/en-US/docs/Web/API/AbortController).\n * @returns Array of historical funding rate records for an asset.\n *\n * @throws {TransportError} When the transport layer throws an error.\n *\n * @see https://hyperliquid.gitbook.io/hyperliquid-docs/for-developers/api/info-endpoint/perpetuals#retrieve-historical-funding-rates\n * @example\n * ```ts\n * import * as hl from \"@nktkas/hyperliquid\";\n *\n * const transport = new hl.HttpTransport(); // or `WebSocketTransport`\n *\n * const client = new hl.InfoClient({ transport });\n * const data = await client.fundingHistory({\n * coin: \"ETH\",\n * startTime: Date.now() - 1000 * 60 * 60 * 24,\n * });\n * ```\n */\n fundingHistory(...args) {\n return fundingHistory(this, ...args);\n }\n /**\n * Request gossip root IPs.\n * @param signal - An [`AbortSignal`](https://developer.mozilla.org/en-US/docs/Web/API/AbortSignal) can be used to cancel the request by calling [`abort()`](https://developer.mozilla.org/en-US/docs/Web/API/AbortController/abort) on the corresponding [`AbortController`](https://developer.mozilla.org/en-US/docs/Web/API/AbortController).\n * @returns Array of gossip root IPs.\n *\n * @throws {TransportError} When the transport layer throws an error.\n *\n * @see null\n * @example\n * ```ts\n * import * as hl from \"@nktkas/hyperliquid\";\n *\n * const transport = new hl.HttpTransport(); // or `WebSocketTransport`\n *\n * const client = new hl.InfoClient({ transport });\n * const data = await client.gossipRootIps();\n * ```\n */\n gossipRootIps(...args) {\n return gossipRootIps(this, ...args);\n }\n /**\n * Request user historical orders.\n * @param params - Parameters specific to the API request.\n * @param signal - An [`AbortSignal`](https://developer.mozilla.org/en-US/docs/Web/API/AbortSignal) can be used to cancel the request by calling [`abort()`](https://developer.mozilla.org/en-US/docs/Web/API/AbortController/abort) on the corresponding [`AbortController`](https://developer.mozilla.org/en-US/docs/Web/API/AbortController).\n * @returns Array of frontend orders with current processing status.\n *\n * @throws {TransportError} When the transport layer throws an error.\n *\n * @see https://hyperliquid.gitbook.io/hyperliquid-docs/for-developers/api/info-endpoint#retrieve-a-users-historical-orders\n * @example\n * ```ts\n * import * as hl from \"@nktkas/hyperliquid\";\n *\n * const transport = new hl.HttpTransport(); // or `WebSocketTransport`\n *\n * const client = new hl.InfoClient({ transport });\n * const data = await client.historicalOrders({ user: \"0x...\" });\n * ```\n */\n historicalOrders(...args) {\n return historicalOrders(this, ...args);\n }\n /**\n * Request to check if a user is a VIP.\n * @param params - Parameters specific to the API request.\n * @param signal - An [`AbortSignal`](https://developer.mozilla.org/en-US/docs/Web/API/AbortSignal) can be used to cancel the request by calling [`abort()`](https://developer.mozilla.org/en-US/docs/Web/API/AbortController/abort) on the corresponding [`AbortController`](https://developer.mozilla.org/en-US/docs/Web/API/AbortController).\n * @returns Boolean indicating user's VIP status.\n *\n * @throws {TransportError} When the transport layer throws an error.\n *\n * @see null\n * @example\n * ```ts\n * import * as hl from \"@nktkas/hyperliquid\";\n *\n * const transport = new hl.HttpTransport(); // or `WebSocketTransport`\n *\n * const client = new hl.InfoClient({ transport });\n * const data = await client.isVip({ user: \"0x...\" });\n * ```\n */\n isVip(...args) {\n return isVip(this, ...args);\n }\n /**\n * Request L2 order book.\n * @param params - Parameters specific to the API request.\n * @param signal - An [`AbortSignal`](https://developer.mozilla.org/en-US/docs/Web/API/AbortSignal) can be used to cancel the request by calling [`abort()`](https://developer.mozilla.org/en-US/docs/Web/API/AbortController/abort) on the corresponding [`AbortController`](https://developer.mozilla.org/en-US/docs/Web/API/AbortController).\n * @returns L2 order book snapshot.\n *\n * @throws {TransportError} When the transport layer throws an error.\n *\n * @see https://hyperliquid.gitbook.io/hyperliquid-docs/for-developers/api/info-endpoint#l2-book-snapshot\n * @example\n * ```ts\n * import * as hl from \"@nktkas/hyperliquid\";\n *\n * const transport = new hl.HttpTransport(); // or `WebSocketTransport`\n *\n * const client = new hl.InfoClient({ transport });\n * const data = await client.l2Book({ coin: \"ETH\", nSigFigs: 2 });\n * ```\n */\n l2Book(...args) {\n return l2Book(this, ...args);\n }\n /**\n * Request leading vaults for a user.\n * @param params - Parameters specific to the API request.\n * @param signal - An [`AbortSignal`](https://developer.mozilla.org/en-US/docs/Web/API/AbortSignal) can be used to cancel the request by calling [`abort()`](https://developer.mozilla.org/en-US/docs/Web/API/AbortController/abort) on the corresponding [`AbortController`](https://developer.mozilla.org/en-US/docs/Web/API/AbortController).\n * @returns Array of leading vaults for a user.\n *\n * @throws {TransportError} When the transport layer throws an error.\n *\n * @see null\n * @example\n * ```ts\n * import * as hl from \"@nktkas/hyperliquid\";\n *\n * const transport = new hl.HttpTransport(); // or `WebSocketTransport`\n *\n * const client = new hl.InfoClient({ transport });\n * const data = await client.leadingVaults({ user: \"0x...\" });\n * ```\n */\n leadingVaults(...args) {\n return leadingVaults(this, ...args);\n }\n /**\n * Request legal verification status of a user.\n * @param params - Parameters specific to the API request.\n * @param signal - An [`AbortSignal`](https://developer.mozilla.org/en-US/docs/Web/API/AbortSignal) can be used to cancel the request by calling [`abort()`](https://developer.mozilla.org/en-US/docs/Web/API/AbortController/abort) on the corresponding [`AbortController`](https://developer.mozilla.org/en-US/docs/Web/API/AbortController).\n * @returns Legal verification status for a user.\n *\n * @throws {TransportError} When the transport layer throws an error.\n *\n * @see null\n * @example\n * ```ts\n * import * as hl from \"@nktkas/hyperliquid\";\n *\n * const transport = new hl.HttpTransport(); // or `WebSocketTransport`\n *\n * const client = new hl.InfoClient({ transport });\n * const data = await client.legalCheck({ user: \"0x...\" });\n * ```\n */\n legalCheck(...args) {\n return legalCheck(this, ...args);\n }\n /**\n * Request liquidatable.\n * @param signal - An [`AbortSignal`](https://developer.mozilla.org/en-US/docs/Web/API/AbortSignal) can be used to cancel the request by calling [`abort()`](https://developer.mozilla.org/en-US/docs/Web/API/AbortController/abort) on the corresponding [`AbortController`](https://developer.mozilla.org/en-US/docs/Web/API/AbortController).\n * @returns\n *\n * @throws {TransportError} When the transport layer throws an error.\n *\n * @see null\n * @example\n * ```ts\n * import * as hl from \"@nktkas/hyperliquid\";\n *\n * const transport = new hl.HttpTransport(); // or `WebSocketTransport`\n *\n * const client = new hl.InfoClient({ transport });\n * const data = await client.liquidatable();\n * ```\n */\n liquidatable(...args) {\n return liquidatable(this, ...args);\n }\n /**\n * Request margin table data.\n * @param params - Parameters specific to the API request.\n * @param signal - An [`AbortSignal`](https://developer.mozilla.org/en-US/docs/Web/API/AbortSignal) can be used to cancel the request by calling [`abort()`](https://developer.mozilla.org/en-US/docs/Web/API/AbortController/abort) on the corresponding [`AbortController`](https://developer.mozilla.org/en-US/docs/Web/API/AbortController).\n * @returns Margin requirements table with multiple tiers.\n *\n * @throws {TransportError} When the transport layer throws an error.\n *\n * @see null\n * @example\n * ```ts\n * import * as hl from \"@nktkas/hyperliquid\";\n *\n * const transport = new hl.HttpTransport(); // or `WebSocketTransport`\n *\n * const client = new hl.InfoClient({ transport });\n * const data = await client.marginTable({ id: 1 });\n * ```\n */\n marginTable(...args) {\n return marginTable(this, ...args);\n }\n /**\n * Request builder fee approval.\n * @param params - Parameters specific to the API request.\n * @param signal - An [`AbortSignal`](https://developer.mozilla.org/en-US/docs/Web/API/AbortSignal) can be used to cancel the request by calling [`abort()`](https://developer.mozilla.org/en-US/docs/Web/API/AbortController/abort) on the corresponding [`AbortController`](https://developer.mozilla.org/en-US/docs/Web/API/AbortController).\n * @returns Maximum builder fee approval.\n *\n * @throws {TransportError} When the transport layer throws an error.\n *\n * @see https://hyperliquid.gitbook.io/hyperliquid-docs/for-developers/api/info-endpoint#check-builder-fee-approval\n * @example\n * ```ts\n * import * as hl from \"@nktkas/hyperliquid\";\n *\n * const transport = new hl.HttpTransport(); // or `WebSocketTransport`\n *\n * const client = new hl.InfoClient({ transport });\n * const data = await client.maxBuilderFee({ user: \"0x...\", builder: \"0x...\" });\n * ```\n */\n maxBuilderFee(...args) {\n return maxBuilderFee(this, ...args);\n }\n /**\n * Request maximum market order notionals.\n * @param signal - An [`AbortSignal`](https://developer.mozilla.org/en-US/docs/Web/API/AbortSignal) can be used to cancel the request by calling [`abort()`](https://developer.mozilla.org/en-US/docs/Web/API/AbortController/abort) on the corresponding [`AbortController`](https://developer.mozilla.org/en-US/docs/Web/API/AbortController).\n * @returns Maximum market order notionals.\n *\n * @throws {TransportError} When the transport layer throws an error.\n *\n * @see null\n * @example\n * ```ts\n * import * as hl from \"@nktkas/hyperliquid\";\n *\n * const transport = new hl.HttpTransport(); // or `WebSocketTransport`\n *\n * const client = new hl.InfoClient({ transport });\n * const data = await client.maxMarketOrderNtls();\n * ```\n */\n maxMarketOrderNtls(...args) {\n return maxMarketOrderNtls(this, ...args);\n }\n /**\n * Request trading metadata.\n * @param params - Parameters specific to the API request.\n * @param signal - An [`AbortSignal`](https://developer.mozilla.org/en-US/docs/Web/API/AbortSignal) can be used to cancel the request by calling [`abort()`](https://developer.mozilla.org/en-US/docs/Web/API/AbortController/abort) on the corresponding [`AbortController`](https://developer.mozilla.org/en-US/docs/Web/API/AbortController).\n * @returns Metadata for perpetual assets.\n *\n * @throws {TransportError} When the transport layer throws an error.\n *\n * @see https://hyperliquid.gitbook.io/hyperliquid-docs/for-developers/api/info-endpoint/perpetuals#retrieve-perpetuals-metadata-universe-and-margin-tables\n * @example\n * ```ts\n * import * as hl from \"@nktkas/hyperliquid\";\n *\n * const transport = new hl.HttpTransport(); // or `WebSocketTransport`\n *\n * const client = new hl.InfoClient({ transport });\n * const data = await client.meta();\n * ```\n */\n meta(...args) {\n return meta(\n this,\n ...args\n );\n }\n /**\n * Request metadata and asset contexts.\n * @param signal - An [`AbortSignal`](https://developer.mozilla.org/en-US/docs/Web/API/AbortSignal) can be used to cancel the request by calling [`abort()`](https://developer.mozilla.org/en-US/docs/Web/API/AbortController/abort) on the corresponding [`AbortController`](https://developer.mozilla.org/en-US/docs/Web/API/AbortController).\n * @returns Metadata and context for perpetual assets.\n *\n * @throws {TransportError} When the transport layer throws an error.\n *\n * @see https://hyperliquid.gitbook.io/hyperliquid-docs/for-developers/api/info-endpoint/perpetuals#retrieve-perpetuals-asset-contexts-includes-mark-price-current-funding-open-interest-etc\n * @example\n * ```ts\n * import * as hl from \"@nktkas/hyperliquid\";\n *\n * const transport = new hl.HttpTransport(); // or `WebSocketTransport`\n *\n * const client = new hl.InfoClient({ transport });\n * const data = await client.metaAndAssetCtxs();\n * ```\n */\n metaAndAssetCtxs(...args) {\n return metaAndAssetCtxs(\n this,\n ...args\n );\n }\n /**\n * Request open orders.\n * @param params - Parameters specific to the API request.\n * @param signal - An [`AbortSignal`](https://developer.mozilla.org/en-US/docs/Web/API/AbortSignal) can be used to cancel the request by calling [`abort()`](https://developer.mozilla.org/en-US/docs/Web/API/AbortController/abort) on the corresponding [`AbortController`](https://developer.mozilla.org/en-US/docs/Web/API/AbortController).\n * @returns Array of open orders.\n *\n * @throws {TransportError} When the transport layer throws an error.\n *\n * @see https://hyperliquid.gitbook.io/hyperliquid-docs/for-developers/api/info-endpoint#retrieve-a-users-open-orders\n * @example\n * ```ts\n * import * as hl from \"@nktkas/hyperliquid\";\n *\n * const transport = new hl.HttpTransport(); // or `WebSocketTransport`\n *\n * const client = new hl.InfoClient({ transport });\n * const data = await client.openOrders({ user: \"0x...\" });\n * ```\n */\n openOrders(...args) {\n return openOrders(this, ...args);\n }\n /**\n * Request order status.\n * @param params - Parameters specific to the API request.\n * @param signal - An [`AbortSignal`](https://developer.mozilla.org/en-US/docs/Web/API/AbortSignal) can be used to cancel the request by calling [`abort()`](https://developer.mozilla.org/en-US/docs/Web/API/AbortController/abort) on the corresponding [`AbortController`](https://developer.mozilla.org/en-US/docs/Web/API/AbortController).\n * @returns Order status response.\n *\n * @throws {TransportError} When the transport layer throws an error.\n *\n * @see https://hyperliquid.gitbook.io/hyperliquid-docs/for-developers/api/info-endpoint#query-order-status-by-oid-or-cloid\n * @example\n * ```ts\n * import * as hl from \"@nktkas/hyperliquid\";\n *\n * const transport = new hl.HttpTransport(); // or `WebSocketTransport`\n *\n * const client = new hl.InfoClient({ transport });\n * const data = await client.orderStatus({ user: \"0x...\", oid: 12345 });\n * ```\n */\n orderStatus(...args) {\n return orderStatus(this, ...args);\n }\n /**\n * Request for the status of the perpetual deploy auction.\n * @param signal - An [`AbortSignal`](https://developer.mozilla.org/en-US/docs/Web/API/AbortSignal) can be used to cancel the request by calling [`abort()`](https://developer.mozilla.org/en-US/docs/Web/API/AbortController/abort) on the corresponding [`AbortController`](https://developer.mozilla.org/en-US/docs/Web/API/AbortController).\n * @returns Status of the perpetual deploy auction.\n *\n * @throws {TransportError} When the transport layer throws an error.\n *\n * @see https://hyperliquid.gitbook.io/hyperliquid-docs/for-developers/api/info-endpoint/perpetuals#retrieve-information-about-the-perp-deploy-auction\n * @example\n * ```ts\n * import * as hl from \"@nktkas/hyperliquid\";\n *\n * const transport = new hl.HttpTransport(); // or `WebSocketTransport`\n *\n * const client = new hl.InfoClient({ transport });\n * const data = await client.perpDeployAuctionStatus();\n * ```\n */\n perpDeployAuctionStatus(...args) {\n return perpDeployAuctionStatus(this, ...args);\n }\n /**\n * Request builder deployed perpetual market limits.\n * @param params - Parameters specific to the API request.\n * @param signal - An [`AbortSignal`](https://developer.mozilla.org/en-US/docs/Web/API/AbortSignal) can be used to cancel the request by calling [`abort()`](https://developer.mozilla.org/en-US/docs/Web/API/AbortController/abort) on the corresponding [`AbortController`](https://developer.mozilla.org/en-US/docs/Web/API/AbortController).\n * @returns Builder deployed perpetual market limits.\n *\n * @throws {TransportError} When the transport layer throws an error.\n *\n * @see https://hyperliquid.gitbook.io/hyperliquid-docs/for-developers/api/info-endpoint/perpetuals#retrieve-builder-deployed-perp-market-limits\n * @example\n * ```ts\n * import * as hl from \"@nktkas/hyperliquid\";\n *\n * const transport = new hl.HttpTransport(); // or `WebSocketTransport`\n *\n * const client = new hl.InfoClient({ transport });\n * const data = await client.perpDexLimits({ dex: \"test\" });\n * ```\n */\n perpDexLimits(...args) {\n return perpDexLimits(this, ...args);\n }\n /**\n * Request all perpetual dexs.\n * @param signal - An [`AbortSignal`](https://developer.mozilla.org/en-US/docs/Web/API/AbortSignal) can be used to cancel the request by calling [`abort()`](https://developer.mozilla.org/en-US/docs/Web/API/AbortController/abort) on the corresponding [`AbortController`](https://developer.mozilla.org/en-US/docs/Web/API/AbortController).\n * @returns Array of perpetual dexes (null is main dex).\n *\n * @throws {TransportError} When the transport layer throws an error.\n *\n * @see https://hyperliquid.gitbook.io/hyperliquid-docs/for-developers/api/info-endpoint/perpetuals#retrieve-all-perpetual-dexs\n * @example\n * ```ts\n * import * as hl from \"@nktkas/hyperliquid\";\n *\n * const transport = new hl.HttpTransport(); // or `WebSocketTransport`\n *\n * const client = new hl.InfoClient({ transport });\n * const data = await client.perpDexs();\n * ```\n */\n perpDexs(...args) {\n return perpDexs(this, ...args);\n }\n /**\n * Request perpetuals at open interest cap.\n * @param params - Parameters specific to the API request.\n * @param signal - An [`AbortSignal`](https://developer.mozilla.org/en-US/docs/Web/API/AbortSignal) can be used to cancel the request by calling [`abort()`](https://developer.mozilla.org/en-US/docs/Web/API/AbortController/abort) on the corresponding [`AbortController`](https://developer.mozilla.org/en-US/docs/Web/API/AbortController).\n * @returns Array of perpetuals at open interest caps.\n *\n * @throws {TransportError} When the transport layer throws an error.\n *\n * @see https://hyperliquid.gitbook.io/hyperliquid-docs/for-developers/api/info-endpoint/perpetuals#query-perps-at-open-interest-caps\n * @example\n * ```ts\n * import * as hl from \"@nktkas/hyperliquid\";\n *\n * const transport = new hl.HttpTransport(); // or `WebSocketTransport`\n *\n * const client = new hl.InfoClient({ transport });\n * const data = await client.perpsAtOpenInterestCap();\n * ```\n */\n perpsAtOpenInterestCap(...args) {\n return perpsAtOpenInterestCap(\n this,\n ...args\n );\n }\n /**\n * Request user portfolio.\n * @param params - Parameters specific to the API request.\n * @param signal - An [`AbortSignal`](https://developer.mozilla.org/en-US/docs/Web/API/AbortSignal) can be used to cancel the request by calling [`abort()`](https://developer.mozilla.org/en-US/docs/Web/API/AbortController/abort) on the corresponding [`AbortController`](https://developer.mozilla.org/en-US/docs/Web/API/AbortController).\n * @returns Portfolio metrics grouped by time periods.\n *\n * @throws {TransportError} When the transport layer throws an error.\n *\n * @see https://hyperliquid.gitbook.io/hyperliquid-docs/for-developers/api/info-endpoint#query-a-users-portfolio\n * @example\n * ```ts\n * import * as hl from \"@nktkas/hyperliquid\";\n *\n * const transport = new hl.HttpTransport(); // or `WebSocketTransport`\n *\n * const client = new hl.InfoClient({ transport });\n * const data = await client.portfolio({ user: \"0x...\" });\n * ```\n */\n portfolio(...args) {\n return portfolio(this, ...args);\n }\n /**\n * Request predicted funding rates.\n * @param signal - An [`AbortSignal`](https://developer.mozilla.org/en-US/docs/Web/API/AbortSignal) can be used to cancel the request by calling [`abort()`](https://developer.mozilla.org/en-US/docs/Web/API/AbortController/abort) on the corresponding [`AbortController`](https://developer.mozilla.org/en-US/docs/Web/API/AbortController).\n * @returns Array of predicted funding rates.\n *\n * @throws {TransportError} When the transport layer throws an error.\n *\n * @see https://hyperliquid.gitbook.io/hyperliquid-docs/for-developers/api/info-endpoint/perpetuals#retrieve-predicted-funding-rates-for-different-venues\n * @example\n * ```ts\n * import * as hl from \"@nktkas/hyperliquid\";\n *\n * const transport = new hl.HttpTransport(); // or `WebSocketTransport`\n *\n * const client = new hl.InfoClient({ transport });\n * const data = await client.predictedFundings();\n * ```\n */\n predictedFundings(...args) {\n return predictedFundings(this, ...args);\n }\n /**\n * Request user existence check before transfer.\n * @param params - Parameters specific to the API request.\n * @param signal - An [`AbortSignal`](https://developer.mozilla.org/en-US/docs/Web/API/AbortSignal) can be used to cancel the request by calling [`abort()`](https://developer.mozilla.org/en-US/docs/Web/API/AbortController/abort) on the corresponding [`AbortController`](https://developer.mozilla.org/en-US/docs/Web/API/AbortController).\n * @returns Pre-transfer user existence check result.\n *\n * @throws {TransportError} When the transport layer throws an error.\n *\n * @see null\n * @example\n * ```ts\n * import * as hl from \"@nktkas/hyperliquid\";\n *\n * const transport = new hl.HttpTransport(); // or `WebSocketTransport`\n *\n * const client = new hl.InfoClient({ transport });\n * const data = await client.preTransferCheck({ user: \"0x...\", source: \"0x...\" });\n * ```\n */\n preTransferCheck(...args) {\n return preTransferCheck(this, ...args);\n }\n /**\n * Request recent trades.\n * @param params - Parameters specific to the API request.\n * @param signal - An [`AbortSignal`](https://developer.mozilla.org/en-US/docs/Web/API/AbortSignal) can be used to cancel the request by calling [`abort()`](https://developer.mozilla.org/en-US/docs/Web/API/AbortController/abort) on the corresponding [`AbortController`](https://developer.mozilla.org/en-US/docs/Web/API/AbortController).\n * @returns Array of recent trades.\n *\n * @throws {TransportError} When the transport layer throws an error.\n *\n * @see null\n * @example\n * ```ts\n * import * as hl from \"@nktkas/hyperliquid\";\n *\n * const transport = new hl.HttpTransport(); // or `WebSocketTransport`\n *\n * const client = new hl.InfoClient({ transport });\n * const data = await client.recentTrades({ coin: \"ETH\" });\n * ```\n */\n recentTrades(...args) {\n return recentTrades(this, ...args);\n }\n /**\n * Request user referral.\n * @param params - Parameters specific to the API request.\n * @param signal - An [`AbortSignal`](https://developer.mozilla.org/en-US/docs/Web/API/AbortSignal) can be used to cancel the request by calling [`abort()`](https://developer.mozilla.org/en-US/docs/Web/API/AbortController/abort) on the corresponding [`AbortController`](https://developer.mozilla.org/en-US/docs/Web/API/AbortController).\n * @returns Referral details for a user.\n *\n * @throws {TransportError} When the transport layer throws an error.\n *\n * @see https://hyperliquid.gitbook.io/hyperliquid-docs/for-developers/api/info-endpoint#query-a-users-referral-information\n * @example\n * ```ts\n * import * as hl from \"@nktkas/hyperliquid\";\n *\n * const transport = new hl.HttpTransport(); // or `WebSocketTransport`\n *\n * const client = new hl.InfoClient({ transport });\n * const data = await client.referral({ user: \"0x...\" });\n * ```\n */\n referral(...args) {\n return referral(this, ...args);\n }\n /**\n * Request spot clearinghouse state.\n * @param params - Parameters specific to the API request.\n * @param signal - An [`AbortSignal`](https://developer.mozilla.org/en-US/docs/Web/API/AbortSignal) can be used to cancel the request by calling [`abort()`](https://developer.mozilla.org/en-US/docs/Web/API/AbortController/abort) on the corresponding [`AbortController`](https://developer.mozilla.org/en-US/docs/Web/API/AbortController).\n * @returns Account summary for spot trading.\n *\n * @throws {TransportError} When the transport layer throws an error.\n *\n * @see https://hyperliquid.gitbook.io/hyperliquid-docs/for-developers/api/info-endpoint/spot#retrieve-a-users-token-balances\n * @example\n * ```ts\n * import * as hl from \"@nktkas/hyperliquid\";\n *\n * const transport = new hl.HttpTransport(); // or `WebSocketTransport`\n *\n * const client = new hl.InfoClient({ transport });\n * const data = await client.spotClearinghouseState({ user: \"0x...\" });\n * ```\n */\n spotClearinghouseState(...args) {\n return spotClearinghouseState(this, ...args);\n }\n /**\n * Request spot deploy state.\n * @param params - Parameters specific to the API request.\n * @param signal - An [`AbortSignal`](https://developer.mozilla.org/en-US/docs/Web/API/AbortSignal) can be used to cancel the request by calling [`abort()`](https://developer.mozilla.org/en-US/docs/Web/API/AbortController/abort) on the corresponding [`AbortController`](https://developer.mozilla.org/en-US/docs/Web/API/AbortController).\n * @returns Deploy state for spot tokens.\n *\n * @throws {TransportError} When the transport layer throws an error.\n *\n * @see https://hyperliquid.gitbook.io/hyperliquid-docs/for-developers/api/info-endpoint/spot#retrieve-information-about-the-spot-deploy-auction\n * @example\n * ```ts\n * import * as hl from \"@nktkas/hyperliquid\";\n *\n * const transport = new hl.HttpTransport(); // or `WebSocketTransport`\n *\n * const client = new hl.InfoClient({ transport });\n * const data = await client.spotDeployState({ user: \"0x...\" });\n * ```\n */\n spotDeployState(...args) {\n return spotDeployState(this, ...args);\n }\n /**\n * Request spot trading metadata.\n * @param signal - An [`AbortSignal`](https://developer.mozilla.org/en-US/docs/Web/API/AbortSignal) can be used to cancel the request by calling [`abort()`](https://developer.mozilla.org/en-US/docs/Web/API/AbortController/abort) on the corresponding [`AbortController`](https://developer.mozilla.org/en-US/docs/Web/API/AbortController).\n * @returns Metadata for spot assets.\n *\n * @throws {TransportError} When the transport layer throws an error.\n *\n * @see https://hyperliquid.gitbook.io/hyperliquid-docs/for-developers/api/info-endpoint/spot#retrieve-spot-metadata\n * @example\n * ```ts\n * import * as hl from \"@nktkas/hyperliquid\";\n *\n * const transport = new hl.HttpTransport(); // or `WebSocketTransport`\n *\n * const client = new hl.InfoClient({ transport });\n * const data = await client.spotMeta();\n * ```\n */\n spotMeta(...args) {\n return spotMeta(this, ...args);\n }\n /**\n * Request spot metadata and asset contexts.\n * @param signal - An [`AbortSignal`](https://developer.mozilla.org/en-US/docs/Web/API/AbortSignal) can be used to cancel the request by calling [`abort()`](https://developer.mozilla.org/en-US/docs/Web/API/AbortController/abort) on the corresponding [`AbortController`](https://developer.mozilla.org/en-US/docs/Web/API/AbortController).\n * @returns Metadata and context for spot assets.\n *\n * @throws {TransportError} When the transport layer throws an error.\n *\n * @see https://hyperliquid.gitbook.io/hyperliquid-docs/for-developers/api/info-endpoint/spot#retrieve-spot-asset-contexts\n * @example\n * ```ts\n * import * as hl from \"@nktkas/hyperliquid\";\n *\n * const transport = new hl.HttpTransport(); // or `WebSocketTransport`\n *\n * const client = new hl.InfoClient({ transport });\n * const data = await client.spotMetaAndAssetCtxs();\n * ```\n */\n spotMetaAndAssetCtxs(...args) {\n return spotMetaAndAssetCtxs(this, ...args);\n }\n /**\n * Request for the status of the spot deploy auction.\n * @param signal - An [`AbortSignal`](https://developer.mozilla.org/en-US/docs/Web/API/AbortSignal) can be used to cancel the request by calling [`abort()`](https://developer.mozilla.org/en-US/docs/Web/API/AbortController/abort) on the corresponding [`AbortController`](https://developer.mozilla.org/en-US/docs/Web/API/AbortController).\n * @returns Status of the spot deploy auction.\n *\n * @throws {TransportError} When the transport layer throws an error.\n *\n * @see https://hyperliquid.gitbook.io/hyperliquid-docs/for-developers/api/info-endpoint/spot#retrieve-information-about-the-spot-pair-deploy-auction\n * @example\n * ```ts\n * import * as hl from \"@nktkas/hyperliquid\";\n *\n * const transport = new hl.HttpTransport(); // or `WebSocketTransport`\n *\n * const client = new hl.InfoClient({ transport });\n * const data = await client.spotPairDeployAuctionStatus();\n * ```\n */\n spotPairDeployAuctionStatus(...args) {\n return spotPairDeployAuctionStatus(this, ...args);\n }\n /**\n * Request user sub-accounts.\n * @param params - Parameters specific to the API request.\n * @param signal - An [`AbortSignal`](https://developer.mozilla.org/en-US/docs/Web/API/AbortSignal) can be used to cancel the request by calling [`abort()`](https://developer.mozilla.org/en-US/docs/Web/API/AbortController/abort) on the corresponding [`AbortController`](https://developer.mozilla.org/en-US/docs/Web/API/AbortController).\n * @returns Array of user sub-account or null if the user does not have any sub-accounts.\n *\n * @throws {TransportError} When the transport layer throws an error.\n *\n * @see https://hyperliquid.gitbook.io/hyperliquid-docs/for-developers/api/info-endpoint#retrieve-a-users-subaccounts\n * @example\n * ```ts\n * import * as hl from \"@nktkas/hyperliquid\";\n *\n * const transport = new hl.HttpTransport(); // or `WebSocketTransport`\n *\n * const client = new hl.InfoClient({ transport });\n * const data = await client.subAccounts({ user: \"0x...\" });\n * ```\n */\n subAccounts(...args) {\n return subAccounts(this, ...args);\n }\n /**\n * Request user sub-accounts V2.\n * @param params - Parameters specific to the API request.\n * @param signal - An [`AbortSignal`](https://developer.mozilla.org/en-US/docs/Web/API/AbortSignal) can be used to cancel the request by calling [`abort()`](https://developer.mozilla.org/en-US/docs/Web/API/AbortController/abort) on the corresponding [`AbortController`](https://developer.mozilla.org/en-US/docs/Web/API/AbortController).\n * @returns Array of user sub-account or null if the user does not have any sub-accounts.\n *\n * @throws {TransportError} When the transport layer throws an error.\n *\n * @see null\n * @example\n * ```ts\n * import * as hl from \"@nktkas/hyperliquid\";\n *\n * const transport = new hl.HttpTransport(); // or `WebSocketTransport`\n *\n * const client = new hl.InfoClient({ transport });\n * const data = await client.subAccounts2({ user: \"0x...\" });\n * ```\n */\n subAccounts2(...args) {\n return subAccounts2(this, ...args);\n }\n /**\n * Request token details.\n * @param params - Parameters specific to the API request.\n * @param signal - An [`AbortSignal`](https://developer.mozilla.org/en-US/docs/Web/API/AbortSignal) can be used to cancel the request by calling [`abort()`](https://developer.mozilla.org/en-US/docs/Web/API/AbortController/abort) on the corresponding [`AbortController`](https://developer.mozilla.org/en-US/docs/Web/API/AbortController).\n * @returns Details of a token.\n *\n * @throws {TransportError} When the transport layer throws an error.\n *\n * @see https://hyperliquid.gitbook.io/hyperliquid-docs/for-developers/api/info-endpoint/spot#retrieve-information-about-a-token\n * @example\n * ```ts\n * import * as hl from \"@nktkas/hyperliquid\";\n *\n * const transport = new hl.HttpTransport(); // or `WebSocketTransport`\n *\n * const client = new hl.InfoClient({ transport });\n * const data = await client.tokenDetails({ tokenId: \"0x...\" });\n * ```\n */\n tokenDetails(...args) {\n return tokenDetails(this, ...args);\n }\n /**\n * Request twap history of a user.\n * @param params - Parameters specific to the API request.\n * @param signal - An [`AbortSignal`](https://developer.mozilla.org/en-US/docs/Web/API/AbortSignal) can be used to cancel the request by calling [`abort()`](https://developer.mozilla.org/en-US/docs/Web/API/AbortController/abort) on the corresponding [`AbortController`](https://developer.mozilla.org/en-US/docs/Web/API/AbortController).\n * @returns Array of user's TWAP history.\n *\n * @throws {TransportError} When the transport layer throws an error.\n *\n * @see null\n * @example\n * ```ts\n * import * as hl from \"@nktkas/hyperliquid\";\n *\n * const transport = new hl.HttpTransport(); // or `WebSocketTransport`\n *\n * const client = new hl.InfoClient({ transport });\n * const data = await client.twapHistory({ user: \"0x...\" });\n * ```\n */\n twapHistory(...args) {\n return twapHistory(this, ...args);\n }\n /**\n * Request transaction details by transaction hash.\n * @param params - Parameters specific to the API request.\n * @param signal - An [`AbortSignal`](https://developer.mozilla.org/en-US/docs/Web/API/AbortSignal) can be used to cancel the request by calling [`abort()`](https://developer.mozilla.org/en-US/docs/Web/API/AbortController/abort) on the corresponding [`AbortController`](https://developer.mozilla.org/en-US/docs/Web/API/AbortController).\n * @returns Transaction details.\n *\n * @throws {TransportError} When the transport layer throws an error.\n *\n * @see null\n * @example\n * ```ts\n * import * as hl from \"@nktkas/hyperliquid\";\n *\n * const transport = new hl.HttpTransport(); // only `HttpTransport` supports this API\n *\n * const client = new hl.InfoClient({ transport });\n * const data = await client.txDetails({ hash: \"0x...\" });\n * ```\n */\n txDetails(...args) {\n return txDetails(this, ...args);\n }\n /**\n * Request array of user transaction details.\n * @param params - Parameters specific to the API request.\n * @param signal - An [`AbortSignal`](https://developer.mozilla.org/en-US/docs/Web/API/AbortSignal) can be used to cancel the request by calling [`abort()`](https://developer.mozilla.org/en-US/docs/Web/API/AbortController/abort) on the corresponding [`AbortController`](https://developer.mozilla.org/en-US/docs/Web/API/AbortController).\n * @returns Array of user transaction details.\n *\n * @throws {TransportError} When the transport layer throws an error.\n *\n * @see null\n * @example\n * ```ts\n * import * as hl from \"@nktkas/hyperliquid\";\n *\n * const transport = new hl.HttpTransport(); // only `HttpTransport` supports this API\n *\n * const client = new hl.InfoClient({ transport });\n * const data = await client.userDetails({ user: \"0x...\" });\n * ```\n */\n userDetails(...args) {\n return userDetails(this, ...args);\n }\n /**\n * Request user HIP-3 DEX abstraction state.\n * @param params - Parameters specific to the API request.\n * @param signal - An [`AbortSignal`](https://developer.mozilla.org/en-US/docs/Web/API/AbortSignal) can be used to cancel the request by calling [`abort()`](https://developer.mozilla.org/en-US/docs/Web/API/AbortController/abort) on the corresponding [`AbortController`](https://developer.mozilla.org/en-US/docs/Web/API/AbortController).\n * @returns User HIP-3 DEX abstraction state.\n *\n * @throws {TransportError} When the transport layer throws an error.\n *\n * @see https://hyperliquid.gitbook.io/hyperliquid-docs/for-developers/api/info-endpoint#query-a-users-hip-3-dex-abstraction-state\n * @example\n * ```ts\n * import * as hl from \"@nktkas/hyperliquid\";\n *\n * const transport = new hl.HttpTransport(); // only `HttpTransport` supports this API\n *\n * const client = new hl.InfoClient({ transport });\n * const data = await client.userDexAbstraction({ user: \"0x...\" });\n * ```\n */\n userDexAbstraction(...args) {\n return userDexAbstraction2(this, ...args);\n }\n /**\n * Request user fees.\n * @param params - Parameters specific to the API request.\n * @param signal - An [`AbortSignal`](https://developer.mozilla.org/en-US/docs/Web/API/AbortSignal) can be used to cancel the request by calling [`abort()`](https://developer.mozilla.org/en-US/docs/Web/API/AbortController/abort) on the corresponding [`AbortController`](https://developer.mozilla.org/en-US/docs/Web/API/AbortController).\n * @returns User fees.\n *\n * @throws {TransportError} When the transport layer throws an error.\n *\n * @see https://hyperliquid.gitbook.io/hyperliquid-docs/for-developers/api/info-endpoint#query-a-users-fees\n * @example\n * ```ts\n * import * as hl from \"@nktkas/hyperliquid\";\n *\n * const transport = new hl.HttpTransport(); // or `WebSocketTransport`\n *\n * const client = new hl.InfoClient({ transport });\n * const data = await client.userFees({ user: \"0x...\" });\n * ```\n */\n userFees(...args) {\n return userFees(this, ...args);\n }\n /**\n * Request array of user fills.\n * @param params - Parameters specific to the API request.\n * @param signal - An [`AbortSignal`](https://developer.mozilla.org/en-US/docs/Web/API/AbortSignal) can be used to cancel the request by calling [`abort()`](https://developer.mozilla.org/en-US/docs/Web/API/AbortController/abort) on the corresponding [`AbortController`](https://developer.mozilla.org/en-US/docs/Web/API/AbortController).\n * @returns Array of user trade fills.\n *\n * @throws {TransportError} When the transport layer throws an error.\n *\n * @see https://hyperliquid.gitbook.io/hyperliquid-docs/for-developers/api/info-endpoint#retrieve-a-users-fills\n * @example\n * ```ts\n * import * as hl from \"@nktkas/hyperliquid\";\n *\n * const transport = new hl.HttpTransport(); // or `WebSocketTransport`\n *\n * const client = new hl.InfoClient({ transport });\n * const data = await client.userFills({ user: \"0x...\" });\n * ```\n */\n userFills(...args) {\n return userFills(this, ...args);\n }\n /**\n * Request array of user fills by time.\n * @param params - Parameters specific to the API request.\n * @param signal - An [`AbortSignal`](https://developer.mozilla.org/en-US/docs/Web/API/AbortSignal) can be used to cancel the request by calling [`abort()`](https://developer.mozilla.org/en-US/docs/Web/API/AbortController/abort) on the corresponding [`AbortController`](https://developer.mozilla.org/en-US/docs/Web/API/AbortController).\n * @returns Array of user trade fills by time.\n *\n * @throws {TransportError} When the transport layer throws an error.\n *\n * @see https://hyperliquid.gitbook.io/hyperliquid-docs/for-developers/api/info-endpoint#retrieve-a-users-fills-by-time\n * @example\n * ```ts\n * import * as hl from \"@nktkas/hyperliquid\";\n *\n * const transport = new hl.HttpTransport(); // or `WebSocketTransport`\n *\n * const client = new hl.InfoClient({ transport });\n * const data = await client.userFillsByTime({\n * user: \"0x...\",\n * startTime: Date.now() - 1000 * 60 * 60 * 24,\n * });\n * ```\n */\n userFillsByTime(...args) {\n return userFillsByTime(this, ...args);\n }\n /**\n * Request array of user funding ledger updates.\n * @param params - Parameters specific to the API request.\n * @param signal - An [`AbortSignal`](https://developer.mozilla.org/en-US/docs/Web/API/AbortSignal) can be used to cancel the request by calling [`abort()`](https://developer.mozilla.org/en-US/docs/Web/API/AbortController/abort) on the corresponding [`AbortController`](https://developer.mozilla.org/en-US/docs/Web/API/AbortController).\n * @returns Array of user funding ledger updates.\n *\n * @throws {TransportError} When the transport layer throws an error.\n *\n * @see https://hyperliquid.gitbook.io/hyperliquid-docs/for-developers/api/info-endpoint/perpetuals#retrieve-a-users-funding-history-or-non-funding-ledger-updates\n * @example\n * ```ts\n * import * as hl from \"@nktkas/hyperliquid\";\n *\n * const transport = new hl.HttpTransport(); // or `WebSocketTransport`\n *\n * const client = new hl.InfoClient({ transport });\n * const data = await client.userFunding({\n * user: \"0x...\",\n * startTime: Date.now() - 1000 * 60 * 60 * 24,\n * });\n * ```\n */\n userFunding(...args) {\n return userFunding(this, ...args);\n }\n /**\n * Request user non-funding ledger updates.\n * @param params - Parameters specific to the API request.\n * @param signal - An [`AbortSignal`](https://developer.mozilla.org/en-US/docs/Web/API/AbortSignal) can be used to cancel the request by calling [`abort()`](https://developer.mozilla.org/en-US/docs/Web/API/AbortController/abort) on the corresponding [`AbortController`](https://developer.mozilla.org/en-US/docs/Web/API/AbortController).\n * @returns Array of user's non-funding ledger update.\n *\n * @throws {TransportError} When the transport layer throws an error.\n *\n * @see https://hyperliquid.gitbook.io/hyperliquid-docs/for-developers/api/info-endpoint/perpetuals#retrieve-a-users-funding-history-or-non-funding-ledger-updates\n * @example\n * ```ts\n * import * as hl from \"@nktkas/hyperliquid\";\n *\n * const transport = new hl.HttpTransport(); // or `WebSocketTransport`\n *\n * const client = new hl.InfoClient({ transport });\n * const data = await client.userNonFundingLedgerUpdates({\n * user: \"0x...\",\n * startTime: Date.now() - 1000 * 60 * 60 * 24,\n * });\n * ```\n */\n userNonFundingLedgerUpdates(...args) {\n return userNonFundingLedgerUpdates(this, ...args);\n }\n /**\n * Request user rate limits.\n * @param params - Parameters specific to the API request.\n * @param signal - An [`AbortSignal`](https://developer.mozilla.org/en-US/docs/Web/API/AbortSignal) can be used to cancel the request by calling [`abort()`](https://developer.mozilla.org/en-US/docs/Web/API/AbortController/abort) on the corresponding [`AbortController`](https://developer.mozilla.org/en-US/docs/Web/API/AbortController).\n * @returns User rate limits.\n *\n * @throws {TransportError} When the transport layer throws an error.\n *\n * @see https://hyperliquid.gitbook.io/hyperliquid-docs/for-developers/api/info-endpoint#query-user-rate-limits\n * @example\n * ```ts\n * import * as hl from \"@nktkas/hyperliquid\";\n *\n * const transport = new hl.HttpTransport(); // or `WebSocketTransport`\n *\n * const client = new hl.InfoClient({ transport });\n * const data = await client.userRateLimit({ user: \"0x...\" });\n * ```\n */\n userRateLimit(...args) {\n return userRateLimit(this, ...args);\n }\n /**\n * Request user role.\n * @param params - Parameters specific to the API request.\n * @param signal - An [`AbortSignal`](https://developer.mozilla.org/en-US/docs/Web/API/AbortSignal) can be used to cancel the request by calling [`abort()`](https://developer.mozilla.org/en-US/docs/Web/API/AbortController/abort) on the corresponding [`AbortController`](https://developer.mozilla.org/en-US/docs/Web/API/AbortController).\n * @returns User role.\n *\n * @throws {TransportError} When the transport layer throws an error.\n *\n * @see https://hyperliquid.gitbook.io/hyperliquid-docs/for-developers/api/info-endpoint#query-a-users-role\n * @example\n * ```ts\n * import * as hl from \"@nktkas/hyperliquid\";\n *\n * const transport = new hl.HttpTransport(); // or `WebSocketTransport`\n *\n * const client = new hl.InfoClient({ transport });\n * const data = await client.userRole({ user: \"0x...\" });\n * ```\n */\n userRole(...args) {\n return userRole(this, ...args);\n }\n /**\n * Request multi-sig signers for a user.\n * @param params - Parameters specific to the API request.\n * @param signal - An [`AbortSignal`](https://developer.mozilla.org/en-US/docs/Web/API/AbortSignal) can be used to cancel the request by calling [`abort()`](https://developer.mozilla.org/en-US/docs/Web/API/AbortController/abort) on the corresponding [`AbortController`](https://developer.mozilla.org/en-US/docs/Web/API/AbortController).\n * @returns Multi-sig signers for a user or null if the user does not have any multi-sig signers.\n *\n * @throws {TransportError} When the transport layer throws an error.\n *\n * @see null\n * @example\n * ```ts\n * import * as hl from \"@nktkas/hyperliquid\";\n *\n * const transport = new hl.HttpTransport(); // or `WebSocketTransport`\n *\n * const client = new hl.InfoClient({ transport });\n * const data = await client.userToMultiSigSigners({ user: \"0x...\" });\n * ```\n */\n userToMultiSigSigners(...args) {\n return userToMultiSigSigners(this, ...args);\n }\n /**\n * Request user TWAP slice fills.\n * @param params - Parameters specific to the API request.\n * @param signal - An [`AbortSignal`](https://developer.mozilla.org/en-US/docs/Web/API/AbortSignal) can be used to cancel the request by calling [`abort()`](https://developer.mozilla.org/en-US/docs/Web/API/AbortController/abort) on the corresponding [`AbortController`](https://developer.mozilla.org/en-US/docs/Web/API/AbortController).\n * @returns Array of user's twap slice fill.\n *\n * @throws {TransportError} When the transport layer throws an error.\n *\n * @see https://hyperliquid.gitbook.io/hyperliquid-docs/for-developers/api/info-endpoint#retrieve-a-users-twap-slice-fills\n * @example\n * ```ts\n * import * as hl from \"@nktkas/hyperliquid\";\n *\n * const transport = new hl.HttpTransport(); // or `WebSocketTransport`\n *\n * const client = new hl.InfoClient({ transport });\n * const data = await client.userTwapSliceFills({ user: \"0x...\" });\n * ```\n */\n userTwapSliceFills(...args) {\n return userTwapSliceFills(this, ...args);\n }\n /**\n * Request user TWAP slice fills by time.\n * @param params - Parameters specific to the API request.\n * @param signal - An [`AbortSignal`](https://developer.mozilla.org/en-US/docs/Web/API/AbortSignal) can be used to cancel the request by calling [`abort()`](https://developer.mozilla.org/en-US/docs/Web/API/AbortController/abort) on the corresponding [`AbortController`](https://developer.mozilla.org/en-US/docs/Web/API/AbortController).\n * @returns Array of user's twap slice fill by time.\n *\n * @throws {TransportError} When the transport layer throws an error.\n *\n * @see null\n * @example\n * ```ts\n * import * as hl from \"@nktkas/hyperliquid\";\n *\n * const transport = new hl.HttpTransport(); // or `WebSocketTransport`\n *\n * const client = new hl.InfoClient({ transport });\n * const data = await client.userTwapSliceFillsByTime({\n * user: \"0x...\",\n * startTime: Date.now() - 1000 * 60 * 60 * 24,\n * });\n * ```\n */\n userTwapSliceFillsByTime(...args) {\n return userTwapSliceFillsByTime(this, ...args);\n }\n /**\n * Request user vault deposits.\n * @param params - Parameters specific to the API request.\n * @param signal - An [`AbortSignal`](https://developer.mozilla.org/en-US/docs/Web/API/AbortSignal) can be used to cancel the request by calling [`abort()`](https://developer.mozilla.org/en-US/docs/Web/API/AbortController/abort) on the corresponding [`AbortController`](https://developer.mozilla.org/en-US/docs/Web/API/AbortController).\n * @returns Array of user's vault deposits.\n *\n * @throws {TransportError} When the transport layer throws an error.\n *\n * @see https://hyperliquid.gitbook.io/hyperliquid-docs/for-developers/api/info-endpoint#retrieve-a-users-vault-deposits\n * @example\n * ```ts\n * import * as hl from \"@nktkas/hyperliquid\";\n *\n * const transport = new hl.HttpTransport(); // or `WebSocketTransport`\n *\n * const client = new hl.InfoClient({ transport });\n * const data = await client.userVaultEquities({ user: \"0x...\" });\n * ```\n */\n userVaultEquities(...args) {\n return userVaultEquities(this, ...args);\n }\n /**\n * Request validator L1 votes.\n * @param signal - An [`AbortSignal`](https://developer.mozilla.org/en-US/docs/Web/API/AbortSignal) can be used to cancel the request by calling [`abort()`](https://developer.mozilla.org/en-US/docs/Web/API/AbortController/abort) on the corresponding [`AbortController`](https://developer.mozilla.org/en-US/docs/Web/API/AbortController).\n * @returns Array of L1 governance votes cast by validators.\n *\n * @throws {TransportError} When the transport layer throws an error.\n *\n * @see null\n * @example\n * ```ts\n * import * as hl from \"@nktkas/hyperliquid\";\n *\n * const transport = new hl.HttpTransport(); // or `WebSocketTransport`\n *\n * const client = new hl.InfoClient({ transport });\n * const data = await client.validatorL1Votes();\n * ```\n */\n validatorL1Votes(...args) {\n return validatorL1Votes(this, ...args);\n }\n /**\n * Request validator summaries.\n * @param signal - An [`AbortSignal`](https://developer.mozilla.org/en-US/docs/Web/API/AbortSignal) can be used to cancel the request by calling [`abort()`](https://developer.mozilla.org/en-US/docs/Web/API/AbortController/abort) on the corresponding [`AbortController`](https://developer.mozilla.org/en-US/docs/Web/API/AbortController).\n * @returns Array of validator performance statistics.\n *\n * @throws {TransportError} When the transport layer throws an error.\n *\n * @see null\n * @example\n * ```ts\n * import * as hl from \"@nktkas/hyperliquid\";\n *\n * const transport = new hl.HttpTransport(); // or `WebSocketTransport`\n *\n * const client = new hl.InfoClient({ transport });\n * const data = await client.validatorSummaries();\n * ```\n */\n validatorSummaries(...args) {\n return validatorSummaries(this, ...args);\n }\n /**\n * Request details of a vault.\n * @param params - Parameters specific to the API request.\n * @param signal - An [`AbortSignal`](https://developer.mozilla.org/en-US/docs/Web/API/AbortSignal) can be used to cancel the request by calling [`abort()`](https://developer.mozilla.org/en-US/docs/Web/API/AbortController/abort) on the corresponding [`AbortController`](https://developer.mozilla.org/en-US/docs/Web/API/AbortController).\n * @returns Details of a vault or null if the vault does not exist.\n *\n * @throws {TransportError} When the transport layer throws an error.\n *\n * @see https://hyperliquid.gitbook.io/hyperliquid-docs/for-developers/api/info-endpoint#retrieve-details-for-a-vault\n * @example\n * ```ts\n * import * as hl from \"@nktkas/hyperliquid\";\n *\n * const transport = new hl.HttpTransport(); // or `WebSocketTransport`\n *\n * const client = new hl.InfoClient({ transport });\n * const data = await client.vaultDetails({ vaultAddress: \"0x...\" });\n * ```\n */\n vaultDetails(...args) {\n return vaultDetails(this, ...args);\n }\n /**\n * Request a list of vaults less than 2 hours old.\n * @param signal - An [`AbortSignal`](https://developer.mozilla.org/en-US/docs/Web/API/AbortSignal) can be used to cancel the request by calling [`abort()`](https://developer.mozilla.org/en-US/docs/Web/API/AbortController/abort) on the corresponding [`AbortController`](https://developer.mozilla.org/en-US/docs/Web/API/AbortController).\n * @returns Array of vaults less than 2 hours old.\n *\n * @throws {TransportError} When the transport layer throws an error.\n *\n * @see null\n * @example\n * ```ts\n * import * as hl from \"@nktkas/hyperliquid\";\n *\n * const transport = new hl.HttpTransport(); // or `WebSocketTransport`\n *\n * const client = new hl.InfoClient({ transport });\n * const data = await client.vaultSummaries();\n * ```\n */\n vaultSummaries(...args) {\n return vaultSummaries(this, ...args);\n }\n /**\n * Request comprehensive user and market data.\n * @param params - Parameters specific to the API request.\n * @param signal - An [`AbortSignal`](https://developer.mozilla.org/en-US/docs/Web/API/AbortSignal) can be used to cancel the request by calling [`abort()`](https://developer.mozilla.org/en-US/docs/Web/API/AbortController/abort) on the corresponding [`AbortController`](https://developer.mozilla.org/en-US/docs/Web/API/AbortController).\n * @returns Comprehensive user and market data.\n *\n * @throws {TransportError} When the transport layer throws an error.\n *\n * @see null\n * @example\n * ```ts\n * import * as hl from \"@nktkas/hyperliquid\";\n *\n * const transport = new hl.HttpTransport(); // or `WebSocketTransport`\n *\n * const client = new hl.InfoClient({ transport });\n * const data = await client.webData2({ user: \"0x...\" });\n * ```\n */\n webData2(...args) {\n return webData2(this, ...args);\n }\n };\n\n // ../../../node_modules/.pnpm/@nktkas+hyperliquid@0.25.7_typescript@5.8.3/node_modules/@nktkas/hyperliquid/esm/src/api/subscription/~client.js\n init_dirname();\n init_buffer2();\n init_process2();\n\n // ../../../node_modules/.pnpm/@nktkas+hyperliquid@0.25.7_typescript@5.8.3/node_modules/@nktkas/hyperliquid/esm/src/api/subscription/activeAssetCtx.js\n init_dirname();\n init_buffer2();\n init_process2();\n\n // ../../../node_modules/.pnpm/@nktkas+hyperliquid@0.25.7_typescript@5.8.3/node_modules/@nktkas/hyperliquid/esm/src/api/subscription/activeAssetData.js\n init_dirname();\n init_buffer2();\n init_process2();\n\n // ../../../node_modules/.pnpm/@nktkas+hyperliquid@0.25.7_typescript@5.8.3/node_modules/@nktkas/hyperliquid/esm/src/api/subscription/activeSpotAssetCtx.js\n init_dirname();\n init_buffer2();\n init_process2();\n\n // ../../../node_modules/.pnpm/@nktkas+hyperliquid@0.25.7_typescript@5.8.3/node_modules/@nktkas/hyperliquid/esm/src/api/subscription/allMids.js\n init_dirname();\n init_buffer2();\n init_process2();\n\n // ../../../node_modules/.pnpm/@nktkas+hyperliquid@0.25.7_typescript@5.8.3/node_modules/@nktkas/hyperliquid/esm/src/api/subscription/assetCtxs.js\n init_dirname();\n init_buffer2();\n init_process2();\n\n // ../../../node_modules/.pnpm/@nktkas+hyperliquid@0.25.7_typescript@5.8.3/node_modules/@nktkas/hyperliquid/esm/src/api/subscription/bbo.js\n init_dirname();\n init_buffer2();\n init_process2();\n\n // ../../../node_modules/.pnpm/@nktkas+hyperliquid@0.25.7_typescript@5.8.3/node_modules/@nktkas/hyperliquid/esm/src/api/subscription/candle.js\n init_dirname();\n init_buffer2();\n init_process2();\n\n // ../../../node_modules/.pnpm/@nktkas+hyperliquid@0.25.7_typescript@5.8.3/node_modules/@nktkas/hyperliquid/esm/src/api/subscription/clearinghouseState.js\n init_dirname();\n init_buffer2();\n init_process2();\n\n // ../../../node_modules/.pnpm/@nktkas+hyperliquid@0.25.7_typescript@5.8.3/node_modules/@nktkas/hyperliquid/esm/src/api/subscription/explorerBlock.js\n init_dirname();\n init_buffer2();\n init_process2();\n\n // ../../../node_modules/.pnpm/@nktkas+hyperliquid@0.25.7_typescript@5.8.3/node_modules/@nktkas/hyperliquid/esm/src/api/subscription/explorerTxs.js\n init_dirname();\n init_buffer2();\n init_process2();\n\n // ../../../node_modules/.pnpm/@nktkas+hyperliquid@0.25.7_typescript@5.8.3/node_modules/@nktkas/hyperliquid/esm/src/api/subscription/l2Book.js\n init_dirname();\n init_buffer2();\n init_process2();\n\n // ../../../node_modules/.pnpm/@nktkas+hyperliquid@0.25.7_typescript@5.8.3/node_modules/@nktkas/hyperliquid/esm/src/api/subscription/notification.js\n init_dirname();\n init_buffer2();\n init_process2();\n\n // ../../../node_modules/.pnpm/@nktkas+hyperliquid@0.25.7_typescript@5.8.3/node_modules/@nktkas/hyperliquid/esm/src/api/subscription/openOrders.js\n init_dirname();\n init_buffer2();\n init_process2();\n\n // ../../../node_modules/.pnpm/@nktkas+hyperliquid@0.25.7_typescript@5.8.3/node_modules/@nktkas/hyperliquid/esm/src/api/subscription/orderUpdates.js\n init_dirname();\n init_buffer2();\n init_process2();\n\n // ../../../node_modules/.pnpm/@nktkas+hyperliquid@0.25.7_typescript@5.8.3/node_modules/@nktkas/hyperliquid/esm/src/api/subscription/trades.js\n init_dirname();\n init_buffer2();\n init_process2();\n\n // ../../../node_modules/.pnpm/@nktkas+hyperliquid@0.25.7_typescript@5.8.3/node_modules/@nktkas/hyperliquid/esm/src/api/subscription/userEvents.js\n init_dirname();\n init_buffer2();\n init_process2();\n\n // ../../../node_modules/.pnpm/@nktkas+hyperliquid@0.25.7_typescript@5.8.3/node_modules/@nktkas/hyperliquid/esm/src/api/subscription/userFills.js\n init_dirname();\n init_buffer2();\n init_process2();\n\n // ../../../node_modules/.pnpm/@nktkas+hyperliquid@0.25.7_typescript@5.8.3/node_modules/@nktkas/hyperliquid/esm/src/api/subscription/userFundings.js\n init_dirname();\n init_buffer2();\n init_process2();\n\n // ../../../node_modules/.pnpm/@nktkas+hyperliquid@0.25.7_typescript@5.8.3/node_modules/@nktkas/hyperliquid/esm/src/api/subscription/userHistoricalOrders.js\n init_dirname();\n init_buffer2();\n init_process2();\n\n // ../../../node_modules/.pnpm/@nktkas+hyperliquid@0.25.7_typescript@5.8.3/node_modules/@nktkas/hyperliquid/esm/src/api/subscription/userNonFundingLedgerUpdates.js\n init_dirname();\n init_buffer2();\n init_process2();\n\n // ../../../node_modules/.pnpm/@nktkas+hyperliquid@0.25.7_typescript@5.8.3/node_modules/@nktkas/hyperliquid/esm/src/api/subscription/userTwapHistory.js\n init_dirname();\n init_buffer2();\n init_process2();\n\n // ../../../node_modules/.pnpm/@nktkas+hyperliquid@0.25.7_typescript@5.8.3/node_modules/@nktkas/hyperliquid/esm/src/api/subscription/userTwapSliceFills.js\n init_dirname();\n init_buffer2();\n init_process2();\n\n // ../../../node_modules/.pnpm/@nktkas+hyperliquid@0.25.7_typescript@5.8.3/node_modules/@nktkas/hyperliquid/esm/src/api/subscription/webData3.js\n init_dirname();\n init_buffer2();\n init_process2();\n\n // src/lib/types.ts\n init_dirname();\n init_buffer2();\n init_process2();\n var HYPERLIQUID_BRIDGE_ADDRESS_MAINNET = \"0x2Df1c51E09aECF9cacB7bc98cB1742757f163dF7\";\n var ARBITRUM_USDC_ADDRESS_MAINNET = \"0xaf88d065e77c8cC2239327C5EDb3A432268e5831\";\n\n // src/lib/schemas.ts\n init_dirname();\n init_buffer2();\n init_process2();\n init_esm5();\n var actionTypeSchema = external_exports.enum([\n \"deposit\",\n \"withdraw\",\n \"sendSpotAsset\",\n \"sendPerpUsdc\",\n \"transferToSpot\",\n \"transferToPerp\",\n \"spotBuy\",\n \"spotSell\",\n \"perpLong\",\n \"perpShort\",\n \"cancelOrder\",\n \"cancelAllOrdersForSymbol\",\n \"approveBuilderCode\"\n ]);\n var depositParamsSchema = external_exports.object({\n amount: external_exports.string().describe(\"Amount of USDC to deposit (minimum 6 USDC: 5 USDC + 1 USDC fee)\")\n });\n var withdrawParamsSchema = external_exports.object({\n amount: external_exports.string().describe(\n 'Amount of USDC to withdraw from Hyperliquid to L1 (Arbitrum), specified in micro-units as a string (e.g., \"1000000\" means 1.0 USDC; 1 USDC = 1,000,000 micro-units).'\n ),\n destination: external_exports.string().optional().describe(\n \"Destination address on L1 (Arbitrum) to receive the withdrawn USDC. If not provided, defaults to the Agent Wallet PKP ETH address.\"\n )\n });\n var transferParamsSchema = external_exports.object({\n amount: external_exports.string().describe(\n 'Amount of USDC to transfer to spot or perp, specified in micro-units as a string (e.g., \"1000000\" means 1.0 USDC; 1 USDC = 1,000,000 micro-units).'\n )\n });\n var sendSpotAssetParamsSchema = external_exports.object({\n destination: external_exports.string().describe(\"Destination Hyperliquid spot account address to send assets to\"),\n token: external_exports.string().describe('Token symbol to send (e.g., \"USDC\", \"PURR\", etc.)'),\n amount: external_exports.string().describe(\n 'Amount to send, specified in Hyperliquid defined micro-units as a string (e.g., USDC generally has 6 decimals, but Hyperliquid defines it as having 8 decimals so \"100000000\" means 1.0 USDC).'\n )\n });\n var sendPerpUsdcParamsSchema = external_exports.object({\n destination: external_exports.string().describe(\"Destination Hyperliquid perp account address to send USDC to\"),\n amount: external_exports.string().describe(\n 'Amount of USDC to send, specified in micro-units as a string (e.g., \"1000000\" means 1.0 USDC; 1 USDC = 1,000,000 micro-units).'\n )\n });\n var orderTypeSchema = external_exports.discriminatedUnion(\"type\", [\n external_exports.object({\n type: external_exports.literal(\"limit\"),\n tif: external_exports.enum([\"Gtc\", \"Ioc\", \"Alo\"]).describe(\n \"Time in force: Gtc (Good Till Canceled), Ioc (Immediate Or Cancel), Alo (Add Liquidity Only)\"\n )\n }),\n external_exports.object({\n type: external_exports.literal(\"market\")\n })\n ]);\n var spotTradeParamsSchema = external_exports.object({\n symbol: external_exports.string().describe('Trading pair symbol (e.g., \"HYPE/USDC\")'),\n price: external_exports.string().describe(\"Limit price\"),\n size: external_exports.string().describe(\"Order size\"),\n orderType: orderTypeSchema.optional().describe(\n 'Order type: { type: \"limit\", tif: \"Gtc\" | \"Ioc\" | \"Alo\" } or { type: \"market\" }. Default: { type: \"limit\", tif: \"Gtc\" }'\n )\n }).refine(\n (data) => {\n const parts = data.symbol.split(\"/\");\n return parts.length === 2 && parts[0] && parts[1];\n },\n {\n message: \"Invalid trading pair format. Expected format: BASE/QUOTE (e.g., BTC/USDC)\"\n }\n );\n var cancelOrderParamsSchema = external_exports.object({\n symbol: external_exports.string().describe('Trading pair symbol (e.g., \"PURR/USDC\")'),\n orderId: external_exports.number().describe(\"Order ID to cancel\")\n }).refine(\n (data) => {\n const parts = data.symbol.split(\"/\");\n return parts.length === 2 && parts[0] && parts[1];\n },\n {\n message: \"Invalid trading pair format. Expected format: BASE/QUOTE (e.g., BTC/USDC)\"\n }\n );\n var cancelAllOrdersForSymbolParamsSchema = external_exports.object({\n symbol: external_exports.string().describe('Trading pair symbol to cancel all orders for (e.g., \"PURR/USDC\")')\n }).refine(\n (data) => {\n const parts = data.symbol.split(\"/\");\n return parts.length === 2 && parts[0] && parts[1];\n },\n {\n message: \"Invalid trading pair format. Expected format: BASE/QUOTE (e.g., BTC/USDC)\"\n }\n );\n var perpTradeParamsSchema = external_exports.object({\n symbol: external_exports.string().describe('Perpetual symbol (e.g., \"ETH\")'),\n price: external_exports.string().describe(\"Limit price\"),\n size: external_exports.string().describe(\"Order size in base asset\"),\n leverage: external_exports.number().min(1).max(10).describe(\"Leverage multiplier (1-10x)\"),\n isCross: external_exports.boolean().optional().describe(\"Cross leverage (default: true)\"),\n reduceOnly: external_exports.boolean().optional().describe(\n \"Reduce-only: if true, order will only reduce existing position and cannot increase it (default: false). Use this to close positions without worrying about exact size.\"\n ),\n orderType: orderTypeSchema.optional().describe(\n 'Order type: { type: \"limit\", tif: \"Gtc\" | \"Ioc\" | \"Alo\" } or { type: \"market\" }. Default: { type: \"limit\", tif: \"Gtc\" }'\n )\n });\n var abilityParamsSchema = external_exports.object({\n action: actionTypeSchema.describe(\"Action type to execute\"),\n // Network selection\n useTestnet: external_exports.boolean().optional().describe(\"Use Hyperliquid testnet instead of mainnet (default: false)\"),\n // Deposit-specific params\n deposit: depositParamsSchema.optional().describe(\"Deposit parameters (required for deposit action)\"),\n // Withdraw-specific params\n withdraw: withdrawParamsSchema.optional().describe(\"Withdraw parameters (required for withdraw action)\"),\n // Send spot asset params\n sendSpotAsset: sendSpotAssetParamsSchema.optional().describe(\"Send spot asset parameters (required for sendSpotAsset action)\"),\n // Send perp USDC params\n sendPerpUsdc: sendPerpUsdcParamsSchema.optional().describe(\"Send perp USDC parameters (required for sendPerpUsdc action)\"),\n // Transfer to spot or perps params\n transfer: transferParamsSchema.optional().describe(\n \"Transfer to spot or perp parameters (required for transferToSpot/transferToPerp action)\"\n ),\n // Spot trading params\n spot: spotTradeParamsSchema.optional().describe(\"Spot trading parameters (required for spotBuy/spotSell)\"),\n // Perp trading params\n perp: perpTradeParamsSchema.optional().describe(\"Perpetual trading parameters (required for perpLong/perpShort)\"),\n // Cancel order params\n cancelOrder: cancelOrderParamsSchema.optional().describe(\"Cancel specific order (required for cancelOrder action)\"),\n // Cancel all orders for symbol params\n cancelAllOrdersForSymbol: cancelAllOrdersForSymbolParamsSchema.optional().describe(\"Cancel all orders for a symbol (required for cancelAllOrdersForSymbol action)\"),\n // Arbitrum RPC URL\n arbitrumRpcUrl: external_exports.string().optional().describe(\"Arbitrum RPC URL (required for precheck)\")\n }).refine(\n (data) => {\n if (data.action === \"deposit\")\n return !!data.deposit;\n if (data.action === \"withdraw\")\n return !!data.withdraw;\n if (data.action === \"sendSpotAsset\")\n return !!data.sendSpotAsset;\n if (data.action === \"sendPerpUsdc\")\n return !!data.sendPerpUsdc;\n if (data.action === \"transferToSpot\" || data.action === \"transferToPerp\")\n return !!data.transfer;\n if (data.action === \"spotBuy\" || data.action === \"spotSell\")\n return !!data.spot;\n if (data.action === \"perpLong\" || data.action === \"perpShort\")\n return !!data.perp;\n if (data.action === \"cancelOrder\")\n return !!data.cancelOrder;\n if (data.action === \"cancelAllOrdersForSymbol\")\n return !!data.cancelAllOrdersForSymbol;\n if (data.action === \"approveBuilderCode\")\n return true;\n return false;\n },\n {\n message: \"Missing required parameters for the specified action\"\n }\n );\n var precheckSuccessSchema = external_exports.object({\n action: external_exports.string().describe(\"Action that was prechecked\"),\n availableBalance: external_exports.string().optional().describe(\"The available balance of the asset in the Hyperliquid account\")\n });\n var precheckFailSchema = external_exports.object({\n action: external_exports.string().describe(\"Action that was prechecked\"),\n reason: external_exports.string().describe(\"The reason the precheck failed\"),\n availableBalance: external_exports.string().optional().describe(\"The available balance of the asset in the Hyperliquid account\"),\n requiredBalance: external_exports.string().optional().describe(\"The required balance of the asset in the Hyperliquid account\"),\n balanceAsset: external_exports.string().optional().describe(\"The asset in the Hyperliquid account\")\n });\n var executeFailSchema = external_exports.object({\n action: external_exports.string().describe(\"Action that was executed\"),\n reason: external_exports.string().describe(\"The reason the execution failed\")\n });\n var executeSuccessSchema = external_exports.object({\n action: external_exports.string().describe(\"Action that was executed\"),\n txHash: external_exports.string().optional().describe(\"Transaction hash (for deposit action)\"),\n withdrawResult: external_exports.any().optional().describe(\"Withdraw result (for withdraw action)\"),\n sendResult: external_exports.any().optional().describe(\"Send result (for sendAsset action)\"),\n transferResult: external_exports.any().optional().describe(\"Transfer result (for transferToSpot action)\"),\n orderResult: external_exports.any().optional().describe(\"Order result (for spotBuy/spotSell action)\"),\n cancelResult: external_exports.any().optional().describe(\"Cancel result (for spotCancelOrder/spotCancelAll action)\"),\n approveResult: external_exports.any().optional().describe(\"Approve builder code result (for approveBuilderCode action)\")\n });\n\n // src/lib/ability-helpers/index.ts\n init_dirname();\n init_buffer2();\n init_process2();\n\n // src/lib/ability-helpers/lit-action-pkp-ethers-wallet.ts\n init_dirname();\n init_buffer2();\n init_process2();\n var import_ethers = __toESM(require_lib32());\n var LitActionPkpEthersWallet = class {\n pkpPublicKey;\n sigName;\n address;\n constructor(pkpPublicKey, sigName = \"pkp-ethers-signature\") {\n const cleanedKey = pkpPublicKey.replace(/^0x/i, \"\");\n if (!/^[0-9a-fA-F]{130}$/.test(cleanedKey)) {\n throw new Error(\n `Invalid PKP public key format: expected 130 hex characters (uncompressed), got ${cleanedKey.length} chars`\n );\n }\n this.pkpPublicKey = cleanedKey.toLowerCase();\n this.sigName = sigName;\n this.address = import_ethers.ethers.utils.computeAddress(\"0x\" + this.pkpPublicKey);\n }\n /**\n * Sign a message using EIP-191 personal_sign format\n */\n async signMessage(message) {\n const messageHash = import_ethers.ethers.utils.hashMessage(message);\n const toSign = import_ethers.ethers.utils.arrayify(messageHash);\n const signatureResponse = await Lit.Actions.signAndCombineEcdsa({\n toSign,\n publicKey: this.pkpPublicKey,\n sigName: this.sigName\n });\n const parsedSig = JSON.parse(signatureResponse);\n return import_ethers.ethers.utils.joinSignature({\n r: normalizeSignatureComponent(parsedSig.r),\n s: normalizeSignatureComponent(parsedSig.s),\n v: parsedSig.v\n });\n }\n /**\n * Get the wallet address (required by AbstractEthersV5Signer)\n */\n async getAddress() {\n return this.address;\n }\n /**\n * Sign typed data using EIP-712 (required by AbstractEthersV5Signer)\n * Note: Ethers v5 uses _signTypedData (with underscore)\n */\n async _signTypedData(domain2, types, value) {\n if (!domain2?.verifyingContract || !types || !value) {\n throw new Error(\"Invalid typed data parameters\");\n }\n const normalizedValue = normalizeTypedDataValue(value, types);\n const hash3 = import_ethers.ethers.utils._TypedDataEncoder.hash(domain2, types, normalizedValue);\n const toSignBytes = import_ethers.ethers.utils.arrayify(hash3);\n const signatureResponse = await Lit.Actions.signAndCombineEcdsa({\n toSign: toSignBytes,\n publicKey: this.pkpPublicKey,\n sigName: this.sigName\n });\n const parsedSig = JSON.parse(signatureResponse);\n const vEthereum = parsedSig.v === 0 || parsedSig.v === 1 ? parsedSig.v + 27 : parsedSig.v;\n return import_ethers.ethers.utils.joinSignature({\n r: normalizeSignatureComponent(parsedSig.r),\n s: normalizeSignatureComponent(parsedSig.s),\n v: vEthereum\n });\n }\n /**\n * Sign a transaction\n * Note: Transaction must be pre-populated with all fields (gasLimit, nonce, chainId, etc.)\n * as we don't have RPC access in Lit Actions\n */\n async signTransaction(transaction) {\n const tx = { ...transaction };\n delete tx.from;\n const serializedTx = import_ethers.ethers.utils.serializeTransaction(tx);\n const toSign = import_ethers.ethers.utils.arrayify(import_ethers.ethers.utils.keccak256(serializedTx));\n const signatureResponse = await Lit.Actions.signAndCombineEcdsa({\n toSign,\n publicKey: this.pkpPublicKey,\n sigName: this.sigName\n });\n const parsedSig = JSON.parse(signatureResponse);\n return import_ethers.ethers.utils.serializeTransaction(tx, {\n r: normalizeSignatureComponent(parsedSig.r),\n s: normalizeSignatureComponent(parsedSig.s),\n v: parsedSig.v\n });\n }\n };\n function normalizeSignatureComponent(component) {\n if (typeof component !== \"string\") {\n throw new Error(`Invalid signature component type: expected string, got ${typeof component}`);\n }\n const hex = component.startsWith(\"0x\") ? component : \"0x\" + component;\n const length2 = import_ethers.ethers.utils.hexDataLength(hex);\n if (length2 === 33) {\n return import_ethers.ethers.utils.hexDataSlice(hex, 1);\n } else if (length2 === 32) {\n return hex;\n } else {\n throw new Error(`Invalid signature component length: expected 32 or 33 bytes, got ${length2}`);\n }\n }\n function normalizeTypedDataValue(value, types) {\n const normalized = {};\n const primaryType = Object.keys(types)[0];\n if (!primaryType || !types[primaryType]) {\n return value;\n }\n const fieldOrder = types[primaryType].map((f6) => f6.name);\n for (const fieldName of fieldOrder) {\n if (fieldName in value) {\n const fieldValue = value[fieldName];\n if (typeof fieldValue === \"object\" && fieldValue !== null && !Array.isArray(fieldValue) && !(fieldValue instanceof Uint8Array)) {\n const fieldType = types[primaryType].find((f6) => f6.name === fieldName)?.type;\n if (fieldType && types[fieldType]) {\n normalized[fieldName] = normalizeTypedDataValue(\n fieldValue,\n types\n );\n } else {\n normalized[fieldName] = fieldValue;\n }\n } else {\n normalized[fieldName] = fieldValue;\n }\n }\n }\n for (const key of Object.keys(value)) {\n if (!(key in normalized)) {\n normalized[key] = value[key];\n }\n }\n return normalized;\n }\n\n // src/lib/ability-helpers/cancel-order/cancel-order.ts\n init_dirname();\n init_buffer2();\n init_process2();\n\n // ../../../node_modules/.pnpm/@nktkas+hyperliquid@0.25.7_typescript@5.8.3/node_modules/@nktkas/hyperliquid/esm/src/utils/mod.js\n init_dirname();\n init_buffer2();\n init_process2();\n\n // ../../../node_modules/.pnpm/@nktkas+hyperliquid@0.25.7_typescript@5.8.3/node_modules/@nktkas/hyperliquid/esm/src/utils/_symbolConverter.js\n init_dirname();\n init_buffer2();\n init_process2();\n var SymbolConverter = class _SymbolConverter {\n transport;\n dexOption;\n nameToAssetId = /* @__PURE__ */ new Map();\n nameToSzDecimals = /* @__PURE__ */ new Map();\n nameToSpotPairId = /* @__PURE__ */ new Map();\n constructor(options) {\n this.transport = options.transport;\n this.dexOption = options.dexs ?? false;\n }\n /**\n * Create and initialize a SymbolConverter instance.\n * @param options - Configuration options including transport and optional dex support.\n * @returns Initialized SymbolConverter instance.\n * @example\n * ```ts\n * import { HttpTransport } from \"@nktkas/hyperliquid\";\n * import { SymbolConverter } from \"@nktkas/hyperliquid/utils\";\n *\n * const transport = new HttpTransport(); // or `WebSocketTransport`\n * const converter = await SymbolConverter.create({ transport });\n * ```\n */\n static async create(options) {\n const instance = new _SymbolConverter(options);\n await instance.reload();\n return instance;\n }\n /**\n * Reload asset mappings from the API.\n * Useful for refreshing data when new assets are added.\n */\n async reload() {\n const config2 = { transport: this.transport };\n const [perpMetaData, spotMetaData, perpDexsData] = await Promise.all([\n meta(config2),\n spotMeta(config2),\n perpDexs(config2)\n ]);\n if (!perpMetaData?.universe?.length) {\n throw new Error(\"Invalid perpetual metadata response\");\n }\n if (!spotMetaData?.universe?.length || !spotMetaData?.tokens?.length) {\n throw new Error(\"Invalid spot metadata response\");\n }\n this.nameToAssetId.clear();\n this.nameToSzDecimals.clear();\n this.nameToSpotPairId.clear();\n this.processDefaultPerps(perpMetaData);\n this.processSpotAssets(spotMetaData);\n if (this.dexOption !== false) {\n await this.processBuilderDexs(perpDexsData);\n }\n }\n processDefaultPerps(perpMeta) {\n perpMeta.universe.forEach((asset, index2) => {\n this.nameToAssetId.set(asset.name, index2);\n this.nameToSzDecimals.set(asset.name, asset.szDecimals);\n });\n }\n async processBuilderDexs(perpDexs2) {\n if (!perpDexs2 || perpDexs2.length <= 1)\n return;\n const builderDexs = perpDexs2.map((dex, index2) => ({ dex, index: index2 })).filter((item) => {\n return item.index > 0 && item.dex !== null && item.dex.name.length > 0;\n });\n if (builderDexs.length === 0)\n return;\n const dexsToProcess = Array.isArray(this.dexOption) ? builderDexs.filter((item) => this.dexOption.includes(item.dex.name)) : builderDexs;\n if (dexsToProcess.length === 0)\n return;\n const config2 = { transport: this.transport };\n const results = await Promise.allSettled(dexsToProcess.map((item) => meta(config2, { dex: item.dex.name })));\n results.forEach((result, idx) => {\n if (result.status !== \"fulfilled\")\n return;\n this.processBuilderDexResult(result.value, dexsToProcess[idx].index);\n });\n }\n processBuilderDexResult(meta2, perpDexIndex) {\n const offset = 1e5 + perpDexIndex * 1e4;\n meta2.universe.forEach((asset, index2) => {\n const assetId = offset + index2;\n this.nameToAssetId.set(asset.name, assetId);\n this.nameToSzDecimals.set(asset.name, asset.szDecimals);\n });\n }\n processSpotAssets(spotMeta2) {\n const tokenMap = /* @__PURE__ */ new Map();\n spotMeta2.tokens.forEach((token) => {\n tokenMap.set(token.index, { name: token.name, szDecimals: token.szDecimals });\n });\n spotMeta2.universe.forEach((market) => {\n if (market.tokens.length < 2)\n return;\n const baseToken = tokenMap.get(market.tokens[0]);\n const quoteToken = tokenMap.get(market.tokens[1]);\n if (!baseToken || !quoteToken)\n return;\n const assetId = 1e4 + market.index;\n const baseQuoteKey = `${baseToken.name}/${quoteToken.name}`;\n this.nameToAssetId.set(baseQuoteKey, assetId);\n this.nameToSzDecimals.set(baseQuoteKey, baseToken.szDecimals);\n this.nameToSpotPairId.set(baseQuoteKey, market.name);\n });\n }\n /**\n * Get asset ID for a coin.\n * - For Perpetuals, use the coin name (e.g., \"BTC\").\n * - For Spot markets, use the \"BASE/QUOTE\" format (e.g., \"HYPE/USDC\").\n * - For Builder Dex assets, use the \"DEX_NAME:ASSET_NAME\" format (e.g., \"test:ABC\").\n * @example \"BTC\" → 0, \"HYPE/USDC\" → 10107, \"test:ABC\" → 110000\n */\n getAssetId(name) {\n return this.nameToAssetId.get(name);\n }\n /**\n * Get size decimals for a coin.\n * - For Perpetuals, use the coin name (e.g., \"BTC\").\n * - For Spot markets, use the \"BASE/QUOTE\" format (e.g., \"HYPE/USDC\").\n * - For Builder Dex assets, use the \"DEX_NAME:ASSET_NAME\" format (e.g., \"test:ABC\").\n * @example \"BTC\" → 5, \"HYPE/USDC\" → 2, \"test:ABC\" → 0\n */\n getSzDecimals(name) {\n return this.nameToSzDecimals.get(name);\n }\n /**\n * Get spot pair ID for info endpoints and subscriptions (e.g., l2book, trades).\n *\n * Accepts spot markets in the \"BASE/QUOTE\" format (e.g., \"HFUN/USDC\").\n * @example \"HFUN/USDC\" → \"@2\", \"PURR/USDC\" → \"PURR/USDC\"\n */\n getSpotPairId(name) {\n return this.nameToSpotPairId.get(name);\n }\n };\n\n // ../../../node_modules/.pnpm/@nktkas+hyperliquid@0.25.7_typescript@5.8.3/node_modules/@nktkas/hyperliquid/esm/src/utils/_format.js\n init_dirname();\n init_buffer2();\n init_process2();\n\n // ../../../node_modules/.pnpm/@nktkas+hyperliquid@0.25.7_typescript@5.8.3/node_modules/@nktkas/hyperliquid/esm/src/api/exchange/~mod.js\n init_dirname();\n init_buffer2();\n init_process2();\n\n // src/lib/ability-helpers/cancel-order/cancel-order.ts\n var import_vincent_ability_sdk = __toESM(require_src2());\n\n // src/lib/ability-helpers/get-hyperliquid-nonce.ts\n init_dirname();\n init_buffer2();\n init_process2();\n async function getHyperliquidNonce() {\n const nonceResponse = await Lit.Actions.runOnce(\n { waitForResponse: true, name: \"HyperLiquidWithdrawNonce\" },\n async () => {\n return Date.now().toString();\n }\n );\n return parseInt(nonceResponse);\n }\n\n // src/lib/ability-helpers/cancel-order/cancel-order.ts\n async function cancelOrder({\n transport,\n pkpPublicKey,\n params,\n useTestnet = false\n }) {\n const converter = await SymbolConverter.create({ transport });\n const assetId = converter.getAssetId(params.symbol);\n if (assetId === void 0) {\n throw new Error(`Failed to get asset ID for ${params.symbol}. The trading pair may not exist.`);\n }\n const pkpWallet = new LitActionPkpEthersWallet(pkpPublicKey);\n const nonce = await getHyperliquidNonce();\n const cancelAction = parser(CancelRequest.entries.action)({\n type: \"cancel\",\n cancels: [\n {\n a: assetId,\n o: params.orderId\n }\n ]\n });\n const signature = await signL1Action({\n wallet: pkpWallet,\n action: cancelAction,\n nonce,\n isTestnet: useTestnet\n });\n const cancelResult = await Lit.Actions.runOnce(\n { waitForResponse: true, name: \"HyperLiquidCancelOrderRequest\" },\n async () => {\n return JSON.stringify(\n {\n result: await transport.request(\"exchange\", {\n action: cancelAction,\n signature,\n nonce\n })\n },\n import_vincent_ability_sdk.bigIntReplacer,\n 2\n );\n }\n );\n const parsedCancelResult = JSON.parse(cancelResult);\n console.log(\"[cancelSpotOrder] Cancel result\", parsedCancelResult);\n const cancelStatus = parsedCancelResult.result.response.data.statuses[0];\n if (typeof cancelStatus === \"object\" && cancelStatus.error !== void 0) {\n return {\n status: \"error\",\n reason: cancelStatus.error\n };\n }\n return {\n status: \"success\",\n cancelResult: parsedCancelResult.result\n };\n }\n\n // src/lib/ability-helpers/cancel-order/cancel-all-orders.ts\n init_dirname();\n init_buffer2();\n init_process2();\n async function cancelAllOrdersForSymbol({\n transport,\n pkpPublicKey,\n symbol,\n useTestnet = false\n }) {\n const converter = await SymbolConverter.create({ transport });\n const assetId = converter.getAssetId(symbol);\n if (assetId === void 0) {\n throw new Error(`Failed to get asset ID for ${symbol}. The trading pair may not exist.`);\n }\n const pkpWallet = new LitActionPkpEthersWallet(pkpPublicKey);\n const pkpAddress = await pkpWallet.getAddress();\n const infoClient = new InfoClient({ transport });\n const openOrders3 = await infoClient.openOrders({\n user: pkpAddress\n });\n const ordersToCancel = openOrders3.filter((order2) => order2.coin === symbol).map((order2) => ({\n a: assetId,\n o: order2.oid\n }));\n if (ordersToCancel.length === 0) {\n return {\n status: \"error\",\n reason: \"No open orders to cancel\"\n };\n }\n const nonce = await getHyperliquidNonce();\n const cancelAction = parser(CancelRequest.entries.action)({\n type: \"cancel\",\n cancels: ordersToCancel\n });\n const signature = await signL1Action({\n wallet: pkpWallet,\n action: cancelAction,\n nonce,\n isTestnet: useTestnet\n });\n const cancelResult = await Lit.Actions.runOnce(\n { waitForResponse: true, name: \"HyperLiquidCancelAllOrdersRequest\" },\n async () => {\n return JSON.stringify(\n await transport.request(\"exchange\", {\n action: cancelAction,\n signature,\n nonce\n })\n );\n }\n );\n const parsedCancelResult = JSON.parse(cancelResult);\n console.log(\"[cancelAllSpotOrders] Cancel result\", parsedCancelResult);\n return {\n status: \"success\",\n cancelResult: parsedCancelResult.result\n };\n }\n\n // src/lib/ability-helpers/send-deposit-tx.ts\n init_dirname();\n init_buffer2();\n init_process2();\n var import_ethers3 = __toESM(require_lib32());\n var import_vincent_ability_sdk2 = __toESM(require_src2());\n\n // src/lib/ability-helpers/sign-tx.ts\n init_dirname();\n init_buffer2();\n init_process2();\n var import_ethers2 = __toESM(require_lib32());\n var signTx = async (pkpPublicKey, tx, sigName) => {\n const publicKeyForLit = pkpPublicKey.replace(/^0x/, \"\");\n console.log(`Signing using PKP Public Key: ${publicKeyForLit} (signTx)`);\n const unsignedSerializedTx = import_ethers2.ethers.utils.serializeTransaction(tx);\n const txHash = import_ethers2.ethers.utils.keccak256(unsignedSerializedTx);\n console.log(\"Tx hash (signTx)\", txHash);\n const signatureResponse = await Lit.Actions.signAndCombineEcdsa({\n toSign: import_ethers2.ethers.utils.arrayify(txHash),\n publicKey: publicKeyForLit,\n sigName\n });\n const { r: r2, s: s4, v: v2 } = JSON.parse(signatureResponse);\n const ethersJoinedSignature = import_ethers2.ethers.utils.joinSignature({\n r: \"0x\" + r2.substring(2),\n s: \"0x\" + s4,\n v: v2\n });\n const signedSerializedTx = import_ethers2.ethers.utils.serializeTransaction(tx, ethersJoinedSignature);\n console.log(\"Signed serialized tx (signTx)\", signedSerializedTx);\n return signedSerializedTx;\n };\n\n // src/lib/ability-helpers/send-deposit-tx.ts\n var sendDepositTx = async ({\n rpcUrl,\n chainId,\n pkpEthAddress,\n pkpPublicKey,\n to,\n value,\n calldata,\n gasBufferPercentage,\n baseFeePerGasBufferPercentage,\n alchemyGasSponsor,\n alchemyGasSponsorApiKey,\n alchemyGasSponsorPolicyId\n }) => {\n if (alchemyGasSponsor) {\n console.log(\"[sendDepositTx] Alchemy gas sponsor is enabled\");\n if (!alchemyGasSponsorApiKey || !alchemyGasSponsorPolicyId) {\n throw new Error(\n \"[sendDepositTx] Alchemy gas sponsor is enabled, but API key or policy ID is not provided.\"\n );\n }\n return await (0, import_vincent_ability_sdk2.sponsoredGasRawTransaction)({\n pkpPublicKey,\n to,\n value,\n data: calldata,\n chainId,\n eip7702AlchemyApiKey: alchemyGasSponsorApiKey,\n eip7702AlchemyPolicyId: alchemyGasSponsorPolicyId\n });\n }\n console.log(\"[sendDepositTx] Estimating gas for Deposit transaction using pre-computed route\");\n const populateTxResponse = await Lit.Actions.runOnce(\n {\n waitForResponse: true,\n name: \"[sendDepositTx] Deposit tx gas estimation with pre-computed route\"\n },\n async () => {\n try {\n return JSON.stringify({\n status: \"success\",\n populatedTransaction: await (0, import_vincent_ability_sdk2.populateTransaction)({\n to,\n from: pkpEthAddress,\n value,\n data: calldata,\n rpcUrl,\n chainId,\n gasBufferPercentage,\n baseFeePerGasBufferPercentage\n })\n });\n } catch (error) {\n return JSON.stringify({\n status: \"error\",\n error: error instanceof Error ? error.message : String(error)\n });\n }\n }\n );\n const parsedPopulateTxResponse = JSON.parse(populateTxResponse);\n if (parsedPopulateTxResponse.status === \"error\") {\n throw new Error(\n `[sendDepositTx] Error populating transaction for deposit: ${parsedPopulateTxResponse.error}`\n );\n }\n const { populatedTransaction } = parsedPopulateTxResponse;\n const signedSwapTx = await signTx(pkpPublicKey, populatedTransaction, \"depositTxSig\");\n console.log(`[sendDepositTx] Broadcasting deposit transaction with pre-computed route`);\n const swapTxResponse = await Lit.Actions.runOnce(\n { waitForResponse: true, name: \"[sendDepositTx] Deposit tx sender\" },\n async () => {\n try {\n const rpcProvider = new import_ethers3.ethers.providers.StaticJsonRpcProvider(rpcUrl);\n const receipt = await rpcProvider.sendTransaction(signedSwapTx);\n return JSON.stringify({\n status: \"success\",\n txHash: receipt.hash\n });\n } catch (error) {\n return JSON.stringify({\n status: \"error\",\n error: error instanceof Error ? error.message : String(error)\n });\n }\n }\n );\n const parsedSwapTxResponse = JSON.parse(swapTxResponse);\n if (parsedSwapTxResponse.status === \"error\") {\n throw new Error(\n `[sendDepositTx] Error broadcasting deposit transaction: ${parsedSwapTxResponse.error}`\n );\n }\n const { txHash } = parsedSwapTxResponse;\n console.log(`[sendDepositTx] Deposit transaction broadcasted with pre-computed route: ${txHash}`);\n return txHash;\n };\n\n // src/lib/ability-helpers/transfer-usdc-to.ts\n init_dirname();\n init_buffer2();\n init_process2();\n var import_ethers4 = __toESM(require_lib32());\n var import_vincent_ability_sdk3 = __toESM(require_src2());\n\n // src/lib/ability-helpers/get-hyperliquid-chain-id.ts\n init_dirname();\n init_buffer2();\n init_process2();\n var getHyperliquidChainId = (useTestnet) => {\n return useTestnet ? \"0x66eee\" : \"0xa4b1\";\n };\n var getHyperliquidChainName = (useTestnet) => {\n return useTestnet ? \"Testnet\" : \"Mainnet\";\n };\n\n // src/lib/ability-helpers/transfer-usdc-to.ts\n async function transferUsdcTo({\n transport,\n pkpPublicKey,\n amount,\n to,\n useTestnet = false\n }) {\n if (to !== \"spot\" && to !== \"perp\") {\n throw new Error(\n '[transferUsdcTo] Invalid transfer destination. Must be either \"spot\" or \"perp\".'\n );\n }\n const nonce = await getHyperliquidNonce();\n const transferAction = parser(UsdClassTransferRequest.entries.action)({\n type: \"usdClassTransfer\",\n // Convert amount from raw units (e.g., \"1000000\" for 1.0 USDC) to formatted string (e.g., \"1.0\")\n // Hyperliquid expects the amount as a string in human-readable format\n amount: import_ethers4.ethers.utils.formatUnits(amount, 6),\n signatureChainId: getHyperliquidChainId(useTestnet),\n hyperliquidChain: getHyperliquidChainName(useTestnet),\n toPerp: to === \"perp\",\n nonce\n });\n const pkpEthersWallet = new LitActionPkpEthersWallet(pkpPublicKey);\n const signature = await signUserSignedAction({\n wallet: pkpEthersWallet,\n action: transferAction,\n types: UsdClassTransferTypes\n });\n const transferResult = await Lit.Actions.runOnce(\n { waitForResponse: true, name: \"HyperLiquidTransferRequest\" },\n async () => {\n return JSON.stringify(\n {\n result: await transport.request(\"exchange\", {\n action: transferAction,\n signature,\n nonce\n })\n },\n import_vincent_ability_sdk3.bigIntReplacer,\n 2\n );\n }\n );\n const parsedTransferResult = JSON.parse(transferResult);\n return {\n transferResult: parsedTransferResult.result\n };\n }\n\n // src/lib/ability-helpers/execute-spot-order.ts\n init_dirname();\n init_buffer2();\n init_process2();\n var import_vincent_ability_sdk4 = __toESM(require_src2());\n async function executeSpotOrder({\n transport,\n pkpPublicKey,\n params,\n useTestnet = false\n }) {\n const converter = await SymbolConverter.create({ transport });\n const assetId = converter.getAssetId(params.symbol);\n if (assetId === void 0) {\n throw new Error(`Failed to get asset ID for ${params.symbol}. The trading pair may not exist.`);\n }\n const pkpWallet = new LitActionPkpEthersWallet(pkpPublicKey);\n const nonce = await getHyperliquidNonce();\n const orderType = params.orderType || { type: \"limit\", tif: \"Gtc\" };\n const orderTypeField = orderType.type === \"market\" ? { limit: { tif: \"FrontendMarket\" } } : { limit: { tif: orderType.tif } };\n const orderActionParams = {\n type: \"order\",\n orders: [\n {\n a: assetId,\n b: params.isBuy,\n // true for buy, false for sell\n p: params.price,\n s: params.size,\n r: false,\n // reduce only (false for spot)\n t: orderTypeField\n }\n ],\n grouping: \"na\"\n };\n if (params.builderFee && !params.isBuy) {\n orderActionParams.builder = {\n b: params.builderFee.builderAddress,\n f: params.builderFee.feeInTenthsOfBps\n };\n }\n const orderAction = parser(OrderRequest.entries.action)(orderActionParams);\n const signature = await signL1Action({\n wallet: pkpWallet,\n action: orderAction,\n nonce,\n isTestnet: useTestnet\n });\n const orderResult = await Lit.Actions.runOnce(\n { waitForResponse: true, name: \"HyperLiquidSpotOrderRequest\" },\n async () => {\n return JSON.stringify(\n {\n result: await transport.request(\"exchange\", {\n action: orderAction,\n signature,\n nonce\n })\n },\n import_vincent_ability_sdk4.bigIntReplacer,\n 2\n );\n }\n );\n const parsedOrderResult = JSON.parse(orderResult);\n console.log(\"[executeSpotTrade] Order result\", parsedOrderResult);\n const spotOrderStatus = parsedOrderResult.result.response.data.statuses[0];\n if (spotOrderStatus.error !== void 0) {\n return {\n status: \"error\",\n error: spotOrderStatus.error\n };\n }\n return {\n status: \"success\",\n orderResult: parsedOrderResult.result\n };\n }\n\n // src/lib/ability-helpers/execute-perp-order.ts\n init_dirname();\n init_buffer2();\n init_process2();\n var import_vincent_ability_sdk5 = __toESM(require_src2());\n async function executePerpOrder({\n transport,\n pkpPublicKey,\n params,\n useTestnet = false\n }) {\n const converter = await SymbolConverter.create({ transport });\n const assetId = converter.getAssetId(params.symbol);\n if (assetId === void 0) {\n throw new Error(\n `Failed to get asset ID for ${params.symbol}. The perpetual contract may not exist.`\n );\n }\n const pkpWallet = new LitActionPkpEthersWallet(pkpPublicKey);\n if (params.leverage) {\n const leverageNonceResponse = await Lit.Actions.runOnce(\n { waitForResponse: true, name: \"HyperLiquidPerpLeverageNonce\" },\n async () => {\n return Date.now().toString();\n }\n );\n const leverageNonce = parseInt(leverageNonceResponse);\n const updateLeverageAction = parser(UpdateLeverageRequest.entries.action)({\n type: \"updateLeverage\",\n asset: assetId,\n isCross: params.leverage.isCross,\n leverage: params.leverage.leverage\n });\n const leverageSignature = await signL1Action({\n wallet: pkpWallet,\n action: updateLeverageAction,\n nonce: leverageNonce,\n isTestnet: useTestnet\n });\n await Lit.Actions.runOnce(\n { waitForResponse: true, name: \"HyperLiquidPerpLeverageRequest\" },\n async () => {\n return JSON.stringify(\n await transport.request(\"exchange\", {\n action: updateLeverageAction,\n signature: leverageSignature,\n nonce: leverageNonce\n })\n );\n }\n );\n console.log(\n `[executePerpOrder] Set leverage to ${params.leverage.leverage}x (${params.leverage.isCross ? \"cross\" : \"isolated\"})`\n );\n }\n const nonce = await getHyperliquidNonce();\n const orderType = params.orderType || { type: \"limit\", tif: \"Gtc\" };\n const orderTypeField = orderType.type === \"market\" ? { limit: { tif: \"FrontendMarket\" } } : { limit: { tif: orderType.tif } };\n const orderActionParams = {\n type: \"order\",\n orders: [\n {\n a: assetId,\n b: params.isLong,\n // true for long (buy), false for short (sell)\n p: params.price,\n s: params.size,\n r: params.reduceOnly ?? false,\n // reduce only (true to close positions, false for opening)\n t: orderTypeField\n }\n ],\n grouping: \"na\"\n };\n if (params.builderFee) {\n orderActionParams.builder = {\n b: params.builderFee.builderAddress,\n f: params.builderFee.feeInTenthsOfBps\n };\n }\n const orderAction = parser(OrderRequest.entries.action)(orderActionParams);\n const signature = await signL1Action({\n wallet: pkpWallet,\n action: orderAction,\n nonce,\n isTestnet: useTestnet\n });\n const orderResult = await Lit.Actions.runOnce(\n { waitForResponse: true, name: \"HyperLiquidPerpOrderRequest\" },\n async () => {\n return JSON.stringify(\n {\n result: await transport.request(\"exchange\", {\n action: orderAction,\n signature,\n nonce\n })\n },\n import_vincent_ability_sdk5.bigIntReplacer,\n 2\n );\n }\n );\n const parsedOrderResult = JSON.parse(orderResult);\n console.log(\"[executePerpOrder] Order result\", parsedOrderResult);\n const perpOrderStatus = parsedOrderResult.result.response.data.statuses[0];\n if (perpOrderStatus.error !== void 0) {\n return {\n status: \"error\",\n error: perpOrderStatus.error\n };\n }\n return {\n status: \"success\",\n orderResult: parsedOrderResult.result\n };\n }\n\n // src/lib/ability-helpers/withdraw-usdc.ts\n init_dirname();\n init_buffer2();\n init_process2();\n var import_ethers5 = __toESM(require_lib32());\n var import_vincent_ability_sdk6 = __toESM(require_src2());\n async function withdrawUsdc({\n transport,\n pkpPublicKey,\n amount,\n destination,\n useTestnet = false\n }) {\n const pkpWallet = new LitActionPkpEthersWallet(pkpPublicKey);\n const nonce = await getHyperliquidNonce();\n const withdrawAction = parser(Withdraw3Request.entries.action)({\n type: \"withdraw3\",\n signatureChainId: getHyperliquidChainId(useTestnet),\n hyperliquidChain: getHyperliquidChainName(useTestnet),\n destination,\n // Convert amount from raw units (e.g., \"1000000\" for 1.0 USDC) to formatted string (e.g., \"1.0\")\n // Hyperliquid expects the amount as a string in human-readable format\n amount: import_ethers5.ethers.utils.formatUnits(amount, 6),\n time: nonce\n });\n const signature = await signUserSignedAction({\n wallet: pkpWallet,\n action: withdrawAction,\n types: Withdraw3Types\n });\n const withdrawResult = await Lit.Actions.runOnce(\n { waitForResponse: true, name: \"HyperLiquidWithdrawRequest\" },\n async () => {\n return JSON.stringify(\n {\n result: await transport.request(\"exchange\", {\n action: withdrawAction,\n signature,\n nonce\n })\n },\n import_vincent_ability_sdk6.bigIntReplacer,\n 2\n );\n }\n );\n const parsedWithdrawResult = JSON.parse(withdrawResult);\n return {\n withdrawResult: parsedWithdrawResult.result\n };\n }\n\n // src/lib/ability-helpers/send-spot-asset.ts\n init_dirname();\n init_buffer2();\n init_process2();\n var import_ethers6 = __toESM(require_lib32());\n var import_vincent_ability_sdk7 = __toESM(require_src2());\n async function sendSpotAsset({\n transport,\n pkpPublicKey,\n destination,\n token,\n amount,\n useTestnet = false\n }) {\n const pkpWallet = new LitActionPkpEthersWallet(pkpPublicKey);\n const nonce = await getHyperliquidNonce();\n const infoClient = new InfoClient({ transport });\n const spotMeta2 = await infoClient.spotMeta();\n const tokenInfo = spotMeta2.tokens.find((t3) => t3.name === token);\n if (!tokenInfo) {\n throw new Error(`Token ${token} not found in spot metadata`);\n }\n console.log(\"[sendAsset] Token info:\", tokenInfo);\n const sendAction = parser(SpotSendRequest.entries.action)({\n type: \"spotSend\",\n signatureChainId: getHyperliquidChainId(useTestnet),\n hyperliquidChain: getHyperliquidChainName(useTestnet),\n destination,\n // Construct token identifier in the format expected by SpotSend: \"name:0xaddress\"\n token: `${tokenInfo.name}:${tokenInfo.tokenId}`,\n // Convert amount from smallest units (micro-units) to human-readable format\n // using weiDecimals which represents the exchange precision for amounts\n amount: import_ethers6.ethers.utils.formatUnits(amount, tokenInfo.weiDecimals),\n time: nonce\n });\n const signature = await signUserSignedAction({\n wallet: pkpWallet,\n action: sendAction,\n types: SpotSendTypes\n });\n const sendResult = await Lit.Actions.runOnce(\n { waitForResponse: true, name: \"HyperLiquidSendAssetRequest\" },\n async () => {\n return JSON.stringify(\n {\n result: await transport.request(\"exchange\", {\n action: sendAction,\n signature,\n nonce\n })\n },\n import_vincent_ability_sdk7.bigIntReplacer,\n 2\n );\n }\n );\n const parsedSendResult = JSON.parse(sendResult);\n return {\n sendResult: parsedSendResult.result\n };\n }\n\n // src/lib/ability-helpers/send-perp-usdc.ts\n init_dirname();\n init_buffer2();\n init_process2();\n var import_ethers7 = __toESM(require_lib32());\n var import_vincent_ability_sdk8 = __toESM(require_src2());\n async function sendPerpUsdc({\n transport,\n pkpPublicKey,\n destination,\n amount,\n useTestnet = false\n }) {\n const pkpWallet = new LitActionPkpEthersWallet(pkpPublicKey);\n const nonce = await getHyperliquidNonce();\n const sendAction = parser(UsdSendRequest.entries.action)({\n type: \"usdSend\",\n signatureChainId: getHyperliquidChainId(useTestnet),\n hyperliquidChain: getHyperliquidChainName(useTestnet),\n destination,\n // Convert amount from micro-units (6 decimals) to human-readable format\n // e.g., \"1000000\" -> \"1.0\"\n amount: import_ethers7.ethers.utils.formatUnits(amount, 6),\n time: nonce\n });\n const signature = await signUserSignedAction({\n wallet: pkpWallet,\n action: sendAction,\n types: UsdSendTypes\n });\n const sendResult = await Lit.Actions.runOnce(\n { waitForResponse: true, name: \"HyperLiquidSendPerpUsdcRequest\" },\n async () => {\n return JSON.stringify(\n {\n result: await transport.request(\"exchange\", {\n action: sendAction,\n signature,\n nonce\n })\n },\n import_vincent_ability_sdk8.bigIntReplacer,\n 2\n );\n }\n );\n const parsedSendResult = JSON.parse(sendResult);\n return {\n sendResult: parsedSendResult.result\n };\n }\n\n // src/lib/ability-helpers/approve-builder-code.ts\n init_dirname();\n init_buffer2();\n init_process2();\n var import_vincent_ability_sdk9 = __toESM(require_src2());\n async function approveBuilderCode({\n transport,\n pkpPublicKey,\n builderAddress,\n maxFeeRate,\n useTestnet = false\n }) {\n const pkpWallet = new LitActionPkpEthersWallet(pkpPublicKey);\n const nonce = await getHyperliquidNonce();\n const maxFeeRateWithPercent = maxFeeRate.endsWith(\"%\") ? maxFeeRate : `${maxFeeRate}%`;\n const approveAction = parser(ApproveBuilderFeeRequest.entries.action)({\n type: \"approveBuilderFee\",\n signatureChainId: getHyperliquidChainId(useTestnet),\n hyperliquidChain: getHyperliquidChainName(useTestnet),\n maxFeeRate: maxFeeRateWithPercent,\n builder: builderAddress,\n nonce\n });\n const signature = await signUserSignedAction({\n wallet: pkpWallet,\n action: approveAction,\n types: ApproveBuilderFeeTypes\n });\n const approveResult = await Lit.Actions.runOnce(\n { waitForResponse: true, name: \"HyperLiquidApproveBuilderFeeRequest\" },\n async () => {\n return JSON.stringify(\n {\n result: await transport.request(\"exchange\", {\n action: approveAction,\n signature,\n nonce\n })\n },\n import_vincent_ability_sdk9.bigIntReplacer,\n 2\n );\n }\n );\n const parsedApproveResult = JSON.parse(approveResult);\n return {\n approveResult: parsedApproveResult.result\n };\n }\n\n // src/lib/ability-checks/index.ts\n init_dirname();\n init_buffer2();\n init_process2();\n\n // src/lib/ability-checks/hyperliquid-account-exists.ts\n init_dirname();\n init_buffer2();\n init_process2();\n var hyperliquidAccountExists = async ({\n infoClient,\n ethAddress: ethAddress2\n }) => {\n try {\n await infoClient.clearinghouseState({ user: ethAddress2 });\n return true;\n } catch (error) {\n console.error(\n \"[@lit-protocol/vincent-ability-hyperliquid precheck] Error checking clearinghouse state\",\n error\n );\n const errorMessage = error instanceof Error ? error.message : String(error);\n if (errorMessage.includes(\"does not exist\")) {\n return false;\n } else {\n throw error;\n }\n }\n };\n\n // src/lib/ability-checks/deposit-usdc.ts\n init_dirname();\n init_buffer2();\n init_process2();\n var import_ethers8 = __toESM(require_lib32());\n var import_vincent_ability_sdk10 = __toESM(require_src2());\n var MIN_USDC_DEPOSIT_AMOUNT = import_ethers8.ethers.BigNumber.from(\"5000000\");\n var depositPrechecks = async ({\n provider,\n agentWalletPkpEthAddress,\n depositAmountInMicroUsdc\n }) => {\n const usdcContract = new import_ethers8.ethers.Contract(ARBITRUM_USDC_ADDRESS_MAINNET, import_vincent_ability_sdk10.ERC20_ABI, provider);\n const ethBalance = await provider.getBalance(agentWalletPkpEthAddress);\n if (ethBalance.eq(0n)) {\n return {\n success: false,\n reason: `Agent Wallet PKP has no ETH balance. Please fund the Agent Wallet PKP with ETH`\n };\n }\n const usdcBalance = await usdcContract.balanceOf(agentWalletPkpEthAddress);\n const _depositAmountInMicroUsdc = import_ethers8.ethers.BigNumber.from(depositAmountInMicroUsdc);\n if (_depositAmountInMicroUsdc.lt(MIN_USDC_DEPOSIT_AMOUNT)) {\n return {\n success: false,\n reason: `Deposit amount is less than the minimum deposit amount. Minimum deposit amount required: ${import_ethers8.ethers.utils.formatUnits(MIN_USDC_DEPOSIT_AMOUNT, 6)} USDC`,\n availableBalance: import_ethers8.ethers.utils.formatUnits(usdcBalance, 6)\n };\n }\n if (usdcBalance.lt(_depositAmountInMicroUsdc)) {\n return {\n success: false,\n reason: `Insufficient USDC balance. Attempted deposit amount: ${import_ethers8.ethers.utils.formatUnits(depositAmountInMicroUsdc, 6)} USDC, Available balance: ${import_ethers8.ethers.utils.formatUnits(usdcBalance, 6)} USDC`,\n availableBalance: import_ethers8.ethers.utils.formatUnits(usdcBalance, 6)\n };\n }\n return {\n success: true,\n availableBalance: import_ethers8.ethers.utils.formatUnits(usdcBalance, 6)\n };\n };\n\n // src/lib/ability-checks/transfer-usdc.ts\n init_dirname();\n init_buffer2();\n init_process2();\n var import_ethers9 = __toESM(require_lib32());\n async function transferPrechecks({\n infoClient,\n ethAddress: ethAddress2,\n params\n }) {\n if (params.to === \"spot\") {\n const clearinghouseState3 = await infoClient.clearinghouseState({\n user: ethAddress2\n });\n const availableUsdcBalance = import_ethers9.ethers.utils.parseUnits(\n clearinghouseState3.marginSummary.accountValue,\n 6\n // USDC has 6 decimals\n );\n const requestedAmount = import_ethers9.ethers.BigNumber.from(params.amount);\n if (availableUsdcBalance.lt(requestedAmount)) {\n return {\n success: false,\n reason: `Insufficient perp balance. Available: ${import_ethers9.ethers.utils.formatUnits(availableUsdcBalance, 6)} USDC, Requested: ${import_ethers9.ethers.utils.formatUnits(requestedAmount, 6)} USDC`,\n availableBalance: import_ethers9.ethers.utils.formatUnits(availableUsdcBalance, 6),\n requiredBalance: import_ethers9.ethers.utils.formatUnits(requestedAmount, 6)\n };\n }\n return {\n success: true,\n availableBalance: import_ethers9.ethers.utils.formatUnits(availableUsdcBalance, 6),\n requiredBalance: import_ethers9.ethers.utils.formatUnits(requestedAmount, 6)\n };\n } else {\n const spotState = await infoClient.spotClearinghouseState({\n user: ethAddress2\n });\n const usdcBalance = spotState.balances.find((b4) => b4.coin === \"USDC\");\n if (!usdcBalance) {\n return {\n success: false,\n reason: \"No USDC balance found in spot account\",\n availableBalance: \"0\"\n };\n }\n const availableUsdcBalance = import_ethers9.ethers.utils.parseUnits(usdcBalance.total, 8);\n const requestedAmount = import_ethers9.ethers.BigNumber.from(params.amount);\n if (availableUsdcBalance.lt(requestedAmount)) {\n return {\n success: false,\n reason: `Insufficient spot balance. Available: ${import_ethers9.ethers.utils.formatUnits(availableUsdcBalance, 8)} USDC, Requested: ${import_ethers9.ethers.utils.formatUnits(requestedAmount, 6)} USDC`,\n availableBalance: availableUsdcBalance.toString(),\n requiredBalance: import_ethers9.ethers.utils.formatUnits(requestedAmount, 6)\n };\n }\n return {\n success: true,\n availableBalance: availableUsdcBalance.toString(),\n requiredBalance: requestedAmount.toString()\n };\n }\n }\n\n // src/lib/ability-checks/spot.ts\n init_dirname();\n init_buffer2();\n init_process2();\n async function spotTradePrechecks({\n transport,\n ethAddress: ethAddress2,\n params\n }) {\n try {\n const converter = await SymbolConverter.create({ transport });\n const assetId = converter.getAssetId(params.symbol);\n if (assetId === void 0) {\n return {\n success: false,\n reason: `Trading pair ${params.symbol} does not exist`\n };\n }\n const infoClient = new InfoClient({ transport });\n try {\n await infoClient.clearinghouseState({ user: ethAddress2 });\n } catch (error) {\n const errorMessage = error instanceof Error ? error.message : String(error);\n if (errorMessage.includes(\"does not exist\")) {\n return {\n success: false,\n reason: \"Hyperliquid account does not exist. Please deposit first.\"\n };\n }\n throw error;\n }\n const spotState = await infoClient.spotClearinghouseState({\n user: ethAddress2\n });\n if (!spotState.balances || spotState.balances.length === 0) {\n return {\n success: false,\n reason: \"No spot balance found. Please transfer funds to spot account first.\"\n };\n }\n const [baseAsset, quoteAsset] = params.symbol.split(\"/\");\n if (params.isBuy) {\n const quoteBalance = spotState.balances.find((b4) => b4.coin === quoteAsset);\n if (!quoteBalance) {\n return {\n success: false,\n reason: `No ${quoteAsset} balance found in spot account. Cannot buy ${baseAsset}.`\n };\n }\n const availableQuote = parseFloat(quoteBalance.total) - parseFloat(quoteBalance.hold);\n if (availableQuote <= 0) {\n return {\n success: false,\n reason: `Insufficient available ${quoteAsset} balance. All ${quoteAsset} is locked in open orders.`\n };\n }\n } else {\n const baseBalance = spotState.balances.find((b4) => b4.coin === baseAsset);\n if (!baseBalance) {\n return {\n success: false,\n reason: `No ${baseAsset} balance found in spot account. Cannot sell ${baseAsset}.`\n };\n }\n const availableBase = parseFloat(baseBalance.total) - parseFloat(baseBalance.hold);\n if (availableBase <= 0) {\n return {\n success: false,\n reason: `Insufficient available ${baseAsset} balance. All ${baseAsset} is locked in open orders.`\n };\n }\n }\n return {\n success: true\n };\n } catch (error) {\n return {\n success: false,\n reason: error instanceof Error ? error.message : String(error)\n };\n }\n }\n\n // src/lib/ability-checks/perp.ts\n init_dirname();\n init_buffer2();\n init_process2();\n var import_ethers10 = __toESM(require_lib32());\n async function perpTradePrechecks({\n transport,\n ethAddress: ethAddress2,\n params\n }) {\n const converter = await SymbolConverter.create({ transport });\n const assetId = converter.getAssetId(params.symbol);\n if (assetId === void 0) {\n return {\n success: false,\n reason: `Perpetual contract ${params.symbol} does not exist`\n };\n }\n const infoClient = new InfoClient({ transport });\n const perpState = await infoClient.clearinghouseState({\n user: ethAddress2\n });\n if (!perpState.crossMarginSummary) {\n return {\n success: false,\n reason: \"No perp account found. Please transfer funds to perp account first.\"\n };\n }\n const availableMarginBN = import_ethers10.ethers.utils.parseUnits(perpState.crossMarginSummary.accountValue, 6);\n if (availableMarginBN.lte(0)) {\n return {\n success: false,\n reason: \"Insufficient perp account balance. Please transfer funds to perp account first.\",\n availableMargin: \"0\"\n };\n }\n return {\n success: true,\n availableMargin: perpState.crossMarginSummary.accountValue\n };\n }\n\n // src/lib/ability-checks/cancel.ts\n init_dirname();\n init_buffer2();\n init_process2();\n async function cancelOrderPrechecks({\n infoClient,\n ethAddress: ethAddress2,\n params\n }) {\n try {\n const openOrders3 = await infoClient.openOrders({\n user: ethAddress2\n });\n const orderExists = openOrders3.some((order2) => order2.oid === params.orderId);\n if (!orderExists) {\n return {\n success: false,\n reason: `Order ${params.orderId} not found or already filled/cancelled`\n };\n }\n return {\n success: true\n };\n } catch (error) {\n return {\n success: false,\n reason: error instanceof Error ? error.message : String(error)\n };\n }\n }\n async function cancelAllOrdersForSymbolPrechecks({\n infoClient,\n ethAddress: ethAddress2,\n params\n }) {\n try {\n const openOrders3 = await infoClient.openOrders({\n user: ethAddress2\n });\n const ordersForSymbol = openOrders3.filter((order2) => order2.coin === params.symbol);\n if (ordersForSymbol.length === 0) {\n return {\n success: false,\n reason: `No open orders found for ${params.symbol}`\n };\n }\n return {\n success: true,\n orderCount: ordersForSymbol.length\n };\n } catch (error) {\n return {\n success: false,\n reason: error instanceof Error ? error.message : String(error)\n };\n }\n }\n\n // src/lib/ability-checks/withdraw-usdc.ts\n init_dirname();\n init_buffer2();\n init_process2();\n var import_ethers11 = __toESM(require_lib32());\n async function withdrawPrechecks({\n infoClient,\n ethAddress: ethAddress2,\n params\n }) {\n const clearinghouseState3 = await infoClient.clearinghouseState({\n user: ethAddress2\n });\n const availableUsdcBalance = import_ethers11.ethers.utils.parseUnits(\n clearinghouseState3.marginSummary.accountValue,\n 6\n // USDC has 6 decimals\n );\n const requestedAmount = import_ethers11.ethers.BigNumber.from(params.amount);\n const minimumWithdrawAmount = import_ethers11.ethers.utils.parseUnits(\"1\", 6);\n if (requestedAmount.lt(minimumWithdrawAmount)) {\n return {\n success: false,\n reason: `Withdrawal amount must be at least 1 USDC due to withdrawal fee. Requested: ${import_ethers11.ethers.utils.formatUnits(requestedAmount, 6)} USDC`,\n availableBalance: import_ethers11.ethers.utils.formatUnits(availableUsdcBalance, 6),\n requiredBalance: import_ethers11.ethers.utils.formatUnits(minimumWithdrawAmount, 6)\n };\n }\n if (availableUsdcBalance.lt(requestedAmount)) {\n return {\n success: false,\n reason: `Insufficient perp balance for withdrawal. Available: ${import_ethers11.ethers.utils.formatUnits(availableUsdcBalance, 6)} USDC, Requested: ${import_ethers11.ethers.utils.formatUnits(requestedAmount, 6)} USDC`,\n availableBalance: import_ethers11.ethers.utils.formatUnits(availableUsdcBalance, 6),\n requiredBalance: import_ethers11.ethers.utils.formatUnits(requestedAmount, 6)\n };\n }\n return {\n success: true,\n availableBalance: import_ethers11.ethers.utils.formatUnits(availableUsdcBalance, 6),\n requiredBalance: import_ethers11.ethers.utils.formatUnits(requestedAmount, 6)\n };\n }\n\n // src/lib/ability-checks/send-spot-asset.ts\n init_dirname();\n init_buffer2();\n init_process2();\n var import_ethers12 = __toESM(require_lib32());\n async function sendSpotAssetPrechecks({\n infoClient,\n ethAddress: ethAddress2,\n params\n }) {\n if (!import_ethers12.ethers.utils.isAddress(params.destination)) {\n return {\n success: false,\n reason: `Invalid destination address: ${params.destination}`\n };\n }\n const spotMeta2 = await infoClient.spotMeta();\n const tokenInfo = spotMeta2.tokens.find((t3) => t3.name === params.token);\n if (!tokenInfo) {\n return {\n success: false,\n reason: `Token ${params.token} not found in spot metadata`\n };\n }\n const spotClearinghouseState2 = await infoClient.spotClearinghouseState({\n user: ethAddress2\n });\n const tokenBalance = spotClearinghouseState2.balances.find(\n (balance) => balance.coin === params.token\n );\n if (!tokenBalance) {\n return {\n success: false,\n reason: `No balance found for token: ${params.token}`,\n availableBalance: \"0\",\n requiredBalance: import_ethers12.ethers.utils.formatUnits(params.amount, tokenInfo.weiDecimals)\n };\n }\n const availableBalance = import_ethers12.ethers.BigNumber.from(\n import_ethers12.ethers.utils.parseUnits(tokenBalance.total, tokenInfo.weiDecimals)\n );\n console.log(\"[sendAssetPrechecks] Available balance:\", availableBalance);\n const requestedAmount = import_ethers12.ethers.BigNumber.from(params.amount);\n console.log(\"[sendAssetPrechecks] Requested amount:\", requestedAmount);\n if (availableBalance.lt(requestedAmount)) {\n return {\n success: false,\n reason: `Insufficient ${params.token} balance for send. Available: ${import_ethers12.ethers.utils.formatUnits(availableBalance, tokenInfo.weiDecimals)} ${params.token}, Requested: ${import_ethers12.ethers.utils.formatUnits(requestedAmount, tokenInfo.weiDecimals)} ${params.token}`,\n availableBalance: import_ethers12.ethers.utils.formatUnits(availableBalance, tokenInfo.weiDecimals),\n requiredBalance: import_ethers12.ethers.utils.formatUnits(requestedAmount, tokenInfo.weiDecimals)\n };\n }\n return {\n success: true,\n availableBalance: import_ethers12.ethers.utils.formatUnits(availableBalance, tokenInfo.weiDecimals),\n requiredBalance: import_ethers12.ethers.utils.formatUnits(requestedAmount, tokenInfo.weiDecimals)\n };\n }\n\n // src/lib/ability-checks/send-perp-usdc.ts\n init_dirname();\n init_buffer2();\n init_process2();\n var import_ethers13 = __toESM(require_lib32());\n async function sendPerpUsdcPrechecks({\n infoClient,\n ethAddress: ethAddress2,\n params\n }) {\n if (!import_ethers13.ethers.utils.isAddress(params.destination)) {\n return {\n success: false,\n reason: `Invalid destination address: ${params.destination}`\n };\n }\n const clearinghouseState3 = await infoClient.clearinghouseState({\n user: ethAddress2\n });\n const availableUsdcBalance = import_ethers13.ethers.utils.parseUnits(\n clearinghouseState3.marginSummary.accountValue,\n 6\n // USDC has 6 decimals\n );\n console.log(\"[sendPerpUsdcPrechecks] Available balance:\", availableUsdcBalance);\n const requestedAmount = import_ethers13.ethers.BigNumber.from(params.amount);\n console.log(\"[sendPerpUsdcPrechecks] Requested amount:\", requestedAmount);\n if (availableUsdcBalance.lt(requestedAmount)) {\n return {\n success: false,\n reason: `Insufficient perp balance for send. Available: ${import_ethers13.ethers.utils.formatUnits(availableUsdcBalance, 6)} USDC, Requested: ${import_ethers13.ethers.utils.formatUnits(requestedAmount, 6)} USDC`,\n availableBalance: import_ethers13.ethers.utils.formatUnits(availableUsdcBalance, 6),\n requiredBalance: import_ethers13.ethers.utils.formatUnits(requestedAmount, 6)\n };\n }\n return {\n success: true,\n availableBalance: import_ethers13.ethers.utils.formatUnits(availableUsdcBalance, 6),\n requiredBalance: import_ethers13.ethers.utils.formatUnits(requestedAmount, 6)\n };\n }\n\n // src/lib/ability-checks/is-builder-code-approved.ts\n init_dirname();\n init_buffer2();\n init_process2();\n var isBuilderCodeApproved = async ({\n infoClient,\n ethAddress: ethAddress2,\n builderAddress\n }) => {\n const maxFee = await infoClient.maxBuilderFee({\n user: ethAddress2,\n builder: builderAddress\n });\n const isApproved = typeof maxFee === \"number\" && maxFee > 0;\n console.log(\"[isBuilderCodeApproved] Builder approval check\", {\n ethAddress: ethAddress2,\n builderAddress,\n maxFee,\n isApproved\n });\n return isApproved;\n };\n\n // src/lib/constants.ts\n init_dirname();\n init_buffer2();\n init_process2();\n var HYPERLIQUID_BUILDER_ADDRESS = \"0x132Db5f531Ba38628F1640683354229daE04E8e6\";\n var HYPERLIQUID_BUILDER_FEE_RATE = \"0.05\";\n\n // src/lib/vincent-ability.ts\n function percentageToTenthsOfBps(percentageStr) {\n const percentage = parseFloat(percentageStr);\n return Math.round(percentage * 1e3);\n }\n var vincentAbility = (0, import_vincent_ability_sdk11.createVincentAbility)({\n packageName: \"@lit-protocol/vincent-ability-hyperliquid\",\n abilityDescription: \"Ability to interact with the Hyperliquid API\",\n abilityParamsSchema,\n supportedPolicies: (0, import_vincent_ability_sdk11.supportedPoliciesForAbility)([]),\n precheckSuccessSchema,\n precheckFailSchema,\n executeSuccessSchema,\n executeFailSchema,\n precheck: async ({ abilityParams: abilityParams2 }, { succeed, fail, delegation: { delegatorPkpInfo } }) => {\n console.log(\n \"[@lit-protocol/vincent-ability-hyperliquid precheck]\",\n JSON.stringify(abilityParams2, import_vincent_ability_sdk11.bigIntReplacer, 2)\n );\n const { action, arbitrumRpcUrl, useTestnet = false } = abilityParams2;\n const transport = new HttpTransport({ isTestnet: useTestnet });\n const infoClient = new InfoClient({ transport });\n const hyperLiquidAccountExists = await hyperliquidAccountExists({\n infoClient,\n ethAddress: delegatorPkpInfo.ethAddress\n });\n if (action === \"spotSell\" /* SPOT_SELL */ || action === \"perpLong\" /* PERP_LONG */ || action === \"perpShort\" /* PERP_SHORT */) {\n const isBuilderApproved = await isBuilderCodeApproved({\n infoClient,\n ethAddress: delegatorPkpInfo.ethAddress,\n builderAddress: HYPERLIQUID_BUILDER_ADDRESS\n });\n if (!isBuilderApproved) {\n return fail({\n action,\n reason: `Builder code is not approved. Please approve the builder code: ${HYPERLIQUID_BUILDER_ADDRESS}`\n });\n }\n }\n if (action === \"deposit\" /* DEPOSIT */) {\n if (useTestnet) {\n return fail({\n action,\n reason: \"Deposit is not supported on Hyperliquid testnet. Please refer to these docs for getting testnet USDC: https://hyperliquid.gitbook.io/hyperliquid-docs/onboarding/testnet-faucet\"\n });\n }\n if (!arbitrumRpcUrl) {\n return fail({ action, reason: \"Arbitrum RPC URL is required for precheck\" });\n }\n if (!abilityParams2.deposit) {\n return fail({ action, reason: \"Deposit parameters are required for precheck\" });\n }\n const result = await depositPrechecks({\n provider: new import_ethers14.ethers.providers.StaticJsonRpcProvider(arbitrumRpcUrl),\n agentWalletPkpEthAddress: delegatorPkpInfo.ethAddress,\n depositAmountInMicroUsdc: abilityParams2.deposit.amount,\n useTestnet\n });\n if (!result.success) {\n return fail({ action, reason: result.reason, availableBalance: result.availableBalance });\n }\n return succeed({\n action\n });\n }\n if (!hyperLiquidAccountExists) {\n return fail({\n action,\n reason: \"Hyperliquid account does not exist. Please deposit first.\"\n });\n }\n switch (action) {\n case \"withdraw\" /* WITHDRAW */: {\n if (!abilityParams2.withdraw) {\n return fail({ action, reason: \"Withdraw parameters are required for precheck\" });\n }\n const result = await withdrawPrechecks({\n infoClient,\n ethAddress: delegatorPkpInfo.ethAddress,\n params: {\n amount: abilityParams2.withdraw.amount\n }\n });\n if (!result.success) {\n return fail({\n action,\n reason: result.reason,\n availableBalance: result.availableBalance,\n requiredBalance: result.requiredBalance\n });\n }\n return succeed({\n action,\n availableBalance: result.availableBalance\n });\n }\n case \"sendSpotAsset\" /* SEND_SPOT_ASSET */: {\n if (!abilityParams2.sendSpotAsset) {\n return fail({ action, reason: \"Send asset parameters are required for precheck\" });\n }\n const result = await sendSpotAssetPrechecks({\n infoClient,\n ethAddress: delegatorPkpInfo.ethAddress,\n params: {\n destination: abilityParams2.sendSpotAsset.destination,\n token: abilityParams2.sendSpotAsset.token,\n amount: abilityParams2.sendSpotAsset.amount\n }\n });\n if (!result.success) {\n return fail({\n action,\n reason: result.reason,\n availableBalance: result.availableBalance,\n requiredBalance: result.requiredBalance\n });\n }\n return succeed({\n action,\n availableBalance: result.availableBalance\n });\n }\n case \"sendPerpUsdc\" /* SEND_PERP_USDC */: {\n if (!abilityParams2.sendPerpUsdc) {\n return fail({ action, reason: \"Send perp USDC parameters are required for precheck\" });\n }\n const result = await sendPerpUsdcPrechecks({\n infoClient,\n ethAddress: delegatorPkpInfo.ethAddress,\n params: {\n destination: abilityParams2.sendPerpUsdc.destination,\n amount: abilityParams2.sendPerpUsdc.amount\n }\n });\n if (!result.success) {\n return fail({\n action,\n reason: result.reason,\n availableBalance: result.availableBalance,\n requiredBalance: result.requiredBalance\n });\n }\n return succeed({\n action,\n availableBalance: result.availableBalance\n });\n }\n case \"transferToSpot\" /* TRANSFER_TO_SPOT */:\n case \"transferToPerp\" /* TRANSFER_TO_PERP */: {\n if (!abilityParams2.transfer) {\n return fail({ action, reason: \"Transfer to spot parameters are required for precheck\" });\n }\n const result = await transferPrechecks({\n infoClient,\n ethAddress: delegatorPkpInfo.ethAddress,\n params: {\n amount: abilityParams2.transfer.amount,\n to: action === \"transferToSpot\" /* TRANSFER_TO_SPOT */ ? \"spot\" : \"perp\"\n }\n });\n if (!result.success) {\n return fail({\n action,\n reason: result.reason,\n availableBalance: result.availableBalance,\n requiredBalance: result.requiredBalance\n });\n }\n return succeed({\n action,\n availableBalance: result.availableBalance\n });\n }\n case \"spotBuy\" /* SPOT_BUY */:\n case \"spotSell\" /* SPOT_SELL */: {\n if (!abilityParams2.spot) {\n return fail({ action, reason: \"Spot trade parameters are required for precheck\" });\n }\n const checkResult = await spotTradePrechecks({\n transport,\n ethAddress: delegatorPkpInfo.ethAddress,\n params: {\n symbol: abilityParams2.spot.symbol,\n price: abilityParams2.spot.price,\n size: abilityParams2.spot.size,\n isBuy: action === \"spotBuy\" /* SPOT_BUY */\n }\n });\n if (!checkResult.success) {\n return fail({\n action,\n reason: checkResult.reason\n });\n }\n return succeed({ action });\n }\n case \"perpLong\" /* PERP_LONG */:\n case \"perpShort\" /* PERP_SHORT */: {\n if (!abilityParams2.perp) {\n return fail({ action, reason: \"Perp trade parameters are required for precheck\" });\n }\n const checkResult = await perpTradePrechecks({\n transport,\n ethAddress: delegatorPkpInfo.ethAddress,\n params: {\n symbol: abilityParams2.perp.symbol\n }\n });\n if (!checkResult.success) {\n return fail({ action, reason: checkResult.reason || \"Unknown error\" });\n }\n return succeed({ action });\n }\n case \"cancelOrder\" /* CANCEL_ORDER */: {\n if (!abilityParams2.cancelOrder) {\n return fail({ action, reason: \"Cancel order parameters are required for precheck\" });\n }\n const result = await cancelOrderPrechecks({\n infoClient,\n ethAddress: delegatorPkpInfo.ethAddress,\n params: {\n orderId: abilityParams2.cancelOrder.orderId\n }\n });\n if (!result.success) {\n return fail({\n action,\n reason: result.reason\n });\n }\n return succeed({ action });\n }\n case \"cancelAllOrdersForSymbol\" /* CANCEL_ALL_ORDERS_FOR_SYMBOL */: {\n if (!abilityParams2.cancelAllOrdersForSymbol) {\n return fail({\n action,\n reason: \"Cancel all orders for symbol parameters are required for precheck\"\n });\n }\n const result = await cancelAllOrdersForSymbolPrechecks({\n infoClient,\n ethAddress: delegatorPkpInfo.ethAddress,\n params: {\n symbol: abilityParams2.cancelAllOrdersForSymbol.symbol\n }\n });\n if (!result.success) {\n return fail({\n action,\n reason: result.reason\n });\n }\n return succeed({ action });\n }\n case \"approveBuilderCode\" /* APPROVE_BUILDER_CODE */: {\n const isBuilderApproved = await isBuilderCodeApproved({\n infoClient,\n ethAddress: delegatorPkpInfo.ethAddress,\n builderAddress: HYPERLIQUID_BUILDER_ADDRESS\n });\n if (isBuilderApproved) {\n return fail({\n action,\n reason: `Builder code ${HYPERLIQUID_BUILDER_ADDRESS} is already approved`\n });\n }\n return succeed({ action });\n }\n default:\n return fail({ action, reason: `Unknown action: ${action}` });\n }\n },\n execute: async ({ abilityParams: abilityParams2 }, { succeed, fail, delegation: { delegatorPkpInfo } }) => {\n console.log(\n \"[@lit-protocol/vincent-ability-hyperliquid execute]\",\n JSON.stringify(abilityParams2, import_vincent_ability_sdk11.bigIntReplacer, 2)\n );\n const { action, useTestnet = false } = abilityParams2;\n const transport = new HttpTransport({ isTestnet: useTestnet });\n if (action === \"spotSell\" /* SPOT_SELL */ || action === \"perpLong\" /* PERP_LONG */ || action === \"perpShort\" /* PERP_SHORT */) {\n const isBuilderApproved = await isBuilderCodeApproved({\n infoClient: new InfoClient({ transport }),\n ethAddress: delegatorPkpInfo.ethAddress,\n builderAddress: HYPERLIQUID_BUILDER_ADDRESS\n });\n if (!isBuilderApproved) {\n console.log(\n `[@lit-protocol/vincent-ability-hyperliquid execute] Builder code: ${HYPERLIQUID_BUILDER_ADDRESS} is not approved. Approving...`\n );\n const result = await approveBuilderCode({\n transport,\n pkpPublicKey: delegatorPkpInfo.publicKey,\n builderAddress: HYPERLIQUID_BUILDER_ADDRESS,\n maxFeeRate: HYPERLIQUID_BUILDER_FEE_RATE,\n useTestnet\n });\n if (result.approveResult.status === \"ok\") {\n console.log(\n `[@lit-protocol/vincent-ability-hyperliquid execute] Builder code: ${HYPERLIQUID_BUILDER_ADDRESS} approved.`\n );\n } else {\n return fail({\n action,\n reason: `Failed to approve builder code: ${HYPERLIQUID_BUILDER_ADDRESS}`\n });\n }\n }\n }\n try {\n switch (action) {\n case \"deposit\" /* DEPOSIT */: {\n if (useTestnet) {\n return fail({\n action,\n reason: \"Deposit is not supported on Hyperliquid testnet. Please refer to these docs for getting testnet USDC: https://hyperliquid.gitbook.io/hyperliquid-docs/onboarding/testnet-faucet\"\n });\n }\n if (!abilityParams2.deposit) {\n return fail({ action, reason: \"Deposit parameters are required\" });\n }\n const rpcUrl = await Lit.Actions.getRpcUrl({\n chain: \"arbitrum\"\n });\n const iface = new import_ethers14.ethers.utils.Interface(import_vincent_ability_sdk11.ERC20_ABI);\n const calldata = iface.encodeFunctionData(\"transfer\", [\n HYPERLIQUID_BRIDGE_ADDRESS_MAINNET,\n abilityParams2.deposit.amount\n ]);\n const txHash = await sendDepositTx({\n rpcUrl,\n chainId: 42161,\n // Arbitrum mainnet\n pkpEthAddress: delegatorPkpInfo.ethAddress,\n pkpPublicKey: delegatorPkpInfo.publicKey,\n to: ARBITRUM_USDC_ADDRESS_MAINNET,\n value: \"0x0\",\n calldata\n });\n return succeed({\n action,\n txHash\n });\n }\n case \"withdraw\" /* WITHDRAW */: {\n if (!abilityParams2.withdraw) {\n return fail({ action, reason: \"Withdraw parameters are required\" });\n }\n const result = await withdrawUsdc({\n transport,\n pkpPublicKey: delegatorPkpInfo.publicKey,\n amount: abilityParams2.withdraw.amount,\n destination: abilityParams2.withdraw.destination || delegatorPkpInfo.ethAddress,\n useTestnet\n });\n if (result.withdrawResult.status === \"ok\") {\n return succeed({ action, withdrawResult: result.withdrawResult });\n }\n return fail({\n action,\n reason: `Unexpected response status: ${JSON.stringify(result.withdrawResult, null, 2)}`\n });\n }\n case \"sendSpotAsset\" /* SEND_SPOT_ASSET */: {\n if (!abilityParams2.sendSpotAsset) {\n return fail({ action, reason: \"Send spot asset parameters are required\" });\n }\n const result = await sendSpotAsset({\n transport,\n pkpPublicKey: delegatorPkpInfo.publicKey,\n destination: abilityParams2.sendSpotAsset.destination,\n token: abilityParams2.sendSpotAsset.token,\n amount: abilityParams2.sendSpotAsset.amount,\n useTestnet\n });\n if (result.sendResult.status === \"ok\") {\n return succeed({ action, sendResult: result.sendResult });\n }\n return fail({\n action,\n reason: `Unexpected response status: ${JSON.stringify(result.sendResult, null, 2)}`\n });\n }\n case \"sendPerpUsdc\" /* SEND_PERP_USDC */: {\n if (!abilityParams2.sendPerpUsdc) {\n return fail({ action, reason: \"Send perp USDC parameters are required\" });\n }\n const result = await sendPerpUsdc({\n transport,\n pkpPublicKey: delegatorPkpInfo.publicKey,\n destination: abilityParams2.sendPerpUsdc.destination,\n amount: abilityParams2.sendPerpUsdc.amount,\n useTestnet\n });\n if (result.sendResult.status === \"ok\") {\n return succeed({ action, sendResult: result.sendResult });\n }\n return fail({\n action,\n reason: `Unexpected response status: ${JSON.stringify(result.sendResult, null, 2)}`\n });\n }\n case \"transferToSpot\" /* TRANSFER_TO_SPOT */:\n case \"transferToPerp\" /* TRANSFER_TO_PERP */: {\n if (!abilityParams2.transfer) {\n return fail({\n action,\n reason: \"Transfer to parameters are required for transferToSpot/transferToPerp action\"\n });\n }\n const result = await transferUsdcTo({\n transport,\n pkpPublicKey: delegatorPkpInfo.publicKey,\n amount: abilityParams2.transfer.amount,\n to: action === \"transferToSpot\" ? \"spot\" : \"perp\",\n useTestnet: abilityParams2.useTestnet ?? false\n });\n if (result.transferResult.status === \"ok\") {\n return succeed({ action, transferResult: result.transferResult });\n }\n return fail({\n action,\n reason: `Unexpected response status: ${JSON.stringify(result.transferResult, null, 2)}`\n });\n }\n case \"spotBuy\" /* SPOT_BUY */:\n case \"spotSell\" /* SPOT_SELL */: {\n if (!abilityParams2.spot) {\n return fail({ action, reason: \"Spot trade parameters are required\" });\n }\n const isSell = action === \"spotSell\" /* SPOT_SELL */;\n const builderFee = isSell ? {\n builderAddress: HYPERLIQUID_BUILDER_ADDRESS,\n feeInTenthsOfBps: percentageToTenthsOfBps(HYPERLIQUID_BUILDER_FEE_RATE)\n } : void 0;\n const result = await executeSpotOrder({\n transport,\n pkpPublicKey: delegatorPkpInfo.publicKey,\n params: {\n symbol: abilityParams2.spot.symbol,\n price: abilityParams2.spot.price,\n size: abilityParams2.spot.size,\n isBuy: action === \"spotBuy\",\n orderType: abilityParams2.spot.orderType,\n builderFee\n },\n useTestnet\n });\n if (result.status === \"error\") {\n return fail({\n action,\n reason: result.error\n });\n }\n return succeed({\n action,\n orderResult: result.orderResult\n });\n }\n case \"perpLong\" /* PERP_LONG */:\n case \"perpShort\" /* PERP_SHORT */: {\n if (!abilityParams2.perp) {\n return fail({ action, reason: \"Perp trade parameters are required\" });\n }\n const result = await executePerpOrder({\n transport,\n pkpPublicKey: delegatorPkpInfo.publicKey,\n params: {\n symbol: abilityParams2.perp.symbol,\n price: abilityParams2.perp.price,\n size: abilityParams2.perp.size,\n isLong: action === \"perpLong\",\n reduceOnly: abilityParams2.perp.reduceOnly,\n orderType: abilityParams2.perp.orderType,\n leverage: {\n leverage: abilityParams2.perp.leverage,\n isCross: abilityParams2.perp.isCross ?? true\n },\n builderFee: {\n builderAddress: HYPERLIQUID_BUILDER_ADDRESS,\n feeInTenthsOfBps: percentageToTenthsOfBps(HYPERLIQUID_BUILDER_FEE_RATE)\n }\n },\n useTestnet\n });\n if (result.status === \"error\") {\n return fail({\n action,\n reason: result.error\n });\n }\n return succeed({\n action,\n orderResult: result.orderResult\n });\n }\n case \"cancelOrder\" /* CANCEL_ORDER */: {\n if (!abilityParams2.cancelOrder) {\n return fail({ action, reason: \"Cancel order parameters are required\" });\n }\n const result = await cancelOrder({\n transport,\n pkpPublicKey: delegatorPkpInfo.publicKey,\n params: {\n symbol: abilityParams2.cancelOrder.symbol,\n orderId: abilityParams2.cancelOrder.orderId\n },\n useTestnet\n });\n if (result.status === \"error\") {\n return fail({\n action,\n reason: result.reason\n });\n }\n return succeed({\n action,\n cancelResult: result.cancelResult\n });\n }\n case \"cancelAllOrdersForSymbol\" /* CANCEL_ALL_ORDERS_FOR_SYMBOL */: {\n if (!abilityParams2.cancelAllOrdersForSymbol) {\n return fail({ action, reason: \"Cancel all orders for symbol parameters are required\" });\n }\n const result = await cancelAllOrdersForSymbol({\n transport,\n pkpPublicKey: delegatorPkpInfo.publicKey,\n symbol: abilityParams2.cancelAllOrdersForSymbol.symbol,\n useTestnet\n });\n if (result.status === \"error\") {\n return fail({\n action,\n reason: result.reason\n });\n }\n return succeed({\n action,\n cancelResult: result.cancelResult\n });\n }\n case \"approveBuilderCode\" /* APPROVE_BUILDER_CODE */: {\n const result = await approveBuilderCode({\n transport,\n pkpPublicKey: delegatorPkpInfo.publicKey,\n builderAddress: HYPERLIQUID_BUILDER_ADDRESS,\n maxFeeRate: HYPERLIQUID_BUILDER_FEE_RATE,\n useTestnet\n });\n if (result.approveResult.status === \"ok\") {\n return succeed({\n action,\n approveResult: result.approveResult\n });\n } else {\n return fail({\n action,\n reason: `Unexpected response status: ${JSON.stringify(result.approveResult, null, 2)}`\n });\n }\n }\n default:\n return fail({ action, reason: `Unknown action: ${action}` });\n }\n } catch (error) {\n console.error(\"[@lit-protocol/vincent-ability-hyperliquid execute] Error\", error);\n return fail({\n action,\n reason: error instanceof Error ? error.message : String(error)\n });\n }\n }\n });\n\n // src/lib/lit-action.ts\n (async () => {\n const func = (0, import_vincent_ability_sdk12.vincentAbilityHandler)({\n vincentAbility,\n context: {\n delegatorPkpEthAddress: context.delegatorPkpEthAddress\n },\n abilityParams\n });\n await func();\n })();\n})();\n/*! Bundled license information:\n\n@jspm/core/nodelibs/browser/chunk-DtuTasat.js:\n (*! ieee754. BSD-3-Clause License. Feross Aboukhadijeh *)\n\njs-sha3/src/sha3.js:\n (**\n * [js-sha3]{@link https://github.com/emn178/js-sha3}\n *\n * @version 0.8.0\n * @author Chen, Yi-Cyuan [emn178@gmail.com]\n * @copyright Chen, Yi-Cyuan 2015-2018\n * @license MIT\n *)\n\n@noble/hashes/utils.js:\n (*! noble-hashes - MIT License (c) 2022 Paul Miller (paulmillr.com) *)\n\n@noble/curves/abstract/utils.js:\n (*! noble-curves - MIT License (c) 2022 Paul Miller (paulmillr.com) *)\n\n@noble/curves/abstract/modular.js:\n (*! noble-curves - MIT License (c) 2022 Paul Miller (paulmillr.com) *)\n\n@noble/curves/abstract/curve.js:\n (*! noble-curves - MIT License (c) 2022 Paul Miller (paulmillr.com) *)\n\n@noble/curves/abstract/weierstrass.js:\n (*! noble-curves - MIT License (c) 2022 Paul Miller (paulmillr.com) *)\n\n@noble/curves/_shortw_utils.js:\n (*! noble-curves - MIT License (c) 2022 Paul Miller (paulmillr.com) *)\n\n@noble/curves/secp256k1.js:\n (*! noble-curves - MIT License (c) 2022 Paul Miller (paulmillr.com) *)\n\naes-js/lib.commonjs/aes.js:\n (*! MIT License. Copyright 2015-2022 Richard Moore . See LICENSE.txt. *)\n\n@noble/hashes/esm/utils.js:\n (*! noble-hashes - MIT License (c) 2022 Paul Miller (paulmillr.com) *)\n\n@noble/curves/esm/abstract/utils.js:\n (*! noble-curves - MIT License (c) 2022 Paul Miller (paulmillr.com) *)\n\n@noble/curves/esm/abstract/modular.js:\n (*! noble-curves - MIT License (c) 2022 Paul Miller (paulmillr.com) *)\n\n@noble/curves/esm/abstract/curve.js:\n (*! noble-curves - MIT License (c) 2022 Paul Miller (paulmillr.com) *)\n\n@noble/curves/esm/abstract/weierstrass.js:\n (*! noble-curves - MIT License (c) 2022 Paul Miller (paulmillr.com) *)\n\n@noble/curves/esm/_shortw_utils.js:\n (*! noble-curves - MIT License (c) 2022 Paul Miller (paulmillr.com) *)\n\n@noble/curves/esm/secp256k1.js:\n (*! noble-curves - MIT License (c) 2022 Paul Miller (paulmillr.com) *)\n\n@noble/curves/esm/utils.js:\n (*! noble-curves - MIT License (c) 2022 Paul Miller (paulmillr.com) *)\n\n@noble/curves/esm/abstract/modular.js:\n (*! noble-curves - MIT License (c) 2022 Paul Miller (paulmillr.com) *)\n\n@noble/curves/esm/abstract/curve.js:\n (*! noble-curves - MIT License (c) 2022 Paul Miller (paulmillr.com) *)\n\n@noble/curves/esm/abstract/weierstrass.js:\n (*! noble-curves - MIT License (c) 2022 Paul Miller (paulmillr.com) *)\n\n@noble/curves/esm/_shortw_utils.js:\n (*! noble-curves - MIT License (c) 2022 Paul Miller (paulmillr.com) *)\n\n@noble/curves/esm/secp256k1.js:\n (*! noble-curves - MIT License (c) 2022 Paul Miller (paulmillr.com) *)\n\n@scure/base/lib/esm/index.js:\n (*! scure-base - MIT License (c) 2022 Paul Miller (paulmillr.com) *)\n\n@scure/bip32/lib/esm/index.js:\n (*! scure-bip32 - MIT License (c) 2022 Patricio Palladino, Paul Miller (paulmillr.com) *)\n\n@scure/bip39/esm/index.js:\n (*! scure-bip39 - MIT License (c) 2022 Patricio Palladino, Paul Miller (paulmillr.com) *)\n\n@noble/curves/esm/nist.js:\n (*! noble-curves - MIT License (c) 2022 Paul Miller (paulmillr.com) *)\n\n@noble/curves/esm/p256.js:\n (*! noble-curves - MIT License (c) 2022 Paul Miller (paulmillr.com) *)\n\n@noble/hashes/utils.js:\n (*! noble-hashes - MIT License (c) 2022 Paul Miller (paulmillr.com) *)\n*/\n"; module.exports = { "code": code, - "ipfsCid": "QmaGop5dGvYeGpLd19FPH2i8fDqnHAHSgzyuhmetUqmU3C", + "ipfsCid": "QmeRz1hh6ejpaXiK2JDJbWpcNbAQvd4BzYgHCFErxGMCfS", }; diff --git a/packages/apps/ability-hyperliquid/src/generated/vincent-ability-metadata.json b/packages/apps/ability-hyperliquid/src/generated/vincent-ability-metadata.json index d42f7a2c0..71f269a3c 100644 --- a/packages/apps/ability-hyperliquid/src/generated/vincent-ability-metadata.json +++ b/packages/apps/ability-hyperliquid/src/generated/vincent-ability-metadata.json @@ -1,3 +1,3 @@ { - "ipfsCid": "QmaGop5dGvYeGpLd19FPH2i8fDqnHAHSgzyuhmetUqmU3C" + "ipfsCid": "QmeRz1hh6ejpaXiK2JDJbWpcNbAQvd4BzYgHCFErxGMCfS" } diff --git a/packages/apps/ability-hyperliquid/src/index.ts b/packages/apps/ability-hyperliquid/src/index.ts index 5857ed67c..a63f2886f 100644 --- a/packages/apps/ability-hyperliquid/src/index.ts +++ b/packages/apps/ability-hyperliquid/src/index.ts @@ -8,3 +8,9 @@ export type { CancelOrderResult } from './lib/ability-helpers/cancel-order/cance export type { CancelAllOrdersResult } from './lib/ability-helpers/cancel-order/cancel-all-orders'; export type { SpotOrderResult } from './lib/ability-helpers/execute-spot-order'; export type { PerpOrderResult } from './lib/ability-helpers/execute-perp-order'; +export type { ApproveBuilderCodeResult } from './lib/ability-helpers/approve-builder-code'; +export type { WithdrawUsdcResult } from './lib/ability-helpers/withdraw-usdc'; +export type { SendPerpUsdcResult } from './lib/ability-helpers/send-perp-usdc'; +export type { SendSpotAssetResult } from './lib/ability-helpers/send-spot-asset'; + +export { HYPERLIQUID_BUILDER_ADDRESS, HYPERLIQUID_BUILDER_FEE_RATE } from './lib/constants'; diff --git a/packages/apps/ability-hyperliquid/src/lib/ability-checks/index.ts b/packages/apps/ability-hyperliquid/src/lib/ability-checks/index.ts index 201685e0a..89c142991 100644 --- a/packages/apps/ability-hyperliquid/src/lib/ability-checks/index.ts +++ b/packages/apps/ability-hyperliquid/src/lib/ability-checks/index.ts @@ -7,3 +7,4 @@ export { cancelOrderPrechecks, cancelAllOrdersForSymbolPrechecks } from './cance export { withdrawPrechecks } from './withdraw-usdc'; export { sendSpotAssetPrechecks } from './send-spot-asset'; export { sendPerpUsdcPrechecks } from './send-perp-usdc'; +export { isBuilderCodeApproved } from './is-builder-code-approved'; diff --git a/packages/apps/ability-hyperliquid/src/lib/ability-checks/is-builder-code-approved.ts b/packages/apps/ability-hyperliquid/src/lib/ability-checks/is-builder-code-approved.ts new file mode 100644 index 000000000..66b7c4ff1 --- /dev/null +++ b/packages/apps/ability-hyperliquid/src/lib/ability-checks/is-builder-code-approved.ts @@ -0,0 +1,37 @@ +import type { InfoClient } from '@nktkas/hyperliquid'; + +/** + * Check if a given address has approved a given builder address + * @param infoClient - Hyperliquid InfoClient instance + * @param ethAddress - Ethereum address to check approval for + * @param builderAddress - Builder address to check approval for + * @returns true if the builder is approved, false otherwise + */ +export const isBuilderCodeApproved = async ({ + infoClient, + ethAddress, + builderAddress, +}: { + infoClient: InfoClient; + ethAddress: string; + builderAddress: string; +}): Promise => { + // Call maxBuilderFee to get the maximum builder fee approved for this builder + // If the builder is not approved, this will return 0 + const maxFee = await infoClient.maxBuilderFee({ + user: ethAddress as `0x${string}`, + builder: builderAddress as `0x${string}`, + }); + + // Builder is approved if maxFee is greater than 0 + const isApproved = typeof maxFee === 'number' && maxFee > 0; + + console.log('[isBuilderCodeApproved] Builder approval check', { + ethAddress, + builderAddress, + maxFee, + isApproved, + }); + + return isApproved; +}; diff --git a/packages/apps/ability-hyperliquid/src/lib/ability-helpers/approve-builder-code.ts b/packages/apps/ability-hyperliquid/src/lib/ability-helpers/approve-builder-code.ts new file mode 100644 index 000000000..8bf3af3f5 --- /dev/null +++ b/packages/apps/ability-hyperliquid/src/lib/ability-helpers/approve-builder-code.ts @@ -0,0 +1,85 @@ +import * as hyperliquid from '@nktkas/hyperliquid'; +import { + ApproveBuilderFeeRequest, + ApproveBuilderFeeTypes, + SuccessResponse, + parser, +} from '@nktkas/hyperliquid/api/exchange'; +import { signUserSignedAction } from '@nktkas/hyperliquid/signing'; +import { bigIntReplacer } from '@lit-protocol/vincent-ability-sdk'; + +import { LitActionPkpEthersWallet } from './lit-action-pkp-ethers-wallet'; +import { getHyperliquidNonce } from './get-hyperliquid-nonce'; +import { getHyperliquidChainId, getHyperliquidChainName } from './get-hyperliquid-chain-id'; + +export type ApproveBuilderCodeResult = { + approveResult: SuccessResponse | hyperliquid.ErrorResponse; +}; + +/** + * Approve a builder code (builder address) with a maximum fee rate on Hyperliquid + * @param transport - Hyperliquid HTTP transport instance + * @param pkpPublicKey - PKP public key for signing + * @param builderAddress - Builder address to approve + * @param maxFeeRate - Maximum fee rate as a percentage string (e.g., "0.01" for 0.01%) + * @param useTestnet - Whether to use testnet (default: false) + * @returns Approval result from Hyperliquid + */ +export async function approveBuilderCode({ + transport, + pkpPublicKey, + builderAddress, + maxFeeRate, + useTestnet = false, +}: { + transport: hyperliquid.HttpTransport; + pkpPublicKey: string; + builderAddress: string; + maxFeeRate: string; // e.g., "0.01" for 0.01% + useTestnet?: boolean; +}): Promise { + const pkpWallet = new LitActionPkpEthersWallet(pkpPublicKey); + const nonce = await getHyperliquidNonce(); + + // Ensure maxFeeRate has the % suffix (required by Hyperliquid schema) + const maxFeeRateWithPercent = maxFeeRate.endsWith('%') ? maxFeeRate : `${maxFeeRate}%`; + + // Construct approve builder fee action + const approveAction = parser(ApproveBuilderFeeRequest.entries.action)({ + type: 'approveBuilderFee', + signatureChainId: getHyperliquidChainId(useTestnet), + hyperliquidChain: getHyperliquidChainName(useTestnet), + maxFeeRate: maxFeeRateWithPercent, + builder: builderAddress, + nonce, + }); + + // ApproveBuilderFee is a user-signed action that uses EIP-712 typed data + const signature = await signUserSignedAction({ + wallet: pkpWallet, + action: approveAction, + types: ApproveBuilderFeeTypes, + }); + + const approveResult = await Lit.Actions.runOnce( + { waitForResponse: true, name: 'HyperLiquidApproveBuilderFeeRequest' }, + async () => { + return JSON.stringify( + { + result: await transport.request('exchange', { + action: approveAction, + signature, + nonce, + }), + }, + bigIntReplacer, + 2, + ); + }, + ); + + const parsedApproveResult = JSON.parse(approveResult); + return { + approveResult: parsedApproveResult.result as SuccessResponse | hyperliquid.ErrorResponse, + }; +} diff --git a/packages/apps/ability-hyperliquid/src/lib/ability-helpers/execute-perp-order.ts b/packages/apps/ability-hyperliquid/src/lib/ability-helpers/execute-perp-order.ts index 3271e1a48..a77306098 100644 --- a/packages/apps/ability-hyperliquid/src/lib/ability-helpers/execute-perp-order.ts +++ b/packages/apps/ability-hyperliquid/src/lib/ability-helpers/execute-perp-order.ts @@ -40,6 +40,17 @@ export interface PerpTradeParams { leverage: number; // 1-10x isCross: boolean; // true for cross margin, false for isolated }; + /** + * Builder fee configuration. + * Applies to both long and short orders for perpetuals. + * Fee is specified in tenths of basis points (e.g., 10 = 0.01% = 1 basis point). + * Maximum builder fee is 0.1% (100 tenths of basis points) for perps. + * @see https://hyperliquid.gitbook.io/hyperliquid-docs/for-developers/api/exchange-endpoint#builder-codes + */ + builderFee?: { + builderAddress: string; // Builder address + feeInTenthsOfBps: number; // Fee in tenths of basis points (e.g., 10 = 0.01%) + }; } export type PerpOrderResult = PerpOrderResultSuccess | PerpOrderResultFailure; @@ -135,7 +146,22 @@ export async function executePerpOrder({ : { limit: { tif: orderType.tif } }; // Construct order action - const orderAction = parser(OrderRequest.entries.action)({ + const orderActionParams: { + type: 'order'; + orders: Array<{ + a: number; + b: boolean; + p: string; + s: string; + r: boolean; + t: typeof orderTypeField; + }>; + grouping: 'na'; + builder?: { + b: `0x${string}`; + f: number; + }; + } = { type: 'order', orders: [ { @@ -148,7 +174,18 @@ export async function executePerpOrder({ }, ], grouping: 'na', - }); + }; + + // Add builder fee if provided + // Builder codes apply to both long and short orders for perpetuals + if (params.builderFee) { + orderActionParams.builder = { + b: params.builderFee.builderAddress as `0x${string}`, + f: params.builderFee.feeInTenthsOfBps, + }; + } + + const orderAction = parser(OrderRequest.entries.action)(orderActionParams); // Sign and send const signature = await signL1Action({ diff --git a/packages/apps/ability-hyperliquid/src/lib/ability-helpers/execute-spot-order.ts b/packages/apps/ability-hyperliquid/src/lib/ability-helpers/execute-spot-order.ts index e246b761b..8a4209cff 100644 --- a/packages/apps/ability-hyperliquid/src/lib/ability-helpers/execute-spot-order.ts +++ b/packages/apps/ability-hyperliquid/src/lib/ability-helpers/execute-spot-order.ts @@ -21,6 +21,16 @@ export interface SpotTradeParams { * @default { type: 'limit', tif: 'Gtc' } */ orderType?: { type: 'limit'; tif: TimeInForce } | { type: 'market' }; + /** + * Builder fee configuration. + * Only applies to sell orders (builder codes do not apply to buying side of spot trades). + * Fee is specified in tenths of basis points (e.g., 50 = 0.05% = 5 basis points). + * @see https://hyperliquid.gitbook.io/hyperliquid-docs/for-developers/api/exchange-endpoint#builder-codes + */ + builderFee?: { + builderAddress: string; // Builder address + feeInTenthsOfBps: number; // Fee in tenths of basis points (e.g., 50 = 0.05%) + }; } export type SpotOrderResult = SpotOrderResultSuccess | SpotOrderResultFailure; @@ -71,7 +81,23 @@ export async function executeSpotOrder({ : { limit: { tif: orderType.tif } }; // Construct order action - const orderAction = parser(OrderRequest.entries.action)({ + // Note: Builder codes only apply to sell orders (not buy orders) for spot trades + const orderActionParams: { + type: 'order'; + orders: Array<{ + a: number; + b: boolean; + p: string; + s: string; + r: boolean; + t: typeof orderTypeField; + }>; + grouping: 'na'; + builder?: { + b: `0x${string}`; + f: number; + }; + } = { type: 'order', orders: [ { @@ -84,7 +110,18 @@ export async function executeSpotOrder({ }, ], grouping: 'na', - }); + }; + + // Add builder fee if provided and this is a sell order + // Builder codes do not apply to the buying side of spot trades + if (params.builderFee && !params.isBuy) { + orderActionParams.builder = { + b: params.builderFee.builderAddress as `0x${string}`, + f: params.builderFee.feeInTenthsOfBps, + }; + } + + const orderAction = parser(OrderRequest.entries.action)(orderActionParams); // Sign and send const signature = await signL1Action({ diff --git a/packages/apps/ability-hyperliquid/src/lib/ability-helpers/index.ts b/packages/apps/ability-hyperliquid/src/lib/ability-helpers/index.ts index f2e545d16..7f7039f56 100644 --- a/packages/apps/ability-hyperliquid/src/lib/ability-helpers/index.ts +++ b/packages/apps/ability-hyperliquid/src/lib/ability-helpers/index.ts @@ -8,3 +8,4 @@ export { executePerpOrder } from './execute-perp-order'; export { withdrawUsdc } from './withdraw-usdc'; export { sendSpotAsset } from './send-spot-asset'; export { sendPerpUsdc } from './send-perp-usdc'; +export { approveBuilderCode } from './approve-builder-code'; diff --git a/packages/apps/ability-hyperliquid/src/lib/ability-helpers/send-perp-usdc.ts b/packages/apps/ability-hyperliquid/src/lib/ability-helpers/send-perp-usdc.ts index c9c3b9b6e..9ff1bcd9a 100644 --- a/packages/apps/ability-hyperliquid/src/lib/ability-helpers/send-perp-usdc.ts +++ b/packages/apps/ability-hyperliquid/src/lib/ability-helpers/send-perp-usdc.ts @@ -14,7 +14,7 @@ import { getHyperliquidNonce } from './get-hyperliquid-nonce'; import { getHyperliquidChainId, getHyperliquidChainName } from './get-hyperliquid-chain-id'; export type SendPerpUsdcResult = { - sendResult: SuccessResponse; + sendResult: SuccessResponse | hyperliquid.ErrorResponse; }; /** @@ -75,6 +75,6 @@ export async function sendPerpUsdc({ const parsedSendResult = JSON.parse(sendResult); return { - sendResult: parsedSendResult.result as SuccessResponse, + sendResult: parsedSendResult.result as SuccessResponse | hyperliquid.ErrorResponse, }; } diff --git a/packages/apps/ability-hyperliquid/src/lib/ability-helpers/send-spot-asset.ts b/packages/apps/ability-hyperliquid/src/lib/ability-helpers/send-spot-asset.ts index 625fa1684..1cc10c424 100644 --- a/packages/apps/ability-hyperliquid/src/lib/ability-helpers/send-spot-asset.ts +++ b/packages/apps/ability-hyperliquid/src/lib/ability-helpers/send-spot-asset.ts @@ -14,7 +14,7 @@ import { getHyperliquidNonce } from './get-hyperliquid-nonce'; import { getHyperliquidChainId, getHyperliquidChainName } from './get-hyperliquid-chain-id'; export type SendSpotAssetResult = { - sendResult: SuccessResponse; + sendResult: SuccessResponse | hyperliquid.ErrorResponse; }; /** @@ -89,6 +89,6 @@ export async function sendSpotAsset({ const parsedSendResult = JSON.parse(sendResult); return { - sendResult: parsedSendResult.result as SuccessResponse, + sendResult: parsedSendResult.result as SuccessResponse | hyperliquid.ErrorResponse, }; } diff --git a/packages/apps/ability-hyperliquid/src/lib/ability-helpers/transfer-usdc-to.ts b/packages/apps/ability-hyperliquid/src/lib/ability-helpers/transfer-usdc-to.ts index 700abb361..56d111cda 100644 --- a/packages/apps/ability-hyperliquid/src/lib/ability-helpers/transfer-usdc-to.ts +++ b/packages/apps/ability-hyperliquid/src/lib/ability-helpers/transfer-usdc-to.ts @@ -14,7 +14,7 @@ import { getHyperliquidNonce } from './get-hyperliquid-nonce'; import { getHyperliquidChainId, getHyperliquidChainName } from './get-hyperliquid-chain-id'; export type TransferUsdcResult = { - transferResult: SuccessResponse; + transferResult: SuccessResponse | hyperliquid.ErrorResponse; }; /** @@ -79,6 +79,6 @@ export async function transferUsdcTo({ const parsedTransferResult = JSON.parse(transferResult); return { - transferResult: parsedTransferResult.result as SuccessResponse, + transferResult: parsedTransferResult.result as SuccessResponse | hyperliquid.ErrorResponse, }; } diff --git a/packages/apps/ability-hyperliquid/src/lib/ability-helpers/withdraw-usdc.ts b/packages/apps/ability-hyperliquid/src/lib/ability-helpers/withdraw-usdc.ts index d06ac59bc..fab94efb3 100644 --- a/packages/apps/ability-hyperliquid/src/lib/ability-helpers/withdraw-usdc.ts +++ b/packages/apps/ability-hyperliquid/src/lib/ability-helpers/withdraw-usdc.ts @@ -14,7 +14,7 @@ import { getHyperliquidNonce } from './get-hyperliquid-nonce'; import { getHyperliquidChainId, getHyperliquidChainName } from './get-hyperliquid-chain-id'; export type WithdrawUsdcResult = { - withdrawResult: SuccessResponse; + withdrawResult: SuccessResponse | hyperliquid.ErrorResponse; }; /** @@ -75,6 +75,6 @@ export async function withdrawUsdc({ const parsedWithdrawResult = JSON.parse(withdrawResult); return { - withdrawResult: parsedWithdrawResult.result as SuccessResponse, + withdrawResult: parsedWithdrawResult.result as SuccessResponse | hyperliquid.ErrorResponse, }; } diff --git a/packages/apps/ability-hyperliquid/src/lib/constants.ts b/packages/apps/ability-hyperliquid/src/lib/constants.ts new file mode 100644 index 000000000..93d70c491 --- /dev/null +++ b/packages/apps/ability-hyperliquid/src/lib/constants.ts @@ -0,0 +1,2 @@ +export const HYPERLIQUID_BUILDER_ADDRESS = '0x132Db5f531Ba38628F1640683354229daE04E8e6'; +export const HYPERLIQUID_BUILDER_FEE_RATE = '0.05'; // Percentage as string (e.g., "0.05" = 0.05%) diff --git a/packages/apps/ability-hyperliquid/src/lib/schemas.ts b/packages/apps/ability-hyperliquid/src/lib/schemas.ts index 8bc5fe8ec..e764bd389 100644 --- a/packages/apps/ability-hyperliquid/src/lib/schemas.ts +++ b/packages/apps/ability-hyperliquid/src/lib/schemas.ts @@ -13,6 +13,7 @@ export const actionTypeSchema = z.enum([ 'perpShort', 'cancelOrder', 'cancelAllOrdersForSymbol', + 'approveBuilderCode', ]); export const depositParamsSchema = z.object({ @@ -206,6 +207,7 @@ export const abilityParamsSchema = z if (data.action === 'perpLong' || data.action === 'perpShort') return !!data.perp; if (data.action === 'cancelOrder') return !!data.cancelOrder; if (data.action === 'cancelAllOrdersForSymbol') return !!data.cancelAllOrdersForSymbol; + if (data.action === 'approveBuilderCode') return true; // No params required return false; }, { @@ -251,4 +253,8 @@ export const executeSuccessSchema = z.object({ .any() .optional() .describe('Cancel result (for spotCancelOrder/spotCancelAll action)'), + approveResult: z + .any() + .optional() + .describe('Approve builder code result (for approveBuilderCode action)'), }); diff --git a/packages/apps/ability-hyperliquid/src/lib/types.ts b/packages/apps/ability-hyperliquid/src/lib/types.ts index e4b196811..16c606871 100644 --- a/packages/apps/ability-hyperliquid/src/lib/types.ts +++ b/packages/apps/ability-hyperliquid/src/lib/types.ts @@ -14,6 +14,7 @@ export enum HyperliquidAction { PERP_SHORT = 'perpShort', CANCEL_ORDER = 'cancelOrder', CANCEL_ALL_ORDERS_FOR_SYMBOL = 'cancelAllOrdersForSymbol', + APPROVE_BUILDER_CODE = 'approveBuilderCode', } /** diff --git a/packages/apps/ability-hyperliquid/src/lib/vincent-ability.ts b/packages/apps/ability-hyperliquid/src/lib/vincent-ability.ts index c520a0342..855284f51 100644 --- a/packages/apps/ability-hyperliquid/src/lib/vincent-ability.ts +++ b/packages/apps/ability-hyperliquid/src/lib/vincent-ability.ts @@ -29,6 +29,7 @@ import { withdrawUsdc, sendSpotAsset, sendPerpUsdc, + approveBuilderCode, } from './ability-helpers'; import { depositPrechecks, @@ -41,7 +42,20 @@ import { withdrawPrechecks, sendSpotAssetPrechecks, sendPerpUsdcPrechecks, + isBuilderCodeApproved, } from './ability-checks'; +import { HYPERLIQUID_BUILDER_ADDRESS, HYPERLIQUID_BUILDER_FEE_RATE } from './constants'; + +/** + * Convert percentage string to tenths of basis points + * Example: "0.05" (0.05%) = 50 tenths of basis points + * Formula: percentage * 1000 = tenths of basis points + * (since 1% = 100 basis points = 1000 tenths of basis points) + */ +function percentageToTenthsOfBps(percentageStr: string): number { + const percentage = parseFloat(percentageStr); + return Math.round(percentage * 1000); +} export const vincentAbility = createVincentAbility({ packageName: '@lit-protocol/vincent-ability-hyperliquid' as const, @@ -71,6 +85,25 @@ export const vincentAbility = createVincentAbility({ ethAddress: delegatorPkpInfo.ethAddress, }); + if ( + action === HyperliquidAction.SPOT_SELL || + action === HyperliquidAction.PERP_LONG || + action === HyperliquidAction.PERP_SHORT + ) { + const isBuilderApproved = await isBuilderCodeApproved({ + infoClient, + ethAddress: delegatorPkpInfo.ethAddress, + builderAddress: HYPERLIQUID_BUILDER_ADDRESS, + }); + + if (!isBuilderApproved) { + return fail({ + action, + reason: `Builder code is not approved. Please approve the builder code: ${HYPERLIQUID_BUILDER_ADDRESS}`, + }); + } + } + if (action === HyperliquidAction.DEPOSIT) { if (useTestnet) { return fail({ @@ -326,6 +359,23 @@ export const vincentAbility = createVincentAbility({ return succeed({ action }); } + case HyperliquidAction.APPROVE_BUILDER_CODE: { + const isBuilderApproved = await isBuilderCodeApproved({ + infoClient, + ethAddress: delegatorPkpInfo.ethAddress, + builderAddress: HYPERLIQUID_BUILDER_ADDRESS, + }); + + if (isBuilderApproved) { + return fail({ + action, + reason: `Builder code ${HYPERLIQUID_BUILDER_ADDRESS} is already approved`, + }); + } + + return succeed({ action }); + } + default: return fail({ action, reason: `Unknown action: ${action}` }); } @@ -341,6 +391,42 @@ export const vincentAbility = createVincentAbility({ const transport = new hyperliquid.HttpTransport({ isTestnet: useTestnet }); + if ( + action === HyperliquidAction.SPOT_SELL || + action === HyperliquidAction.PERP_LONG || + action === HyperliquidAction.PERP_SHORT + ) { + const isBuilderApproved = await isBuilderCodeApproved({ + infoClient: new hyperliquid.InfoClient({ transport }), + ethAddress: delegatorPkpInfo.ethAddress, + builderAddress: HYPERLIQUID_BUILDER_ADDRESS, + }); + + if (!isBuilderApproved) { + console.log( + `[@lit-protocol/vincent-ability-hyperliquid execute] Builder code: ${HYPERLIQUID_BUILDER_ADDRESS} is not approved. Approving...`, + ); + const result = await approveBuilderCode({ + transport, + pkpPublicKey: delegatorPkpInfo.publicKey, + builderAddress: HYPERLIQUID_BUILDER_ADDRESS, + maxFeeRate: HYPERLIQUID_BUILDER_FEE_RATE, + useTestnet, + }); + + if (result.approveResult.status === 'ok') { + console.log( + `[@lit-protocol/vincent-ability-hyperliquid execute] Builder code: ${HYPERLIQUID_BUILDER_ADDRESS} approved.`, + ); + } else { + return fail({ + action, + reason: `Failed to approve builder code: ${HYPERLIQUID_BUILDER_ADDRESS}. ${JSON.stringify(result.approveResult, null, 2)}`, + }); + } + } + } + try { switch (action) { case HyperliquidAction.DEPOSIT: { @@ -497,6 +583,14 @@ export const vincentAbility = createVincentAbility({ return fail({ action, reason: 'Spot trade parameters are required' }); } + const isSell = action === HyperliquidAction.SPOT_SELL; + const builderFee = isSell + ? { + builderAddress: HYPERLIQUID_BUILDER_ADDRESS, + feeInTenthsOfBps: percentageToTenthsOfBps(HYPERLIQUID_BUILDER_FEE_RATE), + } + : undefined; + const result = await executeSpotOrder({ transport, pkpPublicKey: delegatorPkpInfo.publicKey, @@ -506,6 +600,7 @@ export const vincentAbility = createVincentAbility({ size: abilityParams.spot.size, isBuy: action === 'spotBuy', orderType: abilityParams.spot.orderType, + builderFee, }, useTestnet, }); @@ -543,6 +638,10 @@ export const vincentAbility = createVincentAbility({ leverage: abilityParams.perp.leverage, isCross: abilityParams.perp.isCross ?? true, }, + builderFee: { + builderAddress: HYPERLIQUID_BUILDER_ADDRESS, + feeInTenthsOfBps: percentageToTenthsOfBps(HYPERLIQUID_BUILDER_FEE_RATE), + }, }, useTestnet, }); @@ -613,6 +712,28 @@ export const vincentAbility = createVincentAbility({ }); } + case HyperliquidAction.APPROVE_BUILDER_CODE: { + const result = await approveBuilderCode({ + transport, + pkpPublicKey: delegatorPkpInfo.publicKey, + builderAddress: HYPERLIQUID_BUILDER_ADDRESS, + maxFeeRate: HYPERLIQUID_BUILDER_FEE_RATE, + useTestnet, + }); + + if (result.approveResult.status === 'ok') { + return succeed({ + action, + approveResult: result.approveResult, + }); + } else { + return fail({ + action, + reason: `Unexpected response status: ${JSON.stringify(result.approveResult, null, 2)}`, + }); + } + } + default: return fail({ action, reason: `Unknown action: ${action}` }); } diff --git a/packages/apps/ability-hyperliquid/test/e2e/approve-builder-code.spec.ts b/packages/apps/ability-hyperliquid/test/e2e/approve-builder-code.spec.ts new file mode 100644 index 000000000..31d5607e5 --- /dev/null +++ b/packages/apps/ability-hyperliquid/test/e2e/approve-builder-code.spec.ts @@ -0,0 +1,183 @@ +import { + delegatee, + funder, + appManager, + ensureUnexpiredCapacityToken, + getChainHelpers, + type PkpInfo, + setupVincentDevelopmentEnvironment, +} from '@lit-protocol/vincent-e2e-test-utils'; +import { type PermissionData } from '@lit-protocol/vincent-contracts-sdk'; +import { + disconnectVincentAbilityClients, + getVincentAbilityClient, +} from '@lit-protocol/vincent-app-sdk/abilityClient'; +import * as util from 'node:util'; +import { type Wallet } from 'ethers'; +import * as hyperliquid from '@nktkas/hyperliquid'; + +import { + HyperliquidAction, + bundledVincentAbility as hyperliquidBundledAbility, + HYPERLIQUID_BUILDER_ADDRESS, +} from '../../src'; + +// Extend Jest timeout to 4 minutes +jest.setTimeout(240000); + +describe('Hyperliquid Ability E2E Approve Builder Code Tests', () => { + const USE_TESTNET = true; + + let agentPkpInfo: PkpInfo; + let wallets: { + appDelegatee: Wallet; + funder: Wallet; + appManager: Wallet; + agentWalletOwner: Wallet; + }; + let transport: hyperliquid.HttpTransport; + let infoClient: hyperliquid.InfoClient; + + beforeAll(async () => { + await funder.checkFunderBalance(); + await delegatee.ensureAppDelegateeFunded(); + await appManager.ensureAppManagerFunded(); + + const chainHelpers = await getChainHelpers(); + wallets = chainHelpers.wallets; + + await ensureUnexpiredCapacityToken(wallets.appDelegatee); + + const PERMISSION_DATA: PermissionData = { + // Hyperliquid Ability has no policies + [hyperliquidBundledAbility.ipfsCid]: {}, + }; + + const vincentDevEnvironment = await setupVincentDevelopmentEnvironment({ + permissionData: PERMISSION_DATA, + }); + agentPkpInfo = vincentDevEnvironment.agentPkpInfo; + wallets = vincentDevEnvironment.wallets; + + transport = new hyperliquid.HttpTransport({ isTestnet: USE_TESTNET }); + infoClient = new hyperliquid.InfoClient({ transport }); + }); + + afterAll(async () => { + await disconnectVincentAbilityClients(); + }); + + describe('[Approve Builder Code] Approve builder code for trading', () => { + let initialBuilderApprovalStatus: boolean; + + beforeAll(async () => { + // Check initial builder approval status + try { + const maxFee = await infoClient.maxBuilderFee({ + user: agentPkpInfo.ethAddress as `0x${string}`, + builder: HYPERLIQUID_BUILDER_ADDRESS as `0x${string}`, + }); + initialBuilderApprovalStatus = typeof maxFee === 'number' && maxFee > 0; + } catch (error) { + console.warn('[beforeAll] Could not fetch initial builder approval status:', error); + initialBuilderApprovalStatus = false; + } + console.log(`[beforeAll] Initial builder approval status: ${initialBuilderApprovalStatus}`); + }); + + it('should run precheck for approve builder code', async () => { + const hyperliquidAbilityClient = getVincentAbilityClient({ + bundledVincentAbility: hyperliquidBundledAbility, + ethersSigner: wallets.appDelegatee, + debug: false, + }); + + const precheckResult = await hyperliquidAbilityClient.precheck( + { + action: HyperliquidAction.APPROVE_BUILDER_CODE, + useTestnet: USE_TESTNET, + }, + { + delegatorPkpEthAddress: agentPkpInfo.ethAddress, + }, + ); + + expect(precheckResult).toBeDefined(); + console.log('[Approve Builder Code Precheck]', util.inspect(precheckResult, { depth: 10 })); + + if (precheckResult.success === false) { + // If builder is already approved, precheck should fail with appropriate message + if (initialBuilderApprovalStatus) { + expect(precheckResult.result.reason).toContain('already approved'); + return; + } + throw new Error(precheckResult.runtimeError); + } + + expect(precheckResult.result).toBeDefined(); + expect(precheckResult.result.action).toBe(HyperliquidAction.APPROVE_BUILDER_CODE); + }); + + it('should execute approve builder code', async () => { + const hyperliquidAbilityClient = getVincentAbilityClient({ + bundledVincentAbility: hyperliquidBundledAbility, + ethersSigner: wallets.appDelegatee, + debug: false, + }); + + const executeResult = await hyperliquidAbilityClient.execute( + { + action: HyperliquidAction.APPROVE_BUILDER_CODE, + useTestnet: USE_TESTNET, + }, + { + delegatorPkpEthAddress: agentPkpInfo.ethAddress, + }, + ); + + expect(executeResult).toBeDefined(); + console.log('[Approve Builder Code Execute]', util.inspect(executeResult, { depth: 10 })); + + expect(executeResult.success).toBe(true); + if (executeResult.success === false) { + throw new Error(executeResult.runtimeError); + } + + expect(executeResult.result).toBeDefined(); + expect(executeResult.result.action).toBe(HyperliquidAction.APPROVE_BUILDER_CODE); + expect(executeResult.result.approveResult).toBeDefined(); + expect(executeResult.result.approveResult.status).toBe('ok'); + }); + + it('should verify builder code is approved after execution', async () => { + // Check builder approval status after execution + let finalBuilderApprovalStatus: boolean; + try { + const maxFee = await infoClient.maxBuilderFee({ + user: agentPkpInfo.ethAddress as `0x${string}`, + builder: HYPERLIQUID_BUILDER_ADDRESS as `0x${string}`, + }); + finalBuilderApprovalStatus = typeof maxFee === 'number' && maxFee > 0; + } catch (error) { + console.warn( + '[Approve Builder Code] Could not fetch final builder approval status:', + error, + ); + finalBuilderApprovalStatus = false; + } + + console.log( + `[Approve Builder Code] Initial approval status: ${initialBuilderApprovalStatus}`, + ); + console.log(`[Approve Builder Code] Final approval status: ${finalBuilderApprovalStatus}`); + + // If it wasn't approved initially, it should be approved now + if (!initialBuilderApprovalStatus) { + expect(finalBuilderApprovalStatus).toBe(true); + } else { + // If it was already approved, it should still be approved + expect(finalBuilderApprovalStatus).toBe(true); + } + }); + }); +}); diff --git a/packages/apps/ability-hyperliquid/test/e2e/balance.spec.ts b/packages/apps/ability-hyperliquid/test/e2e/balance.spec.ts index e9bb2ec00..972c97b2b 100644 --- a/packages/apps/ability-hyperliquid/test/e2e/balance.spec.ts +++ b/packages/apps/ability-hyperliquid/test/e2e/balance.spec.ts @@ -7,6 +7,7 @@ import { getChainHelpers, getEnv, type PkpInfo, + setupVincentDevelopmentEnvironment, } from '@lit-protocol/vincent-e2e-test-utils'; import { type PermissionData } from '@lit-protocol/vincent-contracts-sdk'; import { disconnectVincentAbilityClients } from '@lit-protocol/vincent-app-sdk/abilityClient'; @@ -57,46 +58,11 @@ describe('Hyperliquid Ability E2E Balance Tests', () => { [hyperliquidBundledAbility.ipfsCid]: {}, }; - const abilityIpfsCids: string[] = Object.keys(PERMISSION_DATA); - const abilityPolicies: string[][] = abilityIpfsCids.map((abilityIpfsCid) => { - return Object.keys(PERMISSION_DATA[abilityIpfsCid]); - }); - - // If an app exists for the delegatee, we will create a new app version with the new ipfs cids - // Otherwise, we will create an app w/ version 1 appVersion with the new ipfs cids - const existingApp = await delegatee.getAppInfo(); - console.log('[beforeAll] existingApp', existingApp); - let appId: number; - let appVersion: number; - if (!existingApp) { - console.log('[beforeAll] No existing app, registering new app'); - const newApp = await appManager.registerNewApp({ abilityIpfsCids, abilityPolicies }); - appId = newApp.appId; - appVersion = newApp.appVersion; - } else { - console.log('[beforeAll] Existing app, registering new app version'); - const newAppVersion = await appManager.registerNewAppVersion({ - abilityIpfsCids, - abilityPolicies, - }); - appId = existingApp.appId; - appVersion = newAppVersion.appVersion; - } - - agentPkpInfo = await delegator.getFundedAgentPkp(); - - await delegator.permitAppVersionForAgentWalletPkp({ + const vincentDevEnvironment = await setupVincentDevelopmentEnvironment({ permissionData: PERMISSION_DATA, - appId, - appVersion, - agentPkpInfo, }); - - await delegator.addPermissionForAbilities( - wallets.agentWalletOwner, - agentPkpInfo.tokenId, - abilityIpfsCids, - ); + agentPkpInfo = vincentDevEnvironment.agentPkpInfo; + wallets = vincentDevEnvironment.wallets; transport = new hyperliquid.HttpTransport({ isTestnet: USE_TESTNET }); infoClient = new hyperliquid.InfoClient({ transport }); diff --git a/packages/apps/ability-hyperliquid/test/e2e/deposit.spec.ts b/packages/apps/ability-hyperliquid/test/e2e/deposit.spec.ts index f0f3e7af9..7e2f77d7e 100644 --- a/packages/apps/ability-hyperliquid/test/e2e/deposit.spec.ts +++ b/packages/apps/ability-hyperliquid/test/e2e/deposit.spec.ts @@ -7,6 +7,7 @@ import { getChainHelpers, getEnv, type PkpInfo, + setupVincentDevelopmentEnvironment, } from '@lit-protocol/vincent-e2e-test-utils'; import { type PermissionData } from '@lit-protocol/vincent-contracts-sdk'; import { @@ -54,46 +55,11 @@ describe('Hyperliquid Ability E2E Deposit Tests', () => { [hyperliquidBundledAbility.ipfsCid]: {}, }; - const abilityIpfsCids: string[] = Object.keys(PERMISSION_DATA); - const abilityPolicies: string[][] = abilityIpfsCids.map((abilityIpfsCid) => { - return Object.keys(PERMISSION_DATA[abilityIpfsCid]); - }); - - // If an app exists for the delegatee, we will create a new app version with the new ipfs cids - // Otherwise, we will create an app w/ version 1 appVersion with the new ipfs cids - const existingApp = await delegatee.getAppInfo(); - console.log('[beforeAll] existingApp', existingApp); - let appId: number; - let appVersion: number; - if (!existingApp) { - console.log('[beforeAll] No existing app, registering new app'); - const newApp = await appManager.registerNewApp({ abilityIpfsCids, abilityPolicies }); - appId = newApp.appId; - appVersion = newApp.appVersion; - } else { - console.log('[beforeAll] Existing app, registering new app version'); - const newAppVersion = await appManager.registerNewAppVersion({ - abilityIpfsCids, - abilityPolicies, - }); - appId = existingApp.appId; - appVersion = newAppVersion.appVersion; - } - - agentPkpInfo = await delegator.getFundedAgentPkp(); - - await delegator.permitAppVersionForAgentWalletPkp({ + const vincentDevEnvironment = await setupVincentDevelopmentEnvironment({ permissionData: PERMISSION_DATA, - appId, - appVersion, - agentPkpInfo, }); - - await delegator.addPermissionForAbilities( - wallets.agentWalletOwner, - agentPkpInfo.tokenId, - abilityIpfsCids, - ); + agentPkpInfo = vincentDevEnvironment.agentPkpInfo; + wallets = vincentDevEnvironment.wallets; }); afterAll(async () => { diff --git a/packages/apps/ability-hyperliquid/test/e2e/open-orders.spec.ts b/packages/apps/ability-hyperliquid/test/e2e/open-orders.spec.ts index 903042856..7ce9f4e30 100644 --- a/packages/apps/ability-hyperliquid/test/e2e/open-orders.spec.ts +++ b/packages/apps/ability-hyperliquid/test/e2e/open-orders.spec.ts @@ -6,6 +6,7 @@ import { ensureUnexpiredCapacityToken, getChainHelpers, type PkpInfo, + setupVincentDevelopmentEnvironment, } from '@lit-protocol/vincent-e2e-test-utils'; import { type PermissionData } from '@lit-protocol/vincent-contracts-sdk'; import { disconnectVincentAbilityClients } from '@lit-protocol/vincent-app-sdk/abilityClient'; @@ -46,46 +47,11 @@ describe('Hyperliquid Ability E2E Open Orders Tests', () => { [hyperliquidBundledAbility.ipfsCid]: {}, }; - const abilityIpfsCids: string[] = Object.keys(PERMISSION_DATA); - const abilityPolicies: string[][] = abilityIpfsCids.map((abilityIpfsCid) => { - return Object.keys(PERMISSION_DATA[abilityIpfsCid]); - }); - - // If an app exists for the delegatee, we will create a new app version with the new ipfs cids - // Otherwise, we will create an app w/ version 1 appVersion with the new ipfs cids - const existingApp = await delegatee.getAppInfo(); - console.log('[beforeAll] existingApp', existingApp); - let appId: number; - let appVersion: number; - if (!existingApp) { - console.log('[beforeAll] No existing app, registering new app'); - const newApp = await appManager.registerNewApp({ abilityIpfsCids, abilityPolicies }); - appId = newApp.appId; - appVersion = newApp.appVersion; - } else { - console.log('[beforeAll] Existing app, registering new app version'); - const newAppVersion = await appManager.registerNewAppVersion({ - abilityIpfsCids, - abilityPolicies, - }); - appId = existingApp.appId; - appVersion = newAppVersion.appVersion; - } - - agentPkpInfo = await delegator.getFundedAgentPkp(); - - await delegator.permitAppVersionForAgentWalletPkp({ + const vincentDevEnvironment = await setupVincentDevelopmentEnvironment({ permissionData: PERMISSION_DATA, - appId, - appVersion, - agentPkpInfo, }); - - await delegator.addPermissionForAbilities( - wallets.agentWalletOwner, - agentPkpInfo.tokenId, - abilityIpfsCids, - ); + agentPkpInfo = vincentDevEnvironment.agentPkpInfo; + wallets = vincentDevEnvironment.wallets; transport = new hyperliquid.HttpTransport({ isTestnet: USE_TESTNET }); infoClient = new hyperliquid.InfoClient({ transport }); diff --git a/packages/apps/ability-hyperliquid/test/e2e/perp/long.spec.ts b/packages/apps/ability-hyperliquid/test/e2e/perp/long.spec.ts index 7f38bae27..ef68867de 100644 --- a/packages/apps/ability-hyperliquid/test/e2e/perp/long.spec.ts +++ b/packages/apps/ability-hyperliquid/test/e2e/perp/long.spec.ts @@ -7,6 +7,7 @@ import { getChainHelpers, getEnv, type PkpInfo, + setupVincentDevelopmentEnvironment, } from '@lit-protocol/vincent-e2e-test-utils'; import { type PermissionData } from '@lit-protocol/vincent-contracts-sdk'; import { @@ -22,6 +23,7 @@ import { HyperliquidAction, bundledVincentAbility as hyperliquidBundledAbility, OrderType, + HYPERLIQUID_BUILDER_ADDRESS, } from '../../../src'; import { calculatePerpOrderParams } from './helpers'; @@ -63,46 +65,11 @@ describe('Hyperliquid Ability E2E Perp Long Tests', () => { [hyperliquidBundledAbility.ipfsCid]: {}, }; - const abilityIpfsCids: string[] = Object.keys(PERMISSION_DATA); - const abilityPolicies: string[][] = abilityIpfsCids.map((abilityIpfsCid) => { - return Object.keys(PERMISSION_DATA[abilityIpfsCid]); - }); - - // If an app exists for the delegatee, we will create a new app version with the new ipfs cids - // Otherwise, we will create an app w/ version 1 appVersion with the new ipfs cids - const existingApp = await delegatee.getAppInfo(); - console.log('[beforeAll] existingApp', existingApp); - let appId: number; - let appVersion: number; - if (!existingApp) { - console.log('[beforeAll] No existing app, registering new app'); - const newApp = await appManager.registerNewApp({ abilityIpfsCids, abilityPolicies }); - appId = newApp.appId; - appVersion = newApp.appVersion; - } else { - console.log('[beforeAll] Existing app, registering new app version'); - const newAppVersion = await appManager.registerNewAppVersion({ - abilityIpfsCids, - abilityPolicies, - }); - appId = existingApp.appId; - appVersion = newAppVersion.appVersion; - } - - agentPkpInfo = await delegator.getFundedAgentPkp(); - - await delegator.permitAppVersionForAgentWalletPkp({ + const vincentDevEnvironment = await setupVincentDevelopmentEnvironment({ permissionData: PERMISSION_DATA, - appId, - appVersion, - agentPkpInfo, }); - - await delegator.addPermissionForAbilities( - wallets.agentWalletOwner, - agentPkpInfo.tokenId, - abilityIpfsCids, - ); + agentPkpInfo = vincentDevEnvironment.agentPkpInfo; + wallets = vincentDevEnvironment.wallets; transport = new hyperliquid.HttpTransport({ isTestnet: USE_TESTNET }); infoClient = new hyperliquid.InfoClient({ transport }); @@ -115,6 +82,7 @@ describe('Hyperliquid Ability E2E Perp Long Tests', () => { describe(`[Perp Long] Open long position on ${PERP_SYMBOL} with ${PERP_LONG_USD_NOTIONAL} USD notional`, () => { let initialAccountValue: string; let initialPositionSize: string; + let initialBuilderRewards: string; beforeAll(async () => { // Get initial state before opening long @@ -138,12 +106,25 @@ describe('Hyperliquid Ability E2E Perp Long Tests', () => { 'No perp state found. Please ensure funds are transferred to perp account.', ); } + + // Get initial builder rewards before perp long + try { + const referralData = await infoClient.referral({ + user: HYPERLIQUID_BUILDER_ADDRESS, + }); + initialBuilderRewards = referralData.builderRewards || '0'; + console.log(`[beforeAll] Initial builder rewards: ${initialBuilderRewards}`); + } catch (error) { + console.warn('[beforeAll] Could not fetch initial builder rewards:', error); + initialBuilderRewards = '0'; + } }); it('should run precheck for perp long', async () => { const hyperliquidAbilityClient = getVincentAbilityClient({ bundledVincentAbility: hyperliquidBundledAbility, ethersSigner: wallets.appDelegatee, + debug: false, }); const { @@ -197,6 +178,7 @@ describe('Hyperliquid Ability E2E Perp Long Tests', () => { const hyperliquidAbilityClient = getVincentAbilityClient({ bundledVincentAbility: hyperliquidBundledAbility, ethersSigner: wallets.appDelegatee, + debug: false, }); const { @@ -284,5 +266,30 @@ describe('Hyperliquid Ability E2E Perp Long Tests', () => { console.log('[Perp Long] Initial account value:', initialAccountValue); console.log('[Perp Long] Final account value:', finalAccountValue); }); + + it('should validate builder rewards increased after perp long', async () => { + // Get referral data after long + const referralData = await infoClient.referral({ + user: HYPERLIQUID_BUILDER_ADDRESS, + }); + + expect(referralData).toBeDefined(); + console.log( + '[Perp Long] Referral data after long:', + util.inspect(referralData, { depth: 10 }), + ); + + const finalBuilderRewards = referralData.builderRewards || '0'; + + console.log('[Perp Long] Initial builder rewards:', initialBuilderRewards); + console.log('[Perp Long] Final builder rewards:', finalBuilderRewards); + + // Builder rewards should increase after a perp long (since builder codes apply to perp orders) + expect(parseFloat(finalBuilderRewards)).toBeGreaterThan(parseFloat(initialBuilderRewards)); + + // If builder rewards increased, log the difference + const rewardIncrease = parseFloat(finalBuilderRewards) - parseFloat(initialBuilderRewards); + console.log(`[Perp Long] Builder rewards increased by: ${rewardIncrease}`); + }); }); }); diff --git a/packages/apps/ability-hyperliquid/test/e2e/perp/short.spec.ts b/packages/apps/ability-hyperliquid/test/e2e/perp/short.spec.ts index c0683b76d..2e5c1e838 100644 --- a/packages/apps/ability-hyperliquid/test/e2e/perp/short.spec.ts +++ b/packages/apps/ability-hyperliquid/test/e2e/perp/short.spec.ts @@ -7,6 +7,7 @@ import { getChainHelpers, getEnv, type PkpInfo, + setupVincentDevelopmentEnvironment, } from '@lit-protocol/vincent-e2e-test-utils'; import { type PermissionData } from '@lit-protocol/vincent-contracts-sdk'; import { @@ -22,6 +23,7 @@ import { HyperliquidAction, bundledVincentAbility as hyperliquidBundledAbility, OrderType, + HYPERLIQUID_BUILDER_ADDRESS, } from '../../../src'; import { calculatePerpOrderParams } from './helpers'; @@ -63,46 +65,11 @@ describe('Hyperliquid Ability E2E Perp Short Tests', () => { [hyperliquidBundledAbility.ipfsCid]: {}, }; - const abilityIpfsCids: string[] = Object.keys(PERMISSION_DATA); - const abilityPolicies: string[][] = abilityIpfsCids.map((abilityIpfsCid) => { - return Object.keys(PERMISSION_DATA[abilityIpfsCid]); - }); - - // If an app exists for the delegatee, we will create a new app version with the new ipfs cids - // Otherwise, we will create an app w/ version 1 appVersion with the new ipfs cids - const existingApp = await delegatee.getAppInfo(); - console.log('[beforeAll] existingApp', existingApp); - let appId: number; - let appVersion: number; - if (!existingApp) { - console.log('[beforeAll] No existing app, registering new app'); - const newApp = await appManager.registerNewApp({ abilityIpfsCids, abilityPolicies }); - appId = newApp.appId; - appVersion = newApp.appVersion; - } else { - console.log('[beforeAll] Existing app, registering new app version'); - const newAppVersion = await appManager.registerNewAppVersion({ - abilityIpfsCids, - abilityPolicies, - }); - appId = existingApp.appId; - appVersion = newAppVersion.appVersion; - } - - agentPkpInfo = await delegator.getFundedAgentPkp(); - - await delegator.permitAppVersionForAgentWalletPkp({ + const vincentDevEnvironment = await setupVincentDevelopmentEnvironment({ permissionData: PERMISSION_DATA, - appId, - appVersion, - agentPkpInfo, }); - - await delegator.addPermissionForAbilities( - wallets.agentWalletOwner, - agentPkpInfo.tokenId, - abilityIpfsCids, - ); + agentPkpInfo = vincentDevEnvironment.agentPkpInfo; + wallets = vincentDevEnvironment.wallets; transport = new hyperliquid.HttpTransport({ isTestnet: USE_TESTNET }); infoClient = new hyperliquid.InfoClient({ transport }); @@ -115,6 +82,7 @@ describe('Hyperliquid Ability E2E Perp Short Tests', () => { describe(`[Perp Short] Open short position on ${PERP_SYMBOL} with ${PERP_SHORT_USD_NOTIONAL} USD notional`, () => { let initialAccountValue: string; let initialPositionSize: string; + let initialBuilderRewards: string; beforeAll(async () => { // Get initial state before opening short @@ -138,12 +106,25 @@ describe('Hyperliquid Ability E2E Perp Short Tests', () => { 'No perp state found. Please ensure funds are transferred to perp account.', ); } + + // Get initial builder rewards before perp short + try { + const referralData = await infoClient.referral({ + user: HYPERLIQUID_BUILDER_ADDRESS, + }); + initialBuilderRewards = referralData.builderRewards || '0'; + console.log(`[beforeAll] Initial builder rewards: ${initialBuilderRewards}`); + } catch (error) { + console.warn('[beforeAll] Could not fetch initial builder rewards:', error); + initialBuilderRewards = '0'; + } }); it('should run precheck for perp short', async () => { const hyperliquidAbilityClient = getVincentAbilityClient({ bundledVincentAbility: hyperliquidBundledAbility, ethersSigner: wallets.appDelegatee, + debug: false, }); const { @@ -197,6 +178,7 @@ describe('Hyperliquid Ability E2E Perp Short Tests', () => { const hyperliquidAbilityClient = getVincentAbilityClient({ bundledVincentAbility: hyperliquidBundledAbility, ethersSigner: wallets.appDelegatee, + debug: false, }); const { @@ -227,6 +209,7 @@ describe('Hyperliquid Ability E2E Perp Short Tests', () => { size: shortSize, leverage: LEVERAGE, isCross: IS_CROSS, + reduceOnly: false, orderType: { type: OrderType.MARKET }, }, }, @@ -284,5 +267,30 @@ describe('Hyperliquid Ability E2E Perp Short Tests', () => { console.log('[Perp Short] Initial account value:', initialAccountValue); console.log('[Perp Short] Final account value:', finalAccountValue); }); + + it('should validate builder rewards increased after perp short', async () => { + // Get referral data after short + const referralData = await infoClient.referral({ + user: HYPERLIQUID_BUILDER_ADDRESS, + }); + + expect(referralData).toBeDefined(); + console.log( + '[Perp Short] Referral data after short:', + util.inspect(referralData, { depth: 10 }), + ); + + const finalBuilderRewards = referralData.builderRewards || '0'; + + console.log('[Perp Short] Initial builder rewards:', initialBuilderRewards); + console.log('[Perp Short] Final builder rewards:', finalBuilderRewards); + + // Builder rewards should increase after a perp short (since builder codes apply to perp orders) + expect(parseFloat(finalBuilderRewards)).toBeGreaterThan(parseFloat(initialBuilderRewards)); + + // If builder rewards increased, log the difference + const rewardIncrease = parseFloat(finalBuilderRewards) - parseFloat(initialBuilderRewards); + console.log(`[Perp Short] Builder rewards increased by: ${rewardIncrease}`); + }); }); }); diff --git a/packages/apps/ability-hyperliquid/test/e2e/spot/buy.spec.ts b/packages/apps/ability-hyperliquid/test/e2e/spot/buy.spec.ts index 164ee03b8..5ec3c7d3d 100644 --- a/packages/apps/ability-hyperliquid/test/e2e/spot/buy.spec.ts +++ b/packages/apps/ability-hyperliquid/test/e2e/spot/buy.spec.ts @@ -7,6 +7,7 @@ import { getChainHelpers, getEnv, type PkpInfo, + setupVincentDevelopmentEnvironment, } from '@lit-protocol/vincent-e2e-test-utils'; import { type PermissionData } from '@lit-protocol/vincent-contracts-sdk'; import { @@ -33,7 +34,7 @@ describe('Hyperliquid Ability E2E Spot Trading Tests', () => { ARBITRUM_RPC_URL: z.string(), }); const USE_TESTNET = true; - const SPOT_BUY_AMOUNT_USDC = '15'; + const SPOT_BUY_AMOUNT_USDC = '35'; const TOKEN_OUT_NAME = 'PURR'; const TRADING_PAIR = `${TOKEN_OUT_NAME}/USDC`; @@ -63,46 +64,11 @@ describe('Hyperliquid Ability E2E Spot Trading Tests', () => { [hyperliquidBundledAbility.ipfsCid]: {}, }; - const abilityIpfsCids: string[] = Object.keys(PERMISSION_DATA); - const abilityPolicies: string[][] = abilityIpfsCids.map((abilityIpfsCid) => { - return Object.keys(PERMISSION_DATA[abilityIpfsCid]); - }); - - // If an app exists for the delegatee, we will create a new app version with the new ipfs cids - // Otherwise, we will create an app w/ version 1 appVersion with the new ipfs cids - const existingApp = await delegatee.getAppInfo(); - console.log('[beforeAll] existingApp', existingApp); - let appId: number; - let appVersion: number; - if (!existingApp) { - console.log('[beforeAll] No existing app, registering new app'); - const newApp = await appManager.registerNewApp({ abilityIpfsCids, abilityPolicies }); - appId = newApp.appId; - appVersion = newApp.appVersion; - } else { - console.log('[beforeAll] Existing app, registering new app version'); - const newAppVersion = await appManager.registerNewAppVersion({ - abilityIpfsCids, - abilityPolicies, - }); - appId = existingApp.appId; - appVersion = newAppVersion.appVersion; - } - - agentPkpInfo = await delegator.getFundedAgentPkp(); - - await delegator.permitAppVersionForAgentWalletPkp({ + const vincentDevEnvironment = await setupVincentDevelopmentEnvironment({ permissionData: PERMISSION_DATA, - appId, - appVersion, - agentPkpInfo, }); - - await delegator.addPermissionForAbilities( - wallets.agentWalletOwner, - agentPkpInfo.tokenId, - abilityIpfsCids, - ); + agentPkpInfo = vincentDevEnvironment.agentPkpInfo; + wallets = vincentDevEnvironment.wallets; transport = new hyperliquid.HttpTransport({ isTestnet: USE_TESTNET }); infoClient = new hyperliquid.InfoClient({ transport }); diff --git a/packages/apps/ability-hyperliquid/test/e2e/spot/cancel-all-orders.spec.ts b/packages/apps/ability-hyperliquid/test/e2e/spot/cancel-all-orders.spec.ts index 77a6f0f0b..4362159f6 100644 --- a/packages/apps/ability-hyperliquid/test/e2e/spot/cancel-all-orders.spec.ts +++ b/packages/apps/ability-hyperliquid/test/e2e/spot/cancel-all-orders.spec.ts @@ -7,6 +7,7 @@ import { getChainHelpers, getEnv, type PkpInfo, + setupVincentDevelopmentEnvironment, } from '@lit-protocol/vincent-e2e-test-utils'; import { type PermissionData } from '@lit-protocol/vincent-contracts-sdk'; import { @@ -58,46 +59,11 @@ describe('Hyperliquid Ability E2E Spot Cancel All Orders Tests', () => { [hyperliquidBundledAbility.ipfsCid]: {}, }; - const abilityIpfsCids: string[] = Object.keys(PERMISSION_DATA); - const abilityPolicies: string[][] = abilityIpfsCids.map((abilityIpfsCid) => { - return Object.keys(PERMISSION_DATA[abilityIpfsCid]); - }); - - // If an app exists for the delegatee, we will create a new app version with the new ipfs cids - // Otherwise, we will create an app w/ version 1 appVersion with the new ipfs cids - const existingApp = await delegatee.getAppInfo(); - console.log('[beforeAll] existingApp', existingApp); - let appId: number; - let appVersion: number; - if (!existingApp) { - console.log('[beforeAll] No existing app, registering new app'); - const newApp = await appManager.registerNewApp({ abilityIpfsCids, abilityPolicies }); - appId = newApp.appId; - appVersion = newApp.appVersion; - } else { - console.log('[beforeAll] Existing app, registering new app version'); - const newAppVersion = await appManager.registerNewAppVersion({ - abilityIpfsCids, - abilityPolicies, - }); - appId = existingApp.appId; - appVersion = newAppVersion.appVersion; - } - - agentPkpInfo = await delegator.getFundedAgentPkp(); - - await delegator.permitAppVersionForAgentWalletPkp({ + const vincentDevEnvironment = await setupVincentDevelopmentEnvironment({ permissionData: PERMISSION_DATA, - appId, - appVersion, - agentPkpInfo, }); - - await delegator.addPermissionForAbilities( - wallets.agentWalletOwner, - agentPkpInfo.tokenId, - abilityIpfsCids, - ); + agentPkpInfo = vincentDevEnvironment.agentPkpInfo; + wallets = vincentDevEnvironment.wallets; transport = new hyperliquid.HttpTransport({ isTestnet: USE_TESTNET }); infoClient = new hyperliquid.InfoClient({ transport }); diff --git a/packages/apps/ability-hyperliquid/test/e2e/spot/cancel-order.spec.ts b/packages/apps/ability-hyperliquid/test/e2e/spot/cancel-order.spec.ts index d3659575b..6108ccb08 100644 --- a/packages/apps/ability-hyperliquid/test/e2e/spot/cancel-order.spec.ts +++ b/packages/apps/ability-hyperliquid/test/e2e/spot/cancel-order.spec.ts @@ -7,6 +7,7 @@ import { getChainHelpers, getEnv, type PkpInfo, + setupVincentDevelopmentEnvironment, } from '@lit-protocol/vincent-e2e-test-utils'; import { type PermissionData } from '@lit-protocol/vincent-contracts-sdk'; import { @@ -65,46 +66,11 @@ describe('Hyperliquid Ability E2E Spot Cancel Order Tests', () => { [hyperliquidBundledAbility.ipfsCid]: {}, }; - const abilityIpfsCids: string[] = Object.keys(PERMISSION_DATA); - const abilityPolicies: string[][] = abilityIpfsCids.map((abilityIpfsCid) => { - return Object.keys(PERMISSION_DATA[abilityIpfsCid]); - }); - - // If an app exists for the delegatee, we will create a new app version with the new ipfs cids - // Otherwise, we will create an app w/ version 1 appVersion with the new ipfs cids - const existingApp = await delegatee.getAppInfo(); - console.log('[beforeAll] existingApp', existingApp); - let appId: number; - let appVersion: number; - if (!existingApp) { - console.log('[beforeAll] No existing app, registering new app'); - const newApp = await appManager.registerNewApp({ abilityIpfsCids, abilityPolicies }); - appId = newApp.appId; - appVersion = newApp.appVersion; - } else { - console.log('[beforeAll] Existing app, registering new app version'); - const newAppVersion = await appManager.registerNewAppVersion({ - abilityIpfsCids, - abilityPolicies, - }); - appId = existingApp.appId; - appVersion = newAppVersion.appVersion; - } - - agentPkpInfo = await delegator.getFundedAgentPkp(); - - await delegator.permitAppVersionForAgentWalletPkp({ + const vincentDevEnvironment = await setupVincentDevelopmentEnvironment({ permissionData: PERMISSION_DATA, - appId, - appVersion, - agentPkpInfo, }); - - await delegator.addPermissionForAbilities( - wallets.agentWalletOwner, - agentPkpInfo.tokenId, - abilityIpfsCids, - ); + agentPkpInfo = vincentDevEnvironment.agentPkpInfo; + wallets = vincentDevEnvironment.wallets; transport = new hyperliquid.HttpTransport({ isTestnet: USE_TESTNET }); infoClient = new hyperliquid.InfoClient({ transport }); diff --git a/packages/apps/ability-hyperliquid/test/e2e/spot/sell.spec.ts b/packages/apps/ability-hyperliquid/test/e2e/spot/sell.spec.ts index cd235cb04..0c21fbc72 100644 --- a/packages/apps/ability-hyperliquid/test/e2e/spot/sell.spec.ts +++ b/packages/apps/ability-hyperliquid/test/e2e/spot/sell.spec.ts @@ -7,6 +7,7 @@ import { getChainHelpers, getEnv, type PkpInfo, + setupVincentDevelopmentEnvironment, } from '@lit-protocol/vincent-e2e-test-utils'; import { type PermissionData } from '@lit-protocol/vincent-contracts-sdk'; import { @@ -18,7 +19,10 @@ import { z } from 'zod'; import { type Wallet } from 'ethers'; import * as hyperliquid from '@nktkas/hyperliquid'; -import { bundledVincentAbility as hyperliquidBundledAbility } from '../../../src'; +import { + bundledVincentAbility as hyperliquidBundledAbility, + HYPERLIQUID_BUILDER_ADDRESS, +} from '../../../src'; import { calculateSpotOrderParams } from './helpers'; // Extend Jest timeout to 4 minutes @@ -71,46 +75,11 @@ describe('Hyperliquid Ability E2E Spot Sell Tests', () => { [hyperliquidBundledAbility.ipfsCid]: {}, }; - const abilityIpfsCids: string[] = Object.keys(PERMISSION_DATA); - const abilityPolicies: string[][] = abilityIpfsCids.map((abilityIpfsCid) => { - return Object.keys(PERMISSION_DATA[abilityIpfsCid]); - }); - - // If an app exists for the delegatee, we will create a new app version with the new ipfs cids - // Otherwise, we will create an app w/ version 1 appVersion with the new ipfs cids - const existingApp = await delegatee.getAppInfo(); - console.log('[beforeAll] existingApp', existingApp); - let appId: number; - let appVersion: number; - if (!existingApp) { - console.log('[beforeAll] No existing app, registering new app'); - const newApp = await appManager.registerNewApp({ abilityIpfsCids, abilityPolicies }); - appId = newApp.appId; - appVersion = newApp.appVersion; - } else { - console.log('[beforeAll] Existing app, registering new app version'); - const newAppVersion = await appManager.registerNewAppVersion({ - abilityIpfsCids, - abilityPolicies, - }); - appId = existingApp.appId; - appVersion = newAppVersion.appVersion; - } - - agentPkpInfo = await delegator.getFundedAgentPkp(); - - await delegator.permitAppVersionForAgentWalletPkp({ + const vincentDevEnvironment = await setupVincentDevelopmentEnvironment({ permissionData: PERMISSION_DATA, - appId, - appVersion, - agentPkpInfo, }); - - await delegator.addPermissionForAbilities( - wallets.agentWalletOwner, - agentPkpInfo.tokenId, - abilityIpfsCids, - ); + agentPkpInfo = vincentDevEnvironment.agentPkpInfo; + wallets = vincentDevEnvironment.wallets; transport = new hyperliquid.HttpTransport({ isTestnet: USE_TESTNET }); infoClient = new hyperliquid.InfoClient({ transport }); @@ -123,6 +92,7 @@ describe('Hyperliquid Ability E2E Spot Sell Tests', () => { describe(`[Spot Sell] Sell ${TOKEN_TO_SELL} for USDC`, () => { let initialUsdcBalance: string; let initialTokenBalance: string; + let initialBuilderRewards: string; beforeAll(async () => { // Get initial balances before spot sell @@ -146,6 +116,18 @@ describe('Hyperliquid Ability E2E Spot Sell Tests', () => { } else { throw new Error('No spot balances found. Please ensure funds are transferred to spot.'); } + + // Get initial builder rewards before spot sell + try { + const referralData = await infoClient.referral({ + user: HYPERLIQUID_BUILDER_ADDRESS, + }); + initialBuilderRewards = referralData.builderRewards || '0'; + console.log(`[beforeAll] Initial builder rewards: ${initialBuilderRewards}`); + } catch (error) { + console.warn('[beforeAll] Could not fetch initial builder rewards:', error); + initialBuilderRewards = '0'; + } }); it('should run precheck for spot sell', async () => { @@ -258,9 +240,6 @@ describe('Hyperliquid Ability E2E Spot Sell Tests', () => { }); it(`should check USDC balance increased and ${TOKEN_TO_SELL} balance decreased after sell`, async () => { - // Wait a bit for order to potentially fill - await new Promise((resolve) => setTimeout(resolve, 5000)); - // Get balances after sell const spotState = await infoClient.spotClearinghouseState({ user: agentPkpInfo.ethAddress as `0x${string}`, @@ -290,5 +269,30 @@ describe('Hyperliquid Ability E2E Spot Sell Tests', () => { throw new Error('No spot balances found after sell'); } }); + + it('should validate builder rewards increased after spot sell', async () => { + // Get referral data after sell + const referralData = await infoClient.referral({ + user: HYPERLIQUID_BUILDER_ADDRESS, + }); + + expect(referralData).toBeDefined(); + console.log( + '[Spot Sell] Referral data after sell:', + util.inspect(referralData, { depth: 10 }), + ); + + const finalBuilderRewards = referralData.builderRewards || '0'; + + console.log('[Spot Sell] Initial builder rewards:', initialBuilderRewards); + console.log('[Spot Sell] Final builder rewards:', finalBuilderRewards); + + // Builder rewards should increase after a spot sell (since builder codes apply to sell orders) + expect(parseFloat(finalBuilderRewards)).toBeGreaterThan(parseFloat(initialBuilderRewards)); + + // If builder rewards increased, log the difference + const rewardIncrease = parseFloat(finalBuilderRewards) - parseFloat(initialBuilderRewards); + console.log(`[Spot Sell] Builder rewards increased by: ${rewardIncrease}`); + }); }); }); diff --git a/packages/apps/ability-hyperliquid/test/e2e/trade-history.spec.ts b/packages/apps/ability-hyperliquid/test/e2e/trade-history.spec.ts index 8e90ad56b..27d6f85ea 100644 --- a/packages/apps/ability-hyperliquid/test/e2e/trade-history.spec.ts +++ b/packages/apps/ability-hyperliquid/test/e2e/trade-history.spec.ts @@ -6,6 +6,7 @@ import { ensureUnexpiredCapacityToken, getChainHelpers, type PkpInfo, + setupVincentDevelopmentEnvironment, } from '@lit-protocol/vincent-e2e-test-utils'; import { type PermissionData } from '@lit-protocol/vincent-contracts-sdk'; import { disconnectVincentAbilityClients } from '@lit-protocol/vincent-app-sdk/abilityClient'; @@ -46,46 +47,11 @@ describe('Hyperliquid Ability E2E Trade History Tests', () => { [hyperliquidBundledAbility.ipfsCid]: {}, }; - const abilityIpfsCids: string[] = Object.keys(PERMISSION_DATA); - const abilityPolicies: string[][] = abilityIpfsCids.map((abilityIpfsCid) => { - return Object.keys(PERMISSION_DATA[abilityIpfsCid]); - }); - - // If an app exists for the delegatee, we will create a new app version with the new ipfs cids - // Otherwise, we will create an app w/ version 1 appVersion with the new ipfs cids - const existingApp = await delegatee.getAppInfo(); - console.log('[beforeAll] existingApp', existingApp); - let appId: number; - let appVersion: number; - if (!existingApp) { - console.log('[beforeAll] No existing app, registering new app'); - const newApp = await appManager.registerNewApp({ abilityIpfsCids, abilityPolicies }); - appId = newApp.appId; - appVersion = newApp.appVersion; - } else { - console.log('[beforeAll] Existing app, registering new app version'); - const newAppVersion = await appManager.registerNewAppVersion({ - abilityIpfsCids, - abilityPolicies, - }); - appId = existingApp.appId; - appVersion = newAppVersion.appVersion; - } - - agentPkpInfo = await delegator.getFundedAgentPkp(); - - await delegator.permitAppVersionForAgentWalletPkp({ + const vincentDevEnvironment = await setupVincentDevelopmentEnvironment({ permissionData: PERMISSION_DATA, - appId, - appVersion, - agentPkpInfo, }); - - await delegator.addPermissionForAbilities( - wallets.agentWalletOwner, - agentPkpInfo.tokenId, - abilityIpfsCids, - ); + agentPkpInfo = vincentDevEnvironment.agentPkpInfo; + wallets = vincentDevEnvironment.wallets; transport = new hyperliquid.HttpTransport({ isTestnet: USE_TESTNET }); infoClient = new hyperliquid.InfoClient({ transport }); diff --git a/packages/apps/ability-hyperliquid/test/e2e/transfer.spec.ts b/packages/apps/ability-hyperliquid/test/e2e/transfer.spec.ts index ae57dfbff..f5629c885 100644 --- a/packages/apps/ability-hyperliquid/test/e2e/transfer.spec.ts +++ b/packages/apps/ability-hyperliquid/test/e2e/transfer.spec.ts @@ -7,6 +7,7 @@ import { getChainHelpers, getEnv, type PkpInfo, + setupVincentDevelopmentEnvironment, } from '@lit-protocol/vincent-e2e-test-utils'; import { type PermissionData } from '@lit-protocol/vincent-contracts-sdk'; import { @@ -55,46 +56,11 @@ describe('Hyperliquid Ability E2E Transfer USDC to Spot/Perp Tests', () => { [hyperliquidBundledAbility.ipfsCid]: {}, }; - const abilityIpfsCids: string[] = Object.keys(PERMISSION_DATA); - const abilityPolicies: string[][] = abilityIpfsCids.map((abilityIpfsCid) => { - return Object.keys(PERMISSION_DATA[abilityIpfsCid]); - }); - - // If an app exists for the delegatee, we will create a new app version with the new ipfs cids - // Otherwise, we will create an app w/ version 1 appVersion with the new ipfs cids - const existingApp = await delegatee.getAppInfo(); - console.log('[beforeAll] existingApp', existingApp); - let appId: number; - let appVersion: number; - if (!existingApp) { - console.log('[beforeAll] No existing app, registering new app'); - const newApp = await appManager.registerNewApp({ abilityIpfsCids, abilityPolicies }); - appId = newApp.appId; - appVersion = newApp.appVersion; - } else { - console.log('[beforeAll] Existing app, registering new app version'); - const newAppVersion = await appManager.registerNewAppVersion({ - abilityIpfsCids, - abilityPolicies, - }); - appId = existingApp.appId; - appVersion = newAppVersion.appVersion; - } - - agentPkpInfo = await delegator.getFundedAgentPkp(); - - await delegator.permitAppVersionForAgentWalletPkp({ + const vincentDevEnvironment = await setupVincentDevelopmentEnvironment({ permissionData: PERMISSION_DATA, - appId, - appVersion, - agentPkpInfo, }); - - await delegator.addPermissionForAbilities( - wallets.agentWalletOwner, - agentPkpInfo.tokenId, - abilityIpfsCids, - ); + agentPkpInfo = vincentDevEnvironment.agentPkpInfo; + wallets = vincentDevEnvironment.wallets; transport = new hyperliquid.HttpTransport({ isTestnet: USE_TESTNET }); infoClient = new hyperliquid.InfoClient({ transport }); diff --git a/packages/apps/ability-hyperliquid/test/e2e/transfer/to-perp.spec.ts b/packages/apps/ability-hyperliquid/test/e2e/transfer/to-perp.spec.ts index a8cae40d1..5c46ee80f 100644 --- a/packages/apps/ability-hyperliquid/test/e2e/transfer/to-perp.spec.ts +++ b/packages/apps/ability-hyperliquid/test/e2e/transfer/to-perp.spec.ts @@ -7,6 +7,7 @@ import { getChainHelpers, getEnv, type PkpInfo, + setupVincentDevelopmentEnvironment, } from '@lit-protocol/vincent-e2e-test-utils'; import { type PermissionData } from '@lit-protocol/vincent-contracts-sdk'; import { @@ -55,46 +56,11 @@ describe('Hyperliquid Ability E2E Transfer USDC to Spot/Perp Tests', () => { [hyperliquidBundledAbility.ipfsCid]: {}, }; - const abilityIpfsCids: string[] = Object.keys(PERMISSION_DATA); - const abilityPolicies: string[][] = abilityIpfsCids.map((abilityIpfsCid) => { - return Object.keys(PERMISSION_DATA[abilityIpfsCid]); - }); - - // If an app exists for the delegatee, we will create a new app version with the new ipfs cids - // Otherwise, we will create an app w/ version 1 appVersion with the new ipfs cids - const existingApp = await delegatee.getAppInfo(); - console.log('[beforeAll] existingApp', existingApp); - let appId: number; - let appVersion: number; - if (!existingApp) { - console.log('[beforeAll] No existing app, registering new app'); - const newApp = await appManager.registerNewApp({ abilityIpfsCids, abilityPolicies }); - appId = newApp.appId; - appVersion = newApp.appVersion; - } else { - console.log('[beforeAll] Existing app, registering new app version'); - const newAppVersion = await appManager.registerNewAppVersion({ - abilityIpfsCids, - abilityPolicies, - }); - appId = existingApp.appId; - appVersion = newAppVersion.appVersion; - } - - agentPkpInfo = await delegator.getFundedAgentPkp(); - - await delegator.permitAppVersionForAgentWalletPkp({ + const vincentDevEnvironment = await setupVincentDevelopmentEnvironment({ permissionData: PERMISSION_DATA, - appId, - appVersion, - agentPkpInfo, }); - - await delegator.addPermissionForAbilities( - wallets.agentWalletOwner, - agentPkpInfo.tokenId, - abilityIpfsCids, - ); + agentPkpInfo = vincentDevEnvironment.agentPkpInfo; + wallets = vincentDevEnvironment.wallets; transport = new hyperliquid.HttpTransport({ isTestnet: USE_TESTNET }); infoClient = new hyperliquid.InfoClient({ transport }); diff --git a/packages/apps/ability-hyperliquid/test/e2e/transfer/to-spot.spec.ts b/packages/apps/ability-hyperliquid/test/e2e/transfer/to-spot.spec.ts index 3d42c9ad0..68162ad43 100644 --- a/packages/apps/ability-hyperliquid/test/e2e/transfer/to-spot.spec.ts +++ b/packages/apps/ability-hyperliquid/test/e2e/transfer/to-spot.spec.ts @@ -7,6 +7,7 @@ import { getChainHelpers, getEnv, type PkpInfo, + setupVincentDevelopmentEnvironment, } from '@lit-protocol/vincent-e2e-test-utils'; import { type PermissionData } from '@lit-protocol/vincent-contracts-sdk'; import { @@ -55,46 +56,11 @@ describe('Hyperliquid Ability E2E Transfer USDC to Spot/Perp Tests', () => { [hyperliquidBundledAbility.ipfsCid]: {}, }; - const abilityIpfsCids: string[] = Object.keys(PERMISSION_DATA); - const abilityPolicies: string[][] = abilityIpfsCids.map((abilityIpfsCid) => { - return Object.keys(PERMISSION_DATA[abilityIpfsCid]); - }); - - // If an app exists for the delegatee, we will create a new app version with the new ipfs cids - // Otherwise, we will create an app w/ version 1 appVersion with the new ipfs cids - const existingApp = await delegatee.getAppInfo(); - console.log('[beforeAll] existingApp', existingApp); - let appId: number; - let appVersion: number; - if (!existingApp) { - console.log('[beforeAll] No existing app, registering new app'); - const newApp = await appManager.registerNewApp({ abilityIpfsCids, abilityPolicies }); - appId = newApp.appId; - appVersion = newApp.appVersion; - } else { - console.log('[beforeAll] Existing app, registering new app version'); - const newAppVersion = await appManager.registerNewAppVersion({ - abilityIpfsCids, - abilityPolicies, - }); - appId = existingApp.appId; - appVersion = newAppVersion.appVersion; - } - - agentPkpInfo = await delegator.getFundedAgentPkp(); - - await delegator.permitAppVersionForAgentWalletPkp({ + const vincentDevEnvironment = await setupVincentDevelopmentEnvironment({ permissionData: PERMISSION_DATA, - appId, - appVersion, - agentPkpInfo, }); - - await delegator.addPermissionForAbilities( - wallets.agentWalletOwner, - agentPkpInfo.tokenId, - abilityIpfsCids, - ); + agentPkpInfo = vincentDevEnvironment.agentPkpInfo; + wallets = vincentDevEnvironment.wallets; transport = new hyperliquid.HttpTransport({ isTestnet: USE_TESTNET }); infoClient = new hyperliquid.InfoClient({ transport }); diff --git a/packages/apps/ability-hyperliquid/test/e2e/withdraw.spec.ts b/packages/apps/ability-hyperliquid/test/e2e/withdraw.spec.ts index 488e75593..44faadf4f 100644 --- a/packages/apps/ability-hyperliquid/test/e2e/withdraw.spec.ts +++ b/packages/apps/ability-hyperliquid/test/e2e/withdraw.spec.ts @@ -7,6 +7,7 @@ import { getChainHelpers, getEnv, type PkpInfo, + setupVincentDevelopmentEnvironment, } from '@lit-protocol/vincent-e2e-test-utils'; import { type PermissionData } from '@lit-protocol/vincent-contracts-sdk'; import { @@ -56,46 +57,11 @@ describe('Hyperliquid Ability E2E Withdraw Tests', () => { [hyperliquidBundledAbility.ipfsCid]: {}, }; - const abilityIpfsCids: string[] = Object.keys(PERMISSION_DATA); - const abilityPolicies: string[][] = abilityIpfsCids.map((abilityIpfsCid) => { - return Object.keys(PERMISSION_DATA[abilityIpfsCid]); - }); - - // If an app exists for the delegatee, we will create a new app version with the new ipfs cids - // Otherwise, we will create an app w/ version 1 appVersion with the new ipfs cids - const existingApp = await delegatee.getAppInfo(); - console.log('[beforeAll] existingApp', existingApp); - let appId: number; - let appVersion: number; - if (!existingApp) { - console.log('[beforeAll] No existing app, registering new app'); - const newApp = await appManager.registerNewApp({ abilityIpfsCids, abilityPolicies }); - appId = newApp.appId; - appVersion = newApp.appVersion; - } else { - console.log('[beforeAll] Existing app, registering new app version'); - const newAppVersion = await appManager.registerNewAppVersion({ - abilityIpfsCids, - abilityPolicies, - }); - appId = existingApp.appId; - appVersion = newAppVersion.appVersion; - } - - agentPkpInfo = await delegator.getFundedAgentPkp(); - - await delegator.permitAppVersionForAgentWalletPkp({ + const vincentDevEnvironment = await setupVincentDevelopmentEnvironment({ permissionData: PERMISSION_DATA, - appId, - appVersion, - agentPkpInfo, }); - - await delegator.addPermissionForAbilities( - wallets.agentWalletOwner, - agentPkpInfo.tokenId, - abilityIpfsCids, - ); + agentPkpInfo = vincentDevEnvironment.agentPkpInfo; + wallets = vincentDevEnvironment.wallets; transport = new hyperliquid.HttpTransport({ isTestnet: USE_TESTNET }); infoClient = new hyperliquid.InfoClient({ transport });